summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--akregator/src/aboutdata.cpp2
-rw-r--r--akregator/src/actionmanager.cpp2
-rw-r--r--akregator/src/actionmanager.h6
-rw-r--r--akregator/src/actionmanagerimpl.cpp158
-rw-r--r--akregator/src/actionmanagerimpl.h6
-rw-r--r--akregator/src/addfeeddialog.cpp26
-rw-r--r--akregator/src/addfeeddialog.h10
-rw-r--r--akregator/src/akregator_part.cpp220
-rw-r--r--akregator/src/akregator_part.h28
-rw-r--r--akregator/src/akregator_partiface.h6
-rw-r--r--akregator/src/akregator_run.cpp6
-rw-r--r--akregator/src/akregator_run.h4
-rw-r--r--akregator/src/akregator_view.cpp290
-rw-r--r--akregator/src/akregator_view.h54
-rw-r--r--akregator/src/article.cpp58
-rw-r--r--akregator/src/article.h24
-rw-r--r--akregator/src/articlefilter.cpp202
-rw-r--r--akregator/src/articlefilter.h44
-rw-r--r--akregator/src/articleinterceptor.cpp6
-rw-r--r--akregator/src/articleinterceptor.h2
-rw-r--r--akregator/src/articlelistview.cpp160
-rw-r--r--akregator/src/articlelistview.h32
-rw-r--r--akregator/src/articleviewer.cpp222
-rw-r--r--akregator/src/articleviewer.h30
-rw-r--r--akregator/src/configdialog.cpp8
-rw-r--r--akregator/src/configdialog.h2
-rw-r--r--akregator/src/dragobjects.cpp38
-rw-r--r--akregator/src/dragobjects.h24
-rw-r--r--akregator/src/feed.cpp162
-rw-r--r--akregator/src/feed.h34
-rw-r--r--akregator/src/feediconmanager.cpp56
-rw-r--r--akregator/src/feediconmanager.h16
-rw-r--r--akregator/src/feeditem.cpp14
-rw-r--r--akregator/src/feeditem.h6
-rw-r--r--akregator/src/feedlist.cpp62
-rw-r--r--akregator/src/feedlist.h12
-rw-r--r--akregator/src/feedlistview.cpp158
-rw-r--r--akregator/src/feedlistview.h28
-rw-r--r--akregator/src/feedstorage.h86
-rw-r--r--akregator/src/feedstoragedummyimpl.cpp146
-rw-r--r--akregator/src/feedstoragedummyimpl.h90
-rw-r--r--akregator/src/fetchqueue.cpp28
-rw-r--r--akregator/src/fetchqueue.h4
-rw-r--r--akregator/src/folder.cpp98
-rw-r--r--akregator/src/folder.h12
-rw-r--r--akregator/src/folderitem.cpp8
-rw-r--r--akregator/src/folderitem.h4
-rw-r--r--akregator/src/frame.cpp54
-rw-r--r--akregator/src/frame.h38
-rw-r--r--akregator/src/kcursorsaver.h16
-rw-r--r--akregator/src/librss/article.cpp94
-rw-r--r--akregator/src/librss/article.h34
-rw-r--r--akregator/src/librss/category.cpp24
-rw-r--r--akregator/src/librss/category.h8
-rw-r--r--akregator/src/librss/document.cpp376
-rw-r--r--akregator/src/librss/document.h30
-rw-r--r--akregator/src/librss/enclosure.cpp40
-rw-r--r--akregator/src/librss/enclosure.h10
-rw-r--r--akregator/src/librss/feeddetector.cpp54
-rw-r--r--akregator/src/librss/feeddetector.h22
-rw-r--r--akregator/src/librss/global.h4
-rw-r--r--akregator/src/librss/image.cpp48
-rw-r--r--akregator/src/librss/image.h22
-rw-r--r--akregator/src/librss/loader.cpp98
-rw-r--r--akregator/src/librss/loader.h24
-rw-r--r--akregator/src/librss/testlibrss.cpp6
-rw-r--r--akregator/src/librss/testlibrss.h4
-rw-r--r--akregator/src/librss/textinput.cpp26
-rw-r--r--akregator/src/librss/textinput.h16
-rw-r--r--akregator/src/librss/tools_p.cpp116
-rw-r--r--akregator/src/librss/tools_p.h10
-rw-r--r--akregator/src/listtabwidget.cpp46
-rw-r--r--akregator/src/listtabwidget.h6
-rw-r--r--akregator/src/main.cpp8
-rw-r--r--akregator/src/mainwindow.cpp42
-rw-r--r--akregator/src/mainwindow.h4
-rw-r--r--akregator/src/mk4storage/feedstoragemk4impl.cpp168
-rw-r--r--akregator/src/mk4storage/feedstoragemk4impl.h78
-rw-r--r--akregator/src/mk4storage/mk4confwidget.cpp8
-rw-r--r--akregator/src/mk4storage/storagefactorymk4impl.cpp14
-rw-r--r--akregator/src/mk4storage/storagefactorymk4impl.h6
-rw-r--r--akregator/src/mk4storage/storagemk4impl.cpp92
-rw-r--r--akregator/src/mk4storage/storagemk4impl.h34
-rw-r--r--akregator/src/nodelist.cpp44
-rw-r--r--akregator/src/nodelist.h20
-rw-r--r--akregator/src/notificationmanager.cpp28
-rw-r--r--akregator/src/notificationmanager.h12
-rw-r--r--akregator/src/pageviewer.cpp116
-rw-r--r--akregator/src/pageviewer.h14
-rw-r--r--akregator/src/plugin.cpp6
-rw-r--r--akregator/src/plugin.h14
-rw-r--r--akregator/src/pluginmanager.cpp18
-rw-r--r--akregator/src/pluginmanager.h10
-rw-r--r--akregator/src/progressmanager.cpp36
-rw-r--r--akregator/src/propertiesdialog.cpp22
-rw-r--r--akregator/src/propertiesdialog.h14
-rw-r--r--akregator/src/searchbar.cpp70
-rw-r--r--akregator/src/searchbar.h10
-rw-r--r--akregator/src/settings_advanced.cpp24
-rw-r--r--akregator/src/settings_advanced.h12
-rw-r--r--akregator/src/simplenodeselector.cpp36
-rw-r--r--akregator/src/simplenodeselector.h8
-rw-r--r--akregator/src/speechclient.cpp34
-rw-r--r--akregator/src/speechclient.h10
-rw-r--r--akregator/src/storage.h28
-rw-r--r--akregator/src/storagedummyimpl.cpp48
-rw-r--r--akregator/src/storagedummyimpl.h30
-rw-r--r--akregator/src/storagefactory.h6
-rw-r--r--akregator/src/storagefactorydummyimpl.cpp12
-rw-r--r--akregator/src/storagefactorydummyimpl.h6
-rw-r--r--akregator/src/storagefactoryregistry.cpp18
-rw-r--r--akregator/src/storagefactoryregistry.h10
-rw-r--r--akregator/src/tabwidget.cpp82
-rw-r--r--akregator/src/tabwidget.h16
-rw-r--r--akregator/src/tag.cpp34
-rw-r--r--akregator/src/tag.h20
-rw-r--r--akregator/src/tagaction.cpp26
-rw-r--r--akregator/src/tagaction.h6
-rw-r--r--akregator/src/tagfolder.cpp8
-rw-r--r--akregator/src/tagfolder.h4
-rw-r--r--akregator/src/tagfolderitem.cpp8
-rw-r--r--akregator/src/tagfolderitem.h4
-rw-r--r--akregator/src/tagnode.cpp58
-rw-r--r--akregator/src/tagnode.h16
-rw-r--r--akregator/src/tagnodeitem.cpp10
-rw-r--r--akregator/src/tagnodeitem.h2
-rw-r--r--akregator/src/tagnodelist.cpp42
-rw-r--r--akregator/src/tagnodelist.h10
-rw-r--r--akregator/src/tagpropertiesdialog.cpp8
-rw-r--r--akregator/src/tagpropertiesdialog.h4
-rw-r--r--akregator/src/tagset.cpp60
-rw-r--r--akregator/src/tagset.h14
-rw-r--r--akregator/src/trayicon.cpp50
-rw-r--r--akregator/src/trayicon.h14
-rw-r--r--akregator/src/treenode.cpp16
-rw-r--r--akregator/src/treenode.h18
-rw-r--r--akregator/src/treenodeitem.cpp30
-rw-r--r--akregator/src/treenodeitem.h6
-rw-r--r--akregator/src/utils.cpp16
-rw-r--r--akregator/src/utils.h6
-rw-r--r--akregator/src/viewer.cpp72
-rw-r--r--akregator/src/viewer.h8
-rw-r--r--certmanager/certificateinfowidgetimpl.cpp152
-rw-r--r--certmanager/certificateinfowidgetimpl.h16
-rw-r--r--certmanager/certificatewizardimpl.cpp134
-rw-r--r--certmanager/certificatewizardimpl.h24
-rw-r--r--certmanager/certlistview.cpp16
-rw-r--r--certmanager/certlistview.h10
-rw-r--r--certmanager/certmanager.cpp402
-rw-r--r--certmanager/certmanager.h46
-rw-r--r--certmanager/conf/appearanceconfigpage.cpp10
-rw-r--r--certmanager/conf/appearanceconfigpage.h2
-rw-r--r--certmanager/conf/appearanceconfigwidget.cpp84
-rw-r--r--certmanager/conf/appearanceconfigwidget.h6
-rw-r--r--certmanager/conf/configuredialog.cpp4
-rw-r--r--certmanager/conf/configuredialog.h4
-rw-r--r--certmanager/conf/dirservconfigpage.cpp66
-rw-r--r--certmanager/conf/dirservconfigpage.h4
-rw-r--r--certmanager/conf/dnorderconfigpage.cpp10
-rw-r--r--certmanager/conf/dnorderconfigpage.h2
-rw-r--r--certmanager/crlview.cpp56
-rw-r--r--certmanager/crlview.h20
-rw-r--r--certmanager/customactions.cpp46
-rw-r--r--certmanager/customactions.h30
-rw-r--r--certmanager/hierarchyanalyser.cpp6
-rw-r--r--certmanager/hierarchyanalyser.h10
-rw-r--r--certmanager/kwatchgnupg/kwatchgnupgconfig.cpp82
-rw-r--r--certmanager/kwatchgnupg/kwatchgnupgconfig.h8
-rw-r--r--certmanager/kwatchgnupg/kwatchgnupgmainwin.cpp102
-rw-r--r--certmanager/kwatchgnupg/kwatchgnupgmainwin.h4
-rw-r--r--certmanager/kwatchgnupg/tray.cpp4
-rw-r--r--certmanager/kwatchgnupg/tray.h6
-rw-r--r--certmanager/lib/backends/chiasmus/chiasmusbackend.cpp168
-rw-r--r--certmanager/lib/backends/chiasmus/chiasmusbackend.h12
-rw-r--r--certmanager/lib/backends/chiasmus/chiasmusjob.cpp28
-rw-r--r--certmanager/lib/backends/chiasmus/chiasmusjob.h34
-rw-r--r--certmanager/lib/backends/chiasmus/chiasmuslibrary.cpp12
-rw-r--r--certmanager/lib/backends/chiasmus/chiasmuslibrary.h8
-rw-r--r--certmanager/lib/backends/chiasmus/obtainkeysjob.cpp26
-rw-r--r--certmanager/lib/backends/chiasmus/obtainkeysjob.h16
-rw-r--r--certmanager/lib/backends/chiasmus/symcryptrunprocessbase.cpp28
-rw-r--r--certmanager/lib/backends/chiasmus/symcryptrunprocessbase.h22
-rw-r--r--certmanager/lib/backends/kpgp/gpg1backend.h4
-rw-r--r--certmanager/lib/backends/kpgp/kpgpbackendbase.cpp24
-rw-r--r--certmanager/lib/backends/kpgp/kpgpbackendbase.h4
-rw-r--r--certmanager/lib/backends/kpgp/kpgpkeylistjob.cpp14
-rw-r--r--certmanager/lib/backends/kpgp/kpgpkeylistjob.h8
-rw-r--r--certmanager/lib/backends/kpgp/kpgpwrapper.cpp6
-rw-r--r--certmanager/lib/backends/kpgp/kpgpwrapper.h10
-rw-r--r--certmanager/lib/backends/kpgp/pgp2backend.h4
-rw-r--r--certmanager/lib/backends/kpgp/pgp5backend.h4
-rw-r--r--certmanager/lib/backends/kpgp/pgp6backend.h4
-rw-r--r--certmanager/lib/backends/qgpgme/gnupgprocessbase.cpp30
-rw-r--r--certmanager/lib/backends/qgpgme/gnupgprocessbase.h4
-rw-r--r--certmanager/lib/backends/qgpgme/qgpgmebackend.cpp20
-rw-r--r--certmanager/lib/backends/qgpgme/qgpgmebackend.h10
-rw-r--r--certmanager/lib/backends/qgpgme/qgpgmecryptoconfig.cpp202
-rw-r--r--certmanager/lib/backends/qgpgme/qgpgmecryptoconfig.h92
-rw-r--r--certmanager/lib/backends/qgpgme/qgpgmedecryptjob.cpp8
-rw-r--r--certmanager/lib/backends/qgpgme/qgpgmedecryptjob.h10
-rw-r--r--certmanager/lib/backends/qgpgme/qgpgmedecryptverifyjob.cpp6
-rw-r--r--certmanager/lib/backends/qgpgme/qgpgmedecryptverifyjob.h8
-rw-r--r--certmanager/lib/backends/qgpgme/qgpgmedownloadjob.cpp4
-rw-r--r--certmanager/lib/backends/qgpgme/qgpgmedownloadjob.h2
-rw-r--r--certmanager/lib/backends/qgpgme/qgpgmeencryptjob.cpp10
-rw-r--r--certmanager/lib/backends/qgpgme/qgpgmeencryptjob.h12
-rw-r--r--certmanager/lib/backends/qgpgme/qgpgmeexportjob.cpp4
-rw-r--r--certmanager/lib/backends/qgpgme/qgpgmeexportjob.h4
-rw-r--r--certmanager/lib/backends/qgpgme/qgpgmeimportjob.cpp6
-rw-r--r--certmanager/lib/backends/qgpgme/qgpgmeimportjob.h8
-rw-r--r--certmanager/lib/backends/qgpgme/qgpgmejob.cpp38
-rw-r--r--certmanager/lib/backends/qgpgme/qgpgmejob.h18
-rw-r--r--certmanager/lib/backends/qgpgme/qgpgmekeygenerationjob.cpp4
-rw-r--r--certmanager/lib/backends/qgpgme/qgpgmekeygenerationjob.h2
-rw-r--r--certmanager/lib/backends/qgpgme/qgpgmekeylistjob.cpp18
-rw-r--r--certmanager/lib/backends/qgpgme/qgpgmekeylistjob.h8
-rw-r--r--certmanager/lib/backends/qgpgme/qgpgmeprogresstokenmapper.cpp20
-rw-r--r--certmanager/lib/backends/qgpgme/qgpgmeprogresstokenmapper.h4
-rw-r--r--certmanager/lib/backends/qgpgme/qgpgmerefreshkeysjob.cpp24
-rw-r--r--certmanager/lib/backends/qgpgme/qgpgmerefreshkeysjob.h8
-rw-r--r--certmanager/lib/backends/qgpgme/qgpgmesecretkeyexportjob.cpp28
-rw-r--r--certmanager/lib/backends/qgpgme/qgpgmesecretkeyexportjob.h12
-rw-r--r--certmanager/lib/backends/qgpgme/qgpgmesignencryptjob.cpp10
-rw-r--r--certmanager/lib/backends/qgpgme/qgpgmesignencryptjob.h12
-rw-r--r--certmanager/lib/backends/qgpgme/qgpgmesignjob.cpp10
-rw-r--r--certmanager/lib/backends/qgpgme/qgpgmesignjob.h12
-rw-r--r--certmanager/lib/backends/qgpgme/qgpgmeverifydetachedjob.cpp10
-rw-r--r--certmanager/lib/backends/qgpgme/qgpgmeverifydetachedjob.h12
-rw-r--r--certmanager/lib/backends/qgpgme/qgpgmeverifyopaquejob.cpp6
-rw-r--r--certmanager/lib/backends/qgpgme/qgpgmeverifyopaquejob.h8
-rw-r--r--certmanager/lib/cryptplug.cpp12
-rw-r--r--certmanager/lib/cryptplugfactory.cpp6
-rw-r--r--certmanager/lib/cryptplugfactory.h4
-rw-r--r--certmanager/lib/cryptplugwrapper.cpp68
-rw-r--r--certmanager/lib/cryptplugwrapper.h48
-rw-r--r--certmanager/lib/cryptplugwrapperlist.cpp4
-rw-r--r--certmanager/lib/cryptplugwrapperlist.h8
-rw-r--r--certmanager/lib/kleo/cryptobackend.h20
-rw-r--r--certmanager/lib/kleo/cryptobackendfactory.cpp14
-rw-r--r--certmanager/lib/kleo/cryptobackendfactory.h10
-rw-r--r--certmanager/lib/kleo/cryptoconfig.h46
-rw-r--r--certmanager/lib/kleo/decryptjob.h16
-rw-r--r--certmanager/lib/kleo/decryptverifyjob.h14
-rw-r--r--certmanager/lib/kleo/deletejob.h6
-rw-r--r--certmanager/lib/kleo/dn.cpp74
-rw-r--r--certmanager/lib/kleo/dn.h38
-rw-r--r--certmanager/lib/kleo/downloadjob.h12
-rw-r--r--certmanager/lib/kleo/encryptjob.h16
-rw-r--r--certmanager/lib/kleo/enum.cpp28
-rw-r--r--certmanager/lib/kleo/enum.h16
-rw-r--r--certmanager/lib/kleo/exportjob.h12
-rw-r--r--certmanager/lib/kleo/hierarchicalkeylistjob.cpp18
-rw-r--r--certmanager/lib/kleo/hierarchicalkeylistjob.h20
-rw-r--r--certmanager/lib/kleo/importjob.h12
-rw-r--r--certmanager/lib/kleo/job.cpp16
-rw-r--r--certmanager/lib/kleo/job.h14
-rw-r--r--certmanager/lib/kleo/kconfigbasedkeyfilter.cpp14
-rw-r--r--certmanager/lib/kleo/kconfigbasedkeyfilter.h24
-rw-r--r--certmanager/lib/kleo/keyfilter.h10
-rw-r--r--certmanager/lib/kleo/keyfiltermanager.cpp22
-rw-r--r--certmanager/lib/kleo/keyfiltermanager.h6
-rw-r--r--certmanager/lib/kleo/keygenerationjob.h12
-rw-r--r--certmanager/lib/kleo/keylistjob.h10
-rw-r--r--certmanager/lib/kleo/multideletejob.cpp2
-rw-r--r--certmanager/lib/kleo/multideletejob.h8
-rw-r--r--certmanager/lib/kleo/refreshkeysjob.h8
-rw-r--r--certmanager/lib/kleo/signencryptjob.h16
-rw-r--r--certmanager/lib/kleo/signjob.h16
-rw-r--r--certmanager/lib/kleo/specialjob.h8
-rw-r--r--certmanager/lib/kleo/verifydetachedjob.h16
-rw-r--r--certmanager/lib/kleo/verifyopaquejob.h14
-rw-r--r--certmanager/lib/tests/gnupgviewer.h12
-rw-r--r--certmanager/lib/tests/test_cryptoconfig.cpp42
-rw-r--r--certmanager/lib/tests/test_gnupgprocessbase.cpp46
-rw-r--r--certmanager/lib/tests/test_jobs.cpp8
-rw-r--r--certmanager/lib/tests/test_keygen.cpp40
-rw-r--r--certmanager/lib/tests/test_keygen.h8
-rw-r--r--certmanager/lib/tests/test_keylister.cpp58
-rw-r--r--certmanager/lib/tests/test_keylister.h2
-rw-r--r--certmanager/lib/tests/test_keyselectiondialog.cpp2
-rw-r--r--certmanager/lib/tests/test_verify.cpp20
-rw-r--r--certmanager/lib/ui/adddirectoryservicedialogimpl.cpp6
-rw-r--r--certmanager/lib/ui/adddirectoryservicedialogimpl.h2
-rw-r--r--certmanager/lib/ui/backendconfigwidget.cpp80
-rw-r--r--certmanager/lib/ui/backendconfigwidget.h8
-rw-r--r--certmanager/lib/ui/cryptoconfigdialog.cpp4
-rw-r--r--certmanager/lib/ui/cryptoconfigdialog.h2
-rw-r--r--certmanager/lib/ui/cryptoconfigmodule.cpp166
-rw-r--r--certmanager/lib/ui/cryptoconfigmodule.h8
-rw-r--r--certmanager/lib/ui/cryptoconfigmodule_p.h78
-rw-r--r--certmanager/lib/ui/directoryserviceswidget.cpp72
-rw-r--r--certmanager/lib/ui/directoryserviceswidget.h6
-rw-r--r--certmanager/lib/ui/dnattributeorderconfigwidget.cpp124
-rw-r--r--certmanager/lib/ui/dnattributeorderconfigwidget.h12
-rw-r--r--certmanager/lib/ui/kdhorizontalline.cpp68
-rw-r--r--certmanager/lib/ui/kdhorizontalline.h26
-rw-r--r--certmanager/lib/ui/keyapprovaldialog.cpp62
-rw-r--r--certmanager/lib/ui/keyapprovaldialog.h6
-rw-r--r--certmanager/lib/ui/keylistview.cpp306
-rw-r--r--certmanager/lib/ui/keylistview.h126
-rw-r--r--certmanager/lib/ui/keyrequester.cpp114
-rw-r--r--certmanager/lib/ui/keyrequester.h46
-rw-r--r--certmanager/lib/ui/keyselectiondialog.cpp212
-rw-r--r--certmanager/lib/ui/keyselectiondialog.h48
-rw-r--r--certmanager/lib/ui/messagebox.cpp88
-rw-r--r--certmanager/lib/ui/messagebox.h40
-rw-r--r--certmanager/lib/ui/passphrasedialog.cpp22
-rw-r--r--certmanager/lib/ui/passphrasedialog.h6
-rw-r--r--certmanager/lib/ui/progressbar.cpp30
-rw-r--r--certmanager/lib/ui/progressbar.h16
-rw-r--r--certmanager/lib/ui/progressdialog.cpp26
-rw-r--r--certmanager/lib/ui/progressdialog.h14
-rw-r--r--certmanager/main.cpp4
-rw-r--r--certmanager/storedtransferjob.cpp30
-rw-r--r--certmanager/storedtransferjob.h30
-rw-r--r--kabc/frontend/main.cpp2
-rw-r--r--kabc/frontend/mainWindow.ui.h130
-rw-r--r--kabc/kabc2mutt/kabc2mutt.cpp34
-rw-r--r--kabc/kabc2mutt/kabc2mutt.h6
-rw-r--r--kabc/kabc2mutt/main.cpp2
-rw-r--r--kabc/kabcdistlistupdater/kabcdistlistupdater.cpp12
-rw-r--r--kaddressbook/addresseditwidget.cpp162
-rw-r--r--kaddressbook/addresseditwidget.h24
-rw-r--r--kaddressbook/addresseeconfig.cpp8
-rw-r--r--kaddressbook/addresseeconfig.h8
-rw-r--r--kaddressbook/addresseeeditorbase.h6
-rw-r--r--kaddressbook/addresseeeditordialog.cpp18
-rw-r--r--kaddressbook/addresseeeditordialog.h4
-rw-r--r--kaddressbook/addresseeeditorextension.cpp10
-rw-r--r--kaddressbook/addresseeeditorextension.h6
-rw-r--r--kaddressbook/addresseeeditorwidget.cpp260
-rw-r--r--kaddressbook/addresseeeditorwidget.h24
-rw-r--r--kaddressbook/addresseeutil.cpp8
-rw-r--r--kaddressbook/addresseeutil.h8
-rw-r--r--kaddressbook/addviewdialog.cpp44
-rw-r--r--kaddressbook/addviewdialog.h18
-rw-r--r--kaddressbook/advancedcustomfields.cpp58
-rw-r--r--kaddressbook/advancedcustomfields.h16
-rw-r--r--kaddressbook/common/filter.cpp28
-rw-r--r--kaddressbook/common/filter.h26
-rw-r--r--kaddressbook/common/kabprefs.cpp2
-rw-r--r--kaddressbook/common/kabprefs.h22
-rw-r--r--kaddressbook/common/locationmap.cpp6
-rw-r--r--kaddressbook/common/locationmap.h6
-rw-r--r--kaddressbook/contacteditorwidgetmanager.cpp26
-rw-r--r--kaddressbook/contacteditorwidgetmanager.h8
-rw-r--r--kaddressbook/customfieldswidget.cpp198
-rw-r--r--kaddressbook/customfieldswidget.h70
-rw-r--r--kaddressbook/distributionlisteditor.cpp94
-rw-r--r--kaddressbook/distributionlisteditor.h2
-rw-r--r--kaddressbook/distributionlisteditor_p.h18
-rw-r--r--kaddressbook/distributionlistentryview.cpp64
-rw-r--r--kaddressbook/distributionlistentryview.h26
-rw-r--r--kaddressbook/distributionlistpicker.cpp52
-rw-r--r--kaddressbook/distributionlistpicker.h14
-rw-r--r--kaddressbook/editors/cryptowidget.cpp70
-rw-r--r--kaddressbook/editors/cryptowidget.h14
-rw-r--r--kaddressbook/editors/imaddresswidget.cpp34
-rw-r--r--kaddressbook/editors/imaddresswidget.h14
-rw-r--r--kaddressbook/editors/imeditorwidget.cpp126
-rw-r--r--kaddressbook/editors/imeditorwidget.h28
-rw-r--r--kaddressbook/emaileditwidget.cpp116
-rw-r--r--kaddressbook/emaileditwidget.h26
-rw-r--r--kaddressbook/extensionmanager.cpp70
-rw-r--r--kaddressbook/extensionmanager.h44
-rw-r--r--kaddressbook/features/distributionlistngwidget.cpp114
-rw-r--r--kaddressbook/features/distributionlistngwidget.h30
-rw-r--r--kaddressbook/features/distributionlistwidget.cpp162
-rw-r--r--kaddressbook/features/distributionlistwidget.h52
-rw-r--r--kaddressbook/features/resourceselection.cpp166
-rw-r--r--kaddressbook/features/resourceselection.h32
-rw-r--r--kaddressbook/filtereditdialog.cpp86
-rw-r--r--kaddressbook/filtereditdialog.h20
-rw-r--r--kaddressbook/filterselectionwidget.cpp14
-rw-r--r--kaddressbook/filterselectionwidget.h6
-rw-r--r--kaddressbook/freebusywidget.cpp14
-rw-r--r--kaddressbook/freebusywidget.h6
-rw-r--r--kaddressbook/geowidget.cpp172
-rw-r--r--kaddressbook/geowidget.h36
-rw-r--r--kaddressbook/imagewidget.cpp88
-rw-r--r--kaddressbook/imagewidget.h30
-rw-r--r--kaddressbook/imeditwidget.cpp46
-rw-r--r--kaddressbook/imeditwidget.h16
-rw-r--r--kaddressbook/incsearchwidget.cpp78
-rw-r--r--kaddressbook/incsearchwidget.h12
-rw-r--r--kaddressbook/interfaces/configurewidget.cpp4
-rw-r--r--kaddressbook/interfaces/configurewidget.h4
-rw-r--r--kaddressbook/interfaces/contacteditorwidget.cpp4
-rw-r--r--kaddressbook/interfaces/contacteditorwidget.h16
-rw-r--r--kaddressbook/interfaces/core.cpp4
-rw-r--r--kaddressbook/interfaces/core.h30
-rw-r--r--kaddressbook/interfaces/extensionwidget.cpp10
-rw-r--r--kaddressbook/interfaces/extensionwidget.h20
-rw-r--r--kaddressbook/interfaces/xxport.cpp54
-rw-r--r--kaddressbook/interfaces/xxport.h38
-rw-r--r--kaddressbook/jumpbuttonbar.cpp88
-rw-r--r--kaddressbook/jumpbuttonbar.h20
-rw-r--r--kaddressbook/kabcore.cpp490
-rw-r--r--kaddressbook/kabcore.h96
-rw-r--r--kaddressbook/kablock.h2
-rw-r--r--kaddressbook/kabtools.cpp58
-rw-r--r--kaddressbook/kabtools.h2
-rw-r--r--kaddressbook/kaddressbook_part.cpp26
-rw-r--r--kaddressbook/kaddressbook_part.h16
-rw-r--r--kaddressbook/kaddressbookiface.h14
-rw-r--r--kaddressbook/kaddressbookmain.cpp24
-rw-r--r--kaddressbook/kaddressbookmain.h16
-rw-r--r--kaddressbook/kaddressbookservice.cpp2
-rw-r--r--kaddressbook/kaddressbookservice.h2
-rw-r--r--kaddressbook/kaddressbookview.cpp44
-rw-r--r--kaddressbook/kaddressbookview.h50
-rw-r--r--kaddressbook/kcmconfigs/addhostdialog.cpp18
-rw-r--r--kaddressbook/kcmconfigs/addhostdialog.h4
-rw-r--r--kaddressbook/kcmconfigs/addresseewidget.cpp68
-rw-r--r--kaddressbook/kcmconfigs/addresseewidget.h24
-rw-r--r--kaddressbook/kcmconfigs/extensionconfigdialog.cpp8
-rw-r--r--kaddressbook/kcmconfigs/extensionconfigdialog.h2
-rw-r--r--kaddressbook/kcmconfigs/kabconfigwidget.cpp102
-rw-r--r--kaddressbook/kcmconfigs/kabconfigwidget.h22
-rw-r--r--kaddressbook/kcmconfigs/kcmkabconfig.cpp10
-rw-r--r--kaddressbook/kcmconfigs/kcmkabconfig.h2
-rw-r--r--kaddressbook/kcmconfigs/kcmkabcustomfields.cpp22
-rw-r--r--kaddressbook/kcmconfigs/kcmkabcustomfields.h14
-rw-r--r--kaddressbook/kcmconfigs/kcmkabldapconfig.cpp14
-rw-r--r--kaddressbook/kcmconfigs/kcmkabldapconfig.h4
-rw-r--r--kaddressbook/kcmconfigs/ldapoptionswidget.cpp80
-rw-r--r--kaddressbook/kcmconfigs/ldapoptionswidget.h18
-rw-r--r--kaddressbook/keywidget.cpp56
-rw-r--r--kaddressbook/keywidget.h10
-rw-r--r--kaddressbook/ldapsearchdialog.cpp170
-rw-r--r--kaddressbook/ldapsearchdialog.h22
-rw-r--r--kaddressbook/main.cpp4
-rw-r--r--kaddressbook/nameeditdialog.cpp110
-rw-r--r--kaddressbook/nameeditdialog.h22
-rw-r--r--kaddressbook/phoneeditwidget.cpp84
-rw-r--r--kaddressbook/phoneeditwidget.h24
-rw-r--r--kaddressbook/printing/detailledstyle.cpp48
-rw-r--r--kaddressbook/printing/detailledstyle.h8
-rw-r--r--kaddressbook/printing/kabentrypainter.cpp96
-rw-r--r--kaddressbook/printing/kabentrypainter.h60
-rw-r--r--kaddressbook/printing/mikesstyle.cpp52
-rw-r--r--kaddressbook/printing/mikesstyle.h14
-rw-r--r--kaddressbook/printing/printingwizard.cpp30
-rw-r--r--kaddressbook/printing/printingwizard.h14
-rw-r--r--kaddressbook/printing/printprogress.cpp32
-rw-r--r--kaddressbook/printing/printprogress.h12
-rw-r--r--kaddressbook/printing/printsortmode.cpp8
-rw-r--r--kaddressbook/printing/printstyle.cpp20
-rw-r--r--kaddressbook/printing/printstyle.h26
-rw-r--r--kaddressbook/printing/selectionpage.cpp84
-rw-r--r--kaddressbook/printing/selectionpage.h28
-rw-r--r--kaddressbook/printing/stylepage.cpp42
-rw-r--r--kaddressbook/printing/stylepage.h10
-rw-r--r--kaddressbook/searchmanager.cpp20
-rw-r--r--kaddressbook/searchmanager.h14
-rw-r--r--kaddressbook/secrecywidget.cpp12
-rw-r--r--kaddressbook/secrecywidget.h4
-rw-r--r--kaddressbook/simpleaddresseeeditor.cpp20
-rw-r--r--kaddressbook/simpleaddresseeeditor.h2
-rw-r--r--kaddressbook/soundwidget.cpp60
-rw-r--r--kaddressbook/soundwidget.h12
-rw-r--r--kaddressbook/thumbnailcreator/ldifvcardcreator.cpp60
-rw-r--r--kaddressbook/thumbnailcreator/ldifvcardcreator.h14
-rw-r--r--kaddressbook/typecombo.h18
-rw-r--r--kaddressbook/undocmds.cpp36
-rw-r--r--kaddressbook/undocmds.h26
-rw-r--r--kaddressbook/viewconfigurefieldspage.cpp76
-rw-r--r--kaddressbook/viewconfigurefieldspage.h16
-rw-r--r--kaddressbook/viewconfigurefilterpage.cpp30
-rw-r--r--kaddressbook/viewconfigurefilterpage.h6
-rw-r--r--kaddressbook/viewconfigurewidget.cpp20
-rw-r--r--kaddressbook/viewconfigurewidget.h12
-rw-r--r--kaddressbook/viewmanager.cpp110
-rw-r--r--kaddressbook/viewmanager.h38
-rw-r--r--kaddressbook/views/cardview.cpp262
-rw-r--r--kaddressbook/views/cardview.h84
-rw-r--r--kaddressbook/views/colorlistbox.cpp42
-rw-r--r--kaddressbook/views/colorlistbox.h28
-rw-r--r--kaddressbook/views/configurecardviewdialog.cpp138
-rw-r--r--kaddressbook/views/configurecardviewdialog.h22
-rw-r--r--kaddressbook/views/configuretableviewdialog.cpp44
-rw-r--r--kaddressbook/views/configuretableviewdialog.h16
-rw-r--r--kaddressbook/views/contactlistview.cpp80
-rw-r--r--kaddressbook/views/contactlistview.h40
-rw-r--r--kaddressbook/views/kaddressbookcardview.cpp110
-rw-r--r--kaddressbook/views/kaddressbookcardview.h22
-rw-r--r--kaddressbook/views/kaddressbookiconview.cpp100
-rw-r--r--kaddressbook/views/kaddressbookiconview.h26
-rw-r--r--kaddressbook/views/kaddressbooktableview.cpp140
-rw-r--r--kaddressbook/views/kaddressbooktableview.h32
-rw-r--r--kaddressbook/xxport/bookmark_xxport.cpp10
-rw-r--r--kaddressbook/xxport/bookmark_xxport.h10
-rw-r--r--kaddressbook/xxport/csv_xxport.cpp20
-rw-r--r--kaddressbook/xxport/csv_xxport.h10
-rw-r--r--kaddressbook/xxport/csvimportdialog.cpp210
-rw-r--r--kaddressbook/xxport/csvimportdialog.h60
-rw-r--r--kaddressbook/xxport/dateparser.cpp20
-rw-r--r--kaddressbook/xxport/dateparser.h8
-rw-r--r--kaddressbook/xxport/eudora_xxport.cpp38
-rw-r--r--kaddressbook/xxport/eudora_xxport.h16
-rw-r--r--kaddressbook/xxport/gnokii_xxport.cpp212
-rw-r--r--kaddressbook/xxport/gnokii_xxport.h8
-rw-r--r--kaddressbook/xxport/kde2_xxport.cpp10
-rw-r--r--kaddressbook/xxport/kde2_xxport.h6
-rw-r--r--kaddressbook/xxport/ldif_xxport.cpp40
-rw-r--r--kaddressbook/xxport/ldif_xxport.h10
-rw-r--r--kaddressbook/xxport/opera_xxport.cpp44
-rw-r--r--kaddressbook/xxport/opera_xxport.h6
-rw-r--r--kaddressbook/xxport/pab_mapihd.cpp6
-rw-r--r--kaddressbook/xxport/pab_mapihd.h8
-rw-r--r--kaddressbook/xxport/pab_pablib.cpp4
-rw-r--r--kaddressbook/xxport/pab_pablib.h8
-rw-r--r--kaddressbook/xxport/pab_xxport.cpp12
-rw-r--r--kaddressbook/xxport/pab_xxport.h8
-rw-r--r--kaddressbook/xxport/vcard_xxport.cpp98
-rw-r--r--kaddressbook/xxport/vcard_xxport.h12
-rw-r--r--kaddressbook/xxportmanager.cpp24
-rw-r--r--kaddressbook/xxportmanager.h16
-rw-r--r--kaddressbook/xxportselectdialog.cpp102
-rw-r--r--kaddressbook/xxportselectdialog.h22
-rw-r--r--kalarm/alarmcalendar.cpp96
-rw-r--r--kalarm/alarmcalendar.h30
-rw-r--r--kalarm/alarmevent.cpp458
-rw-r--r--kalarm/alarmevent.h164
-rw-r--r--kalarm/alarmlistview.cpp148
-rw-r--r--kalarm/alarmlistview.h58
-rw-r--r--kalarm/alarmtext.cpp72
-rw-r--r--kalarm/alarmtext.h62
-rw-r--r--kalarm/alarmtimewidget.cpp114
-rw-r--r--kalarm/alarmtimewidget.h24
-rw-r--r--kalarm/birthdaydlg.cpp120
-rw-r--r--kalarm/birthdaydlg.h22
-rw-r--r--kalarm/calendarcompat.cpp42
-rw-r--r--kalarm/calendarcompat.h8
-rw-r--r--kalarm/daemon.cpp98
-rw-r--r--kalarm/daemon.h24
-rw-r--r--kalarm/dcophandler.cpp282
-rw-r--r--kalarm/dcophandler.h92
-rw-r--r--kalarm/deferdlg.cpp18
-rw-r--r--kalarm/deferdlg.h8
-rw-r--r--kalarm/editdlg.cpp428
-rw-r--r--kalarm/editdlg.h140
-rw-r--r--kalarm/editdlgprivate.h8
-rw-r--r--kalarm/emailidcombo.cpp12
-rw-r--r--kalarm/emailidcombo.h12
-rw-r--r--kalarm/eventlistviewbase.cpp80
-rw-r--r--kalarm/eventlistviewbase.h46
-rw-r--r--kalarm/find.cpp56
-rw-r--r--kalarm/find.h26
-rw-r--r--kalarm/fontcolour.cpp126
-rw-r--r--kalarm/fontcolour.h30
-rw-r--r--kalarm/fontcolourbutton.cpp40
-rw-r--r--kalarm/fontcolourbutton.h40
-rw-r--r--kalarm/functions.cpp190
-rw-r--r--kalarm/functions.h56
-rw-r--r--kalarm/kalarmapp.cpp336
-rw-r--r--kalarm/kalarmapp.h54
-rw-r--r--kalarm/kalarmd/adcalendar.cpp28
-rw-r--r--kalarm/kalarmd/adcalendar.h40
-rw-r--r--kalarm/kalarmd/adconfigdata.cpp46
-rw-r--r--kalarm/kalarmd/adconfigdata.h6
-rw-r--r--kalarm/kalarmd/alarmdaemon.cpp102
-rw-r--r--kalarm/kalarmd/alarmdaemon.h30
-rw-r--r--kalarm/kalarmd/alarmdaemoniface.h14
-rw-r--r--kalarm/kalarmd/alarmguiiface.h4
-rw-r--r--kalarm/kalarmd/clientinfo.cpp22
-rw-r--r--kalarm/kalarmd/clientinfo.h34
-rw-r--r--kalarm/kalarmiface.h126
-rw-r--r--kalarm/kamail.cpp298
-rw-r--r--kalarm/kamail.h40
-rw-r--r--kalarm/karecurrence.cpp100
-rw-r--r--kalarm/karecurrence.h28
-rw-r--r--kalarm/latecancel.cpp52
-rw-r--r--kalarm/latecancel.h22
-rw-r--r--kalarm/lib/buttongroup.cpp36
-rw-r--r--kalarm/lib/buttongroup.h24
-rw-r--r--kalarm/lib/checkbox.cpp36
-rw-r--r--kalarm/lib/checkbox.h28
-rw-r--r--kalarm/lib/colourcombo.cpp66
-rw-r--r--kalarm/lib/colourcombo.h36
-rw-r--r--kalarm/lib/colourlist.cpp6
-rw-r--r--kalarm/lib/colourlist.h40
-rw-r--r--kalarm/lib/combobox.cpp30
-rw-r--r--kalarm/lib/combobox.h20
-rw-r--r--kalarm/lib/dateedit.cpp28
-rw-r--r--kalarm/lib/dateedit.h36
-rw-r--r--kalarm/lib/datetime.cpp14
-rw-r--r--kalarm/lib/datetime.h56
-rw-r--r--kalarm/lib/label.cpp38
-rw-r--r--kalarm/lib/label.h28
-rw-r--r--kalarm/lib/lineedit.cpp40
-rw-r--r--kalarm/lib/lineedit.h12
-rw-r--r--kalarm/lib/messagebox.cpp34
-rw-r--r--kalarm/lib/messagebox.h26
-rw-r--r--kalarm/lib/pushbutton.cpp34
-rw-r--r--kalarm/lib/pushbutton.h24
-rw-r--r--kalarm/lib/radiobutton.cpp36
-rw-r--r--kalarm/lib/radiobutton.h28
-rw-r--r--kalarm/lib/shellprocess.cpp20
-rw-r--r--kalarm/lib/shellprocess.h24
-rw-r--r--kalarm/lib/slider.cpp32
-rw-r--r--kalarm/lib/slider.h22
-rw-r--r--kalarm/lib/spinbox.cpp104
-rw-r--r--kalarm/lib/spinbox.h14
-rw-r--r--kalarm/lib/spinbox2.cpp148
-rw-r--r--kalarm/lib/spinbox2.h68
-rw-r--r--kalarm/lib/spinbox2private.h36
-rw-r--r--kalarm/lib/synchtimer.cpp42
-rw-r--r--kalarm/lib/synchtimer.h54
-rw-r--r--kalarm/lib/timeedit.cpp8
-rw-r--r--kalarm/lib/timeedit.h18
-rw-r--r--kalarm/lib/timeperiod.cpp40
-rw-r--r--kalarm/lib/timeperiod.h26
-rw-r--r--kalarm/lib/timespinbox.cpp88
-rw-r--r--kalarm/lib/timespinbox.h22
-rw-r--r--kalarm/mainwindow.cpp274
-rw-r--r--kalarm/mainwindow.h46
-rw-r--r--kalarm/mainwindowbase.cpp2
-rw-r--r--kalarm/mainwindowbase.h4
-rw-r--r--kalarm/messagewin.cpp452
-rw-r--r--kalarm/messagewin.h60
-rw-r--r--kalarm/pickfileradio.cpp26
-rw-r--r--kalarm/pickfileradio.h22
-rw-r--r--kalarm/prefdlg.cpp480
-rw-r--r--kalarm/prefdlg.h108
-rw-r--r--kalarm/preferences.cpp272
-rw-r--r--kalarm/preferences.h112
-rw-r--r--kalarm/recurrenceedit.cpp372
-rw-r--r--kalarm/recurrenceedit.h72
-rw-r--r--kalarm/recurrenceeditprivate.h58
-rw-r--r--kalarm/reminder.cpp24
-rw-r--r--kalarm/reminder.h10
-rw-r--r--kalarm/repetition.cpp44
-rw-r--r--kalarm/repetition.h6
-rw-r--r--kalarm/sounddlg.cpp136
-rw-r--r--kalarm/sounddlg.h38
-rw-r--r--kalarm/soundpicker.cpp84
-rw-r--r--kalarm/soundpicker.h30
-rw-r--r--kalarm/specialactions.cpp50
-rw-r--r--kalarm/specialactions.h34
-rw-r--r--kalarm/startdaytimer.cpp4
-rw-r--r--kalarm/startdaytimer.h6
-rw-r--r--kalarm/templatedlg.cpp70
-rw-r--r--kalarm/templatedlg.h14
-rw-r--r--kalarm/templatelistview.cpp20
-rw-r--r--kalarm/templatelistview.h28
-rw-r--r--kalarm/templatemenuaction.cpp22
-rw-r--r--kalarm/templatemenuaction.h4
-rw-r--r--kalarm/templatepickdlg.cpp20
-rw-r--r--kalarm/templatepickdlg.h4
-rw-r--r--kalarm/timeselector.cpp32
-rw-r--r--kalarm/timeselector.h8
-rw-r--r--kalarm/traywindow.cpp42
-rw-r--r--kalarm/traywindow.h14
-rw-r--r--kalarm/undo.cpp144
-rw-r--r--kalarm/undo.h38
-rw-r--r--kandy/src/atcommand.cpp76
-rw-r--r--kandy/src/atcommand.h66
-rw-r--r--kandy/src/cmdpropertiesdialog.cpp20
-rw-r--r--kandy/src/cmdpropertiesdialog.h4
-rw-r--r--kandy/src/commanditem.cpp24
-rw-r--r--kandy/src/commanditem.h14
-rw-r--r--kandy/src/commandscheduler.cpp22
-rw-r--r--kandy/src/commandscheduler.h24
-rw-r--r--kandy/src/commandset.cpp46
-rw-r--r--kandy/src/commandset.h18
-rw-r--r--kandy/src/kandy.cpp74
-rw-r--r--kandy/src/kandy.h18
-rw-r--r--kandy/src/kandy_client.cpp14
-rw-r--r--kandy/src/kandyprefsdialog.cpp150
-rw-r--r--kandy/src/kandyprefsdialog.h14
-rw-r--r--kandy/src/kandyview.cpp122
-rw-r--r--kandy/src/kandyview.h26
-rw-r--r--kandy/src/main.cpp24
-rw-r--r--kandy/src/mobilegui.cpp190
-rw-r--r--kandy/src/mobilegui.h36
-rw-r--r--kandy/src/mobilemain.cpp32
-rw-r--r--kandy/src/mobilemain.h10
-rw-r--r--kandy/src/modem.cpp38
-rw-r--r--kandy/src/modem.h18
-rw-r--r--karm/csvexportdialog.cpp14
-rw-r--r--karm/csvexportdialog.h2
-rw-r--r--karm/desktoplist.h4
-rw-r--r--karm/desktoptracker.cpp14
-rw-r--r--karm/desktoptracker.h4
-rw-r--r--karm/edittaskdialog.cpp104
-rw-r--r--karm/edittaskdialog.h24
-rw-r--r--karm/idletimedetector.cpp20
-rw-r--r--karm/idletimedetector.h10
-rw-r--r--karm/kaccelmenuwatch.cpp18
-rw-r--r--karm/kaccelmenuwatch.h24
-rw-r--r--karm/karm_part.cpp222
-rw-r--r--karm/karm_part.h48
-rw-r--r--karm/karmdcopiface.h26
-rw-r--r--karm/karmstorage.cpp266
-rw-r--r--karm/karmstorage.h86
-rw-r--r--karm/karmutility.cpp4
-rw-r--r--karm/karmutility.h4
-rw-r--r--karm/ktimewidget.cpp42
-rw-r--r--karm/ktimewidget.h6
-rw-r--r--karm/main.cpp2
-rw-r--r--karm/mainwindow.cpp226
-rw-r--r--karm/mainwindow.h38
-rw-r--r--karm/plannerparser.cpp14
-rw-r--r--karm/plannerparser.h6
-rw-r--r--karm/preferences.cpp132
-rw-r--r--karm/preferences.h34
-rw-r--r--karm/print.cpp40
-rw-r--r--karm/print.h6
-rw-r--r--karm/printdialog.cpp52
-rw-r--r--karm/printdialog.h10
-rw-r--r--karm/reportcriteria.h10
-rw-r--r--karm/task.cpp102
-rw-r--r--karm/task.h70
-rw-r--r--karm/taskview.cpp170
-rw-r--r--karm/taskview.h52
-rw-r--r--karm/taskviewwhatsthis.cpp10
-rw-r--r--karm/taskviewwhatsthis.h6
-rw-r--r--karm/test/lockerthread.cpp10
-rw-r--r--karm/test/lockerthread.h8
-rw-r--r--karm/test/locking.cpp16
-rw-r--r--karm/test/runscripts.cpp44
-rw-r--r--karm/test/script.cpp36
-rw-r--r--karm/test/script.h10
-rw-r--r--karm/timekard.cpp128
-rw-r--r--karm/timekard.h42
-rw-r--r--karm/tray.cpp50
-rw-r--r--karm/tray.h16
-rw-r--r--kdgantt/KDGanttMinimizeSplitter.cpp270
-rw-r--r--kdgantt/KDGanttMinimizeSplitter.h62
-rw-r--r--kdgantt/KDGanttSemiSizingControl.cpp60
-rw-r--r--kdgantt/KDGanttSemiSizingControl.h26
-rw-r--r--kdgantt/KDGanttSizingControl.cpp4
-rw-r--r--kdgantt/KDGanttSizingControl.h4
-rw-r--r--kdgantt/KDGanttView.cpp838
-rw-r--r--kdgantt/KDGanttView.h270
-rw-r--r--kdgantt/KDGanttViewEventItem.cpp36
-rw-r--r--kdgantt/KDGanttViewEventItem.h24
-rw-r--r--kdgantt/KDGanttViewItem.cpp342
-rw-r--r--kdgantt/KDGanttViewItem.h172
-rw-r--r--kdgantt/KDGanttViewItemDrag.cpp34
-rw-r--r--kdgantt/KDGanttViewItemDrag.h16
-rw-r--r--kdgantt/KDGanttViewSubwidgets.cpp684
-rw-r--r--kdgantt/KDGanttViewSubwidgets.h334
-rw-r--r--kdgantt/KDGanttViewSummaryItem.cpp28
-rw-r--r--kdgantt/KDGanttViewSummaryItem.h30
-rw-r--r--kdgantt/KDGanttViewTaskItem.cpp38
-rw-r--r--kdgantt/KDGanttViewTaskItem.h22
-rw-r--r--kdgantt/KDGanttViewTaskLink.cpp192
-rw-r--r--kdgantt/KDGanttViewTaskLink.h68
-rw-r--r--kdgantt/KDGanttViewTaskLinkGroup.cpp52
-rw-r--r--kdgantt/KDGanttViewTaskLinkGroup.h32
-rw-r--r--kdgantt/KDGanttXMLTools.cpp262
-rw-r--r--kdgantt/KDGanttXMLTools.h116
-rw-r--r--kdgantt/itemAttributeDialog.ui.h94
-rw-r--r--kdgantt/qlayoutengine_p.h4
-rw-r--r--kfile-plugins/ics/kfile_ics.cpp36
-rw-r--r--kfile-plugins/ics/kfile_ics.h2
-rw-r--r--kfile-plugins/palm-databases/kfile_palm.cpp40
-rw-r--r--kfile-plugins/palm-databases/kfile_palm.h2
-rw-r--r--kfile-plugins/rfc822/kfile_rfc822.cpp30
-rw-r--r--kfile-plugins/rfc822/kfile_rfc822.h2
-rw-r--r--kfile-plugins/vcf/kfile_vcf.cpp28
-rw-r--r--kfile-plugins/vcf/kfile_vcf.h2
-rw-r--r--kgantt/kgantt/KGantt.cpp36
-rw-r--r--kgantt/kgantt/KGantt.h20
-rw-r--r--kgantt/kgantt/KGanttBarConfig.cpp10
-rw-r--r--kgantt/kgantt/KGanttBarConfig.h6
-rw-r--r--kgantt/kgantt/KGanttItem.cpp56
-rw-r--r--kgantt/kgantt/KGanttItem.h72
-rw-r--r--kgantt/kgantt/KGanttRelation.cpp24
-rw-r--r--kgantt/kgantt/KGanttRelation.h36
-rw-r--r--kgantt/kgantt/xQGanttBarView.cpp60
-rw-r--r--kgantt/kgantt/xQGanttBarView.h8
-rw-r--r--kgantt/kgantt/xQGanttBarViewPort.cpp174
-rw-r--r--kgantt/kgantt/xQGanttBarViewPort.h58
-rw-r--r--kgantt/kgantt/xQGanttBarViewPort_Events.cpp60
-rw-r--r--kgantt/kgantt/xQGanttListView.cpp18
-rw-r--r--kgantt/kgantt/xQGanttListView.h8
-rw-r--r--kgantt/kgantt/xQGanttListViewPort.cpp38
-rw-r--r--kgantt/kgantt/xQGanttListViewPort.h16
-rw-r--r--kioslaves/imap4/imap4.cc314
-rw-r--r--kioslaves/imap4/imap4.h58
-rw-r--r--kioslaves/imap4/imapcommand.cc126
-rw-r--r--kioslaves/imap4/imapcommand.h140
-rw-r--r--kioslaves/imap4/imapinfo.cc12
-rw-r--r--kioslaves/imap4/imapinfo.h16
-rw-r--r--kioslaves/imap4/imaplist.cc6
-rw-r--r--kioslaves/imap4/imaplist.h22
-rw-r--r--kioslaves/imap4/imapparser.cc260
-rw-r--r--kioslaves/imap4/imapparser.h118
-rw-r--r--kioslaves/imap4/mailaddress.cc28
-rw-r--r--kioslaves/imap4/mailaddress.h40
-rw-r--r--kioslaves/imap4/mailheader.cc36
-rw-r--r--kioslaves/imap4/mailheader.h52
-rw-r--r--kioslaves/imap4/mimehdrline.cc22
-rw-r--r--kioslaves/imap4/mimehdrline.h16
-rw-r--r--kioslaves/imap4/mimeheader.cc148
-rw-r--r--kioslaves/imap4/mimeheader.h184
-rw-r--r--kioslaves/imap4/mimeio.cc18
-rw-r--r--kioslaves/imap4/mimeio.h30
-rw-r--r--kioslaves/imap4/rfcdecoder.cc76
-rw-r--r--kioslaves/imap4/rfcdecoder.h40
-rw-r--r--kioslaves/imap4/selectinfo.h12
-rw-r--r--kioslaves/mbox/mbox.cc16
-rw-r--r--kioslaves/mbox/mbox.h4
-rw-r--r--kioslaves/mbox/readmbox.cc28
-rw-r--r--kioslaves/mbox/readmbox.h18
-rw-r--r--kioslaves/mbox/stat.cc10
-rw-r--r--kioslaves/mbox/stat.h2
-rw-r--r--kioslaves/mbox/urlinfo.cc26
-rw-r--r--kioslaves/mbox/urlinfo.h12
-rw-r--r--kioslaves/opengroupware/opengroupware.cpp46
-rw-r--r--kioslaves/opengroupware/opengroupware.h12
-rw-r--r--kioslaves/opengroupware/webdavhandler.cpp32
-rw-r--r--kioslaves/opengroupware/webdavhandler.h24
-rw-r--r--kioslaves/sieve/sieve.cpp118
-rw-r--r--kioslaves/sieve/sieve.h34
-rw-r--r--kitchensync/libqopensync/callbackhandler.cpp34
-rw-r--r--kitchensync/libqopensync/callbackhandler.h4
-rw-r--r--kitchensync/libqopensync/conversion.cpp6
-rw-r--r--kitchensync/libqopensync/conversion.h4
-rw-r--r--kitchensync/libqopensync/environment.cpp4
-rw-r--r--kitchensync/libqopensync/environment.h6
-rw-r--r--kitchensync/libqopensync/filter.cpp6
-rw-r--r--kitchensync/libqopensync/filter.h6
-rw-r--r--kitchensync/libqopensync/group.cpp58
-rw-r--r--kitchensync/libqopensync/group.h20
-rw-r--r--kitchensync/libqopensync/member.cpp26
-rw-r--r--kitchensync/libqopensync/member.h16
-rw-r--r--kitchensync/libqopensync/plugin.cpp12
-rw-r--r--kitchensync/libqopensync/plugin.h8
-rw-r--r--kitchensync/libqopensync/result.cpp12
-rw-r--r--kitchensync/libqopensync/result.h14
-rw-r--r--kitchensync/libqopensync/syncchange.cpp26
-rw-r--r--kitchensync/libqopensync/syncchange.h14
-rw-r--r--kitchensync/libqopensync/syncmapping.cpp2
-rw-r--r--kitchensync/opensyncdbus/dbusclient.cpp36
-rw-r--r--kitchensync/opensyncdbus/dbusclient.h6
-rw-r--r--kitchensync/src/aboutpage.cpp48
-rw-r--r--kitchensync/src/aboutpage.h6
-rw-r--r--kitchensync/src/addresseediffalgo.cpp14
-rw-r--r--kitchensync/src/addresseediffalgo.h8
-rw-r--r--kitchensync/src/calendardiffalgo.cpp32
-rw-r--r--kitchensync/src/calendardiffalgo.h2
-rw-r--r--kitchensync/src/configgui.cpp32
-rw-r--r--kitchensync/src/configgui.h26
-rw-r--r--kitchensync/src/configguiblank.cpp14
-rw-r--r--kitchensync/src/configguiblank.h6
-rw-r--r--kitchensync/src/configguievo2.cpp38
-rw-r--r--kitchensync/src/configguievo2.h6
-rw-r--r--kitchensync/src/configguifile.cpp32
-rw-r--r--kitchensync/src/configguifile.h8
-rw-r--r--kitchensync/src/configguigcalendar.cpp54
-rw-r--r--kitchensync/src/configguigcalendar.h12
-rw-r--r--kitchensync/src/configguignokii.cpp52
-rw-r--r--kitchensync/src/configguignokii.h18
-rw-r--r--kitchensync/src/configguigpe.cpp48
-rw-r--r--kitchensync/src/configguigpe.h8
-rw-r--r--kitchensync/src/configguiirmc.cpp64
-rw-r--r--kitchensync/src/configguiirmc.h12
-rw-r--r--kitchensync/src/configguijescs.cpp42
-rw-r--r--kitchensync/src/configguijescs.h8
-rw-r--r--kitchensync/src/configguildap.cpp74
-rw-r--r--kitchensync/src/configguildap.h12
-rw-r--r--kitchensync/src/configguimoto.cpp28
-rw-r--r--kitchensync/src/configguimoto.h6
-rw-r--r--kitchensync/src/configguiopie.cpp64
-rw-r--r--kitchensync/src/configguiopie.h18
-rw-r--r--kitchensync/src/configguipalm.cpp88
-rw-r--r--kitchensync/src/configguipalm.h16
-rw-r--r--kitchensync/src/configguisunbird.cpp216
-rw-r--r--kitchensync/src/configguisunbird.h54
-rw-r--r--kitchensync/src/configguisynce.cpp42
-rw-r--r--kitchensync/src/configguisynce.h12
-rw-r--r--kitchensync/src/configguisyncmlhttp.cpp86
-rw-r--r--kitchensync/src/configguisyncmlhttp.h22
-rw-r--r--kitchensync/src/configguisyncmlobex.cpp94
-rw-r--r--kitchensync/src/configguisyncmlobex.h36
-rw-r--r--kitchensync/src/conflictdialog.cpp4
-rw-r--r--kitchensync/src/conflictdialog.h4
-rw-r--r--kitchensync/src/connectionwidgets.cpp90
-rw-r--r--kitchensync/src/connectionwidgets.h30
-rw-r--r--kitchensync/src/genericdiffalgo.cpp10
-rw-r--r--kitchensync/src/genericdiffalgo.h6
-rw-r--r--kitchensync/src/groupconfig.cpp48
-rw-r--r--kitchensync/src/groupconfig.h12
-rw-r--r--kitchensync/src/groupconfigcommon.cpp46
-rw-r--r--kitchensync/src/groupconfigcommon.h10
-rw-r--r--kitchensync/src/groupconfigdialog.cpp8
-rw-r--r--kitchensync/src/groupconfigdialog.h2
-rw-r--r--kitchensync/src/groupitem.cpp100
-rw-r--r--kitchensync/src/groupitem.h26
-rw-r--r--kitchensync/src/groupview.cpp22
-rw-r--r--kitchensync/src/groupview.h4
-rw-r--r--kitchensync/src/htmldiffalgodisplay.cpp34
-rw-r--r--kitchensync/src/htmldiffalgodisplay.h20
-rw-r--r--kitchensync/src/kwidgetlist.cpp50
-rw-r--r--kitchensync/src/kwidgetlist.h22
-rw-r--r--kitchensync/src/mainwidget.cpp42
-rw-r--r--kitchensync/src/mainwidget.h4
-rw-r--r--kitchensync/src/mainwindow.cpp2
-rw-r--r--kitchensync/src/memberconfig.cpp20
-rw-r--r--kitchensync/src/memberconfig.h4
-rw-r--r--kitchensync/src/memberinfo.cpp16
-rw-r--r--kitchensync/src/memberinfo.h14
-rw-r--r--kitchensync/src/multiconflictdialog.cpp32
-rw-r--r--kitchensync/src/multiconflictdialog.h2
-rw-r--r--kitchensync/src/part.cpp12
-rw-r--r--kitchensync/src/part.h4
-rw-r--r--kitchensync/src/pluginpicker.cpp38
-rw-r--r--kitchensync/src/pluginpicker.h8
-rw-r--r--kitchensync/src/singleconflictdialog.cpp30
-rw-r--r--kitchensync/src/singleconflictdialog.h2
-rw-r--r--kitchensync/src/syncprocess.cpp10
-rw-r--r--kitchensync/src/syncprocess.h6
-rw-r--r--kitchensync/src/syncprocessmanager.cpp10
-rw-r--r--kitchensync/src/syncprocessmanager.h8
-rw-r--r--kmail/accountcombobox.cpp30
-rw-r--r--kmail/accountcombobox.h6
-rw-r--r--kmail/accountdialog.cpp784
-rw-r--r--kmail/accountdialog.h254
-rw-r--r--kmail/accountmanager.cpp60
-rw-r--r--kmail/accountmanager.h16
-rw-r--r--kmail/accountwizard.cpp188
-rw-r--r--kmail/accountwizard.h60
-rw-r--r--kmail/acljobs.cpp64
-rw-r--r--kmail/acljobs.h34
-rw-r--r--kmail/actionscheduler.cpp166
-rw-r--r--kmail/actionscheduler.h38
-rw-r--r--kmail/annotationjobs.cpp64
-rw-r--r--kmail/annotationjobs.h54
-rw-r--r--kmail/antispamconfig.cpp20
-rw-r--r--kmail/antispamconfig.h28
-rw-r--r--kmail/antispamwizard.cpp294
-rw-r--r--kmail/antispamwizard.h136
-rw-r--r--kmail/attachmentlistview.cpp30
-rw-r--r--kmail/attachmentlistview.h10
-rw-r--r--kmail/attachmentstrategy.cpp6
-rw-r--r--kmail/attachmentstrategy.h2
-rw-r--r--kmail/bodypartformatterfactory.cpp14
-rw-r--r--kmail/bodypartformatterfactory.h4
-rw-r--r--kmail/bodypartformatterfactory_p.h2
-rw-r--r--kmail/bodyvisitor.cpp10
-rw-r--r--kmail/bodyvisitor.h12
-rw-r--r--kmail/cachedimapjob.cpp150
-rw-r--r--kmail/cachedimapjob.h36
-rw-r--r--kmail/callback.cpp38
-rw-r--r--kmail/callback.h12
-rw-r--r--kmail/chiasmuskeyselector.cpp26
-rw-r--r--kmail/chiasmuskeyselector.h12
-rw-r--r--kmail/colorlistbox.cpp42
-rw-r--r--kmail/colorlistbox.h28
-rw-r--r--kmail/compactionjob.cpp38
-rw-r--r--kmail/compactionjob.h12
-rw-r--r--kmail/composer.h30
-rw-r--r--kmail/configuredialog.cpp2020
-rw-r--r--kmail/configuredialog.h10
-rw-r--r--kmail/configuredialog_p.cpp164
-rw-r--r--kmail/configuredialog_p.h454
-rw-r--r--kmail/copyfolderjob.cpp26
-rw-r--r--kmail/copyfolderjob.h10
-rw-r--r--kmail/csshelper.cpp12
-rw-r--r--kmail/csshelper.h2
-rw-r--r--kmail/customtemplates.cpp106
-rw-r--r--kmail/customtemplates.h22
-rw-r--r--kmail/dcoptest.cpp2
-rw-r--r--kmail/dictionarycombobox.cpp26
-rw-r--r--kmail/dictionarycombobox.h18
-rw-r--r--kmail/distributionlistdialog.cpp48
-rw-r--r--kmail/distributionlistdialog.h4
-rw-r--r--kmail/editorwatcher.cpp18
-rw-r--r--kmail/editorwatcher.h14
-rw-r--r--kmail/encodingdetector.cpp78
-rw-r--r--kmail/encodingdetector.h26
-rw-r--r--kmail/encodingdetector_ja.cpp2
-rw-r--r--kmail/encodingdetector_ja_p.h2
-rw-r--r--kmail/expirejob.cpp14
-rw-r--r--kmail/expirejob.h4
-rw-r--r--kmail/expirypropertiesdialog.cpp84
-rw-r--r--kmail/expirypropertiesdialog.h36
-rw-r--r--kmail/favoritefolderview.cpp160
-rw-r--r--kmail/favoritefolderview.h24
-rw-r--r--kmail/filehtmlwriter.cpp14
-rw-r--r--kmail/filehtmlwriter.h18
-rw-r--r--kmail/filterimporterexporter.cpp60
-rw-r--r--kmail/filterimporterexporter.h14
-rw-r--r--kmail/filterlog.cpp28
-rw-r--r--kmail/filterlog.h18
-rw-r--r--kmail/filterlogdlg.cpp114
-rw-r--r--kmail/filterlogdlg.h20
-rw-r--r--kmail/folderIface.cpp6
-rw-r--r--kmail/folderIface.h20
-rw-r--r--kmail/folderdiaacltab.cpp186
-rw-r--r--kmail/folderdiaacltab.h34
-rw-r--r--kmail/folderdiaquotatab.cpp40
-rw-r--r--kmail/folderdiaquotatab.h10
-rw-r--r--kmail/folderdiaquotatab_p.cpp34
-rw-r--r--kmail/folderdiaquotatab_p.h18
-rw-r--r--kmail/folderjob.cpp6
-rw-r--r--kmail/folderjob.h24
-rw-r--r--kmail/folderpropertiesdialog.ui.h2
-rw-r--r--kmail/folderrequester.cpp24
-rw-r--r--kmail/folderrequester.h14
-rw-r--r--kmail/foldershortcutdialog.cpp28
-rw-r--r--kmail/foldershortcutdialog.h2
-rw-r--r--kmail/folderstorage.cpp120
-rw-r--r--kmail/folderstorage.h52
-rw-r--r--kmail/foldertreebase.cpp34
-rw-r--r--kmail/foldertreebase.h14
-rw-r--r--kmail/folderviewtooltip.h22
-rw-r--r--kmail/globalsettings.cpp6
-rw-r--r--kmail/globalsettings.h4
-rw-r--r--kmail/headeritem.cpp128
-rw-r--r--kmail/headeritem.h52
-rw-r--r--kmail/headerlistquicksearch.cpp46
-rw-r--r--kmail/headerlistquicksearch.h20
-rw-r--r--kmail/headerstrategy.cpp44
-rw-r--r--kmail/headerstrategy.h8
-rw-r--r--kmail/headerstyle.cpp252
-rw-r--r--kmail/headerstyle.h6
-rw-r--r--kmail/htmlstatusbar.cpp18
-rw-r--r--kmail/htmlstatusbar.h12
-rw-r--r--kmail/identitydialog.cpp192
-rw-r--r--kmail/identitydialog.h30
-rw-r--r--kmail/identitydrag.cpp16
-rw-r--r--kmail/identitydrag.h14
-rw-r--r--kmail/identitylistview.cpp10
-rw-r--r--kmail/identitylistview.h12
-rw-r--r--kmail/imapaccountbase.cpp304
-rw-r--r--kmail/imapaccountbase.h122
-rw-r--r--kmail/imapjob.cpp106
-rw-r--r--kmail/imapjob.h18
-rw-r--r--kmail/index.cpp88
-rw-r--r--kmail/index.h28
-rw-r--r--kmail/interfaces/bodypart.h22
-rw-r--r--kmail/interfaces/bodyparturlhandler.h10
-rw-r--r--kmail/interfaces/htmlwriter.h8
-rw-r--r--kmail/interfaces/rulewidgethandler.h44
-rw-r--r--kmail/interfaces/urlhandler.h4
-rw-r--r--kmail/isubject.cpp6
-rw-r--r--kmail/isubject.h4
-rw-r--r--kmail/jobscheduler.cpp10
-rw-r--r--kmail/jobscheduler.h18
-rw-r--r--kmail/kcm_kmail.cpp12
-rw-r--r--kmail/kcursorsaver.h16
-rw-r--r--kmail/keyresolver.cpp112
-rw-r--r--kmail/keyresolver.h42
-rw-r--r--kmail/khtmlparthtmlwriter.cpp20
-rw-r--r--kmail/khtmlparthtmlwriter.h24
-rw-r--r--kmail/klistboxdialog.cpp36
-rw-r--r--kmail/klistboxdialog.h22
-rw-r--r--kmail/klistviewindexedsearchline.cpp6
-rw-r--r--kmail/klistviewindexedsearchline.h8
-rw-r--r--kmail/kmaccount.cpp60
-rw-r--r--kmail/kmaccount.h64
-rw-r--r--kmail/kmacctcachedimap.cpp108
-rw-r--r--kmail/kmacctcachedimap.h42
-rw-r--r--kmail/kmacctfolder.h2
-rw-r--r--kmail/kmacctimap.cpp126
-rw-r--r--kmail/kmacctimap.h18
-rw-r--r--kmail/kmacctlocal.cpp34
-rw-r--r--kmail/kmacctlocal.h18
-rw-r--r--kmail/kmacctmaildir.cpp22
-rw-r--r--kmail/kmacctmaildir.h10
-rw-r--r--kmail/kmacctseldlg.cpp28
-rw-r--r--kmail/kmacctseldlg.h2
-rw-r--r--kmail/kmaddrbook.cpp36
-rw-r--r--kmail/kmaddrbook.h10
-rw-r--r--kmail/kmailIface.h128
-rw-r--r--kmail/kmail_part.cpp40
-rw-r--r--kmail/kmail_part.h14
-rw-r--r--kmail/kmailicalIface.h92
-rw-r--r--kmail/kmailicalifaceimpl.cpp438
-rw-r--r--kmail/kmailicalifaceimpl.h140
-rw-r--r--kmail/kmatmlistview.cpp40
-rw-r--r--kmail/kmatmlistview.h30
-rw-r--r--kmail/kmcommands.cpp596
-rw-r--r--kmail/kmcommands.h246
-rw-r--r--kmail/kmcomposewin.cpp1226
-rw-r--r--kmail/kmcomposewin.h200
-rw-r--r--kmail/kmdebug.h8
-rw-r--r--kmail/kmdict.cpp2
-rw-r--r--kmail/kmedit.cpp162
-rw-r--r--kmail/kmedit.h42
-rw-r--r--kmail/kmfawidgets.cpp58
-rw-r--r--kmail/kmfawidgets.h22
-rw-r--r--kmail/kmfilter.cpp42
-rw-r--r--kmail/kmfilter.h20
-rw-r--r--kmail/kmfilteraction.cpp448
-rw-r--r--kmail/kmfilteraction.h194
-rw-r--r--kmail/kmfilterdlg.cpp420
-rw-r--r--kmail/kmfilterdlg.h84
-rw-r--r--kmail/kmfiltermgr.cpp58
-rw-r--r--kmail/kmfiltermgr.h22
-rw-r--r--kmail/kmfolder.cpp168
-rw-r--r--kmail/kmfolder.h82
-rw-r--r--kmail/kmfoldercachedimap.cpp500
-rw-r--r--kmail/kmfoldercachedimap.h120
-rw-r--r--kmail/kmfoldercombobox.cpp62
-rw-r--r--kmail/kmfoldercombobox.h18
-rw-r--r--kmail/kmfolderdia.cpp204
-rw-r--r--kmail/kmfolderdia.h52
-rw-r--r--kmail/kmfolderdir.cpp56
-rw-r--r--kmail/kmfolderdir.h28
-rw-r--r--kmail/kmfolderimap.cpp468
-rw-r--r--kmail/kmfolderimap.h106
-rw-r--r--kmail/kmfolderindex.cpp38
-rw-r--r--kmail/kmfolderindex.h2
-rw-r--r--kmail/kmfoldermaildir.cpp212
-rw-r--r--kmail/kmfoldermaildir.h32
-rw-r--r--kmail/kmfoldermbox.cpp132
-rw-r--r--kmail/kmfoldermbox.h10
-rw-r--r--kmail/kmfoldermgr.cpp86
-rw-r--r--kmail/kmfoldermgr.h52
-rw-r--r--kmail/kmfoldernode.cpp8
-rw-r--r--kmail/kmfoldernode.h22
-rw-r--r--kmail/kmfoldersearch.cpp238
-rw-r--r--kmail/kmfoldersearch.h50
-rw-r--r--kmail/kmfolderseldlg.cpp118
-rw-r--r--kmail/kmfolderseldlg.h22
-rw-r--r--kmail/kmfoldertree.cpp412
-rw-r--r--kmail/kmfoldertree.h88
-rw-r--r--kmail/kmgroupware.cpp4
-rw-r--r--kmail/kmgroupware.h4
-rw-r--r--kmail/kmheaders.cpp720
-rw-r--r--kmail/kmheaders.h104
-rw-r--r--kmail/kmkernel.cpp400
-rw-r--r--kmail/kmkernel.h172
-rw-r--r--kmail/kmlineeditspell.cpp60
-rw-r--r--kmail/kmlineeditspell.h18
-rw-r--r--kmail/kmmainwidget.cpp820
-rw-r--r--kmail/kmmainwidget.h80
-rw-r--r--kmail/kmmainwin.cpp34
-rw-r--r--kmail/kmmainwin.h6
-rw-r--r--kmail/kmmessage.cpp710
-rw-r--r--kmail/kmmessage.h276
-rw-r--r--kmail/kmmimeparttree.cpp106
-rw-r--r--kmail/kmmimeparttree.h26
-rw-r--r--kmail/kmmsgbase.cpp198
-rw-r--r--kmail/kmmsgbase.h98
-rw-r--r--kmail/kmmsgdict.cpp32
-rw-r--r--kmail/kmmsgdict.h8
-rw-r--r--kmail/kmmsginfo.cpp70
-rw-r--r--kmail/kmmsginfo.h62
-rw-r--r--kmail/kmmsglist.cpp6
-rw-r--r--kmail/kmmsglist.h4
-rw-r--r--kmail/kmmsgpart.cpp132
-rw-r--r--kmail/kmmsgpart.h130
-rw-r--r--kmail/kmmsgpartdlg.cpp148
-rw-r--r--kmail/kmmsgpartdlg.h42
-rw-r--r--kmail/kmpopfiltercnfrmdlg.cpp82
-rw-r--r--kmail/kmpopfiltercnfrmdlg.h26
-rw-r--r--kmail/kmpopheaders.cpp6
-rw-r--r--kmail/kmpopheaders.h12
-rw-r--r--kmail/kmreadermainwin.cpp100
-rw-r--r--kmail/kmreadermainwin.h14
-rw-r--r--kmail/kmreaderwin.cpp472
-rw-r--r--kmail/kmreaderwin.h102
-rw-r--r--kmail/kmsearchpattern.cpp142
-rw-r--r--kmail/kmsearchpattern.h70
-rw-r--r--kmail/kmsearchpatternedit.cpp112
-rw-r--r--kmail/kmsearchpatternedit.h52
-rw-r--r--kmail/kmsender.cpp126
-rw-r--r--kmail/kmsender.h28
-rw-r--r--kmail/kmsender_p.h30
-rw-r--r--kmail/kmservertest.cpp30
-rw-r--r--kmail/kmservertest.h38
-rw-r--r--kmail/kmstartup.cpp36
-rw-r--r--kmail/kmsystemtray.cpp104
-rw-r--r--kmail/kmsystemtray.h30
-rw-r--r--kmail/kmtransport.cpp256
-rw-r--r--kmail/kmtransport.h94
-rw-r--r--kmail/korghelper.cpp12
-rw-r--r--kmail/kwindowpositioner.cpp18
-rw-r--r--kmail/kwindowpositioner.h10
-rw-r--r--kmail/listjob.cpp36
-rw-r--r--kmail/listjob.h18
-rw-r--r--kmail/localsubscriptiondialog.cpp18
-rw-r--r--kmail/localsubscriptiondialog.h4
-rw-r--r--kmail/mailcomposerIface.h20
-rw-r--r--kmail/maildirjob.cpp8
-rw-r--r--kmail/maildirjob.h2
-rw-r--r--kmail/mailinglist-magic.cpp128
-rw-r--r--kmail/mailinglist-magic.h12
-rw-r--r--kmail/mailinglistpropertiesdialog.cpp88
-rw-r--r--kmail/mailinglistpropertiesdialog.h12
-rw-r--r--kmail/mailserviceimpl.cpp42
-rw-r--r--kmail/mailserviceimpl.h30
-rw-r--r--kmail/mailsourceviewer.cpp20
-rw-r--r--kmail/mailsourceviewer.h12
-rw-r--r--kmail/managesievescriptsdialog.cpp134
-rw-r--r--kmail/managesievescriptsdialog.h28
-rw-r--r--kmail/managesievescriptsdialog_p.h12
-rw-r--r--kmail/mboxjob.cpp8
-rw-r--r--kmail/mboxjob.h2
-rw-r--r--kmail/messageactions.cpp40
-rw-r--r--kmail/messageactions.h18
-rw-r--r--kmail/messagecomposer.cpp250
-rw-r--r--kmail/messagecomposer.h76
-rw-r--r--kmail/messagecopyhelper.cpp26
-rw-r--r--kmail/messagecopyhelper.h18
-rw-r--r--kmail/messageproperty.cpp14
-rw-r--r--kmail/messageproperty.h14
-rw-r--r--kmail/messagesender.h6
-rw-r--r--kmail/networkaccount.cpp36
-rw-r--r--kmail/networkaccount.h28
-rw-r--r--kmail/newfolderdialog.cpp80
-rw-r--r--kmail/newfolderdialog.h34
-rw-r--r--kmail/objecttreeparser.cpp374
-rw-r--r--kmail/objecttreeparser.h64
-rw-r--r--kmail/partNode.cpp36
-rw-r--r--kmail/partNode.h22
-rw-r--r--kmail/partmetadata.h24
-rw-r--r--kmail/partnodebodypart.cpp24
-rw-r--r--kmail/partnodebodypart.h16
-rw-r--r--kmail/popaccount.cpp146
-rw-r--r--kmail/popaccount.h68
-rw-r--r--kmail/quotajobs.cpp42
-rw-r--r--kmail/quotajobs.h46
-rw-r--r--kmail/recipientseditor.cpp258
-rw-r--r--kmail/recipientseditor.h88
-rw-r--r--kmail/recipientseditortest.cpp34
-rw-r--r--kmail/recipientseditortest.h4
-rw-r--r--kmail/recipientspicker.cpp208
-rw-r--r--kmail/recipientspicker.h86
-rw-r--r--kmail/redirectdialog.cpp34
-rw-r--r--kmail/redirectdialog.h10
-rw-r--r--kmail/regexplineedit.cpp42
-rw-r--r--kmail/regexplineedit.h20
-rw-r--r--kmail/renamejob.cpp22
-rw-r--r--kmail/renamejob.h14
-rw-r--r--kmail/rulewidgethandlermanager.cpp680
-rw-r--r--kmail/rulewidgethandlermanager.h50
-rw-r--r--kmail/scalix.cpp20
-rw-r--r--kmail/scalix.h18
-rw-r--r--kmail/searchjob.cpp104
-rw-r--r--kmail/searchjob.h14
-rw-r--r--kmail/searchwindow.cpp236
-rw-r--r--kmail/searchwindow.h54
-rw-r--r--kmail/secondarywindow.cpp2
-rw-r--r--kmail/secondarywindow.h2
-rw-r--r--kmail/sieveconfig.cpp32
-rw-r--r--kmail/sieveconfig.h24
-rw-r--r--kmail/sievedebugdialog.cpp54
-rw-r--r--kmail/sievedebugdialog.h14
-rw-r--r--kmail/sievejob.cpp74
-rw-r--r--kmail/sievejob.h52
-rw-r--r--kmail/signatureconfigurator.cpp134
-rw-r--r--kmail/signatureconfigurator.h28
-rw-r--r--kmail/simplestringlisteditor.cpp100
-rw-r--r--kmail/simplestringlisteditor.h44
-rw-r--r--kmail/snippetconfig.h26
-rw-r--r--kmail/snippetdlg.cpp14
-rw-r--r--kmail/snippetdlg.h6
-rw-r--r--kmail/snippetitem.cpp28
-rw-r--r--kmail/snippetitem.h32
-rw-r--r--kmail/snippetsettings.cpp10
-rw-r--r--kmail/snippetsettings.h4
-rw-r--r--kmail/snippetwidget.cpp298
-rw-r--r--kmail/snippetwidget.h40
-rw-r--r--kmail/spamheaderanalyzer.cpp10
-rw-r--r--kmail/spamheaderanalyzer.h16
-rw-r--r--kmail/subscriptiondialog.cpp70
-rw-r--r--kmail/subscriptiondialog.h34
-rw-r--r--kmail/teehtmlwriter.cpp26
-rw-r--r--kmail/teehtmlwriter.h12
-rw-r--r--kmail/templateparser.cpp306
-rw-r--r--kmail/templateparser.h30
-rw-r--r--kmail/templatesconfiguration.cpp104
-rw-r--r--kmail/templatesconfiguration.h22
-rw-r--r--kmail/templatesinsertcommand.cpp146
-rw-r--r--kmail/templatesinsertcommand.h6
-rw-r--r--kmail/tests/messagedicttests.cpp2
-rw-r--r--kmail/tests/mimelibtests.cpp18
-rw-r--r--kmail/tests/mimelibtests.h6
-rw-r--r--kmail/tests/utiltests.cpp82
-rw-r--r--kmail/tests/utiltests.h2
-rw-r--r--kmail/textsource.cpp4
-rw-r--r--kmail/textsource.h2
-rw-r--r--kmail/transportmanager.cpp6
-rw-r--r--kmail/transportmanager.h2
-rw-r--r--kmail/undostack.cpp6
-rw-r--r--kmail/undostack.h10
-rw-r--r--kmail/urlhandlermanager.cpp124
-rw-r--r--kmail/urlhandlermanager.h8
-rw-r--r--kmail/util.cpp50
-rw-r--r--kmail/util.h66
-rw-r--r--kmail/vacation.cpp142
-rw-r--r--kmail/vacation.h26
-rw-r--r--kmail/vacationdialog.cpp60
-rw-r--r--kmail/vacationdialog.h26
-rw-r--r--kmail/vcardviewer.cpp6
-rw-r--r--kmail/vcardviewer.h6
-rw-r--r--kmail/xfaceconfigurator.cpp144
-rw-r--r--kmail/xfaceconfigurator.h20
-rw-r--r--kmailcvt/filter_evolution.cxx50
-rw-r--r--kmailcvt/filter_evolution.hxx6
-rw-r--r--kmailcvt/filter_evolution_v2.cxx62
-rw-r--r--kmailcvt/filter_evolution_v2.hxx6
-rw-r--r--kmailcvt/filter_kmail_maildir.cxx54
-rw-r--r--kmailcvt/filter_kmail_maildir.hxx8
-rw-r--r--kmailcvt/filter_lnotes.cxx14
-rw-r--r--kmailcvt/filter_lnotes.hxx4
-rw-r--r--kmailcvt/filter_mailapp.cxx28
-rw-r--r--kmailcvt/filter_mailapp.hxx4
-rw-r--r--kmailcvt/filter_mbox.cxx22
-rw-r--r--kmailcvt/filter_oe.cxx66
-rw-r--r--kmailcvt/filter_oe.hxx24
-rw-r--r--kmailcvt/filter_opera.cxx32
-rw-r--r--kmailcvt/filter_outlook.cxx10
-rw-r--r--kmailcvt/filter_plain.cxx8
-rw-r--r--kmailcvt/filter_pmail.cxx74
-rw-r--r--kmailcvt/filter_pmail.hxx22
-rw-r--r--kmailcvt/filter_sylpheed.cxx54
-rw-r--r--kmailcvt/filter_sylpheed.hxx12
-rw-r--r--kmailcvt/filter_thebat.cxx58
-rw-r--r--kmailcvt/filter_thebat.hxx6
-rw-r--r--kmailcvt/filter_thunderbird.cxx66
-rw-r--r--kmailcvt/filter_thunderbird.hxx6
-rw-r--r--kmailcvt/filters.cxx40
-rw-r--r--kmailcvt/filters.hxx68
-rw-r--r--kmailcvt/kimportpage.cpp4
-rw-r--r--kmailcvt/kimportpage.h2
-rw-r--r--kmailcvt/kmailcvt.cpp4
-rw-r--r--kmailcvt/kmailcvt.h2
-rw-r--r--kmailcvt/kselfilterpage.cpp12
-rw-r--r--kmailcvt/kselfilterpage.h4
-rw-r--r--kmobile/devices/gnokii/gnokii_mobile.cpp118
-rw-r--r--kmobile/devices/gnokii/gnokii_mobile.h26
-rw-r--r--kmobile/devices/gnokii/gnokiiconfig.cpp30
-rw-r--r--kmobile/devices/gnokii/gnokiiconfig.h10
-rw-r--r--kmobile/devices/skeleton/skeleton.cpp30
-rw-r--r--kmobile/devices/skeleton/skeleton.h18
-rw-r--r--kmobile/kioslave/kio_mobile.cpp154
-rw-r--r--kmobile/kioslave/kio_mobile.h36
-rw-r--r--kmobile/kmobile.cpp94
-rw-r--r--kmobile/kmobile.h2
-rw-r--r--kmobile/kmobileclient.cpp124
-rw-r--r--kmobile/kmobileclient.h48
-rw-r--r--kmobile/kmobiledevice.cpp124
-rw-r--r--kmobile/kmobiledevice.h122
-rw-r--r--kmobile/kmobileiface.h44
-rw-r--r--kmobile/kmobileitem.cpp32
-rw-r--r--kmobile/kmobileitem.h22
-rw-r--r--kmobile/kmobileview.cpp122
-rw-r--r--kmobile/kmobileview.h56
-rw-r--r--kmobile/pref.cpp22
-rw-r--r--kmobile/pref.h6
-rw-r--r--kmobile/systemtray.cpp28
-rw-r--r--kmobile/systemtray.h6
-rw-r--r--kmobile/testlibkmobile.cpp24
-rw-r--r--knode/articlewidget.cpp304
-rw-r--r--knode/articlewidget.h58
-rw-r--r--knode/csshelper.cpp2
-rw-r--r--knode/csshelper.h2
-rw-r--r--knode/headerview.cpp102
-rw-r--r--knode/headerview.h36
-rw-r--r--knode/knaccountmanager.cpp44
-rw-r--r--knode/knaccountmanager.h12
-rw-r--r--knode/knapplication.cpp2
-rw-r--r--knode/knarticle.cpp18
-rw-r--r--knode/knarticle.h50
-rw-r--r--knode/knarticlecollection.cpp10
-rw-r--r--knode/knarticlecollection.h6
-rw-r--r--knode/knarticlefactory.cpp164
-rw-r--r--knode/knarticlefactory.h24
-rw-r--r--knode/knarticlefilter.cpp24
-rw-r--r--knode/knarticlefilter.h10
-rw-r--r--knode/knarticlemanager.cpp74
-rw-r--r--knode/knarticlemanager.h14
-rw-r--r--knode/knarticlewindow.cpp20
-rw-r--r--knode/knarticlewindow.h4
-rw-r--r--knode/kncleanup.cpp38
-rw-r--r--knode/kncleanup.h14
-rw-r--r--knode/kncollection.h12
-rw-r--r--knode/kncollectionview.cpp84
-rw-r--r--knode/kncollectionview.h22
-rw-r--r--knode/kncollectionviewitem.cpp30
-rw-r--r--knode/kncollectionviewitem.h10
-rw-r--r--knode/kncomposer.cpp690
-rw-r--r--knode/kncomposer.h126
-rw-r--r--knode/knconfig.cpp156
-rw-r--r--knode/knconfig.h166
-rw-r--r--knode/knconfigmanager.cpp12
-rw-r--r--knode/knconfigmanager.h6
-rw-r--r--knode/knconfigpages.cpp32
-rw-r--r--knode/knconfigpages.h12
-rw-r--r--knode/knconfigwidgets.cpp808
-rw-r--r--knode/knconfigwidgets.h156
-rw-r--r--knode/knconvert.cpp88
-rw-r--r--knode/knconvert.h38
-rw-r--r--knode/kndisplayedheader.cpp12
-rw-r--r--knode/kndisplayedheader.h26
-rw-r--r--knode/knfilterconfigwidget.cpp24
-rw-r--r--knode/knfilterconfigwidget.h6
-rw-r--r--knode/knfilterdialog.cpp28
-rw-r--r--knode/knfilterdialog.h8
-rw-r--r--knode/knfiltermanager.cpp52
-rw-r--r--knode/knfiltermanager.h16
-rw-r--r--knode/knfolder.cpp34
-rw-r--r--knode/knfolder.h14
-rw-r--r--knode/knfoldermanager.cpp48
-rw-r--r--knode/knfoldermanager.h8
-rw-r--r--knode/knglobals.cpp2
-rw-r--r--knode/knglobals.h4
-rw-r--r--knode/kngroup.cpp66
-rw-r--r--knode/kngroup.h34
-rw-r--r--knode/kngroupbrowser.cpp140
-rw-r--r--knode/kngroupbrowser.h54
-rw-r--r--knode/kngroupdialog.cpp76
-rw-r--r--knode/kngroupdialog.h14
-rw-r--r--knode/kngroupmanager.cpp100
-rw-r--r--knode/kngroupmanager.h38
-rw-r--r--knode/kngrouppropdlg.cpp74
-rw-r--r--knode/kngrouppropdlg.h6
-rw-r--r--knode/kngroupselectdialog.cpp50
-rw-r--r--knode/kngroupselectdialog.h8
-rw-r--r--knode/knhdrviewitem.cpp62
-rw-r--r--knode/knhdrviewitem.h14
-rw-r--r--knode/knjobdata.cpp18
-rw-r--r--knode/knjobdata.h18
-rw-r--r--knode/knmainwidget.cpp380
-rw-r--r--knode/knmainwidget.h52
-rw-r--r--knode/knmemorymanager.cpp16
-rw-r--r--knode/knmemorymanager.h8
-rw-r--r--knode/knnetaccess.cpp46
-rw-r--r--knode/knnetaccess.h24
-rw-r--r--knode/knnntpaccount.cpp22
-rw-r--r--knode/knnntpaccount.h24
-rw-r--r--knode/knnntpclient.cpp72
-rw-r--r--knode/knnntpclient.h12
-rw-r--r--knode/knode.cpp22
-rw-r--r--knode/knode.h6
-rw-r--r--knode/knode_part.cpp16
-rw-r--r--knode/knode_part.h10
-rw-r--r--knode/knodecomposeriface.h2
-rw-r--r--knode/knodeiface.h2
-rw-r--r--knode/knprotocolclient.cpp22
-rw-r--r--knode/knprotocolclient.h22
-rw-r--r--knode/knrangefilter.cpp28
-rw-r--r--knode/knrangefilter.h12
-rw-r--r--knode/knscoring.cpp26
-rw-r--r--knode/knscoring.h14
-rw-r--r--knode/knsearchdialog.cpp30
-rw-r--r--knode/knsearchdialog.h12
-rw-r--r--knode/knserverinfo.cpp14
-rw-r--r--knode/knserverinfo.h16
-rw-r--r--knode/knsourceviewwindow.cpp20
-rw-r--r--knode/knsourceviewwindow.h4
-rw-r--r--knode/knstatusfilter.cpp22
-rw-r--r--knode/knstatusfilter.h18
-rw-r--r--knode/knstringfilter.cpp24
-rw-r--r--knode/knstringfilter.h14
-rw-r--r--knode/knwidgets.cpp36
-rw-r--r--knode/knwidgets.h26
-rw-r--r--knode/utilities.cpp120
-rw-r--r--knode/utilities.h78
-rw-r--r--knotes/KNotesAppIface.h52
-rw-r--r--knotes/KNotesIface.h26
-rw-r--r--knotes/knote.cpp348
-rw-r--r--knotes/knote.h62
-rw-r--r--knotes/knotealarmdlg.cpp32
-rw-r--r--knotes/knotealarmdlg.h4
-rw-r--r--knotes/knotebutton.cpp54
-rw-r--r--knotes/knotebutton.h14
-rw-r--r--knotes/knoteconfigdlg.cpp92
-rw-r--r--knotes/knoteconfigdlg.h16
-rw-r--r--knotes/knoteedit.cpp132
-rw-r--r--knotes/knoteedit.h20
-rw-r--r--knotes/knotehostdlg.cpp22
-rw-r--r--knotes/knotehostdlg.h6
-rw-r--r--knotes/knoteprinter.cpp62
-rw-r--r--knotes/knoteprinter.h48
-rw-r--r--knotes/knotesalarm.cpp18
-rw-r--r--knotes/knotesalarm.h8
-rw-r--r--knotes/knotesapp.cpp202
-rw-r--r--knotes/knotesapp.h72
-rw-r--r--knotes/knoteslegacy.cpp64
-rw-r--r--knotes/knoteslegacy.h8
-rw-r--r--knotes/knotesnetrecv.cpp32
-rw-r--r--knotes/knotesnetrecv.h10
-rw-r--r--knotes/knotesnetsend.cpp20
-rw-r--r--knotes/knotesnetsend.h14
-rw-r--r--knotes/main.cpp6
-rw-r--r--knotes/resourcelocal.cpp8
-rw-r--r--knotes/resourcelocal.h2
-rw-r--r--knotes/resourcelocal_plugin.cpp4
-rw-r--r--knotes/resourcelocalconfig.cpp10
-rw-r--r--knotes/resourcelocalconfig.h2
-rw-r--r--knotes/resourcemanager.cpp6
-rw-r--r--knotes/resourcemanager.h6
-rw-r--r--knotes/resourcenotes.h2
-rw-r--r--kode/automakefile.cpp20
-rw-r--r--kode/automakefile.h60
-rw-r--r--kode/class.cpp24
-rw-r--r--kode/class.h54
-rw-r--r--kode/code.cpp36
-rw-r--r--kode/code.h24
-rw-r--r--kode/enum.cpp12
-rw-r--r--kode/enum.h12
-rw-r--r--kode/file.cpp30
-rw-r--r--kode/file.h44
-rw-r--r--kode/function.cpp26
-rw-r--r--kode/function.h52
-rw-r--r--kode/kodemain.cpp118
-rw-r--r--kode/kwsdl/binding.cpp6
-rw-r--r--kode/kwsdl/binding.h66
-rw-r--r--kode/kwsdl/compiler.cpp22
-rw-r--r--kode/kwsdl/compiler.h20
-rw-r--r--kode/kwsdl/converter.cpp270
-rw-r--r--kode/kwsdl/creator.cpp2
-rw-r--r--kode/kwsdl/creator.h12
-rw-r--r--kode/kwsdl/kung/binaryinputfield.cpp66
-rw-r--r--kode/kwsdl/kung/binaryinputfield.h36
-rw-r--r--kode/kwsdl/kung/boolinputfield.cpp24
-rw-r--r--kode/kwsdl/kung/boolinputfield.h16
-rw-r--r--kode/kwsdl/kung/complexbaseinputfield.cpp38
-rw-r--r--kode/kwsdl/kung/complexbaseinputfield.h12
-rw-r--r--kode/kwsdl/kung/conversationmanager.h4
-rw-r--r--kode/kwsdl/kung/dateinputfield.cpp26
-rw-r--r--kode/kwsdl/kung/dateinputfield.h20
-rw-r--r--kode/kwsdl/kung/dispatcher.cpp44
-rw-r--r--kode/kwsdl/kung/dispatcher.h10
-rw-r--r--kode/kwsdl/kung/doubleinputfield.cpp22
-rw-r--r--kode/kwsdl/kung/doubleinputfield.h16
-rw-r--r--kode/kwsdl/kung/enuminputfield.cpp20
-rw-r--r--kode/kwsdl/kung/enuminputfield.h18
-rw-r--r--kode/kwsdl/kung/generalconversationmanager.cpp4
-rw-r--r--kode/kwsdl/kung/generalconversationmanager.h2
-rw-r--r--kode/kwsdl/kung/inputdialog.cpp2
-rw-r--r--kode/kwsdl/kung/inputdialog.h2
-rw-r--r--kode/kwsdl/kung/inputfield.cpp12
-rw-r--r--kode/kwsdl/kung/inputfield.h32
-rw-r--r--kode/kwsdl/kung/inputfieldfactory.cpp4
-rw-r--r--kode/kwsdl/kung/inputfieldfactory.h4
-rw-r--r--kode/kwsdl/kung/integerinputfield.cpp22
-rw-r--r--kode/kwsdl/kung/integerinputfield.h16
-rw-r--r--kode/kwsdl/kung/listinputfield.cpp44
-rw-r--r--kode/kwsdl/kung/listinputfield.h30
-rw-r--r--kode/kwsdl/kung/loader.cpp16
-rw-r--r--kode/kwsdl/kung/loader.h8
-rw-r--r--kode/kwsdl/kung/main.cpp4
-rw-r--r--kode/kwsdl/kung/outputdialog.cpp2
-rw-r--r--kode/kwsdl/kung/outputdialog.h2
-rw-r--r--kode/kwsdl/kung/pageinputfield.cpp30
-rw-r--r--kode/kwsdl/kung/pageinputfield.h16
-rw-r--r--kode/kwsdl/kung/simplebaseinputfield.cpp14
-rw-r--r--kode/kwsdl/kung/simplebaseinputfield.h12
-rw-r--r--kode/kwsdl/kung/stringinputfield.cpp34
-rw-r--r--kode/kwsdl/kung/stringinputfield.h22
-rw-r--r--kode/kwsdl/kung/timeinputfield.cpp26
-rw-r--r--kode/kwsdl/kung/timeinputfield.h20
-rw-r--r--kode/kwsdl/kung/transport.cpp16
-rw-r--r--kode/kwsdl/kung/transport.h16
-rw-r--r--kode/kwsdl/kung/wsclconversationmanager.cpp4
-rw-r--r--kode/kwsdl/kung/wsclconversationmanager.h2
-rw-r--r--kode/kwsdl/main.cpp12
-rw-r--r--kode/kwsdl/message.cpp10
-rw-r--r--kode/kwsdl/message.h32
-rw-r--r--kode/kwsdl/namemapper.cpp4
-rw-r--r--kode/kwsdl/namemapper.h8
-rw-r--r--kode/kwsdl/parser.cpp62
-rw-r--r--kode/kwsdl/parser.h20
-rw-r--r--kode/kwsdl/port.cpp6
-rw-r--r--kode/kwsdl/port.h38
-rw-r--r--kode/kwsdl/schema/attribute.cpp14
-rw-r--r--kode/kwsdl/schema/attribute.h32
-rw-r--r--kode/kwsdl/schema/complextype.cpp38
-rw-r--r--kode/kwsdl/schema/complextype.h54
-rw-r--r--kode/kwsdl/schema/element.cpp18
-rw-r--r--kode/kwsdl/schema/element.h38
-rw-r--r--kode/kwsdl/schema/fileprovider.cpp28
-rw-r--r--kode/kwsdl/schema/fileprovider.h10
-rw-r--r--kode/kwsdl/schema/parser.cpp176
-rw-r--r--kode/kwsdl/schema/parser.h68
-rw-r--r--kode/kwsdl/schema/qualifiedname.cpp14
-rw-r--r--kode/kwsdl/schema/qualifiedname.h26
-rw-r--r--kode/kwsdl/schema/simpletype.cpp26
-rw-r--r--kode/kwsdl/schema/simpletype.h44
-rw-r--r--kode/kwsdl/schema/typestable.cpp18
-rw-r--r--kode/kwsdl/schema/typestable.h24
-rw-r--r--kode/kwsdl/schema/xsdtype.h20
-rw-r--r--kode/kwsdl/service.cpp4
-rw-r--r--kode/kwsdl/service.h24
-rw-r--r--kode/kwsdl/tests/google/directorycategory.cpp10
-rw-r--r--kode/kwsdl/tests/google/directorycategory.h12
-rw-r--r--kode/kwsdl/tests/google/directorycategoryarray.cpp6
-rw-r--r--kode/kwsdl/tests/google/directorycategoryarray.h8
-rw-r--r--kode/kwsdl/tests/google/googlesearch.cc42
-rw-r--r--kode/kwsdl/tests/google/googlesearch.hh22
-rw-r--r--kode/kwsdl/tests/google/googlesearchresult.cpp14
-rw-r--r--kode/kwsdl/tests/google/googlesearchresult.h18
-rw-r--r--kode/kwsdl/tests/google/googlesearchservice.cpp82
-rw-r--r--kode/kwsdl/tests/google/googlesearchservice.h22
-rw-r--r--kode/kwsdl/tests/google/resultelement.cpp30
-rw-r--r--kode/kwsdl/tests/google/resultelement.h42
-rw-r--r--kode/kwsdl/tests/google/resultelementarray.cpp6
-rw-r--r--kode/kwsdl/tests/google/resultelementarray.h8
-rw-r--r--kode/kwsdl/tests/google/serializer.cpp234
-rw-r--r--kode/kwsdl/tests/google/serializer.h126
-rw-r--r--kode/kwsdl/tests/google/transport.cpp16
-rw-r--r--kode/kwsdl/tests/google/transport.h14
-rw-r--r--kode/kwsdl/typemapper.cpp128
-rw-r--r--kode/kwsdl/typemapper.h42
-rw-r--r--kode/kwsdl/wscl/conversation.cpp28
-rw-r--r--kode/kwsdl/wscl/conversation.h42
-rw-r--r--kode/kwsdl/wscl/documents.cpp8
-rw-r--r--kode/kwsdl/wscl/documents.h18
-rw-r--r--kode/kwsdl/wscl/interaction.cpp4
-rw-r--r--kode/kwsdl/wscl/interaction.h10
-rw-r--r--kode/kwsdl/wscl/parser.cpp38
-rw-r--r--kode/kwsdl/wscl/parser.h2
-rw-r--r--kode/kwsdl/wscl/transition.cpp12
-rw-r--r--kode/kwsdl/wscl/transition.h24
-rw-r--r--kode/kwsdl/wsdl.cpp10
-rw-r--r--kode/kwsdl/wsdl.h10
-rw-r--r--kode/kxml_compiler/creator.cpp166
-rw-r--r--kode/kxml_compiler/creator.h32
-rw-r--r--kode/kxml_compiler/kxml_compiler.cpp26
-rw-r--r--kode/kxml_compiler/parser.cpp36
-rw-r--r--kode/kxml_compiler/parser.h38
-rw-r--r--kode/license.cpp4
-rw-r--r--kode/license.h4
-rw-r--r--kode/membervariable.cpp4
-rw-r--r--kode/membervariable.h8
-rw-r--r--kode/printer.cpp92
-rw-r--r--kode/printer.h32
-rw-r--r--kode/statemachine.cpp10
-rw-r--r--kode/statemachine.h12
-rw-r--r--kode/style.cpp10
-rw-r--r--kode/style.h12
-rw-r--r--kode/typedef.cpp4
-rw-r--r--kode/typedef.h12
-rw-r--r--kode/variable.cpp8
-rw-r--r--kode/variable.h26
-rw-r--r--konsolekalendar/konsolekalendar.cpp36
-rw-r--r--konsolekalendar/konsolekalendar.h10
-rw-r--r--konsolekalendar/konsolekalendaradd.cpp6
-rw-r--r--konsolekalendar/konsolekalendarepoch.cpp26
-rw-r--r--konsolekalendar/konsolekalendarepoch.h10
-rw-r--r--konsolekalendar/konsolekalendarexports.cpp36
-rw-r--r--konsolekalendar/konsolekalendarexports.h24
-rw-r--r--konsolekalendar/konsolekalendarvariables.cpp42
-rw-r--r--konsolekalendar/konsolekalendarvariables.h58
-rw-r--r--konsolekalendar/main.cpp46
-rw-r--r--konsolekalendar/stdcalendar.cpp8
-rw-r--r--konsolekalendar/stdcalendar.h4
-rw-r--r--kontact/interfaces/core.cpp34
-rw-r--r--kontact/interfaces/core.h18
-rw-r--r--kontact/interfaces/plugin.cpp56
-rw-r--r--kontact/interfaces/plugin.h46
-rw-r--r--kontact/interfaces/summary.cpp48
-rw-r--r--kontact/interfaces/summary.h26
-rw-r--r--kontact/interfaces/uniqueapphandler.cpp24
-rw-r--r--kontact/interfaces/uniqueapphandler.h2
-rw-r--r--kontact/plugins/akregator/akregator_plugin.cpp16
-rw-r--r--kontact/plugins/akregator/akregator_plugin.h6
-rw-r--r--kontact/plugins/kaddressbook/kaddressbook_plugin.cpp36
-rw-r--r--kontact/plugins/kaddressbook/kaddressbook_plugin.h16
-rw-r--r--kontact/plugins/karm/karm_plugin.cpp4
-rw-r--r--kontact/plugins/karm/karm_plugin.h2
-rw-r--r--kontact/plugins/kitchensync/kitchensync_plugin.cpp8
-rw-r--r--kontact/plugins/kitchensync/kitchensync_plugin.h4
-rw-r--r--kontact/plugins/kmail/kcmkmailsummary.cpp44
-rw-r--r--kontact/plugins/kmail/kcmkmailsummary.h8
-rw-r--r--kontact/plugins/kmail/kmail_plugin.cpp36
-rw-r--r--kontact/plugins/kmail/kmail_plugin.h20
-rw-r--r--kontact/plugins/kmail/summarywidget.cpp58
-rw-r--r--kontact/plugins/kmail/summarywidget.h20
-rw-r--r--kontact/plugins/knode/knode_plugin.cpp12
-rw-r--r--kontact/plugins/knode/knode_plugin.h6
-rw-r--r--kontact/plugins/knotes/knotes_part.cpp124
-rw-r--r--kontact/plugins/knotes/knotes_part.h36
-rw-r--r--kontact/plugins/knotes/knotes_part_p.h34
-rw-r--r--kontact/plugins/knotes/knotes_plugin.cpp10
-rw-r--r--kontact/plugins/knotes/knotes_plugin.h4
-rw-r--r--kontact/plugins/knotes/knotetip.cpp84
-rw-r--r--kontact/plugins/knotes/knotetip.h12
-rw-r--r--kontact/plugins/knotes/summarywidget.cpp54
-rw-r--r--kontact/plugins/knotes/summarywidget.h16
-rw-r--r--kontact/plugins/korganizer/journalplugin.cpp16
-rw-r--r--kontact/plugins/korganizer/journalplugin.h6
-rw-r--r--kontact/plugins/korganizer/kcmkorgsummary.cpp52
-rw-r--r--kontact/plugins/korganizer/kcmkorgsummary.h8
-rw-r--r--kontact/plugins/korganizer/korganizerplugin.cpp54
-rw-r--r--kontact/plugins/korganizer/korganizerplugin.h18
-rw-r--r--kontact/plugins/korganizer/summarywidget.cpp98
-rw-r--r--kontact/plugins/korganizer/summarywidget.h20
-rw-r--r--kontact/plugins/korganizer/todoplugin.cpp46
-rw-r--r--kontact/plugins/korganizer/todoplugin.h12
-rw-r--r--kontact/plugins/korganizer/todosummarywidget.cpp86
-rw-r--r--kontact/plugins/korganizer/todosummarywidget.h22
-rw-r--r--kontact/plugins/kpilot/kpilot_plugin.cpp4
-rw-r--r--kontact/plugins/kpilot/kpilot_plugin.h6
-rw-r--r--kontact/plugins/kpilot/summarywidget.cpp88
-rw-r--r--kontact/plugins/kpilot/summarywidget.h62
-rw-r--r--kontact/plugins/newsticker/kcmkontactknt.cpp144
-rw-r--r--kontact/plugins/newsticker/kcmkontactknt.h26
-rw-r--r--kontact/plugins/newsticker/newsfeeds.h322
-rw-r--r--kontact/plugins/newsticker/newsticker_plugin.cpp4
-rw-r--r--kontact/plugins/newsticker/newsticker_plugin.h4
-rw-r--r--kontact/plugins/newsticker/summarywidget.cpp104
-rw-r--r--kontact/plugins/newsticker/summarywidget.h38
-rw-r--r--kontact/plugins/specialdates/kcmsdsummary.cpp66
-rw-r--r--kontact/plugins/specialdates/kcmsdsummary.h24
-rw-r--r--kontact/plugins/specialdates/sdsummarywidget.cpp182
-rw-r--r--kontact/plugins/specialdates/sdsummarywidget.h24
-rw-r--r--kontact/plugins/specialdates/specialdates_plugin.cpp4
-rw-r--r--kontact/plugins/specialdates/specialdates_plugin.h4
-rw-r--r--kontact/plugins/summary/dropwidget.cpp12
-rw-r--r--kontact/plugins/summary/dropwidget.h10
-rw-r--r--kontact/plugins/summary/kcmkontactsummary.cpp42
-rw-r--r--kontact/plugins/summary/kcmkontactsummary.h6
-rw-r--r--kontact/plugins/summary/summaryview_part.cpp130
-rw-r--r--kontact/plugins/summary/summaryview_part.h34
-rw-r--r--kontact/plugins/summary/summaryview_plugin.cpp26
-rw-r--r--kontact/plugins/summary/summaryview_plugin.h6
-rw-r--r--kontact/plugins/test/test_part.cpp24
-rw-r--r--kontact/plugins/test/test_part.h6
-rw-r--r--kontact/plugins/test/test_plugin.cpp4
-rw-r--r--kontact/plugins/test/test_plugin.h2
-rw-r--r--kontact/plugins/weather/summarywidget.cpp98
-rw-r--r--kontact/plugins/weather/summarywidget.h86
-rw-r--r--kontact/plugins/weather/weather_plugin.cpp4
-rw-r--r--kontact/plugins/weather/weather_plugin.h4
-rw-r--r--kontact/src/aboutdialog.cpp54
-rw-r--r--kontact/src/aboutdialog.h4
-rw-r--r--kontact/src/iconsidepane.cpp152
-rw-r--r--kontact/src/iconsidepane.h70
-rw-r--r--kontact/src/kcmkontact.cpp42
-rw-r--r--kontact/src/kcmkontact.h12
-rw-r--r--kontact/src/kontactiface.h2
-rw-r--r--kontact/src/main.cpp12
-rw-r--r--kontact/src/mainwindow.cpp242
-rw-r--r--kontact/src/mainwindow.h42
-rw-r--r--kontact/src/profiledialog.cpp100
-rw-r--r--kontact/src/profiledialog.h32
-rw-r--r--kontact/src/profilemanager.cpp80
-rw-r--r--kontact/src/profilemanager.h68
-rw-r--r--kontact/src/sidepanebase.cpp4
-rw-r--r--kontact/src/sidepanebase.h8
-rw-r--r--korganizer/actionmanager.cpp518
-rw-r--r--korganizer/actionmanager.h130
-rw-r--r--korganizer/agendaview.cpp8
-rw-r--r--korganizer/agendaview.h4
-rw-r--r--korganizer/archivedialog.cpp72
-rw-r--r--korganizer/archivedialog.h14
-rw-r--r--korganizer/calendarview.cpp418
-rw-r--r--korganizer/calendarview.h112
-rw-r--r--korganizer/customlistviewitem.h12
-rw-r--r--korganizer/datechecker.cpp24
-rw-r--r--korganizer/datechecker.h14
-rw-r--r--korganizer/datenavigator.cpp42
-rw-r--r--korganizer/datenavigator.h14
-rw-r--r--korganizer/datenavigatorcontainer.cpp76
-rw-r--r--korganizer/datenavigatorcontainer.h22
-rw-r--r--korganizer/docprefs.cpp10
-rw-r--r--korganizer/docprefs.h14
-rw-r--r--korganizer/eventarchiver.cpp24
-rw-r--r--korganizer/eventarchiver.h16
-rw-r--r--korganizer/exportwebdialog.cpp74
-rw-r--r--korganizer/exportwebdialog.h16
-rw-r--r--korganizer/filtereditdialog.cpp56
-rw-r--r--korganizer/filtereditdialog.h10
-rw-r--r--korganizer/freebusymanager.cpp136
-rw-r--r--korganizer/freebusymanager.h48
-rw-r--r--korganizer/freebusyurldialog.cpp22
-rw-r--r--korganizer/freebusyurldialog.h4
-rw-r--r--korganizer/history.cpp32
-rw-r--r--korganizer/history.h32
-rw-r--r--korganizer/importdialog.cpp26
-rw-r--r--korganizer/importdialog.h8
-rw-r--r--korganizer/incidencechanger.cpp10
-rw-r--r--korganizer/incidencechanger.h4
-rw-r--r--korganizer/interfaces/calendar/calendardecoration.h20
-rw-r--r--korganizer/interfaces/calendar/plugin.h10
-rw-r--r--korganizer/interfaces/korganizer/baseview.h32
-rw-r--r--korganizer/interfaces/korganizer/calendarviewbase.h10
-rw-r--r--korganizer/interfaces/korganizer/corehelper.h18
-rw-r--r--korganizer/interfaces/korganizer/incidencechangerbase.h8
-rw-r--r--korganizer/interfaces/korganizer/mainwindow.h6
-rw-r--r--korganizer/interfaces/korganizer/part.h14
-rw-r--r--korganizer/interfaces/korganizer/printplugin.h22
-rw-r--r--korganizer/journalentry.cpp146
-rw-r--r--korganizer/journalentry.h44
-rw-r--r--korganizer/kcalendariface.h104
-rw-r--r--korganizer/kdatenavigator.cpp82
-rw-r--r--korganizer/kdatenavigator.h30
-rw-r--r--korganizer/koagenda.cpp394
-rw-r--r--korganizer/koagenda.h134
-rw-r--r--korganizer/koagendaitem.cpp144
-rw-r--r--korganizer/koagendaitem.h70
-rw-r--r--korganizer/koagendaview.cpp424
-rw-r--r--korganizer/koagendaview.h92
-rw-r--r--korganizer/koapp.cpp2
-rw-r--r--korganizer/koattendeeeditor.cpp128
-rw-r--r--korganizer/koattendeeeditor.h36
-rw-r--r--korganizer/kocore.cpp36
-rw-r--r--korganizer/kocore.h18
-rw-r--r--korganizer/kocorehelper.cpp8
-rw-r--r--korganizer/kocorehelper.h12
-rw-r--r--korganizer/kocounterdialog.cpp8
-rw-r--r--korganizer/kocounterdialog.h4
-rw-r--r--korganizer/kodaymatrix.cpp106
-rw-r--r--korganizer/kodaymatrix.h66
-rw-r--r--korganizer/kodialogmanager.cpp106
-rw-r--r--korganizer/kodialogmanager.h8
-rw-r--r--korganizer/koeditoralarms.cpp90
-rw-r--r--korganizer/koeditoralarms.h4
-rw-r--r--korganizer/koeditorattachments.cpp168
-rw-r--r--korganizer/koeditorattachments.h20
-rw-r--r--korganizer/koeditordetails.cpp106
-rw-r--r--korganizer/koeditordetails.h18
-rw-r--r--korganizer/koeditorfreebusy.cpp196
-rw-r--r--korganizer/koeditorfreebusy.h40
-rw-r--r--korganizer/koeditorgeneral.cpp178
-rw-r--r--korganizer/koeditorgeneral.h60
-rw-r--r--korganizer/koeditorgeneralevent.cpp210
-rw-r--r--korganizer/koeditorgeneralevent.h48
-rw-r--r--korganizer/koeditorgeneraljournal.cpp72
-rw-r--r--korganizer/koeditorgeneraljournal.h30
-rw-r--r--korganizer/koeditorgeneraltodo.cpp204
-rw-r--r--korganizer/koeditorgeneraltodo.h34
-rw-r--r--korganizer/koeditorrecurrence.cpp464
-rw-r--r--korganizer/koeditorrecurrence.h162
-rw-r--r--korganizer/koeventeditor.cpp132
-rw-r--r--korganizer/koeventeditor.h14
-rw-r--r--korganizer/koeventpopupmenu.cpp38
-rw-r--r--korganizer/koeventpopupmenu.h22
-rw-r--r--korganizer/koeventview.cpp50
-rw-r--r--korganizer/koeventview.h8
-rw-r--r--korganizer/koeventviewer.cpp14
-rw-r--r--korganizer/koeventviewer.h18
-rw-r--r--korganizer/koeventviewerdialog.cpp6
-rw-r--r--korganizer/koeventviewerdialog.h4
-rw-r--r--korganizer/koglobals.cpp26
-rw-r--r--korganizer/koglobals.h10
-rw-r--r--korganizer/kogroupware.cpp78
-rw-r--r--korganizer/kogroupware.h8
-rw-r--r--korganizer/kohelper.cpp18
-rw-r--r--korganizer/kohelper.h4
-rw-r--r--korganizer/koidentitymanager.cpp2
-rw-r--r--korganizer/koidentitymanager.h4
-rw-r--r--korganizer/koincidenceeditor.cpp116
-rw-r--r--korganizer/koincidenceeditor.h42
-rw-r--r--korganizer/koincidencetooltip.cpp14
-rw-r--r--korganizer/koincidencetooltip.h16
-rw-r--r--korganizer/kojournaleditor.cpp22
-rw-r--r--korganizer/kojournaleditor.h14
-rw-r--r--korganizer/kojournalview.cpp66
-rw-r--r--korganizer/kojournalview.h14
-rw-r--r--korganizer/kolistview.cpp82
-rw-r--r--korganizer/kolistview.h18
-rw-r--r--korganizer/komailclient.cpp106
-rw-r--r--korganizer/komailclient.h42
-rw-r--r--korganizer/komessagebox.cpp16
-rw-r--r--korganizer/komessagebox.h8
-rw-r--r--korganizer/komonthview.cpp274
-rw-r--r--korganizer/komonthview.h112
-rw-r--r--korganizer/konewstuff.cpp8
-rw-r--r--korganizer/konewstuff.h4
-rw-r--r--korganizer/koprefs.cpp100
-rw-r--r--korganizer/koprefs.h52
-rw-r--r--korganizer/koprefsdialog.cpp434
-rw-r--r--korganizer/koprefsdialog.h46
-rw-r--r--korganizer/korgac/alarmclientiface.h4
-rw-r--r--korganizer/korgac/alarmdialog.cpp102
-rw-r--r--korganizer/korgac/alarmdialog.h14
-rw-r--r--korganizer/korgac/alarmdockwindow.cpp42
-rw-r--r--korganizer/korgac/alarmdockwindow.h14
-rw-r--r--korganizer/korgac/koalarmclient.cpp60
-rw-r--r--korganizer/korgac/koalarmclient.h16
-rw-r--r--korganizer/korgac/testalarmdlg.cpp10
-rw-r--r--korganizer/korganizer.cpp32
-rw-r--r--korganizer/korganizer.h4
-rw-r--r--korganizer/korganizer_part.cpp38
-rw-r--r--korganizer/korganizer_part.h12
-rw-r--r--korganizer/korganizeriface.h20
-rw-r--r--korganizer/korganizerifaceimpl.cpp22
-rw-r--r--korganizer/korganizerifaceimpl.h26
-rw-r--r--korganizer/kotimelineview.cpp90
-rw-r--r--korganizer/kotimelineview.h18
-rw-r--r--korganizer/kotodoeditor.cpp76
-rw-r--r--korganizer/kotodoeditor.h12
-rw-r--r--korganizer/kotodoview.cpp308
-rw-r--r--korganizer/kotodoview.h90
-rw-r--r--korganizer/kotodoviewitem.cpp58
-rw-r--r--korganizer/kotodoviewitem.h18
-rw-r--r--korganizer/koviewmanager.cpp156
-rw-r--r--korganizer/koviewmanager.h14
-rw-r--r--korganizer/kowhatsnextview.cpp50
-rw-r--r--korganizer/kowhatsnextview.h28
-rw-r--r--korganizer/kowindowlist.cpp2
-rw-r--r--korganizer/kowindowlist.h4
-rw-r--r--korganizer/mailscheduler.cpp50
-rw-r--r--korganizer/mailscheduler.h16
-rw-r--r--korganizer/multiagendaview.cpp218
-rw-r--r--korganizer/multiagendaview.h38
-rw-r--r--korganizer/navigatorbar.cpp72
-rw-r--r--korganizer/navigatorbar.h18
-rw-r--r--korganizer/plugins/datenums/configdialog.cpp24
-rw-r--r--korganizer/plugins/datenums/configdialog.h4
-rw-r--r--korganizer/plugins/datenums/datenums.cpp12
-rw-r--r--korganizer/plugins/datenums/datenums.h8
-rw-r--r--korganizer/plugins/exchange/exchange.cpp44
-rw-r--r--korganizer/plugins/exchange/exchange.h12
-rw-r--r--korganizer/plugins/exchange/exchangeconfig.cpp40
-rw-r--r--korganizer/plugins/exchange/exchangeconfig.h12
-rw-r--r--korganizer/plugins/exchange/exchangedialog.cpp16
-rw-r--r--korganizer/plugins/exchange/exchangedialog.h2
-rw-r--r--korganizer/plugins/hebrew/configdialog.cpp18
-rw-r--r--korganizer/plugins/hebrew/configdialog.h12
-rw-r--r--korganizer/plugins/hebrew/converter.h8
-rw-r--r--korganizer/plugins/hebrew/hebrew.cpp12
-rw-r--r--korganizer/plugins/hebrew/hebrew.h10
-rw-r--r--korganizer/plugins/hebrew/holiday.cpp6
-rw-r--r--korganizer/plugins/hebrew/holiday.h10
-rw-r--r--korganizer/plugins/hebrew/parsha.cpp4
-rw-r--r--korganizer/plugins/hebrew/parsha.h8
-rw-r--r--korganizer/plugins/printing/journal/journalprint.cpp12
-rw-r--r--korganizer/plugins/printing/journal/journalprint.h10
-rw-r--r--korganizer/plugins/printing/list/listprint.cpp8
-rw-r--r--korganizer/plugins/printing/list/listprint.h10
-rw-r--r--korganizer/plugins/printing/whatsnext/whatsnextprint.cpp8
-rw-r--r--korganizer/plugins/printing/whatsnext/whatsnextprint.h10
-rw-r--r--korganizer/plugins/printing/year/yearprint.cpp34
-rw-r--r--korganizer/plugins/printing/year/yearprint.h10
-rw-r--r--korganizer/plugins/projectview/koprojectview.cpp104
-rw-r--r--korganizer/plugins/projectview/koprojectview.h26
-rw-r--r--korganizer/plugins/projectview/projectview.cpp8
-rw-r--r--korganizer/plugins/projectview/projectview.h4
-rw-r--r--korganizer/plugins/timespanview/kotimespanview.cpp20
-rw-r--r--korganizer/plugins/timespanview/kotimespanview.h6
-rw-r--r--korganizer/plugins/timespanview/lineview.cpp10
-rw-r--r--korganizer/plugins/timespanview/lineview.h10
-rw-r--r--korganizer/plugins/timespanview/timeline.cpp16
-rw-r--r--korganizer/plugins/timespanview/timeline.h14
-rw-r--r--korganizer/plugins/timespanview/timespanview.cpp8
-rw-r--r--korganizer/plugins/timespanview/timespanview.h4
-rw-r--r--korganizer/plugins/timespanview/timespanwidget.cpp60
-rw-r--r--korganizer/plugins/timespanview/timespanwidget.h22
-rw-r--r--korganizer/printing/calprintdefaultplugins.cpp212
-rw-r--r--korganizer/printing/calprintdefaultplugins.h56
-rw-r--r--korganizer/printing/calprinter.cpp60
-rw-r--r--korganizer/printing/calprinter.h24
-rw-r--r--korganizer/printing/calprintpluginbase.cpp508
-rw-r--r--korganizer/printing/calprintpluginbase.h158
-rw-r--r--korganizer/printing/cellitem.cpp14
-rw-r--r--korganizer/printing/cellitem.h8
-rw-r--r--korganizer/publishdialog.cpp52
-rw-r--r--korganizer/publishdialog.h4
-rw-r--r--korganizer/resourceview.cpp246
-rw-r--r--korganizer/resourceview.h44
-rw-r--r--korganizer/searchdialog.cpp90
-rw-r--r--korganizer/searchdialog.h28
-rw-r--r--korganizer/statusdialog.cpp28
-rw-r--r--korganizer/statusdialog.h4
-rw-r--r--korganizer/stdcalendar.cpp6
-rw-r--r--korganizer/templatemanagementdialog.cpp34
-rw-r--r--korganizer/templatemanagementdialog.h16
-rw-r--r--korganizer/timelabels.cpp66
-rw-r--r--korganizer/timelabels.h14
-rw-r--r--korganizer/timelineitem.cpp20
-rw-r--r--korganizer/timelineitem.h18
-rw-r--r--korganizer/timezone.cpp6
-rw-r--r--korganizer/urihandler.cpp20
-rw-r--r--korganizer/urihandler.h4
-rw-r--r--korn/account_input.cpp66
-rw-r--r--korn/account_input.h72
-rw-r--r--korn/accountmanager.cpp68
-rw-r--r--korn/accountmanager.h22
-rw-r--r--korn/boxcontainer.cpp14
-rw-r--r--korn/boxcontainer.h8
-rw-r--r--korn/boxcontaineritem.cpp132
-rw-r--r--korn/boxcontaineritem.h28
-rw-r--r--korn/dcop_proto.cpp20
-rw-r--r--korn/dcop_proto.h14
-rw-r--r--korn/dcopdrop.cpp42
-rw-r--r--korn/dcopdrop.h20
-rw-r--r--korn/dcopdropif.cpp4
-rw-r--r--korn/dcopdropif.h4
-rw-r--r--korn/dockedcontainer.cpp2
-rw-r--r--korn/dockedcontainer.h2
-rw-r--r--korn/dockeditem.cpp30
-rw-r--r--korn/dockeditem.h10
-rw-r--r--korn/hvcontainer.cpp8
-rw-r--r--korn/hvcontainer.h4
-rw-r--r--korn/hvitem.cpp22
-rw-r--r--korn/hvitem.h8
-rw-r--r--korn/imap_proto.cpp52
-rw-r--r--korn/imap_proto.h14
-rw-r--r--korn/imaps_proto.h4
-rw-r--r--korn/intid.cpp4
-rw-r--r--korn/intid.h2
-rw-r--r--korn/kconf_update/korn-3-4-config_change.cpp56
-rw-r--r--korn/keditlistboxman.cpp56
-rw-r--r--korn/keditlistboxman.h28
-rw-r--r--korn/kio.cpp72
-rw-r--r--korn/kio.h50
-rw-r--r--korn/kio_count.cpp48
-rw-r--r--korn/kio_count.h8
-rw-r--r--korn/kio_delete.cpp12
-rw-r--r--korn/kio_delete.h8
-rw-r--r--korn/kio_proto.cpp16
-rw-r--r--korn/kio_proto.h30
-rw-r--r--korn/kio_read.cpp14
-rw-r--r--korn/kio_read.h12
-rw-r--r--korn/kio_single_subject.cpp38
-rw-r--r--korn/kio_single_subject.h16
-rw-r--r--korn/kio_subjects.cpp22
-rw-r--r--korn/kio_subjects.h8
-rw-r--r--korn/kmail_proto.cpp62
-rw-r--r--korn/kmail_proto.h16
-rw-r--r--korn/kornaccountcfgimpl.cpp50
-rw-r--r--korn/kornaccountcfgimpl.h14
-rw-r--r--korn/kornboxcfgimpl.cpp52
-rw-r--r--korn/kornboxcfgimpl.h10
-rw-r--r--korn/korncfgimpl.cpp72
-rw-r--r--korn/korncfgimpl.h6
-rw-r--r--korn/kornshell.cpp16
-rw-r--r--korn/kornshell.h4
-rw-r--r--korn/label.h10
-rw-r--r--korn/maildir_proto.h6
-rw-r--r--korn/maildlg.cpp32
-rw-r--r--korn/maildlg.h6
-rw-r--r--korn/maildrop.cpp56
-rw-r--r--korn/maildrop.h94
-rw-r--r--korn/mailid.h4
-rw-r--r--korn/mailsubject.cpp46
-rw-r--r--korn/mailsubject.h20
-rw-r--r--korn/mbox_proto.cpp16
-rw-r--r--korn/mbox_proto.h14
-rw-r--r--korn/nntp_proto.cpp32
-rw-r--r--korn/nntp_proto.h12
-rw-r--r--korn/password.cpp40
-rw-r--r--korn/password.h14
-rw-r--r--korn/polldrop.cpp4
-rw-r--r--korn/polldrop.h2
-rw-r--r--korn/pop3_proto.cpp50
-rw-r--r--korn/pop3_proto.h14
-rw-r--r--korn/pop3s_proto.h4
-rw-r--r--korn/process_proto.cpp16
-rw-r--r--korn/process_proto.h14
-rw-r--r--korn/progress_dialog.ui.h2
-rw-r--r--korn/protocol.h14
-rw-r--r--korn/protocols.cpp18
-rw-r--r--korn/protocols.h6
-rw-r--r--korn/qmail_proto.cpp16
-rw-r--r--korn/qmail_proto.h14
-rw-r--r--korn/sortedmailsubject.cpp2
-rw-r--r--korn/sortedmailsubject.h12
-rw-r--r--korn/stringid.cpp2
-rw-r--r--korn/stringid.h10
-rw-r--r--korn/subjectsdlg.cpp130
-rw-r--r--korn/subjectsdlg.h26
-rw-r--r--korn/systemtray.cpp6
-rw-r--r--korn/systemtray.h4
-rw-r--r--korn/utils.h4
-rw-r--r--kpilot/Documentation/ConduitProgrammingTutorial/mal-factory.cc8
-rw-r--r--kpilot/Documentation/ConduitProgrammingTutorial/mal-factory.h8
-rw-r--r--kpilot/conduits/abbrowserconduit/abbrowser-conduit.cc110
-rw-r--r--kpilot/conduits/abbrowserconduit/abbrowser-conduit.h16
-rw-r--r--kpilot/conduits/abbrowserconduit/abbrowser-setup.cc44
-rw-r--r--kpilot/conduits/abbrowserconduit/abbrowser-setup.h4
-rw-r--r--kpilot/conduits/abbrowserconduit/kabcRecord.cc54
-rw-r--r--kpilot/conduits/abbrowserconduit/kabcRecord.h36
-rw-r--r--kpilot/conduits/abbrowserconduit/resolutionDialog.cc62
-rw-r--r--kpilot/conduits/abbrowserconduit/resolutionDialog.h8
-rw-r--r--kpilot/conduits/abbrowserconduit/resolutionTable.h16
-rw-r--r--kpilot/conduits/docconduit/DOC-converter.cc88
-rw-r--r--kpilot/conduits/docconduit/DOC-converter.h60
-rw-r--r--kpilot/conduits/docconduit/doc-conduit.cc156
-rw-r--r--kpilot/conduits/docconduit/doc-conduit.h30
-rw-r--r--kpilot/conduits/docconduit/doc-conflictdialog.cc72
-rw-r--r--kpilot/conduits/docconduit/doc-conflictdialog.h18
-rw-r--r--kpilot/conduits/docconduit/doc-factory.cc8
-rw-r--r--kpilot/conduits/docconduit/doc-factory.h8
-rw-r--r--kpilot/conduits/docconduit/doc-setup.cc22
-rw-r--r--kpilot/conduits/docconduit/doc-setup.h2
-rw-r--r--kpilot/conduits/docconduit/kpalmdoc_dlg.cc90
-rw-r--r--kpilot/conduits/docconduit/kpalmdoc_dlg.h10
-rw-r--r--kpilot/conduits/docconduit/pilotDOCEntry.h6
-rw-r--r--kpilot/conduits/knotes/knotes-action.cc58
-rw-r--r--kpilot/conduits/knotes/knotes-action.h4
-rw-r--r--kpilot/conduits/knotes/knotes-factory.cc8
-rw-r--r--kpilot/conduits/knotes/knotes-factory.h8
-rw-r--r--kpilot/conduits/knotes/knotes-setup.cc24
-rw-r--r--kpilot/conduits/knotes/knotes-setup.h4
-rw-r--r--kpilot/conduits/malconduit/mal-conduit.cc26
-rw-r--r--kpilot/conduits/malconduit/mal-conduit.h4
-rw-r--r--kpilot/conduits/malconduit/mal-factory.cc8
-rw-r--r--kpilot/conduits/malconduit/mal-factory.h8
-rw-r--r--kpilot/conduits/malconduit/mal-setup.cc46
-rw-r--r--kpilot/conduits/malconduit/mal-setup.h4
-rw-r--r--kpilot/conduits/memofileconduit/memofile-conduit.cc22
-rw-r--r--kpilot/conduits/memofileconduit/memofile-conduit.h4
-rw-r--r--kpilot/conduits/memofileconduit/memofile-factory.cc18
-rw-r--r--kpilot/conduits/memofileconduit/memofile.cc22
-rw-r--r--kpilot/conduits/memofileconduit/memofile.h38
-rw-r--r--kpilot/conduits/memofileconduit/memofiles.cc114
-rw-r--r--kpilot/conduits/memofileconduit/memofiles.h32
-rw-r--r--kpilot/conduits/notepadconduit/notepad-conduit.cc38
-rw-r--r--kpilot/conduits/notepadconduit/notepad-conduit.h10
-rw-r--r--kpilot/conduits/notepadconduit/notepad-factory.cc12
-rw-r--r--kpilot/conduits/null/null-conduit.cc4
-rw-r--r--kpilot/conduits/null/null-conduit.h2
-rw-r--r--kpilot/conduits/null/null-factory.cc14
-rw-r--r--kpilot/conduits/popmail/popmail-conduit.cc48
-rw-r--r--kpilot/conduits/popmail/popmail-conduit.h4
-rw-r--r--kpilot/conduits/popmail/setupDialog.cc20
-rw-r--r--kpilot/conduits/popmail/setupDialog.h4
-rw-r--r--kpilot/conduits/recordconduit/factory.cc22
-rw-r--r--kpilot/conduits/sysinfoconduit/sysinfo-conduit.cc144
-rw-r--r--kpilot/conduits/sysinfoconduit/sysinfo-conduit.h12
-rw-r--r--kpilot/conduits/sysinfoconduit/sysinfo-setup.cc46
-rw-r--r--kpilot/conduits/sysinfoconduit/sysinfo-setup.h2
-rw-r--r--kpilot/conduits/timeconduit/time-conduit.cc4
-rw-r--r--kpilot/conduits/timeconduit/time-conduit.h2
-rw-r--r--kpilot/conduits/timeconduit/time-setup.cc8
-rw-r--r--kpilot/conduits/timeconduit/time-setup.h4
-rw-r--r--kpilot/conduits/vcalconduit/cleanupstate.cc6
-rw-r--r--kpilot/conduits/vcalconduit/hhtopcstate.cc6
-rw-r--r--kpilot/conduits/vcalconduit/kcalRecord.cc12
-rw-r--r--kpilot/conduits/vcalconduit/pctohhstate.cc4
-rw-r--r--kpilot/conduits/vcalconduit/teststate.cc8
-rw-r--r--kpilot/conduits/vcalconduit/todo-conduit.cc16
-rw-r--r--kpilot/conduits/vcalconduit/todo-conduit.h6
-rw-r--r--kpilot/conduits/vcalconduit/todo-setup.cc6
-rw-r--r--kpilot/conduits/vcalconduit/todo-setup.h4
-rw-r--r--kpilot/conduits/vcalconduit/todoRecord.cc2
-rw-r--r--kpilot/conduits/vcalconduit/vcal-conduit.cc12
-rw-r--r--kpilot/conduits/vcalconduit/vcal-conduit.h6
-rw-r--r--kpilot/conduits/vcalconduit/vcal-conduitbase.cc24
-rw-r--r--kpilot/conduits/vcalconduit/vcal-conduitbase.h12
-rw-r--r--kpilot/conduits/vcalconduit/vcal-setup.cc6
-rw-r--r--kpilot/conduits/vcalconduit/vcal-setup.h4
-rw-r--r--kpilot/conduits/vcalconduit/vcal-setupbase.cc18
-rw-r--r--kpilot/conduits/vcalconduit/vcal-setupbase.h2
-rw-r--r--kpilot/conduits/vcalconduit/vcalRecord.cc14
-rw-r--r--kpilot/kpilot/addressEditor.cc30
-rw-r--r--kpilot/kpilot/addressEditor.h34
-rw-r--r--kpilot/kpilot/addressWidget.cc130
-rw-r--r--kpilot/kpilot/addressWidget.h20
-rw-r--r--kpilot/kpilot/conduitConfigDialog.cc212
-rw-r--r--kpilot/kpilot/conduitConfigDialog.h38
-rw-r--r--kpilot/kpilot/datebookWidget.cc32
-rw-r--r--kpilot/kpilot/datebookWidget.h8
-rw-r--r--kpilot/kpilot/dbAppInfoEditor.cc12
-rw-r--r--kpilot/kpilot/dbAppInfoEditor.h4
-rw-r--r--kpilot/kpilot/dbFlagsEditor.cc16
-rw-r--r--kpilot/kpilot/dbFlagsEditor.h2
-rw-r--r--kpilot/kpilot/dbFlagsEditor_base.ui.h2
-rw-r--r--kpilot/kpilot/dbRecordEditor.cc60
-rw-r--r--kpilot/kpilot/dbRecordEditor.h30
-rw-r--r--kpilot/kpilot/dbSelectionDialog.cc52
-rw-r--r--kpilot/kpilot/dbSelectionDialog.h16
-rw-r--r--kpilot/kpilot/dbviewerWidget.cc94
-rw-r--r--kpilot/kpilot/dbviewerWidget.h12
-rw-r--r--kpilot/kpilot/fileInstallWidget.cc98
-rw-r--r--kpilot/kpilot/fileInstallWidget.h16
-rw-r--r--kpilot/kpilot/fileInstaller.cc36
-rw-r--r--kpilot/kpilot/fileInstaller.h18
-rw-r--r--kpilot/kpilot/hotSync.cc204
-rw-r--r--kpilot/kpilot/hotSync.h26
-rw-r--r--kpilot/kpilot/internalEditorAction.cc72
-rw-r--r--kpilot/kpilot/internalEditorAction.h8
-rw-r--r--kpilot/kpilot/kpilot.cc112
-rw-r--r--kpilot/kpilot/kpilot.h10
-rw-r--r--kpilot/kpilot/kpilotConfig.cc52
-rw-r--r--kpilot/kpilot/kpilotConfig.h14
-rw-r--r--kpilot/kpilot/kpilotConfigDialog.cc128
-rw-r--r--kpilot/kpilot/kpilotConfigDialog.h14
-rw-r--r--kpilot/kpilot/kpilotConfigWizard.cc26
-rw-r--r--kpilot/kpilot/kpilotConfigWizard.h4
-rw-r--r--kpilot/kpilot/kpilotProbeDialog.cc92
-rw-r--r--kpilot/kpilot/kpilotProbeDialog.h48
-rw-r--r--kpilot/kpilot/kroupware.cc66
-rw-r--r--kpilot/kpilot/kroupware.h2
-rw-r--r--kpilot/kpilot/listCat.cc66
-rw-r--r--kpilot/kpilot/listCat.h50
-rw-r--r--kpilot/kpilot/listItems.cc28
-rw-r--r--kpilot/kpilot/listItems.h18
-rw-r--r--kpilot/kpilot/logFile.cc32
-rw-r--r--kpilot/kpilot/logFile.h16
-rw-r--r--kpilot/kpilot/logWidget.cc118
-rw-r--r--kpilot/kpilot/logWidget.h26
-rw-r--r--kpilot/kpilot/loggerDCOP.h6
-rw-r--r--kpilot/kpilot/main-test.cc40
-rw-r--r--kpilot/kpilot/memoWidget.cc154
-rw-r--r--kpilot/kpilot/memoWidget.h16
-rw-r--r--kpilot/kpilot/pilotComponent.cc20
-rw-r--r--kpilot/kpilot/pilotComponent.h20
-rw-r--r--kpilot/kpilot/pilotDaemon.cc190
-rw-r--r--kpilot/kpilot/pilotDaemon.h46
-rw-r--r--kpilot/kpilot/pilotDaemonDCOP.h26
-rw-r--r--kpilot/kpilot/syncCalendar.cc6
-rw-r--r--kpilot/kpilot/todoEditor.cc16
-rw-r--r--kpilot/kpilot/todoEditor.h2
-rw-r--r--kpilot/kpilot/todoWidget.cc118
-rw-r--r--kpilot/kpilot/todoWidget.h32
-rw-r--r--kpilot/lib/actionQueue.cc24
-rw-r--r--kpilot/lib/actionQueue.h6
-rw-r--r--kpilot/lib/actions.cc10
-rw-r--r--kpilot/lib/actions.h4
-rw-r--r--kpilot/lib/idmapper.cc58
-rw-r--r--kpilot/lib/idmapper.h44
-rw-r--r--kpilot/lib/idmapperxml.cc44
-rw-r--r--kpilot/lib/idmapperxml.h28
-rw-r--r--kpilot/lib/idmapping.cc12
-rw-r--r--kpilot/lib/idmapping.h22
-rw-r--r--kpilot/lib/kpilotdevicelink.cc120
-rw-r--r--kpilot/lib/kpilotdevicelink.h30
-rw-r--r--kpilot/lib/kpilotdevicelinkPrivate.h34
-rw-r--r--kpilot/lib/kpilotlink.cc34
-rw-r--r--kpilot/lib/kpilotlink.h44
-rw-r--r--kpilot/lib/kpilotlocallink.cc60
-rw-r--r--kpilot/lib/kpilotlocallink.h18
-rw-r--r--kpilot/lib/options.cc20
-rw-r--r--kpilot/lib/options.h24
-rw-r--r--kpilot/lib/pilot.cc48
-rw-r--r--kpilot/lib/pilot.h48
-rw-r--r--kpilot/lib/pilotAddress.cc56
-rw-r--r--kpilot/lib/pilotAddress.h28
-rw-r--r--kpilot/lib/pilotAppInfo.cc2
-rw-r--r--kpilot/lib/pilotAppInfo.h10
-rw-r--r--kpilot/lib/pilotDatabase.cc8
-rw-r--r--kpilot/lib/pilotDatabase.h10
-rw-r--r--kpilot/lib/pilotDateEntry.cc72
-rw-r--r--kpilot/lib/pilotDateEntry.h30
-rw-r--r--kpilot/lib/pilotLocalDatabase.cc76
-rw-r--r--kpilot/lib/pilotLocalDatabase.h24
-rw-r--r--kpilot/lib/pilotMemo.cc16
-rw-r--r--kpilot/lib/pilotMemo.h22
-rw-r--r--kpilot/lib/pilotRecord.cc6
-rw-r--r--kpilot/lib/pilotRecord.h6
-rw-r--r--kpilot/lib/pilotSerialDatabase.cc22
-rw-r--r--kpilot/lib/pilotSerialDatabase.h12
-rw-r--r--kpilot/lib/pilotTodoEntry.cc26
-rw-r--r--kpilot/lib/pilotTodoEntry.h16
-rw-r--r--kpilot/lib/pilotUser.h4
-rw-r--r--kpilot/lib/plugin.cc158
-rw-r--r--kpilot/lib/plugin.h62
-rw-r--r--kpilot/lib/pluginfactory.h14
-rw-r--r--kpilot/lib/recordConduit.cc86
-rw-r--r--kpilot/lib/recordConduit.h18
-rw-r--r--kpilot/lib/syncAction.cc140
-rw-r--r--kpilot/lib/syncAction.h56
-rw-r--r--kpilot/tests/conduits/vcalconduit/exampletest.cc2
-rw-r--r--kpilot/tests/conduits/vcalconduit/exampletest.h4
-rw-r--r--kpilot/tests/exportdatebook.cc8
-rw-r--r--kpilot/tests/importaddresses.cc4
-rw-r--r--kpilot/tests/importdatebook.cc6
-rw-r--r--kpilot/tests/mergecalendars.cc18
-rw-r--r--kpilot/tests/testaddress.cc2
-rw-r--r--kpilot/tests/testcategories.cc20
-rw-r--r--kpilot/tests/testdatabase.cc16
-rw-r--r--kpilot/tests/testdatebook.cc2
-rw-r--r--kpilot/tests/testidmapper.cc14
-rw-r--r--kresources/birthdays/resourcekabc.cpp74
-rw-r--r--kresources/birthdays/resourcekabc.h34
-rw-r--r--kresources/birthdays/resourcekabcconfig.cpp44
-rw-r--r--kresources/birthdays/resourcekabcconfig.h12
-rw-r--r--kresources/blogging/API_Blog.cpp30
-rw-r--r--kresources/blogging/API_Blog.h110
-rw-r--r--kresources/blogging/API_Blogger.cpp100
-rw-r--r--kresources/blogging/API_Blogger.h16
-rw-r--r--kresources/blogging/bloggingcalendaradaptor.cpp46
-rw-r--r--kresources/blogging/bloggingcalendaradaptor.h26
-rw-r--r--kresources/blogging/bloggingglobals.cpp18
-rw-r--r--kresources/blogging/bloggingglobals.h12
-rw-r--r--kresources/blogging/kcal_resourceblogging.cpp2
-rw-r--r--kresources/blogging/kcal_resourcebloggingconfig.cpp2
-rw-r--r--kresources/blogging/kcal_resourcebloggingconfig.h2
-rw-r--r--kresources/blogging/xmlrpcjob.cpp192
-rw-r--r--kresources/blogging/xmlrpcjob.h54
-rw-r--r--kresources/caldav/config.cpp30
-rw-r--r--kresources/caldav/config.h10
-rw-r--r--kresources/caldav/configwidgets.cpp106
-rw-r--r--kresources/caldav/configwidgets.h6
-rw-r--r--kresources/caldav/job.cpp12
-rw-r--r--kresources/caldav/job.h30
-rw-r--r--kresources/caldav/preferences.cpp32
-rw-r--r--kresources/caldav/preferences.h28
-rw-r--r--kresources/caldav/reader.h16
-rw-r--r--kresources/caldav/resource.cpp92
-rw-r--r--kresources/caldav/resource.h32
-rw-r--r--kresources/caldav/writer.h20
-rw-r--r--kresources/carddav/config.cpp32
-rw-r--r--kresources/carddav/config.h12
-rw-r--r--kresources/carddav/configwidgets.cpp106
-rw-r--r--kresources/carddav/configwidgets.h6
-rw-r--r--kresources/carddav/job.cpp12
-rw-r--r--kresources/carddav/job.h30
-rw-r--r--kresources/carddav/preferences.cpp32
-rw-r--r--kresources/carddav/preferences.h28
-rw-r--r--kresources/carddav/reader.h16
-rw-r--r--kresources/carddav/resource.cpp88
-rw-r--r--kresources/carddav/resource.h30
-rw-r--r--kresources/carddav/writer.h20
-rw-r--r--kresources/egroupware/debugdialog.cpp20
-rw-r--r--kresources/egroupware/debugdialog.h8
-rw-r--r--kresources/egroupware/kabc_resourcexmlrpc.cpp202
-rw-r--r--kresources/egroupware/kabc_resourcexmlrpc.h46
-rw-r--r--kresources/egroupware/kabc_resourcexmlrpcconfig.cpp18
-rw-r--r--kresources/egroupware/kabc_resourcexmlrpcconfig.h2
-rw-r--r--kresources/egroupware/kcal_resourcexmlrpc.cpp346
-rw-r--r--kresources/egroupware/kcal_resourcexmlrpc.h70
-rw-r--r--kresources/egroupware/kcal_resourcexmlrpcconfig.cpp18
-rw-r--r--kresources/egroupware/kcal_resourcexmlrpcconfig.h2
-rw-r--r--kresources/egroupware/knotes_resourcexmlrpc.cpp94
-rw-r--r--kresources/egroupware/knotes_resourcexmlrpc.h30
-rw-r--r--kresources/egroupware/knotes_resourcexmlrpcconfig.cpp18
-rw-r--r--kresources/egroupware/knotes_resourcexmlrpcconfig.h2
-rw-r--r--kresources/egroupware/synchronizer.cpp4
-rw-r--r--kresources/egroupware/synchronizer.h6
-rw-r--r--kresources/egroupware/todostatemapper.cpp38
-rw-r--r--kresources/egroupware/todostatemapper.h34
-rw-r--r--kresources/egroupware/xmlrpciface.cpp280
-rw-r--r--kresources/egroupware/xmlrpciface.h160
-rw-r--r--kresources/exchange/dateset.cpp54
-rw-r--r--kresources/exchange/dateset.h46
-rw-r--r--kresources/exchange/resourceexchange.cpp86
-rw-r--r--kresources/exchange/resourceexchange.h60
-rw-r--r--kresources/exchange/resourceexchangeconfig.cpp38
-rw-r--r--kresources/exchange/resourceexchangeconfig.h10
-rw-r--r--kresources/featureplan/benchmarkfeaturelist.cpp8
-rw-r--r--kresources/featureplan/dumpfeaturelist.cpp12
-rw-r--r--kresources/featureplan/kcal_resourcefeatureplan.cpp12
-rw-r--r--kresources/featureplan/kcal_resourcefeatureplanconfig.cpp16
-rw-r--r--kresources/featureplan/kcal_resourcefeatureplanconfig.h4
-rw-r--r--kresources/groupdav/groupdavaddressbookadaptor.h16
-rw-r--r--kresources/groupdav/groupdavcalendaradaptor.h16
-rw-r--r--kresources/groupdav/groupdavglobals.cpp62
-rw-r--r--kresources/groupdav/groupdavglobals.h14
-rw-r--r--kresources/groupdav/kabc_resourcegroupdav.h2
-rw-r--r--kresources/groupware/kabc_resourcegroupware.cpp56
-rw-r--r--kresources/groupware/kabc_resourcegroupware.h6
-rw-r--r--kresources/groupware/kabc_resourcegroupwareconfig.cpp42
-rw-r--r--kresources/groupware/kabc_resourcegroupwareconfig.h6
-rw-r--r--kresources/groupware/kcal_resourcegroupware.cpp32
-rw-r--r--kresources/groupware/kcal_resourcegroupware.h4
-rw-r--r--kresources/groupware/kcal_resourcegroupwareconfig.cpp16
-rw-r--r--kresources/groupware/kcal_resourcegroupwareconfig.h2
-rw-r--r--kresources/groupwise/groupwisesettingswidget.cpp10
-rw-r--r--kresources/groupwise/groupwisesettingswidget.h10
-rw-r--r--kresources/groupwise/kabc_resourcegroupwise.cpp110
-rw-r--r--kresources/groupwise/kabc_resourcegroupwise.h14
-rw-r--r--kresources/groupwise/kabc_resourcegroupwiseconfig.cpp42
-rw-r--r--kresources/groupwise/kabc_resourcegroupwiseconfig.h8
-rw-r--r--kresources/groupwise/kcal_groupwiseprefs.cpp2
-rw-r--r--kresources/groupwise/kcal_groupwiseprefs.h2
-rw-r--r--kresources/groupwise/kcal_resourcegroupwise.cpp36
-rw-r--r--kresources/groupwise/kcal_resourcegroupwise.h6
-rw-r--r--kresources/groupwise/kcal_resourcegroupwiseconfig.cpp40
-rw-r--r--kresources/groupwise/kcal_resourcegroupwiseconfig.h2
-rw-r--r--kresources/groupwise/kioslave/groupwise.cpp120
-rw-r--r--kresources/groupwise/kioslave/groupwise.h16
-rw-r--r--kresources/groupwise/soap/contactconverter.cpp48
-rw-r--r--kresources/groupwise/soap/contactconverter.h4
-rw-r--r--kresources/groupwise/soap/groupwiseserver.cpp86
-rw-r--r--kresources/groupwise/soap/groupwiseserver.h70
-rw-r--r--kresources/groupwise/soap/gwconverter.cpp72
-rw-r--r--kresources/groupwise/soap/gwconverter.h36
-rw-r--r--kresources/groupwise/soap/gwjobs.cpp26
-rw-r--r--kresources/groupwise/soap/gwjobs.h20
-rw-r--r--kresources/groupwise/soap/incidenceconverter.cpp44
-rw-r--r--kresources/groupwise/soap/incidenceconverter.h18
-rw-r--r--kresources/groupwise/soap/ksslsocket.cpp62
-rw-r--r--kresources/groupwise/soap/ksslsocket.h12
-rw-r--r--kresources/groupwise/soap/soapdebug.cpp16
-rw-r--r--kresources/groupwise/soap/stdsoap2.h2
-rw-r--r--kresources/kolab/kabc/contact.cpp296
-rw-r--r--kresources/kolab/kabc/contact.h300
-rw-r--r--kresources/kolab/kabc/resourcekolab.cpp140
-rw-r--r--kresources/kolab/kabc/resourcekolab.h54
-rw-r--r--kresources/kolab/kabc/resourcekolab_plugin.cpp2
-rw-r--r--kresources/kolab/kcal/event.cpp40
-rw-r--r--kresources/kolab/kcal/event.h30
-rw-r--r--kresources/kolab/kcal/incidence.cpp162
-rw-r--r--kresources/kolab/kcal/incidence.h94
-rw-r--r--kresources/kolab/kcal/journal.cpp42
-rw-r--r--kresources/kolab/kcal/journal.h36
-rw-r--r--kresources/kolab/kcal/resourcekolab.cpp194
-rw-r--r--kresources/kolab/kcal/resourcekolab.h98
-rw-r--r--kresources/kolab/kcal/resourcekolab_plugin.cpp2
-rw-r--r--kresources/kolab/kcal/task.cpp52
-rw-r--r--kresources/kolab/kcal/task.h38
-rw-r--r--kresources/kolab/knotes/note.cpp42
-rw-r--r--kresources/kolab/knotes/note.h34
-rw-r--r--kresources/kolab/knotes/resourcekolab.cpp88
-rw-r--r--kresources/kolab/knotes/resourcekolab.h42
-rw-r--r--kresources/kolab/knotes/resourcekolab_plugin.cpp2
-rw-r--r--kresources/kolab/shared/kmailconnection.cpp134
-rw-r--r--kresources/kolab/shared/kmailconnection.h84
-rw-r--r--kresources/kolab/shared/kolabbase.cpp120
-rw-r--r--kresources/kolab/shared/kolabbase.h94
-rw-r--r--kresources/kolab/shared/resourcekolabbase.cpp100
-rw-r--r--kresources/kolab/shared/resourcekolabbase.h108
-rw-r--r--kresources/kolab/shared/subresource.cpp14
-rw-r--r--kresources/kolab/shared/subresource.h26
-rw-r--r--kresources/lib/addressbookadaptor.cpp16
-rw-r--r--kresources/lib/addressbookadaptor.h18
-rw-r--r--kresources/lib/calendaradaptor.cpp16
-rw-r--r--kresources/lib/calendaradaptor.h24
-rw-r--r--kresources/lib/davaddressbookadaptor.cpp12
-rw-r--r--kresources/lib/davaddressbookadaptor.h6
-rw-r--r--kresources/lib/davcalendaradaptor.cpp14
-rw-r--r--kresources/lib/davcalendaradaptor.h6
-rw-r--r--kresources/lib/folderconfig.cpp42
-rw-r--r--kresources/lib/folderconfig.h4
-rw-r--r--kresources/lib/folderlister.cpp64
-rw-r--r--kresources/lib/folderlister.h32
-rw-r--r--kresources/lib/folderlistview.cpp66
-rw-r--r--kresources/lib/folderlistview.h34
-rw-r--r--kresources/lib/folderselectdialog.cpp30
-rw-r--r--kresources/lib/folderselectdialog.h10
-rw-r--r--kresources/lib/groupwaredataadaptor.cpp40
-rw-r--r--kresources/lib/groupwaredataadaptor.h112
-rw-r--r--kresources/lib/groupwaredownloadjob.cpp64
-rw-r--r--kresources/lib/groupwaredownloadjob.h24
-rw-r--r--kresources/lib/groupwareresourcejob.cpp10
-rw-r--r--kresources/lib/groupwareresourcejob.h10
-rw-r--r--kresources/lib/groupwareuploadjob.cpp102
-rw-r--r--kresources/lib/groupwareuploadjob.h26
-rw-r--r--kresources/lib/kabc_resourcegroupwarebase.cpp8
-rw-r--r--kresources/lib/kabc_resourcegroupwarebaseconfig.cpp24
-rw-r--r--kresources/lib/kabc_resourcegroupwarebaseconfig.h2
-rw-r--r--kresources/lib/kcal_cachesettingsdlg.cpp10
-rw-r--r--kresources/lib/kcal_cachesettingsdlg.h2
-rw-r--r--kresources/lib/kcal_resourcegroupwarebase.cpp32
-rw-r--r--kresources/lib/kcal_resourcegroupwarebaseconfig.cpp26
-rw-r--r--kresources/lib/kcal_resourcegroupwarebaseconfig.h2
-rw-r--r--kresources/lib/webdavhandler.cpp64
-rw-r--r--kresources/lib/webdavhandler.h52
-rw-r--r--kresources/newexchange/exchangeaddressbookadaptor.cpp4
-rw-r--r--kresources/newexchange/exchangeaddressbookadaptor.h18
-rw-r--r--kresources/newexchange/exchangecalendaradaptor.cpp22
-rw-r--r--kresources/newexchange/exchangecalendaradaptor.h22
-rw-r--r--kresources/newexchange/exchangeconvertercalendar.cpp152
-rw-r--r--kresources/newexchange/exchangeconvertercalendar.h28
-rw-r--r--kresources/newexchange/exchangeconvertercontact.cpp78
-rw-r--r--kresources/newexchange/exchangeconvertercontact.h20
-rw-r--r--kresources/newexchange/exchangeglobals.cpp70
-rw-r--r--kresources/newexchange/exchangeglobals.h16
-rw-r--r--kresources/newexchange/kabc_resourceexchange.h2
-rw-r--r--kresources/remote/resourceremote.cpp28
-rw-r--r--kresources/remote/resourceremote.h10
-rw-r--r--kresources/remote/resourceremoteconfig.cpp12
-rw-r--r--kresources/remote/resourceremoteconfig.h6
-rw-r--r--kresources/scalix/kabc/contact.cpp66
-rw-r--r--kresources/scalix/kabc/contact.h4
-rw-r--r--kresources/scalix/kabc/resourcescalix.cpp134
-rw-r--r--kresources/scalix/kabc/resourcescalix.h52
-rw-r--r--kresources/scalix/kabc/resourcescalix_plugin.cpp2
-rw-r--r--kresources/scalix/kcal/resourcescalix.cpp152
-rw-r--r--kresources/scalix/kcal/resourcescalix.h90
-rw-r--r--kresources/scalix/kcal/resourcescalix_plugin.cpp2
-rw-r--r--kresources/scalix/kioslave/scalix.cpp56
-rw-r--r--kresources/scalix/kioslave/scalix.h10
-rw-r--r--kresources/scalix/knotes/resourcescalix.cpp88
-rw-r--r--kresources/scalix/knotes/resourcescalix.h42
-rw-r--r--kresources/scalix/knotes/resourcescalix_plugin.cpp2
-rw-r--r--kresources/scalix/scalixadmin/delegatedialog.cpp34
-rw-r--r--kresources/scalix/scalixadmin/delegatedialog.h8
-rw-r--r--kresources/scalix/scalixadmin/delegatemanager.h4
-rw-r--r--kresources/scalix/scalixadmin/delegatepage.cpp32
-rw-r--r--kresources/scalix/scalixadmin/delegatepage.h10
-rw-r--r--kresources/scalix/scalixadmin/delegateview.cpp8
-rw-r--r--kresources/scalix/scalixadmin/delegateview.h2
-rw-r--r--kresources/scalix/scalixadmin/jobs.cpp130
-rw-r--r--kresources/scalix/scalixadmin/jobs.h54
-rw-r--r--kresources/scalix/scalixadmin/ldapdialog.cpp4
-rw-r--r--kresources/scalix/scalixadmin/ldapdialog.h4
-rw-r--r--kresources/scalix/scalixadmin/ldapview.cpp28
-rw-r--r--kresources/scalix/scalixadmin/ldapview.h8
-rw-r--r--kresources/scalix/scalixadmin/mainwindow.cpp6
-rw-r--r--kresources/scalix/scalixadmin/otherusermanager.cpp4
-rw-r--r--kresources/scalix/scalixadmin/otherusermanager.h10
-rw-r--r--kresources/scalix/scalixadmin/otheruserpage.cpp48
-rw-r--r--kresources/scalix/scalixadmin/otheruserpage.h8
-rw-r--r--kresources/scalix/scalixadmin/otheruserview.cpp18
-rw-r--r--kresources/scalix/scalixadmin/otheruserview.h4
-rw-r--r--kresources/scalix/scalixadmin/outofofficepage.cpp42
-rw-r--r--kresources/scalix/scalixadmin/outofofficepage.h14
-rw-r--r--kresources/scalix/scalixadmin/passwordpage.cpp48
-rw-r--r--kresources/scalix/scalixadmin/passwordpage.h10
-rw-r--r--kresources/scalix/scalixadmin/settings.cpp18
-rw-r--r--kresources/scalix/scalixadmin/settings.h14
-rw-r--r--kresources/scalix/shared/kmailconnection.cpp116
-rw-r--r--kresources/scalix/shared/kmailconnection.h64
-rw-r--r--kresources/scalix/shared/resourcescalixbase.cpp64
-rw-r--r--kresources/scalix/shared/resourcescalixbase.h94
-rw-r--r--kresources/scalix/shared/scalixbase.cpp120
-rw-r--r--kresources/scalix/shared/scalixbase.h94
-rw-r--r--kresources/scalix/shared/subresource.cpp12
-rw-r--r--kresources/scalix/shared/subresource.h24
-rw-r--r--kresources/slox/kabcresourceslox.cpp124
-rw-r--r--kresources/slox/kabcresourceslox.h18
-rw-r--r--kresources/slox/kabcresourcesloxconfig.cpp24
-rw-r--r--kresources/slox/kabcresourcesloxconfig.h6
-rw-r--r--kresources/slox/kcalresourceslox.cpp296
-rw-r--r--kresources/slox/kcalresourceslox.h40
-rw-r--r--kresources/slox/kcalresourcesloxconfig.cpp26
-rw-r--r--kresources/slox/kcalresourcesloxconfig.h8
-rw-r--r--kresources/slox/sloxaccounts.cpp64
-rw-r--r--kresources/slox/sloxaccounts.h14
-rw-r--r--kresources/slox/sloxbase.cpp12
-rw-r--r--kresources/slox/sloxbase.h10
-rw-r--r--kresources/slox/sloxfolder.cpp4
-rw-r--r--kresources/slox/sloxfolder.h14
-rw-r--r--kresources/slox/sloxfolderdialog.cpp24
-rw-r--r--kresources/slox/sloxfolderdialog.h10
-rw-r--r--kresources/slox/sloxfoldermanager.cpp48
-rw-r--r--kresources/slox/sloxfoldermanager.h10
-rw-r--r--kresources/slox/testsloxaccounts.cpp6
-rw-r--r--kresources/slox/webdavhandler.cpp104
-rw-r--r--kresources/slox/webdavhandler.h60
-rw-r--r--kresources/tvanytime/kcal_resourcetvanytime.cpp128
-rw-r--r--kresources/tvanytime/kcal_resourcetvanytime.h28
-rw-r--r--kresources/tvanytime/kcal_resourcetvanytimeconfig.cpp20
-rw-r--r--kresources/tvanytime/kcal_resourcetvanytimeconfig.h4
-rw-r--r--kresources/tvanytime/kcal_tvanytimeprefs.cpp2
-rw-r--r--kresources/tvanytime/kcal_tvanytimeprefs.h2
-rw-r--r--kresources/tvanytime/service.cpp88
-rw-r--r--kresources/tvanytime/service.h82
-rw-r--r--ktnef/gui/attachpropertydialog.cpp72
-rw-r--r--ktnef/gui/attachpropertydialog.h14
-rw-r--r--ktnef/gui/ktnefmain.cpp118
-rw-r--r--ktnef/gui/ktnefmain.h20
-rw-r--r--ktnef/gui/ktnefview.cpp42
-rw-r--r--ktnef/gui/ktnefview.h14
-rw-r--r--ktnef/gui/messagepropertydialog.cpp2
-rw-r--r--ktnef/gui/messagepropertydialog.h2
-rw-r--r--ktnef/gui/qwmf.cpp150
-rw-r--r--ktnef/gui/qwmf.h46
-rw-r--r--ktnef/ktnef/ktnefattach.h26
-rw-r--r--ktnef/ktnef/ktnefdefs.h2
-rw-r--r--ktnef/ktnef/ktnefmessage.h8
-rw-r--r--ktnef/ktnef/ktnefparser.h20
-rw-r--r--ktnef/ktnef/ktnefproperty.h20
-rw-r--r--ktnef/ktnef/ktnefpropertyset.h28
-rw-r--r--ktnef/ktnef/ktnefwriter.h36
-rw-r--r--ktnef/lib/ktnefattach.cpp30
-rw-r--r--ktnef/lib/ktnefmessage.cpp24
-rw-r--r--ktnef/lib/ktnefparser.cpp130
-rw-r--r--ktnef/lib/ktnefproperty.cpp30
-rw-r--r--ktnef/lib/ktnefpropertyset.cpp54
-rw-r--r--ktnef/lib/ktnefwriter.cpp122
-rw-r--r--ktnef/lib/lzfu.cpp4
-rw-r--r--ktnef/lib/lzfu.h2
-rw-r--r--ktnef/lib/mapi.cpp22
-rw-r--r--ktnef/lib/mapi.h6
-rw-r--r--ktnef/tests/parsertest.cpp18
-rw-r--r--libemailfunctions/email.cpp156
-rw-r--r--libemailfunctions/email.h58
-rw-r--r--libemailfunctions/idmapper.cpp64
-rw-r--r--libemailfunctions/idmapper.h40
-rw-r--r--libemailfunctions/networkstatus.cpp2
-rw-r--r--libemailfunctions/networkstatus.h4
-rw-r--r--libemailfunctions/tests/testemail.cpp72
-rw-r--r--libemailfunctions/tests/testidmapper.cpp4
-rw-r--r--libkcal/alarm.cpp92
-rw-r--r--libkcal/alarm.h86
-rw-r--r--libkcal/attachment.cpp26
-rw-r--r--libkcal/attachment.h24
-rw-r--r--libkcal/attendee.cpp26
-rw-r--r--libkcal/attendee.h38
-rw-r--r--libkcal/calendar.cpp54
-rw-r--r--libkcal/calendar.h104
-rw-r--r--libkcal/calendarlocal.cpp80
-rw-r--r--libkcal/calendarlocal.h42
-rw-r--r--libkcal/calendarnull.cpp4
-rw-r--r--libkcal/calendarnull.h28
-rw-r--r--libkcal/calendarresources.cpp74
-rw-r--r--libkcal/calendarresources.h76
-rw-r--r--libkcal/calfilter.cpp26
-rw-r--r--libkcal/calfilter.h24
-rw-r--r--libkcal/calformat.cpp16
-rw-r--r--libkcal/calformat.h30
-rw-r--r--libkcal/compat.cpp32
-rw-r--r--libkcal/compat.h10
-rw-r--r--libkcal/confirmsavedialog.cpp18
-rw-r--r--libkcal/confirmsavedialog.h4
-rw-r--r--libkcal/convertqtopia.cpp6
-rw-r--r--libkcal/customproperties.cpp40
-rw-r--r--libkcal/customproperties.h34
-rw-r--r--libkcal/dndfactory.cpp30
-rw-r--r--libkcal/dndfactory.h8
-rw-r--r--libkcal/dummyscheduler.cpp38
-rw-r--r--libkcal/dummyscheduler.h10
-rw-r--r--libkcal/duration.cpp4
-rw-r--r--libkcal/duration.h6
-rw-r--r--libkcal/event.cpp16
-rw-r--r--libkcal/event.h18
-rw-r--r--libkcal/exceptions.cpp10
-rw-r--r--libkcal/exceptions.h12
-rw-r--r--libkcal/filestorage.cpp12
-rw-r--r--libkcal/filestorage.h8
-rw-r--r--libkcal/freebusy.cpp32
-rw-r--r--libkcal/freebusy.h28
-rw-r--r--libkcal/freebusycache.h6
-rw-r--r--libkcal/freebusyurlstore.cpp6
-rw-r--r--libkcal/freebusyurlstore.h6
-rw-r--r--libkcal/htmlexport.cpp124
-rw-r--r--libkcal/htmlexport.h50
-rw-r--r--libkcal/icaldrag.cpp14
-rw-r--r--libkcal/icaldrag.h8
-rw-r--r--libkcal/icalformat.cpp76
-rw-r--r--libkcal/icalformat.h34
-rw-r--r--libkcal/icalformatimpl.cpp220
-rw-r--r--libkcal/icalformatimpl.h22
-rw-r--r--libkcal/imipscheduler.cpp6
-rw-r--r--libkcal/imipscheduler.h6
-rw-r--r--libkcal/incidence.cpp134
-rw-r--r--libkcal/incidence.h94
-rw-r--r--libkcal/incidencebase.cpp50
-rw-r--r--libkcal/incidencebase.h62
-rw-r--r--libkcal/incidenceformatter.cpp436
-rw-r--r--libkcal/incidenceformatter.h20
-rw-r--r--libkcal/journal.h2
-rw-r--r--libkcal/listbase.h26
-rw-r--r--libkcal/period.cpp16
-rw-r--r--libkcal/period.h26
-rw-r--r--libkcal/person.cpp18
-rw-r--r--libkcal/person.h20
-rw-r--r--libkcal/qtopiaformat.cpp118
-rw-r--r--libkcal/qtopiaformat.h10
-rw-r--r--libkcal/recurrence.cpp136
-rw-r--r--libkcal/recurrence.h82
-rw-r--r--libkcal/recurrencerule.cpp228
-rw-r--r--libkcal/recurrencerule.h118
-rw-r--r--libkcal/resourcecached.cpp80
-rw-r--r--libkcal/resourcecached.h62
-rw-r--r--libkcal/resourcecachedconfig.cpp68
-rw-r--r--libkcal/resourcecachedconfig.h14
-rw-r--r--libkcal/resourcecalendar.cpp28
-rw-r--r--libkcal/resourcecalendar.h76
-rw-r--r--libkcal/resourcelocal.cpp38
-rw-r--r--libkcal/resourcelocal.h14
-rw-r--r--libkcal/resourcelocalconfig.cpp24
-rw-r--r--libkcal/resourcelocalconfig.h12
-rw-r--r--libkcal/resourcelocaldir.cpp46
-rw-r--r--libkcal/resourcelocaldir.h6
-rw-r--r--libkcal/resourcelocaldirconfig.cpp10
-rw-r--r--libkcal/resourcelocaldirconfig.h12
-rw-r--r--libkcal/scheduler.cpp28
-rw-r--r--libkcal/scheduler.h22
-rw-r--r--libkcal/tests/fbrecurring.cpp20
-rw-r--r--libkcal/tests/readandwrite.cpp14
-rw-r--r--libkcal/tests/testcalendar.cpp2
-rw-r--r--libkcal/tests/testfb.cpp4
-rw-r--r--libkcal/tests/testfields.cpp20
-rw-r--r--libkcal/tests/testincidence.cpp8
-rw-r--r--libkcal/tests/testrecurprevious.cpp22
-rw-r--r--libkcal/tests/testrecurrence.cpp18
-rw-r--r--libkcal/tests/testrecurrencetype.cpp18
-rw-r--r--libkcal/tests/testrecurson.cpp20
-rw-r--r--libkcal/tests/testresource.cpp36
-rw-r--r--libkcal/tests/testresource.h8
-rw-r--r--libkcal/tests/testtostring.cpp2
-rw-r--r--libkcal/tests/testvcalexport.cpp14
-rw-r--r--libkcal/todo.cpp50
-rw-r--r--libkcal/todo.h42
-rw-r--r--libkcal/vcaldrag.cpp12
-rw-r--r--libkcal/vcaldrag.h8
-rw-r--r--libkcal/vcalformat.cpp188
-rw-r--r--libkcal/vcalformat.h28
-rw-r--r--libkdenetwork/gpgmepp/eventloopinteractor.h6
-rw-r--r--libkdenetwork/qgpgme/dataprovider.cpp6
-rw-r--r--libkdenetwork/qgpgme/dataprovider.h8
-rw-r--r--libkdenetwork/qgpgme/eventloopinteractor.cpp24
-rw-r--r--libkdenetwork/qgpgme/eventloopinteractor.h6
-rw-r--r--libkdenetwork/qgpgme/tests/dataprovidertest.cpp10
-rw-r--r--libkdepim/addresseediffalgo.cpp10
-rw-r--r--libkdepim/addresseediffalgo.h6
-rw-r--r--libkdepim/addresseeemailselection.cpp46
-rw-r--r--libkdepim/addresseeemailselection.h52
-rw-r--r--libkdepim/addresseelineedit.cpp300
-rw-r--r--libkdepim/addresseelineedit.h60
-rw-r--r--libkdepim/addresseeselector.cpp120
-rw-r--r--libkdepim/addresseeselector.h40
-rw-r--r--libkdepim/addresseeview.cpp280
-rw-r--r--libkdepim/addresseeview.h50
-rw-r--r--libkdepim/addressesdialog.cpp250
-rw-r--r--libkdepim/addressesdialog.h62
-rw-r--r--libkdepim/alarmclient.cpp6
-rw-r--r--libkdepim/broadcaststatus.cpp16
-rw-r--r--libkdepim/broadcaststatus.h18
-rw-r--r--libkdepim/calendardiffalgo.cpp32
-rw-r--r--libkdepim/calendardiffalgo.h2
-rw-r--r--libkdepim/categoryeditdialog.cpp56
-rw-r--r--libkdepim/categoryeditdialog.h2
-rw-r--r--libkdepim/categoryselectdialog.cpp50
-rw-r--r--libkdepim/categoryselectdialog.h14
-rw-r--r--libkdepim/cfgc/autoexample.cpp2
-rw-r--r--libkdepim/cfgc/example.cfg4
-rw-r--r--libkdepim/clicklineedit.cpp24
-rw-r--r--libkdepim/clicklineedit.h18
-rw-r--r--libkdepim/collectingprocess.cpp44
-rw-r--r--libkdepim/collectingprocess.h6
-rw-r--r--libkdepim/completionordereditor.cpp70
-rw-r--r--libkdepim/completionordereditor.h12
-rw-r--r--libkdepim/configmanager.cpp4
-rw-r--r--libkdepim/configmanager.h6
-rw-r--r--libkdepim/csshelper.cpp130
-rw-r--r--libkdepim/csshelper.h44
-rw-r--r--libkdepim/designerfields.cpp190
-rw-r--r--libkdepim/designerfields.h28
-rw-r--r--libkdepim/diffalgo.cpp26
-rw-r--r--libkdepim/diffalgo.h28
-rw-r--r--libkdepim/distributionlist.cpp62
-rw-r--r--libkdepim/distributionlist.h26
-rw-r--r--libkdepim/embeddedurlpage.cpp26
-rw-r--r--libkdepim/embeddedurlpage.h12
-rw-r--r--libkdepim/htmldiffalgodisplay.cpp34
-rw-r--r--libkdepim/htmldiffalgodisplay.h20
-rw-r--r--libkdepim/infoextension.cpp4
-rw-r--r--libkdepim/infoextension.h6
-rw-r--r--libkdepim/interfaces/AddressBookServiceIface.h6
-rw-r--r--libkdepim/interfaces/MailTransportServiceIface.h34
-rw-r--r--libkdepim/kabcresourcecached.cpp34
-rw-r--r--libkdepim/kabcresourcecached.h16
-rw-r--r--libkdepim/kaccount.cpp10
-rw-r--r--libkdepim/kaccount.h14
-rw-r--r--libkdepim/kaddrbook.cpp72
-rw-r--r--libkdepim/kaddrbook.h14
-rw-r--r--libkdepim/kcmdesignerfields.cpp168
-rw-r--r--libkdepim/kcmdesignerfields.h30
-rw-r--r--libkdepim/kconfigpropagator.cpp72
-rw-r--r--libkdepim/kconfigpropagator.h74
-rw-r--r--libkdepim/kconfigwizard.cpp44
-rw-r--r--libkdepim/kconfigwizard.h18
-rw-r--r--libkdepim/kdateedit.cpp102
-rw-r--r--libkdepim/kdateedit.h34
-rw-r--r--libkdepim/kdatepickerpopup.cpp40
-rw-r--r--libkdepim/kdatepickerpopup.h16
-rw-r--r--libkdepim/kfileio.cpp86
-rw-r--r--libkdepim/kfileio.h20
-rw-r--r--libkdepim/kfoldertree.cpp96
-rw-r--r--libkdepim/kfoldertree.h62
-rw-r--r--libkdepim/kimportdialog.cpp206
-rw-r--r--libkdepim/kimportdialog.h74
-rw-r--r--libkdepim/kincidencechooser.cpp112
-rw-r--r--libkdepim/kincidencechooser.h14
-rw-r--r--libkdepim/kmailcompletion.cpp34
-rw-r--r--libkdepim/kmailcompletion.h12
-rw-r--r--libkdepim/komposer/core/attachment.cpp32
-rw-r--r--libkdepim/komposer/core/attachment.h40
-rw-r--r--libkdepim/komposer/core/core.cpp70
-rw-r--r--libkdepim/komposer/core/core.h26
-rw-r--r--libkdepim/komposer/core/corewidget.cpp4
-rw-r--r--libkdepim/komposer/core/corewidget.h16
-rw-r--r--libkdepim/komposer/core/editor.cpp4
-rw-r--r--libkdepim/komposer/core/editor.h16
-rw-r--r--libkdepim/komposer/core/komposerIface.h20
-rw-r--r--libkdepim/komposer/core/plugin.cpp6
-rw-r--r--libkdepim/komposer/core/plugin.h8
-rw-r--r--libkdepim/komposer/core/pluginmanager.cpp132
-rw-r--r--libkdepim/komposer/core/pluginmanager.h40
-rw-r--r--libkdepim/komposer/core/prefsmodule.cpp36
-rw-r--r--libkdepim/komposer/core/prefsmodule.h18
-rw-r--r--libkdepim/komposer/core/tests/managertest.cpp4
-rw-r--r--libkdepim/komposer/core/tests/managertest.h6
-rw-r--r--libkdepim/komposer/core/tests/tester.cpp4
-rw-r--r--libkdepim/komposer/core/tests/tester.h10
-rw-r--r--libkdepim/komposer/core/tests/testfactory.h10
-rw-r--r--libkdepim/komposer/core/tests/testmanager.cpp16
-rw-r--r--libkdepim/komposer/core/tests/testmanager.h4
-rw-r--r--libkdepim/komposer/plugins/default/defaulteditor.cpp120
-rw-r--r--libkdepim/komposer/plugins/default/defaulteditor.h12
-rw-r--r--libkdepim/komposer/test/test.cpp2
-rw-r--r--libkdepim/kpartsdesignerplugin/kpartsdesignerplugin.cpp40
-rw-r--r--libkdepim/kpartsdesignerplugin/kpartsdesignerplugin.h42
-rw-r--r--libkdepim/kpimprefs.cpp36
-rw-r--r--libkdepim/kpimprefs.h16
-rw-r--r--libkdepim/kpimurlrequesterdlg.cpp4
-rw-r--r--libkdepim/kpimurlrequesterdlg.h10
-rw-r--r--libkdepim/kpixmapregionselectordialog.cpp50
-rw-r--r--libkdepim/kpixmapregionselectordialog.h12
-rw-r--r--libkdepim/kpixmapregionselectorwidget.cpp108
-rw-r--r--libkdepim/kpixmapregionselectorwidget.h40
-rw-r--r--libkdepim/kprefsdialog.cpp302
-rw-r--r--libkdepim/kprefsdialog.h176
-rw-r--r--libkdepim/kregexp3.cpp32
-rw-r--r--libkdepim/kregexp3.h26
-rw-r--r--libkdepim/kresourceprefs.cpp6
-rw-r--r--libkdepim/kresourceprefs.h4
-rw-r--r--libkdepim/krsqueezedtextlabel.cpp46
-rw-r--r--libkdepim/krsqueezedtextlabel.h20
-rw-r--r--libkdepim/kscoring.cpp248
-rw-r--r--libkdepim/kscoring.h238
-rw-r--r--libkdepim/kscoringeditor.cpp338
-rw-r--r--libkdepim/kscoringeditor.h88
-rw-r--r--libkdepim/ksubscription.cpp192
-rw-r--r--libkdepim/ksubscription.h76
-rw-r--r--libkdepim/ktimeedit.cpp84
-rw-r--r--libkdepim/ktimeedit.h30
-rw-r--r--libkdepim/kvcarddrag.cpp20
-rw-r--r--libkdepim/kvcarddrag.h16
-rw-r--r--libkdepim/kwidgetlister.cpp38
-rw-r--r--libkdepim/kwidgetlister.h24
-rw-r--r--libkdepim/kxface.cpp44
-rw-r--r--libkdepim/kxface.h8
-rw-r--r--libkdepim/ldapclient.cpp186
-rw-r--r--libkdepim/ldapclient.h116
-rw-r--r--libkdepim/ldapsearchdialog.cpp148
-rw-r--r--libkdepim/ldapsearchdialog.h22
-rw-r--r--libkdepim/linklocator.cpp136
-rw-r--r--libkdepim/linklocator.h28
-rw-r--r--libkdepim/maillistdrag.cpp84
-rw-r--r--libkdepim/maillistdrag.h40
-rw-r--r--libkdepim/overlaywidget.cpp22
-rw-r--r--libkdepim/overlaywidget.h16
-rw-r--r--libkdepim/pluginloader.h2
-rw-r--r--libkdepim/pluginloaderbase.cpp36
-rw-r--r--libkdepim/pluginloaderbase.h24
-rw-r--r--libkdepim/progressdialog.cpp156
-rw-r--r--libkdepim/progressdialog.h46
-rw-r--r--libkdepim/progressmanager.cpp58
-rw-r--r--libkdepim/progressmanager.h78
-rw-r--r--libkdepim/qutf7codec.cpp48
-rw-r--r--libkdepim/qutf7codec.h26
-rw-r--r--libkdepim/qutf7codecplugin.cpp24
-rw-r--r--libkdepim/recentaddresses.cpp34
-rw-r--r--libkdepim/recentaddresses.h12
-rw-r--r--libkdepim/resourceabc.h28
-rw-r--r--libkdepim/sendsmsdialog.cpp40
-rw-r--r--libkdepim/sendsmsdialog.h8
-rw-r--r--libkdepim/sidebarextension.cpp6
-rw-r--r--libkdepim/sidebarextension.h10
-rw-r--r--libkdepim/spellingfilter.cpp32
-rw-r--r--libkdepim/spellingfilter.h30
-rw-r--r--libkdepim/ssllabel.cpp18
-rw-r--r--libkdepim/ssllabel.h4
-rw-r--r--libkdepim/statusbarprogresswidget.cpp86
-rw-r--r--libkdepim/statusbarprogresswidget.h18
-rw-r--r--libkdepim/tests/test_kregexp.cpp4
-rw-r--r--libkdepim/tests/testdateedit.cpp14
-rw-r--r--libkdepim/tests/testdateedit.h6
-rw-r--r--libkdepim/tests/testdistrlist.cpp44
-rw-r--r--libkdepim/tests/testdistrlist.h4
-rw-r--r--libkdepim/tests/testlinklocator.cpp44
-rw-r--r--libkdepim/tests/testutf7decoder.cpp12
-rw-r--r--libkdepim/tests/testutf7encoder.cpp8
-rw-r--r--libkdepim/tests/testutf7encoder2.cpp16
-rw-r--r--libkdepim/tests/testwizard.cpp16
-rw-r--r--libkdepim/weaver.cpp58
-rw-r--r--libkdepim/weaver.h40
-rw-r--r--libkdepim/weaverextensions.cpp20
-rw-r--r--libkdepim/weaverextensions.h4
-rw-r--r--libkdepim/weaverlogger.cpp2
-rw-r--r--libkdepim/weaverlogger.h2
-rw-r--r--libkholidays/kholidays.cpp44
-rw-r--r--libkholidays/kholidays.h38
-rw-r--r--libkholidays/lunarphase.cpp26
-rw-r--r--libkholidays/lunarphase.h14
-rw-r--r--libkmime/CLASSTREE.headers14
-rw-r--r--libkmime/kmime_charfreq.cpp2
-rw-r--r--libkmime/kmime_charfreq.h4
-rw-r--r--libkmime/kmime_codec_identity.cpp8
-rw-r--r--libkmime/kmime_codec_identity.h10
-rw-r--r--libkmime/kmime_codec_qp.cpp2
-rw-r--r--libkmime/kmime_codecs.cpp52
-rw-r--r--libkmime/kmime_codecs.h48
-rw-r--r--libkmime/kmime_content.cpp80
-rw-r--r--libkmime/kmime_content.h38
-rw-r--r--libkmime/kmime_header_parsing.cpp190
-rw-r--r--libkmime/kmime_header_parsing.h48
-rw-r--r--libkmime/kmime_headers.cpp324
-rw-r--r--libkmime/kmime_headers.h234
-rw-r--r--libkmime/kmime_headers_obs.h186
-rw-r--r--libkmime/kmime_mdn.cpp46
-rw-r--r--libkmime/kmime_mdn.h22
-rw-r--r--libkmime/kmime_message.cpp4
-rw-r--r--libkmime/kmime_message.h2
-rw-r--r--libkmime/kmime_newsarticle.cpp4
-rw-r--r--libkmime/kmime_parsers.cpp34
-rw-r--r--libkmime/kmime_parsers.h46
-rw-r--r--libkmime/kmime_util.cpp128
-rw-r--r--libkmime/kmime_util.h90
-rw-r--r--libkmime/kmime_warning.h4
-rw-r--r--libkmime/kqcstringsplitter.cpp2
-rw-r--r--libkmime/kqcstringsplitter.h10
-rw-r--r--libkmime/tests/test_charfreq.cpp6
-rw-r--r--libkmime/tests/test_dates.cpp18
-rw-r--r--libkmime/tests/test_kmime_codec.cpp78
-rw-r--r--libkmime/tests/test_kmime_header_parsing.cpp64
-rw-r--r--libkmime/tests/test_mdn.cpp24
-rw-r--r--libkpgp/kpgp.cpp204
-rw-r--r--libkpgp/kpgp.h100
-rw-r--r--libkpgp/kpgpbase.cpp30
-rw-r--r--libkpgp/kpgpbase.h78
-rw-r--r--libkpgp/kpgpbase2.cpp62
-rw-r--r--libkpgp/kpgpbase5.cpp60
-rw-r--r--libkpgp/kpgpbase6.cpp50
-rw-r--r--libkpgp/kpgpbaseG.cpp56
-rw-r--r--libkpgp/kpgpblock.cpp22
-rw-r--r--libkpgp/kpgpblock.h86
-rw-r--r--libkpgp/kpgpkey.cpp24
-rw-r--r--libkpgp/kpgpkey.h80
-rw-r--r--libkpgp/kpgpui.cpp450
-rw-r--r--libkpgp/kpgpui.h126
-rw-r--r--libkpimexchange/core/exchangeaccount.cpp98
-rw-r--r--libkpimexchange/core/exchangeaccount.h60
-rw-r--r--libkpimexchange/core/exchangeclient.cpp96
-rw-r--r--libkpimexchange/core/exchangeclient.h56
-rw-r--r--libkpimexchange/core/exchangedelete.cpp28
-rw-r--r--libkpimexchange/core/exchangedelete.h14
-rw-r--r--libkpimexchange/core/exchangedownload.cpp186
-rw-r--r--libkpimexchange/core/exchangedownload.h38
-rw-r--r--libkpimexchange/core/exchangemonitor.cpp118
-rw-r--r--libkpimexchange/core/exchangemonitor.h32
-rw-r--r--libkpimexchange/core/exchangeprogress.cpp10
-rw-r--r--libkpimexchange/core/exchangeprogress.h2
-rw-r--r--libkpimexchange/core/exchangeupload.cpp86
-rw-r--r--libkpimexchange/core/exchangeupload.h16
-rw-r--r--libkpimexchange/core/utils.cpp20
-rw-r--r--libkpimexchange/core/utils.h12
-rw-r--r--libkpimidentities/identity.cpp120
-rw-r--r--libkpimidentities/identity.h160
-rw-r--r--libkpimidentities/identitycombo.cpp16
-rw-r--r--libkpimidentities/identitycombo.h16
-rw-r--r--libkpimidentities/identitymanager.cpp102
-rw-r--r--libkpimidentities/identitymanager.h46
-rw-r--r--libksieve/impl/lexer.h24
-rw-r--r--libksieve/impl/parser.h6
-rw-r--r--libksieve/ksieve/error.h12
-rw-r--r--libksieve/ksieve/lexer.h2
-rw-r--r--libksieve/ksieve/scriptbuilder.h14
-rw-r--r--libksieve/parser/lexer.cpp52
-rw-r--r--libksieve/parser/parser.cpp8
-rw-r--r--libksieve/parser/utf8validator.cpp4
-rw-r--r--libksieve/shared/error.cpp6
-rw-r--r--libksieve/tests/lexertest.cpp10
-rw-r--r--libksieve/tests/parsertest.cpp46
-rw-r--r--networkstatus/clientiface.h14
-rw-r--r--networkstatus/clientifaceimpl.cpp10
-rw-r--r--networkstatus/clientifaceimpl.h12
-rw-r--r--networkstatus/connectionmanager.cpp18
-rw-r--r--networkstatus/connectionmanager.h16
-rw-r--r--networkstatus/network.cpp8
-rw-r--r--networkstatus/network.h28
-rw-r--r--networkstatus/networkstatus.cpp50
-rw-r--r--networkstatus/networkstatus.h34
-rw-r--r--networkstatus/networkstatuscommon.cpp4
-rw-r--r--networkstatus/networkstatuscommon.h12
-rw-r--r--networkstatus/provideriface.h6
-rw-r--r--networkstatus/serviceiface.h8
-rw-r--r--networkstatus/serviceifaceimpl.cpp8
-rw-r--r--networkstatus/serviceifaceimpl.h8
-rw-r--r--networkstatus/testservice.cpp14
-rw-r--r--networkstatus/testservice.h8
-rw-r--r--plugins/kmail/bodypartformatter/attendeeselector.cpp22
-rw-r--r--plugins/kmail/bodypartformatter/attendeeselector.h6
-rw-r--r--plugins/kmail/bodypartformatter/delegateselector.cpp20
-rw-r--r--plugins/kmail/bodypartformatter/delegateselector.h6
-rw-r--r--plugins/kmail/bodypartformatter/text_calendar.cpp146
-rw-r--r--plugins/kmail/bodypartformatter/text_vcard.cpp20
-rw-r--r--plugins/kmail/bodypartformatter/text_xdiff.cpp34
-rw-r--r--wizards/egroupwarewizard.cpp48
-rw-r--r--wizards/egroupwarewizard.h4
-rw-r--r--wizards/exchangewizard.cpp30
-rw-r--r--wizards/exchangewizard.h6
-rw-r--r--wizards/groupwarewizard.cpp14
-rw-r--r--wizards/groupwarewizard.h4
-rw-r--r--wizards/groupwisewizard.cpp78
-rw-r--r--wizards/groupwisewizard.h16
-rw-r--r--wizards/kmailchanges.cpp42
-rw-r--r--wizards/kmailchanges.h38
-rw-r--r--wizards/kolabkmailchanges.cpp12
-rw-r--r--wizards/kolabwizard.cpp62
-rw-r--r--wizards/kolabwizard.h8
-rw-r--r--wizards/main.cpp2
-rw-r--r--wizards/overviewpage.cpp52
-rw-r--r--wizards/overviewpage.h4
-rw-r--r--wizards/scalixkmailchanges.cpp2
-rw-r--r--wizards/scalixwizard.cpp82
-rw-r--r--wizards/scalixwizard.h4
-rw-r--r--wizards/servertype.h26
-rw-r--r--wizards/servertypemanager.cpp12
-rw-r--r--wizards/servertypemanager.h14
-rw-r--r--wizards/sloxwizard.cpp32
-rw-r--r--wizards/sloxwizard.h6
2984 files changed, 72641 insertions, 72641 deletions
diff --git a/akregator/src/aboutdata.cpp b/akregator/src/aboutdata.cpp
index 93be34a2a..a2a747543 100644
--- a/akregator/src/aboutdata.cpp
+++ b/akregator/src/aboutdata.cpp
@@ -22,7 +22,7 @@
without including the source code for Qt in the source distribution.
*/
-#include <qstring.h>
+#include <tqstring.h>
#include "aboutdata.h"
diff --git a/akregator/src/actionmanager.cpp b/akregator/src/actionmanager.cpp
index 21d7f51eb..225f85d7f 100644
--- a/akregator/src/actionmanager.cpp
+++ b/akregator/src/actionmanager.cpp
@@ -43,7 +43,7 @@ void ActionManager::setInstance(ActionManager* manager)
}
-ActionManager::ActionManager(QObject* parent, const char* name) : QObject(parent, name), d(new ActionManagerPrivate)
+ActionManager::ActionManager(TQObject* parent, const char* name) : TQObject(parent, name), d(new ActionManagerPrivate)
{}
ActionManager::~ActionManager()
diff --git a/akregator/src/actionmanager.h b/akregator/src/actionmanager.h
index cae5985ca..045375d89 100644
--- a/akregator/src/actionmanager.h
+++ b/akregator/src/actionmanager.h
@@ -25,7 +25,7 @@
#ifndef AKREGATOR_ACTIONMANAGER_H
#define AKREGATOR_ACTIONMANAGER_H
-#include <qobject.h>
+#include <tqobject.h>
class QWidget;
@@ -43,11 +43,11 @@ class ActionManager : public QObject
static ActionManager* getInstance();
static void setInstance(ActionManager* manager);
- ActionManager(QObject* parent=0, const char* name=0);
+ ActionManager(TQObject* parent=0, const char* name=0);
virtual ~ActionManager();
virtual KAction* action(const char* name, const char* classname=0) = 0;
- virtual QWidget* container(const char* name) = 0;
+ virtual TQWidget* container(const char* name) = 0;
private:
diff --git a/akregator/src/actionmanagerimpl.cpp b/akregator/src/actionmanagerimpl.cpp
index a8b50fc76..c22e84185 100644
--- a/akregator/src/actionmanagerimpl.cpp
+++ b/akregator/src/actionmanagerimpl.cpp
@@ -22,7 +22,7 @@
without including the source code for Qt in the source distribution.
*/
-#include <qwidget.h>
+#include <tqwidget.h>
#include <kaction.h>
#include <kactioncollection.h>
#include <klocale.h>
@@ -30,9 +30,9 @@
#include <kshortcut.h>
#include <kxmlguifactory.h>
-#include <qmap.h>
-#include <qstring.h>
-#include <qvaluelist.h>
+#include <tqmap.h>
+#include <tqstring.h>
+#include <tqvaluelist.h>
#include "actionmanagerimpl.h"
#include "akregatorconfig.h"
@@ -134,19 +134,19 @@ public:
KActionMenu* tagMenu;
KActionCollection* actionCollection;
TagSet* tagSet;
- QMap<QString, TagAction*> tagActions;
+ TQMap<TQString, TagAction*> tagActions;
TabWidget* tabWidget;
KAction* speakSelectedArticlesAction;
};
-void ActionManagerImpl::slotUpdateTagActions(bool enabled, const QStringList& tagIds)
+void ActionManagerImpl::slotUpdateTagActions(bool enabled, const TQStringList& tagIds)
{
if (Settings::showTaggingGUI() && d->tagMenu)
{
d->tagMenu->setEnabled(enabled);
- QValueList<TagAction*> actions = d->tagActions.values();
+ TQValueList<TagAction*> actions = d->tagActions.values();
- for (QValueList<TagAction*>::ConstIterator it = actions.begin(); it != actions.end(); ++it)
+ for (TQValueList<TagAction*>::ConstIterator it = actions.begin(); it != actions.end(); ++it)
{
(*it)->setChecked(tagIds.contains((*it)->tag().id()));
}
@@ -160,20 +160,20 @@ void ActionManagerImpl::setTagSet(TagSet* tagSet)
if (d->tagSet != 0)
{
- disconnect(d->tagSet, SIGNAL(signalTagAdded(const Tag&)), this, SLOT(slotTagAdded(const Tag&)));
- disconnect(d->tagSet, SIGNAL(signalTagRemoved(const Tag&)), this, SLOT(slotTagRemoved(const Tag&)));
+ disconnect(d->tagSet, TQT_SIGNAL(signalTagAdded(const Tag&)), this, TQT_SLOT(slotTagAdded(const Tag&)));
+ disconnect(d->tagSet, TQT_SIGNAL(signalTagRemoved(const Tag&)), this, TQT_SLOT(slotTagRemoved(const Tag&)));
}
d->tagSet = tagSet;
if (tagSet != 0)
{
- connect(d->tagSet, SIGNAL(signalTagAdded(const Tag&)), this, SLOT(slotTagAdded(const Tag&)));
- connect(d->tagSet, SIGNAL(signalTagRemoved(const Tag&)), this, SLOT(slotTagRemoved(const Tag&)));
+ connect(d->tagSet, TQT_SIGNAL(signalTagAdded(const Tag&)), this, TQT_SLOT(slotTagAdded(const Tag&)));
+ connect(d->tagSet, TQT_SIGNAL(signalTagRemoved(const Tag&)), this, TQT_SLOT(slotTagRemoved(const Tag&)));
}
- QValueList<TagAction*> actions = d->tagActions.values();
- for (QValueList<TagAction*>::ConstIterator it = actions.begin(); it != actions.end(); ++it)
+ TQValueList<TagAction*> actions = d->tagActions.values();
+ for (TQValueList<TagAction*>::ConstIterator it = actions.begin(); it != actions.end(); ++it)
{
d->tagMenu->remove(*it);
delete *it;
@@ -186,8 +186,8 @@ void ActionManagerImpl::setTagSet(TagSet* tagSet)
if (tagSet != 0L)
{
- QValueList<Tag> list = tagSet->toMap().values();
- for (QValueList<Tag>::ConstIterator it = list.begin(); it != list.end(); ++it)
+ TQValueList<Tag> list = tagSet->toMap().values();
+ for (TQValueList<Tag>::ConstIterator it = list.begin(); it != list.end(); ++it)
slotTagAdded(*it);
}
}
@@ -199,7 +199,7 @@ void ActionManagerImpl::slotTagAdded(const Tag& tag)
if (!d->tagActions.contains(tag.id()))
{
- d->tagActions[tag.id()] = new TagAction(tag, d->view, SLOT(slotAssignTag(const Tag&, bool)), d->tagMenu);
+ d->tagActions[tag.id()] = new TagAction(tag, d->view, TQT_SLOT(slotAssignTag(const Tag&, bool)), d->tagMenu);
d->tagMenu->insert(d->tagActions[tag.id()]);
}
}
@@ -209,7 +209,7 @@ void ActionManagerImpl::slotTagRemoved(const Tag& tag)
if (!Settings::showTaggingGUI())
return;
- QString id = tag.id();
+ TQString id = tag.id();
TagAction* action = d->tagActions[id];
d->tagMenu->remove(action);
d->tagActions.remove(id);
@@ -222,7 +222,7 @@ void ActionManagerImpl::slotNodeSelected(TreeNode* node)
d->nodeSelectVisitor->visit(node);
}
-ActionManagerImpl::ActionManagerImpl(Part* part, QObject* parent, const char* name) : ActionManager(parent, name), d(new ActionManagerImplPrivate)
+ActionManagerImpl::ActionManagerImpl(Part* part, TQObject* parent, const char* name) : ActionManager(parent, name), d(new ActionManagerImplPrivate)
{
d->nodeSelectVisitor = new NodeSelectVisitor(this);
d->part = part;
@@ -262,15 +262,15 @@ void ActionManagerImpl::initTrayIcon(TrayIcon* trayIcon)
void ActionManagerImpl::initPart()
{
- new KAction(i18n("&Import Feeds..."), "", "", d->part, SLOT(fileImport()), d->actionCollection, "file_import");
- new KAction(i18n("&Export Feeds..."), "", "", d->part, SLOT(fileExport()), d->actionCollection, "file_export");
- //new KAction(i18n("&Get Feeds From Web..."), "", "", d->part, SLOT(fileGetFeeds()), d->actionCollection, "file_getfromweb");
+ new KAction(i18n("&Import Feeds..."), "", "", d->part, TQT_SLOT(fileImport()), d->actionCollection, "file_import");
+ new KAction(i18n("&Export Feeds..."), "", "", d->part, TQT_SLOT(fileExport()), d->actionCollection, "file_export");
+ //new KAction(i18n("&Get Feeds From Web..."), "", "", d->part, TQT_SLOT(fileGetFeeds()), d->actionCollection, "file_getfromweb");
- new KAction(i18n("Send &Link Address..."), "mail_generic", "", d->part, SLOT(fileSendLink()), d->actionCollection, "file_sendlink");
- new KAction(i18n("Send &File..."), "mail_generic", "", d->part, SLOT(fileSendFile()), d->actionCollection, "file_sendfile");
+ new KAction(i18n("Send &Link Address..."), "mail_generic", "", d->part, TQT_SLOT(fileSendLink()), d->actionCollection, "file_sendlink");
+ new KAction(i18n("Send &File..."), "mail_generic", "", d->part, TQT_SLOT(fileSendFile()), d->actionCollection, "file_sendfile");
- KStdAction::configureNotifications(d->part, SLOT(showKNotifyOptions()), d->actionCollection); // options_configure_notifications
- new KAction( i18n("Configure &Akregator..."), "configure", "", d->part, SLOT(showOptions()), d->actionCollection, "akregator_configure_akregator" );
+ KStdAction::configureNotifications(d->part, TQT_SLOT(showKNotifyOptions()), d->actionCollection); // options_configure_notifications
+ new KAction( i18n("Configure &Akregator..."), "configure", "", d->part, TQT_SLOT(showOptions()), d->actionCollection, "akregator_configure_akregator" );
}
void ActionManagerImpl::initView(View* view)
@@ -281,51 +281,51 @@ void ActionManagerImpl::initView(View* view)
d->view = view;
// tag actions
- new KAction(i18n("&New Tag..."), "", "", d->view, SLOT(slotNewTag()), actionCollection(), "tag_new");
+ new KAction(i18n("&New Tag..."), "", "", d->view, TQT_SLOT(slotNewTag()), actionCollection(), "tag_new");
// Feed/Feed Group popup menu
- new KAction(i18n("&Open Homepage"), "", "Ctrl+H", d->view, SLOT(slotOpenHomepage()), actionCollection(), "feed_homepage");
- new KAction(i18n("&Add Feed..."), "bookmark_add", "Insert", d->view, SLOT(slotFeedAdd()), actionCollection(), "feed_add");
- new KAction(i18n("Ne&w Folder..."), "folder_new", "Shift+Insert", d->view, SLOT(slotFeedAddGroup()), actionCollection(), "feed_add_group");
- new KAction(i18n("&Delete Feed"), "editdelete", "Alt+Delete", d->view, SLOT(slotFeedRemove()), actionCollection(), "feed_remove");
- new KAction(i18n("&Edit Feed..."), "edit", "F2", d->view, SLOT(slotFeedModify()), actionCollection(), "feed_modify");
+ new KAction(i18n("&Open Homepage"), "", "Ctrl+H", d->view, TQT_SLOT(slotOpenHomepage()), actionCollection(), "feed_homepage");
+ new KAction(i18n("&Add Feed..."), "bookmark_add", "Insert", d->view, TQT_SLOT(slotFeedAdd()), actionCollection(), "feed_add");
+ new KAction(i18n("Ne&w Folder..."), "folder_new", "Shift+Insert", d->view, TQT_SLOT(slotFeedAddGroup()), actionCollection(), "feed_add_group");
+ new KAction(i18n("&Delete Feed"), "editdelete", "Alt+Delete", d->view, TQT_SLOT(slotFeedRemove()), actionCollection(), "feed_remove");
+ new KAction(i18n("&Edit Feed..."), "edit", "F2", d->view, TQT_SLOT(slotFeedModify()), actionCollection(), "feed_modify");
KActionMenu* vm = new KActionMenu( i18n( "&View Mode" ), actionCollection(), "view_mode" );
- KRadioAction *ra = new KRadioAction(i18n("&Normal View"), "view_top_bottom", "Ctrl+Shift+1", d->view, SLOT(slotNormalView()), actionCollection(), "normal_view");
+ KRadioAction *ra = new KRadioAction(i18n("&Normal View"), "view_top_bottom", "Ctrl+Shift+1", d->view, TQT_SLOT(slotNormalView()), actionCollection(), "normal_view");
ra->setExclusiveGroup( "ViewMode" );
vm->insert(ra);
- ra = new KRadioAction(i18n("&Widescreen View"), "view_left_right", "Ctrl+Shift+2", d->view, SLOT(slotWidescreenView()), actionCollection(), "widescreen_view");
+ ra = new KRadioAction(i18n("&Widescreen View"), "view_left_right", "Ctrl+Shift+2", d->view, TQT_SLOT(slotWidescreenView()), actionCollection(), "widescreen_view");
ra->setExclusiveGroup( "ViewMode" );
vm->insert(ra);
- ra = new KRadioAction(i18n("C&ombined View"), "view_text", "Ctrl+Shift+3", d->view, SLOT(slotCombinedView()), actionCollection(), "combined_view");
+ ra = new KRadioAction(i18n("C&ombined View"), "view_text", "Ctrl+Shift+3", d->view, TQT_SLOT(slotCombinedView()), actionCollection(), "combined_view");
ra->setExclusiveGroup( "ViewMode" );
vm->insert(ra);
// toolbar / feed menu
- new KAction(i18n("&Fetch Feed"), "down", KStdAccel::shortcut(KStdAccel::Reload), d->view, SLOT(slotFetchCurrentFeed()), actionCollection(), "feed_fetch");
- new KAction(i18n("Fe&tch All Feeds"), "bottom", "Ctrl+L", d->view, SLOT(slotFetchAllFeeds()), actionCollection(), "feed_fetch_all");
+ new KAction(i18n("&Fetch Feed"), "down", KStdAccel::shortcut(KStdAccel::Reload), d->view, TQT_SLOT(slotFetchCurrentFeed()), actionCollection(), "feed_fetch");
+ new KAction(i18n("Fe&tch All Feeds"), "bottom", "Ctrl+L", d->view, TQT_SLOT(slotFetchAllFeeds()), actionCollection(), "feed_fetch_all");
- KAction* stopAction = new KAction(i18n( "&Abort Fetches" ), "stop", Key_Escape, Kernel::self()->fetchQueue(), SLOT(slotAbort()), actionCollection(), "feed_stop");
+ KAction* stopAction = new KAction(i18n( "&Abort Fetches" ), "stop", Key_Escape, Kernel::self()->fetchQueue(), TQT_SLOT(slotAbort()), actionCollection(), "feed_stop");
stopAction->setEnabled(false);
- new KAction(i18n("&Mark Feed as Read"), "goto", "Ctrl+R", d->view, SLOT(slotMarkAllRead()), actionCollection(), "feed_mark_all_as_read");
- new KAction(i18n("Ma&rk All Feeds as Read"), "goto", "Ctrl+Shift+R", d->view, SLOT(slotMarkAllFeedsRead()), actionCollection(), "feed_mark_all_feeds_as_read");
+ new KAction(i18n("&Mark Feed as Read"), "goto", "Ctrl+R", d->view, TQT_SLOT(slotMarkAllRead()), actionCollection(), "feed_mark_all_as_read");
+ new KAction(i18n("Ma&rk All Feeds as Read"), "goto", "Ctrl+Shift+R", d->view, TQT_SLOT(slotMarkAllFeedsRead()), actionCollection(), "feed_mark_all_feeds_as_read");
// Settings menu
- KToggleAction* sqf = new KToggleAction(i18n("Show Quick Filter"), QString::null, 0, d->view, SLOT(slotToggleShowQuickFilter()), actionCollection(), "show_quick_filter");
+ KToggleAction* sqf = new KToggleAction(i18n("Show Quick Filter"), TQString::null, 0, d->view, TQT_SLOT(slotToggleShowQuickFilter()), actionCollection(), "show_quick_filter");
sqf->setChecked( Settings::showQuickFilter() );
- new KAction( i18n("Open in Tab"), "tab_new", "Shift+Return", d->view, SLOT(slotOpenCurrentArticle()), actionCollection(), "article_open" );
- new KAction( i18n("Open in Background Tab"), QString::null, "tab_new", d->view, SLOT(slotOpenCurrentArticleBackgroundTab()), actionCollection(), "article_open_background_tab" );
- new KAction( i18n("Open in External Browser"), "window_new", "Ctrl+Shift+Return", d->view, SLOT(slotOpenCurrentArticleExternal()), actionCollection(), "article_open_external" );
- new KAction( i18n("Copy Link Address"), QString::null, QString::null, d->view, SLOT(slotCopyLinkAddress()), actionCollection(), "article_copy_link_address" );
+ new KAction( i18n("Open in Tab"), "tab_new", "Shift+Return", d->view, TQT_SLOT(slotOpenCurrentArticle()), actionCollection(), "article_open" );
+ new KAction( i18n("Open in Background Tab"), TQString::null, "tab_new", d->view, TQT_SLOT(slotOpenCurrentArticleBackgroundTab()), actionCollection(), "article_open_background_tab" );
+ new KAction( i18n("Open in External Browser"), "window_new", "Ctrl+Shift+Return", d->view, TQT_SLOT(slotOpenCurrentArticleExternal()), actionCollection(), "article_open_external" );
+ new KAction( i18n("Copy Link Address"), TQString::null, TQString::null, d->view, TQT_SLOT(slotCopyLinkAddress()), actionCollection(), "article_copy_link_address" );
- new KAction(i18n("Pre&vious Unread Article"), "", Key_Minus, d->view, SLOT(slotPrevUnreadArticle()),actionCollection(), "go_prev_unread_article");
- new KAction(i18n("Ne&xt Unread Article"), "", Key_Plus, d->view, SLOT(slotNextUnreadArticle()),actionCollection(), "go_next_unread_article");
+ new KAction(i18n("Pre&vious Unread Article"), "", Key_Minus, d->view, TQT_SLOT(slotPrevUnreadArticle()),actionCollection(), "go_prev_unread_article");
+ new KAction(i18n("Ne&xt Unread Article"), "", Key_Plus, d->view, TQT_SLOT(slotNextUnreadArticle()),actionCollection(), "go_next_unread_article");
- new KAction(i18n("&Delete"), "editdelete", "Delete", d->view, SLOT(slotArticleDelete()), actionCollection(), "article_delete");
+ new KAction(i18n("&Delete"), "editdelete", "Delete", d->view, TQT_SLOT(slotArticleDelete()), actionCollection(), "article_delete");
if (Settings::showTaggingGUI())
{
@@ -335,39 +335,39 @@ void ActionManagerImpl::initView(View* view)
KActionMenu* statusMenu = new KActionMenu ( i18n( "&Mark As" ),
actionCollection(), "article_set_status" );
- d->speakSelectedArticlesAction = new KAction(i18n("&Speak Selected Articles"), "kttsd", "", d->view, SLOT(slotTextToSpeechRequest()), actionCollection(), "akr_texttospeech");
+ d->speakSelectedArticlesAction = new KAction(i18n("&Speak Selected Articles"), "kttsd", "", d->view, TQT_SLOT(slotTextToSpeechRequest()), actionCollection(), "akr_texttospeech");
- KAction* abortTTS = new KAction(i18n( "&Stop Speaking" ), "player_stop", Key_Escape, SpeechClient::self(), SLOT(slotAbortJobs()), actionCollection(), "akr_aborttexttospeech");
+ KAction* abortTTS = new KAction(i18n( "&Stop Speaking" ), "player_stop", Key_Escape, SpeechClient::self(), TQT_SLOT(slotAbortJobs()), actionCollection(), "akr_aborttexttospeech");
abortTTS->setEnabled(false);
- connect(SpeechClient::self(), SIGNAL(signalActivated(bool)),
- abortTTS, SLOT(setEnabled(bool)));
+ connect(SpeechClient::self(), TQT_SIGNAL(signalActivated(bool)),
+ abortTTS, TQT_SLOT(setEnabled(bool)));
statusMenu->insert(new KAction(KGuiItem(i18n("as in: mark as read","&Read"), "",
i18n("Mark selected article as read")),
- "Ctrl+E", d->view, SLOT(slotSetSelectedArticleRead()),
+ "Ctrl+E", d->view, TQT_SLOT(slotSetSelectedArticleRead()),
actionCollection(), "article_set_status_read"));
statusMenu->insert(new KAction(KGuiItem(i18n("&New"), "",
i18n("Mark selected article as new")),
- "Ctrl+N", d->view, SLOT(slotSetSelectedArticleNew()),
+ "Ctrl+N", d->view, TQT_SLOT(slotSetSelectedArticleNew()),
actionCollection(), "article_set_status_new" ));
statusMenu->insert(new KAction(KGuiItem(i18n("&Unread"), "",
i18n("Mark selected article as unread")),
- "Ctrl+U", d->view, SLOT(slotSetSelectedArticleUnread()),
+ "Ctrl+U", d->view, TQT_SLOT(slotSetSelectedArticleUnread()),
actionCollection(), "article_set_status_unread"));
KToggleAction* importantAction = new KToggleAction(i18n("&Mark as Important"), "flag", "Ctrl+I", actionCollection(), "article_set_status_important");
importantAction->setCheckedState(i18n("Remove &Important Mark"));
- connect(importantAction, SIGNAL(toggled(bool)), d->view, SLOT(slotArticleToggleKeepFlag(bool)));
+ connect(importantAction, TQT_SIGNAL(toggled(bool)), d->view, TQT_SLOT(slotArticleToggleKeepFlag(bool)));
- new KAction( i18n("Move Node Up"), QString::null, "Shift+Alt+Up", view, SLOT(slotMoveCurrentNodeUp()), d->actionCollection, "feedstree_move_up" );
- new KAction( i18n("Move Node Down"), QString::null, "Shift+Alt+Down", view, SLOT(slotMoveCurrentNodeDown()), d->actionCollection, "feedstree_move_down" );
- new KAction( i18n("Move Node Left"), QString::null, "Shift+Alt+Left", view, SLOT(slotMoveCurrentNodeLeft()), d->actionCollection, "feedstree_move_left" );
- new KAction( i18n("Move Node Right"), QString::null, "Shift+Alt+Right", view, SLOT(slotMoveCurrentNodeRight()), d->actionCollection, "feedstree_move_right");
+ new KAction( i18n("Move Node Up"), TQString::null, "Shift+Alt+Up", view, TQT_SLOT(slotMoveCurrentNodeUp()), d->actionCollection, "feedstree_move_up" );
+ new KAction( i18n("Move Node Down"), TQString::null, "Shift+Alt+Down", view, TQT_SLOT(slotMoveCurrentNodeDown()), d->actionCollection, "feedstree_move_down" );
+ new KAction( i18n("Move Node Left"), TQString::null, "Shift+Alt+Left", view, TQT_SLOT(slotMoveCurrentNodeLeft()), d->actionCollection, "feedstree_move_left" );
+ new KAction( i18n("Move Node Right"), TQString::null, "Shift+Alt+Right", view, TQT_SLOT(slotMoveCurrentNodeRight()), d->actionCollection, "feedstree_move_right");
}
void ActionManagerImpl::initArticleViewer(ArticleViewer* articleViewer)
@@ -385,8 +385,8 @@ void ActionManagerImpl::initArticleListView(ArticleListView* articleList)
else
d->articleList = articleList;
- new KAction( i18n("&Previous Article"), QString::null, "Left", articleList, SLOT(slotPreviousArticle()), actionCollection(), "go_previous_article" );
- new KAction( i18n("&Next Article"), QString::null, "Right", articleList, SLOT(slotNextArticle()), actionCollection(), "go_next_article" );
+ new KAction( i18n("&Previous Article"), TQString::null, "Left", articleList, TQT_SLOT(slotPreviousArticle()), actionCollection(), "go_previous_article" );
+ new KAction( i18n("&Next Article"), TQString::null, "Right", articleList, TQT_SLOT(slotNextArticle()), actionCollection(), "go_next_article" );
}
void ActionManagerImpl::initListTabWidget(ListTabWidget* listTabWidget)
@@ -396,17 +396,17 @@ void ActionManagerImpl::initListTabWidget(ListTabWidget* listTabWidget)
else
d->listTabWidget = listTabWidget;
- new KAction(i18n("&Previous Feed"), "", "P", listTabWidget, SLOT(slotPrevFeed()),actionCollection(), "go_prev_feed");
- new KAction(i18n("&Next Feed"), "", "N", listTabWidget, SLOT(slotNextFeed()),actionCollection(), "go_next_feed");
- new KAction(i18n("N&ext Unread Feed"), "", "Alt+Plus", listTabWidget, SLOT(slotNextUnreadFeed()),actionCollection(), "go_next_unread_feed");
- new KAction(i18n("Prev&ious Unread Feed"), "", "Alt+Minus", listTabWidget, SLOT(slotPrevUnreadFeed()),actionCollection(), "go_prev_unread_feed");
-
- new KAction( i18n("Go to Top of Tree"), QString::null, "Ctrl+Home", listTabWidget, SLOT(slotItemBegin()), d->actionCollection, "feedstree_home" );
- new KAction( i18n("Go to Bottom of Tree"), QString::null, "Ctrl+End", listTabWidget, SLOT(slotItemEnd()), d->actionCollection, "feedstree_end" );
- new KAction( i18n("Go Left in Tree"), QString::null, "Ctrl+Left", listTabWidget, SLOT(slotItemLeft()), d->actionCollection, "feedstree_left" );
- new KAction( i18n("Go Right in Tree"), QString::null, "Ctrl+Right", listTabWidget, SLOT(slotItemRight()), d->actionCollection, "feedstree_right" );
- new KAction( i18n("Go Up in Tree"), QString::null, "Ctrl+Up", listTabWidget, SLOT(slotItemUp()), d->actionCollection, "feedstree_up" );
- new KAction( i18n("Go Down in Tree"), QString::null, "Ctrl+Down", listTabWidget, SLOT(slotItemDown()), d->actionCollection, "feedstree_down" );
+ new KAction(i18n("&Previous Feed"), "", "P", listTabWidget, TQT_SLOT(slotPrevFeed()),actionCollection(), "go_prev_feed");
+ new KAction(i18n("&Next Feed"), "", "N", listTabWidget, TQT_SLOT(slotNextFeed()),actionCollection(), "go_next_feed");
+ new KAction(i18n("N&ext Unread Feed"), "", "Alt+Plus", listTabWidget, TQT_SLOT(slotNextUnreadFeed()),actionCollection(), "go_next_unread_feed");
+ new KAction(i18n("Prev&ious Unread Feed"), "", "Alt+Minus", listTabWidget, TQT_SLOT(slotPrevUnreadFeed()),actionCollection(), "go_prev_unread_feed");
+
+ new KAction( i18n("Go to Top of Tree"), TQString::null, "Ctrl+Home", listTabWidget, TQT_SLOT(slotItemBegin()), d->actionCollection, "feedstree_home" );
+ new KAction( i18n("Go to Bottom of Tree"), TQString::null, "Ctrl+End", listTabWidget, TQT_SLOT(slotItemEnd()), d->actionCollection, "feedstree_end" );
+ new KAction( i18n("Go Left in Tree"), TQString::null, "Ctrl+Left", listTabWidget, TQT_SLOT(slotItemLeft()), d->actionCollection, "feedstree_left" );
+ new KAction( i18n("Go Right in Tree"), TQString::null, "Ctrl+Right", listTabWidget, TQT_SLOT(slotItemRight()), d->actionCollection, "feedstree_right" );
+ new KAction( i18n("Go Up in Tree"), TQString::null, "Ctrl+Up", listTabWidget, TQT_SLOT(slotItemUp()), d->actionCollection, "feedstree_up" );
+ new KAction( i18n("Go Down in Tree"), TQString::null, "Ctrl+Down", listTabWidget, TQT_SLOT(slotItemDown()), d->actionCollection, "feedstree_down" );
}
void ActionManagerImpl::initTabWidget(TabWidget* tabWidget)
@@ -416,14 +416,14 @@ void ActionManagerImpl::initTabWidget(TabWidget* tabWidget)
else
d->tabWidget = tabWidget;
- new KAction(i18n("Select Next Tab"), "", "Ctrl+Period", d->tabWidget, SLOT(slotNextTab()),actionCollection(), "select_next_tab");
- new KAction(i18n("Select Previous Tab"), "", "Ctrl+Comma", d->tabWidget, SLOT(slotPreviousTab()),actionCollection(), "select_previous_tab");
- new KAction( i18n("Detach Tab"), "tab_breakoff", CTRL+SHIFT+Key_B, d->tabWidget, SLOT(slotDetachTab()), actionCollection(), "tab_detach" );
- new KAction( i18n("Copy Link Address"), QString::null, QString::null, d->tabWidget, SLOT(slotCopyLinkAddress()), actionCollection(), "tab_copylinkaddress" );
- new KAction( i18n("&Close Tab"), "tab_remove", KStdAccel::close(), d->tabWidget, SLOT(slotCloseTab()), actionCollection(), "tab_remove" );
+ new KAction(i18n("Select Next Tab"), "", "Ctrl+Period", d->tabWidget, TQT_SLOT(slotNextTab()),actionCollection(), "select_next_tab");
+ new KAction(i18n("Select Previous Tab"), "", "Ctrl+Comma", d->tabWidget, TQT_SLOT(slotPreviousTab()),actionCollection(), "select_previous_tab");
+ new KAction( i18n("Detach Tab"), "tab_breakoff", CTRL+SHIFT+Key_B, d->tabWidget, TQT_SLOT(slotDetachTab()), actionCollection(), "tab_detach" );
+ new KAction( i18n("Copy Link Address"), TQString::null, TQString::null, d->tabWidget, TQT_SLOT(slotCopyLinkAddress()), actionCollection(), "tab_copylinkaddress" );
+ new KAction( i18n("&Close Tab"), "tab_remove", KStdAccel::close(), d->tabWidget, TQT_SLOT(slotCloseTab()), actionCollection(), "tab_remove" );
}
-QWidget* ActionManagerImpl::container(const char* name)
+TQWidget* ActionManagerImpl::container(const char* name)
{
return d->part->factory()->container(name, d->part);
}
diff --git a/akregator/src/actionmanagerimpl.h b/akregator/src/actionmanagerimpl.h
index eefa3525e..ecf964780 100644
--- a/akregator/src/actionmanagerimpl.h
+++ b/akregator/src/actionmanagerimpl.h
@@ -52,11 +52,11 @@ class ActionManagerImpl : public ActionManager
Q_OBJECT
public:
- ActionManagerImpl(Part* part, QObject* parent=0, const char* name=0);
+ ActionManagerImpl(Part* part, TQObject* parent=0, const char* name=0);
virtual ~ActionManagerImpl();
virtual KAction* action(const char* name, const char* classname=0);
- virtual QWidget* container(const char* name);
+ virtual TQWidget* container(const char* name);
void initView(View* view);
void initTrayIcon(TrayIcon* trayIcon);
@@ -70,7 +70,7 @@ class ActionManagerImpl : public ActionManager
/** fills the remove tag menu with the given tags
enables/disables tag menu action according to @c enabled */
- void slotUpdateTagActions(bool enabled, const QStringList& tagIds);
+ void slotUpdateTagActions(bool enabled, const TQStringList& tagIds);
void slotNodeSelected(TreeNode* node);
diff --git a/akregator/src/addfeeddialog.cpp b/akregator/src/addfeeddialog.cpp
index c6fa6be18..cc10844b5 100644
--- a/akregator/src/addfeeddialog.cpp
+++ b/akregator/src/addfeeddialog.cpp
@@ -25,7 +25,7 @@
#include "feed.h"
#include "addfeeddialog.h"
-#include <qcheckbox.h>
+#include <tqcheckbox.h>
#include <kapplication.h>
#include <kurl.h>
@@ -39,21 +39,21 @@
namespace Akregator {
-AddFeedWidget::AddFeedWidget(QWidget *parent, const char *name)
+AddFeedWidget::AddFeedWidget(TQWidget *parent, const char *name)
: AddFeedWidgetBase(parent, name)
{
pixmapLabel1->setPixmap(kapp->iconLoader()->loadIcon( "package_network",KIcon::Desktop,KIcon::SizeHuge, KIcon::DefaultState, 0, true));
- statusLabel->setText(QString::null);
+ statusLabel->setText(TQString::null);
}
AddFeedWidget::~AddFeedWidget()
{}
-AddFeedDialog::AddFeedDialog(QWidget *parent, const char *name)
+AddFeedDialog::AddFeedDialog(TQWidget *parent, const char *name)
: KDialogBase(KDialogBase::Swallow, Qt::WStyle_DialogBorder, parent, name, true, i18n("Add Feed"), KDialogBase::Ok|KDialogBase::Cancel)
{
widget = new AddFeedWidget(this);
- connect(widget->urlEdit, SIGNAL(textChanged(const QString&)), this, SLOT(textChanged(const QString&)));
+ connect(widget->urlEdit, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(textChanged(const TQString&)));
enableButtonOK(false);
setMainWidget(widget);
}
@@ -61,7 +61,7 @@ AddFeedDialog::AddFeedDialog(QWidget *parent, const char *name)
AddFeedDialog::~AddFeedDialog()
{}
-void AddFeedDialog::setURL(const QString& t)
+void AddFeedDialog::setURL(const TQString& t)
{
widget->urlEdit->setText(t);
}
@@ -85,12 +85,12 @@ void AddFeedDialog::slotOk( )
widget->statusLabel->setText( i18n("Downloading %1").arg(feedURL) );
- connect( feed, SIGNAL(fetched(Feed* )),
- this, SLOT(fetchCompleted(Feed *)) );
- connect( feed, SIGNAL(fetchError(Feed* )),
- this, SLOT(fetchError(Feed *)) );
- connect( feed, SIGNAL(fetchDiscovery(Feed* )),
- this, SLOT(fetchDiscovery(Feed *)) );
+ connect( feed, TQT_SIGNAL(fetched(Feed* )),
+ this, TQT_SLOT(fetchCompleted(Feed *)) );
+ connect( feed, TQT_SIGNAL(fetchError(Feed* )),
+ this, TQT_SLOT(fetchError(Feed *)) );
+ connect( feed, TQT_SIGNAL(fetchDiscovery(Feed* )),
+ this, TQT_SLOT(fetchDiscovery(Feed *)) );
f->fetch(true);
}
@@ -112,7 +112,7 @@ void AddFeedDialog::fetchDiscovery(Feed *f)
feedURL=f->xmlUrl();
}
-void AddFeedDialog::textChanged(const QString& text)
+void AddFeedDialog::textChanged(const TQString& text)
{
enableButtonOK(!text.isEmpty());
}
diff --git a/akregator/src/addfeeddialog.h b/akregator/src/addfeeddialog.h
index e7e67a165..fc38e6175 100644
--- a/akregator/src/addfeeddialog.h
+++ b/akregator/src/addfeeddialog.h
@@ -42,7 +42,7 @@ namespace Akregator
{
Q_OBJECT
public:
- AddFeedWidget(QWidget *parent = 0, const char *name = 0);
+ AddFeedWidget(TQWidget *parent = 0, const char *name = 0);
~AddFeedWidget();
};
@@ -50,10 +50,10 @@ namespace Akregator
{
Q_OBJECT
public:
- AddFeedDialog(QWidget *parent = 0, const char *name = 0);
+ AddFeedDialog(TQWidget *parent = 0, const char *name = 0);
~AddFeedDialog();
- void setURL(const QString& t);
+ void setURL(const TQString& t);
Feed *feed;
public slots:
@@ -63,11 +63,11 @@ namespace Akregator
void fetchError(Feed *);
private slots:
- void textChanged(const QString&);
+ void textChanged(const TQString&);
private:
AddFeedWidget *widget;
- QString feedURL;
+ TQString feedURL;
};
}
diff --git a/akregator/src/akregator_part.cpp b/akregator/src/akregator_part.cpp
index b5392c791..449b871e7 100644
--- a/akregator/src/akregator_part.cpp
+++ b/akregator/src/akregator_part.cpp
@@ -49,11 +49,11 @@
#include <kparts/genericfactory.h>
#include <kparts/partmanager.h>
-#include <qfile.h>
-#include <qobjectlist.h>
-#include <qstringlist.h>
-#include <qtimer.h>
-#include <qwidgetlist.h>
+#include <tqfile.h>
+#include <tqobjectlist.h>
+#include <tqstringlist.h>
+#include <tqtimer.h>
+#include <tqwidgetlist.h>
#include <private/qucomextra_p.h>
#include <cerrno>
@@ -116,8 +116,8 @@ class Part::ApplyFiltersInterceptor : public ArticleInterceptor
}
};
-Part::Part( QWidget *parentWidget, const char * /*widgetName*/,
- QObject *parent, const char *name, const QStringList& )
+Part::Part( TQWidget *parentWidget, const char * /*widgetName*/,
+ TQObject *parent, const char *name, const TQStringList& )
: DCOPObject("AkregatorIface")
, MyBasePart(parent, name)
, m_standardListLoaded(false)
@@ -144,9 +144,9 @@ Part::Part( QWidget *parentWidget, const char * /*widgetName*/,
m_storage = 0;
Backend::StorageFactory* factory = Backend::StorageFactoryRegistry::self()->getFactory(Settings::archiveBackend());
- QStringList storageParams;
+ TQStringList storageParams;
- storageParams.append(QString("taggingEnabled=%1").arg(Settings::showTaggingGUI() ? "true" : "false"));
+ storageParams.append(TQString("taggingEnabled=%1").arg(Settings::showTaggingGUI() ? "true" : "false"));
if (factory != 0)
{
@@ -193,12 +193,12 @@ Part::Part( QWidget *parentWidget, const char * /*widgetName*/,
m_extension = new BrowserExtension(this, "ak_extension");
- connect(m_view, SIGNAL(setWindowCaption(const QString&)), this, SIGNAL(setWindowCaption(const QString&)));
- connect(m_view, SIGNAL(setStatusBarText(const QString&)), this, SIGNAL(setStatusBarText(const QString&)));
- connect(m_view, SIGNAL(setProgress(int)), m_extension, SIGNAL(loadingProgress(int)));
- connect(m_view, SIGNAL(signalCanceled(const QString&)), this, SIGNAL(canceled(const QString&)));
- connect(m_view, SIGNAL(signalStarted(KIO::Job*)), this, SIGNAL(started(KIO::Job*)));
- connect(m_view, SIGNAL(signalCompleted()), this, SIGNAL(completed()));
+ connect(m_view, TQT_SIGNAL(setWindowCaption(const TQString&)), this, TQT_SIGNAL(setWindowCaption(const TQString&)));
+ connect(m_view, TQT_SIGNAL(setStatusBarText(const TQString&)), this, TQT_SIGNAL(setStatusBarText(const TQString&)));
+ connect(m_view, TQT_SIGNAL(setProgress(int)), m_extension, TQT_SIGNAL(loadingProgress(int)));
+ connect(m_view, TQT_SIGNAL(signalCanceled(const TQString&)), this, TQT_SIGNAL(canceled(const TQString&)));
+ connect(m_view, TQT_SIGNAL(signalStarted(KIO::Job*)), this, TQT_SIGNAL(started(KIO::Job*)));
+ connect(m_view, TQT_SIGNAL(signalCompleted()), this, TQT_SIGNAL(completed()));
// notify the part that this is our internal widget
setWidget(m_view);
@@ -207,7 +207,7 @@ Part::Part( QWidget *parentWidget, const char * /*widgetName*/,
TrayIcon::setInstance(trayIcon);
m_actionManager->initTrayIcon(trayIcon);
- connect(trayIcon, SIGNAL(showPart()), this, SIGNAL(showPart()));
+ connect(trayIcon, TQT_SIGNAL(showPart()), this, TQT_SIGNAL(showPart()));
if ( isTrayIconEnabled() )
{
@@ -217,22 +217,22 @@ Part::Part( QWidget *parentWidget, const char * /*widgetName*/,
else
NotificationManager::self()->setWidget(getMainWindow(), instance());
- connect( trayIcon, SIGNAL(quitSelected()),
- kapp, SLOT(quit())) ;
+ connect( trayIcon, TQT_SIGNAL(quitSelected()),
+ kapp, TQT_SLOT(quit())) ;
- connect( m_view, SIGNAL(signalUnreadCountChanged(int)), trayIcon, SLOT(slotSetUnread(int)) );
+ connect( m_view, TQT_SIGNAL(signalUnreadCountChanged(int)), trayIcon, TQT_SLOT(slotSetUnread(int)) );
- connect(kapp, SIGNAL(shutDown()), this, SLOT(slotOnShutdown()));
+ connect(kapp, TQT_SIGNAL(shutDown()), this, TQT_SLOT(slotOnShutdown()));
- m_autosaveTimer = new QTimer(this);
- connect(m_autosaveTimer, SIGNAL(timeout()), this, SLOT(slotSaveFeedList()));
+ m_autosaveTimer = new TQTimer(this);
+ connect(m_autosaveTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotSaveFeedList()));
m_autosaveTimer->start(5*60*1000); // 5 minutes
setXMLFile("akregator_part.rc", true);
initFonts();
- RSS::FileRetriever::setUserAgent(QString("Akregator/%1; librss/remnants").arg(AKREGATOR_VERSION));
+ RSS::FileRetriever::setUserAgent(TQString("Akregator/%1; librss/remnants").arg(AKREGATOR_VERSION));
}
void Part::loadPlugins()
@@ -252,7 +252,7 @@ void Part::slotOnShutdown()
{
m_shuttingDown = true;
- const QString lockLocation = locateLocal("data", "akregator/lock");
+ const TQString lockLocation = locateLocal("data", "akregator/lock");
KSimpleConfig config(lockLocation);
config.writeEntry("pid", -1);
config.sync();
@@ -276,7 +276,7 @@ void Part::slotSettingsChanged()
RSS::FileRetriever::setUseCache(Settings::useHTMLCache());
- QStringList fonts;
+ TQStringList fonts;
fonts.append(Settings::standardFont());
fonts.append(Settings::fixedFont());
fonts.append(Settings::sansSerifFont());
@@ -338,56 +338,56 @@ void Part::openStandardFeedList()
m_standardListLoaded = true;
}
-QDomDocument Part::createDefaultFeedList()
+TQDomDocument Part::createDefaultFeedList()
{
- QDomDocument doc;
- QDomProcessingInstruction z = doc.createProcessingInstruction("xml","version=\"1.0\" encoding=\"UTF-8\"");
+ TQDomDocument doc;
+ TQDomProcessingInstruction z = doc.createProcessingInstruction("xml","version=\"1.0\" encoding=\"UTF-8\"");
doc.appendChild( z );
- QDomElement root = doc.createElement( "opml" );
+ TQDomElement root = doc.createElement( "opml" );
root.setAttribute("version","1.0");
doc.appendChild( root );
- QDomElement head = doc.createElement( "head" );
+ TQDomElement head = doc.createElement( "head" );
root.appendChild(head);
- QDomElement text = doc.createElement( "text" );
+ TQDomElement text = doc.createElement( "text" );
text.appendChild(doc.createTextNode(i18n("Feeds")));
head.appendChild(text);
- QDomElement body = doc.createElement( "body" );
+ TQDomElement body = doc.createElement( "body" );
root.appendChild(body);
- QDomElement mainFolder = doc.createElement( "outline" );
+ TQDomElement mainFolder = doc.createElement( "outline" );
mainFolder.setAttribute("text","KDE");
body.appendChild(mainFolder);
- QDomElement ak = doc.createElement( "outline" );
+ TQDomElement ak = doc.createElement( "outline" );
ak.setAttribute("text",i18n("Akregator News"));
ak.setAttribute("xmlUrl","http://akregator.sf.net/rss2.php");
mainFolder.appendChild(ak);
- QDomElement akb = doc.createElement( "outline" );
+ TQDomElement akb = doc.createElement( "outline" );
akb.setAttribute("text",i18n("Akregator Blog"));
akb.setAttribute("xmlUrl","http://akregator.pwsp.net/blog/?feed=rss2");
mainFolder.appendChild(akb);
- QDomElement dot = doc.createElement( "outline" );
+ TQDomElement dot = doc.createElement( "outline" );
dot.setAttribute("text",i18n("KDE Dot News"));
dot.setAttribute("xmlUrl","http://www.kde.org/dotkdeorg.rdf");
mainFolder.appendChild(dot);
- QDomElement plan = doc.createElement( "outline" );
+ TQDomElement plan = doc.createElement( "outline" );
plan.setAttribute("text",i18n("Planet KDE"));
plan.setAttribute("xmlUrl","http://planetkde.org/rss20.xml");
mainFolder.appendChild(plan);
- QDomElement apps = doc.createElement( "outline" );
+ TQDomElement apps = doc.createElement( "outline" );
apps.setAttribute("text",i18n("KDE Apps"));
apps.setAttribute("xmlUrl","http://www.kde.org/dot/kde-apps-content.rdf");
mainFolder.appendChild(apps);
- QDomElement look = doc.createElement( "outline" );
+ TQDomElement look = doc.createElement( "outline" );
look.setAttribute("text",i18n("KDE Look"));
look.setAttribute("xmlUrl","http://www.kde.org/kde-look-content.rdf");
mainFolder.appendChild(look);
@@ -399,14 +399,14 @@ bool Part::openFile()
{
emit setStatusBarText(i18n("Opening Feed List...") );
- QString str;
- // m_file is always local so we can use QFile on it
- QFile file(m_file);
+ TQString str;
+ // m_file is always local so we can use TQFile on it
+ TQFile file(m_file);
bool fileExists = file.exists();
- QString listBackup = m_storage->restoreFeedList();
+ TQString listBackup = m_storage->restoreFeedList();
- QDomDocument doc;
+ TQDomDocument doc;
if (!fileExists)
{
@@ -417,8 +417,8 @@ bool Part::openFile()
if (file.open(IO_ReadOnly))
{
// Read OPML feeds list and build QDom tree.
- QTextStream stream(&file);
- stream.setEncoding(QTextStream::UnicodeUTF8); // FIXME not all opmls are in utf8
+ TQTextStream stream(&file);
+ stream.setEncoding(TQTextStream::UnicodeUTF8); // FIXME not all opmls are in utf8
str = stream.read();
file.close();
}
@@ -428,7 +428,7 @@ bool Part::openFile()
if (file.size() > 0) // don't backup empty files
{
- QString backup = m_file + "-backup." + QString::number(QDateTime::currentDateTime().toTime_t());
+ TQString backup = m_file + "-backup." + TQString::number(TQDateTime::currentDateTime().toTime_t());
copyFile(backup);
@@ -444,7 +444,7 @@ bool Part::openFile()
{
if (file.size() > 0) // don't backup empty files
{
- QString backup = m_file + "-backup." + QString::number(QDateTime::currentDateTime().toTime_t());
+ TQString backup = m_file + "-backup." + TQString::number(TQDateTime::currentDateTime().toTime_t());
copyFile(backup);
KMessageBox::error(m_view, i18n("<qt>The standard feed list is corrupted (no valid OPML). A backup was created:<p><b>%2</b></p></qt>").arg(backup), i18n("OPML Parsing Error") );
@@ -452,7 +452,7 @@ bool Part::openFile()
m_view->loadFeeds(createDefaultFeedList());
}
- emit setStatusBarText(QString::null);
+ emit setStatusBarText(TQString::null);
if( Settings::markAllFeedsReadOnStartup() )
@@ -473,16 +473,16 @@ void Part::slotSaveFeedList()
// the first time we overwrite the feed list, we create a backup
if (!m_backedUpList)
{
- QString backup = m_file + "~";
+ TQString backup = m_file + "~";
if (copyFile(backup))
m_backedUpList = true;
}
- QString xmlStr = m_view->feedListToOPML().toString();
+ TQString xmlStr = m_view->feedListToOPML().toString();
m_storage->storeFeedList(xmlStr);
- QFile file(m_file);
+ TQFile file(m_file);
if (file.open(IO_WriteOnly) == false)
{
//FIXME: allow to save the feedlist into different location -tpr 20041118
@@ -490,9 +490,9 @@ void Part::slotSaveFeedList()
return;
}
- // use QTextStream to dump the text to the file
- QTextStream stream(&file);
- stream.setEncoding(QTextStream::UnicodeUTF8);
+ // use TQTextStream to dump the text to the file
+ TQTextStream stream(&file);
+ stream.setEncoding(TQTextStream::UnicodeUTF8);
// Write OPML data file.
// Archive data files are saved elsewhere.
@@ -534,31 +534,31 @@ bool Part::mergePart(KParts::Part* part)
return true;
}
-QWidget* Part::getMainWindow()
+TQWidget* Part::getMainWindow()
{
// this is a dirty fix to get the main window used for the tray icon
- QWidgetList *l = kapp->topLevelWidgets();
- QWidgetListIt it( *l );
- QWidget *wid;
+ TQWidgetList *l = kapp->topLevelWidgets();
+ TQWidgetListIt it( *l );
+ TQWidget *wid;
// check if there is an akregator main window
while ( (wid = it.current()) != 0 )
{
++it;
//kdDebug() << "win name: " << wid->name() << endl;
- if (QString(wid->name()) == "akregator_mainwindow")
+ if (TQString(wid->name()) == "akregator_mainwindow")
{
delete l;
return wid;
}
}
// if not, check for kontact main window
- QWidgetListIt it2( *l );
+ TQWidgetListIt it2( *l );
while ( (wid = it2.current()) != 0 )
{
++it2;
- if (QString(wid->name()).startsWith("kontact-mainwindow"))
+ if (TQString(wid->name()).startsWith("kontact-mainwindow"))
{
delete l;
return wid;
@@ -568,11 +568,11 @@ QWidget* Part::getMainWindow()
return 0;
}
-void Part::loadTagSet(const QString& path)
+void Part::loadTagSet(const TQString& path)
{
- QDomDocument doc;
+ TQDomDocument doc;
- QFile file(path);
+ TQFile file(path);
if (file.open(IO_ReadOnly))
{
doc.setContent(file.readAll());
@@ -594,19 +594,19 @@ void Part::loadTagSet(const QString& path)
}
}
-void Part::saveTagSet(const QString& path)
+void Part::saveTagSet(const TQString& path)
{
- QString xmlStr = Kernel::self()->tagSet()->toXML().toString();
+ TQString xmlStr = Kernel::self()->tagSet()->toXML().toString();
m_storage->storeTagSet(xmlStr);
- QFile file(path);
+ TQFile file(path);
if ( file.open(IO_WriteOnly) )
{
- QTextStream stream(&file);
- stream.setEncoding(QTextStream::UnicodeUTF8);
+ TQTextStream stream(&file);
+ stream.setEncoding(TQTextStream::UnicodeUTF8);
stream << xmlStr << "\n";
file.close();
}
@@ -614,7 +614,7 @@ void Part::saveTagSet(const QString& path)
void Part::importFile(const KURL& url)
{
- QString filename;
+ TQString filename;
bool isRemote = false;
@@ -631,11 +631,11 @@ void Part::importFile(const KURL& url)
}
}
- QFile file(filename);
+ TQFile file(filename);
if (file.open(IO_ReadOnly))
{
// Read OPML feeds list and build QDom tree.
- QDomDocument doc;
+ TQDomDocument doc;
if (doc.setContent(file.readAll()))
m_view->importFeeds(doc);
else
@@ -652,7 +652,7 @@ void Part::exportFile(const KURL& url)
{
if (url.isLocalFile())
{
- QFile file(url.path());
+ TQFile file(url.path());
if ( file.exists() &&
KMessageBox::questionYesNo(m_view,
@@ -668,8 +668,8 @@ void Part::exportFile(const KURL& url)
return;
}
- QTextStream stream(&file);
- stream.setEncoding(QTextStream::UnicodeUTF8);
+ TQTextStream stream(&file);
+ stream.setEncoding(TQTextStream::UnicodeUTF8);
stream << m_view->feedListToOPML().toString() << "\n";
file.close();
@@ -679,8 +679,8 @@ void Part::exportFile(const KURL& url)
KTempFile tmpfile;
tmpfile.setAutoDelete(true);
- QTextStream stream(tmpfile.file());
- stream.setEncoding(QTextStream::UnicodeUTF8);
+ TQTextStream stream(tmpfile.file());
+ stream.setEncoding(TQTextStream::UnicodeUTF8);
stream << m_view->feedListToOPML().toString() << "\n";
tmpfile.close();
@@ -692,7 +692,7 @@ void Part::exportFile(const KURL& url)
void Part::fileImport()
{
- KURL url = KFileDialog::getOpenURL( QString::null,
+ KURL url = KFileDialog::getOpenURL( TQString::null,
"*.opml *.xml|" + i18n("OPML Outlines (*.opml, *.xml)")
+"\n*|" + i18n("All Files") );
@@ -702,7 +702,7 @@ void Part::fileImport()
void Part::fileExport()
{
- KURL url= KFileDialog::getSaveURL( QString::null,
+ KURL url= KFileDialog::getSaveURL( TQString::null,
"*.opml *.xml|" + i18n("OPML Outlines (*.opml, *.xml)")
+"\n*|" + i18n("All Files") );
@@ -720,7 +720,7 @@ void Part::fileGetFeeds()
void Part::fileSendArticle(bool attach)
{
// FIXME: you have to open article to tab to be able to send...
- QString title, text;
+ TQString title, text;
text = m_view->currentFrame()->part()->url().prettyURL();
if(text.isEmpty() || text.isNull())
@@ -751,14 +751,14 @@ void Part::fetchAllFeeds()
m_view->slotFetchAllFeeds();
}
-void Part::fetchFeedUrl(const QString&s)
+void Part::fetchFeedUrl(const TQString&s)
{
kdDebug() << "fetchFeedURL==" << s << endl;
}
-void Part::addFeedsToGroup(const QStringList& urls, const QString& group)
+void Part::addFeedsToGroup(const TQStringList& urls, const TQString& group)
{
- for (QStringList::ConstIterator it = urls.begin(); it != urls.end(); ++it)
+ for (TQStringList::ConstIterator it = urls.begin(); it != urls.end(); ++it)
{
kdDebug() << "Akregator::Part::addFeedToGroup adding feed with URL " << *it << " to group " << group << endl;
m_view->addFeedToGroup(*it, group);
@@ -790,10 +790,10 @@ void Part::showOptions()
KConfigDialog* dialog = new ConfigDialog( m_view, "settings", Settings::self() );
- connect( dialog, SIGNAL(settingsChanged()),
- this, SLOT(slotSettingsChanged()) );
- connect( dialog, SIGNAL(settingsChanged()),
- TrayIcon::getInstance(), SLOT(settingsChanged()) );
+ connect( dialog, TQT_SIGNAL(settingsChanged()),
+ this, TQT_SLOT(slotSettingsChanged()) );
+ connect( dialog, TQT_SIGNAL(settingsChanged()),
+ TrayIcon::getInstance(), TQT_SLOT(settingsChanged()) );
dialog->show();
}
@@ -811,10 +811,10 @@ void Part::partActivateEvent(KParts::PartActivateEvent* event)
MyBasePart::partActivateEvent(event);
}
-KParts::Part* Part::hitTest(QWidget *widget, const QPoint &globalPos)
+KParts::Part* Part::hitTest(TQWidget *widget, const TQPoint &globalPos)
{
bool child = false;
- QWidget *me = this->widget();
+ TQWidget *me = this->widget();
while (widget) {
if (widget == me) {
child = true;
@@ -834,7 +834,7 @@ KParts::Part* Part::hitTest(QWidget *widget, const QPoint &globalPos)
void Part::initFonts()
{
- QStringList fonts = Settings::fonts();
+ TQStringList fonts = Settings::fonts();
if (fonts.isEmpty())
{
fonts.append(KGlobalSettings::generalFont().family());
@@ -893,17 +893,17 @@ void Part::initFonts()
}
-bool Part::copyFile(const QString& backup)
+bool Part::copyFile(const TQString& backup)
{
- QFile file(m_file);
+ TQFile file(m_file);
if (file.open(IO_ReadOnly))
{
- QFile backupFile(backup);
+ TQFile backupFile(backup);
if (backupFile.open(IO_WriteOnly))
{
- QTextStream in(&file);
- QTextStream out(&backupFile);
+ TQTextStream in(&file);
+ TQTextStream out(&backupFile);
while (!in.atEnd())
out << in.readLine();
backupFile.close();
@@ -919,7 +919,7 @@ bool Part::copyFile(const QString& backup)
return false;
}
-static QString getMyHostName()
+static TQString getMyHostName()
{
char hostNameC[256];
// null terminate this C string
@@ -927,31 +927,31 @@ static QString getMyHostName()
// set the string to 0 length if gethostname fails
if(gethostname(hostNameC, 255))
hostNameC[0] = 0;
- return QString::fromLocal8Bit(hostNameC);
+ return TQString::fromLocal8Bit(hostNameC);
}
// taken from KMail
-bool Part::tryToLock(const QString& backendName)
+bool Part::tryToLock(const TQString& backendName)
{
// Check and create a lock file to prevent concurrent access to metakit archive
- QString appName = kapp->instanceName();
+ TQString appName = kapp->instanceName();
if ( appName.isEmpty() )
appName = "akregator";
- QString programName;
+ TQString programName;
const KAboutData *about = kapp->aboutData();
if ( about )
programName = about->programName();
if ( programName.isEmpty() )
programName = i18n("Akregator");
- QString lockLocation = locateLocal("data", "akregator/lock");
+ TQString lockLocation = locateLocal("data", "akregator/lock");
KSimpleConfig config(lockLocation);
int oldPid = config.readNumEntry("pid", -1);
- const QString oldHostName = config.readEntry("hostname");
- const QString oldAppName = config.readEntry( "appName", appName );
- const QString oldProgramName = config.readEntry( "programName", programName );
- const QString hostName = getMyHostName();
+ const TQString oldHostName = config.readEntry("hostname");
+ const TQString oldAppName = config.readEntry( "appName", appName );
+ const TQString oldProgramName = config.readEntry( "programName", programName );
+ const TQString hostName = getMyHostName();
bool first_instance = false;
if ( oldPid == -1 )
first_instance = true;
@@ -965,7 +965,7 @@ bool Part::tryToLock(const QString& backendName)
if ( !first_instance )
{
- QString msg;
+ TQString msg;
if ( oldHostName == hostName )
{
// this can only happen if the user is running this application on
@@ -979,8 +979,8 @@ bool Part::tryToLock(const QString& backendName)
"You should disable the archive for now "
"unless you are sure that %2 is not already running.</qt>")
.arg( programName, programName, backendName );
- // QString::arg( st ) only replaces the first occurrence of %1
- // with st while QString::arg( s1, s2 ) replacess all occurrences
+ // TQString::arg( st ) only replaces the first occurrence of %1
+ // with st while TQString::arg( s1, s2 ) replacess all occurrences
// of %1 with s1 and all occurrences of %2 with s2. So don't
// even think about changing the above to .arg( programName ).
else
@@ -1014,7 +1014,7 @@ bool Part::tryToLock(const QString& backendName)
KCursorSaver idle( KBusyPtr::idle() );
if ( KMessageBox::No ==
- KMessageBox::warningYesNo( 0, msg, QString::null,
+ KMessageBox::warningYesNo( 0, msg, TQString::null,
i18n("Force Access"),
i18n("Disable Archive")) )
{
diff --git a/akregator/src/akregator_part.h b/akregator/src/akregator_part.h
index b241517f5..6d43a7f12 100644
--- a/akregator/src/akregator_part.h
+++ b/akregator/src/akregator_part.h
@@ -81,8 +81,8 @@ namespace Akregator
typedef MyBasePart inherited;
/** Default constructor.*/
- Part(QWidget *parentWidget, const char *widgetName,
- QObject *parent, const char *name, const QStringList&);
+ Part(TQWidget *parentWidget, const char *widgetName,
+ TQObject *parent, const char *name, const TQStringList&);
/** Destructor. */
virtual ~Part();
@@ -99,7 +99,7 @@ namespace Akregator
/** Opens standard feedlist */
virtual void openStandardFeedList();
- virtual void fetchFeedUrl(const QString&);
+ virtual void fetchFeedUrl(const TQString&);
/** Fetch all feeds in the feed tree */
virtual void fetchAllFeeds();
@@ -111,7 +111,7 @@ namespace Akregator
If the group does not exist, it is created. The feed is added as the last member
of the group.
*/
- virtual void addFeedsToGroup(const QStringList& urls, const QString& group);
+ virtual void addFeedsToGroup(const TQStringList& urls, const TQString& group);
virtual void addFeed();
@@ -132,8 +132,8 @@ namespace Akregator
@return true iff merging was successful, i.e. the GUI factory was not NULL */
virtual bool mergePart(KParts::Part*);
- void loadTagSet(const QString& path);
- void saveTagSet(const QString& path);
+ void loadTagSet(const TQString& path);
+ void saveTagSet(const TQString& path);
public slots:
/** Used to save settings after changing them from configuration dialog. Calls AkregatorPart's saveSettings. */
@@ -174,9 +174,9 @@ namespace Akregator
void exportFile(const KURL& url);
/** FIXME: hack to get the tray icon working */
- QWidget* getMainWindow();
+ TQWidget* getMainWindow();
- virtual KParts::Part *hitTest(QWidget *widget, const QPoint &globalPos);
+ virtual KParts::Part *hitTest(TQWidget *widget, const TQPoint &globalPos);
/** reimplemented to load/unload the merged parts on selection/deselection */
virtual void partActivateEvent(KParts::PartActivateEvent* event);
@@ -187,22 +187,22 @@ namespace Akregator
private: // methods
- bool copyFile(const QString& backup);
+ bool copyFile(const TQString& backup);
/** fills the font settings with system fonts, if fonts are not set */
void initFonts();
/** creates an OPML file containing the initial feeds (KDE feeds) */
- static QDomDocument createDefaultFeedList();
+ static TQDomDocument createDefaultFeedList();
- bool tryToLock(const QString& backendName);
+ bool tryToLock(const TQString& backendName);
private: // attributes
class ApplyFiltersInterceptor;
ApplyFiltersInterceptor* m_applyFiltersInterceptor;
- QString m_standardFeedList;
- QString m_tagSetPath;
+ TQString m_standardFeedList;
+ TQString m_tagSetPath;
bool m_standardListLoaded;
bool m_shuttingDown;
@@ -210,7 +210,7 @@ namespace Akregator
KParts::Part* m_mergedPart;
View* m_view;
- QTimer* m_autosaveTimer;
+ TQTimer* m_autosaveTimer;
/** did we backup the feed list already? */
bool m_backedUpList;
Backend::Storage* m_storage;
diff --git a/akregator/src/akregator_partiface.h b/akregator/src/akregator_partiface.h
index 2c4290b8a..5bb51075b 100644
--- a/akregator/src/akregator_partiface.h
+++ b/akregator/src/akregator_partiface.h
@@ -26,7 +26,7 @@
#define AKREGATORPARTIFACE_H
#include <dcopobject.h>
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include <kurl.h>
namespace Akregator {
@@ -36,10 +36,10 @@ namespace Akregator {
K_DCOP
k_dcop:
virtual void openStandardFeedList() = 0;
- virtual void fetchFeedUrl(const QString&) = 0;
+ virtual void fetchFeedUrl(const TQString&) = 0;
virtual void fetchAllFeeds() = 0;
virtual void saveSettings() = 0;
- virtual void addFeedsToGroup(const QStringList&, const QString&) = 0;
+ virtual void addFeedsToGroup(const TQStringList&, const TQString&) = 0;
virtual void exportFile(const KURL& url) = 0;
virtual void addFeed() = 0;
};
diff --git a/akregator/src/akregator_run.cpp b/akregator/src/akregator_run.cpp
index b78c92f7c..4b67113ce 100644
--- a/akregator/src/akregator_run.cpp
+++ b/akregator/src/akregator_run.cpp
@@ -30,7 +30,7 @@
namespace Akregator {
-BrowserRun::BrowserRun(QWidget* mainWindow, Viewer* currentViewer, const KURL& url, const KParts::URLArgs& args, OpeningMode mode)
+BrowserRun::BrowserRun(TQWidget* mainWindow, Viewer* currentViewer, const KURL& url, const KParts::URLArgs& args, OpeningMode mode)
: KParts::BrowserRun(url, args, 0L, mainWindow, false, false, true)
{
m_currentViewer = currentViewer;
@@ -38,7 +38,7 @@ BrowserRun::BrowserRun(QWidget* mainWindow, Viewer* currentViewer, const KURL& u
if (mode == CURRENT_TAB)
{
- connect(m_currentViewer, SIGNAL(destroyed()), this, SLOT(slotViewerDeleted()));
+ connect(m_currentViewer, TQT_SIGNAL(destroyed()), this, TQT_SLOT(slotViewerDeleted()));
}
setEnableExternalBrowser(false);
}
@@ -48,7 +48,7 @@ BrowserRun::~BrowserRun()
kdDebug() << "BrowserRun::~BrowserRun()" << endl;
}
-void BrowserRun::foundMimeType( const QString & type )
+void BrowserRun::foundMimeType( const TQString & type )
{
if (type=="text/html" ||type=="text/xml" || type=="application/xhtml+xml")
emit signalOpenInViewer(url(), m_currentViewer, m_openingMode);
diff --git a/akregator/src/akregator_run.h b/akregator/src/akregator_run.h
index ad549786c..db257fed8 100644
--- a/akregator/src/akregator_run.h
+++ b/akregator/src/akregator_run.h
@@ -45,7 +45,7 @@ class BrowserRun : public KParts::BrowserRun
EXTERNAL
};
- BrowserRun(QWidget* mainWindow, Viewer* currentViewer, const KURL& url, const KParts::URLArgs& args, OpeningMode mode);
+ BrowserRun(TQWidget* mainWindow, Viewer* currentViewer, const KURL& url, const KParts::URLArgs& args, OpeningMode mode);
virtual ~BrowserRun();
signals:
@@ -53,7 +53,7 @@ class BrowserRun : public KParts::BrowserRun
void signalOpenInViewer(const KURL&, Akregator::Viewer*, Akregator::BrowserRun::OpeningMode);
protected:
- virtual void foundMimeType(const QString& type);
+ virtual void foundMimeType(const TQString& type);
private slots:
void slotViewerDeleted();
diff --git a/akregator/src/akregator_view.cpp b/akregator/src/akregator_view.cpp
index f45f784ed..d238307d2 100644
--- a/akregator/src/akregator_view.cpp
+++ b/akregator/src/akregator_view.cpp
@@ -84,24 +84,24 @@
#include <kxmlguifactory.h>
#include <kparts/partmanager.h>
-#include <qbuttongroup.h>
-#include <qcheckbox.h>
-#include <qdatetime.h> // for startup time measure
-#include <qfile.h>
-#include <qhbox.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qmultilineedit.h>
-#include <qpopupmenu.h>
-#include <qptrlist.h>
-#include <qstylesheet.h>
-#include <qtextstream.h>
-#include <qtimer.h>
-#include <qtoolbutton.h>
-#include <qtooltip.h>
-#include <qvaluevector.h>
-#include <qwhatsthis.h>
-#include <qclipboard.h>
+#include <tqbuttongroup.h>
+#include <tqcheckbox.h>
+#include <tqdatetime.h> // for startup time measure
+#include <tqfile.h>
+#include <tqhbox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqmultilineedit.h>
+#include <tqpopupmenu.h>
+#include <tqptrlist.h>
+#include <tqstylesheet.h>
+#include <tqtextstream.h>
+#include <tqtimer.h>
+#include <tqtoolbutton.h>
+#include <tqtooltip.h>
+#include <tqvaluevector.h>
+#include <tqwhatsthis.h>
+#include <tqclipboard.h>
namespace Akregator {
@@ -145,13 +145,13 @@ class View::DeleteNodeVisitor : public TreeNodeVisitor
virtual bool visitTagNode(TagNode* node)
{
- QString msg = i18n("<qt>Are you sure you want to delete tag <b>%1</b>? The tag will be removed from all articles.</qt>").arg(node->title());
+ TQString msg = i18n("<qt>Are you sure you want to delete tag <b>%1</b>? The tag will be removed from all articles.</qt>").arg(node->title());
if (KMessageBox::warningContinueCancel(0, msg, i18n("Delete Tag"), KStdGuiItem::del()) == KMessageBox::Continue)
{
Tag tag = node->tag();
- QValueList<Article> articles = m_view->m_feedList->rootNode()->articles(tag.id());
+ TQValueList<Article> articles = m_view->m_feedList->rootNode()->articles(tag.id());
node->setNotificationMode(false);
- for (QValueList<Article>::Iterator it = articles.begin(); it != articles.end(); ++it)
+ for (TQValueList<Article>::Iterator it = articles.begin(); it != articles.end(); ++it)
(*it).removeTag(tag.id());
node->setNotificationMode(true);
Kernel::self()->tagSet()->remove(tag);
@@ -162,7 +162,7 @@ class View::DeleteNodeVisitor : public TreeNodeVisitor
virtual bool visitFolder(Folder* node)
{
- QString msg;
+ TQString msg;
if (node->title().isEmpty())
msg = i18n("<qt>Are you sure you want to delete this folder and its feeds and subfolders?</qt>");
else
@@ -178,7 +178,7 @@ class View::DeleteNodeVisitor : public TreeNodeVisitor
virtual bool visitFeed(Feed* node)
{
- QString msg;
+ TQString msg;
if (node->title().isEmpty())
msg = i18n("<qt>Are you sure you want to delete this feed?</qt>");
else
@@ -210,38 +210,38 @@ View::~View()
kdDebug() << "View::~View(): leaving" << endl;
}
-View::View( Part *part, QWidget *parent, ActionManagerImpl* actionManager, const char *name)
- : QWidget(parent, name), m_viewMode(NormalView), m_actionManager(actionManager)
+View::View( Part *part, TQWidget *parent, ActionManagerImpl* actionManager, const char *name)
+ : TQWidget(parent, name), m_viewMode(NormalView), m_actionManager(actionManager)
{
m_editNodePropertiesVisitor = new EditNodePropertiesVisitor(this);
m_deleteNodeVisitor = new DeleteNodeVisitor(this);
- m_keepFlagIcon = QPixmap(locate("data", "akregator/pics/akregator_flag.png"));
+ m_keepFlagIcon = TQPixmap(locate("data", "akregator/pics/akregator_flag.png"));
m_part = part;
m_feedList = new FeedList();
m_tagNodeList = new TagNodeList(m_feedList, Kernel::self()->tagSet());
m_shuttingDown = false;
m_displayingAboutPage = false;
m_currentFrame = 0L;
- setFocusPolicy(QWidget::StrongFocus);
+ setFocusPolicy(TQWidget::StrongFocus);
- QVBoxLayout *lt = new QVBoxLayout( this );
+ TQVBoxLayout *lt = new TQVBoxLayout( this );
- m_horizontalSplitter = new QSplitter(QSplitter::Horizontal, this);
+ m_horizontalSplitter = new TQSplitter(TQSplitter::Horizontal, this);
m_horizontalSplitter->setOpaqueResize(true);
lt->addWidget(m_horizontalSplitter);
- connect (Kernel::self()->fetchQueue(), SIGNAL(fetched(Feed*)), this, SLOT(slotFeedFetched(Feed*)));
- connect (Kernel::self()->fetchQueue(), SIGNAL(signalStarted()), this, SLOT(slotFetchingStarted()));
- connect (Kernel::self()->fetchQueue(), SIGNAL(signalStopped()), this, SLOT(slotFetchingStopped()));
+ connect (Kernel::self()->fetchQueue(), TQT_SIGNAL(fetched(Feed*)), this, TQT_SLOT(slotFeedFetched(Feed*)));
+ connect (Kernel::self()->fetchQueue(), TQT_SIGNAL(signalStarted()), this, TQT_SLOT(slotFetchingStarted()));
+ connect (Kernel::self()->fetchQueue(), TQT_SIGNAL(signalStopped()), this, TQT_SLOT(slotFetchingStopped()));
- connect(Kernel::self()->tagSet(), SIGNAL(signalTagAdded(const Tag&)), this, SLOT(slotTagCreated(const Tag&)));
- connect(Kernel::self()->tagSet(), SIGNAL(signalTagRemoved(const Tag&)), this, SLOT(slotTagRemoved(const Tag&)));
+ connect(Kernel::self()->tagSet(), TQT_SIGNAL(signalTagAdded(const Tag&)), this, TQT_SLOT(slotTagCreated(const Tag&)));
+ connect(Kernel::self()->tagSet(), TQT_SIGNAL(signalTagRemoved(const Tag&)), this, TQT_SLOT(slotTagRemoved(const Tag&)));
m_listTabWidget = new ListTabWidget(m_horizontalSplitter);
m_actionManager->initListTabWidget(m_listTabWidget);
- connect(m_listTabWidget, SIGNAL(signalNodeSelected(TreeNode*)), this, SLOT(slotNodeSelected(TreeNode*)));
+ connect(m_listTabWidget, TQT_SIGNAL(signalNodeSelected(TreeNode*)), this, TQT_SLOT(slotNodeSelected(TreeNode*)));
if (!Settings::showTaggingGUI())
m_listTabWidget->setViewMode(ListTabWidget::single);
@@ -249,16 +249,16 @@ View::View( Part *part, QWidget *parent, ActionManagerImpl* actionManager, const
m_feedListView = new NodeListView( this, "feedtree" );
m_listTabWidget->addView(m_feedListView, i18n("Feeds"), KGlobal::iconLoader()->loadIcon("folder", KIcon::Small));
- connect(m_feedListView, SIGNAL(signalContextMenu(KListView*, TreeNode*, const QPoint&)), this, SLOT(slotFeedTreeContextMenu(KListView*, TreeNode*, const QPoint&)));
+ connect(m_feedListView, TQT_SIGNAL(signalContextMenu(KListView*, TreeNode*, const TQPoint&)), this, TQT_SLOT(slotFeedTreeContextMenu(KListView*, TreeNode*, const TQPoint&)));
- connect(m_feedListView, SIGNAL(signalDropped (KURL::List &, TreeNode*,
- Folder*)), this, SLOT(slotFeedURLDropped (KURL::List &,
+ connect(m_feedListView, TQT_SIGNAL(signalDropped (KURL::List &, TreeNode*,
+ Folder*)), this, TQT_SLOT(slotFeedURLDropped (KURL::List &,
TreeNode*, Folder*)));
m_tagNodeListView = new NodeListView(this);
m_listTabWidget->addView(m_tagNodeListView, i18n("Tags"), KGlobal::iconLoader()->loadIcon("rss_tag", KIcon::Small));
- connect(m_tagNodeListView, SIGNAL(signalContextMenu(KListView*, TreeNode*, const QPoint&)), this, SLOT(slotFeedTreeContextMenu(KListView*, TreeNode*, const QPoint&)));
+ connect(m_tagNodeListView, TQT_SIGNAL(signalContextMenu(KListView*, TreeNode*, const TQPoint&)), this, TQT_SLOT(slotFeedTreeContextMenu(KListView*, TreeNode*, const TQPoint&)));
ProgressManager::self()->setFeedList(m_feedList);
@@ -266,17 +266,17 @@ View::View( Part *part, QWidget *parent, ActionManagerImpl* actionManager, const
m_tabs = new TabWidget(m_horizontalSplitter);
m_actionManager->initTabWidget(m_tabs);
- connect( m_part, SIGNAL(signalSettingsChanged()), m_tabs, SLOT(slotSettingsChanged()));
+ connect( m_part, TQT_SIGNAL(signalSettingsChanged()), m_tabs, TQT_SLOT(slotSettingsChanged()));
- connect( m_tabs, SIGNAL( currentFrameChanged(Frame *) ), this,
- SLOT( slotFrameChanged(Frame *) ) );
+ connect( m_tabs, TQT_SIGNAL( currentFrameChanged(Frame *) ), this,
+ TQT_SLOT( slotFrameChanged(Frame *) ) );
- QWhatsThis::add(m_tabs, i18n("You can view multiple articles in several open tabs."));
+ TQWhatsThis::add(m_tabs, i18n("You can view multiple articles in several open tabs."));
- m_mainTab = new QWidget(this, "Article Tab");
- QVBoxLayout *mainTabLayout = new QVBoxLayout( m_mainTab, 0, 2, "mainTabLayout");
+ m_mainTab = new TQWidget(this, "Article Tab");
+ TQVBoxLayout *mainTabLayout = new TQVBoxLayout( m_mainTab, 0, 2, "mainTabLayout");
- QWhatsThis::add(m_mainTab, i18n("Articles list."));
+ TQWhatsThis::add(m_mainTab, i18n("Articles list."));
m_searchBar = new SearchBar(m_mainTab);
@@ -285,36 +285,36 @@ View::View( Part *part, QWidget *parent, ActionManagerImpl* actionManager, const
mainTabLayout->addWidget(m_searchBar);
- m_articleSplitter = new QSplitter(QSplitter::Vertical, m_mainTab, "panner2");
+ m_articleSplitter = new TQSplitter(TQSplitter::Vertical, m_mainTab, "panner2");
m_articleList = new ArticleListView( m_articleSplitter, "articles" );
m_actionManager->initArticleListView(m_articleList);
- connect( m_articleList, SIGNAL(signalMouseButtonPressed(int, const Article&, const QPoint &, int)), this, SLOT(slotMouseButtonPressed(int, const Article&, const QPoint &, int)));
+ connect( m_articleList, TQT_SIGNAL(signalMouseButtonPressed(int, const Article&, const TQPoint &, int)), this, TQT_SLOT(slotMouseButtonPressed(int, const Article&, const TQPoint &, int)));
// use selectionChanged instead of clicked
- connect( m_articleList, SIGNAL(signalArticleChosen(const Article&)),
- this, SLOT( slotArticleSelected(const Article&)) );
- connect( m_articleList, SIGNAL(signalDoubleClicked(const Article&, const QPoint&, int)),
- this, SLOT( slotOpenArticleExternal(const Article&, const QPoint&, int)) );
+ connect( m_articleList, TQT_SIGNAL(signalArticleChosen(const Article&)),
+ this, TQT_SLOT( slotArticleSelected(const Article&)) );
+ connect( m_articleList, TQT_SIGNAL(signalDoubleClicked(const Article&, const TQPoint&, int)),
+ this, TQT_SLOT( slotOpenArticleExternal(const Article&, const TQPoint&, int)) );
m_articleViewer = new ArticleViewer(m_articleSplitter, "article_viewer");
m_articleViewer->setSafeMode(); // disable JS, Java, etc...
m_actionManager->initArticleViewer(m_articleViewer);
- connect(m_searchBar, SIGNAL(signalSearch(const Akregator::Filters::ArticleMatcher&, const Akregator::Filters::ArticleMatcher&)), m_articleList, SLOT(slotSetFilter(const Akregator::Filters::ArticleMatcher&, const Akregator::Filters::ArticleMatcher&)));
+ connect(m_searchBar, TQT_SIGNAL(signalSearch(const Akregator::Filters::ArticleMatcher&, const Akregator::Filters::ArticleMatcher&)), m_articleList, TQT_SLOT(slotSetFilter(const Akregator::Filters::ArticleMatcher&, const Akregator::Filters::ArticleMatcher&)));
- connect(m_searchBar, SIGNAL(signalSearch(const Akregator::Filters::ArticleMatcher&, const Akregator::Filters::ArticleMatcher&)), m_articleViewer, SLOT(slotSetFilter(const Akregator::Filters::ArticleMatcher&, const Akregator::Filters::ArticleMatcher&)));
+ connect(m_searchBar, TQT_SIGNAL(signalSearch(const Akregator::Filters::ArticleMatcher&, const Akregator::Filters::ArticleMatcher&)), m_articleViewer, TQT_SLOT(slotSetFilter(const Akregator::Filters::ArticleMatcher&, const Akregator::Filters::ArticleMatcher&)));
- connect( m_articleViewer, SIGNAL(urlClicked(const KURL&, Viewer*, bool, bool)),
- this, SLOT(slotUrlClickedInViewer(const KURL&, Viewer*, bool, bool)) );
+ connect( m_articleViewer, TQT_SIGNAL(urlClicked(const KURL&, Viewer*, bool, bool)),
+ this, TQT_SLOT(slotUrlClickedInViewer(const KURL&, Viewer*, bool, bool)) );
- connect( m_articleViewer->browserExtension(), SIGNAL(mouseOverInfo(const KFileItem *)),
- this, SLOT(slotMouseOverInfo(const KFileItem *)) );
+ connect( m_articleViewer->browserExtension(), TQT_SIGNAL(mouseOverInfo(const KFileItem *)),
+ this, TQT_SLOT(slotMouseOverInfo(const KFileItem *)) );
- connect( m_part, SIGNAL(signalSettingsChanged()), m_articleViewer, SLOT(slotPaletteOrFontChanged()));
- QWhatsThis::add(m_articleViewer->widget(), i18n("Browsing area."));
+ connect( m_part, TQT_SIGNAL(signalSettingsChanged()), m_articleViewer, TQT_SLOT(slotPaletteOrFontChanged()));
+ TQWhatsThis::add(m_articleViewer->widget(), i18n("Browsing area."));
mainTabLayout->addWidget( m_articleSplitter );
m_mainFrame=new Frame(this, m_part, m_mainTab, i18n("Articles"), false);
@@ -335,18 +335,18 @@ View::View( Part *part, QWidget *parent, ActionManagerImpl* actionManager, const
m_displayingAboutPage = true;
}
- m_fetchTimer = new QTimer(this);
- connect( m_fetchTimer, SIGNAL(timeout()), this, SLOT(slotDoIntervalFetches()) );
+ m_fetchTimer = new TQTimer(this);
+ connect( m_fetchTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotDoIntervalFetches()) );
m_fetchTimer->start(1000*60);
// delete expired articles once per hour
- m_expiryTimer = new QTimer(this);
- connect(m_expiryTimer, SIGNAL(timeout()), this,
- SLOT(slotDeleteExpiredArticles()) );
+ m_expiryTimer = new TQTimer(this);
+ connect(m_expiryTimer, TQT_SIGNAL(timeout()), this,
+ TQT_SLOT(slotDeleteExpiredArticles()) );
m_expiryTimer->start(3600*1000);
- m_markReadTimer = new QTimer(this);
- connect(m_markReadTimer, SIGNAL(timeout()), this, SLOT(slotSetCurrentArticleReadDelayed()) );
+ m_markReadTimer = new TQTimer(this);
+ connect(m_markReadTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotSetCurrentArticleReadDelayed()) );
switch (Settings::viewMode())
{
@@ -366,7 +366,7 @@ View::View( Part *part, QWidget *parent, ActionManagerImpl* actionManager, const
m_searchBar->slotSetText(Settings::textFilter());
}
- QTimer::singleShot(1000, this, SLOT(slotDeleteExpiredArticles()) );
+ TQTimer::singleShot(1000, this, TQT_SLOT(slotDeleteExpiredArticles()) );
m_part->mergePart(m_articleViewer);
}
@@ -416,17 +416,17 @@ void View::slotOpenNewTab(const KURL& url, bool background)
{
PageViewer* page = new PageViewer(this, "page");
- connect( m_part, SIGNAL(signalSettingsChanged()), page, SLOT(slotPaletteOrFontChanged()));
+ connect( m_part, TQT_SIGNAL(signalSettingsChanged()), page, TQT_SLOT(slotPaletteOrFontChanged()));
- connect( page, SIGNAL(setTabIcon(const QPixmap&)),
- this, SLOT(setTabIcon(const QPixmap&)));
- connect( page, SIGNAL(urlClicked(const KURL &, Viewer*, bool, bool)),
- this, SLOT(slotUrlClickedInViewer(const KURL &, Viewer*, bool, bool)) );
+ connect( page, TQT_SIGNAL(setTabIcon(const TQPixmap&)),
+ this, TQT_SLOT(setTabIcon(const TQPixmap&)));
+ connect( page, TQT_SIGNAL(urlClicked(const KURL &, Viewer*, bool, bool)),
+ this, TQT_SLOT(slotUrlClickedInViewer(const KURL &, Viewer*, bool, bool)) );
Frame* frame = new Frame(this, page, page->widget(), i18n("Untitled"));
frame->setAutoDeletePart(true); // delete page viewer when removing the tab
- connect(page, SIGNAL(setWindowCaption (const QString &)), frame, SLOT(setTitle (const QString &)));
+ connect(page, TQT_SIGNAL(setWindowCaption (const TQString &)), frame, TQT_SLOT(setTitle (const TQString &)));
connectFrame(frame);
m_tabs->addFrame(frame);
@@ -439,7 +439,7 @@ void View::slotOpenNewTab(const KURL& url, bool background)
}
-void View::setTabIcon(const QPixmap& icon)
+void View::setTabIcon(const TQPixmap& icon)
{
const PageViewer *s = dynamic_cast<const PageViewer*>(sender());
if (s) {
@@ -449,21 +449,21 @@ void View::setTabIcon(const QPixmap& icon)
void View::connectFrame(Frame *f)
{
- connect(f, SIGNAL(statusText(const QString &)), this, SLOT(slotStatusText(const QString&)));
- connect(f, SIGNAL(captionChanged (const QString &)), this, SLOT(slotCaptionChanged (const QString &)));
- connect(f, SIGNAL(loadingProgress(int)), this, SLOT(slotLoadingProgress(int)) );
- connect(f, SIGNAL(started()), this, SLOT(slotStarted()));
- connect(f, SIGNAL(completed()), this, SLOT(slotCompleted()));
- connect(f, SIGNAL(canceled(const QString &)), this, SLOT(slotCanceled(const QString&)));
+ connect(f, TQT_SIGNAL(statusText(const TQString &)), this, TQT_SLOT(slotStatusText(const TQString&)));
+ connect(f, TQT_SIGNAL(captionChanged (const TQString &)), this, TQT_SLOT(slotCaptionChanged (const TQString &)));
+ connect(f, TQT_SIGNAL(loadingProgress(int)), this, TQT_SLOT(slotLoadingProgress(int)) );
+ connect(f, TQT_SIGNAL(started()), this, TQT_SLOT(slotStarted()));
+ connect(f, TQT_SIGNAL(completed()), this, TQT_SLOT(slotCompleted()));
+ connect(f, TQT_SIGNAL(canceled(const TQString &)), this, TQT_SLOT(slotCanceled(const TQString&)));
}
-void View::slotStatusText(const QString &c)
+void View::slotStatusText(const TQString &c)
{
if (sender() == m_currentFrame)
emit setStatusBarText(c);
}
-void View::slotCaptionChanged(const QString &c)
+void View::slotCaptionChanged(const TQString &c)
{
if (sender() == m_currentFrame)
emit setWindowCaption(c);
@@ -475,7 +475,7 @@ void View::slotStarted()
emit signalStarted(0);
}
-void View::slotCanceled(const QString &s)
+void View::slotCanceled(const TQString &s)
{
if (sender() == m_currentFrame)
emit signalCanceled(s);
@@ -493,7 +493,7 @@ void View::slotLoadingProgress(int percent)
emit setProgress(percent);
}
-bool View::importFeeds(const QDomDocument& doc)
+bool View::importFeeds(const TQDomDocument& doc)
{
FeedList* feedList = new FeedList();
bool parsed = feedList->readFromXML(doc);
@@ -504,7 +504,7 @@ bool View::importFeeds(const QDomDocument& doc)
delete feedList;
return false;
}
- QString title = feedList->title();
+ TQString title = feedList->title();
if (title.isEmpty())
title = i18n("Imported Folder");
@@ -525,7 +525,7 @@ bool View::importFeeds(const QDomDocument& doc)
return true;
}
-bool View::loadFeeds(const QDomDocument& doc, Folder* parent)
+bool View::loadFeeds(const TQDomDocument& doc, Folder* parent)
{
FeedList* feedList = new FeedList();
bool parsed = feedList->readFromXML(doc);
@@ -554,9 +554,9 @@ bool View::loadFeeds(const QDomDocument& doc, Folder* parent)
m_feedListView->setNodeList(m_feedList);
m_tagNodeListView->setNodeList(m_tagNodeList);
- QStringList tagIDs = m_feedList->rootNode()->tags();
- QStringList::ConstIterator end = tagIDs.end();
- for (QStringList::ConstIterator it = tagIDs.begin(); it != end; ++it)
+ TQStringList tagIDs = m_feedList->rootNode()->tags();
+ TQStringList::ConstIterator end = tagIDs.end();
+ for (TQStringList::ConstIterator it = tagIDs.begin(); it != end; ++it)
{
kdDebug() << *it << endl;
// create a tag for every tag ID in the archive that is not part of the tagset
@@ -586,12 +586,12 @@ void View::slotDeleteExpiredArticles()
rootNode->slotDeleteExpiredArticles();
}
-QDomDocument View::feedListToOPML()
+TQDomDocument View::feedListToOPML()
{
return m_feedList->toXML();
}
-void View::addFeedToGroup(const QString& url, const QString& groupName)
+void View::addFeedToGroup(const TQString& url, const TQString& groupName)
{
// Locate the group.
@@ -630,7 +630,7 @@ void View::slotNormalView()
m_articleViewer->slotShowSummary(m_listTabWidget->activeView()->selectedNode());
}
- m_articleSplitter->setOrientation(QSplitter::Vertical);
+ m_articleSplitter->setOrientation(TQSplitter::Vertical);
m_viewMode = NormalView;
Settings::setViewMode( m_viewMode );
@@ -654,7 +654,7 @@ void View::slotWidescreenView()
m_articleViewer->slotShowSummary(m_listTabWidget->activeView()->selectedNode());
}
- m_articleSplitter->setOrientation(QSplitter::Horizontal);
+ m_articleSplitter->setOrientation(TQSplitter::Horizontal);
m_viewMode = WidescreenView;
Settings::setViewMode( m_viewMode );
@@ -697,7 +697,7 @@ void View::slotFrameChanged(Frame *f)
emit signalStarted(0);
break;
case Frame::Canceled:
- emit signalCanceled(QString::null);
+ emit signalCanceled(TQString::null);
break;
case Frame::Idle:
case Frame::Completed:
@@ -706,7 +706,7 @@ void View::slotFrameChanged(Frame *f)
}
}
-void View::slotFeedTreeContextMenu(KListView*, TreeNode* /*node*/, const QPoint& /*p*/)
+void View::slotFeedTreeContextMenu(KListView*, TreeNode* /*node*/, const TQPoint& /*p*/)
{
m_tabs->showPage(m_mainTab);
}
@@ -824,8 +824,8 @@ void View::slotOpenURL(const KURL& url, Viewer* currentViewer, BrowserRun::Openi
KParts::URLArgs args = currentViewer ? currentViewer->browserExtension()->urlArgs() : KParts::URLArgs();
BrowserRun* r = new BrowserRun(this, currentViewer, url, args, mode);
- connect(r, SIGNAL(signalOpenInViewer(const KURL&, Akregator::Viewer*, Akregator::BrowserRun::OpeningMode)),
- this, SLOT(slotOpenURLReply(const KURL&, Akregator::Viewer*, Akregator::BrowserRun::OpeningMode)));
+ connect(r, TQT_SIGNAL(signalOpenInViewer(const KURL&, Akregator::Viewer*, Akregator::BrowserRun::OpeningMode)),
+ this, TQT_SLOT(slotOpenURLReply(const KURL&, Akregator::Viewer*, Akregator::BrowserRun::OpeningMode)));
}
}
@@ -878,10 +878,10 @@ void View::slotFeedAdd()
TreeNode* lastChild = group->children().last();
- addFeed(QString::null, lastChild, group, false);
+ addFeed(TQString::null, lastChild, group, false);
}
-void View::addFeed(const QString& url, TreeNode *after, Folder* parent, bool autoExec)
+void View::addFeed(const TQString& url, TreeNode *after, Folder* parent, bool autoExec)
{
AddFeedDialog *afd = new AddFeedDialog( 0, "add_feed" );
@@ -892,7 +892,7 @@ void View::addFeed(const QString& url, TreeNode *after, Folder* parent, bool aut
afd->slotOk();
else
{
- if (afd->exec() != QDialog::Accepted)
+ if (afd->exec() != TQDialog::Accepted)
{
delete afd;
return;
@@ -908,7 +908,7 @@ void View::addFeed(const QString& url, TreeNode *after, Folder* parent, bool aut
dlg->selectFeedName();
if (!autoExec)
- if (dlg->exec() != QDialog::Accepted)
+ if (dlg->exec() != TQDialog::Accepted)
{
delete feed;
delete dlg;
@@ -946,7 +946,7 @@ void View::slotFeedAddGroup()
bool Ok;
- QString text = KInputDialog::getText(i18n("Add Folder"), i18n("Folder name:"), "", &Ok);
+ TQString text = KInputDialog::getText(i18n("Add Folder"), i18n("Folder name:"), "", &Ok);
if (Ok)
{
@@ -1069,7 +1069,7 @@ void View::slotFetchingStopped()
{
m_mainFrame->setState(Frame::Completed);
m_actionManager->action("feed_stop")->setEnabled(false);
- m_mainFrame->setStatusText(QString::null);
+ m_mainFrame->setStatusText(TQString::null);
}
void View::slotFeedFetched(Feed *feed)
@@ -1077,9 +1077,9 @@ void View::slotFeedFetched(Feed *feed)
// iterate through the articles (once again) to do notifications properly
if (feed->articles().count() > 0)
{
- QValueList<Article> articles = feed->articles();
- QValueList<Article>::ConstIterator it;
- QValueList<Article>::ConstIterator end = articles.end();
+ TQValueList<Article> articles = feed->articles();
+ TQValueList<Article>::ConstIterator it;
+ TQValueList<Article>::ConstIterator end = articles.end();
for (it = articles.begin(); it != end; ++it)
{
if ((*it).status()==Article::New && ((*it).feed()->useNotification() || Settings::useNotifications()))
@@ -1090,7 +1090,7 @@ void View::slotFeedFetched(Feed *feed)
}
}
-void View::slotMouseButtonPressed(int button, const Article& article, const QPoint &, int)
+void View::slotMouseButtonPressed(int button, const Article& article, const TQPoint &, int)
{
if (button == Qt::MidButton)
{
@@ -1112,8 +1112,8 @@ void View::slotMouseButtonPressed(int button, const Article& article, const QPoi
void View::slotAssignTag(const Tag& tag, bool assign)
{
kdDebug() << (assign ? "assigned" : "removed") << " tag \"" << tag.id() << "\"" << endl;
- QValueList<Article> selectedArticles = m_articleList->selectedArticles();
- for (QValueList<Article>::Iterator it = selectedArticles.begin(); it != selectedArticles.end(); ++it)
+ TQValueList<Article> selectedArticles = m_articleList->selectedArticles();
+ for (TQValueList<Article>::Iterator it = selectedArticles.begin(); it != selectedArticles.end(); ++it)
{
if (assign)
(*it).addTag(tag.id());
@@ -1126,8 +1126,8 @@ void View::slotAssignTag(const Tag& tag, bool assign)
void View::slotRemoveTag(const Tag& tag)
{
kdDebug() << "remove tag \"" << tag.id() << "\" from selected articles" << endl;
- QValueList<Article> selectedArticles = m_articleList->selectedArticles();
- for (QValueList<Article>::Iterator it = selectedArticles.begin(); it != selectedArticles.end(); ++it)
+ TQValueList<Article> selectedArticles = m_articleList->selectedArticles();
+ for (TQValueList<Article>::Iterator it = selectedArticles.begin(); it != selectedArticles.end(); ++it)
(*it).removeTag(tag.id());
updateTagActions();
@@ -1192,7 +1192,7 @@ void View::slotArticleSelected(const Article& article)
m_articleViewer->slotShowArticle(a);
}
-void View::slotOpenArticleExternal(const Article& article, const QPoint&, int)
+void View::slotOpenArticleExternal(const Article& article, const TQPoint&, int)
{
if (!article.isNull())
Viewer::displayInExternalBrowser(article.link());
@@ -1220,7 +1220,7 @@ void View::slotOpenCurrentArticle()
void View::slotOpenCurrentArticleExternal()
{
- slotOpenArticleExternal(m_articleList->currentArticle(), QPoint(), 0);
+ slotOpenArticleExternal(m_articleList->currentArticle(), TQPoint(), 0);
}
void View::slotOpenCurrentArticleBackgroundTab()
@@ -1250,7 +1250,7 @@ void View::slotCopyLinkAddress()
if(article.isNull())
return;
- QString link;
+ TQString link;
if (article.link().isValid() || (article.guidIsPermaLink() && KURL(article.guid()).isValid()))
{
// in case link isn't valid, fall back to the guid permaLink.
@@ -1258,7 +1258,7 @@ void View::slotCopyLinkAddress()
link = article.link().url();
else
link = article.guid();
- QClipboard *cb = QApplication::clipboard();
+ QClipboard *cb = TQApplication::clipboard();
cb->setText(link, QClipboard::Clipboard);
cb->setText(link, QClipboard::Selection);
}
@@ -1296,15 +1296,15 @@ void View::slotArticleDelete()
if ( m_viewMode == CombinedView )
return;
- QValueList<Article> articles = m_articleList->selectedArticles();
+ TQValueList<Article> articles = m_articleList->selectedArticles();
- QString msg;
+ TQString msg;
switch (articles.count())
{
case 0:
return;
case 1:
- msg = i18n("<qt>Are you sure you want to delete article <b>%1</b>?</qt>").arg(QStyleSheet::escape(articles.first().title()));
+ msg = i18n("<qt>Are you sure you want to delete article <b>%1</b>?</qt>").arg(TQStyleSheet::escape(articles.first().title()));
break;
default:
msg = i18n("<qt>Are you sure you want to delete the selected article?</qt>",
@@ -1317,8 +1317,8 @@ void View::slotArticleDelete()
if (m_listTabWidget->activeView()->selectedNode())
m_listTabWidget->activeView()->selectedNode()->setNotificationMode(false);
- QValueList<Feed*> feeds;
- for (QValueList<Article>::Iterator it = articles.begin(); it != articles.end(); ++it)
+ TQValueList<Feed*> feeds;
+ for (TQValueList<Article>::Iterator it = articles.begin(); it != articles.end(); ++it)
{
Feed* feed = (*it).feed();
if (!feeds.contains(feed))
@@ -1327,7 +1327,7 @@ void View::slotArticleDelete()
(*it).setDeleted();
}
- for (QValueList<Feed*>::Iterator it = feeds.begin(); it != feeds.end(); ++it)
+ for (TQValueList<Feed*>::Iterator it = feeds.begin(); it != feeds.end(); ++it)
{
(*it)->setNotificationMode(true);
}
@@ -1340,28 +1340,28 @@ void View::slotArticleDelete()
void View::slotArticleToggleKeepFlag(bool /*enabled*/)
{
- QValueList<Article> articles = m_articleList->selectedArticles();
+ TQValueList<Article> articles = m_articleList->selectedArticles();
if (articles.isEmpty())
return;
bool allFlagsSet = true;
- for (QValueList<Article>::Iterator it = articles.begin(); allFlagsSet && it != articles.end(); ++it)
+ for (TQValueList<Article>::Iterator it = articles.begin(); allFlagsSet && it != articles.end(); ++it)
if (!(*it).keep())
allFlagsSet = false;
- for (QValueList<Article>::Iterator it = articles.begin(); it != articles.end(); ++it)
+ for (TQValueList<Article>::Iterator it = articles.begin(); it != articles.end(); ++it)
(*it).setKeep(!allFlagsSet);
}
void View::slotSetSelectedArticleRead()
{
- QValueList<Article> articles = m_articleList->selectedArticles();
+ TQValueList<Article> articles = m_articleList->selectedArticles();
if (articles.isEmpty())
return;
- for (QValueList<Article>::Iterator it = articles.begin(); it != articles.end(); ++it)
+ for (TQValueList<Article>::Iterator it = articles.begin(); it != articles.end(); ++it)
(*it).setStatus(Article::Read);
}
@@ -1385,7 +1385,7 @@ void View::slotTextToSpeechRequest()
}
else
{
- QString selectedText = static_cast<PageViewer *>(m_currentFrame->part())->selectedText();
+ TQString selectedText = static_cast<PageViewer *>(m_currentFrame->part())->selectedText();
if (!selectedText.isEmpty())
SpeechClient::self()->slotSpeak(selectedText, "en");
@@ -1394,23 +1394,23 @@ void View::slotTextToSpeechRequest()
void View::slotSetSelectedArticleUnread()
{
- QValueList<Article> articles = m_articleList->selectedArticles();
+ TQValueList<Article> articles = m_articleList->selectedArticles();
if (articles.isEmpty())
return;
- for (QValueList<Article>::Iterator it = articles.begin(); it != articles.end(); ++it)
+ for (TQValueList<Article>::Iterator it = articles.begin(); it != articles.end(); ++it)
(*it).setStatus(Article::Unread);
}
void View::slotSetSelectedArticleNew()
{
- QValueList<Article> articles = m_articleList->selectedArticles();
+ TQValueList<Article> articles = m_articleList->selectedArticles();
if (articles.isEmpty())
return;
- for (QValueList<Article>::Iterator it = articles.begin(); it != articles.end(); ++it)
+ for (TQValueList<Article>::Iterator it = articles.begin(); it != articles.end(); ++it)
(*it).setStatus(Article::New);
}
@@ -1433,7 +1433,7 @@ void View::slotMouseOverInfo(const KFileItem *kifi)
}
else
{
- m_mainFrame->setStatusText(QString::null);
+ m_mainFrame->setStatusText(TQString::null);
}
}
@@ -1456,8 +1456,8 @@ void View::readProperties(KConfig* config)
m_listTabWidget->activeView()->setSelectedNode(selNode);
}
- QStringList urls = config->readListEntry("FeedBrowserURLs");
- QStringList::ConstIterator it = urls.begin();
+ TQStringList urls = config->readListEntry("FeedBrowserURLs");
+ TQStringList::ConstIterator it = urls.begin();
for (; it != urls.end(); ++it)
{
KURL url = KURL::fromPathOrURL(*it);
@@ -1480,9 +1480,9 @@ void View::saveProperties(KConfig* config)
}
// save browser URLs
- QStringList urls;
- QPtrList<Frame> frames = m_tabs->frames();
- QPtrList<Frame>::ConstIterator it = frames.begin();
+ TQStringList urls;
+ TQPtrList<Frame> frames = m_tabs->frames();
+ TQPtrList<Frame>::ConstIterator it = frames.begin();
for (; it != frames.end(); ++it)
{
Frame *frame = *it;
@@ -1501,25 +1501,25 @@ void View::saveProperties(KConfig* config)
void View::connectToFeedList(FeedList* feedList)
{
- connect(feedList->rootNode(), SIGNAL(signalChanged(TreeNode*)), this, SLOT(slotSetTotalUnread()));
+ connect(feedList->rootNode(), TQT_SIGNAL(signalChanged(TreeNode*)), this, TQT_SLOT(slotSetTotalUnread()));
slotSetTotalUnread();
}
void View::disconnectFromFeedList(FeedList* feedList)
{
- disconnect(feedList->rootNode(), SIGNAL(signalChanged(TreeNode*)), this, SLOT(slotSetTotalUnread()));
+ disconnect(feedList->rootNode(), TQT_SIGNAL(signalChanged(TreeNode*)), this, TQT_SLOT(slotSetTotalUnread()));
}
void View::updateTagActions()
{
- QStringList tags;
+ TQStringList tags;
- QValueList<Article> selectedArticles = m_articleList->selectedArticles();
+ TQValueList<Article> selectedArticles = m_articleList->selectedArticles();
- for (QValueList<Article>::ConstIterator it = selectedArticles.begin(); it != selectedArticles.end(); ++it)
+ for (TQValueList<Article>::ConstIterator it = selectedArticles.begin(); it != selectedArticles.end(); ++it)
{
- QStringList atags = (*it).tags();
- for (QStringList::ConstIterator it2 = atags.begin(); it2 != atags.end(); ++it2)
+ TQStringList atags = (*it).tags();
+ for (TQStringList::ConstIterator it2 = atags.begin(); it2 != atags.end(); ++it2)
{
if (!tags.contains(*it2))
tags += *it2;
diff --git a/akregator/src/akregator_view.h b/akregator/src/akregator_view.h
index 599f8cfdc..303de0aa6 100644
--- a/akregator/src/akregator_view.h
+++ b/akregator/src/akregator_view.h
@@ -27,8 +27,8 @@
#ifndef _AKREGATORVIEW_H_
#define _AKREGATORVIEW_H_
-#include <qpixmap.h>
-#include <qwidget.h>
+#include <tqpixmap.h>
+#include <tqwidget.h>
#include <kurl.h>
@@ -86,9 +86,9 @@ namespace Akregator {
@param part the Akregator::Part which contains this widget
@param parent parent widget
@param Actionmanager for this view
- @param name the name of the widget (@ref QWidget )
+ @param name the name of the widget (@ref TQWidget )
*/
- View(Akregator::Part *part, QWidget *parent, ActionManagerImpl* actionManager, const char* name);
+ View(Akregator::Part *part, TQWidget *parent, ActionManagerImpl* actionManager, const char* name);
/** destructor. Note that cleanups should be done in
slotOnShutdown(), so we don't risk accessing self-deleting objects after deletion. */
@@ -101,18 +101,18 @@ namespace Akregator {
/** Adds the feeds in @c doc to the "Imported Folder"
@param doc the DOM tree (OPML) of the feeds to import */
- bool importFeeds(const QDomDocument& doc);
+ bool importFeeds(const TQDomDocument& doc);
/** Parse OPML presentation of feeds and read in articles archive, if present. If @c parent is @c NULL, the current
feed list is replaced by the parsed one
- @param doc QDomDocument generated from OPML
+ @param doc TQDomDocument generated from OPML
@param parent The parent group the new nodes */
- bool loadFeeds(const QDomDocument& doc, Folder* parent = 0);
+ bool loadFeeds(const TQDomDocument& doc, Folder* parent = 0);
/**
@return the displayed Feed List in OPML format
*/
- QDomDocument feedListToOPML();
+ TQDomDocument feedListToOPML();
/**
Add a feed to a group.
@@ -120,7 +120,7 @@ namespace Akregator {
@param group The name of the folder into which the feed is added.
If the group does not exist, it is created. The feed is added as the last member of the group.
*/
- void addFeedToGroup(const QString& url, const QString& group);
+ void addFeedToGroup(const TQString& url, const TQString& group);
/** session management **/
virtual void readProperties(KConfig* config);
@@ -132,12 +132,12 @@ namespace Akregator {
/** emitted when the unread count of "All Feeds" was changed */
void signalUnreadCountChanged(int);
- void setWindowCaption(const QString&);
- void setStatusBarText(const QString&);
+ void setWindowCaption(const TQString&);
+ void setStatusBarText(const TQString&);
void setProgress(int);
void signalStarted(KIO::Job*);
void signalCompleted();
- void signalCanceled(const QString&);
+ void signalCanceled(const TQString&);
public slots:
@@ -150,16 +150,16 @@ namespace Akregator {
void slotArticleSelected(const Article&);
/** Shows requested popup menu for feed tree */
- void slotFeedTreeContextMenu(KListView*, TreeNode*, const QPoint&);
+ void slotFeedTreeContextMenu(KListView*, TreeNode*, const TQPoint&);
/** emits @ref signalUnreadCountChanged(int) */
void slotSetTotalUnread();
/** special behaviour in article list view (TODO: move code there?) */
- void slotMouseButtonPressed(int button, const Article& article, const QPoint & pos, int c);
+ void slotMouseButtonPressed(int button, const Article& article, const TQPoint & pos, int c);
/** opens article of @c item in external browser */
- void slotOpenArticleExternal(const Article& article, const QPoint&, int);
+ void slotOpenArticleExternal(const Article& article, const TQPoint&, int);
/** opens the current article (currentItem) in external browser
TODO: use selected instead of current? */
@@ -186,7 +186,7 @@ namespace Akregator {
void slotFrameChanged(Frame *f);
/** sets the window caption after a frame change */
- void slotCaptionChanged(const QString &);
+ void slotCaptionChanged(const TQString &);
/** called when URLs are dropped into the tree view */
void slotFeedURLDropped (KURL::List &urls, TreeNode* after, Folder *parent);
@@ -195,10 +195,10 @@ namespace Akregator {
void slotMouseOverInfo(const KFileItem *kifi);
/** sets the status bar text to a given string */
- void slotStatusText(const QString &);
+ void slotStatusText(const TQString &);
void slotStarted();
- void slotCanceled(const QString &);
+ void slotCanceled(const TQString &);
void slotCompleted();
void slotLoadingProgress(int);
@@ -271,7 +271,7 @@ namespace Akregator {
protected:
- void addFeed(const QString& url, TreeNode* after, Folder* parent, bool autoExec = true);
+ void addFeed(const TQString& url, TreeNode* after, Folder* parent, bool autoExec = true);
void connectToFeedList(FeedList* feedList);
void disconnectFromFeedList(FeedList* feedList);
@@ -282,7 +282,7 @@ namespace Akregator {
void connectFrame(Frame *);
- void setTabIcon(const QPixmap&);
+ void setTabIcon(const TQPixmap&);
void slotDoIntervalFetches();
void slotDeleteExpiredArticles();
@@ -308,29 +308,29 @@ namespace Akregator {
ArticleViewer *m_articleViewer;
TabWidget *m_tabs;
- QWidget *m_mainTab;
+ TQWidget *m_mainTab;
Frame *m_mainFrame;
Frame *m_currentFrame;
SearchBar* m_searchBar;
- QSplitter *m_articleSplitter;
- QSplitter *m_horizontalSplitter;
+ TQSplitter *m_articleSplitter;
+ TQSplitter *m_horizontalSplitter;
ListTabWidget* m_listTabWidget;
Akregator::Part *m_part;
ViewMode m_viewMode;
- QTimer *m_fetchTimer;
- QTimer* m_expiryTimer;
- QTimer *m_markReadTimer;
+ TQTimer *m_fetchTimer;
+ TQTimer* m_expiryTimer;
+ TQTimer *m_markReadTimer;
bool m_shuttingDown;
bool m_displayingAboutPage;
ActionManagerImpl* m_actionManager;
- QPixmap m_keepFlagIcon;
+ TQPixmap m_keepFlagIcon;
friend class EditNodePropertiesVisitor;
class EditNodePropertiesVisitor;
EditNodePropertiesVisitor* m_editNodePropertiesVisitor;
diff --git a/akregator/src/article.cpp b/akregator/src/article.cpp
index eeab61dd5..75d3f7872 100644
--- a/akregator/src/article.cpp
+++ b/akregator/src/article.cpp
@@ -30,11 +30,11 @@
#include "shared.h"
#include "utils.h"
-#include <qdatetime.h>
-#include <qdom.h>
-#include <qregexp.h>
-#include <qstringlist.h>
-#include <qvaluelist.h>
+#include <tqdatetime.h>
+#include <tqdom.h>
+#include <tqregexp.h>
+#include <tqstringlist.h>
+#include <tqvaluelist.h>
#include <krfcdate.h>
#include <kdebug.h>
@@ -57,7 +57,7 @@ struct Article::Private : public Shared
enum Status {Deleted=0x01, Trash=0x02, New=0x04, Read=0x08, Keep=0x10};
- QString guid;
+ TQString guid;
Backend::FeedStorage* archive;
Feed* feed;
@@ -67,7 +67,7 @@ struct Article::Private : public Shared
// to read their values, you should therefore use the accessor methods of the Article
// hash(), pubDate(), statusBits() rather than accessing them directly.
uint hash;
- QDateTime pubDate;
+ TQDateTime pubDate;
int status;
};
@@ -79,7 +79,7 @@ Article::Article() : d(new Private)
d->archive = 0;
}
-Article::Article(const QString& guid, Feed* feed) : d(new Private)
+Article::Article(const TQString& guid, Feed* feed) : d(new Private)
{
// this constructor should be as cheap as possible, so avoid calls to
// read information from the archive in here if possible
@@ -115,7 +115,7 @@ void Article::initialize(RSS::Article article, Backend::FeedStorage* archive)
{ // article is not deleted, let's add it to the archive
d->archive->setHash(d->guid, hash() );
- QString title = article.title().isEmpty() ? buildTitle(article.description()) : article.title();
+ TQString title = article.title().isEmpty() ? buildTitle(article.description()) : article.title();
d->archive->setTitle(d->guid, title);
d->archive->setDescription(d->guid, article.description());
d->archive->setLink(d->guid, article.link().url());
@@ -123,14 +123,14 @@ void Article::initialize(RSS::Article article, Backend::FeedStorage* archive)
d->archive->setCommentsLink(d->guid, article.commentsLink().url());
d->archive->setGuidIsPermaLink(d->guid, article.guidIsPermaLink());
d->archive->setGuidIsHash(d->guid, article.meta("guidIsHash") == "true");
- d->pubDate = article.pubDate().isValid() ? article.pubDate() : QDateTime::currentDateTime();
+ d->pubDate = article.pubDate().isValid() ? article.pubDate() : TQDateTime::currentDateTime();
d->archive->setPubDate(d->guid, d->pubDate.toTime_t());
d->archive->setAuthor(d->guid, article.author());
- QValueList<RSS::Category> cats = article.categories();
- QValueList<RSS::Category>::ConstIterator end = cats.end();
+ TQValueList<RSS::Category> cats = article.categories();
+ TQValueList<RSS::Category>::ConstIterator end = cats.end();
- for (QValueList<RSS::Category>::ConstIterator it = cats.begin(); it != end; ++it)
+ for (TQValueList<RSS::Category>::ConstIterator it = cats.begin(); it != end; ++it)
{
Backend::Category cat;
@@ -150,7 +150,7 @@ void Article::initialize(RSS::Article article, Backend::FeedStorage* archive)
d->archive->removeEnclosure(d->guid);
}
- QString status = article.meta("status");
+ TQString status = article.meta("status");
if (!status.isEmpty())
{
@@ -170,7 +170,7 @@ void Article::initialize(RSS::Article article, Backend::FeedStorage* archive)
{ // if yes, update
d->pubDate.setTime_t(d->archive->pubDate(d->guid));
d->archive->setHash(d->guid, hash() );
- QString title = article.title().isEmpty() ? buildTitle(article.description()) : article.title();
+ TQString title = article.title().isEmpty() ? buildTitle(article.description()) : article.title();
d->archive->setTitle(d->guid, title);
d->archive->setDescription(d->guid, article.description());
d->archive->setLink(d->guid, article.link().url());
@@ -325,12 +325,12 @@ void Article::setStatus(int stat)
}
}
-QString Article::title() const
+TQString Article::title() const
{
return d->archive->title(d->guid);
}
-QString Article::author() const
+TQString Article::author() const
{
return d->archive->author(d->guid);
}
@@ -340,12 +340,12 @@ KURL Article::link() const
return d->archive->link(d->guid);
}
-QString Article::description() const
+TQString Article::description() const
{
return d->archive->description(d->guid);
}
-QString Article::guid() const
+TQString Article::guid() const
{
return d->guid;
}
@@ -392,7 +392,7 @@ bool Article::keep() const
RSS::Enclosure Article::enclosure() const
{
bool hasEnc;
- QString url, type;
+ TQString url, type;
int length;
d->archive->enclosure(d->guid, hasEnc, url, type, length);
return hasEnc ? RSS::Enclosure(url, length, type) : RSS::Enclosure();
@@ -409,26 +409,26 @@ void Article::setKeep(bool keep)
d->feed->setArticleChanged(*this);
}
-void Article::addTag(const QString& tag)
+void Article::addTag(const TQString& tag)
{
d->archive->addTag(d->guid, tag);
if (d->feed)
d->feed->setArticleChanged(*this);
}
-void Article::removeTag(const QString& tag)
+void Article::removeTag(const TQString& tag)
{
d->archive->removeTag(d->guid, tag);
if (d->feed)
d->feed->setArticleChanged(*this);
}
-bool Article::hasTag(const QString& tag) const
+bool Article::hasTag(const TQString& tag) const
{
return d->archive->tags(d->guid).contains(tag);
}
-QStringList Article::tags() const
+TQStringList Article::tags() const
{
return d->archive->tags(d->guid);
}
@@ -436,7 +436,7 @@ QStringList Article::tags() const
Feed* Article::feed() const
{ return d->feed; }
-const QDateTime& Article::pubDate() const
+const TQDateTime& Article::pubDate() const
{
// delayed loading of publication date information from archive
if ( d->pubDate.isNull() )
@@ -447,17 +447,17 @@ const QDateTime& Article::pubDate() const
return d->pubDate;
}
-QString Article::buildTitle(const QString& description)
+TQString Article::buildTitle(const TQString& description)
{
- QString s = description;
+ TQString s = description;
if (description.stripWhiteSpace().isEmpty())
return "";
int i = s.find('>',500); /*avoid processing too much */
if (i != -1)
s = s.left(i+1);
- QRegExp rx("(<([^\\s>]*)(?:[^>]*)>)[^<]*", false);
- QString tagName, toReplace, replaceWith;
+ TQRegExp rx("(<([^\\s>]*)(?:[^>]*)>)[^<]*", false);
+ TQString tagName, toReplace, replaceWith;
while (rx.search(s) != -1 )
{
tagName=rx.cap(2);
diff --git a/akregator/src/article.h b/akregator/src/article.h
index a4dae19c6..29bbfdd77 100644
--- a/akregator/src/article.h
+++ b/akregator/src/article.h
@@ -58,13 +58,13 @@ namespace Akregator
{
public:
enum Status { Unread=0, Read, New };
- typedef QValueList<Article> List;
+ typedef TQValueList<Article> List;
Article();
/** creates am article object for an existing article.
The constructor accesses the archive to load it's data
*/
- Article(const QString& guid, Feed* feed);
+ Article(const TQString& guid, Feed* feed);
/** creates an article object from a parsed librss Article
the article is added to the archive if not yet stored, or updated if stored but modified
*/
@@ -84,13 +84,13 @@ namespace Akregator
void offsetPubDate(int secs);
- QString title() const;
+ TQString title() const;
KURL link() const;
- QString author() const;
+ TQString author() const;
- QString description() const;
- QString guid() const;
+ TQString description() const;
+ TQString guid() const;
/** if true, the article should be kept even when expired **/
bool keep() const;
void setKeep(bool keep);
@@ -113,16 +113,16 @@ namespace Akregator
bool guidIsPermaLink() const;
- const QDateTime& pubDate() const;
+ const TQDateTime& pubDate() const;
KURL commentsLink() const;
int comments() const;
- void addTag(const QString& tag);
- void removeTag(const QString& tag);
- bool hasTag(const QString& tag) const;
- QStringList tags() const;
+ void addTag(const TQString& tag);
+ void removeTag(const TQString& tag);
+ bool hasTag(const TQString& tag) const;
+ TQStringList tags() const;
bool operator<(const Article &other) const;
bool operator<=(const Article &other) const;
@@ -132,7 +132,7 @@ namespace Akregator
private:
void initialize(RSS::Article article, Backend::FeedStorage* archive);
- static QString buildTitle(const QString& description);
+ static TQString buildTitle(const TQString& description);
int statusBits() const; // returns all of the status bits for the article. this
// differs from status() which only returns the most relevant
diff --git a/akregator/src/articlefilter.cpp b/akregator/src/articlefilter.cpp
index f21605fad..a8bf8a365 100644
--- a/akregator/src/articlefilter.cpp
+++ b/akregator/src/articlefilter.cpp
@@ -33,77 +33,77 @@
#include <kdebug.h>
#include <kurl.h>
-#include <qregexp.h>
+#include <tqregexp.h>
namespace Akregator {
namespace Filters {
-QString Criterion::subjectToString(Subject subj)
+TQString Criterion::subjectToString(Subject subj)
{
switch (subj)
{
case Title:
- return QString::fromLatin1("Title");
+ return TQString::fromLatin1("Title");
case Link:
- return QString::fromLatin1("Link");
+ return TQString::fromLatin1("Link");
case Author:
- return QString::fromLatin1("Author");
+ return TQString::fromLatin1("Author");
case Description:
- return QString::fromLatin1("Description");
+ return TQString::fromLatin1("Description");
case Status:
- return QString::fromLatin1("Status");
+ return TQString::fromLatin1("Status");
case KeepFlag:
- return QString::fromLatin1("KeepFlag");
+ return TQString::fromLatin1("KeepFlag");
default: // should never happen (TM)
- return QString::fromLatin1("Description");
+ return TQString::fromLatin1("Description");
}
}
-Criterion::Subject Criterion::stringToSubject(const QString& subjStr)
+Criterion::Subject Criterion::stringToSubject(const TQString& subjStr)
{
- if (subjStr == QString::fromLatin1("Title"))
+ if (subjStr == TQString::fromLatin1("Title"))
return Title;
- else if (subjStr == QString::fromLatin1("Link"))
+ else if (subjStr == TQString::fromLatin1("Link"))
return Link;
- else if (subjStr == QString::fromLatin1("Description"))
+ else if (subjStr == TQString::fromLatin1("Description"))
return Description;
- else if (subjStr == QString::fromLatin1("Author"))
+ else if (subjStr == TQString::fromLatin1("Author"))
return Author;
- else if (subjStr == QString::fromLatin1("Status"))
+ else if (subjStr == TQString::fromLatin1("Status"))
return Status;
- else if (subjStr == QString::fromLatin1("KeepFlag"))
+ else if (subjStr == TQString::fromLatin1("KeepFlag"))
return KeepFlag;
// hopefully never reached
return Description;
}
-QString Criterion::predicateToString(Predicate pred)
+TQString Criterion::predicateToString(Predicate pred)
{
switch (pred)
{
case Contains:
- return QString::fromLatin1("Contains");
+ return TQString::fromLatin1("Contains");
case Equals:
- return QString::fromLatin1("Equals");
+ return TQString::fromLatin1("Equals");
case Matches:
- return QString::fromLatin1("Matches");
+ return TQString::fromLatin1("Matches");
case Negation:
- return QString::fromLatin1("Negation");
+ return TQString::fromLatin1("Negation");
default:// hopefully never reached
- return QString::fromLatin1("Contains");
+ return TQString::fromLatin1("Contains");
}
}
-Criterion::Predicate Criterion::stringToPredicate(const QString& predStr)
+Criterion::Predicate Criterion::stringToPredicate(const TQString& predStr)
{
- if (predStr == QString::fromLatin1("Contains"))
+ if (predStr == TQString::fromLatin1("Contains"))
return Contains;
- else if (predStr == QString::fromLatin1("Equals"))
+ else if (predStr == TQString::fromLatin1("Equals"))
return Equals;
- else if (predStr == QString::fromLatin1("Matches"))
+ else if (predStr == TQString::fromLatin1("Matches"))
return Matches;
- else if (predStr == QString::fromLatin1("Negation"))
+ else if (predStr == TQString::fromLatin1("Negation"))
return Negation;
// hopefully never reached
@@ -114,7 +114,7 @@ Criterion::Criterion()
{
}
-Criterion::Criterion( Subject subject, Predicate predicate, const QVariant &object )
+Criterion::Criterion( Subject subject, Predicate predicate, const TQVariant &object )
: m_subject( subject )
, m_predicate( predicate )
, m_object( object )
@@ -124,50 +124,50 @@ Criterion::Criterion( Subject subject, Predicate predicate, const QVariant &obje
void Criterion::writeConfig(KConfig* config) const
{
- config->writeEntry(QString::fromLatin1("subject"), subjectToString(m_subject));
+ config->writeEntry(TQString::fromLatin1("subject"), subjectToString(m_subject));
- config->writeEntry(QString::fromLatin1("predicate"), predicateToString(m_predicate));
+ config->writeEntry(TQString::fromLatin1("predicate"), predicateToString(m_predicate));
- config->writeEntry(QString::fromLatin1("objectType"), QString(m_object.typeName()));
+ config->writeEntry(TQString::fromLatin1("objectType"), TQString(m_object.typeName()));
- config->writeEntry(QString::fromLatin1("objectValue"), m_object);
+ config->writeEntry(TQString::fromLatin1("objectValue"), m_object);
}
void Criterion::readConfig(KConfig* config)
{
- m_subject = stringToSubject(config->readEntry(QString::fromLatin1("subject")));
- m_predicate = stringToPredicate(config->readEntry(QString::fromLatin1("predicate")));
- QVariant::Type type = QVariant::nameToType(config->readEntry(QString::fromLatin1("objType")).ascii());
+ m_subject = stringToSubject(config->readEntry(TQString::fromLatin1("subject")));
+ m_predicate = stringToPredicate(config->readEntry(TQString::fromLatin1("predicate")));
+ TQVariant::Type type = TQVariant::nameToType(config->readEntry(TQString::fromLatin1("objType")).ascii());
- if (type != QVariant::Invalid)
+ if (type != TQVariant::Invalid)
{
- m_object = config->readPropertyEntry(QString::fromLatin1("objectValue"), type);
+ m_object = config->readPropertyEntry(TQString::fromLatin1("objectValue"), type);
}
}
bool Criterion::satisfiedBy( const Article &article ) const
{
- QVariant concreteSubject;
+ TQVariant concreteSubject;
switch ( m_subject ) {
case Title:
- concreteSubject = QVariant(article.title());
+ concreteSubject = TQVariant(article.title());
break;
case Description:
- concreteSubject = QVariant(article.description());
+ concreteSubject = TQVariant(article.description());
break;
case Author:
- concreteSubject = QVariant(article.author());
+ concreteSubject = TQVariant(article.author());
break;
case Link:
// ### Maybe use prettyURL here?
- concreteSubject = QVariant(article.link().url());
+ concreteSubject = TQVariant(article.link().url());
break;
case Status:
- concreteSubject = QVariant(article.status());
+ concreteSubject = TQVariant(article.status());
break;
case KeepFlag:
- concreteSubject = QVariant(article.keep());
+ concreteSubject = TQVariant(article.keep());
default:
break;
}
@@ -175,7 +175,7 @@ bool Criterion::satisfiedBy( const Article &article ) const
bool satisfied = false;
const Predicate predicateType = static_cast<Predicate>( m_predicate & ~Negation );
- QString subjectType=concreteSubject.typeName();
+ TQString subjectType=concreteSubject.typeName();
switch ( predicateType ) {
case Contains:
@@ -188,7 +188,7 @@ bool Criterion::satisfiedBy( const Article &article ) const
satisfied = concreteSubject.toString() == m_object.toString();
break;
case Matches:
- satisfied = QRegExp( m_object.toString() ).search( concreteSubject.toString() ) != -1;
+ satisfied = TQRegExp( m_object.toString() ).search( concreteSubject.toString() ) != -1;
break;
default:
kdDebug() << "Internal inconsistency; predicateType should never be Negation" << endl;
@@ -212,7 +212,7 @@ Criterion::Predicate Criterion::predicate() const
return m_predicate;
}
-QVariant Criterion::object() const
+TQVariant Criterion::object() const
{
return m_object;
}
@@ -236,7 +236,7 @@ ArticleMatcher* ArticleMatcher::clone() const
return new ArticleMatcher(*this);
}
-ArticleMatcher::ArticleMatcher( const QValueList<Criterion> &criteria, Association assoc)
+ArticleMatcher::ArticleMatcher( const TQValueList<Criterion> &criteria, Association assoc)
: m_criteria( criteria )
, m_association( assoc )
{
@@ -269,15 +269,15 @@ bool ArticleMatcher::matches( const Article &a ) const
void ArticleMatcher::writeConfig(KConfig* config) const
{
- config->writeEntry(QString::fromLatin1("matcherAssociation"), associationToString(m_association));
+ config->writeEntry(TQString::fromLatin1("matcherAssociation"), associationToString(m_association));
- config->writeEntry(QString::fromLatin1("matcherCriteriaCount"), m_criteria.count());
+ config->writeEntry(TQString::fromLatin1("matcherCriteriaCount"), m_criteria.count());
int index = 0;
- for (QValueList<Criterion>::ConstIterator it = m_criteria.begin(); it != m_criteria.end(); ++it)
+ for (TQValueList<Criterion>::ConstIterator it = m_criteria.begin(); it != m_criteria.end(); ++it)
{
- config->setGroup(config->group()+QString::fromLatin1("_Criterion")+QString::number(index));
+ config->setGroup(config->group()+TQString::fromLatin1("_Criterion")+TQString::number(index));
(*it).writeConfig(config);
++index;
}
@@ -286,14 +286,14 @@ void ArticleMatcher::writeConfig(KConfig* config) const
void ArticleMatcher::readConfig(KConfig* config)
{
m_criteria.clear();
- m_association = stringToAssociation(config->readEntry(QString::fromLatin1("matcherAssociation")));
+ m_association = stringToAssociation(config->readEntry(TQString::fromLatin1("matcherAssociation")));
- int count = config->readNumEntry(QString::fromLatin1("matcherCriteriaCount"), 0);
+ int count = config->readNumEntry(TQString::fromLatin1("matcherCriteriaCount"), 0);
for (int i = 0; i < count; ++i)
{
Criterion c;
- config->setGroup(config->group()+QString::fromLatin1("_Criterion")+QString::number(i));
+ config->setGroup(config->group()+TQString::fromLatin1("_Criterion")+TQString::number(i));
c.readConfig(config);
m_criteria.append(c);
}
@@ -317,8 +317,8 @@ bool ArticleMatcher::anyCriterionMatches( const Article &a ) const
{
if (m_criteria.count()==0)
return true;
- QValueList<Criterion>::ConstIterator it = m_criteria.begin();
- QValueList<Criterion>::ConstIterator end = m_criteria.end();
+ TQValueList<Criterion>::ConstIterator it = m_criteria.begin();
+ TQValueList<Criterion>::ConstIterator end = m_criteria.end();
for ( ; it != end; ++it ) {
if ( ( *it ).satisfiedBy( a ) ) {
return true;
@@ -331,8 +331,8 @@ bool ArticleMatcher::allCriteriaMatch( const Article &a ) const
{
if (m_criteria.count()==0)
return true;
- QValueList<Criterion>::ConstIterator it = m_criteria.begin();
- QValueList<Criterion>::ConstIterator end = m_criteria.end();
+ TQValueList<Criterion>::ConstIterator it = m_criteria.begin();
+ TQValueList<Criterion>::ConstIterator end = m_criteria.end();
for ( ; it != end; ++it ) {
if ( !( *it ).satisfiedBy( a ) ) {
return false;
@@ -341,26 +341,26 @@ bool ArticleMatcher::allCriteriaMatch( const Article &a ) const
return true;
}
-ArticleMatcher::Association ArticleMatcher::stringToAssociation(const QString& assocStr)
+ArticleMatcher::Association ArticleMatcher::stringToAssociation(const TQString& assocStr)
{
- if (assocStr == QString::fromLatin1("LogicalAnd"))
+ if (assocStr == TQString::fromLatin1("LogicalAnd"))
return LogicalAnd;
- else if (assocStr == QString::fromLatin1("LogicalOr"))
+ else if (assocStr == TQString::fromLatin1("LogicalOr"))
return LogicalOr;
else
return None;
}
-QString ArticleMatcher::associationToString(Association association)
+TQString ArticleMatcher::associationToString(Association association)
{
switch (association)
{
case LogicalAnd:
- return QString::fromLatin1("LogicalAnd");
+ return TQString::fromLatin1("LogicalAnd");
case LogicalOr:
- return QString::fromLatin1("LogicalOr");
+ return TQString::fromLatin1("LogicalOr");
default:
- return QString::fromLatin1("None");
+ return TQString::fromLatin1("None");
}
}
@@ -368,14 +368,14 @@ QString ArticleMatcher::associationToString(Association association)
class TagMatcher::TagMatcherPrivate
{
public:
- QString tagID;
+ TQString tagID;
bool operator==(const TagMatcherPrivate& other) const
{
return tagID == other.tagID;
}
};
-TagMatcher::TagMatcher(const QString& tagID) : d(new TagMatcherPrivate)
+TagMatcher::TagMatcher(const TQString& tagID) : d(new TagMatcherPrivate)
{
d->tagID = tagID;
}
@@ -408,13 +408,13 @@ TagMatcher::TagMatcher(const TagMatcher& other) : AbstractMatcher(other), d(0)
void TagMatcher::writeConfig(KConfig* config) const
{
- config->writeEntry(QString::fromLatin1("matcherType"), QString::fromLatin1("TagMatcher"));
- config->writeEntry(QString::fromLatin1("matcherParams"), d->tagID);
+ config->writeEntry(TQString::fromLatin1("matcherType"), TQString::fromLatin1("TagMatcher"));
+ config->writeEntry(TQString::fromLatin1("matcherParams"), d->tagID);
}
void TagMatcher::readConfig(KConfig* config)
{
- d->tagID = config->readEntry(QString::fromLatin1("matcherParams"));
+ d->tagID = config->readEntry(TQString::fromLatin1("matcherParams"));
}
bool TagMatcher::operator==(const AbstractMatcher& other) const
@@ -464,13 +464,13 @@ void SetStatusAction::setStatus(int status)
void SetStatusAction::writeConfig(KConfig* config) const
{
- config->writeEntry(QString::fromLatin1("actionType"), QString::fromLatin1("SetStatusAction"));
- config->writeEntry(QString::fromLatin1("actionParams"), m_status);
+ config->writeEntry(TQString::fromLatin1("actionType"), TQString::fromLatin1("SetStatusAction"));
+ config->writeEntry(TQString::fromLatin1("actionParams"), m_status);
}
void SetStatusAction::readConfig(KConfig* config)
{
- m_status = config->readNumEntry(QString::fromLatin1("actionParams"), Article::Read);
+ m_status = config->readNumEntry(TQString::fromLatin1("actionParams"), Article::Read);
}
bool SetStatusAction::operator==(const AbstractAction& other)
@@ -484,7 +484,7 @@ bool SetStatusAction::operator==(const AbstractAction& other)
}
-AssignTagAction::AssignTagAction(const QString& tagID) : m_tagID(tagID)
+AssignTagAction::AssignTagAction(const TQString& tagID) : m_tagID(tagID)
{
}
@@ -499,7 +499,7 @@ class ArticleFilter::ArticleFilterPrivate : public Shared
public:
AbstractAction* action;
AbstractMatcher* matcher;
- QString name;
+ TQString name;
int id;
};
@@ -581,12 +581,12 @@ bool ArticleFilter::operator==(const ArticleFilter& other) const
void ArticleFilterList::writeConfig(KConfig* config) const
{
- config->setGroup(QString::fromLatin1("Filters"));
- config->writeEntry(QString::fromLatin1("count"), count());
+ config->setGroup(TQString::fromLatin1("Filters"));
+ config->writeEntry(TQString::fromLatin1("count"), count());
int index = 0;
for (ArticleFilterList::ConstIterator it = begin(); it != end(); ++it)
{
- config->setGroup(QString::fromLatin1("Filters_")+QString::number(index));
+ config->setGroup(TQString::fromLatin1("Filters_")+TQString::number(index));
(*it).writeConfig(config);
++index;
}
@@ -595,11 +595,11 @@ void ArticleFilterList::writeConfig(KConfig* config) const
void ArticleFilterList::readConfig(KConfig* config)
{
clear();
- config->setGroup(QString::fromLatin1("Filters"));
- int count = config->readNumEntry(QString::fromLatin1("count"), 0);
+ config->setGroup(TQString::fromLatin1("Filters"));
+ int count = config->readNumEntry(TQString::fromLatin1("count"), 0);
for (int i = 0; i < count; ++i)
{
- config->setGroup(QString::fromLatin1("Filters_")+QString::number(i));
+ config->setGroup(TQString::fromLatin1("Filters_")+TQString::number(i));
ArticleFilter filter;
filter.readConfig(config);
append(filter);
@@ -609,13 +609,13 @@ void ArticleFilterList::readConfig(KConfig* config)
void AssignTagAction::readConfig(KConfig* config)
{
- m_tagID = config->readEntry(QString::fromLatin1("actionParams"));
+ m_tagID = config->readEntry(TQString::fromLatin1("actionParams"));
}
void AssignTagAction::writeConfig(KConfig* config) const
{
- config->writeEntry(QString::fromLatin1("actionType"), QString::fromLatin1("AssignTagAction"));
- config->writeEntry(QString::fromLatin1("actionParams"), m_tagID);
+ config->writeEntry(TQString::fromLatin1("actionType"), TQString::fromLatin1("AssignTagAction"));
+ config->writeEntry(TQString::fromLatin1("actionParams"), m_tagID);
}
bool AssignTagAction::operator==(const AbstractAction& other)
@@ -628,12 +628,12 @@ bool AssignTagAction::operator==(const AbstractAction& other)
return m_tagID == o->m_tagID;
}
-const QString& AssignTagAction::tagID() const
+const TQString& AssignTagAction::tagID() const
{
return m_tagID;
}
-void AssignTagAction::setTagID(const QString& tagID)
+void AssignTagAction::setTagID(const TQString& tagID)
{
m_tagID = tagID;
}
@@ -644,7 +644,7 @@ void DeleteAction::readConfig(KConfig* /*config*/)
void DeleteAction::writeConfig(KConfig* config) const
{
- config->writeEntry(QString::fromLatin1("actionType"), QString::fromLatin1("DeleteAction"));
+ config->writeEntry(TQString::fromLatin1("actionType"), TQString::fromLatin1("DeleteAction"));
}
bool DeleteAction::operator==(const AbstractAction& other)
@@ -661,27 +661,27 @@ void ArticleFilter::readConfig(KConfig* config)
delete d->action;
d->action = 0;
- d->name = config->readEntry(QString::fromLatin1("name"));
- d->id = config->readNumEntry(QString::fromLatin1("id"), 0);
+ d->name = config->readEntry(TQString::fromLatin1("name"));
+ d->id = config->readNumEntry(TQString::fromLatin1("id"), 0);
- QString matcherType = config->readEntry(QString::fromLatin1("matcherType"));
+ TQString matcherType = config->readEntry(TQString::fromLatin1("matcherType"));
- if (matcherType == QString::fromLatin1("TagMatcher"))
+ if (matcherType == TQString::fromLatin1("TagMatcher"))
d->matcher = new TagMatcher();
- else if (matcherType == QString::fromLatin1("ArticleMatcher"))
+ else if (matcherType == TQString::fromLatin1("ArticleMatcher"))
d->matcher = new ArticleMatcher();
if (d->matcher)
d->matcher->readConfig(config);
- QString actionType = config->readEntry(QString::fromLatin1("actionType"));
+ TQString actionType = config->readEntry(TQString::fromLatin1("actionType"));
- if (actionType == QString::fromLatin1("AssignTagAction"))
+ if (actionType == TQString::fromLatin1("AssignTagAction"))
d->action = new AssignTagAction();
- else if (actionType == QString::fromLatin1("DeleteAction"))
+ else if (actionType == TQString::fromLatin1("DeleteAction"))
d->action = new DeleteAction();
- else if (actionType == QString::fromLatin1("SetStatusAction"))
+ else if (actionType == TQString::fromLatin1("SetStatusAction"))
d->action = new SetStatusAction();
if (d->action)
@@ -690,18 +690,18 @@ void ArticleFilter::readConfig(KConfig* config)
void ArticleFilter::writeConfig(KConfig* config) const
{
- config->writeEntry(QString::fromLatin1("name"), d->name);
- config->writeEntry(QString::fromLatin1("id"), d->id);
+ config->writeEntry(TQString::fromLatin1("name"), d->name);
+ config->writeEntry(TQString::fromLatin1("id"), d->id);
d->matcher->writeConfig(config);
d->action->writeConfig(config);
}
-void ArticleFilter::setName(const QString& name)
+void ArticleFilter::setName(const TQString& name)
{
d->name = name;
}
-const QString& ArticleFilter::name() const
+const TQString& ArticleFilter::name() const
{
return d->name;
}
diff --git a/akregator/src/articlefilter.h b/akregator/src/articlefilter.h
index 6acdcbc4f..9a9b4a76d 100644
--- a/akregator/src/articlefilter.h
+++ b/akregator/src/articlefilter.h
@@ -28,9 +28,9 @@
#ifndef ARTICLEFILTER_H
#define ARTICLEFILTER_H
-#include <qstring.h>
-#include <qvaluelist.h>
-#include <qvariant.h>
+#include <tqstring.h>
+#include <tqvaluelist.h>
+#include <tqvariant.h>
class KConfig;
@@ -63,8 +63,8 @@ class ArticleFilter
/** name of the filter, for display in filter list */
- const QString& name() const;
- void setName(const QString& name);
+ const TQString& name() const;
+ void setName(const TQString& name);
int id() const;
@@ -86,7 +86,7 @@ class ArticleFilter
};
-class ArticleFilterList : public QValueList<ArticleFilter>
+class ArticleFilterList : public TQValueList<ArticleFilter>
{
public:
@@ -119,7 +119,7 @@ class TagMatcher : public AbstractMatcher
public:
TagMatcher();
- TagMatcher(const QString& tagID);
+ TagMatcher(const TQString& tagID);
TagMatcher(const TagMatcher& other);
virtual ~TagMatcher();
@@ -190,11 +190,11 @@ class AssignTagAction : public AbstractAction
{
public:
- AssignTagAction(const QString& tagID=QString::null);
+ AssignTagAction(const TQString& tagID=TQString::null);
virtual void exec(Article& article);
- const QString& tagID() const;
- void setTagID(const QString& tagID);
+ const TQString& tagID() const;
+ void setTagID(const TQString& tagID);
virtual void writeConfig(KConfig* config) const;
virtual void readConfig(KConfig* config);
@@ -203,7 +203,7 @@ class AssignTagAction : public AbstractAction
virtual bool operator==(const AbstractAction& other);
private:
- QString m_tagID;
+ TQString m_tagID;
};
/** a powerful matcher supporting multiple criterions, which can be combined via logical OR or AND
@@ -218,7 +218,7 @@ class ArticleMatcher : public AbstractMatcher
};
ArticleMatcher();
- ArticleMatcher( const QValueList<Criterion> &criteria, Association assoc);
+ ArticleMatcher( const TQValueList<Criterion> &criteria, Association assoc);
ArticleMatcher(const ArticleMatcher& other);
virtual ~ArticleMatcher();
@@ -241,13 +241,13 @@ class ArticleMatcher : public AbstractMatcher
private:
- static Association stringToAssociation(const QString& assocStr);
- static QString associationToString(Association association);
+ static Association stringToAssociation(const TQString& assocStr);
+ static TQString associationToString(Association association);
bool anyCriterionMatches( const Article &a ) const;
bool allCriteriaMatch( const Article &a ) const;
- QValueList<Criterion> m_criteria;
+ TQValueList<Criterion> m_criteria;
Association m_association;
};
@@ -262,8 +262,8 @@ class Criterion
Title, Description, Author, Link, Status, KeepFlag
};
- static QString subjectToString(Subject subj);
- static Subject stringToSubject(const QString& subjStr);
+ static TQString subjectToString(Subject subj);
+ static Subject stringToSubject(const TQString& subjStr);
enum Predicate {
Contains = 0x01,
@@ -272,11 +272,11 @@ class Criterion
Negation = 0x80
};
- static QString predicateToString(Predicate pred);
- static Predicate stringToPredicate(const QString& predStr);
+ static TQString predicateToString(Predicate pred);
+ static Predicate stringToPredicate(const TQString& predStr);
Criterion();
- Criterion( Subject subject, Predicate predicate, const QVariant &object );
+ Criterion( Subject subject, Predicate predicate, const TQVariant &object );
bool satisfiedBy( const Article &article ) const;
@@ -285,14 +285,14 @@ class Criterion
Subject subject() const;
Predicate predicate() const;
- QVariant object() const;
+ TQVariant object() const;
bool operator==(const Criterion& other) const
{ return m_subject == other.m_subject && m_predicate == other.m_predicate && m_object == other.m_object; }
private:
Subject m_subject;
Predicate m_predicate;
- QVariant m_object;
+ TQVariant m_object;
};
} // namespace Filters
diff --git a/akregator/src/articleinterceptor.cpp b/akregator/src/articleinterceptor.cpp
index c184713ad..7183ab8e2 100644
--- a/akregator/src/articleinterceptor.cpp
+++ b/akregator/src/articleinterceptor.cpp
@@ -1,7 +1,7 @@
#include "article.h"
#include "articleinterceptor.h"
-#include <qvaluelist.h>
+#include <tqvaluelist.h>
#include <kstaticdeleter.h>
namespace Akregator
@@ -10,7 +10,7 @@ namespace Akregator
class ArticleInterceptorManager::ArticleInterceptorManagerPrivate
{
public:
- QValueList<ArticleInterceptor*> interceptors;
+ TQValueList<ArticleInterceptor*> interceptors;
};
@@ -43,7 +43,7 @@ void ArticleInterceptorManager::removeInterceptor(ArticleInterceptor* intercepto
d->interceptors.remove(interceptor);
}
-QValueList<ArticleInterceptor*> ArticleInterceptorManager::interceptors() const
+TQValueList<ArticleInterceptor*> ArticleInterceptorManager::interceptors() const
{
return d->interceptors;
}
diff --git a/akregator/src/articleinterceptor.h b/akregator/src/articleinterceptor.h
index ed3c550c0..137d88856 100644
--- a/akregator/src/articleinterceptor.h
+++ b/akregator/src/articleinterceptor.h
@@ -33,7 +33,7 @@ class AKREGATOR_EXPORT ArticleInterceptorManager
void addInterceptor(ArticleInterceptor* interceptor);
void removeInterceptor(ArticleInterceptor* interceptor);
- QValueList<ArticleInterceptor*> interceptors() const;
+ TQValueList<ArticleInterceptor*> interceptors() const;
private:
static ArticleInterceptorManager* m_self;
diff --git a/akregator/src/articlelistview.cpp b/akregator/src/articlelistview.cpp
index 210da275b..72527822c 100644
--- a/akregator/src/articlelistview.cpp
+++ b/akregator/src/articlelistview.cpp
@@ -40,17 +40,17 @@
#include <kcharsets.h>
#include <kurl.h>
-#include <qdatetime.h>
-#include <qpixmap.h>
-#include <qpopupmenu.h>
-#include <qptrlist.h>
-#include <qvaluelist.h>
-#include <qwhatsthis.h>
-#include <qheader.h>
-#include <qdragobject.h>
-#include <qsimplerichtext.h>
-#include <qpainter.h>
-#include <qapplication.h>
+#include <tqdatetime.h>
+#include <tqpixmap.h>
+#include <tqpopupmenu.h>
+#include <tqptrlist.h>
+#include <tqvaluelist.h>
+#include <tqwhatsthis.h>
+#include <tqheader.h>
+#include <tqdragobject.h>
+#include <tqsimplerichtext.h>
+#include <tqpainter.h>
+#include <tqapplication.h>
#include <ctime>
@@ -73,7 +73,7 @@ class ArticleListView::ArticleListViewPrivate
ArticleListView* m_parent;
/** maps article to article item */
- QMap<Article, ArticleItem*> articleMap;
+ TQMap<Article, ArticleItem*> articleMap;
TreeNode* node;
Akregator::Filters::ArticleMatcher textFilter;
Akregator::Filters::ArticleMatcher statusFilter;
@@ -131,13 +131,13 @@ class ArticleListView::ArticleItem : public KListViewItem
friend class ArticleListView;
public:
- ArticleItem( QListView *parent, const Article& a);
+ ArticleItem( TQListView *parent, const Article& a);
~ArticleItem();
Article& article();
- void paintCell ( QPainter * p, const QColorGroup & cg, int column, int width, int align );
- virtual int compare(QListViewItem *i, int col, bool ascending) const;
+ void paintCell ( TQPainter * p, const TQColorGroup & cg, int column, int width, int align );
+ virtual int compare(TQListViewItem *i, int col, bool ascending) const;
void updateItem(const Article& article);
@@ -148,14 +148,14 @@ class ArticleListView::ArticleItem : public KListViewItem
private:
Article m_article;
time_t m_pubDate;
- static QPixmap keepFlag() {
- static QPixmap s_keepFlag = QPixmap(locate("data", "akregator/pics/akregator_flag.png"));
+ static TQPixmap keepFlag() {
+ static TQPixmap s_keepFlag = TQPixmap(locate("data", "akregator/pics/akregator_flag.png"));
return s_keepFlag;
}
};
// FIXME: Remove resolveEntities for KDE 4.0, it's now done in the parser
-ArticleListView::ArticleItem::ArticleItem( QListView *parent, const Article& a)
+ArticleListView::ArticleItem::ArticleItem( TQListView *parent, const Article& a)
: KListViewItem( parent, KCharsets::resolveEntities(a.title()), a.feed()->title(), KGlobal::locale()->formatDateTime(a.pubDate(), true, false) ), m_article(a), m_pubDate(a.pubDate().toTime_t())
{
if (a.keep())
@@ -172,19 +172,19 @@ Article& ArticleListView::ArticleItem::article()
}
// paint ze peons
-void ArticleListView::ArticleItem::paintCell ( QPainter * p, const QColorGroup & cg, int column, int width, int align )
+void ArticleListView::ArticleItem::paintCell ( TQPainter * p, const TQColorGroup & cg, int column, int width, int align )
{
if (article().status() == Article::Read)
KListViewItem::paintCell( p, cg, column, width, align );
else
{
// if article status is unread or new, we change the color: FIXME: make colors configurable
- QColorGroup cg2(cg);
+ TQColorGroup cg2(cg);
if (article().status() == Article::Unread)
- cg2.setColor(QColorGroup::Text, Qt::blue);
+ cg2.setColor(TQColorGroup::Text, Qt::blue);
else // New
- cg2.setColor(QColorGroup::Text, Qt::red);
+ cg2.setColor(TQColorGroup::Text, Qt::red);
KListViewItem::paintCell( p, cg2, column, width, align );
}
@@ -194,13 +194,13 @@ void ArticleListView::ArticleItem::paintCell ( QPainter * p, const QColorGroup &
void ArticleListView::ArticleItem::updateItem(const Article& article)
{
m_article = article;
- setPixmap(0, m_article.keep() ? keepFlag() : QPixmap());
+ setPixmap(0, m_article.keep() ? keepFlag() : TQPixmap());
setText(0, KCharsets::resolveEntities(m_article.title()));
setText(1, m_article.feed()->title());
setText(2, KGlobal::locale()->formatDateTime(m_article.pubDate(), true, false));
}
-int ArticleListView::ArticleItem::compare(QListViewItem *i, int col, bool ascending) const {
+int ArticleListView::ArticleItem::compare(TQListViewItem *i, int col, bool ascending) const {
if (col == 2)
{
ArticleItem* item = static_cast<ArticleItem*>(i);
@@ -213,7 +213,7 @@ int ArticleListView::ArticleItem::compare(QListViewItem *i, int col, bool ascend
/* ==================================================================================== */
-ArticleListView::ArticleListView(QWidget *parent, const char *name)
+ArticleListView::ArticleListView(TQWidget *parent, const char *name)
: KListView(parent, name)
{
d = new ArticleListViewPrivate(this);
@@ -226,10 +226,10 @@ ArticleListView::ArticleListView(QWidget *parent, const char *name)
addColumn(i18n("Article"));
addColumn(i18n("Feed"));
addColumn(i18n("Date"));
- setSelectionMode(QListView::Extended);
- setColumnWidthMode(2, QListView::Maximum);
- setColumnWidthMode(1, QListView::Manual);
- setColumnWidthMode(0, QListView::Manual);
+ setSelectionMode(TQListView::Extended);
+ setColumnWidthMode(2, TQListView::Maximum);
+ setColumnWidthMode(1, TQListView::Manual);
+ setColumnWidthMode(0, TQListView::Manual);
setRootIsDecorated(false);
setItemsRenameable(false);
setItemsMovable(false);
@@ -266,18 +266,18 @@ ArticleListView::ArticleListView(QWidget *parent, const char *name)
header()->setStretchEnabled(true, 0);
- QWhatsThis::add(this, i18n("<h2>Article list</h2>"
+ TQWhatsThis::add(this, i18n("<h2>Article list</h2>"
"Here you can browse articles from the currently selected feed. "
"You can also manage articles, as marking them as persistent (\"Keep Article\") or delete them, using the right mouse button menu."
"To view the web page of the article, you can open the article internally in a tab or in an external browser window."));
- connect(this, SIGNAL(currentChanged(QListViewItem*)), this, SLOT(slotCurrentChanged(QListViewItem* )));
- connect(this, SIGNAL(selectionChanged()), this, SLOT(slotSelectionChanged()));
- connect(this, SIGNAL(doubleClicked(QListViewItem*, const QPoint&, int)), this, SLOT(slotDoubleClicked(QListViewItem*, const QPoint&, int)) );
- connect(this, SIGNAL(contextMenu(KListView*, QListViewItem*, const QPoint&)),
- this, SLOT(slotContextMenu(KListView*, QListViewItem*, const QPoint&)));
+ connect(this, TQT_SIGNAL(currentChanged(TQListViewItem*)), this, TQT_SLOT(slotCurrentChanged(TQListViewItem* )));
+ connect(this, TQT_SIGNAL(selectionChanged()), this, TQT_SLOT(slotSelectionChanged()));
+ connect(this, TQT_SIGNAL(doubleClicked(TQListViewItem*, const TQPoint&, int)), this, TQT_SLOT(slotDoubleClicked(TQListViewItem*, const TQPoint&, int)) );
+ connect(this, TQT_SIGNAL(contextMenu(KListView*, TQListViewItem*, const TQPoint&)),
+ this, TQT_SLOT(slotContextMenu(KListView*, TQListViewItem*, const TQPoint&)));
- connect(this, SIGNAL(mouseButtonPressed(int, QListViewItem *, const QPoint &, int)), this, SLOT(slotMouseButtonPressed(int, QListViewItem *, const QPoint &, int)));
+ connect(this, TQT_SIGNAL(mouseButtonPressed(int, TQListViewItem *, const TQPoint &, int)), this, TQT_SLOT(slotMouseButtonPressed(int, TQListViewItem *, const TQPoint &, int)));
}
Article ArticleListView::currentArticle() const
@@ -314,10 +314,10 @@ void ArticleListView::slotShowNode(TreeNode* node)
setUpdatesEnabled(false);
- QValueList<Article> articles = d->node->articles();
+ TQValueList<Article> articles = d->node->articles();
- QValueList<Article>::ConstIterator end = articles.end();
- QValueList<Article>::ConstIterator it = articles.begin();
+ TQValueList<Article>::ConstIterator end = articles.end();
+ TQValueList<Article>::ConstIterator it = articles.begin();
for (; it != end; ++it)
{
@@ -345,14 +345,14 @@ void ArticleListView::slotClear()
clear();
}
-void ArticleListView::slotArticlesAdded(TreeNode* /*node*/, const QValueList<Article>& list)
+void ArticleListView::slotArticlesAdded(TreeNode* /*node*/, const TQValueList<Article>& list)
{
setUpdatesEnabled(false);
bool statusActive = !(d->statusFilter.matchesAll());
bool textActive = !(d->textFilter.matchesAll());
- for (QValueList<Article>::ConstIterator it = list.begin(); it != list.end(); ++it)
+ for (TQValueList<Article>::ConstIterator it = list.begin(); it != list.end(); ++it)
{
if (!d->articleMap.contains(*it))
{
@@ -369,7 +369,7 @@ void ArticleListView::slotArticlesAdded(TreeNode* /*node*/, const QValueList<Art
triggerUpdate();
}
-void ArticleListView::slotArticlesUpdated(TreeNode* /*node*/, const QValueList<Article>& list)
+void ArticleListView::slotArticlesUpdated(TreeNode* /*node*/, const TQValueList<Article>& list)
{
setUpdatesEnabled(false);
@@ -380,9 +380,9 @@ void ArticleListView::slotArticlesUpdated(TreeNode* /*node*/, const QValueList<A
bool statusActive = !(d->statusFilter.matchesAll());
bool textActive = !(d->textFilter.matchesAll());
- QListViewItem* next = 0; // the item to select if a selected item is deleted
+ TQListViewItem* next = 0; // the item to select if a selected item is deleted
- for (QValueList<Article>::ConstIterator it = list.begin(); it != list.end(); ++it)
+ for (TQValueList<Article>::ConstIterator it = list.begin(); it != list.end(); ++it)
{
if (!(*it).isNull() && d->articleMap.contains(*it))
@@ -435,17 +435,17 @@ void ArticleListView::slotArticlesUpdated(TreeNode* /*node*/, const QValueList<A
triggerUpdate();
}
-void ArticleListView::slotArticlesRemoved(TreeNode* /*node*/, const QValueList<Article>& list)
+void ArticleListView::slotArticlesRemoved(TreeNode* /*node*/, const TQValueList<Article>& list)
{
// if only one item is selected and this selected item
// is deleted, we will select the next item in the list
bool singleSelected = selectedArticles().count() == 1;
- QListViewItem* next = 0; // the item to select if a selected item is deleted
+ TQListViewItem* next = 0; // the item to select if a selected item is deleted
setUpdatesEnabled(false);
- for (QValueList<Article>::ConstIterator it = list.begin(); it != list.end(); ++it)
+ for (TQValueList<Article>::ConstIterator it = list.begin(); it != list.end(); ++it)
{
if (d->articleMap.contains(*it))
{
@@ -482,18 +482,18 @@ void ArticleListView::slotArticlesRemoved(TreeNode* /*node*/, const QValueList<A
void ArticleListView::connectToNode(TreeNode* node)
{
- connect(node, SIGNAL(signalDestroyed(TreeNode*)), this, SLOT(slotClear()) );
- connect(node, SIGNAL(signalArticlesAdded(TreeNode*, const QValueList<Article>&)), this, SLOT(slotArticlesAdded(TreeNode*, const QValueList<Article>&)) );
- connect(node, SIGNAL(signalArticlesUpdated(TreeNode*, const QValueList<Article>&)), this, SLOT(slotArticlesUpdated(TreeNode*, const QValueList<Article>&)) );
- connect(node, SIGNAL(signalArticlesRemoved(TreeNode*, const QValueList<Article>&)), this, SLOT(slotArticlesRemoved(TreeNode*, const QValueList<Article>&)) );
+ connect(node, TQT_SIGNAL(signalDestroyed(TreeNode*)), this, TQT_SLOT(slotClear()) );
+ connect(node, TQT_SIGNAL(signalArticlesAdded(TreeNode*, const TQValueList<Article>&)), this, TQT_SLOT(slotArticlesAdded(TreeNode*, const TQValueList<Article>&)) );
+ connect(node, TQT_SIGNAL(signalArticlesUpdated(TreeNode*, const TQValueList<Article>&)), this, TQT_SLOT(slotArticlesUpdated(TreeNode*, const TQValueList<Article>&)) );
+ connect(node, TQT_SIGNAL(signalArticlesRemoved(TreeNode*, const TQValueList<Article>&)), this, TQT_SLOT(slotArticlesRemoved(TreeNode*, const TQValueList<Article>&)) );
}
void ArticleListView::disconnectFromNode(TreeNode* node)
{
- disconnect(node, SIGNAL(signalDestroyed(TreeNode*)), this, SLOT(slotClear()) );
- disconnect(node, SIGNAL(signalArticlesAdded(TreeNode*, const QValueList<Article>&)), this, SLOT(slotArticlesAdded(TreeNode*, const QValueList<Article>&)) );
- disconnect(node, SIGNAL(signalArticlesUpdated(TreeNode*, const QValueList<Article>&)), this, SLOT(slotArticlesUpdated(TreeNode*, const QValueList<Article>&)) );
- disconnect(node, SIGNAL(signalArticlesRemoved(TreeNode*, const QValueList<Article>&)), this, SLOT(slotArticlesRemoved(TreeNode*, const QValueList<Article>&)) );
+ disconnect(node, TQT_SIGNAL(signalDestroyed(TreeNode*)), this, TQT_SLOT(slotClear()) );
+ disconnect(node, TQT_SIGNAL(signalArticlesAdded(TreeNode*, const TQValueList<Article>&)), this, TQT_SLOT(slotArticlesAdded(TreeNode*, const TQValueList<Article>&)) );
+ disconnect(node, TQT_SIGNAL(signalArticlesUpdated(TreeNode*, const TQValueList<Article>&)), this, TQT_SLOT(slotArticlesUpdated(TreeNode*, const TQValueList<Article>&)) );
+ disconnect(node, TQT_SIGNAL(signalArticlesRemoved(TreeNode*, const TQValueList<Article>&)), this, TQT_SLOT(slotArticlesRemoved(TreeNode*, const TQValueList<Article>&)) );
}
void ArticleListView::applyFilters()
@@ -505,14 +505,14 @@ void ArticleListView::applyFilters()
if (!statusActive && !textActive)
{
- for (QListViewItemIterator it(this); it.current(); ++it)
+ for (TQListViewItemIterator it(this); it.current(); ++it)
{
(static_cast<ArticleItem*> (it.current()))->setVisible(true);
}
}
else if (statusActive && !textActive)
{
- for (QListViewItemIterator it(this); it.current(); ++it)
+ for (TQListViewItemIterator it(this); it.current(); ++it)
{
ali = static_cast<ArticleItem*> (it.current());
ali->setVisible( d->statusFilter.matches( ali->article()) );
@@ -520,7 +520,7 @@ void ArticleListView::applyFilters()
}
else if (!statusActive && textActive)
{
- for (QListViewItemIterator it(this); it.current(); ++it)
+ for (TQListViewItemIterator it(this); it.current(); ++it)
{
ali = static_cast<ArticleItem*> (it.current());
ali->setVisible( d->textFilter.matches( ali->article()) );
@@ -528,7 +528,7 @@ void ArticleListView::applyFilters()
}
else // both true
{
- for (QListViewItemIterator it(this); it.current(); ++it)
+ for (TQListViewItemIterator it(this); it.current(); ++it)
{
ali = static_cast<ArticleItem*> (it.current());
ali->setVisible( d->statusFilter.matches( ali->article())
@@ -542,7 +542,7 @@ int ArticleListView::visibleArticles()
{
int visible = 0;
ArticleItem* ali = 0;
- for (QListViewItemIterator it(this); it.current(); ++it) {
+ for (TQListViewItemIterator it(this); it.current(); ++it) {
ali = static_cast<ArticleItem*> (it.current());
visible += ali->isVisible() ? 1 : 0;
}
@@ -550,10 +550,10 @@ int ArticleListView::visibleArticles()
}
// from amarok :)
-void ArticleListView::paintInfoBox(const QString &message)
+void ArticleListView::paintInfoBox(const TQString &message)
{
- QPainter p( viewport() );
- QSimpleRichText t( message, QApplication::font() );
+ TQPainter p( viewport() );
+ TQSimpleRichText t( message, TQApplication::font() );
if ( t.width()+30 >= viewport()->width() || t.height()+30 >= viewport()->height() )
//too big, giving up
@@ -566,10 +566,10 @@ void ArticleListView::paintInfoBox(const QString &message)
p.setBrush( colorGroup().background() );
p.drawRoundRect( x, y, w+30, h+30, (8*200)/w, (8*200)/h );
- t.draw( &p, x+15, y+15, QRect(), colorGroup() );
+ t.draw( &p, x+15, y+15, TQRect(), colorGroup() );
}
-void ArticleListView::viewportPaintEvent(QPaintEvent *e)
+void ArticleListView::viewportPaintEvent(TQPaintEvent *e)
{
KListView::viewportPaintEvent(e);
@@ -577,7 +577,7 @@ void ArticleListView::viewportPaintEvent(QPaintEvent *e)
if(!e)
return;
- QString message = QString::null;
+ TQString message = TQString::null;
//kdDebug() << "visible articles: " << visibleArticles() << endl;
@@ -614,10 +614,10 @@ void ArticleListView::viewportPaintEvent(QPaintEvent *e)
paintInfoBox(message);
}
-QDragObject *ArticleListView::dragObject()
+TQDragObject *ArticleListView::dragObject()
{
- QDragObject* d = 0;
- QValueList<Article> articles = selectedArticles();
+ TQDragObject* d = 0;
+ TQValueList<Article> articles = selectedArticles();
if (!articles.isEmpty())
{
d = new ArticleDrag(articles, this);
@@ -731,7 +731,7 @@ void ArticleListView::slotPreviousUnreadArticle()
}
}
-void ArticleListView::keyPressEvent(QKeyEvent* e)
+void ArticleListView::keyPressEvent(TQKeyEvent* e)
{
e->ignore();
}
@@ -750,7 +750,7 @@ void ArticleListView::slotSelectionChanged()
}
}
-void ArticleListView::slotCurrentChanged(QListViewItem* item)
+void ArticleListView::slotCurrentChanged(TQListViewItem* item)
{
ArticleItem* ai = dynamic_cast<ArticleItem*> (item);
if (ai)
@@ -763,22 +763,22 @@ void ArticleListView::slotCurrentChanged(QListViewItem* item)
}
-void ArticleListView::slotDoubleClicked(QListViewItem* item, const QPoint& p, int i)
+void ArticleListView::slotDoubleClicked(TQListViewItem* item, const TQPoint& p, int i)
{
ArticleItem* ali = dynamic_cast<ArticleItem*>(item);
if (ali)
emit signalDoubleClicked(ali->article(), p, i);
}
-void ArticleListView::slotContextMenu(KListView* /*list*/, QListViewItem* /*item*/, const QPoint& p)
+void ArticleListView::slotContextMenu(KListView* /*list*/, TQListViewItem* /*item*/, const TQPoint& p)
{
- QWidget* w = ActionManager::getInstance()->container("article_popup");
- QPopupMenu* popup = static_cast<QPopupMenu *>(w);
+ TQWidget* w = ActionManager::getInstance()->container("article_popup");
+ TQPopupMenu* popup = static_cast<TQPopupMenu *>(w);
if (popup)
popup->exec(p);
}
-void ArticleListView::slotMouseButtonPressed(int button, QListViewItem* item, const QPoint& p, int column)
+void ArticleListView::slotMouseButtonPressed(int button, TQListViewItem* item, const TQPoint& p, int column)
{
ArticleItem* ali = dynamic_cast<ArticleItem*>(item);
if (ali)
@@ -797,11 +797,11 @@ ArticleListView::~ArticleListView()
d = 0;
}
-QValueList<Article> ArticleListView::selectedArticles() const
+TQValueList<Article> ArticleListView::selectedArticles() const
{
- QValueList<Article> ret;
- QPtrList<QListViewItem> items = selectedItems(false);
- for (QListViewItem* i = items.first(); i; i = items.next() )
+ TQValueList<Article> ret;
+ TQPtrList<TQListViewItem> items = selectedItems(false);
+ for (TQListViewItem* i = items.first(); i; i = items.next() )
ret.append((static_cast<ArticleItem*>(i))->article());
return ret;
}
diff --git a/akregator/src/articlelistview.h b/akregator/src/articlelistview.h
index 7b8ec08e9..cb3a7b5dd 100644
--- a/akregator/src/articlelistview.h
+++ b/akregator/src/articlelistview.h
@@ -44,14 +44,14 @@ namespace Akregator
{
Q_OBJECT
public:
- ArticleListView(QWidget *parent = 0, const char *name = 0);
+ ArticleListView(TQWidget *parent = 0, const char *name = 0);
virtual ~ArticleListView();
/** returns the current article, or a null article if there is none */
Article currentArticle() const;
/** returns a list of currently selected articles */
- QValueList<Article> selectedArticles() const;
+ TQValueList<Article> selectedArticles() const;
enum Columns { itemTitle, feedTitle, pubDate };
@@ -82,13 +82,13 @@ namespace Akregator
signals:
void signalArticleChosen(const Article& article);
- void signalDoubleClicked(const Article&, const QPoint&, int);
- //void signalContextMenu(KListView*, ArticleItem*, const QPoint&);
- void signalMouseButtonPressed(int, const Article&, const QPoint &, int);
+ void signalDoubleClicked(const Article&, const TQPoint&, int);
+ //void signalContextMenu(KListView*, ArticleItem*, const TQPoint&);
+ void signalMouseButtonPressed(int, const Article&, const TQPoint &, int);
protected:
/** reimplemented for kmail-like behaviour */
- virtual void keyPressEvent(QKeyEvent* e);
+ virtual void keyPressEvent(TQKeyEvent* e);
/** applies text filter and status filter by setting visibility
of items accordingly */
@@ -101,26 +101,26 @@ namespace Akregator
/** Paints infobox for filtering and stuff
*/
- void paintInfoBox(const QString &message);
+ void paintInfoBox(const TQString &message);
- virtual void viewportPaintEvent(QPaintEvent *e);
+ virtual void viewportPaintEvent(TQPaintEvent *e);
void connectToNode(TreeNode* node);
void disconnectFromNode(TreeNode* node);
- virtual QDragObject *dragObject();
+ virtual TQDragObject *dragObject();
protected slots:
- void slotArticlesAdded(TreeNode* node, const QValueList<Article>& list);
- void slotArticlesUpdated(TreeNode* node, const QValueList<Article>& list);
- void slotArticlesRemoved(TreeNode* node, const QValueList<Article>& list);
+ void slotArticlesAdded(TreeNode* node, const TQValueList<Article>& list);
+ void slotArticlesUpdated(TreeNode* node, const TQValueList<Article>& list);
+ void slotArticlesRemoved(TreeNode* node, const TQValueList<Article>& list);
- virtual void slotCurrentChanged(QListViewItem* item);
+ virtual void slotCurrentChanged(TQListViewItem* item);
virtual void slotSelectionChanged();
- virtual void slotDoubleClicked(QListViewItem* item, const QPoint& p, int i);
- virtual void slotContextMenu(KListView* list, QListViewItem* item, const QPoint& p);
- virtual void slotMouseButtonPressed(int, QListViewItem *, const QPoint &, int);
+ virtual void slotDoubleClicked(TQListViewItem* item, const TQPoint& p, int i);
+ virtual void slotContextMenu(KListView* list, TQListViewItem* item, const TQPoint& p);
+ virtual void slotMouseButtonPressed(int, TQListViewItem *, const TQPoint &, int);
public: // compat with KDE-3.x assertions, remove for KDE 4
// private:
diff --git a/akregator/src/articleviewer.cpp b/akregator/src/articleviewer.cpp
index 942ce623e..147f4ab41 100644
--- a/akregator/src/articleviewer.cpp
+++ b/akregator/src/articleviewer.cpp
@@ -22,10 +22,10 @@
without including the source code for Qt in the source distribution.
*/
-#include <qdatetime.h>
-#include <qevent.h>
-#include <qscrollview.h>
-#include <qvaluelist.h>
+#include <tqdatetime.h>
+#include <tqevent.h>
+#include <tqscrollview.h>
+#include <tqvaluelist.h>
#include <kaction.h>
#include <kapplication.h>
@@ -56,7 +56,7 @@
namespace Akregator {
// from kmail::headerstyle.cpp
-static inline QString directionOf(const QString &str)
+static inline TQString directionOf(const TQString &str)
{
return str.isRightToLeft() ? "rtl" : "ltr" ;
}
@@ -69,12 +69,12 @@ class ArticleViewer::ShowSummaryVisitor : public TreeNodeVisitor
virtual bool visitFeed(Feed* node)
{
- m_view->m_link = QString();
+ m_view->m_link = TQString();
- QString text;
- text = QString("<div class=\"headerbox\" dir=\"%1\">\n").arg(QApplication::reverseLayout() ? "rtl" : "ltr");
+ TQString text;
+ text = TQString("<div class=\"headerbox\" dir=\"%1\">\n").arg(TQApplication::reverseLayout() ? "rtl" : "ltr");
- text += QString("<div class=\"headertitle\" dir=\"%1\">").arg(directionOf(Utils::stripTags(node->title())));
+ text += TQString("<div class=\"headertitle\" dir=\"%1\">").arg(directionOf(Utils::stripTags(node->title())));
text += node->title();
if(node->unread() == 0)
text += i18n(" (no unread articles)");
@@ -85,26 +85,26 @@ class ArticleViewer::ShowSummaryVisitor : public TreeNodeVisitor
if (!node->image().isNull()) // image
{
- text += QString("<div class=\"body\">");
- QString url=node->xmlUrl();
- QString file = url.replace("/", "_").replace(":", "_");
+ text += TQString("<div class=\"body\">");
+ TQString url=node->xmlUrl();
+ TQString file = url.replace("/", "_").replace(":", "_");
KURL u(m_view->m_imageDir);
u.setFileName(file);
- text += QString("<a href=\"%1\"><img class=\"headimage\" src=\"%2.png\"></a>\n").arg(node->htmlUrl()).arg(u.url());
+ text += TQString("<a href=\"%1\"><img class=\"headimage\" src=\"%2.png\"></a>\n").arg(node->htmlUrl()).arg(u.url());
}
else text += "<div class=\"body\">";
if( !node->description().isEmpty() )
{
- text += QString("<div dir=\"%1\">").arg(Utils::stripTags(directionOf(node->description())));
+ text += TQString("<div dir=\"%1\">").arg(Utils::stripTags(directionOf(node->description())));
text += i18n("<b>Description:</b> %1<br><br>").arg(node->description());
text += "</div>\n"; // /description
}
if ( !node->htmlUrl().isEmpty() )
{
- text += QString("<div dir=\"%1\">").arg(directionOf(node->htmlUrl()));
+ text += TQString("<div dir=\"%1\">").arg(directionOf(node->htmlUrl()));
text += i18n("<b>Homepage:</b> <a href=\"%1\">%2</a>").arg(node->htmlUrl()).arg(node->htmlUrl());
text += "</div>\n"; // / link
}
@@ -118,16 +118,16 @@ class ArticleViewer::ShowSummaryVisitor : public TreeNodeVisitor
virtual bool visitFolder(Folder* node)
{
- m_view->m_link = QString();
+ m_view->m_link = TQString();
- QString text;
- text = QString("<div class=\"headerbox\" dir=\"%1\">\n").arg(QApplication::reverseLayout() ? "rtl" : "ltr");
- text += QString("<div class=\"headertitle\" dir=\"%1\">%2").arg(directionOf(Utils::stripTags(node->title()))).arg(node->title());
+ TQString text;
+ text = TQString("<div class=\"headerbox\" dir=\"%1\">\n").arg(TQApplication::reverseLayout() ? "rtl" : "ltr");
+ text += TQString("<div class=\"headertitle\" dir=\"%1\">%2").arg(directionOf(Utils::stripTags(node->title()))).arg(node->title());
if(node->unread() == 0)
text += i18n(" (no unread articles)");
else
text += i18n(" (1 unread article)", " (%n unread articles)", node->unread());
- text += QString("</div>\n");
+ text += TQString("</div>\n");
text += "</div>\n"; // /headerbox
m_view->renderContent(text);
@@ -136,16 +136,16 @@ class ArticleViewer::ShowSummaryVisitor : public TreeNodeVisitor
virtual bool visitTagNode(TagNode* node)
{
- m_view->m_link = QString();
+ m_view->m_link = TQString();
- QString text;
- text = QString("<div class=\"headerbox\" dir=\"%1\">\n").arg(QApplication::reverseLayout() ? "rtl" : "ltr");
- text += QString("<div class=\"headertitle\" dir=\"%1\">%2").arg(directionOf(Utils::stripTags(node->title()))).arg(node->title());
+ TQString text;
+ text = TQString("<div class=\"headerbox\" dir=\"%1\">\n").arg(TQApplication::reverseLayout() ? "rtl" : "ltr");
+ text += TQString("<div class=\"headertitle\" dir=\"%1\">%2").arg(directionOf(Utils::stripTags(node->title()))).arg(node->title());
if(node->unread() == 0)
text += i18n(" (no unread articles)");
else
text += i18n(" (1 unread article)", " (%n unread articles)", node->unread());
- text += QString("</div>\n");
+ text += TQString("</div>\n");
text += "</div>\n"; // /headerbox
m_view->renderContent(text);
@@ -157,7 +157,7 @@ class ArticleViewer::ShowSummaryVisitor : public TreeNodeVisitor
ArticleViewer* m_view;
};
-ArticleViewer::ArticleViewer(QWidget *parent, const char *name)
+ArticleViewer::ArticleViewer(TQWidget *parent, const char *name)
: Viewer(parent, name), m_htmlFooter(), m_currentText(), m_node(0), m_viewMode(NormalView)
{
setJScriptEnabled(false);
@@ -169,13 +169,13 @@ ArticleViewer::ArticleViewer(QWidget *parent, const char *name)
generateNormalModeCSS();
generateCombinedModeCSS();
- new KAction( i18n("&Scroll Up"), QString::null, "Up", this, SLOT(slotScrollUp()), actionCollection(), "articleviewer_scroll_up" );
- new KAction( i18n("&Scroll Down"), QString::null, "Down", this, SLOT(slotScrollDown()), actionCollection(), "articleviewer_scroll_down" );
+ new KAction( i18n("&Scroll Up"), TQString::null, "Up", this, TQT_SLOT(slotScrollUp()), actionCollection(), "articleviewer_scroll_up" );
+ new KAction( i18n("&Scroll Down"), TQString::null, "Down", this, TQT_SLOT(slotScrollDown()), actionCollection(), "articleviewer_scroll_down" );
- connect(this, SIGNAL(selectionChanged()), this, SLOT(slotSelectionChanged()));
+ connect(this, TQT_SIGNAL(selectionChanged()), this, TQT_SLOT(slotSelectionChanged()));
- connect(kapp, SIGNAL(kdisplayPaletteChanged()), this, SLOT(slotPaletteOrFontChanged()) );
- connect(kapp, SIGNAL(kdisplayFontChanged()), this, SLOT(slotPaletteOrFontChanged()) );
+ connect(kapp, TQT_SIGNAL(kdisplayPaletteChanged()), this, TQT_SLOT(slotPaletteOrFontChanged()) );
+ connect(kapp, TQT_SIGNAL(kdisplayFontChanged()), this, TQT_SLOT(slotPaletteOrFontChanged()) );
m_imageDir.setPath(KGlobal::dirs()->saveLocation("cache", "akregator/Media/"));
m_htmlFooter = "</body></html>";
@@ -188,10 +188,10 @@ ArticleViewer::~ArticleViewer()
void ArticleViewer::generateNormalModeCSS()
{
- const QColorGroup & cg = QApplication::palette().active();
+ const TQColorGroup & cg = TQApplication::palette().active();
// from kmail::headerstyle.cpp
- m_normalModeCSS = QString(
+ m_normalModeCSS = TQString(
"@media screen, print {"
"body {\n"
" font-family: \"%1\" ! important;\n"
@@ -199,13 +199,13 @@ void ArticleViewer::generateNormalModeCSS()
" color: %3 ! important;\n"
" background: %4 ! important;\n"
"}\n\n").arg(Settings::standardFont())
- .arg(QString::number(pointsToPixel(Settings::mediumFontSize()))+"px")
+ .arg(TQString::number(pointsToPixel(Settings::mediumFontSize()))+"px")
.arg(cg.text().name())
.arg(cg.base().name());
- m_normalModeCSS += QString(
+ m_normalModeCSS += TQString(
"a {\n"
- + QString(" color: %1 ! important;\n")
- + QString(!Settings::underlineLinks() ? " text-decoration: none ! important;\n" : "")
+ + TQString(" color: %1 ! important;\n")
+ + TQString(!Settings::underlineLinks() ? " text-decoration: none ! important;\n" : "")
+ "}\n\n"
+".headerbox {\n"
+" background: %2 ! important;\n"
@@ -218,7 +218,7 @@ void ArticleViewer::generateNormalModeCSS()
.arg(cg.background().name())
.arg(cg.text().name());
- m_normalModeCSS += QString(".headertitle a:link { color: %1 ! important; }\n"
+ m_normalModeCSS += TQString(".headertitle a:link { color: %1 ! important; }\n"
".headertitle a:visited { color: %2 ! important; }\n"
".headertitle a:hover{ color: %3 ! important; }\n"
".headertitle a:active { color: %4 ! important; }\n")
@@ -227,7 +227,7 @@ void ArticleViewer::generateNormalModeCSS()
.arg(cg.highlightedText().name())
.arg(cg.highlightedText().name());
- m_normalModeCSS += QString(
+ m_normalModeCSS += TQString(
".headertitle {\n"
" background: %1 ! important;\n"
" padding:2px;\n"
@@ -247,7 +247,7 @@ void ArticleViewer::generateNormalModeCSS()
"}\n\n").arg(cg.highlight().name())
.arg(cg.highlightedText().name());
- m_normalModeCSS += QString(
+ m_normalModeCSS += TQString(
"body { clear: none; }\n\n"
".content {\n"
" display: block;\n"
@@ -267,10 +267,10 @@ void ArticleViewer::generateNormalModeCSS()
void ArticleViewer::generateCombinedModeCSS()
{
- const QColorGroup & cg = QApplication::palette().active();
+ const TQColorGroup & cg = TQApplication::palette().active();
// from kmail::headerstyle.cpp
- m_combinedModeCSS = QString (
+ m_combinedModeCSS = TQString (
// "<style type=\"text/css\">\n"
"@media screen, print {"
"body {\n"
@@ -279,13 +279,13 @@ void ArticleViewer::generateCombinedModeCSS()
" color: %3 ! important;\n"
" background: %4 ! important;\n"
"}\n\n").arg(Settings::standardFont())
- .arg(QString::number(pointsToPixel(Settings::mediumFontSize()))+"px")
+ .arg(TQString::number(pointsToPixel(Settings::mediumFontSize()))+"px")
.arg(cg.text().name())
.arg(cg.base().name());
m_combinedModeCSS += (
"a {\n"
- + QString(" color: %1 ! important;\n")
- + QString(!Settings::underlineLinks() ? " text-decoration: none ! important;\n" : "")
+ + TQString(" color: %1 ! important;\n")
+ + TQString(!Settings::underlineLinks() ? " text-decoration: none ! important;\n" : "")
+ "}\n\n"
+".headerbox {\n"
+" background: %2 ! important;\n"
@@ -298,7 +298,7 @@ void ArticleViewer::generateCombinedModeCSS()
.arg(cg.background().name())
.arg(cg.text().name());
- m_combinedModeCSS += QString(".headertitle a:link { color: %1 ! important; }\n"
+ m_combinedModeCSS += TQString(".headertitle a:link { color: %1 ! important; }\n"
".headertitle a:visited { color: %2 ! important; }\n"
".headertitle a:hover{ color: %3 ! important; }\n"
".headertitle a:active { color: %4 ! important; }\n")
@@ -306,7 +306,7 @@ void ArticleViewer::generateCombinedModeCSS()
.arg(cg.highlightedText().name())
.arg(cg.highlightedText().name())
.arg(cg.highlightedText().name());
- m_combinedModeCSS += QString(
+ m_combinedModeCSS += TQString(
".headertitle {\n"
" background: %1 ! important;\n"
" padding:2px;\n"
@@ -326,7 +326,7 @@ void ArticleViewer::generateCombinedModeCSS()
"}\n\n").arg(cg.highlight().name())
.arg(cg.highlightedText().name());
- m_combinedModeCSS += QString(
+ m_combinedModeCSS += TQString(
"body { clear: none; }\n\n"
".content {\n"
" display: block;\n"
@@ -366,8 +366,8 @@ bool ArticleViewer::openURL(const KURL& url)
void ArticleViewer::displayAboutPage()
{
- QString location = locate("data", "akregator/about/main.html");
- QString content = KPIM::kFileToString(location);
+ TQString location = locate("data", "akregator/about/main.html");
+ TQString content = KPIM::kFileToString(location);
content = content.arg( locate( "data", "libkdepim/about/kde_infopage.css" ) );
if ( kapp->reverseLayout() )
content = content.arg( "@import \"%1\";" ).arg( locate( "data", "libkdepim/about/kde_infopage_rtl.css" ) );
@@ -375,7 +375,7 @@ void ArticleViewer::displayAboutPage()
content = content.arg( "" );
begin(KURL( location ));
- QString info =
+ TQString info =
i18n("%1: Akregator version; %2: help:// URL; %3: homepage URL; "
"--- end of comment ---",
"<h2 style='margin-top: 0px;'>Welcome to Akregator %1</h2>"
@@ -392,22 +392,22 @@ void ArticleViewer::displayAboutPage()
.arg(AKREGATOR_VERSION) // Akregator version
.arg("http://akregator.kde.org/"); // Akregator homepage URL
- QString fontSize = QString::number( pointsToPixel( Settings::mediumFontSize() ));
- QString appTitle = i18n("Akregator");
- QString catchPhrase = ""; //not enough space for a catch phrase at default window size i18n("Part of the Kontact Suite");
- QString quickDescription = i18n("An RSS feed reader for the K Desktop Environment.");
+ TQString fontSize = TQString::number( pointsToPixel( Settings::mediumFontSize() ));
+ TQString appTitle = i18n("Akregator");
+ TQString catchPhrase = ""; //not enough space for a catch phrase at default window size i18n("Part of the Kontact Suite");
+ TQString quickDescription = i18n("An RSS feed reader for the K Desktop Environment.");
write(content.arg(fontSize).arg(appTitle).arg(catchPhrase).arg(quickDescription).arg(info));
end();
}
-QString ArticleViewer::formatArticleNormalMode(Feed* feed, const Article& article)
+TQString ArticleViewer::formatArticleNormalMode(Feed* feed, const Article& article)
{
- QString text;
- text = QString("<div class=\"headerbox\" dir=\"%1\">\n").arg(QApplication::reverseLayout() ? "rtl" : "ltr");
+ TQString text;
+ text = TQString("<div class=\"headerbox\" dir=\"%1\">\n").arg(TQApplication::reverseLayout() ? "rtl" : "ltr");
if (!article.title().isEmpty())
{
- text += QString("<div class=\"headertitle\" dir=\"%1\">\n").arg(directionOf(Utils::stripTags(article.title())));
+ text += TQString("<div class=\"headertitle\" dir=\"%1\">\n").arg(directionOf(Utils::stripTags(article.title())));
if (article.link().isValid())
text += "<a href=\""+article.link().url()+"\">";
text += article.title().replace("<", "&lt;").replace(">", "&gt;"); // TODO: better leave things escaped in the parser
@@ -417,16 +417,16 @@ QString ArticleViewer::formatArticleNormalMode(Feed* feed, const Article& articl
}
if (article.pubDate().isValid())
{
- text += QString("<span class=\"header\" dir=\"%1\">").arg(directionOf(i18n("Date")));
- text += QString ("%1:").arg(i18n("Date"));
+ text += TQString("<span class=\"header\" dir=\"%1\">").arg(directionOf(i18n("Date")));
+ text += TQString ("%1:").arg(i18n("Date"));
text += "</span><span class=\"headertext\">";
text += KGlobal::locale()->formatDateTime(article.pubDate(), false, false)+"</span>\n"; // TODO: might need RTL?
}
- QString author = article.author();
+ TQString author = article.author();
if (!author.isEmpty())
{
- text += QString("<br/><span class=\"header\" dir=\"%1\">").arg(directionOf(i18n("Author")));
- text += QString ("%1:").arg(i18n("Author"));
+ text += TQString("<br/><span class=\"header\" dir=\"%1\">").arg(directionOf(i18n("Author")));
+ text += TQString ("%1:").arg(i18n("Author"));
text += "</span><span class=\"headertext\">";
text += author+"</span>\n"; // TODO: might need RTL?
}
@@ -434,17 +434,17 @@ QString ArticleViewer::formatArticleNormalMode(Feed* feed, const Article& articl
if (feed && !feed->image().isNull())
{
- QString file = Utils::fileNameForUrl(feed->xmlUrl());
+ TQString file = Utils::fileNameForUrl(feed->xmlUrl());
KURL u(m_imageDir);
u.setFileName(file);
- text += QString("<a href=\"%1\"><img class=\"headimage\" src=\"%2.png\"></a>\n").arg(feed->htmlUrl()).arg(u.url());
+ text += TQString("<a href=\"%1\"><img class=\"headimage\" src=\"%2.png\"></a>\n").arg(feed->htmlUrl()).arg(u.url());
}
if (!article.description().isEmpty())
{
- text += QString("<div dir=\"%1\">").arg(directionOf(Utils::stripTags(article.description())) );
+ text += TQString("<div dir=\"%1\">").arg(directionOf(Utils::stripTags(article.description())) );
text += "<span class=\"content\">"+article.description()+"</span>";
text += "</div>";
}
@@ -458,7 +458,7 @@ QString ArticleViewer::formatArticleNormalMode(Feed* feed, const Article& articl
text += "\">" + i18n( "Comments");
if (article.comments())
{
- text += " ("+ QString::number(article.comments()) +")";
+ text += " ("+ TQString::number(article.comments()) +")";
}
text += "</a>";
}
@@ -481,28 +481,28 @@ QString ArticleViewer::formatArticleNormalMode(Feed* feed, const Article& articl
if (!article.enclosure().isNull())
{
- //QString url = article.enclosure().url();
- //QString type = article.enclosure().type();
+ //TQString url = article.enclosure().url();
+ //TQString type = article.enclosure().type();
//int length = article.enclosure().length();
- //QString lengthStr = KIO::convertSize(length);
+ //TQString lengthStr = KIO::convertSize(length);
- //text += QString("<hr><div><a href=\"%1\">%2</a> (%3, %4)</div>").arg(url).arg(url).arg(lengthStr).arg(type);
+ //text += TQString("<hr><div><a href=\"%1\">%2</a> (%3, %4)</div>").arg(url).arg(url).arg(lengthStr).arg(type);
}
//kdDebug() << text << endl;
return text;
}
-QString ArticleViewer::formatArticleCombinedMode(Feed* feed, const Article& article)
+TQString ArticleViewer::formatArticleCombinedMode(Feed* feed, const Article& article)
{
- QString text;
- text = QString("<div class=\"headerbox\" dir=\"%1\">\n").arg(QApplication::reverseLayout() ? "rtl" : "ltr");
+ TQString text;
+ text = TQString("<div class=\"headerbox\" dir=\"%1\">\n").arg(TQApplication::reverseLayout() ? "rtl" : "ltr");
KURL link = article.link();
if (!article.title().isEmpty())
{
- text += QString("<div class=\"headertitle\" dir=\"%1\">\n").arg(directionOf(Utils::stripTags(article.title())));
+ text += TQString("<div class=\"headertitle\" dir=\"%1\">\n").arg(directionOf(Utils::stripTags(article.title())));
if (link.isValid())
text += "<a href=\""+link.url()+"\">";
text += article.title().replace("<", "&lt;").replace(">", "&gt;"); // TODO: better leave things escaped in the parser
@@ -512,17 +512,17 @@ QString ArticleViewer::formatArticleCombinedMode(Feed* feed, const Article& arti
}
if (article.pubDate().isValid())
{
- text += QString("<span class=\"header\" dir=\"%1\">").arg(directionOf(i18n("Date")));
- text += QString ("%1:").arg(i18n("Date"));
+ text += TQString("<span class=\"header\" dir=\"%1\">").arg(directionOf(i18n("Date")));
+ text += TQString ("%1:").arg(i18n("Date"));
text += "</span><span class=\"headertext\">";
text += KGlobal::locale()->formatDateTime(article.pubDate(), false, false)+"</span>\n"; // TODO: might need RTL?
}
- QString author = article.author();
+ TQString author = article.author();
if (!author.isEmpty())
{
- text += QString("<br/><span class=\"header\" dir=\"%1\">").arg(directionOf(i18n("Author")));
- text += QString ("%1:").arg(i18n("Author"));
+ text += TQString("<br/><span class=\"header\" dir=\"%1\">").arg(directionOf(i18n("Author")));
+ text += TQString ("%1:").arg(i18n("Author"));
text += "</span><span class=\"headertext\">";
text += author+"</span>\n"; // TODO: might need RTL?
}
@@ -531,17 +531,17 @@ QString ArticleViewer::formatArticleCombinedMode(Feed* feed, const Article& arti
if (feed && !feed->image().isNull())
{
- QString file = Utils::fileNameForUrl(feed->xmlUrl());
+ TQString file = Utils::fileNameForUrl(feed->xmlUrl());
KURL u(m_imageDir);
u.setFileName(file);
- text += QString("<a href=\"%1\"><img class=\"headimage\" src=\"%2.png\"></a>\n").arg(feed->htmlUrl()).arg(u.url());
+ text += TQString("<a href=\"%1\"><img class=\"headimage\" src=\"%2.png\"></a>\n").arg(feed->htmlUrl()).arg(u.url());
}
if (!article.description().isEmpty())
{
- text += QString("<div dir=\"%1\">").arg(directionOf(Utils::stripTags(article.description())) );
+ text += TQString("<div dir=\"%1\">").arg(directionOf(Utils::stripTags(article.description())) );
text += "<span class=\"content\">"+article.description()+"</span>";
text += "</div>";
}
@@ -555,7 +555,7 @@ QString ArticleViewer::formatArticleCombinedMode(Feed* feed, const Article& arti
text += "\">" + i18n( "Comments");
if (article.comments())
{
- text += " ("+ QString::number(article.comments()) +")";
+ text += " ("+ TQString::number(article.comments()) +")";
}
text += "</a>";
}
@@ -580,7 +580,7 @@ QString ArticleViewer::formatArticleCombinedMode(Feed* feed, const Article& arti
}
-void ArticleViewer::renderContent(const QString& text)
+void ArticleViewer::renderContent(const TQString& text)
{
closeURL();
m_currentText = text;
@@ -592,7 +592,7 @@ void ArticleViewer::renderContent(const QString& text)
void ArticleViewer::beginWriting()
{
- QString head = QString("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">\n <html><head><title>.</title></head>");
+ TQString head = TQString("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">\n <html><head><title>.</title></head>");
view()->setContentsPos(0,0);
begin(m_link);
setUserStyleSheet(m_viewMode == CombinedView ? m_combinedModeCSS : m_normalModeCSS);
@@ -658,15 +658,15 @@ void ArticleViewer::slotUpdateCombinedView()
if (!m_node)
return slotClear();
- QValueList<Article> articles = m_node->articles();
+ TQValueList<Article> articles = m_node->articles();
qHeapSort(articles);
- QValueList<Article>::ConstIterator end = articles.end();
- QValueList<Article>::ConstIterator it = articles.begin();
+ TQValueList<Article>::ConstIterator end = articles.end();
+ TQValueList<Article>::ConstIterator it = articles.begin();
- QString text;
+ TQString text;
int num = 0;
- QTime spent;
+ TQTime spent;
spent.start();
for ( ; it != end; ++it)
@@ -684,22 +684,22 @@ void ArticleViewer::slotUpdateCombinedView()
}
-void ArticleViewer::slotArticlesUpdated(TreeNode* /*node*/, const QValueList<Article>& /*list*/)
+void ArticleViewer::slotArticlesUpdated(TreeNode* /*node*/, const TQValueList<Article>& /*list*/)
{
if (m_viewMode == CombinedView)
slotUpdateCombinedView();
}
-void ArticleViewer::slotArticlesAdded(TreeNode* /*node*/, const QValueList<Article>& /*list*/)
+void ArticleViewer::slotArticlesAdded(TreeNode* /*node*/, const TQValueList<Article>& /*list*/)
{
}
-void ArticleViewer::slotArticlesRemoved(TreeNode* /*node*/, const QValueList<Article>& /*list*/)
+void ArticleViewer::slotArticlesRemoved(TreeNode* /*node*/, const TQValueList<Article>& /*list*/)
{
}
/* testingtesting :)
-void ArticleViewer::slotPopupMenu(KXMLGUIClient*, const QPoint& p, const KURL& kurl, const KParts::URLArgs&, KParts::BrowserExtension::PopupFlags, mode_t)
+void ArticleViewer::slotPopupMenu(KXMLGUIClient*, const TQPoint& p, const KURL& kurl, const KParts::URLArgs&, KParts::BrowserExtension::PopupFlags, mode_t)
{
kdDebug() << m_link << endl;
kdDebug() << kurl.url() << endl;
@@ -712,7 +712,7 @@ void ArticleViewer::slotClear()
m_node = 0;
m_article = Article();
- renderContent(QString());
+ renderContent(TQString());
}
void ArticleViewer::slotShowNode(TreeNode* node)
@@ -735,12 +735,12 @@ void ArticleViewer::slotShowNode(TreeNode* node)
slotUpdateCombinedView();
}
-void ArticleViewer::keyPressEvent(QKeyEvent* e)
+void ArticleViewer::keyPressEvent(TQKeyEvent* e)
{
e->ignore();
}
-void ArticleViewer::urlSelected(const QString &url, int button, int state, const QString& _target, KParts::URLArgs args)
+void ArticleViewer::urlSelected(const TQString &url, int button, int state, const TQString& _target, KParts::URLArgs args)
{
if(url == "config:/disable_introduction") {
if(KMessageBox::questionYesNo( widget(), i18n("Are you sure you want to disable this introduction page?"), i18n("Disable Introduction Page"), i18n("Disable"), i18n("Keep Enabled") ) == KMessageBox::Yes) {
@@ -766,15 +766,15 @@ void ArticleViewer::connectToNode(TreeNode* node)
{
if (m_viewMode == CombinedView)
{
-// connect( node, SIGNAL(signalChanged(TreeNode*)), this, SLOT(slotUpdateCombinedView() ) );
- connect( node, SIGNAL(signalArticlesAdded(TreeNode*, const QValueList<Article>&)), this, SLOT(slotArticlesAdded(TreeNode*, const QValueList<Article>&)));
- connect( node, SIGNAL(signalArticlesRemoved(TreeNode*, const QValueList<Article>&)), this, SLOT(slotArticlesRemoved(TreeNode*, const QValueList<Article>&)));
- connect( node, SIGNAL(signalArticlesUpdated(TreeNode*, const QValueList<Article>&)), this, SLOT(slotArticlesUpdated(TreeNode*, const QValueList<Article>&)));
+// connect( node, TQT_SIGNAL(signalChanged(TreeNode*)), this, TQT_SLOT(slotUpdateCombinedView() ) );
+ connect( node, TQT_SIGNAL(signalArticlesAdded(TreeNode*, const TQValueList<Article>&)), this, TQT_SLOT(slotArticlesAdded(TreeNode*, const TQValueList<Article>&)));
+ connect( node, TQT_SIGNAL(signalArticlesRemoved(TreeNode*, const TQValueList<Article>&)), this, TQT_SLOT(slotArticlesRemoved(TreeNode*, const TQValueList<Article>&)));
+ connect( node, TQT_SIGNAL(signalArticlesUpdated(TreeNode*, const TQValueList<Article>&)), this, TQT_SLOT(slotArticlesUpdated(TreeNode*, const TQValueList<Article>&)));
}
if (m_viewMode == SummaryView)
- connect( node, SIGNAL(signalChanged(TreeNode*)), this, SLOT(slotShowSummary(TreeNode*) ) );
+ connect( node, TQT_SIGNAL(signalChanged(TreeNode*)), this, TQT_SLOT(slotShowSummary(TreeNode*) ) );
- connect( node, SIGNAL(signalDestroyed(TreeNode*)), this, SLOT(slotClear() ) );
+ connect( node, TQT_SIGNAL(signalDestroyed(TreeNode*)), this, TQT_SLOT(slotClear() ) );
}
}
@@ -782,12 +782,12 @@ void ArticleViewer::disconnectFromNode(TreeNode* node)
{
if (node)
{
-// disconnect( node, SIGNAL(signalChanged(TreeNode*)), this, SLOT(slotUpdateCombinedView() ) );
- disconnect( node, SIGNAL(signalDestroyed(TreeNode*)), this, SLOT(slotClear() ) );
- disconnect( node, SIGNAL(signalChanged(TreeNode*)), this, SLOT(slotShowSummary(TreeNode*) ) );
- disconnect( node, SIGNAL(signalArticlesAdded(TreeNode*, const QValueList<Article>&)), this, SLOT(slotArticlesAdded(TreeNode*, const QValueList<Article>&)));
- disconnect( node, SIGNAL(signalArticlesRemoved(TreeNode*, const QValueList<Article>&)), this, SLOT(slotArticlesRemoved(TreeNode*, const QValueList<Article>&)));
- disconnect( node, SIGNAL(signalArticlesUpdated(TreeNode*, const QValueList<Article>&)), this, SLOT(slotArticlesUpdated(TreeNode*, const QValueList<Article>&)));
+// disconnect( node, TQT_SIGNAL(signalChanged(TreeNode*)), this, TQT_SLOT(slotUpdateCombinedView() ) );
+ disconnect( node, TQT_SIGNAL(signalDestroyed(TreeNode*)), this, TQT_SLOT(slotClear() ) );
+ disconnect( node, TQT_SIGNAL(signalChanged(TreeNode*)), this, TQT_SLOT(slotShowSummary(TreeNode*) ) );
+ disconnect( node, TQT_SIGNAL(signalArticlesAdded(TreeNode*, const TQValueList<Article>&)), this, TQT_SLOT(slotArticlesAdded(TreeNode*, const TQValueList<Article>&)));
+ disconnect( node, TQT_SIGNAL(signalArticlesRemoved(TreeNode*, const TQValueList<Article>&)), this, TQT_SLOT(slotArticlesRemoved(TreeNode*, const TQValueList<Article>&)));
+ disconnect( node, TQT_SIGNAL(signalArticlesUpdated(TreeNode*, const TQValueList<Article>&)), this, TQT_SLOT(slotArticlesUpdated(TreeNode*, const TQValueList<Article>&)));
}
}
diff --git a/akregator/src/articleviewer.h b/akregator/src/articleviewer.h
index a9eb65b65..25928395e 100644
--- a/akregator/src/articleviewer.h
+++ b/akregator/src/articleviewer.h
@@ -28,8 +28,8 @@
#include <klocale.h>
-#include <qcolor.h>
-#include <qfont.h>
+#include <tqcolor.h>
+#include <tqfont.h>
#include "article.h"
#include "articlefilter.h"
@@ -50,7 +50,7 @@ namespace Akregator
Q_OBJECT
public:
/** Constructor */
- ArticleViewer(QWidget* parent, const char* name);
+ ArticleViewer(TQWidget* parent, const char* name);
virtual ~ArticleViewer();
virtual bool openURL(const KURL &url);
@@ -90,14 +90,14 @@ namespace Akregator
protected slots:
- void slotArticlesUpdated(TreeNode* node, const QValueList<Article>& list);
- void slotArticlesAdded(TreeNode* node, const QValueList<Article>& list);
- void slotArticlesRemoved(TreeNode* node, const QValueList<Article>& list);
+ void slotArticlesUpdated(TreeNode* node, const TQValueList<Article>& list);
+ void slotArticlesAdded(TreeNode* node, const TQValueList<Article>& list);
+ void slotArticlesRemoved(TreeNode* node, const TQValueList<Article>& list);
protected:
- virtual void keyPressEvent(QKeyEvent* e);
- virtual void urlSelected (const QString &url, int button, int state, const QString &_target, KParts::URLArgs args);
+ virtual void keyPressEvent(TQKeyEvent* e);
+ virtual void urlSelected (const TQString &url, int button, int state, const TQString &_target, KParts::URLArgs args);
public: // compat with KDE-3.x assertions, remove for KDE 4
// private:
@@ -108,19 +108,19 @@ namespace Akregator
/** renders @c body. Use this method whereever possible.
@param body html to render, without header and footer */
- void renderContent(const QString& body);
+ void renderContent(const TQString& body);
/** Takes an article and renders it as HTML with settings for normal view and widescreen view
@param feed article's feed (used for feed icon atm) -- article.feed() would do. better use a (No)Icon flag. -fo
@param article The article to render
@return the rendered article as HTML */
- QString formatArticleNormalMode(Feed* feed, const Article& article);
+ TQString formatArticleNormalMode(Feed* feed, const Article& article);
/** Takes an article and renders it as HTML with settings for combined view
@param feed article's feed (used for feed icon atm) -- article.feed() would do. better use a (No)Icon flag. -fo
@param article The article to render
@return the rendered article as HTML */
- QString formatArticleCombinedMode(Feed* feed, const Article& article);
+ TQString formatArticleCombinedMode(Feed* feed, const Article& article);
/** Resets the canvas and adds writes the HTML header to it.
*/
@@ -136,10 +136,10 @@ namespace Akregator
void connectToNode(TreeNode* node);
void disconnectFromNode(TreeNode* node);
- QString m_normalModeCSS;
- QString m_combinedModeCSS;
- QString m_htmlFooter;
- QString m_currentText;
+ TQString m_normalModeCSS;
+ TQString m_combinedModeCSS;
+ TQString m_htmlFooter;
+ TQString m_currentText;
KURL m_imageDir;
TreeNode* m_node;
Article m_article;
diff --git a/akregator/src/configdialog.cpp b/akregator/src/configdialog.cpp
index c64f0ac0d..52e26548a 100644
--- a/akregator/src/configdialog.cpp
+++ b/akregator/src/configdialog.cpp
@@ -22,7 +22,7 @@
without including the source code for Qt in the source distribution.
*/
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include <kcombobox.h>
#include <klocale.h>
@@ -35,13 +35,13 @@
#include "settings_archive.h"
#include "settings_browser.h"
#include "settings_general.h"
-#include <qslider.h>
-#include <qlabel.h>
+#include <tqslider.h>
+#include <tqlabel.h>
namespace Akregator
{
-ConfigDialog::ConfigDialog(QWidget* parent, const char* name, KConfigSkeleton* config, DialogType dialogType, int dialogButtons, ButtonCode defaultButton, bool modal) : KConfigDialog(parent, name, config, dialogType, dialogButtons, defaultButton, modal)
+ConfigDialog::ConfigDialog(TQWidget* parent, const char* name, KConfigSkeleton* config, DialogType dialogType, int dialogButtons, ButtonCode defaultButton, bool modal) : KConfigDialog(parent, name, config, dialogType, dialogButtons, defaultButton, modal)
{
addPage(new SettingsGeneral(this, "General"), i18n("General"), "package_settings");
addPage(new SettingsArchive(this, "Archive"), i18n("Archive"), "package_settings");
diff --git a/akregator/src/configdialog.h b/akregator/src/configdialog.h
index 01e8b958a..78136e324 100644
--- a/akregator/src/configdialog.h
+++ b/akregator/src/configdialog.h
@@ -37,7 +37,7 @@ class ConfigDialog : public KConfigDialog
Q_OBJECT
public:
- ConfigDialog(QWidget *parent, const char *name, KConfigSkeleton *config, DialogType dialogType=IconList, int dialogButtons=Default|Ok|Apply|Cancel|Help, ButtonCode defaultButton=Ok, bool modal=false);
+ ConfigDialog(TQWidget *parent, const char *name, KConfigSkeleton *config, DialogType dialogType=IconList, int dialogButtons=Default|Ok|Apply|Cancel|Help, ButtonCode defaultButton=Ok, bool modal=false);
virtual ~ConfigDialog();
diff --git a/akregator/src/dragobjects.cpp b/akregator/src/dragobjects.cpp
index 9f7f812b7..679166e1e 100644
--- a/akregator/src/dragobjects.cpp
+++ b/akregator/src/dragobjects.cpp
@@ -25,27 +25,27 @@
#include "dragobjects.h"
#include "feed.h"
-#include <qcstring.h>
+#include <tqcstring.h>
namespace Akregator {
class Article;
-ArticleDrag::ArticleDrag(const QValueList<Article>& articles, QWidget* dragSource, const char* name)
+ArticleDrag::ArticleDrag(const TQValueList<Article>& articles, TQWidget* dragSource, const char* name)
: KURLDrag(articleURLs(articles), dragSource, name), m_items(articlesToDragItems(articles))
{}
-bool ArticleDrag::canDecode(const QMimeSource* e)
+bool ArticleDrag::canDecode(const TQMimeSource* e)
{
return e->provides("akregator/articles");
}
-bool ArticleDrag::decode(const QMimeSource* e, QValueList<ArticleDragItem>& articles)
+bool ArticleDrag::decode(const TQMimeSource* e, TQValueList<ArticleDragItem>& articles)
{
articles.clear();
- QByteArray array = e->encodedData("akregator/articles");
+ TQByteArray array = e->encodedData("akregator/articles");
- QDataStream stream(array, IO_ReadOnly);
+ TQDataStream stream(array, IO_ReadOnly);
while (!stream.atEnd())
{
@@ -68,16 +68,16 @@ const char* ArticleDrag::format(int i) const
return 0;
}
-QByteArray ArticleDrag::encodedData(const char* mime) const
+TQByteArray ArticleDrag::encodedData(const char* mime) const
{
- QCString mimetype(mime);
+ TQCString mimetype(mime);
if (mimetype == "akregator/articles")
{
- QByteArray ba;
- QDataStream stream(ba, IO_WriteOnly);
+ TQByteArray ba;
+ TQDataStream stream(ba, IO_WriteOnly);
- QValueList<ArticleDragItem>::ConstIterator end = m_items.end();
- for (QValueList<ArticleDragItem>::ConstIterator it = m_items.begin(); it != end; ++it)
+ TQValueList<ArticleDragItem>::ConstIterator end = m_items.end();
+ for (TQValueList<ArticleDragItem>::ConstIterator it = m_items.begin(); it != end; ++it)
{
stream << (*it).feedURL;
stream << (*it).guid;
@@ -90,13 +90,13 @@ QByteArray ArticleDrag::encodedData(const char* mime) const
}
}
-QValueList<ArticleDragItem> ArticleDrag::articlesToDragItems(const QValueList<Article>& articles)
+TQValueList<ArticleDragItem> ArticleDrag::articlesToDragItems(const TQValueList<Article>& articles)
{
- QValueList<ArticleDragItem> items;
+ TQValueList<ArticleDragItem> items;
- QValueList<Article>::ConstIterator end(articles.end());
+ TQValueList<Article>::ConstIterator end(articles.end());
- for (QValueList<Article>::ConstIterator it = articles.begin(); it != end; ++it)
+ for (TQValueList<Article>::ConstIterator it = articles.begin(); it != end; ++it)
{
ArticleDragItem i;
i.feedURL = (*it).feed() ? (*it).feed()->xmlUrl() : "";
@@ -107,11 +107,11 @@ QValueList<ArticleDragItem> ArticleDrag::articlesToDragItems(const QValueList<Ar
return items;
}
-KURL::List ArticleDrag::articleURLs(const QValueList<Article>& articles)
+KURL::List ArticleDrag::articleURLs(const TQValueList<Article>& articles)
{
KURL::List urls;
- QValueList<Article>::ConstIterator end(articles.end());
- for (QValueList<Article>::ConstIterator it = articles.begin(); it != end; ++it)
+ TQValueList<Article>::ConstIterator end(articles.end());
+ for (TQValueList<Article>::ConstIterator it = articles.begin(); it != end; ++it)
urls.append((*it).link());
return urls;
}
diff --git a/akregator/src/dragobjects.h b/akregator/src/dragobjects.h
index b83514c3c..ac95b0eed 100644
--- a/akregator/src/dragobjects.h
+++ b/akregator/src/dragobjects.h
@@ -30,10 +30,10 @@
#include <kurl.h>
#include <kurldrag.h>
-#include <qstring.h>
-#include <qvaluelist.h>
+#include <tqstring.h>
+#include <tqvaluelist.h>
-typedef class QMemArray<char> QByteArray;
+typedef class TQMemArray<char> QByteArray;
namespace Akregator {
@@ -41,8 +41,8 @@ class Article;
struct ArticleDragItem
{
- QString feedURL;
- QString guid;
+ TQString feedURL;
+ TQString guid;
};
class ArticleDrag : public KURLDrag
@@ -50,21 +50,21 @@ class ArticleDrag : public KURLDrag
public:
- ArticleDrag(const QValueList<Article>& articles, QWidget* dragSource=0, const char* name=0);
+ ArticleDrag(const TQValueList<Article>& articles, TQWidget* dragSource=0, const char* name=0);
- static bool canDecode(const QMimeSource* e);
- static bool decode(const QMimeSource* e, QValueList<ArticleDragItem>& articles);
+ static bool canDecode(const TQMimeSource* e);
+ static bool decode(const TQMimeSource* e, TQValueList<ArticleDragItem>& articles);
protected:
- virtual QByteArray encodedData(const char* mime) const;
+ virtual TQByteArray encodedData(const char* mime) const;
virtual const char* format(int i) const;
private:
- static QValueList<ArticleDragItem> articlesToDragItems(const QValueList<Article>& articles);
- static KURL::List articleURLs(const QValueList<Article>& articles);
- QValueList<ArticleDragItem> m_items;
+ static TQValueList<ArticleDragItem> articlesToDragItems(const TQValueList<Article>& articles);
+ static KURL::List articleURLs(const TQValueList<Article>& articles);
+ TQValueList<ArticleDragItem> m_items;
};
} // namespace Akregator
diff --git a/akregator/src/feed.cpp b/akregator/src/feed.cpp
index c088654a2..f0574c31a 100644
--- a/akregator/src/feed.cpp
+++ b/akregator/src/feed.cpp
@@ -23,13 +23,13 @@
without including the source code for Qt in the source distribution.
*/
-#include <qtimer.h>
-#include <qdatetime.h>
-#include <qlistview.h>
-#include <qdom.h>
-#include <qmap.h>
-#include <qpixmap.h>
-#include <qvaluelist.h>
+#include <tqtimer.h>
+#include <tqdatetime.h>
+#include <tqlistview.h>
+#include <tqdom.h>
+#include <tqmap.h>
+#include <tqpixmap.h>
+#include <tqvaluelist.h>
#include <kurl.h>
#include <kdebug.h>
@@ -77,31 +77,31 @@ class Feed::FeedPrivate
bool articlesLoaded;
Backend::FeedStorage* archive;
- QString xmlUrl;
- QString htmlUrl;
- QString description;
+ TQString xmlUrl;
+ TQString htmlUrl;
+ TQString description;
/** list of feed articles */
- QMap<QString, Article> articles;
+ TQMap<TQString, Article> articles;
/** caches guids of tagged articles. key: tag, value: list of guids */
- QMap<QString, QStringList> taggedArticles;
+ TQMap<TQString, TQStringList> taggedArticles;
/** list of deleted articles. This contains **/
- QValueList<Article> deletedArticles;
+ TQValueList<Article> deletedArticles;
/** caches guids of deleted articles for notification */
- QValueList<Article> addedArticlesNotify;
- QValueList<Article> removedArticlesNotify;
- QValueList<Article> updatedArticlesNotify;
+ TQValueList<Article> addedArticlesNotify;
+ TQValueList<Article> removedArticlesNotify;
+ TQValueList<Article> updatedArticlesNotify;
- QPixmap imagePixmap;
+ TQPixmap imagePixmap;
RSS::Image image;
- QPixmap favicon;
+ TQPixmap favicon;
};
-QString Feed::archiveModeToString(ArchiveMode mode)
+TQString Feed::archiveModeToString(ArchiveMode mode)
{
switch (mode)
{
@@ -122,16 +122,16 @@ QString Feed::archiveModeToString(ArchiveMode mode)
return "globalDefault";
}
-Feed* Feed::fromOPML(QDomElement e)
+Feed* Feed::fromOPML(TQDomElement e)
{
Feed* feed = 0;
if( e.hasAttribute("xmlUrl") || e.hasAttribute("xmlurl") || e.hasAttribute("xmlURL") )
{
- QString title = e.hasAttribute("text") ? e.attribute("text") : e.attribute("title");
+ TQString title = e.hasAttribute("text") ? e.attribute("text") : e.attribute("title");
- QString xmlUrl = e.hasAttribute("xmlUrl") ? e.attribute("xmlUrl") : e.attribute("xmlurl");
+ TQString xmlUrl = e.hasAttribute("xmlUrl") ? e.attribute("xmlUrl") : e.attribute("xmlurl");
if (xmlUrl.isEmpty())
xmlUrl = e.attribute("xmlURL");
@@ -139,8 +139,8 @@ Feed* Feed::fromOPML(QDomElement e)
// "autoFetch" is used in 3.4
// Will be removed in KDE4
- QString htmlUrl = e.attribute("htmlUrl");
- QString description = e.attribute("description");
+ TQString htmlUrl = e.attribute("htmlUrl");
+ TQString description = e.attribute("description");
int fetchInterval = e.attribute("fetchInterval").toInt();
ArchiveMode archiveMode = stringToArchiveMode(e.attribute("archiveMode"));
int maxArticleAge = e.attribute("maxArticleAge").toUInt();
@@ -179,17 +179,17 @@ bool Feed::accept(TreeNodeVisitor* visitor)
return visitor->visitTreeNode(this);
}
-QStringList Feed::tags() const
+TQStringList Feed::tags() const
{
return d->archive->tags();
}
-Article Feed::findArticle(const QString& guid) const
+Article Feed::findArticle(const TQString& guid) const
{
return d->articles[guid];
}
-QValueList<Article> Feed::articles(const QString& tag)
+TQValueList<Article> Feed::articles(const TQString& tag)
{
if (!d->articlesLoaded)
loadArticles();
@@ -197,9 +197,9 @@ QValueList<Article> Feed::articles(const QString& tag)
return d->articles.values();
else
{
- QValueList<Article> tagged;
- QStringList guids = d->archive->articles(tag);
- for (QStringList::ConstIterator it = guids.begin(); it != guids.end(); ++it)
+ TQValueList<Article> tagged;
+ TQStringList guids = d->archive->articles(tag);
+ for (TQStringList::ConstIterator it = guids.begin(); it != guids.end(); ++it)
tagged += d->articles[*it];
return tagged;
@@ -208,7 +208,7 @@ QValueList<Article> Feed::articles(const QString& tag)
void Feed::loadImage()
{
- QString imageFileName = KGlobal::dirs()->saveLocation("cache", "akregator/Media/")
+ TQString imageFileName = KGlobal::dirs()->saveLocation("cache", "akregator/Media/")
+ Utils::fileNameForUrl(d->xmlUrl) +
".png";
d->imagePixmap.load(imageFileName, "PNG");
@@ -222,8 +222,8 @@ void Feed::loadArticles()
if (!d->archive)
d->archive = Backend::Storage::getInstance()->archiveFor(xmlUrl());
- QStringList list = d->archive->articles();
- for ( QStringList::ConstIterator it = list.begin(); it != list.end(); ++it)
+ TQStringList list = d->archive->articles();
+ for ( TQStringList::ConstIterator it = list.begin(); it != list.end(); ++it)
{
Article mya(*it, this);
d->articles[mya.guid()] = mya;
@@ -238,9 +238,9 @@ void Feed::loadArticles()
void Feed::recalcUnreadCount()
{
- QValueList<Article> tarticles = articles();
- QValueList<Article>::Iterator it;
- QValueList<Article>::Iterator en = tarticles.end();
+ TQValueList<Article> tarticles = articles();
+ TQValueList<Article>::Iterator it;
+ TQValueList<Article>::Iterator en = tarticles.end();
int oldUnread = d->archive->unread();
@@ -257,7 +257,7 @@ void Feed::recalcUnreadCount()
}
}
-Feed::ArchiveMode Feed::stringToArchiveMode(const QString& str)
+Feed::ArchiveMode Feed::stringToArchiveMode(const TQString& str)
{
if (str == "globalDefault")
return globalDefault;
@@ -344,38 +344,38 @@ bool Feed::loadLinkedWebsite() const
return d->loadLinkedWebsite;
}
-const QPixmap& Feed::favicon() const { return d->favicon; }
+const TQPixmap& Feed::favicon() const { return d->favicon; }
-const QPixmap& Feed::image() const { return d->imagePixmap; }
+const TQPixmap& Feed::image() const { return d->imagePixmap; }
-const QString& Feed::xmlUrl() const { return d->xmlUrl; }
+const TQString& Feed::xmlUrl() const { return d->xmlUrl; }
-void Feed::setXmlUrl(const QString& s) { d->xmlUrl = s; }
+void Feed::setXmlUrl(const TQString& s) { d->xmlUrl = s; }
-const QString& Feed::htmlUrl() const { return d->htmlUrl; }
+const TQString& Feed::htmlUrl() const { return d->htmlUrl; }
-void Feed::setHtmlUrl(const QString& s) { d->htmlUrl = s; }
+void Feed::setHtmlUrl(const TQString& s) { d->htmlUrl = s; }
-const QString& Feed::description() const { return d->description; }
+const TQString& Feed::description() const { return d->description; }
-void Feed::setDescription(const QString& s) { d->description = s; }
+void Feed::setDescription(const TQString& s) { d->description = s; }
bool Feed::fetchErrorOccurred() { return d->fetchError; }
bool Feed::isArticlesLoaded() const { return d->articlesLoaded; }
-QDomElement Feed::toOPML( QDomElement parent, QDomDocument document ) const
+TQDomElement Feed::toOPML( TQDomElement parent, TQDomDocument document ) const
{
- QDomElement el = document.createElement( "outline" );
+ TQDomElement el = document.createElement( "outline" );
el.setAttribute( "text", title() );
el.setAttribute( "title", title() );
el.setAttribute( "xmlUrl", d->xmlUrl );
el.setAttribute( "htmlUrl", d->htmlUrl );
- el.setAttribute( "id", QString::number(id()) );
+ el.setAttribute( "id", TQString::number(id()) );
el.setAttribute( "description", d->description );
el.setAttribute( "useCustomFetchInterval", (useCustomFetchInterval() ? "true" : "false") );
- el.setAttribute( "fetchInterval", QString::number(fetchInterval()) );
+ el.setAttribute( "fetchInterval", TQString::number(fetchInterval()) );
el.setAttribute( "archiveMode", archiveModeToString(d->archiveMode) );
el.setAttribute( "maxArticleAge", d->maxArticleAge );
el.setAttribute( "maxArticleNumber", d->maxArticleNumber );
@@ -397,9 +397,9 @@ void Feed::slotMarkAllArticlesAsRead()
if (unread() > 0)
{
setNotificationMode(false, true);
- QValueList<Article> tarticles = articles();
- QValueList<Article>::Iterator it;
- QValueList<Article>::Iterator en = tarticles.end();
+ TQValueList<Article> tarticles = articles();
+ TQValueList<Article>::Iterator it;
+ TQValueList<Article>::Iterator en = tarticles.end();
for (it = tarticles.begin(); it != en; ++it)
(*it).setStatus(Article::Read);
@@ -412,7 +412,7 @@ void Feed::slotAddToFetchQueue(FetchQueue* queue, bool intervalFetchOnly)
queue->addFeed(this);
else
{
- uint now = QDateTime::currentDateTime().toTime_t();
+ uint now = TQDateTime::currentDateTime().toTime_t();
// workaround for 3.5.x: if the last fetch went wrong, try again after 30 minutes
// this fixes annoying behaviour of akregator, especially when the host is reachable
@@ -446,7 +446,7 @@ void Feed::appendArticles(const RSS::Document &doc)
int nudge=0;
- QValueList<Article> deletedArticles = d->deletedArticles;
+ TQValueList<Article> deletedArticles = d->deletedArticles;
for (it = d_articles.begin(); it != en; ++it)
{
@@ -457,8 +457,8 @@ void Feed::appendArticles(const RSS::Document &doc)
nudge--;
appendArticle(mya);
- QValueList<ArticleInterceptor*> interceptors = ArticleInterceptorManager::self()->interceptors();
- for (QValueList<ArticleInterceptor*>::ConstIterator it = interceptors.begin(); it != interceptors.end(); ++it)
+ TQValueList<ArticleInterceptor*> interceptors = ArticleInterceptorManager::self()->interceptors();
+ for (TQValueList<ArticleInterceptor*>::ConstIterator it = interceptors.begin(); it != interceptors.end(); ++it)
(*it)->processArticle(mya);
d->addedArticlesNotify.append(mya);
@@ -494,9 +494,9 @@ void Feed::appendArticles(const RSS::Document &doc)
}
}
- QValueList<Article>::ConstIterator dit = deletedArticles.begin();
- QValueList<Article>::ConstIterator dtmp;
- QValueList<Article>::ConstIterator den = deletedArticles.end();
+ TQValueList<Article>::ConstIterator dit = deletedArticles.begin();
+ TQValueList<Article>::ConstIterator dtmp;
+ TQValueList<Article>::ConstIterator den = deletedArticles.end();
// delete articles with delete flag set completely from archive, which aren't in the current feed source anymore
while (dit != den)
@@ -519,7 +519,7 @@ bool Feed::usesExpiryByAge() const
bool Feed::isExpired(const Article& a) const
{
- QDateTime now = QDateTime::currentDateTime();
+ TQDateTime now = TQDateTime::currentDateTime();
int expiryAge = -1;
// check whether the feed uses the global default and the default is limitArticleAge
if ( d->archiveMode == globalDefault && Settings::archiveMode() == Settings::EnumArchiveMode::limitArticleAge)
@@ -551,9 +551,9 @@ void Feed::fetch(bool followDiscovery)
d->fetchTries = 0;
// mark all new as unread
- QValueList<Article> articles = d->articles.values();
- QValueList<Article>::Iterator it;
- QValueList<Article>::Iterator en = articles.end();
+ TQValueList<Article> articles = d->articles.values();
+ TQValueList<Article>::Iterator it;
+ TQValueList<Article>::Iterator en = articles.end();
for (it = articles.begin(); it != en; ++it)
{
if ((*it).status() == Article::New)
@@ -579,12 +579,12 @@ void Feed::tryFetch()
{
d->fetchError = false;
- d->loader = RSS::Loader::create( this, SLOT(fetchCompleted(Loader *, Document, Status)) );
- //connect(d->loader, SIGNAL(progress(unsigned long)), this, SLOT(slotSetProgress(unsigned long)));
+ d->loader = RSS::Loader::create( this, TQT_SLOT(fetchCompleted(Loader *, Document, Status)) );
+ //connect(d->loader, TQT_SIGNAL(progress(unsigned long)), this, TQT_SLOT(slotSetProgress(unsigned long)));
d->loader->loadFrom( d->xmlUrl, new RSS::FileRetriever );
}
-void Feed::slotImageFetched(const QPixmap& image)
+void Feed::slotImageFetched(const TQPixmap& image)
{
if (image.isNull())
return;
@@ -618,7 +618,7 @@ void Feed::fetchCompleted(RSS::Loader *l, RSS::Document doc, RSS::Status status)
else
{
d->fetchError = true;
- d->lastErrorFetch = QDateTime::currentDateTime().toTime_t();
+ d->lastErrorFetch = TQDateTime::currentDateTime().toTime_t();
emit fetchError(this);
}
return;
@@ -635,7 +635,7 @@ void Feed::fetchCompleted(RSS::Loader *l, RSS::Document doc, RSS::Status status)
if (doc.image() && d->imagePixmap.isNull())
{
d->image = *doc.image();
- connect(&d->image, SIGNAL(gotPixmap(const QPixmap&)), this, SLOT(slotImageFetched(const QPixmap&)));
+ connect(&d->image, TQT_SIGNAL(gotPixmap(const TQPixmap&)), this, TQT_SLOT(slotImageFetched(const TQPixmap&)));
d->image.getPixmap();
}
@@ -647,7 +647,7 @@ void Feed::fetchCompleted(RSS::Loader *l, RSS::Document doc, RSS::Status status)
appendArticles(doc);
- d->archive->setLastFetch( QDateTime::currentDateTime().toTime_t());
+ d->archive->setLastFetch( TQDateTime::currentDateTime().toTime_t());
emit fetched(this);
}
@@ -661,9 +661,9 @@ void Feed::slotDeleteExpiredArticles()
if ( !usesExpiryByAge() )
return;
- QValueList<Article> articles = d->articles.values();
+ TQValueList<Article> articles = d->articles.values();
- QValueList<Article>::Iterator en = articles.end();
+ TQValueList<Article>::Iterator en = articles.end();
setNotificationMode(false);
@@ -672,7 +672,7 @@ void Feed::slotDeleteExpiredArticles()
// doNotExpiredArticles once instead of in every iteration
if (Settings::doNotExpireImportantArticles())
{
- for (QValueList<Article>::Iterator it = articles.begin(); it != en; ++it)
+ for (TQValueList<Article>::Iterator it = articles.begin(); it != en; ++it)
{
if (!(*it).keep() && isExpired(*it))
{
@@ -682,7 +682,7 @@ void Feed::slotDeleteExpiredArticles()
}
else
{
- for (QValueList<Article>::Iterator it = articles.begin(); it != en; ++it)
+ for (TQValueList<Article>::Iterator it = articles.begin(); it != en; ++it)
{
if (isExpired(*it))
{
@@ -693,7 +693,7 @@ void Feed::slotDeleteExpiredArticles()
setNotificationMode(true);
}
-void Feed::setFavicon(const QPixmap &p)
+void Feed::setFavicon(const TQPixmap &p)
{
d->favicon = p;
nodeModified();
@@ -776,7 +776,7 @@ void Feed::doArticleNotification()
{
// copy list, otherwise the refcounting in Article::Private breaks for
// some reason (causing segfaults)
- QValueList<Article> l = d->addedArticlesNotify;
+ TQValueList<Article> l = d->addedArticlesNotify;
emit signalArticlesAdded(this, l);
d->addedArticlesNotify.clear();
}
@@ -784,7 +784,7 @@ void Feed::doArticleNotification()
{
// copy list, otherwise the refcounting in Article::Private breaks for
// some reason (causing segfaults)
- QValueList<Article> l = d->updatedArticlesNotify;
+ TQValueList<Article> l = d->updatedArticlesNotify;
emit signalArticlesUpdated(this, l);
d->updatedArticlesNotify.clear();
}
@@ -792,7 +792,7 @@ void Feed::doArticleNotification()
{
// copy list, otherwise the refcounting in Article::Private breaks for
// some reason (causing segfaults)
- QValueList<Article> l = d->removedArticlesNotify;
+ TQValueList<Article> l = d->removedArticlesNotify;
emit signalArticlesRemoved(this, l);
d->removedArticlesNotify.clear();
}
@@ -811,11 +811,11 @@ void Feed::enforceLimitArticleNumber()
return;
setNotificationMode(false);
- QValueList<Article> articles = d->articles.values();
+ TQValueList<Article> articles = d->articles.values();
qHeapSort(articles);
- QValueList<Article>::Iterator it = articles.begin();
- QValueList<Article>::Iterator tmp;
- QValueList<Article>::Iterator en = articles.end();
+ TQValueList<Article>::Iterator it = articles.begin();
+ TQValueList<Article>::Iterator tmp;
+ TQValueList<Article>::Iterator en = articles.end();
int c = 0;
diff --git a/akregator/src/feed.h b/akregator/src/feed.h
index e3e63da06..102415fdb 100644
--- a/akregator/src/feed.h
+++ b/akregator/src/feed.h
@@ -78,13 +78,13 @@ namespace Akregator
/** converts strings to ArchiveMode value
if parsing fails, it returns ArchiveMode::globalDefault
*/
- static ArchiveMode stringToArchiveMode(const QString& str);
+ static ArchiveMode stringToArchiveMode(const TQString& str);
/** converts ArchiveMode values to corresponding strings */
- static QString archiveModeToString(ArchiveMode mode);
+ static TQString archiveModeToString(ArchiveMode mode);
/** creates a Feed object from a description in OPML format */
- static Feed* fromOPML(QDomElement e);
+ static Feed* fromOPML(TQDomElement e);
/** default constructor */
Feed();
@@ -94,7 +94,7 @@ namespace Akregator
virtual bool accept(TreeNodeVisitor* visitor);
/** exports the feed settings to OPML */
- virtual QDomElement toOPML( QDomElement parent, QDomDocument document ) const;
+ virtual TQDomElement toOPML( TQDomElement parent, TQDomDocument document ) const;
/**
returns whether this feed uses its own fetch interval or the global setting
@@ -153,36 +153,36 @@ namespace Akregator
bool loadLinkedWebsite() const;
/** returns the favicon */
- const QPixmap& favicon() const;
+ const TQPixmap& favicon() const;
/** sets the favicon (used in the tree view) */
- void setFavicon(const QPixmap& p);
+ void setFavicon(const TQPixmap& p);
/** returns the feed image */
- const QPixmap& image() const;
+ const TQPixmap& image() const;
/** returns the url of the actual feed source (rss/rdf/atom file) */
- const QString& xmlUrl() const;
+ const TQString& xmlUrl() const;
/** sets the url of the actual feed source (rss/rdf/atom file) */
- void setXmlUrl(const QString& s);
+ void setXmlUrl(const TQString& s);
/** returns the URL of the HTML page of this feed */
- const QString& htmlUrl() const;
+ const TQString& htmlUrl() const;
/** sets the URL of the HTML page of this feed */
- void setHtmlUrl(const QString& s);
+ void setHtmlUrl(const TQString& s);
/** returns the description of this feed */
- const QString& description() const;
+ const TQString& description() const;
/** sets the description of this feed */
- void setDescription(const QString& s);
+ void setDescription(const TQString& s);
- virtual QValueList<Article> articles(const QString& tag=QString::null);
+ virtual TQValueList<Article> articles(const TQString& tag=TQString::null);
/** returns the article with the given @c guid, or a null article if it not exists */
- virtual Article findArticle(const QString& guid) const;
+ virtual Article findArticle(const TQString& guid) const;
- virtual QStringList tags() const;
+ virtual TQStringList tags() const;
/** returns whether a fetch error has occurred */
bool fetchErrorOccurred();
@@ -254,7 +254,7 @@ namespace Akregator
private slots:
void fetchCompleted(Loader *loader, Document doc, Status status);
- void slotImageFetched(const QPixmap& image);
+ void slotImageFetched(const TQPixmap& image);
private:
diff --git a/akregator/src/feediconmanager.cpp b/akregator/src/feediconmanager.cpp
index b115ed920..13e65d51d 100644
--- a/akregator/src/feediconmanager.cpp
+++ b/akregator/src/feediconmanager.cpp
@@ -33,17 +33,17 @@
#include <kstaticdeleter.h>
#include <kurl.h>
-#include <qdict.h>
-#include <qpixmap.h>
-#include <qvaluelist.h>
+#include <tqdict.h>
+#include <tqpixmap.h>
+#include <tqvaluelist.h>
namespace Akregator {
class FeedIconManager::FeedIconManagerPrivate
{
public:
- QValueList<Feed*> registeredFeeds;
- QDict<Feed> urlDict;
+ TQValueList<Feed*> registeredFeeds;
+ TQDict<Feed> urlDict;
};
FeedIconManager *FeedIconManager::m_instance = 0;
@@ -62,19 +62,19 @@ void FeedIconManager::fetchIcon(Feed* feed)
if (!d->registeredFeeds.contains(feed))
{
d->registeredFeeds.append(feed);
- connect(feed, SIGNAL(signalDestroyed(TreeNode*)), this, SLOT(slotFeedDestroyed(TreeNode*)));
+ connect(feed, TQT_SIGNAL(signalDestroyed(TreeNode*)), this, TQT_SLOT(slotFeedDestroyed(TreeNode*)));
}
- QString iconURL = getIconURL(KURL(feed->xmlUrl()));
+ TQString iconURL = getIconURL(KURL(feed->xmlUrl()));
d->urlDict.insert(iconURL, feed);
loadIcon(iconURL);
}
-FeedIconManager::FeedIconManager(QObject * parent, const char *name)
-: QObject(parent, name), DCOPObject("FeedIconManager"), d(new FeedIconManagerPrivate)
+FeedIconManager::FeedIconManager(TQObject * parent, const char *name)
+: TQObject(parent, name), DCOPObject("FeedIconManager"), d(new FeedIconManagerPrivate)
{
connectDCOPSignal("kded",
- "favicons", "iconChanged(bool, QString, QString)",
- "slotIconChanged(bool, QString, QString)", false);
+ "favicons", "iconChanged(bool, TQString, TQString)",
+ "slotIconChanged(bool, TQString, TQString)", false);
}
@@ -84,16 +84,16 @@ FeedIconManager::~FeedIconManager()
d = 0;
}
-void FeedIconManager::loadIcon(const QString & url)
+void FeedIconManager::loadIcon(const TQString & url)
{
KURL u(url);
- QString iconFile = iconLocation(u);
+ TQString iconFile = iconLocation(u);
if (iconFile.isNull())
{
- QByteArray data;
- QDataStream ds(data, IO_WriteOnly);
+ TQByteArray data;
+ TQDataStream ds(data, IO_WriteOnly);
ds << u;
kapp->dcopClient()->send("kded", "favicons", "downloadHostIcon(KURL)",
data);
@@ -103,30 +103,30 @@ void FeedIconManager::loadIcon(const QString & url)
}
-QString FeedIconManager::getIconURL(const KURL& url)
+TQString FeedIconManager::getIconURL(const KURL& url)
{
return "http://" +url.host() + "/";
}
-QString FeedIconManager::iconLocation(const KURL & url) const
+TQString FeedIconManager::iconLocation(const KURL & url) const
{
- QByteArray data, reply;
- QCString replyType;
- QDataStream ds(data, IO_WriteOnly);
+ TQByteArray data, reply;
+ TQCString replyType;
+ TQDataStream ds(data, IO_WriteOnly);
ds << url;
kapp->dcopClient()->call("kded", "favicons", "iconForURL(KURL)", data,
replyType, reply);
- if (replyType == "QString") {
- QDataStream replyStream(reply, IO_ReadOnly);
- QString result;
+ if (replyType == "TQString") {
+ TQDataStream replyStream(reply, IO_ReadOnly);
+ TQString result;
replyStream >> result;
return result;
}
- return QString::null;
+ return TQString::null;
}
void FeedIconManager::slotFeedDestroyed(TreeNode* node)
@@ -137,13 +137,13 @@ void FeedIconManager::slotFeedDestroyed(TreeNode* node)
d->registeredFeeds.remove(d->registeredFeeds.find(feed));
}
-void FeedIconManager::slotIconChanged(bool /*isHost*/, const QString& hostOrURL,
- const QString& iconName)
+void FeedIconManager::slotIconChanged(bool /*isHost*/, const TQString& hostOrURL,
+ const TQString& iconName)
{
- QString iconFile = KGlobal::dirs()->findResource("cache",
+ TQString iconFile = KGlobal::dirs()->findResource("cache",
iconName+".png");
Feed* f;
- QPixmap p = QPixmap(iconFile);
+ TQPixmap p = TQPixmap(iconFile);
if (!p.isNull()) // we don't set null pixmaps, as feed checks pixmap.isNull() to find out whether the icon was already loaded or not. It would request the icon another time, resulting an infinite loop (until stack overflow that is
{
while (( f = d->urlDict.take(hostOrURL) ))
diff --git a/akregator/src/feediconmanager.h b/akregator/src/feediconmanager.h
index 04da5c97f..b0e7fed41 100644
--- a/akregator/src/feediconmanager.h
+++ b/akregator/src/feediconmanager.h
@@ -28,7 +28,7 @@
#include <dcopobject.h>
-#include <qobject.h>
+#include <tqobject.h>
class QPixmap;
class QString;
@@ -42,27 +42,27 @@ namespace Akregator
class Feed;
class TreeNode;
- class FeedIconManager:public QObject, public DCOPObject
+ class FeedIconManager:public TQObject, public DCOPObject
{
Q_OBJECT
K_DCOP
public:
- FeedIconManager(QObject * = 0L, const char * = 0L);
+ FeedIconManager(TQObject * = 0L, const char * = 0L);
~FeedIconManager();
static FeedIconManager *self();
void fetchIcon(Feed* feed);
- QString iconLocation(const KURL &) const;
+ TQString iconLocation(const KURL &) const;
k_dcop:
- void slotIconChanged(bool, const QString&, const QString&);
+ void slotIconChanged(bool, const TQString&, const TQString&);
signals:
- void signalIconChanged(const QString &, const QPixmap &);
+ void signalIconChanged(const TQString &, const TQPixmap &);
public slots:
void slotFeedDestroyed(TreeNode* node);
@@ -71,9 +71,9 @@ namespace Akregator
/** returns the url used to access the icon, e.g.
http://dot.kde.org/ for "dot.kde.org/1113317400/" */
- QString getIconURL(const KURL& url);
+ TQString getIconURL(const KURL& url);
- void loadIcon(const QString &);
+ void loadIcon(const TQString &);
private:
static FeedIconManager *m_instance;
diff --git a/akregator/src/feeditem.cpp b/akregator/src/feeditem.cpp
index 785548cf8..cb00e5c0f 100644
--- a/akregator/src/feeditem.cpp
+++ b/akregator/src/feeditem.cpp
@@ -26,11 +26,11 @@
#include "feed.h"
#include "feeditem.h"
-#include <qpopupmenu.h>
+#include <tqpopupmenu.h>
#include <kaction.h>
#include <kdebug.h>
#include <kiconloader.h>
-#include <qstring.h>
+#include <tqstring.h>
namespace Akregator {
@@ -82,12 +82,12 @@ void FeedItem::nodeChanged()
TreeNodeItem::nodeChanged();
}
-QPixmap FeedItem::errorPixmap()
+TQPixmap FeedItem::errorPixmap()
{
return KGlobal::iconLoader()->loadIcon("error", KIcon::Small);
}
-QPixmap FeedItem::defaultPixmap()
+TQPixmap FeedItem::defaultPixmap()
{
return KGlobal::iconLoader()->loadIcon("txt", KIcon::Small);
}
@@ -108,11 +108,11 @@ void FeedItem::initialize(Feed* node)
}
}
-void FeedItem::showContextMenu(const QPoint& p)
+void FeedItem::showContextMenu(const TQPoint& p)
{
- QWidget* w = ActionManager::getInstance()->container("feeds_popup");
+ TQWidget* w = ActionManager::getInstance()->container("feeds_popup");
if (w)
- static_cast<QPopupMenu *>(w)->exec(p);
+ static_cast<TQPopupMenu *>(w)->exec(p);
}
} // namespace Akregator
diff --git a/akregator/src/feeditem.h b/akregator/src/feeditem.h
index e51913ab1..cc3c7efb2 100644
--- a/akregator/src/feeditem.h
+++ b/akregator/src/feeditem.h
@@ -48,10 +48,10 @@ class FeedItem : public TreeNodeItem
virtual ~FeedItem();
virtual Feed* node();
virtual void nodeChanged();
- virtual void showContextMenu(const QPoint& p);
+ virtual void showContextMenu(const TQPoint& p);
- static QPixmap errorPixmap();
- static QPixmap defaultPixmap();
+ static TQPixmap errorPixmap();
+ static TQPixmap defaultPixmap();
private:
void initialize(Feed* node);
diff --git a/akregator/src/feedlist.cpp b/akregator/src/feedlist.cpp
index 814f82e1a..4076c6231 100644
--- a/akregator/src/feedlist.cpp
+++ b/akregator/src/feedlist.cpp
@@ -23,10 +23,10 @@
*/
#include "feedlist.h"
-#include <qdatetime.h>
-#include <qdom.h>
-#include <qmap.h>
-#include <qvaluelist.h>
+#include <tqdatetime.h>
+#include <tqdom.h>
+#include <tqmap.h>
+#include <tqvaluelist.h>
#include <kdebug.h>
#include <klocale.h>
@@ -43,7 +43,7 @@ class FeedList::FeedListPrivate
{
public:
- QMap<QString, QValueList<Feed*> > urlMap;
+ TQMap<TQString, TQValueList<Feed*> > urlMap;
AddNodeVisitor* addNodeVisitor;
RemoveNodeVisitor* removeNodeVisitor;
};
@@ -80,7 +80,7 @@ class FeedList::RemoveNodeVisitor : public TreeNodeVisitor
FeedList* m_list;
};
-FeedList::FeedList(QObject *parent, const char *name)
+FeedList::FeedList(TQObject *parent, const char *name)
: NodeList(parent, name), d(new FeedListPrivate)
{
d->addNodeVisitor = new AddNodeVisitor(this);
@@ -104,13 +104,13 @@ void FeedList::removeNode(TreeNode* node)
d->removeNodeVisitor->visit(node);
}
-void FeedList::parseChildNodes(QDomNode &node, Folder* parent)
+void FeedList::parseChildNodes(TQDomNode &node, Folder* parent)
{
- QDomElement e = node.toElement(); // try to convert the node to an element.
+ TQDomElement e = node.toElement(); // try to convert the node to an element.
if( !e.isNull() )
{
- QString title = e.hasAttribute("text") ? e.attribute("text") : e.attribute("title");
+ TQString title = e.hasAttribute("text") ? e.attribute("text") : e.attribute("title");
if (e.hasAttribute("xmlUrl") || e.hasAttribute("xmlurl") || e.hasAttribute("xmlURL") )
{
@@ -129,7 +129,7 @@ void FeedList::parseChildNodes(QDomNode &node, Folder* parent)
if (e.hasChildNodes())
{
- QDomNode child = e.firstChild();
+ TQDomNode child = e.firstChild();
while(!child.isNull())
{
parseChildNodes(child, fg);
@@ -140,21 +140,21 @@ void FeedList::parseChildNodes(QDomNode &node, Folder* parent)
}
}
-bool FeedList::readFromXML(const QDomDocument& doc)
+bool FeedList::readFromXML(const TQDomDocument& doc)
{
- QDomElement root = doc.documentElement();
+ TQDomElement root = doc.documentElement();
kdDebug() << "loading OPML feed " << root.tagName().lower() << endl;
kdDebug() << "measuring startup time: START" << endl;
- QTime spent;
+ TQTime spent;
spent.start();
if (root.tagName().lower() != "opml")
{
return false;
}
- QDomNode bodyNode = root.firstChild();
+ TQDomNode bodyNode = root.firstChild();
while (!bodyNode.isNull() && bodyNode.toElement().tagName().lower() != "body")
bodyNode = bodyNode.nextSibling();
@@ -166,9 +166,9 @@ bool FeedList::readFromXML(const QDomDocument& doc)
return false;
}
- QDomElement body = bodyNode.toElement();
+ TQDomElement body = bodyNode.toElement();
- QDomNode i = body.firstChild();
+ TQDomNode i = body.firstChild();
while( !i.isNull() )
{
@@ -199,7 +199,7 @@ FeedList::~FeedList()
d = 0;
}
-Feed* FeedList::findByURL(const QString& feedURL) const
+Feed* FeedList::findByURL(const TQString& feedURL) const
{
if (d->urlMap[feedURL].isEmpty())
return 0;
@@ -207,7 +207,7 @@ Feed* FeedList::findByURL(const QString& feedURL) const
return *(d->urlMap[feedURL].begin());
}
-Article FeedList::findArticle(const QString& feedURL, const QString& guid) const
+Article FeedList::findArticle(const TQString& feedURL, const TQString& guid) const
{
Feed* feed = findByURL(feedURL);
@@ -222,10 +222,10 @@ void FeedList::append(FeedList* list, Folder* parent, TreeNode* after)
if ( !flatList()->contains(parent) )
parent = rootNode();
- QValueList<TreeNode*> children = list->rootNode()->children();
+ TQValueList<TreeNode*> children = list->rootNode()->children();
- QValueList<TreeNode*>::ConstIterator end( children.end() );
- for (QValueList<TreeNode*>::ConstIterator it = children.begin(); it != end; ++it)
+ TQValueList<TreeNode*>::ConstIterator end( children.end() );
+ for (TQValueList<TreeNode*>::ConstIterator it = children.begin(); it != end; ++it)
{
list->rootNode()->removeChild(*it);
parent->insertChild(*it, after);
@@ -233,32 +233,32 @@ void FeedList::append(FeedList* list, Folder* parent, TreeNode* after)
}
}
-QDomDocument FeedList::toXML() const
+TQDomDocument FeedList::toXML() const
{
- QDomDocument doc;
+ TQDomDocument doc;
doc.appendChild( doc.createProcessingInstruction( "xml", "version=\"1.0\" encoding=\"UTF-8\"" ) );
- QDomElement root = doc.createElement( "opml" );
+ TQDomElement root = doc.createElement( "opml" );
root.setAttribute( "version", "1.0" );
doc.appendChild( root );
- QDomElement head = doc.createElement( "head" );
+ TQDomElement head = doc.createElement( "head" );
root.appendChild( head );
- QDomElement ti = doc.createElement( "text" );
+ TQDomElement ti = doc.createElement( "text" );
head.appendChild( ti );
- QDomText t = doc.createTextNode( title() );
+ TQDomText t = doc.createTextNode( title() );
ti.appendChild( t );
- QDomElement body = doc.createElement( "body" );
+ TQDomElement body = doc.createElement( "body" );
root.appendChild( body );
- QValueList<TreeNode*> children = rootNode()->children();
+ TQValueList<TreeNode*> children = rootNode()->children();
- QValueList<TreeNode*>::ConstIterator end( children.end() );
+ TQValueList<TreeNode*>::ConstIterator end( children.end() );
- for (QValueList<TreeNode*>::ConstIterator it = children.begin(); it != end; ++it)
+ for (TQValueList<TreeNode*>::ConstIterator it = children.begin(); it != end; ++it)
body.appendChild( (*it)->toOPML(body, doc) );
return doc;
diff --git a/akregator/src/feedlist.h b/akregator/src/feedlist.h
index 5562e8c4a..7a44a12b3 100644
--- a/akregator/src/feedlist.h
+++ b/akregator/src/feedlist.h
@@ -46,7 +46,7 @@ class FeedList : public NodeList
Q_OBJECT
public:
- FeedList(QObject *parent = 0, const char *name = 0);
+ FeedList(TQObject *parent = 0, const char *name = 0);
/** Destructor. Contained nodes are deleted! */
~FeedList();
@@ -59,15 +59,15 @@ public:
@param doc the OPML document to parse
@return whether parsing was successful or not (TODO: make errors more detailed)
*/
- virtual bool readFromXML(const QDomDocument& doc);
+ virtual bool readFromXML(const TQDomDocument& doc);
/** exports the feed list as OPML. The root node ("All Feeds") is ignored! */
- virtual QDomDocument toXML() const;
+ virtual TQDomDocument toXML() const;
/** returns a feed object for a given feed URL. If the feed list does not contain a feed with @c url, NULL is returned. If it contains the same feed multiple times, any of the Feed objects is returned. */
- Feed* findByURL(const QString& feedURL) const;
+ Feed* findByURL(const TQString& feedURL) const;
- Article findArticle(const QString& feedURL, const QString& guid) const;
+ Article findArticle(const TQString& feedURL, const TQString& guid) const;
signals:
@@ -81,7 +81,7 @@ protected:
public: // compat with KDE-3.x assertions, remove for KDE 4
// private:
- void parseChildNodes(QDomNode &node, Folder* parent);
+ void parseChildNodes(TQDomNode &node, Folder* parent);
// never call these
FeedList(const FeedList&) : NodeList() {}
diff --git a/akregator/src/feedlistview.cpp b/akregator/src/feedlistview.cpp
index 585e85098..b680c7c58 100644
--- a/akregator/src/feedlistview.cpp
+++ b/akregator/src/feedlistview.cpp
@@ -47,12 +47,12 @@
#include <kstringhandler.h>
#include <kurldrag.h>
-#include <qfont.h>
-#include <qheader.h>
-#include <qpainter.h>
-#include <qptrdict.h>
-#include <qtimer.h>
-#include <qwhatsthis.h>
+#include <tqfont.h>
+#include <tqheader.h>
+#include <tqpainter.h>
+#include <tqptrdict.h>
+#include <tqtimer.h>
+#include <tqwhatsthis.h>
namespace Akregator {
@@ -60,14 +60,14 @@ class NodeListView::NodeListViewPrivate
{
public:
/** used for finding the item belonging to a node */
- QPtrDict<TreeNodeItem> itemDict;
+ TQPtrDict<TreeNodeItem> itemDict;
NodeList* nodeList;
bool showTagFolders;
// Drag and Drop variables
- QListViewItem *parent;
- QListViewItem *afterme;
- QTimer autoopentimer;
+ TQListViewItem *parent;
+ TQListViewItem *afterme;
+ TQTimer autoopentimer;
ConnectNodeVisitor* connectNodeVisitor;
DisconnectNodeVisitor* disconnectNodeVisitor;
CreateItemVisitor* createItemVisitor;
@@ -81,16 +81,16 @@ class NodeListView::ConnectNodeVisitor : public TreeNodeVisitor
virtual bool visitTreeNode(TreeNode* node)
{
- connect(node, SIGNAL(signalDestroyed(TreeNode*)), m_view, SLOT(slotNodeDestroyed(TreeNode*) ));
- connect(node, SIGNAL(signalChanged(TreeNode*)), m_view, SLOT(slotNodeChanged(TreeNode*) ));
+ connect(node, TQT_SIGNAL(signalDestroyed(TreeNode*)), m_view, TQT_SLOT(slotNodeDestroyed(TreeNode*) ));
+ connect(node, TQT_SIGNAL(signalChanged(TreeNode*)), m_view, TQT_SLOT(slotNodeChanged(TreeNode*) ));
return true;
}
virtual bool visitFolder(Folder* node)
{
visitTreeNode(node);
- connect(node, SIGNAL(signalChildAdded(TreeNode*)), m_view, SLOT(slotNodeAdded(TreeNode*) ));
- connect(node, SIGNAL(signalChildRemoved(Folder*, TreeNode*)), m_view, SLOT(slotNodeRemoved(Folder*, TreeNode*) ));
+ connect(node, TQT_SIGNAL(signalChildAdded(TreeNode*)), m_view, TQT_SLOT(slotNodeAdded(TreeNode*) ));
+ connect(node, TQT_SIGNAL(signalChildRemoved(Folder*, TreeNode*)), m_view, TQT_SLOT(slotNodeRemoved(Folder*, TreeNode*) ));
return true;
}
@@ -98,10 +98,10 @@ class NodeListView::ConnectNodeVisitor : public TreeNodeVisitor
{
visitTreeNode(node);
- connect(node, SIGNAL(fetchStarted(Feed*)), m_view, SLOT(slotFeedFetchStarted(Feed*)));
- connect(node, SIGNAL(fetchAborted(Feed*)), m_view, SLOT(slotFeedFetchAborted(Feed*)));
- connect(node, SIGNAL(fetchError(Feed*)), m_view, SLOT(slotFeedFetchError(Feed*)));
- connect(node, SIGNAL(fetched(Feed*)), m_view, SLOT(slotFeedFetchCompleted(Feed*)));
+ connect(node, TQT_SIGNAL(fetchStarted(Feed*)), m_view, TQT_SLOT(slotFeedFetchStarted(Feed*)));
+ connect(node, TQT_SIGNAL(fetchAborted(Feed*)), m_view, TQT_SLOT(slotFeedFetchAborted(Feed*)));
+ connect(node, TQT_SIGNAL(fetchError(Feed*)), m_view, TQT_SLOT(slotFeedFetchError(Feed*)));
+ connect(node, TQT_SIGNAL(fetched(Feed*)), m_view, TQT_SLOT(slotFeedFetchCompleted(Feed*)));
return true;
}
private:
@@ -117,30 +117,30 @@ class NodeListView::DisconnectNodeVisitor : public TreeNodeVisitor
virtual bool visitTagNode(TagNode* node)
{
- disconnect(node, SIGNAL(signalDestroyed(TreeNode*)), m_view, SLOT(slotNodeDestroyed(TreeNode*) ));
- disconnect(node, SIGNAL(signalChanged(TreeNode*)), m_view, SLOT(slotNodeChanged(TreeNode*) ));
+ disconnect(node, TQT_SIGNAL(signalDestroyed(TreeNode*)), m_view, TQT_SLOT(slotNodeDestroyed(TreeNode*) ));
+ disconnect(node, TQT_SIGNAL(signalChanged(TreeNode*)), m_view, TQT_SLOT(slotNodeChanged(TreeNode*) ));
return true;
}
virtual bool visitFolder(Folder* node)
{
- disconnect(node, SIGNAL(signalChildAdded(TreeNode*)), m_view, SLOT(slotNodeAdded(TreeNode*) ));
- disconnect(node, SIGNAL(signalChildRemoved(Folder*, TreeNode*)), m_view, SLOT(slotNodeRemoved(Folder*, TreeNode*) ));
+ disconnect(node, TQT_SIGNAL(signalChildAdded(TreeNode*)), m_view, TQT_SLOT(slotNodeAdded(TreeNode*) ));
+ disconnect(node, TQT_SIGNAL(signalChildRemoved(Folder*, TreeNode*)), m_view, TQT_SLOT(slotNodeRemoved(Folder*, TreeNode*) ));
- disconnect(node, SIGNAL(signalDestroyed(TreeNode*)), m_view, SLOT(slotNodeDestroyed(TreeNode*) ));
- disconnect(node, SIGNAL(signalChanged(TreeNode*)), m_view, SLOT(slotNodeChanged(TreeNode*) ));
+ disconnect(node, TQT_SIGNAL(signalDestroyed(TreeNode*)), m_view, TQT_SLOT(slotNodeDestroyed(TreeNode*) ));
+ disconnect(node, TQT_SIGNAL(signalChanged(TreeNode*)), m_view, TQT_SLOT(slotNodeChanged(TreeNode*) ));
return true;
}
virtual bool visitFeed(Feed* node)
{
- disconnect(node, SIGNAL(signalDestroyed(TreeNode*)), m_view, SLOT(slotNodeDestroyed(TreeNode*) ));
- disconnect(node, SIGNAL(signalChanged(TreeNode*)), m_view, SLOT(slotNodeChanged(TreeNode*) ));
- disconnect(node, SIGNAL(fetchStarted(Feed*)), m_view, SLOT(slotFeedFetchStarted(Feed*)));
- disconnect(node, SIGNAL(fetchAborted(Feed*)), m_view, SLOT(slotFeedFetchAborted(Feed*)));
- disconnect(node, SIGNAL(fetchError(Feed*)), m_view, SLOT(slotFeedFetchError(Feed*)));
- disconnect(node, SIGNAL(fetched(Feed*)), m_view, SLOT(slotFeedFetchCompleted(Feed*)));
+ disconnect(node, TQT_SIGNAL(signalDestroyed(TreeNode*)), m_view, TQT_SLOT(slotNodeDestroyed(TreeNode*) ));
+ disconnect(node, TQT_SIGNAL(signalChanged(TreeNode*)), m_view, TQT_SLOT(slotNodeChanged(TreeNode*) ));
+ disconnect(node, TQT_SIGNAL(fetchStarted(Feed*)), m_view, TQT_SLOT(slotFeedFetchStarted(Feed*)));
+ disconnect(node, TQT_SIGNAL(fetchAborted(Feed*)), m_view, TQT_SLOT(slotFeedFetchAborted(Feed*)));
+ disconnect(node, TQT_SIGNAL(fetchError(Feed*)), m_view, TQT_SLOT(slotFeedFetchError(Feed*)));
+ disconnect(node, TQT_SIGNAL(fetched(Feed*)), m_view, TQT_SLOT(slotFeedFetchCompleted(Feed*)));
return true;
}
private:
@@ -180,8 +180,8 @@ class NodeListView::DeleteItemVisitor : public TreeNodeVisitor
virtual bool visitFolder(Folder* node)
{
// delete child items recursively before deleting parent
- QValueList<TreeNode*> children = node->children();
- for (QValueList<TreeNode*>::ConstIterator it = children.begin(); it != children.end(); ++it )
+ TQValueList<TreeNode*> children = node->children();
+ for (TQValueList<TreeNode*>::ConstIterator it = children.begin(); it != children.end(); ++it )
visit(*it);
visitTreeNode(node);
@@ -267,10 +267,10 @@ class NodeListView::CreateItemVisitor : public TreeNodeVisitor
}
m_view->d->itemDict.insert(node, item);
- QValueList<TreeNode*> children = node->children();
+ TQValueList<TreeNode*> children = node->children();
// add children recursively
- for (QValueList<TreeNode*>::ConstIterator it = children.begin(); it != children.end(); ++it )
+ for (TQValueList<TreeNode*>::ConstIterator it = children.begin(); it != children.end(); ++it )
visit(*it);
m_view->connectToNode(node);
@@ -306,8 +306,8 @@ class NodeListView::CreateItemVisitor : public TreeNodeVisitor
m_view->d->itemDict.insert(node, item);
// add children recursively
- QValueList<TreeNode*> children = node->children();
- for (QValueList<TreeNode*>::ConstIterator it = children.begin(); it != children.end(); ++it )
+ TQValueList<TreeNode*> children = node->children();
+ for (TQValueList<TreeNode*>::ConstIterator it = children.begin(); it != children.end(); ++it )
visit(*it);
m_view->connectToNode(node);
@@ -352,7 +352,7 @@ class NodeListView::CreateItemVisitor : public TreeNodeVisitor
NodeListView* m_view;
};
-NodeListView::NodeListView( QWidget *parent, const char *name)
+NodeListView::NodeListView( TQWidget *parent, const char *name)
: KListView(parent, name), d(new NodeListViewPrivate)
{
d->showTagFolders = true;
@@ -377,15 +377,15 @@ NodeListView::NodeListView( QWidget *parent, const char *name)
setAcceptDrops(true);
setItemsMovable(true);
- connect( this, SIGNAL(dropped(QDropEvent*, QListViewItem*)), this, SLOT(slotDropped(QDropEvent*, QListViewItem*)) );
- connect( this, SIGNAL(selectionChanged(QListViewItem*)), this, SLOT(slotSelectionChanged(QListViewItem*)) );
- connect( this, SIGNAL(itemRenamed(QListViewItem*, int, const QString&)), this, SLOT(slotItemRenamed(QListViewItem*, int, const QString&)) );
- connect( this, SIGNAL(contextMenu(KListView*, QListViewItem*, const QPoint&)), this, SLOT(slotContextMenu(KListView*, QListViewItem*, const QPoint&)) );
- connect( &(d->autoopentimer), SIGNAL( timeout() ), this, SLOT( openFolder() ) );
+ connect( this, TQT_SIGNAL(dropped(TQDropEvent*, TQListViewItem*)), this, TQT_SLOT(slotDropped(TQDropEvent*, TQListViewItem*)) );
+ connect( this, TQT_SIGNAL(selectionChanged(TQListViewItem*)), this, TQT_SLOT(slotSelectionChanged(TQListViewItem*)) );
+ connect( this, TQT_SIGNAL(itemRenamed(TQListViewItem*, int, const TQString&)), this, TQT_SLOT(slotItemRenamed(TQListViewItem*, int, const TQString&)) );
+ connect( this, TQT_SIGNAL(contextMenu(KListView*, TQListViewItem*, const TQPoint&)), this, TQT_SLOT(slotContextMenu(KListView*, TQListViewItem*, const TQPoint&)) );
+ connect( &(d->autoopentimer), TQT_SIGNAL( timeout() ), this, TQT_SLOT( openFolder() ) );
clear();
- QWhatsThis::add(this, i18n("<h2>Feeds tree</h2>"
+ TQWhatsThis::add(this, i18n("<h2>Feeds tree</h2>"
"Here you can browse tree of feeds. "
"You can also add feeds or feed groups (folders) "
"using right-click menu, or reorganize them using "
@@ -446,7 +446,7 @@ void NodeListView::setSelectedNode(TreeNode* node)
setSelected(item, true);
}
-TreeNode* NodeListView::findNodeByTitle(const QString& title)
+TreeNode* NodeListView::findNodeByTitle(const TQString& title)
{
TreeNodeItem* item = dynamic_cast<TreeNodeItem*>(findItemByTitle(title, 0));
if (!item)
@@ -460,7 +460,7 @@ TreeNodeItem* NodeListView::findNodeItem(TreeNode* node)
return d->itemDict.find(node);
}
-TreeNodeItem* NodeListView::findItemByTitle(const QString& text, int column, ComparisonFlags compare) const
+TreeNodeItem* NodeListView::findItemByTitle(const TQString& text, int column, ComparisonFlags compare) const
{
return dynamic_cast<TreeNodeItem*> (KListView::findItem(text, column, compare));
}
@@ -481,7 +481,7 @@ void NodeListView::startNodeRenaming(TreeNode* node)
void NodeListView::clear()
{
- QPtrDictIterator<TreeNodeItem> it(d->itemDict);
+ TQPtrDictIterator<TreeNodeItem> it(d->itemDict);
for( ; it.current(); ++it )
disconnectFromNode( it.current()->node() );
d->itemDict.clear();
@@ -490,7 +490,7 @@ void NodeListView::clear()
KListView::clear();
}
-void NodeListView::drawContentsOffset( QPainter * p, int ox, int oy,
+void NodeListView::drawContentsOffset( TQPainter * p, int ox, int oy,
int cx, int cy, int cw, int ch )
{
bool oldUpdatesEnabled = isUpdatesEnabled();
@@ -499,7 +499,7 @@ void NodeListView::drawContentsOffset( QPainter * p, int ox, int oy,
setUpdatesEnabled(oldUpdatesEnabled);
}
-void NodeListView::slotDropped( QDropEvent *e, QListViewItem*
+void NodeListView::slotDropped( TQDropEvent *e, TQListViewItem*
/*after*/)
{
d->autoopentimer.stop();
@@ -527,7 +527,7 @@ void NodeListView::slotDropped( QDropEvent *e, QListViewItem*
}
}
-void NodeListView::movableDropEvent(QListViewItem* /*parent*/, QListViewItem* /*afterme*/)
+void NodeListView::movableDropEvent(TQListViewItem* /*parent*/, TQListViewItem* /*afterme*/)
{
d->autoopentimer.stop();
if (d->parent)
@@ -552,13 +552,13 @@ void NodeListView::setShowTagFolders(bool enabled)
d->showTagFolders = enabled;
}
-void NodeListView::contentsDragMoveEvent(QDragMoveEvent* event)
+void NodeListView::contentsDragMoveEvent(TQDragMoveEvent* event)
{
- QPoint vp = contentsToViewport(event->pos());
- QListViewItem *i = itemAt(vp);
+ TQPoint vp = contentsToViewport(event->pos());
+ TQListViewItem *i = itemAt(vp);
- QListViewItem *qiparent;
- QListViewItem *qiafterme;
+ TQListViewItem *qiparent;
+ TQListViewItem *qiafterme;
findDrop( event->pos(), qiparent, qiafterme );
if (event->source() == viewport()) {
@@ -571,11 +571,11 @@ void NodeListView::contentsDragMoveEvent(QDragMoveEvent* event)
}
// prevent dragging nodes from All Feeds to My Tags or vice versa
- QListViewItem* root1 = i;
+ TQListViewItem* root1 = i;
while (root1 && root1->parent())
root1 = root1->parent();
- QListViewItem* root2 = selectedItem();
+ TQListViewItem* root2 = selectedItem();
while (root2 && root2->parent())
root2 = root2->parent();
@@ -587,7 +587,7 @@ void NodeListView::contentsDragMoveEvent(QDragMoveEvent* event)
}
// don't drop node into own subtree
- QListViewItem* p = qiparent;
+ TQListViewItem* p = qiparent;
while (p)
if (p == selectedItem())
{
@@ -616,7 +616,7 @@ void NodeListView::contentsDragMoveEvent(QDragMoveEvent* event)
// {} else
// do we want to move inside the old parent or do we want to move to a new parent
- if (i && (itemAt(vp - QPoint(0,5)) == i && itemAt(vp + QPoint(0,5)) == i))
+ if (i && (itemAt(vp - TQPoint(0,5)) == i && itemAt(vp + TQPoint(0,5)) == i))
{
setDropVisualizer(false);
setDropHighlighter(true);
@@ -653,7 +653,7 @@ void NodeListView::contentsDragMoveEvent(QDragMoveEvent* event)
KListView::contentsDragMoveEvent(event);
}
-bool NodeListView::acceptDrag(QDropEvent *e) const
+bool NodeListView::acceptDrag(TQDropEvent *e) const
{
if (!acceptDrops() || !itemsMovable())
return false;
@@ -700,7 +700,7 @@ void NodeListView::slotItemBegin()
void NodeListView::slotItemEnd()
{
- QListViewItem* elt = firstChild();
+ TQListViewItem* elt = firstChild();
if (elt)
while (elt->itemBelow())
elt = elt->itemBelow();
@@ -710,7 +710,7 @@ void NodeListView::slotItemEnd()
void NodeListView::slotItemLeft()
{
- QListViewItem* sel = selectedItem();
+ TQListViewItem* sel = selectedItem();
if (!sel || sel == findNodeItem(rootNode()))
return;
@@ -728,7 +728,7 @@ void NodeListView::slotItemLeft()
void NodeListView::slotItemRight()
{
- QListViewItem* sel = selectedItem();
+ TQListViewItem* sel = selectedItem();
if (!sel)
{
setSelected( firstChild(), true );
@@ -746,7 +746,7 @@ void NodeListView::slotItemRight()
void NodeListView::slotPrevFeed()
{
- for (QListViewItemIterator it( selectedItem()); it.current(); --it )
+ for (TQListViewItemIterator it( selectedItem()); it.current(); --it )
{
TreeNodeItem* tni = dynamic_cast<TreeNodeItem*>(*it);
if (tni && !tni->isSelected() && !tni->node()->isGroup() )
@@ -760,7 +760,7 @@ void NodeListView::slotPrevFeed()
void NodeListView::slotNextFeed()
{
- for (QListViewItemIterator it( selectedItem()); it.current(); ++it )
+ for (TQListViewItemIterator it( selectedItem()); it.current(); ++it )
{
TreeNodeItem* tni = dynamic_cast<TreeNodeItem*>(*it);
if ( tni && !tni->isSelected() && !tni->node()->isGroup() )
@@ -779,7 +779,7 @@ void NodeListView::slotPrevUnreadFeed()
if ( !selectedItem() )
slotNextUnreadFeed();
- QListViewItemIterator it( selectedItem() );
+ TQListViewItemIterator it( selectedItem() );
for ( ; it.current(); --it )
{
@@ -798,7 +798,7 @@ void NodeListView::slotPrevUnreadFeed()
if (rootNode()->unread() > 0)
{
- it = QListViewItemIterator(lastItem());
+ it = TQListViewItemIterator(lastItem());
for ( ; it.current(); --it)
{
@@ -820,7 +820,7 @@ void NodeListView::slotPrevUnreadFeed()
void NodeListView::slotNextUnreadFeed()
{
- QListViewItemIterator it;
+ TQListViewItemIterator it;
if ( !selectedItem() )
{
@@ -828,10 +828,10 @@ void NodeListView::slotNextUnreadFeed()
if (!firstChild() || !firstChild()->firstChild())
return;
else
- it = QListViewItemIterator( firstChild()->firstChild());
+ it = TQListViewItemIterator( firstChild()->firstChild());
}
else
- it = QListViewItemIterator( selectedItem() );
+ it = TQListViewItemIterator( selectedItem() );
for ( ; it.current(); ++it )
{
@@ -853,7 +853,7 @@ void NodeListView::slotNextUnreadFeed()
}
}
-void NodeListView::slotSelectionChanged(QListViewItem* item)
+void NodeListView::slotSelectionChanged(TQListViewItem* item)
{
TreeNodeItem* ni = dynamic_cast<TreeNodeItem*> (item);
@@ -863,7 +863,7 @@ void NodeListView::slotSelectionChanged(QListViewItem* item)
}
}
-void NodeListView::slotItemRenamed(QListViewItem* item, int col, const QString& text)
+void NodeListView::slotItemRenamed(TQListViewItem* item, int col, const TQString& text)
{
TreeNodeItem* ni = dynamic_cast<TreeNodeItem*> (item);
if ( !ni || !ni->node() )
@@ -876,7 +876,7 @@ void NodeListView::slotItemRenamed(QListViewItem* item, int col, const QString&
}
}
}
-void NodeListView::slotContextMenu(KListView* list, QListViewItem* item, const QPoint& p)
+void NodeListView::slotContextMenu(KListView* list, TQListViewItem* item, const TQPoint& p)
{
TreeNodeItem* ti = dynamic_cast<TreeNodeItem*>(item);
emit signalContextMenu(list, ti ? ti->node() : 0, p);
@@ -893,7 +893,7 @@ void NodeListView::slotFeedFetchStarted(Feed* feed)
if (item)
{
KIconEffect iconEffect;
- QPixmap tempIcon = iconEffect.apply(feed->favicon(), KIcon::Small, KIcon::DisabledState);
+ TQPixmap tempIcon = iconEffect.apply(feed->favicon(), KIcon::Small, KIcon::DisabledState);
item->setPixmap(0, tempIcon);
}
}
@@ -944,8 +944,8 @@ void NodeListView::connectToNodeList(NodeList* list)
if (!list)
return;
- connect(list, SIGNAL(signalDestroyed(NodeList*)), this, SLOT(slotNodeListDestroyed(NodeList*)) );
- connect(list->rootNode(), SIGNAL(signalChanged(TreeNode*)), this, SLOT(slotRootNodeChanged(TreeNode*)));
+ connect(list, TQT_SIGNAL(signalDestroyed(NodeList*)), this, TQT_SLOT(slotNodeListDestroyed(NodeList*)) );
+ connect(list->rootNode(), TQT_SIGNAL(signalChanged(TreeNode*)), this, TQT_SLOT(slotRootNodeChanged(TreeNode*)));
}
void NodeListView::disconnectFromNodeList(NodeList* list)
@@ -953,8 +953,8 @@ void NodeListView::disconnectFromNodeList(NodeList* list)
if (!list)
return;
- disconnect(list, SIGNAL(signalDestroyed(NodeList*)), this, SLOT(slotNodeListDestroyed(NodeList*)) );
- disconnect(list->rootNode(), SIGNAL(signalChanged(TreeNode*)), this, SLOT(slotRootNodeChanged(TreeNode*)));
+ disconnect(list, TQT_SIGNAL(signalDestroyed(NodeList*)), this, TQT_SLOT(slotNodeListDestroyed(NodeList*)) );
+ disconnect(list->rootNode(), TQT_SIGNAL(signalChanged(TreeNode*)), this, TQT_SLOT(slotRootNodeChanged(TreeNode*)));
}
void NodeListView::disconnectFromNode(TreeNode* node)
@@ -992,10 +992,10 @@ void NodeListView::slotNodeChanged(TreeNode* node)
}
}
-QDragObject *NodeListView::dragObject()
+TQDragObject *NodeListView::dragObject()
{
KMultipleDrag *md = new KMultipleDrag(viewport());
- QDragObject *obj = KListView::dragObject();
+ TQDragObject *obj = KListView::dragObject();
if (obj) {
md->addDragObject(obj);
}
diff --git a/akregator/src/feedlistview.h b/akregator/src/feedlistview.h
index bf31574d8..efa84392f 100644
--- a/akregator/src/feedlistview.h
+++ b/akregator/src/feedlistview.h
@@ -40,7 +40,7 @@ class NodeListView : public KListView
{
Q_OBJECT
public:
- NodeListView( QWidget *parent = 0, const char *name = 0 );
+ NodeListView( TQWidget *parent = 0, const char *name = 0 );
virtual ~NodeListView();
/** sets the feed list to show. Disconnects from the old feed list, if there is any. */
@@ -66,7 +66,7 @@ public:
@param title
@return node
*/
- TreeNode* findNodeByTitle(const QString& title);
+ TreeNode* findNodeByTitle(const TQString& title);
/** ensures that @c node is visible. */
void ensureNodeVisible(TreeNode* node);
@@ -105,7 +105,7 @@ signals:
void signalDropped (KURL::List &, TreeNode*, Folder*);
void signalNodeSelected(TreeNode*);
void signalRootNodeChanged(NodeListView*, TreeNode*);
- void signalContextMenu(KListView*, TreeNode*, const QPoint&);
+ void signalContextMenu(KListView*, TreeNode*, const TQPoint&);
public: // compat with KDE-3.x assertions, remove for KDE 4
// protected:
@@ -117,7 +117,7 @@ public: // compat with KDE-3.x assertions, remove for KDE 4
TreeNodeItem* findNodeItem(TreeNode* node);
/** reimplemented to return TreeNodeItem* */
- virtual TreeNodeItem* findItemByTitle(const QString& text, int column, ComparisonFlags compare = ExactMatch | CaseSensitive ) const;
+ virtual TreeNodeItem* findItemByTitle(const TQString& text, int column, ComparisonFlags compare = ExactMatch | CaseSensitive ) const;
/** observe @c node: connect status change signals of @c node to slots */
virtual void connectToNode(TreeNode* node);
@@ -128,23 +128,23 @@ public: // compat with KDE-3.x assertions, remove for KDE 4
virtual void connectToNodeList(NodeList* list);
virtual void disconnectFromNodeList(NodeList* list);
- virtual void drawContentsOffset( QPainter * p, int ox, int oy,
+ virtual void drawContentsOffset( TQPainter * p, int ox, int oy,
int cx, int cy, int cw, int ch );
- virtual void contentsDragMoveEvent(QDragMoveEvent* event);
- virtual bool acceptDrag(QDropEvent *event) const;
- virtual void movableDropEvent(QListViewItem* parent, QListViewItem* afterme);
+ virtual void contentsDragMoveEvent(TQDragMoveEvent* event);
+ virtual bool acceptDrag(TQDropEvent *event) const;
+ virtual void movableDropEvent(TQListViewItem* parent, TQListViewItem* afterme);
- virtual QDragObject *dragObject();
+ virtual TQDragObject *dragObject();
protected slots:
- void slotDropped(QDropEvent *e, QListViewItem* after);
+ void slotDropped(TQDropEvent *e, TQListViewItem* after);
void slotRootNodeChanged(TreeNode*);
- virtual void slotSelectionChanged(QListViewItem* item);
- virtual void slotContextMenu(KListView* list, QListViewItem* item, const QPoint& p);
- virtual void slotItemRenamed(QListViewItem* item, int col, const QString& text);
+ virtual void slotSelectionChanged(TQListViewItem* item);
+ virtual void slotContextMenu(KListView* list, TQListViewItem* item, const TQPoint& p);
+ virtual void slotItemRenamed(TQListViewItem* item, int col, const TQString& text);
virtual void slotFeedFetchStarted(Feed* feed);
virtual void slotFeedFetchAborted(Feed* feed);
virtual void slotFeedFetchError(Feed* feed);
@@ -193,7 +193,7 @@ class TagNodeListView : public NodeListView
{
Q_OBJECT
public:
- TagNodeListView(QWidget *parent = 0, const char *name = 0) {}
+ TagNodeListView(TQWidget *parent = 0, const char *name = 0) {}
virtual ~TagNodeListView() {}
private:
diff --git a/akregator/src/feedstorage.h b/akregator/src/feedstorage.h
index eda8163d3..8ab9626e6 100644
--- a/akregator/src/feedstorage.h
+++ b/akregator/src/feedstorage.h
@@ -24,8 +24,8 @@
#ifndef AKREGATOR_BACKEND_FEEDSTORAGE_H
#define AKREGATOR_BACKEND_FEEDSTORAGE_H
-#include <qobject.h>
-#include <qstring.h>
+#include <tqobject.h>
+#include <tqstring.h>
#include "akregator_export.h"
@@ -40,9 +40,9 @@ class AKREGATOR_EXPORT Category
{
public:
- QString term;
- QString scheme;
- QString name;
+ TQString term;
+ TQString scheme;
+ TQString name;
/** two categories are equal when scheme and term are equal, name is ignored */
@@ -75,10 +75,10 @@ class AKREGATOR_EXPORT FeedStorage : public QObject
virtual void setLastFetch(int lastFetch) = 0;
/** returns the guids of all articles in this storage. If a tagID is given, only articles with this tag are returned */
- virtual QStringList articles(const QString& tagID=QString::null) = 0;
+ virtual TQStringList articles(const TQString& tagID=TQString::null) = 0;
/** returns the guid of the articles in a given category */
- virtual QStringList articles(const Category& cat) = 0;
+ virtual TQStringList articles(const Category& cat) = 0;
/** Appends all articles from another storage. If there is already an article in this feed with the same guid, it is replaced by the article from the source
@param source the archive which articles should be appended
@@ -86,53 +86,53 @@ class AKREGATOR_EXPORT FeedStorage : public QObject
virtual void add(FeedStorage* source) = 0;
/** reads an article from another storage and adds it to this storage */
- virtual void copyArticle(const QString& guid, FeedStorage* source) = 0;
+ virtual void copyArticle(const TQString& guid, FeedStorage* source) = 0;
/** deletes all articles from the archive */
virtual void clear() = 0;
- virtual bool contains(const QString& guid) = 0;
- virtual void addEntry(const QString& guid) = 0;
- virtual void deleteArticle(const QString& guid) = 0;
- virtual int comments(const QString& guid) = 0;
- virtual QString commentsLink(const QString& guid) = 0;
- virtual void setCommentsLink(const QString& guid, const QString& commentsLink) = 0;
- virtual void setComments(const QString& guid, int comments) = 0;
- virtual bool guidIsHash(const QString& guid) = 0;
- virtual void setGuidIsHash(const QString& guid, bool isHash) = 0;
- virtual bool guidIsPermaLink(const QString& guid) = 0;
- virtual void setGuidIsPermaLink(const QString& guid, bool isPermaLink) = 0;
- virtual uint hash(const QString& guid) = 0;
- virtual void setHash(const QString& guid, uint hash) = 0;
- virtual void setDeleted(const QString& guid) = 0;
- virtual QString link(const QString& guid) = 0;
- virtual void setLink(const QString& guid, const QString& link) = 0;
- virtual uint pubDate(const QString& guid) = 0;
- virtual void setPubDate(const QString& guid, uint pubdate) = 0;
- virtual int status(const QString& guid) = 0;
- virtual void setStatus(const QString& guid, int status) = 0;
- virtual QString title(const QString& guid) = 0;
- virtual void setTitle(const QString& guid, const QString& title) = 0;
- virtual QString description(const QString& guid) = 0;
- virtual void setDescription(const QString& guid, const QString& description) = 0;
-
- virtual void addTag(const QString& guid, const QString& tag) = 0;
- virtual void removeTag(const QString& guid, const QString& tag) = 0;
+ virtual bool contains(const TQString& guid) = 0;
+ virtual void addEntry(const TQString& guid) = 0;
+ virtual void deleteArticle(const TQString& guid) = 0;
+ virtual int comments(const TQString& guid) = 0;
+ virtual TQString commentsLink(const TQString& guid) = 0;
+ virtual void setCommentsLink(const TQString& guid, const TQString& commentsLink) = 0;
+ virtual void setComments(const TQString& guid, int comments) = 0;
+ virtual bool guidIsHash(const TQString& guid) = 0;
+ virtual void setGuidIsHash(const TQString& guid, bool isHash) = 0;
+ virtual bool guidIsPermaLink(const TQString& guid) = 0;
+ virtual void setGuidIsPermaLink(const TQString& guid, bool isPermaLink) = 0;
+ virtual uint hash(const TQString& guid) = 0;
+ virtual void setHash(const TQString& guid, uint hash) = 0;
+ virtual void setDeleted(const TQString& guid) = 0;
+ virtual TQString link(const TQString& guid) = 0;
+ virtual void setLink(const TQString& guid, const TQString& link) = 0;
+ virtual uint pubDate(const TQString& guid) = 0;
+ virtual void setPubDate(const TQString& guid, uint pubdate) = 0;
+ virtual int status(const TQString& guid) = 0;
+ virtual void setStatus(const TQString& guid, int status) = 0;
+ virtual TQString title(const TQString& guid) = 0;
+ virtual void setTitle(const TQString& guid, const TQString& title) = 0;
+ virtual TQString description(const TQString& guid) = 0;
+ virtual void setDescription(const TQString& guid, const TQString& description) = 0;
+
+ virtual void addTag(const TQString& guid, const TQString& tag) = 0;
+ virtual void removeTag(const TQString& guid, const TQString& tag) = 0;
/** returns the tags of a given article. If @c guid is null, it returns all tags used in this feed */
- virtual QStringList tags(const QString& guid=QString::null) = 0;
+ virtual TQStringList tags(const TQString& guid=TQString::null) = 0;
- virtual void addCategory(const QString& guid, const Category& category) = 0;
- virtual QValueList<Category> categories(const QString& guid=QString::null) = 0;
+ virtual void addCategory(const TQString& guid, const Category& category) = 0;
+ virtual TQValueList<Category> categories(const TQString& guid=TQString::null) = 0;
- virtual void setEnclosure(const QString& guid, const QString& url, const QString& type, int length) = 0;
- virtual void removeEnclosure(const QString& guid) = 0;
+ virtual void setEnclosure(const TQString& guid, const TQString& url, const TQString& type, int length) = 0;
+ virtual void removeEnclosure(const TQString& guid) = 0;
- virtual void setAuthor(const QString& /*guid*/, const QString& /*author*/) {}
- virtual QString author(const QString& /*guid*/) { return QString(); }
+ virtual void setAuthor(const TQString& /*guid*/, const TQString& /*author*/) {}
+ virtual TQString author(const TQString& /*guid*/) { return TQString(); }
- virtual void enclosure(const QString& guid, bool& hasEnclosure, QString& url, QString& type, int& length) = 0;
+ virtual void enclosure(const TQString& guid, bool& hasEnclosure, TQString& url, TQString& type, int& length) = 0;
virtual void close() = 0;
virtual void commit() = 0;
virtual void rollback() = 0;
diff --git a/akregator/src/feedstoragedummyimpl.cpp b/akregator/src/feedstoragedummyimpl.cpp
index f1e194949..6712d7482 100644
--- a/akregator/src/feedstoragedummyimpl.cpp
+++ b/akregator/src/feedstoragedummyimpl.cpp
@@ -27,10 +27,10 @@
#include <feed.h>
-#include <qmap.h>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qvaluelist.h>
+#include <tqmap.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqvaluelist.h>
//typedef unsigned int uint;
namespace Akregator {
@@ -44,37 +44,37 @@ class FeedStorageDummyImpl::FeedStorageDummyImplPrivate
public:
Entry() : guidIsHash(false), guidIsPermaLink(false), status(0), pubDate(0), hash(0) {}
StorageDummyImpl* mainStorage;
- QValueList<Category> categories;
- QString title;
- QString description;
- QString link;
- QString author;
- QString commentsLink;
+ TQValueList<Category> categories;
+ TQString title;
+ TQString description;
+ TQString link;
+ TQString author;
+ TQString commentsLink;
bool guidIsHash;
bool guidIsPermaLink;
int comments;
int status;
uint pubDate;
uint hash;
- QStringList tags;
+ TQStringList tags;
bool hasEnclosure;
- QString enclosureUrl;
- QString enclosureType;
+ TQString enclosureUrl;
+ TQString enclosureType;
int enclosureLength;
};
- QMap<QString, Entry> entries;
+ TQMap<TQString, Entry> entries;
// all tags occurring in the feed
- QStringList tags;
+ TQStringList tags;
// tag -> articles index
- QMap<QString, QStringList > taggedArticles;
+ TQMap<TQString, TQStringList > taggedArticles;
- QValueList<Category> categories;
- QMap<Category, QStringList> categorizedArticles;
+ TQValueList<Category> categories;
+ TQMap<Category, TQStringList> categorizedArticles;
Storage* mainStorage;
- QString url;
+ TQString url;
};
@@ -82,7 +82,7 @@ void FeedStorageDummyImpl::convertOldArchive()
{
}
-FeedStorageDummyImpl::FeedStorageDummyImpl(const QString& url, StorageDummyImpl* main) : d(new FeedStorageDummyImplPrivate)
+FeedStorageDummyImpl::FeedStorageDummyImpl(const TQString& url, StorageDummyImpl* main) : d(new FeedStorageDummyImplPrivate)
{
d->url = url;
d->mainStorage = main;
@@ -135,17 +135,17 @@ void FeedStorageDummyImpl::setLastFetch(int lastFetch)
d->mainStorage->setLastFetchFor(d->url, lastFetch);
}
-QStringList FeedStorageDummyImpl::articles(const QString& tag)
+TQStringList FeedStorageDummyImpl::articles(const TQString& tag)
{
- return tag.isNull() ? QStringList(d->entries.keys()) : d->taggedArticles[tag];
+ return tag.isNull() ? TQStringList(d->entries.keys()) : d->taggedArticles[tag];
}
-QStringList FeedStorageDummyImpl::articles(const Category& cat)
+TQStringList FeedStorageDummyImpl::articles(const Category& cat)
{
return d->categorizedArticles[cat];
}
-void FeedStorageDummyImpl::addEntry(const QString& guid)
+void FeedStorageDummyImpl::addEntry(const TQString& guid)
{
if (!d->entries.contains(guid))
{
@@ -154,12 +154,12 @@ void FeedStorageDummyImpl::addEntry(const QString& guid)
}
}
-bool FeedStorageDummyImpl::contains(const QString& guid)
+bool FeedStorageDummyImpl::contains(const TQString& guid)
{
return d->entries.contains(guid);
}
-void FeedStorageDummyImpl::deleteArticle(const QString& guid)
+void FeedStorageDummyImpl::deleteArticle(const TQString& guid)
{
if (!d->entries.contains(guid))
return;
@@ -169,34 +169,34 @@ void FeedStorageDummyImpl::deleteArticle(const QString& guid)
d->entries.remove(guid);
}
-int FeedStorageDummyImpl::comments(const QString& guid)
+int FeedStorageDummyImpl::comments(const TQString& guid)
{
return contains(guid) ? d->entries[guid].comments : 0;
}
-QString FeedStorageDummyImpl::commentsLink(const QString& guid)
+TQString FeedStorageDummyImpl::commentsLink(const TQString& guid)
{
return contains(guid) ? d->entries[guid].commentsLink : "";
}
-bool FeedStorageDummyImpl::guidIsHash(const QString& guid)
+bool FeedStorageDummyImpl::guidIsHash(const TQString& guid)
{
return contains(guid) ? d->entries[guid].guidIsHash : false;
}
-bool FeedStorageDummyImpl::guidIsPermaLink(const QString& guid)
+bool FeedStorageDummyImpl::guidIsPermaLink(const TQString& guid)
{
return contains(guid) ? d->entries[guid].guidIsPermaLink : false;
}
-uint FeedStorageDummyImpl::hash(const QString& guid)
+uint FeedStorageDummyImpl::hash(const TQString& guid)
{
return contains(guid) ? d->entries[guid].hash : 0;
}
-void FeedStorageDummyImpl::setDeleted(const QString& guid)
+void FeedStorageDummyImpl::setDeleted(const TQString& guid)
{
if (!contains(guid))
return;
@@ -204,8 +204,8 @@ void FeedStorageDummyImpl::setDeleted(const QString& guid)
FeedStorageDummyImplPrivate::Entry entry = d->entries[guid];
// remove article from tag->article index
- QStringList::ConstIterator it = entry.tags.begin();
- QStringList::ConstIterator end = entry.tags.end();
+ TQStringList::ConstIterator it = entry.tags.begin();
+ TQStringList::ConstIterator end = entry.tags.end();
for ( ; it != end; ++it)
{
@@ -215,8 +215,8 @@ void FeedStorageDummyImpl::setDeleted(const QString& guid)
}
// remove article from tag->category index
- QValueList<Category>::ConstIterator it2 = entry.categories.begin();
- QValueList<Category>::ConstIterator end2 = entry.categories.end();
+ TQValueList<Category>::ConstIterator it2 = entry.categories.begin();
+ TQValueList<Category>::ConstIterator end2 = entry.categories.end();
for ( ; it2 != end2; ++it2)
{
@@ -231,94 +231,94 @@ void FeedStorageDummyImpl::setDeleted(const QString& guid)
entry.commentsLink = "";
}
-QString FeedStorageDummyImpl::link(const QString& guid)
+TQString FeedStorageDummyImpl::link(const TQString& guid)
{
return contains(guid) ? d->entries[guid].link : "";
}
-uint FeedStorageDummyImpl::pubDate(const QString& guid)
+uint FeedStorageDummyImpl::pubDate(const TQString& guid)
{
return contains(guid) ? d->entries[guid].pubDate : 0;
}
-int FeedStorageDummyImpl::status(const QString& guid)
+int FeedStorageDummyImpl::status(const TQString& guid)
{
return contains(guid) ? d->entries[guid].status : 0;
}
-void FeedStorageDummyImpl::setStatus(const QString& guid, int status)
+void FeedStorageDummyImpl::setStatus(const TQString& guid, int status)
{
if (contains(guid))
d->entries[guid].status = status;
}
-QString FeedStorageDummyImpl::title(const QString& guid)
+TQString FeedStorageDummyImpl::title(const TQString& guid)
{
return contains(guid) ? d->entries[guid].title : "";
}
-QString FeedStorageDummyImpl::description(const QString& guid)
+TQString FeedStorageDummyImpl::description(const TQString& guid)
{
return contains(guid) ? d->entries[guid].description : "";
}
-void FeedStorageDummyImpl::setPubDate(const QString& guid, uint pubdate)
+void FeedStorageDummyImpl::setPubDate(const TQString& guid, uint pubdate)
{
if (contains(guid))
d->entries[guid].pubDate = pubdate;
}
-void FeedStorageDummyImpl::setGuidIsHash(const QString& guid, bool isHash)
+void FeedStorageDummyImpl::setGuidIsHash(const TQString& guid, bool isHash)
{
if (contains(guid))
d->entries[guid].guidIsHash = isHash;
}
-void FeedStorageDummyImpl::setLink(const QString& guid, const QString& link)
+void FeedStorageDummyImpl::setLink(const TQString& guid, const TQString& link)
{
if (contains(guid))
d->entries[guid].link = link;
}
-void FeedStorageDummyImpl::setHash(const QString& guid, uint hash)
+void FeedStorageDummyImpl::setHash(const TQString& guid, uint hash)
{
if (contains(guid))
d->entries[guid].hash = hash;
}
-void FeedStorageDummyImpl::setTitle(const QString& guid, const QString& title)
+void FeedStorageDummyImpl::setTitle(const TQString& guid, const TQString& title)
{
if (contains(guid))
d->entries[guid].title = title;
}
-void FeedStorageDummyImpl::setDescription(const QString& guid, const QString& description)
+void FeedStorageDummyImpl::setDescription(const TQString& guid, const TQString& description)
{
if (contains(guid))
d->entries[guid].description = description;
}
-void FeedStorageDummyImpl::setCommentsLink(const QString& guid, const QString& commentsLink)
+void FeedStorageDummyImpl::setCommentsLink(const TQString& guid, const TQString& commentsLink)
{
if (contains(guid))
d->entries[guid].commentsLink = commentsLink;
}
-void FeedStorageDummyImpl::setComments(const QString& guid, int comments)
+void FeedStorageDummyImpl::setComments(const TQString& guid, int comments)
{
if (contains(guid))
d->entries[guid].comments = comments;
}
-void FeedStorageDummyImpl::setGuidIsPermaLink(const QString& guid, bool isPermaLink)
+void FeedStorageDummyImpl::setGuidIsPermaLink(const TQString& guid, bool isPermaLink)
{
if (contains(guid))
d->entries[guid].guidIsPermaLink = isPermaLink;
}
-void FeedStorageDummyImpl::addTag(const QString& guid, const QString& tag)
+void FeedStorageDummyImpl::addTag(const TQString& guid, const TQString& tag)
{
if (contains(guid))
{
@@ -331,7 +331,7 @@ void FeedStorageDummyImpl::addTag(const QString& guid, const QString& tag)
}
-void FeedStorageDummyImpl::addCategory(const QString& guid, const Category& cat)
+void FeedStorageDummyImpl::addCategory(const TQString& guid, const Category& cat)
{
if (!contains(guid))
return;
@@ -343,27 +343,27 @@ void FeedStorageDummyImpl::addCategory(const QString& guid, const Category& cat)
d->categorizedArticles[cat].append(guid);
}
-void FeedStorageDummyImpl::setAuthor(const QString& guid, const QString& author)
+void FeedStorageDummyImpl::setAuthor(const TQString& guid, const TQString& author)
{
if (contains(guid))
d->entries[guid].author = author;
}
-QString FeedStorageDummyImpl::author(const QString& guid)
+TQString FeedStorageDummyImpl::author(const TQString& guid)
{
- return contains(guid) ? d->entries[guid].author : QString();
+ return contains(guid) ? d->entries[guid].author : TQString();
}
-QValueList<Category> FeedStorageDummyImpl::categories(const QString& guid)
+TQValueList<Category> FeedStorageDummyImpl::categories(const TQString& guid)
{
if (!guid.isNull())
- return contains(guid) ? d->entries[guid].categories : QValueList<Category>();
+ return contains(guid) ? d->entries[guid].categories : TQValueList<Category>();
else
return d->categories;
}
-void FeedStorageDummyImpl::removeTag(const QString& guid, const QString& tag)
+void FeedStorageDummyImpl::removeTag(const TQString& guid, const TQString& tag)
{
if (contains(guid))
{
@@ -374,10 +374,10 @@ void FeedStorageDummyImpl::removeTag(const QString& guid, const QString& tag)
}
}
-QStringList FeedStorageDummyImpl::tags(const QString& guid)
+TQStringList FeedStorageDummyImpl::tags(const TQString& guid)
{
if (!guid.isNull())
- return contains(guid) ? d->entries[guid].tags : QStringList();
+ return contains(guid) ? d->entries[guid].tags : TQStringList();
else
{
return d->tags;
@@ -386,15 +386,15 @@ QStringList FeedStorageDummyImpl::tags(const QString& guid)
void FeedStorageDummyImpl::add(FeedStorage* source)
{
- QStringList articles = source->articles();
- for (QStringList::ConstIterator it = articles.begin(); it != articles.end(); ++it)
+ TQStringList articles = source->articles();
+ for (TQStringList::ConstIterator it = articles.begin(); it != articles.end(); ++it)
copyArticle(*it, source);
setUnread(source->unread());
setLastFetch(source->lastFetch());
setTotalCount(source->totalCount());
}
-void FeedStorageDummyImpl::copyArticle(const QString& guid, FeedStorage* source)
+void FeedStorageDummyImpl::copyArticle(const TQString& guid, FeedStorage* source)
{
if (!contains(guid))
addEntry(guid);
@@ -409,9 +409,9 @@ void FeedStorageDummyImpl::copyArticle(const QString& guid, FeedStorage* source)
setPubDate(guid, source->pubDate(guid));
setStatus(guid, source->status(guid));
setTitle(guid, source->title(guid));
- QStringList tags = source->tags(guid);
+ TQStringList tags = source->tags(guid);
- for (QStringList::ConstIterator it = tags.begin(); it != tags.end(); ++it)
+ for (TQStringList::ConstIterator it = tags.begin(); it != tags.end(); ++it)
addTag(guid, *it);
}
@@ -422,7 +422,7 @@ void FeedStorageDummyImpl::clear()
setTotalCount(0);
}
-void FeedStorageDummyImpl::setEnclosure(const QString& guid, const QString& url, const QString& type, int length)
+void FeedStorageDummyImpl::setEnclosure(const TQString& guid, const TQString& url, const TQString& type, int length)
{
if (contains(guid))
{
@@ -434,19 +434,19 @@ void FeedStorageDummyImpl::setEnclosure(const QString& guid, const QString& url,
}
}
-void FeedStorageDummyImpl::removeEnclosure(const QString& guid)
+void FeedStorageDummyImpl::removeEnclosure(const TQString& guid)
{
if (contains(guid))
{
FeedStorageDummyImplPrivate::Entry entry = d->entries[guid];
entry.hasEnclosure = false;
- entry.enclosureUrl = QString::null;
- entry.enclosureType = QString::null;
+ entry.enclosureUrl = TQString::null;
+ entry.enclosureType = TQString::null;
entry.enclosureLength = -1;
}
}
-void FeedStorageDummyImpl::enclosure(const QString& guid, bool& hasEnclosure, QString& url, QString& type, int& length)
+void FeedStorageDummyImpl::enclosure(const TQString& guid, bool& hasEnclosure, TQString& url, TQString& type, int& length)
{
if (contains(guid))
{
@@ -459,8 +459,8 @@ void FeedStorageDummyImpl::enclosure(const QString& guid, bool& hasEnclosure, QS
else
{
hasEnclosure = false;
- url = QString::null;
- type = QString::null;
+ url = TQString::null;
+ type = TQString::null;
length = -1;
}
}
diff --git a/akregator/src/feedstoragedummyimpl.h b/akregator/src/feedstoragedummyimpl.h
index 563edb5c3..60c708571 100644
--- a/akregator/src/feedstoragedummyimpl.h
+++ b/akregator/src/feedstoragedummyimpl.h
@@ -32,11 +32,11 @@ class StorageDummyImpl;
class FeedStorageDummyImpl : public FeedStorage
{
public:
- FeedStorageDummyImpl(const QString& url, StorageDummyImpl* main);
+ FeedStorageDummyImpl(const TQString& url, StorageDummyImpl* main);
virtual ~FeedStorageDummyImpl();
virtual void add(FeedStorage* source);
- virtual void copyArticle(const QString& guid, FeedStorage* source);
+ virtual void copyArticle(const TQString& guid, FeedStorage* source);
virtual void clear();
virtual int unread();
@@ -45,48 +45,48 @@ class FeedStorageDummyImpl : public FeedStorage
virtual int lastFetch();
virtual void setLastFetch(int lastFetch);
- virtual QStringList articles(const QString& tag=QString::null);
-
- virtual QStringList articles(const Category& cat);
-
-
- virtual bool contains(const QString& guid);
- virtual void addEntry(const QString& guid);
- virtual void deleteArticle(const QString& guid);
- virtual int comments(const QString& guid);
- virtual QString commentsLink(const QString& guid);
- virtual void setCommentsLink(const QString& guid, const QString& commentsLink);
- virtual void setComments(const QString& guid, int comments);
- virtual bool guidIsHash(const QString& guid);
- virtual void setGuidIsHash(const QString& guid, bool isHash);
- virtual bool guidIsPermaLink(const QString& guid);
- virtual void setGuidIsPermaLink(const QString& guid, bool isPermaLink);
- virtual uint hash(const QString& guid);
- virtual void setHash(const QString& guid, uint hash);
- virtual void setDeleted(const QString& guid);
- virtual QString link(const QString& guid);
- virtual void setLink(const QString& guid, const QString& link);
- virtual uint pubDate(const QString& guid);
- virtual void setPubDate(const QString& guid, uint pubdate);
- virtual int status(const QString& guid);
- virtual void setStatus(const QString& guid, int status);
- virtual QString title(const QString& guid);
- virtual void setTitle(const QString& guid, const QString& title);
- virtual QString description(const QString& guid);
- virtual void setDescription(const QString& guid, const QString& description);
- virtual void addTag(const QString& guid, const QString& tag);
- virtual void removeTag(const QString& guid, const QString& tag);
- virtual QStringList tags(const QString& guid=QString::null);
-
- virtual void setEnclosure(const QString& guid, const QString& url, const QString& type, int length);
- virtual void removeEnclosure(const QString& guid);
- virtual void enclosure(const QString& guid, bool& hasEnclosure, QString& url, QString& type, int& length);
-
- virtual void addCategory(const QString& guid, const Category& category);
- virtual QValueList<Category> categories(const QString& guid=QString::null);
-
- virtual void setAuthor(const QString& guid, const QString& author);
- virtual QString author(const QString& guid);
+ virtual TQStringList articles(const TQString& tag=TQString::null);
+
+ virtual TQStringList articles(const Category& cat);
+
+
+ virtual bool contains(const TQString& guid);
+ virtual void addEntry(const TQString& guid);
+ virtual void deleteArticle(const TQString& guid);
+ virtual int comments(const TQString& guid);
+ virtual TQString commentsLink(const TQString& guid);
+ virtual void setCommentsLink(const TQString& guid, const TQString& commentsLink);
+ virtual void setComments(const TQString& guid, int comments);
+ virtual bool guidIsHash(const TQString& guid);
+ virtual void setGuidIsHash(const TQString& guid, bool isHash);
+ virtual bool guidIsPermaLink(const TQString& guid);
+ virtual void setGuidIsPermaLink(const TQString& guid, bool isPermaLink);
+ virtual uint hash(const TQString& guid);
+ virtual void setHash(const TQString& guid, uint hash);
+ virtual void setDeleted(const TQString& guid);
+ virtual TQString link(const TQString& guid);
+ virtual void setLink(const TQString& guid, const TQString& link);
+ virtual uint pubDate(const TQString& guid);
+ virtual void setPubDate(const TQString& guid, uint pubdate);
+ virtual int status(const TQString& guid);
+ virtual void setStatus(const TQString& guid, int status);
+ virtual TQString title(const TQString& guid);
+ virtual void setTitle(const TQString& guid, const TQString& title);
+ virtual TQString description(const TQString& guid);
+ virtual void setDescription(const TQString& guid, const TQString& description);
+ virtual void addTag(const TQString& guid, const TQString& tag);
+ virtual void removeTag(const TQString& guid, const TQString& tag);
+ virtual TQStringList tags(const TQString& guid=TQString::null);
+
+ virtual void setEnclosure(const TQString& guid, const TQString& url, const TQString& type, int length);
+ virtual void removeEnclosure(const TQString& guid);
+ virtual void enclosure(const TQString& guid, bool& hasEnclosure, TQString& url, TQString& type, int& length);
+
+ virtual void addCategory(const TQString& guid, const Category& category);
+ virtual TQValueList<Category> categories(const TQString& guid=TQString::null);
+
+ virtual void setAuthor(const TQString& guid, const TQString& author);
+ virtual TQString author(const TQString& guid);
virtual void close();
virtual void commit();
@@ -95,7 +95,7 @@ class FeedStorageDummyImpl : public FeedStorage
virtual void convertOldArchive();
private:
/** finds article by guid, returns -1 if not in archive **/
- int findArticle(const QString& guid);
+ int findArticle(const TQString& guid);
void setTotalCount(int total);
class FeedStorageDummyImplPrivate;
FeedStorageDummyImplPrivate* d;
diff --git a/akregator/src/fetchqueue.cpp b/akregator/src/fetchqueue.cpp
index 5a3634304..63c4a4c4b 100644
--- a/akregator/src/fetchqueue.cpp
+++ b/akregator/src/fetchqueue.cpp
@@ -23,7 +23,7 @@
without including the source code for Qt in the source distribution.
*/
-#include <qvaluelist.h>
+#include <tqvaluelist.h>
#include "akregatorconfig.h"
#include "fetchqueue.h"
@@ -37,12 +37,12 @@ class FetchQueue::FetchQueuePrivate
{
public:
- QValueList<Feed*> queuedFeeds;
- QValueList<Feed*> fetchingFeeds;
+ TQValueList<Feed*> queuedFeeds;
+ TQValueList<Feed*> fetchingFeeds;
};
-FetchQueue::FetchQueue(QObject* parent, const char* name): QObject(parent, name), d(new FetchQueuePrivate) {}
+FetchQueue::FetchQueue(TQObject* parent, const char* name): TQObject(parent, name), d(new FetchQueuePrivate) {}
FetchQueue::~FetchQueue()
@@ -54,14 +54,14 @@ FetchQueue::~FetchQueue()
void FetchQueue::slotAbort()
{
- for (QValueList<Feed*>::Iterator it = d->fetchingFeeds.begin(); it != d->fetchingFeeds.end(); ++it)
+ for (TQValueList<Feed*>::Iterator it = d->fetchingFeeds.begin(); it != d->fetchingFeeds.end(); ++it)
{
disconnectFromFeed(*it);
(*it)->slotAbortFetch();
}
d->fetchingFeeds.clear();
- for (QValueList<Feed*>::Iterator it = d->queuedFeeds.begin(); it != d->queuedFeeds.end(); ++it)
+ for (TQValueList<Feed*>::Iterator it = d->queuedFeeds.begin(); it != d->queuedFeeds.end(); ++it)
{
disconnectFromFeed(*it);
}
@@ -129,18 +129,18 @@ void FetchQueue::feedDone(Feed *f)
void FetchQueue::connectToFeed(Feed* feed)
{
- connect (feed, SIGNAL(fetched(Feed*)), this, SLOT(slotFeedFetched(Feed*)));
- connect (feed, SIGNAL(fetchError(Feed*)), this, SLOT(slotFetchError(Feed*)));
- connect (feed, SIGNAL(fetchAborted(Feed*)), this, SLOT(slotFetchAborted(Feed*)));
- connect (feed, SIGNAL(signalDestroyed(TreeNode*)), this, SLOT(slotNodeDestroyed(TreeNode*)));
+ connect (feed, TQT_SIGNAL(fetched(Feed*)), this, TQT_SLOT(slotFeedFetched(Feed*)));
+ connect (feed, TQT_SIGNAL(fetchError(Feed*)), this, TQT_SLOT(slotFetchError(Feed*)));
+ connect (feed, TQT_SIGNAL(fetchAborted(Feed*)), this, TQT_SLOT(slotFetchAborted(Feed*)));
+ connect (feed, TQT_SIGNAL(signalDestroyed(TreeNode*)), this, TQT_SLOT(slotNodeDestroyed(TreeNode*)));
}
void FetchQueue::disconnectFromFeed(Feed* feed)
{
- disconnect (feed, SIGNAL(fetched(Feed*)), this, SLOT(slotFeedFetched(Feed*)));
- disconnect (feed, SIGNAL(fetchError(Feed*)), this, SLOT(slotFetchError(Feed*)));
- disconnect (feed, SIGNAL(fetchAborted(Feed*)), this, SLOT(slotFetchAborted(Feed*)));
- disconnect (feed, SIGNAL(signalDestroyed(TreeNode*)), this, SLOT(slotNodeDestroyed(TreeNode*)));
+ disconnect (feed, TQT_SIGNAL(fetched(Feed*)), this, TQT_SLOT(slotFeedFetched(Feed*)));
+ disconnect (feed, TQT_SIGNAL(fetchError(Feed*)), this, TQT_SLOT(slotFetchError(Feed*)));
+ disconnect (feed, TQT_SIGNAL(fetchAborted(Feed*)), this, TQT_SLOT(slotFetchAborted(Feed*)));
+ disconnect (feed, TQT_SIGNAL(signalDestroyed(TreeNode*)), this, TQT_SLOT(slotNodeDestroyed(TreeNode*)));
}
diff --git a/akregator/src/fetchqueue.h b/akregator/src/fetchqueue.h
index f388344a6..873fde6fa 100644
--- a/akregator/src/fetchqueue.h
+++ b/akregator/src/fetchqueue.h
@@ -26,7 +26,7 @@
#ifndef AKREGATOR_FETCHQUEUE_H
#define AKREGATOR_FETCHQUEUE_H
-#include <qobject.h>
+#include <tqobject.h>
namespace Akregator {
@@ -39,7 +39,7 @@ class FetchQueue : public QObject
public:
- FetchQueue(QObject* parent=0, const char* name=0);
+ FetchQueue(TQObject* parent=0, const char* name=0);
virtual ~FetchQueue();
/** returns true when no feeds are neither fetching nor queued */
diff --git a/akregator/src/folder.cpp b/akregator/src/folder.cpp
index f7dc8afbf..f3a583a6d 100644
--- a/akregator/src/folder.cpp
+++ b/akregator/src/folder.cpp
@@ -27,10 +27,10 @@
#include "fetchqueue.h"
#include "treenodevisitor.h"
-#include <qlistview.h>
-#include <qdom.h>
-#include <qstringlist.h>
-#include <qvaluelist.h>
+#include <tqlistview.h>
+#include <tqdom.h>
+#include <tqstringlist.h>
+#include <tqvaluelist.h>
#include <kdebug.h>
@@ -40,16 +40,16 @@ class Folder::FolderPrivate
{
public:
/** List of children */
- QValueList<TreeNode*> children;
+ TQValueList<TreeNode*> children;
/** caching unread count of children */
int unread;
/** whether or not the folder is expanded */
bool open;
/** caches guids for notifying added articles */
- QValueList<Article> addedArticlesNotify;
+ TQValueList<Article> addedArticlesNotify;
/** caches guids for notifying removed articles */
- QValueList<Article> removedArticlesNotify;
+ TQValueList<Article> removedArticlesNotify;
};
bool Folder::accept(TreeNodeVisitor* visitor)
@@ -60,15 +60,15 @@ bool Folder::accept(TreeNodeVisitor* visitor)
return visitor->visitTreeNode(this);
}
-Folder* Folder::fromOPML(QDomElement e)
+Folder* Folder::fromOPML(TQDomElement e)
{
- Folder* fg = new Folder(e.hasAttribute(QString::fromLatin1("text")) ? e.attribute(QString::fromLatin1("text")) : e.attribute(QString::fromLatin1("title")));
- fg->setOpen( e.attribute(QString::fromLatin1("isOpen")) != QString::fromLatin1(("false")));
- fg->setId( e.attribute(QString::fromLatin1("id")).toUInt() );
+ Folder* fg = new Folder(e.hasAttribute(TQString::fromLatin1("text")) ? e.attribute(TQString::fromLatin1("text")) : e.attribute(TQString::fromLatin1("title")));
+ fg->setOpen( e.attribute(TQString::fromLatin1("isOpen")) != TQString::fromLatin1(("false")));
+ fg->setId( e.attribute(TQString::fromLatin1("id")).toUInt() );
return fg;
}
-Folder::Folder(const QString& title) : TreeNode(), d(new FolderPrivate)
+Folder::Folder(const TQString& title) : TreeNode(), d(new FolderPrivate)
{
d->unread = 0;
setTitle(title);
@@ -77,7 +77,7 @@ Folder::Folder(const QString& title) : TreeNode(), d(new FolderPrivate)
Folder::~Folder()
{
TreeNode* tmp = 0;
- for (QValueList<TreeNode*>::ConstIterator it = d->children.begin(); it != d->children.end(); ++it)
+ for (TQValueList<TreeNode*>::ConstIterator it = d->children.begin(); it != d->children.end(); ++it)
{
delete tmp;
tmp = *it;
@@ -90,47 +90,47 @@ Folder::~Folder()
d = 0;
}
-QStringList Folder::tags() const
+TQStringList Folder::tags() const
{
- QStringList t;
- QValueList<TreeNode*>::ConstIterator en = d->children.end();
- for (QValueList<TreeNode*>::ConstIterator it = d->children.begin(); it != en; ++it)
+ TQStringList t;
+ TQValueList<TreeNode*>::ConstIterator en = d->children.end();
+ for (TQValueList<TreeNode*>::ConstIterator it = d->children.begin(); it != en; ++it)
{
// intersect tag sets instead of appending lists, to avoid dupes. This sucks. Definitely. I want QSet. Now.
- QStringList t2 = (*it)->tags();
- for (QStringList::ConstIterator it2 = t2.begin(); it2 != t2.end(); ++it2)
+ TQStringList t2 = (*it)->tags();
+ for (TQStringList::ConstIterator it2 = t2.begin(); it2 != t2.end(); ++it2)
if (!t.contains(*it2))
t.append(*it2);
}
return t;
}
-QValueList<Article> Folder::articles(const QString& tag)
+TQValueList<Article> Folder::articles(const TQString& tag)
{
- QValueList<Article> seq;
- QValueList<TreeNode*>::ConstIterator en = d->children.end();
- for (QValueList<TreeNode*>::ConstIterator it = d->children.begin(); it != en; ++it)
+ TQValueList<Article> seq;
+ TQValueList<TreeNode*>::ConstIterator en = d->children.end();
+ for (TQValueList<TreeNode*>::ConstIterator it = d->children.begin(); it != en; ++it)
seq += (*it)->articles(tag);
return seq;
}
-QDomElement Folder::toOPML( QDomElement parent, QDomDocument document ) const
+TQDomElement Folder::toOPML( TQDomElement parent, TQDomDocument document ) const
{
- QDomElement el = document.createElement( "outline" );
+ TQDomElement el = document.createElement( "outline" );
el.setAttribute( "text", title() );
parent.appendChild( el );
el.setAttribute("isOpen", d->open ? "true" : "false");
- el.setAttribute( "id", QString::number(id()) );
+ el.setAttribute( "id", TQString::number(id()) );
- QValueList<TreeNode*>::ConstIterator en = d->children.end();
- for (QValueList<TreeNode*>::ConstIterator it = d->children.begin(); it != en; ++it)
+ TQValueList<TreeNode*>::ConstIterator en = d->children.end();
+ for (TQValueList<TreeNode*>::ConstIterator it = d->children.begin(); it != en; ++it)
el.appendChild( (*it)->toOPML(el, document) );
return el;
}
-QValueList<TreeNode*> Folder::children() const
+TQValueList<TreeNode*> Folder::children() const
{
return d->children;
}
@@ -246,8 +246,8 @@ int Folder::totalCount() const
{
int totalCount = 0;
- QValueList<TreeNode*>::ConstIterator en = d->children.end();
- for (QValueList<TreeNode*>::ConstIterator it = d->children.begin(); it != en; ++it)
+ TQValueList<TreeNode*>::ConstIterator en = d->children.end();
+ for (TQValueList<TreeNode*>::ConstIterator it = d->children.begin(); it != en; ++it)
totalCount += (*it)->totalCount();
return totalCount;
@@ -257,8 +257,8 @@ void Folder::updateUnreadCount()
{
int unread = 0;
- QValueList<TreeNode*>::ConstIterator en = d->children.end();
- for (QValueList<TreeNode*>::ConstIterator it = d->children.begin(); it != en; ++it)
+ TQValueList<TreeNode*>::ConstIterator en = d->children.end();
+ for (TQValueList<TreeNode*>::ConstIterator it = d->children.begin(); it != en; ++it)
unread += (*it)->unread();
d->unread = unread;
@@ -267,8 +267,8 @@ void Folder::updateUnreadCount()
void Folder::slotMarkAllArticlesAsRead()
{
setNotificationMode(false);
- QValueList<TreeNode*>::ConstIterator en = d->children.end();
- for (QValueList<TreeNode*>::ConstIterator it = d->children.begin(); it != en; ++it)
+ TQValueList<TreeNode*>::ConstIterator en = d->children.end();
+ for (TQValueList<TreeNode*>::ConstIterator it = d->children.begin(); it != en; ++it)
(*it)->slotMarkAllArticlesAsRead();
setNotificationMode(true, true);
}
@@ -289,16 +289,16 @@ void Folder::slotChildDestroyed(TreeNode* node)
void Folder::slotDeleteExpiredArticles()
{
setNotificationMode(false);
- QValueList<TreeNode*>::ConstIterator en = d->children.end();
- for (QValueList<TreeNode*>::ConstIterator it = d->children.begin(); it != en; ++it)
+ TQValueList<TreeNode*>::ConstIterator en = d->children.end();
+ for (TQValueList<TreeNode*>::ConstIterator it = d->children.begin(); it != en; ++it)
(*it)->slotDeleteExpiredArticles();
setNotificationMode(true, true);
}
void Folder::slotAddToFetchQueue(FetchQueue* queue, bool intervalFetchOnly)
{
- QValueList<TreeNode*>::ConstIterator en = d->children.end();
- for (QValueList<TreeNode*>::ConstIterator it = d->children.begin(); it != en; ++it)
+ TQValueList<TreeNode*>::ConstIterator en = d->children.end();
+ for (TQValueList<TreeNode*>::ConstIterator it = d->children.begin(); it != en; ++it)
(*it)->slotAddToFetchQueue(queue, intervalFetchOnly);
}
@@ -308,20 +308,20 @@ void Folder::doArticleNotification()
void Folder::connectToNode(TreeNode* child)
{
- connect(child, SIGNAL(signalChanged(TreeNode*)), this, SLOT(slotChildChanged(TreeNode*)));
- connect(child, SIGNAL(signalDestroyed(TreeNode*)), this, SLOT(slotChildDestroyed(TreeNode*)));
- connect(child, SIGNAL(signalArticlesAdded(TreeNode*, const QValueList<Article>&)), this, SIGNAL(signalArticlesAdded(TreeNode*, const QValueList<Article>&)));
- connect(child, SIGNAL(signalArticlesRemoved(TreeNode*, const QValueList<Article>&)), this, SIGNAL(signalArticlesRemoved(TreeNode*, const QValueList<Article>&)));
- connect(child, SIGNAL(signalArticlesUpdated(TreeNode*, const QValueList<Article>&)), this, SIGNAL(signalArticlesUpdated(TreeNode*, const QValueList<Article>&)));
+ connect(child, TQT_SIGNAL(signalChanged(TreeNode*)), this, TQT_SLOT(slotChildChanged(TreeNode*)));
+ connect(child, TQT_SIGNAL(signalDestroyed(TreeNode*)), this, TQT_SLOT(slotChildDestroyed(TreeNode*)));
+ connect(child, TQT_SIGNAL(signalArticlesAdded(TreeNode*, const TQValueList<Article>&)), this, TQT_SIGNAL(signalArticlesAdded(TreeNode*, const TQValueList<Article>&)));
+ connect(child, TQT_SIGNAL(signalArticlesRemoved(TreeNode*, const TQValueList<Article>&)), this, TQT_SIGNAL(signalArticlesRemoved(TreeNode*, const TQValueList<Article>&)));
+ connect(child, TQT_SIGNAL(signalArticlesUpdated(TreeNode*, const TQValueList<Article>&)), this, TQT_SIGNAL(signalArticlesUpdated(TreeNode*, const TQValueList<Article>&)));
}
void Folder::disconnectFromNode(TreeNode* child)
{
- disconnect(child, SIGNAL(signalChanged(TreeNode*)), this, SLOT(slotChildChanged(TreeNode*)));
- disconnect(child, SIGNAL(signalDestroyed(TreeNode*)), this, SLOT(slotChildDestroyed(TreeNode*)));
- disconnect(child, SIGNAL(signalArticlesAdded(TreeNode*, const QValueList<Article>&)), this, SIGNAL(signalArticlesAdded(TreeNode*, const QValueList<Article>&)));
- disconnect(child, SIGNAL(signalArticlesRemoved(TreeNode*, const QValueList<Article>&)), this, SIGNAL(signalArticlesRemoved(TreeNode*, const QValueList<Article>&)));
- disconnect(child, SIGNAL(signalArticlesUpdated(TreeNode*, const QValueList<Article>&)), this, SIGNAL(signalArticlesUpdated(TreeNode*, const QValueList<Article>&)));
+ disconnect(child, TQT_SIGNAL(signalChanged(TreeNode*)), this, TQT_SLOT(slotChildChanged(TreeNode*)));
+ disconnect(child, TQT_SIGNAL(signalDestroyed(TreeNode*)), this, TQT_SLOT(slotChildDestroyed(TreeNode*)));
+ disconnect(child, TQT_SIGNAL(signalArticlesAdded(TreeNode*, const TQValueList<Article>&)), this, TQT_SIGNAL(signalArticlesAdded(TreeNode*, const TQValueList<Article>&)));
+ disconnect(child, TQT_SIGNAL(signalArticlesRemoved(TreeNode*, const TQValueList<Article>&)), this, TQT_SIGNAL(signalArticlesRemoved(TreeNode*, const TQValueList<Article>&)));
+ disconnect(child, TQT_SIGNAL(signalArticlesUpdated(TreeNode*, const TQValueList<Article>&)), this, TQT_SIGNAL(signalArticlesUpdated(TreeNode*, const TQValueList<Article>&)));
}
TreeNode* Folder::next()
diff --git a/akregator/src/folder.h b/akregator/src/folder.h
index 5c437d314..ca12c164a 100644
--- a/akregator/src/folder.h
+++ b/akregator/src/folder.h
@@ -49,12 +49,12 @@ namespace Akregator
Child nodes are not inserted or parsed.
@param e the element representing the feed group
@return a freshly created feed group */
- static Folder* fromOPML(QDomElement e);
+ static Folder* fromOPML(TQDomElement e);
/** Creates a new folder with a given title
@param title The title of the feed group
*/
- Folder(const QString& title = QString::null);
+ Folder(const TQString& title = TQString::null);
virtual ~Folder();
@@ -62,10 +62,10 @@ namespace Akregator
/** returns recursively concatenated articles of children
@return an article sequence containing articles of children */
- virtual QValueList<Article> articles(const QString& tag=QString::null);
+ virtual TQValueList<Article> articles(const TQString& tag=TQString::null);
/** returns a list of all tags occurring in the subtree of this folder */
- virtual QStringList tags() const;
+ virtual TQStringList tags() const;
/** returns the number of unread articles in all children
@return number of unread articles */
@@ -83,12 +83,12 @@ namespace Akregator
@param parent The parent element
@param document The DOM document
@return The newly created element representing this feed group */
- virtual QDomElement toOPML( QDomElement parent, QDomDocument document ) const;
+ virtual TQDomElement toOPML( TQDomElement parent, TQDomDocument document ) const;
/** returns the (direct) children of this node.
@return a list of pointers to the child nodes
*/
- virtual QValueList<TreeNode*> children() const;
+ virtual TQValueList<TreeNode*> children() const;
/** inserts @c node as child after child node @c after.
if @c after is not a child of this group, @c node will be inserted as first child
diff --git a/akregator/src/folderitem.cpp b/akregator/src/folderitem.cpp
index 1745295ea..6a3c0c055 100644
--- a/akregator/src/folderitem.cpp
+++ b/akregator/src/folderitem.cpp
@@ -27,7 +27,7 @@
#include "folderitem.h"
#include "treenode.h"
-#include <qpopupmenu.h>
+#include <tqpopupmenu.h>
#include <kaction.h>
#include <kiconloader.h>
@@ -76,11 +76,11 @@ FolderItem::~FolderItem()
{}
-void FolderItem::showContextMenu(const QPoint& p)
+void FolderItem::showContextMenu(const TQPoint& p)
{
- QWidget* w = ActionManager::getInstance()->container("feedgroup_popup");
+ TQWidget* w = ActionManager::getInstance()->container("feedgroup_popup");
if (w)
- static_cast<QPopupMenu *>(w)->exec(p);
+ static_cast<TQPopupMenu *>(w)->exec(p);
}
} // namespace Akregator
diff --git a/akregator/src/folderitem.h b/akregator/src/folderitem.h
index 86c9e67a3..7c24b01e5 100644
--- a/akregator/src/folderitem.h
+++ b/akregator/src/folderitem.h
@@ -28,7 +28,7 @@
#include "treenode.h"
#include "folder.h"
-#include <qpixmap.h>
+#include <tqpixmap.h>
class QPoint;
@@ -50,7 +50,7 @@ public:
virtual Folder* node();
virtual void setOpen(bool open);
- virtual void showContextMenu(const QPoint& p);
+ virtual void showContextMenu(const TQPoint& p);
private:
void initialize(Folder* node);
diff --git a/akregator/src/frame.cpp b/akregator/src/frame.cpp
index faa8e371c..c8780462f 100644
--- a/akregator/src/frame.cpp
+++ b/akregator/src/frame.cpp
@@ -22,8 +22,8 @@
without including the source code for Qt in the source distribution.
*/
-#include <qregexp.h>
-#include <qstylesheet.h>
+#include <tqregexp.h>
+#include <tqstylesheet.h>
#include <kactioncollection.h>
#include <kdebug.h>
@@ -37,8 +37,8 @@
namespace Akregator {
-Frame::Frame(QObject * parent, KParts::ReadOnlyPart *p, QWidget *visWidget, const QString& tit, bool watchSignals)
- :QObject(parent, "aKregatorFrame")
+Frame::Frame(TQObject * parent, KParts::ReadOnlyPart *p, TQWidget *visWidget, const TQString& tit, bool watchSignals)
+ :TQObject(parent, "aKregatorFrame")
{
m_autoDeletePart = false;
m_part=p;
@@ -50,25 +50,25 @@ Frame::Frame(QObject * parent, KParts::ReadOnlyPart *p, QWidget *visWidget, cons
if (watchSignals) // e.g, articles tab has no part
{
- connect(m_part, SIGNAL(setWindowCaption (const QString &)), this, SLOT(setCaption (const QString &)));
- connect(m_part, SIGNAL(setStatusBarText (const QString &)), this, SLOT(setStatusText (const QString &)));
+ connect(m_part, TQT_SIGNAL(setWindowCaption (const TQString &)), this, TQT_SLOT(setCaption (const TQString &)));
+ connect(m_part, TQT_SIGNAL(setStatusBarText (const TQString &)), this, TQT_SLOT(setStatusText (const TQString &)));
KParts::BrowserExtension *ext=KParts::BrowserExtension::childObject( p );
if (ext)
- connect( ext, SIGNAL(loadingProgress(int)), this, SLOT(setProgress(int)) );
+ connect( ext, TQT_SIGNAL(loadingProgress(int)), this, TQT_SLOT(setProgress(int)) );
- connect(p, SIGNAL(started(KIO::Job*)), this, SLOT(setStarted()));
- connect(p, SIGNAL(completed()), this, SLOT(setCompleted()));
- connect(p, SIGNAL(canceled(const QString &)), this, SLOT(setCanceled(const QString&)));
- connect(p, SIGNAL(completed(bool)), this, SLOT(setCompleted()));
+ connect(p, TQT_SIGNAL(started(KIO::Job*)), this, TQT_SLOT(setStarted()));
+ connect(p, TQT_SIGNAL(completed()), this, TQT_SLOT(setCompleted()));
+ connect(p, TQT_SIGNAL(canceled(const TQString &)), this, TQT_SLOT(setCanceled(const TQString&)));
+ connect(p, TQT_SIGNAL(completed(bool)), this, TQT_SLOT(setCompleted()));
/* KActionCollection *coll=p->actionCollection();
if (coll)
{
- connect( coll, SIGNAL( actionStatusText( const QString & ) ),
- this, SLOT( slotActionStatusText( const QString & ) ) );
- connect( coll, SIGNAL( clearStatusText() ),
- this, SLOT( slotClearStatusText() ) );
+ connect( coll, TQT_SIGNAL( actionStatusText( const TQString & ) ),
+ this, TQT_SLOT( slotActionStatusText( const TQString & ) ) );
+ connect( coll, TQT_SIGNAL( clearStatusText() ),
+ this, TQT_SLOT( slotClearStatusText() ) );
}
*/
}
@@ -99,12 +99,12 @@ KParts::ReadOnlyPart *Frame::part() const
return m_part;
}
-QWidget *Frame::widget() const
+TQWidget *Frame::widget() const
{
return m_widget;
}
-void Frame::setTitle(const QString &s)
+void Frame::setTitle(const TQString &s)
{
if (m_title != s)
{
@@ -113,17 +113,17 @@ void Frame::setTitle(const QString &s)
}
}
-void Frame::setCaption(const QString &s)
+void Frame::setCaption(const TQString &s)
{
if(m_progressItem) m_progressItem->setLabel(s);
m_caption=s;
emit captionChanged(s);
}
-void Frame::setStatusText(const QString &s)
+void Frame::setStatusText(const TQString &s)
{
m_statusText=s;
- m_statusText.replace(QRegExp("<[^>]*>"), "");
+ m_statusText.replace(TQRegExp("<[^>]*>"), "");
emit statusText(m_statusText);
}
@@ -146,7 +146,7 @@ void Frame::setState(int a)
emit started();
break;
case Frame::Canceled:
- emit canceled(QString::null);
+ emit canceled(TQString::null);
break;
case Frame::Idle:
case Frame::Completed:
@@ -156,17 +156,17 @@ void Frame::setState(int a)
-const QString& Frame::title() const
+const TQString& Frame::title() const
{
return m_title;
}
-const QString& Frame::caption() const
+const TQString& Frame::caption() const
{
return m_caption;
}
-const QString& Frame::statusText() const
+const TQString& Frame::statusText() const
{
return m_statusText;
}
@@ -174,14 +174,14 @@ const QString& Frame::statusText() const
void Frame::setStarted()
{
if(m_progressId.isNull() || m_progressId.isEmpty()) m_progressId = KPIM::ProgressManager::getUniqueID();
- m_progressItem = KPIM::ProgressManager::createProgressItem(m_progressId, QStyleSheet::escape( title() ), QString::null, false);
+ m_progressItem = KPIM::ProgressManager::createProgressItem(m_progressId, TQStyleSheet::escape( title() ), TQString::null, false);
m_progressItem->setStatus(i18n("Loading..."));
- //connect(m_progressItem, SIGNAL(progressItemCanceled(KPIM::ProgressItem*)), SLOT(slotAbortFetch()));
+ //connect(m_progressItem, TQT_SIGNAL(progressItemCanceled(KPIM::ProgressItem*)), TQT_SLOT(slotAbortFetch()));
m_state=Started;
emit started();
}
-void Frame::setCanceled(const QString &s)
+void Frame::setCanceled(const TQString &s)
{
if(m_progressItem) {
m_progressItem->setStatus(i18n("Loading canceled"));
diff --git a/akregator/src/frame.h b/akregator/src/frame.h
index d0fe2a4ef..1649722d7 100644
--- a/akregator/src/frame.h
+++ b/akregator/src/frame.h
@@ -25,7 +25,7 @@
#ifndef FRAME_H
#define FRAME_H
-#include <qobject.h>
+#include <tqobject.h>
namespace KParts
{
@@ -45,50 +45,50 @@ namespace Akregator
Q_OBJECT
public:
- Frame(QObject *parent, KParts::ReadOnlyPart *part, QWidget *w, const QString& tit, bool watchSignals=true);
+ Frame(TQObject *parent, KParts::ReadOnlyPart *part, TQWidget *w, const TQString& tit, bool watchSignals=true);
virtual ~Frame();
enum {Idle, Started, Completed, Canceled};
KParts::ReadOnlyPart *part() const;
- QWidget *widget() const;
- const QString& title() const;
- const QString& caption() const;
+ TQWidget *widget() const;
+ const TQString& title() const;
+ const TQString& caption() const;
int state() const;
int progress() const;
- const QString& statusText() const;
+ const TQString& statusText() const;
/** if set to true, the part is deleted when the frame is deleted. Set to @c false by default */
void setAutoDeletePart(bool autoDelete);
public slots:
void setStarted();
- void setCanceled(const QString &);
+ void setCanceled(const TQString &);
void setCompleted();
void setState(int);
void setProgress(int);
- void setCaption(const QString &);
- void setTitle(const QString &);
- void setStatusText(const QString &);
+ void setCaption(const TQString &);
+ void setTitle(const TQString &);
+ void setStatusText(const TQString &);
signals:
- void captionChanged(const QString &);
- void titleChanged(Frame*, const QString&);
+ void captionChanged(const TQString &);
+ void titleChanged(Frame*, const TQString&);
void started();
- void canceled(const QString &);
+ void canceled(const TQString &);
void completed();
void loadingProgress(int);
- void statusText(const QString &);
+ void statusText(const TQString &);
private:
KParts::ReadOnlyPart *m_part;
- QWidget *m_widget;
- QString m_title;
- QString m_caption;
+ TQWidget *m_widget;
+ TQString m_title;
+ TQString m_caption;
int m_state;
int m_progress;
- QString m_statusText;
- QString m_progressId;
+ TQString m_statusText;
+ TQString m_progressId;
KPIM::ProgressItem *m_progressItem;
bool m_autoDeletePart;
};
diff --git a/akregator/src/kcursorsaver.h b/akregator/src/kcursorsaver.h
index c77a7377b..50e49aa87 100644
--- a/akregator/src/kcursorsaver.h
+++ b/akregator/src/kcursorsaver.h
@@ -3,8 +3,8 @@
#ifndef kcursorsaver_h
#define kcursorsaver_h
-#include <qcursor.h>
-#include <qapplication.h>
+#include <tqcursor.h>
+#include <tqapplication.h>
namespace Akregator {
@@ -17,9 +17,9 @@ namespace Akregator {
class KCursorSaver : public Qt
{
public:
- /// constructor taking QCursor shapes
+ /// constructor taking TQCursor shapes
KCursorSaver(Qt::CursorShape shape) {
- QApplication::setOverrideCursor( QCursor(shape) );
+ TQApplication::setOverrideCursor( TQCursor(shape) );
inited = true;
}
@@ -31,12 +31,12 @@ public:
/// restore the cursor
~KCursorSaver() {
if (inited)
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
}
/// call this to explitly restore the cursor
inline void restoreCursor(void) {
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
inited = false;
}
@@ -55,10 +55,10 @@ private:
*/
namespace KBusyPtr {
inline KCursorSaver idle() {
- return KCursorSaver(QCursor::ArrowCursor);
+ return KCursorSaver(TQCursor::ArrowCursor);
}
inline KCursorSaver busy() {
- return KCursorSaver(QCursor::WaitCursor);
+ return KCursorSaver(TQCursor::WaitCursor);
}
}
diff --git a/akregator/src/librss/article.cpp b/akregator/src/librss/article.cpp
index 010cf5dcb..244130535 100644
--- a/akregator/src/librss/article.cpp
+++ b/akregator/src/librss/article.cpp
@@ -19,8 +19,8 @@
#include <kurllabel.h>
#include <kmdcodec.h>
-#include <qdatetime.h>
-#include <qdom.h>
+#include <tqdatetime.h>
+#include <tqdom.h>
using namespace RSS;
namespace RSS
@@ -30,18 +30,18 @@ namespace RSS
struct Article::Private : public Shared
{
- QString title;
+ TQString title;
KURL link;
- QString description;
- QDateTime pubDate;
- QString guid;
- QString author;
+ TQString description;
+ TQDateTime pubDate;
+ TQString guid;
+ TQString author;
bool guidIsPermaLink;
MetaInfoMap meta;
KURL commentsLink;
int numComments;
Enclosure enclosure;
- QValueList<Category> categories;
+ TQValueList<Category> categories;
};
Article::Article() : d(new Private)
@@ -58,15 +58,15 @@ Enclosure Article::enclosure() const
return d->enclosure;
}
-QValueList<Category> Article::categories() const
+TQValueList<Category> Article::categories() const
{
return d->categories;
}
-Article::Article(const QDomNode &node, Format format, Version version) : d(new Private)
+Article::Article(const TQDomNode &node, Format format, Version version) : d(new Private)
{
- QString elemText;
+ TQString elemText;
d->numComments=0;
@@ -75,38 +75,38 @@ Article::Article(const QDomNode &node, Format format, Version version) : d(new P
if (format==AtomFeed)
{
- QDomNode n;
+ TQDomNode n;
for (n = node.firstChild(); !n.isNull(); n = n.nextSibling()) {
- const QDomElement e = n.toElement();
- if ( (e.tagName()==QString::fromLatin1("link")) &&
- (e.attribute(QString::fromLatin1("rel"), QString::fromLatin1("alternate")) == QString::fromLatin1("alternate")))
+ const TQDomElement e = n.toElement();
+ if ( (e.tagName()==TQString::fromLatin1("link")) &&
+ (e.attribute(TQString::fromLatin1("rel"), TQString::fromLatin1("alternate")) == TQString::fromLatin1("alternate")))
{
- d->link=n.toElement().attribute(QString::fromLatin1("href"));
+ d->link=n.toElement().attribute(TQString::fromLatin1("href"));
break;
}
}
}
else
{
- if (!(elemText = extractNode(node, QString::fromLatin1("link"))).isNull())
+ if (!(elemText = extractNode(node, TQString::fromLatin1("link"))).isNull())
d->link = elemText;
}
// prefer content/content:encoded over summary/description for feeds that provide it
- QString tagName=(format==AtomFeed)? QString::fromLatin1("content"): QString::fromLatin1("content:encoded");
+ TQString tagName=(format==AtomFeed)? TQString::fromLatin1("content"): TQString::fromLatin1("content:encoded");
if (!(elemText = extractNode(node, tagName, false)).isNull())
d->description = elemText;
if (d->description.isEmpty())
{
- if (!(elemText = extractNode(node, QString::fromLatin1("body"), false)).isNull())
+ if (!(elemText = extractNode(node, TQString::fromLatin1("body"), false)).isNull())
d->description = elemText;
if (d->description.isEmpty()) // 3rd try: see http://www.intertwingly.net/blog/1299.html
{
- if (!(elemText = extractNode(node, QString::fromLatin1((format==AtomFeed)? "summary" : "description"), false)).isNull())
+ if (!(elemText = extractNode(node, TQString::fromLatin1((format==AtomFeed)? "summary" : "description"), false)).isNull())
d->description = elemText;
}
}
@@ -116,21 +116,21 @@ Article::Article(const QDomNode &node, Format format, Version version) : d(new P
if (format == AtomFeed)
{
if (version == vAtom_1_0)
- elemText = extractNode(node, QString::fromLatin1("updated"));
+ elemText = extractNode(node, TQString::fromLatin1("updated"));
else
- elemText = extractNode(node, QString::fromLatin1("issued"));
+ elemText = extractNode(node, TQString::fromLatin1("issued"));
if (!elemText.isNull())
time = parseISO8601Date(elemText);
}
else
{
- elemText = extractNode(node, QString::fromLatin1("pubDate"));
+ elemText = extractNode(node, TQString::fromLatin1("pubDate"));
if (!elemText.isNull())
time = KRFCDate::parseDate(elemText);
}
- if (!(elemText = extractNode(node, QString::fromLatin1("dc:date"))).isNull())
+ if (!(elemText = extractNode(node, TQString::fromLatin1("dc:date"))).isNull())
{
time = parseISO8601Date(elemText);
}
@@ -139,32 +139,32 @@ Article::Article(const QDomNode &node, Format format, Version version) : d(new P
if (time != 0)
d->pubDate.setTime_t(time);
- if (!(elemText = extractNode(node, QString::fromLatin1("wfw:comment"))).isNull()) {
+ if (!(elemText = extractNode(node, TQString::fromLatin1("wfw:comment"))).isNull()) {
d->commentsLink = elemText;
}
- if (!(elemText = extractNode(node, QString::fromLatin1("slash:comments"))).isNull()) {
+ if (!(elemText = extractNode(node, TQString::fromLatin1("slash:comments"))).isNull()) {
d->numComments = elemText.toInt();
}
- QDomElement element = QDomNode(node).toElement();
+ TQDomElement element = TQDomNode(node).toElement();
// in RSS 1.0, we use <item about> attribute as ID
// FIXME: pass format version instead of checking for attribute
- if (!element.isNull() && element.hasAttribute(QString::fromLatin1("rdf:about")))
+ if (!element.isNull() && element.hasAttribute(TQString::fromLatin1("rdf:about")))
{
- d->guid = element.attribute(QString::fromLatin1("rdf:about")); // HACK: using ns properly did not work
+ d->guid = element.attribute(TQString::fromLatin1("rdf:about")); // HACK: using ns properly did not work
d->guidIsPermaLink = false;
}
else
{
- tagName=(format==AtomFeed)? QString::fromLatin1("id"): QString::fromLatin1("guid");
- QDomNode n = node.namedItem(tagName);
+ tagName=(format==AtomFeed)? TQString::fromLatin1("id"): TQString::fromLatin1("guid");
+ TQDomNode n = node.namedItem(tagName);
if (!n.isNull())
{
d->guidIsPermaLink = (format==AtomFeed)? false : true;
- if (n.toElement().attribute(QString::fromLatin1("isPermaLink"), "true") == "false") d->guidIsPermaLink = false;
+ if (n.toElement().attribute(TQString::fromLatin1("isPermaLink"), "true") == "false") d->guidIsPermaLink = false;
if (!(elemText = extractNode(node, tagName)).isNull())
d->guid = elemText;
}
@@ -174,29 +174,29 @@ Article::Article(const QDomNode &node, Format format, Version version) : d(new P
d->guidIsPermaLink = false;
md5Machine.reset();
- QDomNode n(node);
+ TQDomNode n(node);
md5Machine.update(d->title.utf8());
md5Machine.update(d->description.utf8());
- d->guid = QString(md5Machine.hexDigest().data());
- d->meta[QString::fromLatin1("guidIsHash")] = QString::fromLatin1("true");
+ d->guid = TQString(md5Machine.hexDigest().data());
+ d->meta[TQString::fromLatin1("guidIsHash")] = TQString::fromLatin1("true");
}
- QDomNode enclosure = element.namedItem(QString::fromLatin1("enclosure"));
+ TQDomNode enclosure = element.namedItem(TQString::fromLatin1("enclosure"));
if (enclosure.isElement())
d->enclosure = Enclosure::fromXML(enclosure.toElement());
d->author = parseItemAuthor(element, format, version);
- for (QDomNode i = node.firstChild(); !i.isNull(); i = i.nextSibling())
+ for (TQDomNode i = node.firstChild(); !i.isNull(); i = i.nextSibling())
{
if (i.isElement())
{
- if (i.toElement().tagName() == QString::fromLatin1("metaInfo:meta"))
+ if (i.toElement().tagName() == TQString::fromLatin1("metaInfo:meta"))
{
- QString type = i.toElement().attribute(QString::fromLatin1("type"));
+ TQString type = i.toElement().attribute(TQString::fromLatin1("type"));
d->meta[type] = i.toElement().text();
}
- else if (i.toElement().tagName() == QString::fromLatin1("category"))
+ else if (i.toElement().tagName() == TQString::fromLatin1("category"))
{
d->categories.append(Category::fromXML(i.toElement()));
}
@@ -210,12 +210,12 @@ Article::~Article()
delete d;
}
-QString Article::title() const
+TQString Article::title() const
{
return d->title;
}
-QString Article::author() const
+TQString Article::author() const
{
return d->author;
}
@@ -225,12 +225,12 @@ const KURL &Article::link() const
return d->link;
}
-QString Article::description() const
+TQString Article::description() const
{
return d->description;
}
-QString Article::guid() const
+TQString Article::guid() const
{
return d->guid;
}
@@ -240,7 +240,7 @@ bool Article::guidIsPermaLink() const
return d->guidIsPermaLink;
}
-const QDateTime &Article::pubDate() const
+const TQDateTime &Article::pubDate() const
{
return d->pubDate;
}
@@ -256,12 +256,12 @@ int Article::comments() const
}
-QString Article::meta(const QString &key) const
+TQString Article::meta(const TQString &key) const
{
return d->meta[key];
}
-KURLLabel *Article::widget(QWidget *parent, const char *name) const
+KURLLabel *Article::widget(TQWidget *parent, const char *name) const
{
KURLLabel *label = new KURLLabel(d->link.url(), d->title, parent, name);
label->setUseTips(true);
diff --git a/akregator/src/librss/article.h b/akregator/src/librss/article.h
index 74deb2539..4aa11850a 100644
--- a/akregator/src/librss/article.h
+++ b/akregator/src/librss/article.h
@@ -11,7 +11,7 @@
#ifndef LIBRSS_ARTICLE_H
#define LIBRSS_ARTICLE_H
-#include <qmap.h>
+#include <tqmap.h>
#include "global.h"
@@ -40,7 +40,7 @@ namespace RSS
/**
* A list of articles.
*/
- typedef QValueList<Article> List;
+ typedef TQValueList<Article> List;
/**
* Default constructor.
@@ -55,10 +55,10 @@ namespace RSS
/**
* Constructs an Article from a piece of RSS markup.
- * @param node A QDomNode which references the DOM leaf to be used
+ * @param node A TQDomNode which references the DOM leaf to be used
* for constructing the Article.
*/
- Article(const QDomNode &node, Format format, Version version);
+ Article(const TQDomNode &node, Format format, Version version);
/**
* Assignment operator.
@@ -90,10 +90,10 @@ namespace RSS
/**
* RSS 0.90 and upwards
- * @return The headline of this article, or QString::null if
+ * @return The headline of this article, or TQString::null if
* no headline was available.
*/
- QString title() const;
+ TQString title() const;
/**
* RSS 0.90 and upwards
@@ -106,25 +106,25 @@ namespace RSS
/**
* RSS 0.91 and upwards
- * @return A story synopsis, or QString::null if no description
+ * @return A story synopsis, or TQString::null if no description
* was available.
*/
- QString description() const;
+ TQString description() const;
/**
* a string desribing the author of the item.
*/
- QString author() const;
+ TQString author() const;
/**
* RSS 2.0 and upwards
* @return An article GUID (globally unique identifier).
*/
- QString guid() const;
+ TQString guid() const;
/**
* RSS 2.0 and upwards
- * @return If this article GUID is permalink. Has no meaning when guid() is QString::null.
+ * @return If this article GUID is permalink. Has no meaning when guid() is TQString::null.
*/
bool guidIsPermaLink() const;
@@ -132,7 +132,7 @@ namespace RSS
* RSS 2.0 and upwards
* @return The date when the article was published.
*/
- const QDateTime &pubDate() const;
+ const TQDateTime &pubDate() const;
const KURL &commentsLink() const;
int comments() const;
@@ -140,9 +140,9 @@ namespace RSS
Enclosure enclosure() const;
/** returns a list of categories this article is assigned to. (RSS2 only, Atom is not supported yet) */
- QValueList<Category> categories() const;
+ TQValueList<Category> categories() const;
- QString meta(const QString &key) const;
+ TQString meta(const TQString &key) const;
/**
* @param parent The parent widget for the KURLLabel.
@@ -151,16 +151,16 @@ namespace RSS
* This makes building a user-interface which contains the
* information in this Article object more convenient.
* The returned KURLLabel's caption will be the title(), clicking
- * on it will emit the URL link(), and it has a QToolTip attached
+ * on it will emit the URL link(), and it has a TQToolTip attached
* to it which displays the description() (in case it has one,
* if there is no description, the URL which the label links to
* will be used).
* Note that you have to delete the KURLLabel object returned by
* this method yourself.
*/
- KURLLabel *widget(QWidget *parent = 0, const char *name = 0) const;
+ KURLLabel *widget(TQWidget *parent = 0, const char *name = 0) const;
- typedef QMap<QString, QString> MetaInfoMap;
+ typedef TQMap<TQString, TQString> MetaInfoMap;
private:
struct Private;
diff --git a/akregator/src/librss/category.cpp b/akregator/src/librss/category.cpp
index 07508ecaf..3fd5bee22 100644
--- a/akregator/src/librss/category.cpp
+++ b/akregator/src/librss/category.cpp
@@ -25,8 +25,8 @@
#include "category.h"
#include "tools_p.h"
-#include <qdom.h>
-#include <qstring.h>
+#include <tqdom.h>
+#include <tqstring.h>
class QString;
@@ -37,8 +37,8 @@ class Category::CategoryPrivate : public Shared
{
public:
bool isNull;
- QString category;
- QString domain;
+ TQString category;
+ TQString domain;
bool operator==(const CategoryPrivate &other) const
{
@@ -61,11 +61,11 @@ bool Category::isNull() const
return d == 0;
}
-Category Category::fromXML(const QDomElement& e)
+Category Category::fromXML(const TQDomElement& e)
{
Category obj;
- if (e.hasAttribute(QString::fromLatin1("domain")))
- obj.d->domain = e.attribute(QString::fromLatin1("domain"));
+ if (e.hasAttribute(TQString::fromLatin1("domain")))
+ obj.d->domain = e.attribute(TQString::fromLatin1("domain"));
obj.d->category = e.text();
obj.d->isNull = false;
return obj;
@@ -81,7 +81,7 @@ Category::Category(const Category& other) : d(0)
*this = other;
}
-Category::Category(const QString& category, const QString& domain) : d(new CategoryPrivate)
+Category::Category(const TQString& category, const TQString& domain) : d(new CategoryPrivate)
{
d->isNull = false;
d->category = category;
@@ -114,14 +114,14 @@ bool Category::operator==(const Category &other) const
return *d == *other.d;
}
-QString Category::category() const
+TQString Category::category() const
{
- return !d->isNull ? d->category : QString::null;
+ return !d->isNull ? d->category : TQString::null;
}
-QString Category::domain() const
+TQString Category::domain() const
{
- return !d->isNull ? d->domain : QString::null;
+ return !d->isNull ? d->domain : TQString::null;
}
} // namespace RSS
diff --git a/akregator/src/librss/category.h b/akregator/src/librss/category.h
index 43267b903..597b34e1f 100644
--- a/akregator/src/librss/category.h
+++ b/akregator/src/librss/category.h
@@ -37,19 +37,19 @@ namespace RSS
{
public:
- static Category fromXML(const QDomElement& e);
+ static Category fromXML(const TQDomElement& e);
Category();
Category(const Category& other);
- Category(const QString& category, const QString& domain);
+ Category(const TQString& category, const TQString& domain);
virtual ~Category();
Category& operator=(const Category& other);
bool operator==(const Category& other) const;
- QString category() const;
+ TQString category() const;
- QString domain() const;
+ TQString domain() const;
bool isNull() const;
diff --git a/akregator/src/librss/document.cpp b/akregator/src/librss/document.cpp
index ad9614f98..b52ea87c9 100644
--- a/akregator/src/librss/document.cpp
+++ b/akregator/src/librss/document.cpp
@@ -18,9 +18,9 @@
#include <krfcdate.h>
#include <kurl.h>
-#include <qdatetime.h>
-#include <qdom.h>
-#include <qptrlist.h>
+#include <tqdatetime.h>
+#include <tqdom.h>
+#include <tqptrlist.h>
#include <kdebug.h>
@@ -42,22 +42,22 @@ struct Document::Private : public Shared
}
Version version;
- QString title;
- QString description;
+ TQString title;
+ TQString description;
KURL link;
Image *image;
TextInput *textInput;
Article::List articles;
Language language;
Format format;
- QString copyright;
- QDateTime pubDate;
- QDateTime lastBuildDate;
- QString rating;
+ TQString copyright;
+ TQDateTime pubDate;
+ TQDateTime lastBuildDate;
+ TQString rating;
KURL docs;
int ttl;
- QString managingEditor;
- QString webMaster;
+ TQString managingEditor;
+ TQString webMaster;
HourList skipHours;
DayList skipDays;
bool valid;
@@ -72,48 +72,48 @@ Document::Document(const Document &other) : d(0)
*this = other;
}
-static QString extractLink(const QDomNode& node, Format format)
+static TQString extractLink(const TQDomNode& node, Format format)
{
if (format == AtomFeed)
{
- QDomNode n;
+ TQDomNode n;
for (n = node.firstChild(); !n.isNull(); n = n.nextSibling()) {
- const QDomElement e = n.toElement();
- if ( (e.tagName() == QString::fromLatin1("link"))
- && (e.attribute(QString::fromLatin1("rel"), QString::fromLatin1("alternate")) == QString::fromLatin1("alternate")))
+ const TQDomElement e = n.toElement();
+ if ( (e.tagName() == TQString::fromLatin1("link"))
+ && (e.attribute(TQString::fromLatin1("rel"), TQString::fromLatin1("alternate")) == TQString::fromLatin1("alternate")))
{
- return n.toElement().attribute(QString::fromLatin1("href"));
+ return n.toElement().attribute(TQString::fromLatin1("href"));
}
}
}
- return extractNode(node, QString::fromLatin1("link"));
+ return extractNode(node, TQString::fromLatin1("link"));
}
-Document::Document(const QDomDocument &doc) : d(new Private)
+Document::Document(const TQDomDocument &doc) : d(new Private)
{
- QString elemText;
- QDomNode rootNode = doc.documentElement();
+ TQString elemText;
+ TQDomNode rootNode = doc.documentElement();
// Determine the version of the present RSS markup.
- QString attr;
+ TQString attr;
// we should probably check that it ISN'T feed or rss, rather than check if it is xhtml
- if (rootNode.toElement().tagName()==QString::fromLatin1("html"))
+ if (rootNode.toElement().tagName()==TQString::fromLatin1("html"))
d->valid=false;
else
d->valid=true;
- attr = rootNode.toElement().attribute(QString::fromLatin1("version"), QString::null);
- if (rootNode.toElement().tagName()==QString::fromLatin1("feed"))
+ attr = rootNode.toElement().attribute(TQString::fromLatin1("version"), TQString::null);
+ if (rootNode.toElement().tagName()==TQString::fromLatin1("feed"))
{
d->format=AtomFeed;
- if (attr == QString::fromLatin1("0.3"))
+ if (attr == TQString::fromLatin1("0.3"))
d->version = vAtom_0_3;
- else if (attr == QString::fromLatin1("0.2")) /* smt -> review */
+ else if (attr == TQString::fromLatin1("0.2")) /* smt -> review */
d->version = vAtom_0_2;
- else if (attr == QString::fromLatin1("0.1")) /* smt -> review */
+ else if (attr == TQString::fromLatin1("0.1")) /* smt -> review */
d->version = vAtom_0_1;
else
d->version = vAtom_1_0;
@@ -121,13 +121,13 @@ Document::Document(const QDomDocument &doc) : d(new Private)
else
{
d->format=RSSFeed;
- if (attr == QString::fromLatin1("0.91"))
+ if (attr == TQString::fromLatin1("0.91"))
d->version = v0_91;
- else if (attr == QString::fromLatin1("0.92"))
+ else if (attr == TQString::fromLatin1("0.92"))
d->version = v0_92;
- else if (attr == QString::fromLatin1("0.93"))
+ else if (attr == TQString::fromLatin1("0.93"))
d->version = v0_93;
- else if (attr == QString::fromLatin1("0.94"))
+ else if (attr == TQString::fromLatin1("0.94"))
d->version = v0_94;
else // otherwise, we just assume a RSS2 compatible feed. As rss2 is generally
// backward-compatible, this should work
@@ -137,7 +137,7 @@ Document::Document(const QDomDocument &doc) : d(new Private)
if (d->format==UnknownFormat)
{
- attr = rootNode.toElement().attribute(QString::fromLatin1("xmlns"), QString::null);
+ attr = rootNode.toElement().attribute(TQString::fromLatin1("xmlns"), TQString::null);
if (!attr.isNull()) {
/*
* Hardcoding these URLs is actually a bad idea, since the DTD doesn't
@@ -147,27 +147,27 @@ Document::Document(const QDomDocument &doc) : d(new Private)
* distinguish the RSS versions by analyzing the relationship between
* the nodes.
*/
- if (attr == QString::fromLatin1("http://my.netscape.com/rdf/simple/0.9/")) {
+ if (attr == TQString::fromLatin1("http://my.netscape.com/rdf/simple/0.9/")) {
d->format=RSSFeed;
d->version = v0_90;
}
- else if (attr == QString::fromLatin1("http://purl.org/rss/1.0/")) {
+ else if (attr == TQString::fromLatin1("http://purl.org/rss/1.0/")) {
d->format=RSSFeed;
d->version = v1_0;
}
}
}
- QDomNode channelNode;
+ TQDomNode channelNode;
if (d->format == AtomFeed)
channelNode=rootNode;
else
- channelNode=rootNode.namedItem(QString::fromLatin1("channel"));
+ channelNode=rootNode.namedItem(TQString::fromLatin1("channel"));
if (!(elemText = extractTitle(channelNode)).isNull())
d->title = elemText;
- QString descriptionTagName = "description";
+ TQString descriptionTagName = "description";
if (d->format == AtomFeed)
{
@@ -186,246 +186,246 @@ Document::Document(const QDomDocument &doc) : d(new Private)
/* This is ugly but necessary since RSS 0.90 and 1.0 have a different parent
* node for <image>, <textinput> and <item> than RSS 0.91-0.94 and RSS 2.0.
*/
- QDomNode parentNode;
+ TQDomNode parentNode;
if (d->version == v0_90 || d->version == v1_0 || d->format == AtomFeed)
parentNode = rootNode;
else
{
// following is a HACK for broken 0.91 feeds like xanga.com's
- if (!rootNode.namedItem(QString::fromLatin1("item")).isNull())
+ if (!rootNode.namedItem(TQString::fromLatin1("item")).isNull())
parentNode = rootNode;
else
parentNode = channelNode;
}
// image and textinput aren't supported by Atom.. handle in case feed provides
- QDomNode n = parentNode.namedItem(QString::fromLatin1("image"));
+ TQDomNode n = parentNode.namedItem(TQString::fromLatin1("image"));
if (!n.isNull())
d->image = new Image(n);
- n = parentNode.namedItem(QString::fromLatin1("textinput"));
+ n = parentNode.namedItem(TQString::fromLatin1("textinput"));
if (!n.isNull())
d->textInput = new TextInput(n);
// Our (hopefully faster) version of elementsByTagName()
- QString tagName;
+ TQString tagName;
if (d->format == AtomFeed)
- tagName=QString::fromLatin1("entry");
+ tagName=TQString::fromLatin1("entry");
else
- tagName=QString::fromLatin1("item");
+ tagName=TQString::fromLatin1("item");
for (n = parentNode.firstChild(); !n.isNull(); n = n.nextSibling()) {
- const QDomElement e = n.toElement();
+ const TQDomElement e = n.toElement();
if (e.tagName() == tagName)
d->articles.append(Article(e, d->format, d->version));
}
- if (!(elemText = extractNode(channelNode, QString::fromLatin1("copyright"))).isNull())
+ if (!(elemText = extractNode(channelNode, TQString::fromLatin1("copyright"))).isNull())
d->copyright = elemText;
if (d->format == AtomFeed)
- elemText = rootNode.toElement().attribute(QString::fromLatin1("xml:lang"), QString::null);
+ elemText = rootNode.toElement().attribute(TQString::fromLatin1("xml:lang"), TQString::null);
else
- elemText = extractNode(channelNode, QString::fromLatin1("language"));
+ elemText = extractNode(channelNode, TQString::fromLatin1("language"));
if (!elemText.isNull()){
- if (elemText == QString::fromLatin1("af"))
+ if (elemText == TQString::fromLatin1("af"))
d->language = af;
- else if (elemText == QString::fromLatin1("sq"))
+ else if (elemText == TQString::fromLatin1("sq"))
d->language = sq;
- else if (elemText == QString::fromLatin1("eu"))
+ else if (elemText == TQString::fromLatin1("eu"))
d->language = eu;
- else if (elemText == QString::fromLatin1("be"))
+ else if (elemText == TQString::fromLatin1("be"))
d->language = be;
- else if (elemText == QString::fromLatin1("bg"))
+ else if (elemText == TQString::fromLatin1("bg"))
d->language = bg;
- else if (elemText == QString::fromLatin1("ca"))
+ else if (elemText == TQString::fromLatin1("ca"))
d->language = ca;
- else if (elemText == QString::fromLatin1("zh-cn"))
+ else if (elemText == TQString::fromLatin1("zh-cn"))
d->language = zh_cn;
- else if (elemText == QString::fromLatin1("zh-tw"))
+ else if (elemText == TQString::fromLatin1("zh-tw"))
d->language = zh_tw;
- else if (elemText == QString::fromLatin1("hr"))
+ else if (elemText == TQString::fromLatin1("hr"))
d->language = hr;
- else if (elemText == QString::fromLatin1("cs"))
+ else if (elemText == TQString::fromLatin1("cs"))
d->language = cs;
- else if (elemText == QString::fromLatin1("da"))
+ else if (elemText == TQString::fromLatin1("da"))
d->language = da;
- else if (elemText == QString::fromLatin1("nl"))
+ else if (elemText == TQString::fromLatin1("nl"))
d->language = nl;
- else if (elemText == QString::fromLatin1("nl-be"))
+ else if (elemText == TQString::fromLatin1("nl-be"))
d->language = nl_be;
- else if (elemText == QString::fromLatin1("nl-nl"))
+ else if (elemText == TQString::fromLatin1("nl-nl"))
d->language = nl_nl;
- else if (elemText == QString::fromLatin1("en"))
+ else if (elemText == TQString::fromLatin1("en"))
d->language = en;
- else if (elemText == QString::fromLatin1("en-au"))
+ else if (elemText == TQString::fromLatin1("en-au"))
d->language = en_au;
- else if (elemText == QString::fromLatin1("en-bz"))
+ else if (elemText == TQString::fromLatin1("en-bz"))
d->language = en_bz;
- else if (elemText == QString::fromLatin1("en-ca"))
+ else if (elemText == TQString::fromLatin1("en-ca"))
d->language = en_ca;
- else if (elemText == QString::fromLatin1("en-ie"))
+ else if (elemText == TQString::fromLatin1("en-ie"))
d->language = en_ie;
- else if (elemText == QString::fromLatin1("en-jm"))
+ else if (elemText == TQString::fromLatin1("en-jm"))
d->language = en_jm;
- else if (elemText == QString::fromLatin1("en-nz"))
+ else if (elemText == TQString::fromLatin1("en-nz"))
d->language = en_nz;
- else if (elemText == QString::fromLatin1("en-ph"))
+ else if (elemText == TQString::fromLatin1("en-ph"))
d->language = en_ph;
- else if (elemText == QString::fromLatin1("en-za"))
+ else if (elemText == TQString::fromLatin1("en-za"))
d->language = en_za;
- else if (elemText == QString::fromLatin1("en-tt"))
+ else if (elemText == TQString::fromLatin1("en-tt"))
d->language = en_tt;
- else if (elemText == QString::fromLatin1("en-gb"))
+ else if (elemText == TQString::fromLatin1("en-gb"))
d->language = en_gb;
- else if (elemText == QString::fromLatin1("en-us"))
+ else if (elemText == TQString::fromLatin1("en-us"))
d->language = en_us;
- else if (elemText == QString::fromLatin1("en-zw"))
+ else if (elemText == TQString::fromLatin1("en-zw"))
d->language = en_zw;
- else if (elemText == QString::fromLatin1("fo"))
+ else if (elemText == TQString::fromLatin1("fo"))
d->language = fo;
- else if (elemText == QString::fromLatin1("fi"))
+ else if (elemText == TQString::fromLatin1("fi"))
d->language = fi;
- else if (elemText == QString::fromLatin1("fr"))
+ else if (elemText == TQString::fromLatin1("fr"))
d->language = fr;
- else if (elemText == QString::fromLatin1("fr-be"))
+ else if (elemText == TQString::fromLatin1("fr-be"))
d->language = fr_be;
- else if (elemText == QString::fromLatin1("fr-ca"))
+ else if (elemText == TQString::fromLatin1("fr-ca"))
d->language = fr_ca;
- else if (elemText == QString::fromLatin1("fr-fr"))
+ else if (elemText == TQString::fromLatin1("fr-fr"))
d->language = fr_fr;
- else if (elemText == QString::fromLatin1("fr-lu"))
+ else if (elemText == TQString::fromLatin1("fr-lu"))
d->language = fr_lu;
- else if (elemText == QString::fromLatin1("fr-mc"))
+ else if (elemText == TQString::fromLatin1("fr-mc"))
d->language = fr_mc;
- else if (elemText == QString::fromLatin1("fr-ch"))
+ else if (elemText == TQString::fromLatin1("fr-ch"))
d->language = fr_ch;
- else if (elemText == QString::fromLatin1("gl"))
+ else if (elemText == TQString::fromLatin1("gl"))
d->language = gl;
- else if (elemText == QString::fromLatin1("gd"))
+ else if (elemText == TQString::fromLatin1("gd"))
d->language = gd;
- else if (elemText == QString::fromLatin1("de"))
+ else if (elemText == TQString::fromLatin1("de"))
d->language = de;
- else if (elemText == QString::fromLatin1("de-at"))
+ else if (elemText == TQString::fromLatin1("de-at"))
d->language = de_at;
- else if (elemText == QString::fromLatin1("de-de"))
+ else if (elemText == TQString::fromLatin1("de-de"))
d->language = de_de;
- else if (elemText == QString::fromLatin1("de-li"))
+ else if (elemText == TQString::fromLatin1("de-li"))
d->language = de_li;
- else if (elemText == QString::fromLatin1("de-lu"))
+ else if (elemText == TQString::fromLatin1("de-lu"))
d->language = de_lu;
- else if (elemText == QString::fromLatin1("de-ch"))
+ else if (elemText == TQString::fromLatin1("de-ch"))
d->language = de_ch;
- else if (elemText == QString::fromLatin1("el"))
+ else if (elemText == TQString::fromLatin1("el"))
d->language = el;
- else if (elemText == QString::fromLatin1("hu"))
+ else if (elemText == TQString::fromLatin1("hu"))
d->language = hu;
- else if (elemText == QString::fromLatin1("is"))
+ else if (elemText == TQString::fromLatin1("is"))
d->language = is;
- else if (elemText == QString::fromLatin1("id"))
+ else if (elemText == TQString::fromLatin1("id"))
d->language = id;
- else if (elemText == QString::fromLatin1("ga"))
+ else if (elemText == TQString::fromLatin1("ga"))
d->language = ga;
- else if (elemText == QString::fromLatin1("it"))
+ else if (elemText == TQString::fromLatin1("it"))
d->language = it;
- else if (elemText == QString::fromLatin1("it-it"))
+ else if (elemText == TQString::fromLatin1("it-it"))
d->language = it_it;
- else if (elemText == QString::fromLatin1("it-ch"))
+ else if (elemText == TQString::fromLatin1("it-ch"))
d->language = it_ch;
- else if (elemText == QString::fromLatin1("ja"))
+ else if (elemText == TQString::fromLatin1("ja"))
d->language = ja;
- else if (elemText == QString::fromLatin1("ko"))
+ else if (elemText == TQString::fromLatin1("ko"))
d->language = ko;
- else if (elemText == QString::fromLatin1("mk"))
+ else if (elemText == TQString::fromLatin1("mk"))
d->language = mk;
- else if (elemText == QString::fromLatin1("no"))
+ else if (elemText == TQString::fromLatin1("no"))
d->language = no;
- else if (elemText == QString::fromLatin1("pl"))
+ else if (elemText == TQString::fromLatin1("pl"))
d->language = pl;
- else if (elemText == QString::fromLatin1("pt"))
+ else if (elemText == TQString::fromLatin1("pt"))
d->language = pt;
- else if (elemText == QString::fromLatin1("pt-br"))
+ else if (elemText == TQString::fromLatin1("pt-br"))
d->language = pt_br;
- else if (elemText == QString::fromLatin1("pt-pt"))
+ else if (elemText == TQString::fromLatin1("pt-pt"))
d->language = pt_pt;
- else if (elemText == QString::fromLatin1("ro"))
+ else if (elemText == TQString::fromLatin1("ro"))
d->language = ro;
- else if (elemText == QString::fromLatin1("ro-mo"))
+ else if (elemText == TQString::fromLatin1("ro-mo"))
d->language = ro_mo;
- else if (elemText == QString::fromLatin1("ro-ro"))
+ else if (elemText == TQString::fromLatin1("ro-ro"))
d->language = ro_ro;
- else if (elemText == QString::fromLatin1("ru"))
+ else if (elemText == TQString::fromLatin1("ru"))
d->language = ru;
- else if (elemText == QString::fromLatin1("ru-mo"))
+ else if (elemText == TQString::fromLatin1("ru-mo"))
d->language = ru_mo;
- else if (elemText == QString::fromLatin1("ru-ru"))
+ else if (elemText == TQString::fromLatin1("ru-ru"))
d->language = ru_ru;
- else if (elemText == QString::fromLatin1("sr"))
+ else if (elemText == TQString::fromLatin1("sr"))
d->language = sr;
- else if (elemText == QString::fromLatin1("sk"))
+ else if (elemText == TQString::fromLatin1("sk"))
d->language = sk;
- else if (elemText == QString::fromLatin1("sl"))
+ else if (elemText == TQString::fromLatin1("sl"))
d->language = sl;
- else if (elemText == QString::fromLatin1("es"))
+ else if (elemText == TQString::fromLatin1("es"))
d->language = es;
- else if (elemText == QString::fromLatin1("es-ar"))
+ else if (elemText == TQString::fromLatin1("es-ar"))
d->language = es_ar;
- else if (elemText == QString::fromLatin1("es-bo"))
+ else if (elemText == TQString::fromLatin1("es-bo"))
d->language = es_bo;
- else if (elemText == QString::fromLatin1("es-cl"))
+ else if (elemText == TQString::fromLatin1("es-cl"))
d->language = es_cl;
- else if (elemText == QString::fromLatin1("es-co"))
+ else if (elemText == TQString::fromLatin1("es-co"))
d->language = es_co;
- else if (elemText == QString::fromLatin1("es-cr"))
+ else if (elemText == TQString::fromLatin1("es-cr"))
d->language = es_cr;
- else if (elemText == QString::fromLatin1("es-do"))
+ else if (elemText == TQString::fromLatin1("es-do"))
d->language = es_do;
- else if (elemText == QString::fromLatin1("es-ec"))
+ else if (elemText == TQString::fromLatin1("es-ec"))
d->language = es_ec;
- else if (elemText == QString::fromLatin1("es-sv"))
+ else if (elemText == TQString::fromLatin1("es-sv"))
d->language = es_sv;
- else if (elemText == QString::fromLatin1("es-gt"))
+ else if (elemText == TQString::fromLatin1("es-gt"))
d->language = es_gt;
- else if (elemText == QString::fromLatin1("es-hn"))
+ else if (elemText == TQString::fromLatin1("es-hn"))
d->language = es_hn;
- else if (elemText == QString::fromLatin1("es-mx"))
+ else if (elemText == TQString::fromLatin1("es-mx"))
d->language = es_mx;
- else if (elemText == QString::fromLatin1("es-ni"))
+ else if (elemText == TQString::fromLatin1("es-ni"))
d->language = es_ni;
- else if (elemText == QString::fromLatin1("es-pa"))
+ else if (elemText == TQString::fromLatin1("es-pa"))
d->language = es_pa;
- else if (elemText == QString::fromLatin1("es-py"))
+ else if (elemText == TQString::fromLatin1("es-py"))
d->language = es_py;
- else if (elemText == QString::fromLatin1("es-pe"))
+ else if (elemText == TQString::fromLatin1("es-pe"))
d->language = es_pe;
- else if (elemText == QString::fromLatin1("es-pr"))
+ else if (elemText == TQString::fromLatin1("es-pr"))
d->language = es_pr;
- else if (elemText == QString::fromLatin1("es-es"))
+ else if (elemText == TQString::fromLatin1("es-es"))
d->language = es_es;
- else if (elemText == QString::fromLatin1("es-uy"))
+ else if (elemText == TQString::fromLatin1("es-uy"))
d->language = es_uy;
- else if (elemText == QString::fromLatin1("es-ve"))
+ else if (elemText == TQString::fromLatin1("es-ve"))
d->language = es_ve;
- else if (elemText == QString::fromLatin1("sv"))
+ else if (elemText == TQString::fromLatin1("sv"))
d->language = sv;
- else if (elemText == QString::fromLatin1("sv-fi"))
+ else if (elemText == TQString::fromLatin1("sv-fi"))
d->language = sv_fi;
- else if (elemText == QString::fromLatin1("sv-se"))
+ else if (elemText == TQString::fromLatin1("sv-se"))
d->language = sv_se;
- else if (elemText == QString::fromLatin1("tr"))
+ else if (elemText == TQString::fromLatin1("tr"))
d->language = tr;
- else if (elemText == QString::fromLatin1("uk"))
+ else if (elemText == TQString::fromLatin1("uk"))
d->language = uk;
else
d->language = UndefinedLanguage;
}
if (d->format == AtomFeed)
- tagName=QString::fromLatin1("issued"); // atom doesn't specify this for feeds
+ tagName=TQString::fromLatin1("issued"); // atom doesn't specify this for feeds
// but some broken feeds do this
else
- tagName=QString::fromLatin1("pubDate");
+ tagName=TQString::fromLatin1("pubDate");
if (!(elemText = extractNode(channelNode, tagName)).isNull()) {
time_t _time;
@@ -441,7 +441,7 @@ Document::Document(const QDomDocument &doc) : d(new Private)
d->pubDate.setTime_t(_time);
}
- if (!(elemText = extractNode(channelNode, QString::fromLatin1("dc:date"))).isNull()) {
+ if (!(elemText = extractNode(channelNode, TQString::fromLatin1("dc:date"))).isNull()) {
time_t _time = parseISO8601Date(elemText);
/* \bug This isn't really the right way since it will set the date to
* Jan 1 1970, 1:00:00 if the passed date was invalid; this means that
@@ -451,9 +451,9 @@ Document::Document(const QDomDocument &doc) : d(new Private)
}
if (d->format == AtomFeed)
- tagName=QString::fromLatin1("modified");
+ tagName=TQString::fromLatin1("modified");
else
- tagName=QString::fromLatin1("lastBuildDate");
+ tagName=TQString::fromLatin1("lastBuildDate");
if (!(elemText = extractNode(channelNode, tagName)).isNull()) {
time_t _time;
if (d->format == AtomFeed)
@@ -463,44 +463,44 @@ Document::Document(const QDomDocument &doc) : d(new Private)
d->lastBuildDate.setTime_t(_time);
}
- if (!(elemText = extractNode(channelNode, QString::fromLatin1("rating"))).isNull())
+ if (!(elemText = extractNode(channelNode, TQString::fromLatin1("rating"))).isNull())
d->rating = elemText;
- if (!(elemText = extractNode(channelNode, QString::fromLatin1("docs"))).isNull())
+ if (!(elemText = extractNode(channelNode, TQString::fromLatin1("docs"))).isNull())
d->docs = elemText;
- if (!(elemText = extractNode(channelNode, QString::fromLatin1((d->format == AtomFeed) ? "author" : "managingEditor"))).isNull())
+ if (!(elemText = extractNode(channelNode, TQString::fromLatin1((d->format == AtomFeed) ? "author" : "managingEditor"))).isNull())
d->managingEditor = elemText;
- if (!(elemText = extractNode(channelNode, QString::fromLatin1("webMaster"))).isNull())
+ if (!(elemText = extractNode(channelNode, TQString::fromLatin1("webMaster"))).isNull())
d->webMaster = elemText;
- if (!(elemText = extractNode(channelNode, QString::fromLatin1("ttl"))).isNull())
+ if (!(elemText = extractNode(channelNode, TQString::fromLatin1("ttl"))).isNull())
d->ttl = elemText.toUInt();
- n = channelNode.namedItem(QString::fromLatin1("skipHours"));
+ n = channelNode.namedItem(TQString::fromLatin1("skipHours"));
if (!n.isNull())
- for (QDomElement e = n.firstChild().toElement(); !e.isNull(); e = e.nextSibling().toElement())
- if (e.tagName() == QString::fromLatin1("hour"))
+ for (TQDomElement e = n.firstChild().toElement(); !e.isNull(); e = e.nextSibling().toElement())
+ if (e.tagName() == TQString::fromLatin1("hour"))
d->skipHours.append(e.text().toUInt());
- n = channelNode.namedItem(QString::fromLatin1("skipDays"));
+ n = channelNode.namedItem(TQString::fromLatin1("skipDays"));
if (!n.isNull()) {
Day day;
- QString elemText;
- for (QDomElement e = n.firstChild().toElement(); !e.isNull(); e = e.nextSibling().toElement())
- if (e.tagName() == QString::fromLatin1("day")) {
+ TQString elemText;
+ for (TQDomElement e = n.firstChild().toElement(); !e.isNull(); e = e.nextSibling().toElement())
+ if (e.tagName() == TQString::fromLatin1("day")) {
elemText = e.text().lower();
- if (elemText == QString::fromLatin1("monday"))
+ if (elemText == TQString::fromLatin1("monday"))
day = Monday;
- else if (elemText == QString::fromLatin1("tuesday"))
+ else if (elemText == TQString::fromLatin1("tuesday"))
day = Tuesday;
- else if (elemText == QString::fromLatin1("wednesday"))
+ else if (elemText == TQString::fromLatin1("wednesday"))
day = Wednesday;
- else if (elemText == QString::fromLatin1("thursday"))
+ else if (elemText == TQString::fromLatin1("thursday"))
day = Thursday;
- else if (elemText == QString::fromLatin1("friday"))
+ else if (elemText == TQString::fromLatin1("friday"))
day = Friday;
- else if (elemText == QString::fromLatin1("saturday"))
+ else if (elemText == TQString::fromLatin1("saturday"))
day = Saturday;
- else if (elemText == QString::fromLatin1("sunday"))
+ else if (elemText == TQString::fromLatin1("sunday"))
day = Sunday;
else
day = UndefinedDay;
@@ -526,30 +526,30 @@ Version Document::version() const
return d->version;
}
-QString Document::verbVersion() const
+TQString Document::verbVersion() const
{
switch (d->version) {
- case v0_90: return QString::fromLatin1("0.90");
- case v0_91: return QString::fromLatin1("0.91");
- case v0_92: return QString::fromLatin1("0.92");
- case v0_93: return QString::fromLatin1("0.93");
- case v0_94: return QString::fromLatin1("0.94");
- case v1_0: return QString::fromLatin1("1.0");
- case v2_0: return QString::fromLatin1("2.0");
- case vAtom_0_3: return QString::fromLatin1("0.3");
- case vAtom_0_2: return QString::fromLatin1("0.2");
- case vAtom_0_1: return QString::fromLatin1("0.1");
- case vAtom_1_0: return QString::fromLatin1("1.0");
+ case v0_90: return TQString::fromLatin1("0.90");
+ case v0_91: return TQString::fromLatin1("0.91");
+ case v0_92: return TQString::fromLatin1("0.92");
+ case v0_93: return TQString::fromLatin1("0.93");
+ case v0_94: return TQString::fromLatin1("0.94");
+ case v1_0: return TQString::fromLatin1("1.0");
+ case v2_0: return TQString::fromLatin1("2.0");
+ case vAtom_0_3: return TQString::fromLatin1("0.3");
+ case vAtom_0_2: return TQString::fromLatin1("0.2");
+ case vAtom_0_1: return TQString::fromLatin1("0.1");
+ case vAtom_1_0: return TQString::fromLatin1("1.0");
}
- return QString::null;
+ return TQString::null;
}
-QString Document::title() const
+TQString Document::title() const
{
return d->title;
}
-QString Document::description() const
+TQString Document::description() const
{
return d->description;
}
@@ -589,22 +589,22 @@ Language Document::language() const
return d->language;
}
-QString Document::copyright() const
+TQString Document::copyright() const
{
return d->copyright;
}
-const QDateTime &Document::pubDate() const
+const TQDateTime &Document::pubDate() const
{
return d->pubDate;
}
-const QDateTime &Document::lastBuildDate() const
+const TQDateTime &Document::lastBuildDate() const
{
return d->lastBuildDate;
}
-QString Document::rating() const
+TQString Document::rating() const
{
return d->rating;
}
@@ -614,12 +614,12 @@ const KURL &Document::docs() const
return d->docs;
}
-QString Document::managingEditor() const
+TQString Document::managingEditor() const
{
return d->managingEditor;
}
-QString Document::webMaster() const
+TQString Document::webMaster() const
{
return d->webMaster;
}
diff --git a/akregator/src/librss/document.h b/akregator/src/librss/document.h
index 161960720..450dcf3ba 100644
--- a/akregator/src/librss/document.h
+++ b/akregator/src/librss/document.h
@@ -45,7 +45,7 @@ namespace RSS
/**
* Constructs a Document from a piece of XML markup.
*/
- Document(const QDomDocument &doc);
+ Document(const TQDomDocument &doc);
/**
* Assignment operator.
@@ -75,28 +75,28 @@ namespace RSS
/**
* Convenience method. Differs from version() only in how the result
* is returned.
- * @return A QString representing the verbose version of the
+ * @return A TQString representing the verbose version of the
* document.
* @see version()
*/
- QString verbVersion() const;
+ TQString verbVersion() const;
/**
* RSS 0.90 and upwards
- * @return The title of the RSS document, or QString::null if no
+ * @return The title of the RSS document, or TQString::null if no
* title was available. This is often the name of the news source
* from which the RSS document was retrieved.
*/
- QString title() const;
+ TQString title() const;
/**
* RSS 0.90 and upwards
- * @return The description of the RSS document, or QString::null
+ * @return The description of the RSS document, or TQString::null
* if no description was available. This is usually a short slogan
* or description of the news source from which the RSS document
* was retrieved.
*/
- QString description() const;
+ TQString description() const;
/**
* RSS 0.90 and upwards
@@ -158,28 +158,28 @@ namespace RSS
/**
* RSS 0.91 and upwards
* @return A copyright of the information contained in the RSS
- * document, or QString::null if no copyright is available.
+ * document, or TQString::null if no copyright is available.
*/
- QString copyright() const;
+ TQString copyright() const;
/**
* RSS 0.91 and upwards
* @return The date when the RSS document was published.
*/
- const QDateTime &pubDate() const;
+ const TQDateTime &pubDate() const;
/**
* RSS 0.91 and upwards.
* @return The last time the channel was modified.
*/
- const QDateTime &lastBuildDate() const;
+ const TQDateTime &lastBuildDate() const;
/**
* RSS 0.91 and upwards
* @return A <a href="http://www.w3.org/PICS/#Specs">PICS</a>
* rating for this page.
*/
- QString rating() const;
+ TQString rating() const;
/**
* RSS 0.91 and upwards
@@ -197,16 +197,16 @@ namespace RSS
* bull@mancuso.com (Bull Mancuso).
* @see webMaster()
*/
- QString managingEditor() const;
+ TQString managingEditor() const;
/**
* RSS 0.91 and upwards
* @return The email address of the webmaster for the site, the
* person to contact if there are technical problems with the
- * channel, or QString::null if this information isn't available.
+ * channel, or TQString::null if this information isn't available.
* @see managingEditor()
*/
- QString webMaster() const;
+ TQString webMaster() const;
/**
* RSS 0.91 and upwards
diff --git a/akregator/src/librss/enclosure.cpp b/akregator/src/librss/enclosure.cpp
index 60898f1bf..602a25588 100644
--- a/akregator/src/librss/enclosure.cpp
+++ b/akregator/src/librss/enclosure.cpp
@@ -25,8 +25,8 @@
#include "enclosure.h"
#include "tools_p.h"
-#include <qdom.h>
-#include <qstring.h>
+#include <tqdom.h>
+#include <tqstring.h>
#include <kdebug.h>
@@ -39,9 +39,9 @@ class Enclosure::EnclosurePrivate : public Shared
public:
bool isNull;
- QString url;
+ TQString url;
int length;
- QString type;
+ TQString type;
bool operator==(const EnclosurePrivate &other) const
{
@@ -52,35 +52,35 @@ class Enclosure::EnclosurePrivate : public Shared
};
-Enclosure Enclosure::fromXML(const QDomElement& e)
+Enclosure Enclosure::fromXML(const TQDomElement& e)
{
- QString url, type;
+ TQString url, type;
int length = -1;
- if (e.hasAttribute(QString::fromLatin1("url")))
- url = e.attribute(QString::fromLatin1("url"));
+ if (e.hasAttribute(TQString::fromLatin1("url")))
+ url = e.attribute(TQString::fromLatin1("url"));
- if (e.hasAttribute(QString::fromLatin1("length")))
+ if (e.hasAttribute(TQString::fromLatin1("length")))
{
bool ok;
- int c = e.attribute(QString::fromLatin1("length")).toInt(&ok);
+ int c = e.attribute(TQString::fromLatin1("length")).toInt(&ok);
length = ok ? c : -1;
}
- if (e.hasAttribute(QString::fromLatin1("type")))
- type = e.attribute(QString::fromLatin1("type"));
+ if (e.hasAttribute(TQString::fromLatin1("type")))
+ type = e.attribute(TQString::fromLatin1("type"));
return Enclosure(url, length, type);
}
-QDomElement Enclosure::toXML(QDomDocument document) const
+TQDomElement Enclosure::toXML(TQDomDocument document) const
{
- QDomElement e = document.createElement(QString::fromLatin1("enclosure"));
+ TQDomElement e = document.createElement(TQString::fromLatin1("enclosure"));
if (!d->url.isNull())
- e.setAttribute(QString::fromLatin1("url"), d->url);
+ e.setAttribute(TQString::fromLatin1("url"), d->url);
if (d->length != -1)
- e.setAttribute(QString::fromLatin1("length"), QString::number(d->length));
+ e.setAttribute(TQString::fromLatin1("length"), TQString::number(d->length));
if (!d->type.isNull())
- e.setAttribute(QString::fromLatin1("type"), d->type);
+ e.setAttribute(TQString::fromLatin1("type"), d->type);
return e;
}
@@ -96,7 +96,7 @@ Enclosure::Enclosure(const Enclosure& other) : d(0)
*this = other;
}
-Enclosure::Enclosure(const QString& url, int length, const QString& type) : d(new EnclosurePrivate)
+Enclosure::Enclosure(const TQString& url, int length, const TQString& type) : d(new EnclosurePrivate)
{
d->isNull = false;
d->url = url;
@@ -135,7 +135,7 @@ bool Enclosure::isNull() const
return d->isNull;
}
-QString Enclosure::url() const
+TQString Enclosure::url() const
{
return d->url;
}
@@ -145,7 +145,7 @@ int Enclosure::length() const
return d->length;
}
-QString Enclosure::type() const
+TQString Enclosure::type() const
{
return d->type;
}
diff --git a/akregator/src/librss/enclosure.h b/akregator/src/librss/enclosure.h
index d3db5d12a..d97fbd4bf 100644
--- a/akregator/src/librss/enclosure.h
+++ b/akregator/src/librss/enclosure.h
@@ -37,12 +37,12 @@ namespace RSS
{
public:
- static Enclosure fromXML(const QDomElement& e);
- QDomElement toXML(QDomDocument document) const;
+ static Enclosure fromXML(const TQDomElement& e);
+ TQDomElement toXML(TQDomDocument document) const;
Enclosure();
Enclosure(const Enclosure& other);
- Enclosure(const QString& url, int length, const QString& type);
+ Enclosure(const TQString& url, int length, const TQString& type);
virtual ~Enclosure();
bool isNull() const;
@@ -51,13 +51,13 @@ namespace RSS
bool operator==(const Enclosure& other) const;
/** returns the URL of the enclosure */
- QString url() const;
+ TQString url() const;
/** returns the size of the enclosure in bytes */
int length() const;
/** returns the mime type of the enclosure */
- QString type() const;
+ TQString type() const;
private:
diff --git a/akregator/src/librss/feeddetector.cpp b/akregator/src/librss/feeddetector.cpp
index a45b18776..4407ff09f 100644
--- a/akregator/src/librss/feeddetector.cpp
+++ b/akregator/src/librss/feeddetector.cpp
@@ -22,10 +22,10 @@
without including the source code for Qt in the source distribution.
*/
-#include <qregexp.h>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qvaluelist.h>
+#include <tqregexp.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqvaluelist.h>
#include <kcharsets.h>
#include <kurl.h>
@@ -34,26 +34,26 @@
using namespace RSS;
-FeedDetectorEntryList FeedDetector::extractFromLinkTags(const QString& s)
+FeedDetectorEntryList FeedDetector::extractFromLinkTags(const TQString& s)
{
//reduce all sequences of spaces, newlines etc. to one space:
- QString str = s.simplifyWhiteSpace();
+ TQString str = s.simplifyWhiteSpace();
// extracts <link> tags
- QRegExp reLinkTag("<[\\s]?LINK[^>]*REL[\\s]?=[\\s]?\\\"[\\s]?(ALTERNATE|SERVICE\\.FEED)[\\s]?\\\"[^>]*>", false);
+ TQRegExp reLinkTag("<[\\s]?LINK[^>]*REL[\\s]?=[\\s]?\\\"[\\s]?(ALTERNATE|SERVICE\\.FEED)[\\s]?\\\"[^>]*>", false);
// extracts the URL (href="url")
- QRegExp reHref("HREF[\\s]?=[\\s]?\\\"([^\\\"]*)\\\"", false);
+ TQRegExp reHref("HREF[\\s]?=[\\s]?\\\"([^\\\"]*)\\\"", false);
// extracts type attribute
- QRegExp reType("TYPE[\\s]?=[\\s]?\\\"([^\\\"]*)\\\"", false);
+ TQRegExp reType("TYPE[\\s]?=[\\s]?\\\"([^\\\"]*)\\\"", false);
// extracts the title (title="title")
- QRegExp reTitle("TITLE[\\s]?=[\\s]?\\\"([^\\\"]*)\\\"", false);
+ TQRegExp reTitle("TITLE[\\s]?=[\\s]?\\\"([^\\\"]*)\\\"", false);
int pos = 0;
int matchpos = 0;
// get all <link> tags
- QStringList linkTags;
+ TQStringList linkTags;
//int strlength = str.length();
while ( matchpos != -1 )
{
@@ -67,9 +67,9 @@ FeedDetectorEntryList FeedDetector::extractFromLinkTags(const QString& s)
FeedDetectorEntryList list;
- for ( QStringList::Iterator it = linkTags.begin(); it != linkTags.end(); ++it )
+ for ( TQStringList::Iterator it = linkTags.begin(); it != linkTags.end(); ++it )
{
- QString type;
+ TQString type;
int pos = reType.search(*it, 0);
if (pos != -1)
type = reType.cap(1).lower();
@@ -79,14 +79,14 @@ FeedDetectorEntryList FeedDetector::extractFromLinkTags(const QString& s)
&& type != "application/atom+xml" && type != "text/xml" )
continue;
- QString title;
+ TQString title;
pos = reTitle.search(*it, 0);
if (pos != -1)
title = reTitle.cap(1);
title = KCharsets::resolveEntities(title);
- QString url;
+ TQString url;
pos = reHref.search(*it, 0);
if (pos != -1)
url = reHref.cap(1);
@@ -105,33 +105,33 @@ FeedDetectorEntryList FeedDetector::extractFromLinkTags(const QString& s)
return list;
}
-QStringList FeedDetector::extractBruteForce(const QString& s)
+TQStringList FeedDetector::extractBruteForce(const TQString& s)
{
- QString str = s.simplifyWhiteSpace();
+ TQString str = s.simplifyWhiteSpace();
- QRegExp reAhrefTag("<[\\s]?A[^>]?HREF=[\\s]?\\\"[^\\\"]*\\\"[^>]*>", false);
+ TQRegExp reAhrefTag("<[\\s]?A[^>]?HREF=[\\s]?\\\"[^\\\"]*\\\"[^>]*>", false);
// extracts the URL (href="url")
- QRegExp reHref("HREF[\\s]?=[\\s]?\\\"([^\\\"]*)\\\"", false);
+ TQRegExp reHref("HREF[\\s]?=[\\s]?\\\"([^\\\"]*)\\\"", false);
- QRegExp rssrdfxml(".*(RSS|RDF|XML)", false);
+ TQRegExp rssrdfxml(".*(RSS|RDF|XML)", false);
int pos = 0;
int matchpos = 0;
// get all <a href> tags and capture url
- QStringList list;
+ TQStringList list;
//int strlength = str.length();
while ( matchpos != -1 )
{
matchpos = reAhrefTag.search(str, pos);
if ( matchpos != -1 )
{
- QString ahref = str.mid(matchpos, reAhrefTag.matchedLength());
+ TQString ahref = str.mid(matchpos, reAhrefTag.matchedLength());
int hrefpos = reHref.search(ahref, 0);
if ( hrefpos != -1 )
{
- QString url = reHref.cap(1);
+ TQString url = reHref.cap(1);
url = KCharsets::resolveEntities(url);
@@ -146,9 +146,9 @@ QStringList FeedDetector::extractBruteForce(const QString& s)
return list;
}
-QString FeedDetector::fixRelativeURL(const QString &s, const KURL &baseurl)
+TQString FeedDetector::fixRelativeURL(const TQString &s, const KURL &baseurl)
{
- QString s2=s;
+ TQString s2=s;
KURL u;
if (KURL::isRelativeURL(s2))
{
@@ -160,8 +160,8 @@ QString FeedDetector::fixRelativeURL(const QString &s, const KURL &baseurl)
else if (s2.startsWith("/"))
{
KURL b2(baseurl);
- b2.setPath(QString()); // delete path and query, so that only protocol://host remains
- b2.setQuery(QString());
+ b2.setPath(TQString()); // delete path and query, so that only protocol://host remains
+ b2.setQuery(TQString());
u = KURL(b2, s2.remove(0,1)); // remove leading "/"
}
else
diff --git a/akregator/src/librss/feeddetector.h b/akregator/src/librss/feeddetector.h
index c27acf76e..2f502acd4 100644
--- a/akregator/src/librss/feeddetector.h
+++ b/akregator/src/librss/feeddetector.h
@@ -25,8 +25,8 @@
#ifndef LIBRSS_FEEDDETECTOR_H
#define LIBRSS_FEEDDETECTOR_H
-#include <qstring.h>
-#include <qvaluelist.h>
+#include <tqstring.h>
+#include <tqvaluelist.h>
class QStringList;
class KURL;
@@ -38,18 +38,18 @@ namespace RSS
{
public:
FeedDetectorEntry() {}
- FeedDetectorEntry(const QString& url, const QString& title)
+ FeedDetectorEntry(const TQString& url, const TQString& title)
: m_url(url), m_title(title) {}
- const QString& url() const { return m_url; }
- const QString& title() const { return m_title; }
+ const TQString& url() const { return m_url; }
+ const TQString& title() const { return m_title; }
private:
- const QString m_url;
- const QString m_title;
+ const TQString m_url;
+ const TQString m_title;
};
- typedef QValueList<FeedDetectorEntry> FeedDetectorEntryList;
+ typedef TQValueList<FeedDetectorEntry> FeedDetectorEntryList;
/** a class providing functions to detect linked feeds in HTML sources */
class FeedDetector
@@ -61,16 +61,16 @@ namespace RSS
@param s the html source to scan (the actual source, no URI)
@return a list containing the detected feeds
*/
- static FeedDetectorEntryList extractFromLinkTags(const QString& s);
+ static FeedDetectorEntryList extractFromLinkTags(const TQString& s);
/** \brief searches an HTML page for slightly feed-like looking links and catches everything not running away quickly enough.
Extracts links from @c <a @c href> tags which end with @c xml, @c rss or @c rdf
@param s the html source to scan (the actual source, no URI)
@return a list containing the detected feeds
*/
- static QStringList extractBruteForce(const QString& s);
+ static TQStringList extractBruteForce(const TQString& s);
- static QString fixRelativeURL(const QString &s, const KURL &baseurl);
+ static TQString fixRelativeURL(const TQString &s, const KURL &baseurl);
private:
FeedDetector() {}
diff --git a/akregator/src/librss/global.h b/akregator/src/librss/global.h
index cec9609c7..68cfb83a3 100644
--- a/akregator/src/librss/global.h
+++ b/akregator/src/librss/global.h
@@ -136,12 +136,12 @@ namespace RSS
/**
* This type is used by Document::skipDays().
*/
- typedef QValueList<Day> DayList;
+ typedef TQValueList<Day> DayList;
/**
* This type is used by Document::skipHours().
*/
- typedef QValueList<unsigned short> HourList;
+ typedef TQValueList<unsigned short> HourList;
}
#endif // LIBRSS_GLOBAL_H
diff --git a/akregator/src/librss/image.cpp b/akregator/src/librss/image.cpp
index 33e1544ae..265c37117 100644
--- a/akregator/src/librss/image.cpp
+++ b/akregator/src/librss/image.cpp
@@ -14,9 +14,9 @@
#include <kio/job.h>
#include <kurl.h>
-#include <qbuffer.h>
-#include <qdom.h>
-#include <qpixmap.h>
+#include <tqbuffer.h>
+#include <tqdom.h>
+#include <tqpixmap.h>
using namespace RSS;
@@ -25,40 +25,40 @@ struct Image::Private : public Shared
Private() : height(31), width(88), pixmapBuffer(NULL), job(NULL)
{ }
- QString title;
+ TQString title;
KURL url;
KURL link;
- QString description;
+ TQString description;
unsigned int height;
unsigned int width;
- QBuffer *pixmapBuffer;
+ TQBuffer *pixmapBuffer;
KIO::Job *job;
};
-Image::Image() : QObject(), d(new Private)
+Image::Image() : TQObject(), d(new Private)
{
}
-Image::Image(const Image &other) : QObject(), d(0)
+Image::Image(const Image &other) : TQObject(), d(0)
{
*this = other;
}
-Image::Image(const QDomNode &node) : QObject(), d(new Private)
+Image::Image(const TQDomNode &node) : TQObject(), d(new Private)
{
- QString elemText;
+ TQString elemText;
- if (!(elemText = extractNode(node, QString::fromLatin1("title"))).isNull())
+ if (!(elemText = extractNode(node, TQString::fromLatin1("title"))).isNull())
d->title = elemText;
- if (!(elemText = extractNode(node, QString::fromLatin1("url"))).isNull())
+ if (!(elemText = extractNode(node, TQString::fromLatin1("url"))).isNull())
d->url = elemText;
- if (!(elemText = extractNode(node, QString::fromLatin1("link"))).isNull())
+ if (!(elemText = extractNode(node, TQString::fromLatin1("link"))).isNull())
d->link = elemText;
- if (!(elemText = extractNode(node, QString::fromLatin1("description"))).isNull())
+ if (!(elemText = extractNode(node, TQString::fromLatin1("description"))).isNull())
d->description = elemText;
- if (!(elemText = extractNode(node, QString::fromLatin1("height"))).isNull())
+ if (!(elemText = extractNode(node, TQString::fromLatin1("height"))).isNull())
d->height = elemText.toUInt();
- if (!(elemText = extractNode(node, QString::fromLatin1("width"))).isNull())
+ if (!(elemText = extractNode(node, TQString::fromLatin1("width"))).isNull())
d->width = elemText.toUInt();
}
@@ -72,7 +72,7 @@ Image::~Image()
}
}
-QString Image::title() const
+TQString Image::title() const
{
return d->title;
}
@@ -87,7 +87,7 @@ const KURL &Image::link() const
return d->link;
}
-QString Image::description() const
+TQString Image::description() const
{
return d->description;
}
@@ -112,21 +112,21 @@ void Image::getPixmap()
d->pixmapBuffer->open(IO_WriteOnly);
d->job = KIO::get(d->url, false, false);
- connect(d->job, SIGNAL(data(KIO::Job *, const QByteArray &)),
- this, SLOT(slotData(KIO::Job *, const QByteArray &)));
- 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(result(KIO::Job *)), this, TQT_SLOT(slotResult(KIO::Job *)));
}
-void Image::slotData(KIO::Job *, const QByteArray &data)
+void Image::slotData(KIO::Job *, const TQByteArray &data)
{
d->pixmapBuffer->writeBlock(data.data(), data.size());
}
void Image::slotResult(KIO::Job *job)
{
- QPixmap pixmap;
+ TQPixmap pixmap;
if (!job->error())
- pixmap = QPixmap(d->pixmapBuffer->buffer());
+ pixmap = TQPixmap(d->pixmapBuffer->buffer());
emit gotPixmap(pixmap);
delete d->pixmapBuffer;
diff --git a/akregator/src/librss/image.h b/akregator/src/librss/image.h
index 74197edb6..f79026683 100644
--- a/akregator/src/librss/image.h
+++ b/akregator/src/librss/image.h
@@ -13,7 +13,7 @@
#include "global.h"
-#include <qobject.h>
+#include <tqobject.h>
class QDomNode;
@@ -48,10 +48,10 @@ namespace RSS
/**
* Constructs an Image from a piece of RSS markup.
- * @param node A QDomNode which references the DOM leaf to be used
+ * @param node A TQDomNode which references the DOM leaf to be used
* for constructing the Image.
*/
- Image(const QDomNode &node);
+ Image(const TQDomNode &node);
/**
* Assignment operator.
@@ -83,10 +83,10 @@ namespace RSS
/**
* RSS 0.90 and upwards
- * @return The 'caption' of this image, or QString::null if no
+ * @return The 'caption' of this image, or TQString::null if no
* caption is available.
*/
- QString title() const;
+ TQString title() const;
/**
* RSS 0.90 and upwards
@@ -112,11 +112,11 @@ namespace RSS
/**
* RSS 0.91 and upwards
* @return A description of what this picture shows, or
- * QString::null if no description is available. Useful for
+ * TQString::null if no description is available. Useful for
* people who deactivated images but want or need to know what is
* shown.
*/
- QString description() const;
+ TQString description() const;
/**
* RSS 0.91 and upwards
@@ -125,7 +125,7 @@ namespace RSS
* this value to be between 1 and 400.
* '0' if this information isn't available. This is merely provided
* for completeness, you should not rely on this value but rather
- * check what height the QPixmap as returned by gotPixmap()
+ * check what height the TQPixmap as returned by gotPixmap()
* reports.
*/
unsigned int height() const;
@@ -136,7 +136,7 @@ namespace RSS
* default value is 88 pixels. The RSS 0.91 Specification requires
* this value to be between 1 and 144.
* This is merely provided for completeness, you should not rely
- * on this value but rather check what width the QPixmap as
+ * on this value but rather check what width the TQPixmap as
* returned by gotPixmap() reports.
*/
unsigned int width() const;
@@ -157,10 +157,10 @@ namespace RSS
* @param pixmap The pixmap as constructed from the data referenced
* by the URL returned by link().
*/
- void gotPixmap(const QPixmap &pixmap);
+ void gotPixmap(const TQPixmap &pixmap);
private slots:
- void slotData(KIO::Job *job, const QByteArray &data);
+ void slotData(KIO::Job *job, const TQByteArray &data);
void slotResult(KIO::Job *job);
private:
diff --git a/akregator/src/librss/loader.cpp b/akregator/src/librss/loader.cpp
index d63d17676..df7f51a66 100644
--- a/akregator/src/librss/loader.cpp
+++ b/akregator/src/librss/loader.cpp
@@ -18,12 +18,12 @@
#include <kurl.h>
#include <kdebug.h>
-#include <qdom.h>
-#include <qbuffer.h>
-#include <qregexp.h>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qtimer.h>
+#include <tqdom.h>
+#include <tqbuffer.h>
+#include <tqregexp.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqtimer.h>
using namespace RSS;
@@ -50,15 +50,15 @@ class FileRetriever::Private
delete buffer;
}
- QBuffer *buffer;
+ TQBuffer *buffer;
int lastError;
KIO::Job *job;
- static KStaticDeleter<QString> userAgentsd;
- static QString* userAgent;
+ static KStaticDeleter<TQString> userAgentsd;
+ static TQString* userAgent;
};
-KStaticDeleter<QString> FileRetriever::Private::userAgentsd;
-QString* FileRetriever::Private::userAgent = 0L;
+KStaticDeleter<TQString> FileRetriever::Private::userAgentsd;
+TQString* FileRetriever::Private::userAgent = 0L;
FileRetriever::FileRetriever()
: d(new Private)
{
@@ -71,17 +71,17 @@ FileRetriever::~FileRetriever()
bool FileRetriever::m_useCache = true;
-QString FileRetriever::userAgent()
+TQString FileRetriever::userAgent()
{
if (Private::userAgent == 0L)
- FileRetriever::Private::userAgentsd.setObject(Private::userAgent, new QString);
+ FileRetriever::Private::userAgentsd.setObject(Private::userAgent, new TQString);
return *Private::userAgent;
}
-void FileRetriever::setUserAgent(const QString &ua)
+void FileRetriever::setUserAgent(const TQString &ua)
{
if (Private::userAgent == 0L)
- FileRetriever::Private::userAgentsd.setObject(Private::userAgent, new QString);
+ FileRetriever::Private::userAgentsd.setObject(Private::userAgent, new TQString);
(*Private::userAgent) = ua;
}
@@ -106,18 +106,18 @@ void FileRetriever::retrieveData(const KURL &url)
d->job = KIO::get(u, false, false);
d->job->addMetaData("cache", m_useCache ? "refresh" : "reload");
- QString ua = userAgent();
+ TQString ua = userAgent();
if (!ua.isEmpty())
d->job->addMetaData("UserAgent", ua);
- QTimer::singleShot(1000*90, this, SLOT(slotTimeout()));
+ TQTimer::singleShot(1000*90, this, TQT_SLOT(slotTimeout()));
- connect(d->job, SIGNAL(data(KIO::Job *, const QByteArray &)),
- SLOT(slotData(KIO::Job *, const QByteArray &)));
- connect(d->job, SIGNAL(result(KIO::Job *)), SLOT(slotResult(KIO::Job *)));
- connect(d->job, SIGNAL(permanentRedirection(KIO::Job *, const KURL &, const KURL &)),
- SLOT(slotPermanentRedirection(KIO::Job *, const KURL &, const KURL &)));
+ connect(d->job, TQT_SIGNAL(data(KIO::Job *, const TQByteArray &)),
+ TQT_SLOT(slotData(KIO::Job *, const TQByteArray &)));
+ connect(d->job, TQT_SIGNAL(result(KIO::Job *)), TQT_SLOT(slotResult(KIO::Job *)));
+ connect(d->job, TQT_SIGNAL(permanentRedirection(KIO::Job *, const KURL &, const KURL &)),
+ TQT_SLOT(slotPermanentRedirection(KIO::Job *, const KURL &, const KURL &)));
}
void FileRetriever::slotTimeout()
@@ -129,7 +129,7 @@ void FileRetriever::slotTimeout()
d->lastError = KIO::ERR_SERVER_TIMEOUT;
- emit dataRetrieved(QByteArray(), false);
+ emit dataRetrieved(TQByteArray(), false);
}
int FileRetriever::errorCode() const
@@ -137,14 +137,14 @@ int FileRetriever::errorCode() const
return d->lastError;
}
-void FileRetriever::slotData(KIO::Job *, const QByteArray &data)
+void FileRetriever::slotData(KIO::Job *, const TQByteArray &data)
{
d->buffer->writeBlock(data.data(), data.size());
}
void FileRetriever::slotResult(KIO::Job *job)
{
- QByteArray data = d->buffer->buffer();
+ TQByteArray data = d->buffer->buffer();
data.detach();
delete d->buffer;
@@ -183,7 +183,7 @@ struct OutputRetriever::Private
}
KShellProcess *process;
- QBuffer *buffer;
+ TQBuffer *buffer;
int lastError;
};
@@ -207,10 +207,10 @@ void OutputRetriever::retrieveData(const KURL &url)
d->buffer->open(IO_WriteOnly);
d->process = new KShellProcess();
- connect(d->process, SIGNAL(processExited(KProcess *)),
- SLOT(slotExited(KProcess *)));
- connect(d->process, SIGNAL(receivedStdout(KProcess *, char *, int)),
- SLOT(slotOutput(KProcess *, char *, int)));
+ connect(d->process, TQT_SIGNAL(processExited(KProcess *)),
+ TQT_SLOT(slotExited(KProcess *)));
+ connect(d->process, TQT_SIGNAL(receivedStdout(KProcess *, char *, int)),
+ TQT_SLOT(slotOutput(KProcess *, char *, int)));
*d->process << url.path();
d->process->start(KProcess::NotifyOnExit, KProcess::Stdout);
}
@@ -230,7 +230,7 @@ void OutputRetriever::slotExited(KProcess *p)
if (!p->normalExit())
d->lastError = p->exitStatus();
- QByteArray data = d->buffer->buffer();
+ TQByteArray data = d->buffer->buffer();
data.detach();
delete d->buffer;
@@ -265,10 +265,10 @@ Loader *Loader::create()
return new Loader;
}
-Loader *Loader::create(QObject *object, const char *slot)
+Loader *Loader::create(TQObject *object, const char *slot)
{
Loader *loader = create();
- connect(loader, SIGNAL(loadingComplete(Loader *, Document, Status)),
+ connect(loader, TQT_SIGNAL(loadingComplete(Loader *, Document, Status)),
object, slot);
return loader;
}
@@ -290,8 +290,8 @@ void Loader::loadFrom(const KURL &url, DataRetriever *retriever)
d->url=url;
d->retriever = retriever;
- connect(d->retriever, SIGNAL(dataRetrieved(const QByteArray &, bool)),
- this, SLOT(slotRetrieverDone(const QByteArray &, bool)));
+ connect(d->retriever, TQT_SIGNAL(dataRetrieved(const TQByteArray &, bool)),
+ this, TQT_SLOT(slotRetrieverDone(const TQByteArray &, bool)));
d->retriever->retrieveData(url);
}
@@ -309,7 +309,7 @@ void Loader::abort()
delete d->retriever;
d->retriever=NULL;
}
- emit loadingComplete(this, QDomDocument(), Aborted);
+ emit loadingComplete(this, TQDomDocument(), Aborted);
delete this;
}
@@ -318,7 +318,7 @@ const KURL &Loader::discoveredFeedURL() const
return d->discoveredFeedURL;
}
-void Loader::slotRetrieverDone(const QByteArray &data, bool success)
+void Loader::slotRetrieverDone(const TQByteArray &data, bool success)
{
d->lastError = d->retriever->errorCode();
@@ -329,7 +329,7 @@ void Loader::slotRetrieverDone(const QByteArray &data, bool success)
Status status = Success;
if (success) {
- QDomDocument doc;
+ TQDomDocument doc;
/* Some servers insert whitespace before the <?xml...?> declaration.
* QDom doesn't tolerate that (and it's right, that's invalid XML),
@@ -339,16 +339,16 @@ void Loader::slotRetrieverDone(const QByteArray &data, bool success)
const char *charData = data.data();
int len = data.count();
- while (len && QChar(*charData).isSpace()) {
+ while (len && TQChar(*charData).isSpace()) {
--len;
++charData;
}
- if ( len > 3 && QChar(*charData) == QChar(0357) ) { // 0357 0273 0277
+ if ( len > 3 && TQChar(*charData) == TQChar(0357) ) { // 0357 0273 0277
len -= 3;
charData += 3;
}
- QByteArray tmpData;
+ TQByteArray tmpData;
tmpData.setRawData(charData, len);
if (doc.setContent(tmpData))
@@ -375,11 +375,11 @@ void Loader::slotRetrieverDone(const QByteArray &data, bool success)
delete this;
}
-void Loader::discoverFeeds(const QByteArray &data)
+void Loader::discoverFeeds(const TQByteArray &data)
{
- QString str = QString(data).simplifyWhiteSpace();
+ TQString str = TQString(data).simplifyWhiteSpace();
- QStringList feeds;
+ TQStringList feeds;
FeedDetectorEntryList list = FeedDetector::extractFromLinkTags(str);
@@ -391,12 +391,12 @@ void Loader::discoverFeeds(const QByteArray &data)
if (list.isEmpty())
feeds = FeedDetector::extractBruteForce(str);
- QString feed = feeds.first();
- QString host = d->url.host();
+ TQString feed = feeds.first();
+ TQString host = d->url.host();
KURL testURL;
// loop through, prefer feeds on same host
- QStringList::Iterator end( feeds.end() );
- for ( QStringList::Iterator it = feeds.begin(); it != end; ++it)
+ TQStringList::Iterator end( feeds.end() );
+ for ( TQStringList::Iterator it = feeds.begin(); it != end; ++it)
{
testURL=*it;
if (testURL.host() == host)
@@ -406,7 +406,7 @@ void Loader::discoverFeeds(const QByteArray &data)
}
}
- d->discoveredFeedURL = feed.isNull() ? QString() : FeedDetector::fixRelativeURL(feed, d->url);
+ d->discoveredFeedURL = feed.isNull() ? TQString() : FeedDetector::fixRelativeURL(feed, d->url);
}
#include "loader.moc"
diff --git a/akregator/src/librss/loader.h b/akregator/src/librss/loader.h
index d60bad744..e958239f2 100644
--- a/akregator/src/librss/loader.h
+++ b/akregator/src/librss/loader.h
@@ -15,7 +15,7 @@
class KURL;
-#include <qobject.h>
+#include <tqobject.h>
namespace KIO
{
@@ -75,7 +75,7 @@ namespace RSS
* wrong and that the data parameter might contain no or invalid
* data.
*/
- void dataRetrieved(const QByteArray &data, bool success);
+ void dataRetrieved(const TQByteArray &data, bool success);
private:
DataRetriever(const DataRetriever &other);
@@ -120,8 +120,8 @@ namespace RSS
virtual void abort();
static void setUseCache(bool enabled);
- static void setUserAgent(const QString &ua);
- static QString userAgent();
+ static void setUserAgent(const TQString &ua);
+ static TQString userAgent();
signals:
/**
@@ -137,7 +137,7 @@ namespace RSS
void slotTimeout();
private slots:
- void slotData(KIO::Job *job, const QByteArray &data);
+ void slotData(KIO::Job *job, const TQByteArray &data);
void slotResult(KIO::Job *job);
void slotPermanentRedirection(KIO::Job *job, const KURL &fromUrl,
const KURL &toUrl);
@@ -208,8 +208,8 @@ namespace RSS
*
* \code
* Loader *loader = Loader::create();
- * connect(loader, SIGNAL(loadingComplete(Loader *, Document, Status)),
- * this, SLOT(slotLoadingComplete(Loader *, Document, Status)));
+ * connect(loader, TQT_SIGNAL(loadingComplete(Loader *, Document, Status)),
+ * this, TQT_SLOT(slotLoadingComplete(Loader *, Document, Status)));
* loader->loadFrom("http://www.blah.org/foobar.rdf", new FileRetriever);
* \endcode
*
@@ -241,7 +241,7 @@ namespace RSS
* if (status != RSS::Success)
* return;
*
- * QString title = doc.title();
+ * TQString title = doc.title();
* // do whatever you want with the information.
* }
* \endcode
@@ -270,10 +270,10 @@ namespace RSS
* Convenience method. Does the same as the above method except that
* it also does the job of connecting the loadingComplete() signal
* to the given slot for you.
- * @param object A QObject which features the specified slot
+ * @param object A TQObject which features the specified slot
* @param slot Which slot to connect to.
*/
- static Loader *create(QObject *object, const char *slot);
+ static Loader *create(TQObject *object, const char *slot);
/**
* Loads the RSS file referenced by the given URL using the
@@ -323,14 +323,14 @@ namespace RSS
void loadingComplete(Loader *loader, Document doc, Status status);
private slots:
- void slotRetrieverDone(const QByteArray &data, bool success);
+ void slotRetrieverDone(const TQByteArray &data, bool success);
private:
Loader();
Loader(const Loader &other);
Loader &operator=(const Loader &other);
~Loader();
- void discoverFeeds(const QByteArray &data);
+ void discoverFeeds(const TQByteArray &data);
struct Private;
Private *d;
diff --git a/akregator/src/librss/testlibrss.cpp b/akregator/src/librss/testlibrss.cpp
index 5d98bba46..7d88c3d1f 100644
--- a/akregator/src/librss/testlibrss.cpp
+++ b/akregator/src/librss/testlibrss.cpp
@@ -16,11 +16,11 @@ static const KCmdLineOptions options[] =
};
-void Tester::test( const QString &url )
+void Tester::test( const TQString &url )
{
Loader *loader = Loader::create();
- connect( loader, SIGNAL( loadingComplete( Loader *, Document, Status ) ),
- this, SLOT( slotLoadingComplete( Loader *, Document, Status ) ) );
+ connect( loader, TQT_SIGNAL( loadingComplete( Loader *, Document, Status ) ),
+ this, TQT_SLOT( slotLoadingComplete( Loader *, Document, Status ) ) );
loader->loadFrom( url, new FileRetriever );
}
diff --git a/akregator/src/librss/testlibrss.h b/akregator/src/librss/testlibrss.h
index c65fa3bd2..b84a0ab5c 100644
--- a/akregator/src/librss/testlibrss.h
+++ b/akregator/src/librss/testlibrss.h
@@ -1,7 +1,7 @@
#ifndef TESTLIBRSS_H
#define TESTLIBRSS_H
-#include <qobject.h>
+#include <tqobject.h>
#include "loader.h"
#include "document.h"
@@ -16,7 +16,7 @@ class Tester : public QObject
{
Q_OBJECT
public:
- void test( const QString &url );
+ void test( const TQString &url );
private slots:
void slotLoadingComplete( Loader *loader, Document doc, Status status );
diff --git a/akregator/src/librss/textinput.cpp b/akregator/src/librss/textinput.cpp
index 432b773aa..04799fcaa 100644
--- a/akregator/src/librss/textinput.cpp
+++ b/akregator/src/librss/textinput.cpp
@@ -13,15 +13,15 @@
#include <kurl.h>
-#include <qdom.h>
+#include <tqdom.h>
using namespace RSS;
struct TextInput::Private : public Shared
{
- QString title;
- QString description;
- QString name;
+ TQString title;
+ TQString description;
+ TQString name;
KURL link;
};
@@ -34,17 +34,17 @@ TextInput::TextInput(const TextInput &other) : d(0)
*this = other;
}
-TextInput::TextInput(const QDomNode &node) : d(new Private)
+TextInput::TextInput(const TQDomNode &node) : d(new Private)
{
- QString elemText;
+ TQString elemText;
- if (!(elemText = extractNode(node, QString::fromLatin1("title"))).isNull())
+ if (!(elemText = extractNode(node, TQString::fromLatin1("title"))).isNull())
d->title = elemText;
- if (!(elemText = extractNode(node, QString::fromLatin1("description"))).isNull())
+ if (!(elemText = extractNode(node, TQString::fromLatin1("description"))).isNull())
d->description = elemText;
- if (!(elemText = extractNode(node, QString::fromLatin1("name"))))
+ if (!(elemText = extractNode(node, TQString::fromLatin1("name"))))
d->name = elemText;
- if (!(elemText = extractNode(node, QString::fromLatin1("link"))).isNull())
+ if (!(elemText = extractNode(node, TQString::fromLatin1("link"))).isNull())
d->link = elemText;
}
@@ -54,17 +54,17 @@ TextInput::~TextInput()
delete d;
}
-QString TextInput::title() const
+TQString TextInput::title() const
{
return d->title;
}
-QString TextInput::description() const
+TQString TextInput::description() const
{
return d->description;
}
-QString TextInput::name() const
+TQString TextInput::name() const
{
return d->name;
}
diff --git a/akregator/src/librss/textinput.h b/akregator/src/librss/textinput.h
index dd13c424b..fa16108ce 100644
--- a/akregator/src/librss/textinput.h
+++ b/akregator/src/librss/textinput.h
@@ -43,10 +43,10 @@ namespace RSS
/**
* Constructs a TextInput from a piece of RSS markup.
- * @param node A QDomNode which references the DOM leaf to be used
+ * @param node A TQDomNode which references the DOM leaf to be used
* for constructing the TextInput.
*/
- TextInput(const QDomNode &node);
+ TextInput(const TQDomNode &node);
/**
* Assignment operator.
@@ -79,25 +79,25 @@ namespace RSS
/**
* RSS 0.90 and upwards
* @return The title (often a label to be used for the input field)
- * of the text input, or QString::null if no title is available.
+ * of the text input, or TQString::null if no title is available.
*/
- QString title() const;
+ TQString title() const;
/**
* RSS 0.90 and upwards
* @return The description (usually used as a tooltip which appears
* if the mouse hovers above the input field for a short time) of
- * the text input, or QString::null if no description is
+ * the text input, or TQString::null if no description is
* available.
*/
- QString description() const;
+ TQString description() const;
/**
* RSS 0.90 and upwards
* @return The name of the text input (what's this for?) of the
- * text input, or QString::null, if no name is available.
+ * text input, or TQString::null, if no name is available.
*/
- QString name() const;
+ TQString name() const;
/**
* RSS 0.90 and upwards
diff --git a/akregator/src/librss/tools_p.cpp b/akregator/src/librss/tools_p.cpp
index dec831814..41996fd8f 100644
--- a/akregator/src/librss/tools_p.cpp
+++ b/akregator/src/librss/tools_p.cpp
@@ -11,13 +11,13 @@
#include "tools_p.h"
#include <krfcdate.h>
-#include <qdom.h>
+#include <tqdom.h>
#include <kcharsets.h>
-#include <qregexp.h>
+#include <tqregexp.h>
namespace RSS {
-time_t parseISO8601Date(const QString &s)
+time_t parseISO8601Date(const TQString &s)
{
// do some sanity check: 26-12-2004T00:00+00:00 is parsed to epoch+1 in the KRFCDate, which is wrong. So let's check if the date begins with YYYY -fo
if (s.stripWhiteSpace().left(4).toInt() < 1000)
@@ -30,19 +30,19 @@ time_t parseISO8601Date(const QString &s)
return KRFCDate::parseDateISO8601(s + "T12:00:00");
}
-QString childNodesAsXML(const QDomNode& parent)
+TQString childNodesAsXML(const TQDomNode& parent)
{
- QDomNodeList list = parent.childNodes();
- QString str;
- QTextStream ts( &str, IO_WriteOnly );
+ TQDomNodeList list = parent.childNodes();
+ TQString str;
+ TQTextStream ts( &str, IO_WriteOnly );
for (uint i = 0; i < list.count(); ++i)
ts << list.item(i);
return str.stripWhiteSpace();
}
-static QString plainTextToHtml(const QString& plainText)
+static TQString plainTextToHtml(const TQString& plainText)
{
- QString str(plainText);
+ TQString str(plainText);
str.replace("&", "&amp;");
str.replace("\"", "&quot;");
str.replace("<", "&lt;");
@@ -53,46 +53,46 @@ static QString plainTextToHtml(const QString& plainText)
enum ContentFormat { Text, HTML, XML, Binary };
-static ContentFormat mapTypeToFormat(const QString& modep, const QString& typep, const QString& src)
+static ContentFormat mapTypeToFormat(const TQString& modep, const TQString& typep, const TQString& src)
{
- QString mode = modep.isNull() ? "escaped" : modep;
- QString type = typep;
+ TQString mode = modep.isNull() ? "escaped" : modep;
+ TQString type = typep;
//"If neither the type attribute nor the src attribute is provided,
//Atom Processors MUST behave as though the type attribute were
//present with a value of "text""
if (type.isNull() && src.isEmpty())
- type = QString::fromUtf8("text");
+ type = TQString::fromUtf8("text");
- if (type == QString::fromUtf8("html")
- || type == QString::fromUtf8("text/html"))
+ if (type == TQString::fromUtf8("html")
+ || type == TQString::fromUtf8("text/html"))
return HTML;
- if (type == QString::fromUtf8("text")
- || (type.startsWith(QString::fromUtf8("text/"), false)
- && !type.startsWith(QString::fromUtf8("text/xml"), false))
+ if (type == TQString::fromUtf8("text")
+ || (type.startsWith(TQString::fromUtf8("text/"), false)
+ && !type.startsWith(TQString::fromUtf8("text/xml"), false))
)
return Text;
- QStringList xmltypes;
- xmltypes.append(QString::fromUtf8("xhtml"));
+ TQStringList xmltypes;
+ xmltypes.append(TQString::fromUtf8("xhtml"));
// XML media types as defined in RFC3023:
- xmltypes.append(QString::fromUtf8("text/xml"));
- xmltypes.append(QString::fromUtf8("application/xml"));
- xmltypes.append(QString::fromUtf8("text/xml-external-parsed-entity"));
- xmltypes.append(QString::fromUtf8("application/xml-external-parsed-entity"));
- xmltypes.append(QString::fromUtf8("application/xml-dtd"));
+ xmltypes.append(TQString::fromUtf8("text/xml"));
+ xmltypes.append(TQString::fromUtf8("application/xml"));
+ xmltypes.append(TQString::fromUtf8("text/xml-external-parsed-entity"));
+ xmltypes.append(TQString::fromUtf8("application/xml-external-parsed-entity"));
+ xmltypes.append(TQString::fromUtf8("application/xml-dtd"));
if (xmltypes.contains(type)
- || type.endsWith(QString::fromUtf8("+xml"), false)
- || type.endsWith(QString::fromUtf8("/xml"), false))
+ || type.endsWith(TQString::fromUtf8("+xml"), false)
+ || type.endsWith(TQString::fromUtf8("/xml"), false))
return XML;
return Binary;
}
-static QString extractAtomContent(const QDomElement& e)
+static TQString extractAtomContent(const TQDomElement& e)
{
ContentFormat format = mapTypeToFormat(e.attribute("mode"),
e.attribute("type"),
@@ -111,20 +111,20 @@ static QString extractAtomContent(const QDomElement& e)
return childNodesAsXML(e).simplifyWhiteSpace();
case Binary:
default:
- return QString();
+ return TQString();
}
- return QString();
+ return TQString();
}
-QString extractNode(const QDomNode &parent, const QString &elemName, bool isInlined)
+TQString extractNode(const TQDomNode &parent, const TQString &elemName, bool isInlined)
{
- QDomNode node = parent.namedItem(elemName);
+ TQDomNode node = parent.namedItem(elemName);
if (node.isNull())
- return QString::null;
+ return TQString::null;
- QDomElement e = node.toElement();
- QString result = e.text().stripWhiteSpace(); // let's assume plain text
+ TQDomElement e = node.toElement();
+ TQString result = e.text().stripWhiteSpace(); // let's assume plain text
if (elemName == "content") // we have Atom here
{
@@ -135,47 +135,47 @@ QString extractNode(const QDomNode &parent, const QString &elemName, bool isInli
bool hasPre = result.contains("<pre>", false) || result.contains("<pre ", false);
bool hasHtml = hasPre || result.contains("<"); // FIXME: test if we have html, should be more clever -> regexp
if(!isInlined && !hasHtml) // perform nl2br if not a inline elt and it has no html elts
- result = result = result.replace(QChar('\n'), "<br />");
+ result = result = result.replace(TQChar('\n'), "<br />");
if(!hasPre) // strip white spaces if no <pre>
result = result.simplifyWhiteSpace();
}
- return result.isEmpty() ? QString::null : result;
+ return result.isEmpty() ? TQString::null : result;
}
-QString extractTitle(const QDomNode & parent)
+TQString extractTitle(const TQDomNode & parent)
{
- QDomNode node = parent.namedItem(QString::fromLatin1("title"));
+ TQDomNode node = parent.namedItem(TQString::fromLatin1("title"));
if (node.isNull())
- return QString::null;
+ return TQString::null;
- QString result = node.toElement().text();
+ TQString result = node.toElement().text();
- result = KCharsets::resolveEntities(KCharsets::resolveEntities(result).replace(QRegExp("<[^>]*>"), "").remove("\\"));
+ result = KCharsets::resolveEntities(KCharsets::resolveEntities(result).replace(TQRegExp("<[^>]*>"), "").remove("\\"));
result = result.simplifyWhiteSpace();
if (result.isEmpty())
- return QString::null;
+ return TQString::null;
return result;
}
-static void authorFromString(const QString& strp, QString& name, QString& email)
+static void authorFromString(const TQString& strp, TQString& name, TQString& email)
{
- QString str = strp.stripWhiteSpace();
+ TQString str = strp.stripWhiteSpace();
if (str.isEmpty())
return;
// look for something looking like a mail address ( "foo@bar.com",
// "<foo@bar.com>") and extract it
- QRegExp remail("<?([^@\\s<]+@[^>\\s]+)>?"); // FIXME: user "proper" regexp,
+ TQRegExp remail("<?([^@\\s<]+@[^>\\s]+)>?"); // FIXME: user "proper" regexp,
// search kmail source for it
int pos = remail.search(str);
if (pos != -1)
{
- QString all = remail.cap(0);
+ TQString all = remail.cap(0);
email = remail.cap(1);
str.replace(all, ""); // remove mail address
}
@@ -190,7 +190,7 @@ static void authorFromString(const QString& strp, QString& name, QString& email)
// str is of the format "Foo M. Bar (President)",
// we should not cut anything.
- QRegExp rename("^\\(([^\\)]*)\\)");
+ TQRegExp rename("^\\(([^\\)]*)\\)");
pos = rename.search(name);
@@ -199,32 +199,32 @@ static void authorFromString(const QString& strp, QString& name, QString& email)
name = rename.cap(1);
}
- name = name.isEmpty() ? QString() : name;
- email = email.isEmpty() ? QString() : email;
+ name = name.isEmpty() ? TQString() : name;
+ email = email.isEmpty() ? TQString() : email;
}
-QString parseItemAuthor(const QDomElement& element, Format format, Version version)
+TQString parseItemAuthor(const TQDomElement& element, Format format, Version version)
{
- QString name;
- QString email;
+ TQString name;
+ TQString email;
- QDomElement dcCreator = element.namedItem("dc:creator").toElement();
+ TQDomElement dcCreator = element.namedItem("dc:creator").toElement();
if (!dcCreator.isNull())
authorFromString(dcCreator.text(), name, email);
else if (format == AtomFeed)
{
- QDomElement atomAuthor = element.namedItem("author").toElement();
+ TQDomElement atomAuthor = element.namedItem("author").toElement();
if (atomAuthor.isNull())
atomAuthor = element.namedItem("atom:author").toElement();
if (!atomAuthor.isNull())
{
- QDomElement atomName = atomAuthor.namedItem("name").toElement();
+ TQDomElement atomName = atomAuthor.namedItem("name").toElement();
if (atomName.isNull())
atomName = atomAuthor.namedItem("atom:name").toElement();
name = atomName.text().stripWhiteSpace();
- QDomElement atomEmail = atomAuthor.namedItem("email").toElement();
+ TQDomElement atomEmail = atomAuthor.namedItem("email").toElement();
if (atomEmail.isNull())
atomEmail = atomAuthor.namedItem("atom:email").toElement();
email = atomEmail.text().stripWhiteSpace();
@@ -239,7 +239,7 @@ QString parseItemAuthor(const QDomElement& element, Format format, Version versi
name = email;
if (!email.isNull())
- return QString("<a href=\"mailto:%1\">%2</a>").arg(email).arg(name);
+ return TQString("<a href=\"mailto:%1\">%2</a>").arg(email).arg(name);
else
return name;
}
diff --git a/akregator/src/librss/tools_p.h b/akregator/src/librss/tools_p.h
index a257da8a6..9fad6f9e2 100644
--- a/akregator/src/librss/tools_p.h
+++ b/akregator/src/librss/tools_p.h
@@ -29,11 +29,11 @@ namespace RSS
unsigned int count;
};
- QString extractNode(const QDomNode &parent, const QString &elemName, bool isInlined=true);
- QString extractTitle(const QDomNode &parent);
- QString childNodesAsXML(const QDomNode& parent);
- time_t parseISO8601Date(const QString &s);
- QString parseItemAuthor(const QDomElement& element, Format format, Version version);
+ TQString extractNode(const TQDomNode &parent, const TQString &elemName, bool isInlined=true);
+ TQString extractTitle(const TQDomNode &parent);
+ TQString childNodesAsXML(const TQDomNode& parent);
+ time_t parseISO8601Date(const TQString &s);
+ TQString parseItemAuthor(const TQDomElement& element, Format format, Version version);
}
#endif // LIBRSS_TOOLS_P_H
diff --git a/akregator/src/listtabwidget.cpp b/akregator/src/listtabwidget.cpp
index 78f1d0d30..5434a4a6e 100644
--- a/akregator/src/listtabwidget.cpp
+++ b/akregator/src/listtabwidget.cpp
@@ -29,13 +29,13 @@
#include <kmultitabbar.h>
-#include <qiconset.h>
-#include <qlayout.h>
-#include <qmap.h>
-#include <qptrlist.h>
-#include <qstring.h>
-#include <qvaluelist.h>
-#include <qwidgetstack.h>
+#include <tqiconset.h>
+#include <tqlayout.h>
+#include <tqmap.h>
+#include <tqptrlist.h>
+#include <tqstring.h>
+#include <tqvaluelist.h>
+#include <tqwidgetstack.h>
#include <kdebug.h>
@@ -47,14 +47,14 @@ class ListTabWidget::ListTabWidgetPrivate
public:
int idCounter;
KMultiTabBar* tabBar;
- QWidgetStack* stack;
+ TQWidgetStack* stack;
NodeListView* current;
int currentID;
- QValueList<NodeListView*> views;
- QMap<int, NodeListView*> idToView;
- QHBoxLayout* layout;
+ TQValueList<NodeListView*> views;
+ TQMap<int, NodeListView*> idToView;
+ TQHBoxLayout* layout;
ViewMode viewMode;
- QMap<QWidget*, QString> captions;
+ TQMap<TQWidget*, TQString> captions;
};
@@ -125,7 +125,7 @@ void ListTabWidget::slotRootNodeChanged(NodeListView* view, TreeNode* node)
if (unread > 0)
{
//uncomment this to append unread count
- //d->tabWidget->changeTab(view, QString("<qt>%1 (%2)").arg(d->captions[view]).arg(node->unread()));
+ //d->tabWidget->changeTab(view, TQString("<qt>%1 (%2)").arg(d->captions[view]).arg(node->unread()));
d->tabWidget->changeTab(view, d->captions[view]);
}
else
@@ -152,14 +152,14 @@ void ListTabWidget::slotTabClicked(int id)
}
}
-ListTabWidget::ListTabWidget(QWidget* parent, const char* name) : QWidget(parent, name), d(new ListTabWidgetPrivate)
+ListTabWidget::ListTabWidget(TQWidget* parent, const char* name) : TQWidget(parent, name), d(new ListTabWidgetPrivate)
{
d->idCounter = 0;
d->current = 0;
d->currentID = -1;
d->viewMode = verticalTabs;
- d->layout = new QHBoxLayout(this);
- //d->layout = new QGridLayout(this, 1, 2);
+ d->layout = new TQHBoxLayout(this);
+ //d->layout = new TQGridLayout(this, 1, 2);
d->tabBar = new KMultiTabBar(KMultiTabBar::Vertical, this);
d->tabBar->setStyle(KMultiTabBar::KDEV3ICON);
//d->tabBar->setStyle(KMultiTabBar::KDEV3);
@@ -167,10 +167,10 @@ ListTabWidget::ListTabWidget(QWidget* parent, const char* name) : QWidget(parent
d->tabBar->setPosition(KMultiTabBar::Left);
d->layout->addWidget(d->tabBar/*, 0, 0*/);
- d->stack = new QWidgetStack(this);
+ d->stack = new TQWidgetStack(this);
d->layout->addWidget(d->stack/*, 0, 1*/);
-// connect(d->tabBar, SIGNAL(currentChanged(QWidget*)), this, SLOT(slotCurrentChanged(QWidget*)));
+// connect(d->tabBar, TQT_SIGNAL(currentChanged(TQWidget*)), this, TQT_SLOT(slotCurrentChanged(TQWidget*)));
}
ListTabWidget::~ListTabWidget()
@@ -196,21 +196,21 @@ ListTabWidget::ViewMode ListTabWidget::viewMode() const
return d->viewMode;
}
-void ListTabWidget::addView(NodeListView* view, const QString& caption, const QPixmap& icon)
+void ListTabWidget::addView(NodeListView* view, const TQString& caption, const TQPixmap& icon)
{
d->captions[view] = caption;
- view->reparent(d->stack, QPoint(0,0));
+ view->reparent(d->stack, TQPoint(0,0));
d->stack->addWidget(view);
int tabId = d->idCounter++;
d->tabBar->appendTab(icon, tabId, caption);
d->idToView[tabId] = view;
- connect(d->tabBar->tab(tabId), SIGNAL(clicked(int)), this, SLOT(slotTabClicked(int)));
+ connect(d->tabBar->tab(tabId), TQT_SIGNAL(clicked(int)), this, TQT_SLOT(slotTabClicked(int)));
- connect(view, SIGNAL(signalNodeSelected(TreeNode*)), this, SIGNAL(signalNodeSelected(TreeNode*)));
- connect(view, SIGNAL(signalRootNodeChanged(NodeListView*, TreeNode*)), this, SLOT(slotRootNodeChanged(NodeListView*, TreeNode*)));
+ connect(view, TQT_SIGNAL(signalNodeSelected(TreeNode*)), this, TQT_SIGNAL(signalNodeSelected(TreeNode*)));
+ connect(view, TQT_SIGNAL(signalRootNodeChanged(NodeListView*, TreeNode*)), this, TQT_SLOT(slotRootNodeChanged(NodeListView*, TreeNode*)));
if (tabId == 0) // first widget
diff --git a/akregator/src/listtabwidget.h b/akregator/src/listtabwidget.h
index 72e423e84..5cf7bf193 100644
--- a/akregator/src/listtabwidget.h
+++ b/akregator/src/listtabwidget.h
@@ -25,7 +25,7 @@
#ifndef AKREGATOR_LISTTABWIDGET_H
#define AKREGATOR_LISTTABWIDGET_H
-#include <qwidget.h>
+#include <tqwidget.h>
class QIconSet;
class QPixmap;
@@ -49,7 +49,7 @@ Q_OBJECT
public:
- ListTabWidget(QWidget* parent=0, const char* name=0);
+ ListTabWidget(TQWidget* parent=0, const char* name=0);
virtual ~ListTabWidget();
enum ViewMode { single, /* horizontalTabs, */ verticalTabs };
@@ -57,7 +57,7 @@ public:
void setViewMode(ViewMode mode);
ViewMode viewMode() const;
- void addView(NodeListView* view, const QString& caption, const QPixmap& icon);
+ void addView(NodeListView* view, const TQString& caption, const TQPixmap& icon);
NodeListView* activeView() const;
diff --git a/akregator/src/main.cpp b/akregator/src/main.cpp
index 5c07d0cd4..f6a3976cd 100644
--- a/akregator/src/main.cpp
+++ b/akregator/src/main.cpp
@@ -22,7 +22,7 @@
without including the source code for Qt in the source distribution.
*/
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include <dcopref.h>
#include <kcmdlineargs.h>
@@ -65,12 +65,12 @@ int Application::newInstance()
akr.send("openStandardFeedList");
}
- QString addFeedGroup = !args->getOption("group").isEmpty()
- ? QString::fromLocal8Bit(args->getOption("group"))
+ TQString addFeedGroup = !args->getOption("group").isEmpty()
+ ? TQString::fromLocal8Bit(args->getOption("group"))
: i18n("Imported Folder");
QCStringList feeds = args->getOptionList("addfeed");
- QStringList feedsToAdd;
+ TQStringList feedsToAdd;
QCStringList::ConstIterator end( feeds.end() );
for (QCStringList::ConstIterator it = feeds.begin(); it != end; ++it)
feedsToAdd.append(*it);
diff --git a/akregator/src/mainwindow.cpp b/akregator/src/mainwindow.cpp
index 41f307b8e..8271994ff 100644
--- a/akregator/src/mainwindow.cpp
+++ b/akregator/src/mainwindow.cpp
@@ -52,11 +52,11 @@
#include "statusbarprogresswidget.h"
#include "trayicon.h"
-#include <qmetaobject.h>
-#include <qpen.h>
-#include <qpainter.h>
+#include <tqmetaobject.h>
+#include <tqpen.h>
+#include <tqpainter.h>
#include <private/qucomextra_p.h>
-#include <qtimer.h>
+#include <tqtimer.h>
namespace Akregator {
@@ -85,7 +85,7 @@ MainWindow::MainWindow()
int statH=fontMetrics().height()+2;
m_statusLabel = new KSqueezedTextLabel(this);
m_statusLabel->setTextFormat(Qt::RichText);
- m_statusLabel->setSizePolicy(QSizePolicy( QSizePolicy::Ignored, QSizePolicy::Fixed ));
+ m_statusLabel->setSizePolicy(TQSizePolicy( TQSizePolicy::Ignored, TQSizePolicy::Fixed ));
m_statusLabel->setMinimumWidth( 0 );
m_statusLabel->setFixedHeight( statH );
statusBar()->addWidget (m_statusLabel, 1, false);
@@ -111,9 +111,9 @@ bool MainWindow::loadPart()
// tell the KParts::MainWindow that this is indeed the main widget
setCentralWidget(m_part->widget());
- connect(m_part, SIGNAL(setWindowCaption (const QString &)), this, SLOT(setCaption (const QString &)));
+ connect(m_part, TQT_SIGNAL(setWindowCaption (const TQString &)), this, TQT_SLOT(setCaption (const TQString &)));
- connect(TrayIcon::getInstance(), SIGNAL(quitSelected()), this, SLOT(slotQuit()));
+ connect(TrayIcon::getInstance(), TQT_SIGNAL(quitSelected()), this, TQT_SLOT(slotQuit()));
// and integrate the part's GUI with the shell's
connectActionCollection(m_part->actionCollection());
createGUI(m_part);
@@ -145,7 +145,7 @@ MainWindow::~MainWindow()
{
}
-void MainWindow::setCaption(const QString &a)
+void MainWindow::setCaption(const TQString &a)
{
KParts::MainWindow::setCaption(a);
}
@@ -154,13 +154,13 @@ void MainWindow::setupActions()
{
connectActionCollection(actionCollection());
- KStdAction::quit(kapp, SLOT(quit()), actionCollection());
+ KStdAction::quit(kapp, TQT_SLOT(quit()), actionCollection());
setStandardToolBarMenuEnabled(true);
createStandardStatusBarAction();
- KStdAction::keyBindings(this, SLOT(optionsConfigureKeys()), actionCollection());
- KStdAction::configureToolbars(this, SLOT(optionsConfigureToolbars()), actionCollection());
+ KStdAction::keyBindings(this, TQT_SLOT(optionsConfigureKeys()), actionCollection());
+ KStdAction::configureToolbars(this, TQT_SLOT(optionsConfigureToolbars()), actionCollection());
}
void MainWindow::saveProperties(KConfig* config)
@@ -203,8 +203,8 @@ void MainWindow::optionsConfigureToolbars()
// use the standard toolbar editor
KEditToolbar dlg(factory());
- connect(&dlg, SIGNAL(newToolbarConfig()),
- this, SLOT(applyNewToolbarConfig()));
+ connect(&dlg, TQT_SIGNAL(newToolbarConfig()),
+ this, TQT_SLOT(applyNewToolbarConfig()));
dlg.exec();
}
@@ -226,10 +226,10 @@ KParts::BrowserExtension *MainWindow::browserExtension(KParts::ReadOnlyPart *p)
void MainWindow::connectActionCollection( KActionCollection *coll )
{
if (!coll) return;
- connect( coll, SIGNAL( actionStatusText( const QString & ) ),
- m_statusLabel, SLOT( setText( const QString & ) ) );
- connect( coll, SIGNAL( clearStatusText() ),
- this, SLOT( slotClearStatusText() ) );
+ connect( coll, TQT_SIGNAL( actionStatusText( const TQString & ) ),
+ m_statusLabel, TQT_SLOT( setText( const TQString & ) ) );
+ connect( coll, TQT_SIGNAL( clearStatusText() ),
+ this, TQT_SLOT( slotClearStatusText() ) );
}
bool MainWindow::queryExit()
@@ -261,10 +261,10 @@ bool MainWindow::queryClose()
}
else
{
- QPixmap shot = TrayIcon::getInstance()->takeScreenshot();
+ TQPixmap shot = TrayIcon::getInstance()->takeScreenshot();
// Associate source to image and show the dialog:
- QMimeSourceFactory::defaultFactory()->setPixmap("systray_shot", shot);
+ TQMimeSourceFactory::defaultFactory()->setPixmap("systray_shot", shot);
KMessageBox::information(this, i18n( "<qt><p>Closing the main window will keep Akregator running in the system tray. Use 'Quit' from the 'File' menu to quit the application.</p><p><center><img source=\"systray_shot\"></center></p></qt>" ), i18n( "Docking in System Tray" ), "hideOnCloseInfo");
hide();
return false;
@@ -274,10 +274,10 @@ bool MainWindow::queryClose()
void MainWindow::slotClearStatusText()
{
- m_statusLabel->setText(QString());
+ m_statusLabel->setText(TQString());
}
-void MainWindow::slotSetStatusBarText( const QString & text )
+void MainWindow::slotSetStatusBarText( const TQString & text )
{
m_statusLabel->setText(text);
}
diff --git a/akregator/src/mainwindow.h b/akregator/src/mainwindow.h
index c88b08174..d8012d90b 100644
--- a/akregator/src/mainwindow.h
+++ b/akregator/src/mainwindow.h
@@ -85,7 +85,7 @@ public:
*/
void setupProgressWidgets();
- virtual void setCaption(const QString &);
+ virtual void setCaption(const TQString &);
/**
Loads the part
@@ -95,7 +95,7 @@ public:
public slots:
void slotClearStatusText();
- void slotSetStatusBarText(const QString &c);
+ void slotSetStatusBarText(const TQString &c);
protected:
/**
diff --git a/akregator/src/mk4storage/feedstoragemk4impl.cpp b/akregator/src/mk4storage/feedstoragemk4impl.cpp
index 521f9f326..b03f0438b 100644
--- a/akregator/src/mk4storage/feedstoragemk4impl.cpp
+++ b/akregator/src/mk4storage/feedstoragemk4impl.cpp
@@ -31,8 +31,8 @@
#include "../librss/document.h"
#include <mk4.h>
-#include <qdom.h>
-#include <qfile.h>
+#include <tqdom.h>
+#include <tqfile.h>
#include <kdebug.h>
#include <kglobal.h>
@@ -72,7 +72,7 @@ class FeedStorageMK4Impl::FeedStorageMK4ImplPrivate
pcategories("categories")
{}
- QString url;
+ TQString url;
c4_Storage* storage;
StorageMK4Impl* mainStorage;
c4_View archiveView;
@@ -85,7 +85,7 @@ class FeedStorageMK4Impl::FeedStorageMK4ImplPrivate
bool modified;
bool taggingEnabled;
bool convert;
- QString oldArchivePath;
+ TQString oldArchivePath;
c4_StringProp pguid, ptitle, pdescription, plink, pcommentsLink, ptag, pEnclosureType, pEnclosureUrl, pcatTerm, pcatScheme, pcatName, pauthor;
c4_IntProp phash, pguidIsHash, pguidIsPermaLink, pcomments, pstatus, ppubDate, pHasEnclosure, pEnclosureLength;
c4_ViewProp ptags, ptaggedArticles, pcategorizedArticles, pcategories;
@@ -97,15 +97,15 @@ void FeedStorageMK4Impl::convertOldArchive()
return;
d->convert = false;
- QFile file(d->oldArchivePath);
+ TQFile file(d->oldArchivePath);
if ( !file.open(IO_ReadOnly) )
return;
- QTextStream stream(&file);
- stream.setEncoding(QTextStream::UnicodeUTF8);
- QString data=stream.read();
- QDomDocument xmldoc;
+ TQTextStream stream(&file);
+ stream.setEncoding(TQTextStream::UnicodeUTF8);
+ TQString data=stream.read();
+ TQDomDocument xmldoc;
if (!xmldoc.setContent(data))
return;
@@ -129,7 +129,7 @@ void FeedStorageMK4Impl::convertOldArchive()
commit();
}
-FeedStorageMK4Impl::FeedStorageMK4Impl(const QString& url, StorageMK4Impl* main)
+FeedStorageMK4Impl::FeedStorageMK4Impl(const TQString& url, StorageMK4Impl* main)
{
d = new FeedStorageMK4ImplPrivate;
d->autoCommit = main->autoCommit();
@@ -137,20 +137,20 @@ FeedStorageMK4Impl::FeedStorageMK4Impl(const QString& url, StorageMK4Impl* main)
d->mainStorage = main;
d->taggingEnabled = main->taggingEnabled();
- QString url2 = url;
+ TQString url2 = url;
if (url.length() > 255)
{
- url2 = url.left(200) + QString::number(Akregator::Utils::calcHash(url), 16);
+ url2 = url.left(200) + TQString::number(Akregator::Utils::calcHash(url), 16);
}
kdDebug() << url2 << endl;
- QString t = url2;
- QString t2 = url2;
- QString filePath = main->archivePath() +"/"+ t.replace("/", "_").replace(":", "_");
+ TQString t = url2;
+ TQString t2 = url2;
+ TQString filePath = main->archivePath() +"/"+ t.replace("/", "_").replace(":", "_");
d->oldArchivePath = KGlobal::dirs()->saveLocation("data", "akregator/Archive/") + t2.replace("/", "_").replace(":", "_") + ".xml";
- d->convert = !QFile::exists(filePath + ".mk4") && QFile::exists(d->oldArchivePath);
+ d->convert = !TQFile::exists(filePath + ".mk4") && TQFile::exists(d->oldArchivePath);
d->storage = new c4_Storage((filePath + ".mk4").local8Bit(), true);
d->archiveView = d->storage->GetAs("articles[guid:S,title:S,hash:I,guidIsHash:I,guidIsPermaLink:I,description:S,link:S,comments:I,commentsLink:S,status:I,pubDate:I,tags[tag:S],hasEnclosure:I,enclosureUrl:S,enclosureType:S,enclosureLength:I,categories[catTerm:S,catScheme:S,catName:S],author:S]");
@@ -245,14 +245,14 @@ void FeedStorageMK4Impl::setLastFetch(int lastFetch)
d->mainStorage->setLastFetchFor(d->url, lastFetch);
}
-QStringList FeedStorageMK4Impl::articles(const QString& tag)
+TQStringList FeedStorageMK4Impl::articles(const TQString& tag)
{
- QStringList list;
+ TQStringList list;
if (tag.isNull()) // return all articles
{
int size = d->archiveView.GetSize();
for (int i = 0; i < size; i++) // fill with guids
- list += QString(d->pguid(d->archiveView.GetAt(i)));
+ list += TQString(d->pguid(d->archiveView.GetAt(i)));
}
else if (d->taggingEnabled)
{
@@ -265,16 +265,16 @@ QStringList FeedStorageMK4Impl::articles(const QString& tag)
c4_View tagView = d->ptaggedArticles(tagrow);
int size = tagView.GetSize();
for (int i = 0; i < size; i++)
- list += QString(d->pguid(tagView.GetAt(i)));
+ list += TQString(d->pguid(tagView.GetAt(i)));
}
}
return list;
}
-QStringList FeedStorageMK4Impl::articles(const Category& cat)
+TQStringList FeedStorageMK4Impl::articles(const Category& cat)
{
- QStringList list;
+ TQStringList list;
/*
c4_Row catrow;
d->pcatTerm(catrow) = cat.term.utf8().data();
@@ -287,13 +287,13 @@ QStringList FeedStorageMK4Impl::articles(const Category& cat)
c4_View catView = d->pcategorizedArticles(catrow);
int size = catView.GetSize();
for (int i = 0; i < size; i++)
- list += QString(d->pguid(catView.GetAt(i)));
+ list += TQString(d->pguid(catView.GetAt(i)));
}
*/
return list;
}
-void FeedStorageMK4Impl::addEntry(const QString& guid)
+void FeedStorageMK4Impl::addEntry(const TQString& guid)
{
c4_Row row;
d->pguid(row) = guid.ascii();
@@ -305,26 +305,26 @@ void FeedStorageMK4Impl::addEntry(const QString& guid)
}
}
-bool FeedStorageMK4Impl::contains(const QString& guid)
+bool FeedStorageMK4Impl::contains(const TQString& guid)
{
return findArticle(guid) != -1;
}
-int FeedStorageMK4Impl::findArticle(const QString& guid)
+int FeedStorageMK4Impl::findArticle(const TQString& guid)
{
c4_Row findrow;
d->pguid(findrow) = guid.ascii();
return d->archiveView.Find(findrow);
}
-void FeedStorageMK4Impl::deleteArticle(const QString& guid)
+void FeedStorageMK4Impl::deleteArticle(const TQString& guid)
{
int findidx = findArticle(guid);
if (findidx != -1)
{
- QStringList list = tags(guid);
- for (QStringList::ConstIterator it = list.begin(); it != list.end(); ++it)
+ TQStringList list = tags(guid);
+ for (TQStringList::ConstIterator it = list.begin(); it != list.end(); ++it)
removeTag(guid, *it);
setTotalCount(totalCount()-1);
d->archiveView.RemoveAt(findidx);
@@ -332,38 +332,38 @@ void FeedStorageMK4Impl::deleteArticle(const QString& guid)
}
}
-int FeedStorageMK4Impl::comments(const QString& guid)
+int FeedStorageMK4Impl::comments(const TQString& guid)
{
int findidx = findArticle(guid);
return findidx != -1 ? d->pcomments(d->archiveView.GetAt(findidx)) : 0;
}
-QString FeedStorageMK4Impl::commentsLink(const QString& guid)
+TQString FeedStorageMK4Impl::commentsLink(const TQString& guid)
{
int findidx = findArticle(guid);
- return findidx != -1 ? QString(d->pcommentsLink(d->archiveView.GetAt(findidx))) : "";
+ return findidx != -1 ? TQString(d->pcommentsLink(d->archiveView.GetAt(findidx))) : "";
}
-bool FeedStorageMK4Impl::guidIsHash(const QString& guid)
+bool FeedStorageMK4Impl::guidIsHash(const TQString& guid)
{
int findidx = findArticle(guid);
return findidx != -1 ? d->pguidIsHash(d->archiveView.GetAt(findidx)) : false;
}
-bool FeedStorageMK4Impl::guidIsPermaLink(const QString& guid)
+bool FeedStorageMK4Impl::guidIsPermaLink(const TQString& guid)
{
int findidx = findArticle(guid);
return findidx != -1 ? d->pguidIsPermaLink(d->archiveView.GetAt(findidx)) : false;
}
-uint FeedStorageMK4Impl::hash(const QString& guid)
+uint FeedStorageMK4Impl::hash(const TQString& guid)
{
int findidx = findArticle(guid);
return findidx != -1 ? d->phash(d->archiveView.GetAt(findidx)) : 0;
}
-void FeedStorageMK4Impl::setDeleted(const QString& guid)
+void FeedStorageMK4Impl::setDeleted(const TQString& guid)
{
int findidx = findArticle(guid);
if (findidx == -1)
@@ -371,8 +371,8 @@ void FeedStorageMK4Impl::setDeleted(const QString& guid)
c4_Row row;
row = d->archiveView.GetAt(findidx);
- QStringList list = tags(guid);
- for (QStringList::ConstIterator it = list.begin(); it != list.end(); ++it)
+ TQStringList list = tags(guid);
+ for (TQStringList::ConstIterator it = list.begin(); it != list.end(); ++it)
removeTag(guid, *it);
d->pdescription(row) = "";
d->ptitle(row) = "";
@@ -383,25 +383,25 @@ void FeedStorageMK4Impl::setDeleted(const QString& guid)
markDirty();
}
-QString FeedStorageMK4Impl::link(const QString& guid)
+TQString FeedStorageMK4Impl::link(const TQString& guid)
{
int findidx = findArticle(guid);
- return findidx != -1 ? QString(d->plink(d->archiveView.GetAt(findidx))) : "";
+ return findidx != -1 ? TQString(d->plink(d->archiveView.GetAt(findidx))) : "";
}
-uint FeedStorageMK4Impl::pubDate(const QString& guid)
+uint FeedStorageMK4Impl::pubDate(const TQString& guid)
{
int findidx = findArticle(guid);
return findidx != -1 ? d->ppubDate(d->archiveView.GetAt(findidx)) : 0;
}
-int FeedStorageMK4Impl::status(const QString& guid)
+int FeedStorageMK4Impl::status(const TQString& guid)
{
int findidx = findArticle(guid);
return findidx != -1 ? d->pstatus(d->archiveView.GetAt(findidx)) : 0;
}
-void FeedStorageMK4Impl::setStatus(const QString& guid, int status)
+void FeedStorageMK4Impl::setStatus(const TQString& guid, int status)
{
int findidx = findArticle(guid);
if (findidx == -1)
@@ -413,20 +413,20 @@ void FeedStorageMK4Impl::setStatus(const QString& guid, int status)
markDirty();
}
-QString FeedStorageMK4Impl::title(const QString& guid)
+TQString FeedStorageMK4Impl::title(const TQString& guid)
{
int findidx = findArticle(guid);
- return findidx != -1 ? QString::fromUtf8(d->ptitle(d->archiveView.GetAt(findidx))) : "";
+ return findidx != -1 ? TQString::fromUtf8(d->ptitle(d->archiveView.GetAt(findidx))) : "";
}
-QString FeedStorageMK4Impl::description(const QString& guid)
+TQString FeedStorageMK4Impl::description(const TQString& guid)
{
int findidx = findArticle(guid);
- return findidx != -1 ? QString::fromUtf8(d->pdescription(d->archiveView.GetAt(findidx))) : "";
+ return findidx != -1 ? TQString::fromUtf8(d->pdescription(d->archiveView.GetAt(findidx))) : "";
}
-void FeedStorageMK4Impl::setPubDate(const QString& guid, uint pubdate)
+void FeedStorageMK4Impl::setPubDate(const TQString& guid, uint pubdate)
{
int findidx = findArticle(guid);
if (findidx == -1)
@@ -438,7 +438,7 @@ void FeedStorageMK4Impl::setPubDate(const QString& guid, uint pubdate)
markDirty();
}
-void FeedStorageMK4Impl::setGuidIsHash(const QString& guid, bool isHash)
+void FeedStorageMK4Impl::setGuidIsHash(const TQString& guid, bool isHash)
{
int findidx = findArticle(guid);
if (findidx == -1)
@@ -450,7 +450,7 @@ void FeedStorageMK4Impl::setGuidIsHash(const QString& guid, bool isHash)
markDirty();
}
-void FeedStorageMK4Impl::setLink(const QString& guid, const QString& link)
+void FeedStorageMK4Impl::setLink(const TQString& guid, const TQString& link)
{
int findidx = findArticle(guid);
if (findidx == -1)
@@ -462,7 +462,7 @@ void FeedStorageMK4Impl::setLink(const QString& guid, const QString& link)
markDirty();
}
-void FeedStorageMK4Impl::setHash(const QString& guid, uint hash)
+void FeedStorageMK4Impl::setHash(const TQString& guid, uint hash)
{
int findidx = findArticle(guid);
if (findidx == -1)
@@ -474,7 +474,7 @@ void FeedStorageMK4Impl::setHash(const QString& guid, uint hash)
markDirty();
}
-void FeedStorageMK4Impl::setTitle(const QString& guid, const QString& title)
+void FeedStorageMK4Impl::setTitle(const TQString& guid, const TQString& title)
{
int findidx = findArticle(guid);
if (findidx == -1)
@@ -486,7 +486,7 @@ void FeedStorageMK4Impl::setTitle(const QString& guid, const QString& title)
markDirty();
}
-void FeedStorageMK4Impl::setDescription(const QString& guid, const QString& description)
+void FeedStorageMK4Impl::setDescription(const TQString& guid, const TQString& description)
{
int findidx = findArticle(guid);
if (findidx == -1)
@@ -498,7 +498,7 @@ void FeedStorageMK4Impl::setDescription(const QString& guid, const QString& desc
markDirty();
}
-void FeedStorageMK4Impl::setAuthor(const QString& guid, const QString& author)
+void FeedStorageMK4Impl::setAuthor(const TQString& guid, const TQString& author)
{
int findidx = findArticle(guid);
if (findidx == -1)
@@ -510,14 +510,14 @@ void FeedStorageMK4Impl::setAuthor(const QString& guid, const QString& author)
markDirty();
}
-QString FeedStorageMK4Impl::author(const QString& guid)
+TQString FeedStorageMK4Impl::author(const TQString& guid)
{
int findidx = findArticle(guid);
- return findidx != -1 ? QString::fromUtf8(d->pauthor(d->archiveView.GetAt(findidx))) : "";
+ return findidx != -1 ? TQString::fromUtf8(d->pauthor(d->archiveView.GetAt(findidx))) : "";
}
-void FeedStorageMK4Impl::setCommentsLink(const QString& guid, const QString& commentsLink)
+void FeedStorageMK4Impl::setCommentsLink(const TQString& guid, const TQString& commentsLink)
{
int findidx = findArticle(guid);
if (findidx == -1)
@@ -529,7 +529,7 @@ void FeedStorageMK4Impl::setCommentsLink(const QString& guid, const QString& com
markDirty();
}
-void FeedStorageMK4Impl::setComments(const QString& guid, int comments)
+void FeedStorageMK4Impl::setComments(const TQString& guid, int comments)
{
int findidx = findArticle(guid);
if (findidx == -1)
@@ -542,7 +542,7 @@ void FeedStorageMK4Impl::setComments(const QString& guid, int comments)
}
-void FeedStorageMK4Impl::setGuidIsPermaLink(const QString& guid, bool isPermaLink)
+void FeedStorageMK4Impl::setGuidIsPermaLink(const TQString& guid, bool isPermaLink)
{
int findidx = findArticle(guid);
if (findidx == -1)
@@ -554,7 +554,7 @@ void FeedStorageMK4Impl::setGuidIsPermaLink(const QString& guid, bool isPermaLin
markDirty();
}
-void FeedStorageMK4Impl::addCategory(const QString& /*guid*/, const Category& /*cat*/)
+void FeedStorageMK4Impl::addCategory(const TQString& /*guid*/, const Category& /*cat*/)
{
return;
/*
@@ -610,10 +610,10 @@ void FeedStorageMK4Impl::addCategory(const QString& /*guid*/, const Category& /*
*/
}
-QValueList<Category> FeedStorageMK4Impl::categories(const QString& /*guid*/)
+TQValueList<Category> FeedStorageMK4Impl::categories(const TQString& /*guid*/)
{
- QValueList<Category> list;
+ TQValueList<Category> list;
return list;
/*
if (!guid.isNull()) // return categories for an article
@@ -631,9 +631,9 @@ QValueList<Category> FeedStorageMK4Impl::categories(const QString& /*guid*/)
{
Category cat;
- cat.term = QString::fromUtf8(d->pcatTerm(catView.GetAt(i)));
- cat.scheme = QString::fromUtf8(d->pcatScheme(catView.GetAt(i)));
- cat.name = QString::fromUtf8(d->pcatName(catView.GetAt(i)));
+ cat.term = TQString::fromUtf8(d->pcatTerm(catView.GetAt(i)));
+ cat.scheme = TQString::fromUtf8(d->pcatScheme(catView.GetAt(i)));
+ cat.name = TQString::fromUtf8(d->pcatName(catView.GetAt(i)));
list += cat;
}
@@ -646,9 +646,9 @@ QValueList<Category> FeedStorageMK4Impl::categories(const QString& /*guid*/)
c4_Row row = d->catView.GetAt(i);
Category cat;
- cat.term = QString(d->pcatTerm(row));
- cat.scheme = QString(d->pcatScheme(row));
- cat.name = QString(d->pcatName(row));
+ cat.term = TQString(d->pcatTerm(row));
+ cat.scheme = TQString(d->pcatScheme(row));
+ cat.name = TQString(d->pcatName(row));
list += cat;
}
@@ -657,7 +657,7 @@ QValueList<Category> FeedStorageMK4Impl::categories(const QString& /*guid*/)
return list;*/
}
-void FeedStorageMK4Impl::addTag(const QString& guid, const QString& tag)
+void FeedStorageMK4Impl::addTag(const TQString& guid, const TQString& tag)
{
if (!d->taggingEnabled)
return;
@@ -701,7 +701,7 @@ void FeedStorageMK4Impl::addTag(const QString& guid, const QString& tag)
}
}
-void FeedStorageMK4Impl::removeTag(const QString& guid, const QString& tag)
+void FeedStorageMK4Impl::removeTag(const TQString& guid, const TQString& tag)
{
if (!d->taggingEnabled)
return;
@@ -746,9 +746,9 @@ void FeedStorageMK4Impl::removeTag(const QString& guid, const QString& tag)
}
}
-QStringList FeedStorageMK4Impl::tags(const QString& guid)
+TQStringList FeedStorageMK4Impl::tags(const TQString& guid)
{
- QStringList list;
+ TQStringList list;
if (!d->taggingEnabled)
return list;
@@ -765,13 +765,13 @@ QStringList FeedStorageMK4Impl::tags(const QString& guid)
int size = tagView.GetSize();
for (int i = 0; i < size; ++i)
- list += QString::fromUtf8(d->ptag(tagView.GetAt(i)));
+ list += TQString::fromUtf8(d->ptag(tagView.GetAt(i)));
}
else // return all tags in the feed
{
int size = d->tagView.GetSize();
for (int i = 0; i < size; i++)
- list += QString(d->ptag(d->tagView.GetAt(i)));
+ list += TQString(d->ptag(d->tagView.GetAt(i)));
}
return list;
@@ -779,15 +779,15 @@ QStringList FeedStorageMK4Impl::tags(const QString& guid)
void FeedStorageMK4Impl::add(FeedStorage* source)
{
- QStringList articles = source->articles();
- for (QStringList::ConstIterator it = articles.begin(); it != articles.end(); ++it)
+ TQStringList articles = source->articles();
+ for (TQStringList::ConstIterator it = articles.begin(); it != articles.end(); ++it)
copyArticle(*it, source);
setUnread(source->unread());
setLastFetch(source->lastFetch());
setTotalCount(source->totalCount());
}
-void FeedStorageMK4Impl::copyArticle(const QString& guid, FeedStorage* source)
+void FeedStorageMK4Impl::copyArticle(const TQString& guid, FeedStorage* source)
{
if (!contains(guid))
addEntry(guid);
@@ -803,12 +803,12 @@ void FeedStorageMK4Impl::copyArticle(const QString& guid, FeedStorage* source)
setTitle(guid, source->title(guid));
setAuthor(guid, source->author(guid));
- QStringList tags = source->tags(guid);
- for (QStringList::ConstIterator it = tags.begin(); it != tags.end(); ++it)
+ TQStringList tags = source->tags(guid);
+ for (TQStringList::ConstIterator it = tags.begin(); it != tags.end(); ++it)
addTag(guid, *it);
}
-void FeedStorageMK4Impl::setEnclosure(const QString& guid, const QString& url, const QString& type, int length)
+void FeedStorageMK4Impl::setEnclosure(const TQString& guid, const TQString& url, const TQString& type, int length)
{
int findidx = findArticle(guid);
if (findidx == -1)
@@ -824,7 +824,7 @@ void FeedStorageMK4Impl::setEnclosure(const QString& guid, const QString& url, c
markDirty();
}
-void FeedStorageMK4Impl::removeEnclosure(const QString& guid)
+void FeedStorageMK4Impl::removeEnclosure(const TQString& guid)
{
int findidx = findArticle(guid);
if (findidx == -1)
@@ -840,14 +840,14 @@ void FeedStorageMK4Impl::removeEnclosure(const QString& guid)
markDirty();
}
-void FeedStorageMK4Impl::enclosure(const QString& guid, bool& hasEnclosure, QString& url, QString& type, int& length)
+void FeedStorageMK4Impl::enclosure(const TQString& guid, bool& hasEnclosure, TQString& url, TQString& type, int& length)
{
int findidx = findArticle(guid);
if (findidx == -1)
{
hasEnclosure = false;
- url = QString::null;
- type = QString::null;
+ url = TQString::null;
+ type = TQString::null;
length = -1;
return;
}
diff --git a/akregator/src/mk4storage/feedstoragemk4impl.h b/akregator/src/mk4storage/feedstoragemk4impl.h
index d27933d0f..b6fea2e86 100644
--- a/akregator/src/mk4storage/feedstoragemk4impl.h
+++ b/akregator/src/mk4storage/feedstoragemk4impl.h
@@ -32,12 +32,12 @@ class StorageMK4Impl;
class FeedStorageMK4Impl : public FeedStorage
{
public:
- FeedStorageMK4Impl(const QString& url, StorageMK4Impl* main);
+ FeedStorageMK4Impl(const TQString& url, StorageMK4Impl* main);
virtual ~FeedStorageMK4Impl();
virtual void add(FeedStorage* source);
- virtual void copyArticle(const QString& guid, FeedStorage* source);
+ virtual void copyArticle(const TQString& guid, FeedStorage* source);
virtual void clear();
virtual int unread();
@@ -46,47 +46,47 @@ class FeedStorageMK4Impl : public FeedStorage
virtual int lastFetch();
virtual void setLastFetch(int lastFetch);
- virtual QStringList articles(const QString& tag=QString::null);
+ virtual TQStringList articles(const TQString& tag=TQString::null);
- virtual QStringList articles(const Category& cat);
+ virtual TQStringList articles(const Category& cat);
- virtual bool contains(const QString& guid);
- virtual void addEntry(const QString& guid);
- virtual void deleteArticle(const QString& guid);
- virtual int comments(const QString& guid);
- virtual QString commentsLink(const QString& guid);
- virtual void setCommentsLink(const QString& guid, const QString& commentsLink);
- virtual void setComments(const QString& guid, int comments);
- virtual bool guidIsHash(const QString& guid);
- virtual void setGuidIsHash(const QString& guid, bool isHash);
- virtual bool guidIsPermaLink(const QString& guid);
- virtual void setGuidIsPermaLink(const QString& guid, bool isPermaLink);
- virtual uint hash(const QString& guid);
- virtual void setHash(const QString& guid, uint hash);
- virtual void setDeleted(const QString& guid);
- virtual QString link(const QString& guid);
- virtual void setLink(const QString& guid, const QString& link);
- virtual uint pubDate(const QString& guid);
- virtual void setPubDate(const QString& guid, uint pubdate);
- virtual int status(const QString& guid);
- virtual void setStatus(const QString& guid, int status);
- virtual QString title(const QString& guid);
- virtual void setTitle(const QString& guid, const QString& title);
- virtual QString description(const QString& guid);
- virtual void setDescription(const QString& guid, const QString& description);
- virtual void setEnclosure(const QString& guid, const QString& url, const QString& type, int length);
- virtual void removeEnclosure(const QString& guid);
- virtual void enclosure(const QString& guid, bool& hasEnclosure, QString& url, QString& type, int& length);
+ virtual bool contains(const TQString& guid);
+ virtual void addEntry(const TQString& guid);
+ virtual void deleteArticle(const TQString& guid);
+ virtual int comments(const TQString& guid);
+ virtual TQString commentsLink(const TQString& guid);
+ virtual void setCommentsLink(const TQString& guid, const TQString& commentsLink);
+ virtual void setComments(const TQString& guid, int comments);
+ virtual bool guidIsHash(const TQString& guid);
+ virtual void setGuidIsHash(const TQString& guid, bool isHash);
+ virtual bool guidIsPermaLink(const TQString& guid);
+ virtual void setGuidIsPermaLink(const TQString& guid, bool isPermaLink);
+ virtual uint hash(const TQString& guid);
+ virtual void setHash(const TQString& guid, uint hash);
+ virtual void setDeleted(const TQString& guid);
+ virtual TQString link(const TQString& guid);
+ virtual void setLink(const TQString& guid, const TQString& link);
+ virtual uint pubDate(const TQString& guid);
+ virtual void setPubDate(const TQString& guid, uint pubdate);
+ virtual int status(const TQString& guid);
+ virtual void setStatus(const TQString& guid, int status);
+ virtual TQString title(const TQString& guid);
+ virtual void setTitle(const TQString& guid, const TQString& title);
+ virtual TQString description(const TQString& guid);
+ virtual void setDescription(const TQString& guid, const TQString& description);
+ virtual void setEnclosure(const TQString& guid, const TQString& url, const TQString& type, int length);
+ virtual void removeEnclosure(const TQString& guid);
+ virtual void enclosure(const TQString& guid, bool& hasEnclosure, TQString& url, TQString& type, int& length);
- virtual void addTag(const QString& guid, const QString& tag);
- virtual void removeTag(const QString& guid, const QString& tag);
- virtual QStringList tags(const QString& guid=QString::null);
+ virtual void addTag(const TQString& guid, const TQString& tag);
+ virtual void removeTag(const TQString& guid, const TQString& tag);
+ virtual TQStringList tags(const TQString& guid=TQString::null);
- virtual void addCategory(const QString& guid, const Category& category);
- virtual QValueList<Category> categories(const QString& guid=QString::null);
+ virtual void addCategory(const TQString& guid, const Category& category);
+ virtual TQValueList<Category> categories(const TQString& guid=TQString::null);
- virtual void setAuthor(const QString& guid, const QString& author);
- virtual QString author(const QString& guid);
+ virtual void setAuthor(const TQString& guid, const TQString& author);
+ virtual TQString author(const TQString& guid);
virtual void close();
virtual void commit();
@@ -96,7 +96,7 @@ class FeedStorageMK4Impl : public FeedStorage
private:
void markDirty();
/** finds article by guid, returns -1 if not in archive **/
- int findArticle(const QString& guid);
+ int findArticle(const TQString& guid);
void setTotalCount(int total);
class FeedStorageMK4ImplPrivate;
FeedStorageMK4ImplPrivate* d;
diff --git a/akregator/src/mk4storage/mk4confwidget.cpp b/akregator/src/mk4storage/mk4confwidget.cpp
index fb95e1602..fce697201 100644
--- a/akregator/src/mk4storage/mk4confwidget.cpp
+++ b/akregator/src/mk4storage/mk4confwidget.cpp
@@ -26,8 +26,8 @@
#include "mk4confwidget.h"
#include "storagemk4impl.h"
-#include <qcheckbox.h>
-#include <qlabel.h>
+#include <tqcheckbox.h>
+#include <tqlabel.h>
#include <klocale.h>
#include <kmessagebox.h>
#include <kurlrequester.h>
@@ -52,14 +52,14 @@ MK4ConfWidget::MK4ConfWidget() : MK4ConfWidgetBase()
label->setEnabled(true);
}
filereq->setURL(MK4Config::archivePath());
- connect(cbUseDefault, SIGNAL(toggled(bool)), this, SLOT(slotChkBoxUseDefault(bool)));
+ connect(cbUseDefault, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotChkBoxUseDefault(bool)));
}
void MK4ConfWidget::accept()
{
- QString path = cbUseDefault->isChecked() ? StorageMK4Impl::defaultArchivePath() : filereq->url();
+ TQString path = cbUseDefault->isChecked() ? StorageMK4Impl::defaultArchivePath() : filereq->url();
if (path != MK4Config::archivePath())
{
// TODO: if the user changed the archive location, inform him that
diff --git a/akregator/src/mk4storage/storagefactorymk4impl.cpp b/akregator/src/mk4storage/storagefactorymk4impl.cpp
index 9303bb965..09cacc9db 100644
--- a/akregator/src/mk4storage/storagefactorymk4impl.cpp
+++ b/akregator/src/mk4storage/storagefactorymk4impl.cpp
@@ -27,26 +27,26 @@
//#include "mk4config.h"
#include <klocale.h>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qwidget.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqwidget.h>
namespace Akregator {
namespace Backend {
-Storage* StorageFactoryMK4Impl::createStorage(const QStringList& params) const
+Storage* StorageFactoryMK4Impl::createStorage(const TQStringList& params) const
{
Storage* storage = new StorageMK4Impl;
storage->initialize(params);
return storage;
}
-QString StorageFactoryMK4Impl::key() const
+TQString StorageFactoryMK4Impl::key() const
{
return "metakit";
}
-QString StorageFactoryMK4Impl::name() const
+TQString StorageFactoryMK4Impl::name() const
{
return i18n("Metakit");
}
@@ -58,7 +58,7 @@ void StorageFactoryMK4Impl::configure()
// fill with Settings
- if (confWidget->exec() == QDialog::Accepted)
+ if (confWidget->exec() == TQDialog::Accepted)
{
// store and apply settings
}
diff --git a/akregator/src/mk4storage/storagefactorymk4impl.h b/akregator/src/mk4storage/storagefactorymk4impl.h
index b5e51db9d..2fa915934 100644
--- a/akregator/src/mk4storage/storagefactorymk4impl.h
+++ b/akregator/src/mk4storage/storagefactorymk4impl.h
@@ -38,10 +38,10 @@ class Storage;
class StorageFactoryMK4Impl : public StorageFactory
{
public:
- virtual QString key() const;
- virtual QString name() const;
+ virtual TQString key() const;
+ virtual TQString name() const;
virtual void configure();
- virtual Storage* createStorage(const QStringList& params) const;
+ virtual Storage* createStorage(const TQStringList& params) const;
virtual bool isConfigurable() const { return false; }
virtual bool allowsMultipleWriteAccess() const { return false; }
diff --git a/akregator/src/mk4storage/storagemk4impl.cpp b/akregator/src/mk4storage/storagemk4impl.cpp
index 8a3af0e02..4fc9ecec1 100644
--- a/akregator/src/mk4storage/storagemk4impl.cpp
+++ b/akregator/src/mk4storage/storagemk4impl.cpp
@@ -27,10 +27,10 @@
#include <mk4.h>
-#include <qmap.h>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qtimer.h>
+#include <tqmap.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqtimer.h>
#include <kdebug.h>
#include <kstandarddirs.h>
@@ -53,11 +53,11 @@ class StorageMK4Impl::StorageMK4ImplPrivate
c4_View archiveView;
bool autoCommit;
bool modified;
- QMap<QString, FeedStorage*> feeds;
- QStringList feedURLs;
+ TQMap<TQString, FeedStorage*> feeds;
+ TQStringList feedURLs;
c4_StringProp purl, pFeedList, pTagSet;
c4_IntProp punread, ptotalCount, plastFetch;
- QString archivePath;
+ TQString archivePath;
bool taggingEnabled;
@@ -70,7 +70,7 @@ bool StorageMK4Impl::taggingEnabled() const
return d->taggingEnabled;
}
-void StorageMK4Impl::setArchivePath(const QString& archivePath)
+void StorageMK4Impl::setArchivePath(const TQString& archivePath)
{
if (archivePath.isNull()) // if isNull, reset to default
d->archivePath = defaultArchivePath();
@@ -78,17 +78,17 @@ void StorageMK4Impl::setArchivePath(const QString& archivePath)
d->archivePath = archivePath;
}
-QString StorageMK4Impl::archivePath() const
+TQString StorageMK4Impl::archivePath() const
{
return d->archivePath;
}
StorageMK4Impl::StorageMK4Impl() : d(new StorageMK4ImplPrivate)
{
- setArchivePath(QString::null); // set path to default
+ setArchivePath(TQString::null); // set path to default
}
-QString StorageMK4Impl::defaultArchivePath()
+TQString StorageMK4Impl::defaultArchivePath()
{
return KGlobal::dirs()->saveLocation("data", "akregator")+"Archive";
}
@@ -99,16 +99,16 @@ StorageMK4Impl::~StorageMK4Impl()
delete d;
d = 0;
}
-void StorageMK4Impl::initialize(const QStringList& params)
+void StorageMK4Impl::initialize(const TQStringList& params)
{
d->taggingEnabled = false;
- QStringList::ConstIterator it = params.begin();
- QStringList::ConstIterator end = params.end();
+ TQStringList::ConstIterator it = params.begin();
+ TQStringList::ConstIterator end = params.end();
for ( ; it != end; ++it)
{
- QStringList tokens = QStringList::split("=", *it);
+ TQStringList tokens = TQStringList::split("=", *it);
if (tokens.count() == 2 && *(tokens.at(0)) == "taggingEnabled"
&& *(tokens.at(1)) == "true")
{
@@ -120,7 +120,7 @@ void StorageMK4Impl::initialize(const QStringList& params)
bool StorageMK4Impl::open(bool autoCommit)
{
- QString filePath = d->archivePath +"/archiveindex.mk4";
+ TQString filePath = d->archivePath +"/archiveindex.mk4";
d->storage = new c4_Storage(filePath.local8Bit(), true);
d->archiveView = d->storage->GetAs("archive[url:S,unread:I,totalCount:I,lastFetch:I]");
c4_View hash = d->storage->GetAs("archiveHash[_H:I,_R:I]");
@@ -140,8 +140,8 @@ bool StorageMK4Impl::autoCommit() const
bool StorageMK4Impl::close()
{
- QMap<QString, FeedStorage*>::Iterator it;
- QMap<QString, FeedStorage*>::Iterator end(d->feeds.end() ) ;
+ TQMap<TQString, FeedStorage*>::Iterator it;
+ TQMap<TQString, FeedStorage*>::Iterator end(d->feeds.end() ) ;
for (it = d->feeds.begin(); it != end; ++it)
{
it.data()->close();
@@ -162,8 +162,8 @@ bool StorageMK4Impl::close()
bool StorageMK4Impl::commit()
{
- QMap<QString, FeedStorage*>::Iterator it;
- QMap<QString, FeedStorage*>::Iterator end(d->feeds.end() ) ;
+ TQMap<TQString, FeedStorage*>::Iterator it;
+ TQMap<TQString, FeedStorage*>::Iterator end(d->feeds.end() ) ;
for ( it = d->feeds.begin(); it != end; ++it )
it.data()->commit();
@@ -178,8 +178,8 @@ bool StorageMK4Impl::commit()
bool StorageMK4Impl::rollback()
{
- QMap<QString, FeedStorage*>::Iterator it;
- QMap<QString, FeedStorage*>::Iterator end(d->feeds.end() ) ;
+ TQMap<TQString, FeedStorage*>::Iterator it;
+ TQMap<TQString, FeedStorage*>::Iterator end(d->feeds.end() ) ;
for ( it = d->feeds.begin(); it != end; ++it )
it.data()->rollback();
@@ -191,7 +191,7 @@ bool StorageMK4Impl::rollback()
return false;
}
-int StorageMK4Impl::unreadFor(const QString &url)
+int StorageMK4Impl::unreadFor(const TQString &url)
{
c4_Row findrow;
d->purl(findrow) = url.ascii();
@@ -200,7 +200,7 @@ int StorageMK4Impl::unreadFor(const QString &url)
return findidx != -1 ? d->punread(d->archiveView.GetAt(findidx)) : 0;
}
-void StorageMK4Impl::setUnreadFor(const QString &url, int unread)
+void StorageMK4Impl::setUnreadFor(const TQString &url, int unread)
{
c4_Row findrow;
d->purl(findrow) = url.ascii();
@@ -213,7 +213,7 @@ void StorageMK4Impl::setUnreadFor(const QString &url, int unread)
markDirty();
}
-int StorageMK4Impl::totalCountFor(const QString &url)
+int StorageMK4Impl::totalCountFor(const TQString &url)
{
c4_Row findrow;
d->purl(findrow) = url.ascii();
@@ -222,7 +222,7 @@ int StorageMK4Impl::totalCountFor(const QString &url)
return findidx != -1 ? d->ptotalCount(d->archiveView.GetAt(findidx)) : 0;
}
-void StorageMK4Impl::setTotalCountFor(const QString &url, int total)
+void StorageMK4Impl::setTotalCountFor(const TQString &url, int total)
{
c4_Row findrow;
d->purl(findrow) = url.ascii();
@@ -235,7 +235,7 @@ void StorageMK4Impl::setTotalCountFor(const QString &url, int total)
markDirty();
}
-int StorageMK4Impl::lastFetchFor(const QString& url)
+int StorageMK4Impl::lastFetchFor(const TQString& url)
{
c4_Row findrow;
d->purl(findrow) = url.ascii();
@@ -244,7 +244,7 @@ int StorageMK4Impl::lastFetchFor(const QString& url)
return (findidx != -1 ? d->plastFetch(d->archiveView.GetAt(findidx)) : 0);
}
-void StorageMK4Impl::setLastFetchFor(const QString& url, int lastFetch)
+void StorageMK4Impl::setLastFetchFor(const TQString& url, int lastFetch)
{
c4_Row findrow;
d->purl(findrow) = url.ascii();
@@ -263,7 +263,7 @@ void StorageMK4Impl::markDirty()
{
d->modified = true;
// commit changes after 3 seconds
- QTimer::singleShot(3000, this, SLOT(slotCommit()));
+ TQTimer::singleShot(3000, this, TQT_SLOT(slotCommit()));
}
}
@@ -274,7 +274,7 @@ void StorageMK4Impl::slotCommit()
d->modified = false;
}
-FeedStorage* StorageMK4Impl::archiveFor(const QString& url)
+FeedStorage* StorageMK4Impl::archiveFor(const TQString& url)
{
if (!d->feeds.contains(url))
{
@@ -296,13 +296,13 @@ FeedStorage* StorageMK4Impl::archiveFor(const QString& url)
return d->feeds[url];
}
-QStringList StorageMK4Impl::feeds() const
+TQStringList StorageMK4Impl::feeds() const
{
// TODO: cache list
- QStringList list;
+ TQStringList list;
int size = d->archiveView.GetSize();
for (int i = 0; i < size; i++)
- list += QString(d->purl(d->archiveView.GetAt(i)));
+ list += TQString(d->purl(d->archiveView.GetAt(i)));
// fill with urls
return list;
@@ -310,10 +310,10 @@ QStringList StorageMK4Impl::feeds() const
void StorageMK4Impl::add(Storage* source)
{
- QStringList feeds = source->feeds();
- QStringList::ConstIterator end(feeds.end() ) ;
+ TQStringList feeds = source->feeds();
+ TQStringList::ConstIterator end(feeds.end() ) ;
- for (QStringList::ConstIterator it = feeds.begin(); it != end; ++it)
+ for (TQStringList::ConstIterator it = feeds.begin(); it != end; ++it)
{
FeedStorage* fa = archiveFor(*it);
fa->add(source->archiveFor(*it));
@@ -323,13 +323,13 @@ void StorageMK4Impl::add(Storage* source)
void StorageMK4Impl::clear()
{
- QStringList feeds;
+ TQStringList feeds;
int size = d->archiveView.GetSize();
for (int i = 0; i < size; i++)
- feeds += QString(d->purl(d->archiveView.GetAt(i)));
- QStringList::ConstIterator end(feeds.end() ) ;
+ feeds += TQString(d->purl(d->archiveView.GetAt(i)));
+ TQStringList::ConstIterator end(feeds.end() ) ;
- for (QStringList::ConstIterator it = feeds.begin(); it != end; ++it)
+ for (TQStringList::ConstIterator it = feeds.begin(); it != end; ++it)
{
FeedStorage* fa = archiveFor(*it);
fa->clear();
@@ -340,7 +340,7 @@ void StorageMK4Impl::clear()
}
-void StorageMK4Impl::storeFeedList(const QString& opmlStr)
+void StorageMK4Impl::storeFeedList(const TQString& opmlStr)
{
if (d->feedListView.GetSize() == 0)
@@ -359,16 +359,16 @@ void StorageMK4Impl::storeFeedList(const QString& opmlStr)
markDirty();
}
-QString StorageMK4Impl::restoreFeedList() const
+TQString StorageMK4Impl::restoreFeedList() const
{
if (d->feedListView.GetSize() == 0)
return "";
c4_Row row = d->feedListView.GetAt(0);
- return QString::fromUtf8(d->pFeedList(row));
+ return TQString::fromUtf8(d->pFeedList(row));
}
-void StorageMK4Impl::storeTagSet(const QString& xmlStr)
+void StorageMK4Impl::storeTagSet(const TQString& xmlStr)
{
if (d->feedListView.GetSize() == 0)
@@ -387,13 +387,13 @@ void StorageMK4Impl::storeTagSet(const QString& xmlStr)
markDirty();
}
-QString StorageMK4Impl::restoreTagSet() const
+TQString StorageMK4Impl::restoreTagSet() const
{
if (d->feedListView.GetSize() == 0)
return "";
c4_Row row = d->feedListView.GetAt(0);
- return QString::fromUtf8(d->pTagSet(row));
+ return TQString::fromUtf8(d->pTagSet(row));
}
} // namespace Backend
diff --git a/akregator/src/mk4storage/storagemk4impl.h b/akregator/src/mk4storage/storagemk4impl.h
index 7b3a43783..bf50efc68 100644
--- a/akregator/src/mk4storage/storagemk4impl.h
+++ b/akregator/src/mk4storage/storagemk4impl.h
@@ -46,20 +46,20 @@ class StorageMK4Impl : public Storage
/** KGlobal::dirs()->saveLocation("data", "akregator")+"/Archive" */
- static QString defaultArchivePath();
+ static TQString defaultArchivePath();
/** sets the directory where the metakit files will be stored.
- @param archivePath the path to the archive, or QString::null to reset it to the default.
+ @param archivePath the path to the archive, or TQString::null to reset it to the default.
*/
- void setArchivePath(const QString& archivePath);
+ void setArchivePath(const TQString& archivePath);
/** returns the path to the metakit archives */
- QString archivePath() const;
+ TQString archivePath() const;
- virtual void initialize(const QStringList& params);
+ virtual void initialize(const TQStringList& params);
/**
* Open storage and prepare it for work.
* @return true on success.
@@ -87,22 +87,22 @@ class StorageMK4Impl : public Storage
/**
* @return Article archive for feed at given url.
*/
- virtual FeedStorage* archiveFor(const QString &url);
+ virtual FeedStorage* archiveFor(const TQString &url);
virtual bool autoCommit() const;
- virtual int unreadFor(const QString &url);
- virtual void setUnreadFor(const QString &url, int unread);
- virtual int totalCountFor(const QString &url);
- virtual void setTotalCountFor(const QString &url, int total);
- virtual int lastFetchFor(const QString& url);
- virtual void setLastFetchFor(const QString& url, int lastFetch);
+ virtual int unreadFor(const TQString &url);
+ virtual void setUnreadFor(const TQString &url, int unread);
+ virtual int totalCountFor(const TQString &url);
+ virtual void setTotalCountFor(const TQString &url, int total);
+ virtual int lastFetchFor(const TQString& url);
+ virtual void setLastFetchFor(const TQString& url, int lastFetch);
- virtual QStringList feeds() const;
+ virtual TQStringList feeds() const;
- virtual void storeFeedList(const QString& opmlStr);
- virtual QString restoreFeedList() const;
+ virtual void storeFeedList(const TQString& opmlStr);
+ virtual TQString restoreFeedList() const;
- virtual void storeTagSet(const QString& xmlStr);
- virtual QString restoreTagSet() const;
+ virtual void storeTagSet(const TQString& xmlStr);
+ virtual TQString restoreTagSet() const;
/** adds all feed storages from a source to this storage
existing articles are replaced
diff --git a/akregator/src/nodelist.cpp b/akregator/src/nodelist.cpp
index c59cb5c11..952428409 100644
--- a/akregator/src/nodelist.cpp
+++ b/akregator/src/nodelist.cpp
@@ -29,19 +29,19 @@
#include <kapplication.h>
-#include <qmap.h>
-#include <qstring.h>
-#include <qvaluelist.h>
+#include <tqmap.h>
+#include <tqstring.h>
+#include <tqvaluelist.h>
namespace Akregator {
class NodeList::NodeListPrivate
{
public:
- QValueList<TreeNode*> flatList;
+ TQValueList<TreeNode*> flatList;
Folder* rootNode;
- QString title;
- QMap<int, TreeNode*> idMap;
+ TQString title;
+ TQMap<int, TreeNode*> idMap;
AddNodeVisitor* addNodeVisitor;
RemoveNodeVisitor* removeNodeVisitor;
};
@@ -60,15 +60,15 @@ class NodeList::AddNodeVisitor : public TreeNodeVisitor
m_list->d->idMap[node->id()] = node;
m_list->d->flatList.append(node);
- connect(node, SIGNAL(signalDestroyed(TreeNode*)), m_list, SLOT(slotNodeDestroyed(TreeNode*) ));
+ connect(node, TQT_SIGNAL(signalDestroyed(TreeNode*)), m_list, TQT_SLOT(slotNodeDestroyed(TreeNode*) ));
m_list->signalNodeAdded(node); // emit
return true;
}
virtual bool visitFolder(Folder* node)
{
- connect(node, SIGNAL(signalChildAdded(TreeNode*)), m_list, SLOT(slotNodeAdded(TreeNode*) ));
- connect(node, SIGNAL(signalChildRemoved(Folder*, TreeNode*)), m_list, SLOT(slotNodeRemoved(Folder*, TreeNode*) ));
+ connect(node, TQT_SIGNAL(signalChildAdded(TreeNode*)), m_list, TQT_SLOT(slotNodeAdded(TreeNode*) ));
+ connect(node, TQT_SIGNAL(signalChildRemoved(Folder*, TreeNode*)), m_list, TQT_SLOT(slotNodeRemoved(Folder*, TreeNode*) ));
visitTreeNode(node);
@@ -99,7 +99,7 @@ class NodeList::RemoveNodeVisitor : public TreeNodeVisitor
m_list->d->idMap.remove(node->id());
m_list->d->flatList.remove(node);
- disconnect(node, SIGNAL(signalDestroyed(TreeNode*)), m_list, SLOT(slotNodeDestroyed(TreeNode*) ));
+ disconnect(node, TQT_SIGNAL(signalDestroyed(TreeNode*)), m_list, TQT_SLOT(slotNodeDestroyed(TreeNode*) ));
m_list->signalNodeRemoved(node); // emit signal
return true;
@@ -108,8 +108,8 @@ class NodeList::RemoveNodeVisitor : public TreeNodeVisitor
virtual bool visitFolder(Folder* node)
{
- disconnect(node, SIGNAL(signalChildAdded(TreeNode*)), m_list, SLOT(slotNodeAdded(TreeNode*) ));
- disconnect(node, SIGNAL(signalChildRemoved(Folder*, TreeNode*)), m_list, SLOT(slotNodeRemoved(Folder*, TreeNode*) ));
+ disconnect(node, TQT_SIGNAL(signalChildAdded(TreeNode*)), m_list, TQT_SLOT(slotNodeAdded(TreeNode*) ));
+ disconnect(node, TQT_SIGNAL(signalChildRemoved(Folder*, TreeNode*)), m_list, TQT_SLOT(slotNodeRemoved(Folder*, TreeNode*) ));
visitTreeNode(node);
return true;
@@ -118,7 +118,7 @@ class NodeList::RemoveNodeVisitor : public TreeNodeVisitor
NodeList* m_list;
};
-NodeList::NodeList(QObject *parent, const char *name) : d(new NodeListPrivate)
+NodeList::NodeList(TQObject *parent, const char *name) : d(new NodeListPrivate)
{
d->rootNode = 0;
d->addNodeVisitor = new AddNodeVisitor(this);
@@ -126,7 +126,7 @@ NodeList::NodeList(QObject *parent, const char *name) : d(new NodeListPrivate)
}
-const QString& NodeList::title() const
+const TQString& NodeList::title() const
{
return d->title;
}
@@ -136,7 +136,7 @@ TreeNode* NodeList::findByID(int id) const
return d->idMap[id];
}
-void NodeList::setTitle(const QString& title)
+void NodeList::setTitle(const TQString& title)
{
d->title = title;
}
@@ -146,7 +146,7 @@ Folder* NodeList::rootNode() const
return d->rootNode;
}
-const QValueList<TreeNode*>& NodeList::asFlatList() const
+const TQValueList<TreeNode*>& NodeList::asFlatList() const
{
return d->flatList;
}
@@ -156,7 +156,7 @@ bool NodeList::isEmpty() const
return d->rootNode->firstChild() == 0;
}
-QValueList<TreeNode*>* NodeList::flatList() const
+TQValueList<TreeNode*>* NodeList::flatList() const
{
return &(d->flatList);
}
@@ -165,13 +165,13 @@ void NodeList::clear()
{
Q_ASSERT(rootNode());
- QValueList<TreeNode*> children = rootNode()->children();
+ TQValueList<TreeNode*> children = rootNode()->children();
- for (QValueList<TreeNode*>::ConstIterator it = children.begin(); it != children.end(); ++it)
+ for (TQValueList<TreeNode*>::ConstIterator it = children.begin(); it != children.end(); ++it)
delete *it; // emits signal "emitSignalDestroyed"
}
-QMap<int, TreeNode*>* NodeList::idMap() const
+TQMap<int, TreeNode*>* NodeList::idMap() const
{
return &(d->idMap);
}
@@ -184,8 +184,8 @@ void NodeList::setRootNode(Folder* folder)
if (d->rootNode)
{
d->rootNode->setOpen(true);
- connect(d->rootNode, SIGNAL(signalChildAdded(TreeNode*)), this, SLOT(slotNodeAdded(TreeNode*)));
- connect(d->rootNode, SIGNAL(signalChildRemoved(Folder*, TreeNode*)), this, SLOT(slotNodeRemoved(Folder*, TreeNode*)));
+ connect(d->rootNode, TQT_SIGNAL(signalChildAdded(TreeNode*)), this, TQT_SLOT(slotNodeAdded(TreeNode*)));
+ connect(d->rootNode, TQT_SIGNAL(signalChildRemoved(Folder*, TreeNode*)), this, TQT_SLOT(slotNodeRemoved(Folder*, TreeNode*)));
}
}
diff --git a/akregator/src/nodelist.h b/akregator/src/nodelist.h
index 20a52fee9..d5b0024c0 100644
--- a/akregator/src/nodelist.h
+++ b/akregator/src/nodelist.h
@@ -25,7 +25,7 @@
#ifndef AKREGATOR_NODELIST_H
#define AKREGATOR_NODELIST_H
-#include <qobject.h>
+#include <tqobject.h>
class QDomDocument;
class QDomNode;
@@ -51,27 +51,27 @@ class NodeList : public QObject
Q_OBJECT
public:
- NodeList(QObject *parent=0, const char *name=0);
+ NodeList(TQObject *parent=0, const char *name=0);
virtual ~NodeList();
virtual Folder* rootNode() const;
- virtual bool readFromXML(const QDomDocument& doc) = 0;
+ virtual bool readFromXML(const TQDomDocument& doc) = 0;
- virtual QDomDocument toXML() const = 0;
+ virtual TQDomDocument toXML() const = 0;
virtual bool isEmpty() const;
TreeNode* findByID(int id) const;
/** returns the title of the feed list (as used in the OPML document) */
- const QString& title() const;
+ const TQString& title() const;
/** sets the title of the feed list */
- void setTitle(const QString& name);
+ void setTitle(const TQString& name);
/** returns a flat list containing all nodes in the tree */
- const QValueList<TreeNode*>& asFlatList() const;
+ const TQValueList<TreeNode*>& asFlatList() const;
signals:
void signalDestroyed(NodeList*);
@@ -90,8 +90,8 @@ public slots:
public: // compat with KDE-3.x assertions, remove for KDE 4
// protected:
- QValueList<TreeNode*>* flatList() const;
- QMap<int, TreeNode*>* idMap() const;
+ TQValueList<TreeNode*>* flatList() const;
+ TQMap<int, TreeNode*>* idMap() const;
int generateID();
void setRootNode(Folder* folder);
@@ -107,7 +107,7 @@ public slots: // compat with KDE-3.x assertions, remove for KDE 4
public: // compat with KDE-3.x assertions, remove for KDE 4
// private:
- NodeList(const NodeList&) : QObject() {}
+ NodeList(const NodeList&) : TQObject() {}
NodeList& operator=(const NodeList&) { return *this; }
friend class AddNodeVisitor;
diff --git a/akregator/src/notificationmanager.cpp b/akregator/src/notificationmanager.cpp
index ae1b2c886..b505b2b82 100644
--- a/akregator/src/notificationmanager.cpp
+++ b/akregator/src/notificationmanager.cpp
@@ -27,15 +27,15 @@
#include <kstaticdeleter.h>
#include <kurl.h>
-#include <qlabel.h>
-#include <qtimer.h>
+#include <tqlabel.h>
+#include <tqtimer.h>
#include "feed.h"
#include "notificationmanager.h"
namespace Akregator {
-NotificationManager::NotificationManager() : QObject()
+NotificationManager::NotificationManager() : TQObject()
{
m_intervalsLapsed = 0;
m_checkInterval = 2000;
@@ -52,7 +52,7 @@ NotificationManager::~NotificationManager()
m_self = 0;
}
-void NotificationManager::setWidget(QWidget* widget, KInstance* inst)
+void NotificationManager::setWidget(TQWidget* widget, KInstance* inst)
{
m_widget = widget;
m_instance = inst != NULL ? inst : KGlobal::instance();
@@ -67,11 +67,11 @@ void NotificationManager::slotNotifyArticle(const Article& article)
else if (!m_running)
{
m_running = true;
- QTimer::singleShot(m_checkInterval, this, SLOT(slotIntervalCheck()));
+ TQTimer::singleShot(m_checkInterval, this, TQT_SLOT(slotIntervalCheck()));
}
}
-void NotificationManager::slotNotifyFeeds(const QStringList& feeds)
+void NotificationManager::slotNotifyFeeds(const TQStringList& feeds)
{
if (feeds.count() == 1)
{
@@ -80,8 +80,8 @@ void NotificationManager::slotNotifyFeeds(const QStringList& feeds)
}
else if (feeds.count() > 1)
{
- QString message;
- for (QStringList::ConstIterator it = feeds.begin(); it != feeds.end(); ++it)
+ TQString message;
+ for (TQStringList::ConstIterator it = feeds.begin(); it != feeds.end(); ++it)
message += *it + "\n";
KNotifyClient::Instance inst(m_instance);
KNotifyClient::event(m_widget->winId(), "feed_added", i18n("Feeds added:\n %1").arg(message));
@@ -90,16 +90,16 @@ void NotificationManager::slotNotifyFeeds(const QStringList& feeds)
void NotificationManager::doNotify()
{
- QString message = "<html><body>";
- QString feedTitle;
- QValueList<Article>::ConstIterator it = m_articles.begin();
- QValueList<Article>::ConstIterator en = m_articles.end();
+ TQString message = "<html><body>";
+ TQString feedTitle;
+ TQValueList<Article>::ConstIterator it = m_articles.begin();
+ TQValueList<Article>::ConstIterator en = m_articles.end();
for (; it != en; ++it)
{
if (feedTitle != (*it).feed()->title())
{
feedTitle = (*it).feed()->title();
- message += QString("<p><b>%1:</b></p>").arg(feedTitle);
+ message += TQString("<p><b>%1:</b></p>").arg(feedTitle);
}
message += (*it).title() + "<br>";
}
@@ -123,7 +123,7 @@ void NotificationManager::slotIntervalCheck()
else
{
m_addedInLastInterval = false;
- QTimer::singleShot(m_checkInterval, this, SLOT(slotIntervalCheck()));
+ TQTimer::singleShot(m_checkInterval, this, TQT_SLOT(slotIntervalCheck()));
}
}
diff --git a/akregator/src/notificationmanager.h b/akregator/src/notificationmanager.h
index 5b274cef7..9a5430343 100644
--- a/akregator/src/notificationmanager.h
+++ b/akregator/src/notificationmanager.h
@@ -25,7 +25,7 @@
#ifndef AKREGATORNOTIFICATIONMANAGER_H
#define AKREGATORNOTIFICATIONMANAGER_H
-#include <qobject.h>
+#include <tqobject.h>
#include "article.h"
@@ -43,7 +43,7 @@ class NotificationManager : public QObject
~NotificationManager();
/** the widget used for notification, normally either the mainwindow or the tray icon */
- void setWidget(QWidget* widget, KInstance* inst=0);
+ void setWidget(TQWidget* widget, KInstance* inst=0);
public slots:
@@ -52,7 +52,7 @@ class NotificationManager : public QObject
void slotNotifyArticle(const Article& article);
/** notifies the addition of feeds (used when added via DCOP or command line) */
- void slotNotifyFeeds(const QStringList& feeds);
+ void slotNotifyFeeds(const TQStringList& feeds);
protected:
@@ -64,7 +64,7 @@ class NotificationManager : public QObject
private:
NotificationManager();
- NotificationManager(const NotificationManager&) : QObject(){}
+ NotificationManager(const NotificationManager&) : TQObject(){}
uint m_checkInterval;
uint m_intervalsLapsed;
@@ -72,10 +72,10 @@ class NotificationManager : public QObject
uint m_maxArticles;
bool m_running;
bool m_addedInLastInterval;
- QWidget* m_widget;
+ TQWidget* m_widget;
KInstance* m_instance;
- QValueList<Article> m_articles;
+ TQValueList<Article> m_articles;
static NotificationManager* m_self;
};
diff --git a/akregator/src/pageviewer.cpp b/akregator/src/pageviewer.cpp
index 1a10b4953..9f1e5591c 100644
--- a/akregator/src/pageviewer.cpp
+++ b/akregator/src/pageviewer.cpp
@@ -44,15 +44,15 @@
#include <kstdaccel.h>
#include <kparts/browserinterface.h>
-#include <qclipboard.h>
-#include <qcstring.h>
-#include <qdatastream.h>
-#include <qdatetime.h>
-#include <qfile.h>
-#include <qmetaobject.h>
-#include <qscrollview.h>
-#include <qstring.h>
-#include <qvaluelist.h>
+#include <tqclipboard.h>
+#include <tqcstring.h>
+#include <tqdatastream.h>
+#include <tqdatetime.h>
+#include <tqfile.h>
+#include <tqmetaobject.h>
+#include <tqscrollview.h>
+#include <tqstring.h>
+#include <tqvaluelist.h>
#include <private/qucomextra_p.h>
#include <cstdlib>
@@ -67,14 +67,14 @@ class PageViewer::HistoryEntry
public:
KURL url;
- QString title;
- QByteArray state;
+ TQString title;
+ TQByteArray state;
int id;
HistoryEntry() {}
- HistoryEntry(const KURL& u, const QString& t=QString::null): url(u), title(t)
+ HistoryEntry(const KURL& u, const TQString& t=TQString::null): url(u), title(t)
{
- id = abs( QTime::currentTime().msecsTo( QTime() ) ); // nasty, but should provide a reasonably unique number
+ id = abs( TQTime::currentTime().msecsTo( TQTime() ) ); // nasty, but should provide a reasonably unique number
}
};
@@ -83,19 +83,19 @@ class PageViewer::PageViewerPrivate
{
public:
- QValueList<HistoryEntry> history;
- QValueList<HistoryEntry>::Iterator current;
+ TQValueList<HistoryEntry> history;
+ TQValueList<HistoryEntry>::Iterator current;
KToolBarPopupAction* backAction;
KToolBarPopupAction* forwardAction;
KAction* reloadAction;
KAction* stopAction;
- QString caption;
+ TQString caption;
};
-PageViewer::PageViewer(QWidget *parent, const char *name)
+PageViewer::PageViewer(TQWidget *parent, const char *name)
: Viewer(parent, name), d(new PageViewerPrivate)
{
// this hack is necessary since the part looks for []HTML Settings] in
@@ -109,44 +109,44 @@ PageViewer::PageViewer(QWidget *parent, const char *name)
d->backAction = new KToolBarPopupAction(backForward.first,
KStdAccel::shortcut(KStdAccel::Back), this,
- SLOT(slotBack()), actionCollection(),
+ TQT_SLOT(slotBack()), actionCollection(),
"pageviewer_back");
- connect(d->backAction->popupMenu(), SIGNAL(aboutToShow()),
- this, SLOT(slotBackAboutToShow()));
- connect(d->backAction->popupMenu(), SIGNAL(activated(int)),
- this, SLOT(slotPopupActivated(int)));
+ connect(d->backAction->popupMenu(), TQT_SIGNAL(aboutToShow()),
+ this, TQT_SLOT(slotBackAboutToShow()));
+ connect(d->backAction->popupMenu(), TQT_SIGNAL(activated(int)),
+ this, TQT_SLOT(slotPopupActivated(int)));
d->forwardAction = new KToolBarPopupAction(backForward.second,
KStdAccel::shortcut(KStdAccel::Forward),this,
- SLOT(slotForward()), actionCollection(),
+ TQT_SLOT(slotForward()), actionCollection(),
"pageviewer_forward");
- connect(d->forwardAction->popupMenu(), SIGNAL(aboutToShow()),
- this, SLOT(slotForwardAboutToShow()));
- connect(d->forwardAction->popupMenu(), SIGNAL(activated(int)),
- this, SLOT(slotPopupActivated(int)));
+ connect(d->forwardAction->popupMenu(), TQT_SIGNAL(aboutToShow()),
+ this, TQT_SLOT(slotForwardAboutToShow()));
+ connect(d->forwardAction->popupMenu(), TQT_SIGNAL(activated(int)),
+ this, TQT_SLOT(slotPopupActivated(int)));
d->reloadAction = new KAction(i18n("Reload"), "reload", 0,
- this, SLOT(slotReload()),
+ this, TQT_SLOT(slotReload()),
actionCollection(), "pageviewer_reload");
d->stopAction = new KAction(KStdGuiItem::guiItem(KStdGuiItem::Stop), 0,
- this, SLOT(slotStop()),
+ this, TQT_SLOT(slotStop()),
actionCollection(), "pageviewer_stop");
- //connect( this, SIGNAL(popupMenu(const QString &, const QPoint &)), this, SLOT(slotPopupMenu(const QString &, const QPoint &)));
+ //connect( this, TQT_SIGNAL(popupMenu(const TQString &, const TQPoint &)), this, TQT_SLOT(slotPopupMenu(const TQString &, const TQPoint &)));
d->backAction->setEnabled(false);
d->forwardAction->setEnabled(false);
d->stopAction->setEnabled(false);
- connect( this, SIGNAL(setWindowCaption (const QString &)),
- this, SLOT(slotSetCaption (const QString &)) );
+ connect( this, TQT_SIGNAL(setWindowCaption (const TQString &)),
+ this, TQT_SLOT(slotSetCaption (const TQString &)) );
- connect(this, SIGNAL(started(KIO::Job *)), this, SLOT(slotStarted(KIO::Job* )));
- connect(this, SIGNAL(completed()), this, SLOT(slotCompleted()));
- connect(this, SIGNAL(canceled(const QString &)), this, SLOT(slotCancelled(const QString &)));
+ connect(this, TQT_SIGNAL(started(KIO::Job *)), this, TQT_SLOT(slotStarted(KIO::Job* )));
+ connect(this, TQT_SIGNAL(completed()), this, TQT_SLOT(slotCompleted()));
+ connect(this, TQT_SIGNAL(canceled(const TQString &)), this, TQT_SLOT(slotCancelled(const TQString &)));
d->current = d->history.end();
@@ -166,7 +166,7 @@ void PageViewer::slotBack()
{
if ( d->current != d->history.begin() )
{
- QValueList<HistoryEntry>::Iterator tmp = d->current;
+ TQValueList<HistoryEntry>::Iterator tmp = d->current;
--tmp;
restoreHistoryEntry(tmp);
}
@@ -177,7 +177,7 @@ void PageViewer::slotForward()
{
if ( d->current != d->history.fromLast() && d->current != d->history.end() )
{
- QValueList<HistoryEntry>::Iterator tmp = d->current;
+ TQValueList<HistoryEntry>::Iterator tmp = d->current;
++tmp;
restoreHistoryEntry(tmp);
}
@@ -191,7 +191,7 @@ void PageViewer::slotBackAboutToShow()
if ( d->current == d->history.begin() )
return;
- QValueList<HistoryEntry>::Iterator it = d->current;
+ TQValueList<HistoryEntry>::Iterator it = d->current;
--it;
int i = 0;
@@ -217,7 +217,7 @@ void PageViewer::slotForwardAboutToShow()
if ( d->current == d->history.fromLast() )
return;
- QValueList<HistoryEntry>::Iterator it = d->current;
+ TQValueList<HistoryEntry>::Iterator it = d->current;
++it;
int i = 0;
@@ -258,9 +258,9 @@ bool PageViewer::openURL(const KURL& url)
d->backAction->setEnabled( d->current != d->history.begin() );
d->forwardAction->setEnabled( d->current != d->history.fromLast() );
- QString favicon = FeedIconManager::self()->iconLocation(url);
+ TQString favicon = FeedIconManager::self()->iconLocation(url);
if (!favicon.isEmpty())
- emit setTabIcon(QPixmap(KGlobal::dirs()->findResource("cache", favicon+".png")));
+ emit setTabIcon(TQPixmap(KGlobal::dirs()->findResource("cache", favicon+".png")));
else
emit setTabIcon(SmallIcon("html"));
@@ -281,7 +281,7 @@ void PageViewer::slotOpenURLRequest(const KURL& url, const KParts::URLArgs& args
void PageViewer::slotPopupActivated( int id )
{
- QValueList<HistoryEntry>::Iterator it = d->history.begin();
+ TQValueList<HistoryEntry>::Iterator it = d->history.begin();
while( it != d->history.end() )
{
if ( (*it).id == id )
@@ -296,16 +296,16 @@ void PageViewer::slotPopupActivated( int id )
void PageViewer::updateHistoryEntry()
{
(*d->current).title = d->caption;
- (*d->current).state = QByteArray(); // Start with empty buffer.
- QDataStream stream( (*d->current).state, IO_WriteOnly);
+ (*d->current).state = TQByteArray(); // Start with empty buffer.
+ TQDataStream stream( (*d->current).state, IO_WriteOnly);
browserExtension()->saveState(stream);
}
-void PageViewer::restoreHistoryEntry(const QValueList<HistoryEntry>::Iterator& entry)
+void PageViewer::restoreHistoryEntry(const TQValueList<HistoryEntry>::Iterator& entry)
{
updateHistoryEntry();
- QDataStream stream( (*entry).state, IO_ReadOnly );
+ TQDataStream stream( (*entry).state, IO_ReadOnly );
browserExtension()->restoreState( stream );
d->current = entry;
d->backAction->setEnabled( d->current != d->history.begin() );
@@ -318,7 +318,7 @@ void PageViewer::restoreHistoryEntry(const QValueList<HistoryEntry>::Iterator& e
// Taken from KDevelop (lib/widgets/kdevhtmlpart.cpp)
void PageViewer::addHistoryEntry(const KURL& url)
{
- QValueList<HistoryEntry>::Iterator it = d->current;
+ TQValueList<HistoryEntry>::Iterator it = d->current;
// if We're not already the last entry, we truncate the list here before adding an entry
if ( it != d->history.end() && it != d->history.fromLast() )
@@ -349,14 +349,14 @@ void PageViewer::slotCompleted( )
}
// Taken from KDevelop (lib/widgets/kdevhtmlpart.cpp)
-void PageViewer::slotCancelled( const QString & /*errMsg*/ )
+void PageViewer::slotCancelled( const TQString & /*errMsg*/ )
{
d->stopAction->setEnabled(false);
}
-void PageViewer::urlSelected(const QString &url, int button, int state, const QString &_target, KParts::URLArgs args)
+void PageViewer::urlSelected(const TQString &url, int button, int state, const TQString &_target, KParts::URLArgs args)
{
- if (url.startsWith(QString::fromLatin1( "javascript:" ), /*case-sensitive=*/false) )
+ if (url.startsWith(TQString::fromLatin1( "javascript:" ), /*case-sensitive=*/false) )
{
KHTMLPart::urlSelected(url,button,state,_target,args);
}
@@ -375,7 +375,7 @@ void PageViewer::urlSelected(const QString &url, int button, int state, const QS
}
}
-void PageViewer::slotSetCaption(const QString& cap)
+void PageViewer::slotSetCaption(const TQString& cap)
{
d->caption = cap;
(*d->current).title = cap;
@@ -386,7 +386,7 @@ void PageViewer::slotPaletteOrFontChanged()
kdDebug() << "PageViewer::slotPaletteOrFontChanged()" << endl;
// taken from KonqView (kdebase/konqueror/konq_view.cc)
- QObject *obj = KParts::BrowserExtension::childObject(this);
+ TQObject *obj = KParts::BrowserExtension::childObject(this);
if ( !obj ) // not all views have a browser extension !
return;
@@ -414,10 +414,10 @@ void PageViewer::slotGlobalBookmarkArticle()
}
-void PageViewer::slotPopupMenu(KXMLGUIClient*, const QPoint& p, const KURL& kurl, const KParts::URLArgs&, KParts::BrowserExtension::PopupFlags kpf, mode_t)
+void PageViewer::slotPopupMenu(KXMLGUIClient*, const TQPoint& p, const KURL& kurl, const KParts::URLArgs&, KParts::BrowserExtension::PopupFlags kpf, mode_t)
{
m_url = kurl;
- QString url = kurl.url(); // maximal url confusion
+ TQString url = kurl.url(); // maximal url confusion
const bool showReload = (kpf & KParts::BrowserExtension::ShowReload) != 0;
const bool showNavigationItems = (kpf & KParts::BrowserExtension::ShowNavigationItems) != 0;
@@ -429,9 +429,9 @@ void PageViewer::slotPopupMenu(KXMLGUIClient*, const QPoint& p, const KURL& kurl
int idNewWindow = -2;
if (isLink)
{
- idNewWindow = popup.insertItem(SmallIcon("tab_new"),i18n("Open Link in New &Tab"), this, SLOT(slotOpenLinkInForegroundTab()));
+ idNewWindow = popup.insertItem(SmallIcon("tab_new"),i18n("Open Link in New &Tab"), this, TQT_SLOT(slotOpenLinkInForegroundTab()));
popup.setWhatsThis(idNewWindow, i18n("<b>Open Link in New Tab</b><p>Opens current link in a new tab."));
- popup.insertItem(SmallIcon("window_new"), i18n("Open Link in External &Browser"), this, SLOT(slotOpenLinkInBrowser()));
+ popup.insertItem(SmallIcon("window_new"), i18n("Open Link in External &Browser"), this, TQT_SLOT(slotOpenLinkInBrowser()));
popup.insertSeparator();
action("savelinkas")->plug(&popup);
@@ -472,7 +472,7 @@ void PageViewer::slotPopupMenu(KXMLGUIClient*, const QPoint& p, const KURL& kurl
popup.insertSeparator();
}
- popup.insertItem(SmallIcon("window_new"), i18n("Open Page in External Browser"), this, SLOT(slotOpenLinkInBrowser()));
+ popup.insertItem(SmallIcon("window_new"), i18n("Open Page in External Browser"), this, TQT_SLOT(slotOpenLinkInBrowser()));
action("viewer_print")->plug(&popup);
popup.insertSeparator();
@@ -480,7 +480,7 @@ void PageViewer::slotPopupMenu(KXMLGUIClient*, const QPoint& p, const KURL& kurl
KAction *ac = action("setEncoding");
if (ac)
ac->plug(&popup);
- popup.insertItem(SmallIcon("bookmark_add"),i18n("Add to Konqueror Bookmarks"), this, SLOT(slotGlobalBookmarkArticle()));
+ popup.insertItem(SmallIcon("bookmark_add"),i18n("Add to Konqueror Bookmarks"), this, TQT_SLOT(slotGlobalBookmarkArticle()));
}
int r = popup.exec(p);
diff --git a/akregator/src/pageviewer.h b/akregator/src/pageviewer.h
index 68001d80c..357f5a4ac 100644
--- a/akregator/src/pageviewer.h
+++ b/akregator/src/pageviewer.h
@@ -41,7 +41,7 @@ namespace Akregator
{
Q_OBJECT
public:
- PageViewer(QWidget* parent, const char* name);
+ PageViewer(TQWidget* parent, const char* name);
virtual ~PageViewer();
virtual bool openURL(const KURL &url);
@@ -49,12 +49,12 @@ namespace Akregator
class HistoryEntry;
void addHistoryEntry(const KURL& url);
- void restoreHistoryEntry(const QValueList<HistoryEntry>::Iterator& entry);
+ void restoreHistoryEntry(const TQValueList<HistoryEntry>::Iterator& entry);
void updateHistoryEntry();
protected slots:
- void slotSetCaption(const QString& cap);
+ void slotSetCaption(const TQString& cap);
void slotBack();
void slotForward();
void slotReload();
@@ -64,19 +64,19 @@ namespace Akregator
void slotStarted(KIO::Job *);
void slotCompleted();
- void slotCancelled(const QString &errMsg);
+ void slotCancelled(const TQString &errMsg);
void slotBackAboutToShow();
void slotForwardAboutToShow();
void slotPopupActivated( int id );
- virtual void slotPopupMenu(KXMLGUIClient*, const QPoint&, const KURL&, const KParts::URLArgs&, KParts::BrowserExtension::PopupFlags, mode_t);
+ virtual void slotPopupMenu(KXMLGUIClient*, const TQPoint&, const KURL&, const KParts::URLArgs&, KParts::BrowserExtension::PopupFlags, mode_t);
void slotGlobalBookmarkArticle();
virtual void slotOpenURLRequest(const KURL& url, const KParts::URLArgs& args);
- virtual void urlSelected(const QString &url, int button, int state, const QString &_target, KParts::URLArgs args);
+ virtual void urlSelected(const TQString &url, int button, int state, const TQString &_target, KParts::URLArgs args);
signals:
- void setTabIcon(const QPixmap&);
+ void setTabIcon(const TQPixmap&);
private:
class PageViewerPrivate;
diff --git a/akregator/src/plugin.cpp b/akregator/src/plugin.cpp
index ad3825ba9..9b413f5cc 100644
--- a/akregator/src/plugin.cpp
+++ b/akregator/src/plugin.cpp
@@ -16,14 +16,14 @@ Plugin::~Plugin()
void
-Plugin::addPluginProperty( const QString& key, const QString& value )
+Plugin::addPluginProperty( const TQString& key, const TQString& value )
{
m_properties[key.lower()] = value;
}
QString
-Plugin::pluginProperty( const QString& key )
+Plugin::pluginProperty( const TQString& key )
{
if ( m_properties.find( key.lower() ) == m_properties.end() )
return "false";
@@ -33,7 +33,7 @@ Plugin::pluginProperty( const QString& key )
bool
-Plugin::hasPluginProperty( const QString& key )
+Plugin::hasPluginProperty( const TQString& key )
{
return m_properties.find( key.lower() ) != m_properties.end();
}
diff --git a/akregator/src/plugin.h b/akregator/src/plugin.h
index ed10bf200..650a4a924 100644
--- a/akregator/src/plugin.h
+++ b/akregator/src/plugin.h
@@ -11,8 +11,8 @@
Akregator::Plugin* create_plugin() { return new classname; } \
}
-#include <qmap.h>
-#include <qstring.h>
+#include <tqmap.h>
+#include <tqstring.h>
namespace Akregator
@@ -29,18 +29,18 @@ namespace Akregator
* TODO @param parent you must parent the widget to parent
* @return the configure widget for your plugin, create it on the heap!
*/
- //TODO rename configureWidget( QWidget *parent )
+ //TODO rename configureWidget( TQWidget *parent )
// virtual PluginConfig* configure() const { return 0; }
- void addPluginProperty( const QString& key, const QString& value );
- QString pluginProperty( const QString& key );
- bool hasPluginProperty( const QString& key );
+ void addPluginProperty( const TQString& key, const TQString& value );
+ TQString pluginProperty( const TQString& key );
+ bool hasPluginProperty( const TQString& key );
protected:
Plugin();
private:
- QMap<QString, QString> m_properties;
+ TQMap<TQString, TQString> m_properties;
};
} //namespace Akregator
diff --git a/akregator/src/pluginmanager.cpp b/akregator/src/pluginmanager.cpp
index db6c70117..83e746f8f 100644
--- a/akregator/src/pluginmanager.cpp
+++ b/akregator/src/pluginmanager.cpp
@@ -18,8 +18,8 @@ email : markey@web.de
#include <vector>
-#include <qfile.h>
-#include <qstring.h>
+#include <tqfile.h>
+#include <tqstring.h>
#include <klibloader.h>
#include <kdebug.h>
@@ -40,12 +40,12 @@ PluginManager::m_store;
/////////////////////////////////////////////////////////////////////////////////////
KTrader::OfferList
-PluginManager::query( const QString& constraint )
+PluginManager::query( const TQString& constraint )
{
// Add versioning constraint
QString
str = "[X-KDE-akregator-framework-version] == ";
- str += QString::number( FrameworkVersion );
+ str += TQString::number( FrameworkVersion );
str += " and ";
if (!constraint.stripWhiteSpace().isEmpty())
str += constraint + " and ";
@@ -58,7 +58,7 @@ PluginManager::query( const QString& constraint )
Plugin*
-PluginManager::createFromQuery( const QString &constraint )
+PluginManager::createFromQuery( const TQString &constraint )
{
KTrader::OfferList offers = query( constraint );
@@ -87,7 +87,7 @@ PluginManager::createFromService( const KService::Ptr service )
//get the library loader instance
KLibLoader *loader = KLibLoader::self();
//try to load the specified library
- KLibrary *lib = loader->globalLibrary( QFile::encodeName( service->library() ) );
+ KLibrary *lib = loader->globalLibrary( TQFile::encodeName( service->library() ) );
if ( !lib ) {
KMessageBox::error( 0, i18n( "<p>KLibLoader could not load the plugin:<br/><i>%1</i></p>"
@@ -154,7 +154,7 @@ PluginManager::getService( const Plugin* plugin )
void
-PluginManager::showAbout( const QString &constraint )
+PluginManager::showAbout( const TQString &constraint )
{
KTrader::OfferList offers = query( constraint );
@@ -163,9 +163,9 @@ PluginManager::showAbout( const QString &constraint )
KService::Ptr s = offers.front();
- const QString body = "<tr><td>%1</td><td>%2</td></tr>";
+ const TQString body = "<tr><td>%1</td><td>%2</td></tr>";
- QString str = "<html><body><table width=\"100%\" border=\"1\">";
+ TQString str = "<html><body><table width=\"100%\" border=\"1\">";
str += body.arg( i18n( "Name" ), s->name() );
str += body.arg( i18n( "Library" ), s->library() );
diff --git a/akregator/src/pluginmanager.h b/akregator/src/pluginmanager.h
index 15d0c253e..ca97753f4 100644
--- a/akregator/src/pluginmanager.h
+++ b/akregator/src/pluginmanager.h
@@ -49,22 +49,22 @@ class PluginManager
* The keys used in the query (Type, ServiceType, Exec) are all
* fields found in the .desktop files.
*
- * @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
*
* @return A list of services that satisfy the query
* @see http://developer.kde.org/documentation/library/kdeqt/tradersyntax.html
*/
- static KTrader::OfferList query( const QString& constraint = QString::null );
+ static KTrader::OfferList query( const TQString& constraint = TQString::null );
/**
* Load and instantiate plugin from query
- * @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
* @return Pointer to Plugin, or NULL if error
* @see http://developer.kde.org/documentation/library/kdeqt/tradersyntax.html
*/
- static Akregator::Plugin* createFromQuery( const QString& constraint = QString::null );
+ static Akregator::Plugin* createFromQuery( const TQString& constraint = TQString::null );
/**
* Load and instantiate plugin from service
@@ -96,7 +96,7 @@ class PluginManager
* Show modal info dialog about plugin
* @param constraint A constraint to limit the choices returned
*/
- static void showAbout( const QString& constraint );
+ static void showAbout( const TQString& constraint );
private:
struct StoreItem {
diff --git a/akregator/src/progressmanager.cpp b/akregator/src/progressmanager.cpp
index 201cf5b6d..6146ddd86 100644
--- a/akregator/src/progressmanager.cpp
+++ b/akregator/src/progressmanager.cpp
@@ -22,8 +22,8 @@
without including the source code for Qt in the source distribution.
*/
-#include <qmap.h>
-#include <qstylesheet.h>
+#include <tqmap.h>
+#include <tqstylesheet.h>
#include <klocale.h>
#include <kstaticdeleter.h>
@@ -44,7 +44,7 @@ class ProgressManager::ProgressManagerPrivate
{
public:
FeedList* feedList;
- QMap<Feed*, ProgressItemHandler*> handlers;
+ TQMap<Feed*, ProgressItemHandler*> handlers;
};
@@ -76,24 +76,24 @@ void ProgressManager::setFeedList(FeedList* feedList)
if (d->feedList != 0)
{
- for (QMap<Feed*, ProgressItemHandler*>::ConstIterator it = d->handlers.begin(); it != d->handlers.end(); ++it)
+ for (TQMap<Feed*, ProgressItemHandler*>::ConstIterator it = d->handlers.begin(); it != d->handlers.end(); ++it)
delete *it;
d->handlers.clear();
- disconnect(d->feedList, SIGNAL(signalNodeAdded(TreeNode*)), this, SLOT(slotNodeAdded(TreeNode*)));
- disconnect(d->feedList, SIGNAL(signalNodeRemoved(TreeNode*)), this, SLOT(slotNodeRemoved(TreeNode*)));
+ disconnect(d->feedList, TQT_SIGNAL(signalNodeAdded(TreeNode*)), this, TQT_SLOT(slotNodeAdded(TreeNode*)));
+ disconnect(d->feedList, TQT_SIGNAL(signalNodeRemoved(TreeNode*)), this, TQT_SLOT(slotNodeRemoved(TreeNode*)));
}
d->feedList = feedList;
if (feedList != 0)
{
- QValueList<TreeNode*> list = feedList->asFlatList();
+ TQValueList<TreeNode*> list = feedList->asFlatList();
- for (QValueList<TreeNode*>::ConstIterator it = list.begin(); it != list.end(); ++it)
+ for (TQValueList<TreeNode*>::ConstIterator it = list.begin(); it != list.end(); ++it)
slotNodeAdded(*it);
- connect(feedList, SIGNAL(signalNodeAdded(TreeNode*)), this, SLOT(slotNodeAdded(TreeNode*)));
- connect(feedList, SIGNAL(signalNodeRemoved(TreeNode*)), this, SLOT(slotNodeRemoved(TreeNode*)));
+ connect(feedList, TQT_SIGNAL(signalNodeAdded(TreeNode*)), this, TQT_SLOT(slotNodeAdded(TreeNode*)));
+ connect(feedList, TQT_SIGNAL(signalNodeRemoved(TreeNode*)), this, TQT_SLOT(slotNodeRemoved(TreeNode*)));
}
}
@@ -104,7 +104,7 @@ void ProgressManager::slotNodeAdded(TreeNode* node)
{
if (!d->handlers.contains(feed))
d->handlers[feed] = new ProgressItemHandler(feed);
- connect(feed, SIGNAL(signalDestroyed(TreeNode*)), this, SLOT(slotNodeDestroyed(TreeNode*)));
+ connect(feed, TQT_SIGNAL(signalDestroyed(TreeNode*)), this, TQT_SLOT(slotNodeDestroyed(TreeNode*)));
}
}
@@ -113,7 +113,7 @@ void ProgressManager::slotNodeRemoved(TreeNode* node)
Feed* feed = dynamic_cast<Feed*>(node);
if (feed)
{
- disconnect(feed, SIGNAL(signalDestroyed(TreeNode*)), this, SLOT(slotNodeDestroyed(TreeNode*)));
+ disconnect(feed, TQT_SIGNAL(signalDestroyed(TreeNode*)), this, TQT_SLOT(slotNodeDestroyed(TreeNode*)));
delete d->handlers[feed];
d->handlers.remove(feed);
}
@@ -142,10 +142,10 @@ ProgressItemHandler::ProgressItemHandler(Feed* feed) : d(new ProgressItemHandler
d->feed = feed;
d->progressItem = 0;
- connect(feed, SIGNAL(fetchStarted(Feed*)), this, SLOT(slotFetchStarted()));
- connect(feed, SIGNAL(fetched(Feed*)), this, SLOT(slotFetchCompleted()));
- connect(feed, SIGNAL(fetchError(Feed*)), this, SLOT(slotFetchError()));
- connect(feed, SIGNAL(fetchAborted(Feed*)), this, SLOT(slotFetchAborted()));
+ connect(feed, TQT_SIGNAL(fetchStarted(Feed*)), this, TQT_SLOT(slotFetchStarted()));
+ connect(feed, TQT_SIGNAL(fetched(Feed*)), this, TQT_SLOT(slotFetchCompleted()));
+ connect(feed, TQT_SIGNAL(fetchError(Feed*)), this, TQT_SLOT(slotFetchError()));
+ connect(feed, TQT_SIGNAL(fetchAborted(Feed*)), this, TQT_SLOT(slotFetchAborted()));
}
ProgressItemHandler::~ProgressItemHandler()
@@ -168,9 +168,9 @@ void ProgressItemHandler::slotFetchStarted()
d->progressItem = 0;
}
- d->progressItem = KPIM::ProgressManager::createProgressItem(KPIM::ProgressManager::getUniqueID(), QStyleSheet::escape( d->feed->title() ), QString::null, true);
+ d->progressItem = KPIM::ProgressManager::createProgressItem(KPIM::ProgressManager::getUniqueID(), TQStyleSheet::escape( d->feed->title() ), TQString::null, true);
- connect(d->progressItem, SIGNAL(progressItemCanceled(KPIM::ProgressItem*)), d->feed, SLOT(slotAbortFetch()));
+ connect(d->progressItem, TQT_SIGNAL(progressItemCanceled(KPIM::ProgressItem*)), d->feed, TQT_SLOT(slotAbortFetch()));
}
diff --git a/akregator/src/propertiesdialog.cpp b/akregator/src/propertiesdialog.cpp
index cd63c2045..28ee7858d 100644
--- a/akregator/src/propertiesdialog.cpp
+++ b/akregator/src/propertiesdialog.cpp
@@ -32,13 +32,13 @@
#include <klocale.h>
#include <knuminput.h>
-#include <qcheckbox.h>
-#include <qbuttongroup.h>
-#include <qradiobutton.h>
+#include <tqcheckbox.h>
+#include <tqbuttongroup.h>
+#include <tqradiobutton.h>
namespace Akregator {
-FeedPropertiesWidget::FeedPropertiesWidget(QWidget *parent, const char *name)
+FeedPropertiesWidget::FeedPropertiesWidget(TQWidget *parent, const char *name)
: FeedPropertiesWidgetBase(parent, name)
{
}
@@ -65,14 +65,14 @@ void FeedPropertiesWidget::slotUpdateCheckBoxToggled( bool enabled )
}
-FeedPropertiesDialog::FeedPropertiesDialog(QWidget *parent, const char *name)
+FeedPropertiesDialog::FeedPropertiesDialog(TQWidget *parent, const char *name)
: KDialogBase(KDialogBase::Swallow, Qt::WStyle_DialogBorder, parent, name, true, i18n("Feed Properties"), KDialogBase::Ok|KDialogBase::Cancel)
{
widget=new FeedPropertiesWidget(this);
setMainWidget(widget);
widget->feedNameEdit->setFocus();
- connect(widget->feedNameEdit, SIGNAL(textChanged(const QString&)), this, SLOT(slotSetCaption(const QString&)));
+ connect(widget->feedNameEdit, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(slotSetCaption(const TQString&)));
}
FeedPropertiesDialog::~FeedPropertiesDialog()
@@ -97,7 +97,7 @@ void FeedPropertiesDialog::slotOk()
KDialogBase::slotOk();
}
-void FeedPropertiesDialog::slotSetCaption(const QString& c)
+void FeedPropertiesDialog::slotSetCaption(const TQString& c)
{
if(c.isEmpty())
setCaption(i18n("Feed Properties"));
@@ -129,12 +129,12 @@ void FeedPropertiesDialog::setFeed(Feed* feed)
}
-const QString FeedPropertiesDialog::feedName() const
+const TQString FeedPropertiesDialog::feedName() const
{
return widget->feedNameEdit->text();
}
-const QString FeedPropertiesDialog::url() const
+const TQString FeedPropertiesDialog::url() const
{
return widget->urlEdit->text();
}
@@ -213,12 +213,12 @@ void FeedPropertiesDialog::setArchiveMode(Feed::ArchiveMode mode)
widget->rb_limitArticleNumber->setChecked(true);
}
}
-void FeedPropertiesDialog::setFeedName(const QString& title)
+void FeedPropertiesDialog::setFeedName(const TQString& title)
{
widget->feedNameEdit->setText(title);
}
-void FeedPropertiesDialog::setUrl(const QString& url)
+void FeedPropertiesDialog::setUrl(const TQString& url)
{
widget->urlEdit->setText(url);
}
diff --git a/akregator/src/propertiesdialog.h b/akregator/src/propertiesdialog.h
index 234df190a..f6f853760 100644
--- a/akregator/src/propertiesdialog.h
+++ b/akregator/src/propertiesdialog.h
@@ -34,7 +34,7 @@ namespace Akregator
{
Q_OBJECT
public:
- FeedPropertiesWidget(QWidget *parent = 0, const char *name = 0);
+ FeedPropertiesWidget(TQWidget *parent = 0, const char *name = 0);
~FeedPropertiesWidget();
virtual void slotUpdateComboBoxActivated(int index);
virtual void slotUpdateCheckBoxToggled(bool enabled);
@@ -45,7 +45,7 @@ namespace Akregator
{
Q_OBJECT
public:
- FeedPropertiesDialog(QWidget *parent = 0, const char *name = 0);
+ FeedPropertiesDialog(TQWidget *parent = 0, const char *name = 0);
~FeedPropertiesDialog();
void setFeed(Feed* feed);
@@ -54,8 +54,8 @@ namespace Akregator
void selectFeedName();
protected:
- const QString feedName() const;
- const QString url() const;
+ const TQString feedName() const;
+ const TQString url() const;
bool autoFetch() const;
int fetchInterval() const;
Feed::ArchiveMode archiveMode() const;
@@ -65,8 +65,8 @@ namespace Akregator
bool useNotification() const;
bool loadLinkedWebsite() const;
- void setFeedName(const QString& title);
- void setUrl(const QString& url);
+ void setFeedName(const TQString& title);
+ void setUrl(const TQString& url);
void setAutoFetch(bool);
void setFetchInterval(int);
void setArchiveMode(Feed::ArchiveMode mode);
@@ -84,7 +84,7 @@ namespace Akregator
Feed* m_feed;
private slots:
- void slotSetCaption(const QString&);
+ void slotSetCaption(const TQString&);
};
}
diff --git a/akregator/src/searchbar.cpp b/akregator/src/searchbar.cpp
index d565c2847..eb5b7cff7 100644
--- a/akregator/src/searchbar.cpp
+++ b/akregator/src/searchbar.cpp
@@ -33,14 +33,14 @@
#include <klocale.h>
#include <kstandarddirs.h>
-#include <qapplication.h>
-#include <qhbox.h>
-#include <qlabel.h>
-#include <qpixmap.h>
-#include <qstring.h>
-#include <qtimer.h>
-#include <qtoolbutton.h>
-#include <qtooltip.h>
+#include <tqapplication.h>
+#include <tqhbox.h>
+#include <tqlabel.h>
+#include <tqpixmap.h>
+#include <tqstring.h>
+#include <tqtimer.h>
+#include <tqtoolbutton.h>
+#include <tqtooltip.h>
using Akregator::Filters::ArticleMatcher;
using Akregator::Filters::Criterion;
@@ -53,58 +53,58 @@ class SearchBar::SearchBarPrivate
public:
Akregator::Filters::ArticleMatcher textFilter;
Akregator::Filters::ArticleMatcher statusFilter;
- QString searchText;
- QTimer timer;
+ TQString searchText;
+ TQTimer timer;
KLineEdit* searchLine;
KComboBox* searchCombo;
int delay;
};
-SearchBar::SearchBar(QWidget* parent, const char* name) : QHBox(parent, name), d(new SearchBar::SearchBarPrivate)
+SearchBar::SearchBar(TQWidget* parent, const char* name) : TQHBox(parent, name), d(new SearchBar::SearchBarPrivate)
{
d->delay = 400;
setMargin(2);
setSpacing(5);
- setSizePolicy( QSizePolicy( QSizePolicy::Minimum, QSizePolicy::Fixed ) );
- QToolButton *clearButton = new QToolButton(this);
- clearButton->setIconSet( SmallIconSet( QApplication::reverseLayout() ? "clear_left" : "locationbar_erase" ) );
+ setSizePolicy( TQSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Fixed ) );
+ TQToolButton *clearButton = new TQToolButton(this);
+ clearButton->setIconSet( SmallIconSet( TQApplication::reverseLayout() ? "clear_left" : "locationbar_erase" ) );
clearButton->setAutoRaise(true);
- QLabel* searchLabel = new QLabel(this);
+ TQLabel* searchLabel = new TQLabel(this);
searchLabel->setText( i18n("S&earch:") );
d->searchLine = new KLineEdit(this, "searchline");
- connect(d->searchLine, SIGNAL(textChanged(const QString &)),
- this, SLOT(slotSearchStringChanged(const QString &)));
+ connect(d->searchLine, TQT_SIGNAL(textChanged(const TQString &)),
+ this, TQT_SLOT(slotSearchStringChanged(const TQString &)));
searchLabel->setBuddy(d->searchLine);
- QLabel* statusLabel = new QLabel(this);
+ TQLabel* statusLabel = new TQLabel(this);
statusLabel->setText( i18n("Status:") );
d->searchCombo = new KComboBox(this, "searchcombo");
- QPixmap iconAll = KGlobal::iconLoader()->loadIcon("exec", KIcon::Small);
- QPixmap iconNew(locate("data", "akregator/pics/kmmsgnew.png"));
- QPixmap iconUnread(locate("data", "akregator/pics/kmmsgunseen.png"));
- QPixmap iconKeep(locate("data", "akregator/pics/kmmsgflag.png"));
+ TQPixmap iconAll = KGlobal::iconLoader()->loadIcon("exec", KIcon::Small);
+ TQPixmap iconNew(locate("data", "akregator/pics/kmmsgnew.png"));
+ TQPixmap iconUnread(locate("data", "akregator/pics/kmmsgunseen.png"));
+ TQPixmap iconKeep(locate("data", "akregator/pics/kmmsgflag.png"));
d->searchCombo->insertItem(iconAll, i18n("All Articles"));
d->searchCombo->insertItem(iconUnread, i18n("Unread"));
d->searchCombo->insertItem(iconNew, i18n("New"));
d->searchCombo->insertItem(iconKeep, i18n("Important"));
- QToolTip::add( clearButton, i18n( "Clear filter" ) );
- QToolTip::add( d->searchLine, i18n( "Enter space-separated terms to filter article list" ) );
- QToolTip::add( d->searchCombo, i18n( "Choose what kind of articles to show in article list" ) );
+ TQToolTip::add( clearButton, i18n( "Clear filter" ) );
+ TQToolTip::add( d->searchLine, i18n( "Enter space-separated terms to filter article list" ) );
+ TQToolTip::add( d->searchCombo, i18n( "Choose what kind of articles to show in article list" ) );
- connect(clearButton, SIGNAL( clicked() ),
- this, SLOT(slotClearSearch()) );
+ connect(clearButton, TQT_SIGNAL( clicked() ),
+ this, TQT_SLOT(slotClearSearch()) );
- connect(d->searchCombo, SIGNAL(activated(int)),
- this, SLOT(slotSearchComboChanged(int)));
+ connect(d->searchCombo, TQT_SIGNAL(activated(int)),
+ this, TQT_SLOT(slotSearchComboChanged(int)));
- connect(&(d->timer), SIGNAL(timeout()), this, SLOT(slotActivateSearch()));
+ connect(&(d->timer), TQT_SIGNAL(timeout()), this, TQT_SLOT(slotActivateSearch()));
}
SearchBar::~SearchBar()
@@ -113,7 +113,7 @@ SearchBar::~SearchBar()
d = 0;
}
-QString SearchBar::text() const
+TQString SearchBar::text() const
{
return d->searchText;
}
@@ -150,7 +150,7 @@ void SearchBar::slotSetStatus(int status)
slotSearchComboChanged(status);
}
-void SearchBar::slotSetText(const QString& text)
+void SearchBar::slotSetText(const TQString& text)
{
d->searchLine->setText(text);
slotSearchStringChanged(text);
@@ -164,7 +164,7 @@ void SearchBar::slotSearchComboChanged(int /*index*/)
d->timer.start(200, true);
}
-void SearchBar::slotSearchStringChanged(const QString& search)
+void SearchBar::slotSearchStringChanged(const TQString& search)
{
d->searchText = search;
if (d->timer.isActive())
@@ -175,8 +175,8 @@ void SearchBar::slotSearchStringChanged(const QString& search)
void SearchBar::slotActivateSearch()
{
- QValueList<Criterion> textCriteria;
- QValueList<Criterion> statusCriteria;
+ TQValueList<Criterion> textCriteria;
+ TQValueList<Criterion> statusCriteria;
if (!d->searchText.isEmpty())
{
diff --git a/akregator/src/searchbar.h b/akregator/src/searchbar.h
index f9cfb879c..8787f2927 100644
--- a/akregator/src/searchbar.h
+++ b/akregator/src/searchbar.h
@@ -25,7 +25,7 @@
#ifndef AKREGATOR_SEARCHBAR_H
#define AKREGATOR_SEARCHBAR_H
-#include <qhbox.h>
+#include <tqhbox.h>
class QString;
@@ -43,10 +43,10 @@ class SearchBar : public QHBox
public:
- SearchBar(QWidget* parent=0, const char* name=0);
+ SearchBar(TQWidget* parent=0, const char* name=0);
virtual ~SearchBar();
- QString text() const;
+ TQString text() const;
int status() const;
void setDelay(int ms);
@@ -59,11 +59,11 @@ class SearchBar : public QHBox
public slots:
void slotClearSearch();
void slotSetStatus(int status);
- void slotSetText(const QString& text);
+ void slotSetText(const TQString& text);
private slots:
- void slotSearchStringChanged(const QString& search);
+ void slotSearchStringChanged(const TQString& search);
void slotSearchComboChanged(int index);
void slotActivateSearch();
diff --git a/akregator/src/settings_advanced.cpp b/akregator/src/settings_advanced.cpp
index 5d1254835..7a849ff9b 100644
--- a/akregator/src/settings_advanced.cpp
+++ b/akregator/src/settings_advanced.cpp
@@ -3,38 +3,38 @@
#include "storagefactory.h"
#include "storagefactoryregistry.h"
-#include <qpushbutton.h>
-#include <qstringlist.h>
-#include <qwidget.h>
+#include <tqpushbutton.h>
+#include <tqstringlist.h>
+#include <tqwidget.h>
#include <kcombobox.h>
namespace Akregator {
-SettingsAdvanced::SettingsAdvanced(QWidget* parent, const char* name) : SettingsAdvancedBase(parent, name)
+SettingsAdvanced::SettingsAdvanced(TQWidget* parent, const char* name) : SettingsAdvancedBase(parent, name)
{
- QStringList backends = Backend::StorageFactoryRegistry::self()->list();
- QString tname;
+ TQStringList backends = Backend::StorageFactoryRegistry::self()->list();
+ TQString tname;
int i = 0;
- QStringList::Iterator end( backends.end() );
- for (QStringList::Iterator it = backends.begin(); it != end; ++it)
+ TQStringList::Iterator end( backends.end() );
+ for (TQStringList::Iterator it = backends.begin(); it != end; ++it)
{
m_factories[i] = Backend::StorageFactoryRegistry::self()->getFactory(*it);
m_keyPos[m_factories[i]->key()] = i;
cbBackend->insertItem(m_factories[i]->name());
i++;
}
- connect(pbBackendConfigure, SIGNAL(clicked()), this, SLOT(slotConfigureStorage()));
- connect(cbBackend, SIGNAL(activated(int)), this, SLOT(slotFactorySelected(int)));
+ connect(pbBackendConfigure, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotConfigureStorage()));
+ connect(cbBackend, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotFactorySelected(int)));
}
-QString SettingsAdvanced::selectedFactory() const
+TQString SettingsAdvanced::selectedFactory() const
{
return m_factories[cbBackend->currentItem()]->key();
}
-void SettingsAdvanced::selectFactory(const QString& key)
+void SettingsAdvanced::selectFactory(const TQString& key)
{
cbBackend->setCurrentItem(m_keyPos[key]);
pbBackendConfigure->setEnabled((m_factories[m_keyPos[key]]->isConfigurable()));
diff --git a/akregator/src/settings_advanced.h b/akregator/src/settings_advanced.h
index c741f3f77..ff8a75e73 100644
--- a/akregator/src/settings_advanced.h
+++ b/akregator/src/settings_advanced.h
@@ -3,7 +3,7 @@
#include "settings_advancedbase.h"
-#include <qmap.h>
+#include <tqmap.h>
class QString;
class QWidget;
@@ -20,12 +20,12 @@ class SettingsAdvanced : public SettingsAdvancedBase
Q_OBJECT
public:
- SettingsAdvanced(QWidget* parent=0, const char* name=0);
+ SettingsAdvanced(TQWidget* parent=0, const char* name=0);
/** returns the key of the currently selected factory */
- QString selectedFactory() const;
+ TQString selectedFactory() const;
- void selectFactory(const QString& key);
+ void selectFactory(const TQString& key);
public slots:
@@ -33,8 +33,8 @@ class SettingsAdvanced : public SettingsAdvancedBase
void slotFactorySelected(int);
private:
- QMap<int,Backend::StorageFactory*> m_factories;
- QMap<QString, int> m_keyPos;
+ TQMap<int,Backend::StorageFactory*> m_factories;
+ TQMap<TQString, int> m_keyPos;
};
} // namespace Akregator
diff --git a/akregator/src/simplenodeselector.cpp b/akregator/src/simplenodeselector.cpp
index ea6f7974e..5c3272a13 100644
--- a/akregator/src/simplenodeselector.cpp
+++ b/akregator/src/simplenodeselector.cpp
@@ -31,9 +31,9 @@
#include <klistview.h>
#include <klocale.h>
-#include <qlayout.h>
-#include <qmap.h>
-#include <qwidget.h>
+#include <tqlayout.h>
+#include <tqmap.h>
+#include <tqwidget.h>
namespace Akregator
{
@@ -44,13 +44,13 @@ class SelectNodeDialog::SelectNodeDialogPrivate
SimpleNodeSelector* widget;
};
-SelectNodeDialog::SelectNodeDialog(FeedList* feedList, QWidget* parent, char* name) :
+SelectNodeDialog::SelectNodeDialog(FeedList* feedList, TQWidget* parent, char* name) :
KDialogBase(parent, name, true, i18n("Select Feed or Folder"),
KDialogBase::Ok|KDialogBase::Cancel, KDialogBase::Ok, true), d(new SelectNodeDialogPrivate)
{
d->widget = new SimpleNodeSelector(feedList, this);
- connect(d->widget, SIGNAL(signalNodeSelected(TreeNode*)), this, SLOT(slotNodeSelected(TreeNode*)));
+ connect(d->widget, TQT_SIGNAL(signalNodeSelected(TreeNode*)), this, TQT_SLOT(slotNodeSelected(TreeNode*)));
setMainWidget(d->widget);
enableButtonOK(false);
@@ -84,8 +84,8 @@ class SimpleNodeSelector::SimpleNodeSelectorPrivate
KListView* view;
FeedList* list;
NodeVisitor* visitor;
- QMap<TreeNode*,QListViewItem*> nodeToItem;
- QMap<QListViewItem*, TreeNode*> itemToNode;
+ TQMap<TreeNode*,TQListViewItem*> nodeToItem;
+ TQMap<TQListViewItem*, TreeNode*> itemToNode;
};
class SimpleNodeSelector::NodeVisitor : public TreeNodeVisitor
@@ -102,16 +102,16 @@ class SimpleNodeSelector::NodeVisitor : public TreeNodeVisitor
virtual bool visitFolder(Folder* node)
{
visitTreeNode(node);
- QValueList<TreeNode*> children = node->children();
+ TQValueList<TreeNode*> children = node->children();
m_view->d->nodeToItem[node]->setExpandable(true);
- for (QValueList<TreeNode*>::ConstIterator it = children.begin(); it != children.end(); ++it)
+ for (TQValueList<TreeNode*>::ConstIterator it = children.begin(); it != children.end(); ++it)
createItems(*it);
return true;
}
virtual bool visitTreeNode(TreeNode* node)
{
- QListViewItem* pi = node->parent() ? m_view->d->nodeToItem[node->parent()] : 0;
+ TQListViewItem* pi = node->parent() ? m_view->d->nodeToItem[node->parent()] : 0;
KListViewItem* item = 0;
if (pi != 0)
@@ -121,7 +121,7 @@ class SimpleNodeSelector::NodeVisitor : public TreeNodeVisitor
item->setExpandable(false);
m_view->d->nodeToItem.insert(node, item);
m_view->d->itemToNode.insert(item, node);
- connect(node, SIGNAL(signalDestroyed(TreeNode*)), m_view, SLOT(slotNodeDestroyed(TreeNode*)));
+ connect(node, TQT_SIGNAL(signalDestroyed(TreeNode*)), m_view, TQT_SLOT(slotNodeDestroyed(TreeNode*)));
return true;
}
@@ -131,18 +131,18 @@ class SimpleNodeSelector::NodeVisitor : public TreeNodeVisitor
};
-SimpleNodeSelector::SimpleNodeSelector(FeedList* feedList, QWidget* parent, const char* name) : QWidget(parent, name), d(new SimpleNodeSelectorPrivate)
+SimpleNodeSelector::SimpleNodeSelector(FeedList* feedList, TQWidget* parent, const char* name) : TQWidget(parent, name), d(new SimpleNodeSelectorPrivate)
{
d->list = feedList;
- connect(feedList, SIGNAL(signalDestroyed(FeedList*)), this, SLOT(slotFeedListDestroyed(FeedList*)));
+ connect(feedList, TQT_SIGNAL(signalDestroyed(FeedList*)), this, TQT_SLOT(slotFeedListDestroyed(FeedList*)));
d->view = new KListView(this);
d->view->setRootIsDecorated(true);
d->view->addColumn(i18n("Feeds"));
- connect(d->view, SIGNAL(selectionChanged(QListViewItem*)), this, SLOT(slotItemSelected(QListViewItem*)));
+ connect(d->view, TQT_SIGNAL(selectionChanged(TQListViewItem*)), this, TQT_SLOT(slotItemSelected(TQListViewItem*)));
- QGridLayout* layout = new QGridLayout(this, 1, 1);
+ TQGridLayout* layout = new TQGridLayout(this, 1, 1);
layout->addWidget(d->view, 0, 0);
d->visitor = new NodeVisitor(this);
@@ -166,7 +166,7 @@ TreeNode* SimpleNodeSelector::selectedNode() const
void SimpleNodeSelector::slotSelectNode(TreeNode* node)
{
- QListViewItem* item = d->nodeToItem[node];
+ TQListViewItem* item = d->nodeToItem[node];
if (item != 0)
d->view->setSelected(item, true);
}
@@ -178,7 +178,7 @@ void SimpleNodeSelector::slotFeedListDestroyed(FeedList* /*list*/)
d->view->clear();
}
-void SimpleNodeSelector::slotItemSelected(QListViewItem* item)
+void SimpleNodeSelector::slotItemSelected(TQListViewItem* item)
{
emit signalNodeSelected(d->itemToNode[item]);
}
@@ -187,7 +187,7 @@ void SimpleNodeSelector::slotNodeDestroyed(TreeNode* node)
{
if (d->nodeToItem.contains(node))
{
- QListViewItem* item = d->nodeToItem[node];
+ TQListViewItem* item = d->nodeToItem[node];
d->nodeToItem.remove(node);
d->itemToNode.remove(item);
delete item;
diff --git a/akregator/src/simplenodeselector.h b/akregator/src/simplenodeselector.h
index 244672abe..aea9cd141 100644
--- a/akregator/src/simplenodeselector.h
+++ b/akregator/src/simplenodeselector.h
@@ -25,7 +25,7 @@
#ifndef AKREGATOR_SIMPLENODESELECTOR_H
#define AKREGATOR_SIMPLENODESELECTOR_H
-#include <qwidget.h>
+#include <tqwidget.h>
#include <kdialogbase.h>
@@ -45,7 +45,7 @@ class SelectNodeDialog : public KDialogBase
{
Q_OBJECT
public:
- SelectNodeDialog(FeedList* feedList, QWidget* parent=0, char* name=0);
+ SelectNodeDialog(FeedList* feedList, TQWidget* parent=0, char* name=0);
virtual ~SelectNodeDialog();
TreeNode* selectedNode() const;
@@ -68,7 +68,7 @@ class SimpleNodeSelector : public QWidget
Q_OBJECT
public:
- SimpleNodeSelector(FeedList* feedList, QWidget* parent=0, const char* name=0);
+ SimpleNodeSelector(FeedList* feedList, TQWidget* parent=0, const char* name=0);
virtual ~SimpleNodeSelector();
TreeNode* selectedNode() const;
@@ -81,7 +81,7 @@ class SimpleNodeSelector : public QWidget
protected slots:
- virtual void slotItemSelected(QListViewItem* item);
+ virtual void slotItemSelected(TQListViewItem* item);
virtual void slotNodeDestroyed(TreeNode* node);
virtual void slotFeedListDestroyed(FeedList* list);
diff --git a/akregator/src/speechclient.cpp b/akregator/src/speechclient.cpp
index ffa42119c..4f98df2c1 100644
--- a/akregator/src/speechclient.cpp
+++ b/akregator/src/speechclient.cpp
@@ -34,8 +34,8 @@
#include <kstaticdeleter.h>
#include <ktrader.h>
-#include <qstring.h>
-#include <qvaluelist.h>
+#include <tqstring.h>
+#include <tqvaluelist.h>
namespace Akregator
{
@@ -45,7 +45,7 @@ class SpeechClient::SpeechClientPrivate
public:
bool isTextSpeechInstalled;
- QValueList<uint> pendingJobs;
+ TQValueList<uint> pendingJobs;
};
SpeechClient* SpeechClient::m_self = 0;
@@ -60,7 +60,7 @@ SpeechClient* SpeechClient::self()
}
-SpeechClient::SpeechClient() : DCOPStub("kttsd", "KSpeech"), DCOPObject("akregatorpart_kspeechsink"), QObject(), d(new SpeechClientPrivate)
+SpeechClient::SpeechClient() : DCOPStub("kttsd", "KSpeech"), DCOPObject("akregatorpart_kspeechsink"), TQObject(), d(new SpeechClientPrivate)
{
d->isTextSpeechInstalled = false;
setupSpeechSystem();
@@ -72,7 +72,7 @@ SpeechClient::~SpeechClient()
d = 0;
}
-void SpeechClient::slotSpeak(const QString& text, const QString& language)
+void SpeechClient::slotSpeak(const TQString& text, const TQString& language)
{
if (!isTextToSpeechInstalled() || text.isEmpty())
return;
@@ -91,21 +91,21 @@ void SpeechClient::slotSpeak(const Article& article)
if (!isTextToSpeechInstalled() || article.isNull())
return;
- QString speakMe;
+ TQString speakMe;
speakMe += KCharsets::resolveEntities(Utils::stripTags((article).title()))
+ ". . . . "
+ KCharsets::resolveEntities(Utils::stripTags((article).description()));
slotSpeak(speakMe, "en");
}
-void SpeechClient::slotSpeak(const QValueList<Article>& articles)
+void SpeechClient::slotSpeak(const TQValueList<Article>& articles)
{
if (!isTextToSpeechInstalled() || articles.isEmpty())
return;
- QString speakMe;
+ TQString speakMe;
- for (QValueList<Article>::ConstIterator it = articles.begin(); it != articles.end(); ++it)
+ for (TQValueList<Article>::ConstIterator it = articles.begin(); it != articles.end(); ++it)
{
if (!speakMe.isEmpty())
speakMe += ". . . . . . " + i18n("Next Article: ");
@@ -121,7 +121,7 @@ void SpeechClient::slotAbortJobs()
{
if (!d->pendingJobs.isEmpty())
{
- for (QValueList<uint>::ConstIterator it = d->pendingJobs.begin(); it != d->pendingJobs.end(); ++it)
+ for (TQValueList<uint>::ConstIterator it = d->pendingJobs.begin(); it != d->pendingJobs.end(); ++it)
{
removeText(*it);
}
@@ -132,7 +132,7 @@ void SpeechClient::slotAbortJobs()
}
}
-ASYNC SpeechClient::textRemoved(const QCString& /*appId*/, uint jobNum)
+ASYNC SpeechClient::textRemoved(const TQCString& /*appId*/, uint jobNum)
{
kdDebug() << "SpeechClient::textRemoved() called" << endl;
if (d->pendingJobs.contains(jobNum))
@@ -169,8 +169,8 @@ void SpeechClient::setupSpeechSystem()
}
else
{
- QString error;
- if (KApplication::startServiceByDesktopName("kttsd", QStringList(), &error))
+ TQString error;
+ if (KApplication::startServiceByDesktopName("kttsd", TQStringList(), &error))
{
kdDebug() << "Starting KTTSD failed with message " << error << endl;
d->isTextSpeechInstalled = false;
@@ -185,14 +185,14 @@ void SpeechClient::setupSpeechSystem()
{
bool c = connectDCOPSignal("kttsd", "KSpeech",
- "textRemoved(QCString, uint)",
- "textRemoved(QCString, uint)",
+ "textRemoved(TQCString, uint)",
+ "textRemoved(TQCString, uint)",
false);
if (!c)
kdDebug() << "SpeechClient::setupSpeechSystem(): connecting signals failed" << endl;
c = connectDCOPSignal("kttsd", "KSpeech",
- "textFinished(QCString, uint)",
- "textRemoved(QCString, uint)",
+ "textFinished(TQCString, uint)",
+ "textRemoved(TQCString, uint)",
false);
}
}
diff --git a/akregator/src/speechclient.h b/akregator/src/speechclient.h
index 03cf681a1..56e1c7148 100644
--- a/akregator/src/speechclient.h
+++ b/akregator/src/speechclient.h
@@ -28,7 +28,7 @@
#include <kspeechsink.h>
#include "kspeech_stub.h"
-#include <qobject.h>
+#include <tqobject.h>
class QString;
template <class T> class QValueList;
@@ -38,7 +38,7 @@ namespace Akregator
class Article;
-class SpeechClient : public QObject, public KSpeech_stub, virtual public KSpeechSink
+class SpeechClient : public TQObject, public KSpeech_stub, virtual public KSpeechSink
{
Q_OBJECT
@@ -51,9 +51,9 @@ class SpeechClient : public QObject, public KSpeech_stub, virtual public KSpeech
public slots:
- void slotSpeak(const QString& text, const QString& language);
+ void slotSpeak(const TQString& text, const TQString& language);
void slotSpeak(const Article& article);
- void slotSpeak(const QValueList<Article>& articles);
+ void slotSpeak(const TQValueList<Article>& articles);
void slotAbortJobs();
signals:
@@ -71,7 +71,7 @@ class SpeechClient : public QObject, public KSpeech_stub, virtual public KSpeech
SpeechClient();
void setupSpeechSystem();
- ASYNC textRemoved(const QCString& appId, uint jobNum);
+ ASYNC textRemoved(const TQCString& appId, uint jobNum);
private:
diff --git a/akregator/src/storage.h b/akregator/src/storage.h
index 59dd410a4..3b53bb7ef 100644
--- a/akregator/src/storage.h
+++ b/akregator/src/storage.h
@@ -25,7 +25,7 @@
#ifndef AKREGATOR_BACKEND_STORAGE_H
#define AKREGATOR_BACKEND_STORAGE_H
-#include <qobject.h>
+#include <tqobject.h>
#include "akregator_export.h"
@@ -52,7 +52,7 @@ class AKREGATOR_EXPORT Storage : public QObject
/** initializes the storage object with given parameters */
- virtual void initialize(const QStringList& params) = 0;
+ virtual void initialize(const TQStringList& params) = 0;
/**
* Open storage and prepare it for work.
@@ -81,28 +81,28 @@ class AKREGATOR_EXPORT Storage : public QObject
/**
* @return Article archive for feed at given url.
*/
- virtual FeedStorage* archiveFor(const QString &url) = 0;
+ virtual FeedStorage* archiveFor(const TQString &url) = 0;
virtual bool autoCommit() const = 0;
- virtual int unreadFor(const QString &url) = 0;
- virtual void setUnreadFor(const QString &url, int unread) = 0;
- virtual int totalCountFor(const QString &url) = 0;
- virtual void setTotalCountFor(const QString &url, int total) = 0;
- virtual int lastFetchFor(const QString& url) = 0;
- virtual void setLastFetchFor(const QString& url, int lastFetch) = 0;
+ virtual int unreadFor(const TQString &url) = 0;
+ virtual void setUnreadFor(const TQString &url, int unread) = 0;
+ virtual int totalCountFor(const TQString &url) = 0;
+ virtual void setTotalCountFor(const TQString &url, int total) = 0;
+ virtual int lastFetchFor(const TQString& url) = 0;
+ virtual void setLastFetchFor(const TQString& url, int lastFetch) = 0;
/** stores the feed list in the storage backend. This is a fallback for the case that the
feeds.opml file gets corrupted
@param opmlStr the feed list in OPML format
*/
- virtual void storeFeedList(const QString& opmlStr) = 0;
- virtual QString restoreFeedList() const = 0;
+ virtual void storeFeedList(const TQString& opmlStr) = 0;
+ virtual TQString restoreFeedList() const = 0;
- virtual void storeTagSet(const QString& xmlStr) = 0;
- virtual QString restoreTagSet() const = 0;
+ virtual void storeTagSet(const TQString& xmlStr) = 0;
+ virtual TQString restoreTagSet() const = 0;
/** returns a list of all feeds (URLs) stored in this archive */
- virtual QStringList feeds() const = 0;
+ virtual TQStringList feeds() const = 0;
/** adds all feed storages from a source to this storage
existing articles are replaced
diff --git a/akregator/src/storagedummyimpl.cpp b/akregator/src/storagedummyimpl.cpp
index cca08d75a..25d3f320f 100644
--- a/akregator/src/storagedummyimpl.cpp
+++ b/akregator/src/storagedummyimpl.cpp
@@ -24,9 +24,9 @@
#include "storagedummyimpl.h"
#include "feedstoragedummyimpl.h"
-#include <qmap.h>
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqmap.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
namespace Akregator {
namespace Backend {
@@ -43,7 +43,7 @@ class StorageDummyImpl::StorageDummyImplPrivate
FeedStorage* feedStorage;
};
- void addEntry(const QString& url, int unread, int totalCount, int lastFetch)
+ void addEntry(const TQString& url, int unread, int totalCount, int lastFetch)
{
Entry entry;
entry.unread = unread;
@@ -53,9 +53,9 @@ class StorageDummyImpl::StorageDummyImplPrivate
feeds[url] = entry;
}
- QString tagSet;
- QString feedList;
- QMap<QString, Entry> feeds;
+ TQString tagSet;
+ TQString feedList;
+ TQMap<TQString, Entry> feeds;
};
StorageDummyImpl::StorageDummyImpl() : d(new StorageDummyImplPrivate)
@@ -66,7 +66,7 @@ StorageDummyImpl::~StorageDummyImpl()
{
delete d; d = 0;
}
-void StorageDummyImpl::initialize(const QStringList&) {}
+void StorageDummyImpl::initialize(const TQStringList&) {}
bool StorageDummyImpl::open(bool /*autoCommit*/)
{
@@ -80,7 +80,7 @@ bool StorageDummyImpl::autoCommit() const
bool StorageDummyImpl::close()
{
- for (QMap<QString, StorageDummyImplPrivate::Entry>::ConstIterator it = d->feeds.begin(); it != d->feeds.end(); ++it)
+ for (TQMap<TQString, StorageDummyImplPrivate::Entry>::ConstIterator it = d->feeds.begin(); it != d->feeds.end(); ++it)
{
(*it).feedStorage->close();
delete (*it).feedStorage;
@@ -98,12 +98,12 @@ bool StorageDummyImpl::rollback()
return true;
}
-int StorageDummyImpl::unreadFor(const QString &url)
+int StorageDummyImpl::unreadFor(const TQString &url)
{
return d->feeds.contains(url) ? d->feeds[url].unread : 0;
}
-void StorageDummyImpl::setUnreadFor(const QString &url, int unread)
+void StorageDummyImpl::setUnreadFor(const TQString &url, int unread)
{
if (!d->feeds.contains(url))
d->addEntry(url, unread, unread, 0);
@@ -111,12 +111,12 @@ void StorageDummyImpl::setUnreadFor(const QString &url, int unread)
d->feeds[url].unread = unread;
}
-int StorageDummyImpl::totalCountFor(const QString &url)
+int StorageDummyImpl::totalCountFor(const TQString &url)
{
return d->feeds.contains(url) ? d->feeds[url].totalCount : 0;
}
-void StorageDummyImpl::setTotalCountFor(const QString &url, int total)
+void StorageDummyImpl::setTotalCountFor(const TQString &url, int total)
{
if (!d->feeds.contains(url))
d->addEntry(url, 0, total, 0);
@@ -124,12 +124,12 @@ void StorageDummyImpl::setTotalCountFor(const QString &url, int total)
d->feeds[url].totalCount = total;
}
-int StorageDummyImpl::lastFetchFor(const QString& url)
+int StorageDummyImpl::lastFetchFor(const TQString& url)
{
return d->feeds.contains(url) ? d->feeds[url].lastFetch : 0;
}
-void StorageDummyImpl::setLastFetchFor(const QString& url, int lastFetch)
+void StorageDummyImpl::setLastFetchFor(const TQString& url, int lastFetch)
{
if (!d->feeds.contains(url))
d->addEntry(url, 0, 0, lastFetch);
@@ -141,7 +141,7 @@ void StorageDummyImpl::slotCommit()
{
}
-FeedStorage* StorageDummyImpl::archiveFor(const QString& url)
+FeedStorage* StorageDummyImpl::archiveFor(const TQString& url)
{
if (!d->feeds.contains(url))
d->feeds[url].feedStorage = new FeedStorageDummyImpl(url, this);
@@ -149,15 +149,15 @@ FeedStorage* StorageDummyImpl::archiveFor(const QString& url)
return d->feeds[url].feedStorage;
}
-QStringList StorageDummyImpl::feeds() const
+TQStringList StorageDummyImpl::feeds() const
{
return d->feeds.keys();
}
void StorageDummyImpl::add(Storage* source)
{
- QStringList feeds = source->feeds();
- for (QStringList::ConstIterator it = feeds.begin(); it != feeds.end(); ++it)
+ TQStringList feeds = source->feeds();
+ for (TQStringList::ConstIterator it = feeds.begin(); it != feeds.end(); ++it)
{
FeedStorage* fa = archiveFor(*it);
fa->add(source->archiveFor(*it));
@@ -166,7 +166,7 @@ void StorageDummyImpl::add(Storage* source)
void StorageDummyImpl::clear()
{
- for (QMap<QString, StorageDummyImplPrivate::Entry>::ConstIterator it = d->feeds.begin(); it != d->feeds.end(); ++it)
+ for (TQMap<TQString, StorageDummyImplPrivate::Entry>::ConstIterator it = d->feeds.begin(); it != d->feeds.end(); ++it)
{
delete (*it).feedStorage;
}
@@ -174,22 +174,22 @@ void StorageDummyImpl::clear()
}
-void StorageDummyImpl::storeFeedList(const QString& opmlStr)
+void StorageDummyImpl::storeFeedList(const TQString& opmlStr)
{
d->feedList = opmlStr;
}
-QString StorageDummyImpl::restoreFeedList() const
+TQString StorageDummyImpl::restoreFeedList() const
{
return d->feedList;
}
-void StorageDummyImpl::storeTagSet(const QString& xmlStr)
+void StorageDummyImpl::storeTagSet(const TQString& xmlStr)
{
d->tagSet = xmlStr;
}
-QString StorageDummyImpl::restoreTagSet() const
+TQString StorageDummyImpl::restoreTagSet() const
{
return d->tagSet;
}
diff --git a/akregator/src/storagedummyimpl.h b/akregator/src/storagedummyimpl.h
index 497bcf01c..e5ef8cd81 100644
--- a/akregator/src/storagedummyimpl.h
+++ b/akregator/src/storagedummyimpl.h
@@ -43,7 +43,7 @@ class StorageDummyImpl : public Storage
StorageDummyImpl(const StorageDummyImpl&);
StorageDummyImpl &operator =(const StorageDummyImpl&);
virtual ~StorageDummyImpl();
- virtual void initialize(const QStringList& params);
+ virtual void initialize(const TQStringList& params);
/**
* Open storage and prepare it for work.
* @return true on success.
@@ -71,21 +71,21 @@ class StorageDummyImpl : public Storage
/**
* @return Article archive for feed at given url.
*/
- virtual FeedStorage* archiveFor(const QString &url);
+ virtual FeedStorage* archiveFor(const TQString &url);
virtual bool autoCommit() const;
- virtual int unreadFor(const QString &url);
- virtual void setUnreadFor(const QString &url, int unread);
- virtual int totalCountFor(const QString &url);
- virtual void setTotalCountFor(const QString &url, int total);
- virtual int lastFetchFor(const QString& url);
- virtual void setLastFetchFor(const QString& url, int lastFetch);
- virtual QStringList feeds() const;
-
- virtual void storeFeedList(const QString& opmlStr);
- virtual QString restoreFeedList() const;
-
- virtual void storeTagSet(const QString& xmlStr);
- virtual QString restoreTagSet() const;
+ virtual int unreadFor(const TQString &url);
+ virtual void setUnreadFor(const TQString &url, int unread);
+ virtual int totalCountFor(const TQString &url);
+ virtual void setTotalCountFor(const TQString &url, int total);
+ virtual int lastFetchFor(const TQString& url);
+ virtual void setLastFetchFor(const TQString& url, int lastFetch);
+ virtual TQStringList feeds() const;
+
+ virtual void storeFeedList(const TQString& opmlStr);
+ virtual TQString restoreFeedList() const;
+
+ virtual void storeTagSet(const TQString& xmlStr);
+ virtual TQString restoreTagSet() const;
/** adds all feed storages from a source to this storage
existing articles are replaced
diff --git a/akregator/src/storagefactory.h b/akregator/src/storagefactory.h
index f95ab7d13..fbcd90074 100644
--- a/akregator/src/storagefactory.h
+++ b/akregator/src/storagefactory.h
@@ -42,10 +42,10 @@ class AKREGATOR_EXPORT StorageFactory
/** identifier of the storage type, like "metakit", "postgres" etc. For use in
configuration files. Must not contain spaces or special characters.
*/
- virtual QString key() const = 0;
+ virtual TQString key() const = 0;
/** returns the (i18n'd) name of the storage type. */
- virtual QString name() const = 0;
+ virtual TQString name() const = 0;
/** true if the plugin is configurable via a config dialog */
virtual bool isConfigurable() const = 0;
@@ -63,7 +63,7 @@ class AKREGATOR_EXPORT StorageFactory
/** creates a storage object with given parameters
@param params list of implementation-specific parameters
*/
- virtual Storage* createStorage(const QStringList& params) const = 0;
+ virtual Storage* createStorage(const TQStringList& params) const = 0;
};
}
diff --git a/akregator/src/storagefactorydummyimpl.cpp b/akregator/src/storagefactorydummyimpl.cpp
index 2f0bccfb9..70f5a956d 100644
--- a/akregator/src/storagefactorydummyimpl.cpp
+++ b/akregator/src/storagefactorydummyimpl.cpp
@@ -25,26 +25,26 @@
#include "storagedummyimpl.h"
#include <klocale.h>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qwidget.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqwidget.h>
namespace Akregator {
namespace Backend {
-Storage* StorageFactoryDummyImpl::createStorage(const QStringList& params) const
+Storage* StorageFactoryDummyImpl::createStorage(const TQStringList& params) const
{
Storage* storage = new StorageDummyImpl;
storage->initialize(params);
return storage;
}
-QString StorageFactoryDummyImpl::key() const
+TQString StorageFactoryDummyImpl::key() const
{
return "dummy";
}
-QString StorageFactoryDummyImpl::name() const
+TQString StorageFactoryDummyImpl::name() const
{
return i18n("No Archive");
}
diff --git a/akregator/src/storagefactorydummyimpl.h b/akregator/src/storagefactorydummyimpl.h
index ff04d6f67..abb4e599d 100644
--- a/akregator/src/storagefactorydummyimpl.h
+++ b/akregator/src/storagefactorydummyimpl.h
@@ -38,12 +38,12 @@ class Storage;
class StorageFactoryDummyImpl : public StorageFactory
{
public:
- virtual QString key() const;
- virtual QString name() const;
+ virtual TQString key() const;
+ virtual TQString name() const;
virtual void configure();
virtual bool isConfigurable() const { return false; }
virtual bool allowsMultipleWriteAccess() const { return true; }
- virtual Storage* createStorage(const QStringList& params) const;
+ virtual Storage* createStorage(const TQStringList& params) const;
};
}
diff --git a/akregator/src/storagefactoryregistry.cpp b/akregator/src/storagefactoryregistry.cpp
index afe4422f2..a175df9da 100644
--- a/akregator/src/storagefactoryregistry.cpp
+++ b/akregator/src/storagefactoryregistry.cpp
@@ -27,9 +27,9 @@
#include <kstaticdeleter.h>
-#include <qmap.h>
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqmap.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
namespace Akregator {
namespace Backend {
@@ -37,7 +37,7 @@ namespace Backend {
class StorageFactoryRegistry::StorageFactoryRegistryPrivate
{
public:
- QMap<QString, StorageFactory*> map;
+ TQMap<TQString, StorageFactory*> map;
};
StorageFactoryRegistry* StorageFactoryRegistry::m_instance = 0;
@@ -50,7 +50,7 @@ StorageFactoryRegistry* StorageFactoryRegistry::self()
return m_instance;
}
-bool StorageFactoryRegistry::registerFactory(StorageFactory* factory, const QString& typestr)
+bool StorageFactoryRegistry::registerFactory(StorageFactory* factory, const TQString& typestr)
{
if (containsFactory(typestr))
return false;
@@ -58,22 +58,22 @@ bool StorageFactoryRegistry::registerFactory(StorageFactory* factory, const QStr
return true;
}
-void StorageFactoryRegistry::unregisterFactory(const QString& typestr)
+void StorageFactoryRegistry::unregisterFactory(const TQString& typestr)
{
d->map.remove(typestr);
}
-StorageFactory* StorageFactoryRegistry::getFactory(const QString& typestr)
+StorageFactory* StorageFactoryRegistry::getFactory(const TQString& typestr)
{
return d->map[typestr];
}
-bool StorageFactoryRegistry::containsFactory(const QString& typestr) const
+bool StorageFactoryRegistry::containsFactory(const TQString& typestr) const
{
return d->map.contains(typestr);
}
-QStringList StorageFactoryRegistry::list() const
+TQStringList StorageFactoryRegistry::list() const
{
return d->map.keys();
}
diff --git a/akregator/src/storagefactoryregistry.h b/akregator/src/storagefactoryregistry.h
index e625c7e78..fde3191ac 100644
--- a/akregator/src/storagefactoryregistry.h
+++ b/akregator/src/storagefactoryregistry.h
@@ -42,11 +42,11 @@ class AKREGATOR_EXPORT StorageFactoryRegistry
~StorageFactoryRegistry();
- bool registerFactory(StorageFactory* factory, const QString& typestr);
- void unregisterFactory(const QString& typestr);
- StorageFactory* getFactory(const QString& typestr);
- bool containsFactory(const QString& typestr) const;
- QStringList list() const;
+ bool registerFactory(StorageFactory* factory, const TQString& typestr);
+ void unregisterFactory(const TQString& typestr);
+ StorageFactory* getFactory(const TQString& typestr);
+ bool containsFactory(const TQString& typestr) const;
+ TQStringList list() const;
private:
diff --git a/akregator/src/tabwidget.cpp b/akregator/src/tabwidget.cpp
index 561b93e5d..df969aacc 100644
--- a/akregator/src/tabwidget.cpp
+++ b/akregator/src/tabwidget.cpp
@@ -24,15 +24,15 @@
#include "tabwidget.h"
-#include <qstyle.h>
-#include <qapplication.h>
-#include <qiconset.h>
-#include <qclipboard.h>
-#include <qmap.h>
-#include <qptrdict.h>
-#include <qstring.h>
-#include <qtoolbutton.h>
-#include <qtooltip.h>
+#include <tqstyle.h>
+#include <tqapplication.h>
+#include <tqiconset.h>
+#include <tqclipboard.h>
+#include <tqmap.h>
+#include <tqptrdict.h>
+#include <tqstring.h>
+#include <tqtoolbutton.h>
+#include <tqtooltip.h>
#include <kapplication.h>
#include <kdebug.h>
@@ -57,32 +57,32 @@ namespace Akregator {
class TabWidget::TabWidgetPrivate
{
public:
- QPtrDict<Frame> frames;
+ TQPtrDict<Frame> frames;
uint CurrentMaxLength;
- QWidget* currentItem;
- QToolButton* tabsClose;
+ TQWidget* currentItem;
+ TQToolButton* tabsClose;
};
-TabWidget::TabWidget(QWidget * parent, const char *name)
+TabWidget::TabWidget(TQWidget * parent, const char *name)
:KTabWidget(parent, name), d(new TabWidgetPrivate)
{
d->CurrentMaxLength = 30;
d->currentItem = 0;
setMinimumSize(250,150);
setTabReorderingEnabled(false);
- connect( this, SIGNAL( currentChanged(QWidget *) ), this,
- SLOT( slotTabChanged(QWidget *) ) );
- connect(this, SIGNAL(closeRequest(QWidget*)), this, SLOT(slotCloseRequest(QWidget*)));
+ connect( this, TQT_SIGNAL( currentChanged(TQWidget *) ), this,
+ TQT_SLOT( slotTabChanged(TQWidget *) ) );
+ connect(this, TQT_SIGNAL(closeRequest(TQWidget*)), this, TQT_SLOT(slotCloseRequest(TQWidget*)));
setHoverCloseButton(Settings::closeButtonOnTabs());
- d->tabsClose = new QToolButton(this);
- d->tabsClose->setAccel(QKeySequence("Ctrl+W"));
- connect( d->tabsClose, SIGNAL( clicked() ), this,
- SLOT( slotRemoveCurrentFrame() ) );
+ d->tabsClose = new TQToolButton(this);
+ d->tabsClose->setAccel(TQKeySequence("Ctrl+W"));
+ connect( d->tabsClose, TQT_SIGNAL( clicked() ), this,
+ TQT_SLOT( slotRemoveCurrentFrame() ) );
d->tabsClose->setIconSet( SmallIconSet( "tab_remove" ) );
d->tabsClose->adjustSize();
- QToolTip::add(d->tabsClose, i18n("Close the current tab"));
+ TQToolTip::add(d->tabsClose, i18n("Close the current tab"));
setCornerWidget( d->tabsClose, TopRight );
}
@@ -117,21 +117,21 @@ void TabWidget::addFrame(Frame *f)
return;
d->frames.insert(f->widget(), f);
addTab(f->widget(), f->title());
- connect(f, SIGNAL(titleChanged(Frame*, const QString& )), this, SLOT(slotSetTitle(Frame*, const QString& )));
+ connect(f, TQT_SIGNAL(titleChanged(Frame*, const TQString& )), this, TQT_SLOT(slotSetTitle(Frame*, const TQString& )));
slotSetTitle(f, f->title());
}
Frame *TabWidget::currentFrame()
{
- QWidget* w = currentPage();
+ TQWidget* w = currentPage();
return w ? d->frames[w] : 0;
}
-QPtrList<Frame> TabWidget::frames() const
+TQPtrList<Frame> TabWidget::frames() const
{
- QPtrList<Frame> result;
- QPtrDictIterator<Frame> it(d->frames);
+ TQPtrList<Frame> result;
+ TQPtrDictIterator<Frame> it(d->frames);
while (it.current())
{
result.append(it.current());
@@ -141,7 +141,7 @@ QPtrList<Frame> TabWidget::frames() const
return result;
}
-void TabWidget::slotTabChanged(QWidget *w)
+void TabWidget::slotTabChanged(TQWidget *w)
{
// FIXME: Don't hardcode the tab position of main frame
d->tabsClose->setDisabled(currentPageIndex() == 0);
@@ -166,34 +166,34 @@ void TabWidget::removeFrame(Frame *f)
uint TabWidget::tabBarWidthForMaxChars( uint maxLength )
{
int hframe, overlap;
- hframe = tabBar()->style().pixelMetric( QStyle::PM_TabBarTabHSpace, this );
- overlap = tabBar()->style().pixelMetric( QStyle::PM_TabBarTabOverlap, this );
+ hframe = tabBar()->style().pixelMetric( TQStyle::PM_TabBarTabHSpace, this );
+ overlap = tabBar()->style().pixelMetric( TQStyle::PM_TabBarTabOverlap, this );
- QFontMetrics fm = tabBar()->fontMetrics();
+ TQFontMetrics fm = tabBar()->fontMetrics();
int x = 0;
for( int i=0; i < count(); ++i ) {
Frame *f=d->frames[page(i)];
- QString newTitle=f->title();
+ TQString newTitle=f->title();
if ( newTitle.length() > maxLength )
newTitle = newTitle.left( maxLength-3 ) + "...";
- 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;
+ iw = tab->iconSet()->pixmap( TQIconSet::Small, TQIconSet::Normal ).width() + 4;
- x += ( tabBar()->style().sizeFromContents( QStyle::CT_TabBarTab, this, QSize( QMAX( lw + hframe + iw, QApplication::globalStrut().width() ), 0 ), QStyleOption( tab ) ) ).width();
+ x += ( tabBar()->style().sizeFromContents( TQStyle::CT_TabBarTab, this, TQSize( QMAX( lw + hframe + iw, TQApplication::globalStrut().width() ), 0 ), TQStyleOption( tab ) ) ).width();
}
return x;
}
-void TabWidget::slotSetTitle(Frame* frame, const QString& title)
+void TabWidget::slotSetTitle(Frame* frame, const TQString& title)
{
setTitle(title, frame->widget());
}
-void TabWidget::setTitle( const QString &title , QWidget* sender)
+void TabWidget::setTitle( const TQString &title , TQWidget* sender)
{
removeTabToolTip( sender );
@@ -211,7 +211,7 @@ void TabWidget::setTitle( const QString &title , QWidget* sender)
if ( tabBarWidthForMaxChars( newMaxLength ) < maxTabBarWidth )
break;
}
- QString newTitle = title;
+ TQString newTitle = title;
if ( newTitle.length() > newMaxLength )
{
setTabToolTip( sender, newTitle );
@@ -243,13 +243,13 @@ void TabWidget::setTitle( const QString &title , QWidget* sender)
}
}
-void TabWidget::contextMenu(int i, const QPoint &p)
+void TabWidget::contextMenu(int i, const TQPoint &p)
{
- QWidget* w = ActionManager::getInstance()->container("tab_popup");
+ TQWidget* w = ActionManager::getInstance()->container("tab_popup");
d->currentItem = page(i);
//kdDebug() << indexOf(d->currentItem) << endl;
if (w && indexOf(d->currentItem) != 0)
- static_cast<QPopupMenu *>(w)->exec(p);
+ static_cast<TQPopupMenu *>(w)->exec(p);
d->currentItem = 0;
}
@@ -321,7 +321,7 @@ void TabWidget::initiateDrag(int tab)
}
}
-void TabWidget::slotCloseRequest(QWidget* widget)
+void TabWidget::slotCloseRequest(TQWidget* widget)
{
if (d->frames.find(widget) != NULL)
removeFrame(d->frames.find(widget));
diff --git a/akregator/src/tabwidget.h b/akregator/src/tabwidget.h
index 854d27d2b..f3b529b97 100644
--- a/akregator/src/tabwidget.h
+++ b/akregator/src/tabwidget.h
@@ -25,7 +25,7 @@
#ifndef TABWIDGET_H
#define TABWIDGET_H
-#include <qptrlist.h>
+#include <tqptrlist.h>
#include <ktabwidget.h>
class QString;
@@ -40,17 +40,17 @@ class TabWidget : public KTabWidget
Q_OBJECT
public:
- TabWidget(QWidget * parent = 0, const char *name = 0);
+ TabWidget(TQWidget * parent = 0, const char *name = 0);
virtual ~TabWidget();
void addFrame(Frame *f);
Frame* currentFrame();
void removeFrame(Frame *f);
- QPtrList<Frame> frames() const;
+ TQPtrList<Frame> frames() const;
public slots:
- void slotSetTitle(Frame* frame, const QString& title);
+ void slotSetTitle(Frame* frame, const TQString& title);
void slotSettingsChanged();
void slotNextTab();
void slotPreviousTab();
@@ -67,7 +67,7 @@ class TabWidget : public KTabWidget
private: // methods
uint tabBarWidthForMaxChars( uint maxLength );
- void setTitle( const QString &title , QWidget* sender);
+ void setTitle( const TQString &title , TQWidget* sender);
private slots:
@@ -75,9 +75,9 @@ class TabWidget : public KTabWidget
void slotDetachTab();
void slotCopyLinkAddress();
void slotCloseTab();
- void slotCloseRequest(QWidget* widget);
- void contextMenu (int item, const QPoint &p);
- void slotTabChanged(QWidget *w);
+ void slotCloseRequest(TQWidget* widget);
+ void contextMenu (int item, const TQPoint &p);
+ void slotTabChanged(TQWidget *w);
private:
diff --git a/akregator/src/tag.cpp b/akregator/src/tag.cpp
index 251c4e633..12cc7a7ff 100644
--- a/akregator/src/tag.cpp
+++ b/akregator/src/tag.cpp
@@ -26,20 +26,20 @@
#include "tag.h"
#include "tagset.h"
-#include <qstring.h>
-#include <qvaluelist.h>
+#include <tqstring.h>
+#include <tqvaluelist.h>
namespace Akregator {
class Tag::TagPrivate : public Shared
{
public:
- QString id;
- QString name;
- QString scheme;
- QString icon;
+ TQString id;
+ TQString name;
+ TQString scheme;
+ TQString icon;
- QValueList<TagSet*> tagSets;
+ TQValueList<TagSet*> tagSets;
bool operator==(const TagPrivate& other) const
{
return id == other.id; // name is ignored!
@@ -49,7 +49,7 @@ class Tag::TagPrivate : public Shared
Tag::Tag() : d(new TagPrivate)
{}
-Tag::Tag(const QString& id, const QString& name, const QString& scheme) : d(new TagPrivate)
+Tag::Tag(const TQString& id, const TQString& name, const TQString& scheme) : d(new TagPrivate)
{
d->id = id;
d->name = name.isNull() ? id : name;
@@ -57,7 +57,7 @@ Tag::Tag(const QString& id, const QString& name, const QString& scheme) : d(new
d->icon = "rss_tag";
}
-Tag Tag::fromCategory(const QString& term, const QString& scheme, const QString& name)
+Tag Tag::fromCategory(const TQString& term, const TQString& scheme, const TQString& name)
{
Tag tag(scheme + "/" + term, name, scheme);
return tag;
@@ -106,38 +106,38 @@ bool Tag::isNull() const
return d->id.isNull();
}
-QString Tag::name() const
+TQString Tag::name() const
{
return d->name;
}
-QString Tag::scheme() const
+TQString Tag::scheme() const
{
return d->scheme;
}
-QString Tag::icon() const
+TQString Tag::icon() const
{
return d->icon;
}
-void Tag::setIcon(const QString& icon)
+void Tag::setIcon(const TQString& icon)
{
if (icon != d->icon)
{
d->icon = icon;
- for (QValueList<TagSet*>::ConstIterator it = d->tagSets.begin(); it != d->tagSets.end(); ++it)
+ for (TQValueList<TagSet*>::ConstIterator it = d->tagSets.begin(); it != d->tagSets.end(); ++it)
(*it)->tagUpdated(*this);
}
}
-void Tag::setName(const QString& name)
+void Tag::setName(const TQString& name)
{
if (name != d->name)
{
d->name = name;
- for (QValueList<TagSet*>::ConstIterator it = d->tagSets.begin(); it != d->tagSets.end(); ++it)
+ for (TQValueList<TagSet*>::ConstIterator it = d->tagSets.begin(); it != d->tagSets.end(); ++it)
(*it)->tagUpdated(*this);
}
}
@@ -152,7 +152,7 @@ void Tag::removedFromTagSet(TagSet* tagSet) const
d->tagSets.remove(tagSet);
}
-QString Tag::id() const
+TQString Tag::id() const
{
return d->id;
}
diff --git a/akregator/src/tag.h b/akregator/src/tag.h
index ebb3cf8eb..01c0f4e20 100644
--- a/akregator/src/tag.h
+++ b/akregator/src/tag.h
@@ -25,7 +25,7 @@
#ifndef AKREGATOR_TAG_H
#define AKREGATOR_TAG_H
-#include <qstring.h>
+#include <tqstring.h>
namespace Akregator {
@@ -47,8 +47,8 @@ class Tag
public:
- /** creates a tag with given id, name and scheme. If name is QString::null, the id is used as name. If id is QString::null, the object is considered as NULL object (see isNull())*/
- Tag(const QString& id, const QString& name=QString::null, const QString& scheme=QString::null);
+ /** creates a tag with given id, name and scheme. If name is TQString::null, the id is used as name. If id is TQString::null, the object is considered as NULL object (see isNull())*/
+ Tag(const TQString& id, const TQString& name=TQString::null, const TQString& scheme=TQString::null);
/** creates a null tag (isNull() is @c true) */
Tag();
@@ -73,7 +73,7 @@ class Tag
The @c id is built using 'scheme + "/" + term': The example gets id = "http://del.icio.us/tag/foo"
@encode
*/
- static Tag fromCategory(const QString& term, const QString& scheme=QString::null, const QString& name=QString::null);
+ static Tag fromCategory(const TQString& term, const TQString& scheme=TQString::null, const TQString& name=TQString::null);
virtual ~Tag();
@@ -82,18 +82,18 @@ class Tag
bool isNull() const;
/** tag identifier, used as key throughout the app and archive. Must be unique in the tag set. Can be an arbitrary unicode string, an URI etc. */
- QString id() const;
+ TQString id() const;
/** user-visible name of the tag */
- QString name() const;
+ TQString name() const;
/** (optional) classfication scheme this tag belongs to */
- QString scheme() const;
+ TQString scheme() const;
- void setName(const QString& name);
+ void setName(const TQString& name);
- QString icon() const;
- void setIcon(const QString& icon);
+ TQString icon() const;
+ void setIcon(const TQString& icon);
Tag& operator=(const Tag& other);
diff --git a/akregator/src/tagaction.cpp b/akregator/src/tagaction.cpp
index 4222bf2d7..eba476c51 100644
--- a/akregator/src/tagaction.cpp
+++ b/akregator/src/tagaction.cpp
@@ -30,8 +30,8 @@
#include <kdebug.h>
#include <kpopupmenu.h>
-#include <qmap.h>
-#include <qpopupmenu.h>
+#include <tqmap.h>
+#include <tqpopupmenu.h>
namespace Akregator {
@@ -40,17 +40,17 @@ class TagAction::TagActionPrivate
{
public:
Tag tag;
- //QMap<int, QPopupMenu*> idToPopup;
- //QMap<QPopupMenu*, int> popupToId;
+ //TQMap<int, TQPopupMenu*> idToPopup;
+ //TQMap<TQPopupMenu*, int> popupToId;
};
-TagAction::TagAction(const Tag& tag, const QObject *receiver, const char *slot, QObject *parent)
-//KAction (const QString &text, const KShortcut &cut, const QObject *receiver, const char *slot, QObject *parent, const char *name=0)
+TagAction::TagAction(const Tag& tag, const TQObject *receiver, const char *slot, TQObject *parent)
+//KAction (const TQString &text, const KShortcut &cut, const TQObject *receiver, const char *slot, TQObject *parent, const char *name=0)
: KToggleAction(tag.name(), KShortcut(), 0, 0, parent), d(new TagActionPrivate)
{
d->tag = tag;
- connect(this, SIGNAL(toggled(const Tag&, bool)), receiver, slot);
- connect(this, SIGNAL(toggled(bool)), this, SLOT(slotToggled(bool)));
+ connect(this, TQT_SIGNAL(toggled(const Tag&, bool)), receiver, slot);
+ connect(this, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotToggled(bool)));
}
TagAction::~TagAction()
@@ -65,11 +65,11 @@ Tag TagAction::tag() const
}
/*
-void TagAction::unplug(QWidget* widget)
+void TagAction::unplug(TQWidget* widget)
{
KToggleAction::unplug(widget);
- QPopupMenu* popup = ::qt_cast<QPopupMenu *>(widget);
+ TQPopupMenu* popup = ::qt_cast<TQPopupMenu *>(widget);
if (popup)
{
d->idToPopup.remove(d->popupToId[popup]);
@@ -78,9 +78,9 @@ void TagAction::unplug(QWidget* widget)
}*/
/*
-int TagAction::plug(QWidget* widget, int index)
+int TagAction::plug(TQWidget* widget, int index)
{
- QPopupMenu* popup = ::qt_cast<QPopupMenu *>( widget );
+ TQPopupMenu* popup = ::qt_cast<TQPopupMenu *>( widget );
if (!popup)
{
kdWarning() << "Can not plug KToggleAction in " << widget->className() << endl;
@@ -93,7 +93,7 @@ int TagAction::plug(QWidget* widget, int index)
int id = popup->insertItem(TagMenuItem::checkBoxIconSet(isChecked(), popup->colorGroup()), item, -1, index);
- popup->connectItem (id, this, SLOT(slotActivated()));
+ popup->connectItem (id, this, TQT_SLOT(slotActivated()));
d->popupToId[popup] = id;
d->idToPopup[id] = popup;
diff --git a/akregator/src/tagaction.h b/akregator/src/tagaction.h
index f4ecfe674..98ebcdc5b 100644
--- a/akregator/src/tagaction.h
+++ b/akregator/src/tagaction.h
@@ -41,11 +41,11 @@ class TagAction : public KToggleAction
public:
- TagAction(const Tag& tag, const QObject *receiver, const char *slot, QObject *parent=0);
+ TagAction(const Tag& tag, const TQObject *receiver, const char *slot, TQObject *parent=0);
virtual ~TagAction();
- //virtual int plug(QWidget *widget, int index=-1);
- //virtual void unplug(QWidget* widget);
+ //virtual int plug(TQWidget *widget, int index=-1);
+ //virtual void unplug(TQWidget* widget);
virtual Tag tag() const;
diff --git a/akregator/src/tagfolder.cpp b/akregator/src/tagfolder.cpp
index 2fb64b1c3..cc9583074 100644
--- a/akregator/src/tagfolder.cpp
+++ b/akregator/src/tagfolder.cpp
@@ -25,7 +25,7 @@
#include "tagfolder.h"
#include "treenodevisitor.h"
-#include <qdom.h>
+#include <tqdom.h>
namespace Akregator {
@@ -33,7 +33,7 @@ class TagFolder::TagFolderPrivate
{
};
-TagFolder::TagFolder(const QString& title) : Folder(title), d(new TagFolderPrivate)
+TagFolder::TagFolder(const TQString& title) : Folder(title), d(new TagFolderPrivate)
{
}
@@ -52,9 +52,9 @@ bool TagFolder::accept(TreeNodeVisitor* visitor)
return visitor->visitFolder(this);
}
-QDomElement TagFolder::toOPML( QDomElement /*parent*/, QDomDocument /*document*/ ) const
+TQDomElement TagFolder::toOPML( TQDomElement /*parent*/, TQDomDocument /*document*/ ) const
{
- return QDomElement();
+ return TQDomElement();
}
}
diff --git a/akregator/src/tagfolder.h b/akregator/src/tagfolder.h
index 0ec027bc8..11437d637 100644
--- a/akregator/src/tagfolder.h
+++ b/akregator/src/tagfolder.h
@@ -38,12 +38,12 @@ class TagFolder : public Folder
{
public:
- TagFolder(const QString& title = QString::null);
+ TagFolder(const TQString& title = TQString::null);
virtual ~TagFolder();
virtual bool accept(TreeNodeVisitor* visitor);
- virtual QDomElement toOPML( QDomElement parent, QDomDocument document ) const;
+ virtual TQDomElement toOPML( TQDomElement parent, TQDomDocument document ) const;
private:
class TagFolderPrivate;
diff --git a/akregator/src/tagfolderitem.cpp b/akregator/src/tagfolderitem.cpp
index d3f0c8d5c..920827afe 100644
--- a/akregator/src/tagfolderitem.cpp
+++ b/akregator/src/tagfolderitem.cpp
@@ -27,7 +27,7 @@
#include "tagfolderitem.h"
#include "treenode.h"
-#include <qpopupmenu.h>
+#include <tqpopupmenu.h>
#include <kaction.h>
#include <kiconloader.h>
@@ -59,11 +59,11 @@ TagFolderItem::~TagFolderItem()
{}
-void TagFolderItem::showContextMenu(const QPoint& p)
+void TagFolderItem::showContextMenu(const TQPoint& p)
{
- QWidget* w = ActionManager::getInstance()->container("tagfolder_popup");
+ TQWidget* w = ActionManager::getInstance()->container("tagfolder_popup");
if (w)
- static_cast<QPopupMenu *>(w)->exec(p);
+ static_cast<TQPopupMenu *>(w)->exec(p);
}
}
diff --git a/akregator/src/tagfolderitem.h b/akregator/src/tagfolderitem.h
index 8b30f0b1c..d80d19e59 100644
--- a/akregator/src/tagfolderitem.h
+++ b/akregator/src/tagfolderitem.h
@@ -29,7 +29,7 @@
#include "folderitem.h"
#include "treenode.h"
-#include <qpixmap.h>
+#include <tqpixmap.h>
class QPoint;
@@ -48,7 +48,7 @@ public:
virtual TagFolder* node();
- virtual void showContextMenu(const QPoint& p);
+ virtual void showContextMenu(const TQPoint& p);
};
}
diff --git a/akregator/src/tagnode.cpp b/akregator/src/tagnode.cpp
index 9fd1ee5e6..b351d668f 100644
--- a/akregator/src/tagnode.cpp
+++ b/akregator/src/tagnode.cpp
@@ -31,9 +31,9 @@
#include "treenode.h"
#include "treenodevisitor.h"
-#include <qdom.h>
-#include <qstring.h>
-#include <qvaluelist.h>
+#include <tqdom.h>
+#include <tqstring.h>
+#include <tqvaluelist.h>
namespace Akregator {
@@ -43,12 +43,12 @@ class TagNode::TagNodePrivate
Filters::TagMatcher filter;
TreeNode* observed;
int unread;
- QString icon;
+ TQString icon;
Tag tag;
- QValueList<Article> articles;
- QValueList<Article> addedArticlesNotify;
- QValueList<Article> removedArticlesNotify;
- QValueList<Article> updatedArticlesNotify;
+ TQValueList<Article> articles;
+ TQValueList<Article> addedArticlesNotify;
+ TQValueList<Article> removedArticlesNotify;
+ TQValueList<Article> updatedArticlesNotify;
};
TagNode::TagNode(const Tag& tag, TreeNode* observed) : d(new TagNodePrivate)
@@ -60,16 +60,16 @@ TagNode::TagNode(const Tag& tag, TreeNode* observed) : d(new TagNodePrivate)
d->observed = observed;
d->unread = 0;
- connect(observed, SIGNAL(signalDestroyed(TreeNode*)), this, SLOT(slotObservedDestroyed(TreeNode*)));
- connect(observed, SIGNAL(signalArticlesAdded(TreeNode*, const QValueList<Article>&)), this, SLOT(slotArticlesAdded(TreeNode*, const QValueList<Article>&)) );
- connect(observed, SIGNAL(signalArticlesUpdated(TreeNode*, const QValueList<Article>&)), this, SLOT(slotArticlesUpdated(TreeNode*, const QValueList<Article>&)) );
- connect(observed, SIGNAL(signalArticlesRemoved(TreeNode*, const QValueList<Article>&)), this, SLOT(slotArticlesRemoved(TreeNode*, const QValueList<Article>&)) );
+ connect(observed, TQT_SIGNAL(signalDestroyed(TreeNode*)), this, TQT_SLOT(slotObservedDestroyed(TreeNode*)));
+ connect(observed, TQT_SIGNAL(signalArticlesAdded(TreeNode*, const TQValueList<Article>&)), this, TQT_SLOT(slotArticlesAdded(TreeNode*, const TQValueList<Article>&)) );
+ connect(observed, TQT_SIGNAL(signalArticlesUpdated(TreeNode*, const TQValueList<Article>&)), this, TQT_SLOT(slotArticlesUpdated(TreeNode*, const TQValueList<Article>&)) );
+ connect(observed, TQT_SIGNAL(signalArticlesRemoved(TreeNode*, const TQValueList<Article>&)), this, TQT_SLOT(slotArticlesRemoved(TreeNode*, const TQValueList<Article>&)) );
d->articles = observed->articles(tag.id());
calcUnread();
}
-QString TagNode::icon() const
+TQString TagNode::icon() const
{
return d->icon;
}
@@ -97,8 +97,8 @@ bool TagNode::accept(TreeNodeVisitor* visitor)
void TagNode::calcUnread()
{
int unread = 0;
- QValueList<Article>::Iterator en = d->articles.end();
- for (QValueList<Article>::Iterator it = d->articles.begin(); it != en; ++it)
+ TQValueList<Article>::Iterator en = d->articles.end();
+ for (TQValueList<Article>::Iterator it = d->articles.begin(); it != en; ++it)
if ((*it).status() != Article::Read)
++unread;
if (d->unread != unread)
@@ -120,20 +120,20 @@ int TagNode::totalCount() const
}
-QValueList<Article> TagNode::articles(const QString& tag)
+TQValueList<Article> TagNode::articles(const TQString& tag)
{
return d->articles;
}
-QStringList TagNode::tags() const
+TQStringList TagNode::tags() const
{
// TODO
- return QStringList();
+ return TQStringList();
}
-QDomElement TagNode::toOPML( QDomElement parent, QDomDocument document ) const
+TQDomElement TagNode::toOPML( TQDomElement parent, TQDomDocument document ) const
{
- return QDomElement();
+ return TQDomElement();
}
TreeNode* TagNode::next()
@@ -160,8 +160,8 @@ void TagNode::slotDeleteExpiredArticles()
void TagNode::slotMarkAllArticlesAsRead()
{
setNotificationMode(false);
- QValueList<Article>::Iterator en = d->articles.end();
- for (QValueList<Article>::Iterator it = d->articles.begin(); it != en; ++it)
+ TQValueList<Article>::Iterator en = d->articles.end();
+ for (TQValueList<Article>::Iterator it = d->articles.begin(); it != en; ++it)
(*it).setStatus(Article::Read);
setNotificationMode(true);
}
@@ -191,10 +191,10 @@ void TagNode::doArticleNotification()
TreeNode::doArticleNotification();
}
-void TagNode::slotArticlesAdded(TreeNode* node, const QValueList<Article>& list)
+void TagNode::slotArticlesAdded(TreeNode* node, const TQValueList<Article>& list)
{
bool added = false;
- for (QValueList<Article>::ConstIterator it = list.begin(); it != list.end(); ++it)
+ for (TQValueList<Article>::ConstIterator it = list.begin(); it != list.end(); ++it)
{
if (!d->articles.contains(*it) && d->filter.matches(*it))
{
@@ -211,10 +211,10 @@ void TagNode::slotArticlesAdded(TreeNode* node, const QValueList<Article>& list)
}
}
-void TagNode::slotArticlesUpdated(TreeNode* node, const QValueList<Article>& list)
+void TagNode::slotArticlesUpdated(TreeNode* node, const TQValueList<Article>& list)
{
bool updated = false;
- for (QValueList<Article>::ConstIterator it = list.begin(); it != list.end(); ++it)
+ for (TQValueList<Article>::ConstIterator it = list.begin(); it != list.end(); ++it)
{
if (d->articles.contains(*it))
{
@@ -247,10 +247,10 @@ void TagNode::slotArticlesUpdated(TreeNode* node, const QValueList<Article>& lis
}
}
-void TagNode::slotArticlesRemoved(TreeNode* node, const QValueList<Article>& list)
+void TagNode::slotArticlesRemoved(TreeNode* node, const TQValueList<Article>& list)
{
bool removed = false;
- for (QValueList<Article>::ConstIterator it = list.begin(); it != list.end(); ++it)
+ for (TQValueList<Article>::ConstIterator it = list.begin(); it != list.end(); ++it)
{
if (d->articles.contains(*it))
{
@@ -266,7 +266,7 @@ void TagNode::slotArticlesRemoved(TreeNode* node, const QValueList<Article>& lis
}
}
-void TagNode::setTitle(const QString& title)
+void TagNode::setTitle(const TQString& title)
{
if (d->tag.name() != title)
d->tag.setName(title);
diff --git a/akregator/src/tagnode.h b/akregator/src/tagnode.h
index 51ee4879c..df66c4b5c 100644
--- a/akregator/src/tagnode.h
+++ b/akregator/src/tagnode.h
@@ -61,7 +61,7 @@ public:
virtual Tag tag() const;
- virtual QString icon() const;
+ virtual TQString icon() const;
/** The unread count, returns the number of new/unread articles in the node (for groups: the accumulated count of the subtree)
@return number of new/unread articles */
@@ -79,11 +79,11 @@ public:
If @c tag is not null, only articles tagged with @c tag are returned
@return sequence of articles */
- virtual QValueList<Article> articles(const QString& tag=QString::null);
+ virtual TQValueList<Article> articles(const TQString& tag=TQString::null);
/** returns a list of all tags occurring in this node (sub tree for folders) */
- virtual QStringList tags() const;
+ virtual TQStringList tags() const;
/** Helps the rest of the app to decide if node should be handled as group or not. Only use where necessary, use polymorphism where possible.
@return whether the node is a feed group or not */
@@ -92,14 +92,14 @@ public:
/** reimplemented to return an invalid element */
- virtual QDomElement toOPML( QDomElement parent, QDomDocument document ) const;
+ virtual TQDomElement toOPML( TQDomElement parent, TQDomDocument document ) const;
/** returns the next node in the tree.
Calling next() unless it returns 0 iterates through the tree in pre-order
*/
virtual TreeNode* next();
- virtual void setTitle(const QString& title);
+ virtual void setTitle(const TQString& title);
/** called by @c TagNodeList when the tag of this node was changed */
virtual void tagChanged();
@@ -116,9 +116,9 @@ public slots:
/** does nothing for TagNode */
virtual void slotAddToFetchQueue(FetchQueue* queue, bool intervalFetchOnly=false);
- virtual void slotArticlesAdded(TreeNode* node, const QValueList<Article>& list);
- virtual void slotArticlesUpdated(TreeNode* node, const QValueList<Article>& list);
- virtual void slotArticlesRemoved(TreeNode* node, const QValueList<Article>& list);
+ virtual void slotArticlesAdded(TreeNode* node, const TQValueList<Article>& list);
+ virtual void slotArticlesUpdated(TreeNode* node, const TQValueList<Article>& list);
+ virtual void slotArticlesRemoved(TreeNode* node, const TQValueList<Article>& list);
virtual void slotObservedDestroyed(TreeNode* node);
protected:
diff --git a/akregator/src/tagnodeitem.cpp b/akregator/src/tagnodeitem.cpp
index 70f2c90fd..265ec5f78 100644
--- a/akregator/src/tagnodeitem.cpp
+++ b/akregator/src/tagnodeitem.cpp
@@ -30,8 +30,8 @@
#include <kaction.h>
#include <kiconloader.h>
-#include <qpoint.h>
-#include <qpopupmenu.h>
+#include <tqpoint.h>
+#include <tqpopupmenu.h>
namespace Akregator {
@@ -77,11 +77,11 @@ TagNode* TagNodeItem::node()
return static_cast<TagNode*> (m_node);
}
-void TagNodeItem::showContextMenu(const QPoint& p)
+void TagNodeItem::showContextMenu(const TQPoint& p)
{
- QWidget* w = ActionManager::getInstance()->container("tagnode_popup");
+ TQWidget* w = ActionManager::getInstance()->container("tagnode_popup");
if (w)
- static_cast<QPopupMenu *>(w)->exec(p);
+ static_cast<TQPopupMenu *>(w)->exec(p);
}
TagNodeItem::~TagNodeItem()
diff --git a/akregator/src/tagnodeitem.h b/akregator/src/tagnodeitem.h
index 95a995c45..f9ef1b1ba 100644
--- a/akregator/src/tagnodeitem.h
+++ b/akregator/src/tagnodeitem.h
@@ -45,7 +45,7 @@ public:
virtual void nodeChanged();
virtual TagNode* node();
- virtual void showContextMenu(const QPoint& p);
+ virtual void showContextMenu(const TQPoint& p);
private:
void initialize(TagNode* node);
diff --git a/akregator/src/tagnodelist.cpp b/akregator/src/tagnodelist.cpp
index 5a2822bbb..c53e5be3b 100644
--- a/akregator/src/tagnodelist.cpp
+++ b/akregator/src/tagnodelist.cpp
@@ -30,10 +30,10 @@
#include "folder.h"
#include "tagfolder.h"
-#include <qdom.h>
-#include <qmap.h>
-#include <qstring.h>
-#include <qvaluelist.h>
+#include <tqdom.h>
+#include <tqmap.h>
+#include <tqstring.h>
+#include <tqvaluelist.h>
#include <kapplication.h>
#include <klocale.h>
@@ -45,7 +45,7 @@ class TagNodeList::TagNodeListPrivate
public:
FeedList* feedList;
TagSet* tagSet;
- QMap<QString, TagNode*> tagIdToNodeMap;
+ TQMap<TQString, TagNode*> tagIdToNodeMap;
};
FeedList* TagNodeList::feedList() const
@@ -58,14 +58,14 @@ TagNodeList::TagNodeList(FeedList* feedList, TagSet* tagSet) : NodeList(), d(ne
d->feedList = feedList;
d->tagSet = tagSet;
- connect(d->tagSet, SIGNAL(signalTagAdded(const Tag&)), this, SLOT(slotTagAdded(const Tag&)));
- connect(d->tagSet, SIGNAL(signalTagRemoved(const Tag&)), this, SLOT(slotTagRemoved(const Tag&)));
- connect(d->tagSet, SIGNAL(signalTagUpdated(const Tag&)), this, SLOT(slotTagUpdated(const Tag&)));
+ connect(d->tagSet, TQT_SIGNAL(signalTagAdded(const Tag&)), this, TQT_SLOT(slotTagAdded(const Tag&)));
+ connect(d->tagSet, TQT_SIGNAL(signalTagRemoved(const Tag&)), this, TQT_SLOT(slotTagRemoved(const Tag&)));
+ connect(d->tagSet, TQT_SIGNAL(signalTagUpdated(const Tag&)), this, TQT_SLOT(slotTagUpdated(const Tag&)));
setRootNode(new TagFolder(i18n("My Tags")));
- QValueList<Tag> list = tagSet->toMap().values();
- for (QValueList<Tag>::ConstIterator it = list.begin(); it != list.end(); ++it)
+ TQValueList<Tag> list = tagSet->toMap().values();
+ for (TQValueList<Tag>::ConstIterator it = list.begin(); it != list.end(); ++it)
{
insert(new TagNode(*it, d->feedList->rootNode()));
}
@@ -83,7 +83,7 @@ TagFolder* TagNodeList::rootNode() const
return static_cast<TagFolder*>(NodeList::rootNode());
}
-TagNode* TagNodeList::findByTagID(const QString& tagID)
+TagNode* TagNodeList::findByTagID(const TQString& tagID)
{
return d->tagIdToNodeMap[tagID];
}
@@ -91,7 +91,7 @@ TagNode* TagNodeList::findByTagID(const QString& tagID)
bool TagNodeList::insert(TagNode* tagNode)
{
tagNode->setId(KApplication::random());
- QString id = tagNode->tag().id();
+ TQString id = tagNode->tag().id();
if (!containsTagId(id))
{
rootNode()->appendChild(tagNode); // TODO: maintain sorting
@@ -104,7 +104,7 @@ bool TagNodeList::insert(TagNode* tagNode)
bool TagNodeList::remove(TagNode* tagNode)
{
- QString id = tagNode->tag().id();
+ TQString id = tagNode->tag().id();
if (containsTagId(id))
{
rootNode()->removeChild(tagNode);
@@ -118,7 +118,7 @@ bool TagNodeList::remove(TagNode* tagNode)
void TagNodeList::slotNodeDestroyed(TreeNode* node)
{
TagNode* tagNode = dynamic_cast<TagNode*>(node);
- QString id = tagNode ? tagNode->tag().id() : QString::null;
+ TQString id = tagNode ? tagNode->tag().id() : TQString::null;
if (tagNode != 0 && containsTagId(id))
{
@@ -133,7 +133,7 @@ void TagNodeList::slotNodeAdded(TreeNode* node)
NodeList::slotNodeAdded(node);
TagNode* tagNode = dynamic_cast<TagNode*>(node);
- QString id = tagNode ? tagNode->tag().id() : QString::null;
+ TQString id = tagNode ? tagNode->tag().id() : TQString::null;
if (tagNode != 0L && !containsTagId(id))
{
@@ -147,7 +147,7 @@ void TagNodeList::slotNodeRemoved(Folder* parent, TreeNode* node)
NodeList::slotNodeRemoved(parent, node);
TagNode* tagNode = dynamic_cast<TagNode*>(node);
- QString id = tagNode ? tagNode->tag().id() : QString::null;
+ TQString id = tagNode ? tagNode->tag().id() : TQString::null;
if (parent == rootNode() && tagNode != 0L && containsTagId(id))
{
@@ -156,24 +156,24 @@ void TagNodeList::slotNodeRemoved(Folder* parent, TreeNode* node)
}
}
-bool TagNodeList::containsTagId(const QString& tagId)
+bool TagNodeList::containsTagId(const TQString& tagId)
{
return d->tagIdToNodeMap.contains(tagId);
}
-QValueList<TagNode*> TagNodeList::toList() const
+TQValueList<TagNode*> TagNodeList::toList() const
{
return d->tagIdToNodeMap.values();
}
-bool TagNodeList::readFromXML(const QDomDocument& doc)
+bool TagNodeList::readFromXML(const TQDomDocument& doc)
{
return false; // TODO
}
-QDomDocument TagNodeList::toXML() const
+TQDomDocument TagNodeList::toXML() const
{
- return QDomDocument();
+ return TQDomDocument();
}
void TagNodeList::slotTagAdded(const Tag& tag)
diff --git a/akregator/src/tagnodelist.h b/akregator/src/tagnodelist.h
index 421506db4..64d2048f4 100644
--- a/akregator/src/tagnodelist.h
+++ b/akregator/src/tagnodelist.h
@@ -53,13 +53,13 @@ namespace Akregator {
FeedList* feedList() const;
bool insert(TagNode* tagNode);
bool remove(TagNode* tagNode);
- bool containsTagId(const QString& tagId);
- QValueList<TagNode*> toList() const;
+ bool containsTagId(const TQString& tagId);
+ TQValueList<TagNode*> toList() const;
- TagNode* findByTagID(const QString& tagID);
+ TagNode* findByTagID(const TQString& tagID);
- virtual bool readFromXML(const QDomDocument& doc);
- virtual QDomDocument toXML() const;
+ virtual bool readFromXML(const TQDomDocument& doc);
+ virtual TQDomDocument toXML() const;
virtual TagFolder* rootNode() const;
diff --git a/akregator/src/tagpropertiesdialog.cpp b/akregator/src/tagpropertiesdialog.cpp
index 62f432275..ea4848c41 100644
--- a/akregator/src/tagpropertiesdialog.cpp
+++ b/akregator/src/tagpropertiesdialog.cpp
@@ -25,7 +25,7 @@
#include <kicondialog.h>
#include <klocale.h>
-#include <qlineedit.h>
+#include <tqlineedit.h>
#include "tag.h"
#include "tagpropertiesdialog.h"
@@ -40,14 +40,14 @@ class TagPropertiesDialog::TagPropertiesDialogPrivate
TagPropertiesWidgetBase* widget;
};
-TagPropertiesDialog::TagPropertiesDialog(QWidget *parent, const char *name) : KDialogBase(KDialogBase::Swallow, Qt::WStyle_DialogBorder, parent, name, true, i18n("Tag Properties"), KDialogBase::Ok|KDialogBase::Cancel|KDialogBase::Apply), d(new TagPropertiesDialogPrivate)
+TagPropertiesDialog::TagPropertiesDialog(TQWidget *parent, const char *name) : KDialogBase(KDialogBase::Swallow, Qt::WStyle_DialogBorder, parent, name, true, i18n("Tag Properties"), KDialogBase::Ok|KDialogBase::Cancel|KDialogBase::Apply), d(new TagPropertiesDialogPrivate)
{
d->widget = new TagPropertiesWidgetBase(this);
setMainWidget(d->widget);
d->widget->le_title->setFocus();
enableButtonOK(false);
enableButtonApply(false);
- connect(d->widget->le_title, SIGNAL(textChanged(const QString&)), this, SLOT(slotTextChanged(const QString& )));
+ connect(d->widget->le_title, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(slotTextChanged(const TQString& )));
}
TagPropertiesDialog::~TagPropertiesDialog()
@@ -72,7 +72,7 @@ void TagPropertiesDialog::slotOk()
KDialogBase::slotOk();
}
-void TagPropertiesDialog::slotTextChanged(const QString& text)
+void TagPropertiesDialog::slotTextChanged(const TQString& text)
{
enableButtonOK(!text.isEmpty());
enableButtonApply(!text.isEmpty());
diff --git a/akregator/src/tagpropertiesdialog.h b/akregator/src/tagpropertiesdialog.h
index e9bcdb30c..503b6f0e0 100644
--- a/akregator/src/tagpropertiesdialog.h
+++ b/akregator/src/tagpropertiesdialog.h
@@ -37,7 +37,7 @@ class TagPropertiesDialog : public KDialogBase
public:
- TagPropertiesDialog(QWidget *parent=0, const char *name=0);
+ TagPropertiesDialog(TQWidget *parent=0, const char *name=0);
virtual ~TagPropertiesDialog();
void setTag(const Tag& tag);
@@ -46,7 +46,7 @@ class TagPropertiesDialog : public KDialogBase
virtual void slotOk();
virtual void slotApply();
- virtual void slotTextChanged(const QString& text);
+ virtual void slotTextChanged(const TQString& text);
private:
class TagPropertiesDialogPrivate;
diff --git a/akregator/src/tagset.cpp b/akregator/src/tagset.cpp
index 24cb09faf..e3a8d60ec 100644
--- a/akregator/src/tagset.cpp
+++ b/akregator/src/tagset.cpp
@@ -25,27 +25,27 @@
#include "tag.h"
#include "tagset.h"
-#include <qdom.h>
-#include <qmap.h>
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqdom.h>
+#include <tqmap.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
namespace Akregator {
class TagSet::TagSetPrivate
{
public:
- QMap<QString,Tag> map;
+ TQMap<TQString,Tag> map;
};
-TagSet::TagSet(QObject* parent) : QObject(parent), d(new TagSetPrivate)
+TagSet::TagSet(TQObject* parent) : TQObject(parent), d(new TagSetPrivate)
{
}
TagSet::~TagSet()
{
- QValueList<Tag> tags = d->map.values();
- for (QValueList<Tag>::Iterator it = tags.begin(); it != tags.end(); ++it)
+ TQValueList<Tag> tags = d->map.values();
+ for (TQValueList<Tag>::Iterator it = tags.begin(); it != tags.end(); ++it)
(*it).removedFromTagSet(this);
delete d;
@@ -72,7 +72,7 @@ void TagSet::remove(const Tag& tag)
}
}
-bool TagSet::containsID(const QString& id) const
+bool TagSet::containsID(const TQString& id) const
{
return d->map.contains(id);
}
@@ -82,38 +82,38 @@ bool TagSet::contains(const Tag& tag) const
return d->map.contains(tag.id());
}
-Tag TagSet::findByID(const QString& id) const
+Tag TagSet::findByID(const TQString& id) const
{
return d->map.contains(id) ? d->map[id] : Tag();
}
-QMap<QString,Tag> TagSet::toMap() const
+TQMap<TQString,Tag> TagSet::toMap() const
{
return d->map;
}
-void TagSet::readFromXML(const QDomDocument& doc)
+void TagSet::readFromXML(const TQDomDocument& doc)
{
- QDomElement root = doc.documentElement();
+ TQDomElement root = doc.documentElement();
if (root.isNull())
return;
- QDomNodeList list = root.elementsByTagName(QString::fromLatin1("tag"));
+ TQDomNodeList list = root.elementsByTagName(TQString::fromLatin1("tag"));
for (uint i = 0; i < list.length(); ++i)
{
- QDomElement e = list.item(i).toElement();
+ TQDomElement e = list.item(i).toElement();
if (!e.isNull())
{
- if (e.hasAttribute(QString::fromLatin1("id")))
+ if (e.hasAttribute(TQString::fromLatin1("id")))
{
- QString id = e.attribute(QString::fromLatin1("id"));
- QString name = e.text();
- QString scheme = e.attribute(QString::fromLatin1("scheme"));
+ TQString id = e.attribute(TQString::fromLatin1("id"));
+ TQString name = e.text();
+ TQString scheme = e.attribute(TQString::fromLatin1("scheme"));
Tag tag(id, name, scheme);
- QString icon = e.attribute(QString::fromLatin1("icon"));
+ TQString icon = e.attribute(TQString::fromLatin1("icon"));
if (!icon.isEmpty())
tag.setIcon(icon);
@@ -129,27 +129,27 @@ void TagSet::tagUpdated(const Tag& tag)
emit signalTagUpdated(tag);
}
-QDomDocument TagSet::toXML() const
+TQDomDocument TagSet::toXML() const
{
- QDomDocument doc;
+ TQDomDocument doc;
doc.appendChild( doc.createProcessingInstruction( "xml", "version=\"1.0\" encoding=\"UTF-8\"" ) );
- QDomElement root = doc.createElement("tagSet");
+ TQDomElement root = doc.createElement("tagSet");
root.setAttribute( "version", "0.1" );
doc.appendChild(root);
- QValueList<Tag> list = d->map.values();
- for (QValueList<Tag>::ConstIterator it = list.begin(); it != list.end(); ++it)
+ TQValueList<Tag> list = d->map.values();
+ for (TQValueList<Tag>::ConstIterator it = list.begin(); it != list.end(); ++it)
{
- QDomElement tn = doc.createElement("tag");
+ TQDomElement tn = doc.createElement("tag");
- QDomText text = doc.createTextNode((*it).name());
- tn.setAttribute(QString::fromLatin1("id"),(*it).id());
+ TQDomText text = doc.createTextNode((*it).name());
+ tn.setAttribute(TQString::fromLatin1("id"),(*it).id());
if (!(*it).scheme().isEmpty())
- tn.setAttribute(QString::fromLatin1("scheme"),(*it).scheme());
+ tn.setAttribute(TQString::fromLatin1("scheme"),(*it).scheme());
if (!(*it).icon().isEmpty())
- tn.setAttribute(QString::fromLatin1("icon"),(*it).icon());
+ tn.setAttribute(TQString::fromLatin1("icon"),(*it).icon());
tn.appendChild(text);
root.appendChild(tn);
}
diff --git a/akregator/src/tagset.h b/akregator/src/tagset.h
index 0c0a2009e..be4bbdd93 100644
--- a/akregator/src/tagset.h
+++ b/akregator/src/tagset.h
@@ -25,7 +25,7 @@
#ifndef AKREGATOR_TAGSET_H
#define AKREGATOR_TAGSET_H
-#include <qobject.h>
+#include <tqobject.h>
class QDomDocument;
template <class K,class T> class QMap;
@@ -50,7 +50,7 @@ class TagSet : public QObject
Q_OBJECT
public:
- TagSet(QObject* parent=0);
+ TagSet(TQObject* parent=0);
virtual ~TagSet();
/** adds a tag to the tag set. The tag set will emit signalTagAdded */
@@ -60,20 +60,20 @@ class TagSet : public QObject
void remove(const Tag& tag);
/** returns the tag set as map ((id, Tag) pairs) */
- QMap<QString,Tag> toMap() const;
+ TQMap<TQString,Tag> toMap() const;
/** returns @c true if this set contains @c tag */
bool contains(const Tag& tag) const;
/** returns @c true if this set contains a tag with a given ID */
- bool containsID(const QString& id) const;
+ bool containsID(const TQString& id) const;
/** returns the tag with the given ID if the tag is element of the set, or a null tag if not */
- Tag findByID(const QString& id) const;
+ Tag findByID(const TQString& id) const;
/** reads tag set from XML
see toXML() for an explanation of the format */
- void readFromXML(const QDomDocument& doc);
+ void readFromXML(const TQDomDocument& doc);
/** returns an XML representation of the tag set.
The root element is @c <tagSet>, a tag ("someID", "someName") is represented as
@@ -87,7 +87,7 @@ class TagSet : public QObject
</tagSet>
\endcode
*/
- QDomDocument toXML() const;
+ TQDomDocument toXML() const;
signals:
/** emitted when a tag was added to this tag set */
diff --git a/akregator/src/trayicon.cpp b/akregator/src/trayicon.cpp
index 4b4f3153b..680f88ca4 100644
--- a/akregator/src/trayicon.cpp
+++ b/akregator/src/trayicon.cpp
@@ -36,10 +36,10 @@
#include <kpopupmenu.h>
#include <kiconloader.h>
-#include <qbitmap.h>
-#include <qpainter.h>
-#include <qfont.h>
-#include <qtooltip.h>
+#include <tqbitmap.h>
+#include <tqpainter.h>
+#include <tqfont.h>
+#include <tqtooltip.h>
namespace Akregator {
@@ -57,15 +57,15 @@ void TrayIcon::setInstance(TrayIcon* trayIcon)
}
-TrayIcon::TrayIcon(QWidget *parent, const char *name)
+TrayIcon::TrayIcon(TQWidget *parent, const char *name)
: KSystemTray(parent, name), m_unread(0)
{
m_defaultIcon=KSystemTray::loadIcon("akregator");
- QPixmap m_unreadIcon=KSystemTray::loadIcon("akregator_empty");
+ TQPixmap m_unreadIcon=KSystemTray::loadIcon("akregator_empty");
m_lightIconImage=m_unreadIcon.convertToImage();
KIconEffect::deSaturate(m_lightIconImage, 0.60);
setPixmap(m_defaultIcon);
- QToolTip::add(this, i18n("Akregator - RSS Feed Reader"));
+ TQToolTip::add(this, i18n("Akregator - RSS Feed Reader"));
}
@@ -73,7 +73,7 @@ TrayIcon::~TrayIcon()
{}
-void TrayIcon::mousePressEvent(QMouseEvent *e) {
+void TrayIcon::mousePressEvent(TQMouseEvent *e) {
if (e->button() == LeftButton) {
emit showPart();
}
@@ -82,9 +82,9 @@ void TrayIcon::mousePressEvent(QMouseEvent *e) {
}
-QPixmap TrayIcon::takeScreenshot() const
+TQPixmap TrayIcon::takeScreenshot() const
{
- QPoint g = mapToGlobal(pos());
+ TQPoint g = mapToGlobal(pos());
int desktopWidth = kapp->desktop()->width();
int desktopHeight = kapp->desktop()->height();
int tw = width();
@@ -103,19 +103,19 @@ QPixmap TrayIcon::takeScreenshot() const
y = desktopHeight - h;
// Grab the desktop and draw a circle arround the icon:
- QPixmap shot = QPixmap::grabWindow(qt_xrootwin(), x, y, w, h);
- QPainter painter(&shot);
+ TQPixmap shot = TQPixmap::grabWindow(qt_xrootwin(), x, y, w, h);
+ TQPainter painter(&shot);
const int MARGINS = 6;
const int WIDTH = 3;
int ax = g.x() - x - MARGINS -1;
int ay = g.y() - y - MARGINS -1;
- painter.setPen( QPen(Qt::red/*KApplication::palette().active().highlight()*/, WIDTH) );
+ painter.setPen( TQPen(Qt::red/*KApplication::palette().active().highlight()*/, WIDTH) );
painter.drawArc(ax, ay, tw + 2*MARGINS, th + 2*MARGINS, 0, 16*360);
painter.end();
// Paint the border
const int BORDER = 1;
- QPixmap finalShot(w + 2*BORDER, h + 2*BORDER);
+ TQPixmap finalShot(w + 2*BORDER, h + 2*BORDER);
finalShot.fill(KApplication::palette().active().foreground());
painter.begin(&finalShot);
painter.drawPixmap(BORDER, BORDER, shot);
@@ -130,8 +130,8 @@ void TrayIcon::slotSetUnread(int unread)
m_unread=unread;
- QToolTip::remove(this);
- QToolTip::add(this, i18n("Akregator - 1 unread article", "Akregator - %n unread articles", unread > 0 ? unread : 0));
+ TQToolTip::remove(this);
+ TQToolTip::add(this, i18n("Akregator - 1 unread article", "Akregator - %n unread articles", unread > 0 ? unread : 0));
if (unread <= 0)
{
@@ -143,11 +143,11 @@ void TrayIcon::slotSetUnread(int unread)
int oldW = pixmap()->size().width();
int oldH = pixmap()->size().height();
- QString uStr=QString::number( unread );
- QFont f=KGlobalSettings::generalFont();
+ TQString uStr=TQString::number( unread );
+ TQFont f=KGlobalSettings::generalFont();
f.setBold(true);
float pointSize=f.pointSizeFloat();
- QFontMetrics fm(f);
+ TQFontMetrics fm(f);
int w=fm.width(uStr);
if( w > (oldW) )
{
@@ -155,21 +155,21 @@ void TrayIcon::slotSetUnread(int unread)
f.setPointSizeFloat(pointSize);
}
- QPixmap pix(oldW, oldH);
+ TQPixmap pix(oldW, oldH);
pix.fill(Qt::white);
- QPainter p(&pix);
+ TQPainter p(&pix);
p.setFont(f);
p.setPen(Qt::blue);
p.drawText(pix.rect(), Qt::AlignCenter, uStr);
pix.setMask(pix.createHeuristicMask());
- QImage img=pix.convertToImage();
+ TQImage img=pix.convertToImage();
// overlay
- QImage overlayImg=m_lightIconImage.copy();
+ TQImage overlayImg=m_lightIconImage.copy();
KIconEffect::overlay(overlayImg, img);
- QPixmap icon;
+ TQPixmap icon;
icon.convertFromImage(overlayImg);
setPixmap(icon);
}
@@ -177,7 +177,7 @@ void TrayIcon::slotSetUnread(int unread)
void TrayIcon::viewButtonClicked()
{
- QWidget *p=static_cast<QWidget*>(parent());
+ TQWidget *p=static_cast<TQWidget*>(parent());
KWin::forceActiveWindow(p->winId());
}
diff --git a/akregator/src/trayicon.h b/akregator/src/trayicon.h
index f294ab9b6..ac742ae6a 100644
--- a/akregator/src/trayicon.h
+++ b/akregator/src/trayicon.h
@@ -27,8 +27,8 @@
#include <ksystemtray.h>
-#include <qimage.h>
-#include <qpixmap.h>
+#include <tqimage.h>
+#include <tqpixmap.h>
namespace Akregator
{
@@ -39,11 +39,11 @@ namespace Akregator
static TrayIcon* getInstance();
static void setInstance(TrayIcon* trayIcon);
- TrayIcon(QWidget *parent = 0, const char *name = 0);
+ TrayIcon(TQWidget *parent = 0, const char *name = 0);
~TrayIcon();
- QPixmap takeScreenshot() const;
- virtual void mousePressEvent(QMouseEvent *);
+ TQPixmap takeScreenshot() const;
+ virtual void mousePressEvent(TQMouseEvent *);
public slots:
void settingsChanged();
void slotSetUnread(int unread);
@@ -55,8 +55,8 @@ namespace Akregator
private:
static TrayIcon* m_instance;
- QPixmap m_defaultIcon;
- QImage m_lightIconImage;
+ TQPixmap m_defaultIcon;
+ TQImage m_lightIconImage;
int m_unread;
};
}
diff --git a/akregator/src/treenode.cpp b/akregator/src/treenode.cpp
index 85bf3c5ee..5aa316865 100644
--- a/akregator/src/treenode.cpp
+++ b/akregator/src/treenode.cpp
@@ -25,8 +25,8 @@
#include "folder.h"
#include "treenode.h"
-#include <qstring.h>
-#include <qvaluelist.h>
+#include <tqstring.h>
+#include <tqvaluelist.h>
#include <kdebug.h>
@@ -39,14 +39,14 @@ class TreeNode::TreeNodePrivate
bool doNotify;
bool nodeChangeOccurred;
bool articleChangeOccurred;
- QString title;
+ TQString title;
Folder* parent;
uint id;
bool signalDestroyedEmitted;
};
TreeNode::TreeNode()
- : QObject(0, 0), d(new TreeNodePrivate)
+ : TQObject(0, 0), d(new TreeNodePrivate)
{
d->doNotify = true;
d->nodeChangeOccurred = false;
@@ -74,12 +74,12 @@ TreeNode::~TreeNode()
d = 0;
}
-const QString& TreeNode::title() const
+const TQString& TreeNode::title() const
{
return d->title;
}
-void TreeNode::setTitle(const QString& title)
+void TreeNode::setTitle(const TQString& title)
{
if (d->title != title)
@@ -93,7 +93,7 @@ TreeNode* TreeNode::nextSibling() const
{
if (!d->parent)
return 0;
- QValueList<TreeNode*> children = d->parent->children();
+ TQValueList<TreeNode*> children = d->parent->children();
TreeNode* me = (TreeNode*)this;
int idx = children.findIndex(me);
@@ -105,7 +105,7 @@ TreeNode* TreeNode::prevSibling() const
{
if (!d->parent)
return 0;
- QValueList<TreeNode*> children = d->parent->children();
+ TQValueList<TreeNode*> children = d->parent->children();
TreeNode* me = (TreeNode*)this;
int idx = children.findIndex(me);
diff --git a/akregator/src/treenode.h b/akregator/src/treenode.h
index fd25f05cb..43ac418d5 100644
--- a/akregator/src/treenode.h
+++ b/akregator/src/treenode.h
@@ -26,7 +26,7 @@
#ifndef AKREGATORTREENODE_H
#define AKREGATORTREENODE_H
-#include <qobject.h>
+#include <tqobject.h>
class QDomDocument;
class QDomElement;
@@ -77,14 +77,14 @@ public:
/** Get title of node.
@return the title of the node */
- virtual const QString& title() const;
+ virtual const TQString& title() const;
/** Sets the title of the node.
@c title should not contain entities.
@param title the title string */
- virtual void setTitle(const QString& title);
+ virtual void setTitle(const TQString& title);
/** Get the next sibling.
@@ -115,11 +115,11 @@ public:
If @c tag is not null, only articles tagged with @c tag are returned
@return sequence of articles */
- virtual QValueList<Article> articles(const QString& tag=QString::null) = 0;
+ virtual TQValueList<Article> articles(const TQString& tag=TQString::null) = 0;
/** returns a list of all tags occurring in this node (sub tree for folders) */
- virtual QStringList tags() const = 0;
+ virtual TQStringList tags() const = 0;
/** Helps the rest of the app to decide if node should be handled as group or not. Only use where necessary, use polymorphism where possible.
@return whether the node is a feed group or not */
@@ -130,7 +130,7 @@ public:
@param parent the dom element the child node will be attached to
@param document the opml document */
- virtual QDomElement toOPML( QDomElement parent, QDomDocument document ) const = 0;
+ virtual TQDomElement toOPML( TQDomElement parent, TQDomDocument document ) const = 0;
/**
@param doNotify notification on changes on/off flag
@@ -182,13 +182,13 @@ signals:
@param node the node articles were added to
@param guids the guids of the articles added
*/
- void signalArticlesAdded(TreeNode* node, const QValueList<Article>& guids);
+ void signalArticlesAdded(TreeNode* node, const TQValueList<Article>& guids);
/** emitted when articles were updated */
- void signalArticlesUpdated(TreeNode*, const QValueList<Article>& guids);
+ void signalArticlesUpdated(TreeNode*, const TQValueList<Article>& guids);
/** emitted when articles were removed from this subtree. Note that this has nothing to do with actual article deletion! The article might have moved somewhere else in the tree, e.g. if the user moved the feed */
- void signalArticlesRemoved(TreeNode*, const QValueList<Article>& guids);
+ void signalArticlesRemoved(TreeNode*, const TQValueList<Article>& guids);
protected:
diff --git a/akregator/src/treenodeitem.cpp b/akregator/src/treenodeitem.cpp
index 8dd7ebdb4..92a36859a 100644
--- a/akregator/src/treenodeitem.cpp
+++ b/akregator/src/treenodeitem.cpp
@@ -25,10 +25,10 @@
#include "treenode.h"
#include "treenodeitem.h"
#include "folderitem.h"
-#include <qfont.h>
-#include <qheader.h>
-#include <qpainter.h>
-#include <qstring.h>
+#include <tqfont.h>
+#include <tqheader.h>
+#include <tqpainter.h>
+#include <tqstring.h>
#include <kstringhandler.h>
@@ -69,9 +69,9 @@ void TreeNodeItem::initialize(TreeNode* node)
TreeNodeItem::~TreeNodeItem()
{}
-QString TreeNodeItem::toolTip() const
+TQString TreeNodeItem::toolTip() const
{
- return QString::null;
+ return TQString::null;
}
TreeNode* TreeNodeItem::node()
@@ -106,7 +106,7 @@ FolderItem* TreeNodeItem::parent() const
// TODO: reverse for reverse layout
-void TreeNodeItem::paintCell( QPainter * p, const QColorGroup & cg,
+void TreeNodeItem::paintCell( TQPainter * p, const TQColorGroup & cg,
int column, int width, int align )
{
@@ -119,7 +119,7 @@ void TreeNodeItem::paintCell( QPainter * p, const QColorGroup & cg,
}
// from kfoldertree
- QString oldText = text(column);
+ TQString oldText = text(column);
setText( column, " " );
// draw bg
@@ -128,21 +128,21 @@ void TreeNodeItem::paintCell( QPainter * p, const QColorGroup & cg,
setText( column, oldText);
// draw fg
- QFont f = p->font();
- f.setWeight(QFont::Bold);
+ TQFont f = p->font();
+ f.setWeight(TQFont::Bold);
p->setFont(f);
- QFontMetrics fm( p->fontMetrics() );
- QListView *lv = listView();
+ TQFontMetrics fm( p->fontMetrics() );
+ TQListView *lv = listView();
int x = lv ? lv->itemMargin() : 1;
int m=x;
- const QPixmap *icon = pixmap( column );
- QRect br;
+ const TQPixmap *icon = pixmap( column );
+ TQRect br;
if (icon)
x += icon->width() + m;
- QString txt = " (" + QString::number(u) + ")";
+ TQString txt = " (" + TQString::number(u) + ")";
int txtW=fm.width( txt );
if (fm.width( oldText ) + txtW + x > width)
diff --git a/akregator/src/treenodeitem.h b/akregator/src/treenodeitem.h
index 1c2d535bb..5ce02a93c 100644
--- a/akregator/src/treenodeitem.h
+++ b/akregator/src/treenodeitem.h
@@ -52,18 +52,18 @@ public:
virtual void nodeChanged();
- virtual QString toolTip() const;
+ virtual TQString toolTip() const;
virtual TreeNodeItem* firstChild() const;
virtual TreeNodeItem* nextSibling() const;
virtual FolderItem* parent() const;
- virtual void showContextMenu(const QPoint& p) = 0;
+ virtual void showContextMenu(const TQPoint& p) = 0;
protected:
TreeNode* m_node;
- virtual void paintCell( QPainter * p, const QColorGroup & cg, int column, int width, int align );
+ virtual void paintCell( TQPainter * p, const TQColorGroup & cg, int column, int width, int align );
private:
diff --git a/akregator/src/utils.cpp b/akregator/src/utils.cpp
index c91a44976..e4a24209e 100644
--- a/akregator/src/utils.cpp
+++ b/akregator/src/utils.cpp
@@ -23,17 +23,17 @@
*/
#include "utils.h"
-#include <qregexp.h>
-#include <qstring.h>
+#include <tqregexp.h>
+#include <tqstring.h>
namespace Akregator {
-QString Utils::stripTags(const QString& str)
+TQString Utils::stripTags(const TQString& str)
{
- return QString(str).replace(QRegExp("<[^>]*>"), "");
+ return TQString(str).replace(TQRegExp("<[^>]*>"), "");
}
-uint Utils::calcHash(const QString& str)
+uint Utils::calcHash(const TQString& str)
{
if (str.isNull()) // handle null string as "", prevents crash
return calcHash("");
@@ -44,14 +44,14 @@ uint Utils::calcHash(const QString& str)
return hash;
}
-QString Utils::fileNameForUrl(const QString& url_p)
+TQString Utils::fileNameForUrl(const TQString& url_p)
{
- QString url2(url_p);
+ TQString url2(url_p);
url2 = url2.replace("/", "_").replace(":", "_");
if (url2.length() > 255)
- url2 = url2.left(200) + QString::number(Akregator::Utils::calcHash(url2), 16);
+ url2 = url2.left(200) + TQString::number(Akregator::Utils::calcHash(url2), 16);
return url2;
}
diff --git a/akregator/src/utils.h b/akregator/src/utils.h
index 9ee4eaaa9..f4f86363e 100644
--- a/akregator/src/utils.h
+++ b/akregator/src/utils.h
@@ -34,7 +34,7 @@ class Utils
{
public:
/** removes HTML/XML tags (everything between < and >, that is) from a string. "<p><strong>foo</strong> bar</p>" becomes "foo bar" */
- static QString stripTags(const QString& str);
+ static TQString stripTags(const TQString& str);
/** taken from some website... -fo
* djb2
@@ -42,7 +42,7 @@ class Utils
* many years ago in comp.lang.c
*/
- static uint calcHash(const QString& str);
+ static uint calcHash(const TQString& str);
/**
* returns a file name for a URL, with chars like "/" ":"
@@ -50,7 +50,7 @@ class Utils
* appended with a hash value.
*
*/
- static QString fileNameForUrl(const QString& url);
+ static TQString fileNameForUrl(const TQString& url);
};
}
diff --git a/akregator/src/viewer.cpp b/akregator/src/viewer.cpp
index 6490fb82a..55e9b758e 100644
--- a/akregator/src/viewer.cpp
+++ b/akregator/src/viewer.cpp
@@ -37,9 +37,9 @@
#include <kurl.h>
#include <kparts/browserextension.h>
-#include <qaccel.h>
-#include <qclipboard.h>
-#include <qpaintdevicemetrics.h>
+#include <tqaccel.h>
+#include <tqclipboard.h>
+#include <tqpaintdevicemetrics.h>
#include "viewer.h"
#include "akregator_run.h"
@@ -47,7 +47,7 @@
namespace Akregator {
-Viewer::Viewer(QWidget *parent, const char *name)
+Viewer::Viewer(TQWidget *parent, const char *name)
: KHTMLPart(parent, name), m_url(0)
{
setZoomFactor(100);
@@ -57,28 +57,28 @@ Viewer::Viewer(QWidget *parent, const char *name)
setStatusMessagesEnabled(true);
// change the cursor when loading stuff...
- connect( this, SIGNAL(started(KIO::Job *)),
- this, SLOT(slotStarted(KIO::Job *)));
- connect( this, SIGNAL(completed()),
- this, SLOT(slotCompleted()));
+ connect( this, TQT_SIGNAL(started(KIO::Job *)),
+ this, TQT_SLOT(slotStarted(KIO::Job *)));
+ connect( this, TQT_SIGNAL(completed()),
+ this, TQT_SLOT(slotCompleted()));
- connect( browserExtension(), SIGNAL(popupMenu (KXMLGUIClient*, const QPoint&, const KURL&, const KParts::URLArgs&, KParts::BrowserExtension::PopupFlags, mode_t)), this, SLOT(slotPopupMenu(KXMLGUIClient*, const QPoint&, const KURL&, const KParts::URLArgs&, KParts::BrowserExtension::PopupFlags, mode_t)));
+ connect( browserExtension(), TQT_SIGNAL(popupMenu (KXMLGUIClient*, const TQPoint&, const KURL&, const KParts::URLArgs&, KParts::BrowserExtension::PopupFlags, mode_t)), this, TQT_SLOT(slotPopupMenu(KXMLGUIClient*, const TQPoint&, const KURL&, const KParts::URLArgs&, KParts::BrowserExtension::PopupFlags, mode_t)));
- KStdAction::print(this, SLOT(slotPrint()), actionCollection(), "viewer_print");
- KStdAction::copy(this, SLOT(slotCopy()), actionCollection(), "viewer_copy");
+ KStdAction::print(this, TQT_SLOT(slotPrint()), actionCollection(), "viewer_print");
+ KStdAction::copy(this, TQT_SLOT(slotCopy()), actionCollection(), "viewer_copy");
- new KAction( i18n("&Increase Font Sizes"), "viewmag+", "Ctrl+Plus", this, SLOT(slotZoomIn()), actionCollection(), "incFontSizes" );
- new KAction( i18n("&Decrease Font Sizes"), "viewmag-", "Ctrl+Minus", this, SLOT(slotZoomOut()), actionCollection(), "decFontSizes" );
+ new KAction( i18n("&Increase Font Sizes"), "viewmag+", "Ctrl+Plus", this, TQT_SLOT(slotZoomIn()), actionCollection(), "incFontSizes" );
+ new KAction( i18n("&Decrease Font Sizes"), "viewmag-", "Ctrl+Minus", this, TQT_SLOT(slotZoomOut()), actionCollection(), "decFontSizes" );
- connect(this, SIGNAL(selectionChanged()), this, SLOT(slotSelectionChanged()));
+ connect(this, TQT_SIGNAL(selectionChanged()), this, TQT_SLOT(slotSelectionChanged()));
- connect( browserExtension(), SIGNAL(openURLRequestDelayed(const KURL&, const KParts::URLArgs&)), this, SLOT(slotOpenURLRequest(const KURL&, const KParts::URLArgs& )) );
+ connect( browserExtension(), TQT_SIGNAL(openURLRequestDelayed(const KURL&, const KParts::URLArgs&)), this, TQT_SLOT(slotOpenURLRequest(const KURL&, const KParts::URLArgs& )) );
new KAction(i18n("Copy &Link Address"), "", 0,
- this, SLOT(slotCopyLinkAddress()),
+ this, TQT_SLOT(slotCopyLinkAddress()),
actionCollection(), "copylinkaddress");
new KAction(i18n("&Save Link As..."), "", 0,
- this, SLOT(slotSaveLinkAs()),
+ this, TQT_SLOT(slotSaveLinkAs()),
actionCollection(), "savelinkas");
}
@@ -88,17 +88,17 @@ Viewer::~Viewer()
bool Viewer::closeURL()
{
emit browserExtension()->loadingProgress(-1);
- emit canceled(QString::null);
+ emit canceled(TQString::null);
return KHTMLPart::closeURL();
}
int Viewer::pointsToPixel(int pointSize) const
{
- const QPaintDeviceMetrics metrics(view());
+ const TQPaintDeviceMetrics metrics(view());
return ( pointSize * metrics.logicalDpiY() + 36 ) / 72 ;
}
-void Viewer::displayInExternalBrowser(const KURL &url, const QString &mimetype)
+void Viewer::displayInExternalBrowser(const KURL &url, const TQString &mimetype)
{
if (!url.isValid()) return;
if (Settings::externalBrowserUseKdeDefault())
@@ -110,11 +110,11 @@ void Viewer::displayInExternalBrowser(const KURL &url, const QString &mimetype)
}
else
{
- QString cmd = Settings::externalBrowserCustomCommand();
- QString urlStr = url.url();
- cmd.replace(QRegExp("%u"), urlStr);
+ TQString cmd = Settings::externalBrowserCustomCommand();
+ TQString urlStr = url.url();
+ cmd.replace(TQRegExp("%u"), urlStr);
KProcess *proc = new KProcess;
- QStringList cmdAndArgs = KShell::splitArgs(cmd);
+ TQStringList cmdAndArgs = KShell::splitArgs(cmd);
*proc << cmdAndArgs;
proc->start(KProcess::DontCare);
delete proc;
@@ -126,7 +126,7 @@ void Viewer::slotOpenURLRequest(const KURL& /*url*/, const KParts::URLArgs& /*ar
}
-void Viewer::urlSelected(const QString &url, int button, int state, const QString &_target, KParts::URLArgs args)
+void Viewer::urlSelected(const TQString &url, int button, int state, const TQString &_target, KParts::URLArgs args)
{
m_url = completeURL(url);
browserExtension()->setURLArgs(args);
@@ -165,20 +165,20 @@ void Viewer::urlSelected(const QString &url, int button, int state, const QStrin
KHTMLPart::urlSelected(url,button,state,_target,args);
}
-void Viewer::slotPopupMenu(KXMLGUIClient*, const QPoint& p, const KURL& kurl, const KParts::URLArgs&, KParts::BrowserExtension::PopupFlags kpf, mode_t)
+void Viewer::slotPopupMenu(KXMLGUIClient*, const TQPoint& p, const KURL& kurl, const KParts::URLArgs&, KParts::BrowserExtension::PopupFlags kpf, mode_t)
{
const bool isLink = (kpf & (KParts::BrowserExtension::ShowNavigationItems | KParts::BrowserExtension::ShowTextSelectionItems)) == 0;
const bool isSelection = (kpf & KParts::BrowserExtension::ShowTextSelectionItems) != 0;
- QString url = kurl.url();
+ TQString url = kurl.url();
m_url = url;
KPopupMenu popup;
if (isLink && !isSelection)
{
- popup.insertItem(SmallIcon("tab_new"), i18n("Open Link in New &Tab"), this, SLOT(slotOpenLinkInForegroundTab()));
- popup.insertItem(SmallIcon("window_new"), i18n("Open Link in External &Browser"), this, SLOT(slotOpenLinkInBrowser()));
+ popup.insertItem(SmallIcon("tab_new"), i18n("Open Link in New &Tab"), this, TQT_SLOT(slotOpenLinkInForegroundTab()));
+ popup.insertItem(SmallIcon("window_new"), i18n("Open Link in External &Browser"), this, TQT_SLOT(slotOpenLinkInBrowser()));
popup.insertSeparator();
action("savelinkas")->plug(&popup);
action("copylinkaddress")->plug(&popup);
@@ -201,18 +201,18 @@ void Viewer::slotPopupMenu(KXMLGUIClient*, const QPoint& p, const KURL& kurl, co
// taken from KDevelop
void Viewer::slotCopy()
{
- QString text = selectedText();
- text.replace( QChar( 0xa0 ), ' ' );
- QClipboard *cb = QApplication::clipboard();
- disconnect( cb, SIGNAL( selectionChanged() ), this, SLOT( slotClearSelection() ) );
+ TQString text = selectedText();
+ text.replace( TQChar( 0xa0 ), ' ' );
+ QClipboard *cb = TQApplication::clipboard();
+ disconnect( cb, TQT_SIGNAL( selectionChanged() ), this, TQT_SLOT( slotClearSelection() ) );
cb->setText(text);
- connect( cb, SIGNAL( selectionChanged() ), this, SLOT( slotClearSelection() ) );
+ connect( cb, TQT_SIGNAL( selectionChanged() ), this, TQT_SLOT( slotClearSelection() ) );
}
void Viewer::slotCopyLinkAddress()
{
if(m_url.isEmpty()) return;
- QClipboard *cb = QApplication::clipboard();
+ QClipboard *cb = TQApplication::clipboard();
cb->setText(m_url.prettyURL(), QClipboard::Clipboard);
cb->setText(m_url.prettyURL(), QClipboard::Selection);
}
@@ -244,7 +244,7 @@ void Viewer::slotOpenLinkInThisTab()
void Viewer::slotOpenLinkInBrowser()
{
- displayInExternalBrowser(m_url, QString::null);
+ displayInExternalBrowser(m_url, TQString::null);
}
void Viewer::slotSaveLinkAs()
diff --git a/akregator/src/viewer.h b/akregator/src/viewer.h
index 364aeb9e6..95924e824 100644
--- a/akregator/src/viewer.h
+++ b/akregator/src/viewer.h
@@ -44,9 +44,9 @@ namespace Akregator
/**
* Display article in external browser.
*/
- static void displayInExternalBrowser(const KURL &url, const QString& mimetype=QString::null);
+ static void displayInExternalBrowser(const KURL &url, const TQString& mimetype=TQString::null);
- Viewer(QWidget* parent, const char* name);
+ Viewer(TQWidget* parent, const char* name);
virtual ~Viewer();
virtual bool closeURL();
@@ -76,12 +76,12 @@ namespace Akregator
// FIXME: Sort out how things are supposed to work and clean up the following slots
/** reimplemented to handle url selection according to the settings for LMB and MMB */
- virtual void urlSelected(const QString &url, int button, int state, const QString &_target, KParts::URLArgs args);
+ virtual void urlSelected(const TQString &url, int button, int state, const TQString &_target, KParts::URLArgs args);
/** slot for handling openURLRequestDelayed() signal from the browserextension. Handles POST requests (for forms) only, other link handling goes to urlSelected(). Does nothing in Viewer, reimplemented in PageViewer to make forms working */
virtual void slotOpenURLRequest(const KURL& url, const KParts::URLArgs& args);
- virtual void slotPopupMenu(KXMLGUIClient*, const QPoint&, const KURL&, const KParts::URLArgs&, KParts::BrowserExtension::PopupFlags, mode_t);
+ virtual void slotPopupMenu(KXMLGUIClient*, const TQPoint&, const KURL&, const KParts::URLArgs&, KParts::BrowserExtension::PopupFlags, mode_t);
/** Copies current link to clipboard. */
void slotCopyLinkAddress();
diff --git a/certmanager/certificateinfowidgetimpl.cpp b/certmanager/certificateinfowidgetimpl.cpp
index c6e810109..4367cd667 100644
--- a/certmanager/certificateinfowidgetimpl.cpp
+++ b/certmanager/certificateinfowidgetimpl.cpp
@@ -55,21 +55,21 @@
#include <kglobalsettings.h>
// Qt
-#include <qlistview.h>
-#include <qtextedit.h>
-#include <qheader.h>
-#include <qpushbutton.h>
-#include <qcursor.h>
-#include <qapplication.h>
-#include <qdatetime.h>
-#include <qstylesheet.h>
-#include <qtextcodec.h>
+#include <tqlistview.h>
+#include <tqtextedit.h>
+#include <tqheader.h>
+#include <tqpushbutton.h>
+#include <tqcursor.h>
+#include <tqapplication.h>
+#include <tqdatetime.h>
+#include <tqstylesheet.h>
+#include <tqtextcodec.h>
// other
#include <assert.h>
CertificateInfoWidgetImpl::CertificateInfoWidgetImpl( const GpgME::Key & key, bool external,
- QWidget * parent, const char * name )
+ TQWidget * parent, const char * name )
: CertificateInfoWidget( parent, name ),
mExternal( external ),
mFoundIssuer( true ),
@@ -77,24 +77,24 @@ CertificateInfoWidgetImpl::CertificateInfoWidgetImpl( const GpgME::Key & key, bo
{
importButton->setEnabled( false );
- listView->setColumnWidthMode( 1, QListView::Maximum );
- QFontMetrics fm = fontMetrics();
+ listView->setColumnWidthMode( 1, TQListView::Maximum );
+ TQFontMetrics fm = fontMetrics();
listView->setColumnWidth( 1, fm.width( i18n("Information") ) * 5 );
listView->header()->setClickEnabled( false );
listView->setSorting( -1 );
- connect( listView, SIGNAL( selectionChanged( QListViewItem* ) ),
- this, SLOT( slotShowInfo( QListViewItem* ) ) );
- pathView->setColumnWidthMode( 0, QListView::Maximum );
+ connect( listView, TQT_SIGNAL( selectionChanged( TQListViewItem* ) ),
+ this, TQT_SLOT( slotShowInfo( TQListViewItem* ) ) );
+ pathView->setColumnWidthMode( 0, TQListView::Maximum );
pathView->header()->hide();
- connect( pathView, SIGNAL( doubleClicked( QListViewItem* ) ),
- this, SLOT( slotShowCertPathDetails( QListViewItem* ) ) );
- connect( pathView, SIGNAL( returnPressed( QListViewItem* ) ),
- this, SLOT( slotShowCertPathDetails( QListViewItem* ) ) );
- connect( importButton, SIGNAL( clicked() ),
- this, SLOT( slotImportCertificate() ) );
+ connect( pathView, TQT_SIGNAL( doubleClicked( TQListViewItem* ) ),
+ this, TQT_SLOT( slotShowCertPathDetails( TQListViewItem* ) ) );
+ connect( pathView, TQT_SIGNAL( returnPressed( TQListViewItem* ) ),
+ this, TQT_SLOT( slotShowCertPathDetails( TQListViewItem* ) ) );
+ connect( importButton, TQT_SIGNAL( clicked() ),
+ this, TQT_SLOT( slotImportCertificate() ) );
dumpView->setFont( KGlobalSettings::fixedFont() );
@@ -102,8 +102,8 @@ CertificateInfoWidgetImpl::CertificateInfoWidgetImpl( const GpgME::Key & key, bo
setKey( key );
}
-static QString time_t2string( time_t t ) {
- QDateTime dt;
+static TQString time_t2string( time_t t ) {
+ TQDateTime dt;
dt.setTime_t( t );
return dt.toString();
}
@@ -124,26 +124,26 @@ void CertificateInfoWidgetImpl::setKey( const GpgME::Key & key ) {
startKeyExistanceCheck(); // starts a local keylisting to enable the
// importButton if needed
- QListViewItem * item = 0;
- item = new QListViewItem( listView, item, i18n("Valid"), QString("From %1 to %2")
+ TQListViewItem * item = 0;
+ item = new TQListViewItem( listView, item, i18n("Valid"), TQString("From %1 to %2")
.arg( time_t2string( key.subkey(0).creationTime() ),
time_t2string( key.subkey(0).expirationTime() ) ) );
- item = new QListViewItem( listView, item, i18n("Can be used for signing"),
+ item = new TQListViewItem( listView, item, i18n("Can be used for signing"),
key.canSign() ? i18n("Yes") : i18n("No") );
- item = new QListViewItem( listView, item, i18n("Can be used for encryption"),
+ item = new TQListViewItem( listView, item, i18n("Can be used for encryption"),
key.canEncrypt() ? i18n("Yes") : i18n("No") );
- item = new QListViewItem( listView, item, i18n("Can be used for certification"),
+ item = new TQListViewItem( listView, item, i18n("Can be used for certification"),
key.canCertify() ? i18n("Yes") : i18n("No") );
- item = new QListViewItem( listView, item, i18n("Can be used for authentication"),
+ item = new TQListViewItem( listView, item, i18n("Can be used for authentication"),
key.canAuthenticate() ? i18n("Yes") : i18n("No" ) );
- item = new QListViewItem( listView, item, i18n("Fingerprint"), key.primaryFingerprint() );
- item = new QListViewItem( listView, item, i18n("Issuer"), Kleo::DN( key.issuerName() ).prettyDN() );
- item = new QListViewItem( listView, item, i18n("Serial Number"), key.issuerSerial() );
+ item = new TQListViewItem( listView, item, i18n("Fingerprint"), key.primaryFingerprint() );
+ item = new TQListViewItem( listView, item, i18n("Issuer"), Kleo::DN( key.issuerName() ).prettyDN() );
+ item = new TQListViewItem( listView, item, i18n("Serial Number"), key.issuerSerial() );
const Kleo::DN dn = key.userID(0).id();
// FIXME: use the attributeLabelMap from certificatewizardimpl.cpp:
- static QMap<QString,QString> dnComponentNames;
+ static TQMap<TQString,TQString> dnComponentNames;
if ( dnComponentNames.isEmpty() ) {
dnComponentNames["C"] = i18n("Country");
dnComponentNames["OU"] = i18n("Organizational Unit");
@@ -154,26 +154,26 @@ void CertificateInfoWidgetImpl::setKey( const GpgME::Key & key ) {
}
for ( Kleo::DN::const_iterator dnit = dn.begin() ; dnit != dn.end() ; ++dnit ) {
- QString displayName = (*dnit).name();
+ TQString displayName = (*dnit).name();
if( dnComponentNames.contains(displayName) ) displayName = dnComponentNames[displayName];
- item = new QListViewItem( listView, item, displayName, (*dnit).value() );
+ item = new TQListViewItem( listView, item, displayName, (*dnit).value() );
}
const std::vector<GpgME::UserID> uids = key.userIDs();
if ( !uids.empty() ) {
- item = new QListViewItem( listView, item, i18n("Subject"),
+ item = new TQListViewItem( listView, item, i18n("Subject"),
Kleo::DN( uids.front().id() ).prettyDN() );
for ( std::vector<GpgME::UserID>::const_iterator it = uids.begin() + 1 ; it != uids.end() ; ++it ) {
if ( !(*it).id() )
continue;
- const QString email = QString::fromUtf8( (*it).id() ).stripWhiteSpace();
+ const TQString email = TQString::fromUtf8( (*it).id() ).stripWhiteSpace();
if ( email.isEmpty() )
continue;
if ( email.startsWith( "<" ) )
- item = new QListViewItem( listView, item, i18n("Email"),
+ item = new TQListViewItem( listView, item, i18n("Email"),
email.mid( 1, email.length()-2 ) );
else
- item = new QListViewItem( listView, item, i18n("A.k.a."), email );
+ item = new TQListViewItem( listView, item, i18n("A.k.a."), email );
}
}
@@ -182,13 +182,13 @@ void CertificateInfoWidgetImpl::setKey( const GpgME::Key & key ) {
startCertificateDump();
}
-static void showChainListError( QWidget * parent, const GpgME::Error & err, const char * subject ) {
+static void showChainListError( TQWidget * parent, const GpgME::Error & err, const char * subject ) {
assert( err );
- const QString msg = i18n("<qt><p>An error occurred while fetching "
+ const TQString msg = i18n("<qt><p>An error occurred while fetching "
"the certificate <b>%1</b> from the backend:</p>"
"<p><b>%2</b></p></qt>")
- .arg( subject ? QString::fromUtf8( subject ) : QString::null,
- QString::fromLocal8Bit( err.asString() ) );
+ .arg( subject ? TQString::fromUtf8( subject ) : TQString::null,
+ TQString::fromLocal8Bit( err.asString() ) );
KMessageBox::error( parent, msg, i18n("Certificate Listing Failed" ) );
}
@@ -232,10 +232,10 @@ void CertificateInfoWidgetImpl::startCertificateChainListing() {
Kleo::CryptoBackendFactory::instance()->smime()->keyListJob( false );
assert( job );
- connect( job, SIGNAL(result(const GpgME::KeyListResult&)),
- SLOT(slotCertificateChainListingResult(const GpgME::KeyListResult&)) );
- connect( job, SIGNAL(nextKey(const GpgME::Key&)),
- SLOT(slotNextKey(const GpgME::Key&)) );
+ connect( job, TQT_SIGNAL(result(const GpgME::KeyListResult&)),
+ TQT_SLOT(slotCertificateChainListingResult(const GpgME::KeyListResult&)) );
+ connect( job, TQT_SIGNAL(nextKey(const GpgME::Key&)),
+ TQT_SLOT(slotNextKey(const GpgME::Key&)) );
kdDebug() << "Going to fetch" << endl
<< " issuer : \"" << mChain.front().issuerName() << "\"" << endl
@@ -258,46 +258,46 @@ void CertificateInfoWidgetImpl::startCertificateDump() {
(*proc) << "--dump-keys";
(*proc) << mChain.front().primaryFingerprint();
- QObject::connect( proc, SIGNAL( receivedStdout(KProcess *, char *, int) ),
- this, SLOT( slotCollectStdout(KProcess *, char *, int) ) );
- QObject::connect( proc, SIGNAL( receivedStderr(KProcess *, char *, int) ),
- this, SLOT( slotCollectStderr(KProcess *, char *, int) ) );
- QObject::connect( proc, SIGNAL( processExited(KProcess*) ),
- this, SLOT( slotDumpProcessExited(KProcess*) ) );
+ TQObject::connect( proc, TQT_SIGNAL( receivedStdout(KProcess *, char *, int) ),
+ this, TQT_SLOT( slotCollectStdout(KProcess *, char *, int) ) );
+ TQObject::connect( proc, TQT_SIGNAL( receivedStderr(KProcess *, char *, int) ),
+ this, TQT_SLOT( slotCollectStderr(KProcess *, char *, int) ) );
+ TQObject::connect( proc, TQT_SIGNAL( processExited(KProcess*) ),
+ this, TQT_SLOT( slotDumpProcessExited(KProcess*) ) );
if ( !proc->start( KProcess::NotifyOnExit, (KProcess::Communication)(KProcess::Stdout | KProcess::Stderr) ) ) {
- QString wmsg = i18n("Failed to execute gpgsm:\n%1").arg( i18n( "program not found" ) );
- dumpView->setText( QStyleSheet::escape( wmsg ) );
+ TQString wmsg = i18n("Failed to execute gpgsm:\n%1").arg( i18n( "program not found" ) );
+ dumpView->setText( TQStyleSheet::escape( wmsg ) );
delete proc;
}
}
void CertificateInfoWidgetImpl::slotCollectStdout(KProcess *, char *buffer, int buflen)
{
- mDumpOutput += QCString(buffer, buflen+1); // like KProcIO does
+ mDumpOutput += TQCString(buffer, buflen+1); // like KProcIO does
}
void CertificateInfoWidgetImpl::slotCollectStderr(KProcess *, char *buffer, int buflen)
{
- mDumpError += QCString(buffer, buflen+1); // like KProcIO does
+ mDumpError += TQCString(buffer, buflen+1); // like KProcIO does
}
void CertificateInfoWidgetImpl::slotDumpProcessExited(KProcess* proc) {
int rc = ( proc->normalExit() ) ? proc->exitStatus() : -1 ;
if ( rc == 0 ) {
- dumpView->setText( QStyleSheet::escape( QString::fromUtf8( mDumpOutput ) ) );
+ dumpView->setText( TQStyleSheet::escape( TQString::fromUtf8( mDumpOutput ) ) );
} else {
if ( !mDumpError.isEmpty() ) {
- dumpView->setText( QStyleSheet::escape( QString::fromUtf8( mDumpError ) ) );
+ dumpView->setText( TQStyleSheet::escape( TQString::fromUtf8( mDumpError ) ) );
} else
{
- QString wmsg = i18n("Failed to execute gpgsm:\n%1");
+ TQString wmsg = i18n("Failed to execute gpgsm:\n%1");
if ( rc == -1 )
wmsg = wmsg.arg( i18n( "program cannot be executed" ) );
else
wmsg = wmsg.arg( strerror(rc) );
- dumpView->setText( QStyleSheet::escape( wmsg ) );
+ dumpView->setText( TQStyleSheet::escape( wmsg ) );
}
}
@@ -320,14 +320,14 @@ void CertificateInfoWidgetImpl::updateChainView() {
pathView->clear();
if ( mChain.empty() )
return;
- QListViewItem * item = 0;
+ TQListViewItem * item = 0;
- QValueList<GpgME::Key>::const_iterator it = mChain.begin();
+ TQValueList<GpgME::Key>::const_iterator it = mChain.begin();
// root item:
if ( (*it).chainID() && qstrcmp( (*it).chainID(), (*it).primaryFingerprint() ) == 0 )
- item = new QListViewItem( pathView, Kleo::DN( (*it++).userID(0).id() ).prettyDN() );
+ item = new TQListViewItem( pathView, Kleo::DN( (*it++).userID(0).id() ).prettyDN() );
else {
- item = new QListViewItem( pathView, i18n("Issuer certificate not found ( %1)")
+ item = new TQListViewItem( pathView, i18n("Issuer certificate not found ( %1)")
.arg( Kleo::DN( (*it).issuerName() ).prettyDN() ) );
item->setOpen( true ); // Qt bug: doesn't open after setEnabled( false ) :/
item->setEnabled( false );
@@ -336,7 +336,7 @@ void CertificateInfoWidgetImpl::updateChainView() {
// subsequent items:
while ( it != mChain.end() ) {
- item = new QListViewItem( item, Kleo::DN( (*it++).userID(0).id() ).prettyDN() );
+ item = new TQListViewItem( item, Kleo::DN( (*it++).userID(0).id() ).prettyDN() );
item->setOpen( true );
}
}
@@ -348,11 +348,11 @@ void CertificateInfoWidgetImpl::slotCertificateChainListingResult( const GpgME::
startCertificateChainListing();
}
-void CertificateInfoWidgetImpl::slotShowInfo( QListViewItem * item ) {
+void CertificateInfoWidgetImpl::slotShowInfo( TQListViewItem * item ) {
textView->setText( item->text(1) );
}
-void CertificateInfoWidgetImpl::slotShowCertPathDetails( QListViewItem * item ) {
+void CertificateInfoWidgetImpl::slotShowCertPathDetails( TQListViewItem * item ) {
if ( !item )
return;
@@ -362,7 +362,7 @@ void CertificateInfoWidgetImpl::slotShowCertPathDetails( QListViewItem * item )
// widget spec for Kleo::KeyListView.
unsigned int totalCount = 0;
int itemIndex = -1;
- for ( const QListViewItem * i = pathView->firstChild() ; i ; i = i->firstChild() ) {
+ for ( const TQListViewItem * i = pathView->firstChild() ; i ; i = i->firstChild() ) {
if ( i == item )
itemIndex = totalCount;
++totalCount;
@@ -383,8 +383,8 @@ void CertificateInfoWidgetImpl::slotShowCertPathDetails( QListViewItem * item )
new CertificateInfoWidgetImpl( mChain[itemIndex], mExternal, dialog );
dialog->setMainWidget( top );
// proxy the signal to our receiver:
- connect( top, SIGNAL(requestCertificateDownload(const QString&, const QString&)),
- SIGNAL(requestCertificateDownload(const QString&, const QString&)) );
+ connect( top, TQT_SIGNAL(requestCertificateDownload(const TQString&, const TQString&)),
+ TQT_SIGNAL(requestCertificateDownload(const TQString&, const TQString&)) );
dialog->show();
}
@@ -405,7 +405,7 @@ void CertificateInfoWidgetImpl::startKeyExistanceCheck() {
if ( mChain.empty() || mChain.back().isNull() )
// need a key to look for
return;
- const QString fingerprint = mChain.back().primaryFingerprint();
+ const TQString fingerprint = mChain.back().primaryFingerprint();
if ( fingerprint.isEmpty() )
// empty pattern means list all keys. We don't want that
return;
@@ -415,10 +415,10 @@ void CertificateInfoWidgetImpl::startKeyExistanceCheck() {
Kleo::CryptoBackendFactory::instance()->smime()->keyListJob( false );
assert( job );
- connect( job, SIGNAL(nextKey(const GpgME::Key&)),
- SLOT(slotKeyExistanceCheckNextCandidate(const GpgME::Key&)) );
- connect( job, SIGNAL(result(const GpgME::KeyListResult&)),
- SLOT(slotKeyExistanceCheckFinished()) );
+ connect( job, TQT_SIGNAL(nextKey(const GpgME::Key&)),
+ TQT_SLOT(slotKeyExistanceCheckNextCandidate(const GpgME::Key&)) );
+ connect( job, TQT_SIGNAL(result(const GpgME::KeyListResult&)),
+ TQT_SLOT(slotKeyExistanceCheckFinished()) );
// nor to check for errors:
job->start( fingerprint );
}
diff --git a/certmanager/certificateinfowidgetimpl.h b/certmanager/certificateinfowidgetimpl.h
index 961d67c39..9123d2c64 100644
--- a/certmanager/certificateinfowidgetimpl.h
+++ b/certmanager/certificateinfowidgetimpl.h
@@ -37,7 +37,7 @@
#include <gpgmepp/key.h>
-#include <qvaluelist.h>
+#include <tqvaluelist.h>
class KProcess;
class QListViewItem;
@@ -50,16 +50,16 @@ class CertificateInfoWidgetImpl : public CertificateInfoWidget {
Q_OBJECT
public:
CertificateInfoWidgetImpl( const GpgME::Key & key, bool external,
- QWidget * parent=0, const char * name=0);
+ TQWidget * parent=0, const char * name=0);
void setKey( const GpgME::Key & key );
signals:
- void requestCertificateDownload( const QString & fingerprint, const QString& displayName );
+ void requestCertificateDownload( const TQString & fingerprint, const TQString& displayName );
private slots:
- void slotShowInfo( QListViewItem* );
- void slotShowCertPathDetails( QListViewItem* );
+ void slotShowInfo( TQListViewItem* );
+ void slotShowCertPathDetails( TQListViewItem* );
void slotImportCertificate();
void slotCertificateChainListingResult( const GpgME::KeyListResult & res );
void slotNextKey( const GpgME::Key & key );
@@ -76,9 +76,9 @@ private:
void updateChainView();
private:
- QCString mDumpOutput;
- QCString mDumpError;
- QValueList<GpgME::Key> mChain;
+ TQCString mDumpOutput;
+ TQCString mDumpError;
+ TQValueList<GpgME::Key> mChain;
bool mExternal;
bool mFoundIssuer;
bool mHaveKeyLocally;
diff --git a/certmanager/certificatewizardimpl.cpp b/certmanager/certificatewizardimpl.cpp
index a88c54d84..bb31d5c3e 100644
--- a/certmanager/certificatewizardimpl.cpp
+++ b/certmanager/certificatewizardimpl.cpp
@@ -64,14 +64,14 @@
#include <kio/netaccess.h>
// Qt
-#include <qlineedit.h>
-#include <qtextedit.h>
-#include <qpushbutton.h>
-#include <qcheckbox.h>
-#include <qradiobutton.h>
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qcombobox.h>
+#include <tqlineedit.h>
+#include <tqtextedit.h>
+#include <tqpushbutton.h>
+#include <tqcheckbox.h>
+#include <tqradiobutton.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqcombobox.h>
#include <assert.h>
#include <dcopref.h>
@@ -81,10 +81,10 @@ static const unsigned int keyLengths[] = {
};
static const unsigned int numKeyLengths = sizeof keyLengths / sizeof *keyLengths;
-static QString attributeLabel( const QString & attr, bool required ) {
+static TQString attributeLabel( const TQString & attr, bool required ) {
if ( attr.isEmpty() )
- return QString::null;
- const QString label = Kleo::DNAttributeMapper::instance()->name2label( attr );
+ return TQString::null;
+ const TQString label = Kleo::DNAttributeMapper::instance()->name2label( attr );
if ( !label.isEmpty() )
if ( required )
return i18n("Format string for the labels in the \"Your Personal Data\" page - required field",
@@ -99,11 +99,11 @@ static QString attributeLabel( const QString & attr, bool required ) {
return attr + ':';
}
-static QString attributeFromKey( QString key ) {
+static TQString attributeFromKey( TQString key ) {
return key.remove( '!' );
}
-static bool availForMod( const QLineEdit * le ) {
+static bool availForMod( const TQLineEdit * le ) {
return le && le->isEnabled();
}
@@ -114,7 +114,7 @@ static bool availForMod( const QLineEdit * le ) {
* The wizard will by default be modeless, unless you set 'modal' to
* TRUE to construct a modal wizard.
*/
-CertificateWizardImpl::CertificateWizardImpl( QWidget* parent, const char* name, bool modal, WFlags fl )
+CertificateWizardImpl::CertificateWizardImpl( TQWidget* parent, const char* name, bool modal, WFlags fl )
: CertificateWizard( parent, name, modal, fl )
{
// don't allow to go to last page until a key has been generated
@@ -126,16 +126,16 @@ CertificateWizardImpl::CertificateWizardImpl( QWidget* parent, const char* name
// Allow to select remote URLs
storeUR->setMode( KFile::File );
storeUR->setFilter( "application/pkcs10" );
- connect( storeUR, SIGNAL( urlSelected( const QString& ) ),
- this, SLOT( slotURLSelected( const QString& ) ) );
+ connect( storeUR, TQT_SIGNAL( urlSelected( const TQString& ) ),
+ this, TQT_SLOT( slotURLSelected( const TQString& ) ) );
const KConfigGroup config( KGlobal::config(), "CertificateCreationWizard" );
caEmailED->setText( config.readEntry( "CAEmailAddress" ) );
- connect( this, SIGNAL( helpClicked() ),
- this, SLOT( slotHelpClicked() ) );
- connect( insertAddressButton, SIGNAL( clicked() ),
- this, SLOT( slotSetValuesFromWhoAmI() ) );
+ connect( this, TQT_SIGNAL( helpClicked() ),
+ this, TQT_SLOT( slotHelpClicked() ) );
+ connect( insertAddressButton, TQT_SIGNAL( clicked() ),
+ this, TQT_SLOT( slotSetValuesFromWhoAmI() ) );
for ( unsigned int i = 0 ; i < numKeyLengths ; ++i )
keyLengthCB->insertItem( i18n("%n bit", "%n bits", keyLengths[i] ) );
@@ -144,10 +144,10 @@ CertificateWizardImpl::CertificateWizardImpl( QWidget* parent, const char* name
static bool requirementsAreMet( const CertificateWizardImpl::AttrPairList & list ) {
for ( CertificateWizardImpl::AttrPairList::const_iterator it = list.begin() ;
it != list.end() ; ++it ) {
- const QLineEdit * le = (*it).second;
+ const TQLineEdit * le = (*it).second;
if ( !le )
continue;
- const QString key = (*it).first;
+ const TQString key = (*it).first;
#ifndef NDEBUG
kdbgstream s = kdDebug();
#else
@@ -179,8 +179,8 @@ CertificateWizardImpl::~CertificateWizardImpl()
// no need to delete child widgets, Qt does it all for us
}
-static const char * oidForAttributeName( const QString & attr ) {
- QCString attrUtf8 = attr.utf8();
+static const char * oidForAttributeName( const TQString & attr ) {
+ TQCString attrUtf8 = attr.utf8();
for ( unsigned int i = 0 ; i < numOidMaps ; ++i )
if ( qstricmp( attrUtf8, oidmap[i].name ) == 0 )
return oidmap[i].oid;
@@ -193,10 +193,10 @@ static const char * oidForAttributeName( const QString & attr ) {
void CertificateWizardImpl::slotGenerateCertificate()
{
// Ask gpgme to generate a key and return it
- QString certParms;
+ TQString certParms;
certParms += "<GnupgKeyParms format=\"internal\">\n";
certParms += "Key-Type: RSA\n";
- certParms += QString( "Key-Length: %1\n" ).arg( keyLengths[keyLengthCB->currentItem()] );
+ certParms += TQString( "Key-Length: %1\n" ).arg( keyLengths[keyLengthCB->currentItem()] );
certParms += "Key-Usage: ";
if ( signOnlyCB->isChecked() )
certParms += "Sign";
@@ -207,15 +207,15 @@ void CertificateWizardImpl::slotGenerateCertificate()
certParms += "\n";
certParms += "name-dn: ";
- QString email;
- QStringList rdns;
+ TQString email;
+ TQStringList rdns;
for( AttrPairList::const_iterator it = _attrPairList.begin(); it != _attrPairList.end(); ++it ) {
- const QString attr = attributeFromKey( (*it).first.upper() );
- const QLineEdit * le = (*it).second;
+ const TQString attr = attributeFromKey( (*it).first.upper() );
+ const TQLineEdit * le = (*it).second;
if ( !le )
continue;
- const QString value = le->text().stripWhiteSpace();
+ const TQString value = le->text().stripWhiteSpace();
if ( value.isEmpty() )
continue;
@@ -230,7 +230,7 @@ void CertificateWizardImpl::slotGenerateCertificate()
if ( const char * oid = oidForAttributeName( attr ) ) {
// we need to translate the attribute name for the backend:
- rdns.push_back( QString::fromUtf8( oid ) + '=' + Kleo::DN::escape( value ) );
+ rdns.push_back( TQString::fromUtf8( oid ) + '=' + Kleo::DN::escape( value ) );
} else {
rdns.push_back( attr + '=' + Kleo::DN::escape( value ) );
}
@@ -246,8 +246,8 @@ void CertificateWizardImpl::slotGenerateCertificate()
Kleo::CryptoBackendFactory::instance()->smime()->keyGenerationJob();
assert( job );
- connect( job, SIGNAL(result(const GpgME::KeyGenerationResult&,const QByteArray&)),
- SLOT(slotResult(const GpgME::KeyGenerationResult&,const QByteArray&)) );
+ connect( job, TQT_SIGNAL(result(const GpgME::KeyGenerationResult&,const TQByteArray&)),
+ TQT_SLOT(slotResult(const GpgME::KeyGenerationResult&,const TQByteArray&)) );
certificateTE->setText( certParms );
@@ -255,7 +255,7 @@ void CertificateWizardImpl::slotGenerateCertificate()
if ( err )
KMessageBox::error( this,
i18n( "Could not start certificate generation: %1" )
- .arg( QString::fromLocal8Bit( err.asString() ) ),
+ .arg( TQString::fromLocal8Bit( err.asString() ) ),
i18n( "Certificate Manager Error" ) );
else {
generatePB->setEnabled( false );
@@ -266,7 +266,7 @@ void CertificateWizardImpl::slotGenerateCertificate()
void CertificateWizardImpl::slotResult( const GpgME::KeyGenerationResult & res,
- const QByteArray & keyData ) {
+ const TQByteArray & keyData ) {
//kdDebug() << "keyData.size(): " << keyData.size() << endl;
_keyData = keyData;
@@ -278,7 +278,7 @@ void CertificateWizardImpl::slotResult( const GpgME::KeyGenerationResult & res,
if ( !res.error().isCanceled() )
KMessageBox::error( this,
i18n( "Could not generate certificate: %1" )
- .arg( QString::fromLatin1( res.error().asString() ) ),
+ .arg( TQString::fromLatin1( res.error().asString() ) ),
i18n( "Certificate Manager Error" ) );
} else {
// next will stay enabled until the user clicks Generate
@@ -302,11 +302,11 @@ void CertificateWizardImpl::slotSetValuesFromWhoAmI()
for ( AttrPairList::const_iterator it = _attrPairList.begin() ;
it != _attrPairList.end() ; ++it ) {
- QLineEdit * le = (*it).second;
+ TQLineEdit * le = (*it).second;
if ( !availForMod( le ) )
continue;
- const QString attr = attributeFromKey( (*it).first.upper() );
+ const TQString attr = attributeFromKey( (*it).first.upper() );
if ( attr == "CN" )
le->setText( a.formattedName() );
else if ( attr == "EMAIL" )
@@ -334,29 +334,29 @@ void CertificateWizardImpl::slotSetValuesFromWhoAmI()
void CertificateWizardImpl::createPersonalDataPage()
{
- QGridLayout* grid = new QGridLayout( edContainer, 2, 1,
+ TQGridLayout* grid = new TQGridLayout( edContainer, 2, 1,
KDialog::marginHint(), KDialog::spacingHint() );
KConfigGroup config( KGlobal::config(), "CertificateCreationWizard" );
- QStringList attrOrder = config.readListEntry( "DNAttributeOrder" );
+ TQStringList attrOrder = config.readListEntry( "DNAttributeOrder" );
if ( attrOrder.empty() )
attrOrder << "CN!" << "L" << "OU" << "O!" << "C!" << "EMAIL!";
int row = 0;
- for ( QStringList::const_iterator it = attrOrder.begin() ; it != attrOrder.end() ; ++it, ++row ) {
- const QString key = (*it).stripWhiteSpace().upper();
- const QString attr = attributeFromKey( key );
+ for ( TQStringList::const_iterator it = attrOrder.begin() ; it != attrOrder.end() ; ++it, ++row ) {
+ const TQString key = (*it).stripWhiteSpace().upper();
+ const TQString attr = attributeFromKey( key );
if ( attr.isEmpty() ) {
--row;
continue;
}
- const QString preset = config.readEntry( attr );
- const QString label = config.readEntry( attr + "_label",
+ const TQString preset = config.readEntry( attr );
+ const TQString label = config.readEntry( attr + "_label",
attributeLabel( attr, key.endsWith("!") ) );
- QLineEdit * le = new QLineEdit( edContainer );
+ TQLineEdit * le = new TQLineEdit( edContainer );
grid->addWidget( le, row, 1 );
- grid->addWidget( new QLabel( le, label.isEmpty() ? attr : label, edContainer ), row, 0 );
+ grid->addWidget( new TQLabel( le, label.isEmpty() ? attr : label, edContainer ), row, 0 );
le->setText( preset );
if ( config.entryIsImmutable( attr ) )
@@ -364,8 +364,8 @@ void CertificateWizardImpl::createPersonalDataPage()
_attrPairList.append(qMakePair(key, le));
- connect( le, SIGNAL(textChanged(const QString&)),
- SLOT(slotEnablePersonalDataPageExit()) );
+ connect( le, TQT_SIGNAL(textChanged(const TQString&)),
+ TQT_SLOT(slotEnablePersonalDataPageExit()) );
}
// enable button only if administrator wants to allow it
@@ -380,17 +380,17 @@ bool CertificateWizardImpl::sendToCA() const {
return sendToCARB->isChecked();
}
-QString CertificateWizardImpl::caEMailAddress() const {
+TQString CertificateWizardImpl::caEMailAddress() const {
return caEmailED->text().stripWhiteSpace();
}
-void CertificateWizardImpl::slotURLSelected( const QString& _url )
+void CertificateWizardImpl::slotURLSelected( const TQString& _url )
{
KURL url = KURL::fromPathOrURL( _url.stripWhiteSpace() );
#if ! KDE_IS_VERSION(3,2,90)
// The application/pkcs10 mimetype didn't have a native extension,
// so the filedialog didn't have the checkbox for auto-adding it.
- QString fileName = url.fileName();
+ TQString fileName = url.fileName();
int pos = fileName.findRev( '.' );
if ( pos < 0 ) // no extension
url.setFileName( fileName + ".p10" );
@@ -402,7 +402,7 @@ KURL CertificateWizardImpl::saveFileUrl() const {
return KURL::fromPathOrURL( storeUR->url().stripWhiteSpace() );
}
-void CertificateWizardImpl::showPage( QWidget * page )
+void CertificateWizardImpl::showPage( TQWidget * page )
{
CertificateWizard::showPage( page );
if ( page == generatePage ) {
@@ -424,13 +424,13 @@ static const char* const dcopObjectId = "KMailIface";
/**
Send the new certificate by mail using KMail
*/
-void CertificateWizardImpl::sendCertificate( const QString& email, const QByteArray& certificateData )
+void CertificateWizardImpl::sendCertificate( const TQString& email, const TQByteArray& certificateData )
{
- QString error;
- QCString dcopService;
+ TQString error;
+ TQCString dcopService;
int result = KDCOPServiceStarter::self()->
- findServiceFor( "DCOP/Mailer", QString::null,
- QString::null, &error, &dcopService );
+ findServiceFor( "DCOP/Mailer", TQString::null,
+ TQString::null, &error, &dcopService );
if ( result != 0 ) {
kdDebug() << "Couldn't connect to KMail\n";
KMessageBox::error( this,
@@ -438,25 +438,25 @@ void CertificateWizardImpl::sendCertificate( const QString& email, const QByteAr
return;
}
- QCString dummy;
+ TQCString dummy;
// OK, so kmail (or kontact) is running. Now ensure the object we want is available.
// [that's not the case when kontact was already running, but kmail not loaded into it... in theory.]
- if ( !kapp->dcopClient()->findObject( dcopService, dcopObjectId, "", QByteArray(), dummy, dummy ) ) {
+ if ( !kapp->dcopClient()->findObject( dcopService, dcopObjectId, "", TQByteArray(), dummy, dummy ) ) {
DCOPRef ref( dcopService, dcopService ); // talk to the KUniqueApplication or its kontact wrapper
DCOPReply reply = ref.call( "load()" );
if ( reply.isValid() && (bool)reply ) {
- Q_ASSERT( kapp->dcopClient()->findObject( dcopService, dcopObjectId, "", QByteArray(), dummy, dummy ) );
+ Q_ASSERT( kapp->dcopClient()->findObject( dcopService, dcopObjectId, "", TQByteArray(), dummy, dummy ) );
} else
kdWarning() << "Error loading " << dcopService << endl;
}
DCOPClient* dcopClient = kapp->dcopClient();
- QByteArray data;
- QDataStream arg( data, IO_WriteOnly );
+ TQByteArray data;
+ TQDataStream arg( data, IO_WriteOnly );
arg << email;
arg << certificateData;
if( !dcopClient->send( dcopService, dcopObjectId,
- "sendCertificate(QString,QByteArray)", data ) ) {
+ "sendCertificate(TQString,TQByteArray)", data ) ) {
KMessageBox::error( this,
i18n( "DCOP Communication Error, unable to send certificate using KMail." ) );
return;
@@ -490,8 +490,8 @@ void CertificateWizardImpl::accept()
KIO::Job* uploadJob = KIOext::put( _keyData, url, -1, overwrite, false /*resume*/ );
uploadJob->setWindow( this );
- connect( uploadJob, SIGNAL( result( KIO::Job* ) ),
- this, SLOT( slotUploadResult( KIO::Job* ) ) );
+ connect( uploadJob, TQT_SIGNAL( result( KIO::Job* ) ),
+ this, TQT_SLOT( slotUploadResult( KIO::Job* ) ) );
// Can't press finish again during the upload
setFinishEnabled( finishPage, false );
}
diff --git a/certmanager/certificatewizardimpl.h b/certmanager/certificatewizardimpl.h
index d275cbc72..98327e816 100644
--- a/certmanager/certificatewizardimpl.h
+++ b/certmanager/certificatewizardimpl.h
@@ -34,9 +34,9 @@
#define CERTIFICATEWIZARDIMPL_H
#include "certificatewizard.h"
-#include <qcstring.h>
-#include <qvaluevector.h>
-#include <qlineedit.h>
+#include <tqcstring.h>
+#include <tqvaluevector.h>
+#include <tqlineedit.h>
#include <kurl.h>
namespace GpgME {
@@ -51,26 +51,26 @@ class CertificateWizardImpl : public CertificateWizard
Q_OBJECT
public:
- CertificateWizardImpl( QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
+ CertificateWizardImpl( TQWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
~CertificateWizardImpl();
bool sendToCA() const;
- QString caEMailAddress() const;
+ TQString caEMailAddress() const;
KURL saveFileUrl() const;
- typedef QPair<QString, QLineEdit*> StringLEPair;
- typedef QValueVector< StringLEPair > AttrPairList;
+ typedef QPair<TQString, TQLineEdit*> StringLEPair;
+ typedef TQValueVector< StringLEPair > AttrPairList;
public:
- virtual void showPage( QWidget * page );
+ virtual void showPage( TQWidget * page );
virtual void accept();
private slots:
void slotGenerateCertificate();
- void slotResult( const GpgME::KeyGenerationResult & res, const QByteArray & keyData );
+ void slotResult( const GpgME::KeyGenerationResult & res, const TQByteArray & keyData );
void slotSetValuesFromWhoAmI();
void slotEnablePersonalDataPageExit();
- void slotURLSelected( const QString& );
+ void slotURLSelected( const TQString& );
void slotHelpClicked();
@@ -78,11 +78,11 @@ private slots:
private:
void createPersonalDataPage();
- void sendCertificate( const QString& email, const QByteArray& certificateData );
+ void sendCertificate( const TQString& email, const TQByteArray& certificateData );
private:
AttrPairList _attrPairList;
- QByteArray _keyData;
+ TQByteArray _keyData;
};
#endif // CERTIFICATEWIZARDIMPL_H
diff --git a/certmanager/certlistview.cpp b/certmanager/certlistview.cpp
index acb6e8916..f26ba17f8 100644
--- a/certmanager/certlistview.cpp
+++ b/certmanager/certlistview.cpp
@@ -5,34 +5,34 @@
CertKeyListView::CertKeyListView( const ColumnStrategy * strategy,
const DisplayStrategy * display,
- QWidget * parent, const char * name, WFlags f )
+ TQWidget * parent, const char * name, WFlags f )
: Kleo::KeyListView( strategy, display, parent, name, f )
{
viewport()->setAcceptDrops( true );
}
-void CertKeyListView::contentsDragEnterEvent( QDragEnterEvent * event )
+void CertKeyListView::contentsDragEnterEvent( TQDragEnterEvent * event )
{
//const char* fmt;
//for (int i=0; (fmt = event->format(i)); i++)
// kdDebug() << fmt << endl;
// We only accept URL drops. We'll check the mimetype later on.
- event->accept( QUriDrag::canDecode( event ) );
+ event->accept( TQUriDrag::canDecode( event ) );
}
-void CertKeyListView::contentsDragMoveEvent( QDragMoveEvent * event )
+void CertKeyListView::contentsDragMoveEvent( TQDragMoveEvent * event )
{
- event->accept( QUriDrag::canDecode( event ) );
+ event->accept( TQUriDrag::canDecode( event ) );
}
-void CertKeyListView::contentsDragLeaveEvent( QDragLeaveEvent * )
+void CertKeyListView::contentsDragLeaveEvent( TQDragLeaveEvent * )
{
- // Don't let QListView do its stuff
+ // Don't let TQListView do its stuff
}
-void CertKeyListView::contentsDropEvent( QDropEvent * event )
+void CertKeyListView::contentsDropEvent( TQDropEvent * event )
{
KURL::List lst;
if ( KURLDrag::decode( event, lst ) ) {
diff --git a/certmanager/certlistview.h b/certmanager/certlistview.h
index 311b42050..d06caf99f 100644
--- a/certmanager/certlistview.h
+++ b/certmanager/certlistview.h
@@ -11,16 +11,16 @@ class CertKeyListView : public Kleo::KeyListView {
public:
CertKeyListView( const ColumnStrategy * strategy,
const DisplayStrategy * display=0,
- QWidget * parent=0, const char * name=0, WFlags f=0 );
+ TQWidget * parent=0, const char * name=0, WFlags f=0 );
signals:
void dropped( const KURL::List& urls );
protected:
- virtual void contentsDragEnterEvent ( QDragEnterEvent * );
- virtual void contentsDragMoveEvent( QDragMoveEvent * );
- virtual void contentsDragLeaveEvent( QDragLeaveEvent * );
- virtual void contentsDropEvent ( QDropEvent * );
+ virtual void contentsDragEnterEvent ( TQDragEnterEvent * );
+ virtual void contentsDragMoveEvent( TQDragMoveEvent * );
+ virtual void contentsDragLeaveEvent( TQDragLeaveEvent * );
+ virtual void contentsDropEvent ( TQDropEvent * );
};
diff --git a/certmanager/certmanager.cpp b/certmanager/certmanager.cpp
index b27f2ad57..f12411bf5 100644
--- a/certmanager/certmanager.cpp
+++ b/certmanager/certmanager.cpp
@@ -90,8 +90,8 @@
#include <kstdaccel.h>
// Qt
-#include <qfontmetrics.h>
-#include <qpopupmenu.h>
+#include <tqfontmetrics.h>
+#include <tqpopupmenu.h>
// other
#include <algorithm>
@@ -104,17 +104,17 @@ namespace {
public:
~DisplayStrategy() {}
- virtual QFont keyFont( const GpgME::Key& key, const QFont& font ) const {
+ virtual TQFont keyFont( const GpgME::Key& key, const TQFont& font ) const {
const Kleo::KeyFilter* filter = Kleo::KeyFilterManager::instance()->filterMatching( key );
return filter ? filter->font( font ) : font;
}
- virtual QColor keyForeground( const GpgME::Key& key, const QColor& c ) const {
+ virtual TQColor keyForeground( const GpgME::Key& key, const TQColor& c ) const {
const Kleo::KeyFilter* filter = Kleo::KeyFilterManager::instance()->filterMatching( key );
if ( filter && filter->fgColor().isValid() )
return filter->fgColor();
return c;
}
- virtual QColor keyBackground( const GpgME::Key& key, const QColor& c ) const {
+ virtual TQColor keyBackground( const GpgME::Key& key, const TQColor& c ) const {
const Kleo::KeyFilter* filter = Kleo::KeyFilterManager::instance()->filterMatching( key );
if ( filter && filter->bgColor().isValid() )
return filter->bgColor();
@@ -126,30 +126,30 @@ namespace {
public:
~ColumnStrategy() {}
- QString title( int col ) const;
- QString text( const GpgME::Key & key, int col ) const;
- int width( int col, const QFontMetrics & fm ) const;
+ TQString title( int col ) const;
+ TQString text( const GpgME::Key & key, int col ) const;
+ int width( int col, const TQFontMetrics & fm ) const;
};
- QString ColumnStrategy::title( int col ) const {
+ TQString ColumnStrategy::title( int col ) const {
switch ( col ) {
case 0: return i18n("Subject");
case 1: return i18n("Issuer");
case 2: return i18n("Serial");
- default: return QString::null;
+ default: return TQString::null;
}
}
- QString ColumnStrategy::text( const GpgME::Key & key, int col ) const {
+ TQString ColumnStrategy::text( const GpgME::Key & key, int col ) const {
switch ( col ) {
case 0: return Kleo::DN( key.userID(0).id() ).prettyDN();
case 1: return Kleo::DN( key.issuerName() ).prettyDN();
- case 2: return key.issuerSerial() ? QString::fromUtf8( key.issuerSerial() ) : QString::null ;
- default: return QString::null;
+ case 2: return key.issuerSerial() ? TQString::fromUtf8( key.issuerSerial() ) : TQString::null ;
+ default: return TQString::null;
}
}
- int ColumnStrategy::width( int col, const QFontMetrics & fm ) const {
+ int ColumnStrategy::width( int col, const TQFontMetrics & fm ) const {
int factor = -1;
switch ( col ) {
case 0: factor = 6; break;
@@ -160,8 +160,8 @@ namespace {
}
} // anon namespace
-CertManager::CertManager( bool remote, const QString& query, const QString & import,
- QWidget* parent, const char* name, WFlags f )
+CertManager::CertManager( bool remote, const TQString& query, const TQString & import,
+ TQWidget* parent, const char* name, WFlags f )
: KMainWindow( parent, name, f|WDestructiveClose ),
mCrlView( 0 ),
mDirmngrProc( 0 ),
@@ -184,20 +184,20 @@ CertManager::CertManager( bool remote, const QString& query, const QString & imp
// Main Window --------------------------------------------------
mKeyListView = new CertKeyListView( new ColumnStrategy(), new DisplayStrategy(), this, "mKeyListView" );
- mKeyListView->setSelectionMode( QListView::Extended );
+ mKeyListView->setSelectionMode( TQListView::Extended );
setCentralWidget( mKeyListView );
- connect( mKeyListView, SIGNAL(doubleClicked(Kleo::KeyListViewItem*,const QPoint&,int)),
- SLOT(slotViewDetails(Kleo::KeyListViewItem*)) );
- connect( mKeyListView, SIGNAL(returnPressed(Kleo::KeyListViewItem*)),
- SLOT(slotViewDetails(Kleo::KeyListViewItem*)) );
- connect( mKeyListView, SIGNAL(selectionChanged()),
- SLOT(slotSelectionChanged()) );
- connect( mKeyListView, SIGNAL(contextMenu(Kleo::KeyListViewItem*, const QPoint&)),
- SLOT(slotContextMenu(Kleo::KeyListViewItem*, const QPoint&)) );
+ connect( mKeyListView, TQT_SIGNAL(doubleClicked(Kleo::KeyListViewItem*,const TQPoint&,int)),
+ TQT_SLOT(slotViewDetails(Kleo::KeyListViewItem*)) );
+ connect( mKeyListView, TQT_SIGNAL(returnPressed(Kleo::KeyListViewItem*)),
+ TQT_SLOT(slotViewDetails(Kleo::KeyListViewItem*)) );
+ connect( mKeyListView, TQT_SIGNAL(selectionChanged()),
+ TQT_SLOT(slotSelectionChanged()) );
+ connect( mKeyListView, TQT_SIGNAL(contextMenu(Kleo::KeyListViewItem*, const TQPoint&)),
+ TQT_SLOT(slotContextMenu(Kleo::KeyListViewItem*, const TQPoint&)) );
- connect( mKeyListView, SIGNAL(dropped(const KURL::List&) ),
- SLOT( slotDropped(const KURL::List&) ) );
+ connect( mKeyListView, TQT_SIGNAL(dropped(const KURL::List&) ),
+ TQT_SLOT( slotDropped(const KURL::List&) ) );
mLineEditAction->setText(query);
if ( !mRemote && !mNextFindRemote || !query.isEmpty() )
@@ -237,24 +237,24 @@ void CertManager::createStatusBar() {
KStatusBar * bar = statusBar();
mProgressBar = new Kleo::ProgressBar( bar, "mProgressBar" );
mProgressBar->reset();
- mProgressBar->setFixedSize( QSize( 100, mProgressBar->height() * 3 / 5 ) );
+ mProgressBar->setFixedSize( TQSize( 100, mProgressBar->height() * 3 / 5 ) );
bar->addWidget( mProgressBar, 0, true );
- mStatusLabel = new QLabel( bar, "mStatusLabel" );
+ mStatusLabel = new TQLabel( bar, "mStatusLabel" );
bar->addWidget( mStatusLabel, 1, false );
}
-static inline void connectEnableOperationSignal( QObject * s, QObject * d ) {
- QObject::connect( s, SIGNAL(enableOperations(bool)),
- d, SLOT(setEnabled(bool)) );
+static inline void connectEnableOperationSignal( TQObject * s, TQObject * d ) {
+ TQObject::connect( s, TQT_SIGNAL(enableOperations(bool)),
+ d, TQT_SLOT(setEnabled(bool)) );
}
void CertManager::createActions() {
KAction * action = 0;
- (void)KStdAction::quit( this, SLOT(close()), actionCollection() );
+ (void)KStdAction::quit( this, TQT_SLOT(close()), actionCollection() );
- action = KStdAction::redisplay( this, SLOT(slotRedisplay()), actionCollection() );
+ action = KStdAction::redisplay( this, TQT_SLOT(slotRedisplay()), actionCollection() );
// work around the fact that the stdaction has no shortcut
KShortcut reloadShortcut = KStdAccel::shortcut(KStdAccel::Reload);
reloadShortcut.append(KKey(CTRL + Key_R));
@@ -263,113 +263,113 @@ void CertManager::createActions() {
connectEnableOperationSignal( this, action );
action = new KAction( i18n("Stop Operation"), "stop", Key_Escape,
- this, SIGNAL(stopOperations()),
+ this, TQT_SIGNAL(stopOperations()),
actionCollection(), "view_stop_operations" );
action->setEnabled( false );
(void) new KAction( i18n("New Key Pair..."), "filenew", 0,
- this, SLOT(newCertificate()),
+ this, TQT_SLOT(newCertificate()),
actionCollection(), "file_new_certificate" );
connect( new KToggleAction( i18n("Hierarchical Key List"), 0,
actionCollection(), "view_hierarchical" ),
- SIGNAL(toggled(bool)), SLOT(slotToggleHierarchicalView(bool)) );
+ TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotToggleHierarchicalView(bool)) );
action = new KAction( i18n("Expand All"), 0, CTRL+Key_Period,
- this, SLOT(slotExpandAll()),
+ this, TQT_SLOT(slotExpandAll()),
actionCollection(), "view_expandall" );
action = new KAction( i18n("Collapse All"), 0, CTRL+Key_Comma,
- this, SLOT(slotCollapseAll()),
+ this, TQT_SLOT(slotCollapseAll()),
actionCollection(), "view_collapseall" );
(void) new KAction( i18n("Refresh CRLs"), 0, 0,
- this, SLOT(slotRefreshKeys()),
+ this, TQT_SLOT(slotRefreshKeys()),
actionCollection(), "certificates_refresh_clr" );
#ifdef NOT_IMPLEMENTED_ANYWAY
mRevokeCertificateAction = new KAction( i18n("Revoke"), 0,
- this, SLOT(revokeCertificate()),
+ this, TQT_SLOT(revokeCertificate()),
actionCollection(), "edit_revoke_certificate" );
connectEnableOperationSignal( this, mRevokeCertificateAction );
mExtendCertificateAction = new KAction( i18n("Extend"), 0,
- this, SLOT(extendCertificate()),
+ this, TQT_SLOT(extendCertificate()),
actionCollection(), "edit_extend_certificate" );
connectEnableOperationSignal( this, mExtendCertificateAction );
#endif
mDeleteCertificateAction = new KAction( i18n("Delete"), "editdelete", Key_Delete,
- this, SLOT(slotDeleteCertificate()),
+ this, TQT_SLOT(slotDeleteCertificate()),
actionCollection(), "edit_delete_certificate" );
connectEnableOperationSignal( this, mDeleteCertificateAction );
mValidateCertificateAction = new KAction( i18n("Validate"), "reload", SHIFT + Key_F5,
- this, SLOT(slotValidate()),
+ this, TQT_SLOT(slotValidate()),
actionCollection(), "certificates_validate" );
connectEnableOperationSignal( this, mValidateCertificateAction );
mImportCertFromFileAction = new KAction( i18n("Import Certificates..."), 0,
- this, SLOT(slotImportCertFromFile()),
+ this, TQT_SLOT(slotImportCertFromFile()),
actionCollection(), "file_import_certificates" );
connectEnableOperationSignal( this, mImportCertFromFileAction );
mImportCRLFromFileAction = new KAction( i18n("Import CRLs..."), 0,
- this, SLOT(importCRLFromFile()),
+ this, TQT_SLOT(importCRLFromFile()),
actionCollection(), "file_import_crls" );
connectEnableOperationSignal( this, mImportCRLFromFileAction );
mExportCertificateAction = new KAction( i18n("Export Certificates..."), "export", 0,
- this, SLOT(slotExportCertificate()),
+ this, TQT_SLOT(slotExportCertificate()),
actionCollection(), "file_export_certificate" );
mExportSecretKeyAction = new KAction( i18n("Export Secret Key..."), "export", 0,
- this, SLOT(slotExportSecretKey()),
+ this, TQT_SLOT(slotExportSecretKey()),
actionCollection(), "file_export_secret_keys" );
connectEnableOperationSignal( this, mExportSecretKeyAction );
mViewCertDetailsAction = new KAction( i18n("Certificate Details..."), 0, 0,
- this, SLOT(slotViewDetails()), actionCollection(),
+ this, TQT_SLOT(slotViewDetails()), actionCollection(),
"view_certificate_details" );
mDownloadCertificateAction = new KAction( i18n( "Download"), 0, 0,
- this, SLOT(slotDownloadCertificate()), actionCollection(),
+ this, TQT_SLOT(slotDownloadCertificate()), actionCollection(),
"download_certificate" );
- const QString dirmngr = KStandardDirs::findExe( "gpgsm" );
+ const TQString dirmngr = KStandardDirs::findExe( "gpgsm" );
mDirMngrFound = !dirmngr.isEmpty();
action = new KAction( i18n("Dump CRL Cache..."), 0,
- this, SLOT(slotViewCRLs()),
+ this, TQT_SLOT(slotViewCRLs()),
actionCollection(), "crl_dump_crl_cache" );
action->setEnabled( mDirMngrFound ); // we also need dirmngr for this
action = new KAction( i18n("Clear CRL Cache..."), 0,
- this, SLOT(slotClearCRLs()),
+ this, TQT_SLOT(slotClearCRLs()),
actionCollection(), "crl_clear_crl_cache" );
action->setEnabled( mDirMngrFound ); // we also need dirmngr for this
action = new KAction( i18n("GnuPG Log Viewer..."), "pgp-keys", 0, this,
- SLOT(slotStartWatchGnuPG()), actionCollection(), "tools_start_kwatchgnupg");
+ TQT_SLOT(slotStartWatchGnuPG()), actionCollection(), "tools_start_kwatchgnupg");
// disable action if no kwatchgnupg binary is around
if (KStandardDirs::findExe("kwatchgnupg").isEmpty()) action->setEnabled(false);
(void)new LabelAction( i18n("Search:"), actionCollection(), "label_action" );
- mLineEditAction = new LineEditAction( QString::null, actionCollection(), this,
- SLOT(slotSearch()),
+ mLineEditAction = new LineEditAction( TQString::null, actionCollection(), this,
+ TQT_SLOT(slotSearch()),
"query_lineedit_action");
- QStringList lst;
+ TQStringList lst;
lst << i18n("In Local Certificates") << i18n("In External Certificates");
- mComboAction = new ComboAction( lst, actionCollection(), this, SLOT( slotToggleRemote(int) ),
+ mComboAction = new ComboAction( lst, actionCollection(), this, TQT_SLOT( slotToggleRemote(int) ),
"location_combo_action", mNextFindRemote? 1 : 0 );
- mFindAction = new KAction( i18n("Find"), "find", 0, this, SLOT(slotSearch()),
+ mFindAction = new KAction( i18n("Find"), "find", 0, this, TQT_SLOT(slotSearch()),
actionCollection(), "find" );
- KStdAction::keyBindings( this, SLOT(slotEditKeybindings()), actionCollection() );
- KStdAction::preferences( this, SLOT(slotShowConfigurationDialog()), actionCollection() );
+ KStdAction::keyBindings( this, TQT_SLOT(slotEditKeybindings()), actionCollection() );
+ KStdAction::preferences( this, TQT_SLOT(slotShowConfigurationDialog()), actionCollection() );
- new KAction( i18n( "Configure &GpgME Backend" ), 0, 0, this, SLOT(slotConfigureGpgME()),
+ new KAction( i18n( "Configure &GpgME Backend" ), 0, 0, this, TQT_SLOT(slotConfigureGpgME()),
actionCollection(), "configure_gpgme" );
createStandardStatusBarAction();
@@ -387,7 +387,7 @@ void CertManager::slotEditKeybindings() {
void CertManager::slotShowConfigurationDialog() {
ConfigureDialog dlg( this );
- connect( &dlg, SIGNAL( configCommitted() ), SLOT( slotRepaint() ) );
+ connect( &dlg, TQT_SIGNAL( configCommitted() ), TQT_SLOT( slotRepaint() ) );
dlg.exec();
}
@@ -402,10 +402,10 @@ void CertManager::slotConfigureGpgME() {
// when reopening the configuration dialog.
config->clear();
- if ( result == QDialog::Accepted )
+ if ( result == TQDialog::Accepted )
{
// Tell other apps (e.g. kmail) that the gpgconf data might have changed
- kapp->dcopClient()->emitDCOPSignal( "KPIM::CryptoConfig", "changed()", QByteArray() );
+ kapp->dcopClient()->emitDCOPSignal( "KPIM::CryptoConfig", "changed()", TQByteArray() );
}
}
}
@@ -436,25 +436,25 @@ void CertManager::slotToggleHierarchicalView( bool hier ) {
}
void CertManager::slotExpandAll() {
- for ( QListViewItemIterator it( mKeyListView ) ; it.current() ; ++it )
+ for ( TQListViewItemIterator it( mKeyListView ) ; it.current() ; ++it )
it.current()->setOpen( true );
}
void CertManager::slotCollapseAll() {
- for ( QListViewItemIterator it( mKeyListView ) ; it.current() ; ++it )
+ for ( TQListViewItemIterator it( mKeyListView ) ; it.current() ; ++it )
it.current()->setOpen( false );
}
-void CertManager::connectJobToStatusBarProgress( Kleo::Job * job, const QString & initialText ) {
+void CertManager::connectJobToStatusBarProgress( Kleo::Job * job, const TQString & initialText ) {
assert( mProgressBar );
if ( !job )
return;
if ( !initialText.isEmpty() )
statusBar()->message( initialText );
- connect( job, SIGNAL(progress(const QString&,int,int)),
- mProgressBar, SLOT(slotProgress(const QString&,int,int)) );
- connect( job, SIGNAL(done()), mProgressBar, SLOT(reset()) );
- connect( this, SIGNAL(stopOperations()), job, SLOT(slotCancel()) );
+ connect( job, TQT_SIGNAL(progress(const TQString&,int,int)),
+ mProgressBar, TQT_SLOT(slotProgress(const TQString&,int,int)) );
+ connect( job, TQT_SIGNAL(done()), mProgressBar, TQT_SLOT(reset()) );
+ connect( this, TQT_SIGNAL(stopOperations()), job, TQT_SLOT(slotCancel()) );
action("view_stop_operations")->setEnabled( true );
emit enableOperations( false );
@@ -462,7 +462,7 @@ void CertManager::connectJobToStatusBarProgress( Kleo::Job * job, const QString
void CertManager::disconnectJobFromStatusBarProgress( const GpgME::Error & err ) {
updateStatusBarLabels();
- const QString msg = err.isCanceled() ? i18n("Canceled.")
+ const TQString msg = err.isCanceled() ? i18n("Canceled.")
: err ? i18n("Failed.")
: i18n("Done.") ;
statusBar()->message( msg, 4000 );
@@ -475,7 +475,7 @@ void CertManager::disconnectJobFromStatusBarProgress( const GpgME::Error & err )
void CertManager::updateStatusBarLabels() {
mKeyListView->flushKeys();
int total = 0;
- for ( QListViewItemIterator it( mKeyListView ) ; it.current() ; ++it )
+ for ( TQListViewItemIterator it( mKeyListView ) ; it.current() ; ++it )
++total;
mStatusLabel->setText( i18n( "%n Key.","%n Keys.", total ) );
}
@@ -487,30 +487,30 @@ void CertManager::updateStatusBarLabels() {
//
-static std::set<std::string> extractKeyFingerprints( const QPtrList<Kleo::KeyListViewItem> & items ) {
+static std::set<std::string> extractKeyFingerprints( const TQPtrList<Kleo::KeyListViewItem> & items ) {
std::set<std::string> result;
- for ( QPtrListIterator<Kleo::KeyListViewItem> it( items ) ; it.current() ; ++it )
+ for ( TQPtrListIterator<Kleo::KeyListViewItem> it( items ) ; it.current() ; ++it )
if ( const char * fpr = it.current()->key().primaryFingerprint() )
result.insert( fpr );
return result;
}
-static QStringList stringlistFromSet( const std::set<std::string> & set ) {
- // ARGH. This is madness. Shitty Qt containers don't support QStringList( patterns.begin(), patterns.end() ) :/
- QStringList sl;
+static TQStringList stringlistFromSet( const std::set<std::string> & set ) {
+ // ARGH. This is madness. Shitty Qt containers don't support TQStringList( patterns.begin(), patterns.end() ) :/
+ TQStringList sl;
for ( std::set<std::string>::const_iterator it = set.begin() ; it != set.end() ; ++it )
- // let's make extra sure, maybe someone tries to make Qt not support std::string->QString conversion
- sl.push_back( QString::fromLatin1( it->c_str() ) );
+ // let's make extra sure, maybe someone tries to make Qt not support std::string->TQString conversion
+ sl.push_back( TQString::fromLatin1( it->c_str() ) );
return sl;
}
void CertManager::slotRefreshKeys() {
- const QStringList keys = stringlistFromSet( extractKeyFingerprints( mKeyListView->selectedItems() ) );
+ const TQStringList keys = stringlistFromSet( extractKeyFingerprints( mKeyListView->selectedItems() ) );
Kleo::RefreshKeysJob * job = Kleo::CryptoBackendFactory::instance()->smime()->refreshKeysJob();
assert( job );
- connect( job, SIGNAL(result(const GpgME::Error&)),
- this, SLOT(slotRefreshKeysResult(const GpgME::Error&)) );
+ connect( job, TQT_SIGNAL(result(const GpgME::Error&)),
+ this, TQT_SLOT(slotRefreshKeysResult(const GpgME::Error&)) );
connectJobToStatusBarProgress( job, i18n("Refreshing keys...") );
if ( const GpgME::Error err = job->start( keys ) )
@@ -523,16 +523,16 @@ void CertManager::slotRefreshKeysResult( const GpgME::Error & err ) {
return;
if ( err )
KMessageBox::error( this, i18n("An error occurred while trying to refresh "
- "keys:\n%1").arg( QString::fromLocal8Bit( err.asString() ) ),
+ "keys:\n%1").arg( TQString::fromLocal8Bit( err.asString() ) ),
i18n("Refreshing Keys Failed") );
}
-static void showKeyListError( QWidget * parent, const GpgME::Error & err ) {
+static void showKeyListError( TQWidget * parent, const GpgME::Error & err ) {
assert( err );
- const QString msg = i18n( "<qt><p>An error occurred while fetching "
+ const TQString msg = i18n( "<qt><p>An error occurred while fetching "
"the certificates from the backend:</p>"
"<p><b>%1</b></p></qt>" )
- .arg( QString::fromLocal8Bit( err.asString() ) );
+ .arg( TQString::fromLocal8Bit( err.asString() ) );
KMessageBox::error( parent, msg, i18n( "Certificate Listing Failed" ) );
}
@@ -557,7 +557,7 @@ void CertManager::startKeyListing( bool validating, bool refresh, const std::set
startKeyListing( validating, refresh, stringlistFromSet( patterns ) );
}
-void CertManager::startKeyListing( bool validating, bool refresh, const QStringList & patterns ) {
+void CertManager::startKeyListing( bool validating, bool refresh, const TQStringList & patterns ) {
mRemote = mNextFindRemote;
mLineEditAction->setEnabled( false );
mComboAction->setEnabled( false );
@@ -571,10 +571,10 @@ void CertManager::startKeyListing( bool validating, bool refresh, const QStringL
job = Kleo::CryptoBackendFactory::instance()->smime()->keyListJob( mRemote, false, validating );
assert( job );
- connect( job, SIGNAL(nextKey(const GpgME::Key&)),
- mKeyListView, refresh ? SLOT(slotRefreshKey(const GpgME::Key&)) : SLOT(slotAddKey(const GpgME::Key&)) );
- connect( job, SIGNAL(result(const GpgME::KeyListResult&)),
- this, SLOT(slotKeyListResult(const GpgME::KeyListResult&)) );
+ connect( job, TQT_SIGNAL(nextKey(const GpgME::Key&)),
+ mKeyListView, refresh ? TQT_SLOT(slotRefreshKey(const GpgME::Key&)) : TQT_SLOT(slotAddKey(const GpgME::Key&)) );
+ connect( job, TQT_SIGNAL(result(const GpgME::KeyListResult&)),
+ this, TQT_SLOT(slotKeyListResult(const GpgME::KeyListResult&)) );
connectJobToStatusBarProgress( job, i18n("Fetching keys...") );
@@ -589,7 +589,7 @@ void CertManager::startKeyListing( bool validating, bool refresh, const QStringL
static void selectKeys( Kleo::KeyListView * lv, const std::set<std::string> & fprs ) {
if ( !lv || fprs.empty() )
return;
- for ( QListViewItemIterator it( lv ) ; it.current() ; ++it )
+ for ( TQListViewItemIterator it( lv ) ; it.current() ; ++it )
if ( Kleo::KeyListViewItem * item = Kleo::lvi_cast<Kleo::KeyListViewItem>( it.current() ) ) {
const char * fpr = item->key().primaryFingerprint();
item->setSelected( fpr && fprs.find( fpr ) != fprs.end() );
@@ -619,10 +619,10 @@ void CertManager::slotKeyListResult( const GpgME::KeyListResult & res ) {
selectKeys( mKeyListView, mPreviouslySelectedFingerprints );
}
-void CertManager::slotContextMenu(Kleo::KeyListViewItem* item, const QPoint& point) {
+void CertManager::slotContextMenu(Kleo::KeyListViewItem* item, const TQPoint& point) {
if ( !item )
return;
- if ( QPopupMenu * popup = static_cast<QPopupMenu*>(factory()->container("listview_popup",this)) )
+ if ( TQPopupMenu * popup = static_cast<TQPopupMenu*>(factory()->container("listview_popup",this)) )
popup->exec( point );
}
@@ -666,9 +666,9 @@ void CertManager::extendCertificate()
*/
void CertManager::slotImportCertFromFile()
{
- const QString filter = "application/x-x509-ca-cert application/x-pkcs12 application/pkcs7-mime";
- //const QString filter = QString("*.pem *.der *.p7c *.p12|") + i18n("Certificates (*.pem *.der *.p7c *.p12)");
- slotImportCertFromFile( KFileDialog::getOpenURL( QString::null, filter, this,
+ const TQString filter = "application/x-x509-ca-cert application/x-pkcs12 application/pkcs7-mime";
+ //const TQString filter = TQString("*.pem *.der *.p7c *.p12|") + i18n("Certificates (*.pem *.der *.p7c *.p12)");
+ slotImportCertFromFile( KFileDialog::getOpenURL( TQString::null, filter, this,
i18n( "Select Certificate File" ) ) );
}
@@ -685,7 +685,7 @@ void CertManager::slotImportCertFromFile( const KURL & certURL )
// Download the cert
KIOext::StoredTransferJob* importJob = KIOext::storedGet( certURL );
importJob->setWindow( this );
- connect( importJob, SIGNAL(result(KIO::Job*)), SLOT(slotImportResult(KIO::Job*)) );
+ connect( importJob, TQT_SIGNAL(result(KIO::Job*)), TQT_SLOT(slotImportResult(KIO::Job*)) );
}
void CertManager::slotImportResult( KIO::Job* job )
@@ -700,28 +700,28 @@ void CertManager::slotImportResult( KIO::Job* job )
updateImportActions( true );
}
-static void showCertificateDownloadError( QWidget * parent, const GpgME::Error & err, const QString& certDisplayName ) {
+static void showCertificateDownloadError( TQWidget * parent, const GpgME::Error & err, const TQString& certDisplayName ) {
assert( err );
- const QString msg = i18n( "<qt><p>An error occurred while trying "
+ const TQString msg = i18n( "<qt><p>An error occurred while trying "
"to download the certificate %1:</p>"
"<p><b>%2</b></p></qt>" )
.arg( certDisplayName )
- .arg( QString::fromLocal8Bit( err.asString() ) );
+ .arg( TQString::fromLocal8Bit( err.asString() ) );
KMessageBox::error( parent, msg, i18n( "Certificate Download Failed" ) );
}
void CertManager::slotDownloadCertificate() {
mPreviouslySelectedFingerprints.clear();
- QPtrList<Kleo::KeyListViewItem> items = mKeyListView->selectedItems();
- for ( QPtrListIterator<Kleo::KeyListViewItem> it( items ) ; it.current() ; ++it )
+ TQPtrList<Kleo::KeyListViewItem> items = mKeyListView->selectedItems();
+ for ( TQPtrListIterator<Kleo::KeyListViewItem> it( items ) ; it.current() ; ++it )
if ( !it.current()->key().isNull() )
if ( const char * fpr = it.current()->key().primaryFingerprint() )
slotStartCertificateDownload( fpr, it.current()->text(0) );
}
// Called from slotDownloadCertificate and from the certificate-details widget
-void CertManager::slotStartCertificateDownload( const QString& fingerprint, const QString& displayName ) {
+void CertManager::slotStartCertificateDownload( const TQString& fingerprint, const TQString& displayName ) {
if ( fingerprint.isEmpty() )
return;
@@ -729,8 +729,8 @@ void CertManager::slotStartCertificateDownload( const QString& fingerprint, cons
Kleo::CryptoBackendFactory::instance()->smime()->downloadJob( false /* no armor */ );
assert( job );
- connect( job, SIGNAL(result(const GpgME::Error&,const QByteArray&)),
- SLOT(slotCertificateDownloadResult(const GpgME::Error&,const QByteArray&)) );
+ connect( job, TQT_SIGNAL(result(const GpgME::Error&,const TQByteArray&)),
+ TQT_SLOT(slotCertificateDownloadResult(const GpgME::Error&,const TQByteArray&)) );
connectJobToStatusBarProgress( job, i18n("Fetching certificate from server...") );
@@ -743,10 +743,10 @@ void CertManager::slotStartCertificateDownload( const QString& fingerprint, cons
}
}
-QString CertManager::displayNameForJob( const Kleo::Job *job )
+TQString CertManager::displayNameForJob( const Kleo::Job *job )
{
JobsDisplayNameMap::iterator it = mJobsDisplayNameMap.find( job );
- QString displayName;
+ TQString displayName;
if ( it != mJobsDisplayNameMap.end() ) {
displayName = *it;
mJobsDisplayNameMap.remove( it );
@@ -757,9 +757,9 @@ QString CertManager::displayNameForJob( const Kleo::Job *job )
}
// Don't call directly!
-void CertManager::slotCertificateDownloadResult( const GpgME::Error & err, const QByteArray & keyData ) {
+void CertManager::slotCertificateDownloadResult( const GpgME::Error & err, const TQByteArray & keyData ) {
- QString displayName = displayNameForJob( static_cast<const Kleo::Job *>( sender() ) );
+ TQString displayName = displayNameForJob( static_cast<const Kleo::Job *>( sender() ) );
if ( err )
showCertificateDownloadError( this, err, displayName );
@@ -768,22 +768,22 @@ void CertManager::slotCertificateDownloadResult( const GpgME::Error & err, const
disconnectJobFromStatusBarProgress( err );
}
-static void showCertificateImportError( QWidget * parent, const GpgME::Error & err, const QString& certDisplayName ) {
+static void showCertificateImportError( TQWidget * parent, const GpgME::Error & err, const TQString& certDisplayName ) {
assert( err );
- const QString msg = i18n( "<qt><p>An error occurred while trying "
+ const TQString msg = i18n( "<qt><p>An error occurred while trying "
"to import the certificate %1:</p>"
"<p><b>%2</b></p></qt>" )
.arg( certDisplayName )
- .arg( QString::fromLocal8Bit( err.asString() ) );
+ .arg( TQString::fromLocal8Bit( err.asString() ) );
KMessageBox::error( parent, msg, i18n( "Certificate Import Failed" ) );
}
-void CertManager::startCertificateImport( const QByteArray & keyData, const QString& certDisplayName ) {
+void CertManager::startCertificateImport( const TQByteArray & keyData, const TQString& certDisplayName ) {
Kleo::ImportJob * job = Kleo::CryptoBackendFactory::instance()->smime()->importJob();
assert( job );
- connect( job, SIGNAL(result(const GpgME::ImportResult&)),
- SLOT(slotCertificateImportResult(const GpgME::ImportResult&)) );
+ connect( job, TQT_SIGNAL(result(const GpgME::ImportResult&)),
+ TQT_SLOT(slotCertificateImportResult(const GpgME::ImportResult&)) );
connectJobToStatusBarProgress( job, i18n("Importing certificates...") );
@@ -798,7 +798,7 @@ void CertManager::startCertificateImport( const QByteArray & keyData, const QStr
}
void CertManager::slotCertificateImportResult( const GpgME::ImportResult & res ) {
- QString displayName = displayNameForJob( static_cast<const Kleo::Job *>( sender() ) );
+ TQString displayName = displayNameForJob( static_cast<const Kleo::Job *>( sender() ) );
if ( res.error().isCanceled() ) {
// do nothing
@@ -806,54 +806,54 @@ void CertManager::slotCertificateImportResult( const GpgME::ImportResult & res )
showCertificateImportError( this, res.error(), displayName );
} else {
- const QString normalLine = i18n("<tr><td align=\"right\">%1</td><td>%2</td></tr>");
- const QString boldLine = i18n("<tr><td align=\"right\"><b>%1</b></td><td>%2</td></tr>");
+ const TQString normalLine = i18n("<tr><td align=\"right\">%1</td><td>%2</td></tr>");
+ const TQString boldLine = i18n("<tr><td align=\"right\"><b>%1</b></td><td>%2</td></tr>");
- QStringList lines;
+ TQStringList lines;
lines.push_back( normalLine.arg( i18n("Total number processed:"),
- QString::number( res.numConsidered() ) ) );
+ TQString::number( res.numConsidered() ) ) );
lines.push_back( normalLine.arg( i18n("Imported:"),
- QString::number( res.numImported() ) ) );
+ TQString::number( res.numImported() ) ) );
if ( res.newSignatures() )
lines.push_back( normalLine.arg( i18n("New signatures:"),
- QString::number( res.newSignatures() ) ) );
+ TQString::number( res.newSignatures() ) ) );
if ( res.newUserIDs() )
lines.push_back( normalLine.arg( i18n("New user IDs:"),
- QString::number( res.newUserIDs() ) ) );
+ TQString::number( res.newUserIDs() ) ) );
if ( res.numKeysWithoutUserID() )
lines.push_back( normalLine.arg( i18n("Keys without user IDs:"),
- QString::number( res.numKeysWithoutUserID() ) ) );
+ TQString::number( res.numKeysWithoutUserID() ) ) );
if ( res.newSubkeys() )
lines.push_back( normalLine.arg( i18n("New subkeys:"),
- QString::number( res.newSubkeys() ) ) );
+ TQString::number( res.newSubkeys() ) ) );
if ( res.newRevocations() )
lines.push_back( boldLine.arg( i18n("Newly revoked:"),
- QString::number( res.newRevocations() ) ) );
+ TQString::number( res.newRevocations() ) ) );
if ( res.notImported() )
lines.push_back( boldLine.arg( i18n("Not imported:"),
- QString::number( res.notImported() ) ) );
+ TQString::number( res.notImported() ) ) );
if ( res.numUnchanged() )
lines.push_back( normalLine.arg( i18n("Unchanged:"),
- QString::number( res.numUnchanged() ) ) );
+ TQString::number( res.numUnchanged() ) ) );
if ( res.numSecretKeysConsidered() )
lines.push_back( normalLine.arg( i18n("Secret keys processed:"),
- QString::number( res.numSecretKeysConsidered() ) ) );
+ TQString::number( res.numSecretKeysConsidered() ) ) );
if ( res.numSecretKeysImported() )
lines.push_back( normalLine.arg( i18n("Secret keys imported:"),
- QString::number( res.numSecretKeysImported() ) ) );
+ TQString::number( res.numSecretKeysImported() ) ) );
if ( res.numSecretKeysConsidered() - res.numSecretKeysImported() - res.numSecretKeysUnchanged() > 0 )
lines.push_back( boldLine.arg( i18n("Secret keys <em>not</em> imported:"),
- QString::number( res.numSecretKeysConsidered()
+ TQString::number( res.numSecretKeysConsidered()
- res.numSecretKeysImported()
- res.numSecretKeysUnchanged() ) ) );
if ( res.numSecretKeysUnchanged() )
lines.push_back( normalLine.arg( i18n("Secret keys unchanged:"),
- QString::number( res.numSecretKeysUnchanged() ) ) );
+ TQString::number( res.numSecretKeysUnchanged() ) ) );
KMessageBox::information( this,
i18n( "<qt><p>Detailed results of importing %1:</p>"
"<table>%2</table></qt>" )
- .arg( displayName ).arg( lines.join( QString::null ) ),
+ .arg( displayName ).arg( lines.join( TQString::null ) ),
i18n( "Certificate Import Result" ) );
disconnectJobFromStatusBarProgress( res.error() );
@@ -881,7 +881,7 @@ void CertManager::slotDirmngrExited() {
delete mDirmngrProc; mDirmngrProc = 0;
if ( !mImportCRLTempFile.isEmpty() )
- QFile::remove( mImportCRLTempFile );
+ TQFile::remove( mImportCRLTempFile );
updateImportActions( true );
}
@@ -889,8 +889,8 @@ void CertManager::slotDirmngrExited() {
This slot will import CRLs from a file.
*/
void CertManager::importCRLFromFile() {
- QString filter = QString("*.crl *.arl *-crl.der *-arl.der|") + i18n("Certificate Revocation List (*.crl *.arl *-crl.der *-arl.der)");
- KURL url = KFileDialog::getOpenURL( QString::null,
+ TQString filter = TQString("*.crl *.arl *-crl.der *-arl.der|") + i18n("Certificate Revocation List (*.crl *.arl *-crl.der *-arl.der)");
+ KURL url = KFileDialog::getOpenURL( TQString::null,
filter,
this,
i18n( "Select CRL File" ) );
@@ -905,8 +905,8 @@ void CertManager::importCRLFromFile() {
destURL.setPath( tempFile.name() );
KIO::Job* copyJob = KIO::file_copy( url, destURL, 0600, true, false );
copyJob->setWindow( this );
- connect( copyJob, SIGNAL( result( KIO::Job * ) ),
- SLOT( slotImportCRLJobFinished( KIO::Job * ) ) );
+ connect( copyJob, TQT_SIGNAL( result( KIO::Job * ) ),
+ TQT_SLOT( slotImportCRLJobFinished( KIO::Job * ) ) );
}
}
}
@@ -914,10 +914,10 @@ void CertManager::importCRLFromFile() {
void CertManager::slotImportCRLJobFinished( KIO::Job *job )
{
KIO::FileCopyJob* fcjob = static_cast<KIO::FileCopyJob*>( job );
- QString tempFilePath = fcjob->destURL().path();
+ TQString tempFilePath = fcjob->destURL().path();
if ( job->error() ) {
job->showErrorDialog();
- QFile::remove( tempFilePath ); // unlink tempfile
+ TQFile::remove( tempFilePath ); // unlink tempfile
updateImportActions( true );
return;
}
@@ -928,10 +928,10 @@ bool CertManager::connectAndStartDirmngr( const char * slot, const char * proces
assert( slot );
assert( processname );
assert( mDirmngrProc );
- mErrorbuffer = QString::null;
- connect( mDirmngrProc, SIGNAL(processExited(KProcess*)), slot );
- connect( mDirmngrProc, SIGNAL(receivedStderr(KProcess*,char*,int) ),
- this, SLOT(slotStderr(KProcess*,char*,int)) );
+ mErrorbuffer = TQString::null;
+ connect( mDirmngrProc, TQT_SIGNAL(processExited(KProcess*)), slot );
+ connect( mDirmngrProc, TQT_SIGNAL(receivedStderr(KProcess*,char*,int) ),
+ this, TQT_SLOT(slotStderr(KProcess*,char*,int)) );
if( !mDirmngrProc->start( KProcess::NotifyOnExit, KProcess::Stderr ) ) {
delete mDirmngrProc; mDirmngrProc = 0;
KMessageBox::error( this, i18n( "Unable to start %1 process. Please check your installation." ).arg( processname ), i18n( "Certificate Manager Error" ) );
@@ -940,16 +940,16 @@ bool CertManager::connectAndStartDirmngr( const char * slot, const char * proces
return true;
}
-void CertManager::startImportCRL( const QString& filename, bool isTempFile )
+void CertManager::startImportCRL( const TQString& filename, bool isTempFile )
{
assert( !mDirmngrProc );
- mImportCRLTempFile = isTempFile ? filename : QString::null;
+ mImportCRLTempFile = isTempFile ? filename : TQString::null;
mDirmngrProc = new KProcess();
*mDirmngrProc << "gpgsm" << "--call-dirmngr" << "loadcrl" << filename;
- if ( !connectAndStartDirmngr( SLOT(slotDirmngrExited()), "gpgsm" ) ) {
+ if ( !connectAndStartDirmngr( TQT_SLOT(slotDirmngrExited()), "gpgsm" ) ) {
updateImportActions( true );
if ( isTempFile )
- QFile::remove( mImportCRLTempFile ); // unlink tempfile
+ TQFile::remove( mImportCRLTempFile ); // unlink tempfile
}
}
@@ -958,11 +958,11 @@ void CertManager::startClearCRLs() {
mDirmngrProc = new KProcess();
*mDirmngrProc << "dirmngr" << "--flush";
//*mDirmngrProc << "gpgsm" << "--call-dimngr" << "flush"; // use this once it's implemented!
- connectAndStartDirmngr( SLOT(slotClearCRLsResult()), "dirmngr" );
+ connectAndStartDirmngr( TQT_SLOT(slotClearCRLsResult()), "dirmngr" );
}
void CertManager::slotStderr( KProcess*, char* buf, int len ) {
- mErrorbuffer += QString::fromLocal8Bit( buf, len );
+ mErrorbuffer += TQString::fromLocal8Bit( buf, len );
}
/**
@@ -997,12 +997,12 @@ void CertManager::slotClearCRLsResult() {
delete mDirmngrProc; mDirmngrProc = 0;
}
-static void showDeleteError( QWidget * parent, const GpgME::Error & err ) {
+static void showDeleteError( TQWidget * parent, const GpgME::Error & err ) {
assert( err );
- const QString msg = i18n("<qt><p>An error occurred while trying to delete "
+ const TQString msg = i18n("<qt><p>An error occurred while trying to delete "
"the certificates:</p>"
"<p><b>%1</b></p></qt>")
- .arg( QString::fromLocal8Bit( err.asString() ) );
+ .arg( TQString::fromLocal8Bit( err.asString() ) );
KMessageBox::error( parent, msg, i18n("Certificate Deletion Failed") );
}
@@ -1020,8 +1020,8 @@ void CertManager::slotDeleteCertificate() {
return;
std::vector<GpgME::Key> keys;
keys.reserve( mItemsToDelete.count() );
- QStringList keyDisplayNames;
- for ( QPtrListIterator<Kleo::KeyListViewItem> it( mItemsToDelete ) ; it.current() ; ++it )
+ TQStringList keyDisplayNames;
+ for ( TQPtrListIterator<Kleo::KeyListViewItem> it( mItemsToDelete ) ; it.current() ; ++it )
if ( !it.current()->key().isNull() ) {
keys.push_back( it.current()->key() );
keyDisplayNames.push_back( it.current()->text( 0 ) );
@@ -1033,12 +1033,12 @@ void CertManager::slotDeleteCertificate() {
mHierarchyAnalyser = new HierarchyAnalyser( this, "mHierarchyAnalyser" );
Kleo::KeyListJob * job = Kleo::CryptoBackendFactory::instance()->smime()->keyListJob();
assert( job );
- connect( job, SIGNAL(nextKey(const GpgME::Key&)),
- mHierarchyAnalyser, SLOT(slotNextKey(const GpgME::Key&)) );
- connect( job, SIGNAL(result(const GpgME::KeyListResult&)),
- this, SLOT(slotDeleteCertificate()) );
+ connect( job, TQT_SIGNAL(nextKey(const GpgME::Key&)),
+ mHierarchyAnalyser, TQT_SLOT(slotNextKey(const GpgME::Key&)) );
+ connect( job, TQT_SIGNAL(result(const GpgME::KeyListResult&)),
+ this, TQT_SLOT(slotDeleteCertificate()) );
connectJobToStatusBarProgress( job, i18n("Checking key dependencies...") );
- if ( const GpgME::Error error = job->start( QStringList() ) ) {
+ if ( const GpgME::Error error = job->start( TQStringList() ) ) {
showKeyListError( this, error );
delete mHierarchyAnalyser; mHierarchyAnalyser = 0;
}
@@ -1072,7 +1072,7 @@ void CertManager::slotDeleteCertificate() {
!= KMessageBox::Continue )
return;
- const QString msg = keysToDelete.size() > keys.size()
+ const TQString msg = keysToDelete.size() > keys.size()
? i18n("Do you really want to delete this certificate and the %1 certificates it certified?",
"Do you really want to delete these %n certificates and the %1 certificates they certified?",
keys.size() ).arg( keysToDelete.size() - keys.size() )
@@ -1089,7 +1089,7 @@ void CertManager::slotDeleteCertificate() {
if ( Kleo::DeleteJob * job = Kleo::CryptoBackendFactory::instance()->smime()->deleteJob() )
job->slotCancel();
else {
- QString str = keys.size() == 1
+ TQString str = keys.size() == 1
? i18n("<qt><p>An error occurred while trying to delete "
"the certificate:</p>"
"<p><b>%1</b><p></qt>" )
@@ -1109,8 +1109,8 @@ void CertManager::slotDeleteCertificate() {
Kleo::MultiDeleteJob * job = new Kleo::MultiDeleteJob( Kleo::CryptoBackendFactory::instance()->smime() );
assert( job );
- connect( job, SIGNAL(result(const GpgME::Error&,const GpgME::Key&)),
- SLOT(slotDeleteResult(const GpgME::Error&,const GpgME::Key&)) );
+ connect( job, TQT_SIGNAL(result(const GpgME::Error&,const GpgME::Key&)),
+ TQT_SLOT(slotDeleteResult(const GpgME::Error&,const GpgME::Key&)) );
connectJobToStatusBarProgress( job, i18n("Deleting keys...") );
@@ -1128,7 +1128,7 @@ void CertManager::slotDeleteResult( const GpgME::Error & err, const GpgME::Key &
const int infinity = 100; // infinite loop guard...
mItemsToDelete.setAutoDelete( true );
for ( int i = 0 ; i < infinity ; ++i ) {
- QPtrListIterator<Kleo::KeyListViewItem> it( mItemsToDelete );
+ TQPtrListIterator<Kleo::KeyListViewItem> it( mItemsToDelete );
while ( Kleo::KeyListViewItem * cur = it.current() ) {
++it;
if ( cur->childCount() == 0 ) {
@@ -1155,14 +1155,14 @@ void CertManager::slotViewDetails( Kleo::KeyListViewItem * item ) {
CertificateInfoWidgetImpl * top = new CertificateInfoWidgetImpl( item->key(), isRemote(), dialog );
dialog->setMainWidget( top );
// </UGH>
- connect( top, SIGNAL(requestCertificateDownload(const QString&, const QString&)),
- SLOT(slotStartCertificateDownload(const QString&, const QString&)) );
+ connect( top, TQT_SIGNAL(requestCertificateDownload(const TQString&, const TQString&)),
+ TQT_SLOT(slotStartCertificateDownload(const TQString&, const TQString&)) );
dialog->show();
}
void CertManager::slotViewDetails()
{
- QPtrList<Kleo::KeyListViewItem> items = mKeyListView->selectedItems();
+ TQPtrList<Kleo::KeyListViewItem> items = mKeyListView->selectedItems();
if ( items.isEmpty() )
return;
@@ -1187,12 +1187,12 @@ void CertManager::slotSelectionChanged()
}
void CertManager::slotExportCertificate() {
- QPtrList<Kleo::KeyListViewItem> items = mKeyListView->selectedItems();
+ TQPtrList<Kleo::KeyListViewItem> items = mKeyListView->selectedItems();
if ( items.isEmpty() )
return;
- QStringList fingerprints;
- for ( QPtrListIterator<Kleo::KeyListViewItem> it( items ) ; it.current() ; ++it )
+ TQStringList fingerprints;
+ for ( TQPtrListIterator<Kleo::KeyListViewItem> it( items ) ; it.current() ; ++it )
if ( !it.current()->key().isNull() )
if ( const char * fpr = it.current()->key().primaryFingerprint() )
fingerprints.push_back( fpr );
@@ -1200,16 +1200,16 @@ void CertManager::slotExportCertificate() {
startCertificateExport( fingerprints );
}
-static void showCertificateExportError( QWidget * parent, const GpgME::Error & err ) {
+static void showCertificateExportError( TQWidget * parent, const GpgME::Error & err ) {
assert( err );
- const QString msg = i18n("<qt><p>An error occurred while trying to export "
+ const TQString msg = i18n("<qt><p>An error occurred while trying to export "
"the certificate:</p>"
"<p><b>%1</b></p></qt>")
- .arg( QString::fromLocal8Bit( err.asString() ) );
+ .arg( TQString::fromLocal8Bit( err.asString() ) );
KMessageBox::error( parent, msg, i18n("Certificate Export Failed") );
}
-void CertManager::startCertificateExport( const QStringList & fingerprints ) {
+void CertManager::startCertificateExport( const TQStringList & fingerprints ) {
if ( fingerprints.empty() )
return;
@@ -1218,8 +1218,8 @@ void CertManager::startCertificateExport( const QStringList & fingerprints ) {
Kleo::ExportJob * job = Kleo::CryptoBackendFactory::instance()->smime()->publicKeyExportJob( true );
assert( job );
- connect( job, SIGNAL(result(const GpgME::Error&,const QByteArray&)),
- SLOT(slotCertificateExportResult(const GpgME::Error&,const QByteArray&)) );
+ connect( job, TQT_SIGNAL(result(const GpgME::Error&,const TQByteArray&)),
+ TQT_SLOT(slotCertificateExportResult(const GpgME::Error&,const TQByteArray&)) );
connectJobToStatusBarProgress( job, i18n("Exporting certificate...") );
@@ -1231,7 +1231,7 @@ void CertManager::startCertificateExport( const QStringList & fingerprints ) {
}
// return true if we should proceed, false if we should abort
-static bool checkOverwrite( const KURL& url, bool& overwrite, QWidget* w )
+static bool checkOverwrite( const KURL& url, bool& overwrite, TQWidget* w )
{
if ( KIO::NetAccess::exists( url, false /*dest*/, w ) ) {
if ( KMessageBox::Cancel ==
@@ -1247,7 +1247,7 @@ static bool checkOverwrite( const KURL& url, bool& overwrite, QWidget* w )
return true;
}
-void CertManager::slotCertificateExportResult( const GpgME::Error & err, const QByteArray & data ) {
+void CertManager::slotCertificateExportResult( const GpgME::Error & err, const TQByteArray & data ) {
disconnectJobFromStatusBarProgress( err );
if ( err ) {
showCertificateExportError( this, err );
@@ -1256,8 +1256,8 @@ void CertManager::slotCertificateExportResult( const GpgME::Error & err, const Q
kdDebug() << "CertManager::slotCertificateExportResult(): got " << data.size() << " bytes" << endl;
- const QString filter = QString("*.pem|") + i18n("ASCII Armored Certificate Bundles (*.pem)");
- const KURL url = KFileDialog::getOpenURL( QString::null,
+ const TQString filter = TQString("*.pem|") + i18n("ASCII Armored Certificate Bundles (*.pem)");
+ const KURL url = KFileDialog::getOpenURL( TQString::null,
filter,
this,
i18n( "Save Certificate" ) );
@@ -1270,8 +1270,8 @@ void CertManager::slotCertificateExportResult( const GpgME::Error & err, const Q
KIO::Job* uploadJob = KIOext::put( data, url, -1, overwrite, false /*resume*/ );
uploadJob->setWindow( this );
- connect( uploadJob, SIGNAL( result( KIO::Job* ) ),
- this, SLOT( slotUploadResult( KIO::Job* ) ) );
+ connect( uploadJob, TQT_SIGNAL( result( KIO::Job* ) ),
+ this, TQT_SLOT( slotUploadResult( KIO::Job* ) ) );
}
@@ -1287,22 +1287,22 @@ void CertManager::slotExportSecretKey() {
this, "secret key export key selection dialog" );
//dlg.setHideInvalidKeys( false );
- if ( dlg.exec() != QDialog::Accepted )
+ if ( dlg.exec() != TQDialog::Accepted )
return;
startSecretKeyExport( dlg.fingerprint() );
}
-static void showSecretKeyExportError( QWidget * parent, const GpgME::Error & err ) {
+static void showSecretKeyExportError( TQWidget * parent, const GpgME::Error & err ) {
assert( err );
- const QString msg = i18n("<qt><p>An error occurred while trying to export "
+ const TQString msg = i18n("<qt><p>An error occurred while trying to export "
"the secret key:</p>"
"<p><b>%1</b></p></qt>")
- .arg( QString::fromLocal8Bit( err.asString() ) );
+ .arg( TQString::fromLocal8Bit( err.asString() ) );
KMessageBox::error( parent, msg, i18n("Secret-Key Export Failed") );
}
-void CertManager::startSecretKeyExport( const QString & fingerprint ) {
+void CertManager::startSecretKeyExport( const TQString & fingerprint ) {
if ( fingerprint.isEmpty() )
return;
@@ -1310,7 +1310,7 @@ void CertManager::startSecretKeyExport( const QString & fingerprint ) {
// Check if gpgsm supports --p12-charset
Kleo::CryptoConfig* config = Kleo::CryptoBackendFactory::instance()->config();
- QString charset;
+ TQString charset;
if ( config && config->entry( "gpgsm", "Configuration", "p12-charset" ) ) {
// This comes from gnupg's sources, agent/minip12.c
// In fact, any charset supported by iconv would work, but we don't link to iconv directly...
@@ -1333,9 +1333,9 @@ void CertManager::startSecretKeyExport( const QString & fingerprint ) {
"big5",
NULL
};
- QStringList charsetList;
+ TQStringList charsetList;
for ( const char** c = charsets; *c; ++c ) {
- charsetList.append( QString::fromLatin1( *c ) );
+ charsetList.append( TQString::fromLatin1( *c ) );
}
// TODO this selection could be done in a derived KeySelectionDialog which would add a combobox,
@@ -1353,8 +1353,8 @@ void CertManager::startSecretKeyExport( const QString & fingerprint ) {
Kleo::ExportJob * job = Kleo::CryptoBackendFactory::instance()->smime()->secretKeyExportJob( false, charset );
assert( job );
- connect( job, SIGNAL(result(const GpgME::Error&,const QByteArray&)),
- SLOT(slotSecretKeyExportResult(const GpgME::Error&,const QByteArray&)) );
+ connect( job, TQT_SIGNAL(result(const GpgME::Error&,const TQByteArray&)),
+ TQT_SLOT(slotSecretKeyExportResult(const GpgME::Error&,const TQByteArray&)) );
connectJobToStatusBarProgress( job, i18n("Exporting secret key...") );
@@ -1365,7 +1365,7 @@ void CertManager::startSecretKeyExport( const QString & fingerprint ) {
mProgressBar->setProgress( 0, 0 );
}
-void CertManager::slotSecretKeyExportResult( const GpgME::Error & err, const QByteArray & data ) {
+void CertManager::slotSecretKeyExportResult( const GpgME::Error & err, const TQByteArray & data ) {
disconnectJobFromStatusBarProgress( err );
if ( err ) {
showSecretKeyExportError( this, err );
@@ -1373,8 +1373,8 @@ void CertManager::slotSecretKeyExportResult( const GpgME::Error & err, const QBy
}
kdDebug() << "CertManager::slotSecretKeyExportResult(): got " << data.size() << " bytes" << endl;
- QString filter = QString("*.p12|") + i18n("PKCS#12 Key Bundle (*.p12)");
- KURL url = KFileDialog::getOpenURL( QString::null,
+ TQString filter = TQString("*.p12|") + i18n("PKCS#12 Key Bundle (*.p12)");
+ KURL url = KFileDialog::getOpenURL( TQString::null,
filter,
this,
i18n( "Save Certificate" ) );
@@ -1387,8 +1387,8 @@ void CertManager::slotSecretKeyExportResult( const GpgME::Error & err, const QBy
KIO::Job* uploadJob = KIOext::put( data, url, -1, overwrite, false /*resume*/ );
uploadJob->setWindow( this );
- connect( uploadJob, SIGNAL( result( KIO::Job* ) ),
- this, SLOT( slotUploadResult( KIO::Job* ) ) );
+ connect( uploadJob, TQT_SIGNAL( result( KIO::Job* ) ),
+ this, TQT_SLOT( slotUploadResult( KIO::Job* ) ) );
}
void CertManager::slotUploadResult( KIO::Job* job )
diff --git a/certmanager/certmanager.h b/certmanager/certmanager.h
index 915e079eb..4aacaf70d 100644
--- a/certmanager/certmanager.h
+++ b/certmanager/certmanager.h
@@ -38,8 +38,8 @@
#include <kmainwindow.h>
#include <kdepimmacros.h>
#include <kurl.h>
-#include <qcstring.h>
-#include <qptrlist.h>
+#include <tqcstring.h>
+#include <tqptrlist.h>
#include <set>
#include <string>
@@ -79,9 +79,9 @@ namespace GpgME {
class KDE_EXPORT CertManager : public KMainWindow {
Q_OBJECT
public:
- CertManager( bool remote = false, const QString& query = QString::null,
- const QString& import=QString::null,
- QWidget * parent=0, const char * name=0, WFlags f=0 );
+ CertManager( bool remote = false, const TQString& query = TQString::null,
+ const TQString& import=TQString::null,
+ TQWidget * parent=0, const char * name=0, WFlags f=0 );
~CertManager();
bool isRemote() const { return mRemote; }
@@ -91,7 +91,7 @@ signals:
void enableOperations( bool );
private slots:
- void slotStartCertificateDownload( const QString & fingerprint, const QString& displayName );
+ void slotStartCertificateDownload( const TQString & fingerprint, const TQString& displayName );
void newCertificate();
void revokeCertificate();
void extendCertificate();
@@ -105,11 +105,11 @@ private slots:
void slotImportResult( KIO::Job* );
void slotCertificateImportResult( const GpgME::ImportResult & result );
- void slotCertificateDownloadResult( const GpgME::Error & error, const QByteArray & keyData );
+ void slotCertificateDownloadResult( const GpgME::Error & error, const TQByteArray & keyData );
void slotKeyListResult( const GpgME::KeyListResult & result );
void slotDeleteResult( const GpgME::Error & error, const GpgME::Key & );
- void slotSecretKeyExportResult( const GpgME::Error & error, const QByteArray & keyData );
- void slotCertificateExportResult( const GpgME::Error & error, const QByteArray & keyData );
+ void slotSecretKeyExportResult( const GpgME::Error & error, const TQByteArray & keyData );
+ void slotCertificateExportResult( const GpgME::Error & error, const TQByteArray & keyData );
void slotClearCRLsResult();
void importCRLFromFile();
@@ -134,7 +134,7 @@ private slots:
void slotEditKeybindings();
void slotShowConfigurationDialog();
void slotConfigureGpgME();
- void slotContextMenu(Kleo::KeyListViewItem*, const QPoint& point);
+ void slotContextMenu(Kleo::KeyListViewItem*, const TQPoint& point);
void slotDropped(const KURL::List&);
/** Schedule a repaint for the listview items. E.g. when the
colour config has changed */
@@ -159,19 +159,19 @@ private:
void createActions();
void updateStatusBarLabels();
void updateImportActions( bool enable );
- void startKeyListing( bool, bool, const QStringList & );
+ void startKeyListing( bool, bool, const TQStringList & );
void startKeyListing( bool, bool, const std::set<std::string> & );
- void startCertificateImport( const QByteArray & keyData, const QString& certDisplayName );
- void startImportCRL( const QString& fileName, bool isTempFile );
+ void startCertificateImport( const TQByteArray & keyData, const TQString& certDisplayName );
+ void startImportCRL( const TQString& fileName, bool isTempFile );
void startClearCRLs();
- void startSecretKeyExport( const QString & fingerprint );
- void startCertificateExport( const QStringList & fingerprints );
+ void startSecretKeyExport( const TQString & fingerprint );
+ void startCertificateExport( const TQStringList & fingerprints );
bool connectAndStartDirmngr( const char*, const char* );
- void connectJobToStatusBarProgress( Kleo::Job * job, const QString & initialText );
+ void connectJobToStatusBarProgress( Kleo::Job * job, const TQString & initialText );
void disconnectJobFromStatusBarProgress( const GpgME::Error & err );
void importNextURLOrRedisplay();
void startRedisplay( bool validating );
- QString displayNameForJob( const Kleo::Job *job );
+ TQString displayNameForJob( const Kleo::Job *job );
void readConfig( bool noQueryGiven );
void writeConfig();
@@ -179,13 +179,13 @@ private:
Kleo::KeyListView * mKeyListView;
CRLView * mCrlView;
Kleo::ProgressBar * mProgressBar;
- QLabel * mStatusLabel;
+ TQLabel * mStatusLabel;
KProcess * mDirmngrProc;
- QString mErrorbuffer;
- QPtrList<Kleo::KeyListViewItem> mItemsToDelete;
+ TQString mErrorbuffer;
+ TQPtrList<Kleo::KeyListViewItem> mItemsToDelete;
KURL::List mURLsToImport;
- typedef QMap<const Kleo::Job *, QString> JobsDisplayNameMap;
+ typedef TQMap<const Kleo::Job *, TQString> JobsDisplayNameMap;
JobsDisplayNameMap mJobsDisplayNameMap;
HierarchyAnalyser * mHierarchyAnalyser;
@@ -205,8 +205,8 @@ private:
KAction * mDownloadCertificateAction;
KAction * mValidateCertificateAction;
- QString mImportCRLTempFile;
- QString mCurrentQuery;
+ TQString mImportCRLTempFile;
+ TQString mCurrentQuery;
std::set<std::string> mPreviouslySelectedFingerprints;
bool mNextFindRemote : 1; // state of the combo, i.e. whether the next find action will be remote
bool mRemote : 1; // whether the currently displayed items are from a remote listing
diff --git a/certmanager/conf/appearanceconfigpage.cpp b/certmanager/conf/appearanceconfigpage.cpp
index 5d2a434cc..e0893233e 100644
--- a/certmanager/conf/appearanceconfigpage.cpp
+++ b/certmanager/conf/appearanceconfigpage.cpp
@@ -30,7 +30,7 @@
*/
#include "appearanceconfigpage.h"
-#include <qlayout.h>
+#include <tqlayout.h>
#include "appearanceconfigwidget.h"
#include <kmessagebox.h>
#include <klocale.h>
@@ -38,13 +38,13 @@
#include <kdepimmacros.h>
-AppearanceConfigurationPage::AppearanceConfigurationPage( QWidget * parent, const char * name )
+AppearanceConfigurationPage::AppearanceConfigurationPage( TQWidget * parent, const char * name )
: KCModule( parent, name )
{
- QVBoxLayout* lay = new QVBoxLayout( this );
+ TQVBoxLayout* lay = new TQVBoxLayout( this );
mWidget = new Kleo::AppearanceConfigWidget( this );
lay->addWidget( mWidget );
- connect( mWidget, SIGNAL( changed() ), this, SLOT( slotChanged() ) );
+ connect( mWidget, TQT_SIGNAL( changed() ), this, TQT_SLOT( slotChanged() ) );
#ifndef HAVE_UNBROKEN_KCMULTIDIALOG
load();
@@ -70,7 +70,7 @@ void AppearanceConfigurationPage::defaults()
extern "C"
{
- KDE_EXPORT KCModule *create_kleopatra_config_appear( QWidget *parent, const char * )
+ KDE_EXPORT KCModule *create_kleopatra_config_appear( TQWidget *parent, const char * )
{
AppearanceConfigurationPage *page =
new AppearanceConfigurationPage( parent, "kleopatra_config_appear" );
diff --git a/certmanager/conf/appearanceconfigpage.h b/certmanager/conf/appearanceconfigpage.h
index c3acea007..4713e262d 100644
--- a/certmanager/conf/appearanceconfigpage.h
+++ b/certmanager/conf/appearanceconfigpage.h
@@ -44,7 +44,7 @@ namespace Kleo {
class AppearanceConfigurationPage : public KCModule {
Q_OBJECT
public:
- AppearanceConfigurationPage( QWidget * parent=0, const char * name=0 );
+ AppearanceConfigurationPage( TQWidget * parent=0, const char * name=0 );
virtual void load();
virtual void save();
diff --git a/certmanager/conf/appearanceconfigwidget.cpp b/certmanager/conf/appearanceconfigwidget.cpp
index a3d177c2a..27797dfe7 100644
--- a/certmanager/conf/appearanceconfigwidget.cpp
+++ b/certmanager/conf/appearanceconfigwidget.cpp
@@ -49,15 +49,15 @@
#include <kfontdialog.h>
#include <kcolordialog.h>
-#include <qpushbutton.h>
-#include <qlayout.h>
-#include <qheader.h>
-#include <qcolor.h>
-#include <qfont.h>
-#include <qstring.h>
-#include <qpainter.h>
-#include <qregexp.h>
-#include <qcheckbox.h>
+#include <tqpushbutton.h>
+#include <tqlayout.h>
+#include <tqheader.h>
+#include <tqcolor.h>
+#include <tqfont.h>
+#include <tqstring.h>
+#include <tqpainter.h>
+#include <tqregexp.h>
+#include <tqcheckbox.h>
#include <assert.h>
@@ -66,8 +66,8 @@ using namespace Kleo;
class CategoryListViewItem : public QListViewItem
{
public:
- CategoryListViewItem( QListView* lv, QListViewItem* prev, const KConfigBase& config )
- : QListViewItem( lv, prev ) {
+ CategoryListViewItem( TQListView* lv, TQListViewItem* prev, const KConfigBase& config )
+ : TQListViewItem( lv, prev ) {
setName( config.readEntry( "Name", i18n("<unnamed>") ) );
mForegroundColor = config.readColorEntry( "foreground-color" );
@@ -99,9 +99,9 @@ public:
config.writeEntry( "font-strikeout", mStrikeOut );
}
- void setForegroundColor( const QColor& foreground ) { mForegroundColor = foreground; mDirty = true; }
- void setBackgroundColor( const QColor& background ) { mBackgroundColor = background; mDirty = true; }
- void setFont( const QFont& font ) {
+ void setForegroundColor( const TQColor& foreground ) { mForegroundColor = foreground; mDirty = true; }
+ void setBackgroundColor( const TQColor& background ) { mBackgroundColor = background; mDirty = true; }
+ void setFont( const TQFont& font ) {
mFont = font;
mHasFont = true;
mItalic = font.italic();
@@ -109,15 +109,15 @@ public:
mDirty = true;
}
- QColor foregroundColor() const { return mForegroundColor; }
- QColor backgroundColor() const { return mBackgroundColor; }
- QFont font() const { return mFont; }
+ TQColor foregroundColor() const { return mForegroundColor; }
+ TQColor backgroundColor() const { return mBackgroundColor; }
+ TQFont font() const { return mFont; }
void setDefaultAppearance() {
- mForegroundColor = mIsExpired ? Qt::red : QColor();
- mBackgroundColor = QColor();
+ mForegroundColor = mIsExpired ? Qt::red : TQColor();
+ mBackgroundColor = TQColor();
mHasFont = false;
- mFont = QFont();
+ mFont = TQFont();
mBold = false;
mItalic = false;
mStrikeOut = false;
@@ -135,15 +135,15 @@ public:
void toggleStrikeout() { mStrikeOut = !mStrikeOut; mDirty = true; }
private:
- void setName( const QString& name ) {
+ void setName( const TQString& name ) {
setText( 0, name );
}
- void paintCell( QPainter * p, const QColorGroup & cg, int column, int width, int alignment );
+ void paintCell( TQPainter * p, const TQColorGroup & cg, int column, int width, int alignment );
private:
- QColor mForegroundColor, mBackgroundColor;
- QFont mFont;
+ TQColor mForegroundColor, mBackgroundColor;
+ TQFont mFont;
bool mHasFont;
bool mIsExpired; // used for default settings
bool mItalic;
@@ -152,9 +152,9 @@ private:
bool mDirty;
};
-void CategoryListViewItem::paintCell( QPainter * p, const QColorGroup & cg, int column, int width, int alignment ) {
- QColorGroup _cg = cg;
- QFont font = p->font();
+void CategoryListViewItem::paintCell( TQPainter * p, const TQColorGroup & cg, int column, int width, int alignment ) {
+ TQColorGroup _cg = cg;
+ TQFont font = p->font();
if ( mHasFont )
font = mFont;
else {
@@ -168,17 +168,17 @@ void CategoryListViewItem::paintCell( QPainter * p, const QColorGroup & cg, int
p->setFont( font );
if ( mForegroundColor.isValid() )
- _cg.setColor( QColorGroup::Text, mForegroundColor );
+ _cg.setColor( TQColorGroup::Text, mForegroundColor );
if ( mBackgroundColor.isValid() )
- _cg.setColor( QColorGroup::Base, mBackgroundColor );
+ _cg.setColor( TQColorGroup::Base, mBackgroundColor );
- QListViewItem::paintCell( p, _cg, column, width, alignment );
+ TQListViewItem::paintCell( p, _cg, column, width, alignment );
}
////
Kleo::AppearanceConfigWidget::AppearanceConfigWidget (
- QWidget* parent, const char* name, WFlags fl )
+ TQWidget* parent, const char* name, WFlags fl )
: AppearanceConfigWidgetBase( parent, name, fl )
{
categoriesLV->setSorting( -1 );
@@ -196,7 +196,7 @@ AppearanceConfigWidget::~AppearanceConfigWidget()
}
-void AppearanceConfigWidget::slotSelectionChanged( QListViewItem* item )
+void AppearanceConfigWidget::slotSelectionChanged( TQListViewItem* item )
{
bool sel = item != 0;
foregroundButton->setEnabled( sel );
@@ -238,8 +238,8 @@ void AppearanceConfigWidget::load()
KConfig * config = Kleo::CryptoBackendFactory::instance()->configObject();
if ( !config )
return;
- QStringList groups = config->groupList().grep( QRegExp( "^Key Filter #\\d+$" ) );
- for ( QStringList::const_iterator it = groups.begin() ; it != groups.end() ; ++it ) {
+ TQStringList groups = config->groupList().grep( TQRegExp( "^Key Filter #\\d+$" ) );
+ for ( TQStringList::const_iterator it = groups.begin() ; it != groups.end() ; ++it ) {
KConfigGroup cfg( config, *it );
(void) new CategoryListViewItem( categoriesLV, categoriesLV->lastItem(), cfg );
}
@@ -252,16 +252,16 @@ void AppearanceConfigWidget::save()
return;
// We know (assume) that the groups in the config object haven't changed,
// so we just iterate over them and over the listviewitems, and map one-to-one.
- QStringList groups = config->groupList().grep( QRegExp( "^Key Filter #\\d+$" ) );
+ TQStringList groups = config->groupList().grep( TQRegExp( "^Key Filter #\\d+$" ) );
if ( groups.isEmpty() ) {
// If we created the default categories ourselves just now, then we need to make up their list
- QListViewItemIterator lvit( categoriesLV );
+ TQListViewItemIterator lvit( categoriesLV );
for ( ; lvit.current() ; ++lvit )
groups << lvit.current()->text( 0 );
}
- QListViewItemIterator lvit( categoriesLV );
- for ( QStringList::const_iterator it = groups.begin() ; it != groups.end() && lvit.current(); ++it, ++lvit ) {
+ TQListViewItemIterator lvit( categoriesLV );
+ for ( TQStringList::const_iterator it = groups.begin() ; it != groups.end() && lvit.current(); ++it, ++lvit ) {
CategoryListViewItem* item = static_cast<CategoryListViewItem*>(lvit.current() );
KConfigGroup cfg( config, *it );
item->save( cfg );
@@ -276,7 +276,7 @@ void AppearanceConfigWidget::slotForegroundClicked() {
Q_ASSERT( item );
if( !item )
return;
- QColor fg = item->foregroundColor();
+ TQColor fg = item->foregroundColor();
int result = KColorDialog::getColor( fg );
if ( result == KColorDialog::Accepted ) {
item->setForegroundColor( fg );
@@ -290,7 +290,7 @@ void AppearanceConfigWidget::slotBackgroundClicked() {
Q_ASSERT( item );
if( !item )
return;
- QColor bg = item->backgroundColor();
+ TQColor bg = item->backgroundColor();
int result = KColorDialog::getColor( bg );
if ( result == KColorDialog::Accepted ) {
item->setBackgroundColor( bg );
@@ -304,7 +304,7 @@ void AppearanceConfigWidget::slotFontClicked() {
Q_ASSERT( item );
if( !item )
return;
- QFont font = item->font();
+ TQFont font = item->font();
int result = KFontDialog::getFont( font );
if ( result == KFontDialog::Accepted ) {
item->setFont( font );
@@ -316,7 +316,7 @@ void AppearanceConfigWidget::slotFontClicked() {
void AppearanceConfigWidget::defaults()
{
// This simply means "default look for every category"
- QListViewItemIterator lvit( categoriesLV );
+ TQListViewItemIterator lvit( categoriesLV );
for ( ; lvit.current() ; ++lvit ) {
CategoryListViewItem* item = static_cast<CategoryListViewItem *>( lvit.current() );
item->setDefaultAppearance();
diff --git a/certmanager/conf/appearanceconfigwidget.h b/certmanager/conf/appearanceconfigwidget.h
index dc5c79766..5e7c1f8cb 100644
--- a/certmanager/conf/appearanceconfigwidget.h
+++ b/certmanager/conf/appearanceconfigwidget.h
@@ -35,7 +35,7 @@
#define APPEARANCECONFIGWIDGET_H
#include "appearanceconfigwidgetbase.h"
-#include <qstringlist.h>
+#include <tqstringlist.h>
class KConfig;
namespace Kleo {
@@ -45,7 +45,7 @@ namespace Kleo {
public:
AppearanceConfigWidget(
- QWidget * parent=0, const char * name=0, WFlags f=0 );
+ TQWidget * parent=0, const char * name=0, WFlags f=0 );
~AppearanceConfigWidget();
void load();
@@ -60,7 +60,7 @@ namespace Kleo {
protected slots:
// reimplemented from the base class
virtual void slotDefaultClicked();
- virtual void slotSelectionChanged( QListViewItem * );
+ virtual void slotSelectionChanged( TQListViewItem * );
virtual void slotForegroundClicked();
virtual void slotBackgroundClicked();
virtual void slotFontClicked();
diff --git a/certmanager/conf/configuredialog.cpp b/certmanager/conf/configuredialog.cpp
index 87976f106..e9f16f109 100644
--- a/certmanager/conf/configuredialog.cpp
+++ b/certmanager/conf/configuredialog.cpp
@@ -38,7 +38,7 @@
#include <kconfig.h>
#include <klocale.h>
-ConfigureDialog::ConfigureDialog( QWidget *parent, const char *name, bool modal )
+ConfigureDialog::ConfigureDialog( TQWidget *parent, const char *name, bool modal )
: KCMultiDialog( KDialogBase::IconList, i18n( "Configure" ), parent, name, modal )
{
KWin::setIcons( winId(), kapp->icon(), kapp->miniIcon() );
@@ -61,7 +61,7 @@ ConfigureDialog::ConfigureDialog( QWidget *parent, const char *name, bool modal
}
-void ConfigureDialog::hideEvent( QHideEvent * ) {
+void ConfigureDialog::hideEvent( TQHideEvent * ) {
KConfigGroup geometry( KGlobal::config(), "Geometry" );
geometry.writeEntry( "ConfigureDialogWidth", width() );
geometry.writeEntry( "ConfigureDialogHeight",height() );
diff --git a/certmanager/conf/configuredialog.h b/certmanager/conf/configuredialog.h
index 40b7e371b..436816dd1 100644
--- a/certmanager/conf/configuredialog.h
+++ b/certmanager/conf/configuredialog.h
@@ -41,11 +41,11 @@ class ConfigureDialog : public KCMultiDialog
Q_OBJECT
public:
- ConfigureDialog( QWidget *parent=0, const char *name=0, bool modal=true );
+ ConfigureDialog( TQWidget *parent=0, const char *name=0, bool modal=true );
~ConfigureDialog();
protected:
- void hideEvent( QHideEvent *i );
+ void hideEvent( TQHideEvent *i );
};
diff --git a/certmanager/conf/dirservconfigpage.cpp b/certmanager/conf/dirservconfigpage.cpp
index 7711ca2e2..73fad674a 100644
--- a/certmanager/conf/dirservconfigpage.cpp
+++ b/certmanager/conf/dirservconfigpage.cpp
@@ -41,11 +41,11 @@
#include <knuminput.h>
#include <kdialog.h>
-#include <qhbox.h>
-#include <qlabel.h>
-#include <qdatetimeedit.h>
-#include <qcheckbox.h>
-#include <qlayout.h>
+#include <tqhbox.h>
+#include <tqlabel.h>
+#include <tqdatetimeedit.h>
+#include <tqcheckbox.h>
+#include <tqlayout.h>
#include <kdepimmacros.h>
@@ -65,25 +65,25 @@ public:
// stolen from kabc/ldapclient.cpp
const uint numHosts = mConfig.readUnsignedNumEntry( "NumSelectedHosts" );
for ( uint j = 0; j < numHosts; j++ ) {
- const QString num = QString::number( j );
+ const TQString num = TQString::number( j );
KURL url;
url.setProtocol( "ldap" );
url.setPath( "/" ); // workaround KURL parsing bug
- const QString host = mConfig.readEntry( QString( "SelectedHost" ) + num ).stripWhiteSpace();
+ const TQString host = mConfig.readEntry( TQString( "SelectedHost" ) + num ).stripWhiteSpace();
url.setHost( host );
- const int port = mConfig.readUnsignedNumEntry( QString( "SelectedPort" ) + num );
+ const int port = mConfig.readUnsignedNumEntry( TQString( "SelectedPort" ) + num );
if ( port != 0 )
url.setPort( port );
- const QString base = mConfig.readEntry( QString( "SelectedBase" ) + num ).stripWhiteSpace();
+ const TQString base = mConfig.readEntry( TQString( "SelectedBase" ) + num ).stripWhiteSpace();
url.setQuery( base );
- const QString bindDN = mConfig.readEntry( QString( "SelectedBind" ) + num ).stripWhiteSpace();
+ const TQString bindDN = mConfig.readEntry( TQString( "SelectedBind" ) + num ).stripWhiteSpace();
url.setUser( bindDN );
- const QString pwdBindDN = mConfig.readEntry( QString( "SelectedPwdBind" ) + num ).stripWhiteSpace();
+ const TQString pwdBindDN = mConfig.readEntry( TQString( "SelectedPwdBind" ) + num ).stripWhiteSpace();
url.setPass( pwdBindDN );
lst.append( url );
}
@@ -98,19 +98,19 @@ public:
KURL::List::const_iterator end = lst.end();
unsigned j = 0;
for( ; it != end; ++it, ++j ) {
- const QString num = QString::number( j );
+ const TQString num = TQString::number( j );
KURL url = *it;
Q_ASSERT( url.protocol() == "ldap" );
- mConfig.writeEntry( QString( "SelectedHost" ) + num, url.host() );
- mConfig.writeEntry( QString( "SelectedPort" ) + num, url.port() );
+ mConfig.writeEntry( TQString( "SelectedHost" ) + num, url.host() );
+ mConfig.writeEntry( TQString( "SelectedPort" ) + num, url.port() );
// KURL automatically encoded the query (e.g. for spaces inside it),
// so decode it before writing it out
- const QString base = KURL::decode_string( url.query().mid(1) );
- mConfig.writeEntry( QString( "SelectedBase" ) + num, base );
- mConfig.writeEntry( QString( "SelectedBind" ) + num, url.user() );
- mConfig.writeEntry( QString( "SelectedPwdBind" ) + num, url.pass() );
+ const TQString base = KURL::decode_string( url.query().mid(1) );
+ mConfig.writeEntry( TQString( "SelectedBase" ) + num, base );
+ mConfig.writeEntry( TQString( "SelectedBind" ) + num, url.user() );
+ mConfig.writeEntry( TQString( "SelectedPwdBind" ) + num, url.pass() );
}
mConfig.sync();
}
@@ -137,43 +137,43 @@ static const char s_addnewservers_componentName[] = "dirmngr";
static const char s_addnewservers_groupName[] = "LDAP";
static const char s_addnewservers_entryName[] = "add-servers";
-DirectoryServicesConfigurationPage::DirectoryServicesConfigurationPage( QWidget * parent, const char * name )
+DirectoryServicesConfigurationPage::DirectoryServicesConfigurationPage( TQWidget * parent, const char * name )
: KCModule( parent, name )
{
mConfig = Kleo::CryptoBackendFactory::instance()->config();
- QVBoxLayout* lay = new QVBoxLayout( this, 0, KDialog::spacingHint() );
+ TQVBoxLayout* lay = new TQVBoxLayout( this, 0, KDialog::spacingHint() );
Kleo::CryptoConfigEntry* entry = configEntry( s_dirserv_componentName, s_dirserv_groupName, s_dirserv_entryName,
Kleo::CryptoConfigEntry::ArgType_LDAPURL, true );
mWidget = new Kleo::DirectoryServicesWidget( entry, this );
lay->addWidget( mWidget );
- connect( mWidget, SIGNAL( changed() ), this, SLOT( slotChanged() ) );
+ connect( mWidget, TQT_SIGNAL( changed() ), this, TQT_SLOT( slotChanged() ) );
// LDAP timeout
- QHBox* box = new QHBox( this );
+ TQHBox* box = new TQHBox( this );
box->setSpacing( KDialog::spacingHint() );
lay->addWidget( box );
- QLabel* label = new QLabel( i18n( "LDAP &timeout (minutes:seconds)" ), box );
+ TQLabel* label = new TQLabel( i18n( "LDAP &timeout (minutes:seconds)" ), box );
mTimeout = new QTimeEdit( box );
mTimeout->setDisplay( QTimeEdit::Minutes | QTimeEdit::Seconds );
- connect( mTimeout, SIGNAL( valueChanged( const QTime& ) ), this, SLOT( slotChanged() ) );
+ connect( mTimeout, TQT_SIGNAL( valueChanged( const TQTime& ) ), this, TQT_SLOT( slotChanged() ) );
label->setBuddy( mTimeout );
- QWidget* stretch = new QWidget( box );
+ TQWidget* stretch = new TQWidget( box );
box->setStretchFactor( stretch, 2 );
// Max number of items returned by queries
- box = new QHBox( this );
+ box = new TQHBox( this );
box->setSpacing( KDialog::spacingHint() );
lay->addWidget( box );
mMaxItems = new KIntNumInput( box );
mMaxItems->setLabel( i18n( "&Maximum number of items returned by query" ), Qt::AlignLeft | Qt::AlignVCenter );
mMaxItems->setMinValue( 0 );
- connect( mMaxItems, SIGNAL( valueChanged(int) ), this, SLOT( slotChanged() ) );
- stretch = new QWidget( box );
+ connect( mMaxItems, TQT_SIGNAL( valueChanged(int) ), this, TQT_SLOT( slotChanged() ) );
+ stretch = new TQWidget( box );
box->setStretchFactor( stretch, 2 );
#ifdef NOT_USEFUL_CURRENTLY
- mAddNewServersCB = new QCheckBox( i18n( "Automatically add &new servers discovered in CRL distribution points" ), this );
- connect( mAddNewServersCB, SIGNAL( clicked() ), this, SLOT( slotChanged() ) );
+ mAddNewServersCB = new TQCheckBox( i18n( "Automatically add &new servers discovered in CRL distribution points" ), this );
+ connect( mAddNewServersCB, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotChanged() ) );
lay->addWidget( mAddNewServersCB );
#endif
@@ -188,7 +188,7 @@ void DirectoryServicesConfigurationPage::load()
mTimeoutConfigEntry = configEntry( s_timeout_componentName, s_timeout_groupName, s_timeout_entryName, Kleo::CryptoConfigEntry::ArgType_UInt, false );
if ( mTimeoutConfigEntry ) {
- QTime time = QTime().addSecs( mTimeoutConfigEntry->uintValue() );
+ TQTime time = TQTime().addSecs( mTimeoutConfigEntry->uintValue() );
//kdDebug() << "timeout:" << mTimeoutConfigEntry->uintValue() << " -> " << time << endl;
mTimeout->setTime( time );
}
@@ -212,7 +212,7 @@ void DirectoryServicesConfigurationPage::save()
{
mWidget->save();
- QTime time( mTimeout->time() );
+ TQTime time( mTimeout->time() );
unsigned int timeout = time.minute() * 60 + time.second();
if ( mTimeoutConfigEntry && mTimeoutConfigEntry->uintValue() != timeout )
mTimeoutConfigEntry->setUIntValue( timeout );
@@ -259,7 +259,7 @@ void DirectoryServicesConfigurationPage::defaults()
extern "C"
{
- KDE_EXPORT KCModule *create_kleopatra_config_dirserv( QWidget *parent, const char * )
+ KDE_EXPORT KCModule *create_kleopatra_config_dirserv( TQWidget *parent, const char * )
{
DirectoryServicesConfigurationPage *page =
new DirectoryServicesConfigurationPage( parent, "kleopatra_config_dirserv" );
diff --git a/certmanager/conf/dirservconfigpage.h b/certmanager/conf/dirservconfigpage.h
index 8c7c75439..2ec688204 100644
--- a/certmanager/conf/dirservconfigpage.h
+++ b/certmanager/conf/dirservconfigpage.h
@@ -53,7 +53,7 @@ namespace Kleo {
class KDE_EXPORT DirectoryServicesConfigurationPage : public KCModule {
Q_OBJECT
public:
- DirectoryServicesConfigurationPage( QWidget * parent=0, const char * name=0 );
+ DirectoryServicesConfigurationPage( TQWidget * parent=0, const char * name=0 );
virtual void load();
virtual void save();
@@ -72,7 +72,7 @@ private:
Kleo::DirectoryServicesWidget* mWidget;
QTimeEdit* mTimeout;
KIntNumInput* mMaxItems;
- QCheckBox* mAddNewServersCB;
+ TQCheckBox* mAddNewServersCB;
Kleo::CryptoConfigEntry* mTimeoutConfigEntry;
Kleo::CryptoConfigEntry* mMaxItemsConfigEntry;
diff --git a/certmanager/conf/dnorderconfigpage.cpp b/certmanager/conf/dnorderconfigpage.cpp
index 44b86b5b8..bc358f912 100644
--- a/certmanager/conf/dnorderconfigpage.cpp
+++ b/certmanager/conf/dnorderconfigpage.cpp
@@ -36,16 +36,16 @@
#include <kdepimmacros.h>
-#include <qlayout.h>
+#include <tqlayout.h>
-DNOrderConfigPage::DNOrderConfigPage( QWidget * parent, const char * name )
+DNOrderConfigPage::DNOrderConfigPage( TQWidget * parent, const char * name )
: KCModule( parent, name )
{
- QVBoxLayout * vlay = new QVBoxLayout( this );
+ TQVBoxLayout * vlay = new TQVBoxLayout( this );
mWidget = Kleo::DNAttributeMapper::instance()->configWidget( this, "mWidget" );
vlay->addWidget( mWidget );
- connect( mWidget, SIGNAL(changed()), SLOT(slotChanged()) );
+ connect( mWidget, TQT_SIGNAL(changed()), TQT_SLOT(slotChanged()) );
#ifndef HAVE_UNBROKEN_KCMULTIDIALOG
load();
@@ -70,7 +70,7 @@ void DNOrderConfigPage::slotChanged() {
emit changed(true);
}
-extern "C" KDE_EXPORT KCModule * create_kleopatra_config_dnorder( QWidget * parent, const char * ) {
+extern "C" KDE_EXPORT KCModule * create_kleopatra_config_dnorder( TQWidget * parent, const char * ) {
return new DNOrderConfigPage( parent, "kleopatra_config_dnorder" );
}
diff --git a/certmanager/conf/dnorderconfigpage.h b/certmanager/conf/dnorderconfigpage.h
index c874c7527..aedc0e829 100644
--- a/certmanager/conf/dnorderconfigpage.h
+++ b/certmanager/conf/dnorderconfigpage.h
@@ -44,7 +44,7 @@ namespace Kleo {
class DNOrderConfigPage : public KCModule {
Q_OBJECT
public:
- DNOrderConfigPage( QWidget * parent=0, const char * name=0 );
+ DNOrderConfigPage( TQWidget * parent=0, const char * name=0 );
/*! reimplementation */
void load();
diff --git a/certmanager/crlview.cpp b/certmanager/crlview.cpp
index 6cf7ddeaa..49a82f98d 100644
--- a/certmanager/crlview.cpp
+++ b/certmanager/crlview.cpp
@@ -43,25 +43,25 @@
#include <kstdguiitem.h>
#include <kglobalsettings.h>
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qtextedit.h>
-#include <qfontmetrics.h>
-#include <qtimer.h>
-
-CRLView::CRLView( QWidget* parent, const char* name, bool modal )
- : QDialog( parent, name, modal ), _process(0)
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqtextedit.h>
+#include <tqfontmetrics.h>
+#include <tqtimer.h>
+
+CRLView::CRLView( TQWidget* parent, const char* name, bool modal )
+ : TQDialog( parent, name, modal ), _process(0)
{
- QVBoxLayout* topLayout = new QVBoxLayout( this, 10, 4 );
+ TQVBoxLayout* topLayout = new TQVBoxLayout( this, 10, 4 );
- topLayout->addWidget( new QLabel( i18n("CRL cache dump:"), this ) );
+ topLayout->addWidget( new TQLabel( i18n("CRL cache dump:"), this ) );
- _textView = new QTextEdit( this );
+ _textView = new TQTextEdit( this );
_textView->setFont( KGlobalSettings::fixedFont() );
- _textView->setTextFormat( QTextEdit::LogText );
+ _textView->setTextFormat( TQTextEdit::LogText );
topLayout->addWidget( _textView );
- QHBoxLayout* hbLayout = new QHBoxLayout( topLayout );
+ TQHBoxLayout* hbLayout = new TQHBoxLayout( topLayout );
_updateButton = new KPushButton( i18n("&Update"), this );
_closeButton = new KPushButton( KStdGuiItem::close(), this );
@@ -71,16 +71,16 @@ CRLView::CRLView( QWidget* parent, const char* name, bool modal )
hbLayout->addWidget( _closeButton );
// connections:
- connect( _updateButton, SIGNAL( clicked() ),
- this, SLOT( slotUpdateView() ) );
- connect( _closeButton, SIGNAL( clicked() ),
- this, SLOT( close() ) );
+ connect( _updateButton, TQT_SIGNAL( clicked() ),
+ this, TQT_SLOT( slotUpdateView() ) );
+ connect( _closeButton, TQT_SIGNAL( clicked() ),
+ this, TQT_SLOT( close() ) );
resize( _textView->fontMetrics().width( 'M' ) * 80,
_textView->fontMetrics().lineSpacing() * 25 );
- _timer = new QTimer( this );
- connect( _timer, SIGNAL(timeout()), SLOT(slotAppendBuffer()) );
+ _timer = new TQTimer( this );
+ connect( _timer, TQT_SIGNAL(timeout()), TQT_SLOT(slotAppendBuffer()) );
}
CRLView::~CRLView()
@@ -88,8 +88,8 @@ CRLView::~CRLView()
delete _process; _process = 0;
}
-void CRLView::closeEvent( QCloseEvent * e ) {
- QDialog::closeEvent( e );
+void CRLView::closeEvent( TQCloseEvent * e ) {
+ TQDialog::closeEvent( e );
delete _process; _process = 0;
}
@@ -97,14 +97,14 @@ void CRLView::slotUpdateView()
{
_updateButton->setEnabled( false );
_textView->clear();
- _buffer = QString::null;
+ _buffer = TQString::null;
if( _process == 0 ) {
_process = new KProcess();
*_process << "gpgsm" << "--call-dirmngr" << "listcrls";
- connect( _process, SIGNAL( receivedStdout( KProcess*, char*, int) ),
- this, SLOT( slotReadStdout( KProcess*, char*, int ) ) );
- connect( _process, SIGNAL( processExited( KProcess* ) ),
- this, SLOT( slotProcessExited() ) );
+ connect( _process, TQT_SIGNAL( receivedStdout( KProcess*, char*, int) ),
+ this, TQT_SLOT( slotReadStdout( KProcess*, char*, int ) ) );
+ connect( _process, TQT_SIGNAL( processExited( KProcess* ) ),
+ this, TQT_SLOT( slotProcessExited() ) );
}
if( _process->isRunning() ) _process->kill();
if( !_process->start( KProcess::NotifyOnExit, KProcess::Stdout ) ) {
@@ -116,12 +116,12 @@ void CRLView::slotUpdateView()
void CRLView::slotReadStdout( KProcess*, char* buf, int len)
{
- _buffer.append( QString::fromUtf8( buf, len ) );
+ _buffer.append( TQString::fromUtf8( buf, len ) );
}
void CRLView::slotAppendBuffer() {
_textView->append( _buffer );
- _buffer = QString::null;
+ _buffer = TQString::null;
}
void CRLView::slotProcessExited()
diff --git a/certmanager/crlview.h b/certmanager/crlview.h
index 55828a90f..05b55ca33 100644
--- a/certmanager/crlview.h
+++ b/certmanager/crlview.h
@@ -33,18 +33,18 @@
#ifndef CRLVIEW_H
#define CRLVIEW_H
-#include <qdialog.h>
-#include <qstring.h>
+#include <tqdialog.h>
+#include <tqstring.h>
class QTextEdit;
class QPushButton;
class KProcess;
class QTimer;
-class CRLView : public QDialog {
+class CRLView : public TQDialog {
Q_OBJECT
public:
- CRLView( QWidget* parent = 0, const char* name = 0, bool modal = false );
+ CRLView( TQWidget* parent = 0, const char* name = 0, bool modal = false );
~CRLView();
public slots:
void slotUpdateView();
@@ -55,15 +55,15 @@ protected slots:
void slotAppendBuffer();
protected:
- void closeEvent( QCloseEvent * );
+ void closeEvent( TQCloseEvent * );
private:
- QTextEdit* _textView;
- QPushButton* _updateButton;
- QPushButton* _closeButton;
+ TQTextEdit* _textView;
+ TQPushButton* _updateButton;
+ TQPushButton* _closeButton;
KProcess* _process;
- QTimer* _timer;
- QString _buffer;
+ TQTimer* _timer;
+ TQString _buffer;
};
#endif // CRLVIEW_H
diff --git a/certmanager/customactions.cpp b/certmanager/customactions.cpp
index 53e5dd2d8..27fed1ae4 100644
--- a/certmanager/customactions.cpp
+++ b/certmanager/customactions.cpp
@@ -35,55 +35,55 @@
#include <ktoolbar.h>
#include <kapplication.h>
-#include <qlineedit.h>
-#include <qlabel.h>
+#include <tqlineedit.h>
+#include <tqlabel.h>
-LabelAction::LabelAction( const QString & text, KActionCollection * parent,
+LabelAction::LabelAction( const TQString & text, KActionCollection * parent,
const char* name )
- : KAction( text, QIconSet(), KShortcut(), 0, 0, parent, name )
+ : KAction( text, TQIconSet(), KShortcut(), 0, 0, parent, name )
{
}
-int LabelAction::plug( QWidget * widget, int index ) {
+int LabelAction::plug( TQWidget * widget, int index ) {
if ( kapp && !kapp->authorizeKAction( name() ) )
return -1;
if ( widget->inherits( "KToolBar" ) ) {
KToolBar * bar = (KToolBar *)widget;
int id_ = getToolButtonID();
- QLabel* label = new QLabel( text(), bar, "kde toolbar widget" );
+ TQLabel* label = new TQLabel( text(), bar, "kde toolbar widget" );
bar->insertWidget( id_, label->width(), label, index );
addContainer( bar, id_ );
- connect( bar, SIGNAL( destroyed() ), this, SLOT( slotDestroyed() ) );
+ connect( bar, TQT_SIGNAL( destroyed() ), this, TQT_SLOT( slotDestroyed() ) );
return containerCount() - 1;
}
return KAction::plug( widget, index );
}
-LineEditAction::LineEditAction( const QString & text, KActionCollection * parent,
- QObject * receiver, const char * member, const char * name )
- : KAction( text, QIconSet(), KShortcut(), 0, 0, parent, name ),
+LineEditAction::LineEditAction( const TQString & text, KActionCollection * parent,
+ TQObject * receiver, const char * member, const char * name )
+ : KAction( text, TQIconSet(), KShortcut(), 0, 0, parent, name ),
_le(0), _receiver(receiver), _member(member)
{
}
-int LineEditAction::plug( QWidget * widget, int index ) {
+int LineEditAction::plug( TQWidget * widget, int index ) {
if ( kapp && !kapp->authorizeKAction( name() ) )
return -1;
if ( widget->inherits( "KToolBar" ) ) {
KToolBar *bar = (KToolBar *)widget;
int id_ = getToolButtonID();
// The toolbar trick doesn't seem to work for lineedits
- //_le = new QLineEdit( bar, "kde toolbar widget" );
- _le = new QLineEdit( bar );
+ //_le = new TQLineEdit( bar, "kde toolbar widget" );
+ _le = new TQLineEdit( bar );
bar->insertWidget( id_, _le->width(), _le, index );
bar->setStretchableWidget( _le );
addContainer( bar, id_ );
- connect( bar, SIGNAL( destroyed() ), this, SLOT( slotDestroyed() ) );
- connect( _le, SIGNAL( returnPressed() ), _receiver, _member );
+ connect( bar, TQT_SIGNAL( destroyed() ), this, TQT_SLOT( slotDestroyed() ) );
+ connect( _le, TQT_SIGNAL( returnPressed() ), _receiver, _member );
return containerCount() - 1;
}
@@ -99,34 +99,34 @@ void LineEditAction::focusAll() {
_le->setFocus();
}
-QString LineEditAction::text() const {
+TQString LineEditAction::text() const {
return _le->text();
}
-void LineEditAction::setText( const QString & txt ) {
+void LineEditAction::setText( const TQString & txt ) {
_le->setText(txt);
}
-ComboAction::ComboAction( const QStringList & lst, KActionCollection * parent,
- QObject * receiver, const char * member, const char * name,
+ComboAction::ComboAction( const TQStringList & lst, KActionCollection * parent,
+ TQObject * receiver, const char * member, const char * name,
int selectedID )
- : KAction( QString::null, QIconSet(), KShortcut(), 0, 0, parent, name ),
+ : KAction( TQString::null, TQIconSet(), KShortcut(), 0, 0, parent, name ),
_lst(lst), _receiver(receiver), _member(member), _selectedId( selectedID )
{
}
-int ComboAction::plug( QWidget * widget, int index ) {
+int ComboAction::plug( TQWidget * widget, int index ) {
if ( kapp && !kapp->authorizeKAction( name() ) )
return -1;
if ( widget->inherits( "KToolBar" ) ) {
KToolBar *bar = (KToolBar *)widget;
int id_ = getToolButtonID();
- bar->insertCombo( _lst, id_, false, SIGNAL( highlighted(int) ), _receiver, _member );
+ bar->insertCombo( _lst, id_, false, TQT_SIGNAL( highlighted(int) ), _receiver, _member );
bar->setCurrentComboItem( id_,_selectedId );
addContainer( bar, id_ );
- connect( bar, SIGNAL( destroyed() ), this, SLOT( slotDestroyed() ) );
+ connect( bar, TQT_SIGNAL( destroyed() ), this, TQT_SLOT( slotDestroyed() ) );
return containerCount() - 1;
}
diff --git a/certmanager/customactions.h b/certmanager/customactions.h
index 44957487b..ad3505b78 100644
--- a/certmanager/customactions.h
+++ b/certmanager/customactions.h
@@ -35,48 +35,48 @@
#include <kaction.h>
-#include <qstringlist.h>
+#include <tqstringlist.h>
class QLineEdit;
class LabelAction : public KAction {
Q_OBJECT
public:
- LabelAction( const QString & text, KActionCollection * parent,
+ LabelAction( const TQString & text, KActionCollection * parent,
const char* name );
- int plug( QWidget * widget, int index=-1 );
+ int plug( TQWidget * widget, int index=-1 );
};
class LineEditAction : public KAction {
Q_OBJECT
public:
- LineEditAction( const QString & text, KActionCollection * parent,
- QObject * receiver, const char * member, const char * name );
+ LineEditAction( const TQString & text, KActionCollection * parent,
+ TQObject * receiver, const char * member, const char * name );
- int plug( QWidget * widget, int index=-1 );
+ int plug( TQWidget * widget, int index=-1 );
void clear();
void focusAll();
- QString text() const;
- void setText( const QString & txt );
+ TQString text() const;
+ void setText( const TQString & txt );
private:
- QLineEdit* _le;
- QObject * _receiver;
+ TQLineEdit* _le;
+ TQObject * _receiver;
const char * _member;
};
class ComboAction : public KAction {
Q_OBJECT
public:
- ComboAction( const QStringList & lst, KActionCollection * parent,
- QObject * receiver, const char * member, const char * name,
+ ComboAction( const TQStringList & lst, KActionCollection * parent,
+ TQObject * receiver, const char * member, const char * name,
int selectedID );
- int plug( QWidget * widget, int index=-1 );
+ int plug( TQWidget * widget, int index=-1 );
private:
- QStringList _lst;
- QObject * _receiver;
+ TQStringList _lst;
+ TQObject * _receiver;
const char * _member;
int _selectedId;
};
diff --git a/certmanager/hierarchyanalyser.cpp b/certmanager/hierarchyanalyser.cpp
index 8e8c13803..380c48a58 100644
--- a/certmanager/hierarchyanalyser.cpp
+++ b/certmanager/hierarchyanalyser.cpp
@@ -39,8 +39,8 @@
#include <algorithm>
#include <iterator>
-HierarchyAnalyser::HierarchyAnalyser( QObject * parent, const char * name )
- : QObject( parent, name )
+HierarchyAnalyser::HierarchyAnalyser( TQObject * parent, const char * name )
+ : TQObject( parent, name )
{
}
@@ -62,7 +62,7 @@ void HierarchyAnalyser::slotNextKey( const GpgME::Key & key ) {
const std::vector<GpgME::Key> & HierarchyAnalyser::subjectsForIssuer( const char * issuer_dn ) const {
static const std::vector<GpgME::Key> empty;
- std::map< QCString, std::vector<GpgME::Key> >::const_iterator it =
+ std::map< TQCString, std::vector<GpgME::Key> >::const_iterator it =
mSubjectsByIssuer.find( issuer_dn );
return it == mSubjectsByIssuer.end() ? empty : it->second ;
}
diff --git a/certmanager/hierarchyanalyser.h b/certmanager/hierarchyanalyser.h
index ccf07d4f3..9521d84d6 100644
--- a/certmanager/hierarchyanalyser.h
+++ b/certmanager/hierarchyanalyser.h
@@ -35,16 +35,16 @@
#include <gpgmepp/key.h>
-#include <qobject.h>
-#include <qcstring.h>
+#include <tqobject.h>
+#include <tqcstring.h>
#include <map>
#include <vector>
-class HierarchyAnalyser : public QObject {
+class HierarchyAnalyser : public TQObject {
Q_OBJECT
public:
- HierarchyAnalyser( QObject * parent=0, const char * name=0 );
+ HierarchyAnalyser( TQObject * parent=0, const char * name=0 );
~HierarchyAnalyser();
const std::vector<GpgME::Key> & rootItems() const {
@@ -59,7 +59,7 @@ public slots:
void slotNextKey( const GpgME::Key & key );
private:
- std::map< QCString, std::vector<GpgME::Key> > mSubjectsByIssuer;
+ std::map< TQCString, std::vector<GpgME::Key> > mSubjectsByIssuer;
};
diff --git a/certmanager/kwatchgnupg/kwatchgnupgconfig.cpp b/certmanager/kwatchgnupg/kwatchgnupgconfig.cpp
index b621e92b8..aa8e52f72 100644
--- a/certmanager/kwatchgnupg/kwatchgnupgconfig.cpp
+++ b/certmanager/kwatchgnupg/kwatchgnupgconfig.cpp
@@ -37,18 +37,18 @@
#include <kconfig.h>
#include <kapplication.h>
-#include <qframe.h>
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qspinbox.h>
-#include <qcheckbox.h>
-#include <qcombobox.h>
-#include <qdir.h>
-#include <qvgroupbox.h>
+#include <tqframe.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqspinbox.h>
+#include <tqcheckbox.h>
+#include <tqcombobox.h>
+#include <tqdir.h>
+#include <tqvgroupbox.h>
static const char* log_levels[] = { "none", "basic", "advanced", "expert", "guru" };
-static int log_level_to_int( const QString& loglevel )
+static int log_level_to_int( const TQString& loglevel )
{
if( loglevel == "none" ) {
return 0;
@@ -66,89 +66,89 @@ static int log_level_to_int( const QString& loglevel )
}
}
-KWatchGnuPGConfig::KWatchGnuPGConfig( QWidget* parent, const char* name )
+KWatchGnuPGConfig::KWatchGnuPGConfig( TQWidget* parent, const char* name )
: KDialogBase( Plain, i18n("Configure KWatchGnuPG"),
Ok|Cancel, Ok, parent, name )
{
// tmp vars:
- QWidget * w;
- QGridLayout * glay;
- QGroupBox * group;
+ TQWidget * w;
+ TQGridLayout * glay;
+ TQGroupBox * group;
- QWidget * top = plainPage();
+ TQWidget * top = plainPage();
- QVBoxLayout * vlay = new QVBoxLayout( top, 0, spacingHint() );
+ TQVBoxLayout * vlay = new TQVBoxLayout( top, 0, spacingHint() );
- group = new QVGroupBox( i18n("WatchGnuPG"), top );
+ group = new TQVGroupBox( i18n("WatchGnuPG"), top );
group->layout()->setSpacing( spacingHint() );
- w = new QWidget( group );
+ w = new TQWidget( group );
- glay = new QGridLayout( w, 3, 2, 0, spacingHint() );
+ glay = new TQGridLayout( w, 3, 2, 0, spacingHint() );
glay->setColStretch( 1, 1 );
int row = -1;
++row;
mExeED = new KURLRequester( w );
- glay->addWidget( new QLabel( mExeED, i18n("&Executable:"), w ), row, 0 );
+ glay->addWidget( new TQLabel( mExeED, i18n("&Executable:"), w ), row, 0 );
glay->addWidget( mExeED, row, 1 );
- connect( mExeED, SIGNAL(textChanged(const QString&)), SLOT(slotChanged()) );
+ connect( mExeED, TQT_SIGNAL(textChanged(const TQString&)), TQT_SLOT(slotChanged()) );
++row;
mSocketED = new KURLRequester( w );
- glay->addWidget( new QLabel( mSocketED, i18n("&Socket:"), w ), row, 0 );
+ glay->addWidget( new TQLabel( mSocketED, i18n("&Socket:"), w ), row, 0 );
glay->addWidget( mSocketED, row, 1 );
- connect( mSocketED, SIGNAL(textChanged(const QString&)), SLOT(slotChanged()) );
+ connect( mSocketED, TQT_SIGNAL(textChanged(const TQString&)), TQT_SLOT(slotChanged()) );
++row;
- mLogLevelCB = new QComboBox( false, w );
+ mLogLevelCB = new TQComboBox( false, w );
mLogLevelCB->insertItem( i18n("None") );
mLogLevelCB->insertItem( i18n("Basic") );
mLogLevelCB->insertItem( i18n("Advanced") );
mLogLevelCB->insertItem( i18n("Expert") );
mLogLevelCB->insertItem( i18n("Guru") );
- glay->addWidget( new QLabel( mLogLevelCB, i18n("Default &log level:"), w ), row, 0 );
+ glay->addWidget( new TQLabel( mLogLevelCB, i18n("Default &log level:"), w ), row, 0 );
glay->addWidget( mLogLevelCB, row, 1 );
- connect( mLogLevelCB, SIGNAL(activated(int)), SLOT(slotChanged()) );
+ connect( mLogLevelCB, TQT_SIGNAL(activated(int)), TQT_SLOT(slotChanged()) );
vlay->addWidget( group );
/******************* Log Window group *******************/
- group = new QVGroupBox( i18n("Log Window"), top );
+ group = new TQVGroupBox( i18n("Log Window"), top );
group->layout()->setSpacing( spacingHint() );
- w = new QWidget( group );
+ w = new TQWidget( group );
- glay = new QGridLayout( w, 2, 3, 0, spacingHint() );
+ glay = new TQGridLayout( w, 2, 3, 0, spacingHint() );
glay->setColStretch( 1, 1 );
row = -1;
++row;
- mLoglenSB = new QSpinBox( 0, 1000000, 100, w );
+ mLoglenSB = new TQSpinBox( 0, 1000000, 100, w );
mLoglenSB->setSuffix( i18n("history size spinbox suffix"," lines") );
mLoglenSB->setSpecialValueText( i18n("unlimited") );
- glay->addWidget( new QLabel( mLoglenSB, i18n("&History size:"), w ), row, 0 );
+ glay->addWidget( new TQLabel( mLoglenSB, i18n("&History size:"), w ), row, 0 );
glay->addWidget( mLoglenSB, row, 1 );
- QPushButton * button = new QPushButton( i18n("Set &Unlimited"), w );
+ TQPushButton * button = new TQPushButton( i18n("Set &Unlimited"), w );
glay->addWidget( button, row, 2 );
- connect( mLoglenSB, SIGNAL(valueChanged(int)), SLOT(slotChanged()) );
- connect( button, SIGNAL(clicked()), SLOT(slotSetHistorySizeUnlimited()) );
+ connect( mLoglenSB, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(slotChanged()) );
+ connect( button, TQT_SIGNAL(clicked()), TQT_SLOT(slotSetHistorySizeUnlimited()) );
++row;
- mWordWrapCB = new QCheckBox( i18n("Enable &word wrapping"), w );
- mWordWrapCB->hide(); // QTextEdit doesn't support word wrapping in LogText mode
+ mWordWrapCB = new TQCheckBox( i18n("Enable &word wrapping"), w );
+ mWordWrapCB->hide(); // TQTextEdit doesn't support word wrapping in LogText mode
glay->addMultiCellWidget( mWordWrapCB, row, row, 0, 2 );
- connect( mWordWrapCB, SIGNAL(clicked()), SLOT(slotChanged()) );
+ connect( mWordWrapCB, TQT_SIGNAL(clicked()), TQT_SLOT(slotChanged()) );
vlay->addWidget( group );
vlay->addStretch( 1 );
- connect( this, SIGNAL(applyClicked()), SLOT(slotSave()) );
- connect( this, SIGNAL(okClicked()), SLOT(slotSave()) );
+ connect( this, TQT_SIGNAL(applyClicked()), TQT_SLOT(slotSave()) );
+ connect( this, TQT_SIGNAL(okClicked()), TQT_SLOT(slotSave()) );
}
void KWatchGnuPGConfig::slotSetHistorySizeUnlimited() {
@@ -160,7 +160,7 @@ void KWatchGnuPGConfig::loadConfig()
KConfig* config = kapp->config();
config->setGroup("WatchGnuPG");
mExeED->setURL( config->readEntry( "Executable", "watchgnupg" ) );
- mSocketED->setURL( config->readEntry( "Socket", QDir::home().canonicalPath()
+ mSocketED->setURL( config->readEntry( "Socket", TQDir::home().canonicalPath()
+ "/.gnupg/log-socket") );
mLogLevelCB->setCurrentItem( log_level_to_int( config->readEntry( "LogLevel", "basic" ) ) );
@@ -168,7 +168,7 @@ void KWatchGnuPGConfig::loadConfig()
mLoglenSB->setValue( config->readNumEntry( "MaxLogLen", 10000 ) );
mWordWrapCB->setChecked( config->readBoolEntry("WordWrap", false ) );
- config->setGroup( QString::null );
+ config->setGroup( TQString::null );
enableButtonOK( false );
enableButtonApply( false );
}
@@ -185,7 +185,7 @@ void KWatchGnuPGConfig::saveConfig()
config->writeEntry( "MaxLogLen", mLoglenSB->value() );
config->writeEntry( "WordWrap", mWordWrapCB->isChecked() );
- config->setGroup( QString::null );
+ config->setGroup( TQString::null );
config->sync();
enableButtonOK( false );
enableButtonApply( false );
diff --git a/certmanager/kwatchgnupg/kwatchgnupgconfig.h b/certmanager/kwatchgnupg/kwatchgnupgconfig.h
index 4a93b463b..e95959e50 100644
--- a/certmanager/kwatchgnupg/kwatchgnupgconfig.h
+++ b/certmanager/kwatchgnupg/kwatchgnupgconfig.h
@@ -43,7 +43,7 @@ class KURLRequester;
class KWatchGnuPGConfig : public KDialogBase {
Q_OBJECT
public:
- KWatchGnuPGConfig( QWidget* parent, const char* name = 0 );
+ KWatchGnuPGConfig( TQWidget* parent, const char* name = 0 );
void loadConfig();
void saveConfig();
@@ -59,9 +59,9 @@ private slots:
private:
KURLRequester* mExeED;
KURLRequester* mSocketED;
- QComboBox* mLogLevelCB;
- QSpinBox* mLoglenSB;
- QCheckBox* mWordWrapCB;
+ TQComboBox* mLogLevelCB;
+ TQSpinBox* mLoglenSB;
+ TQCheckBox* mWordWrapCB;
};
#endif /* KWATCHGNUPGCONFIG_H */
diff --git a/certmanager/kwatchgnupg/kwatchgnupgmainwin.cpp b/certmanager/kwatchgnupg/kwatchgnupgmainwin.cpp
index 19bda278b..234973b6e 100644
--- a/certmanager/kwatchgnupg/kwatchgnupgmainwin.cpp
+++ b/certmanager/kwatchgnupg/kwatchgnupgmainwin.cpp
@@ -49,36 +49,36 @@
#include <kedittoolbar.h>
#include <kkeydialog.h>
-#include <qtextedit.h>
-#include <qdir.h>
-#include <qeventloop.h>
-#include <qtimer.h>
-#include <qtextcodec.h>
+#include <tqtextedit.h>
+#include <tqdir.h>
+#include <tqeventloop.h>
+#include <tqtimer.h>
+#include <tqtextcodec.h>
#define WATCHGNUPGBINARY "watchgnupg"
-#define WATCHGNUPGSOCKET ( QDir::home().canonicalPath() + "/.gnupg/log-socket")
+#define WATCHGNUPGSOCKET ( TQDir::home().canonicalPath() + "/.gnupg/log-socket")
-KWatchGnuPGMainWindow::KWatchGnuPGMainWindow( QWidget* parent, const char* name )
+KWatchGnuPGMainWindow::KWatchGnuPGMainWindow( TQWidget* parent, const char* name )
: KMainWindow( parent, name, WType_TopLevel ), mConfig(0)
{
createActions();
createGUI();
- mCentralWidget = new QTextEdit( this, "central log view" );
- mCentralWidget->setTextFormat( QTextEdit::LogText );
+ mCentralWidget = new TQTextEdit( this, "central log view" );
+ mCentralWidget->setTextFormat( TQTextEdit::LogText );
setCentralWidget( mCentralWidget );
- mWatcher = new KProcIO( QTextCodec::codecForMib( 106 /*utf-8*/ ) );
- connect( mWatcher, SIGNAL( processExited(KProcess*) ),
- this, SLOT( slotWatcherExited() ) );
- connect( mWatcher, SIGNAL( readReady(KProcIO*) ),
- this, SLOT( slotReadStdout() ) );
+ mWatcher = new KProcIO( TQTextCodec::codecForMib( 106 /*utf-8*/ ) );
+ connect( mWatcher, TQT_SIGNAL( processExited(KProcess*) ),
+ this, TQT_SLOT( slotWatcherExited() ) );
+ connect( mWatcher, TQT_SIGNAL( readReady(KProcIO*) ),
+ this, TQT_SLOT( slotReadStdout() ) );
slotReadConfig();
mSysTray = new KWatchGnuPGTray( this );
mSysTray->show();
- connect( mSysTray, SIGNAL( quitSelected() ),
- this, SLOT( slotQuit() ) );
+ connect( mSysTray, TQT_SIGNAL( quitSelected() ),
+ this, TQT_SLOT( slotQuit() ) );
setAutoSaveSettings();
}
@@ -90,24 +90,24 @@ KWatchGnuPGMainWindow::~KWatchGnuPGMainWindow()
void KWatchGnuPGMainWindow::slotClear()
{
mCentralWidget->clear();
- mCentralWidget->append( tr("[%1] Log cleared").arg( QDateTime::currentDateTime().toString(Qt::ISODate) ) );
+ mCentralWidget->append( tr("[%1] Log cleared").arg( TQDateTime::currentDateTime().toString(Qt::ISODate) ) );
}
void KWatchGnuPGMainWindow::createActions()
{
(void)new KAction( i18n("C&lear History"), "history_clear", CTRL+Key_L,
- this, SLOT( slotClear() ),
+ this, TQT_SLOT( slotClear() ),
actionCollection(), "clear_log" );
- (void)KStdAction::saveAs( this, SLOT(slotSaveAs()), actionCollection() );
- (void)KStdAction::close( this, SLOT(close()), actionCollection() );
- (void)KStdAction::quit( this, SLOT(slotQuit()), actionCollection() );
- (void)KStdAction::preferences( this, SLOT(slotConfigure()), actionCollection() );
- ( void )KStdAction::keyBindings(this, SLOT(configureShortcuts()), actionCollection());
- ( void )KStdAction::configureToolbars(this, SLOT(slotConfigureToolbars()), actionCollection());
+ (void)KStdAction::saveAs( this, TQT_SLOT(slotSaveAs()), actionCollection() );
+ (void)KStdAction::close( this, TQT_SLOT(close()), actionCollection() );
+ (void)KStdAction::quit( this, TQT_SLOT(slotQuit()), actionCollection() );
+ (void)KStdAction::preferences( this, TQT_SLOT(slotConfigure()), actionCollection() );
+ ( void )KStdAction::keyBindings(this, TQT_SLOT(configureShortcuts()), actionCollection());
+ ( void )KStdAction::configureToolbars(this, TQT_SLOT(slotConfigureToolbars()), actionCollection());
#if 0
- (void)new KAction( i18n("Configure KWatchGnuPG..."), QString::fromLatin1("configure"),
- 0, this, SLOT( slotConfigure() ),
+ (void)new KAction( i18n("Configure KWatchGnuPG..."), TQString::fromLatin1("configure"),
+ 0, this, TQT_SLOT( slotConfigure() ),
actionCollection(), "configure" );
#endif
@@ -127,15 +127,15 @@ void KWatchGnuPGMainWindow::slotConfigureToolbars()
void KWatchGnuPGMainWindow::startWatcher()
{
- disconnect( mWatcher, SIGNAL( processExited(KProcess*) ),
- this, SLOT( slotWatcherExited() ) );
+ disconnect( mWatcher, TQT_SIGNAL( processExited(KProcess*) ),
+ this, TQT_SLOT( slotWatcherExited() ) );
if( mWatcher->isRunning() ) {
mWatcher->kill();
while( mWatcher->isRunning() ) {
- kapp->eventLoop()->processEvents(QEventLoop::ExcludeUserInput);
+ kapp->eventLoop()->processEvents(TQEventLoop::ExcludeUserInput);
}
mCentralWidget->append(tr("[%1] Log stopped")
- .arg( QDateTime::currentDateTime().toString(Qt::ISODate)));
+ .arg( TQDateTime::currentDateTime().toString(Qt::ISODate)));
}
mWatcher->clearArguments();
KConfig* config = kapp->config();
@@ -143,20 +143,20 @@ void KWatchGnuPGMainWindow::startWatcher()
*mWatcher << config->readEntry("Executable", WATCHGNUPGBINARY);
*mWatcher << "--force";
*mWatcher << config->readEntry("Socket", WATCHGNUPGSOCKET);
- config->setGroup(QString::null);
+ config->setGroup(TQString::null);
if( !mWatcher->start() ) {
KMessageBox::sorry( this, i18n("The watchgnupg logging process could not be started.\nPlease install watchgnupg somewhere in your $PATH.\nThis log window is now completely useless." ) );
} else {
mCentralWidget->append( tr("[%1] Log started")
- .arg( QDateTime::currentDateTime().toString(Qt::ISODate) ) );
+ .arg( TQDateTime::currentDateTime().toString(Qt::ISODate) ) );
}
- connect( mWatcher, SIGNAL( processExited(KProcess*) ),
- this, SLOT( slotWatcherExited() ) );
+ connect( mWatcher, TQT_SIGNAL( processExited(KProcess*) ),
+ this, TQT_SLOT( slotWatcherExited() ) );
}
void KWatchGnuPGMainWindow::setGnuPGConfig()
{
- QStringList logclients;
+ TQStringList logclients;
// Get config object
Kleo::CryptoConfig* cconfig = Kleo::CryptoBackendFactory::instance()->config();
if ( !cconfig )
@@ -164,8 +164,8 @@ void KWatchGnuPGMainWindow::setGnuPGConfig()
//Q_ASSERT( cconfig );
KConfig* config = kapp->config();
config->setGroup("WatchGnuPG");
- QStringList comps = cconfig->componentList();
- for( QStringList::const_iterator it = comps.begin(); it != comps.end(); ++it ) {
+ TQStringList comps = cconfig->componentList();
+ for( TQStringList::const_iterator it = comps.begin(); it != comps.end(); ++it ) {
Kleo::CryptoConfigComponent* comp = cconfig->component( *it );
Q_ASSERT(comp);
// Look for log-file entry in Debug group
@@ -173,10 +173,10 @@ void KWatchGnuPGMainWindow::setGnuPGConfig()
if( group ) {
Kleo::CryptoConfigEntry* entry = group->entry("log-file");
if( entry ) {
- entry->setStringValue( QString("socket://")+
+ entry->setStringValue( TQString("socket://")+
config->readEntry("Socket",
WATCHGNUPGSOCKET ));
- logclients << QString("%1 (%2)").arg(*it).arg(comp->description());
+ logclients << TQString("%1 (%2)").arg(*it).arg(comp->description());
}
entry = group->entry("debug-level");
if( entry ) {
@@ -192,7 +192,7 @@ void KWatchGnuPGMainWindow::setGnuPGConfig()
void KWatchGnuPGMainWindow::slotWatcherExited()
{
- if( KMessageBox::questionYesNo( this, i18n("The watchgnupg logging process died.\nDo you want to try to restart it?"), QString::null, i18n("Try Restart"), i18n("Do Not Try") ) == KMessageBox::Yes ) {
+ if( KMessageBox::questionYesNo( this, i18n("The watchgnupg logging process died.\nDo you want to try to restart it?"), TQString::null, i18n("Try Restart"), i18n("Do Not Try") ) == KMessageBox::Yes ) {
mCentralWidget->append( i18n("====== Restarting logging process =====") );
startWatcher();
} else {
@@ -204,7 +204,7 @@ void KWatchGnuPGMainWindow::slotReadStdout()
{
if ( !mWatcher )
return;
- QString str;
+ TQString str;
while( mWatcher->readln(str,false) > 0 ) {
mCentralWidget->append( str );
if( !isVisible() ) {
@@ -213,7 +213,7 @@ void KWatchGnuPGMainWindow::slotReadStdout()
mSysTray->setAttention(true);
}
}
- QTimer::singleShot( 0, this, SLOT(slotAckRead()) );
+ TQTimer::singleShot( 0, this, TQT_SLOT(slotAckRead()) );
}
void KWatchGnuPGMainWindow::slotAckRead() {
@@ -229,10 +229,10 @@ void KWatchGnuPGMainWindow::show()
void KWatchGnuPGMainWindow::slotSaveAs()
{
- QString filename = KFileDialog::getSaveFileName( QString::null, QString::null,
+ TQString filename = KFileDialog::getSaveFileName( TQString::null, TQString::null,
this, i18n("Save Log to File") );
if( filename.isEmpty() ) return;
- QFile file(filename);
+ TQFile file(filename);
if( file.exists() ) {
if( KMessageBox::Yes !=
KMessageBox::warningYesNo( this, i18n("The file named \"%1\" already "
@@ -243,7 +243,7 @@ void KWatchGnuPGMainWindow::slotSaveAs()
}
}
if( file.open( IO_WriteOnly ) ) {
- QTextStream st(&file);
+ TQTextStream st(&file);
st << mCentralWidget->text();
file.close();
}
@@ -251,8 +251,8 @@ void KWatchGnuPGMainWindow::slotSaveAs()
void KWatchGnuPGMainWindow::slotQuit()
{
- disconnect( mWatcher, SIGNAL( processExited(KProcess*) ),
- this, SLOT( slotWatcherExited() ) );
+ disconnect( mWatcher, TQT_SIGNAL( processExited(KProcess*) ),
+ this, TQT_SLOT( slotWatcherExited() ) );
mWatcher->kill();
kapp->quit();
}
@@ -261,8 +261,8 @@ void KWatchGnuPGMainWindow::slotConfigure()
{
if( !mConfig ) {
mConfig = new KWatchGnuPGConfig( this, "config dialog" );
- connect( mConfig, SIGNAL( reconfigure() ),
- this, SLOT( slotReadConfig() ) );
+ connect( mConfig, TQT_SIGNAL( reconfigure() ),
+ this, TQT_SLOT( slotReadConfig() ) );
}
mConfig->loadConfig();
mConfig->exec();
@@ -273,8 +273,8 @@ void KWatchGnuPGMainWindow::slotReadConfig()
KConfig* config = kapp->config();
config->setGroup("LogWindow");
mCentralWidget->setWordWrap( config->readBoolEntry("WordWrap", false)
- ?QTextEdit::WidgetWidth
- :QTextEdit::NoWrap );
+ ?TQTextEdit::WidgetWidth
+ :TQTextEdit::NoWrap );
mCentralWidget->setMaxLogLines( config->readNumEntry( "MaxLogLen", 10000 ) );
setGnuPGConfig();
startWatcher();
diff --git a/certmanager/kwatchgnupg/kwatchgnupgmainwin.h b/certmanager/kwatchgnupg/kwatchgnupgmainwin.h
index 2021a6579..64d0bbe54 100644
--- a/certmanager/kwatchgnupg/kwatchgnupgmainwin.h
+++ b/certmanager/kwatchgnupg/kwatchgnupgmainwin.h
@@ -43,7 +43,7 @@ class QTextEdit;
class KWatchGnuPGMainWindow : public KMainWindow {
Q_OBJECT
public:
- KWatchGnuPGMainWindow( QWidget* parent = 0, const char* name = 0 );
+ KWatchGnuPGMainWindow( TQWidget* parent = 0, const char* name = 0 );
virtual ~KWatchGnuPGMainWindow();
public slots:
void slotWatcherExited();
@@ -69,7 +69,7 @@ private:
KProcIO* mWatcher;
- QTextEdit* mCentralWidget;
+ TQTextEdit* mCentralWidget;
KWatchGnuPGTray* mSysTray;
KWatchGnuPGConfig* mConfig;
};
diff --git a/certmanager/kwatchgnupg/tray.cpp b/certmanager/kwatchgnupg/tray.cpp
index 62024b14a..c58f1b123 100644
--- a/certmanager/kwatchgnupg/tray.cpp
+++ b/certmanager/kwatchgnupg/tray.cpp
@@ -37,7 +37,7 @@
#include <klocale.h>
#include <kglobal.h>
#include <kiconloader.h>
-#include <qtooltip.h>
+#include <tqtooltip.h>
KWatchGnuPGTray::KWatchGnuPGTray( KWatchGnuPGMainWindow* mainwin )
: KSystemTray( mainwin, "KWatchGnuPG Tray Window" )
@@ -50,7 +50,7 @@ KWatchGnuPGTray::KWatchGnuPGTray( KWatchGnuPGMainWindow* mainwin )
mAttentionPix = loadIcon("kwatchgnupg2");
setPixmap( mNormalPix );
- QToolTip::add( this, i18n("KWatchGnuPG Log Viewer") );
+ TQToolTip::add( this, i18n("KWatchGnuPG Log Viewer") );
}
KWatchGnuPGTray::~KWatchGnuPGTray()
diff --git a/certmanager/kwatchgnupg/tray.h b/certmanager/kwatchgnupg/tray.h
index 7f220ecad..85695f8f5 100644
--- a/certmanager/kwatchgnupg/tray.h
+++ b/certmanager/kwatchgnupg/tray.h
@@ -34,7 +34,7 @@
#define TRAY_H
#include <ksystemtray.h>
-#include <qpixmap.h>
+#include <tqpixmap.h>
class KWatchGnuPGMainWindow;
@@ -47,8 +47,8 @@ public:
public slots:
void setAttention( bool att );
private:
- QPixmap mNormalPix;
- QPixmap mAttentionPix;
+ TQPixmap mNormalPix;
+ TQPixmap mAttentionPix;
};
#endif /* TRAY_H */
diff --git a/certmanager/lib/backends/chiasmus/chiasmusbackend.cpp b/certmanager/lib/backends/chiasmus/chiasmusbackend.cpp
index 15a63de53..aad0701ae 100644
--- a/certmanager/lib/backends/chiasmus/chiasmusbackend.cpp
+++ b/certmanager/lib/backends/chiasmus/chiasmusbackend.cpp
@@ -47,9 +47,9 @@
#include <kshell.h>
#include <kdebug.h>
-#include <qstringlist.h>
-#include <qvariant.h>
-#include <qfileinfo.h>
+#include <tqstringlist.h>
+#include <tqvariant.h>
+#include <tqfileinfo.h>
#include <map>
#include <memory>
@@ -59,12 +59,12 @@
namespace {
//
- // The usual QVariant template helpers:
+ // The usual TQVariant template helpers:
//
// to<> is a demarshaller. It's a class b/c you can't partially
// specialise function templates yet. However, to<> can be used as if
- // it was a function: QString s = to<QString>( myVariant );
+ // it was a function: TQString s = to<TQString>( myVariant );
template <typename T> class to {};
#define MAKE_TO( type, func ) \
@@ -72,7 +72,7 @@ namespace {
class to< type > { \
type m; \
public: \
- to( const QVariant & v ) : m( v.func() ) {} \
+ to( const TQVariant & v ) : m( v.func() ) {} \
operator type() const { return m; } \
}
@@ -83,31 +83,31 @@ namespace {
class to<KURL> {
KURL m;
public:
- to( const QVariant & v ) {
+ to( const TQVariant & v ) {
m.setPath( v.toString() );
}
operator KURL() const { return m; }
};
template <typename T>
- class to< QValueList<T> > {
- QValueList<T> m;
+ class to< TQValueList<T> > {
+ TQValueList<T> m;
public:
- to( const QVariant & v ) {
- const QValueList<QVariant> vl = v.toList();
- for ( QValueList<QVariant>::const_iterator it = vl.begin(), end = vl.end() ; it != end ; ++it )
+ to( const TQVariant & v ) {
+ const TQValueList<TQVariant> vl = v.toList();
+ for ( TQValueList<TQVariant>::const_iterator it = vl.begin(), end = vl.end() ; it != end ; ++it )
m.push_back( to<T>( *it ) );
}
- operator QValueList<T> () const { return m; }
+ operator TQValueList<T> () const { return m; }
};
template <>
class to<KURL::List> {
KURL::List m;
public:
- to( const QVariant & v ) {
+ to( const TQVariant & v ) {
// wow, KURL::List is broken... it lacks conversion from and to QVL<KURL>...
- m += to< QValueList<KURL> >( v );
+ m += to< TQValueList<KURL> >( v );
}
operator KURL::List() const { return m; }
};
@@ -116,37 +116,37 @@ namespace {
// from<> is the demarshaller. See to<> for why this is a class...
template <typename T>
- struct from_helper : public QVariant {
- from_helper( const T & t ) : QVariant( t ) {}
+ struct from_helper : public TQVariant {
+ from_helper( const T & t ) : TQVariant( t ) {}
};
template <typename T>
- QVariant from( const T & t ) {
+ TQVariant from( const T & t ) {
return from_helper<T>( t );
}
// some special types:
- template <> struct from_helper<bool> : public QVariant {
- from_helper( bool b ) : QVariant( b, int() ) {}
+ template <> struct from_helper<bool> : public TQVariant {
+ from_helper( bool b ) : TQVariant( b, int() ) {}
};
- template <> struct from_helper<KURL> : public QVariant {
- from_helper( const KURL & url ) : QVariant( url.path() ) {}
+ template <> struct from_helper<KURL> : public TQVariant {
+ from_helper( const KURL & url ) : TQVariant( url.path() ) {}
};
- template <typename T> struct from_helper< QValueList<T> > : public QVariant {
- from_helper( const QValueList<T> & l ) {
- QValueList<QVariant> result;
- for ( typename QValueList<T>::const_iterator it = l.begin(), end = l.end() ; it != end ; ++it )
+ template <typename T> struct from_helper< TQValueList<T> > : public TQVariant {
+ from_helper( const TQValueList<T> & l ) {
+ TQValueList<TQVariant> result;
+ for ( typename TQValueList<T>::const_iterator it = l.begin(), end = l.end() ; it != end ; ++it )
result.push_back( from( *it ) );
- QVariant::operator=( result );
+ TQVariant::operator=( result );
}
};
- template <> struct from_helper<KURL::List> : public from_helper< QValueList<KURL> > {
- from_helper( const KURL::List & l ) : from_helper< QValueList<KURL> >( l ) {}
+ template <> struct from_helper<KURL::List> : public from_helper< TQValueList<KURL> > {
+ from_helper( const KURL::List & l ) : from_helper< TQValueList<KURL> >( l ) {}
};
class ChiasmusConfigEntry : public Kleo::CryptoConfigEntry {
unsigned int mIdx;
- QVariant mValue;
+ TQVariant mValue;
bool mDirty;
public:
ChiasmusConfigEntry( unsigned int i )
@@ -155,8 +155,8 @@ namespace {
{
assert( i < kleo_chiasmus_config_entries_dim );
}
- QString name() const { return kleo_chiasmus_config_entries[mIdx].name; }
- QString description() const { return i18n( kleo_chiasmus_config_entries[mIdx].description ); }
+ TQString name() const { return kleo_chiasmus_config_entries[mIdx].name; }
+ TQString description() const { return i18n( kleo_chiasmus_config_entries[mIdx].description ); }
bool isOptional() const { return kleo_chiasmus_config_entries[mIdx].is_optional; }
bool isReadOnly() const { return false; }
bool isList() const { return kleo_chiasmus_config_entries[mIdx].is_list; }
@@ -165,7 +165,7 @@ namespace {
ArgType argType() const { return static_cast<ArgType>( kleo_chiasmus_config_entries[mIdx].type ); }
bool isSet() const { return mValue != defaultValue(); }
bool boolValue() const { return mValue.toBool(); }
- QString stringValue() const { return mValue.toString(); }
+ TQString stringValue() const { return mValue.toString(); }
int intValue() const { return mValue.toInt(); }
unsigned int uintValue() const { return mValue.toUInt(); }
KURL urlValue() const {
@@ -173,15 +173,15 @@ namespace {
KURL u; u.setPath( mValue.toString() ); return u;
}
unsigned int numberOfTimesSet() const { return 0; }
- QStringList stringValueList() const { return mValue.toStringList(); }
- QValueList<int> intValueList() const { return to< QValueList<int> >( mValue ); }
- QValueList<unsigned int> uintValueList() const { return to< QValueList<unsigned int> >( mValue ); }
+ TQStringList stringValueList() const { return mValue.toStringList(); }
+ TQValueList<int> intValueList() const { return to< TQValueList<int> >( mValue ); }
+ TQValueList<unsigned int> uintValueList() const { return to< TQValueList<unsigned int> >( mValue ); }
KURL::List urlValueList() const {
if ( argType() != ArgType_Path && argType()!= ArgType_DirPath ) return mValue.toStringList();
else return to<KURL::List>( mValue ); }
void resetToDefault() { mValue = defaultValue(); mDirty = false; }
- void setBoolValue( bool value ) { setValue( QVariant( value, int() ) ); }
- void setStringValue( const QString & value ) { setValue( value ); }
+ void setBoolValue( bool value ) { setValue( TQVariant( value, int() ) ); }
+ void setStringValue( const TQString & value ) { setValue( value ); }
void setIntValue( int value ) { setValue( value ); }
void setUIntValue( unsigned int value ) { setValue( value ); }
void setURLValue( const KURL & value ) {
@@ -189,13 +189,13 @@ namespace {
else setValue( value.path() );
}
void setNumberOfTimesSet( unsigned int ) {}
- void setStringValueList( const QStringList & value ) { setValue( value ); }
- void setIntValueList( const QValueList<int> & l ) { setValue( from( l ) ); }
- void setUIntValueList( const QValueList<unsigned int> & l ) { setValue( from( l ) ); }
+ void setStringValueList( const TQStringList & value ) { setValue( value ); }
+ void setIntValueList( const TQValueList<int> & l ) { setValue( from( l ) ); }
+ void setUIntValueList( const TQValueList<unsigned int> & l ) { setValue( from( l ) ); }
void setURLValueList( const KURL::List & l ) { setValue( from( l ) ); }
bool isDirty() const { return mDirty; }
- QVariant value() const { return mValue; }
+ TQVariant value() const { return mValue; }
void sync( KConfigBase * config ) {
if ( !mDirty )
@@ -208,67 +208,67 @@ namespace {
mValue = config->readPropertyEntry( kleo_chiasmus_config_entries[mIdx].name, defaultValue() );
}
private:
- QVariant defaultValue() const;
- void setValue( const QVariant & value ) { mValue = value; mDirty = true; }
+ TQVariant defaultValue() const;
+ void setValue( const TQVariant & value ) { mValue = value; mDirty = true; }
};
- QVariant ChiasmusConfigEntry::defaultValue() const {
+ TQVariant ChiasmusConfigEntry::defaultValue() const {
const kleo_chiasmus_config_data & data = kleo_chiasmus_config_entries[mIdx];
switch ( data.type ) {
default:
- return QVariant();
+ return TQVariant();
case ArgType_None:
if ( isList() )
- return QValueList<QVariant>() << QVariant( data.defaults.boolean.value, int() );
+ return TQValueList<TQVariant>() << TQVariant( data.defaults.boolean.value, int() );
else
- return QVariant( data.defaults.boolean.value, int() );
+ return TQVariant( data.defaults.boolean.value, int() );
case ArgType_String:
if ( isList() )
- return QStringList( QString::fromLatin1( data.defaults.string ) );
+ return TQStringList( TQString::fromLatin1( data.defaults.string ) );
else
- return QString::fromLatin1( data.defaults.string );
+ return TQString::fromLatin1( data.defaults.string );
case ArgType_Int:
if ( isList() )
- return QValueList<QVariant>() << data.defaults.integer;
+ return TQValueList<TQVariant>() << data.defaults.integer;
else
return data.defaults.integer;
case ArgType_UInt:
if ( isList() )
- return QValueList<QVariant>() << data.defaults.unsigned_integer;
+ return TQValueList<TQVariant>() << data.defaults.unsigned_integer;
else
return data.defaults.unsigned_integer;
case ArgType_Path:
case ArgType_DirPath:
if ( isList() )
- return QValueList<QVariant>() << QString::fromLatin1( data.defaults.path );
+ return TQValueList<TQVariant>() << TQString::fromLatin1( data.defaults.path );
else
- return QString::fromLatin1( data.defaults.path );
+ return TQString::fromLatin1( data.defaults.path );
case ArgType_URL:
case ArgType_LDAPURL:
if ( isList() )
- return QValueList<QVariant>() << QString::fromLatin1( data.defaults.url );
+ return TQValueList<TQVariant>() << TQString::fromLatin1( data.defaults.url );
else
- return QString::fromLatin1( data.defaults.url );
+ return TQString::fromLatin1( data.defaults.url );
}
}
class ChiasmusGeneralGroup : public Kleo::CryptoConfigGroup {
- mutable std::map<QString,ChiasmusConfigEntry*> mCache;
+ mutable std::map<TQString,ChiasmusConfigEntry*> mCache;
mutable KConfig * mConfigObject;
public:
ChiasmusGeneralGroup() : Kleo::CryptoConfigGroup(), mConfigObject( 0 ) {}
~ChiasmusGeneralGroup() { clear(); delete mConfigObject; }
- QString name() const { return "General"; }
- QString iconName() const { return "chiasmus_chi"; }
- QString description() const { return i18n( "General" ); }
+ TQString name() const { return "General"; }
+ TQString iconName() const { return "chiasmus_chi"; }
+ TQString description() const { return i18n( "General" ); }
Kleo::CryptoConfigEntry::Level level() const { return Kleo::CryptoConfigEntry::Level_Basic; }
- QStringList entryList() const {
- QStringList result;
+ TQStringList entryList() const {
+ TQStringList result;
for ( unsigned int i = 0 ; i < kleo_chiasmus_config_entries_dim ; ++i )
result.push_back( kleo_chiasmus_config_entries[i].name );
return result;
}
- Kleo::CryptoConfigEntry * entry( const QString & name ) const {
+ Kleo::CryptoConfigEntry * entry( const TQString & name ) const {
if ( ChiasmusConfigEntry * entry = mCache[name] )
return entry;
const KConfigGroup group( configObject(), "Chiasmus" );
@@ -283,7 +283,7 @@ namespace {
void sync() {
KConfigGroup group( configObject(), "Chiasmus" );
- for ( std::map<QString,ChiasmusConfigEntry*>::const_iterator it = mCache.begin(), end = mCache.end() ; it != end ; ++it )
+ for ( std::map<TQString,ChiasmusConfigEntry*>::const_iterator it = mCache.begin(), end = mCache.end() ; it != end ; ++it )
it->second->sync( &group );
group.sync();
clear();
@@ -296,7 +296,7 @@ namespace {
return mConfigObject;
}
void clear() {
- for ( std::map<QString,ChiasmusConfigEntry*>::const_iterator it = mCache.begin(), end = mCache.end() ; it != end ; ++it )
+ for ( std::map<TQString,ChiasmusConfigEntry*>::const_iterator it = mCache.begin(), end = mCache.end() ; it != end ; ++it )
delete it->second;
mCache.clear();
}
@@ -313,11 +313,11 @@ namespace {
mGeneralGroup->sync();
}
- QString name() const { return "Chiasmus"; }
- QString iconName() const { return "chiasmus_chi"; }
- QString description() const { return i18n( "Chiasmus" ); }
- QStringList groupList() const { return QStringList() << "General"; }
- Kleo::CryptoConfigGroup * group( const QString & name ) const {
+ TQString name() const { return "Chiasmus"; }
+ TQString iconName() const { return "chiasmus_chi"; }
+ TQString description() const { return i18n( "Chiasmus" ); }
+ TQStringList groupList() const { return TQStringList() << "General"; }
+ Kleo::CryptoConfigGroup * group( const TQString & name ) const {
if ( name != "General" )
return 0;
if ( !mGeneralGroup )
@@ -334,8 +334,8 @@ public:
CryptoConfig() : Kleo::CryptoConfig(), mComponent( 0 ) {}
~CryptoConfig() { delete mComponent; }
- QStringList componentList() const { return QStringList() << "Chiasmus" ; }
- ChiasmusComponent * component( const QString & name ) const {
+ TQStringList componentList() const { return TQStringList() << "Chiasmus" ; }
+ ChiasmusComponent * component( const TQString & name ) const {
if ( name != "Chiasmus" )
return 0;
if ( !mComponent )
@@ -359,8 +359,8 @@ public:
}
~Protocol() {}
- QString name() const { return "Chiasmus"; }
- QString displayName() const { return i18n( "Chiasmus command line tool" ); }
+ TQString name() const { return "Chiasmus"; }
+ TQString displayName() const { return i18n( "Chiasmus command line tool" ); }
KeyListJob * keyListJob( bool, bool, bool ) const { return 0; }
EncryptJob * encryptJob( bool, bool ) const { return 0; }
DecryptJob * decryptJob() const { return 0; }
@@ -370,14 +370,14 @@ public:
KeyGenerationJob * keyGenerationJob() const { return 0; }
ImportJob * importJob() const { return 0; }
ExportJob * publicKeyExportJob( bool ) const { return 0; }
- ExportJob * secretKeyExportJob( bool, const QString& ) const { return 0; }
+ ExportJob * secretKeyExportJob( bool, const TQString& ) const { return 0; }
DownloadJob * downloadJob( bool ) const { return 0; }
DeleteJob * deleteJob() const { return 0; }
SignEncryptJob * signEncryptJob( bool, bool ) const { return 0; }
DecryptVerifyJob * decryptVerifyJob( bool ) const { return 0; }
RefreshKeysJob * refreshKeysJob() const { return 0; }
- SpecialJob * specialJob( const char * type, const QMap<QString,QVariant> & args ) const {
+ SpecialJob * specialJob( const char * type, const TQMap<TQString,TQVariant> & args ) const {
if ( qstricmp( type, "x-obtain-keys" ) == 0 && args.size() == 0 )
return new ObtainKeysJob();
if ( qstricmp( type, "x-encrypt" ) == 0 && args.size() == 0 )
@@ -407,11 +407,11 @@ Kleo::ChiasmusBackend::~ChiasmusBackend() {
delete mProtocol;
}
-QString Kleo::ChiasmusBackend::name() const {
+TQString Kleo::ChiasmusBackend::name() const {
return "Chiasmus";
}
-QString Kleo::ChiasmusBackend::displayName() const {
+TQString Kleo::ChiasmusBackend::displayName() const {
return i18n( "Chiasmus" );
}
@@ -430,19 +430,19 @@ Kleo::CryptoBackend::Protocol * Kleo::ChiasmusBackend::protocol( const char * na
return mProtocol;
}
-bool Kleo::ChiasmusBackend::checkForOpenPGP( QString * reason ) const {
+bool Kleo::ChiasmusBackend::checkForOpenPGP( TQString * reason ) const {
if ( reason )
*reason = i18n( "Unsupported protocol \"%1\"" ).arg( "OpenPGP" );
return false;
}
-bool Kleo::ChiasmusBackend::checkForSMIME( QString * reason ) const {
+bool Kleo::ChiasmusBackend::checkForSMIME( TQString * reason ) const {
if ( reason )
*reason = i18n( "Unsupported protocol \"%1\"" ).arg( "SMIME" );
return false;
}
-bool Kleo::ChiasmusBackend::checkForChiasmus( QString * reason ) const {
+bool Kleo::ChiasmusBackend::checkForChiasmus( TQString * reason ) const {
// kills the protocol instance when we return false:
std::auto_ptr<Protocol> tmp( mProtocol );
@@ -450,8 +450,8 @@ bool Kleo::ChiasmusBackend::checkForChiasmus( QString * reason ) const {
const CryptoConfigEntry * path = config()->entry( "Chiasmus", "General", "path" );
assert( path ); assert( path->argType() == CryptoConfigEntry::ArgType_Path );
- const QString chiasmus = path->urlValue().path();
- const QFileInfo fi( KShell::tildeExpand( chiasmus ) );
+ const TQString chiasmus = path->urlValue().path();
+ const TQFileInfo fi( KShell::tildeExpand( chiasmus ) );
if ( !fi.isExecutable() ) {
if ( reason )
*reason = i18n( "File \"%1\" does not exist or is not executable." ).arg( chiasmus );
@@ -463,7 +463,7 @@ bool Kleo::ChiasmusBackend::checkForChiasmus( QString * reason ) const {
return true;
}
-bool Kleo::ChiasmusBackend::checkForProtocol( const char * name, QString * reason ) const {
+bool Kleo::ChiasmusBackend::checkForProtocol( const char * name, TQString * reason ) const {
if ( qstricmp( name, "Chiasmus" ) == 0 )
return checkForChiasmus( reason );
if ( reason )
diff --git a/certmanager/lib/backends/chiasmus/chiasmusbackend.h b/certmanager/lib/backends/chiasmus/chiasmusbackend.h
index 6d51cad77..9b97723d4 100644
--- a/certmanager/lib/backends/chiasmus/chiasmusbackend.h
+++ b/certmanager/lib/backends/chiasmus/chiasmusbackend.h
@@ -52,8 +52,8 @@ namespace Kleo {
static const ChiasmusBackend * instance() { return self; }
- QString name() const;
- QString displayName() const;
+ TQString name() const;
+ TQString displayName() const;
Kleo::CryptoConfig * config() const;
@@ -61,10 +61,10 @@ namespace Kleo {
Kleo::CryptoBackend::Protocol * smime() const { return 0; }
Kleo::CryptoBackend::Protocol * protocol( const char * name ) const;
- bool checkForOpenPGP( QString * reason=0 ) const;
- bool checkForSMIME( QString * reason=0 ) const;
- bool checkForChiasmus( QString * reason=0 ) const;
- bool checkForProtocol( const char * name, QString * reason=0 ) const;
+ bool checkForOpenPGP( TQString * reason=0 ) const;
+ bool checkForSMIME( TQString * reason=0 ) const;
+ bool checkForChiasmus( TQString * reason=0 ) const;
+ bool checkForProtocol( const char * name, TQString * reason=0 ) const;
bool supportsOpenPGP() const { return false; }
bool supportsSMIME() const { return false; }
diff --git a/certmanager/lib/backends/chiasmus/chiasmusjob.cpp b/certmanager/lib/backends/chiasmus/chiasmusjob.cpp
index 3ac7513df..99fdda015 100644
--- a/certmanager/lib/backends/chiasmus/chiasmusjob.cpp
+++ b/certmanager/lib/backends/chiasmus/chiasmusjob.cpp
@@ -48,9 +48,9 @@
#include <kdebug.h>
#include <kmessagebox.h>
-#include <qtimer.h>
-#include <qfileinfo.h>
-#include <qvariant.h>
+#include <tqtimer.h>
+#include <tqfileinfo.h>
+#include <tqvariant.h>
#include <memory>
@@ -89,15 +89,15 @@ GpgME::Error Kleo::ChiasmusJob::setup() {
? SymCryptRunProcessBase::Encrypt
: SymCryptRunProcessBase::Decrypt,
this, "symcryptrun" );
- QTimer::singleShot( timeoutEntry->uintValue() * 1000, this,
- SLOT( slotTimeout() ) );
+ TQTimer::singleShot( timeoutEntry->uintValue() * 1000, this,
+ TQT_SLOT( slotTimeout() ) );
return 0;
}
namespace {
struct LaterDeleter {
- QObject * _this;
- LaterDeleter( QObject * o ) : _this( o ) {}
+ TQObject * _this;
+ LaterDeleter( TQObject * o ) : _this( o ) {}
~LaterDeleter() { if ( _this ) _this->deleteLater(); }
void disable() { _this = 0; }
};
@@ -110,8 +110,8 @@ GpgME::Error Kleo::ChiasmusJob::start() {
if ( const GpgME::Error err = setup() )
return mError = err;
- connect( mSymCryptRun, SIGNAL(processExited(KProcess*)),
- this, SLOT(slotProcessExited(KProcess*)) );
+ connect( mSymCryptRun, TQT_SIGNAL(processExited(KProcess*)),
+ this, TQT_SLOT(slotProcessExited(KProcess*)) );
if ( !mSymCryptRun->launch( mInput ) )
return mError = gpg_error( GPG_ERR_ENOENT ); // what else?
@@ -155,7 +155,7 @@ GpgME::Error Kleo::ChiasmusJob::slotProcessExited( KProcess * proc ) {
}
emit done();
- emit SpecialJob::result( mError, QVariant( mOutput ) );
+ emit SpecialJob::result( mError, TQVariant( mOutput ) );
return mError;
}
@@ -200,17 +200,17 @@ void Kleo::ChiasmusJob::slotTimeout() {
}
-void Kleo::ChiasmusJob::showErrorDialog( QWidget * parent, const QString & caption ) const {
+void Kleo::ChiasmusJob::showErrorDialog( TQWidget * parent, const TQString & caption ) const {
if ( !mError )
return;
if ( mError.isCanceled() )
return;
- const QString msg = ( mMode == Encrypt
+ const TQString msg = ( mMode == Encrypt
? i18n( "Encryption failed: %1" )
: i18n( "Decryption failed: %1" ) )
- .arg( QString::fromLocal8Bit( mError.asString() ) );
+ .arg( TQString::fromLocal8Bit( mError.asString() ) );
if ( !mStderr.isEmpty() ) {
- const QString details = i18n( "The following was received on stderr:\n%1" ).arg( mStderr );
+ const TQString details = i18n( "The following was received on stderr:\n%1" ).arg( mStderr );
KMessageBox::detailedError( parent, msg, details, caption );
} else {
KMessageBox::error( parent, msg, caption );
diff --git a/certmanager/lib/backends/chiasmus/chiasmusjob.h b/certmanager/lib/backends/chiasmus/chiasmusjob.h
index 6393a0905..54b3763c2 100644
--- a/certmanager/lib/backends/chiasmus/chiasmusjob.h
+++ b/certmanager/lib/backends/chiasmus/chiasmusjob.h
@@ -36,7 +36,7 @@
#include "kleo/specialjob.h"
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include <gpgmepp/context.h>
@@ -53,10 +53,10 @@ namespace Kleo {
Q_OBJECT
Q_ENUMS( Mode )
Q_PROPERTY( Mode mode READ mode )
- Q_PROPERTY( QString key READ key WRITE setKey )
- Q_PROPERTY( QString options READ options WRITE setOptions )
- Q_PROPERTY( QByteArray input READ input WRITE setInput )
- Q_PROPERTY( QByteArray result READ result )
+ Q_PROPERTY( TQString key READ key WRITE setKey )
+ Q_PROPERTY( TQString options READ options WRITE setOptions )
+ Q_PROPERTY( TQByteArray input READ input WRITE setInput )
+ Q_PROPERTY( TQByteArray result READ result )
public:
enum Mode {
Encrypt, Decrypt
@@ -70,21 +70,21 @@ namespace Kleo {
GpgME::Error exec();
/*!\reimp Kleo::Job */
- void showErrorDialog( QWidget *, const QString & ) const;
+ void showErrorDialog( TQWidget *, const TQString & ) const;
Mode mode() const { return mMode; }
- QString key() const { return mKey; }
- void setKey( const QString & key ) { mKey = key; }
+ TQString key() const { return mKey; }
+ void setKey( const TQString & key ) { mKey = key; }
- QString options() const { return mOptions; }
- void setOptions( const QString & options ) { mOptions = options; }
+ TQString options() const { return mOptions; }
+ void setOptions( const TQString & options ) { mOptions = options; }
- QByteArray input() const { return mInput; }
- void setInput( const QByteArray & input ) { mInput = input; }
+ TQByteArray input() const { return mInput; }
+ void setInput( const TQByteArray & input ) { mInput = input; }
//using SpecialJob::result;
- QByteArray result() const { return mOutput; }
+ TQByteArray result() const { return mOutput; }
public slots:
void slotCancel();
@@ -100,11 +100,11 @@ namespace Kleo {
private:
SymCryptRunProcessBase * mSymCryptRun;
- QString mKey;
- QString mOptions;
- QByteArray mInput, mOutput;
+ TQString mKey;
+ TQString mOptions;
+ TQByteArray mInput, mOutput;
GpgME::Error mError;
- QString mStderr;
+ TQString mStderr;
bool mCanceled;
bool mTimeout;
const Mode mMode;
diff --git a/certmanager/lib/backends/chiasmus/chiasmuslibrary.cpp b/certmanager/lib/backends/chiasmus/chiasmuslibrary.cpp
index 2e3225492..de1a01e10 100644
--- a/certmanager/lib/backends/chiasmus/chiasmuslibrary.cpp
+++ b/certmanager/lib/backends/chiasmus/chiasmuslibrary.cpp
@@ -41,7 +41,7 @@
#include <kdebug.h>
#include <klocale.h>
-#include <qfile.h>
+#include <tqfile.h>
#include <vector>
#include <algorithm>
@@ -60,14 +60,14 @@ Kleo::ChiasmusLibrary::~ChiasmusLibrary() {
//delete mXiaLibrary; // hmm, how to get rid of it, then?
}
-Kleo::ChiasmusLibrary::main_func Kleo::ChiasmusLibrary::chiasmus( QString * reason ) const {
+Kleo::ChiasmusLibrary::main_func Kleo::ChiasmusLibrary::chiasmus( TQString * reason ) const {
assert( ChiasmusBackend::instance() );
assert( ChiasmusBackend::instance()->config() );
const CryptoConfigEntry * lib = ChiasmusBackend::instance()->config()->entry( "Chiasmus", "General", "lib" );
assert( lib );
- const QString libfile = lib->urlValue().path();
+ const TQString libfile = lib->urlValue().path();
if ( !mXiaLibrary )
- mXiaLibrary = KLibLoader::self()->library( QFile::encodeName( libfile ) );
+ mXiaLibrary = KLibLoader::self()->library( TQFile::encodeName( libfile ) );
if ( !mXiaLibrary ) {
if ( reason )
*reason = i18n( "Failed to load %1: %2" )
@@ -94,7 +94,7 @@ namespace {
char ** mArgv;
int mArgc;
public:
- ArgvProvider( const QValueVector<QCString> & args ) {
+ ArgvProvider( const TQValueVector<TQCString> & args ) {
mArgv = new char * [args.size()];
for ( unsigned int i = 0 ; i < args.size() ; ++i )
mArgv[i] = strdup( args[i].data() );
@@ -107,7 +107,7 @@ namespace {
};
}
-int Kleo::ChiasmusLibrary::perform( const QValueVector<QCString> & args ) const {
+int Kleo::ChiasmusLibrary::perform( const TQValueVector<TQCString> & args ) const {
if ( main_func func = chiasmus() )
return func( args.size(), ArgvProvider( args ).argv() );
else
diff --git a/certmanager/lib/backends/chiasmus/chiasmuslibrary.h b/certmanager/lib/backends/chiasmus/chiasmuslibrary.h
index b04e162b4..1b15e86e1 100644
--- a/certmanager/lib/backends/chiasmus/chiasmuslibrary.h
+++ b/certmanager/lib/backends/chiasmus/chiasmuslibrary.h
@@ -34,8 +34,8 @@
#ifndef __KLEO_CHIASMUSLIBRARY_H__
#define __KLEO_CHIASMUSLIBRARY_H__
-#include <qvaluevector.h>
-#include <qcstring.h>
+#include <tqvaluevector.h>
+#include <tqcstring.h>
class KLibrary;
@@ -52,10 +52,10 @@ namespace Kleo {
static const ChiasmusLibrary * instance();
static void deleteInstance();
- int perform( const QValueVector<QCString> & args ) const;
+ int perform( const TQValueVector<TQCString> & args ) const;
private:
typedef int ( *main_func )( int, char** );
- main_func chiasmus( QString * reason=0 ) const;
+ main_func chiasmus( TQString * reason=0 ) const;
private:
static ChiasmusLibrary * self;
diff --git a/certmanager/lib/backends/chiasmus/obtainkeysjob.cpp b/certmanager/lib/backends/chiasmus/obtainkeysjob.cpp
index a9de8d658..4a79a1956 100644
--- a/certmanager/lib/backends/chiasmus/obtainkeysjob.cpp
+++ b/certmanager/lib/backends/chiasmus/obtainkeysjob.cpp
@@ -44,11 +44,11 @@
#include <kmessagebox.h>
#include <kshell.h>
-#include <qdir.h>
-#include <qstringlist.h>
-#include <qvariant.h>
-#include <qtimer.h>
-#include <qfileinfo.h>
+#include <tqdir.h>
+#include <tqstringlist.h>
+#include <tqvariant.h>
+#include <tqtimer.h>
+#include <tqfileinfo.h>
#include <gpg-error.h>
@@ -64,13 +64,13 @@ Kleo::ObtainKeysJob::ObtainKeysJob()
const CryptoConfigEntry * keypaths =
ChiasmusBackend::instance()->config()->entry( "Chiasmus", "General", "keydir" );
assert( keypaths );
- mKeyPaths = QStringList( keypaths->urlValue().path() );
+ mKeyPaths = TQStringList( keypaths->urlValue().path() );
}
Kleo::ObtainKeysJob::~ObtainKeysJob() {}
GpgME::Error Kleo::ObtainKeysJob::start() {
- QTimer::singleShot( 0, this, SLOT(slotPerform()) );
+ TQTimer::singleShot( 0, this, TQT_SLOT(slotPerform()) );
return mError = 0;
}
@@ -92,16 +92,16 @@ void Kleo::ObtainKeysJob::slotPerform( bool async ) {
mError = gpg_error( GPG_ERR_CANCELED );
if ( mIndex >= mKeyPaths.size() || mError ) {
emit done();
- emit SpecialJob::result( mError, QVariant( mResult ) );
+ emit SpecialJob::result( mError, TQVariant( mResult ) );
return;
}
emit progress( i18n( "Scanning directory %1..." ).arg( mKeyPaths[mIndex] ),
mIndex, mKeyPaths.size() );
- const QDir dir( KShell::tildeExpand( mKeyPaths[mIndex] ) );
+ const TQDir dir( KShell::tildeExpand( mKeyPaths[mIndex] ) );
- if ( const QFileInfoList * xisFiles = dir.entryInfoList( "*.xis;*.XIS", QDir::Files ) )
+ if ( const QFileInfoList * xisFiles = dir.entryInfoList( "*.xis;*.XIS", TQDir::Files ) )
for ( QFileInfoList::const_iterator it = xisFiles->begin(), end = xisFiles->end() ; it != end ; ++it )
if ( (*it)->isReadable() )
mResult.push_back( (*it)->absFilePath() );
@@ -109,17 +109,17 @@ void Kleo::ObtainKeysJob::slotPerform( bool async ) {
++mIndex;
if ( async )
- QTimer::singleShot( 0, this, SLOT(slotPerform()) );
+ TQTimer::singleShot( 0, this, TQT_SLOT(slotPerform()) );
else
slotPerform( false );
}
-void Kleo::ObtainKeysJob::showErrorDialog( QWidget * parent, const QString & caption ) const {
+void Kleo::ObtainKeysJob::showErrorDialog( TQWidget * parent, const TQString & caption ) const {
if ( !mError )
return;
if ( mError.isCanceled() )
return;
- const QString msg = QString::fromUtf8( mError.asString() );
+ const TQString msg = TQString::fromUtf8( mError.asString() );
KMessageBox::error( parent, msg, caption );
}
diff --git a/certmanager/lib/backends/chiasmus/obtainkeysjob.h b/certmanager/lib/backends/chiasmus/obtainkeysjob.h
index 4b8392d46..4e3f8f7e2 100644
--- a/certmanager/lib/backends/chiasmus/obtainkeysjob.h
+++ b/certmanager/lib/backends/chiasmus/obtainkeysjob.h
@@ -36,7 +36,7 @@
#include "kleo/specialjob.h"
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include <gpgmepp/context.h>
@@ -56,15 +56,15 @@ namespace Kleo {
To use, create an ObtainKeysJob instance like this:
<code>
Kleo::SpecialJob * job =
- protocol->specialJob("x-obtain-keys", QMap<QString,QVariant>());
+ protocol->specialJob("x-obtain-keys", TQMap<TQString,TQVariant>());
</code>
- The resulting QVariant will contain a QStringList containing the
+ The resulting TQVariant will contain a TQStringList containing the
absolute filenames of the keys found in the configured key files.
*/
class ObtainKeysJob : public Kleo::SpecialJob {
Q_OBJECT
- Q_PROPERTY( QStringList result READ result )
+ Q_PROPERTY( TQStringList result READ result )
public:
ObtainKeysJob();
~ObtainKeysJob();
@@ -75,10 +75,10 @@ namespace Kleo {
GpgME::Error exec();
/*!\reimp Kleo::Job */
- void showErrorDialog( QWidget *, const QString & ) const;
+ void showErrorDialog( TQWidget *, const TQString & ) const;
//using SpecialJob::result;
- QStringList result() const { return mResult; }
+ TQStringList result() const { return mResult; }
public slots:
void slotCancel();
@@ -89,9 +89,9 @@ namespace Kleo {
private:
GpgME::Error mError;
- QStringList mKeyPaths;
+ TQStringList mKeyPaths;
unsigned int mIndex;
- QStringList mResult;
+ TQStringList mResult;
bool mCanceled;
};
diff --git a/certmanager/lib/backends/chiasmus/symcryptrunprocessbase.cpp b/certmanager/lib/backends/chiasmus/symcryptrunprocessbase.cpp
index 1b8627252..3dc3b9370 100644
--- a/certmanager/lib/backends/chiasmus/symcryptrunprocessbase.cpp
+++ b/certmanager/lib/backends/chiasmus/symcryptrunprocessbase.cpp
@@ -36,15 +36,15 @@
#include <kdebug.h>
#include <kshell.h>
-#include <qtimer.h>
-#include <qfile.h>
+#include <tqtimer.h>
+#include <tqfile.h>
#include <cstring>
-Kleo::SymCryptRunProcessBase::SymCryptRunProcessBase( const QString & class_, const QString & program,
- const QString & keyFile, const QString & options,
+Kleo::SymCryptRunProcessBase::SymCryptRunProcessBase( const TQString & class_, const TQString & program,
+ const TQString & keyFile, const TQString & options,
Operation mode,
- QObject * parent, const char * name )
+ TQObject * parent, const char * name )
: KProcess( parent, name ),
mOperation( mode ), mOptions( options )
{
@@ -57,15 +57,15 @@ Kleo::SymCryptRunProcessBase::SymCryptRunProcessBase( const QString & class_, co
Kleo::SymCryptRunProcessBase::~SymCryptRunProcessBase() {}
-bool Kleo::SymCryptRunProcessBase::launch( const QByteArray & input, RunMode rm ) {
- connect( this, SIGNAL(receivedStdout(KProcess*,char*,int)),
- this, SLOT(slotReceivedStdout(KProcess*,char*,int)) );
- connect( this, SIGNAL(receivedStderr(KProcess*,char*,int)),
- this, SLOT(slotReceivedStderr(KProcess*,char*,int)) );
+bool Kleo::SymCryptRunProcessBase::launch( const TQByteArray & input, RunMode rm ) {
+ connect( this, TQT_SIGNAL(receivedStdout(KProcess*,char*,int)),
+ this, TQT_SLOT(slotReceivedStdout(KProcess*,char*,int)) );
+ connect( this, TQT_SIGNAL(receivedStderr(KProcess*,char*,int)),
+ this, TQT_SLOT(slotReceivedStderr(KProcess*,char*,int)) );
if ( rm == Block ) {
KTempFile tempfile;
tempfile.setAutoDelete( true );
- if ( QFile * file = tempfile.file() )
+ if ( TQFile * file = tempfile.file() )
file->writeBlock( input );
else
return false;
@@ -80,7 +80,7 @@ bool Kleo::SymCryptRunProcessBase::launch( const QByteArray & input, RunMode rm
return ok;
mInput = input.copy();
writeStdin( mInput.begin(), mInput.size() );
- connect( this, SIGNAL(wroteStdin(KProcess*)), this, SLOT(closeStdin()) );
+ connect( this, TQT_SIGNAL(wroteStdin(KProcess*)), this, TQT_SLOT(closeStdin()) );
return true;
}
}
@@ -88,7 +88,7 @@ bool Kleo::SymCryptRunProcessBase::launch( const QByteArray & input, RunMode rm
void Kleo::SymCryptRunProcessBase::addOptions() {
if ( !mOptions.isEmpty() )
{
- const QStringList args = KShell::splitArgs( mOptions );
+ const TQStringList args = KShell::splitArgs( mOptions );
*this << "--" << args;
}
}
@@ -103,7 +103,7 @@ void Kleo::SymCryptRunProcessBase::slotReceivedStdout( KProcess * proc, char * b
void Kleo::SymCryptRunProcessBase::slotReceivedStderr( KProcess * proc, char * buf, int len ) {
Q_ASSERT( proc == this );
if ( len > 0 )
- mStderr += QString::fromLocal8Bit( buf, len );
+ mStderr += TQString::fromLocal8Bit( buf, len );
}
#include "symcryptrunprocessbase.moc"
diff --git a/certmanager/lib/backends/chiasmus/symcryptrunprocessbase.h b/certmanager/lib/backends/chiasmus/symcryptrunprocessbase.h
index d74db60cc..e28cf90fd 100644
--- a/certmanager/lib/backends/chiasmus/symcryptrunprocessbase.h
+++ b/certmanager/lib/backends/chiasmus/symcryptrunprocessbase.h
@@ -35,7 +35,7 @@
#include <kprocess.h>
-#include <qcstring.h>
+#include <tqcstring.h>
class QString;
@@ -47,16 +47,16 @@ public:
enum Operation {
Encrypt, Decrypt
};
- SymCryptRunProcessBase( const QString & class_, const QString & program,
- const QString & keyFile, const QString& options,
+ SymCryptRunProcessBase( const TQString & class_, const TQString & program,
+ const TQString & keyFile, const TQString& options,
Operation op,
- QObject * parent=0, const char * name=0 );
+ TQObject * parent=0, const char * name=0 );
~SymCryptRunProcessBase();
- bool launch( const QByteArray & input, RunMode rm=NotifyOnExit );
+ bool launch( const TQByteArray & input, RunMode rm=NotifyOnExit );
- const QByteArray & output() const { return mOutput; }
- const QString & stdErr() const { return mStderr; }
+ const TQByteArray & output() const { return mOutput; }
+ const TQString & stdErr() const { return mStderr; }
public slots:
/*! upgraded to slot */
@@ -69,11 +69,11 @@ private slots:
private:
void addOptions();
- QByteArray mInput;
- QByteArray mOutput;
- QString mStderr;
+ TQByteArray mInput;
+ TQByteArray mOutput;
+ TQString mStderr;
const Operation mOperation;
- QString mOptions;
+ TQString mOptions;
};
}
diff --git a/certmanager/lib/backends/kpgp/gpg1backend.h b/certmanager/lib/backends/kpgp/gpg1backend.h
index f9413accf..c95df1a51 100644
--- a/certmanager/lib/backends/kpgp/gpg1backend.h
+++ b/certmanager/lib/backends/kpgp/gpg1backend.h
@@ -42,8 +42,8 @@ namespace Kleo {
class GPG1Backend : public KpgpBackendBase {
public:
- QString name() const;
- QString displayName() const;
+ TQString name() const;
+ TQString displayName() const;
};
}
diff --git a/certmanager/lib/backends/kpgp/kpgpbackendbase.cpp b/certmanager/lib/backends/kpgp/kpgpbackendbase.cpp
index 2d4d17ab2..2dbc3868f 100644
--- a/certmanager/lib/backends/kpgp/kpgpbackendbase.cpp
+++ b/certmanager/lib/backends/kpgp/kpgpbackendbase.cpp
@@ -43,7 +43,7 @@
#include <klocale.h>
-#include <qstring.h>
+#include <tqstring.h>
#include "kpgpwrapper.h"
@@ -58,47 +58,47 @@ Kleo::KpgpBackendBase::~KpgpBackendBase()
delete mOpenPGPProtocol; mOpenPGPProtocol = 0;
}
-QString Kleo::GPG1Backend::name() const {
+TQString Kleo::GPG1Backend::name() const {
return GPG1_BACKEND_NAME;
}
-QString Kleo::GPG1Backend::displayName() const {
+TQString Kleo::GPG1Backend::displayName() const {
return i18n("Kpgp/gpg");
}
-QString Kleo::PGP2Backend::name() const {
+TQString Kleo::PGP2Backend::name() const {
return PGP2_BACKEND_NAME;
}
-QString Kleo::PGP2Backend::displayName() const {
+TQString Kleo::PGP2Backend::displayName() const {
return i18n("Kpgp/pgp v2");
}
-QString Kleo::PGP5Backend::name() const {
+TQString Kleo::PGP5Backend::name() const {
return PGP5_BACKEND_NAME;
}
-QString Kleo::PGP5Backend::displayName() const {
+TQString Kleo::PGP5Backend::displayName() const {
return i18n("Kpgp/pgp v5");
}
-QString Kleo::PGP6Backend::name() const {
+TQString Kleo::PGP6Backend::name() const {
return PGP6_BACKEND_NAME;
}
-QString Kleo::PGP6Backend::displayName() const {
+TQString Kleo::PGP6Backend::displayName() const {
return i18n("Kpgp/pgp v6");
}
-static const QString notSupported() {
+static const TQString notSupported() {
return i18n("This backend does not support S/MIME");
}
-bool Kleo::KpgpBackendBase::checkForOpenPGP( QString * /*reason*/ ) const {
+bool Kleo::KpgpBackendBase::checkForOpenPGP( TQString * /*reason*/ ) const {
return true;
}
-bool Kleo::KpgpBackendBase::checkForSMIME( QString * reason ) const {
+bool Kleo::KpgpBackendBase::checkForSMIME( TQString * reason ) const {
if ( reason ) *reason = notSupported();
return false;
}
diff --git a/certmanager/lib/backends/kpgp/kpgpbackendbase.h b/certmanager/lib/backends/kpgp/kpgpbackendbase.h
index 854e800c3..9c21c12bd 100644
--- a/certmanager/lib/backends/kpgp/kpgpbackendbase.h
+++ b/certmanager/lib/backends/kpgp/kpgpbackendbase.h
@@ -61,8 +61,8 @@ namespace Kleo {
bool supportsOpenPGP() const { return true; }
bool supportsSMIME() const { return false; }
- bool checkForOpenPGP( QString * reason=0 ) const;
- bool checkForSMIME( QString * reason=0 ) const;
+ bool checkForOpenPGP( TQString * reason=0 ) const;
+ bool checkForSMIME( TQString * reason=0 ) const;
private:
mutable KpgpWrapper * mOpenPGPProtocol;
};
diff --git a/certmanager/lib/backends/kpgp/kpgpkeylistjob.cpp b/certmanager/lib/backends/kpgp/kpgpkeylistjob.cpp
index 4c328adee..2e69f9392 100644
--- a/certmanager/lib/backends/kpgp/kpgpkeylistjob.cpp
+++ b/certmanager/lib/backends/kpgp/kpgpkeylistjob.cpp
@@ -44,7 +44,7 @@
#include <gpgme.h>
-#include <qtimer.h>
+#include <tqtimer.h>
#include <stdlib.h>
#include <string.h>
@@ -169,7 +169,7 @@ gpgme_user_id_t KpgpUserID2GPGMEUserID( const Kpgp::UserID * kUserId )
{
// inspired by _gpgme_key_append_name
- const QCString text = kUserId->text().utf8();
+ const TQCString text = kUserId->text().utf8();
const int src_len = text.length();
gpgme_user_id_t uid;
@@ -196,9 +196,9 @@ gpgme_subkey_t KpgpSubkey2GPGMESubKey( const Kpgp::Subkey * kSubkey )
{
gpgme_subkey_t subkey;
- const QCString fpr = kSubkey->fingerprint();
+ const TQCString fpr = kSubkey->fingerprint();
const unsigned int fpr_len = fpr.length();
- const QCString keyId = kSubkey->longKeyID();
+ const TQCString keyId = kSubkey->longKeyID();
subkey = (gpgme_subkey_t) calloc( 1, sizeof( *subkey ) + fpr_len + 1 );
subkey->revoked = kSubkey->revoked();
@@ -260,11 +260,11 @@ gpgme_key_t KpgpKey2gpgme_key( const Kpgp::Key * kKey )
return key;
}
-GpgME::Error Kleo::KpgpKeyListJob::start( const QStringList & patterns,
+GpgME::Error Kleo::KpgpKeyListJob::start( const TQStringList & patterns,
bool secretOnly ) {
mPatterns = patterns;
mSecretOnly = secretOnly;
- QTimer::singleShot( 0, this, SLOT( slotDoIt() ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( slotDoIt() ) );
return GpgME::Error( 0 );
}
@@ -279,7 +279,7 @@ void Kleo::KpgpKeyListJob::slotDoIt() {
deleteLater();
}
-GpgME::KeyListResult Kleo::KpgpKeyListJob::exec( const QStringList & patterns,
+GpgME::KeyListResult Kleo::KpgpKeyListJob::exec( const TQStringList & patterns,
bool secretOnly,
std::vector<GpgME::Key> & keys ) {
Kpgp::KeyList kKeys;
diff --git a/certmanager/lib/backends/kpgp/kpgpkeylistjob.h b/certmanager/lib/backends/kpgp/kpgpkeylistjob.h
index 779680c2d..4cfb3d047 100644
--- a/certmanager/lib/backends/kpgp/kpgpkeylistjob.h
+++ b/certmanager/lib/backends/kpgp/kpgpkeylistjob.h
@@ -35,7 +35,7 @@
#include <kleo/keylistjob.h>
-#include <qstringlist.h>
+#include <tqstringlist.h>
namespace GpgME {
class Error;
@@ -56,10 +56,10 @@ namespace Kleo {
~KpgpKeyListJob();
/*! \reimp from KeyListJob */
- GpgME::Error start( const QStringList & patterns, bool secretOnly );
+ GpgME::Error start( const TQStringList & patterns, bool secretOnly );
/*! \reimp from KeyListJob */
- GpgME::KeyListResult exec( const QStringList & patterns, bool secretOnly,
+ GpgME::KeyListResult exec( const TQStringList & patterns, bool secretOnly,
std::vector<GpgME::Key> & keys );
/*! \reimp from Job */
@@ -70,7 +70,7 @@ namespace Kleo {
private:
Kpgp::Base * mPgpBase;
- QStringList mPatterns;
+ TQStringList mPatterns;
bool mSecretOnly;
};
diff --git a/certmanager/lib/backends/kpgp/kpgpwrapper.cpp b/certmanager/lib/backends/kpgp/kpgpwrapper.cpp
index 20d885dd5..a2ff064f1 100644
--- a/certmanager/lib/backends/kpgp/kpgpwrapper.cpp
+++ b/certmanager/lib/backends/kpgp/kpgpwrapper.cpp
@@ -56,7 +56,7 @@
//#include <backends/kpgp/kpgpdecryptverifyjob.h>
//#include <backends/kpgp/kpgpcryptoconfig.h>
-KpgpWrapper::KpgpWrapper( const QString & name )
+KpgpWrapper::KpgpWrapper( const TQString & name )
: mName( name ),
mPgpBase( 0 )
{
@@ -68,12 +68,12 @@ KpgpWrapper::~KpgpWrapper()
}
-QString KpgpWrapper::name() const
+TQString KpgpWrapper::name() const
{
return mName;
}
-QString KpgpWrapper::displayName() const
+TQString KpgpWrapper::displayName() const
{
return mName;
}
diff --git a/certmanager/lib/backends/kpgp/kpgpwrapper.h b/certmanager/lib/backends/kpgp/kpgpwrapper.h
index 182661ec4..40c6e9250 100644
--- a/certmanager/lib/backends/kpgp/kpgpwrapper.h
+++ b/certmanager/lib/backends/kpgp/kpgpwrapper.h
@@ -35,7 +35,7 @@
#include <kleo/cryptobackend.h>
-#include <qstring.h>
+#include <tqstring.h>
namespace Kleo {
class KeyListJob;
@@ -61,12 +61,12 @@ namespace Kpgp {
class KpgpWrapper : public Kleo::CryptoBackend::Protocol {
public:
- KpgpWrapper( const QString & name );
+ KpgpWrapper( const TQString & name );
~KpgpWrapper();
- QString name() const;
+ TQString name() const;
- QString displayName() const;
+ TQString displayName() const;
Kleo::KeyListJob * keyListJob( bool remote=false, bool includeSigs=false,
bool validate=false ) const;
@@ -90,7 +90,7 @@ private:
Kpgp::Base * pgpBase() const;
private:
- QString mName;
+ TQString mName;
mutable Kpgp::Base * mPgpBase;
};
diff --git a/certmanager/lib/backends/kpgp/pgp2backend.h b/certmanager/lib/backends/kpgp/pgp2backend.h
index fc053a20c..afb8a87c2 100644
--- a/certmanager/lib/backends/kpgp/pgp2backend.h
+++ b/certmanager/lib/backends/kpgp/pgp2backend.h
@@ -42,8 +42,8 @@ namespace Kleo {
class PGP2Backend : public KpgpBackendBase {
public:
- QString name() const;
- QString displayName() const;
+ TQString name() const;
+ TQString displayName() const;
};
}
diff --git a/certmanager/lib/backends/kpgp/pgp5backend.h b/certmanager/lib/backends/kpgp/pgp5backend.h
index bf323b6fb..2cf995741 100644
--- a/certmanager/lib/backends/kpgp/pgp5backend.h
+++ b/certmanager/lib/backends/kpgp/pgp5backend.h
@@ -42,8 +42,8 @@ namespace Kleo {
class PGP5Backend : public KpgpBackendBase {
public:
- QString name() const;
- QString displayName() const;
+ TQString name() const;
+ TQString displayName() const;
};
}
diff --git a/certmanager/lib/backends/kpgp/pgp6backend.h b/certmanager/lib/backends/kpgp/pgp6backend.h
index 827cf239b..d0babccd1 100644
--- a/certmanager/lib/backends/kpgp/pgp6backend.h
+++ b/certmanager/lib/backends/kpgp/pgp6backend.h
@@ -42,8 +42,8 @@ namespace Kleo {
class PGP6Backend : public KpgpBackendBase {
public:
- QString name() const;
- QString displayName() const;
+ TQString name() const;
+ TQString displayName() const;
};
}
diff --git a/certmanager/lib/backends/qgpgme/gnupgprocessbase.cpp b/certmanager/lib/backends/qgpgme/gnupgprocessbase.cpp
index 2d3ca7409..9e7461791 100644
--- a/certmanager/lib/backends/qgpgme/gnupgprocessbase.cpp
+++ b/certmanager/lib/backends/qgpgme/gnupgprocessbase.cpp
@@ -35,9 +35,9 @@
#include <kdebug.h>
#include <kurl.h>
-#include <qsocketnotifier.h>
-#include <qtextcodec.h>
-#include <qstringlist.h>
+#include <tqsocketnotifier.h>
+#include <tqtextcodec.h>
+#include <tqstringlist.h>
#include <unistd.h>
#include <fcntl.h>
@@ -51,12 +51,12 @@ struct Kleo::GnuPGProcessBase::Private {
bool useStatusFD;
int statusFD[2];
- QSocketNotifier * statnot;
- QCString statusBuffer;
+ TQSocketNotifier * statnot;
+ TQCString statusBuffer;
};
-Kleo::GnuPGProcessBase::GnuPGProcessBase( QObject * parent, const char * name )
+Kleo::GnuPGProcessBase::GnuPGProcessBase( TQObject * parent, const char * name )
: KProcess( parent, name )
{
d = new Private();
@@ -84,7 +84,7 @@ bool Kleo::GnuPGProcessBase::start( RunMode runmode, Communication comm ) {
::fcntl( d->statusFD[0], F_SETFD, FD_CLOEXEC );
::fcntl( d->statusFD[1], F_SETFD, FD_CLOEXEC );
if ( !arguments.empty() ) {
- QValueList<QCString>::iterator it = arguments.begin();
+ TQValueList<TQCString>::iterator it = arguments.begin();
++it;
arguments.insert( it, "--status-fd" );
char buf[25];
@@ -112,8 +112,8 @@ int Kleo::GnuPGProcessBase::setupCommunication( Communication comm ) {
int Kleo::GnuPGProcessBase::commSetupDoneP() {
if ( d->useStatusFD ) {
::close( d->statusFD[1] ); // close the input end of the pipe, we're the reader
- d->statnot = new QSocketNotifier( d->statusFD[0], QSocketNotifier::Read, this );
- connect( d->statnot, SIGNAL(activated(int)), SLOT(slotChildStatus(int)) );
+ d->statnot = new TQSocketNotifier( d->statusFD[0], TQSocketNotifier::Read, this );
+ connect( d->statnot, TQT_SIGNAL(activated(int)), TQT_SLOT(slotChildStatus(int)) );
}
return KProcess::commSetupDoneP();
}
@@ -149,7 +149,7 @@ int Kleo::GnuPGProcessBase::childStatus( int fd ) {
return len;
}
-static QString fromHexEscapedUtf8( const QCString & str ) {
+static TQString fromHexEscapedUtf8( const TQCString & str ) {
return KURL::decode_string( str.data(), 106 /* utf-8 */ );
}
@@ -160,7 +160,7 @@ void Kleo::GnuPGProcessBase::parseStatusOutput() {
int lineStart = 0;
for ( int lineEnd = d->statusBuffer.find( '\n' ) ; lineEnd >= 0 ; lineEnd = d->statusBuffer.find( '\n', lineStart = lineEnd+1 ) ) {
// get next line:
- const QCString line = d->statusBuffer.mid( lineStart, lineEnd - lineStart ).stripWhiteSpace();
+ const TQCString line = d->statusBuffer.mid( lineStart, lineEnd - lineStart ).stripWhiteSpace();
if ( line.isEmpty() )
continue;
// check status token
@@ -170,17 +170,17 @@ void Kleo::GnuPGProcessBase::parseStatusOutput() {
continue;
}
// remove status token:
- const QCString command = line.mid( startTokenLen ).simplifyWhiteSpace() + ' ';
+ const TQCString command = line.mid( startTokenLen ).simplifyWhiteSpace() + ' ';
if ( command == " " ) {
kdDebug( 5150 ) << "Kleo::GnuPGProcessBase::childStatus: status-fd protocol error: line without content." << endl;
continue;
}
// split into base and args
- QString cmd;
- QStringList args;
+ TQString cmd;
+ TQStringList args;
int tagStart = 0;
for ( int tagEnd = command.find( ' ' ) ; tagEnd >= 0 ; tagEnd = command.find( ' ', tagStart = tagEnd+1 ) ) {
- const QCString tag = command.mid( tagStart, tagEnd - tagStart );
+ const TQCString tag = command.mid( tagStart, tagEnd - tagStart );
if ( cmd.isNull() )
cmd = fromHexEscapedUtf8( tag );
else
diff --git a/certmanager/lib/backends/qgpgme/gnupgprocessbase.h b/certmanager/lib/backends/qgpgme/gnupgprocessbase.h
index 73e31e295..9abe5b88d 100644
--- a/certmanager/lib/backends/qgpgme/gnupgprocessbase.h
+++ b/certmanager/lib/backends/qgpgme/gnupgprocessbase.h
@@ -48,7 +48,7 @@ namespace Kleo {
class GnuPGProcessBase : public KProcess {
Q_OBJECT
public:
- GnuPGProcessBase( QObject * parent=0, const char * name=0 );
+ GnuPGProcessBase( TQObject * parent=0, const char * name=0 );
~GnuPGProcessBase();
void setUseStatusFD( bool use );
@@ -59,7 +59,7 @@ namespace Kleo {
bool closeStatus();
signals:
- void status( Kleo::GnuPGProcessBase * proc, const QString & type, const QStringList & args );
+ void status( Kleo::GnuPGProcessBase * proc, const TQString & type, const TQStringList & args );
protected:
/*! reimplementation */
diff --git a/certmanager/lib/backends/qgpgme/qgpgmebackend.cpp b/certmanager/lib/backends/qgpgme/qgpgmebackend.cpp
index 8256522ae..5905bc5ee 100644
--- a/certmanager/lib/backends/qgpgme/qgpgmebackend.cpp
+++ b/certmanager/lib/backends/qgpgme/qgpgmebackend.cpp
@@ -45,8 +45,8 @@
#include <klocale.h>
#include <kstandarddirs.h>
-#include <qfile.h>
-#include <qstring.h>
+#include <tqfile.h>
+#include <tqstring.h>
Kleo::QGpgMEBackend::QGpgMEBackend()
: Kleo::CryptoBackend(),
@@ -63,11 +63,11 @@ Kleo::QGpgMEBackend::~QGpgMEBackend() {
delete mSMIMEProtocol; mSMIMEProtocol = 0;
}
-QString Kleo::QGpgMEBackend::name() const {
+TQString Kleo::QGpgMEBackend::name() const {
return "gpgme";
}
-QString Kleo::QGpgMEBackend::displayName() const {
+TQString Kleo::QGpgMEBackend::displayName() const {
return i18n( "GpgME" );
}
@@ -80,7 +80,7 @@ Kleo::CryptoConfig * Kleo::QGpgMEBackend::config() const {
return mCryptoConfig;
}
-static bool check( GpgME::Context::Protocol proto, QString * reason ) {
+static bool check( GpgME::Context::Protocol proto, TQString * reason ) {
if ( !GpgME::checkEngine( proto ) )
return true;
if ( !reason )
@@ -90,25 +90,25 @@ static bool check( GpgME::Context::Protocol proto, QString * reason ) {
if ( ei.isNull() )
*reason = i18n("GPGME was compiled without support for %1.").arg( proto == GpgME::Context::CMS ? "S/MIME" : "OpenPGP" );
else if ( ei.fileName() && !ei.version() )
- *reason = i18n("Engine %1 is not installed properly.").arg( QFile::decodeName( ei.fileName() ) );
+ *reason = i18n("Engine %1 is not installed properly.").arg( TQFile::decodeName( ei.fileName() ) );
else if ( ei.fileName() && ei.version() && ei.requiredVersion() )
*reason = i18n("Engine %1 version %2 installed, "
"but at least version %3 is required.")
- .arg( QFile::decodeName( ei.fileName() ), ei.version(), ei.requiredVersion() );
+ .arg( TQFile::decodeName( ei.fileName() ), ei.version(), ei.requiredVersion() );
else
*reason = i18n("Unknown problem with engine for protocol %1.").arg( proto == GpgME::Context::CMS ? "S/MIME" : "OpenPGP" );
return false;
}
-bool Kleo::QGpgMEBackend::checkForOpenPGP( QString * reason ) const {
+bool Kleo::QGpgMEBackend::checkForOpenPGP( TQString * reason ) const {
return check( GpgME::Context::OpenPGP, reason );
}
-bool Kleo::QGpgMEBackend::checkForSMIME( QString * reason ) const {
+bool Kleo::QGpgMEBackend::checkForSMIME( TQString * reason ) const {
return check( GpgME::Context::CMS, reason );
}
-bool Kleo::QGpgMEBackend::checkForProtocol( const char * name, QString * reason ) const {
+bool Kleo::QGpgMEBackend::checkForProtocol( const char * name, TQString * reason ) const {
if ( qstricmp( name, OpenPGP ) == 0 )
return check( GpgME::Context::OpenPGP, reason );
if ( qstricmp( name, SMIME ) == 0 )
diff --git a/certmanager/lib/backends/qgpgme/qgpgmebackend.h b/certmanager/lib/backends/qgpgme/qgpgmebackend.h
index fae2dd68e..d5309032f 100644
--- a/certmanager/lib/backends/qgpgme/qgpgmebackend.h
+++ b/certmanager/lib/backends/qgpgme/qgpgmebackend.h
@@ -51,8 +51,8 @@ namespace Kleo {
QGpgMEBackend();
~QGpgMEBackend();
- QString name() const;
- QString displayName() const;
+ TQString name() const;
+ TQString displayName() const;
CryptoConfig * config() const;
@@ -60,9 +60,9 @@ namespace Kleo {
Protocol * smime() const;
Protocol * protocol( const char * name ) const;
- bool checkForOpenPGP( QString * reason=0 ) const;
- bool checkForSMIME( QString * reason=0 ) const;
- bool checkForProtocol( const char * name, QString * reason ) const;
+ bool checkForOpenPGP( TQString * reason=0 ) const;
+ bool checkForSMIME( TQString * reason=0 ) const;
+ bool checkForProtocol( const char * name, TQString * reason ) const;
bool supportsOpenPGP() const { return true; }
bool supportsSMIME() const { return true; }
diff --git a/certmanager/lib/backends/qgpgme/qgpgmecryptoconfig.cpp b/certmanager/lib/backends/qgpgme/qgpgmecryptoconfig.cpp
index 86eab99b4..c67800502 100644
--- a/certmanager/lib/backends/qgpgme/qgpgmecryptoconfig.cpp
+++ b/certmanager/lib/backends/qgpgme/qgpgmecryptoconfig.cpp
@@ -39,9 +39,9 @@
#include <assert.h>
#include <ktempfile.h>
-#include <qfile.h>
+#include <tqfile.h>
#include <stdlib.h>
-#include <qtextcodec.h>
+#include <tqtextcodec.h>
// Just for the Q_ASSERT in the dtor. Not thread-safe, but who would
// have 2 threads talking to gpgconf anyway? :)
@@ -71,12 +71,12 @@ void QGpgMECryptoConfig::runGpgConf( bool showErrors )
{
// Run gpgconf --list-components to make the list of components
- KProcIO proc( QTextCodec::codecForName( "utf8" ) );
+ KProcIO proc( TQTextCodec::codecForName( "utf8" ) );
proc << "gpgconf"; // must be in the PATH
proc << "--list-components";
- QObject::connect( &proc, SIGNAL( readReady(KProcIO*) ),
- this, SLOT( slotCollectStdOut(KProcIO*) ) );
+ TQObject::connect( &proc, TQT_SIGNAL( readReady(KProcIO*) ),
+ this, TQT_SLOT( slotCollectStdOut(KProcIO*) ) );
// run the process:
int rc = 0;
@@ -87,7 +87,7 @@ void QGpgMECryptoConfig::runGpgConf( bool showErrors )
// handle errors, if any (and if requested)
if ( showErrors && rc != 0 ) {
- QString wmsg = i18n("<qt>Failed to execute gpgconf:<br>%1</qt>");
+ TQString wmsg = i18n("<qt>Failed to execute gpgconf:<br>%1</qt>");
if ( rc == -1 )
wmsg = wmsg.arg( i18n( "program not found" ) );
else if ( rc == -2 )
@@ -102,12 +102,12 @@ void QGpgMECryptoConfig::runGpgConf( bool showErrors )
void QGpgMECryptoConfig::slotCollectStdOut( KProcIO* proc )
{
- QString line;
+ TQString line;
int result;
while( ( result = proc->readln(line) ) != -1 ) {
//kdDebug(5150) << "GOT LINE:" << line << endl;
// Format: NAME:DESCRIPTION
- QStringList lst = QStringList::split( ':', line, true );
+ TQStringList lst = TQStringList::split( ':', line, true );
if ( lst.count() >= 2 ) {
mComponents.insert( lst[0], new QGpgMECryptoConfigComponent( this, lst[0], lst[1] ) );
} else {
@@ -116,18 +116,18 @@ void QGpgMECryptoConfig::slotCollectStdOut( KProcIO* proc )
}
}
-QStringList QGpgMECryptoConfig::componentList() const
+TQStringList QGpgMECryptoConfig::componentList() const
{
if ( !mParsed )
const_cast<QGpgMECryptoConfig*>( this )->runGpgConf( true );
- QDictIterator<QGpgMECryptoConfigComponent> it( mComponents );
- QStringList names;
+ TQDictIterator<QGpgMECryptoConfigComponent> it( mComponents );
+ TQStringList names;
for( ; it.current(); ++it )
names.push_back( it.currentKey() );
return names;
}
-Kleo::CryptoConfigComponent* QGpgMECryptoConfig::component( const QString& name ) const
+Kleo::CryptoConfigComponent* QGpgMECryptoConfig::component( const TQString& name ) const
{
if ( !mParsed )
const_cast<QGpgMECryptoConfig*>( this )->runGpgConf( false );
@@ -136,7 +136,7 @@ Kleo::CryptoConfigComponent* QGpgMECryptoConfig::component( const QString& name
void QGpgMECryptoConfig::sync( bool runtime )
{
- QDictIterator<QGpgMECryptoConfigComponent> it( mComponents );
+ TQDictIterator<QGpgMECryptoConfigComponent> it( mComponents );
for( ; it.current(); ++it )
it.current()->sync( runtime );
}
@@ -151,7 +151,7 @@ void QGpgMECryptoConfig::clear()
////
-QGpgMECryptoConfigComponent::QGpgMECryptoConfigComponent( QGpgMECryptoConfig*, const QString& name, const QString& description )
+QGpgMECryptoConfigComponent::QGpgMECryptoConfigComponent( QGpgMECryptoConfig*, const TQString& name, const TQString& description )
: mGroups( 7 ), mName( name ), mDescription( description )
{
mGroups.setAutoDelete( true );
@@ -166,15 +166,15 @@ void QGpgMECryptoConfigComponent::runGpgConf()
{
// Run gpgconf --list-options <component>, and create all groups and entries for that component
- KProcIO proc( QTextCodec::codecForName( "utf8" ) );
+ KProcIO proc( TQTextCodec::codecForName( "utf8" ) );
proc << "gpgconf"; // must be in the PATH
proc << "--list-options";
proc << mName;
//kdDebug(5150) << "Running gpgconf --list-options " << mName << endl;
- QObject::connect( &proc, SIGNAL( readReady(KProcIO*) ),
- this, SLOT( slotCollectStdOut(KProcIO*) ) );
+ TQObject::connect( &proc, TQT_SIGNAL( readReady(KProcIO*) ),
+ this, TQT_SLOT( slotCollectStdOut(KProcIO*) ) );
mCurrentGroup = 0;
// run the process:
@@ -194,12 +194,12 @@ void QGpgMECryptoConfigComponent::runGpgConf()
void QGpgMECryptoConfigComponent::slotCollectStdOut( KProcIO* proc )
{
- QString line;
+ TQString line;
int result;
while( ( result = proc->readln(line) ) != -1 ) {
//kdDebug(5150) << "GOT LINE:" << line << endl;
// Format: NAME:FLAGS:LEVEL:DESCRIPTION:TYPE:ALT-TYPE:ARGNAME:DEFAULT:ARGDEF:VALUE
- const QStringList lst = QStringList::split( ':', line, true );
+ const TQStringList lst = TQStringList::split( ':', line, true );
if ( lst.count() >= 10 ) {
const int flags = lst[1].toInt();
const int level = lst[2].toInt();
@@ -215,7 +215,7 @@ void QGpgMECryptoConfigComponent::slotCollectStdOut( KProcIO* proc )
} else {
// normal entry
if ( !mCurrentGroup ) { // first toplevel entry -> create toplevel group
- mCurrentGroup = new QGpgMECryptoConfigGroup( "<nogroup>", QString::null, 0 );
+ mCurrentGroup = new QGpgMECryptoConfigGroup( "<nogroup>", TQString::null, 0 );
mCurrentGroupName = "<nogroup>";
}
mCurrentGroup->mEntries.insert( lst[0], new QGpgMECryptoConfigEntry( lst ) );
@@ -229,16 +229,16 @@ void QGpgMECryptoConfigComponent::slotCollectStdOut( KProcIO* proc )
}
}
-QStringList QGpgMECryptoConfigComponent::groupList() const
+TQStringList QGpgMECryptoConfigComponent::groupList() const
{
- QDictIterator<QGpgMECryptoConfigGroup> it( mGroups );
- QStringList names;
+ TQDictIterator<QGpgMECryptoConfigGroup> it( mGroups );
+ TQStringList names;
for( ; it.current(); ++it )
names.push_back( it.currentKey() );
return names;
}
-Kleo::CryptoConfigGroup* QGpgMECryptoConfigComponent::group(const QString& name ) const
+Kleo::CryptoConfigGroup* QGpgMECryptoConfigComponent::group(const TQString& name ) const
{
return mGroups.find( name );
}
@@ -248,16 +248,16 @@ void QGpgMECryptoConfigComponent::sync( bool runtime )
KTempFile tmpFile;
tmpFile.setAutoDelete( true );
- QValueList<QGpgMECryptoConfigEntry *> dirtyEntries;
+ TQValueList<QGpgMECryptoConfigEntry *> dirtyEntries;
// Collect all dirty entries
- QDictIterator<QGpgMECryptoConfigGroup> groupit( mGroups );
+ TQDictIterator<QGpgMECryptoConfigGroup> groupit( mGroups );
for( ; groupit.current(); ++groupit ) {
- QDictIterator<QGpgMECryptoConfigEntry> it( groupit.current()->mEntries );
+ TQDictIterator<QGpgMECryptoConfigEntry> it( groupit.current()->mEntries );
for( ; it.current(); ++it ) {
if ( it.current()->isDirty() ) {
// OK, we can set it.currentKey() to it.current()->outputString()
- QString line = it.currentKey();
+ TQString line = it.currentKey();
if ( it.current()->isSet() ) { // set option
line += ":0:";
line += it.current()->outputString();
@@ -265,7 +265,7 @@ void QGpgMECryptoConfigComponent::sync( bool runtime )
line += ":16:";
}
line += '\n';
- QCString line8bit = line.utf8(); // encode with utf8, and KProcIO uses utf8 when reading.
+ TQCString line8bit = line.utf8(); // encode with utf8, and KProcIO uses utf8 when reading.
tmpFile.file()->writeBlock( line8bit.data(), line8bit.size()-1 /*no 0*/ );
dirtyEntries.append( it.current() );
}
@@ -276,7 +276,7 @@ void QGpgMECryptoConfigComponent::sync( bool runtime )
return;
// Call gpgconf --change-options <component>
- QString commandLine = "gpgconf";
+ TQString commandLine = "gpgconf";
if ( runtime )
commandLine += " --runtime";
commandLine += " --change-options ";
@@ -285,7 +285,7 @@ void QGpgMECryptoConfigComponent::sync( bool runtime )
commandLine += KProcess::quote( tmpFile.name() );
//kdDebug(5150) << commandLine << endl;
- //system( QCString( "cat " ) + tmpFile.name().latin1() ); // DEBUG
+ //system( TQCString( "cat " ) + tmpFile.name().latin1() ); // DEBUG
KProcess proc;
proc.setUseShell( true );
@@ -300,19 +300,19 @@ void QGpgMECryptoConfigComponent::sync( bool runtime )
if ( rc == -1 )
{
- QString wmsg = i18n( "Could not start gpgconf\nCheck that gpgconf is in the PATH and that it can be started" );
+ TQString wmsg = i18n( "Could not start gpgconf\nCheck that gpgconf is in the PATH and that it can be started" );
kdWarning(5150) << wmsg << endl;
KMessageBox::error(0, wmsg);
}
else if( rc != 0 ) // Happens due to bugs in gpgconf (e.g. issues 104/115)
{
- QString wmsg = i18n( "Error from gpgconf while saving configuration: %1" ).arg( QString::fromLocal8Bit( strerror( rc ) ) );
+ TQString wmsg = i18n( "Error from gpgconf while saving configuration: %1" ).arg( TQString::fromLocal8Bit( strerror( rc ) ) );
kdWarning(5150) << k_funcinfo << ":" << strerror( rc ) << endl;
KMessageBox::error(0, wmsg);
}
else
{
- QValueList<QGpgMECryptoConfigEntry *>::Iterator it = dirtyEntries.begin();
+ TQValueList<QGpgMECryptoConfigEntry *>::Iterator it = dirtyEntries.begin();
for( ; it != dirtyEntries.end(); ++it ) {
(*it)->setDirty( false );
}
@@ -321,7 +321,7 @@ void QGpgMECryptoConfigComponent::sync( bool runtime )
////
-QGpgMECryptoConfigGroup::QGpgMECryptoConfigGroup( const QString & name, const QString& description, int level )
+QGpgMECryptoConfigGroup::QGpgMECryptoConfigGroup( const TQString & name, const TQString& description, int level )
: mEntries( 29 ),
mName( name ),
mDescription( description ),
@@ -330,47 +330,47 @@ QGpgMECryptoConfigGroup::QGpgMECryptoConfigGroup( const QString & name, const QS
mEntries.setAutoDelete( true );
}
-QStringList QGpgMECryptoConfigGroup::entryList() const
+TQStringList QGpgMECryptoConfigGroup::entryList() const
{
- QDictIterator<QGpgMECryptoConfigEntry> it( mEntries );
- QStringList names;
+ TQDictIterator<QGpgMECryptoConfigEntry> it( mEntries );
+ TQStringList names;
for( ; it.current(); ++it )
names.push_back( it.currentKey() );
return names;
}
-Kleo::CryptoConfigEntry* QGpgMECryptoConfigGroup::entry( const QString& name ) const
+Kleo::CryptoConfigEntry* QGpgMECryptoConfigGroup::entry( const TQString& name ) const
{
return mEntries.find( name );
}
////
-static QString gpgconf_unescape( const QString& str )
+static TQString gpgconf_unescape( const TQString& str )
{
// Looks like it's the same rules as KURL.
return KURL::decode_string( str, 106 );
}
-static QString gpgconf_escape( const QString& str )
+static TQString gpgconf_escape( const TQString& str )
{
// Escape special chars (including ':' and '%')
- QString enc = KURL::encode_string( str, 106 ); // and convert to utf8 first (to get %12%34 for one special char)
+ TQString enc = KURL::encode_string( str, 106 ); // and convert to utf8 first (to get %12%34 for one special char)
// Also encode commas, for lists.
enc.replace( ',', "%2c" );
return enc;
}
-static QString urlpart_encode( const QString& str )
+static TQString urlpart_encode( const TQString& str )
{
- QString enc( str );
+ TQString enc( str );
enc.replace( '%', "%25" ); // first!
enc.replace( ':', "%3a" );
//kdDebug() << " urlpart_encode: " << str << " -> " << enc << endl;
return enc;
}
-static QString urlpart_decode( const QString& str )
+static TQString urlpart_decode( const TQString& str )
{
return KURL::decode_string( str );
}
@@ -397,11 +397,11 @@ static Kleo::CryptoConfigEntry::ArgType knownArgType( int argType, bool& ok ) {
}
}
-QGpgMECryptoConfigEntry::QGpgMECryptoConfigEntry( const QStringList& parsedLine )
+QGpgMECryptoConfigEntry::QGpgMECryptoConfigEntry( const TQStringList& parsedLine )
{
// Format: NAME:FLAGS:LEVEL:DESCRIPTION:TYPE:ALT-TYPE:ARGNAME:DEFAULT:ARGDEF:VALUE
assert( parsedLine.count() >= 10 ); // called checked for it already
- QStringList::const_iterator it = parsedLine.begin();
+ TQStringList::const_iterator it = parsedLine.begin();
mName = *it++;
mFlags = (*it++).toInt();
mLevel = (*it++).toInt();
@@ -421,7 +421,7 @@ QGpgMECryptoConfigEntry::QGpgMECryptoConfigEntry( const QStringList& parsedLine
++it; // skip argname (not useful in GUIs)
mSet = false;
- QString value;
+ TQString value;
if ( mFlags & GPGCONF_FLAG_DEFAULT ) {
value = *it; // get default value
mDefaultValue = stringToValue( value, true );
@@ -442,18 +442,18 @@ QGpgMECryptoConfigEntry::QGpgMECryptoConfigEntry( const QStringList& parsedLine
mDirty = false;
}
-QVariant QGpgMECryptoConfigEntry::stringToValue( const QString& str, bool unescape ) const
+TQVariant QGpgMECryptoConfigEntry::stringToValue( const TQString& str, bool unescape ) const
{
bool isString = isStringType();
if ( isList() ) {
- QValueList<QVariant> lst;
- QStringList items = QStringList::split( ',', str );
- for( QStringList::const_iterator valit = items.begin(); valit != items.end(); ++valit ) {
- QString val = *valit;
+ TQValueList<TQVariant> lst;
+ TQStringList items = TQStringList::split( ',', str );
+ for( TQStringList::const_iterator valit = items.begin(); valit != items.end(); ++valit ) {
+ TQString val = *valit;
if ( isString ) {
if ( val.isEmpty() ) {
- lst << QString::null;
+ lst << TQString::null;
continue;
}
else if ( unescape ) {
@@ -462,20 +462,20 @@ QVariant QGpgMECryptoConfigEntry::stringToValue( const QString& str, bool unesca
val = val.mid( 1 );
}
}
- lst << QVariant( unescape ? gpgconf_unescape( val ) : val );
+ lst << TQVariant( unescape ? gpgconf_unescape( val ) : val );
}
return lst;
} else { // not a list
- QString val( str );
+ TQString val( str );
if ( isString ) {
if ( val.isEmpty() )
- return QVariant( QString::null ); // not set [ok with lists too?]
+ return TQVariant( TQString::null ); // not set [ok with lists too?]
else if ( unescape ) {
Q_ASSERT( val[0] == '"' ); // see README.gpgconf
val = val.mid( 1 );
}
}
- return QVariant( unescape ? gpgconf_unescape( val ) : val );
+ return TQVariant( unescape ? gpgconf_unescape( val ) : val );
}
}
@@ -520,7 +520,7 @@ bool QGpgMECryptoConfigEntry::boolValue() const
return mValue.toBool();
}
-QString QGpgMECryptoConfigEntry::stringValue() const
+TQString QGpgMECryptoConfigEntry::stringValue() const
{
return toString( false );
}
@@ -539,13 +539,13 @@ unsigned int QGpgMECryptoConfigEntry::uintValue() const
return mValue.toUInt();
}
-static KURL parseURL( int mRealArgType, const QString& str )
+static KURL parseURL( int mRealArgType, const TQString& str )
{
if ( mRealArgType == 33 ) { // LDAP server
// The format is HOSTNAME:PORT:USERNAME:PASSWORD:BASE_DN
- QStringList items = QStringList::split( ':', str, true );
+ TQStringList items = TQStringList::split( ':', str, true );
if ( items.count() == 5 ) {
- QStringList::const_iterator it = items.begin();
+ TQStringList::const_iterator it = items.begin();
KURL url;
url.setProtocol( "ldap" );
url.setHost( urlpart_decode( *it++ ) );
@@ -563,13 +563,13 @@ static KURL parseURL( int mRealArgType, const QString& str )
}
// The opposite of parseURL
-static QString splitURL( int mRealArgType, const KURL& url )
+static TQString splitURL( int mRealArgType, const KURL& url )
{
if ( mRealArgType == 33 ) { // LDAP server
// The format is HOSTNAME:PORT:USERNAME:PASSWORD:BASE_DN
Q_ASSERT( url.protocol() == "ldap" );
return urlpart_encode( url.host() ) + ":" +
- QString::number( url.port() ) + ":" +
+ TQString::number( url.port() ) + ":" +
urlpart_encode( url.user() ) + ":" +
urlpart_encode( url.pass() ) + ":" +
// KURL automatically encoded the query (e.g. for spaces inside it),
@@ -583,7 +583,7 @@ KURL QGpgMECryptoConfigEntry::urlValue() const
{
Q_ASSERT( mArgType == ArgType_Path || mArgType == ArgType_URL || mArgType == ArgType_LDAPURL );
Q_ASSERT( !isList() );
- QString str = mValue.toString();
+ TQString str = mValue.toString();
if ( mArgType == ArgType_Path )
{
KURL url;
@@ -600,32 +600,32 @@ unsigned int QGpgMECryptoConfigEntry::numberOfTimesSet() const
return mValue.toUInt();
}
-QStringList QGpgMECryptoConfigEntry::stringValueList() const
+TQStringList QGpgMECryptoConfigEntry::stringValueList() const
{
Q_ASSERT( isStringType() );
Q_ASSERT( isList() );
return mValue.toStringList();
}
-QValueList<int> QGpgMECryptoConfigEntry::intValueList() const
+TQValueList<int> QGpgMECryptoConfigEntry::intValueList() const
{
Q_ASSERT( mArgType == ArgType_Int );
Q_ASSERT( isList() );
- QValueList<int> ret;
- QValueList<QVariant> lst = mValue.toList();
- for( QValueList<QVariant>::const_iterator it = lst.begin(); it != lst.end(); ++it ) {
+ TQValueList<int> ret;
+ TQValueList<TQVariant> lst = mValue.toList();
+ for( TQValueList<TQVariant>::const_iterator it = lst.begin(); it != lst.end(); ++it ) {
ret.append( (*it).toInt() );
}
return ret;
}
-QValueList<unsigned int> QGpgMECryptoConfigEntry::uintValueList() const
+TQValueList<unsigned int> QGpgMECryptoConfigEntry::uintValueList() const
{
Q_ASSERT( mArgType == ArgType_UInt );
Q_ASSERT( isList() );
- QValueList<unsigned int> ret;
- QValueList<QVariant> lst = mValue.toList();
- for( QValueList<QVariant>::const_iterator it = lst.begin(); it != lst.end(); ++it ) {
+ TQValueList<unsigned int> ret;
+ TQValueList<TQVariant> lst = mValue.toList();
+ for( TQValueList<TQVariant>::const_iterator it = lst.begin(); it != lst.end(); ++it ) {
ret.append( (*it).toUInt() );
}
return ret;
@@ -635,10 +635,10 @@ KURL::List QGpgMECryptoConfigEntry::urlValueList() const
{
Q_ASSERT( mArgType == ArgType_Path || mArgType == ArgType_URL || mArgType == ArgType_LDAPURL );
Q_ASSERT( isList() );
- QStringList lst = mValue.toStringList();
+ TQStringList lst = mValue.toStringList();
KURL::List ret;
- for( QStringList::const_iterator it = lst.begin(); it != lst.end(); ++it ) {
+ for( TQStringList::const_iterator it = lst.begin(); it != lst.end(); ++it ) {
if ( mArgType == ArgType_Path ) {
KURL url;
url.setPath( *it );
@@ -671,7 +671,7 @@ void QGpgMECryptoConfigEntry::setBoolValue( bool b )
mDirty = true;
}
-void QGpgMECryptoConfigEntry::setStringValue( const QString& str )
+void QGpgMECryptoConfigEntry::setStringValue( const TQString& str )
{
mValue = stringToValue( str, false );
// When setting a string to empty (and there's no default), we need to act like resetToDefault
@@ -702,7 +702,7 @@ void QGpgMECryptoConfigEntry::setUIntValue( unsigned int i )
void QGpgMECryptoConfigEntry::setURLValue( const KURL& url )
{
- QString str = splitURL( mRealArgType, url );
+ TQString str = splitURL( mRealArgType, url );
if ( str.isEmpty() && !isOptional() )
mSet = false;
else
@@ -718,7 +718,7 @@ void QGpgMECryptoConfigEntry::setNumberOfTimesSet( unsigned int i )
setUIntValue( i );
}
-void QGpgMECryptoConfigEntry::setStringValueList( const QStringList& lst )
+void QGpgMECryptoConfigEntry::setStringValueList( const TQStringList& lst )
{
mValue = lst;
if ( lst.isEmpty() && !isOptional() )
@@ -728,11 +728,11 @@ void QGpgMECryptoConfigEntry::setStringValueList( const QStringList& lst )
mDirty = true;
}
-void QGpgMECryptoConfigEntry::setIntValueList( const QValueList<int>& lst )
+void QGpgMECryptoConfigEntry::setIntValueList( const TQValueList<int>& lst )
{
- QValueList<QVariant> ret;
- for( QValueList<int>::const_iterator it = lst.begin(); it != lst.end(); ++it ) {
- ret << QVariant( *it );
+ TQValueList<TQVariant> ret;
+ for( TQValueList<int>::const_iterator it = lst.begin(); it != lst.end(); ++it ) {
+ ret << TQVariant( *it );
}
mValue = ret;
if ( ret.isEmpty() && !isOptional() )
@@ -742,11 +742,11 @@ void QGpgMECryptoConfigEntry::setIntValueList( const QValueList<int>& lst )
mDirty = true;
}
-void QGpgMECryptoConfigEntry::setUIntValueList( const QValueList<unsigned int>& lst )
+void QGpgMECryptoConfigEntry::setUIntValueList( const TQValueList<unsigned int>& lst )
{
- QValueList<QVariant> ret;
- for( QValueList<unsigned int>::const_iterator it = lst.begin(); it != lst.end(); ++it ) {
- ret << QVariant( *it );
+ TQValueList<TQVariant> ret;
+ for( TQValueList<unsigned int>::const_iterator it = lst.begin(); it != lst.end(); ++it ) {
+ ret << TQVariant( *it );
}
if ( ret.isEmpty() && !isOptional() )
mSet = false;
@@ -758,7 +758,7 @@ void QGpgMECryptoConfigEntry::setUIntValueList( const QValueList<unsigned int>&
void QGpgMECryptoConfigEntry::setURLValueList( const KURL::List& urls )
{
- QStringList lst;
+ TQStringList lst;
for( KURL::List::const_iterator it = urls.begin(); it != urls.end(); ++it ) {
lst << splitURL( mRealArgType, *it );
}
@@ -770,25 +770,25 @@ void QGpgMECryptoConfigEntry::setURLValueList( const KURL::List& urls )
mDirty = true;
}
-QString QGpgMECryptoConfigEntry::toString( bool escape ) const
+TQString QGpgMECryptoConfigEntry::toString( bool escape ) const
{
// Basically the opposite of stringToValue
if ( isStringType() ) {
if ( mValue.isNull() )
- return QString::null;
+ return TQString::null;
else if ( isList() ) { // string list
- QStringList lst = mValue.toStringList();
+ TQStringList lst = mValue.toStringList();
if ( escape ) {
- for( QStringList::iterator it = lst.begin(); it != lst.end(); ++it ) {
+ for( TQStringList::iterator it = lst.begin(); it != lst.end(); ++it ) {
if ( !(*it).isNull() )
*it = gpgconf_escape( *it ).prepend( "\"" );
}
}
- QString res = lst.join( "," );
+ TQString res = lst.join( "," );
kdDebug(5150) << "toString: " << res << endl;
return res;
} else { // normal string
- QString res = mValue.toString();
+ TQString res = mValue.toString();
if ( escape )
res = gpgconf_escape( res ).prepend( "\"" );
return res;
@@ -797,7 +797,7 @@ QString QGpgMECryptoConfigEntry::toString( bool escape ) const
if ( !isList() ) // non-list non-string
{
if ( mArgType == ArgType_None ) {
- return mValue.toBool() ? QString::fromLatin1( "1" ) : QString::null;
+ return mValue.toBool() ? TQString::fromLatin1( "1" ) : TQString::null;
} else { // some int
Q_ASSERT( mArgType == ArgType_Int || mArgType == ArgType_UInt );
return mValue.toString(); // int to string conversion
@@ -806,16 +806,16 @@ QString QGpgMECryptoConfigEntry::toString( bool escape ) const
// Lists (of other types than strings)
if ( mArgType == ArgType_None )
- return QString::number( numberOfTimesSet() );
- QStringList ret;
- QValueList<QVariant> lst = mValue.toList();
- for( QValueList<QVariant>::const_iterator it = lst.begin(); it != lst.end(); ++it ) {
- ret << (*it).toString(); // QVariant does the conversion
+ return TQString::number( numberOfTimesSet() );
+ TQStringList ret;
+ TQValueList<TQVariant> lst = mValue.toList();
+ for( TQValueList<TQVariant>::const_iterator it = lst.begin(); it != lst.end(); ++it ) {
+ ret << (*it).toString(); // TQVariant does the conversion
}
return ret.join( "," );
}
-QString QGpgMECryptoConfigEntry::outputString() const
+TQString QGpgMECryptoConfigEntry::outputString() const
{
Q_ASSERT( mSet );
return toString( true );
diff --git a/certmanager/lib/backends/qgpgme/qgpgmecryptoconfig.h b/certmanager/lib/backends/qgpgme/qgpgmecryptoconfig.h
index bfcb8e5ca..20a01d315 100644
--- a/certmanager/lib/backends/qgpgme/qgpgmecryptoconfig.h
+++ b/certmanager/lib/backends/qgpgme/qgpgmecryptoconfig.h
@@ -34,10 +34,10 @@
#define KLEO_QGPGMECRYPTOCONFIG_H
#include <kleo/cryptoconfig.h>
-#include <qdict.h>
-#include <qstringlist.h>
-#include <qobject.h>
-#include <qvariant.h>
+#include <tqdict.h>
+#include <tqstringlist.h>
+#include <tqobject.h>
+#include <tqvariant.h>
class KProcIO;
class QGpgMECryptoConfigComponent;
@@ -46,7 +46,7 @@ class QGpgMECryptoConfigEntry;
* CryptoConfig implementation around the gpgconf command-line tool
* For method docu, see kleo/cryptoconfig.h
*/
-class QGpgMECryptoConfig : public QObject, public Kleo::CryptoConfig {
+class QGpgMECryptoConfig : public TQObject, public Kleo::CryptoConfig {
Q_OBJECT
public:
@@ -56,9 +56,9 @@ public:
QGpgMECryptoConfig();
virtual ~QGpgMECryptoConfig();
- virtual QStringList componentList() const;
+ virtual TQStringList componentList() const;
- virtual Kleo::CryptoConfigComponent* component( const QString& name ) const;
+ virtual Kleo::CryptoConfigComponent* component( const TQString& name ) const;
virtual void clear();
virtual void sync( bool runtime );
@@ -70,25 +70,25 @@ private:
void runGpgConf( bool showErrors );
private:
- QDict<QGpgMECryptoConfigComponent> mComponents;
+ TQDict<QGpgMECryptoConfigComponent> mComponents;
bool mParsed;
};
class QGpgMECryptoConfigGroup;
/// For docu, see kleo/cryptoconfig.h
-class QGpgMECryptoConfigComponent : public QObject, public Kleo::CryptoConfigComponent {
+class QGpgMECryptoConfigComponent : public TQObject, public Kleo::CryptoConfigComponent {
Q_OBJECT
public:
- QGpgMECryptoConfigComponent( QGpgMECryptoConfig*, const QString& name, const QString& description );
+ QGpgMECryptoConfigComponent( QGpgMECryptoConfig*, const TQString& name, const TQString& description );
~QGpgMECryptoConfigComponent();
- QString name() const { return mName; }
- QString iconName() const { return mName; }
- QString description() const { return mDescription; }
- QStringList groupList() const;
- Kleo::CryptoConfigGroup* group( const QString& name ) const;
+ TQString name() const { return mName; }
+ TQString iconName() const { return mName; }
+ TQString description() const { return mDescription; }
+ TQStringList groupList() const;
+ Kleo::CryptoConfigGroup* group( const TQString& name ) const;
void sync( bool runtime );
@@ -98,41 +98,41 @@ private:
void runGpgConf();
private:
- QDict<QGpgMECryptoConfigGroup> mGroups;
- QString mName;
- QString mDescription;
+ TQDict<QGpgMECryptoConfigGroup> mGroups;
+ TQString mName;
+ TQString mDescription;
QGpgMECryptoConfigGroup* mCurrentGroup; // during parsing
- QString mCurrentGroupName; // during parsing
+ TQString mCurrentGroupName; // during parsing
};
class QGpgMECryptoConfigGroup : public Kleo::CryptoConfigGroup {
public:
- QGpgMECryptoConfigGroup( const QString & name, const QString& description, int level );
+ QGpgMECryptoConfigGroup( const TQString & name, const TQString& description, int level );
~QGpgMECryptoConfigGroup() {}
- QString name() const { return mName; }
- QString iconName() const { return QString::null; }
- QString description() const { return mDescription; }
+ TQString name() const { return mName; }
+ TQString iconName() const { return TQString::null; }
+ TQString description() const { return mDescription; }
Kleo::CryptoConfigEntry::Level level() const { return mLevel; }
- QStringList entryList() const;
- Kleo::CryptoConfigEntry* entry( const QString& name ) const;
+ TQStringList entryList() const;
+ Kleo::CryptoConfigEntry* entry( const TQString& name ) const;
private:
friend class QGpgMECryptoConfigComponent; // it adds the entries
- QDict<QGpgMECryptoConfigEntry> mEntries;
- QString mName;
- QString mDescription;
+ TQDict<QGpgMECryptoConfigEntry> mEntries;
+ TQString mName;
+ TQString mDescription;
Kleo::CryptoConfigEntry::Level mLevel;
};
class QGpgMECryptoConfigEntry : public Kleo::CryptoConfigEntry {
public:
- QGpgMECryptoConfigEntry( const QStringList& parsedLine );
+ QGpgMECryptoConfigEntry( const TQStringList& parsedLine );
~QGpgMECryptoConfigEntry();
- QString name() const { return mName; }
- QString description() const { return mDescription; }
+ TQString name() const { return mName; }
+ TQString description() const { return mDescription; }
bool isOptional() const;
bool isReadOnly() const;
bool isList() const;
@@ -141,40 +141,40 @@ public:
ArgType argType() const { return static_cast<ArgType>( mArgType ); }
bool isSet() const;
bool boolValue() const;
- QString stringValue() const;
+ TQString stringValue() const;
int intValue() const;
unsigned int uintValue() const;
KURL urlValue() const;
unsigned int numberOfTimesSet() const;
- QStringList stringValueList() const;
- QValueList<int> intValueList() const;
- QValueList<unsigned int> uintValueList() const;
+ TQStringList stringValueList() const;
+ TQValueList<int> intValueList() const;
+ TQValueList<unsigned int> uintValueList() const;
KURL::List urlValueList() const;
void resetToDefault();
void setBoolValue( bool );
- void setStringValue( const QString& );
+ void setStringValue( const TQString& );
void setIntValue( int );
void setUIntValue( unsigned int );
void setURLValue( const KURL& );
void setNumberOfTimesSet( unsigned int );
- void setStringValueList( const QStringList& );
- void setIntValueList( const QValueList<int>& );
- void setUIntValueList( const QValueList<unsigned int>& );
+ void setStringValueList( const TQStringList& );
+ void setIntValueList( const TQValueList<int>& );
+ void setUIntValueList( const TQValueList<unsigned int>& );
void setURLValueList( const KURL::List& );
bool isDirty() const { return mDirty; }
void setDirty( bool b );
- QString outputString() const;
+ TQString outputString() const;
protected:
bool isStringType() const;
- QVariant stringToValue( const QString& value, bool unescape ) const;
- QString toString( bool escape ) const;
+ TQVariant stringToValue( const TQString& value, bool unescape ) const;
+ TQString toString( bool escape ) const;
private:
- QString mName;
- QString mDescription;
- QVariant mDefaultValue;
- QVariant mValue;
+ TQString mName;
+ TQString mDescription;
+ TQVariant mDefaultValue;
+ TQVariant mValue;
uint mFlags : 8; // bitfield with 8 bits
uint mLevel : 3; // max is 4 (2, in fact) -> 3 bits
uint mRealArgType : 6; // max is 33 -> 6 bits
diff --git a/certmanager/lib/backends/qgpgme/qgpgmedecryptjob.cpp b/certmanager/lib/backends/qgpgme/qgpgmedecryptjob.cpp
index 17905555e..692efa322 100644
--- a/certmanager/lib/backends/qgpgme/qgpgmedecryptjob.cpp
+++ b/certmanager/lib/backends/qgpgme/qgpgmedecryptjob.cpp
@@ -55,7 +55,7 @@ Kleo::QGpgMEDecryptJob::QGpgMEDecryptJob( GpgME::Context * context )
Kleo::QGpgMEDecryptJob::~QGpgMEDecryptJob() {
}
-void Kleo::QGpgMEDecryptJob::setup( const QByteArray & cipherText ) {
+void Kleo::QGpgMEDecryptJob::setup( const TQByteArray & cipherText ) {
assert( !mInData );
assert( !mOutData );
@@ -63,7 +63,7 @@ void Kleo::QGpgMEDecryptJob::setup( const QByteArray & cipherText ) {
createOutData();
}
-GpgME::Error Kleo::QGpgMEDecryptJob::start( const QByteArray & cipherText ) {
+GpgME::Error Kleo::QGpgMEDecryptJob::start( const TQByteArray & cipherText ) {
setup( cipherText );
hookupContextToEventLoopInteractor();
@@ -75,8 +75,8 @@ GpgME::Error Kleo::QGpgMEDecryptJob::start( const QByteArray & cipherText ) {
return err;
}
-GpgME::DecryptionResult Kleo::QGpgMEDecryptJob::exec( const QByteArray & cipherText,
- QByteArray & plainText ) {
+GpgME::DecryptionResult Kleo::QGpgMEDecryptJob::exec( const TQByteArray & cipherText,
+ TQByteArray & plainText ) {
setup( cipherText );
const GpgME::DecryptionResult result = mCtx->decrypt( *mInData, *mOutData );
plainText = mOutDataDataProvider->data();
diff --git a/certmanager/lib/backends/qgpgme/qgpgmedecryptjob.h b/certmanager/lib/backends/qgpgme/qgpgmedecryptjob.h
index 7fc89dff2..133806694 100644
--- a/certmanager/lib/backends/qgpgme/qgpgmedecryptjob.h
+++ b/certmanager/lib/backends/qgpgme/qgpgmedecryptjob.h
@@ -37,7 +37,7 @@
#include "qgpgmejob.h"
-#include <qcstring.h>
+#include <tqcstring.h>
namespace GpgME {
class Error;
@@ -53,11 +53,11 @@ namespace Kleo {
~QGpgMEDecryptJob();
/*! \reimp from DecryptJob */
- GpgME::Error start( const QByteArray & cipherText );
+ GpgME::Error start( const TQByteArray & cipherText );
/*! \reimp from DecryptJob */
- GpgME::DecryptionResult exec( const QByteArray & cipherText,
- QByteArray & plainText );
+ GpgME::DecryptionResult exec( const TQByteArray & cipherText,
+ TQByteArray & plainText );
private slots:
void slotOperationDoneEvent( GpgME::Context * context, const GpgME::Error & e ) {
@@ -66,7 +66,7 @@ namespace Kleo {
private:
void doOperationDoneEvent( const GpgME::Error & e );
- void setup( const QByteArray & cipherText );
+ void setup( const TQByteArray & cipherText );
};
}
diff --git a/certmanager/lib/backends/qgpgme/qgpgmedecryptverifyjob.cpp b/certmanager/lib/backends/qgpgme/qgpgmedecryptverifyjob.cpp
index 02cf1ef28..68f67d0fd 100644
--- a/certmanager/lib/backends/qgpgme/qgpgmedecryptverifyjob.cpp
+++ b/certmanager/lib/backends/qgpgme/qgpgmedecryptverifyjob.cpp
@@ -56,7 +56,7 @@ Kleo::QGpgMEDecryptVerifyJob::QGpgMEDecryptVerifyJob( GpgME::Context * context )
Kleo::QGpgMEDecryptVerifyJob::~QGpgMEDecryptVerifyJob() {
}
-void Kleo::QGpgMEDecryptVerifyJob::setup( const QByteArray & cipherText ) {
+void Kleo::QGpgMEDecryptVerifyJob::setup( const TQByteArray & cipherText ) {
assert( !mInData );
assert( !mOutData );
@@ -64,7 +64,7 @@ void Kleo::QGpgMEDecryptVerifyJob::setup( const QByteArray & cipherText ) {
createOutData();
}
-GpgME::Error Kleo::QGpgMEDecryptVerifyJob::start( const QByteArray & cipherText ) {
+GpgME::Error Kleo::QGpgMEDecryptVerifyJob::start( const TQByteArray & cipherText ) {
setup( cipherText );
hookupContextToEventLoopInteractor();
@@ -77,7 +77,7 @@ GpgME::Error Kleo::QGpgMEDecryptVerifyJob::start( const QByteArray & cipherText
}
std::pair<GpgME::DecryptionResult,GpgME::VerificationResult>
-Kleo::QGpgMEDecryptVerifyJob::exec( const QByteArray & cipherText, QByteArray & plainText ) {
+Kleo::QGpgMEDecryptVerifyJob::exec( const TQByteArray & cipherText, TQByteArray & plainText ) {
setup( cipherText );
const std::pair<GpgME::DecryptionResult,GpgME::VerificationResult> result =
mCtx->decryptAndVerify( *mInData, *mOutData );
diff --git a/certmanager/lib/backends/qgpgme/qgpgmedecryptverifyjob.h b/certmanager/lib/backends/qgpgme/qgpgmedecryptverifyjob.h
index a39188746..58da84d07 100644
--- a/certmanager/lib/backends/qgpgme/qgpgmedecryptverifyjob.h
+++ b/certmanager/lib/backends/qgpgme/qgpgmedecryptverifyjob.h
@@ -37,7 +37,7 @@
#include "qgpgmejob.h"
-#include <qcstring.h>
+#include <tqcstring.h>
#include <kdepimmacros.h>
namespace GpgME {
@@ -54,11 +54,11 @@ namespace Kleo {
~QGpgMEDecryptVerifyJob();
/*! \reimp from DecryptVerifyJob */
- GpgME::Error start( const QByteArray & cipherText );
+ GpgME::Error start( const TQByteArray & cipherText );
/*! \reimp from DecryptVerifyJob */
std::pair<GpgME::DecryptionResult,GpgME::VerificationResult>
- exec( const QByteArray & cipherText, QByteArray & plainText );
+ exec( const TQByteArray & cipherText, TQByteArray & plainText );
private slots:
void slotOperationDoneEvent( GpgME::Context * context, const GpgME::Error & e ) {
@@ -67,7 +67,7 @@ namespace Kleo {
private:
void doOperationDoneEvent( const GpgME::Error & e );
- void setup( const QByteArray & );
+ void setup( const TQByteArray & );
};
}
diff --git a/certmanager/lib/backends/qgpgme/qgpgmedownloadjob.cpp b/certmanager/lib/backends/qgpgme/qgpgmedownloadjob.cpp
index 6ee771a04..364e8f9f7 100644
--- a/certmanager/lib/backends/qgpgme/qgpgmedownloadjob.cpp
+++ b/certmanager/lib/backends/qgpgme/qgpgmedownloadjob.cpp
@@ -42,7 +42,7 @@
#include <gpgmepp/context.h>
#include <gpgmepp/data.h>
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include <assert.h>
@@ -56,7 +56,7 @@ Kleo::QGpgMEDownloadJob::QGpgMEDownloadJob( GpgME::Context * context )
Kleo::QGpgMEDownloadJob::~QGpgMEDownloadJob() {
}
-GpgME::Error Kleo::QGpgMEDownloadJob::start( const QStringList & pats ) {
+GpgME::Error Kleo::QGpgMEDownloadJob::start( const TQStringList & pats ) {
assert( !patterns() );
assert( !mOutData );
diff --git a/certmanager/lib/backends/qgpgme/qgpgmedownloadjob.h b/certmanager/lib/backends/qgpgme/qgpgmedownloadjob.h
index 1402b127c..6dc7b209e 100644
--- a/certmanager/lib/backends/qgpgme/qgpgmedownloadjob.h
+++ b/certmanager/lib/backends/qgpgme/qgpgmedownloadjob.h
@@ -51,7 +51,7 @@ namespace Kleo {
~QGpgMEDownloadJob();
/*! \reimp from DownloadJob */
- GpgME::Error start( const QStringList & fingerprints );
+ GpgME::Error start( const TQStringList & fingerprints );
private:
void doOperationDoneEvent( const GpgME::Error & e );
diff --git a/certmanager/lib/backends/qgpgme/qgpgmeencryptjob.cpp b/certmanager/lib/backends/qgpgme/qgpgmeencryptjob.cpp
index 3f223fc56..ddd51717f 100644
--- a/certmanager/lib/backends/qgpgme/qgpgmeencryptjob.cpp
+++ b/certmanager/lib/backends/qgpgme/qgpgmeencryptjob.cpp
@@ -59,7 +59,7 @@ Kleo::QGpgMEEncryptJob::QGpgMEEncryptJob( GpgME::Context * context )
Kleo::QGpgMEEncryptJob::~QGpgMEEncryptJob() {
}
-void Kleo::QGpgMEEncryptJob::setup( const QByteArray & plainText ) {
+void Kleo::QGpgMEEncryptJob::setup( const TQByteArray & plainText ) {
assert( !mInData );
assert( !mOutData );
@@ -68,7 +68,7 @@ void Kleo::QGpgMEEncryptJob::setup( const QByteArray & plainText ) {
}
GpgME::Error Kleo::QGpgMEEncryptJob::start( const std::vector<GpgME::Key> & recipients,
- const QByteArray & plainText, bool alwaysTrust ) {
+ const TQByteArray & plainText, bool alwaysTrust ) {
setup( plainText );
hookupContextToEventLoopInteractor();
@@ -84,9 +84,9 @@ GpgME::Error Kleo::QGpgMEEncryptJob::start( const std::vector<GpgME::Key> & reci
}
GpgME::EncryptionResult Kleo::QGpgMEEncryptJob::exec( const std::vector<GpgME::Key> & recipients,
- const QByteArray & plainText,
+ const TQByteArray & plainText,
bool alwaysTrust,
- QByteArray & ciphertext ) {
+ TQByteArray & ciphertext ) {
setup( plainText );
const GpgME::Context::EncryptionFlags flags =
alwaysTrust ? GpgME::Context::AlwaysTrust : GpgME::Context::None;
@@ -100,7 +100,7 @@ void Kleo::QGpgMEEncryptJob::doOperationDoneEvent( const GpgME::Error & ) {
emit result( mResult = mCtx->encryptionResult(), mOutDataDataProvider->data() );
}
-void Kleo::QGpgMEEncryptJob::showErrorDialog( QWidget * parent, const QString & caption ) const {
+void Kleo::QGpgMEEncryptJob::showErrorDialog( TQWidget * parent, const TQString & caption ) const {
if ( mResult.error() && !mResult.error().isCanceled() )
Kleo::MessageBox::error( parent, mResult, this, caption );
}
diff --git a/certmanager/lib/backends/qgpgme/qgpgmeencryptjob.h b/certmanager/lib/backends/qgpgme/qgpgmeencryptjob.h
index 362fb4e06..ecc7afd87 100644
--- a/certmanager/lib/backends/qgpgme/qgpgmeencryptjob.h
+++ b/certmanager/lib/backends/qgpgme/qgpgmeencryptjob.h
@@ -39,7 +39,7 @@
#include <gpgmepp/encryptionresult.h>
-#include <qcstring.h>
+#include <tqcstring.h>
namespace GpgME {
class Error;
@@ -57,15 +57,15 @@ namespace Kleo {
/*! \reimp from EncryptJob */
GpgME::Error start( const std::vector<GpgME::Key> & recipients,
- const QByteArray & plainText, bool alwaysTrust );
+ const TQByteArray & plainText, bool alwaysTrust );
/*! \reimp from EncryptJob */
GpgME::EncryptionResult exec( const std::vector<GpgME::Key> & recipients,
- const QByteArray & plainText, bool alwaysTrust,
- QByteArray & cipherText );
+ const TQByteArray & plainText, bool alwaysTrust,
+ TQByteArray & cipherText );
/*! \reimp from Job */
- void showErrorDialog( QWidget * parent, const QString & caption ) const;
+ void showErrorDialog( TQWidget * parent, const TQString & caption ) const;
private slots:
void slotOperationDoneEvent( GpgME::Context * context, const GpgME::Error & e ) {
@@ -75,7 +75,7 @@ namespace Kleo {
private:
void doOperationDoneEvent( const GpgME::Error & e );
- void setup( const QByteArray & );
+ void setup( const TQByteArray & );
private:
GpgME::EncryptionResult mResult;
diff --git a/certmanager/lib/backends/qgpgme/qgpgmeexportjob.cpp b/certmanager/lib/backends/qgpgme/qgpgmeexportjob.cpp
index c9274f3b7..c31074aff 100644
--- a/certmanager/lib/backends/qgpgme/qgpgmeexportjob.cpp
+++ b/certmanager/lib/backends/qgpgme/qgpgmeexportjob.cpp
@@ -42,7 +42,7 @@
#include <gpgmepp/context.h>
#include <gpgmepp/data.h>
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include <assert.h>
@@ -56,7 +56,7 @@ Kleo::QGpgMEExportJob::QGpgMEExportJob( GpgME::Context * context )
Kleo::QGpgMEExportJob::~QGpgMEExportJob() {
}
-GpgME::Error Kleo::QGpgMEExportJob::start( const QStringList & pats ) {
+GpgME::Error Kleo::QGpgMEExportJob::start( const TQStringList & pats ) {
assert( !patterns() );
assert( !mOutData );
diff --git a/certmanager/lib/backends/qgpgme/qgpgmeexportjob.h b/certmanager/lib/backends/qgpgme/qgpgmeexportjob.h
index 8b799b583..2c13f4090 100644
--- a/certmanager/lib/backends/qgpgme/qgpgmeexportjob.h
+++ b/certmanager/lib/backends/qgpgme/qgpgmeexportjob.h
@@ -37,7 +37,7 @@
#include "qgpgmejob.h"
-#include <qcstring.h>
+#include <tqcstring.h>
namespace GpgME {
class Error;
@@ -53,7 +53,7 @@ namespace Kleo {
~QGpgMEExportJob();
/*! \reimp from ExportJob */
- GpgME::Error start( const QStringList & patterns );
+ GpgME::Error start( const TQStringList & patterns );
private slots:
void slotOperationDoneEvent( GpgME::Context * context, const GpgME::Error & e ) {
diff --git a/certmanager/lib/backends/qgpgme/qgpgmeimportjob.cpp b/certmanager/lib/backends/qgpgme/qgpgmeimportjob.cpp
index fd1251b65..7c698e7e7 100644
--- a/certmanager/lib/backends/qgpgme/qgpgmeimportjob.cpp
+++ b/certmanager/lib/backends/qgpgme/qgpgmeimportjob.cpp
@@ -55,13 +55,13 @@ Kleo::QGpgMEImportJob::QGpgMEImportJob( GpgME::Context * context )
Kleo::QGpgMEImportJob::~QGpgMEImportJob() {
}
-void Kleo::QGpgMEImportJob::setup( const QByteArray & keyData ) {
+void Kleo::QGpgMEImportJob::setup( const TQByteArray & keyData ) {
assert( !mInData );
createInData( keyData );
}
-GpgME::Error Kleo::QGpgMEImportJob::start( const QByteArray & keyData ) {
+GpgME::Error Kleo::QGpgMEImportJob::start( const TQByteArray & keyData ) {
setup( keyData );
hookupContextToEventLoopInteractor();
@@ -73,7 +73,7 @@ GpgME::Error Kleo::QGpgMEImportJob::start( const QByteArray & keyData ) {
return err;
}
-GpgME::ImportResult Kleo::QGpgMEImportJob::exec( const QByteArray & keyData ) {
+GpgME::ImportResult Kleo::QGpgMEImportJob::exec( const TQByteArray & keyData ) {
setup( keyData );
return mCtx->importKeys( *mInData );
}
diff --git a/certmanager/lib/backends/qgpgme/qgpgmeimportjob.h b/certmanager/lib/backends/qgpgme/qgpgmeimportjob.h
index 8c2ee1ad4..f9b208398 100644
--- a/certmanager/lib/backends/qgpgme/qgpgmeimportjob.h
+++ b/certmanager/lib/backends/qgpgme/qgpgmeimportjob.h
@@ -37,7 +37,7 @@
#include "qgpgmejob.h"
-#include <qcstring.h>
+#include <tqcstring.h>
namespace GpgME {
class Error;
@@ -53,10 +53,10 @@ namespace Kleo {
~QGpgMEImportJob();
/*! \reimp from ImportJob */
- GpgME::Error start( const QByteArray & keyData );
+ GpgME::Error start( const TQByteArray & keyData );
/*! \reimp from ImportJob */
- GpgME::ImportResult exec( const QByteArray & keyData );
+ GpgME::ImportResult exec( const TQByteArray & keyData );
private slots:
void slotOperationDoneEvent( GpgME::Context * context, const GpgME::Error & e ) {
@@ -65,7 +65,7 @@ namespace Kleo {
private:
void doOperationDoneEvent( const GpgME::Error & e );
- void setup( const QByteArray & );
+ void setup( const TQByteArray & );
};
}
diff --git a/certmanager/lib/backends/qgpgme/qgpgmejob.cpp b/certmanager/lib/backends/qgpgme/qgpgmejob.cpp
index 897e5ff7c..72f9f77ff 100644
--- a/certmanager/lib/backends/qgpgme/qgpgmejob.cpp
+++ b/certmanager/lib/backends/qgpgme/qgpgmejob.cpp
@@ -49,8 +49,8 @@
#include <klocale.h>
#include <kstandarddirs.h>
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
#include <algorithm>
@@ -95,8 +95,8 @@ Kleo::QGpgMEJob::QGpgMEJob( Kleo::Job * _this, GpgME::Context * context )
{
InvarianceChecker check( this );
assert( context );
- QObject::connect( QGpgME::EventLoopInteractor::instance(), SIGNAL(aboutToDestroy()),
- _this, SLOT(slotCancel()) );
+ TQObject::connect( QGpgME::EventLoopInteractor::instance(), TQT_SIGNAL(aboutToDestroy()),
+ _this, TQT_SLOT(slotCancel()) );
context->setProgressProvider( this );
// (mmutz) work around a gpgme bug in versions at least <= 0.9.0.
// These versions will return GPG_ERR_NOT_IMPLEMENTED from
@@ -151,19 +151,19 @@ void Kleo::QGpgMEJob::deleteAllPatterns() {
void Kleo::QGpgMEJob::hookupContextToEventLoopInteractor() {
mCtx->setManagedByEventLoopInteractor( true );
- QObject::connect( QGpgME::EventLoopInteractor::instance(),
- SIGNAL(operationDoneEventSignal(GpgME::Context*,const GpgME::Error&)),
- mThis, SLOT(slotOperationDoneEvent(GpgME::Context*,const GpgME::Error&)) );
+ TQObject::connect( QGpgME::EventLoopInteractor::instance(),
+ TQT_SIGNAL(operationDoneEventSignal(GpgME::Context*,const GpgME::Error&)),
+ mThis, TQT_SLOT(slotOperationDoneEvent(GpgME::Context*,const GpgME::Error&)) );
}
-void Kleo::QGpgMEJob::setPatterns( const QStringList & sl, bool allowEmpty ) {
+void Kleo::QGpgMEJob::setPatterns( const TQStringList & sl, bool allowEmpty ) {
InvarianceChecker check( this );
deleteAllPatterns();
// create a new null-terminated C array of char* from patterns:
mPatterns = new const char*[ sl.size() + 1 ];
const char* * pat_it = mPatterns;
mNumPatterns = 0;
- for ( QStringList::const_iterator it = sl.begin() ; it != sl.end() ; ++it ) {
+ for ( TQStringList::const_iterator it = sl.begin() ; it != sl.end() ; ++it ) {
if ( (*it).isNull() )
continue;
if ( (*it).isEmpty() && !allowEmpty )
@@ -222,7 +222,7 @@ GpgME::Error Kleo::QGpgMEJob::setSigningKeys( const std::vector<GpgME::Key> & si
return 0;
}
-void Kleo::QGpgMEJob::createInData( const QByteArray & in ) {
+void Kleo::QGpgMEJob::createInData( const TQByteArray & in ) {
mInDataDataProvider = new QGpgME::QByteArrayDataProvider( in );
mInData = new GpgME::Data( mInDataDataProvider );
assert( !mInData->isNull() );
@@ -236,16 +236,16 @@ void Kleo::QGpgMEJob::createOutData() {
static const unsigned int GetAuditLogFlags = GpgME::Context::AuditLogWithHelp|GpgME::Context::HtmlAuditLog;
-static QString audit_log_as_html( GpgME::Context * ctx ) {
+static TQString audit_log_as_html( GpgME::Context * ctx ) {
if ( !ctx )
- return QString();
+ return TQString();
QGpgME::QByteArrayDataProvider dp;
GpgME::Data data( &dp );
assert( !data.isNull() );
if ( const GpgME::Error err = ctx->getAuditLog( data, GetAuditLogFlags ) )
- return QString();
+ return TQString();
else
- return QString::fromUtf8( dp.data().data() );
+ return TQString::fromUtf8( dp.data().data() );
}
void Kleo::QGpgMEJob::doSlotOperationDoneEvent( GpgME::Context * context, const GpgME::Error & e ) {
@@ -272,14 +272,14 @@ void Kleo::QGpgMEJob::showProgress( const char * what, int type, int current, in
char * Kleo::QGpgMEJob::getPassphrase( const char * useridHint, const char * /*description*/,
bool previousWasBad, bool & canceled ) {
// DF: here, description is the key fingerprint, twice, then "17 0". Not really descriptive.
- // So I'm ignoring QString::fromLocal8Bit( description ) )
- QString msg = previousWasBad ?
+ // So I'm ignoring TQString::fromLocal8Bit( description ) )
+ TQString msg = previousWasBad ?
i18n( "You need a passphrase to unlock the secret key for user:<br/> %1 (retry)" ) :
i18n( "You need a passphrase to unlock the secret key for user:<br/> %1" );
- msg = msg.arg( QString::fromUtf8( useridHint ) ) + "<br/><br/>";
+ msg = msg.arg( TQString::fromUtf8( useridHint ) ) + "<br/><br/>";
msg.prepend( "<qt>" );
msg += i18n( "This dialog will reappear every time the passphrase is needed. For a more secure solution that also allows caching the passphrase, use gpg-agent." ) + "<br/>";
- const QString gpgAgent = KStandardDirs::findExe( "gpg-agent" );
+ const TQString gpgAgent = KStandardDirs::findExe( "gpg-agent" );
if ( !gpgAgent.isEmpty() ) {
msg += i18n( "gpg-agent was found in %1, but does not appear to be running." )
.arg( gpgAgent );
@@ -294,7 +294,7 @@ char * Kleo::QGpgMEJob::getPassphrase( const char * useridHint, const char * /*d
msg += "<br/><br/>";
msg += i18n( "Enter passphrase:" );
Kleo::PassphraseDialog dlg( msg, i18n("Passphrase Dialog") );
- if ( dlg.exec() != QDialog::Accepted ) {
+ if ( dlg.exec() != TQDialog::Accepted ) {
canceled = true;
return 0;
}
diff --git a/certmanager/lib/backends/qgpgme/qgpgmejob.h b/certmanager/lib/backends/qgpgme/qgpgmejob.h
index da7acf1c9..d35080a72 100644
--- a/certmanager/lib/backends/qgpgme/qgpgmejob.h
+++ b/certmanager/lib/backends/qgpgme/qgpgmejob.h
@@ -38,8 +38,8 @@
#include <gpgmepp/key.h>
-#include <qcstring.h>
-#include <qstring.h>
+#include <tqcstring.h>
+#include <tqstring.h>
#include <vector>
#include <kdepimmacros.h>
@@ -88,7 +88,7 @@ namespace Kleo {
/*! Hooks up mCtx to be managed by the event loop interactor */
void hookupContextToEventLoopInteractor();
/*! Fills mPatterns from the stringlist, resets chunking to the full list */
- void setPatterns( const QStringList & sl, bool allowEmpty=false );
+ void setPatterns( const TQStringList & sl, bool allowEmpty=false );
/*! Returnes the number of patterns set */
unsigned int numPatterns() const { return mNumPatterns; }
/*! Skips to the next chunk of patterns. @return patterns() */
@@ -103,7 +103,7 @@ namespace Kleo {
void createOutData();
/*! Creates a GpgME::Data/QGpgME::QByteArrayDataProvider pair,
filled with the contents of \a in */
- void createInData( const QByteArray & in );
+ void createInData( const TQByteArray & in );
/*! Sets the list of signing keys */
GpgME::Error setSigningKeys( const std::vector<GpgME::Key> & signers );
/*! Call this to implement a slotOperationDoneEvent() */
@@ -116,10 +116,10 @@ namespace Kleo {
//
protected:
- virtual void doEmitProgressSignal( const QString & what, int current, int total ) = 0;
+ virtual void doEmitProgressSignal( const TQString & what, int current, int total ) = 0;
virtual void doEmitDoneSignal() = 0;
void doSlotCancel();
- QString auditLogAsHtml() const { return mAuditLogAsHtml; }
+ TQString auditLogAsHtml() const { return mAuditLogAsHtml; }
private:
/*! \reimp from GpgME::ProgressProvider */
@@ -146,15 +146,15 @@ namespace Kleo {
unsigned int mNumPatterns;
unsigned int mChunkSize;
unsigned int mPatternStartIndex, mPatternEndIndex;
- QString mAuditLogAsHtml;
+ TQString mAuditLogAsHtml;
};
}
#define make_slot_cancel private: void slotCancel() { QGpgMEJob::doSlotCancel(); }
-#define make_progress_emitter private: void doEmitProgressSignal( const QString & what, int cur, int tot ) { emit progress( what, cur, tot ); }
+#define make_progress_emitter private: void doEmitProgressSignal( const TQString & what, int cur, int tot ) { emit progress( what, cur, tot ); }
#define make_done_emitter private: void doEmitDoneSignal() { emit done(); }
-#define make_auditLogAsHtml private: QString auditLogAsHtml() const { return QGpgMEJob::auditLogAsHtml(); }
+#define make_auditLogAsHtml private: TQString auditLogAsHtml() const { return QGpgMEJob::auditLogAsHtml(); }
#define QGPGME_JOB make_slot_cancel make_progress_emitter make_done_emitter make_auditLogAsHtml
#endif // __KLEO_QGPGMEJOB_H__
diff --git a/certmanager/lib/backends/qgpgme/qgpgmekeygenerationjob.cpp b/certmanager/lib/backends/qgpgme/qgpgmekeygenerationjob.cpp
index a0ab78f23..b226d6498 100644
--- a/certmanager/lib/backends/qgpgme/qgpgmekeygenerationjob.cpp
+++ b/certmanager/lib/backends/qgpgme/qgpgmekeygenerationjob.cpp
@@ -59,7 +59,7 @@ Kleo::QGpgMEKeyGenerationJob::~QGpgMEKeyGenerationJob() {
delete mPubKeyDataProvider; mPubKeyDataProvider = 0;
}
-GpgME::Error Kleo::QGpgMEKeyGenerationJob::start( const QString & parameters ) {
+GpgME::Error Kleo::QGpgMEKeyGenerationJob::start( const TQString & parameters ) {
assert( !mPubKey );
// set up empty data object for the public key data
@@ -80,7 +80,7 @@ GpgME::Error Kleo::QGpgMEKeyGenerationJob::start( const QString & parameters ) {
}
void Kleo::QGpgMEKeyGenerationJob::doOperationDoneEvent( const GpgME::Error & ) {
- emit result( mCtx->keyGenerationResult(), mPubKeyDataProvider ? mPubKeyDataProvider->data() : QByteArray() );
+ emit result( mCtx->keyGenerationResult(), mPubKeyDataProvider ? mPubKeyDataProvider->data() : TQByteArray() );
}
#include "qgpgmekeygenerationjob.moc"
diff --git a/certmanager/lib/backends/qgpgme/qgpgmekeygenerationjob.h b/certmanager/lib/backends/qgpgme/qgpgmekeygenerationjob.h
index 973aeb12d..bf99007fc 100644
--- a/certmanager/lib/backends/qgpgme/qgpgmekeygenerationjob.h
+++ b/certmanager/lib/backends/qgpgme/qgpgmekeygenerationjob.h
@@ -58,7 +58,7 @@ namespace Kleo {
~QGpgMEKeyGenerationJob();
/*! \reimp from KeygenerationJob */
- GpgME::Error start( const QString & parameters );
+ GpgME::Error start( const TQString & parameters );
private slots:
void slotOperationDoneEvent( GpgME::Context * context, const GpgME::Error & error ) {
diff --git a/certmanager/lib/backends/qgpgme/qgpgmekeylistjob.cpp b/certmanager/lib/backends/qgpgme/qgpgmekeylistjob.cpp
index 9c87e3ef6..9e663e92d 100644
--- a/certmanager/lib/backends/qgpgme/qgpgmekeylistjob.cpp
+++ b/certmanager/lib/backends/qgpgme/qgpgmekeylistjob.cpp
@@ -47,7 +47,7 @@
#include <klocale.h>
#include <kdebug.h>
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include <algorithm>
@@ -66,20 +66,20 @@ Kleo::QGpgMEKeyListJob::QGpgMEKeyListJob( GpgME::Context * context )
Kleo::QGpgMEKeyListJob::~QGpgMEKeyListJob() {
}
-void Kleo::QGpgMEKeyListJob::setup( const QStringList & pats, bool secretOnly ) {
+void Kleo::QGpgMEKeyListJob::setup( const TQStringList & pats, bool secretOnly ) {
assert( !patterns() );
mSecretOnly = secretOnly;
setPatterns( pats );
}
-GpgME::Error Kleo::QGpgMEKeyListJob::start( const QStringList & pats, bool secretOnly ) {
+GpgME::Error Kleo::QGpgMEKeyListJob::start( const TQStringList & pats, bool secretOnly ) {
setup( pats, secretOnly );
hookupContextToEventLoopInteractor();
connect( QGpgME::EventLoopInteractor::instance(),
- SIGNAL(nextKeyEventSignal(GpgME::Context*,const GpgME::Key&)),
- SLOT(slotNextKeyEvent(GpgME::Context*,const GpgME::Key&)) );
+ TQT_SIGNAL(nextKeyEventSignal(GpgME::Context*,const GpgME::Key&)),
+ TQT_SLOT(slotNextKeyEvent(GpgME::Context*,const GpgME::Key&)) );
// The communication channel between gpgme and gpgsm is limited in
// the number of patterns that can be transported, but they won't
@@ -106,7 +106,7 @@ GpgME::Error Kleo::QGpgMEKeyListJob::start( const QStringList & pats, bool secre
return 0;
}
-GpgME::KeyListResult Kleo::QGpgMEKeyListJob::exec( const QStringList & pats, bool secretOnly, std::vector<GpgME::Key> & keys ) {
+GpgME::KeyListResult Kleo::QGpgMEKeyListJob::exec( const TQStringList & pats, bool secretOnly, std::vector<GpgME::Key> & keys ) {
setup( pats, secretOnly );
// The communication channel between gpgme and gpgsm is limited in
@@ -174,13 +174,13 @@ void Kleo::QGpgMEKeyListJob::slotOperationDoneEvent( GpgME::Context * context, c
deleteLater();
}
-void Kleo::QGpgMEKeyListJob::showErrorDialog( QWidget * parent, const QString & caption ) const {
+void Kleo::QGpgMEKeyListJob::showErrorDialog( TQWidget * parent, const TQString & caption ) const {
if ( !mResult.error() || mResult.error().isCanceled() )
return;
- const QString msg = i18n( "<qt><p>An error occurred while fetching "
+ const TQString msg = i18n( "<qt><p>An error occurred while fetching "
"the keys from the backend:</p>"
"<p><b>%1</b></p></qt>" )
- .arg( QString::fromLocal8Bit( mResult.error().asString() ) );
+ .arg( TQString::fromLocal8Bit( mResult.error().asString() ) );
KMessageBox::error( parent, msg, caption );
}
diff --git a/certmanager/lib/backends/qgpgme/qgpgmekeylistjob.h b/certmanager/lib/backends/qgpgme/qgpgmekeylistjob.h
index 8320e0134..0bc84c08c 100644
--- a/certmanager/lib/backends/qgpgme/qgpgmekeylistjob.h
+++ b/certmanager/lib/backends/qgpgme/qgpgmekeylistjob.h
@@ -54,13 +54,13 @@ namespace Kleo {
~QGpgMEKeyListJob();
/*! \reimp from KeyListJob */
- GpgME::Error start( const QStringList & patterns, bool secretOnly );
+ GpgME::Error start( const TQStringList & patterns, bool secretOnly );
/*! \reimp from KeyListJob */
- GpgME::KeyListResult exec( const QStringList & patterns, bool secretOnly, std::vector<GpgME::Key> & keys );
+ GpgME::KeyListResult exec( const TQStringList & patterns, bool secretOnly, std::vector<GpgME::Key> & keys );
/*! \reimp from Job */
- void showErrorDialog( QWidget * parent, const QString & caption ) const;
+ void showErrorDialog( TQWidget * parent, const TQString & caption ) const;
private slots:
void slotNextKeyEvent( GpgME::Context * context, const GpgME::Key & key );
@@ -68,7 +68,7 @@ namespace Kleo {
private:
void doOperationDoneEvent( const GpgME::Error &) {} // unused, we implement slotOperationDoneEvent ourselves.
- void setup( const QStringList &, bool );
+ void setup( const TQStringList &, bool );
GpgME::KeyListResult attemptSyncKeyListing( std::vector<GpgME::Key> & );
private:
diff --git a/certmanager/lib/backends/qgpgme/qgpgmeprogresstokenmapper.cpp b/certmanager/lib/backends/qgpgme/qgpgmeprogresstokenmapper.cpp
index 3b6ae35eb..6cb71dbad 100644
--- a/certmanager/lib/backends/qgpgme/qgpgmeprogresstokenmapper.cpp
+++ b/certmanager/lib/backends/qgpgme/qgpgmeprogresstokenmapper.cpp
@@ -38,7 +38,7 @@
#include <klocale.h>
-#include <qstring.h>
+#include <tqstring.h>
#include <assert.h>
#include <map>
@@ -108,13 +108,13 @@ Kleo::QGpgMEProgressTokenMapper::~QGpgMEProgressTokenMapper() {
mSelf = 0;
}
-typedef std::map< QString, std::map<int,Desc> > Map;
+typedef std::map< TQString, std::map<int,Desc> > Map;
static const Map & makeMap() { // return a reference to a static to avoid copying
static Map map;
for ( unsigned int i = 0 ; i < sizeof tokens / sizeof *tokens ; ++i ) {
assert( tokens[i].token );
- const QString token = QString::fromLatin1( tokens[i].token ).lower();
+ const TQString token = TQString::fromLatin1( tokens[i].token ).lower();
for ( unsigned int j = 0 ; j < tokens[i].numDesc ; ++j ) {
const Desc & desc = tokens[i].desc[j];
assert( desc.display );
@@ -124,19 +124,19 @@ static const Map & makeMap() { // return a reference to a static to avoid copyin
return map;
}
-QString Kleo::QGpgMEProgressTokenMapper::map( const char * tokenUtf8, int subtoken, int cur, int tot ) const {
+TQString Kleo::QGpgMEProgressTokenMapper::map( const char * tokenUtf8, int subtoken, int cur, int tot ) const {
if ( !tokenUtf8 || !*tokenUtf8 )
- return QString::null;
+ return TQString::null;
if ( qstrcmp( tokenUtf8, "file:" ) == 0 )
- return QString::null; // gpgme's job
+ return TQString::null; // gpgme's job
- return map( QString::fromUtf8( tokenUtf8 ), subtoken, cur, tot );
+ return map( TQString::fromUtf8( tokenUtf8 ), subtoken, cur, tot );
}
-QString Kleo::QGpgMEProgressTokenMapper::map( const QString & token, int subtoken, int cur, int tot ) const {
+TQString Kleo::QGpgMEProgressTokenMapper::map( const TQString & token, int subtoken, int cur, int tot ) const {
if ( token.startsWith( "file:" ) )
- return QString::null; // gpgme's job
+ return TQString::null; // gpgme's job
static const Map & tokenMap = makeMap();
@@ -149,7 +149,7 @@ QString Kleo::QGpgMEProgressTokenMapper::map( const QString & token, int subtoke
if ( it2 == it1->second.end() )
return token;
const Desc & desc = it2->second;
- QString result = i18n( desc.display );
+ TQString result = i18n( desc.display );
if ( desc.useCur )
result = result.arg( cur );
if ( desc.useTot )
diff --git a/certmanager/lib/backends/qgpgme/qgpgmeprogresstokenmapper.h b/certmanager/lib/backends/qgpgme/qgpgmeprogresstokenmapper.h
index d0a8da6c3..2d62f0ca5 100644
--- a/certmanager/lib/backends/qgpgme/qgpgmeprogresstokenmapper.h
+++ b/certmanager/lib/backends/qgpgme/qgpgmeprogresstokenmapper.h
@@ -45,8 +45,8 @@ namespace Kleo {
public:
static const QGpgMEProgressTokenMapper * instance();
- QString map( const char * token, int subtoken, int current, int total ) const;
- QString map( const QString & token, int subtoken, int current, int total ) const;
+ TQString map( const char * token, int subtoken, int current, int total ) const;
+ TQString map( const TQString & token, int subtoken, int current, int total ) const;
private:
static QGpgMEProgressTokenMapper * mSelf;
diff --git a/certmanager/lib/backends/qgpgme/qgpgmerefreshkeysjob.cpp b/certmanager/lib/backends/qgpgme/qgpgmerefreshkeysjob.cpp
index 325306e8c..911afcd63 100644
--- a/certmanager/lib/backends/qgpgme/qgpgmerefreshkeysjob.cpp
+++ b/certmanager/lib/backends/qgpgme/qgpgmerefreshkeysjob.cpp
@@ -45,7 +45,7 @@
#include <qgpgme/eventloopinteractor.h>
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include <gpg-error.h>
@@ -63,7 +63,7 @@ Kleo::QGpgMERefreshKeysJob::~QGpgMERefreshKeysJob() {
}
-GpgME::Error Kleo::QGpgMERefreshKeysJob::start( const QStringList & patterns ) {
+GpgME::Error Kleo::QGpgMERefreshKeysJob::start( const TQStringList & patterns ) {
assert( mPatternsToDo.empty() );
mPatternsToDo = patterns;
@@ -94,7 +94,7 @@ GpgME::Error Kleo::QGpgMERefreshKeysJob::startAProcess() {
strlen("--with-validation") + 1 + strlen("--force-crl-refresh") + 1 +
strlen("--enable-crl-checks") + 1;
while ( !mPatternsToDo.empty() ) {
- const QCString pat = mPatternsToDo.front().utf8().stripWhiteSpace();
+ const TQCString pat = mPatternsToDo.front().utf8().stripWhiteSpace();
const unsigned int patLength = pat.length();
if ( patLength >= commandLineLength )
break;
@@ -107,12 +107,12 @@ GpgME::Error Kleo::QGpgMERefreshKeysJob::startAProcess() {
mProcess->setUseStatusFD( true );
- connect( mProcess, SIGNAL(processExited(KProcess*)),
- SLOT(slotProcessExited(KProcess*)) );
- connect( mProcess, SIGNAL(receivedStderr(KProcess*,char*,int)),
- SLOT(slotStderr(KProcess*,char*,int)) );
- connect( mProcess, SIGNAL(status(Kleo::GnuPGProcessBase*,const QString&,const QStringList&)),
- SLOT(slotStatus(Kleo::GnuPGProcessBase*,const QString&,const QStringList&)) );
+ connect( mProcess, TQT_SIGNAL(processExited(KProcess*)),
+ TQT_SLOT(slotProcessExited(KProcess*)) );
+ connect( mProcess, TQT_SIGNAL(receivedStderr(KProcess*,char*,int)),
+ TQT_SLOT(slotStderr(KProcess*,char*,int)) );
+ connect( mProcess, TQT_SIGNAL(status(Kleo::GnuPGProcessBase*,const TQString&,const TQStringList&)),
+ TQT_SLOT(slotStatus(Kleo::GnuPGProcessBase*,const TQString&,const TQStringList&)) );
if ( !mProcess->start( KProcess::NotifyOnExit, KProcess::Stderr ) ) {
mError = gpg_err_make( GPG_ERR_SOURCE_GPGSM, GPG_ERR_ENOENT ); // what else?
@@ -129,10 +129,10 @@ void Kleo::QGpgMERefreshKeysJob::slotCancel() {
mError = gpg_err_make( GPG_ERR_SOURCE_GPGSM, GPG_ERR_CANCELED );
}
-void Kleo::QGpgMERefreshKeysJob::slotStatus( GnuPGProcessBase * proc, const QString & type, const QStringList & args ) {
+void Kleo::QGpgMERefreshKeysJob::slotStatus( GnuPGProcessBase * proc, const TQString & type, const TQStringList & args ) {
if ( proc != mProcess )
return;
- QStringList::const_iterator it = args.begin();
+ TQStringList::const_iterator it = args.begin();
bool ok = false;
if ( type == "ERROR" ) {
@@ -163,7 +163,7 @@ void Kleo::QGpgMERefreshKeysJob::slotStatus( GnuPGProcessBase * proc, const QStr
kdDebug( 5150 ) << "Kleo::QGpgMERefreshKeysJob::slotStatus() not recognising PROGRESS with < 4 args!" << endl;
return;
}
- const QString what = *++it;
+ const TQString what = *++it;
++it; // don't use "type"...
const int cur = (*++it).toInt( &ok );
if ( !ok ) {
diff --git a/certmanager/lib/backends/qgpgme/qgpgmerefreshkeysjob.h b/certmanager/lib/backends/qgpgme/qgpgmerefreshkeysjob.h
index a0132f223..7ed476866 100644
--- a/certmanager/lib/backends/qgpgme/qgpgmerefreshkeysjob.h
+++ b/certmanager/lib/backends/qgpgme/qgpgmerefreshkeysjob.h
@@ -35,7 +35,7 @@
#include <kleo/refreshkeysjob.h>
-#include <qstringlist.h>
+#include <tqstringlist.h>
namespace Kleo {
class GnuPGProcessBase;
@@ -56,13 +56,13 @@ namespace Kleo {
~QGpgMERefreshKeysJob();
/*! \reimp from RefreshKeysJob */
- GpgME::Error start( const QStringList & patterns );
+ GpgME::Error start( const TQStringList & patterns );
private slots:
/*! \reimp from Job */
void slotCancel();
- void slotStatus( Kleo::GnuPGProcessBase *, const QString &, const QStringList & );
+ void slotStatus( Kleo::GnuPGProcessBase *, const TQString &, const TQStringList & );
void slotStderr( KProcess *, char *, int );
void slotProcessExited( KProcess * );
@@ -72,7 +72,7 @@ namespace Kleo {
private:
GnuPGProcessBase * mProcess;
int mError;
- QStringList mPatternsToDo;
+ TQStringList mPatternsToDo;
};
}
diff --git a/certmanager/lib/backends/qgpgme/qgpgmesecretkeyexportjob.cpp b/certmanager/lib/backends/qgpgme/qgpgmesecretkeyexportjob.cpp
index 0ce543cf9..aeb7b010e 100644
--- a/certmanager/lib/backends/qgpgme/qgpgmesecretkeyexportjob.cpp
+++ b/certmanager/lib/backends/qgpgme/qgpgmesecretkeyexportjob.cpp
@@ -46,14 +46,14 @@
#include <qgpgme/eventloopinteractor.h>
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include <gpg-error.h>
#include <string.h>
#include <assert.h>
-Kleo::QGpgMESecretKeyExportJob::QGpgMESecretKeyExportJob( bool armour, const QString& charset )
+Kleo::QGpgMESecretKeyExportJob::QGpgMESecretKeyExportJob( bool armour, const TQString& charset )
: ExportJob( QGpgME::EventLoopInteractor::instance(), "Kleo::QGpgMESecretKeyExportJob" ),
mProcess( 0 ),
mError( 0 ),
@@ -67,7 +67,7 @@ Kleo::QGpgMESecretKeyExportJob::~QGpgMESecretKeyExportJob() {
}
-GpgME::Error Kleo::QGpgMESecretKeyExportJob::start( const QStringList & patterns ) {
+GpgME::Error Kleo::QGpgMESecretKeyExportJob::start( const TQStringList & patterns ) {
assert( mKeyData.isEmpty() );
if ( patterns.size() != 1 || patterns.front().isEmpty() ) {
@@ -88,14 +88,14 @@ GpgME::Error Kleo::QGpgMESecretKeyExportJob::start( const QStringList & patterns
mProcess->setUseStatusFD( true );
- connect( mProcess, SIGNAL(processExited(KProcess*)),
- SLOT(slotProcessExited(KProcess*)) );
- connect( mProcess, SIGNAL(receivedStdout(KProcess*,char*,int)),
- SLOT(slotStdout(KProcess*,char*,int)) );
- connect( mProcess, SIGNAL(receivedStderr(KProcess*,char*,int)),
- SLOT(slotStderr(KProcess*,char*,int)) );
- connect( mProcess, SIGNAL(status(Kleo::GnuPGProcessBase*,const QString&,const QStringList&)),
- SLOT(slotStatus(Kleo::GnuPGProcessBase*,const QString&,const QStringList&)) );
+ connect( mProcess, TQT_SIGNAL(processExited(KProcess*)),
+ TQT_SLOT(slotProcessExited(KProcess*)) );
+ connect( mProcess, TQT_SIGNAL(receivedStdout(KProcess*,char*,int)),
+ TQT_SLOT(slotStdout(KProcess*,char*,int)) );
+ connect( mProcess, TQT_SIGNAL(receivedStderr(KProcess*,char*,int)),
+ TQT_SLOT(slotStderr(KProcess*,char*,int)) );
+ connect( mProcess, TQT_SIGNAL(status(Kleo::GnuPGProcessBase*,const TQString&,const TQStringList&)),
+ TQT_SLOT(slotStatus(Kleo::GnuPGProcessBase*,const TQString&,const TQStringList&)) );
if ( !mProcess->start( KProcess::NotifyOnExit, KProcess::AllOutput ) ) {
mError = gpg_err_make( GPG_ERR_SOURCE_GPGSM, GPG_ERR_ENOENT ); // what else?
@@ -112,10 +112,10 @@ void Kleo::QGpgMESecretKeyExportJob::slotCancel() {
mError = gpg_err_make( GPG_ERR_SOURCE_GPGSM, GPG_ERR_CANCELED );
}
-void Kleo::QGpgMESecretKeyExportJob::slotStatus( GnuPGProcessBase * proc, const QString & type, const QStringList & args ) {
+void Kleo::QGpgMESecretKeyExportJob::slotStatus( GnuPGProcessBase * proc, const TQString & type, const TQStringList & args ) {
if ( proc != mProcess )
return;
- QStringList::const_iterator it = args.begin();
+ TQStringList::const_iterator it = args.begin();
bool ok = false;
if ( type == "ERROR" ) {
@@ -146,7 +146,7 @@ void Kleo::QGpgMESecretKeyExportJob::slotStatus( GnuPGProcessBase * proc, const
kdDebug( 5150 ) << "Kleo::QGpgMESecretKeyExportJob::slotStatus() not recognising PROGRESS with < 4 args!" << endl;
return;
}
- const QString what = *++it;
+ const TQString what = *++it;
++it; // don't use "type"...
const int cur = (*++it).toInt( &ok );
if ( !ok ) {
diff --git a/certmanager/lib/backends/qgpgme/qgpgmesecretkeyexportjob.h b/certmanager/lib/backends/qgpgme/qgpgmesecretkeyexportjob.h
index 5f5e3b69c..50d42c3ce 100644
--- a/certmanager/lib/backends/qgpgme/qgpgmesecretkeyexportjob.h
+++ b/certmanager/lib/backends/qgpgme/qgpgmesecretkeyexportjob.h
@@ -35,7 +35,7 @@
#include <kleo/exportjob.h>
-#include <qcstring.h>
+#include <tqcstring.h>
namespace Kleo {
class GnuPGProcessBase;
@@ -57,27 +57,27 @@ namespace Kleo {
class QGpgMESecretKeyExportJob : public ExportJob {
Q_OBJECT
public:
- QGpgMESecretKeyExportJob( bool armour, const QString& charset );
+ QGpgMESecretKeyExportJob( bool armour, const TQString& charset );
~QGpgMESecretKeyExportJob();
/*! \reimp from ExportJob */
- GpgME::Error start( const QStringList & patterns );
+ GpgME::Error start( const TQStringList & patterns );
private slots:
/*! \reimp from Job */
void slotCancel();
- void slotStatus( Kleo::GnuPGProcessBase *, const QString &, const QStringList & );
+ void slotStatus( Kleo::GnuPGProcessBase *, const TQString &, const TQStringList & );
void slotStdout( KProcess *, char *, int );
void slotStderr( KProcess *, char *, int );
void slotProcessExited( KProcess * );
private:
GnuPGProcessBase * mProcess;
- QByteArray mKeyData;
+ TQByteArray mKeyData;
int mError;
bool mArmour;
- QString mCharset;
+ TQString mCharset;
};
}
diff --git a/certmanager/lib/backends/qgpgme/qgpgmesignencryptjob.cpp b/certmanager/lib/backends/qgpgme/qgpgmesignencryptjob.cpp
index fae748478..bc05eb86c 100644
--- a/certmanager/lib/backends/qgpgme/qgpgmesignencryptjob.cpp
+++ b/certmanager/lib/backends/qgpgme/qgpgmesignencryptjob.cpp
@@ -60,7 +60,7 @@ Kleo::QGpgMESignEncryptJob::~QGpgMESignEncryptJob() {
}
GpgME::Error Kleo::QGpgMESignEncryptJob::setup( const std::vector<GpgME::Key> & signers,
- const QByteArray & plainText ) {
+ const TQByteArray & plainText ) {
assert( !mInData );
assert( !mOutData );
@@ -72,7 +72,7 @@ GpgME::Error Kleo::QGpgMESignEncryptJob::setup( const std::vector<GpgME::Key> &
GpgME::Error Kleo::QGpgMESignEncryptJob::start( const std::vector<GpgME::Key> & signers,
const std::vector<GpgME::Key> & recipients,
- const QByteArray & plainText, bool alwaysTrust ) {
+ const TQByteArray & plainText, bool alwaysTrust ) {
if ( const GpgME::Error error = setup( signers, plainText ) ) {
deleteLater();
return error;
@@ -94,8 +94,8 @@ GpgME::Error Kleo::QGpgMESignEncryptJob::start( const std::vector<GpgME::Key> &
std::pair<GpgME::SigningResult,GpgME::EncryptionResult>
Kleo::QGpgMESignEncryptJob::exec( const std::vector<GpgME::Key> & signers,
const std::vector<GpgME::Key> & recipients,
- const QByteArray & plainText, bool alwaysTrust,
- QByteArray & cipherText ) {
+ const TQByteArray & plainText, bool alwaysTrust,
+ TQByteArray & cipherText ) {
if ( GpgME::Error err = setup( signers, plainText ) )
return std::make_pair( GpgME::SigningResult( 0, err ), GpgME::EncryptionResult() );
const GpgME::Context::EncryptionFlags flags =
@@ -112,7 +112,7 @@ void Kleo::QGpgMESignEncryptJob::doOperationDoneEvent( const GpgME::Error & ) {
emit result( mResult.first, mResult.second, mOutDataDataProvider->data() );
}
-void Kleo::QGpgMESignEncryptJob::showErrorDialog( QWidget * parent, const QString & caption ) const {
+void Kleo::QGpgMESignEncryptJob::showErrorDialog( TQWidget * parent, const TQString & caption ) const {
if ( mResult.first.error() && !mResult.first.error().isCanceled() ||
mResult.second.error() && !mResult.second.error().isCanceled() )
Kleo::MessageBox::error( parent, mResult.first, mResult.second, this, caption );
diff --git a/certmanager/lib/backends/qgpgme/qgpgmesignencryptjob.h b/certmanager/lib/backends/qgpgme/qgpgmesignencryptjob.h
index a826edcbf..003377cfe 100644
--- a/certmanager/lib/backends/qgpgme/qgpgmesignencryptjob.h
+++ b/certmanager/lib/backends/qgpgme/qgpgmesignencryptjob.h
@@ -40,7 +40,7 @@
#include <gpgmepp/signingresult.h>
#include <gpgmepp/encryptionresult.h>
-#include <qcstring.h>
+#include <tqcstring.h>
#include <utility>
@@ -62,16 +62,16 @@ namespace Kleo {
/*! \reimp from SignEncryptJob */
GpgME::Error start( const std::vector<GpgME::Key> & signers,
const std::vector<GpgME::Key> & recipients,
- const QByteArray & plainText, bool alwaysTrust );
+ const TQByteArray & plainText, bool alwaysTrust );
std::pair<GpgME::SigningResult,GpgME::EncryptionResult>
exec( const std::vector<GpgME::Key> & signers,
const std::vector<GpgME::Key> & recipients,
- const QByteArray & plainText, bool alwaysTrust,
- QByteArray & cipherText );
+ const TQByteArray & plainText, bool alwaysTrust,
+ TQByteArray & cipherText );
/*! \reimp from Job */
- void showErrorDialog( QWidget * parent, const QString & caption ) const;
+ void showErrorDialog( TQWidget * parent, const TQString & caption ) const;
private slots:
void slotOperationDoneEvent( GpgME::Context * context, const GpgME::Error & e ) {
@@ -81,7 +81,7 @@ namespace Kleo {
private:
void doOperationDoneEvent( const GpgME::Error & e );
GpgME::Error setup( const std::vector<GpgME::Key> &,
- const QByteArray & );
+ const TQByteArray & );
private:
std::pair<GpgME::SigningResult,GpgME::EncryptionResult> mResult;
};
diff --git a/certmanager/lib/backends/qgpgme/qgpgmesignjob.cpp b/certmanager/lib/backends/qgpgme/qgpgmesignjob.cpp
index 84485ad5b..0042d6a38 100644
--- a/certmanager/lib/backends/qgpgme/qgpgmesignjob.cpp
+++ b/certmanager/lib/backends/qgpgme/qgpgmesignjob.cpp
@@ -61,7 +61,7 @@ Kleo::QGpgMESignJob::~QGpgMESignJob() {
}
GpgME::Error Kleo::QGpgMESignJob::setup( const std::vector<GpgME::Key> & signers,
- const QByteArray & plainText ) {
+ const TQByteArray & plainText ) {
assert( !mInData );
assert( !mOutData );
@@ -72,7 +72,7 @@ GpgME::Error Kleo::QGpgMESignJob::setup( const std::vector<GpgME::Key> & signers
}
GpgME::Error Kleo::QGpgMESignJob::start( const std::vector<GpgME::Key> & signers,
- const QByteArray & plainText,
+ const TQByteArray & plainText,
GpgME::Context::SignatureMode mode ) {
if ( const GpgME::Error error = setup( signers, plainText ) ) {
deleteLater();
@@ -90,9 +90,9 @@ GpgME::Error Kleo::QGpgMESignJob::start( const std::vector<GpgME::Key> & signers
}
GpgME::SigningResult Kleo::QGpgMESignJob::exec( const std::vector<GpgME::Key> & signers,
- const QByteArray & plainText,
+ const TQByteArray & plainText,
GpgME::Context::SignatureMode mode,
- QByteArray & signature ) {
+ TQByteArray & signature ) {
if ( const GpgME::Error err = setup( signers, plainText ) )
return mResult = GpgME::SigningResult( 0, err );
mResult = mCtx->sign( *mInData, *mOutData, mode );
@@ -105,7 +105,7 @@ void Kleo::QGpgMESignJob::doOperationDoneEvent( const GpgME::Error & ) {
emit result( mResult = mCtx->signingResult(), mOutDataDataProvider->data() );
}
-void Kleo::QGpgMESignJob::showErrorDialog( QWidget * parent, const QString & caption ) const {
+void Kleo::QGpgMESignJob::showErrorDialog( TQWidget * parent, const TQString & caption ) const {
if ( mResult.error() && !mResult.error().isCanceled() )
Kleo::MessageBox::error( parent, mResult, this, caption );
}
diff --git a/certmanager/lib/backends/qgpgme/qgpgmesignjob.h b/certmanager/lib/backends/qgpgme/qgpgmesignjob.h
index c2589b477..6034b542b 100644
--- a/certmanager/lib/backends/qgpgme/qgpgmesignjob.h
+++ b/certmanager/lib/backends/qgpgme/qgpgmesignjob.h
@@ -39,7 +39,7 @@
#include <gpgmepp/signingresult.h>
-#include <qcstring.h>
+#include <tqcstring.h>
namespace GpgME {
class Error;
@@ -57,17 +57,17 @@ namespace Kleo {
/*! \reimp from SignJob */
GpgME::Error start( const std::vector<GpgME::Key> & signers,
- const QByteArray & plainText,
+ const TQByteArray & plainText,
GpgME::Context::SignatureMode mode );
/*! \reimp from SignJob */
GpgME::SigningResult exec( const std::vector<GpgME::Key> & signers,
- const QByteArray & plainText,
+ const TQByteArray & plainText,
GpgME::Context::SignatureMode mode,
- QByteArray & signature );
+ TQByteArray & signature );
/*! \reimp from Job */
- void showErrorDialog( QWidget * parent, const QString & caption ) const;
+ void showErrorDialog( TQWidget * parent, const TQString & caption ) const;
private slots:
void slotOperationDoneEvent( GpgME::Context * context, const GpgME::Error & e ) {
@@ -76,7 +76,7 @@ namespace Kleo {
private:
void doOperationDoneEvent( const GpgME::Error & e );
- GpgME::Error setup( const std::vector<GpgME::Key> &, const QByteArray & );
+ GpgME::Error setup( const std::vector<GpgME::Key> &, const TQByteArray & );
private:
GpgME::SigningResult mResult;
diff --git a/certmanager/lib/backends/qgpgme/qgpgmeverifydetachedjob.cpp b/certmanager/lib/backends/qgpgme/qgpgmeverifydetachedjob.cpp
index cc1186373..b1022f61b 100644
--- a/certmanager/lib/backends/qgpgme/qgpgmeverifydetachedjob.cpp
+++ b/certmanager/lib/backends/qgpgme/qgpgmeverifydetachedjob.cpp
@@ -55,7 +55,7 @@ Kleo::QGpgMEVerifyDetachedJob::QGpgMEVerifyDetachedJob( GpgME::Context * context
Kleo::QGpgMEVerifyDetachedJob::~QGpgMEVerifyDetachedJob() {
}
-void Kleo::QGpgMEVerifyDetachedJob::setup( const QByteArray & signature, const QByteArray & signedData ) {
+void Kleo::QGpgMEVerifyDetachedJob::setup( const TQByteArray & signature, const TQByteArray & signedData ) {
assert( !mInData );
assert( !mOutData );
@@ -67,8 +67,8 @@ void Kleo::QGpgMEVerifyDetachedJob::setup( const QByteArray & signature, const Q
assert( !mOutData->isNull() );
}
-GpgME::Error Kleo::QGpgMEVerifyDetachedJob::start( const QByteArray & signature,
- const QByteArray & signedData ) {
+GpgME::Error Kleo::QGpgMEVerifyDetachedJob::start( const TQByteArray & signature,
+ const TQByteArray & signedData ) {
setup( signature, signedData );
hookupContextToEventLoopInteractor();
@@ -80,8 +80,8 @@ GpgME::Error Kleo::QGpgMEVerifyDetachedJob::start( const QByteArray & signature,
return err;
}
-GpgME::VerificationResult Kleo::QGpgMEVerifyDetachedJob::exec( const QByteArray & signature,
- const QByteArray & signedData ) {
+GpgME::VerificationResult Kleo::QGpgMEVerifyDetachedJob::exec( const TQByteArray & signature,
+ const TQByteArray & signedData ) {
setup( signature, signedData );
const GpgME::VerificationResult r = mCtx->verifyDetachedSignature( *mInData, *mOutData );
getAuditLog();
diff --git a/certmanager/lib/backends/qgpgme/qgpgmeverifydetachedjob.h b/certmanager/lib/backends/qgpgme/qgpgmeverifydetachedjob.h
index 76141fb80..4e353fe22 100644
--- a/certmanager/lib/backends/qgpgme/qgpgmeverifydetachedjob.h
+++ b/certmanager/lib/backends/qgpgme/qgpgmeverifydetachedjob.h
@@ -37,7 +37,7 @@
#include "qgpgmejob.h"
-#include <qcstring.h>
+#include <tqcstring.h>
namespace GpgME {
class Error;
@@ -53,12 +53,12 @@ namespace Kleo {
~QGpgMEVerifyDetachedJob();
/*! \reimp from VerifyDetachedJob */
- GpgME::Error start( const QByteArray & signature,
- const QByteArray & signedData );
+ GpgME::Error start( const TQByteArray & signature,
+ const TQByteArray & signedData );
/*! \reimp from VerifyDetachedJob */
- GpgME::VerificationResult exec( const QByteArray & signature,
- const QByteArray & signedData );
+ GpgME::VerificationResult exec( const TQByteArray & signature,
+ const TQByteArray & signedData );
private slots:
void slotOperationDoneEvent( GpgME::Context * context, const GpgME::Error & e ) {
@@ -67,7 +67,7 @@ namespace Kleo {
private:
void doOperationDoneEvent( const GpgME::Error & e );
- void setup( const QByteArray &, const QByteArray & );
+ void setup( const TQByteArray &, const TQByteArray & );
};
}
diff --git a/certmanager/lib/backends/qgpgme/qgpgmeverifyopaquejob.cpp b/certmanager/lib/backends/qgpgme/qgpgmeverifyopaquejob.cpp
index 15f075963..92e1917b7 100644
--- a/certmanager/lib/backends/qgpgme/qgpgmeverifyopaquejob.cpp
+++ b/certmanager/lib/backends/qgpgme/qgpgmeverifyopaquejob.cpp
@@ -55,7 +55,7 @@ Kleo::QGpgMEVerifyOpaqueJob::QGpgMEVerifyOpaqueJob( GpgME::Context * context )
Kleo::QGpgMEVerifyOpaqueJob::~QGpgMEVerifyOpaqueJob() {
}
-void Kleo::QGpgMEVerifyOpaqueJob::setup( const QByteArray & signedData ) {
+void Kleo::QGpgMEVerifyOpaqueJob::setup( const TQByteArray & signedData ) {
assert( !mInData );
assert( !mOutData );
@@ -63,7 +63,7 @@ void Kleo::QGpgMEVerifyOpaqueJob::setup( const QByteArray & signedData ) {
createOutData();
}
-GpgME::Error Kleo::QGpgMEVerifyOpaqueJob::start( const QByteArray & signedData ) {
+GpgME::Error Kleo::QGpgMEVerifyOpaqueJob::start( const TQByteArray & signedData ) {
setup( signedData );
hookupContextToEventLoopInteractor();
@@ -75,7 +75,7 @@ GpgME::Error Kleo::QGpgMEVerifyOpaqueJob::start( const QByteArray & signedData )
return err;
}
-GpgME::VerificationResult Kleo::QGpgMEVerifyOpaqueJob::exec( const QByteArray & signedData, QByteArray & plainText ) {
+GpgME::VerificationResult Kleo::QGpgMEVerifyOpaqueJob::exec( const TQByteArray & signedData, TQByteArray & plainText ) {
setup( signedData );
const GpgME::VerificationResult res = mCtx->verifyOpaqueSignature( *mInData, *mOutData );
plainText = mOutDataDataProvider->data();
diff --git a/certmanager/lib/backends/qgpgme/qgpgmeverifyopaquejob.h b/certmanager/lib/backends/qgpgme/qgpgmeverifyopaquejob.h
index 2c167fb1d..869024f2c 100644
--- a/certmanager/lib/backends/qgpgme/qgpgmeverifyopaquejob.h
+++ b/certmanager/lib/backends/qgpgme/qgpgmeverifyopaquejob.h
@@ -37,7 +37,7 @@
#include "qgpgmejob.h"
-#include <qcstring.h>
+#include <tqcstring.h>
namespace GpgME {
class Error;
@@ -53,10 +53,10 @@ namespace Kleo {
~QGpgMEVerifyOpaqueJob();
/*! \reimp from VerifyOpaqueJob */
- GpgME::Error start( const QByteArray & signedData );
+ GpgME::Error start( const TQByteArray & signedData );
/*! \reimp form VerifyOpaqueJob */
- GpgME::VerificationResult exec( const QByteArray & signedData, QByteArray & plainData );
+ GpgME::VerificationResult exec( const TQByteArray & signedData, TQByteArray & plainData );
private slots:
void slotOperationDoneEvent( GpgME::Context * context, const GpgME::Error & e ) {
@@ -65,7 +65,7 @@ namespace Kleo {
private:
void doOperationDoneEvent( const GpgME::Error & e );
- void setup( const QByteArray & );
+ void setup( const TQByteArray & );
};
}
diff --git a/certmanager/lib/cryptplug.cpp b/certmanager/lib/cryptplug.cpp
index f9d1aa632..77a914514 100644
--- a/certmanager/lib/cryptplug.cpp
+++ b/certmanager/lib/cryptplug.cpp
@@ -51,7 +51,7 @@
\see cryptplug.h
*/
-#include <qstring.h>
+#include <tqstring.h>
#include <string>
#include <vector>
@@ -570,10 +570,10 @@ parse_dn (const unsigned char *string)
}
static void
-add_dn_part( QCString& result, struct CryptPlug::DnPair& dnPair )
+add_dn_part( TQCString& result, struct CryptPlug::DnPair& dnPair )
{
/* email hack */
- QCString mappedPart( dnPair.key );
+ TQCString mappedPart( dnPair.key );
for ( unsigned int i = 0 ; i < numOidMaps ; ++i ){
if( !strcasecmp( dnPair.key, oidmap[i].oid ) ) {
mappedPart = oidmap[i].name;
@@ -586,7 +586,7 @@ add_dn_part( QCString& result, struct CryptPlug::DnPair& dnPair )
}
static int
-add_dn_parts( QCString& result, struct CryptPlug::DnPair* dn, const char* part )
+add_dn_parts( TQCString& result, struct CryptPlug::DnPair* dn, const char* part )
{
int any = 0;
@@ -622,8 +622,8 @@ reorder_dn( struct CryptPlug::DnPair *dn,
};
const char** stdpart = attrOrder ? ((const char**)attrOrder) : defaultpart;
int any=0, any2=0, found_X_=0, i;
- QCString result;
- QCString resultUnknowns;
+ TQCString result;
+ TQCString resultUnknowns;
/* find and save the non-standard parts in their original order */
if( dn ){
diff --git a/certmanager/lib/cryptplugfactory.cpp b/certmanager/lib/cryptplugfactory.cpp
index 7000d9a90..949e8db9b 100644
--- a/certmanager/lib/cryptplugfactory.cpp
+++ b/certmanager/lib/cryptplugfactory.cpp
@@ -84,8 +84,8 @@ CryptPlugWrapper * KMail::CryptPlugFactory::active() const {
return 0;
}
-CryptPlugWrapper * KMail::CryptPlugFactory::createForProtocol( const QString & proto ) const {
- QString p = proto.lower();
+CryptPlugWrapper * KMail::CryptPlugFactory::createForProtocol( const TQString & proto ) const {
+ TQString p = proto.lower();
if ( p == "application/pkcs7-signature" || p == "application/x-pkcs7-signature" )
return smime();
if ( p == "application/pgp-signature" || p == "application/x-pgp-signature" )
@@ -101,7 +101,7 @@ CryptPlugWrapper * KMail::CryptPlugFactory::openpgp() const {
return mCryptPlugWrapperList->findForLibName( "openpgp" );
}
-void KMail::CryptPlugFactory::scanForBackends( QStringList * reason ) {
+void KMail::CryptPlugFactory::scanForBackends( TQStringList * reason ) {
Kleo::CryptoBackendFactory::scanForBackends( reason );
updateCryptPlugWrapperList();
}
diff --git a/certmanager/lib/cryptplugfactory.h b/certmanager/lib/cryptplugfactory.h
index a50c3909c..e880f5b55 100644
--- a/certmanager/lib/cryptplugfactory.h
+++ b/certmanager/lib/cryptplugfactory.h
@@ -62,9 +62,9 @@ namespace KMail {
CryptPlugWrapperList & list() const { return *mCryptPlugWrapperList; }
- CryptPlugWrapper * createForProtocol( const QString & proto ) const;
+ CryptPlugWrapper * createForProtocol( const TQString & proto ) const;
- void scanForBackends( QStringList * reason );
+ void scanForBackends( TQStringList * reason );
private:
void updateCryptPlugWrapperList();
diff --git a/certmanager/lib/cryptplugwrapper.cpp b/certmanager/lib/cryptplugwrapper.cpp
index ce883d79f..ec6d6d571 100644
--- a/certmanager/lib/cryptplugwrapper.cpp
+++ b/certmanager/lib/cryptplugwrapper.cpp
@@ -134,16 +134,16 @@ public:
_unknownAttrsHandlingChar = "INFIX";
}
DNBeautifier( KConfig* config,
- const QString& cfgGroup,
- const QString& cfgAttributeOrderEntry,
- const QString& cfgUnknownAttrsEntry,
- const QStringList& fallbackAttrOrder = QStringList(),
+ const TQString& cfgGroup,
+ const TQString& cfgAttributeOrderEntry,
+ const TQString& cfgUnknownAttrsEntry,
+ const TQStringList& fallbackAttrOrder = TQStringList(),
UnknownAttrsHandling fallbackUnknowAttrsHandling = unknownAttrsInfix )
{
_unknownAttrsHandling = unknownAttrsInfix;
_unknownAttrsHandlingChar = "INFIX";
if( config ){
- const QString oldGroup( config->group() );
+ const TQString oldGroup( config->group() );
config->setGroup( cfgGroup ); // e.g. "General"
_attrOrder =
config->readListEntry( cfgAttributeOrderEntry ); // e.g. "DNAttributeOrder"
@@ -169,7 +169,7 @@ public:
}else{
_attrOrderChar = new char*[ _attrOrder.count()+1 ];
int i=0;
- for( QStringList::ConstIterator itOrder = _attrOrder.begin();
+ for( TQStringList::ConstIterator itOrder = _attrOrder.begin();
itOrder != _attrOrder.end();
++itOrder ){
_attrOrderChar[ i ] = (char*)malloc( ((*itOrder).length()+1)*sizeof(char) );
@@ -182,7 +182,7 @@ public:
~DNBeautifier()
{
int i=0;
- for( QStringList::ConstIterator itOrder = _attrOrder.begin();
+ for( TQStringList::ConstIterator itOrder = _attrOrder.begin();
itOrder != _attrOrder.end();
++itOrder ){
free( _attrOrderChar[ i ] );
@@ -191,7 +191,7 @@ public:
delete[] _attrOrderChar;
}
- QStringList attrOrder() const
+ TQStringList attrOrder() const
{
return _attrOrder;
}
@@ -209,24 +209,24 @@ public:
return _unknownAttrsHandlingChar;
}
- QValueList< QPair<QString,QString> > reorder( const QValueList< QPair<QString,QString> > & dn ) const
+ TQValueList< QPair<TQString,TQString> > reorder( const TQValueList< QPair<TQString,TQString> > & dn ) const
{
return reorder( dn, _attrOrder, _unknownAttrsHandling );
}
- static QValueList< QPair<QString,QString> > reorder(
- const QValueList< QPair<QString,QString> > & dn,
- QStringList attrOrder,
+ static TQValueList< QPair<TQString,TQString> > reorder(
+ const TQValueList< QPair<TQString,TQString> > & dn,
+ TQStringList attrOrder,
UnknownAttrsHandling unknownAttrsHandling )
{
if( !attrOrder.isEmpty() ){
- QPtrList< QPair<QString,QString> > unknownEntries;
- QValueList< QPair<QString,QString> > dnNew;
+ TQPtrList< QPair<TQString,TQString> > unknownEntries;
+ TQValueList< QPair<TQString,TQString> > dnNew;
- QPair<QString,QString>* unknownEntry;
- QStringList::ConstIterator itOrder;
- QValueList< QPair<QString,QString> >::ConstIterator itDN;
+ QPair<TQString,TQString>* unknownEntry;
+ TQStringList::ConstIterator itOrder;
+ TQValueList< QPair<TQString,TQString> >::ConstIterator itDN;
bool bFound;
if( unknownAttrsHandling != unknownAttrsHide ){
@@ -266,7 +266,7 @@ public:
for( itDN = dn.begin(); itDN != dn.end(); ++itDN ){
if( (*itOrder) == (*itDN).first ){
dnNew << *itDN;
- //kdDebug(5150) << QString((*itDN).first) <<" = " << QString((*itDN).second) << endl;;
+ //kdDebug(5150) << TQString((*itDN).first) <<" = " << TQString((*itDN).second) << endl;;
}
}
}
@@ -286,10 +286,10 @@ public:
}
private:
- QStringList _attrOrder;
+ TQStringList _attrOrder;
char** _attrOrderChar;
UnknownAttrsHandling _unknownAttrsHandling;
- QCString _unknownAttrsHandlingChar;
+ TQCString _unknownAttrsHandlingChar;
};
@@ -405,19 +405,19 @@ CryptPlugWrapper::Config::~Config() {
/* Some multi purpose functions ******************************************/
-QString CryptPlugWrapper::errorIdToText( int errId, bool & isPassphraseError ) {
+TQString CryptPlugWrapper::errorIdToText( int errId, bool & isPassphraseError ) {
const GpgME::Error err( errId );
isPassphraseError = err.isCanceled()
|| gpgme_err_code( errId ) == GPG_ERR_NO_SECKEY ; // FIXME: more?
- return QString::fromLocal8Bit( err.asString() );
+ return TQString::fromLocal8Bit( err.asString() );
}
/* some special functions ************************************************/
-CryptPlugWrapper::CryptPlugWrapper( const QString& name,
- const QString& libName,
- const QString& update,
+CryptPlugWrapper::CryptPlugWrapper( const TQString& name,
+ const TQString& libName,
+ const TQString& update,
bool active )
: Kleo::CryptoBackend::Protocol(),
_name( name ),
@@ -453,7 +453,7 @@ bool CryptPlugWrapper::active() const
-bool CryptPlugWrapper::setLibName( const QString& libName )
+bool CryptPlugWrapper::setLibName( const TQString& libName )
{
bool bOk = ! _cp; // Changing the lib name is only allowed
if( bOk ) // when either no initialization took
@@ -461,27 +461,27 @@ bool CryptPlugWrapper::setLibName( const QString& libName )
return bOk; // called afterwards.
}
-QString CryptPlugWrapper::libName() const
+TQString CryptPlugWrapper::libName() const
{
return _libName;
}
-QString CryptPlugWrapper::protocol() const
+TQString CryptPlugWrapper::protocol() const
{
if ( _libName.contains( "smime" ) )
return "SMIME";
if ( _libName.contains( "openpgp" ) )
return "OpenPGP";
- return QString::null;
+ return TQString::null;
}
-void CryptPlugWrapper::setDisplayName( const QString& name )
+void CryptPlugWrapper::setDisplayName( const TQString& name )
{
_name = name;
}
-QString CryptPlugWrapper::displayName() const
+TQString CryptPlugWrapper::displayName() const
{
if ( !_name.isEmpty() )
return _name;
@@ -492,7 +492,7 @@ QString CryptPlugWrapper::displayName() const
return i18n("(Unknown Protocol)");
}
-bool CryptPlugWrapper::initialize( InitStatus* initStatus, QString* errorMsg )
+bool CryptPlugWrapper::initialize( InitStatus* initStatus, TQString* errorMsg )
{
if ( _cp )
return true;
@@ -547,7 +547,7 @@ void CryptPlugWrapper::deinitialize()
}
-CryptPlugWrapper::InitStatus CryptPlugWrapper::initStatus( QString* errorMsg ) const
+CryptPlugWrapper::InitStatus CryptPlugWrapper::initStatus( TQString* errorMsg ) const
{
if( errorMsg )
*errorMsg = _lastError;
@@ -780,7 +780,7 @@ Kleo::ExportJob * CryptPlugWrapper::publicKeyExportJob( bool armor ) const {
return new Kleo::QGpgMEExportJob( context );
}
-Kleo::ExportJob * CryptPlugWrapper::secretKeyExportJob( bool armor, const QString& charset ) const {
+Kleo::ExportJob * CryptPlugWrapper::secretKeyExportJob( bool armor, const TQString& charset ) const {
if ( !_cp || _cp->mProtocol != GpgME::Context::CMS ) // fixme: add support for gpg, too
return 0;
diff --git a/certmanager/lib/cryptplugwrapper.h b/certmanager/lib/cryptplugwrapper.h
index 91cec75df..fca08b650 100644
--- a/certmanager/lib/cryptplugwrapper.h
+++ b/certmanager/lib/cryptplugwrapper.h
@@ -48,12 +48,12 @@
*/
#include "kleo/cryptobackend.h"
-#include <qdatetime.h>
+#include <tqdatetime.h>
-#include <qvaluelist.h>
-#include <qpair.h>
-#include <qstringlist.h>
-#include <qstring.h>
+#include <tqvaluelist.h>
+#include <tqpair.h>
+#include <tqstringlist.h>
+#include <tqstring.h>
#include <kdepimmacros.h>
@@ -452,7 +452,7 @@ private:
*/
class KDE_EXPORT CryptPlugWrapper : public Kleo::CryptoBackend::Protocol {
public:
- static QString errorIdToText( int errId, bool & isPassphraseError );
+ static TQString errorIdToText( int errId, bool & isPassphraseError );
/*! \ingroup groupGeneral
@@ -545,9 +545,9 @@ public:
\sa ~CryptPlugWrapper, setActive, active, initialize, deinitialize
\sa initStatus
*/
- CryptPlugWrapper( const QString& name=QString::null,
- const QString& libName=QString::null,
- const QString& update=QString::null,
+ CryptPlugWrapper( const TQString& name=TQString::null,
+ const TQString& libName=TQString::null,
+ const TQString& update=TQString::null,
bool active = false );
/*! \ingroup groupAdmin
@@ -561,9 +561,9 @@ public:
*/
~CryptPlugWrapper();
- QString protocol() const;
+ TQString protocol() const;
- QString name() const {
+ TQString name() const {
return protocol();
}
@@ -628,7 +628,7 @@ public:
\sa libName, CryptPlugWrapper(), ~CryptPlugWrapper
\sa deinitialize, initialize, initStatus
*/
- bool setLibName( const QString& libName );
+ bool setLibName( const TQString& libName );
/*! \ingroup groupAdmin
\brief Returns the CRYPTPLUG library name.
@@ -638,21 +638,21 @@ public:
\sa setLibName
*/
- QString libName() const;
+ TQString libName() const;
/*! \ingroup groupAdmin
\brief Specifies the external name that is visible in lists,
messages, etc.
*/
- void setDisplayName( const QString& name );
+ void setDisplayName( const TQString& name );
/*! \ingroup groupAdmin
\brief Returns the external name.
\return the external name used for display purposes
*/
- QString displayName() const;
+ TQString displayName() const;
private:
/*! \ingroup groupGeneral
@@ -672,7 +672,7 @@ private:
\sa initStatus, deinitialize, CryptPlugWrapper(), ~CryptPlugWrapper
\sa setActive, active
*/
- bool initialize( InitStatus* initStatus, QString* errorMsg );
+ bool initialize( InitStatus* initStatus, TQString* errorMsg );
public:
/*! \ingroup groupGeneral
@@ -701,7 +701,7 @@ public:
\sa initialize, deinitialize, CryptPlugWrapper(), ~CryptPlugWrapper
\sa setActive, active
*/
- InitStatus initStatus( QString* errorMsg ) const;
+ InitStatus initStatus( TQString* errorMsg ) const;
/*! \ingroup groupGeneral
@@ -714,7 +714,7 @@ public:
however.
\note In case this function cannot be executed the system's error
- message may be retrieved by calling initStatus( QString* ).
+ message may be retrieved by calling initStatus( TQString* ).
\return whether the relative feature is implemented or not
*/
@@ -805,7 +805,7 @@ public:
Kleo::ImportJob * importJob() const;
Kleo::ExportJob * publicKeyExportJob( bool armor=false ) const;
- Kleo::ExportJob * secretKeyExportJob( bool armor=false, const QString& charset = QString::null ) const;
+ Kleo::ExportJob * secretKeyExportJob( bool armor=false, const TQString& charset = TQString::null ) const;
Kleo::DownloadJob * downloadJob( bool armor=false ) const;
Kleo::DeleteJob * deleteJob() const;
@@ -813,19 +813,19 @@ public:
Kleo::DecryptVerifyJob * decryptVerifyJob( bool textmode=false ) const;
Kleo::RefreshKeysJob * refreshKeysJob() const;
- Kleo::SpecialJob * specialJob( const char *, const QMap<QString,QVariant> & ) const { return 0; }
+ Kleo::SpecialJob * specialJob( const char *, const TQMap<TQString,TQVariant> & ) const { return 0; }
GpgME::ImportResult importCertificate( const char* data, size_t length );
CryptPlug * cryptPlug() const { return _cp; }
private:
- QString _name;
- QString _libName;
- QString _updateURL;
+ TQString _name;
+ TQString _libName;
+ TQString _updateURL;
bool _active;
InitStatus _initStatus;
- QString _lastError;
+ TQString _lastError;
CryptPlug* _cp;
// local parameters without representation in cryptplug.h
bool mAlwaysEncryptToSelf;
diff --git a/certmanager/lib/cryptplugwrapperlist.cpp b/certmanager/lib/cryptplugwrapperlist.cpp
index 3ff38ddd8..43f88670d 100644
--- a/certmanager/lib/cryptplugwrapperlist.cpp
+++ b/certmanager/lib/cryptplugwrapperlist.cpp
@@ -25,9 +25,9 @@
#include "cryptplugwrapperlist.h"
-CryptPlugWrapper * CryptPlugWrapperList::findForLibName( const QString & libName ) const
+CryptPlugWrapper * CryptPlugWrapperList::findForLibName( const TQString & libName ) const
{
- for ( QPtrListIterator<CryptPlugWrapper> it( *this ) ; it.current() ; ++it )
+ for ( TQPtrListIterator<CryptPlugWrapper> it( *this ) ; it.current() ; ++it )
if ( (*it)->libName().find( libName, 0, false ) >= 0 )
return *it;
return 0;
diff --git a/certmanager/lib/cryptplugwrapperlist.h b/certmanager/lib/cryptplugwrapperlist.h
index 3fab5799c..30d4fcd95 100644
--- a/certmanager/lib/cryptplugwrapperlist.h
+++ b/certmanager/lib/cryptplugwrapperlist.h
@@ -24,14 +24,14 @@
#include "cryptplugwrapper.h"
-#include <qptrlist.h>
+#include <tqptrlist.h>
-class CryptPlugWrapperList : public QPtrList<CryptPlugWrapper>
+class CryptPlugWrapperList : public TQPtrList<CryptPlugWrapper>
{
public:
- CryptPlugWrapper * findForLibName( const QString & libName ) const;
+ CryptPlugWrapper * findForLibName( const TQString & libName ) const;
};
-typedef QPtrListIterator<CryptPlugWrapper> CryptPlugWrapperListIterator;
+typedef TQPtrListIterator<CryptPlugWrapper> CryptPlugWrapperListIterator;
#endif
diff --git a/certmanager/lib/kleo/cryptobackend.h b/certmanager/lib/kleo/cryptobackend.h
index a94e1ae3a..a004fc899 100644
--- a/certmanager/lib/kleo/cryptobackend.h
+++ b/certmanager/lib/kleo/cryptobackend.h
@@ -33,7 +33,7 @@
#ifndef __KLEO_CRYPTOBACKEND_H__
#define __KLEO_CRYPTOBACKEND_H__
-#include <qstring.h>
+#include <tqstring.h>
namespace Kleo {
class CryptoConfig;
@@ -69,12 +69,12 @@ namespace Kleo {
virtual ~CryptoBackend() {}
- virtual QString name() const = 0;
- virtual QString displayName() const = 0;
+ virtual TQString name() const = 0;
+ virtual TQString displayName() const = 0;
- virtual bool checkForOpenPGP( QString * reason=0 ) const = 0;
- virtual bool checkForSMIME( QString * reason=0 ) const = 0;
- virtual bool checkForProtocol( const char * name, QString * reason=0 ) const = 0;
+ virtual bool checkForOpenPGP( TQString * reason=0 ) const = 0;
+ virtual bool checkForSMIME( TQString * reason=0 ) const = 0;
+ virtual bool checkForProtocol( const char * name, TQString * reason=0 ) const = 0;
virtual bool supportsOpenPGP() const = 0;
virtual bool supportsSMIME() const = 0;
@@ -93,9 +93,9 @@ namespace Kleo {
public:
virtual ~Protocol() {}
- virtual QString name() const = 0;
+ virtual TQString name() const = 0;
- virtual QString displayName() const = 0;
+ virtual TQString displayName() const = 0;
virtual KeyListJob * keyListJob( bool remote=false, bool includeSigs=false, bool validate=false ) const = 0;
virtual EncryptJob * encryptJob( bool armor=false, bool textmode=false ) const = 0;
@@ -107,14 +107,14 @@ namespace Kleo {
virtual ImportJob * importJob() const = 0;
virtual ExportJob * publicKeyExportJob( bool armor=false ) const = 0;
// @param charset the encoding of the passphrase in the exported file
- virtual ExportJob * secretKeyExportJob( bool armor=false, const QString& charset = QString::null ) const = 0;
+ virtual ExportJob * secretKeyExportJob( bool armor=false, const TQString& charset = TQString::null ) const = 0;
virtual DownloadJob * downloadJob( bool armor=false ) const = 0;
virtual DeleteJob * deleteJob() const = 0;
virtual SignEncryptJob * signEncryptJob( bool armor=false, bool textMode=false ) const = 0;
virtual DecryptVerifyJob * decryptVerifyJob( bool textmode=false ) const = 0;
virtual RefreshKeysJob * refreshKeysJob() const = 0;
- virtual SpecialJob * specialJob( const char * type, const QMap<QString,QVariant> & args ) const = 0;
+ virtual SpecialJob * specialJob( const char * type, const TQMap<TQString,TQVariant> & args ) const = 0;
};
}
diff --git a/certmanager/lib/kleo/cryptobackendfactory.cpp b/certmanager/lib/kleo/cryptobackendfactory.cpp
index c56a7096f..88ba036de 100644
--- a/certmanager/lib/kleo/cryptobackendfactory.cpp
+++ b/certmanager/lib/kleo/cryptobackendfactory.cpp
@@ -66,7 +66,7 @@ static const char * availableProtocols[] = {
static const unsigned int numAvailableProtocols = sizeof availableProtocols / sizeof *availableProtocols;
Kleo::CryptoBackendFactory::CryptoBackendFactory()
- : QObject( qApp, "CryptoBackendFactory::instance()" ),
+ : TQObject( qApp, "CryptoBackendFactory::instance()" ),
mConfigObject( 0 ),
mAvailableProtocols( availableProtocols, availableProtocols + numAvailableProtocols )
{
@@ -146,11 +146,11 @@ bool Kleo::CryptoBackendFactory::hasBackends() const {
return !mBackendList.empty();
}
-void Kleo::CryptoBackendFactory::scanForBackends( QStringList * reasons ) {
+void Kleo::CryptoBackendFactory::scanForBackends( TQStringList * reasons ) {
for ( std::vector<CryptoBackend*>::const_iterator it = mBackendList.begin() ; it != mBackendList.end() ; ++it ) {
assert( *it );
for ( int i = 0 ; const char * protocol = (*it)->enumerateProtocols( i ) ; ++i ) {
- QString reason;
+ TQString reason;
if ( (*it)->supportsProtocol( protocol ) && !(*it)->checkForProtocol( protocol, &reason ) ) {
if ( reasons ) {
reasons->push_back( i18n("While scanning for %1 support in backend %2:")
@@ -166,7 +166,7 @@ const Kleo::CryptoBackend * Kleo::CryptoBackendFactory::backend( unsigned int id
return ( idx < mBackendList.size() ) ? mBackendList[idx] : 0 ;
}
-const Kleo::CryptoBackend * Kleo::CryptoBackendFactory::backendByName( const QString& name ) const {
+const Kleo::CryptoBackend * Kleo::CryptoBackendFactory::backendByName( const TQString& name ) const {
for ( std::vector<CryptoBackend*>::const_iterator it = mBackendList.begin() ; it != mBackendList.end() ; ++it ) {
if ( (*it)->name() == name )
return *it;
@@ -174,7 +174,7 @@ const Kleo::CryptoBackend * Kleo::CryptoBackendFactory::backendByName( const QSt
return 0;
}
-Kleo::BackendConfigWidget * Kleo::CryptoBackendFactory::configWidget( QWidget * parent, const char * name ) const {
+Kleo::BackendConfigWidget * Kleo::CryptoBackendFactory::configWidget( TQWidget * parent, const char * name ) const {
return new Kleo::BackendConfigWidget( mSelf, parent, name );
}
@@ -194,7 +194,7 @@ void Kleo::CryptoBackendFactory::setOpenPGPBackend( const CryptoBackend* backend
}
void Kleo::CryptoBackendFactory::setProtocolBackend( const char * protocol, const CryptoBackend * backend ) {
- const QString name = backend ? backend->name() : QString::null ;
+ const TQString name = backend ? backend->name() : TQString::null ;
KConfigGroup group( configObject(), "Backends" );
group.writeEntry( protocol, name );
configObject()->sync();
@@ -220,7 +220,7 @@ void Kleo::CryptoBackendFactory::readConfig() {
mBackends.clear();
const KConfigGroup group( configObject(), "Backends" );
for ( ProtocolSet::const_iterator it = mAvailableProtocols.begin(), end = mAvailableProtocols.end() ; it != end ; ++it ) {
- const QString backend = group.readEntry( *it, defaultBackend( *it ) );
+ const TQString backend = group.readEntry( *it, defaultBackend( *it ) );
mBackends[*it] = backendByName( backend );
}
}
diff --git a/certmanager/lib/kleo/cryptobackendfactory.h b/certmanager/lib/kleo/cryptobackendfactory.h
index 7a54e9fd1..09136f7e3 100644
--- a/certmanager/lib/kleo/cryptobackendfactory.h
+++ b/certmanager/lib/kleo/cryptobackendfactory.h
@@ -33,7 +33,7 @@
#ifndef __KLEO_CRYPTOBACKENDFACTORY_H__
#define __KLEO_CRYPTOBACKENDFACTORY_H__
-#include <qobject.h>
+#include <tqobject.h>
#include "cryptobackend.h"
#include <kdepimmacros.h>
@@ -56,7 +56,7 @@ namespace Kleo {
}
};
- class KDE_EXPORT CryptoBackendFactory : public QObject {
+ class KDE_EXPORT CryptoBackendFactory : public TQObject {
Q_OBJECT
protected:
CryptoBackendFactory();
@@ -73,7 +73,7 @@ namespace Kleo {
bool hasBackends() const;
- Kleo::BackendConfigWidget * configWidget( QWidget * parent=0, const char * name=0 ) const;
+ Kleo::BackendConfigWidget * configWidget( TQWidget * parent=0, const char * name=0 ) const;
KConfig* configObject() const;
@@ -88,7 +88,7 @@ namespace Kleo {
void setOpenPGPBackend( const CryptoBackend* backend );
void setProtocolBackend( const char * name, const CryptoBackend * backend );
- void scanForBackends( QStringList * reasons=0 );
+ void scanForBackends( TQStringList * reasons=0 );
const char * enumerateProtocols( int i ) const;
@@ -103,7 +103,7 @@ namespace Kleo {
ProtocolSet mAvailableProtocols;
private:
- const CryptoBackend * backendByName( const QString& name ) const;
+ const CryptoBackend * backendByName( const TQString& name ) const;
void readConfig();
CryptoBackendFactory( const CryptoBackendFactory & );
void operator=( const CryptoBackendFactory & );
diff --git a/certmanager/lib/kleo/cryptoconfig.h b/certmanager/lib/kleo/cryptoconfig.h
index da16ca5b5..ec0a0ed5d 100644
--- a/certmanager/lib/kleo/cryptoconfig.h
+++ b/certmanager/lib/kleo/cryptoconfig.h
@@ -91,12 +91,12 @@ namespace Kleo {
/**
* Return the internal name of this entry
*/
- virtual QString name() const = 0;
+ virtual TQString name() const = 0;
/**
* @return user-visible description of this entry
*/
- virtual QString description() const = 0;
+ virtual TQString description() const = 0;
/**
* @return true if the argument is optional
@@ -142,7 +142,7 @@ namespace Kleo {
* Return value as a string (available for all argtypes)
* The returned string can be empty (explicitely set to empty) or null (not set).
*/
- virtual QString stringValue() const = 0;
+ virtual TQString stringValue() const = 0;
/**
* Return value as a signed int
@@ -167,17 +167,17 @@ namespace Kleo {
/**
* Return value as a list of strings (mostly meaningful for String, Path and URL argtypes, if isList())
*/
- virtual QStringList stringValueList() const = 0;
+ virtual TQStringList stringValueList() const = 0;
/**
* Return value as a list of signed ints
*/
- virtual QValueList<int> intValueList() const = 0;
+ virtual TQValueList<int> intValueList() const = 0;
/**
* Return value as a list of unsigned ints
*/
- virtual QValueList<unsigned int> uintValueList() const = 0;
+ virtual TQValueList<unsigned int> uintValueList() const = 0;
/**
* Return value as a list of URLs (only meaningful for Path and URL argtypes, if isList())
@@ -198,7 +198,7 @@ namespace Kleo {
/**
* Set string value (allowed for all argtypes)
*/
- virtual void setStringValue( const QString& ) = 0;
+ virtual void setStringValue( const TQString& ) = 0;
/**
* Set a new signed int value
@@ -223,17 +223,17 @@ namespace Kleo {
/**
* Set a new string-list value (only allowed for String, Path and URL argtypes, if isList())
*/
- virtual void setStringValueList( const QStringList& ) = 0;
+ virtual void setStringValueList( const TQStringList& ) = 0;
/**
* Set a new list of signed int values
*/
- virtual void setIntValueList( const QValueList<int>& ) = 0;
+ virtual void setIntValueList( const TQValueList<int>& ) = 0;
/**
* Set a new list of unsigned int values
*/
- virtual void setUIntValueList( const QValueList<unsigned int>& ) = 0;
+ virtual void setUIntValueList( const TQValueList<unsigned int>& ) = 0;
/**
* Set value as a URL list (only meaningful for Path (if all URLs are local) and URL argtypes, if isList())
@@ -257,17 +257,17 @@ namespace Kleo {
/**
* Return the internal name of this group
*/
- virtual QString name() const = 0;
+ virtual TQString name() const = 0;
/**
* Return the name of the icon for this group
*/
- virtual QString iconName() const = 0;
+ virtual TQString iconName() const = 0;
/**
* @return user-visible description of this group
*/
- virtual QString description() const = 0;
+ virtual TQString description() const = 0;
/**
* User level
@@ -279,14 +279,14 @@ namespace Kleo {
*
* @return list of group entry names.
**/
- virtual QStringList entryList() const = 0;
+ virtual TQStringList entryList() const = 0;
/**
* @return the configuration object for a given entry in this group
* The object is owned by CryptoConfigGroup, don't delete it.
* Groups cannot be nested, so all entries returned here are pure entries, no groups.
*/
- virtual CryptoConfigEntry* entry( const QString& name ) const = 0;
+ virtual CryptoConfigEntry* entry( const TQString& name ) const = 0;
};
/**
@@ -300,17 +300,17 @@ namespace Kleo {
/**
* Return the internal name of this component
*/
- virtual QString name() const = 0;
+ virtual TQString name() const = 0;
/**
* Return the name of the icon for this component
*/
- virtual QString iconName() const = 0;
+ virtual TQString iconName() const = 0;
/**
* Return user-visible description of this component
*/
- virtual QString description() const = 0;
+ virtual TQString description() const = 0;
/**
* Returns the list of groups that are known about.
@@ -318,13 +318,13 @@ namespace Kleo {
* @return list of group names. One of them can be "<nogroup>", which is the group where all
* "toplevel" options (belonging to no group) are.
*/
- virtual QStringList groupList() const = 0;
+ virtual TQStringList groupList() const = 0;
/**
* @return the configuration object for a given group
* The object is owned by CryptoConfigComponent, don't delete it.
*/
- virtual CryptoConfigGroup* group( const QString& name ) const = 0;
+ virtual CryptoConfigGroup* group( const TQString& name ) const = 0;
};
@@ -341,13 +341,13 @@ namespace Kleo {
* Use @ref component() to retrieve more information about each one.
* @return list of component names.
**/
- virtual QStringList componentList() const = 0;
+ virtual TQStringList componentList() const = 0;
/**
* @return the configuration object for a given component
* The object is owned by CryptoConfig, don't delete it.
*/
- virtual CryptoConfigComponent* component( const QString& name ) const = 0;
+ virtual CryptoConfigComponent* component( const TQString& name ) const = 0;
/**
* Convenience method to get hold of a single configuration entry when
@@ -357,7 +357,7 @@ namespace Kleo {
* @return the configuration object for a single configuration entry, 0 if not found.
* The object is owned by CryptoConfig, don't delete it.
*/
- CryptoConfigEntry* entry( const QString& componentName, const QString& groupName, const QString& entryName ) const {
+ CryptoConfigEntry* entry( const TQString& componentName, const TQString& groupName, const TQString& entryName ) const {
const Kleo::CryptoConfigComponent* comp = component( componentName );
const Kleo::CryptoConfigGroup* group = comp ? comp->group( groupName ) : 0;
return group ? group->entry( entryName ) : 0;
diff --git a/certmanager/lib/kleo/decryptjob.h b/certmanager/lib/kleo/decryptjob.h
index e882152a0..8351a1ff6 100644
--- a/certmanager/lib/kleo/decryptjob.h
+++ b/certmanager/lib/kleo/decryptjob.h
@@ -35,7 +35,7 @@
#include "job.h"
-#include <qcstring.h>
+#include <tqcstring.h>
namespace GpgME {
class Error;
@@ -54,15 +54,15 @@ namespace Kleo {
signals to suitable slots and then start the decryption with a
call to start(). This call might fail, in which case the
DecryptJob instance will have scheduled it's own destruction with
- a call to QObject::deleteLater().
+ a call to TQObject::deleteLater().
After result() is emitted, the DecryptJob will schedule it's own
- destruction by calling QObject::deleteLater().
+ destruction by calling TQObject::deleteLater().
*/
class DecryptJob : public Job {
Q_OBJECT
protected:
- DecryptJob( QObject * parent, const char * name );
+ DecryptJob( TQObject * parent, const char * name );
public:
~DecryptJob();
@@ -70,13 +70,13 @@ namespace Kleo {
Starts the decryption operation. \a cipherText is the data to
decrypt.
*/
- virtual GpgME::Error start( const QByteArray & cipherText ) = 0;
+ virtual GpgME::Error start( const TQByteArray & cipherText ) = 0;
- virtual GpgME::DecryptionResult exec( const QByteArray & cipherText,
- QByteArray & plainText ) = 0;
+ virtual GpgME::DecryptionResult exec( const TQByteArray & cipherText,
+ TQByteArray & plainText ) = 0;
signals:
- void result( const GpgME::DecryptionResult & result, const QByteArray & plainText );
+ void result( const GpgME::DecryptionResult & result, const TQByteArray & plainText );
};
}
diff --git a/certmanager/lib/kleo/decryptverifyjob.h b/certmanager/lib/kleo/decryptverifyjob.h
index f7cdb81a1..e220670c6 100644
--- a/certmanager/lib/kleo/decryptverifyjob.h
+++ b/certmanager/lib/kleo/decryptverifyjob.h
@@ -35,7 +35,7 @@
#include "job.h"
-#include <qcstring.h>
+#include <tqcstring.h>
#include <utility>
@@ -57,15 +57,15 @@ namespace Kleo {
signals to suitable slots and then start the operation with a
call to start(). This call might fail, in which case the
DecryptVerifyJob instance will have scheduled it's own destruction with
- a call to QObject::deleteLater().
+ a call to TQObject::deleteLater().
After result() is emitted, the DecryptVerifyJob will schedule it's own
- destruction by calling QObject::deleteLater().
+ destruction by calling TQObject::deleteLater().
*/
class DecryptVerifyJob : public Job {
Q_OBJECT
protected:
- DecryptVerifyJob( QObject * parent, const char * name );
+ DecryptVerifyJob( TQObject * parent, const char * name );
public:
~DecryptVerifyJob();
@@ -73,16 +73,16 @@ namespace Kleo {
Starts the combined decryption and verification operation.
\a cipherText is the data to decrypt and later verify.
*/
- virtual GpgME::Error start( const QByteArray & cipherText ) = 0;
+ virtual GpgME::Error start( const TQByteArray & cipherText ) = 0;
/** Synchronous equivalent of start() */
virtual std::pair<GpgME::DecryptionResult,GpgME::VerificationResult>
- exec( const QByteArray & cipherText, QByteArray & plainText ) = 0;
+ exec( const TQByteArray & cipherText, TQByteArray & plainText ) = 0;
signals:
void result( const GpgME::DecryptionResult & decryptionresult,
const GpgME::VerificationResult & verificationresult,
- const QByteArray & plainText );
+ const TQByteArray & plainText );
};
}
diff --git a/certmanager/lib/kleo/deletejob.h b/certmanager/lib/kleo/deletejob.h
index fd70ec513..f5d5f111b 100644
--- a/certmanager/lib/kleo/deletejob.h
+++ b/certmanager/lib/kleo/deletejob.h
@@ -50,15 +50,15 @@ namespace Kleo {
signals to suitable slots and then start the delete with a call
to start(). This call might fail, in which case the DeleteJob
instance will have scheduled it's own destruction with a call to
- QObject::deleteLater().
+ TQObject::deleteLater().
After result() is emitted, the DeleteJob will schedule it's own
- destruction by calling QObject::deleteLater().
+ destruction by calling TQObject::deleteLater().
*/
class DeleteJob : public Job {
Q_OBJECT
protected:
- DeleteJob( QObject * parent, const char * name );
+ DeleteJob( TQObject * parent, const char * name );
public:
~DeleteJob();
diff --git a/certmanager/lib/kleo/dn.cpp b/certmanager/lib/kleo/dn.cpp
index 9ba2209fb..61693aff2 100644
--- a/certmanager/lib/kleo/dn.cpp
+++ b/certmanager/lib/kleo/dn.cpp
@@ -43,8 +43,8 @@
#include <kconfig.h>
#include <klocale.h>
-#include <qstringlist.h>
-#include <qvaluevector.h>
+#include <tqstringlist.h>
+#include <tqvaluevector.h>
#include <iostream>
#include <iterator>
@@ -230,9 +230,9 @@ parse_dn_part (DnPair *array, const unsigned char *string)
static Kleo::DN::Attribute::List
parse_dn( const unsigned char * string ) {
if ( !string )
- return QValueVector<Kleo::DN::Attribute>();
+ return TQValueVector<Kleo::DN::Attribute>();
- QValueVector<Kleo::DN::Attribute> result;
+ TQValueVector<Kleo::DN::Attribute> result;
while (*string)
{
while (*string == ' ')
@@ -245,8 +245,8 @@ parse_dn( const unsigned char * string ) {
if (!string)
goto failure;
if ( pair.key && pair.value )
- result.push_back( Kleo::DN::Attribute( QString::fromUtf8( pair.key ),
- QString::fromUtf8( pair.value ) ) );
+ result.push_back( Kleo::DN::Attribute( TQString::fromUtf8( pair.key ),
+ TQString::fromUtf8( pair.value ) ) );
free( pair.key );
free( pair.value );
@@ -260,18 +260,18 @@ parse_dn( const unsigned char * string ) {
return result;
failure:
- return QValueVector<Kleo::DN::Attribute>();
+ return TQValueVector<Kleo::DN::Attribute>();
}
-static QValueVector<Kleo::DN::Attribute>
-parse_dn( const QString & dn ) {
+static TQValueVector<Kleo::DN::Attribute>
+parse_dn( const TQString & dn ) {
return parse_dn( (const unsigned char*)dn.utf8().data() );
}
-static QString dn_escape( const QString & s ) {
- QString result;
+static TQString dn_escape( const TQString & s ) {
+ TQString result;
for ( unsigned int i = 0, end = s.length() ; i != end ; ++i ) {
- const QChar ch = s[i];
+ const TQChar ch = s[i];
switch ( ch.unicode() ) {
case ',':
case '+':
@@ -290,9 +290,9 @@ static QString dn_escape( const QString & s ) {
}
static QString
-serialise( const QValueVector<Kleo::DN::Attribute> & dn ) {
- QStringList result;
- for ( QValueVector<Kleo::DN::Attribute>::const_iterator it = dn.begin() ; it != dn.end() ; ++it )
+serialise( const TQValueVector<Kleo::DN::Attribute> & dn ) {
+ TQStringList result;
+ for ( TQValueVector<Kleo::DN::Attribute>::const_iterator it = dn.begin() ; it != dn.end() ; ++it )
if ( !(*it).name().isEmpty() && !(*it).value().isEmpty() )
result.push_back( (*it).name().stripWhiteSpace() + '=' + dn_escape( (*it).value().stripWhiteSpace() ) );
return result.join( "," );
@@ -300,7 +300,7 @@ serialise( const QValueVector<Kleo::DN::Attribute> & dn ) {
static Kleo::DN::Attribute::List
reorder_dn( const Kleo::DN::Attribute::List & dn ) {
- const QStringList & attrOrder = Kleo::DNAttributeMapper::instance()->attributeOrder();
+ const TQStringList & attrOrder = Kleo::DNAttributeMapper::instance()->attributeOrder();
Kleo::DN::Attribute::List unknownEntries;
Kleo::DN::Attribute::List result;
@@ -313,7 +313,7 @@ reorder_dn( const Kleo::DN::Attribute::List & dn ) {
unknownEntries.push_back( *it );
// process the known attrs in the desired order
- for ( QStringList::const_iterator oit = attrOrder.begin() ; oit != attrOrder.end() ; ++oit )
+ for ( TQStringList::const_iterator oit = attrOrder.begin() ; oit != attrOrder.end() ; ++oit )
if ( *oit == "_X_" ) {
// insert the unknown attrs
std::copy( unknownEntries.begin(), unknownEntries.end(),
@@ -339,7 +339,7 @@ Kleo::DN::DN() {
d->ref();
}
-Kleo::DN::DN( const QString & dn ) {
+Kleo::DN::DN( const TQString & dn ) {
d = new Private();
d->ref();
d->attributes = parse_dn( dn );
@@ -376,20 +376,20 @@ const Kleo::DN & Kleo::DN::operator=( const DN & that ) {
return *this;
}
-QString Kleo::DN::prettyDN() const {
+TQString Kleo::DN::prettyDN() const {
if ( !d )
- return QString::null;
+ return TQString::null;
if ( d->reorderedAttributes.empty() )
d->reorderedAttributes = reorder_dn( d->attributes );
return serialise( d->reorderedAttributes );
}
-QString Kleo::DN::dn() const {
- return d ? serialise( d->attributes ) : QString::null ;
+TQString Kleo::DN::dn() const {
+ return d ? serialise( d->attributes ) : TQString::null ;
}
// static
-QString Kleo::DN::escape( const QString & value ) {
+TQString Kleo::DN::escape( const TQString & value ) {
return dn_escape( value );
}
@@ -411,18 +411,18 @@ void Kleo::DN::append( const Attribute & attr ) {
d->reorderedAttributes.clear();
}
-QString Kleo::DN::operator[]( const QString & attr ) const {
+TQString Kleo::DN::operator[]( const TQString & attr ) const {
if ( !d )
- return QString::null;
- const QString attrUpper = attr.upper();
- for ( QValueVector<Attribute>::const_iterator it = d->attributes.begin() ;
+ return TQString::null;
+ const TQString attrUpper = attr.upper();
+ for ( TQValueVector<Attribute>::const_iterator it = d->attributes.begin() ;
it != d->attributes.end() ; ++it )
if ( (*it).name() == attrUpper )
return (*it).value();
- return QString::null;
+ return TQString::null;
}
-static QValueVector<Kleo::DN::Attribute> empty;
+static TQValueVector<Kleo::DN::Attribute> empty;
Kleo::DN::const_iterator Kleo::DN::begin() const {
return d ? d->attributes.begin() : empty.begin() ;
@@ -476,7 +476,7 @@ class Kleo::DNAttributeMapper::Private {
public:
Private();
std::map<const char*,const char*,ltstr> map;
- QStringList attributeOrder;
+ TQStringList attributeOrder;
};
Kleo::DNAttributeMapper::Private::Private()
@@ -505,26 +505,26 @@ const Kleo::DNAttributeMapper * Kleo::DNAttributeMapper::instance() {
return mSelf;
}
-QString Kleo::DNAttributeMapper::name2label( const QString & s ) const {
+TQString Kleo::DNAttributeMapper::name2label( const TQString & s ) const {
const std::map<const char*,const char*,ltstr>::const_iterator it
= d->map.find( s.stripWhiteSpace().upper().latin1() );
if ( it == d->map.end() )
- return QString::null;
+ return TQString::null;
return i18n( it->second );
}
-QStringList Kleo::DNAttributeMapper::names() const {
- QStringList result;
+TQStringList Kleo::DNAttributeMapper::names() const {
+ TQStringList result;
for ( std::map<const char*,const char*,ltstr>::const_iterator it = d->map.begin() ; it != d->map.end() ; ++it )
result.push_back( it->first );
return result;
}
-const QStringList & Kleo::DNAttributeMapper::attributeOrder() const {
+const TQStringList & Kleo::DNAttributeMapper::attributeOrder() const {
return d->attributeOrder;
}
-void Kleo::DNAttributeMapper::setAttributeOrder( const QStringList & order ) {
+void Kleo::DNAttributeMapper::setAttributeOrder( const TQStringList & order ) {
d->attributeOrder = order;
if ( order.empty() )
std::copy( defaultOrder, defaultOrder + sizeof defaultOrder / sizeof *defaultOrder,
@@ -533,6 +533,6 @@ void Kleo::DNAttributeMapper::setAttributeOrder( const QStringList & order ) {
config.writeEntry( "AttributeOrder", order );
}
-Kleo::DNAttributeOrderConfigWidget * Kleo::DNAttributeMapper::configWidget( QWidget * parent, const char * name ) const {
+Kleo::DNAttributeOrderConfigWidget * Kleo::DNAttributeMapper::configWidget( TQWidget * parent, const char * name ) const {
return new DNAttributeOrderConfigWidget( mSelf, parent, name );
}
diff --git a/certmanager/lib/kleo/dn.h b/certmanager/lib/kleo/dn.h
index 12bf9dc03..440bb4b0b 100644
--- a/certmanager/lib/kleo/dn.h
+++ b/certmanager/lib/kleo/dn.h
@@ -33,8 +33,8 @@
#ifndef __KLEO_DN_H__
#define __KLEO_DN_H__
-#include <qstring.h>
-#include <qvaluevector.h>
+#include <tqstring.h>
+#include <tqvaluevector.h>
#include <kdepimmacros.h>
class QStringList;
@@ -55,14 +55,14 @@ namespace Kleo {
public:
static const DNAttributeMapper * instance();
- QString name2label( const QString & s ) const;
- QStringList names() const;
+ TQString name2label( const TQString & s ) const;
+ TQStringList names() const;
- const QStringList & attributeOrder() const;
+ const TQStringList & attributeOrder() const;
- void setAttributeOrder( const QStringList & order );
+ void setAttributeOrder( const TQStringList & order );
- DNAttributeOrderConfigWidget * configWidget( QWidget * parent=0, const char * name=0 ) const;
+ DNAttributeOrderConfigWidget * configWidget( TQWidget * parent=0, const char * name=0 ) const;
private:
class Private;
@@ -76,11 +76,11 @@ namespace Kleo {
class KDE_EXPORT DN {
public:
class Attribute;
- typedef QValueVector<Attribute> AttributeList;
+ typedef TQValueVector<Attribute> AttributeList;
typedef AttributeList::const_iterator const_iterator;
DN();
- DN( const QString & dn );
+ DN( const TQString & dn );
DN( const char * utf8DN );
DN( const DN & other );
~DN();
@@ -88,15 +88,15 @@ namespace Kleo {
const DN & operator=( const DN & other );
/** @return the value in rfc-2253-escaped form */
- static QString escape( const QString & value );
+ static TQString escape( const TQString & value );
/** @return the DN in a reordered form, according to the settings in
the [DN] group of the application's config file */
- QString prettyDN() const;
+ TQString prettyDN() const;
/** @return the DN in the original form */
- QString dn() const;
+ TQString dn() const;
- QString operator[]( const QString & attr ) const;
+ TQString operator[]( const TQString & attr ) const;
void append( const Attribute & attr );
@@ -114,7 +114,7 @@ namespace Kleo {
public:
typedef DN::AttributeList List;
- Attribute( const QString & name=QString::null, const QString & value=QString::null )
+ Attribute( const TQString & name=TQString::null, const TQString & value=TQString::null )
: mName( name.upper() ), mValue( value ) {}
Attribute( const Attribute & other )
: mName( other.name() ), mValue( other.value() ) {}
@@ -127,14 +127,14 @@ namespace Kleo {
return *this;
}
- const QString & name() const { return mName; }
- const QString & value() const { return mValue; }
+ const TQString & name() const { return mName; }
+ const TQString & value() const { return mValue; }
- void setValue( const QString & value ) { mValue = value; }
+ void setValue( const TQString & value ) { mValue = value; }
private:
- QString mName;
- QString mValue;
+ TQString mName;
+ TQString mValue;
};
}
diff --git a/certmanager/lib/kleo/downloadjob.h b/certmanager/lib/kleo/downloadjob.h
index 006ab8ebd..6fa5a3e4b 100644
--- a/certmanager/lib/kleo/downloadjob.h
+++ b/certmanager/lib/kleo/downloadjob.h
@@ -35,7 +35,7 @@
#include "job.h"
-#include <qcstring.h>
+#include <tqcstring.h>
namespace GpgME {
class Error;
@@ -53,15 +53,15 @@ namespace Kleo {
signals to suitable slots and then start the download with a call
to start(). This call might fail, in which case the DownloadJob
instance will have scheduled it's own destruction with a call to
- QObject::deleteLater().
+ TQObject::deleteLater().
After result() is emitted, the DownloadJob will schedule it's own
- destruction by calling QObject::deleteLater().
+ destruction by calling TQObject::deleteLater().
*/
class DownloadJob : public Job {
Q_OBJECT
protected:
- DownloadJob( QObject * parent, const char * name );
+ DownloadJob( TQObject * parent, const char * name );
public:
~DownloadJob();
@@ -72,10 +72,10 @@ namespace Kleo {
only empty strings or anything other than fingerprints, the
result is undefined.
*/
- virtual GpgME::Error start( const QStringList & fingerprints ) = 0;
+ virtual GpgME::Error start( const TQStringList & fingerprints ) = 0;
signals:
- void result( const GpgME::Error & result, const QByteArray & keyData );
+ void result( const GpgME::Error & result, const TQByteArray & keyData );
};
}
diff --git a/certmanager/lib/kleo/encryptjob.h b/certmanager/lib/kleo/encryptjob.h
index 02144656f..9c3b77df2 100644
--- a/certmanager/lib/kleo/encryptjob.h
+++ b/certmanager/lib/kleo/encryptjob.h
@@ -35,7 +35,7 @@
#include "job.h"
-#include <qcstring.h>
+#include <tqcstring.h>
#include <vector>
@@ -56,15 +56,15 @@ namespace Kleo {
signals to suitable slots and then start the encryption with a
call to start(). This call might fail, in which case the
EncryptJob instance will have scheduled it's own destruction with
- a call to QObject::deleteLater().
+ a call to TQObject::deleteLater().
After result() is emitted, the EncryptJob will schedule it's own
- destruction by calling QObject::deleteLater().
+ destruction by calling TQObject::deleteLater().
*/
class EncryptJob : public Job {
Q_OBJECT
protected:
- EncryptJob( QObject * parent, const char * name );
+ EncryptJob( TQObject * parent, const char * name );
public:
~EncryptJob();
@@ -77,14 +77,14 @@ namespace Kleo {
without further checks.
*/
virtual GpgME::Error start( const std::vector<GpgME::Key> & recipients,
- const QByteArray & plainText, bool alwaysTrust=false ) = 0;
+ const TQByteArray & plainText, bool alwaysTrust=false ) = 0;
virtual GpgME::EncryptionResult exec( const std::vector<GpgME::Key> & recipients,
- const QByteArray & plainText,
- bool alwaysTrust, QByteArray & cipherText ) = 0;
+ const TQByteArray & plainText,
+ bool alwaysTrust, TQByteArray & cipherText ) = 0;
signals:
- void result( const GpgME::EncryptionResult & result, const QByteArray & cipherText );
+ void result( const GpgME::EncryptionResult & result, const TQByteArray & cipherText );
};
}
diff --git a/certmanager/lib/kleo/enum.cpp b/certmanager/lib/kleo/enum.cpp
index efa4cfaa3..ca842807f 100644
--- a/certmanager/lib/kleo/enum.cpp
+++ b/certmanager/lib/kleo/enum.cpp
@@ -34,8 +34,8 @@
#include <klocale.h>
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
static const struct {
Kleo::CryptoMessageFormat format;
@@ -67,34 +67,34 @@ const char * Kleo::cryptoMessageFormatToString( Kleo::CryptoMessageFormat f ) {
return 0;
}
-QStringList Kleo::cryptoMessageFormatsToStringList( unsigned int f ) {
- QStringList result;
+TQStringList Kleo::cryptoMessageFormatsToStringList( unsigned int f ) {
+ TQStringList result;
for ( unsigned int i = 0 ; i < numCryptoMessageFormats ; ++i )
if ( f & cryptoMessageFormats[i].format )
result.push_back( cryptoMessageFormats[i].configName );
return result;
}
-QString Kleo::cryptoMessageFormatToLabel( Kleo::CryptoMessageFormat f ) {
+TQString Kleo::cryptoMessageFormatToLabel( Kleo::CryptoMessageFormat f ) {
if ( f == AutoFormat )
return i18n("Any");
for ( unsigned int i = 0 ; i < numCryptoMessageFormats ; ++i )
if ( f == cryptoMessageFormats[i].format )
return i18n( cryptoMessageFormats[i].displayName );
- return QString::null;
+ return TQString::null;
}
-Kleo::CryptoMessageFormat Kleo::stringToCryptoMessageFormat( const QString & s ) {
- const QString t = s.lower();
+Kleo::CryptoMessageFormat Kleo::stringToCryptoMessageFormat( const TQString & s ) {
+ const TQString t = s.lower();
for ( unsigned int i = 0 ; i < numCryptoMessageFormats ; ++i )
if ( t == cryptoMessageFormats[i].configName )
return cryptoMessageFormats[i].format;
return AutoFormat;
}
-unsigned int Kleo::stringListToCryptoMessageFormats( const QStringList & sl ) {
+unsigned int Kleo::stringListToCryptoMessageFormats( const TQStringList & sl ) {
unsigned int result = 0;
- for ( QStringList::const_iterator it = sl.begin() ; it != sl.end() ; ++it )
+ for ( TQStringList::const_iterator it = sl.begin() ; it != sl.end() ; ++it )
result |= stringToCryptoMessageFormat( *it );
return result;
}
@@ -120,7 +120,7 @@ const char* Kleo::encryptionPreferenceToString( EncryptionPreference pref )
return 0; // keep the compiler happy
}
-Kleo::EncryptionPreference Kleo::stringToEncryptionPreference( const QString& str )
+Kleo::EncryptionPreference Kleo::stringToEncryptionPreference( const TQString& str )
{
if ( str == "never" )
return NeverEncrypt;
@@ -135,7 +135,7 @@ Kleo::EncryptionPreference Kleo::stringToEncryptionPreference( const QString& st
return UnknownPreference;
}
-QString Kleo::encryptionPreferenceToLabel( EncryptionPreference pref )
+TQString Kleo::encryptionPreferenceToLabel( EncryptionPreference pref )
{
switch( pref ) {
case NeverEncrypt:
@@ -172,7 +172,7 @@ const char* Kleo::signingPreferenceToString( SigningPreference pref )
return 0; // keep the compiler happy
}
-Kleo::SigningPreference Kleo::stringToSigningPreference( const QString& str )
+Kleo::SigningPreference Kleo::stringToSigningPreference( const TQString& str )
{
if ( str == "never" )
return NeverSign;
@@ -187,7 +187,7 @@ Kleo::SigningPreference Kleo::stringToSigningPreference( const QString& str )
return UnknownSigningPreference;
}
-QString Kleo::signingPreferenceToLabel( SigningPreference pref )
+TQString Kleo::signingPreferenceToLabel( SigningPreference pref )
{
switch( pref ) {
case NeverSign:
diff --git a/certmanager/lib/kleo/enum.h b/certmanager/lib/kleo/enum.h
index 29f8e2a66..bf4a44a60 100644
--- a/certmanager/lib/kleo/enum.h
+++ b/certmanager/lib/kleo/enum.h
@@ -50,12 +50,12 @@ namespace Kleo {
AutoFormat = AnyOpenPGP|AnySMIME
};
- KDE_EXPORT QString cryptoMessageFormatToLabel( CryptoMessageFormat f );
+ KDE_EXPORT TQString cryptoMessageFormatToLabel( CryptoMessageFormat f );
KDE_EXPORT const char * cryptoMessageFormatToString( CryptoMessageFormat f );
- KDE_EXPORT QStringList cryptoMessageFormatsToStringList( unsigned int f );
- KDE_EXPORT CryptoMessageFormat stringToCryptoMessageFormat( const QString & s );
- KDE_EXPORT unsigned int stringListToCryptoMessageFormats( const QStringList & sl );
+ KDE_EXPORT TQStringList cryptoMessageFormatsToStringList( unsigned int f );
+ KDE_EXPORT CryptoMessageFormat stringToCryptoMessageFormat( const TQString & s );
+ KDE_EXPORT unsigned int stringListToCryptoMessageFormats( const TQStringList & sl );
enum Action {
Conflict, DoIt, DontDoIt, Ask, AskOpportunistic, Impossible
@@ -71,9 +71,9 @@ namespace Kleo {
MaxEncryptionPreference = AskWheneverPossible
};
- KDE_EXPORT QString encryptionPreferenceToLabel( EncryptionPreference pref );
+ KDE_EXPORT TQString encryptionPreferenceToLabel( EncryptionPreference pref );
KDE_EXPORT const char* encryptionPreferenceToString( EncryptionPreference pref );
- KDE_EXPORT EncryptionPreference stringToEncryptionPreference( const QString& str );
+ KDE_EXPORT EncryptionPreference stringToEncryptionPreference( const TQString& str );
enum SigningPreference {
UnknownSigningPreference = 0,
@@ -85,9 +85,9 @@ namespace Kleo {
MaxSigningPreference = AskSigningWheneverPossible
};
- KDE_EXPORT QString signingPreferenceToLabel( SigningPreference pref ) KDE_EXPORT;
+ KDE_EXPORT TQString signingPreferenceToLabel( SigningPreference pref ) KDE_EXPORT;
KDE_EXPORT const char* signingPreferenceToString( SigningPreference pref ) KDE_EXPORT;
- KDE_EXPORT SigningPreference stringToSigningPreference( const QString& str );
+ KDE_EXPORT SigningPreference stringToSigningPreference( const TQString& str );
}
#endif // __KLEO_CRYPTOBACKEND_H__
diff --git a/certmanager/lib/kleo/exportjob.h b/certmanager/lib/kleo/exportjob.h
index d6a0db185..9e84c1351 100644
--- a/certmanager/lib/kleo/exportjob.h
+++ b/certmanager/lib/kleo/exportjob.h
@@ -35,7 +35,7 @@
#include "job.h"
-#include <qcstring.h>
+#include <tqcstring.h>
namespace GpgME {
class Error;
@@ -53,15 +53,15 @@ namespace Kleo {
signals to suitable slots and then start the export with a call
to start(). This call might fail, in which case the ExportJob
instance will have scheduled it's own destruction with a call to
- QObject::deleteLater().
+ TQObject::deleteLater().
After result() is emitted, the ExportJob will schedule it's own
- destruction by calling QObject::deleteLater().
+ destruction by calling TQObject::deleteLater().
*/
class ExportJob : public Job {
Q_OBJECT
protected:
- ExportJob( QObject * parent, const char * name );
+ ExportJob( TQObject * parent, const char * name );
public:
~ExportJob();
@@ -71,10 +71,10 @@ namespace Kleo {
ignored. If \a patterns is empty or contains only empty
strings, all available keys are exported.
*/
- virtual GpgME::Error start( const QStringList & patterns ) = 0;
+ virtual GpgME::Error start( const TQStringList & patterns ) = 0;
signals:
- void result( const GpgME::Error & result, const QByteArray & keyData );
+ void result( const GpgME::Error & result, const TQByteArray & keyData );
};
}
diff --git a/certmanager/lib/kleo/hierarchicalkeylistjob.cpp b/certmanager/lib/kleo/hierarchicalkeylistjob.cpp
index a7a66b2fe..c9a9ffcec 100644
--- a/certmanager/lib/kleo/hierarchicalkeylistjob.cpp
+++ b/certmanager/lib/kleo/hierarchicalkeylistjob.cpp
@@ -40,8 +40,8 @@
#include <klocale.h>
-#include <qstringlist.h>
-#include <qtl.h>
+#include <tqstringlist.h>
+#include <tqtl.h>
#include <gpgmepp/key.h>
#include <gpgmepp/context.h>
@@ -72,7 +72,7 @@ Kleo::HierarchicalKeyListJob::~HierarchicalKeyListJob() {
}
-GpgME::Error Kleo::HierarchicalKeyListJob::start( const QStringList & patterns, bool secretOnly ) {
+GpgME::Error Kleo::HierarchicalKeyListJob::start( const TQStringList & patterns, bool secretOnly ) {
if ( secretOnly || patterns.empty() )
return gpg_err_make( GPG_ERR_SOURCE_GPGME, GPG_ERR_UNSUPPORTED_OPERATION );
qCopy( patterns.begin(), patterns.end(),
@@ -83,7 +83,7 @@ GpgME::Error Kleo::HierarchicalKeyListJob::start( const QStringList & patterns,
return err;
}
-GpgME::KeyListResult Kleo::HierarchicalKeyListJob::exec( const QStringList &, bool,
+GpgME::KeyListResult Kleo::HierarchicalKeyListJob::exec( const TQStringList &, bool,
std::vector<GpgME::Key> & keys ) {
keys.clear();
return GpgME::KeyListResult( gpg_err_make( GPG_ERR_SOURCE_GPGME, GPG_ERR_UNSUPPORTED_OPERATION ) );
@@ -107,7 +107,7 @@ void Kleo::HierarchicalKeyListJob::slotCancel() {
void Kleo::HierarchicalKeyListJob::slotResult( const GpgME::KeyListResult & res ) {
mJob = 0;
mIntermediateResult.mergeWith( res );
- std::set<QString> tmp;
+ std::set<TQString> tmp;
std::set_difference( mNextSet.begin(), mNextSet.end(),
mScheduledSet.begin(), mScheduledSet.end(),
std::inserter( tmp, tmp.begin() ) );
@@ -142,11 +142,11 @@ GpgME::Error Kleo::HierarchicalKeyListJob::startAJob() {
assert( mJob ); // FIXME: we need a way to generate errors ourselves,
// but I don't like the dependency on gpg-error :/
- connect( mJob, SIGNAL(nextKey(const GpgME::Key&)), SLOT(slotNextKey(const GpgME::Key&)) );
- connect( mJob, SIGNAL(result(const GpgME::KeyListResult&)), SLOT(slotResult(const GpgME::KeyListResult&)) );
+ connect( mJob, TQT_SIGNAL(nextKey(const GpgME::Key&)), TQT_SLOT(slotNextKey(const GpgME::Key&)) );
+ connect( mJob, TQT_SIGNAL(result(const GpgME::KeyListResult&)), TQT_SLOT(slotResult(const GpgME::KeyListResult&)) );
- QStringList patterns;
- for ( std::set<QString>::const_iterator it = mNextSet.begin() ; it != mNextSet.end() ; ++it )
+ TQStringList patterns;
+ for ( std::set<TQString>::const_iterator it = mNextSet.begin() ; it != mNextSet.end() ; ++it )
patterns.push_back( *it );
mScheduledSet.insert( mNextSet.begin(), mNextSet.end() );
diff --git a/certmanager/lib/kleo/hierarchicalkeylistjob.h b/certmanager/lib/kleo/hierarchicalkeylistjob.h
index a91ff6dc0..c4f7fe047 100644
--- a/certmanager/lib/kleo/hierarchicalkeylistjob.h
+++ b/certmanager/lib/kleo/hierarchicalkeylistjob.h
@@ -39,8 +39,8 @@
#include <gpgmepp/keylistresult.h>
-#include <qcstring.h>
-#include <qguardedptr.h>
+#include <tqcstring.h>
+#include <tqguardedptr.h>
#include <set>
@@ -63,10 +63,10 @@ namespace Kleo {
suitable slots and then start the keylisting with a call to
start(). This call might fail, in which case the
HierarchicalKeyListJob instance will have scheduled it's own
- destruction with a call to QObject::deleteLater().
+ destruction with a call to TQObject::deleteLater().
After result() is emitted, the HierarchicalKeyListJob will
- schedule its own destruction by calling QObject::deleteLater().
+ schedule its own destruction by calling TQObject::deleteLater().
*/
class KDE_EXPORT HierarchicalKeyListJob : public KeyListJob {
Q_OBJECT
@@ -84,9 +84,9 @@ namespace Kleo {
The \a secretOnly parameter is ignored by
HierarchicalKeyListJob and must be set to false.
*/
- GpgME::Error start( const QStringList & patterns, bool secretOnly=false );
+ GpgME::Error start( const TQStringList & patterns, bool secretOnly=false );
- GpgME::KeyListResult exec( const QStringList & patterns, bool secretOnly,
+ GpgME::KeyListResult exec( const TQStringList & patterns, bool secretOnly,
std::vector<GpgME::Key> & keys );
private slots:
@@ -104,11 +104,11 @@ namespace Kleo {
const bool mIncludeSigs;
const bool mValidating;
bool mTruncated;
- std::set<QString> mSentSet; // keys already sent (prevent duplicates even if the backend should return them)
- std::set<QString> mScheduledSet; // keys already scheduled (by starting a job for them)
- std::set<QString> mNextSet; // keys to schedule for the next iteraton
+ std::set<TQString> mSentSet; // keys already sent (prevent duplicates even if the backend should return them)
+ std::set<TQString> mScheduledSet; // keys already scheduled (by starting a job for them)
+ std::set<TQString> mNextSet; // keys to schedule for the next iteraton
GpgME::KeyListResult mIntermediateResult;
- QGuardedPtr<KeyListJob> mJob;
+ TQGuardedPtr<KeyListJob> mJob;
};
}
diff --git a/certmanager/lib/kleo/importjob.h b/certmanager/lib/kleo/importjob.h
index 10aa90383..9c446457f 100644
--- a/certmanager/lib/kleo/importjob.h
+++ b/certmanager/lib/kleo/importjob.h
@@ -35,7 +35,7 @@
#include "job.h"
-#include <qcstring.h>
+#include <tqcstring.h>
namespace GpgME {
class Error;
@@ -54,15 +54,15 @@ namespace Kleo {
signals to suitable slots and then start the import with a call
to start(). This call might fail, in which case the ImportJob
instance will have scheduled it's own destruction with a call to
- QObject::deleteLater().
+ TQObject::deleteLater().
After result() is emitted, the ImportJob will schedule it's own
- destruction by calling QObject::deleteLater().
+ destruction by calling TQObject::deleteLater().
*/
class ImportJob : public Job {
Q_OBJECT
protected:
- ImportJob( QObject * parent, const char * name );
+ ImportJob( TQObject * parent, const char * name );
public:
~ImportJob();
@@ -70,9 +70,9 @@ namespace Kleo {
Starts the importing operation. \a keyData contains the data to
import from.
*/
- virtual GpgME::Error start( const QByteArray & keyData ) = 0;
+ virtual GpgME::Error start( const TQByteArray & keyData ) = 0;
- virtual GpgME::ImportResult exec( const QByteArray & keyData ) = 0;
+ virtual GpgME::ImportResult exec( const TQByteArray & keyData ) = 0;
signals:
void result( const GpgME::ImportResult & result );
diff --git a/certmanager/lib/kleo/job.cpp b/certmanager/lib/kleo/job.cpp
index 77881d737..c5371b646 100644
--- a/certmanager/lib/kleo/job.cpp
+++ b/certmanager/lib/kleo/job.cpp
@@ -52,31 +52,31 @@
#include "refreshkeysjob.h"
#include "specialjob.h"
-#include <qapplication.h>
+#include <tqapplication.h>
#include <kdebug.h>
-Kleo::Job::Job( QObject * parent, const char * name )
- : QObject( parent, name )
+Kleo::Job::Job( TQObject * parent, const char * name )
+ : TQObject( parent, name )
{
if ( qApp )
- connect( qApp, SIGNAL(aboutToQuit()), SLOT(slotCancel()) );
+ connect( qApp, TQT_SIGNAL(aboutToQuit()), TQT_SLOT(slotCancel()) );
}
Kleo::Job::~Job() {
}
-void Kleo::Job::showErrorDialog( QWidget *, const QString & ) const {
+void Kleo::Job::showErrorDialog( TQWidget *, const TQString & ) const {
kdDebug() << "Kleo::Job::showErrorDialog() should be reimplemented in Kleo::Job subclasses!" << endl;
}
-QString Kleo::Job::auditLogAsHtml() const {
+TQString Kleo::Job::auditLogAsHtml() const {
kdDebug() << "Kleo::Job::auditLogAsHtml() should be reimplemented in Kleo::Job subclasses!" << endl;
- return QString();
+ return TQString();
}
#define make_job_subclass(x) \
- Kleo::x::x( QObject * parent, const char * name ) : Job( parent, name ) {} \
+ Kleo::x::x( TQObject * parent, const char * name ) : Job( parent, name ) {} \
Kleo::x::~x() {}
make_job_subclass(KeyListJob)
diff --git a/certmanager/lib/kleo/job.h b/certmanager/lib/kleo/job.h
index ae65008b0..57d0592d6 100644
--- a/certmanager/lib/kleo/job.h
+++ b/certmanager/lib/kleo/job.h
@@ -33,8 +33,8 @@
#ifndef __KLEO_JOB_H__
#define __KLEO_JOB_H__
-#include <qobject.h>
-#include <qstring.h>
+#include <tqobject.h>
+#include <tqstring.h>
class QWidget;
@@ -57,22 +57,22 @@ namespace Kleo {
signal of subclasses will still be emitted, though, and will
carry the information that the operation was canceled.
*/
- class Job : public QObject {
+ class Job : public TQObject {
Q_OBJECT
protected:
- Job( QObject * parent, const char * name );
+ Job( TQObject * parent, const char * name );
public:
~Job();
- virtual void showErrorDialog( QWidget * parent=0, const QString & caption=QString::null ) const;
+ virtual void showErrorDialog( TQWidget * parent=0, const TQString & caption=TQString::null ) const;
- virtual QString auditLogAsHtml() const;
+ virtual TQString auditLogAsHtml() const;
public slots:
virtual void slotCancel() = 0;
signals:
- void progress( const QString & what, int current, int total );
+ void progress( const TQString & what, int current, int total );
void done();
};
diff --git a/certmanager/lib/kleo/kconfigbasedkeyfilter.cpp b/certmanager/lib/kleo/kconfigbasedkeyfilter.cpp
index 89d18e799..7cf0bd551 100644
--- a/certmanager/lib/kleo/kconfigbasedkeyfilter.cpp
+++ b/certmanager/lib/kleo/kconfigbasedkeyfilter.cpp
@@ -52,14 +52,14 @@ static const struct {
{ "ultimate", GpgME::Key::Ultimate, GpgME::UserID::Ultimate },
};
-static GpgME::Key::OwnerTrust map2OwnerTrust( const QString & s ) {
+static GpgME::Key::OwnerTrust map2OwnerTrust( const TQString & s ) {
for ( unsigned int i = 0 ; i < sizeof ownerTrustAndValidityMap / sizeof *ownerTrustAndValidityMap ; ++i )
if ( s.lower() == ownerTrustAndValidityMap[i].name )
return ownerTrustAndValidityMap[i].trust;
return ownerTrustAndValidityMap[0].trust;
}
-static GpgME::UserID::Validity map2Validity( const QString & s ) {
+static GpgME::UserID::Validity map2Validity( const TQString & s ) {
for ( unsigned int i = 0 ; i < sizeof ownerTrustAndValidityMap / sizeof *ownerTrustAndValidityMap ; ++i )
if ( s.lower() == ownerTrustAndValidityMap[i].name )
return ownerTrustAndValidityMap[i].validity;
@@ -132,7 +132,7 @@ Kleo::KConfigBasedKeyFilter::KConfigBasedKeyFilter( const KConfigBase & config )
{ "is-at-most-", IsAtMost },
};
for ( unsigned int i = 0 ; i < sizeof prefixMap / sizeof *prefixMap ; ++i ) {
- const QString key = QString( prefixMap[i].prefix ) + "ownertrust";
+ const TQString key = TQString( prefixMap[i].prefix ) + "ownertrust";
if ( config.hasKey( key ) ) {
mOwnerTrust = prefixMap[i].state;
mOwnerTrustReferenceLevel = map2OwnerTrust( config.readEntry( key ) );
@@ -141,7 +141,7 @@ Kleo::KConfigBasedKeyFilter::KConfigBasedKeyFilter( const KConfigBase & config )
}
}
for ( unsigned int i = 0 ; i < sizeof prefixMap / sizeof *prefixMap ; ++i ) {
- const QString key = QString( prefixMap[i].prefix ) + "validity";
+ const TQString key = TQString( prefixMap[i].prefix ) + "validity";
if ( config.hasKey( key ) ) {
mValidity = prefixMap[i].state;
mValidityReferenceLevel = map2Validity( config.readEntry( key ) );
@@ -226,14 +226,14 @@ bool Kleo::KConfigBasedKeyFilter::matches( const GpgME::Key & key ) const {
return true;
}
-static inline QFont resizedFont( QFont font, int pointSize, bool strike ) {
+static inline TQFont resizedFont( TQFont font, int pointSize, bool strike ) {
font.setPointSize( pointSize );
if ( strike )
font.setStrikeOut( true );
return font;
}
-static inline QFont adapt( QFont font, bool it, bool b, bool strike ) {
+static inline TQFont adapt( TQFont font, bool it, bool b, bool strike ) {
if ( it )
font.setItalic( true );
if ( b )
@@ -243,7 +243,7 @@ static inline QFont adapt( QFont font, bool it, bool b, bool strike ) {
return font;
}
-QFont Kleo::KConfigBasedKeyFilter::font( const QFont & f ) const {
+TQFont Kleo::KConfigBasedKeyFilter::font( const TQFont & f ) const {
if ( mUseFullFont )
return resizedFont( mFont, f.pointSize(), mStrikeOut );
else
diff --git a/certmanager/lib/kleo/kconfigbasedkeyfilter.h b/certmanager/lib/kleo/kconfigbasedkeyfilter.h
index 42c083080..8d77b3913 100644
--- a/certmanager/lib/kleo/kconfigbasedkeyfilter.h
+++ b/certmanager/lib/kleo/kconfigbasedkeyfilter.h
@@ -35,9 +35,9 @@
#include "keyfilter.h"
-#include <qfont.h>
-#include <qstring.h>
-#include <qcolor.h>
+#include <tqfont.h>
+#include <tqstring.h>
+#include <tqcolor.h>
#include <gpgmepp/key.h>
@@ -53,22 +53,22 @@ namespace Kleo {
unsigned int specificity() const { return mSpecificity; }
- QColor fgColor() const { return mFgColor; }
- QColor bgColor() const { return mBgColor; }
- QFont font( const QFont & ) const;
- QString name() const { return mName; }
- QString icon() const { return mIcon; }
+ TQColor fgColor() const { return mFgColor; }
+ TQColor bgColor() const { return mBgColor; }
+ TQFont font( const TQFont & ) const;
+ TQString name() const { return mName; }
+ TQString icon() const { return mIcon; }
private:
- QColor mFgColor, mBgColor;
- QString mName;
- QString mIcon;
+ TQColor mFgColor, mBgColor;
+ TQString mName;
+ TQString mIcon;
unsigned int mSpecificity;
bool mItalic;
bool mBold;
bool mStrikeOut;
bool mUseFullFont;
- QFont mFont;
+ TQFont mFont;
enum TriState {
DoesNotMatter = 0,
diff --git a/certmanager/lib/kleo/keyfilter.h b/certmanager/lib/kleo/keyfilter.h
index f10fba9bf..e8d8eb1f1 100644
--- a/certmanager/lib/kleo/keyfilter.h
+++ b/certmanager/lib/kleo/keyfilter.h
@@ -56,11 +56,11 @@ namespace Kleo {
// not sure if we want these here, but for the time being, it's
// the easiest way:
- virtual QColor fgColor() const = 0;
- virtual QColor bgColor() const = 0;
- virtual QFont font( const QFont & ) const = 0;
- virtual QString name() const = 0;
- virtual QString icon() const = 0;
+ virtual TQColor fgColor() const = 0;
+ virtual TQColor bgColor() const = 0;
+ virtual TQFont font( const TQFont & ) const = 0;
+ virtual TQString name() const = 0;
+ virtual TQString icon() const = 0;
};
}
diff --git a/certmanager/lib/kleo/keyfiltermanager.cpp b/certmanager/lib/kleo/keyfiltermanager.cpp
index 14932801c..53493ab80 100644
--- a/certmanager/lib/kleo/keyfiltermanager.cpp
+++ b/certmanager/lib/kleo/keyfiltermanager.cpp
@@ -41,10 +41,10 @@
#include <kconfig.h>
-#include <qapplication.h>
-#include <qregexp.h>
-#include <qstringlist.h>
-#include <qvaluevector.h>
+#include <tqapplication.h>
+#include <tqregexp.h>
+#include <tqstringlist.h>
+#include <tqvaluevector.h>
#include <algorithm>
@@ -61,19 +61,19 @@ struct Kleo::KeyFilterManager::Private {
filters.clear();
}
- QValueVector<KeyFilter*> filters;
+ TQValueVector<KeyFilter*> filters;
};
Kleo::KeyFilterManager * Kleo::KeyFilterManager::mSelf = 0;
-Kleo::KeyFilterManager::KeyFilterManager( QObject * parent, const char * name )
- : QObject( parent, name ), d( 0 )
+Kleo::KeyFilterManager::KeyFilterManager( TQObject * parent, const char * name )
+ : TQObject( parent, name ), d( 0 )
{
mSelf = this;
d = new Private();
// ### DF: doesn't a KStaticDeleter work more reliably?
if ( qApp )
- connect( qApp, SIGNAL(aboutToQuit()), SLOT(deleteLater()) );
+ connect( qApp, TQT_SIGNAL(aboutToQuit()), TQT_SLOT(deleteLater()) );
reload();
}
@@ -91,7 +91,7 @@ Kleo::KeyFilterManager * Kleo::KeyFilterManager::instance() {
}
const Kleo::KeyFilter * Kleo::KeyFilterManager::filterMatching( const GpgME::Key & key ) const {
- for ( QValueVector<KeyFilter*>::const_iterator it = d->filters.begin() ; it != d->filters.end() ; ++it )
+ for ( TQValueVector<KeyFilter*>::const_iterator it = d->filters.begin() ; it != d->filters.end() ; ++it )
if ( (*it)->matches( key ) )
return *it;
return 0;
@@ -107,8 +107,8 @@ void Kleo::KeyFilterManager::reload() {
KConfig * config = Kleo::CryptoBackendFactory::instance()->configObject();
if ( !config )
return;
- const QStringList groups = config->groupList().grep( QRegExp( "^Key Filter #\\d+$" ) );
- for ( QStringList::const_iterator it = groups.begin() ; it != groups.end() ; ++it ) {
+ const TQStringList groups = config->groupList().grep( TQRegExp( "^Key Filter #\\d+$" ) );
+ for ( TQStringList::const_iterator it = groups.begin() ; it != groups.end() ; ++it ) {
const KConfigGroup cfg( config, *it );
d->filters.push_back( new KConfigBasedKeyFilter( cfg ) );
}
diff --git a/certmanager/lib/kleo/keyfiltermanager.h b/certmanager/lib/kleo/keyfiltermanager.h
index 25353d71a..662dfdb82 100644
--- a/certmanager/lib/kleo/keyfiltermanager.h
+++ b/certmanager/lib/kleo/keyfiltermanager.h
@@ -33,7 +33,7 @@
#ifndef __KLEO_KEYFILTERMANAGER_H__
#define __KLEO_KEYFILTERMANAGER_H__
-#include <qobject.h>
+#include <tqobject.h>
#include <kdepimmacros.h>
namespace GpgME {
class Key;
@@ -45,10 +45,10 @@ namespace Kleo {
namespace Kleo {
- class KDE_EXPORT KeyFilterManager : public QObject {
+ class KDE_EXPORT KeyFilterManager : public TQObject {
Q_OBJECT
protected:
- KeyFilterManager( QObject * parent=0, const char * name=0 );
+ KeyFilterManager( TQObject * parent=0, const char * name=0 );
~KeyFilterManager();
public:
diff --git a/certmanager/lib/kleo/keygenerationjob.h b/certmanager/lib/kleo/keygenerationjob.h
index f78152c5c..384d43065 100644
--- a/certmanager/lib/kleo/keygenerationjob.h
+++ b/certmanager/lib/kleo/keygenerationjob.h
@@ -35,7 +35,7 @@
#include "job.h"
-#include <qcstring.h>
+#include <tqcstring.h>
namespace GpgME {
class Error;
@@ -53,15 +53,15 @@ namespace Kleo {
signals to suitable slots and then start the key generation with
a call to start(). This call might fail, in which case the
KeyGenerationJob instance will have scheduled it's own
- destruction with a call to QObject::deleteLater().
+ destruction with a call to TQObject::deleteLater().
After result() is emitted, the KeyGenerationJob will schedule it's own
- destruction by calling QObject::deleteLater().
+ destruction by calling TQObject::deleteLater().
*/
class KeyGenerationJob : public Job {
Q_OBJECT
protected:
- KeyGenerationJob( QObject * parent, const char * name );
+ KeyGenerationJob( TQObject * parent, const char * name );
public:
~KeyGenerationJob();
@@ -70,10 +70,10 @@ namespace Kleo {
backend-specific string containing the paramaters of the key to
create (length, capabilities, etc).
*/
- virtual GpgME::Error start( const QString & parameters ) = 0;
+ virtual GpgME::Error start( const TQString & parameters ) = 0;
signals:
- void result( const GpgME::KeyGenerationResult & result, const QByteArray & pubKeyData );
+ void result( const GpgME::KeyGenerationResult & result, const TQByteArray & pubKeyData );
};
}
diff --git a/certmanager/lib/kleo/keylistjob.h b/certmanager/lib/kleo/keylistjob.h
index c419ad47d..9d566bcbc 100644
--- a/certmanager/lib/kleo/keylistjob.h
+++ b/certmanager/lib/kleo/keylistjob.h
@@ -55,17 +55,17 @@ namespace Kleo {
and result() signals to suitable slots and then start the key
listing with a call to start(). This call might fail, in which
case the KeylistJob instance will have schedules it's own
- destruction with a call to QObject::deleteLater().
+ destruction with a call to TQObject::deleteLater().
During keylisting, you will receive new key objects through the
nextKey() signal as they arrive. After result() is emitted, the
KeyListJob will schedule it's own destruction by calling
- QObject::deleteLater().
+ TQObject::deleteLater().
*/
class KeyListJob : public Job {
Q_OBJECT
protected:
- KeyListJob( QObject * parent, const char * name );
+ KeyListJob( TQObject * parent, const char * name );
public:
~KeyListJob();
@@ -82,9 +82,9 @@ namespace Kleo {
also available are returned. Use this if you need to select a
key for signing.
*/
- virtual GpgME::Error start( const QStringList & patterns, bool secretOnly=false ) = 0;
+ virtual GpgME::Error start( const TQStringList & patterns, bool secretOnly=false ) = 0;
- virtual GpgME::KeyListResult exec( const QStringList & patterns, bool secretOnly, std::vector<GpgME::Key> & keys ) = 0;
+ virtual GpgME::KeyListResult exec( const TQStringList & patterns, bool secretOnly, std::vector<GpgME::Key> & keys ) = 0;
signals:
void nextKey( const GpgME::Key & key );
diff --git a/certmanager/lib/kleo/multideletejob.cpp b/certmanager/lib/kleo/multideletejob.cpp
index 32596e78f..bd4766475 100644
--- a/certmanager/lib/kleo/multideletejob.cpp
+++ b/certmanager/lib/kleo/multideletejob.cpp
@@ -102,7 +102,7 @@ GpgME::Error Kleo::MultiDeleteJob::startAJob() {
assert( mJob ); // FIXME: we need a way to generate errors ourselves,
// but I don't like the dependency on gpg-error :/
- connect( mJob, SIGNAL(result(const GpgME::Error&)), SLOT(slotResult(const GpgME::Error&)) );
+ connect( mJob, TQT_SIGNAL(result(const GpgME::Error&)), TQT_SLOT(slotResult(const GpgME::Error&)) );
return mJob->start( *mIt, mAllowSecretKeyDeletion );
}
diff --git a/certmanager/lib/kleo/multideletejob.h b/certmanager/lib/kleo/multideletejob.h
index 5b995adaf..9bc5d05a6 100644
--- a/certmanager/lib/kleo/multideletejob.h
+++ b/certmanager/lib/kleo/multideletejob.h
@@ -37,7 +37,7 @@
#include <kleo/cryptobackend.h>
#include <kdepimmacros.h>
-#include <qguardedptr.h>
+#include <tqguardedptr.h>
#include <vector>
@@ -59,10 +59,10 @@ namespace Kleo {
connect the progress() and result() signals to suitable slots and
then start the delete with a call to start(). This call might
fail, in which case the MultiDeleteJob instance will have scheduled
- it's own destruction with a call to QObject::deleteLater().
+ it's own destruction with a call to TQObject::deleteLater().
After result() is emitted, the MultiDeleteJob will schedule it's own
- destruction by calling QObject::deleteLater().
+ destruction by calling TQObject::deleteLater().
*/
class KDE_EXPORT MultiDeleteJob : public Job {
Q_OBJECT
@@ -90,7 +90,7 @@ namespace Kleo {
private:
const CryptoBackend::Protocol * mProtocol;
- QGuardedPtr<DeleteJob> mJob;
+ TQGuardedPtr<DeleteJob> mJob;
std::vector<GpgME::Key> mKeys;
std::vector<GpgME::Key>::const_iterator mIt;
bool mAllowSecretKeyDeletion;
diff --git a/certmanager/lib/kleo/refreshkeysjob.h b/certmanager/lib/kleo/refreshkeysjob.h
index dcf9cd516..5ace60b6e 100644
--- a/certmanager/lib/kleo/refreshkeysjob.h
+++ b/certmanager/lib/kleo/refreshkeysjob.h
@@ -54,15 +54,15 @@ namespace Kleo {
signals to suitable slots and then start the key refresh with a
call to start(). This call might fail, in which case the
RefreshKeysJob instance will have scheduled its own destruction
- with a call to QObject::deleteLater().
+ with a call to TQObject::deleteLater().
After result() is emitted, the KeyListJob will schedule it's own
- destruction by calling QObject::deleteLater().
+ destruction by calling TQObject::deleteLater().
*/
class RefreshKeysJob : public Job {
Q_OBJECT
protected:
- RefreshKeysJob( QObject * parent, const char * name );
+ RefreshKeysJob( TQObject * parent, const char * name );
public:
~RefreshKeysJob();
@@ -79,7 +79,7 @@ namespace Kleo {
also available are returned. Use this if you need to select a
key for signing.
*/
- virtual GpgME::Error start( const QStringList & patterns ) = 0;
+ virtual GpgME::Error start( const TQStringList & patterns ) = 0;
signals:
void result( const GpgME::Error & error );
diff --git a/certmanager/lib/kleo/signencryptjob.h b/certmanager/lib/kleo/signencryptjob.h
index 42d3a179f..5e12723ef 100644
--- a/certmanager/lib/kleo/signencryptjob.h
+++ b/certmanager/lib/kleo/signencryptjob.h
@@ -36,7 +36,7 @@
#include <gpgmepp/context.h> // for Context::SignatureMode (or should
// we roll our own enum here?)
#include "job.h"
-#include <qcstring.h>
+#include <tqcstring.h>
#include <vector>
#include <utility>
@@ -59,15 +59,15 @@ namespace Kleo {
signals to suitable slots and then start the operation with a
call to start(). This call might fail, in which case the
SignEncryptJob instance will have scheduled it's own destruction
- with a call to QObject::deleteLater().
+ with a call to TQObject::deleteLater().
After result() is emitted, the SignEncryptJob will schedule it's
- own destruction by calling QObject::deleteLater().
+ own destruction by calling TQObject::deleteLater().
*/
class SignEncryptJob : public Job {
Q_OBJECT
protected:
- SignEncryptJob( QObject * parent, const char * name );
+ SignEncryptJob( TQObject * parent, const char * name );
public:
~SignEncryptJob();
@@ -83,19 +83,19 @@ namespace Kleo {
*/
virtual GpgME::Error start( const std::vector<GpgME::Key> & signers,
const std::vector<GpgME::Key> & recipients,
- const QByteArray & plainText,
+ const TQByteArray & plainText,
bool alwaysTrust=false ) = 0;
virtual std::pair<GpgME::SigningResult,GpgME::EncryptionResult>
exec( const std::vector<GpgME::Key> & signers,
const std::vector<GpgME::Key> & recipients,
- const QByteArray & plainText,
- bool alwaysTrust, QByteArray & cipherText ) = 0;
+ const TQByteArray & plainText,
+ bool alwaysTrust, TQByteArray & cipherText ) = 0;
signals:
void result( const GpgME::SigningResult & signingresult,
const GpgME::EncryptionResult & encryptionresult,
- const QByteArray & cipherText );
+ const TQByteArray & cipherText );
};
}
diff --git a/certmanager/lib/kleo/signjob.h b/certmanager/lib/kleo/signjob.h
index 17ea3d947..677aedcf0 100644
--- a/certmanager/lib/kleo/signjob.h
+++ b/certmanager/lib/kleo/signjob.h
@@ -36,7 +36,7 @@
#include <gpgmepp/context.h> // for Context::SignatureMode (or should
// we roll our own enum here?)
#include "job.h"
-#include <qcstring.h>
+#include <tqcstring.h>
#include <vector>
@@ -57,15 +57,15 @@ namespace Kleo {
suitable slots and then start the signing with a call to
start(). This call might fail, in which case the SignJob instance
will have scheduled it's own destruction with a call to
- QObject::deleteLater().
+ TQObject::deleteLater().
After result() is emitted, the SignJob will schedule it's own
- destruction by calling QObject::deleteLater().
+ destruction by calling TQObject::deleteLater().
*/
class SignJob : public Job {
Q_OBJECT
protected:
- SignJob( QObject * parent, const char * name );
+ SignJob( TQObject * parent, const char * name );
public:
~SignJob();
@@ -74,15 +74,15 @@ namespace Kleo {
sign \a plainText with. Empty (null) keys are ignored.
*/
virtual GpgME::Error start( const std::vector<GpgME::Key> & signers,
- const QByteArray & plainText,
+ const TQByteArray & plainText,
GpgME::Context::SignatureMode mode ) = 0;
virtual GpgME::SigningResult exec( const std::vector<GpgME::Key> & signers,
- const QByteArray & plainText,
+ const TQByteArray & plainText,
GpgME::Context::SignatureMode mode,
- QByteArray & signature ) = 0;
+ TQByteArray & signature ) = 0;
signals:
- void result( const GpgME::SigningResult & result, const QByteArray & signature );
+ void result( const GpgME::SigningResult & result, const TQByteArray & signature );
};
}
diff --git a/certmanager/lib/kleo/specialjob.h b/certmanager/lib/kleo/specialjob.h
index e7280b0a5..04867c32b 100644
--- a/certmanager/lib/kleo/specialjob.h
+++ b/certmanager/lib/kleo/specialjob.h
@@ -49,10 +49,10 @@ namespace Kleo {
signals to suitable slots and then start the job with a call to
start(). This call might fail, in which case the SpecialJob
instance will have schedules its own destruction with a call to
- QObject::deleteLater().
+ TQObject::deleteLater().
After result() is emitted, the SpecialJob will schedule its own
- destruction by calling QObject::deleteLater().
+ destruction by calling TQObject::deleteLater().
Parameters are set using the Qt property system. More general, or
constructor parameters are given in the call to
@@ -65,7 +65,7 @@ namespace Kleo {
class SpecialJob : public Job {
Q_OBJECT
protected:
- SpecialJob( QObject * parent, const char * name );
+ SpecialJob( TQObject * parent, const char * name );
public:
~SpecialJob();
@@ -78,7 +78,7 @@ namespace Kleo {
virtual GpgME::Error exec() = 0;
signals:
- void result( const GpgME::Error & result, const QVariant & data );
+ void result( const GpgME::Error & result, const TQVariant & data );
};
}
diff --git a/certmanager/lib/kleo/verifydetachedjob.h b/certmanager/lib/kleo/verifydetachedjob.h
index f50fda546..58ff64732 100644
--- a/certmanager/lib/kleo/verifydetachedjob.h
+++ b/certmanager/lib/kleo/verifydetachedjob.h
@@ -35,7 +35,7 @@
#include "job.h"
-#include <qcstring.h>
+#include <tqcstring.h>
namespace GpgME {
class Error;
@@ -54,15 +54,15 @@ namespace Kleo {
signals to suitable slots and then start the verification with a
call to start(). This call might fail, in which case the
VerifyDetachedJob instance will have scheduled it's own
- destruction with a call to QObject::deleteLater().
+ destruction with a call to TQObject::deleteLater().
After result() is emitted, the VerifyDetachedJob will schedule
- it's own destruction by calling QObject::deleteLater().
+ it's own destruction by calling TQObject::deleteLater().
*/
class VerifyDetachedJob : public Job {
Q_OBJECT
protected:
- VerifyDetachedJob( QObject * parent, const char * name );
+ VerifyDetachedJob( TQObject * parent, const char * name );
public:
~VerifyDetachedJob();
@@ -71,11 +71,11 @@ namespace Kleo {
signature data, while \a signedData contains the data over
which the signature was made.
*/
- virtual GpgME::Error start( const QByteArray & signature,
- const QByteArray & signedData ) = 0;
+ virtual GpgME::Error start( const TQByteArray & signature,
+ const TQByteArray & signedData ) = 0;
- virtual GpgME::VerificationResult exec( const QByteArray & signature,
- const QByteArray & signedData ) = 0;
+ virtual GpgME::VerificationResult exec( const TQByteArray & signature,
+ const TQByteArray & signedData ) = 0;
signals:
void result( const GpgME::VerificationResult & result );
diff --git a/certmanager/lib/kleo/verifyopaquejob.h b/certmanager/lib/kleo/verifyopaquejob.h
index b38b18de1..58c452b7c 100644
--- a/certmanager/lib/kleo/verifyopaquejob.h
+++ b/certmanager/lib/kleo/verifyopaquejob.h
@@ -35,7 +35,7 @@
#include "job.h"
-#include <qcstring.h>
+#include <tqcstring.h>
namespace GpgME {
class Error;
@@ -54,15 +54,15 @@ namespace Kleo {
signals to suitable slots and then start the verification with a
call to start(). This call might fail, in which case the
VerifyOpaqueJob instance will have scheduled it's own
- destruction with a call to QObject::deleteLater().
+ destruction with a call to TQObject::deleteLater().
After result() is emitted, the VerifyOpaqueJob will schedule
- it's own destruction by calling QObject::deleteLater().
+ it's own destruction by calling TQObject::deleteLater().
*/
class VerifyOpaqueJob : public Job {
Q_OBJECT
protected:
- VerifyOpaqueJob( QObject * parent, const char * name );
+ VerifyOpaqueJob( TQObject * parent, const char * name );
public:
~VerifyOpaqueJob();
@@ -71,13 +71,13 @@ namespace Kleo {
signature data, while \a signedData contains the data over
which the signature was made.
*/
- virtual GpgME::Error start( const QByteArray & signedData ) = 0;
+ virtual GpgME::Error start( const TQByteArray & signedData ) = 0;
/** Synchronous version of @ref start */
- virtual GpgME::VerificationResult exec( const QByteArray & signedData, QByteArray & plainText ) = 0;
+ virtual GpgME::VerificationResult exec( const TQByteArray & signedData, TQByteArray & plainText ) = 0;
signals:
- void result( const GpgME::VerificationResult & result, const QByteArray & plainText );
+ void result( const GpgME::VerificationResult & result, const TQByteArray & plainText );
};
}
diff --git a/certmanager/lib/tests/gnupgviewer.h b/certmanager/lib/tests/gnupgviewer.h
index efba1760b..98fb44a61 100644
--- a/certmanager/lib/tests/gnupgviewer.h
+++ b/certmanager/lib/tests/gnupgviewer.h
@@ -33,8 +33,8 @@
#ifndef __KLEO_TESTS_GNUPGVIEWER_H__
#define __KLEO_TESTS_GNUPGVIEWER_H__
-#include <qtextedit.h>
-#include <qstring.h>
+#include <tqtextedit.h>
+#include <tqstring.h>
namespace Kleo {
class GnuPGProcessBase;
@@ -42,10 +42,10 @@ namespace Kleo {
class KProcess;
class QStringList;
-class GnuPGViewer : public QTextEdit {
+class GnuPGViewer : public TQTextEdit {
Q_OBJECT
public:
- GnuPGViewer( QWidget * parent=0, const char * name=0 );
+ GnuPGViewer( TQWidget * parent=0, const char * name=0 );
~GnuPGViewer();
void setProcess( Kleo::GnuPGProcessBase * process );
@@ -53,12 +53,12 @@ public:
private slots:
void slotStdout( KProcess *, char *, int );
void slotStderr( KProcess *, char *, int );
- void slotStatus( Kleo::GnuPGProcessBase *, const QString &, const QStringList & );
+ void slotStatus( Kleo::GnuPGProcessBase *, const TQString &, const TQStringList & );
void slotProcessExited( KProcess * );
private:
Kleo::GnuPGProcessBase * mProcess;
- QString mLastStdout, mLastStderr, mLastStatus;
+ TQString mLastStdout, mLastStderr, mLastStatus;
};
#endif // __KLEO_TESTS_GNUPGVIEWER_H__
diff --git a/certmanager/lib/tests/test_cryptoconfig.cpp b/certmanager/lib/tests/test_cryptoconfig.cpp
index 17d1b4471..4aadb7ff1 100644
--- a/certmanager/lib/tests/test_cryptoconfig.cpp
+++ b/certmanager/lib/tests/test_cryptoconfig.cpp
@@ -50,20 +50,20 @@ int main( int argc, char** argv ) {
// Dynamic querying of the options
cout << "Components:" << endl;
- QStringList components = config->componentList();
+ TQStringList components = config->componentList();
- for( QStringList::Iterator compit = components.begin(); compit != components.end(); ++compit ) {
+ for( TQStringList::Iterator compit = components.begin(); compit != components.end(); ++compit ) {
cout << "Component " << (*compit).local8Bit() << ":" << endl;
const Kleo::CryptoConfigComponent* comp = config->component( *compit );
assert( comp );
- QStringList groups = comp->groupList();
- for( QStringList::Iterator groupit = groups.begin(); groupit != groups.end(); ++groupit ) {
+ TQStringList groups = comp->groupList();
+ for( TQStringList::Iterator groupit = groups.begin(); groupit != groups.end(); ++groupit ) {
const Kleo::CryptoConfigGroup* group = comp->group( *groupit );
assert( group );
cout << " Group " << (*groupit).local8Bit() << ": descr=\"" << group->description().local8Bit() << "\""
<< " level=" << group->level() << endl;
- QStringList entries = group->entryList();
- for( QStringList::Iterator entryit = entries.begin(); entryit != entries.end(); ++entryit ) {
+ TQStringList entries = group->entryList();
+ for( TQStringList::Iterator entryit = entries.begin(); entryit != entries.end(); ++entryit ) {
const Kleo::CryptoConfigEntry* entry = group->entry( *entryit );
assert( entry );
cout << " Entry " << (*entryit).local8Bit() << ":"
@@ -101,20 +101,20 @@ int main( int argc, char** argv ) {
}
case Kleo::CryptoConfigEntry::ArgType_Int: {
assert( entry->isOptional() ); // empty lists must be allowed (see issue121)
- QValueList<int> lst = entry->intValueList();
- QString str;
- for( QValueList<int>::Iterator it = lst.begin(); it != lst.end(); ++it ) {
- str += QString::number( *it );
+ TQValueList<int> lst = entry->intValueList();
+ TQString str;
+ for( TQValueList<int>::Iterator it = lst.begin(); it != lst.end(); ++it ) {
+ str += TQString::number( *it );
}
cout << " int values=" << str.local8Bit();
break;
}
case Kleo::CryptoConfigEntry::ArgType_UInt: {
assert( entry->isOptional() ); // empty lists must be allowed (see issue121)
- QValueList<uint> lst = entry->uintValueList();
- QString str;
- for( QValueList<uint>::Iterator it = lst.begin(); it != lst.end(); ++it ) {
- str += QString::number( *it );
+ TQValueList<uint> lst = entry->uintValueList();
+ TQString str;
+ for( TQValueList<uint>::Iterator it = lst.begin(); it != lst.end(); ++it ) {
+ str += TQString::number( *it );
}
cout << " uint values=" << str.local8Bit();
break;
@@ -132,7 +132,7 @@ int main( int argc, char** argv ) {
// fallthrough
case Kleo::CryptoConfigEntry::ArgType_String: {
assert( entry->isOptional() ); // empty lists must be allowed (see issue121)
- QStringList lst = entry->stringValueList();
+ TQStringList lst = entry->stringValueList();
cout << " string values=" << lst.join(" ").local8Bit();
break;
}
@@ -254,11 +254,11 @@ int main( int argc, char** argv ) {
Kleo::CryptoConfigEntry* entry = config->entry( "dirmngr", s_groupName, s_entryName );
if ( entry ) {
assert( entry->argType() == Kleo::CryptoConfigEntry::ArgType_Path );
- QString val = entry->stringValue();
+ TQString val = entry->stringValue();
cout << "Log-file initially: " << val.local8Bit() << endl;
// Test setting the option, sync'ing, then querying again
- entry->setStringValue( QString::fromUtf8( "/tmp/test:%e5ä" ) );
+ entry->setStringValue( TQString::fromUtf8( "/tmp/test:%e5ä" ) );
assert( entry->isDirty() );
config->sync( true );
@@ -273,14 +273,14 @@ int main( int argc, char** argv ) {
assert( entry );
assert( entry->argType() == Kleo::CryptoConfigEntry::ArgType_Path );
cout << "Log-file now: " << entry->stringValue().local8Bit() << endl;
- assert( entry->stringValue() == QString::fromUtf8( "/tmp/test:%e5ä" ) ); // (or even with %e5 decoded)
+ assert( entry->stringValue() == TQString::fromUtf8( "/tmp/test:%e5ä" ) ); // (or even with %e5 decoded)
// Reset old value
#if 0
- QString arg( val );
+ TQString arg( val );
if ( !arg.isEmpty() )
arg.prepend( '"' );
- QCString sys;
+ TQCString sys;
sys.sprintf( "echo 'log-file:%s' | gpgconf --change-options dirmngr", arg.local8Bit().data() );
system( sys.data() );
#endif
@@ -332,7 +332,7 @@ int main( int argc, char** argv ) {
assert( entry->argType() == Kleo::CryptoConfigEntry::ArgType_LDAPURL );
assert( entry->isList() );
// Get raw a:b:c:d:e form
- QStringList asStringList = entry->stringValueList();
+ TQStringList asStringList = entry->stringValueList();
assert( asStringList.count() == 3 );
cout << "asStringList[0]=" << asStringList[0].local8Bit() << endl;
cout << "asStringList[1]=" << asStringList[1].local8Bit() << endl;
diff --git a/certmanager/lib/tests/test_gnupgprocessbase.cpp b/certmanager/lib/tests/test_gnupgprocessbase.cpp
index 37e961801..29ca483f1 100644
--- a/certmanager/lib/tests/test_gnupgprocessbase.cpp
+++ b/certmanager/lib/tests/test_gnupgprocessbase.cpp
@@ -44,10 +44,10 @@
#include <kmessagebox.h>
#include <kdebug.h>
-#include <qstringlist.h>
+#include <tqstringlist.h>
-GnuPGViewer::GnuPGViewer( QWidget * parent, const char * name )
- : QTextEdit( parent, name ), mProcess( 0 )
+GnuPGViewer::GnuPGViewer( TQWidget * parent, const char * name )
+ : TQTextEdit( parent, name ), mProcess( 0 )
{
setTextFormat( LogText );
setMaxLogLines( 10000 );
@@ -62,24 +62,24 @@ void GnuPGViewer::setProcess( Kleo::GnuPGProcessBase * process ) {
if ( !process )
return;
mProcess = process;
- connect( mProcess, SIGNAL(processExited(KProcess*)),
- SLOT(slotProcessExited(KProcess*)) );
- connect( mProcess, SIGNAL(receivedStdout(KProcess*,char*,int)),
- SLOT(slotStdout(KProcess*,char*,int)) );
- connect( mProcess, SIGNAL(receivedStderr(KProcess*,char*,int)),
- SLOT(slotStderr(KProcess*,char*,int)) );
- connect( mProcess, SIGNAL(status(Kleo::GnuPGProcessBase*,const QString&,const QStringList&)),
- SLOT(slotStatus(Kleo::GnuPGProcessBase*,const QString&,const QStringList&)) );
+ connect( mProcess, TQT_SIGNAL(processExited(KProcess*)),
+ TQT_SLOT(slotProcessExited(KProcess*)) );
+ connect( mProcess, TQT_SIGNAL(receivedStdout(KProcess*,char*,int)),
+ TQT_SLOT(slotStdout(KProcess*,char*,int)) );
+ connect( mProcess, TQT_SIGNAL(receivedStderr(KProcess*,char*,int)),
+ TQT_SLOT(slotStderr(KProcess*,char*,int)) );
+ connect( mProcess, TQT_SIGNAL(status(Kleo::GnuPGProcessBase*,const TQString&,const TQStringList&)),
+ TQT_SLOT(slotStatus(Kleo::GnuPGProcessBase*,const TQString&,const TQStringList&)) );
}
-static QStringList split( char * buffer, int buflen, QString & old ) {
- // when done right, this would need to use QTextCodec...
- const QString str = old + QString::fromLocal8Bit( buffer, buflen );
- QStringList l = QStringList::split( '\n', str, true );
+static TQStringList split( char * buffer, int buflen, TQString & old ) {
+ // when done right, this would need to use TQTextCodec...
+ const TQString str = old + TQString::fromLocal8Bit( buffer, buflen );
+ TQStringList l = TQStringList::split( '\n', str, true );
if ( l.empty() )
return l;
if ( str.endsWith( "\n" ) ) {
- old = QString::null;
+ old = TQString::null;
} else {
old = l.back();
l.pop_back();
@@ -87,29 +87,29 @@ static QStringList split( char * buffer, int buflen, QString & old ) {
return l;
}
-static QString escape( QString str ) {
+static TQString escape( TQString str ) {
return str.replace( '&', "&amp" ).replace( '<', "&lt;" ).replace( '>', "&gt;" );
}
void GnuPGViewer::slotStdout( KProcess *, char * buffer, int buflen ) {
- const QStringList l = split( buffer, buflen, mLastStdout );
- for ( QStringList::const_iterator it = l.begin() ; it != l.end() ; ++it )
+ const TQStringList l = split( buffer, buflen, mLastStdout );
+ for ( TQStringList::const_iterator it = l.begin() ; it != l.end() ; ++it )
append( "stdout: " + escape( *it ) );
}
void GnuPGViewer::slotStderr( KProcess *, char * buffer, int buflen ) {
- const QStringList l = split( buffer, buflen, mLastStderr );
- for ( QStringList::const_iterator it = l.begin() ; it != l.end() ; ++it )
+ const TQStringList l = split( buffer, buflen, mLastStderr );
+ for ( TQStringList::const_iterator it = l.begin() ; it != l.end() ; ++it )
append( "<b>stderr: " + escape( *it ) + "</b>" );
}
-void GnuPGViewer::slotStatus( Kleo::GnuPGProcessBase *, const QString & type, const QStringList & args ) {
+void GnuPGViewer::slotStatus( Kleo::GnuPGProcessBase *, const TQString & type, const TQStringList & args ) {
append( "<b><font color=\"red\">status: " + escape( type + ' ' + args.join( " " ) ) + "</font></b>" );
}
void GnuPGViewer::slotProcessExited( KProcess * proc ) {
if ( !proc )
return;
if ( proc->normalExit() )
- append( QString( "<b>Process exit: return code %1</b>" ).arg ( proc->exitStatus() ) );
+ append( TQString( "<b>Process exit: return code %1</b>" ).arg ( proc->exitStatus() ) );
else
append( "<b>Process exit: killed</b>" );
}
diff --git a/certmanager/lib/tests/test_jobs.cpp b/certmanager/lib/tests/test_jobs.cpp
index 22d9136d4..dfa17a450 100644
--- a/certmanager/lib/tests/test_jobs.cpp
+++ b/certmanager/lib/tests/test_jobs.cpp
@@ -72,14 +72,14 @@ static void testSign()
Kleo::SignJob* job = proto->signJob( true, true );
- QCString cText = "Hallo Leute\n"; // like gpgme's t-sign.c
- QByteArray plainText;
+ TQCString cText = "Hallo Leute\n"; // like gpgme's t-sign.c
+ TQByteArray plainText;
plainText.duplicate( cText.data(), cText.length() ); // hrmpf...
kdDebug() << k_funcinfo << "plainText=" << cText.data() << endl;
kdDebug() << k_funcinfo << " signing with " << signingKeys[0].primaryFingerprint() << endl;
- QByteArray signature;
+ TQByteArray signature;
const GpgME::SigningResult res =
job->exec( signingKeys, plainText, GpgME::Context::Clearsigned, signature );
if ( res.error().isCanceled() ) {
@@ -91,7 +91,7 @@ static void testSign()
return;
}
kdDebug() << k_funcinfo << "signing resulted in signature="
- << QCString( signature.data(), signature.size() + 1 ) << endl;
+ << TQCString( signature.data(), signature.size() + 1 ) << endl;
}
int main( int argc, char** argv ) {
diff --git a/certmanager/lib/tests/test_keygen.cpp b/certmanager/lib/tests/test_keygen.cpp
index 9303b331c..7a751bc1d 100644
--- a/certmanager/lib/tests/test_keygen.cpp
+++ b/certmanager/lib/tests/test_keygen.cpp
@@ -49,12 +49,12 @@
#include <kmessagebox.h>
#include <kdebug.h>
-#include <qmessagebox.h>
-#include <qstringlist.h>
-#include <qtimer.h>
-#include <qlayout.h>
-#include <qlineedit.h>
-#include <qlabel.h>
+#include <tqmessagebox.h>
+#include <tqstringlist.h>
+#include <tqtimer.h>
+#include <tqlayout.h>
+#include <tqlineedit.h>
+#include <tqlabel.h>
#include <assert.h>
@@ -69,40 +69,40 @@ static const int numKeyParams = sizeof keyParams / sizeof *keyParams;
static const char * protocol = 0;
-KeyGenerator::KeyGenerator( QWidget * parent, const char * name, WFlags )
+KeyGenerator::KeyGenerator( TQWidget * parent, const char * name, WFlags )
: KDialogBase( parent, name, true, "KeyGenerationJob test",
Close|User1, User1, true, KGuiItem( "Create" ) )
{
- QWidget * w = new QWidget( this );
+ TQWidget * w = new TQWidget( this );
setMainWidget( w );
- QGridLayout * glay = new QGridLayout( w, numKeyParams+3, 2, marginHint(), spacingHint() );
+ TQGridLayout * glay = new TQGridLayout( w, numKeyParams+3, 2, marginHint(), spacingHint() );
int row = -1;
++row;
- glay->addMultiCellWidget( new QLabel( "<GnupgKeyParms format=\"internal\">", w ),
+ glay->addMultiCellWidget( new TQLabel( "<GnupgKeyParms format=\"internal\">", w ),
row, row, 0, 1 );
for ( int i = 0 ; i < numKeyParams ; ++i ) {
++row;
- glay->addWidget( new QLabel( keyParams[i], w ), row, 0 );
- glay->addWidget( mLineEdits[i] = new QLineEdit( w ), row, 1 );
+ glay->addWidget( new TQLabel( keyParams[i], w ), row, 0 );
+ glay->addWidget( mLineEdits[i] = new TQLineEdit( w ), row, 1 );
}
++row;
- glay->addMultiCellWidget( new QLabel( "</GnupgKeyParms>", w ),
+ glay->addMultiCellWidget( new TQLabel( "</GnupgKeyParms>", w ),
row, row, 0, 1 );
++row;
glay->setRowStretch( row, 1 );
glay->setColStretch( 1, 1 );
- connect( this, SIGNAL(user1Clicked()), SLOT(slotStartKeyGeneration()) );
+ connect( this, TQT_SIGNAL(user1Clicked()), TQT_SLOT(slotStartKeyGeneration()) );
}
KeyGenerator::~KeyGenerator() {}
void KeyGenerator::slotStartKeyGeneration() {
- QString params = "<GnupgKeyParms format=\"internal\">\n";
+ TQString params = "<GnupgKeyParms format=\"internal\">\n";
for ( int i = 0 ; i < numKeyParams ; ++i )
if ( mLineEdits[i] && !mLineEdits[i]->text().stripWhiteSpace().isEmpty() )
params += keyParams[i] + ( ": " + mLineEdits[i]->text().stripWhiteSpace() ) + '\n';
@@ -118,8 +118,8 @@ void KeyGenerator::slotStartKeyGeneration() {
Kleo::KeyGenerationJob * job = proto->keyGenerationJob();
assert( job );
- connect( job, SIGNAL(result(const GpgME::KeyGenerationResult&,const QByteArray&)),
- SLOT(slotResult(const GpgME::KeyGenerationResult&,const QByteArray&)) );
+ connect( job, TQT_SIGNAL(result(const GpgME::KeyGenerationResult&,const TQByteArray&)),
+ TQT_SLOT(slotResult(const GpgME::KeyGenerationResult&,const TQByteArray&)) );
const GpgME::Error err = job->start( params );
if ( err )
@@ -129,15 +129,15 @@ void KeyGenerator::slotStartKeyGeneration() {
}
void KeyGenerator::showError( const GpgME::Error & err ) {
- KMessageBox::error( this, "Could not start key generation: " + QString::fromLocal8Bit( err.asString() ),
+ KMessageBox::error( this, "Could not start key generation: " + TQString::fromLocal8Bit( err.asString() ),
"Key Generation Error" );
}
-void KeyGenerator::slotResult( const GpgME::KeyGenerationResult & res, const QByteArray & keyData ) {
+void KeyGenerator::slotResult( const GpgME::KeyGenerationResult & res, const TQByteArray & keyData ) {
if ( res.error() )
showError( res.error() );
else
- KMessageBox::information( this, QString("Key generated successfully, %1 bytes long").arg( keyData.size() ),
+ KMessageBox::information( this, TQString("Key generated successfully, %1 bytes long").arg( keyData.size() ),
"Key Generation Finished" );
}
diff --git a/certmanager/lib/tests/test_keygen.h b/certmanager/lib/tests/test_keygen.h
index 0ba713823..80aec1e6f 100644
--- a/certmanager/lib/tests/test_keygen.h
+++ b/certmanager/lib/tests/test_keygen.h
@@ -34,7 +34,7 @@
#include <kdialogbase.h>
-#include <qcstring.h>
+#include <tqcstring.h>
namespace GpgME {
class Error;
@@ -46,17 +46,17 @@ class QLineEdit;
class KeyGenerator : public KDialogBase {
Q_OBJECT
public:
- KeyGenerator( QWidget * parent=0, const char * name=0, WFlags f=0 );
+ KeyGenerator( TQWidget * parent=0, const char * name=0, WFlags f=0 );
~KeyGenerator();
public slots:
void slotStartKeyGeneration();
- void slotResult( const GpgME::KeyGenerationResult & res, const QByteArray & keyData );
+ void slotResult( const GpgME::KeyGenerationResult & res, const TQByteArray & keyData );
private:
void showError( const GpgME::Error & err );
private:
- QLineEdit * mLineEdits[20];
+ TQLineEdit * mLineEdits[20];
};
#endif // __KLEO_TEST_KEYGEN_H__
diff --git a/certmanager/lib/tests/test_keylister.cpp b/certmanager/lib/tests/test_keylister.cpp
index 9507221e7..1f032bb17 100644
--- a/certmanager/lib/tests/test_keylister.cpp
+++ b/certmanager/lib/tests/test_keylister.cpp
@@ -45,9 +45,9 @@
#include <kcmdlineargs.h>
#include <kdebug.h>
-#include <qmessagebox.h>
-#include <qstringlist.h>
-#include <qtimer.h>
+#include <tqmessagebox.h>
+#include <tqstringlist.h>
+#include <tqtimer.h>
#include <assert.h>
@@ -55,12 +55,12 @@ namespace {
class TestColumnStrategy : public Kleo::KeyListView::ColumnStrategy {
public:
~TestColumnStrategy() {}
- QString title( int col ) const;
- QString toolTip( const GpgME::Key & key, int col ) const;
- QString text( const GpgME::Key & key, int col ) const;
+ TQString title( int col ) const;
+ TQString toolTip( const GpgME::Key & key, int col ) const;
+ TQString text( const GpgME::Key & key, int col ) const;
};
- QString TestColumnStrategy::title( int col ) const {
+ TQString TestColumnStrategy::title( int col ) const {
switch ( col ) {
case 0: return "Subject";
case 1: return "EMail";
@@ -68,30 +68,30 @@ namespace {
case 3: return "Serial";
case 4: return "Protocol";
case 5: return "Validity";
- default: return QString::null;
+ default: return TQString::null;
}
}
- QString TestColumnStrategy::toolTip( const GpgME::Key & key, int ) const {
- return "Fingerprint: " + QString::fromUtf8( key.primaryFingerprint() );
+ TQString TestColumnStrategy::toolTip( const GpgME::Key & key, int ) const {
+ return "Fingerprint: " + TQString::fromUtf8( key.primaryFingerprint() );
}
- QString TestColumnStrategy::text( const GpgME::Key & key, int col ) const {
+ TQString TestColumnStrategy::text( const GpgME::Key & key, int col ) const {
if ( key.isNull() )
return "<null>";
switch ( col ) {
- case 0: return QString::fromUtf8( key.userID(0).id() );
- case 1: return QString::fromUtf8( key.userID(0).email() );
- case 2: return QString::fromUtf8( key.issuerName() );
+ case 0: return TQString::fromUtf8( key.userID(0).id() );
+ case 1: return TQString::fromUtf8( key.userID(0).email() );
+ case 2: return TQString::fromUtf8( key.issuerName() );
case 3: return key.issuerSerial();
case 4: return key.protocolAsString();
- case 5: return QChar( key.userID(0).validityAsString() );
- default: return QString::null;
+ case 5: return TQChar( key.userID(0).validityAsString() );
+ default: return TQString::null;
}
}
}
-CertListView::CertListView( QWidget * parent, const char * name, WFlags f )
+CertListView::CertListView( TQWidget * parent, const char * name, WFlags f )
: Kleo::KeyListView( new TestColumnStrategy(), 0, parent, name, f )
{
setHierarchical( true );
@@ -101,30 +101,30 @@ CertListView::CertListView( QWidget * parent, const char * name, WFlags f )
void CertListView::slotResult( const GpgME::KeyListResult & result ) {
kdDebug() << "CertListView::slotResult()" << endl;
if ( result.isNull() )
- QMessageBox::information( this, "Key Listing Result", "KeyListResult is null!" );
+ TQMessageBox::information( this, "Key Listing Result", "KeyListResult is null!" );
else if ( result.error() )
- QMessageBox::critical( this, "Key Listing Result",
- QString("KeyListResult Error: %1").arg( result.error().asString() ) );
+ TQMessageBox::critical( this, "Key Listing Result",
+ TQString("KeyListResult Error: %1").arg( result.error().asString() ) );
else if ( result.isTruncated() )
- QMessageBox::information( this, "Key Listing Result", "KeyListResult is truncated!" );
+ TQMessageBox::information( this, "Key Listing Result", "KeyListResult is truncated!" );
else
- QMessageBox::information( this, "Key Listing Result", "Key listing successful" );
+ TQMessageBox::information( this, "Key Listing Result", "Key listing successful" );
}
void CertListView::slotStart() {
kdDebug() << "CertListView::slotStart()" << endl;
Kleo::KeyListJob * job = Kleo::CryptoBackendFactory::instance()->smime()->keyListJob( false );
assert( job );
- QObject::connect( job, SIGNAL(nextKey(const GpgME::Key&)),
- this, SLOT(slotAddKey(const GpgME::Key&)) );
- QObject::connect( job, SIGNAL(result(const GpgME::KeyListResult&)),
- this, SLOT(slotResult(const GpgME::KeyListResult&)) );
+ TQObject::connect( job, TQT_SIGNAL(nextKey(const GpgME::Key&)),
+ this, TQT_SLOT(slotAddKey(const GpgME::Key&)) );
+ TQObject::connect( job, TQT_SIGNAL(result(const GpgME::KeyListResult&)),
+ this, TQT_SLOT(slotResult(const GpgME::KeyListResult&)) );
#if 0
- QStringList l;
+ TQStringList l;
l << "Marc";
job->start( l, false );
#else
- job->start( QStringList(), false );
+ job->start( TQStringList(), false );
#endif
}
@@ -138,7 +138,7 @@ int main( int argc, char** argv ) {
app.setMainWidget( clv );
clv->show();
- QTimer::singleShot( 5000, clv, SLOT(slotStart()) );
+ TQTimer::singleShot( 5000, clv, TQT_SLOT(slotStart()) );
return app.exec();
}
diff --git a/certmanager/lib/tests/test_keylister.h b/certmanager/lib/tests/test_keylister.h
index 348ec262f..23cd99e3e 100644
--- a/certmanager/lib/tests/test_keylister.h
+++ b/certmanager/lib/tests/test_keylister.h
@@ -42,7 +42,7 @@ namespace GpgME {
class CertListView : public Kleo::KeyListView {
Q_OBJECT
public:
- CertListView( QWidget * parent=0, const char * name=0, WFlags f=0 );
+ CertListView( TQWidget * parent=0, const char * name=0, WFlags f=0 );
public slots:
void slotResult( const GpgME::KeyListResult & result );
diff --git a/certmanager/lib/tests/test_keyselectiondialog.cpp b/certmanager/lib/tests/test_keyselectiondialog.cpp
index e6c85fca0..1e3794bc6 100644
--- a/certmanager/lib/tests/test_keyselectiondialog.cpp
+++ b/certmanager/lib/tests/test_keyselectiondialog.cpp
@@ -55,7 +55,7 @@ int main( int argc, char ** argv ) {
std::vector<GpgME::Key>(),
Kleo::KeySelectionDialog::AllKeys, true, true );
- if ( dlg.exec() == QDialog::Accepted ) {
+ if ( dlg.exec() == TQDialog::Accepted ) {
kdDebug() << "accepted; selected key: " << (dlg.selectedKey().userID(0).id() ? dlg.selectedKey().userID(0).id() : "<null>") << "\nselected _keys_:" << endl;
for ( std::vector<GpgME::Key>::const_iterator it = dlg.selectedKeys().begin() ; it != dlg.selectedKeys().end() ; ++it )
kdDebug() << (it->userID(0).id() ? it->userID(0).id() : "<null>") << endl;
diff --git a/certmanager/lib/tests/test_verify.cpp b/certmanager/lib/tests/test_verify.cpp
index a81e50466..54a88b4c2 100644
--- a/certmanager/lib/tests/test_verify.cpp
+++ b/certmanager/lib/tests/test_verify.cpp
@@ -41,8 +41,8 @@
#include <kapplication.h>
#include <kcmdlineargs.h>
-#include <qdir.h>
-#include <qfile.h>
+#include <tqdir.h>
+#include <tqfile.h>
#include <assert.h>
@@ -50,18 +50,18 @@ int main( int argc, char **argv )
{
setenv("GNUPGHOME", KDESRCDIR "/gnupg_home", 1 );
setenv("LC_ALL", "C", 1);
- setenv("KDEHOME", QFile::encodeName( QDir::homeDirPath() + "/.kde-unit-test" ), 1);
+ setenv("KDEHOME", TQFile::encodeName( TQDir::homeDirPath() + "/.kde-unit-test" ), 1);
KAboutData aboutData( "test_verify", "verify job test", "0.1" );
KCmdLineArgs::init( argc, argv, &aboutData );
KApplication app( false, false );
- const QString sigFileName = KDESRCDIR "/test.data.sig";
- const QString dataFileName = KDESRCDIR "/test.data";
+ const TQString sigFileName = KDESRCDIR "/test.data.sig";
+ const TQString dataFileName = KDESRCDIR "/test.data";
- QFile sigFile( sigFileName );
+ TQFile sigFile( sigFileName );
assert( sigFile.open( IO_ReadOnly ) );
- QFile dataFile( dataFileName );
+ TQFile dataFile( dataFileName );
assert( dataFile.open( IO_ReadOnly ) );
const Kleo::CryptoBackend::Protocol * const backend = Kleo::CryptoBackendFactory::instance()->protocol( "openpgp" );
@@ -76,10 +76,10 @@ int main( int argc, char **argv )
assert( sig.creationTime() == 1189650248L );
assert( sig.validity() == GpgME::Signature::Full );
- const QString opaqueFileName = KDESRCDIR "/test.data.gpg";
- QFile opaqueFile( opaqueFileName );
+ const TQString opaqueFileName = KDESRCDIR "/test.data.gpg";
+ TQFile opaqueFile( opaqueFileName );
assert( opaqueFile.open( IO_ReadOnly ) );
- QByteArray clearText;
+ TQByteArray clearText;
Kleo::VerifyOpaqueJob *job2 = backend->verifyOpaqueJob();
result = job2->exec( opaqueFile.readAll(), clearText );
diff --git a/certmanager/lib/ui/adddirectoryservicedialogimpl.cpp b/certmanager/lib/ui/adddirectoryservicedialogimpl.cpp
index 973266b16..7567be710 100644
--- a/certmanager/lib/ui/adddirectoryservicedialogimpl.cpp
+++ b/certmanager/lib/ui/adddirectoryservicedialogimpl.cpp
@@ -36,7 +36,7 @@
#include "adddirectoryservicedialogimpl.h"
-#include <qvalidator.h>
+#include <tqvalidator.h>
#include <klineedit.h>
/*
@@ -46,10 +46,10 @@
* The dialog will by default be modeless, unless you set 'modal' to
* TRUE to construct a modal dialog.
*/
-AddDirectoryServiceDialogImpl::AddDirectoryServiceDialogImpl( QWidget* parent, const char* name, bool modal, WFlags fl )
+AddDirectoryServiceDialogImpl::AddDirectoryServiceDialogImpl( TQWidget* parent, const char* name, bool modal, WFlags fl )
: AddDirectoryServiceDialog( parent, name, modal, fl )
{
- portED->setValidator( new QIntValidator( 0, 65535, portED ) );
+ portED->setValidator( new TQIntValidator( 0, 65535, portED ) );
}
/*
diff --git a/certmanager/lib/ui/adddirectoryservicedialogimpl.h b/certmanager/lib/ui/adddirectoryservicedialogimpl.h
index deee06439..3fc0d6a55 100644
--- a/certmanager/lib/ui/adddirectoryservicedialogimpl.h
+++ b/certmanager/lib/ui/adddirectoryservicedialogimpl.h
@@ -39,7 +39,7 @@ class AddDirectoryServiceDialogImpl : public AddDirectoryServiceDialog
Q_OBJECT
public:
- AddDirectoryServiceDialogImpl( QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
+ AddDirectoryServiceDialogImpl( TQWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
~AddDirectoryServiceDialogImpl();
};
diff --git a/certmanager/lib/ui/backendconfigwidget.cpp b/certmanager/lib/ui/backendconfigwidget.cpp
index c40890a43..2871b920f 100644
--- a/certmanager/lib/ui/backendconfigwidget.cpp
+++ b/certmanager/lib/ui/backendconfigwidget.cpp
@@ -49,10 +49,10 @@
#include <kapplication.h>
#include <dcopclient.h>
-#include <qpushbutton.h>
-#include <qlayout.h>
-#include <qheader.h>
-#include <qtimer.h>
+#include <tqpushbutton.h>
+#include <tqlayout.h>
+#include <tqheader.h>
+#include <tqtimer.h>
#include <assert.h>
@@ -63,8 +63,8 @@ namespace Kleo {
class Kleo::BackendConfigWidget::Private {
public:
Kleo::BackendListView * listView;
- QPushButton * configureButton;
- QPushButton * rescanButton;
+ TQPushButton * configureButton;
+ TQPushButton * rescanButton;
Kleo::CryptoBackendFactory * backendFactory;
};
@@ -86,7 +86,7 @@ public:
const Kleo::CryptoBackend* chosenBackend( const char * protocol );
/// deselect all except one for a given protocol type (radiobutton-like exclusivity)
- void deselectAll( const char * protocol, QCheckListItem* except );
+ void deselectAll( const char * protocol, TQCheckListItem* except );
void emitChanged() { static_cast<BackendConfigWidget *>( parentWidget() )->emitChanged( true ); }
};
@@ -95,8 +95,8 @@ public:
class Kleo::BackendListViewItem : public QListViewItem
{
public:
- BackendListViewItem( KListView* lv, QListViewItem *prev, const CryptoBackend *cryptoBackend )
- : QListViewItem( lv, prev, cryptoBackend->displayName() ), mCryptoBackend( cryptoBackend )
+ BackendListViewItem( KListView* lv, TQListViewItem *prev, const CryptoBackend *cryptoBackend )
+ : TQListViewItem( lv, prev, cryptoBackend->displayName() ), mCryptoBackend( cryptoBackend )
{}
const CryptoBackend *cryptoBackend() const { return mCryptoBackend; }
@@ -114,10 +114,10 @@ class Kleo::ProtocolCheckListItem : public QCheckListItem
{
public:
ProtocolCheckListItem( BackendListViewItem* blvi,
- QListViewItem* prev, const char * protocolName,
+ TQListViewItem* prev, const char * protocolName,
const CryptoBackend::Protocol* protocol ) // can be 0
- : QCheckListItem( blvi, prev, itemText( protocolName, protocol ),
- QCheckListItem::CheckBox ),
+ : TQCheckListItem( blvi, prev, itemText( protocolName, protocol ),
+ TQCheckListItem::CheckBox ),
mProtocol( protocol ), mProtocolName( protocolName )
{}
@@ -135,20 +135,20 @@ protected:
if ( b )
lv->deselectAll( mProtocolName, this );
lv->emitChanged();
- QCheckListItem::stateChange( b );
+ TQCheckListItem::stateChange( b );
}
private:
// Helper for the constructor.
- static QString itemText( const char * protocolName, const CryptoBackend::Protocol* protocol ) {
+ static TQString itemText( const char * protocolName, const CryptoBackend::Protocol* protocol ) {
// First one is the generic name (find a nice one for OpenPGP, SMIME)
- const QString protoName = qstricmp( protocolName, "openpgp" ) != 0
+ const TQString protoName = qstricmp( protocolName, "openpgp" ) != 0
? qstricmp( protocolName, "smime" ) != 0
- ? QString::fromLatin1( protocolName )
+ ? TQString::fromLatin1( protocolName )
: i18n( "S/MIME" )
: i18n( "OpenPGP" );
// second one is implementation name (gpg, gpgsm...)
- const QString impName = protocol ? protocol->displayName() : i18n( "failed" );
+ const TQString impName = protocol ? protocol->displayName() : i18n( "failed" );
return i18n( "Items in Kleo::BackendConfigWidget listview (1: protocol; 2: implementation name)",
"%1 (%2)" ).arg( protoName, impName );
}
@@ -158,7 +158,7 @@ private:
};
const Kleo::CryptoBackend* Kleo::BackendListView::currentBackend() const {
- const QListViewItem* curItem = currentItem();
+ const TQListViewItem* curItem = currentItem();
if ( !curItem ) // can't happen
return 0;
if ( lvi_cast<Kleo::ProtocolCheckListItem>( curItem ) )
@@ -168,10 +168,10 @@ const Kleo::CryptoBackend* Kleo::BackendListView::currentBackend() const {
return 0;
}
-// can't be const method due to QListViewItemIterator (why?)
+// can't be const method due to TQListViewItemIterator (why?)
const Kleo::CryptoBackend* Kleo::BackendListView::chosenBackend( const char * protocolName )
{
- for ( QListViewItemIterator it( this /*, QListViewItemIterator::Checked doesn't work*/ ) ;
+ for ( TQListViewItemIterator it( this /*, TQListViewItemIterator::Checked doesn't work*/ ) ;
it.current() ; ++it )
if ( ProtocolCheckListItem * p = lvi_cast<ProtocolCheckListItem>( it.current() ) )
if ( p->isOn() && qstricmp( p->protocolName(), protocolName ) == 0 ) {
@@ -183,9 +183,9 @@ const Kleo::CryptoBackend* Kleo::BackendListView::chosenBackend( const char * pr
return 0;
}
-void Kleo::BackendListView::deselectAll( const char * protocolName, QCheckListItem* except )
+void Kleo::BackendListView::deselectAll( const char * protocolName, TQCheckListItem* except )
{
- for ( QListViewItemIterator it( this /*, QListViewItemIterator::Checked doesn't work*/ ) ;
+ for ( TQListViewItemIterator it( this /*, TQListViewItemIterator::Checked doesn't work*/ ) ;
it.current() ; ++it ) {
if ( it.current() == except ) continue;
if ( ProtocolCheckListItem * p = lvi_cast<ProtocolCheckListItem>( it.current() ) )
@@ -196,15 +196,15 @@ void Kleo::BackendListView::deselectAll( const char * protocolName, QCheckListIt
////
-Kleo::BackendConfigWidget::BackendConfigWidget( CryptoBackendFactory * factory, QWidget * parent, const char * name, WFlags f )
- : QWidget( parent, name, f ), d( 0 )
+Kleo::BackendConfigWidget::BackendConfigWidget( CryptoBackendFactory * factory, TQWidget * parent, const char * name, WFlags f )
+ : TQWidget( parent, name, f ), d( 0 )
{
assert( factory );
d = new Private();
d->backendFactory = factory;
- QHBoxLayout * hlay =
- new QHBoxLayout( this, 0, KDialog::spacingHint() );
+ TQHBoxLayout * hlay =
+ new TQHBoxLayout( this, 0, KDialog::spacingHint() );
d->listView = new BackendListView( this, "d->listView" );
d->listView->addColumn( i18n("Available Backends") );
@@ -215,24 +215,24 @@ Kleo::BackendConfigWidget::BackendConfigWidget( CryptoBackendFactory * factory,
hlay->addWidget( d->listView, 1 );
- connect( d->listView, SIGNAL(selectionChanged(QListViewItem*)),
- SLOT(slotSelectionChanged(QListViewItem*)) );
+ connect( d->listView, TQT_SIGNAL(selectionChanged(TQListViewItem*)),
+ TQT_SLOT(slotSelectionChanged(TQListViewItem*)) );
- QVBoxLayout * vlay = new QVBoxLayout( hlay ); // inherits spacing
+ TQVBoxLayout * vlay = new TQVBoxLayout( hlay ); // inherits spacing
- d->configureButton = new QPushButton( i18n("Confi&gure..."), this );
+ d->configureButton = new TQPushButton( i18n("Confi&gure..."), this );
d->configureButton->setAutoDefault( false );
vlay->addWidget( d->configureButton );
- connect( d->configureButton, SIGNAL(clicked()),
- SLOT(slotConfigureButtonClicked()) );
+ connect( d->configureButton, TQT_SIGNAL(clicked()),
+ TQT_SLOT(slotConfigureButtonClicked()) );
- d->rescanButton = new QPushButton( i18n("Rescan"), this );
+ d->rescanButton = new TQPushButton( i18n("Rescan"), this );
d->rescanButton->setAutoDefault( false );
vlay->addWidget( d->rescanButton );
- connect( d->rescanButton, SIGNAL(clicked()),
- SLOT(slotRescanButtonClicked()) );
+ connect( d->rescanButton, TQT_SIGNAL(clicked()),
+ TQT_SLOT(slotRescanButtonClicked()) );
vlay->addStretch( 1 );
}
@@ -278,7 +278,7 @@ void Kleo::BackendConfigWidget::load() {
slotSelectionChanged( d->listView->firstChild() );
}
-void Kleo::BackendConfigWidget::slotSelectionChanged( QListViewItem * ) {
+void Kleo::BackendConfigWidget::slotSelectionChanged( TQListViewItem * ) {
const CryptoBackend* backend = d->listView->currentBackend();
if ( backend && !backend->config() )
kdDebug(5150) << "Backend w/o config object!" << endl;
@@ -287,7 +287,7 @@ void Kleo::BackendConfigWidget::slotSelectionChanged( QListViewItem * ) {
void Kleo::BackendConfigWidget::slotRescanButtonClicked() {
- QStringList reasons;
+ TQStringList reasons;
d->backendFactory->scanForBackends( &reasons );
if ( !reasons.empty() )
KMessageBox::informationList( this,
@@ -302,11 +302,11 @@ void Kleo::BackendConfigWidget::slotConfigureButtonClicked() {
if ( backend && backend->config() ) {
Kleo::CryptoConfigDialog dlg( backend->config(), this );
int result = dlg.exec();
- if ( result == QDialog::Accepted ) {
+ if ( result == TQDialog::Accepted ) {
// Tell other users of gpgconf (e.g. the s/mime page) that the gpgconf data might have changed
- kapp->dcopClient()->emitDCOPSignal( "KPIM::CryptoConfig", "changed()", QByteArray() );
+ kapp->dcopClient()->emitDCOPSignal( "KPIM::CryptoConfig", "changed()", TQByteArray() );
// and schedule a rescan, in case the updates make a backend valid
- QTimer::singleShot( 0, this, SLOT(slotRescanButtonClicked()) );
+ TQTimer::singleShot( 0, this, TQT_SLOT(slotRescanButtonClicked()) );
}
}
else // shouldn't happen, button is disabled
diff --git a/certmanager/lib/ui/backendconfigwidget.h b/certmanager/lib/ui/backendconfigwidget.h
index 0e26655ce..57a1675a7 100644
--- a/certmanager/lib/ui/backendconfigwidget.h
+++ b/certmanager/lib/ui/backendconfigwidget.h
@@ -34,7 +34,7 @@
#ifndef __KLEO_UI_BACKENDCONFIGWIDGET_H__
#define __KLEO_UI_BACKENDCONFIGWIDGET_H__
-#include <qwidget.h>
+#include <tqwidget.h>
#include <kdepimmacros.h>
namespace Kleo {
@@ -45,10 +45,10 @@ class QListViewItem;
namespace Kleo {
- class KDE_EXPORT BackendConfigWidget : public QWidget {
+ class KDE_EXPORT BackendConfigWidget : public TQWidget {
Q_OBJECT
public:
- BackendConfigWidget( CryptoBackendFactory * factory, QWidget * parent=0, const char * name=0, WFlags f=0 );
+ BackendConfigWidget( CryptoBackendFactory * factory, TQWidget * parent=0, const char * name=0, WFlags f=0 );
~BackendConfigWidget();
void load();
@@ -60,7 +60,7 @@ namespace Kleo {
void changed( bool );
private slots:
- void slotSelectionChanged( QListViewItem * );
+ void slotSelectionChanged( TQListViewItem * );
void slotRescanButtonClicked();
void slotConfigureButtonClicked();
diff --git a/certmanager/lib/ui/cryptoconfigdialog.cpp b/certmanager/lib/ui/cryptoconfigdialog.cpp
index 3fa0a97ca..472429942 100644
--- a/certmanager/lib/ui/cryptoconfigdialog.cpp
+++ b/certmanager/lib/ui/cryptoconfigdialog.cpp
@@ -34,7 +34,7 @@
#include <klocale.h>
#include <kaccelmanager.h>
-Kleo::CryptoConfigDialog::CryptoConfigDialog( Kleo::CryptoConfig* config, QWidget *parent, const char* name )
+Kleo::CryptoConfigDialog::CryptoConfigDialog( Kleo::CryptoConfig* config, TQWidget *parent, const char* name )
: KDialogBase( Swallow,
// Remove the "whats's this" button since we have no support for it
WStyle_Customize | WStyle_DialogBorder | WStyle_Maximize | WStyle_Title | WStyle_SysMenu,
@@ -44,7 +44,7 @@ Kleo::CryptoConfigDialog::CryptoConfigDialog( Kleo::CryptoConfig* config, QWidge
{
mMainWidget = new CryptoConfigModule( config, this );
setMainWidget( mMainWidget );
- connect( mMainWidget, SIGNAL( changed() ), SLOT( slotChanged() ) );
+ connect( mMainWidget, TQT_SIGNAL( changed() ), TQT_SLOT( slotChanged() ) );
enableButton( Apply, false );
// Automatically assign accelerators
diff --git a/certmanager/lib/ui/cryptoconfigdialog.h b/certmanager/lib/ui/cryptoconfigdialog.h
index 484c55ea4..d25cdc16c 100644
--- a/certmanager/lib/ui/cryptoconfigdialog.h
+++ b/certmanager/lib/ui/cryptoconfigdialog.h
@@ -47,7 +47,7 @@ namespace Kleo {
{
Q_OBJECT
public:
- CryptoConfigDialog( Kleo::CryptoConfig* config, QWidget *parent = 0, const char* name = 0 );
+ CryptoConfigDialog( Kleo::CryptoConfig* config, TQWidget *parent = 0, const char* name = 0 );
protected:
virtual void slotOk();
diff --git a/certmanager/lib/ui/cryptoconfigmodule.cpp b/certmanager/lib/ui/cryptoconfigmodule.cpp
index dbc8edc57..70b0a0be4 100644
--- a/certmanager/lib/ui/cryptoconfigmodule.cpp
+++ b/certmanager/lib/ui/cryptoconfigmodule.cpp
@@ -45,21 +45,21 @@
#include <kglobal.h>
#include <kurlrequester.h>
-#include <qgrid.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qvbox.h>
-#include <qhbox.h>
-#include <qpushbutton.h>
-#include <qregexp.h>
-#include <qstyle.h>
-#include <qapplication.h>
+#include <tqgrid.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqvbox.h>
+#include <tqhbox.h>
+#include <tqpushbutton.h>
+#include <tqregexp.h>
+#include <tqstyle.h>
+#include <tqapplication.h>
using namespace Kleo;
-static inline QPixmap loadIcon( QString s ) {
+static inline TQPixmap loadIcon( TQString s ) {
return KGlobal::instance()->iconLoader()
- ->loadIcon( s.replace( QRegExp( "[^a-zA-Z0-9_]" ), "_" ), KIcon::NoGroup, KIcon::SizeMedium );
+ ->loadIcon( s.replace( TQRegExp( "[^a-zA-Z0-9_]" ), "_" ), KIcon::NoGroup, KIcon::SizeMedium );
}
static const KJanusWidget::Face determineJanusFace( const Kleo::CryptoConfig * config ) {
@@ -68,31 +68,31 @@ static const KJanusWidget::Face determineJanusFace( const Kleo::CryptoConfig * c
: KJanusWidget::IconList ;
}
-Kleo::CryptoConfigModule::CryptoConfigModule( Kleo::CryptoConfig* config, QWidget * parent, const char * name )
+Kleo::CryptoConfigModule::CryptoConfigModule( Kleo::CryptoConfig* config, TQWidget * parent, const char * name )
: KJanusWidget( parent, name, determineJanusFace( config ) ), mConfig( config )
{
- QWidget * vbox = 0;
+ TQWidget * vbox = 0;
if ( face() == Plain ) {
vbox = plainPage();
- QVBoxLayout * vlay = new QVBoxLayout( vbox, 0, KDialog::spacingHint() );
+ TQVBoxLayout * vlay = new TQVBoxLayout( vbox, 0, KDialog::spacingHint() );
vlay->setAutoAdd( true );
}
- const QStringList components = config->componentList();
- for ( QStringList::const_iterator it = components.begin(); it != components.end(); ++it ) {
+ const TQStringList components = config->componentList();
+ for ( TQStringList::const_iterator it = components.begin(); it != components.end(); ++it ) {
//kdDebug(5150) << "Component " << (*it).local8Bit() << ":" << endl;
Kleo::CryptoConfigComponent* comp = config->component( *it );
Q_ASSERT( comp );
if ( comp->groupList().empty() )
continue;
if ( face() != Plain ) {
- vbox = addVBoxPage( comp->description(), QString::null, loadIcon( comp->iconName() ) );
+ vbox = addVBoxPage( comp->description(), TQString::null, loadIcon( comp->iconName() ) );
}
- QScrollView * scrollView = new QScrollView( vbox );
- scrollView->setHScrollBarMode( QScrollView::AlwaysOff );
- scrollView->setResizePolicy( QScrollView::AutoOneFit );
- QVBox* boxInScrollView = new QVBox( scrollView->viewport() );
+ TQScrollView * scrollView = new TQScrollView( vbox );
+ scrollView->setHScrollBarMode( TQScrollView::AlwaysOff );
+ scrollView->setResizePolicy( TQScrollView::AutoOneFit );
+ TQVBox* boxInScrollView = new TQVBox( scrollView->viewport() );
boxInScrollView->setMargin( KDialog::marginHint() );
scrollView->addChild( boxInScrollView );
@@ -102,7 +102,7 @@ Kleo::CryptoConfigModule::CryptoConfigModule( Kleo::CryptoConfig* config, QWidge
mComponentGUIs.append( compGUI );
// Set a nice startup size
- const int deskHeight = QApplication::desktop()->height();
+ const int deskHeight = TQApplication::desktop()->height();
int dialogHeight;
if (deskHeight > 1000) // very big desktop ?
dialogHeight = 800;
@@ -110,9 +110,9 @@ Kleo::CryptoConfigModule::CryptoConfigModule( Kleo::CryptoConfig* config, QWidge
dialogHeight = 500;
else // small (800x600, 640x480) desktop
dialogHeight = 400;
- QSize sz = scrollView->sizeHint();
+ TQSize sz = scrollView->sizeHint();
scrollView->setMinimumSize( sz.width()
- + scrollView->style().pixelMetric(QStyle::PM_ScrollBarExtent),
+ + scrollView->style().pixelMetric(TQStyle::PM_ScrollBarExtent),
QMIN( compGUI->sizeHint().height(), dialogHeight ) );
}
}
@@ -120,7 +120,7 @@ Kleo::CryptoConfigModule::CryptoConfigModule( Kleo::CryptoConfig* config, QWidge
void Kleo::CryptoConfigModule::save()
{
bool changed = false;
- QValueList<CryptoConfigComponentGUI *>::Iterator it = mComponentGUIs.begin();
+ TQValueList<CryptoConfigComponentGUI *>::Iterator it = mComponentGUIs.begin();
for( ; it != mComponentGUIs.end(); ++it ) {
if ( (*it)->save() )
changed = true;
@@ -131,7 +131,7 @@ void Kleo::CryptoConfigModule::save()
void Kleo::CryptoConfigModule::reset()
{
- QValueList<CryptoConfigComponentGUI *>::Iterator it = mComponentGUIs.begin();
+ TQValueList<CryptoConfigComponentGUI *>::Iterator it = mComponentGUIs.begin();
for( ; it != mComponentGUIs.end(); ++it ) {
(*it)->load();
}
@@ -139,7 +139,7 @@ void Kleo::CryptoConfigModule::reset()
void Kleo::CryptoConfigModule::defaults()
{
- QValueList<CryptoConfigComponentGUI *>::Iterator it = mComponentGUIs.begin();
+ TQValueList<CryptoConfigComponentGUI *>::Iterator it = mComponentGUIs.begin();
for( ; it != mComponentGUIs.end(); ++it ) {
(*it)->defaults();
}
@@ -154,15 +154,15 @@ void Kleo::CryptoConfigModule::cancel()
Kleo::CryptoConfigComponentGUI::CryptoConfigComponentGUI(
CryptoConfigModule* module, Kleo::CryptoConfigComponent* component,
- QWidget* parent, const char* name )
- : QWidget( parent, name ),
+ TQWidget* parent, const char* name )
+ : TQWidget( parent, name ),
mComponent( component )
{
- QGridLayout * glay = new QGridLayout( this, 1, 3, 0, KDialog::spacingHint() );
- const QStringList groups = mComponent->groupList();
+ TQGridLayout * glay = new TQGridLayout( this, 1, 3, 0, KDialog::spacingHint() );
+ const TQStringList groups = mComponent->groupList();
if ( groups.size() > 1 ) {
glay->setColSpacing( 0, KDHorizontalLine::indentHint() );
- for ( QStringList::const_iterator it = groups.begin(), end = groups.end() ; it != end; ++it ) {
+ for ( TQStringList::const_iterator it = groups.begin(), end = groups.end() ; it != end; ++it ) {
Kleo::CryptoConfigGroup* group = mComponent->group( *it );
Q_ASSERT( group );
if ( !group )
@@ -182,7 +182,7 @@ Kleo::CryptoConfigComponentGUI::CryptoConfigComponentGUI(
bool Kleo::CryptoConfigComponentGUI::save()
{
bool changed = false;
- QValueList<CryptoConfigGroupGUI *>::Iterator it = mGroupGUIs.begin();
+ TQValueList<CryptoConfigGroupGUI *>::Iterator it = mGroupGUIs.begin();
for( ; it != mGroupGUIs.end(); ++it ) {
if ( (*it)->save() )
changed = true;
@@ -192,14 +192,14 @@ bool Kleo::CryptoConfigComponentGUI::save()
void Kleo::CryptoConfigComponentGUI::load()
{
- QValueList<CryptoConfigGroupGUI *>::Iterator it = mGroupGUIs.begin();
+ TQValueList<CryptoConfigGroupGUI *>::Iterator it = mGroupGUIs.begin();
for( ; it != mGroupGUIs.end(); ++it )
(*it)->load();
}
void Kleo::CryptoConfigComponentGUI::defaults()
{
- QValueList<CryptoConfigGroupGUI *>::Iterator it = mGroupGUIs.begin();
+ TQValueList<CryptoConfigGroupGUI *>::Iterator it = mGroupGUIs.begin();
for( ; it != mGroupGUIs.end(); ++it )
(*it)->defaults();
}
@@ -208,12 +208,12 @@ void Kleo::CryptoConfigComponentGUI::defaults()
Kleo::CryptoConfigGroupGUI::CryptoConfigGroupGUI(
CryptoConfigModule* module, Kleo::CryptoConfigGroup* group,
- QGridLayout * glay, QWidget* widget, const char* name )
- : QObject( module, name ), mGroup( group )
+ TQGridLayout * glay, TQWidget* widget, const char* name )
+ : TQObject( module, name ), mGroup( group )
{
const int startRow = glay->numRows();
- const QStringList entries = mGroup->entryList();
- for( QStringList::const_iterator it = entries.begin(), end = entries.end() ; it != end; ++it ) {
+ const TQStringList entries = mGroup->entryList();
+ for( TQStringList::const_iterator it = entries.begin(), end = entries.end() ; it != end; ++it ) {
Kleo::CryptoConfigEntry* entry = group->entry( *it );
Q_ASSERT( entry );
if ( entry->level() > CryptoConfigEntry::Level_Advanced ) continue;
@@ -228,11 +228,11 @@ Kleo::CryptoConfigGroupGUI::CryptoConfigGroupGUI(
if ( endRow < startRow )
return;
- const QString iconName = group->iconName();
+ const TQString iconName = group->iconName();
if ( iconName.isEmpty() )
return;
- QLabel * l = new QLabel( widget );
+ TQLabel * l = new TQLabel( widget );
l->setPixmap( loadIcon( iconName ) );
glay->addMultiCellWidget( l, startRow, endRow, 0, 0, Qt::AlignTop );
}
@@ -240,7 +240,7 @@ Kleo::CryptoConfigGroupGUI::CryptoConfigGroupGUI(
bool Kleo::CryptoConfigGroupGUI::save()
{
bool changed = false;
- QValueList<CryptoConfigEntryGUI *>::Iterator it = mEntryGUIs.begin();
+ TQValueList<CryptoConfigEntryGUI *>::Iterator it = mEntryGUIs.begin();
for( ; it != mEntryGUIs.end(); ++it ) {
if ( (*it)->isChanged() ) {
(*it)->save();
@@ -252,21 +252,21 @@ bool Kleo::CryptoConfigGroupGUI::save()
void Kleo::CryptoConfigGroupGUI::load()
{
- QValueList<CryptoConfigEntryGUI *>::Iterator it = mEntryGUIs.begin();
+ TQValueList<CryptoConfigEntryGUI *>::Iterator it = mEntryGUIs.begin();
for( ; it != mEntryGUIs.end(); ++it )
(*it)->load();
}
void Kleo::CryptoConfigGroupGUI::defaults()
{
- QValueList<CryptoConfigEntryGUI *>::Iterator it = mEntryGUIs.begin();
+ TQValueList<CryptoConfigEntryGUI *>::Iterator it = mEntryGUIs.begin();
for( ; it != mEntryGUIs.end(); ++it )
(*it)->resetToDefault();
}
////
-CryptoConfigEntryGUI* Kleo::CryptoConfigEntryGUIFactory::createEntryGUI( CryptoConfigModule* module, Kleo::CryptoConfigEntry* entry, const QString& entryName, QGridLayout * glay, QWidget* widget, const char* name )
+CryptoConfigEntryGUI* Kleo::CryptoConfigEntryGUIFactory::createEntryGUI( CryptoConfigModule* module, Kleo::CryptoConfigEntry* entry, const TQString& entryName, TQGridLayout * glay, TQWidget* widget, const char* name )
{
if ( entry->isList() ) {
switch( entry->argType() ) {
@@ -317,18 +317,18 @@ CryptoConfigEntryGUI* Kleo::CryptoConfigEntryGUIFactory::createEntryGUI( CryptoC
Kleo::CryptoConfigEntryGUI::CryptoConfigEntryGUI(
CryptoConfigModule* module,
Kleo::CryptoConfigEntry* entry,
- const QString& entryName,
+ const TQString& entryName,
const char* name )
- : QObject( module, name ), mEntry( entry ), mName( entryName ), mChanged( false )
+ : TQObject( module, name ), mEntry( entry ), mName( entryName ), mChanged( false )
{
- connect( this, SIGNAL( changed() ), module, SIGNAL( changed() ) );
+ connect( this, TQT_SIGNAL( changed() ), module, TQT_SIGNAL( changed() ) );
}
-QString Kleo::CryptoConfigEntryGUI::description() const
+TQString Kleo::CryptoConfigEntryGUI::description() const
{
- QString descr = mEntry->description();
+ TQString descr = mEntry->description();
if ( descr.isEmpty() ) // shouldn't happen
- descr = QString( "<%1>" ).arg( mName );
+ descr = TQString( "<%1>" ).arg( mName );
return descr;
}
@@ -342,20 +342,20 @@ void Kleo::CryptoConfigEntryGUI::resetToDefault()
Kleo::CryptoConfigEntryLineEdit::CryptoConfigEntryLineEdit(
CryptoConfigModule* module,
- Kleo::CryptoConfigEntry* entry, const QString& entryName,
- QGridLayout * glay, QWidget* widget, const char* name )
+ Kleo::CryptoConfigEntry* entry, const TQString& entryName,
+ TQGridLayout * glay, TQWidget* widget, const char* name )
: CryptoConfigEntryGUI( module, entry, entryName, name )
{
const int row = glay->numRows();
mLineEdit = new KLineEdit( widget );
- QLabel* label = new QLabel( mLineEdit, description(), widget );
+ TQLabel* label = new TQLabel( mLineEdit, description(), widget );
glay->addWidget( label, row, 1 );
glay->addWidget( mLineEdit, row, 2 );
if ( entry->isReadOnly() ) {
label->setEnabled( false );
mLineEdit->setEnabled( false );
} else {
- connect( mLineEdit, SIGNAL( textChanged( const QString& ) ), SLOT( slotChanged() ) );
+ connect( mLineEdit, TQT_SIGNAL( textChanged( const TQString& ) ), TQT_SLOT( slotChanged() ) );
}
}
@@ -373,21 +373,21 @@ void Kleo::CryptoConfigEntryLineEdit::doLoad()
Kleo::CryptoConfigEntryPath::CryptoConfigEntryPath(
CryptoConfigModule* module,
- Kleo::CryptoConfigEntry* entry, const QString& entryName,
- QGridLayout * glay, QWidget* widget, const char* name )
+ Kleo::CryptoConfigEntry* entry, const TQString& entryName,
+ TQGridLayout * glay, TQWidget* widget, const char* name )
: CryptoConfigEntryGUI( module, entry, entryName, name )
{
const int row = glay->numRows();
mUrlRequester = new KURLRequester( widget );
mUrlRequester->setMode( KFile::File | KFile::ExistingOnly | KFile::LocalOnly );
- QLabel* label = new QLabel( mUrlRequester, description(), widget );
+ TQLabel* label = new TQLabel( mUrlRequester, description(), widget );
glay->addWidget( label, row, 1 );
glay->addWidget( mUrlRequester, row, 2 );
if ( entry->isReadOnly() ) {
label->setEnabled( false );
mUrlRequester->setEnabled( false );
} else {
- connect( mUrlRequester, SIGNAL( textChanged( const QString& ) ), SLOT( slotChanged() ) );
+ connect( mUrlRequester, TQT_SIGNAL( textChanged( const TQString& ) ), TQT_SLOT( slotChanged() ) );
}
}
@@ -407,21 +407,21 @@ void Kleo::CryptoConfigEntryPath::doLoad()
Kleo::CryptoConfigEntryDirPath::CryptoConfigEntryDirPath(
CryptoConfigModule* module,
- Kleo::CryptoConfigEntry* entry, const QString& entryName,
- QGridLayout * glay, QWidget* widget, const char* name )
+ Kleo::CryptoConfigEntry* entry, const TQString& entryName,
+ TQGridLayout * glay, TQWidget* widget, const char* name )
: CryptoConfigEntryGUI( module, entry, entryName, name )
{
const int row = glay->numRows();
mUrlRequester = new KURLRequester( widget );
mUrlRequester->setMode( KFile::Directory | KFile::ExistingOnly | KFile::LocalOnly );
- QLabel* label = new QLabel( mUrlRequester, description(), widget );
+ TQLabel* label = new TQLabel( mUrlRequester, description(), widget );
glay->addWidget( label, row, 1 );
glay->addWidget( mUrlRequester, row, 2 );
if ( entry->isReadOnly() ) {
label->setEnabled( false );
mUrlRequester->setEnabled( false );
} else {
- connect( mUrlRequester, SIGNAL( textChanged( const QString& ) ), SLOT( slotChanged() ) );
+ connect( mUrlRequester, TQT_SIGNAL( textChanged( const TQString& ) ), TQT_SLOT( slotChanged() ) );
}
}
@@ -442,21 +442,21 @@ void Kleo::CryptoConfigEntryDirPath::doLoad()
Kleo::CryptoConfigEntryURL::CryptoConfigEntryURL(
CryptoConfigModule* module,
- Kleo::CryptoConfigEntry* entry, const QString& entryName,
- QGridLayout * glay, QWidget* widget, const char* name )
+ Kleo::CryptoConfigEntry* entry, const TQString& entryName,
+ TQGridLayout * glay, TQWidget* widget, const char* name )
: CryptoConfigEntryGUI( module, entry, entryName, name )
{
const int row = glay->numRows();
mUrlRequester = new KURLRequester( widget );
mUrlRequester->setMode( KFile::File | KFile::ExistingOnly );
- QLabel* label = new QLabel( mUrlRequester, description(), widget );
+ TQLabel* label = new TQLabel( mUrlRequester, description(), widget );
glay->addWidget( label, row, 1 );
glay->addWidget( mUrlRequester, row, 2 );
if ( entry->isReadOnly() ) {
label->setEnabled( false );
mUrlRequester->setEnabled( false );
} else {
- connect( mUrlRequester, SIGNAL( textChanged( const QString& ) ), SLOT( slotChanged() ) );
+ connect( mUrlRequester, TQT_SIGNAL( textChanged( const TQString& ) ), TQT_SLOT( slotChanged() ) );
}
}
@@ -474,8 +474,8 @@ void Kleo::CryptoConfigEntryURL::doLoad()
Kleo::CryptoConfigEntrySpinBox::CryptoConfigEntrySpinBox(
CryptoConfigModule* module,
- Kleo::CryptoConfigEntry* entry, const QString& entryName,
- QGridLayout * glay, QWidget* widget, const char* name )
+ Kleo::CryptoConfigEntry* entry, const TQString& entryName,
+ TQGridLayout * glay, TQWidget* widget, const char* name )
: CryptoConfigEntryGUI( module, entry, entryName, name )
{
@@ -490,7 +490,7 @@ Kleo::CryptoConfigEntrySpinBox::CryptoConfigEntrySpinBox(
const int row = glay->numRows();
mNumInput = new KIntNumInput( widget );
- QLabel* label = new QLabel( mNumInput, description(), widget );
+ TQLabel* label = new TQLabel( mNumInput, description(), widget );
glay->addWidget( label, row, 1 );
glay->addWidget( mNumInput, row, 2 );
@@ -500,7 +500,7 @@ Kleo::CryptoConfigEntrySpinBox::CryptoConfigEntrySpinBox(
} else {
if ( mKind == UInt || mKind == ListOfNone )
mNumInput->setMinValue( 0 );
- connect( mNumInput, SIGNAL( valueChanged(int) ), SLOT( slotChanged() ) );
+ connect( mNumInput, TQT_SIGNAL( valueChanged(int) ), TQT_SLOT( slotChanged() ) );
}
}
@@ -541,18 +541,18 @@ void Kleo::CryptoConfigEntrySpinBox::doLoad()
Kleo::CryptoConfigEntryCheckBox::CryptoConfigEntryCheckBox(
CryptoConfigModule* module,
- Kleo::CryptoConfigEntry* entry, const QString& entryName,
- QGridLayout * glay, QWidget* widget, const char* name )
+ Kleo::CryptoConfigEntry* entry, const TQString& entryName,
+ TQGridLayout * glay, TQWidget* widget, const char* name )
: CryptoConfigEntryGUI( module, entry, entryName, name )
{
const int row = glay->numRows();
- mCheckBox = new QCheckBox( widget );
+ mCheckBox = new TQCheckBox( widget );
glay->addMultiCellWidget( mCheckBox, row, row, 1, 2 );
mCheckBox->setText( description() );
if ( entry->isReadOnly() ) {
mCheckBox->setEnabled( false );
} else {
- connect( mCheckBox, SIGNAL( toggled(bool) ), SLOT( slotChanged() ) );
+ connect( mCheckBox, TQT_SIGNAL( toggled(bool) ), TQT_SLOT( slotChanged() ) );
}
}
@@ -569,16 +569,16 @@ void Kleo::CryptoConfigEntryCheckBox::doLoad()
Kleo::CryptoConfigEntryLDAPURL::CryptoConfigEntryLDAPURL(
CryptoConfigModule* module,
Kleo::CryptoConfigEntry* entry,
- const QString& entryName,
- QGridLayout * glay, QWidget* widget, const char* name )
+ const TQString& entryName,
+ TQGridLayout * glay, TQWidget* widget, const char* name )
: CryptoConfigEntryGUI( module, entry, entryName, name )
{
- mLabel = new QLabel( widget );
- mPushButton = new QPushButton( i18n( "Edit..." ), widget );
+ mLabel = new TQLabel( widget );
+ mPushButton = new TQPushButton( i18n( "Edit..." ), widget );
const int row = glay->numRows();
- glay->addWidget( new QLabel( mPushButton, description(), widget ), row, 1 );
- QHBoxLayout * hlay = new QHBoxLayout;
+ glay->addWidget( new TQLabel( mPushButton, description(), widget ), row, 1 );
+ TQHBoxLayout * hlay = new QHBoxLayout;
glay->addLayout( hlay, row, 2 );
hlay->addWidget( mLabel, 1 );
hlay->addWidget( mPushButton );
@@ -587,7 +587,7 @@ Kleo::CryptoConfigEntryLDAPURL::CryptoConfigEntryLDAPURL(
mLabel->setEnabled( false );
mPushButton->hide();
} else {
- connect( mPushButton, SIGNAL( clicked() ), SLOT( slotOpenDialog() ) );
+ connect( mPushButton, TQT_SIGNAL( clicked() ), TQT_SLOT( slotOpenDialog() ) );
}
}
@@ -612,7 +612,7 @@ void Kleo::CryptoConfigEntryLDAPURL::slotOpenDialog()
DirectoryServicesWidget* dirserv = new DirectoryServicesWidget( mEntry, &dialog );
dirserv->load();
dialog.setMainWidget( dirserv );
- connect( &dialog, SIGNAL( defaultClicked() ), dirserv, SLOT( defaults() ) );
+ connect( &dialog, TQT_SIGNAL( defaultClicked() ), dirserv, TQT_SLOT( defaults() ) );
if ( dialog.exec() ) {
// Note that we just grab the urls from the dialog, we don't call its save method,
// since the user hasn't confirmed the big config dialog yet.
diff --git a/certmanager/lib/ui/cryptoconfigmodule.h b/certmanager/lib/ui/cryptoconfigmodule.h
index 185814594..70c4a2691 100644
--- a/certmanager/lib/ui/cryptoconfigmodule.h
+++ b/certmanager/lib/ui/cryptoconfigmodule.h
@@ -34,7 +34,7 @@
#include <kjanuswidget.h>
-#include <qvaluelist.h>
+#include <tqvaluelist.h>
namespace Kleo {
@@ -43,12 +43,12 @@ namespace Kleo {
/**
* Crypto Config Module widget, dynamically generated from CryptoConfig
- * It's a simple QWidget so that it can be embedded into a dialog or into a KCModule.
+ * It's a simple TQWidget so that it can be embedded into a dialog or into a KCModule.
*/
class CryptoConfigModule : public KJanusWidget {
Q_OBJECT
public:
- CryptoConfigModule( Kleo::CryptoConfig* config, QWidget * parent=0, const char * name=0 );
+ CryptoConfigModule( Kleo::CryptoConfig* config, TQWidget * parent=0, const char * name=0 );
void save();
void reset(); // i.e. reload current settings, discarding user input
@@ -60,7 +60,7 @@ namespace Kleo {
private:
Kleo::CryptoConfig* mConfig;
- QValueList<CryptoConfigComponentGUI *> mComponentGUIs;
+ TQValueList<CryptoConfigComponentGUI *> mComponentGUIs;
};
}
diff --git a/certmanager/lib/ui/cryptoconfigmodule_p.h b/certmanager/lib/ui/cryptoconfigmodule_p.h
index 22145f323..3e71b8de1 100644
--- a/certmanager/lib/ui/cryptoconfigmodule_p.h
+++ b/certmanager/lib/ui/cryptoconfigmodule_p.h
@@ -32,9 +32,9 @@
#ifndef CRYPTOCONFIGMODULE_P_H
#define CRYPTOCONFIGMODULE_P_H
-#include <qtabwidget.h>
-#include <qhbox.h>
-#include <qcheckbox.h>
+#include <tqtabwidget.h>
+#include <tqhbox.h>
+#include <tqcheckbox.h>
#include <kurl.h>
class KLineEdit;
@@ -56,12 +56,12 @@ namespace Kleo {
/**
* A widget corresponding to a component in the crypto config
*/
- class CryptoConfigComponentGUI : public QWidget {
+ class CryptoConfigComponentGUI : public TQWidget {
Q_OBJECT
public:
CryptoConfigComponentGUI( CryptoConfigModule* module, Kleo::CryptoConfigComponent* component,
- QWidget* parent, const char* name = 0 );
+ TQWidget* parent, const char* name = 0 );
bool save();
void load();
@@ -69,18 +69,18 @@ namespace Kleo {
private:
Kleo::CryptoConfigComponent* mComponent;
- QValueList<CryptoConfigGroupGUI *> mGroupGUIs;
+ TQValueList<CryptoConfigGroupGUI *> mGroupGUIs;
};
/**
* A class managing widgets corresponding to a group in the crypto config
*/
- class CryptoConfigGroupGUI : public QObject {
+ class CryptoConfigGroupGUI : public TQObject {
Q_OBJECT
public:
CryptoConfigGroupGUI( CryptoConfigModule* module, Kleo::CryptoConfigGroup* group,
- QGridLayout * layout, QWidget* parent, const char* name = 0 );
+ TQGridLayout * layout, TQWidget* parent, const char* name = 0 );
bool save();
void load();
@@ -88,7 +88,7 @@ namespace Kleo {
private:
Kleo::CryptoConfigGroup* mGroup;
- QValueList<CryptoConfigEntryGUI *> mEntryGUIs;
+ TQValueList<CryptoConfigEntryGUI *> mEntryGUIs;
};
/**
@@ -99,19 +99,19 @@ namespace Kleo {
public:
static CryptoConfigEntryGUI* createEntryGUI(
CryptoConfigModule* module,
- Kleo::CryptoConfigEntry* entry, const QString& entryName,
- QGridLayout * layout, QWidget* widget, const char* name = 0 );
+ Kleo::CryptoConfigEntry* entry, const TQString& entryName,
+ TQGridLayout * layout, TQWidget* widget, const char* name = 0 );
};
/**
* Base class for the widget managers tied to an entry in the crypto config
*/
- class CryptoConfigEntryGUI : public QObject {
+ class CryptoConfigEntryGUI : public TQObject {
Q_OBJECT
public:
CryptoConfigEntryGUI( CryptoConfigModule* module,
Kleo::CryptoConfigEntry* entry,
- const QString& entryName,
+ const TQString& entryName,
const char* name = 0 );
virtual ~CryptoConfigEntryGUI() {}
@@ -119,7 +119,7 @@ namespace Kleo {
void save() { Q_ASSERT( mChanged ); doSave(); mChanged = false; }
void resetToDefault();
- QString description() const;
+ TQString description() const;
bool isChanged() const { return mChanged; }
signals:
@@ -136,7 +136,7 @@ namespace Kleo {
virtual void doLoad() = 0;
Kleo::CryptoConfigEntry* mEntry;
- QString mName;
+ TQString mName;
bool mChanged;
};
@@ -149,9 +149,9 @@ namespace Kleo {
public:
CryptoConfigEntryLineEdit( CryptoConfigModule* module,
Kleo::CryptoConfigEntry* entry,
- const QString& entryName,
- QGridLayout * layout,
- QWidget* parent, const char* name = 0 );
+ const TQString& entryName,
+ TQGridLayout * layout,
+ TQWidget* parent, const char* name = 0 );
virtual void doSave();
virtual void doLoad();
@@ -168,9 +168,9 @@ namespace Kleo {
public:
CryptoConfigEntryPath( CryptoConfigModule* module,
Kleo::CryptoConfigEntry* entry,
- const QString& entryName,
- QGridLayout * layout,
- QWidget* parent, const char* name = 0 );
+ const TQString& entryName,
+ TQGridLayout * layout,
+ TQWidget* parent, const char* name = 0 );
virtual void doSave();
virtual void doLoad();
@@ -187,9 +187,9 @@ namespace Kleo {
public:
CryptoConfigEntryDirPath( CryptoConfigModule* module,
Kleo::CryptoConfigEntry* entry,
- const QString& entryName,
- QGridLayout * layout,
- QWidget* parent, const char* name = 0 );
+ const TQString& entryName,
+ TQGridLayout * layout,
+ TQWidget* parent, const char* name = 0 );
virtual void doSave();
virtual void doLoad();
@@ -206,9 +206,9 @@ namespace Kleo {
public:
CryptoConfigEntryURL( CryptoConfigModule* module,
Kleo::CryptoConfigEntry* entry,
- const QString& entryName,
- QGridLayout * layout,
- QWidget* parent, const char* name = 0 );
+ const TQString& entryName,
+ TQGridLayout * layout,
+ TQWidget* parent, const char* name = 0 );
virtual void doSave();
virtual void doLoad();
@@ -225,9 +225,9 @@ namespace Kleo {
public:
CryptoConfigEntrySpinBox( CryptoConfigModule* module,
Kleo::CryptoConfigEntry* entry,
- const QString& entryName,
- QGridLayout * layout,
- QWidget* parent, const char* name = 0 );
+ const TQString& entryName,
+ TQGridLayout * layout,
+ TQWidget* parent, const char* name = 0 );
virtual void doSave();
virtual void doLoad();
private:
@@ -244,13 +244,13 @@ namespace Kleo {
public:
CryptoConfigEntryCheckBox( CryptoConfigModule* module,
Kleo::CryptoConfigEntry* entry,
- const QString& entryName,
- QGridLayout * layout,
- QWidget* parent, const char* name = 0 );
+ const TQString& entryName,
+ TQGridLayout * layout,
+ TQWidget* parent, const char* name = 0 );
virtual void doSave();
virtual void doLoad();
private:
- QCheckBox* mCheckBox;
+ TQCheckBox* mCheckBox;
};
/**
@@ -262,17 +262,17 @@ namespace Kleo {
public:
CryptoConfigEntryLDAPURL( CryptoConfigModule* module,
Kleo::CryptoConfigEntry* entry,
- const QString& entryName,
- QGridLayout * layout,
- QWidget* parent, const char* name = 0 );
+ const TQString& entryName,
+ TQGridLayout * layout,
+ TQWidget* parent, const char* name = 0 );
virtual void doSave();
virtual void doLoad();
private slots:
void slotOpenDialog();
private:
void setURLList( const KURL::List& urlList );
- QLabel* mLabel;
- QPushButton* mPushButton;
+ TQLabel* mLabel;
+ TQPushButton* mPushButton;
KURL::List mURLList;
};
}
diff --git a/certmanager/lib/ui/directoryserviceswidget.cpp b/certmanager/lib/ui/directoryserviceswidget.cpp
index 76c1b3dda..0b9dd91f2 100644
--- a/certmanager/lib/ui/directoryserviceswidget.cpp
+++ b/certmanager/lib/ui/directoryserviceswidget.cpp
@@ -41,38 +41,38 @@
#include <kiconloader.h>
#include <kdebug.h>
-#include <qbuttongroup.h>
-#include <qtoolbutton.h>
-#include <qlistview.h>
-#include <qpushbutton.h>
+#include <tqbuttongroup.h>
+#include <tqtoolbutton.h>
+#include <tqlistview.h>
+#include <tqpushbutton.h>
using namespace Kleo;
class QX500ListViewItem : public QListViewItem
{
public:
- QX500ListViewItem( QListView* lv, QListViewItem* prev,
- const QString& serverName,
- const QString& portNumber,
- const QString& dn,
- const QString& username,
- const QString& password )
- : QListViewItem( lv, prev, serverName, portNumber, dn, username ) {
+ QX500ListViewItem( TQListView* lv, TQListViewItem* prev,
+ const TQString& serverName,
+ const TQString& portNumber,
+ const TQString& dn,
+ const TQString& username,
+ const TQString& password )
+ : TQListViewItem( lv, prev, serverName, portNumber, dn, username ) {
setPassword( password );
}
- void setPassword( const QString& pass ) {
+ void setPassword( const TQString& pass ) {
mPassword = pass;
- setText( 4, pass.isEmpty() ? QString::null : QString::fromLatin1( "******" ) );
+ setText( 4, pass.isEmpty() ? TQString::null : TQString::fromLatin1( "******" ) );
}
- const QString& password() const { return mPassword; }
+ const TQString& password() const { return mPassword; }
- void setData( const QString& serverName,
- const QString& portNumber,
- const QString& dn,
- const QString& username,
- const QString& password ) {
+ void setData( const TQString& serverName,
+ const TQString& portNumber,
+ const TQString& dn,
+ const TQString& username,
+ const TQString& password ) {
setText( 0, serverName );
setText( 1, portNumber );
setText( 2, dn );
@@ -87,12 +87,12 @@ public:
}
private:
- QString mPassword;
+ TQString mPassword;
};
Kleo::DirectoryServicesWidget::DirectoryServicesWidget(
Kleo::CryptoConfigEntry* configEntry,
- QWidget* parent, const char* name, WFlags fl )
+ TQWidget* parent, const char* name, WFlags fl )
: DirectoryServicesWidgetBase( parent, name, fl ),
mConfigEntry( configEntry )
{
@@ -132,7 +132,7 @@ void DirectoryServicesWidget::enableDisable( CryptPlugWrapper* cryptPlug ) // un
/*
* protected slot, connected to selectionChanged()
*/
-void DirectoryServicesWidget::slotServiceChanged( QListViewItem* item )
+void DirectoryServicesWidget::slotServiceChanged( TQListViewItem* item )
{
if( item )
removeServicePB->setEnabled( true );
@@ -146,17 +146,17 @@ void DirectoryServicesWidget::slotServiceChanged( QListViewItem* item )
/*
* protected slot, connected to returnPressed/doubleClicked
*/
-void DirectoryServicesWidget::slotServiceSelected( QListViewItem* item )
+void DirectoryServicesWidget::slotServiceSelected( TQListViewItem* item )
{
AddDirectoryServiceDialogImpl* dlg = new AddDirectoryServiceDialogImpl( this );
dlg->serverNameED->setText( item->text( 0 ) );
dlg->portED->setText( item->text( 1 ) );
dlg->descriptionED->setText( item->text( 2 ) );
dlg->usernameED->setText( item->text( 3 ) );
- QString pass = static_cast<QX500ListViewItem *>( item )->password();
+ TQString pass = static_cast<QX500ListViewItem *>( item )->password();
dlg->passwordED->setText( pass );
- if( dlg->exec() == QDialog::Accepted ) {
+ if( dlg->exec() == TQDialog::Accepted ) {
item->setText( 0, dlg->serverNameED->text() );
item->setText( 1, dlg->portED->text() );
item->setText( 2, dlg->descriptionED->text() );
@@ -174,7 +174,7 @@ void DirectoryServicesWidget::slotServiceSelected( QListViewItem* item )
void DirectoryServicesWidget::slotAddService()
{
AddDirectoryServiceDialogImpl* dlg = new AddDirectoryServiceDialogImpl( this );
- if( dlg->exec() == QDialog::Accepted ) {
+ if( dlg->exec() == TQDialog::Accepted ) {
QX500ListViewItem *item = new QX500ListViewItem( x500LV, x500LV->lastItem(),
dlg->serverNameED->text(),
dlg->portED->text(),
@@ -192,7 +192,7 @@ void DirectoryServicesWidget::slotAddService()
*/
void DirectoryServicesWidget::slotDeleteService()
{
- QListViewItem* item = x500LV->selectedItem();
+ TQListViewItem* item = x500LV->selectedItem();
Q_ASSERT( item );
if( !item )
return;
@@ -210,10 +210,10 @@ void DirectoryServicesWidget::setInitialServices( const KURL::List& urls )
{
x500LV->clear();
for( KURL::List::const_iterator it = urls.begin(); it != urls.end(); ++it ) {
- QString dn = KURL::decode_string( (*it).query().mid( 1 ) ); // decode query and skip leading '?'
+ TQString dn = KURL::decode_string( (*it).query().mid( 1 ) ); // decode query and skip leading '?'
(void)new QX500ListViewItem( x500LV, x500LV->lastItem(),
(*it).host(),
- QString::number( (*it).port() ),
+ TQString::number( (*it).port() ),
dn,
(*it).user(),
(*it).pass());
@@ -223,9 +223,9 @@ void DirectoryServicesWidget::setInitialServices( const KURL::List& urls )
KURL::List DirectoryServicesWidget::urlList() const
{
KURL::List lst;
- QListViewItemIterator it( x500LV );
+ TQListViewItemIterator it( x500LV );
for ( ; it.current() ; ++it ) {
- QListViewItem* item = it.current();
+ TQListViewItem* item = it.current();
KURL url;
url.setProtocol( "ldap" );
url.setHost( item->text( 0 ) );
@@ -272,11 +272,11 @@ void DirectoryServicesWidget::defaults()
static void swapItems( QX500ListViewItem *item, QX500ListViewItem *other )
{
- QString serverName = item->text( 0 );
- QString portNumber = item->text( 1 );
- QString dn = item->text( 2 );
- QString username = item->text( 3 );
- QString password = item->password();
+ TQString serverName = item->text( 0 );
+ TQString portNumber = item->text( 1 );
+ TQString dn = item->text( 2 );
+ TQString username = item->text( 3 );
+ TQString password = item->password();
item->copyItem( other );
other->setData( serverName, portNumber, dn, username, password );
}
diff --git a/certmanager/lib/ui/directoryserviceswidget.h b/certmanager/lib/ui/directoryserviceswidget.h
index 02e428c95..5c58dc090 100644
--- a/certmanager/lib/ui/directoryserviceswidget.h
+++ b/certmanager/lib/ui/directoryserviceswidget.h
@@ -48,7 +48,7 @@ class KDE_EXPORT DirectoryServicesWidget : public DirectoryServicesWidgetBase
public:
DirectoryServicesWidget(
Kleo::CryptoConfigEntry* configEntry,
- QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
+ TQWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
~DirectoryServicesWidget();
void load();
@@ -66,8 +66,8 @@ signals:
void changed();
protected slots:
- void slotServiceChanged( QListViewItem* );
- void slotServiceSelected( QListViewItem* );
+ void slotServiceChanged( TQListViewItem* );
+ void slotServiceSelected( TQListViewItem* );
void slotAddService();
void slotDeleteService();
void slotMoveUp();
diff --git a/certmanager/lib/ui/dnattributeorderconfigwidget.cpp b/certmanager/lib/ui/dnattributeorderconfigwidget.cpp
index 54fe32af1..4c7184066 100644
--- a/certmanager/lib/ui/dnattributeorderconfigwidget.cpp
+++ b/certmanager/lib/ui/dnattributeorderconfigwidget.cpp
@@ -45,76 +45,76 @@
#include <kconfig.h>
#include <kapplication.h>
-#include <qtoolbutton.h>
-#include <qlayout.h>
-#include <qheader.h>
-#include <qlabel.h>
-#include <qlistview.h>
-#include <qtooltip.h>
+#include <tqtoolbutton.h>
+#include <tqlayout.h>
+#include <tqheader.h>
+#include <tqlabel.h>
+#include <tqlistview.h>
+#include <tqtooltip.h>
#include <assert.h>
struct Kleo::DNAttributeOrderConfigWidget::Private {
enum { UUp=0, Up=1, Left=2, Right=3, Down=4, DDown=5 };
- QListView * availableLV;
- QListView * currentLV;
- QToolButton * navTB[6];
+ TQListView * availableLV;
+ TQListView * currentLV;
+ TQToolButton * navTB[6];
- QListViewItem * placeHolderItem;
+ TQListViewItem * placeHolderItem;
Kleo::DNAttributeMapper * mapper;
};
-static void prepare( QListView * lv ) {
+static void prepare( TQListView * lv ) {
lv->setAllColumnsShowFocus( true );
- lv->setResizeMode( QListView::LastColumn );
+ lv->setResizeMode( TQListView::LastColumn );
lv->header()->setClickEnabled( false );
- lv->addColumn( QString::null );
+ lv->addColumn( TQString::null );
lv->addColumn( i18n("Description") );
}
-Kleo::DNAttributeOrderConfigWidget::DNAttributeOrderConfigWidget( DNAttributeMapper * mapper, QWidget * parent, const char * name, WFlags f )
- : QWidget( parent, name, f ), d( 0 )
+Kleo::DNAttributeOrderConfigWidget::DNAttributeOrderConfigWidget( DNAttributeMapper * mapper, TQWidget * parent, const char * name, WFlags f )
+ : TQWidget( parent, name, f ), d( 0 )
{
assert( mapper );
d = new Private();
d->mapper = mapper;
- QGridLayout * glay = new QGridLayout( this, 2, 3, 0, KDialog::spacingHint() );
+ TQGridLayout * glay = new TQGridLayout( this, 2, 3, 0, KDialog::spacingHint() );
glay->setColStretch( 0, 1 );
glay->setColStretch( 2, 1 );
int row = -1;
++row;
- glay->addWidget( new QLabel( i18n("Available attributes:"), this ), row, 0 );
- glay->addWidget( new QLabel( i18n("Current attribute order:"), this ), row, 2 );
+ glay->addWidget( new TQLabel( i18n("Available attributes:"), this ), row, 0 );
+ glay->addWidget( new TQLabel( i18n("Current attribute order:"), this ), row, 2 );
++row;
glay->setRowStretch( row, 1 );
- d->availableLV = new QListView( this );
+ d->availableLV = new TQListView( this );
prepare( d->availableLV );
d->availableLV->setSorting( 0 );
glay->addWidget( d->availableLV, row, 0 );
- d->currentLV = new QListView( this );
+ d->currentLV = new TQListView( this );
prepare( d->currentLV );
d->currentLV->setSorting( -1 );
glay->addWidget( d->currentLV, row, 2 );
- connect( d->availableLV, SIGNAL(clicked( QListViewItem * )),
- SLOT(slotAvailableSelectionChanged(QListViewItem*)) );
- connect( d->currentLV, SIGNAL(clicked(QListViewItem*)),
- SLOT(slotCurrentOrderSelectionChanged(QListViewItem*)) );
+ connect( d->availableLV, TQT_SIGNAL(clicked( TQListViewItem * )),
+ TQT_SLOT(slotAvailableSelectionChanged(TQListViewItem*)) );
+ connect( d->currentLV, TQT_SIGNAL(clicked(TQListViewItem*)),
+ TQT_SLOT(slotCurrentOrderSelectionChanged(TQListViewItem*)) );
- d->placeHolderItem = new QListViewItem( d->availableLV, "_X_", i18n("All others") );
+ d->placeHolderItem = new TQListViewItem( d->availableLV, "_X_", i18n("All others") );
// the up/down/left/right arrow cross:
- QGridLayout * xlay = new QGridLayout( 5, 3, 0, "xlay" );
+ TQGridLayout * xlay = new TQGridLayout( 5, 3, 0, "xlay" );
xlay->setAlignment( AlignCenter );
static const struct {
@@ -123,21 +123,21 @@ Kleo::DNAttributeOrderConfigWidget::DNAttributeOrderConfigWidget( DNAttributeMap
const char * tooltip;
const char * slot;
} navButtons[] = {
- { "2uparrow", 0, 1, I18N_NOOP( "Move to top" ), SLOT(slotDoubleUpButtonClicked()) },
- { "1uparrow", 1, 1, I18N_NOOP( "Move one up" ), SLOT(slotUpButtonClicked()) },
- { "1leftarrow", 2, 0, I18N_NOOP( "Remove from current attribute order" ), SLOT(slotLeftButtonClicked()) },
- { "1rightarrow", 2, 2, I18N_NOOP( "Add to current attribute order" ), SLOT(slotRightButtonClicked()) },
- { "1downarrow", 3, 1, I18N_NOOP( "Move one down" ), SLOT(slotDownButtonClicked()) },
- { "2downarrow", 4, 1, I18N_NOOP( "Move to bottom" ), SLOT(slotDoubleDownButtonClicked()) }
+ { "2uparrow", 0, 1, I18N_NOOP( "Move to top" ), TQT_SLOT(slotDoubleUpButtonClicked()) },
+ { "1uparrow", 1, 1, I18N_NOOP( "Move one up" ), TQT_SLOT(slotUpButtonClicked()) },
+ { "1leftarrow", 2, 0, I18N_NOOP( "Remove from current attribute order" ), TQT_SLOT(slotLeftButtonClicked()) },
+ { "1rightarrow", 2, 2, I18N_NOOP( "Add to current attribute order" ), TQT_SLOT(slotRightButtonClicked()) },
+ { "1downarrow", 3, 1, I18N_NOOP( "Move one down" ), TQT_SLOT(slotDownButtonClicked()) },
+ { "2downarrow", 4, 1, I18N_NOOP( "Move to bottom" ), TQT_SLOT(slotDoubleDownButtonClicked()) }
};
for ( unsigned int i = 0 ; i < sizeof navButtons / sizeof *navButtons ; ++i ) {
- QToolButton * tb = d->navTB[i] = new QToolButton( this );
+ TQToolButton * tb = d->navTB[i] = new TQToolButton( this );
tb->setIconSet( SmallIconSet( navButtons[i].icon ) );
tb->setEnabled( false );
- QToolTip::add( tb, i18n( navButtons[i].tooltip ) );
+ TQToolTip::add( tb, i18n( navButtons[i].tooltip ) );
xlay->addWidget( tb, navButtons[i].row, navButtons[i].col );
- connect( tb, SIGNAL(clicked()), navButtons[i].slot );
+ connect( tb, TQT_SIGNAL(clicked()), navButtons[i].slot );
}
glay->addLayout( xlay, row, 1 );
@@ -154,40 +154,40 @@ void Kleo::DNAttributeOrderConfigWidget::load() {
d->availableLV->clear();
d->currentLV->clear();
- const QStringList order = d->mapper->attributeOrder();
+ const TQStringList order = d->mapper->attributeOrder();
// fill the RHS listview:
- QListViewItem * last = 0;
- for ( QStringList::const_iterator it = order.begin() ; it != order.end() ; ++it ) {
- const QString attr = (*it).upper();
+ TQListViewItem * last = 0;
+ for ( TQStringList::const_iterator it = order.begin() ; it != order.end() ; ++it ) {
+ const TQString attr = (*it).upper();
if ( attr == "_X_" ) {
takePlaceHolderItem();
d->currentLV->insertItem( d->placeHolderItem );
d->placeHolderItem->moveItem( last );
last = d->placeHolderItem;
} else
- last = new QListViewItem( d->currentLV, last, attr, d->mapper->name2label( attr ) );
+ last = new TQListViewItem( d->currentLV, last, attr, d->mapper->name2label( attr ) );
}
// fill the LHS listview with what's left:
- const QStringList all = Kleo::DNAttributeMapper::instance()->names();
- for ( QStringList::const_iterator it = all.begin() ; it != all.end() ; ++it )
+ const TQStringList all = Kleo::DNAttributeMapper::instance()->names();
+ for ( TQStringList::const_iterator it = all.begin() ; it != all.end() ; ++it )
if ( order.find( *it ) == order.end() )
- (void)new QListViewItem( d->availableLV, *it, d->mapper->name2label( *it ) );
+ (void)new TQListViewItem( d->availableLV, *it, d->mapper->name2label( *it ) );
if ( !d->placeHolderItem->listView() )
d->availableLV->insertItem( d->placeHolderItem );
}
void Kleo::DNAttributeOrderConfigWidget::takePlaceHolderItem() {
- if ( QListView * lv = d->placeHolderItem->listView() )
+ if ( TQListView * lv = d->placeHolderItem->listView() )
lv->takeItem( d->placeHolderItem );
}
void Kleo::DNAttributeOrderConfigWidget::save() const {
- QStringList order;
- for ( QListViewItemIterator it( d->currentLV ) ; it.current() ; ++it )
+ TQStringList order;
+ for ( TQListViewItemIterator it( d->currentLV ) ; it.current() ; ++it )
order.push_back( it.current()->text( 0 ) );
d->mapper->setAttributeOrder( order );
@@ -199,15 +199,15 @@ void Kleo::DNAttributeOrderConfigWidget::defaults() {
-void Kleo::DNAttributeOrderConfigWidget::slotAvailableSelectionChanged( QListViewItem * item ) {
+void Kleo::DNAttributeOrderConfigWidget::slotAvailableSelectionChanged( TQListViewItem * item ) {
d->navTB[Private::Right]->setEnabled( item );
}
-void Kleo::DNAttributeOrderConfigWidget::slotCurrentOrderSelectionChanged( QListViewItem * item ) {
+void Kleo::DNAttributeOrderConfigWidget::slotCurrentOrderSelectionChanged( TQListViewItem * item ) {
enableDisableButtons( item );
}
-void Kleo::DNAttributeOrderConfigWidget::enableDisableButtons( QListViewItem * item ) {
+void Kleo::DNAttributeOrderConfigWidget::enableDisableButtons( TQListViewItem * item ) {
d->navTB[Private::UUp ]->setEnabled( item && item->itemAbove() );
d->navTB[Private::Up ]->setEnabled( item && item->itemAbove() );
d->navTB[Private::Left ]->setEnabled( item );
@@ -216,10 +216,10 @@ void Kleo::DNAttributeOrderConfigWidget::enableDisableButtons( QListViewItem * i
}
void Kleo::DNAttributeOrderConfigWidget::slotUpButtonClicked() {
- QListViewItem * item = d->currentLV->selectedItem();
+ TQListViewItem * item = d->currentLV->selectedItem();
if ( !item )
return;
- QListViewItem * above = item->itemAbove();
+ TQListViewItem * above = item->itemAbove();
if ( !above )
return;
above->moveItem( item ); // moves "above" to after "item", ie. "item" one up
@@ -228,7 +228,7 @@ void Kleo::DNAttributeOrderConfigWidget::slotUpButtonClicked() {
}
void Kleo::DNAttributeOrderConfigWidget::slotDoubleUpButtonClicked() {
- QListViewItem * item = d->currentLV->selectedItem();
+ TQListViewItem * item = d->currentLV->selectedItem();
if ( !item )
return;
if ( item == d->currentLV->firstChild() )
@@ -241,10 +241,10 @@ void Kleo::DNAttributeOrderConfigWidget::slotDoubleUpButtonClicked() {
}
void Kleo::DNAttributeOrderConfigWidget::slotDownButtonClicked() {
- QListViewItem * item = d->currentLV->selectedItem();
+ TQListViewItem * item = d->currentLV->selectedItem();
if ( !item )
return;
- QListViewItem * below = item->itemBelow();
+ TQListViewItem * below = item->itemBelow();
if ( !below )
return;
item->moveItem( below ); // moves "item" to after "below", ie. "item" one down
@@ -253,10 +253,10 @@ void Kleo::DNAttributeOrderConfigWidget::slotDownButtonClicked() {
}
void Kleo::DNAttributeOrderConfigWidget::slotDoubleDownButtonClicked() {
- QListViewItem * item = d->currentLV->selectedItem();
+ TQListViewItem * item = d->currentLV->selectedItem();
if ( !item )
return;
- QListViewItem * last = d->currentLV->lastItem();
+ TQListViewItem * last = d->currentLV->lastItem();
assert( last );
if ( item == last )
return;
@@ -266,10 +266,10 @@ void Kleo::DNAttributeOrderConfigWidget::slotDoubleDownButtonClicked() {
}
void Kleo::DNAttributeOrderConfigWidget::slotLeftButtonClicked() {
- QListViewItem * right = d->currentLV->selectedItem();
+ TQListViewItem * right = d->currentLV->selectedItem();
if ( !right )
return;
- QListViewItem * next = right->itemBelow();
+ TQListViewItem * next = right->itemBelow();
if ( !next )
next = right->itemAbove();
d->currentLV->takeItem( right );
@@ -281,16 +281,16 @@ void Kleo::DNAttributeOrderConfigWidget::slotLeftButtonClicked() {
}
void Kleo::DNAttributeOrderConfigWidget::slotRightButtonClicked() {
- QListViewItem * left = d->availableLV->selectedItem();
+ TQListViewItem * left = d->availableLV->selectedItem();
if ( !left )
return;
- QListViewItem * next = left->itemBelow();
+ TQListViewItem * next = left->itemBelow();
if ( !next )
next = left->itemAbove();
d->availableLV->takeItem( left );
d->currentLV->insertItem( left );
- if ( QListViewItem * right = d->currentLV->selectedItem() ) {
- if ( QListViewItem * above = right->itemAbove() )
+ if ( TQListViewItem * right = d->currentLV->selectedItem() ) {
+ if ( TQListViewItem * above = right->itemAbove() )
left->moveItem( above ); // move new item immediately before old selected
d->currentLV->setSelected( right, false );
}
diff --git a/certmanager/lib/ui/dnattributeorderconfigwidget.h b/certmanager/lib/ui/dnattributeorderconfigwidget.h
index 11299ab37..d57dfbdcf 100644
--- a/certmanager/lib/ui/dnattributeorderconfigwidget.h
+++ b/certmanager/lib/ui/dnattributeorderconfigwidget.h
@@ -33,7 +33,7 @@
#ifndef __KLEO_UI_DNATTRIBUTEORDERCONFIGWIDGET_H__
#define __KLEO_UI_DNATTRIBUTEORDERCONFIGWIDGET_H__
-#include <qwidget.h>
+#include <tqwidget.h>
#include <kdepimmacros.h>
namespace Kleo {
class DNAttributeMapper;
@@ -43,11 +43,11 @@ class QListViewItem;
namespace Kleo {
- class KDE_EXPORT DNAttributeOrderConfigWidget : public QWidget {
+ class KDE_EXPORT DNAttributeOrderConfigWidget : public TQWidget {
Q_OBJECT
public:
/*! Use Kleo::DNAttributeMapper::instance()->configWidget( parent, name ) instead. */
- DNAttributeOrderConfigWidget( DNAttributeMapper * mapper, QWidget * parent=0, const char * name=0, WFlags f=0 );
+ DNAttributeOrderConfigWidget( DNAttributeMapper * mapper, TQWidget * parent=0, const char * name=0, WFlags f=0 );
~DNAttributeOrderConfigWidget();
void load();
@@ -62,8 +62,8 @@ namespace Kleo {
//
private slots:
- void slotAvailableSelectionChanged( QListViewItem * );
- void slotCurrentOrderSelectionChanged( QListViewItem * );
+ void slotAvailableSelectionChanged( TQListViewItem * );
+ void slotCurrentOrderSelectionChanged( TQListViewItem * );
void slotDoubleUpButtonClicked();
void slotUpButtonClicked();
void slotDownButtonClicked();
@@ -73,7 +73,7 @@ namespace Kleo {
private:
void takePlaceHolderItem();
- void enableDisableButtons( QListViewItem * );
+ void enableDisableButtons( TQListViewItem * );
private:
class Private;
diff --git a/certmanager/lib/ui/kdhorizontalline.cpp b/certmanager/lib/ui/kdhorizontalline.cpp
index 83b92a19b..7ccddb5d0 100644
--- a/certmanager/lib/ui/kdhorizontalline.cpp
+++ b/certmanager/lib/ui/kdhorizontalline.cpp
@@ -40,38 +40,38 @@
#include "kdhorizontalline.h"
-#include <qstyle.h>
-#include <qpainter.h>
+#include <tqstyle.h>
+#include <tqpainter.h>
#ifdef QT_ACCESSIBILITY_SUPPORT
-#include <qaccessible.h>
+#include <tqaccessible.h>
#endif
-#include <qfontmetrics.h>
-#include <qapplication.h>
+#include <tqfontmetrics.h>
+#include <tqapplication.h>
-KDHorizontalLine::KDHorizontalLine( QWidget * parent, const char * name, WFlags f )
- : QFrame( parent, name, f ),
+KDHorizontalLine::KDHorizontalLine( TQWidget * parent, const char * name, WFlags f )
+ : TQFrame( parent, name, f ),
mAlign( Qt::AlignAuto ),
mLenVisible( 0 )
{
- QFrame::setFrameStyle( HLine | Sunken );
+ TQFrame::setFrameStyle( HLine | Sunken );
}
-KDHorizontalLine::KDHorizontalLine( const QString & title, QWidget * parent, const char * name, WFlags f )
- : QFrame( parent, name, f ),
+KDHorizontalLine::KDHorizontalLine( const TQString & title, TQWidget * parent, const char * name, WFlags f )
+ : TQFrame( parent, name, f ),
mAlign( Qt::AlignAuto ),
mLenVisible( 0 )
{
- QFrame::setFrameStyle( HLine | Sunken );
+ TQFrame::setFrameStyle( HLine | Sunken );
setTitle( title );
}
KDHorizontalLine::~KDHorizontalLine() {}
void KDHorizontalLine::setFrameStyle( int style ) {
- QFrame::setFrameStyle( ( style & ~MShape ) | HLine ); // force HLine
+ TQFrame::setFrameStyle( ( style & ~MShape ) | HLine ); // force HLine
}
-void KDHorizontalLine::setTitle( const QString & title ) {
+void KDHorizontalLine::setTitle( const TQString & title ) {
if ( mTitle == title )
return;
mTitle = title;
@@ -79,7 +79,7 @@ void KDHorizontalLine::setTitle( const QString & title ) {
update();
updateGeometry();
#ifdef QT_ACCESSIBILITY_SUPPORT
- QAccessible::updateAccessibility( this, 0, QAccessible::NameChanged );
+ TQAccessible::updateAccessibility( this, 0, TQAccessible::NameChanged );
#endif
}
@@ -87,17 +87,17 @@ void KDHorizontalLine::calculateFrame() {
mLenVisible = mTitle.length();
#if 0
if ( mLenVisible ) {
- const QFontMetrics fm = fontMetrics();
+ const TQFontMetrics fm = fontMetrics();
while ( mLenVisible ) {
- const int tw = fm.width( mTitle, mLenVisible ) + 4*fm.width(QChar(' '));
+ const int tw = fm.width( mTitle, mLenVisible ) + 4*fm.width(TQChar(' '));
if ( tw < width() )
break;
mLenVisible--;
}
qDebug( "mLenVisible = %d (of %d)", mLenVisible, mTitle.length() );
if ( mLenVisible ) { // but do we also have a visible label?
- QRect r = rect();
- const int va = style().styleHint( QStyle::SH_GroupBox_TextLabelVerticalAlignment, this );
+ TQRect r = rect();
+ const int va = style().styleHint( TQStyle::SH_GroupBox_TextLabelVerticalAlignment, this );
if( va & AlignVCenter )
r.setTop( fm.height() / 2 ); // frame rect should be
else if( va & AlignTop )
@@ -107,32 +107,32 @@ void KDHorizontalLine::calculateFrame() {
}
}
// no visible label
- setFrameRect( QRect(0,0,0,0) ); // then use client rect
+ setFrameRect( TQRect(0,0,0,0) ); // then use client rect
#endif
}
-QSizePolicy KDHorizontalLine::sizePolicy() const {
- return QSizePolicy( QSizePolicy::Minimum, QSizePolicy::Fixed );
+TQSizePolicy KDHorizontalLine::sizePolicy() const {
+ return TQSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Fixed );
}
-QSize KDHorizontalLine::sizeHint() const {
+TQSize KDHorizontalLine::sizeHint() const {
return minimumSizeHint();
}
-QSize KDHorizontalLine::minimumSizeHint() const {
+TQSize KDHorizontalLine::minimumSizeHint() const {
const int w = fontMetrics().width( mTitle, mLenVisible ) +
- fontMetrics().width( QChar( ' ' ) );
+ fontMetrics().width( TQChar( ' ' ) );
const int h = fontMetrics().height();
- return QSize( QMAX( w, indentHint() ), h ).expandedTo( qApp->globalStrut() );
+ return TQSize( QMAX( w, indentHint() ), h ).expandedTo( qApp->globalStrut() );
}
-void KDHorizontalLine::paintEvent( QPaintEvent * e ) {
- QPainter paint( this );
+void KDHorizontalLine::paintEvent( TQPaintEvent * e ) {
+ TQPainter paint( this );
if ( mLenVisible ) { // draw title
- const QFontMetrics & fm = paint.fontMetrics();
+ const TQFontMetrics & fm = paint.fontMetrics();
const int h = fm.height();
- const int tw = fm.width( mTitle, mLenVisible ) + fm.width(QChar(' '));
+ const int tw = fm.width( mTitle, mLenVisible ) + fm.width(TQChar(' '));
int x;
if ( mAlign & AlignHCenter ) // center alignment
x = frameRect().width()/2 - tw/2;
@@ -141,18 +141,18 @@ void KDHorizontalLine::paintEvent( QPaintEvent * e ) {
else if ( mAlign & AlignLeft ) // left alignment
x = 0;
else { // auto align
- if( QApplication::reverseLayout() )
+ if( TQApplication::reverseLayout() )
x = frameRect().width() - tw;
else
x = 0;
}
- QRect r( x, 0, tw, h );
- int va = style().styleHint( QStyle::SH_GroupBox_TextLabelVerticalAlignment, this );
+ TQRect r( x, 0, tw, h );
+ int va = style().styleHint( TQStyle::SH_GroupBox_TextLabelVerticalAlignment, this );
if ( va & AlignTop )
r.moveBy( 0, fm.descent() );
- const QColor pen( (QRgb) style().styleHint( QStyle::SH_GroupBox_TextLabelColor, this ) );
+ const TQColor pen( (QRgb) style().styleHint( TQStyle::SH_GroupBox_TextLabelColor, this ) );
#if QT_VERSION >= 0x030300
- if ( !style().styleHint( QStyle::SH_UnderlineAccelerator, this ) )
+ if ( !style().styleHint( TQStyle::SH_UnderlineAccelerator, this ) )
va |= NoAccel;
#endif
style().drawItem( &paint, r, ShowPrefix | AlignHCenter | va, colorGroup(),
diff --git a/certmanager/lib/ui/kdhorizontalline.h b/certmanager/lib/ui/kdhorizontalline.h
index a79682ebd..5b6d5da9a 100644
--- a/certmanager/lib/ui/kdhorizontalline.h
+++ b/certmanager/lib/ui/kdhorizontalline.h
@@ -41,39 +41,39 @@
#ifndef __KDTOOLS__KDHORIZONTALLINE_H__
#define __KDTOOLS__KDHORIZONTALLINE_H__
-#include <qframe.h>
-#include <qstring.h>
+#include <tqframe.h>
+#include <tqstring.h>
-class KDHorizontalLine : public QFrame {
+class KDHorizontalLine : public TQFrame {
Q_OBJECT
- Q_PROPERTY( QString title READ title WRITE setTitle )
+ Q_PROPERTY( TQString title READ title WRITE setTitle )
public:
- KDHorizontalLine( QWidget * parent=0, const char * name=0, WFlags f=0 );
- KDHorizontalLine( const QString & title, QWidget * parent=0, const char * name=0, WFlags f=0 );
+ KDHorizontalLine( TQWidget * parent=0, const char * name=0, WFlags f=0 );
+ KDHorizontalLine( const TQString & title, TQWidget * parent=0, const char * name=0, WFlags f=0 );
~KDHorizontalLine();
- QString title() const { return mTitle; }
+ TQString title() const { return mTitle; }
/*! \reimp to hard-code the frame shape */
void setFrameStyle( int style );
- QSize sizeHint() const;
- QSize minimumSizeHint() const;
- QSizePolicy sizePolicy() const;
+ TQSize sizeHint() const;
+ TQSize minimumSizeHint() const;
+ TQSizePolicy sizePolicy() const;
static int indentHint();
public slots:
- virtual void setTitle( const QString & title );
+ virtual void setTitle( const TQString & title );
protected:
- void paintEvent( QPaintEvent * );
+ void paintEvent( TQPaintEvent * );
private:
void calculateFrame();
private:
- QString mTitle;
+ TQString mTitle;
Qt::AlignmentFlags mAlign;
int mLenVisible;
};
diff --git a/certmanager/lib/ui/keyapprovaldialog.cpp b/certmanager/lib/ui/keyapprovaldialog.cpp
index 7af85a0bb..d45b64a8c 100644
--- a/certmanager/lib/ui/keyapprovaldialog.cpp
+++ b/certmanager/lib/ui/keyapprovaldialog.cpp
@@ -49,13 +49,13 @@
#include <kglobalsettings.h>
#include <kseparator.h>
-#include <qstringlist.h>
-#include <qframe.h>
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qcombobox.h>
-#include <qscrollview.h>
-#include <qpushbutton.h>
+#include <tqstringlist.h>
+#include <tqframe.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqcombobox.h>
+#include <tqscrollview.h>
+#include <tqpushbutton.h>
#include <gpgmepp/key.h>
@@ -84,8 +84,8 @@ static int pref2cb( Kleo::EncryptionPreference p ) {
}
}
-static QStringList preferencesStrings() {
- return QStringList() << i18n("<none>")
+static TQStringList preferencesStrings() {
+ return TQStringList() << i18n("<none>")
<< i18n("Never Encrypt with This Key")
<< i18n("Always Encrypt with This Key")
<< i18n("Encrypt Whenever Encryption is Possible")
@@ -98,15 +98,15 @@ struct Kleo::KeyApprovalDialog::Private {
Private() : selfRequester( 0 ), prefsChanged( false ) {}
Kleo::KeyRequester * selfRequester;
- QStringList addresses;
+ TQStringList addresses;
std::vector<Kleo::KeyRequester*> requesters;
- std::vector<QComboBox*> preferences;
+ std::vector<TQComboBox*> preferences;
bool prefsChanged;
};
Kleo::KeyApprovalDialog::KeyApprovalDialog( const std::vector<Item> & recipients,
const std::vector<GpgME::Key> & sender,
- QWidget * parent, const char * name,
+ TQWidget * parent, const char * name,
bool modal )
: KDialogBase( parent, name, modal, i18n("Encryption Key Approval"), Ok|Cancel, Ok ),
d( 0 )
@@ -115,18 +115,18 @@ Kleo::KeyApprovalDialog::KeyApprovalDialog( const std::vector<Item> & recipients
d = new Private();
- QFrame *page = makeMainWidget();
- QVBoxLayout * vlay = new QVBoxLayout( page, 0, spacingHint() );
+ TQFrame *page = makeMainWidget();
+ TQVBoxLayout * vlay = new TQVBoxLayout( page, 0, spacingHint() );
- vlay->addWidget( new QLabel( i18n("The following keys will be used for encryption:"), page ) );
+ vlay->addWidget( new TQLabel( i18n("The following keys will be used for encryption:"), page ) );
- QScrollView * sv = new QScrollView( page );
- sv->setResizePolicy( QScrollView::AutoOneFit );
+ TQScrollView * sv = new TQScrollView( page );
+ sv->setResizePolicy( TQScrollView::AutoOneFit );
vlay->addWidget( sv );
- QWidget * view = new QWidget( sv->viewport() );
+ TQWidget * view = new TQWidget( sv->viewport() );
- QGridLayout * glay = new QGridLayout( view, 3, 2, marginHint(), spacingHint() );
+ TQGridLayout * glay = new TQGridLayout( view, 3, 2, marginHint(), spacingHint() );
glay->setColStretch( 1, 1 );
sv->addChild( view );
@@ -134,7 +134,7 @@ Kleo::KeyApprovalDialog::KeyApprovalDialog( const std::vector<Item> & recipients
if ( !sender.empty() ) {
++row;
- glay->addWidget( new QLabel( i18n("Your keys:"), view ), row, 0 );
+ glay->addWidget( new TQLabel( i18n("Your keys:"), view ), row, 0 );
d->selfRequester = new EncryptionKeyRequester( true, EncryptionKeyRequester::AllProtocols, view );
d->selfRequester->setKeys( sender );
glay->addWidget( d->selfRequester, row, 1 );
@@ -142,28 +142,28 @@ Kleo::KeyApprovalDialog::KeyApprovalDialog( const std::vector<Item> & recipients
glay->addMultiCellWidget( new KSeparator( Horizontal, view ), row, row, 0, 1 );
}
- const QStringList prefs = preferencesStrings();
+ const TQStringList prefs = preferencesStrings();
for ( std::vector<Item>::const_iterator it = recipients.begin() ; it != recipients.end() ; ++it ) {
++row;
- glay->addWidget( new QLabel( i18n("Recipient:"), view ), row, 0 );
- glay->addWidget( new QLabel( it->address, view ), row, 1 );
+ glay->addWidget( new TQLabel( i18n("Recipient:"), view ), row, 0 );
+ glay->addWidget( new TQLabel( it->address, view ), row, 1 );
d->addresses.push_back( it->address );
++row;
- glay->addWidget( new QLabel( i18n("Encryption keys:"), view ), row, 0 );
+ glay->addWidget( new TQLabel( i18n("Encryption keys:"), view ), row, 0 );
KeyRequester * req = new EncryptionKeyRequester( true, EncryptionKeyRequester::AllProtocols, view );
req->setKeys( it->keys );
glay->addWidget( req, row, 1 );
d->requesters.push_back( req );
++row;
- glay->addWidget( new QLabel( i18n("Encryption preference:"), view ), row, 0 );
- QComboBox * cb = new QComboBox( false, view );
+ glay->addWidget( new TQLabel( i18n("Encryption preference:"), view ), row, 0 );
+ TQComboBox * cb = new TQComboBox( false, view );
cb->insertStringList( prefs );
glay->addWidget( cb, row, 1 );
cb->setCurrentItem( pref2cb( it->pref ) );
- connect( cb, SIGNAL(activated(int)), SLOT(slotPrefsChanged()) );
+ connect( cb, TQT_SIGNAL(activated(int)), TQT_SLOT(slotPrefsChanged()) );
d->preferences.push_back( cb );
}
@@ -189,8 +189,8 @@ Kleo::KeyApprovalDialog::KeyApprovalDialog( const std::vector<Item> & recipients
+ 2;
// don't make the dialog too large
- const QRect desk = KGlobalSettings::desktopGeometry( this );
- setInitialSize( QSize( kMin( dialogWidth, 3 * desk.width() / 4 ),
+ const TQRect desk = KGlobalSettings::desktopGeometry( this );
+ setInitialSize( TQSize( kMin( dialogWidth, 3 * desk.width() / 4 ),
kMin( dialogHeight, 7 * desk.height() / 8 ) ) );
}
@@ -208,9 +208,9 @@ std::vector<Kleo::KeyApprovalDialog::Item> Kleo::KeyApprovalDialog::items() cons
std::vector<Item> result;
result.reserve( d->requesters.size() );
- QStringList::const_iterator ait = d->addresses.begin();
+ TQStringList::const_iterator ait = d->addresses.begin();
std::vector<KeyRequester*>::const_iterator rit = d->requesters.begin();
- std::vector<QComboBox*>::const_iterator cit = d->preferences.begin();
+ std::vector<TQComboBox*>::const_iterator cit = d->preferences.begin();
while ( ait != d->addresses.end() )
result.push_back( Item( *ait++, (*rit++)->keys(), cb2pref( (*cit++)->currentItem() ) ) );
return result;
diff --git a/certmanager/lib/ui/keyapprovaldialog.h b/certmanager/lib/ui/keyapprovaldialog.h
index 224530a71..e669690ec 100644
--- a/certmanager/lib/ui/keyapprovaldialog.h
+++ b/certmanager/lib/ui/keyapprovaldialog.h
@@ -60,17 +60,17 @@ namespace Kleo {
public:
struct Item {
Item() : pref( UnknownPreference ) {}
- Item( const QString & a, const std::vector<GpgME::Key> & k,
+ Item( const TQString & a, const std::vector<GpgME::Key> & k,
EncryptionPreference p=UnknownPreference )
: address( a ), keys( k ), pref( p ) {}
- QString address;
+ TQString address;
std::vector<GpgME::Key> keys;
EncryptionPreference pref;
};
KeyApprovalDialog( const std::vector<Item> & recipients,
const std::vector<GpgME::Key> & sender,
- QWidget * parent=0, const char * name=0,
+ TQWidget * parent=0, const char * name=0,
bool modal=true );
~KeyApprovalDialog();
diff --git a/certmanager/lib/ui/keylistview.cpp b/certmanager/lib/ui/keylistview.cpp
index 98534a4b7..fa8c9eb83 100644
--- a/certmanager/lib/ui/keylistview.cpp
+++ b/certmanager/lib/ui/keylistview.cpp
@@ -38,17 +38,17 @@
#include <kdebug.h>
-#include <qfontmetrics.h>
-#include <qtooltip.h>
-#include <qrect.h>
-#include <qheader.h>
-#include <qpoint.h>
-#include <qptrlist.h>
-#include <qpainter.h>
-#include <qfont.h>
-#include <qcolor.h>
-#include <qtimer.h>
-#include <qcstring.h>
+#include <tqfontmetrics.h>
+#include <tqtooltip.h>
+#include <tqrect.h>
+#include <tqheader.h>
+#include <tqpoint.h>
+#include <tqptrlist.h>
+#include <tqpainter.h>
+#include <tqfont.h>
+#include <tqcolor.h>
+#include <tqtimer.h>
+#include <tqcstring.h>
#include <gpgmepp/key.h>
@@ -61,27 +61,27 @@ static const int updateDelayMilliSecs = 500;
namespace {
- class ItemToolTip : public QToolTip {
+ class ItemToolTip : public TQToolTip {
public:
ItemToolTip( Kleo::KeyListView * parent );
protected:
- void maybeTip( const QPoint & p );
+ void maybeTip( const TQPoint & p );
private:
Kleo::KeyListView * mKeyListView;
};
ItemToolTip::ItemToolTip( Kleo::KeyListView * parent )
- : QToolTip( parent->viewport() ), mKeyListView( parent ) {}
+ : TQToolTip( parent->viewport() ), mKeyListView( parent ) {}
- void ItemToolTip::maybeTip( const QPoint & p ) {
+ void ItemToolTip::maybeTip( const TQPoint & p ) {
if ( !mKeyListView )
return;
- const QListViewItem * item = mKeyListView->itemAt( p );
+ const TQListViewItem * item = mKeyListView->itemAt( p );
if ( !item )
return;
- const QRect itemRect = mKeyListView->itemRect( item );
+ const TQRect itemRect = mKeyListView->itemRect( item );
if ( !itemRect.isValid() )
return;
@@ -89,14 +89,14 @@ namespace {
if ( col == -1 )
return;
- const QRect headerRect = mKeyListView->header()->sectionRect( col );
+ const TQRect headerRect = mKeyListView->header()->sectionRect( col );
if ( !headerRect.isValid() )
return;
- const QRect cellRect( headerRect.left(), itemRect.top(),
+ const TQRect cellRect( headerRect.left(), itemRect.top(),
headerRect.width(), itemRect.height() );
- QString tipStr;
+ TQString tipStr;
if ( const Kleo::KeyListViewItem * klvi = Kleo::lvi_cast<Kleo::KeyListViewItem>( item ) )
tipStr = klvi->toolTip( col );
else
@@ -112,30 +112,30 @@ struct Kleo::KeyListView::Private {
Private() : updateTimer( 0 ), itemToolTip( 0 ) {}
std::vector<GpgME::Key> keyBuffer;
- QTimer * updateTimer;
- QToolTip * itemToolTip;
- std::map<QCString,KeyListViewItem*> itemMap;
+ TQTimer * updateTimer;
+ TQToolTip * itemToolTip;
+ std::map<TQCString,KeyListViewItem*> itemMap;
};
-// a list of signals where we want to replace QListViewItem with
+// a list of signals where we want to replace TQListViewItem with
// Kleo:KeyListViewItem:
static const struct {
const char * source;
const char * target;
} signalReplacements[] = {
- { SIGNAL(doubleClicked(QListViewItem*,const QPoint&,int)),
- SLOT(slotEmitDoubleClicked(QListViewItem*,const QPoint&,int)) },
- { SIGNAL(returnPressed(QListViewItem*)),
- SLOT(slotEmitReturnPressed(QListViewItem*)) },
- { SIGNAL(selectionChanged(QListViewItem*)),
- SLOT(slotEmitSelectionChanged(QListViewItem*)) },
- { SIGNAL(contextMenu(KListView*, QListViewItem*,const QPoint&)),
- SLOT(slotEmitContextMenu(KListView*, QListViewItem*,const QPoint&)) },
+ { TQT_SIGNAL(doubleClicked(TQListViewItem*,const TQPoint&,int)),
+ TQT_SLOT(slotEmitDoubleClicked(TQListViewItem*,const TQPoint&,int)) },
+ { TQT_SIGNAL(returnPressed(TQListViewItem*)),
+ TQT_SLOT(slotEmitReturnPressed(TQListViewItem*)) },
+ { TQT_SIGNAL(selectionChanged(TQListViewItem*)),
+ TQT_SLOT(slotEmitSelectionChanged(TQListViewItem*)) },
+ { TQT_SIGNAL(contextMenu(KListView*, TQListViewItem*,const TQPoint&)),
+ TQT_SLOT(slotEmitContextMenu(KListView*, TQListViewItem*,const TQPoint&)) },
};
static const int numSignalReplacements = sizeof signalReplacements / sizeof *signalReplacements;
-Kleo::KeyListView::KeyListView( const ColumnStrategy * columnStrategy, const DisplayStrategy * displayStrategy, QWidget * parent, const char * name, WFlags f )
+Kleo::KeyListView::KeyListView( const ColumnStrategy * columnStrategy, const DisplayStrategy * displayStrategy, TQWidget * parent, const char * name, WFlags f )
: KListView( parent, name ),
mColumnStrategy( columnStrategy ),
mDisplayStrategy ( displayStrategy ),
@@ -145,15 +145,15 @@ Kleo::KeyListView::KeyListView( const ColumnStrategy * columnStrategy, const Dis
d = new Private();
- d->updateTimer = new QTimer( this );
- connect( d->updateTimer, SIGNAL(timeout()), SLOT(slotUpdateTimeout()) );
+ d->updateTimer = new TQTimer( this );
+ connect( d->updateTimer, TQT_SIGNAL(timeout()), TQT_SLOT(slotUpdateTimeout()) );
if ( !columnStrategy ) {
kdWarning(5150) << "Kleo::KeyListView: need a column strategy to work with!" << endl;
return;
}
- const QFontMetrics fm = fontMetrics();
+ const TQFontMetrics fm = fontMetrics();
for ( int col = 0 ; !columnStrategy->title( col ).isEmpty() ; ++col ) {
addColumn( columnStrategy->title( col ), columnStrategy->width( col, fm ) );
@@ -166,33 +166,33 @@ Kleo::KeyListView::KeyListView( const ColumnStrategy * columnStrategy, const Dis
for ( int i = 0 ; i < numSignalReplacements ; ++i )
connect( this, signalReplacements[i].source, signalReplacements[i].target );
- QToolTip::remove( this );
- QToolTip::remove( viewport() ); // make double sure :)
+ TQToolTip::remove( this );
+ TQToolTip::remove( viewport() ); // make double sure :)
d->itemToolTip = new ItemToolTip( this );
}
Kleo::KeyListView::~KeyListView() {
d->updateTimer->stop();
- // need to clear here, since in ~QListView, our children won't have
+ // need to clear here, since in ~TQListView, our children won't have
// a valid listView() pointing to us anymore, and their dtors try to
// unregister from us.
clear();
assert( d->itemMap.size() == 0 );
- // need to delete the tooltip ourselves, as ~QToolTip isn't virtual :o
+ // need to delete the tooltip ourselves, as ~TQToolTip isn't virtual :o
delete d->itemToolTip; d->itemToolTip = 0;
delete d; d = 0;
delete mColumnStrategy; mColumnStrategy = 0;
delete mDisplayStrategy; mDisplayStrategy = 0;
}
-void Kleo::KeyListView::insertItem( QListViewItem * qlvi ) {
+void Kleo::KeyListView::insertItem( TQListViewItem * qlvi ) {
//kdDebug() << "Kleo::KeyListView::insertItem( " << qlvi << " )" << endl;
KListView::insertItem( qlvi );
if ( KeyListViewItem * item = lvi_cast<KeyListViewItem>( qlvi ) )
registerItem( item );
}
-void Kleo::KeyListView::takeItem( QListViewItem * qlvi ) {
+void Kleo::KeyListView::takeItem( TQListViewItem * qlvi ) {
//kdDebug() << "Kleo::KeyListView::takeItem( " << qlvi << " )" << endl;
if ( KeyListViewItem * item = lvi_cast<KeyListViewItem>( qlvi ) )
deregisterItem( item );
@@ -251,7 +251,7 @@ void Kleo::KeyListView::registerItem( KeyListViewItem * item ) {
//kdDebug() << "registerItem( " << item << " )" << endl;
if ( !item )
return;
- const QCString fpr = item->key().primaryFingerprint();
+ const TQCString fpr = item->key().primaryFingerprint();
if ( !fpr.isEmpty() )
d->itemMap.insert( std::make_pair( fpr, item ) );
}
@@ -260,7 +260,7 @@ void Kleo::KeyListView::deregisterItem( const KeyListViewItem * item ) {
//kdDebug() << "deregisterItem( KeyLVI: " << item << " )" << endl;
if ( !item )
return;
- std::map<QCString,KeyListViewItem*>::iterator it
+ std::map<TQCString,KeyListViewItem*>::iterator it
= d->itemMap.find( item->key().primaryFingerprint() );
if ( it == d->itemMap.end() )
return;
@@ -271,7 +271,7 @@ void Kleo::KeyListView::deregisterItem( const KeyListViewItem * item ) {
}
void Kleo::KeyListView::doHierarchicalInsert( const GpgME::Key & key ) {
- const QCString fpr = key.primaryFingerprint();
+ const TQCString fpr = key.primaryFingerprint();
if ( fpr.isEmpty() )
return;
KeyListViewItem * item = 0;
@@ -303,10 +303,10 @@ void Kleo::KeyListView::gatherScattered() {
}
}
-void Kleo::KeyListView::scatterGathered( QListViewItem * start ) {
- QListViewItem * item = start;
+void Kleo::KeyListView::scatterGathered( TQListViewItem * start ) {
+ TQListViewItem * item = start;
while ( item ) {
- QListViewItem * cur = item;
+ TQListViewItem * cur = item;
item = item->nextSibling();
scatterGathered( cur->firstChild() );
@@ -321,10 +321,10 @@ void Kleo::KeyListView::scatterGathered( QListViewItem * start ) {
}
}
-Kleo::KeyListViewItem * Kleo::KeyListView::itemByFingerprint( const QCString & s ) const {
+Kleo::KeyListViewItem * Kleo::KeyListView::itemByFingerprint( const TQCString & s ) const {
if ( s.isEmpty() )
return 0;
- const std::map<QCString,KeyListViewItem*>::const_iterator it = d->itemMap.find( s );
+ const std::map<TQCString,KeyListViewItem*>::const_iterator it = d->itemMap.find( s );
if ( it == d->itemMap.end() )
return 0;
return it->second;
@@ -344,22 +344,22 @@ void Kleo::KeyListView::slotRefreshKey( const GpgME::Key & key ) {
// slots for the emission of covariant signals:
-void Kleo::KeyListView::slotEmitDoubleClicked( QListViewItem * item, const QPoint & p, int col ) {
+void Kleo::KeyListView::slotEmitDoubleClicked( TQListViewItem * item, const TQPoint & p, int col ) {
if ( !item || lvi_cast<KeyListViewItem>( item ) )
emit doubleClicked( static_cast<KeyListViewItem*>( item ), p, col );
}
-void Kleo::KeyListView::slotEmitReturnPressed( QListViewItem * item ) {
+void Kleo::KeyListView::slotEmitReturnPressed( TQListViewItem * item ) {
if ( !item || lvi_cast<KeyListViewItem>( item ) )
emit returnPressed( static_cast<KeyListViewItem*>( item ) );
}
-void Kleo::KeyListView::slotEmitSelectionChanged( QListViewItem * item ) {
+void Kleo::KeyListView::slotEmitSelectionChanged( TQListViewItem * item ) {
if ( !item || lvi_cast<KeyListViewItem>( item ) )
emit selectionChanged( static_cast<KeyListViewItem*>( item ) );
}
-void Kleo::KeyListView::slotEmitContextMenu( KListView*, QListViewItem * item, const QPoint & p ) {
+void Kleo::KeyListView::slotEmitContextMenu( KListView*, TQListViewItem * item, const TQPoint & p ) {
if ( !item || lvi_cast<KeyListViewItem>( item ) )
emit contextMenu( static_cast<KeyListViewItem*>( item ), p );
}
@@ -371,25 +371,25 @@ void Kleo::KeyListView::slotEmitContextMenu( KListView*, QListViewItem * item, c
//
Kleo::KeyListViewItem::KeyListViewItem( KeyListView * parent, const GpgME::Key & key )
- : QListViewItem( parent )
+ : TQListViewItem( parent )
{
setKey( key );
}
Kleo::KeyListViewItem::KeyListViewItem( KeyListView * parent, KeyListViewItem * after, const GpgME::Key & key )
- : QListViewItem( parent, after )
+ : TQListViewItem( parent, after )
{
setKey( key );
}
Kleo::KeyListViewItem::KeyListViewItem( KeyListViewItem * parent, const GpgME::Key & key )
- : QListViewItem( parent )
+ : TQListViewItem( parent )
{
setKey( key );
}
Kleo::KeyListViewItem::KeyListViewItem( KeyListViewItem * parent, KeyListViewItem * after, const GpgME::Key & key )
- : QListViewItem( parent, after )
+ : TQListViewItem( parent, after )
{
setKey( key );
}
@@ -399,11 +399,11 @@ Kleo::KeyListViewItem::~KeyListViewItem() {
// QLVI dtor, they don't have listView() anymore, thus they don't
// call deregister( this ), leading to stale entries in the
// itemMap...
- while ( QListViewItem * item = firstChild() )
+ while ( TQListViewItem * item = firstChild() )
delete item;
// better do this here, too, since deletion is top-down and thus
// we're deleted when our parent item is no longer a
- // KeyListViewItem, but a mere QListViewItem, so our takeItem()
+ // KeyListViewItem, but a mere TQListViewItem, so our takeItem()
// overload is gone by that time...
if ( KeyListView * lv = listView() )
lv->deregisterItem( this );
@@ -425,55 +425,55 @@ void Kleo::KeyListViewItem::setKey( const GpgME::Key & key ) {
const int numCols = lv ? lv->columns() : 0 ;
for ( int i = 0 ; i < numCols ; ++i ) {
setText( i, cs->text( key, i ) );
- if ( const QPixmap * pix = cs->pixmap( key, i ) )
+ if ( const TQPixmap * pix = cs->pixmap( key, i ) )
setPixmap( i, *pix );
}
repaint();
}
-QString Kleo::KeyListViewItem::toolTip( int col ) const {
+TQString Kleo::KeyListViewItem::toolTip( int col ) const {
return listView() && listView()->columnStrategy()
? listView()->columnStrategy()->toolTip( key(), col )
- : QString::null ;
+ : TQString::null ;
}
-int Kleo::KeyListViewItem::compare( QListViewItem * item, int col, bool ascending ) const {
+int Kleo::KeyListViewItem::compare( TQListViewItem * item, int col, bool ascending ) const {
if ( !item || item->rtti() != RTTI || !listView() || !listView()->columnStrategy() )
- return QListViewItem::compare( item, col, ascending );
+ return TQListViewItem::compare( item, col, ascending );
KeyListViewItem * that = static_cast<KeyListViewItem*>( item );
return listView()->columnStrategy()->compare( this->key(), that->key(), col );
}
-void Kleo::KeyListViewItem::paintCell( QPainter * p, const QColorGroup & cg, int column, int width, int alignment ) {
+void Kleo::KeyListViewItem::paintCell( TQPainter * p, const TQColorGroup & cg, int column, int width, int alignment ) {
const KeyListView::DisplayStrategy * ds = listView() ? listView()->displayStrategy() : 0 ;
if ( !ds ) {
- QListViewItem::paintCell( p, cg, column, width, alignment );
+ TQListViewItem::paintCell( p, cg, column, width, alignment );
return;
}
- const QColor fg = ds->keyForeground( key(), cg.text() );
- const QColor bg = ds->keyBackground( key(), cg.base() );
- const QFont f = ds->keyFont( key(), p->font() );
+ const TQColor fg = ds->keyForeground( key(), cg.text() );
+ const TQColor bg = ds->keyBackground( key(), cg.base() );
+ const TQFont f = ds->keyFont( key(), p->font() );
- QColorGroup _cg = cg;
+ TQColorGroup _cg = cg;
p->setFont( f );
- _cg.setColor( QColorGroup::Text, fg );
- _cg.setColor( QColorGroup::Base, bg );
+ _cg.setColor( TQColorGroup::Text, fg );
+ _cg.setColor( TQColorGroup::Base, bg );
- QListViewItem::paintCell( p, _cg, column, width, alignment );
+ TQListViewItem::paintCell( p, _cg, column, width, alignment );
}
-void Kleo::KeyListViewItem::insertItem( QListViewItem * qlvi ) {
+void Kleo::KeyListViewItem::insertItem( TQListViewItem * qlvi ) {
//kdDebug() << "Kleo::KeyListViewItem::insertItem( " << qlvi << " )" << endl;
- QListViewItem::insertItem( qlvi );
+ TQListViewItem::insertItem( qlvi );
if ( KeyListViewItem * item = lvi_cast<KeyListViewItem>( qlvi ) )
listView()->registerItem( item );
}
-void Kleo::KeyListViewItem::takeItem( QListViewItem * qlvi ) {
+void Kleo::KeyListViewItem::takeItem( TQListViewItem * qlvi ) {
//kdDebug() << "Kleo::KeyListViewItem::takeItem( " << qlvi << " )" << endl;
if ( KeyListViewItem * item = lvi_cast<KeyListViewItem>( qlvi ) )
listView()->deregisterItem( item );
- QListViewItem::takeItem( qlvi );
+ TQListViewItem::takeItem( qlvi );
}
@@ -512,46 +512,46 @@ void Kleo::SubkeyKeyListViewItem::setSubkey( const GpgME::Subkey & subkey ) {
setKey( subkey.parent() );
}
-QString Kleo::SubkeyKeyListViewItem::text( int col ) const {
+TQString Kleo::SubkeyKeyListViewItem::text( int col ) const {
return listView() && listView()->columnStrategy()
? listView()->columnStrategy()->subkeyText( subkey(), col )
- : QString::null ;
+ : TQString::null ;
}
-QString Kleo::SubkeyKeyListViewItem::toolTip( int col ) const {
+TQString Kleo::SubkeyKeyListViewItem::toolTip( int col ) const {
return listView() && listView()->columnStrategy()
? listView()->columnStrategy()->subkeyToolTip( subkey(), col )
- : QString::null ;
+ : TQString::null ;
}
-const QPixmap * Kleo::SubkeyKeyListViewItem::pixmap( int col ) const {
+const TQPixmap * Kleo::SubkeyKeyListViewItem::pixmap( int col ) const {
return listView() && listView()->columnStrategy()
? listView()->columnStrategy()->subkeyPixmap( subkey(), col ) : 0 ;
}
-int Kleo::SubkeyKeyListViewItem::compare( QListViewItem * item, int col, bool ascending ) const {
+int Kleo::SubkeyKeyListViewItem::compare( TQListViewItem * item, int col, bool ascending ) const {
if ( !item || item->rtti() != RTTI || !listView() || !listView()->columnStrategy() )
return KeyListViewItem::compare( item, col, ascending );
SubkeyKeyListViewItem * that = static_cast<SubkeyKeyListViewItem*>( item );
return listView()->columnStrategy()->subkeyCompare( this->subkey(), that->subkey(), col );
}
-void Kleo::SubkeyKeyListViewItem::paintCell( QPainter * p, const QColorGroup & cg, int column, int width, int alignment ) {
+void Kleo::SubkeyKeyListViewItem::paintCell( TQPainter * p, const TQColorGroup & cg, int column, int width, int alignment ) {
const KeyListView::DisplayStrategy * ds = listView() ? listView()->displayStrategy() : 0 ;
if ( !ds ) {
- QListViewItem::paintCell( p, cg, column, width, alignment );
+ TQListViewItem::paintCell( p, cg, column, width, alignment );
return;
}
- const QColor fg = ds->subkeyForeground( subkey(), cg.text() );
- const QColor bg = ds->subkeyBackground( subkey(), cg.base() );
- const QFont f = ds->subkeyFont( subkey(), p->font() );
+ const TQColor fg = ds->subkeyForeground( subkey(), cg.text() );
+ const TQColor bg = ds->subkeyBackground( subkey(), cg.base() );
+ const TQFont f = ds->subkeyFont( subkey(), p->font() );
- QColorGroup _cg = cg;
+ TQColorGroup _cg = cg;
p->setFont( f );
- _cg.setColor( QColorGroup::Text, fg );
- _cg.setColor( QColorGroup::Base, bg );
+ _cg.setColor( TQColorGroup::Text, fg );
+ _cg.setColor( TQColorGroup::Base, bg );
- QListViewItem::paintCell( p, _cg, column, width, alignment );
+ TQListViewItem::paintCell( p, _cg, column, width, alignment );
}
@@ -590,24 +590,24 @@ void Kleo::UserIDKeyListViewItem::setUserID( const GpgME::UserID & userID ) {
setKey( userID.parent() );
}
-QString Kleo::UserIDKeyListViewItem::text( int col ) const {
+TQString Kleo::UserIDKeyListViewItem::text( int col ) const {
return listView() && listView()->columnStrategy()
? listView()->columnStrategy()->userIDText( userID(), col )
- : QString::null ;
+ : TQString::null ;
}
-QString Kleo::UserIDKeyListViewItem::toolTip( int col ) const {
+TQString Kleo::UserIDKeyListViewItem::toolTip( int col ) const {
return listView() && listView()->columnStrategy()
? listView()->columnStrategy()->userIDToolTip( userID(), col )
- : QString::null ;
+ : TQString::null ;
}
-const QPixmap * Kleo::UserIDKeyListViewItem::pixmap( int col ) const {
+const TQPixmap * Kleo::UserIDKeyListViewItem::pixmap( int col ) const {
return listView() && listView()->columnStrategy()
? listView()->columnStrategy()->userIDPixmap( userID(), col ) : 0 ;
}
-int Kleo::UserIDKeyListViewItem::compare( QListViewItem * item, int col, bool ascending ) const {
+int Kleo::UserIDKeyListViewItem::compare( TQListViewItem * item, int col, bool ascending ) const {
if ( !item || item->rtti() != RTTI || !listView() || !listView()->columnStrategy() )
return KeyListViewItem::compare( item, col, ascending );
UserIDKeyListViewItem * that = static_cast<UserIDKeyListViewItem*>( item );
@@ -615,22 +615,22 @@ int Kleo::UserIDKeyListViewItem::compare( QListViewItem * item, int col, bool as
}
-void Kleo::UserIDKeyListViewItem::paintCell( QPainter * p, const QColorGroup & cg, int column, int width, int alignment ) {
+void Kleo::UserIDKeyListViewItem::paintCell( TQPainter * p, const TQColorGroup & cg, int column, int width, int alignment ) {
const KeyListView::DisplayStrategy * ds = listView() ? listView()->displayStrategy() : 0 ;
if ( !ds ) {
- QListViewItem::paintCell( p, cg, column, width, alignment );
+ TQListViewItem::paintCell( p, cg, column, width, alignment );
return;
}
- const QColor fg = ds->useridForeground( userID(), cg.text() );
- const QColor bg = ds->useridBackground( userID(), cg.base() );
- const QFont f = ds->useridFont( userID(), p->font() );
+ const TQColor fg = ds->useridForeground( userID(), cg.text() );
+ const TQColor bg = ds->useridBackground( userID(), cg.base() );
+ const TQFont f = ds->useridFont( userID(), p->font() );
- QColorGroup _cg = cg;
+ TQColorGroup _cg = cg;
p->setFont( f );
- _cg.setColor( QColorGroup::Text, fg );
- _cg.setColor( QColorGroup::Base, bg );
+ _cg.setColor( TQColorGroup::Text, fg );
+ _cg.setColor( TQColorGroup::Base, bg );
- QListViewItem::paintCell( p, _cg, column, width, alignment );
+ TQListViewItem::paintCell( p, _cg, column, width, alignment );
}
@@ -669,46 +669,46 @@ void Kleo::SignatureKeyListViewItem::setSignature( const GpgME::UserID::Signatur
setKey( signature.parent().parent() );
}
-QString Kleo::SignatureKeyListViewItem::text( int col ) const {
+TQString Kleo::SignatureKeyListViewItem::text( int col ) const {
return listView() && listView()->columnStrategy()
? listView()->columnStrategy()->signatureText( signature(), col )
- : QString::null ;
+ : TQString::null ;
}
-QString Kleo::SignatureKeyListViewItem::toolTip( int col ) const {
+TQString Kleo::SignatureKeyListViewItem::toolTip( int col ) const {
return listView() && listView()->columnStrategy()
? listView()->columnStrategy()->signatureToolTip( signature(), col )
- : QString::null ;
+ : TQString::null ;
}
-const QPixmap * Kleo::SignatureKeyListViewItem::pixmap( int col ) const {
+const TQPixmap * Kleo::SignatureKeyListViewItem::pixmap( int col ) const {
return listView() && listView()->columnStrategy()
? listView()->columnStrategy()->signaturePixmap( signature(), col ) : 0 ;
}
-int Kleo::SignatureKeyListViewItem::compare( QListViewItem * item, int col, bool ascending ) const {
+int Kleo::SignatureKeyListViewItem::compare( TQListViewItem * item, int col, bool ascending ) const {
if ( !item || item->rtti() != RTTI || !listView() || !listView()->columnStrategy() )
return KeyListViewItem::compare( item, col, ascending );
SignatureKeyListViewItem * that = static_cast<SignatureKeyListViewItem*>( item );
return listView()->columnStrategy()->signatureCompare( this->signature(), that->signature(), col );
}
-void Kleo::SignatureKeyListViewItem::paintCell( QPainter * p, const QColorGroup & cg, int column, int width, int alignment ) {
+void Kleo::SignatureKeyListViewItem::paintCell( TQPainter * p, const TQColorGroup & cg, int column, int width, int alignment ) {
const KeyListView::DisplayStrategy * ds = listView() ? listView()->displayStrategy() : 0 ;
if ( !ds ) {
- QListViewItem::paintCell( p, cg, column, width, alignment );
+ TQListViewItem::paintCell( p, cg, column, width, alignment );
return;
}
- const QColor fg = ds->signatureForeground( signature(), cg.text() );
- const QColor bg = ds->signatureBackground( signature(), cg.base() );
- const QFont f = ds->signatureFont( signature(), p->font() );
+ const TQColor fg = ds->signatureForeground( signature(), cg.text() );
+ const TQColor bg = ds->signatureBackground( signature(), cg.base() );
+ const TQFont f = ds->signatureFont( signature(), p->font() );
- QColorGroup _cg = cg;
+ TQColorGroup _cg = cg;
p->setFont( f );
- _cg.setColor( QColorGroup::Text, fg );
- _cg.setColor( QColorGroup::Base, bg );
+ _cg.setColor( TQColorGroup::Text, fg );
+ _cg.setColor( TQColorGroup::Base, bg );
- QListViewItem::paintCell( p, _cg, column, width, alignment );
+ TQListViewItem::paintCell( p, _cg, column, width, alignment );
}
@@ -721,38 +721,38 @@ void Kleo::SignatureKeyListViewItem::paintCell( QPainter * p, const QColorGroup
Kleo::KeyListView::ColumnStrategy::~ColumnStrategy() {}
int Kleo::KeyListView::ColumnStrategy::compare( const GpgME::Key & key1, const GpgME::Key & key2, int col ) const {
- return QString::localeAwareCompare( text( key1, col ), text( key2, col ) );
+ return TQString::localeAwareCompare( text( key1, col ), text( key2, col ) );
}
-int Kleo::KeyListView::ColumnStrategy::width( int col, const QFontMetrics & fm ) const {
+int Kleo::KeyListView::ColumnStrategy::width( int col, const TQFontMetrics & fm ) const {
return fm.width( title( col ) ) * 2;
}
int Kleo::KeyListView::ColumnStrategy::subkeyCompare( const GpgME::Subkey & sub1, const GpgME::Subkey & sub2, int col ) const {
- return QString::localeAwareCompare( subkeyText( sub1, col ), subkeyText( sub2, col ) );
+ return TQString::localeAwareCompare( subkeyText( sub1, col ), subkeyText( sub2, col ) );
}
int Kleo::KeyListView::ColumnStrategy::userIDCompare( const GpgME::UserID & uid1, const GpgME::UserID & uid2, int col ) const {
- return QString::localeAwareCompare( userIDText( uid1, col ), userIDText( uid2, col ) );
+ return TQString::localeAwareCompare( userIDText( uid1, col ), userIDText( uid2, col ) );
}
int Kleo::KeyListView::ColumnStrategy::signatureCompare( const GpgME::UserID::Signature & sig1, const GpgME::UserID::Signature & sig2, int col ) const {
- return QString::localeAwareCompare( signatureText( sig1, col ), signatureText( sig2, col ) );
+ return TQString::localeAwareCompare( signatureText( sig1, col ), signatureText( sig2, col ) );
}
-QString Kleo::KeyListView::ColumnStrategy::toolTip( const GpgME::Key & key, int col ) const {
+TQString Kleo::KeyListView::ColumnStrategy::toolTip( const GpgME::Key & key, int col ) const {
return text( key, col );
}
-QString Kleo::KeyListView::ColumnStrategy::subkeyToolTip( const GpgME::Subkey & sub, int col ) const {
+TQString Kleo::KeyListView::ColumnStrategy::subkeyToolTip( const GpgME::Subkey & sub, int col ) const {
return subkeyText( sub, col );
}
-QString Kleo::KeyListView::ColumnStrategy::userIDToolTip( const GpgME::UserID & uid, int col ) const {
+TQString Kleo::KeyListView::ColumnStrategy::userIDToolTip( const GpgME::UserID & uid, int col ) const {
return userIDText( uid, col );
}
-QString Kleo::KeyListView::ColumnStrategy::signatureToolTip( const GpgME::UserID::Signature & sig, int col ) const {
+TQString Kleo::KeyListView::ColumnStrategy::signatureToolTip( const GpgME::UserID::Signature & sig, int col ) const {
return signatureText( sig, col );
}
@@ -766,70 +766,70 @@ Kleo::KeyListView::DisplayStrategy::~DisplayStrategy() {}
//font
-QFont Kleo::KeyListView::DisplayStrategy::keyFont( const GpgME::Key &, const QFont & font ) const {
+TQFont Kleo::KeyListView::DisplayStrategy::keyFont( const GpgME::Key &, const TQFont & font ) const {
return font;
}
-QFont Kleo::KeyListView::DisplayStrategy::subkeyFont( const GpgME::Subkey &, const QFont & font ) const {
+TQFont Kleo::KeyListView::DisplayStrategy::subkeyFont( const GpgME::Subkey &, const TQFont & font ) const {
return font;
}
-QFont Kleo::KeyListView::DisplayStrategy::useridFont( const GpgME::UserID &, const QFont & font ) const {
+TQFont Kleo::KeyListView::DisplayStrategy::useridFont( const GpgME::UserID &, const TQFont & font ) const {
return font;
}
-QFont Kleo::KeyListView::DisplayStrategy::signatureFont( const GpgME::UserID::Signature &, const QFont & font ) const {
+TQFont Kleo::KeyListView::DisplayStrategy::signatureFont( const GpgME::UserID::Signature &, const TQFont & font ) const {
return font;
}
//foreground
-QColor Kleo::KeyListView::DisplayStrategy::keyForeground( const GpgME::Key &, const QColor & fg )const {
+TQColor Kleo::KeyListView::DisplayStrategy::keyForeground( const GpgME::Key &, const TQColor & fg )const {
return fg;
}
-QColor Kleo::KeyListView::DisplayStrategy::subkeyForeground( const GpgME::Subkey &, const QColor & fg ) const {
+TQColor Kleo::KeyListView::DisplayStrategy::subkeyForeground( const GpgME::Subkey &, const TQColor & fg ) const {
return fg;
}
-QColor Kleo::KeyListView::DisplayStrategy::useridForeground( const GpgME::UserID &, const QColor & fg ) const {
+TQColor Kleo::KeyListView::DisplayStrategy::useridForeground( const GpgME::UserID &, const TQColor & fg ) const {
return fg;
}
-QColor Kleo::KeyListView::DisplayStrategy::signatureForeground( const GpgME::UserID::Signature &, const QColor & fg ) const {
+TQColor Kleo::KeyListView::DisplayStrategy::signatureForeground( const GpgME::UserID::Signature &, const TQColor & fg ) const {
return fg;
}
//background
-QColor Kleo::KeyListView::DisplayStrategy::keyBackground( const GpgME::Key &, const QColor & bg )const {
+TQColor Kleo::KeyListView::DisplayStrategy::keyBackground( const GpgME::Key &, const TQColor & bg )const {
return bg;
}
-QColor Kleo::KeyListView::DisplayStrategy::subkeyBackground( const GpgME::Subkey &, const QColor & bg ) const {
+TQColor Kleo::KeyListView::DisplayStrategy::subkeyBackground( const GpgME::Subkey &, const TQColor & bg ) const {
return bg;
}
-QColor Kleo::KeyListView::DisplayStrategy::useridBackground( const GpgME::UserID &, const QColor & bg ) const {
+TQColor Kleo::KeyListView::DisplayStrategy::useridBackground( const GpgME::UserID &, const TQColor & bg ) const {
return bg;
}
-QColor Kleo::KeyListView::DisplayStrategy::signatureBackground( const GpgME::UserID::Signature &, const QColor & bg ) const {
+TQColor Kleo::KeyListView::DisplayStrategy::signatureBackground( const GpgME::UserID::Signature &, const TQColor & bg ) const {
return bg;
}
//
//
-// Collection of covariant return reimplementations of QListView(Item)
+// Collection of covariant return reimplementations of TQListView(Item)
// members:
//
//
Kleo::KeyListView * Kleo::KeyListViewItem::listView() const {
- return static_cast<Kleo::KeyListView*>( QListViewItem::listView() );
+ return static_cast<Kleo::KeyListView*>( TQListViewItem::listView() );
}
Kleo::KeyListViewItem * Kleo::KeyListViewItem::nextSibling() const {
- return static_cast<Kleo::KeyListViewItem*>( QListViewItem::nextSibling() );
+ return static_cast<Kleo::KeyListViewItem*>( TQListViewItem::nextSibling() );
}
Kleo::KeyListViewItem * Kleo::KeyListView::firstChild() const {
@@ -840,8 +840,8 @@ Kleo::KeyListViewItem * Kleo::KeyListView::selectedItem() const {
return static_cast<Kleo::KeyListViewItem*>( KListView::selectedItem() );
}
-static void selectedItems( QPtrList<Kleo::KeyListViewItem> & result, QListViewItem * start ) {
- for ( QListViewItem * item = start ; item ; item = item->nextSibling() ) {
+static void selectedItems( TQPtrList<Kleo::KeyListViewItem> & result, TQListViewItem * start ) {
+ for ( TQListViewItem * item = start ; item ; item = item->nextSibling() ) {
if ( item->isSelected() )
if ( Kleo::KeyListViewItem * i = Kleo::lvi_cast<Kleo::KeyListViewItem>( item ) )
result.append( i );
@@ -849,14 +849,14 @@ static void selectedItems( QPtrList<Kleo::KeyListViewItem> & result, QListViewIt
}
}
-QPtrList<Kleo::KeyListViewItem> Kleo::KeyListView::selectedItems() const {
- QPtrList<KeyListViewItem> result;
+TQPtrList<Kleo::KeyListViewItem> Kleo::KeyListView::selectedItems() const {
+ TQPtrList<KeyListViewItem> result;
::selectedItems( result, firstChild() );
return result;
}
-static bool hasSelection( QListViewItem * start ) {
- for ( QListViewItem * item = start ; item ; item = item->nextSibling() )
+static bool hasSelection( TQListViewItem * start ) {
+ for ( TQListViewItem * item = start ; item ; item = item->nextSibling() )
if ( item->isSelected() || hasSelection( item->firstChild() ) )
return true;
return false;
diff --git a/certmanager/lib/ui/keylistview.h b/certmanager/lib/ui/keylistview.h
index 3ef708771..11301fe5e 100644
--- a/certmanager/lib/ui/keylistview.h
+++ b/certmanager/lib/ui/keylistview.h
@@ -48,13 +48,13 @@ namespace Kleo {
// work around moc parser bug...
#define TEMPLATE_TYPENAME(T) template <typename T>
TEMPLATE_TYPENAME(T)
- inline T * lvi_cast( QListViewItem * item ) {
+ inline T * lvi_cast( TQListViewItem * item ) {
return item && (item->rtti() & T::RTTI_MASK) == T::RTTI
? static_cast<T*>( item ) : 0 ;
}
TEMPLATE_TYPENAME(T)
- inline const T * lvi_cast( const QListViewItem * item ) {
+ inline const T * lvi_cast( const TQListViewItem * item ) {
return item && (item->rtti() & T::RTTI_MASK) == T::RTTI
? static_cast<const T*>( item ) : 0 ;
}
@@ -62,7 +62,7 @@ namespace Kleo {
class KeyListView;
- class KDE_EXPORT KeyListViewItem : public QListViewItem {
+ class KDE_EXPORT KeyListViewItem : public TQListViewItem {
public:
KeyListViewItem( KeyListView * parent, const GpgME::Key & key );
KeyListViewItem( KeyListView * parent, KeyListViewItem * after, const GpgME::Key & key );
@@ -78,24 +78,24 @@ namespace Kleo {
//
// only boring stuff below:
//
- virtual QString toolTip( int column ) const;
+ virtual TQString toolTip( int column ) const;
/*! \reimp for covariant return */
KeyListView * listView() const;
/*! \reimp for covariant return */
KeyListViewItem * nextSibling() const;
/*! \reimp */
- int compare( QListViewItem * other, int col, bool ascending ) const;
+ int compare( TQListViewItem * other, int col, bool ascending ) const;
/*! \reimp to allow for key() overload above */
- QString key( int col, bool ascending ) const { return QListViewItem::key( col, ascending ); }
+ TQString key( int col, bool ascending ) const { return TQListViewItem::key( col, ascending ); }
/*! \reimp */
int rtti() const { return RTTI; }
/*! \reimp */
- void paintCell( QPainter * p, const QColorGroup & cg, int column, int width, int alignment );
+ void paintCell( TQPainter * p, const TQColorGroup & cg, int column, int width, int alignment );
/*! \reimp */
- void insertItem( QListViewItem * item );
+ void insertItem( TQListViewItem * item );
/*! \reimp */
- void takeItem( QListViewItem * item );
+ void takeItem( TQListViewItem * item );
private:
GpgME::Key mKey;
@@ -117,17 +117,17 @@ namespace Kleo {
// only boring stuff below:
//
/*! \reimp */
- QString toolTip( int col ) const;
+ TQString toolTip( int col ) const;
/*! \reimp */
- QString text( int col ) const;
+ TQString text( int col ) const;
/*! \reimp */
- const QPixmap * pixmap( int col ) const;
+ const TQPixmap * pixmap( int col ) const;
/*! \reimp */
- int compare( QListViewItem * other, int col, bool ascending ) const;
+ int compare( TQListViewItem * other, int col, bool ascending ) const;
/*! \reimp */
int rtti() const { return RTTI; }
/*! \reimp */
- void paintCell( QPainter * p, const QColorGroup & cg, int column, int width, int alignment );
+ void paintCell( TQPainter * p, const TQColorGroup & cg, int column, int width, int alignment );
private:
GpgME::Subkey mSubkey;
@@ -149,17 +149,17 @@ namespace Kleo {
// only boring stuff below:
//
/*! \reimp */
- QString toolTip( int col ) const;
+ TQString toolTip( int col ) const;
/*! \reimp */
- QString text( int col ) const;
+ TQString text( int col ) const;
/*! \reimp */
- const QPixmap * pixmap( int col ) const;
+ const TQPixmap * pixmap( int col ) const;
/*! \reimp */
- int compare( QListViewItem * other, int col, bool ascending ) const;
+ int compare( TQListViewItem * other, int col, bool ascending ) const;
/*! \reimp */
int rtti() const { return RTTI; }
/*! \reimp */
- void paintCell( QPainter * p, const QColorGroup & cg, int column, int width, int alignment );
+ void paintCell( TQPainter * p, const TQColorGroup & cg, int column, int width, int alignment );
private:
GpgME::UserID mUserID;
@@ -181,17 +181,17 @@ namespace Kleo {
// only boring stuff below:
//
/*! \reimp */
- QString toolTip( int col ) const;
+ TQString toolTip( int col ) const;
/*! \reimp */
- QString text( int col ) const;
+ TQString text( int col ) const;
/*! \reimp */
- const QPixmap * pixmap( int col ) const;
+ const TQPixmap * pixmap( int col ) const;
/*! \reimp */
- int compare( QListViewItem * other, int col, bool ascending ) const;
+ int compare( TQListViewItem * other, int col, bool ascending ) const;
/*! \reimp */
int rtti() const { return RTTI; }
/*! \reimp */
- void paintCell( QPainter * p, const QColorGroup & cg, int column, int width, int alignment );
+ void paintCell( TQPainter * p, const TQColorGroup & cg, int column, int width, int alignment );
private:
GpgME::UserID::Signature mSignature;
@@ -206,28 +206,28 @@ namespace Kleo {
class KDE_EXPORT ColumnStrategy {
public:
virtual ~ColumnStrategy();
- virtual QString title( int column ) const = 0;
- virtual int width( int column, const QFontMetrics & fm ) const;
- virtual QListView::WidthMode widthMode( int ) const { return QListView::Manual; }
+ virtual TQString title( int column ) const = 0;
+ virtual int width( int column, const TQFontMetrics & fm ) const;
+ virtual TQListView::WidthMode widthMode( int ) const { return TQListView::Manual; }
- virtual QString text( const GpgME::Key & key, int column ) const = 0;
- virtual QString toolTip( const GpgME::Key & key, int column ) const;
- virtual const QPixmap * pixmap( const GpgME::Key &, int ) const { return 0; }
+ virtual TQString text( const GpgME::Key & key, int column ) const = 0;
+ virtual TQString toolTip( const GpgME::Key & key, int column ) const;
+ virtual const TQPixmap * pixmap( const GpgME::Key &, int ) const { return 0; }
virtual int compare( const GpgME::Key & key1, const GpgME::Key & key2, const int column ) const;
- virtual QString subkeyText( const GpgME::Subkey &, int ) const { return QString::null; }
- virtual QString subkeyToolTip( const GpgME::Subkey & subkey, int column ) const;
- virtual const QPixmap * subkeyPixmap( const GpgME::Subkey &, int ) const { return 0; }
+ virtual TQString subkeyText( const GpgME::Subkey &, int ) const { return TQString::null; }
+ virtual TQString subkeyToolTip( const GpgME::Subkey & subkey, int column ) const;
+ virtual const TQPixmap * subkeyPixmap( const GpgME::Subkey &, int ) const { return 0; }
virtual int subkeyCompare( const GpgME::Subkey & subkey1, const GpgME::Subkey & subkey2, const int column ) const;
- virtual QString userIDText( const GpgME::UserID &, int ) const { return QString::null; }
- virtual QString userIDToolTip( const GpgME::UserID & userID, int column ) const;
- virtual const QPixmap * userIDPixmap( const GpgME::UserID &, int ) const { return 0; }
+ virtual TQString userIDText( const GpgME::UserID &, int ) const { return TQString::null; }
+ virtual TQString userIDToolTip( const GpgME::UserID & userID, int column ) const;
+ virtual const TQPixmap * userIDPixmap( const GpgME::UserID &, int ) const { return 0; }
virtual int userIDCompare( const GpgME::UserID & userID1, const GpgME::UserID & userID2, const int column ) const;
- virtual QString signatureText( const GpgME::UserID::Signature &, int ) const { return QString::null; }
- virtual QString signatureToolTip( const GpgME::UserID::Signature & sig, int column ) const;
- virtual const QPixmap * signaturePixmap( const GpgME::UserID::Signature &, int ) const { return 0; }
+ virtual TQString signatureText( const GpgME::UserID::Signature &, int ) const { return TQString::null; }
+ virtual TQString signatureToolTip( const GpgME::UserID::Signature & sig, int column ) const;
+ virtual const TQPixmap * signaturePixmap( const GpgME::UserID::Signature &, int ) const { return 0; }
virtual int signatureCompare( const GpgME::UserID::Signature & sig1, const GpgME::UserID::Signature & sig2, const int column ) const;
};
@@ -235,25 +235,25 @@ namespace Kleo {
public:
virtual ~DisplayStrategy();
//font
- virtual QFont keyFont( const GpgME::Key &, const QFont & ) const;
- virtual QFont subkeyFont( const GpgME::Subkey &, const QFont & ) const;
- virtual QFont useridFont( const GpgME::UserID &, const QFont & ) const;
- virtual QFont signatureFont( const GpgME::UserID::Signature & , const QFont & ) const;
+ virtual TQFont keyFont( const GpgME::Key &, const TQFont & ) const;
+ virtual TQFont subkeyFont( const GpgME::Subkey &, const TQFont & ) const;
+ virtual TQFont useridFont( const GpgME::UserID &, const TQFont & ) const;
+ virtual TQFont signatureFont( const GpgME::UserID::Signature & , const TQFont & ) const;
//foreground
- virtual QColor keyForeground( const GpgME::Key & , const QColor & ) const;
- virtual QColor subkeyForeground( const GpgME::Subkey &, const QColor & ) const;
- virtual QColor useridForeground( const GpgME::UserID &, const QColor & ) const;
- virtual QColor signatureForeground( const GpgME::UserID::Signature &, const QColor & ) const;
+ virtual TQColor keyForeground( const GpgME::Key & , const TQColor & ) const;
+ virtual TQColor subkeyForeground( const GpgME::Subkey &, const TQColor & ) const;
+ virtual TQColor useridForeground( const GpgME::UserID &, const TQColor & ) const;
+ virtual TQColor signatureForeground( const GpgME::UserID::Signature &, const TQColor & ) const;
//background
- virtual QColor keyBackground( const GpgME::Key &, const QColor & ) const;
- virtual QColor subkeyBackground( const GpgME::Subkey &, const QColor & ) const;
- virtual QColor useridBackground( const GpgME::UserID &, const QColor & ) const;
- virtual QColor signatureBackground( const GpgME::UserID::Signature &, const QColor & ) const;
+ virtual TQColor keyBackground( const GpgME::Key &, const TQColor & ) const;
+ virtual TQColor subkeyBackground( const GpgME::Subkey &, const TQColor & ) const;
+ virtual TQColor useridBackground( const GpgME::UserID &, const TQColor & ) const;
+ virtual TQColor signatureBackground( const GpgME::UserID::Signature &, const TQColor & ) const;
};
KeyListView( const ColumnStrategy * strategy,
const DisplayStrategy * display=0,
- QWidget * parent=0, const char * name=0, WFlags f=0 );
+ TQWidget * parent=0, const char * name=0, WFlags f=0 );
~KeyListView();
@@ -267,13 +267,13 @@ namespace Kleo {
bool hasSelection() const;
- KeyListViewItem * itemByFingerprint( const QCString & ) const;
+ KeyListViewItem * itemByFingerprint( const TQCString & ) const;
signals:
- void doubleClicked( Kleo::KeyListViewItem*, const QPoint&, int );
+ void doubleClicked( Kleo::KeyListViewItem*, const TQPoint&, int );
void returnPressed( Kleo::KeyListViewItem* );
void selectionChanged( Kleo::KeyListViewItem* );
- void contextMenu( Kleo::KeyListViewItem*, const QPoint& );
+ void contextMenu( Kleo::KeyListViewItem*, const TQPoint& );
public slots:
virtual void slotAddKey( const GpgME::Key & key );
@@ -283,30 +283,30 @@ namespace Kleo {
// Only boring stuff below:
//
private slots:
- void slotEmitDoubleClicked( QListViewItem*, const QPoint&, int );
- void slotEmitReturnPressed( QListViewItem* );
- void slotEmitSelectionChanged( QListViewItem* );
- void slotEmitContextMenu( KListView*, QListViewItem*, const QPoint& );
+ void slotEmitDoubleClicked( TQListViewItem*, const TQPoint&, int );
+ void slotEmitReturnPressed( TQListViewItem* );
+ void slotEmitSelectionChanged( TQListViewItem* );
+ void slotEmitContextMenu( KListView*, TQListViewItem*, const TQPoint& );
void slotUpdateTimeout();
public:
/*! \reimp for covariant return */
KeyListViewItem * selectedItem() const;
/*! \reimp */
- QPtrList<KeyListViewItem> selectedItems() const;
+ TQPtrList<KeyListViewItem> selectedItems() const;
/*! \reimp for covariant return */
KeyListViewItem * firstChild() const;
/*! \reimp */
void clear();
/*! \reimp */
- void insertItem( QListViewItem * );
+ void insertItem( TQListViewItem * );
/*! \reimp */
- void takeItem( QListViewItem * );
+ void takeItem( TQListViewItem * );
private:
void doHierarchicalInsert( const GpgME::Key & );
void gatherScattered();
- void scatterGathered( QListViewItem * );
+ void scatterGathered( TQListViewItem * );
void registerItem( KeyListViewItem * );
void deregisterItem( const KeyListViewItem * );
diff --git a/certmanager/lib/ui/keyrequester.cpp b/certmanager/lib/ui/keyrequester.cpp
index d537affc5..3a883dea1 100644
--- a/certmanager/lib/ui/keyrequester.cpp
+++ b/certmanager/lib/ui/keyrequester.cpp
@@ -71,19 +71,19 @@
#include <kpushbutton.h>
// Qt
-#include <qapplication.h>
-#include <qlayout.h>
-#include <qtooltip.h>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qlabel.h>
-#include <qregexp.h>
+#include <tqapplication.h>
+#include <tqlayout.h>
+#include <tqtooltip.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqlabel.h>
+#include <tqregexp.h>
#include <assert.h>
Kleo::KeyRequester::KeyRequester( unsigned int allowedKeys, bool multipleKeys,
- QWidget * parent, const char * name )
- : QWidget( parent, name ),
+ TQWidget * parent, const char * name )
+ : TQWidget( parent, name ),
mOpenPGPBackend( 0 ),
mSMIMEBackend( 0 ),
mMulti( multipleKeys ),
@@ -94,8 +94,8 @@ Kleo::KeyRequester::KeyRequester( unsigned int allowedKeys, bool multipleKeys,
init();
}
-Kleo::KeyRequester::KeyRequester( QWidget * parent, const char * name )
- : QWidget( parent, name ),
+Kleo::KeyRequester::KeyRequester( TQWidget * parent, const char * name )
+ : TQWidget( parent, name ),
mOpenPGPBackend( 0 ),
mSMIMEBackend( 0 ),
mMulti( false ),
@@ -108,33 +108,33 @@ Kleo::KeyRequester::KeyRequester( QWidget * parent, const char * name )
void Kleo::KeyRequester::init()
{
- QHBoxLayout * hlay = new QHBoxLayout( this, 0, KDialog::spacingHint() );
+ TQHBoxLayout * hlay = new TQHBoxLayout( this, 0, KDialog::spacingHint() );
// the label where the key id is to be displayed:
- mLabel = new QLabel( this );
- mLabel->setFrameStyle( QFrame::Panel | QFrame::Sunken );
+ mLabel = new TQLabel( this );
+ mLabel->setFrameStyle( TQFrame::Panel | TQFrame::Sunken );
// the button to unset any key:
mEraseButton = new KPushButton( this );
mEraseButton->setAutoDefault( false );
- mEraseButton->setSizePolicy( QSizePolicy( QSizePolicy::Minimum,
- QSizePolicy::Minimum ) );
- mEraseButton->setIconSet( SmallIconSet( QApplication::reverseLayout() ? "locationbar_erase" : "clear_left" ) );
- QToolTip::add( mEraseButton, i18n("Clear") );
+ mEraseButton->setSizePolicy( TQSizePolicy( TQSizePolicy::Minimum,
+ TQSizePolicy::Minimum ) );
+ mEraseButton->setIconSet( SmallIconSet( TQApplication::reverseLayout() ? "locationbar_erase" : "clear_left" ) );
+ TQToolTip::add( mEraseButton, i18n("Clear") );
// the button to call the KeySelectionDialog:
- mDialogButton = new QPushButton( i18n("Change..."), this );
+ mDialogButton = new TQPushButton( i18n("Change..."), this );
mDialogButton->setAutoDefault( false );
hlay->addWidget( mLabel, 1 );
hlay->addWidget( mEraseButton );
hlay->addWidget( mDialogButton );
- connect( mEraseButton, SIGNAL(clicked()), SLOT(slotEraseButtonClicked()) );
- connect( mDialogButton, SIGNAL(clicked()), SLOT(slotDialogButtonClicked()) );
+ connect( mEraseButton, TQT_SIGNAL(clicked()), TQT_SLOT(slotEraseButtonClicked()) );
+ connect( mDialogButton, TQT_SIGNAL(clicked()), TQT_SLOT(slotDialogButtonClicked()) );
- setSizePolicy( QSizePolicy( QSizePolicy::MinimumExpanding,
- QSizePolicy::Fixed ) );
+ setSizePolicy( TQSizePolicy( TQSizePolicy::MinimumExpanding,
+ TQSizePolicy::Fixed ) );
setAllowedKeys( mKeyUsage );
}
@@ -169,15 +169,15 @@ void Kleo::KeyRequester::setKey( const GpgME::Key & key ) {
updateKeys();
}
-QString Kleo::KeyRequester::fingerprint() const {
+TQString Kleo::KeyRequester::fingerprint() const {
if ( mKeys.empty() )
- return QString::null;
+ return TQString::null;
else
return mKeys.front().primaryFingerprint();
}
-QStringList Kleo::KeyRequester::fingerprints() const {
- QStringList result;
+TQStringList Kleo::KeyRequester::fingerprints() const {
+ TQStringList result;
for ( std::vector<GpgME::Key>::const_iterator it = mKeys.begin() ; it != mKeys.end() ; ++it )
if ( !it->isNull() )
if ( const char * fpr = it->primaryFingerprint() )
@@ -185,11 +185,11 @@ QStringList Kleo::KeyRequester::fingerprints() const {
return result;
}
-void Kleo::KeyRequester::setFingerprint( const QString & fingerprint ) {
+void Kleo::KeyRequester::setFingerprint( const TQString & fingerprint ) {
startKeyListJob( fingerprint );
}
-void Kleo::KeyRequester::setFingerprints( const QStringList & fingerprints ) {
+void Kleo::KeyRequester::setFingerprints( const TQStringList & fingerprints ) {
startKeyListJob( fingerprints );
}
@@ -201,17 +201,17 @@ void Kleo::KeyRequester::updateKeys() {
if ( mKeys.size() > 1 )
setMultipleKeysEnabled( true );
- QStringList labelTexts;
- QString toolTipText;
+ TQStringList labelTexts;
+ TQString toolTipText;
for ( std::vector<GpgME::Key>::const_iterator it = mKeys.begin() ; it != mKeys.end() ; ++it ) {
if ( it->isNull() )
continue;
- const QString fpr = it->primaryFingerprint();
+ const TQString fpr = it->primaryFingerprint();
labelTexts.push_back( fpr.right(8) );
toolTipText += fpr.right(8) + ": ";
if ( const char * uid = it->userID(0).id() )
if ( it->protocol() == GpgME::Context::OpenPGP )
- toolTipText += QString::fromUtf8( uid );
+ toolTipText += TQString::fromUtf8( uid );
else
toolTipText += Kleo::DN( uid ).prettyDN();
else
@@ -220,24 +220,24 @@ void Kleo::KeyRequester::updateKeys() {
}
mLabel->setText( labelTexts.join(", ") );
- QToolTip::remove( mLabel );
- QToolTip::add( mLabel, toolTipText );
+ TQToolTip::remove( mLabel );
+ TQToolTip::add( mLabel, toolTipText );
}
#ifndef __KLEO_UI_SHOW_KEY_LIST_ERROR_H__
#define __KLEO_UI_SHOW_KEY_LIST_ERROR_H__
-static void showKeyListError( QWidget * parent, const GpgME::Error & err ) {
+static void showKeyListError( TQWidget * parent, const GpgME::Error & err ) {
assert( err );
- const QString msg = i18n( "<qt><p>An error occurred while fetching "
+ const TQString msg = i18n( "<qt><p>An error occurred while fetching "
"the keys from the backend:</p>"
"<p><b>%1</b></p></qt>" )
- .arg( QString::fromLocal8Bit( err.asString() ) );
+ .arg( TQString::fromLocal8Bit( err.asString() ) );
KMessageBox::error( parent, msg, i18n( "Key Listing Failed" ) );
}
#endif // __KLEO_UI_SHOW_KEY_LIST_ERROR_H__
-void Kleo::KeyRequester::startKeyListJob( const QStringList & fingerprints ) {
+void Kleo::KeyRequester::startKeyListJob( const TQStringList & fingerprints ) {
if ( !mSMIMEBackend && !mOpenPGPBackend )
return;
@@ -245,7 +245,7 @@ void Kleo::KeyRequester::startKeyListJob( const QStringList & fingerprints ) {
mJobs = 0;
unsigned int count = 0;
- for ( QStringList::const_iterator it = fingerprints.begin() ; it != fingerprints.end() ; ++it )
+ for ( TQStringList::const_iterator it = fingerprints.begin() ; it != fingerprints.end() ; ++it )
if ( !(*it).stripWhiteSpace().isEmpty() )
++count;
@@ -264,10 +264,10 @@ void Kleo::KeyRequester::startKeyListJob( const QStringList & fingerprints ) {
"Check your installation."),
i18n("Key Listing Failed") );
} else {
- connect( job, SIGNAL(result(const GpgME::KeyListResult&)),
- SLOT(slotKeyListResult(const GpgME::KeyListResult&)) );
- connect( job, SIGNAL(nextKey(const GpgME::Key&)),
- SLOT(slotNextKey(const GpgME::Key&)) );
+ connect( job, TQT_SIGNAL(result(const GpgME::KeyListResult&)),
+ TQT_SLOT(slotKeyListResult(const GpgME::KeyListResult&)) );
+ connect( job, TQT_SIGNAL(nextKey(const GpgME::Key&)),
+ TQT_SLOT(slotNextKey(const GpgME::Key&)) );
const GpgME::Error err = job->start( fingerprints,
mKeyUsage & Kleo::KeySelectionDialog::SecretKeys &&
@@ -288,10 +288,10 @@ void Kleo::KeyRequester::startKeyListJob( const QStringList & fingerprints ) {
"Check your installation."),
i18n("Key Listing Failed") );
} else {
- connect( job, SIGNAL(result(const GpgME::KeyListResult&)),
- SLOT(slotKeyListResult(const GpgME::KeyListResult&)) );
- connect( job, SIGNAL(nextKey(const GpgME::Key&)),
- SLOT(slotNextKey(const GpgME::Key&)) );
+ connect( job, TQT_SIGNAL(result(const GpgME::KeyListResult&)),
+ TQT_SLOT(slotKeyListResult(const GpgME::KeyListResult&)) );
+ connect( job, TQT_SIGNAL(nextKey(const GpgME::Key&)),
+ TQT_SLOT(slotNextKey(const GpgME::Key&)) );
const GpgME::Error err = job->start( fingerprints,
mKeyUsage & Kleo::KeySelectionDialog::SecretKeys &&
@@ -334,7 +334,7 @@ void Kleo::KeyRequester::slotDialogButtonClicked() {
? new KeySelectionDialog( mDialogCaption, mDialogMessage, mInitialQuery, mKeyUsage, mMulti, false, this )
: new KeySelectionDialog( mDialogCaption, mDialogCaption, mKeys, mKeyUsage, mMulti, false, this ) ;
- if ( dlg->exec() == QDialog::Accepted ) {
+ if ( dlg->exec() == TQDialog::Accepted ) {
if ( mMulti )
setKeys( dlg->selectedKeys() );
else
@@ -352,11 +352,11 @@ void Kleo::KeyRequester::slotEraseButtonClicked() {
updateKeys();
}
-void Kleo::KeyRequester::setDialogCaption( const QString & caption ) {
+void Kleo::KeyRequester::setDialogCaption( const TQString & caption ) {
mDialogCaption = caption;
}
-void Kleo::KeyRequester::setDialogMessage( const QString & msg ) {
+void Kleo::KeyRequester::setDialogMessage( const TQString & msg ) {
mDialogMessage = msg;
}
@@ -400,11 +400,11 @@ void Kleo::KeyRequester::setAllowedKeys( unsigned int keyUsage ) {
}
}
-QPushButton * Kleo::KeyRequester::dialogButton() {
+TQPushButton * Kleo::KeyRequester::dialogButton() {
return mDialogButton;
}
-QPushButton * Kleo::KeyRequester::eraseButton() {
+TQPushButton * Kleo::KeyRequester::eraseButton() {
return mEraseButton;
}
@@ -430,14 +430,14 @@ static inline unsigned int signingKeyUsage( bool openpgp, bool smime, bool trust
}
Kleo::EncryptionKeyRequester::EncryptionKeyRequester( bool multi, unsigned int proto,
- QWidget * parent, const char * name,
+ TQWidget * parent, const char * name,
bool onlyTrusted, bool onlyValid )
: KeyRequester( encryptionKeyUsage( proto & OpenPGP, proto & SMIME, onlyTrusted, onlyValid ), multi,
parent, name )
{
}
-Kleo::EncryptionKeyRequester::EncryptionKeyRequester( QWidget * parent, const char * name )
+Kleo::EncryptionKeyRequester::EncryptionKeyRequester( TQWidget * parent, const char * name )
: KeyRequester( 0, false, parent, name )
{
}
@@ -451,14 +451,14 @@ void Kleo::EncryptionKeyRequester::setAllowedKeys( unsigned int proto, bool only
}
Kleo::SigningKeyRequester::SigningKeyRequester( bool multi, unsigned int proto,
- QWidget * parent, const char * name,
+ TQWidget * parent, const char * name,
bool onlyTrusted, bool onlyValid )
: KeyRequester( signingKeyUsage( proto & OpenPGP, proto & SMIME, onlyTrusted, onlyValid ), multi,
parent, name )
{
}
-Kleo::SigningKeyRequester::SigningKeyRequester( QWidget * parent, const char * name )
+Kleo::SigningKeyRequester::SigningKeyRequester( TQWidget * parent, const char * name )
: KeyRequester( 0, false, parent, name )
{
}
diff --git a/certmanager/lib/ui/keyrequester.h b/certmanager/lib/ui/keyrequester.h
index 3de9c508b..6392f5c67 100644
--- a/certmanager/lib/ui/keyrequester.h
+++ b/certmanager/lib/ui/keyrequester.h
@@ -49,7 +49,7 @@
#ifndef __KLEO_UI_KEYREQUESTER_H__
#define __KLEO_UI_KEYREQUESTER_H__
-#include <qwidget.h>
+#include <tqwidget.h>
#include <kleo/cryptobackend.h>
#include <vector>
@@ -73,13 +73,13 @@ class QLabel;
namespace Kleo {
/// Base class for SigningKeyRequester and EncryptionKeyRequester
- class KDE_EXPORT KeyRequester : public QWidget {
+ class KDE_EXPORT KeyRequester : public TQWidget {
Q_OBJECT
public:
KeyRequester( unsigned int allowedKeys, bool multipleKeys=false,
- QWidget * parent=0, const char * name=0 );
+ TQWidget * parent=0, const char * name=0 );
// Constructor for Qt Designer
- KeyRequester( QWidget * parent=0, const char * name=0 );
+ KeyRequester( TQWidget * parent=0, const char * name=0 );
~KeyRequester();
const GpgME::Key & key() const;
@@ -95,24 +95,24 @@ namespace Kleo {
*/
void setKeys( const std::vector<GpgME::Key> & keys );
- QString fingerprint() const;
+ TQString fingerprint() const;
/** Set the key by fingerprint. Starts a background KeyListJob to
retrive the complete GpgME::Key object
*/
- void setFingerprint( const QString & fingerprint );
+ void setFingerprint( const TQString & fingerprint );
- QStringList fingerprints() const;
+ TQStringList fingerprints() const;
/** Set the keys by fingerprint. Starts a background KeyListJob to
retrive the complete GpgME::Key objects
*/
- void setFingerprints( const QStringList & fingerprints );
+ void setFingerprints( const TQStringList & fingerprints );
- QPushButton * eraseButton();
- QPushButton * dialogButton();
+ TQPushButton * eraseButton();
+ TQPushButton * dialogButton();
- void setDialogCaption( const QString & caption );
- void setDialogMessage( const QString & message );
+ void setDialogCaption( const TQString & caption );
+ void setDialogMessage( const TQString & message );
bool isMultipleKeysEnabled() const;
void setMultipleKeysEnabled( bool enable );
@@ -120,15 +120,15 @@ namespace Kleo {
unsigned int allowedKeys() const;
void setAllowedKeys( unsigned int allowed );
- void setInitialQuery( const QString & s ) { mInitialQuery = s; }
- const QString & initialQuery() const { return mInitialQuery; }
+ void setInitialQuery( const TQString & s ) { mInitialQuery = s; }
+ const TQString & initialQuery() const { return mInitialQuery; }
signals:
void changed();
private:
void init();
- void startKeyListJob( const QStringList & fingerprints );
+ void startKeyListJob( const TQStringList & fingerprints );
void updateKeys();
private slots:
@@ -140,10 +140,10 @@ namespace Kleo {
private:
const CryptoBackend::Protocol * mOpenPGPBackend;
const CryptoBackend::Protocol * mSMIMEBackend;
- QLabel * mLabel;
- QPushButton * mEraseButton;
- QPushButton * mDialogButton;
- QString mDialogCaption, mDialogMessage, mInitialQuery;
+ TQLabel * mLabel;
+ TQPushButton * mEraseButton;
+ TQPushButton * mDialogButton;
+ TQString mDialogCaption, mDialogMessage, mInitialQuery;
bool mMulti;
unsigned int mKeyUsage;
int mJobs;
@@ -167,12 +167,12 @@ namespace Kleo {
* Preferred constructor
*/
EncryptionKeyRequester( bool multipleKeys=false, unsigned int proto=AllProtocols,
- QWidget * parent=0, const char * name=0,
+ TQWidget * parent=0, const char * name=0,
bool onlyTrusted=true, bool onlyValid=true );
/**
* Constructor for Qt designer
*/
- EncryptionKeyRequester( QWidget * parent=0, const char * name=0 );
+ EncryptionKeyRequester( TQWidget * parent=0, const char * name=0 );
~EncryptionKeyRequester();
void setAllowedKeys( unsigned int proto, bool onlyTrusted=true, bool onlyValid=true );
@@ -199,12 +199,12 @@ namespace Kleo {
* @param onlyValid only show valid keys
*/
SigningKeyRequester( bool multipleKeys=false, unsigned int proto=AllProtocols,
- QWidget * parent=0, const char * name=0,
+ TQWidget * parent=0, const char * name=0,
bool onlyTrusted=true, bool onlyValid=true );
/**
* Constructor for Qt designer
*/
- SigningKeyRequester( QWidget * parent=0, const char * name=0 );
+ SigningKeyRequester( TQWidget * parent=0, const char * name=0 );
~SigningKeyRequester();
/*
diff --git a/certmanager/lib/ui/keyselectiondialog.cpp b/certmanager/lib/ui/keyselectiondialog.cpp
index e21cb39d4..fcb257514 100644
--- a/certmanager/lib/ui/keyselectiondialog.cpp
+++ b/certmanager/lib/ui/keyselectiondialog.cpp
@@ -63,17 +63,17 @@
#include <kprocess.h>
// Qt
-#include <qcheckbox.h>
-#include <qtoolbutton.h>
-#include <qlabel.h>
-#include <qpixmap.h>
-#include <qtimer.h>
-#include <qlayout.h>
-#include <qlineedit.h>
-#include <qwhatsthis.h>
-#include <qpopupmenu.h>
-#include <qregexp.h>
-#include <qpushbutton.h>
+#include <tqcheckbox.h>
+#include <tqtoolbutton.h>
+#include <tqlabel.h>
+#include <tqpixmap.h>
+#include <tqtimer.h>
+#include <tqlayout.h>
+#include <tqlineedit.h>
+#include <tqwhatsthis.h>
+#include <tqpopupmenu.h>
+#include <tqregexp.h>
+#include <tqpushbutton.h>
#include <algorithm>
#include <iterator>
@@ -151,8 +151,8 @@ static bool checkKeyUsage( const std::vector<GpgME::Key> & keys, unsigned int ke
return true;
}
-static inline QString time_t2string( time_t t ) {
- QDateTime dt;
+static inline TQString time_t2string( time_t t ) {
+ TQDateTime dt;
dt.setTime_t( t );
return dt.toString();
}
@@ -163,15 +163,15 @@ namespace {
public:
ColumnStrategy( unsigned int keyUsage );
- QString title( int col ) const;
- int width( int col, const QFontMetrics & fm ) const;
+ TQString title( int col ) const;
+ int width( int col, const TQFontMetrics & fm ) const;
- QString text( const GpgME::Key & key, int col ) const;
- QString toolTip( const GpgME::Key & key, int col ) const;
- const QPixmap * pixmap( const GpgME::Key & key, int col ) const;
+ TQString text( const GpgME::Key & key, int col ) const;
+ TQString toolTip( const GpgME::Key & key, int col ) const;
+ const TQPixmap * pixmap( const GpgME::Key & key, int col ) const;
private:
- const QPixmap mKeyGoodPix, mKeyBadPix, mKeyUnknownPix, mKeyValidPix;
+ const TQPixmap mKeyGoodPix, mKeyBadPix, mKeyUnknownPix, mKeyValidPix;
const unsigned int mKeyUsage;
};
@@ -187,31 +187,31 @@ namespace {
<< "KeySelectionDialog: keyUsage == 0. You want to use AllKeys instead." << endl;
}
- QString ColumnStrategy::title( int col ) const {
+ TQString ColumnStrategy::title( int col ) const {
switch ( col ) {
case 0: return i18n("Key ID");
case 1: return i18n("User ID");
- default: return QString::null;
+ default: return TQString::null;
}
}
- int ColumnStrategy::width( int col, const QFontMetrics & fm ) const {
+ int ColumnStrategy::width( int col, const TQFontMetrics & fm ) const {
if ( col == 0 ) {
static const char hexchars[] = "0123456789ABCDEF";
int maxWidth = 0;
for ( unsigned int i = 0 ; i < 16 ; ++i )
- maxWidth = kMax( fm.width( QChar( hexchars[i] ) ), maxWidth );
+ maxWidth = kMax( fm.width( TQChar( hexchars[i] ) ), maxWidth );
return 8 * maxWidth + 2 * mKeyGoodPix.width();
}
return Kleo::KeyListView::ColumnStrategy::width( col, fm );
}
- QString ColumnStrategy::text( const GpgME::Key & key, int col ) const {
+ TQString ColumnStrategy::text( const GpgME::Key & key, int col ) const {
switch ( col ) {
case 0:
{
if ( key.shortKeyID() )
- return QString::fromUtf8( key.shortKeyID() );
+ return TQString::fromUtf8( key.shortKeyID() );
else
return i18n("<unknown>");
}
@@ -220,30 +220,30 @@ namespace {
{
const char * uid = key.userID(0).id();
if ( key.protocol() == GpgME::Context::OpenPGP )
- return uid && *uid ? QString::fromUtf8( uid ) : QString::null ;
+ return uid && *uid ? TQString::fromUtf8( uid ) : TQString::null ;
else // CMS
return Kleo::DN( uid ).prettyDN();
}
break;
- default: return QString::null;
+ default: return TQString::null;
}
}
- QString ColumnStrategy::toolTip( const GpgME::Key & key, int ) const {
+ TQString ColumnStrategy::toolTip( const GpgME::Key & key, int ) const {
const char * uid = key.userID(0).id();
const char * fpr = key.primaryFingerprint();
const char * issuer = key.issuerName();
const GpgME::Subkey subkey = key.subkey(0);
- const QString expiry = subkey.neverExpires() ? i18n("never") : time_t2string( subkey.expirationTime() ) ;
- const QString creation = time_t2string( subkey.creationTime() );
+ const TQString expiry = subkey.neverExpires() ? i18n("never") : time_t2string( subkey.expirationTime() ) ;
+ const TQString creation = time_t2string( subkey.creationTime() );
if ( key.protocol() == GpgME::Context::OpenPGP )
return i18n( "OpenPGP key for %1\n"
"Created: %2\n"
"Expiry: %3\n"
"Fingerprint: %4" )
- .arg( uid ? QString::fromUtf8( uid ) : i18n("unknown"),
+ .arg( uid ? TQString::fromUtf8( uid ) : i18n("unknown"),
creation, expiry,
- fpr ? QString::fromLatin1( fpr ) : i18n("unknown") );
+ fpr ? TQString::fromLatin1( fpr ) : i18n("unknown") );
else
return i18n( "S/MIME key for %1\n"
"Created: %2\n"
@@ -252,11 +252,11 @@ namespace {
"Issuer: %5" )
.arg( uid ? Kleo::DN( uid ).prettyDN() : i18n("unknown"),
creation, expiry,
- fpr ? QString::fromLatin1( fpr ) : i18n("unknown") )
+ fpr ? TQString::fromLatin1( fpr ) : i18n("unknown") )
.arg( issuer ? Kleo::DN( issuer ).prettyDN() : i18n("unknown") );
}
- const QPixmap * ColumnStrategy::pixmap( const GpgME::Key & key, int col ) const {
+ const TQPixmap * ColumnStrategy::pixmap( const GpgME::Key & key, int col ) const {
if ( col != 0 )
return 0;
// this key did not undergo a validating keylisting yet:
@@ -288,13 +288,13 @@ namespace {
static const int sCheckSelectionDelay = 250;
-Kleo::KeySelectionDialog::KeySelectionDialog( const QString & title,
- const QString & text,
+Kleo::KeySelectionDialog::KeySelectionDialog( const TQString & title,
+ const TQString & text,
const std::vector<GpgME::Key> & selectedKeys,
unsigned int keyUsage,
bool extendedSelection,
bool rememberChoice,
- QWidget * parent, const char * name,
+ TQWidget * parent, const char * name,
bool modal )
: KDialogBase( parent, name, modal, title, Default|Ok|Cancel|Help, Ok ),
mOpenPGPBackend( 0 ),
@@ -304,16 +304,16 @@ Kleo::KeySelectionDialog::KeySelectionDialog( const QString & title,
mKeyUsage( keyUsage ),
mCurrentContextMenuItem( 0 )
{
- init( rememberChoice, extendedSelection, text, QString::null );
+ init( rememberChoice, extendedSelection, text, TQString::null );
}
-Kleo::KeySelectionDialog::KeySelectionDialog( const QString & title,
- const QString & text,
- const QString & initialQuery,
+Kleo::KeySelectionDialog::KeySelectionDialog( const TQString & title,
+ const TQString & text,
+ const TQString & initialQuery,
unsigned int keyUsage,
bool extendedSelection,
bool rememberChoice,
- QWidget * parent, const char * name,
+ TQWidget * parent, const char * name,
bool modal )
: KDialogBase( parent, name, modal, title, Default|Ok|Cancel|Help, Ok ),
mOpenPGPBackend( 0 ),
@@ -327,81 +327,81 @@ Kleo::KeySelectionDialog::KeySelectionDialog( const QString & title,
}
void Kleo::KeySelectionDialog::init( bool rememberChoice, bool extendedSelection,
- const QString & text, const QString & initialQuery ) {
+ const TQString & text, const TQString & initialQuery ) {
if ( mKeyUsage & OpenPGPKeys )
mOpenPGPBackend = Kleo::CryptoBackendFactory::instance()->openpgp();
if ( mKeyUsage & SMIMEKeys )
mSMIMEBackend = Kleo::CryptoBackendFactory::instance()->smime();
- mCheckSelectionTimer = new QTimer( this );
- mStartSearchTimer = new QTimer( this );
+ mCheckSelectionTimer = new TQTimer( this );
+ mStartSearchTimer = new TQTimer( this );
- QFrame *page = makeMainWidget();
- mTopLayout = new QVBoxLayout( page, 0, spacingHint() );
+ TQFrame *page = makeMainWidget();
+ mTopLayout = new TQVBoxLayout( page, 0, spacingHint() );
if ( !text.isEmpty() ) {
- QLabel* textLabel = new QLabel( text, page );
+ TQLabel* textLabel = new TQLabel( text, page );
textLabel->setAlignment( textLabel->alignment() | Qt::WordBreak );
mTopLayout->addWidget( textLabel );
}
- QHBoxLayout * hlay = new QHBoxLayout( mTopLayout ); // inherits spacing
- QLineEdit * le = new QLineEdit( page );
+ TQHBoxLayout * hlay = new TQHBoxLayout( mTopLayout ); // inherits spacing
+ TQLineEdit * le = new TQLineEdit( page );
le->setText( initialQuery );
- QToolButton *clearButton = new QToolButton( page );
+ TQToolButton *clearButton = new TQToolButton( page );
clearButton->setIconSet( KGlobal::iconLoader()->loadIconSet(
KApplication::reverseLayout() ? "clear_left":"locationbar_erase", KIcon::Small, 0 ) );
hlay->addWidget( clearButton );
- hlay->addWidget( new QLabel( le, i18n("&Search for:"), page ) );
+ hlay->addWidget( new TQLabel( le, i18n("&Search for:"), page ) );
hlay->addWidget( le, 1 );
le->setFocus();
- connect( clearButton, SIGNAL( clicked() ), le, SLOT( clear() ) );
- connect( le, SIGNAL(textChanged(const QString&)),
- this, SLOT(slotSearch(const QString&)) );
- connect( mStartSearchTimer, SIGNAL(timeout()), SLOT(slotFilter()) );
+ connect( clearButton, TQT_SIGNAL( clicked() ), le, TQT_SLOT( clear() ) );
+ connect( le, TQT_SIGNAL(textChanged(const TQString&)),
+ this, TQT_SLOT(slotSearch(const TQString&)) );
+ connect( mStartSearchTimer, TQT_SIGNAL(timeout()), TQT_SLOT(slotFilter()) );
mKeyListView = new KeyListView( new ColumnStrategy( mKeyUsage ), 0, page, "mKeyListView" );
- mKeyListView->setResizeMode( QListView::LastColumn );
+ mKeyListView->setResizeMode( TQListView::LastColumn );
mKeyListView->setRootIsDecorated( true );
mKeyListView->setShowSortIndicator( true );
mKeyListView->setSorting( 1, true ); // sort by User ID
mKeyListView->setShowToolTips( true );
if ( extendedSelection )
- mKeyListView->setSelectionMode( QListView::Extended );
+ mKeyListView->setSelectionMode( TQListView::Extended );
mTopLayout->addWidget( mKeyListView, 10 );
if ( rememberChoice ) {
- mRememberCB = new QCheckBox( i18n("&Remember choice"), page );
+ mRememberCB = new TQCheckBox( i18n("&Remember choice"), page );
mTopLayout->addWidget( mRememberCB );
- QWhatsThis::add( mRememberCB,
+ TQWhatsThis::add( mRememberCB,
i18n("<qt><p>If you check this box your choice will "
"be stored and you will not be asked again."
"</p></qt>") );
}
- connect( mCheckSelectionTimer, SIGNAL(timeout()),
- SLOT(slotCheckSelection()) );
+ connect( mCheckSelectionTimer, TQT_SIGNAL(timeout()),
+ TQT_SLOT(slotCheckSelection()) );
connectSignals();
connect( mKeyListView,
- SIGNAL(doubleClicked(Kleo::KeyListViewItem*,const QPoint&,int)),
- SLOT(slotTryOk()) );
+ TQT_SIGNAL(doubleClicked(Kleo::KeyListViewItem*,const TQPoint&,int)),
+ TQT_SLOT(slotTryOk()) );
connect( mKeyListView,
- SIGNAL(contextMenu(Kleo::KeyListViewItem*,const QPoint&)),
- SLOT(slotRMB(Kleo::KeyListViewItem*,const QPoint&)) );
+ TQT_SIGNAL(contextMenu(Kleo::KeyListViewItem*,const TQPoint&)),
+ TQT_SLOT(slotRMB(Kleo::KeyListViewItem*,const TQPoint&)) );
setButtonText( KDialogBase::Default, i18n("&Reread Keys") );
setButtonGuiItem( KDialogBase::Help, i18n("&Start Certificate Manager") );
- connect( this, SIGNAL(defaultClicked()), this, SLOT(slotRereadKeys()) );
- connect( this, SIGNAL(helpClicked()), this, SLOT(slotStartCertificateManager()) );
+ connect( this, TQT_SIGNAL(defaultClicked()), this, TQT_SLOT(slotRereadKeys()) );
+ connect( this, TQT_SIGNAL(helpClicked()), this, TQT_SLOT(slotStartCertificateManager()) );
slotRereadKeys();
mTopLayout->activate();
if ( kapp ) {
KWin::setIcons( winId(), kapp->icon(), kapp->miniIcon() );
- QSize dialogSize( 500, 400 );
+ TQSize dialogSize( 500, 400 );
KConfigGroup dialogConfig( KGlobal::config(), "Key Selection Dialog" );
dialogSize = dialogConfig.readSizeEntry( "Dialog size", &dialogSize );
@@ -418,20 +418,20 @@ Kleo::KeySelectionDialog::~KeySelectionDialog() {
void Kleo::KeySelectionDialog::connectSignals() {
if ( mKeyListView->isMultiSelection() )
- connect( mKeyListView, SIGNAL(selectionChanged()),
- SLOT(slotSelectionChanged()) );
+ connect( mKeyListView, TQT_SIGNAL(selectionChanged()),
+ TQT_SLOT(slotSelectionChanged()) );
else
- connect( mKeyListView, SIGNAL(selectionChanged(Kleo::KeyListViewItem*)),
- SLOT(slotCheckSelection(Kleo::KeyListViewItem*)) );
+ connect( mKeyListView, TQT_SIGNAL(selectionChanged(Kleo::KeyListViewItem*)),
+ TQT_SLOT(slotCheckSelection(Kleo::KeyListViewItem*)) );
}
void Kleo::KeySelectionDialog::disconnectSignals() {
if ( mKeyListView->isMultiSelection() )
- disconnect( mKeyListView, SIGNAL(selectionChanged()),
- this, SLOT(slotSelectionChanged()) );
+ disconnect( mKeyListView, TQT_SIGNAL(selectionChanged()),
+ this, TQT_SLOT(slotSelectionChanged()) );
else
- disconnect( mKeyListView, SIGNAL(selectionChanged(Kleo::KeyListViewItem*)),
- this, SLOT(slotCheckSelection(Kleo::KeyListViewItem*)) );
+ disconnect( mKeyListView, TQT_SIGNAL(selectionChanged(Kleo::KeyListViewItem*)),
+ this, TQT_SLOT(slotCheckSelection(Kleo::KeyListViewItem*)) );
}
const GpgME::Key & Kleo::KeySelectionDialog::selectedKey() const {
@@ -440,20 +440,20 @@ const GpgME::Key & Kleo::KeySelectionDialog::selectedKey() const {
return mKeyListView->selectedItem()->key();
}
-QString Kleo::KeySelectionDialog::fingerprint() const {
+TQString Kleo::KeySelectionDialog::fingerprint() const {
return selectedKey().primaryFingerprint();
}
-QStringList Kleo::KeySelectionDialog::fingerprints() const {
- QStringList result;
+TQStringList Kleo::KeySelectionDialog::fingerprints() const {
+ TQStringList result;
for ( std::vector<GpgME::Key>::const_iterator it = mSelectedKeys.begin() ; it != mSelectedKeys.end() ; ++it )
if ( const char * fpr = it->primaryFingerprint() )
result.push_back( fpr );
return result;
}
-QStringList Kleo::KeySelectionDialog::pgpKeyFingerprints() const {
- QStringList result;
+TQStringList Kleo::KeySelectionDialog::pgpKeyFingerprints() const {
+ TQStringList result;
for ( std::vector<GpgME::Key>::const_iterator it = mSelectedKeys.begin() ; it != mSelectedKeys.end() ; ++it )
if ( it->protocol() == GpgME::Context::OpenPGP )
if ( const char * fpr = it->primaryFingerprint() )
@@ -461,8 +461,8 @@ QStringList Kleo::KeySelectionDialog::pgpKeyFingerprints() const {
return result;
}
-QStringList Kleo::KeySelectionDialog::smimeFingerprints() const {
- QStringList result;
+TQStringList Kleo::KeySelectionDialog::smimeFingerprints() const {
+ TQStringList result;
for ( std::vector<GpgME::Key>::const_iterator it = mSelectedKeys.begin() ; it != mSelectedKeys.end() ; ++it )
if ( it->protocol() == GpgME::Context::CMS )
if ( const char * fpr = it->primaryFingerprint() )
@@ -515,12 +515,12 @@ void Kleo::KeySelectionDialog::slotStartCertificateManager()
#ifndef __KLEO_UI_SHOW_KEY_LIST_ERROR_H__
#define __KLEO_UI_SHOW_KEY_LIST_ERROR_H__
-static void showKeyListError( QWidget * parent, const GpgME::Error & err ) {
+static void showKeyListError( TQWidget * parent, const GpgME::Error & err ) {
assert( err );
- const QString msg = i18n( "<qt><p>An error occurred while fetching "
+ const TQString msg = i18n( "<qt><p>An error occurred while fetching "
"the keys from the backend:</p>"
"<p><b>%1</b></p></qt>" )
- .arg( QString::fromLocal8Bit( err.asString() ) );
+ .arg( TQString::fromLocal8Bit( err.asString() ) );
KMessageBox::error( parent, msg, i18n( "Key Listing Failed" ) );
}
@@ -528,7 +528,7 @@ static void showKeyListError( QWidget * parent, const GpgME::Error & err ) {
namespace {
struct ExtractFingerprint {
- QString operator()( const GpgME::Key & key ) {
+ TQString operator()( const GpgME::Key & key ) {
return key.primaryFingerprint();
}
};
@@ -540,14 +540,14 @@ void Kleo::KeySelectionDialog::startKeyListJobForBackend( const CryptoBackend::P
if ( !job )
return;
- connect( job, SIGNAL(result(const GpgME::KeyListResult&)),
- SLOT(slotKeyListResult(const GpgME::KeyListResult&)) );
- connect( job, SIGNAL(nextKey(const GpgME::Key&)),
+ connect( job, TQT_SIGNAL(result(const GpgME::KeyListResult&)),
+ TQT_SLOT(slotKeyListResult(const GpgME::KeyListResult&)) );
+ connect( job, TQT_SIGNAL(nextKey(const GpgME::Key&)),
mKeyListView, validate ?
- SLOT(slotRefreshKey(const GpgME::Key&)) :
- SLOT(slotAddKey(const GpgME::Key&)) );
+ TQT_SLOT(slotRefreshKey(const GpgME::Key&)) :
+ TQT_SLOT(slotAddKey(const GpgME::Key&)) );
- QStringList fprs;
+ TQStringList fprs;
std::transform( keys.begin(), keys.end(), std::back_inserter( fprs ), ExtractFingerprint() );
const GpgME::Error err = job->start( fprs, mKeyUsage & SecretKeys && !( mKeyUsage & PublicKeys ) );
@@ -685,13 +685,13 @@ bool Kleo::KeySelectionDialog::rememberSelection() const {
return mRememberCB && mRememberCB->isChecked() ;
}
-void Kleo::KeySelectionDialog::slotRMB( Kleo::KeyListViewItem * item, const QPoint & p ) {
+void Kleo::KeySelectionDialog::slotRMB( Kleo::KeyListViewItem * item, const TQPoint & p ) {
if ( !item ) return;
mCurrentContextMenuItem = item;
- QPopupMenu menu;
- menu.insertItem( i18n( "Recheck Key" ), this, SLOT(slotRecheckKey()) );
+ TQPopupMenu menu;
+ menu.insertItem( i18n( "Recheck Key" ), this, TQT_SLOT(slotRecheckKey()) );
menu.exec( p );
}
@@ -725,7 +725,7 @@ void Kleo::KeySelectionDialog::slotCancel() {
reject();
}
-void Kleo::KeySelectionDialog::slotSearch( const QString & text ) {
+void Kleo::KeySelectionDialog::slotSearch( const TQString & text ) {
mSearchText = text.stripWhiteSpace().upper();
slotSearch();
}
@@ -741,7 +741,7 @@ void Kleo::KeySelectionDialog::slotFilter() {
}
// OK, so we need to filter:
- QRegExp keyIdRegExp( "(?:0x)?[A-F0-9]{1,8}", false /*case-insens.*/ );
+ TQRegExp keyIdRegExp( "(?:0x)?[A-F0-9]{1,8}", false /*case-insens.*/ );
if ( keyIdRegExp.exactMatch( mSearchText ) ) {
if ( mSearchText.startsWith( "0X" ) )
// search for keyID only:
@@ -755,7 +755,7 @@ void Kleo::KeySelectionDialog::slotFilter() {
}
}
-void Kleo::KeySelectionDialog::filterByKeyID( const QString & keyID ) {
+void Kleo::KeySelectionDialog::filterByKeyID( const TQString & keyID ) {
assert( keyID.length() <= 8 );
assert( !keyID.isEmpty() ); // regexp in slotFilter should prevent these
if ( keyID.isEmpty() )
@@ -765,33 +765,33 @@ void Kleo::KeySelectionDialog::filterByKeyID( const QString & keyID ) {
item->setVisible( item->text( 0 ).upper().startsWith( keyID ) );
}
-static bool anyUIDMatches( const Kleo::KeyListViewItem * item, QRegExp & rx ) {
+static bool anyUIDMatches( const Kleo::KeyListViewItem * item, TQRegExp & rx ) {
if ( !item )
return false;
const std::vector<GpgME::UserID> uids = item->key().userIDs();
for ( std::vector<GpgME::UserID>::const_iterator it = uids.begin() ; it != uids.end() ; ++it )
- if ( it->id() && rx.search( QString::fromUtf8( it->id() ) ) >= 0 )
+ if ( it->id() && rx.search( TQString::fromUtf8( it->id() ) ) >= 0 )
return true;
return false;
}
-void Kleo::KeySelectionDialog::filterByKeyIDOrUID( const QString & str ) {
+void Kleo::KeySelectionDialog::filterByKeyIDOrUID( const TQString & str ) {
assert( !str.isEmpty() );
// match beginnings of words:
- QRegExp rx( "\\b" + QRegExp::escape( str ), false );
+ TQRegExp rx( "\\b" + TQRegExp::escape( str ), false );
for ( KeyListViewItem * item = mKeyListView->firstChild() ; item ; item = item->nextSibling() )
item->setVisible( item->text( 0 ).upper().startsWith( str ) || anyUIDMatches( item, rx ) );
}
-void Kleo::KeySelectionDialog::filterByUID( const QString & str ) {
+void Kleo::KeySelectionDialog::filterByUID( const TQString & str ) {
assert( !str.isEmpty() );
// match beginnings of words:
- QRegExp rx( "\\b" + QRegExp::escape( str ), false );
+ TQRegExp rx( "\\b" + TQRegExp::escape( str ), false );
for ( KeyListViewItem * item = mKeyListView->firstChild() ; item ; item = item->nextSibling() )
item->setVisible( anyUIDMatches( item, rx ) );
diff --git a/certmanager/lib/ui/keyselectiondialog.h b/certmanager/lib/ui/keyselectiondialog.h
index f274398b1..efb87d5e6 100644
--- a/certmanager/lib/ui/keyselectiondialog.h
+++ b/certmanager/lib/ui/keyselectiondialog.h
@@ -83,21 +83,21 @@ namespace Kleo {
ValidTrustedEncryptionKeys = AllKeys | EncryptionKeys | ValidKeys | TrustedKeys
};
- KeySelectionDialog( const QString & title,
- const QString & text,
+ KeySelectionDialog( const TQString & title,
+ const TQString & text,
const std::vector<GpgME::Key> & selectedKeys=std::vector<GpgME::Key>(),
unsigned int keyUsage=AllKeys,
bool extendedSelection=false,
bool rememberChoice=false,
- QWidget * parent=0, const char * name=0,
+ TQWidget * parent=0, const char * name=0,
bool modal=true );
- KeySelectionDialog( const QString & title,
- const QString & text,
- const QString & initialPattern,
+ KeySelectionDialog( const TQString & title,
+ const TQString & text,
+ const TQString & initialPattern,
unsigned int keyUsage=AllKeys,
bool extendedSelection=false,
bool rememberChoice=false,
- QWidget * parent=0, const char * name=0,
+ TQWidget * parent=0, const char * name=0,
bool modal=true );
~KeySelectionDialog();
@@ -105,18 +105,18 @@ namespace Kleo {
Otherwise it returns a null key. */
const GpgME::Key & selectedKey() const;
- QString fingerprint() const;
+ TQString fingerprint() const;
/** Returns a list of selected key IDs. */
const std::vector<GpgME::Key> & selectedKeys() const { return mSelectedKeys; }
/// Return all the selected fingerprints
- QStringList fingerprints() const;
+ TQStringList fingerprints() const;
/// Return the selected openpgp fingerprints
- QStringList pgpKeyFingerprints() const;
+ TQStringList pgpKeyFingerprints() const;
/// Return the selected smime fingerprints
- QStringList smimeFingerprints() const;
+ TQStringList smimeFingerprints() const;
bool rememberSelection() const;
protected slots:
@@ -125,7 +125,7 @@ namespace Kleo {
void slotHelp();
// Could be used by derived classes to insert their own widget
- QVBoxLayout* topLayout() const { return mTopLayout; }
+ TQVBoxLayout* topLayout() const { return mTopLayout; }
private slots:
void slotRereadKeys();
@@ -134,21 +134,21 @@ namespace Kleo {
void slotSelectionChanged();
void slotCheckSelection() { slotCheckSelection( 0 ); }
void slotCheckSelection( Kleo::KeyListViewItem * );
- void slotRMB( Kleo::KeyListViewItem *, const QPoint & );
+ void slotRMB( Kleo::KeyListViewItem *, const TQPoint & );
void slotRecheckKey();
void slotTryOk();
void slotOk();
void slotCancel();
- void slotSearch( const QString & text );
+ void slotSearch( const TQString & text );
void slotSearch();
void slotFilter();
private:
- void filterByKeyID( const QString & keyID );
- void filterByKeyIDOrUID( const QString & keyID );
- void filterByUID( const QString & uid );
+ void filterByKeyID( const TQString & keyID );
+ void filterByKeyIDOrUID( const TQString & keyID );
+ void filterByUID( const TQString & uid );
void showAllItems();
- bool anyChildMatches( const Kleo::KeyListViewItem * item, QRegExp & rx ) const;
+ bool anyChildMatches( const Kleo::KeyListViewItem * item, TQRegExp & rx ) const;
void connectSignals();
void disconnectSignals();
@@ -156,20 +156,20 @@ namespace Kleo {
void startKeyListJobForBackend( const Kleo::CryptoBackend::Protocol *, const std::vector<GpgME::Key> &, bool );
void startValidatingKeyListing();
- void init( bool, bool, const QString &, const QString & );
+ void init( bool, bool, const TQString &, const TQString & );
private:
- QVBoxLayout* mTopLayout;
+ TQVBoxLayout* mTopLayout;
Kleo::KeyListView * mKeyListView;
const Kleo::CryptoBackend::Protocol * mOpenPGPBackend;
const Kleo::CryptoBackend::Protocol * mSMIMEBackend;
- QCheckBox * mRememberCB;
+ TQCheckBox * mRememberCB;
std::vector<GpgME::Key> mSelectedKeys, mKeysToCheck;
unsigned int mKeyUsage;
- QTimer * mCheckSelectionTimer;
- QTimer * mStartSearchTimer;
+ TQTimer * mCheckSelectionTimer;
+ TQTimer * mStartSearchTimer;
// cross-eventloop temporaries:
- QString mSearchText;
+ TQString mSearchText;
Kleo::KeyListViewItem * mCurrentContextMenuItem;
int mTruncated, mListJobCount, mSavedOffsetY;
};
diff --git a/certmanager/lib/ui/messagebox.cpp b/certmanager/lib/ui/messagebox.cpp
index 283d33108..ddce8f04d 100644
--- a/certmanager/lib/ui/messagebox.cpp
+++ b/certmanager/lib/ui/messagebox.cpp
@@ -47,9 +47,9 @@
#include <ksavefile.h>
#include <kguiitem.h>
-#include <qtextedit.h>
-#include <qtextstream.h>
-#include <qvbox.h>
+#include <tqtextedit.h>
+#include <tqtextstream.h>
+#include <tqvbox.h>
using namespace Kleo;
using namespace GpgME;
@@ -71,40 +71,40 @@ static KGuiItem KGuiItem_showAuditLog() {
class AuditLogViewer : public KDialogBase {
// Q_OBJECT
public:
- explicit AuditLogViewer( const QString & log, QWidget * parent=0, const char * name=0, WFlags f=0 )
+ explicit AuditLogViewer( const TQString & log, TQWidget * parent=0, const char * name=0, WFlags f=0 )
: KDialogBase( parent, name, false, i18n("View GnuPG Audit Log"),
Close|User1|User2, Close, false, KGuiItem_save(), KGuiItem_copy() ),
- m_textEdit( new QTextEdit( this, "m_textEdit" ) )
+ m_textEdit( new TQTextEdit( this, "m_textEdit" ) )
{
setWFlags( f );
setMainWidget( m_textEdit );
- m_textEdit->setTextFormat( QTextEdit::RichText );
+ m_textEdit->setTextFormat( TQTextEdit::RichText );
m_textEdit->setReadOnly( true );
setAuditLog( log );
}
~AuditLogViewer() {}
- void setAuditLog( const QString & log ) {
+ void setAuditLog( const TQString & log ) {
m_textEdit->setText( log );
}
private:
void slotUser1() {
- const QString fileName = KFileDialog::getSaveFileName( QString(), QString(),
+ const TQString fileName = KFileDialog::getSaveFileName( TQString(), TQString(),
this, i18n("Choose File to Save GnuPG Audit Log to") );
if ( fileName.isEmpty() )
return;
KSaveFile file( fileName );
- if ( QTextStream * const s = file.textStream() ) {
+ if ( TQTextStream * const s = file.textStream() ) {
*s << m_textEdit->text() << endl;
file.close();
}
if ( const int err = file.status() )
KMessageBox::error( this, i18n("Couldn't save to file \"%1\": %2")
- .arg( file.name(), QString::fromLocal8Bit( strerror( err ) ) ),
+ .arg( file.name(), TQString::fromLocal8Bit( strerror( err ) ) ),
i18n("File Save Error") );
}
void slotUser2() {
@@ -114,13 +114,13 @@ private:
}
private:
- QTextEdit * m_textEdit;
+ TQTextEdit * m_textEdit;
};
} // anon namespace
// static
-void MessageBox::auditLog( QWidget * parent, const Job * job, const QString & caption ) {
+void MessageBox::auditLog( TQWidget * parent, const Job * job, const TQString & caption ) {
if ( !job )
return;
@@ -131,7 +131,7 @@ void MessageBox::auditLog( QWidget * parent, const Job * job, const QString & ca
return;
}
- const QString log = job->auditLogAsHtml();
+ const TQString log = job->auditLogAsHtml();
if ( log.isEmpty() ) {
KMessageBox::information( parent, i18n("No GnuPG Audit Log available for this operation."),
i18n("No GnuPG Audit Log") );
@@ -142,112 +142,112 @@ void MessageBox::auditLog( QWidget * parent, const Job * job, const QString & ca
}
// static
-void MessageBox::auditLog( QWidget * parent, const QString & log, const QString & caption ) {
+void MessageBox::auditLog( TQWidget * parent, const TQString & log, const TQString & caption ) {
AuditLogViewer * const alv = new AuditLogViewer( "<qt>" + log + "</qt>", parent, "alv", Qt::WDestructiveClose );
alv->setCaption( caption );
alv->show();
}
// static
-void MessageBox::auditLog( QWidget * parent, const Job * job ) {
+void MessageBox::auditLog( TQWidget * parent, const Job * job ) {
auditLog( parent, job, i18n("GnuPG Audit Log Viewer") );
}
// static
-void MessageBox::auditLog( QWidget * parent, const QString & log ) {
+void MessageBox::auditLog( TQWidget * parent, const TQString & log ) {
auditLog( parent, log, i18n("GnuPG Audit Log Viewer") );
}
-static QString to_information_string( const SigningResult & result ) {
+static TQString to_information_string( const SigningResult & result ) {
return result.error()
- ? i18n("Signing failed: %1").arg( QString::fromLocal8Bit( result.error().asString() ) )
+ ? i18n("Signing failed: %1").arg( TQString::fromLocal8Bit( result.error().asString() ) )
: i18n("Signing successful") ;
}
-static QString to_error_string( const SigningResult & result ) {
+static TQString to_error_string( const SigningResult & result ) {
return to_information_string( result );
}
-static QString to_information_string( const EncryptionResult & result ) {
+static TQString to_information_string( const EncryptionResult & result ) {
return result.error()
- ? i18n("Encryption failed: %1").arg( QString::fromLocal8Bit( result.error().asString() ) )
+ ? i18n("Encryption failed: %1").arg( TQString::fromLocal8Bit( result.error().asString() ) )
: i18n("Encryption successful") ;
}
-static QString to_error_string( const EncryptionResult & result ) {
+static TQString to_error_string( const EncryptionResult & result ) {
return to_information_string( result );
}
-static QString to_information_string( const SigningResult & sresult, const EncryptionResult & eresult ) {
+static TQString to_information_string( const SigningResult & sresult, const EncryptionResult & eresult ) {
return to_information_string( sresult ) + '\n' + to_information_string( eresult );
}
-static QString to_error_string( const SigningResult & sresult, const EncryptionResult & eresult ) {
+static TQString to_error_string( const SigningResult & sresult, const EncryptionResult & eresult ) {
return to_information_string( sresult, eresult );
}
// static
-void MessageBox::information( QWidget * parent, const SigningResult & result, const Job * job, int options ) {
+void MessageBox::information( TQWidget * parent, const SigningResult & result, const Job * job, int options ) {
information( parent, result, job, i18n("Signing Result"), options );
}
// static
-void MessageBox::information( QWidget * parent, const SigningResult & result, const Job * job, const QString & caption, int options ) {
- make( parent, QMessageBox::Information, to_information_string( result ), job, caption, options );
+void MessageBox::information( TQWidget * parent, const SigningResult & result, const Job * job, const TQString & caption, int options ) {
+ make( parent, TQMessageBox::Information, to_information_string( result ), job, caption, options );
}
// static
-void MessageBox::error( QWidget * parent, const SigningResult & result, const Job * job, int options ) {
+void MessageBox::error( TQWidget * parent, const SigningResult & result, const Job * job, int options ) {
error( parent, result, job, i18n("Signing Error"), options );
}
// static
-void MessageBox::error( QWidget * parent, const SigningResult & result, const Job * job, const QString & caption, int options ) {
- make( parent, QMessageBox::Critical, to_error_string( result ), job, caption, options );
+void MessageBox::error( TQWidget * parent, const SigningResult & result, const Job * job, const TQString & caption, int options ) {
+ make( parent, TQMessageBox::Critical, to_error_string( result ), job, caption, options );
}
// static
-void MessageBox::information( QWidget * parent, const EncryptionResult & result, const Job * job, int options ) {
+void MessageBox::information( TQWidget * parent, const EncryptionResult & result, const Job * job, int options ) {
information( parent, result, job, i18n("Encryption Result"), options );
}
// static
-void MessageBox::information( QWidget * parent, const EncryptionResult & result, const Job * job, const QString & caption, int options ) {
- make( parent, QMessageBox::Information, to_information_string( result ), job, caption, options );
+void MessageBox::information( TQWidget * parent, const EncryptionResult & result, const Job * job, const TQString & caption, int options ) {
+ make( parent, TQMessageBox::Information, to_information_string( result ), job, caption, options );
}
// static
-void MessageBox::error( QWidget * parent, const EncryptionResult & result, const Job * job, int options ) {
+void MessageBox::error( TQWidget * parent, const EncryptionResult & result, const Job * job, int options ) {
error( parent, result, job, i18n("Encryption Error"), options );
}
// static
-void MessageBox::error( QWidget * parent, const EncryptionResult & result, const Job * job, const QString & caption, int options ) {
- make( parent, QMessageBox::Critical, to_error_string( result ), job, caption, options );
+void MessageBox::error( TQWidget * parent, const EncryptionResult & result, const Job * job, const TQString & caption, int options ) {
+ make( parent, TQMessageBox::Critical, to_error_string( result ), job, caption, options );
}
// static
-void MessageBox::information( QWidget * parent, const SigningResult & sresult, const EncryptionResult & eresult, const Job * job, int options ) {
+void MessageBox::information( TQWidget * parent, const SigningResult & sresult, const EncryptionResult & eresult, const Job * job, int options ) {
information( parent, sresult, eresult, job, i18n("Encryption Result"), options );
}
// static
-void MessageBox::information( QWidget * parent, const SigningResult & sresult, const EncryptionResult & eresult, const Job * job, const QString & caption, int options ) {
- make( parent, QMessageBox::Information, to_information_string( sresult, eresult ), job, caption, options );
+void MessageBox::information( TQWidget * parent, const SigningResult & sresult, const EncryptionResult & eresult, const Job * job, const TQString & caption, int options ) {
+ make( parent, TQMessageBox::Information, to_information_string( sresult, eresult ), job, caption, options );
}
// static
-void MessageBox::error( QWidget * parent, const SigningResult & sresult, const EncryptionResult & eresult, const Job * job, int options ) {
+void MessageBox::error( TQWidget * parent, const SigningResult & sresult, const EncryptionResult & eresult, const Job * job, int options ) {
error( parent, sresult, eresult, job, i18n("Encryption Error"), options );
}
// static
-void MessageBox::error( QWidget * parent, const SigningResult & sresult, const EncryptionResult & eresult, const Job * job, const QString & caption, int options ) {
- make( parent, QMessageBox::Critical, to_error_string( sresult, eresult ), job, caption, options );
+void MessageBox::error( TQWidget * parent, const SigningResult & sresult, const EncryptionResult & eresult, const Job * job, const TQString & caption, int options ) {
+ make( parent, TQMessageBox::Critical, to_error_string( sresult, eresult ), job, caption, options );
}
// static
-void MessageBox::make( QWidget * parent, QMessageBox::Icon icon, const QString & text, const Job * job, const QString & caption, int options ) {
+void MessageBox::make( TQWidget * parent, TQMessageBox::Icon icon, const TQString & text, const Job * job, const TQString & caption, int options ) {
KDialogBase * dialog = GpgME::hasFeature( GpgME::AuditLogFeature )
? new KDialogBase( caption, KDialogBase::Yes | KDialogBase::No,
KDialogBase::Yes, KDialogBase::Yes,
@@ -260,6 +260,6 @@ void MessageBox::make( QWidget * parent, QMessageBox::Icon icon, const QString &
if ( options & KMessageBox::PlainCaption )
dialog->setPlainCaption( caption );
- if ( KDialogBase::No == KMessageBox::createKMessageBox( dialog, icon, text, QStringList(), QString::null, 0, options ) )
+ if ( KDialogBase::No == KMessageBox::createKMessageBox( dialog, icon, text, TQStringList(), TQString::null, 0, options ) )
auditLog( 0, job );
}
diff --git a/certmanager/lib/ui/messagebox.h b/certmanager/lib/ui/messagebox.h
index a84f86e11..dad984d06 100644
--- a/certmanager/lib/ui/messagebox.h
+++ b/certmanager/lib/ui/messagebox.h
@@ -53,28 +53,28 @@ namespace Kleo {
class MessageBox {
public:
- static void information( QWidget * parent, const GpgME::SigningResult & result, const Kleo::Job * job, const QString & caption, int options=KMessageBox::Notify );
- static void information( QWidget * parent, const GpgME::SigningResult & result, const Kleo::Job * job, int options=KMessageBox::Notify );
- static void error( QWidget * parent, const GpgME::SigningResult & result, const Kleo::Job * job, const QString & caption, int options=KMessageBox::Notify );
- static void error( QWidget * parent, const GpgME::SigningResult & result, const Kleo::Job * job, int options=KMessageBox::Notify );
-
- static void information( QWidget * parent, const GpgME::EncryptionResult & result, const Kleo::Job * job, const QString & caption, int options=KMessageBox::Notify );
- static void information( QWidget * parent, const GpgME::EncryptionResult & result, const Kleo::Job * job, int options=KMessageBox::Notify );
- static void error( QWidget * parent, const GpgME::EncryptionResult & result, const Kleo::Job * job, const QString & caption, int options=KMessageBox::Notify );
- static void error( QWidget * parent, const GpgME::EncryptionResult & result, const Kleo::Job * job, int options=KMessageBox::Notify );
-
- static void information( QWidget * parent, const GpgME::SigningResult & sresult, const GpgME::EncryptionResult & eresult, const Kleo::Job * job, const QString & caption, int options=KMessageBox::Notify );
- static void information( QWidget * parent, const GpgME::SigningResult & sresult, const GpgME::EncryptionResult & eresult, const Kleo::Job * job, int options=KMessageBox::Notify );
- static void error( QWidget * parent, const GpgME::SigningResult & sresult, const GpgME::EncryptionResult & eresult, const Kleo::Job * job, const QString & caption, int options=KMessageBox::Notify );
- static void error( QWidget * parent, const GpgME::SigningResult & sresult, const GpgME::EncryptionResult & eresult, const Kleo::Job * job, int options=KMessageBox::Notify );
-
- static void auditLog( QWidget * parent, const Kleo::Job * job, const QString & caption );
- static void auditLog( QWidget * parent, const Kleo::Job * job );
- static void auditLog( QWidget * parent, const QString & log, const QString & caption );
- static void auditLog( QWidget * parent, const QString & log );
+ static void information( TQWidget * parent, const GpgME::SigningResult & result, const Kleo::Job * job, const TQString & caption, int options=KMessageBox::Notify );
+ static void information( TQWidget * parent, const GpgME::SigningResult & result, const Kleo::Job * job, int options=KMessageBox::Notify );
+ static void error( TQWidget * parent, const GpgME::SigningResult & result, const Kleo::Job * job, const TQString & caption, int options=KMessageBox::Notify );
+ static void error( TQWidget * parent, const GpgME::SigningResult & result, const Kleo::Job * job, int options=KMessageBox::Notify );
+
+ static void information( TQWidget * parent, const GpgME::EncryptionResult & result, const Kleo::Job * job, const TQString & caption, int options=KMessageBox::Notify );
+ static void information( TQWidget * parent, const GpgME::EncryptionResult & result, const Kleo::Job * job, int options=KMessageBox::Notify );
+ static void error( TQWidget * parent, const GpgME::EncryptionResult & result, const Kleo::Job * job, const TQString & caption, int options=KMessageBox::Notify );
+ static void error( TQWidget * parent, const GpgME::EncryptionResult & result, const Kleo::Job * job, int options=KMessageBox::Notify );
+
+ static void information( TQWidget * parent, const GpgME::SigningResult & sresult, const GpgME::EncryptionResult & eresult, const Kleo::Job * job, const TQString & caption, int options=KMessageBox::Notify );
+ static void information( TQWidget * parent, const GpgME::SigningResult & sresult, const GpgME::EncryptionResult & eresult, const Kleo::Job * job, int options=KMessageBox::Notify );
+ static void error( TQWidget * parent, const GpgME::SigningResult & sresult, const GpgME::EncryptionResult & eresult, const Kleo::Job * job, const TQString & caption, int options=KMessageBox::Notify );
+ static void error( TQWidget * parent, const GpgME::SigningResult & sresult, const GpgME::EncryptionResult & eresult, const Kleo::Job * job, int options=KMessageBox::Notify );
+
+ static void auditLog( TQWidget * parent, const Kleo::Job * job, const TQString & caption );
+ static void auditLog( TQWidget * parent, const Kleo::Job * job );
+ static void auditLog( TQWidget * parent, const TQString & log, const TQString & caption );
+ static void auditLog( TQWidget * parent, const TQString & log );
private:
- static void make( QWidget * parent, QMessageBox::Icon icon, const QString & text, const Kleo::Job * job, const QString & caption, int options );
+ static void make( TQWidget * parent, TQMessageBox::Icon icon, const TQString & text, const Kleo::Job * job, const TQString & caption, int options );
};
diff --git a/certmanager/lib/ui/passphrasedialog.cpp b/certmanager/lib/ui/passphrasedialog.cpp
index 5915387f5..a0bc7295e 100644
--- a/certmanager/lib/ui/passphrasedialog.cpp
+++ b/certmanager/lib/ui/passphrasedialog.cpp
@@ -56,33 +56,33 @@
#include <kiconloader.h>
#include <klocale.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qfontmetrics.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqfontmetrics.h>
struct Kleo::PassphraseDialog::Private {
KPasswordEdit * lineedit;
};
-Kleo::PassphraseDialog::PassphraseDialog( const QString & msg, const QString & caption,
- QWidget * parent, const char * name, bool modal )
+Kleo::PassphraseDialog::PassphraseDialog( const TQString & msg, const TQString & caption,
+ TQWidget * parent, const char * name, bool modal )
: KDialogBase( parent, name, modal, caption, Ok|Cancel, Ok ), d( 0 )
{
d = new Private();
- QWidget * w = new QWidget( this );
+ TQWidget * w = new TQWidget( this );
setMainWidget( w );
- QHBoxLayout * hlay = new QHBoxLayout( w, 0, spacingHint() );
+ TQHBoxLayout * hlay = new TQHBoxLayout( w, 0, spacingHint() );
- QLabel * label = new QLabel( w );
+ TQLabel * label = new TQLabel( w );
label->setPixmap( DesktopIcon( "pgp-keys", KIcon::SizeMedium ) );
hlay->addWidget( label, 0, AlignTop );
- QVBoxLayout * vlay = new QVBoxLayout( hlay ); // inherits spacing
+ TQVBoxLayout * vlay = new TQVBoxLayout( hlay ); // inherits spacing
- vlay->addWidget( new QLabel( msg.isEmpty() ? i18n("Please enter your passphrase:") : msg, w ) );
+ vlay->addWidget( new TQLabel( msg.isEmpty() ? i18n("Please enter your passphrase:") : msg, w ) );
d->lineedit = new KPasswordEdit( KPasswordEdit::OneStar, w, "d->lineedit" );
d->lineedit->setMinimumWidth( fontMetrics().width("*") * 20 );
@@ -90,7 +90,7 @@ Kleo::PassphraseDialog::PassphraseDialog( const QString & msg, const QString & c
vlay->addWidget( d->lineedit );
- connect( d->lineedit, SIGNAL(returnPressed()), SLOT(slotOk()) );
+ connect( d->lineedit, TQT_SIGNAL(returnPressed()), TQT_SLOT(slotOk()) );
disableResize();
}
diff --git a/certmanager/lib/ui/passphrasedialog.h b/certmanager/lib/ui/passphrasedialog.h
index 12a434e13..43b540427 100644
--- a/certmanager/lib/ui/passphrasedialog.h
+++ b/certmanager/lib/ui/passphrasedialog.h
@@ -56,9 +56,9 @@ namespace Kleo {
class PassphraseDialog : public KDialogBase {
Q_OBJECT
public:
- PassphraseDialog( const QString & description,
- const QString & caption=QString::null,
- QWidget * parent=0, const char * name=0,
+ PassphraseDialog( const TQString & description,
+ const TQString & caption=TQString::null,
+ TQWidget * parent=0, const char * name=0,
bool modal=true );
~PassphraseDialog();
diff --git a/certmanager/lib/ui/progressbar.cpp b/certmanager/lib/ui/progressbar.cpp
index 96f51fa8a..1b14868d6 100644
--- a/certmanager/lib/ui/progressbar.cpp
+++ b/certmanager/lib/ui/progressbar.cpp
@@ -33,26 +33,26 @@
#include "config.h"
#include "progressbar.h"
-#include <qtimer.h>
+#include <tqtimer.h>
#include <kdebug.h>
static const int busyTimerTickInterval = 100;
static const int busyTimerTickIncrement = 5;
-Kleo::ProgressBar::ProgressBar( QWidget * parent, const char * name, WFlags f )
- : QProgressBar( 0, parent, name, f ),
+Kleo::ProgressBar::ProgressBar( TQWidget * parent, const char * name, WFlags f )
+ : TQProgressBar( 0, parent, name, f ),
mRealProgress( -1 )
{
- mBusyTimer = new QTimer( this );
- connect( mBusyTimer, SIGNAL(timeout()), SLOT(slotBusyTimerTick()) );
+ mBusyTimer = new TQTimer( this );
+ connect( mBusyTimer, TQT_SIGNAL(timeout()), TQT_SLOT(slotBusyTimerTick()) );
fixup( true );
}
-void Kleo::ProgressBar::slotProgress( const QString &, int cur, int tot ) {
+void Kleo::ProgressBar::slotProgress( const TQString &, int cur, int tot ) {
setProgress( cur, tot );
}
-void Kleo::ProgressBar::slotProgress( const QString &, int, int cur, int tot ) {
+void Kleo::ProgressBar::slotProgress( const TQString &, int, int cur, int tot ) {
setProgress( cur, tot );
}
@@ -60,7 +60,7 @@ void Kleo::ProgressBar::setTotalSteps( int total ) {
kdDebug() << "Kleo::ProgressBar::setTotalSteps( " << total << " )" << endl;
if ( total == totalSteps() )
return;
- QProgressBar::setTotalSteps( 0 );
+ TQProgressBar::setTotalSteps( 0 );
fixup( false );
}
@@ -78,12 +78,12 @@ void Kleo::ProgressBar::reset() {
void Kleo::ProgressBar::slotBusyTimerTick() {
fixup( false );
if ( mBusyTimer->isActive() )
- QProgressBar::setProgress( QProgressBar::progress() + busyTimerTickIncrement );
+ TQProgressBar::setProgress( TQProgressBar::progress() + busyTimerTickIncrement );
}
void Kleo::ProgressBar::fixup( bool newValue ) {
- const int cur = QProgressBar::progress();
- const int tot = QProgressBar::totalSteps();
+ const int cur = TQProgressBar::progress();
+ const int tot = TQProgressBar::totalSteps();
kdDebug() << "Kleo::ProgressBar::startStopBusyTimer() cur = " << cur << "; tot = " << tot << "; real = " << mRealProgress << endl;
@@ -91,20 +91,20 @@ void Kleo::ProgressBar::fixup( bool newValue ) {
kdDebug() << "(new value) switch to reset" << endl;
mBusyTimer->stop();
if ( newValue )
- QProgressBar::reset();
+ TQProgressBar::reset();
mRealProgress = -1;
} else if ( tot == 0 ) {
kdDebug() << "(new value) switch or stay in busy" << endl;
if ( !mBusyTimer->isActive() ) {
mBusyTimer->start( busyTimerTickInterval );
if ( newValue )
- QProgressBar::setProgress( mRealProgress );
+ TQProgressBar::setProgress( mRealProgress );
}
} else {
kdDebug() << "(new value) normal progress" << endl;
mBusyTimer->stop();
- if ( QProgressBar::progress() != mRealProgress )
- QProgressBar::setProgress( mRealProgress );
+ if ( TQProgressBar::progress() != mRealProgress )
+ TQProgressBar::setProgress( mRealProgress );
}
}
diff --git a/certmanager/lib/ui/progressbar.h b/certmanager/lib/ui/progressbar.h
index 41d96796d..1120a0dd4 100644
--- a/certmanager/lib/ui/progressbar.h
+++ b/certmanager/lib/ui/progressbar.h
@@ -33,23 +33,23 @@
#ifndef __KLEO_PROGRESSBAR_H__
#define __KLEO_PROGRESSBAR_H__
-#include <qprogressbar.h>
+#include <tqprogressbar.h>
#include <kdepimmacros.h>
class QTimer;
namespace Kleo {
/**
- @short A QProgressBar with self-powered busy indicator
+ @short A TQProgressBar with self-powered busy indicator
*/
- class KDE_EXPORT ProgressBar : public QProgressBar {
+ class KDE_EXPORT ProgressBar : public TQProgressBar {
Q_OBJECT
public:
- ProgressBar( QWidget * parent=0, const char * name=0, WFlags f=0 );
+ ProgressBar( TQWidget * parent=0, const char * name=0, WFlags f=0 );
public slots:
- void slotProgress( const QString & message, int type, int current, int total );
- void slotProgress( const QString & message, int current, int total );
+ void slotProgress( const TQString & message, int type, int current, int total );
+ void slotProgress( const TQString & message, int current, int total );
/*! reimplementation to support self-powered busy indicator */
void setProgress( int progress );
/*! reimplementation to support self-powered busy indicator */
@@ -57,7 +57,7 @@ namespace Kleo {
/*! reimplementation to support self-powered busy indicator */
void reset();
/*! reimplementation to preserve visibility */
- void setProgress( int cur, int tot ) { QProgressBar::setProgress( cur, tot ); }
+ void setProgress( int cur, int tot ) { TQProgressBar::setProgress( cur, tot ); }
private slots:
void slotBusyTimerTick();
@@ -66,7 +66,7 @@ namespace Kleo {
void fixup( bool );
private:
- QTimer * mBusyTimer;
+ TQTimer * mBusyTimer;
int mRealProgress;
};
}
diff --git a/certmanager/lib/ui/progressdialog.cpp b/certmanager/lib/ui/progressdialog.cpp
index bb66aca17..1418bb65a 100644
--- a/certmanager/lib/ui/progressdialog.cpp
+++ b/certmanager/lib/ui/progressdialog.cpp
@@ -39,13 +39,13 @@
#include <kdebug.h>
#include <klocale.h>
-#include <qtimer.h>
+#include <tqtimer.h>
#include <assert.h>
-Kleo::ProgressDialog::ProgressDialog( Job * job, const QString & baseText,
- QWidget * creator, const char * name, WFlags f )
- : QProgressDialog( creator, name, false, f ), mBaseText( baseText )
+Kleo::ProgressDialog::ProgressDialog( Job * job, const TQString & baseText,
+ TQWidget * creator, const char * name, WFlags f )
+ : TQProgressDialog( creator, name, false, f ), mBaseText( baseText )
{
assert( job );
setBar( new ProgressBar( this, "replacement progressbar in Kleo::ProgressDialog" ) );
@@ -56,13 +56,13 @@ Kleo::ProgressDialog::ProgressDialog( Job * job, const QString & baseText,
setLabelText( baseText );
setProgress( 0, 0 ); // activate busy indicator
- connect( job, SIGNAL(progress(const QString&,int,int)),
- SLOT(slotProgress(const QString&,int,int)) );
- connect( job, SIGNAL(done()), SLOT(slotDone()) );
- connect( this, SIGNAL(canceled()),
- job, SLOT(slotCancel()) );
+ connect( job, TQT_SIGNAL(progress(const TQString&,int,int)),
+ TQT_SLOT(slotProgress(const TQString&,int,int)) );
+ connect( job, TQT_SIGNAL(done()), TQT_SLOT(slotDone()) );
+ connect( this, TQT_SIGNAL(canceled()),
+ job, TQT_SLOT(slotCancel()) );
- QTimer::singleShot( minimumDuration(), this, SLOT(forceShow()) );
+ TQTimer::singleShot( minimumDuration(), this, TQT_SLOT(forceShow()) );
}
Kleo::ProgressDialog::~ProgressDialog() {
@@ -71,11 +71,11 @@ Kleo::ProgressDialog::~ProgressDialog() {
void Kleo::ProgressDialog::setMinimumDuration( int ms ) {
if ( 0 < ms && ms < minimumDuration() )
- QTimer::singleShot( ms, this, SLOT(forceShow()) );
- QProgressDialog::setMinimumDuration( ms );
+ TQTimer::singleShot( ms, this, TQT_SLOT(forceShow()) );
+ TQProgressDialog::setMinimumDuration( ms );
}
-void Kleo::ProgressDialog::slotProgress( const QString & what, int current, int total ) {
+void Kleo::ProgressDialog::slotProgress( const TQString & what, int current, int total ) {
kdDebug(5150) << "Kleo::ProgressDialog::slotProgress( \"" << what << "\", "
<< current << ", " << total << " )" << endl;
if ( mBaseText.isEmpty() )
diff --git a/certmanager/lib/ui/progressdialog.h b/certmanager/lib/ui/progressdialog.h
index 0b419aabb..64f53f37b 100644
--- a/certmanager/lib/ui/progressdialog.h
+++ b/certmanager/lib/ui/progressdialog.h
@@ -33,8 +33,8 @@
#ifndef __KLEO_PROGRESSDIALOG_H__
#define __KLEO_PROGRESSDIALOG_H__
-#include <qprogressdialog.h>
-#include <qstring.h>
+#include <tqprogressdialog.h>
+#include <tqstring.h>
#include <kdepimmacros.h>
namespace Kleo {
@@ -43,11 +43,11 @@ namespace Kleo {
/**
@short A progress dialog for Kleo::Jobs
*/
- class KDE_EXPORT ProgressDialog : public QProgressDialog {
+ class KDE_EXPORT ProgressDialog : public TQProgressDialog {
Q_OBJECT
public:
- ProgressDialog( Job * job, const QString & baseText,
- QWidget * creator=0, const char * name=0, WFlags f=0 );
+ ProgressDialog( Job * job, const TQString & baseText,
+ TQWidget * creator=0, const char * name=0, WFlags f=0 );
~ProgressDialog();
public slots:
@@ -55,10 +55,10 @@ namespace Kleo {
void setMinimumDuration( int ms );
private slots:
- void slotProgress( const QString & what, int current, int total );
+ void slotProgress( const TQString & what, int current, int total );
void slotDone();
private:
- QString mBaseText;
+ TQString mBaseText;
};
}
diff --git a/certmanager/main.cpp b/certmanager/main.cpp
index 37545502d..a77788d58 100644
--- a/certmanager/main.cpp
+++ b/certmanager/main.cpp
@@ -74,8 +74,8 @@ int main( int argc, char** argv )
}
CertManager* manager = new CertManager( args->isSet("external"),
- QString::fromLocal8Bit(args->getOption("query")),
- QString::fromLocal8Bit(args->getOption("import-certificate")) );
+ TQString::fromLocal8Bit(args->getOption("query")),
+ TQString::fromLocal8Bit(args->getOption("import-certificate")) );
args->clear();
manager->show();
diff --git a/certmanager/storedtransferjob.cpp b/certmanager/storedtransferjob.cpp
index 589acd702..1aa995e8f 100644
--- a/certmanager/storedtransferjob.cpp
+++ b/certmanager/storedtransferjob.cpp
@@ -21,39 +21,39 @@
using namespace KIOext;
-#define KIO_ARGS QByteArray packedArgs; QDataStream stream( packedArgs, IO_WriteOnly ); stream
+#define KIO_ARGS TQByteArray packedArgs; TQDataStream stream( packedArgs, IO_WriteOnly ); stream
StoredTransferJob::StoredTransferJob(const KURL& url, int command,
- const QByteArray &packedArgs,
- const QByteArray &_staticData,
+ const TQByteArray &packedArgs,
+ const TQByteArray &_staticData,
bool showProgressInfo)
: KIO::TransferJob( url, command, packedArgs, _staticData, showProgressInfo ),
m_uploadOffset( 0 )
{
- connect( this, SIGNAL( data( KIO::Job *, const QByteArray & ) ),
- SLOT( slotData( KIO::Job *, const QByteArray & ) ) );
- connect( this, SIGNAL( dataReq( KIO::Job *, QByteArray & ) ),
- SLOT( slotDataReq( KIO::Job *, QByteArray & ) ) );
+ connect( this, TQT_SIGNAL( data( KIO::Job *, const TQByteArray & ) ),
+ TQT_SLOT( slotData( KIO::Job *, const TQByteArray & ) ) );
+ connect( this, TQT_SIGNAL( dataReq( KIO::Job *, TQByteArray & ) ),
+ TQT_SLOT( slotDataReq( 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::slotData( KIO::Job *, const QByteArray &data )
+void StoredTransferJob::slotData( 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::slotDataReq( KIO::Job *, QByteArray &data )
+void StoredTransferJob::slotDataReq( KIO::Job *, TQByteArray &data )
{
// Inspired from kmail's KMKernel::byteArrayToRemoteFile
// send the data in 64 KB chunks
@@ -68,7 +68,7 @@ void StoredTransferJob::slotDataReq( 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";
}
@@ -80,17 +80,17 @@ StoredTransferJob *KIOext::storedGet( const KURL& url, bool reload, bool showPro
{
// Send decoded path and encoded query
KIO_ARGS << url;
- StoredTransferJob * job = new StoredTransferJob( url, KIO::CMD_GET, packedArgs, QByteArray(), showProgressInfo );
+ StoredTransferJob * job = new StoredTransferJob( url, KIO::CMD_GET, packedArgs, TQByteArray(), showProgressInfo );
if (reload)
job->addMetaData("cache", "reload");
return job;
}
-StoredTransferJob *KIOext::put( const QByteArray& arr, const KURL& url, int permissions,
+StoredTransferJob *KIOext::put( 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, KIO::CMD_PUT, packedArgs, QByteArray(), showProgressInfo );
+ StoredTransferJob * job = new StoredTransferJob( url, KIO::CMD_PUT, packedArgs, TQByteArray(), showProgressInfo );
job->setData( arr );
return job;
}
diff --git a/certmanager/storedtransferjob.h b/certmanager/storedtransferjob.h
index 85b591c6b..acc976427 100644
--- a/certmanager/storedtransferjob.h
+++ b/certmanager/storedtransferjob.h
@@ -27,21 +27,21 @@ namespace KIOext {
/**
* 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::get it puts the data into the member QByteArray, so the user
+ * For KIO::get 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::put 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.
*
*/
class StoredTransferJob : public KIO::TransferJob {
@@ -58,32 +58,32 @@ public:
* @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 KIOext::put(const QByteArray &, ...), do not call this yourself.
+ * Automatically called by KIOext::put(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 slotData( KIO::Job *job, const QByteArray &data );
- void slotDataReq( KIO::Job *job, QByteArray &data );
+ void slotData( KIO::Job *job, const TQByteArray &data );
+ void slotDataReq( KIO::Job *job, TQByteArray &data );
private:
- QByteArray m_data;
+ TQByteArray m_data;
int m_uploadOffset;
};
/**
- * 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
@@ -94,7 +94,7 @@ private:
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 url Where to write data.
@@ -105,7 +105,7 @@ private:
* @return the job handling the operation.
* @see multi_get()
*/
- StoredTransferJob *put( const QByteArray& arr, const KURL& url, int permissions,
+ StoredTransferJob *put( const TQByteArray& arr, const KURL& url, int permissions,
bool overwrite, bool resume, bool showProgressInfo = true );
} // namespace
diff --git a/kabc/frontend/main.cpp b/kabc/frontend/main.cpp
index 797c9198a..737ca55a1 100644
--- a/kabc/frontend/main.cpp
+++ b/kabc/frontend/main.cpp
@@ -15,6 +15,6 @@ int main( int argc, char ** argv )
MainWindow *w = new MainWindow;
w->show();
- app.connect( &app, SIGNAL( lastWindowClosed() ), &app, SLOT( quit() ) );
+ app.connect( &app, TQT_SIGNAL( lastWindowClosed() ), &app, TQT_SLOT( quit() ) );
return app.exec();
}
diff --git a/kabc/frontend/mainWindow.ui.h b/kabc/frontend/mainWindow.ui.h
index e6a024743..fb8377cbb 100644
--- a/kabc/frontend/mainWindow.ui.h
+++ b/kabc/frontend/mainWindow.ui.h
@@ -6,9 +6,9 @@
** a constructor, and a destroy() slot in place of a destructor.
*****************************************************************************/
-#include <qfiledialog.h>
+#include <tqfiledialog.h>
#include <kinputdialog.h>
-#include <qmessagebox.h>
+#include <tqmessagebox.h>
#include <klocale.h>
#include <kdebug.h>
@@ -20,8 +20,8 @@ using namespace KABC;
class AddresseeItem : public QListViewItem
{
public:
- AddresseeItem( QListView *parent, const Addressee &a ) :
- QListViewItem( parent, a.realName(), a.uid() ), mAddressee( a ) {}
+ AddresseeItem( TQListView *parent, const Addressee &a ) :
+ TQListViewItem( parent, a.realName(), a.uid() ), mAddressee( a ) {}
void setAddressee( const Addressee &a ) { mAddressee = a; }
Addressee &addressee() { return mAddressee; }
@@ -39,12 +39,12 @@ void MainWindow::init()
mEmailListView->header()->hide();
mCategoryListView->header()->hide();
- connect( mAddressBook, SIGNAL( addressBookChanged( AddressBook * ) ),
- SLOT( addressBookChanged() ) );
- connect( mAddressBook, SIGNAL( addressBookLocked( AddressBook * ) ),
- SLOT( addressBookLocked() ) );
- connect( mAddressBook, SIGNAL( addressBookUnlocked( AddressBook * ) ),
- SLOT( addressBookUnlocked() ) );
+ connect( mAddressBook, TQT_SIGNAL( addressBookChanged( AddressBook * ) ),
+ TQT_SLOT( addressBookChanged() ) );
+ connect( mAddressBook, TQT_SIGNAL( addressBookLocked( AddressBook * ) ),
+ TQT_SLOT( addressBookLocked() ) );
+ connect( mAddressBook, TQT_SIGNAL( addressBookUnlocked( AddressBook * ) ),
+ TQT_SLOT( addressBookUnlocked() ) );
}
void MainWindow::destroy()
@@ -61,18 +61,18 @@ void MainWindow::fileSave()
void MainWindow::fileOpen()
{
- QString fileName = QFileDialog::getOpenFileName();
+ TQString fileName = TQFileDialog::getOpenFileName();
loadAddressBook( fileName );
}
-void MainWindow::loadAddressBook( const QString &fileName )
+void MainWindow::loadAddressBook( const TQString &fileName )
{
kdDebug() << "loadAddressBook(): '" << fileName << "'" << endl;
mAddresseeList->clear();
mCurrentItem = 0;
- mCurrentAddress = QString::null;
+ mCurrentAddress = TQString::null;
readAddressee( Addressee() );
KABC::AddressBook::Iterator it;
@@ -81,7 +81,7 @@ void MainWindow::loadAddressBook( const QString &fileName )
}
}
-void MainWindow::updateAddressee( QListViewItem *item )
+void MainWindow::updateAddressee( TQListViewItem *item )
{
AddresseeItem *addresseeItem = dynamic_cast<AddresseeItem *>( item );
if ( !addresseeItem ) return;
@@ -122,31 +122,31 @@ void MainWindow::readAddressee( const KABC::Addressee &a )
// mLabelEdit->setText( a.label() );
mEmailListView->clear();
- QStringList emails = a.emails();
- QStringList::ConstIterator it3;
+ TQStringList emails = a.emails();
+ TQStringList::ConstIterator it3;
for( it3 = emails.begin(); it3 != emails.end(); ++it3 ) {
- new QListViewItem( mEmailListView, *it3 );
+ new TQListViewItem( mEmailListView, *it3 );
}
mCategoryListView->clear();
- QStringList categories = a.categories();
- QStringList::ConstIterator it4;
+ TQStringList categories = a.categories();
+ TQStringList::ConstIterator it4;
for( it4 = categories.begin(); it4 != categories.end(); ++it4 ) {
- new QListViewItem( mCategoryListView, *it4 );
+ new TQListViewItem( mCategoryListView, *it4 );
}
mCustomListView->clear();
- QStringList customs = a.customs();
- QStringList::ConstIterator it5;
+ TQStringList customs = a.customs();
+ TQStringList::ConstIterator it5;
for( it5 = customs.begin(); it5 != customs.end(); ++it5 ) {
int posDash = (*it5).find( "-" );
int posColon = (*it5).find( ":" );
- QString app = (*it5).left( posDash );
- QString cname = (*it5).mid( posDash + 1, posColon - posDash - 1 );
- QString value = (*it5).mid( posColon + 1 );
+ TQString app = (*it5).left( posDash );
+ TQString cname = (*it5).mid( posDash + 1, posColon - posDash - 1 );
+ TQString value = (*it5).mid( posColon + 1 );
- new QListViewItem( mCustomListView, app, cname, value );
+ new TQListViewItem( mCustomListView, app, cname, value );
}
Address::List addresses = a.addresses();
@@ -156,7 +156,7 @@ void MainWindow::readAddressee( const KABC::Addressee &a )
mAddressIdCombo->insertItem( (*it).id() );
}
if ( mAddressIdCombo->count() > 0 ) mCurrentAddress = mAddressIdCombo->currentText();
- else mCurrentAddress = QString::null;
+ else mCurrentAddress = TQString::null;
readAddress( mCurrentAddress );
mPhoneIdCombo->clear();
@@ -200,9 +200,9 @@ KABC::Addressee MainWindow::writeAddressee( const KABC::Addressee &addressee )
void MainWindow::newEntry()
{
bool ok = false;
- QString name = KInputDialog::getText( i18n("New Address Book Entry"),
+ TQString name = KInputDialog::getText( i18n("New Address Book Entry"),
i18n("Please enter name:"),
- QString::null, &ok,
+ TQString::null, &ok,
this );
if ( !ok || name.isEmpty() ) return;
@@ -232,7 +232,7 @@ void MainWindow::updateAddress( int id )
if ( mAddressIdCombo->count() > 0 ) {
mCurrentAddress = mAddressIdCombo->text( id );
} else {
- mCurrentAddress = QString::null;
+ mCurrentAddress = TQString::null;
}
readAddress( mCurrentAddress );
}
@@ -263,7 +263,7 @@ KABC::Address MainWindow::writeAddress( const KABC::Address &address )
return a;
}
-void MainWindow::writeAddress( const QString &id )
+void MainWindow::writeAddress( const TQString &id )
{
if ( !mCurrentItem ) return;
@@ -304,7 +304,7 @@ void MainWindow::readAddress( const KABC::Address &a )
else mAddressWorkCheck->setChecked( false );
}
-void MainWindow::readAddress( const QString &id )
+void MainWindow::readAddress( const TQString &id )
{
if ( !mCurrentItem || id.isEmpty() ) {
readAddress( Address() );
@@ -323,7 +323,7 @@ void MainWindow::updatePhone( int id )
if ( mPhoneIdCombo->count() > 0 ) {
mCurrentPhone = mPhoneIdCombo->text( id );
} else {
- mCurrentPhone = QString::null;
+ mCurrentPhone = TQString::null;
}
readPhone( mCurrentPhone );
}
@@ -354,7 +354,7 @@ KABC::PhoneNumber MainWindow::writePhone( const KABC::PhoneNumber &phoneNumber )
return p;
}
-void MainWindow::writePhone( const QString &id )
+void MainWindow::writePhone( const TQString &id )
{
if ( !mCurrentItem ) return;
@@ -402,7 +402,7 @@ void MainWindow::readPhone( const KABC::PhoneNumber &p )
else mPhonePagerCheck->setChecked( false );
}
-void MainWindow::readPhone( const QString &id )
+void MainWindow::readPhone( const TQString &id )
{
if ( !mCurrentItem || id.isEmpty() ) {
readPhone( PhoneNumber() );
@@ -428,7 +428,7 @@ void MainWindow::removeAddress()
{
if ( !mCurrentItem ) return;
- QString id = mAddressIdCombo->currentText();
+ TQString id = mAddressIdCombo->currentText();
if ( id.isEmpty() ) return;
Address address;
@@ -450,13 +450,13 @@ void MainWindow::newEmail()
if ( !mCurrentItem ) return;
bool ok = false;
- QString name = KInputDialog::getText( i18n("New Email Address"),
+ TQString name = KInputDialog::getText( i18n("New Email Address"),
i18n("Please enter email address:"),
- QString::null, &ok,
+ TQString::null, &ok,
this );
if ( !ok || name.isEmpty() ) return;
- new QListViewItem( mEmailListView, name );
+ new TQListViewItem( mEmailListView, name );
mCurrentItem->addressee().insertEmail( name );
}
@@ -464,13 +464,13 @@ void MainWindow::editEmail()
{
if ( !mCurrentItem ) return;
- QListViewItem *item = mEmailListView->selectedItem();
+ TQListViewItem *item = mEmailListView->selectedItem();
if( !item ) return;
- QString oldName = item->text( 0 );
+ TQString oldName = item->text( 0 );
bool ok = false;
- QString name = KInputDialog::getText( i18n("Edit Email Address"),
+ TQString name = KInputDialog::getText( i18n("Edit Email Address"),
i18n("Please enter new email address:"),
oldName, &ok,
this );
@@ -485,7 +485,7 @@ void MainWindow::removeEmail()
{
if ( !mCurrentItem ) return;
- QListViewItem *item = mEmailListView->selectedItem();
+ TQListViewItem *item = mEmailListView->selectedItem();
if( !item ) return;
mCurrentItem->addressee().removeEmail( item->text( 0 ) );
@@ -506,7 +506,7 @@ void MainWindow::removePhoneNumber()
{
if ( !mCurrentItem ) return;
- QString id = mPhoneIdCombo->currentText();
+ TQString id = mPhoneIdCombo->currentText();
if ( id.isEmpty() ) return;
PhoneNumber p;
@@ -522,13 +522,13 @@ void MainWindow::newCategory()
if ( !mCurrentItem ) return;
bool ok = false;
- QString name = KInputDialog::getText( i18n("New Category"),
+ TQString name = KInputDialog::getText( i18n("New Category"),
i18n("Please enter category name:"),
- QString::null, &ok,
+ TQString::null, &ok,
this );
if ( !ok || name.isEmpty() ) return;
- new QListViewItem( mCategoryListView, name );
+ new TQListViewItem( mCategoryListView, name );
mCurrentItem->addressee().insertCategory( name );
}
@@ -536,13 +536,13 @@ void MainWindow::editCategory()
{
if ( !mCurrentItem ) return;
- QListViewItem *item = mCategoryListView->selectedItem();
+ TQListViewItem *item = mCategoryListView->selectedItem();
if( !item ) return;
- QString oldName = item->text( 0 );
+ TQString oldName = item->text( 0 );
bool ok = false;
- QString name = KInputDialog::getText( i18n("Edit Category"),
+ TQString name = KInputDialog::getText( i18n("Edit Category"),
i18n("Please enter new category name:"),
oldName, &ok,
this );
@@ -557,7 +557,7 @@ void MainWindow::removeCategory()
{
if ( !mCurrentItem ) return;
- QListViewItem *item = mCategoryListView->selectedItem();
+ TQListViewItem *item = mCategoryListView->selectedItem();
if( !item ) return;
mCurrentItem->addressee().removeCategory( item->text( 0 ) );
@@ -569,14 +569,14 @@ void MainWindow::editCustom()
{
if ( !mCurrentItem ) return;
- QListViewItem *item = mCustomListView->selectedItem();
+ TQListViewItem *item = mCustomListView->selectedItem();
if( !item ) return;
- QString oldName = item->text( 0 ) + "-" + item->text( 1 ) + ":" +
+ TQString oldName = item->text( 0 ) + "-" + item->text( 1 ) + ":" +
item->text( 2 );
bool ok = false;
- QString name = KInputDialog::getText( i18n("New Custom Entry"),
+ TQString name = KInputDialog::getText( i18n("New Custom Entry"),
i18n("Please enter custom entry.\n"
"Format: APP-NAME:VALUE"),
oldName, &ok,
@@ -586,9 +586,9 @@ void MainWindow::editCustom()
int posDash = name.find( "-" );
int posColon = name.find( ":" );
- QString app = name.left( posDash );
- QString cname = name.mid( posDash + 1, posColon - posDash - 1 );
- QString value = name.mid( posColon + 1 );
+ TQString app = name.left( posDash );
+ TQString cname = name.mid( posDash + 1, posColon - posDash - 1 );
+ TQString value = name.mid( posColon + 1 );
item->setText( 0, app );
item->setText( 1, cname );
@@ -603,21 +603,21 @@ void MainWindow::newCustom()
if ( !mCurrentItem ) return;
bool ok = false;
- QString name = KInputDialog::getText( i18n("New Custom Entry"),
+ TQString name = KInputDialog::getText( i18n("New Custom Entry"),
i18n("Please enter custom entry.\n"
"Format: APP-NAME:VALUE"),
- QString::null, &ok,
+ TQString::null, &ok,
this );
if ( !ok || name.isEmpty() ) return;
int posDash = name.find( "-" );
int posColon = name.find( ":" );
- QString app = name.left( posDash );
- QString cname = name.mid( posDash + 1, posColon - posDash - 1 );
- QString value = name.mid( posColon + 1 );
+ TQString app = name.left( posDash );
+ TQString cname = name.mid( posDash + 1, posColon - posDash - 1 );
+ TQString value = name.mid( posColon + 1 );
- new QListViewItem( mCustomListView, app, cname, value );
+ new TQListViewItem( mCustomListView, app, cname, value );
mCurrentItem->addressee().insertCustom( app, cname, value );
}
@@ -626,7 +626,7 @@ void MainWindow::removeCustom()
{
if ( !mCurrentItem ) return;
- QListViewItem *item = mCustomListView->selectedItem();
+ TQListViewItem *item = mCustomListView->selectedItem();
if( !item ) return;
mCurrentItem->addressee().removeCustom( item->text( 0 ), item->text( 1 ) );
@@ -635,7 +635,7 @@ void MainWindow::removeCustom()
void MainWindow::addressBookChanged()
{
- QMessageBox::warning( this, i18n("Address Book Changed"),
+ TQMessageBox::warning( this, i18n("Address Book Changed"),
i18n("The address book has changed on disk."),
i18n("Reload") );
loadAddressBook( "dummy" );
diff --git a/kabc/kabc2mutt/kabc2mutt.cpp b/kabc/kabc2mutt/kabc2mutt.cpp
index 84f4626bb..96cf79232 100644
--- a/kabc/kabc2mutt/kabc2mutt.cpp
+++ b/kabc/kabc2mutt/kabc2mutt.cpp
@@ -21,16 +21,16 @@
#include <kapplication.h>
#include <klocale.h>
-#include <qregexp.h>
+#include <tqregexp.h>
#include <iostream>
#include "kabc2mutt.h"
-static std::ostream & operator<< ( std::ostream &os, const QString &s );
+static std::ostream & operator<< ( std::ostream &os, const TQString &s );
-KABC2Mutt::KABC2Mutt( QObject *parent, const char *name )
- : QObject( parent, name ), mFormat( Aliases ),
+KABC2Mutt::KABC2Mutt( TQObject *parent, const char *name )
+ : TQObject( parent, name ), mFormat( Aliases ),
mIgnoreCase( false ), mAllAddresses( false ),
mAlternateKeyFormat( false ),
mAddressBook( 0 )
@@ -42,8 +42,8 @@ void KABC2Mutt::run()
mAddressBook = KABC::StdAddressBook::self( true );
KABC::StdAddressBook::setAutomaticSave( false );
- connect( mAddressBook, SIGNAL( addressBookChanged( AddressBook* ) ),
- this, SLOT( loadingFinished() ) );
+ connect( mAddressBook, TQT_SIGNAL( addressBookChanged( AddressBook* ) ),
+ this, TQT_SLOT( loadingFinished() ) );
}
void KABC2Mutt::loadingFinished()
@@ -51,7 +51,7 @@ void KABC2Mutt::loadingFinished()
// print addressees
KABC::AddressBook::ConstIterator iaddr;
for ( iaddr = mAddressBook->begin(); iaddr != mAddressBook->end(); ++iaddr ) {
- const QString name = (*iaddr).givenName() + ' ' + (*iaddr).familyName();
+ const TQString name = (*iaddr).givenName() + ' ' + (*iaddr).familyName();
if ( !mQuery.isEmpty() ) {
bool match = (name.find(mQuery, 0, mIgnoreCase) > -1) ||
((*iaddr).preferredEmail().find( mQuery, 0, mIgnoreCase ) > -1 );
@@ -59,8 +59,8 @@ void KABC2Mutt::loadingFinished()
continue;
}
- const QStringList &allAddresses = (*iaddr).emails();
- QStringList::const_iterator from, to;
+ const TQStringList &allAddresses = (*iaddr).emails();
+ TQStringList::const_iterator from, to;
bool multiple = false;
if ( mAllAddresses ) {
@@ -77,10 +77,10 @@ void KABC2Mutt::loadingFinished()
size_t index = 0;
if ( mFormat == Aliases ) {
- static const QChar space = QChar( ' ' );
- static const QChar underscore = QChar( '_' );
+ static const TQChar space = TQChar( ' ' );
+ static const TQChar underscore = TQChar( '_' );
- QString key;
+ TQString key;
if ( !mAlternateKeyFormat )
key = (*iaddr).givenName().left( 3 ) + (*iaddr).familyName().left( 3 );
else
@@ -125,8 +125,8 @@ void KABC2Mutt::loadingFinished()
KABC::DistributionListManager manager( mAddressBook );
manager.load();
- QStringList dists = manager.listNames();
- for ( QStringList::Iterator iaddr = dists.begin(); iaddr != dists.end(); ++iaddr ) {
+ TQStringList dists = manager.listNames();
+ for ( TQStringList::Iterator iaddr = dists.begin(); iaddr != dists.end(); ++iaddr ) {
KABC::DistributionList *list = manager.list( *iaddr );
if ( list ) {
if ( !mQuery.isEmpty() ) {
@@ -135,12 +135,12 @@ void KABC2Mutt::loadingFinished()
continue;
}
- QStringList emails = list->emails();
+ TQStringList emails = list->emails();
if ( emails.isEmpty() )
continue;
if ( mFormat == Aliases ) {
- std::cout << "alias " << (*iaddr).replace( QRegExp( " " ), "_" )
+ std::cout << "alias " << (*iaddr).replace( TQRegExp( " " ), "_" )
<< '\t' << emails.join( "," ) << std::endl;
} else {
std::cout << emails.join( "," ) << '\t' << (*iaddr) << '\t' << std::endl;
@@ -151,7 +151,7 @@ void KABC2Mutt::loadingFinished()
kapp->quit();
}
-static std::ostream & operator<< ( std::ostream &os, const QString &s )
+static std::ostream & operator<< ( std::ostream &os, const TQString &s )
{
os << s.local8Bit().data();
return os;
diff --git a/kabc/kabc2mutt/kabc2mutt.h b/kabc/kabc2mutt/kabc2mutt.h
index 65f4d06f4..ebe4f53fd 100644
--- a/kabc/kabc2mutt/kabc2mutt.h
+++ b/kabc/kabc2mutt/kabc2mutt.h
@@ -30,9 +30,9 @@ class KABC2Mutt : public QObject
enum Format { Aliases, Query };
- KABC2Mutt( QObject *parent, const char *name = 0 );
+ KABC2Mutt( TQObject *parent, const char *name = 0 );
- void setQuery( const QString &query ) { mQuery = query; }
+ void setQuery( const TQString &query ) { mQuery = query; }
void setFormat( Format format ) { mFormat = format; }
void setIgnoreCase( bool ignoreCase ) { mIgnoreCase = ignoreCase; }
void setAllAddresses( bool allAddresses ) { mAllAddresses = allAddresses; }
@@ -44,7 +44,7 @@ class KABC2Mutt : public QObject
void loadingFinished();
private:
- QString mQuery;
+ TQString mQuery;
Format mFormat;
bool mIgnoreCase;
bool mAllAddresses;
diff --git a/kabc/kabc2mutt/main.cpp b/kabc/kabc2mutt/main.cpp
index 8da8f5491..9ca34586d 100644
--- a/kabc/kabc2mutt/main.cpp
+++ b/kabc/kabc2mutt/main.cpp
@@ -63,7 +63,7 @@ int main( int argc, char **argv )
object->setAllAddresses( args->isSet( "all-addresses" ) );
// Handle --query option
- const QString subString = QString::fromLocal8Bit( args->getOption( "query" ) );
+ const TQString subString = TQString::fromLocal8Bit( args->getOption( "query" ) );
if ( !subString.isEmpty() ) {
// Mutt wants a first line with some status message on it
// See http://mutt.org/doc/manual/manual-4.html#ss4.5
diff --git a/kabc/kabcdistlistupdater/kabcdistlistupdater.cpp b/kabc/kabcdistlistupdater/kabcdistlistupdater.cpp
index 012ce4d15..d7a54a731 100644
--- a/kabc/kabcdistlistupdater/kabcdistlistupdater.cpp
+++ b/kabc/kabcdistlistupdater/kabcdistlistupdater.cpp
@@ -39,15 +39,15 @@ static const KCmdLineOptions options[] =
void convertDistributionLists()
{
KSimpleConfig cfg( locateLocal( "data", "kabc/distlists" ) );
- const QMap<QString, QString> entryMap = cfg.entryMap( "DistributionLists" );
+ const TQMap<TQString, TQString> entryMap = cfg.entryMap( "DistributionLists" );
if ( entryMap.isEmpty() ) // nothing to convert
return;
- QMapConstIterator<QString, QString> it;
+ TQMapConstIterator<TQString, TQString> it;
for ( it = entryMap.begin(); it != entryMap.end(); ++it ) {
- const QString listName = it.key();
- const QStringList entries = QStringList::split( ',', it.data(), true );
+ const TQString listName = it.key();
+ const TQStringList entries = TQStringList::split( ',', it.data(), true );
KPIM::DistributionList distList;
distList.setUid( KApplication::randomString( 10 ) );
@@ -55,8 +55,8 @@ void convertDistributionLists()
if ( entries.count() > 1 ) {
for ( uint i = 0; i < entries.count(); i += 2 ) {
- const QString uid = entries[ i ];
- const QString preferredEMail = entries[ i + 1 ];
+ const TQString uid = entries[ i ];
+ const TQString preferredEMail = entries[ i + 1 ];
distList.insertEntry( uid, preferredEMail );
}
diff --git a/kaddressbook/addresseditwidget.cpp b/kaddressbook/addresseditwidget.cpp
index 54171c34e..26924ef8f 100644
--- a/kaddressbook/addresseditwidget.cpp
+++ b/kaddressbook/addresseditwidget.cpp
@@ -22,19 +22,19 @@
without including the source code for Qt in the source distribution.
*/
-#include <qbuttongroup.h>
-#include <qcheckbox.h>
-#include <qhbox.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qlistbox.h>
-#include <qlistview.h>
-#include <qpushbutton.h>
-#include <qsignal.h>
-#include <qstring.h>
-#include <qtextedit.h>
-#include <qtoolbutton.h>
-#include <qtooltip.h>
+#include <tqbuttongroup.h>
+#include <tqcheckbox.h>
+#include <tqhbox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqlistbox.h>
+#include <tqlistview.h>
+#include <tqpushbutton.h>
+#include <tqsignal.h>
+#include <tqstring.h>
+#include <tqtextedit.h>
+#include <tqtoolbutton.h>
+#include <tqtooltip.h>
#include <kaccelmanager.h>
#include <kactivelabel.h>
@@ -57,18 +57,18 @@
class TabPressEater : public QObject
{
public:
- TabPressEater( QObject *parent )
- : QObject( parent, "TabPressEater" )
+ TabPressEater( TQObject *parent )
+ : TQObject( parent, "TabPressEater" )
{
}
protected:
- bool eventFilter( QObject*, QEvent *event )
+ bool eventFilter( TQObject*, TQEvent *event )
{
- if ( event->type() == QEvent::KeyPress ) {
- QKeyEvent *keyEvent = (QKeyEvent*)event;
+ if ( event->type() == TQEvent::KeyPress ) {
+ TQKeyEvent *keyEvent = (TQKeyEvent*)event;
if ( keyEvent->key() == Qt::Key_Tab ) {
- QApplication::sendEvent( parent(), event );
+ TQApplication::sendEvent( parent(), event );
return true;
} else
return false;
@@ -79,26 +79,26 @@ class TabPressEater : public QObject
};
-AddressEditWidget::AddressEditWidget( QWidget *parent, const char *name )
- : QWidget( parent, name )
+AddressEditWidget::AddressEditWidget( TQWidget *parent, const char *name )
+ : TQWidget( parent, name )
{
- QBoxLayout *layout = new QVBoxLayout( this, 4, 2 );
+ TQBoxLayout *layout = new TQVBoxLayout( this, 4, 2 );
layout->setSpacing( KDialog::spacingHint() );
mTypeCombo = new AddressTypeCombo( mAddressList, this );
- connect( mTypeCombo, SIGNAL( activated( int ) ),
- SLOT( updateAddressEdit() ) );
+ connect( mTypeCombo, TQT_SIGNAL( activated( int ) ),
+ TQT_SLOT( updateAddressEdit() ) );
layout->addWidget( mTypeCombo );
mAddressField = new KActiveLabel( this );
- mAddressField->setFrameStyle( QFrame::Panel | QFrame::Sunken );
+ mAddressField->setFrameStyle( TQFrame::Panel | TQFrame::Sunken );
mAddressField->setMinimumHeight( 20 );
mAddressField->setAlignment( Qt::AlignTop );
mAddressField->setTextFormat( Qt::PlainText );
layout->addWidget( mAddressField );
- mEditButton = new QPushButton( i18n( "street/postal", "&Edit Addresses..." ), this );
- connect( mEditButton, SIGNAL( clicked() ), this, SLOT( edit() ) );
+ mEditButton = new TQPushButton( i18n( "street/postal", "&Edit Addresses..." ), this );
+ connect( mEditButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( edit() ) );
layout->addWidget( mEditButton );
}
@@ -134,13 +134,13 @@ void AddressEditWidget::setAddresses( const KABC::Addressee &addr,
// Insert types for existing numbers.
mTypeCombo->insertTypeList( list );
- QValueList<int> defaultTypes;
+ TQValueList<int> defaultTypes;
defaultTypes << KABC::Address::Home;
defaultTypes << KABC::Address::Work;
AddresseeConfig config( mAddressee );
- const QValueList<int> configList = config.noDefaultAddrTypes();
- QValueList<int>::ConstIterator it;
+ const TQValueList<int> configList = config.noDefaultAddrTypes();
+ TQValueList<int>::ConstIterator it;
for ( it = configList.begin(); it != configList.end(); ++it )
defaultTypes.remove( *it );
@@ -195,7 +195,7 @@ void AddressEditWidget::edit()
}
AddresseeConfig config( mAddressee );
- QValueList<int> configList;
+ TQValueList<int> configList;
if ( !hasHome )
configList << KABC::Address::Home;
if ( !hasWork )
@@ -229,17 +229,17 @@ void AddressEditWidget::updateAddressEdit()
mAddressField->setText( a.formattedAddress( mAddressee.realName() ) );
}
#else
- QString text;
+ TQString text;
if ( !a.street().isEmpty() )
text += a.street() + "\n";
if ( !a.postOfficeBox().isEmpty() )
text += a.postOfficeBox() + "\n";
- text += a.locality() + QString(" ") + a.region();
+ text += a.locality() + TQString(" ") + a.region();
if ( !a.postalCode().isEmpty() )
- text += QString(", ") + a.postalCode();
+ text += TQString(", ") + a.postalCode();
text += "\n";
@@ -257,7 +257,7 @@ void AddressEditWidget::updateAddressEdit()
}
AddressEditDialog::AddressEditDialog( const KABC::Address::List &list,
- int selected, QWidget *parent,
+ int selected, TQWidget *parent,
const char *name )
: KDialogBase( Plain, i18n( "street/postal", "Edit Address" ), Ok | Cancel, Ok,
parent, name, true, true ),
@@ -265,18 +265,18 @@ AddressEditDialog::AddressEditDialog( const KABC::Address::List &list,
{
mAddressList = list;
- QWidget *page = plainPage();
+ TQWidget *page = plainPage();
- QGridLayout *topLayout = new QGridLayout( page, 8, 2 );
+ TQGridLayout *topLayout = new TQGridLayout( page, 8, 2 );
topLayout->setSpacing( spacingHint() );
mTypeCombo = new AddressTypeCombo( mAddressList, page );
topLayout->addMultiCellWidget( mTypeCombo, 0, 0, 0, 1 );
- QLabel *label = new QLabel( i18n( "<streetLabel>:", "%1:" ).arg( KABC::Address::streetLabel() ), page );
+ TQLabel *label = new TQLabel( i18n( "<streetLabel>:", "%1:" ).arg( KABC::Address::streetLabel() ), page );
label->setAlignment( Qt::AlignTop | Qt::AlignLeft );
topLayout->addWidget( label, 1, 0 );
- mStreetTextEdit = new QTextEdit( page );
+ mStreetTextEdit = new TQTextEdit( page );
mStreetTextEdit->setTextFormat( Qt::PlainText );
label->setBuddy( mStreetTextEdit );
topLayout->addWidget( mStreetTextEdit, 1, 1 );
@@ -284,79 +284,79 @@ AddressEditDialog::AddressEditDialog( const KABC::Address::List &list,
TabPressEater *eater = new TabPressEater( this );
mStreetTextEdit->installEventFilter( eater );
- label = new QLabel( i18n( "<postOfficeBoxLabel>:", "%1:" ).arg( KABC::Address::postOfficeBoxLabel() ), page );
+ label = new TQLabel( i18n( "<postOfficeBoxLabel>:", "%1:" ).arg( KABC::Address::postOfficeBoxLabel() ), page );
topLayout->addWidget( label, 2 , 0 );
mPOBoxEdit = new KLineEdit( page );
label->setBuddy( mPOBoxEdit );
topLayout->addWidget( mPOBoxEdit, 2, 1 );
- label = new QLabel( i18n( "<localityLabel>:", "%1:" ).arg( KABC::Address::localityLabel() ), page );
+ label = new TQLabel( i18n( "<localityLabel>:", "%1:" ).arg( KABC::Address::localityLabel() ), page );
topLayout->addWidget( label, 3, 0 );
mLocalityEdit = new KLineEdit( page );
label->setBuddy( mLocalityEdit );
topLayout->addWidget( mLocalityEdit, 3, 1 );
- label = new QLabel( i18n( "<regionLabel>:", "%1:" ).arg( KABC::Address::regionLabel() ), page );
+ label = new TQLabel( i18n( "<regionLabel>:", "%1:" ).arg( KABC::Address::regionLabel() ), page );
topLayout->addWidget( label, 4, 0 );
mRegionEdit = new KLineEdit( page );
label->setBuddy( mRegionEdit );
topLayout->addWidget( mRegionEdit, 4, 1 );
- label = new QLabel( i18n( "<postalCodeLabel>:", "%1:" ).arg( KABC::Address::postalCodeLabel() ), page );
+ label = new TQLabel( i18n( "<postalCodeLabel>:", "%1:" ).arg( KABC::Address::postalCodeLabel() ), page );
topLayout->addWidget( label, 5, 0 );
mPostalCodeEdit = new KLineEdit( page );
label->setBuddy( mPostalCodeEdit );
topLayout->addWidget( mPostalCodeEdit, 5, 1 );
- label = new QLabel( i18n( "<countryLabel>:", "%1:" ).arg( KABC::Address::countryLabel() ), page );
+ label = new TQLabel( i18n( "<countryLabel>:", "%1:" ).arg( KABC::Address::countryLabel() ), page );
topLayout->addWidget( label, 6, 0 );
mCountryCombo = new KComboBox( page );
mCountryCombo->setEditable( true );
mCountryCombo->setDuplicatesEnabled( false );
#if KDE_IS_VERSION(3,3,0)
- QPushButton *labelButton = new QPushButton( i18n( "Edit Label..." ), page );
+ TQPushButton *labelButton = new TQPushButton( i18n( "Edit Label..." ), page );
topLayout->addMultiCellWidget( labelButton, 7, 7, 0, 1 );
- connect( labelButton, SIGNAL( clicked() ), SLOT( editLabel() ) );
+ connect( labelButton, TQT_SIGNAL( clicked() ), TQT_SLOT( editLabel() ) );
#endif
fillCountryCombo();
label->setBuddy( mCountryCombo );
topLayout->addWidget( mCountryCombo, 6, 1 );
- mPreferredCheckBox = new QCheckBox( i18n( "street/postal", "This is the preferred address" ), page );
+ mPreferredCheckBox = new TQCheckBox( i18n( "street/postal", "This is the preferred address" ), page );
topLayout->addMultiCellWidget( mPreferredCheckBox, 8, 8, 0, 1 );
KSeparator *sep = new KSeparator( KSeparator::HLine, page );
topLayout->addMultiCellWidget( sep, 9, 9, 0, 1 );
- QHBox *buttonBox = new QHBox( page );
+ TQHBox *buttonBox = new TQHBox( page );
buttonBox->setSpacing( spacingHint() );
topLayout->addMultiCellWidget( buttonBox, 10, 10, 0, 1 );
- QPushButton *addButton = new QPushButton( i18n( "New..." ), buttonBox );
- connect( addButton, SIGNAL( clicked() ), SLOT( addAddress() ) );
+ TQPushButton *addButton = new TQPushButton( i18n( "New..." ), buttonBox );
+ connect( addButton, TQT_SIGNAL( clicked() ), TQT_SLOT( addAddress() ) );
- mRemoveButton = new QPushButton( i18n( "Remove" ), buttonBox );
- connect( mRemoveButton, SIGNAL( clicked() ), SLOT( removeAddress() ) );
+ mRemoveButton = new TQPushButton( i18n( "Remove" ), buttonBox );
+ connect( mRemoveButton, TQT_SIGNAL( clicked() ), TQT_SLOT( removeAddress() ) );
- mChangeTypeButton = new QPushButton( i18n( "Change Type..." ), buttonBox );
- connect( mChangeTypeButton, SIGNAL( clicked() ), SLOT( changeType() ) );
+ mChangeTypeButton = new TQPushButton( i18n( "Change Type..." ), buttonBox );
+ connect( mChangeTypeButton, TQT_SIGNAL( clicked() ), TQT_SLOT( changeType() ) );
mTypeCombo->updateTypes();
mTypeCombo->setCurrentItem( selected );
updateAddressEdits();
- connect( mTypeCombo, SIGNAL( activated( int ) ),
- SLOT( updateAddressEdits() ) );
- connect( mStreetTextEdit, SIGNAL( textChanged() ), SLOT( modified() ) );
- connect( mPOBoxEdit, SIGNAL( textChanged( const QString& ) ), SLOT( modified() ) );
- connect( mLocalityEdit, SIGNAL( textChanged( const QString& ) ), SLOT( modified() ) );
- connect( mRegionEdit, SIGNAL( textChanged( const QString& ) ), SLOT( modified() ) );
- connect( mPostalCodeEdit, SIGNAL( textChanged( const QString& ) ), SLOT( modified() ) );
- connect( mCountryCombo, SIGNAL( textChanged( const QString& ) ), SLOT( modified() ) );
- connect( mPreferredCheckBox, SIGNAL( toggled( bool ) ), SLOT( modified() ) );
+ connect( mTypeCombo, TQT_SIGNAL( activated( int ) ),
+ TQT_SLOT( updateAddressEdits() ) );
+ connect( mStreetTextEdit, TQT_SIGNAL( textChanged() ), TQT_SLOT( modified() ) );
+ connect( mPOBoxEdit, TQT_SIGNAL( textChanged( const TQString& ) ), TQT_SLOT( modified() ) );
+ connect( mLocalityEdit, TQT_SIGNAL( textChanged( const TQString& ) ), TQT_SLOT( modified() ) );
+ connect( mRegionEdit, TQT_SIGNAL( textChanged( const TQString& ) ), TQT_SLOT( modified() ) );
+ connect( mPostalCodeEdit, TQT_SIGNAL( textChanged( const TQString& ) ), TQT_SLOT( modified() ) );
+ connect( mCountryCombo, TQT_SIGNAL( textChanged( const TQString& ) ), TQT_SLOT( modified() ) );
+ connect( mPreferredCheckBox, TQT_SIGNAL( toggled( bool ) ), TQT_SLOT( modified() ) );
KAcceleratorManager::manage( this );
@@ -437,7 +437,7 @@ void AddressEditDialog::editLabel()
{
#if KDE_IS_VERSION(3,3,0)
bool ok = false;
- QString result = KInputDialog::getMultiLineText( KABC::Address::labelLabel(),
+ TQString result = KInputDialog::getMultiLineText( KABC::Address::labelLabel(),
KABC::Address::labelLabel(),
mLabel, &ok, this );
if ( ok ) {
@@ -504,7 +504,7 @@ void AddressEditDialog::saveAddress( KABC::Address &addr )
void AddressEditDialog::fillCountryCombo()
{
- QString country[] = {
+ TQString country[] = {
i18n( "Afghanistan" ), i18n( "Albania" ), i18n( "Algeria" ),
i18n( "American Samoa" ), i18n( "Andorra" ), i18n( "Angola" ),
i18n( "Anguilla" ), i18n( "Antarctica" ), i18n( "Antigua and Barbuda" ),
@@ -587,7 +587,7 @@ void AddressEditDialog::fillCountryCombo()
""
};
- QStringList countries;
+ TQStringList countries;
for ( int i = 0; !country[ i ].isEmpty(); ++i )
countries.append( country[ i ] );
@@ -599,14 +599,14 @@ void AddressEditDialog::fillCountryCombo()
}
-AddressTypeDialog::AddressTypeDialog( int type, QWidget *parent )
+AddressTypeDialog::AddressTypeDialog( int type, TQWidget *parent )
: KDialogBase( Plain, i18n( "street/postal", "Edit Address Type" ), Ok | Cancel, Ok,
parent, "AddressTypeDialog" )
{
- QWidget *page = plainPage();
- QVBoxLayout *layout = new QVBoxLayout( page );
+ TQWidget *page = plainPage();
+ TQVBoxLayout *layout = new TQVBoxLayout( page );
- mGroup = new QButtonGroup( 2, Horizontal, i18n( "street/postal", "Address Types" ), page );
+ mGroup = new TQButtonGroup( 2, Horizontal, i18n( "street/postal", "Address Types" ), page );
layout->addWidget( mGroup );
mTypeList = KABC::Address::typeList();
@@ -614,10 +614,10 @@ AddressTypeDialog::AddressTypeDialog( int type, QWidget *parent )
KABC::Address::TypeList::ConstIterator it;
for ( it = mTypeList.begin(); it != mTypeList.end(); ++it )
- new QCheckBox( KABC::Address::typeLabel( *it ), mGroup );
+ new TQCheckBox( KABC::Address::typeLabel( *it ), mGroup );
for ( int i = 0; i < mGroup->count(); ++i ) {
- QCheckBox *box = (QCheckBox*)mGroup->find( i );
+ TQCheckBox *box = (TQCheckBox*)mGroup->find( i );
box->setChecked( type & mTypeList[ i ] );
}
}
@@ -630,7 +630,7 @@ int AddressTypeDialog::type() const
{
int type = 0;
for ( int i = 0; i < mGroup->count(); ++i ) {
- QCheckBox *box = (QCheckBox*)mGroup->find( i );
+ TQCheckBox *box = (TQCheckBox*)mGroup->find( i );
if ( box->isChecked() )
type += mTypeList[ i ];
}
@@ -645,30 +645,30 @@ int AddressTypeDialog::type() const
class LocaleAwareString : public QString
{
public:
- LocaleAwareString() : QString()
+ LocaleAwareString() : TQString()
{}
- LocaleAwareString( const QString &str ) : QString( str )
+ LocaleAwareString( const TQString &str ) : TQString( str )
{}
};
static bool operator<( const LocaleAwareString &s1, const LocaleAwareString &s2 )
{
- return ( QString::localeAwareCompare( s1, s2 ) < 0 );
+ return ( TQString::localeAwareCompare( s1, s2 ) < 0 );
}
-QStringList AddressEditDialog::sortLocaleAware( const QStringList &list )
+TQStringList AddressEditDialog::sortLocaleAware( const TQStringList &list )
{
- QValueList<LocaleAwareString> sortedList;
+ TQValueList<LocaleAwareString> sortedList;
- QStringList::ConstIterator it;
+ TQStringList::ConstIterator it;
for ( it = list.begin(); it != list.end(); ++it )
sortedList.append( LocaleAwareString( *it ) );
qHeapSort( sortedList );
- QStringList retval;
- QValueList<LocaleAwareString>::ConstIterator retIt;
+ TQStringList retval;
+ TQValueList<LocaleAwareString>::ConstIterator retIt;
for ( retIt = sortedList.begin(); retIt != sortedList.end(); ++retIt )
retval.append( *retIt );
diff --git a/kaddressbook/addresseditwidget.h b/kaddressbook/addresseditwidget.h
index cf7703156..8c02ee681 100644
--- a/kaddressbook/addresseditwidget.h
+++ b/kaddressbook/addresseditwidget.h
@@ -24,7 +24,7 @@
#ifndef ADDRESSEDITWIDGET_H
#define ADDRESSEDITWIDGET_H
-#include <qwidget.h>
+#include <tqwidget.h>
#include <kdialogbase.h>
#include <kabc/address.h>
@@ -54,7 +54,7 @@ class AddressEditWidget : public QWidget
Q_OBJECT
public:
- AddressEditWidget( QWidget *parent, const char *name = 0 );
+ AddressEditWidget( TQWidget *parent, const char *name = 0 );
~AddressEditWidget();
KABC::Address::List addresses();
@@ -78,7 +78,7 @@ class AddressEditWidget : public QWidget
private:
AddressTypeCombo *mTypeCombo;
- QPushButton *mEditButton;
+ TQPushButton *mEditButton;
KActiveLabel *mAddressField;
KABC::Address::List mAddressList;
@@ -95,7 +95,7 @@ class AddressEditDialog : public KDialogBase
public:
AddressEditDialog( const KABC::Address::List &list, int selected,
- QWidget *parent, const char *name = 0 );
+ TQWidget *parent, const char *name = 0 );
~AddressEditDialog();
KABC::Address::List addresses();
@@ -113,25 +113,25 @@ class AddressEditDialog : public KDialogBase
private:
void saveAddress( KABC::Address &addr );
void fillCountryCombo();
- QStringList sortLocaleAware( const QStringList& );
+ TQStringList sortLocaleAware( const TQStringList& );
AddressTypeCombo *mTypeCombo;
- QTextEdit *mStreetTextEdit;
+ TQTextEdit *mStreetTextEdit;
KComboBox *mCountryCombo;
KLineEdit *mRegionEdit;
KLineEdit *mLocalityEdit;
KLineEdit *mPostalCodeEdit;
KLineEdit *mPOBoxEdit;
- QCheckBox *mPreferredCheckBox;
+ TQCheckBox *mPreferredCheckBox;
- QPushButton *mRemoveButton;
- QPushButton *mChangeTypeButton;
+ TQPushButton *mRemoveButton;
+ TQPushButton *mChangeTypeButton;
KABC::Address::List mAddressList;
KABC::Address *mPreviousAddress;
bool mChanged;
- QString mLabel;
+ TQString mLabel;
};
/**
@@ -140,13 +140,13 @@ class AddressEditDialog : public KDialogBase
class AddressTypeDialog : public KDialogBase
{
public:
- AddressTypeDialog( int type, QWidget *parent );
+ AddressTypeDialog( int type, TQWidget *parent );
~AddressTypeDialog();
int type() const;
private:
- QButtonGroup *mGroup;
+ TQButtonGroup *mGroup;
KABC::Address::TypeList mTypeList;
};
diff --git a/kaddressbook/addresseeconfig.cpp b/kaddressbook/addresseeconfig.cpp
index 830127ebe..9d5f1cf9b 100644
--- a/kaddressbook/addresseeconfig.cpp
+++ b/kaddressbook/addresseeconfig.cpp
@@ -62,7 +62,7 @@ bool AddresseeConfig::automaticNameParsing()
KABPrefs::instance()->automaticNameParsing() );
}
-void AddresseeConfig::setNoDefaultAddrTypes( const QValueList<int> &types )
+void AddresseeConfig::setNoDefaultAddrTypes( const TQValueList<int> &types )
{
KConfig config( "kaddressbook_addrconfig" );
config.setGroup( mAddressee.uid() );
@@ -70,14 +70,14 @@ void AddresseeConfig::setNoDefaultAddrTypes( const QValueList<int> &types )
config.sync();
}
-QValueList<int> AddresseeConfig::noDefaultAddrTypes() const
+TQValueList<int> AddresseeConfig::noDefaultAddrTypes() const
{
KConfig config( "kaddressbook_addrconfig" );
config.setGroup( mAddressee.uid() );
return config.readIntListEntry( "NoDefaultAddrTypes" );
}
-void AddresseeConfig::setCustomFields( const QStringList &fields )
+void AddresseeConfig::setCustomFields( const TQStringList &fields )
{
KConfig config( "kaddressbook_addrconfig" );
config.setGroup( mAddressee.uid() );
@@ -85,7 +85,7 @@ void AddresseeConfig::setCustomFields( const QStringList &fields )
config.sync();
}
-QStringList AddresseeConfig::customFields() const
+TQStringList AddresseeConfig::customFields() const
{
KConfig config( "kaddressbook_addrconfig" );
config.setGroup( mAddressee.uid() );
diff --git a/kaddressbook/addresseeconfig.h b/kaddressbook/addresseeconfig.h
index 798d35e5a..b9d22589c 100644
--- a/kaddressbook/addresseeconfig.h
+++ b/kaddressbook/addresseeconfig.h
@@ -41,11 +41,11 @@ class AddresseeConfig
void setAutomaticNameParsing( bool value );
bool automaticNameParsing();
- void setNoDefaultAddrTypes( const QValueList<int> &types );
- QValueList<int> noDefaultAddrTypes() const;
+ void setNoDefaultAddrTypes( const TQValueList<int> &types );
+ TQValueList<int> noDefaultAddrTypes() const;
- void setCustomFields( const QStringList &fields );
- QStringList customFields() const;
+ void setCustomFields( const TQStringList &fields );
+ TQStringList customFields() const;
void remove();
diff --git a/kaddressbook/addresseeeditorbase.h b/kaddressbook/addresseeeditorbase.h
index 394223b13..25d5c1abe 100644
--- a/kaddressbook/addresseeeditorbase.h
+++ b/kaddressbook/addresseeeditorbase.h
@@ -26,15 +26,15 @@
#include <kabc/addressee.h>
-#include <qwidget.h>
+#include <tqwidget.h>
class AddresseeEditorBase : public QWidget
{
Q_OBJECT
public:
- AddresseeEditorBase( QWidget *parent, const char *name = 0 )
- : QWidget( parent, name )
+ AddresseeEditorBase( TQWidget *parent, const char *name = 0 )
+ : TQWidget( parent, name )
{
}
diff --git a/kaddressbook/addresseeeditordialog.cpp b/kaddressbook/addresseeeditordialog.cpp
index 8df8357a2..429d6b90e 100644
--- a/kaddressbook/addresseeeditordialog.cpp
+++ b/kaddressbook/addresseeeditordialog.cpp
@@ -21,8 +21,8 @@
without including the source code for Qt in the source distribution.
*/
-#include <qapplication.h>
-#include <qlayout.h>
+#include <tqapplication.h>
+#include <tqlayout.h>
#include <kdebug.h>
#include <klocale.h>
@@ -35,7 +35,7 @@
#include "addresseeeditordialog.h"
AddresseeEditorDialog::AddresseeEditorDialog( KAB::Core *core,
- QWidget *parent, const char *name )
+ TQWidget *parent, const char *name )
: KDialogBase( KDialogBase::Plain, i18n( "Edit Contact" ),
KDialogBase::Ok | KDialogBase::Cancel | KDialogBase::Apply,
KDialogBase::Ok, parent, name, false )
@@ -46,23 +46,23 @@ AddresseeEditorDialog::AddresseeEditorDialog( KAB::Core *core,
kdDebug(5720) << "AddresseeEditorDialog()" << endl;
- QWidget *page = plainPage();
+ TQWidget *page = plainPage();
- QVBoxLayout *layout = new QVBoxLayout( page );
+ TQVBoxLayout *layout = new TQVBoxLayout( page );
if ( KABPrefs::instance()->editorType() == KABPrefs::SimpleEditor ) {
mEditorWidget = new SimpleAddresseeEditor( page );
} else {
mEditorWidget = new AddresseeEditorWidget( page );
}
- connect( mEditorWidget, SIGNAL( modified() ), SLOT( widgetModified() ) );
+ connect( mEditorWidget, TQT_SIGNAL( modified() ), TQT_SLOT( widgetModified() ) );
layout->addWidget( mEditorWidget );
enableButton( KDialogBase::Apply, false );
KConfig config( "kaddressbookrc" );
config.setGroup( "AddresseeEditor" );
- QSize defaultSize( 750, 570 );
+ TQSize defaultSize( 750, 570 );
resize( config.readSizeEntry( "Size", &defaultSize ) );
}
@@ -103,10 +103,10 @@ void AddresseeEditorDialog::slotApply()
return;
if ( mEditorWidget->dirty() ) {
- QApplication::setOverrideCursor( Qt::waitCursor );
+ TQApplication::setOverrideCursor( Qt::waitCursor );
mEditorWidget->save();
emit contactModified( mEditorWidget->addressee() );
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
}
enableButton( KDialogBase::Apply, false );
diff --git a/kaddressbook/addresseeeditordialog.h b/kaddressbook/addresseeeditordialog.h
index 889dd655f..5427a588d 100644
--- a/kaddressbook/addresseeeditordialog.h
+++ b/kaddressbook/addresseeeditordialog.h
@@ -38,7 +38,7 @@ class AddresseeEditorDialog : public KDialogBase
public:
AddresseeEditorDialog( KAB::Core *core,
- QWidget *parent, const char *name = 0 );
+ TQWidget *parent, const char *name = 0 );
~AddresseeEditorDialog();
void setAddressee( const KABC::Addressee& );
@@ -48,7 +48,7 @@ class AddresseeEditorDialog : public KDialogBase
signals:
void contactModified( const KABC::Addressee& );
- void editorDestroyed( const QString& );
+ void editorDestroyed( const TQString& );
protected slots:
virtual void slotApply();
diff --git a/kaddressbook/addresseeeditorextension.cpp b/kaddressbook/addresseeeditorextension.cpp
index b98260a7e..3f7fc175e 100644
--- a/kaddressbook/addresseeeditorextension.cpp
+++ b/kaddressbook/addresseeeditorextension.cpp
@@ -21,7 +21,7 @@
without including the source code for Qt in the source distribution.
*/
-#include <qlayout.h>
+#include <tqlayout.h>
#include <klocale.h>
@@ -32,10 +32,10 @@
#include "addresseeeditorextension.h"
-AddresseeEditorExtension::AddresseeEditorExtension( KAB::Core *core, QWidget *parent, const char *name )
+AddresseeEditorExtension::AddresseeEditorExtension( KAB::Core *core, TQWidget *parent, const char *name )
: KAB::ExtensionWidget( core, parent, name )
{
- QVBoxLayout *layout = new QVBoxLayout( this );
+ TQVBoxLayout *layout = new TQVBoxLayout( this );
if ( KABPrefs::instance()->editorType() == KABPrefs::SimpleEditor )
mAddresseeEditor = new SimpleAddresseeEditor( this );
@@ -63,12 +63,12 @@ void AddresseeEditorExtension::contactsSelectionChanged()
mAddresseeEditor->setAddressee( selectedAddressees[ 0 ] );
}
-QString AddresseeEditorExtension::title() const
+TQString AddresseeEditorExtension::title() const
{
return i18n( "Contact Editor" );
}
-QString AddresseeEditorExtension::identifier() const
+TQString AddresseeEditorExtension::identifier() const
{
return "contact_editor";
}
diff --git a/kaddressbook/addresseeeditorextension.h b/kaddressbook/addresseeeditorextension.h
index 3eab5c134..ff4e3d657 100644
--- a/kaddressbook/addresseeeditorextension.h
+++ b/kaddressbook/addresseeeditorextension.h
@@ -32,7 +32,7 @@ class AddresseeEditorExtension : public KAB::ExtensionWidget
Q_OBJECT
public:
- AddresseeEditorExtension( KAB::Core *core, QWidget *parent, const char *name = 0 );
+ AddresseeEditorExtension( KAB::Core *core, TQWidget *parent, const char *name = 0 );
~AddresseeEditorExtension();
/**
@@ -44,12 +44,12 @@ class AddresseeEditorExtension : public KAB::ExtensionWidget
This method should be reimplemented and return the i18ned title of this
widget.
*/
- virtual QString title() const;
+ virtual TQString title() const;
/**
This method should be reimplemented and return a unique identifier.
*/
- virtual QString identifier() const;
+ virtual TQString identifier() const;
private:
AddresseeEditorBase *mAddresseeEditor;
diff --git a/kaddressbook/addresseeeditorwidget.cpp b/kaddressbook/addresseeeditorwidget.cpp
index 253c3b45b..631d1a3ac 100644
--- a/kaddressbook/addresseeeditorwidget.cpp
+++ b/kaddressbook/addresseeeditorwidget.cpp
@@ -21,16 +21,16 @@
without including the source code for Qt in the source distribution.
*/
-#include <qcheckbox.h>
-#include <qhbox.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qlistbox.h>
-#include <qpushbutton.h>
-#include <qtabwidget.h>
-#include <qtextedit.h>
-#include <qtoolbutton.h>
-#include <qtooltip.h>
+#include <tqcheckbox.h>
+#include <tqhbox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqlistbox.h>
+#include <tqpushbutton.h>
+#include <tqtabwidget.h>
+#include <tqtextedit.h>
+#include <tqtoolbutton.h>
+#include <tqtooltip.h>
#include <kabc/resource.h>
#include <kabc/stdaddressbook.h>
@@ -67,7 +67,7 @@
#include "addresseeeditorwidget.h"
-AddresseeEditorWidget::AddresseeEditorWidget( QWidget *parent, const char *name )
+AddresseeEditorWidget::AddresseeEditorWidget( TQWidget *parent, const char *name )
: AddresseeEditorBase( parent, name ),
mBlockSignals( false ), mReadOnly( false )
{
@@ -103,7 +103,7 @@ void AddresseeEditorWidget::setAddressee( const KABC::Addressee &addr )
} else if ( res->inherits( "KPIM::ResourceABC" ) ) {
KPIM::ResourceABC *resAbc = static_cast<KPIM::ResourceABC *>( res );
- QString subresource = resAbc->uidToResourceMap()[ addr.uid() ];
+ TQString subresource = resAbc->uidToResourceMap()[ addr.uid() ];
if ( !subresource.isEmpty() )
readOnly |= !resAbc->subresourceWritable( subresource );
}
@@ -118,16 +118,16 @@ const KABC::Addressee &AddresseeEditorWidget::addressee()
return mAddressee;
}
-void AddresseeEditorWidget::textChanged( const QString& )
+void AddresseeEditorWidget::textChanged( const TQString& )
{
emitModified();
}
void AddresseeEditorWidget::initGUI()
{
- QVBoxLayout *layout = new QVBoxLayout( this );
+ TQVBoxLayout *layout = new TQVBoxLayout( this );
- mTabWidget = new QTabWidget( this );
+ mTabWidget = new TQTabWidget( this );
layout->addWidget( mTabWidget );
setupTab1();
@@ -135,39 +135,39 @@ void AddresseeEditorWidget::initGUI()
setupAdditionalTabs();
setupCustomFieldsTabs();
- connect( mTabWidget, SIGNAL( currentChanged(QWidget*) ),
- SLOT( pageChanged(QWidget*) ) );
+ connect( mTabWidget, TQT_SIGNAL( currentChanged(TQWidget*) ),
+ TQT_SLOT( pageChanged(TQWidget*) ) );
}
void AddresseeEditorWidget::setupTab1()
{
// This is the General tab
- QWidget *tab1 = new QWidget( mTabWidget );
+ TQWidget *tab1 = new TQWidget( mTabWidget );
- QGridLayout *layout = new QGridLayout( tab1, 11, 7 );
+ TQGridLayout *layout = new TQGridLayout( tab1, 11, 7 );
layout->setMargin( KDialogBase::marginHint() );
layout->setSpacing( KDialogBase::spacingHint() );
- QLabel *label;
+ TQLabel *label;
KSeparator* bar;
- QPushButton *button;
+ TQPushButton *button;
//////////////////////////////////
// Upper left group (person info)
// Person icon
- label = new QLabel( tab1 );
+ label = new TQLabel( tab1 );
label->setPixmap( KGlobal::iconLoader()->loadIcon( "personal", KIcon::Desktop,
KIcon::SizeMedium ) );
layout->addMultiCellWidget( label, 0, 1, 0, 0 );
// First name
- button = new QPushButton( i18n( "Edit Name..." ), tab1 );
- QToolTip::add( button, i18n( "Edit the contact's name" ) );
+ button = new TQPushButton( i18n( "Edit Name..." ), tab1 );
+ TQToolTip::add( button, i18n( "Edit the contact's name" ) );
mNameEdit = new KLineEdit( tab1, "mNameEdit" );
- connect( mNameEdit, SIGNAL( textChanged( const QString& ) ),
- SLOT( nameTextChanged( const QString& ) ) );
- connect( button, SIGNAL( clicked() ), SLOT( nameButtonClicked() ) );
+ connect( mNameEdit, TQT_SIGNAL( textChanged( const TQString& ) ),
+ TQT_SLOT( nameTextChanged( const TQString& ) ) );
+ connect( button, TQT_SIGNAL( clicked() ), TQT_SLOT( nameButtonClicked() ) );
mNameLabel = new KSqueezedTextLabel( tab1 );
if ( KABPrefs::instance()->automaticNameParsing() ) {
@@ -181,25 +181,25 @@ void AddresseeEditorWidget::setupTab1()
layout->addWidget( button, 0, 1 );
layout->addWidget( mNameEdit, 0, 2 );
layout->addWidget( mNameLabel, 0, 2 );
- label = new QLabel( i18n( "<roleLabel>:", "%1:" ).arg( KABC::Addressee::roleLabel() ), tab1 );
+ label = new TQLabel( i18n( "<roleLabel>:", "%1:" ).arg( KABC::Addressee::roleLabel() ), tab1 );
mRoleEdit = new KLineEdit( tab1 );
- connect( mRoleEdit, SIGNAL( textChanged( const QString& ) ),
- SLOT( textChanged( const QString& ) ) );
+ connect( mRoleEdit, TQT_SIGNAL( textChanged( const TQString& ) ),
+ TQT_SLOT( textChanged( const TQString& ) ) );
label->setBuddy( mRoleEdit );
layout->addWidget( label, 1, 1 );
layout->addWidget( mRoleEdit, 1, 2 );
// Organization
- label = new QLabel( i18n( "<organizationLabel>:", "%1:" ).arg( KABC::Addressee::organizationLabel() ), tab1 );
+ label = new TQLabel( i18n( "<organizationLabel>:", "%1:" ).arg( KABC::Addressee::organizationLabel() ), tab1 );
mOrgEdit = new KLineEdit( tab1 );
label->setBuddy( mOrgEdit );
- connect( mOrgEdit, SIGNAL( textChanged( const QString& ) ),
- SLOT( organizationTextChanged( const QString& ) ) );
+ connect( mOrgEdit, TQT_SIGNAL( textChanged( const TQString& ) ),
+ TQT_SLOT( organizationTextChanged( const TQString& ) ) );
layout->addWidget( label, 2, 1 );
layout->addWidget( mOrgEdit, 2, 2 );
// File as (formatted name)
- label = new QLabel( i18n( "Formatted name:" ), tab1 );
+ label = new TQLabel( i18n( "Formatted name:" ), tab1 );
mFormattedNameLabel = new KSqueezedTextLabel( tab1 );
layout->addWidget( label, 3, 1 );
layout->addWidget( mFormattedNameLabel, 3, 2 );
@@ -211,13 +211,13 @@ void AddresseeEditorWidget::setupTab1()
//////////////////////////////////////
// Phone numbers (upper right)
- label = new QLabel( tab1 );
+ label = new TQLabel( tab1 );
label->setPixmap( KGlobal::iconLoader()->loadIcon( "kaddressbook",
KIcon::Desktop, KIcon::SizeMedium ) );
layout->addMultiCellWidget( label, 0, 1, 3, 3 );
mPhoneEditWidget = new PhoneEditWidget( tab1 );
- connect( mPhoneEditWidget, SIGNAL( modified() ), SLOT( emitModified() ) );
+ connect( mPhoneEditWidget, TQT_SIGNAL( modified() ), TQT_SLOT( emitModified() ) );
layout->addMultiCellWidget( mPhoneEditWidget, 0, 3, 4, 6 );
bar = new KSeparator( KSeparator::HLine, tab1 );
@@ -225,58 +225,58 @@ void AddresseeEditorWidget::setupTab1()
//////////////////////////////////////
// Addresses (lower left)
- label = new QLabel( tab1 );
+ label = new TQLabel( tab1 );
label->setPixmap( KGlobal::iconLoader()->loadIcon( "kfm_home", KIcon::Desktop,
KIcon::SizeMedium ) );
layout->addMultiCellWidget( label, 5, 6, 0, 0 );
mAddressEditWidget = new AddressEditWidget( tab1 );
- connect( mAddressEditWidget, SIGNAL( modified() ), SLOT( emitModified() ) );
+ connect( mAddressEditWidget, TQT_SIGNAL( modified() ), TQT_SLOT( emitModified() ) );
layout->addMultiCellWidget( mAddressEditWidget, 5, 10, 1, 2 );
//////////////////////////////////////
// Email / Web (lower right)
- label = new QLabel( tab1 );
+ label = new TQLabel( tab1 );
label->setPixmap( KGlobal::iconLoader()->loadIcon( "email", KIcon::Desktop,
KIcon::SizeMedium ) );
layout->addMultiCellWidget( label, 5, 6, 3, 3 );
mEmailWidget = new EmailEditWidget( tab1 );
- connect( mEmailWidget, SIGNAL( modified() ), SLOT( emitModified() ) );
+ connect( mEmailWidget, TQT_SIGNAL( modified() ), TQT_SLOT( emitModified() ) );
layout->addMultiCellWidget( mEmailWidget, 5, 6, 4, 6 );
// add the separator
bar = new KSeparator( KSeparator::HLine, tab1 );
layout->addMultiCellWidget( bar, 7, 7, 3, 6 );
- QHBoxLayout *homePageLayout = new QHBoxLayout( 0, 11, 7 );
+ TQHBoxLayout *homePageLayout = new TQHBoxLayout( 0, 11, 7 );
- label = new QLabel( tab1 );
+ label = new TQLabel( tab1 );
label->setPixmap( KGlobal::iconLoader()->loadIcon( "homepage", KIcon::Desktop,
KIcon::SizeMedium ) );
homePageLayout->addWidget( label );
- label = new QLabel( i18n( "<urlLabel>:", "%1:" ).arg( KABC::Addressee::urlLabel() ), tab1 );
+ label = new TQLabel( i18n( "<urlLabel>:", "%1:" ).arg( KABC::Addressee::urlLabel() ), tab1 );
mURLEdit = new KLineEdit( tab1 );
- connect( mURLEdit, SIGNAL( textChanged( const QString& ) ),
- SLOT( textChanged( const QString& ) ) );
+ connect( mURLEdit, TQT_SIGNAL( textChanged( const TQString& ) ),
+ TQT_SLOT( textChanged( const TQString& ) ) );
label->setBuddy( mURLEdit );
homePageLayout->addWidget( label );
homePageLayout->addWidget( mURLEdit );
layout->addMultiCellLayout( homePageLayout, 8, 8, 3, 6 );
- QHBoxLayout *blogLayout = new QHBoxLayout( 0, 11, 7 );
- label = new QLabel( i18n("Blog feed:"), tab1 );
+ TQHBoxLayout *blogLayout = new TQHBoxLayout( 0, 11, 7 );
+ label = new TQLabel( i18n("Blog feed:"), tab1 );
blogLayout->addWidget( label );
mBlogEdit = new KLineEdit( tab1 );
blogLayout->addWidget( mBlogEdit );
- connect( mBlogEdit, SIGNAL( textChanged( const QString & ) ),
- SLOT( textChanged( const QString & ) ) );
+ connect( mBlogEdit, TQT_SIGNAL( textChanged( const TQString & ) ),
+ TQT_SLOT( textChanged( const TQString & ) ) );
label->setBuddy( mBlogEdit );
layout->addMultiCellLayout( blogLayout, 9, 9, 4, 6 );
mIMWidget = new IMEditWidget( tab1, mAddressee );
- connect( mIMWidget, SIGNAL( modified() ), SLOT( emitModified() ) );
+ connect( mIMWidget, TQT_SIGNAL( modified() ), TQT_SLOT( emitModified() ) );
layout->addMultiCellWidget( mIMWidget, 10, 10, 4, 6 );
layout->addColSpacing( 6, 50 );
@@ -285,20 +285,20 @@ void AddresseeEditorWidget::setupTab1()
layout->addMultiCellWidget( bar, 11, 11, 0, 6 );
///////////////////////////////////////
- QHBox *categoryBox = new QHBox( tab1 );
+ TQHBox *categoryBox = new TQHBox( tab1 );
categoryBox->setSpacing( KDialogBase::spacingHint() );
// Categories
- mCategoryButton = new QPushButton( i18n( "Select Categories..." ), categoryBox );
- connect( mCategoryButton, SIGNAL( clicked() ), SLOT( selectCategories() ) );
+ mCategoryButton = new TQPushButton( i18n( "Select Categories..." ), categoryBox );
+ connect( mCategoryButton, TQT_SIGNAL( clicked() ), TQT_SLOT( selectCategories() ) );
mCategoryEdit = new KLineEdit( categoryBox );
mCategoryEdit->setReadOnly( true );
- connect( mCategoryEdit, SIGNAL( textChanged( const QString& ) ),
- SLOT( textChanged( const QString& ) ) );
+ connect( mCategoryEdit, TQT_SIGNAL( textChanged( const TQString& ) ),
+ TQT_SLOT( textChanged( const TQString& ) ) );
mSecrecyWidget = new SecrecyWidget( categoryBox );
- connect( mSecrecyWidget, SIGNAL( changed() ), SLOT( emitModified() ) );
+ connect( mSecrecyWidget, TQT_SIGNAL( changed() ), TQT_SLOT( emitModified() ) );
layout->addMultiCellWidget( categoryBox, 12, 12, 0, 6 );
@@ -311,69 +311,69 @@ void AddresseeEditorWidget::setupTab1()
void AddresseeEditorWidget::setupTab2()
{
// This is the Details tab
- QWidget *tab2 = new QWidget( mTabWidget );
+ TQWidget *tab2 = new TQWidget( mTabWidget );
- QGridLayout *layout = new QGridLayout( tab2, 6, 6 );
+ TQGridLayout *layout = new TQGridLayout( tab2, 6, 6 );
layout->setMargin( KDialogBase::marginHint() );
layout->setSpacing( KDialogBase::spacingHint() );
- QLabel *label;
+ TQLabel *label;
KSeparator* bar;
///////////////////////
// Office info
// Department
- label = new QLabel( tab2 );
+ label = new TQLabel( tab2 );
label->setPixmap( KGlobal::iconLoader()->loadIcon( "folder", KIcon::Desktop,
KIcon::SizeMedium ) );
layout->addMultiCellWidget( label, 0, 1, 0, 0 );
- label = new QLabel( i18n( "Department:" ), tab2 );
+ label = new TQLabel( i18n( "Department:" ), tab2 );
layout->addWidget( label, 0, 1 );
mDepartmentEdit = new KLineEdit( tab2 );
- connect( mDepartmentEdit, SIGNAL( textChanged( const QString& ) ),
- SLOT( textChanged( const QString& ) ) );
+ connect( mDepartmentEdit, TQT_SIGNAL( textChanged( const TQString& ) ),
+ TQT_SLOT( textChanged( const TQString& ) ) );
label->setBuddy( mDepartmentEdit );
layout->addWidget( mDepartmentEdit, 0, 2 );
- label = new QLabel( i18n( "Office:" ), tab2 );
+ label = new TQLabel( i18n( "Office:" ), tab2 );
layout->addWidget( label, 1, 1 );
mOfficeEdit = new KLineEdit( tab2 );
- connect( mOfficeEdit, SIGNAL( textChanged( const QString& ) ),
- SLOT( textChanged( const QString& ) ) );
+ connect( mOfficeEdit, TQT_SIGNAL( textChanged( const TQString& ) ),
+ TQT_SLOT( textChanged( const TQString& ) ) );
label->setBuddy( mOfficeEdit );
layout->addWidget( mOfficeEdit, 1, 2 );
- label = new QLabel( i18n( "Profession:" ), tab2 );
+ label = new TQLabel( i18n( "Profession:" ), tab2 );
layout->addWidget( label, 2, 1 );
mProfessionEdit = new KLineEdit( tab2 );
- connect( mProfessionEdit, SIGNAL( textChanged( const QString& ) ),
- SLOT( textChanged( const QString& ) ) );
+ connect( mProfessionEdit, TQT_SIGNAL( textChanged( const TQString& ) ),
+ TQT_SLOT( textChanged( const TQString& ) ) );
label->setBuddy( mProfessionEdit );
layout->addWidget( mProfessionEdit, 2, 2 );
- label = new QLabel( i18n( "Manager\'s name:" ), tab2 );
+ label = new TQLabel( i18n( "Manager\'s name:" ), tab2 );
layout->addWidget( label, 0, 3 );
mManagerEdit = new KPIM::AddresseeLineEdit( tab2 );
- connect( mManagerEdit, SIGNAL( textChanged( const QString& ) ),
- SLOT( textChanged( const QString& ) ) );
+ connect( mManagerEdit, TQT_SIGNAL( textChanged( const TQString& ) ),
+ TQT_SLOT( textChanged( const TQString& ) ) );
label->setBuddy( mManagerEdit );
layout->addMultiCellWidget( mManagerEdit, 0, 0, 4, 5 );
- label = new QLabel( i18n( "Assistant's name:" ), tab2 );
+ label = new TQLabel( i18n( "Assistant's name:" ), tab2 );
layout->addWidget( label, 1, 3 );
mAssistantEdit = new KPIM::AddresseeLineEdit( tab2 );
- connect( mAssistantEdit, SIGNAL( textChanged( const QString& ) ),
- SLOT( textChanged( const QString& ) ) );
+ connect( mAssistantEdit, TQT_SIGNAL( textChanged( const TQString& ) ),
+ TQT_SLOT( textChanged( const TQString& ) ) );
label->setBuddy( mAssistantEdit );
layout->addMultiCellWidget( mAssistantEdit, 1, 1, 4, 5 );
- label = new QLabel( i18n( "<titleLabel>:", "%1:" ).arg( KABC::Addressee::titleLabel() ), tab2 );
+ label = new TQLabel( i18n( "<titleLabel>:", "%1:" ).arg( KABC::Addressee::titleLabel() ), tab2 );
layout->addWidget( label, 2, 3 );
mTitleEdit = new KLineEdit( tab2 );
- connect( mTitleEdit, SIGNAL( textChanged( const QString& ) ),
- SLOT( textChanged( const QString& ) ) );
+ connect( mTitleEdit, TQT_SIGNAL( textChanged( const TQString& ) ),
+ TQT_SLOT( textChanged( const TQString& ) ) );
label->setBuddy( mTitleEdit );
layout->addMultiCellWidget( mTitleEdit, 2, 2, 4, 5 );
@@ -383,44 +383,44 @@ void AddresseeEditorWidget::setupTab2()
/////////////////////////////////////////////////
// Personal info
- label = new QLabel( tab2 );
+ label = new TQLabel( tab2 );
label->setPixmap( KGlobal::iconLoader()->loadIcon( "personal", KIcon::Desktop,
KIcon::SizeMedium ) );
layout->addMultiCellWidget( label, 4, 5, 0, 0 );
- label = new QLabel( i18n( "Nickname:" ), tab2 );
+ label = new TQLabel( i18n( "Nickname:" ), tab2 );
layout->addWidget( label, 4, 1 );
mNicknameEdit = new KLineEdit( tab2 );
- connect( mNicknameEdit, SIGNAL( textChanged( const QString& ) ),
- SLOT( textChanged( const QString& ) ) );
+ connect( mNicknameEdit, TQT_SIGNAL( textChanged( const TQString& ) ),
+ TQT_SLOT( textChanged( const TQString& ) ) );
label->setBuddy( mNicknameEdit );
layout->addWidget( mNicknameEdit, 4, 2 );
- label = new QLabel( i18n( "Partner's name:" ), tab2 );
+ label = new TQLabel( i18n( "Partner's name:" ), tab2 );
layout->addWidget( label, 5, 1 );
mSpouseEdit = new KPIM::AddresseeLineEdit( tab2 );
- connect( mSpouseEdit, SIGNAL( textChanged( const QString& ) ),
- SLOT( textChanged( const QString& ) ) );
+ connect( mSpouseEdit, TQT_SIGNAL( textChanged( const TQString& ) ),
+ TQT_SLOT( textChanged( const TQString& ) ) );
label->setBuddy( mSpouseEdit );
layout->addWidget( mSpouseEdit, 5, 2 );
- label = new QLabel( i18n( "Birthdate:" ), tab2 );
+ label = new TQLabel( i18n( "Birthdate:" ), tab2 );
layout->addWidget( label, 4, 3 );
mBirthdayPicker = new KDateEdit( tab2 );
- connect( mBirthdayPicker, SIGNAL( dateChanged( const QDate& ) ),
- SLOT( dateChanged( const QDate& ) ) );
- connect( mBirthdayPicker, SIGNAL( textChanged( const QString& ) ),
- SLOT( emitModified() ) );
+ connect( mBirthdayPicker, TQT_SIGNAL( dateChanged( const TQDate& ) ),
+ TQT_SLOT( dateChanged( const TQDate& ) ) );
+ connect( mBirthdayPicker, TQT_SIGNAL( textChanged( const TQString& ) ),
+ TQT_SLOT( emitModified() ) );
label->setBuddy( mBirthdayPicker );
layout->addWidget( mBirthdayPicker, 4, 4 );
- label = new QLabel( i18n( "Anniversary:" ), tab2 );
+ label = new TQLabel( i18n( "Anniversary:" ), tab2 );
layout->addWidget( label, 5, 3 );
mAnniversaryPicker = new KDateEdit( tab2 );
- connect( mAnniversaryPicker, SIGNAL( dateChanged( const QDate& ) ),
- SLOT( dateChanged( const QDate& ) ) );
- connect( mAnniversaryPicker, SIGNAL( textChanged( const QString& ) ),
- SLOT( emitModified() ) );
+ connect( mAnniversaryPicker, TQT_SIGNAL( dateChanged( const TQDate& ) ),
+ TQT_SLOT( dateChanged( const TQDate& ) ) );
+ connect( mAnniversaryPicker, TQT_SIGNAL( textChanged( const TQString& ) ),
+ TQT_SLOT( emitModified() ) );
label->setBuddy( mAnniversaryPicker );
layout->addWidget( mAnniversaryPicker, 5, 4 );
@@ -429,13 +429,13 @@ void AddresseeEditorWidget::setupTab2()
//////////////////////////////////////
// Notes
- label = new QLabel( i18n( "Note:" ), tab2 );
+ label = new TQLabel( i18n( "Note:" ), tab2 );
label->setAlignment( Qt::AlignTop | Qt::AlignLeft );
layout->addWidget( label, 7, 0 );
- mNoteEdit = new QTextEdit( tab2 );
- mNoteEdit->setWordWrap( QTextEdit::WidgetWidth );
+ mNoteEdit = new TQTextEdit( tab2 );
+ mNoteEdit->setWordWrap( TQTextEdit::WidgetWidth );
mNoteEdit->setMinimumSize( mNoteEdit->sizeHint() );
- connect( mNoteEdit, SIGNAL( textChanged() ), SLOT( emitModified() ) );
+ connect( mNoteEdit, TQT_SIGNAL( textChanged() ), TQT_SLOT( emitModified() ) );
label->setBuddy( mNoteEdit );
layout->addMultiCellWidget( mNoteEdit, 7, 7, 1, 5 );
@@ -451,8 +451,8 @@ void AddresseeEditorWidget::setupAdditionalTabs()
// create all tab pages and add the widgets
for ( int i = 0; i < manager->count(); ++i ) {
- QString pageIdentifier = manager->factory( i )->pageIdentifier();
- QString pageTitle = manager->factory( i )->pageTitle();
+ TQString pageIdentifier = manager->factory( i )->pageIdentifier();
+ TQString pageTitle = manager->factory( i )->pageTitle();
if ( pageIdentifier == "misc" )
pageTitle = i18n( "Misc" );
@@ -464,7 +464,7 @@ void AddresseeEditorWidget::setupAdditionalTabs()
mTabWidget->addTab( page, pageTitle );
- connect( page, SIGNAL( changed() ), SLOT( emitModified() ) );
+ connect( page, TQT_SIGNAL( changed() ), TQT_SLOT( emitModified() ) );
}
KAB::ContactEditorWidget *widget
@@ -475,17 +475,17 @@ void AddresseeEditorWidget::setupAdditionalTabs()
}
// query the layout update
- QDictIterator<ContactEditorTabPage> it( mTabPages );
+ TQDictIterator<ContactEditorTabPage> it( mTabPages );
for ( ; it.current(); ++it )
it.current()->updateLayout();
}
void AddresseeEditorWidget::setupCustomFieldsTabs()
{
- QStringList activePages = KABPrefs::instance()->advancedCustomFields();
+ TQStringList activePages = KABPrefs::instance()->advancedCustomFields();
- const QStringList list = KGlobal::dirs()->findAllResources( "data", "kaddressbook/contacteditorpages/*.ui", true, true );
- for ( QStringList::ConstIterator it = list.begin(); it != list.end(); ++it ) {
+ const TQStringList list = KGlobal::dirs()->findAllResources( "data", "kaddressbook/contacteditorpages/*.ui", true, true );
+ for ( TQStringList::ConstIterator it = list.begin(); it != list.end(); ++it ) {
if ( activePages.find( (*it).mid( (*it).findRev('/') + 1 ) ) == activePages.end() )
continue;
@@ -498,7 +498,7 @@ void AddresseeEditorWidget::setupCustomFieldsTabs()
page->addWidget( wdg );
page->updateLayout();
- connect( page, SIGNAL( changed() ), SLOT( emitModified() ) );
+ connect( page, TQT_SIGNAL( changed() ), TQT_SLOT( emitModified() ) );
} else
delete page;
}
@@ -557,8 +557,8 @@ void AddresseeEditorWidget::load()
mAddressEditWidget->setAddresses( mAddressee, mAddressee.addresses() );
mBirthdayPicker->setDate( mAddressee.birthday().date() );
- QString anniversaryStr = mAddressee.custom( "KADDRESSBOOK", "X-Anniversary" );
- QDate anniversary = (anniversaryStr.isEmpty() ? QDate() : QDate::fromString( anniversaryStr, Qt::ISODate ));
+ TQString anniversaryStr = mAddressee.custom( "KADDRESSBOOK", "X-Anniversary" );
+ TQDate anniversary = (anniversaryStr.isEmpty() ? TQDate() : TQDate::fromString( anniversaryStr, Qt::ISODate ));
mAnniversaryPicker->setDate( anniversary );
mNicknameEdit->setText( mAddressee.nickName() );
mCategoryEdit->setText( mAddressee.categories().join( "," ) );
@@ -574,7 +574,7 @@ void AddresseeEditorWidget::load()
mProfessionEdit->setText( mAddressee.custom( "KADDRESSBOOK", "X-Profession" ) );
mTitleEdit->setText( mAddressee.title() );
- QDictIterator<ContactEditorTabPage> it( mTabPages );
+ TQDictIterator<ContactEditorTabPage> it( mTabPages );
for ( ; it.current(); ++it )
it.current()->loadContact( &mAddressee );
@@ -599,7 +599,7 @@ void AddresseeEditorWidget::save()
mAddressee.removeCustom( "KADDRESSBOOK", "X-Department" );
#endif
- QString homepage = mURLEdit->text().stripWhiteSpace();
+ TQString homepage = mURLEdit->text().stripWhiteSpace();
if ( homepage.isEmpty() )
mAddressee.setUrl( KURL() );
else {
@@ -614,12 +614,12 @@ void AddresseeEditorWidget::save()
mAddressee.setNote( mNoteEdit->text() );
if ( mBirthdayPicker->date().isValid() )
- mAddressee.setBirthday( QDateTime( mBirthdayPicker->date() ) );
+ mAddressee.setBirthday( TQDateTime( mBirthdayPicker->date() ) );
else
- mAddressee.setBirthday( QDateTime() );
+ mAddressee.setBirthday( TQDateTime() );
mAddressee.setNickName( mNicknameEdit->text() );
- mAddressee.setCategories( QStringList::split( ",", mCategoryEdit->text() ) );
+ mAddressee.setCategories( TQStringList::split( ",", mCategoryEdit->text() ) );
mAddressee.setSecrecy( mSecrecyWidget->secrecy() );
@@ -687,7 +687,7 @@ void AddresseeEditorWidget::save()
++addressIter )
mAddressee.insertAddress( *addressIter );
- QDictIterator<ContactEditorTabPage> it( mTabPages );
+ TQDictIterator<ContactEditorTabPage> it( mTabPages );
for ( ; it.current(); ++it )
it.current()->storeContact( &mAddressee );
@@ -699,13 +699,13 @@ bool AddresseeEditorWidget::dirty()
return mDirty;
}
-void AddresseeEditorWidget::nameTextChanged( const QString &text )
+void AddresseeEditorWidget::nameTextChanged( const TQString &text )
{
// use the addressee class to parse the name for us
AddresseeConfig config( mAddressee );
if ( config.automaticNameParsing() ) {
if ( !mAddressee.formattedName().isEmpty() ) {
- QString fn = mAddressee.formattedName();
+ TQString fn = mAddressee.formattedName();
mAddressee.setNameFromString( text );
mAddressee.setFormattedName( fn );
} else {
@@ -725,7 +725,7 @@ void AddresseeEditorWidget::nameTextChanged( const QString &text )
emitModified();
}
-void AddresseeEditorWidget::organizationTextChanged( const QString &text )
+void AddresseeEditorWidget::organizationTextChanged( const TQString &text )
{
AddresseeConfig config( mAddressee );
@@ -798,17 +798,17 @@ void AddresseeEditorWidget::selectCategories()
// Show the category dialog
if ( mCategorySelectDialog == 0 ) {
mCategorySelectDialog = new KPIM::CategorySelectDialog( KABPrefs::instance(), this );
- connect( mCategorySelectDialog, SIGNAL( categoriesSelected( const QStringList& ) ),
- this, SLOT( categoriesSelected( const QStringList& ) ) );
- connect( mCategorySelectDialog, SIGNAL( editCategories() ),
- this, SLOT( editCategories() ) );
+ connect( mCategorySelectDialog, TQT_SIGNAL( categoriesSelected( const TQStringList& ) ),
+ this, TQT_SLOT( categoriesSelected( const TQStringList& ) ) );
+ connect( mCategorySelectDialog, TQT_SIGNAL( editCategories() ),
+ this, TQT_SLOT( editCategories() ) );
}
- mCategorySelectDialog->setSelected( QStringList::split( ",", mCategoryEdit->text() ) );
+ mCategorySelectDialog->setSelected( TQStringList::split( ",", mCategoryEdit->text() ) );
mCategorySelectDialog->exec();
}
-void AddresseeEditorWidget::categoriesSelected( const QStringList &list )
+void AddresseeEditorWidget::categoriesSelected( const TQStringList &list )
{
mCategoryEdit->setText( list.join( "," ) );
}
@@ -817,8 +817,8 @@ void AddresseeEditorWidget::editCategories()
{
if ( mCategoryEditDialog == 0 ) {
mCategoryEditDialog = new KPIM::CategoryEditDialog( KABPrefs::instance(), this );
- connect( mCategoryEditDialog, SIGNAL( categoryConfigChanged() ),
- mCategorySelectDialog, SLOT( updateCategoryConfig() ) );
+ connect( mCategoryEditDialog, TQT_SIGNAL( categoryConfigChanged() ),
+ mCategorySelectDialog, TQT_SLOT( updateCategoryConfig() ) );
}
mCategoryEditDialog->exec();
@@ -834,7 +834,7 @@ void AddresseeEditorWidget::emitModified()
emit modified();
}
-void AddresseeEditorWidget::dateChanged( const QDate& )
+void AddresseeEditorWidget::dateChanged( const TQDate& )
{
emitModified();
}
@@ -844,7 +844,7 @@ void AddresseeEditorWidget::invalidDate()
KMessageBox::sorry( this, i18n( "You must specify a valid date" ) );
}
-void AddresseeEditorWidget::pageChanged( QWidget *wdg )
+void AddresseeEditorWidget::pageChanged( TQWidget *wdg )
{
if ( wdg )
KAcceleratorManager::manage( wdg );
@@ -859,7 +859,7 @@ bool AddresseeEditorWidget::readyToClose()
{
bool ok = true;
- QDate date = mBirthdayPicker->date();
+ TQDate date = mBirthdayPicker->date();
if ( !date.isValid() && !mBirthdayPicker->currentText().isEmpty() ) {
KMessageBox::error( this, i18n( "You have to enter a valid birthdate." ) );
ok = false;
@@ -901,7 +901,7 @@ void AddresseeEditorWidget::setReadOnly( bool readOnly )
mAnniversaryPicker->setEnabled( !readOnly );
mNoteEdit->setReadOnly( mReadOnly );
- QDictIterator<ContactEditorTabPage> it( mTabPages );
+ TQDictIterator<ContactEditorTabPage> it( mTabPages );
for ( ; it.current(); ++it )
it.current()->setReadOnly( readOnly );
}
diff --git a/kaddressbook/addresseeeditorwidget.h b/kaddressbook/addresseeeditorwidget.h
index 93917245b..36711773b 100644
--- a/kaddressbook/addresseeeditorwidget.h
+++ b/kaddressbook/addresseeeditorwidget.h
@@ -24,7 +24,7 @@
#ifndef ADDRESSEEEDITORWIDGET_H
#define ADDRESSEEEDITORWIDGET_H
-#include <qdatetime.h>
+#include <tqdatetime.h>
#include <kabc/addressee.h>
#include <kdialogbase.h>
@@ -68,7 +68,7 @@ class AddresseeEditorWidget : public AddresseeEditorBase
Q_OBJECT
public:
- AddresseeEditorWidget( QWidget *parent, const char *name = 0 );
+ AddresseeEditorWidget( TQWidget *parent, const char *name = 0 );
~AddresseeEditorWidget();
void setAddressee( const KABC::Addressee& );
@@ -84,8 +84,8 @@ class AddresseeEditorWidget : public AddresseeEditorBase
bool readyToClose();
protected slots:
- void textChanged( const QString& );
- void pageChanged( QWidget *wdg );
+ void textChanged( const TQString& );
+ void pageChanged( TQWidget *wdg );
/**
Emits the modified signal and sets the dirty flag. Any slot
@@ -94,10 +94,10 @@ class AddresseeEditorWidget : public AddresseeEditorBase
*/
void emitModified();
- void dateChanged( const QDate& );
+ void dateChanged( const TQDate& );
void invalidDate();
- void nameTextChanged( const QString& );
- void organizationTextChanged( const QString& );
+ void nameTextChanged( const TQString& );
+ void organizationTextChanged( const TQString& );
void nameBoxChanged();
void nameButtonClicked();
void selectCategories();
@@ -105,7 +105,7 @@ class AddresseeEditorWidget : public AddresseeEditorBase
/**
Called whenever the categories change in the categories dialog.
*/
- void categoriesSelected( const QStringList& );
+ void categoriesSelected( const TQStringList& );
/**
Edits which categories are available in the CategorySelectDialog.
@@ -130,7 +130,7 @@ class AddresseeEditorWidget : public AddresseeEditorBase
// GUI
KPIM::CategorySelectDialog *mCategorySelectDialog;
KPIM::CategoryEditDialog *mCategoryEditDialog;
- QTabWidget *mTabWidget;
+ TQTabWidget *mTabWidget;
// Tab1
KLineEdit *mNameEdit;
@@ -143,7 +143,7 @@ class AddresseeEditorWidget : public AddresseeEditorBase
PhoneEditWidget *mPhoneEditWidget;
KLineEdit *mURLEdit;
KLineEdit *mBlogEdit;
- QPushButton *mCategoryButton;
+ TQPushButton *mCategoryButton;
KLineEdit *mCategoryEdit;
SecrecyWidget *mSecrecyWidget;
KSqueezedTextLabel *mNameLabel;
@@ -159,9 +159,9 @@ class AddresseeEditorWidget : public AddresseeEditorBase
KPIM::AddresseeLineEdit *mSpouseEdit;
KDateEdit *mBirthdayPicker;
KDateEdit *mAnniversaryPicker;
- QTextEdit *mNoteEdit;
+ TQTextEdit *mNoteEdit;
- QDict<ContactEditorTabPage> mTabPages;
+ TQDict<ContactEditorTabPage> mTabPages;
};
#endif
diff --git a/kaddressbook/addresseeutil.cpp b/kaddressbook/addresseeutil.cpp
index e84cfea09..d564a9cb1 100644
--- a/kaddressbook/addresseeutil.cpp
+++ b/kaddressbook/addresseeutil.cpp
@@ -29,23 +29,23 @@
#include "addresseeutil.h"
-QString AddresseeUtil::addresseesToClipboard( const KABC::Addressee::List &list )
+TQString AddresseeUtil::addresseesToClipboard( const KABC::Addressee::List &list )
{
KABC::VCardConverter converter;
return converter.createVCards( list );
}
-KABC::Addressee::List AddresseeUtil::clipboardToAddressees( const QString &data )
+KABC::Addressee::List AddresseeUtil::clipboardToAddressees( const TQString &data )
{
KABC::VCardConverter converter;
return converter.parseVCards( data );
}
-QString AddresseeUtil::addresseesToEmails( const KABC::Addressee::List &addrList )
+TQString AddresseeUtil::addresseesToEmails( const KABC::Addressee::List &addrList )
{
- QStringList emails;
+ TQStringList emails;
KABC::Addressee::List::ConstIterator it;
for ( it = addrList.begin(); it != addrList.end(); ++it )
diff --git a/kaddressbook/addresseeutil.h b/kaddressbook/addresseeutil.h
index 1b67fcf35..31d750e3f 100644
--- a/kaddressbook/addresseeutil.h
+++ b/kaddressbook/addresseeutil.h
@@ -24,7 +24,7 @@
#ifndef ADDRESSEEUTIL_H
#define ADDRESSEEUTIL_H
-#include <qstring.h>
+#include <tqstring.h>
#include <kabc/addressee.h>
/**
@@ -44,19 +44,19 @@ class AddresseeUtil
Same as above function, except that an entire list of KABC::Addressee
objects will be converted to vCard and put in the string.
*/
- static QString addresseesToClipboard( const KABC::Addressee::List &addrList );
+ static TQString addresseesToClipboard( const KABC::Addressee::List &addrList );
/**
Convert a string from the clipboard into a list of addressee objects.
If the clipboard text was not a valid vcard, an empty list
will be returned.
*/
- static KABC::Addressee::List clipboardToAddressees( const QString &clipboard );
+ static KABC::Addressee::List clipboardToAddressees( const TQString &clipboard );
/**
Converts the list of addressee objects into a list of email addresses.
*/
- static QString addresseesToEmails( const KABC::Addressee::List &addrList );
+ static TQString addresseesToEmails( const KABC::Addressee::List &addrList );
private:
AddresseeUtil() {}
diff --git a/kaddressbook/addviewdialog.cpp b/kaddressbook/addviewdialog.cpp
index 68046359d..b42729e34 100644
--- a/kaddressbook/addviewdialog.cpp
+++ b/kaddressbook/addviewdialog.cpp
@@ -21,11 +21,11 @@
without including the source code for Qt in the source distribution.
*/
-#include <qbuttongroup.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qlineedit.h>
-#include <qradiobutton.h>
+#include <tqbuttongroup.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqlineedit.h>
+#include <tqradiobutton.h>
#include <klocale.h>
@@ -33,8 +33,8 @@
#include "addviewdialog.h"
-AddViewDialog::AddViewDialog( QDict<ViewFactory> *viewFactoryDict,
- QWidget *parent, const char *name )
+AddViewDialog::AddViewDialog( TQDict<ViewFactory> *viewFactoryDict,
+ TQWidget *parent, const char *name )
: KDialogBase( KDialogBase::Plain, i18n( "Add View" ),
KDialogBase::Ok | KDialogBase::Cancel, KDialogBase::Ok,
parent, name ),
@@ -42,33 +42,33 @@ AddViewDialog::AddViewDialog( QDict<ViewFactory> *viewFactoryDict,
{
mTypeId = 0;
- QWidget *page = plainPage();
+ TQWidget *page = plainPage();
- QGridLayout *layout = new QGridLayout( page, 2, 2 );
+ TQGridLayout *layout = new TQGridLayout( page, 2, 2 );
layout->setSpacing( spacingHint() );
layout->setRowStretch( 1, 1 );
layout->setColStretch( 1, 1 );
- QLabel *label = new QLabel( i18n( "View name:" ), page );
+ TQLabel *label = new TQLabel( i18n( "View name:" ), page );
layout->addWidget( label, 0, 0 );
- mViewNameEdit = new QLineEdit( page );
- connect( mViewNameEdit, SIGNAL( textChanged( const QString& ) ),
- SLOT( textChanged( const QString& ) ) );
+ mViewNameEdit = new TQLineEdit( page );
+ connect( mViewNameEdit, TQT_SIGNAL( textChanged( const TQString& ) ),
+ TQT_SLOT( textChanged( const TQString& ) ) );
layout->addWidget( mViewNameEdit, 0, 1 );
- mTypeGroup = new QButtonGroup( 0, Qt::Horizontal, i18n( "View Type" ), page );
- connect( mTypeGroup, SIGNAL( clicked( int ) ), this, SLOT( clicked( int ) ) );
+ mTypeGroup = new TQButtonGroup( 0, Qt::Horizontal, i18n( "View Type" ), page );
+ connect( mTypeGroup, TQT_SIGNAL( clicked( int ) ), this, TQT_SLOT( clicked( int ) ) );
layout->addMultiCellWidget( mTypeGroup, 1, 1, 0, 1 );
- QGridLayout *groupLayout = new QGridLayout( mTypeGroup->layout(), 3, 2 );
+ TQGridLayout *groupLayout = new TQGridLayout( mTypeGroup->layout(), 3, 2 );
groupLayout->setSpacing( spacingHint() );
int row = 0;
- QDictIterator<ViewFactory> iter( *mViewFactoryDict );
+ TQDictIterator<ViewFactory> iter( *mViewFactoryDict );
for ( iter.toFirst(); iter.current(); ++iter ) {
- QRadioButton *button = new QRadioButton( i18n((*iter)->type().utf8()),
+ TQRadioButton *button = new TQRadioButton( i18n((*iter)->type().utf8()),
mTypeGroup, (*iter)->type().latin1() );
- label = new QLabel( (*iter)->description(), mTypeGroup );
+ label = new TQLabel( (*iter)->description(), mTypeGroup );
label->setAlignment( Qt::WordBreak );
groupLayout->addWidget( button, row, 0, Qt::AlignTop );
@@ -86,12 +86,12 @@ AddViewDialog::~AddViewDialog()
{
}
-QString AddViewDialog::viewName()const
+TQString AddViewDialog::viewName()const
{
return mViewNameEdit->text();
}
-QString AddViewDialog::viewType()const
+TQString AddViewDialog::viewType()const
{
// we missuse the name property for storing the type
return mTypeGroup->find( mTypeId )->name();
@@ -102,7 +102,7 @@ void AddViewDialog::clicked( int id )
mTypeId = id;
}
-void AddViewDialog::textChanged( const QString &text )
+void AddViewDialog::textChanged( const TQString &text )
{
enableButton( KDialogBase::Ok, !text.isEmpty() );
}
diff --git a/kaddressbook/addviewdialog.h b/kaddressbook/addviewdialog.h
index 972f6ef3a..a3c956792 100644
--- a/kaddressbook/addviewdialog.h
+++ b/kaddressbook/addviewdialog.h
@@ -25,8 +25,8 @@
#define ADDVIEWDIALOG_H
#include <kdialogbase.h>
-#include <qdict.h>
-#include <qstring.h>
+#include <tqdict.h>
+#include <tqstring.h>
class QButtonGroup;
class QLineEdit;
@@ -43,13 +43,13 @@ class AddViewDialog : public KDialogBase
Q_OBJECT
public:
- AddViewDialog( QDict<ViewFactory> *viewFactoryDict, QWidget *parent,
+ AddViewDialog( TQDict<ViewFactory> *viewFactoryDict, TQWidget *parent,
const char *name = 0 );
~AddViewDialog();
- QString viewName()const;
+ TQString viewName()const;
- QString viewType()const ;
+ TQString viewType()const ;
protected slots:
/**
@@ -60,12 +60,12 @@ class AddViewDialog : public KDialogBase
/**
Called when the user changes the text in the name of the view.
*/
- void textChanged( const QString &text );
+ void textChanged( const TQString &text );
private:
- QDict<ViewFactory> *mViewFactoryDict;
- QLineEdit *mViewNameEdit;
- QButtonGroup *mTypeGroup;
+ TQDict<ViewFactory> *mViewFactoryDict;
+ TQLineEdit *mViewNameEdit;
+ TQButtonGroup *mTypeGroup;
int mTypeId;
};
diff --git a/kaddressbook/advancedcustomfields.cpp b/kaddressbook/advancedcustomfields.cpp
index ad630835f..b1788c509 100644
--- a/kaddressbook/advancedcustomfields.cpp
+++ b/kaddressbook/advancedcustomfields.cpp
@@ -23,15 +23,15 @@
without including the source code for Qt in the source distribution.
*/
-#include <qcheckbox.h>
-#include <qcombobox.h>
-#include <qdatetimeedit.h>
-#include <qlayout.h>
-#include <qobjectlist.h>
-#include <qspinbox.h>
-#include <qregexp.h>
-#include <qtextedit.h>
-#include <qwidgetfactory.h>
+#include <tqcheckbox.h>
+#include <tqcombobox.h>
+#include <tqdatetimeedit.h>
+#include <tqlayout.h>
+#include <tqobjectlist.h>
+#include <tqspinbox.h>
+#include <tqregexp.h>
+#include <tqtextedit.h>
+#include <tqwidgetfactory.h>
#include <kdatepicker.h>
#include <kdatetimewidget.h>
@@ -48,19 +48,19 @@
class KABCStorage : public KPIM::DesignerFields::Storage
{
public:
- KABCStorage( KABC::Addressee *a, const QString &ns )
+ KABCStorage( KABC::Addressee *a, const TQString &ns )
: mAddressee( a ), mNs( ns )
{
}
- QStringList keys()
+ TQStringList keys()
{
- QStringList keys;
+ TQStringList keys;
- const QStringList customs = mAddressee->customs();
- QStringList::ConstIterator it;
+ const TQStringList customs = mAddressee->customs();
+ TQStringList::ConstIterator it;
for ( it = customs.begin(); it != customs.end(); ++it ) {
- QString app, name, value;
+ TQString app, name, value;
splitField( *it, app, name, value );
if ( app == mNs ) keys.append( name );
}
@@ -68,24 +68,24 @@ class KABCStorage : public KPIM::DesignerFields::Storage
return keys;
}
- QString read( const QString &key )
+ TQString read( const TQString &key )
{
return mAddressee->custom( mNs, key );
}
- void write( const QString &key, const QString &value )
+ void write( const TQString &key, const TQString &value )
{
mAddressee->insertCustom( mNs, key, value );
}
private:
KABC::Addressee *mAddressee;
- QString mNs;
+ TQString mNs;
};
-AdvancedCustomFields::AdvancedCustomFields( const QString &uiFile, KABC::AddressBook *ab,
- QWidget *parent, const char *name )
+AdvancedCustomFields::AdvancedCustomFields( const TQString &uiFile, KABC::AddressBook *ab,
+ TQWidget *parent, const char *name )
: KAB::ContactEditorWidget( ab, parent, name )
{
initGUI( uiFile );
@@ -93,9 +93,9 @@ AdvancedCustomFields::AdvancedCustomFields( const QString &uiFile, KABC::Address
void AdvancedCustomFields::loadContact( KABC::Addressee *addr )
{
- QString ns;
+ TQString ns;
if ( mFields->identifier().upper() == "KADDRESSBOOK" ||
- QRegExp( "^Form\\d\\d?$" ).search( mFields->identifier() ) >= 0 ) {
+ TQRegExp( "^Form\\d\\d?$" ).search( mFields->identifier() ) >= 0 ) {
ns = "KADDRESSBOOK";
} else {
ns = mFields->identifier();
@@ -107,9 +107,9 @@ void AdvancedCustomFields::loadContact( KABC::Addressee *addr )
void AdvancedCustomFields::storeContact( KABC::Addressee *addr )
{
- QString ns;
+ TQString ns;
if ( mFields->identifier().upper() == "KADDRESSBOOK" ||
- QRegExp( "^Form\\d\\d?$" ).search( mFields->identifier() ) >= 0 ) {
+ TQRegExp( "^Form\\d\\d?$" ).search( mFields->identifier() ) >= 0 ) {
ns = "KADDRESSBOOK";
} else {
ns = mFields->identifier();
@@ -124,23 +124,23 @@ void AdvancedCustomFields::setReadOnly( bool readOnly )
mFields->setReadOnly( readOnly );
}
-void AdvancedCustomFields::initGUI( const QString &uiFile )
+void AdvancedCustomFields::initGUI( const TQString &uiFile )
{
- QVBoxLayout *layout = new QVBoxLayout( this, KDialog::marginHint(),
+ TQVBoxLayout *layout = new TQVBoxLayout( this, KDialog::marginHint(),
KDialog::spacingHint() );
mFields = new KPIM::DesignerFields( uiFile, this );
layout->addWidget( mFields );
- connect( mFields, SIGNAL( modified() ), SLOT( setModified() ) );
+ connect( mFields, TQT_SIGNAL( modified() ), TQT_SLOT( setModified() ) );
}
-QString AdvancedCustomFields::pageIdentifier() const
+TQString AdvancedCustomFields::pageIdentifier() const
{
return mFields->identifier();
}
-QString AdvancedCustomFields::pageTitle() const
+TQString AdvancedCustomFields::pageTitle() const
{
return mFields->title();
}
diff --git a/kaddressbook/advancedcustomfields.h b/kaddressbook/advancedcustomfields.h
index b997ffb9f..26b462274 100644
--- a/kaddressbook/advancedcustomfields.h
+++ b/kaddressbook/advancedcustomfields.h
@@ -28,9 +28,9 @@
#include <klocale.h>
-#include <qmap.h>
-#include <qpair.h>
-#include <qstringlist.h>
+#include <tqmap.h>
+#include <tqpair.h>
+#include <tqstringlist.h>
#include <libkdepim/designerfields.h>
@@ -41,18 +41,18 @@ class AdvancedCustomFields : public KAB::ContactEditorWidget
Q_OBJECT
public:
- AdvancedCustomFields( const QString &uiFile, KABC::AddressBook *ab,
- QWidget *parent, const char *name = 0 );
+ AdvancedCustomFields( const TQString &uiFile, KABC::AddressBook *ab,
+ TQWidget *parent, const char *name = 0 );
void loadContact( KABC::Addressee *addr );
void storeContact( KABC::Addressee *addr );
void setReadOnly( bool readOnly );
- QString pageIdentifier() const;
- QString pageTitle() const;
+ TQString pageIdentifier() const;
+ TQString pageTitle() const;
private:
- void initGUI( const QString& );
+ void initGUI( const TQString& );
KPIM::DesignerFields *mFields;
};
diff --git a/kaddressbook/common/filter.cpp b/kaddressbook/common/filter.cpp
index ccac46ef8..13e5f5fc7 100644
--- a/kaddressbook/common/filter.cpp
+++ b/kaddressbook/common/filter.cpp
@@ -29,12 +29,12 @@
#include "filter.h"
Filter::Filter()
- : mName( QString::null ), mMatchRule( Matching ), mEnabled( true ),
+ : mName( TQString::null ), mMatchRule( Matching ), mEnabled( true ),
mInternal( false ), mIsEmpty( true )
{
}
-Filter::Filter( const QString &name )
+Filter::Filter( const TQString &name )
: mName( name ), mMatchRule( Matching ), mEnabled( true ),
mInternal( false ), mIsEmpty( false )
{
@@ -44,14 +44,14 @@ Filter::~Filter()
{
}
-void Filter::setName( const QString &name )
+void Filter::setName( const TQString &name )
{
mName = name;
mIsEmpty = false;
}
-const QString &Filter::name() const
+const TQString &Filter::name() const
{
return mName;
}
@@ -74,7 +74,7 @@ void Filter::apply( KABC::Addressee::List &addresseeList )
bool Filter::filterAddressee( const KABC::Addressee &a ) const
{
- QStringList::ConstIterator iter;
+ TQStringList::ConstIterator iter;
iter = mCategoryList.begin();
// empty filter always matches
@@ -109,14 +109,14 @@ bool Filter::isEnabled() const
return mEnabled;
}
-void Filter::setCategories( const QStringList &list )
+void Filter::setCategories( const TQStringList &list )
{
mCategoryList = list;
mIsEmpty = false;
}
-const QStringList &Filter::categories() const
+const TQStringList &Filter::categories() const
{
return mCategoryList;
}
@@ -139,7 +139,7 @@ void Filter::restore( KConfig *config )
mIsEmpty = false;
}
-void Filter::save( KConfig *config, const QString &baseGroup, Filter::List &list )
+void Filter::save( KConfig *config, const TQString &baseGroup, Filter::List &list )
{
{
KConfigGroupSaver s( config, baseGroup );
@@ -147,7 +147,7 @@ void Filter::save( KConfig *config, const QString &baseGroup, Filter::List &list
// remove the old filters
uint count = config->readNumEntry( "Count" );
for ( uint i = 0; i < count; ++i )
- config->deleteGroup( QString( "%1_%2" ).arg( baseGroup ).arg( i ) );
+ config->deleteGroup( TQString( "%1_%2" ).arg( baseGroup ).arg( i ) );
}
@@ -155,7 +155,7 @@ void Filter::save( KConfig *config, const QString &baseGroup, Filter::List &list
Filter::List::Iterator iter;
for ( iter = list.begin(); iter != list.end(); ++iter ) {
if ( !(*iter).mInternal ) {
- KConfigGroupSaver s( config, QString( "%1_%2" ).arg( baseGroup )
+ KConfigGroupSaver s( config, TQString( "%1_%2" ).arg( baseGroup )
.arg( index ) );
(*iter).save( config );
index++;
@@ -166,7 +166,7 @@ void Filter::save( KConfig *config, const QString &baseGroup, Filter::List &list
config->writeEntry( "Count", index );
}
-Filter::List Filter::restore( KConfig *config, const QString &baseGroup )
+Filter::List Filter::restore( KConfig *config, const TQString &baseGroup )
{
Filter::List list;
int count = 0;
@@ -179,15 +179,15 @@ Filter::List Filter::restore( KConfig *config, const QString &baseGroup )
for ( int i = 0; i < count; i++ ) {
{
- KConfigGroupSaver s( config, QString( "%1_%2" ).arg( baseGroup ).arg( i ) );
+ KConfigGroupSaver s( config, TQString( "%1_%2" ).arg( baseGroup ).arg( i ) );
f.restore( config );
}
list.append( f );
}
- const QStringList cats = KABPrefs::instance()->customCategories();
- for ( QStringList::ConstIterator it = cats.begin(); it != cats.end(); ++it ) {
+ const TQStringList cats = KABPrefs::instance()->customCategories();
+ for ( TQStringList::ConstIterator it = cats.begin(); it != cats.end(); ++it ) {
Filter filter;
filter.mName = *it;
filter.mEnabled = true;
diff --git a/kaddressbook/common/filter.h b/kaddressbook/common/filter.h
index 9251c5c17..9f66699e0 100644
--- a/kaddressbook/common/filter.h
+++ b/kaddressbook/common/filter.h
@@ -24,9 +24,9 @@
#ifndef FILTER_H
#define FILTER_H
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qvaluelist.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqvaluelist.h>
#include <kabc/addressee.h>
#include <kconfig.h>
@@ -39,23 +39,23 @@
class Filter
{
public:
- typedef QValueList<Filter> List;
+ typedef TQValueList<Filter> List;
enum MatchRule { Matching = 0, NotMatching = 1 };
Filter();
- Filter( const QString& name );
+ Filter( const TQString& name );
~Filter();
/**
Set the name of the filter.
*/
- void setName( const QString &name );
+ void setName( const TQString &name );
/**
@return The name of the filter.
*/
- const QString &name() const;
+ const TQString &name() const;
/**
@return Whether the filter is an internal one.
@@ -92,12 +92,12 @@ class Filter
/**
Set the list of categories. This list is used to filter addressees.
*/
- void setCategories( const QStringList &list );
+ void setCategories( const TQStringList &list );
/**
@return The list of categories.
*/
- const QStringList &categories() const;
+ const TQStringList &categories() const;
/**
Saves the filter to the config file. The group should already be set.
@@ -118,7 +118,7 @@ class Filter
will be append for each filter saved.
@param list The list of filters to be saved.
*/
- static void save( KConfig *config, const QString &baseGroup, Filter::List &list );
+ static void save( KConfig *config, const TQString &baseGroup, Filter::List &list );
/**
Restores a list of filters from a config file.
@@ -128,7 +128,7 @@ class Filter
@return The list of filters.
*/
- static Filter::List restore( KConfig *config, const QString &baseGroup );
+ static Filter::List restore( KConfig *config, const TQString &baseGroup );
/**
Sets the filter rule. If the rule is Filter::Matching (default),
@@ -149,8 +149,8 @@ class Filter
bool isEmpty() const;
private:
- QString mName;
- QStringList mCategoryList;
+ TQString mName;
+ TQStringList mCategoryList;
MatchRule mMatchRule;
bool mEnabled;
bool mInternal;
diff --git a/kaddressbook/common/kabprefs.cpp b/kaddressbook/common/kabprefs.cpp
index e8402d562..cacb2dfd1 100644
--- a/kaddressbook/common/kabprefs.cpp
+++ b/kaddressbook/common/kabprefs.cpp
@@ -35,7 +35,7 @@ KABPrefs::KABPrefs()
{
KConfigSkeleton::setCurrentGroup( "General" );
- QStringList defaultMap;
+ TQStringList defaultMap;
defaultMap << "http://maps.google.com/maps?f=q&hl=%1&q=%n,%l,%s";
addItemString( "LocationMapURL", mLocationMapURL, defaultMap[ 0 ] );
addItemStringList( "LocationMapURLs", mLocationMapURLs, defaultMap );
diff --git a/kaddressbook/common/kabprefs.h b/kaddressbook/common/kabprefs.h
index 3c2db1522..688cab99f 100644
--- a/kaddressbook/common/kabprefs.h
+++ b/kaddressbook/common/kabprefs.h
@@ -24,7 +24,7 @@
#ifndef KABPREFS_H
#define KABPREFS_H
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include <kdepimmacros.h>
#include "kabprefs_base.h"
@@ -40,34 +40,34 @@ class KDE_EXPORT KABPrefs : public KABPrefsBase
void usrReadConfig();
void usrWriteConfig();
- void setLocationMapURL( const QString &locationMapURL )
+ void setLocationMapURL( const TQString &locationMapURL )
{
- if ( !isImmutable( QString::fromLatin1( "LocationMapURL" ) ) )
+ if ( !isImmutable( TQString::fromLatin1( "LocationMapURL" ) ) )
mLocationMapURL = locationMapURL;
}
- QString locationMapURL() const
+ TQString locationMapURL() const
{
return mLocationMapURL;
}
- void setLocationMapURLs( const QStringList &locationMapURLs )
+ void setLocationMapURLs( const TQStringList &locationMapURLs )
{
- if ( !isImmutable( QString::fromLatin1( "LocationMapURLs" ) ) )
+ if ( !isImmutable( TQString::fromLatin1( "LocationMapURLs" ) ) )
mLocationMapURLs = locationMapURLs;
}
- QStringList locationMapURLs() const
+ TQStringList locationMapURLs() const
{
return mLocationMapURLs;
}
- QStringList customCategories() const
+ TQStringList customCategories() const
{
return mCustomCategories;
}
- void setCustomCategories(const QStringList & s)
+ void setCustomCategories(const TQStringList & s)
{
mCustomCategories = s;
}
@@ -79,8 +79,8 @@ class KDE_EXPORT KABPrefs : public KABPrefsBase
static KABPrefs *mInstance;
- QString mLocationMapURL;
- QStringList mLocationMapURLs;
+ TQString mLocationMapURL;
+ TQStringList mLocationMapURLs;
};
#endif
diff --git a/kaddressbook/common/locationmap.cpp b/kaddressbook/common/locationmap.cpp
index 92bdfaab1..efae019c3 100644
--- a/kaddressbook/common/locationmap.cpp
+++ b/kaddressbook/common/locationmap.cpp
@@ -61,7 +61,7 @@ void LocationMap::showAddress( const KABC::Address &addr )
kapp->invokeBrowser( url.url() );
}
-QString LocationMap::createUrl( const KABC::Address &addr )
+TQString LocationMap::createUrl( const KABC::Address &addr )
{
/**
This method makes substitutions for the following place holders:
@@ -72,10 +72,10 @@ QString LocationMap::createUrl( const KABC::Address &addr )
%c country (in ISO format)
*/
- QString urlTemplate = KABPrefs::instance()->locationMapURL().arg( KGlobal::locale()->country() );
+ TQString urlTemplate = KABPrefs::instance()->locationMapURL().arg( KGlobal::locale()->country() );
if ( urlTemplate.isEmpty() ) {
KMessageBox::error( 0, i18n( "No service provider available for map lookup!\nPlease add one in the configuration dialog." ) );
- return QString::null;
+ return TQString::null;
}
#if KDE_VERSION >= 319
diff --git a/kaddressbook/common/locationmap.h b/kaddressbook/common/locationmap.h
index 82300d9df..e8a790360 100644
--- a/kaddressbook/common/locationmap.h
+++ b/kaddressbook/common/locationmap.h
@@ -25,8 +25,8 @@
#define LOCATIONMAP_H
#include <kabc/address.h>
-#include <qobject.h>
-#include <qstring.h>
+#include <tqobject.h>
+#include <tqstring.h>
class LocationMap : public QObject
{
@@ -43,7 +43,7 @@ class LocationMap : public QObject
LocationMap();
private:
- QString createUrl( const KABC::Address& );
+ TQString createUrl( const KABC::Address& );
static LocationMap *mSelf;
};
diff --git a/kaddressbook/contacteditorwidgetmanager.cpp b/kaddressbook/contacteditorwidgetmanager.cpp
index de21528cd..6a6a68d99 100644
--- a/kaddressbook/contacteditorwidgetmanager.cpp
+++ b/kaddressbook/contacteditorwidgetmanager.cpp
@@ -21,7 +21,7 @@
without including the source code for Qt in the source distribution.
*/
-#include <qlayout.h>
+#include <tqlayout.h>
#include <kapplication.h>
#include <kdialog.h>
@@ -41,7 +41,7 @@
ContactEditorWidgetManager *ContactEditorWidgetManager::mSelf = 0;
ContactEditorWidgetManager::ContactEditorWidgetManager()
- : QObject( qApp )
+ : TQObject( qApp )
{
reload();
}
@@ -53,7 +53,7 @@ ContactEditorWidgetManager::~ContactEditorWidgetManager()
ContactEditorWidgetManager *ContactEditorWidgetManager::self()
{
- kdWarning( !kapp, 7520 ) << "No QApplication object available!" << endl;
+ kdWarning( !kapp, 7520 ) << "No TQApplication object available!" << endl;
if ( !mSelf )
mSelf = new ContactEditorWidgetManager();
@@ -76,7 +76,7 @@ void ContactEditorWidgetManager::reload()
mFactories.clear();
kdDebug(5720) << "ContactEditorWidgetManager::reload()" << endl;
const KTrader::OfferList plugins = KTrader::self()->query( "KAddressBook/ContactEditorWidget",
- QString( "[X-KDE-KAddressBook-CEWPluginVersion] == %1" ).arg( KAB_CEW_PLUGIN_VERSION ) );
+ TQString( "[X-KDE-KAddressBook-CEWPluginVersion] == %1" ).arg( KAB_CEW_PLUGIN_VERSION ) );
KTrader::OfferList::ConstIterator it;
for ( it = plugins.begin(); it != plugins.end(); ++it ) {
@@ -107,10 +107,10 @@ void ContactEditorWidgetManager::reload()
///////////////////////////////////////////////////////////////////////////////
-ContactEditorTabPage::ContactEditorTabPage( QWidget *parent, const char *name )
- : QWidget( parent, name )
+ContactEditorTabPage::ContactEditorTabPage( TQWidget *parent, const char *name )
+ : TQWidget( parent, name )
{
- mLayout = new QGridLayout( this, 0, 2, KDialog::marginHint(),
+ mLayout = new TQGridLayout( this, 0, 2, KDialog::marginHint(),
KDialog::spacingHint() );
}
@@ -118,7 +118,7 @@ void ContactEditorTabPage::addWidget( KAB::ContactEditorWidget *widget )
{
if ( widget->logicalWidth() == 2 ) {
mWidgets.prepend( widget );
- connect( widget, SIGNAL( changed() ), SIGNAL( changed() ) );
+ connect( widget, TQT_SIGNAL( changed() ), TQT_SIGNAL( changed() ) );
return;
}
@@ -133,7 +133,7 @@ void ContactEditorTabPage::addWidget( KAB::ContactEditorWidget *widget )
}
mWidgets.insert( ++it, widget );
- connect( widget, SIGNAL( changed() ), SIGNAL( changed() ) );
+ connect( widget, TQT_SIGNAL( changed() ), TQT_SIGNAL( changed() ) );
}
void ContactEditorTabPage::loadContact( KABC::Addressee *addr )
@@ -174,8 +174,8 @@ void ContactEditorTabPage::updateLayout()
row += (*it)->logicalHeight();
if ( it != mWidgets.fromLast() ) {
- QFrame *frame = new QFrame( this );
- frame->setFrameStyle( QFrame::HLine | QFrame::Sunken );
+ TQFrame *frame = new TQFrame( this );
+ frame->setFrameStyle( TQFrame::HLine | TQFrame::Sunken );
mLayout->addMultiCellWidget( frame, row, row, 0, 1 );
row++;
}
@@ -190,8 +190,8 @@ void ContactEditorTabPage::updateLayout()
return;
} else {
mLayout->addMultiCellWidget( *it, row, row + leftHeight - 1, 0, 0 );
- QFrame *frame = new QFrame( this );
- frame->setFrameStyle( QFrame::HLine | QFrame::Sunken );
+ TQFrame *frame = new TQFrame( this );
+ frame->setFrameStyle( TQFrame::HLine | TQFrame::Sunken );
mLayout->addMultiCellWidget( frame, row + leftHeight, row + leftHeight, 0, 1 );
}
diff --git a/kaddressbook/contacteditorwidgetmanager.h b/kaddressbook/contacteditorwidgetmanager.h
index 9b0efbc15..8ffbd1832 100644
--- a/kaddressbook/contacteditorwidgetmanager.h
+++ b/kaddressbook/contacteditorwidgetmanager.h
@@ -24,7 +24,7 @@
#ifndef CONTACTEDITORWIDGETMANAGER_H
#define CONTACTEDITORWIDGETMANAGER_H
-#include <qwidget.h>
+#include <tqwidget.h>
#include "contacteditorwidget.h"
@@ -58,7 +58,7 @@ class ContactEditorWidgetManager : public QObject
private:
void reload();
- QValueList<KAB::ContactEditorWidgetFactory*> mFactories;
+ TQValueList<KAB::ContactEditorWidgetFactory*> mFactories;
static ContactEditorWidgetManager *mSelf;
};
@@ -68,7 +68,7 @@ class ContactEditorTabPage : public QWidget
Q_OBJECT
public:
- ContactEditorTabPage( QWidget *parent, const char *name = 0 );
+ ContactEditorTabPage( TQWidget *parent, const char *name = 0 );
/**
Adds a widget to the tab.
@@ -106,7 +106,7 @@ class ContactEditorTabPage : public QWidget
void changed();
private:
- QGridLayout *mLayout;
+ TQGridLayout *mLayout;
KAB::ContactEditorWidget::List mWidgets;
};
diff --git a/kaddressbook/customfieldswidget.cpp b/kaddressbook/customfieldswidget.cpp
index a2a6e7011..4fc41819c 100644
--- a/kaddressbook/customfieldswidget.cpp
+++ b/kaddressbook/customfieldswidget.cpp
@@ -21,14 +21,14 @@
without including the source code for Qt in the source distribution.
*/
-#include <qcheckbox.h>
-#include <qdatetimeedit.h>
-#include <qframe.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qpushbutton.h>
-#include <qvalidator.h>
-#include <qspinbox.h>
+#include <tqcheckbox.h>
+#include <tqdatetimeedit.h>
+#include <tqframe.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqpushbutton.h>
+#include <tqvalidator.h>
+#include <tqspinbox.h>
#include <kaccelmanager.h>
#include <kcombobox.h>
@@ -42,35 +42,35 @@
#include "customfieldswidget.h"
-AddFieldDialog::AddFieldDialog( QWidget *parent, const char *name )
+AddFieldDialog::AddFieldDialog( TQWidget *parent, const char *name )
: KDialogBase( Plain, i18n( "Add Field" ), Ok | Cancel,
Ok, parent, name, true, true )
{
- QWidget *page = plainPage();
+ TQWidget *page = plainPage();
- QGridLayout *layout = new QGridLayout( page, 3, 2, marginHint(), spacingHint() );
+ TQGridLayout *layout = new TQGridLayout( page, 3, 2, marginHint(), spacingHint() );
- QLabel *label = new QLabel( i18n( "Title:" ), page );
+ TQLabel *label = new TQLabel( i18n( "Title:" ), page );
layout->addWidget( label, 0, 0 );
mTitle = new KLineEdit( page );
- mTitle->setValidator( new QRegExpValidator( QRegExp( "([a-zA-Z]|\\d|-)+" ), mTitle ) );
+ mTitle->setValidator( new TQRegExpValidator( TQRegExp( "([a-zA-Z]|\\d|-)+" ), mTitle ) );
label->setBuddy( mTitle );
layout->addWidget( mTitle, 0, 1 );
- label = new QLabel( i18n( "Type:" ), page );
+ label = new TQLabel( i18n( "Type:" ), page );
layout->addWidget( label, 1, 0 );
mType = new KComboBox( page );
label->setBuddy( mType );
layout->addWidget( mType, 1, 1 );
- mGlobal = new QCheckBox( i18n( "Is available for all contacts" ), page );
+ mGlobal = new TQCheckBox( i18n( "Is available for all contacts" ), page );
mGlobal->setChecked( true );
layout->addMultiCellWidget( mGlobal, 2, 2, 0, 1 );
- connect( mTitle, SIGNAL( textChanged( const QString& ) ),
- this, SLOT( nameChanged( const QString& ) ) );
+ connect( mTitle, TQT_SIGNAL( textChanged( const TQString& ) ),
+ this, TQT_SLOT( nameChanged( const TQString& ) ) );
KAcceleratorManager::manage( this );
@@ -95,18 +95,18 @@ AddFieldDialog::AddFieldDialog( QWidget *parent, const char *name )
mTitle->setFocus();
}
-QString AddFieldDialog::title() const
+TQString AddFieldDialog::title() const
{
return mTitle->text();
}
-QString AddFieldDialog::identifier() const
+TQString AddFieldDialog::identifier() const
{
- QString id = mTitle->text().lower();
+ TQString id = mTitle->text().lower();
return id.replace( ",", "_" ).replace( " ", "_" );
}
-QString AddFieldDialog::type() const
+TQString AddFieldDialog::type() const
{
return mTypeList[ mType->currentItem() ];
}
@@ -116,79 +116,79 @@ bool AddFieldDialog::isGlobal() const
return mGlobal->isChecked();
}
-void AddFieldDialog::nameChanged( const QString &name )
+void AddFieldDialog::nameChanged( const TQString &name )
{
enableButton( Ok, !name.isEmpty() );
}
-FieldWidget::FieldWidget( QWidget *parent, const char *name )
- : QWidget( parent, name )
+FieldWidget::FieldWidget( TQWidget *parent, const char *name )
+ : TQWidget( parent, name )
{
- QVBoxLayout *layout = new QVBoxLayout( this, KDialog::marginHint(),
+ TQVBoxLayout *layout = new TQVBoxLayout( this, KDialog::marginHint(),
KDialog::spacingHint() );
- mGlobalLayout = new QVBoxLayout( layout, KDialog::spacingHint() );
+ mGlobalLayout = new TQVBoxLayout( layout, KDialog::spacingHint() );
mGlobalLayout->setAlignment( Qt::AlignTop );
- mSeparator = new QFrame( this );
- mSeparator->setFrameStyle( QFrame::HLine | QFrame::Sunken );
+ mSeparator = new TQFrame( this );
+ mSeparator->setFrameStyle( TQFrame::HLine | TQFrame::Sunken );
mSeparator->hide();
layout->addWidget( mSeparator );
- mLocalLayout = new QVBoxLayout( layout, KDialog::spacingHint() );
+ mLocalLayout = new TQVBoxLayout( layout, KDialog::spacingHint() );
mLocalLayout->setAlignment( Qt::AlignTop );
}
-void FieldWidget::addField( const QString &identifier, const QString &title,
- const QString &type, bool isGlobal )
+void FieldWidget::addField( const TQString &identifier, const TQString &title,
+ const TQString &type, bool isGlobal )
{
FieldRecord record;
record.mIdentifier = identifier;
record.mTitle = title;
- record.mLabel = new QLabel( title + ":", this );
+ record.mLabel = new TQLabel( title + ":", this );
record.mGlobal = isGlobal;
if ( type == "integer" ) {
- QSpinBox *wdg = new QSpinBox( 0, 1000, 1, this );
+ TQSpinBox *wdg = new TQSpinBox( 0, 1000, 1, this );
record.mWidget = wdg;
- connect( wdg, SIGNAL( valueChanged( int ) ),
- this, SIGNAL( changed() ) );
+ connect( wdg, TQT_SIGNAL( valueChanged( int ) ),
+ this, TQT_SIGNAL( changed() ) );
} else if ( type == "boolean" ) {
- QCheckBox *wdg = new QCheckBox( this );
+ TQCheckBox *wdg = new TQCheckBox( this );
record.mWidget = wdg;
- connect( wdg, SIGNAL( toggled( bool ) ),
- this, SIGNAL( changed() ) );
+ connect( wdg, TQT_SIGNAL( toggled( bool ) ),
+ this, TQT_SIGNAL( changed() ) );
} else if ( type == "date" ) {
QDateEdit *wdg = new QDateEdit( this );
record.mWidget = wdg;
- connect( wdg, SIGNAL( valueChanged( const QDate& ) ),
- this, SIGNAL( changed() ) );
+ connect( wdg, TQT_SIGNAL( valueChanged( const TQDate& ) ),
+ this, TQT_SIGNAL( changed() ) );
} else if ( type == "time" ) {
QTimeEdit *wdg = new QTimeEdit( this );
record.mWidget = wdg;
- connect( wdg, SIGNAL( valueChanged( const QTime& ) ),
- this, SIGNAL( changed() ) );
+ connect( wdg, TQT_SIGNAL( valueChanged( const TQTime& ) ),
+ this, TQT_SIGNAL( changed() ) );
} else if ( type == "datetime" ) {
QDateTimeEdit *wdg = new QDateTimeEdit( this );
record.mWidget = wdg;
- connect( wdg, SIGNAL( valueChanged( const QDateTime& ) ),
- this, SIGNAL( changed() ) );
+ connect( wdg, TQT_SIGNAL( valueChanged( const TQDateTime& ) ),
+ this, TQT_SIGNAL( changed() ) );
} else if ( type == "text" ) {
- QLineEdit *wdg = new QLineEdit( this );
+ TQLineEdit *wdg = new TQLineEdit( this );
record.mWidget = wdg;
- connect( wdg, SIGNAL( textChanged( const QString& ) ),
- this, SIGNAL( changed() ) );
+ connect( wdg, TQT_SIGNAL( textChanged( const TQString& ) ),
+ this, TQT_SIGNAL( changed() ) );
}
record.mLabel->show();
record.mWidget->show();
if ( isGlobal ) {
- record.mLayout = new QHBoxLayout( mGlobalLayout );
+ record.mLayout = new TQHBoxLayout( mGlobalLayout );
record.mLayout->addWidget( record.mLabel );
record.mLayout->addWidget( record.mWidget, Qt::AlignLeft );
} else {
- record.mLayout = new QHBoxLayout( mLocalLayout );
+ record.mLayout = new TQHBoxLayout( mLocalLayout );
record.mLayout->addWidget( record.mLabel );
record.mLayout->addWidget( record.mWidget, Qt::AlignLeft );
mSeparator->show();
@@ -199,7 +199,7 @@ void FieldWidget::addField( const QString &identifier, const QString &title,
recalculateLayout();
}
-void FieldWidget::removeField( const QString &identifier )
+void FieldWidget::removeField( const TQString &identifier )
{
FieldRecordList::Iterator it;
for ( it = mFieldList.begin(); it != mFieldList.end(); ++it ) {
@@ -227,37 +227,37 @@ void FieldWidget::clearFields()
{
FieldRecordList::ConstIterator fieldIt;
for ( fieldIt = mFieldList.begin(); fieldIt != mFieldList.end(); ++fieldIt ) {
- if ( (*fieldIt).mWidget->isA( "QLineEdit" ) ) {
- QLineEdit *wdg = static_cast<QLineEdit*>( (*fieldIt).mWidget );
- wdg->setText( QString() );
- } else if ( (*fieldIt).mWidget->isA( "QSpinBox" ) ) {
- QSpinBox *wdg = static_cast<QSpinBox*>( (*fieldIt).mWidget );
+ if ( (*fieldIt).mWidget->isA( "TQLineEdit" ) ) {
+ TQLineEdit *wdg = static_cast<TQLineEdit*>( (*fieldIt).mWidget );
+ wdg->setText( TQString() );
+ } else if ( (*fieldIt).mWidget->isA( "TQSpinBox" ) ) {
+ TQSpinBox *wdg = static_cast<TQSpinBox*>( (*fieldIt).mWidget );
wdg->setValue( 0 );
- } else if ( (*fieldIt).mWidget->isA( "QCheckBox" ) ) {
- QCheckBox *wdg = static_cast<QCheckBox*>( (*fieldIt).mWidget );
+ } else if ( (*fieldIt).mWidget->isA( "TQCheckBox" ) ) {
+ TQCheckBox *wdg = static_cast<TQCheckBox*>( (*fieldIt).mWidget );
wdg->setChecked( true );
} else if ( (*fieldIt).mWidget->isA( "QDateEdit" ) ) {
QDateEdit *wdg = static_cast<QDateEdit*>( (*fieldIt).mWidget );
- wdg->setDate( QDate::currentDate() );
+ wdg->setDate( TQDate::currentDate() );
} else if ( (*fieldIt).mWidget->isA( "QTimeEdit" ) ) {
QTimeEdit *wdg = static_cast<QTimeEdit*>( (*fieldIt).mWidget );
- wdg->setTime( QTime::currentTime() );
+ wdg->setTime( TQTime::currentTime() );
} else if ( (*fieldIt).mWidget->isA( "QDateTimeEdit" ) ) {
QDateTimeEdit *wdg = static_cast<QDateTimeEdit*>( (*fieldIt).mWidget );
- wdg->setDateTime( QDateTime::currentDateTime() );
+ wdg->setDateTime( TQDateTime::currentDateTime() );
}
}
}
void FieldWidget::loadContact( KABC::Addressee *addr )
{
- const QStringList customs = addr->customs();
+ const TQStringList customs = addr->customs();
clearFields();
- QStringList::ConstIterator it;
+ TQStringList::ConstIterator it;
for ( it = customs.begin(); it != customs.end(); ++it ) {
- QString app, name, value;
+ TQString app, name, value;
splitField( *it, app, name, value );
if ( app != "KADDRESSBOOK" )
continue;
@@ -265,24 +265,24 @@ void FieldWidget::loadContact( KABC::Addressee *addr )
FieldRecordList::ConstIterator fieldIt;
for ( fieldIt = mFieldList.begin(); fieldIt != mFieldList.end(); ++fieldIt ) {
if ( (*fieldIt).mIdentifier == name ) {
- if ( (*fieldIt).mWidget->isA( "QLineEdit" ) ) {
- QLineEdit *wdg = static_cast<QLineEdit*>( (*fieldIt).mWidget );
+ if ( (*fieldIt).mWidget->isA( "TQLineEdit" ) ) {
+ TQLineEdit *wdg = static_cast<TQLineEdit*>( (*fieldIt).mWidget );
wdg->setText( value );
- } else if ( (*fieldIt).mWidget->isA( "QSpinBox" ) ) {
- QSpinBox *wdg = static_cast<QSpinBox*>( (*fieldIt).mWidget );
+ } else if ( (*fieldIt).mWidget->isA( "TQSpinBox" ) ) {
+ TQSpinBox *wdg = static_cast<TQSpinBox*>( (*fieldIt).mWidget );
wdg->setValue( value.toInt() );
- } else if ( (*fieldIt).mWidget->isA( "QCheckBox" ) ) {
- QCheckBox *wdg = static_cast<QCheckBox*>( (*fieldIt).mWidget );
+ } else if ( (*fieldIt).mWidget->isA( "TQCheckBox" ) ) {
+ TQCheckBox *wdg = static_cast<TQCheckBox*>( (*fieldIt).mWidget );
wdg->setChecked( value == "true" || value == "1" );
} else if ( (*fieldIt).mWidget->isA( "QDateEdit" ) ) {
QDateEdit *wdg = static_cast<QDateEdit*>( (*fieldIt).mWidget );
- wdg->setDate( QDate::fromString( value, Qt::ISODate ) );
+ wdg->setDate( TQDate::fromString( value, Qt::ISODate ) );
} else if ( (*fieldIt).mWidget->isA( "QTimeEdit" ) ) {
QTimeEdit *wdg = static_cast<QTimeEdit*>( (*fieldIt).mWidget );
- wdg->setTime( QTime::fromString( value, Qt::ISODate ) );
+ wdg->setTime( TQTime::fromString( value, Qt::ISODate ) );
} else if ( (*fieldIt).mWidget->isA( "QDateTimeEdit" ) ) {
QDateTimeEdit *wdg = static_cast<QDateTimeEdit*>( (*fieldIt).mWidget );
- wdg->setDateTime( QDateTime::fromString( value, Qt::ISODate ) );
+ wdg->setDateTime( TQDateTime::fromString( value, Qt::ISODate ) );
}
}
}
@@ -293,15 +293,15 @@ void FieldWidget::storeContact( KABC::Addressee *addr )
{
FieldRecordList::ConstIterator it;
for ( it = mFieldList.begin(); it != mFieldList.end(); ++it ) {
- QString value;
- if ( (*it).mWidget->isA( "QLineEdit" ) ) {
- QLineEdit *wdg = static_cast<QLineEdit*>( (*it).mWidget );
+ TQString value;
+ if ( (*it).mWidget->isA( "TQLineEdit" ) ) {
+ TQLineEdit *wdg = static_cast<TQLineEdit*>( (*it).mWidget );
value = wdg->text();
- } else if ( (*it).mWidget->isA( "QSpinBox" ) ) {
- QSpinBox *wdg = static_cast<QSpinBox*>( (*it).mWidget );
- value = QString::number( wdg->value() );
- } else if ( (*it).mWidget->isA( "QCheckBox" ) ) {
- QCheckBox *wdg = static_cast<QCheckBox*>( (*it).mWidget );
+ } else if ( (*it).mWidget->isA( "TQSpinBox" ) ) {
+ TQSpinBox *wdg = static_cast<TQSpinBox*>( (*it).mWidget );
+ value = TQString::number( wdg->value() );
+ } else if ( (*it).mWidget->isA( "TQCheckBox" ) ) {
+ TQCheckBox *wdg = static_cast<TQCheckBox*>( (*it).mWidget );
value = ( wdg->isChecked() ? "true" : "false" );
} else if ( (*it).mWidget->isA( "QDateEdit" ) ) {
QDateEdit *wdg = static_cast<QDateEdit*>( (*it).mWidget );
@@ -350,15 +350,15 @@ void FieldWidget::recalculateLayout()
}
CustomFieldsWidget::CustomFieldsWidget( KABC::AddressBook *ab,
- QWidget *parent, const char *name )
+ TQWidget *parent, const char *name )
: KAB::ContactEditorWidget( ab, parent, name )
{
initGUI();
- connect( mAddButton, SIGNAL( clicked() ), this, SLOT( addField() ) );
- connect( mRemoveButton, SIGNAL( clicked() ), this, SLOT( removeField() ) );
+ connect( mAddButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( addField() ) );
+ connect( mRemoveButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( removeField() ) );
- connect( mFieldWidget, SIGNAL( changed() ), this, SLOT( setModified() ) );
+ connect( mFieldWidget, TQT_SIGNAL( changed() ), this, TQT_SLOT( setModified() ) );
}
void CustomFieldsWidget::loadContact( KABC::Addressee *addr )
@@ -368,7 +368,7 @@ void CustomFieldsWidget::loadContact( KABC::Addressee *addr )
mFieldWidget->removeLocalFields();
AddresseeConfig addrConfig( mAddressee );
- QStringList fields = addrConfig.customFields();
+ TQStringList fields = addrConfig.customFields();
if ( !fields.isEmpty() ) {
for ( uint i = 0; i < fields.count(); i += 3 ) {
@@ -424,14 +424,14 @@ void CustomFieldsWidget::removeField()
{
const FieldRecordList list = mFieldWidget->fields();
- QStringList fields;
+ TQStringList fields;
FieldRecordList::ConstIterator it;
for ( it = list.begin(); it != list.end(); ++it )
fields.append( (*it).mTitle );
bool ok;
- QString title = KInputDialog::getItem( i18n( "Remove Field" ),
+ TQString title = KInputDialog::getItem( i18n( "Remove Field" ),
i18n( "Select the field you want to remove:" ),
fields, 0, false, &ok, this );
@@ -457,21 +457,21 @@ void CustomFieldsWidget::removeField()
void CustomFieldsWidget::initGUI()
{
- QGridLayout *layout = new QGridLayout( this, 2, 3, KDialog::marginHint(),
+ TQGridLayout *layout = new TQGridLayout( this, 2, 3, KDialog::marginHint(),
KDialog::spacingHint() );
mFieldWidget = new FieldWidget( this );
layout->addMultiCellWidget( mFieldWidget, 0, 0, 0, 2 );
- mAddButton = new QPushButton( i18n( "Add Field..." ), this );
+ mAddButton = new TQPushButton( i18n( "Add Field..." ), this );
layout->addWidget( mAddButton, 1, 1, Qt::AlignRight );
- mRemoveButton = new QPushButton( i18n( "Remove Field..." ), this );
+ mRemoveButton = new TQPushButton( i18n( "Remove Field..." ), this );
mRemoveButton->setEnabled( false );
layout->addWidget( mRemoveButton, 1, 2, Qt::AlignRight );
// load global fields
- QStringList globalFields = KABPrefs::instance()->globalCustomFields();
+ TQStringList globalFields = KABPrefs::instance()->globalCustomFields();
if ( globalFields.isEmpty() )
return;
@@ -483,9 +483,9 @@ void CustomFieldsWidget::initGUI()
}
}
-QStringList CustomFieldsWidget::marshallFields( bool global ) const
+TQStringList CustomFieldsWidget::marshallFields( bool global ) const
{
- QStringList retval;
+ TQStringList retval;
const FieldRecordList list = mFieldWidget->fields();
FieldRecordList::ConstIterator it;
@@ -494,10 +494,10 @@ QStringList CustomFieldsWidget::marshallFields( bool global ) const
retval.append( (*it).mIdentifier );
retval.append( (*it).mTitle );
- QString type = "text";
- if ( (*it).mWidget->isA( "QSpinBox" ) ) {
+ TQString type = "text";
+ if ( (*it).mWidget->isA( "TQSpinBox" ) ) {
type = "integer";
- } else if ( (*it).mWidget->isA( "QCheckBox" ) ) {
+ } else if ( (*it).mWidget->isA( "TQCheckBox" ) ) {
type = "boolean";
} else if ( (*it).mWidget->isA( "QDateEdit" ) ) {
type = "date";
@@ -505,7 +505,7 @@ QStringList CustomFieldsWidget::marshallFields( bool global ) const
type = "time";
} else if ( (*it).mWidget->isA( "QDateTimeEdit" ) ) {
type = "datetime";
- } else if ( (*it).mWidget->isA( "QLineEdit" ) ) {
+ } else if ( (*it).mWidget->isA( "TQLineEdit" ) ) {
type = "text";
}
@@ -517,11 +517,11 @@ QStringList CustomFieldsWidget::marshallFields( bool global ) const
}
-void splitField( const QString &str, QString &app, QString &name, QString &value )
+void splitField( const TQString &str, TQString &app, TQString &name, TQString &value )
{
int colon = str.find( ':' );
if ( colon != -1 ) {
- QString tmp = str.left( colon );
+ TQString tmp = str.left( colon );
value = str.mid( colon + 1 );
int dash = tmp.find( '-' );
diff --git a/kaddressbook/customfieldswidget.h b/kaddressbook/customfieldswidget.h
index 6ee10a39a..19e962027 100644
--- a/kaddressbook/customfieldswidget.h
+++ b/kaddressbook/customfieldswidget.h
@@ -28,11 +28,11 @@
#include <kdialogbase.h>
#include <klocale.h>
-#include <qmap.h>
-#include <qpair.h>
-#include <qstringlist.h>
-#include <qvaluevector.h>
-#include <qwidget.h>
+#include <tqmap.h>
+#include <tqpair.h>
+#include <tqstringlist.h>
+#include <tqvaluevector.h>
+#include <tqwidget.h>
#include "contacteditorwidget.h"
@@ -47,39 +47,39 @@ class KComboBox;
class KLineEdit;
typedef struct {
- QString mIdentifier;
- QString mTitle;
+ TQString mIdentifier;
+ TQString mTitle;
bool mGlobal;
- QLabel *mLabel;
- QWidget *mWidget;
- QHBoxLayout *mLayout;
+ TQLabel *mLabel;
+ TQWidget *mWidget;
+ TQHBoxLayout *mLayout;
} FieldRecord;
-typedef QValueList<FieldRecord> FieldRecordList;
+typedef TQValueList<FieldRecord> FieldRecordList;
class AddFieldDialog : public KDialogBase
{
Q_OBJECT
public:
- AddFieldDialog( QWidget *parent, const char *name = 0 );
+ AddFieldDialog( TQWidget *parent, const char *name = 0 );
- QString title() const;
- QString identifier() const;
- QString type() const;
+ TQString title() const;
+ TQString identifier() const;
+ TQString type() const;
bool isGlobal() const;
private slots:
- void nameChanged( const QString& );
+ void nameChanged( const TQString& );
private:
KLineEdit *mTitle;
KComboBox *mType;
- QCheckBox *mGlobal;
+ TQCheckBox *mGlobal;
- QValueVector<QString> mTypeList;
- QValueVector<QString> mTypeName;
+ TQValueVector<TQString> mTypeList;
+ TQValueVector<TQString> mTypeName;
};
class FieldWidget : public QWidget
@@ -87,12 +87,12 @@ class FieldWidget : public QWidget
Q_OBJECT
public:
- FieldWidget( QWidget *parent, const char *name = 0 );
+ FieldWidget( TQWidget *parent, const char *name = 0 );
- void addField( const QString &identifier, const QString &title,
- const QString &type, bool isGlobal );
+ void addField( const TQString &identifier, const TQString &title,
+ const TQString &type, bool isGlobal );
- void removeField( const QString &identifier );
+ void removeField( const TQString &identifier );
void loadContact( KABC::Addressee *addr );
void storeContact( KABC::Addressee *addr );
@@ -109,9 +109,9 @@ class FieldWidget : public QWidget
private:
void recalculateLayout();
- QVBoxLayout *mGlobalLayout;
- QVBoxLayout *mLocalLayout;
- QFrame *mSeparator;
+ TQVBoxLayout *mGlobalLayout;
+ TQVBoxLayout *mLocalLayout;
+ TQFrame *mSeparator;
FieldRecordList mFieldList;
};
@@ -121,7 +121,7 @@ class CustomFieldsWidget : public KAB::ContactEditorWidget
Q_OBJECT
public:
- CustomFieldsWidget( KABC::AddressBook *ab, QWidget *parent, const char *name = 0 );
+ CustomFieldsWidget( KABC::AddressBook *ab, TQWidget *parent, const char *name = 0 );
void loadContact( KABC::Addressee *addr );
void storeContact( KABC::Addressee *addr );
@@ -134,11 +134,11 @@ class CustomFieldsWidget : public KAB::ContactEditorWidget
private:
void initGUI();
- QStringList marshallFields( bool ) const;
+ TQStringList marshallFields( bool ) const;
- QPushButton *mAddButton;
- QPushButton *mRemoveButton;
- QGridLayout *mLayout;
+ TQPushButton *mAddButton;
+ TQPushButton *mRemoveButton;
+ TQGridLayout *mLayout;
FieldWidget *mFieldWidget;
@@ -148,15 +148,15 @@ class CustomFieldsWidget : public KAB::ContactEditorWidget
class CustomFieldsWidgetFactory : public KAB::ContactEditorWidgetFactory
{
public:
- KAB::ContactEditorWidget *createWidget( KABC::AddressBook *ab, QWidget *parent, const char *name )
+ KAB::ContactEditorWidget *createWidget( KABC::AddressBook *ab, TQWidget *parent, const char *name )
{
return new CustomFieldsWidget( ab, parent, name );
}
- QString pageTitle() const { return i18n( "Custom Fields" ); }
- QString pageIdentifier() const { return "custom_fields"; }
+ TQString pageTitle() const { return i18n( "Custom Fields" ); }
+ TQString pageIdentifier() const { return "custom_fields"; }
};
-void splitField( const QString&, QString&, QString&, QString& );
+void splitField( const TQString&, TQString&, TQString&, TQString& );
#endif
diff --git a/kaddressbook/distributionlisteditor.cpp b/kaddressbook/distributionlisteditor.cpp
index a18b5493f..1c57a134b 100644
--- a/kaddressbook/distributionlisteditor.cpp
+++ b/kaddressbook/distributionlisteditor.cpp
@@ -37,47 +37,47 @@
#include <klocale.h>
#include <kmessagebox.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qsignalmapper.h>
-#include <qtoolbutton.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqsignalmapper.h>
+#include <tqtoolbutton.h>
class KPIM::DistributionListEditor::EditorWidgetPrivate
{
public:
- QScrollView* scrollView;
- QSignalMapper* mapper;
+ TQScrollView* scrollView;
+ TQSignalMapper* mapper;
KABC::AddressBook* addressBook;
- QString distListUid;
- QLabel* nameLabel;
- QLabel* memberListLabel;
+ TQString distListUid;
+ TQLabel* nameLabel;
+ TQLabel* memberListLabel;
KLineEdit* nameLineEdit;
- QWidget* memberListWidget;
- QVBoxLayout* addresseeLayout;
- QValueList<KPIM::DistributionListEditor::Line*> addressees;
+ TQWidget* memberListWidget;
+ TQVBoxLayout* addresseeLayout;
+ TQValueList<KPIM::DistributionListEditor::Line*> addressees;
KPIM::DistributionList distributionList;
KPIM::DistributionListEditor::Line* addLineForEntry( const KPIM::DistributionList::Entry& entry );
int lastLineId;
};
-KPIM::DistributionListEditor::Line::Line( KABC::AddressBook* book, QWidget* parent ) : QWidget( parent ), m_addressBook( book )
+KPIM::DistributionListEditor::Line::Line( KABC::AddressBook* book, TQWidget* parent ) : TQWidget( parent ), m_addressBook( book )
{
Q_ASSERT( m_addressBook );
- QBoxLayout* layout = new QHBoxLayout( this );
+ TQBoxLayout* layout = new TQHBoxLayout( this );
layout->setSpacing( KDialog::spacingHint() );
m_lineEdit = new KPIM::DistributionListEditor::LineEdit( this );
- connect( m_lineEdit, SIGNAL( textChanged( const QString& ) ),
- this, SLOT( textChanged( const QString& ) ) );
+ connect( m_lineEdit, TQT_SIGNAL( textChanged( const TQString& ) ),
+ this, TQT_SLOT( textChanged( const TQString& ) ) );
layout->addWidget( m_lineEdit );
- m_clearButton = new QToolButton( this );
+ m_clearButton = new TQToolButton( this );
m_clearButton->setIconSet( KApplication::reverseLayout() ? SmallIconSet("locationbar_erase") : SmallIconSet( "clear_left" ) );
m_clearButton->setEnabled( false );
layout->addWidget( m_clearButton );
- connect( m_clearButton, SIGNAL( clicked() ), m_lineEdit, SLOT( clear() ) );
+ connect( m_clearButton, TQT_SIGNAL( clicked() ), m_lineEdit, TQT_SLOT( clear() ) );
}
-void KPIM::DistributionListEditor::Line::textChanged( const QString& text )
+void KPIM::DistributionListEditor::Line::textChanged( const TQString& text )
{
m_clearButton->setEnabled( !text.isEmpty() );
if ( text.isEmpty() )
@@ -97,7 +97,7 @@ void KPIM::DistributionListEditor::Line::setEntry( const KPIM::DistributionList:
m_lineEdit->setText( m_initialText );
}
-KABC::Addressee KPIM::DistributionListEditor::Line::findAddressee( const QString& name, const QString& email ) const
+KABC::Addressee KPIM::DistributionListEditor::Line::findAddressee( const TQString& name, const TQString& email ) const
{
if ( name.isEmpty() && email.isEmpty() )
return KABC::Addressee();
@@ -125,9 +125,9 @@ KABC::Addressee KPIM::DistributionListEditor::Line::findAddressee( const QString
KPIM::DistributionList::Entry KPIM::DistributionListEditor::Line::entry() const
{
- const QString text = m_lineEdit->text();
- QString name;
- QString email;
+ const TQString text = m_lineEdit->text();
+ TQString name;
+ TQString email;
KPIM::getNameAndMail(m_lineEdit->text(), name, email );
KPIM::DistributionList::Entry res;
@@ -139,34 +139,34 @@ KPIM::DistributionList::Entry KPIM::DistributionListEditor::Line::entry() const
}
if ( res.addressee.isEmpty() )
res.addressee = findAddressee( name, email );
- res.email = res.addressee.preferredEmail() != email ? email : QString();
+ res.email = res.addressee.preferredEmail() != email ? email : TQString();
return res;
}
-KPIM::DistributionListEditor::LineEdit::LineEdit( QWidget* parent ) : KPIM::AddresseeLineEdit( parent )
+KPIM::DistributionListEditor::LineEdit::LineEdit( TQWidget* parent ) : KPIM::AddresseeLineEdit( parent )
{
}
-KPIM::DistributionListEditor::EditorWidget::EditorWidget( KABC::AddressBook* book, QWidget* parent )
- : KDialogBase( parent, /*name=*/0, /*modal=*/ true, /*caption=*/QString(), KDialogBase::Ok|KDialogBase::Cancel ), d( new DistributionListEditor::EditorWidgetPrivate )
+KPIM::DistributionListEditor::EditorWidget::EditorWidget( KABC::AddressBook* book, TQWidget* parent )
+ : KDialogBase( parent, /*name=*/0, /*modal=*/ true, /*caption=*/TQString(), KDialogBase::Ok|KDialogBase::Cancel ), d( new DistributionListEditor::EditorWidgetPrivate )
{
d->addressBook = book;
Q_ASSERT( d->addressBook );
d->lastLineId = 0;
- d->mapper = new QSignalMapper( this );
- connect( d->mapper, SIGNAL( mapped( int ) ),
- this, SLOT( lineTextChanged( int ) ) );
+ d->mapper = new TQSignalMapper( this );
+ connect( d->mapper, TQT_SIGNAL( mapped( int ) ),
+ this, TQT_SLOT( lineTextChanged( int ) ) );
setCaption( i18n( "Edit Distribution List" ) );
- QWidget* main = new QWidget( this );
- QVBoxLayout* mainLayout = new QVBoxLayout( main );
+ TQWidget* main = new TQWidget( this );
+ TQVBoxLayout* mainLayout = new TQVBoxLayout( main );
mainLayout->setMargin( KDialog::marginHint() );
mainLayout->setSpacing( KDialog::spacingHint() );
- QHBoxLayout* nameLayout = new QHBoxLayout;
+ TQHBoxLayout* nameLayout = new QHBoxLayout;
nameLayout->setSpacing( KDialog::spacingHint() );
- d->nameLabel = new QLabel( main );
+ d->nameLabel = new TQLabel( main );
d->nameLabel->setText( i18n( "Name:" ) );
nameLayout->addWidget( d->nameLabel );
@@ -176,27 +176,27 @@ KPIM::DistributionListEditor::EditorWidget::EditorWidget( KABC::AddressBook* boo
mainLayout->addLayout( nameLayout );
mainLayout->addSpacing( 30 );
- d->memberListLabel = new QLabel( main );
+ d->memberListLabel = new TQLabel( main );
d->memberListLabel->setText( i18n( "Distribution list members:" ) );
mainLayout->addWidget( d->memberListLabel );
- d->scrollView = new QScrollView( main );
- d->scrollView->setFrameShape( QFrame::NoFrame );
+ d->scrollView = new TQScrollView( main );
+ d->scrollView->setFrameShape( TQFrame::NoFrame );
mainLayout->addWidget( d->scrollView );
- d->memberListWidget = new QWidget( d->scrollView->viewport() );
- d->memberListWidget->setSizePolicy( QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding );
- QVBoxLayout* memberLayout = new QVBoxLayout( d->memberListWidget );
+ d->memberListWidget = new TQWidget( d->scrollView->viewport() );
+ d->memberListWidget->setSizePolicy( TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding );
+ TQVBoxLayout* memberLayout = new TQVBoxLayout( d->memberListWidget );
d->addresseeLayout = new QVBoxLayout;
d->addresseeLayout->setSpacing( KDialog::spacingHint() );
memberLayout->addItem( d->addresseeLayout );
memberLayout->addStretch();
d->scrollView->addChild( d->memberListWidget );
- d->scrollView->setResizePolicy( QScrollView::AutoOneFit );
+ d->scrollView->setResizePolicy( TQScrollView::AutoOneFit );
setMainWidget( main );
KPIM::DistributionListEditor::Line* const last = d->addLineForEntry( KPIM::DistributionList::Entry() );
- const QSize hint = sizeHint();
+ const TQSize hint = sizeHint();
resize( hint.width() * 1.5, hint.height() );
}
@@ -219,7 +219,7 @@ void KPIM::DistributionListEditor::EditorWidget::setDistributionList( const KPIM
d->nameLineEdit->setText( list.name() );
using KPIM::DistributionListEditor::Line;
- typedef QValueList<Line*>::ConstIterator ListIterator;
+ typedef TQValueList<Line*>::ConstIterator ListIterator;
for ( ListIterator it = d->addressees.begin(), end = d->addressees.end(); it != end; ++it )
{
delete *it;
@@ -243,8 +243,8 @@ KPIM::DistributionListEditor::Line* KPIM::DistributionListEditor::EditorWidgetPr
line->setEntry( entry );
addresseeLayout->addWidget( line );
addressees.append( line );
- QObject::connect( line, SIGNAL( textChanged() ),
- mapper, SLOT( map() ) );
+ TQObject::connect( line, TQT_SIGNAL( textChanged() ),
+ mapper, TQT_SLOT( map() ) );
mapper->setMapping( line, ++lastLineId );
line->setShown( true );
return line;
@@ -252,7 +252,7 @@ KPIM::DistributionListEditor::Line* KPIM::DistributionListEditor::EditorWidgetPr
void KPIM::DistributionListEditor::EditorWidget::slotOk()
{
- const QString name = d->nameLineEdit->text();
+ const TQString name = d->nameLineEdit->text();
const KPIM::DistributionList existing = KPIM::DistributionList::findByName( d->addressBook, name );
if ( !existing.isEmpty() && existing.uid() != d->distListUid )
{
@@ -263,7 +263,7 @@ void KPIM::DistributionListEditor::EditorWidget::slotOk()
KPIM::DistributionList list;
list.setUid( d->distListUid.isNull() ? KApplication::randomString( 10 ) :d->distListUid );
list.setName( name );
- typedef QValueList<KPIM::DistributionListEditor::Line*>::ConstIterator ListIterator;
+ typedef TQValueList<KPIM::DistributionListEditor::Line*>::ConstIterator ListIterator;
for ( ListIterator it = d->addressees.begin(), end = d->addressees.end(); it != end; ++it )
{
const KPIM::DistributionList::Entry entry = (*it)->entry();
diff --git a/kaddressbook/distributionlisteditor.h b/kaddressbook/distributionlisteditor.h
index 193ff83f1..7c5121094 100644
--- a/kaddressbook/distributionlisteditor.h
+++ b/kaddressbook/distributionlisteditor.h
@@ -40,7 +40,7 @@ class EditorWidget : public KDialogBase
{
Q_OBJECT
public:
- explicit EditorWidget( KABC::AddressBook* book, QWidget* parent = 0 );
+ explicit EditorWidget( KABC::AddressBook* book, TQWidget* parent = 0 );
~EditorWidget();
void setDistributionList( const KPIM::DistributionList& list );
diff --git a/kaddressbook/distributionlisteditor_p.h b/kaddressbook/distributionlisteditor_p.h
index e8708698f..61573ae97 100644
--- a/kaddressbook/distributionlisteditor_p.h
+++ b/kaddressbook/distributionlisteditor_p.h
@@ -26,8 +26,8 @@
#include <libkdepim/addresseelineedit.h>
#include <libkdepim/distributionlist.h>
-#include <qpushbutton.h>
-#include <qstring.h>
+#include <tqpushbutton.h>
+#include <tqstring.h>
class QToolButton;
@@ -43,7 +43,7 @@ class LineEdit : public KPIM::AddresseeLineEdit
{
Q_OBJECT
public:
- explicit LineEdit( QWidget* parent = 0 );
+ explicit LineEdit( TQWidget* parent = 0 );
};
@@ -51,7 +51,7 @@ class Line : public QWidget
{
Q_OBJECT
public:
- explicit Line( KABC::AddressBook* book, QWidget* parent = 0 );
+ explicit Line( KABC::AddressBook* book, TQWidget* parent = 0 );
void setEntry( const KPIM::DistributionList::Entry& entry );
KPIM::DistributionList::Entry entry() const;
@@ -62,16 +62,16 @@ signals:
void textChanged();
private:
- KABC::Addressee findAddressee( const QString& name, const QString& email ) const;
+ KABC::Addressee findAddressee( const TQString& name, const TQString& email ) const;
private slots:
- void textChanged( const QString& );
+ void textChanged( const TQString& );
private:
- QString m_uid;
- QString m_initialText;
+ TQString m_uid;
+ TQString m_initialText;
LineEdit* m_lineEdit;
- QToolButton* m_clearButton;
+ TQToolButton* m_clearButton;
KABC::AddressBook* m_addressBook;
};
diff --git a/kaddressbook/distributionlistentryview.cpp b/kaddressbook/distributionlistentryview.cpp
index 2db13f808..8e421a760 100644
--- a/kaddressbook/distributionlistentryview.cpp
+++ b/kaddressbook/distributionlistentryview.cpp
@@ -12,55 +12,55 @@
#include <klocale.h>
#include <kurllabel.h>
-#include <qbuttongroup.h>
-#include <qcombobox.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qradiobutton.h>
-#include <qstringlist.h>
-#include <qvbuttongroup.h>
-
-KAB::DistributionListEntryView::DistributionListEntryView( KAB::Core* core, QWidget* parent ) : QWidget( parent ), m_core( core ), m_emailGroup( 0 )
+#include <tqbuttongroup.h>
+#include <tqcombobox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqradiobutton.h>
+#include <tqstringlist.h>
+#include <tqvbuttongroup.h>
+
+KAB::DistributionListEntryView::DistributionListEntryView( KAB::Core* core, TQWidget* parent ) : TQWidget( parent ), m_core( core ), m_emailGroup( 0 )
{
- m_mainLayout = new QVBoxLayout( this );
+ m_mainLayout = new TQVBoxLayout( this );
m_mainLayout->setSpacing( KDialog::spacingHint() );
m_mainLayout->setMargin( KDialog::marginHint() );
- QBoxLayout* headerLayout = new QHBoxLayout;
+ TQBoxLayout* headerLayout = new QHBoxLayout;
headerLayout->setSpacing( KDialog::spacingHint() * 3 );
- m_imageLabel = new QLabel( this );
+ m_imageLabel = new TQLabel( this );
m_imageLabel->setAutoResize( true );
headerLayout->addWidget( m_imageLabel, 0, Qt::AlignTop );
- m_addresseeLabel = new QLabel( this );
+ m_addresseeLabel = new TQLabel( this );
headerLayout->addWidget( m_addresseeLabel, 0, Qt::AlignTop );
headerLayout->addStretch();
m_mainLayout->addItem( headerLayout );
- QBoxLayout* distLayout = new QHBoxLayout;
+ TQBoxLayout* distLayout = new QHBoxLayout;
distLayout->setSpacing( KDialog::spacingHint() );
- QLabel* distLabel = new QLabel( this );
+ TQLabel* distLabel = new TQLabel( this );
distLabel->setText( i18n( "<b>Distribution list:</b>" ) );
distLabel->setAlignment( Qt::SingleLine );
distLayout->addWidget( distLabel );
m_distListLabel = new KURLLabel( this );
distLabel->setBuddy( m_distListLabel );
- connect( m_distListLabel, SIGNAL( leftClickedURL( const QString& ) ),
- this, SIGNAL( distributionListClicked( const QString& ) ) );
+ connect( m_distListLabel, TQT_SIGNAL( leftClickedURL( const TQString& ) ),
+ this, TQT_SIGNAL( distributionListClicked( const TQString& ) ) );
distLayout->addWidget( m_distListLabel );
distLayout->addStretch();
m_mainLayout->addItem( distLayout );
- QLabel* emailLabel = new QLabel( this );
+ TQLabel* emailLabel = new TQLabel( this );
emailLabel->setText( i18n( "<b>Email address to use in this list:</b>" ) );
emailLabel->setAlignment( Qt::SingleLine );
m_mainLayout->addWidget( emailLabel );
- QBoxLayout* emailLayout = new QHBoxLayout;
+ TQBoxLayout* emailLayout = new QHBoxLayout;
emailLayout->setSpacing( KDialog::spacingHint() );
emailLayout->addSpacing( 30 );
@@ -69,9 +69,9 @@ KAB::DistributionListEntryView::DistributionListEntryView( KAB::Core* core, QWid
emailLayout->addStretch();
m_mainLayout->addItem( emailLayout );
- QBoxLayout* resourceLayout = new QHBoxLayout;
+ TQBoxLayout* resourceLayout = new QHBoxLayout;
resourceLayout->setSpacing( KDialog::spacingHint() );
- m_resourceLabel = new QLabel( this );
+ m_resourceLabel = new TQLabel( this );
resourceLayout->addWidget( m_resourceLabel );
resourceLayout->addStretch();
@@ -81,7 +81,7 @@ KAB::DistributionListEntryView::DistributionListEntryView( KAB::Core* core, QWid
void KAB::DistributionListEntryView::emailButtonClicked( int id )
{
- const QString email = m_idToEmail[ id ];
+ const TQString email = m_idToEmail[ id ];
if ( m_entry.email == email )
return;
m_list.removeEntry( m_entry.addressee, m_entry.email );
@@ -103,34 +103,34 @@ void KAB::DistributionListEntryView::setEntry( const KPIM::DistributionList& lis
delete m_emailGroup;
m_emailGroup = 0;
- QPixmap pixmap;
+ TQPixmap pixmap;
pixmap.convertFromImage( m_entry.addressee.photo().data() );
m_imageLabel->setPixmap( pixmap.isNull() ? KGlobal::iconLoader()->loadIcon( "personal", KIcon::Desktop ) : pixmap );
m_addresseeLabel->setText( i18n( "Formatted name, role, organization", "<qt><h2>%1</h2><p>%2<br/>%3</p></qt>" ).arg( m_entry.addressee.formattedName(), m_entry.addressee.role(), m_entry.addressee.organization() ) );
m_distListLabel->setURL( m_list.name() );
m_distListLabel->setText( m_list.name() );
- m_resourceLabel->setText( i18n( "<b>Address book:</b> %1" ).arg( m_entry.addressee.resource() ? m_entry.addressee.resource()->resourceName() : QString() ) );
+ m_resourceLabel->setText( i18n( "<b>Address book:</b> %1" ).arg( m_entry.addressee.resource() ? m_entry.addressee.resource()->resourceName() : TQString() ) );
m_resourceLabel->setAlignment( Qt::SingleLine );
- m_emailGroup = new QVButtonGroup( this );
+ m_emailGroup = new TQVButtonGroup( this );
m_emailGroup->setFlat( true );
m_emailGroup->setExclusive( true );
- m_emailGroup->setFrameShape( QFrame::NoFrame );
+ m_emailGroup->setFrameShape( TQFrame::NoFrame );
- const QString preferred = m_entry.email.isNull() ? m_entry.addressee.preferredEmail() : m_entry.email;
- const QStringList mails = m_entry.addressee.emails();
+ const TQString preferred = m_entry.email.isNull() ? m_entry.addressee.preferredEmail() : m_entry.email;
+ const TQStringList mails = m_entry.addressee.emails();
m_idToEmail.clear();
- for ( QStringList::ConstIterator it = mails.begin(); it != mails.end(); ++it )
+ for ( TQStringList::ConstIterator it = mails.begin(); it != mails.end(); ++it )
{
- QRadioButton* button = new QRadioButton( m_emailGroup );
+ TQRadioButton* button = new TQRadioButton( m_emailGroup );
button->setText( *it );
m_idToEmail.insert( m_emailGroup->insert( button ), *it );
if ( *it == preferred )
button->setChecked( true );
button->setShown( true );
}
- connect( m_emailGroup, SIGNAL( clicked( int ) ),
- this, SLOT( emailButtonClicked( int ) ) );
+ connect( m_emailGroup, TQT_SIGNAL( clicked( int ) ),
+ this, TQT_SLOT( emailButtonClicked( int ) ) );
m_radioLayout->addWidget( m_emailGroup, 0, 0 );
m_emailGroup->setShown( true );
m_mainLayout->invalidate();
diff --git a/kaddressbook/distributionlistentryview.h b/kaddressbook/distributionlistentryview.h
index 1fbf9f2d7..e3d9b8625 100644
--- a/kaddressbook/distributionlistentryview.h
+++ b/kaddressbook/distributionlistentryview.h
@@ -3,9 +3,9 @@
#include <libkdepim/distributionlist.h>
-#include <qmap.h>
-#include <qstring.h>
-#include <qwidget.h>
+#include <tqmap.h>
+#include <tqstring.h>
+#include <tqwidget.h>
class QBoxLayout;
class QButtonGroup;
@@ -26,31 +26,31 @@ class DistributionListEntryView : public QWidget
Q_OBJECT
public:
- explicit DistributionListEntryView( KAB::Core* core, QWidget* parent = 0 );
+ explicit DistributionListEntryView( KAB::Core* core, TQWidget* parent = 0 );
void setEntry( const KPIM::DistributionList& list, const KPIM::DistributionList::Entry& entry );
public slots:
void clear();
signals:
- void distributionListClicked( const QString& );
+ void distributionListClicked( const TQString& );
private slots:
void emailButtonClicked( int id );
private:
- QMap<int, QString> m_idToEmail;
+ TQMap<int, TQString> m_idToEmail;
KAB::Core* m_core;
KPIM::DistributionList m_list;
KPIM::DistributionList::Entry m_entry;
- QGridLayout* m_radioLayout;
- QBoxLayout* m_mainLayout;
- QButtonGroup* m_emailGroup;
- QLabel* m_addresseeLabel;
+ TQGridLayout* m_radioLayout;
+ TQBoxLayout* m_mainLayout;
+ TQButtonGroup* m_emailGroup;
+ TQLabel* m_addresseeLabel;
KURLLabel* m_distListLabel;
- QLabel* m_imageLabel;
- QLabel* m_resourceLabel;
- QMap<int, QString> m_indexToIdentifier;
+ TQLabel* m_imageLabel;
+ TQLabel* m_resourceLabel;
+ TQMap<int, TQString> m_indexToIdentifier;
};
}
diff --git a/kaddressbook/distributionlistpicker.cpp b/kaddressbook/distributionlistpicker.cpp
index c2eb3ee00..a43c76d0a 100644
--- a/kaddressbook/distributionlistpicker.cpp
+++ b/kaddressbook/distributionlistpicker.cpp
@@ -35,32 +35,32 @@
#include <klocale.h>
#include <kmessagebox.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qpushbutton.h>
-#include <qregexp.h>
-#include <qvalidator.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqpushbutton.h>
+#include <tqregexp.h>
+#include <tqvalidator.h>
-KPIM::DistributionListPickerDialog::DistributionListPickerDialog( KABC::AddressBook* book, QWidget* parent ) : KDialogBase( parent, 0, true, QString(), Ok | Cancel | User1 ), m_book( book )
+KPIM::DistributionListPickerDialog::DistributionListPickerDialog( KABC::AddressBook* book, TQWidget* parent ) : KDialogBase( parent, 0, true, TQString(), Ok | Cancel | User1 ), m_book( book )
{
Q_ASSERT( m_book );
setModal( true );
enableButton( Ok, false );
setButtonText( User1, i18n( "Add New Distribution List" ) );
- QWidget* main = new QWidget( this );
- QGridLayout* layout = new QGridLayout( main );
+ TQWidget* main = new TQWidget( this );
+ TQGridLayout* layout = new TQGridLayout( main );
layout->setSpacing( KDialog::spacingHint() );
- m_label = new QLabel( main );
+ m_label = new TQLabel( main );
layout->addWidget( m_label, 0, 0 );
m_listBox = new KListBox( main );
layout->addWidget( m_listBox, 1, 0 );
- connect( m_listBox, SIGNAL( highlighted( const QString& ) ),
- this, SLOT( entrySelected( const QString& ) ) );
- connect( m_listBox, SIGNAL( selected( const QString& ) ),
- this, SLOT( entrySelected( const QString& ) ) );
+ connect( m_listBox, TQT_SIGNAL( highlighted( const TQString& ) ),
+ this, TQT_SLOT( entrySelected( const TQString& ) ) );
+ connect( m_listBox, TQT_SIGNAL( selected( const TQString& ) ),
+ this, TQT_SLOT( entrySelected( const TQString& ) ) );
setMainWidget( main );
#ifdef KDEPIM_NEW_DISTRLISTS
- typedef QValueList<KPIM::DistributionList> DistListList;
+ typedef TQValueList<KPIM::DistributionList> DistListList;
const DistListList lists = KPIM::DistributionList::allDistributionLists( m_book );
for ( DistListList::ConstIterator it = lists.begin(); it != lists.end(); ++it )
{
@@ -69,12 +69,12 @@ KPIM::DistributionListPickerDialog::DistributionListPickerDialog( KABC::AddressB
#endif
}
-void KPIM::DistributionListPickerDialog::entrySelected( const QString& name )
+void KPIM::DistributionListPickerDialog::entrySelected( const TQString& name )
{
actionButton( Ok )->setEnabled( !name.isNull() );
}
-void KPIM::DistributionListPickerDialog::setLabelText( const QString& text )
+void KPIM::DistributionListPickerDialog::setLabelText( const TQString& text )
{
m_label->setText( text );
}
@@ -82,9 +82,9 @@ void KPIM::DistributionListPickerDialog::setLabelText( const QString& text )
void KPIM::DistributionListPickerDialog::slotUser1()
{
#ifdef KDEPIM_NEW_DISTRLISTS
- const QValueList<KPIM::DistributionList> lists = KPIM::DistributionList::allDistributionLists( m_book );
- QStringList listNames;
- for ( QValueList<KPIM::DistributionList>::ConstIterator it = lists.begin(); it != lists.end(); ++it )
+ const TQValueList<KPIM::DistributionList> lists = KPIM::DistributionList::allDistributionLists( m_book );
+ TQStringList listNames;
+ for ( TQValueList<KPIM::DistributionList>::ConstIterator it = lists.begin(); it != lists.end(); ++it )
{
listNames += (*it).name();
}
@@ -92,8 +92,8 @@ void KPIM::DistributionListPickerDialog::slotUser1()
bool validName = false;
do
{
- QRegExpValidator validator( QRegExp( "\\S+.*" ), 0 );
- const QString name = KInputDialog::getText( i18n( "Enter Name" ), i18n( "Enter a name for the new distribution list:" ), QString(), 0, this, 0, &validator ).stripWhiteSpace();
+ TQRegExpValidator validator( TQRegExp( "\\S+.*" ), 0 );
+ const TQString name = KInputDialog::getText( i18n( "Enter Name" ), i18n( "Enter a name for the new distribution list:" ), TQString(), 0, this, 0, &validator ).stripWhiteSpace();
if ( name.isEmpty() )
return;
@@ -107,7 +107,7 @@ void KPIM::DistributionListPickerDialog::slotUser1()
m_book->insertAddressee( list );
m_listBox->insertItem( name );
- QListBoxItem* item = m_listBox->findItem( name );
+ TQListBoxItem* item = m_listBox->findItem( name );
m_listBox->setSelected( item, true );
}
else
@@ -122,18 +122,18 @@ void KPIM::DistributionListPickerDialog::slotUser1()
void KPIM::DistributionListPickerDialog::slotOk()
{
- QListBoxItem* item = m_listBox->selectedItem();
- m_selectedDistributionList = item ? item->text() : QString();
+ TQListBoxItem* item = m_listBox->selectedItem();
+ m_selectedDistributionList = item ? item->text() : TQString();
KDialogBase::slotOk();
}
void KPIM::DistributionListPickerDialog::slotCancel()
{
- m_selectedDistributionList = QString();
+ m_selectedDistributionList = TQString();
KDialogBase::slotCancel();
}
-QString KPIM::DistributionListPickerDialog::selectedDistributionList() const
+TQString KPIM::DistributionListPickerDialog::selectedDistributionList() const
{
return m_selectedDistributionList;
}
diff --git a/kaddressbook/distributionlistpicker.h b/kaddressbook/distributionlistpicker.h
index 0081fc62f..f5309c135 100644
--- a/kaddressbook/distributionlistpicker.h
+++ b/kaddressbook/distributionlistpicker.h
@@ -25,7 +25,7 @@
#include <kdialogbase.h>
-#include <qstring.h>
+#include <tqstring.h>
class KListBox;
@@ -39,10 +39,10 @@ class DistributionListPickerDialog : public KDialogBase
{
Q_OBJECT
public:
- explicit DistributionListPickerDialog( KABC::AddressBook* book, QWidget* parent = 0 );
- QString selectedDistributionList() const;
+ explicit DistributionListPickerDialog( KABC::AddressBook* book, TQWidget* parent = 0 );
+ TQString selectedDistributionList() const;
- void setLabelText( const QString& text );
+ void setLabelText( const TQString& text );
private slots:
@@ -55,13 +55,13 @@ private slots:
//override
void slotUser1();
- void entrySelected( const QString& name );
+ void entrySelected( const TQString& name );
private:
KABC::AddressBook* m_book;
- QLabel* m_label;
+ TQLabel* m_label;
KListBox* m_listBox;
- QString m_selectedDistributionList;
+ TQString m_selectedDistributionList;
};
} //namespace KPIM
diff --git a/kaddressbook/editors/cryptowidget.cpp b/kaddressbook/editors/cryptowidget.cpp
index d2d5917f9..45a5efbaf 100644
--- a/kaddressbook/editors/cryptowidget.cpp
+++ b/kaddressbook/editors/cryptowidget.cpp
@@ -35,13 +35,13 @@
#include <kiconloader.h>
#include <klocale.h>
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qcheckbox.h>
-#include <qcombobox.h>
-#include <qpushbutton.h>
-#include <qvgroupbox.h>
-#include <qhbox.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqcheckbox.h>
+#include <tqcombobox.h>
+#include <tqpushbutton.h>
+#include <tqvgroupbox.h>
+#include <tqhbox.h>
#include "cryptowidget.h"
@@ -58,81 +58,81 @@ CryptoWidgetFactory::CryptoWidgetFactory()
KGlobal::iconLoader()->addAppDir( "libkleopatra" );
}
-QString CryptoWidgetFactory::pageTitle() const
+TQString CryptoWidgetFactory::pageTitle() const
{
return i18n( "Crypto Settings" );
}
-QString CryptoWidgetFactory::pageIdentifier() const
+TQString CryptoWidgetFactory::pageIdentifier() const
{
return "crypto";
}
-CryptoWidget::CryptoWidget( KABC::AddressBook *ab, QWidget *parent, const char *name )
+CryptoWidget::CryptoWidget( KABC::AddressBook *ab, TQWidget *parent, const char *name )
: KAB::ContactEditorWidget( ab, parent, name ), mReadOnly( false )
{
- QGridLayout *topLayout = new QGridLayout( this, 2, 5, KDialog::marginHint(),
+ TQGridLayout *topLayout = new TQGridLayout( this, 2, 5, KDialog::marginHint(),
KDialog::spacingHint() );
topLayout->setColStretch( 1, 1 );
topLayout->setRowStretch( 4, 1 );
- QVGroupBox* protGB = new QVGroupBox( i18n( "Allowed Protocols" ), this );
+ TQVGroupBox* protGB = new TQVGroupBox( i18n( "Allowed Protocols" ), this );
topLayout->addMultiCellWidget( protGB, 0, 0, 0, 1 );
uint msgFormat = 1;
for ( uint i = 0 ; i < NumberOfProtocols ; ++i ) {
Kleo::CryptoMessageFormat f = static_cast<Kleo::CryptoMessageFormat>( msgFormat );
- mProtocolCB[ i ] = new QCheckBox( Kleo::cryptoMessageFormatToLabel( f ), protGB );
- connect( mProtocolCB[i], SIGNAL( clicked() ), this, SLOT( setModified() ) );
+ mProtocolCB[ i ] = new TQCheckBox( Kleo::cryptoMessageFormatToLabel( f ), protGB );
+ connect( mProtocolCB[i], TQT_SIGNAL( clicked() ), this, TQT_SLOT( setModified() ) );
// Iterating over a bitfield means *2 every time
msgFormat *= 2;
}
- QLabel* l = new QLabel( i18n( "Preferred OpenPGP encryption key:" ), this );
+ TQLabel* l = new TQLabel( i18n( "Preferred OpenPGP encryption key:" ), this );
topLayout->addWidget( l, 1, 0 );
mPgpKey = new Kleo::EncryptionKeyRequester( true, Kleo::EncryptionKeyRequester::OpenPGP, this );
topLayout->addWidget( mPgpKey, 1, 1 );
- l = new QLabel( i18n( "Preferred S/MIME encryption certificate:" ), this );
+ l = new TQLabel( i18n( "Preferred S/MIME encryption certificate:" ), this );
topLayout->addWidget( l, 2, 0 );
mSmimeCert = new Kleo::EncryptionKeyRequester( true, Kleo::EncryptionKeyRequester::SMIME, this );
topLayout->addWidget( mSmimeCert, 2, 1 );
- QGroupBox* box = new QVGroupBox( i18n( "Message Preference" ), this );
+ TQGroupBox* box = new TQVGroupBox( i18n( "Message Preference" ), this );
topLayout->addMultiCellWidget( box, 3, 3, 0, 1 );
// Send preferences/sign (see certmanager/lib/kleo/enum.h)
- QHBox* hbox = new QHBox( box );
+ TQHBox* hbox = new TQHBox( box );
- l = new QLabel( i18n( "Sign:" ), hbox );
+ l = new TQLabel( i18n( "Sign:" ), hbox );
- mSignPref = new QComboBox( false, hbox );
+ mSignPref = new TQComboBox( false, hbox );
for ( unsigned int i = Kleo::UnknownSigningPreference; i < Kleo::MaxSigningPreference ; ++i )
mSignPref->insertItem( Kleo::signingPreferenceToLabel(
static_cast<Kleo::SigningPreference>( i ) ) );
// Send preferences/encrypt (see certmanager/lib/kleo/enum.h)
- hbox = new QHBox( box );
+ hbox = new TQHBox( box );
- l = new QLabel( i18n("Encrypt:"), hbox );
+ l = new TQLabel( i18n("Encrypt:"), hbox );
- mCryptPref = new QComboBox( false, hbox );
+ mCryptPref = new TQComboBox( false, hbox );
for ( unsigned int i = Kleo::UnknownPreference; i < Kleo::MaxEncryptionPreference ; ++i )
mCryptPref->insertItem( Kleo::encryptionPreferenceToLabel(
static_cast<Kleo::EncryptionPreference>( i ) ) );
// Emit "changed()" signal
- connect( mSignPref, SIGNAL( activated(int) ), this, SLOT( setModified() ) );
- connect( mCryptPref, SIGNAL( activated(int) ), this, SLOT( setModified() ) );
+ connect( mSignPref, TQT_SIGNAL( activated(int) ), this, TQT_SLOT( setModified() ) );
+ connect( mCryptPref, TQT_SIGNAL( activated(int) ), this, TQT_SLOT( setModified() ) );
// Not optimal, but KeyRequester doesn't emit any signals when the key changes
- connect( mPgpKey->eraseButton(), SIGNAL( clicked() ), this, SLOT( setModified() ) );
- connect( mPgpKey->dialogButton(), SIGNAL( clicked() ), this, SLOT( setModified() ) );
- connect( mSmimeCert->eraseButton(), SIGNAL( clicked() ), this, SLOT( setModified() ) );
- connect( mSmimeCert->dialogButton(), SIGNAL( clicked() ), this, SLOT( setModified() ) );
+ connect( mPgpKey->eraseButton(), TQT_SIGNAL( clicked() ), this, TQT_SLOT( setModified() ) );
+ connect( mPgpKey->dialogButton(), TQT_SIGNAL( clicked() ), this, TQT_SLOT( setModified() ) );
+ connect( mSmimeCert->eraseButton(), TQT_SIGNAL( clicked() ), this, TQT_SLOT( setModified() ) );
+ connect( mSmimeCert->dialogButton(), TQT_SIGNAL( clicked() ), this, TQT_SLOT( setModified() ) );
}
CryptoWidget::~CryptoWidget()
@@ -144,7 +144,7 @@ void CryptoWidget::loadContact( KABC::Addressee *addr )
bool blocked = signalsBlocked();
blockSignals( true );
- QStringList lst = QStringList::split( ',', addr->custom( "KADDRESSBOOK",
+ TQStringList lst = TQStringList::split( ',', addr->custom( "KADDRESSBOOK",
"CRYPTOPROTOPREF" ) );
uint cryptoFormats = Kleo::stringListToCryptoMessageFormats( lst );
@@ -161,8 +161,8 @@ void CryptoWidget::loadContact( KABC::Addressee *addr )
// We dont use the contents of addr->key(...) because we want just a ref.
// to the key/cert. stored elsewhere.
- mPgpKey->setFingerprints( QStringList::split( ",", addr->custom( "KADDRESSBOOK", "OPENPGPFP" ) ) );
- mSmimeCert->setFingerprints( QStringList::split( ",", addr->custom( "KADDRESSBOOK", "SMIMEFP" ) ) );
+ mPgpKey->setFingerprints( TQStringList::split( ",", addr->custom( "KADDRESSBOOK", "OPENPGPFP" ) ) );
+ mSmimeCert->setFingerprints( TQStringList::split( ",", addr->custom( "KADDRESSBOOK", "SMIMEFP" ) ) );
blockSignals( blocked );
}
@@ -176,7 +176,7 @@ void CryptoWidget::storeContact( KABC::Addressee *addr )
cryptoFormats |= msgFormat;
}
- QStringList lst = Kleo::cryptoMessageFormatsToStringList( cryptoFormats );
+ TQStringList lst = Kleo::cryptoMessageFormatsToStringList( cryptoFormats );
if ( !lst.isEmpty() )
addr->insertCustom( "KADDRESSBOOK", "CRYPTOPROTOPREF", lst.join( "," ) );
else
@@ -198,8 +198,8 @@ void CryptoWidget::storeContact( KABC::Addressee *addr )
else
addr->removeCustom( "KADDRESSBOOK", "CRYPTOENCRYPTPREF" );
- QStringList pfp = mPgpKey->fingerprints();
- QStringList sfp = mSmimeCert->fingerprints();
+ TQStringList pfp = mPgpKey->fingerprints();
+ TQStringList sfp = mSmimeCert->fingerprints();
if ( !pfp.isEmpty() )
addr->insertCustom( "KADDRESSBOOK", "OPENPGPFP", pfp.join( "," ) );
diff --git a/kaddressbook/editors/cryptowidget.h b/kaddressbook/editors/cryptowidget.h
index de2c7bfcc..559279855 100644
--- a/kaddressbook/editors/cryptowidget.h
+++ b/kaddressbook/editors/cryptowidget.h
@@ -38,7 +38,7 @@ class CryptoWidget : public KAB::ContactEditorWidget
Q_OBJECT
public:
- CryptoWidget( KABC::AddressBook *ab, QWidget *parent, const char *name = 0 );
+ CryptoWidget( KABC::AddressBook *ab, TQWidget *parent, const char *name = 0 );
~CryptoWidget();
void loadContact( KABC::Addressee *addr );
@@ -47,9 +47,9 @@ class CryptoWidget : public KAB::ContactEditorWidget
private:
enum { NumberOfProtocols = 4 };
- QCheckBox* mProtocolCB[NumberOfProtocols];
- QComboBox* mSignPref;
- QComboBox* mCryptPref;
+ TQCheckBox* mProtocolCB[NumberOfProtocols];
+ TQComboBox* mSignPref;
+ TQComboBox* mCryptPref;
Kleo::KeyRequester* mPgpKey;
Kleo::KeyRequester* mSmimeCert;
bool mReadOnly;
@@ -59,13 +59,13 @@ class CryptoWidgetFactory : public KAB::ContactEditorWidgetFactory
{
public:
CryptoWidgetFactory();
- KAB::ContactEditorWidget *createWidget( KABC::AddressBook *ab, QWidget *parent, const char *name )
+ KAB::ContactEditorWidget *createWidget( KABC::AddressBook *ab, TQWidget *parent, const char *name )
{
return new CryptoWidget( ab, parent, name );
}
- QString pageTitle() const;
- QString pageIdentifier() const;
+ TQString pageTitle() const;
+ TQString pageIdentifier() const;
};
#endif
diff --git a/kaddressbook/editors/imaddresswidget.cpp b/kaddressbook/editors/imaddresswidget.cpp
index 3d2af677e..097b092c0 100644
--- a/kaddressbook/editors/imaddresswidget.cpp
+++ b/kaddressbook/editors/imaddresswidget.cpp
@@ -21,10 +21,10 @@
with any edition of Qt, and distribute the resulting executable,
without including the source code for Qt in the source distribution.
*/
-#include <qcheckbox.h>
-#include <qcombobox.h>
-#include <qlineedit.h>
-#include <qlabel.h>
+#include <tqcheckbox.h>
+#include <tqcombobox.h>
+#include <tqlineedit.h>
+#include <tqlabel.h>
#include <kdebug.h>
#include <kiconloader.h>
@@ -33,7 +33,7 @@
#include "imaddresswidget.h"
-IMAddressWidget::IMAddressWidget( QWidget *parent, QValueList<KPluginInfo *> protocols )
+IMAddressWidget::IMAddressWidget( TQWidget *parent, TQValueList<KPluginInfo *> protocols )
: IMAddressBase( parent )
{
mProtocols = protocols;
@@ -41,8 +41,8 @@ IMAddressWidget::IMAddressWidget( QWidget *parent, QValueList<KPluginInfo *> pro
init();
}
-IMAddressWidget::IMAddressWidget( QWidget *parent, QValueList<KPluginInfo *> protocols,
- KPluginInfo *protocol, const QString& address,
+IMAddressWidget::IMAddressWidget( TQWidget *parent, TQValueList<KPluginInfo *> protocols,
+ KPluginInfo *protocol, const TQString& address,
const IMContext& context )
: IMAddressBase( parent )
{
@@ -52,23 +52,23 @@ IMAddressWidget::IMAddressWidget( QWidget *parent, QValueList<KPluginInfo *> pro
populateProtocols();
cmbProtocol->setCurrentItem( mProtocols.findIndex( protocol ) );
- edtAddress->setText( address.section( QChar( 0xE120 ), 0, 0 ) );
- edtNetwork->setText( address.section( QChar( 0xE120 ), 1 ) );
+ edtAddress->setText( address.section( TQChar( 0xE120 ), 0, 0 ) );
+ edtNetwork->setText( address.section( TQChar( 0xE120 ), 1 ) );
init();
}
void IMAddressWidget::init()
{
- connect( cmbProtocol, SIGNAL( activated( const QString& ) ),
- this, SLOT( slotProtocolChanged() ) );
- connect( edtAddress, SIGNAL( textChanged( const QString& ) ),
- this, SLOT( slotAddressChanged( const QString& ) ) );
+ connect( cmbProtocol, TQT_SIGNAL( activated( const TQString& ) ),
+ this, TQT_SLOT( slotProtocolChanged() ) );
+ connect( edtAddress, TQT_SIGNAL( textChanged( const TQString& ) ),
+ this, TQT_SLOT( slotAddressChanged( const TQString& ) ) );
slotProtocolChanged();
}
-void IMAddressWidget::slotAddressChanged( const QString &text )
+void IMAddressWidget::slotAddressChanged( const TQString &text )
{
emit inValidState( !text.stripWhiteSpace().isEmpty() );
}
@@ -105,12 +105,12 @@ IMContext IMAddressWidget::context() const
return context;
}
-QString IMAddressWidget::address() const
+TQString IMAddressWidget::address() const
{
// The protocol irc is a special case and hard coded in.
// It's not nice, but the simplest way that I can see.
if ( protocol()->name() == "IRC" && !edtNetwork->text().stripWhiteSpace().isEmpty() )
- return edtAddress->text().stripWhiteSpace() + QChar( 0xE120 ) + edtNetwork->text().stripWhiteSpace();
+ return edtAddress->text().stripWhiteSpace() + TQChar( 0xE120 ) + edtNetwork->text().stripWhiteSpace();
else
return edtAddress->text().stripWhiteSpace();
}
@@ -118,7 +118,7 @@ QString IMAddressWidget::address() const
void IMAddressWidget::populateProtocols()
{
// insert the protocols in order
- QValueList<KPluginInfo *>::ConstIterator it;
+ TQValueList<KPluginInfo *>::ConstIterator it;
for ( it = mProtocols.begin(); it != mProtocols.end(); ++it )
cmbProtocol->insertItem( SmallIcon( (*it)->icon() ), (*it)->name() );
}
diff --git a/kaddressbook/editors/imaddresswidget.h b/kaddressbook/editors/imaddresswidget.h
index 29d93b13f..11ee5f454 100644
--- a/kaddressbook/editors/imaddresswidget.h
+++ b/kaddressbook/editors/imaddresswidget.h
@@ -24,7 +24,7 @@
#ifndef IMADDRESSWIDGET_H
#define IMADDRESSWIDGET_H
-#include <qvaluelist.h>
+#include <tqvaluelist.h>
#include "imaddressbase.h"
#include "imeditorwidget.h"
@@ -44,15 +44,15 @@ class IMAddressWidget : public IMAddressBase
Q_OBJECT
public:
- IMAddressWidget( QWidget *parent, QValueList<KPluginInfo *> protocols);
- IMAddressWidget( QWidget *parent, QValueList<KPluginInfo *> protocols,
- KPluginInfo *protocol, const QString& address,
+ IMAddressWidget( TQWidget *parent, TQValueList<KPluginInfo *> protocols);
+ IMAddressWidget( TQWidget *parent, TQValueList<KPluginInfo *> protocols,
+ KPluginInfo *protocol, const TQString& address,
const IMContext& context = Any );
KPluginInfo * protocol() const;
IMContext context() const;
- QString address() const ;
- QValueList<KPluginInfo *> mProtocols;
+ TQString address() const ;
+ TQValueList<KPluginInfo *> mProtocols;
signals:
void inValidState( bool );
@@ -65,7 +65,7 @@ class IMAddressWidget : public IMAddressBase
protected slots:
void slotProtocolChanged();
- void slotAddressChanged( const QString &text );
+ void slotAddressChanged( const TQString &text );
private:
void init();
diff --git a/kaddressbook/editors/imeditorwidget.cpp b/kaddressbook/editors/imeditorwidget.cpp
index f61e06386..0da0feb03 100644
--- a/kaddressbook/editors/imeditorwidget.cpp
+++ b/kaddressbook/editors/imeditorwidget.cpp
@@ -22,12 +22,12 @@
without including the source code for Qt in the source distribution.
*/
-#include <qlistview.h>
-#include <qstringlist.h>
-#include <qvbox.h>
-#include <qlayout.h>
-#include <qfont.h>
-#include <qpainter.h>
+#include <tqlistview.h>
+#include <tqstringlist.h>
+#include <tqvbox.h>
+#include <tqlayout.h>
+#include <tqfont.h>
+#include <tqpainter.h>
#include <kdialogbase.h>
#include <kdebug.h>
@@ -44,7 +44,7 @@
IMAddressLVI::IMAddressLVI( KListView *parent, KPluginInfo *protocol,
- const QString &address, const IMContext &context )
+ const TQString &address, const IMContext &context )
: KListViewItem( parent )
{
setProtocol( protocol );
@@ -63,11 +63,11 @@ bool IMAddressLVI::preferred() const
return mPreferred;
}
-void IMAddressLVI::paintCell( QPainter *p, const QColorGroup &cg,
+void IMAddressLVI::paintCell( TQPainter *p, const TQColorGroup &cg,
int column, int width, int alignment )
{
if ( mPreferred ) {
- QFont font = p->font();
+ TQFont font = p->font();
font.setBold( true );
p->setFont( font );
}
@@ -75,15 +75,15 @@ void IMAddressLVI::paintCell( QPainter *p, const QColorGroup &cg,
KListViewItem::paintCell( p, cg, column, width, alignment );
}
-void IMAddressLVI::setAddress( const QString &address )
+void IMAddressLVI::setAddress( const TQString &address )
{
// irc uses 0xE120 to seperate the nick and the server group.
- QString serverOrGroup = address.section( QChar( 0xE120 ), 1 );
+ TQString serverOrGroup = address.section( TQChar( 0xE120 ), 1 );
if ( serverOrGroup.isEmpty() )
setText( 1, address );
else {
- QString nickname = address.section( QChar( 0xE120 ), 0, 0 );
+ TQString nickname = address.section( TQChar( 0xE120 ), 0, 0 );
setText( 1, i18n( "<nickname> on <server>","%1 on %2" )
.arg( nickname ).arg( serverOrGroup ) );
}
@@ -128,7 +128,7 @@ IMContext IMAddressLVI::context() const
return mContext;
}
-QString IMAddressLVI::address() const
+TQString IMAddressLVI::address() const
{
return mAddress;
}
@@ -140,7 +140,7 @@ void IMAddressLVI::activate()
/*===========================================================================*/
-IMEditorWidget::IMEditorWidget( QWidget *parent, const QString &preferredIM, const char *name )
+IMEditorWidget::IMEditorWidget( TQWidget *parent, const TQString &preferredIM, const char *name )
: KDialogBase( parent, name, false, i18n( "Edit Instant Messenging Address" ),
Help | Ok | Cancel, Ok, false ),
mReadOnly( false )
@@ -148,14 +148,14 @@ IMEditorWidget::IMEditorWidget( QWidget *parent, const QString &preferredIM, con
mWidget = new IMEditorBase( this );
setMainWidget( mWidget );
- connect( mWidget->btnAdd, SIGNAL( clicked() ), SLOT( slotAdd() ) );
- connect( mWidget->btnEdit, SIGNAL( clicked() ), SLOT( slotEdit() ) );
- connect( mWidget->btnDelete, SIGNAL( clicked() ), SLOT( slotDelete() ) );
- connect( mWidget->btnSetStandard, SIGNAL( clicked()), SLOT( slotSetStandard() ) );
- connect( mWidget->lvAddresses, SIGNAL( selectionChanged() ), SLOT( slotUpdateButtons() ) );
+ connect( mWidget->btnAdd, TQT_SIGNAL( clicked() ), TQT_SLOT( slotAdd() ) );
+ connect( mWidget->btnEdit, TQT_SIGNAL( clicked() ), TQT_SLOT( slotEdit() ) );
+ connect( mWidget->btnDelete, TQT_SIGNAL( clicked() ), TQT_SLOT( slotDelete() ) );
+ connect( mWidget->btnSetStandard, TQT_SIGNAL( clicked()), TQT_SLOT( slotSetStandard() ) );
+ connect( mWidget->lvAddresses, TQT_SIGNAL( selectionChanged() ), TQT_SLOT( slotUpdateButtons() ) );
- connect( mWidget->lvAddresses, SIGNAL( doubleClicked( QListViewItem*, const QPoint&, int ) ),
- SLOT( slotEdit() ) );
+ connect( mWidget->lvAddresses, TQT_SIGNAL( doubleClicked( TQListViewItem*, const TQPoint&, int ) ),
+ TQT_SLOT( slotEdit() ) );
setHelp( "managing-contacts-im-addresses" );
@@ -166,26 +166,26 @@ IMEditorWidget::IMEditorWidget( QWidget *parent, const QString &preferredIM, con
//mWidget->btnUp->setEnabled( false );
//mWidget->btnDown->setEnabled( false );
mPreferred = preferredIM;
- mPreferred = mPreferred.replace( " on ", QString( QChar( 0xE120 ) ), true );
- mProtocols = KPluginInfo::fromServices( KTrader::self()->query( QString::fromLatin1( "KABC/IMProtocol" ) ) );
+ mPreferred = mPreferred.replace( " on ", TQString( TQChar( 0xE120 ) ), true );
+ mProtocols = KPluginInfo::fromServices( KTrader::self()->query( TQString::fromLatin1( "KABC/IMProtocol" ) ) );
// order the protocols by putting them in a qmap, then sorting the set of keys and recreating the list
- QMap<QString, KPluginInfo *> protocolMap;
- QValueList<KPluginInfo *>::ConstIterator it;
- QValueList<KPluginInfo *> sorted;
+ TQMap<TQString, KPluginInfo *> protocolMap;
+ TQValueList<KPluginInfo *>::ConstIterator it;
+ TQValueList<KPluginInfo *> sorted;
for ( it = mProtocols.begin(); it != mProtocols.end(); ++it )
protocolMap.insert( (*it)->name(), (*it) );
- QStringList keys = protocolMap.keys();
+ TQStringList keys = protocolMap.keys();
keys.sort();
- QStringList::ConstIterator keyIt = keys.begin();
- QStringList::ConstIterator end = keys.end();
+ TQStringList::ConstIterator keyIt = keys.begin();
+ TQStringList::ConstIterator end = keys.end();
for ( ; keyIt != end; ++keyIt )
sorted.append( protocolMap[*keyIt] );
mProtocols = sorted;
}
-QValueList<KPluginInfo *> IMEditorWidget::availableProtocols() const
+TQValueList<KPluginInfo *> IMEditorWidget::availableProtocols() const
{
return mProtocols;
}
@@ -196,21 +196,21 @@ void IMEditorWidget::loadContact( KABC::Addressee *addr )
mWidget->lvAddresses->clear();
// see README for details of how Evolution stores IM addresses (differently)
- const QStringList customs = addr->customs();
+ const TQStringList customs = addr->customs();
- QStringList::ConstIterator it;
+ TQStringList::ConstIterator it;
bool isSet = false;
for ( it = customs.begin(); it != customs.end(); ++it ) {
- QString app, name, value;
+ TQString app, name, value;
splitField( *it, app, name, value );
- if ( app.startsWith( QString::fromLatin1( "messaging/" ) ) ) {
- if ( name == QString::fromLatin1( "All" ) ) {
+ if ( app.startsWith( TQString::fromLatin1( "messaging/" ) ) ) {
+ if ( name == TQString::fromLatin1( "All" ) ) {
KPluginInfo *protocol = protocolFromString( app );
if ( protocol ) {
- QStringList addresses = QStringList::split( QChar( 0xE000 ), value );
- QStringList::iterator end = addresses.end();
- for ( QStringList::ConstIterator it = addresses.begin(); it != end; ++it ) {
+ TQStringList addresses = TQStringList::split( TQChar( 0xE000 ), value );
+ TQStringList::iterator end = addresses.end();
+ for ( TQStringList::ConstIterator it = addresses.begin(); it != end; ++it ) {
IMAddressLVI *imaddresslvi = new IMAddressLVI( mWidget->lvAddresses, protocol, *it, Any/*, false*/ );
if ( !isSet && (*it).stripWhiteSpace().lower() == mPreferred.stripWhiteSpace().lower() ) {
imaddresslvi->setPreferred( true );
@@ -231,10 +231,10 @@ void IMEditorWidget::storeContact( KABC::Addressee *addr )
{
// for each changed protocol, write a new custom field containing the current set of
// addresses
- QValueList<KPluginInfo *>::ConstIterator protocolIt;
+ TQValueList<KPluginInfo *>::ConstIterator protocolIt;
for ( protocolIt = mChangedProtocols.begin(); protocolIt != mChangedProtocols.end(); ++protocolIt ) {
- QStringList lst;
- QListViewItemIterator addressIt( mWidget->lvAddresses );
+ TQStringList lst;
+ TQListViewItemIterator addressIt( mWidget->lvAddresses );
while ( addressIt.current() ) {
IMAddressLVI* currentAddress = static_cast<IMAddressLVI*>( *addressIt );
if ( currentAddress->protocol() == *protocolIt )
@@ -242,11 +242,11 @@ void IMEditorWidget::storeContact( KABC::Addressee *addr )
++addressIt;
}
- QString addrBookField = (*protocolIt)->property( "X-KDE-InstantMessagingKABCField" ).toString();
+ TQString addrBookField = (*protocolIt)->property( "X-KDE-InstantMessagingKABCField" ).toString();
if ( !lst.isEmpty() )
- addr->insertCustom( addrBookField, QString::fromLatin1( "All" ), lst.join( QChar( 0xE000 ) ) );
+ addr->insertCustom( addrBookField, TQString::fromLatin1( "All" ), lst.join( TQChar( 0xE000 ) ) );
else
- addr->removeCustom( addrBookField, QString::fromLatin1( "All" ) );
+ addr->removeCustom( addrBookField, TQString::fromLatin1( "All" ) );
}
}
@@ -258,11 +258,11 @@ void IMEditorWidget::setReadOnly( bool readOnly )
void IMEditorWidget::slotSetStandard()
{
- QListViewItemIterator it( mWidget->lvAddresses, QListViewItemIterator::Selected );
+ TQListViewItemIterator it( mWidget->lvAddresses, TQListViewItemIterator::Selected );
// Just set the first one selected as standard
if ( IMAddressLVI *current = static_cast<IMAddressLVI*>( it.current() ) ) {
- QListViewItemIterator it2( mWidget->lvAddresses );
+ TQListViewItemIterator it2( mWidget->lvAddresses );
while ( it2.current() ) {
IMAddressLVI *item = static_cast<IMAddressLVI*>( it2.current() );
@@ -289,7 +289,7 @@ void IMEditorWidget::slotSetStandard()
void IMEditorWidget::slotUpdateButtons()
{
int num_selected = 0;
- QListViewItemIterator it( mWidget->lvAddresses, QListViewItemIterator::Selected );
+ TQListViewItemIterator it( mWidget->lvAddresses, TQListViewItemIterator::Selected );
while ( it.current() ) {
++num_selected;
if ( num_selected > 1 )
@@ -336,11 +336,11 @@ void IMEditorWidget::slotAdd()
IMAddressWidget *addressWid = new IMAddressWidget( &addDialog, mProtocols );
addDialog.enableButtonOK( false );
- connect( addressWid, SIGNAL( inValidState( bool ) ),
- &addDialog, SLOT( enableButtonOK( bool ) ) );
+ connect( addressWid, TQT_SIGNAL( inValidState( bool ) ),
+ &addDialog, TQT_SLOT( enableButtonOK( bool ) ) );
addDialog.setMainWidget( addressWid );
- if ( addDialog.exec() == QDialog::Accepted ) {
+ if ( addDialog.exec() == TQDialog::Accepted ) {
// add the new item
IMAddressLVI *imaddresslvi = new IMAddressLVI( mWidget->lvAddresses, addressWid->protocol(),
addressWid->address() /*, addressWid->context() */ );
@@ -362,7 +362,7 @@ void IMEditorWidget::slotAdd()
void IMEditorWidget::slotEdit()
{
- QListViewItemIterator it( mWidget->lvAddresses, QListViewItemIterator::Selected );
+ TQListViewItemIterator it( mWidget->lvAddresses, TQListViewItemIterator::Selected );
// Just edit the first one selected.
if ( IMAddressLVI *current = static_cast<IMAddressLVI*>( it.current() ) ) {
@@ -370,11 +370,11 @@ void IMEditorWidget::slotEdit()
KDialogBase::Ok | KDialogBase::Cancel );
IMAddressWidget *addressWid = new IMAddressWidget( &editDialog, mProtocols, current->protocol(),
current->address(), current->context() ) ;
- connect( addressWid, SIGNAL( inValidState( bool ) ),
- &editDialog, SLOT( enableButtonOK( bool ) ) );
+ connect( addressWid, TQT_SIGNAL( inValidState( bool ) ),
+ &editDialog, TQT_SLOT( enableButtonOK( bool ) ) );
editDialog.setMainWidget( addressWid );
- if ( editDialog.exec() == QDialog::Accepted ) {
+ if ( editDialog.exec() == TQDialog::Accepted ) {
bool modified = false;
if ( addressWid->address() != current->address() ) {
modified = true;
@@ -409,7 +409,7 @@ void IMEditorWidget::slotDelete()
int num_selected = 0;
{
- QListViewItemIterator it( mWidget->lvAddresses, QListViewItemIterator::Selected );
+ TQListViewItemIterator it( mWidget->lvAddresses, TQListViewItemIterator::Selected );
while ( it.current() ) {
num_selected++;
++it;
@@ -424,7 +424,7 @@ void IMEditorWidget::slotDelete()
i18n( "Confirm Delete" ), KStdGuiItem::del() ) != KMessageBox::Continue )
return;
- QListViewItemIterator it( mWidget->lvAddresses );
+ TQListViewItemIterator it( mWidget->lvAddresses );
bool deletedPreferred = false;
while( it.current() ) {
if ( it.current()->isSelected() ) {
@@ -452,16 +452,16 @@ void IMEditorWidget::slotDelete()
setModified( true );
}
-QString IMEditorWidget::preferred() const
+TQString IMEditorWidget::preferred() const
{
- QString retval( mPreferred );
- return retval.replace( QChar( 0xE120 ), " on " );
+ TQString retval( mPreferred );
+ return retval.replace( TQChar( 0xE120 ), " on " );
}
-KPluginInfo * IMEditorWidget::protocolFromString( const QString &fieldValue ) const
+KPluginInfo * IMEditorWidget::protocolFromString( const TQString &fieldValue ) const
{
- QValueList<KPluginInfo *>::ConstIterator it;
+ TQValueList<KPluginInfo *>::ConstIterator it;
KPluginInfo * protocol = 0;
for ( it = mProtocols.begin(); it != mProtocols.end(); ++it ) {
if ( (*it)->property( "X-KDE-InstantMessagingKABCField" ).toString() == fieldValue ) {
@@ -473,11 +473,11 @@ KPluginInfo * IMEditorWidget::protocolFromString( const QString &fieldValue ) co
return protocol;
}
-void IMEditorWidget::splitField( const QString &str, QString &app, QString &name, QString &value )
+void IMEditorWidget::splitField( const TQString &str, TQString &app, TQString &name, TQString &value )
{
int colon = str.find( ':' );
if ( colon != -1 ) {
- QString tmp = str.left( colon );
+ TQString tmp = str.left( colon );
value = str.mid( colon + 1 );
int dash = tmp.find( '-' );
diff --git a/kaddressbook/editors/imeditorwidget.h b/kaddressbook/editors/imeditorwidget.h
index 441db257b..0184ccca4 100644
--- a/kaddressbook/editors/imeditorwidget.h
+++ b/kaddressbook/editors/imeditorwidget.h
@@ -25,7 +25,7 @@
#ifndef IMEDITORWIDGET_H
#define IMEDITORWIDGET_H
-#include <qvaluelist.h>
+#include <tqvaluelist.h>
#include <klistview.h>
#include <kdialogbase.h>
@@ -51,15 +51,15 @@ class IMEditorWidget : public KDialogBase
Q_OBJECT
public:
- IMEditorWidget( QWidget *parent, const QString &preferredIM, const char *name = 0 );
+ IMEditorWidget( TQWidget *parent, const TQString &preferredIM, const char *name = 0 );
~IMEditorWidget() {};
void loadContact( KABC::Addressee *addr );
void storeContact( KABC::Addressee *addr );
void setReadOnly( bool readOnly );
- QValueList<KPluginInfo *> availableProtocols() const;
+ TQValueList<KPluginInfo *> availableProtocols() const;
bool isModified() const;
- QString preferred() const;
+ TQString preferred() const;
protected slots:
void slotUpdateButtons();
@@ -72,23 +72,23 @@ class IMEditorWidget : public KDialogBase
/**
* Helper method to split the contents of an addressbook field up
*/
- static void splitField( const QString &str, QString &app, QString &name, QString &value );
+ static void splitField( const TQString &str, TQString &app, TQString &name, TQString &value );
/**
* Find a protocol that matches the KABC key, or 0 if none found
*/
- KPluginInfo * protocolFromString( const QString &fieldValue ) const;
+ KPluginInfo * protocolFromString( const TQString &fieldValue ) const;
private:
bool mReadOnly;
bool mModified;
- QString mPreferred;
+ TQString mPreferred;
IMEditorBase *mWidget;
void setModified( bool modified );
// Used to track changed protocols to reduce KABC writes
- QValueList<KPluginInfo *> mChangedProtocols;
- QValueList<KPluginInfo *> mProtocols;
+ TQValueList<KPluginInfo *> mChangedProtocols;
+ TQValueList<KPluginInfo *> mProtocols;
};
/**
@@ -100,28 +100,28 @@ class IMAddressLVI : public KListViewItem
{
public:
IMAddressLVI( KListView *parent, KPluginInfo * protocol,
- const QString &address, const IMContext &context = Any );
+ const TQString &address, const IMContext &context = Any );
- void setAddress( const QString &address );
+ void setAddress( const TQString &address );
void setProtocol( KPluginInfo * protocol );
void setContext( const IMContext &context );
void activate();
KPluginInfo * protocol() const;
- QString address() const;
+ TQString address() const;
IMContext context() const;
void setPreferred( bool preferred );
bool preferred() const;
protected:
- virtual void paintCell( QPainter *p, const QColorGroup &cg, int column, int width, int alignment );
+ virtual void paintCell( TQPainter *p, const TQColorGroup &cg, int column, int width, int alignment );
private:
KPluginInfo * mProtocol;
bool mPreferred;
IMContext mContext;
- QString mAddress;
+ TQString mAddress;
};
#endif
diff --git a/kaddressbook/emaileditwidget.cpp b/kaddressbook/emaileditwidget.cpp
index 8fc857f7e..6d52c90ba 100644
--- a/kaddressbook/emaileditwidget.cpp
+++ b/kaddressbook/emaileditwidget.cpp
@@ -21,15 +21,15 @@
without including the source code for Qt in the source distribution.
*/
-#include <qcheckbox.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qpainter.h>
-#include <qpushbutton.h>
-#include <qvalidator.h>
-#include <qstring.h>
-#include <qtoolbutton.h>
-#include <qtooltip.h>
+#include <tqcheckbox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqpainter.h>
+#include <tqpushbutton.h>
+#include <tqvalidator.h>
+#include <tqstring.h>
+#include <tqtoolbutton.h>
+#include <tqtooltip.h>
#include <kaccelmanager.h>
#include <kconfig.h>
@@ -48,9 +48,9 @@ class EmailValidator : public QRegExpValidator
{
public:
EmailValidator()
- : QRegExpValidator( 0, "EmailValidator" )
+ : TQRegExpValidator( 0, "EmailValidator" )
{
- QRegExp rx( ".*@.*\\.[A-Za-z]+" );
+ TQRegExp rx( ".*@.*\\.[A-Za-z]+" );
setRegExp( rx );
}
};
@@ -58,54 +58,54 @@ class EmailValidator : public QRegExpValidator
class EmailItem : public QListBoxText
{
public:
- EmailItem( QListBox *parent, const QString &text, bool preferred )
- : QListBoxText( parent, text ), mPreferred( preferred )
+ EmailItem( TQListBox *parent, const TQString &text, bool preferred )
+ : TQListBoxText( parent, text ), mPreferred( preferred )
{}
void setPreferred( bool preferred ) { mPreferred = preferred; }
bool preferred() const { return mPreferred; }
- void setText( const QString &text )
+ void setText( const TQString &text )
{
- QListBoxText::setText( text );
+ TQListBoxText::setText( text );
}
protected:
- virtual void paint( QPainter *p )
+ virtual void paint( TQPainter *p )
{
if ( mPreferred ) {
- QFont font = p->font();
+ TQFont font = p->font();
font.setBold( true );
p->setFont( font );
}
- QListBoxText::paint( p );
+ TQListBoxText::paint( p );
}
private:
bool mPreferred;
};
-EmailEditWidget::EmailEditWidget( QWidget *parent, const char *name )
- : QWidget( parent, name )
+EmailEditWidget::EmailEditWidget( TQWidget *parent, const char *name )
+ : TQWidget( parent, name )
{
- QGridLayout *topLayout = new QGridLayout( this, 2, 2, KDialog::marginHint(),
+ TQGridLayout *topLayout = new TQGridLayout( this, 2, 2, KDialog::marginHint(),
KDialog::spacingHint() );
- QLabel *label = new QLabel( i18n( "Email:" ), this );
+ TQLabel *label = new TQLabel( i18n( "Email:" ), this );
topLayout->addWidget( label, 0, 0 );
mEmailEdit = new KLineEdit( this );
mEmailEdit->setValidator( new EmailValidator );
- connect( mEmailEdit, SIGNAL( textChanged( const QString& ) ),
- SLOT( textChanged( const QString& ) ) );
- connect( mEmailEdit, SIGNAL( textChanged( const QString& ) ),
- SIGNAL( modified() ) );
+ connect( mEmailEdit, TQT_SIGNAL( textChanged( const TQString& ) ),
+ TQT_SLOT( textChanged( const TQString& ) ) );
+ connect( mEmailEdit, TQT_SIGNAL( textChanged( const TQString& ) ),
+ TQT_SIGNAL( modified() ) );
label->setBuddy( mEmailEdit );
topLayout->addWidget( mEmailEdit, 0, 1 );
- mEditButton = new QPushButton( i18n( "Edit Email Addresses..." ), this);
- connect( mEditButton, SIGNAL( clicked() ), SLOT( edit() ) );
+ mEditButton = new TQPushButton( i18n( "Edit Email Addresses..." ), this);
+ connect( mEditButton, TQT_SIGNAL( clicked() ), TQT_SLOT( edit() ) );
topLayout->addMultiCellWidget( mEditButton, 1, 1, 0, 1 );
topLayout->activate();
@@ -121,7 +121,7 @@ void EmailEditWidget::setReadOnly( bool readOnly )
mEditButton->setEnabled( !readOnly );
}
-void EmailEditWidget::setEmails( const QStringList &list )
+void EmailEditWidget::setEmails( const TQStringList &list )
{
mEmailList = list;
@@ -134,7 +134,7 @@ void EmailEditWidget::setEmails( const QStringList &list )
mEmailEdit->blockSignals( blocked );
}
-QStringList EmailEditWidget::emails()
+TQStringList EmailEditWidget::emails()
{
if ( mEmailEdit->text().isEmpty() ) {
if ( mEmailList.count() > 0 )
@@ -162,7 +162,7 @@ void EmailEditWidget::edit()
}
}
-void EmailEditWidget::textChanged( const QString &text )
+void EmailEditWidget::textChanged( const TQString &text )
{
if ( mEmailList.count() > 0 )
mEmailList.remove( mEmailList.begin() );
@@ -171,51 +171,51 @@ void EmailEditWidget::textChanged( const QString &text )
}
-EmailEditDialog::EmailEditDialog( const QStringList &list, QWidget *parent,
+EmailEditDialog::EmailEditDialog( const TQStringList &list, TQWidget *parent,
const char *name )
: KDialogBase( KDialogBase::Plain, i18n( "Edit Email Addresses" ),
KDialogBase::Ok | KDialogBase::Cancel, KDialogBase::Help,
parent, name, true )
{
- QWidget *page = plainPage();
+ TQWidget *page = plainPage();
- QGridLayout *topLayout = new QGridLayout( page, 4, 3, 0, spacingHint() );
+ TQGridLayout *topLayout = new TQGridLayout( page, 4, 3, 0, spacingHint() );
- mEmailListBox = new QListBox( page );
+ mEmailListBox = new TQListBox( page );
// Make sure there is room for the scrollbar
mEmailListBox->setMinimumHeight( mEmailListBox->sizeHint().height() + 30 );
- connect( mEmailListBox, SIGNAL( highlighted( int ) ),
- SLOT( selectionChanged( int ) ) );
- connect( mEmailListBox, SIGNAL( selected( int ) ),
- SLOT( edit() ) );
+ connect( mEmailListBox, TQT_SIGNAL( highlighted( int ) ),
+ TQT_SLOT( selectionChanged( int ) ) );
+ connect( mEmailListBox, TQT_SIGNAL( selected( int ) ),
+ TQT_SLOT( edit() ) );
topLayout->addMultiCellWidget( mEmailListBox, 0, 3, 0, 1 );
- mAddButton = new QPushButton( i18n( "Add..." ), page );
- connect( mAddButton, SIGNAL( clicked() ), SLOT( add() ) );
+ mAddButton = new TQPushButton( i18n( "Add..." ), page );
+ connect( mAddButton, TQT_SIGNAL( clicked() ), TQT_SLOT( add() ) );
topLayout->addWidget( mAddButton, 0, 2 );
- mEditButton = new QPushButton( i18n( "Edit..." ), page );
- connect( mEditButton, SIGNAL( clicked() ), SLOT( edit() ) );
+ mEditButton = new TQPushButton( i18n( "Edit..." ), page );
+ connect( mEditButton, TQT_SIGNAL( clicked() ), TQT_SLOT( edit() ) );
topLayout->addWidget( mEditButton, 1, 2 );
- mRemoveButton = new QPushButton( i18n( "Remove" ), page );
- connect( mRemoveButton, SIGNAL( clicked() ), SLOT( remove() ) );
+ mRemoveButton = new TQPushButton( i18n( "Remove" ), page );
+ connect( mRemoveButton, TQT_SIGNAL( clicked() ), TQT_SLOT( remove() ) );
topLayout->addWidget( mRemoveButton, 2, 2 );
- mStandardButton = new QPushButton( i18n( "Set Standard" ), page );
- connect( mStandardButton, SIGNAL( clicked() ), SLOT( standard() ) );
+ mStandardButton = new TQPushButton( i18n( "Set Standard" ), page );
+ connect( mStandardButton, TQT_SIGNAL( clicked() ), TQT_SLOT( standard() ) );
topLayout->addWidget( mStandardButton, 3, 2 );
topLayout->activate();
- QStringList items = list;
+ TQStringList items = list;
if ( items.remove( "" ) > 0 )
mChanged = true;
else
mChanged = false;
- QStringList::ConstIterator it;
+ TQStringList::ConstIterator it;
bool preferred = true;
for ( it = items.begin(); it != items.end(); ++it ) {
new EmailItem( mEmailListBox, *it, preferred );
@@ -226,16 +226,16 @@ EmailEditDialog::EmailEditDialog( const QStringList &list, QWidget *parent,
selectionChanged( -1 );
KAcceleratorManager::manage( this );
- setInitialSize( QSize( 400, 200 ) );
+ setInitialSize( TQSize( 400, 200 ) );
}
EmailEditDialog::~EmailEditDialog()
{
}
-QStringList EmailEditDialog::emails() const
+TQStringList EmailEditDialog::emails() const
{
- QStringList emails;
+ TQStringList emails;
for ( uint i = 0; i < mEmailListBox->count(); ++i ) {
EmailItem *item = static_cast<EmailItem*>( mEmailListBox->item( i ) );
@@ -253,8 +253,8 @@ void EmailEditDialog::add()
EmailValidator *validator = new EmailValidator;
bool ok = false;
- QString email = KInputDialog::getText( i18n( "Add Email" ), i18n( "New Email:" ),
- QString::null, &ok, this, "EmailEditDialog",
+ TQString email = KInputDialog::getText( i18n( "Add Email" ), i18n( "New Email:" ),
+ TQString::null, &ok, this, "EmailEditDialog",
validator );
if ( !ok )
@@ -278,7 +278,7 @@ void EmailEditDialog::edit()
int editPos = mEmailListBox->currentItem();
- QString email = KInputDialog::getText( i18n( "Edit Email" ), i18n( "Email:" ),
+ TQString email = KInputDialog::getText( i18n( "Edit Email" ), i18n( "Email:" ),
mEmailListBox->text( editPos ), &ok, this,
"EmailEditDialog", validator );
@@ -300,10 +300,10 @@ void EmailEditDialog::edit()
void EmailEditDialog::remove()
{
- QString address = mEmailListBox->currentText();
+ TQString address = mEmailListBox->currentText();
- QString text = i18n( "<qt>Are you sure that you want to remove the email address <b>%1</b>?</qt>" ).arg( address );
- QString caption = i18n( "Confirm Remove" );
+ TQString text = i18n( "<qt>Are you sure that you want to remove the email address <b>%1</b>?</qt>" ).arg( address );
+ TQString caption = i18n( "Confirm Remove" );
if ( KMessageBox::warningContinueCancel( this, text, caption, KGuiItem( i18n("&Delete"), "editdelete") ) == KMessageBox::Continue) {
EmailItem *item = static_cast<EmailItem*>( mEmailListBox->item( mEmailListBox->currentItem() ) );
diff --git a/kaddressbook/emaileditwidget.h b/kaddressbook/emaileditwidget.h
index a8cef6761..ee9ec0119 100644
--- a/kaddressbook/emaileditwidget.h
+++ b/kaddressbook/emaileditwidget.h
@@ -46,11 +46,11 @@ class EmailEditWidget : public QWidget
Q_OBJECT
public:
- EmailEditWidget( QWidget *parent, const char *name = 0 );
+ EmailEditWidget( TQWidget *parent, const char *name = 0 );
~EmailEditWidget();
- void setEmails( const QStringList &list );
- QStringList emails();
+ void setEmails( const TQStringList &list );
+ TQStringList emails();
void setReadOnly( bool readOnly );
@@ -59,12 +59,12 @@ class EmailEditWidget : public QWidget
private slots:
void edit();
- void textChanged( const QString& );
+ void textChanged( const TQString& );
private:
KLineEdit *mEmailEdit;
- QPushButton *mEditButton;
- QStringList mEmailList;
+ TQPushButton *mEditButton;
+ TQStringList mEmailList;
};
class EmailEditDialog : public KDialogBase
@@ -72,11 +72,11 @@ class EmailEditDialog : public KDialogBase
Q_OBJECT
public:
- EmailEditDialog( const QStringList &list, QWidget *parent,
+ EmailEditDialog( const TQStringList &list, TQWidget *parent,
const char *name = 0 );
~EmailEditDialog();
- QStringList emails() const;
+ TQStringList emails() const;
bool changed() const;
protected slots:
@@ -87,11 +87,11 @@ class EmailEditDialog : public KDialogBase
void selectionChanged( int );
private:
- QListBox *mEmailListBox;
- QPushButton *mAddButton;
- QPushButton *mRemoveButton;
- QPushButton *mEditButton;
- QPushButton *mStandardButton;
+ TQListBox *mEmailListBox;
+ TQPushButton *mAddButton;
+ TQPushButton *mRemoveButton;
+ TQPushButton *mEditButton;
+ TQPushButton *mStandardButton;
bool mChanged;
};
diff --git a/kaddressbook/extensionmanager.cpp b/kaddressbook/extensionmanager.cpp
index 121c6a1c7..93da52d0e 100644
--- a/kaddressbook/extensionmanager.cpp
+++ b/kaddressbook/extensionmanager.cpp
@@ -27,12 +27,12 @@
#include <klocale.h>
#include <ktrader.h>
-#include <qlayout.h>
-#include <qobjectlist.h>
-#include <qsignalmapper.h>
-#include <qsplitter.h>
-#include <qtimer.h>
-#include <qwidgetstack.h>
+#include <tqlayout.h>
+#include <tqobjectlist.h>
+#include <tqsignalmapper.h>
+#include <tqsplitter.h>
+#include <tqtimer.h>
+#include <tqwidgetstack.h>
#include "addresseeeditorextension.h"
#include "core.h"
@@ -44,15 +44,15 @@ ExtensionData::ExtensionData() : action( 0 ), widget( 0 ), weight( 0 ), isDetail
{
}
-ExtensionManager::ExtensionManager( QWidget* extensionBar, QWidgetStack* detailsStack, KAB::Core *core, QObject *parent,
+ExtensionManager::ExtensionManager( TQWidget* extensionBar, TQWidgetStack* detailsStack, KAB::Core *core, TQObject *parent,
const char *name )
- : QObject( parent, name ), mExtensionBar( extensionBar ), mCore( core ),
+ : TQObject( parent, name ), mExtensionBar( extensionBar ), mCore( core ),
mMapper( 0 ), mDetailsStack( detailsStack ), mActiveDetailsWidget( 0 )
{
Q_ASSERT( mExtensionBar );
- QVBoxLayout* layout = new QVBoxLayout( mExtensionBar );
- mSplitter = new QSplitter( mExtensionBar );
- mSplitter->setOrientation( QSplitter::Vertical );
+ TQVBoxLayout* layout = new TQVBoxLayout( mExtensionBar );
+ mSplitter = new TQSplitter( mExtensionBar );
+ mSplitter->setOrientation( TQSplitter::Vertical );
layout->addWidget( mSplitter );
createExtensionWidgets();
@@ -60,7 +60,7 @@ ExtensionManager::ExtensionManager( QWidget* extensionBar, QWidgetStack* details
mActionCollection = new KActionCollection( this, "ActionCollection" );
extensionBar->setShown( false );
- QTimer::singleShot( 0, this, SLOT( createActions() ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( createActions() ) );
}
ExtensionManager::~ExtensionManager()
@@ -70,9 +70,9 @@ ExtensionManager::~ExtensionManager()
void ExtensionManager::restoreSettings()
{
- const QStringList activeExtensions = KABPrefs::instance()->activeExtensions();
+ const TQStringList activeExtensions = KABPrefs::instance()->activeExtensions();
- typedef QMap<QString, ExtensionData>::ConstIterator ConstIterator;
+ typedef TQMap<TQString, ExtensionData>::ConstIterator ConstIterator;
for ( ConstIterator it = mExtensionMap.begin(), end = mExtensionMap.end(); it != end; ++it ) {
if ( activeExtensions.contains( it.data().identifier ) ) {
KToggleAction *action = static_cast<KToggleAction*>( it.data().action );
@@ -81,7 +81,7 @@ void ExtensionManager::restoreSettings()
setExtensionActive( it.data().identifier, true );
}
}
- const QValueList<int> sizes = KABPrefs::instance()->extensionsSplitterSizes();
+ const TQValueList<int> sizes = KABPrefs::instance()->extensionsSplitterSizes();
mSplitter->setSizes( sizes );
}
@@ -107,13 +107,13 @@ bool ExtensionManager::isQuickEditVisible() const
void ExtensionManager::setSelectionChanged()
{
- for ( QStringList::ConstIterator it = mActiveExtensions.begin(), end = mActiveExtensions.end(); it != end; ++it ) {
+ for ( TQStringList::ConstIterator it = mActiveExtensions.begin(), end = mActiveExtensions.end(); it != end; ++it ) {
if ( mExtensionMap.contains( *it ) && mExtensionMap[*it].widget )
mExtensionMap[*it].widget->contactsSelectionChanged();
}
}
-void ExtensionManager::activationToggled( const QString &extid )
+void ExtensionManager::activationToggled( const TQString &extid )
{
if ( !mExtensionMap.contains( extid ) )
return;
@@ -122,7 +122,7 @@ void ExtensionManager::activationToggled( const QString &extid )
setExtensionActive( extid, activated );
}
-void ExtensionManager::setExtensionActive( const QString& extid, bool active )
+void ExtensionManager::setExtensionActive( const TQString& extid, bool active )
{
if ( !mExtensionMap.contains( extid ) )
return;
@@ -161,16 +161,16 @@ void ExtensionManager::createActions()
mActionList.setAutoDelete( false );
delete mMapper;
- mMapper = new QSignalMapper( this, "SignalMapper" );
- connect( mMapper, SIGNAL( mapped( const QString& ) ),
- this, SLOT( activationToggled( const QString& ) ) );
+ mMapper = new TQSignalMapper( this, "SignalMapper" );
+ connect( mMapper, TQT_SIGNAL( mapped( const TQString& ) ),
+ this, TQT_SLOT( activationToggled( const TQString& ) ) );
ExtensionData::List::ConstIterator it;
- for ( QMap<QString, ExtensionData>::Iterator it = mExtensionMap.begin(), end = mExtensionMap.end(); it != end; ++it ) {
+ for ( TQMap<TQString, ExtensionData>::Iterator it = mExtensionMap.begin(), end = mExtensionMap.end(); it != end; ++it ) {
ExtensionData& data = it.data();
- data.action = new KToggleAction( data.title, 0, mMapper, SLOT( map() ),
+ data.action = new KToggleAction( data.title, 0, mMapper, TQT_SLOT( map() ),
mActionCollection,
- QString( data.identifier + "_extension" ).latin1() );
+ TQString( data.identifier + "_extension" ).latin1() );
mMapper->setMapping( data.action, data.identifier );
mActionList.append( data.action );
@@ -182,7 +182,7 @@ void ExtensionManager::createActions()
mCore->guiClient()->plugActionList( "extensions_list", mActionList );
}
-QWidget* ExtensionManager::activeDetailsWidget() const
+TQWidget* ExtensionManager::activeDetailsWidget() const
{
return mActiveDetailsWidget;
}
@@ -190,7 +190,7 @@ QWidget* ExtensionManager::activeDetailsWidget() const
void ExtensionManager::createExtensionWidgets()
{
// clean up
- for ( QMap<QString, ExtensionData>::ConstIterator it = mExtensionMap.begin(), end = mExtensionMap.end(); it != end; ++it ) {
+ for ( TQMap<TQString, ExtensionData>::ConstIterator it = mExtensionMap.begin(), end = mExtensionMap.end(); it != end; ++it ) {
delete it.data().widget;
}
mExtensionMap.clear();
@@ -202,10 +202,10 @@ void ExtensionManager::createExtensionWidgets()
wdg = new AddresseeEditorExtension( mCore, mDetailsStack );
wdg->hide();
- connect( wdg, SIGNAL( modified( const KABC::Addressee::List& ) ),
- SIGNAL( modified( const KABC::Addressee::List& ) ) );
- connect( wdg, SIGNAL( deleted( const QStringList& ) ),
- SIGNAL( deleted( const QStringList& ) ) );
+ connect( wdg, TQT_SIGNAL( modified( const KABC::Addressee::List& ) ),
+ TQT_SIGNAL( modified( const KABC::Addressee::List& ) ) );
+ connect( wdg, TQT_SIGNAL( deleted( const TQStringList& ) ),
+ TQT_SIGNAL( deleted( const TQStringList& ) ) );
ExtensionData data;
data.identifier = wdg->identifier();
@@ -217,7 +217,7 @@ void ExtensionManager::createExtensionWidgets()
// load the other extensions
const KTrader::OfferList plugins = KTrader::self()->query( "KAddressBook/Extension",
- QString( "[X-KDE-KAddressBook-ExtensionPluginVersion] == %1" ).arg( KAB_EXTENSIONWIDGET_PLUGIN_VERSION ) );
+ TQString( "[X-KDE-KAddressBook-ExtensionPluginVersion] == %1" ).arg( KAB_EXTENSIONWIDGET_PLUGIN_VERSION ) );
KTrader::OfferList::ConstIterator it;
for ( it = plugins.begin(); it != plugins.end(); ++it ) {
@@ -239,10 +239,10 @@ void ExtensionManager::createExtensionWidgets()
if ( wdg->identifier() == "distribution_list_editor_ng" )
mSplitter->moveToFirst( wdg );
wdg->hide();
- connect( wdg, SIGNAL( modified( const KABC::Addressee::List& ) ),
- SIGNAL( modified( const KABC::Addressee::List& ) ) );
- connect( wdg, SIGNAL( deleted( const QStringList& ) ),
- SIGNAL( deleted( const QStringList& ) ) );
+ connect( wdg, TQT_SIGNAL( modified( const KABC::Addressee::List& ) ),
+ TQT_SIGNAL( modified( const KABC::Addressee::List& ) ) );
+ connect( wdg, TQT_SIGNAL( deleted( const TQStringList& ) ),
+ TQT_SIGNAL( deleted( const TQStringList& ) ) );
ExtensionData data;
data.identifier = wdg->identifier();
diff --git a/kaddressbook/extensionmanager.h b/kaddressbook/extensionmanager.h
index 5ecc725b3..44cf24c36 100644
--- a/kaddressbook/extensionmanager.h
+++ b/kaddressbook/extensionmanager.h
@@ -26,10 +26,10 @@
#include "extensionwidget.h"
-#include <qwidget.h>
-#include <qmap.h>
-#include <qptrlist.h>
-#include <qstringlist.h>
+#include <tqwidget.h>
+#include <tqmap.h>
+#include <tqptrlist.h>
+#include <tqstringlist.h>
class QSignalMapper;
class QWidgetStack;
@@ -43,12 +43,12 @@ class ExtensionData
{
public:
ExtensionData();
- typedef QValueList<ExtensionData> List;
+ typedef TQValueList<ExtensionData> List;
KToggleAction* action;
KAB::ExtensionWidget *widget;
- QString identifier;
- QString title;
+ TQString identifier;
+ TQString title;
int weight;
bool isDetailsExtension;
};
@@ -58,7 +58,7 @@ class ExtensionManager : public QObject
Q_OBJECT
public:
- ExtensionManager( QWidget *extensionBar, QWidgetStack *detailsStack, KAB::Core *core, QObject *parent, const char *name = 0 );
+ ExtensionManager( TQWidget *extensionBar, TQWidgetStack *detailsStack, KAB::Core *core, TQObject *parent, const char *name = 0 );
~ExtensionManager();
/**
@@ -82,7 +82,7 @@ class ExtensionManager : public QObject
*/
bool isQuickEditVisible() const;
- QWidget *activeDetailsWidget() const;
+ TQWidget *activeDetailsWidget() const;
public slots:
void setSelectionChanged();
@@ -90,29 +90,29 @@ class ExtensionManager : public QObject
signals:
- void detailsWidgetActivated( QWidget* widget );
- void detailsWidgetDeactivated( QWidget* widget );
+ void detailsWidgetActivated( TQWidget* widget );
+ void detailsWidgetDeactivated( TQWidget* widget );
void modified( const KABC::Addressee::List& );
- void deleted( const QStringList& );
+ void deleted( const TQStringList& );
private slots:
- void activationToggled( const QString &extid );
+ void activationToggled( const TQString &extid );
private:
void createExtensionWidgets();
- void setExtensionActive( const QString &extid, bool active );
+ void setExtensionActive( const TQString &extid, bool active );
private:
- QWidget *mExtensionBar;
+ TQWidget *mExtensionBar;
KAB::Core *mCore;
- QMap<QString, ExtensionData> mExtensionMap;
- QStringList mActiveExtensions;
- QSignalMapper *mMapper;
- QPtrList<KAction> mActionList;
+ TQMap<TQString, ExtensionData> mExtensionMap;
+ TQStringList mActiveExtensions;
+ TQSignalMapper *mMapper;
+ TQPtrList<KAction> mActionList;
KActionCollection *mActionCollection;
- QSplitter *mSplitter;
- QWidgetStack *mDetailsStack;
- QWidget *mActiveDetailsWidget;
+ TQSplitter *mSplitter;
+ TQWidgetStack *mDetailsStack;
+ TQWidget *mActiveDetailsWidget;
};
#endif
diff --git a/kaddressbook/features/distributionlistngwidget.cpp b/kaddressbook/features/distributionlistngwidget.cpp
index fee8377a6..08ef3e4cd 100644
--- a/kaddressbook/features/distributionlistngwidget.cpp
+++ b/kaddressbook/features/distributionlistngwidget.cpp
@@ -35,23 +35,23 @@
#include <klocale.h>
#include <kpopupmenu.h>
-#include <qevent.h>
-#include <qguardedptr.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qpoint.h>
-#include <qtimer.h>
-#include <qpushbutton.h>
-#include <qtooltip.h>
-
-KAB::DistributionListNg::ListBox::ListBox( QWidget* parent ) : KListBox( parent )
+#include <tqevent.h>
+#include <tqguardedptr.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqpoint.h>
+#include <tqtimer.h>
+#include <tqpushbutton.h>
+#include <tqtooltip.h>
+
+KAB::DistributionListNg::ListBox::ListBox( TQWidget* parent ) : KListBox( parent )
{
setAcceptDrops( true );
}
-void KAB::DistributionListNg::ListBox::dragMoveEvent( QDragMoveEvent *event )
+void KAB::DistributionListNg::ListBox::dragMoveEvent( TQDragMoveEvent *event )
{
- QListBoxItem *item = itemAt( event->pos() );
+ TQListBoxItem *item = itemAt( event->pos() );
if ( !item ) {
event->ignore();
}
@@ -60,18 +60,18 @@ void KAB::DistributionListNg::ListBox::dragMoveEvent( QDragMoveEvent *event )
}
}
-void KAB::DistributionListNg::ListBox::dragEnterEvent( QDragEnterEvent *event )
+void KAB::DistributionListNg::ListBox::dragEnterEvent( TQDragEnterEvent *event )
{
KListBox::dragEnterEvent( event );
}
-void KAB::DistributionListNg::ListBox::dropEvent( QDropEvent *event )
+void KAB::DistributionListNg::ListBox::dropEvent( TQDropEvent *event )
{
- QListBoxItem *item = itemAt( event->pos() );
+ TQListBoxItem *item = itemAt( event->pos() );
if ( !item || index( item ) == 0 )
return;
- QString vcards;
+ TQString vcards;
if ( !KVCardDrag::decode( event, vcards ) )
return;
@@ -85,12 +85,12 @@ namespace DistributionListNg {
class Factory : public KAB::ExtensionFactory
{
public:
- KAB::ExtensionWidget *extension( KAB::Core *core, QWidget *parent, const char *name )
+ KAB::ExtensionWidget *extension( KAB::Core *core, TQWidget *parent, const char *name )
{
return new KAB::DistributionListNg::MainWidget( core, parent, name );
}
- QString identifier() const
+ TQString identifier() const
{
return "distribution_list_editor";
}
@@ -106,76 +106,76 @@ extern "C" {
}
}
-QString KAB::DistributionListNg::MainWidget::title() const
+TQString KAB::DistributionListNg::MainWidget::title() const
{
return i18n( "Distribution List Editor NG" );
}
-QString KAB::DistributionListNg::MainWidget::identifier() const
+TQString KAB::DistributionListNg::MainWidget::identifier() const
{
return "distribution_list_editor_ng";
}
-KAB::DistributionListNg::MainWidget::MainWidget( KAB::Core *core, QWidget *parent, const char *name ) : KAB::ExtensionWidget( core, parent, name )
+KAB::DistributionListNg::MainWidget::MainWidget( KAB::Core *core, TQWidget *parent, const char *name ) : KAB::ExtensionWidget( core, parent, name )
{
- QVBoxLayout *layout = new QVBoxLayout( this );
+ TQVBoxLayout *layout = new TQVBoxLayout( this );
layout->setSpacing( KDialog::spacingHint() );
- QHBoxLayout *buttonLayout = new QHBoxLayout();
+ TQHBoxLayout *buttonLayout = new TQHBoxLayout();
layout->addLayout( buttonLayout );
- QLabel *label = new QLabel( this );
+ TQLabel *label = new TQLabel( this );
label->setText( i18n( "Distribution Lists" ) );
buttonLayout->addWidget( label );
buttonLayout->addStretch( 1 );
- mAddButton = new QPushButton( this );
+ mAddButton = new TQPushButton( this );
mAddButton->setIconSet( SmallIconSet( "add" ) );
- QToolTip::add( mAddButton, i18n( "Add distribution list" ) );
- connect( mAddButton, SIGNAL(clicked()), core, SLOT(newDistributionList()) );
+ TQToolTip::add( mAddButton, i18n( "Add distribution list" ) );
+ connect( mAddButton, TQT_SIGNAL(clicked()), core, TQT_SLOT(newDistributionList()) );
buttonLayout->addWidget( mAddButton );
- mEditButton = new QPushButton( this );
+ mEditButton = new TQPushButton( this );
mEditButton->setIconSet( SmallIconSet( "edit" ) );
- QToolTip::add( mEditButton, i18n( "Edit distribution list" ) );
- connect( mEditButton, SIGNAL(clicked()), this, SLOT(editSelectedDistributionList()) );
+ TQToolTip::add( mEditButton, i18n( "Edit distribution list" ) );
+ connect( mEditButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(editSelectedDistributionList()) );
buttonLayout->addWidget( mEditButton );
- mRemoveButton = new QPushButton( this );
+ mRemoveButton = new TQPushButton( this );
mRemoveButton->setIconSet( SmallIconSet( "remove" ) );
- QToolTip::add( mRemoveButton, i18n( "Remove distribution list" ) );
- connect( mRemoveButton, SIGNAL(clicked()), this, SLOT(deleteSelectedDistributionList()) );
+ TQToolTip::add( mRemoveButton, i18n( "Remove distribution list" ) );
+ connect( mRemoveButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(deleteSelectedDistributionList()) );
buttonLayout->addWidget( mRemoveButton );
mListBox = new ListBox( this );
- connect( mListBox, SIGNAL( contextMenuRequested( QListBoxItem*, const QPoint& ) ),
- this, SLOT( contextMenuRequested( QListBoxItem*, const QPoint& ) ) );
- connect( mListBox, SIGNAL( dropped( const QString &, const KABC::Addressee::List & ) ),
- this, SLOT( contactsDropped( const QString &, const KABC::Addressee::List & ) ) );
- connect( mListBox, SIGNAL( highlighted( int ) ),
- this, SLOT( itemSelected( int ) ) );
+ connect( mListBox, TQT_SIGNAL( contextMenuRequested( TQListBoxItem*, const TQPoint& ) ),
+ this, TQT_SLOT( contextMenuRequested( TQListBoxItem*, const TQPoint& ) ) );
+ connect( mListBox, TQT_SIGNAL( dropped( const TQString &, const KABC::Addressee::List & ) ),
+ this, TQT_SLOT( contactsDropped( const TQString &, const KABC::Addressee::List & ) ) );
+ connect( mListBox, TQT_SIGNAL( highlighted( int ) ),
+ this, TQT_SLOT( itemSelected( int ) ) );
layout->addWidget( mListBox );
- connect( core, SIGNAL( contactsUpdated() ),
- this, SLOT( updateEntries() ) );
- connect( core->addressBook(), SIGNAL( addressBookChanged( AddressBook* ) ),
- this, SLOT( updateEntries() ) );
+ connect( core, TQT_SIGNAL( contactsUpdated() ),
+ this, TQT_SLOT( updateEntries() ) );
+ connect( core->addressBook(), TQT_SIGNAL( addressBookChanged( AddressBook* ) ),
+ this, TQT_SLOT( updateEntries() ) );
// When contacts are changed, update both distr list combo and contents of displayed distr list
- connect( core, SIGNAL( contactsUpdated() ),
- this, SLOT( updateEntries() ) );
+ connect( core, TQT_SIGNAL( contactsUpdated() ),
+ this, TQT_SLOT( updateEntries() ) );
- QTimer::singleShot( 0, this, SLOT( updateEntries() ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( updateEntries() ) );
}
-void KAB::DistributionListNg::MainWidget::contextMenuRequested( QListBoxItem *item, const QPoint &point )
+void KAB::DistributionListNg::MainWidget::contextMenuRequested( TQListBoxItem *item, const TQPoint &point )
{
- QGuardedPtr<KPopupMenu> menu = new KPopupMenu( this );
- menu->insertItem( i18n( "New Distribution List..." ), core(), SLOT( newDistributionList() ) );
+ TQGuardedPtr<KPopupMenu> menu = new KPopupMenu( this );
+ menu->insertItem( i18n( "New Distribution List..." ), core(), TQT_SLOT( newDistributionList() ) );
if ( item )
{
- menu->insertItem( i18n( "Edit..." ), this, SLOT( editSelectedDistributionList() ) );
- menu->insertItem( i18n( "Delete" ), this, SLOT( deleteSelectedDistributionList() ) );
+ menu->insertItem( i18n( "Edit..." ), this, TQT_SLOT( editSelectedDistributionList() ) );
+ menu->insertItem( i18n( "Delete" ), this, TQT_SLOT( deleteSelectedDistributionList() ) );
}
menu->exec( point );
delete menu;
@@ -183,7 +183,7 @@ void KAB::DistributionListNg::MainWidget::contextMenuRequested( QListBoxItem *it
void KAB::DistributionListNg::MainWidget::editSelectedDistributionList()
{
- const QListBoxItem* const item = mListBox->selectedItem();
+ const TQListBoxItem* const item = mListBox->selectedItem();
if ( !item )
return;
core()->editDistributionList( item->text() );
@@ -191,8 +191,8 @@ void KAB::DistributionListNg::MainWidget::editSelectedDistributionList()
void KAB::DistributionListNg::MainWidget::deleteSelectedDistributionList()
{
- const QListBoxItem* const item = mListBox->selectedItem();
- const QString name = item ? item->text() : QString();
+ const TQListBoxItem* const item = mListBox->selectedItem();
+ const TQString name = item ? item->text() : TQString();
if ( name.isNull() )
return;
const KPIM::DistributionList list = KPIM::DistributionList::findByName(
@@ -202,7 +202,7 @@ void KAB::DistributionListNg::MainWidget::deleteSelectedDistributionList()
core()->deleteDistributionLists( name );
}
-void KAB::DistributionListNg::MainWidget::contactsDropped( const QString &listName, const KABC::Addressee::List &addressees )
+void KAB::DistributionListNg::MainWidget::contactsDropped( const TQString &listName, const KABC::Addressee::List &addressees )
{
if ( addressees.isEmpty() )
return;
@@ -228,7 +228,7 @@ void KAB::DistributionListNg::MainWidget::changed( const KABC::Addressee& dist )
void KAB::DistributionListNg::MainWidget::updateEntries()
{
const bool hadSelection = mListBox->selectedItem() != 0;
- const QStringList newEntries = core()->distributionListNames();
+ const TQStringList newEntries = core()->distributionListNames();
if ( !mCurrentEntries.isEmpty() && newEntries == mCurrentEntries )
return;
mCurrentEntries = newEntries;
@@ -241,7 +241,7 @@ void KAB::DistributionListNg::MainWidget::updateEntries()
void KAB::DistributionListNg::MainWidget::itemSelected( int index )
{
- core()->setSelectedDistributionList( index == 0 ? QString() : mListBox->item( index )->text() );
+ core()->setSelectedDistributionList( index == 0 ? TQString() : mListBox->item( index )->text() );
mEditButton->setEnabled( index > 0 );
mRemoveButton->setEnabled( index > 0 );
}
diff --git a/kaddressbook/features/distributionlistngwidget.h b/kaddressbook/features/distributionlistngwidget.h
index 4a174dd83..0bfa3d29d 100644
--- a/kaddressbook/features/distributionlistngwidget.h
+++ b/kaddressbook/features/distributionlistngwidget.h
@@ -29,7 +29,7 @@
#include <klistbox.h>
-#include <qstringlist.h>
+#include <tqstringlist.h>
class QDragEnterEvent;
class QDragMoveEvent;
@@ -48,19 +48,19 @@ class ListBox : public KListBox
{
Q_OBJECT
public:
- ListBox( QWidget* parent = 0 );
+ ListBox( TQWidget* parent = 0 );
signals:
- void dropped( const QString &listName, const KABC::Addressee::List &addressees );
+ void dropped( const TQString &listName, const KABC::Addressee::List &addressees );
protected:
//override
- void dragEnterEvent( QDragEnterEvent *event );
+ void dragEnterEvent( TQDragEnterEvent *event );
//override
- void dragMoveEvent( QDragMoveEvent *event );
+ void dragMoveEvent( TQDragMoveEvent *event );
//override
- void dropEvent( QDropEvent *event );
+ void dropEvent( TQDropEvent *event );
};
class MainWidget : public KAB::ExtensionWidget
@@ -68,13 +68,13 @@ class MainWidget : public KAB::ExtensionWidget
Q_OBJECT
public:
- explicit MainWidget( KAB::Core *core, QWidget *parent = 0, const char *name = 0 );
+ explicit MainWidget( KAB::Core *core, TQWidget *parent = 0, const char *name = 0 );
//impl
- QString title() const;
+ TQString title() const;
//impl
- QString identifier() const;
+ TQString identifier() const;
private:
@@ -85,17 +85,17 @@ private slots:
void deleteSelectedDistributionList();
void editSelectedDistributionList();
- void contextMenuRequested( QListBoxItem *item, const QPoint &point );
+ void contextMenuRequested( TQListBoxItem *item, const TQPoint &point );
void updateEntries();
void itemSelected( int index );
- void contactsDropped( const QString &listName, const KABC::Addressee::List &addressees );
+ void contactsDropped( const TQString &listName, const KABC::Addressee::List &addressees );
private:
ListBox *mListBox;
- QStringList mCurrentEntries;
- QPushButton *mAddButton;
- QPushButton *mEditButton;
- QPushButton *mRemoveButton;
+ TQStringList mCurrentEntries;
+ TQPushButton *mAddButton;
+ TQPushButton *mEditButton;
+ TQPushButton *mRemoveButton;
};
} // namespace DistributionListNg
diff --git a/kaddressbook/features/distributionlistwidget.cpp b/kaddressbook/features/distributionlistwidget.cpp
index 9c322d6f6..93a00bdfa 100644
--- a/kaddressbook/features/distributionlistwidget.cpp
+++ b/kaddressbook/features/distributionlistwidget.cpp
@@ -22,13 +22,13 @@
#include "distributionlistwidget.h"
-#include <qbuttongroup.h>
-#include <qcombobox.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qlistview.h>
-#include <qpushbutton.h>
-#include <qradiobutton.h>
+#include <tqbuttongroup.h>
+#include <tqcombobox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqlistview.h>
+#include <tqpushbutton.h>
+#include <tqradiobutton.h>
#include <kaccelmanager.h>
#include <kconfig.h>
@@ -55,12 +55,12 @@ typedef KABC::DistributionList DistributionList;
class DistributionListFactory : public KAB::ExtensionFactory
{
public:
- KAB::ExtensionWidget *extension( KAB::Core *core, QWidget *parent, const char *name )
+ KAB::ExtensionWidget *extension( KAB::Core *core, TQWidget *parent, const char *name )
{
return new DistributionListWidget( core, parent, name );
}
- QString identifier() const
+ TQString identifier() const
{
return "distribution_list_editor";
}
@@ -82,15 +82,15 @@ class DeletePressedCatcher : public QObject
{
public:
DeletePressedCatcher( DistributionListWidget *parent )
- : QObject( parent, "DeletePressedCatcher" ), mWidget( parent )
+ : TQObject( parent, "DeletePressedCatcher" ), mWidget( parent )
{
}
protected:
- bool eventFilter( QObject*, QEvent *event )
+ bool eventFilter( TQObject*, TQEvent *event )
{
- if ( event->type() == QEvent::AccelOverride ) {
- QKeyEvent *keyEvent = (QKeyEvent*)event;
+ if ( event->type() == TQEvent::AccelOverride ) {
+ TQKeyEvent *keyEvent = (TQKeyEvent*)event;
if ( keyEvent->key() == Qt::Key_Delete ) {
keyEvent->accept();
mWidget->removeContact();
@@ -110,8 +110,8 @@ class ContactItem : public QListViewItem
{
public:
ContactItem( DistributionListView *parent, const KABC::Addressee &addressee,
- const QString &email = QString::null ) :
- QListViewItem( parent ),
+ const TQString &email = TQString::null ) :
+ TQListViewItem( parent ),
mAddressee( addressee ),
mEmail( email )
{
@@ -130,47 +130,47 @@ class ContactItem : public QListViewItem
return mAddressee;
}
- QString email() const
+ TQString email() const
{
return mEmail;
}
protected:
- bool acceptDrop( const QMimeSource* )
+ bool acceptDrop( const TQMimeSource* )
{
return true;
}
private:
KABC::Addressee mAddressee;
- QString mEmail;
+ TQString mEmail;
};
-DistributionListWidget::DistributionListWidget( KAB::Core *core, QWidget *parent,
+DistributionListWidget::DistributionListWidget( KAB::Core *core, TQWidget *parent,
const char *name )
: KAB::ExtensionWidget( core, parent, name )
#ifndef KDEPIM_NEW_DISTRLISTS
, mManager( 0 )
#endif
{
- QGridLayout *topLayout = new QGridLayout( this, 3, 4, KDialog::marginHint(),
+ TQGridLayout *topLayout = new TQGridLayout( this, 3, 4, KDialog::marginHint(),
KDialog::spacingHint() );
- mNameCombo = new QComboBox( this );
+ mNameCombo = new TQComboBox( this );
topLayout->addWidget( mNameCombo, 0, 0 );
- connect( mNameCombo, SIGNAL( activated( int ) ), SLOT( updateContactView() ) );
+ connect( mNameCombo, TQT_SIGNAL( activated( int ) ), TQT_SLOT( updateContactView() ) );
- mCreateListButton = new QPushButton( i18n( "New List..." ), this );
+ mCreateListButton = new TQPushButton( i18n( "New List..." ), this );
topLayout->addWidget( mCreateListButton, 0, 1 );
- connect( mCreateListButton, SIGNAL( clicked() ), SLOT( createList() ) );
+ connect( mCreateListButton, TQT_SIGNAL( clicked() ), TQT_SLOT( createList() ) );
- mEditListButton = new QPushButton( i18n( "Rename List..." ), this );
+ mEditListButton = new TQPushButton( i18n( "Rename List..." ), this );
topLayout->addWidget( mEditListButton, 0, 2 );
- connect( mEditListButton, SIGNAL( clicked() ), SLOT( editList() ) );
+ connect( mEditListButton, TQT_SIGNAL( clicked() ), TQT_SLOT( editList() ) );
- mRemoveListButton = new QPushButton( i18n( "Remove List" ), this );
+ mRemoveListButton = new TQPushButton( i18n( "Remove List" ), this );
topLayout->addWidget( mRemoveListButton, 0, 3 );
- connect( mRemoveListButton, SIGNAL( clicked() ), SLOT( removeList() ) );
+ connect( mRemoveListButton, TQT_SIGNAL( clicked() ), TQT_SLOT( removeList() ) );
mContactView = new DistributionListView( this );
mContactView->addColumn( i18n( "Name" ) );
@@ -180,44 +180,44 @@ DistributionListWidget::DistributionListWidget( KAB::Core *core, QWidget *parent
mContactView->setAllColumnsShowFocus( true );
mContactView->setFullWidth( true );
topLayout->addMultiCellWidget( mContactView, 1, 1, 0, 3 );
- connect( mContactView, SIGNAL( selectionChanged() ),
- SLOT( selectionContactViewChanged() ) );
- connect( mContactView, SIGNAL( dropped( QDropEvent*, QListViewItem* ) ),
- SLOT( dropped( QDropEvent*, QListViewItem* ) ) );
+ connect( mContactView, TQT_SIGNAL( selectionChanged() ),
+ TQT_SLOT( selectionContactViewChanged() ) );
+ connect( mContactView, TQT_SIGNAL( dropped( TQDropEvent*, TQListViewItem* ) ),
+ TQT_SLOT( dropped( TQDropEvent*, TQListViewItem* ) ) );
- mAddContactButton = new QPushButton( i18n( "Add Contact" ), this );
+ mAddContactButton = new TQPushButton( i18n( "Add Contact" ), this );
mAddContactButton->setEnabled( false );
topLayout->addWidget( mAddContactButton, 2, 0 );
- connect( mAddContactButton, SIGNAL( clicked() ), SLOT( addContact() ) );
+ connect( mAddContactButton, TQT_SIGNAL( clicked() ), TQT_SLOT( addContact() ) );
- mEntryCountLabel = new QLabel( this );
+ mEntryCountLabel = new TQLabel( this );
topLayout->addWidget( mEntryCountLabel, 2, 1 );
- mChangeEmailButton = new QPushButton( i18n( "Change Email..." ), this );
+ mChangeEmailButton = new TQPushButton( i18n( "Change Email..." ), this );
topLayout->addWidget( mChangeEmailButton, 2, 2 );
- connect( mChangeEmailButton, SIGNAL( clicked() ), SLOT( changeEmail() ) );
+ connect( mChangeEmailButton, TQT_SIGNAL( clicked() ), TQT_SLOT( changeEmail() ) );
- mRemoveContactButton = new QPushButton( i18n( "Remove Contact" ), this );
+ mRemoveContactButton = new TQPushButton( i18n( "Remove Contact" ), this );
topLayout->addWidget( mRemoveContactButton, 2, 3 );
- connect( mRemoveContactButton, SIGNAL( clicked() ), SLOT( removeContact() ) );
+ connect( mRemoveContactButton, TQT_SIGNAL( clicked() ), TQT_SLOT( removeContact() ) );
#ifdef KDEPIM_NEW_DISTRLISTS
// When contacts are changed, update both distr list combo and contents of displayed distr list
- connect( core, SIGNAL( contactsUpdated() ),
- this, SLOT( updateNameCombo() ) );
+ connect( core, TQT_SIGNAL( contactsUpdated() ),
+ this, TQT_SLOT( updateNameCombo() ) );
#else
mManager = new KABC::DistributionListManager( core->addressBook() );
- connect( KABC::DistributionListWatcher::self(), SIGNAL( changed() ),
- this, SLOT( updateNameCombo() ) );
+ connect( KABC::DistributionListWatcher::self(), TQT_SIGNAL( changed() ),
+ this, TQT_SLOT( updateNameCombo() ) );
#endif
- connect( core->addressBook(), SIGNAL( addressBookChanged( AddressBook* ) ),
- this, SLOT( updateNameCombo() ) );
+ connect( core->addressBook(), TQT_SIGNAL( addressBookChanged( AddressBook* ) ),
+ this, TQT_SLOT( updateNameCombo() ) );
updateNameCombo();
- QObject *catcher = new DeletePressedCatcher( this );
+ TQObject *catcher = new DeletePressedCatcher( this );
installEventFilter( catcher );
mContactView->installEventFilter( catcher );
@@ -252,7 +252,7 @@ void DistributionListWidget::selectionContactViewChanged()
mRemoveContactButton->setEnabled( state );
}
-bool DistributionListWidget::alreadyExists( const QString& distrListName ) const
+bool DistributionListWidget::alreadyExists( const TQString& distrListName ) const
{
#ifdef KDEPIM_NEW_DISTRLISTS
return core()->distributionListNames().contains( distrListName );
@@ -263,9 +263,9 @@ bool DistributionListWidget::alreadyExists( const QString& distrListName ) const
void DistributionListWidget::createList()
{
- QString newName = KInputDialog::getText( i18n( "New Distribution List" ),
+ TQString newName = KInputDialog::getText( i18n( "New Distribution List" ),
i18n( "Please enter name:" ),
- QString::null, 0, this );
+ TQString::null, 0, this );
if ( newName.isEmpty() ) return;
@@ -301,9 +301,9 @@ void DistributionListWidget::createList()
void DistributionListWidget::editList()
{
- const QString oldName = mNameCombo->currentText();
+ const TQString oldName = mNameCombo->currentText();
- const QString newName = KInputDialog::getText( i18n( "Rename Distribution List" ),
+ const TQString newName = KInputDialog::getText( i18n( "Rename Distribution List" ),
i18n( "Please enter name:" ),
oldName, 0, this );
@@ -344,7 +344,7 @@ void DistributionListWidget::removeList()
{
int result = KMessageBox::warningContinueCancel( this,
i18n( "<qt>Delete distribution list <b>%1</b>?</qt>" ) .arg( mNameCombo->currentText() ),
- QString::null, KGuiItem( i18n("Delete"), "editdelete") );
+ TQString::null, KGuiItem( i18n("Delete"), "editdelete") );
if ( result != KMessageBox::Continue )
return;
@@ -447,7 +447,7 @@ void DistributionListWidget::changeEmail()
return;
bool canceled = false;
- const QString email = EmailSelector::getEmail( contactItem->addressee().emails(),
+ const TQString email = EmailSelector::getEmail( contactItem->addressee().emails(),
contactItem->email(), this, canceled);
if( canceled)
return;
@@ -513,10 +513,10 @@ void DistributionListWidget::updateNameCombo()
int pos = mNameCombo->currentItem();
mNameCombo->clear();
#ifdef KDEPIM_NEW_DISTRLISTS
- const QStringList names = core()->distributionListNames();
+ const TQStringList names = core()->distributionListNames();
#else
mManager->load();
- const QStringList names = mManager->listNames();
+ const TQStringList names = mManager->listNames();
#endif
mNameCombo->insertStringList( names );
mNameCombo->setCurrentItem( QMIN( pos, (int)names.count() - 1 ) );
@@ -524,7 +524,7 @@ void DistributionListWidget::updateNameCombo()
updateContactView();
}
-void DistributionListWidget::dropEvent( QDropEvent *e )
+void DistributionListWidget::dropEvent( TQDropEvent *e )
{
if ( mNameCombo->count() == 0 )
return;
@@ -541,7 +541,7 @@ void DistributionListWidget::dropEvent( QDropEvent *e )
KABC::DistributionList& dist = *list;
#endif
- QString vcards;
+ TQString vcards;
if ( KVCardDrag::decode( e, vcards ) ) {
KABC::VCardConverter converter;
const KABC::Addressee::List lst = converter.parseVCards( vcards );
@@ -563,17 +563,17 @@ void DistributionListWidget::contactsSelectionChanged()
mAddContactButton->setEnabled( contactsSelected() && mNameCombo->count() > 0 );
}
-QString DistributionListWidget::title() const
+TQString DistributionListWidget::title() const
{
return i18n( "Distribution List Editor" );
}
-QString DistributionListWidget::identifier() const
+TQString DistributionListWidget::identifier() const
{
return "distribution_list_editor";
}
-void DistributionListWidget::dropped( QDropEvent *e, QListViewItem* )
+void DistributionListWidget::dropped( TQDropEvent *e, TQListViewItem* )
{
dropEvent( e );
}
@@ -590,7 +590,7 @@ void DistributionListWidget::changed()
}
#endif
-DistributionListView::DistributionListView( QWidget *parent, const char* name )
+DistributionListView::DistributionListView( TQWidget *parent, const char* name )
: KListView( parent, name )
{
setDragEnabled( true );
@@ -598,66 +598,66 @@ DistributionListView::DistributionListView( QWidget *parent, const char* name )
setAllColumnsShowFocus( true );
}
-void DistributionListView::dragEnterEvent( QDragEnterEvent* e )
+void DistributionListView::dragEnterEvent( TQDragEnterEvent* e )
{
- bool canDecode = QTextDrag::canDecode( e );
+ bool canDecode = TQTextDrag::canDecode( e );
e->accept( canDecode );
}
-void DistributionListView::viewportDragMoveEvent( QDragMoveEvent *e )
+void DistributionListView::viewportDragMoveEvent( TQDragMoveEvent *e )
{
- bool canDecode = QTextDrag::canDecode( e );
+ bool canDecode = TQTextDrag::canDecode( e );
e->accept( canDecode );
}
-void DistributionListView::viewportDropEvent( QDropEvent *e )
+void DistributionListView::viewportDropEvent( TQDropEvent *e )
{
emit dropped( e, 0 );
}
-void DistributionListView::dropEvent( QDropEvent *e )
+void DistributionListView::dropEvent( TQDropEvent *e )
{
emit dropped( e, 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|Cancel, 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 );
- QRadioButton *button = new QRadioButton( i18n("Preferred address"), mButtonGroup );
+ TQRadioButton *button = new TQRadioButton( i18n("Preferred address"), mButtonGroup );
button->setDown( true );
mEmailMap.insert( mButtonGroup->id( button ), "" );
- QStringList::ConstIterator it;
+ TQStringList::ConstIterator it;
for ( it = emails.begin(); it != emails.end(); ++it ) {
- button = new QRadioButton( *it, mButtonGroup );
+ button = new TQRadioButton( *it, mButtonGroup );
mEmailMap.insert( mButtonGroup->id( button ), *it );
if ( (*it) == current )
button->setDown( true );
}
}
-QString EmailSelector::selected() const
+TQString EmailSelector::selected() const
{
- QButton *button = mButtonGroup->selected();
+ TQButton *button = mButtonGroup->selected();
if ( button )
return mEmailMap[ mButtonGroup->id( button ) ];
- return QString::null;
+ return TQString::null;
}
-QString EmailSelector::getEmail( const QStringList &emails,
- const QString &current, QWidget *parent, bool &canceled )
+TQString EmailSelector::getEmail( const TQStringList &emails,
+ const TQString &current, TQWidget *parent, bool &canceled )
{
EmailSelector dlg( emails, current, parent );
if(dlg.exec())
@@ -666,7 +666,7 @@ QString EmailSelector::getEmail( const QStringList &emails,
return dlg.selected();
}
canceled = true;
- return QString();
+ return TQString();
}
diff --git a/kaddressbook/features/distributionlistwidget.h b/kaddressbook/features/distributionlistwidget.h
index d52a06ab0..4ee5e76ad 100644
--- a/kaddressbook/features/distributionlistwidget.h
+++ b/kaddressbook/features/distributionlistwidget.h
@@ -50,17 +50,17 @@ class DistributionListWidget : public KAB::ExtensionWidget
Q_OBJECT
public:
- DistributionListWidget( KAB::Core*, QWidget *parent, const char *name = 0 );
+ DistributionListWidget( KAB::Core*, TQWidget *parent, const char *name = 0 );
virtual ~DistributionListWidget();
void contactsSelectionChanged();
- QString title() const;
- QString identifier() const;
+ TQString title() const;
+ TQString identifier() const;
public slots:
void save();
- void dropped( QDropEvent*, QListViewItem* );
+ void dropped( TQDropEvent*, TQListViewItem* );
void removeContact();
@@ -80,25 +80,25 @@ class DistributionListWidget : public KAB::ExtensionWidget
#else
void changed();
#endif
- bool alreadyExists( const QString& distrListName ) const;
+ bool alreadyExists( const TQString& distrListName ) const;
protected:
- void dropEvent( QDropEvent* );
+ void dropEvent( TQDropEvent* );
private:
- QComboBox *mNameCombo;
- QLabel *mEntryCountLabel;
+ TQComboBox *mNameCombo;
+ TQLabel *mEntryCountLabel;
DistributionListView *mContactView;
#ifndef KDEPIM_NEW_DISTRLISTS
KABC::DistributionListManager *mManager;
#endif
- QPushButton *mCreateListButton;
- QPushButton *mEditListButton;
- QPushButton *mRemoveListButton;
- QPushButton *mChangeEmailButton;
- QPushButton *mAddContactButton;
- QPushButton *mRemoveContactButton;
+ TQPushButton *mCreateListButton;
+ TQPushButton *mEditListButton;
+ TQPushButton *mRemoveListButton;
+ TQPushButton *mChangeEmailButton;
+ TQPushButton *mAddContactButton;
+ TQPushButton *mRemoveContactButton;
};
/**
@@ -109,13 +109,13 @@ class DistributionListView : public KListView
Q_OBJECT
public:
- DistributionListView( QWidget *parent, const char* name = 0 );
+ DistributionListView( TQWidget *parent, const char* name = 0 );
protected:
- void dragEnterEvent( QDragEnterEvent *e );
- void dropEvent( QDropEvent *e );
- void viewportDragMoveEvent( QDragMoveEvent *e );
- void viewportDropEvent( QDropEvent *e );
+ void dragEnterEvent( TQDragEnterEvent *e );
+ void dropEvent( TQDropEvent *e );
+ void viewportDragMoveEvent( TQDragMoveEvent *e );
+ void viewportDropEvent( TQDropEvent *e );
};
/**
@@ -124,17 +124,17 @@ class DistributionListView : public KListView
class EmailSelector : public KDialogBase
{
public:
- EmailSelector( const QStringList &emails, const QString &current,
- QWidget *parent );
+ EmailSelector( const TQStringList &emails, const TQString &current,
+ TQWidget *parent );
- QString selected() const;
+ TQString selected() const;
- static QString getEmail( const QStringList &emails, const QString &current,
- QWidget *parent, bool &canceled );
+ static TQString getEmail( const TQStringList &emails, const TQString &current,
+ TQWidget *parent, bool &canceled );
private:
- QButtonGroup *mButtonGroup;
- QMap<int, QString> mEmailMap;
+ TQButtonGroup *mButtonGroup;
+ TQMap<int, TQString> mEmailMap;
};
#endif
diff --git a/kaddressbook/features/resourceselection.cpp b/kaddressbook/features/resourceselection.cpp
index dcd40dc12..d6edba25e 100644
--- a/kaddressbook/features/resourceselection.cpp
+++ b/kaddressbook/features/resourceselection.cpp
@@ -21,13 +21,13 @@
without including the source code for Qt in the source distribution.
*/
-#include <qlayout.h>
-#include <qpopupmenu.h>
-#include <qpushbutton.h>
-#include <qtimer.h>
-#include <qlabel.h>
-#include <qheader.h>
-#include <qtooltip.h>
+#include <tqlayout.h>
+#include <tqpopupmenu.h>
+#include <tqpushbutton.h>
+#include <tqtimer.h>
+#include <tqlabel.h>
+#include <tqheader.h>
+#include <tqtooltip.h>
#include <kabc/resource.h>
#include <kdialog.h>
@@ -58,7 +58,7 @@ class ResourceItem : public QCheckListItem
{
public:
ResourceItem( KListView *parent, KABC::Resource *resource )
- : QCheckListItem( parent, resource->resourceName(), CheckBox ),
+ : TQCheckListItem( parent, resource->resourceName(), CheckBox ),
mResource( resource ), mChecked( false ),
mIsSubresource( false ), mSubItemsCreated( false ),
mResourceIdentifier()
@@ -69,8 +69,8 @@ class ResourceItem : public QCheckListItem
}
ResourceItem( KPIM::ResourceABC *resourceABC, ResourceItem* parent,
- const QString& resourceIdent )
- : QCheckListItem( parent, resourceABC->subresourceLabel( resourceIdent ), CheckBox ),
+ const TQString& resourceIdent )
+ : TQCheckListItem( parent, resourceABC->subresourceLabel( resourceIdent ), CheckBox ),
mResource( resourceABC ), mChecked( false ),
mIsSubresource( true ), mSubItemsCreated( false ),
mResourceIdentifier( resourceIdent )
@@ -89,7 +89,7 @@ class ResourceItem : public QCheckListItem
}
bool checked() const { return mChecked; }
KABC::Resource *resource() const { return mResource; }
- QString resourceIdentifier() const { return mResourceIdentifier; }
+ TQString resourceIdentifier() const { return mResourceIdentifier; }
bool isSubResource() const { return mIsSubresource; }
virtual void stateChange( bool active );
@@ -99,21 +99,21 @@ class ResourceItem : public QCheckListItem
bool mChecked;
const bool mIsSubresource;
bool mSubItemsCreated;
- const QString mResourceIdentifier;
+ const TQString mResourceIdentifier;
};
// Comes from korganizer/resourceview.cpp
void ResourceItem::createSubresourceItems()
{
KPIM::ResourceABC* res = dynamic_cast<KPIM::ResourceABC *>( mResource );
- QStringList subresources;
+ TQStringList subresources;
if ( res )
subresources = res->subresources();
if ( !subresources.isEmpty() ) {
setOpen( true );
setExpandable( true );
// This resource has subresources
- QStringList::ConstIterator it;
+ TQStringList::ConstIterator it;
for ( it = subresources.begin(); it != subresources.end(); ++it ) {
(void)new ResourceItem( res, this, *it );
}
@@ -134,7 +134,7 @@ void ResourceItem::stateChange( bool active )
////
-ResourceSelection::ResourceSelection( KAB::Core *core, QWidget *parent, const char *name )
+ResourceSelection::ResourceSelection( KAB::Core *core, TQWidget *parent, const char *name )
: KAB::ExtensionWidget( core, parent, name ), mManager( 0 )
{
initGUI();
@@ -142,49 +142,49 @@ ResourceSelection::ResourceSelection( KAB::Core *core, QWidget *parent, const ch
AddressBookWrapper *wrapper = static_cast<AddressBookWrapper*>( core->addressBook() );
mManager = wrapper->getResourceManager();
- connect( mAddButton, SIGNAL( clicked() ), SLOT( add() ) );
- connect( mEditButton, SIGNAL( clicked() ), SLOT( edit() ) );
- connect( mRemoveButton, SIGNAL( clicked() ), SLOT( remove() ) );
+ connect( mAddButton, TQT_SIGNAL( clicked() ), TQT_SLOT( add() ) );
+ connect( mEditButton, TQT_SIGNAL( clicked() ), TQT_SLOT( edit() ) );
+ connect( mRemoveButton, TQT_SIGNAL( clicked() ), TQT_SLOT( remove() ) );
- connect( mListView, SIGNAL( clicked( QListViewItem* ) ),
- SLOT( currentChanged( QListViewItem* ) ) );
+ connect( mListView, TQT_SIGNAL( clicked( TQListViewItem* ) ),
+ TQT_SLOT( currentChanged( TQListViewItem* ) ) );
- connect( mListView, SIGNAL( contextMenuRequested ( QListViewItem *,
- const QPoint &, int ) ),
- SLOT( contextMenuRequested( QListViewItem *, const QPoint &,
+ connect( mListView, TQT_SIGNAL( contextMenuRequested ( TQListViewItem *,
+ const TQPoint &, int ) ),
+ TQT_SLOT( contextMenuRequested( TQListViewItem *, const TQPoint &,
int ) ) );
- QTimer::singleShot( 0, this, SLOT( updateView() ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( updateView() ) );
}
ResourceSelection::~ResourceSelection()
{
}
-void ResourceSelection::contextMenuRequested ( QListViewItem *i,
- const QPoint &pos, int )
+void ResourceSelection::contextMenuRequested ( TQListViewItem *i,
+ const TQPoint &pos, int )
{
ResourceItem *item = static_cast<ResourceItem *>( i );
- QPopupMenu *menu = new QPopupMenu( this );
- connect( menu, SIGNAL( aboutToHide() ), menu, SLOT( deleteLater() ) );
+ TQPopupMenu *menu = new TQPopupMenu( this );
+ connect( menu, TQT_SIGNAL( aboutToHide() ), menu, TQT_SLOT( deleteLater() ) );
if ( item ) {
int reloadId = menu->insertItem( i18n("Re&load"), this,
- SLOT( reloadResource() ) );
+ TQT_SLOT( reloadResource() ) );
menu->setItemEnabled( reloadId, item->resource()->isActive() );
int saveId = menu->insertItem( i18n("&Save"), this,
- SLOT( saveResource() ) );
+ TQT_SLOT( saveResource() ) );
menu->setItemEnabled( saveId, item->resource()->isActive() );
menu->insertSeparator();
-// menu->insertItem( i18n("Show &Info"), this, SLOT( showInfo() ) );
+// menu->insertItem( i18n("Show &Info"), this, TQT_SLOT( showInfo() ) );
- menu->insertItem( i18n("&Edit..."), this, SLOT( edit() ) );
- menu->insertItem( i18n("&Remove"), this, SLOT( remove() ) );
+ menu->insertItem( i18n("&Edit..."), this, TQT_SLOT( edit() ) );
+ menu->insertItem( i18n("&Remove"), this, TQT_SLOT( remove() ) );
menu->insertSeparator();
}
- menu->insertItem( i18n("&Add..."), this, SLOT( add() ) );
+ menu->insertItem( i18n("&Add..."), this, TQT_SLOT( add() ) );
menu->popup( pos );
}
@@ -215,33 +215,33 @@ void ResourceSelection::showInfo()
ResourceItem *item = selectedItem();
if ( !item ) return;
-// QString txt = "<qt>" + item->resource()->infoText() + "</qt>";
+// TQString txt = "<qt>" + item->resource()->infoText() + "</qt>";
// KMessageBox::information( this, txt );
}
-QString ResourceSelection::title() const
+TQString ResourceSelection::title() const
{
return i18n( "Address Books" );
}
-QString ResourceSelection::identifier() const
+TQString ResourceSelection::identifier() const
{
return "resourceselection";
}
void ResourceSelection::add()
{
- QStringList types = mManager->resourceTypeNames();
- QStringList descs = mManager->resourceTypeDescriptions();
+ TQStringList types = mManager->resourceTypeNames();
+ TQStringList descs = mManager->resourceTypeDescriptions();
bool ok = false;
- QString desc = KInputDialog::getItem( i18n( "Add Address Book" ),
+ TQString desc = KInputDialog::getItem( i18n( "Add Address Book" ),
i18n( "Please select type of the new address book:" ),
descs, 0, false, &ok, this );
if ( !ok )
return;
- QString type = types[ descs.findIndex( desc ) ];
+ TQString type = types[ descs.findIndex( desc ) ];
// Create new resource
KABC::Resource *resource = mManager->createResource( type );
@@ -254,7 +254,7 @@ void ResourceSelection::add()
resource->setResourceName( i18n( "%1 address book" ).arg( type ) );
resource->setAddressBook(core()->addressBook());
- KRES::ConfigDialog dlg( this, QString( "contact" ), resource );
+ KRES::ConfigDialog dlg( this, TQString( "contact" ), resource );
if ( dlg.exec() ) {
core()->addressBook()->addResource( resource );
@@ -279,7 +279,7 @@ void ResourceSelection::edit()
// thus keep their data rather than their pointer
KABC::Resource *resource = item->resource();
- KRES::ConfigDialog dlg( this, QString( "contact" ), resource );
+ KRES::ConfigDialog dlg( this, TQString( "contact" ), resource );
if ( dlg.exec() ) {
mManager->change( resource );
@@ -311,7 +311,7 @@ void ResourceSelection::remove()
updateView();
}
-void ResourceSelection::currentChanged( QListViewItem *item )
+void ResourceSelection::currentChanged( TQListViewItem *item )
{
ResourceItem *resItem = static_cast<ResourceItem*>( item );
bool state = (resItem && !resItem->isSubResource() );
@@ -367,28 +367,28 @@ void ResourceSelection::updateView()
KPIM::ResourceABC* resource = dynamic_cast<KPIM::ResourceABC *>( *it );
if ( resource ) {
disconnect( resource, 0, this, 0 );
- connect( resource, SIGNAL( signalSubresourceAdded( KPIM::ResourceABC *,
- const QString &, const QString & ) ),
- SLOT( slotSubresourceAdded( KPIM::ResourceABC *,
- const QString &, const QString & ) ) );
-
- connect( resource, SIGNAL( signalSubresourceRemoved( KPIM::ResourceABC *,
- const QString &, const QString & ) ),
- SLOT( slotSubresourceRemoved( KPIM::ResourceABC *,
- const QString &, const QString & ) ) );
-
- connect( resource, SIGNAL( signalSubresourceChanged( KPIM::ResourceABC *,
- const QString &, const QString & ) ),
- SLOT( slotSubresourceChanged( KPIM::ResourceABC *,
- const QString &, const QString & ) ) );
-
- //connect( resource, SIGNAL( resourceSaved( KPIM::ResourceABC * ) ),
- // SLOT( closeResource( KPIM::ResourceABC * ) ) );
+ connect( resource, TQT_SIGNAL( signalSubresourceAdded( KPIM::ResourceABC *,
+ const TQString &, const TQString & ) ),
+ TQT_SLOT( slotSubresourceAdded( KPIM::ResourceABC *,
+ const TQString &, const TQString & ) ) );
+
+ connect( resource, TQT_SIGNAL( signalSubresourceRemoved( KPIM::ResourceABC *,
+ const TQString &, const TQString & ) ),
+ TQT_SLOT( slotSubresourceRemoved( KPIM::ResourceABC *,
+ const TQString &, const TQString & ) ) );
+
+ connect( resource, TQT_SIGNAL( signalSubresourceChanged( KPIM::ResourceABC *,
+ const TQString &, const TQString & ) ),
+ TQT_SLOT( slotSubresourceChanged( KPIM::ResourceABC *,
+ const TQString &, const TQString & ) ) );
+
+ //connect( resource, TQT_SIGNAL( resourceSaved( KPIM::ResourceABC * ) ),
+ // TQT_SLOT( closeResource( KPIM::ResourceABC * ) ) );
item->createSubresourceItems();
}
}
- QListViewItemIterator itemIt( mListView );
+ TQListViewItemIterator itemIt( mListView );
while ( itemIt.current() ) {
ResourceItem *item = static_cast<ResourceItem*>( itemIt.current() );
if ( item->resource()->identifier() == mLastResource ) {
@@ -405,11 +405,11 @@ void ResourceSelection::updateView()
// Add a new entry
void ResourceSelection::slotSubresourceAdded( KPIM::ResourceABC *resource,
- const QString& /*type*/,
- const QString& subResource )
+ const TQString& /*type*/,
+ const TQString& subResource )
{
kdDebug(5720) << k_funcinfo << resource->resourceName() << " " << subResource << endl;
- QListViewItem *i = mListView->findItem( resource->resourceName(), 0 );
+ TQListViewItem *i = mListView->findItem( resource->resourceName(), 0 );
if ( !i )
// Not found
return;
@@ -426,8 +426,8 @@ void ResourceSelection::slotSubresourceAdded( KPIM::ResourceABC *resource,
// Remove an entry
void ResourceSelection::slotSubresourceRemoved( KPIM::ResourceABC* resource,
- const QString& /*type*/,
- const QString& subResource )
+ const TQString& /*type*/,
+ const TQString& subResource )
{
ResourceItem *item = findSubResourceItem( resource, subResource );
delete item;
@@ -437,8 +437,8 @@ void ResourceSelection::slotSubresourceRemoved( KPIM::ResourceABC* resource,
// change an entry
void ResourceSelection::slotSubresourceChanged( KPIM::ResourceABC* resource,
- const QString& type,
- const QString& subResource )
+ const TQString& type,
+ const TQString& subResource )
{
kdDebug(5720) << resource->resourceName() << subResource;
@@ -463,14 +463,14 @@ ResourceItem* ResourceSelection::selectedItem() const
}
ResourceItem* ResourceSelection::findSubResourceItem( KPIM::ResourceABC *resource,
- const QString &subResource )
+ const TQString &subResource )
{
- QListViewItemIterator parentIt( mListView );
+ TQListViewItemIterator parentIt( mListView );
for ( ; *parentIt; ++parentIt ) {
if ( static_cast<ResourceItem*>(*parentIt)->resource() != resource )
continue;
- QListViewItemIterator childIt( *parentIt );
+ TQListViewItemIterator childIt( *parentIt );
for ( ; *childIt; ++childIt ) {
ResourceItem *item = static_cast<ResourceItem*>(*childIt);
if ( item->resourceIdentifier() == subResource )
@@ -483,30 +483,30 @@ ResourceItem* ResourceSelection::findSubResourceItem( KPIM::ResourceABC *resourc
void ResourceSelection::initGUI()
{
- QBoxLayout *topLayout = new QVBoxLayout( this );
+ TQBoxLayout *topLayout = new TQVBoxLayout( this );
topLayout->setSpacing( KDialog::spacingHint() );
- QBoxLayout *buttonLayout = new QHBoxLayout();
+ TQBoxLayout *buttonLayout = new TQHBoxLayout();
buttonLayout->setSpacing( KDialog::spacingHint() );
topLayout->addLayout( buttonLayout );
- QLabel *abLabel = new QLabel( i18n( "Address Books" ), this );
+ TQLabel *abLabel = new TQLabel( i18n( "Address Books" ), this );
buttonLayout->addWidget( abLabel );
buttonLayout->addStretch( 1 );
- mAddButton = new QPushButton( this );
+ mAddButton = new TQPushButton( this );
mAddButton->setIconSet( SmallIconSet( "add" ) );
- QToolTip::add( mAddButton, i18n( "Add addressbook" ) );
+ TQToolTip::add( mAddButton, i18n( "Add addressbook" ) );
buttonLayout->addWidget( mAddButton );
- mEditButton = new QPushButton( this );
+ mEditButton = new TQPushButton( this );
mEditButton->setIconSet( SmallIconSet( "edit" ) );
mEditButton->setEnabled( false );
- QToolTip::add( mEditButton, i18n( "Edit addressbook settings" ) );
+ TQToolTip::add( mEditButton, i18n( "Edit addressbook settings" ) );
buttonLayout->addWidget( mEditButton );
- mRemoveButton = new QPushButton( this );
+ mRemoveButton = new TQPushButton( this );
mRemoveButton->setIconSet( SmallIconSet( "remove" ) );
mRemoveButton->setEnabled( false );
- QToolTip::add( mRemoveButton, i18n( "Remove addressbook" ) );
+ TQToolTip::add( mRemoveButton, i18n( "Remove addressbook" ) );
buttonLayout->addWidget( mRemoveButton );
mListView = new KListView( this );
@@ -519,12 +519,12 @@ void ResourceSelection::initGUI()
class ResourceSelectionFactory : public KAB::ExtensionFactory
{
public:
- KAB::ExtensionWidget *extension( KAB::Core *core, QWidget *parent, const char *name )
+ KAB::ExtensionWidget *extension( KAB::Core *core, TQWidget *parent, const char *name )
{
return new ResourceSelection( core, parent, name );
}
- QString identifier() const
+ TQString identifier() const
{
return "resourceselection";
}
diff --git a/kaddressbook/features/resourceselection.h b/kaddressbook/features/resourceselection.h
index a2eff8c13..831cc4a55 100644
--- a/kaddressbook/features/resourceselection.h
+++ b/kaddressbook/features/resourceselection.h
@@ -40,11 +40,11 @@ class ResourceSelection : public KAB::ExtensionWidget
Q_OBJECT
public:
- ResourceSelection( KAB::Core*, QWidget *parent, const char *name );
+ ResourceSelection( KAB::Core*, TQWidget *parent, const char *name );
virtual ~ResourceSelection();
- QString title() const;
- QString identifier() const;
+ TQString title() const;
+ TQString identifier() const;
void contactsSelectionChanged() {};
@@ -52,21 +52,21 @@ class ResourceSelection : public KAB::ExtensionWidget
void add();
void edit();
void remove();
- void currentChanged( QListViewItem* );
+ void currentChanged( TQListViewItem* );
void updateView();
void slotSubresourceAdded( KPIM::ResourceABC *resource,
- const QString& /*type*/,
- const QString& subResource );
+ const TQString& /*type*/,
+ const TQString& subResource );
void slotSubresourceRemoved( KPIM::ResourceABC* /*resource*/,
- const QString& /*type*/,
- const QString& subResource );
+ const TQString& /*type*/,
+ const TQString& subResource );
void slotSubresourceChanged( KPIM::ResourceABC* /*resource*/,
- const QString& /*type*/,
- const QString& subResource );
+ const TQString& /*type*/,
+ const TQString& subResource );
- void contextMenuRequested ( QListViewItem *i, const QPoint &pos, int );
+ void contextMenuRequested ( TQListViewItem *i, const TQPoint &pos, int );
void showInfo();
@@ -77,14 +77,14 @@ class ResourceSelection : public KAB::ExtensionWidget
void initGUI();
ResourceItem* selectedItem() const;
- ResourceItem* findSubResourceItem( KPIM::ResourceABC *resource, const QString &subResource );
+ ResourceItem* findSubResourceItem( KPIM::ResourceABC *resource, const TQString &subResource );
KListView *mListView;
- QPushButton *mAddButton;
- QPushButton *mEditButton;
- QPushButton *mRemoveButton;
+ TQPushButton *mAddButton;
+ TQPushButton *mEditButton;
+ TQPushButton *mRemoveButton;
- QString mLastResource;
+ TQString mLastResource;
KRES::Manager<KABC::Resource> *mManager;
};
diff --git a/kaddressbook/filtereditdialog.cpp b/kaddressbook/filtereditdialog.cpp
index 40c0f077c..2b6607376 100644
--- a/kaddressbook/filtereditdialog.cpp
+++ b/kaddressbook/filtereditdialog.cpp
@@ -21,17 +21,17 @@
without including the source code for Qt in the source distribution.
*/
-#include <qbuttongroup.h>
-#include <qhbox.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qpushbutton.h>
-#include <qradiobutton.h>
-#include <qregexp.h>
-#include <qstring.h>
-#include <qtoolbutton.h>
-#include <qtooltip.h>
-#include <qwidget.h>
+#include <tqbuttongroup.h>
+#include <tqhbox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqpushbutton.h>
+#include <tqradiobutton.h>
+#include <tqregexp.h>
+#include <tqstring.h>
+#include <tqtoolbutton.h>
+#include <tqtooltip.h>
+#include <tqwidget.h>
#include <kapplication.h>
#include <kbuttonbox.h>
@@ -45,17 +45,17 @@
#include "kabprefs.h"
#include "filtereditdialog.h"
-FilterEditDialog::FilterEditDialog( QWidget *parent, const char *name )
+FilterEditDialog::FilterEditDialog( TQWidget *parent, const char *name )
: KDialogBase( Plain, i18n( "Edit Address Book Filter" ),
Help | Ok | Cancel, Ok, parent, name, false, true )
{
initGUI();
- const QStringList cats = KABPrefs::instance()->customCategories();
+ const TQStringList cats = KABPrefs::instance()->customCategories();
- QStringList::ConstIterator it;
+ TQStringList::ConstIterator it;
for ( it = cats.begin(); it != cats.end(); ++it )
- mCategoriesView->insertItem( new QCheckListItem( mCategoriesView, *it, QCheckListItem::CheckBox ) );
+ mCategoriesView->insertItem( new TQCheckListItem( mCategoriesView, *it, TQCheckListItem::CheckBox ) );
filterNameTextChanged( mNameEdit->text() );
}
@@ -68,11 +68,11 @@ void FilterEditDialog::setFilter( const Filter &filter )
{
mNameEdit->setText( filter.name() );
- QStringList categories = filter.categories();
- QListViewItem *item = mCategoriesView->firstChild();
+ TQStringList categories = filter.categories();
+ TQListViewItem *item = mCategoriesView->firstChild();
while ( item != 0 ) {
if ( categories.contains( item->text( 0 ) ) ) {
- QCheckListItem *checkItem = static_cast<QCheckListItem*>( item );
+ TQCheckListItem *checkItem = static_cast<TQCheckListItem*>( item );
checkItem->setOn( true );
}
@@ -91,10 +91,10 @@ Filter FilterEditDialog::filter()
filter.setName( mNameEdit->text() );
- QStringList categories;
- QListViewItem *item = mCategoriesView->firstChild();
+ TQStringList categories;
+ TQListViewItem *item = mCategoriesView->firstChild();
while ( item != 0 ) {
- QCheckListItem *checkItem = static_cast<QCheckListItem*>( item );
+ TQCheckListItem *checkItem = static_cast<TQCheckListItem*>( item );
if ( checkItem->isOn() )
categories.append( item->text( 0 ) );
@@ -114,44 +114,44 @@ void FilterEditDialog::initGUI()
{
resize( 490, 300 );
- QWidget *page = plainPage();
- QLabel *label;
+ TQWidget *page = plainPage();
+ TQLabel *label;
- QGridLayout *topLayout = new QGridLayout( page, 3, 2, 0, spacingHint() );
+ TQGridLayout *topLayout = new TQGridLayout( page, 3, 2, 0, spacingHint() );
- label = new QLabel( i18n( "Name:" ), page );
+ label = new TQLabel( i18n( "Name:" ), page );
mNameEdit = new KLineEdit( page );
mNameEdit->setFocus();
topLayout->addWidget( label, 0, 0 );
topLayout->addWidget( mNameEdit, 0, 1 );
- connect( mNameEdit, SIGNAL( textChanged( const QString& ) ),
- SLOT( filterNameTextChanged( const QString&) ) );
+ connect( mNameEdit, TQT_SIGNAL( textChanged( const TQString& ) ),
+ TQT_SLOT( filterNameTextChanged( const TQString&) ) );
mCategoriesView = new KListView( page );
mCategoriesView->addColumn( i18n( "Category" ) );
mCategoriesView->setFullWidth( true );
topLayout->addMultiCellWidget( mCategoriesView, 1, 1, 0, 1 );
- mMatchRuleGroup = new QButtonGroup( page );
+ mMatchRuleGroup = new TQButtonGroup( page );
mMatchRuleGroup->setExclusive( true );
- QBoxLayout *gbLayout = new QVBoxLayout( mMatchRuleGroup );
+ TQBoxLayout *gbLayout = new TQVBoxLayout( mMatchRuleGroup );
gbLayout->setSpacing( KDialog::spacingHint() );
gbLayout->setMargin( KDialog::marginHint() );
- QRadioButton *radio = new QRadioButton( i18n( "Show only contacts matching the selected categories" ), mMatchRuleGroup );
+ TQRadioButton *radio = new TQRadioButton( i18n( "Show only contacts matching the selected categories" ), mMatchRuleGroup );
radio->setChecked( true );
mMatchRuleGroup->insert( radio );
gbLayout->addWidget( radio );
- radio = new QRadioButton( i18n( "Show all contacts except those matching the selected categories" ), mMatchRuleGroup );
+ radio = new TQRadioButton( i18n( "Show all contacts except those matching the selected categories" ), mMatchRuleGroup );
mMatchRuleGroup->insert( radio );
gbLayout->addWidget( radio );
topLayout->addMultiCellWidget( mMatchRuleGroup, 2, 2, 0, 1 );
}
-void FilterEditDialog::filterNameTextChanged( const QString &text )
+void FilterEditDialog::filterNameTextChanged( const TQString &text )
{
enableButtonOK( !text.isEmpty() );
}
@@ -161,7 +161,7 @@ void FilterEditDialog::slotHelp()
kapp->invokeHelp( "using-filters" );
}
-FilterDialog::FilterDialog( QWidget *parent, const char *name )
+FilterDialog::FilterDialog( TQWidget *parent, const char *name )
: KDialogBase( Plain, i18n( "Edit Address Book Filters" ),
Ok | Cancel, Ok, parent, name, false, true )
{
@@ -242,7 +242,7 @@ void FilterDialog::refresh()
mFilterListBox->insertItem( (*it).name() );
}
-void FilterDialog::selectionChanged( QListBoxItem *item )
+void FilterDialog::selectionChanged( TQListBoxItem *item )
{
bool state = ( item != 0 );
@@ -254,22 +254,22 @@ void FilterDialog::initGUI()
{
resize( 330, 200 );
- QWidget *page = plainPage();
+ TQWidget *page = plainPage();
- QGridLayout *topLayout = new QGridLayout( page, 1, 2, 0, spacingHint() );
+ TQGridLayout *topLayout = new TQGridLayout( page, 1, 2, 0, spacingHint() );
mFilterListBox = new KListBox( page );
topLayout->addWidget( mFilterListBox, 0, 0 );
- connect( mFilterListBox, SIGNAL( selectionChanged( QListBoxItem * ) ),
- SLOT( selectionChanged( QListBoxItem * ) ) );
- connect( mFilterListBox, SIGNAL( doubleClicked ( QListBoxItem * ) ),
- SLOT( edit() ) );
+ connect( mFilterListBox, TQT_SIGNAL( selectionChanged( TQListBoxItem * ) ),
+ TQT_SLOT( selectionChanged( TQListBoxItem * ) ) );
+ connect( mFilterListBox, TQT_SIGNAL( doubleClicked ( TQListBoxItem * ) ),
+ TQT_SLOT( edit() ) );
KButtonBox *buttonBox = new KButtonBox( page, Vertical );
- buttonBox->addButton( i18n( "&Add..." ), this, SLOT( add() ) );
- mEditButton = buttonBox->addButton( i18n( "&Edit..." ), this, SLOT( edit() ) );
+ buttonBox->addButton( i18n( "&Add..." ), this, TQT_SLOT( add() ) );
+ mEditButton = buttonBox->addButton( i18n( "&Edit..." ), this, TQT_SLOT( edit() ) );
mEditButton->setEnabled( false );
- mRemoveButton = buttonBox->addButton( i18n( "&Remove" ), this, SLOT( remove() ) );
+ mRemoveButton = buttonBox->addButton( i18n( "&Remove" ), this, TQT_SLOT( remove() ) );
mRemoveButton->setEnabled( false );
buttonBox->layout();
diff --git a/kaddressbook/filtereditdialog.h b/kaddressbook/filtereditdialog.h
index b61c36ca7..b52966b64 100644
--- a/kaddressbook/filtereditdialog.h
+++ b/kaddressbook/filtereditdialog.h
@@ -42,7 +42,7 @@ class FilterDialog : public KDialogBase
Q_OBJECT
public:
- FilterDialog( QWidget *parent, const char *name = 0 );
+ FilterDialog( TQWidget *parent, const char *name = 0 );
~FilterDialog();
void setFilters( const Filter::List &list );
@@ -52,7 +52,7 @@ class FilterDialog : public KDialogBase
void add();
void edit();
void remove();
- void selectionChanged( QListBoxItem* );
+ void selectionChanged( TQListBoxItem* );
private:
void initGUI();
@@ -62,23 +62,23 @@ class FilterDialog : public KDialogBase
Filter::List mInternalFilterList;
KListBox *mFilterListBox;
- QPushButton *mAddButton;
- QPushButton *mEditButton;
- QPushButton *mRemoveButton;
+ TQPushButton *mAddButton;
+ TQPushButton *mEditButton;
+ TQPushButton *mRemoveButton;
};
class FilterEditDialog : public KDialogBase
{
Q_OBJECT
public:
- FilterEditDialog( QWidget *parent, const char *name = 0 );
+ FilterEditDialog( TQWidget *parent, const char *name = 0 );
~FilterEditDialog();
void setFilter( const Filter &filter );
Filter filter();
protected slots:
- void filterNameTextChanged( const QString& );
+ void filterNameTextChanged( const TQString& );
void slotHelp();
private:
@@ -88,9 +88,9 @@ class FilterEditDialog : public KDialogBase
KLineEdit *mNameEdit;
KListView *mCategoriesView;
- QButtonGroup *mMatchRuleGroup;
- QPushButton *mEditButton;
- QPushButton *mRemoveButton;
+ TQButtonGroup *mMatchRuleGroup;
+ TQPushButton *mEditButton;
+ TQPushButton *mRemoveButton;
};
#endif
diff --git a/kaddressbook/filterselectionwidget.cpp b/kaddressbook/filterselectionwidget.cpp
index ddd4fa2f2..c963024d0 100644
--- a/kaddressbook/filterselectionwidget.cpp
+++ b/kaddressbook/filterselectionwidget.cpp
@@ -21,7 +21,7 @@
without including the source code for Qt in the source distribution.
*/
-#include <qlabel.h>
+#include <tqlabel.h>
#include <kcombobox.h>
#include <kdialog.h>
@@ -29,17 +29,17 @@
#include "filterselectionwidget.h"
-FilterSelectionWidget::FilterSelectionWidget( QWidget *parent, const char *name )
- : QHBox( parent, name )
+FilterSelectionWidget::FilterSelectionWidget( TQWidget *parent, const char *name )
+ : TQHBox( parent, name )
{
setSpacing( KDialog::spacingHint() );
- QLabel *label = new QLabel( i18n( "Filter:" ), this, "kde toolbar widget" );
+ TQLabel *label = new TQLabel( i18n( "Filter:" ), this, "kde toolbar widget" );
mFilterCombo = new KComboBox( this );
label->setBuddy( mFilterCombo );
- connect( mFilterCombo, SIGNAL( activated( int ) ),
- this, SIGNAL( filterActivated( int ) ) );
+ connect( mFilterCombo, TQT_SIGNAL( activated( int ) ),
+ this, TQT_SIGNAL( filterActivated( int ) ) );
}
FilterSelectionWidget::~FilterSelectionWidget()
@@ -56,7 +56,7 @@ void FilterSelectionWidget::setCurrentItem( int index )
mFilterCombo->setCurrentItem( index );
}
-void FilterSelectionWidget::setItems( const QStringList &names )
+void FilterSelectionWidget::setItems( const TQStringList &names )
{
mFilterCombo->clear();
mFilterCombo->insertStringList( names );
diff --git a/kaddressbook/filterselectionwidget.h b/kaddressbook/filterselectionwidget.h
index fcae42fc1..bedb27111 100644
--- a/kaddressbook/filterselectionwidget.h
+++ b/kaddressbook/filterselectionwidget.h
@@ -24,7 +24,7 @@
#ifndef FILTERSELECTIONWIDGET_H
#define FILTERSELECTIONWIDGET_H
-#include <qhbox.h>
+#include <tqhbox.h>
class KComboBox;
@@ -38,10 +38,10 @@ class FilterSelectionWidget : public QHBox
Q_OBJECT
public:
- FilterSelectionWidget( QWidget *parent, const char *name = 0 );
+ FilterSelectionWidget( TQWidget *parent, const char *name = 0 );
~FilterSelectionWidget();
- void setItems( const QStringList &names );
+ void setItems( const TQStringList &names );
int currentItem() const;
void setCurrentItem( int index );
diff --git a/kaddressbook/freebusywidget.cpp b/kaddressbook/freebusywidget.cpp
index d06a0ebd9..9bda32491 100644
--- a/kaddressbook/freebusywidget.cpp
+++ b/kaddressbook/freebusywidget.cpp
@@ -21,8 +21,8 @@
without including the source code for Qt in the source distribution.
*/
-#include <qlabel.h>
-#include <qlayout.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
#include <kdialog.h>
#include <klocale.h>
@@ -32,21 +32,21 @@
#include "freebusywidget.h"
-FreeBusyWidget::FreeBusyWidget( KABC::AddressBook *ab, QWidget *parent, const char *name )
+FreeBusyWidget::FreeBusyWidget( KABC::AddressBook *ab, TQWidget *parent, const char *name )
: KAB::ContactEditorWidget( ab, parent, name )
{
- QHBoxLayout *layout = new QHBoxLayout( this, KDialog::marginHint(),
+ TQHBoxLayout *layout = new TQHBoxLayout( this, KDialog::marginHint(),
KDialog::spacingHint() );
- QLabel *label = new QLabel( i18n( "Location of Free/Busy information:" ), this );
+ TQLabel *label = new TQLabel( i18n( "Location of Free/Busy information:" ), this );
layout->addWidget( label );
mURL = new KURLRequester( this );
label->setBuddy( mURL );
layout->addWidget( mURL );
- connect( mURL, SIGNAL( textChanged( const QString& ) ),
- this, SLOT( setModified() ) );
+ connect( mURL, TQT_SIGNAL( textChanged( const TQString& ) ),
+ this, TQT_SLOT( setModified() ) );
}
FreeBusyWidget::~FreeBusyWidget()
diff --git a/kaddressbook/freebusywidget.h b/kaddressbook/freebusywidget.h
index 99d32320d..a33365697 100644
--- a/kaddressbook/freebusywidget.h
+++ b/kaddressbook/freebusywidget.h
@@ -33,7 +33,7 @@ class FreeBusyWidget : public KAB::ContactEditorWidget
Q_OBJECT
public:
- FreeBusyWidget( KABC::AddressBook *ab, QWidget *parent, const char *name = 0 );
+ FreeBusyWidget( KABC::AddressBook *ab, TQWidget *parent, const char *name = 0 );
~FreeBusyWidget();
void loadContact( KABC::Addressee *addr );
@@ -50,12 +50,12 @@ class FreeBusyWidget : public KAB::ContactEditorWidget
class FreeBusyWidgetFactory : public KAB::ContactEditorWidgetFactory
{
public:
- KAB::ContactEditorWidget *createWidget( KABC::AddressBook *ab, QWidget *parent, const char *name )
+ KAB::ContactEditorWidget *createWidget( KABC::AddressBook *ab, TQWidget *parent, const char *name )
{
return new FreeBusyWidget( ab, parent, name );
}
- QString pageIdentifier() const { return "misc"; }
+ TQString pageIdentifier() const { return "misc"; }
};
#endif
diff --git a/kaddressbook/geowidget.cpp b/kaddressbook/geowidget.cpp
index 3563f118e..40631147b 100644
--- a/kaddressbook/geowidget.cpp
+++ b/kaddressbook/geowidget.cpp
@@ -30,39 +30,39 @@
#include <knuminput.h>
#include <kstandarddirs.h>
-#include <qcheckbox.h>
-#include <qfile.h>
-#include <qgroupbox.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qlistbox.h>
-#include <qpainter.h>
-#include <qpixmap.h>
-#include <qpushbutton.h>
-#include <qregexp.h>
-#include <qstring.h>
+#include <tqcheckbox.h>
+#include <tqfile.h>
+#include <tqgroupbox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqlistbox.h>
+#include <tqpainter.h>
+#include <tqpixmap.h>
+#include <tqpushbutton.h>
+#include <tqregexp.h>
+#include <tqstring.h>
#include "geowidget.h"
-GeoWidget::GeoWidget( KABC::AddressBook *ab, QWidget *parent, const char *name )
+GeoWidget::GeoWidget( KABC::AddressBook *ab, TQWidget *parent, const char *name )
: KAB::ContactEditorWidget( ab, parent, name ), mReadOnly( false )
{
- QLabel *label = 0;
+ TQLabel *label = 0;
- QGridLayout *topLayout = new QGridLayout( this, 4, 3 );
+ TQGridLayout *topLayout = new TQGridLayout( this, 4, 3 );
topLayout->setMargin( KDialog::marginHint() );
topLayout->setSpacing( KDialog::spacingHint() );
- label = new QLabel( this );
+ label = new TQLabel( this );
label->setPixmap( KGlobal::iconLoader()->loadIcon( "package_network",
KIcon::Desktop, KIcon::SizeMedium ) );
label->setAlignment( Qt::AlignTop );
topLayout->addMultiCellWidget( label, 0, 3, 0, 0 );
- mGeoIsValid = new QCheckBox( i18n( "Use geo data" ), this );
+ mGeoIsValid = new TQCheckBox( i18n( "Use geo data" ), this );
topLayout->addMultiCellWidget( mGeoIsValid, 0, 0, 1, 2 );
- label = new QLabel( i18n( "Latitude:" ), this );
+ label = new TQLabel( i18n( "Latitude:" ), this );
topLayout->addWidget( label, 1, 1 );
mLatitudeBox = new KDoubleSpinBox( -90, 90, 1, 0, 6, this );
@@ -71,7 +71,7 @@ GeoWidget::GeoWidget( KABC::AddressBook *ab, QWidget *parent, const char *name )
topLayout->addWidget( mLatitudeBox, 1, 2 );
label->setBuddy( mLatitudeBox );
- label = new QLabel( i18n( "Longitude:" ), this );
+ label = new TQLabel( i18n( "Longitude:" ), this );
topLayout->addWidget( label, 2, 1 );
mLongitudeBox = new KDoubleSpinBox( -180, 180, 1, 0, 6, this );
@@ -80,25 +80,25 @@ GeoWidget::GeoWidget( KABC::AddressBook *ab, QWidget *parent, const char *name )
topLayout->addWidget( mLongitudeBox, 2, 2 );
label->setBuddy( mLongitudeBox );
- mExtendedButton = new QPushButton( i18n( "Edit Geo Data..." ), this );
+ mExtendedButton = new TQPushButton( i18n( "Edit Geo Data..." ), this );
mExtendedButton->setEnabled( false );
topLayout->addMultiCellWidget( mExtendedButton, 3, 3, 1, 2 );
- connect( mLatitudeBox, SIGNAL( valueChanged( double ) ),
- SLOT( setModified() ) );
- connect( mLongitudeBox, SIGNAL( valueChanged( double ) ),
- SLOT( setModified() ) );
- connect( mExtendedButton, SIGNAL( clicked() ),
- SLOT( editGeoData() ) );
-
- connect( mGeoIsValid, SIGNAL( toggled( bool ) ),
- mLatitudeBox, SLOT( setEnabled( bool ) ) );
- connect( mGeoIsValid, SIGNAL( toggled( bool ) ),
- mLongitudeBox, SLOT( setEnabled( bool ) ) );
- connect( mGeoIsValid, SIGNAL( toggled( bool ) ),
- mExtendedButton, SLOT( setEnabled( bool ) ) );
- connect( mGeoIsValid, SIGNAL( toggled( bool ) ),
- SLOT( setModified() ) );
+ connect( mLatitudeBox, TQT_SIGNAL( valueChanged( double ) ),
+ TQT_SLOT( setModified() ) );
+ connect( mLongitudeBox, TQT_SIGNAL( valueChanged( double ) ),
+ TQT_SLOT( setModified() ) );
+ connect( mExtendedButton, TQT_SIGNAL( clicked() ),
+ TQT_SLOT( editGeoData() ) );
+
+ connect( mGeoIsValid, TQT_SIGNAL( toggled( bool ) ),
+ mLatitudeBox, TQT_SLOT( setEnabled( bool ) ) );
+ connect( mGeoIsValid, TQT_SIGNAL( toggled( bool ) ),
+ mLongitudeBox, TQT_SLOT( setEnabled( bool ) ) );
+ connect( mGeoIsValid, TQT_SIGNAL( toggled( bool ) ),
+ mExtendedButton, TQT_SLOT( setEnabled( bool ) ) );
+ connect( mGeoIsValid, TQT_SIGNAL( toggled( bool ) ),
+ TQT_SLOT( setModified() ) );
}
GeoWidget::~GeoWidget()
@@ -157,14 +157,14 @@ void GeoWidget::editGeoData()
-GeoDialog::GeoDialog( QWidget *parent, const char *name )
+GeoDialog::GeoDialog( TQWidget *parent, const char *name )
: KDialogBase( Plain, i18n( "Geo Data Input" ), Ok | Cancel, Ok,
parent, name, true, true ),
mUpdateSexagesimalInput( true )
{
- QFrame *page = plainPage();
+ TQFrame *page = plainPage();
- QGridLayout *topLayout = new QGridLayout( page, 2, 2, marginHint(),
+ TQGridLayout *topLayout = new TQGridLayout( page, 2, 2, marginHint(),
spacingHint() );
topLayout->setRowStretch( 1, 1 );
@@ -174,24 +174,24 @@ GeoDialog::GeoDialog( QWidget *parent, const char *name )
mCityCombo = new KComboBox( page );
topLayout->addWidget( mCityCombo, 0, 1 );
- QGroupBox *sexagesimalGroup = new QGroupBox( 0, Vertical, i18n( "Sexagesimal" ), page );
- QGridLayout *sexagesimalLayout = new QGridLayout( sexagesimalGroup->layout(),
+ TQGroupBox *sexagesimalGroup = new TQGroupBox( 0, Vertical, i18n( "Sexagesimal" ), page );
+ TQGridLayout *sexagesimalLayout = new TQGridLayout( sexagesimalGroup->layout(),
2, 5, spacingHint() );
- QLabel *label = new QLabel( i18n( "Latitude:" ), sexagesimalGroup );
+ TQLabel *label = new TQLabel( i18n( "Latitude:" ), sexagesimalGroup );
sexagesimalLayout->addWidget( label, 0, 0 );
- mLatDegrees = new QSpinBox( 0, 90, 1, sexagesimalGroup );
+ mLatDegrees = new TQSpinBox( 0, 90, 1, sexagesimalGroup );
mLatDegrees->setSuffix( "°" );
mLatDegrees->setWrapping( false );
label->setBuddy( mLatDegrees );
sexagesimalLayout->addWidget( mLatDegrees, 0, 1 );
- mLatMinutes = new QSpinBox( 0, 59, 1, sexagesimalGroup );
+ mLatMinutes = new TQSpinBox( 0, 59, 1, sexagesimalGroup );
mLatMinutes->setSuffix( "'" );
sexagesimalLayout->addWidget( mLatMinutes, 0, 2 );
- mLatSeconds = new QSpinBox( 0, 59, 1, sexagesimalGroup );
+ mLatSeconds = new TQSpinBox( 0, 59, 1, sexagesimalGroup );
mLatSeconds->setSuffix( "\"" );
sexagesimalLayout->addWidget( mLatSeconds, 0, 3 );
@@ -200,19 +200,19 @@ GeoDialog::GeoDialog( QWidget *parent, const char *name )
mLatDirection->insertItem( i18n( "South" ) );
sexagesimalLayout->addWidget( mLatDirection, 0, 4 );
- label = new QLabel( i18n( "Longitude:" ), sexagesimalGroup );
+ label = new TQLabel( i18n( "Longitude:" ), sexagesimalGroup );
sexagesimalLayout->addWidget( label, 1, 0 );
- mLongDegrees = new QSpinBox( 0, 180, 1, sexagesimalGroup );
+ mLongDegrees = new TQSpinBox( 0, 180, 1, sexagesimalGroup );
mLongDegrees->setSuffix( "°" );
label->setBuddy( mLongDegrees );
sexagesimalLayout->addWidget( mLongDegrees, 1, 1 );
- mLongMinutes = new QSpinBox( 0, 59, 1, sexagesimalGroup );
+ mLongMinutes = new TQSpinBox( 0, 59, 1, sexagesimalGroup );
mLongMinutes->setSuffix( "'" );
sexagesimalLayout->addWidget( mLongMinutes, 1, 2 );
- mLongSeconds = new QSpinBox( 0, 59, 1, sexagesimalGroup );
+ mLongSeconds = new TQSpinBox( 0, 59, 1, sexagesimalGroup );
mLongSeconds->setSuffix( "\"" );
sexagesimalLayout->addWidget( mLongSeconds, 1, 3 );
@@ -225,26 +225,26 @@ GeoDialog::GeoDialog( QWidget *parent, const char *name )
loadCityList();
- connect( mMapWidget, SIGNAL( changed() ),
- SLOT( geoMapChanged() ) );
- connect( mCityCombo, SIGNAL( activated( int ) ),
- SLOT( cityInputChanged() ) );
- connect( mLatDegrees, SIGNAL( valueChanged( int ) ),
- SLOT( sexagesimalInputChanged() ) );
- connect( mLatMinutes, SIGNAL( valueChanged( int ) ),
- SLOT( sexagesimalInputChanged() ) );
- connect( mLatSeconds, SIGNAL( valueChanged( int ) ),
- SLOT( sexagesimalInputChanged() ) );
- connect( mLatDirection, SIGNAL( activated( int ) ),
- SLOT( sexagesimalInputChanged() ) );
- connect( mLongDegrees, SIGNAL( valueChanged( int ) ),
- SLOT( sexagesimalInputChanged() ) );
- connect( mLongMinutes, SIGNAL( valueChanged( int ) ),
- SLOT( sexagesimalInputChanged() ) );
- connect( mLongSeconds, SIGNAL( valueChanged( int ) ),
- SLOT( sexagesimalInputChanged() ) );
- connect( mLongDirection, SIGNAL( activated( int ) ),
- SLOT( sexagesimalInputChanged() ) );
+ connect( mMapWidget, TQT_SIGNAL( changed() ),
+ TQT_SLOT( geoMapChanged() ) );
+ connect( mCityCombo, TQT_SIGNAL( activated( int ) ),
+ TQT_SLOT( cityInputChanged() ) );
+ connect( mLatDegrees, TQT_SIGNAL( valueChanged( int ) ),
+ TQT_SLOT( sexagesimalInputChanged() ) );
+ connect( mLatMinutes, TQT_SIGNAL( valueChanged( int ) ),
+ TQT_SLOT( sexagesimalInputChanged() ) );
+ connect( mLatSeconds, TQT_SIGNAL( valueChanged( int ) ),
+ TQT_SLOT( sexagesimalInputChanged() ) );
+ connect( mLatDirection, TQT_SIGNAL( activated( int ) ),
+ TQT_SLOT( sexagesimalInputChanged() ) );
+ connect( mLongDegrees, TQT_SIGNAL( valueChanged( int ) ),
+ TQT_SLOT( sexagesimalInputChanged() ) );
+ connect( mLongMinutes, TQT_SIGNAL( valueChanged( int ) ),
+ TQT_SLOT( sexagesimalInputChanged() ) );
+ connect( mLongSeconds, TQT_SIGNAL( valueChanged( int ) ),
+ TQT_SLOT( sexagesimalInputChanged() ) );
+ connect( mLongDirection, TQT_SIGNAL( activated( int ) ),
+ TQT_SLOT( sexagesimalInputChanged() ) );
KAcceleratorManager::manage( this );
}
@@ -380,14 +380,14 @@ void GeoDialog::loadCityList()
mCityCombo->clear();
mGeoDataMap.clear();
- QFile file( locate( "data", "kaddressbook/zone.tab" ) );
+ TQFile file( locate( "data", "kaddressbook/zone.tab" ) );
if ( file.open( IO_ReadOnly ) ) {
- QTextStream s( &file );
+ TQTextStream s( &file );
- QString line, country;
- QRegExp coord( "[+-]\\d+[+-]\\d+" );
- QRegExp name( "[^\\s]+/[^\\s]+" );
+ TQString line, country;
+ TQRegExp coord( "[+-]\\d+[+-]\\d+" );
+ TQRegExp name( "[^\\s]+/[^\\s]+" );
int pos;
while ( !s.eof() ) {
@@ -396,7 +396,7 @@ void GeoDialog::loadCityList()
continue;
country = line.left( 2 );
- QString c, n;
+ TQString c, n;
pos = coord.search( line, 0 );
if ( pos >= 0 )
c = line.mid( pos, coord.matchedLength() );
@@ -421,7 +421,7 @@ void GeoDialog::loadCityList()
}
}
}
- QStringList items( mGeoDataMap.keys() );
+ TQStringList items( mGeoDataMap.keys() );
items.prepend( i18n( "Undefined" ) );
mCityCombo->insertStringList( items );
@@ -429,11 +429,11 @@ void GeoDialog::loadCityList()
}
}
-double GeoDialog::calculateCoordinate( const QString &coordinate ) const
+double GeoDialog::calculateCoordinate( const TQString &coordinate ) const
{
int neg;
int d = 0, m = 0, s = 0;
- QString str = coordinate;
+ TQString str = coordinate;
neg = str.left( 1 ) == "-";
str.remove( 0, 1 );
@@ -469,7 +469,7 @@ double GeoDialog::calculateCoordinate( const QString &coordinate ) const
int GeoDialog::nearestCity( double x, double y ) const
{
- QMap<QString, GeoData>::ConstIterator it;
+ TQMap<TQString, GeoData>::ConstIterator it;
int pos = 0;
for ( it = mGeoDataMap.begin(); it != mGeoDataMap.end(); ++it, ++pos ) {
double dist = ( (*it).longitude - x ) * ( (*it).longitude - x ) +
@@ -482,8 +482,8 @@ int GeoDialog::nearestCity( double x, double y ) const
}
-GeoMapWidget::GeoMapWidget( QWidget *parent, const char *name )
- : QWidget( parent, name ), mLatitude( 0 ), mLongitude( 0 )
+GeoMapWidget::GeoMapWidget( TQWidget *parent, const char *name )
+ : TQWidget( parent, name ), mLatitude( 0 ), mLongitude( 0 )
{
setBackgroundMode( NoBackground );
@@ -516,7 +516,7 @@ double GeoMapWidget::longitude()const
return mLongitude;
}
-void GeoMapWidget::mousePressEvent( QMouseEvent *event )
+void GeoMapWidget::mousePressEvent( TQMouseEvent *event )
{
double latMid = height() / 2;
double longMid = width() / 2;
@@ -530,19 +530,19 @@ void GeoMapWidget::mousePressEvent( QMouseEvent *event )
emit changed();
}
-void GeoMapWidget::paintEvent( QPaintEvent* )
+void GeoMapWidget::paintEvent( TQPaintEvent* )
{
uint w = width();
uint h = height();
- QPixmap pm( w, h );
- QPainter p;
+ TQPixmap pm( w, h );
+ TQPainter p;
p.begin( &pm, this );
- p.setPen( QColor( 255, 0, 0 ) );
- p.setBrush( QColor( 255, 0, 0 ) );
+ p.setPen( TQColor( 255, 0, 0 ) );
+ p.setBrush( TQColor( 255, 0, 0 ) );
- QPixmap world( locate( "data", "kaddressbook/pics/world.jpg" ) );
+ TQPixmap world( locate( "data", "kaddressbook/pics/world.jpg" ) );
p.drawPixmap( 0, 0, world );
double latMid = h / 2;
diff --git a/kaddressbook/geowidget.h b/kaddressbook/geowidget.h
index 85140849e..70b677232 100644
--- a/kaddressbook/geowidget.h
+++ b/kaddressbook/geowidget.h
@@ -45,7 +45,7 @@ class QPushButton;
typedef struct {
double latitude;
double longitude;
- QString country;
+ TQString country;
} GeoData;
class GeoWidget : public KAB::ContactEditorWidget
@@ -53,7 +53,7 @@ class GeoWidget : public KAB::ContactEditorWidget
Q_OBJECT
public:
- GeoWidget( KABC::AddressBook *ab, QWidget *parent, const char *name = 0 );
+ GeoWidget( KABC::AddressBook *ab, TQWidget *parent, const char *name = 0 );
~GeoWidget();
void loadContact( KABC::Addressee *addr );
@@ -68,8 +68,8 @@ class GeoWidget : public KAB::ContactEditorWidget
KDoubleSpinBox *mLatitudeBox;
KDoubleSpinBox *mLongitudeBox;
- QCheckBox *mGeoIsValid;
- QPushButton *mExtendedButton;
+ TQCheckBox *mGeoIsValid;
+ TQPushButton *mExtendedButton;
bool mReadOnly;
};
@@ -79,7 +79,7 @@ class GeoDialog : public KDialogBase
Q_OBJECT
public:
- GeoDialog( QWidget *parent, const char *name = 0 );
+ GeoDialog( TQWidget *parent, const char *name = 0 );
~GeoDialog();
void setLatitude( double latitude );
@@ -97,25 +97,25 @@ class GeoDialog : public KDialogBase
private:
void loadCityList();
- double calculateCoordinate( const QString& ) const;
+ double calculateCoordinate( const TQString& ) const;
int nearestCity( double, double ) const;
GeoMapWidget *mMapWidget;
KComboBox *mCityCombo;
- QSpinBox *mLatDegrees;
- QSpinBox *mLatMinutes;
- QSpinBox *mLatSeconds;
+ TQSpinBox *mLatDegrees;
+ TQSpinBox *mLatMinutes;
+ TQSpinBox *mLatSeconds;
KComboBox *mLatDirection;
- QSpinBox *mLongDegrees;
- QSpinBox *mLongMinutes;
- QSpinBox *mLongSeconds;
+ TQSpinBox *mLongDegrees;
+ TQSpinBox *mLongMinutes;
+ TQSpinBox *mLongSeconds;
KComboBox *mLongDirection;
double mLatitude;
double mLongitude;
- QMap<QString, GeoData> mGeoDataMap;
+ TQMap<TQString, GeoData> mGeoDataMap;
bool mUpdateSexagesimalInput;
};
@@ -124,7 +124,7 @@ class GeoMapWidget : public QWidget
Q_OBJECT
public:
- GeoMapWidget( QWidget *parent, const char *name = 0 );
+ GeoMapWidget( TQWidget *parent, const char *name = 0 );
~GeoMapWidget();
void setLatitude( double latitude );
@@ -137,8 +137,8 @@ class GeoMapWidget : public QWidget
void changed();
protected:
- virtual void mousePressEvent( QMouseEvent* );
- virtual void paintEvent( QPaintEvent* );
+ virtual void mousePressEvent( TQMouseEvent* );
+ virtual void paintEvent( TQPaintEvent* );
private:
double mLatitude;
@@ -148,12 +148,12 @@ class GeoMapWidget : public QWidget
class GeoWidgetFactory : public KAB::ContactEditorWidgetFactory
{
public:
- KAB::ContactEditorWidget *createWidget( KABC::AddressBook *ab, QWidget *parent, const char *name )
+ KAB::ContactEditorWidget *createWidget( KABC::AddressBook *ab, TQWidget *parent, const char *name )
{
return new GeoWidget( ab, parent, name );
}
- QString pageIdentifier() const { return "misc"; }
+ TQString pageIdentifier() const { return "misc"; }
};
#endif
diff --git a/kaddressbook/imagewidget.cpp b/kaddressbook/imagewidget.cpp
index ad0fad55e..ddacc2cd1 100644
--- a/kaddressbook/imagewidget.cpp
+++ b/kaddressbook/imagewidget.cpp
@@ -34,35 +34,35 @@
#include <kurldrag.h>
#include <libkdepim/kpixmapregionselectordialog.h>
-#include <qapplication.h>
-#include <qdragobject.h>
-#include <qeventloop.h>
-#include <qgroupbox.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qpixmap.h>
-#include <qpopupmenu.h>
+#include <tqapplication.h>
+#include <tqdragobject.h>
+#include <tqeventloop.h>
+#include <tqgroupbox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqpixmap.h>
+#include <tqpopupmenu.h>
#include <unistd.h>
#include "imagewidget.h"
-ImageLoader::ImageLoader( QWidget *parent )
- : QObject( 0, "ImageLoader" ), mParent( parent )
+ImageLoader::ImageLoader( TQWidget *parent )
+ : TQObject( 0, "ImageLoader" ), mParent( parent )
{
}
KABC::Picture ImageLoader::loadPicture( const KURL &url, bool *ok )
{
KABC::Picture picture;
- QString tempFile;
+ TQString tempFile;
if ( url.isEmpty() )
return picture;
(*ok) = false;
- QImage image;
+ TQImage image;
if ( url.isLocalFile() ) {
image.load( url.path() );
picture.setData( image );
@@ -80,9 +80,9 @@ KABC::Picture ImageLoader::loadPicture( const KURL &url, bool *ok )
return picture;
}
- QPixmap pixmap = picture.data();
+ TQPixmap pixmap = picture.data();
- QPixmap selectedPixmap = KPIM::KPixmapRegionSelectorDialog::getSelectedImage( pixmap, 100, 140, mParent );
+ TQPixmap selectedPixmap = KPIM::KPixmapRegionSelectorDialog::getSelectedImage( pixmap, 100, 140, mParent );
if ( selectedPixmap.isNull() ) {
(*ok) = false;
return picture;
@@ -103,13 +103,13 @@ KABC::Picture ImageLoader::loadPicture( const KURL &url, bool *ok )
}
-ImageButton::ImageButton( const QString &title, QWidget *parent )
- : QPushButton( title, parent ),
+ImageButton::ImageButton( const TQString &title, TQWidget *parent )
+ : TQPushButton( title, parent ),
mReadOnly( false ), mImageLoader( 0 )
{
setAcceptDrops( true );
- connect( this, SIGNAL( clicked() ), SLOT( load() ) );
+ connect( this, TQT_SIGNAL( clicked() ), TQT_SLOT( load() ) );
}
void ImageButton::setReadOnly( bool readOnly )
@@ -136,7 +136,7 @@ void ImageButton::setImageLoader( ImageLoader *loader )
void ImageButton::startDrag()
{
if ( !mPicture.data().isNull() ) {
- QImageDrag *drag = new QImageDrag( mPicture.data(), this );
+ TQImageDrag *drag = new TQImageDrag( mPicture.data(), this );
drag->dragCopy();
}
}
@@ -149,35 +149,35 @@ void ImageButton::updateGUI()
setPixmap( mPicture.data() );
}
-void ImageButton::dragEnterEvent( QDragEnterEvent *event )
+void ImageButton::dragEnterEvent( TQDragEnterEvent *event )
{
bool accepted = false;
- if ( QImageDrag::canDecode( event ) )
+ if ( TQImageDrag::canDecode( event ) )
accepted = true;
- if ( QUriDrag::canDecode( event ) )
+ if ( TQUriDrag::canDecode( event ) )
accepted = true;
event->accept( accepted );
}
-void ImageButton::dropEvent( QDropEvent *event )
+void ImageButton::dropEvent( TQDropEvent *event )
{
if ( mReadOnly )
return;
- if ( QImageDrag::canDecode( event ) ) {
- QPixmap pm;
+ if ( TQImageDrag::canDecode( event ) ) {
+ TQPixmap pm;
- if ( QImageDrag::decode( event, pm ) ) {
+ if ( TQImageDrag::decode( event, pm ) ) {
mPicture.setData( pm.convertToImage() );
updateGUI();
emit changed();
}
}
- if ( QUriDrag::canDecode( event ) ) {
+ if ( TQUriDrag::canDecode( event ) ) {
KURL::List urls;
if ( KURLDrag::decode( event, urls ) ) {
if ( urls.isEmpty() ) { // oops, no data
@@ -198,13 +198,13 @@ void ImageButton::dropEvent( QDropEvent *event )
}
}
-void ImageButton::mousePressEvent( QMouseEvent *event )
+void ImageButton::mousePressEvent( TQMouseEvent *event )
{
mDragStartPos = event->pos();
- QPushButton::mousePressEvent( event );
+ TQPushButton::mousePressEvent( event );
}
-void ImageButton::mouseMoveEvent( QMouseEvent *event )
+void ImageButton::mouseMoveEvent( TQMouseEvent *event )
{
if ( (event->state() & LeftButton) &&
(event->pos() - mDragStartPos).manhattanLength() >
@@ -213,16 +213,16 @@ void ImageButton::mouseMoveEvent( QMouseEvent *event )
}
}
-void ImageButton::contextMenuEvent( QContextMenuEvent *event )
+void ImageButton::contextMenuEvent( TQContextMenuEvent *event )
{
- QPopupMenu menu( this );
- menu.insertItem( i18n( "Reset" ), this, SLOT( clear() ) );
+ TQPopupMenu menu( this );
+ menu.insertItem( i18n( "Reset" ), this, TQT_SLOT( clear() ) );
menu.exec( event->globalPos() );
}
void ImageButton::load()
{
- KURL url = KFileDialog::getOpenURL( QString(), KImageIO::pattern(), this );
+ KURL url = KFileDialog::getOpenURL( TQString(), KImageIO::pattern(), this );
if ( url.isValid() ) {
if ( mImageLoader ) {
bool ok = false;
@@ -244,16 +244,16 @@ void ImageButton::clear()
emit changed();
}
-ImageBaseWidget::ImageBaseWidget( const QString &title,
- QWidget *parent, const char *name )
- : QWidget( parent, name ), mReadOnly( false )
+ImageBaseWidget::ImageBaseWidget( const TQString &title,
+ TQWidget *parent, const char *name )
+ : TQWidget( parent, name ), mReadOnly( false )
{
mImageLoader = new ImageLoader( this );
- QVBoxLayout *topLayout = new QVBoxLayout( this, KDialog::marginHint(),
+ TQVBoxLayout *topLayout = new TQVBoxLayout( this, KDialog::marginHint(),
KDialog::spacingHint() );
- QGroupBox *box = new QGroupBox( 0, Qt::Vertical, title, this );
- QVBoxLayout *layout = new QVBoxLayout( box->layout(), KDialog::spacingHint() );
+ TQGroupBox *box = new TQGroupBox( 0, Qt::Vertical, title, this );
+ TQVBoxLayout *layout = new TQVBoxLayout( box->layout(), KDialog::spacingHint() );
mImageButton = new ImageButton( i18n( "Picture" ), box );
mImageButton->setFixedSize( 100, 140 );
@@ -262,7 +262,7 @@ ImageBaseWidget::ImageBaseWidget( const QString &title,
topLayout->addWidget( box );
- connect( mImageButton, SIGNAL( changed() ), SIGNAL( changed() ) );
+ connect( mImageButton, TQT_SIGNAL( changed() ), TQT_SIGNAL( changed() ) );
}
ImageBaseWidget::~ImageBaseWidget()
@@ -288,10 +288,10 @@ KABC::Picture ImageBaseWidget::image() const
}
-ImageWidget::ImageWidget( KABC::AddressBook *ab, QWidget *parent, const char *name )
+ImageWidget::ImageWidget( KABC::AddressBook *ab, TQWidget *parent, const char *name )
: KAB::ContactEditorWidget( ab, parent, name )
{
- QHBoxLayout *layout = new QHBoxLayout( this, KDialog::marginHint(),
+ TQHBoxLayout *layout = new TQHBoxLayout( this, KDialog::marginHint(),
KDialog::spacingHint() );
mPhotoWidget = new ImageBaseWidget( KABC::Addressee::photoLabel(), this );
@@ -300,8 +300,8 @@ ImageWidget::ImageWidget( KABC::AddressBook *ab, QWidget *parent, const char *na
mLogoWidget = new ImageBaseWidget( KABC::Addressee::logoLabel(), this );
layout->addWidget( mLogoWidget );
- connect( mPhotoWidget, SIGNAL( changed() ), SLOT( setModified() ) );
- connect( mLogoWidget, SIGNAL( changed() ), SLOT( setModified() ) );
+ connect( mPhotoWidget, TQT_SIGNAL( changed() ), TQT_SLOT( setModified() ) );
+ connect( mLogoWidget, TQT_SIGNAL( changed() ), TQT_SLOT( setModified() ) );
}
void ImageWidget::loadContact( KABC::Addressee *addr )
diff --git a/kaddressbook/imagewidget.h b/kaddressbook/imagewidget.h
index 02a3577c1..82c8426f3 100644
--- a/kaddressbook/imagewidget.h
+++ b/kaddressbook/imagewidget.h
@@ -24,8 +24,8 @@
#ifndef IMAGEWIDGET_H
#define IMAGEWIDGET_H
-#include <qlabel.h>
-#include <qpushbutton.h>
+#include <tqlabel.h>
+#include <tqpushbutton.h>
#include <kabc/picture.h>
#include <kdialogbase.h>
@@ -40,13 +40,13 @@ class ImageLoader : public QObject
Q_OBJECT
public:
- ImageLoader( QWidget *parent );
+ ImageLoader( TQWidget *parent );
KABC::Picture loadPicture( const KURL &url, bool *ok );
private:
KABC::Picture mPicture;
- QWidget *mParent;
+ TQWidget *mParent;
};
/**
@@ -57,7 +57,7 @@ class ImageButton : public QPushButton
Q_OBJECT
public:
- ImageButton( const QString &title, QWidget *parent );
+ ImageButton( const TQString &title, TQWidget *parent );
void setReadOnly( bool readOnly );
@@ -71,11 +71,11 @@ class ImageButton : public QPushButton
void urlDropped( const KURL& );
protected:
- virtual void dragEnterEvent( QDragEnterEvent *event );
- virtual void dropEvent( QDropEvent *event );
- virtual void mouseMoveEvent( QMouseEvent *event );
- virtual void mousePressEvent( QMouseEvent *event );
- virtual void contextMenuEvent( QContextMenuEvent *event );
+ virtual void dragEnterEvent( TQDragEnterEvent *event );
+ virtual void dropEvent( TQDropEvent *event );
+ virtual void mouseMoveEvent( TQMouseEvent *event );
+ virtual void mousePressEvent( TQMouseEvent *event );
+ virtual void contextMenuEvent( TQContextMenuEvent *event );
private slots:
void load();
@@ -86,7 +86,7 @@ class ImageButton : public QPushButton
void updateGUI();
bool mReadOnly;
- QPoint mDragStartPos;
+ TQPoint mDragStartPos;
KABC::Picture mPicture;
ImageLoader *mImageLoader;
@@ -98,7 +98,7 @@ class ImageBaseWidget : public QWidget
Q_OBJECT
public:
- ImageBaseWidget( const QString &title, QWidget *parent, const char *name = 0 );
+ ImageBaseWidget( const TQString &title, TQWidget *parent, const char *name = 0 );
~ImageBaseWidget();
/**
@@ -126,7 +126,7 @@ class ImageBaseWidget : public QWidget
class ImageWidget : public KAB::ContactEditorWidget
{
public:
- ImageWidget( KABC::AddressBook *ab, QWidget *parent, const char *name = 0 );
+ ImageWidget( KABC::AddressBook *ab, TQWidget *parent, const char *name = 0 );
void loadContact( KABC::Addressee *addr );
void storeContact( KABC::Addressee *addr );
@@ -142,12 +142,12 @@ class ImageWidget : public KAB::ContactEditorWidget
class ImageWidgetFactory : public KAB::ContactEditorWidgetFactory
{
public:
- KAB::ContactEditorWidget *createWidget( KABC::AddressBook *ab, QWidget *parent, const char *name )
+ KAB::ContactEditorWidget *createWidget( KABC::AddressBook *ab, TQWidget *parent, const char *name )
{
return new ImageWidget( ab, parent, name );
}
- QString pageIdentifier() const { return "misc"; }
+ TQString pageIdentifier() const { return "misc"; }
};
#endif
diff --git a/kaddressbook/imeditwidget.cpp b/kaddressbook/imeditwidget.cpp
index 7e663d25f..11827f89a 100644
--- a/kaddressbook/imeditwidget.cpp
+++ b/kaddressbook/imeditwidget.cpp
@@ -21,14 +21,14 @@
without including the source code for Qt in the source distribution.
*/
-#include <qcheckbox.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qpainter.h>
-#include <qpushbutton.h>
-#include <qstring.h>
-#include <qtoolbutton.h>
-#include <qtooltip.h>
+#include <tqcheckbox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqpainter.h>
+#include <tqpushbutton.h>
+#include <tqstring.h>
+#include <tqtoolbutton.h>
+#include <tqtooltip.h>
#include <kaccelmanager.h>
#include <kconfig.h>
@@ -43,25 +43,25 @@
#include "imeditwidget.h"
#include "imeditorwidget.h"
-IMEditWidget::IMEditWidget( QWidget *parent, KABC::Addressee &addr, const char *name )
- : QWidget( parent, name ), mAddressee(addr)
+IMEditWidget::IMEditWidget( TQWidget *parent, KABC::Addressee &addr, const char *name )
+ : TQWidget( parent, name ), mAddressee(addr)
{
- QGridLayout *topLayout = new QGridLayout( this, 2, 2, KDialog::marginHint(),
+ TQGridLayout *topLayout = new TQGridLayout( this, 2, 2, KDialog::marginHint(),
KDialog::spacingHint() );
- QLabel *label = new QLabel( i18n( "IM address:" ), this );
+ TQLabel *label = new TQLabel( i18n( "IM address:" ), this );
topLayout->addWidget( label, 0, 0 );
mIMEdit = new KLineEdit( this );
- connect( mIMEdit, SIGNAL( textChanged( const QString& ) ),
- SLOT( textChanged( const QString& ) ) );
- connect( mIMEdit, SIGNAL( textChanged( const QString& ) ),
- SIGNAL( modified() ) );
+ connect( mIMEdit, TQT_SIGNAL( textChanged( const TQString& ) ),
+ TQT_SLOT( textChanged( const TQString& ) ) );
+ connect( mIMEdit, TQT_SIGNAL( textChanged( const TQString& ) ),
+ TQT_SIGNAL( modified() ) );
label->setBuddy( mIMEdit );
topLayout->addWidget( mIMEdit, 0, 1 );
- mEditButton = new QPushButton( i18n( "Edit IM Addresses..." ), this);
- connect( mEditButton, SIGNAL( clicked() ), SLOT( edit() ) );
+ mEditButton = new TQPushButton( i18n( "Edit IM Addresses..." ), this);
+ connect( mEditButton, TQT_SIGNAL( clicked() ), TQT_SLOT( edit() ) );
topLayout->addMultiCellWidget( mEditButton, 1, 1, 0, 1 );
topLayout->activate();
@@ -77,14 +77,14 @@ void IMEditWidget::setReadOnly( bool readOnly )
mReadOnly = readOnly;
// mEditButton->setEnabled( !readOnly );
}
-void IMEditWidget::setPreferredIM( const QString &addr )
+void IMEditWidget::setPreferredIM( const TQString &addr )
{
bool blocked = mIMEdit->signalsBlocked();
mIMEdit->blockSignals( true );
mIMEdit->setText( addr );
mIMEdit->blockSignals( blocked );
}
-void IMEditWidget::setIMs( const QStringList &list )
+void IMEditWidget::setIMs( const TQStringList &list )
{
mIMList = list;
@@ -97,7 +97,7 @@ void IMEditWidget::setIMs( const QStringList &list )
mIMEdit->blockSignals( blocked );
}
-QStringList IMEditWidget::ims()
+TQStringList IMEditWidget::ims()
{
if ( mIMEdit->text().isEmpty() ) {
if ( mIMList.count() > 0 )
@@ -111,7 +111,7 @@ QStringList IMEditWidget::ims()
return mIMList;
}
-QString IMEditWidget::preferredIM()
+TQString IMEditWidget::preferredIM()
{
return mIMEdit->text();
}
@@ -132,7 +132,7 @@ void IMEditWidget::edit()
}
}
-void IMEditWidget::textChanged( const QString &text )
+void IMEditWidget::textChanged( const TQString &text )
{
if ( mIMList.count() > 0 )
mIMList.remove( mIMList.begin() );
diff --git a/kaddressbook/imeditwidget.h b/kaddressbook/imeditwidget.h
index 8a20b9b2d..2252981ca 100644
--- a/kaddressbook/imeditwidget.h
+++ b/kaddressbook/imeditwidget.h
@@ -46,14 +46,14 @@ class IMEditWidget : public QWidget
Q_OBJECT
public:
- IMEditWidget(QWidget *parent, KABC::Addressee &addr, const char *name = 0 );
+ IMEditWidget(TQWidget *parent, KABC::Addressee &addr, const char *name = 0 );
~IMEditWidget();
- void setIMs( const QStringList &list );
- QStringList ims();
+ void setIMs( const TQStringList &list );
+ TQStringList ims();
- void setPreferredIM( const QString &addr );
- QString preferredIM();
+ void setPreferredIM( const TQString &addr );
+ TQString preferredIM();
void setReadOnly( bool readOnly );
signals:
@@ -61,12 +61,12 @@ class IMEditWidget : public QWidget
private slots:
void edit();
- void textChanged( const QString& );
+ void textChanged( const TQString& );
private:
KLineEdit *mIMEdit;
- QPushButton *mEditButton;
- QStringList mIMList;
+ TQPushButton *mEditButton;
+ TQStringList mIMList;
bool mReadOnly;
KABC::Addressee &mAddressee;
};
diff --git a/kaddressbook/incsearchwidget.cpp b/kaddressbook/incsearchwidget.cpp
index e435d100f..479f79c73 100644
--- a/kaddressbook/incsearchwidget.cpp
+++ b/kaddressbook/incsearchwidget.cpp
@@ -21,14 +21,14 @@
without including the source code for Qt in the source distribution.
*/
-#include <qapplication.h>
-#include <qcombobox.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qtimer.h>
-#include <qtoolbutton.h>
-#include <qtooltip.h>
-#include <qwhatsthis.h>
+#include <tqapplication.h>
+#include <tqcombobox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqtimer.h>
+#include <tqtoolbutton.h>
+#include <tqtooltip.h>
+#include <tqwhatsthis.h>
#include <kdialog.h>
#include <kiconloader.h>
@@ -37,54 +37,54 @@
#include "incsearchwidget.h"
-IncSearchWidget::IncSearchWidget( QWidget *parent, const char *name )
- : QWidget( parent, name )
+IncSearchWidget::IncSearchWidget( TQWidget *parent, const char *name )
+ : TQWidget( parent, name )
{
- QHBoxLayout *layout = new QHBoxLayout( this, 2, KDialog::spacingHint() );
+ TQHBoxLayout *layout = new TQHBoxLayout( this, 2, KDialog::spacingHint() );
- QToolButton *button = new QToolButton( this );
- button->setSizePolicy( QSizePolicy::Minimum, QSizePolicy::Minimum );
- button->setPixmap( SmallIcon( QApplication::reverseLayout() ? "clear_left" : "locationbar_erase" ) );
- button->setAccel( QKeySequence( CTRL+ALT+Key_S ) );
+ TQToolButton *button = new TQToolButton( this );
+ button->setSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Minimum );
+ button->setPixmap( SmallIcon( TQApplication::reverseLayout() ? "clear_left" : "locationbar_erase" ) );
+ button->setAccel( TQKeySequence( CTRL+ALT+Key_S ) );
button->setAutoRaise( true );
- QToolTip::add( button, i18n( "Reset" ) );
+ TQToolTip::add( button, i18n( "Reset" ) );
layout->addWidget( button );
- QLabel *label = new QLabel( i18n( "Search:" ), this, "kde toolbar widget" );
- label->setAlignment( QLabel::AlignVCenter | QLabel::AlignRight );
+ TQLabel *label = new TQLabel( i18n( "Search:" ), this, "kde toolbar widget" );
+ label->setAlignment( TQLabel::AlignVCenter | TQLabel::AlignRight );
layout->addWidget( label );
mSearchText = new KLineEdit( this );
- mSearchText->setSizePolicy( QSizePolicy::MinimumExpanding, QSizePolicy::Preferred );
- QWhatsThis::add( mSearchText, i18n( "The incremental search<p>Enter some text here will start the search for the contact, which matches the search pattern best. The part of the contact, which will be used for matching, depends on the field selection." ) );
+ mSearchText->setSizePolicy( TQSizePolicy::MinimumExpanding, TQSizePolicy::Preferred );
+ TQWhatsThis::add( mSearchText, i18n( "The incremental search<p>Enter some text here will start the search for the contact, which matches the search pattern best. The part of the contact, which will be used for matching, depends on the field selection." ) );
label->setBuddy( mSearchText );
layout->addWidget( mSearchText );
- label = new QLabel( i18n( "as in 'Search in:'", "&in:" ), this, "kde toolbar widget" );
- label->setAlignment( QLabel::AlignVCenter | QLabel::AlignRight );
+ label = new TQLabel( i18n( "as in 'Search in:'", "&in:" ), this, "kde toolbar widget" );
+ label->setAlignment( TQLabel::AlignVCenter | TQLabel::AlignRight );
layout->addWidget( label );
- mFieldCombo = new QComboBox( false, this );
+ mFieldCombo = new TQComboBox( false, this );
layout->addWidget( mFieldCombo );
label->setBuddy(mFieldCombo);
- QToolTip::add( mFieldCombo, i18n( "Select incremental search field" ) );
- QWhatsThis::add( mFieldCombo, i18n( "Here you can choose the field, which shall be used for incremental search." ) );
+ TQToolTip::add( mFieldCombo, i18n( "Select incremental search field" ) );
+ TQWhatsThis::add( mFieldCombo, i18n( "Here you can choose the field, which shall be used for incremental search." ) );
- mInputTimer = new QTimer( this );
+ mInputTimer = new TQTimer( this );
- connect( mInputTimer, SIGNAL( timeout() ),
- SLOT( timeout() ) );
- connect( mSearchText, SIGNAL( textChanged( const QString& ) ),
- SLOT( announceDoSearch() ) );
- connect( mSearchText, SIGNAL( returnPressed() ),
- SLOT( announceDoSearch() ) );
- connect( mFieldCombo, SIGNAL( activated( const QString& ) ),
- SLOT( announceDoSearch() ) );
- connect( button, SIGNAL( clicked() ),
- mSearchText, SLOT( clear() ) );
- connect( button, SIGNAL( clicked() ),
- SLOT( announceDoSearch() ) );
+ connect( mInputTimer, TQT_SIGNAL( timeout() ),
+ TQT_SLOT( timeout() ) );
+ connect( mSearchText, TQT_SIGNAL( textChanged( const TQString& ) ),
+ TQT_SLOT( announceDoSearch() ) );
+ connect( mSearchText, TQT_SIGNAL( returnPressed() ),
+ TQT_SLOT( announceDoSearch() ) );
+ connect( mFieldCombo, TQT_SIGNAL( activated( const TQString& ) ),
+ TQT_SLOT( announceDoSearch() ) );
+ connect( button, TQT_SIGNAL( clicked() ),
+ mSearchText, TQT_SLOT( clear() ) );
+ connect( button, TQT_SIGNAL( clicked() ),
+ TQT_SLOT( announceDoSearch() ) );
initFields();
@@ -157,7 +157,7 @@ void IncSearchWidget::clear()
mSearchText->clear();
}
-void IncSearchWidget::keyPressEvent( QKeyEvent *event )
+void IncSearchWidget::keyPressEvent( TQKeyEvent *event )
{
if ( event->key() == Qt::Key_Up ) {
event->accept();
diff --git a/kaddressbook/incsearchwidget.h b/kaddressbook/incsearchwidget.h
index c4eb1936f..f1ef00f45 100644
--- a/kaddressbook/incsearchwidget.h
+++ b/kaddressbook/incsearchwidget.h
@@ -24,7 +24,7 @@
#ifndef INCSEARCHWIDGET_H
#define INCSEARCHWIDGET_H
-#include <qwidget.h>
+#include <tqwidget.h>
#include <kabc/field.h>
@@ -37,7 +37,7 @@ class IncSearchWidget : public QWidget
Q_OBJECT
public:
- IncSearchWidget( QWidget *parent, const char *name = 0 );
+ IncSearchWidget( TQWidget *parent, const char *name = 0 );
~IncSearchWidget();
KABC::Field::List currentFields() const;
@@ -53,7 +53,7 @@ class IncSearchWidget : public QWidget
widget is changed. You can get the sorting field by
@ref currentField.
*/
- void doSearch( const QString& text );
+ void doSearch( const TQString& text );
/**
Emitted when the up key is pressed.
@@ -73,16 +73,16 @@ class IncSearchWidget : public QWidget
void timeout();
protected:
- virtual void keyPressEvent( QKeyEvent* );
+ virtual void keyPressEvent( TQKeyEvent* );
private:
void initFields();
- QComboBox* mFieldCombo;
+ TQComboBox* mFieldCombo;
KLineEdit* mSearchText;
KABC::Field::List mFieldList;
KABC::Field::List mViewFields;
- QTimer* mInputTimer;
+ TQTimer* mInputTimer;
};
#endif
diff --git a/kaddressbook/interfaces/configurewidget.cpp b/kaddressbook/interfaces/configurewidget.cpp
index 518a29538..f82b757fd 100644
--- a/kaddressbook/interfaces/configurewidget.cpp
+++ b/kaddressbook/interfaces/configurewidget.cpp
@@ -27,9 +27,9 @@
using namespace KAB;
-ConfigureWidget::ConfigureWidget( KABC::AddressBook *ab, QWidget *parent,
+ConfigureWidget::ConfigureWidget( KABC::AddressBook *ab, TQWidget *parent,
const char *name )
- : QWidget( parent, name ), mAddressBook( ab )
+ : TQWidget( parent, name ), mAddressBook( ab )
{
}
diff --git a/kaddressbook/interfaces/configurewidget.h b/kaddressbook/interfaces/configurewidget.h
index 601adce97..0ce35e5c7 100644
--- a/kaddressbook/interfaces/configurewidget.h
+++ b/kaddressbook/interfaces/configurewidget.h
@@ -24,7 +24,7 @@
#ifndef KAB_CONFIGUREWIDGET_H
#define KAB_CONFIGUREWIDGET_H
-#include <qwidget.h>
+#include <tqwidget.h>
#include <kconfig.h>
#include <kdepimmacros.h>
@@ -38,7 +38,7 @@ namespace KAB {
class KDE_EXPORT ConfigureWidget : public QWidget
{
public:
- ConfigureWidget( KABC::AddressBook *ab, QWidget *parent, const char *name = 0 );
+ ConfigureWidget( KABC::AddressBook *ab, TQWidget *parent, const char *name = 0 );
~ConfigureWidget();
/**
diff --git a/kaddressbook/interfaces/contacteditorwidget.cpp b/kaddressbook/interfaces/contacteditorwidget.cpp
index 366087c62..45b38ef3e 100644
--- a/kaddressbook/interfaces/contacteditorwidget.cpp
+++ b/kaddressbook/interfaces/contacteditorwidget.cpp
@@ -26,8 +26,8 @@
using namespace KAB;
ContactEditorWidget::ContactEditorWidget( KABC::AddressBook *ab,
- QWidget *parent, const char *name )
- : QWidget( parent, name ), mAddressBook( ab ), mModified( false )
+ TQWidget *parent, const char *name )
+ : TQWidget( parent, name ), mAddressBook( ab ), mModified( false )
{
}
diff --git a/kaddressbook/interfaces/contacteditorwidget.h b/kaddressbook/interfaces/contacteditorwidget.h
index 4b80b44f4..28a376e77 100644
--- a/kaddressbook/interfaces/contacteditorwidget.h
+++ b/kaddressbook/interfaces/contacteditorwidget.h
@@ -24,7 +24,7 @@
#ifndef KAB_CONTACTEDITORWIDGET_H
#define KAB_CONTACTEDITORWIDGET_H
-#include <qwidget.h>
+#include <tqwidget.h>
#include <kabc/addressbook.h>
#include <klibloader.h>
@@ -39,9 +39,9 @@ class KDE_EXPORT ContactEditorWidget : public QWidget
Q_OBJECT
public:
- typedef QValueList<ContactEditorWidget*> List;
+ typedef TQValueList<ContactEditorWidget*> List;
- ContactEditorWidget( KABC::AddressBook *ab, QWidget *parent, const char *name = 0 );
+ ContactEditorWidget( KABC::AddressBook *ab, TQWidget *parent, const char *name = 0 );
~ContactEditorWidget();
/**
@@ -116,23 +116,23 @@ class KDE_EXPORT ContactEditorWidget : public QWidget
class ContactEditorWidgetFactory : public KLibFactory
{
public:
- virtual ContactEditorWidget *createWidget( KABC::AddressBook *ab, QWidget *parent,
+ virtual ContactEditorWidget *createWidget( KABC::AddressBook *ab, TQWidget *parent,
const char *name = 0 ) = 0;
/**
Returns the i18ned title of this tab page.
*/
- virtual QString pageTitle() const { return ""; }
+ virtual TQString pageTitle() const { return ""; }
/**
Returns the identifier of the tab page where the widget
shall belong to.
*/
- virtual QString pageIdentifier() const = 0;
+ virtual TQString pageIdentifier() const = 0;
protected:
- virtual QObject* createObject( QObject*, const char*, const char*,
- const QStringList & )
+ virtual TQObject* createObject( TQObject*, const char*, const char*,
+ const TQStringList & )
{
return 0;
}
diff --git a/kaddressbook/interfaces/core.cpp b/kaddressbook/interfaces/core.cpp
index 6c8e10910..7f7d10481 100644
--- a/kaddressbook/interfaces/core.cpp
+++ b/kaddressbook/interfaces/core.cpp
@@ -25,8 +25,8 @@
using namespace KAB;
-Core::Core( KXMLGUIClient *client, QObject *parent, const char *name )
- : QObject( parent, name ), mGUIClient( client )
+Core::Core( KXMLGUIClient *client, TQObject *parent, const char *name )
+ : TQObject( parent, name ), mGUIClient( client )
{
}
diff --git a/kaddressbook/interfaces/core.h b/kaddressbook/interfaces/core.h
index 276b20d61..1897a0bd1 100644
--- a/kaddressbook/interfaces/core.h
+++ b/kaddressbook/interfaces/core.h
@@ -30,7 +30,7 @@
#include <libkdepim/distributionlist.h>
#endif
-#include <qobject.h>
+#include <tqobject.h>
#include <kabc/field.h>
#include <kcommand.h>
@@ -57,7 +57,7 @@ class KDE_EXPORT Core : public QObject
Q_OBJECT
public:
- Core( KXMLGUIClient *client, QObject *parent, const char *name = 0 );
+ Core( KXMLGUIClient *client, TQObject *parent, const char *name = 0 );
/**
Returns a pointer to the StdAddressBook of the application.
@@ -88,33 +88,33 @@ class KDE_EXPORT Core : public QObject
/**
Returns the uid list of the currently selected contacts.
*/
- virtual QStringList selectedUIDs() const = 0;
+ virtual TQStringList selectedUIDs() const = 0;
/**
Displays a ResourceSelectDialog and returns the selected
resource or a null pointer if no resource was selected by
the user.
*/
- virtual KABC::Resource *requestResource( QWidget *parent ) = 0;
+ virtual KABC::Resource *requestResource( TQWidget *parent ) = 0;
/**
Returns the parent widget.
*/
- virtual QWidget *widget() const = 0;
+ virtual TQWidget *widget() const = 0;
/**
Deletes given contacts from the address book.
@param uids The uids of the contacts, which shall be deleted.
*/
- virtual void deleteContacts( const QStringList &uids ) = 0;
+ virtual void deleteContacts( const TQStringList &uids ) = 0;
/**
Deletes given contacts from the address book.
@param uids The uids of the contacts, which shall be deleted.
*/
- virtual void deleteDistributionLists( const QStringList &uids ) = 0;
+ virtual void deleteDistributionLists( const TQStringList &uids ) = 0;
#ifdef KDEPIM_NEW_DISTRLISTS
/**
@@ -126,13 +126,13 @@ class KDE_EXPORT Core : public QObject
/**
Returns the name of all the distribution lists.
*/
- virtual QStringList distributionListNames() const = 0;
+ virtual TQStringList distributionListNames() const = 0;
/**
sets the distribution list to display. If null, the regular
address book is to be displayed.
*/
- virtual void setSelectedDistributionList( const QString &name ) = 0;
+ virtual void setSelectedDistributionList( const TQString &name ) = 0;
#endif
//// This class isn't part of interfaces/, so this method here isn't really useful
@@ -151,12 +151,12 @@ class KDE_EXPORT Core : public QObject
/**
Is called whenever a contact is selected in the view.
*/
- virtual void setContactSelected( const QString &uid ) = 0;
+ virtual void setContactSelected( const TQString &uid ) = 0;
/**
DCOP METHOD: Adds the given email address to address book.
*/
- virtual void addEmail( const QString& addr ) = 0;
+ virtual void addEmail( const TQString& addr ) = 0;
/**
DCOP METHOD: Imports the vCard, located at the given url.
@@ -166,7 +166,7 @@ class KDE_EXPORT Core : public QObject
/**
DCOP METHOD: Imports the given vCard.
*/
- virtual void importVCardFromData( const QString& vCard ) = 0;
+ virtual void importVCardFromData( const TQString& vCard ) = 0;
/**
DCOP METHOD: Opens contact editor to input a new contact.
@@ -182,17 +182,17 @@ class KDE_EXPORT Core : public QObject
DCOP METHOD: Returns the name of the contact, that matches the given
phone number.
*/
- virtual QString getNameByPhone( const QString& phone ) = 0;
+ virtual TQString getNameByPhone( const TQString& phone ) = 0;
/**
Shows an edit dialog for the given uid.
*/
- virtual void editContact( const QString &uid = QString::null ) = 0;
+ virtual void editContact( const TQString &uid = TQString::null ) = 0;
/**
Shows an edit dialog for the given distribution list
*/
- virtual void editDistributionList( const QString &name ) = 0;
+ virtual void editDistributionList( const TQString &name ) = 0;
private:
KXMLGUIClient *mGUIClient;
diff --git a/kaddressbook/interfaces/extensionwidget.cpp b/kaddressbook/interfaces/extensionwidget.cpp
index b70291583..8c98e5e0f 100644
--- a/kaddressbook/interfaces/extensionwidget.cpp
+++ b/kaddressbook/interfaces/extensionwidget.cpp
@@ -27,9 +27,9 @@
using namespace KAB;
-ExtensionWidget::ExtensionWidget( Core *core, QWidget *parent,
+ExtensionWidget::ExtensionWidget( Core *core, TQWidget *parent,
const char *name )
- : QWidget( parent, name ), mCore( core )
+ : TQWidget( parent, name ), mCore( core )
{
}
@@ -51,9 +51,9 @@ KABC::Addressee::List ExtensionWidget::selectedContacts()
{
KABC::Addressee::List list;
- const QStringList uids = mCore->selectedUIDs();
- QStringList::ConstIterator it;
- const QStringList::ConstIterator endIt = uids.end();
+ const TQStringList uids = mCore->selectedUIDs();
+ TQStringList::ConstIterator it;
+ const TQStringList::ConstIterator endIt = uids.end();
for ( it = uids.begin(); it != endIt; ++it )
list.append( mCore->addressBook()->findByUid( *it ) );
diff --git a/kaddressbook/interfaces/extensionwidget.h b/kaddressbook/interfaces/extensionwidget.h
index 076defad2..52ee946ca 100644
--- a/kaddressbook/interfaces/extensionwidget.h
+++ b/kaddressbook/interfaces/extensionwidget.h
@@ -24,7 +24,7 @@
#ifndef KAB_EXTENSIONWIDGET_H
#define KAB_EXTENSIONWIDGET_H
-#include <qwidget.h>
+#include <tqwidget.h>
#include <kabc/addressbook.h>
#include <klibloader.h>
@@ -41,7 +41,7 @@ class KDE_EXPORT ExtensionWidget : public QWidget
Q_OBJECT
public:
- ExtensionWidget( Core *core, QWidget *parent, const char *name = 0 );
+ ExtensionWidget( Core *core, TQWidget *parent, const char *name = 0 );
~ExtensionWidget();
/**
@@ -70,16 +70,16 @@ class KDE_EXPORT ExtensionWidget : public QWidget
This method should be reimplemented and return the i18ned title of this
widget.
*/
- virtual QString title() const = 0;
+ virtual TQString title() const = 0;
/**
This method should be reimplemented and return a unique identifier.
*/
- virtual QString identifier() const = 0;
+ virtual TQString identifier() const = 0;
signals:
void modified( const KABC::Addressee::List &list );
- void deleted( const QStringList& uidList );
+ void deleted( const TQStringList& uidList );
private:
KAB::Core *mCore;
@@ -91,10 +91,10 @@ class KDE_EXPORT ExtensionWidget : public QWidget
class ExtensionFactory : public KLibFactory
{
public:
- virtual ExtensionWidget *extension( KAB::Core *core, QWidget *parent,
+ virtual ExtensionWidget *extension( KAB::Core *core, TQWidget *parent,
const char *name = 0 ) = 0;
- virtual ConfigureWidget *configureWidget( QWidget*, const char* = 0 )
+ virtual ConfigureWidget *configureWidget( TQWidget*, const char* = 0 )
{
return 0;
}
@@ -105,11 +105,11 @@ class ExtensionFactory : public KLibFactory
This method should return the same identifier like the config
widget.
*/
- virtual QString identifier() const = 0;
+ virtual TQString identifier() const = 0;
protected:
- virtual QObject* createObject( QObject*, const char*, const char*,
- const QStringList & )
+ virtual TQObject* createObject( TQObject*, const char*, const char*,
+ const TQStringList & )
{
return 0;
}
diff --git a/kaddressbook/interfaces/xxport.cpp b/kaddressbook/interfaces/xxport.cpp
index 0e9e515c2..53be55197 100644
--- a/kaddressbook/interfaces/xxport.cpp
+++ b/kaddressbook/interfaces/xxport.cpp
@@ -21,8 +21,8 @@
without including the source code for Qt in the source distribution.
*/
-#include <qmap.h>
-#include <qsignalmapper.h>
+#include <tqmap.h>
+#include <tqsignalmapper.h>
#include <kaction.h>
#include <kinstance.h>
@@ -35,25 +35,25 @@ using namespace KAB;
class XXPort::XXPortPrivate
{
public:
- QSignalMapper *mExportMapper;
- QSignalMapper *mImportMapper;
+ TQSignalMapper *mExportMapper;
+ TQSignalMapper *mImportMapper;
KApplication *mKApp;
};
-XXPort::XXPort( KABC::AddressBook *ab, QWidget *parent,
+XXPort::XXPort( KABC::AddressBook *ab, TQWidget *parent,
const char *name )
- : QObject( parent, name ), mAddressBook( ab ), mParentWidget( parent ),
+ : TQObject( parent, name ), mAddressBook( ab ), mParentWidget( parent ),
d( new XXPortPrivate )
{
setInstance( new KInstance( "kaddressbook" ) );
- d->mExportMapper = new QSignalMapper( this );
- d->mImportMapper = new QSignalMapper( this );
+ d->mExportMapper = new TQSignalMapper( this );
+ d->mImportMapper = new TQSignalMapper( this );
- connect( d->mExportMapper, SIGNAL( mapped( const QString& ) ),
- SLOT( slotExportActivated( const QString& ) ) );
- connect( d->mImportMapper, SIGNAL( mapped( const QString& ) ),
- SLOT( slotImportActivated( const QString& ) ) );
+ connect( d->mExportMapper, TQT_SIGNAL( mapped( const TQString& ) ),
+ TQT_SLOT( slotExportActivated( const TQString& ) ) );
+ connect( d->mImportMapper, TQT_SIGNAL( mapped( const TQString& ) ),
+ TQT_SLOT( slotImportActivated( const TQString& ) ) );
}
XXPort::~XXPort()
@@ -62,34 +62,34 @@ XXPort::~XXPort()
d = 0;
}
-bool XXPort::exportContacts( const KABC::AddresseeList&, const QString& )
+bool XXPort::exportContacts( const KABC::AddresseeList&, const TQString& )
{
// do nothing
return false;
}
-KABC::AddresseeList XXPort::importContacts( const QString& ) const
+KABC::AddresseeList XXPort::importContacts( const TQString& ) const
{
// do nothing
return KABC::AddresseeList();
}
-void XXPort::createImportAction( const QString &label, const QString &data )
+void XXPort::createImportAction( const TQString &label, const TQString &data )
{
- QString id = "file_import_" + identifier() + ( data.isEmpty() ? QString( "" ) : "_" + data );
- KAction *action = new KAction( label, 0, d->mImportMapper, SLOT( map() ), actionCollection(), id.latin1() );
+ TQString id = "file_import_" + identifier() + ( data.isEmpty() ? TQString( "" ) : "_" + data );
+ KAction *action = new KAction( label, 0, d->mImportMapper, TQT_SLOT( map() ), actionCollection(), id.latin1() );
- d->mImportMapper->setMapping( action, ( data.isEmpty() ? QString( "<empty>" ) : data ) );
+ d->mImportMapper->setMapping( action, ( data.isEmpty() ? TQString( "<empty>" ) : data ) );
setXMLFile( identifier() + "_xxportui.rc" );
}
-void XXPort::createExportAction( const QString &label, const QString &data )
+void XXPort::createExportAction( const TQString &label, const TQString &data )
{
- QString id = "file_export_" + identifier() + ( data.isEmpty() ? QString( "" ) : "_" + data );
- KAction *action = new KAction( label, 0, d->mExportMapper, SLOT( map() ), actionCollection(), id.latin1() );
+ TQString id = "file_export_" + identifier() + ( data.isEmpty() ? TQString( "" ) : "_" + data );
+ KAction *action = new KAction( label, 0, d->mExportMapper, TQT_SLOT( map() ), actionCollection(), id.latin1() );
- d->mExportMapper->setMapping( action, ( data.isEmpty() ? QString( "<empty>" ) : data ) );
+ d->mExportMapper->setMapping( action, ( data.isEmpty() ? TQString( "<empty>" ) : data ) );
setXMLFile( identifier() + "_xxportui.rc" );
}
@@ -99,7 +99,7 @@ KABC::AddressBook *XXPort::addressBook() const
return mAddressBook;
}
-QWidget *XXPort::parentWidget() const
+TQWidget *XXPort::parentWidget() const
{
return mParentWidget;
}
@@ -115,14 +115,14 @@ void XXPort::processEvents() const
d->mKApp->processEvents();
}
-void XXPort::slotExportActivated( const QString &data )
+void XXPort::slotExportActivated( const TQString &data )
{
- emit exportActivated( identifier(), ( data == "<empty>" ? QString::null : data ) );
+ emit exportActivated( identifier(), ( data == "<empty>" ? TQString::null : data ) );
}
-void XXPort::slotImportActivated( const QString &data )
+void XXPort::slotImportActivated( const TQString &data )
{
- emit importActivated( identifier(), ( data == "<empty>" ? QString::null : data ) );
+ emit importActivated( identifier(), ( data == "<empty>" ? TQString::null : data ) );
}
#include "xxport.moc"
diff --git a/kaddressbook/interfaces/xxport.h b/kaddressbook/interfaces/xxport.h
index 098688b94..29b54acc1 100644
--- a/kaddressbook/interfaces/xxport.h
+++ b/kaddressbook/interfaces/xxport.h
@@ -24,7 +24,7 @@
#ifndef KAB_XXPORT_H
#define KAB_XXPORT_H
-#include <qobject.h>
+#include <tqobject.h>
#include <kabc/addressbook.h>
#include <kabc/addresseelist.h>
@@ -45,7 +45,7 @@ class KApplication;
*/
#define K_EXPORT_KADDRESSBOOK_XXFILTER_CATALOG( libname, XXPortClass, catalog ) \
class KDE_NO_EXPORT localXXPortFactory : public KAB::XXPortFactory { \
- KAB::XXPort *xxportObject( KABC::AddressBook *ab, QWidget *parent, const char *name ) \
+ KAB::XXPort *xxportObject( KABC::AddressBook *ab, TQWidget *parent, const char *name ) \
{ const char *cat = catalog; \
if (cat) KGlobal::locale()->insertCatalogue(cat); \
return new XXPortClass( ab, parent, name ); \
@@ -65,19 +65,19 @@ class KApplication;
namespace KAB {
-class KDE_EXPORT XXPort : public QObject, virtual public KXMLGUIClient
+class KDE_EXPORT XXPort : public TQObject, virtual public KXMLGUIClient
{
Q_OBJECT
public:
- XXPort( KABC::AddressBook *ab, QWidget *parent, const char *name = 0 );
+ XXPort( KABC::AddressBook *ab, TQWidget *parent, const char *name = 0 );
~XXPort();
/**
Returns the unique identifier of this xxport modul, it should
be the lowercase name of the import/export format e.g. 'vcard'
*/
- virtual QString identifier() const = 0;
+ virtual TQString identifier() const = 0;
/**
Reimplement this method if the XXPortManager shall
@@ -95,7 +95,7 @@ class KDE_EXPORT XXPort : public QObject, virtual public KXMLGUIClient
Processes outstanding KApplication events. It should be called
occasionally when the import/export filter is busy performing
a long operation (e.g. reading from slow external devices).
- @see: QApplication::processEvents()
+ @see: TQApplication::processEvents()
*/
void processEvents() const;
@@ -103,12 +103,12 @@ class KDE_EXPORT XXPort : public QObject, virtual public KXMLGUIClient
/**
Reimplement this method for exporting the contacts.
*/
- virtual bool exportContacts( const KABC::AddresseeList &list, const QString& identifier );
+ virtual bool exportContacts( const KABC::AddresseeList &list, const TQString& identifier );
/**
Reimplement this method for importing the contacts.
*/
- virtual KABC::AddresseeList importContacts( const QString& identifier ) const;
+ virtual KABC::AddresseeList importContacts( const TQString& identifier ) const;
signals:
/**
@@ -116,25 +116,25 @@ class KDE_EXPORT XXPort : public QObject, virtual public KXMLGUIClient
The parameter contains the @ref identifier() for
unique identification.
*/
- void exportActivated( const QString&, const QString& );
+ void exportActivated( const TQString&, const TQString& );
/**
Emitted whenever the import action is activated.
The parameter contains the @ref identifier() for
unique identification.
*/
- void importActivated( const QString&, const QString& );
+ void importActivated( const TQString&, const TQString& );
protected:
/**
Create the import action. The identifier is passed in the import slot.
*/
- void createImportAction( const QString &label, const QString &identifier = QString::null );
+ void createImportAction( const TQString &label, const TQString &identifier = TQString::null );
/**
Create the export action. The identifier is passed in the export slot.
*/
- void createExportAction( const QString &label, const QString &identifier = QString::null );
+ void createExportAction( const TQString &label, const TQString &identifier = TQString::null );
/**
Returns a pointer to the address book object.
@@ -145,15 +145,15 @@ class KDE_EXPORT XXPort : public QObject, virtual public KXMLGUIClient
Returns a pointer to the parent widget. It can be used as parent for
message boxes.
*/
- QWidget *parentWidget() const;
+ TQWidget *parentWidget() const;
private slots:
- void slotImportActivated( const QString& );
- void slotExportActivated( const QString& );
+ void slotImportActivated( const TQString& );
+ void slotExportActivated( const TQString& );
private:
KABC::AddressBook *mAddressBook;
- QWidget *mParentWidget;
+ TQWidget *mParentWidget;
class XXPortPrivate;
XXPortPrivate *d;
@@ -162,12 +162,12 @@ class KDE_EXPORT XXPort : public QObject, virtual public KXMLGUIClient
class XXPortFactory : public KLibFactory
{
public:
- virtual XXPort *xxportObject( KABC::AddressBook *ab, QWidget *parent,
+ virtual XXPort *xxportObject( KABC::AddressBook *ab, TQWidget *parent,
const char *name = 0 ) = 0;
protected:
- virtual QObject* createObject( QObject*, const char*, const char*,
- const QStringList & )
+ virtual TQObject* createObject( TQObject*, const char*, const char*,
+ const TQStringList & )
{
return 0;
}
diff --git a/kaddressbook/jumpbuttonbar.cpp b/kaddressbook/jumpbuttonbar.cpp
index 1c8eddbad..baa84ce23 100644
--- a/kaddressbook/jumpbuttonbar.cpp
+++ b/kaddressbook/jumpbuttonbar.cpp
@@ -21,13 +21,13 @@
without including the source code for Qt in the source distribution.
*/
-#include <qapplication.h>
-#include <qbuttongroup.h>
-#include <qevent.h>
-#include <qlayout.h>
-#include <qpushbutton.h>
-#include <qstring.h>
-#include <qstyle.h>
+#include <tqapplication.h>
+#include <tqbuttongroup.h>
+#include <tqevent.h>
+#include <tqlayout.h>
+#include <tqpushbutton.h>
+#include <tqstring.h>
+#include <tqstyle.h>
#include <kabc/addressbook.h>
#include <kabc/field.h>
@@ -42,41 +42,41 @@
class JumpButton : public QPushButton
{
public:
- JumpButton( const QString &firstChar, const QString &lastChar,
- QWidget *parent );
+ JumpButton( const TQString &firstChar, const TQString &lastChar,
+ TQWidget *parent );
- QString firstChar() const { return mChar; }
+ TQString firstChar() const { return mChar; }
private:
- QString mChar;
+ TQString mChar;
};
-JumpButton::JumpButton( const QString &firstChar, const QString &lastChar,
- QWidget *parent )
- : QPushButton( "", parent ), mChar( firstChar )
+JumpButton::JumpButton( const TQString &firstChar, const TQString &lastChar,
+ TQWidget *parent )
+ : TQPushButton( "", parent ), mChar( firstChar )
{
setToggleButton( true );
if ( !lastChar.isEmpty() )
- setText( QString( "%1 - %2" ).arg( firstChar.upper() ).arg( lastChar.upper() ) );
+ setText( TQString( "%1 - %2" ).arg( firstChar.upper() ).arg( lastChar.upper() ) );
else
setText( firstChar.upper() );
}
-JumpButtonBar::JumpButtonBar( KAB::Core *core, QWidget *parent, const char *name )
- : QWidget( parent, name ), mCore( core )
+JumpButtonBar::JumpButtonBar( KAB::Core *core, TQWidget *parent, const char *name )
+ : TQWidget( parent, name ), mCore( core )
{
setMinimumSize( 1, 1 );
- QVBoxLayout *layout = new QVBoxLayout( this, 0, 0 );
+ TQVBoxLayout *layout = new TQVBoxLayout( this, 0, 0 );
layout->setAlignment( Qt::AlignTop );
layout->setAutoAdd( true );
- layout->setResizeMode( QLayout::FreeResize );
+ layout->setResizeMode( TQLayout::FreeResize );
- mGroupBox = new QButtonGroup( 1, Qt::Horizontal, this );
+ mGroupBox = new TQButtonGroup( 1, Qt::Horizontal, this );
mGroupBox->setExclusive( true );
mGroupBox->layout()->setSpacing( 0 );
mGroupBox->layout()->setMargin( 0 );
- mGroupBox->setFrameStyle( QFrame::NoFrame );
+ mGroupBox->setFrameStyle( TQFrame::NoFrame );
}
JumpButtonBar::~JumpButtonBar()
@@ -92,21 +92,21 @@ void JumpButtonBar::updateButtons()
mButtons.clear();
mButtons.setAutoDelete( false );
- QStringList characters;
+ TQStringList characters;
// calculate how many buttons are possible
- QFontMetrics fm = fontMetrics();
- QPushButton *btn = new QPushButton( "", this );
+ TQFontMetrics fm = fontMetrics();
+ TQPushButton *btn = new TQPushButton( "", this );
btn->hide();
- QSize buttonSize = style().sizeFromContents( QStyle::CT_PushButton, btn,
+ TQSize buttonSize = style().sizeFromContents( TQStyle::CT_PushButton, btn,
fm.size( ShowPrefix, "X - X") ).
- expandedTo( QApplication::globalStrut() );
+ expandedTo( TQApplication::globalStrut() );
delete btn;
int buttonHeight = buttonSize.height() + 8;
uint possibleButtons = (height() / buttonHeight) - 1;
- QString character;
+ TQString character;
KABC::AddressBook *ab = mCore->addressBook();
KABC::AddressBook::Iterator it;
for ( it = ab->begin(); it != ab->end(); ++it ) {
@@ -130,9 +130,9 @@ void JumpButtonBar::updateButtons()
if ( characters.count() <= possibleButtons ) {
// at first the easy case: all buttons fits in window
for ( uint i = 0; i < characters.count(); ++i ) {
- JumpButton *button = new JumpButton( characters[ i ], QString::null,
+ JumpButton *button = new JumpButton( characters[ i ], TQString::null,
mGroupBox );
- connect( button, SIGNAL( clicked() ), this, SLOT( letterClicked() ) );
+ connect( button, TQT_SIGNAL( clicked() ), this, TQT_SLOT( letterClicked() ) );
mButtons.append( button );
button->show();
}
@@ -150,20 +150,20 @@ void JumpButtonBar::updateButtons()
continue;
if ( characters.count() - current <= possibleButtons - i ) {
JumpButton *button = new JumpButton( characters[ current ],
- QString::null, mGroupBox );
- connect( button, SIGNAL( clicked() ), this, SLOT( letterClicked() ) );
+ TQString::null, mGroupBox );
+ connect( button, TQT_SIGNAL( clicked() ), this, TQT_SLOT( letterClicked() ) );
mButtons.append( button );
button->show();
current++;
} else {
int pos = ( current + offset >= (int)characters.count() ?
characters.count() - 1 : current + offset - 1 );
- QString range;
+ TQString range;
for ( int j = current; j < pos + 1; ++j )
range.append( characters[ j ] );
JumpButton *button = new JumpButton( characters[ current ],
characters[ pos ], mGroupBox );
- connect( button, SIGNAL( clicked() ), this, SLOT( letterClicked() ) );
+ connect( button, TQT_SIGNAL( clicked() ), this, TQT_SLOT( letterClicked() ) );
mButtons.append( button );
button->show();
current = ( i + 1 ) * offset;
@@ -177,7 +177,7 @@ void JumpButtonBar::updateButtons()
mGroupBox->setButton( 0 );
int maxWidth = 0;
- QPushButton *button;
+ TQPushButton *button;
for ( button = mButtons.first(); button; button = mButtons.next() )
maxWidth = QMAX( maxWidth, button->sizeHint().width() );
@@ -187,12 +187,12 @@ void JumpButtonBar::updateButtons()
void JumpButtonBar::letterClicked()
{
JumpButton *button = (JumpButton*)sender();
- QString character = button->firstChar();
+ TQString character = button->firstChar();
emit jumpToLetter( character );
}
-void JumpButtonBar::resizeEvent( QResizeEvent* )
+void JumpButtonBar::resizeEvent( TQResizeEvent* )
{
updateButtons();
}
@@ -201,37 +201,37 @@ class SortContainer
{
public:
SortContainer() {}
- SortContainer( const QString &string )
+ SortContainer( const TQString &string )
: mString( string )
{
}
bool operator< ( const SortContainer &cnt )
{
- return ( QString::localeAwareCompare( mString, cnt.mString ) < 0 );
+ return ( TQString::localeAwareCompare( mString, cnt.mString ) < 0 );
}
- QString data() const
+ TQString data() const
{
return mString;
}
private:
- QString mString;
+ TQString mString;
};
-void JumpButtonBar::sortListLocaleAware( QStringList &list )
+void JumpButtonBar::sortListLocaleAware( TQStringList &list )
{
- QValueList<SortContainer> sortList;
+ TQValueList<SortContainer> sortList;
- QStringList::ConstIterator it;
+ TQStringList::ConstIterator it;
for ( it = list.begin(); it != list.end(); ++it )
sortList.append( SortContainer( *it ) );
qHeapSort( sortList );
list.clear();
- QValueList<SortContainer>::ConstIterator sortIt;
+ TQValueList<SortContainer>::ConstIterator sortIt;
for ( sortIt = sortList.begin(); sortIt != sortList.end(); ++sortIt )
list.append( (*sortIt).data() );
}
diff --git a/kaddressbook/jumpbuttonbar.h b/kaddressbook/jumpbuttonbar.h
index 850b51b48..b092a7587 100644
--- a/kaddressbook/jumpbuttonbar.h
+++ b/kaddressbook/jumpbuttonbar.h
@@ -24,10 +24,10 @@
#ifndef JUMPBUTTONBAR_H
#define JUMPBUTTONBAR_H
-#include <qsizepolicy.h>
-#include <qwidget.h>
-#include <qptrlist.h>
-#include <qstringlist.h>
+#include <tqsizepolicy.h>
+#include <tqwidget.h>
+#include <tqptrlist.h>
+#include <tqstringlist.h>
class QButtonGroup;
class QResizeEvent;
@@ -49,7 +49,7 @@ class JumpButtonBar : public QWidget
Q_OBJECT
public:
- JumpButtonBar( KAB::Core *core, QWidget *parent, const char *name = 0 );
+ JumpButtonBar( KAB::Core *core, TQWidget *parent, const char *name = 0 );
~JumpButtonBar();
public slots:
@@ -59,21 +59,21 @@ class JumpButtonBar : public QWidget
/**
Emitted whenever a letter is selected by the user.
*/
- void jumpToLetter( const QString &character );
+ void jumpToLetter( const TQString &character );
protected slots:
void letterClicked();
protected:
- virtual void resizeEvent( QResizeEvent* );
+ virtual void resizeEvent( TQResizeEvent* );
private:
- void sortListLocaleAware( QStringList &list );
+ void sortListLocaleAware( TQStringList &list );
KAB::Core *mCore;
- QButtonGroup *mGroupBox;
- QPtrList<QPushButton> mButtons;
+ TQButtonGroup *mGroupBox;
+ TQPtrList<TQPushButton> mButtons;
};
#endif
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp
index 449357d16..e15854768 100644
--- a/kaddressbook/kabcore.cpp
+++ b/kaddressbook/kabcore.cpp
@@ -23,17 +23,17 @@
// Needed for ugly hack, to be removed in 4.0
#include <unistd.h> // for usleep
-#include <qeventloop.h>
-
-#include <qclipboard.h>
-#include <qdir.h>
-#include <qfile.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qptrlist.h>
-#include <qwidgetstack.h>
-#include <qregexp.h>
-#include <qvbox.h>
+#include <tqeventloop.h>
+
+#include <tqclipboard.h>
+#include <tqdir.h>
+#include <tqfile.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqptrlist.h>
+#include <tqwidgetstack.h>
+#include <tqregexp.h>
+#include <tqvbox.h>
#include <kabc/addresseelist.h>
#include <kabc/errorhandler.h>
@@ -90,20 +90,20 @@
#include "kabcore.h"
-KABCore::KABCore( KXMLGUIClient *client, bool readWrite, QWidget *parent,
- const QString &file, const char *name )
+KABCore::KABCore( KXMLGUIClient *client, bool readWrite, TQWidget *parent,
+ const TQString &file, const char *name )
: KAB::Core( client, parent, name ), mStatusBar( 0 ), mViewManager( 0 ),
mExtensionManager( 0 ), mJumpButtonBar( 0 ), mCategorySelectDialog( 0 ),
mCategoryEditDialog( 0 ), mLdapSearchDialog( 0 ), mReadWrite( readWrite ),
mModified( false )
{
- mWidget = new QWidget( parent, name );
+ mWidget = new TQWidget( parent, name );
mIsPart = !parent->isA( "KAddressBookMain" );
- mAddressBookChangedTimer = new QTimer( this );
- connect( mAddressBookChangedTimer, SIGNAL( timeout() ),
- this, SLOT( addressBookChanged() ) );
+ mAddressBookChangedTimer = new TQTimer( this );
+ connect( mAddressBookChangedTimer, TQT_SIGNAL( timeout() ),
+ this, TQT_SLOT( addressBookChanged() ) );
if ( file.isEmpty() ) {
mAddressBook = KABC::StdAddressBook::self( true );
@@ -140,49 +140,49 @@ KABCore::KABCore( KXMLGUIClient *client, bool readWrite, QWidget *parent,
mSearchManager = new KAB::SearchManager( mAddressBook, parent );
- connect( mSearchManager, SIGNAL( contactsUpdated() ),
- this, SLOT( slotContactsUpdated() ) );
+ connect( mSearchManager, TQT_SIGNAL( contactsUpdated() ),
+ this, TQT_SLOT( slotContactsUpdated() ) );
initGUI();
- connect( mAddressBook, SIGNAL( addressBookChanged( AddressBook* ) ),
- SLOT( delayedAddressBookChanged() ) );
- connect( mAddressBook, SIGNAL( loadingFinished( Resource* ) ),
- SLOT( delayedAddressBookChanged() ) );
+ connect( mAddressBook, TQT_SIGNAL( addressBookChanged( AddressBook* ) ),
+ TQT_SLOT( delayedAddressBookChanged() ) );
+ connect( mAddressBook, TQT_SIGNAL( loadingFinished( Resource* ) ),
+ TQT_SLOT( delayedAddressBookChanged() ) );
mIncSearchWidget->setFocus();
- connect( mViewManager, SIGNAL( selected( const QString& ) ),
- SLOT( setContactSelected( const QString& ) ) );
- connect( mViewManager, SIGNAL( executed( const QString& ) ),
- SLOT( editContact( const QString& ) ) );
- connect( mViewManager, SIGNAL( modified() ),
- SLOT( setModified() ) );
- connect( mViewManager, SIGNAL( urlDropped( const KURL& ) ),
- mXXPortManager, SLOT( importVCard( const KURL& ) ) );
- connect( mViewManager, SIGNAL( viewFieldsChanged() ),
- SLOT( updateIncSearchWidget() ) );
- connect( mExtensionManager, SIGNAL( modified( const KABC::Addressee::List& ) ),
- this, SLOT( extensionModified( const KABC::Addressee::List& ) ) );
- connect( mExtensionManager, SIGNAL( deleted( const QStringList& ) ),
- this, SLOT( extensionDeleted( const QStringList& ) ) );
-
- connect( mXXPortManager, SIGNAL( modified() ),
- SLOT( setModified() ) );
-
- connect( mDetailsViewer, SIGNAL( highlightedMessage( const QString& ) ),
- SLOT( detailsHighlighted( const QString& ) ) );
-
- connect( mIncSearchWidget, SIGNAL( scrollUp() ),
- mViewManager, SLOT( scrollUp() ) );
- connect( mIncSearchWidget, SIGNAL( scrollDown() ),
- mViewManager, SLOT( scrollDown() ) );
+ connect( mViewManager, TQT_SIGNAL( selected( const TQString& ) ),
+ TQT_SLOT( setContactSelected( const TQString& ) ) );
+ connect( mViewManager, TQT_SIGNAL( executed( const TQString& ) ),
+ TQT_SLOT( editContact( const TQString& ) ) );
+ connect( mViewManager, TQT_SIGNAL( modified() ),
+ TQT_SLOT( setModified() ) );
+ connect( mViewManager, TQT_SIGNAL( urlDropped( const KURL& ) ),
+ mXXPortManager, TQT_SLOT( importVCard( const KURL& ) ) );
+ connect( mViewManager, TQT_SIGNAL( viewFieldsChanged() ),
+ TQT_SLOT( updateIncSearchWidget() ) );
+ connect( mExtensionManager, TQT_SIGNAL( modified( const KABC::Addressee::List& ) ),
+ this, TQT_SLOT( extensionModified( const KABC::Addressee::List& ) ) );
+ connect( mExtensionManager, TQT_SIGNAL( deleted( const TQStringList& ) ),
+ this, TQT_SLOT( extensionDeleted( const TQStringList& ) ) );
+
+ connect( mXXPortManager, TQT_SIGNAL( modified() ),
+ TQT_SLOT( setModified() ) );
+
+ connect( mDetailsViewer, TQT_SIGNAL( highlightedMessage( const TQString& ) ),
+ TQT_SLOT( detailsHighlighted( const TQString& ) ) );
+
+ connect( mIncSearchWidget, TQT_SIGNAL( scrollUp() ),
+ mViewManager, TQT_SLOT( scrollUp() ) );
+ connect( mIncSearchWidget, TQT_SIGNAL( scrollDown() ),
+ mViewManager, TQT_SLOT( scrollDown() ) );
mAddressBookService = new KAddressBookService( this );
mCommandHistory = new KCommandHistory( actionCollection(), true );
- connect( mCommandHistory, SIGNAL( commandExecuted() ),
- mSearchManager, SLOT( reload() ) );
+ connect( mCommandHistory, TQT_SIGNAL( commandExecuted() ),
+ mSearchManager, TQT_SLOT( reload() ) );
mSearchManager->reload();
@@ -218,14 +218,14 @@ void KABCore::restoreSettings()
updateIncSearchWidget();
mIncSearchWidget->setCurrentItem( KABPrefs::instance()->currentIncSearchField() );
- QValueList<int> splitterSize = KABPrefs::instance()->detailsSplitter();
+ TQValueList<int> splitterSize = KABPrefs::instance()->detailsSplitter();
if ( splitterSize.count() == 0 ) {
splitterSize.append( 360 );
splitterSize.append( 260 );
}
mDetailsSplitter->setSizes( splitterSize );
- const QValueList<int> leftSplitterSizes = KABPrefs::instance()->leftSplitter();
+ const TQValueList<int> leftSplitterSizes = KABPrefs::instance()->leftSplitter();
if ( !leftSplitterSizes.isEmpty() )
mLeftSplitter->setSizes( leftSplitterSizes );
}
@@ -263,17 +263,17 @@ KABC::Field *KABCore::currentSortField() const
return mViewManager->currentSortField();
}
-QStringList KABCore::selectedUIDs() const
+TQStringList KABCore::selectedUIDs() const
{
return mViewManager->selectedUids();
}
-KABC::Resource *KABCore::requestResource( QWidget *parent )
+KABC::Resource *KABCore::requestResource( TQWidget *parent )
{
- QPtrList<KABC::Resource> kabcResources = addressBook()->resources();
+ TQPtrList<KABC::Resource> kabcResources = addressBook()->resources();
- QPtrList<KRES::Resource> kresResources;
- QPtrListIterator<KABC::Resource> resIt( kabcResources );
+ TQPtrList<KRES::Resource> kresResources;
+ TQPtrListIterator<KABC::Resource> resIt( kabcResources );
KABC::Resource *resource;
while ( ( resource = resIt.current() ) != 0 ) {
++resIt;
@@ -287,7 +287,7 @@ KABC::Resource *KABCore::requestResource( QWidget *parent )
return static_cast<KABC::Resource*>( res ); // upcast
}
-QWidget *KABCore::widget() const
+TQWidget *KABCore::widget() const
{
return mWidget;
}
@@ -326,7 +326,7 @@ KStatusBar *KABCore::statusBar() const
return mStatusBar;
}
-void KABCore::setContactSelected( const QString &uid )
+void KABCore::setContactSelected( const TQString &uid )
{
// Avoid crash on exit
if ( !mAddressBook ) {
@@ -369,7 +369,7 @@ void KABCore::setContactSelected( const QString &uid )
if ( res->inherits( "KPIM::ResourceABC" ) ) {
KPIM::ResourceABC *resAbc = static_cast<KPIM::ResourceABC *>( res );
- QString subresource = resAbc->uidToResourceMap()[ ( *addrIt ).uid() ];
+ TQString subresource = resAbc->uidToResourceMap()[ ( *addrIt ).uid() ];
if ( !subresource.isEmpty() && !resAbc->subresourceWritable( subresource ) ) {
writable = false;
break;
@@ -383,9 +383,9 @@ void KABCore::setContactSelected( const QString &uid )
KABC::Resource *res = mAddressBook->resources().first();
if ( res->inherits( "KPIM::ResourceABC" ) ) {
KPIM::ResourceABC *resAbc = static_cast<KPIM::ResourceABC *>( res );
- const QStringList subresources = resAbc->subresources();
+ const TQStringList subresources = resAbc->subresources();
int writeables = 0;
- for ( QStringList::ConstIterator it = subresources.begin(); it != subresources.end(); ++it ) {
+ for ( TQStringList::ConstIterator it = subresources.begin(); it != subresources.end(); ++it ) {
if ( resAbc->subresourceActive(*it) && resAbc->subresourceWritable(*it) ) {
writeables++;
}
@@ -412,7 +412,7 @@ void KABCore::setContactSelected( const QString &uid )
mActionMerge->setEnabled( ( list.size() == 2 ) && writable );
if ( mReadWrite ) {
- QClipboard *cb = QApplication::clipboard();
+ QClipboard *cb = TQApplication::clipboard();
list = AddresseeUtil::clipboardToAddressees( cb->text() );
mActionPaste->setEnabled( !list.isEmpty() );
}
@@ -424,58 +424,58 @@ void KABCore::sendMail()
sendMail( mViewManager->selectedEmails().join( ", " ) );
}
-void KABCore::sendMail( const QString& email )
+void KABCore::sendMail( const TQString& email )
{
kapp->invokeMailer( email, "" );
}
void KABCore::mailVCard()
{
- QStringList uids = mViewManager->selectedUids();
+ TQStringList uids = mViewManager->selectedUids();
if ( !uids.isEmpty() )
mailVCard( uids );
}
-void KABCore::mailVCard( const QStringList &uids )
+void KABCore::mailVCard( const TQStringList &uids )
{
KABTools::mailVCards( uids, mAddressBook );
}
void KABCore::startChat()
{
- QStringList uids = mViewManager->selectedUids();
+ TQStringList uids = mViewManager->selectedUids();
if ( !uids.isEmpty() )
mKIMProxy->chatWithContact( uids.first() );
}
-void KABCore::browse( const QString& url )
+void KABCore::browse( const TQString& url )
{
kapp->invokeBrowser( url );
}
void KABCore::selectAllContacts()
{
- mViewManager->setSelected( QString::null, true );
+ mViewManager->setSelected( TQString::null, true );
}
void KABCore::deleteContacts()
{
- QStringList uidList = mViewManager->selectedUids();
+ TQStringList uidList = mViewManager->selectedUids();
deleteContacts( uidList );
}
-void KABCore::deleteDistributionLists( const QStringList & names )
+void KABCore::deleteDistributionLists( const TQStringList & names )
{
if ( names.isEmpty() )
return;
if ( KMessageBox::warningContinueCancelList( mWidget, i18n( "Do you really want to delete this distribution list?",
"Do you really want to delete these %n distribution lists?", names.count() ),
- names, QString::null, KStdGuiItem::del() ) == KMessageBox::Cancel )
+ names, TQString::null, KStdGuiItem::del() ) == KMessageBox::Cancel )
return;
- QStringList uids;
- for ( QStringList::ConstIterator it = names.begin(); it != names.end(); ++it ) {
+ TQStringList uids;
+ for ( TQStringList::ConstIterator it = names.begin(); it != names.end(); ++it ) {
uids.append( KPIM::DistributionList::findByName( mAddressBook, *it ).uid() );
}
DeleteCommand *command = new DeleteCommand( mAddressBook, uids );
@@ -483,12 +483,12 @@ void KABCore::deleteDistributionLists( const QStringList & names )
setModified( true );
}
-void KABCore::deleteContacts( const QStringList &uids )
+void KABCore::deleteContacts( const TQStringList &uids )
{
if ( uids.count() > 0 ) {
- QStringList names;
- QStringList::ConstIterator it = uids.begin();
- const QStringList::ConstIterator endIt( uids.end() );
+ TQStringList names;
+ TQStringList::ConstIterator it = uids.begin();
+ const TQStringList::ConstIterator endIt( uids.end() );
while ( it != endIt ) {
KABC::Addressee addr = mAddressBook->findByUid( *it );
names.append( addr.realName().isEmpty() ? addr.preferredEmail() : addr.realName() );
@@ -497,14 +497,14 @@ void KABCore::deleteContacts( const QStringList &uids )
if ( KMessageBox::warningContinueCancelList( mWidget, i18n( "Do you really want to delete this contact?",
"Do you really want to delete these %n contacts?", uids.count() ),
- names, QString::null, KStdGuiItem::del() ) == KMessageBox::Cancel )
+ names, TQString::null, KStdGuiItem::del() ) == KMessageBox::Cancel )
return;
DeleteCommand *command = new DeleteCommand( mAddressBook, uids );
mCommandHistory->addCommand( command );
// now if we deleted anything, refresh
- setContactSelected( QString::null );
+ setContactSelected( TQString::null );
setModified( true );
}
}
@@ -513,17 +513,17 @@ void KABCore::copyContacts()
{
KABC::Addressee::List addrList = mViewManager->selectedAddressees();
- QString clipText = AddresseeUtil::addresseesToClipboard( addrList );
+ TQString clipText = AddresseeUtil::addresseesToClipboard( addrList );
kdDebug(5720) << "KABCore::copyContacts: " << clipText << endl;
- QClipboard *cb = QApplication::clipboard();
+ QClipboard *cb = TQApplication::clipboard();
cb->setText( clipText );
}
void KABCore::cutContacts()
{
- QStringList uidList = mViewManager->selectedUids();
+ TQStringList uidList = mViewManager->selectedUids();
if ( uidList.size() > 0 ) {
CutCommand *command = new CutCommand( mAddressBook, uidList );
@@ -535,7 +535,7 @@ void KABCore::cutContacts()
void KABCore::pasteContacts()
{
- QClipboard *cb = QApplication::clipboard();
+ QClipboard *cb = TQApplication::clipboard();
KABC::Addressee::List list = AddresseeUtil::clipboardToAddressees( cb->text() );
@@ -570,7 +570,7 @@ void KABCore::mergeContacts()
KABC::Addressee::List::Iterator it = list.begin();
const KABC::Addressee::List::Iterator endIt( list.end() );
KABC::Addressee origAddr = *it;
- QStringList uids;
+ TQStringList uids;
++it;
while ( it != endIt ) {
uids.append( (*it).uid() );
@@ -596,20 +596,20 @@ void KABCore::setWhoAmI()
return;
}
- QString text( i18n( "<qt>Do you really want to use <b>%1</b> as your new personal contact?</qt>" ) );
- if ( KMessageBox::questionYesNo( mWidget, text.arg( addrList[ 0 ].assembledName() ), QString::null, i18n("Use"), i18n("Do Not Use") ) == KMessageBox::Yes )
+ TQString text( i18n( "<qt>Do you really want to use <b>%1</b> as your new personal contact?</qt>" ) );
+ if ( KMessageBox::questionYesNo( mWidget, text.arg( addrList[ 0 ].assembledName() ), TQString::null, i18n("Use"), i18n("Do Not Use") ) == KMessageBox::Yes )
static_cast<KABC::StdAddressBook*>( KABC::StdAddressBook::self( true ) )->setWhoAmI( addrList[ 0 ] );
}
-void KABCore::incrementalTextSearch( const QString& text )
+void KABCore::incrementalTextSearch( const TQString& text )
{
- setContactSelected( QString::null );
+ setContactSelected( TQString::null );
mSearchManager->search( text, mIncSearchWidget->currentFields() );
}
-void KABCore::incrementalJumpButtonSearch( const QString& character )
+void KABCore::incrementalJumpButtonSearch( const TQString& character )
{
- mViewManager->setSelected( QString::null, false );
+ mViewManager->setSelected( TQString::null, false );
KABC::AddresseeList list = mSearchManager->contacts();
KABC::Field *field = mViewManager->currentSortField();
@@ -667,7 +667,7 @@ void KABCore::contactModified( const KABC::Addressee &addr )
void KABCore::newDistributionList()
{
#ifdef KDEPIM_NEW_DISTRLISTS
- QString name = i18n( "New Distribution List" );
+ TQString name = i18n( "New Distribution List" );
const KPIM::DistributionList distList = KPIM::DistributionList::findByName( addressBook(), name );
if ( !distList.isEmpty() ) {
bool foundUnused = false;
@@ -707,9 +707,9 @@ void KABCore::newContact()
dialog->show();
}
-void KABCore::addEmail( const QString &aStr )
+void KABCore::addEmail( const TQString &aStr )
{
- QString fullName, email;
+ TQString fullName, email;
KABC::Addressee::parseEmailAddress( aStr, fullName, email );
@@ -717,7 +717,7 @@ void KABCore::addEmail( const QString &aStr )
// This ugly hack will be removed in 4.0
// addressbook may not be reloaded yet, as done asynchronously sometimes, so wait
while ( !mAddressBook->loadingHasFinished() ) {
- QApplication::eventLoop()->processEvents( QEventLoop::ExcludeUserInput );
+ TQApplication::eventLoop()->processEvents( TQEventLoop::ExcludeUserInput );
// use sleep here to reduce cpu usage
usleep( 100 );
}
@@ -725,7 +725,7 @@ void KABCore::addEmail( const QString &aStr )
// Try to lookup the addressee matching the email address
bool found = false;
- QStringList emailList;
+ TQStringList emailList;
KABC::AddressBook::Iterator it;
const KABC::AddressBook::Iterator endIt( mAddressBook->end() );
for ( it = mAddressBook->begin(); !found && (it != endIt); ++it ) {
@@ -753,20 +753,20 @@ void KABCore::importVCard( const KURL &url )
mXXPortManager->importVCard( url );
}
-void KABCore::importVCardFromData( const QString &vCard )
+void KABCore::importVCardFromData( const TQString &vCard )
{
mXXPortManager->importVCardFromData( vCard );
}
-void KABCore::editContact( const QString &uid )
+void KABCore::editContact( const TQString &uid )
{
if ( mExtensionManager->isQuickEditVisible() )
return;
// First, locate the contact entry
- QString localUID = uid;
+ TQString localUID = uid;
if ( localUID.isNull() ) {
- QStringList uidList = mViewManager->selectedUids();
+ TQStringList uidList = mViewManager->selectedUids();
if ( uidList.count() > 0 )
localUID = *( uidList.at( 0 ) );
}
@@ -775,7 +775,7 @@ void KABCore::editContact( const QString &uid )
// for calls with given uid, as done from commandline and DCOP
// addressbook may not be reloaded yet, as done asynchronously, so wait
else while ( !mAddressBook->loadingHasFinished() ) {
- QApplication::eventLoop()->processEvents( QEventLoop::ExcludeUserInput );
+ TQApplication::eventLoop()->processEvents( TQEventLoop::ExcludeUserInput );
// use sleep here to reduce cpu usage
usleep( 100 );
}
@@ -806,18 +806,18 @@ void KABCore::editContact( const QString &uid )
void KABCore::copySelectedContactToResource()
{
- storeContactIn( QString(), true /*copy*/);
+ storeContactIn( TQString(), true /*copy*/);
}
void KABCore::moveSelectedContactToResource()
{
- storeContactIn( QString(), false /*copy*/);
+ storeContactIn( TQString(), false /*copy*/);
}
-void KABCore::storeContactIn( const QString &uid, bool copy /*false*/ )
+void KABCore::storeContactIn( const TQString &uid, bool copy /*false*/ )
{
// First, locate the contact entry
- QStringList uidList;
+ TQStringList uidList;
if ( uid.isNull() ) {
uidList = mViewManager->selectedUids();
} else {
@@ -828,8 +828,8 @@ void KABCore::storeContactIn( const QString &uid, bool copy /*false*/ )
return;
KABLock::self( mAddressBook )->lock( resource );
- QStringList::Iterator it( uidList.begin() );
- const QStringList::Iterator endIt( uidList.end() );
+ TQStringList::Iterator it( uidList.begin() );
+ const TQStringList::Iterator endIt( uidList.end() );
while ( it != endIt ) {
KABC::Addressee addr = mAddressBook->findByUid( *it++ );
if ( !addr.isEmpty() ) {
@@ -855,8 +855,8 @@ void KABCore::storeContactIn( const QString &uid, bool copy /*false*/ )
void KABCore::save()
{
- QPtrList<KABC::Resource> resources = mAddressBook->resources();
- QPtrListIterator<KABC::Resource> it( resources );
+ TQPtrList<KABC::Resource> resources = mAddressBook->resources();
+ TQPtrListIterator<KABC::Resource> it( resources );
while ( it.current() && !it.current()->readOnly() ) {
KABC::Ticket *ticket = mAddressBook->requestSaveTicket( it.current() );
if ( ticket ) {
@@ -922,33 +922,33 @@ void KABCore::extensionModified( const KABC::Addressee::List &list )
}
}
-void KABCore::extensionDeleted( const QStringList &uidList )
+void KABCore::extensionDeleted( const TQStringList &uidList )
{
DeleteCommand *command = new DeleteCommand( mAddressBook, uidList );
mCommandHistory->addCommand( command );
// now if we deleted anything, refresh
- setContactSelected( QString::null );
+ setContactSelected( TQString::null );
setModified( true );
}
-QString KABCore::getNameByPhone( const QString &phone )
+TQString KABCore::getNameByPhone( const TQString &phone )
{
#if KDE_IS_VERSION(3,4,89)
// This ugly hack will be removed in 4.0
// addressbook may not be reloaded yet, as done asynchronously, so wait
while ( !mAddressBook->loadingHasFinished() ) {
- QApplication::eventLoop()->processEvents( QEventLoop::ExcludeUserInput );
+ TQApplication::eventLoop()->processEvents( TQEventLoop::ExcludeUserInput );
// use sleep here to reduce cpu usage
usleep( 100 );
}
#endif
- QRegExp r( "[/*/-/ ]" );
- QString localPhone( phone );
+ TQRegExp r( "[/*/-/ ]" );
+ TQString localPhone( phone );
bool found = false;
- QString ownerName = "";
+ TQString ownerName = "";
KABC::PhoneNumber::List phoneList;
KABC::AddressBook::ConstIterator iter;
@@ -981,10 +981,10 @@ void KABCore::openLDAPDialog()
if ( !mLdapSearchDialog ) {
mLdapSearchDialog = new LDAPSearchDialog( mAddressBook, this, mWidget );
- connect( mLdapSearchDialog, SIGNAL( addresseesAdded() ),
- SLOT( addressBookChanged() ) );
- connect( mLdapSearchDialog, SIGNAL( addresseesAdded() ),
- SLOT( setModified() ) );
+ connect( mLdapSearchDialog, TQT_SIGNAL( addresseesAdded() ),
+ TQT_SLOT( addressBookChanged() ) );
+ connect( mLdapSearchDialog, TQT_SIGNAL( addresseesAdded() ),
+ TQT_SLOT( setModified() ) );
} else
mLdapSearchDialog->restoreSettings();
@@ -998,8 +998,8 @@ void KABCore::configure()
saveSettings();
KCMultiDialog dlg( mWidget, "", true );
- connect( &dlg, SIGNAL( configCommitted() ),
- this, SLOT( configurationChanged() ) );
+ connect( &dlg, TQT_SIGNAL( configCommitted() ),
+ this, TQT_SLOT( configurationChanged() ) );
dlg.addModule( "kabconfig.desktop" );
dlg.addModule( "kabldapconfig.desktop" );
@@ -1023,7 +1023,7 @@ void KABCore::print()
wizard.exec();
}
-void KABCore::detailsHighlighted( const QString &msg )
+void KABCore::detailsHighlighted( const TQString &msg )
{
if ( mStatusBar ) {
if ( !mStatusBar->hasItem( 2 ) )
@@ -1033,9 +1033,9 @@ void KABCore::detailsHighlighted( const QString &msg )
}
}
-void KABCore::showContactsAddress( const QString &addrUid )
+void KABCore::showContactsAddress( const TQString &addrUid )
{
- QStringList uidList = mViewManager->selectedUids();
+ TQStringList uidList = mViewManager->selectedUids();
if ( uidList.isEmpty() )
return;
@@ -1064,8 +1064,8 @@ bool KABCore::queryClose()
saveSettings();
KABPrefs::instance()->writeConfig();
- QPtrList<KABC::Resource> resources = mAddressBook->resources();
- QPtrListIterator<KABC::Resource> it( resources );
+ TQPtrList<KABC::Resource> resources = mAddressBook->resources();
+ TQPtrListIterator<KABC::Resource> it( resources );
while ( it.current() ) {
it.current()->close();
++it;
@@ -1085,7 +1085,7 @@ void KABCore::delayedAddressBookChanged()
void KABCore::addressBookChanged()
{
- const QStringList selectedUids = mViewManager->selectedUids();
+ const TQStringList selectedUids = mViewManager->selectedUids();
mAddressBookChangedTimer->stop();
@@ -1094,9 +1094,9 @@ void KABCore::addressBookChanged()
mSearchManager->reload();
- mViewManager->setSelected( QString::null, false );
+ mViewManager->setSelected( TQString::null, false );
- QString uid = QString::null;
+ TQString uid = TQString::null;
if ( !selectedUids.isEmpty() ) {
uid = selectedUids.first();
mViewManager->setSelected( uid, true );
@@ -1107,132 +1107,132 @@ void KABCore::addressBookChanged()
updateCategories();
}
-AddresseeEditorDialog *KABCore::createAddresseeEditorDialog( QWidget *parent,
+AddresseeEditorDialog *KABCore::createAddresseeEditorDialog( TQWidget *parent,
const char *name )
{
AddresseeEditorDialog *dialog = new AddresseeEditorDialog( this, parent,
name ? name : "editorDialog" );
- connect( dialog, SIGNAL( contactModified( const KABC::Addressee& ) ),
- SLOT( contactModified( const KABC::Addressee& ) ) );
- connect( dialog, SIGNAL( editorDestroyed( const QString& ) ),
- SLOT( slotEditorDestroyed( const QString& ) ) );
+ connect( dialog, TQT_SIGNAL( contactModified( const KABC::Addressee& ) ),
+ TQT_SLOT( contactModified( const KABC::Addressee& ) ) );
+ connect( dialog, TQT_SIGNAL( editorDestroyed( const TQString& ) ),
+ TQT_SLOT( slotEditorDestroyed( const TQString& ) ) );
return dialog;
}
-void KABCore::activateDetailsWidget( QWidget *widget )
+void KABCore::activateDetailsWidget( TQWidget *widget )
{
if ( mDetailsStack->visibleWidget() == widget )
return;
mDetailsStack->raiseWidget( widget );
}
-void KABCore::deactivateDetailsWidget( QWidget *widget )
+void KABCore::deactivateDetailsWidget( TQWidget *widget )
{
if ( mDetailsStack->visibleWidget() != widget )
return;
mDetailsStack->raiseWidget( mDetailsWidget );
}
-void KABCore::slotEditorDestroyed( const QString &uid )
+void KABCore::slotEditorDestroyed( const TQString &uid )
{
AddresseeEditorDialog *dialog = mEditorDict.take( uid );
KABC::Addressee addr = dialog->addressee();
if ( !addr.resource()->readOnly() ) {
- QApplication::setOverrideCursor( Qt::waitCursor );
+ TQApplication::setOverrideCursor( Qt::waitCursor );
KABLock::self( mAddressBook )->unlock( addr.resource() );
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
}
}
void KABCore::initGUI()
{
- QVBoxLayout *topLayout = new QVBoxLayout( mWidget, 0, 0 );
+ TQVBoxLayout *topLayout = new TQVBoxLayout( mWidget, 0, 0 );
KToolBar* searchTB = new KToolBar( mWidget, "search toolbar");
searchTB->boxLayout()->setSpacing( KDialog::spacingHint() );
mIncSearchWidget = new IncSearchWidget( searchTB, "kde toolbar widget");
searchTB->setStretchableWidget( mIncSearchWidget );
- connect( mIncSearchWidget, SIGNAL( doSearch( const QString& ) ),
- SLOT( incrementalTextSearch( const QString& ) ) );
+ connect( mIncSearchWidget, TQT_SIGNAL( doSearch( const TQString& ) ),
+ TQT_SLOT( incrementalTextSearch( const TQString& ) ) );
- mDetailsSplitter = new QSplitter( mWidget );
+ mDetailsSplitter = new TQSplitter( mWidget );
- mLeftSplitter = new QSplitter( mDetailsSplitter );
+ mLeftSplitter = new TQSplitter( mDetailsSplitter );
mLeftSplitter->setOrientation( KABPrefs::instance()->contactListAboveExtensions() ? Qt::Vertical : Qt::Horizontal );
topLayout->addWidget( searchTB );
topLayout->addWidget( mDetailsSplitter );
- mDetailsStack = new QWidgetStack( mDetailsSplitter );
- mExtensionManager = new ExtensionManager( new QWidget( mLeftSplitter ), mDetailsStack, this, this );
- connect( mExtensionManager, SIGNAL( detailsWidgetDeactivated( QWidget* ) ),
- this, SLOT( deactivateDetailsWidget( QWidget* ) ) );
- connect( mExtensionManager, SIGNAL( detailsWidgetActivated( QWidget* ) ),
- this, SLOT( activateDetailsWidget( QWidget* ) ) );
+ mDetailsStack = new TQWidgetStack( mDetailsSplitter );
+ mExtensionManager = new ExtensionManager( new TQWidget( mLeftSplitter ), mDetailsStack, this, this );
+ connect( mExtensionManager, TQT_SIGNAL( detailsWidgetDeactivated( TQWidget* ) ),
+ this, TQT_SLOT( deactivateDetailsWidget( TQWidget* ) ) );
+ connect( mExtensionManager, TQT_SIGNAL( detailsWidgetActivated( TQWidget* ) ),
+ this, TQT_SLOT( activateDetailsWidget( TQWidget* ) ) );
- QWidget *viewWidget = new QWidget( mLeftSplitter );
+ TQWidget *viewWidget = new TQWidget( mLeftSplitter );
if ( KABPrefs::instance()->contactListAboveExtensions() )
mLeftSplitter->moveToFirst( viewWidget );
- QVBoxLayout *viewLayout = new QVBoxLayout( viewWidget );
+ TQVBoxLayout *viewLayout = new TQVBoxLayout( viewWidget );
viewLayout->setSpacing( KDialog::spacingHint() );
- mViewHeaderLabel = new QLabel( viewWidget );
-// mViewHeaderLabel->setSizePolicy( QSizePolicy::Minimum, QSizePolicy::Fixed );
+ mViewHeaderLabel = new TQLabel( viewWidget );
+// mViewHeaderLabel->setSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Fixed );
mViewHeaderLabel->setText( i18n( "Contacts" ) );
viewLayout->addWidget( mViewHeaderLabel );
mViewManager = new ViewManager( this, viewWidget );
viewLayout->addWidget( mViewManager, 1 );
#ifdef KDEPIM_NEW_DISTRLISTS
- mDistListButtonWidget = new QWidget( viewWidget );
- QHBoxLayout *buttonLayout = new QHBoxLayout( mDistListButtonWidget );
+ mDistListButtonWidget = new TQWidget( viewWidget );
+ TQHBoxLayout *buttonLayout = new TQHBoxLayout( mDistListButtonWidget );
buttonLayout->setSpacing( KDialog::spacingHint() );
buttonLayout->addStretch( 1 );
KPushButton *addDistListButton = new KPushButton( mDistListButtonWidget );
addDistListButton->setText( i18n( "Add" ) );
- connect( addDistListButton, SIGNAL( clicked() ),
- this, SLOT( editSelectedDistributionList() ) );
+ connect( addDistListButton, TQT_SIGNAL( clicked() ),
+ this, TQT_SLOT( editSelectedDistributionList() ) );
buttonLayout->addWidget( addDistListButton );
mDistListButtonWidget->setShown( false );
viewLayout->addWidget( mDistListButtonWidget );
KPushButton *removeDistListButton = new KPushButton( mDistListButtonWidget );
removeDistListButton->setText( i18n( "Remove" ) );
- connect( removeDistListButton, SIGNAL( clicked() ),
- this, SLOT( removeSelectedContactsFromDistList() ) );
+ connect( removeDistListButton, TQT_SIGNAL( clicked() ),
+ this, TQT_SLOT( removeSelectedContactsFromDistList() ) );
buttonLayout->addWidget( removeDistListButton );
#endif
mFilterSelectionWidget = new FilterSelectionWidget( searchTB , "kde toolbar widget" );
mViewManager->setFilterSelectionWidget( mFilterSelectionWidget );
- connect( mFilterSelectionWidget, SIGNAL( filterActivated( int ) ),
- mViewManager, SLOT( setActiveFilter( int ) ) );
+ connect( mFilterSelectionWidget, TQT_SIGNAL( filterActivated( int ) ),
+ mViewManager, TQT_SLOT( setActiveFilter( int ) ) );
- mDetailsWidget = new QWidget( mDetailsSplitter );
- mDetailsLayout = new QHBoxLayout( mDetailsWidget );
+ mDetailsWidget = new TQWidget( mDetailsSplitter );
+ mDetailsLayout = new TQHBoxLayout( mDetailsWidget );
- mDetailsPage = new QWidget( mDetailsWidget );
+ mDetailsPage = new TQWidget( mDetailsWidget );
mDetailsLayout->addWidget( mDetailsPage );
- QHBoxLayout *detailsPageLayout = new QHBoxLayout( mDetailsPage, 0, 0 );
+ TQHBoxLayout *detailsPageLayout = new TQHBoxLayout( mDetailsPage, 0, 0 );
mDetailsViewer = new KPIM::AddresseeView( mDetailsPage );
- mDetailsViewer->setVScrollBarMode( QScrollView::Auto );
+ mDetailsViewer->setVScrollBarMode( TQScrollView::Auto );
detailsPageLayout->addWidget( mDetailsViewer );
mDistListEntryView = new KAB::DistributionListEntryView( this, mWidget );
- connect( mDistListEntryView, SIGNAL( distributionListClicked( const QString& ) ),
- this, SLOT( sendMailToDistributionList( const QString& ) ) );
+ connect( mDistListEntryView, TQT_SIGNAL( distributionListClicked( const TQString& ) ),
+ this, TQT_SLOT( sendMailToDistributionList( const TQString& ) ) );
mDetailsStack->addWidget( mDistListEntryView );
mDetailsStack->addWidget( mDetailsWidget );
mDetailsStack->raiseWidget( mDetailsWidget );
mDetailsSplitter->moveToLast( mDetailsStack );
- connect( mDetailsViewer, SIGNAL( addressClicked( const QString&) ),
- this, SLOT( showContactsAddress( const QString& ) ) );
+ connect( mDetailsViewer, TQT_SIGNAL( addressClicked( const TQString&) ),
+ this, TQT_SLOT( showContactsAddress( const TQString& ) ) );
topLayout->setStretchFactor( mDetailsSplitter, 1 );
@@ -1247,62 +1247,62 @@ void KABCore::createJumpButtonBar()
mDetailsLayout->addWidget( mJumpButtonBar );
mDetailsLayout->setStretchFactor( mJumpButtonBar, 1 );
- connect( mJumpButtonBar, SIGNAL( jumpToLetter( const QString& ) ),
- SLOT( incrementalJumpButtonSearch( const QString& ) ) );
- connect( mViewManager, SIGNAL( sortFieldChanged() ),
- mJumpButtonBar, SLOT( updateButtons() ) );
+ connect( mJumpButtonBar, TQT_SIGNAL( jumpToLetter( const TQString& ) ),
+ TQT_SLOT( incrementalJumpButtonSearch( const TQString& ) ) );
+ connect( mViewManager, TQT_SIGNAL( sortFieldChanged() ),
+ mJumpButtonBar, TQT_SLOT( updateButtons() ) );
}
void KABCore::initActions()
{
- connect( QApplication::clipboard(), SIGNAL( dataChanged() ),
- SLOT( clipboardDataChanged() ) );
+ connect( TQApplication::clipboard(), TQT_SIGNAL( dataChanged() ),
+ TQT_SLOT( clipboardDataChanged() ) );
KAction *action;
// file menu
mActionMail = new KAction( i18n( "&Send Email to Contact..." ), "mail_send", 0,
- this, SLOT( sendMail() ), actionCollection(), "file_mail" );
- action = KStdAction::print( this, SLOT( print() ), actionCollection() );
+ this, TQT_SLOT( sendMail() ), actionCollection(), "file_mail" );
+ action = KStdAction::print( this, TQT_SLOT( print() ), actionCollection() );
mActionMail->setWhatsThis( i18n( "Send a mail to all selected contacts." ) );
action->setWhatsThis( i18n( "Print a special number of contacts." ) );
mActionSave = KStdAction::save( this,
- SLOT( save() ), actionCollection(), "file_sync" );
+ TQT_SLOT( save() ), actionCollection(), "file_sync" );
mActionSave->setWhatsThis( i18n( "Save all changes of the address book to the storage backend." ) );
action = new KAction( i18n( "&New Contact..." ), "identity", CTRL+Key_N, this,
- SLOT( newContact() ), actionCollection(), "file_new_contact" );
+ TQT_SLOT( newContact() ), actionCollection(), "file_new_contact" );
action->setWhatsThis( i18n( "Create a new contact<p>You will be presented with a dialog where you can add all data about a person, including addresses and phone numbers." ) );
action = new KAction( i18n( "&New Distribution List..." ), "kontact_contacts", 0, this,
- SLOT( newDistributionList() ), actionCollection(), "file_new_distributionlist" );
+ TQT_SLOT( newDistributionList() ), actionCollection(), "file_new_distributionlist" );
action->setWhatsThis( i18n( "Create a new distribution list<p>You will be presented with a dialog where you can create a new distribution list." ) );
mActionMailVCard = new KAction( i18n("Send &Contact..."), "mail_post_to", 0,
- this, SLOT( mailVCard() ),
+ this, TQT_SLOT( mailVCard() ),
actionCollection(), "file_mail_vcard" );
mActionMailVCard->setWhatsThis( i18n( "Send a mail with the selected contact as attachment." ) );
mActionChat = new KAction( i18n("Chat &With..."), 0,
- this, SLOT( startChat() ),
+ this, TQT_SLOT( startChat() ),
actionCollection(), "file_chat" );
mActionChat->setWhatsThis( i18n( "Start a chat with the selected contact." ) );
mActionEditAddressee = new KAction( i18n( "&Edit Contact..." ), "edit", 0,
- this, SLOT( editContact() ),
+ this, TQT_SLOT( editContact() ),
actionCollection(), "file_properties" );
mActionEditAddressee->setWhatsThis( i18n( "Edit a contact<p>You will be presented with a dialog where you can change all data about a person, including addresses and phone numbers." ) );
mActionMerge = new KAction( i18n( "&Merge Contacts" ), "", 0,
- this, SLOT( mergeContacts() ),
+ this, TQT_SLOT( mergeContacts() ),
actionCollection(), "edit_merge" );
// edit menu
- mActionCopy = KStdAction::copy( this, SLOT( copyContacts() ), actionCollection() );
- mActionCut = KStdAction::cut( this, SLOT( cutContacts() ), actionCollection() );
- mActionPaste = KStdAction::paste( this, SLOT( pasteContacts() ), actionCollection() );
- action = KStdAction::selectAll( this, SLOT( selectAllContacts() ), actionCollection() );
+ mActionCopy = KStdAction::copy( this, TQT_SLOT( copyContacts() ), actionCollection() );
+ mActionCut = KStdAction::cut( this, TQT_SLOT( cutContacts() ), actionCollection() );
+ mActionPaste = KStdAction::paste( this, TQT_SLOT( pasteContacts() ), actionCollection() );
+ action = KStdAction::selectAll( this, TQT_SLOT( selectAllContacts() ), actionCollection() );
mActionCopy->setWhatsThis( i18n( "Copy the currently selected contact(s) to system clipboard in vCard format." ) );
mActionCut->setWhatsThis( i18n( "Cuts the currently selected contact(s) to system clipboard in vCard format." ) );
mActionPaste->setWhatsThis( i18n( "Paste the previously cut or copied contacts from clipboard." ) );
@@ -1311,19 +1311,19 @@ void KABCore::initActions()
// mActionRedo->setWhatsThis( i18n( "Redoes the last <b>Cut</b>, <b>Copy</b> or <b>Paste</b>." ) );
mActionDelete = new KAction( i18n( "&Delete Contact" ), "editdelete",
- Key_Delete, this, SLOT( deleteContacts() ),
+ Key_Delete, this, TQT_SLOT( deleteContacts() ),
actionCollection(), "edit_delete" );
mActionDelete->setWhatsThis( i18n( "Delete all selected contacts." ) );
mActionCopyAddresseeTo = new KAction( i18n( "&Copy Contact To..." ), "", 0,
- this, SLOT( copySelectedContactToResource() ),
+ this, TQT_SLOT( copySelectedContactToResource() ),
actionCollection(), "copy_contact_to" );
- const QString copyMoveWhatsThis = i18n( "Store a contact in a different Addressbook<p>You will be presented with a dialog where you can select a new storage place for this contact." );
+ const TQString copyMoveWhatsThis = i18n( "Store a contact in a different Addressbook<p>You will be presented with a dialog where you can select a new storage place for this contact." );
mActionCopyAddresseeTo->setWhatsThis( copyMoveWhatsThis );
mActionMoveAddresseeTo = new KAction( i18n( "M&ove Contact To..." ), "", 0,
- this, SLOT( moveSelectedContactToResource() ),
+ this, TQT_SLOT( moveSelectedContactToResource() ),
actionCollection(), "move_contact_to" );
mActionMoveAddresseeTo->setWhatsThis( copyMoveWhatsThis );
@@ -1332,41 +1332,41 @@ void KABCore::initActions()
actionCollection(), "options_show_jump_bar" );
mActionJumpBar->setWhatsThis( i18n( "Toggle whether the jump button bar shall be visible." ) );
mActionJumpBar->setCheckedState( i18n( "Hide Jump Bar") );
- connect( mActionJumpBar, SIGNAL( toggled( bool ) ), SLOT( setJumpButtonBarVisible( bool ) ) );
+ connect( mActionJumpBar, TQT_SIGNAL( toggled( bool ) ), TQT_SLOT( setJumpButtonBarVisible( bool ) ) );
mActionDetails = new KToggleAction( i18n( "Show Details" ), 0, 0,
actionCollection(), "options_show_details" );
mActionDetails->setWhatsThis( i18n( "Toggle whether the details page shall be visible." ) );
mActionDetails->setCheckedState( i18n( "Hide Details") );
- connect( mActionDetails, SIGNAL( toggled( bool ) ), SLOT( setDetailsVisible( bool ) ) );
+ connect( mActionDetails, TQT_SIGNAL( toggled( bool ) ), TQT_SLOT( setDetailsVisible( bool ) ) );
if ( mIsPart )
action = new KAction( i18n( "&Configure Address Book..." ), "configure", 0,
- this, SLOT( configure() ), actionCollection(),
+ this, TQT_SLOT( configure() ), actionCollection(),
"kaddressbook_configure" );
else
- action = KStdAction::preferences( this, SLOT( configure() ), actionCollection() );
+ action = KStdAction::preferences( this, TQT_SLOT( configure() ), actionCollection() );
action->setWhatsThis( i18n( "You will be presented with a dialog, that offers you all possibilities to configure KAddressBook." ) );
// misc
action = new KAction( i18n( "&Lookup Addresses in LDAP Directory..." ), "find", 0,
- this, SLOT( openLDAPDialog() ), actionCollection(), "ldap_lookup" );
+ this, TQT_SLOT( openLDAPDialog() ), actionCollection(), "ldap_lookup" );
action->setWhatsThis( i18n( "Search for contacts on a LDAP server<p>You will be presented with a dialog, where you can search for contacts and select the ones you want to add to your local address book." ) );
mActionWhoAmI = new KAction( i18n( "Set as Personal Contact Data" ), "personal", 0, this,
- SLOT( setWhoAmI() ), actionCollection(),
+ TQT_SLOT( setWhoAmI() ), actionCollection(),
"edit_set_personal" );
mActionWhoAmI->setWhatsThis( i18n( "Set the personal contact<p>The data of this contact will be used in many other KDE applications, so you do not have to input your personal data several times." ) );
mActionCategories = new KAction( i18n( "Select Categories..." ), 0, this,
- SLOT( setCategories() ), actionCollection(),
+ TQT_SLOT( setCategories() ), actionCollection(),
"edit_set_categories" );
mActionCategories->setWhatsThis( i18n( "Set the categories for all selected contacts." ) );
KAction *clearLocation = new KAction( i18n( "Clear Search Bar" ),
- QApplication::reverseLayout() ? "clear_left" : "locationbar_erase",
- CTRL+Key_L, this, SLOT( slotClearSearchBar() ), actionCollection(), "clear_search" );
+ TQApplication::reverseLayout() ? "clear_left" : "locationbar_erase",
+ CTRL+Key_L, this, TQT_SLOT( slotClearSearchBar() ), actionCollection(), "clear_search" );
clearLocation->setWhatsThis( i18n( "Clear Search Bar<p>"
"Clears the content of the quick search bar." ) );
@@ -1376,7 +1376,7 @@ void KABCore::initActions()
void KABCore::clipboardDataChanged()
{
if ( mReadWrite )
- mActionPaste->setEnabled( !QApplication::clipboard()->text().isEmpty() );
+ mActionPaste->setEnabled( !TQApplication::clipboard()->text().isEmpty() );
}
void KABCore::updateIncSearchWidget()
@@ -1386,12 +1386,12 @@ void KABCore::updateIncSearchWidget()
void KABCore::updateCategories()
{
- QStringList categories( allCategories() );
+ TQStringList categories( allCategories() );
categories.sort();
- const QStringList customCategories( KABPrefs::instance()->customCategories() );
- QStringList::ConstIterator it;
- const QStringList::ConstIterator endIt( customCategories.end() );
+ const TQStringList customCategories( KABPrefs::instance()->customCategories() );
+ TQStringList::ConstIterator it;
+ const TQStringList::ConstIterator endIt( customCategories.end() );
for ( it = customCategories.begin(); it != endIt; ++it ) {
if ( categories.find( *it ) == categories.end() ) {
categories.append( *it );
@@ -1405,10 +1405,10 @@ void KABCore::updateCategories()
mCategoryEditDialog->reload();
}
-QStringList KABCore::allCategories() const
+TQStringList KABCore::allCategories() const
{
- QStringList categories, allCategories;
- QStringList::ConstIterator catIt;
+ TQStringList categories, allCategories;
+ TQStringList::ConstIterator catIt;
// Avoid crash on exit
if ( !mAddressBook ) {
@@ -1419,7 +1419,7 @@ QStringList KABCore::allCategories() const
const KABC::AddressBook::ConstIterator endIt( mAddressBook->end() );
for ( it = mAddressBook->begin(); it != endIt; ++it ) {
categories = (*it).categories();
- const QStringList::ConstIterator catEndIt( categories.end() );
+ const TQStringList::ConstIterator catEndIt( categories.end() );
for ( catIt = categories.begin(); catIt != catEndIt; ++catIt ) {
if ( !allCategories.contains( *catIt ) )
allCategories.append( *catIt );
@@ -1434,34 +1434,34 @@ void KABCore::setCategories()
// Show the category dialog
if ( mCategorySelectDialog == 0 ) {
mCategorySelectDialog = new KPIM::CategorySelectDialog( KABPrefs::instance(), mWidget );
- connect( mCategorySelectDialog, SIGNAL( categoriesSelected( const QStringList& ) ),
- SLOT( categoriesSelected( const QStringList& ) ) );
- connect( mCategorySelectDialog, SIGNAL( editCategories() ), SLOT( editCategories() ) );
+ connect( mCategorySelectDialog, TQT_SIGNAL( categoriesSelected( const TQStringList& ) ),
+ TQT_SLOT( categoriesSelected( const TQStringList& ) ) );
+ connect( mCategorySelectDialog, TQT_SIGNAL( editCategories() ), TQT_SLOT( editCategories() ) );
}
mCategorySelectDialog->show();
mCategorySelectDialog->raise();
}
-void KABCore::categoriesSelected( const QStringList &categories )
+void KABCore::categoriesSelected( const TQStringList &categories )
{
bool merge = false;
- QString msg = i18n( "Merge with existing categories?" );
- if ( KMessageBox::questionYesNo( mWidget, msg, QString::null, i18n( "Merge" ), i18n( "Do Not Merge" ) ) == KMessageBox::Yes )
+ TQString msg = i18n( "Merge with existing categories?" );
+ if ( KMessageBox::questionYesNo( mWidget, msg, TQString::null, i18n( "Merge" ), i18n( "Do Not Merge" ) ) == KMessageBox::Yes )
merge = true;
- QStringList uids = mViewManager->selectedUids();
- QStringList::ConstIterator it;
- const QStringList::ConstIterator endIt( uids.end() );
+ TQStringList uids = mViewManager->selectedUids();
+ TQStringList::ConstIterator it;
+ const TQStringList::ConstIterator endIt( uids.end() );
for ( it = uids.begin(); it != endIt; ++it ) {
KABC::Addressee addr = mAddressBook->findByUid( *it );
if ( !addr.isEmpty() ) {
if ( !merge )
addr.setCategories( categories );
else {
- QStringList addrCategories = addr.categories();
- QStringList::ConstIterator catIt;
- const QStringList::ConstIterator catEndIt( categories.end() );
+ TQStringList addrCategories = addr.categories();
+ TQStringList::ConstIterator catIt;
+ const TQStringList::ConstIterator catEndIt( categories.end() );
for ( catIt = categories.begin(); catIt != catEndIt; ++catIt ) {
if ( !addrCategories.contains( *catIt ) )
addrCategories.append( *catIt );
@@ -1481,8 +1481,8 @@ void KABCore::editCategories()
{
if ( mCategoryEditDialog == 0 ) {
mCategoryEditDialog = new KPIM::CategoryEditDialog( KABPrefs::instance(), mWidget );
- connect( mCategoryEditDialog, SIGNAL( categoryConfigChanged() ),
- mCategorySelectDialog, SLOT( updateCategoryConfig() ) );
+ connect( mCategoryEditDialog, TQT_SIGNAL( categoryConfigChanged() ),
+ mCategorySelectDialog, TQT_SLOT( updateCategoryConfig() ) );
}
mCategoryEditDialog->show();
@@ -1498,7 +1498,7 @@ void KABCore::slotClearSearchBar()
void KABCore::slotContactsUpdated()
{
if ( mStatusBar ) {
- QString msg( i18n( "%n contact matches", "%n contacts matching", mSearchManager->contacts().count() ) );
+ TQString msg( i18n( "%n contact matches", "%n contacts matching", mSearchManager->contacts().count() ) );
if ( !mStatusBar->hasItem( 1 ) )
mStatusBar->insertItem( msg, 1 );
else
@@ -1511,14 +1511,14 @@ void KABCore::slotContactsUpdated()
bool KABCore::handleCommandLine( KAddressBookIface* iface )
{
KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
- QCString addrStr = args->getOption( "addr" );
- QCString uidStr = args->getOption( "uid" );
+ TQCString addrStr = args->getOption( "addr" );
+ TQCString uidStr = args->getOption( "uid" );
- QString addr, uid, vcard;
+ TQString addr, uid, vcard;
if ( !addrStr.isEmpty() )
- addr = QString::fromLocal8Bit( addrStr );
+ addr = TQString::fromLocal8Bit( addrStr );
if ( !uidStr.isEmpty() )
- uid = QString::fromLocal8Bit( uidStr );
+ uid = TQString::fromLocal8Bit( uidStr );
bool doneSomething = false;
@@ -1553,10 +1553,10 @@ void KABCore::removeSelectedContactsFromDistList()
KPIM::DistributionList dist = KPIM::DistributionList::findByName( addressBook(), mSelectedDistributionList );
if ( dist.isEmpty() )
return;
- const QStringList uids = selectedUIDs();
+ const TQStringList uids = selectedUIDs();
if ( uids.isEmpty() )
return;
- for ( QStringList::ConstIterator it = uids.begin(); it != uids.end(); ++it ) {
+ for ( TQStringList::ConstIterator it = uids.begin(); it != uids.end(); ++it ) {
dist.removeEntry ( *it );
}
addressBook()->insertAddressee( dist );
@@ -1564,14 +1564,14 @@ void KABCore::removeSelectedContactsFromDistList()
#endif
}
-void KABCore::sendMailToDistributionList( const QString &name )
+void KABCore::sendMailToDistributionList( const TQString &name )
{
#ifdef KDEPIM_NEW_DISTRLISTS
KPIM::DistributionList dist = KPIM::DistributionList::findByName( addressBook(), name );
if ( dist.isEmpty() )
return;
typedef KPIM::DistributionList::Entry::List EntryList;
- QStringList mails;
+ TQStringList mails;
const EntryList entries = dist.entries( addressBook() );
for ( EntryList::ConstIterator it = entries.begin(); it != entries.end(); ++it )
mails += (*it).addressee.fullEmail( (*it).email );
@@ -1587,7 +1587,7 @@ void KABCore::editSelectedDistributionList()
}
-void KABCore::editDistributionList( const QString &name )
+void KABCore::editDistributionList( const TQString &name )
{
#ifdef KDEPIM_NEW_DISTRLISTS
editDistributionList( KPIM::DistributionList::findByName( addressBook(), name ) );
@@ -1596,7 +1596,7 @@ void KABCore::editDistributionList( const QString &name )
#ifdef KDEPIM_NEW_DISTRLISTS
-void KABCore::showDistributionListEntry( const QString& uid )
+void KABCore::showDistributionListEntry( const TQString& uid )
{
KPIM::DistributionList dist = KPIM::DistributionList::findByName( addressBook(), mSelectedDistributionList );
if ( !dist.isEmpty() ) {
@@ -1616,9 +1616,9 @@ void KABCore::editDistributionList( const KPIM::DistributionList &dist )
{
if ( dist.isEmpty() )
return;
- QGuardedPtr<KPIM::DistributionListEditor::EditorWidget> dlg = new KPIM::DistributionListEditor::EditorWidget( addressBook(), widget() );
+ TQGuardedPtr<KPIM::DistributionListEditor::EditorWidget> dlg = new KPIM::DistributionListEditor::EditorWidget( addressBook(), widget() );
dlg->setDistributionList( dist );
- if ( dlg->exec() == QDialog::Accepted && dlg ) {
+ if ( dlg->exec() == TQDialog::Accepted && dlg ) {
const KPIM::DistributionList newDist = dlg->distributionList();
if ( newDist != dist ) {
addressBook()->insertAddressee( newDist );
@@ -1634,7 +1634,7 @@ KPIM::DistributionList::List KABCore::distributionLists() const
return mSearchManager->distributionLists();
}
-void KABCore::setSelectedDistributionList( const QString &name )
+void KABCore::setSelectedDistributionList( const TQString &name )
{
mSelectedDistributionList = name;
mSearchManager->setSelectedDistributionList( name );
@@ -1642,14 +1642,14 @@ void KABCore::setSelectedDistributionList( const QString &name )
mDistListButtonWidget->setShown( !mSelectedDistributionList.isNull() );
if ( !name.isNull() ) {
mDetailsStack->raiseWidget( mDistListEntryView );
- const QStringList selectedUids = selectedUIDs();
- showDistributionListEntry( selectedUids.isEmpty() ? QString() : selectedUids.first() );
+ const TQStringList selectedUids = selectedUIDs();
+ showDistributionListEntry( selectedUids.isEmpty() ? TQString() : selectedUids.first() );
}
else
mDetailsStack->raiseWidget( mExtensionManager->activeDetailsWidget() ? mExtensionManager->activeDetailsWidget() : mDetailsWidget );
}
-QStringList KABCore::distributionListNames() const
+TQStringList KABCore::distributionListNames() const
{
return mSearchManager->distributionListNames();
}
diff --git a/kaddressbook/kabcore.h b/kaddressbook/kabcore.h
index 8cb2bc4d5..ed6b4ab5f 100644
--- a/kaddressbook/kabcore.h
+++ b/kaddressbook/kabcore.h
@@ -26,9 +26,9 @@
#include <kabc/field.h>
-#include <qdict.h>
-#include <qlabel.h>
-#include <qwidget.h>
+#include <tqdict.h>
+#include <tqlabel.h>
+#include <tqwidget.h>
#include "core.h"
#include <kdepimmacros.h>
@@ -82,8 +82,8 @@ class KDE_EXPORT KABCore : public KAB::Core
Q_OBJECT
public:
- KABCore( KXMLGUIClient *client, bool readWrite, QWidget *parent,
- const QString &file = QString::null, const char *name = 0 );
+ KABCore( KXMLGUIClient *client, bool readWrite, TQWidget *parent,
+ const TQString &file = TQString::null, const char *name = 0 );
~KABCore();
/**
@@ -120,19 +120,19 @@ class KDE_EXPORT KABCore : public KAB::Core
/**
Returns the uid list of the currently selected contacts.
*/
- QStringList selectedUIDs() const;
+ TQStringList selectedUIDs() const;
/**
Displays the ResourceSelectDialog and returns the selected
resource or a null pointer if no resource was selected by
the user.
*/
- KABC::Resource *requestResource( QWidget *parent );
+ KABC::Resource *requestResource( TQWidget *parent );
/**
Returns the parent widget.
*/
- QWidget *widget() const;
+ TQWidget *widget() const;
static KAboutData *createAboutData();
@@ -153,20 +153,20 @@ class KDE_EXPORT KABCore : public KAB::Core
/**
Returns the name of all the distribution lists.
*/
- virtual QStringList distributionListNames() const;
+ virtual TQStringList distributionListNames() const;
/**
sets the distribution list to display. If null, the regular
address book is to be displayed.
*/
- virtual void setSelectedDistributionList( const QString &name );
+ virtual void setSelectedDistributionList( const TQString &name );
#endif
public slots:
/**
Is called whenever a contact is selected in the view.
*/
- void setContactSelected( const QString &uid );
+ void setContactSelected( const TQString &uid );
/**
Opens the preferred mail composer with all selected contacts as
@@ -178,11 +178,11 @@ class KDE_EXPORT KABCore : public KAB::Core
Opens the preferred mail composer with the given contacts as
arguments.
*/
- void sendMail( const QString& email );
+ void sendMail( const TQString& email );
void mailVCard();
- void mailVCard(const QStringList& uids);
+ void mailVCard(const TQStringList& uids);
/**
* Start an Instant Messaging chat with the selected contacts
@@ -192,7 +192,7 @@ class KDE_EXPORT KABCore : public KAB::Core
/**
Starts the preferred web browser with the given URL as argument.
*/
- void browse( const QString& url );
+ void browse( const TQString& url );
/**
Select all contacts in the view.
@@ -209,14 +209,14 @@ class KDE_EXPORT KABCore : public KAB::Core
@param uids The uids of the contacts, which shall be deleted.
*/
- void deleteContacts( const QStringList &uids );
+ void deleteContacts( const TQStringList &uids );
/**
Deletes given distribution lists from the address book.
@param uids The names of the distribution lists which shall be deleted.
*/
- void deleteDistributionLists( const QStringList &names );
+ void deleteDistributionLists( const TQStringList &names );
/**
@@ -263,9 +263,9 @@ class KDE_EXPORT KABCore : public KAB::Core
Search with the current search field for a contact, that matches
the given text, and selects it in the view.
*/
- void incrementalTextSearch( const QString& text );
+ void incrementalTextSearch( const TQString& text );
- void incrementalJumpButtonSearch( const QString& characters );
+ void incrementalJumpButtonSearch( const TQString& characters );
/**
Marks the address book as modified.
@@ -291,7 +291,7 @@ class KDE_EXPORT KABCore : public KAB::Core
/**
DCOP METHOD: Adds the given email address to address book.
*/
- virtual void addEmail( const QString& addr );
+ virtual void addEmail( const TQString& addr );
/**
DCOP METHOD: Imports the vCard, located at the given url.
@@ -301,7 +301,7 @@ class KDE_EXPORT KABCore : public KAB::Core
/**
DCOP METHOD: Imports the given vCard.
*/
- virtual void importVCardFromData( const QString& vCard );
+ virtual void importVCardFromData( const TQString& vCard );
/**
DCOP METHOD: Opens contact editor to input a new contact.
@@ -317,7 +317,7 @@ class KDE_EXPORT KABCore : public KAB::Core
DCOP METHOD: Returns the name of the contact, that matches the given
phone number.
*/
- virtual QString getNameByPhone( const QString& phone );
+ virtual TQString getNameByPhone( const TQString& phone );
/**
DCOP METHOD: Handle command line arguments, return true if handled
@@ -332,16 +332,16 @@ class KDE_EXPORT KABCore : public KAB::Core
void save();
/**
- Shows the edit dialog for the given uid. If the uid is QString::null,
+ Shows the edit dialog for the given uid. If the uid is TQString::null,
the method will try to find a selected addressee in the view.
*/
- void editContact( const QString &uid = QString::null );
+ void editContact( const TQString &uid = TQString::null );
/**
* Let the user chose a different resource for the selected contacts.
* If the adding to the new resource is successfull, the contact is
* removed from the old one, unless the Copy flag is given. */
- void storeContactIn( const QString &uid = QString::null, bool copy = false );
+ void storeContactIn( const TQString &uid = TQString::null, bool copy = false );
/**
* Lets the user chose a different resource for the selected contacts and
@@ -371,9 +371,9 @@ class KDE_EXPORT KABCore : public KAB::Core
*/
void print();
- void detailsHighlighted( const QString& );
+ void detailsHighlighted( const TQString& );
- void showContactsAddress( const QString &uid );
+ void showContactsAddress( const TQString &uid );
void configurationChanged();
@@ -388,7 +388,7 @@ class KDE_EXPORT KABCore : public KAB::Core
#ifdef KDEPIM_NEW_DISTRLISTS
void editDistributionList( const KPIM::DistributionList &list );
- void showDistributionListEntry( const QString &uid );
+ void showDistributionListEntry( const TQString &uid );
#endif
private slots:
@@ -396,27 +396,27 @@ class KDE_EXPORT KABCore : public KAB::Core
void setDetailsVisible( bool visible );
void extensionModified( const KABC::Addressee::List &list );
- void extensionDeleted( const QStringList &uidList );
+ void extensionDeleted( const TQStringList &uidList );
void clipboardDataChanged();
void updateIncSearchWidget();
- void slotEditorDestroyed( const QString &uid );
+ void slotEditorDestroyed( const TQString &uid );
void delayedAddressBookChanged();
void addressBookChanged();
- void categoriesSelected( const QStringList& );
+ void categoriesSelected( const TQStringList& );
void editCategories();
void slotClearSearchBar();
void slotContactsUpdated();
- void activateDetailsWidget( QWidget *widget );
- void deactivateDetailsWidget( QWidget *widget );
+ void activateDetailsWidget( TQWidget *widget );
+ void deactivateDetailsWidget( TQWidget *widget );
- void editDistributionList( const QString &name );
+ void editDistributionList( const TQString &name );
void removeSelectedContactsFromDistList();
void editSelectedDistributionList();
- void sendMailToDistributionList( const QString &id );
+ void sendMailToDistributionList( const TQString &id );
private:
void initGUI();
@@ -424,21 +424,21 @@ class KDE_EXPORT KABCore : public KAB::Core
void initActions();
void updateCategories();
- QStringList allCategories() const;
+ TQStringList allCategories() const;
- AddresseeEditorDialog *createAddresseeEditorDialog( QWidget *parent,
+ AddresseeEditorDialog *createAddresseeEditorDialog( TQWidget *parent,
const char *name = 0 );
- QWidget *mWidget;
+ TQWidget *mWidget;
KABC::AddressBook *mAddressBook;
KStatusBar *mStatusBar;
ViewManager *mViewManager;
- QLabel *mViewHeaderLabel;
+ TQLabel *mViewHeaderLabel;
#ifdef KDEPIM_NEW_DISTRLISTS
- QString mSelectedDistributionList;
- QWidget *mDistListButtonWidget;
+ TQString mSelectedDistributionList;
+ TQWidget *mDistListButtonWidget;
#endif
ExtensionManager *mExtensionManager;
@@ -451,20 +451,20 @@ class KDE_EXPORT KABCore : public KAB::Core
KPIM::AddresseeView *mDetailsViewer;
KPIM::CategorySelectDialog *mCategorySelectDialog;
KPIM::CategoryEditDialog *mCategoryEditDialog;
- QWidget *mDetailsPage;
- QWidget *mDetailsWidget;
- QHBoxLayout *mDetailsLayout;
- QSplitter *mDetailsSplitter;
- QSplitter *mLeftSplitter;
- QWidgetStack *mDetailsStack;
+ TQWidget *mDetailsPage;
+ TQWidget *mDetailsWidget;
+ TQHBoxLayout *mDetailsLayout;
+ TQSplitter *mDetailsSplitter;
+ TQSplitter *mLeftSplitter;
+ TQWidgetStack *mDetailsStack;
LDAPSearchDialog *mLdapSearchDialog;
- QDict<AddresseeEditorDialog> mEditorDict;
+ TQDict<AddresseeEditorDialog> mEditorDict;
bool mReadWrite;
bool mModified;
bool mIsPart;
- QTimer *mAddressBookChangedTimer;
+ TQTimer *mAddressBookChangedTimer;
KAction *mActionPaste;
KAction *mActionCut;
diff --git a/kaddressbook/kablock.h b/kaddressbook/kablock.h
index d75d963af..a90f77c94 100644
--- a/kaddressbook/kablock.h
+++ b/kaddressbook/kablock.h
@@ -51,7 +51,7 @@ class KABLock
private:
static KABLock *mSelf;
- QMap<KABC::Resource*, LockEntry> mLocks;
+ TQMap<KABC::Resource*, LockEntry> mLocks;
KABC::AddressBook *mAddressBook;
};
diff --git a/kaddressbook/kabtools.cpp b/kaddressbook/kabtools.cpp
index c3b1d05bc..ba3b886f0 100644
--- a/kaddressbook/kabtools.cpp
+++ b/kaddressbook/kabtools.cpp
@@ -27,14 +27,14 @@
#include <kdebug.h>
#include <ktempdir.h>
-#include <qfile.h>
+#include <tqfile.h>
#include "kabtools.h"
-static QString uniqueFileName( const KABC::Addressee &addressee, QStringList &existingFiles )
+static TQString uniqueFileName( const KABC::Addressee &addressee, TQStringList &existingFiles )
{
- QString name;
- QString uniquePart;
+ TQString name;
+ TQString uniquePart;
uint number = 0;
do {
@@ -43,7 +43,7 @@ static QString uniqueFileName( const KABC::Addressee &addressee, QStringList &ex
name.replace( '/', '_' );
++number;
- uniquePart = QString( "_%1" ).arg( number );
+ uniquePart = TQString( "_%1" ).arg( number );
} while ( existingFiles.contains( name ) );
existingFiles.append( name );
@@ -51,7 +51,7 @@ static QString uniqueFileName( const KABC::Addressee &addressee, QStringList &ex
return name;
}
-void KABTools::mailVCards( const QStringList &uids, KABC::AddressBook *ab )
+void KABTools::mailVCards( const TQStringList &uids, KABC::AddressBook *ab )
{
KURL::List urls;
@@ -61,29 +61,29 @@ void KABTools::mailVCards( const QStringList &uids, KABC::AddressBook *ab )
return;
}
- QStringList existingFiles;
- QStringList::ConstIterator it( uids.begin() );
- const QStringList::ConstIterator endIt( uids.end() );
+ TQStringList existingFiles;
+ TQStringList::ConstIterator it( uids.begin() );
+ const TQStringList::ConstIterator endIt( uids.end() );
for ( ; it != endIt; ++it ) {
KABC::Addressee addressee = ab->findByUid( *it );
if ( addressee.isEmpty() )
continue;
- QString fileName = uniqueFileName( addressee, existingFiles );
+ TQString fileName = uniqueFileName( addressee, existingFiles );
- QString path = tempDir.name() + "/" + fileName;
+ TQString path = tempDir.name() + "/" + fileName;
- QFile file( path );
+ TQFile file( path );
if ( file.open( IO_WriteOnly ) ) {
KABC::VCardConverter converter;
KABC::Addressee::List list;
list.append( addressee );
- QString vcard = converter.createVCards( list, KABC::VCardConverter::v3_0 );
+ TQString vcard = converter.createVCards( list, KABC::VCardConverter::v3_0 );
- QTextStream t( &file );
- t.setEncoding( QTextStream::UnicodeUTF8 );
+ TQTextStream t( &file );
+ t.setEncoding( TQTextStream::UnicodeUTF8 );
t << vcard;
file.close();
@@ -94,10 +94,10 @@ void KABTools::mailVCards( const QStringList &uids, KABC::AddressBook *ab )
}
}
- kapp->invokeMailer( QString::null, QString::null, QString::null,
- QString::null,
- QString::null,
- QString::null,
+ kapp->invokeMailer( TQString::null, TQString::null, TQString::null,
+ TQString::null,
+ TQString::null,
+ TQString::null,
urls.toStringList() );
}
@@ -147,11 +147,11 @@ KABC::Addressee KABTools::mergeContacts( const KABC::Addressee::List &list )
masterAddressee.setBirthday( (*contactIt).birthday() );
// CATEGORIES
- const QStringList categories = (*contactIt).categories();
- const QStringList masterCategories = masterAddressee.categories();
- QStringList newCategories( masterCategories );
- QStringList::ConstIterator it( categories.begin() );
- QStringList::ConstIterator endIt( categories.end() );
+ const TQStringList categories = (*contactIt).categories();
+ const TQStringList masterCategories = masterAddressee.categories();
+ TQStringList newCategories( masterCategories );
+ TQStringList::ConstIterator it( categories.begin() );
+ TQStringList::ConstIterator endIt( categories.end() );
for ( it = categories.begin(); it != endIt; ++it )
if ( !masterCategories.contains( *it ) )
newCategories.append( *it );
@@ -162,8 +162,8 @@ KABC::Addressee KABTools::mergeContacts( const KABC::Addressee::List &list )
masterAddressee.setSecrecy( (*contactIt).secrecy() );
// EMAIL
- const QStringList emails = (*contactIt).emails();
- const QStringList masterEmails = masterAddressee.emails();
+ const TQStringList emails = (*contactIt).emails();
+ const TQStringList masterEmails = masterAddressee.emails();
endIt = emails.end();
for ( it = emails.begin(); it != endIt; ++it )
if ( !masterEmails.contains( *it ) )
@@ -254,9 +254,9 @@ KABC::Addressee KABTools::mergeContacts( const KABC::Addressee::List &list )
masterAddressee.setUrl( (*contactIt).url() );
// X-
- const QStringList customs = (*contactIt).customs();
- const QStringList masterCustoms = masterAddressee.customs();
- QStringList newCustoms( masterCustoms );
+ const TQStringList customs = (*contactIt).customs();
+ const TQStringList masterCustoms = masterAddressee.customs();
+ TQStringList newCustoms( masterCustoms );
endIt = customs.end();
for ( it = customs.begin(); it != endIt; ++it )
if ( !masterCustoms.contains( *it ) )
diff --git a/kaddressbook/kabtools.h b/kaddressbook/kabtools.h
index 5cf402925..0d57c65eb 100644
--- a/kaddressbook/kabtools.h
+++ b/kaddressbook/kabtools.h
@@ -34,7 +34,7 @@ class KABTools
/**
Sends a mail with vCards as attachments for all given UIDs.
*/
- static void mailVCards( const QStringList &uids, KABC::AddressBook *ab );
+ static void mailVCards( const TQStringList &uids, KABC::AddressBook *ab );
/**
Merges all passed contacts to a single one.
diff --git a/kaddressbook/kaddressbook_part.cpp b/kaddressbook/kaddressbook_part.cpp
index f2a23ec4f..3acb85aab 100644
--- a/kaddressbook/kaddressbook_part.cpp
+++ b/kaddressbook/kaddressbook_part.cpp
@@ -21,7 +21,7 @@
without including the source code for Qt in the source distribution.
*/
-#include <qlayout.h>
+#include <tqlayout.h>
#include <kaction.h>
#include <kapplication.h>
@@ -42,19 +42,19 @@
typedef KParts::GenericFactory< KAddressbookPart > KAddressbookFactory;
K_EXPORT_COMPONENT_FACTORY( libkaddressbookpart, KAddressbookFactory )
-KAddressbookPart::KAddressbookPart( QWidget *parentWidget, const char *widgetName,
- QObject *parent, const char *name,
- const QStringList & )
+KAddressbookPart::KAddressbookPart( TQWidget *parentWidget, const char *widgetName,
+ TQObject *parent, const char *name,
+ const TQStringList & )
: DCOPObject( "KAddressBookIface" ), KParts::ReadOnlyPart( parent, name )
{
setInstance( KAddressbookFactory::instance() );
// create a canvas to insert our widget
- QWidget *canvas = new QWidget( parentWidget, widgetName );
- canvas->setFocusPolicy( QWidget::ClickFocus );
+ TQWidget *canvas = new TQWidget( parentWidget, widgetName );
+ canvas->setFocusPolicy( TQWidget::ClickFocus );
setWidget( canvas );
- QVBoxLayout *topLayout = new QVBoxLayout( canvas );
+ TQVBoxLayout *topLayout = new TQVBoxLayout( canvas );
KGlobal::iconLoader()->addAppDir( "kaddressbook" );
@@ -82,7 +82,7 @@ KAboutData *KAddressbookPart::createAboutData()
return KABCore::createAboutData();
}
-void KAddressbookPart::addEmail( QString addr )
+void KAddressbookPart::addEmail( TQString addr )
{
mCore->addEmail( addr );
}
@@ -92,12 +92,12 @@ void KAddressbookPart::importVCard( const KURL& url )
mCore->importVCard( url );
}
-void KAddressbookPart::importVCardFromData( const QString& vCard )
+void KAddressbookPart::importVCardFromData( const TQString& vCard )
{
mCore->importVCardFromData( vCard );
}
-ASYNC KAddressbookPart::showContactEditor( QString uid )
+ASYNC KAddressbookPart::showContactEditor( TQString uid )
{
mCore->editContact( uid );
}
@@ -113,7 +113,7 @@ void KAddressbookPart::newDistributionList()
mCore->newDistributionList();
}
-QString KAddressbookPart::getNameByPhone( QString phone )
+TQString KAddressbookPart::getNameByPhone( TQString phone )
{
return mCore->getNameByPhone( phone );
}
@@ -168,11 +168,11 @@ void KAddressbookPart::guiActivateEvent( KParts::GUIActivateEvent *e )
}
}
-void KAddressbookPart::loadProfile( const QString& )
+void KAddressbookPart::loadProfile( const TQString& )
{
}
-void KAddressbookPart::saveToProfile( const QString& ) const
+void KAddressbookPart::saveToProfile( const TQString& ) const
{
}
diff --git a/kaddressbook/kaddressbook_part.h b/kaddressbook/kaddressbook_part.h
index da1fbf6fc..43691f7e4 100644
--- a/kaddressbook/kaddressbook_part.h
+++ b/kaddressbook/kaddressbook_part.h
@@ -39,22 +39,22 @@ class KAddressbookPart: public KParts::ReadOnlyPart, virtual public KAddressBook
Q_OBJECT
public:
- KAddressbookPart( QWidget *parentWidget, const char *widgetName,
- QObject *parent, const char *name, const QStringList& );
+ KAddressbookPart( TQWidget *parentWidget, const char *widgetName,
+ TQObject *parent, const char *name, const TQStringList& );
virtual ~KAddressbookPart();
static KAboutData *createAboutData();
- virtual void saveToProfile( const QString& path ) const;
- virtual void loadProfile( const QString& path );
+ virtual void saveToProfile( const TQString& path ) const;
+ virtual void loadProfile( const TQString& path );
public slots:
- virtual void addEmail( QString addr );
+ virtual void addEmail( TQString addr );
virtual void importVCard( const KURL& url );
- virtual void importVCardFromData( const QString& vCard );
- virtual ASYNC showContactEditor( QString uid );
+ virtual void importVCardFromData( const TQString& vCard );
+ virtual ASYNC showContactEditor( TQString uid );
virtual void newContact();
virtual void newDistributionList();
- virtual QString getNameByPhone( QString phone );
+ virtual TQString getNameByPhone( TQString phone );
virtual void save();
virtual void exit();
virtual bool openURL( const KURL &url );
diff --git a/kaddressbook/kaddressbookiface.h b/kaddressbook/kaddressbookiface.h
index 914cd0299..448955e81 100644
--- a/kaddressbook/kaddressbookiface.h
+++ b/kaddressbook/kaddressbookiface.h
@@ -26,7 +26,7 @@
#include <dcopobject.h>
#include <kurl.h>
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include <kdepimmacros.h>
class KDE_EXPORT KAddressBookIface : virtual public DCOPObject
@@ -34,11 +34,11 @@ class KDE_EXPORT KAddressBookIface : virtual public DCOPObject
K_DCOP
k_dcop:
- virtual void addEmail( QString addr ) = 0;
+ virtual void addEmail( TQString addr ) = 0;
virtual void importVCard( const KURL& url ) = 0;
- virtual void importVCardFromData( const QString& vCard ) = 0;
+ virtual void importVCardFromData( const TQString& vCard ) = 0;
- virtual ASYNC showContactEditor( QString uid ) = 0;
+ virtual ASYNC showContactEditor( TQString uid ) = 0;
/**
Shows dialog for creation of a new contact. Returns once a contact
@@ -55,7 +55,7 @@ class KDE_EXPORT KAddressBookIface : virtual public DCOPObject
/**
Save changes to the address book files.
*/
- virtual QString getNameByPhone( QString phone ) = 0;
+ virtual TQString getNameByPhone( TQString phone ) = 0;
virtual void save() = 0;
virtual void exit() = 0;
@@ -65,8 +65,8 @@ class KDE_EXPORT KAddressBookIface : virtual public DCOPObject
*/
virtual bool handleCommandLine() = 0;
- virtual void loadProfile( const QString& path ) = 0;
- virtual void saveToProfile( const QString& path ) const = 0;
+ virtual void loadProfile( const TQString& path ) = 0;
+ virtual void saveToProfile( const TQString& path ) const = 0;
};
#endif
diff --git a/kaddressbook/kaddressbookmain.cpp b/kaddressbook/kaddressbookmain.cpp
index a3a145b3c..7f521a0c6 100644
--- a/kaddressbook/kaddressbookmain.cpp
+++ b/kaddressbook/kaddressbookmain.cpp
@@ -34,7 +34,7 @@
#include "kaddressbookmain.h"
-KAddressBookMain::KAddressBookMain( const QString &file )
+KAddressBookMain::KAddressBookMain( const TQString &file )
: DCOPObject( "KAddressBookIface" ), KMainWindow( 0 )
{
// Set this to be the group leader for all subdialogs - this means
@@ -79,7 +79,7 @@ KAddressBookMain::~KAddressBookMain()
mCore->saveSettings();
}
-void KAddressBookMain::addEmail( QString addr )
+void KAddressBookMain::addEmail( TQString addr )
{
mCore->addEmail( addr );
}
@@ -89,12 +89,12 @@ void KAddressBookMain::importVCard( const KURL& url )
mCore->importVCard( url );
}
-void KAddressBookMain::importVCardFromData( const QString& vCard )
+void KAddressBookMain::importVCardFromData( const TQString& vCard )
{
mCore->importVCardFromData( vCard );
}
-ASYNC KAddressBookMain::showContactEditor( QString uid )
+ASYNC KAddressBookMain::showContactEditor( TQString uid )
{
mCore->editContact( uid );
}
@@ -109,7 +109,7 @@ void KAddressBookMain::newContact()
mCore->newContact();
}
-QString KAddressBookMain::getNameByPhone( QString phone )
+TQString KAddressBookMain::getNameByPhone( TQString phone )
{
return mCore->getNameByPhone( phone );
}
@@ -144,13 +144,13 @@ bool KAddressBookMain::queryClose()
void KAddressBookMain::initActions()
{
- KStdAction::quit( this, SLOT( close() ), actionCollection() );
+ KStdAction::quit( this, TQT_SLOT( close() ), actionCollection() );
KAction *action;
- action = KStdAction::keyBindings( this, SLOT( configureKeyBindings() ), actionCollection() );
+ action = KStdAction::keyBindings( this, TQT_SLOT( configureKeyBindings() ), actionCollection() );
action->setWhatsThis( i18n( "You will be presented with a dialog, where you can configure the application wide shortcuts." ) );
- KStdAction::configureToolbars( this, SLOT( configureToolbars() ), actionCollection() );
+ KStdAction::configureToolbars( this, TQT_SLOT( configureToolbars() ), actionCollection() );
}
void KAddressBookMain::configureKeyBindings()
@@ -158,11 +158,11 @@ void KAddressBookMain::configureKeyBindings()
KKeyDialog::configure( actionCollection(), this );
}
-void KAddressBookMain::loadProfile( const QString& )
+void KAddressBookMain::loadProfile( const TQString& )
{
}
-void KAddressBookMain::saveToProfile( const QString& ) const
+void KAddressBookMain::saveToProfile( const TQString& ) const
{
}
@@ -171,8 +171,8 @@ void KAddressBookMain::configureToolbars()
saveMainWindowSettings( KGlobal::config(), "MainWindow" );
KEditToolbar edit( factory() );
- connect( &edit, SIGNAL( newToolbarConfig() ),
- this, SLOT( newToolbarConfig() ) );
+ connect( &edit, TQT_SIGNAL( newToolbarConfig() ),
+ this, TQT_SLOT( newToolbarConfig() ) );
edit.exec();
}
diff --git a/kaddressbook/kaddressbookmain.h b/kaddressbook/kaddressbookmain.h
index 8c0e3c726..4c9f69fe6 100644
--- a/kaddressbook/kaddressbookmain.h
+++ b/kaddressbook/kaddressbookmain.h
@@ -24,7 +24,7 @@
#ifndef KADDRESSBOOKMAIN_H
#define KADDRESSBOOKMAIN_H
-#include <qptrlist.h>
+#include <tqptrlist.h>
#include <kaction.h>
#include <kapplication.h>
@@ -47,17 +47,17 @@ class KAddressBookMain : public KMainWindow, virtual public KAddressBookIface
Q_OBJECT
public:
- KAddressBookMain( const QString &file = QString::null );
+ KAddressBookMain( const TQString &file = TQString::null );
virtual ~KAddressBookMain();
public slots:
- virtual void addEmail( QString addr );
+ virtual void addEmail( TQString addr );
virtual void importVCard( const KURL& url );
- virtual void importVCardFromData( const QString& vCard );
- virtual ASYNC showContactEditor( QString uid );
+ virtual void importVCardFromData( const TQString& vCard );
+ virtual ASYNC showContactEditor( TQString uid );
virtual void newContact();
virtual void newDistributionList();
- virtual QString getNameByPhone( QString phone );
+ virtual TQString getNameByPhone( TQString phone );
virtual void save();
virtual void exit();
virtual bool handleCommandLine();
@@ -81,10 +81,10 @@ class KAddressBookMain : public KMainWindow, virtual public KAddressBookIface
virtual bool queryClose();
//override
- void loadProfile( const QString& path );
+ void loadProfile( const TQString& path );
//override
- void saveToProfile( const QString& path ) const;
+ void saveToProfile( const TQString& path ) const;
private slots:
void configureKeyBindings();
diff --git a/kaddressbook/kaddressbookservice.cpp b/kaddressbook/kaddressbookservice.cpp
index 3d8139e65..320e90998 100644
--- a/kaddressbook/kaddressbookservice.cpp
+++ b/kaddressbook/kaddressbookservice.cpp
@@ -30,7 +30,7 @@ KAddressBookService::KAddressBookService( KAB::Core *core )
{
}
-void KAddressBookService::importVCardFromData( const QString& vCard )
+void KAddressBookService::importVCardFromData( const TQString& vCard )
{
mCore->importVCardFromData( vCard );
}
diff --git a/kaddressbook/kaddressbookservice.h b/kaddressbook/kaddressbookservice.h
index 004a4733c..ac323f64f 100644
--- a/kaddressbook/kaddressbookservice.h
+++ b/kaddressbook/kaddressbookservice.h
@@ -40,7 +40,7 @@ class KAddressBookService : virtual public KPIM::AddressBookServiceIface
@param vCard The vCard in string representation.
*/
- void importVCardFromData( const QString& vCard );
+ void importVCardFromData( const TQString& vCard );
/**
This method will add a vcard to the address book.
diff --git a/kaddressbook/kaddressbookview.cpp b/kaddressbook/kaddressbookview.cpp
index 72e70675f..28fd81afd 100644
--- a/kaddressbook/kaddressbookview.cpp
+++ b/kaddressbook/kaddressbookview.cpp
@@ -21,8 +21,8 @@
without including the source code for Qt in the source distribution.
*/
-#include <qlayout.h>
-#include <qpopupmenu.h>
+#include <tqlayout.h>
+#include <tqpopupmenu.h>
#include <kabc/addressbook.h>
#include <kabc/distributionlistdialog.h>
@@ -37,14 +37,14 @@
#include "kaddressbookview.h"
-KAddressBookView::KAddressBookView( KAB::Core *core, QWidget *parent,
+KAddressBookView::KAddressBookView( KAB::Core *core, TQWidget *parent,
const char *name )
- : QWidget( parent, name ), mCore( core ), mFieldList()
+ : TQWidget( parent, name ), mCore( core ), mFieldList()
{
initGUI();
- connect( mCore->searchManager(), SIGNAL( contactsUpdated() ),
- SLOT( updateView() ) );
+ connect( mCore->searchManager(), TQT_SIGNAL( contactsUpdated() ),
+ TQT_SLOT( updateView() ) );
}
KAddressBookView::~KAddressBookView()
@@ -69,20 +69,20 @@ void KAddressBookView::writeConfig( KConfig* )
// Most of writing the config is handled by the ConfigureViewDialog
}
-QString KAddressBookView::selectedEmails()
+TQString KAddressBookView::selectedEmails()
{
bool first = true;
- QString emailAddrs;
- const QStringList uidList = selectedUids();
+ TQString emailAddrs;
+ const TQStringList uidList = selectedUids();
KABC::Addressee addr;
- QString email;
+ TQString email;
- QStringList::ConstIterator it;
+ TQStringList::ConstIterator it;
for ( it = uidList.begin(); it != uidList.end(); ++it ) {
addr = mCore->addressBook()->findByUid( *it );
if ( !addr.isEmpty() ) {
- QString m = QString::null;
+ TQString m = TQString::null;
if ( addr.emails().count() > 1 )
m = KABC::EmailSelector::getEmail( addr.emails(), addr.preferredEmail(), this );
@@ -122,10 +122,10 @@ KABC::Addressee::List KAddressBookView::addressees()
void KAddressBookView::initGUI()
{
// Create the layout
- QVBoxLayout *layout = new QVBoxLayout( this );
+ TQVBoxLayout *layout = new TQVBoxLayout( this );
// Add the view widget
- mViewWidget = new QWidget( this );
+ mViewWidget = new TQWidget( this );
layout->addWidget( mViewWidget );
}
@@ -144,7 +144,7 @@ KAddressBookView::DefaultFilterType KAddressBookView::defaultFilterType() const
return mDefaultFilterType;
}
-const QString &KAddressBookView::defaultFilterName() const
+const TQString &KAddressBookView::defaultFilterName() const
{
return mDefaultFilterName;
}
@@ -154,33 +154,33 @@ KAB::Core *KAddressBookView::core() const
return mCore;
}
-void KAddressBookView::popup( const QPoint &point )
+void KAddressBookView::popup( const TQPoint &point )
{
if ( !mCore->guiClient() ) {
kdWarning() << "No GUI client set!" << endl;
return;
}
- QPopupMenu *menu = static_cast<QPopupMenu*>( mCore->guiClient()->factory()->container( "RMBPopup",
+ TQPopupMenu *menu = static_cast<TQPopupMenu*>( mCore->guiClient()->factory()->container( "RMBPopup",
mCore->guiClient() ) );
if ( menu )
menu->popup( point );
}
-QWidget *KAddressBookView::viewWidget()
+TQWidget *KAddressBookView::viewWidget()
{
return mViewWidget;
}
void KAddressBookView::updateView()
{
- const QStringList uidList = selectedUids();
+ const TQStringList uidList = selectedUids();
refresh(); // This relists and deselects everything, in all views
if ( !uidList.isEmpty() ) {
// Keep previous selection
- QStringList::ConstIterator it, uidListEnd( uidList.end() );
+ TQStringList::ConstIterator it, uidListEnd( uidList.end() );
for ( it = uidList.begin(); it != uidListEnd; ++it )
setSelected( *it, true );
@@ -189,12 +189,12 @@ void KAddressBookView::updateView()
if ( !contacts.isEmpty() )
setFirstSelected( true );
else
- emit selected( QString::null );
+ emit selected( TQString::null );
}
}
ViewConfigureWidget *ViewFactory::configureWidget( KABC::AddressBook *ab,
- QWidget *parent,
+ TQWidget *parent,
const char *name )
{
return new ViewConfigureWidget( ab, parent, name );
diff --git a/kaddressbook/kaddressbookview.h b/kaddressbook/kaddressbookview.h
index 89ddca944..eb5e25156 100644
--- a/kaddressbook/kaddressbookview.h
+++ b/kaddressbook/kaddressbookview.h
@@ -26,8 +26,8 @@
#define KAB_VIEW_PLUGIN_VERSION 1
-#include <qstringlist.h>
-#include <qwidget.h>
+#include <tqstringlist.h>
+#include <tqwidget.h>
#include <kabc/field.h>
#include <klibloader.h>
@@ -60,14 +60,14 @@ class KDE_EXPORT KAddressBookView : public QWidget
public:
enum DefaultFilterType { None = 0, Active = 1, Specific = 2 };
- KAddressBookView( KAB::Core *core, QWidget *parent, const char *name );
+ KAddressBookView( KAB::Core *core, TQWidget *parent, const char *name );
virtual ~KAddressBookView();
/**
Must be overloaded in subclasses. Should return a list of
all the uids of selected contacts.
*/
- virtual QStringList selectedUids() = 0;
+ virtual TQStringList selectedUids() = 0;
/**
Called whenever this view should read the config. This can be used
@@ -98,17 +98,17 @@ class KDE_EXPORT KAddressBookView : public QWidget
virtual void writeConfig( KConfig * );
/**
- Returns a QString with all the selected email addresses concatenated
+ Returns a TQString with all the selected email addresses concatenated
together with a ',' seperator.
*/
- virtual QString selectedEmails();
+ virtual TQString selectedEmails();
/**
Return the type of the view: Icon, Table, etc. Please make sure that
this is the same value that ViewWrapper::type() will return for your
view.
*/
- virtual QString type() const = 0;
+ virtual TQString type() const = 0;
/**
Returns a list of the fields that should be displayed. The list
@@ -141,7 +141,7 @@ class KDE_EXPORT KAddressBookView : public QWidget
@return The name of the default filter. This string is
only valid if defaultFilterType() is returning SpecificFilter.
*/
- const QString &defaultFilterName() const;
+ const TQString &defaultFilterName() const;
/**
@return The Core object.
@@ -164,14 +164,14 @@ class KDE_EXPORT KAddressBookView : public QWidget
addressee with uid needs to be refreshed. This is an optimization
only.
*/
- virtual void refresh( const QString &uid = QString() ) = 0;
+ virtual void refresh( const TQString &uid = TQString() ) = 0;
/**
This method must be overloaded in subclasses. Select (highlight)
the addressee matching <i>uid</i>. If uid
- is equal to QString::null, then all addressees should be selected.
+ is equal to TQString::null, then all addressees should be selected.
*/
- virtual void setSelected( const QString &uid = QString(), bool selected = true ) = 0;
+ virtual void setSelected( const TQString &uid = TQString(), bool selected = true ) = 0;
/**
Selects the first contact in the view.
@@ -183,7 +183,7 @@ class KDE_EXPORT KAddressBookView : public QWidget
@param point The position where the menu shall appear.
*/
- void popup( const QPoint &point );
+ void popup( const TQPoint &point );
signals:
/**
@@ -203,7 +203,7 @@ class KDE_EXPORT KAddressBookView : public QWidget
@see KListView
*/
- void selected( const QString &uid );
+ void selected( const TQString &uid );
/**
This signal should be emitted by a subclass whenever an addressee
@@ -214,12 +214,12 @@ class KDE_EXPORT KAddressBookView : public QWidget
@see KListView
*/
- void executed( const QString &uid );
+ void executed( const TQString &uid );
/**
This signal is emitted whenever a user attempts to start a drag
in the view. The slot connected to this signal would usually want
- to create a QDragObject.
+ to create a TQDragObject.
*/
void startDrag();
@@ -228,7 +228,7 @@ class KDE_EXPORT KAddressBookView : public QWidget
view. The individual view should handle checking if the item is
droppable (ie: if it is a vcard).
*/
- void dropped( QDropEvent* );
+ void dropped( TQDropEvent* );
/**
This signal is emitted whenever the sort field changed.
@@ -255,7 +255,7 @@ class KDE_EXPORT KAddressBookView : public QWidget
'this', the view subclass has the option of placing other widgets
around the view (ie: search fields, etc). Do not delete this widget!
*/
- QWidget *viewWidget();
+ TQWidget *viewWidget();
private slots:
void updateView();
@@ -265,30 +265,30 @@ class KDE_EXPORT KAddressBookView : public QWidget
DefaultFilterType mDefaultFilterType;
Filter mFilter;
- QString mDefaultFilterName;
+ TQString mDefaultFilterName;
KAB::Core *mCore;
KABC::Field::List mFieldList;
- QWidget *mViewWidget;
+ TQWidget *mViewWidget;
};
class KDE_EXPORT ViewFactory : public KLibFactory
{
public:
- virtual KAddressBookView *view( KAB::Core *core, QWidget *parent,
+ virtual KAddressBookView *view( KAB::Core *core, TQWidget *parent,
const char *name = 0 ) = 0;
/**
@return The type of the view. This is normally a small one word
string (ie: Table, Icon, Tree, etc).
*/
- virtual QString type() const = 0;
+ virtual TQString type() const = 0;
/**
@return The description of the view. This should be a 3 to
4 line string (don't actually use return characters in the string)
describing the features offered by the view.
*/
- virtual QString description() const = 0;
+ virtual TQString description() const = 0;
/**
Creates a config dialog for the view type. The default
@@ -300,12 +300,12 @@ class KDE_EXPORT ViewFactory : public KLibFactory
<B>not</B> be called.
*/
virtual ViewConfigureWidget *configureWidget( KABC::AddressBook *ab,
- QWidget *parent,
+ TQWidget *parent,
const char *name = 0 );
protected:
- virtual QObject* createObject( QObject*, const char*, const char*,
- const QStringList & )
+ virtual TQObject* createObject( TQObject*, const char*, const char*,
+ const TQStringList & )
{
return 0;
}
diff --git a/kaddressbook/kcmconfigs/addhostdialog.cpp b/kaddressbook/kcmconfigs/addhostdialog.cpp
index b3eb60bcf..14abca147 100644
--- a/kaddressbook/kcmconfigs/addhostdialog.cpp
+++ b/kaddressbook/kcmconfigs/addhostdialog.cpp
@@ -21,11 +21,11 @@
without including the source code for Qt in the source distribution.
*/
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qpushbutton.h>
-#include <qspinbox.h>
-#include <qtooltip.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqpushbutton.h>
+#include <tqspinbox.h>
+#include <tqtooltip.h>
#include <kaccelmanager.h>
#include <kbuttonbox.h>
@@ -33,13 +33,13 @@
#include <klocale.h>
#include "addhostdialog.h"
-AddHostDialog::AddHostDialog( KPIM::LdapServer *server, QWidget* parent, const char* name )
+AddHostDialog::AddHostDialog( KPIM::LdapServer *server, TQWidget* parent, const char* name )
: KDialogBase( Plain, i18n( "Add Host" ), Ok | Cancel, Ok, parent, name, true, true )
{
mServer = server;
- QWidget *page = plainPage();
- QHBoxLayout *layout = new QHBoxLayout( page, marginHint(), spacingHint() );
+ TQWidget *page = plainPage();
+ TQHBoxLayout *layout = new TQHBoxLayout( page, marginHint(), spacingHint() );
mCfg = new KABC::LdapConfigWidget(
KABC::LdapConfigWidget::W_USER |
@@ -98,7 +98,7 @@ AddHostDialog::~AddHostDialog()
{
}
-void AddHostDialog::slotHostEditChanged( const QString &text )
+void AddHostDialog::slotHostEditChanged( const TQString &text )
{
enableButtonOK( !text.isEmpty() );
}
diff --git a/kaddressbook/kcmconfigs/addhostdialog.h b/kaddressbook/kcmconfigs/addhostdialog.h
index 84f5a0c9e..12d145f08 100644
--- a/kaddressbook/kcmconfigs/addhostdialog.h
+++ b/kaddressbook/kcmconfigs/addhostdialog.h
@@ -37,14 +37,14 @@ class AddHostDialog : public KDialogBase
Q_OBJECT
public:
- AddHostDialog( KPIM::LdapServer* server, QWidget* parent = 0, const char* name = 0 );
+ AddHostDialog( KPIM::LdapServer* server, TQWidget* parent = 0, const char* name = 0 );
~AddHostDialog();
signals:
void changed( bool );
private slots:
- void slotHostEditChanged( const QString& );
+ void slotHostEditChanged( const TQString& );
virtual void slotOk();
private:
KABC::LdapConfigWidget *mCfg;
diff --git a/kaddressbook/kcmconfigs/addresseewidget.cpp b/kaddressbook/kcmconfigs/addresseewidget.cpp
index 610b94b80..1c074d397 100644
--- a/kaddressbook/kcmconfigs/addresseewidget.cpp
+++ b/kaddressbook/kcmconfigs/addresseewidget.cpp
@@ -21,12 +21,12 @@
without including the source code for Qt in the source distribution.
*/
-#include <qcstring.h>
-#include <qgroupbox.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qlistbox.h>
-#include <qpushbutton.h>
+#include <tqcstring.h>
+#include <tqgroupbox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqlistbox.h>
+#include <tqpushbutton.h>
#include <dcopclient.h>
@@ -40,26 +40,26 @@
#include "addresseewidget.h"
-NamePartWidget::NamePartWidget( const QString &title, const QString &label,
- QWidget *parent, const char *name )
- : QWidget( parent, name ), mTitle( title ), mLabel( label )
+NamePartWidget::NamePartWidget( const TQString &title, const TQString &label,
+ TQWidget *parent, const char *name )
+ : TQWidget( parent, name ), mTitle( title ), mLabel( label )
{
- QHBoxLayout *layout = new QHBoxLayout( this );
+ TQHBoxLayout *layout = new TQHBoxLayout( this );
- QGroupBox *group = new QGroupBox( 0, Qt::Vertical, title, this );
- QGridLayout *groupLayout = new QGridLayout( group->layout(), 2, 2,
+ TQGroupBox *group = new TQGroupBox( 0, Qt::Vertical, title, this );
+ TQGridLayout *groupLayout = new TQGridLayout( group->layout(), 2, 2,
KDialog::spacingHint() );
- mBox = new QListBox( group );
- connect( mBox, SIGNAL( selectionChanged( QListBoxItem* ) ),
- SLOT( selectionChanged( QListBoxItem* ) ) );
+ mBox = new TQListBox( group );
+ connect( mBox, TQT_SIGNAL( selectionChanged( TQListBoxItem* ) ),
+ TQT_SLOT( selectionChanged( TQListBoxItem* ) ) );
groupLayout->addWidget( mBox, 0, 0 );
KButtonBox *bbox = new KButtonBox( group, Qt::Vertical );
- mAddButton = bbox->addButton( i18n( "Add..." ), this, SLOT( add() ) );
- mEditButton = bbox->addButton( i18n( "Edit..." ), this, SLOT( edit() ) );
+ mAddButton = bbox->addButton( i18n( "Add..." ), this, TQT_SLOT( add() ) );
+ mEditButton = bbox->addButton( i18n( "Edit..." ), this, TQT_SLOT( edit() ) );
mEditButton->setEnabled( false );
- mRemoveButton = bbox->addButton( i18n( "Remove" ), this, SLOT( remove() ) );
+ mRemoveButton = bbox->addButton( i18n( "Remove" ), this, TQT_SLOT( remove() ) );
mRemoveButton->setEnabled( false );
bbox->layout();
groupLayout->addWidget( bbox, 0, 1 );
@@ -71,15 +71,15 @@ NamePartWidget::~NamePartWidget()
{
}
-void NamePartWidget::setNameParts( const QStringList &list )
+void NamePartWidget::setNameParts( const TQStringList &list )
{
mBox->clear();
mBox->insertStringList( list );
}
-QStringList NamePartWidget::nameParts() const
+TQStringList NamePartWidget::nameParts() const
{
- QStringList parts;
+ TQStringList parts;
for ( uint i = 0; i < mBox->count(); ++i )
parts.append( mBox->text( i ) );
@@ -90,8 +90,8 @@ void NamePartWidget::add()
{
bool ok;
- QString namePart = KInputDialog::getText( i18n( "New" ), mLabel,
- QString::null, &ok );
+ TQString namePart = KInputDialog::getText( i18n( "New" ), mLabel,
+ TQString::null, &ok );
if ( ok && !namePart.isEmpty() ) {
mBox->insertItem( namePart );
emit modified();
@@ -106,7 +106,7 @@ void NamePartWidget::edit()
if ( index == -1 )
return;
- QString namePart = KInputDialog::getText( i18n( "Edit" ), mLabel,
+ TQString namePart = KInputDialog::getText( i18n( "Edit" ), mLabel,
mBox->text( index ), &ok );
if ( ok && !namePart.isEmpty() ) {
mBox->changeItem( namePart, index );
@@ -123,7 +123,7 @@ void NamePartWidget::remove()
emit modified();
}
-void NamePartWidget::selectionChanged( QListBoxItem *item )
+void NamePartWidget::selectionChanged( TQListBoxItem *item )
{
mEditButton->setEnabled( item != 0 );
mRemoveButton->setEnabled( item != 0 );
@@ -131,10 +131,10 @@ void NamePartWidget::selectionChanged( QListBoxItem *item )
-AddresseeWidget::AddresseeWidget( QWidget *parent, const char *name )
- : QWidget( parent, name )
+AddresseeWidget::AddresseeWidget( TQWidget *parent, const char *name )
+ : TQWidget( parent, name )
{
- QGridLayout *layout = new QGridLayout( this, 2, 3, KDialog::marginHint(),
+ TQGridLayout *layout = new TQGridLayout( this, 2, 3, KDialog::marginHint(),
KDialog::spacingHint() );
mPrefix = new NamePartWidget( i18n( "Prefixes"), i18n( "Enter prefix:" ), this );
@@ -146,7 +146,7 @@ AddresseeWidget::AddresseeWidget( QWidget *parent, const char *name )
mSuffix = new NamePartWidget( i18n( "Suffixes" ), i18n( "Enter suffix:" ), this );
layout->addWidget( mSuffix, 0, 2 );
- QLabel *label = new QLabel( i18n( "Default formatted name:" ), this );
+ TQLabel *label = new TQLabel( i18n( "Default formatted name:" ), this );
layout->addWidget( label, 1, 0 );
mFormattedNameCombo = new KComboBox( this );
@@ -157,10 +157,10 @@ AddresseeWidget::AddresseeWidget( QWidget *parent, const char *name )
mFormattedNameCombo->insertItem( i18n( "Reverse Name" ) );
layout->addMultiCellWidget( mFormattedNameCombo, 1, 1, 1, 2 );
- connect( mPrefix, SIGNAL( modified() ), SIGNAL( modified() ) );
- connect( mInclusion, SIGNAL( modified() ), SIGNAL( modified() ) );
- connect( mSuffix, SIGNAL( modified() ), SIGNAL( modified() ) );
- connect( mFormattedNameCombo, SIGNAL( activated( int ) ), SIGNAL( modified() ) );
+ connect( mPrefix, TQT_SIGNAL( modified() ), TQT_SIGNAL( modified() ) );
+ connect( mInclusion, TQT_SIGNAL( modified() ), TQT_SIGNAL( modified() ) );
+ connect( mSuffix, TQT_SIGNAL( modified() ), TQT_SIGNAL( modified() ) );
+ connect( mFormattedNameCombo, TQT_SIGNAL( activated( int ) ), TQT_SIGNAL( modified() ) );
}
AddresseeWidget::~AddresseeWidget()
@@ -196,7 +196,7 @@ void AddresseeWidget::saveSettings()
DCOPClient *client = DCOPClient::mainClient();
if ( client )
- client->emitDCOPSignal( "KABC::AddressBookConfig", "changed()", QByteArray() );
+ client->emitDCOPSignal( "KABC::AddressBookConfig", "changed()", TQByteArray() );
}
#include "addresseewidget.moc"
diff --git a/kaddressbook/kcmconfigs/addresseewidget.h b/kaddressbook/kcmconfigs/addresseewidget.h
index c942ee42b..9f4b4332a 100644
--- a/kaddressbook/kcmconfigs/addresseewidget.h
+++ b/kaddressbook/kcmconfigs/addresseewidget.h
@@ -24,7 +24,7 @@
#ifndef ADDRESSEEWIDGET_H
#define ADDRESSEEWIDGET_H
-#include <qwidget.h>
+#include <tqwidget.h>
class KComboBox;
class KLineEdit;
@@ -38,12 +38,12 @@ class NamePartWidget : public QWidget
Q_OBJECT
public:
- NamePartWidget( const QString &title, const QString &label, QWidget *parent,
+ NamePartWidget( const TQString &title, const TQString &label, TQWidget *parent,
const char *name = 0 );
~NamePartWidget();
- void setNameParts( const QStringList &list );
- QStringList nameParts() const;
+ void setNameParts( const TQStringList &list );
+ TQStringList nameParts() const;
signals:
void modified();
@@ -53,16 +53,16 @@ class NamePartWidget : public QWidget
void edit();
void remove();
- void selectionChanged( QListBoxItem* );
+ void selectionChanged( TQListBoxItem* );
private:
- QListBox *mBox;
- QPushButton *mAddButton;
- QPushButton *mEditButton;
- QPushButton *mRemoveButton;
+ TQListBox *mBox;
+ TQPushButton *mAddButton;
+ TQPushButton *mEditButton;
+ TQPushButton *mRemoveButton;
- QString mTitle;
- QString mLabel;
+ TQString mTitle;
+ TQString mLabel;
};
class AddresseeWidget : public QWidget
@@ -70,7 +70,7 @@ class AddresseeWidget : public QWidget
Q_OBJECT
public:
- AddresseeWidget( QWidget *parent, const char *name = 0 );
+ AddresseeWidget( TQWidget *parent, const char *name = 0 );
~AddresseeWidget();
void restoreSettings();
diff --git a/kaddressbook/kcmconfigs/extensionconfigdialog.cpp b/kaddressbook/kcmconfigs/extensionconfigdialog.cpp
index 70a8d1afc..80f73f469 100644
--- a/kaddressbook/kcmconfigs/extensionconfigdialog.cpp
+++ b/kaddressbook/kcmconfigs/extensionconfigdialog.cpp
@@ -21,7 +21,7 @@
without including the source code for Qt in the source distribution.
*/
-#include <qlayout.h>
+#include <tqlayout.h>
#include <klocale.h>
@@ -30,12 +30,12 @@
#include "extensionwidget.h"
ExtensionConfigDialog::ExtensionConfigDialog( KAB::ExtensionFactory *factory, KConfig *config,
- QWidget *parent, const char *name )
+ TQWidget *parent, const char *name )
: KDialogBase( Plain, i18n( "Extension Settings" ), Ok | Cancel, Ok, parent,
name, true, true ), mWidget( 0 ), mConfig( config )
{
- QFrame *page = plainPage();
- QGridLayout *layout = new QGridLayout( page, 1, 1, marginHint(), spacingHint() );
+ TQFrame *page = plainPage();
+ TQGridLayout *layout = new TQGridLayout( page, 1, 1, marginHint(), spacingHint() );
mWidget = factory->configureWidget( page, "ExtensionConfigWidget" );
layout->addWidget( mWidget, 0, 0 );
diff --git a/kaddressbook/kcmconfigs/extensionconfigdialog.h b/kaddressbook/kcmconfigs/extensionconfigdialog.h
index 1547647a9..34339fa01 100644
--- a/kaddressbook/kcmconfigs/extensionconfigdialog.h
+++ b/kaddressbook/kcmconfigs/extensionconfigdialog.h
@@ -38,7 +38,7 @@ class ExtensionConfigDialog : public KDialogBase
public:
ExtensionConfigDialog( KAB::ExtensionFactory *factory, KConfig *config,
- QWidget *parent, const char *name = 0 );
+ TQWidget *parent, const char *name = 0 );
~ExtensionConfigDialog();
protected slots:
diff --git a/kaddressbook/kcmconfigs/kabconfigwidget.cpp b/kaddressbook/kcmconfigs/kabconfigwidget.cpp
index 7c57a926c..e4fea7409 100644
--- a/kaddressbook/kcmconfigs/kabconfigwidget.cpp
+++ b/kaddressbook/kcmconfigs/kabconfigwidget.cpp
@@ -21,16 +21,16 @@
without including the source code for Qt in the source distribution.
*/
-#include <qcheckbox.h>
-#include <qframe.h>
-#include <qgroupbox.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qlineedit.h>
-#include <qpushbutton.h>
-#include <qtabwidget.h>
-#include <qtooltip.h>
-#include <qcombobox.h>
+#include <tqcheckbox.h>
+#include <tqframe.h>
+#include <tqgroupbox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqlineedit.h>
+#include <tqpushbutton.h>
+#include <tqtabwidget.h>
+#include <tqtooltip.h>
+#include <tqcombobox.h>
#include <kconfig.h>
#include <kdebug.h>
@@ -45,31 +45,31 @@
#include "kabconfigwidget.h"
-KABConfigWidget::KABConfigWidget( QWidget *parent, const char *name )
- : QWidget( parent, name )
+KABConfigWidget::KABConfigWidget( TQWidget *parent, const char *name )
+ : TQWidget( parent, name )
{
- QVBoxLayout *topLayout = new QVBoxLayout( this, 0,
+ TQVBoxLayout *topLayout = new TQVBoxLayout( this, 0,
KDialog::spacingHint() );
- QTabWidget *tabWidget = new QTabWidget( this );
+ TQTabWidget *tabWidget = new TQTabWidget( this );
topLayout->addWidget( tabWidget );
// General page
- QWidget *generalPage = new QWidget( this );
- QVBoxLayout *layout = new QVBoxLayout( generalPage, KDialog::marginHint(),
+ TQWidget *generalPage = new TQWidget( this );
+ TQVBoxLayout *layout = new TQVBoxLayout( generalPage, KDialog::marginHint(),
KDialog::spacingHint() );
- QGroupBox *groupBox = new QGroupBox( 0, Qt::Vertical, i18n( "General" ), generalPage );
- QBoxLayout *boxLayout = new QVBoxLayout( groupBox->layout() );
+ TQGroupBox *groupBox = new TQGroupBox( 0, Qt::Vertical, i18n( "General" ), generalPage );
+ TQBoxLayout *boxLayout = new TQVBoxLayout( groupBox->layout() );
boxLayout->setAlignment( Qt::AlignTop );
- mViewsSingleClickBox = new QCheckBox( i18n( "Honor KDE single click" ), groupBox, "msingle" );
+ mViewsSingleClickBox = new TQCheckBox( i18n( "Honor KDE single click" ), groupBox, "msingle" );
boxLayout->addWidget( mViewsSingleClickBox );
- mNameParsing = new QCheckBox( i18n( "Automatic name parsing for new addressees" ), groupBox, "mparse" );
+ mNameParsing = new TQCheckBox( i18n( "Automatic name parsing for new addressees" ), groupBox, "mparse" );
boxLayout->addWidget( mNameParsing );
- mTradeAsFamilyName = new QCheckBox( i18n( "Trade single name component as family name" ), groupBox, "mtrade" );
+ mTradeAsFamilyName = new TQCheckBox( i18n( "Trade single name component as family name" ), groupBox, "mtrade" );
boxLayout->addWidget( mTradeAsFamilyName );
/**
TODO: show the checkbox when we can compile agains kdelibs from HEAD, atm it
@@ -77,15 +77,15 @@ KABConfigWidget::KABConfigWidget( QWidget *parent, const char *name )
*/
mTradeAsFamilyName->hide();
- mLimitContactDisplay = new QCheckBox( i18n( "Limit unfiltered display to 100 contacts" ), groupBox, "mlimit" );
+ mLimitContactDisplay = new TQCheckBox( i18n( "Limit unfiltered display to 100 contacts" ), groupBox, "mlimit" );
boxLayout->addWidget( mLimitContactDisplay );
- QBoxLayout *editorLayout = new QHBoxLayout( boxLayout, KDialog::spacingHint() );
+ TQBoxLayout *editorLayout = new TQHBoxLayout( boxLayout, KDialog::spacingHint() );
- QLabel *label = new QLabel( i18n( "Addressee editor type:" ), groupBox );
+ TQLabel *label = new TQLabel( i18n( "Addressee editor type:" ), groupBox );
editorLayout->addWidget( label );
- mEditorCombo = new QComboBox( groupBox );
+ mEditorCombo = new TQComboBox( groupBox );
mEditorCombo->insertItem( i18n( "Full Editor" ) );
mEditorCombo->insertItem( i18n( "Simple Editor" ) );
label->setBuddy( mEditorCombo );
@@ -96,29 +96,29 @@ KABConfigWidget::KABConfigWidget( QWidget *parent, const char *name )
layout->addWidget( groupBox );
- groupBox = new QGroupBox( 0, Qt::Vertical, i18n( "Script-Hooks" ), generalPage );
- QGridLayout *grid = new QGridLayout( groupBox->layout(), 3, 2,
+ groupBox = new TQGroupBox( 0, Qt::Vertical, i18n( "Script-Hooks" ), generalPage );
+ TQGridLayout *grid = new TQGridLayout( groupBox->layout(), 3, 2,
KDialog::spacingHint() );
- label = new QLabel( i18n( "Phone:" ), groupBox );
+ label = new TQLabel( i18n( "Phone:" ), groupBox );
grid->addWidget( label, 0, 0 );
- mPhoneHook = new QLineEdit( groupBox );
- QToolTip::add( mPhoneHook, i18n( "<ul><li>%N: Phone Number</li></ul>" ) );
+ mPhoneHook = new TQLineEdit( groupBox );
+ TQToolTip::add( mPhoneHook, i18n( "<ul><li>%N: Phone Number</li></ul>" ) );
grid->addWidget( mPhoneHook, 0, 1 );
- label = new QLabel( i18n( "Fax:" ), groupBox );
+ label = new TQLabel( i18n( "Fax:" ), groupBox );
grid->addWidget( label, 1, 0 );
- mFaxHook = new QLineEdit( groupBox );
- QToolTip::add( mFaxHook, i18n( "<ul><li>%N: Fax Number</li></ul>" ) );
+ mFaxHook = new TQLineEdit( groupBox );
+ TQToolTip::add( mFaxHook, i18n( "<ul><li>%N: Fax Number</li></ul>" ) );
grid->addWidget( mFaxHook, 1, 1 );
- label = new QLabel( i18n( "SMS Text:" ), groupBox );
+ label = new TQLabel( i18n( "SMS Text:" ), groupBox );
grid->addWidget( label, 2, 0 );
- mSMSHook = new QLineEdit( groupBox );
- QToolTip::add( mSMSHook, i18n( "<ul><li>%N: Phone Number</li><li>%F: File containing the text message(s)</li></ul>" ) );
+ mSMSHook = new TQLineEdit( groupBox );
+ TQToolTip::add( mSMSHook, i18n( "<ul><li>%N: Phone Number</li><li>%F: File containing the text message(s)</li></ul>" ) );
grid->addWidget( mSMSHook, 2, 1 );
@@ -126,13 +126,13 @@ KABConfigWidget::KABConfigWidget( QWidget *parent, const char *name )
layout->addWidget( groupBox );
- groupBox = new QGroupBox( 0, Qt::Vertical, i18n( "Location Map" ), generalPage );
- boxLayout = new QVBoxLayout( groupBox->layout(), KDialog::spacingHint() );
+ groupBox = new TQGroupBox( 0, Qt::Vertical, i18n( "Location Map" ), generalPage );
+ boxLayout = new TQVBoxLayout( groupBox->layout(), KDialog::spacingHint() );
boxLayout->setAlignment( Qt::AlignTop );
- mLocationMapURL = new QComboBox( true, groupBox );
- mLocationMapURL->setSizePolicy( QSizePolicy( QSizePolicy::Preferred, QSizePolicy::Fixed ) );
- QToolTip::add( mLocationMapURL, i18n( "<ul> <li>%s: Street</li>"
+ mLocationMapURL = new TQComboBox( true, groupBox );
+ mLocationMapURL->setSizePolicy( TQSizePolicy( TQSizePolicy::Preferred, TQSizePolicy::Fixed ) );
+ TQToolTip::add( mLocationMapURL, i18n( "<ul> <li>%s: Street</li>"
"<li>%r: Region</li>"
"<li>%l: Location</li>"
"<li>%z: Zip Code</li>"
@@ -141,22 +141,22 @@ KABConfigWidget::KABConfigWidget( QWidget *parent, const char *name )
boxLayout->addWidget( mLocationMapURL );
layout->addWidget( groupBox );
- connect( mNameParsing, SIGNAL( toggled( bool ) ), SLOT( modified() ) );
- connect( mViewsSingleClickBox, SIGNAL( toggled( bool ) ), SLOT( modified() ) );
- connect( mTradeAsFamilyName, SIGNAL( toggled( bool ) ), SLOT( modified() ) );
- connect( mLimitContactDisplay, SIGNAL( toggled( bool ) ), SLOT( modified() ) );
- connect( mPhoneHook, SIGNAL( textChanged( const QString& ) ), SLOT( modified() ) );
- connect( mSMSHook, SIGNAL( textChanged( const QString& ) ), SLOT( modified() ) );
- connect( mFaxHook, SIGNAL( textChanged( const QString& ) ), SLOT( modified() ) );
- connect( mLocationMapURL, SIGNAL( textChanged( const QString& ) ), SLOT( modified() ) );
- connect( mEditorCombo, SIGNAL( activated( int ) ), SLOT( modified() ) );
+ connect( mNameParsing, TQT_SIGNAL( toggled( bool ) ), TQT_SLOT( modified() ) );
+ connect( mViewsSingleClickBox, TQT_SIGNAL( toggled( bool ) ), TQT_SLOT( modified() ) );
+ connect( mTradeAsFamilyName, TQT_SIGNAL( toggled( bool ) ), TQT_SLOT( modified() ) );
+ connect( mLimitContactDisplay, TQT_SIGNAL( toggled( bool ) ), TQT_SLOT( modified() ) );
+ connect( mPhoneHook, TQT_SIGNAL( textChanged( const TQString& ) ), TQT_SLOT( modified() ) );
+ connect( mSMSHook, TQT_SIGNAL( textChanged( const TQString& ) ), TQT_SLOT( modified() ) );
+ connect( mFaxHook, TQT_SIGNAL( textChanged( const TQString& ) ), TQT_SLOT( modified() ) );
+ connect( mLocationMapURL, TQT_SIGNAL( textChanged( const TQString& ) ), TQT_SLOT( modified() ) );
+ connect( mEditorCombo, TQT_SIGNAL( activated( int ) ), TQT_SLOT( modified() ) );
tabWidget->addTab( generalPage, i18n( "General" ) );
// Addressee page
mAddresseeWidget = new AddresseeWidget( this );
tabWidget->addTab( mAddresseeWidget, i18n( "Contact" ) );
- connect( mAddresseeWidget, SIGNAL( modified() ), SLOT( modified() ) );
+ connect( mAddresseeWidget, TQT_SIGNAL( modified() ), TQT_SLOT( modified() ) );
}
void KABConfigWidget::restoreSettings()
diff --git a/kaddressbook/kcmconfigs/kabconfigwidget.h b/kaddressbook/kcmconfigs/kabconfigwidget.h
index 72b3e88f3..3e5718690 100644
--- a/kaddressbook/kcmconfigs/kabconfigwidget.h
+++ b/kaddressbook/kcmconfigs/kabconfigwidget.h
@@ -24,7 +24,7 @@
#ifndef KABCONFIGWIDGET_H
#define KABCONFIGWIDGET_H
-#include <qwidget.h>
+#include <tqwidget.h>
class QCheckBox;
class QLineEdit;
@@ -41,7 +41,7 @@ class KABConfigWidget : public QWidget
Q_OBJECT
public:
- KABConfigWidget( QWidget *parent, const char *name = 0 );
+ KABConfigWidget( TQWidget *parent, const char *name = 0 );
void restoreSettings();
void saveSettings();
@@ -54,15 +54,15 @@ class KABConfigWidget : public QWidget
void modified();
private:
- QCheckBox *mNameParsing;
- QCheckBox *mViewsSingleClickBox;
- QCheckBox *mTradeAsFamilyName;
- QComboBox *mEditorCombo;
- QLineEdit *mPhoneHook;
- QLineEdit *mFaxHook;
- QLineEdit *mSMSHook;
- QCheckBox *mLimitContactDisplay;
- QComboBox *mLocationMapURL;
+ TQCheckBox *mNameParsing;
+ TQCheckBox *mViewsSingleClickBox;
+ TQCheckBox *mTradeAsFamilyName;
+ TQComboBox *mEditorCombo;
+ TQLineEdit *mPhoneHook;
+ TQLineEdit *mFaxHook;
+ TQLineEdit *mSMSHook;
+ TQCheckBox *mLimitContactDisplay;
+ TQComboBox *mLocationMapURL;
AddresseeWidget *mAddresseeWidget;
};
diff --git a/kaddressbook/kcmconfigs/kcmkabconfig.cpp b/kaddressbook/kcmconfigs/kcmkabconfig.cpp
index 97fee4661..6b516249a 100644
--- a/kaddressbook/kcmconfigs/kcmkabconfig.cpp
+++ b/kaddressbook/kcmconfigs/kcmkabconfig.cpp
@@ -21,7 +21,7 @@
without including the source code for Qt in the source distribution.
*/
-#include <qlayout.h>
+#include <tqlayout.h>
#include <kaboutdata.h>
#include <kdebug.h>
@@ -35,19 +35,19 @@
extern "C"
{
- KDE_EXPORT KCModule *create_kabconfig( QWidget *parent, const char * ) {
+ KDE_EXPORT KCModule *create_kabconfig( TQWidget *parent, const char * ) {
return new KCMKabConfig( parent, "kcmkabconfig" );
}
}
-KCMKabConfig::KCMKabConfig( QWidget *parent, const char *name )
+KCMKabConfig::KCMKabConfig( TQWidget *parent, const char *name )
: KCModule( parent, name )
{
- QVBoxLayout *layout = new QVBoxLayout( this );
+ TQVBoxLayout *layout = new TQVBoxLayout( this );
mConfigWidget = new KABConfigWidget( this, "mConfigWidget" );
layout->addWidget( mConfigWidget );
- connect( mConfigWidget, SIGNAL( changed( bool ) ), SIGNAL( changed( bool ) ) );
+ connect( mConfigWidget, TQT_SIGNAL( changed( bool ) ), TQT_SIGNAL( changed( bool ) ) );
load();
diff --git a/kaddressbook/kcmconfigs/kcmkabconfig.h b/kaddressbook/kcmconfigs/kcmkabconfig.h
index a42dff08b..5ffecea50 100644
--- a/kaddressbook/kcmconfigs/kcmkabconfig.h
+++ b/kaddressbook/kcmconfigs/kcmkabconfig.h
@@ -33,7 +33,7 @@ class KCMKabConfig : public KCModule
Q_OBJECT
public:
- KCMKabConfig( QWidget *parent = 0, const char *name = 0 );
+ KCMKabConfig( TQWidget *parent = 0, const char *name = 0 );
virtual void load();
virtual void save();
diff --git a/kaddressbook/kcmconfigs/kcmkabcustomfields.cpp b/kaddressbook/kcmconfigs/kcmkabcustomfields.cpp
index 0c70b08bd..3b127eab2 100644
--- a/kaddressbook/kcmconfigs/kcmkabcustomfields.cpp
+++ b/kaddressbook/kcmconfigs/kcmkabcustomfields.cpp
@@ -27,51 +27,51 @@
#include <kstandarddirs.h>
-#include <qregexp.h>
+#include <tqregexp.h>
#include <kdepimmacros.h>
extern "C"
{
- KDE_EXPORT KCModule *create_kabcustomfields( QWidget *parent, const char * ) {
+ KDE_EXPORT KCModule *create_kabcustomfields( TQWidget *parent, const char * ) {
return new KCMKabCustomFields( parent, "kcmkabcustomfields" );
}
}
-KCMKabCustomFields::KCMKabCustomFields( QWidget *parent, const char *name )
+KCMKabCustomFields::KCMKabCustomFields( TQWidget *parent, const char *name )
: KCMDesignerFields( parent, name )
{
}
-QString KCMKabCustomFields::localUiDir()
+TQString KCMKabCustomFields::localUiDir()
{
return kabLocalDir() + "contacteditorpages/";
}
-QString KCMKabCustomFields::uiPath()
+TQString KCMKabCustomFields::uiPath()
{
return "kaddressbook/contacteditorpages/";
}
-void KCMKabCustomFields::writeActivePages( const QStringList &activePages )
+void KCMKabCustomFields::writeActivePages( const TQStringList &activePages )
{
KABPrefs::instance()->setAdvancedCustomFields( activePages );
KABPrefs::instance()->writeConfig();
}
-QStringList KCMKabCustomFields::readActivePages()
+TQStringList KCMKabCustomFields::readActivePages()
{
return KABPrefs::instance()->advancedCustomFields();
}
-QString KCMKabCustomFields::applicationName()
+TQString KCMKabCustomFields::applicationName()
{
return "KADDRESSBOOK";
}
-QString KCMKabCustomFields::kabLocalDir()
+TQString KCMKabCustomFields::kabLocalDir()
{
- QStringList kabdirs = locateLocal("data", "kaddressbook/");
- return kabdirs.grep( QRegExp( "^"+KGlobal::dirs()->localkdedir() ) ).first();
+ TQStringList kabdirs = locateLocal("data", "kaddressbook/");
+ return kabdirs.grep( TQRegExp( "^"+KGlobal::dirs()->localkdedir() ) ).first();
}
diff --git a/kaddressbook/kcmconfigs/kcmkabcustomfields.h b/kaddressbook/kcmconfigs/kcmkabcustomfields.h
index 1501c42ed..38cd19a98 100644
--- a/kaddressbook/kcmconfigs/kcmkabcustomfields.h
+++ b/kaddressbook/kcmconfigs/kcmkabcustomfields.h
@@ -28,16 +28,16 @@
class KCMKabCustomFields : public KPIM::KCMDesignerFields
{
public:
- KCMKabCustomFields( QWidget *parent = 0, const char *name = 0 );
+ KCMKabCustomFields( TQWidget *parent = 0, const char *name = 0 );
protected:
- QString localUiDir();
- QString uiPath();
- void writeActivePages( const QStringList & );
- QStringList readActivePages();
- QString applicationName();
+ TQString localUiDir();
+ TQString uiPath();
+ void writeActivePages( const TQStringList & );
+ TQStringList readActivePages();
+ TQString applicationName();
- QString kabLocalDir();
+ TQString kabLocalDir();
};
#endif
diff --git a/kaddressbook/kcmconfigs/kcmkabldapconfig.cpp b/kaddressbook/kcmconfigs/kcmkabldapconfig.cpp
index 48c83a543..e899198b5 100644
--- a/kaddressbook/kcmconfigs/kcmkabldapconfig.cpp
+++ b/kaddressbook/kcmconfigs/kcmkabldapconfig.cpp
@@ -21,9 +21,9 @@
without including the source code for Qt in the source distribution.
*/
-#include <qcheckbox.h>
-#include <qframe.h>
-#include <qlayout.h>
+#include <tqcheckbox.h>
+#include <tqframe.h>
+#include <tqlayout.h>
#include <kaboutdata.h>
#include <klocale.h>
@@ -36,19 +36,19 @@
extern "C"
{
- KDE_EXPORT KCModule *create_kabldapconfig( QWidget *parent, const char * ) {
+ KDE_EXPORT KCModule *create_kabldapconfig( TQWidget *parent, const char * ) {
return new KCMKabLdapConfig( parent, "kcmkabldapconfig" );
}
}
-KCMKabLdapConfig::KCMKabLdapConfig( QWidget *parent, const char *name )
+KCMKabLdapConfig::KCMKabLdapConfig( TQWidget *parent, const char *name )
: KCModule( parent, name )
{
- QVBoxLayout *layout = new QVBoxLayout( this );
+ TQVBoxLayout *layout = new TQVBoxLayout( this );
mConfigWidget = new LDAPOptionsWidget( this );
layout->addWidget( mConfigWidget );
- connect( mConfigWidget, SIGNAL( changed( bool ) ), SIGNAL( changed( bool ) ) );
+ connect( mConfigWidget, TQT_SIGNAL( changed( bool ) ), TQT_SIGNAL( changed( bool ) ) );
load();
diff --git a/kaddressbook/kcmconfigs/kcmkabldapconfig.h b/kaddressbook/kcmconfigs/kcmkabldapconfig.h
index 85e67053a..53d1a21b4 100644
--- a/kaddressbook/kcmconfigs/kcmkabldapconfig.h
+++ b/kaddressbook/kcmconfigs/kcmkabldapconfig.h
@@ -26,7 +26,7 @@
#include <kcmodule.h>
-#include <qwidget.h>
+#include <tqwidget.h>
class LDAPOptionsWidget;
@@ -35,7 +35,7 @@ class KCMKabLdapConfig : public KCModule
Q_OBJECT
public:
- KCMKabLdapConfig( QWidget *parent = 0, const char *name = 0 );
+ KCMKabLdapConfig( TQWidget *parent = 0, const char *name = 0 );
virtual void load();
virtual void save();
diff --git a/kaddressbook/kcmconfigs/ldapoptionswidget.cpp b/kaddressbook/kcmconfigs/ldapoptionswidget.cpp
index df80ad872..3825ac1d8 100644
--- a/kaddressbook/kcmconfigs/ldapoptionswidget.cpp
+++ b/kaddressbook/kcmconfigs/ldapoptionswidget.cpp
@@ -21,13 +21,13 @@
without including the source code for Qt in the source distribution.
*/
-#include <qgroupbox.h>
-#include <qheader.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qpushbutton.h>
-#include <qtoolbutton.h>
-#include <qstring.h>
+#include <tqgroupbox.h>
+#include <tqheader.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqpushbutton.h>
+#include <tqtoolbutton.h>
+#include <tqstring.h>
#include <kapplication.h>
#include <kbuttonbox.h>
@@ -37,16 +37,16 @@
#include "addhostdialog.h"
#include "ldapoptionswidget.h"
-#include <qvgroupbox.h>
-#include <qhbox.h>
-#include <qvbox.h>
+#include <tqvgroupbox.h>
+#include <tqhbox.h>
+#include <tqvbox.h>
#include <kiconloader.h>
class LDAPItem : public QCheckListItem
{
public:
- LDAPItem( QListView *parent, const KPIM::LdapServer &server, bool isActive = false )
- : QCheckListItem( parent, parent->lastItem(), QString::null, QCheckListItem::CheckBox ),
+ LDAPItem( TQListView *parent, const KPIM::LdapServer &server, bool isActive = false )
+ : TQCheckListItem( parent, parent->lastItem(), TQString::null, TQCheckListItem::CheckBox ),
mIsActive( isActive )
{
setServer( server );
@@ -69,32 +69,32 @@ class LDAPItem : public QCheckListItem
bool mIsActive;
};
-LDAPOptionsWidget::LDAPOptionsWidget( QWidget* parent, const char* name )
- : QWidget( parent, name )
+LDAPOptionsWidget::LDAPOptionsWidget( TQWidget* parent, const char* name )
+ : TQWidget( parent, name )
{
initGUI();
mHostListView->setSorting( -1 );
mHostListView->setAllColumnsShowFocus( true );
mHostListView->setFullWidth( true );
- mHostListView->addColumn( QString::null );
+ mHostListView->addColumn( TQString::null );
mHostListView->header()->hide();
- connect( mHostListView, SIGNAL( selectionChanged( QListViewItem* ) ),
- SLOT( slotSelectionChanged( QListViewItem* ) ) );
- connect( mHostListView, SIGNAL(doubleClicked( QListViewItem *, const QPoint &, int )), this, SLOT(slotEditHost()));
- connect( mHostListView, SIGNAL( clicked( QListViewItem* ) ),
- SLOT( slotItemClicked( QListViewItem* ) ) );
+ connect( mHostListView, TQT_SIGNAL( selectionChanged( TQListViewItem* ) ),
+ TQT_SLOT( slotSelectionChanged( TQListViewItem* ) ) );
+ connect( mHostListView, TQT_SIGNAL(doubleClicked( TQListViewItem *, const TQPoint &, int )), this, TQT_SLOT(slotEditHost()));
+ connect( mHostListView, TQT_SIGNAL( clicked( TQListViewItem* ) ),
+ TQT_SLOT( slotItemClicked( TQListViewItem* ) ) );
- connect( mUpButton, SIGNAL( clicked() ), this, SLOT( slotMoveUp() ) );
- connect( mDownButton, SIGNAL( clicked() ), this, SLOT( slotMoveDown() ) );
+ connect( mUpButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotMoveUp() ) );
+ connect( mDownButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotMoveDown() ) );
}
LDAPOptionsWidget::~LDAPOptionsWidget()
{
}
-void LDAPOptionsWidget::slotSelectionChanged( QListViewItem *item )
+void LDAPOptionsWidget::slotSelectionChanged( TQListViewItem *item )
{
bool state = ( item != 0 );
mEditButton->setEnabled( state );
@@ -103,7 +103,7 @@ void LDAPOptionsWidget::slotSelectionChanged( QListViewItem *item )
mUpButton->setEnabled( item && item->itemAbove() );
}
-void LDAPOptionsWidget::slotItemClicked( QListViewItem *item )
+void LDAPOptionsWidget::slotItemClicked( TQListViewItem *item )
{
LDAPItem *ldapItem = dynamic_cast<LDAPItem*>( item );
if ( !ldapItem )
@@ -146,7 +146,7 @@ void LDAPOptionsWidget::slotEditHost()
void LDAPOptionsWidget::slotRemoveHost()
{
- QListViewItem *item = mHostListView->currentItem();
+ TQListViewItem *item = mHostListView->currentItem();
if ( !item )
return;
@@ -200,7 +200,7 @@ void LDAPOptionsWidget::restoreSettings()
KConfig *config = KPIM::LdapSearch::config();
KConfigGroupSaver saver( config, "LDAP" );
- QString host;
+ TQString host;
uint count = config->readUnsignedNumEntry( "NumSelectedHosts");
for ( uint i = 0; i < count; ++i ) {
@@ -228,7 +228,7 @@ void LDAPOptionsWidget::saveSettings()
KConfigGroupSaver saver( config, "LDAP" );
uint selected = 0; uint unselected = 0;
- QListViewItemIterator it( mHostListView );
+ TQListViewItemIterator it( mHostListView );
for ( ; it.current(); ++it ) {
LDAPItem *item = dynamic_cast<LDAPItem*>( it.current() );
if ( !item )
@@ -258,46 +258,46 @@ void LDAPOptionsWidget::defaults()
void LDAPOptionsWidget::initGUI()
{
- QVBoxLayout *layout = new QVBoxLayout( this, 0, KDialog::spacingHint() );
+ TQVBoxLayout *layout = new TQVBoxLayout( this, 0, KDialog::spacingHint() );
- QVGroupBox *groupBox = new QVGroupBox( i18n( "LDAP Servers" ), this );
+ TQVGroupBox *groupBox = new TQVGroupBox( i18n( "LDAP Servers" ), this );
groupBox->setInsideSpacing( KDialog::spacingHint() );
groupBox->setInsideMargin( KDialog::marginHint() );
- // Contents of the QVGroupBox: label and hbox
- /*QLabel *label =*/ new QLabel( i18n( "Check all servers that should be used:" ), groupBox );
+ // Contents of the TQVGroupBox: label and hbox
+ /*TQLabel *label =*/ new TQLabel( i18n( "Check all servers that should be used:" ), groupBox );
- QHBox* hBox = new QHBox( groupBox );
+ TQHBox* hBox = new TQHBox( groupBox );
hBox->setSpacing( 6 );
// Contents of the hbox: listview and up/down buttons on the right (vbox)
mHostListView = new KListView( hBox );
- QVBox* upDownBox = new QVBox( hBox );
+ TQVBox* upDownBox = new TQVBox( hBox );
upDownBox->setSpacing( 6 );
- mUpButton = new QToolButton( upDownBox, "mUpButton" );
+ mUpButton = new TQToolButton( upDownBox, "mUpButton" );
mUpButton->setIconSet( BarIconSet( "up", KIcon::SizeSmall ) );
mUpButton->setEnabled( false ); // b/c no item is selected yet
- mDownButton = new QToolButton( upDownBox, "mDownButton" );
+ mDownButton = new TQToolButton( upDownBox, "mDownButton" );
mDownButton->setIconSet( BarIconSet( "down", KIcon::SizeSmall ) );
mDownButton->setEnabled( false ); // b/c no item is selected yet
- QWidget* spacer = new QWidget( upDownBox );
+ TQWidget* spacer = new TQWidget( upDownBox );
upDownBox->setStretchFactor( spacer, 100 );
layout->addWidget( groupBox );
KButtonBox *buttons = new KButtonBox( this );
- buttons->addButton( i18n( "&Add Host..." ), this, SLOT( slotAddHost() ) );
- mEditButton = buttons->addButton( i18n( "&Edit Host..." ), this, SLOT( slotEditHost() ) );
+ buttons->addButton( i18n( "&Add Host..." ), this, TQT_SLOT( slotAddHost() ) );
+ mEditButton = buttons->addButton( i18n( "&Edit Host..." ), this, TQT_SLOT( slotEditHost() ) );
mEditButton->setEnabled( false );
- mRemoveButton = buttons->addButton( i18n( "&Remove Host" ), this, SLOT( slotRemoveHost() ) );
+ mRemoveButton = buttons->addButton( i18n( "&Remove Host" ), this, TQT_SLOT( slotRemoveHost() ) );
mRemoveButton->setEnabled( false );
buttons->layout();
layout->addWidget( buttons );
- resize( QSize( 460, 300 ).expandedTo( sizeHint() ) );
+ resize( TQSize( 460, 300 ).expandedTo( sizeHint() ) );
}
#include "ldapoptionswidget.moc"
diff --git a/kaddressbook/kcmconfigs/ldapoptionswidget.h b/kaddressbook/kcmconfigs/ldapoptionswidget.h
index c63b96dd7..22b7e621e 100644
--- a/kaddressbook/kcmconfigs/ldapoptionswidget.h
+++ b/kaddressbook/kcmconfigs/ldapoptionswidget.h
@@ -24,7 +24,7 @@
#ifndef LDAPOPTIONSWIDGET_H
#define LDAPOPTIONSWIDGET_H
-#include <qwidget.h>
+#include <tqwidget.h>
class QToolButton;
class KListView;
@@ -36,7 +36,7 @@ class LDAPOptionsWidget : public QWidget
Q_OBJECT
public:
- LDAPOptionsWidget( QWidget* parent = 0, const char* name = 0 );
+ LDAPOptionsWidget( TQWidget* parent = 0, const char* name = 0 );
~LDAPOptionsWidget();
void restoreSettings();
@@ -50,8 +50,8 @@ class LDAPOptionsWidget : public QWidget
void slotAddHost();
void slotEditHost();
void slotRemoveHost();
- void slotSelectionChanged( QListViewItem* );
- void slotItemClicked( QListViewItem* );
+ void slotSelectionChanged( TQListViewItem* );
+ void slotItemClicked( TQListViewItem* );
void slotMoveUp();
void slotMoveDown();
@@ -60,12 +60,12 @@ class LDAPOptionsWidget : public QWidget
KListView* mHostListView;
- QPushButton* mAddButton;
- QPushButton* mEditButton;
- QPushButton* mRemoveButton;
+ TQPushButton* mAddButton;
+ TQPushButton* mEditButton;
+ TQPushButton* mRemoveButton;
- QToolButton* mUpButton;
- QToolButton* mDownButton;
+ TQToolButton* mUpButton;
+ TQToolButton* mDownButton;
};
#endif
diff --git a/kaddressbook/keywidget.cpp b/kaddressbook/keywidget.cpp
index ab0f8fa7f..57558cb46 100644
--- a/kaddressbook/keywidget.cpp
+++ b/kaddressbook/keywidget.cpp
@@ -21,10 +21,10 @@
without including the source code for Qt in the source distribution.
*/
-#include <qfile.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qpushbutton.h>
+#include <tqfile.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqpushbutton.h>
#include <kapplication.h>
#include <kcombobox.h>
@@ -38,32 +38,32 @@
#include "keywidget.h"
-KeyWidget::KeyWidget( QWidget *parent, const char *name )
- : QWidget( parent, name )
+KeyWidget::KeyWidget( TQWidget *parent, const char *name )
+ : TQWidget( parent, name )
{
- QGridLayout *layout = new QGridLayout( this, 4, 2, KDialog::marginHint(),
+ TQGridLayout *layout = new TQGridLayout( this, 4, 2, KDialog::marginHint(),
KDialog::spacingHint() );
- QLabel *label = new QLabel( i18n( "Keys:" ), this );
+ TQLabel *label = new TQLabel( i18n( "Keys:" ), this );
layout->addWidget( label, 0, 0 );
mKeyCombo = new KComboBox( this );
layout->addWidget( mKeyCombo, 0, 1 );
- mAddButton = new QPushButton( i18n( "Add..." ), this );
+ mAddButton = new TQPushButton( i18n( "Add..." ), this );
layout->addMultiCellWidget( mAddButton, 1, 1, 0, 1 );
- mRemoveButton = new QPushButton( i18n( "Remove" ), this );
+ mRemoveButton = new TQPushButton( i18n( "Remove" ), this );
mRemoveButton->setEnabled( false );
layout->addMultiCellWidget( mRemoveButton, 2, 2, 0, 1 );
- mExportButton = new QPushButton( i18n( "Export..." ), this );
+ mExportButton = new TQPushButton( i18n( "Export..." ), this );
mExportButton->setEnabled( false );
layout->addMultiCellWidget( mExportButton, 3, 3, 0, 1 );
- connect( mAddButton, SIGNAL( clicked() ), SLOT( addKey() ) );
- connect( mRemoveButton, SIGNAL( clicked() ), SLOT( removeKey() ) );
- connect( mExportButton, SIGNAL( clicked() ), SLOT( exportKey() ) );
+ connect( mAddButton, TQT_SIGNAL( clicked() ), TQT_SLOT( addKey() ) );
+ connect( mRemoveButton, TQT_SIGNAL( clicked() ), TQT_SLOT( removeKey() ) );
+ connect( mExportButton, TQT_SIGNAL( clicked() ), TQT_SLOT( exportKey() ) );
}
KeyWidget::~KeyWidget()
@@ -84,9 +84,9 @@ KABC::Key::List KeyWidget::keys() const
void KeyWidget::addKey()
{
- QMap<QString, int> keyMap;
- QStringList keyTypeNames;
- QStringList existingKeyTypes;
+ TQMap<TQString, int> keyMap;
+ TQStringList keyTypeNames;
+ TQStringList existingKeyTypes;
KABC::Key::List::ConstIterator listIt;
for ( listIt = mKeyList.begin(); listIt != mKeyList.end(); ++listIt ) {
@@ -105,7 +105,7 @@ void KeyWidget::addKey()
}
bool ok;
- QString name = KInputDialog::getItem( i18n( "Key Type" ), i18n( "Select the key type:" ), keyTypeNames, 0, true, &ok );
+ TQString name = KInputDialog::getItem( i18n( "Key Type" ), i18n( "Select the key type:" ), keyTypeNames, 0, true, &ok );
if ( !ok || name.isEmpty() )
return;
@@ -117,19 +117,19 @@ void KeyWidget::addKey()
if ( url.isEmpty() )
return;
- QString tmpFile;
+ TQString tmpFile;
if ( KIO::NetAccess::download( url, tmpFile, this ) ) {
- QFile file( tmpFile );
+ TQFile file( tmpFile );
if ( !file.open( IO_ReadOnly ) ) {
- QString text( i18n( "<qt>Unable to open file <b>%1</b>.</qt>" ) );
+ TQString text( i18n( "<qt>Unable to open file <b>%1</b>.</qt>" ) );
KMessageBox::error( this, text.arg( url.url() ) );
return;
}
- QTextStream s( &file );
- QString data;
+ TQTextStream s( &file );
+ TQString data;
- s.setEncoding( QTextStream::UnicodeUTF8 );
+ s.setEncoding( TQTextStream::UnicodeUTF8 );
s >> data;
file.close();
@@ -152,8 +152,8 @@ void KeyWidget::removeKey()
if ( pos == -1 )
return;
- QString type = mKeyCombo->currentText();
- QString text = i18n( "<qt>Do you really want to remove the key <b>%1</b>?</qt>" );
+ TQString type = mKeyCombo->currentText();
+ TQString text = i18n( "<qt>Do you really want to remove the key <b>%1</b>?</qt>" );
if ( KMessageBox::warningContinueCancel( this, text.arg( type ), "", KGuiItem( i18n("&Delete"), "editdelete") ) == KMessageBox::Cancel )
return;
@@ -170,8 +170,8 @@ void KeyWidget::exportKey()
KURL url = KFileDialog::getSaveURL();
KTempFile tempFile;
- QTextStream *s = tempFile.textStream();
- s->setEncoding( QTextStream::UnicodeUTF8 );
+ TQTextStream *s = tempFile.textStream();
+ s->setEncoding( TQTextStream::UnicodeUTF8 );
(*s) << key.textData();
tempFile.close();
diff --git a/kaddressbook/keywidget.h b/kaddressbook/keywidget.h
index 712c26c00..2b3b83a0c 100644
--- a/kaddressbook/keywidget.h
+++ b/kaddressbook/keywidget.h
@@ -24,7 +24,7 @@
#ifndef KEYWIDGET_H
#define KEYWIDGET_H
-#include <qwidget.h>
+#include <tqwidget.h>
#include <kabc/key.h>
class KComboBox;
@@ -36,7 +36,7 @@ class KeyWidget : public QWidget
Q_OBJECT
public:
- KeyWidget( QWidget *parent, const char *name = 0 );
+ KeyWidget( TQWidget *parent, const char *name = 0 );
~KeyWidget();
void setKeys( const KABC::Key::List &list );
@@ -55,9 +55,9 @@ class KeyWidget : public QWidget
KComboBox *mKeyCombo;
- QPushButton *mAddButton;
- QPushButton *mRemoveButton;
- QPushButton *mExportButton;
+ TQPushButton *mAddButton;
+ TQPushButton *mRemoveButton;
+ TQPushButton *mExportButton;
KABC::Key::List mKeyList;
};
diff --git a/kaddressbook/ldapsearchdialog.cpp b/kaddressbook/ldapsearchdialog.cpp
index 706b982ff..fc99562d4 100644
--- a/kaddressbook/ldapsearchdialog.cpp
+++ b/kaddressbook/ldapsearchdialog.cpp
@@ -20,14 +20,14 @@
#include "config.h"
-#include <qcheckbox.h>
-#include <qgroupbox.h>
-#include <qheader.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qlistview.h>
-#include <qmap.h>
-#include <qpushbutton.h>
+#include <tqcheckbox.h>
+#include <tqgroupbox.h>
+#include <tqheader.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqlistview.h>
+#include <tqmap.h>
+#include <tqpushbutton.h>
#include <addresseelineedit.h>
#include <kapplication.h>
@@ -46,23 +46,23 @@
#include "distributionlistpicker.h"
#endif
-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 KPIM::LdapAttrValue& lst, const QString& sep )
+static TQString join( const KPIM::LdapAttrValue& lst, const TQString& sep )
{
- QString res;
+ TQString res;
bool alredy = false;
for ( KPIM::LdapAttrValue::ConstIterator it = lst.begin(); it != lst.end(); ++it ) {
if ( alredy )
@@ -73,9 +73,9 @@ static QString join( const KPIM::LdapAttrValue& lst, const QString& sep )
return res;
}
-static QMap<QString, QString>& adrbookattr2ldap()
+static TQMap<TQString, TQString>& adrbookattr2ldap()
{
- static QMap<QString, QString> keys;
+ static TQMap<TQString, TQString> keys;
if ( keys.isEmpty() ) {
keys[ i18n( "Title" ) ] = "title";
@@ -104,17 +104,17 @@ static QMap<QString, QString>& adrbookattr2ldap()
class ContactListItem : public QListViewItem
{
public:
- ContactListItem( QListView* parent, const KPIM::LdapAttrMap& attrs )
- : QListViewItem( parent ), mAttrs( attrs )
+ ContactListItem( TQListView* parent, const KPIM::LdapAttrMap& attrs )
+ : TQListViewItem( parent ), mAttrs( attrs )
{ }
KPIM::LdapAttrMap mAttrs;
- virtual QString text( int col ) const
+ virtual TQString text( int col ) const
{
// Look up a suitable attribute for column col
- const QString colName = listView()->columnText( col );
- const QString ldapAttrName = adrbookattr2ldap()[ colName ];
+ const TQString colName = listView()->columnText( col );
+ const TQString ldapAttrName = adrbookattr2ldap()[ colName ];
return join( mAttrs[ ldapAttrName ], ", " );
}
};
@@ -122,13 +122,13 @@ class ContactListItem : public QListViewItem
class LDAPSearchDialog::Private
{
public:
- static QValueList<ContactListItem*> selectedItems( QListView* );
- QMap<const ContactListItem*, QString> itemToServer;
+ static TQValueList<ContactListItem*> selectedItems( TQListView* );
+ TQMap<const ContactListItem*, TQString> itemToServer;
};
-QValueList<ContactListItem*> LDAPSearchDialog::Private::selectedItems( QListView* view )
+TQValueList<ContactListItem*> LDAPSearchDialog::Private::selectedItems( TQListView* view )
{
- QValueList<ContactListItem*> selected;
+ TQValueList<ContactListItem*> selected;
ContactListItem* cli = static_cast<ContactListItem*>( view->firstChild() );
while ( cli ) {
if ( cli->isSelected() )
@@ -139,32 +139,32 @@ QValueList<ContactListItem*> LDAPSearchDialog::Private::selectedItems( QListView
}
LDAPSearchDialog::LDAPSearchDialog( KABC::AddressBook *ab, KABCore *core,
- QWidget* parent, const char* name )
+ TQWidget* parent, const char* name )
: KDialogBase( Plain, i18n( "Search for Addresses in Directory" ), Help | User1 | User2 |
Cancel, Default, parent, name, false, true ),
mAddressBook( ab ), mCore( core ), d( new Private )
{
setButtonCancel( KStdGuiItem::close() );
- QFrame *page = plainPage();
- QVBoxLayout *topLayout = new QVBoxLayout( page, marginHint(), spacingHint() );
+ TQFrame *page = plainPage();
+ TQVBoxLayout *topLayout = new TQVBoxLayout( page, marginHint(), spacingHint() );
- QGroupBox *groupBox = new QGroupBox( i18n( "Search for Addresses in Directory" ),
+ TQGroupBox *groupBox = new TQGroupBox( i18n( "Search for Addresses in Directory" ),
page );
- groupBox->setFrameShape( QGroupBox::Box );
- groupBox->setFrameShadow( QGroupBox::Sunken );
+ groupBox->setFrameShape( TQGroupBox::Box );
+ groupBox->setFrameShadow( TQGroupBox::Sunken );
groupBox->setColumnLayout( 0, Qt::Vertical );
- QGridLayout *boxLayout = new QGridLayout( groupBox->layout(), 2,
+ TQGridLayout *boxLayout = new TQGridLayout( groupBox->layout(), 2,
5, spacingHint() );
boxLayout->setColStretch( 1, 1 );
- QLabel *label = new QLabel( i18n( "Search for:" ), groupBox );
+ TQLabel *label = new TQLabel( i18n( "Search for:" ), groupBox );
boxLayout->addWidget( label, 0, 0 );
mSearchEdit = new KLineEdit( groupBox );
boxLayout->addWidget( mSearchEdit, 0, 1 );
label->setBuddy( mSearchEdit );
- label = new QLabel( i18n( "In LDAP attribute", "in" ), groupBox );
+ label = new TQLabel( i18n( "In LDAP attribute", "in" ), groupBox );
boxLayout->addWidget( label, 0, 2 );
mFilterCombo = new KComboBox( groupBox );
@@ -174,8 +174,8 @@ LDAPSearchDialog::LDAPSearchDialog( KABC::AddressBook *ab, KABCore *core,
mFilterCombo->insertItem( i18n( "Work Number" ) );
boxLayout->addWidget( mFilterCombo, 0, 3 );
- QSize buttonSize;
- mSearchButton = new QPushButton( i18n( "Stop" ), groupBox );
+ TQSize buttonSize;
+ mSearchButton = new TQPushButton( i18n( "Stop" ), groupBox );
buttonSize = mSearchButton->sizeHint();
mSearchButton->setText( i18n( "&Search" ) );
if ( buttonSize.width() < mSearchButton->sizeHint().width() )
@@ -185,7 +185,7 @@ LDAPSearchDialog::LDAPSearchDialog( KABC::AddressBook *ab, KABCore *core,
mSearchButton->setDefault( true );
boxLayout->addWidget( mSearchButton, 0, 4 );
- mRecursiveCheckbox = new QCheckBox( i18n( "Recursive search" ), groupBox );
+ mRecursiveCheckbox = new TQCheckBox( i18n( "Recursive search" ), groupBox );
mRecursiveCheckbox->setChecked( true );
boxLayout->addMultiCellWidget( mRecursiveCheckbox, 1, 1, 0, 4 );
@@ -196,19 +196,19 @@ LDAPSearchDialog::LDAPSearchDialog( KABC::AddressBook *ab, KABCore *core,
topLayout->addWidget( groupBox );
- mResultListView = new QListView( page );
- mResultListView->setSelectionMode( QListView::Multi );
+ mResultListView = new TQListView( page );
+ mResultListView->setSelectionMode( TQListView::Multi );
mResultListView->setAllColumnsShowFocus( true );
mResultListView->setShowSortIndicator( true );
topLayout->addWidget( mResultListView );
KButtonBox *buttons = new KButtonBox( page, Qt::Horizontal );
- buttons->addButton( i18n( "Select All" ), this, SLOT( slotSelectAll() ) );
- buttons->addButton( i18n( "Unselect All" ), this, SLOT( slotUnselectAll() ) );
+ buttons->addButton( i18n( "Select All" ), this, TQT_SLOT( slotSelectAll() ) );
+ buttons->addButton( i18n( "Unselect All" ), this, TQT_SLOT( slotUnselectAll() ) );
topLayout->addWidget( buttons );
- resize( QSize( 600, 400).expandedTo( minimumSizeHint() ) );
+ resize( TQSize( 600, 400).expandedTo( minimumSizeHint() ) );
setButtonText( User1, i18n( "Add Selected" ) );
@@ -222,10 +222,10 @@ LDAPSearchDialog::LDAPSearchDialog( KABC::AddressBook *ab, KABCore *core,
mNumHosts = 0;
mIsOK = false;
- connect( mRecursiveCheckbox, SIGNAL( toggled( bool ) ),
- this, SLOT( slotSetScope( bool ) ) );
- connect( mSearchButton, SIGNAL( clicked() ),
- this, SLOT( slotStartSearch() ) );
+ connect( mRecursiveCheckbox, TQT_SIGNAL( toggled( bool ) ),
+ this, TQT_SLOT( slotSetScope( bool ) ) );
+ connect( mSearchButton, TQT_SIGNAL( clicked() ),
+ this, TQT_SLOT( slotStartSearch() ) );
setTabOrder(mSearchEdit, mFilterCombo);
setTabOrder(mFilterCombo, mSearchButton);
@@ -268,19 +268,19 @@ void LDAPSearchDialog::restoreSettings()
KPIM::LdapServer ldapServer;
KPIM::LdapSearch::readConfig( ldapServer, config, j, true );
ldapClient->setServer( ldapServer );
- QStringList attrs;
+ TQStringList attrs;
- for ( QMap<QString,QString>::ConstIterator it = adrbookattr2ldap().begin(); it != adrbookattr2ldap().end(); ++it )
+ for ( TQMap<TQString,TQString>::ConstIterator it = adrbookattr2ldap().begin(); it != adrbookattr2ldap().end(); ++it )
attrs << *it;
ldapClient->setAttrs( attrs );
- connect( ldapClient, SIGNAL( result( const KPIM::LdapObject& ) ),
- this, SLOT( slotAddResult( const KPIM::LdapObject& ) ) );
- connect( ldapClient, SIGNAL( done() ),
- this, SLOT( slotSearchDone() ) );
- connect( ldapClient, SIGNAL( error( const QString& ) ),
- this, SLOT( slotError( const QString& ) ) );
+ connect( ldapClient, TQT_SIGNAL( result( const KPIM::LdapObject& ) ),
+ this, TQT_SLOT( slotAddResult( const KPIM::LdapObject& ) ) );
+ connect( ldapClient, TQT_SIGNAL( done() ),
+ this, TQT_SLOT( slotSearchDone() ) );
+ connect( ldapClient, TQT_SIGNAL( error( const TQString& ) ),
+ this, TQT_SLOT( slotError( const TQString& ) ) );
mLdapClientList.append( ldapClient );
}
@@ -345,7 +345,7 @@ void LDAPSearchDialog::slotSetScope( bool rec )
}
}
-QString LDAPSearchDialog::makeFilter( const QString& query, const QString& attr,
+TQString LDAPSearchDialog::makeFilter( const TQString& query, const TQString& attr,
bool startsWith )
{
/* The reasoning behind this filter is:
@@ -354,7 +354,7 @@ QString LDAPSearchDialog::makeFilter( const QString& query, const QString& attr,
* This allows both resource accounts with an email address which are not a person and
* person entries without an email address to show up, while still not showing things
* like structural entries in the ldap tree. */
- QString result( "&(|(objectclass=person)(objectclass=groupofnames)(mail=*))(" );
+ TQString result( "&(|(objectclass=person)(objectclass=groupofnames)(mail=*))(" );
if( query.isEmpty() )
// Return a filter that matches everything
return result + "|(cn=*)(sn=*)" + ")";
@@ -372,7 +372,7 @@ QString LDAPSearchDialog::makeFilter( const QString& query, const QString& attr,
result = result.arg( "telephoneNumber" ).arg( query );
} else {
// Error?
- result = QString::null;
+ result = TQString::null;
return result;
}
}
@@ -384,17 +384,17 @@ void LDAPSearchDialog::slotStartSearch()
{
cancelQuery();
- QApplication::setOverrideCursor( Qt::waitCursor );
+ TQApplication::setOverrideCursor( Qt::waitCursor );
mSearchButton->setText( i18n( "Stop" ) );
- disconnect( mSearchButton, SIGNAL( clicked() ),
- this, SLOT( slotStartSearch() ) );
- connect( mSearchButton, SIGNAL( clicked() ),
- this, SLOT( slotStopSearch() ) );
+ disconnect( mSearchButton, TQT_SIGNAL( clicked() ),
+ this, TQT_SLOT( slotStartSearch() ) );
+ connect( mSearchButton, TQT_SIGNAL( clicked() ),
+ this, TQT_SLOT( slotStopSearch() ) );
bool startsWith = (mSearchType->currentItem() == 1);
- QString filter = makeFilter( mSearchEdit->text().stripWhiteSpace(), mFilterCombo->currentText(), startsWith );
+ TQString filter = makeFilter( mSearchEdit->text().stripWhiteSpace(), mFilterCombo->currentText(), startsWith );
// loop in the list and run the KPIM::LdapClients
mResultListView->clear();
@@ -419,22 +419,22 @@ void LDAPSearchDialog::slotSearchDone()
return;
}
- disconnect( mSearchButton, SIGNAL( clicked() ),
- this, SLOT( slotStopSearch() ) );
- connect( mSearchButton, SIGNAL( clicked() ),
- this, SLOT( slotStartSearch() ) );
+ disconnect( mSearchButton, TQT_SIGNAL( clicked() ),
+ this, TQT_SLOT( slotStopSearch() ) );
+ connect( mSearchButton, TQT_SIGNAL( clicked() ),
+ this, TQT_SLOT( slotStartSearch() ) );
mSearchButton->setText( i18n( "&Search" ) );
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
}
-void LDAPSearchDialog::slotError( const QString& error )
+void LDAPSearchDialog::slotError( const TQString& error )
{
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
KMessageBox::error( this, error );
}
-void LDAPSearchDialog::closeEvent( QCloseEvent* e )
+void LDAPSearchDialog::closeEvent( TQCloseEvent* e )
{
slotStopSearch();
e->accept();
@@ -444,15 +444,15 @@ void LDAPSearchDialog::closeEvent( QCloseEvent* e )
* Returns a ", " separated list of email addresses that were
* checked by the user
*/
-QString LDAPSearchDialog::selectedEMails() const
+TQString LDAPSearchDialog::selectedEMails() const
{
- QStringList result;
+ TQStringList result;
ContactListItem* cli = static_cast<ContactListItem*>( mResultListView->firstChild() );
while ( cli ) {
if ( cli->isSelected() ) {
- QString email = asUtf8( cli->mAttrs[ "mail" ].first() ).stripWhiteSpace();
+ TQString email = asUtf8( cli->mAttrs[ "mail" ].first() ).stripWhiteSpace();
if ( !email.isEmpty() ) {
- QString name = asUtf8( cli->mAttrs[ "cn" ].first() ).stripWhiteSpace();
+ TQString name = asUtf8( cli->mAttrs[ "cn" ].first() ).stripWhiteSpace();
if ( name.isEmpty() ) {
result << email;
} else {
@@ -546,27 +546,27 @@ KABC::Addressee LDAPSearchDialog::convertLdapAttributesToAddressee( const KPIM::
#ifdef KDEPIM_NEW_DISTRLISTS
KPIM::DistributionList LDAPSearchDialog::selectDistributionList()
{
- QGuardedPtr<KPIM::DistributionListPickerDialog> picker = new KPIM::DistributionListPickerDialog( mCore->addressBook(), this );
+ TQGuardedPtr<KPIM::DistributionListPickerDialog> picker = new KPIM::DistributionListPickerDialog( mCore->addressBook(), this );
picker->setLabelText( i18n( "Select a distribution list to add the selected contacts to." ) );
picker->setCaption( i18n( "Select Distribution List" ) );
picker->exec();
const KPIM::DistributionList list = KPIM::DistributionList::findByName( mCore->addressBook(), picker
-? picker->selectedDistributionList() : QString() );
+? picker->selectedDistributionList() : TQString() );
delete picker;
return list;
}
#endif
-KABC::Addressee::List LDAPSearchDialog::importContactsUnlessTheyExist( const QValueList<ContactListItem*>& selectedItems,
+KABC::Addressee::List LDAPSearchDialog::importContactsUnlessTheyExist( const TQValueList<ContactListItem*>& selectedItems,
KABC::Resource * const resource )
{
- const QDateTime now = QDateTime::currentDateTime();
- QStringList importedAddrs;
+ const TQDateTime now = TQDateTime::currentDateTime();
+ TQStringList importedAddrs;
KABC::Addressee::List localAddrs;
KABLock::self( mCore->addressBook() )->lock( resource );
- for ( QValueList<ContactListItem*>::ConstIterator it = selectedItems.begin(); it != selectedItems.end(); ++it ) {
+ for ( TQValueList<ContactListItem*>::ConstIterator it = selectedItems.begin(); it != selectedItems.end(); ++it ) {
const ContactListItem * const cli = *it;
KABC::Addressee addr = convertLdapAttributesToAddressee( cli->mAttrs );
const KABC::Addressee::List existing = mCore->addressBook()->findByEmail( addr.preferredEmail() );
@@ -598,7 +598,7 @@ void LDAPSearchDialog::slotUser2()
KABC::Resource *resource = mCore->requestResource( this );
if ( !resource ) return;
- const QValueList<ContactListItem*> selectedItems = d->selectedItems( mResultListView );
+ const TQValueList<ContactListItem*> selectedItems = d->selectedItems( mResultListView );
if ( selectedItems.isEmpty() ) {
KMessageBox::information( this, i18n( "Please select the contacts you want to add to the distribution list." ), i18n( "No Contacts Selected" ) );
return;
@@ -614,7 +614,7 @@ void LDAPSearchDialog::slotUser2()
return;
for ( KABC::Addressee::List::ConstIterator it = localAddrs.begin(); it != localAddrs.end(); ++it ) {
- dist.insertEntry( *it, QString() );
+ dist.insertEntry( *it, TQString() );
}
KABLock::self( mCore->addressBook() )->lock( resource );
mCore->addressBook()->insertAddressee( dist );
@@ -627,7 +627,7 @@ void LDAPSearchDialog::slotUser1()
{
KABC::Resource *resource = mCore->requestResource( this );
if ( !resource ) return;
- const QValueList<ContactListItem*> selectedItems = d->selectedItems( mResultListView );
+ const TQValueList<ContactListItem*> selectedItems = d->selectedItems( mResultListView );
importContactsUnlessTheyExist( selectedItems, resource );
}
diff --git a/kaddressbook/ldapsearchdialog.h b/kaddressbook/ldapsearchdialog.h
index dba41fc54..8c368a116 100644
--- a/kaddressbook/ldapsearchdialog.h
+++ b/kaddressbook/ldapsearchdialog.h
@@ -23,7 +23,7 @@
#include "config.h"
-#include <qptrlist.h>
+#include <tqptrlist.h>
#include <kabc/addressbook.h>
#include <ldapclient.h>
@@ -52,7 +52,7 @@ class LDAPSearchDialog : public KDialogBase
Q_OBJECT
public:
- LDAPSearchDialog( KABC::AddressBook *ab, KABCore *core, QWidget* parent, const char* name = 0 );
+ LDAPSearchDialog( KABC::AddressBook *ab, KABCore *core, TQWidget* parent, const char* name = 0 );
~LDAPSearchDialog();
bool isOK() const { return mIsOK; }
@@ -68,7 +68,7 @@ class LDAPSearchDialog : public KDialogBase
void slotStartSearch();
void slotStopSearch();
void slotSearchDone();
- void slotError( const QString& );
+ void slotError( const TQString& );
virtual void slotHelp();
virtual void slotUser1();
virtual void slotUser2();
@@ -79,12 +79,12 @@ class LDAPSearchDialog : public KDialogBase
* unless they already exist. Returns the list of both the added
* and the existing contacts.
*/
- KABC::Addressee::List importContactsUnlessTheyExist( const QValueList<ContactListItem*>& items, KABC::Resource * const resource );
+ KABC::Addressee::List importContactsUnlessTheyExist( const TQValueList<ContactListItem*>& items, KABC::Resource * const resource );
protected:
- QString selectedEMails() const;
+ TQString selectedEMails() const;
- virtual void closeEvent( QCloseEvent* );
+ virtual void closeEvent( TQCloseEvent* );
private:
void saveSettings();
@@ -93,12 +93,12 @@ class LDAPSearchDialog : public KDialogBase
KPIM::DistributionList selectDistributionList();
#endif
- QString makeFilter( const QString& query, const QString& attr, bool startsWith );
+ TQString makeFilter( const TQString& query, const TQString& attr, bool startsWith );
void cancelQuery();
int mNumHosts;
- QPtrList<KPIM::LdapClient> mLdapClientList;
+ TQPtrList<KPIM::LdapClient> mLdapClientList;
bool mIsOK;
KABC::AddressBook *mAddressBook;
KABCore *mCore;
@@ -107,9 +107,9 @@ class LDAPSearchDialog : public KDialogBase
KComboBox* mSearchType;
KLineEdit* mSearchEdit;
- QCheckBox* mRecursiveCheckbox;
- QListView* mResultListView;
- QPushButton* mSearchButton;
+ TQCheckBox* mRecursiveCheckbox;
+ TQListView* mResultListView;
+ TQPushButton* mSearchButton;
class Private;
Private* const d;
};
diff --git a/kaddressbook/main.cpp b/kaddressbook/main.cpp
index bfb5f8159..48cf08b6d 100644
--- a/kaddressbook/main.cpp
+++ b/kaddressbook/main.cpp
@@ -24,7 +24,7 @@
#include <stdlib.h>
#include <unistd.h>
-#include <qstring.h>
+#include <tqstring.h>
#include <kabc/stdaddressbook.h>
#include <kaboutdata.h>
@@ -74,7 +74,7 @@ int KAddressBookApp::newInstance()
// otherwise, leave the window like it is (hidden or shown)
KStartupInfo::appStarted();
} else {
- QString file;
+ TQString file;
if ( args->isSet( "document" ) ) {
file = args->getOption( "document" );
}
diff --git a/kaddressbook/nameeditdialog.cpp b/kaddressbook/nameeditdialog.cpp
index fc29eda8d..3e2191ff9 100644
--- a/kaddressbook/nameeditdialog.cpp
+++ b/kaddressbook/nameeditdialog.cpp
@@ -21,15 +21,15 @@
without including the source code for Qt in the source distribution.
*/
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qlistbox.h>
-#include <qlistview.h>
-#include <qtooltip.h>
-#include <qpushbutton.h>
-#include <qcheckbox.h>
-#include <qstring.h>
-#include <qwhatsthis.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqlistbox.h>
+#include <tqlistview.h>
+#include <tqtooltip.h>
+#include <tqpushbutton.h>
+#include <tqcheckbox.h>
+#include <tqstring.h>
+#include <tqwhatsthis.h>
#include <kaccelmanager.h>
#include <kapplication.h>
@@ -46,17 +46,17 @@
#include "nameeditdialog.h"
NameEditDialog::NameEditDialog( const KABC::Addressee &addr, int type,
- bool readOnly, QWidget *parent, const char *name )
+ bool readOnly, TQWidget *parent, const char *name )
: KDialogBase( Plain, i18n( "Edit Contact Name" ), Help | Ok | Cancel,
Ok, parent, name, true ), mAddressee( addr )
{
- QWidget *page = plainPage();
- QGridLayout *layout = new QGridLayout( page );
+ TQWidget *page = plainPage();
+ TQGridLayout *layout = new TQGridLayout( page );
layout->setSpacing( spacingHint() );
layout->addColSpacing( 2, 100 );
- QLabel *label;
+ TQLabel *label;
- label = new QLabel( i18n( "Honorific prefixes:" ), page );
+ label = new TQLabel( i18n( "Honorific prefixes:" ), page );
layout->addWidget( label, 0, 0 );
mPrefixCombo = new KComboBox( page );
mPrefixCombo->setDuplicatesEnabled( false );
@@ -65,30 +65,30 @@ NameEditDialog::NameEditDialog( const KABC::Addressee &addr, int type,
label->setBuddy( mPrefixCombo );
layout->addMultiCellWidget( mPrefixCombo, 0, 0, 1, 2 );
- QWhatsThis::add( mPrefixCombo, i18n( "The predefined honorific prefixes can be extended in the settings dialog." ) );
+ TQWhatsThis::add( mPrefixCombo, i18n( "The predefined honorific prefixes can be extended in the settings dialog." ) );
- label = new QLabel( i18n( "Given name:" ), page );
+ label = new TQLabel( i18n( "Given name:" ), page );
layout->addWidget( label, 1, 0 );
mGivenNameEdit = new KLineEdit( page );
mGivenNameEdit->setReadOnly( readOnly );
label->setBuddy( mGivenNameEdit );
layout->addMultiCellWidget( mGivenNameEdit, 1, 1, 1, 2 );
- label = new QLabel( i18n( "Additional names:" ), page );
+ label = new TQLabel( i18n( "Additional names:" ), page );
layout->addWidget( label, 2, 0 );
mAdditionalNameEdit = new KLineEdit( page );
mAdditionalNameEdit->setReadOnly( readOnly );
label->setBuddy( mAdditionalNameEdit );
layout->addMultiCellWidget( mAdditionalNameEdit, 2, 2, 1, 2 );
- label = new QLabel( i18n( "Family names:" ), page );
+ label = new TQLabel( i18n( "Family names:" ), page );
layout->addWidget( label, 3, 0 );
mFamilyNameEdit = new KLineEdit( page );
mFamilyNameEdit->setReadOnly( readOnly );
label->setBuddy( mFamilyNameEdit );
layout->addMultiCellWidget( mFamilyNameEdit, 3, 3, 1, 2 );
- label = new QLabel( i18n( "Honorific suffixes:" ), page );
+ label = new TQLabel( i18n( "Honorific suffixes:" ), page );
layout->addWidget( label, 4, 0 );
mSuffixCombo = new KComboBox( page );
mSuffixCombo->setDuplicatesEnabled( false );
@@ -97,24 +97,24 @@ NameEditDialog::NameEditDialog( const KABC::Addressee &addr, int type,
label->setBuddy( mSuffixCombo );
layout->addMultiCellWidget( mSuffixCombo, 4, 4, 1, 2 );
- QWhatsThis::add( mSuffixCombo, i18n( "The predefined honorific suffixes can be extended in the settings dialog." ) );
+ TQWhatsThis::add( mSuffixCombo, i18n( "The predefined honorific suffixes can be extended in the settings dialog." ) );
- label = new QLabel( i18n( "Formatted name:" ), page );
+ label = new TQLabel( i18n( "Formatted name:" ), page );
layout->addWidget( label, 5, 0 );
mFormattedNameCombo = new KComboBox( page );
mFormattedNameCombo->setEnabled( !readOnly );
layout->addWidget( mFormattedNameCombo, 5, 1 );
- connect( mFormattedNameCombo, SIGNAL( activated( int ) ), SLOT( typeChanged( int ) ) );
+ connect( mFormattedNameCombo, TQT_SIGNAL( activated( int ) ), TQT_SLOT( typeChanged( int ) ) );
mFormattedNameEdit = new KLineEdit( page );
mFormattedNameEdit->setEnabled( type == CustomName && !readOnly );
layout->addWidget( mFormattedNameEdit, 5, 2 );
- mParseBox = new QCheckBox( i18n( "Parse name automatically" ), page );
+ mParseBox = new TQCheckBox( i18n( "Parse name automatically" ), page );
mParseBox->setEnabled( !readOnly );
- connect( mParseBox, SIGNAL( toggled(bool) ), SLOT( parseBoxChanged(bool) ) );
- connect( mParseBox, SIGNAL( toggled(bool) ), SLOT( modified() ) );
+ connect( mParseBox, TQT_SIGNAL( toggled(bool) ), TQT_SLOT( parseBoxChanged(bool) ) );
+ connect( mParseBox, TQT_SIGNAL( toggled(bool) ), TQT_SLOT( modified() ) );
layout->addMultiCellWidget( mParseBox, 6, 6, 0, 1 );
// Fill in the values
@@ -127,7 +127,7 @@ NameEditDialog::NameEditDialog( const KABC::Addressee &addr, int type,
KConfig config( "kabcrc" );
config.setGroup( "General" );
- QStringList sTitle;
+ TQStringList sTitle;
sTitle += "";
sTitle += i18n( "Dr." );
sTitle += i18n( "Miss" );
@@ -138,7 +138,7 @@ NameEditDialog::NameEditDialog( const KABC::Addressee &addr, int type,
sTitle += config.readListEntry( "Prefixes" );
sTitle.sort();
- QStringList sSuffix;
+ TQStringList sSuffix;
sSuffix += "";
sSuffix += i18n( "I" );
sSuffix += i18n( "II" );
@@ -159,24 +159,24 @@ NameEditDialog::NameEditDialog( const KABC::Addressee &addr, int type,
KAcceleratorManager::manage( this );
- connect( mPrefixCombo, SIGNAL( textChanged( const QString& ) ),
- this, SLOT( modified() ) );
- connect( mGivenNameEdit, SIGNAL( textChanged( const QString& ) ),
- this, SLOT( modified() ) );
- connect( mAdditionalNameEdit, SIGNAL( textChanged( const QString& ) ),
- this, SLOT( modified() ) );
- connect( mFamilyNameEdit, SIGNAL( textChanged( const QString& ) ),
- this, SLOT( modified() ) );
- connect( mSuffixCombo, SIGNAL( textChanged( const QString& ) ),
- this, SLOT( modified() ) );
- connect( mFormattedNameCombo, SIGNAL( activated( int ) ),
- this, SLOT( modified() ) );
- connect( mFormattedNameCombo, SIGNAL( activated( int ) ),
- this, SLOT( formattedNameTypeChanged() ) );
- connect( mFormattedNameEdit, SIGNAL( textChanged( const QString& ) ),
- this, SLOT( modified() ) );
- connect( mFormattedNameEdit, SIGNAL( textChanged( const QString& ) ),
- this, SLOT( formattedNameChanged( const QString& ) ) );
+ connect( mPrefixCombo, TQT_SIGNAL( textChanged( const TQString& ) ),
+ this, TQT_SLOT( modified() ) );
+ connect( mGivenNameEdit, TQT_SIGNAL( textChanged( const TQString& ) ),
+ this, TQT_SLOT( modified() ) );
+ connect( mAdditionalNameEdit, TQT_SIGNAL( textChanged( const TQString& ) ),
+ this, TQT_SLOT( modified() ) );
+ connect( mFamilyNameEdit, TQT_SIGNAL( textChanged( const TQString& ) ),
+ this, TQT_SLOT( modified() ) );
+ connect( mSuffixCombo, TQT_SIGNAL( textChanged( const TQString& ) ),
+ this, TQT_SLOT( modified() ) );
+ connect( mFormattedNameCombo, TQT_SIGNAL( activated( int ) ),
+ this, TQT_SLOT( modified() ) );
+ connect( mFormattedNameCombo, TQT_SIGNAL( activated( int ) ),
+ this, TQT_SLOT( formattedNameTypeChanged() ) );
+ connect( mFormattedNameEdit, TQT_SIGNAL( textChanged( const TQString& ) ),
+ this, TQT_SLOT( modified() ) );
+ connect( mFormattedNameEdit, TQT_SIGNAL( textChanged( const TQString& ) ),
+ this, TQT_SLOT( formattedNameChanged( const TQString& ) ) );
initTypeCombo();
mFormattedNameCombo->setCurrentItem( type );
@@ -188,32 +188,32 @@ NameEditDialog::~NameEditDialog()
{
}
-QString NameEditDialog::familyName() const
+TQString NameEditDialog::familyName() const
{
return mFamilyNameEdit->text();
}
-QString NameEditDialog::givenName() const
+TQString NameEditDialog::givenName() const
{
return mGivenNameEdit->text();
}
-QString NameEditDialog::prefix() const
+TQString NameEditDialog::prefix() const
{
return mPrefixCombo->currentText();
}
-QString NameEditDialog::suffix() const
+TQString NameEditDialog::suffix() const
{
return mSuffixCombo->currentText();
}
-QString NameEditDialog::additionalName() const
+TQString NameEditDialog::additionalName() const
{
return mAdditionalNameEdit->text();
}
-QString NameEditDialog::customFormattedName() const
+TQString NameEditDialog::customFormattedName() const
{
return mFormattedNameEdit->text();
}
@@ -230,7 +230,7 @@ bool NameEditDialog::changed() const
void NameEditDialog::formattedNameTypeChanged()
{
- QString name;
+ TQString name;
if ( formattedNameType() == CustomName )
name = mCustomFormattedName;
@@ -249,9 +249,9 @@ void NameEditDialog::formattedNameTypeChanged()
mFormattedNameEdit->setText( name );
}
-QString NameEditDialog::formattedName( const KABC::Addressee &addr, int type )
+TQString NameEditDialog::formattedName( const KABC::Addressee &addr, int type )
{
- QString name;
+ TQString name;
switch ( type ) {
case SimpleName:
@@ -287,7 +287,7 @@ void NameEditDialog::typeChanged( int pos )
mFormattedNameEdit->setEnabled( pos == 0 );
}
-void NameEditDialog::formattedNameChanged( const QString &name )
+void NameEditDialog::formattedNameChanged( const TQString &name )
{
if ( formattedNameType() == CustomName )
mCustomFormattedName = name;
diff --git a/kaddressbook/nameeditdialog.h b/kaddressbook/nameeditdialog.h
index 6581eccac..6ba602c92 100644
--- a/kaddressbook/nameeditdialog.h
+++ b/kaddressbook/nameeditdialog.h
@@ -53,20 +53,20 @@ class NameEditDialog : public KDialogBase
};
NameEditDialog( const KABC::Addressee &addr, int type,
- bool readOnly, QWidget *parent, const char *name = 0 );
+ bool readOnly, TQWidget *parent, const char *name = 0 );
~NameEditDialog();
- QString familyName() const;
- QString givenName() const;
- QString prefix() const;
- QString suffix() const;
- QString additionalName() const;
- QString customFormattedName() const;
+ TQString familyName() const;
+ TQString givenName() const;
+ TQString prefix() const;
+ TQString suffix() const;
+ TQString additionalName() const;
+ TQString customFormattedName() const;
int formattedNameType() const;
bool changed() const;
- static QString formattedName( const KABC::Addressee &addr, int type );
+ static TQString formattedName( const KABC::Addressee &addr, int type );
protected slots:
void slotHelp();
@@ -74,7 +74,7 @@ class NameEditDialog : public KDialogBase
private slots:
void parseBoxChanged( bool );
void formattedNameTypeChanged();
- void formattedNameChanged( const QString& );
+ void formattedNameChanged( const TQString& );
void typeChanged( int );
void initTypeCombo();
void modified();
@@ -87,11 +87,11 @@ class NameEditDialog : public KDialogBase
KLineEdit *mGivenNameEdit;
KLineEdit *mAdditionalNameEdit;
KLineEdit *mFormattedNameEdit;
- QCheckBox *mParseBox;
+ TQCheckBox *mParseBox;
AddresseeConfig mAddresseeConfig;
KABC::Addressee mAddressee;
- QString mCustomFormattedName;
+ TQString mCustomFormattedName;
bool mChanged;
};
diff --git a/kaddressbook/phoneeditwidget.cpp b/kaddressbook/phoneeditwidget.cpp
index 6b696dc93..71a9f504f 100644
--- a/kaddressbook/phoneeditwidget.cpp
+++ b/kaddressbook/phoneeditwidget.cpp
@@ -21,16 +21,16 @@
without including the source code for Qt in the source distribution.
*/
-#include <qbuttongroup.h>
-#include <qcheckbox.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qlistbox.h>
-#include <qlistview.h>
-#include <qpushbutton.h>
-#include <qsignalmapper.h>
-#include <qstring.h>
-#include <qtooltip.h>
+#include <tqbuttongroup.h>
+#include <tqcheckbox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqlistbox.h>
+#include <tqlistview.h>
+#include <tqpushbutton.h>
+#include <tqsignalmapper.h>
+#include <tqstring.h>
+#include <tqtooltip.h>
#include <kapplication.h>
#include <kbuttonbox.h>
@@ -46,7 +46,7 @@
#include "phoneeditwidget.h"
-PhoneTypeCombo::PhoneTypeCombo( QWidget *parent )
+PhoneTypeCombo::PhoneTypeCombo( TQWidget *parent )
: KComboBox( parent, "TypeCombo" ),
mType( KABC::PhoneNumber::Home ),
mLastSelected( 0 ),
@@ -56,10 +56,10 @@ PhoneTypeCombo::PhoneTypeCombo( QWidget *parent )
update();
- connect( this, SIGNAL( activated( int ) ),
- this, SLOT( selected( int ) ) );
- connect( this, SIGNAL( activated( int ) ),
- this, SIGNAL( modified() ) );
+ connect( this, TQT_SIGNAL( activated( int ) ),
+ this, TQT_SLOT( selected( int ) ) );
+ connect( this, TQT_SIGNAL( activated( int ) ),
+ this, TQT_SIGNAL( modified() ) );
}
PhoneTypeCombo::~PhoneTypeCombo()
@@ -86,7 +86,7 @@ void PhoneTypeCombo::update()
blockSignals( true );
clear();
- QValueList<int>::ConstIterator it;
+ TQValueList<int>::ConstIterator it;
for ( it = mTypeList.begin(); it != mTypeList.end(); ++it ) {
if ( *it == -1 ) { // "Other..." entry
insertItem( i18n( "Other..." ) );
@@ -126,10 +126,10 @@ void PhoneTypeCombo::otherSelected()
update();
}
-PhoneNumberWidget::PhoneNumberWidget( QWidget *parent )
- : QWidget( parent )
+PhoneNumberWidget::PhoneNumberWidget( TQWidget *parent )
+ : TQWidget( parent )
{
- QHBoxLayout *layout = new QHBoxLayout( this, 6, 11 );
+ TQHBoxLayout *layout = new TQHBoxLayout( this, 6, 11 );
mTypeCombo = new PhoneTypeCombo( this );
mNumberEdit = new KLineEdit( this );
@@ -137,8 +137,8 @@ PhoneNumberWidget::PhoneNumberWidget( QWidget *parent )
layout->addWidget( mTypeCombo );
layout->addWidget( mNumberEdit );
- connect( mTypeCombo, SIGNAL( modified() ), SIGNAL( modified() ) );
- connect( mNumberEdit, SIGNAL( textChanged( const QString& ) ), SIGNAL( modified() ) );
+ connect( mTypeCombo, TQT_SIGNAL( modified() ), TQT_SIGNAL( modified() ) );
+ connect( mNumberEdit, TQT_SIGNAL( textChanged( const TQString& ) ), TQT_SIGNAL( modified() ) );
}
void PhoneNumberWidget::setNumber( const KABC::PhoneNumber &number )
@@ -166,28 +166,28 @@ void PhoneNumberWidget::setReadOnly( bool readOnly )
}
-PhoneEditWidget::PhoneEditWidget( QWidget *parent, const char *name )
- : QWidget( parent, name ), mReadOnly( false )
+PhoneEditWidget::PhoneEditWidget( TQWidget *parent, const char *name )
+ : TQWidget( parent, name ), mReadOnly( false )
{
- QGridLayout *layout = new QGridLayout( this, 2, 2 );
+ TQGridLayout *layout = new TQGridLayout( this, 2, 2 );
layout->setSpacing( KDialog::spacingHint() );
- mWidgetLayout = new QVBoxLayout( layout );
+ mWidgetLayout = new TQVBoxLayout( layout );
layout->addMultiCellLayout( mWidgetLayout, 0, 0, 0, 1 );
- mAddButton = new QPushButton( i18n( "Add" ), this );
+ mAddButton = new TQPushButton( i18n( "Add" ), this );
mAddButton->setMaximumSize( mAddButton->sizeHint() );
layout->addWidget( mAddButton, 1, 0, Qt::AlignRight );
- mRemoveButton = new QPushButton( i18n( "Remove" ), this );
+ mRemoveButton = new TQPushButton( i18n( "Remove" ), this );
mRemoveButton->setMaximumSize( mRemoveButton->sizeHint() );
layout->addWidget( mRemoveButton, 1, 1 );
- mMapper = new QSignalMapper( this );
- connect( mMapper, SIGNAL( mapped( int ) ), SLOT( changed( int ) ) );
+ mMapper = new TQSignalMapper( this );
+ connect( mMapper, TQT_SIGNAL( mapped( int ) ), TQT_SLOT( changed( int ) ) );
- connect( mAddButton, SIGNAL( clicked() ), SLOT( add() ) );
- connect( mRemoveButton, SIGNAL( clicked() ), SLOT( remove() ) );
+ connect( mAddButton, TQT_SIGNAL( clicked() ), TQT_SLOT( add() ) );
+ connect( mRemoveButton, TQT_SIGNAL( clicked() ), TQT_SLOT( remove() ) );
}
PhoneEditWidget::~PhoneEditWidget()
@@ -200,7 +200,7 @@ void PhoneEditWidget::setReadOnly( bool readOnly )
mAddButton->setEnabled( !readOnly );
mRemoveButton->setEnabled( !readOnly && mPhoneNumberList.count() > 3 );
- QPtrListIterator<PhoneNumberWidget> it( mWidgets );
+ TQPtrListIterator<PhoneNumberWidget> it( mWidgets );
while ( it.current() ) {
it.current()->setReadOnly( readOnly );
++it;
@@ -259,7 +259,7 @@ void PhoneEditWidget::remove()
void PhoneEditWidget::recreateNumberWidgets()
{
- for ( QWidget *w = mWidgets.first(); w; w = mWidgets.next() ) {
+ for ( TQWidget *w = mWidgets.first(); w; w = mWidgets.next() ) {
mWidgetLayout->remove( w );
w->deleteLater();
}
@@ -272,7 +272,7 @@ void PhoneEditWidget::recreateNumberWidgets()
wdg->setNumber( *it );
mMapper->setMapping( wdg, counter );
- connect( wdg, SIGNAL( modified() ), mMapper, SLOT( map() ) );
+ connect( wdg, TQT_SIGNAL( modified() ), mMapper, TQT_SLOT( map() ) );
mWidgetLayout->addWidget( wdg );
mWidgets.append( wdg );
@@ -291,19 +291,19 @@ void PhoneEditWidget::changed( int pos )
///////////////////////////////////////////
// PhoneTypeDialog
-PhoneTypeDialog::PhoneTypeDialog( int type, QWidget *parent )
+PhoneTypeDialog::PhoneTypeDialog( int type, TQWidget *parent )
: KDialogBase( Plain, i18n( "Edit Phone Number" ), Ok | Cancel, Ok,
parent, "PhoneTypeDialog", true ),
mType( type )
{
- QWidget *page = plainPage();
+ TQWidget *page = plainPage();
- QVBoxLayout *layout = new QVBoxLayout( page, spacingHint() );
+ TQVBoxLayout *layout = new TQVBoxLayout( page, spacingHint() );
- mPreferredBox = new QCheckBox( i18n( "This is the preferred phone number" ), page );
+ mPreferredBox = new TQCheckBox( i18n( "This is the preferred phone number" ), page );
layout->addWidget( mPreferredBox );
- mGroup = new QButtonGroup( 2, Horizontal, i18n( "Types" ), page );
+ mGroup = new TQButtonGroup( 2, Horizontal, i18n( "Types" ), page );
layout->addWidget( mGroup );
// fill widgets
@@ -312,10 +312,10 @@ PhoneTypeDialog::PhoneTypeDialog( int type, QWidget *parent )
KABC::PhoneNumber::TypeList::ConstIterator it;
for ( it = mTypeList.begin(); it != mTypeList.end(); ++it )
- new QCheckBox( KABC::PhoneNumber::typeLabel( *it ), mGroup );
+ new TQCheckBox( KABC::PhoneNumber::typeLabel( *it ), mGroup );
for ( int i = 0; i < mGroup->count(); ++i ) {
- QCheckBox *box = (QCheckBox*)mGroup->find( i );
+ TQCheckBox *box = (TQCheckBox*)mGroup->find( i );
box->setChecked( mType & mTypeList[ i ] );
}
@@ -327,7 +327,7 @@ int PhoneTypeDialog::type() const
int type = 0;
for ( int i = 0; i < mGroup->count(); ++i ) {
- QCheckBox *box = (QCheckBox*)mGroup->find( i );
+ TQCheckBox *box = (TQCheckBox*)mGroup->find( i );
if ( box->isChecked() )
type += mTypeList[ i ];
}
diff --git a/kaddressbook/phoneeditwidget.h b/kaddressbook/phoneeditwidget.h
index e123f68a0..7089d1c2b 100644
--- a/kaddressbook/phoneeditwidget.h
+++ b/kaddressbook/phoneeditwidget.h
@@ -41,7 +41,7 @@ class PhoneTypeCombo : public KComboBox
Q_OBJECT
public:
- PhoneTypeCombo( QWidget *parent );
+ PhoneTypeCombo( TQWidget *parent );
~PhoneTypeCombo();
void setType( int type );
@@ -59,7 +59,7 @@ class PhoneTypeCombo : public KComboBox
int mType;
int mLastSelected;
- QValueList<int> mTypeList;
+ TQValueList<int> mTypeList;
};
class PhoneNumberWidget : public QWidget
@@ -67,7 +67,7 @@ class PhoneNumberWidget : public QWidget
Q_OBJECT
public:
- PhoneNumberWidget( QWidget *parent );
+ PhoneNumberWidget( TQWidget *parent );
void setNumber( const KABC::PhoneNumber &number );
KABC::PhoneNumber number() const;
@@ -91,7 +91,7 @@ class PhoneEditWidget : public QWidget
Q_OBJECT
public:
- PhoneEditWidget( QWidget *parent, const char *name = 0 );
+ PhoneEditWidget( TQWidget *parent, const char *name = 0 );
~PhoneEditWidget();
void setPhoneNumbers( const KABC::PhoneNumber::List &list );
@@ -112,14 +112,14 @@ class PhoneEditWidget : public QWidget
void recreateNumberWidgets();
KABC::PhoneNumber::List mPhoneNumberList;
- QPtrList<PhoneNumberWidget> mWidgets;
+ TQPtrList<PhoneNumberWidget> mWidgets;
- QPushButton *mAddButton;
- QPushButton *mRemoveButton;
- QVBoxLayout *mWidgetLayout;
+ TQPushButton *mAddButton;
+ TQPushButton *mRemoveButton;
+ TQVBoxLayout *mWidgetLayout;
bool mReadOnly;
- QSignalMapper *mMapper;
+ TQSignalMapper *mMapper;
};
/**
@@ -129,7 +129,7 @@ class PhoneTypeDialog : public KDialogBase
{
Q_OBJECT
public:
- PhoneTypeDialog( int type, QWidget *parent );
+ PhoneTypeDialog( int type, TQWidget *parent );
int type() const;
@@ -137,8 +137,8 @@ class PhoneTypeDialog : public KDialogBase
int mType;
KABC::PhoneNumber::TypeList mTypeList;
- QButtonGroup *mGroup;
- QCheckBox *mPreferredBox;
+ TQButtonGroup *mGroup;
+ TQCheckBox *mPreferredBox;
};
#endif
diff --git a/kaddressbook/printing/detailledstyle.cpp b/kaddressbook/printing/detailledstyle.cpp
index 78283a080..39046481c 100644
--- a/kaddressbook/printing/detailledstyle.cpp
+++ b/kaddressbook/printing/detailledstyle.cpp
@@ -22,18 +22,18 @@
*/
#include <kapplication.h>
-#include <qcheckbox.h>
+#include <tqcheckbox.h>
#include <kcolorbutton.h>
#include <kconfig.h>
#include <kdebug.h>
#include <kdialog.h>
#include <kfontcombo.h>
#include <kglobalsettings.h>
-#include <qlayout.h>
+#include <tqlayout.h>
#include <klocale.h>
#include <knuminput.h>
-#include <qpaintdevicemetrics.h>
-#include <qpainter.h>
+#include <tqpaintdevicemetrics.h>
+#include <tqpainter.h>
#include <kprinter.h>
#include <kstandarddirs.h>
@@ -70,10 +70,10 @@ DetailledPrintStyle::DetailledPrintStyle( PrintingWizard *parent, const char *na
mPrintProgress( 0 )
{
KConfig *config;
- QFont font;
+ TQFont font;
bool kdeFonts;
- QFont standard = KGlobalSettings::generalFont();
- QFont fixed = KGlobalSettings::fixedFont();
+ TQFont standard = KGlobalSettings::generalFont();
+ TQFont fixed = KGlobalSettings::fixedFont();
setPreview( "detailed-style.png" );
@@ -130,19 +130,19 @@ void DetailledPrintStyle::print( const KABC::Addressee::List &contacts, PrintPro
progress->setProgress( 0 );
bool useKDEFonts;
- QFont font;
- QColor foreColor = Qt::black;
- QColor headerColor = Qt::white;
+ TQFont font;
+ TQColor foreColor = Qt::black;
+ TQColor headerColor = Qt::white;
bool useHeaderColor = true;
- QColor backColor = Qt::black;
+ TQColor backColor = Qt::black;
bool useBGColor;
// save, always available defaults:
- QFont header = QFont("Helvetica", 12, QFont::Normal);
- QFont headlines = QFont("Helvetica", 12, QFont::Normal, true);
- QFont body = QFont("Helvetica", 12, QFont::Normal);
- QFont fixed = QFont("Courier", 12, QFont::Normal);
- QFont comment = QFont("Helvetica", 10, QFont::Normal);
+ TQFont header = TQFont("Helvetica", 12, TQFont::Normal);
+ TQFont headlines = TQFont("Helvetica", 12, TQFont::Normal, true);
+ TQFont body = TQFont("Helvetica", 12, TQFont::Normal);
+ TQFont fixed = TQFont("Courier", 12, TQFont::Normal);
+ TQFont comment = TQFont("Helvetica", 10, TQFont::Normal);
// store the configuration settings:
KConfig *config = kapp->config();
@@ -163,7 +163,7 @@ void DetailledPrintStyle::print( const KABC::Addressee::List &contacts, PrintPro
}
if ( mPageAppearance->cbStandardFonts->isChecked() ) {
- QFont standard = KGlobalSettings::generalFont();
+ TQFont standard = KGlobalSettings::generalFont();
header = standard;
headlines = standard;
body = standard;
@@ -208,7 +208,7 @@ void DetailledPrintStyle::print( const KABC::Addressee::List &contacts, PrintPro
KPrinter *printer = wizard()->printer();
- QPainter painter;
+ TQPainter painter;
progress->addMessage( i18n( "Setting up margins and spacing" ) );
int marginTop = 0,
marginLeft = 64, // to allow stapling, need refinement with two-side prints
@@ -220,7 +220,7 @@ void DetailledPrintStyle::print( const KABC::Addressee::List &contacts, PrintPro
painter.begin( printer );
printer->setFullPage( true ); // use whole page
- QPaintDeviceMetrics metrics( printer );
+ TQPaintDeviceMetrics metrics( printer );
left = QMAX( printer->margins().width(), marginLeft );
top = QMAX( printer->margins().height(), marginTop );
@@ -231,7 +231,7 @@ void DetailledPrintStyle::print( const KABC::Addressee::List &contacts, PrintPro
progress->addMessage( i18n( "Printing" ) );
printEntries( contacts, printer, &painter,
- QRect( 0, 0, metrics.width(), metrics.height() ) );
+ TQRect( 0, 0, metrics.width(), metrics.height() ) );
progress->addMessage( i18n( "Done" ) );
painter.end();
@@ -241,10 +241,10 @@ void DetailledPrintStyle::print( const KABC::Addressee::List &contacts, PrintPro
bool DetailledPrintStyle::printEntries( const KABC::Addressee::List &contacts,
KPrinter *printer,
- QPainter *painter,
- const QRect &window)
+ TQPainter *painter,
+ const TQRect &window)
{
- QRect brect;
+ TQRect brect;
int ypos = 0, count = 0;
KABC::Addressee::List::ConstIterator it;
@@ -283,7 +283,7 @@ PrintStyle *DetailledPrintStyleFactory::create() const
return new DetailledPrintStyle( mParent, mName );
}
-QString DetailledPrintStyleFactory::description() const
+TQString DetailledPrintStyleFactory::description() const
{
return i18n( "Detailed Style" );
}
diff --git a/kaddressbook/printing/detailledstyle.h b/kaddressbook/printing/detailledstyle.h
index 91c6dfe19..e8515aa0d 100644
--- a/kaddressbook/printing/detailledstyle.h
+++ b/kaddressbook/printing/detailledstyle.h
@@ -45,9 +45,9 @@ class DetailledPrintStyle : public PrintStyle
protected:
bool printEntries( const KABC::Addressee::List &contacts, KPrinter *printer,
- QPainter *painter, const QRect &window );
- bool printEntry( const KABC::Addressee &contact, const QRect &window,
- QPainter *painter, int top, bool fake, QRect *brect );
+ TQPainter *painter, const TQRect &window );
+ bool printEntry( const KABC::Addressee &contact, const TQRect &window,
+ TQPainter *painter, int top, bool fake, TQRect *brect );
private:
AppearancePage *mPageAppearance;
KABEntryPainter *mPainter;
@@ -60,7 +60,7 @@ class DetailledPrintStyleFactory : public PrintStyleFactory
DetailledPrintStyleFactory( PrintingWizard *parent, const char *name = 0 );
PrintStyle *create() const;
- QString description() const;
+ TQString description() const;
};
}
diff --git a/kaddressbook/printing/kabentrypainter.cpp b/kaddressbook/printing/kabentrypainter.cpp
index 6ae163de8..c7432d5d0 100644
--- a/kaddressbook/printing/kabentrypainter.cpp
+++ b/kaddressbook/printing/kabentrypainter.cpp
@@ -22,8 +22,8 @@
*/
-#include <qpaintdevicemetrics.h>
-#include <qpainter.h>
+#include <tqpaintdevicemetrics.h>
+#include <tqpainter.h>
#include <kdebug.h>
#include <kglobal.h>
@@ -48,42 +48,42 @@ KABEntryPainter::~KABEntryPainter()
mTalkRects.clear();
}
-void KABEntryPainter::setForegroundColor( const QColor &color )
+void KABEntryPainter::setForegroundColor( const TQColor &color )
{
mForegroundColor = color;
}
-void KABEntryPainter::setBackgroundColor( const QColor &color )
+void KABEntryPainter::setBackgroundColor( const TQColor &color )
{
mBackgroundColor = color;
}
-void KABEntryPainter::setHeaderColor( const QColor &color )
+void KABEntryPainter::setHeaderColor( const TQColor &color )
{
mHeaderColor = color;
}
-void KABEntryPainter::setHeaderFont( const QFont &font )
+void KABEntryPainter::setHeaderFont( const TQFont &font )
{
mHeaderFont = font;
}
-void KABEntryPainter::setHeadLineFont( const QFont &font )
+void KABEntryPainter::setHeadLineFont( const TQFont &font )
{
mHeadLineFont = font;
}
-void KABEntryPainter::setBodyFont( const QFont &font )
+void KABEntryPainter::setBodyFont( const TQFont &font )
{
mBodyFont = font;
}
-void KABEntryPainter::setFixedFont( const QFont &font )
+void KABEntryPainter::setFixedFont( const TQFont &font )
{
mFixedFont = font;
}
-void KABEntryPainter::setCommentFont( const QFont &font )
+void KABEntryPainter::setCommentFont( const TQFont &font )
{
mCommentFont = font;
}
@@ -113,27 +113,27 @@ void KABEntryPainter::setShowURLs( bool value )
mShowURLs = value;
}
-int KABEntryPainter::hitsEmail( const QPoint &p )
+int KABEntryPainter::hitsEmail( const TQPoint &p )
{
return hits( mEmailRects, p );
}
-int KABEntryPainter::hitsURL( const QPoint &p )
+int KABEntryPainter::hitsURL( const TQPoint &p )
{
return hits( mURLRects, p );
}
-int KABEntryPainter::hitsPhone( const QPoint &p )
+int KABEntryPainter::hitsPhone( const TQPoint &p )
{
return hits( mPhoneRects, p );
}
-int KABEntryPainter::hitsTalk( const QPoint &p )
+int KABEntryPainter::hitsTalk( const TQPoint &p )
{
return hits( mTalkRects, p );
}
-int KABEntryPainter::hits( const QRectList& list, const QPoint &p )
+int KABEntryPainter::hits( const QRectList& list, const TQPoint &p )
{
QRectList::const_iterator pos;
int count = 0;
@@ -149,8 +149,8 @@ int KABEntryPainter::hits( const QRectList& list, const QPoint &p )
}
bool KABEntryPainter::printAddressee( const KABC::Addressee &addr,
- const QRect &window, QPainter *painter,
- int top, bool fake, QRect *brect )
+ const TQRect &window, TQPainter *painter,
+ int top, bool fake, TQRect *brect )
{
// TODO: custom fields, custom (?) for Entry
const int Width = window.width();
@@ -158,23 +158,23 @@ bool KABEntryPainter::printAddressee( const KABC::Addressee &addr,
const int Ruler1 = Width/32;
const int Ruler2 = 2 * Ruler1;
const int Ruler3 = 3 * Ruler1;
- QString text, line1, line2, line3, line4;
- QRect rect;
+ TQString text, line1, line2, line3, line4;
+ TQRect rect;
// settings derived from the options:
- QFontMetrics fmHeader( mHeaderFont );
- QFontMetrics fmHeadLine( mHeadLineFont );
- QFontMetrics fmBody( mBodyFont );
- QFontMetrics fmFixed( mFixedFont );
- QFontMetrics fmComment( mCommentFont );
+ TQFontMetrics fmHeader( mHeaderFont );
+ TQFontMetrics fmHeadLine( mHeadLineFont );
+ TQFontMetrics fmBody( mBodyFont );
+ TQFontMetrics fmFixed( mFixedFont );
+ TQFontMetrics fmComment( mCommentFont );
int y = top;
KABC::Address address;
// this is used to prepare some fields for printing and decide about
// the layout later:
- QValueList<QStringList> parts;
- QValueList<QRectList*> contents;
+ TQValueList<TQStringList> parts;
+ TQValueList<QRectList*> contents;
mEmailRects.clear();
mPhoneRects.clear();
@@ -185,7 +185,7 @@ bool KABEntryPainter::printAddressee( const KABC::Addressee &addr,
// first draw a black rectangle on top, containing the entries name, centered:
painter->setFont( mHeaderFont );
- painter->setBrush( QBrush( mBackgroundColor ) );
+ painter->setBrush( TQBrush( mBackgroundColor ) );
painter->setPen( mBackgroundColor );
text = addr.realName();
@@ -206,7 +206,7 @@ bool KABEntryPainter::printAddressee( const KABC::Addressee &addr,
}
// paint the birthday to the right:
- QDateTime dt = addr.birthday();
+ TQDateTime dt = addr.birthday();
if ( dt.isValid() ) {
line1 = KGlobal::locale()->formatDate( dt.date(), true );
if ( !fake ) {
@@ -246,7 +246,7 @@ bool KABEntryPainter::printAddressee( const KABC::Addressee &addr,
// Email addresses:
if ( !addr.emails().isEmpty() && mShowEmails ) {
contents.push_back( &mEmailRects );
- QStringList list;
+ TQStringList list;
list.append( addr.emails().count() == 1 ? i18n( "Email address:" )
: i18n( "Email addresses:" ) );
@@ -258,8 +258,8 @@ bool KABEntryPainter::printAddressee( const KABC::Addressee &addr,
const KABC::PhoneNumber::List phoneNumbers( addr.phoneNumbers() );
if ( !phoneNumbers.isEmpty() && mShowPhones ) {
contents.push_back( &mPhoneRects );
- QStringList list;
- QString line;
+ TQStringList list;
+ TQString line;
list.append( phoneNumbers.count() == 1 ? i18n( "Telephone:" )
: i18n( "Telephones:" ) );
@@ -277,7 +277,7 @@ bool KABEntryPainter::printAddressee( const KABC::Addressee &addr,
// Web pages/URLs:
if ( !addr.url().isEmpty() && addr.url().isValid() && mShowURLs ) {
contents.push_back( &mURLRects );
- QStringList list;
+ TQStringList list;
list.append( i18n( "Web page:" ) );
list += addr.url().prettyURL();
@@ -288,7 +288,7 @@ bool KABEntryPainter::printAddressee( const KABC::Addressee &addr,
// Talk addresses:
if ( !addr.talk.isEmpty() ) {
contents.push_back( &mTalkRects );
- QStringList list;
+ TQStringList list;
list.append( addr.talk.count() == 1 ? i18n( "Talk address:" )
: i18n( "Talk addresses:" ) );
@@ -297,18 +297,18 @@ bool KABEntryPainter::printAddressee( const KABC::Addressee &addr,
}
*/
- QRect limits[] = { QRect( 0, y, Width / 2, Height ),
- QRect( Width / 2, y, Width / 2, Height ),
- QRect( 0, y, Width / 2, Height ),
- QRect( Width / 2, y, Width / 2, Height ) };
+ TQRect limits[] = { TQRect( 0, y, Width / 2, Height ),
+ TQRect( Width / 2, y, Width / 2, Height ),
+ TQRect( 0, y, Width / 2, Height ),
+ TQRect( Width / 2, y, Width / 2, Height ) };
int heights[ 4 ]= { 0, 0, 0, 0 };
- QValueList<QStringList>::iterator pos = parts.begin();
- QValueList<QRectList*>::iterator rpos = contents.begin();
+ TQValueList<TQStringList>::iterator pos = parts.begin();
+ TQValueList<QRectList*>::iterator rpos = contents.begin();
for ( uint counter = 0; counter < parts.count(); ++counter ) {
const int Offset = counter > 1 ? QMAX( heights[ 0 ], heights[ 1 ] ) : 0;
- QStringList list = *pos;
+ TQStringList list = *pos;
painter->setFont( mHeadLineFont );
if ( fake ) {
@@ -399,27 +399,27 @@ bool KABEntryPainter::printAddressee( const KABC::Addressee &addr,
line1 = i18n( "Preferred Address" );
}
- line1 += QString::fromLatin1( ":" );
- text = QString::null;
+ line1 += TQString::fromLatin1( ":" );
+ text = TQString::null;
if ( !address.extended().isEmpty() )
text = address.extended().stripWhiteSpace();
if ( !text.isEmpty() ) {
- line1 = line1 + QString::fromLatin1( " (" ) + text +
- QString::fromLatin1( ")" );
+ line1 = line1 + TQString::fromLatin1( " (" ) + text +
+ TQString::fromLatin1( ")" );
}
line1 = line1.stripWhiteSpace();
line2 = address.street();
if ( !address.postOfficeBox().isEmpty() )
- line2 += QString::fromLatin1( " - " ) + address.postOfficeBox();
+ line2 += TQString::fromLatin1( " - " ) + address.postOfficeBox();
// print address in american style, this will need localisation:
line3 = address.locality() + ( address.region().isEmpty() ?
- QString::fromLatin1( "" ) : QString::fromLatin1( ", " ) +
+ TQString::fromLatin1( "" ) : TQString::fromLatin1( ", " ) +
address.region() ) + ( address.postalCode().isEmpty()
- ? QString::fromLatin1( "" ) : QString::fromLatin1( " " )
+ ? TQString::fromLatin1( "" ) : TQString::fromLatin1( " " )
+ address.postalCode() );
line4 = address.country();
@@ -512,7 +512,7 @@ bool KABEntryPainter::printAddressee( const KABC::Addressee &addr,
y += fmBody.lineSpacing() / 2;
if ( brect != 0 )
- *brect = QRect( 0, top, Width, y - top );
+ *brect = TQRect( 0, top, Width, y - top );
if ( y < Height )
return true;
diff --git a/kaddressbook/printing/kabentrypainter.h b/kaddressbook/printing/kabentrypainter.h
index 6c5b8dca9..57ce69d88 100644
--- a/kaddressbook/printing/kabentrypainter.h
+++ b/kaddressbook/printing/kabentrypainter.h
@@ -26,12 +26,12 @@
#include <kabc/addressbook.h>
-#include <qcolor.h>
-#include <qfont.h>
-#include <qrect.h>
-#include <qvaluelist.h>
+#include <tqcolor.h>
+#include <tqfont.h>
+#include <tqrect.h>
+#include <tqvaluelist.h>
-typedef QValueList<QRect> QRectList;
+typedef TQValueList<TQRect> QRectList;
class KABEntryPainter
{
@@ -41,7 +41,7 @@ class KABEntryPainter
/**
Paint one entry using the given painter. May not only be used on
- printer objects but on any suitable QPaintDevice.
+ printer objects but on any suitable TQPaintDevice.
The function does not paint a background, just the contents of the
addressee.
@@ -58,19 +58,19 @@ class KABEntryPainter
@returns false if some error happens, otherwise true.
*/
- bool printAddressee( const KABC::Addressee &addr, const QRect &window,
- QPainter *p, int top = 0, bool fake = false,
- QRect *rect = 0 );
+ bool printAddressee( const KABC::Addressee &addr, const TQRect &window,
+ TQPainter *p, int top = 0, bool fake = false,
+ TQRect *rect = 0 );
- void setForegroundColor( const QColor &color = Qt::black );
- void setBackgroundColor( const QColor &color = Qt::black );
- void setHeaderColor( const QColor &color = Qt::white );
+ void setForegroundColor( const TQColor &color = Qt::black );
+ void setBackgroundColor( const TQColor &color = Qt::black );
+ void setHeaderColor( const TQColor &color = Qt::white );
- void setHeaderFont( const QFont &font = QFont( "Helvetica", 12, QFont::Normal, true ) );
- void setHeadLineFont( const QFont &font = QFont( "Helvetica", 12, QFont::Normal, true ) );
- void setBodyFont( const QFont &font = QFont( "Helvetica", 12, QFont::Normal, true ) );
- void setFixedFont( const QFont &font = QFont( "Courier", 12, QFont::Normal, true ) );
- void setCommentFont( const QFont &font = QFont( "Helvetica", 10, QFont::Normal, true ) );
+ void setHeaderFont( const TQFont &font = TQFont( "Helvetica", 12, TQFont::Normal, true ) );
+ void setHeadLineFont( const TQFont &font = TQFont( "Helvetica", 12, TQFont::Normal, true ) );
+ void setBodyFont( const TQFont &font = TQFont( "Helvetica", 12, TQFont::Normal, true ) );
+ void setFixedFont( const TQFont &font = TQFont( "Courier", 12, TQFont::Normal, true ) );
+ void setCommentFont( const TQFont &font = TQFont( "Helvetica", 10, TQFont::Normal, true ) );
void setUseHeaderColor( bool value = true );
@@ -85,38 +85,38 @@ class KABEntryPainter
email address in the emails list. If it does not point at one of
the email addresses, -1 is returned.
*/
- int hitsEmail( const QPoint &p );
+ int hitsEmail( const TQPoint &p );
/**
Returns the index of the rectangle if the point p is inside of
one of the telephone numbers. See hitsEmail
*/
- int hitsPhone( const QPoint &p );
+ int hitsPhone( const TQPoint &p );
/**
Returns the index of the rectangle if the point p is inside of
one of the telephone numbers. See hitsEmail
*/
- int hitsTalk( const QPoint &p );
+ int hitsTalk( const TQPoint &p );
/**
Returns the index of the rectangle if the point p is inside of
one of the telephone numbers. See hitsEmail
*/
- int hitsURL( const QPoint &p );
+ int hitsURL( const TQPoint &p );
private:
- int hits( const QRectList& rects, const QPoint &p );
+ int hits( const QRectList& rects, const TQPoint &p );
- QColor mForegroundColor;
- QColor mBackgroundColor;
- QColor mHeaderColor;
+ TQColor mForegroundColor;
+ TQColor mBackgroundColor;
+ TQColor mHeaderColor;
- QFont mHeaderFont;
- QFont mHeadLineFont;
- QFont mBodyFont;
- QFont mFixedFont;
- QFont mCommentFont;
+ TQFont mHeaderFont;
+ TQFont mHeadLineFont;
+ TQFont mBodyFont;
+ TQFont mFixedFont;
+ TQFont mCommentFont;
bool mUseHeaderColor;
bool mShowAddresses;
diff --git a/kaddressbook/printing/mikesstyle.cpp b/kaddressbook/printing/mikesstyle.cpp
index 1eae4281c..9ecc57f56 100644
--- a/kaddressbook/printing/mikesstyle.cpp
+++ b/kaddressbook/printing/mikesstyle.cpp
@@ -22,8 +22,8 @@
without including the source code for Qt in the source distribution.
*/
-#include <qpaintdevicemetrics.h>
-#include <qpainter.h>
+#include <tqpaintdevicemetrics.h>
+#include <tqpainter.h>
#include <kabc/addressee.h>
#include <kapplication.h>
@@ -55,9 +55,9 @@ MikesStyle::~MikesStyle()
void MikesStyle::print( const KABC::Addressee::List &contacts, PrintProgress *progress )
{
- QFont mFont;
- QFont mBoldFont;
- QPainter p;
+ TQFont mFont;
+ TQFont mBoldFont;
+ TQPainter p;
p.begin( wizard()->printer() );
int yPos = 0, count = 0;
@@ -67,8 +67,8 @@ void MikesStyle::print( const KABC::Addressee::List &contacts, PrintProgress *pr
mFont = p.font();
mBoldFont = p.font();
mBoldFont.setBold( true );
- QFontMetrics fm( mFont );
- QPaintDeviceMetrics metrics( p.device() );
+ TQFontMetrics fm( mFont );
+ TQPaintDeviceMetrics metrics( p.device() );
int height = 0;
KABC::Addressee::List::ConstIterator it;
@@ -114,14 +114,14 @@ void MikesStyle::print( const KABC::Addressee::List &contacts, PrintProgress *pr
p.end();
}
-QString MikesStyle::trimString( const QString &text, int width, QFontMetrics &fm )
+TQString MikesStyle::trimString( const TQString &text, int width, TQFontMetrics &fm )
{
if ( fm.width( text ) <= width )
return text;
- QString dots = "...";
+ TQString dots = "...";
int dotWidth = fm.width( dots );
- QString trimmed;
+ TQString trimmed;
int charNum = 0;
while ( fm.width( trimmed ) + dotWidth < width ) {
@@ -136,17 +136,17 @@ QString MikesStyle::trimString( const QString &text, int width, QFontMetrics &fm
return trimmed;
}
-void MikesStyle::doPaint( QPainter &painter, const KABC::Addressee &addr,
- int maxHeight, const QFont &font, const QFont &bFont )
+void MikesStyle::doPaint( TQPainter &painter, const KABC::Addressee &addr,
+ int maxHeight, const TQFont &font, const TQFont &bFont )
{
- QFontMetrics fm( font );
- QFontMetrics bfm( bFont );
- QPaintDeviceMetrics metrics( painter.device() );
+ TQFontMetrics fm( font );
+ TQFontMetrics bfm( bFont );
+ TQPaintDeviceMetrics metrics( painter.device() );
int margin = 10;
int width = metrics.width() - 10;
int xPos = 5;
int yPos = 0;
- QBrush brush( Qt::lightGray );
+ TQBrush brush( Qt::lightGray );
painter.setPen( Qt::black );
painter.drawRect( xPos, yPos, width, maxHeight );
@@ -166,8 +166,8 @@ void MikesStyle::doPaint( QPainter &painter, const KABC::Addressee &addr,
KABC::Field::List fields = wizard()->addressBook()->fields();
int numFields = fields.count();
- QString label;
- QString value;
+ TQString label;
+ TQString value;
for ( int i = 0; i < numFields / 2; i++ ) {
label = fields[ i ]->label();
@@ -200,22 +200,22 @@ void MikesStyle::doPaint( QPainter &painter, const KABC::Addressee &addr,
}
}
-void MikesStyle::paintTagLine( QPainter &p, const QFont &font )
+void MikesStyle::paintTagLine( TQPainter &p, const TQFont &font )
{
- QFontMetrics fm( font );
+ TQFontMetrics fm( font );
- QString text = i18n( "Printed on %1 by KAddressBook (http://www.kde.org)" )
- .arg( KGlobal::locale()->formatDateTime( QDateTime::currentDateTime() ) );
+ TQString text = i18n( "Printed on %1 by KAddressBook (http://www.kde.org)" )
+ .arg( KGlobal::locale()->formatDateTime( TQDateTime::currentDateTime() ) );
p.setPen( Qt::black );
p.drawText( 0, fm.height(), text );
}
int MikesStyle::calcHeight( const KABC::Addressee &addr,
- const QFont &font, const QFont &bFont )
+ const TQFont &font, const TQFont &bFont )
{
- QFontMetrics fm( font );
- QFontMetrics bfm( bFont );
+ TQFontMetrics fm( font );
+ TQFontMetrics bfm( bFont );
int height = 0;
@@ -254,7 +254,7 @@ PrintStyle *MikesStyleFactory::create() const
return new MikesStyle( mParent, mName );
}
-QString MikesStyleFactory::description() const
+TQString MikesStyleFactory::description() const
{
return i18n( "Mike's Printing Style" );
}
diff --git a/kaddressbook/printing/mikesstyle.h b/kaddressbook/printing/mikesstyle.h
index 52278d390..dbfabf178 100644
--- a/kaddressbook/printing/mikesstyle.h
+++ b/kaddressbook/printing/mikesstyle.h
@@ -25,7 +25,7 @@
#ifndef MIKESSTYLE_H
#define MIKESSTYLE_H
-#include <qfont.h>
+#include <tqfont.h>
#include "printstyle.h"
@@ -44,11 +44,11 @@ class MikesStyle : public PrintStyle
void print( const KABC::Addressee::List&, PrintProgress* );
protected:
- void doPaint( QPainter &painter, const KABC::Addressee &addr, int maxHeight,
- const QFont &font, const QFont &bFont );
- int calcHeight( const KABC::Addressee &addr, const QFont &font, const QFont &bFont);
- void paintTagLine( QPainter &p, const QFont &font);
- QString trimString( const QString &text, int width, QFontMetrics &fm);
+ void doPaint( TQPainter &painter, const KABC::Addressee &addr, int maxHeight,
+ const TQFont &font, const TQFont &bFont );
+ int calcHeight( const KABC::Addressee &addr, const TQFont &font, const TQFont &bFont);
+ void paintTagLine( TQPainter &p, const TQFont &font);
+ TQString trimString( const TQString &text, int width, TQFontMetrics &fm);
};
class MikesStyleFactory : public PrintStyleFactory
@@ -57,7 +57,7 @@ class MikesStyleFactory : public PrintStyleFactory
MikesStyleFactory( PrintingWizard *parent, const char *name = 0 );
PrintStyle *create() const;
- QString description() const;
+ TQString description() const;
};
}
diff --git a/kaddressbook/printing/printingwizard.cpp b/kaddressbook/printing/printingwizard.cpp
index a961ac5fc..2bf6deaf8 100644
--- a/kaddressbook/printing/printingwizard.cpp
+++ b/kaddressbook/printing/printingwizard.cpp
@@ -22,14 +22,14 @@
without including the source code for Qt in the source distribution.
*/
-#include <qcombobox.h>
-#include <qheader.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qlistview.h>
-#include <qpixmap.h>
-#include <qpushbutton.h>
-#include <qradiobutton.h>
+#include <tqcombobox.h>
+#include <tqheader.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqlistview.h>
+#include <tqpixmap.h>
+#include <tqpushbutton.h>
+#include <tqradiobutton.h>
#include <kabc/addresseelist.h>
#include <kapplication.h>
@@ -53,7 +53,7 @@
using namespace KABPrinting;
PrintingWizard::PrintingWizard( KPrinter *printer, KABC::AddressBook* ab,
- const QStringList& selection, QWidget *parent,
+ const TQStringList& selection, TQWidget *parent,
const char* name )
: KWizard( parent, name ), mPrinter( printer ), mAddressBook( ab ),
mSelection( selection ), mStyle( 0 )
@@ -63,7 +63,7 @@ PrintingWizard::PrintingWizard( KPrinter *printer, KABC::AddressBook* ab,
insertPage( mSelectionPage, i18n("Choose Contacts to Print"), -1 );
mFilters = Filter::restore( kapp->config(), "Filter" );
- QStringList filters;
+ TQStringList filters;
for ( Filter::List::ConstIterator it = mFilters.begin(); it != mFilters.end(); ++it )
filters.append( (*it).name() );
@@ -75,7 +75,7 @@ PrintingWizard::PrintingWizard( KPrinter *printer, KABC::AddressBook* ab,
mStylePage = new StylePage( mAddressBook, this );
- connect( mStylePage, SIGNAL( styleChanged(int) ), SLOT( slotStyleSelected(int) ) );
+ connect( mStylePage, TQT_SIGNAL( styleChanged(int) ), TQT_SLOT( slotStyleSelected(int) ) );
insertPage( mStylePage, i18n("Choose Printing Style"), -1 );
registerStyles();
@@ -160,7 +160,7 @@ void PrintingWizard::print()
KABC::AddresseeList list;
if ( mStyle != 0 ) {
if ( mSelectionPage->useSelection() ) {
- QStringList::ConstIterator it;
+ TQStringList::ConstIterator it;
for ( it = mSelection.begin(); it != mSelection.end(); ++it ) {
KABC::Addressee addr = addressBook()->findByUid( *it );
if ( !addr.isEmpty() )
@@ -180,11 +180,11 @@ void PrintingWizard::print()
}
} else if ( mSelectionPage->useCategories() ) {
- QStringList categories = mSelectionPage->categories();
+ TQStringList categories = mSelectionPage->categories();
KABC::AddressBook::ConstIterator it;
for ( it = addressBook()->begin(); it != addressBook()->end(); ++it ) {
- const QStringList tmp( (*it).categories() );
- QStringList::ConstIterator tmpIt;
+ const TQStringList tmp( (*it).categories() );
+ TQStringList::ConstIterator tmpIt;
for ( tmpIt = tmp.begin(); tmpIt != tmp.end(); ++tmpIt )
if ( categories.contains( *tmpIt ) ) {
list.append( *it );
diff --git a/kaddressbook/printing/printingwizard.h b/kaddressbook/printing/printingwizard.h
index 528aac71f..8e6a678b5 100644
--- a/kaddressbook/printing/printingwizard.h
+++ b/kaddressbook/printing/printingwizard.h
@@ -25,8 +25,8 @@
#ifndef PRINTINGWIZARD_H
#define PRINTINGWIZARD_H
-#include <qptrlist.h>
-#include <qstringlist.h>
+#include <tqptrlist.h>
+#include <tqstringlist.h>
#include <kwizard.h>
@@ -57,8 +57,8 @@ class PrintingWizard : public KWizard
*/
PrintingWizard( KPrinter *printer,
KABC::AddressBook* ab,
- const QStringList& selection,
- QWidget *parent = 0, const char *name = 0 );
+ const TQStringList& selection,
+ TQWidget *parent = 0, const char *name = 0 );
~PrintingWizard();
/**
@@ -89,12 +89,12 @@ class PrintingWizard : public KWizard
void slotStyleSelected(int);
protected:
- QPtrList<PrintStyleFactory> mStyleFactories;
- QPtrList<PrintStyle> mStyleList;
+ TQPtrList<PrintStyleFactory> mStyleFactories;
+ TQPtrList<PrintStyle> mStyleList;
Filter::List mFilters;
KPrinter *mPrinter;
KABC::AddressBook *mAddressBook;
- QStringList mSelection;
+ TQStringList mSelection;
PrintStyle *mStyle;
StylePage *mStylePage;
diff --git a/kaddressbook/printing/printprogress.cpp b/kaddressbook/printing/printprogress.cpp
index cb4a91d85..43aec8cf7 100644
--- a/kaddressbook/printing/printprogress.cpp
+++ b/kaddressbook/printing/printprogress.cpp
@@ -21,9 +21,9 @@
without including the source code for Qt in the source distribution.
*/
-#include <qlayout.h>
-#include <qprogressbar.h>
-#include <qtextbrowser.h>
+#include <tqlayout.h>
+#include <tqprogressbar.h>
+#include <tqtextbrowser.h>
#include <kapplication.h>
#include <kdebug.h>
@@ -34,41 +34,41 @@
using namespace KABPrinting;
-PrintProgress::PrintProgress( QWidget *parent, const char *name )
- : QWidget( parent, name )
+PrintProgress::PrintProgress( TQWidget *parent, const char *name )
+ : TQWidget( parent, name )
{
setCaption( i18n( "Printing: Progress" ) );
- QGridLayout *topLayout = new QGridLayout( this, 1, 1, KDialog::marginHint(),
+ TQGridLayout *topLayout = new TQGridLayout( this, 1, 1, KDialog::marginHint(),
KDialog::spacingHint() );
- mLogBrowser = new QTextBrowser( this );
+ mLogBrowser = new TQTextBrowser( this );
topLayout->addWidget( mLogBrowser, 0, 0 );
- mProgressBar = new QProgressBar( this );
+ mProgressBar = new TQProgressBar( this );
mProgressBar->setProgress( 0 );
topLayout->addWidget( mProgressBar, 1, 0 );
- resize( QSize( 370, 220 ).expandedTo( minimumSizeHint() ) );
+ resize( TQSize( 370, 220 ).expandedTo( minimumSizeHint() ) );
}
PrintProgress::~PrintProgress()
{
}
-void PrintProgress::addMessage( const QString &msg )
+void PrintProgress::addMessage( const TQString &msg )
{
mMessages.append( msg );
- QString head = QString( "<qt><b>" ) + i18n( "Progress" ) +
- QString( ":</b><ul>" );
+ TQString head = TQString( "<qt><b>" ) + i18n( "Progress" ) +
+ TQString( ":</b><ul>" );
- QString foot = QString( "</ul></qt>" );
+ TQString foot = TQString( "</ul></qt>" );
- QString body;
- QStringList::ConstIterator it;
+ TQString body;
+ TQStringList::ConstIterator it;
for ( it = mMessages.begin(); it != mMessages.end(); ++it )
- body.append( QString( "<li>" ) + (*it) + QString( "</li>" ) );
+ body.append( TQString( "<li>" ) + (*it) + TQString( "</li>" ) );
mLogBrowser->setText( head + body + foot );
kapp->processEvents();
diff --git a/kaddressbook/printing/printprogress.h b/kaddressbook/printing/printprogress.h
index fd2a494f8..83c6f3391 100644
--- a/kaddressbook/printing/printprogress.h
+++ b/kaddressbook/printing/printprogress.h
@@ -24,7 +24,7 @@
#ifndef PRINTPROGRESS_H
#define PRINTPROGRESS_H
-#include <qwidget.h>
+#include <tqwidget.h>
class QProgressBar;
class QString;
@@ -42,13 +42,13 @@ class PrintProgress : public QWidget
Q_OBJECT
public:
- PrintProgress( QWidget *parent, const char *name = 0 );
+ PrintProgress( TQWidget *parent, const char *name = 0 );
~PrintProgress();
/**
Add a message to the message log. Give the user something to admire :-)
*/
- void addMessage( const QString& );
+ void addMessage( const TQString& );
/**
Set the progress to a certain amount. Steps are from 0 to 100.
@@ -56,10 +56,10 @@ class PrintProgress : public QWidget
void setProgress( int );
private:
- QStringList mMessages;
+ TQStringList mMessages;
- QTextBrowser* mLogBrowser;
- QProgressBar* mProgressBar;
+ TQTextBrowser* mLogBrowser;
+ TQProgressBar* mProgressBar;
};
}
diff --git a/kaddressbook/printing/printsortmode.cpp b/kaddressbook/printing/printsortmode.cpp
index 49ae25557..215a5fa09 100644
--- a/kaddressbook/printing/printsortmode.cpp
+++ b/kaddressbook/printing/printsortmode.cpp
@@ -48,16 +48,16 @@ bool PrintSortMode::lesser( const KABC::Addressee &first,
if ( !mSortField )
return false;
- int result = QString::localeAwareCompare( mSortField->value( first ),
+ int result = TQString::localeAwareCompare( mSortField->value( first ),
mSortField->value( second ) );
if ( result == 0 ) {
- int givenNameResult = QString::localeAwareCompare( mGivenNameField->value( first ),
+ int givenNameResult = TQString::localeAwareCompare( mGivenNameField->value( first ),
mGivenNameField->value( second ) );
if ( givenNameResult == 0 ) {
- int familyNameResult = QString::localeAwareCompare( mFamilyNameField->value( first ),
+ int familyNameResult = TQString::localeAwareCompare( mFamilyNameField->value( first ),
mFamilyNameField->value( second ) );
if ( familyNameResult == 0 ) {
- result = QString::localeAwareCompare( mFormattedNameField->value( first ),
+ result = TQString::localeAwareCompare( mFormattedNameField->value( first ),
mFormattedNameField->value( second ) );
} else
result = familyNameResult;
diff --git a/kaddressbook/printing/printstyle.cpp b/kaddressbook/printing/printstyle.cpp
index a3cf537d4..90b196237 100644
--- a/kaddressbook/printing/printstyle.cpp
+++ b/kaddressbook/printing/printstyle.cpp
@@ -24,7 +24,7 @@
#include <kstandarddirs.h>
#include <kdebug.h>
-#include <qwidget.h>
+#include <tqwidget.h>
#include "printstyle.h"
#include "printingwizard.h"
@@ -33,7 +33,7 @@ using namespace KABPrinting;
PrintStyle::PrintStyle( PrintingWizard* parent, const char* name )
- : QObject( parent, name ), mWizard( parent ), mSortField( 0 )
+ : TQObject( parent, name ), mWizard( parent ), mSortField( 0 )
{
}
@@ -41,20 +41,20 @@ PrintStyle::~PrintStyle()
{
}
-const QPixmap& PrintStyle::preview()
+const TQPixmap& PrintStyle::preview()
{
return mPreview;
}
-void PrintStyle::setPreview( const QPixmap& image )
+void PrintStyle::setPreview( const TQPixmap& image )
{
mPreview = image;
}
-bool PrintStyle::setPreview( const QString& fileName )
+bool PrintStyle::setPreview( const TQString& fileName )
{
- QPixmap preview;
- QString path = locate( "appdata", "printing/" + fileName );
+ TQPixmap preview;
+ TQString path = locate( "appdata", "printing/" + fileName );
if ( path.isEmpty() ) {
kdDebug(5720) << "PrintStyle::setPreview: preview not locatable." << endl;
return false;
@@ -74,7 +74,7 @@ PrintingWizard *PrintStyle::wizard()
return mWizard;
}
-void PrintStyle::addPage( QWidget *page, const QString &title )
+void PrintStyle::addPage( TQWidget *page, const TQString &title )
{
if ( mPageList.find( page ) == -1 ) { // not yet in the list
mPageList.append( page );
@@ -84,7 +84,7 @@ void PrintStyle::addPage( QWidget *page, const QString &title )
void PrintStyle::showPages()
{
- QWidget *wdg = 0;
+ TQWidget *wdg = 0;
int i = 0;
for ( wdg = mPageList.first(); wdg; wdg = mPageList.next(), ++i ) {
mWizard->addPage( wdg, mPageTitles[ i ] );
@@ -98,7 +98,7 @@ void PrintStyle::showPages()
void PrintStyle::hidePages()
{
- for ( QWidget *wdg = mPageList.first(); wdg; wdg = mPageList.next() )
+ for ( TQWidget *wdg = mPageList.first(); wdg; wdg = mPageList.next() )
mWizard->removePage( wdg );
}
diff --git a/kaddressbook/printing/printstyle.h b/kaddressbook/printing/printstyle.h
index 217b80b99..19dbf3bc5 100644
--- a/kaddressbook/printing/printstyle.h
+++ b/kaddressbook/printing/printstyle.h
@@ -24,9 +24,9 @@
#ifndef PRINTSTYLE_H
#define PRINTSTYLE_H
-#include <qwidget.h>
-#include <qstringlist.h>
-#include <qpixmap.h>
+#include <tqwidget.h>
+#include <tqstringlist.h>
+#include <tqpixmap.h>
#include <kabc/field.h>
@@ -51,7 +51,7 @@ class PrintProgress;
a basic impression on how it will look. Add this image to the
printing folder (right here :-), and edit Makefile.am to have
it installed along with kaddressbook. Load it using
- setPreview(QString).
+ setPreview(TQString).
Your print style is supposed to add its options as pages to
the printing wizard. The method wizard() gives you a pointer
to the wizard object.
@@ -72,10 +72,10 @@ class PrintStyle : public QObject
/**
Reimplement this method to provide a preview of what will
- be printed. It returns an invalid QPixmap by default,
+ be printed. It returns an invalid TQPixmap by default,
resulting in a message that no preview is available.
*/
- const QPixmap& preview();
+ const TQPixmap& preview();
/**
Hide all style specific pages in the wizard.
@@ -107,12 +107,12 @@ class PrintStyle : public QObject
"printing". Give only the file name without any prefix as
the parameter.
*/
- bool setPreview( const QString& fileName );
+ bool setPreview( const TQString& fileName );
/**
Set the preview image.
*/
- void setPreview( const QPixmap& image );
+ void setPreview( const TQPixmap& image );
/**
Set preferred sort options for this printing style.
@@ -128,13 +128,13 @@ class PrintStyle : public QObject
Add additional page to the wizard e.g. a configuration page for
the style.
*/
- void addPage( QWidget *page, const QString &title );
+ void addPage( TQWidget *page, const TQString &title );
private:
PrintingWizard *mWizard;
- QPixmap mPreview;
- QPtrList<QWidget> mPageList;
- QStringList mPageTitles;
+ TQPixmap mPreview;
+ TQPtrList<TQWidget> mPageList;
+ TQStringList mPageTitles;
KABC::Field *mSortField;
bool mSortType;
@@ -159,7 +159,7 @@ class PrintStyleFactory
Overload this method to provide a one-liner description
for your print style.
*/
- virtual QString description() const = 0;
+ virtual TQString description() const = 0;
protected:
PrintingWizard* mParent;
diff --git a/kaddressbook/printing/selectionpage.cpp b/kaddressbook/printing/selectionpage.cpp
index bf6d71e00..3e8bde5f8 100644
--- a/kaddressbook/printing/selectionpage.cpp
+++ b/kaddressbook/printing/selectionpage.cpp
@@ -25,80 +25,80 @@
#include <kdialog.h>
#include <klocale.h>
-#include <qbuttongroup.h>
-#include <qcombobox.h>
-#include <qheader.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qlistview.h>
-#include <qpushbutton.h>
-#include <qradiobutton.h>
-#include <qstringlist.h>
-#include <qwhatsthis.h>
+#include <tqbuttongroup.h>
+#include <tqcombobox.h>
+#include <tqheader.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqlistview.h>
+#include <tqpushbutton.h>
+#include <tqradiobutton.h>
+#include <tqstringlist.h>
+#include <tqwhatsthis.h>
#include "selectionpage.h"
-SelectionPage::SelectionPage( QWidget* parent, const char* name )
- : QWidget( parent, name )
+SelectionPage::SelectionPage( TQWidget* parent, const char* name )
+ : TQWidget( parent, name )
{
setCaption( i18n( "Choose Which Contacts to Print" ) );
- QVBoxLayout *topLayout = new QVBoxLayout( this, KDialog::marginHint(),
+ TQVBoxLayout *topLayout = new TQVBoxLayout( this, KDialog::marginHint(),
KDialog::spacingHint() );
- QLabel *label = new QLabel( i18n( "Which contacts do you want to print?" ), this );
+ TQLabel *label = new TQLabel( i18n( "Which contacts do you want to print?" ), this );
topLayout->addWidget( label );
- mButtonGroup = new QButtonGroup( this );
- mButtonGroup->setFrameShape( QButtonGroup::NoFrame );
+ mButtonGroup = new TQButtonGroup( this );
+ mButtonGroup->setFrameShape( TQButtonGroup::NoFrame );
mButtonGroup->setColumnLayout( 0, Qt::Vertical );
mButtonGroup->layout()->setSpacing( KDialog::spacingHint() );
mButtonGroup->layout()->setMargin( KDialog::marginHint() );
- QGridLayout *groupLayout = new QGridLayout( mButtonGroup->layout() );
+ TQGridLayout *groupLayout = new TQGridLayout( mButtonGroup->layout() );
groupLayout->setAlignment( Qt::AlignTop );
- mUseWholeBook = new QRadioButton( i18n( "&All contacts" ), mButtonGroup );
+ mUseWholeBook = new TQRadioButton( i18n( "&All contacts" ), mButtonGroup );
mUseWholeBook->setChecked( true );
- QWhatsThis::add( mUseWholeBook, i18n( "Print the entire address book" ) );
+ TQWhatsThis::add( mUseWholeBook, i18n( "Print the entire address book" ) );
groupLayout->addWidget( mUseWholeBook, 0, 0 );
- mUseSelection = new QRadioButton( i18n( "&Selected contacts" ), mButtonGroup );
- QWhatsThis::add( mUseSelection, i18n( "Only print contacts selected in KAddressBook.\n"
+ mUseSelection = new TQRadioButton( i18n( "&Selected contacts" ), mButtonGroup );
+ TQWhatsThis::add( mUseSelection, i18n( "Only print contacts selected in KAddressBook.\n"
"This option is disabled if no contacts are selected." ) );
groupLayout->addWidget( mUseSelection, 1, 0 );
- mUseFilters = new QRadioButton( i18n( "Contacts matching &filter" ), mButtonGroup );
- QWhatsThis::add( mUseFilters, i18n( "Only print contacts matching the selected filter.\n"
+ mUseFilters = new TQRadioButton( i18n( "Contacts matching &filter" ), mButtonGroup );
+ TQWhatsThis::add( mUseFilters, i18n( "Only print contacts matching the selected filter.\n"
"This option is disabled if you have not defined any filters." ) );
groupLayout->addWidget( mUseFilters, 2, 0 );
- mUseCategories = new QRadioButton( i18n( "Category &members" ), mButtonGroup );
- QWhatsThis::add( mUseCategories, i18n( "Only print contacts who are members of a category that is checked on the list to the left.\n"
+ mUseCategories = new TQRadioButton( i18n( "Category &members" ), mButtonGroup );
+ TQWhatsThis::add( mUseCategories, i18n( "Only print contacts who are members of a category that is checked on the list to the left.\n"
"This option is disabled if you have no categories." ) );
groupLayout->addWidget( mUseCategories, 3, 0, Qt::AlignTop );
- mFiltersCombo = new QComboBox( false, mButtonGroup );
- QWhatsThis::add( mFiltersCombo, i18n( "Select a filter to decide which contacts to print." ) );
+ mFiltersCombo = new TQComboBox( false, mButtonGroup );
+ TQWhatsThis::add( mFiltersCombo, i18n( "Select a filter to decide which contacts to print." ) );
groupLayout->addWidget( mFiltersCombo, 2, 1 );
- mCategoriesView = new QListView( mButtonGroup );
+ mCategoriesView = new TQListView( mButtonGroup );
mCategoriesView->addColumn( "" );
mCategoriesView->header()->hide();
- QWhatsThis::add( mCategoriesView, i18n( "Check the categories whose members you want to print." ) );
+ TQWhatsThis::add( mCategoriesView, i18n( "Check the categories whose members you want to print." ) );
groupLayout->addWidget( mCategoriesView, 3, 1 );
topLayout->addWidget( mButtonGroup );
- connect( mFiltersCombo, SIGNAL( activated(int) ), SLOT( filterChanged(int) ) );
- connect( mCategoriesView, SIGNAL( clicked(QListViewItem*) ), SLOT( categoryClicked(QListViewItem*) ) );
+ connect( mFiltersCombo, TQT_SIGNAL( activated(int) ), TQT_SLOT( filterChanged(int) ) );
+ connect( mCategoriesView, TQT_SIGNAL( clicked(TQListViewItem*) ), TQT_SLOT( categoryClicked(TQListViewItem*) ) );
}
SelectionPage::~SelectionPage()
{
}
-void SelectionPage::setFilters( const QStringList& filters )
+void SelectionPage::setFilters( const TQStringList& filters )
{
mFiltersCombo->clear();
mFiltersCombo->insertStringList( filters );
@@ -106,7 +106,7 @@ void SelectionPage::setFilters( const QStringList& filters )
mUseFilters->setEnabled( filters.count() > 0 );
}
-QString SelectionPage::filter() const
+TQString SelectionPage::filter() const
{
return mFiltersCombo->currentText();
}
@@ -116,22 +116,22 @@ bool SelectionPage::useFilters() const
return mUseFilters->isChecked();
}
-void SelectionPage::setCategories( const QStringList& list )
+void SelectionPage::setCategories( const TQStringList& list )
{
- QStringList::ConstIterator it;
+ TQStringList::ConstIterator it;
for ( it = list.begin(); it != list.end(); ++it )
- new QCheckListItem( mCategoriesView, *it, QCheckListItem::CheckBox );
+ new TQCheckListItem( mCategoriesView, *it, TQCheckListItem::CheckBox );
mUseCategories->setEnabled( list.count() > 0 );
}
-QStringList SelectionPage::categories() const
+TQStringList SelectionPage::categories() const
{
- QStringList list;
+ TQStringList list;
- QListViewItemIterator it( mCategoriesView );
+ TQListViewItemIterator it( mCategoriesView );
for ( ; it.current(); ++it ) {
- QCheckListItem *qcli = static_cast<QCheckListItem*>(it.current());
+ TQCheckListItem *qcli = static_cast<TQCheckListItem*>(it.current());
if ( qcli->isOn() )
list.append( it.current()->text( 0 ) );
}
@@ -159,9 +159,9 @@ void SelectionPage::filterChanged( int )
mUseFilters->setChecked( true );
}
-void SelectionPage::categoryClicked( QListViewItem *i )
+void SelectionPage::categoryClicked( TQListViewItem *i )
{
- QCheckListItem *qcli = static_cast<QCheckListItem*>( i );
+ TQCheckListItem *qcli = static_cast<TQCheckListItem*>( i );
if ( i && qcli->isOn() )
mUseCategories->setChecked( true );
}
diff --git a/kaddressbook/printing/selectionpage.h b/kaddressbook/printing/selectionpage.h
index b4dab1f6c..457d7f679 100644
--- a/kaddressbook/printing/selectionpage.h
+++ b/kaddressbook/printing/selectionpage.h
@@ -24,7 +24,7 @@
#ifndef SELECTIONPAGE_H
#define SELECTIONPAGE_H
-#include <qwidget.h>
+#include <tqwidget.h>
class QButtonGroup;
class QComboBox;
@@ -37,15 +37,15 @@ class SelectionPage : public QWidget
Q_OBJECT
public:
- SelectionPage( QWidget* parent = 0, const char* name = 0 );
+ SelectionPage( TQWidget* parent = 0, const char* name = 0 );
~SelectionPage();
- void setFilters( const QStringList& );
- QString filter() const;
+ void setFilters( const TQStringList& );
+ TQString filter() const;
bool useFilters() const;
- void setCategories( const QStringList& );
- QStringList categories() const;
+ void setCategories( const TQStringList& );
+ TQStringList categories() const;
bool useCategories();
void setUseSelection( bool value );
@@ -53,16 +53,16 @@ class SelectionPage : public QWidget
private slots:
void filterChanged( int );
- void categoryClicked( QListViewItem * i );
+ void categoryClicked( TQListViewItem * i );
private:
- QButtonGroup* mButtonGroup;
- QRadioButton* mUseCategories;
- QRadioButton* mUseFilters;
- QRadioButton* mUseWholeBook;
- QRadioButton* mUseSelection;
- QComboBox* mFiltersCombo;
- QListView* mCategoriesView;
+ TQButtonGroup* mButtonGroup;
+ TQRadioButton* mUseCategories;
+ TQRadioButton* mUseFilters;
+ TQRadioButton* mUseWholeBook;
+ TQRadioButton* mUseSelection;
+ TQComboBox* mFiltersCombo;
+ TQListView* mCategoriesView;
};
#endif // SELECTIONPAGE_H
diff --git a/kaddressbook/printing/stylepage.cpp b/kaddressbook/printing/stylepage.cpp
index 9e1be7bd1..88e2e71cf 100644
--- a/kaddressbook/printing/stylepage.cpp
+++ b/kaddressbook/printing/stylepage.cpp
@@ -22,11 +22,11 @@
without including the source code for Qt in the source distribution.
*/
-#include <qbuttongroup.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qpixmap.h>
-#include <qradiobutton.h>
+#include <tqbuttongroup.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqpixmap.h>
+#include <tqradiobutton.h>
#include <kcombobox.h>
#include <kdialog.h>
@@ -34,8 +34,8 @@
#include "stylepage.h"
-StylePage::StylePage( KABC::AddressBook *ab, QWidget* parent, const char* name )
- : QWidget( parent, name ), mAddressBook( ab )
+StylePage::StylePage( KABC::AddressBook *ab, TQWidget* parent, const char* name )
+ : TQWidget( parent, name ), mAddressBook( ab )
{
initGUI();
@@ -44,14 +44,14 @@ StylePage::StylePage( KABC::AddressBook *ab, QWidget* parent, const char* name
mSortTypeCombo->insertItem( i18n( "Ascending" ) );
mSortTypeCombo->insertItem( i18n( "Descending" ) );
- connect( mStyleCombo, SIGNAL( activated( int ) ), SIGNAL( styleChanged( int ) ) );
+ connect( mStyleCombo, TQT_SIGNAL( activated( int ) ), TQT_SIGNAL( styleChanged( int ) ) );
}
StylePage::~StylePage()
{
}
-void StylePage::setPreview( const QPixmap &pixmap )
+void StylePage::setPreview( const TQPixmap &pixmap )
{
if ( pixmap.isNull() )
mPreview->setText( i18n( "(No preview available.)" ) );
@@ -59,7 +59,7 @@ void StylePage::setPreview( const QPixmap &pixmap )
mPreview->setPixmap( pixmap );
}
-void StylePage::addStyleName( const QString &name )
+void StylePage::addStyleName( const TQString &name )
{
mStyleCombo->insertItem( name );
}
@@ -112,27 +112,27 @@ void StylePage::initGUI()
{
setCaption( i18n( "Choose Printing Style" ) );
- QGridLayout *topLayout = new QGridLayout( this, 2, 2, KDialog::marginHint(),
+ TQGridLayout *topLayout = new TQGridLayout( this, 2, 2, KDialog::marginHint(),
KDialog::spacingHint() );
- QLabel *label = new QLabel( i18n( "What should the print look like?\n"
+ TQLabel *label = new TQLabel( i18n( "What should the print look like?\n"
"KAddressBook has several printing styles, designed for different purposes.\n"
"Choose the style that suits your needs below." ), this );
topLayout->addMultiCellWidget( label, 0, 0, 0, 1 );
- QButtonGroup *group = new QButtonGroup( i18n( "Sorting" ), this );
+ TQButtonGroup *group = new TQButtonGroup( i18n( "Sorting" ), this );
group->setColumnLayout( 0, Qt::Vertical );
- QGridLayout *sortLayout = new QGridLayout( group->layout(), 2, 2,
+ TQGridLayout *sortLayout = new TQGridLayout( group->layout(), 2, 2,
KDialog::spacingHint() );
sortLayout->setAlignment( Qt::AlignTop );
- label = new QLabel( i18n( "Criterion:" ), group );
+ label = new TQLabel( i18n( "Criterion:" ), group );
sortLayout->addWidget( label, 0, 0 );
mFieldCombo = new KComboBox( false, group );
sortLayout->addWidget( mFieldCombo, 0, 1 );
- label = new QLabel( i18n( "Order:" ), group );
+ label = new TQLabel( i18n( "Order:" ), group );
sortLayout->addWidget( label, 1, 0 );
mSortTypeCombo = new KComboBox( false, group );
@@ -140,20 +140,20 @@ void StylePage::initGUI()
topLayout->addWidget( group, 1, 0 );
- group = new QButtonGroup( i18n( "Print Style" ), this );
+ group = new TQButtonGroup( i18n( "Print Style" ), this );
group->setColumnLayout( 0, Qt::Vertical );
- QVBoxLayout *styleLayout = new QVBoxLayout( group->layout(),
+ TQVBoxLayout *styleLayout = new TQVBoxLayout( group->layout(),
KDialog::spacingHint() );
mStyleCombo = new KComboBox( false, group );
styleLayout->addWidget( mStyleCombo );
- mPreview = new QLabel( group );
- QFont font( mPreview->font() );
+ mPreview = new TQLabel( group );
+ TQFont font( mPreview->font() );
font.setPointSize( 20 );
mPreview->setFont( font );
mPreview->setScaledContents( true );
- mPreview->setAlignment( int( QLabel::WordBreak | QLabel::AlignCenter ) );
+ mPreview->setAlignment( int( TQLabel::WordBreak | TQLabel::AlignCenter ) );
styleLayout->addWidget( mPreview );
topLayout->addWidget( group, 1, 1 );
diff --git a/kaddressbook/printing/stylepage.h b/kaddressbook/printing/stylepage.h
index d84394979..961ddd84e 100644
--- a/kaddressbook/printing/stylepage.h
+++ b/kaddressbook/printing/stylepage.h
@@ -25,7 +25,7 @@
#ifndef STYLEPAGE_H
#define STYLEPAGE_H
-#include <qwidget.h>
+#include <tqwidget.h>
#include <kabc/addressbook.h>
#include <kabc/field.h>
@@ -40,19 +40,19 @@ class StylePage : public QWidget
Q_OBJECT
public:
- StylePage( KABC::AddressBook *ab, QWidget* parent = 0, const char* name = 0 );
+ StylePage( KABC::AddressBook *ab, TQWidget* parent = 0, const char* name = 0 );
~StylePage();
/**
* Set a preview image. If @ref pixmap is 'null' a text will
* be displayed instead.
*/
- void setPreview( const QPixmap &pixmap );
+ void setPreview( const TQPixmap &pixmap );
/**
* Add a style name.
*/
- void addStyleName( const QString &name );
+ void addStyleName( const TQString &name );
/**
* Clear the style name list.
@@ -93,7 +93,7 @@ class StylePage : public QWidget
KComboBox *mFieldCombo;
KComboBox *mSortTypeCombo;
KComboBox *mStyleCombo;
- QLabel *mPreview;
+ TQLabel *mPreview;
KABC::AddressBook *mAddressBook;
KABC::Field::List mFields;
diff --git a/kaddressbook/searchmanager.cpp b/kaddressbook/searchmanager.cpp
index 1919dfea8..0cd23b5a1 100644
--- a/kaddressbook/searchmanager.cpp
+++ b/kaddressbook/searchmanager.cpp
@@ -29,12 +29,12 @@
using namespace KAB;
SearchManager::SearchManager( KABC::AddressBook *ab,
- QObject *parent, const char *name )
- : QObject( parent, name ), mAddressBook( ab )
+ TQObject *parent, const char *name )
+ : TQObject( parent, name ), mAddressBook( ab )
{
}
-void SearchManager::search( const QString &pattern, const KABC::Field::List &fields, Type type )
+void SearchManager::search( const TQString &pattern, const KABC::Field::List &fields, Type type )
{
mPattern = pattern;
mFields = fields;
@@ -129,14 +129,14 @@ void SearchManager::search( const QString &pattern, const KABC::Field::List &fie
if ( !found ) {
// search over custom fields
- const QStringList customs = (*it).customs();
+ const TQStringList customs = (*it).customs();
- QStringList::ConstIterator customIt( customs.begin() );
- const QStringList::ConstIterator customEndIt( customs.end() );
+ TQStringList::ConstIterator customIt( customs.begin() );
+ const TQStringList::ConstIterator customEndIt( customs.end() );
for ( ; customIt != customEndIt; ++customIt ) {
int pos = (*customIt).find( ':' );
if ( pos != -1 ) {
- const QString value = (*customIt).mid( pos + 1 );
+ const TQString value = (*customIt).mid( pos + 1 );
if ( type == StartsWith && value.startsWith( pattern, false ) ) {
mContacts.append( *it );
break;
@@ -170,7 +170,7 @@ void SearchManager::reload()
#ifdef KDEPIM_NEW_DISTRLISTS
-void KAB::SearchManager::setSelectedDistributionList( const QString &name )
+void KAB::SearchManager::setSelectedDistributionList( const TQString &name )
{
if ( mSelectedDistributionList == name )
return;
@@ -183,9 +183,9 @@ KPIM::DistributionList::List KAB::SearchManager::distributionLists() const
return mDistributionLists;
}
-QStringList KAB::SearchManager::distributionListNames() const
+TQStringList KAB::SearchManager::distributionListNames() const
{
- QStringList lst;
+ TQStringList lst;
KPIM::DistributionList::List::ConstIterator it( mDistributionLists.begin() );
const KPIM::DistributionList::List::ConstIterator endIt( mDistributionLists.end() );
for ( ; it != endIt; ++it ) {
diff --git a/kaddressbook/searchmanager.h b/kaddressbook/searchmanager.h
index 2179f6f60..88ce94c7b 100644
--- a/kaddressbook/searchmanager.h
+++ b/kaddressbook/searchmanager.h
@@ -25,7 +25,7 @@
#define SEARCHMANAGER_H
#include <config.h> // for KDEPIM_NEW_DISTRLISTS
-#include <qobject.h>
+#include <tqobject.h>
#include <kabc/stdaddressbook.h>
#ifdef KDEPIM_NEW_DISTRLISTS
@@ -47,7 +47,7 @@ class SearchManager : public QObject
};
SearchManager( KABC::AddressBook *ab,
- QObject *parent, const char *name = 0 );
+ TQObject *parent, const char *name = 0 );
/**
This method takes a pattern and searches for a match of the specified
@@ -58,7 +58,7 @@ class SearchManager : public QObject
@param field The field which shall be compared with the search string.
@param type The type for the matching.
*/
- void search( const QString &pattern, const KABC::Field::List &fields, Type type = Contains );
+ void search( const TQString &pattern, const KABC::Field::List &fields, Type type = Contains );
/**
Returns the contacts which matched the last search query.
@@ -70,7 +70,7 @@ class SearchManager : public QObject
/**
sets the distribution list to be shown
*/
- void setSelectedDistributionList( const QString &name );
+ void setSelectedDistributionList( const TQString &name );
/**
Returns all the distribution lists.
@@ -80,7 +80,7 @@ class SearchManager : public QObject
/**
Returns the name of all the distribution lists.
*/
- QStringList distributionListNames() const;
+ TQStringList distributionListNames() const;
#endif
signals:
@@ -95,12 +95,12 @@ class SearchManager : public QObject
private:
KABC::Addressee::List mContacts;
#ifdef KDEPIM_NEW_DISTRLISTS
- QString mSelectedDistributionList;
+ TQString mSelectedDistributionList;
KPIM::DistributionList::List mDistributionLists;
#endif
KABC::AddressBook *mAddressBook;
- QString mPattern;
+ TQString mPattern;
KABC::Field::List mFields;
Type mType;
};
diff --git a/kaddressbook/secrecywidget.cpp b/kaddressbook/secrecywidget.cpp
index 70b3bf3c8..5a39ddfa7 100644
--- a/kaddressbook/secrecywidget.cpp
+++ b/kaddressbook/secrecywidget.cpp
@@ -21,7 +21,7 @@
without including the source code for Qt in the source distribution.
*/
-#include <qlayout.h>
+#include <tqlayout.h>
#include <kabc/secrecy.h>
#include <kcombobox.h>
@@ -29,10 +29,10 @@
#include "secrecywidget.h"
-SecrecyWidget::SecrecyWidget( QWidget *parent, const char *name )
- : QWidget( parent, name )
+SecrecyWidget::SecrecyWidget( TQWidget *parent, const char *name )
+ : TQWidget( parent, name )
{
- QVBoxLayout *layout = new QVBoxLayout( this, KDialog::marginHint(),
+ TQVBoxLayout *layout = new TQVBoxLayout( this, KDialog::marginHint(),
KDialog::spacingHint() );
mSecrecyCombo = new KComboBox( this );
layout->addWidget( mSecrecyCombo );
@@ -42,8 +42,8 @@ SecrecyWidget::SecrecyWidget( QWidget *parent, const char *name )
for ( it = list.begin(); it != list.end(); ++it )
mSecrecyCombo->insertItem( KABC::Secrecy::typeLabel( *it ), *it );
- connect( mSecrecyCombo, SIGNAL( activated( const QString& ) ),
- SIGNAL( changed() ) );
+ connect( mSecrecyCombo, TQT_SIGNAL( activated( const TQString& ) ),
+ TQT_SIGNAL( changed() ) );
}
SecrecyWidget::~SecrecyWidget()
diff --git a/kaddressbook/secrecywidget.h b/kaddressbook/secrecywidget.h
index e73e6fac0..0c07c0156 100644
--- a/kaddressbook/secrecywidget.h
+++ b/kaddressbook/secrecywidget.h
@@ -24,7 +24,7 @@
#ifndef SECRECYWIDGET_H
#define SECRECYWIDGET_H
-#include <qwidget.h>
+#include <tqwidget.h>
namespace KABC { class Secrecy; }
class KComboBox;
@@ -34,7 +34,7 @@ class SecrecyWidget : public QWidget
Q_OBJECT
public:
- SecrecyWidget( QWidget *parent, const char *name = 0 );
+ SecrecyWidget( TQWidget *parent, const char *name = 0 );
~SecrecyWidget();
void setSecrecy( const KABC::Secrecy &secrecy );
diff --git a/kaddressbook/simpleaddresseeeditor.cpp b/kaddressbook/simpleaddresseeeditor.cpp
index e377feeed..f55ab303b 100644
--- a/kaddressbook/simpleaddresseeeditor.cpp
+++ b/kaddressbook/simpleaddresseeeditor.cpp
@@ -21,8 +21,8 @@
without including the source code for Qt in the source distribution.
*/
-#include <qlayout.h>
-#include <qlabel.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
#include <klineedit.h>
#include <klocale.h>
@@ -30,7 +30,7 @@
#include "simpleaddresseeeditor.h"
-SimpleAddresseeEditor::SimpleAddresseeEditor( QWidget *parent, const char *name )
+SimpleAddresseeEditor::SimpleAddresseeEditor( TQWidget *parent, const char *name )
: AddresseeEditorBase( parent, name ),
mDirty( false ),
mBlockModified( false )
@@ -64,24 +64,24 @@ void SimpleAddresseeEditor::setInitialFocus()
void SimpleAddresseeEditor::initGui()
{
- QGridLayout *topLayout = new QGridLayout( this, 2, 2, KDialog::marginHint(),
+ TQGridLayout *topLayout = new TQGridLayout( this, 2, 2, KDialog::marginHint(),
KDialog::spacingHint() );
- QLabel *label = new QLabel( i18n( "Name:" ), this );
+ TQLabel *label = new TQLabel( i18n( "Name:" ), this );
topLayout->addWidget( label, 0, 0 );
mNameEdit = new KLineEdit( this );
topLayout->addWidget( mNameEdit, 0, 1 );
- connect( mNameEdit, SIGNAL( textChanged( const QString & ) ),
- SLOT( emitModified() ) );
+ connect( mNameEdit, TQT_SIGNAL( textChanged( const TQString & ) ),
+ TQT_SLOT( emitModified() ) );
- label = new QLabel( i18n( "Email:" ), this );
+ label = new TQLabel( i18n( "Email:" ), this );
topLayout->addWidget( label, 1, 0 );
mEmailEdit = new KLineEdit( this );
topLayout->addWidget( mEmailEdit, 1, 1 );
- connect( mEmailEdit, SIGNAL( textChanged( const QString & ) ),
- SLOT( emitModified() ) );
+ connect( mEmailEdit, TQT_SIGNAL( textChanged( const TQString & ) ),
+ TQT_SLOT( emitModified() ) );
}
void SimpleAddresseeEditor::load()
diff --git a/kaddressbook/simpleaddresseeeditor.h b/kaddressbook/simpleaddresseeeditor.h
index 560148901..f8e16fb26 100644
--- a/kaddressbook/simpleaddresseeeditor.h
+++ b/kaddressbook/simpleaddresseeeditor.h
@@ -33,7 +33,7 @@ class SimpleAddresseeEditor : public AddresseeEditorBase
{
Q_OBJECT
public:
- SimpleAddresseeEditor( QWidget *parent, const char *name = 0 );
+ SimpleAddresseeEditor( TQWidget *parent, const char *name = 0 );
~SimpleAddresseeEditor();
void setAddressee( const KABC::Addressee& );
diff --git a/kaddressbook/soundwidget.cpp b/kaddressbook/soundwidget.cpp
index 74b8137ef..ca0a9bfde 100644
--- a/kaddressbook/soundwidget.cpp
+++ b/kaddressbook/soundwidget.cpp
@@ -31,54 +31,54 @@
#include <ktempfile.h>
#include <kurlrequester.h>
-#include <qcheckbox.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qpushbutton.h>
-#include <qwhatsthis.h>
+#include <tqcheckbox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqpushbutton.h>
+#include <tqwhatsthis.h>
#include "soundwidget.h"
-SoundWidget::SoundWidget( KABC::AddressBook *ab, QWidget *parent, const char *name )
+SoundWidget::SoundWidget( KABC::AddressBook *ab, TQWidget *parent, const char *name )
: KAB::ContactEditorWidget( ab, parent, name ), mReadOnly( false )
{
- QGridLayout *topLayout = new QGridLayout( this, 2, 3, KDialog::marginHint(),
+ TQGridLayout *topLayout = new TQGridLayout( this, 2, 3, KDialog::marginHint(),
KDialog::spacingHint() );
- QLabel *label = new QLabel( this );
+ TQLabel *label = new TQLabel( this );
label->setPixmap( KGlobal::iconLoader()->loadIcon( "multimedia",
KIcon::Desktop, KIcon::SizeMedium ) );
label->setAlignment( Qt::AlignTop );
topLayout->addMultiCellWidget( label, 0, 1, 0, 0 );
- mPlayButton = new QPushButton( i18n( "Play" ), this );
+ mPlayButton = new TQPushButton( i18n( "Play" ), this );
mPlayButton->setEnabled( false );
topLayout->addWidget( mPlayButton, 0, 1 );
mSoundUrl = new KURLRequester( this );
topLayout->addWidget( mSoundUrl, 0, 2 );
- mUseSoundUrl = new QCheckBox( i18n( "Store as URL" ), this );
+ mUseSoundUrl = new TQCheckBox( i18n( "Store as URL" ), this );
mUseSoundUrl->setEnabled( false );
topLayout->addWidget( mUseSoundUrl, 1, 2 );
- connect( mSoundUrl, SIGNAL( textChanged( const QString& ) ),
- SLOT( setModified() ) );
- connect( mSoundUrl, SIGNAL( textChanged( const QString& ) ),
- SLOT( urlChanged( const QString& ) ) );
- connect( mUseSoundUrl, SIGNAL( toggled( bool ) ),
- SLOT( setModified() ) );
- connect( mUseSoundUrl, SIGNAL( toggled( bool ) ),
- mPlayButton, SLOT( setDisabled( bool ) ) );
- connect( mSoundUrl, SIGNAL( urlSelected( const QString& ) ),
- SLOT( loadSound() ) );
- connect( mSoundUrl, SIGNAL( urlSelected( const QString& ) ),
- SLOT( updateGUI() ) );
- connect( mPlayButton, SIGNAL( clicked() ),
- SLOT( playSound() ) );
-
- QWhatsThis::add( this, i18n( "This field stores a sound file which contains the name of the contact to clarify the pronunciation." ) );
- QWhatsThis::add( mUseSoundUrl, i18n( "Save only the URL to the sound file, not the whole object." ) );
+ connect( mSoundUrl, TQT_SIGNAL( textChanged( const TQString& ) ),
+ TQT_SLOT( setModified() ) );
+ connect( mSoundUrl, TQT_SIGNAL( textChanged( const TQString& ) ),
+ TQT_SLOT( urlChanged( const TQString& ) ) );
+ connect( mUseSoundUrl, TQT_SIGNAL( toggled( bool ) ),
+ TQT_SLOT( setModified() ) );
+ connect( mUseSoundUrl, TQT_SIGNAL( toggled( bool ) ),
+ mPlayButton, TQT_SLOT( setDisabled( bool ) ) );
+ connect( mSoundUrl, TQT_SIGNAL( urlSelected( const TQString& ) ),
+ TQT_SLOT( loadSound() ) );
+ connect( mSoundUrl, TQT_SIGNAL( urlSelected( const TQString& ) ),
+ TQT_SLOT( updateGUI() ) );
+ connect( mPlayButton, TQT_SIGNAL( clicked() ),
+ TQT_SLOT( playSound() ) );
+
+ TQWhatsThis::add( this, i18n( "This field stores a sound file which contains the name of the contact to clarify the pronunciation." ) );
+ TQWhatsThis::add( mUseSoundUrl, i18n( "Save only the URL to the sound file, not the whole object." ) );
}
SoundWidget::~SoundWidget()
@@ -138,7 +138,7 @@ void SoundWidget::playSound()
void SoundWidget::loadSound()
{
- QString fileName;
+ TQString fileName;
KURL url( mSoundUrl->url() );
@@ -150,7 +150,7 @@ void SoundWidget::loadSound()
else if ( !KIO::NetAccess::download( url, fileName, this ) )
return;
- QFile file( fileName );
+ TQFile file( fileName );
if ( !file.open( IO_ReadOnly ) )
return;
@@ -167,7 +167,7 @@ void SoundWidget::updateGUI()
mUseSoundUrl->setEnabled( !mReadOnly );
}
-void SoundWidget::urlChanged( const QString &url )
+void SoundWidget::urlChanged( const TQString &url )
{
if ( !mUseSoundUrl->isChecked() ) {
bool state = !url.isEmpty();
diff --git a/kaddressbook/soundwidget.h b/kaddressbook/soundwidget.h
index b0ad168a7..7dd0e116a 100644
--- a/kaddressbook/soundwidget.h
+++ b/kaddressbook/soundwidget.h
@@ -38,7 +38,7 @@ class SoundWidget : public KAB::ContactEditorWidget
Q_OBJECT
public:
- SoundWidget( KABC::AddressBook *ab, QWidget *parent, const char *name = 0 );
+ SoundWidget( KABC::AddressBook *ab, TQWidget *parent, const char *name = 0 );
~SoundWidget();
void loadContact( KABC::Addressee *addr );
@@ -49,13 +49,13 @@ class SoundWidget : public KAB::ContactEditorWidget
void playSound();
void loadSound();
void updateGUI();
- void urlChanged( const QString& );
+ void urlChanged( const TQString& );
private:
KURLRequester *mSoundUrl;
- QCheckBox *mUseSoundUrl;
- QPushButton *mPlayButton;
+ TQCheckBox *mUseSoundUrl;
+ TQPushButton *mPlayButton;
KABC::Sound mSound;
bool mReadOnly;
@@ -64,12 +64,12 @@ class SoundWidget : public KAB::ContactEditorWidget
class SoundWidgetFactory : public KAB::ContactEditorWidgetFactory
{
public:
- KAB::ContactEditorWidget *createWidget( KABC::AddressBook *ab, QWidget *parent, const char *name )
+ KAB::ContactEditorWidget *createWidget( KABC::AddressBook *ab, TQWidget *parent, const char *name )
{
return new SoundWidget( ab, parent, name );
}
- QString pageIdentifier() const { return "misc"; }
+ TQString pageIdentifier() const { return "misc"; }
};
#endif
diff --git a/kaddressbook/thumbnailcreator/ldifvcardcreator.cpp b/kaddressbook/thumbnailcreator/ldifvcardcreator.cpp
index 4c8a5611e..0ed562e18 100644
--- a/kaddressbook/thumbnailcreator/ldifvcardcreator.cpp
+++ b/kaddressbook/thumbnailcreator/ldifvcardcreator.cpp
@@ -26,12 +26,12 @@
*
*/
-#include <qdatetime.h>
-#include <qfile.h>
-#include <qpixmap.h>
-#include <qimage.h>
-#include <qpainter.h>
-#include <qtextstream.h>
+#include <tqdatetime.h>
+#include <tqfile.h>
+#include <tqpixmap.h>
+#include <tqimage.h>
+#include <tqpainter.h>
+#include <tqtextstream.h>
#include <kdebug.h>
#include <kglobal.h>
@@ -64,18 +64,18 @@ VCard_LDIFCreator::~VCard_LDIFCreator()
}
-bool VCard_LDIFCreator::readContents( const QString &path )
+bool VCard_LDIFCreator::readContents( const TQString &path )
{
// read file contents
- QFile file( path );
+ TQFile file( path );
if ( !file.open( IO_ReadOnly ) )
return false;
- QString info;
+ TQString info;
text.truncate(0);
// read the file
- QString contents = file.readAll();
+ TQString contents = file.readAll();
file.close();
// convert the file contents to a KABC::Addressee address
@@ -117,9 +117,9 @@ bool VCard_LDIFCreator::readContents( const QString &path )
KABC::PhoneNumber::List pnList = addr.phoneNumbers();
- QStringList phoneNumbers;
+ TQStringList phoneNumbers;
for (unsigned int no=0; no<pnList.count(); ++no) {
- QString pn = pnList[no].number().simplifyWhiteSpace();
+ TQString pn = pnList[no].number().simplifyWhiteSpace();
if (!pn.isEmpty() && !phoneNumbers.contains(pn))
phoneNumbers.append(pn);
}
@@ -150,18 +150,18 @@ bool VCard_LDIFCreator::createImageSmall()
if ( !mSplitter ) {
mSplitter = new KPixmapSplitter;
- QString pixmap = locate( "data", "konqueror/pics/thumbnailfont_7x4.png" );
+ TQString pixmap = locate( "data", "konqueror/pics/thumbnailfont_7x4.png" );
if ( pixmap.isEmpty() ) {
delete mSplitter;
mSplitter=0;
kdWarning() << "VCard_LDIFCreator: Font image \"thumbnailfont_7x4.png\" not found!\n";
return false;
}
- mSplitter->setPixmap( QPixmap( pixmap ) );
- mSplitter->setItemSize( QSize( 4, 7 ) );
+ mSplitter->setPixmap( TQPixmap( pixmap ) );
+ mSplitter->setItemSize( TQSize( 4, 7 ) );
}
- QSize chSize = mSplitter->itemSize(); // the size of one char
+ TQSize chSize = mSplitter->itemSize(); // the size of one char
int xOffset = chSize.width();
int yOffset = chSize.height();
@@ -172,7 +172,7 @@ bool VCard_LDIFCreator::createImageSmall()
int numLines = (int) (canvasHeight / chSize.height());
// render the information
- QRect rect;
+ TQRect rect;
int rest = mPixmap.width() - (numCharsPerLine * chSize.width());
xborder = QMAX( xborder, rest / 2 ); // center horizontally
rest = mPixmap.height() - (numLines * chSize.height());
@@ -184,7 +184,7 @@ bool VCard_LDIFCreator::createImageSmall()
int posLastLine = mPixmap.height() - (chSize.height() + yborder);
bool newLine = false;
Q_ASSERT( posNewLine > 0 );
- const QPixmap *fontPixmap = &(mSplitter->pixmap());
+ const TQPixmap *fontPixmap = &(mSplitter->pixmap());
for ( uint i = 0; i < text.length(); i++ ) {
if ( x > posNewLine || newLine ) { // start a new line?
@@ -206,7 +206,7 @@ bool VCard_LDIFCreator::createImageSmall()
}
// check for newlines in the text (unix,dos)
- QChar ch = text.at( i );
+ TQChar ch = text.at( i );
if ( ch == '\n' ) {
newLine = true;
continue;
@@ -218,7 +218,7 @@ bool VCard_LDIFCreator::createImageSmall()
rect = mSplitter->coordinates( ch );
if ( !rect.isEmpty() )
- bitBlt( &mPixmap, QPoint(x,y), fontPixmap, rect, Qt::CopyROP );
+ bitBlt( &mPixmap, TQPoint(x,y), fontPixmap, rect, Qt::CopyROP );
x += xOffset; // next character
}
@@ -228,19 +228,19 @@ bool VCard_LDIFCreator::createImageSmall()
bool VCard_LDIFCreator::createImageBig()
{
- QFont normalFont( KGlobalSettings::generalFont() );
- QFont titleFont( normalFont );
+ TQFont normalFont( KGlobalSettings::generalFont() );
+ TQFont titleFont( normalFont );
titleFont.setBold(true);
// titleFont.setUnderline(true);
titleFont.setItalic(true);
- QPainter painter(&mPixmap);
+ TQPainter painter(&mPixmap);
painter.setFont(titleFont);
- QFontMetrics fm(painter.fontMetrics());
+ TQFontMetrics fm(painter.fontMetrics());
// draw contact name
painter.setClipRect(2, 2, pixmapSize.width()-4, pixmapSize.height()-4);
- QPoint p(5, fm.height()+2);
+ TQPoint p(5, fm.height()+2);
painter.drawText(p, name);
p.setY( 3*p.y()/2 );
@@ -248,8 +248,8 @@ bool VCard_LDIFCreator::createImageBig()
painter.setFont(normalFont);
fm = painter.fontMetrics();
- const QStringList list( QStringList::split('\n', text) );
- for ( QStringList::ConstIterator it = list.begin();
+ const TQStringList list( TQStringList::split('\n', text) );
+ for ( TQStringList::ConstIterator it = list.begin();
p.y()<=pixmapSize.height() && it != list.end(); ++it ) {
p.setY( p.y() + fm.height() );
painter.drawText(p, *it);
@@ -258,13 +258,13 @@ bool VCard_LDIFCreator::createImageBig()
return true;
}
-bool VCard_LDIFCreator::create(const QString &path, int width, int height, QImage &img)
+bool VCard_LDIFCreator::create(const TQString &path, int width, int height, TQImage &img)
{
if ( !readContents(path) )
return false;
// resize the image if necessary
- pixmapSize = QSize( width, height );
+ pixmapSize = TQSize( width, height );
if (height * 3 > width * 4)
pixmapSize.setHeight( width * 4 / 3 );
else
@@ -273,7 +273,7 @@ bool VCard_LDIFCreator::create(const QString &path, int width, int height, QImag
if ( pixmapSize != mPixmap.size() )
mPixmap.resize( pixmapSize );
- mPixmap.fill( QColor( 245, 245, 245 ) ); // light-grey background
+ mPixmap.fill( TQColor( 245, 245, 245 ) ); // light-grey background
// one pixel for the rectangle, the rest. whitespace
xborder = 1 + pixmapSize.width()/16; // minimum x-border
diff --git a/kaddressbook/thumbnailcreator/ldifvcardcreator.h b/kaddressbook/thumbnailcreator/ldifvcardcreator.h
index e6ae6ba42..7b5cface5 100644
--- a/kaddressbook/thumbnailcreator/ldifvcardcreator.h
+++ b/kaddressbook/thumbnailcreator/ldifvcardcreator.h
@@ -21,7 +21,7 @@
#ifndef VCARD_LDIFCREATOR_H
#define VCARD_LDIFCREATOR_H
-#include <qpixmap.h>
+#include <tqpixmap.h>
#include <kio/thumbcreator.h>
class KPixmapSplitter;
@@ -31,18 +31,18 @@ class VCard_LDIFCreator : public ThumbCreator
public:
VCard_LDIFCreator();
virtual ~VCard_LDIFCreator();
- virtual bool create(const QString &path, int width, int height, QImage &img);
+ virtual bool create(const TQString &path, int width, int height, TQImage &img);
virtual Flags flags() const;
private:
KPixmapSplitter *mSplitter;
- QPixmap mPixmap;
+ TQPixmap mPixmap;
- QString name;
- QString text;
- bool readContents( const QString &path );
+ TQString name;
+ TQString text;
+ bool readContents( const TQString &path );
int xborder, yborder;
- QSize pixmapSize;
+ TQSize pixmapSize;
bool createImageSmall();
bool createImageBig();
};
diff --git a/kaddressbook/typecombo.h b/kaddressbook/typecombo.h
index 3b411c86c..90a000110 100644
--- a/kaddressbook/typecombo.h
+++ b/kaddressbook/typecombo.h
@@ -37,10 +37,10 @@ class TypeCombo : public KComboBox
typedef typename T::List List;
typedef typename T::List::Iterator Iterator;
- TypeCombo( List &list, QWidget *parent, const char *name = 0 );
+ TypeCombo( List &list, TQWidget *parent, const char *name = 0 );
- void setLineEdit( QLineEdit *edit ) { mLineEdit = edit; }
- QLineEdit *lineEdit() const { return mLineEdit; }
+ void setLineEdit( TQLineEdit *edit ) { mLineEdit = edit; }
+ TQLineEdit *lineEdit() const { return mLineEdit; }
void updateTypes();
@@ -58,11 +58,11 @@ class TypeCombo : public KComboBox
private:
List &mTypeList;
- QLineEdit *mLineEdit;
+ TQLineEdit *mLineEdit;
};
template <class T>
-TypeCombo<T>::TypeCombo( TypeCombo::List &list, QWidget *parent,
+TypeCombo<T>::TypeCombo( TypeCombo::List &list, TQWidget *parent,
const char *name )
: KComboBox( parent, name ),
mTypeList( list )
@@ -73,18 +73,18 @@ template <class T>
void TypeCombo<T>::updateTypes()
{
// Remember current item
- QString currentId;
+ TQString currentId;
int current = currentItem();
if ( current >= 0 ) currentId = mTypeList[ current ].id();
clear();
- QMap<int,int> labelCount;
+ TQMap<int,int> labelCount;
uint i;
for ( i = 0; i < mTypeList.count(); ++i ) {
int type = ( mTypeList[ i ].type() & ~( T::Pref ) );
- QString label = mTypeList[ i ].typeLabel( type );
+ TQString label = mTypeList[ i ].typeLabel( type );
int count = 1;
if ( labelCount.contains( type ) ) {
count = labelCount[ type ] + 1;
@@ -92,7 +92,7 @@ void TypeCombo<T>::updateTypes()
labelCount[ type ] = count;
if ( count > 1 ) {
label = i18n("label (number)", "%1 (%2)").arg( label )
- .arg( QString::number( count ) );
+ .arg( TQString::number( count ) );
}
insertItem( label );
}
diff --git a/kaddressbook/undocmds.cpp b/kaddressbook/undocmds.cpp
index e9350c1bf..ee9895951 100644
--- a/kaddressbook/undocmds.cpp
+++ b/kaddressbook/undocmds.cpp
@@ -22,8 +22,8 @@
without including the source code for Qt in the source distribution.
*/
-#include <qapplication.h>
-#include <qclipboard.h>
+#include <tqapplication.h>
+#include <tqclipboard.h>
#include <klocale.h>
#include <kapplication.h>
@@ -36,12 +36,12 @@
#include "undocmds.h"
DeleteCommand::DeleteCommand( KABC::AddressBook *addressBook,
- const QStringList &uidList)
+ const TQStringList &uidList)
: Command( addressBook ), mUIDList( uidList )
{
}
-QString DeleteCommand::name() const
+TQString DeleteCommand::name() const
{
return i18n( "Delete Contact", "Delete %n Contacts", mUIDList.count() );
}
@@ -68,8 +68,8 @@ void DeleteCommand::execute()
{
KABC::Addressee addr;
- QStringList::ConstIterator it;
- const QStringList::ConstIterator endIt( mUIDList.end() );
+ TQStringList::ConstIterator it;
+ const TQStringList::ConstIterator endIt( mUIDList.end() );
for ( it = mUIDList.begin(); it != endIt; ++it ) {
addr = addressBook()->findByUid( *it );
lock()->lock( addr.resource() );
@@ -92,7 +92,7 @@ PasteCommand::PasteCommand( KAB::Core *core, const KABC::Addressee::List &addres
{
}
-QString PasteCommand::name() const
+TQString PasteCommand::name() const
{
return i18n( "Paste Contact", "Paste %n Contacts", mAddresseeList.count() );
}
@@ -114,7 +114,7 @@ void PasteCommand::unexecute()
void PasteCommand::execute()
{
- QStringList uids;
+ TQStringList uids;
KABC::Addressee::List::ConstIterator constIt;
const KABC::Addressee::List::ConstIterator constEndIt( mAddresseeList.end() );
@@ -136,8 +136,8 @@ void PasteCommand::execute()
lock()->unlock( (*it).resource() );
}
- QStringList::ConstIterator uidIt;
- const QStringList::ConstIterator uidEndIt( uids.end() );
+ TQStringList::ConstIterator uidIt;
+ const TQStringList::ConstIterator uidEndIt( uids.end() );
for ( uidIt = uids.begin(); uidIt != uidEndIt; ++uidIt )
mCore->editContact( *uidIt );
}
@@ -148,7 +148,7 @@ NewCommand::NewCommand( KABC::AddressBook *addressBook, const KABC::Addressee::L
{
}
-QString NewCommand::name() const
+TQString NewCommand::name() const
{
return i18n( "New Contact", "New %n Contacts", mAddresseeList.count() );
}
@@ -192,7 +192,7 @@ EditCommand::EditCommand( KABC::AddressBook *addressBook,
{
}
-QString EditCommand::name() const
+TQString EditCommand::name() const
{
return i18n( "Edit Contact" );
}
@@ -212,12 +212,12 @@ void EditCommand::execute()
}
-CutCommand::CutCommand( KABC::AddressBook *addressBook, const QStringList &uidList )
+CutCommand::CutCommand( KABC::AddressBook *addressBook, const TQStringList &uidList )
: Command( addressBook ), mUIDList( uidList )
{
}
-QString CutCommand::name() const
+TQString CutCommand::name() const
{
return i18n( "Cut Contact", "Cut %n Contacts", mUIDList.count() );
}
@@ -238,7 +238,7 @@ void CutCommand::unexecute()
mAddresseeList.clear();
- QClipboard *cb = QApplication::clipboard();
+ QClipboard *cb = TQApplication::clipboard();
kapp->processEvents();
cb->setText( mOldText );
}
@@ -247,8 +247,8 @@ void CutCommand::execute()
{
KABC::Addressee addr;
- QStringList::ConstIterator it;
- const QStringList::ConstIterator endIt( mUIDList.end() );
+ TQStringList::ConstIterator it;
+ const TQStringList::ConstIterator endIt( mUIDList.end() );
for ( it = mUIDList.begin(); it != endIt; ++it ) {
addr = addressBook()->findByUid( *it );
mAddresseeList.append( addr );
@@ -265,7 +265,7 @@ void CutCommand::execute()
// Convert to clipboard
mClipText = AddresseeUtil::addresseesToClipboard( mAddresseeList );
- QClipboard *cb = QApplication::clipboard();
+ QClipboard *cb = TQApplication::clipboard();
mOldText = cb->text();
kapp->processEvents();
cb->setText( mClipText );
diff --git a/kaddressbook/undocmds.h b/kaddressbook/undocmds.h
index 27f7f24b9..192a4e80b 100644
--- a/kaddressbook/undocmds.h
+++ b/kaddressbook/undocmds.h
@@ -27,8 +27,8 @@
// Commands for undo/redo functionality.
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
#include <kabc/addressbook.h>
#include <kabc/addressee.h>
@@ -56,15 +56,15 @@ class Command : public KCommand
class DeleteCommand : public Command
{
public:
- DeleteCommand( KABC::AddressBook *addressBook, const QStringList &uidList );
+ DeleteCommand( KABC::AddressBook *addressBook, const TQStringList &uidList );
- virtual QString name() const;
+ virtual TQString name() const;
virtual void unexecute();
virtual void execute();
private:
KABC::Addressee::List mAddresseeList;
- QStringList mUIDList;
+ TQStringList mUIDList;
};
class PasteCommand : public Command
@@ -73,7 +73,7 @@ class PasteCommand : public Command
PasteCommand( KAB::Core *core,
const KABC::Addressee::List &addressees );
- virtual QString name() const;
+ virtual TQString name() const;
virtual void unexecute();
virtual void execute();
@@ -85,17 +85,17 @@ class PasteCommand : public Command
class CutCommand : public Command
{
public:
- CutCommand( KABC::AddressBook *addressBook, const QStringList &uidList );
+ CutCommand( KABC::AddressBook *addressBook, const TQStringList &uidList );
- virtual QString name() const;
+ virtual TQString name() const;
virtual void unexecute();
virtual void execute();
private:
KABC::Addressee::List mAddresseeList;
- QStringList mUIDList;
- QString mClipText;
- QString mOldText;
+ TQStringList mUIDList;
+ TQString mClipText;
+ TQString mOldText;
};
class NewCommand : public Command
@@ -104,7 +104,7 @@ class NewCommand : public Command
NewCommand( KABC::AddressBook *addressBook,
const KABC::Addressee::List &addressees );
- virtual QString name() const;
+ virtual TQString name() const;
virtual void unexecute();
virtual void execute();
@@ -118,7 +118,7 @@ class EditCommand : public Command
EditCommand( KABC::AddressBook *addressBook, const KABC::Addressee &oldAddressee,
const KABC::Addressee &newAddressee );
- virtual QString name() const;
+ virtual TQString name() const;
virtual void unexecute();
virtual void execute();
diff --git a/kaddressbook/viewconfigurefieldspage.cpp b/kaddressbook/viewconfigurefieldspage.cpp
index fd50d92fe..f83a8c925 100644
--- a/kaddressbook/viewconfigurefieldspage.cpp
+++ b/kaddressbook/viewconfigurefieldspage.cpp
@@ -21,12 +21,12 @@
without including the source code for Qt in the source distribution.
*/
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qlistbox.h>
-#include <qpushbutton.h>
-#include <qtoolbutton.h>
-#include <qapplication.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqlistbox.h>
+#include <tqpushbutton.h>
+#include <tqtoolbutton.h>
+#include <tqapplication.h>
#include <kcombobox.h>
#include <kdebug.h>
@@ -39,11 +39,11 @@
class FieldItem : public QListBoxText
{
public:
- FieldItem( QListBox *parent, KABC::Field *field )
- : QListBoxText( parent, field->label() ), mField( field ) {}
+ FieldItem( TQListBox *parent, KABC::Field *field )
+ : TQListBoxText( parent, field->label() ), mField( field ) {}
- FieldItem( QListBox *parent, KABC::Field *field, int index )
- : QListBoxText( parent, field->label(), parent->item( index ) ),
+ FieldItem( TQListBox *parent, KABC::Field *field, int index )
+ : TQListBoxText( parent, field->label(), parent->item( index ) ),
mField( field ) {}
KABC::Field *field() { return mField; }
@@ -54,9 +54,9 @@ class FieldItem : public QListBoxText
ViewConfigureFieldsPage::ViewConfigureFieldsPage( KABC::AddressBook *ab,
- QWidget *parent,
+ TQWidget *parent,
const char *name )
- : QWidget( parent, name ), mAddressBook( ab )
+ : TQWidget( parent, name ), mAddressBook( ab )
{
initGUI();
}
@@ -100,7 +100,7 @@ void ViewConfigureFieldsPage::slotShowFields( int index )
KABC::Field::List::ConstIterator it;
for ( it = allFields.begin(); it != allFields.end(); ++it ) {
- QListBoxItem *item = mSelectedBox->firstItem();
+ TQListBoxItem *item = mSelectedBox->firstItem();
while( item ) {
FieldItem *fieldItem = static_cast<FieldItem *>( item );
if ( (*it)->equals( fieldItem->field() ) )
@@ -180,7 +180,7 @@ void ViewConfigureFieldsPage::slotMoveUp()
{
int i = mSelectedBox->currentItem();
if ( i > 0 ) {
- QListBoxItem *item = mSelectedBox->item( i );
+ TQListBoxItem *item = mSelectedBox->item( i );
mSelectedBox->takeItem( item );
mSelectedBox->insertItem( item, i - 1 );
mSelectedBox->setCurrentItem( item );
@@ -192,7 +192,7 @@ void ViewConfigureFieldsPage::slotMoveDown()
{
int i = mSelectedBox->currentItem();
if ( i > -1 && i < (int)mSelectedBox->count() - 1 ) {
- QListBoxItem *item = mSelectedBox->item( i );
+ TQListBoxItem *item = mSelectedBox->item( i );
mSelectedBox->takeItem( item );
mSelectedBox->insertItem( item, i + 1 );
mSelectedBox->setCurrentItem( item );
@@ -204,7 +204,7 @@ void ViewConfigureFieldsPage::initGUI()
{
setCaption( i18n("Select Fields to Display") );
- QGridLayout *gl = new QGridLayout( this , 6, 4, 0, KDialog::spacingHint() );
+ TQGridLayout *gl = new TQGridLayout( this , 6, 4, 0, KDialog::spacingHint() );
mCategoryCombo = new KComboBox( false, this );
mCategoryCombo->insertItem( KABC::Field::categoryLabel( KABC::Field::All ) );
@@ -214,55 +214,55 @@ void ViewConfigureFieldsPage::initGUI()
mCategoryCombo->insertItem( KABC::Field::categoryLabel( KABC::Field::Personal ) );
mCategoryCombo->insertItem( KABC::Field::categoryLabel( KABC::Field::Organization ) );
mCategoryCombo->insertItem( KABC::Field::categoryLabel( KABC::Field::CustomCategory ) );
- connect( mCategoryCombo, SIGNAL( activated(int) ), SLOT( slotShowFields(int) ) );
+ connect( mCategoryCombo, TQT_SIGNAL( activated(int) ), TQT_SLOT( slotShowFields(int) ) );
gl->addWidget( mCategoryCombo, 0, 0 );
- QLabel *label = new QLabel( i18n( "&Selected fields:" ), this );
+ TQLabel *label = new TQLabel( i18n( "&Selected fields:" ), this );
gl->addWidget( label, 0, 2 );
- mUnSelectedBox = new QListBox( this );
- mUnSelectedBox->setSelectionMode( QListBox::Extended );
+ mUnSelectedBox = new TQListBox( this );
+ mUnSelectedBox->setSelectionMode( TQListBox::Extended );
mUnSelectedBox->setMinimumHeight( 100 );
gl->addWidget( mUnSelectedBox, 1, 0 );
- mSelectedBox = new QListBox( this );
- mSelectedBox->setSelectionMode( QListBox::Extended );
+ mSelectedBox = new TQListBox( this );
+ mSelectedBox->setSelectionMode( TQListBox::Extended );
label->setBuddy( mSelectedBox );
gl->addWidget( mSelectedBox, 1, 2 );
- QBoxLayout *vb1 = new QBoxLayout( QBoxLayout::TopToBottom, KDialog::spacingHint() );
+ TQBoxLayout *vb1 = new TQBoxLayout( TQBoxLayout::TopToBottom, KDialog::spacingHint() );
vb1->addStretch();
- mAddButton = new QToolButton( this );
- mAddButton->setIconSet( QApplication::reverseLayout() ? SmallIconSet( "1leftarrow" ) : SmallIconSet( "1rightarrow" ) );
- connect( mAddButton, SIGNAL( clicked() ), SLOT( slotSelect() ) );
+ mAddButton = new TQToolButton( this );
+ mAddButton->setIconSet( TQApplication::reverseLayout() ? SmallIconSet( "1leftarrow" ) : SmallIconSet( "1rightarrow" ) );
+ connect( mAddButton, TQT_SIGNAL( clicked() ), TQT_SLOT( slotSelect() ) );
vb1->addWidget( mAddButton );
- mRemoveButton = new QToolButton( this );
- mRemoveButton->setIconSet( QApplication::reverseLayout() ? SmallIconSet( "1rightarrow" ) : SmallIconSet( "1leftarrow" ) );
- connect( mRemoveButton, SIGNAL( clicked() ), SLOT( slotUnSelect() ) );
+ mRemoveButton = new TQToolButton( this );
+ mRemoveButton->setIconSet( TQApplication::reverseLayout() ? SmallIconSet( "1rightarrow" ) : SmallIconSet( "1leftarrow" ) );
+ connect( mRemoveButton, TQT_SIGNAL( clicked() ), TQT_SLOT( slotUnSelect() ) );
vb1->addWidget( mRemoveButton );
vb1->addStretch();
gl->addLayout( vb1, 1, 1 );
- QBoxLayout *vb2 = new QBoxLayout( QBoxLayout::TopToBottom, KDialog::spacingHint() );
+ TQBoxLayout *vb2 = new TQBoxLayout( TQBoxLayout::TopToBottom, KDialog::spacingHint() );
vb2->addStretch();
- mUpButton = new QToolButton( this );
+ mUpButton = new TQToolButton( this );
mUpButton->setIconSet( SmallIconSet( "1uparrow" ) );
- connect( mUpButton, SIGNAL( clicked() ), SLOT( slotMoveUp() ) );
+ connect( mUpButton, TQT_SIGNAL( clicked() ), TQT_SLOT( slotMoveUp() ) );
vb2->addWidget( mUpButton );
- mDownButton = new QToolButton( this );
+ mDownButton = new TQToolButton( this );
mDownButton->setIconSet( SmallIconSet( "1downarrow" ) );
- connect( mDownButton, SIGNAL( clicked() ), SLOT( slotMoveDown() ) );
+ connect( mDownButton, TQT_SIGNAL( clicked() ), TQT_SLOT( slotMoveDown() ) );
vb2->addWidget( mDownButton );
vb2->addStretch();
gl->addLayout( vb2, 1, 3 );
- QSize sizeHint = mUnSelectedBox->sizeHint();
+ TQSize sizeHint = mUnSelectedBox->sizeHint();
// make sure we fill the list with all items, so that we can
// get the maxItemWidth we need to not truncate the view
@@ -275,9 +275,9 @@ void ViewConfigureFieldsPage::initGUI()
gl->activate();
- connect( mUnSelectedBox, SIGNAL( selectionChanged() ), SLOT( slotButtonsEnabled() ) );
- connect( mSelectedBox, SIGNAL( selectionChanged() ), SLOT( slotButtonsEnabled() ) );
- connect( mSelectedBox, SIGNAL( currentChanged( QListBoxItem * ) ), SLOT( slotButtonsEnabled() ) );
+ connect( mUnSelectedBox, TQT_SIGNAL( selectionChanged() ), TQT_SLOT( slotButtonsEnabled() ) );
+ connect( mSelectedBox, TQT_SIGNAL( selectionChanged() ), TQT_SLOT( slotButtonsEnabled() ) );
+ connect( mSelectedBox, TQT_SIGNAL( currentChanged( TQListBoxItem * ) ), TQT_SLOT( slotButtonsEnabled() ) );
slotButtonsEnabled();
}
diff --git a/kaddressbook/viewconfigurefieldspage.h b/kaddressbook/viewconfigurefieldspage.h
index 27b421c6f..e0ccdb8ba 100644
--- a/kaddressbook/viewconfigurefieldspage.h
+++ b/kaddressbook/viewconfigurefieldspage.h
@@ -24,7 +24,7 @@
#ifndef VIEWCONFIGUREFIELDSPAGE_H
#define VIEWCONFIGUREFIELDSPAGE_H
-#include <qwidget.h>
+#include <tqwidget.h>
#include <kabc/field.h>
#include <kabc/addressbook.h>
@@ -40,7 +40,7 @@ class ViewConfigureFieldsPage : public QWidget
Q_OBJECT
public:
- ViewConfigureFieldsPage( KABC::AddressBook *ab, QWidget *parent = 0,
+ ViewConfigureFieldsPage( KABC::AddressBook *ab, TQWidget *parent = 0,
const char *name = 0 );
void restoreSettings( KConfig* );
@@ -59,12 +59,12 @@ class ViewConfigureFieldsPage : public QWidget
void initGUI();
KComboBox *mCategoryCombo;
- QListBox *mSelectedBox;
- QListBox *mUnSelectedBox;
- QToolButton *mAddButton;
- QToolButton *mRemoveButton;
- QToolButton *mUpButton;
- QToolButton *mDownButton;
+ TQListBox *mSelectedBox;
+ TQListBox *mUnSelectedBox;
+ TQToolButton *mAddButton;
+ TQToolButton *mRemoveButton;
+ TQToolButton *mUpButton;
+ TQToolButton *mDownButton;
KABC::AddressBook *mAddressBook;
};
diff --git a/kaddressbook/viewconfigurefilterpage.cpp b/kaddressbook/viewconfigurefilterpage.cpp
index 2db6e4923..7a07b050b 100644
--- a/kaddressbook/viewconfigurefilterpage.cpp
+++ b/kaddressbook/viewconfigurefilterpage.cpp
@@ -21,10 +21,10 @@
without including the source code for Qt in the source distribution.
*/
-#include <qbuttongroup.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qradiobutton.h>
+#include <tqbuttongroup.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqradiobutton.h>
#include <kconfig.h>
#include <kcombobox.h>
@@ -34,37 +34,37 @@
#include "viewconfigurefilterpage.h"
#include "filter.h"
-ViewConfigureFilterPage::ViewConfigureFilterPage( QWidget *parent,
+ViewConfigureFilterPage::ViewConfigureFilterPage( TQWidget *parent,
const char *name )
- : QWidget( parent, name )
+ : TQWidget( parent, name )
{
- QBoxLayout *topLayout = new QVBoxLayout( this, 0, KDialog::spacingHint() );
+ TQBoxLayout *topLayout = new TQVBoxLayout( this, 0, KDialog::spacingHint() );
- mFilterGroup = new QButtonGroup();
- connect( mFilterGroup, SIGNAL( clicked( int ) ), SLOT( buttonClicked( int ) ) );
+ mFilterGroup = new TQButtonGroup();
+ connect( mFilterGroup, TQT_SIGNAL( clicked( int ) ), TQT_SLOT( buttonClicked( int ) ) );
- QLabel *label = new QLabel( i18n( "The default filter will be activated whenever"
+ TQLabel *label = new TQLabel( i18n( "The default filter will be activated whenever"
" this view is displayed. This feature allows you to configure views that only"
" interact with certain types of information based on the filter. Once the view"
" is activated, the filter can be changed at anytime." ), this );
label->setAlignment( Qt::AlignLeft | Qt::AlignTop | Qt::WordBreak );
topLayout->addWidget( label );
- QWidget *spacer = new QWidget( this );
+ TQWidget *spacer = new TQWidget( this );
spacer->setMinimumHeight( 5 );
topLayout->addWidget( spacer );
- QRadioButton *button = new QRadioButton( i18n( "No default filter" ), this );
+ TQRadioButton *button = new TQRadioButton( i18n( "No default filter" ), this );
mFilterGroup->insert( button );
topLayout->addWidget( button );
- button = new QRadioButton( i18n( "Use last active filter" ), this );
+ button = new TQRadioButton( i18n( "Use last active filter" ), this );
mFilterGroup->insert( button );
topLayout->addWidget( button );
- QBoxLayout *comboLayout = new QHBoxLayout();
+ TQBoxLayout *comboLayout = new TQHBoxLayout();
topLayout->addLayout( comboLayout );
- button = new QRadioButton( i18n( "Use filter:" ), this );
+ button = new TQRadioButton( i18n( "Use filter:" ), this );
mFilterGroup->insert( button );
comboLayout->addWidget( button );
diff --git a/kaddressbook/viewconfigurefilterpage.h b/kaddressbook/viewconfigurefilterpage.h
index bc50b3096..fbb8b987b 100644
--- a/kaddressbook/viewconfigurefilterpage.h
+++ b/kaddressbook/viewconfigurefilterpage.h
@@ -24,7 +24,7 @@
#ifndef VIEWCONFIGUREFILTERPAGE
#define VIEWCONFIGUREFILTERPAGE
-#include <qwidget.h>
+#include <tqwidget.h>
class QButtonGroup;
@@ -36,7 +36,7 @@ class ViewConfigureFilterPage : public QWidget
Q_OBJECT
public:
- ViewConfigureFilterPage( QWidget *parent, const char *name = 0 );
+ ViewConfigureFilterPage( TQWidget *parent, const char *name = 0 );
~ViewConfigureFilterPage();
void restoreSettings( KConfig* );
@@ -47,7 +47,7 @@ class ViewConfigureFilterPage : public QWidget
private:
KComboBox *mFilterCombo;
- QButtonGroup *mFilterGroup;
+ TQButtonGroup *mFilterGroup;
};
#endif
diff --git a/kaddressbook/viewconfigurewidget.cpp b/kaddressbook/viewconfigurewidget.cpp
index f8e883f0b..f75fe1cec 100644
--- a/kaddressbook/viewconfigurewidget.cpp
+++ b/kaddressbook/viewconfigurewidget.cpp
@@ -21,8 +21,8 @@
without including the source code for Qt in the source distribution.
*/
-#include <qlayout.h>
-#include <qvbox.h>
+#include <tqlayout.h>
+#include <tqvbox.h>
#include <kapplication.h>
#include <kconfig.h>
@@ -37,17 +37,17 @@
#include "viewconfigurewidget.h"
-ViewConfigureWidget::ViewConfigureWidget( KABC::AddressBook *ab, QWidget *parent,
+ViewConfigureWidget::ViewConfigureWidget( KABC::AddressBook *ab, TQWidget *parent,
const char *name )
: KAB::ConfigureWidget( ab, parent, name )
{
- QVBoxLayout *topLayout = new QVBoxLayout( this );
+ TQVBoxLayout *topLayout = new TQVBoxLayout( this );
mMainWidget = new KJanusWidget( this, "JanusWidget", KJanusWidget::IconList );
topLayout->addWidget( mMainWidget );
// Add the first page, the attributes
- QVBox *page = addPage( i18n( "Fields" ), QString::null,
+ TQVBox *page = addPage( i18n( "Fields" ), TQString::null,
KGlobal::iconLoader()->loadIcon( "view_detailed",
KIcon::Panel ) );
@@ -55,7 +55,7 @@ ViewConfigureWidget::ViewConfigureWidget( KABC::AddressBook *ab, QWidget *parent
mFieldsPage = new ViewConfigureFieldsPage( addressBook(), page );
// Add the second page, the filter selection
- page = addPage( i18n( "Default Filter" ), QString::null,
+ page = addPage( i18n( "Default Filter" ), TQString::null,
KGlobal::iconLoader()->loadIcon( "filter",
KIcon::Panel ) );
@@ -78,14 +78,14 @@ void ViewConfigureWidget::saveSettings( KConfig *config )
mFilterPage->saveSettings( config );
}
-QVBox *ViewConfigureWidget::addPage( const QString &item, const QString &header,
- const QPixmap &pixmap )
+TQVBox *ViewConfigureWidget::addPage( const TQString &item, const TQString &header,
+ const TQPixmap &pixmap )
{
return mMainWidget->addVBoxPage( item, header, pixmap );
}
-ViewConfigureDialog::ViewConfigureDialog( ViewConfigureWidget *wdg, const QString &viewName,
- QWidget *parent, const char *name )
+ViewConfigureDialog::ViewConfigureDialog( ViewConfigureWidget *wdg, const TQString &viewName,
+ TQWidget *parent, const char *name )
: KDialogBase( Swallow, i18n( "Modify View: " ) + viewName, Help | Ok | Cancel,
Ok, parent, name, true, true ), mConfigWidget( wdg )
{
diff --git a/kaddressbook/viewconfigurewidget.h b/kaddressbook/viewconfigurewidget.h
index f5511b7e1..590b9fa1e 100644
--- a/kaddressbook/viewconfigurewidget.h
+++ b/kaddressbook/viewconfigurewidget.h
@@ -26,7 +26,7 @@
#include <kdialogbase.h>
#include <kdepimmacros.h>
-#include <qpixmap.h>
+#include <tqpixmap.h>
#include "configurewidget.h"
@@ -50,7 +50,7 @@ class KDE_EXPORT ViewConfigureWidget : public KAB::ConfigureWidget
Q_OBJECT
public:
- ViewConfigureWidget( KABC::AddressBook *ab, QWidget *parent, const char *name = 0 );
+ ViewConfigureWidget( KABC::AddressBook *ab, TQWidget *parent, const char *name = 0 );
virtual ~ViewConfigureWidget();
/**
@@ -74,8 +74,8 @@ class KDE_EXPORT ViewConfigureWidget : public KAB::ConfigureWidget
/**
Use this method to add new pages to the widget.
*/
- QVBox *addPage( const QString &item, const QString &header = QString::null,
- const QPixmap &pixmap = QPixmap() );
+ TQVBox *addPage( const TQString &item, const TQString &header = TQString::null,
+ const TQPixmap &pixmap = TQPixmap() );
private:
KJanusWidget *mMainWidget;
@@ -89,8 +89,8 @@ class ViewConfigureDialog : public KDialogBase
Q_OBJECT
public:
- ViewConfigureDialog( ViewConfigureWidget *wdg, const QString &viewName,
- QWidget *parent, const char *name = 0 );
+ ViewConfigureDialog( ViewConfigureWidget *wdg, const TQString &viewName,
+ TQWidget *parent, const char *name = 0 );
~ViewConfigureDialog();
void restoreSettings( KConfig* );
diff --git a/kaddressbook/viewmanager.cpp b/kaddressbook/viewmanager.cpp
index 9d2f632ed..4e4cd5a65 100644
--- a/kaddressbook/viewmanager.cpp
+++ b/kaddressbook/viewmanager.cpp
@@ -21,9 +21,9 @@
without including the source code for Qt in the source distribution.
*/
-#include <qfile.h>
-#include <qlayout.h>
-#include <qwidgetstack.h>
+#include <tqfile.h>
+#include <tqlayout.h>
+#include <tqwidgetstack.h>
#include <libkdepim/kvcarddrag.h>
#include <kabc/addressbook.h>
@@ -49,8 +49,8 @@
#include "viewmanager.h"
-ViewManager::ViewManager( KAB::Core *core, QWidget *parent, const char *name )
- : QWidget( parent, name ), mCore( core ), mActiveView( 0 ),
+ViewManager::ViewManager( KAB::Core *core, TQWidget *parent, const char *name )
+ : TQWidget( parent, name ), mCore( core ), mActiveView( 0 ),
mFilterSelectionWidget( 0 )
{
initGUI();
@@ -70,7 +70,7 @@ ViewManager::~ViewManager()
void ViewManager::restoreSettings()
{
mViewNameList = KABPrefs::instance()->viewNames();
- QString activeViewName = KABPrefs::instance()->currentView();
+ TQString activeViewName = KABPrefs::instance()->currentView();
mActionSelectView->setItems( mViewNameList );
@@ -81,7 +81,7 @@ void ViewManager::restoreSettings()
// Tell the views to reread their config, since they may have
// been modified by global settings
- QDictIterator<KAddressBookView> it( mViewDict );
+ TQDictIterator<KAddressBookView> it( mViewDict );
for ( it.toFirst(); it.current(); ++it ) {
KConfigGroupSaver saver( mCore->config(), it.currentKey() );
it.current()->readConfig( mCore->config() );
@@ -94,7 +94,7 @@ void ViewManager::restoreSettings()
void ViewManager::saveSettings()
{
- QDictIterator<KAddressBookView> it( mViewDict );
+ TQDictIterator<KAddressBookView> it( mViewDict );
for ( it.toFirst(); it.current(); ++it ) {
KConfigGroupSaver saver( mCore->config(), it.currentKey() );
(*it)->writeConfig( mCore->config() );
@@ -110,28 +110,28 @@ void ViewManager::saveSettings()
KABPrefs::instance()->setCurrentView( mActiveView->caption() );
}
-QStringList ViewManager::selectedUids() const
+TQStringList ViewManager::selectedUids() const
{
if ( mActiveView ) {
return mActiveView->selectedUids();
} else
- return QStringList();
+ return TQStringList();
}
-QStringList ViewManager::selectedEmails() const
+TQStringList ViewManager::selectedEmails() const
{
if ( mActiveView )
return mActiveView->selectedEmails();
else
- return QStringList();
+ return TQStringList();
}
KABC::Addressee::List ViewManager::selectedAddressees() const
{
KABC::Addressee::List list;
- const QStringList uids = selectedUids();
- QStringList::ConstIterator it;
+ const TQStringList uids = selectedUids();
+ TQStringList::ConstIterator it;
for ( it = uids.begin(); it != uids.end(); ++it ) {
KABC::Addressee addr = mCore->addressBook()->findByUid( *it );
if ( !addr.isEmpty() )
@@ -164,7 +164,7 @@ KABC::Field::List ViewManager::viewFields() const
return KABC::Field::List();
}
-void ViewManager::setSelected( const QString &uid, bool selected )
+void ViewManager::setSelected( const TQString &uid, bool selected )
{
if ( mActiveView )
mActiveView->setSelected( uid, selected );
@@ -182,7 +182,7 @@ void ViewManager::unloadViews()
mActiveView = 0;
}
-void ViewManager::setActiveView( const QString &name )
+void ViewManager::setActiveView( const TQString &name )
{
KAddressBookView *view = 0;
@@ -201,7 +201,7 @@ void ViewManager::setActiveView( const QString &name )
if ( view == 0 ) {
KConfig *config = mCore->config();
KConfigGroupSaver saver( config, name );
- QString type = config->readEntry( "Type", "Table" );
+ TQString type = config->readEntry( "Type", "Table" );
kdDebug(5720) << "ViewManager::setActiveView: creating view - " << name << endl;
@@ -216,15 +216,15 @@ void ViewManager::setActiveView( const QString &name )
view->readConfig( config );
// The manager just relays the signals
- connect( view, SIGNAL( selected( const QString& ) ),
- SIGNAL( selected( const QString & ) ) );
- connect( view, SIGNAL( executed( const QString& ) ),
- SIGNAL( executed( const QString& ) ) );
- connect( view, SIGNAL( modified() ), SIGNAL( modified() ) );
- connect( view, SIGNAL( dropped( QDropEvent* ) ),
- SLOT( dropped( QDropEvent* ) ) );
- connect( view, SIGNAL( startDrag() ), SLOT( startDrag() ) );
- connect( view, SIGNAL( sortFieldChanged() ), SIGNAL( sortFieldChanged() ) );
+ connect( view, TQT_SIGNAL( selected( const TQString& ) ),
+ TQT_SIGNAL( selected( const TQString & ) ) );
+ connect( view, TQT_SIGNAL( executed( const TQString& ) ),
+ TQT_SIGNAL( executed( const TQString& ) ) );
+ connect( view, TQT_SIGNAL( modified() ), TQT_SIGNAL( modified() ) );
+ connect( view, TQT_SIGNAL( dropped( TQDropEvent* ) ),
+ TQT_SLOT( dropped( TQDropEvent* ) ) );
+ connect( view, TQT_SIGNAL( startDrag() ), TQT_SLOT( startDrag() ) );
+ connect( view, TQT_SIGNAL( sortFieldChanged() ), TQT_SIGNAL( sortFieldChanged() ) );
}
}
@@ -254,7 +254,7 @@ void ViewManager::setActiveView( const QString &name )
kdDebug(5720) << "ViewManager::setActiveView: unable to find view\n";
}
-void ViewManager::refreshView( const QString &uid )
+void ViewManager::refreshView( const TQString &uid )
{
if ( mActiveView )
mActiveView->refresh( uid );
@@ -306,9 +306,9 @@ void ViewManager::editView()
void ViewManager::deleteView()
{
- QString text = i18n( "<qt>Are you sure that you want to delete the view <b>%1</b>?</qt>" )
+ TQString text = i18n( "<qt>Are you sure that you want to delete the view <b>%1</b>?</qt>" )
.arg( mActiveView->caption() );
- QString caption = i18n( "Confirm Delete" );
+ TQString caption = i18n( "Confirm Delete" );
if ( KMessageBox::warningContinueCancel( this, text, caption, KGuiItem( i18n("&Delete"), "editdelete") ) == KMessageBox::Continue ) {
mViewNameList.remove( mActiveView->caption() );
@@ -336,8 +336,8 @@ void ViewManager::addView()
AddViewDialog dialog( &mViewFactoryDict, this );
if ( dialog.exec() ) {
- QString newName = dialog.viewName();
- QString type = dialog.viewType();
+ TQString newName = dialog.viewName();
+ TQString type = dialog.viewType();
// Check for name conflicts
bool firstConflict = true;
@@ -348,7 +348,7 @@ void ViewManager::addView()
firstConflict = false;
}
- newName = QString( "%1 <%2>" ).arg( newName ).arg( numTries );
+ newName = TQString( "%1 <%2>" ).arg( newName ).arg( numTries );
numTries++;
}
@@ -387,7 +387,7 @@ void ViewManager::scrollDown()
void ViewManager::createViewFactories()
{
const KTrader::OfferList plugins = KTrader::self()->query( "KAddressBook/View",
- QString( "[X-KDE-KAddressBook-ViewPluginVersion] == %1" ).arg( KAB_VIEW_PLUGIN_VERSION ) );
+ TQString( "[X-KDE-KAddressBook-ViewPluginVersion] == %1" ).arg( KAB_VIEW_PLUGIN_VERSION ) );
KTrader::OfferList::ConstIterator it;
for ( it = plugins.begin(); it != plugins.end(); ++it ) {
if ( !(*it)->hasServiceType( "KAddressBook/View" ) )
@@ -411,7 +411,7 @@ void ViewManager::createViewFactories()
}
}
-void ViewManager::dropped( QDropEvent *e )
+void ViewManager::dropped( TQDropEvent *e )
{
kdDebug(5720) << "ViewManager::dropped: got a drop event" << endl;
@@ -419,14 +419,14 @@ void ViewManager::dropped( QDropEvent *e )
if ( e->source() == this )
return;
- QString clipText, vcards;
+ TQString clipText, vcards;
KURL::List urls;
if ( KURLDrag::decode( e, urls) ) {
KURL::List::ConstIterator it = urls.begin();
int c = urls.count();
if ( c > 1 ) {
- QString questionString = i18n( "Import one contact into your addressbook?", "Import %n contacts into your addressbook?", c );
+ TQString questionString = i18n( "Import one contact into your addressbook?", "Import %n contacts into your addressbook?", c );
if ( KMessageBox::questionYesNo( this, questionString, i18n( "Import Contacts?" ), i18n("Import"), i18n("Do Not Import") ) == KMessageBox::Yes ) {
for ( ; it != urls.end(); ++it )
emit urlDropped( *it );
@@ -454,35 +454,35 @@ void ViewManager::startDrag()
{
// Get the list of all the selected addressees
KABC::Addressee::List addrList;
- const QStringList uidList = selectedUids();
+ const TQStringList uidList = selectedUids();
if ( uidList.isEmpty() )
return;
kdDebug(5720) << "ViewManager::startDrag: starting to drag" << endl;
- QStringList::ConstIterator it;
+ TQStringList::ConstIterator it;
for ( it = uidList.begin(); it != uidList.end(); ++it )
addrList.append( mCore->addressBook()->findByUid( *it ) );
KMultipleDrag *drag = new KMultipleDrag( this );
KABC::VCardConverter converter;
- QString vcards = converter.createVCards( addrList );
+ TQString vcards = converter.createVCards( addrList );
// Best text representation is given by textdrag, so it must be first
- drag->addDragObject( new QTextDrag( AddresseeUtil::addresseesToEmails( addrList ), this ) );
+ drag->addDragObject( new TQTextDrag( AddresseeUtil::addresseesToEmails( addrList ), this ) );
drag->addDragObject( new KVCardDrag( vcards, this ) );
KTempDir tempDir;
// can't set tempDir to autoDelete, in case of dropping on the desktop, the copy is async...
if ( tempDir.status() == 0 ) {
- QString fileName;
+ TQString fileName;
if ( addrList.count() == 1 )
fileName = addrList[ 0 ].givenName() + "_" + addrList[ 0 ].familyName() + ".vcf";
else
fileName = "contacts.vcf";
- QFile tempFile( tempDir.name() + "/" + fileName );
+ TQFile tempFile( tempDir.name() + "/" + fileName );
if ( tempFile.open( IO_WriteOnly ) ) {
tempFile.writeBlock( vcards.utf8() );
tempFile.close();
@@ -514,7 +514,7 @@ void ViewManager::setActiveFilter( int index )
if ( mActiveView ) {
mActiveView->setFilter( currentFilter );
mActiveView->refresh();
- emit selected( QString::null );
+ emit selected( TQString::null );
}
}
@@ -533,9 +533,9 @@ void ViewManager::configureFilters()
setActiveFilter( pos );
}
-QStringList ViewManager::filterNames() const
+TQStringList ViewManager::filterNames() const
{
- QStringList names( i18n( "None" ) );
+ TQStringList names( i18n( "None" ) );
names.append( i18n( "Unfiled" ) );
Filter::List::ConstIterator it;
@@ -545,7 +545,7 @@ QStringList ViewManager::filterNames() const
return names;
}
-int ViewManager::filterPosition( const QString &name ) const
+int ViewManager::filterPosition( const TQString &name ) const
{
int pos = 0;
@@ -563,41 +563,41 @@ void ViewManager::initActions()
#if KDE_VERSION >= 309
mActionSelectView->setMenuAccelsEnabled( false );
#endif
- connect( mActionSelectView, SIGNAL( activated( const QString& ) ),
- SLOT( setActiveView( const QString& ) ) );
+ connect( mActionSelectView, TQT_SIGNAL( activated( const TQString& ) ),
+ TQT_SLOT( setActiveView( const TQString& ) ) );
KAction *action;
action = new KAction( i18n( "Modify View..." ), "configure", 0, this,
- SLOT( editView() ), mCore->actionCollection(),
+ TQT_SLOT( editView() ), mCore->actionCollection(),
"view_modify" );
action->setWhatsThis( i18n( "By pressing this button a dialog opens that allows you to modify the view of the addressbook. There you can add or remove fields that you want to be shown or hidden in the addressbook like the name for example." ) );
action = new KAction( i18n( "Add View..." ), "window_new", 0, this,
- SLOT( addView() ), mCore->actionCollection(),
+ TQT_SLOT( addView() ), mCore->actionCollection(),
"view_add" );
action->setWhatsThis( i18n( "You can add a new view by choosing one from the dialog that appears after pressing the button. You have to give the view a name, so that you can distinguish between the different views." ) );
mActionDeleteView = new KAction( i18n( "Delete View" ), "view_remove", 0,
- this, SLOT( deleteView() ),
+ this, TQT_SLOT( deleteView() ),
mCore->actionCollection(), "view_delete" );
mActionDeleteView->setWhatsThis( i18n( "By pressing this button you can delete the actual view, which you have added before." ) );
action = new KAction( i18n( "Refresh View" ), "reload", 0, this,
- SLOT( refreshView() ), mCore->actionCollection(),
+ TQT_SLOT( refreshView() ), mCore->actionCollection(),
"view_refresh" );
action->setWhatsThis( i18n( "The view will be refreshed by pressing this button." ) );
action = new KAction( i18n( "Edit &Filters..." ), "filter", 0, this,
- SLOT( configureFilters() ), mCore->actionCollection(),
+ TQT_SLOT( configureFilters() ), mCore->actionCollection(),
"options_edit_filters" );
action->setWhatsThis( i18n( "Edit the contact filters<p>You will be presented with a dialog, where you can add, remove and edit filters." ) );
}
void ViewManager::initGUI()
{
- QHBoxLayout *layout = new QHBoxLayout( this );
- mViewWidgetStack = new QWidgetStack( this );
+ TQHBoxLayout *layout = new TQHBoxLayout( this );
+ mViewWidgetStack = new TQWidgetStack( this );
layout->addWidget( mViewWidgetStack );
}
diff --git a/kaddressbook/viewmanager.h b/kaddressbook/viewmanager.h
index b74f025ee..4b37b10ba 100644
--- a/kaddressbook/viewmanager.h
+++ b/kaddressbook/viewmanager.h
@@ -24,8 +24,8 @@
#ifndef VIEWMANAGER_H
#define VIEWMANAGER_H
-#include <qdict.h>
-#include <qwidget.h>
+#include <tqdict.h>
+#include <tqwidget.h>
#include <kaddressbookview.h>
class QDropEvent;
@@ -52,7 +52,7 @@ class ViewManager : public QWidget
Q_OBJECT
public:
- ViewManager( KAB::Core *core, QWidget *parent, const char *name = 0 );
+ ViewManager( KAB::Core *core, TQWidget *parent, const char *name = 0 );
~ViewManager();
void restoreSettings();
@@ -60,8 +60,8 @@ class ViewManager : public QWidget
void unloadViews();
- QStringList selectedUids() const;
- QStringList selectedEmails() const;
+ TQStringList selectedUids() const;
+ TQStringList selectedEmails() const;
KABC::Addressee::List selectedAddressees() const;
void setFilterSelectionWidget( FilterSelectionWidget *wdg );
@@ -70,10 +70,10 @@ class ViewManager : public QWidget
KABC::Field::List viewFields() const;
public slots:
- void setSelected( const QString &uid = QString::null, bool selected = true );
+ void setSelected( const TQString &uid = TQString::null, bool selected = true );
void setFirstSelected( bool selected = true );
- void refreshView( const QString &uid = QString::null );
+ void refreshView( const TQString &uid = TQString::null );
void editView();
void deleteView();
void addView();
@@ -87,7 +87,7 @@ class ViewManager : public QWidget
This method will try to decode what was dropped, and if it was
a valid addressee, add it to the addressbook.
*/
- void dropped( QDropEvent* );
+ void dropped( TQDropEvent* );
/**
Called whenever the user attempts to start a drag in the view.
@@ -100,12 +100,12 @@ class ViewManager : public QWidget
/**
Emitted whenever the user selects an entry in the view.
*/
- void selected( const QString &uid );
+ void selected( const TQString &uid );
/**
Emitted whenever the user activates an entry in the view.
*/
- void executed( const QString &uid );
+ void executed( const TQString &uid );
/**
Emitted whenever the address book is modified in some way.
@@ -128,16 +128,16 @@ class ViewManager : public QWidget
void viewFieldsChanged();
private slots:
- void setActiveView( const QString &name );
+ void setActiveView( const TQString &name );
void setActiveFilter( int index );
void configureFilters();
private:
void createViewFactories();
- QStringList filterNames() const;
- int filterPosition( const QString &name ) const;
- QStringList viewNames() const;
- int viewPosition( const QString &name ) const;
+ TQStringList filterNames() const;
+ int filterPosition( const TQString &name ) const;
+ TQStringList viewNames() const;
+ int viewPosition( const TQString &name ) const;
void initActions();
void initGUI();
@@ -146,11 +146,11 @@ class ViewManager : public QWidget
Filter mCurrentFilter;
Filter::List mFilterList;
- QDict<KAddressBookView> mViewDict;
- QDict<ViewFactory> mViewFactoryDict;
- QStringList mViewNameList;
+ TQDict<KAddressBookView> mViewDict;
+ TQDict<ViewFactory> mViewFactoryDict;
+ TQStringList mViewNameList;
- QWidgetStack *mViewWidgetStack;
+ TQWidgetStack *mViewWidgetStack;
KAddressBookView *mActiveView;
KAction *mActionDeleteView;
diff --git a/kaddressbook/views/cardview.cpp b/kaddressbook/views/cardview.cpp
index 82e987794..6e7d71d67 100644
--- a/kaddressbook/views/cardview.cpp
+++ b/kaddressbook/views/cardview.cpp
@@ -24,13 +24,13 @@
#include <limits.h>
-#include <qcursor.h>
-#include <qdatetime.h>
-#include <qlabel.h>
-#include <qpainter.h>
-#include <qstyle.h>
-#include <qtimer.h>
-#include <qtooltip.h>
+#include <tqcursor.h>
+#include <tqdatetime.h>
+#include <tqlabel.h>
+#include <tqpainter.h>
+#include <tqstyle.h>
+#include <tqtimer.h>
+#include <tqtooltip.h>
#include <kdebug.h>
#include <kglobalsettings.h>
@@ -42,10 +42,10 @@
class CardViewTip : public QLabel
{
public:
- CardViewTip( QWidget *parent = 0, const char *name = 0 )
- : QLabel( parent, name )
+ CardViewTip( TQWidget *parent = 0, const char *name = 0 )
+ : TQLabel( parent, name )
{
- setPalette( QToolTip::palette() );
+ setPalette( TQToolTip::palette() );
setFrameStyle( Panel | Plain );
setMidLineWidth( 0 );
setIndent( 1 );
@@ -54,7 +54,7 @@ class CardViewTip : public QLabel
~CardViewTip() {};
protected:
- void leaveEvent( QEvent* )
+ void leaveEvent( TQEvent* )
{
hide();
}
@@ -64,11 +64,11 @@ class CardViewTip : public QLabel
// Warning: make sure you use findRef() instead of find() to find an
// item! Only the pointer value is unique in the list.
//
-class CardViewItemList : public QPtrList<CardViewItem>
+class CardViewItemList : public TQPtrList<CardViewItem>
{
protected:
- virtual int compareItems( QPtrCollection::Item item1,
- QPtrCollection::Item item2 )
+ virtual int compareItems( TQPtrCollection::Item item1,
+ TQPtrCollection::Item item2 )
{
CardViewItem *cItem1 = (CardViewItem*)item1;
CardViewItem *cItem2 = (CardViewItem*)item2;
@@ -96,15 +96,15 @@ class CardViewSeparator
CardViewSeparator( CardView *view )
: mView( view )
{
- mRect = QRect( 0, 0, view->separatorWidth(), 0 );
+ mRect = TQRect( 0, 0, view->separatorWidth(), 0 );
}
~CardViewSeparator() {}
- void paintSeparator( QPainter *p, QColorGroup &cg )
+ void paintSeparator( TQPainter *p, TQColorGroup &cg )
{
p->fillRect( 0, 0, mRect.width(), mRect.height(),
- cg.brush(QColorGroup::Button) );
+ cg.brush(TQColorGroup::Button) );
}
void repaintSeparator()
@@ -114,7 +114,7 @@ class CardViewSeparator
private:
CardView *mView;
- QRect mRect;
+ TQRect mRect;
};
class CardViewPrivate
@@ -134,16 +134,16 @@ class CardViewPrivate
mItemWidth( 200 ),
mMaxFieldLines( INT_MAX ),
mCurrentItem( 0L ),
- mLastClickPos( QPoint(0, 0) ),
+ mLastClickPos( TQPoint(0, 0) ),
mRubberBandAnchor( 0 ),
- mCompText( QString::null )
+ mCompText( TQString::null )
{};
CardViewItemList mItemList;
- QPtrList<CardViewSeparator> mSeparatorList;
- QFontMetrics *mFm;
- QFontMetrics *mBFm;
- QFont mHeaderFont;
+ TQPtrList<CardViewSeparator> mSeparatorList;
+ TQFontMetrics *mFm;
+ TQFontMetrics *mBFm;
+ TQFont mHeaderFont;
CardView::SelectionMode mSelectionMode;
bool mDrawCardBorder;
bool mDrawFieldLabels;
@@ -157,8 +157,8 @@ class CardViewPrivate
int mItemWidth; // width of all items
uint mMaxFieldLines; // Max lines to dispaly pr field
CardViewItem *mCurrentItem;
- QPoint mLastClickPos;
- QTimer *mTimer; // times out if mouse rests for more than 500 msecs
+ TQPoint mLastClickPos;
+ TQTimer *mTimer; // times out if mouse rests for more than 500 msecs
CardViewTip *mTip; // passed to the item under a resting cursor to display full text
bool mOnSeparator; // set/reset on mouse movement
// for resizing by dragging the separators
@@ -173,8 +173,8 @@ class CardViewPrivate
int mPressed; // the colummn that was pressed on at resizing start
int mSpan; // pressed - first
// key completion
- QString mCompText; // current completion string
- QDateTime mCompUpdated; // ...was updated at this time
+ TQString mCompText; // current completion string
+ TQDateTime mCompUpdated; // ...was updated at this time
};
class CardViewItemPrivate
@@ -182,8 +182,8 @@ class CardViewItemPrivate
public:
CardViewItemPrivate() {}
- QString mCaption;
- QPtrList< CardViewItem::Field > mFieldList;
+ TQString mCaption;
+ TQPtrList< CardViewItem::Field > mFieldList;
bool mSelected;
int x; // horizontal position, set by the view
int y; // vertical position, set by the view
@@ -192,7 +192,7 @@ class CardViewItemPrivate
};
-CardViewItem::CardViewItem( CardView *parent, const QString &caption )
+CardViewItem::CardViewItem( CardView *parent, const TQString &caption )
: d( new CardViewItemPrivate() ), mView( parent )
{
d->mCaption = caption;
@@ -222,15 +222,15 @@ void CardViewItem::initialize()
mView->insertItem( this );
}
-void CardViewItem::paintCard( QPainter *p, QColorGroup &cg )
+void CardViewItem::paintCard( TQPainter *p, TQColorGroup &cg )
{
if ( !mView )
return;
- QPen pen;
- QBrush brush;
- QFontMetrics fm = *(mView->d->mFm);
- QFontMetrics bFm = *(mView->d->mBFm);
+ TQPen pen;
+ TQBrush brush;
+ TQFontMetrics fm = *(mView->d->mFm);
+ TQFontMetrics bFm = *(mView->d->mBFm);
bool drawLabels = mView->d->mDrawFieldLabels;
bool drawBorder = mView->d->mDrawCardBorder;
int mg = mView->itemMargin();
@@ -252,9 +252,9 @@ void CardViewItem::paintCard( QPainter *p, QColorGroup &cg )
// Draw a simple box
if ( isSelected() )
- pen = QPen( cg.highlight(), 1 );
+ pen = TQPen( cg.highlight(), 1 );
else
- pen = QPen( cg.button(), 1 );
+ pen = TQPen( cg.button(), 1 );
p->setPen( pen );
// Draw the border - this is only draw if the user asks for it.
@@ -263,15 +263,15 @@ void CardViewItem::paintCard( QPainter *p, QColorGroup &cg )
// set the proper pen color for the caption box
if ( isSelected() )
- brush = cg.brush( QColorGroup::Highlight );
+ brush = cg.brush( TQColorGroup::Highlight );
else
- brush = cg.brush( QColorGroup::Button );
+ brush = cg.brush( TQColorGroup::Button );
p->fillRect( mg, mg, w, 4 + bFm.height(), brush );
// Now paint the caption
p->save();
- QFont bFont = mView->headerFont();
+ TQFont bFont = mView->headerFont();
p->setFont( bFont );
if ( isSelected() )
p->setPen( cg.highlightedText() );
@@ -282,14 +282,14 @@ void CardViewItem::paintCard( QPainter *p, QColorGroup &cg )
p->restore();
// Go through the fields and draw them
- QPtrListIterator<CardViewItem::Field> iter( d->mFieldList );
- QString label, value;
+ TQPtrListIterator<CardViewItem::Field> iter( d->mFieldList );
+ TQString label, value;
int yPos = mg + 4 + bFm.height() + fm.height();
p->setPen( cg.text() );
int fh = fm.height();
int cln( 0 );
- QString tmp;
+ TQString tmp;
int maxLines = mView->maxFieldLines();
for ( iter.toFirst(); iter.current(); ++iter ) {
value = (*iter)->second;
@@ -316,14 +316,14 @@ void CardViewItem::paintCard( QPainter *p, QColorGroup &cg )
// if we are the current item and the view has focus, draw focus rect
if ( mView->currentItem() == this && mView->hasFocus() ) {
- mView->style().drawPrimitive( QStyle::PE_FocusRect, p,
- QRect( 0, 0, mView->itemWidth(), h + (2 * mg) ), cg,
- QStyle::Style_FocusAtBorder,
- QStyleOption( isSelected() ? cg.highlight() : cg.base() ) );
+ mView->style().drawPrimitive( TQStyle::PE_FocusRect, p,
+ TQRect( 0, 0, mView->itemWidth(), h + (2 * mg) ), cg,
+ TQStyle::Style_FocusAtBorder,
+ TQStyleOption( isSelected() ? cg.highlight() : cg.base() ) );
}
}
-const QString &CardViewItem::caption() const
+const TQString &CardViewItem::caption() const
{
return d->mCaption;
}
@@ -351,7 +351,7 @@ int CardViewItem::height( bool allowCache ) const
int fieldHeight = 0;
int lines;
int maxLines( mView->maxFieldLines() );
- QPtrListIterator<CardViewItem::Field> iter( d->mFieldList );
+ TQPtrListIterator<CardViewItem::Field> iter( d->mFieldList );
for ( iter.toFirst(); iter.current(); ++iter ) {
if ( !sef && (*iter)->second.isEmpty() )
continue;
@@ -375,7 +375,7 @@ void CardViewItem::setSelected( bool selected )
d->mSelected = selected;
}
-void CardViewItem::insertField( const QString &label, const QString &value )
+void CardViewItem::insertField( const TQString &label, const TQString &value )
{
CardViewItem::Field *f = new CardViewItem::Field( label, value );
d->mFieldList.append( f );
@@ -387,11 +387,11 @@ void CardViewItem::insertField( const QString &label, const QString &value )
}
}
-void CardViewItem::removeField( const QString &label )
+void CardViewItem::removeField( const TQString &label )
{
CardViewItem::Field *f;
- QPtrListIterator<CardViewItem::Field> iter( d->mFieldList );
+ TQPtrListIterator<CardViewItem::Field> iter( d->mFieldList );
for ( iter.toFirst(); iter.current(); ++iter ) {
f = *iter;
if ( f->first == label )
@@ -415,15 +415,15 @@ void CardViewItem::clearFields()
mView->setLayoutDirty( true );
}
-QString CardViewItem::trimString( const QString &text, int width,
- QFontMetrics &fm ) const
+TQString CardViewItem::trimString( const TQString &text, int width,
+ TQFontMetrics &fm ) const
{
if ( fm.width( text ) <= width )
return text;
- QString dots = "...";
+ TQString dots = "...";
int dotWidth = fm.width( dots );
- QString trimmed;
+ TQString trimmed;
int charNum = 0;
while ( fm.width( trimmed ) + dotWidth < width ) {
@@ -454,27 +454,27 @@ void CardViewItem::repaintCard()
mView->repaintItem( this );
}
-void CardViewItem::setCaption( const QString &caption )
+void CardViewItem::setCaption( const TQString &caption )
{
d->mCaption = caption;
repaintCard();
}
-QString CardViewItem::fieldValue( const QString &label ) const
+TQString CardViewItem::fieldValue( const TQString &label ) const
{
- QPtrListIterator<CardViewItem::Field> iter( d->mFieldList );
+ TQPtrListIterator<CardViewItem::Field> iter( d->mFieldList );
for ( iter.toFirst(); iter.current(); ++iter )
if ( (*iter)->first == label )
return (*iter)->second;
- return QString();
+ return TQString();
}
-void CardViewItem::showFullString( const QPoint &itempos, CardViewTip *tip )
+void CardViewItem::showFullString( const TQPoint &itempos, CardViewTip *tip )
{
bool trimmed( false );
- QString s;
+ TQString s;
int mrg = mView->itemMargin();
int y = mView->d->mBFm->height() + 6 + mrg;
int w = mView->itemWidth() - (2 * mrg);
@@ -520,7 +520,7 @@ void CardViewItem::showFullString( const QPoint &itempos, CardViewTip *tip )
if ( isLabel ) {
trimmed = mView->d->mFm->width( s ) > mw - colonWidth;
} else {
- QRect r( mView->d->mFm->boundingRect( 0, 0, INT_MAX, INT_MAX, Qt::AlignTop|Qt::AlignLeft, s ) );
+ TQRect r( mView->d->mFm->boundingRect( 0, 0, INT_MAX, INT_MAX, Qt::AlignTop|Qt::AlignLeft, s ) );
trimmed = r.width() > mw || r.height() / fh > QMIN( s.contains( '\n' ) + 1, maxLines );
}
}
@@ -532,8 +532,8 @@ void CardViewItem::showFullString( const QPoint &itempos, CardViewTip *tip )
// find a proper position
int lx;
lx = isLabel || !drawLabels ? mrg : lw + mrg + 2;
- QPoint pnt( mView->contentsToViewport( QPoint( d->x, d->y ) ) );
- pnt += QPoint( lx, y );
+ TQPoint pnt( mView->contentsToViewport( TQPoint( d->x, d->y ) ) );
+ pnt += TQPoint( lx, y );
if ( pnt.x() < 0 )
pnt.setX( 0 );
if ( pnt.x() + tip->width() > mView->visibleWidth() )
@@ -546,7 +546,7 @@ void CardViewItem::showFullString( const QPoint &itempos, CardViewTip *tip )
}
}
-CardViewItem::Field *CardViewItem::fieldAt( const QPoint & itempos ) const
+CardViewItem::Field *CardViewItem::fieldAt( const TQPoint & itempos ) const
{
int ypos = mView->d->mBFm->height() + 7 + mView->d->mItemMargin;
int iy = itempos.y();
@@ -569,28 +569,28 @@ CardViewItem::Field *CardViewItem::fieldAt( const QPoint & itempos ) const
}
-CardView::CardView( QWidget *parent, const char *name )
- : QScrollView( parent, name ),
+CardView::CardView( TQWidget *parent, const char *name )
+ : TQScrollView( parent, name ),
d( new CardViewPrivate() )
{
d->mItemList.setAutoDelete( true );
d->mSeparatorList.setAutoDelete( true );
- QFont f = font();
- d->mFm = new QFontMetrics( f );
+ TQFont f = font();
+ d->mFm = new TQFontMetrics( f );
f.setBold( true );
d->mHeaderFont = f;
- d->mBFm = new QFontMetrics( f );
+ d->mBFm = new TQFontMetrics( f );
d->mTip = new CardViewTip( viewport() );
d->mTip->hide();
- d->mTimer = new QTimer( this, "mouseTimer" );
+ d->mTimer = new TQTimer( this, "mouseTimer" );
viewport()->setMouseTracking( true );
viewport()->setFocusProxy( this );
viewport()->setFocusPolicy( WheelFocus );
viewport()->setBackgroundMode( PaletteBase );
- connect( d->mTimer, SIGNAL( timeout() ), this, SLOT( tryShowFullText() ) );
+ connect( d->mTimer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( tryShowFullText() ) );
setBackgroundMode( PaletteBackground, PaletteBase );
@@ -664,14 +664,14 @@ void CardView::setCurrentItem( CardViewItem *item )
emit currentChanged( item );
}
-CardViewItem *CardView::itemAt( const QPoint &viewPos ) const
+CardViewItem *CardView::itemAt( const TQPoint &viewPos ) const
{
CardViewItem *item = 0;
- QPtrListIterator<CardViewItem> iter( d->mItemList );
+ TQPtrListIterator<CardViewItem> iter( d->mItemList );
bool found = false;
for ( iter.toFirst(); iter.current() && !found; ++iter ) {
item = *iter;
- if ( QRect( item->d->x, item->d->y, d->mItemWidth, item->height() ).contains( viewPos ) )
+ if ( TQRect( item->d->x, item->d->y, d->mItemWidth, item->height() ).contains( viewPos ) )
found = true;
}
@@ -681,9 +681,9 @@ CardViewItem *CardView::itemAt( const QPoint &viewPos ) const
return 0;
}
-QRect CardView::itemRect( const CardViewItem *item ) const
+TQRect CardView::itemRect( const CardViewItem *item ) const
{
- return QRect( item->d->x, item->d->y, d->mItemWidth, item->height() );
+ return TQRect( item->d->x, item->d->y, d->mItemWidth, item->height() );
}
void CardView::ensureItemVisible( const CardViewItem *item )
@@ -694,7 +694,7 @@ void CardView::ensureItemVisible( const CardViewItem *item )
void CardView::repaintItem( const CardViewItem *item )
{
- repaintContents( QRect( item->d->x, item->d->y, d->mItemWidth, item->height() ) );
+ repaintContents( TQRect( item->d->x, item->d->y, d->mItemWidth, item->height() ) );
}
void CardView::setSelectionMode( CardView::SelectionMode mode )
@@ -711,7 +711,7 @@ CardView::SelectionMode CardView::selectionMode() const
void CardView::selectAll( bool state )
{
- QPtrListIterator<CardViewItem> iter( d->mItemList );
+ TQPtrListIterator<CardViewItem> iter( d->mItemList );
if ( !state ) {
for ( iter.toFirst(); iter.current(); ++iter ) {
if ( (*iter)->isSelected() ) {
@@ -785,7 +785,7 @@ bool CardView::isSelected( CardViewItem *item ) const
CardViewItem *CardView::selectedItem() const
{
// find the first selected item
- QPtrListIterator<CardViewItem> iter( d->mItemList );
+ TQPtrListIterator<CardViewItem> iter( d->mItemList );
for ( iter.toFirst(); iter.current(); ++iter ) {
if ( (*iter)->isSelected() )
return *iter;
@@ -804,7 +804,7 @@ int CardView::childCount() const
return d->mItemList.count();
}
-CardViewItem *CardView::findItem( const QString &text, const QString &label,
+CardViewItem *CardView::findItem( const TQString &text, const TQString &label,
Qt::StringComparisonMode compare ) const
{
// If the text is empty, we will return null, since empty text will
@@ -812,9 +812,9 @@ CardViewItem *CardView::findItem( const QString &text, const QString &label,
if ( text.isEmpty() )
return 0;
- QPtrListIterator<CardViewItem> iter( d->mItemList );
+ TQPtrListIterator<CardViewItem> iter( d->mItemList );
if ( compare & Qt::BeginsWith ) {
- QString value;
+ TQString value;
for ( iter.toFirst(); iter.current(); ++iter ) {
value = (*iter)->fieldValue( label ).upper();
if ( value.startsWith( text.upper() ) )
@@ -834,20 +834,20 @@ uint CardView::columnWidth() const
d->mItemWidth + d->mItemSpacing;
}
-void CardView::drawContents( QPainter *p, int clipx, int clipy,
+void CardView::drawContents( TQPainter *p, int clipx, int clipy,
int clipw, int cliph )
{
- QScrollView::drawContents( p, clipx, clipy, clipw, cliph );
+ TQScrollView::drawContents( p, clipx, clipy, clipw, cliph );
if ( d->mLayoutDirty )
calcLayout();
// allow setting costum colors in the viewport pale
- QColorGroup cg = viewport()->palette().active();
+ TQColorGroup cg = viewport()->palette().active();
- QRect clipRect( clipx, clipy, clipw, cliph );
- QRect cardRect;
- QRect sepRect;
+ TQRect clipRect( clipx, clipy, clipw, cliph );
+ TQRect cardRect;
+ TQRect sepRect;
CardViewItem *item;
CardViewSeparator *sep;
@@ -855,7 +855,7 @@ void CardView::drawContents( QPainter *p, int clipx, int clipy,
viewport()->erase( clipRect );
// Now tell the cards to draw, if they are in the clip region
- QPtrListIterator<CardViewItem> iter( d->mItemList );
+ TQPtrListIterator<CardViewItem> iter( d->mItemList );
for ( iter.toFirst(); iter.current(); ++iter) {
item = *iter;
cardRect.setRect( item->d->x, item->d->y, d->mItemWidth, item->height() );
@@ -870,7 +870,7 @@ void CardView::drawContents( QPainter *p, int clipx, int clipy,
}
// Followed by the separators if they are in the clip region
- QPtrListIterator<CardViewSeparator> sepIter( d->mSeparatorList );
+ TQPtrListIterator<CardViewSeparator> sepIter( d->mSeparatorList );
for ( sepIter.toFirst(); sepIter.current(); ++sepIter ) {
sep = *sepIter;
sepRect = sep->mRect;
@@ -884,9 +884,9 @@ void CardView::drawContents( QPainter *p, int clipx, int clipy,
}
}
-void CardView::resizeEvent( QResizeEvent *event )
+void CardView::resizeEvent( TQResizeEvent *event )
{
- QScrollView::resizeEvent( event );
+ TQScrollView::resizeEvent( event );
setLayoutDirty( true );
}
@@ -904,7 +904,7 @@ void CardView::calcLayout()
// delete the old separators
d->mSeparatorList.clear();
- QPtrListIterator<CardViewItem> iter( d->mItemList );
+ TQPtrListIterator<CardViewItem> iter( d->mItemList );
CardViewItem *item = 0;
CardViewSeparator *sep = 0;
xPos += cardSpacing;
@@ -924,7 +924,7 @@ void CardView::calcLayout()
if ( d->mDrawSeparators ) {
// Create a separator since the user asked
sep = new CardViewSeparator( this );
- sep->mRect.moveTopLeft( QPoint( xPos, yPos + d->mItemMargin ) );
+ sep->mRect.moveTopLeft( TQPoint( xPos, yPos + d->mItemMargin ) );
xPos += d->mSepWidth + cardSpacing;
d->mSeparatorList.append( sep );
}
@@ -944,7 +944,7 @@ void CardView::calcLayout()
// Update the height of all the separators now that we know the
// max height of a column
- QPtrListIterator<CardViewSeparator> sepIter( d->mSeparatorList );
+ TQPtrListIterator<CardViewSeparator> sepIter( d->mSeparatorList );
for ( sepIter.toFirst(); sepIter.current(); ++sepIter )
(*sepIter)->mRect.setHeight( maxHeight - 2 * cardSpacing - 2 * d->mItemMargin );
@@ -985,11 +985,11 @@ void CardView::setItemSpacing( uint spacing )
setLayoutDirty( true );
}
-void CardView::contentsMousePressEvent( QMouseEvent *e )
+void CardView::contentsMousePressEvent( TQMouseEvent *e )
{
- QScrollView::contentsMousePressEvent( e );
+ TQScrollView::contentsMousePressEvent( e );
- QPoint pos = contentsToViewport( e->pos() );
+ TQPoint pos = contentsToViewport( e->pos() );
d->mLastClickPos = e->pos();
CardViewItem *item = itemAt( e->pos() );
@@ -1100,9 +1100,9 @@ void CardView::contentsMousePressEvent( QMouseEvent *e )
}
}
-void CardView::contentsMouseReleaseEvent( QMouseEvent *e )
+void CardView::contentsMouseReleaseEvent( TQMouseEvent *e )
{
- QScrollView::contentsMouseReleaseEvent( e );
+ TQScrollView::contentsMouseReleaseEvent( e );
if ( d->mResizeAnchor && d->mSpan ) {
unsetCursor();
@@ -1133,9 +1133,9 @@ void CardView::contentsMouseReleaseEvent( QMouseEvent *e )
emit executed( item );
}
-void CardView::contentsMouseDoubleClickEvent( QMouseEvent *e )
+void CardView::contentsMouseDoubleClickEvent( TQMouseEvent *e )
{
- QScrollView::contentsMouseDoubleClickEvent( e );
+ TQScrollView::contentsMouseDoubleClickEvent( e );
CardViewItem *item = itemAt( e->pos() );
@@ -1148,7 +1148,7 @@ void CardView::contentsMouseDoubleClickEvent( QMouseEvent *e )
emit doubleClicked( item );
}
-void CardView::contentsMouseMoveEvent( QMouseEvent *e )
+void CardView::contentsMouseMoveEvent( TQMouseEvent *e )
{
// resizing
if ( d->mResizeAnchor ) {
@@ -1183,12 +1183,12 @@ void CardView::contentsMouseMoveEvent( QMouseEvent *e )
}
}
-void CardView::enterEvent( QEvent* )
+void CardView::enterEvent( TQEvent* )
{
d->mTimer->start( 500 );
}
-void CardView::leaveEvent( QEvent* )
+void CardView::leaveEvent( TQEvent* )
{
d->mTimer->stop();
if ( d->mOnSeparator ) {
@@ -1197,7 +1197,7 @@ void CardView::leaveEvent( QEvent* )
}
}
-void CardView::focusInEvent( QFocusEvent* )
+void CardView::focusInEvent( TQFocusEvent* )
{
if ( !d->mCurrentItem && d->mItemList.count() )
setCurrentItem( d->mItemList.first() );
@@ -1205,13 +1205,13 @@ void CardView::focusInEvent( QFocusEvent* )
d->mCurrentItem->repaintCard();
}
-void CardView::focusOutEvent( QFocusEvent* )
+void CardView::focusOutEvent( TQFocusEvent* )
{
if ( d->mCurrentItem )
d->mCurrentItem->repaintCard();
}
-void CardView::keyPressEvent( QKeyEvent *e )
+void CardView::keyPressEvent( TQKeyEvent *e )
{
if ( !(childCount() && d->mCurrentItem) ) {
e->ignore();
@@ -1240,12 +1240,12 @@ void CardView::keyPressEvent( QKeyEvent *e )
// look for an item in the previous/next column, starting from
// the vertical middle of the current item.
// FIXME use nice calculatd measures!!!
- QPoint aPoint( d->mCurrentItem->d->x, d->mCurrentItem->d->y );
- aPoint -= QPoint( 30, -(d->mCurrentItem->height() / 2) );
+ TQPoint aPoint( d->mCurrentItem->d->x, d->mCurrentItem->d->y );
+ aPoint -= TQPoint( 30, -(d->mCurrentItem->height() / 2) );
aItem = itemAt( aPoint );
// maybe we hit some space below an item
while ( !aItem && aPoint.y() > 27 ) {
- aPoint -= QPoint( 0, 16 );
+ aPoint -= TQPoint( 0, 16 );
aItem = itemAt( aPoint );
}
if ( aItem )
@@ -1256,11 +1256,11 @@ void CardView::keyPressEvent( QKeyEvent *e )
case Key_Right:
{
// FIXME use nice calculated measures!!!
- QPoint aPoint( d->mCurrentItem->d->x + d->mItemWidth, d->mCurrentItem->d->y );
- aPoint += QPoint( 30, (d->mCurrentItem->height() / 2) );
+ TQPoint aPoint( d->mCurrentItem->d->x + d->mItemWidth, d->mCurrentItem->d->y );
+ aPoint += TQPoint( 30, (d->mCurrentItem->height() / 2) );
aItem = itemAt( aPoint );
while ( !aItem && aPoint.y() > 27 ) {
- aPoint -= QPoint( 0, 16 );
+ aPoint -= TQPoint( 0, 16 );
aItem = itemAt( aPoint );
}
if ( aItem )
@@ -1278,13 +1278,13 @@ void CardView::keyPressEvent( QKeyEvent *e )
break;
case Key_Prior: // PageUp
{
- // QListView: "Make the item above the top visible and current"
+ // TQListView: "Make the item above the top visible and current"
// TODO if contentsY(), pick the top item of the leftmost visible column
if ( contentsX() <= 0 )
return;
int cw = columnWidth();
int theCol = ( QMAX( 0, ( contentsX() / cw) * cw ) ) + d->mItemSpacing;
- aItem = itemAt( QPoint( theCol + 1, d->mItemSpacing + 1 ) );
+ aItem = itemAt( TQPoint( theCol + 1, d->mItemSpacing + 1 ) );
if ( aItem )
setCurrentItem( aItem );
@@ -1292,7 +1292,7 @@ void CardView::keyPressEvent( QKeyEvent *e )
}
case Key_Next: // PageDown
{
- // QListView: "Make the item below the bottom visible and current"
+ // TQListView: "Make the item below the bottom visible and current"
// find the first not fully visible column.
// TODO: consider if a partly visible (or even hidden) item at the
// bottom of the rightmost column exists
@@ -1306,7 +1306,7 @@ void CardView::keyPressEvent( QKeyEvent *e )
while ( theCol > contentsWidth() )
theCol -= columnWidth();
- aItem = itemAt( QPoint( theCol, d->mItemSpacing + 1 ) );
+ aItem = itemAt( TQPoint( theCol, d->mItemSpacing + 1 ) );
if ( aItem )
setCurrentItem( aItem );
@@ -1383,7 +1383,7 @@ void CardView::keyPressEvent( QKeyEvent *e )
}
}
-void CardView::contentsWheelEvent( QWheelEvent *e )
+void CardView::contentsWheelEvent( TQWheelEvent *e )
{
scrollBy( 2 * e->delta() / -3, 0 );
}
@@ -1458,11 +1458,11 @@ void CardView::tryShowFullText()
{
d->mTimer->stop();
// if we have an item
- QPoint cpos = viewportToContents( viewport()->mapFromGlobal( QCursor::pos() ) );
+ TQPoint cpos = viewportToContents( viewport()->mapFromGlobal( TQCursor::pos() ) );
CardViewItem *item = itemAt( cpos );
if ( item ) {
// query it for a value to display
- QPoint ipos = cpos - itemRect( item ).topLeft();
+ TQPoint ipos = cpos - itemRect( item ).topLeft();
item->showFullString( ipos, d->mTip );
}
}
@@ -1477,7 +1477,7 @@ void CardView::drawRubberBands( int pos )
int x = d->mFirstX + tmpcw - d->mSepWidth - contentsX();
int h = visibleHeight();
- QPainter p( viewport() );
+ TQPainter p( viewport() );
p.setRasterOp( XorROP );
p.setPen( gray );
p.setBrush( gray );
@@ -1519,23 +1519,23 @@ void CardView::setItemWidth( int w )
updateContents();
}
-void CardView::setHeaderFont( const QFont &fnt )
+void CardView::setHeaderFont( const TQFont &fnt )
{
d->mHeaderFont = fnt;
delete d->mBFm;
- d->mBFm = new QFontMetrics( fnt );
+ d->mBFm = new TQFontMetrics( fnt );
}
-QFont CardView::headerFont() const
+TQFont CardView::headerFont() const
{
return d->mHeaderFont;
}
-void CardView::setFont( const QFont &fnt )
+void CardView::setFont( const TQFont &fnt )
{
- QScrollView::setFont( fnt );
+ TQScrollView::setFont( fnt );
delete d->mFm;
- d->mFm = new QFontMetrics( fnt );
+ d->mFm = new TQFontMetrics( fnt );
}
int CardView::separatorWidth() const
diff --git a/kaddressbook/views/cardview.h b/kaddressbook/views/cardview.h
index e38a82d53..6539f4459 100644
--- a/kaddressbook/views/cardview.h
+++ b/kaddressbook/views/cardview.h
@@ -24,12 +24,12 @@
#ifndef CARDVIEW_H
#define CARDVIEW_H
-#include <qpair.h>
-#include <qpoint.h>
-#include <qptrlist.h>
-#include <qrect.h>
-#include <qscrollview.h>
-#include <qstring.h>
+#include <tqpair.h>
+#include <tqpoint.h>
+#include <tqptrlist.h>
+#include <tqrect.h>
+#include <tqscrollview.h>
+#include <tqstring.h>
class QLabel;
class QMouseEvent;
@@ -55,7 +55,7 @@ class CardViewItem
A single field in the card view. The first item is the label
and the second item is the value.
*/
- typedef QPair<QString, QString> Field;
+ typedef QPair<TQString, TQString> Field;
/**
Constructor.
@@ -65,26 +65,26 @@ class CardViewItem
appear at the top of the card. This is also the string that will
be used to sort the cards in the view.
*/
- CardViewItem( CardView *parent, const QString &caption = QString() );
+ CardViewItem( CardView *parent, const TQString &caption = TQString() );
virtual ~CardViewItem();
/**
- @return The caption of the card, or QString::null if none was ever set.
+ @return The caption of the card, or TQString::null if none was ever set.
*/
- const QString &caption() const;
+ const TQString &caption() const;
/**
Sets the caption of the card. This is the text that will
appear at the top of the card. This is also the string that will
be used to sort the cards in the view.
*/
- void setCaption( const QString &caption );
+ void setCaption( const TQString &caption );
/**
Paints the card using the given painter and color group. The
card will handle painting itself selected if it is selected.
*/
- virtual void paintCard( QPainter *p, QColorGroup &cg );
+ virtual void paintCard( TQPainter *p, TQColorGroup &cg );
/**
Repaints the card. This is done by sending a repaint event to the
@@ -99,17 +99,17 @@ class CardViewItem
within a card.
@param value The value of the field.
*/
- void insertField( const QString &label, const QString &value );
+ void insertField( const TQString &label, const TQString &value );
/**
Removes the field with label <i>label</i> from the card.
*/
- void removeField( const QString &label );
+ void removeField( const TQString &label );
/**
@return The value of the field with label <i>label</i>.
*/
- QString fieldValue( const QString &label ) const;
+ TQString fieldValue( const TQString &label ) const;
/**
Removes all the fields from this card.
@@ -133,14 +133,14 @@ class CardViewItem
a certain amount of time. If the label or value at pos is obscured
(trimmed) make the label display the full text.
*/
- void showFullString( const QPoint &pos, CardViewTip *tip );
+ void showFullString( const TQPoint &pos, CardViewTip *tip );
/**
@return a pointer to the Field at the position itempos
in this item. 0 is returned if itempos is in the caption.
@param itempos the position in item coordinates
*/
- Field *fieldAt( const QPoint &itempos ) const;
+ Field *fieldAt( const TQPoint &itempos ) const;
CardView *cardView() const { return mView; };
@@ -173,7 +173,7 @@ class CardViewItem
<i>width</i>, then the string will be trimmed and a '...' will
be appended.
*/
- QString trimString( const QString &text, int width, QFontMetrics &fm ) const;
+ TQString trimString( const TQString &text, int width, TQFontMetrics &fm ) const;
CardViewItemPrivate *d;
CardView *mView;
@@ -186,8 +186,8 @@ class CardViewItem
displays multiple cards in a grid. The Cards are sorted based on their
caption.
- The CardView class is designed to mirror the API of the QListView or
- QIconView. The CardView is also completely independant of KAddressBook and
+ The CardView class is designed to mirror the API of the TQListView or
+ TQIconView. The CardView is also completely independant of KAddressBook and
can be used elsewhere. With the exception of a few simple config checks,
the CardView is also 100% independant of KDE.
*/
@@ -201,7 +201,7 @@ class CardView : public QScrollView
/**
Constructor.
*/
- CardView( QWidget *parent, const char *name );
+ CardView( TQWidget *parent, const char *name );
virtual ~CardView();
/**
@@ -239,12 +239,12 @@ class CardView : public QScrollView
@return The item found at the given point, or 0 if there is no item
at that point.
*/
- CardViewItem *itemAt( const QPoint &viewPos ) const;
+ CardViewItem *itemAt( const TQPoint &viewPos ) const;
/**
@return The bounding rect of the given item.
*/
- QRect itemRect( const CardViewItem *item ) const;
+ TQRect itemRect( const CardViewItem *item ) const;
/**
Ensures that the given item is in the viewable area of the widget
@@ -320,7 +320,7 @@ class CardView : public QScrollView
@return The first matching item, or 0 if no items match.
*/
- CardViewItem *findItem( const QString &text, const QString &label,
+ CardViewItem *findItem( const TQString &text, const TQString &label,
Qt::StringComparisonMode compare = Qt::BeginsWith ) const;
/**
@@ -390,7 +390,7 @@ class CardView : public QScrollView
which is 80. It is currently not checked, so setting a value greater than 40
will probably mean a crash in the items painting routine.
*/
- // Note: I looked for a value in QStyle::PixelMetric to use, but I could
+ // Note: I looked for a value in TQStyle::PixelMetric to use, but I could
// not see a useful one. One may turn up in a future version of Qt.
uint itemMargin() const;
@@ -405,7 +405,7 @@ class CardView : public QScrollView
column, between the items and column separators if drawn, and between
the items and the borders of the widget. The default value is set to 10.
*/
- // Note: There is no useful QStyle::PixelMetric to use for this atm.
+ // Note: There is no useful TQStyle::PixelMetric to use for this atm.
// An option would be using KDialog::spacingHint().
uint itemSpacing() const;
@@ -428,17 +428,17 @@ class CardView : public QScrollView
/**
Sets the header font
*/
- void setHeaderFont( const QFont &fnt );
+ void setHeaderFont( const TQFont &fnt );
/**
@return the header font
*/
- QFont headerFont() const;
+ TQFont headerFont() const;
/**
Reimplementation from QWidget
*/
- void setFont( const QFont &fnt );
+ void setFont( const TQFont &fnt );
/**
Sets the column separator width
@@ -505,24 +505,24 @@ class CardView : public QScrollView
/**
Emitted when the context menu is requested in some way.
*/
- void contextMenuRequested( CardViewItem*, const QPoint& );
+ void contextMenuRequested( CardViewItem*, const TQPoint& );
protected:
/**
Determines which cards intersect that region and tells them to paint
themselves.
*/
- void drawContents( QPainter *p, int clipx, int clipy, int clipw, int cliph );
+ void drawContents( TQPainter *p, int clipx, int clipy, int clipw, int cliph );
/**
Sets the layout to dirty and repaints.
*/
- void resizeEvent( QResizeEvent* );
+ void resizeEvent( TQResizeEvent* );
/**
Changes the direction the canvas scolls.
*/
- void contentsWheelEvent( QWheelEvent* );
+ void contentsWheelEvent( TQWheelEvent* );
/**
Sets the layout to dirty and calls for a repaint.
@@ -536,18 +536,18 @@ class CardView : public QScrollView
*/
void calcLayout();
- virtual void contentsMousePressEvent( QMouseEvent* );
- virtual void contentsMouseMoveEvent( QMouseEvent* );
- virtual void contentsMouseReleaseEvent( QMouseEvent* );
- virtual void contentsMouseDoubleClickEvent( QMouseEvent* );
+ virtual void contentsMousePressEvent( TQMouseEvent* );
+ virtual void contentsMouseMoveEvent( TQMouseEvent* );
+ virtual void contentsMouseReleaseEvent( TQMouseEvent* );
+ virtual void contentsMouseDoubleClickEvent( TQMouseEvent* );
- virtual void enterEvent( QEvent* );
- virtual void leaveEvent( QEvent* );
+ virtual void enterEvent( TQEvent* );
+ virtual void leaveEvent( TQEvent* );
- virtual void focusInEvent( QFocusEvent* );
- virtual void focusOutEvent( QFocusEvent* );
+ virtual void focusInEvent( TQFocusEvent* );
+ virtual void focusOutEvent( TQFocusEvent* );
- virtual void keyPressEvent( QKeyEvent* );
+ virtual void keyPressEvent( TQKeyEvent* );
/**
Overload this method to be told when a drag should be started.
diff --git a/kaddressbook/views/colorlistbox.cpp b/kaddressbook/views/colorlistbox.cpp
index 37a2ac1f4..8043eacde 100644
--- a/kaddressbook/views/colorlistbox.cpp
+++ b/kaddressbook/views/colorlistbox.cpp
@@ -18,17 +18,17 @@
*
*/
-#include <qpainter.h>
+#include <tqpainter.h>
#include <kcolordialog.h>
#include <kcolordrag.h>
#include "colorlistbox.h"
-ColorListBox::ColorListBox( QWidget *parent, const char *name, WFlags f )
+ColorListBox::ColorListBox( TQWidget *parent, const char *name, WFlags f )
:KListBox( parent, name, f ), mCurrentOnDragEnter(-1)
{
- connect( this, SIGNAL(selected(int)), this, SLOT(newColor(int)) );
+ connect( this, TQT_SIGNAL(selected(int)), this, TQT_SLOT(newColor(int)) );
setAcceptDrops( true);
}
@@ -40,7 +40,7 @@ void ColorListBox::setEnabled( bool state )
return;
}
- QListBox::setEnabled( state );
+ TQListBox::setEnabled( state );
for( uint i=0; i<count(); i++ )
{
updateItem( i );
@@ -48,7 +48,7 @@ void ColorListBox::setEnabled( bool state )
}
-void ColorListBox::setColor( uint index, const QColor &color )
+void ColorListBox::setColor( uint index, const TQColor &color )
{
if( index < count() )
{
@@ -59,7 +59,7 @@ void ColorListBox::setColor( uint index, const QColor &color )
}
-QColor ColorListBox::color( uint index ) const
+TQColor ColorListBox::color( uint index ) const
{
if( index < count() )
{
@@ -82,8 +82,8 @@ void ColorListBox::newColor( int index )
if( (uint)index < count() )
{
- QColor c = color( index );
- if( KColorDialog::getColor( c, this ) != QDialog::Rejected )
+ TQColor c = color( index );
+ if( KColorDialog::getColor( c, this ) != TQDialog::Rejected )
{
setColor( index, c );
}
@@ -91,7 +91,7 @@ void ColorListBox::newColor( int index )
}
-void ColorListBox::dragEnterEvent( QDragEnterEvent *e )
+void ColorListBox::dragEnterEvent( TQDragEnterEvent *e )
{
if( KColorDrag::canDecode(e) && isEnabled() )
{
@@ -106,7 +106,7 @@ void ColorListBox::dragEnterEvent( QDragEnterEvent *e )
}
-void ColorListBox::dragLeaveEvent( QDragLeaveEvent * )
+void ColorListBox::dragLeaveEvent( TQDragLeaveEvent * )
{
if( mCurrentOnDragEnter != -1 )
{
@@ -116,7 +116,7 @@ void ColorListBox::dragLeaveEvent( QDragLeaveEvent * )
}
-void ColorListBox::dragMoveEvent( QDragMoveEvent *e )
+void ColorListBox::dragMoveEvent( TQDragMoveEvent *e )
{
if( KColorDrag::canDecode(e) && isEnabled() )
{
@@ -129,9 +129,9 @@ void ColorListBox::dragMoveEvent( QDragMoveEvent *e )
}
-void ColorListBox::dropEvent( QDropEvent *e )
+void ColorListBox::dropEvent( TQDropEvent *e )
{
- QColor color;
+ TQColor color;
if( KColorDrag::decode( e, color ) )
{
int index = currentItem();
@@ -147,28 +147,28 @@ void ColorListBox::dropEvent( QDropEvent *e )
-ColorListItem::ColorListItem( const QString &text, const QColor &color )
- : QListBoxItem(), mColor( color ), mBoxWidth( 30 )
+ColorListItem::ColorListItem( const TQString &text, const TQColor &color )
+ : TQListBoxItem(), mColor( color ), mBoxWidth( 30 )
{
setText( text );
}
-const QColor &ColorListItem::color( void )
+const TQColor &ColorListItem::color( void )
{
return( mColor );
}
-void ColorListItem::setColor( const QColor &color )
+void ColorListItem::setColor( const TQColor &color )
{
mColor = color;
}
-void ColorListItem::paint( QPainter *p )
+void ColorListItem::paint( TQPainter *p )
{
- QFontMetrics fm = p->fontMetrics();
+ TQFontMetrics fm = p->fontMetrics();
int h = fm.height();
p->drawText( mBoxWidth+3*2, fm.ascent() + fm.leading()/2, text() );
@@ -179,13 +179,13 @@ void ColorListItem::paint( QPainter *p )
}
-int ColorListItem::height(const QListBox *lb ) const
+int ColorListItem::height(const TQListBox *lb ) const
{
return( lb->fontMetrics().lineSpacing()+1 );
}
-int ColorListItem::width(const QListBox *lb ) const
+int ColorListItem::width(const TQListBox *lb ) const
{
return( mBoxWidth + lb->fontMetrics().width( text() ) + 6 );
}
diff --git a/kaddressbook/views/colorlistbox.h b/kaddressbook/views/colorlistbox.h
index 06b2c4627..053f06fff 100644
--- a/kaddressbook/views/colorlistbox.h
+++ b/kaddressbook/views/colorlistbox.h
@@ -28,18 +28,18 @@ class ColorListBox : public KListBox
Q_OBJECT
public:
- ColorListBox( QWidget *parent=0, const char * name=0, WFlags f=0 );
- void setColor( uint index, const QColor &color );
- QColor color( uint index ) const;
+ ColorListBox( TQWidget *parent=0, const char * name=0, WFlags f=0 );
+ void setColor( uint index, const TQColor &color );
+ TQColor color( uint index ) const;
public slots:
virtual void setEnabled( bool state );
protected:
- void dragEnterEvent( QDragEnterEvent *e );
- void dragLeaveEvent( QDragLeaveEvent *e );
- void dragMoveEvent( QDragMoveEvent *e );
- void dropEvent( QDropEvent *e );
+ void dragEnterEvent( TQDragEnterEvent *e );
+ void dragLeaveEvent( TQDragLeaveEvent *e );
+ void dragMoveEvent( TQDragMoveEvent *e );
+ void dropEvent( TQDropEvent *e );
private slots:
void newColor( int index );
@@ -53,17 +53,17 @@ class ColorListBox : public KListBox
class ColorListItem : public QListBoxItem
{
public:
- ColorListItem( const QString &text, const QColor &color=Qt::black );
- const QColor &color( void );
- void setColor( const QColor &color );
+ ColorListItem( const TQString &text, const TQColor &color=Qt::black );
+ const TQColor &color( void );
+ void setColor( const TQColor &color );
protected:
- virtual void paint( QPainter * );
- virtual int height( const QListBox * ) const;
- virtual int width( const QListBox * ) const;
+ virtual void paint( TQPainter * );
+ virtual int height( const TQListBox * ) const;
+ virtual int width( const TQListBox * ) const;
private:
- QColor mColor;
+ TQColor mColor;
int mBoxWidth;
};
diff --git a/kaddressbook/views/configurecardviewdialog.cpp b/kaddressbook/views/configurecardviewdialog.cpp
index 8843d3c68..ed7cfda1f 100644
--- a/kaddressbook/views/configurecardviewdialog.cpp
+++ b/kaddressbook/views/configurecardviewdialog.cpp
@@ -21,15 +21,15 @@
without including the source code for Qt in the source distribution.
*/
-#include <qstring.h>
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qcheckbox.h>
-#include <qvbox.h>
-#include <qgroupbox.h>
-#include <qspinbox.h>
-#include <qtabwidget.h>
-#include <qwhatsthis.h>
+#include <tqstring.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqcheckbox.h>
+#include <tqvbox.h>
+#include <tqgroupbox.h>
+#include <tqspinbox.h>
+#include <tqtabwidget.h>
+#include <tqwhatsthis.h>
#include <kdebug.h>
#include <kglobal.h>
@@ -47,11 +47,11 @@
/////////////////////////////////
// ConfigureCardViewDialog
-ConfigureCardViewWidget::ConfigureCardViewWidget( KABC::AddressBook *ab, QWidget *parent,
+ConfigureCardViewWidget::ConfigureCardViewWidget( KABC::AddressBook *ab, TQWidget *parent,
const char *name )
: ViewConfigureWidget( ab, parent, name )
{
- QWidget *page = addPage( i18n( "Look & Feel" ), QString::null,
+ TQWidget *page = addPage( i18n( "Look & Feel" ), TQString::null,
DesktopIcon( "looknfeel" ) );
mAdvancedPage = new CardViewLookNFeelPage( page );
}
@@ -76,8 +76,8 @@ void ConfigureCardViewWidget::saveSettings( KConfig *config )
////////////////////////
// CardViewLookNFeelPage
-CardViewLookNFeelPage::CardViewLookNFeelPage( QWidget *parent, const char *name )
- : QVBox( parent, name )
+CardViewLookNFeelPage::CardViewLookNFeelPage( TQWidget *parent, const char *name )
+ : TQVBox( parent, name )
{
initGUI();
}
@@ -90,7 +90,7 @@ void CardViewLookNFeelPage::restoreSettings( KConfig *config )
{
// colors
cbEnableCustomColors->setChecked( config->readBoolEntry( "EnableCustomColors", false ) );
- QColor c;
+ TQColor c;
c = KGlobalSettings::baseColor();
lbColors->insertItem( new ColorListItem( i18n("Background Color"),
config->readColorEntry( "BackgroundColor", &c ) ) );
@@ -113,10 +113,10 @@ void CardViewLookNFeelPage::restoreSettings( KConfig *config )
enableColors();
// fonts
- QFont fnt = font();
- updateFontLabel( config->readFontEntry( "TextFont", &fnt ), (QLabel*)lTextFont );
+ TQFont fnt = font();
+ updateFontLabel( config->readFontEntry( "TextFont", &fnt ), (TQLabel*)lTextFont );
fnt.setBold( true );
- updateFontLabel( config->readFontEntry( "HeaderFont", &fnt ), (QLabel*)lHeaderFont );
+ updateFontLabel( config->readFontEntry( "HeaderFont", &fnt ), (TQLabel*)lHeaderFont );
cbEnableCustomFonts->setChecked( config->readBoolEntry( "EnableCustomFonts", false ) );
enableFonts();
@@ -166,15 +166,15 @@ void CardViewLookNFeelPage::saveSettings( KConfig *config )
void CardViewLookNFeelPage::setTextFont()
{
- QFont f( lTextFont->font() );
- if ( KFontDialog::getFont( f, false, this ) == QDialog::Accepted )
+ TQFont f( lTextFont->font() );
+ if ( KFontDialog::getFont( f, false, this ) == TQDialog::Accepted )
updateFontLabel( f, lTextFont );
}
void CardViewLookNFeelPage::setHeaderFont()
{
- QFont f( lHeaderFont->font() );
- if ( KFontDialog::getFont( f,false, this ) == QDialog::Accepted )
+ TQFont f( lHeaderFont->font() );
+ if ( KFontDialog::getFont( f,false, this ) == TQDialog::Accepted )
updateFontLabel( f, lHeaderFont );
}
@@ -193,102 +193,102 @@ void CardViewLookNFeelPage::initGUI()
int spacing = KDialog::spacingHint();
int margin = KDialog::marginHint();
- QTabWidget *tabs = new QTabWidget( this );
+ TQTabWidget *tabs = new TQTabWidget( this );
// Layout
- QVBox *loTab = new QVBox( this, "layouttab" );
+ TQVBox *loTab = new TQVBox( this, "layouttab" );
loTab->setSpacing( spacing );
loTab->setMargin( margin );
- QGroupBox *gbGeneral = new QGroupBox( 1, Qt::Horizontal, i18n("General"), loTab );
+ TQGroupBox *gbGeneral = new TQGroupBox( 1, Qt::Horizontal, i18n("General"), loTab );
- cbDrawSeps = new QCheckBox( i18n("Draw &separators"), gbGeneral );
+ cbDrawSeps = new TQCheckBox( i18n("Draw &separators"), gbGeneral );
- QHBox *hbSW = new QHBox( gbGeneral );
- QLabel *lSW = new QLabel( i18n("Separator &width:"), hbSW );
- sbSepWidth = new QSpinBox( 1, 50, 1, hbSW );
+ TQHBox *hbSW = new TQHBox( gbGeneral );
+ TQLabel *lSW = new TQLabel( i18n("Separator &width:"), hbSW );
+ sbSepWidth = new TQSpinBox( 1, 50, 1, hbSW );
lSW->setBuddy( sbSepWidth);
- QHBox *hbPadding = new QHBox( gbGeneral );
- QLabel *lSpacing = new QLabel( i18n("&Padding:"), hbPadding );
- sbSpacing = new QSpinBox( 0, 100, 1, hbPadding );
+ TQHBox *hbPadding = new TQHBox( gbGeneral );
+ TQLabel *lSpacing = new TQLabel( i18n("&Padding:"), hbPadding );
+ sbSpacing = new TQSpinBox( 0, 100, 1, hbPadding );
lSpacing->setBuddy( sbSpacing );
- QGroupBox *gbCards = new QGroupBox( 1, Qt::Horizontal, i18n("Cards"), loTab );
+ TQGroupBox *gbCards = new TQGroupBox( 1, Qt::Horizontal, i18n("Cards"), loTab );
- QHBox *hbMargin = new QHBox( gbCards );
- QLabel *lMargin = new QLabel( i18n("&Margin:"), hbMargin );
- sbMargin = new QSpinBox( 0, 100, 1, hbMargin );
+ TQHBox *hbMargin = new TQHBox( gbCards );
+ TQLabel *lMargin = new TQLabel( i18n("&Margin:"), hbMargin );
+ sbMargin = new TQSpinBox( 0, 100, 1, hbMargin );
lMargin->setBuddy( sbMargin );
- cbDrawBorders = new QCheckBox( i18n("Draw &borders"), gbCards );
+ cbDrawBorders = new TQCheckBox( i18n("Draw &borders"), gbCards );
- loTab->setStretchFactor( new QWidget( loTab ), 1 );
+ loTab->setStretchFactor( new TQWidget( loTab ), 1 );
- QWhatsThis::add( sbMargin, i18n(
+ TQWhatsThis::add( sbMargin, i18n(
"The item margin is the distance (in pixels) between the item edge and the item data. Most noticeably, "
"incrementing the item margin will add space between the focus rectangle and the item data."
) );
- QWhatsThis::add( lMargin, QWhatsThis::textFor( sbMargin ) );
- QWhatsThis::add( sbSpacing, i18n(
+ TQWhatsThis::add( lMargin, TQWhatsThis::textFor( sbMargin ) );
+ TQWhatsThis::add( sbSpacing, i18n(
"The item spacing decides the distance (in pixels) between the items and anything else: the view "
"borders, other items or column separators."
) );
- QWhatsThis::add( lSpacing, QWhatsThis::textFor( sbSpacing ) );
- QWhatsThis::add( sbSepWidth, i18n("Sets the width of column separators") );
- QWhatsThis::add( lSW, QWhatsThis::textFor( sbSepWidth ) );
+ TQWhatsThis::add( lSpacing, TQWhatsThis::textFor( sbSpacing ) );
+ TQWhatsThis::add( sbSepWidth, i18n("Sets the width of column separators") );
+ TQWhatsThis::add( lSW, TQWhatsThis::textFor( sbSepWidth ) );
tabs->addTab( loTab, i18n("&Layout") );
// Colors
- QVBox *colorTab = new QVBox( this, "colortab" );
+ TQVBox *colorTab = new TQVBox( this, "colortab" );
colorTab->setSpacing( spacing );
colorTab->setMargin( spacing );
- cbEnableCustomColors = new QCheckBox( i18n("&Enable custom colors"), colorTab );
- connect( cbEnableCustomColors, SIGNAL(clicked()), this, SLOT(enableColors()) );
+ cbEnableCustomColors = new TQCheckBox( i18n("&Enable custom colors"), colorTab );
+ connect( cbEnableCustomColors, TQT_SIGNAL(clicked()), this, TQT_SLOT(enableColors()) );
lbColors = new ColorListBox( colorTab );
tabs->addTab( colorTab, i18n("&Colors") );
- QWhatsThis::add( cbEnableCustomColors, i18n(
+ TQWhatsThis::add( cbEnableCustomColors, i18n(
"If custom colors is enabled, you may choose the colors for the view below. "
"Otherwise colors from your current KDE color scheme are used."
) );
- QWhatsThis::add( lbColors, i18n(
+ TQWhatsThis::add( lbColors, i18n(
"Double click or press RETURN on a item to select a color for the related strings in the view."
) );
// Fonts
- QVBox *fntTab = new QVBox( this, "fonttab" );
+ TQVBox *fntTab = new TQVBox( this, "fonttab" );
fntTab->setSpacing( spacing );
fntTab->setMargin( spacing );
- cbEnableCustomFonts = new QCheckBox( i18n("&Enable custom fonts"), fntTab );
- connect( cbEnableCustomFonts, SIGNAL(clicked()), this, SLOT(enableFonts()) );
+ cbEnableCustomFonts = new TQCheckBox( i18n("&Enable custom fonts"), fntTab );
+ connect( cbEnableCustomFonts, TQT_SIGNAL(clicked()), this, TQT_SLOT(enableFonts()) );
- vbFonts = new QWidget( fntTab );
- QGridLayout *gFnts = new QGridLayout( vbFonts, 2, 3 );
+ vbFonts = new TQWidget( fntTab );
+ TQGridLayout *gFnts = new TQGridLayout( vbFonts, 2, 3 );
gFnts->setSpacing( spacing );
gFnts->setAutoAdd( true );
gFnts->setColStretch( 1, 1 );
- QLabel *lTFnt = new QLabel( i18n("&Text font:"), vbFonts );
- lTextFont = new QLabel( vbFonts );
- lTextFont->setFrameStyle( QFrame::Panel|QFrame::Sunken );
+ TQLabel *lTFnt = new TQLabel( i18n("&Text font:"), vbFonts );
+ lTextFont = new TQLabel( vbFonts );
+ lTextFont->setFrameStyle( TQFrame::Panel|TQFrame::Sunken );
btnFont = new KPushButton( i18n("Choose..."), vbFonts );
lTFnt->setBuddy( btnFont );
- connect( btnFont, SIGNAL(clicked()), this, SLOT(setTextFont()) );
+ connect( btnFont, TQT_SIGNAL(clicked()), this, TQT_SLOT(setTextFont()) );
- QLabel *lHFnt = new QLabel( i18n("&Header font:"), vbFonts );
- lHeaderFont = new QLabel( vbFonts );
- lHeaderFont->setFrameStyle( QFrame::Panel|QFrame::Sunken );
+ TQLabel *lHFnt = new TQLabel( i18n("&Header font:"), vbFonts );
+ lHeaderFont = new TQLabel( vbFonts );
+ lHeaderFont->setFrameStyle( TQFrame::Panel|TQFrame::Sunken );
btnHeaderFont = new KPushButton( i18n("Choose..."), vbFonts );
lHFnt->setBuddy( btnHeaderFont );
- connect( btnHeaderFont, SIGNAL(clicked()), this, SLOT(setHeaderFont()) );
+ connect( btnHeaderFont, TQT_SIGNAL(clicked()), this, TQT_SLOT(setHeaderFont()) );
- fntTab->setStretchFactor( new QWidget( fntTab ), 1 );
+ fntTab->setStretchFactor( new TQWidget( fntTab ), 1 );
- QWhatsThis::add( cbEnableCustomFonts, i18n(
+ TQWhatsThis::add( cbEnableCustomFonts, i18n(
"If custom fonts are enabled, you may choose which fonts to use for this view below. "
"Otherwise the default KDE font will be used, in bold style for the header and "
"normal style for the data."
@@ -297,23 +297,23 @@ void CardViewLookNFeelPage::initGUI()
tabs->addTab( fntTab, i18n("&Fonts") );
// Behaviour
- QVBox *behaviourTab = new QVBox( this );
+ TQVBox *behaviourTab = new TQVBox( this );
behaviourTab->setMargin( margin );
behaviourTab->setSpacing( spacing );
- cbShowEmptyFields = new QCheckBox( i18n("Show &empty fields"), behaviourTab );
- cbShowFieldLabels = new QCheckBox( i18n("Show field &labels"), behaviourTab );
+ cbShowEmptyFields = new TQCheckBox( i18n("Show &empty fields"), behaviourTab );
+ cbShowFieldLabels = new TQCheckBox( i18n("Show field &labels"), behaviourTab );
- behaviourTab->setStretchFactor( new QWidget( behaviourTab ), 1 );
+ behaviourTab->setStretchFactor( new TQWidget( behaviourTab ), 1 );
tabs->addTab( behaviourTab, i18n("Be&havior") );
}
-void CardViewLookNFeelPage::updateFontLabel( QFont fnt, QLabel *l )
+void CardViewLookNFeelPage::updateFontLabel( TQFont fnt, TQLabel *l )
{
l->setFont( fnt );
- l->setText( QString( fnt.family() + " %1" ).arg( fnt.pointSize() ) );
+ l->setText( TQString( fnt.family() + " %1" ).arg( fnt.pointSize() ) );
}
#include "configurecardviewdialog.moc"
diff --git a/kaddressbook/views/configurecardviewdialog.h b/kaddressbook/views/configurecardviewdialog.h
index a37db6cb3..4d9d19be5 100644
--- a/kaddressbook/views/configurecardviewdialog.h
+++ b/kaddressbook/views/configurecardviewdialog.h
@@ -26,9 +26,9 @@
#include "viewconfigurewidget.h"
-#include <qvbox.h>
-#include <qwidget.h>
-#include <qfont.h>
+#include <tqvbox.h>
+#include <tqwidget.h>
+#include <tqfont.h>
class QString;
class QWidget;
@@ -48,7 +48,7 @@ class CardViewLookAndFeelPage;
class ConfigureCardViewWidget : public ViewConfigureWidget
{
public:
- ConfigureCardViewWidget( KABC::AddressBook *ab, QWidget *parent, const char *name );
+ ConfigureCardViewWidget( KABC::AddressBook *ab, TQWidget *parent, const char *name );
virtual ~ConfigureCardViewWidget();
virtual void restoreSettings( KConfig* );
@@ -77,12 +77,12 @@ class ConfigureCardViewWidget : public ViewConfigureWidget
* item spacing
*/
-class CardViewLookNFeelPage : public QVBox {
+class CardViewLookNFeelPage : public TQVBox {
Q_OBJECT
public:
- CardViewLookNFeelPage( QWidget *parent=0, const char *name=0 );
+ CardViewLookNFeelPage( TQWidget *parent=0, const char *name=0 );
~CardViewLookNFeelPage();
void restoreSettings( KConfig* );
@@ -96,18 +96,18 @@ class CardViewLookNFeelPage : public QVBox {
private:
void initGUI();
- void updateFontLabel( QFont, QLabel * );
+ void updateFontLabel( TQFont, TQLabel * );
- QCheckBox *cbEnableCustomFonts,
+ TQCheckBox *cbEnableCustomFonts,
*cbEnableCustomColors,
*cbDrawSeps, *cbDrawBorders,
*cbShowFieldLabels, *cbShowEmptyFields;
class ColorListBox *lbColors;
- QLabel *lTextFont, *lHeaderFont;
+ TQLabel *lTextFont, *lHeaderFont;
class KPushButton *btnFont, *btnHeaderFont;
- class QSpinBox *sbMargin, *sbSpacing, *sbSepWidth;
+ class TQSpinBox *sbMargin, *sbSpacing, *sbSepWidth;
- class QWidget *vbFonts;
+ class TQWidget *vbFonts;
};
#endif
diff --git a/kaddressbook/views/configuretableviewdialog.cpp b/kaddressbook/views/configuretableviewdialog.cpp
index d01c4d7df..c79ef5244 100644
--- a/kaddressbook/views/configuretableviewdialog.cpp
+++ b/kaddressbook/views/configuretableviewdialog.cpp
@@ -21,13 +21,13 @@
without including the source code for Qt in the source distribution.
*/
-#include <qstring.h>
-#include <qwidget.h>
-#include <qlayout.h>
-#include <qradiobutton.h>
-#include <qcheckbox.h>
-#include <qvbox.h>
-#include <qbuttongroup.h>
+#include <tqstring.h>
+#include <tqwidget.h>
+#include <tqlayout.h>
+#include <tqradiobutton.h>
+#include <tqcheckbox.h>
+#include <tqvbox.h>
+#include <tqbuttongroup.h>
#include <kdeversion.h>
#include <kglobal.h>
@@ -41,11 +41,11 @@
#include "configuretableviewdialog.h"
ConfigureTableViewWidget::ConfigureTableViewWidget( KABC::AddressBook *ab,
- QWidget *parent,
+ TQWidget *parent,
const char *name )
: ViewConfigureWidget( ab, parent, name )
{
- QWidget *page = addPage( i18n( "Look & Feel" ), QString::null,
+ TQWidget *page = addPage( i18n( "Look & Feel" ), TQString::null,
KGlobal::iconLoader()->loadIcon( "looknfeel",
KIcon::Panel ) );
@@ -72,8 +72,8 @@ void ConfigureTableViewWidget::saveSettings( KConfig *config )
-LookAndFeelPage::LookAndFeelPage(QWidget *parent, const char *name)
- : QWidget(parent, name)
+LookAndFeelPage::LookAndFeelPage(TQWidget *parent, const char *name)
+ : TQWidget(parent, name)
{
initGUI();
@@ -111,25 +111,25 @@ void LookAndFeelPage::saveSettings( KConfig *config )
void LookAndFeelPage::initGUI()
{
- QVBoxLayout *layout = new QVBoxLayout(this, 0, KDialogBase::spacingHint());
+ TQVBoxLayout *layout = new TQVBoxLayout(this, 0, KDialogBase::spacingHint());
- QButtonGroup *group = new QButtonGroup(1, Qt::Horizontal,
+ TQButtonGroup *group = new TQButtonGroup(1, Qt::Horizontal,
i18n("Row Separator"), this);
layout->addWidget(group);
- mAlternateButton = new QRadioButton(i18n("Alternating backgrounds"),
+ mAlternateButton = new TQRadioButton(i18n("Alternating backgrounds"),
group, "mAlternateButton");
- mLineButton = new QRadioButton(i18n("Single line"), group, "mLineButton");
- mNoneButton = new QRadioButton(i18n("None"), group, "mNoneButton");
+ mLineButton = new TQRadioButton(i18n("Single line"), group, "mLineButton");
+ mNoneButton = new TQRadioButton(i18n("None"), group, "mNoneButton");
// Background Checkbox/Selector
- QHBoxLayout *backgroundLayout = new QHBoxLayout();
+ TQHBoxLayout *backgroundLayout = new TQHBoxLayout();
layout->addLayout(backgroundLayout);
- mBackgroundBox = new QCheckBox(i18n("Enable background image:"), this,
+ mBackgroundBox = new TQCheckBox(i18n("Enable background image:"), this,
"mBackgroundBox");
- connect(mBackgroundBox, SIGNAL(toggled(bool)),
- SLOT(enableBackgroundToggled(bool)));
+ connect(mBackgroundBox, TQT_SIGNAL(toggled(bool)),
+ TQT_SLOT(enableBackgroundToggled(bool)));
backgroundLayout->addWidget(mBackgroundBox);
mBackgroundName = new KURLRequester(this, "mBackgroundName");
@@ -139,11 +139,11 @@ void LookAndFeelPage::initGUI()
backgroundLayout->addWidget(mBackgroundName);
// ToolTip Checkbox
- mToolTipBox = new QCheckBox(i18n("Enable contact tooltips"), this,
+ mToolTipBox = new TQCheckBox(i18n("Enable contact tooltips"), this,
"mToolTipBox");
layout->addWidget(mToolTipBox);
#if KDE_IS_VERSION(3,2,90)
- mIMPresenceBox = new QCheckBox( i18n( "Show instant messaging presence" ), this, "mIMPresenceBox" );
+ mIMPresenceBox = new TQCheckBox( i18n( "Show instant messaging presence" ), this, "mIMPresenceBox" );
layout->addWidget( mIMPresenceBox );
#endif
}
diff --git a/kaddressbook/views/configuretableviewdialog.h b/kaddressbook/views/configuretableviewdialog.h
index 1260971c2..f1f89d0dc 100644
--- a/kaddressbook/views/configuretableviewdialog.h
+++ b/kaddressbook/views/configuretableviewdialog.h
@@ -45,7 +45,7 @@ class LookAndFeelPage;
class ConfigureTableViewWidget : public ViewConfigureWidget
{
public:
- ConfigureTableViewWidget( KABC::AddressBook *ab, QWidget *parent, const char *name );
+ ConfigureTableViewWidget( KABC::AddressBook *ab, TQWidget *parent, const char *name );
virtual ~ConfigureTableViewWidget();
virtual void restoreSettings( KConfig* );
@@ -65,7 +65,7 @@ class LookAndFeelPage : public QWidget
Q_OBJECT
public:
- LookAndFeelPage( QWidget *parent, const char *name = 0 );
+ LookAndFeelPage( TQWidget *parent, const char *name = 0 );
~LookAndFeelPage() {}
void restoreSettings( KConfig* );
@@ -77,13 +77,13 @@ class LookAndFeelPage : public QWidget
private:
void initGUI();
- QRadioButton *mAlternateButton;
- QRadioButton *mLineButton;
- QRadioButton *mNoneButton;
- QCheckBox *mToolTipBox;
+ TQRadioButton *mAlternateButton;
+ TQRadioButton *mLineButton;
+ TQRadioButton *mNoneButton;
+ TQCheckBox *mToolTipBox;
KURLRequester *mBackgroundName;
- QCheckBox *mBackgroundBox;
- QCheckBox *mIMPresenceBox;
+ TQCheckBox *mBackgroundBox;
+ TQCheckBox *mIMPresenceBox;
};
#endif
diff --git a/kaddressbook/views/contactlistview.cpp b/kaddressbook/views/contactlistview.cpp
index 90941ff56..0bc7c041d 100644
--- a/kaddressbook/views/contactlistview.cpp
+++ b/kaddressbook/views/contactlistview.cpp
@@ -21,14 +21,14 @@
without including the source code for Qt in the source distribution.
*/
-#include <qheader.h>
-#include <qiconset.h>
-#include <qimage.h>
-#include <qdragobject.h>
-#include <qcombobox.h>
-#include <qpainter.h>
-#include <qbrush.h>
-#include <qevent.h>
+#include <tqheader.h>
+#include <tqiconset.h>
+#include <tqimage.h>
+#include <tqdragobject.h>
+#include <tqcombobox.h>
+#include <tqpainter.h>
+#include <tqbrush.h>
+#include <tqevent.h>
#include <klocale.h>
#include <kglobalsettings.h>
@@ -48,11 +48,11 @@
// DynamicTip Methods
DynamicTip::DynamicTip( ContactListView *parent)
- : QToolTip( parent )
+ : TQToolTip( parent )
{
}
-void DynamicTip::maybeTip( const QPoint &pos )
+void DynamicTip::maybeTip( const TQPoint &pos )
{
if (!parentWidget()->inherits( "ContactListView" ))
return;
@@ -61,9 +61,9 @@ void DynamicTip::maybeTip( const QPoint &pos )
if (!plv->tooltips())
return;
- QPoint posVp = plv->viewport()->pos();
+ TQPoint posVp = plv->viewport()->pos();
- QListViewItem *lvi = plv->itemAt( pos - posVp );
+ TQListViewItem *lvi = plv->itemAt( pos - posVp );
if (!lvi)
return;
@@ -71,8 +71,8 @@ void DynamicTip::maybeTip( const QPoint &pos )
if (!plvi)
return;
- QString s;
- QRect r = plv->itemRect( lvi );
+ TQString s;
+ TQRect r = plv->itemRect( lvi );
r.moveBy( posVp.x(), posVp.y() );
//kdDebug(5720) << "Tip rec: " << r.x() << "," << r.y() << "," << r.width()
@@ -89,13 +89,13 @@ void DynamicTip::maybeTip( const QPoint &pos )
s += i18n("label: value", "%1: %2").arg(a.organizationLabel())
.arg(a.organization());
- QString notes = a.note().stripWhiteSpace();
+ TQString notes = a.note().stripWhiteSpace();
if ( !notes.isEmpty() ) {
notes += '\n';
s += '\n' + i18n("label: value", "%1: \n").arg(a.noteLabel());
- QFontMetrics fm( font() );
+ TQFontMetrics fm( font() );
- // Begin word wrap code based on QMultiLineEdit code
+ // Begin word wrap code based on TQMultiLineEdit code
int i = 0;
bool doBreak = false;
int linew = 0;
@@ -161,11 +161,11 @@ ContactListViewItem::ContactListViewItem(const KABC::Addressee &a,
refresh();
}
-QString ContactListViewItem::key(int column, bool ascending) const
+TQString ContactListViewItem::key(int column, bool ascending) const
{
- // Preserve behaviour of QListViewItem::key(), otherwise we cause a crash if the column does not exist
+ // Preserve behaviour of TQListViewItem::key(), otherwise we cause a crash if the column does not exist
if ( column >= parentListView->columns() )
- return QString::null;
+ return TQString::null;
#if KDE_VERSION >= 319
Q_UNUSED( ascending )
@@ -176,7 +176,7 @@ QString ContactListViewItem::key(int column, bool ascending) const
// increment by one before converting to string so that -1 is not greater than 1
// create the sort key by taking the numeric status 0 low, 5 high, and subtracting it from 5
// so that the default ascending gives online before offline, etc.
- QString key = QString::number( 5 - ( mIMProxy->presenceNumeric( mAddressee.uid() ) + 1 ) );
+ TQString key = TQString::number( 5 - ( mIMProxy->presenceNumeric( mAddressee.uid() ) + 1 ) );
return key;
}
else {
@@ -186,12 +186,12 @@ QString ContactListViewItem::key(int column, bool ascending) const
else
return mFields[ column ]->sortKey( mAddressee );
#else
- return QListViewItem::key( column, ascending ).lower();
+ return TQListViewItem::key( column, ascending ).lower();
#endif
}
-void ContactListViewItem::paintCell(QPainter * p,
- const QColorGroup & cg,
+void ContactListViewItem::paintCell(TQPainter * p,
+ const TQColorGroup & cg,
int column,
int width,
int align)
@@ -232,13 +232,13 @@ void ContactListViewItem::refresh()
if ( mIMProxy->presenceNumeric( mAddressee.uid() ) > 0 )
setPixmap( parentListView->imColumn(), mIMProxy->presenceIcon( mAddressee.uid() ) );
else
- setPixmap( parentListView->imColumn(), QPixmap() );
+ setPixmap( parentListView->imColumn(), TQPixmap() );
}
KABC::Field::List::ConstIterator it;
for ( it = mFields.begin(); it != mFields.end(); ++it ) {
if ( (*it)->label() == KABC::Addressee::birthdayLabel() ) {
- QDate date = mAddressee.birthday().date();
+ TQDate date = mAddressee.birthday().date();
if ( date.isValid() )
setText( i++, KGlobal::locale()->formatDate( date, true ) );
else
@@ -258,7 +258,7 @@ void ContactListViewItem::setHasIM( bool hasIM )
ContactListView::ContactListView(KAddressBookTableView *view,
KABC::AddressBook* /* doc */,
- QWidget *parent,
+ TQWidget *parent,
const char *name )
: KListView( parent, name ),
pabWidget( view ),
@@ -278,15 +278,15 @@ ContactListView::ContactListView(KAddressBookTableView *view,
setSelectionModeExt( KListView::Extended );
setDropVisualizer(false);
- connect(this, SIGNAL(dropped(QDropEvent*)),
- this, SLOT(itemDropped(QDropEvent*)));
+ connect(this, TQT_SIGNAL(dropped(TQDropEvent*)),
+ this, TQT_SLOT(itemDropped(TQDropEvent*)));
new DynamicTip( this );
}
-void ContactListView::paintEmptyArea( QPainter * p, const QRect & rect )
+void ContactListView::paintEmptyArea( TQPainter * p, const TQRect & rect )
{
- QBrush b = palette().brush(QPalette::Active, QColorGroup::Base);
+ TQBrush b = palette().brush(TQPalette::Active, TQColorGroup::Base);
// Get the brush, which will have the background pixmap if there is one.
if (b.pixmap())
@@ -304,7 +304,7 @@ void ContactListView::paintEmptyArea( QPainter * p, const QRect & rect )
}
}
-void ContactListView::contentsMousePressEvent(QMouseEvent* e)
+void ContactListView::contentsMousePressEvent(TQMouseEvent* e)
{
presspos = e->pos();
KListView::contentsMousePressEvent(e);
@@ -312,7 +312,7 @@ void ContactListView::contentsMousePressEvent(QMouseEvent* e)
// To initiate a drag operation
-void ContactListView::contentsMouseMoveEvent( QMouseEvent *e )
+void ContactListView::contentsMouseMoveEvent( TQMouseEvent *e )
{
if ((e->state() & LeftButton) && (e->pos() - presspos).manhattanLength() > 4 ) {
emit startAddresseeDrag();
@@ -321,17 +321,17 @@ void ContactListView::contentsMouseMoveEvent( QMouseEvent *e )
KListView::contentsMouseMoveEvent( e );
}
-bool ContactListView::acceptDrag(QDropEvent *e) const
+bool ContactListView::acceptDrag(TQDropEvent *e) const
{
- return QTextDrag::canDecode(e);
+ return TQTextDrag::canDecode(e);
}
-void ContactListView::itemDropped(QDropEvent *e)
+void ContactListView::itemDropped(TQDropEvent *e)
{
contentsDropEvent(e);
}
-void ContactListView::contentsDropEvent( QDropEvent *e )
+void ContactListView::contentsDropEvent( TQDropEvent *e )
{
emit addresseeDropped(e);
}
@@ -346,11 +346,11 @@ void ContactListView::setAlternateBackgroundEnabled(bool enabled)
}
else
{
- setAlternateBackground(QColor());
+ setAlternateBackground(TQColor());
}
}
-void ContactListView::setBackgroundPixmap(const QString &filename)
+void ContactListView::setBackgroundPixmap(const TQString &filename)
{
if (filename.isEmpty())
{
@@ -358,7 +358,7 @@ void ContactListView::setBackgroundPixmap(const QString &filename)
}
else
{
- setPaletteBackgroundPixmap(QPixmap(filename));
+ setPaletteBackgroundPixmap(TQPixmap(filename));
}
}
diff --git a/kaddressbook/views/contactlistview.h b/kaddressbook/views/contactlistview.h
index c018e4c2b..ff09dbe35 100644
--- a/kaddressbook/views/contactlistview.h
+++ b/kaddressbook/views/contactlistview.h
@@ -24,10 +24,10 @@
#ifndef CONTACTLISTVIEW_H
#define CONTACTLISTVIEW_H
-#include <qcolor.h>
-#include <qpixmap.h>
-#include <qtooltip.h>
-#include <qstring.h>
+#include <tqcolor.h>
+#include <tqpixmap.h>
+#include <tqtooltip.h>
+#include <tqstring.h>
#include <klistview.h>
@@ -47,7 +47,7 @@ class DynamicTip : public QToolTip
DynamicTip( ContactListView * parent );
protected:
- void maybeTip( const QPoint & );
+ void maybeTip( const TQPoint & );
private:
};
@@ -61,12 +61,12 @@ public:
const KABC::Addressee &addressee() const { return mAddressee; }
virtual void refresh();
virtual ContactListView* parent();
- virtual QString key ( int, bool ) const;
+ virtual TQString key ( int, bool ) const;
void setHasIM( bool hasIM );
/** Adds the border around the cell if the user wants it.
* This is how the single line config option is implemented.
*/
- virtual void paintCell(QPainter * p, const QColorGroup & cg,
+ virtual void paintCell(TQPainter * p, const TQColorGroup & cg,
int column, int width, int align );
private:
@@ -89,7 +89,7 @@ class ContactListView : public KListView
public:
ContactListView(KAddressBookTableView *view,
KABC::AddressBook *doc,
- QWidget *parent,
+ TQWidget *parent,
const char *name = 0L );
virtual ~ContactListView() {}
//void resort();
@@ -105,13 +105,13 @@ public:
bool singleLine() const { return mSingleLine; }
void setSingleLineEnabled(bool enabled) { mSingleLine = enabled; }
- const QColor &alternateColor() const { return mAlternateColor; }
+ const TQColor &alternateColor() const { return mAlternateColor; }
/** Sets the background pixmap to <i>filename</i>. If the
- * QString is empty (QString::isEmpty()), then the background
+ * TQString is empty (TQString::isEmpty()), then the background
* pixmap will be disabled.
*/
- void setBackgroundPixmap(const QString &filename);
+ void setBackgroundPixmap(const TQString &filename);
/**
* Sets whether instant messaging presence should be shown in the first column
@@ -140,20 +140,20 @@ protected:
/** Paints the background pixmap in the empty area. This method is needed
* since Qt::FixedPixmap will not scroll with the list view.
*/
- virtual void paintEmptyArea( QPainter * p, const QRect & rect );
- virtual void contentsMousePressEvent(QMouseEvent*);
- void contentsMouseMoveEvent( QMouseEvent *e );
- void contentsDropEvent( QDropEvent *e );
- virtual bool acceptDrag(QDropEvent *e) const;
+ virtual void paintEmptyArea( TQPainter * p, const TQRect & rect );
+ virtual void contentsMousePressEvent(TQMouseEvent*);
+ void contentsMouseMoveEvent( TQMouseEvent *e );
+ void contentsDropEvent( TQDropEvent *e );
+ virtual bool acceptDrag(TQDropEvent *e) const;
protected slots:
- void itemDropped(QDropEvent *e);
+ void itemDropped(TQDropEvent *e);
public slots:
signals:
void startAddresseeDrag();
- void addresseeDropped(QDropEvent *);
+ void addresseeDropped(TQDropEvent *);
private:
KAddressBookTableView *pabWidget;
@@ -166,9 +166,9 @@ private:
bool mToolTips;
bool mShowIM;
- QColor mAlternateColor;
+ TQColor mAlternateColor;
- QPoint presspos;
+ TQPoint presspos;
int mInstantMsgColumn;
};
diff --git a/kaddressbook/views/kaddressbookcardview.cpp b/kaddressbook/views/kaddressbookcardview.cpp
index d65c4d71f..7ba89a0ed 100644
--- a/kaddressbook/views/kaddressbookcardview.cpp
+++ b/kaddressbook/views/kaddressbookcardview.cpp
@@ -21,12 +21,12 @@
without including the source code for Qt in the source distribution.
*/
-#include <qapplication.h>
-#include <qdragobject.h>
-#include <qevent.h>
-#include <qiconview.h>
-#include <qlayout.h>
-#include <qstringlist.h>
+#include <tqapplication.h>
+#include <tqdragobject.h>
+#include <tqevent.h>
+#include <tqiconview.h>
+#include <tqlayout.h>
+#include <tqstringlist.h>
#include <kabc/addressbook.h>
#include <kabc/addressee.h>
@@ -43,16 +43,16 @@
class CardViewFactory : public ViewFactory
{
public:
- KAddressBookView *view( KAB::Core *core, QWidget *parent, const char *name )
+ KAddressBookView *view( KAB::Core *core, TQWidget *parent, const char *name )
{
return new KAddressBookCardView( core, parent, name );
}
- QString type() const { return I18N_NOOP("Card"); }
+ TQString type() const { return I18N_NOOP("Card"); }
- QString description() const { return i18n( "Rolodex style cards represent contacts." ); }
+ TQString description() const { return i18n( "Rolodex style cards represent contacts." ); }
- ViewConfigureWidget *configureWidget( KABC::AddressBook *ab, QWidget *parent,
+ ViewConfigureWidget *configureWidget( KABC::AddressBook *ab, TQWidget *parent,
const char *name = 0 )
{
return new ConfigureCardViewWidget( ab, parent, name );
@@ -116,7 +116,7 @@ class AddresseeCardViewItem : public CardViewItem
};
-AddresseeCardView::AddresseeCardView( QWidget *parent, const char *name )
+AddresseeCardView::AddresseeCardView( TQWidget *parent, const char *name )
: CardView( parent, name )
{
setAcceptDrops( true );
@@ -126,13 +126,13 @@ AddresseeCardView::~AddresseeCardView()
{
}
-void AddresseeCardView::dragEnterEvent( QDragEnterEvent *event )
+void AddresseeCardView::dragEnterEvent( TQDragEnterEvent *event )
{
- if ( QTextDrag::canDecode( event ) )
+ if ( TQTextDrag::canDecode( event ) )
event->accept();
}
-void AddresseeCardView::dropEvent( QDropEvent *event )
+void AddresseeCardView::dropEvent( TQDropEvent *event )
{
emit addresseeDropped( event );
}
@@ -144,28 +144,28 @@ void AddresseeCardView::startDrag()
KAddressBookCardView::KAddressBookCardView( KAB::Core *core,
- QWidget *parent, const char *name )
+ TQWidget *parent, const char *name )
: KAddressBookView( core, parent, name )
{
mShowEmptyFields = false;
- QVBoxLayout *layout = new QVBoxLayout( viewWidget() );
+ TQVBoxLayout *layout = new TQVBoxLayout( viewWidget() );
mCardView = new AddresseeCardView( viewWidget(), "mCardView" );
mCardView->setSelectionMode( CardView::Extended );
layout->addWidget( mCardView );
// Connect up the signals
- connect( mCardView, SIGNAL( executed( CardViewItem* ) ),
- this, SLOT( addresseeExecuted( CardViewItem* ) ) );
- connect( mCardView, SIGNAL( selectionChanged() ),
- this, SLOT( addresseeSelected() ) );
- connect( mCardView, SIGNAL( addresseeDropped( QDropEvent* ) ),
- this, SIGNAL( dropped( QDropEvent* ) ) );
- connect( mCardView, SIGNAL( startAddresseeDrag() ),
- this, SIGNAL( startDrag() ) );
- connect( mCardView, SIGNAL( contextMenuRequested( CardViewItem*, const QPoint& ) ),
- this, SLOT( rmbClicked( CardViewItem*, const QPoint& ) ) );
+ connect( mCardView, TQT_SIGNAL( executed( CardViewItem* ) ),
+ this, TQT_SLOT( addresseeExecuted( CardViewItem* ) ) );
+ connect( mCardView, TQT_SIGNAL( selectionChanged() ),
+ this, TQT_SLOT( addresseeSelected() ) );
+ connect( mCardView, TQT_SIGNAL( addresseeDropped( TQDropEvent* ) ),
+ this, TQT_SIGNAL( dropped( TQDropEvent* ) ) );
+ connect( mCardView, TQT_SIGNAL( startAddresseeDrag() ),
+ this, TQT_SIGNAL( startDrag() ) );
+ connect( mCardView, TQT_SIGNAL( contextMenuRequested( CardViewItem*, const TQPoint& ) ),
+ this, TQT_SLOT( rmbClicked( CardViewItem*, const TQPoint& ) ) );
}
KAddressBookCardView::~KAddressBookCardView()
@@ -184,19 +184,19 @@ void KAddressBookCardView::readConfig( KConfig *config )
// costum colors?
if ( config->readBoolEntry( "EnableCustomColors", false ) ) {
- QPalette p( mCardView->palette() );
- QColor c = p.color( QPalette::Normal, QColorGroup::Base );
- p.setColor( QPalette::Normal, QColorGroup::Base, config->readColorEntry( "BackgroundColor", &c ) );
- c = p.color( QPalette::Normal, QColorGroup::Text );
- p.setColor( QPalette::Normal, QColorGroup::Text, config->readColorEntry( "TextColor", &c ) );
- c = p.color( QPalette::Normal, QColorGroup::Button );
- p.setColor( QPalette::Normal, QColorGroup::Button, config->readColorEntry( "HeaderColor", &c ) );
- c = p.color( QPalette::Normal, QColorGroup::ButtonText );
- p.setColor( QPalette::Normal, QColorGroup::ButtonText, config->readColorEntry( "HeaderTextColor", &c ) );
- c = p.color( QPalette::Normal, QColorGroup::Highlight );
- p.setColor( QPalette::Normal, QColorGroup::Highlight, config->readColorEntry( "HighlightColor", &c ) );
- c = p.color( QPalette::Normal, QColorGroup::HighlightedText );
- p.setColor( QPalette::Normal, QColorGroup::HighlightedText, config->readColorEntry( "HighlightedTextColor", &c ) );
+ TQPalette p( mCardView->palette() );
+ TQColor c = p.color( TQPalette::Normal, TQColorGroup::Base );
+ p.setColor( TQPalette::Normal, TQColorGroup::Base, config->readColorEntry( "BackgroundColor", &c ) );
+ c = p.color( TQPalette::Normal, TQColorGroup::Text );
+ p.setColor( TQPalette::Normal, TQColorGroup::Text, config->readColorEntry( "TextColor", &c ) );
+ c = p.color( TQPalette::Normal, TQColorGroup::Button );
+ p.setColor( TQPalette::Normal, TQColorGroup::Button, config->readColorEntry( "HeaderColor", &c ) );
+ c = p.color( TQPalette::Normal, TQColorGroup::ButtonText );
+ p.setColor( TQPalette::Normal, TQColorGroup::ButtonText, config->readColorEntry( "HeaderTextColor", &c ) );
+ c = p.color( TQPalette::Normal, TQColorGroup::Highlight );
+ p.setColor( TQPalette::Normal, TQColorGroup::Highlight, config->readColorEntry( "HighlightColor", &c ) );
+ c = p.color( TQPalette::Normal, TQColorGroup::HighlightedText );
+ p.setColor( TQPalette::Normal, TQColorGroup::HighlightedText, config->readColorEntry( "HighlightedTextColor", &c ) );
mCardView->viewport()->setPalette( p );
} else {
// needed if turned off during a session.
@@ -204,7 +204,7 @@ void KAddressBookCardView::readConfig( KConfig *config )
}
//custom fonts?
- QFont f( font() );
+ TQFont f( font() );
if ( config->readBoolEntry( "EnableCustomFonts", false ) ) {
mCardView->setFont( config->readFontEntry( "TextFont", &f ) );
f.setBold( true );
@@ -227,15 +227,15 @@ void KAddressBookCardView::readConfig( KConfig *config )
mCardView->setItemSpacing( config->readNumEntry( "ItemSpacing", 10 ) );
mCardView->setSeparatorWidth( config->readNumEntry( "SeparatorWidth", 2 ) );
- disconnect( mCardView, SIGNAL( executed( CardViewItem* ) ),
- this, SLOT( addresseeExecuted( CardViewItem* ) ) );
+ disconnect( mCardView, TQT_SIGNAL( executed( CardViewItem* ) ),
+ this, TQT_SLOT( addresseeExecuted( CardViewItem* ) ) );
if ( KABPrefs::instance()->honorSingleClick() )
- connect( mCardView, SIGNAL( executed( CardViewItem* ) ),
- this, SLOT( addresseeExecuted( CardViewItem* ) ) );
+ connect( mCardView, TQT_SIGNAL( executed( CardViewItem* ) ),
+ this, TQT_SLOT( addresseeExecuted( CardViewItem* ) ) );
else
- connect( mCardView, SIGNAL( doubleClicked( CardViewItem* ) ),
- this, SLOT( addresseeExecuted( CardViewItem* ) ) );
+ connect( mCardView, TQT_SIGNAL( doubleClicked( CardViewItem* ) ),
+ this, TQT_SLOT( addresseeExecuted( CardViewItem* ) ) );
}
void KAddressBookCardView::writeConfig( KConfig *config )
@@ -244,9 +244,9 @@ void KAddressBookCardView::writeConfig( KConfig *config )
KAddressBookView::writeConfig( config );
}
-QStringList KAddressBookCardView::selectedUids()
+TQStringList KAddressBookCardView::selectedUids()
{
- QStringList uidList;
+ TQStringList uidList;
CardViewItem *item;
AddresseeCardViewItem *aItem;
@@ -261,7 +261,7 @@ QStringList KAddressBookCardView::selectedUids()
return uidList;
}
-void KAddressBookCardView::refresh( const QString &uid )
+void KAddressBookCardView::refresh( const TQString &uid )
{
CardViewItem *item;
AddresseeCardViewItem *aItem;
@@ -282,7 +282,7 @@ void KAddressBookCardView::refresh( const QString &uid )
mCardView->viewport()->update();
// by default nothing is selected
- emit selected( QString::null );
+ emit selected( TQString::null );
} else {
// Try to find the one to refresh
bool found = false;
@@ -296,7 +296,7 @@ void KAddressBookCardView::refresh( const QString &uid )
}
}
-void KAddressBookCardView::setSelected( const QString &uid, bool selected )
+void KAddressBookCardView::setSelected( const TQString &uid, bool selected )
{
CardViewItem *item;
AddresseeCardViewItem *aItem;
@@ -349,22 +349,22 @@ void KAddressBookCardView::addresseeSelected()
}
if ( !found )
- emit selected( QString::null );
+ emit selected( TQString::null );
}
-void KAddressBookCardView::rmbClicked( CardViewItem*, const QPoint &point )
+void KAddressBookCardView::rmbClicked( CardViewItem*, const TQPoint &point )
{
popup( point );
}
void KAddressBookCardView::scrollUp()
{
- QApplication::postEvent( mCardView, new QKeyEvent( QEvent::KeyPress, Qt::Key_Up, 0, 0 ) );
+ TQApplication::postEvent( mCardView, new TQKeyEvent( TQEvent::KeyPress, Qt::Key_Up, 0, 0 ) );
}
void KAddressBookCardView::scrollDown()
{
- QApplication::postEvent( mCardView, new QKeyEvent( QEvent::KeyPress, Qt::Key_Down, 0, 0 ) );
+ TQApplication::postEvent( mCardView, new TQKeyEvent( TQEvent::KeyPress, Qt::Key_Down, 0, 0 ) );
}
#include "kaddressbookcardview.moc"
diff --git a/kaddressbook/views/kaddressbookcardview.h b/kaddressbook/views/kaddressbookcardview.h
index 68e2a13f3..de0120a09 100644
--- a/kaddressbook/views/kaddressbookcardview.h
+++ b/kaddressbook/views/kaddressbookcardview.h
@@ -24,7 +24,7 @@
without including the source code for Qt in the source distribution.
*/
-#include <qstring.h>
+#include <tqstring.h>
#include <kiconview.h>
#include "cardview.h"
@@ -45,12 +45,12 @@ class KAddressBookCardView : public KAddressBookView
Q_OBJECT
public:
- KAddressBookCardView( KAB::Core *core, QWidget *parent,
+ KAddressBookCardView( KAB::Core *core, TQWidget *parent,
const char *name = 0 );
virtual ~KAddressBookCardView();
- virtual QStringList selectedUids();
- virtual QString type() const { return "Card"; }
+ virtual TQStringList selectedUids();
+ virtual TQString type() const { return "Card"; }
virtual KABC::Field *sortField() const;
virtual void readConfig( KConfig *config );
@@ -60,14 +60,14 @@ class KAddressBookCardView : public KAddressBookView
void scrollDown();
public slots:
- void refresh( const QString &uid = QString() );
- void setSelected( const QString &uid = QString(), bool selected = true );
+ void refresh( const TQString &uid = TQString() );
+ void setSelected( const TQString &uid = TQString(), bool selected = true );
virtual void setFirstSelected( bool selected = true );
protected slots:
void addresseeExecuted( CardViewItem* );
void addresseeSelected();
- void rmbClicked( CardViewItem*, const QPoint& );
+ void rmbClicked( CardViewItem*, const TQPoint& );
private:
AddresseeCardView *mCardView;
@@ -78,16 +78,16 @@ class AddresseeCardView : public CardView
{
Q_OBJECT
public:
- AddresseeCardView( QWidget *parent, const char *name = 0 );
+ AddresseeCardView( TQWidget *parent, const char *name = 0 );
~AddresseeCardView();
signals:
void startAddresseeDrag();
- void addresseeDropped( QDropEvent* );
+ void addresseeDropped( TQDropEvent* );
protected:
- virtual void dragEnterEvent( QDragEnterEvent* );
- virtual void dropEvent( QDropEvent* );
+ virtual void dragEnterEvent( TQDragEnterEvent* );
+ virtual void dropEvent( TQDropEvent* );
virtual void startDrag();
};
diff --git a/kaddressbook/views/kaddressbookiconview.cpp b/kaddressbook/views/kaddressbookiconview.cpp
index b5d706cad..6d02acf73 100644
--- a/kaddressbook/views/kaddressbookiconview.cpp
+++ b/kaddressbook/views/kaddressbookiconview.cpp
@@ -21,10 +21,10 @@
without including the source code for Qt in the source distribution.
*/
-#include <qapplication.h>
-#include <qiconview.h>
-#include <qlayout.h>
-#include <qstringlist.h>
+#include <tqapplication.h>
+#include <tqiconview.h>
+#include <tqlayout.h>
+#include <tqstringlist.h>
#include <kabc/addressbook.h>
#include <kabc/addressee.h>
@@ -42,14 +42,14 @@
class IconViewFactory : public ViewFactory
{
public:
- KAddressBookView *view( KAB::Core *core, QWidget *parent, const char *name )
+ KAddressBookView *view( KAB::Core *core, TQWidget *parent, const char *name )
{
return new KAddressBookIconView( core, parent, name );
}
- QString type() const { return I18N_NOOP( "Icon" ); }
+ TQString type() const { return I18N_NOOP( "Icon" ); }
- QString description() const { return i18n( "Icons represent contacts. Very simple view." ); }
+ TQString description() const { return i18n( "Icons represent contacts. Very simple view." ); }
};
extern "C" {
@@ -59,31 +59,31 @@ extern "C" {
}
}
-AddresseeIconView::AddresseeIconView( QWidget *parent, const char *name )
+AddresseeIconView::AddresseeIconView( TQWidget *parent, const char *name )
: KIconView( parent, name )
{
- setSelectionMode( QIconView::Extended );
- setResizeMode( QIconView::Adjust );
+ setSelectionMode( TQIconView::Extended );
+ setResizeMode( TQIconView::Adjust );
setWordWrapIconText( true );
setGridX( 100 );
setItemsMovable( false );
setSorting( true, true );
setMode( KIconView::Select );
- connect( this, SIGNAL( dropped( QDropEvent*, const QValueList<QIconDragItem>& ) ),
- this, SLOT( itemDropped( QDropEvent*, const QValueList<QIconDragItem>& ) ) );
+ connect( this, TQT_SIGNAL( dropped( TQDropEvent*, const TQValueList<TQIconDragItem>& ) ),
+ this, TQT_SLOT( itemDropped( TQDropEvent*, const TQValueList<TQIconDragItem>& ) ) );
}
AddresseeIconView::~AddresseeIconView()
{
}
-void AddresseeIconView::itemDropped( QDropEvent *event, const QValueList<QIconDragItem>& )
+void AddresseeIconView::itemDropped( TQDropEvent *event, const TQValueList<TQIconDragItem>& )
{
emit addresseeDropped( event );
}
-QDragObject *AddresseeIconView::dragObject()
+TQDragObject *AddresseeIconView::dragObject()
{
emit startAddresseeDrag();
@@ -96,7 +96,7 @@ class AddresseeIconViewItem : public KIconViewItem
{
public:
AddresseeIconViewItem( const KABC::Field::List&, KABC::AddressBook *doc,
- const KABC::Addressee &addr, QIconView *parent )
+ const KABC::Addressee &addr, TQIconView *parent )
: KIconViewItem( parent ), mDocument( doc ), mAddressee( addr )
{
refresh();
@@ -111,14 +111,14 @@ class AddresseeIconViewItem : public KIconViewItem
if ( !mAddressee.isEmpty() )
setText( mAddressee.givenName() + " " + mAddressee.familyName() );
- QPixmap icon;
- QPixmap defaultIcon( KGlobal::iconLoader()->loadIcon( "vcard", KIcon::Desktop ) );
+ TQPixmap icon;
+ TQPixmap defaultIcon( KGlobal::iconLoader()->loadIcon( "vcard", KIcon::Desktop ) );
KABC::Picture pic = mAddressee.photo();
if ( pic.data().isNull() )
pic = mAddressee.logo();
if ( pic.isIntern() && !pic.data().isNull() ) {
- QImage img = pic.data();
+ TQImage img = pic.data();
if ( img.width() > img.height() )
icon = img.scaleWidth( 32 );
else
@@ -136,25 +136,25 @@ class AddresseeIconViewItem : public KIconViewItem
KAddressBookIconView::KAddressBookIconView( KAB::Core *core,
- QWidget *parent, const char *name)
+ TQWidget *parent, const char *name)
: KAddressBookView( core, parent, name )
{
- QVBoxLayout *layout = new QVBoxLayout( viewWidget() );
+ TQVBoxLayout *layout = new TQVBoxLayout( viewWidget() );
mIconView = new AddresseeIconView( viewWidget(), "mIconView" );
layout->addWidget( mIconView );
// Connect up the signals
- connect( mIconView, SIGNAL( executed( QIconViewItem* ) ),
- this, SLOT( addresseeExecuted( QIconViewItem* ) ) );
- connect( mIconView, SIGNAL( selectionChanged() ),
- this, SLOT( addresseeSelected() ) );
- connect( mIconView, SIGNAL( addresseeDropped( QDropEvent* ) ),
- this, SIGNAL( dropped( QDropEvent* ) ) );
- connect( mIconView, SIGNAL( startAddresseeDrag() ),
- this, SIGNAL( startDrag() ) );
- connect( mIconView, SIGNAL( contextMenuRequested( QIconViewItem*, const QPoint& ) ),
- this, SLOT( rmbClicked( QIconViewItem*, const QPoint& ) ) );
+ connect( mIconView, TQT_SIGNAL( executed( TQIconViewItem* ) ),
+ this, TQT_SLOT( addresseeExecuted( TQIconViewItem* ) ) );
+ connect( mIconView, TQT_SIGNAL( selectionChanged() ),
+ this, TQT_SLOT( addresseeSelected() ) );
+ connect( mIconView, TQT_SIGNAL( addresseeDropped( TQDropEvent* ) ),
+ this, TQT_SIGNAL( dropped( TQDropEvent* ) ) );
+ connect( mIconView, TQT_SIGNAL( startAddresseeDrag() ),
+ this, TQT_SIGNAL( startDrag() ) );
+ connect( mIconView, TQT_SIGNAL( contextMenuRequested( TQIconViewItem*, const TQPoint& ) ),
+ this, TQT_SLOT( rmbClicked( TQIconViewItem*, const TQPoint& ) ) );
}
KAddressBookIconView::~KAddressBookIconView()
@@ -171,21 +171,21 @@ void KAddressBookIconView::readConfig( KConfig *config )
{
KAddressBookView::readConfig( config );
- disconnect( mIconView, SIGNAL( executed( QIconViewItem* ) ),
- this, SLOT( addresseeExecuted( QIconViewItem* ) ) );
+ disconnect( mIconView, TQT_SIGNAL( executed( TQIconViewItem* ) ),
+ this, TQT_SLOT( addresseeExecuted( TQIconViewItem* ) ) );
if ( KABPrefs::instance()->honorSingleClick() )
- connect( mIconView, SIGNAL( executed( QIconViewItem* ) ),
- this, SLOT( addresseeExecuted( QIconViewItem* ) ) );
+ connect( mIconView, TQT_SIGNAL( executed( TQIconViewItem* ) ),
+ this, TQT_SLOT( addresseeExecuted( TQIconViewItem* ) ) );
else
- connect( mIconView, SIGNAL( doubleClicked( QIconViewItem* ) ),
- this, SLOT( addresseeExecuted( QIconViewItem* ) ) );
+ connect( mIconView, TQT_SIGNAL( doubleClicked( TQIconViewItem* ) ),
+ this, TQT_SLOT( addresseeExecuted( TQIconViewItem* ) ) );
}
-QStringList KAddressBookIconView::selectedUids()
+TQStringList KAddressBookIconView::selectedUids()
{
- QStringList uidList;
- QIconViewItem *item;
+ TQStringList uidList;
+ TQIconViewItem *item;
AddresseeIconViewItem *aItem;
for ( item = mIconView->firstItem(); item; item = item->nextItem() ) {
@@ -199,9 +199,9 @@ QStringList KAddressBookIconView::selectedUids()
return uidList;
}
-void KAddressBookIconView::refresh( const QString &uid )
+void KAddressBookIconView::refresh( const TQString &uid )
{
- QIconViewItem *item;
+ TQIconViewItem *item;
AddresseeIconViewItem *aItem;
if ( uid.isEmpty() ) {
@@ -233,13 +233,13 @@ void KAddressBookIconView::refresh( const QString &uid )
}
}
- refresh( QString::null );
+ refresh( TQString::null );
}
}
-void KAddressBookIconView::setSelected( const QString &uid, bool selected )
+void KAddressBookIconView::setSelected( const TQString &uid, bool selected )
{
- QIconViewItem *item;
+ TQIconViewItem *item;
AddresseeIconViewItem *aItem;
if ( uid.isEmpty() ) {
@@ -266,7 +266,7 @@ void KAddressBookIconView::setFirstSelected( bool selected )
}
}
-void KAddressBookIconView::addresseeExecuted( QIconViewItem *item )
+void KAddressBookIconView::addresseeExecuted( TQIconViewItem *item )
{
AddresseeIconViewItem *aItem = dynamic_cast<AddresseeIconViewItem*>( item );
@@ -276,7 +276,7 @@ void KAddressBookIconView::addresseeExecuted( QIconViewItem *item )
void KAddressBookIconView::addresseeSelected()
{
- QIconViewItem *item;
+ TQIconViewItem *item;
AddresseeIconViewItem *aItem;
bool found = false;
@@ -291,22 +291,22 @@ void KAddressBookIconView::addresseeSelected()
}
if ( !found )
- emit selected( QString::null );
+ emit selected( TQString::null );
}
-void KAddressBookIconView::rmbClicked( QIconViewItem*, const QPoint &point )
+void KAddressBookIconView::rmbClicked( TQIconViewItem*, const TQPoint &point )
{
popup( point );
}
void KAddressBookIconView::scrollUp()
{
- QApplication::postEvent( mIconView, new QKeyEvent( QEvent::KeyPress, Qt::Key_Up, 0, 0 ) );
+ TQApplication::postEvent( mIconView, new TQKeyEvent( TQEvent::KeyPress, Qt::Key_Up, 0, 0 ) );
}
void KAddressBookIconView::scrollDown()
{
- QApplication::postEvent( mIconView, new QKeyEvent( QEvent::KeyPress, Qt::Key_Down, 0, 0 ) );
+ TQApplication::postEvent( mIconView, new TQKeyEvent( TQEvent::KeyPress, Qt::Key_Down, 0, 0 ) );
}
#include "kaddressbookiconview.moc"
diff --git a/kaddressbook/views/kaddressbookiconview.h b/kaddressbook/views/kaddressbookiconview.h
index f11e7b8a1..21d9bac8e 100644
--- a/kaddressbook/views/kaddressbookiconview.h
+++ b/kaddressbook/views/kaddressbookiconview.h
@@ -24,7 +24,7 @@
#ifndef KADDRESSBOOKICONVIEW_H
#define KADDRESSBOOKICONVIEW_H
-#include <qstring.h>
+#include <tqstring.h>
#include <kiconview.h>
#include "kaddressbookview.h"
@@ -44,12 +44,12 @@ class KAddressBookIconView : public KAddressBookView
Q_OBJECT
public:
- KAddressBookIconView( KAB::Core *core, QWidget *parent,
+ KAddressBookIconView( KAB::Core *core, TQWidget *parent,
const char *name = 0 );
virtual ~KAddressBookIconView();
- virtual QStringList selectedUids();
- virtual QString type() const { return "Icon"; }
+ virtual TQStringList selectedUids();
+ virtual TQString type() const { return "Icon"; }
virtual KABC::Field *sortField() const;
virtual void readConfig( KConfig *config );
@@ -57,18 +57,18 @@ class KAddressBookIconView : public KAddressBookView
void scrollDown();
public slots:
- void refresh( const QString &uid = QString() );
- void setSelected( const QString &uid = QString(), bool selected = true );
+ void refresh( const TQString &uid = TQString() );
+ void setSelected( const TQString &uid = TQString(), bool selected = true );
virtual void setFirstSelected( bool selected = true );
protected slots:
- void addresseeExecuted( QIconViewItem *item );
+ void addresseeExecuted( TQIconViewItem *item );
void addresseeSelected();
- void rmbClicked( QIconViewItem*, const QPoint& );
+ void rmbClicked( TQIconViewItem*, const TQPoint& );
private:
AddresseeIconView *mIconView;
- QPtrList<AddresseeIconViewItem> mIconList;
+ TQPtrList<AddresseeIconViewItem> mIconList;
};
@@ -77,17 +77,17 @@ class AddresseeIconView : public KIconView
Q_OBJECT
public:
- AddresseeIconView( QWidget *parent, const char *name = 0 );
+ AddresseeIconView( TQWidget *parent, const char *name = 0 );
~AddresseeIconView();
signals:
- void addresseeDropped( QDropEvent* );
+ void addresseeDropped( TQDropEvent* );
void startAddresseeDrag();
protected:
- virtual QDragObject *dragObject();
+ virtual TQDragObject *dragObject();
protected slots:
- void itemDropped( QDropEvent*, const QValueList<QIconDragItem>& );
+ void itemDropped( TQDropEvent*, const TQValueList<TQIconDragItem>& );
};
#endif
diff --git a/kaddressbook/views/kaddressbooktableview.cpp b/kaddressbook/views/kaddressbooktableview.cpp
index e0ac61093..7f822ae4d 100644
--- a/kaddressbook/views/kaddressbooktableview.cpp
+++ b/kaddressbook/views/kaddressbooktableview.cpp
@@ -21,20 +21,20 @@
without including the source code for Qt in the source distribution.
*/
-#include <qapplication.h>
-#include <qlayout.h>
-#include <qheader.h>
-#include <qvbox.h>
-#include <qlistbox.h>
-#include <qwidget.h>
-#include <qfile.h>
-#include <qimage.h>
-#include <qcombobox.h>
-#include <qapplication.h>
-#include <qdragobject.h>
-#include <qevent.h>
-#include <qurl.h>
-#include <qpixmap.h>
+#include <tqapplication.h>
+#include <tqlayout.h>
+#include <tqheader.h>
+#include <tqvbox.h>
+#include <tqlistbox.h>
+#include <tqwidget.h>
+#include <tqfile.h>
+#include <tqimage.h>
+#include <tqcombobox.h>
+#include <tqapplication.h>
+#include <tqdragobject.h>
+#include <tqevent.h>
+#include <tqurl.h>
+#include <tqpixmap.h>
#include <kabc/addressbook.h>
#include <kapplication.h>
@@ -61,17 +61,17 @@
class TableViewFactory : public ViewFactory
{
public:
- KAddressBookView *view( KAB::Core *core, QWidget *parent, const char *name )
+ KAddressBookView *view( KAB::Core *core, TQWidget *parent, const char *name )
{
return new KAddressBookTableView( core, parent, name );
}
- QString type() const { return I18N_NOOP( "Table" ); }
+ TQString type() const { return I18N_NOOP( "Table" ); }
- QString description() const { return i18n( "A listing of contacts in a table. Each cell of "
+ TQString description() const { return i18n( "A listing of contacts in a table. Each cell of "
"the table holds a field of the contact." ); }
- ViewConfigureWidget *configureWidget( KABC::AddressBook *ab, QWidget *parent,
+ ViewConfigureWidget *configureWidget( KABC::AddressBook *ab, TQWidget *parent,
const char *name = 0 )
{
return new ConfigureTableViewWidget( ab, parent, name );
@@ -86,10 +86,10 @@ extern "C" {
}
KAddressBookTableView::KAddressBookTableView( KAB::Core *core,
- QWidget *parent, const char *name )
+ TQWidget *parent, const char *name )
: KAddressBookView( core, parent, name )
{
- mMainLayout = new QVBoxLayout( viewWidget(), 2 );
+ mMainLayout = new TQVBoxLayout( viewWidget(), 2 );
// The list view will be created when the config is read.
mListView = 0;
@@ -103,16 +103,16 @@ KAddressBookTableView::~KAddressBookTableView()
void KAddressBookTableView::reconstructListView()
{
if ( mListView ) {
- disconnect( mListView, SIGNAL( selectionChanged() ),
- this, SLOT( addresseeSelected() ) );
- disconnect( mListView, SIGNAL( executed( QListViewItem* ) ),
- this, SLOT( addresseeExecuted( QListViewItem* ) ) );
- disconnect( mListView, SIGNAL( doubleClicked( QListViewItem* ) ),
- this, SLOT( addresseeExecuted( QListViewItem* ) ) );
- disconnect( mListView, SIGNAL( startAddresseeDrag() ),
- this, SIGNAL( startDrag() ) );
- disconnect( mListView, SIGNAL( addresseeDropped( QDropEvent* ) ),
- this, SIGNAL( dropped( QDropEvent* ) ) );
+ disconnect( mListView, TQT_SIGNAL( selectionChanged() ),
+ this, TQT_SLOT( addresseeSelected() ) );
+ disconnect( mListView, TQT_SIGNAL( executed( TQListViewItem* ) ),
+ this, TQT_SLOT( addresseeExecuted( TQListViewItem* ) ) );
+ disconnect( mListView, TQT_SIGNAL( doubleClicked( TQListViewItem* ) ),
+ this, TQT_SLOT( addresseeExecuted( TQListViewItem* ) ) );
+ disconnect( mListView, TQT_SIGNAL( startAddresseeDrag() ),
+ this, TQT_SIGNAL( startDrag() ) );
+ disconnect( mListView, TQT_SIGNAL( addresseeDropped( TQDropEvent* ) ),
+ this, TQT_SIGNAL( dropped( TQDropEvent* ) ) );
delete mListView;
}
@@ -127,7 +127,7 @@ void KAddressBookTableView::reconstructListView()
int c = 0;
for ( it = fieldList.begin(); it != fieldList.end(); ++it ) {
mListView->addColumn( (*it)->label() );
- mListView->setColumnWidthMode( c++, QListView::Manual );
+ mListView->setColumnWidthMode( c++, TQListView::Manual );
}
if ( mListView->showIM() ) {
@@ -141,23 +141,23 @@ void KAddressBookTableView::reconstructListView()
mListView->setFullWidth( true );
- connect( mListView, SIGNAL( selectionChanged() ),
- this, SLOT( addresseeSelected() ) );
- connect( mListView, SIGNAL( startAddresseeDrag() ),
- this, SIGNAL( startDrag() ) );
- connect( mListView, SIGNAL( addresseeDropped( QDropEvent* ) ),
- this, SIGNAL( dropped( QDropEvent* ) ) );
- connect( mListView, SIGNAL( contextMenu( KListView*, QListViewItem*, const QPoint& ) ),
- this, SLOT( rmbClicked( KListView*, QListViewItem*, const QPoint& ) ) );
- connect( mListView->header(), SIGNAL( clicked( int ) ),
- this, SIGNAL( sortFieldChanged() ) );
+ connect( mListView, TQT_SIGNAL( selectionChanged() ),
+ this, TQT_SLOT( addresseeSelected() ) );
+ connect( mListView, TQT_SIGNAL( startAddresseeDrag() ),
+ this, TQT_SIGNAL( startDrag() ) );
+ connect( mListView, TQT_SIGNAL( addresseeDropped( TQDropEvent* ) ),
+ this, TQT_SIGNAL( dropped( TQDropEvent* ) ) );
+ connect( mListView, TQT_SIGNAL( contextMenu( KListView*, TQListViewItem*, const TQPoint& ) ),
+ this, TQT_SLOT( rmbClicked( KListView*, TQListViewItem*, const TQPoint& ) ) );
+ connect( mListView->header(), TQT_SIGNAL( clicked( int ) ),
+ this, TQT_SIGNAL( sortFieldChanged() ) );
if ( KABPrefs::instance()->honorSingleClick() )
- connect( mListView, SIGNAL( executed( QListViewItem* ) ),
- this, SLOT( addresseeExecuted( QListViewItem* ) ) );
+ connect( mListView, TQT_SIGNAL( executed( TQListViewItem* ) ),
+ this, TQT_SLOT( addresseeExecuted( TQListViewItem* ) ) );
else
- connect( mListView, SIGNAL( doubleClicked( QListViewItem* ) ),
- this, SLOT( addresseeExecuted( QListViewItem* ) ) );
+ connect( mListView, TQT_SIGNAL( doubleClicked( TQListViewItem* ) ),
+ this, TQT_SLOT( addresseeExecuted( TQListViewItem* ) ) );
refresh();
@@ -187,13 +187,13 @@ void KAddressBookTableView::readConfig( KConfig *config )
if ( config->readBoolEntry( "InstantMessagingPresence", false ) ) {
if ( !mIMProxy ) {
mIMProxy = KIMProxy::instance( kapp->dcopClient() );
- connect( mIMProxy, SIGNAL( sigContactPresenceChanged( const QString& ) ),
- this, SLOT( updatePresence( const QString& ) ) );
+ connect( mIMProxy, TQT_SIGNAL( sigContactPresenceChanged( const TQString& ) ),
+ this, TQT_SLOT( updatePresence( const TQString& ) ) );
}
} else {
if ( mIMProxy ) {
- disconnect( mIMProxy, SIGNAL( sigContactPresenceChanged( const QString& ) ),
- this, SLOT( updatePresence( const QString& ) ) );
+ disconnect( mIMProxy, TQT_SIGNAL( sigContactPresenceChanged( const TQString& ) ),
+ this, TQT_SLOT( updatePresence( const TQString& ) ) );
mIMProxy = 0;
}
}
@@ -214,11 +214,11 @@ void KAddressBookTableView::readConfig( KConfig *config )
mListView->restoreLayout( config, config->group() );
}
-void KAddressBookTableView::refresh( const QString &uid )
+void KAddressBookTableView::refresh( const TQString &uid )
{
if ( uid.isEmpty() ) {
// Clear the list view
- QString currentUID, nextUID;
+ TQString currentUID, nextUID;
ContactListViewItem *currentItem = dynamic_cast<ContactListViewItem*>( mListView->currentItem() );
if ( currentItem ) {
ContactListViewItem *nextItem = dynamic_cast<ContactListViewItem*>( currentItem->itemBelow() );
@@ -253,8 +253,8 @@ void KAddressBookTableView::refresh( const QString &uid )
} else {
// Only need to update on entry. Iterate through and try to find it
ContactListViewItem *ceItem;
- QPtrList<QListViewItem> selectedItems( mListView->selectedItems() );
- QListViewItem *it;
+ TQPtrList<TQListViewItem> selectedItems( mListView->selectedItems() );
+ TQListViewItem *it;
for ( it = selectedItems.first(); it; it = selectedItems.next() ) {
ceItem = dynamic_cast<ContactListViewItem*>( it );
if ( ceItem && ceItem->addressee().uid() == uid ) {
@@ -262,16 +262,16 @@ void KAddressBookTableView::refresh( const QString &uid )
return;
}
}
- refresh( QString::null );
+ refresh( TQString::null );
}
}
-QStringList KAddressBookTableView::selectedUids()
+TQStringList KAddressBookTableView::selectedUids()
{
- QStringList uidList;
+ TQStringList uidList;
ContactListViewItem *item;
- QListViewItemIterator it( mListView, QListViewItemIterator::Selected );
+ TQListViewItemIterator it( mListView, TQListViewItemIterator::Selected );
while ( it.current() ) {
item = dynamic_cast<ContactListViewItem*>( it.current() );
if ( item )
@@ -283,12 +283,12 @@ QStringList KAddressBookTableView::selectedUids()
return uidList;
}
-void KAddressBookTableView::setSelected( const QString &uid, bool selected )
+void KAddressBookTableView::setSelected( const TQString &uid, bool selected )
{
if ( uid.isEmpty() )
mListView->selectAll( selected );
else {
- QListViewItemIterator it( mListView );
+ TQListViewItemIterator it( mListView );
while ( it.current() ) {
ContactListViewItem *item = dynamic_cast<ContactListViewItem*>( it.current() );
if ( item && (item->addressee().uid() == uid) ) {
@@ -314,12 +314,12 @@ void KAddressBookTableView::setFirstSelected( bool selected )
void KAddressBookTableView::addresseeSelected()
{
// We need to try to find the first selected item. This might not be the
- // last selected item, but when QListView is in multiselection mode,
+ // last selected item, but when TQListView is in multiselection mode,
// there is no way to figure out which one was
// selected last.
bool found =false;
- QListViewItemIterator it( mListView, QListViewItemIterator::Selected );
+ TQListViewItemIterator it( mListView, TQListViewItemIterator::Selected );
while ( it.current() && !found ) {
found = true;
ContactListViewItem *item = dynamic_cast<ContactListViewItem*>( it.current() );
@@ -330,10 +330,10 @@ void KAddressBookTableView::addresseeSelected()
}
if ( !found )
- emit selected( QString::null );
+ emit selected( TQString::null );
}
-void KAddressBookTableView::addresseeExecuted( QListViewItem *item )
+void KAddressBookTableView::addresseeExecuted( TQListViewItem *item )
{
if ( item ) {
ContactListViewItem *ceItem = dynamic_cast<ContactListViewItem*>( item );
@@ -341,21 +341,21 @@ void KAddressBookTableView::addresseeExecuted( QListViewItem *item )
if ( ceItem )
emit executed( ceItem->addressee().uid() );
else
- emit executed( QString::null );
+ emit executed( TQString::null );
} else {
- emit executed( QString::null );
+ emit executed( TQString::null );
}
}
-void KAddressBookTableView::rmbClicked( KListView*, QListViewItem*, const QPoint &point )
+void KAddressBookTableView::rmbClicked( KListView*, TQListViewItem*, const TQPoint &point )
{
popup( point );
}
-void KAddressBookTableView::updatePresence( const QString &uid )
+void KAddressBookTableView::updatePresence( const TQString &uid )
{
// find the LVI to update and refresh() it
- QListViewItem *item;
+ TQListViewItem *item;
ContactListViewItem *ceItem;
for ( item = mListView->firstChild(); item; item = item->itemBelow() ) {
ceItem = dynamic_cast<ContactListViewItem*>( item );
@@ -372,12 +372,12 @@ void KAddressBookTableView::updatePresence( const QString &uid )
void KAddressBookTableView::scrollUp()
{
- QApplication::postEvent( mListView, new QKeyEvent( QEvent::KeyPress, Qt::Key_Up, 0, 0 ) );
+ TQApplication::postEvent( mListView, new TQKeyEvent( TQEvent::KeyPress, Qt::Key_Up, 0, 0 ) );
}
void KAddressBookTableView::scrollDown()
{
- QApplication::postEvent( mListView, new QKeyEvent( QEvent::KeyPress, Qt::Key_Down, 0, 0 ) );
+ TQApplication::postEvent( mListView, new TQKeyEvent( TQEvent::KeyPress, Qt::Key_Down, 0, 0 ) );
}
diff --git a/kaddressbook/views/kaddressbooktableview.h b/kaddressbook/views/kaddressbooktableview.h
index 0d328ce86..ac0515e9e 100644
--- a/kaddressbook/views/kaddressbooktableview.h
+++ b/kaddressbook/views/kaddressbooktableview.h
@@ -28,13 +28,13 @@
#include <config.h>
#endif
-#include <qwidget.h>
-#include <qlistview.h>
-#include <qstring.h>
-#include <qdialog.h>
-#include <qtabdialog.h>
-#include <qstringlist.h>
-#include <qvaluelist.h>
+#include <tqwidget.h>
+#include <tqlistview.h>
+#include <tqstring.h>
+#include <tqdialog.h>
+#include <tqtabdialog.h>
+#include <tqstringlist.h>
+#include <tqvaluelist.h>
#include "kaddressbookview.h"
@@ -64,19 +64,19 @@ friend class ContactListView;
Q_OBJECT
public:
- KAddressBookTableView( KAB::Core *core, QWidget *parent,
+ KAddressBookTableView( KAB::Core *core, TQWidget *parent,
const char *name = 0 );
virtual ~KAddressBookTableView();
- virtual void refresh( const QString &uid = QString() );
- virtual QStringList selectedUids();
- virtual void setSelected( const QString &uid = QString(), bool selected = false );
+ virtual void refresh( const TQString &uid = TQString() );
+ virtual TQStringList selectedUids();
+ virtual void setSelected( const TQString &uid = TQString(), bool selected = false );
virtual void setFirstSelected( bool selected = true );
virtual KABC::Field *sortField() const;
virtual void readConfig( KConfig *config );
virtual void writeConfig( KConfig *config );
- virtual QString type() const { return "Table"; }
+ virtual TQString type() const { return "Table"; }
void scrollUp();
void scrollDown();
@@ -94,20 +94,20 @@ friend class ContactListView;
Called whenever the user executes an addressee. In terms of the
list view, this is probably a double click
*/
- void addresseeExecuted( QListViewItem* );
+ void addresseeExecuted( TQListViewItem* );
/**
RBM menu called.
*/
- void rmbClicked( KListView*, QListViewItem*, const QPoint& );
+ void rmbClicked( KListView*, TQListViewItem*, const TQPoint& );
/**
* Called to update the presence of a single item
*/
- void updatePresence( const QString &uid );
+ void updatePresence( const TQString &uid );
private:
- QVBoxLayout *mMainLayout;
+ TQVBoxLayout *mMainLayout;
ContactListView *mListView;
KIMProxy *mIMProxy;
};
diff --git a/kaddressbook/xxport/bookmark_xxport.cpp b/kaddressbook/xxport/bookmark_xxport.cpp
index 0a8d71bef..2cfdf98ca 100644
--- a/kaddressbook/xxport/bookmark_xxport.cpp
+++ b/kaddressbook/xxport/bookmark_xxport.cpp
@@ -33,15 +33,15 @@
K_EXPORT_KADDRESSBOOK_XXFILTER( libkaddrbk_bookmark_xxport, BookmarkXXPort )
-BookmarkXXPort::BookmarkXXPort( KABC::AddressBook *ab, QWidget *parent, const char *name )
+BookmarkXXPort::BookmarkXXPort( KABC::AddressBook *ab, TQWidget *parent, const char *name )
: KAB::XXPort( ab, parent, name )
{
createExportAction( i18n( "Export Bookmarks Menu..." ) );
}
-bool BookmarkXXPort::exportContacts( const KABC::AddresseeList &list, const QString& )
+bool BookmarkXXPort::exportContacts( const KABC::AddresseeList &list, const TQString& )
{
- QString fileName = locateLocal( "data", "kabc/bookmarks.xml" );
+ TQString fileName = locateLocal( "data", "kabc/bookmarks.xml" );
KBookmarkManager *mgr = KBookmarkManager::managerForFile( fileName );
KBookmarkDomBuilder *builder = new KBookmarkDomBuilder( mgr->root(), mgr );
@@ -51,8 +51,8 @@ bool BookmarkXXPort::exportContacts( const KABC::AddresseeList &list, const QStr
emit newFolder( i18n( "AddressBook" ), false, "" );
for ( it = list.begin(); it != list.end(); ++it ) {
if ( !(*it).url().isEmpty() ) {
- QString name = (*it).givenName() + " " + (*it).familyName();
- emit newBookmark( name, (*it).url().url().latin1(), QString( "" ) );
+ TQString name = (*it).givenName() + " " + (*it).familyName();
+ emit newBookmark( name, (*it).url().url().latin1(), TQString( "" ) );
}
}
emit endFolder();
diff --git a/kaddressbook/xxport/bookmark_xxport.h b/kaddressbook/xxport/bookmark_xxport.h
index 5cc186ed6..f12ed8e28 100644
--- a/kaddressbook/xxport/bookmark_xxport.h
+++ b/kaddressbook/xxport/bookmark_xxport.h
@@ -32,20 +32,20 @@ class BookmarkXXPort : public KAB::XXPort
Q_OBJECT
public:
- BookmarkXXPort( KABC::AddressBook *ab, QWidget *parent, const char *name = 0 );
+ BookmarkXXPort( KABC::AddressBook *ab, TQWidget *parent, const char *name = 0 );
- QString identifier() const { return "bookmark"; }
+ TQString identifier() const { return "bookmark"; }
public slots:
- bool exportContacts( const KABC::AddresseeList &list, const QString &data );
+ bool exportContacts( const KABC::AddresseeList &list, const TQString &data );
signals:
/**
The following signals are used for building a bookmarks file
using KBookmarkDomBuilder.
*/
- void newBookmark( const QString &text, const QCString &url, const QString &additionnalInfo );
- void newFolder( const QString &text, bool open, const QString &additionnalInfo );
+ void newBookmark( const TQString &text, const TQCString &url, const TQString &additionnalInfo );
+ void newFolder( const TQString &text, bool open, const TQString &additionnalInfo );
void newSeparator();
void endFolder();
};
diff --git a/kaddressbook/xxport/csv_xxport.cpp b/kaddressbook/xxport/csv_xxport.cpp
index 31611f390..fa4be2c9b 100644
--- a/kaddressbook/xxport/csv_xxport.cpp
+++ b/kaddressbook/xxport/csv_xxport.cpp
@@ -21,7 +21,7 @@
without including the source code for Qt in the source distribution.
*/
-#include <qfile.h>
+#include <tqfile.h>
#include <kfiledialog.h>
#include <kio/netaccess.h>
@@ -36,14 +36,14 @@
K_EXPORT_KADDRESSBOOK_XXFILTER( libkaddrbk_csv_xxport, CSVXXPort )
-CSVXXPort::CSVXXPort( KABC::AddressBook *ab, QWidget *parent, const char *name )
+CSVXXPort::CSVXXPort( KABC::AddressBook *ab, TQWidget *parent, const char *name )
: KAB::XXPort( ab, parent, name )
{
createImportAction( i18n( "Import CSV List..." ) );
createExportAction( i18n( "Export CSV List..." ) );
}
-bool CSVXXPort::exportContacts( const KABC::AddresseeList &list, const QString& )
+bool CSVXXPort::exportContacts( const KABC::AddresseeList &list, const TQString& )
{
KURL url = KFileDialog::getSaveURL( "addressbook.csv" );
if ( url.isEmpty() )
@@ -52,7 +52,7 @@ bool CSVXXPort::exportContacts( const KABC::AddresseeList &list, const QString&
if ( !url.isLocalFile() ) {
KTempFile tmpFile;
if ( tmpFile.status() != 0 ) {
- QString txt = i18n( "<qt>Unable to open file <b>%1</b>.%2.</qt>" );
+ TQString txt = i18n( "<qt>Unable to open file <b>%1</b>.%2.</qt>" );
KMessageBox::error( parentWidget(), txt.arg( url.url() )
.arg( strerror( tmpFile.status() ) ) );
return false;
@@ -63,9 +63,9 @@ bool CSVXXPort::exportContacts( const KABC::AddresseeList &list, const QString&
return KIO::NetAccess::upload( tmpFile.name(), url, parentWidget() );
} else {
- QFile file( url.path() );
+ TQFile file( url.path() );
if ( !file.open( IO_WriteOnly ) ) {
- QString txt = i18n( "<qt>Unable to open file <b>%1</b>.</qt>" );
+ TQString txt = i18n( "<qt>Unable to open file <b>%1</b>.</qt>" );
KMessageBox::error( parentWidget(), txt.arg( url.path() ) );
return false;
}
@@ -79,7 +79,7 @@ bool CSVXXPort::exportContacts( const KABC::AddresseeList &list, const QString&
}
}
-KABC::AddresseeList CSVXXPort::importContacts( const QString& ) const
+KABC::AddresseeList CSVXXPort::importContacts( const TQString& ) const
{
CSVImportDialog dlg( addressBook(), parentWidget() );
if ( dlg.exec() )
@@ -88,10 +88,10 @@ KABC::AddresseeList CSVXXPort::importContacts( const QString& ) const
return KABC::AddresseeList();
}
-void CSVXXPort::doExport( QFile *fp, const KABC::AddresseeList &list )
+void CSVXXPort::doExport( TQFile *fp, const KABC::AddresseeList &list )
{
- QTextStream t( fp );
- t.setEncoding( QTextStream::Locale );
+ TQTextStream t( fp );
+ t.setEncoding( TQTextStream::Locale );
KABC::AddresseeList::ConstIterator iter;
KABC::Field::List fields = addressBook()->fields();
diff --git a/kaddressbook/xxport/csv_xxport.h b/kaddressbook/xxport/csv_xxport.h
index 972f4cad4..b957299d4 100644
--- a/kaddressbook/xxport/csv_xxport.h
+++ b/kaddressbook/xxport/csv_xxport.h
@@ -31,16 +31,16 @@ class CSVXXPort : public KAB::XXPort
Q_OBJECT
public:
- CSVXXPort( KABC::AddressBook *ab, QWidget *parent, const char *name = 0 );
+ CSVXXPort( KABC::AddressBook *ab, TQWidget *parent, const char *name = 0 );
- QString identifier() const { return "csv"; }
+ TQString identifier() const { return "csv"; }
public slots:
- bool exportContacts( const KABC::AddresseeList &list, const QString &data );
- KABC::AddresseeList importContacts( const QString &data ) const;
+ bool exportContacts( const KABC::AddresseeList &list, const TQString &data );
+ KABC::AddresseeList importContacts( const TQString &data ) const;
private:
- void doExport( QFile *fp, const KABC::AddresseeList &list );
+ void doExport( TQFile *fp, const KABC::AddresseeList &list );
};
#endif
diff --git a/kaddressbook/xxport/csvimportdialog.cpp b/kaddressbook/xxport/csvimportdialog.cpp
index f89222aff..cfcac0fec 100644
--- a/kaddressbook/xxport/csvimportdialog.cpp
+++ b/kaddressbook/xxport/csvimportdialog.cpp
@@ -20,17 +20,17 @@
*/
-#include <qbuttongroup.h>
-#include <qcheckbox.h>
-#include <qcombobox.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qlineedit.h>
-#include <qpushbutton.h>
-#include <qradiobutton.h>
-#include <qtable.h>
-#include <qtextcodec.h>
-#include <qtooltip.h>
+#include <tqbuttongroup.h>
+#include <tqcheckbox.h>
+#include <tqcombobox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqlineedit.h>
+#include <tqpushbutton.h>
+#include <tqradiobutton.h>
+#include <tqtable.h>
+#include <tqtextcodec.h>
+#include <tqtooltip.h>
#include <kapplication.h>
#include <kdebug.h>
@@ -50,7 +50,7 @@
enum { Local = 0, Guess = 1, Latin1 = 2, Uni = 3, MSBug = 4, Codec = 5 };
-CSVImportDialog::CSVImportDialog( KABC::AddressBook *ab, QWidget *parent,
+CSVImportDialog::CSVImportDialog( KABC::AddressBook *ab, TQWidget *parent,
const char * name )
: KDialogBase( Plain, i18n ( "CSV Import Dialog" ), Ok | Cancel | User1 |
User2, Ok, parent, name, true, true ),
@@ -121,33 +121,33 @@ CSVImportDialog::CSVImportDialog( KABC::AddressBook *ab, QWidget *parent,
reloadCodecs();
- connect( mDelimiterBox, SIGNAL( clicked( int ) ),
- this, SLOT( delimiterClicked( int ) ) );
- connect( mDelimiterEdit, SIGNAL( returnPressed() ),
- this, SLOT( returnPressed() ) );
- connect( mDelimiterEdit, SIGNAL( textChanged ( const QString& ) ),
- this, SLOT( textChanged ( const QString& ) ) );
- connect( mComboLine, SIGNAL( activated( const QString& ) ),
- this, SLOT( lineSelected( const QString& ) ) );
- connect( mComboQuote, SIGNAL( activated( const QString& ) ),
- this, SLOT( textquoteSelected( const QString& ) ) );
- connect( mIgnoreDuplicates, SIGNAL( stateChanged( int ) ),
- this, SLOT( ignoreDuplicatesChanged( int ) ) );
- connect( mCodecCombo, SIGNAL( activated( const QString& ) ),
- this, SLOT( codecChanged() ) );
-
- connect( mUrlRequester, SIGNAL( returnPressed( const QString& ) ),
- this, SLOT( setFile( const QString& ) ) );
- connect( mUrlRequester, SIGNAL( urlSelected( const QString& ) ),
- this, SLOT( setFile( const QString& ) ) );
- connect( mUrlRequester->lineEdit(), SIGNAL( textChanged ( const QString& ) ),
- this, SLOT( urlChanged( const QString& ) ) );
-
- connect( this, SIGNAL( user1Clicked() ),
- this, SLOT( applyTemplate() ) );
-
- connect( this, SIGNAL( user2Clicked() ),
- this, SLOT( saveTemplate() ) );
+ connect( mDelimiterBox, TQT_SIGNAL( clicked( int ) ),
+ this, TQT_SLOT( delimiterClicked( int ) ) );
+ connect( mDelimiterEdit, TQT_SIGNAL( returnPressed() ),
+ this, TQT_SLOT( returnPressed() ) );
+ connect( mDelimiterEdit, TQT_SIGNAL( textChanged ( const TQString& ) ),
+ this, TQT_SLOT( textChanged ( const TQString& ) ) );
+ connect( mComboLine, TQT_SIGNAL( activated( const TQString& ) ),
+ this, TQT_SLOT( lineSelected( const TQString& ) ) );
+ connect( mComboQuote, TQT_SIGNAL( activated( const TQString& ) ),
+ this, TQT_SLOT( textquoteSelected( const TQString& ) ) );
+ connect( mIgnoreDuplicates, TQT_SIGNAL( stateChanged( int ) ),
+ this, TQT_SLOT( ignoreDuplicatesChanged( int ) ) );
+ connect( mCodecCombo, TQT_SIGNAL( activated( const TQString& ) ),
+ this, TQT_SLOT( codecChanged() ) );
+
+ connect( mUrlRequester, TQT_SIGNAL( returnPressed( const TQString& ) ),
+ this, TQT_SLOT( setFile( const TQString& ) ) );
+ connect( mUrlRequester, TQT_SIGNAL( urlSelected( const TQString& ) ),
+ this, TQT_SLOT( setFile( const TQString& ) ) );
+ connect( mUrlRequester->lineEdit(), TQT_SIGNAL( textChanged ( const TQString& ) ),
+ this, TQT_SLOT( urlChanged( const TQString& ) ) );
+
+ connect( this, TQT_SIGNAL( user1Clicked() ),
+ this, TQT_SLOT( applyTemplate() ) );
+
+ connect( this, TQT_SIGNAL( user2Clicked() ),
+ this, TQT_SLOT( saveTemplate() ) );
}
CSVImportDialog::~CSVImportDialog()
@@ -174,15 +174,15 @@ KABC::AddresseeList CSVImportDialog::contacts() const
KABC::Address addrHome( KABC::Address::Home );
KABC::Address addrWork( KABC::Address::Work );
for ( int col = 0; col < mTable->numCols(); ++col ) {
- QComboTableItem *item = static_cast<QComboTableItem*>( mTable->item( 0,
+ TQComboTableItem *item = static_cast<TQComboTableItem*>( mTable->item( 0,
col ) );
if ( !item ) {
kdError() << "ERROR: item cast failed" << endl;
continue;
}
- QString value = mTable->text( row, col );
- if ( 1 == row && static_cast<QTableItem *>(item)->text() == value )
+ TQString value = mTable->text( row, col );
+ if ( 1 == row && static_cast<TQTableItem *>(item)->text() == value )
// we are looking at a header row, stop now
break;
@@ -367,12 +367,12 @@ void CSVImportDialog::initGUI()
{
mPage = plainPage();
- QGridLayout *layout = new QGridLayout( mPage, 1, 1, marginHint(),
+ TQGridLayout *layout = new TQGridLayout( mPage, 1, 1, marginHint(),
spacingHint() );
- QHBoxLayout *hbox = new QHBoxLayout();
+ TQHBoxLayout *hbox = new TQHBoxLayout();
hbox->setSpacing( spacingHint() );
- QLabel *label = new QLabel( i18n( "File to import:" ), mPage );
+ TQLabel *label = new TQLabel( i18n( "File to import:" ), mPage );
hbox->addWidget( label );
mUrlRequester = new KURLRequester( mPage );
@@ -382,46 +382,46 @@ void CSVImportDialog::initGUI()
layout->addMultiCellLayout( hbox, 0, 0, 0, 4 );
// Delimiter: comma, semicolon, tab, space, other
- mDelimiterBox = new QButtonGroup( i18n( "Delimiter" ), mPage );
+ mDelimiterBox = new TQButtonGroup( i18n( "Delimiter" ), mPage );
mDelimiterBox->setColumnLayout( 0, Qt::Vertical );
mDelimiterBox->layout()->setSpacing( spacingHint() );
mDelimiterBox->layout()->setMargin( marginHint() );
- QGridLayout *delimiterLayout = new QGridLayout( mDelimiterBox->layout() );
+ TQGridLayout *delimiterLayout = new TQGridLayout( mDelimiterBox->layout() );
delimiterLayout->setAlignment( Qt::AlignTop );
layout->addMultiCellWidget( mDelimiterBox, 1, 4, 0, 0 );
- mRadioComma = new QRadioButton( i18n( "Comma" ), mDelimiterBox );
+ mRadioComma = new TQRadioButton( i18n( "Comma" ), mDelimiterBox );
mRadioComma->setChecked( true );
delimiterLayout->addWidget( mRadioComma, 0, 0 );
- mRadioSemicolon = new QRadioButton( i18n( "Semicolon" ), mDelimiterBox );
+ mRadioSemicolon = new TQRadioButton( i18n( "Semicolon" ), mDelimiterBox );
delimiterLayout->addWidget( mRadioSemicolon, 0, 1 );
- mRadioTab = new QRadioButton( i18n( "Tabulator" ), mDelimiterBox );
+ mRadioTab = new TQRadioButton( i18n( "Tabulator" ), mDelimiterBox );
delimiterLayout->addWidget( mRadioTab, 1, 0 );
- mRadioSpace = new QRadioButton( i18n( "Space" ), mDelimiterBox );
+ mRadioSpace = new TQRadioButton( i18n( "Space" ), mDelimiterBox );
delimiterLayout->addWidget( mRadioSpace, 1, 1 );
- mRadioOther = new QRadioButton( i18n( "Other" ), mDelimiterBox );
+ mRadioOther = new TQRadioButton( i18n( "Other" ), mDelimiterBox );
delimiterLayout->addWidget( mRadioOther, 0, 2 );
- mDelimiterEdit = new QLineEdit( mDelimiterBox );
+ mDelimiterEdit = new TQLineEdit( mDelimiterBox );
delimiterLayout->addWidget( mDelimiterEdit, 1, 2 );
- mComboLine = new QComboBox( false, mPage );
+ mComboLine = new TQComboBox( false, mPage );
mComboLine->insertItem( i18n( "1" ) );
layout->addWidget( mComboLine, 2, 3 );
- mComboQuote = new QComboBox( false, mPage );
+ mComboQuote = new TQComboBox( false, mPage );
mComboQuote->insertItem( i18n( "\"" ), 0 );
mComboQuote->insertItem( i18n( "'" ), 1 );
mComboQuote->insertItem( i18n( "None" ), 2 );
layout->addWidget( mComboQuote, 2, 2 );
- mDatePatternEdit = new QLineEdit( mPage );
+ mDatePatternEdit = new TQLineEdit( mPage );
mDatePatternEdit->setText( "Y-M-D" ); // ISO 8601 format as default
- QToolTip::add( mDatePatternEdit, i18n( "<ul><li>y: year with 2 digits</li>"
+ TQToolTip::add( mDatePatternEdit, i18n( "<ul><li>y: year with 2 digits</li>"
"<li>Y: year with 4 digits</li>"
"<li>m: month with 1 or 2 digits</li>"
"<li>M: month with 2 digits</li>"
@@ -429,24 +429,24 @@ void CSVImportDialog::initGUI()
"<li>D: day with 2 digits</li></ul>" ) );
layout->addWidget( mDatePatternEdit, 2, 4 );
- label = new QLabel( i18n( "Start at line:" ), mPage );
+ label = new TQLabel( i18n( "Start at line:" ), mPage );
layout->addWidget( label, 1, 3 );
- label = new QLabel( i18n( "Textquote:" ), mPage );
+ label = new TQLabel( i18n( "Textquote:" ), mPage );
layout->addWidget( label, 1, 2 );
- label = new QLabel( i18n( "Date format:" ), mPage );
+ label = new TQLabel( i18n( "Date format:" ), mPage );
layout->addWidget( label, 1, 4 );
- mIgnoreDuplicates = new QCheckBox( mPage );
+ mIgnoreDuplicates = new TQCheckBox( mPage );
mIgnoreDuplicates->setText( i18n( "Ignore duplicate delimiters" ) );
layout->addMultiCellWidget( mIgnoreDuplicates, 3, 3, 2, 4 );
- mCodecCombo = new QComboBox( mPage );
+ mCodecCombo = new TQComboBox( mPage );
layout->addMultiCellWidget( mCodecCombo, 4, 4, 2, 4 );
- mTable = new QTable( 0, 0, mPage );
- mTable->setSelectionMode( QTable::NoSelection );
+ mTable = new TQTable( 0, 0, mPage );
+ mTable->setSelectionMode( TQTable::NoSelection );
mTable->horizontalHeader()->hide();
layout->addMultiCellWidget( mTable, 5, 5, 0, 4 );
@@ -468,13 +468,13 @@ void CSVImportDialog::fillTable()
enum { S_START, S_QUOTED_FIELD, S_MAYBE_END_OF_QUOTED_FIELD, S_END_OF_QUOTED_FIELD,
S_MAYBE_NORMAL_FIELD, S_NORMAL_FIELD } state = S_START;
- QChar x;
- QString field;
+ TQChar x;
+ TQString field;
// store previous assignment
mTypeStore.clear();
for ( column = 0; column < mTable->numCols(); ++column ) {
- QComboTableItem *item = static_cast<QComboTableItem*>( mTable->item( 0,
+ TQComboTableItem *item = static_cast<TQComboTableItem*>( mTable->item( 0,
column ) );
if ( !item || mClearTypeStore )
mTypeStore.append( typeToPos( Undefined ) );
@@ -486,22 +486,22 @@ void CSVImportDialog::fillTable()
row = column = 1;
- QTextStream inputStream( mFileArray, IO_ReadOnly );
+ TQTextStream inputStream( mFileArray, IO_ReadOnly );
// find the current codec
int code = mCodecCombo->currentItem();
if ( code == Local )
- inputStream.setEncoding( QTextStream::Locale );
+ inputStream.setEncoding( TQTextStream::Locale );
else if ( code >= Codec )
inputStream.setCodec( mCodecs.at( code - Codec ) );
else if ( code == Uni )
- inputStream.setEncoding( QTextStream::Unicode );
+ inputStream.setEncoding( TQTextStream::Unicode );
else if ( code == MSBug )
- inputStream.setEncoding( QTextStream::UnicodeReverse );
+ inputStream.setEncoding( TQTextStream::UnicodeReverse );
else if ( code == Latin1 )
- inputStream.setEncoding( QTextStream::Latin1 );
+ inputStream.setEncoding( TQTextStream::Latin1 );
else if ( code == Guess ) {
- QTextCodec* codec = QTextCodec::codecForContent( mFileArray.data(), mFileArray.size() );
+ TQTextCodec* codec = TQTextCodec::codecForContent( mFileArray.data(), mFileArray.size() );
if ( codec ) {
KMessageBox::information( this, i18n( "Using codec '%1'" ).arg( codec->name() ), i18n( "Encoding" ) );
inputStream.setCodec( codec );
@@ -627,7 +627,7 @@ void CSVImportDialog::fillTable()
mTable->setNumCols( maxColumn );
for ( column = 0; column < mTable->numCols(); ++column ) {
- QComboTableItem *item = new QComboTableItem( mTable, mTypeMap.keys() );
+ TQComboTableItem *item = new TQComboTableItem( mTable, mTypeMap.keys() );
mTable->setItem( 0, column, item );
if ( column < (int)mTypeStore.count() )
item->setCurrentItem( mTypeStore[ column ] );
@@ -650,7 +650,7 @@ void CSVImportDialog::fillComboBox()
{
mComboLine->clear();
for ( int row = 1; row < mTable->numRows() + 1; ++row )
- mComboLine->insertItem( QString::number( row ), row - 1 );
+ mComboLine->insertItem( TQString::number( row ), row - 1 );
}
void CSVImportDialog::reloadCodecs()
@@ -659,11 +659,11 @@ void CSVImportDialog::reloadCodecs()
mCodecs.clear();
- QTextCodec *codec;
- for ( int i = 0; ( codec = QTextCodec::codecForIndex( i ) ); i++ )
+ TQTextCodec *codec;
+ for ( int i = 0; ( codec = TQTextCodec::codecForIndex( i ) ); i++ )
mCodecs.append( codec );
- mCodecCombo->insertItem( i18n( "Local (%1)" ).arg( QTextCodec::codecForLocale()->name() ), Local );
+ mCodecCombo->insertItem( i18n( "Local (%1)" ).arg( TQTextCodec::codecForLocale()->name() ), Local );
mCodecCombo->insertItem( i18n( "[guess]" ), Guess );
mCodecCombo->insertItem( i18n( "Latin1" ), Latin1 );
mCodecCombo->insertItem( i18n( "Unicode" ), Uni );
@@ -673,7 +673,7 @@ void CSVImportDialog::reloadCodecs()
mCodecCombo->insertItem( mCodecs.at( i )->name(), Codec + i );
}
-void CSVImportDialog::setText( int row, int col, const QString& text )
+void CSVImportDialog::setText( int row, int col, const TQString& text )
{
if ( row < 1 ) // skipped by the user
return;
@@ -702,10 +702,10 @@ void CSVImportDialog::adjustRows( int rows )
void CSVImportDialog::resizeColumns()
{
- QFontMetrics fm = fontMetrics();
+ TQFontMetrics fm = fontMetrics();
int width = 0;
- QMap<QString, uint>::ConstIterator it;
+ TQMap<TQString, uint>::ConstIterator it;
for ( it = mTypeMap.begin(); it != mTypeMap.end(); ++it ) {
width = QMAX( width, fm.width( it.key() ) );
}
@@ -723,7 +723,7 @@ void CSVImportDialog::returnPressed()
fillTable();
}
-void CSVImportDialog::textChanged ( const QString& )
+void CSVImportDialog::textChanged ( const TQString& )
{
mRadioOther->setChecked ( true );
delimiterClicked( 4 ); // other
@@ -752,7 +752,7 @@ void CSVImportDialog::delimiterClicked( int id )
fillTable();
}
-void CSVImportDialog::textquoteSelected( const QString& mark )
+void CSVImportDialog::textquoteSelected( const TQString& mark )
{
if ( mComboQuote->currentItem() == 2 )
mTextQuote = 0;
@@ -762,7 +762,7 @@ void CSVImportDialog::textquoteSelected( const QString& mark )
fillTable();
}
-void CSVImportDialog::lineSelected( const QString& line )
+void CSVImportDialog::lineSelected( const TQString& line )
{
mStartLine = line.toInt() - 1;
fillTable();
@@ -773,7 +773,7 @@ void CSVImportDialog::slotOk()
bool assigned = false;
for ( int column = 0; column < mTable->numCols(); ++column ) {
- QComboTableItem *item = static_cast<QComboTableItem*>( mTable->item( 0,
+ TQComboTableItem *item = static_cast<TQComboTableItem*>( mTable->item( 0,
column ) );
if ( item && posToType( item->currentItem() ) != Undefined )
assigned = true;
@@ -787,15 +787,15 @@ void CSVImportDialog::slotOk()
void CSVImportDialog::applyTemplate()
{
- QMap<uint,int> columnMap;
- QMap<QString, QString> fileMap;
- QStringList templates;
+ TQMap<uint,int> columnMap;
+ TQMap<TQString, TQString> fileMap;
+ TQStringList templates;
// load all template files
- QStringList list = KGlobal::dirs()->findAllResources( "data" , QString( kapp->name() ) +
+ TQStringList list = KGlobal::dirs()->findAllResources( "data" , TQString( kapp->name() ) +
"/csv-templates/*.desktop", true, true );
- for ( QStringList::iterator it = list.begin(); it != list.end(); ++it )
+ for ( TQStringList::iterator it = list.begin(); it != list.end(); ++it )
{
KSimpleConfig config( *it, true );
@@ -809,7 +809,7 @@ void CSVImportDialog::applyTemplate()
// let the user chose, what to take
bool ok = false;
- QString tmp;
+ TQString tmp;
tmp = KInputDialog::getItem( i18n( "Template Selection" ),
i18n( "Please select a template, that matches the CSV file:" ),
templates, 0, false, &ok, this );
@@ -831,14 +831,14 @@ void CSVImportDialog::applyTemplate()
// create the column map
config.setGroup( "csv column map" );
for ( uint i = 0; i < numColumns; ++i ) {
- int col = config.readNumEntry( QString::number( i ) );
+ int col = config.readNumEntry( TQString::number( i ) );
columnMap.insert( i, col );
}
// apply the column map
for ( uint column = 0; column < columnMap.count(); ++column ) {
int type = columnMap[ column ];
- QComboTableItem *item = static_cast<QComboTableItem*>( mTable->item( 0,
+ TQComboTableItem *item = static_cast<TQComboTableItem*>( mTable->item( 0,
column ) );
if ( item )
item->setCurrentItem( typeToPos( type ) );
@@ -847,8 +847,8 @@ void CSVImportDialog::applyTemplate()
void CSVImportDialog::saveTemplate()
{
- QString fileName = KFileDialog::getSaveFileName(
- locateLocal( "data", QString( kapp->name() ) + "/csv-templates/" ),
+ TQString fileName = KFileDialog::getSaveFileName(
+ locateLocal( "data", TQString( kapp->name() ) + "/csv-templates/" ),
"*.desktop", this );
if ( fileName.isEmpty() )
@@ -857,7 +857,7 @@ void CSVImportDialog::saveTemplate()
if ( !fileName.contains( ".desktop" ) )
fileName += ".desktop";
- QString name = KInputDialog::getText( i18n( "Template Name" ), i18n( "Please enter a name for the template:" ) );
+ TQString name = KInputDialog::getText( i18n( "Template Name" ), i18n( "Please enter a name for the template:" ) );
if ( name.isEmpty() )
return;
@@ -876,19 +876,19 @@ void CSVImportDialog::saveTemplate()
config.setGroup( "csv column map" );
for ( int column = 0; column < mTable->numCols(); ++column ) {
- QComboTableItem *item = static_cast<QComboTableItem*>( mTable->item( 0,
+ TQComboTableItem *item = static_cast<TQComboTableItem*>( mTable->item( 0,
column ) );
if ( item )
- config.writeEntry( QString::number( column ), posToType(
+ config.writeEntry( TQString::number( column ), posToType(
item->currentItem() ) );
else
- config.writeEntry( QString::number( column ), 0 );
+ config.writeEntry( TQString::number( column ), 0 );
}
config.sync();
}
-QString CSVImportDialog::getText( int row, int col )
+TQString CSVImportDialog::getText( int row, int col )
{
return mTable->text( row, col );
}
@@ -896,7 +896,7 @@ QString CSVImportDialog::getText( int row, int col )
uint CSVImportDialog::posToType( int pos ) const
{
uint counter = 0;
- QMap<QString, uint>::ConstIterator it;
+ TQMap<TQString, uint>::ConstIterator it;
for ( it = mTypeMap.begin(); it != mTypeMap.end(); ++it, ++counter )
if ( counter == (uint)pos )
return it.data();
@@ -907,7 +907,7 @@ uint CSVImportDialog::posToType( int pos ) const
int CSVImportDialog::typeToPos( uint type ) const
{
uint counter = 0;
- QMap<QString, uint>::ConstIterator it;
+ TQMap<TQString, uint>::ConstIterator it;
for ( it = mTypeMap.begin(); it != mTypeMap.end(); ++it, ++counter )
if ( it.data() == type )
return counter;
@@ -920,12 +920,12 @@ void CSVImportDialog::ignoreDuplicatesChanged( int )
fillTable();
}
-void CSVImportDialog::setFile( const QString &fileName )
+void CSVImportDialog::setFile( const TQString &fileName )
{
if ( fileName.isEmpty() )
return;
- QFile file( fileName );
+ TQFile file( fileName );
if ( !file.open( IO_ReadOnly ) ) {
KMessageBox::sorry( this, i18n( "Cannot open input file." ) );
file.close();
@@ -945,7 +945,7 @@ void CSVImportDialog::setFile( const QString &fileName )
fillComboBox();
}
-void CSVImportDialog::urlChanged( const QString &file )
+void CSVImportDialog::urlChanged( const TQString &file )
{
bool state = !file.isEmpty();
diff --git a/kaddressbook/xxport/csvimportdialog.h b/kaddressbook/xxport/csvimportdialog.h
index 8e9dd0710..a34f681e6 100644
--- a/kaddressbook/xxport/csvimportdialog.h
+++ b/kaddressbook/xxport/csvimportdialog.h
@@ -26,7 +26,7 @@
#include <kabc/addresseelist.h>
#include <kdialogbase.h>
-#include <qvaluelist.h>
+#include <tqvaluelist.h>
class KURLRequester;
@@ -43,7 +43,7 @@ class CSVImportDialog : public KDialogBase
Q_OBJECT
public:
- CSVImportDialog( KABC::AddressBook *ab, QWidget *parent,
+ CSVImportDialog( KABC::AddressBook *ab, TQWidget *parent,
const char *name = 0 );
~CSVImportDialog();
@@ -55,12 +55,12 @@ class CSVImportDialog : public KDialogBase
private slots:
void returnPressed();
void delimiterClicked( int id );
- void lineSelected( const QString& line );
- void textquoteSelected( const QString& mark );
- void textChanged ( const QString & );
+ void lineSelected( const TQString& line );
+ void textquoteSelected( const TQString& mark );
+ void textChanged ( const TQString & );
void ignoreDuplicatesChanged( int );
- void setFile( const QString& );
- void urlChanged( const QString& );
+ void setFile( const TQString& );
+ void urlChanged( const TQString& );
void codecChanged();
void applyTemplate();
@@ -78,47 +78,47 @@ class CSVImportDialog : public KDialogBase
Isdn, Pager, Email, Mailer, Title, Role, Organization, Note, URL
};
- QTable* mTable;
- QButtonGroup* mDelimiterBox;
- QRadioButton* mRadioComma;
- QRadioButton* mRadioSemicolon;
- QRadioButton* mRadioTab;
- QRadioButton* mRadioSpace;
- QRadioButton* mRadioOther;
- QLineEdit* mDelimiterEdit;
- QLineEdit* mDatePatternEdit;
- QComboBox* mComboLine;
- QComboBox* mComboQuote;
- QCheckBox* mIgnoreDuplicates;
- QComboBox* mCodecCombo;
- QWidget* mPage;
+ TQTable* mTable;
+ TQButtonGroup* mDelimiterBox;
+ TQRadioButton* mRadioComma;
+ TQRadioButton* mRadioSemicolon;
+ TQRadioButton* mRadioTab;
+ TQRadioButton* mRadioSpace;
+ TQRadioButton* mRadioOther;
+ TQLineEdit* mDelimiterEdit;
+ TQLineEdit* mDatePatternEdit;
+ TQComboBox* mComboLine;
+ TQComboBox* mComboQuote;
+ TQCheckBox* mIgnoreDuplicates;
+ TQComboBox* mCodecCombo;
+ TQWidget* mPage;
KURLRequester* mUrlRequester;
void initGUI();
void fillTable();
void clearTable();
void fillComboBox();
- void setText( int row, int col, const QString& text );
+ void setText( int row, int col, const TQString& text );
void adjustRows( int rows );
void resizeColumns();
- QString getText( int row, int col );
+ TQString getText( int row, int col );
uint posToType( int pos ) const;
int typeToPos( uint type ) const;
void reloadCodecs();
- QTextCodec *currentCodec();
- QPtrList<QTextCodec> mCodecs;
+ TQTextCodec *currentCodec();
+ TQPtrList<TQTextCodec> mCodecs;
bool mAdjustRows;
int mStartLine;
- QChar mTextQuote;
- QString mDelimiter;
- QByteArray mFileArray;
- QMap<QString, uint> mTypeMap;
+ TQChar mTextQuote;
+ TQString mDelimiter;
+ TQByteArray mFileArray;
+ TQMap<TQString, uint> mTypeMap;
KABC::AddressBook *mAddressBook;
int mCustomCounter;
bool mClearTypeStore;
- QValueList<int> mTypeStore;
+ TQValueList<int> mTypeStore;
};
#endif
diff --git a/kaddressbook/xxport/dateparser.cpp b/kaddressbook/xxport/dateparser.cpp
index ed485e0dd..2052407a6 100644
--- a/kaddressbook/xxport/dateparser.cpp
+++ b/kaddressbook/xxport/dateparser.cpp
@@ -21,11 +21,11 @@
without including the source code for Qt in the source distribution.
*/
-#include <qdatetime.h>
+#include <tqdatetime.h>
#include "dateparser.h"
-DateParser::DateParser( const QString &pattern )
+DateParser::DateParser( const TQString &pattern )
: mPattern( pattern )
{
}
@@ -34,7 +34,7 @@ DateParser::~DateParser()
{
}
-QDate DateParser::parse( const QString &dateStr ) const
+TQDate DateParser::parse( const TQString &dateStr ) const
{
int year, month, day;
year = month = day = 0;
@@ -46,13 +46,13 @@ QDate DateParser::parse( const QString &dateStr ) const
year = 1900 + dateStr.mid( currPos, 2 ).toInt();
currPos += 2;
} else
- return QDate();
+ return TQDate();
} else if ( mPattern[ i ] == 'Y' ) { // YYYY
if ( currPos + 3 < dateStr.length() ) {
year = dateStr.mid( currPos, 4 ).toInt();
currPos += 4;
} else
- return QDate();
+ return TQDate();
} else if ( mPattern[ i ] == 'm' ) { // M or MM
if ( currPos + 1 < dateStr.length() ) {
if ( dateStr[ currPos ].isDigit() ) {
@@ -71,13 +71,13 @@ QDate DateParser::parse( const QString &dateStr ) const
}
}
- return QDate();
+ return TQDate();
} else if ( mPattern[ i ] == 'M' ) { // 0M or MM
if ( currPos + 1 < dateStr.length() ) {
month = dateStr.mid( currPos, 2 ).toInt();
currPos += 2;
} else
- return QDate();
+ return TQDate();
} else if ( mPattern[ i ] == 'd' ) { // D or DD
if ( currPos + 1 < dateStr.length() ) {
if ( dateStr[ currPos ].isDigit() ) {
@@ -96,17 +96,17 @@ QDate DateParser::parse( const QString &dateStr ) const
}
}
- return QDate();
+ return TQDate();
} else if ( mPattern[ i ] == 'D' ) { // 0D or DD
if ( currPos + 1 < dateStr.length() ) {
day = dateStr.mid( currPos, 2 ).toInt();
currPos += 2;
} else
- return QDate();
+ return TQDate();
} else {
currPos++;
}
}
- return QDate( year, month, day );
+ return TQDate( year, month, day );
}
diff --git a/kaddressbook/xxport/dateparser.h b/kaddressbook/xxport/dateparser.h
index 93eb597da..3087d339a 100644
--- a/kaddressbook/xxport/dateparser.h
+++ b/kaddressbook/xxport/dateparser.h
@@ -24,7 +24,7 @@
#ifndef DATEPARSER_H
#define DATEPARSER_H
-#include <qstring.h>
+#include <tqstring.h>
/**
This class parses the date out of a given string with the
@@ -40,12 +40,12 @@
class DateParser
{
public:
- DateParser( const QString &pattern );
+ DateParser( const TQString &pattern );
~DateParser();
- QDate parse( const QString &dateStr ) const;
+ TQDate parse( const TQString &dateStr ) const;
private:
- QString mPattern;
+ TQString mPattern;
};
#endif
diff --git a/kaddressbook/xxport/eudora_xxport.cpp b/kaddressbook/xxport/eudora_xxport.cpp
index bb4ae373b..d31cd1115 100644
--- a/kaddressbook/xxport/eudora_xxport.cpp
+++ b/kaddressbook/xxport/eudora_xxport.cpp
@@ -21,7 +21,7 @@
without including the source code for Qt in the source distribution.
*/
-#include <qfile.h>
+#include <tqfile.h>
#include <kfiledialog.h>
#include <kio/netaccess.h>
@@ -38,25 +38,25 @@
K_EXPORT_KADDRESSBOOK_XXFILTER( libkaddrbk_eudora_xxport, EudoraXXPort )
-EudoraXXPort::EudoraXXPort( KABC::AddressBook *ab, QWidget *parent, const char *name )
+EudoraXXPort::EudoraXXPort( KABC::AddressBook *ab, TQWidget *parent, const char *name )
: KAB::XXPort( ab, parent, name )
{
createImportAction( i18n( "Import Eudora Addressbook..." ) );
}
-KABC::AddresseeList EudoraXXPort::importContacts( const QString& ) const
+KABC::AddresseeList EudoraXXPort::importContacts( const TQString& ) const
{
- QString fileName = KFileDialog::getOpenFileName( QDir::homeDirPath(),
+ TQString fileName = KFileDialog::getOpenFileName( TQDir::homeDirPath(),
"*.[tT][xX][tT]|" + i18n("Eudora Light Addressbook (*.txt)"), 0 );
if ( fileName.isEmpty() )
return KABC::AddresseeList();
- QFile file( fileName );
+ TQFile file( fileName );
if ( !file.open( IO_ReadOnly ) )
return KABC::AddresseeList();
- QString line;
- QTextStream stream( &file );
+ TQString line;
+ TQTextStream stream( &file );
KABC::Addressee *a = 0;
int bytesRead = 0;
@@ -65,7 +65,7 @@ KABC::AddresseeList EudoraXXPort::importContacts( const QString& ) const
while( !stream.eof() ) {
line = stream.readLine();
bytesRead += line.length();
- QString tmp;
+ TQString tmp;
if ( line.startsWith( "alias" ) ) {
if ( a ) { // Write it out
@@ -120,10 +120,10 @@ KABC::AddresseeList EudoraXXPort::importContacts( const QString& ) const
return list;
}
-QString EudoraXXPort::key( const QString& line) const
+TQString EudoraXXPort::key( const TQString& line) const
{
int e;
- QString result;
+ TQString result;
int b = line.find( '\"', 0 );
if ( b == -1 ) {
@@ -148,10 +148,10 @@ QString EudoraXXPort::key( const QString& line) const
return result;
}
-QString EudoraXXPort::email( const QString& line ) const
+TQString EudoraXXPort::email( const TQString& line ) const
{
int b;
- QString result;
+ TQString result;
b = line.findRev( '\"' );
if ( b == -1 ) {
b = line.findRev( ' ' );
@@ -163,10 +163,10 @@ QString EudoraXXPort::email( const QString& line ) const
return result;
}
-QString EudoraXXPort::comment( const QString& line ) const
+TQString EudoraXXPort::comment( const TQString& line ) const
{
int b;
- QString result;
+ TQString result;
uint i;
b = line.findRev( '>' );
if ( b == -1 ) {
@@ -184,24 +184,24 @@ QString EudoraXXPort::comment( const QString& line ) const
return result;
}
-QString EudoraXXPort::get( const QString& line, const QString& key ) const
+TQString EudoraXXPort::get( const TQString& line, const TQString& key ) const
{
- QString fd = "<" + key + ":";
+ TQString fd = "<" + key + ":";
int b, e;
uint i;
// Find formatted key, return on error
b = line.find( fd );
if ( b == -1 )
- return QString::null;
+ return TQString::null;
b += fd.length();
e = line.find( '>', b );
if ( e == -1 )
- return QString::null;
+ return TQString::null;
e--;
- QString result = line.mid( b, e - b + 1 );
+ TQString result = line.mid( b, e - b + 1 );
for ( i = 0; i < result.length(); i++ ) {
if ( result[ i ] == CTRL_C )
result[ i ] = '\n';
diff --git a/kaddressbook/xxport/eudora_xxport.h b/kaddressbook/xxport/eudora_xxport.h
index be1df8ead..0181aa318 100644
--- a/kaddressbook/xxport/eudora_xxport.h
+++ b/kaddressbook/xxport/eudora_xxport.h
@@ -31,19 +31,19 @@ class EudoraXXPort : public KAB::XXPort
Q_OBJECT
public:
- EudoraXXPort( KABC::AddressBook *ab, QWidget *parent, const char *name = 0 );
+ EudoraXXPort( KABC::AddressBook *ab, TQWidget *parent, const char *name = 0 );
- QString identifier() const { return "eudora"; }
+ TQString identifier() const { return "eudora"; }
public slots:
- KABC::AddresseeList importContacts( const QString &data ) const;
+ KABC::AddresseeList importContacts( const TQString &data ) const;
private:
- QString get( const QString& line, const QString& key ) const;
- QString comment( const QString& line ) const;
- QString email( const QString& line ) const;
- QString key( const QString& line ) const;
- int find( const QString& key ) const;
+ TQString get( const TQString& line, const TQString& key ) const;
+ TQString comment( const TQString& line ) const;
+ TQString email( const TQString& line ) const;
+ TQString key( const TQString& line ) const;
+ int find( const TQString& key ) const;
};
#endif
diff --git a/kaddressbook/xxport/gnokii_xxport.cpp b/kaddressbook/xxport/gnokii_xxport.cpp
index 60675384c..c6bd0917d 100644
--- a/kaddressbook/xxport/gnokii_xxport.cpp
+++ b/kaddressbook/xxport/gnokii_xxport.cpp
@@ -43,7 +43,7 @@ extern "C" {
#endif
#endif
-#include <qcursor.h>
+#include <tqcursor.h>
#include <kdebug.h>
#include <klocale.h>
@@ -63,12 +63,12 @@ extern "C" {
#define GNOKII_CHECK_ERROR(error) \
do { \
if (error) \
- kdError() << QString("ERROR %1: %2\n").arg(error).arg(gn_error_print(error));\
+ kdError() << TQString("ERROR %1: %2\n").arg(error).arg(gn_error_print(error));\
} while (0)
// Locale conversion routines:
// Gnokii uses the local 8 Bit encoding (based on LC_ALL), kaddressbook uses Unicode
-#define GN_FROM(x) QString::fromLocal8Bit(x)
+#define GN_FROM(x) TQString::fromLocal8Bit(x)
#define GN_TO(x) (x).local8Bit()
// static variables for GUI updates
@@ -77,7 +77,7 @@ static KProgressDialog *m_progressDlg;
K_EXPORT_KADDRESSBOOK_XXFILTER( libkaddrbk_gnokii_xxport, GNOKIIXXPort )
-GNOKIIXXPort::GNOKIIXXPort( KABC::AddressBook *ab, QWidget *parent, const char *name )
+GNOKIIXXPort::GNOKIIXXPort( KABC::AddressBook *ab, TQWidget *parent, const char *name )
: KAB::XXPort( ab, parent, name )
{
this_filter = this;
@@ -88,11 +88,11 @@ GNOKIIXXPort::GNOKIIXXPort( KABC::AddressBook *ab, QWidget *parent, const char *
#ifdef HAVE_GNOKII_H
-static QString makeValidPhone( const QString &number )
+static TQString makeValidPhone( const TQString &number )
{
// allowed chars: 0-9, *, #, p, w, +
- QString num = number.simplifyWhiteSpace();
- QString allowed("0123456789*+#pw");
+ TQString num = number.simplifyWhiteSpace();
+ TQString allowed("0123456789*+#pw");
for (unsigned int i=num.length(); i>=1; i--)
if (allowed.find(num[i-1])==-1)
num.remove(i-1,1);
@@ -122,12 +122,12 @@ static void busterminate(void)
gn_lib_library_free();
}
-static QString businit(void)
+static TQString businit(void)
{
GNOKII_DEBUG( "Using new gnokii version." );
- GNOKII_DEBUG( QString("Compiled with libgnokii version 0x%1\n").arg(QString::number(LIBGNOKII_VERSION,16)) );
- GNOKII_DEBUG( QString("Using libgnokii runtime version 0x%1\n").arg(QString::number(gn_lib_version(),16)) );
+ GNOKII_DEBUG( TQString("Compiled with libgnokii version 0x%1\n").arg(TQString::number(LIBGNOKII_VERSION,16)) );
+ GNOKII_DEBUG( TQString("Using libgnokii runtime version 0x%1\n").arg(TQString::number(gn_lib_version(),16)) );
gn_error error = gn_lib_phoneprofile_load(NULL, &state);
if (error)
@@ -151,10 +151,10 @@ static QString businit(void)
revision = gn_lib_get_phone_revision(state);
imei = gn_lib_get_phone_imei(state);
- GNOKII_DEBUG( QString("Found mobile phone: %1 %2, Revision: %3, IMEI: %4\n")
+ GNOKII_DEBUG( TQString("Found mobile phone: %1 %2, Revision: %3, IMEI: %4\n")
.arg(manufacturer, model, revision, imei) );
- return QString::null;
+ return TQString::null;
}
@@ -165,17 +165,17 @@ static gn_error read_phone_memstat( const gn_memory_type memtype, gn_memory_stat
error = gn_lib_addressbook_memstat(state, memtype, &memstat->used, &memstat->free);
- GNOKII_DEBUG( QString("\n\nMobile phone memory status: Type: %1, used=%2, free=%3, total=%4\n\n")
+ GNOKII_DEBUG( TQString("\n\nMobile phone memory status: Type: %1, used=%2, free=%3, total=%4\n\n")
.arg(memtype).arg(memstat->used).arg(memstat->free).arg(memstat->used+memstat->free) );
return error;
}
-static QString buildPhoneInfoString( const gn_memory_status &memstat )
+static TQString buildPhoneInfoString( const gn_memory_status &memstat )
{
- QString format = QString::fromLatin1("<tr><td><b>%1</b></td><td>%2</td></tr>");
+ TQString format = TQString::fromLatin1("<tr><td><b>%1</b></td><td>%2</td></tr>");
- return QString::fromLatin1("<b>%1</b><br><table>%2%3%4%5%6</table><br>")
+ return TQString::fromLatin1("<b>%1</b><br><table>%2%3%4%5%6</table><br>")
.arg(i18n("Mobile Phone information:"))
.arg(format.arg(i18n("Manufacturer")).arg(GN_FROM(manufacturer)))
.arg(format.arg(i18n("Phone model")).arg(GN_FROM(model)))
@@ -203,9 +203,9 @@ static gn_error read_phone_entries( const char *memtypestr, gn_memory_type memty
gn_memory_status memstat;
error = read_phone_memstat(memtype, &memstat);
- QStringList addrlist;
+ TQStringList addrlist;
KABC::Address *addr;
- QString s, country;
+ TQString s, country;
progress->setTotalSteps(memstat.used);
m_progressDlg->setLabel(i18n("<qt>Importing <b>%1</b> contacts from <b>%2</b> of the Mobile Phone.<br><br>%3</qt>")
@@ -233,7 +233,7 @@ static gn_error read_phone_entries( const char *memtypestr, gn_memory_type memty
const char *name = gn_lib_get_pb_name(state);
const char *number = gn_lib_get_pb_number(state);
- GNOKII_DEBUG(QString("%1: %2, num=%3, location=%4, group=%5, count=%6\n").arg(i)
+ GNOKII_DEBUG(TQString("%1: %2, num=%3, location=%4, group=%5, count=%6\n").arg(i)
.arg(GN_FROM(name)).arg(GN_FROM(number))
.arg(gn_lib_get_pb_location(state)).arg(gn_lib_get_pb_caller_group(state))
.arg(subentries_count));
@@ -244,7 +244,7 @@ static gn_error read_phone_entries( const char *memtypestr, gn_memory_type memty
a->setFormattedName(s); // set formatted name as in Phone
if (s.find(',') == -1) {
// assumed format: "givenname [... familyname]"
- addrlist = QStringList::split(' ', s);
+ addrlist = TQStringList::split(' ', s);
if (addrlist.count() == 1) {
// only one string -> put it in the GivenName
a->setGivenName(s);
@@ -256,27 +256,27 @@ static gn_error read_phone_entries( const char *memtypestr, gn_memory_type memty
}
} else {
// assumed format: "familyname, ... givenname"
- addrlist = QStringList::split(',', s);
+ addrlist = TQStringList::split(',', s);
a->setFamilyName(addrlist.first().simplifyWhiteSpace());
addrlist.remove(addrlist.first());
a->setGivenName(addrlist.join(" ").simplifyWhiteSpace());
}
a->insertCustom(APP, "X_GSM_CALLERGROUP", s.setNum(gn_lib_get_pb_caller_group(state)));
- a->insertCustom(APP, "X_GSM_STORE_AT", QString("%1%2").arg(memtypestr).arg(gn_lib_get_pb_location(state)));
+ a->insertCustom(APP, "X_GSM_STORE_AT", TQString("%1%2").arg(memtypestr).arg(gn_lib_get_pb_location(state)));
// set ProductId
- a->setProductId(QString("%1-%2-%3-%4").arg(APP).arg(model).arg(revision).arg(imei));
+ a->setProductId(TQString("%1-%2-%3-%4").arg(APP).arg(model).arg(revision).arg(imei));
// evaluate timestamp (ignore timezone)
- QDateTime datetime;
+ TQDateTime datetime;
gn_timestamp ts = gn_lib_get_pb_date(state);
if (ts.year<1998)
- datetime = QDateTime::currentDateTime();
+ datetime = TQDateTime::currentDateTime();
else
- datetime = QDateTime( QDate(ts.year, ts.month, ts.day),
- QTime(ts.hour, ts.minute, ts.second) );
- GNOKII_DEBUG(QString(" date=%1\n").arg(datetime.toString()));
+ datetime = TQDateTime( TQDate(ts.year, ts.month, ts.day),
+ TQTime(ts.hour, ts.minute, ts.second) );
+ GNOKII_DEBUG(TQString(" date=%1\n").arg(datetime.toString()));
a->setRevision(datetime);
if (!subentries_count)
@@ -293,8 +293,8 @@ static gn_error read_phone_entries( const char *memtypestr, gn_memory_type memty
error = gn_lib_get_pb_subentry(state, n, &entry_type, &number_type, &number);
GNOKII_CHECK_ERROR(error);
- QString s = GN_FROM(number).simplifyWhiteSpace();
- GNOKII_DEBUG(QString(" Subentry#%1, entry_type=%2, number_type=%3, number=%4\n")
+ TQString s = GN_FROM(number).simplifyWhiteSpace();
+ GNOKII_DEBUG(TQString(" Subentry#%1, entry_type=%2, number_type=%3, number=%4\n")
.arg(n).arg(entry_type).arg(number_type).arg(s));
if (s.isEmpty())
continue;
@@ -306,10 +306,10 @@ static gn_error read_phone_entries( const char *memtypestr, gn_memory_type memty
a->insertEmail(s);
break;
case GN_PHONEBOOK_ENTRY_Postal:
- addrlist = QStringList::split(';', s, true);
+ addrlist = TQStringList::split(';', s, true);
addr = new KABC::Address(KABC::Address::Work);
if (addrlist.count() <= 1) {
- addrlist = QStringList::split(',', s, true);
+ addrlist = TQStringList::split(',', s, true);
if (addrlist.count() > 1 ) {
// assumed format: "Locality, ZIP, Country"
addr->setLocality(addrlist[0]);
@@ -361,7 +361,7 @@ static gn_error read_phone_entries( const char *memtypestr, gn_memory_type memty
a->insertCategory(s);
break;
default:
- GNOKII_DEBUG(QString(" Not handled id=%1, entry=%2\n")
+ GNOKII_DEBUG(TQString(" Not handled id=%1, entry=%2\n")
.arg(entry_type).arg(s));
break;
} // switch()
@@ -390,7 +390,7 @@ static gn_error read_phone_entries( const char *memtypestr, gn_memory_type memty
static gn_error xxport_phone_write_entry( int phone_location, gn_memory_type memtype,
const KABC::Addressee *addr)
{
- QString s;
+ TQString s;
/* initialize the phonebook entry values to zero */
gn_lib_phonebook_prepare_write_entry(state);
@@ -410,22 +410,22 @@ static gn_error xxport_phone_write_entry( int phone_location, gn_memory_type mem
s = makeValidPhone(s);
gn_lib_set_pb_number(state, s.ascii());
gn_lib_set_pb_memtype(state, memtype);
- QString cg = addr->custom(APP, "X_GSM_CALLERGROUP");
+ TQString cg = addr->custom(APP, "X_GSM_CALLERGROUP");
if (cg.isEmpty())
gn_lib_set_pb_caller_group(state, GN_PHONEBOOK_GROUP_None); // default group
else
gn_lib_set_pb_caller_group(state, (gn_phonebook_group_type) cg.toInt());
// set date/revision
- QDateTime datetime = addr->revision();
- QDate date(datetime.date());
- QTime time(datetime.time());
+ TQDateTime datetime = addr->revision();
+ TQDate date(datetime.date());
+ TQTime time(datetime.time());
gn_timestamp ts;
gn_timestamp_set( &ts, date.year(), date.month(), date.day(),
time.hour(), time.minute(), time.second(), 0 );
gn_lib_set_pb_date(state, ts);
- GNOKII_DEBUG(QString("Write #%1: name=%2, number=%3\n").arg(phone_location)
+ GNOKII_DEBUG(TQString("Write #%1: name=%2, number=%3\n").arg(phone_location)
.arg(GN_FROM(gn_lib_get_pb_name(state))).arg(GN_FROM(gn_lib_get_pb_number(state))));
const KABC::Address homeAddr = addr->address(KABC::Address::Home);
@@ -460,13 +460,13 @@ static gn_error xxport_phone_write_entry( int phone_location, gn_memory_type mem
GN_PHONEBOOK_ENTRY_URL, GN_PHONEBOOK_NUMBER_General, GN_TO(s));
}
// add E-Mails
- QStringList emails = addr->emails();
+ TQStringList emails = addr->emails();
for (unsigned int n=0; n<emails.count(); n++) {
s = emails[n].simplifyWhiteSpace();
if (s.isEmpty()) continue;
// only one email allowed if we have URLS, notes, addresses (to avoid phone limitations)
if (n && !addr->url().isEmpty() && !addr->note().isEmpty() && addr->addresses().count()) {
- GNOKII_DEBUG(QString(" DROPPED email %1 in favor of URLs, notes and addresses.\n")
+ GNOKII_DEBUG(TQString(" DROPPED email %1 in favor of URLs, notes and addresses.\n")
.arg(s));
continue;
}
@@ -479,9 +479,9 @@ static gn_error xxport_phone_write_entry( int phone_location, gn_memory_type mem
for ( it2 = addresses.begin(); it2 != addresses.end(); ++it2 ) {
const KABC::Address *Addr = &(*it2);
if (Addr->isEmpty()) continue;
- QStringList a;
- QChar sem(';');
- QString sem_repl(QString::fromLatin1(","));
+ TQStringList a;
+ TQChar sem(';');
+ TQString sem_repl(TQString::fromLatin1(","));
a.append( Addr->postOfficeBox().replace( sem, sem_repl ) );
a.append( Addr->extended() .replace( sem, sem_repl ) );
a.append( Addr->street() .replace( sem, sem_repl ) );
@@ -506,7 +506,7 @@ static gn_error xxport_phone_write_entry( int phone_location, gn_memory_type mem
gn_phonebook_number_type number_type;
const char *number;
gn_lib_get_pb_subentry(state, st, &entry_type, &number_type, &number);
- GNOKII_DEBUG(QString(" SubTel #%1: entry_type=%2, number_type=%3, number=%4\n")
+ GNOKII_DEBUG(TQString(" SubTel #%1: entry_type=%2, number_type=%3, number=%4\n")
.arg(st).arg(entry_type)
.arg(number_type).arg(GN_FROM(number)));
}
@@ -524,7 +524,7 @@ static gn_error xxport_phone_delete_entry( int phone_location, gn_memory_type me
}
-KABC::AddresseeList GNOKIIXXPort::importContacts( const QString& ) const
+KABC::AddresseeList GNOKIIXXPort::importContacts( const TQString& ) const
{
KABC::AddresseeList addrList;
@@ -544,14 +544,14 @@ KABC::AddresseeList GNOKIIXXPort::importContacts( const QString& ) const
m_progressDlg->progressBar()->setProgress(0);
m_progressDlg->progressBar()->setCenterIndicator(true);
m_progressDlg->setModal(true);
- m_progressDlg->setInitialSize(QSize(450,350));
+ m_progressDlg->setInitialSize(TQSize(450,350));
m_progressDlg->show();
processEvents();
#if (QT_VERSION >= 0x030300)
m_progressDlg->setCursor( Qt::BusyCursor );
#endif
- QString errStr = businit();
+ TQString errStr = businit();
m_progressDlg->unsetCursor();
if (!errStr.isEmpty()) {
@@ -575,7 +575,7 @@ KABC::AddresseeList GNOKIIXXPort::importContacts( const QString& ) const
}
-bool GNOKIIXXPort::exportContacts( const KABC::AddresseeList &list, const QString & )
+bool GNOKIIXXPort::exportContacts( const KABC::AddresseeList &list, const TQString & )
{
if (KMessageBox::Continue != KMessageBox::warningContinueCancel(parentWidget(),
i18n("<qt>Please connect your Mobile Phone to your computer and press "
@@ -593,14 +593,14 @@ bool GNOKIIXXPort::exportContacts( const KABC::AddresseeList &list, const QStrin
m_progressDlg->progressBar()->setProgress(0);
m_progressDlg->progressBar()->setCenterIndicator(true);
m_progressDlg->setModal(true);
- m_progressDlg->setInitialSize(QSize(450,350));
+ m_progressDlg->setInitialSize(TQSize(450,350));
m_progressDlg->show();
processEvents();
KProgress* progress = (KProgress*)m_progressDlg->progressBar();
KABC::AddresseeList::ConstIterator it;
- QStringList failedList;
+ TQStringList failedList;
gn_error error;
bool deleteLabelInitialized = false;
@@ -608,7 +608,7 @@ bool GNOKIIXXPort::exportContacts( const KABC::AddresseeList &list, const QStrin
#if (QT_VERSION >= 0x030300)
m_progressDlg->setCursor( Qt::BusyCursor );
#endif
- QString errStr = businit();
+ TQString errStr = businit();
m_progressDlg->unsetCursor();
if (!errStr.isEmpty()) {
@@ -685,7 +685,7 @@ try_next_phone_entry:
if (phone_entry_no > (memstat.used + memstat.free))
break;
- GNOKII_DEBUG(QString("Try to write entry '%1' at phone_entry_no=%2, phone_count=%3\n")
+ GNOKII_DEBUG(TQString("Try to write entry '%1' at phone_entry_no=%2, phone_count=%3\n")
.arg(addr->realName()).arg(phone_entry_no).arg(phone_count));
error = GN_ERR_NONE;
@@ -759,7 +759,7 @@ finish:
delete m_progressDlg;
if (!failedList.isEmpty()) {
- GNOKII_DEBUG(QString("Failed to export: %1\n").arg(failedList.join(", ")));
+ GNOKII_DEBUG(TQString("Failed to export: %1\n").arg(failedList.join(", ")));
KMessageBox::informationList(parentWidget(),
i18n("<qt>The following contacts could not be exported to the Mobile Phone. "
"Possible Reasons for this problem could be:<br><ul>"
@@ -797,7 +797,7 @@ finish:
static char *lockfile = NULL;
static char manufacturer[64], model[GN_MODEL_MAX_LENGTH+1],
revision[GN_REVISION_MAX_LENGTH+1], imei[GN_IMEI_MAX_LENGTH+1];
-static QString PhoneProductId;
+static TQString PhoneProductId;
static struct gn_statemachine state;
static gn_data data;
@@ -808,7 +808,7 @@ static void busterminate(void)
if (lockfile) gn_device_unlock(lockfile);
}
-static QString businit(void)
+static TQString businit(void)
{
gn_error error;
char *aux;
@@ -865,24 +865,24 @@ static QString businit(void)
data.revision = revision;
data.imei = imei;
- QCString unknown(GN_TO(i18n("Unknown")));
+ TQCString unknown(GN_TO(i18n("Unknown")));
qstrncpy(manufacturer, unknown, sizeof(manufacturer)-1);
qstrncpy(model, unknown, sizeof(model)-1);
qstrncpy(revision, unknown, sizeof(revision)-1);
qstrncpy(imei, unknown, sizeof(imei)-1);
if (m_progressDlg->wasCancelled())
- return QString::null;
+ return TQString::null;
else
error = gn_sm_functions(GN_OP_Identify, &data, &state);
GNOKII_CHECK_ERROR(error);
- GNOKII_DEBUG( QString("Found mobile phone: %1 %2, Revision: %3, IMEI: %4\n")
+ GNOKII_DEBUG( TQString("Found mobile phone: %1 %2, Revision: %3, IMEI: %4\n")
.arg(manufacturer, model, revision, imei) );
- PhoneProductId = QString("%1-%2-%3-%4").arg(APP).arg(model).arg(revision).arg(imei);
+ PhoneProductId = TQString("%1-%2-%3-%4").arg(APP).arg(model).arg(revision).arg(imei);
- return QString::null;
+ return TQString::null;
}
@@ -911,7 +911,7 @@ static gn_error read_phone_memstat( const gn_memory_type memtype, gn_memory_stat
break;
}
}
- GNOKII_DEBUG( QString("\n\nMobile phone memory status: Type: %1, used=%2, free=%3, total=%4\n\n")
+ GNOKII_DEBUG( TQString("\n\nMobile phone memory status: Type: %1, used=%2, free=%3, total=%4\n\n")
.arg(memtype).arg(memstat->used).arg(memstat->free).arg(memstat->used+memstat->free) );
return error;
}
@@ -945,11 +945,11 @@ static bool phone_entry_empty( const int index, const gn_memory_type memtype )
return false;
}
-static QString buildPhoneInfoString( const gn_memory_status &memstat )
+static TQString buildPhoneInfoString( const gn_memory_status &memstat )
{
- QString format = QString::fromLatin1("<tr><td><b>%1</b></td><td>%2</td></tr>");
+ TQString format = TQString::fromLatin1("<tr><td><b>%1</b></td><td>%2</td></tr>");
- return QString::fromLatin1("<b>%1</b><br><table>%2%3%4%5%6</table><br>")
+ return TQString::fromLatin1("<b>%1</b><br><table>%2%3%4%5%6</table><br>")
.arg(i18n("Mobile Phone information:"))
.arg(format.arg(i18n("Manufacturer")).arg(GN_FROM(manufacturer)))
.arg(format.arg(i18n("Phone model")).arg(GN_FROM(model)))
@@ -959,7 +959,7 @@ static QString buildPhoneInfoString( const gn_memory_status &memstat )
.arg(i18n("%1 out of %2 contacts used").arg(memstat.used).arg(memstat.used+memstat.free)));
}
-static QString buildMemoryTypeString( gn_memory_type memtype )
+static TQString buildMemoryTypeString( gn_memory_type memtype )
{
switch (memtype) {
case GN_MT_ME: return i18n("internal memory");
@@ -987,9 +987,9 @@ static gn_error read_phone_entries( const char *memtypestr, gn_memory_type memty
error = read_phone_memstat(memtype, &memstat);
gn_phonebook_entry entry;
- QStringList addrlist;
+ TQStringList addrlist;
KABC::Address *addr;
- QString s, country;
+ TQString s, country;
progress->setTotalSteps(memstat.used);
m_progressDlg->setLabel(i18n("<qt>Importing <b>%1</b> contacts from <b>%2</b> of the Mobile Phone.<br><br>%3</qt>")
@@ -1012,7 +1012,7 @@ static gn_error read_phone_entries( const char *memtypestr, gn_memory_type memty
if (error == GN_ERR_INVALIDMEMORYTYPE)
break;
if (error == GN_ERR_NONE) {
- GNOKII_DEBUG(QString("%1: %2, num=%3, location=%4, group=%5, count=%6\n").arg(i).arg(GN_FROM(entry.name))
+ GNOKII_DEBUG(TQString("%1: %2, num=%3, location=%4, group=%5, count=%6\n").arg(i).arg(GN_FROM(entry.name))
.arg(GN_FROM(entry.number)).arg(entry.location).arg(entry.caller_group).arg(entry.subentries_count));
KABC::Addressee *a = new KABC::Addressee();
@@ -1021,7 +1021,7 @@ static gn_error read_phone_entries( const char *memtypestr, gn_memory_type memty
a->setFormattedName(s); // set formatted name as in Phone
if (s.find(',') == -1) {
// assumed format: "givenname [... familyname]"
- addrlist = QStringList::split(' ', s);
+ addrlist = TQStringList::split(' ', s);
if (addrlist.count() == 1) {
// only one string -> put it in the GivenName
a->setGivenName(s);
@@ -1033,26 +1033,26 @@ static gn_error read_phone_entries( const char *memtypestr, gn_memory_type memty
}
} else {
// assumed format: "familyname, ... givenname"
- addrlist = QStringList::split(',', s);
+ addrlist = TQStringList::split(',', s);
a->setFamilyName(addrlist.first().simplifyWhiteSpace());
addrlist.remove(addrlist.first());
a->setGivenName(addrlist.join(" ").simplifyWhiteSpace());
}
a->insertCustom(APP, "X_GSM_CALLERGROUP", s.setNum(entry.caller_group));
- a->insertCustom(APP, "X_GSM_STORE_AT", QString("%1%2").arg(memtypestr).arg(entry.location));
+ a->insertCustom(APP, "X_GSM_STORE_AT", TQString("%1%2").arg(memtypestr).arg(entry.location));
// set ProductId
a->setProductId(PhoneProductId);
// evaluate timestamp (ignore timezone)
- QDateTime datetime;
+ TQDateTime datetime;
if (entry.date.year<1998)
- datetime = QDateTime::currentDateTime();
+ datetime = TQDateTime::currentDateTime();
else
- datetime = QDateTime( QDate(entry.date.year, entry.date.month, entry.date.day),
- QTime(entry.date.hour, entry.date.minute, entry.date.second) );
- GNOKII_DEBUG(QString(" date=%1\n").arg(datetime.toString()));
+ datetime = TQDateTime( TQDate(entry.date.year, entry.date.month, entry.date.day),
+ TQTime(entry.date.hour, entry.date.minute, entry.date.second) );
+ GNOKII_DEBUG(TQString(" date=%1\n").arg(datetime.toString()));
a->setRevision(datetime);
if (!entry.subentries_count)
@@ -1061,8 +1061,8 @@ static gn_error read_phone_entries( const char *memtypestr, gn_memory_type memty
/* scan sub-entries */
if (entry.subentries_count)
for (int n=0; n<entry.subentries_count; n++) {
- QString s = GN_FROM(entry.subentries[n].data.number).simplifyWhiteSpace();
- GNOKII_DEBUG(QString(" Subentry#%1, entry_type=%2, number_type=%3, number=%4\n")
+ TQString s = GN_FROM(entry.subentries[n].data.number).simplifyWhiteSpace();
+ GNOKII_DEBUG(TQString(" Subentry#%1, entry_type=%2, number_type=%3, number=%4\n")
.arg(n).arg(entry.subentries[n].entry_type)
.arg(entry.subentries[n].number_type).arg(s));
if (s.isEmpty())
@@ -1075,10 +1075,10 @@ static gn_error read_phone_entries( const char *memtypestr, gn_memory_type memty
a->insertEmail(s);
break;
case GN_PHONEBOOK_ENTRY_Postal:
- addrlist = QStringList::split(';', s, true);
+ addrlist = TQStringList::split(';', s, true);
addr = new KABC::Address(KABC::Address::Work);
if (addrlist.count() <= 1) {
- addrlist = QStringList::split(',', s, true);
+ addrlist = TQStringList::split(',', s, true);
if (addrlist.count() > 1 ) {
// assumed format: "Locality, ZIP, Country"
addr->setLocality(addrlist[0]);
@@ -1130,7 +1130,7 @@ static gn_error read_phone_entries( const char *memtypestr, gn_memory_type memty
a->insertCategory(s);
break;
default:
- GNOKII_DEBUG(QString(" Not handled id=%1, entry=%2\n")
+ GNOKII_DEBUG(TQString(" Not handled id=%1, entry=%2\n")
.arg(entry.subentries[n].entry_type).arg(s));
break;
} // switch()
@@ -1161,7 +1161,7 @@ static gn_error xxport_phone_write_entry( int phone_location, gn_memory_type mem
const KABC::Addressee *addr)
{
gn_phonebook_entry entry;
- QString s;
+ TQString s;
memset(&entry, 0, sizeof(entry));
strncpy(entry.name, GN_TO(addr->realName()), sizeof(entry.name)-1);
@@ -1177,7 +1177,7 @@ static gn_error xxport_phone_write_entry( int phone_location, gn_memory_type mem
s = makeValidPhone(s);
strncpy(entry.number, s.ascii(), sizeof(entry.number)-1);
entry.memory_type = memtype;
- QString cg = addr->custom(APP, "X_GSM_CALLERGROUP");
+ TQString cg = addr->custom(APP, "X_GSM_CALLERGROUP");
if (cg.isEmpty())
entry.caller_group = 5; // default group
else
@@ -1185,9 +1185,9 @@ static gn_error xxport_phone_write_entry( int phone_location, gn_memory_type mem
entry.location = phone_location;
// set date/revision
- QDateTime datetime = addr->revision();
- QDate date(datetime.date());
- QTime time(datetime.time());
+ TQDateTime datetime = addr->revision();
+ TQDate date(datetime.date());
+ TQTime time(datetime.time());
entry.date.year = date.year();
entry.date.month = date.month();
entry.date.day = date.day();
@@ -1195,7 +1195,7 @@ static gn_error xxport_phone_write_entry( int phone_location, gn_memory_type mem
entry.date.minute = time.minute();
entry.date.second = time.second();
- GNOKII_DEBUG(QString("Write #%1: name=%2, number=%3\n").arg(phone_location)
+ GNOKII_DEBUG(TQString("Write #%1: name=%2, number=%3\n").arg(phone_location)
.arg(GN_FROM(entry.name)).arg(GN_FROM(entry.number)));
const KABC::Address homeAddr = addr->address(KABC::Address::Home);
@@ -1239,7 +1239,7 @@ static gn_error xxport_phone_write_entry( int phone_location, gn_memory_type mem
subentry++;
}
// add E-Mails
- QStringList emails = addr->emails();
+ TQStringList emails = addr->emails();
for (unsigned int n=0; n<emails.count(); n++) {
if (entry.subentries_count >= GN_PHONEBOOK_SUBENTRIES_MAX_NUMBER)
break; // Phonebook full
@@ -1247,7 +1247,7 @@ static gn_error xxport_phone_write_entry( int phone_location, gn_memory_type mem
if (s.isEmpty()) continue;
// only one email allowed if we have URLS, notes, addresses (to avoid phone limitations)
if (n && !addr->url().isEmpty() && !addr->note().isEmpty() && addr->addresses().count()) {
- GNOKII_DEBUG(QString(" DROPPED email %1 in favor of URLs, notes and addresses.\n")
+ GNOKII_DEBUG(TQString(" DROPPED email %1 in favor of URLs, notes and addresses.\n")
.arg(s));
continue;
}
@@ -1265,9 +1265,9 @@ static gn_error xxport_phone_write_entry( int phone_location, gn_memory_type mem
const KABC::Address *Addr = &(*it2);
if (Addr->isEmpty()) continue;
subentry->entry_type = GN_PHONEBOOK_ENTRY_Postal;
- QStringList a;
- QChar sem(';');
- QString sem_repl(QString::fromLatin1(","));
+ TQStringList a;
+ TQChar sem(';');
+ TQString sem_repl(TQString::fromLatin1(","));
a.append( Addr->postOfficeBox().replace( sem, sem_repl ) );
a.append( Addr->extended() .replace( sem, sem_repl ) );
a.append( Addr->street() .replace( sem, sem_repl ) );
@@ -1292,7 +1292,7 @@ static gn_error xxport_phone_write_entry( int phone_location, gn_memory_type mem
// debug output
for (int st=0; st<entry.subentries_count; st++) {
gn_phonebook_subentry *subentry = &entry.subentries[st];
- GNOKII_DEBUG(QString(" SubTel #%1: entry_type=%2, number_type=%3, number=%4\n")
+ GNOKII_DEBUG(TQString(" SubTel #%1: entry_type=%2, number_type=%3, number=%4\n")
.arg(st).arg(subentry->entry_type)
.arg(subentry->number_type).arg(GN_FROM(subentry->data.number)));
}
@@ -1313,13 +1313,13 @@ static gn_error xxport_phone_delete_entry( int phone_location, gn_memory_type me
entry.memory_type = memtype;
entry.location = phone_location;
data.phonebook_entry = &entry;
- GNOKII_DEBUG(QString("Deleting entry %1\n").arg(phone_location));
+ GNOKII_DEBUG(TQString("Deleting entry %1\n").arg(phone_location));
gn_error error = gn_sm_functions(GN_OP_WritePhonebook, &data, &state);
GNOKII_CHECK_ERROR(error);
return error;
}
-KABC::AddresseeList GNOKIIXXPort::importContacts( const QString& ) const
+KABC::AddresseeList GNOKIIXXPort::importContacts( const TQString& ) const
{
KABC::AddresseeList addrList;
@@ -1339,14 +1339,14 @@ KABC::AddresseeList GNOKIIXXPort::importContacts( const QString& ) const
m_progressDlg->progressBar()->setProgress(0);
m_progressDlg->progressBar()->setCenterIndicator(true);
m_progressDlg->setModal(true);
- m_progressDlg->setInitialSize(QSize(450,350));
+ m_progressDlg->setInitialSize(TQSize(450,350));
m_progressDlg->show();
processEvents();
#if (QT_VERSION >= 0x030300)
m_progressDlg->setCursor( Qt::BusyCursor );
#endif
- QString errStr = businit();
+ TQString errStr = businit();
m_progressDlg->unsetCursor();
if (!errStr.isEmpty()) {
@@ -1370,7 +1370,7 @@ KABC::AddresseeList GNOKIIXXPort::importContacts( const QString& ) const
}
-bool GNOKIIXXPort::exportContacts( const KABC::AddresseeList &list, const QString & )
+bool GNOKIIXXPort::exportContacts( const KABC::AddresseeList &list, const TQString & )
{
if (KMessageBox::Continue != KMessageBox::warningContinueCancel(parentWidget(),
i18n("<qt>Please connect your Mobile Phone to your computer and press "
@@ -1388,14 +1388,14 @@ bool GNOKIIXXPort::exportContacts( const KABC::AddresseeList &list, const QStrin
m_progressDlg->progressBar()->setProgress(0);
m_progressDlg->progressBar()->setCenterIndicator(true);
m_progressDlg->setModal(true);
- m_progressDlg->setInitialSize(QSize(450,350));
+ m_progressDlg->setInitialSize(TQSize(450,350));
m_progressDlg->show();
processEvents();
KProgress* progress = (KProgress*)m_progressDlg->progressBar();
KABC::AddresseeList::ConstIterator it;
- QStringList failedList;
+ TQStringList failedList;
gn_error error;
bool deleteLabelInitialized = false;
@@ -1403,7 +1403,7 @@ bool GNOKIIXXPort::exportContacts( const KABC::AddresseeList &list, const QStrin
#if (QT_VERSION >= 0x030300)
m_progressDlg->setCursor( Qt::BusyCursor );
#endif
- QString errStr = businit();
+ TQString errStr = businit();
m_progressDlg->unsetCursor();
if (!errStr.isEmpty()) {
@@ -1480,7 +1480,7 @@ try_next_phone_entry:
if (phone_entry_no > (memstat.used + memstat.free))
break;
- GNOKII_DEBUG(QString("Try to write entry '%1' at phone_entry_no=%2, phone_count=%3\n")
+ GNOKII_DEBUG(TQString("Try to write entry '%1' at phone_entry_no=%2, phone_count=%3\n")
.arg(addr->realName()).arg(phone_entry_no).arg(phone_count));
error = GN_ERR_NONE;
@@ -1554,7 +1554,7 @@ finish:
delete m_progressDlg;
if (!failedList.isEmpty()) {
- GNOKII_DEBUG(QString("Failed to export: %1\n").arg(failedList.join(", ")));
+ GNOKII_DEBUG(TQString("Failed to export: %1\n").arg(failedList.join(", ")));
KMessageBox::informationList(parentWidget(),
i18n("<qt>The following contacts could not be exported to the Mobile Phone. "
"Possible Reasons for this problem could be:<br><ul>"
@@ -1580,7 +1580,7 @@ finish:
#else /* no gnokii installed */
-KABC::AddresseeList GNOKIIXXPort::importContacts( const QString& ) const
+KABC::AddresseeList GNOKIIXXPort::importContacts( const TQString& ) const
{
KABC::AddresseeList addrList;
KMessageBox::error(parentWidget(), i18n("Gnokii interface is not available.\n"
@@ -1588,7 +1588,7 @@ KABC::AddresseeList GNOKIIXXPort::importContacts( const QString& ) const
return addrList;
}
-bool GNOKIIXXPort::exportContacts( const KABC::AddresseeList &list, const QString & )
+bool GNOKIIXXPort::exportContacts( const KABC::AddresseeList &list, const TQString & )
{
Q_UNUSED(list);
KMessageBox::error(parentWidget(), i18n("Gnokii interface is not available.\n"
diff --git a/kaddressbook/xxport/gnokii_xxport.h b/kaddressbook/xxport/gnokii_xxport.h
index 64176fcaf..edee6abbe 100644
--- a/kaddressbook/xxport/gnokii_xxport.h
+++ b/kaddressbook/xxport/gnokii_xxport.h
@@ -31,13 +31,13 @@ class GNOKIIXXPort : public KAB::XXPort
Q_OBJECT
public:
- GNOKIIXXPort( KABC::AddressBook *ab, QWidget *parent, const char *name = 0 );
+ GNOKIIXXPort( KABC::AddressBook *ab, TQWidget *parent, const char *name = 0 );
- QString identifier() const { return "gnokii"; }
+ TQString identifier() const { return "gnokii"; }
public slots:
- bool exportContacts( const KABC::AddresseeList &list, const QString &data );
- KABC::AddresseeList importContacts( const QString &data ) const;
+ bool exportContacts( const KABC::AddresseeList &list, const TQString &data );
+ KABC::AddresseeList importContacts( const TQString &data ) const;
};
#endif
diff --git a/kaddressbook/xxport/kde2_xxport.cpp b/kaddressbook/xxport/kde2_xxport.cpp
index 03a524e9f..8e754b39c 100644
--- a/kaddressbook/xxport/kde2_xxport.cpp
+++ b/kaddressbook/xxport/kde2_xxport.cpp
@@ -21,7 +21,7 @@
without including the source code for Qt in the source distribution.
*/
-#include <qfile.h>
+#include <tqfile.h>
#include <kdebug.h>
#include <kfiledialog.h>
@@ -39,16 +39,16 @@
K_EXPORT_KADDRESSBOOK_XXFILTER( libkaddrbk_kde2_xxport, KDE2XXPort )
-KDE2XXPort::KDE2XXPort( KABC::AddressBook *ab, QWidget *parent, const char *name )
+KDE2XXPort::KDE2XXPort( KABC::AddressBook *ab, TQWidget *parent, const char *name )
: KAB::XXPort( ab, parent, name )
{
createImportAction( i18n( "Import KDE 2 Addressbook..." ) );
}
-KABC::AddresseeList KDE2XXPort::importContacts( const QString& ) const
+KABC::AddresseeList KDE2XXPort::importContacts( const TQString& ) const
{
- QString fileName = locateLocal( "data", "kabc/std.vcf" );
- if ( !QFile::exists( fileName ) ) {
+ TQString fileName = locateLocal( "data", "kabc/std.vcf" );
+ if ( !TQFile::exists( fileName ) ) {
KMessageBox::sorry( parentWidget(), i18n( "<qt>Could not find a KDE 2 address book <b>%1</b>.</qt>" ).arg( fileName ) );
return KABC::AddresseeList();
}
diff --git a/kaddressbook/xxport/kde2_xxport.h b/kaddressbook/xxport/kde2_xxport.h
index 4f5f2edb0..a56bc0288 100644
--- a/kaddressbook/xxport/kde2_xxport.h
+++ b/kaddressbook/xxport/kde2_xxport.h
@@ -31,12 +31,12 @@ class KDE2XXPort : public KAB::XXPort
Q_OBJECT
public:
- KDE2XXPort( KABC::AddressBook *ab, QWidget *parent, const char *name = 0 );
+ KDE2XXPort( KABC::AddressBook *ab, TQWidget *parent, const char *name = 0 );
- QString identifier() const { return "kde2"; }
+ TQString identifier() const { return "kde2"; }
public slots:
- KABC::AddresseeList importContacts( const QString &data ) const;
+ KABC::AddresseeList importContacts( const TQString &data ) const;
};
#endif
diff --git a/kaddressbook/xxport/ldif_xxport.cpp b/kaddressbook/xxport/ldif_xxport.cpp
index 342ff9d81..d632d449b 100644
--- a/kaddressbook/xxport/ldif_xxport.cpp
+++ b/kaddressbook/xxport/ldif_xxport.cpp
@@ -33,7 +33,7 @@
into your KDE Addressbook.
*/
-#include <qfile.h>
+#include <tqfile.h>
#include <kfiledialog.h>
#include <kio/netaccess.h>
@@ -50,7 +50,7 @@
K_EXPORT_KADDRESSBOOK_XXFILTER( libkaddrbk_ldif_xxport, LDIFXXPort )
-LDIFXXPort::LDIFXXPort( KABC::AddressBook *ab, QWidget *parent, const char *name )
+LDIFXXPort::LDIFXXPort( KABC::AddressBook *ab, TQWidget *parent, const char *name )
: KAB::XXPort( ab, parent, name )
{
createImportAction( i18n( "Import LDIF Addressbook..." ) );
@@ -59,26 +59,26 @@ LDIFXXPort::LDIFXXPort( KABC::AddressBook *ab, QWidget *parent, const char *name
/* import */
-KABC::AddresseeList LDIFXXPort::importContacts( const QString& ) const
+KABC::AddresseeList LDIFXXPort::importContacts( const TQString& ) const
{
KABC::AddresseeList addrList;
- QString fileName = KFileDialog::getOpenFileName( QDir::homeDirPath(),
+ TQString fileName = KFileDialog::getOpenFileName( TQDir::homeDirPath(),
"text/x-ldif", 0 );
if ( fileName.isEmpty() )
return addrList;
- QFile file( fileName );
+ TQFile file( fileName );
if ( !file.open( IO_ReadOnly ) ) {
- QString msg = i18n( "<qt>Unable to open <b>%1</b> for reading.</qt>" );
+ TQString msg = i18n( "<qt>Unable to open <b>%1</b> for reading.</qt>" );
KMessageBox::error( parentWidget(), msg.arg( fileName ) );
return addrList;
}
- QTextStream t( &file );
- t.setEncoding( QTextStream::Latin1 );
- QString wholeFile = t.read();
- QDateTime dtDefault = QFileInfo(file).lastModified();
+ TQTextStream t( &file );
+ t.setEncoding( TQTextStream::Latin1 );
+ TQString wholeFile = t.read();
+ TQDateTime dtDefault = TQFileInfo(file).lastModified();
file.close();
KABC::LDIFConverter::LDIFToAddressee( wholeFile, addrList, dtDefault );
@@ -89,9 +89,9 @@ KABC::AddresseeList LDIFXXPort::importContacts( const QString& ) const
/* export */
-bool LDIFXXPort::exportContacts( const KABC::AddresseeList &list, const QString& )
+bool LDIFXXPort::exportContacts( const KABC::AddresseeList &list, const TQString& )
{
- KURL url = KFileDialog::getSaveURL( QDir::homeDirPath() + "/addressbook.ldif",
+ KURL url = KFileDialog::getSaveURL( TQDir::homeDirPath() + "/addressbook.ldif",
"text/x-ldif" );
if ( url.isEmpty() )
return true;
@@ -99,7 +99,7 @@ bool LDIFXXPort::exportContacts( const KABC::AddresseeList &list, const QString&
if ( !url.isLocalFile() ) {
KTempFile tmpFile;
if ( tmpFile.status() != 0 ) {
- QString txt = i18n( "<qt>Unable to open file <b>%1</b>.%2.</qt>" );
+ TQString txt = i18n( "<qt>Unable to open file <b>%1</b>.%2.</qt>" );
KMessageBox::error( parentWidget(), txt.arg( url.url() )
.arg( strerror( tmpFile.status() ) ) );
return false;
@@ -110,11 +110,11 @@ bool LDIFXXPort::exportContacts( const KABC::AddresseeList &list, const QString&
return KIO::NetAccess::upload( tmpFile.name(), url, parentWidget() );
} else {
- QString filename = url.path();
- QFile file( filename );
+ TQString filename = url.path();
+ TQFile file( filename );
if ( !file.open( IO_WriteOnly ) ) {
- QString txt = i18n( "<qt>Unable to open file <b>%1</b>.</qt>" );
+ TQString txt = i18n( "<qt>Unable to open file <b>%1</b>.</qt>" );
KMessageBox::error( parentWidget(), txt.arg( filename ) );
return false;
}
@@ -126,13 +126,13 @@ bool LDIFXXPort::exportContacts( const KABC::AddresseeList &list, const QString&
}
}
-void LDIFXXPort::doExport( QFile *fp, const KABC::AddresseeList &list )
+void LDIFXXPort::doExport( TQFile *fp, const KABC::AddresseeList &list )
{
- QString str;
+ TQString str;
KABC::LDIFConverter::addresseeToLDIF( list, str );
- QTextStream t( fp );
- t.setEncoding( QTextStream::UnicodeUTF8 );
+ TQTextStream t( fp );
+ t.setEncoding( TQTextStream::UnicodeUTF8 );
t << str;
}
diff --git a/kaddressbook/xxport/ldif_xxport.h b/kaddressbook/xxport/ldif_xxport.h
index d5ae2cdd3..72c047d64 100644
--- a/kaddressbook/xxport/ldif_xxport.h
+++ b/kaddressbook/xxport/ldif_xxport.h
@@ -32,16 +32,16 @@ class LDIFXXPort : public KAB::XXPort
Q_OBJECT
public:
- LDIFXXPort( KABC::AddressBook *ab, QWidget *parent, const char *name = 0 );
+ LDIFXXPort( KABC::AddressBook *ab, TQWidget *parent, const char *name = 0 );
- QString identifier() const { return "ldif"; }
+ TQString identifier() const { return "ldif"; }
public slots:
- bool exportContacts( const KABC::AddresseeList &list, const QString &data );
- KABC::AddresseeList importContacts( const QString &data ) const;
+ bool exportContacts( const KABC::AddresseeList &list, const TQString &data );
+ KABC::AddresseeList importContacts( const TQString &data ) const;
private:
- void doExport( QFile *fp, const KABC::AddresseeList &list );
+ void doExport( TQFile *fp, const KABC::AddresseeList &list );
};
#endif
diff --git a/kaddressbook/xxport/opera_xxport.cpp b/kaddressbook/xxport/opera_xxport.cpp
index c3d707b88..474a66723 100644
--- a/kaddressbook/xxport/opera_xxport.cpp
+++ b/kaddressbook/xxport/opera_xxport.cpp
@@ -22,8 +22,8 @@
without including the source code for Qt in the source distribution.
*/
-#include <qfile.h>
-#include <qregexp.h>
+#include <tqfile.h>
+#include <tqregexp.h>
#include <kfiledialog.h>
#include <kio/netaccess.h>
@@ -38,39 +38,39 @@
K_EXPORT_KADDRESSBOOK_XXFILTER( libkaddrbk_opera_xxport, OperaXXPort )
-OperaXXPort::OperaXXPort( KABC::AddressBook *ab, QWidget *parent, const char *name )
+OperaXXPort::OperaXXPort( KABC::AddressBook *ab, TQWidget *parent, const char *name )
: KAB::XXPort( ab, parent, name )
{
createImportAction( i18n( "Import Opera Addressbook..." ) );
}
-KABC::AddresseeList OperaXXPort::importContacts( const QString& ) const
+KABC::AddresseeList OperaXXPort::importContacts( const TQString& ) const
{
KABC::AddresseeList addrList;
- QString fileName = KFileDialog::getOpenFileName( QDir::homeDirPath() + QString::fromLatin1( "/.opera/contacts.adr" ) );
+ TQString fileName = KFileDialog::getOpenFileName( TQDir::homeDirPath() + TQString::fromLatin1( "/.opera/contacts.adr" ) );
if ( fileName.isEmpty() )
return addrList;
- QFile file( fileName );
+ TQFile file( fileName );
if ( !file.open( IO_ReadOnly ) ) {
- QString msg = i18n( "<qt>Unable to open <b>%1</b> for reading.</qt>" );
+ TQString msg = i18n( "<qt>Unable to open <b>%1</b> for reading.</qt>" );
KMessageBox::error( parentWidget(), msg.arg( fileName ) );
return addrList;
}
- QTextStream stream( &file );
- stream.setEncoding( QTextStream::UnicodeUTF8 );
- QString line, key, value;
+ TQTextStream stream( &file );
+ stream.setEncoding( TQTextStream::UnicodeUTF8 );
+ TQString line, key, value;
bool parseContact = false;
KABC::Addressee addr;
- QRegExp separator( "\x02\x02" );
+ TQRegExp separator( "\x02\x02" );
while ( !stream.atEnd() ) {
line = stream.readLine();
line = line.stripWhiteSpace();
- if ( line == QString::fromLatin1( "#CONTACT" ) ) {
+ if ( line == TQString::fromLatin1( "#CONTACT" ) ) {
parseContact = true;
addr = KABC::Addressee();
continue;
@@ -87,31 +87,31 @@ KABC::AddresseeList OperaXXPort::importContacts( const QString& ) const
int sep = line.find( '=' );
key = line.left( sep ).lower();
value = line.mid( sep + 1 );
- if ( key == QString::fromLatin1( "name" ) )
+ if ( key == TQString::fromLatin1( "name" ) )
addr.setNameFromString( value );
- else if ( key == QString::fromLatin1( "mail" ) ) {
- QStringList emails = QStringList::split( separator, value );
+ else if ( key == TQString::fromLatin1( "mail" ) ) {
+ TQStringList emails = TQStringList::split( separator, value );
- QStringList::Iterator it = emails.begin();
+ TQStringList::Iterator it = emails.begin();
bool preferred = true;
for ( ; it != emails.end(); ++it ) {
addr.insertEmail( *it, preferred );
preferred = false;
}
- } else if ( key == QString::fromLatin1( "phone" ) )
+ } else if ( key == TQString::fromLatin1( "phone" ) )
addr.insertPhoneNumber( KABC::PhoneNumber( value ) );
- else if ( key == QString::fromLatin1( "fax" ) )
+ else if ( key == TQString::fromLatin1( "fax" ) )
addr.insertPhoneNumber( KABC::PhoneNumber( value,
KABC::PhoneNumber::Fax | KABC::PhoneNumber::Home ) );
- else if ( key == QString::fromLatin1( "postaladdress" ) ) {
+ else if ( key == TQString::fromLatin1( "postaladdress" ) ) {
KABC::Address address( KABC::Address::Home );
address.setLabel( value.replace( separator, "\n" ) );
addr.insertAddress( address );
- } else if ( key == QString::fromLatin1( "description" ) )
+ } else if ( key == TQString::fromLatin1( "description" ) )
addr.setNote( value.replace( separator, "\n" ) );
- else if ( key == QString::fromLatin1( "url" ) )
+ else if ( key == TQString::fromLatin1( "url" ) )
addr.setUrl( KURL( value ) );
- else if ( key == QString::fromLatin1( "pictureurl" ) ) {
+ else if ( key == TQString::fromLatin1( "pictureurl" ) ) {
KABC::Picture pic( value );
addr.setPhoto( pic );
}
diff --git a/kaddressbook/xxport/opera_xxport.h b/kaddressbook/xxport/opera_xxport.h
index ec4838be1..7730dde56 100644
--- a/kaddressbook/xxport/opera_xxport.h
+++ b/kaddressbook/xxport/opera_xxport.h
@@ -32,12 +32,12 @@ class OperaXXPort : public KAB::XXPort
Q_OBJECT
public:
- OperaXXPort( KABC::AddressBook *ab, QWidget *parent, const char *name = 0 );
+ OperaXXPort( KABC::AddressBook *ab, TQWidget *parent, const char *name = 0 );
- QString identifier() const { return "opera"; }
+ TQString identifier() const { return "opera"; }
public slots:
- KABC::AddresseeList importContacts( const QString &data ) const;
+ KABC::AddresseeList importContacts( const TQString &data ) const;
};
#endif
diff --git a/kaddressbook/xxport/pab_mapihd.cpp b/kaddressbook/xxport/pab_mapihd.cpp
index bcf541d75..6d61cb339 100644
--- a/kaddressbook/xxport/pab_mapihd.cpp
+++ b/kaddressbook/xxport/pab_mapihd.cpp
@@ -151,7 +151,7 @@ pabrec_entry e=pr_unknown;
return e;
}
-pabfields_t::pabfields_t(pabrec & R, QWidget * /*parent*/)
+pabfields_t::pabfields_t(pabrec & R, TQWidget * /*parent*/)
{
// Skip the first two words, because they're always the
// same 000c 0014 ==> 0014 gives us the types, so we
@@ -180,11 +180,11 @@ pabfields_t::pabfields_t(pabrec & R, QWidget * /*parent*/)
for(i=2,k=0;i<R.N() && k<tags.size();i++,k++) {
if (!isUsed(k)) { i-=1; }
else {pabrec_entry e;
- QString E;
+ TQString E;
e=isWhat(k);
E=R.getEntry(i);
- { QString s=E;
+ { TQString s=E;
s=s.stripWhiteSpace();
E=s;
}
diff --git a/kaddressbook/xxport/pab_mapihd.h b/kaddressbook/xxport/pab_mapihd.h
index c4bb58a77..c54be4500 100644
--- a/kaddressbook/xxport/pab_mapihd.h
+++ b/kaddressbook/xxport/pab_mapihd.h
@@ -18,7 +18,7 @@
#ifndef _MAPIHD_H_
#define _MAPIHD_H_
-#include <qmemarray.h>
+#include <tqmemarray.h>
#include "pab_xxport.h"
@@ -90,9 +90,9 @@
class pabfields_t
{
private:
- QMemArray<mapitag_t> tags,context_tags;
+ TQMemArray<mapitag_t> tags,context_tags;
pabrec *m_R;
- QString givenName,email,
+ TQString givenName,email,
title,firstName,additionalName,lastName,
address,town,state,zip,country,
organization,department,subDep,job,
@@ -105,7 +105,7 @@
word_t literal(int k);
content_t order(int k);
public:
- pabfields_t(pabrec & R, QWidget *parent);
+ pabfields_t(pabrec & R, TQWidget *parent);
public:
KABC::Addressee get( );
bool isOK(void) { return OK; }
diff --git a/kaddressbook/xxport/pab_pablib.cpp b/kaddressbook/xxport/pab_pablib.cpp
index c56c4e9a3..344647f6f 100644
--- a/kaddressbook/xxport/pab_pablib.cpp
+++ b/kaddressbook/xxport/pab_pablib.cpp
@@ -45,7 +45,7 @@ bool pab::convert(void)
adr_t A;
bool ret;
- if (!in.isOpen()) {QString msg;
+ if (!in.isOpen()) {TQString msg;
msg=i18n("Cannot open %1 for reading").arg(pabfile);
// info->alert(msg);
return false;
@@ -242,7 +242,7 @@ bool pab::knownPAB(void)
{
content_t id;
id=go(0);
- if (id!=PAB_FILE_ID) {QString msg;
+ if (id!=PAB_FILE_ID) {TQString msg;
msg=i18n("%1 has no PAB id that I know of, cannot convert this").arg(pabfile);
// info->alert(msg);
return false;
diff --git a/kaddressbook/xxport/pab_pablib.h b/kaddressbook/xxport/pab_pablib.h
index ff54a32a2..c26cbdf23 100644
--- a/kaddressbook/xxport/pab_pablib.h
+++ b/kaddressbook/xxport/pab_pablib.h
@@ -20,7 +20,7 @@
#define PAB_LIB_HXX
#include <klocale.h>
-#include <qfile.h>
+#include <tqfile.h>
#include "pab_mapihd.h"
@@ -33,10 +33,10 @@ class pab
friend class pabrec;
private:
- QFile in;
+ TQFile in;
const char *pabfile;
- QString cap;
- QWidget *parent;
+ TQString cap;
+ TQWidget *parent;
public:
pab(const char *pabFile);
~pab();
diff --git a/kaddressbook/xxport/pab_xxport.cpp b/kaddressbook/xxport/pab_xxport.cpp
index 621e5d2c2..21ac67c07 100644
--- a/kaddressbook/xxport/pab_xxport.cpp
+++ b/kaddressbook/xxport/pab_xxport.cpp
@@ -22,7 +22,7 @@
without including the source code for Qt in the source distribution.
*/
-#include <qfile.h>
+#include <tqfile.h>
#include <kdebug.h>
#include <kfiledialog.h>
@@ -40,26 +40,26 @@
K_EXPORT_KADDRESSBOOK_XXFILTER( libkaddrbk_pab_xxport, PABXXPort )
-PABXXPort::PABXXPort( KABC::AddressBook *ab, QWidget *parent, const char *name )
+PABXXPort::PABXXPort( KABC::AddressBook *ab, TQWidget *parent, const char *name )
: KAB::XXPort( ab, parent, name )
{
createImportAction( i18n("Import MS Exchange Personal Address Book (.PAB)") );
}
-KABC::AddresseeList PABXXPort::importContacts( const QString& ) const
+KABC::AddresseeList PABXXPort::importContacts( const TQString& ) const
{
KABC::AddresseeList addrList;
- QString fileName = KFileDialog::getOpenFileName( QDir::homeDirPath(),
+ TQString fileName = KFileDialog::getOpenFileName( TQDir::homeDirPath(),
"*.[pP][aA][bB]|" + i18n("MS Exchange Personal Address Book Files (*.pab)"), 0 );
if ( fileName.isEmpty() )
return addrList;
- if ( !QFile::exists( fileName ) ) {
+ if ( !TQFile::exists( fileName ) ) {
KMessageBox::sorry( parentWidget(), i18n( "<qt>Could not find a MS Exchange Personal Address Book <b>%1</b>.</qt>" ).arg( fileName ) );
return addrList;
}
- // pab PAB(QFile::encodeName(file),this,info);
+ // pab PAB(TQFile::encodeName(file),this,info);
// info->setFrom(file);
// PAB.convert();
diff --git a/kaddressbook/xxport/pab_xxport.h b/kaddressbook/xxport/pab_xxport.h
index 5c1edb508..e98b56bfa 100644
--- a/kaddressbook/xxport/pab_xxport.h
+++ b/kaddressbook/xxport/pab_xxport.h
@@ -32,15 +32,15 @@ class PABXXPort : public KAB::XXPort
Q_OBJECT
public:
- PABXXPort( KABC::AddressBook *ab, QWidget *parent, const char *name = 0 );
+ PABXXPort( KABC::AddressBook *ab, TQWidget *parent, const char *name = 0 );
- QString identifier() const { return "pab"; }
+ TQString identifier() const { return "pab"; }
public slots:
- KABC::AddresseeList importContacts( const QString &data ) const;
+ KABC::AddresseeList importContacts( const TQString &data ) const;
private:
- void doExport( QFile *fp, const KABC::AddresseeList &list );
+ void doExport( TQFile *fp, const KABC::AddresseeList &list );
};
diff --git a/kaddressbook/xxport/vcard_xxport.cpp b/kaddressbook/xxport/vcard_xxport.cpp
index 9fb368278..85cf8c763 100644
--- a/kaddressbook/xxport/vcard_xxport.cpp
+++ b/kaddressbook/xxport/vcard_xxport.cpp
@@ -21,12 +21,12 @@
without including the source code for Qt in the source distribution.
*/
-#include <qcheckbox.h>
-#include <qfile.h>
-#include <qfont.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qpushbutton.h>
+#include <tqcheckbox.h>
+#include <tqfile.h>
+#include <tqfont.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqpushbutton.h>
#include <kabc/vcardconverter.h>
#include <kdialogbase.h>
@@ -56,7 +56,7 @@ class VCardViewerDialog : public KDialogBase
{
public:
VCardViewerDialog( const KABC::Addressee::List &list,
- QWidget *parent, const char *name = 0 );
+ TQWidget *parent, const char *name = 0 );
KABC::Addressee::List contacts() const;
@@ -78,7 +78,7 @@ class VCardViewerDialog : public KDialogBase
class VCardExportSelectionDialog : public KDialogBase
{
public:
- VCardExportSelectionDialog( QWidget *parent, const char *name = 0 );
+ VCardExportSelectionDialog( TQWidget *parent, const char *name = 0 );
~VCardExportSelectionDialog();
bool exportPrivateFields() const;
@@ -87,13 +87,13 @@ class VCardExportSelectionDialog : public KDialogBase
bool exportEncryptionKeys() const;
private:
- QCheckBox *mPrivateBox;
- QCheckBox *mBusinessBox;
- QCheckBox *mOtherBox;
- QCheckBox *mEncryptionKeys;
+ TQCheckBox *mPrivateBox;
+ TQCheckBox *mBusinessBox;
+ TQCheckBox *mOtherBox;
+ TQCheckBox *mEncryptionKeys;
};
-VCardXXPort::VCardXXPort( KABC::AddressBook *ab, QWidget *parent, const char *name )
+VCardXXPort::VCardXXPort( KABC::AddressBook *ab, TQWidget *parent, const char *name )
: KAB::XXPort( ab, parent, name )
{
createImportAction( i18n( "Import vCard..." ) );
@@ -101,7 +101,7 @@ VCardXXPort::VCardXXPort( KABC::AddressBook *ab, QWidget *parent, const char *na
createExportAction( i18n( "Export vCard 3.0..." ), "v30" );
}
-bool VCardXXPort::exportContacts( const KABC::AddresseeList &addrList, const QString &data )
+bool VCardXXPort::exportContacts( const KABC::AddresseeList &addrList, const TQString &data )
{
KABC::VCardConverter converter;
KURL url;
@@ -122,10 +122,10 @@ bool VCardXXPort::exportContacts( const KABC::AddresseeList &addrList, const QSt
else
ok = doExport( url, converter.createVCards( list, KABC::VCardConverter::v3_0 ) );
} else {
- QString msg = i18n( "You have selected a list of contacts, shall they be "
+ TQString msg = i18n( "You have selected a list of contacts, shall they be "
"exported to several files?" );
- switch ( KMessageBox::questionYesNo( parentWidget(), msg, QString::null, i18n("Export to Several Files"), i18n("Export to One File") ) ) {
+ switch ( KMessageBox::questionYesNo( parentWidget(), msg, TQString::null, i18n("Export to Several Files"), i18n("Export to One File") ) ) {
case KMessageBox::Yes: {
KURL baseUrl = KFileDialog::getExistingURL();
if ( baseUrl.isEmpty() )
@@ -134,15 +134,15 @@ bool VCardXXPort::exportContacts( const KABC::AddresseeList &addrList, const QSt
KABC::AddresseeList::ConstIterator it;
uint counter = 0;
for ( it = list.begin(); it != list.end(); ++it ) {
- QString testUrl;
+ TQString testUrl;
if ( (*it).givenName().isEmpty() && (*it).familyName().isEmpty() )
testUrl = baseUrl.url() + "/" + (*it).organization();
else
testUrl = baseUrl.url() + "/" + (*it).givenName() + "_" + (*it).familyName();
- if ( KIO::NetAccess::exists( testUrl + (counter == 0 ? "" : QString::number( counter )) + ".vcf", false, parentWidget() ) ) {
+ if ( KIO::NetAccess::exists( testUrl + (counter == 0 ? "" : TQString::number( counter )) + ".vcf", false, parentWidget() ) ) {
counter++;
- url = testUrl + QString::number( counter ) + ".vcf";
+ url = testUrl + TQString::number( counter ) + ".vcf";
} else
url = testUrl + ".vcf";
@@ -176,9 +176,9 @@ bool VCardXXPort::exportContacts( const KABC::AddresseeList &addrList, const QSt
return ok;
}
-KABC::AddresseeList VCardXXPort::importContacts( const QString& ) const
+KABC::AddresseeList VCardXXPort::importContacts( const TQString& ) const
{
- QString fileName;
+ TQString fileName;
KABC::AddresseeList addrList;
KURL::List urls;
@@ -186,7 +186,7 @@ KABC::AddresseeList VCardXXPort::importContacts( const QString& ) const
addrList = parseVCard( XXPortManager::importData );
else {
if ( XXPortManager::importURL.isEmpty() )
- urls = KFileDialog::getOpenURLs( QString::null, "*.vcf|vCards", parentWidget(),
+ urls = KFileDialog::getOpenURLs( TQString::null, "*.vcf|vCards", parentWidget(),
i18n( "Select vCard to Import" ) );
else
urls.append( XXPortManager::importURL );
@@ -194,31 +194,31 @@ KABC::AddresseeList VCardXXPort::importContacts( const QString& ) const
if ( urls.count() == 0 )
return addrList;
- QString caption( i18n( "vCard Import Failed" ) );
+ TQString caption( i18n( "vCard Import Failed" ) );
bool anyFailures = false;
KURL::List::Iterator it;
for ( it = urls.begin(); it != urls.end(); ++it ) {
if ( KIO::NetAccess::download( *it, fileName, parentWidget() ) ) {
- QFile file( fileName );
+ TQFile file( fileName );
if ( file.open( IO_ReadOnly ) ) {
- QByteArray rawData = file.readAll();
+ TQByteArray rawData = file.readAll();
file.close();
if ( rawData.size() > 0 )
addrList += parseVCard( rawData );
KIO::NetAccess::removeTempFile( fileName );
} else {
- QString text = i18n( "<qt>When trying to read the vCard, there was an error opening the file '%1': %2</qt>" );
+ TQString text = i18n( "<qt>When trying to read the vCard, there was an error opening the file '%1': %2</qt>" );
text = text.arg( (*it).url() );
- text = text.arg( kapp->translate( "QFile",
+ text = text.arg( kapp->translate( "TQFile",
file.errorString().latin1() ) );
KMessageBox::error( parentWidget(), text, caption );
anyFailures = true;
}
} else {
- QString text = i18n( "<qt>Unable to access vCard: %1</qt>" );
+ TQString text = i18n( "<qt>Unable to access vCard: %1</qt>" );
text = text.arg( KIO::NetAccess::lastErrorString() );
KMessageBox::error( parentWidget(), text, caption );
anyFailures = true;
@@ -243,20 +243,20 @@ KABC::AddresseeList VCardXXPort::importContacts( const QString& ) const
return addrList;
}
-KABC::AddresseeList VCardXXPort::parseVCard( const QString &data ) const
+KABC::AddresseeList VCardXXPort::parseVCard( const TQString &data ) const
{
KABC::VCardConverter converter;
return converter.parseVCards( data );
}
-bool VCardXXPort::doExport( const KURL &url, const QString &data )
+bool VCardXXPort::doExport( const KURL &url, const TQString &data )
{
KTempFile tmpFile;
tmpFile.setAutoDelete( true );
- QTextStream stream( tmpFile.file() );
- stream.setEncoding( QTextStream::UnicodeUTF8 );
+ TQTextStream stream( tmpFile.file() );
+ stream.setEncoding( TQTextStream::UnicodeUTF8 );
stream << data;
tmpFile.close();
@@ -364,7 +364,7 @@ KABC::AddresseeList VCardXXPort::filterContacts( const KABC::AddresseeList &addr
void VCardXXPort::addKey( KABC::Addressee &addr, KABC::Key::Types type )
{
- QString fingerprint = addr.custom( "KADDRESSBOOK",
+ TQString fingerprint = addr.custom( "KADDRESSBOOK",
(type == KABC::Key::PGP ? "OPENPGPFP" : "SMIMEFP") );
if ( fingerprint.isEmpty() )
return;
@@ -398,23 +398,23 @@ void VCardXXPort::addKey( KABC::Addressee &addr, KABC::Key::Types type )
// ---------- VCardViewer Dialog ---------------- //
VCardViewerDialog::VCardViewerDialog( const KABC::Addressee::List &list,
- QWidget *parent, const char *name )
+ TQWidget *parent, const char *name )
: KDialogBase( Plain, i18n( "Import vCard" ), Yes | No | Apply | Cancel, Yes,
parent, name, true, true, KStdGuiItem::no(), KStdGuiItem::yes() ),
mContacts( list )
{
- QFrame *page = plainPage();
- QVBoxLayout *layout = new QVBoxLayout( page, marginHint(), spacingHint() );
+ TQFrame *page = plainPage();
+ TQVBoxLayout *layout = new TQVBoxLayout( page, marginHint(), spacingHint() );
- QLabel *label = new QLabel( i18n( "Do you want to import this contact in your address book?" ), page );
- QFont font = label->font();
+ TQLabel *label = new TQLabel( i18n( "Do you want to import this contact in your address book?" ), page );
+ TQFont font = label->font();
font.setBold( true );
label->setFont( font );
layout->addWidget( label );
mView = new KPIM::AddresseeView( page );
mView->enableLinks( 0 );
- mView->setVScrollBarMode( QScrollView::Auto );
+ mView->setVScrollBarMode( TQScrollView::Auto );
layout->addWidget( mView );
setButtonText( Apply, i18n( "Import All..." ) );
@@ -459,39 +459,39 @@ void VCardViewerDialog::slotUser2()
void VCardViewerDialog::slotApply()
{
- QDialog::accept();
+ TQDialog::accept();
}
void VCardViewerDialog::slotCancel()
{
mContacts.clear();
- QDialog::accept();
+ TQDialog::accept();
}
// ---------- VCardExportSelection Dialog ---------------- //
-VCardExportSelectionDialog::VCardExportSelectionDialog( QWidget *parent,
+VCardExportSelectionDialog::VCardExportSelectionDialog( TQWidget *parent,
const char *name )
: KDialogBase( Plain, i18n( "Select vCard Fields" ), Ok | Cancel, Ok,
parent, name, true, true )
{
- QFrame *page = plainPage();
+ TQFrame *page = plainPage();
- QVBoxLayout *layout = new QVBoxLayout( page, marginHint(), spacingHint() );
+ TQVBoxLayout *layout = new TQVBoxLayout( page, marginHint(), spacingHint() );
- QLabel *label = new QLabel( i18n( "Select the fields which shall be exported in the vCard." ), page );
+ TQLabel *label = new TQLabel( i18n( "Select the fields which shall be exported in the vCard." ), page );
layout->addWidget( label );
- mPrivateBox = new QCheckBox( i18n( "Private fields" ), page );
+ mPrivateBox = new TQCheckBox( i18n( "Private fields" ), page );
layout->addWidget( mPrivateBox );
- mBusinessBox = new QCheckBox( i18n( "Business fields" ), page );
+ mBusinessBox = new TQCheckBox( i18n( "Business fields" ), page );
layout->addWidget( mBusinessBox );
- mOtherBox = new QCheckBox( i18n( "Other fields" ), page );
+ mOtherBox = new TQCheckBox( i18n( "Other fields" ), page );
layout->addWidget( mOtherBox );
- mEncryptionKeys = new QCheckBox( i18n( "Encryption keys" ), page );
+ mEncryptionKeys = new TQCheckBox( i18n( "Encryption keys" ), page );
layout->addWidget( mEncryptionKeys );
KConfig config( "kaddressbookrc" );
diff --git a/kaddressbook/xxport/vcard_xxport.h b/kaddressbook/xxport/vcard_xxport.h
index d67aaeffe..8208e23c6 100644
--- a/kaddressbook/xxport/vcard_xxport.h
+++ b/kaddressbook/xxport/vcard_xxport.h
@@ -31,17 +31,17 @@ class VCardXXPort : public KAB::XXPort
Q_OBJECT
public:
- VCardXXPort( KABC::AddressBook *ab, QWidget *parent, const char *name = 0 );
+ VCardXXPort( KABC::AddressBook *ab, TQWidget *parent, const char *name = 0 );
- QString identifier() const { return "vcard"; }
+ TQString identifier() const { return "vcard"; }
public slots:
- bool exportContacts( const KABC::AddresseeList &list, const QString &data );
- KABC::AddresseeList importContacts( const QString &data ) const;
+ bool exportContacts( const KABC::AddresseeList &list, const TQString &data );
+ KABC::AddresseeList importContacts( const TQString &data ) const;
private:
- KABC::AddresseeList parseVCard( const QString &data ) const;
- bool doExport( const KURL &url, const QString &data );
+ KABC::AddresseeList parseVCard( const TQString &data ) const;
+ bool doExport( const KURL &url, const TQString &data );
void addKey( KABC::Addressee &addr, KABC::Key::Types type );
KABC::AddresseeList filterContacts( const KABC::AddresseeList& );
diff --git a/kaddressbook/xxportmanager.cpp b/kaddressbook/xxportmanager.cpp
index 3382ac439..c46855c47 100644
--- a/kaddressbook/xxportmanager.cpp
+++ b/kaddressbook/xxportmanager.cpp
@@ -21,7 +21,7 @@
without including the source code for Qt in the source distribution.
*/
-#include <qlayout.h>
+#include <tqlayout.h>
#include <kabc/addressbook.h>
#include <kabc/resource.h>
@@ -39,10 +39,10 @@
#include "xxportmanager.h"
KURL XXPortManager::importURL = KURL();
-QString XXPortManager::importData = QString::null;
+TQString XXPortManager::importData = TQString::null;
-XXPortManager::XXPortManager( KAB::Core *core, QObject *parent, const char *name )
- : QObject( parent, name ), mCore( core )
+XXPortManager::XXPortManager( KAB::Core *core, TQObject *parent, const char *name )
+ : TQObject( parent, name ), mCore( core )
{
loadPlugins();
}
@@ -66,14 +66,14 @@ void XXPortManager::importVCard( const KURL &url )
importURL = KURL();
}
-void XXPortManager::importVCardFromData( const QString &vCard )
+void XXPortManager::importVCardFromData( const TQString &vCard )
{
importData = vCard;
slotImport( "vcard", "<empty>" );
importData = "";
}
-void XXPortManager::slotImport( const QString &identifier, const QString &data )
+void XXPortManager::slotImport( const TQString &identifier, const TQString &data )
{
KAB::XXPort *obj = mXXPortObjects[ identifier ];
if ( !obj ) {
@@ -97,7 +97,7 @@ void XXPortManager::slotImport( const QString &identifier, const QString &data )
}
}
-void XXPortManager::slotExport( const QString &identifier, const QString &data )
+void XXPortManager::slotExport( const TQString &identifier, const TQString &data )
{
KAB::XXPort *obj = mXXPortObjects[ identifier ];
if ( !obj ) {
@@ -121,7 +121,7 @@ void XXPortManager::loadPlugins()
mXXPortObjects.clear();
const KTrader::OfferList plugins = KTrader::self()->query( "KAddressBook/XXPort",
- QString( "[X-KDE-KAddressBook-XXPortPluginVersion] == %1" ).arg( KAB_XXPORT_PLUGIN_VERSION ) );
+ TQString( "[X-KDE-KAddressBook-XXPortPluginVersion] == %1" ).arg( KAB_XXPORT_PLUGIN_VERSION ) );
KTrader::OfferList::ConstIterator it;
for ( it = plugins.begin(); it != plugins.end(); ++it ) {
if ( !(*it)->hasServiceType( "KAddressBook/XXPort" ) )
@@ -146,10 +146,10 @@ void XXPortManager::loadPlugins()
mCore->guiClient()->insertChildClient( obj );
mXXPortObjects.insert( obj->identifier(), obj );
- connect( obj, SIGNAL( exportActivated( const QString&, const QString& ) ),
- this, SLOT( slotExport( const QString&, const QString& ) ) );
- connect( obj, SIGNAL( importActivated( const QString&, const QString& ) ),
- this, SLOT( slotImport( const QString&, const QString& ) ) );
+ connect( obj, TQT_SIGNAL( exportActivated( const TQString&, const TQString& ) ),
+ this, TQT_SLOT( slotExport( const TQString&, const TQString& ) ) );
+ connect( obj, TQT_SIGNAL( importActivated( const TQString&, const TQString& ) ),
+ this, TQT_SLOT( slotImport( const TQString&, const TQString& ) ) );
obj->setKApplication( kapp );
}
diff --git a/kaddressbook/xxportmanager.h b/kaddressbook/xxportmanager.h
index 4b52c8b5e..92bc48fa0 100644
--- a/kaddressbook/xxportmanager.h
+++ b/kaddressbook/xxportmanager.h
@@ -24,8 +24,8 @@
#ifndef XXPORTMANAGER_H
#define XXPORTMANAGER_H
-#include <qdict.h>
-#include <qobject.h>
+#include <tqdict.h>
+#include <tqobject.h>
#include <kurl.h>
@@ -42,30 +42,30 @@ class KDE_EXPORT XXPortManager : public QObject
Q_OBJECT
public:
- XXPortManager( KAB::Core *core, QObject *parent, const char *name = 0 );
+ XXPortManager( KAB::Core *core, TQObject *parent, const char *name = 0 );
~XXPortManager();
void restoreSettings();
void saveSettings();
static KURL importURL;
- static QString importData;
+ static TQString importData;
public slots:
void importVCard( const KURL &url );
- void importVCardFromData( const QString &vCard );
+ void importVCardFromData( const TQString &vCard );
signals:
void modified();
protected slots:
- void slotImport( const QString&, const QString& );
- void slotExport( const QString&, const QString& );
+ void slotImport( const TQString&, const TQString& );
+ void slotExport( const TQString&, const TQString& );
private:
void loadPlugins();
- QDict<KAB::XXPort> mXXPortObjects;
+ TQDict<KAB::XXPort> mXXPortObjects;
KAB::Core *mCore;
};
diff --git a/kaddressbook/xxportselectdialog.cpp b/kaddressbook/xxportselectdialog.cpp
index a32c10807..1cbf75a56 100644
--- a/kaddressbook/xxportselectdialog.cpp
+++ b/kaddressbook/xxportselectdialog.cpp
@@ -27,16 +27,16 @@
#include <kcombobox.h>
#include <klocale.h>
-#include <qbuttongroup.h>
-#include <qcombobox.h>
-#include <qheader.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qlistview.h>
-#include <qpushbutton.h>
-#include <qradiobutton.h>
-#include <qstringlist.h>
-#include <qwhatsthis.h>
+#include <tqbuttongroup.h>
+#include <tqcombobox.h>
+#include <tqheader.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqlistview.h>
+#include <tqpushbutton.h>
+#include <tqradiobutton.h>
+#include <tqstringlist.h>
+#include <tqwhatsthis.h>
#include "core.h"
#include "kabprefs.h"
@@ -44,22 +44,22 @@
#include "xxportselectdialog.h"
XXPortSelectDialog::XXPortSelectDialog( KAB::Core *core, bool sort,
- QWidget* parent, const char* name )
+ TQWidget* parent, const char* name )
: KDialogBase( Plain, i18n( "Choose Which Contacts to Export" ), Help | Ok | Cancel,
Ok, parent, name, true, true ), mCore( core ),
mUseSorting( sort )
{
initGUI();
- connect( mFiltersCombo, SIGNAL( activated( int ) ),
- SLOT( filterChanged( int ) ) );
- connect( mCategoriesView, SIGNAL( clicked( QListViewItem* ) ),
- SLOT( categoryClicked( QListViewItem* ) ) );
+ connect( mFiltersCombo, TQT_SIGNAL( activated( int ) ),
+ TQT_SLOT( filterChanged( int ) ) );
+ connect( mCategoriesView, TQT_SIGNAL( clicked( TQListViewItem* ) ),
+ TQT_SLOT( categoryClicked( TQListViewItem* ) ) );
// setup filters
mFilters = Filter::restore( kapp->config(), "Filter" );
Filter::List::ConstIterator filterIt;
- QStringList filters;
+ TQStringList filters;
for ( filterIt = mFilters.begin(); filterIt != mFilters.end(); ++filterIt )
filters.append( (*filterIt).name() );
@@ -67,10 +67,10 @@ XXPortSelectDialog::XXPortSelectDialog( KAB::Core *core, bool sort,
mUseFilters->setEnabled( filters.count() > 0 );
// setup categories
- const QStringList categories = KABPrefs::instance()->customCategories();
- QStringList::ConstIterator it;
+ const TQStringList categories = KABPrefs::instance()->customCategories();
+ TQStringList::ConstIterator it;
for ( it = categories.begin(); it != categories.end(); ++it )
- new QCheckListItem( mCategoriesView, *it, QCheckListItem::CheckBox );
+ new TQCheckListItem( mCategoriesView, *it, TQCheckListItem::CheckBox );
mUseCategories->setEnabled( categories.count() > 0 );
int count = mCore->selectedUIDs().count();
@@ -88,11 +88,11 @@ XXPortSelectDialog::XXPortSelectDialog( KAB::Core *core, bool sort,
KABC::AddresseeList XXPortSelectDialog::contacts()
{
- const QStringList selection = mCore->selectedUIDs();
+ const TQStringList selection = mCore->selectedUIDs();
KABC::AddresseeList list;
if ( mUseSelection->isChecked() ) {
- QStringList::ConstIterator it;
+ TQStringList::ConstIterator it;
for ( it = selection.begin(); it != selection.end(); ++it ) {
KABC::Addressee addr = mCore->addressBook()->findByUid( *it );
if ( !addr.isEmpty() )
@@ -111,13 +111,13 @@ KABC::AddresseeList XXPortSelectDialog::contacts()
list.append( *it );
}
} else if ( mUseCategories->isChecked() ) {
- const QStringList categorieList = categories();
+ const TQStringList categorieList = categories();
KABC::AddressBook::ConstIterator it;
KABC::AddressBook::ConstIterator addressBookEnd( mCore->addressBook()->end() );
for ( it = mCore->addressBook()->begin(); it != addressBookEnd; ++it ) {
- const QStringList tmp( (*it).categories() );
- QStringList::ConstIterator tmpIt;
+ const TQStringList tmp( (*it).categories() );
+ TQStringList::ConstIterator tmpIt;
for ( tmpIt = tmp.begin(); tmpIt != tmp.end(); ++tmpIt )
if ( categorieList.contains( *tmpIt ) ) {
list.append( *it );
@@ -141,13 +141,13 @@ KABC::AddresseeList XXPortSelectDialog::contacts()
return list;
}
-QStringList XXPortSelectDialog::categories() const
+TQStringList XXPortSelectDialog::categories() const
{
- QStringList list;
+ TQStringList list;
- QListViewItemIterator it( mCategoriesView );
+ TQListViewItemIterator it( mCategoriesView );
for ( ; it.current(); ++it ) {
- QCheckListItem* qcli = static_cast<QCheckListItem*>(it.current());
+ TQCheckListItem* qcli = static_cast<TQCheckListItem*>(it.current());
if ( qcli->isOn() )
list.append( it.current()->text( 0 ) );
}
@@ -160,12 +160,12 @@ void XXPortSelectDialog::filterChanged( int )
mUseFilters->setChecked( true );
}
-void XXPortSelectDialog::categoryClicked( QListViewItem *i )
+void XXPortSelectDialog::categoryClicked( TQListViewItem *i )
{
if ( !i )
return;
- QCheckListItem *qcli = static_cast<QCheckListItem*>( i );
+ TQCheckListItem *qcli = static_cast<TQCheckListItem*>( i );
if ( qcli->isOn() )
mUseCategories->setChecked( true );
}
@@ -177,66 +177,66 @@ void XXPortSelectDialog::slotHelp()
void XXPortSelectDialog::initGUI()
{
- QFrame *page = plainPage();
+ TQFrame *page = plainPage();
- QVBoxLayout *topLayout = new QVBoxLayout( page, KDialog::marginHint(),
+ TQVBoxLayout *topLayout = new TQVBoxLayout( page, KDialog::marginHint(),
KDialog::spacingHint() );
- QLabel *label = new QLabel( i18n( "Which contacts do you want to export?" ), page );
+ TQLabel *label = new TQLabel( i18n( "Which contacts do you want to export?" ), page );
topLayout->addWidget( label );
- mButtonGroup = new QButtonGroup( i18n( "Selection" ), page );
+ mButtonGroup = new TQButtonGroup( i18n( "Selection" ), page );
mButtonGroup->setColumnLayout( 0, Qt::Vertical );
mButtonGroup->layout()->setSpacing( KDialog::spacingHint() );
mButtonGroup->layout()->setMargin( KDialog::marginHint() );
- QGridLayout *groupLayout = new QGridLayout( mButtonGroup->layout() );
+ TQGridLayout *groupLayout = new TQGridLayout( mButtonGroup->layout() );
groupLayout->setAlignment( Qt::AlignTop );
- mUseWholeBook = new QRadioButton( i18n( "&All contacts" ), mButtonGroup );
+ mUseWholeBook = new TQRadioButton( i18n( "&All contacts" ), mButtonGroup );
mUseWholeBook->setChecked( true );
- QWhatsThis::add( mUseWholeBook, i18n( "Export the entire address book" ) );
+ TQWhatsThis::add( mUseWholeBook, i18n( "Export the entire address book" ) );
groupLayout->addWidget( mUseWholeBook, 0, 0 );
- mUseSelection = new QRadioButton( i18n("&Selected contact", "&Selected contacts (%n selected)", mCore->selectedUIDs().count() ), mButtonGroup );
- QWhatsThis::add( mUseSelection, i18n( "Only export contacts selected in KAddressBook.\n"
+ mUseSelection = new TQRadioButton( i18n("&Selected contact", "&Selected contacts (%n selected)", mCore->selectedUIDs().count() ), mButtonGroup );
+ TQWhatsThis::add( mUseSelection, i18n( "Only export contacts selected in KAddressBook.\n"
"This option is disabled if no contacts are selected." ) );
groupLayout->addWidget( mUseSelection, 1, 0 );
- mUseFilters = new QRadioButton( i18n( "Contacts matching &filter" ), mButtonGroup );
- QWhatsThis::add( mUseFilters, i18n( "Only export contacts matching the selected filter.\n"
+ mUseFilters = new TQRadioButton( i18n( "Contacts matching &filter" ), mButtonGroup );
+ TQWhatsThis::add( mUseFilters, i18n( "Only export contacts matching the selected filter.\n"
"This option is disabled if you have not defined any filters" ) );
groupLayout->addWidget( mUseFilters, 2, 0 );
- mUseCategories = new QRadioButton( i18n( "Category &members" ), mButtonGroup );
- QWhatsThis::add( mUseCategories, i18n( "Only export contacts who are members of a category that is checked on the list to the left.\n"
+ mUseCategories = new TQRadioButton( i18n( "Category &members" ), mButtonGroup );
+ TQWhatsThis::add( mUseCategories, i18n( "Only export contacts who are members of a category that is checked on the list to the left.\n"
"This option is disabled if you have no categories." ) );
groupLayout->addWidget( mUseCategories, 3, 0, Qt::AlignTop );
- mFiltersCombo = new QComboBox( false, mButtonGroup );
- QWhatsThis::add( mFiltersCombo, i18n( "Select a filter to decide which contacts to export." ) );
+ mFiltersCombo = new TQComboBox( false, mButtonGroup );
+ TQWhatsThis::add( mFiltersCombo, i18n( "Select a filter to decide which contacts to export." ) );
groupLayout->addWidget( mFiltersCombo, 2, 1 );
- mCategoriesView = new QListView( mButtonGroup );
+ mCategoriesView = new TQListView( mButtonGroup );
mCategoriesView->addColumn( "" );
mCategoriesView->header()->hide();
- QWhatsThis::add( mCategoriesView, i18n( "Check the categories whose members you want to export." ) );
+ TQWhatsThis::add( mCategoriesView, i18n( "Check the categories whose members you want to export." ) );
groupLayout->addWidget( mCategoriesView, 3, 1 );
topLayout->addWidget( mButtonGroup );
- QButtonGroup *sortingGroup = new QButtonGroup( i18n( "Sorting" ), page );
+ TQButtonGroup *sortingGroup = new TQButtonGroup( i18n( "Sorting" ), page );
sortingGroup->setColumnLayout( 0, Qt::Vertical );
- QGridLayout *sortLayout = new QGridLayout( sortingGroup->layout(), 2, 2,
+ TQGridLayout *sortLayout = new TQGridLayout( sortingGroup->layout(), 2, 2,
KDialog::spacingHint() );
sortLayout->setAlignment( Qt::AlignTop );
- label = new QLabel( i18n( "Criterion:" ), sortingGroup );
+ label = new TQLabel( i18n( "Criterion:" ), sortingGroup );
sortLayout->addWidget( label, 0, 0 );
mFieldCombo = new KComboBox( false, sortingGroup );
sortLayout->addWidget( mFieldCombo, 0, 1 );
- label = new QLabel( i18n( "Order:" ), sortingGroup );
+ label = new TQLabel( i18n( "Order:" ), sortingGroup );
sortLayout->addWidget( label, 1, 0 );
mSortTypeCombo = new KComboBox( false, sortingGroup );
diff --git a/kaddressbook/xxportselectdialog.h b/kaddressbook/xxportselectdialog.h
index e785ec318..535ad4743 100644
--- a/kaddressbook/xxportselectdialog.h
+++ b/kaddressbook/xxportselectdialog.h
@@ -47,29 +47,29 @@ class XXPortSelectDialog : public KDialogBase
Q_OBJECT
public:
- XXPortSelectDialog( KAB::Core *core, bool sort, QWidget* parent,
+ XXPortSelectDialog( KAB::Core *core, bool sort, TQWidget* parent,
const char* name = 0 );
KABC::AddresseeList contacts();
private slots:
void filterChanged( int );
- void categoryClicked( QListViewItem * i );
+ void categoryClicked( TQListViewItem * i );
protected slots:
void slotHelp();
private:
void initGUI();
- QStringList categories() const;
-
- QButtonGroup* mButtonGroup;
- QRadioButton* mUseCategories;
- QRadioButton* mUseFilters;
- QRadioButton* mUseWholeBook;
- QRadioButton* mUseSelection;
- QComboBox* mFiltersCombo;
- QListView* mCategoriesView;
+ TQStringList categories() const;
+
+ TQButtonGroup* mButtonGroup;
+ TQRadioButton* mUseCategories;
+ TQRadioButton* mUseFilters;
+ TQRadioButton* mUseWholeBook;
+ TQRadioButton* mUseSelection;
+ TQComboBox* mFiltersCombo;
+ TQListView* mCategoriesView;
KComboBox *mFieldCombo;
KComboBox *mSortTypeCombo;
diff --git a/kalarm/alarmcalendar.cpp b/kalarm/alarmcalendar.cpp
index 85c4f7bcf..4b03f3050 100644
--- a/kalarm/alarmcalendar.cpp
+++ b/kalarm/alarmcalendar.cpp
@@ -22,10 +22,10 @@
#include <unistd.h>
#include <time.h>
-#include <qfile.h>
-#include <qtextstream.h>
-#include <qregexp.h>
-#include <qtimer.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
+#include <tqregexp.h>
+#include <tqtimer.h>
#include <klocale.h>
#include <kmessagebox.h>
@@ -59,19 +59,19 @@ extern "C" {
using namespace KCal;
-QString AlarmCalendar::icalProductId()
+TQString AlarmCalendar::icalProductId()
{
- return QString::fromLatin1("-//K Desktop Environment//NONSGML " KALARM_NAME " %1//EN").arg(KAlarm::currentCalendarVersionString());
+ return TQString::fromLatin1("-//K Desktop Environment//NONSGML " KALARM_NAME " %1//EN").arg(KAlarm::currentCalendarVersionString());
}
static const KAEvent::Status eventTypes[AlarmCalendar::NCALS] = {
KAEvent::ACTIVE, KAEvent::EXPIRED, KAEvent::DISPLAYING, KAEvent::TEMPLATE
};
-static const QString calendarNames[AlarmCalendar::NCALS] = {
- QString::fromLatin1("calendar.ics"),
- QString::fromLatin1("expired.ics"),
- QString::fromLatin1("displaying.ics"),
- QString::fromLatin1("template.ics")
+static const TQString calendarNames[AlarmCalendar::NCALS] = {
+ TQString::fromLatin1("calendar.ics"),
+ TQString::fromLatin1("expired.ics"),
+ TQString::fromLatin1("displaying.ics"),
+ TQString::fromLatin1("template.ics")
};
static KStaticDeleter<AlarmCalendar> calendarDeleter[AlarmCalendar::NCALS]; // ensure that the calendar destructors are called
@@ -91,17 +91,17 @@ AlarmCalendar* AlarmCalendar::mCalendars[NCALS] = { 0, 0, 0, 0 };
bool AlarmCalendar::initialiseCalendars()
{
KConfig* config = kapp->config();
- config->setGroup(QString::fromLatin1("General"));
- QString activeKey = QString::fromLatin1("Calendar");
- QString expiredKey = QString::fromLatin1("ExpiredCalendar");
- QString templateKey = QString::fromLatin1("TemplateCalendar");
- QString displayCal, activeCal, expiredCal, templateCal;
+ config->setGroup(TQString::fromLatin1("General"));
+ TQString activeKey = TQString::fromLatin1("Calendar");
+ TQString expiredKey = TQString::fromLatin1("ExpiredCalendar");
+ TQString templateKey = TQString::fromLatin1("TemplateCalendar");
+ TQString displayCal, activeCal, expiredCal, templateCal;
calendarDeleter[ACTIVE].setObject(mCalendars[ACTIVE], createCalendar(ACTIVE, config, activeCal, activeKey));
calendarDeleter[EXPIRED].setObject(mCalendars[EXPIRED], createCalendar(EXPIRED, config, expiredCal, expiredKey));
calendarDeleter[DISPLAY].setObject(mCalendars[DISPLAY], createCalendar(DISPLAY, config, displayCal));
calendarDeleter[TEMPLATE].setObject(mCalendars[TEMPLATE], createCalendar(TEMPLATE, config, templateCal, templateKey));
- QString errorKey1, errorKey2;
+ TQString errorKey1, errorKey2;
if (activeCal == displayCal)
errorKey1 = activeKey;
else if (expiredCal == displayCal)
@@ -111,7 +111,7 @@ bool AlarmCalendar::initialiseCalendars()
if (!errorKey1.isNull())
{
kdError(5950) << "AlarmCalendar::initialiseCalendars(): '" << errorKey1 << "' calendar name = display calendar name\n";
- QString file = config->readPathEntry(errorKey1);
+ TQString file = config->readPathEntry(errorKey1);
KAlarmApp::displayFatalError(i18n("%1: file name not permitted: %2").arg(errorKey1).arg(file));
return false;
}
@@ -138,7 +138,7 @@ bool AlarmCalendar::initialiseCalendars()
}
if (!mCalendars[ACTIVE]->valid())
{
- QString path = mCalendars[ACTIVE]->path();
+ TQString path = mCalendars[ACTIVE]->path();
kdError(5950) << "AlarmCalendar::initialiseCalendars(): invalid name: " << path << endl;
KAlarmApp::displayFatalError(i18n("Invalid calendar file name: %1").arg(path));
return false;
@@ -150,10 +150,10 @@ bool AlarmCalendar::initialiseCalendars()
* Create an alarm calendar instance.
* If 'configKey' is non-null, the calendar will be converted to ICal format.
*/
-AlarmCalendar* AlarmCalendar::createCalendar(CalID type, KConfig* config, QString& writePath, const QString& configKey)
+AlarmCalendar* AlarmCalendar::createCalendar(CalID type, KConfig* config, TQString& writePath, const TQString& configKey)
{
- static QRegExp vcsRegExp(QString::fromLatin1("\\.vcs$"));
- static QString ical = QString::fromLatin1(".ics");
+ static TQRegExp vcsRegExp(TQString::fromLatin1("\\.vcs$"));
+ static TQString ical = TQString::fromLatin1(".ics");
if (configKey.isNull())
{
@@ -162,7 +162,7 @@ AlarmCalendar* AlarmCalendar::createCalendar(CalID type, KConfig* config, QStrin
}
else
{
- QString readPath = config->readPathEntry(configKey, locateLocal("appdata", calendarNames[type]));
+ TQString readPath = config->readPathEntry(configKey, locateLocal("appdata", calendarNames[type]));
writePath = readPath;
writePath.replace(vcsRegExp, ical);
return new AlarmCalendar(readPath, type, writePath, configKey);
@@ -201,7 +201,7 @@ AlarmCalendar* AlarmCalendar::calendarOpen(CalID id)
* Find and return the event with the specified ID.
* The calendar searched is determined by the calendar identifier in the ID.
*/
-const KCal::Event* AlarmCalendar::getEvent(const QString& uniqueID)
+const KCal::Event* AlarmCalendar::getEvent(const TQString& uniqueID)
{
if (uniqueID.isEmpty())
return 0;
@@ -228,10 +228,10 @@ const KCal::Event* AlarmCalendar::getEvent(const QString& uniqueID)
* If 'configKey' is also non-null, that config file entry will be updated when
* the file is saved in ICal format.
*/
-AlarmCalendar::AlarmCalendar(const QString& path, CalID type, const QString& icalPath,
- const QString& configKey)
+AlarmCalendar::AlarmCalendar(const TQString& path, CalID type, const TQString& icalPath,
+ const TQString& configKey)
: mCalendar(0),
- mConfigKey(icalPath.isNull() ? QString::null : configKey),
+ mConfigKey(icalPath.isNull() ? TQString::null : configKey),
mType(eventTypes[type]),
mPurgeDays(-1), // default to not purging
mOpen(false),
@@ -261,7 +261,7 @@ bool AlarmCalendar::open()
kdDebug(5950) << "AlarmCalendar::open(" << mUrl.prettyURL() << ")\n";
if (!mCalendar)
- mCalendar = new CalendarLocal(QString::fromLatin1("UTC"));
+ mCalendar = new CalendarLocal(TQString::fromLatin1("UTC"));
mCalendar->setLocalTime(); // write out using local time (i.e. no time zone)
// Check for file's existence, assuming that it does exist when uncertain,
@@ -317,7 +317,7 @@ int AlarmCalendar::load()
return -2;
kdDebug(5950) << "AlarmCalendar::load(): " << mUrl.prettyURL() << endl;
- QString tmpFile;
+ TQString tmpFile;
if (!KIO::NetAccess::download(mUrl, tmpFile, MainWindow::mainMainWindow()))
{
kdError(5950) << "AlarmCalendar::load(): Load failure" << endl;
@@ -325,7 +325,7 @@ int AlarmCalendar::load()
return -1;
}
kdDebug(5950) << "AlarmCalendar::load(): --- Downloaded to " << tmpFile << endl;
- mCalendar->setTimeZoneId(QString::null); // default to the local time zone for reading
+ mCalendar->setTimeZoneId(TQString::null); // default to the local time zone for reading
bool loaded = mCalendar->load(tmpFile);
mCalendar->setLocalTime(); // write using local time (i.e. no time zone)
if (!loaded)
@@ -371,13 +371,13 @@ bool AlarmCalendar::reload()
* Save the calendar from memory to file.
* If a filename is specified, create a new calendar file.
*/
-bool AlarmCalendar::saveCal(const QString& newFile)
+bool AlarmCalendar::saveCal(const TQString& newFile)
{
if (!mCalendar || !mOpen && newFile.isNull())
return false;
kdDebug(5950) << "AlarmCalendar::saveCal(\"" << newFile << "\", " << mType << ")\n";
- QString saveFilename = newFile.isNull() ? mLocalFile : newFile;
+ TQString saveFilename = newFile.isNull() ? mLocalFile : newFile;
if (mVCal && newFile.isNull() && mUrl.isLocalFile())
saveFilename = mICalUrl.path();
if (!mCalendar->save(saveFilename, new ICalFormat))
@@ -404,7 +404,7 @@ bool AlarmCalendar::saveCal(const QString& newFile)
if (!mConfigKey.isNull())
{
KConfig* config = kapp->config();
- config->setGroup(QString::fromLatin1("General"));
+ config->setGroup(TQString::fromLatin1("General"));
config->writePathEntry(mConfigKey, mICalUrl.path());
config->sync();
}
@@ -443,10 +443,10 @@ void AlarmCalendar::close()
* Reply = true if all alarms in the calendar were successfully imported
* = false if any alarms failed to be imported.
*/
-bool AlarmCalendar::importAlarms(QWidget* parent)
+bool AlarmCalendar::importAlarms(TQWidget* parent)
{
- KURL url = KFileDialog::getOpenURL(QString::fromLatin1(":importalarms"),
- QString::fromLatin1("*.vcs *.ics|%1").arg(i18n("Calendar Files")), parent);
+ KURL url = KFileDialog::getOpenURL(TQString::fromLatin1(":importalarms"),
+ TQString::fromLatin1("*.vcs *.ics|%1").arg(i18n("Calendar Files")), parent);
if (url.isEmpty())
{
kdError(5950) << "AlarmCalendar::importAlarms(): Empty URL" << endl;
@@ -460,7 +460,7 @@ bool AlarmCalendar::importAlarms(QWidget* parent)
kdDebug(5950) << "AlarmCalendar::importAlarms(" << url.prettyURL() << ")" << endl;
bool success = true;
- QString filename;
+ TQString filename;
bool local = url.isLocalFile();
if (local)
{
@@ -484,7 +484,7 @@ bool AlarmCalendar::importAlarms(QWidget* parent)
}
// Read the calendar and add its alarms to the current calendars
- CalendarLocal cal(QString::fromLatin1("UTC"));
+ CalendarLocal cal(TQString::fromLatin1("UTC"));
cal.setLocalTime(); // write out using local time (i.e. no time zone)
success = cal.load(filename);
if (!success)
@@ -544,7 +544,7 @@ bool AlarmCalendar::importAlarms(QWidget* parent)
if (alarm->type() == Alarm::Display && alarm->text().isEmpty())
alarm->setText(newev->summary());
}
- newev->setSummary(QString::null); // KAlarm only uses summary for template names
+ newev->setSummary(TQString::null); // KAlarm only uses summary for template names
}
// Give the event a new ID and add it to the calendar
newev->setUid(KAEvent::uid(CalFormat::createUniqueId(), type));
@@ -616,7 +616,7 @@ void AlarmCalendar::convertToICal()
if (!mConfigKey.isNull())
{
KConfig* config = kapp->config();
- config->setGroup(QString::fromLatin1("General"));
+ config->setGroup(TQString::fromLatin1("General"));
config->writePathEntry(mConfigKey, mICalUrl.path());
config->sync();
}
@@ -688,7 +688,7 @@ void AlarmCalendar::purgeIfQueued()
{
kdDebug(5950) << "AlarmCalendar::purgeIfQueued(" << mPurgeDaysQueued << ")\n";
bool changed = false;
- QDate cutoff = QDate::currentDate().addDays(-mPurgeDaysQueued);
+ TQDate cutoff = TQDate::currentDate().addDays(-mPurgeDaysQueued);
Event::List events = mCalendar->rawEvents();
for (Event::List::ConstIterator it = events.begin(); it != events.end(); ++it)
{
@@ -717,7 +717,7 @@ void AlarmCalendar::purgeIfQueued()
void AlarmCalendar::startPurgeTimer()
{
if (mPurgeDays > 0)
- StartOfDayTimer::connect(this, SLOT(slotPurge()));
+ StartOfDayTimer::connect(this, TQT_SLOT(slotPurge()));
}
/******************************************************************************
@@ -731,7 +731,7 @@ Event* AlarmCalendar::addEvent(KAEvent& event, bool useEventID)
{
if (!mOpen)
return 0;
- QString id = event.id();
+ TQString id = event.id();
Event* kcalEvent = new Event;
if (mType == KAEvent::ACTIVE)
{
@@ -784,7 +784,7 @@ void AlarmCalendar::updateEvent(const KAEvent& evnt)
* Delete the specified event from the calendar, if it exists.
* The calendar is then optionally saved.
*/
-bool AlarmCalendar::deleteEvent(const QString& eventID, bool saveit)
+bool AlarmCalendar::deleteEvent(const TQString& eventID, bool saveit)
{
if (mOpen)
{
@@ -815,7 +815,7 @@ void AlarmCalendar::emitEmptyStatus()
/******************************************************************************
* Return the event with the specified ID.
*/
-KCal::Event* AlarmCalendar::event(const QString& uniqueID)
+KCal::Event* AlarmCalendar::event(const TQString& uniqueID)
{
return mCalendar ? mCalendar->event(uniqueID) : 0;
}
@@ -843,11 +843,11 @@ KCal::Event::List AlarmCalendar::events()
/******************************************************************************
* Return all events which have alarms falling within the specified time range.
*/
-Event::List AlarmCalendar::eventsWithAlarms(const QDateTime& from, const QDateTime& to)
+Event::List AlarmCalendar::eventsWithAlarms(const TQDateTime& from, const TQDateTime& to)
{
kdDebug(5950) << "AlarmCalendar::eventsWithAlarms(" << from.toString() << " - " << to.toString() << ")\n";
Event::List evnts;
- QDateTime dt;
+ TQDateTime dt;
Event::List allEvents = events(); // ignore events without usable alarms
for (Event::List::ConstIterator it = allEvents.begin(); it != allEvents.end(); ++it)
{
@@ -883,7 +883,7 @@ Event::List AlarmCalendar::eventsWithAlarms(const QDateTime& from, const QDateTi
offset = alarm->endOffset().asSeconds() + endOffset;
}
// Adjust the 'from' date/time and find the next recurrence at or after it
- QDateTime pre = from.addSecs(-offset - 1);
+ TQDateTime pre = from.addSecs(-offset - 1);
if (e->doesFloat() && pre.time() < Preferences::startOfDay())
pre = pre.addDays(-1); // today's recurrence (if today recurs) is still to come
dt = e->recurrence()->getNextDateTime(pre);
diff --git a/kalarm/alarmcalendar.h b/kalarm/alarmcalendar.h
index 87abc2d13..be96c3879 100644
--- a/kalarm/alarmcalendar.h
+++ b/kalarm/alarmcalendar.h
@@ -21,7 +21,7 @@
#ifndef ALARMCALENDAR_H
#define ALARMCALENDAR_H
-#include <qobject.h>
+#include <tqobject.h>
#include <kurl.h>
#include <libkcal/calendarlocal.h>
#include "alarmevent.h"
@@ -47,21 +47,21 @@ class AlarmCalendar : public QObject
void close();
void startUpdate();
bool endUpdate();
- KCal::Event* event(const QString& uniqueID);
+ KCal::Event* event(const TQString& uniqueID);
KCal::Event::List events();
- KCal::Event::List eventsWithAlarms(const QDateTime& from, const QDateTime& to);
+ KCal::Event::List eventsWithAlarms(const TQDateTime& from, const TQDateTime& to);
KCal::Event* addEvent(KAEvent&, bool useEventID = false);
void updateEvent(const KAEvent&);
- bool deleteEvent(const QString& eventID, bool save = false);
+ bool deleteEvent(const TQString& eventID, bool save = false);
void emitEmptyStatus();
void purgeAll() { purge(0); }
void setPurgeDays(int days);
void purgeIfQueued(); // must only be called from KAlarmApp::processQueue()
bool isOpen() const { return mOpen; }
- QString path() const { return mUrl.prettyURL(); }
- QString urlString() const { return mUrl.url(); }
+ TQString path() const { return mUrl.prettyURL(); }
+ TQString urlString() const { return mUrl.url(); }
- static QString icalProductId();
+ static TQString icalProductId();
static bool initialiseCalendars();
static void terminateCalendars();
static AlarmCalendar* activeCalendar() { return mCalendars[ACTIVE]; }
@@ -72,8 +72,8 @@ class AlarmCalendar : public QObject
static AlarmCalendar* expiredCalendarOpen() { return calendarOpen(EXPIRED); }
static AlarmCalendar* displayCalendarOpen() { return calendarOpen(DISPLAY); }
static AlarmCalendar* templateCalendarOpen() { return calendarOpen(TEMPLATE); }
- static bool importAlarms(QWidget*);
- static const KCal::Event* getEvent(const QString& uniqueID);
+ static bool importAlarms(TQWidget*);
+ static const KCal::Event* getEvent(const TQString& uniqueID);
enum CalID { ACTIVE, EXPIRED, DISPLAY, TEMPLATE, NCALS };
@@ -86,13 +86,13 @@ class AlarmCalendar : public QObject
void slotPurge();
private:
- AlarmCalendar(const QString& file, CalID, const QString& icalFile = QString::null,
- const QString& configKey = QString::null);
+ AlarmCalendar(const TQString& file, CalID, const TQString& icalFile = TQString::null,
+ const TQString& configKey = TQString::null);
bool create();
- bool saveCal(const QString& newFile = QString::null);
+ bool saveCal(const TQString& newFile = TQString::null);
void purge(int daysToKeep);
void startPurgeTimer();
- static AlarmCalendar* createCalendar(CalID, KConfig*, QString& writePath, const QString& configKey = QString::null);
+ static AlarmCalendar* createCalendar(CalID, KConfig*, TQString& writePath, const TQString& configKey = TQString::null);
static AlarmCalendar* calendarOpen(CalID);
static AlarmCalendar* mCalendars[NCALS]; // the calendars
@@ -100,8 +100,8 @@ class AlarmCalendar : public QObject
KCal::CalendarLocal* mCalendar;
KURL mUrl; // URL of current calendar file
KURL mICalUrl; // URL of iCalendar file
- QString mLocalFile; // calendar file, or local copy if it's a remote file
- QString mConfigKey; // config file key for this calendar's URL
+ TQString mLocalFile; // calendar file, or local copy if it's a remote file
+ TQString mConfigKey; // config file key for this calendar's URL
KAEvent::Status mType; // what type of events the calendar file is for
int mPurgeDays; // how long to keep alarms, 0 = don't keep, -1 = keep indefinitely
bool mOpen; // true if the calendar file is open
diff --git a/kalarm/alarmevent.cpp b/kalarm/alarmevent.cpp
index 28b0a55a4..8aa898922 100644
--- a/kalarm/alarmevent.cpp
+++ b/kalarm/alarmevent.cpp
@@ -23,8 +23,8 @@
#include <stdlib.h>
#include <time.h>
#include <ctype.h>
-#include <qcolor.h>
-#include <qregexp.h>
+#include <tqcolor.h>
+#include <tqregexp.h>
#include <klocale.h>
#include <kdebug.h>
@@ -39,73 +39,73 @@
using namespace KCal;
-const QCString APPNAME("KALARM");
+const TQCString APPNAME("KALARM");
// KAlarm version which first used the current calendar/event format.
// If this changes, KAEvent::convertKCalEvents() must be changed correspondingly.
// The string version is the KAlarm version string used in the calendar file.
-QString KAEvent::calVersionString() { return QString::fromLatin1("1.5.0"); }
+TQString KAEvent::calVersionString() { return TQString::fromLatin1("1.5.0"); }
int KAEvent::calVersion() { return KAlarm::Version(1,5,0); }
// Custom calendar properties.
// Note that all custom property names are prefixed with X-KDE-KALARM- in the calendar file.
// - Event properties
-static const QCString NEXT_RECUR_PROPERTY("NEXTRECUR"); // X-KDE-KALARM-NEXTRECUR property
-static const QCString REPEAT_PROPERTY("REPEAT"); // X-KDE-KALARM-REPEAT property
+static const TQCString NEXT_RECUR_PROPERTY("NEXTRECUR"); // X-KDE-KALARM-NEXTRECUR property
+static const TQCString REPEAT_PROPERTY("REPEAT"); // X-KDE-KALARM-REPEAT property
// - General alarm properties
-static const QCString TYPE_PROPERTY("TYPE"); // X-KDE-KALARM-TYPE property
-static const QString FILE_TYPE = QString::fromLatin1("FILE");
-static const QString AT_LOGIN_TYPE = QString::fromLatin1("LOGIN");
-static const QString REMINDER_TYPE = QString::fromLatin1("REMINDER");
-static const QString REMINDER_ONCE_TYPE = QString::fromLatin1("REMINDER_ONCE");
-static const QString ARCHIVE_REMINDER_ONCE_TYPE = QString::fromLatin1("ONCE");
-static const QString TIME_DEFERRAL_TYPE = QString::fromLatin1("DEFERRAL");
-static const QString DATE_DEFERRAL_TYPE = QString::fromLatin1("DATE_DEFERRAL");
-static const QString DISPLAYING_TYPE = QString::fromLatin1("DISPLAYING"); // used only in displaying calendar
-static const QString PRE_ACTION_TYPE = QString::fromLatin1("PRE");
-static const QString POST_ACTION_TYPE = QString::fromLatin1("POST");
-static const QCString NEXT_REPEAT_PROPERTY("NEXTREPEAT"); // X-KDE-KALARM-NEXTREPEAT property
+static const TQCString TYPE_PROPERTY("TYPE"); // X-KDE-KALARM-TYPE property
+static const TQString FILE_TYPE = TQString::fromLatin1("FILE");
+static const TQString AT_LOGIN_TYPE = TQString::fromLatin1("LOGIN");
+static const TQString REMINDER_TYPE = TQString::fromLatin1("REMINDER");
+static const TQString REMINDER_ONCE_TYPE = TQString::fromLatin1("REMINDER_ONCE");
+static const TQString ARCHIVE_REMINDER_ONCE_TYPE = TQString::fromLatin1("ONCE");
+static const TQString TIME_DEFERRAL_TYPE = TQString::fromLatin1("DEFERRAL");
+static const TQString DATE_DEFERRAL_TYPE = TQString::fromLatin1("DATE_DEFERRAL");
+static const TQString DISPLAYING_TYPE = TQString::fromLatin1("DISPLAYING"); // used only in displaying calendar
+static const TQString PRE_ACTION_TYPE = TQString::fromLatin1("PRE");
+static const TQString POST_ACTION_TYPE = TQString::fromLatin1("POST");
+static const TQCString NEXT_REPEAT_PROPERTY("NEXTREPEAT"); // X-KDE-KALARM-NEXTREPEAT property
// - Display alarm properties
-static const QCString FONT_COLOUR_PROPERTY("FONTCOLOR"); // X-KDE-KALARM-FONTCOLOR property
+static const TQCString FONT_COLOUR_PROPERTY("FONTCOLOR"); // X-KDE-KALARM-FONTCOLOR property
// - Email alarm properties
-static const QCString EMAIL_ID_PROPERTY("EMAILID"); // X-KDE-KALARM-EMAILID property
+static const TQCString EMAIL_ID_PROPERTY("EMAILID"); // X-KDE-KALARM-EMAILID property
// - Audio alarm properties
-static const QCString VOLUME_PROPERTY("VOLUME"); // X-KDE-KALARM-VOLUME property
-static const QCString SPEAK_PROPERTY("SPEAK"); // X-KDE-KALARM-SPEAK property
+static const TQCString VOLUME_PROPERTY("VOLUME"); // X-KDE-KALARM-VOLUME property
+static const TQCString SPEAK_PROPERTY("SPEAK"); // X-KDE-KALARM-SPEAK property
// Event categories
-static const QString DATE_ONLY_CATEGORY = QString::fromLatin1("DATE");
-static const QString EMAIL_BCC_CATEGORY = QString::fromLatin1("BCC");
-static const QString CONFIRM_ACK_CATEGORY = QString::fromLatin1("ACKCONF");
-static const QString LATE_CANCEL_CATEGORY = QString::fromLatin1("LATECANCEL;");
-static const QString AUTO_CLOSE_CATEGORY = QString::fromLatin1("LATECLOSE;");
-static const QString TEMPL_AFTER_TIME_CATEGORY = QString::fromLatin1("TMPLAFTTIME;");
-static const QString KMAIL_SERNUM_CATEGORY = QString::fromLatin1("KMAIL:");
-static const QString KORGANIZER_CATEGORY = QString::fromLatin1("KORG");
-static const QString DEFER_CATEGORY = QString::fromLatin1("DEFER;");
-static const QString ARCHIVE_CATEGORY = QString::fromLatin1("SAVE");
-static const QString ARCHIVE_CATEGORIES = QString::fromLatin1("SAVE:");
-static const QString LOG_CATEGORY = QString::fromLatin1("LOG:");
-static const QString xtermURL = QString::fromLatin1("xterm:");
+static const TQString DATE_ONLY_CATEGORY = TQString::fromLatin1("DATE");
+static const TQString EMAIL_BCC_CATEGORY = TQString::fromLatin1("BCC");
+static const TQString CONFIRM_ACK_CATEGORY = TQString::fromLatin1("ACKCONF");
+static const TQString LATE_CANCEL_CATEGORY = TQString::fromLatin1("LATECANCEL;");
+static const TQString AUTO_CLOSE_CATEGORY = TQString::fromLatin1("LATECLOSE;");
+static const TQString TEMPL_AFTER_TIME_CATEGORY = TQString::fromLatin1("TMPLAFTTIME;");
+static const TQString KMAIL_SERNUM_CATEGORY = TQString::fromLatin1("KMAIL:");
+static const TQString KORGANIZER_CATEGORY = TQString::fromLatin1("KORG");
+static const TQString DEFER_CATEGORY = TQString::fromLatin1("DEFER;");
+static const TQString ARCHIVE_CATEGORY = TQString::fromLatin1("SAVE");
+static const TQString ARCHIVE_CATEGORIES = TQString::fromLatin1("SAVE:");
+static const TQString LOG_CATEGORY = TQString::fromLatin1("LOG:");
+static const TQString xtermURL = TQString::fromLatin1("xterm:");
// Event status strings
-static const QString DISABLED_STATUS = QString::fromLatin1("DISABLED");
+static const TQString DISABLED_STATUS = TQString::fromLatin1("DISABLED");
-static const QString EXPIRED_UID = QString::fromLatin1("-exp-");
-static const QString DISPLAYING_UID = QString::fromLatin1("-disp-");
-static const QString TEMPLATE_UID = QString::fromLatin1("-tmpl-");
-static const QString KORGANIZER_UID = QString::fromLatin1("-korg-");
+static const TQString EXPIRED_UID = TQString::fromLatin1("-exp-");
+static const TQString DISPLAYING_UID = TQString::fromLatin1("-disp-");
+static const TQString TEMPLATE_UID = TQString::fromLatin1("-tmpl-");
+static const TQString KORGANIZER_UID = TQString::fromLatin1("-korg-");
struct AlarmData
{
const Alarm* alarm;
- QString cleanText; // text or audio file name
+ TQString cleanText; // text or audio file name
uint emailFromId;
EmailAddressList emailAddresses;
- QString emailSubject;
- QStringList emailAttachments;
- QFont font;
- QColor bgColour, fgColour;
+ TQString emailSubject;
+ TQStringList emailAttachments;
+ TQFont font;
+ TQColor bgColour, fgColour;
float soundVolume;
float fadeVolume;
int fadeSeconds;
@@ -122,9 +122,9 @@ struct AlarmData
int repeatInterval;
int nextRepeat;
};
-typedef QMap<KAAlarm::SubType, AlarmData> AlarmMap;
+typedef TQMap<KAAlarm::SubType, AlarmData> AlarmMap;
-static void setProcedureAlarm(Alarm*, const QString& commandLine);
+static void setProcedureAlarm(Alarm*, const TQString& commandLine);
/*=============================================================================
@@ -211,8 +211,8 @@ void KAEvent::set(const Event& event)
// Extract status from the event
mEventID = event.uid();
mRevision = event.revision();
- mTemplateName = QString::null;
- mLogFile = QString::null;
+ mTemplateName = TQString::null;
+ mLogFile = TQString::null;
mTemplateAfterTime = -1;
mBeep = false;
mSpeak = false;
@@ -228,14 +228,14 @@ void KAEvent::set(const Event& event)
mDeferDefaultMinutes = 0;
mLateCancel = 0;
mKMailSerialNumber = 0;
- mBgColour = QColor(255, 255, 255); // missing/invalid colour - return white background
- mFgColour = QColor(0, 0, 0); // and black foreground
+ mBgColour = TQColor(255, 255, 255); // missing/invalid colour - return white background
+ mFgColour = TQColor(0, 0, 0); // and black foreground
mDefaultFont = true;
mEnabled = true;
clearRecur();
bool ok;
bool dateOnly = false;
- const QStringList cats = event.categories();
+ const TQStringList cats = event.categories();
for (unsigned int i = 0; i < cats.count(); ++i)
{
if (cats[i] == DATE_ONLY_CATEGORY)
@@ -252,7 +252,7 @@ void KAEvent::set(const Event& event)
mKMailSerialNumber = cats[i].mid(KMAIL_SERNUM_CATEGORY.length()).toULong();
else if (cats[i].startsWith(LOG_CATEGORY))
{
- QString logUrl = cats[i].mid(LOG_CATEGORY.length());
+ TQString logUrl = cats[i].mid(LOG_CATEGORY.length());
if (logUrl == xtermURL)
mCommandXterm = true;
else
@@ -262,7 +262,7 @@ void KAEvent::set(const Event& event)
{
// It's the archive flag plus a reminder time and/or repeat-at-login flag
mArchive = true;
- QStringList list = QStringList::split(';', cats[i].mid(ARCHIVE_CATEGORIES.length()));
+ TQStringList list = TQStringList::split(';', cats[i].mid(ARCHIVE_CATEGORIES.length()));
for (unsigned int j = 0; j < list.count(); ++j)
{
if (list[j] == AT_LOGIN_TYPE)
@@ -316,11 +316,11 @@ void KAEvent::set(const Event& event)
mAutoClose = true;
}
}
- QString prop = event.customProperty(APPNAME, REPEAT_PROPERTY);
+ TQString prop = event.customProperty(APPNAME, REPEAT_PROPERTY);
if (!prop.isEmpty())
{
// This property is used when the main alarm has expired
- QStringList list = QStringList::split(':', prop);
+ TQStringList list = TQStringList::split(':', prop);
if (list.count() >= 2)
{
int interval = static_cast<int>(list[0].toUInt());
@@ -562,20 +562,20 @@ DateTime KAEvent::readDateTime(const Event& event, bool dateOnly, DateTime& star
{
start.set(event.dtStart(), dateOnly);
DateTime next = start;
- QString prop = event.customProperty(APPNAME, NEXT_RECUR_PROPERTY);
+ TQString prop = event.customProperty(APPNAME, NEXT_RECUR_PROPERTY);
if (prop.length() >= 8)
{
// The next due recurrence time is specified
- QDate d(prop.left(4).toInt(), prop.mid(4,2).toInt(), prop.mid(6,2).toInt());
+ TQDate d(prop.left(4).toInt(), prop.mid(4,2).toInt(), prop.mid(6,2).toInt());
if (d.isValid())
{
if (dateOnly && prop.length() == 8)
next = d;
- else if (!dateOnly && prop.length() == 15 && prop[8] == QChar('T'))
+ else if (!dateOnly && prop.length() == 15 && prop[8] == TQChar('T'))
{
- QTime t(prop.mid(9,2).toInt(), prop.mid(11,2).toInt(), prop.mid(13,2).toInt());
+ TQTime t(prop.mid(9,2).toInt(), prop.mid(11,2).toInt(), prop.mid(13,2).toInt());
if (t.isValid())
- next = QDateTime(d, t);
+ next = TQDateTime(d, t);
}
}
}
@@ -617,7 +617,7 @@ void KAEvent::readAlarm(const Alarm& alarm, AlarmData& data)
if (data.repeatCount)
{
bool ok;
- QString property = alarm.customProperty(APPNAME, NEXT_REPEAT_PROPERTY);
+ TQString property = alarm.customProperty(APPNAME, NEXT_REPEAT_PROPERTY);
int n = static_cast<int>(property.toUInt(&ok));
if (ok)
data.nextRepeat = n;
@@ -647,22 +647,22 @@ void KAEvent::readAlarm(const Alarm& alarm, AlarmData& data)
{
data.action = T_MESSAGE;
data.cleanText = AlarmText::fromCalendarText(alarm.text(), data.isEmailText);
- QString property = alarm.customProperty(APPNAME, FONT_COLOUR_PROPERTY);
- QStringList list = QStringList::split(QChar(';'), property, true);
- data.bgColour = QColor(255, 255, 255); // white
- data.fgColour = QColor(0, 0, 0); // black
+ TQString property = alarm.customProperty(APPNAME, FONT_COLOUR_PROPERTY);
+ TQStringList list = TQStringList::split(TQChar(';'), property, true);
+ data.bgColour = TQColor(255, 255, 255); // white
+ data.fgColour = TQColor(0, 0, 0); // black
int n = list.count();
if (n > 0)
{
if (!list[0].isEmpty())
{
- QColor c(list[0]);
+ TQColor c(list[0]);
if (c.isValid())
data.bgColour = c;
}
if (n > 1 && !list[1].isEmpty())
{
- QColor c(list[1]);
+ TQColor c(list[1]);
if (c.isValid())
data.fgColour = c;
}
@@ -681,13 +681,13 @@ void KAEvent::readAlarm(const Alarm& alarm, AlarmData& data)
data.fadeVolume = -1;
data.fadeSeconds = 0;
data.speak = !alarm.customProperty(APPNAME, SPEAK_PROPERTY).isNull();
- QString property = alarm.customProperty(APPNAME, VOLUME_PROPERTY);
+ TQString property = alarm.customProperty(APPNAME, VOLUME_PROPERTY);
if (!property.isEmpty())
{
bool ok;
float fadeVolume;
int fadeSecs = 0;
- QStringList list = QStringList::split(QChar(';'), property, true);
+ TQStringList list = TQStringList::split(TQChar(';'), property, true);
data.soundVolume = list[0].toFloat(&ok);
if (!ok)
data.soundVolume = -1;
@@ -716,11 +716,11 @@ void KAEvent::readAlarm(const Alarm& alarm, AlarmData& data)
bool dateDeferral = false;
data.reminderOnceOnly = false;
data.type = KAAlarm::MAIN__ALARM;
- QString property = alarm.customProperty(APPNAME, TYPE_PROPERTY);
- QStringList types = QStringList::split(QChar(','), property);
+ TQString property = alarm.customProperty(APPNAME, TYPE_PROPERTY);
+ TQStringList types = TQStringList::split(TQChar(','), property);
for (unsigned int i = 0; i < types.count(); ++i)
{
- QString type = types[i];
+ TQString type = types[i];
if (type == AT_LOGIN_TYPE)
atLogin = true;
else if (type == FILE_TYPE && data.action == T_MESSAGE)
@@ -770,8 +770,8 @@ void KAEvent::readAlarm(const Alarm& alarm, AlarmData& data)
/******************************************************************************
* Initialise the KAEvent with the specified parameters.
*/
-void KAEvent::set(const QDateTime& dateTime, const QString& text, const QColor& bg, const QColor& fg,
- const QFont& font, Action action, int lateCancel, int flags)
+void KAEvent::set(const TQDateTime& dateTime, const TQString& text, const TQColor& bg, const TQColor& fg,
+ const TQFont& font, Action action, int lateCancel, int flags)
{
clearRecur();
mStartDateTime.set(dateTime, flags & ANY_TIME);
@@ -789,10 +789,10 @@ void KAEvent::set(const QDateTime& dateTime, const QString& text, const QColor&
break;
}
mText = (mActionType == T_COMMAND) ? text.stripWhiteSpace() : text;
- mEventID = QString::null;
- mTemplateName = QString::null;
- mPreAction = QString::null;
- mPostAction = QString::null;
+ mEventID = TQString::null;
+ mTemplateName = TQString::null;
+ mPreAction = TQString::null;
+ mPostAction = TQString::null;
mAudioFile = "";
mSoundVolume = -1;
mFadeVolume = -1;
@@ -824,14 +824,14 @@ void KAEvent::set(const QDateTime& dateTime, const QString& text, const QColor&
mUpdated = false;
}
-void KAEvent::setLogFile(const QString& logfile)
+void KAEvent::setLogFile(const TQString& logfile)
{
mLogFile = logfile;
if (!logfile.isEmpty())
mCommandXterm = false;
}
-void KAEvent::setEmail(uint from, const EmailAddressList& addresses, const QString& subject, const QStringList& attachments)
+void KAEvent::setEmail(uint from, const EmailAddressList& addresses, const TQString& subject, const TQStringList& attachments)
{
mEmailFromIdentity = from;
mEmailAddresses = addresses;
@@ -839,7 +839,7 @@ void KAEvent::setEmail(uint from, const EmailAddressList& addresses, const QStri
mEmailAttachments = attachments;
}
-void KAEvent::setAudioFile(const QString& filename, float volume, float fadeVolume, int fadeSeconds)
+void KAEvent::setAudioFile(const TQString& filename, float volume, float fadeVolume, int fadeSeconds)
{
mAudioFile = filename;
mSoundVolume = filename.isEmpty() ? -1 : volume;
@@ -885,9 +885,9 @@ DateTime KAEvent::displayDateTime() const
/******************************************************************************
* Convert a unique ID to indicate that the event is in a specified calendar file.
*/
-QString KAEvent::uid(const QString& id, Status status)
+TQString KAEvent::uid(const TQString& id, Status status)
{
- QString result = id;
+ TQString result = id;
Status oldStatus;
int i, len;
if ((i = result.find(EXPIRED_UID)) > 0)
@@ -918,7 +918,7 @@ QString KAEvent::uid(const QString& id, Status status)
}
if (status != oldStatus && i > 0)
{
- QString part;
+ TQString part;
switch (status)
{
case ACTIVE: part = "-"; break;
@@ -935,7 +935,7 @@ QString KAEvent::uid(const QString& id, Status status)
/******************************************************************************
* Get the calendar type for a unique ID.
*/
-KAEvent::Status KAEvent::uidStatus(const QString& uid)
+KAEvent::Status KAEvent::uidStatus(const TQString& uid)
{
if (uid.find(EXPIRED_UID) > 0)
return EXPIRED;
@@ -992,7 +992,7 @@ bool KAEvent::updateKCalEvent(Event& ev, bool checkUid, bool original, bool canc
ev.removeCustomProperty(APPNAME, NEXT_RECUR_PROPERTY);
ev.removeCustomProperty(APPNAME, REPEAT_PROPERTY);
- QStringList cats;
+ TQStringList cats;
if (mStartDateTime.isDateOnly())
cats.append(DATE_ONLY_CATEGORY);
if (mConfirmAck)
@@ -1000,7 +1000,7 @@ bool KAEvent::updateKCalEvent(Event& ev, bool checkUid, bool original, bool canc
if (mEmailBcc)
cats.append(EMAIL_BCC_CATEGORY);
if (mKMailSerialNumber)
- cats.append(QString("%1%2").arg(KMAIL_SERNUM_CATEGORY).arg(mKMailSerialNumber));
+ cats.append(TQString("%1%2").arg(KMAIL_SERNUM_CATEGORY).arg(mKMailSerialNumber));
if (mCopyToKOrganizer)
cats.append(KORGANIZER_CATEGORY);
if (mCommandXterm)
@@ -1008,14 +1008,14 @@ bool KAEvent::updateKCalEvent(Event& ev, bool checkUid, bool original, bool canc
else if (!mLogFile.isEmpty())
cats.append(LOG_CATEGORY + mLogFile);
if (mLateCancel)
- cats.append(QString("%1%2").arg(mAutoClose ? AUTO_CLOSE_CATEGORY : LATE_CANCEL_CATEGORY).arg(mLateCancel));
+ cats.append(TQString("%1%2").arg(mAutoClose ? AUTO_CLOSE_CATEGORY : LATE_CANCEL_CATEGORY).arg(mLateCancel));
if (mDeferDefaultMinutes)
- cats.append(QString("%1%2").arg(DEFER_CATEGORY).arg(mDeferDefaultMinutes));
+ cats.append(TQString("%1%2").arg(DEFER_CATEGORY).arg(mDeferDefaultMinutes));
if (!mTemplateName.isEmpty() && mTemplateAfterTime >= 0)
- cats.append(QString("%1%2").arg(TEMPL_AFTER_TIME_CATEGORY).arg(mTemplateAfterTime));
+ cats.append(TQString("%1%2").arg(TEMPL_AFTER_TIME_CATEGORY).arg(mTemplateAfterTime));
if (mArchive && !original)
{
- QStringList params;
+ TQStringList params;
if (mArchiveReminderMinutes)
{
if (mReminderOnceOnly)
@@ -1032,21 +1032,21 @@ bool KAEvent::updateKCalEvent(Event& ev, bool checkUid, bool original, bool canc
unit = 'H';
count /= 60;
}
- params += QString("%1%2").arg(count).arg(unit);
+ params += TQString("%1%2").arg(count).arg(unit);
}
if (mArchiveRepeatAtLogin)
params += AT_LOGIN_TYPE;
if (params.count() > 0)
{
- QString cat = ARCHIVE_CATEGORIES;
- cat += params.join(QString::fromLatin1(";"));
+ TQString cat = ARCHIVE_CATEGORIES;
+ cat += params.join(TQString::fromLatin1(";"));
cats.append(cat);
}
else
cats.append(ARCHIVE_CATEGORY);
}
ev.setCategories(cats);
- ev.setCustomStatus(mEnabled ? QString::null : DISABLED_STATUS);
+ ev.setCustomStatus(mEnabled ? TQString::null : DISABLED_STATUS);
ev.setRevision(mRevision);
ev.clearAlarms();
@@ -1071,12 +1071,12 @@ bool KAEvent::updateKCalEvent(Event& ev, bool checkUid, bool original, bool canc
*/
if (!original && checkRecur() != KARecurrence::NO_RECUR)
{
- QDateTime dt = mNextMainDateTime.dateTime();
+ TQDateTime dt = mNextMainDateTime.dateTime();
ev.setCustomProperty(APPNAME, NEXT_RECUR_PROPERTY,
dt.toString(mNextMainDateTime.isDateOnly() ? "yyyyMMdd" : "yyyyMMddThhmmss"));
}
// Add the main alarm
- initKCalAlarm(ev, 0, QStringList(), KAAlarm::MAIN_ALARM);
+ initKCalAlarm(ev, 0, TQStringList(), KAAlarm::MAIN_ALARM);
ancillaryOffset = 0;
ancillaryType = dtMain.isValid() ? 2 : 0;
}
@@ -1084,7 +1084,7 @@ bool KAEvent::updateKCalEvent(Event& ev, bool checkUid, bool original, bool canc
{
// Alarm repetition is normally held in the main alarm, but since
// the main alarm has expired, store in a custom property.
- QString param = QString("%1:%2").arg(mRepeatInterval).arg(mRepeatCount);
+ TQString param = TQString("%1:%2").arg(mRepeatInterval).arg(mRepeatCount);
ev.setCustomProperty(APPNAME, REPEAT_PROPERTY, param);
}
@@ -1097,9 +1097,9 @@ bool KAEvent::updateKCalEvent(Event& ev, bool checkUid, bool original, bool canc
else if (mAtLoginDateTime.isValid())
dtl = mAtLoginDateTime;
else if (mStartDateTime.isDateOnly())
- dtl = QDate::currentDate().addDays(-1);
+ dtl = TQDate::currentDate().addDays(-1);
else
- dtl = QDateTime::currentDateTime();
+ dtl = TQDateTime::currentDateTime();
initKCalAlarm(ev, dtl, AT_LOGIN_TYPE);
if (!ancillaryType && dtl.isValid())
{
@@ -1110,7 +1110,7 @@ bool KAEvent::updateKCalEvent(Event& ev, bool checkUid, bool original, bool canc
if (mReminderMinutes || mArchiveReminderMinutes && original)
{
int minutes = mReminderMinutes ? mReminderMinutes : mArchiveReminderMinutes;
- initKCalAlarm(ev, -minutes * 60, QStringList(mReminderOnceOnly ? REMINDER_ONCE_TYPE : REMINDER_TYPE));
+ initKCalAlarm(ev, -minutes * 60, TQStringList(mReminderOnceOnly ? REMINDER_ONCE_TYPE : REMINDER_TYPE));
if (!ancillaryType)
{
ancillaryOffset = -minutes * 60;
@@ -1136,7 +1136,7 @@ bool KAEvent::updateKCalEvent(Event& ev, bool checkUid, bool original, bool canc
}
}
int startOffset;
- QStringList list;
+ TQStringList list;
if (mDeferralTime.isDateOnly())
{
startOffset = nextDateTime.secsTo(mDeferralTime.dateTime());
@@ -1160,7 +1160,7 @@ bool KAEvent::updateKCalEvent(Event& ev, bool checkUid, bool original, bool canc
ev.setSummary(mTemplateName);
else if (mDisplaying)
{
- QStringList list(DISPLAYING_TYPE);
+ TQStringList list(DISPLAYING_TYPE);
if (mDisplayingFlags & REPEAT_AT_LOGIN)
list += AT_LOGIN_TYPE;
else if (mDisplayingFlags & DEFERRAL)
@@ -1183,25 +1183,25 @@ bool KAEvent::updateKCalEvent(Event& ev, bool checkUid, bool original, bool canc
{
// A sound is specified
if (ancillaryType == 2)
- initKCalAlarm(ev, ancillaryOffset, QStringList(), KAAlarm::AUDIO_ALARM);
+ initKCalAlarm(ev, ancillaryOffset, TQStringList(), KAAlarm::AUDIO_ALARM);
else
- initKCalAlarm(ev, ancillaryTime, QStringList(), KAAlarm::AUDIO_ALARM);
+ initKCalAlarm(ev, ancillaryTime, TQStringList(), KAAlarm::AUDIO_ALARM);
}
if (!mPreAction.isEmpty())
{
// A pre-display action is specified
if (ancillaryType == 2)
- initKCalAlarm(ev, ancillaryOffset, QStringList(PRE_ACTION_TYPE), KAAlarm::PRE_ACTION_ALARM);
+ initKCalAlarm(ev, ancillaryOffset, TQStringList(PRE_ACTION_TYPE), KAAlarm::PRE_ACTION_ALARM);
else
- initKCalAlarm(ev, ancillaryTime, QStringList(PRE_ACTION_TYPE), KAAlarm::PRE_ACTION_ALARM);
+ initKCalAlarm(ev, ancillaryTime, TQStringList(PRE_ACTION_TYPE), KAAlarm::PRE_ACTION_ALARM);
}
if (!mPostAction.isEmpty())
{
// A post-display action is specified
if (ancillaryType == 2)
- initKCalAlarm(ev, ancillaryOffset, QStringList(POST_ACTION_TYPE), KAAlarm::POST_ACTION_ALARM);
+ initKCalAlarm(ev, ancillaryOffset, TQStringList(POST_ACTION_TYPE), KAAlarm::POST_ACTION_ALARM);
else
- initKCalAlarm(ev, ancillaryTime, QStringList(POST_ACTION_TYPE), KAAlarm::POST_ACTION_ALARM);
+ initKCalAlarm(ev, ancillaryTime, TQStringList(POST_ACTION_TYPE), KAAlarm::POST_ACTION_ALARM);
}
if (mRecurrence)
@@ -1219,16 +1219,16 @@ bool KAEvent::updateKCalEvent(Event& ev, bool checkUid, bool original, bool canc
* alarm action. If 'types' is non-null, it is appended to the X-KDE-KALARM-TYPE
* property value list.
*/
-Alarm* KAEvent::initKCalAlarm(Event& event, const DateTime& dt, const QStringList& types, KAAlarm::Type type) const
+Alarm* KAEvent::initKCalAlarm(Event& event, const DateTime& dt, const TQStringList& types, KAAlarm::Type type) const
{
int startOffset = dt.isDateOnly() ? mStartDateTime.secsTo(dt)
: mStartDateTime.dateTime().secsTo(dt.dateTime());
return initKCalAlarm(event, startOffset, types, type);
}
-Alarm* KAEvent::initKCalAlarm(Event& event, int startOffsetSecs, const QStringList& types, KAAlarm::Type type) const
+Alarm* KAEvent::initKCalAlarm(Event& event, int startOffsetSecs, const TQStringList& types, KAAlarm::Type type) const
{
- QStringList alltypes;
+ TQStringList alltypes;
Alarm* alarm = event.newAlarm();
alarm->setEnabled(true);
if (type != KAAlarm::MAIN_ALARM)
@@ -1243,7 +1243,7 @@ Alarm* KAEvent::initKCalAlarm(Event& event, int startOffsetSecs, const QStringLi
case KAAlarm::AUDIO_ALARM:
alarm->setAudioAlarm(mAudioFile); // empty for a beep or for speaking
if (mSpeak)
- alarm->setCustomProperty(APPNAME, SPEAK_PROPERTY, QString::fromLatin1("Y"));
+ alarm->setCustomProperty(APPNAME, SPEAK_PROPERTY, TQString::fromLatin1("Y"));
if (mRepeatSound)
{
alarm->setRepeatCount(-1);
@@ -1251,8 +1251,8 @@ Alarm* KAEvent::initKCalAlarm(Event& event, int startOffsetSecs, const QStringLi
}
if (!mAudioFile.isEmpty() && mSoundVolume >= 0)
alarm->setCustomProperty(APPNAME, VOLUME_PROPERTY,
- QString::fromLatin1("%1;%2;%3").arg(QString::number(mSoundVolume, 'f', 2))
- .arg(QString::number(mFadeVolume, 'f', 2))
+ TQString::fromLatin1("%1;%2;%3").arg(TQString::number(mSoundVolume, 'f', 2))
+ .arg(TQString::number(mFadeVolume, 'f', 2))
.arg(mFadeSeconds));
break;
case KAAlarm::PRE_ACTION_ALARM:
@@ -1266,7 +1266,7 @@ Alarm* KAEvent::initKCalAlarm(Event& event, int startOffsetSecs, const QStringLi
alarm->setRepeatCount(mRepeatCount);
if (mRepeatCount)
alarm->setCustomProperty(APPNAME, NEXT_REPEAT_PROPERTY,
- QString::number(mNextRepeat));
+ TQString::number(mNextRepeat));
// fall through to INVALID_ALARM
case KAAlarm::INVALID_ALARM:
switch (mActionType)
@@ -1277,9 +1277,9 @@ Alarm* KAEvent::initKCalAlarm(Event& event, int startOffsetSecs, const QStringLi
case T_MESSAGE:
alarm->setDisplayAlarm(AlarmText::toCalendarText(mText));
alarm->setCustomProperty(APPNAME, FONT_COLOUR_PROPERTY,
- QString::fromLatin1("%1;%2;%3").arg(mBgColour.name())
+ TQString::fromLatin1("%1;%2;%3").arg(mBgColour.name())
.arg(mFgColour.name())
- .arg(mDefaultFont ? QString::null : mFont.toString()));
+ .arg(mDefaultFont ? TQString::null : mFont.toString()));
break;
case T_COMMAND:
if (mCommandScript)
@@ -1290,7 +1290,7 @@ Alarm* KAEvent::initKCalAlarm(Event& event, int startOffsetSecs, const QStringLi
case T_EMAIL:
alarm->setEmailAlarm(mEmailSubject, mText, mEmailAddresses, mEmailAttachments);
if (mEmailFromIdentity)
- alarm->setCustomProperty(APPNAME, EMAIL_ID_PROPERTY, QString::number(mEmailFromIdentity));
+ alarm->setCustomProperty(APPNAME, EMAIL_ID_PROPERTY, TQString::number(mEmailFromIdentity));
break;
case T_AUDIO:
break;
@@ -1601,7 +1601,7 @@ bool KAEvent::defer(const DateTime& dateTime, bool reminder, bool adjustRecurren
set_deferral(NORMAL_DEFERRAL);
if (adjustRecurrence)
{
- QDateTime now = QDateTime::currentDateTime();
+ TQDateTime now = TQDateTime::currentDateTime();
if (mainEndRepeatTime() < now)
{
// The last repetition (if any) of the current recurrence has already passed.
@@ -1641,7 +1641,7 @@ void KAEvent::cancelDefer()
// Set the deferral time to be the same as the next recurrence/repetition.
// This prevents an immediate retriggering of the alarm.
if (mMainExpired
- || nextOccurrence(QDateTime::currentDateTime(), mDeferralTime, RETURN_REPETITION) == NO_OCCURRENCE)
+ || nextOccurrence(TQDateTime::currentDateTime(), mDeferralTime, RETURN_REPETITION) == NO_OCCURRENCE)
{
// The main alarm has expired, so simply delete the deferral
mDeferralTime = DateTime();
@@ -1678,7 +1678,7 @@ DateTime KAEvent::deferralLimit(KAEvent::DeferLimitType* limitType) const
// It's a repeated alarm. Don't allow it to be deferred past its
// next occurrence or repetition.
DateTime reminderTime;
- QDateTime now = QDateTime::currentDateTime();
+ TQDateTime now = TQDateTime::currentDateTime();
OccurType type = nextOccurrence(now, endTime, RETURN_REPETITION);
if (type & OCCURRENCE_REPEAT)
ltype = LIMIT_REPETITION;
@@ -1695,7 +1695,7 @@ DateTime KAEvent::deferralLimit(KAEvent::DeferLimitType* limitType) const
ltype = LIMIT_RECURRENCE;
}
else if ((mReminderMinutes || mDeferral == REMINDER_DEFERRAL || mArchiveReminderMinutes)
- && QDateTime::currentDateTime() < mNextMainDateTime.dateTime())
+ && TQDateTime::currentDateTime() < mNextMainDateTime.dateTime())
{
// It's an reminder alarm. Don't allow it to be deferred past its main alarm time.
endTime = mNextMainDateTime;
@@ -1719,7 +1719,7 @@ DateTime KAEvent::deferralLimit(KAEvent::DeferLimitType* limitType) const
* saved in case their end time expires before the next login.
* Reply = true if successful, false if alarm was not copied.
*/
-bool KAEvent::setDisplaying(const KAEvent& event, KAAlarm::Type alarmType, const QDateTime& repeatAtLoginTime)
+bool KAEvent::setDisplaying(const KAEvent& event, KAAlarm::Type alarmType, const TQDateTime& repeatAtLoginTime)
{
if (!mDisplaying
&& (alarmType == KAAlarm::MAIN_ALARM
@@ -1804,9 +1804,9 @@ void KAEvent::reinstateFromDisplaying(const KAEvent& dispEvent)
* If 'includeRepetitions' is true and the alarm has a sub-repetition, it
* returns true if any repetitions occur after the specified date/time.
*/
-bool KAEvent::occursAfter(const QDateTime& preDateTime, bool includeRepetitions) const
+bool KAEvent::occursAfter(const TQDateTime& preDateTime, bool includeRepetitions) const
{
- QDateTime dt;
+ TQDateTime dt;
if (checkRecur() != KARecurrence::NO_RECUR)
{
if (mRecurrence->duration() < 0)
@@ -1817,7 +1817,7 @@ bool KAEvent::occursAfter(const QDateTime& preDateTime, bool includeRepetitions)
dt = mNextMainDateTime.dateTime();
if (mStartDateTime.isDateOnly())
{
- QDate pre = preDateTime.date();
+ TQDate pre = preDateTime.date();
if (preDateTime.time() < Preferences::startOfDay())
pre = pre.addDays(-1); // today's recurrence (if today recurs) is still to come
if (pre < dt.date())
@@ -1839,11 +1839,11 @@ bool KAEvent::occursAfter(const QDateTime& preDateTime, bool includeRepetitions)
* date/time.
* 'result' = date/time of next occurrence, or invalid date/time if none.
*/
-KAEvent::OccurType KAEvent::nextOccurrence(const QDateTime& preDateTime, DateTime& result,
+KAEvent::OccurType KAEvent::nextOccurrence(const TQDateTime& preDateTime, DateTime& result,
KAEvent::OccurOption includeRepetitions) const
{
int repeatSecs = 0;
- QDateTime pre = preDateTime;
+ TQDateTime pre = preDateTime;
if (includeRepetitions != IGNORE_REPETITION)
{
if (!mRepeatCount || !mRepeatInterval)
@@ -1914,11 +1914,11 @@ KAEvent::OccurType KAEvent::nextOccurrence(const QDateTime& preDateTime, DateTim
* last previous repetition is returned if appropriate.
* 'result' = date/time of previous occurrence, or invalid date/time if none.
*/
-KAEvent::OccurType KAEvent::previousOccurrence(const QDateTime& afterDateTime, DateTime& result, bool includeRepetitions) const
+KAEvent::OccurType KAEvent::previousOccurrence(const TQDateTime& afterDateTime, DateTime& result, bool includeRepetitions) const
{
if (mStartDateTime >= afterDateTime)
{
- result = QDateTime();
+ result = TQDateTime();
return NO_OCCURRENCE; // the event starts after the specified date/time
}
@@ -1931,11 +1931,11 @@ KAEvent::OccurType KAEvent::previousOccurrence(const QDateTime& afterDateTime, D
}
else
{
- QDateTime recurStart = mRecurrence->startDateTime();
- QDateTime after = afterDateTime;
+ TQDateTime recurStart = mRecurrence->startDateTime();
+ TQDateTime after = afterDateTime;
if (mStartDateTime.isDateOnly() && afterDateTime.time() > Preferences::startOfDay())
after = after.addDays(1); // today's recurrence (if today recurs) has passed
- QDateTime dt = mRecurrence->getPreviousDateTime(after);
+ TQDateTime dt = mRecurrence->getPreviousDateTime(after);
result.set(dt, mStartDateTime.isDateOnly());
if (!dt.isValid())
return NO_OCCURRENCE;
@@ -1951,7 +1951,7 @@ KAEvent::OccurType KAEvent::previousOccurrence(const QDateTime& afterDateTime, D
{
// Find the latest repetition which is before the specified time.
// N.B. This is coded to avoid 32-bit integer overflow which occurs
- // in QDateTime::secsTo() for large enough time differences.
+ // in TQDateTime::secsTo() for large enough time differences.
int repeatSecs = mRepeatInterval * 60;
DateTime lastRepetition = result.addSecs(mRepeatCount * repeatSecs);
if (lastRepetition < afterDateTime)
@@ -1977,11 +1977,11 @@ KAEvent::OccurType KAEvent::previousOccurrence(const QDateTime& afterDateTime, D
* recurrence occurs after the specified date/time, that repetition is set as
* the next occurrence.
*/
-KAEvent::OccurType KAEvent::setNextOccurrence(const QDateTime& preDateTime)
+KAEvent::OccurType KAEvent::setNextOccurrence(const TQDateTime& preDateTime)
{
if (preDateTime < mNextMainDateTime.dateTime())
return FIRST_OR_ONLY_OCCURRENCE; // it might not be the first recurrence - tant pis
- QDateTime pre = preDateTime;
+ TQDateTime pre = preDateTime;
// If there are repetitions, adjust the comparison date/time so that
// we find the earliest recurrence which has a repetition falling after
// the specified preDateTime.
@@ -2053,16 +2053,16 @@ KAEvent::OccurType KAEvent::setNextOccurrence(const QDateTime& preDateTime)
* date/time.
* 'result' = date/time of next occurrence, or invalid date/time if none.
*/
-KAEvent::OccurType KAEvent::nextRecurrence(const QDateTime& preDateTime, DateTime& result) const
+KAEvent::OccurType KAEvent::nextRecurrence(const TQDateTime& preDateTime, DateTime& result) const
{
- QDateTime recurStart = mRecurrence->startDateTime();
- QDateTime pre = preDateTime;
+ TQDateTime recurStart = mRecurrence->startDateTime();
+ TQDateTime pre = preDateTime;
if (mStartDateTime.isDateOnly() && preDateTime.time() < Preferences::startOfDay())
{
pre = pre.addDays(-1); // today's recurrence (if today recurs) is still to come
pre.setTime(Preferences::startOfDay());
}
- QDateTime dt = mRecurrence->getNextDateTime(pre);
+ TQDateTime dt = mRecurrence->getNextDateTime(pre);
result.set(dt, mStartDateTime.isDateOnly());
if (!dt.isValid())
return NO_OCCURRENCE;
@@ -2076,7 +2076,7 @@ KAEvent::OccurType KAEvent::nextRecurrence(const QDateTime& preDateTime, DateTim
/******************************************************************************
* Return the recurrence interval as text suitable for display.
*/
-QString KAEvent::recurrenceText(bool brief) const
+TQString KAEvent::recurrenceText(bool brief) const
{
if (mRepeatAtLogin)
return brief ? i18n("Brief form of 'At Login'", "Login") : i18n("At login");
@@ -2092,8 +2092,8 @@ QString KAEvent::recurrenceText(bool brief) const
return i18n("1 Hour", "%n Hours", frequency/60);
else
{
- QString mins;
- return i18n("Hours and Minutes", "%1H %2M").arg(QString::number(frequency/60)).arg(mins.sprintf("%02d", frequency%60));
+ TQString mins;
+ return i18n("Hours and Minutes", "%1H %2M").arg(TQString::number(frequency/60)).arg(mins.sprintf("%02d", frequency%60));
}
case RecurrenceRule::rDaily:
return i18n("1 Day", "%n Days", frequency);
@@ -2108,13 +2108,13 @@ QString KAEvent::recurrenceText(bool brief) const
break;
}
}
- return brief ? QString::null : i18n("None");
+ return brief ? TQString::null : i18n("None");
}
/******************************************************************************
* Return the repetition interval as text suitable for display.
*/
-QString KAEvent::repetitionText(bool brief) const
+TQString KAEvent::repetitionText(bool brief) const
{
if (mRepeatCount)
{
@@ -2124,14 +2124,14 @@ QString KAEvent::repetitionText(bool brief) const
return i18n("1 Minute", "%n Minutes", mRepeatInterval);
if (mRepeatInterval % 60 == 0)
return i18n("1 Hour", "%n Hours", mRepeatInterval/60);
- QString mins;
- return i18n("Hours and Minutes", "%1H %2M").arg(QString::number(mRepeatInterval/60)).arg(mins.sprintf("%02d", mRepeatInterval%60));
+ TQString mins;
+ return i18n("Hours and Minutes", "%1H %2M").arg(TQString::number(mRepeatInterval/60)).arg(mins.sprintf("%02d", mRepeatInterval%60));
}
if (mRepeatInterval % (7*1440))
return i18n("1 Day", "%n Days", mRepeatInterval/1440);
return i18n("1 Week", "%n Weeks", mRepeatInterval/(7*1440));
}
- return brief ? QString::null : i18n("None");
+ return brief ? TQString::null : i18n("None");
}
/******************************************************************************
@@ -2157,7 +2157,7 @@ void KAEvent::setFirstRecurrence()
case KARecurrence::MONTHLY_DAY:
break;
}
- QDateTime recurStart = mRecurrence->startDateTime();
+ TQDateTime recurStart = mRecurrence->startDateTime();
if (mRecurrence->recursOn(recurStart.date()))
return; // it already recurs on the start date
@@ -2236,7 +2236,7 @@ bool KAEvent::setRepetition(int interval, int count)
* end = end date/time (invalid to use 'count' instead).
* Reply = false if no recurrence was set up.
*/
-bool KAEvent::setRecurMinutely(int freq, int count, const QDateTime& end)
+bool KAEvent::setRecurMinutely(int freq, int count, const TQDateTime& end)
{
return setRecur(RecurrenceRule::rMinutely, freq, count, end);
}
@@ -2252,7 +2252,7 @@ bool KAEvent::setRecurMinutely(int freq, int count, const QDateTime& end)
* end = end date (invalid to use 'count' instead).
* Reply = false if no recurrence was set up.
*/
-bool KAEvent::setRecurDaily(int freq, const QBitArray& days, int count, const QDate& end)
+bool KAEvent::setRecurDaily(int freq, const TQBitArray& days, int count, const TQDate& end)
{
if (!setRecur(RecurrenceRule::rDaily, freq, count, end))
return false;
@@ -2278,7 +2278,7 @@ bool KAEvent::setRecurDaily(int freq, const QBitArray& days, int count, const QD
* end = end date (invalid to use 'count' instead).
* Reply = false if no recurrence was set up.
*/
-bool KAEvent::setRecurWeekly(int freq, const QBitArray& days, int count, const QDate& end)
+bool KAEvent::setRecurWeekly(int freq, const TQBitArray& days, int count, const TQDate& end)
{
if (!setRecur(RecurrenceRule::rWeekly, freq, count, end))
return false;
@@ -2297,11 +2297,11 @@ bool KAEvent::setRecurWeekly(int freq, const QBitArray& days, int count, const Q
* end = end date (invalid to use 'count' instead).
* Reply = false if no recurrence was set up.
*/
-bool KAEvent::setRecurMonthlyByDate(int freq, const QValueList<int>& days, int count, const QDate& end)
+bool KAEvent::setRecurMonthlyByDate(int freq, const TQValueList<int>& days, int count, const TQDate& end)
{
if (!setRecur(RecurrenceRule::rMonthly, freq, count, end))
return false;
- for (QValueListConstIterator<int> it = days.begin(); it != days.end(); ++it)
+ for (TQValueListConstIterator<int> it = days.begin(); it != days.end(); ++it)
mRecurrence->addMonthlyDate(*it);
return true;
}
@@ -2318,11 +2318,11 @@ bool KAEvent::setRecurMonthlyByDate(int freq, const QValueList<int>& days, int c
* end = end date (invalid to use 'count' instead).
* Reply = false if no recurrence was set up.
*/
-bool KAEvent::setRecurMonthlyByPos(int freq, const QValueList<MonthPos>& posns, int count, const QDate& end)
+bool KAEvent::setRecurMonthlyByPos(int freq, const TQValueList<MonthPos>& posns, int count, const TQDate& end)
{
if (!setRecur(RecurrenceRule::rMonthly, freq, count, end))
return false;
- for (QValueListConstIterator<MonthPos> it = posns.begin(); it != posns.end(); ++it)
+ for (TQValueListConstIterator<MonthPos> it = posns.begin(); it != posns.end(); ++it)
mRecurrence->addMonthlyPos((*it).weeknum, (*it).days);
return true;
}
@@ -2341,11 +2341,11 @@ bool KAEvent::setRecurMonthlyByPos(int freq, const QValueList<MonthPos>& posns,
* end = end date (invalid to use 'count' instead).
* Reply = false if no recurrence was set up.
*/
-bool KAEvent::setRecurAnnualByDate(int freq, const QValueList<int>& months, int day, KARecurrence::Feb29Type feb29, int count, const QDate& end)
+bool KAEvent::setRecurAnnualByDate(int freq, const TQValueList<int>& months, int day, KARecurrence::Feb29Type feb29, int count, const TQDate& end)
{
if (!setRecur(RecurrenceRule::rYearly, freq, count, end, feb29))
return false;
- for (QValueListConstIterator<int> it = months.begin(); it != months.end(); ++it)
+ for (TQValueListConstIterator<int> it = months.begin(); it != months.end(); ++it)
mRecurrence->addYearlyMonth(*it);
if (day)
mRecurrence->addMonthlyDate(day);
@@ -2365,13 +2365,13 @@ bool KAEvent::setRecurAnnualByDate(int freq, const QValueList<int>& months, int
* end = end date (invalid to use 'count' instead).
* Reply = false if no recurrence was set up.
*/
-bool KAEvent::setRecurAnnualByPos(int freq, const QValueList<MonthPos>& posns, const QValueList<int>& months, int count, const QDate& end)
+bool KAEvent::setRecurAnnualByPos(int freq, const TQValueList<MonthPos>& posns, const TQValueList<int>& months, int count, const TQDate& end)
{
if (!setRecur(RecurrenceRule::rYearly, freq, count, end))
return false;
- for (QValueListConstIterator<int> it = months.begin(); it != months.end(); ++it)
+ for (TQValueListConstIterator<int> it = months.begin(); it != months.end(); ++it)
mRecurrence->addYearlyMonth(*it);
- for (QValueListConstIterator<MonthPos> it = posns.begin(); it != posns.end(); ++it)
+ for (TQValueListConstIterator<MonthPos> it = posns.begin(); it != posns.end(); ++it)
mRecurrence->addYearlyPos((*it).weeknum, (*it).days);
return true;
}
@@ -2386,7 +2386,7 @@ bool KAEvent::setRecurAnnualByPos(int freq, const QValueList<MonthPos>& posns, c
* end = end date/time (invalid to use 'count' instead).
* Reply = false if no recurrence was set up.
*/
-bool KAEvent::setRecur(RecurrenceRule::PeriodType recurType, int freq, int count, const QDateTime& end, KARecurrence::Feb29Type feb29)
+bool KAEvent::setRecur(RecurrenceRule::PeriodType recurType, int freq, int count, const TQDateTime& end, KARecurrence::Feb29Type feb29)
{
if (count >= -1 && (count || end.date().isValid()))
{
@@ -2483,17 +2483,17 @@ void KAEvent::checkRepetition() const
#if 0
/******************************************************************************
- * Convert a QValueList<WDayPos> to QValueList<MonthPos>.
+ * Convert a TQValueList<WDayPos> to TQValueList<MonthPos>.
*/
-QValueList<KAEvent::MonthPos> KAEvent::convRecurPos(const QValueList<KCal::RecurrenceRule::WDayPos>& wdaypos)
+TQValueList<KAEvent::MonthPos> KAEvent::convRecurPos(const TQValueList<KCal::RecurrenceRule::WDayPos>& wdaypos)
{
- QValueList<MonthPos> mposns;
- for (QValueList<KCal::RecurrenceRule::WDayPos>::ConstIterator it = wdaypos.begin(); it != wdaypos.end(); ++it)
+ TQValueList<MonthPos> mposns;
+ for (TQValueList<KCal::RecurrenceRule::WDayPos>::ConstIterator it = wdaypos.begin(); it != wdaypos.end(); ++it)
{
int daybit = (*it).day() - 1;
int weeknum = (*it).pos();
bool found = false;
- for (QValueList<MonthPos>::Iterator mit = mposns.begin(); mit != mposns.end(); ++mit)
+ for (TQValueList<MonthPos>::Iterator mit = mposns.begin(); mit != mposns.end(); ++mit)
{
if ((*mit).weeknum == weeknum)
{
@@ -2519,7 +2519,7 @@ QValueList<KAEvent::MonthPos> KAEvent::convRecurPos(const QValueList<KCal::Recur
* Find the alarm template with the specified name.
* Reply = invalid event if not found.
*/
-KAEvent KAEvent::findTemplateName(AlarmCalendar& calendar, const QString& name)
+KAEvent KAEvent::findTemplateName(AlarmCalendar& calendar, const TQString& name)
{
KAEvent event;
Event::List events = calendar.events();
@@ -2546,19 +2546,19 @@ KAEvent KAEvent::findTemplateName(AlarmCalendar& calendar, const QString& name)
bool KAEvent::adjustStartOfDay(const Event::List& events)
{
bool changed = false;
- QTime startOfDay = Preferences::startOfDay();
+ TQTime startOfDay = Preferences::startOfDay();
for (Event::List::ConstIterator evit = events.begin(); evit != events.end(); ++evit)
{
Event* event = *evit;
- const QStringList cats = event->categories();
+ const TQStringList cats = event->categories();
if (cats.find(DATE_ONLY_CATEGORY) != cats.end())
{
// It's an untimed event, so fix it
- QTime oldTime = event->dtStart().time();
+ TQTime oldTime = event->dtStart().time();
int adjustment = oldTime.secsTo(startOfDay);
if (adjustment)
{
- event->setDtStart(QDateTime(event->dtStart().date(), startOfDay));
+ event->setDtStart(TQDateTime(event->dtStart().date(), startOfDay));
Alarm::List alarms = event->alarms();
int deferralOffset = 0;
for (Alarm::List::ConstIterator alit = alarms.begin(); alit != alarms.end(); ++alit)
@@ -2589,7 +2589,7 @@ bool KAEvent::adjustStartOfDay(const Event::List& events)
int deferralOffset = 0;
int newDeferralOffset = 0;
DateTime start;
- QDateTime nextMainDateTime = readDateTime(*event, false, start).rawDateTime();
+ TQDateTime nextMainDateTime = readDateTime(*event, false, start).rawDateTime();
AlarmMap alarmMap;
readAlarms(*event, &alarmMap);
for (AlarmMap::Iterator it = alarmMap.begin(); it != alarmMap.end(); ++it)
@@ -2601,7 +2601,7 @@ bool KAEvent::adjustStartOfDay(const Event::List& events)
&& !(data.type & KAAlarm::TIMED_DEFERRAL_FLAG))
{
// Date-only deferral alarm, so adjust its time
- QDateTime altime = nextMainDateTime.addSecs(data.alarm->startOffset().asSeconds());
+ TQDateTime altime = nextMainDateTime.addSecs(data.alarm->startOffset().asSeconds());
altime.setTime(startOfDay);
deferralOffset = data.alarm->startOffset().asSeconds();
newDeferralOffset = event->dtStart().secsTo(altime);
@@ -2629,28 +2629,28 @@ bool KAEvent::adjustStartOfDay(const Event::List& events)
void KAEvent::convertKCalEvents(KCal::Calendar& calendar, int version, bool adjustSummerTime)
{
// KAlarm pre-0.9 codes held in the alarm's DESCRIPTION property
- static const QChar SEPARATOR = ';';
- static const QChar LATE_CANCEL_CODE = 'C';
- static const QChar AT_LOGIN_CODE = 'L'; // subsidiary alarm at every login
- static const QChar DEFERRAL_CODE = 'D'; // extra deferred alarm
- static const QString TEXT_PREFIX = QString::fromLatin1("TEXT:");
- static const QString FILE_PREFIX = QString::fromLatin1("FILE:");
- static const QString COMMAND_PREFIX = QString::fromLatin1("CMD:");
+ static const TQChar SEPARATOR = ';';
+ static const TQChar LATE_CANCEL_CODE = 'C';
+ static const TQChar AT_LOGIN_CODE = 'L'; // subsidiary alarm at every login
+ static const TQChar DEFERRAL_CODE = 'D'; // extra deferred alarm
+ static const TQString TEXT_PREFIX = TQString::fromLatin1("TEXT:");
+ static const TQString FILE_PREFIX = TQString::fromLatin1("FILE:");
+ static const TQString COMMAND_PREFIX = TQString::fromLatin1("CMD:");
// KAlarm pre-0.9.2 codes held in the event's CATEGORY property
- static const QString BEEP_CATEGORY = QString::fromLatin1("BEEP");
+ static const TQString BEEP_CATEGORY = TQString::fromLatin1("BEEP");
// KAlarm pre-1.1.1 LATECANCEL category with no parameter
- static const QString LATE_CANCEL_CAT = QString::fromLatin1("LATECANCEL");
+ static const TQString LATE_CANCEL_CAT = TQString::fromLatin1("LATECANCEL");
// KAlarm pre-1.3.0 TMPLDEFTIME category with no parameter
- static const QString TEMPL_DEF_TIME_CAT = QString::fromLatin1("TMPLDEFTIME");
+ static const TQString TEMPL_DEF_TIME_CAT = TQString::fromLatin1("TMPLDEFTIME");
// KAlarm pre-1.3.1 XTERM category
- static const QString EXEC_IN_XTERM_CAT = QString::fromLatin1("XTERM");
+ static const TQString EXEC_IN_XTERM_CAT = TQString::fromLatin1("XTERM");
// KAlarm pre-1.4.22 properties
- static const QCString KMAIL_ID_PROPERTY("KMAILID"); // X-KDE-KALARM-KMAILID property
+ static const TQCString KMAIL_ID_PROPERTY("KMAILID"); // X-KDE-KALARM-KMAILID property
if (version >= calVersion())
return;
@@ -2667,8 +2667,8 @@ void KAEvent::convertKCalEvents(KCal::Calendar& calendar, int version, bool adju
bool pre_1_5_0 = (version < KAlarm::Version(1,5,0));
Q_ASSERT(calVersion() == KAlarm::Version(1,5,0));
- QDateTime dt0(QDate(1970,1,1), QTime(0,0,0));
- QTime startOfDay = Preferences::startOfDay();
+ TQDateTime dt0(TQDate(1970,1,1), TQTime(0,0,0));
+ TQTime startOfDay = Preferences::startOfDay();
Event::List events = calendar.rawEvents();
for (Event::List::ConstIterator evit = events.begin(); evit != events.end(); ++evit)
@@ -2677,7 +2677,7 @@ void KAEvent::convertKCalEvents(KCal::Calendar& calendar, int version, bool adju
Alarm::List alarms = event->alarms();
if (alarms.isEmpty())
continue; // KAlarm isn't interested in events without alarms
- QStringList cats = event->categories();
+ TQStringList cats = event->categories();
bool addLateCancel = false;
if (pre_0_7 && event->doesFloat())
@@ -2708,7 +2708,7 @@ void KAEvent::convertKCalEvents(KCal::Calendar& calendar, int version, bool adju
bool deferral = false;
bool lateCancel = false;
KAAlarmEventBase::Type action = T_MESSAGE;
- QString txt = alarm->text();
+ TQString txt = alarm->text();
int length = txt.length();
int i = 0;
if (txt[0].isDigit())
@@ -2718,7 +2718,7 @@ void KAEvent::convertKCalEvents(KCal::Calendar& calendar, int version, bool adju
{
while (i < length)
{
- QChar ch = txt[i++];
+ TQChar ch = txt[i++];
if (ch == SEPARATOR)
break;
if (ch == LATE_CANCEL_CODE)
@@ -2748,7 +2748,7 @@ void KAEvent::convertKCalEvents(KCal::Calendar& calendar, int version, bool adju
i = 0;
txt = txt.mid(i);
- QStringList types;
+ TQStringList types;
switch (action)
{
case T_FILE:
@@ -2794,7 +2794,7 @@ void KAEvent::convertKCalEvents(KCal::Calendar& calendar, int version, bool adju
{
// The calendar file was written by the KDE 3.0.0 version of KAlarm 0.5.7.
// Summer time was ignored when converting to UTC.
- QDateTime dt = alarm->time();
+ TQDateTime dt = alarm->time();
time_t t = dt0.secsTo(dt);
struct tm* dtm = localtime(&t);
if (dtm->tm_isdst)
@@ -2820,7 +2820,7 @@ void KAEvent::convertKCalEvents(KCal::Calendar& calendar, int version, bool adju
*/
if (uidStatus(event->uid()) == EXPIRED)
event->setCreated(event->dtEnd());
- QDateTime start = event->dtStart();
+ TQDateTime start = event->dtStart();
if (event->doesFloat())
{
event->setFloats(false);
@@ -2833,7 +2833,7 @@ void KAEvent::convertKCalEvents(KCal::Calendar& calendar, int version, bool adju
for (alit = alarms.begin(); alit != alarms.end(); ++alit)
{
Alarm* alarm = *alit;
- QDateTime dt = alarm->time();
+ TQDateTime dt = alarm->time();
alarm->setStartOffset(start.secsTo(dt));
}
@@ -2844,12 +2844,12 @@ void KAEvent::convertKCalEvents(KCal::Calendar& calendar, int version, bool adju
Alarm* alarm = *alit;
if (alarm->type() == Alarm::Display)
alarm->setCustomProperty(APPNAME, FONT_COLOUR_PROPERTY,
- QString::fromLatin1("%1;;").arg(cats[0]));
+ TQString::fromLatin1("%1;;").arg(cats[0]));
}
cats.remove(cats.begin());
}
- for (QStringList::Iterator it = cats.begin(); it != cats.end(); ++it)
+ for (TQStringList::Iterator it = cats.begin(); it != cats.end(); ++it)
{
if (*it == BEEP_CATEGORY)
{
@@ -2858,7 +2858,7 @@ void KAEvent::convertKCalEvents(KCal::Calendar& calendar, int version, bool adju
Alarm* alarm = event->newAlarm();
alarm->setEnabled(true);
alarm->setAudioAlarm();
- QDateTime dt = event->dtStart(); // default
+ TQDateTime dt = event->dtStart(); // default
// Parse and order the alarms to know which one's date/time to use
AlarmMap alarmMap;
@@ -2881,7 +2881,7 @@ void KAEvent::convertKCalEvents(KCal::Calendar& calendar, int version, bool adju
* It's a KAlarm pre-1.1.1 calendar file.
* Convert simple LATECANCEL category to LATECANCEL:n where n = minutes late.
*/
- QStringList::Iterator it;
+ TQStringList::Iterator it;
while ((it = cats.find(LATE_CANCEL_CAT)) != cats.end())
{
cats.remove(it);
@@ -2900,8 +2900,8 @@ void KAEvent::convertKCalEvents(KCal::Calendar& calendar, int version, bool adju
Alarm* alarm = *alit;
if (alarm->type() == Alarm::Display)
{
- QString oldtext = alarm->text();
- QString newtext = AlarmText::toCalendarText(oldtext);
+ TQString oldtext = alarm->text();
+ TQString newtext = AlarmText::toCalendarText(oldtext);
if (oldtext != newtext)
alarm->setDisplayAlarm(newtext);
}
@@ -2914,11 +2914,11 @@ void KAEvent::convertKCalEvents(KCal::Calendar& calendar, int version, bool adju
* It's a KAlarm pre-1.3.0 calendar file.
* Convert simple TMPLDEFTIME category to TMPLAFTTIME:n where n = minutes after.
*/
- QStringList::Iterator it;
+ TQStringList::Iterator it;
while ((it = cats.find(TEMPL_DEF_TIME_CAT)) != cats.end())
{
cats.remove(it);
- cats.append(QString("%1%2").arg(TEMPL_AFTER_TIME_CATEGORY).arg(0));
+ cats.append(TQString("%1%2").arg(TEMPL_AFTER_TIME_CATEGORY).arg(0));
}
}
@@ -2928,7 +2928,7 @@ void KAEvent::convertKCalEvents(KCal::Calendar& calendar, int version, bool adju
* It's a KAlarm pre-1.3.1 calendar file.
* Convert simple XTERM category to LOG:xterm:
*/
- QStringList::Iterator it;
+ TQStringList::Iterator it;
while ((it = cats.find(EXEC_IN_XTERM_CAT)) != cats.end())
{
cats.remove(it);
@@ -2937,7 +2937,7 @@ void KAEvent::convertKCalEvents(KCal::Calendar& calendar, int version, bool adju
}
if (addLateCancel)
- cats.append(QString("%1%2").arg(LATE_CANCEL_CATEGORY).arg(1));
+ cats.append(TQString("%1%2").arg(LATE_CANCEL_CATEGORY).arg(1));
event->setCategories(cats);
@@ -2964,11 +2964,11 @@ void KAEvent::convertKCalEvents(KCal::Calendar& calendar, int version, bool adju
if (!alarm->hasStartOffset())
continue;
bool mainAlarm = true;
- QString property = alarm->customProperty(APPNAME, TYPE_PROPERTY);
- QStringList types = QStringList::split(QChar(','), property);
+ TQString property = alarm->customProperty(APPNAME, TYPE_PROPERTY);
+ TQStringList types = TQStringList::split(TQChar(','), property);
for (unsigned int i = 0; i < types.count(); ++i)
{
- QString type = types[i];
+ TQString type = types[i];
if (type == AT_LOGIN_TYPE
|| type == TIME_DEFERRAL_TYPE
|| type == DATE_DEFERRAL_TYPE
@@ -2986,7 +2986,7 @@ void KAEvent::convertKCalEvents(KCal::Calendar& calendar, int version, bool adju
nextMainDateTime.setDateOnly(dateOnly);
if (nextMainDateTime != startDateTime)
{
- QDateTime dt = nextMainDateTime.dateTime();
+ TQDateTime dt = nextMainDateTime.dateTime();
event->setCustomProperty(APPNAME, NEXT_RECUR_PROPERTY,
dt.toString(dateOnly ? "yyyyMMdd" : "yyyyMMddThhmmss"));
}
@@ -3013,11 +3013,11 @@ void KAEvent::convertKCalEvents(KCal::Calendar& calendar, int version, bool adju
Alarm* alarm = *alit;
if (!alarm->hasStartOffset())
continue;
- QString property = alarm->customProperty(APPNAME, TYPE_PROPERTY);
- QStringList types = QStringList::split(QChar(','), property);
+ TQString property = alarm->customProperty(APPNAME, TYPE_PROPERTY);
+ TQStringList types = TQStringList::split(TQChar(','), property);
for (unsigned int i = 0; i < types.count(); ++i)
{
- QString type = types[i];
+ TQString type = types[i];
if (type == TIME_DEFERRAL_TYPE
|| type == DATE_DEFERRAL_TYPE)
{
@@ -3039,12 +3039,12 @@ void KAEvent::convertKCalEvents(KCal::Calendar& calendar, int version, bool adju
for (Alarm::List::ConstIterator alit = alarms.begin(); alit != alarms.end(); ++alit)
{
Alarm* alarm = *alit;
- QString name = alarm->customProperty(APPNAME, KMAIL_ID_PROPERTY);
+ TQString name = alarm->customProperty(APPNAME, KMAIL_ID_PROPERTY);
if (name.isEmpty())
continue;
uint id = KAMail::identityUoid(name);
if (id)
- alarm->setCustomProperty(APPNAME, EMAIL_ID_PROPERTY, QString::number(id));
+ alarm->setCustomProperty(APPNAME, EMAIL_ID_PROPERTY, TQString::number(id));
alarm->removeCustomProperty(APPNAME, KMAIL_ID_PROPERTY);
}
convertRepetition(event);
@@ -3299,7 +3299,7 @@ int KAAlarmEventBase::flags() const
| (mCommandScript ? KAEvent::SCRIPT : 0);
}
-const QFont& KAAlarmEventBase::font() const
+const TQFont& KAAlarmEventBase::font() const
{
return mDefaultFont ? Preferences::messageFont() : mFont;
}
@@ -3365,10 +3365,10 @@ void KAAlarmEventBase::dumpDebug() const
* Sets the list of email addresses, removing any empty addresses.
* Reply = false if empty addresses were found.
*/
-EmailAddressList& EmailAddressList::operator=(const QValueList<Person>& addresses)
+EmailAddressList& EmailAddressList::operator=(const TQValueList<Person>& addresses)
{
clear();
- for (QValueList<Person>::ConstIterator it = addresses.begin(); it != addresses.end(); ++it)
+ for (TQValueList<Person>::ConstIterator it = addresses.begin(); it != addresses.end(); ++it)
{
if (!(*it).email().isEmpty())
append(*it);
@@ -3380,11 +3380,11 @@ EmailAddressList& EmailAddressList::operator=(const QValueList<Person>& addresse
* Return the email address list as a string, each address being delimited by
* the specified separator string.
*/
-QString EmailAddressList::join(const QString& separator) const
+TQString EmailAddressList::join(const TQString& separator) const
{
- QString result;
+ TQString result;
bool first = true;
- for (QValueList<Person>::ConstIterator it = begin(); it != end(); ++it)
+ for (TQValueList<Person>::ConstIterator it = begin(); it != end(); ++it)
{
if (first)
first = false;
@@ -3392,14 +3392,14 @@ QString EmailAddressList::join(const QString& separator) const
result += separator;
bool quote = false;
- QString name = (*it).name();
+ TQString name = (*it).name();
if (!name.isEmpty())
{
// Need to enclose the name in quotes if it has any special characters
int len = name.length();
for (int i = 0; i < len; ++i)
{
- QChar ch = name[i];
+ TQChar ch = name[i];
if (!ch.isLetterOrNumber())
{
quote = true;
@@ -3429,17 +3429,17 @@ QString EmailAddressList::join(const QString& separator) const
* The command line is first split into its program file and arguments before
* initialising the alarm.
*/
-static void setProcedureAlarm(Alarm* alarm, const QString& commandLine)
+static void setProcedureAlarm(Alarm* alarm, const TQString& commandLine)
{
- QString command = QString::null;
- QString arguments = QString::null;
- QChar quoteChar;
+ TQString command = TQString::null;
+ TQString arguments = TQString::null;
+ TQChar quoteChar;
bool quoted = false;
uint posMax = commandLine.length();
uint pos;
for (pos = 0; pos < posMax; ++pos)
{
- QChar ch = commandLine[pos];
+ TQChar ch = commandLine[pos];
if (quoted)
{
if (ch == quoteChar)
diff --git a/kalarm/alarmevent.h b/kalarm/alarmevent.h
index ff8ab3056..91bf24289 100644
--- a/kalarm/alarmevent.h
+++ b/kalarm/alarmevent.h
@@ -23,8 +23,8 @@
/** @file alarmevent.h - represents calendar alarms and events */
-#include <qcolor.h>
-#include <qfont.h>
+#include <tqcolor.h>
+#include <tqfont.h>
#include <libkcal/person.h>
#include <libkcal/event.h>
@@ -42,13 +42,13 @@ struct AlarmData;
typedef KCal::Person EmailAddress;
-class EmailAddressList : public QValueList<KCal::Person>
+class EmailAddressList : public TQValueList<KCal::Person>
{
public:
- EmailAddressList() : QValueList<KCal::Person>() { }
- EmailAddressList(const QValueList<KCal::Person>& list) { operator=(list); }
- EmailAddressList& operator=(const QValueList<KCal::Person>&);
- QString join(const QString& separator) const;
+ EmailAddressList() : TQValueList<KCal::Person>() { }
+ EmailAddressList(const TQValueList<KCal::Person>& list) { operator=(list); }
+ EmailAddressList& operator=(const TQValueList<KCal::Person>&);
+ TQString join(const TQString& separator) const;
};
@@ -57,21 +57,21 @@ class KAAlarmEventBase
{
public:
~KAAlarmEventBase() { }
- const QString& cleanText() const { return mText; }
- QString message() const { return (mActionType == T_MESSAGE || mActionType == T_EMAIL) ? mText : QString::null; }
- QString fileName() const { return (mActionType == T_FILE) ? mText : QString::null; }
- QString command() const { return (mActionType == T_COMMAND) ? mText : QString::null; }
+ const TQString& cleanText() const { return mText; }
+ TQString message() const { return (mActionType == T_MESSAGE || mActionType == T_EMAIL) ? mText : TQString::null; }
+ TQString fileName() const { return (mActionType == T_FILE) ? mText : TQString::null; }
+ TQString command() const { return (mActionType == T_COMMAND) ? mText : TQString::null; }
uint emailFromId() const { return mEmailFromIdentity; }
const EmailAddressList& emailAddresses() const { return mEmailAddresses; }
- QString emailAddresses(const QString& sep) const { return mEmailAddresses.join(sep); }
- const QString& emailSubject() const { return mEmailSubject; }
- const QStringList& emailAttachments() const { return mEmailAttachments; }
- QString emailAttachments(const QString& sep) const { return mEmailAttachments.join(sep); }
+ TQString emailAddresses(const TQString& sep) const { return mEmailAddresses.join(sep); }
+ const TQString& emailSubject() const { return mEmailSubject; }
+ const TQStringList& emailAttachments() const { return mEmailAttachments; }
+ TQString emailAttachments(const TQString& sep) const { return mEmailAttachments.join(sep); }
bool emailBcc() const { return mEmailBcc; }
- const QColor& bgColour() const { return mBgColour; }
- const QColor& fgColour() const { return mFgColour; }
+ const TQColor& bgColour() const { return mBgColour; }
+ const TQColor& fgColour() const { return mFgColour; }
bool defaultFont() const { return mDefaultFont; }
- const QFont& font() const;
+ const TQFont& font() const;
int lateCancel() const { return mLateCancel; }
bool autoClose() const { return mAutoClose; }
bool commandScript() const { return mCommandScript; }
@@ -99,16 +99,16 @@ class KAAlarmEventBase
void copy(const KAAlarmEventBase&);
void set(int flags);
- QString mEventID; // UID: KCal::Event unique ID
- QString mText; // message text, file URL, command, email body [or audio file for KAAlarm]
+ TQString mEventID; // UID: KCal::Event unique ID
+ TQString mText; // message text, file URL, command, email body [or audio file for KAAlarm]
DateTime mNextMainDateTime; // next time to display the alarm, excluding repetitions
- QColor mBgColour; // background colour of alarm message
- QColor mFgColour; // foreground colour of alarm message, or invalid for default
- QFont mFont; // font of alarm message (ignored if mDefaultFont true)
+ TQColor mBgColour; // background colour of alarm message
+ TQColor mFgColour; // foreground colour of alarm message, or invalid for default
+ TQFont mFont; // font of alarm message (ignored if mDefaultFont true)
uint mEmailFromIdentity;// KMail identity for email 'From' field, or empty
EmailAddressList mEmailAddresses; // ATTENDEE: addresses to send email to
- QString mEmailSubject; // SUMMARY: subject line of email
- QStringList mEmailAttachments; // ATTACH: email attachment file names
+ TQString mEmailSubject; // SUMMARY: subject line of email
+ TQStringList mEmailAttachments; // ATTACH: email attachment file names
float mSoundVolume; // volume for sound file, or < 0 for unspecified
float mFadeVolume; // initial volume for sound file, or < 0 for no fade
int mFadeSeconds; // fade time for sound file, or 0 if none
@@ -194,13 +194,13 @@ class KAAlarm : public KAAlarmEventBase
bool valid() const { return mType != INVALID__ALARM; }
Type type() const { return static_cast<Type>(mType & ~TIMED_DEFERRAL_FLAG); }
SubType subType() const { return mType; }
- const QString& eventID() const { return mEventID; }
+ const TQString& eventID() const { return mEventID; }
DateTime dateTime(bool withRepeats = false) const
{ return (withRepeats && mNextRepeat && mRepeatInterval)
? mNextMainDateTime.addSecs(mNextRepeat * mRepeatInterval * 60) : mNextMainDateTime; }
- QDate date() const { return mNextMainDateTime.date(); }
- QTime time() const { return mNextMainDateTime.time(); }
- QString audioFile() const { return (mActionType == T_AUDIO) && !mBeep ? mText : QString::null; }
+ TQDate date() const { return mNextMainDateTime.date(); }
+ TQTime time() const { return mNextMainDateTime.time(); }
+ TQString audioFile() const { return (mActionType == T_AUDIO) && !mBeep ? mText : TQString::null; }
float soundVolume() const { return (mActionType == T_AUDIO) && !mBeep && !mText.isEmpty() ? mSoundVolume : -1; }
float fadeVolume() const { return (mActionType == T_AUDIO) && mSoundVolume >= 0 && mFadeSeconds && !mBeep && !mText.isEmpty() ? mFadeVolume : -1; }
int fadeSeconds() const { return (mActionType == T_AUDIO) && mSoundVolume >= 0 && mFadeVolume >= 0 && !mBeep && !mText.isEmpty() ? mFadeSeconds : 0; }
@@ -208,7 +208,7 @@ class KAAlarm : public KAAlarmEventBase
bool reminder() const { return mType == REMINDER__ALARM; }
bool deferred() const { return mDeferred; }
void setTime(const DateTime& dt) { mNextMainDateTime = dt; }
- void setTime(const QDateTime& dt) { mNextMainDateTime = dt; }
+ void setTime(const TQDateTime& dt) { mNextMainDateTime = dt; }
int flags() const;
#ifdef NDEBUG
void dumpDebug() const { }
@@ -310,36 +310,36 @@ class KAEvent : public KAAlarmEventBase
};
KAEvent() : mRevision(0), mRecurrence(0), mAlarmCount(0) { }
- KAEvent(const QDateTime& dt, const QString& message, const QColor& bg, const QColor& fg, const QFont& f, Action action, int lateCancel, int flags)
+ KAEvent(const TQDateTime& dt, const TQString& message, const TQColor& bg, const TQColor& fg, const TQFont& f, Action action, int lateCancel, int flags)
: mRecurrence(0) { set(dt, message, bg, fg, f, action, lateCancel, flags); }
explicit KAEvent(const KCal::Event& e) : mRecurrence(0) { set(e); }
KAEvent(const KAEvent& e) : KAAlarmEventBase(e), mRecurrence(0) { copy(e); }
~KAEvent() { delete mRecurrence; }
KAEvent& operator=(const KAEvent& e) { if (&e != this) copy(e); return *this; }
void set(const KCal::Event&);
- void set(const QDateTime&, const QString& message, const QColor& bg, const QColor& fg, const QFont&, Action, int lateCancel, int flags);
- void setEmail(uint from, const EmailAddressList&, const QString& subject, const QStringList& attachments);
- void setAudioFile(const QString& filename, float volume, float fadeVolume, int fadeSeconds);
- void setTemplate(const QString& name, int afterTime = -1) { mTemplateName = name; mTemplateAfterTime = afterTime; mUpdated = true; }
- void setActions(const QString& pre, const QString& post) { mPreAction = pre; mPostAction = post; mUpdated = true; }
- OccurType setNextOccurrence(const QDateTime& preDateTime);
+ void set(const TQDateTime&, const TQString& message, const TQColor& bg, const TQColor& fg, const TQFont&, Action, int lateCancel, int flags);
+ void setEmail(uint from, const EmailAddressList&, const TQString& subject, const TQStringList& attachments);
+ void setAudioFile(const TQString& filename, float volume, float fadeVolume, int fadeSeconds);
+ void setTemplate(const TQString& name, int afterTime = -1) { mTemplateName = name; mTemplateAfterTime = afterTime; mUpdated = true; }
+ void setActions(const TQString& pre, const TQString& post) { mPreAction = pre; mPostAction = post; mUpdated = true; }
+ OccurType setNextOccurrence(const TQDateTime& preDateTime);
void setFirstRecurrence();
- void setEventID(const QString& id) { mEventID = id; mUpdated = true; }
- void setDate(const QDate& d) { mNextMainDateTime.set(d); mUpdated = true; }
- void setTime(const QDateTime& dt) { mNextMainDateTime.set(dt); mUpdated = true; }
- void setSaveDateTime(const QDateTime& dt) { mSaveDateTime = dt; mUpdated = true; }
+ void setEventID(const TQString& id) { mEventID = id; mUpdated = true; }
+ void setDate(const TQDate& d) { mNextMainDateTime.set(d); mUpdated = true; }
+ void setTime(const TQDateTime& dt) { mNextMainDateTime.set(dt); mUpdated = true; }
+ void setSaveDateTime(const TQDateTime& dt) { mSaveDateTime = dt; mUpdated = true; }
void setLateCancel(int lc) { mLateCancel = lc; mUpdated = true; }
void setAutoClose(bool ac) { mAutoClose = ac; mUpdated = true; }
void setRepeatAtLogin(bool rl) { mRepeatAtLogin = rl; mUpdated = true; }
void setUid(Status s) { mEventID = uid(mEventID, s); mUpdated = true; }
void setKMailSerialNumber(unsigned long n) { mKMailSerialNumber = n; }
- void setLogFile(const QString& logfile);
+ void setLogFile(const TQString& logfile);
void setReminder(int minutes, bool onceOnly);
bool defer(const DateTime&, bool reminder, bool adjustRecurrence = false);
void cancelDefer();
void cancelCancelledDeferral();
void setDeferDefaultMinutes(int minutes) { mDeferDefaultMinutes = minutes; mUpdated = true; }
- bool setDisplaying(const KAEvent&, KAAlarm::Type, const QDateTime&);
+ bool setDisplaying(const KAEvent&, KAAlarm::Type, const TQDateTime&);
void reinstateFromDisplaying(const KAEvent& dispEvent);
void setArchive() { mArchive = true; mUpdated = true; }
void setEnabled(bool enable) { mEnabled = enable; mUpdated = true; }
@@ -350,7 +350,7 @@ class KAEvent : public KAAlarmEventBase
KCal::Event* event() const; // convert to new Event
bool isTemplate() const { return !mTemplateName.isEmpty(); }
- const QString& templateName() const { return mTemplateName; }
+ const TQString& templateName() const { return mTemplateName; }
bool usingDefaultTime() const { return mTemplateAfterTime == 0; }
int templateAfterTime() const { return mTemplateAfterTime; }
KAAlarm alarm(KAAlarm::Type) const;
@@ -361,15 +361,15 @@ class KAEvent : public KAAlarmEventBase
bool updateKCalEvent(KCal::Event&, bool checkUid = true, bool original = false, bool cancelCancelledDefer = false) const;
Action action() const { return (Action)mActionType; }
bool displayAction() const { return mActionType == T_MESSAGE || mActionType == T_FILE; }
- const QString& id() const { return mEventID; }
+ const TQString& id() const { return mEventID; }
bool valid() const { return mAlarmCount && (mAlarmCount != 1 || !mRepeatAtLogin); }
int alarmCount() const { return mAlarmCount; }
const DateTime& startDateTime() const { return mStartDateTime; }
DateTime mainDateTime(bool withRepeats = false) const
{ return (withRepeats && mNextRepeat && mRepeatInterval)
? mNextMainDateTime.addSecs(mNextRepeat * mRepeatInterval * 60) : mNextMainDateTime; }
- QDate mainDate() const { return mNextMainDateTime.date(); }
- QTime mainTime() const { return mNextMainDateTime.time(); }
+ TQDate mainDate() const { return mNextMainDateTime.date(); }
+ TQTime mainTime() const { return mNextMainDateTime.time(); }
DateTime mainEndRepeatTime() const { return (mRepeatCount > 0 && mRepeatInterval)
? mNextMainDateTime.addSecs(mRepeatCount * mRepeatInterval * 60) : mNextMainDateTime; }
int reminder() const { return mReminderMinutes; }
@@ -380,28 +380,28 @@ class KAEvent : public KAAlarmEventBase
DateTime deferralLimit(DeferLimitType* = 0) const;
int deferDefaultMinutes() const { return mDeferDefaultMinutes; }
DateTime displayDateTime() const;
- const QString& messageFileOrCommand() const { return mText; }
- QString logFile() const { return mLogFile; }
+ const TQString& messageFileOrCommand() const { return mText; }
+ TQString logFile() const { return mLogFile; }
bool commandXterm() const { return mCommandXterm; }
unsigned long kmailSerialNumber() const { return mKMailSerialNumber; }
bool copyToKOrganizer() const { return mCopyToKOrganizer; }
- const QString& audioFile() const { return mAudioFile; }
+ const TQString& audioFile() const { return mAudioFile; }
float soundVolume() const { return !mAudioFile.isEmpty() ? mSoundVolume : -1; }
float fadeVolume() const { return !mAudioFile.isEmpty() && mSoundVolume >= 0 && mFadeSeconds ? mFadeVolume : -1; }
int fadeSeconds() const { return !mAudioFile.isEmpty() && mSoundVolume >= 0 && mFadeVolume >= 0 ? mFadeSeconds : 0; }
bool repeatSound() const { return mRepeatSound && !mAudioFile.isEmpty(); }
- const QString& preAction() const { return mPreAction; }
- const QString& postAction() const { return mPostAction; }
+ const TQString& preAction() const { return mPreAction; }
+ const TQString& postAction() const { return mPostAction; }
bool recurs() const { return checkRecur() != KARecurrence::NO_RECUR; }
KARecurrence::Type recurType() const { return checkRecur(); }
KARecurrence* recurrence() const { return mRecurrence; }
int recurInterval() const; // recurrence period in units of the recurrence period type (minutes, days, etc)
int longestRecurrenceInterval() const { return mRecurrence ? mRecurrence->longestInterval() : 0; }
- QString recurrenceText(bool brief = false) const;
- QString repetitionText(bool brief = false) const;
- bool occursAfter(const QDateTime& preDateTime, bool includeRepetitions) const;
- OccurType nextOccurrence(const QDateTime& preDateTime, DateTime& result, OccurOption = IGNORE_REPETITION) const;
- OccurType previousOccurrence(const QDateTime& afterDateTime, DateTime& result, bool includeRepetitions = false) const;
+ TQString recurrenceText(bool brief = false) const;
+ TQString repetitionText(bool brief = false) const;
+ bool occursAfter(const TQDateTime& preDateTime, bool includeRepetitions) const;
+ OccurType nextOccurrence(const TQDateTime& preDateTime, DateTime& result, OccurOption = IGNORE_REPETITION) const;
+ OccurType previousOccurrence(const TQDateTime& afterDateTime, DateTime& result, bool includeRepetitions = false) const;
int flags() const;
bool deferred() const { return mDeferral > 0; }
bool toBeArchived() const { return mArchive; }
@@ -410,34 +410,34 @@ class KAEvent : public KAAlarmEventBase
bool mainExpired() const { return mMainExpired; }
bool expired() const { return mDisplaying && mMainExpired || uidStatus(mEventID) == EXPIRED; }
Status uidStatus() const { return uidStatus(mEventID); }
- static Status uidStatus(const QString& uid);
- static QString uid(const QString& id, Status);
- static KAEvent findTemplateName(AlarmCalendar&, const QString& name);
+ static Status uidStatus(const TQString& uid);
+ static TQString uid(const TQString& id, Status);
+ static KAEvent findTemplateName(AlarmCalendar&, const TQString& name);
struct MonthPos
{
MonthPos() : days(7) { }
int weeknum; // week in month, or < 0 to count from end of month
- QBitArray days; // days in week
+ TQBitArray days; // days in week
};
bool setRepetition(int interval, int count);
void setNoRecur() { clearRecur(); }
void setRecurrence(const KARecurrence&);
- bool setRecurMinutely(int freq, int count, const QDateTime& end);
- bool setRecurDaily(int freq, const QBitArray& days, int count, const QDate& end);
- bool setRecurWeekly(int freq, const QBitArray& days, int count, const QDate& end);
- bool setRecurMonthlyByDate(int freq, const QValueList<int>& days, int count, const QDate& end);
- bool setRecurMonthlyByPos(int freq, const QValueList<MonthPos>& pos, int count, const QDate& end);
- bool setRecurAnnualByDate(int freq, const QValueList<int>& months, int day, KARecurrence::Feb29Type, int count, const QDate& end);
- bool setRecurAnnualByPos(int freq, const QValueList<MonthPos>& pos, const QValueList<int>& months, int count, const QDate& end);
-// static QValueList<MonthPos> convRecurPos(const QValueList<KCal::RecurrenceRule::WDayPos>&);
+ bool setRecurMinutely(int freq, int count, const TQDateTime& end);
+ bool setRecurDaily(int freq, const TQBitArray& days, int count, const TQDate& end);
+ bool setRecurWeekly(int freq, const TQBitArray& days, int count, const TQDate& end);
+ bool setRecurMonthlyByDate(int freq, const TQValueList<int>& days, int count, const TQDate& end);
+ bool setRecurMonthlyByPos(int freq, const TQValueList<MonthPos>& pos, int count, const TQDate& end);
+ bool setRecurAnnualByDate(int freq, const TQValueList<int>& months, int day, KARecurrence::Feb29Type, int count, const TQDate& end);
+ bool setRecurAnnualByPos(int freq, const TQValueList<MonthPos>& pos, const TQValueList<int>& months, int count, const TQDate& end);
+// static TQValueList<MonthPos> convRecurPos(const TQValueList<KCal::RecurrenceRule::WDayPos>&);
#ifdef NDEBUG
void dumpDebug() const { }
#else
void dumpDebug() const;
#endif
static int calVersion();
- static QString calVersionString();
+ static TQString calVersionString();
static bool adjustStartOfDay(const KCal::Event::List&);
static void convertKCalEvents(KCal::Calendar&, int version, bool adjustSummerTime);
static void convertRepetitions(KCal::CalendarLocal&);
@@ -451,15 +451,15 @@ class KAEvent : public KAAlarmEventBase
};
void copy(const KAEvent&);
- bool setRecur(KCal::RecurrenceRule::PeriodType, int freq, int count, const QDateTime& end, KARecurrence::Feb29Type = KARecurrence::FEB29_FEB29);
+ bool setRecur(KCal::RecurrenceRule::PeriodType, int freq, int count, const TQDateTime& end, KARecurrence::Feb29Type = KARecurrence::FEB29_FEB29);
void clearRecur();
KARecurrence::Type checkRecur() const;
void checkRepetition() const;
- OccurType nextRecurrence(const QDateTime& preDateTime, DateTime& result) const;
- OccurType previousRecurrence(const QDateTime& afterDateTime, DateTime& result) const;
+ OccurType nextRecurrence(const TQDateTime& preDateTime, DateTime& result) const;
+ OccurType previousRecurrence(const TQDateTime& afterDateTime, DateTime& result) const;
static bool convertRepetition(KCal::Event*);
- KCal::Alarm* initKCalAlarm(KCal::Event&, const DateTime&, const QStringList& types, KAAlarm::Type = KAAlarm::INVALID_ALARM) const;
- KCal::Alarm* initKCalAlarm(KCal::Event&, int startOffsetSecs, const QStringList& types, KAAlarm::Type = KAAlarm::INVALID_ALARM) const;
+ KCal::Alarm* initKCalAlarm(KCal::Event&, const DateTime&, const TQStringList& types, KAAlarm::Type = KAAlarm::INVALID_ALARM) const;
+ KCal::Alarm* initKCalAlarm(KCal::Event&, int startOffsetSecs, const TQStringList& types, KAAlarm::Type = KAAlarm::INVALID_ALARM) const;
static DateTime readDateTime(const KCal::Event&, bool dateOnly, DateTime& start);
static void readAlarms(const KCal::Event&, void* alarmMap);
static void readAlarm(const KCal::Alarm&, AlarmData&);
@@ -467,13 +467,13 @@ class KAEvent : public KAAlarmEventBase
inline void set_reminder(int minutes);
inline void set_archiveReminder();
- QString mTemplateName; // alarm template's name, or null if normal event
- QString mAudioFile; // ATTACH: audio file to play
- QString mPreAction; // command to execute before alarm is displayed
- QString mPostAction; // command to execute after alarm window is closed
+ TQString mTemplateName; // alarm template's name, or null if normal event
+ TQString mAudioFile; // ATTACH: audio file to play
+ TQString mPreAction; // command to execute before alarm is displayed
+ TQString mPostAction; // command to execute after alarm window is closed
DateTime mStartDateTime; // DTSTART and DTEND: start and end time for event
- QDateTime mSaveDateTime; // CREATED: date event was created, or saved in expired calendar
- QDateTime mAtLoginDateTime; // repeat-at-login time
+ TQDateTime mSaveDateTime; // CREATED: date event was created, or saved in expired calendar
+ TQDateTime mAtLoginDateTime; // repeat-at-login time
DateTime mDeferralTime; // extra time to trigger alarm (if alarm or reminder deferred)
DateTime mDisplayingTime; // date/time shown in the alarm currently being displayed
int mDisplayingFlags; // type of alarm which is currently being displayed
@@ -486,7 +486,7 @@ class KAEvent : public KAAlarmEventBase
DeferType mDeferral; // whether the alarm is an extra deferred/deferred-reminder alarm
unsigned long mKMailSerialNumber;// if email text, message's KMail serial number
int mTemplateAfterTime;// time not specified: use n minutes after default time, or -1 (applies to templates only)
- QString mLogFile; // alarm output is to be logged to this URL
+ TQString mLogFile; // alarm output is to be logged to this URL
bool mCommandXterm; // command alarm is to be executed in a terminal window
bool mCopyToKOrganizer; // KOrganizer should hold a copy of the event
bool mReminderOnceOnly; // the reminder is output only for the first recurrence
diff --git a/kalarm/alarmlistview.cpp b/kalarm/alarmlistview.cpp
index 19fcda4b5..8fb72fe31 100644
--- a/kalarm/alarmlistview.cpp
+++ b/kalarm/alarmlistview.cpp
@@ -20,11 +20,11 @@
#include "kalarm.h"
-#include <qtooltip.h>
-#include <qpainter.h>
-#include <qstyle.h>
-#include <qheader.h>
-#include <qregexp.h>
+#include <tqtooltip.h>
+#include <tqpainter.h>
+#include <tqstyle.h>
+#include <tqheader.h>
+#include <tqregexp.h>
#include <kglobal.h>
#include <klocale.h>
@@ -44,10 +44,10 @@
class AlarmListTooltip : public QToolTip
{
public:
- AlarmListTooltip(QWidget* parent) : QToolTip(parent) { }
+ AlarmListTooltip(TQWidget* parent) : TQToolTip(parent) { }
virtual ~AlarmListTooltip() {}
protected:
- virtual void maybeTip(const QPoint&);
+ virtual void maybeTip(const TQPoint&);
};
@@ -55,26 +55,26 @@ class AlarmListTooltip : public QToolTip
= Class: AlarmListView
= Displays the list of outstanding alarms.
=============================================================================*/
-QValueList<EventListViewBase*> AlarmListView::mInstanceList;
+TQValueList<EventListViewBase*> AlarmListView::mInstanceList;
bool AlarmListView::mDragging = false;
-AlarmListView::AlarmListView(const QValueList<int>& order, QWidget* parent, const char* name)
+AlarmListView::AlarmListView(const TQValueList<int>& order, TQWidget* parent, const char* name)
: EventListViewBase(parent, name),
mMousePressed(false),
mDrawMessageInColour(false),
mShowExpired(false)
{
- static QString titles[COLUMN_COUNT] = {
+ static TQString titles[COLUMN_COUNT] = {
i18n("Time"),
i18n("Time To"),
i18n("Repeat"),
- QString::null,
- QString::null,
+ TQString::null,
+ TQString::null,
i18n("Message, File or Command")
};
- setSelectionMode(QListView::Extended);
+ setSelectionMode(TQListView::Extended);
// Set the column order
int i;
@@ -134,17 +134,17 @@ AlarmListView::AlarmListView(const QValueList<int>& order, QWidget* parent, cons
mTimeColumnHeaderWidth = columnWidth(mColumn[TIME_COLUMN]);
mTimeToColumnHeaderWidth = columnWidth(mColumn[TIME_TO_COLUMN]);
setColumnAlignment(mColumn[REPEAT_COLUMN], Qt::AlignHCenter);
- setColumnWidthMode(mColumn[REPEAT_COLUMN], QListView::Maximum);
+ setColumnWidthMode(mColumn[REPEAT_COLUMN], TQListView::Maximum);
// Set the width of the colour column in proportion to height
setColumnWidth(mColumn[COLOUR_COLUMN], itemHeight() * 3/4);
- setColumnWidthMode(mColumn[COLOUR_COLUMN], QListView::Manual);
+ setColumnWidthMode(mColumn[COLOUR_COLUMN], TQListView::Manual);
// Set the width of the alarm type column to exactly accommodate the icons.
// Don't allow the user to resize it (to avoid refresh problems, and bearing
// in mind that resizing doesn't seem very useful anyway).
setColumnWidth(mColumn[TYPE_COLUMN], AlarmListViewItem::typeIconWidth(this));
- setColumnWidthMode(mColumn[TYPE_COLUMN], QListView::Manual);
+ setColumnWidthMode(mColumn[TYPE_COLUMN], TQListView::Manual);
header()->setResizeEnabled(false, mColumn[TYPE_COLUMN]);
mInstanceList.append(this);
@@ -167,7 +167,7 @@ void AlarmListView::populate()
KAEvent event;
KCal::Event::List events;
KCal::Event::List::ConstIterator it;
- QDateTime now = QDateTime::currentDateTime();
+ TQDateTime now = TQDateTime::currentDateTime();
if (mShowExpired)
{
AlarmCalendar* cal = AlarmCalendar::expiredCalendarOpen();
@@ -208,7 +208,7 @@ void AlarmListView::selectTimeColumns(bool time, bool timeTo)
{
// Unhide the time column
int colWidth = mTimeColumnHeaderWidth;
- QFontMetrics fm = fontMetrics();
+ TQFontMetrics fm = fontMetrics();
for (AlarmListViewItem* item = firstChild(); item; item = item->nextSibling())
{
int w = item->width(fm, this, mColumn[TIME_COLUMN]);
@@ -216,13 +216,13 @@ void AlarmListView::selectTimeColumns(bool time, bool timeTo)
colWidth = w;
}
setColumnWidth(mColumn[TIME_COLUMN], colWidth);
- setColumnWidthMode(mColumn[TIME_COLUMN], QListView::Maximum);
+ setColumnWidthMode(mColumn[TIME_COLUMN], TQListView::Maximum);
changed = true;
}
else if (!time && w)
{
// Hide the time column
- setColumnWidthMode(mColumn[TIME_COLUMN], QListView::Manual);
+ setColumnWidthMode(mColumn[TIME_COLUMN], TQListView::Manual);
setColumnWidth(mColumn[TIME_COLUMN], 0);
changed = true;
}
@@ -230,7 +230,7 @@ void AlarmListView::selectTimeColumns(bool time, bool timeTo)
if (timeTo && !w)
{
// Unhide the time-to-alarm column
- setColumnWidthMode(mColumn[TIME_TO_COLUMN], QListView::Maximum);
+ setColumnWidthMode(mColumn[TIME_TO_COLUMN], TQListView::Maximum);
updateTimeToAlarms(true);
if (columnWidth(mColumn[TIME_TO_COLUMN]) < mTimeToColumnHeaderWidth)
setColumnWidth(mColumn[TIME_TO_COLUMN], mTimeToColumnHeaderWidth);
@@ -239,7 +239,7 @@ void AlarmListView::selectTimeColumns(bool time, bool timeTo)
else if (!timeTo && w)
{
// Hide the time-to-alarm column
- setColumnWidthMode(mColumn[TIME_TO_COLUMN], QListView::Manual);
+ setColumnWidthMode(mColumn[TIME_TO_COLUMN], TQListView::Manual);
setColumnWidth(mColumn[TIME_TO_COLUMN], 0);
changed = true;
}
@@ -257,7 +257,7 @@ void AlarmListView::updateTimeToAlarms(bool forceDisplay)
{
if (forceDisplay || columnWidth(mColumn[TIME_TO_COLUMN]))
{
- QDateTime now = QDateTime::currentDateTime();
+ TQDateTime now = TQDateTime::currentDateTime();
for (AlarmListViewItem* item = firstChild(); item; item = item->nextSibling())
item->updateTimeToAlarm(now, forceDisplay);
}
@@ -269,7 +269,7 @@ void AlarmListView::updateTimeToAlarms(bool forceDisplay)
*/
void AlarmListView::addEvent(const KAEvent& event, EventListViewBase* view)
{
- QDateTime now = QDateTime::currentDateTime();
+ TQDateTime now = TQDateTime::currentDateTime();
for (InstanceListConstIterator it = mInstanceList.begin(); it != mInstanceList.end(); ++it)
static_cast<AlarmListView*>(*it)->addEntry(event, now, true, (*it == view));
}
@@ -277,7 +277,7 @@ void AlarmListView::addEvent(const KAEvent& event, EventListViewBase* view)
/******************************************************************************
* Add a new item to the list.
*/
-AlarmListViewItem* AlarmListView::addEntry(const KAEvent& event, const QDateTime& now, bool setSize, bool reselect)
+AlarmListViewItem* AlarmListView::addEntry(const KAEvent& event, const TQDateTime& now, bool setSize, bool reselect)
{
if (!mShowExpired && event.expired())
return 0;
@@ -290,7 +290,7 @@ AlarmListViewItem* AlarmListView::addEntry(const KAEvent& event, const QDateTime
*/
EventListViewItemBase* AlarmListView::createItem(const KAEvent& event)
{
- return new AlarmListViewItem(this, event, QDateTime::currentDateTime());
+ return new AlarmListViewItem(this, event, TQDateTime::currentDateTime());
}
/******************************************************************************
@@ -304,9 +304,9 @@ bool AlarmListView::expired(AlarmListViewItem* item) const
/******************************************************************************
* Return the column order.
*/
-QValueList<int> AlarmListView::columnOrder() const
+TQValueList<int> AlarmListView::columnOrder() const
{
- QHeader* hdr = header();
+ TQHeader* hdr = header();
int order[COLUMN_COUNT];
order[TIME_COLUMN] = hdr->mapToIndex(mColumn[TIME_COLUMN]);
order[TIME_TO_COLUMN] = hdr->mapToIndex(mColumn[TIME_TO_COLUMN]);
@@ -314,16 +314,16 @@ QValueList<int> AlarmListView::columnOrder() const
order[COLOUR_COLUMN] = hdr->mapToIndex(mColumn[COLOUR_COLUMN]);
order[TYPE_COLUMN] = hdr->mapToIndex(mColumn[TYPE_COLUMN]);
order[MESSAGE_COLUMN] = hdr->mapToIndex(mColumn[MESSAGE_COLUMN]);
- QValueList<int> orderList;
+ TQValueList<int> orderList;
for (int i = 0; i < COLUMN_COUNT; ++i)
orderList += order[i];
return orderList;
}
/******************************************************************************
-* Returns the QWhatsThis text for a specified column.
+* Returns the TQWhatsThis text for a specified column.
*/
-QString AlarmListView::whatsThisText(int column) const
+TQString AlarmListView::whatsThisText(int column) const
{
if (column == mColumn[TIME_COLUMN])
return i18n("Next scheduled date and time of the alarm");
@@ -345,12 +345,12 @@ QString AlarmListView::whatsThisText(int column) const
* Records the position of the mouse when the left button is pressed, for use
* in drag operations.
*/
-void AlarmListView::contentsMousePressEvent(QMouseEvent* e)
+void AlarmListView::contentsMousePressEvent(TQMouseEvent* e)
{
- QListView::contentsMousePressEvent(e);
+ TQListView::contentsMousePressEvent(e);
if (e->button() == Qt::LeftButton)
{
- QPoint p(contentsToViewport(e->pos()));
+ TQPoint p(contentsToViewport(e->pos()));
if (itemAt(p))
{
mMousePressPos = e->pos();
@@ -364,21 +364,21 @@ void AlarmListView::contentsMousePressEvent(QMouseEvent* e)
* Called when the mouse is moved.
* Creates a drag object when the mouse drags one or more selected items.
*/
-void AlarmListView::contentsMouseMoveEvent(QMouseEvent* e)
+void AlarmListView::contentsMouseMoveEvent(TQMouseEvent* e)
{
- QListView::contentsMouseMoveEvent(e);
+ TQListView::contentsMouseMoveEvent(e);
if (mMousePressed
- && (mMousePressPos - e->pos()).manhattanLength() > QApplication::startDragDistance())
+ && (mMousePressPos - e->pos()).manhattanLength() > TQApplication::startDragDistance())
{
// Create a calendar object containing all the currently selected alarms
kdDebug(5950) << "AlarmListView::contentsMouseMoveEvent(): drag started" << endl;
mMousePressed = false;
- KCal::CalendarLocal cal(QString::fromLatin1("UTC"));
+ KCal::CalendarLocal cal(TQString::fromLatin1("UTC"));
cal.setLocalTime(); // write out using local time (i.e. no time zone)
- QValueList<EventListViewItemBase*> items = selectedItems();
+ TQValueList<EventListViewItemBase*> items = selectedItems();
if (!items.count())
return;
- for (QValueList<EventListViewItemBase*>::Iterator it = items.begin(); it != items.end(); ++it)
+ for (TQValueList<EventListViewItemBase*>::Iterator it = items.begin(); it != items.end(); ++it)
{
const KAEvent& event = (*it)->event();
KCal::Event* kcalEvent = new KCal::Event;
@@ -399,9 +399,9 @@ void AlarmListView::contentsMouseMoveEvent(QMouseEvent* e)
* Notes that the mouse left button is no longer pressed, for use in drag
* operations.
*/
-void AlarmListView::contentsMouseReleaseEvent(QMouseEvent *e)
+void AlarmListView::contentsMouseReleaseEvent(TQMouseEvent *e)
{
- QListView::contentsMouseReleaseEvent(e);
+ TQListView::contentsMouseReleaseEvent(e);
mMousePressed = false;
mDragging = false;
}
@@ -414,7 +414,7 @@ void AlarmListView::contentsMouseReleaseEvent(QMouseEvent *e)
int AlarmListViewItem::mTimeHourPos = -2;
int AlarmListViewItem::mDigitWidth = -1;
-AlarmListViewItem::AlarmListViewItem(AlarmListView* parent, const KAEvent& event, const QDateTime& now)
+AlarmListViewItem::AlarmListViewItem(AlarmListView* parent, const KAEvent& event, const TQDateTime& now)
: EventListViewItemBase(parent, event),
mMessageTruncated(false),
mTimeToAlarmShown(false)
@@ -426,17 +426,17 @@ AlarmListViewItem::AlarmListViewItem(AlarmListView* parent, const KAEvent& event
setText(parent->column(AlarmListView::TIME_COLUMN), alarmTimeText(dateTime));
if (parent->column(AlarmListView::TIME_TO_COLUMN) >= 0)
{
- QString tta = timeToAlarmText(now);
+ TQString tta = timeToAlarmText(now);
setText(parent->column(AlarmListView::TIME_TO_COLUMN), tta);
mTimeToAlarmShown = !tta.isNull();
}
- QTime t = dateTime.time();
+ TQTime t = dateTime.time();
mDateTimeOrder.sprintf("%04d%03d%02d%02d", dateTime.date().year(), dateTime.date().dayOfYear(),
t.hour(), t.minute());
int repeatOrder = 0;
int repeatInterval = 0;
- QString repeatText = event.recurrenceText(true); // text displayed in Repeat column
+ TQString repeatText = event.recurrenceText(true); // text displayed in Repeat column
if (repeatText.isEmpty())
repeatText = event.repetitionText(true);
if (event.repeatAtLogin())
@@ -480,10 +480,10 @@ AlarmListViewItem::AlarmListViewItem(AlarmListView* parent, const KAEvent& event
/******************************************************************************
* Return the single line alarm summary text.
*/
-QString AlarmListViewItem::alarmText(const KAEvent& event) const
+TQString AlarmListViewItem::alarmText(const KAEvent& event) const
{
bool truncated;
- QString text = AlarmText::summary(event, 1, &truncated);
+ TQString text = AlarmText::summary(event, 1, &truncated);
mMessageTruncated = truncated;
return text;
}
@@ -491,23 +491,23 @@ QString AlarmListViewItem::alarmText(const KAEvent& event) const
/******************************************************************************
* Return the alarm time text in the form "date time".
*/
-QString AlarmListViewItem::alarmTimeText(const DateTime& dateTime) const
+TQString AlarmListViewItem::alarmTimeText(const DateTime& dateTime) const
{
KLocale* locale = KGlobal::locale();
- QString dateTimeText = locale->formatDate(dateTime.date(), true);
+ TQString dateTimeText = locale->formatDate(dateTime.date(), true);
if (!dateTime.isDateOnly())
{
dateTimeText += ' ';
- QString time = locale->formatTime(dateTime.time());
+ TQString time = locale->formatTime(dateTime.time());
if (mTimeHourPos == -2)
{
// Initialise the position of the hour within the time string, if leading
// zeroes are omitted, so that displayed times can be aligned with each other.
mTimeHourPos = -1; // default = alignment isn't possible/sensible
- if (!QApplication::reverseLayout()) // don't try to align right-to-left languages
+ if (!TQApplication::reverseLayout()) // don't try to align right-to-left languages
{
- QString fmt = locale->timeFormat();
- int i = fmt.find(QRegExp("%[kl]")); // check if leading zeroes are omitted
+ TQString fmt = locale->timeFormat();
+ int i = fmt.find(TQRegExp("%[kl]")); // check if leading zeroes are omitted
if (i >= 0 && i == fmt.find('%')) // and whether the hour is first
mTimeHourPos = i; // yes, so need to align
}
@@ -523,10 +523,10 @@ QString AlarmListViewItem::alarmTimeText(const DateTime& dateTime) const
/******************************************************************************
* Return the time-to-alarm text.
*/
-QString AlarmListViewItem::timeToAlarmText(const QDateTime& now) const
+TQString AlarmListViewItem::timeToAlarmText(const TQDateTime& now) const
{
if (event().expired())
- return QString::null;
+ return TQString::null;
DateTime dateTime = event().displayDateTime();
if (dateTime.isDateOnly())
{
@@ -535,7 +535,7 @@ QString AlarmListViewItem::timeToAlarmText(const QDateTime& now) const
}
int mins = (now.secsTo(dateTime.dateTime()) + 59) / 60;
if (mins < 0)
- return QString::null;
+ return TQString::null;
char minutes[3] = "00";
minutes[0] = (mins%60) / 10 + '0';
minutes[1] = (mins%60) % 10 + '0';
@@ -551,19 +551,19 @@ QString AlarmListViewItem::timeToAlarmText(const QDateTime& now) const
* The updated value is only displayed if it is different from the existing value,
* or if 'forceDisplay' is true.
*/
-void AlarmListViewItem::updateTimeToAlarm(const QDateTime& now, bool forceDisplay)
+void AlarmListViewItem::updateTimeToAlarm(const TQDateTime& now, bool forceDisplay)
{
if (event().expired())
{
if (forceDisplay || mTimeToAlarmShown)
{
- setText(alarmListView()->column(AlarmListView::TIME_TO_COLUMN), QString::null);
+ setText(alarmListView()->column(AlarmListView::TIME_TO_COLUMN), TQString::null);
mTimeToAlarmShown = false;
}
}
else
{
- QString tta = timeToAlarmText(now);
+ TQString tta = timeToAlarmText(now);
if (forceDisplay || tta != text(alarmListView()->column(AlarmListView::TIME_TO_COLUMN)))
setText(alarmListView()->column(AlarmListView::TIME_TO_COLUMN), tta);
mTimeToAlarmShown = !tta.isNull();
@@ -573,14 +573,14 @@ void AlarmListViewItem::updateTimeToAlarm(const QDateTime& now, bool forceDispla
/******************************************************************************
* Paint one value in one of the columns in the list view.
*/
-void AlarmListViewItem::paintCell(QPainter* painter, const QColorGroup& cg, int column, int width, int /*align*/)
+void AlarmListViewItem::paintCell(TQPainter* painter, const TQColorGroup& cg, int column, int width, int /*align*/)
{
const AlarmListView* listView = alarmListView();
int margin = listView->itemMargin();
- QRect box(margin, margin, width - margin*2, height() - margin*2); // area within which to draw
+ TQRect box(margin, margin, width - margin*2, height() - margin*2); // area within which to draw
bool selected = isSelected();
- QColor bgColour = selected ? cg.highlight() : cg.base();
- QColor fgColour = selected ? cg.highlightedText()
+ TQColor bgColour = selected ? cg.highlight() : cg.base();
+ TQColor fgColour = selected ? cg.highlightedText()
: !event().enabled() ? Preferences::disabledColour()
: event().expired() ? Preferences::expiredColour() : cg.text();
painter->setPen(fgColour);
@@ -589,7 +589,7 @@ void AlarmListViewItem::paintCell(QPainter* painter, const QColorGroup& cg, int
if (column == listView->column(AlarmListView::TIME_COLUMN))
{
int i = -1;
- QString str = text(column);
+ TQString str = text(column);
if (mTimeHourPos >= 0)
{
// Need to pad out spacing to align times without leading zeroes
@@ -598,7 +598,7 @@ void AlarmListViewItem::paintCell(QPainter* painter, const QColorGroup& cg, int
{
if (mDigitWidth < 0)
mDigitWidth = painter->fontMetrics().width("0");
- QString date = str.left(i + 1);
+ TQString date = str.left(i + 1);
int w = painter->fontMetrics().width(date) + mDigitWidth;
painter->drawText(box, AlignVCenter, date);
box.setLeft(box.left() + w);
@@ -621,15 +621,15 @@ void AlarmListViewItem::paintCell(QPainter* painter, const QColorGroup& cg, int
else if (column == listView->column(AlarmListView::TYPE_COLUMN))
{
// Display the alarm type icon, horizontally and vertically centred in the cell
- QPixmap* pixmap = eventIcon();
- QRect pixmapRect = pixmap->rect();
+ TQPixmap* pixmap = eventIcon();
+ TQRect pixmapRect = pixmap->rect();
int diff = box.height() - pixmap->height();
if (diff < 0)
{
pixmapRect.setTop(-diff / 2);
pixmapRect.setHeight(box.height());
}
- QPoint iconTopLeft(box.left() + (box.width() - pixmapRect.width()) / 2,
+ TQPoint iconTopLeft(box.left() + (box.width() - pixmapRect.width()) / 2,
box.top() + (diff > 0 ? diff / 2 : 0));
painter->drawPixmap(iconTopLeft, *pixmap, pixmapRect);
}
@@ -641,7 +641,7 @@ void AlarmListViewItem::paintCell(QPainter* painter, const QColorGroup& cg, int
painter->setBackgroundColor(event().bgColour());
// painter->setPen(event().fgColour());
}
- QString txt = text(column);
+ TQString txt = text(column);
painter->drawText(box, AlignVCenter, txt);
mMessageColWidth = listView->fontMetrics().boundingRect(txt).width();
}
@@ -652,13 +652,13 @@ void AlarmListViewItem::paintCell(QPainter* painter, const QColorGroup& cg, int
*/
int AlarmListViewItem::typeIconWidth(AlarmListView* v)
{
- return iconWidth() + 2 * v->style().pixelMetric(QStyle::PM_DefaultFrameWidth);
+ return iconWidth() + 2 * v->style().pixelMetric(TQStyle::PM_DefaultFrameWidth);
}
/******************************************************************************
* Return the column sort order for one item in the list.
*/
-QString AlarmListViewItem::key(int column, bool) const
+TQString AlarmListViewItem::key(int column, bool) const
{
AlarmListView* listView = alarmListView();
if (column == listView->column(AlarmListView::TIME_COLUMN)
@@ -682,7 +682,7 @@ QString AlarmListViewItem::key(int column, bool) const
/******************************************************************************
* Displays the full alarm text in a tooltip, if not all the text is displayed.
*/
-void AlarmListTooltip::maybeTip(const QPoint& pt)
+void AlarmListTooltip::maybeTip(const TQPoint& pt)
{
AlarmListView* listView = (AlarmListView*)parentWidget()->parentWidget();
int column = listView->column(AlarmListView::MESSAGE_COLUMN);
@@ -700,7 +700,7 @@ void AlarmListTooltip::maybeTip(const QPoint& pt)
if (columnX + widthNeeded <= listView->viewport()->width())
return;
}
- QRect rect = listView->itemRect(item);
+ TQRect rect = listView->itemRect(item);
rect.setLeft(columnX);
rect.setWidth(columnWidth);
kdDebug(5950) << "AlarmListTooltip::maybeTip(): display\n";
diff --git a/kalarm/alarmlistview.h b/kalarm/alarmlistview.h
index 63d5bf0b0..f2ad5b2c2 100644
--- a/kalarm/alarmlistview.h
+++ b/kalarm/alarmlistview.h
@@ -31,30 +31,30 @@ class AlarmListTooltip;
class AlarmListViewItem : public EventListViewItemBase
{
public:
- AlarmListViewItem(AlarmListView* parent, const KAEvent&, const QDateTime& now);
- QTime showTimeToAlarm(bool show);
- void updateTimeToAlarm(const QDateTime& now, bool forceDisplay = false);
- virtual void paintCell(QPainter*, const QColorGroup&, int column, int width, int align);
+ AlarmListViewItem(AlarmListView* parent, const KAEvent&, const TQDateTime& now);
+ TQTime showTimeToAlarm(bool show);
+ void updateTimeToAlarm(const TQDateTime& now, bool forceDisplay = false);
+ virtual void paintCell(TQPainter*, const TQColorGroup&, int column, int width, int align);
AlarmListView* alarmListView() const { return (AlarmListView*)listView(); }
bool messageTruncated() const { return mMessageTruncated; }
int messageColWidthNeeded() const { return mMessageColWidth; }
static int typeIconWidth(AlarmListView*);
// Overridden base class methods
- AlarmListViewItem* nextSibling() const { return (AlarmListViewItem*)QListViewItem::nextSibling(); }
- virtual QString key(int column, bool ascending) const;
+ AlarmListViewItem* nextSibling() const { return (AlarmListViewItem*)TQListViewItem::nextSibling(); }
+ virtual TQString key(int column, bool ascending) const;
protected:
- virtual QString lastColumnText() const { return alarmText(event()); }
+ virtual TQString lastColumnText() const { return alarmText(event()); }
private:
- QString alarmText(const KAEvent&) const;
- QString alarmTimeText(const DateTime&) const;
- QString timeToAlarmText(const QDateTime& now) const;
+ TQString alarmText(const KAEvent&) const;
+ TQString alarmTimeText(const DateTime&) const;
+ TQString timeToAlarmText(const TQDateTime& now) const;
static int mTimeHourPos; // position of hour within time string, or -1 if leading zeroes included
static int mDigitWidth; // display width of a digit
- QString mDateTimeOrder; // controls ordering of date/time column
- QString mRepeatOrder; // controls ordering of repeat column
- QString mColourOrder; // controls ordering of colour column
- QString mTypeOrder; // controls ordering of alarm type column
+ TQString mDateTimeOrder; // controls ordering of date/time column
+ TQString mRepeatOrder; // controls ordering of repeat column
+ TQString mColourOrder; // controls ordering of colour column
+ TQString mTypeOrder; // controls ordering of alarm type column
mutable int mMessageColWidth; // width needed to display complete message text
mutable bool mMessageTruncated; // multi-line message text has been truncated for the display
bool mTimeToAlarmShown; // relative alarm time is displayed
@@ -63,14 +63,14 @@ class AlarmListViewItem : public EventListViewItemBase
class AlarmListView : public EventListViewBase
{
- Q_OBJECT // needed by QObject::isA() calls
+ Q_OBJECT // needed by TQObject::isA() calls
public:
enum ColumnIndex { // default column order
TIME_COLUMN, TIME_TO_COLUMN, REPEAT_COLUMN, COLOUR_COLUMN, TYPE_COLUMN, MESSAGE_COLUMN,
COLUMN_COUNT
};
- AlarmListView(const QValueList<int>& order, QWidget* parent = 0, const char* name = 0);
+ AlarmListView(const TQValueList<int>& order, TQWidget* parent = 0, const char* name = 0);
~AlarmListView();
void showExpired(bool show) { mShowExpired = show; }
bool showingExpired() const { return mShowExpired; }
@@ -80,42 +80,42 @@ class AlarmListView : public EventListViewBase
bool expired(AlarmListViewItem*) const;
bool drawMessageInColour() const { return mDrawMessageInColour; }
void setDrawMessageInColour(bool inColour) { mDrawMessageInColour = inColour; }
- QValueList<int> columnOrder() const;
+ TQValueList<int> columnOrder() const;
int column(ColumnIndex i) const { return mColumn[i]; }
static bool dragging() { return mDragging; }
// Overridden base class methods
static void addEvent(const KAEvent&, EventListViewBase*);
static void modifyEvent(const KAEvent& e, EventListViewBase* selectionView)
{ EventListViewBase::modifyEvent(e.id(), e, mInstanceList, selectionView); }
- static void modifyEvent(const QString& oldEventID, const KAEvent& newEvent, EventListViewBase* selectionView)
+ static void modifyEvent(const TQString& oldEventID, const KAEvent& newEvent, EventListViewBase* selectionView)
{ EventListViewBase::modifyEvent(oldEventID, newEvent, mInstanceList, selectionView); }
- static void deleteEvent(const QString& eventID)
+ static void deleteEvent(const TQString& eventID)
{ EventListViewBase::deleteEvent(eventID, mInstanceList); }
- static void undeleteEvent(const QString& oldEventID, const KAEvent& event, EventListViewBase* selectionView)
+ static void undeleteEvent(const TQString& oldEventID, const KAEvent& event, EventListViewBase* selectionView)
{ EventListViewBase::modifyEvent(oldEventID, event, mInstanceList, selectionView); }
- AlarmListViewItem* getEntry(const QString& eventID) { return (AlarmListViewItem*)EventListViewBase::getEntry(eventID); }
+ AlarmListViewItem* getEntry(const TQString& eventID) { return (AlarmListViewItem*)EventListViewBase::getEntry(eventID); }
AlarmListViewItem* currentItem() const { return (AlarmListViewItem*)EventListViewBase::currentItem(); }
AlarmListViewItem* firstChild() const { return (AlarmListViewItem*)EventListViewBase::firstChild(); }
AlarmListViewItem* selectedItem() const { return (AlarmListViewItem*)EventListViewBase::selectedItem(); }
- virtual void setSelected(QListViewItem* item, bool selected) { EventListViewBase::setSelected(item, selected); }
+ virtual void setSelected(TQListViewItem* item, bool selected) { EventListViewBase::setSelected(item, selected); }
virtual void setSelected(AlarmListViewItem* item, bool selected) { EventListViewBase::setSelected(item, selected); }
virtual InstanceList instances() { return mInstanceList; }
protected:
virtual void populate();
EventListViewItemBase* createItem(const KAEvent&);
- virtual QString whatsThisText(int column) const;
+ virtual TQString whatsThisText(int column) const;
virtual bool shouldShowEvent(const KAEvent& e) const { return mShowExpired || !e.expired(); }
AlarmListViewItem* addEntry(const KAEvent& e, bool setSize = false)
- { return addEntry(e, QDateTime::currentDateTime(), setSize); }
+ { return addEntry(e, TQDateTime::currentDateTime(), setSize); }
AlarmListViewItem* updateEntry(AlarmListViewItem* item, const KAEvent& newEvent, bool setSize = false)
{ return (AlarmListViewItem*)EventListViewBase::updateEntry(item, newEvent, setSize); }
- virtual void contentsMousePressEvent(QMouseEvent*);
- virtual void contentsMouseMoveEvent(QMouseEvent*);
- virtual void contentsMouseReleaseEvent(QMouseEvent*);
+ virtual void contentsMousePressEvent(TQMouseEvent*);
+ virtual void contentsMouseMoveEvent(TQMouseEvent*);
+ virtual void contentsMouseReleaseEvent(TQMouseEvent*);
private:
- AlarmListViewItem* addEntry(const KAEvent&, const QDateTime& now, bool setSize = false, bool reselect = false);
+ AlarmListViewItem* addEntry(const KAEvent&, const TQDateTime& now, bool setSize = false, bool reselect = false);
static InstanceList mInstanceList; // all current instances of this class
static bool mDragging;
@@ -123,7 +123,7 @@ class AlarmListView : public EventListViewBase
int mTimeColumnHeaderWidth;
int mTimeToColumnHeaderWidth;
AlarmListTooltip* mTooltip; // tooltip for showing full text of alarm messages
- QPoint mMousePressPos; // where the mouse left button was last pressed
+ TQPoint mMousePressPos; // where the mouse left button was last pressed
bool mMousePressed; // true while the mouse left button is pressed
bool mDrawMessageInColour;
bool mShowExpired; // true to show expired alarms
diff --git a/kalarm/alarmtext.cpp b/kalarm/alarmtext.cpp
index 2162f62a4..460517118 100644
--- a/kalarm/alarmtext.cpp
+++ b/kalarm/alarmtext.cpp
@@ -19,7 +19,7 @@
*/
#include "kalarm.h"
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include <klocale.h>
#include "alarmevent.h"
@@ -27,29 +27,29 @@
#include "alarmtext.h"
-QString AlarmText::mFromPrefix;
-QString AlarmText::mToPrefix;
-QString AlarmText::mCcPrefix;
-QString AlarmText::mDatePrefix;
-QString AlarmText::mSubjectPrefix;
-QString AlarmText::mFromPrefixEn = QString::fromLatin1("From:");
-QString AlarmText::mToPrefixEn = QString::fromLatin1("To:");
-QString AlarmText::mCcPrefixEn = QString::fromLatin1("Cc:");
-QString AlarmText::mDatePrefixEn = QString::fromLatin1("Date:");
-QString AlarmText::mSubjectPrefixEn = QString::fromLatin1("Subject:");
+TQString AlarmText::mFromPrefix;
+TQString AlarmText::mToPrefix;
+TQString AlarmText::mCcPrefix;
+TQString AlarmText::mDatePrefix;
+TQString AlarmText::mSubjectPrefix;
+TQString AlarmText::mFromPrefixEn = TQString::fromLatin1("From:");
+TQString AlarmText::mToPrefixEn = TQString::fromLatin1("To:");
+TQString AlarmText::mCcPrefixEn = TQString::fromLatin1("Cc:");
+TQString AlarmText::mDatePrefixEn = TQString::fromLatin1("Date:");
+TQString AlarmText::mSubjectPrefixEn = TQString::fromLatin1("Subject:");
-void AlarmText::setText(const QString& text)
+void AlarmText::setText(const TQString& text)
{
mBody = text;
- mIsScript = text.startsWith(QString::fromLatin1("#!"));
+ mIsScript = text.startsWith(TQString::fromLatin1("#!"));
mIsEmail = false;
- mTo = mFrom = mCc = mTime = mSubject = QString::null;
+ mTo = mFrom = mCc = mTime = mSubject = TQString::null;
mKMailSerialNum = 0;
}
-void AlarmText::setEmail(const QString& to, const QString& from, const QString& cc, const QString& time,
- const QString& subject, const QString& body, unsigned long kmailSerialNumber)
+void AlarmText::setEmail(const TQString& to, const TQString& from, const TQString& cc, const TQString& time,
+ const TQString& subject, const TQString& body, unsigned long kmailSerialNumber)
{
mIsScript = false;
mIsEmail = true;
@@ -65,13 +65,13 @@ void AlarmText::setEmail(const QString& to, const QString& from, const QString&
/******************************************************************************
* Return the text for a text message alarm, in display format.
*/
-QString AlarmText::displayText() const
+TQString AlarmText::displayText() const
{
if (mIsEmail)
{
// Format the email into a text alarm
setUpTranslations();
- QString text;
+ TQString text;
text = mFromPrefix + '\t' + mFrom + '\n';
text += mToPrefix + '\t' + mTo + '\n';
if (!mCc.isEmpty())
@@ -104,9 +104,9 @@ bool AlarmText::isEmpty() const
/******************************************************************************
* Check whether a text is an email.
*/
-bool AlarmText::checkIfEmail(const QString& text)
+bool AlarmText::checkIfEmail(const TQString& text)
{
- QStringList lines = QStringList::split('\n', text);
+ TQStringList lines = TQStringList::split('\n', text);
return emailHeaderCount(lines);
}
@@ -114,7 +114,7 @@ bool AlarmText::checkIfEmail(const QString& text)
* Check whether a text is an email.
* Reply = number of email header lines, or 0 if not an email.
*/
-int AlarmText::emailHeaderCount(const QStringList& lines)
+int AlarmText::emailHeaderCount(const TQStringList& lines)
{
setUpTranslations();
int maxn = lines.count();
@@ -136,17 +136,17 @@ int AlarmText::emailHeaderCount(const QStringList& lines)
/******************************************************************************
* Check whether a text is an email, and if so return its headers or optionally
* only its subject line.
-* Reply = headers/subject line, or QString::null if not the text of an email.
+* Reply = headers/subject line, or TQString::null if not the text of an email.
*/
-QString AlarmText::emailHeaders(const QString& text, bool subjectOnly)
+TQString AlarmText::emailHeaders(const TQString& text, bool subjectOnly)
{
- QStringList lines = QStringList::split('\n', text);
+ TQStringList lines = TQStringList::split('\n', text);
int n = emailHeaderCount(lines);
if (!n)
- return QString::null;
+ return TQString::null;
if (subjectOnly)
return lines[n-1].mid(mSubjectPrefix.length()).stripWhiteSpace();
- QString h = lines[0];
+ TQString h = lines[0];
for (int i = 1; i < n; ++i)
{
h += '\n';
@@ -161,9 +161,9 @@ QString AlarmText::emailHeaders(const QString& text, bool subjectOnly)
* untranslated email prefixes.
* 'email' is set to indicate whether it is an email text.
*/
-QString AlarmText::fromCalendarText(const QString& text, bool& email)
+TQString AlarmText::fromCalendarText(const TQString& text, bool& email)
{
- QStringList lines = QStringList::split('\n', text);
+ TQStringList lines = TQStringList::split('\n', text);
int maxn = lines.count();
if (maxn >= 4
&& lines[0].startsWith(mFromPrefixEn)
@@ -177,7 +177,7 @@ QString AlarmText::fromCalendarText(const QString& text, bool& email)
&& lines[n+1].startsWith(mSubjectPrefixEn))
{
setUpTranslations();
- QString dispText;
+ TQString dispText;
dispText = mFromPrefix + lines[0].mid(mFromPrefixEn.length()) + '\n';
dispText += mToPrefix + lines[1].mid(mToPrefixEn.length()) + '\n';
if (n == 3)
@@ -200,10 +200,10 @@ QString AlarmText::fromCalendarText(const QString& text, bool& email)
* Return the text for a text message alarm, in alarm calendar format.
* (The prefix strings are untranslated in the calendar.)
*/
-QString AlarmText::toCalendarText(const QString& text)
+TQString AlarmText::toCalendarText(const TQString& text)
{
setUpTranslations();
- QStringList lines = QStringList::split('\n', text);
+ TQStringList lines = TQStringList::split('\n', text);
int maxn = lines.count();
if (maxn >= 4
&& lines[0].startsWith(mFromPrefix)
@@ -217,7 +217,7 @@ QString AlarmText::toCalendarText(const QString& text)
&& lines[n+1].startsWith(mSubjectPrefix))
{
// Format the email into a text alarm
- QString calText;
+ TQString calText;
calText = mFromPrefixEn + lines[0].mid(mFromPrefix.length()) + '\n';
calText += mToPrefixEn + lines[1].mid(mToPrefix.length()) + '\n';
if (n == 3)
@@ -255,13 +255,13 @@ void AlarmText::setUpTranslations()
* If 'truncated' is non-null, it will be set true if the text returned has been
* truncated, other than to strip a trailing newline.
*/
-QString AlarmText::summary(const KAEvent& event, int maxLines, bool* truncated)
+TQString AlarmText::summary(const KAEvent& event, int maxLines, bool* truncated)
{
- QString text = (event.action() == KAEvent::EMAIL) ? event.emailSubject() : event.cleanText();
+ TQString text = (event.action() == KAEvent::EMAIL) ? event.emailSubject() : event.cleanText();
if (event.action() == KAEvent::MESSAGE)
{
// If the message is the text of an email, return its headers or just subject line
- QString subject = emailHeaders(text, (maxLines <= 1));
+ TQString subject = emailHeaders(text, (maxLines <= 1));
if (!subject.isNull())
{
if (truncated)
@@ -284,5 +284,5 @@ QString AlarmText::summary(const KAEvent& event, int maxLines, bool* truncated)
return text.left(newline); // text ends in newline
if (truncated)
*truncated = true;
- return text.left(newline + (maxLines <= 1 ? 0 : 1)) + QString::fromLatin1("...");
+ return text.left(newline + (maxLines <= 1 ? 0 : 1)) + TQString::fromLatin1("...");
}
diff --git a/kalarm/alarmtext.h b/kalarm/alarmtext.h
index 8d643b3cb..56f3cf17e 100644
--- a/kalarm/alarmtext.h
+++ b/kalarm/alarmtext.h
@@ -21,7 +21,7 @@
#ifndef ALARMTEXT_H
#define ALARMTEXT_H
-#include <qstring.h>
+#include <tqstring.h>
class QStringList;
class KAEvent;
@@ -29,44 +29,44 @@ class KAEvent;
class AlarmText
{
public:
- AlarmText(const QString& text = QString::null) { setText(text); }
- void setText(const QString&);
- void setScript(const QString& text) { setText(text); mIsScript = true; }
- void setEmail(const QString& to, const QString& from, const QString& cc, const QString& time,
- const QString& subject, const QString& body, unsigned long kmailSerialNumber = 0);
- QString displayText() const;
- QString calendarText() const;
- QString to() const { return mTo; }
- QString from() const { return mFrom; }
- QString cc() const { return mCc; }
- QString time() const { return mTime; }
- QString subject() const { return mSubject; }
- QString body() const { return mIsEmail ? mBody : QString::null; }
+ AlarmText(const TQString& text = TQString::null) { setText(text); }
+ void setText(const TQString&);
+ void setScript(const TQString& text) { setText(text); mIsScript = true; }
+ void setEmail(const TQString& to, const TQString& from, const TQString& cc, const TQString& time,
+ const TQString& subject, const TQString& body, unsigned long kmailSerialNumber = 0);
+ TQString displayText() const;
+ TQString calendarText() const;
+ TQString to() const { return mTo; }
+ TQString from() const { return mFrom; }
+ TQString cc() const { return mCc; }
+ TQString time() const { return mTime; }
+ TQString subject() const { return mSubject; }
+ TQString body() const { return mIsEmail ? mBody : TQString::null; }
bool isEmpty() const;
bool isEmail() const { return mIsEmail; }
bool isScript() const { return mIsScript; }
unsigned long kmailSerialNumber() const { return mKMailSerialNum; }
- static QString summary(const KAEvent&, int maxLines = 1, bool* truncated = 0);
- static bool checkIfEmail(const QString&);
- static QString emailHeaders(const QString&, bool subjectOnly);
- static QString fromCalendarText(const QString&, bool& email);
- static QString toCalendarText(const QString&);
+ static TQString summary(const KAEvent&, int maxLines = 1, bool* truncated = 0);
+ static bool checkIfEmail(const TQString&);
+ static TQString emailHeaders(const TQString&, bool subjectOnly);
+ static TQString fromCalendarText(const TQString&, bool& email);
+ static TQString toCalendarText(const TQString&);
private:
static void setUpTranslations();
- static int emailHeaderCount(const QStringList&);
+ static int emailHeaderCount(const TQStringList&);
- static QString mFromPrefix; // translated header prefixes
- static QString mToPrefix;
- static QString mCcPrefix;
- static QString mDatePrefix;
- static QString mSubjectPrefix;
- static QString mFromPrefixEn; // untranslated header prefixes
- static QString mToPrefixEn;
- static QString mCcPrefixEn;
- static QString mDatePrefixEn;
- static QString mSubjectPrefixEn;
- QString mBody, mFrom, mTo, mCc, mTime, mSubject;
+ static TQString mFromPrefix; // translated header prefixes
+ static TQString mToPrefix;
+ static TQString mCcPrefix;
+ static TQString mDatePrefix;
+ static TQString mSubjectPrefix;
+ static TQString mFromPrefixEn; // untranslated header prefixes
+ static TQString mToPrefixEn;
+ static TQString mCcPrefixEn;
+ static TQString mDatePrefixEn;
+ static TQString mSubjectPrefixEn;
+ TQString mBody, mFrom, mTo, mCc, mTime, mSubject;
unsigned long mKMailSerialNum; // if email, message's KMail serial number, else 0
bool mIsEmail;
bool mIsScript;
diff --git a/kalarm/alarmtimewidget.cpp b/kalarm/alarmtimewidget.cpp
index 1e7e777b0..5c3316bce 100644
--- a/kalarm/alarmtimewidget.cpp
+++ b/kalarm/alarmtimewidget.cpp
@@ -20,11 +20,11 @@
#include "kalarm.h"
-#include <qlayout.h>
-#include <qgroupbox.h>
-#include <qhbox.h>
-#include <qpushbutton.h>
-#include <qwhatsthis.h>
+#include <tqlayout.h>
+#include <tqgroupbox.h>
+#include <tqhbox.h>
+#include <tqpushbutton.h>
+#include <tqwhatsthis.h>
#include <kdialog.h>
#include <kmessagebox.h>
@@ -39,13 +39,13 @@
#include "timespinbox.h"
#include "alarmtimewidget.moc"
-static const QTime time_23_59(23, 59);
+static const TQTime time_23_59(23, 59);
const int AlarmTimeWidget::maxDelayTime = 999*60 + 59; // < 1000 hours
-QString AlarmTimeWidget::i18n_w_TimeFromNow() { return i18n("Time from no&w:"); }
-QString AlarmTimeWidget::i18n_TimeAfterPeriod()
+TQString AlarmTimeWidget::i18n_w_TimeFromNow() { return i18n("Time from no&w:"); }
+TQString AlarmTimeWidget::i18n_TimeAfterPeriod()
{
return i18n("Enter the length of time (in hours and minutes) after "
"the current time to schedule the alarm.");
@@ -55,7 +55,7 @@ QString AlarmTimeWidget::i18n_TimeAfterPeriod()
/******************************************************************************
* Construct a widget with a group box and title.
*/
-AlarmTimeWidget::AlarmTimeWidget(const QString& groupBoxTitle, int mode, QWidget* parent, const char* name)
+AlarmTimeWidget::AlarmTimeWidget(const TQString& groupBoxTitle, int mode, TQWidget* parent, const char* name)
: ButtonGroup(groupBoxTitle, parent, name),
mMinDateTimeIsNow(false),
mPastMax(false),
@@ -67,24 +67,24 @@ AlarmTimeWidget::AlarmTimeWidget(const QString& groupBoxTitle, int mode, QWidget
/******************************************************************************
* Construct a widget without a group box or title.
*/
-AlarmTimeWidget::AlarmTimeWidget(int mode, QWidget* parent, const char* name)
+AlarmTimeWidget::AlarmTimeWidget(int mode, TQWidget* parent, const char* name)
: ButtonGroup(parent, name),
mMinDateTimeIsNow(false),
mPastMax(false),
mMinMaxTimeSet(false)
{
- setFrameStyle(QFrame::NoFrame);
+ setFrameStyle(TQFrame::NoFrame);
init(mode);
}
void AlarmTimeWidget::init(int mode)
{
- static const QString recurText = i18n("For a simple repetition, enter the date/time of the first occurrence.\n"
+ static const TQString recurText = i18n("For a simple repetition, enter the date/time of the first occurrence.\n"
"If a recurrence is configured, the start date/time will be adjusted "
"to the first recurrence on or after the entered date/time.");
- connect(this, SIGNAL(buttonSet(int)), SLOT(slotButtonSet(int)));
- QBoxLayout* topLayout = new QVBoxLayout(this, 0, KDialog::spacingHint());
+ connect(this, TQT_SIGNAL(buttonSet(int)), TQT_SLOT(slotButtonSet(int)));
+ TQBoxLayout* topLayout = new TQVBoxLayout(this, 0, KDialog::spacingHint());
if (!title().isEmpty())
{
topLayout->setMargin(KDialog::marginHint());
@@ -94,29 +94,29 @@ void AlarmTimeWidget::init(int mode)
// At time radio button/label
mAtTimeRadio = new RadioButton(((mode & DEFER_TIME) ? i18n("&Defer to date/time:") : i18n("At &date/time:")), this, "atTimeRadio");
mAtTimeRadio->setFixedSize(mAtTimeRadio->sizeHint());
- QWhatsThis::add(mAtTimeRadio,
+ TQWhatsThis::add(mAtTimeRadio,
((mode & DEFER_TIME) ? i18n("Reschedule the alarm to the specified date and time.")
: i18n("Schedule the alarm at the specified date and time.")));
// Date edit box
mDateEdit = new DateEdit(this);
mDateEdit->setFixedSize(mDateEdit->sizeHint());
- connect(mDateEdit, SIGNAL(dateEntered(const QDate&)), SLOT(dateTimeChanged()));
- static const QString enterDateText = i18n("Enter the date to schedule the alarm.");
- QWhatsThis::add(mDateEdit, ((mode & DEFER_TIME) ? enterDateText
- : QString("%1\n%2").arg(enterDateText).arg(recurText)));
+ connect(mDateEdit, TQT_SIGNAL(dateEntered(const TQDate&)), TQT_SLOT(dateTimeChanged()));
+ static const TQString enterDateText = i18n("Enter the date to schedule the alarm.");
+ TQWhatsThis::add(mDateEdit, ((mode & DEFER_TIME) ? enterDateText
+ : TQString("%1\n%2").arg(enterDateText).arg(recurText)));
mAtTimeRadio->setFocusWidget(mDateEdit);
// Time edit box and Any time checkbox
- QHBox* timeBox = new QHBox(this);
+ TQHBox* timeBox = new TQHBox(this);
timeBox->setSpacing(2*KDialog::spacingHint());
mTimeEdit = new TimeEdit(timeBox);
mTimeEdit->setFixedSize(mTimeEdit->sizeHint());
- connect(mTimeEdit, SIGNAL(valueChanged(int)), SLOT(dateTimeChanged()));
- static const QString enterTimeText = i18n("Enter the time to schedule the alarm.");
- QWhatsThis::add(mTimeEdit,
- ((mode & DEFER_TIME) ? QString("%1\n\n%2").arg(enterTimeText).arg(TimeSpinBox::shiftWhatsThis())
- : QString("%1\n%2\n\n%3").arg(enterTimeText).arg(recurText).arg(TimeSpinBox::shiftWhatsThis())));
+ connect(mTimeEdit, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(dateTimeChanged()));
+ static const TQString enterTimeText = i18n("Enter the time to schedule the alarm.");
+ TQWhatsThis::add(mTimeEdit,
+ ((mode & DEFER_TIME) ? TQString("%1\n\n%2").arg(enterTimeText).arg(TimeSpinBox::shiftWhatsThis())
+ : TQString("%1\n%2\n\n%3").arg(enterTimeText).arg(recurText).arg(TimeSpinBox::shiftWhatsThis())));
mAnyTime = -1; // current status is uninitialised
if (mode & DEFER_TIME)
@@ -129,15 +129,15 @@ void AlarmTimeWidget::init(int mode)
mAnyTimeAllowed = true;
mAnyTimeCheckBox = new CheckBox(i18n("An&y time"), timeBox);
mAnyTimeCheckBox->setFixedSize(mAnyTimeCheckBox->sizeHint());
- connect(mAnyTimeCheckBox, SIGNAL(toggled(bool)), SLOT(slotAnyTimeToggled(bool)));
- QWhatsThis::add(mAnyTimeCheckBox, i18n("Schedule the alarm for any time during the day"));
+ connect(mAnyTimeCheckBox, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotAnyTimeToggled(bool)));
+ TQWhatsThis::add(mAnyTimeCheckBox, i18n("Schedule the alarm for any time during the day"));
}
// 'Time from now' radio button/label
mAfterTimeRadio = new RadioButton(((mode & DEFER_TIME) ? i18n("Defer for time &interval:") : i18n_w_TimeFromNow()),
this, "afterTimeRadio");
mAfterTimeRadio->setFixedSize(mAfterTimeRadio->sizeHint());
- QWhatsThis::add(mAfterTimeRadio,
+ TQWhatsThis::add(mAfterTimeRadio,
((mode & DEFER_TIME) ? i18n("Reschedule the alarm for the specified time interval after now.")
: i18n("Schedule the alarm after the specified time interval from now.")));
@@ -145,29 +145,29 @@ void AlarmTimeWidget::init(int mode)
mDelayTimeEdit = new TimeSpinBox(1, maxDelayTime, this);
mDelayTimeEdit->setValue(maxDelayTime);
mDelayTimeEdit->setFixedSize(mDelayTimeEdit->sizeHint());
- connect(mDelayTimeEdit, SIGNAL(valueChanged(int)), SLOT(delayTimeChanged(int)));
- QWhatsThis::add(mDelayTimeEdit,
- ((mode & DEFER_TIME) ? QString("%1\n\n%2").arg(i18n_TimeAfterPeriod()).arg(TimeSpinBox::shiftWhatsThis())
- : QString("%1\n%2\n\n%3").arg(i18n_TimeAfterPeriod()).arg(recurText).arg(TimeSpinBox::shiftWhatsThis())));
+ connect(mDelayTimeEdit, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(delayTimeChanged(int)));
+ TQWhatsThis::add(mDelayTimeEdit,
+ ((mode & DEFER_TIME) ? TQString("%1\n\n%2").arg(i18n_TimeAfterPeriod()).arg(TimeSpinBox::shiftWhatsThis())
+ : TQString("%1\n%2\n\n%3").arg(i18n_TimeAfterPeriod()).arg(recurText).arg(TimeSpinBox::shiftWhatsThis())));
mAfterTimeRadio->setFocusWidget(mDelayTimeEdit);
// Set up the layout, either narrow or wide
if (mode & NARROW)
{
- QGridLayout* grid = new QGridLayout(topLayout, 2, 2, KDialog::spacingHint());
+ TQGridLayout* grid = new TQGridLayout(topLayout, 2, 2, KDialog::spacingHint());
grid->addWidget(mAtTimeRadio, 0, 0);
grid->addWidget(mDateEdit, 0, 1, Qt::AlignAuto);
grid->addWidget(timeBox, 1, 1, Qt::AlignAuto);
grid->setColStretch(2, 1);
topLayout->addStretch();
- QBoxLayout* layout = new QHBoxLayout(topLayout, KDialog::spacingHint());
+ TQBoxLayout* layout = new TQHBoxLayout(topLayout, KDialog::spacingHint());
layout->addWidget(mAfterTimeRadio);
layout->addWidget(mDelayTimeEdit);
layout->addStretch();
}
else
{
- QGridLayout* grid = new QGridLayout(topLayout, 2, 3, KDialog::spacingHint());
+ TQGridLayout* grid = new TQGridLayout(topLayout, 2, 3, KDialog::spacingHint());
grid->addWidget(mAtTimeRadio, 0, 0, Qt::AlignAuto);
grid->addWidget(mDateEdit, 0, 1, Qt::AlignAuto);
grid->addWidget(timeBox, 0, 2, Qt::AlignAuto);
@@ -182,7 +182,7 @@ void AlarmTimeWidget::init(int mode)
setButton(id(mAtTimeRadio));
// Timeout every minute to update alarm time fields.
- MinuteTimer::connect(this, SLOT(slotTimer()));
+ MinuteTimer::connect(this, TQT_SLOT(slotTimer()));
}
/******************************************************************************
@@ -219,14 +219,14 @@ void AlarmTimeWidget::selectTimeFromNow(int minutes)
* 'errorWidget' if non-null, is set to point to the widget containing the error.
* Reply = invalid date/time if error.
*/
-DateTime AlarmTimeWidget::getDateTime(int* minsFromNow, bool checkExpired, bool showErrorMessage, QWidget** errorWidget) const
+DateTime AlarmTimeWidget::getDateTime(int* minsFromNow, bool checkExpired, bool showErrorMessage, TQWidget** errorWidget) const
{
if (minsFromNow)
*minsFromNow = 0;
if (errorWidget)
*errorWidget = 0;
- QTime nowt = QTime::currentTime();
- QDateTime now(QDate::currentDate(), QTime(nowt.hour(), nowt.minute()));
+ TQTime nowt = TQTime::currentTime();
+ TQDateTime now(TQDate::currentDate(), TQTime(nowt.hour(), nowt.minute()));
if (mAtTimeRadio->isOn())
{
bool anyTime = mAnyTimeAllowed && mAnyTimeCheckBox && mAnyTimeCheckBox->isChecked();
@@ -327,8 +327,8 @@ void AlarmTimeWidget::setDateTime(const DateTime& dt)
void AlarmTimeWidget::setMinDateTimeIsCurrent()
{
mMinDateTimeIsNow = true;
- mMinDateTime = QDateTime();
- QDateTime now = QDateTime::currentDateTime();
+ mMinDateTime = TQDateTime();
+ TQDateTime now = TQDateTime::currentDateTime();
mDateEdit->setMinDate(now.date());
setMaxMinTimeIf(now);
}
@@ -337,12 +337,12 @@ void AlarmTimeWidget::setMinDateTimeIsCurrent()
* Set the minimum date/time, adjusting the entered date/time if necessary.
* If 'dt' is invalid, any current minimum date/time is cleared.
*/
-void AlarmTimeWidget::setMinDateTime(const QDateTime& dt)
+void AlarmTimeWidget::setMinDateTime(const TQDateTime& dt)
{
mMinDateTimeIsNow = false;
mMinDateTime = dt;
mDateEdit->setMinDate(dt.date());
- setMaxMinTimeIf(QDateTime::currentDateTime());
+ setMaxMinTimeIf(TQDateTime::currentDateTime());
}
/******************************************************************************
@@ -357,7 +357,7 @@ void AlarmTimeWidget::setMaxDateTime(const DateTime& dt)
else
mMaxDateTime = dt.dateTime();
mDateEdit->setMaxDate(mMaxDateTime.date());
- QDateTime now = QDateTime::currentDateTime();
+ TQDateTime now = TQDateTime::currentDateTime();
setMaxMinTimeIf(now);
setMaxDelayTime(now);
}
@@ -366,15 +366,15 @@ void AlarmTimeWidget::setMaxDateTime(const DateTime& dt)
* If the minimum and maximum date/times fall on the same date, set the minimum
* and maximum times in the time edit box.
*/
-void AlarmTimeWidget::setMaxMinTimeIf(const QDateTime& now)
+void AlarmTimeWidget::setMaxMinTimeIf(const TQDateTime& now)
{
int mint = 0;
- QTime maxt = time_23_59;
+ TQTime maxt = time_23_59;
mMinMaxTimeSet = false;
if (mMaxDateTime.isValid())
{
bool set = true;
- QDateTime minDT;
+ TQDateTime minDT;
if (mMinDateTimeIsNow)
minDT = now.addSecs(60);
else if (mMinDateTime.isValid())
@@ -399,14 +399,14 @@ void AlarmTimeWidget::setMaxMinTimeIf(const QDateTime& now)
* Set the maximum value for the delay time edit box, depending on the maximum
* value for the date/time.
*/
-void AlarmTimeWidget::setMaxDelayTime(const QDateTime& now)
+void AlarmTimeWidget::setMaxDelayTime(const TQDateTime& now)
{
int maxVal = maxDelayTime;
if (mMaxDateTime.isValid())
{
if (now.date().daysTo(mMaxDateTime.date()) < 100) // avoid possible 32-bit overflow on secsTo()
{
- QDateTime dt(now.date(), QTime(now.time().hour(), now.time().minute(), 0)); // round down to nearest minute
+ TQDateTime dt(now.date(), TQTime(now.time().hour(), now.time().minute(), 0)); // round down to nearest minute
maxVal = dt.secsTo(mMaxDateTime) / 60;
if (maxVal > maxDelayTime)
maxVal = maxDelayTime;
@@ -448,17 +448,17 @@ void AlarmTimeWidget::enableAnyTime(bool enable)
*/
void AlarmTimeWidget::slotTimer()
{
- QDateTime now;
+ TQDateTime now;
if (mMinDateTimeIsNow)
{
// Make sure that the minimum date is updated when the day changes
- now = QDateTime::currentDateTime();
+ now = TQDateTime::currentDateTime();
mDateEdit->setMinDate(now.date());
}
if (mMaxDateTime.isValid())
{
if (!now.isValid())
- now = QDateTime::currentDateTime();
+ now = TQDateTime::currentDateTime();
if (!mPastMax)
{
// Check whether the maximum date/time has now been reached
@@ -501,8 +501,8 @@ void AlarmTimeWidget::slotButtonSet(int)
if (mAnyTimeCheckBox)
mAnyTimeCheckBox->setEnabled(at && mAnyTimeAllowed);
// Ensure that the value of the delay edit box is > 0.
- QDateTime dt(mDateEdit->date(), mTimeEdit->time());
- int minutes = (QDateTime::currentDateTime().secsTo(dt) + 59) / 60;
+ TQDateTime dt(mDateEdit->date(), mTimeEdit->time());
+ int minutes = (TQDateTime::currentDateTime().secsTo(dt) + 59) / 60;
if (minutes <= 0)
mDelayTimeEdit->setValid(true);
mDelayTimeEdit->setEnabled(!at);
@@ -524,8 +524,8 @@ void AlarmTimeWidget::slotAnyTimeToggled(bool on)
*/
void AlarmTimeWidget::dateTimeChanged()
{
- QDateTime dt(mDateEdit->date(), mTimeEdit->time());
- int minutes = (QDateTime::currentDateTime().secsTo(dt) + 59) / 60;
+ TQDateTime dt(mDateEdit->date(), mTimeEdit->time());
+ int minutes = (TQDateTime::currentDateTime().secsTo(dt) + 59) / 60;
bool blocked = mDelayTimeEdit->signalsBlocked();
mDelayTimeEdit->blockSignals(true); // prevent infinite recursion between here and delayTimeChanged()
if (minutes <= 0 || minutes > mDelayTimeEdit->maxValue())
@@ -543,7 +543,7 @@ void AlarmTimeWidget::delayTimeChanged(int minutes)
{
if (mDelayTimeEdit->isValid())
{
- QDateTime dt = QDateTime::currentDateTime().addSecs(minutes * 60);
+ TQDateTime dt = TQDateTime::currentDateTime().addSecs(minutes * 60);
bool blockedT = mTimeEdit->signalsBlocked();
bool blockedD = mDateEdit->signalsBlocked();
mTimeEdit->blockSignals(true); // prevent infinite recursion between here and dateTimeChanged()
diff --git a/kalarm/alarmtimewidget.h b/kalarm/alarmtimewidget.h
index 0a93e9cf4..9e1e2535b 100644
--- a/kalarm/alarmtimewidget.h
+++ b/kalarm/alarmtimewidget.h
@@ -40,22 +40,22 @@ class AlarmTimeWidget : public ButtonGroup
DEFER_TIME = 0x01, // "Defer to ..."
NARROW = 0x02 // make a narrow widget
};
- AlarmTimeWidget(const QString& groupBoxTitle, int mode, QWidget* parent = 0, const char* name = 0);
- AlarmTimeWidget(int mode, QWidget* parent = 0, const char* name = 0);
- DateTime getDateTime(int* minsFromNow = 0, bool checkExpired = true, bool showErrorMessage = true, QWidget** errorWidget = 0) const;
+ AlarmTimeWidget(const TQString& groupBoxTitle, int mode, TQWidget* parent = 0, const char* name = 0);
+ AlarmTimeWidget(int mode, TQWidget* parent = 0, const char* name = 0);
+ DateTime getDateTime(int* minsFromNow = 0, bool checkExpired = true, bool showErrorMessage = true, TQWidget** errorWidget = 0) const;
void setDateTime(const DateTime&);
void setMinDateTimeIsCurrent();
- void setMinDateTime(const QDateTime& = QDateTime());
+ void setMinDateTime(const TQDateTime& = TQDateTime());
void setMaxDateTime(const DateTime& = DateTime());
- const QDateTime& maxDateTime() const { return mMaxDateTime; }
+ const TQDateTime& maxDateTime() const { return mMaxDateTime; }
void setReadOnly(bool);
bool anyTime() const { return mAnyTime; }
void enableAnyTime(bool enable);
void selectTimeFromNow(int minutes = 0);
- QSize sizeHint() const { return minimumSizeHint(); }
+ TQSize sizeHint() const { return minimumSizeHint(); }
- static QString i18n_w_TimeFromNow(); // text of 'Time from now:' radio button, with 'w' shortcut
- static QString i18n_TimeAfterPeriod();
+ static TQString i18n_w_TimeFromNow(); // text of 'Time from now:' radio button, with 'w' shortcut
+ static TQString i18n_TimeAfterPeriod();
static const int maxDelayTime; // maximum time from now
signals:
@@ -72,8 +72,8 @@ class AlarmTimeWidget : public ButtonGroup
private:
void init(int mode);
void setAnyTime();
- void setMaxDelayTime(const QDateTime& now);
- void setMaxMinTimeIf(const QDateTime& now);
+ void setMaxDelayTime(const TQDateTime& now);
+ void setMaxMinTimeIf(const TQDateTime& now);
RadioButton* mAtTimeRadio;
RadioButton* mAfterTimeRadio;
@@ -81,8 +81,8 @@ class AlarmTimeWidget : public ButtonGroup
TimeEdit* mTimeEdit;
TimeSpinBox* mDelayTimeEdit;
CheckBox* mAnyTimeCheckBox;
- QDateTime mMinDateTime; // earliest allowed date/time
- QDateTime mMaxDateTime; // latest allowed date/time
+ TQDateTime mMinDateTime; // earliest allowed date/time
+ TQDateTime mMaxDateTime; // latest allowed date/time
int mAnyTime; // 0 = date/time is specified, 1 = only a date, -1 = uninitialised
bool mAnyTimeAllowed; // 'mAnyTimeCheckBox' is enabled
bool mMinDateTimeIsNow; // earliest allowed date/time is the current time
diff --git a/kalarm/birthdaydlg.cpp b/kalarm/birthdaydlg.cpp
index 3c4f28ab0..98a4b629c 100644
--- a/kalarm/birthdaydlg.cpp
+++ b/kalarm/birthdaydlg.cpp
@@ -20,12 +20,12 @@
#include "kalarm.h"
-#include <qlayout.h>
-#include <qgroupbox.h>
-#include <qhbox.h>
-#include <qlabel.h>
-#include <qlineedit.h>
-#include <qwhatsthis.h>
+#include <tqlayout.h>
+#include <tqgroupbox.h>
+#include <tqhbox.h>
+#include <tqlabel.h>
+#include <tqlineedit.h>
+#include <tqwhatsthis.h>
#include <klocale.h>
#include <kglobal.h>
@@ -58,72 +58,72 @@ class AddresseeItem : public QListViewItem
{
public:
enum columns { NAME = 0, BIRTHDAY = 1 };
- AddresseeItem(QListView* parent, const QString& name, const QDate& birthday);
- QDate birthday() const { return mBirthday; }
- virtual QString key(int column, bool ascending) const;
+ AddresseeItem(TQListView* parent, const TQString& name, const TQDate& birthday);
+ TQDate birthday() const { return mBirthday; }
+ virtual TQString key(int column, bool ascending) const;
private:
- QDate mBirthday;
- QString mBirthdayOrder;
+ TQDate mBirthday;
+ TQString mBirthdayOrder;
};
const KABC::AddressBook* BirthdayDlg::mAddressBook = 0;
-BirthdayDlg::BirthdayDlg(QWidget* parent)
+BirthdayDlg::BirthdayDlg(TQWidget* parent)
: KDialogBase(KDialogBase::Plain, i18n("Import Birthdays From KAddressBook"), Ok|Cancel, Ok, parent, "BirthdayDlg"),
mSpecialActionsButton(0)
{
- QWidget* topWidget = plainPage();
- QBoxLayout* topLayout = new QVBoxLayout(topWidget);
+ TQWidget* topWidget = plainPage();
+ TQBoxLayout* topLayout = new TQVBoxLayout(topWidget);
topLayout->setSpacing(spacingHint());
// Prefix and suffix to the name in the alarm text
// Get default prefix and suffix texts from config file
KConfig* config = kapp->config();
- config->setGroup(QString::fromLatin1("General"));
- mPrefixText = config->readEntry(QString::fromLatin1("BirthdayPrefix"), i18n("Birthday: "));
- mSuffixText = config->readEntry(QString::fromLatin1("BirthdaySuffix"));
+ config->setGroup(TQString::fromLatin1("General"));
+ mPrefixText = config->readEntry(TQString::fromLatin1("BirthdayPrefix"), i18n("Birthday: "));
+ mSuffixText = config->readEntry(TQString::fromLatin1("BirthdaySuffix"));
- QGroupBox* textGroup = new QGroupBox(2, Qt::Horizontal, i18n("Alarm Text"), topWidget);
+ TQGroupBox* textGroup = new TQGroupBox(2, Qt::Horizontal, i18n("Alarm Text"), topWidget);
topLayout->addWidget(textGroup);
- QLabel* label = new QLabel(i18n("Pre&fix:"), textGroup);
+ TQLabel* label = new TQLabel(i18n("Pre&fix:"), textGroup);
mPrefix = new BLineEdit(mPrefixText, textGroup);
mPrefix->setMinimumSize(mPrefix->sizeHint());
label->setBuddy(mPrefix);
- connect(mPrefix, SIGNAL(focusLost()), SLOT(slotTextLostFocus()));
- QWhatsThis::add(mPrefix,
+ connect(mPrefix, TQT_SIGNAL(focusLost()), TQT_SLOT(slotTextLostFocus()));
+ TQWhatsThis::add(mPrefix,
i18n("Enter text to appear before the person's name in the alarm message, "
"including any necessary trailing spaces."));
- label = new QLabel(i18n("S&uffix:"), textGroup);
+ label = new TQLabel(i18n("S&uffix:"), textGroup);
mSuffix = new BLineEdit(mSuffixText, textGroup);
mSuffix->setMinimumSize(mSuffix->sizeHint());
label->setBuddy(mSuffix);
- connect(mSuffix, SIGNAL(focusLost()), SLOT(slotTextLostFocus()));
- QWhatsThis::add(mSuffix,
+ connect(mSuffix, TQT_SIGNAL(focusLost()), TQT_SLOT(slotTextLostFocus()));
+ TQWhatsThis::add(mSuffix,
i18n("Enter text to appear after the person's name in the alarm message, "
"including any necessary leading spaces."));
- QGroupBox* group = new QGroupBox(1, Qt::Horizontal, i18n("Select Birthdays"), topWidget);
+ TQGroupBox* group = new TQGroupBox(1, Qt::Horizontal, i18n("Select Birthdays"), topWidget);
topLayout->addWidget(group);
mAddresseeList = new BListView(group);
mAddresseeList->setMultiSelection(true);
- mAddresseeList->setSelectionMode(QListView::Extended);
+ mAddresseeList->setSelectionMode(TQListView::Extended);
mAddresseeList->setAllColumnsShowFocus(true);
mAddresseeList->setFullWidth(true);
mAddresseeList->addColumn(i18n("Name"));
mAddresseeList->addColumn(i18n("Birthday"));
- connect(mAddresseeList, SIGNAL(selectionChanged()), SLOT(slotSelectionChanged()));
- QWhatsThis::add(mAddresseeList,
+ connect(mAddresseeList, TQT_SIGNAL(selectionChanged()), TQT_SLOT(slotSelectionChanged()));
+ TQWhatsThis::add(mAddresseeList,
i18n("Select birthdays to set alarms for.\n"
"This list shows all birthdays in KAddressBook except those for which alarms already exist.\n\n"
"You can select multiple birthdays at one time by dragging the mouse over the list, "
"or by clicking the mouse while pressing Ctrl or Shift."));
- group = new QGroupBox(i18n("Alarm Configuration"), topWidget);
+ group = new TQGroupBox(i18n("Alarm Configuration"), topWidget);
topLayout->addWidget(group);
- QBoxLayout* groupLayout = new QVBoxLayout(group, marginHint(), spacingHint());
+ TQBoxLayout* groupLayout = new TQVBoxLayout(group, marginHint(), spacingHint());
groupLayout->addSpacing(fontMetrics().lineSpacing()/2);
// Font and colour choice button and sample text
@@ -148,7 +148,7 @@ BirthdayDlg::BirthdayDlg(QWidget* parent)
groupLayout->addWidget(mReminder, 0, Qt::AlignAuto);
// Acknowledgement confirmation required - default = no confirmation
- QHBoxLayout* layout = new QHBoxLayout(groupLayout, 2*spacingHint());
+ TQHBoxLayout* layout = new TQHBoxLayout(groupLayout, 2*spacingHint());
mConfirmAck = EditAlarmDlg::createConfirmAckCheckbox(group);
layout->addWidget(mConfirmAck);
layout->addSpacing(2*spacingHint());
@@ -162,7 +162,7 @@ BirthdayDlg::BirthdayDlg(QWidget* parent)
}
// Late display checkbox - default = allow late display
- layout = new QHBoxLayout(groupLayout, 2*spacingHint());
+ layout = new TQHBoxLayout(groupLayout, 2*spacingHint());
mLateCancel = new LateCancelSelector(false, group);
layout->addWidget(mLateCancel);
layout->addStretch();
@@ -170,7 +170,7 @@ BirthdayDlg::BirthdayDlg(QWidget* parent)
// Sub-repetition button
mSubRepetition = new RepetitionButton(i18n("Sub-Repetition"), false, group);
mSubRepetition->set(0, 0, true, 364*24*60);
- QWhatsThis::add(mSubRepetition, i18n("Set up an additional alarm repetition"));
+ TQWhatsThis::add(mSubRepetition, i18n("Set up an additional alarm repetition"));
layout->addWidget(mSubRepetition);
// Set the values to their defaults
@@ -198,7 +198,7 @@ void BirthdayDlg::loadAddressBook()
#if KDE_IS_VERSION(3,1,90)
mAddressBook = KABC::StdAddressBook::self(true);
if (mAddressBook)
- connect(mAddressBook, SIGNAL(addressBookChanged(AddressBook*)), SLOT(updateSelectionList()));
+ connect(mAddressBook, TQT_SIGNAL(addressBookChanged(AddressBook*)), TQT_SLOT(updateSelectionList()));
#else
mAddressBook = KABC::StdAddressBook::self();
if (mAddressBook)
@@ -230,7 +230,7 @@ void BirthdayDlg::close()
void BirthdayDlg::updateSelectionList()
{
// Compile a list of all pending alarm messages which look like birthdays
- QStringList messageList;
+ TQStringList messageList;
KAEvent event;
Event::List events = AlarmCalendar::activeCalendar()->events();
for (Event::List::ConstIterator it = events.begin(); it != events.end(); ++it)
@@ -250,17 +250,17 @@ void BirthdayDlg::updateSelectionList()
if (addressee.birthday().isValid())
{
// Create a list entry for this birthday
- QDate birthday = addressee.birthday().date();
- QString name = addressee.nickName();
+ TQDate birthday = addressee.birthday().date();
+ TQString name = addressee.nickName();
if (name.isEmpty())
name = addressee.realName();
// Check if the birthday already has an alarm
- QString text = mPrefixText + name + mSuffixText;
+ TQString text = mPrefixText + name + mSuffixText;
bool alarmExists = (messageList.find(text) != messageList.end());
// Check if the birthday is already in the selection list
bool inSelectionList = false;
AddresseeItem* item = 0;
- for (QListViewItem* qitem = mAddresseeList->firstChild(); qitem; qitem = qitem->nextSibling())
+ for (TQListViewItem* qitem = mAddresseeList->firstChild(); qitem; qitem = qitem->nextSibling())
{
item = dynamic_cast<AddresseeItem*>(qitem);
if (item && item->text(AddresseeItem::NAME) == name && item->birthday() == birthday)
@@ -280,7 +280,7 @@ void BirthdayDlg::updateSelectionList()
// Enable/disable OK button according to whether anything is currently selected
bool selection = false;
- for (QListViewItem* item = mAddresseeList->firstChild(); item; item = item->nextSibling())
+ for (TQListViewItem* item = mAddresseeList->firstChild(); item; item = item->nextSibling())
if (mAddresseeList->isSelected(item))
{
selection = true;
@@ -292,22 +292,22 @@ void BirthdayDlg::updateSelectionList()
/******************************************************************************
* Return a list of events for birthdays chosen.
*/
-QValueList<KAEvent> BirthdayDlg::events() const
+TQValueList<KAEvent> BirthdayDlg::events() const
{
- QValueList<KAEvent> list;
- QDate today = QDate::currentDate();
- QDateTime todayNoon(today, QTime(12, 0, 0));
+ TQValueList<KAEvent> list;
+ TQDate today = TQDate::currentDate();
+ TQDateTime todayNoon(today, TQTime(12, 0, 0));
int thisYear = today.year();
int reminder = mReminder->minutes();
- for (QListViewItem* item = mAddresseeList->firstChild(); item; item = item->nextSibling())
+ for (TQListViewItem* item = mAddresseeList->firstChild(); item; item = item->nextSibling())
{
if (mAddresseeList->isSelected(item))
{
AddresseeItem* aItem = dynamic_cast<AddresseeItem*>(item);
if (aItem)
{
- QDate date = aItem->birthday();
+ TQDate date = aItem->birthday();
date.setYMD(thisYear, date.month(), date.day());
if (date <= today)
date.setYMD(thisYear + 1, date.month(), date.day());
@@ -320,9 +320,9 @@ QValueList<KAEvent> BirthdayDlg::events() const
int fadeSecs;
float volume = mSoundPicker->volume(fadeVolume, fadeSecs);
event.setAudioFile(mSoundPicker->file(), volume, fadeVolume, fadeSecs);
- QValueList<int> months;
+ TQValueList<int> months;
months.append(date.month());
- event.setRecurAnnualByDate(1, months, 0, Preferences::defaultFeb29Type(), -1, QDate());
+ event.setRecurAnnualByDate(1, months, 0, Preferences::defaultFeb29Type(), -1, TQDate());
event.setRepetition(mSubRepetition->interval(), mSubRepetition->count());
event.setNextOccurrence(todayNoon);
if (reminder)
@@ -344,9 +344,9 @@ void BirthdayDlg::slotOk()
{
// Save prefix and suffix texts to use as future defaults
KConfig* config = kapp->config();
- config->setGroup(QString::fromLatin1("General"));
- config->writeEntry(QString::fromLatin1("BirthdayPrefix"), mPrefix->text());
- config->writeEntry(QString::fromLatin1("BirthdaySuffix"), mSuffix->text());
+ config->setGroup(TQString::fromLatin1("General"));
+ config->writeEntry(TQString::fromLatin1("BirthdayPrefix"), mPrefix->text());
+ config->writeEntry(TQString::fromLatin1("BirthdaySuffix"), mSuffix->text());
config->sync();
mFlags = (mSoundPicker->sound() == SoundPicker::BEEP ? KAEvent::BEEP : 0)
@@ -363,7 +363,7 @@ void BirthdayDlg::slotOk()
*/
void BirthdayDlg::slotSelectionChanged()
{
- for (QListViewItem* item = mAddresseeList->firstChild(); item; item = item->nextSibling())
+ for (TQListViewItem* item = mAddresseeList->firstChild(); item; item = item->nextSibling())
if (mAddresseeList->isSelected(item))
{
enableButtonOK(true);
@@ -380,8 +380,8 @@ void BirthdayDlg::slotSelectionChanged()
*/
void BirthdayDlg::slotTextLostFocus()
{
- QString prefix = mPrefix->text();
- QString suffix = mSuffix->text();
+ TQString prefix = mPrefix->text();
+ TQString suffix = mSuffix->text();
if (prefix != mPrefixText || suffix != mSuffixText)
{
// Text has changed - re-evaluate the selection list
@@ -396,8 +396,8 @@ void BirthdayDlg::slotTextLostFocus()
= Class: AddresseeItem
=============================================================================*/
-AddresseeItem::AddresseeItem(QListView* parent, const QString& name, const QDate& birthday)
- : QListViewItem(parent),
+AddresseeItem::AddresseeItem(TQListView* parent, const TQString& name, const TQDate& birthday)
+ : TQListViewItem(parent),
mBirthday(birthday)
{
setText(NAME, name);
@@ -405,7 +405,7 @@ AddresseeItem::AddresseeItem(QListView* parent, const QString& name, const QDate
mBirthdayOrder.sprintf("%04d%03d", mBirthday.year(), mBirthday.dayOfYear());
}
-QString AddresseeItem::key(int column, bool) const
+TQString AddresseeItem::key(int column, bool) const
{
if (column == BIRTHDAY)
return mBirthdayOrder;
@@ -417,11 +417,11 @@ QString AddresseeItem::key(int column, bool) const
= Class: BListView
=============================================================================*/
-BListView::BListView(QWidget* parent, const char* name)
+BListView::BListView(TQWidget* parent, const char* name)
: KListView(parent, name)
{
KAccel* accel = new KAccel(this);
- accel->insert(KStdAccel::SelectAll, this, SLOT(slotSelectAll()));
- accel->insert(KStdAccel::Deselect, this, SLOT(slotDeselect()));
+ accel->insert(KStdAccel::SelectAll, this, TQT_SLOT(slotSelectAll()));
+ accel->insert(KStdAccel::Deselect, this, TQT_SLOT(slotDeselect()));
accel->readSettings();
}
diff --git a/kalarm/birthdaydlg.h b/kalarm/birthdaydlg.h
index b8dd202c1..412e0ac5e 100644
--- a/kalarm/birthdaydlg.h
+++ b/kalarm/birthdaydlg.h
@@ -20,7 +20,7 @@
#ifndef BIRTHDAYDLG_H
#define BIRTHDAYDLG_H
-#include <qlineedit.h>
+#include <tqlineedit.h>
#include <klistview.h>
#include <kdialogbase.h>
@@ -44,8 +44,8 @@ class BirthdayDlg : public KDialogBase
{
Q_OBJECT
public:
- BirthdayDlg(QWidget* parent = 0);
- QValueList<KAEvent> events() const;
+ BirthdayDlg(TQWidget* parent = 0);
+ TQValueList<KAEvent> events() const;
static void close();
protected slots:
@@ -70,8 +70,8 @@ class BirthdayDlg : public KDialogBase
LateCancelSelector* mLateCancel;
SpecialActionsButton* mSpecialActionsButton;
RepetitionButton* mSubRepetition;
- QString mPrefixText; // last entered value of prefix text
- QString mSuffixText; // last entered value of suffix text
+ TQString mPrefixText; // last entered value of prefix text
+ TQString mSuffixText; // last entered value of suffix text
int mFlags; // event flag bits
};
@@ -80,21 +80,21 @@ class BLineEdit : public QLineEdit
{
Q_OBJECT
public:
- BLineEdit(QWidget* parent = 0, const char* name = 0)
- : QLineEdit(parent, name) {}
- BLineEdit(const QString& text, QWidget* parent = 0, const char* name = 0)
- : QLineEdit(text, parent, name) {}
+ BLineEdit(TQWidget* parent = 0, const char* name = 0)
+ : TQLineEdit(parent, name) {}
+ BLineEdit(const TQString& text, TQWidget* parent = 0, const char* name = 0)
+ : TQLineEdit(text, parent, name) {}
signals:
void focusLost();
protected:
- virtual void focusOutEvent(QFocusEvent*) { emit focusLost(); }
+ virtual void focusOutEvent(TQFocusEvent*) { emit focusLost(); }
};
class BListView : public KListView
{
Q_OBJECT
public:
- BListView(QWidget* parent = 0, const char* name = 0);
+ BListView(TQWidget* parent = 0, const char* name = 0);
public slots:
virtual void slotSelectAll() { selectAll(true); }
virtual void slotDeselect() { selectAll(false); }
diff --git a/kalarm/calendarcompat.cpp b/kalarm/calendarcompat.cpp
index ada75e768..50d76c508 100644
--- a/kalarm/calendarcompat.cpp
+++ b/kalarm/calendarcompat.cpp
@@ -20,9 +20,9 @@
#include "kalarm.h"
-#include <qfile.h>
-#include <qtextstream.h>
-#include <qstringlist.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
+#include <tqstringlist.h>
#include <kapplication.h>
#include <kaboutdata.h>
@@ -43,10 +43,10 @@ using namespace KCal;
* necessary conversions to the current format. The calendar is not saved - any
* conversions will only be saved if changes are made later.
*/
-void CalendarCompat::fix(KCal::Calendar& calendar, const QString& localFile)
+void CalendarCompat::fix(KCal::Calendar& calendar, const TQString& localFile)
{
bool version057_UTC = false;
- QString subVersion;
+ TQString subVersion;
int version = readKAlarmVersion(calendar, subVersion);
if (!version)
{
@@ -74,26 +74,26 @@ void CalendarCompat::fix(KCal::Calendar& calendar, const QString& localFile)
* Reply = 0 if the calendar was created by the current version of KAlarm,
* KAlarm pre-0.3.5, or another program.
*/
-int CalendarCompat::readKAlarmVersion(KCal::Calendar& calendar, QString& subVersion)
+int CalendarCompat::readKAlarmVersion(KCal::Calendar& calendar, TQString& subVersion)
{
- subVersion = QString::null;
- const QString& prodid = calendar.productId();
+ subVersion = TQString::null;
+ const TQString& prodid = calendar.productId();
// Find the KAlarm identifier
- QString progname = QString::fromLatin1(" KAlarm ");
+ TQString progname = TQString::fromLatin1(" KAlarm ");
int i = prodid.find(progname, 0, false);
if (i < 0)
{
// Older versions used KAlarm's translated name in the product ID, which
// could have created problems using a calendar in different locales.
- progname = QString(" ") + kapp->aboutData()->programName() + ' ';
+ progname = TQString(" ") + kapp->aboutData()->programName() + ' ';
i = prodid.find(progname, 0, false);
if (i < 0)
return 0; // calendar wasn't created by KAlarm
}
// Extract the KAlarm version string
- QString ver = prodid.mid(i + progname.length()).stripWhiteSpace();
+ TQString ver = prodid.mid(i + progname.length()).stripWhiteSpace();
i = ver.find('/');
int j = ver.find(' ');
if (j >= 0 && j < i)
@@ -112,23 +112,23 @@ int CalendarCompat::readKAlarmVersion(KCal::Calendar& calendar, QString& subVers
* Reply = true if times are stored in UTC
* = false if the calendar is a vCalendar, times are not UTC, or any error occurred.
*/
-bool CalendarCompat::isUTC(const QString& localFile)
+bool CalendarCompat::isUTC(const TQString& localFile)
{
// Read the calendar file into a QString
- QFile file(localFile);
+ TQFile file(localFile);
if (!file.open(IO_ReadOnly))
return false;
- QTextStream ts(&file);
- ts.setEncoding(QTextStream::Latin1);
- QString text = ts.read();
+ TQTextStream ts(&file);
+ ts.setEncoding(TQTextStream::Latin1);
+ TQString text = ts.read();
file.close();
// Extract the CREATED property for the first VEVENT from the calendar
- QString VCALENDAR = QString::fromLatin1("BEGIN:VCALENDAR");
- QString VEVENT = QString::fromLatin1("BEGIN:VEVENT");
- QString CREATED = QString::fromLatin1("CREATED:");
- QStringList lines = QStringList::split(QChar('\n'), text);
- for (QStringList::ConstIterator it = lines.begin(); it != lines.end(); ++it)
+ TQString VCALENDAR = TQString::fromLatin1("BEGIN:VCALENDAR");
+ TQString VEVENT = TQString::fromLatin1("BEGIN:VEVENT");
+ TQString CREATED = TQString::fromLatin1("CREATED:");
+ TQStringList lines = TQStringList::split(TQChar('\n'), text);
+ for (TQStringList::ConstIterator it = lines.begin(); it != lines.end(); ++it)
{
if ((*it).startsWith(VCALENDAR))
{
diff --git a/kalarm/calendarcompat.h b/kalarm/calendarcompat.h
index a8cc3e812..ec79ea802 100644
--- a/kalarm/calendarcompat.h
+++ b/kalarm/calendarcompat.h
@@ -23,18 +23,18 @@
/* @file calendarcompat.h - compatibility for old calendar file formats */
-#include <qstring.h>
+#include <tqstring.h>
namespace KCal { class Calendar; }
class CalendarCompat
{
public:
- static void fix(KCal::Calendar&, const QString& localFile = QString::null);
+ static void fix(KCal::Calendar&, const TQString& localFile = TQString::null);
private:
- static int readKAlarmVersion(KCal::Calendar&, QString& subVersion);
- static bool isUTC(const QString& localFile);
+ static int readKAlarmVersion(KCal::Calendar&, TQString& subVersion);
+ static bool isUTC(const TQString& localFile);
};
#endif // CALENDARCOMPAT_H
diff --git a/kalarm/daemon.cpp b/kalarm/daemon.cpp
index 22f1fb36d..d2d2b2343 100644
--- a/kalarm/daemon.cpp
+++ b/kalarm/daemon.cpp
@@ -20,8 +20,8 @@
#include "kalarm.h"
-#include <qtimer.h>
-#include <qiconset.h>
+#include <tqtimer.h>
+#include <tqiconset.h>
#include <kstandarddirs.h>
#include <kconfig.h>
@@ -44,7 +44,7 @@
static const int REGISTER_TIMEOUT = 20; // seconds to wait before assuming registration with daemon has failed
static const char* NOTIFY_DCOP_OBJECT = "notify"; // DCOP name of KAlarm's interface for notification by alarm daemon
-static QString expandURL(const QString& urlString);
+static TQString expandURL(const TQString& urlString);
/*=============================================================================
@@ -52,25 +52,25 @@ static QString expandURL(const QString& urlString);
= Handles the the alarm daemon's client notification DCOP interface.
=============================================================================*/
-class NotificationHandler : public QObject, virtual public AlarmGuiIface
+class NotificationHandler : public TQObject, virtual public AlarmGuiIface
{
public:
NotificationHandler();
private:
// DCOP interface
- void alarmDaemonUpdate(int calendarStatus, const QString& calendarURL);
- void handleEvent(const QString& calendarURL, const QString& eventID);
+ void alarmDaemonUpdate(int calendarStatus, const TQString& calendarURL);
+ void handleEvent(const TQString& calendarURL, const TQString& eventID);
void registered(bool reregister, int result, int version);
};
Daemon* Daemon::mInstance = 0;
NotificationHandler* Daemon::mDcopHandler = 0;
-QValueList<QString> Daemon::mQueuedEvents;
-QValueList<QString> Daemon::mSavingEvents;
-QTimer* Daemon::mStartTimer = 0;
-QTimer* Daemon::mRegisterTimer = 0;
-QTimer* Daemon::mStatusTimer = 0;
+TQValueList<TQString> Daemon::mQueuedEvents;
+TQValueList<TQString> Daemon::mSavingEvents;
+TQTimer* Daemon::mStartTimer = 0;
+TQTimer* Daemon::mRegisterTimer = 0;
+TQTimer* Daemon::mStatusTimer = 0;
int Daemon::mStatusTimerCount = 0;
int Daemon::mStatusTimerInterval;
int Daemon::mStartTimeout = 0;
@@ -95,7 +95,7 @@ void Daemon::initialise()
{
if (!mInstance)
mInstance = new Daemon();
- connect(AlarmCalendar::activeCalendar(), SIGNAL(calendarSaved(AlarmCalendar*)), mInstance, SLOT(slotCalendarSaved(AlarmCalendar*)));
+ connect(AlarmCalendar::activeCalendar(), TQT_SIGNAL(calendarSaved(AlarmCalendar*)), mInstance, TQT_SLOT(slotCalendarSaved(AlarmCalendar*)));
}
/******************************************************************************
@@ -111,10 +111,10 @@ void Daemon::createDcopHandler()
mRunning = isRunning(false);
mStatusTimerInterval = Preferences::daemonTrayCheckInterval();
- Preferences::connect(SIGNAL(preferencesChanged()), mInstance, SLOT(slotPreferencesChanged()));
+ Preferences::connect(TQT_SIGNAL(preferencesChanged()), mInstance, TQT_SLOT(slotPreferencesChanged()));
- mStatusTimer = new QTimer(mInstance);
- connect(mStatusTimer, SIGNAL(timeout()), mInstance, SLOT(timerCheckIfRunning()));
+ mStatusTimer = new TQTimer(mInstance);
+ connect(mStatusTimer, TQT_SIGNAL(timeout()), mInstance, TQT_SLOT(timerCheckIfRunning()));
mStatusTimer->start(mStatusTimerInterval * 1000); // check regularly if daemon is running
}
@@ -134,7 +134,7 @@ bool Daemon::start()
return true; // we're currently waiting for the daemon to start
// Start the alarm daemon. It is a KUniqueApplication, which means that
// there is automatically only one instance of the alarm daemon running.
- QString execStr = locate("exe", QString::fromLatin1(DAEMON_APP_NAME));
+ TQString execStr = locate("exe", TQString::fromLatin1(DAEMON_APP_NAME));
if (execStr.isEmpty())
{
KMessageBox::error(0, i18n("Alarm daemon not found."));
@@ -144,8 +144,8 @@ bool Daemon::start()
KApplication::kdeinitExec(execStr);
kdDebug(5950) << "Daemon::start(): Alarm daemon started" << endl;
mStartTimeout = 5000/startCheckInterval + 1; // check daemon status for 5 seconds before giving up
- mStartTimer = new QTimer(mInstance);
- connect(mStartTimer, SIGNAL(timeout()), mInstance, SLOT(checkIfStarted()));
+ mStartTimer = new TQTimer(mInstance);
+ connect(mStartTimer, TQT_SIGNAL(timeout()), mInstance, TQT_SLOT(checkIfStarted()));
mStartTimer->start(startCheckInterval);
mInstance->checkIfStarted();
return true;
@@ -188,20 +188,20 @@ bool Daemon::registerWith(bool reregister)
bool disabledIfStopped = theApp()->alarmsDisabledIfStopped();
kdDebug(5950) << (reregister ? "Daemon::reregisterWith(): " : "Daemon::registerWith(): ") << (disabledIfStopped ? "NO_START" : "COMMAND_LINE") << endl;
- QCString appname = kapp->aboutData()->appName();
+ TQCString appname = kapp->aboutData()->appName();
AlarmDaemonIface_stub s(DAEMON_APP_NAME, DAEMON_DCOP_OBJECT);
if (reregister)
s.registerChange(appname, !disabledIfStopped);
else
- s.registerApp(appname, kapp->aboutData()->programName(), QCString(NOTIFY_DCOP_OBJECT), AlarmCalendar::activeCalendar()->urlString(), !disabledIfStopped);
+ s.registerApp(appname, kapp->aboutData()->programName(), TQCString(NOTIFY_DCOP_OBJECT), AlarmCalendar::activeCalendar()->urlString(), !disabledIfStopped);
if (!s.ok())
{
kdError(5950) << "Daemon::registerWith(" << reregister << "): DCOP error" << endl;
registrationResult(reregister, KAlarmd::FAILURE);
return false;
}
- mRegisterTimer = new QTimer(mInstance);
- connect(mRegisterTimer, SIGNAL(timeout()), mInstance, SLOT(registerTimerExpired()));
+ mRegisterTimer = new TQTimer(mInstance);
+ connect(mRegisterTimer, TQT_SIGNAL(timeout()), mInstance, TQT_SLOT(registerTimerExpired()));
mRegisterTimer->start(REGISTER_TIMEOUT * 1000); // wait for the reply
return true;
}
@@ -215,13 +215,13 @@ void Daemon::registrationResult(bool reregister, int result, int version)
delete mRegisterTimer;
mRegisterTimer = 0;
bool failed = false;
- QString errmsg;
+ TQString errmsg;
if (version && version != DAEMON_VERSION_NUM)
{
failed = true;
kdError(5950) << "Daemon::registrationResult(" << reregister << "): kalarmd reports incompatible version " << version << endl;
errmsg = i18n("Cannot enable alarms.\nInstallation or configuration error: Alarm Daemon (%1) version is incompatible.")
- .arg(QString::fromLatin1(DAEMON_APP_NAME));
+ .arg(TQString::fromLatin1(DAEMON_APP_NAME));
}
else
{
@@ -236,7 +236,7 @@ void Daemon::registrationResult(bool reregister, int result, int version)
kdError(5950) << "Daemon::registrationResult(" << reregister << "): registerApp dcop call: " << kapp->aboutData()->appName() << " not found\n";
KMessageBox::error(0, i18n("Alarms will be disabled if you stop KAlarm.\n"
"(Installation or configuration error: %1 cannot locate %2 executable.)")
- .arg(QString::fromLatin1(DAEMON_APP_NAME))
+ .arg(TQString::fromLatin1(DAEMON_APP_NAME))
.arg(kapp->aboutData()->appName()));
break;
case KAlarmd::FAILURE:
@@ -248,7 +248,7 @@ void Daemon::registrationResult(bool reregister, int result, int version)
if (!reregister)
{
errmsg = i18n("Cannot enable alarms:\nFailed to register with Alarm Daemon (%1)")
- .arg(QString::fromLatin1(DAEMON_APP_NAME));
+ .arg(TQString::fromLatin1(DAEMON_APP_NAME));
}
break;
}
@@ -304,7 +304,7 @@ void Daemon::checkIfStarted()
if (err)
{
kdError(5950) << "Daemon::checkIfStarted(): failed to start daemon" << endl;
- KMessageBox::error(0, i18n("Cannot enable alarms:\nFailed to start Alarm Daemon (%1)").arg(QString::fromLatin1(DAEMON_APP_NAME)));
+ KMessageBox::error(0, i18n("Cannot enable alarms:\nFailed to start Alarm Daemon (%1)").arg(TQString::fromLatin1(DAEMON_APP_NAME)));
}
}
@@ -327,7 +327,7 @@ void Daemon::updateRegisteredStatus(bool timeout)
// The daemon has newly been detected as registered with DCOP.
// Wait for a short time to ensure that it is ready for DCOP calls.
mStatus = RUNNING;
- QTimer::singleShot(startCheckInterval, mInstance, SLOT(slotStarted()));
+ TQTimer::singleShot(startCheckInterval, mInstance, TQT_SLOT(slotStarted()));
break;
case RUNNING:
if (timeout)
@@ -374,7 +374,7 @@ bool Daemon::reset()
if (!kapp->dcopClient()->isApplicationRegistered(DAEMON_APP_NAME))
return false;
AlarmDaemonIface_stub s(DAEMON_APP_NAME, DAEMON_DCOP_OBJECT);
- s.resetCalendar(QCString(kapp->aboutData()->appName()), AlarmCalendar::activeCalendar()->urlString());
+ s.resetCalendar(TQCString(kapp->aboutData()->appName()), AlarmCalendar::activeCalendar()->urlString());
if (!s.ok())
kdError(5950) << "Daemon::reset(): resetCalendar dcop send failed" << endl;
return true;
@@ -387,7 +387,7 @@ void Daemon::reload()
{
kdDebug(5950) << "Daemon::reload()\n";
AlarmDaemonIface_stub s(DAEMON_APP_NAME, DAEMON_DCOP_OBJECT);
- s.reloadCalendar(QCString(kapp->aboutData()->appName()), AlarmCalendar::activeCalendar()->urlString());
+ s.reloadCalendar(TQCString(kapp->aboutData()->appName()), AlarmCalendar::activeCalendar()->urlString());
if (!s.ok())
kdError(5950) << "Daemon::reload(): reloadCalendar dcop send failed" << endl;
}
@@ -414,8 +414,8 @@ void Daemon::enableAutoStart(bool enable)
// The return status doesn't report failure even if the daemon isn't running,
// so in case of failure, rewrite the config file in any case.
KConfig adconfig(locate("config", DAEMON_APP_NAME"rc"));
- adconfig.setGroup(QString::fromLatin1(DAEMON_AUTOSTART_SECTION));
- adconfig.writeEntry(QString::fromLatin1(DAEMON_AUTOSTART_KEY), enable);
+ adconfig.setGroup(TQString::fromLatin1(DAEMON_AUTOSTART_SECTION));
+ adconfig.writeEntry(TQString::fromLatin1(DAEMON_AUTOSTART_KEY), enable);
adconfig.sync();
}
@@ -437,8 +437,8 @@ void Daemon::notifyTimeChanged()
bool Daemon::autoStart()
{
KConfig adconfig(locate("config", DAEMON_APP_NAME"rc"));
- adconfig.setGroup(QString::fromLatin1(DAEMON_AUTOSTART_SECTION));
- return adconfig.readBoolEntry(QString::fromLatin1(DAEMON_AUTOSTART_KEY), true);
+ adconfig.setGroup(TQString::fromLatin1(DAEMON_AUTOSTART_SECTION));
+ return adconfig.readBoolEntry(TQString::fromLatin1(DAEMON_AUTOSTART_KEY), true);
}
/******************************************************************************
@@ -569,8 +569,8 @@ void Daemon::slotPreferencesChanged()
AlarmEnableAction* Daemon::createAlarmEnableAction(KActionCollection* actions, const char* name)
{
AlarmEnableAction* a = new AlarmEnableAction(0, actions, name);
- connect(a, SIGNAL(userClicked(bool)), mInstance, SLOT(setAlarmsEnabled(bool)));
- connect(mInstance, SIGNAL(daemonRunning(bool)), a, SLOT(setCheckedActual(bool)));
+ connect(a, TQT_SIGNAL(userClicked(bool)), mInstance, TQT_SLOT(setAlarmsEnabled(bool)));
+ connect(mInstance, TQT_SIGNAL(daemonRunning(bool)), a, TQT_SLOT(setCheckedActual(bool)));
return a;
}
@@ -600,7 +600,7 @@ void Daemon::slotCalendarSaved(AlarmCalendar* cal)
/******************************************************************************
* Note an event ID which has been triggered by the alarm daemon.
*/
-void Daemon::queueEvent(const QString& eventId)
+void Daemon::queueEvent(const TQString& eventId)
{
mQueuedEvents += eventId;
}
@@ -609,7 +609,7 @@ void Daemon::queueEvent(const QString& eventId)
* Note an event ID which is currently being saved in the calendar file, if the
* event was originally triggered by the alarm daemon.
*/
-void Daemon::savingEvent(const QString& eventId)
+void Daemon::savingEvent(const TQString& eventId)
{
if (mQueuedEvents.remove(eventId) > 0)
mSavingEvents += eventId;
@@ -619,7 +619,7 @@ void Daemon::savingEvent(const QString& eventId)
* If the event ID has been triggered by the alarm daemon, tell the daemon that
* it has been processed, and whether to reload its calendar.
*/
-void Daemon::eventHandled(const QString& eventId, bool reloadCal)
+void Daemon::eventHandled(const TQString& eventId, bool reloadCal)
{
if (mQueuedEvents.remove(eventId) > 0)
notifyEventHandled(eventId, reloadCal); // it's a daemon event, so tell daemon that it's been handled
@@ -631,11 +631,11 @@ void Daemon::eventHandled(const QString& eventId, bool reloadCal)
* Tell the daemon that an event has been processed, and whether to reload its
* calendar.
*/
-void Daemon::notifyEventHandled(const QString& eventId, bool reloadCal)
+void Daemon::notifyEventHandled(const TQString& eventId, bool reloadCal)
{
kdDebug(5950) << "Daemon::notifyEventHandled(" << eventId << (reloadCal ? "): reload" : ")") << endl;
AlarmDaemonIface_stub s(DAEMON_APP_NAME, DAEMON_DCOP_OBJECT);
- s.eventHandled(QCString(kapp->aboutData()->appName()), AlarmCalendar::activeCalendar()->urlString(), eventId, reloadCal);
+ s.eventHandled(TQCString(kapp->aboutData()->appName()), AlarmCalendar::activeCalendar()->urlString(), eventId, reloadCal);
if (!s.ok())
kdError(5950) << "Daemon::notifyEventHandled(): eventHandled dcop send failed" << endl;
}
@@ -656,7 +656,7 @@ int Daemon::maxTimeSinceCheck()
NotificationHandler::NotificationHandler()
: DCOPObject(NOTIFY_DCOP_OBJECT),
- QObject()
+ TQObject()
{
kdDebug(5950) << "NotificationHandler::NotificationHandler()\n";
}
@@ -666,7 +666,7 @@ NotificationHandler::NotificationHandler()
* The daemon notifies calendar statuses when we first register as a GUI, and whenever
* a calendar status changes. So we don't need to read its config files.
*/
-void NotificationHandler::alarmDaemonUpdate(int calendarStatus, const QString& calendarURL)
+void NotificationHandler::alarmDaemonUpdate(int calendarStatus, const TQString& calendarURL)
{
kdDebug(5950) << "NotificationHandler::alarmDaemonUpdate(" << calendarStatus << ")\n";
KAlarmd::CalendarStatus status = KAlarmd::CalendarStatus(calendarStatus);
@@ -697,10 +697,10 @@ void NotificationHandler::alarmDaemonUpdate(int calendarStatus, const QString& c
/******************************************************************************
* DCOP call from the alarm daemon to notify that an alarm is due.
*/
-void NotificationHandler::handleEvent(const QString& url, const QString& eventId)
+void NotificationHandler::handleEvent(const TQString& url, const TQString& eventId)
{
- QString id = eventId;
- if (id.startsWith(QString::fromLatin1("ad:")))
+ TQString id = eventId;
+ if (id.startsWith(TQString::fromLatin1("ad:")))
{
// It's a notification from the alarm deamon
id = id.mid(3);
@@ -723,7 +723,7 @@ void NotificationHandler::registered(bool reregister, int result, int version)
= Class: AlarmEnableAction
=============================================================================*/
-AlarmEnableAction::AlarmEnableAction(int accel, QObject* parent, const char* name)
+AlarmEnableAction::AlarmEnableAction(int accel, TQObject* parent, const char* name)
: KToggleAction(i18n("Enable &Alarms"), accel, parent, name),
mInitialised(false)
{
@@ -766,9 +766,9 @@ void AlarmEnableAction::setChecked(bool check)
* (We must store full URLs in the calendar data since otherwise later calls to
* reload or remove calendars won't necessarily find a match.)
*/
-QString expandURL(const QString& urlString)
+TQString expandURL(const TQString& urlString)
{
if (urlString.isEmpty())
- return QString();
+ return TQString();
return KURL(urlString).url();
}
diff --git a/kalarm/daemon.h b/kalarm/daemon.h
index 04198904c..58b34ecdf 100644
--- a/kalarm/daemon.h
+++ b/kalarm/daemon.h
@@ -21,8 +21,8 @@
#ifndef DAEMON_H
#define DAEMON_H
-#include <qobject.h>
-#include <qdatetime.h>
+#include <tqobject.h>
+#include <tqdatetime.h>
#include <kaction.h>
#include <kalarmd/kalarmd.h>
@@ -57,9 +57,9 @@ class Daemon : public QObject
static bool isRegistered() { return mStatus == REGISTERED; }
static void allowRegisterFailMsg() { mRegisterFailMsg = false; }
- static void queueEvent(const QString& eventID);
- static void savingEvent(const QString& eventID);
- static void eventHandled(const QString& eventID, bool reloadCal);
+ static void queueEvent(const TQString& eventID);
+ static void savingEvent(const TQString& eventID);
+ static void eventHandled(const TQString& eventID, bool reloadCal);
signals:
void daemonRunning(bool running);
@@ -86,7 +86,7 @@ class Daemon : public QObject
static bool registerWith(bool reregister);
static void registrationResult(bool reregister, int result, int version = 0);
static void reload();
- static void notifyEventHandled(const QString& eventID, bool reloadCal);
+ static void notifyEventHandled(const TQString& eventID, bool reloadCal);
static void updateRegisteredStatus(bool timeout = false);
static void enableCalendar(bool enable);
static void calendarIsEnabled(bool enabled);
@@ -95,11 +95,11 @@ class Daemon : public QObject
static Daemon* mInstance; // only one instance allowed
static NotificationHandler* mDcopHandler; // handles DCOP requests from daemon
- static QValueList<QString> mQueuedEvents; // IDs of pending events that daemon has triggered
- static QValueList<QString> mSavingEvents; // IDs of updated events that are currently being saved
- static QTimer* mStartTimer; // timer to check daemon status after starting daemon
- static QTimer* mRegisterTimer; // timer to check whether daemon has sent registration status
- static QTimer* mStatusTimer; // timer for checking daemon status
+ static TQValueList<TQString> mQueuedEvents; // IDs of pending events that daemon has triggered
+ static TQValueList<TQString> mSavingEvents; // IDs of updated events that are currently being saved
+ static TQTimer* mStartTimer; // timer to check daemon status after starting daemon
+ static TQTimer* mRegisterTimer; // timer to check whether daemon has sent registration status
+ static TQTimer* mStatusTimer; // timer for checking daemon status
static int mStatusTimerCount; // countdown for fast status checking
static int mStatusTimerInterval; // timer interval (seconds) for checking daemon status
static int mStartTimeout; // remaining number of times to check if alarm daemon has started
@@ -120,7 +120,7 @@ class AlarmEnableAction : public KToggleAction
{
Q_OBJECT
public:
- AlarmEnableAction(int accel, QObject* parent, const char* name = 0);
+ AlarmEnableAction(int accel, TQObject* parent, const char* name = 0);
public slots:
void setCheckedActual(bool); // set state and emit switched() signal
virtual void setChecked(bool); // request state change and emit userClicked() signal
diff --git a/kalarm/dcophandler.cpp b/kalarm/dcophandler.cpp
index ab4105fe6..8c37ffd88 100644
--- a/kalarm/dcophandler.cpp
+++ b/kalarm/dcophandler.cpp
@@ -46,25 +46,25 @@ static const char* DCOP_OLD_OBJECT_NAME = "display";
=============================================================================*/
DcopHandler::DcopHandler()
: DCOPObject(DCOP_OBJECT_NAME),
- QWidget()
+ TQWidget()
{
kdDebug(5950) << "DcopHandler::DcopHandler()\n";
}
-bool DcopHandler::cancelEvent(const QString& url,const QString& eventId)
+bool DcopHandler::cancelEvent(const TQString& url,const TQString& eventId)
{
return theApp()->deleteEvent(url, eventId);
}
-bool DcopHandler::triggerEvent(const QString& url,const QString& eventId)
+bool DcopHandler::triggerEvent(const TQString& url,const TQString& eventId)
{
return theApp()->triggerEvent(url, eventId);
}
-bool DcopHandler::scheduleMessage(const QString& message, const QString& startDateTime, int lateCancel, unsigned flags,
- const QString& bgColor, const QString& fgColor, const QString& font,
- const KURL& audioFile, int reminderMins, const QString& recurrence,
+bool DcopHandler::scheduleMessage(const TQString& message, const TQString& startDateTime, int lateCancel, unsigned flags,
+ const TQString& bgColor, const TQString& fgColor, const TQString& font,
+ const KURL& audioFile, int reminderMins, const TQString& recurrence,
int subRepeatInterval, int subRepeatCount)
{
DateTime start;
@@ -74,8 +74,8 @@ bool DcopHandler::scheduleMessage(const QString& message, const QString& startDa
return scheduleMessage(message, start, lateCancel, flags, bgColor, fgColor, font, audioFile, reminderMins, recur, subRepeatInterval, subRepeatCount);
}
-bool DcopHandler::scheduleMessage(const QString& message, const QString& startDateTime, int lateCancel, unsigned flags,
- const QString& bgColor, const QString& fgColor, const QString& font,
+bool DcopHandler::scheduleMessage(const TQString& message, const TQString& startDateTime, int lateCancel, unsigned flags,
+ const TQString& bgColor, const TQString& fgColor, const TQString& font,
const KURL& audioFile, int reminderMins,
int recurType, int recurInterval, int recurCount)
{
@@ -86,10 +86,10 @@ bool DcopHandler::scheduleMessage(const QString& message, const QString& startDa
return scheduleMessage(message, start, lateCancel, flags, bgColor, fgColor, font, audioFile, reminderMins, recur);
}
-bool DcopHandler::scheduleMessage(const QString& message, const QString& startDateTime, int lateCancel, unsigned flags,
- const QString& bgColor, const QString& fgColor, const QString& font,
+bool DcopHandler::scheduleMessage(const TQString& message, const TQString& startDateTime, int lateCancel, unsigned flags,
+ const TQString& bgColor, const TQString& fgColor, const TQString& font,
const KURL& audioFile, int reminderMins,
- int recurType, int recurInterval, const QString& endDateTime)
+ int recurType, int recurInterval, const TQString& endDateTime)
{
DateTime start;
KARecurrence recur;
@@ -98,8 +98,8 @@ bool DcopHandler::scheduleMessage(const QString& message, const QString& startDa
return scheduleMessage(message, start, lateCancel, flags, bgColor, fgColor, font, audioFile, reminderMins, recur);
}
-bool DcopHandler::scheduleFile(const KURL& file, const QString& startDateTime, int lateCancel, unsigned flags, const QString& bgColor,
- const KURL& audioFile, int reminderMins, const QString& recurrence,
+bool DcopHandler::scheduleFile(const KURL& file, const TQString& startDateTime, int lateCancel, unsigned flags, const TQString& bgColor,
+ const KURL& audioFile, int reminderMins, const TQString& recurrence,
int subRepeatInterval, int subRepeatCount)
{
DateTime start;
@@ -109,7 +109,7 @@ bool DcopHandler::scheduleFile(const KURL& file, const QString& startDateTime, i
return scheduleFile(file, start, lateCancel, flags, bgColor, audioFile, reminderMins, recur, subRepeatInterval, subRepeatCount);
}
-bool DcopHandler::scheduleFile(const KURL& file, const QString& startDateTime, int lateCancel, unsigned flags, const QString& bgColor,
+bool DcopHandler::scheduleFile(const KURL& file, const TQString& startDateTime, int lateCancel, unsigned flags, const TQString& bgColor,
const KURL& audioFile, int reminderMins, int recurType, int recurInterval, int recurCount)
{
DateTime start;
@@ -119,8 +119,8 @@ bool DcopHandler::scheduleFile(const KURL& file, const QString& startDateTime, i
return scheduleFile(file, start, lateCancel, flags, bgColor, audioFile, reminderMins, recur);
}
-bool DcopHandler::scheduleFile(const KURL& file, const QString& startDateTime, int lateCancel, unsigned flags, const QString& bgColor,
- const KURL& audioFile, int reminderMins, int recurType, int recurInterval, const QString& endDateTime)
+bool DcopHandler::scheduleFile(const KURL& file, const TQString& startDateTime, int lateCancel, unsigned flags, const TQString& bgColor,
+ const KURL& audioFile, int reminderMins, int recurType, int recurInterval, const TQString& endDateTime)
{
DateTime start;
KARecurrence recur;
@@ -129,8 +129,8 @@ bool DcopHandler::scheduleFile(const KURL& file, const QString& startDateTime, i
return scheduleFile(file, start, lateCancel, flags, bgColor, audioFile, reminderMins, recur);
}
-bool DcopHandler::scheduleCommand(const QString& commandLine, const QString& startDateTime, int lateCancel, unsigned flags,
- const QString& recurrence, int subRepeatInterval, int subRepeatCount)
+bool DcopHandler::scheduleCommand(const TQString& commandLine, const TQString& startDateTime, int lateCancel, unsigned flags,
+ const TQString& recurrence, int subRepeatInterval, int subRepeatCount)
{
DateTime start;
KARecurrence recur;
@@ -139,7 +139,7 @@ bool DcopHandler::scheduleCommand(const QString& commandLine, const QString& sta
return scheduleCommand(commandLine, start, lateCancel, flags, recur, subRepeatInterval, subRepeatCount);
}
-bool DcopHandler::scheduleCommand(const QString& commandLine, const QString& startDateTime, int lateCancel, unsigned flags,
+bool DcopHandler::scheduleCommand(const TQString& commandLine, const TQString& startDateTime, int lateCancel, unsigned flags,
int recurType, int recurInterval, int recurCount)
{
DateTime start = convertStartDateTime(startDateTime);
@@ -151,8 +151,8 @@ bool DcopHandler::scheduleCommand(const QString& commandLine, const QString& sta
return scheduleCommand(commandLine, start, lateCancel, flags, recur);
}
-bool DcopHandler::scheduleCommand(const QString& commandLine, const QString& startDateTime, int lateCancel, unsigned flags,
- int recurType, int recurInterval, const QString& endDateTime)
+bool DcopHandler::scheduleCommand(const TQString& commandLine, const TQString& startDateTime, int lateCancel, unsigned flags,
+ int recurType, int recurInterval, const TQString& endDateTime)
{
DateTime start;
KARecurrence recur;
@@ -161,9 +161,9 @@ bool DcopHandler::scheduleCommand(const QString& commandLine, const QString& sta
return scheduleCommand(commandLine, start, lateCancel, flags, recur);
}
-bool DcopHandler::scheduleEmail(const QString& fromID, const QString& addresses, const QString& subject, const QString& message,
- const QString& attachments, const QString& startDateTime, int lateCancel, unsigned flags,
- const QString& recurrence, int subRepeatInterval, int subRepeatCount)
+bool DcopHandler::scheduleEmail(const TQString& fromID, const TQString& addresses, const TQString& subject, const TQString& message,
+ const TQString& attachments, const TQString& startDateTime, int lateCancel, unsigned flags,
+ const TQString& recurrence, int subRepeatInterval, int subRepeatCount)
{
DateTime start;
KARecurrence recur;
@@ -172,8 +172,8 @@ bool DcopHandler::scheduleEmail(const QString& fromID, const QString& addresses,
return scheduleEmail(fromID, addresses, subject, message, attachments, start, lateCancel, flags, recur, subRepeatInterval, subRepeatCount);
}
-bool DcopHandler::scheduleEmail(const QString& fromID, const QString& addresses, const QString& subject, const QString& message,
- const QString& attachments, const QString& startDateTime, int lateCancel, unsigned flags,
+bool DcopHandler::scheduleEmail(const TQString& fromID, const TQString& addresses, const TQString& subject, const TQString& message,
+ const TQString& attachments, const TQString& startDateTime, int lateCancel, unsigned flags,
int recurType, int recurInterval, int recurCount)
{
DateTime start;
@@ -183,9 +183,9 @@ bool DcopHandler::scheduleEmail(const QString& fromID, const QString& addresses,
return scheduleEmail(fromID, addresses, subject, message, attachments, start, lateCancel, flags, recur);
}
-bool DcopHandler::scheduleEmail(const QString& fromID, const QString& addresses, const QString& subject, const QString& message,
- const QString& attachments, const QString& startDateTime, int lateCancel, unsigned flags,
- int recurType, int recurInterval, const QString& endDateTime)
+bool DcopHandler::scheduleEmail(const TQString& fromID, const TQString& addresses, const TQString& subject, const TQString& message,
+ const TQString& attachments, const TQString& startDateTime, int lateCancel, unsigned flags,
+ int recurType, int recurInterval, const TQString& endDateTime)
{
DateTime start;
KARecurrence recur;
@@ -194,12 +194,12 @@ bool DcopHandler::scheduleEmail(const QString& fromID, const QString& addresses,
return scheduleEmail(fromID, addresses, subject, message, attachments, start, lateCancel, flags, recur);
}
-bool DcopHandler::edit(const QString& eventID)
+bool DcopHandler::edit(const TQString& eventID)
{
return KAlarm::edit(eventID);
}
-bool DcopHandler::editNew(const QString& templateName)
+bool DcopHandler::editNew(const TQString& templateName)
{
return KAlarm::editNew(templateName);
}
@@ -208,16 +208,16 @@ bool DcopHandler::editNew(const QString& templateName)
/******************************************************************************
* Schedule a message alarm, after converting the parameters from strings.
*/
-bool DcopHandler::scheduleMessage(const QString& message, const DateTime& start, int lateCancel, unsigned flags,
- const QString& bgColor, const QString& fgColor, const QString& fontStr,
+bool DcopHandler::scheduleMessage(const TQString& message, const DateTime& start, int lateCancel, unsigned flags,
+ const TQString& bgColor, const TQString& fgColor, const TQString& fontStr,
const KURL& audioFile, int reminderMins, const KARecurrence& recurrence,
int subRepeatInterval, int subRepeatCount)
{
unsigned kaEventFlags = convertStartFlags(start, flags);
- QColor bg = convertBgColour(bgColor);
+ TQColor bg = convertBgColour(bgColor);
if (!bg.isValid())
return false;
- QColor fg;
+ TQColor fg;
if (fgColor.isEmpty())
fg = Preferences::defaultFgColour();
else
@@ -229,7 +229,7 @@ bool DcopHandler::scheduleMessage(const QString& message, const DateTime& start,
return false;
}
}
- QFont font;
+ TQFont font;
if (fontStr.isEmpty())
kaEventFlags |= KAEvent::DEFAULT_FONT;
else
@@ -248,35 +248,35 @@ bool DcopHandler::scheduleMessage(const QString& message, const DateTime& start,
* Schedule a file alarm, after converting the parameters from strings.
*/
bool DcopHandler::scheduleFile(const KURL& file,
- const DateTime& start, int lateCancel, unsigned flags, const QString& bgColor,
+ const DateTime& start, int lateCancel, unsigned flags, const TQString& bgColor,
const KURL& audioFile, int reminderMins, const KARecurrence& recurrence,
int subRepeatInterval, int subRepeatCount)
{
unsigned kaEventFlags = convertStartFlags(start, flags);
- QColor bg = convertBgColour(bgColor);
+ TQColor bg = convertBgColour(bgColor);
if (!bg.isValid())
return false;
- return theApp()->scheduleEvent(KAEvent::FILE, file.url(), start.dateTime(), lateCancel, kaEventFlags, bg, Qt::black, QFont(),
+ return theApp()->scheduleEvent(KAEvent::FILE, file.url(), start.dateTime(), lateCancel, kaEventFlags, bg, Qt::black, TQFont(),
audioFile.url(), -1, reminderMins, recurrence, subRepeatInterval, subRepeatCount);
}
/******************************************************************************
* Schedule a command alarm, after converting the parameters from strings.
*/
-bool DcopHandler::scheduleCommand(const QString& commandLine,
+bool DcopHandler::scheduleCommand(const TQString& commandLine,
const DateTime& start, int lateCancel, unsigned flags,
const KARecurrence& recurrence, int subRepeatInterval, int subRepeatCount)
{
unsigned kaEventFlags = convertStartFlags(start, flags);
- return theApp()->scheduleEvent(KAEvent::COMMAND, commandLine, start.dateTime(), lateCancel, kaEventFlags, Qt::black, Qt::black, QFont(),
- QString::null, -1, 0, recurrence, subRepeatInterval, subRepeatCount);
+ return theApp()->scheduleEvent(KAEvent::COMMAND, commandLine, start.dateTime(), lateCancel, kaEventFlags, Qt::black, Qt::black, TQFont(),
+ TQString::null, -1, 0, recurrence, subRepeatInterval, subRepeatCount);
}
/******************************************************************************
* Schedule an email alarm, after validating the addresses and attachments.
*/
-bool DcopHandler::scheduleEmail(const QString& fromID, const QString& addresses, const QString& subject,
- const QString& message, const QString& attachments,
+bool DcopHandler::scheduleEmail(const TQString& fromID, const TQString& addresses, const TQString& subject,
+ const TQString& message, const TQString& attachments,
const DateTime& start, int lateCancel, unsigned flags,
const KARecurrence& recurrence, int subRepeatInterval, int subRepeatCount)
{
@@ -292,7 +292,7 @@ bool DcopHandler::scheduleEmail(const QString& fromID, const QString& addresses,
}
}
EmailAddressList addrs;
- QString bad = KAMail::convertAddresses(addresses, addrs);
+ TQString bad = KAMail::convertAddresses(addresses, addrs);
if (!bad.isEmpty())
{
kdError(5950) << "DCOP call scheduleEmail(): invalid email addresses: " << bad << endl;
@@ -303,15 +303,15 @@ bool DcopHandler::scheduleEmail(const QString& fromID, const QString& addresses,
kdError(5950) << "DCOP call scheduleEmail(): no email address\n";
return false;
}
- QStringList atts;
+ TQStringList atts;
bad = KAMail::convertAttachments(attachments, atts);
if (!bad.isEmpty())
{
kdError(5950) << "DCOP call scheduleEmail(): invalid email attachment: " << bad << endl;
return false;
}
- return theApp()->scheduleEvent(KAEvent::EMAIL, message, start.dateTime(), lateCancel, kaEventFlags, Qt::black, Qt::black, QFont(),
- QString::null, -1, 0, recurrence, subRepeatInterval, subRepeatCount, senderId, addrs, subject, atts);
+ return theApp()->scheduleEvent(KAEvent::EMAIL, message, start.dateTime(), lateCancel, kaEventFlags, Qt::black, Qt::black, TQFont(),
+ TQString::null, -1, 0, recurrence, subRepeatInterval, subRepeatCount, senderId, addrs, subject, atts);
}
@@ -319,18 +319,18 @@ bool DcopHandler::scheduleEmail(const QString& fromID, const QString& addresses,
* Convert the start date/time string to a DateTime. The date/time string is in
* the format YYYY-MM-DD[THH:MM[:SS]] or [T]HH:MM[:SS]
*/
-DateTime DcopHandler::convertStartDateTime(const QString& startDateTime)
+DateTime DcopHandler::convertStartDateTime(const TQString& startDateTime)
{
DateTime start;
if (startDateTime.length() > 10)
{
// Both a date and a time are specified
- start = QDateTime::fromString(startDateTime, Qt::ISODate);
+ start = TQDateTime::fromString(startDateTime, Qt::ISODate);
}
else
{
// Check whether a time is specified
- QString t;
+ TQString t;
if (startDateTime[0] == 'T')
t = startDateTime.mid(1); // it's a time: remove the leading 'T'
else if (!startDateTime[2].isDigit())
@@ -339,12 +339,12 @@ DateTime DcopHandler::convertStartDateTime(const QString& startDateTime)
if (t.isEmpty())
{
// It's a date
- start = QDate::fromString(startDateTime, Qt::ISODate);
+ start = TQDate::fromString(startDateTime, Qt::ISODate);
}
else
{
// It's a time, so use today as the date
- start.set(QDate::currentDate(), QTime::fromString(t, Qt::ISODate));
+ start.set(TQDate::currentDate(), TQTime::fromString(t, Qt::ISODate));
}
}
if (!start.isValid())
@@ -374,20 +374,20 @@ unsigned DcopHandler::convertStartFlags(const DateTime& start, unsigned flags)
}
/******************************************************************************
-* Convert the background colour string to a QColor.
+* Convert the background colour string to a TQColor.
*/
-QColor DcopHandler::convertBgColour(const QString& bgColor)
+TQColor DcopHandler::convertBgColour(const TQString& bgColor)
{
if (bgColor.isEmpty())
return Preferences::defaultBgColour();
- QColor bg(bgColor);
+ TQColor bg(bgColor);
if (!bg.isValid())
kdError(5950) << "DCOP call: invalid background color: " << bgColor << endl;
return bg;
}
bool DcopHandler::convertRecurrence(DateTime& start, KARecurrence& recurrence,
- const QString& startDateTime, const QString& icalRecurrence,
+ const TQString& startDateTime, const TQString& icalRecurrence,
int& subRepeatInterval)
{
start = convertStartDateTime(startDateTime);
@@ -403,22 +403,22 @@ bool DcopHandler::convertRecurrence(DateTime& start, KARecurrence& recurrence,
return true;
}
-bool DcopHandler::convertRecurrence(DateTime& start, KARecurrence& recurrence, const QString& startDateTime,
+bool DcopHandler::convertRecurrence(DateTime& start, KARecurrence& recurrence, const TQString& startDateTime,
int recurType, int recurInterval, int recurCount)
{
start = convertStartDateTime(startDateTime);
if (!start.isValid())
return false;
- return convertRecurrence(recurrence, start, recurType, recurInterval, recurCount, QDateTime());
+ return convertRecurrence(recurrence, start, recurType, recurInterval, recurCount, TQDateTime());
}
-bool DcopHandler::convertRecurrence(DateTime& start, KARecurrence& recurrence, const QString& startDateTime,
- int recurType, int recurInterval, const QString& endDateTime)
+bool DcopHandler::convertRecurrence(DateTime& start, KARecurrence& recurrence, const TQString& startDateTime,
+ int recurType, int recurInterval, const TQString& endDateTime)
{
start = convertStartDateTime(startDateTime);
if (!start.isValid())
return false;
- QDateTime end;
+ TQDateTime end;
if (endDateTime.find('T') < 0)
{
if (!start.isDateOnly())
@@ -426,7 +426,7 @@ bool DcopHandler::convertRecurrence(DateTime& start, KARecurrence& recurrence, c
kdError(5950) << "DCOP call: alarm is date-only, but recurrence end is date/time" << endl;
return false;
}
- end.setDate(QDate::fromString(endDateTime, Qt::ISODate));
+ end.setDate(TQDate::fromString(endDateTime, Qt::ISODate));
}
else
{
@@ -435,7 +435,7 @@ bool DcopHandler::convertRecurrence(DateTime& start, KARecurrence& recurrence, c
kdError(5950) << "DCOP call: alarm is timed, but recurrence end is date-only" << endl;
return false;
}
- end = QDateTime::fromString(endDateTime, Qt::ISODate);
+ end = TQDateTime::fromString(endDateTime, Qt::ISODate);
}
if (!end.isValid())
{
@@ -446,7 +446,7 @@ bool DcopHandler::convertRecurrence(DateTime& start, KARecurrence& recurrence, c
}
bool DcopHandler::convertRecurrence(KARecurrence& recurrence, const DateTime& start, int recurType,
- int recurInterval, int recurCount, const QDateTime& end)
+ int recurInterval, int recurCount, const TQDateTime& end)
{
KARecurrence::Type type;
switch (recurType)
@@ -472,7 +472,7 @@ bool DcopHandler::convertRecurrence(KARecurrence& recurrence, const DateTime& st
= This class's function is simply to act as a receiver for DCOP requests.
=============================================================================*/
DcopHandlerOld::DcopHandlerOld()
- : QWidget(),
+ : TQWidget(),
DCOPObject(DCOP_OLD_OBJECT_NAME)
{
kdDebug(5950) << "DcopHandlerOld::DcopHandlerOld()\n";
@@ -481,7 +481,7 @@ DcopHandlerOld::DcopHandlerOld()
/******************************************************************************
* Process a DCOP request.
*/
-bool DcopHandlerOld::process(const QCString& func, const QByteArray& data, QCString& replyType, QByteArray&)
+bool DcopHandlerOld::process(const TQCString& func, const TQByteArray& data, TQCString& replyType, TQByteArray&)
{
kdDebug(5950) << "DcopHandlerOld::process(): " << func << endl;
enum
@@ -505,127 +505,127 @@ bool DcopHandlerOld::process(const QCString& func, const QByteArray& data, QCStr
};
replyType = "void";
int function;
- if (func == "handleEvent(const QString&,const QString&)"
- || func == "handleEvent(QString,QString)")
+ if (func == "handleEvent(const TQString&,const TQString&)"
+ || func == "handleEvent(TQString,TQString)")
function = HANDLE;
- else if (func == "cancelEvent(const QString&,const QString&)"
- || func == "cancelEvent(QString,QString)")
+ else if (func == "cancelEvent(const TQString&,const TQString&)"
+ || func == "cancelEvent(TQString,TQString)")
function = CANCEL;
- else if (func == "triggerEvent(const QString&,const QString&)"
- || func == "triggerEvent(QString,QString)")
+ else if (func == "triggerEvent(const TQString&,const TQString&)"
+ || func == "triggerEvent(TQString,TQString)")
function = TRIGGER;
// scheduleMessage(message, dateTime, colour, colourfg, flags, audioURL, reminder, recurrence)
- else if (func == "scheduleMessage(const QString&,const QDateTime&,const QColor&,const QColor&,Q_UINT32,const QString&,Q_INT32,const QString&)"
- || func == "scheduleMessage(QString,QDateTime,QColor,QColor,Q_UINT32,QString,Q_UINT32,QString)")
+ else if (func == "scheduleMessage(const TQString&,const TQDateTime&,const TQColor&,const TQColor&,Q_UINT32,const TQString&,Q_INT32,const TQString&)"
+ || func == "scheduleMessage(TQString,TQDateTime,TQColor,TQColor,Q_UINT32,TQString,Q_UINT32,TQString)")
function = SCHEDULE | MESSAGE;
// scheduleMessage(message, dateTime, colour, colourfg, font, flags, audioURL, reminder, recurrence)
- else if (func == "scheduleMessage(const QString&,const QDateTime&,const QColor&,const QColor&,const QFont&,Q_UINT32,const QString&,Q_INT32,const QString&)"
- || func == "scheduleMessage(QString,QDateTime,QColor,QColor,QFont,Q_UINT32,QString,Q_UINT32,QString)")
+ else if (func == "scheduleMessage(const TQString&,const TQDateTime&,const TQColor&,const TQColor&,const TQFont&,Q_UINT32,const TQString&,Q_INT32,const TQString&)"
+ || func == "scheduleMessage(TQString,TQDateTime,TQColor,TQColor,TQFont,Q_UINT32,TQString,Q_UINT32,TQString)")
function = SCHEDULE | MESSAGE | FONT;
// scheduleFile(URL, dateTime, colour, flags, audioURL, reminder, recurrence)
- else if (func == "scheduleFile(const QString&,const QDateTime&,const QColor&,Q_UINT32,const QString&,Q_INT32,Q_INT32,const QString&)"
- || func == "scheduleFile(QString,QDateTime,QColor,Q_UINT32,QString,Q_UINT32,QString)")
+ else if (func == "scheduleFile(const TQString&,const TQDateTime&,const TQColor&,Q_UINT32,const TQString&,Q_INT32,Q_INT32,const TQString&)"
+ || func == "scheduleFile(TQString,TQDateTime,TQColor,Q_UINT32,TQString,Q_UINT32,TQString)")
function = SCHEDULE | FILE;
// scheduleCommand(commandLine, dateTime, flags, recurrence)
- else if (func == "scheduleCommand(const QString&,const QDateTime&,Q_UINT32,const QString&)"
- || func == "scheduleCommand(QString,QDateTime,Q_UINT32,QString)")
+ else if (func == "scheduleCommand(const TQString&,const TQDateTime&,Q_UINT32,const TQString&)"
+ || func == "scheduleCommand(TQString,TQDateTime,Q_UINT32,TQString)")
function = SCHEDULE | COMMAND;
// scheduleEmail(addresses, subject, message, attachments, dateTime, flags, recurrence)
- else if (func == "scheduleEmail(const QString&,const QString&,const QString&,const QString&,const QDateTime&,Q_UINT32,const QString&)"
- || func == "scheduleEmail(QString,QString,QString,QString,QDateTime,Q_UINT32,QString)")
+ else if (func == "scheduleEmail(const TQString&,const TQString&,const TQString&,const TQString&,const TQDateTime&,Q_UINT32,const TQString&)"
+ || func == "scheduleEmail(TQString,TQString,TQString,TQString,TQDateTime,Q_UINT32,TQString)")
function = SCHEDULE | EMAIL;
// scheduleMessage(message, dateTime, colour, colourfg, flags, audioURL, reminder, recurType, interval, recurCount)
- else if (func == "scheduleMessage(const QString&,const QDateTime&,const QColor&,const QColor&,Q_UINT32,const QString&,Q_INT32,Q_INT32,Q_INT32,Q_INT32)"
- || func == "scheduleMessage(QString,QDateTime,QColor,QColor,Q_UINT32,QString,Q_INT32,Q_INT32,Q_INT32,Q_INT32)")
+ else if (func == "scheduleMessage(const TQString&,const TQDateTime&,const TQColor&,const TQColor&,Q_UINT32,const TQString&,Q_INT32,Q_INT32,Q_INT32,Q_INT32)"
+ || func == "scheduleMessage(TQString,TQDateTime,TQColor,TQColor,Q_UINT32,TQString,Q_INT32,Q_INT32,Q_INT32,Q_INT32)")
function = SCHEDULE | MESSAGE | REP_COUNT;
// scheduleFile(URL, dateTime, colour, flags, audioURL, reminder, recurType, interval, recurCount)
- else if (func == "scheduleFile(const QString&,const QDateTime&,const QColor&,Q_UINT32,const QString&,Q_INT32,Q_INT32,Q_INT32,Q_INT32)"
- || func == "scheduleFile(QString,QDateTime,QColor,Q_UINT32,QString,Q_INT32,Q_INT32,Q_INT32,Q_INT32)")
+ else if (func == "scheduleFile(const TQString&,const TQDateTime&,const TQColor&,Q_UINT32,const TQString&,Q_INT32,Q_INT32,Q_INT32,Q_INT32)"
+ || func == "scheduleFile(TQString,TQDateTime,TQColor,Q_UINT32,TQString,Q_INT32,Q_INT32,Q_INT32,Q_INT32)")
function = SCHEDULE | FILE | REP_COUNT;
// scheduleCommand(commandLine, dateTime, flags, recurType, interval, recurCount)
- else if (func == "scheduleCommand(const QString&,const QDateTime&,Q_UINT32,Q_INT32,Q_INT32,Q_INT32)"
- || func == "scheduleCommand(QString,QDateTime,Q_UINT32,Q_INT32,Q_INT32,Q_INT32)")
+ else if (func == "scheduleCommand(const TQString&,const TQDateTime&,Q_UINT32,Q_INT32,Q_INT32,Q_INT32)"
+ || func == "scheduleCommand(TQString,TQDateTime,Q_UINT32,Q_INT32,Q_INT32,Q_INT32)")
function = SCHEDULE | COMMAND | REP_COUNT;
// scheduleEmail(addresses, subject, message, attachments, dateTime, flags, recurType, interval, recurCount)
- else if (func == "scheduleEmail(const QString&,const QString&,const QString&,const QString&,const QDateTime&,Q_UINT32,Q_INT32,Q_INT32,Q_INT32)"
- || func == "scheduleEmail(QString,QString,QString,QString,QDateTime,Q_UINT32,Q_INT32,Q_INT32,Q_INT32)")
+ else if (func == "scheduleEmail(const TQString&,const TQString&,const TQString&,const TQString&,const TQDateTime&,Q_UINT32,Q_INT32,Q_INT32,Q_INT32)"
+ || func == "scheduleEmail(TQString,TQString,TQString,TQString,TQDateTime,Q_UINT32,Q_INT32,Q_INT32,Q_INT32)")
function = SCHEDULE | EMAIL | REP_COUNT;
// scheduleMessage(message, dateTime, colour, colourfg, flags, audioURL, reminder, recurType, interval, endTime)
- else if (func == "scheduleMessage(const QString&,const QDateTime&,const QColor&,const QColor&,Q_UINT32,const QString&,Q_INT32,Q_INT32,Q_INT32,const QDateTime&)"
- || func == "scheduleMessage(QString,QDateTime,QColor,QColor,Q_UINT32,QString,Q_INT32,Q_INT32,Q_INT32,QDateTime)")
+ else if (func == "scheduleMessage(const TQString&,const TQDateTime&,const TQColor&,const TQColor&,Q_UINT32,const TQString&,Q_INT32,Q_INT32,Q_INT32,const TQDateTime&)"
+ || func == "scheduleMessage(TQString,TQDateTime,TQColor,TQColor,Q_UINT32,TQString,Q_INT32,Q_INT32,Q_INT32,TQDateTime)")
function = SCHEDULE | MESSAGE | REP_END;
// scheduleFile(URL, dateTime, colour, flags, audioURL, reminder, recurType, interval, endTime)
- else if (func == "scheduleFile(const QString&,const QDateTime&,const QColor&,Q_UINT32,const QString&,Q_INT32,Q_INT32,Q_INT32,const QDateTime&)"
- || func == "scheduleFile(QString,QDateTime,QColor,Q_UINT32,QString,Q_INT32,Q_INT32,Q_INT32,QDateTime)")
+ else if (func == "scheduleFile(const TQString&,const TQDateTime&,const TQColor&,Q_UINT32,const TQString&,Q_INT32,Q_INT32,Q_INT32,const TQDateTime&)"
+ || func == "scheduleFile(TQString,TQDateTime,TQColor,Q_UINT32,TQString,Q_INT32,Q_INT32,Q_INT32,TQDateTime)")
function = SCHEDULE | FILE | REP_END;
// scheduleCommand(commandLine, dateTime, flags, recurType, interval, endTime)
- else if (func == "scheduleCommand(const QString&,const QDateTime&,Q_UINT32,Q_INT32,Q_INT32,const QDateTime&)"
- || func == "scheduleCommand(QString,QDateTime,Q_UINT32,Q_INT32,Q_INT32,QDateTime)")
+ else if (func == "scheduleCommand(const TQString&,const TQDateTime&,Q_UINT32,Q_INT32,Q_INT32,const TQDateTime&)"
+ || func == "scheduleCommand(TQString,TQDateTime,Q_UINT32,Q_INT32,Q_INT32,TQDateTime)")
function = SCHEDULE | COMMAND | REP_END;
// scheduleEmail(addresses, subject, message, attachments, dateTime, flags, recurType, interval, endTime)
- else if (func == "scheduleEmail(const QString&,const QString&,const QString&,const QString&,const QDateTime&,Q_UINT32,Q_INT32,Q_INT32,const QDateTime&)"
- || func == "scheduleEmail(QString,QString,QString,QString,QDateTime,Q_UINT32,Q_INT32,Q_INT32,QDateTime)")
+ else if (func == "scheduleEmail(const TQString&,const TQString&,const TQString&,const TQString&,const TQDateTime&,Q_UINT32,Q_INT32,Q_INT32,const TQDateTime&)"
+ || func == "scheduleEmail(TQString,TQString,TQString,TQString,TQDateTime,Q_UINT32,Q_INT32,Q_INT32,TQDateTime)")
function = SCHEDULE | EMAIL | REP_END;
// Deprecated methods: backwards compatibility with KAlarm pre-0.9.6
// scheduleMessage(message, dateTime, colour, flags, audioURL, reminder, recurrence)
- else if (func == "scheduleMessage(const QString&,const QDateTime&,const QColor&,Q_UINT32,const QString&,Q_INT32,const QString&)"
- || func == "scheduleMessage(QString,QDateTime,QColor,Q_UINT32,QString,Q_UINT32,QString)")
+ else if (func == "scheduleMessage(const TQString&,const TQDateTime&,const TQColor&,Q_UINT32,const TQString&,Q_INT32,const TQString&)"
+ || func == "scheduleMessage(TQString,TQDateTime,TQColor,Q_UINT32,TQString,Q_UINT32,TQString)")
function = SCHEDULE | MESSAGE | PRE_096;
// scheduleMessage(message, dateTime, colour, font, flags, audioURL, reminder, recurrence)
- else if (func == "scheduleMessage(const QString&,const QDateTime&,const QColor&,const QFont&,Q_UINT32,const QString&,Q_INT32,const QString&)"
- || func == "scheduleMessage(QString,QDateTime,QColor,QFont,Q_UINT32,QString,Q_UINT32,QString)")
+ else if (func == "scheduleMessage(const TQString&,const TQDateTime&,const TQColor&,const TQFont&,Q_UINT32,const TQString&,Q_INT32,const TQString&)"
+ || func == "scheduleMessage(TQString,TQDateTime,TQColor,TQFont,Q_UINT32,TQString,Q_UINT32,TQString)")
function = SCHEDULE | MESSAGE | FONT | PRE_096;
// scheduleMessage(message, dateTime, colour, flags, audioURL, reminder, recurType, interval, recurCount)
- else if (func == "scheduleMessage(const QString&,const QDateTime&,const QColor&,Q_UINT32,const QString&,Q_INT32,Q_INT32,Q_INT32,Q_INT32)"
- || func == "scheduleMessage(QString,QDateTime,QColor,Q_UINT32,QString,Q_INT32,Q_INT32,Q_INT32,Q_INT32)")
+ else if (func == "scheduleMessage(const TQString&,const TQDateTime&,const TQColor&,Q_UINT32,const TQString&,Q_INT32,Q_INT32,Q_INT32,Q_INT32)"
+ || func == "scheduleMessage(TQString,TQDateTime,TQColor,Q_UINT32,TQString,Q_INT32,Q_INT32,Q_INT32,Q_INT32)")
function = SCHEDULE | MESSAGE | REP_COUNT | PRE_096;
// scheduleMessage(message, dateTime, colour, flags, audioURL, reminder, recurType, interval, endTime)
- else if (func == "scheduleMessage(const QString&,const QDateTime&,const QColor&,Q_UINT32,const QString&,Q_INT32,Q_INT32,Q_INT32,const QDateTime&)"
- || func == "scheduleMessage(QString,QDateTime,QColor,Q_UINT32,QString,Q_INT32,Q_INT32,Q_INT32,QDateTime)")
+ else if (func == "scheduleMessage(const TQString&,const TQDateTime&,const TQColor&,Q_UINT32,const TQString&,Q_INT32,Q_INT32,Q_INT32,const TQDateTime&)"
+ || func == "scheduleMessage(TQString,TQDateTime,TQColor,Q_UINT32,TQString,Q_INT32,Q_INT32,Q_INT32,TQDateTime)")
function = SCHEDULE | MESSAGE | REP_END | PRE_096;
// Deprecated methods: backwards compatibility with KAlarm pre-0.9.1
// scheduleMessage(message, dateTime, colour, flags, audioURL)
- else if (func == "scheduleMessage(const QString&,const QDateTime&,const QColor&,Q_UINT32,const QString&)"
- || func == "scheduleMessage(QString,QDateTime,QColor,Q_UINT32,QString)")
+ else if (func == "scheduleMessage(const TQString&,const TQDateTime&,const TQColor&,Q_UINT32,const TQString&)"
+ || func == "scheduleMessage(TQString,TQDateTime,TQColor,Q_UINT32,TQString)")
function = SCHEDULE | MESSAGE | PRE_091;
// scheduleFile(URL, dateTime, colour, flags, audioURL)
- else if (func == "scheduleFile(const QString&,const QDateTime&,const QColor&,Q_UINT32,const QString&)"
- || func == "scheduleFile(QString,QDateTime,QColor,Q_UINT32,QString)")
+ else if (func == "scheduleFile(const TQString&,const TQDateTime&,const TQColor&,Q_UINT32,const TQString&)"
+ || func == "scheduleFile(TQString,TQDateTime,TQColor,Q_UINT32,TQString)")
function = SCHEDULE | FILE | PRE_091;
// scheduleMessage(message, dateTime, colour, flags, audioURL, recurType, interval, recurCount)
- else if (func == "scheduleMessage(const QString&,const QDateTime&,const QColor&,Q_UINT32,const QString&,Q_INT32,Q_INT32,Q_INT32)"
- || func == "scheduleMessage(QString,QDateTime,QColor,Q_UINT32,QString,Q_INT32,Q_INT32,Q_INT32)")
+ else if (func == "scheduleMessage(const TQString&,const TQDateTime&,const TQColor&,Q_UINT32,const TQString&,Q_INT32,Q_INT32,Q_INT32)"
+ || func == "scheduleMessage(TQString,TQDateTime,TQColor,Q_UINT32,TQString,Q_INT32,Q_INT32,Q_INT32)")
function = SCHEDULE | MESSAGE | REP_COUNT | PRE_091;
// scheduleFile(URL, dateTime, colour, flags, audioURL, recurType, interval, recurCount)
- else if (func == "scheduleFile(const QString&,const QDateTime&,const QColor&,Q_UINT32,const QString&,Q_INT32,Q_INT32,Q_INT32)"
- || func == "scheduleFile(QString,QDateTime,QColor,Q_UINT32,QString,Q_INT32,Q_INT32,Q_INT32)")
+ else if (func == "scheduleFile(const TQString&,const TQDateTime&,const TQColor&,Q_UINT32,const TQString&,Q_INT32,Q_INT32,Q_INT32)"
+ || func == "scheduleFile(TQString,TQDateTime,TQColor,Q_UINT32,TQString,Q_INT32,Q_INT32,Q_INT32)")
function = SCHEDULE | FILE | REP_COUNT | PRE_091;
// scheduleMessage(message, dateTime, colour, flags, audioURL, recurType, interval, endTime)
- else if (func == "scheduleMessage(const QString&,const QDateTime&,const QColor&,Q_UINT32,const QString&,Q_INT32,Q_INT32,const QDateTime&)"
- || func == "scheduleMessage(QString,QDateTime,QColor,Q_UINT32,QString,Q_INT32,Q_INT32,QDateTime)")
+ else if (func == "scheduleMessage(const TQString&,const TQDateTime&,const TQColor&,Q_UINT32,const TQString&,Q_INT32,Q_INT32,const TQDateTime&)"
+ || func == "scheduleMessage(TQString,TQDateTime,TQColor,Q_UINT32,TQString,Q_INT32,Q_INT32,TQDateTime)")
function = SCHEDULE | MESSAGE | REP_END | PRE_091;
// scheduleFile(URL, dateTime, colour, flags, audioURL, recurType, interval, endTime)
- else if (func == "scheduleFile(const QString&,const QDateTime&,const QColor&,Q_UINT32,const QString&,Q_INT32,Q_INT32,const QDateTime&)"
- || func == "scheduleFile(QString,QDateTime,QColor,Q_UINT32,QString,Q_INT32,Q_INT32,QDateTime)")
+ else if (func == "scheduleFile(const TQString&,const TQDateTime&,const TQColor&,Q_UINT32,const TQString&,Q_INT32,Q_INT32,const TQDateTime&)"
+ || func == "scheduleFile(TQString,TQDateTime,TQColor,Q_UINT32,TQString,Q_INT32,Q_INT32,TQDateTime)")
function = SCHEDULE | FILE | REP_END | PRE_091;
// Obsolete methods: backwards compatibility with KAlarm pre-0.7
- else if (func == "scheduleMessage(const QString&,const QDateTime&,const QColor&,Q_UINT32,Q_INT32,Q_INT32)"
- || func == "scheduleMessage(QString,QDateTime,QColor,Q_UINT32,Q_INT32,Q_INT32)"
- || func == "scheduleFile(const QString&,const QDateTime&,const QColor&,Q_UINT32,Q_INT32,Q_INT32)"
- || func == "scheduleFile(QString,QDateTime,QColor,Q_UINT32,Q_INT32,Q_INT32)"
- || func == "scheduleCommand(const QString&,const QDateTime&,Q_UINT32,Q_INT32,Q_INT32)"
- || func == "scheduleCommand(QString,QDateTime,Q_UINT32,Q_INT32,Q_INT32)"
+ else if (func == "scheduleMessage(const TQString&,const TQDateTime&,const TQColor&,Q_UINT32,Q_INT32,Q_INT32)"
+ || func == "scheduleMessage(TQString,TQDateTime,TQColor,Q_UINT32,Q_INT32,Q_INT32)"
+ || func == "scheduleFile(const TQString&,const TQDateTime&,const TQColor&,Q_UINT32,Q_INT32,Q_INT32)"
+ || func == "scheduleFile(TQString,TQDateTime,TQColor,Q_UINT32,Q_INT32,Q_INT32)"
+ || func == "scheduleCommand(const TQString&,const TQDateTime&,Q_UINT32,Q_INT32,Q_INT32)"
+ || func == "scheduleCommand(TQString,TQDateTime,Q_UINT32,Q_INT32,Q_INT32)"
// Obsolete methods: backwards compatibility with KAlarm pre-0.6
- || func == "cancelMessage(const QString&,const QString&)"
- || func == "cancelMessage(QString,QString)"
- || func == "displayMessage(const QString&,const QString&)"
- || func == "displayMessage(QString,QString)")
+ || func == "cancelMessage(const TQString&,const TQString&)"
+ || func == "cancelMessage(TQString,TQString)"
+ || func == "displayMessage(const TQString&,const TQString&)"
+ || func == "displayMessage(TQString,TQString)")
{
kdError(5950) << "DcopHandlerOld::process(): obsolete DCOP function call: '" << func << "'" << endl;
return false;
@@ -643,8 +643,8 @@ bool DcopHandlerOld::process(const QCString& func, const QByteArray& data, QCStr
case TRIGGER: // trigger event with specified ID in calendar file
{
- QDataStream arg(data, IO_ReadOnly);
- QString urlString, vuid;
+ TQDataStream arg(data, IO_ReadOnly);
+ TQString urlString, vuid;
arg >> urlString >> vuid;
switch (function)
{
@@ -668,24 +668,24 @@ bool DcopHandlerOld::process(const QCString& func, const QByteArray& data, QCStr
case EMAIL: action = KAEvent::EMAIL; break;
default: return false;
}
- QDataStream arg(data, IO_ReadOnly);
- QString text, audioFile, mailSubject;
+ TQDataStream arg(data, IO_ReadOnly);
+ TQString text, audioFile, mailSubject;
float audioVolume = -1;
EmailAddressList mailAddresses;
- QStringList mailAttachments;
- QDateTime dateTime, endTime;
- QColor bgColour;
- QColor fgColour(Qt::black);
- QFont font;
+ TQStringList mailAttachments;
+ TQDateTime dateTime, endTime;
+ TQColor bgColour;
+ TQColor fgColour(Qt::black);
+ TQFont font;
Q_UINT32 flags;
int lateCancel = 0;
KARecurrence recurrence;
Q_INT32 reminderMinutes = 0;
if (action == KAEvent::EMAIL)
{
- QString addresses, attachments;
+ TQString addresses, attachments;
arg >> addresses >> mailSubject >> text >> attachments;
- QString bad = KAMail::convertAddresses(addresses, mailAddresses);
+ TQString bad = KAMail::convertAddresses(addresses, mailAddresses);
if (!bad.isEmpty())
{
kdError(5950) << "DcopHandlerOld::process(): invalid email addresses: " << bad << endl;
@@ -755,7 +755,7 @@ bool DcopHandlerOld::process(const QCString& func, const QByteArray& data, QCStr
}
else if (!(function & PRE_091))
{
- QString rule;
+ TQString rule;
arg >> rule;
recurrence.set(rule);
}
diff --git a/kalarm/dcophandler.h b/kalarm/dcophandler.h
index 1ea6f05e5..f14f4cda7 100644
--- a/kalarm/dcophandler.h
+++ b/kalarm/dcophandler.h
@@ -21,86 +21,86 @@
#ifndef DCOPHANDLER_H
#define DCOPHANDLER_H
-#include <qwidget.h>
+#include <tqwidget.h>
#include <dcopobject.h>
#include "datetime.h"
#include "kalarmiface.h"
-class DcopHandler : public QWidget, virtual public KAlarmIface
+class DcopHandler : public TQWidget, virtual public KAlarmIface
{
public:
DcopHandler();
- virtual bool cancelEvent(const QString& url,const QString& eventId);
- virtual bool triggerEvent(const QString& url,const QString& eventId);
+ virtual bool cancelEvent(const TQString& url,const TQString& eventId);
+ virtual bool triggerEvent(const TQString& url,const TQString& eventId);
- virtual bool scheduleMessage(const QString& message, const QString& startDateTime, int lateCancel, unsigned flags,
- const QString& bgColor, const QString& fgColor, const QString& font,
- const KURL& audioFile, int reminderMins, const QString& recurrence,
+ virtual bool scheduleMessage(const TQString& message, const TQString& startDateTime, int lateCancel, unsigned flags,
+ const TQString& bgColor, const TQString& fgColor, const TQString& font,
+ const KURL& audioFile, int reminderMins, const TQString& recurrence,
int subRepeatInterval, int subRepeatCount);
- virtual bool scheduleMessage(const QString& message, const QString& startDateTime, int lateCancel, unsigned flags,
- const QString& bgColor, const QString& fgColor, const QString& font,
+ virtual bool scheduleMessage(const TQString& message, const TQString& startDateTime, int lateCancel, unsigned flags,
+ const TQString& bgColor, const TQString& fgColor, const TQString& font,
const KURL& audioFile, int reminderMins, int recurType, int recurInterval, int recurCount);
- virtual bool scheduleMessage(const QString& message, const QString& startDateTime, int lateCancel, unsigned flags,
- const QString& bgColor, const QString& fgColor, const QString& font,
- const KURL& audioFile, int reminderMins, int recurType, int recurInterval, const QString& endDateTime);
- virtual bool scheduleFile(const KURL& file, const QString& startDateTime, int lateCancel, unsigned flags, const QString& bgColor,
- const KURL& audioFile, int reminderMins, const QString& recurrence,
+ virtual bool scheduleMessage(const TQString& message, const TQString& startDateTime, int lateCancel, unsigned flags,
+ const TQString& bgColor, const TQString& fgColor, const TQString& font,
+ const KURL& audioFile, int reminderMins, int recurType, int recurInterval, const TQString& endDateTime);
+ virtual bool scheduleFile(const KURL& file, const TQString& startDateTime, int lateCancel, unsigned flags, const TQString& bgColor,
+ const KURL& audioFile, int reminderMins, const TQString& recurrence,
int subRepeatInterval, int subRepeatCount);
- virtual bool scheduleFile(const KURL& file, const QString& startDateTime, int lateCancel, unsigned flags, const QString& bgColor,
+ virtual bool scheduleFile(const KURL& file, const TQString& startDateTime, int lateCancel, unsigned flags, const TQString& bgColor,
const KURL& audioFile, int reminderMins, int recurType, int recurInterval, int recurCount);
- virtual bool scheduleFile(const KURL& file, const QString& startDateTime, int lateCancel, unsigned flags, const QString& bgColor,
- const KURL& audioFile, int reminderMins, int recurType, int recurInterval, const QString& endDateTime);
- virtual bool scheduleCommand(const QString& commandLine, const QString& startDateTime, int lateCancel, unsigned flags,
- const QString& recurrence, int subRepeatInterval, int subRepeatCount);
- virtual bool scheduleCommand(const QString& commandLine, const QString& startDateTime, int lateCancel, unsigned flags,
+ virtual bool scheduleFile(const KURL& file, const TQString& startDateTime, int lateCancel, unsigned flags, const TQString& bgColor,
+ const KURL& audioFile, int reminderMins, int recurType, int recurInterval, const TQString& endDateTime);
+ virtual bool scheduleCommand(const TQString& commandLine, const TQString& startDateTime, int lateCancel, unsigned flags,
+ const TQString& recurrence, int subRepeatInterval, int subRepeatCount);
+ virtual bool scheduleCommand(const TQString& commandLine, const TQString& startDateTime, int lateCancel, unsigned flags,
int recurType, int recurInterval, int recurCount);
- virtual bool scheduleCommand(const QString& commandLine, const QString& startDateTime, int lateCancel, unsigned flags,
- int recurType, int recurInterval, const QString& endDateTime);
- virtual bool scheduleEmail(const QString& fromID, const QString& addresses, const QString& subject, const QString& message,
- const QString& attachments, const QString& startDateTime, int lateCancel, unsigned flags,
- const QString& recurrence, int recurInterval, int recurCount);
- virtual bool scheduleEmail(const QString& fromID, const QString& addresses, const QString& subject, const QString& message,
- const QString& attachments, const QString& startDateTime, int lateCancel, unsigned flags,
+ virtual bool scheduleCommand(const TQString& commandLine, const TQString& startDateTime, int lateCancel, unsigned flags,
+ int recurType, int recurInterval, const TQString& endDateTime);
+ virtual bool scheduleEmail(const TQString& fromID, const TQString& addresses, const TQString& subject, const TQString& message,
+ const TQString& attachments, const TQString& startDateTime, int lateCancel, unsigned flags,
+ const TQString& recurrence, int recurInterval, int recurCount);
+ virtual bool scheduleEmail(const TQString& fromID, const TQString& addresses, const TQString& subject, const TQString& message,
+ const TQString& attachments, const TQString& startDateTime, int lateCancel, unsigned flags,
int recurType, int recurInterval, int recurCount);
- virtual bool scheduleEmail(const QString& fromID, const QString& addresses, const QString& subject, const QString& message,
- const QString& attachments, const QString& startDateTime, int lateCancel, unsigned flags,
- int recurType, int recurInterval, const QString& endDateTime);
- virtual bool edit(const QString& eventID);
- virtual bool editNew(const QString& templateName);
+ virtual bool scheduleEmail(const TQString& fromID, const TQString& addresses, const TQString& subject, const TQString& message,
+ const TQString& attachments, const TQString& startDateTime, int lateCancel, unsigned flags,
+ int recurType, int recurInterval, const TQString& endDateTime);
+ virtual bool edit(const TQString& eventID);
+ virtual bool editNew(const TQString& templateName);
private:
- static bool scheduleMessage(const QString& message, const DateTime& start, int lateCancel, unsigned flags,
- const QString& bgColor, const QString& fgColor, const QString& fontStr,
+ static bool scheduleMessage(const TQString& message, const DateTime& start, int lateCancel, unsigned flags,
+ const TQString& bgColor, const TQString& fgColor, const TQString& fontStr,
const KURL& audioFile, int reminderMins, const KARecurrence&,
int subRepeatInterval = 0, int subRepeatCount = 0);
- static bool scheduleFile(const KURL& file, const DateTime& start, int lateCancel, unsigned flags, const QString& bgColor,
+ static bool scheduleFile(const KURL& file, const DateTime& start, int lateCancel, unsigned flags, const TQString& bgColor,
const KURL& audioFile, int reminderMins, const KARecurrence&,
int subRepeatInterval = 0, int subRepeatCount = 0);
- static bool scheduleCommand(const QString& commandLine, const DateTime& start, int lateCancel, unsigned flags,
+ static bool scheduleCommand(const TQString& commandLine, const DateTime& start, int lateCancel, unsigned flags,
const KARecurrence&, int subRepeatInterval = 0, int subRepeatCount = 0);
- static bool scheduleEmail(const QString& fromID, const QString& addresses, const QString& subject, const QString& message,
- const QString& attachments, const DateTime& start, int lateCancel, unsigned flags,
+ static bool scheduleEmail(const TQString& fromID, const TQString& addresses, const TQString& subject, const TQString& message,
+ const TQString& attachments, const DateTime& start, int lateCancel, unsigned flags,
const KARecurrence&, int subRepeatInterval = 0, int subRepeatCount = 0);
- static DateTime convertStartDateTime(const QString& startDateTime);
+ static DateTime convertStartDateTime(const TQString& startDateTime);
static unsigned convertStartFlags(const DateTime& start, unsigned flags);
- static QColor convertBgColour(const QString& bgColor);
- static bool convertRecurrence(DateTime& start, KARecurrence&, const QString& startDateTime, const QString& icalRecurrence, int& subRepeatInterval);
- static bool convertRecurrence(DateTime& start, KARecurrence&, const QString& startDateTime, int recurType, int recurInterval, int recurCount);
- static bool convertRecurrence(DateTime& start, KARecurrence&, const QString& startDateTime, int recurType, int recurInterval, const QString& endDateTime);
- static bool convertRecurrence(KARecurrence&, const DateTime& start, int recurType, int recurInterval, int recurCount, const QDateTime& end);
+ static TQColor convertBgColour(const TQString& bgColor);
+ static bool convertRecurrence(DateTime& start, KARecurrence&, const TQString& startDateTime, const TQString& icalRecurrence, int& subRepeatInterval);
+ static bool convertRecurrence(DateTime& start, KARecurrence&, const TQString& startDateTime, int recurType, int recurInterval, int recurCount);
+ static bool convertRecurrence(DateTime& start, KARecurrence&, const TQString& startDateTime, int recurType, int recurInterval, const TQString& endDateTime);
+ static bool convertRecurrence(KARecurrence&, const DateTime& start, int recurType, int recurInterval, int recurCount, const TQDateTime& end);
};
#ifdef OLD_DCOP
-class DcopHandlerOld : public QWidget, public DCOPObject
+class DcopHandlerOld : public TQWidget, public DCOPObject
{
Q_OBJECT
public:
DcopHandlerOld();
~DcopHandlerOld() { }
- virtual bool process(const QCString& func, const QByteArray& data, QCString& replyType, QByteArray& replyData);
+ virtual bool process(const TQCString& func, const TQByteArray& data, TQCString& replyType, TQByteArray& replyData);
};
#endif
diff --git a/kalarm/deferdlg.cpp b/kalarm/deferdlg.cpp
index 5e0e039c4..60fce82c5 100644
--- a/kalarm/deferdlg.cpp
+++ b/kalarm/deferdlg.cpp
@@ -20,7 +20,7 @@
#include "kalarm.h"
-#include <qlayout.h>
+#include <tqlayout.h>
#include <kglobal.h>
#include <klocale.h>
@@ -39,21 +39,21 @@
#include "deferdlg.moc"
-DeferAlarmDlg::DeferAlarmDlg(const QString& caption, const DateTime& initialDT,
- bool cancelButton, QWidget* parent, const char* name)
+DeferAlarmDlg::DeferAlarmDlg(const TQString& caption, const DateTime& initialDT,
+ bool cancelButton, TQWidget* parent, const char* name)
: KDialogBase(parent, name, true, caption, Ok|Cancel|User1, Ok, false, i18n("Cancel &Deferral"))
{
if (!cancelButton)
showButton(User1, false);
- QWidget* page = new QWidget(this);
+ TQWidget* page = new TQWidget(this);
setMainWidget(page);
- QVBoxLayout* layout = new QVBoxLayout(page, 0, spacingHint());
+ TQVBoxLayout* layout = new TQVBoxLayout(page, 0, spacingHint());
mTimeWidget = new AlarmTimeWidget(AlarmTimeWidget::DEFER_TIME, page, "timeGroup");
mTimeWidget->setDateTime(initialDT);
mTimeWidget->setMinDateTimeIsCurrent();
- connect(mTimeWidget, SIGNAL(pastMax()), SLOT(slotPastLimit()));
+ connect(mTimeWidget, TQT_SIGNAL(pastMax()), TQT_SLOT(slotPastLimit()));
layout->addWidget(mTimeWidget);
layout->addSpacing(spacingHint());
@@ -89,7 +89,7 @@ void DeferAlarmDlg::slotOk()
}
if (endTime.isValid() && mAlarmDateTime > endTime)
{
- QString text;
+ TQString text;
switch (limitType)
{
case KAEvent::LIMIT_REPETITION:
@@ -135,7 +135,7 @@ void DeferAlarmDlg::slotPastLimit()
*/
void DeferAlarmDlg::setLimit(const DateTime& limit)
{
- mLimitEventID = QString::null;
+ mLimitEventID = TQString::null;
mLimitDateTime = limit;
mTimeWidget->setMaxDateTime(mLimitDateTime);
}
@@ -144,7 +144,7 @@ void DeferAlarmDlg::setLimit(const DateTime& limit)
* Set the time limit for deferral based on the next occurrence of the alarm
* with the specified ID.
*/
-DateTime DeferAlarmDlg::setLimit(const QString& eventID)
+DateTime DeferAlarmDlg::setLimit(const TQString& eventID)
{
mLimitEventID = eventID;
const KCal::Event* kcalEvent = AlarmCalendar::getEvent(mLimitEventID);
diff --git a/kalarm/deferdlg.h b/kalarm/deferdlg.h
index 69275a054..999eccf40 100644
--- a/kalarm/deferdlg.h
+++ b/kalarm/deferdlg.h
@@ -31,10 +31,10 @@ class DeferAlarmDlg : public KDialogBase
{
Q_OBJECT
public:
- DeferAlarmDlg(const QString& caption, const DateTime& initialDT,
- bool cancelButton, QWidget* parent = 0, const char* name = 0);
+ DeferAlarmDlg(const TQString& caption, const DateTime& initialDT,
+ bool cancelButton, TQWidget* parent = 0, const char* name = 0);
void setLimit(const DateTime&);
- DateTime setLimit(const QString& eventID);
+ DateTime setLimit(const TQString& eventID);
const DateTime& getDateTime() const { return mAlarmDateTime; }
void setDeferMinutes(int mins);
int deferMinutes() const { return mDeferMinutes; }
@@ -51,7 +51,7 @@ class DeferAlarmDlg : public KDialogBase
AlarmTimeWidget* mTimeWidget;
DateTime mAlarmDateTime;
DateTime mLimitDateTime; // latest date/time allowed for deferral
- QString mLimitEventID; // event from whose recurrences to derive the limit date/time for deferral
+ TQString mLimitEventID; // event from whose recurrences to derive the limit date/time for deferral
int mDeferMinutes; // number of minutes deferral selected, or 0 if date/time entered
};
diff --git a/kalarm/editdlg.cpp b/kalarm/editdlg.cpp
index 232111000..bd22fdd9a 100644
--- a/kalarm/editdlg.cpp
+++ b/kalarm/editdlg.cpp
@@ -22,20 +22,20 @@
#include <limits.h>
-#include <qlayout.h>
-#include <qpopupmenu.h>
-#include <qvbox.h>
-#include <qgroupbox.h>
-#include <qwidgetstack.h>
-#include <qdragobject.h>
-#include <qlabel.h>
-#include <qmessagebox.h>
-#include <qtabwidget.h>
-#include <qvalidator.h>
-#include <qwhatsthis.h>
-#include <qtooltip.h>
-#include <qdir.h>
-#include <qstyle.h>
+#include <tqlayout.h>
+#include <tqpopupmenu.h>
+#include <tqvbox.h>
+#include <tqgroupbox.h>
+#include <tqwidgetstack.h>
+#include <tqdragobject.h>
+#include <tqlabel.h>
+#include <tqmessagebox.h>
+#include <tqtabwidget.h>
+#include <tqvalidator.h>
+#include <tqwhatsthis.h>
+#include <tqtooltip.h>
+#include <tqdir.h>
+#include <tqstyle.h>
#include <kglobal.h>
#include <klocale.h>
@@ -97,15 +97,15 @@ static const int maxDelayTime = 99*60 + 59; // < 100 hours
class PickAlarmFileRadio : public PickFileRadio
{
public:
- PickAlarmFileRadio(const QString& text, QButtonGroup* parent, const char* name = 0)
+ PickAlarmFileRadio(const TQString& text, TQButtonGroup* parent, const char* name = 0)
: PickFileRadio(text, parent, name) { }
- virtual QString pickFile() // called when browse button is pressed to select a file to display
+ virtual TQString pickFile() // called when browse button is pressed to select a file to display
{
return KAlarm::browseFile(i18n("Choose Text or Image File to Display"), mDefaultDir, fileEdit()->text(),
- QString::null, KFile::ExistingOnly, parentWidget(), "pickAlarmFile");
+ TQString::null, KFile::ExistingOnly, parentWidget(), "pickAlarmFile");
}
private:
- QString mDefaultDir; // default directory for file browse button
+ TQString mDefaultDir; // default directory for file browse button
};
/*=============================================================================
@@ -114,22 +114,22 @@ class PickAlarmFileRadio : public PickFileRadio
class PickLogFileRadio : public PickFileRadio
{
public:
- PickLogFileRadio(QPushButton* b, LineEdit* e, const QString& text, QButtonGroup* parent, const char* name = 0)
+ PickLogFileRadio(TQPushButton* b, LineEdit* e, const TQString& text, TQButtonGroup* parent, const char* name = 0)
: PickFileRadio(b, e, text, parent, name) { }
- virtual QString pickFile() // called when browse button is pressed to select a log file
+ virtual TQString pickFile() // called when browse button is pressed to select a log file
{
- return KAlarm::browseFile(i18n("Choose Log File"), mDefaultDir, fileEdit()->text(), QString::null,
+ return KAlarm::browseFile(i18n("Choose Log File"), mDefaultDir, fileEdit()->text(), TQString::null,
KFile::LocalOnly, parentWidget(), "pickLogFile");
}
private:
- QString mDefaultDir; // default directory for log file browse button
+ TQString mDefaultDir; // default directory for log file browse button
};
-inline QString recurText(const KAEvent& event)
+inline TQString recurText(const KAEvent& event)
{
- QString r;
+ TQString r;
if (event.repeatCount())
- r = QString::fromLatin1("%1 / %2").arg(event.recurrenceText()).arg(event.repetitionText());
+ r = TQString::fromLatin1("%1 / %2").arg(event.recurrenceText()).arg(event.repetitionText());
else
r = event.recurrenceText();
return i18n("&Recurrence - [%1]").arg(r);
@@ -137,25 +137,25 @@ inline QString recurText(const KAEvent& event)
// Collect these widget labels together to ensure consistent wording and
// translations across different modules.
-QString EditAlarmDlg::i18n_ConfirmAck() { return i18n("Confirm acknowledgment"); }
-QString EditAlarmDlg::i18n_k_ConfirmAck() { return i18n("Confirm ac&knowledgment"); }
-QString EditAlarmDlg::i18n_SpecialActions() { return i18n("Special Actions..."); }
-QString EditAlarmDlg::i18n_ShowInKOrganizer() { return i18n("Show in KOrganizer"); }
-QString EditAlarmDlg::i18n_g_ShowInKOrganizer() { return i18n("Show in KOr&ganizer"); }
-QString EditAlarmDlg::i18n_EnterScript() { return i18n("Enter a script"); }
-QString EditAlarmDlg::i18n_p_EnterScript() { return i18n("Enter a scri&pt"); }
-QString EditAlarmDlg::i18n_ExecInTermWindow() { return i18n("Execute in terminal window"); }
-QString EditAlarmDlg::i18n_w_ExecInTermWindow() { return i18n("Execute in terminal &window"); }
-QString EditAlarmDlg::i18n_u_ExecInTermWindow() { return i18n("Exec&ute in terminal window"); }
-QString EditAlarmDlg::i18n_g_LogToFile() { return i18n("Lo&g to file"); }
-QString EditAlarmDlg::i18n_CopyEmailToSelf() { return i18n("Copy email to self"); }
-QString EditAlarmDlg::i18n_e_CopyEmailToSelf() { return i18n("Copy &email to self"); }
-QString EditAlarmDlg::i18n_s_CopyEmailToSelf() { return i18n("Copy email to &self"); }
-QString EditAlarmDlg::i18n_EmailFrom() { return i18n("'From' email address", "From:"); }
-QString EditAlarmDlg::i18n_f_EmailFrom() { return i18n("'From' email address", "&From:"); }
-QString EditAlarmDlg::i18n_EmailTo() { return i18n("Email addressee", "To:"); }
-QString EditAlarmDlg::i18n_EmailSubject() { return i18n("Email subject", "Subject:"); }
-QString EditAlarmDlg::i18n_j_EmailSubject() { return i18n("Email subject", "Sub&ject:"); }
+TQString EditAlarmDlg::i18n_ConfirmAck() { return i18n("Confirm acknowledgment"); }
+TQString EditAlarmDlg::i18n_k_ConfirmAck() { return i18n("Confirm ac&knowledgment"); }
+TQString EditAlarmDlg::i18n_SpecialActions() { return i18n("Special Actions..."); }
+TQString EditAlarmDlg::i18n_ShowInKOrganizer() { return i18n("Show in KOrganizer"); }
+TQString EditAlarmDlg::i18n_g_ShowInKOrganizer() { return i18n("Show in KOr&ganizer"); }
+TQString EditAlarmDlg::i18n_EnterScript() { return i18n("Enter a script"); }
+TQString EditAlarmDlg::i18n_p_EnterScript() { return i18n("Enter a scri&pt"); }
+TQString EditAlarmDlg::i18n_ExecInTermWindow() { return i18n("Execute in terminal window"); }
+TQString EditAlarmDlg::i18n_w_ExecInTermWindow() { return i18n("Execute in terminal &window"); }
+TQString EditAlarmDlg::i18n_u_ExecInTermWindow() { return i18n("Exec&ute in terminal window"); }
+TQString EditAlarmDlg::i18n_g_LogToFile() { return i18n("Lo&g to file"); }
+TQString EditAlarmDlg::i18n_CopyEmailToSelf() { return i18n("Copy email to self"); }
+TQString EditAlarmDlg::i18n_e_CopyEmailToSelf() { return i18n("Copy &email to self"); }
+TQString EditAlarmDlg::i18n_s_CopyEmailToSelf() { return i18n("Copy email to &self"); }
+TQString EditAlarmDlg::i18n_EmailFrom() { return i18n("'From' email address", "From:"); }
+TQString EditAlarmDlg::i18n_f_EmailFrom() { return i18n("'From' email address", "&From:"); }
+TQString EditAlarmDlg::i18n_EmailTo() { return i18n("Email addressee", "To:"); }
+TQString EditAlarmDlg::i18n_EmailSubject() { return i18n("Email subject", "Subject:"); }
+TQString EditAlarmDlg::i18n_j_EmailSubject() { return i18n("Email subject", "Sub&ject:"); }
/******************************************************************************
@@ -165,7 +165,7 @@ QString EditAlarmDlg::i18n_j_EmailSubject() { return i18n("Email subject", "
* = false to edit/create an alarm.
* event != to initialise the dialogue to show the specified event's data.
*/
-EditAlarmDlg::EditAlarmDlg(bool Template, const QString& caption, QWidget* parent, const char* name,
+EditAlarmDlg::EditAlarmDlg(bool Template, const TQString& caption, TQWidget* parent, const char* name,
const KAEvent* event, bool readOnly)
: KDialogBase(parent, (name ? name : Template ? "TemplEditDlg" : "EditDlg"), true, caption,
(readOnly ? Cancel|Try : Template ? Ok|Cancel|Try : Ok|Cancel|Try|Default),
@@ -188,56 +188,56 @@ EditAlarmDlg::EditAlarmDlg(bool Template, const QString& caption, QWidget* paren
mSavedEvent(0)
{
setButtonText(Default, i18n("Load Template..."));
- QVBox* mainWidget = new QVBox(this);
+ TQVBox* mainWidget = new TQVBox(this);
mainWidget->setSpacing(spacingHint());
setMainWidget(mainWidget);
if (mTemplate)
{
- QHBox* box = new QHBox(mainWidget);
+ TQHBox* box = new TQHBox(mainWidget);
box->setSpacing(spacingHint());
- QLabel* label = new QLabel(i18n("Template name:"), box);
+ TQLabel* label = new TQLabel(i18n("Template name:"), box);
label->setFixedSize(label->sizeHint());
- mTemplateName = new QLineEdit(box);
+ mTemplateName = new TQLineEdit(box);
mTemplateName->setReadOnly(mReadOnly);
label->setBuddy(mTemplateName);
- QWhatsThis::add(box, i18n("Enter the name of the alarm template"));
+ TQWhatsThis::add(box, i18n("Enter the name of the alarm template"));
box->setFixedHeight(box->sizeHint().height());
}
- mTabs = new QTabWidget(mainWidget);
+ mTabs = new TQTabWidget(mainWidget);
mTabs->setMargin(marginHint());
- QVBox* mainPageBox = new QVBox(mTabs);
+ TQVBox* mainPageBox = new TQVBox(mTabs);
mainPageBox->setSpacing(spacingHint());
mTabs->addTab(mainPageBox, i18n("&Alarm"));
mMainPageIndex = 0;
PageFrame* mainPage = new PageFrame(mainPageBox);
- connect(mainPage, SIGNAL(shown()), SLOT(slotShowMainPage()));
- QVBoxLayout* topLayout = new QVBoxLayout(mainPage, 0, spacingHint());
+ connect(mainPage, TQT_SIGNAL(shown()), TQT_SLOT(slotShowMainPage()));
+ TQVBoxLayout* topLayout = new TQVBoxLayout(mainPage, 0, spacingHint());
// Recurrence tab
- QVBox* recurTab = new QVBox(mTabs);
+ TQVBox* recurTab = new TQVBox(mTabs);
mainPageBox->setSpacing(spacingHint());
- mTabs->addTab(recurTab, QString::null);
+ mTabs->addTab(recurTab, TQString::null);
mRecurPageIndex = 1;
mRecurrenceEdit = new RecurrenceEdit(readOnly, recurTab, "recurPage");
- connect(mRecurrenceEdit, SIGNAL(shown()), SLOT(slotShowRecurrenceEdit()));
- connect(mRecurrenceEdit, SIGNAL(typeChanged(int)), SLOT(slotRecurTypeChange(int)));
- connect(mRecurrenceEdit, SIGNAL(frequencyChanged()), SLOT(slotRecurFrequencyChange()));
- connect(mRecurrenceEdit, SIGNAL(repeatNeedsInitialisation()), SLOT(slotSetSubRepetition()));
+ connect(mRecurrenceEdit, TQT_SIGNAL(shown()), TQT_SLOT(slotShowRecurrenceEdit()));
+ connect(mRecurrenceEdit, TQT_SIGNAL(typeChanged(int)), TQT_SLOT(slotRecurTypeChange(int)));
+ connect(mRecurrenceEdit, TQT_SIGNAL(frequencyChanged()), TQT_SLOT(slotRecurFrequencyChange()));
+ connect(mRecurrenceEdit, TQT_SIGNAL(repeatNeedsInitialisation()), TQT_SLOT(slotSetSubRepetition()));
// Alarm action
mActionGroup = new ButtonGroup(i18n("Action"), mainPage, "actionGroup");
- connect(mActionGroup, SIGNAL(buttonSet(int)), SLOT(slotAlarmTypeChanged(int)));
+ connect(mActionGroup, TQT_SIGNAL(buttonSet(int)), TQT_SLOT(slotAlarmTypeChanged(int)));
topLayout->addWidget(mActionGroup, 1);
- QBoxLayout* layout = new QVBoxLayout(mActionGroup, marginHint(), spacingHint());
+ TQBoxLayout* layout = new TQVBoxLayout(mActionGroup, marginHint(), spacingHint());
layout->addSpacing(fontMetrics().lineSpacing()/2);
- QGridLayout* grid = new QGridLayout(layout, 1, 5);
+ TQGridLayout* grid = new TQGridLayout(layout, 1, 5);
// Message radio button
mMessageRadio = new RadioButton(i18n("Te&xt"), mActionGroup, "messageButton");
mMessageRadio->setFixedSize(mMessageRadio->sizeHint());
- QWhatsThis::add(mMessageRadio,
+ TQWhatsThis::add(mMessageRadio,
i18n("If checked, the alarm will display a text message."));
grid->addWidget(mMessageRadio, 1, 0);
grid->setColStretch(1, 1);
@@ -245,7 +245,7 @@ EditAlarmDlg::EditAlarmDlg(bool Template, const QString& caption, QWidget* paren
// File radio button
mFileRadio = new PickAlarmFileRadio(i18n("&File"), mActionGroup, "fileButton");
mFileRadio->setFixedSize(mFileRadio->sizeHint());
- QWhatsThis::add(mFileRadio,
+ TQWhatsThis::add(mFileRadio,
i18n("If checked, the alarm will display the contents of a text or image file."));
grid->addWidget(mFileRadio, 1, 2);
grid->setColStretch(3, 1);
@@ -253,7 +253,7 @@ EditAlarmDlg::EditAlarmDlg(bool Template, const QString& caption, QWidget* paren
// Command radio button
mCommandRadio = new RadioButton(i18n("Co&mmand"), mActionGroup, "cmdButton");
mCommandRadio->setFixedSize(mCommandRadio->sizeHint());
- QWhatsThis::add(mCommandRadio,
+ TQWhatsThis::add(mCommandRadio,
i18n("If checked, the alarm will execute a shell command."));
grid->addWidget(mCommandRadio, 1, 4);
grid->setColStretch(5, 1);
@@ -261,7 +261,7 @@ EditAlarmDlg::EditAlarmDlg(bool Template, const QString& caption, QWidget* paren
// Email radio button
mEmailRadio = new RadioButton(i18n("&Email"), mActionGroup, "emailButton");
mEmailRadio->setFixedSize(mEmailRadio->sizeHint());
- QWhatsThis::add(mEmailRadio,
+ TQWhatsThis::add(mEmailRadio,
i18n("If checked, the alarm will send an email."));
grid->addWidget(mEmailRadio, 1, 6);
@@ -273,70 +273,70 @@ EditAlarmDlg::EditAlarmDlg(bool Template, const QString& caption, QWidget* paren
layout->addWidget(mEmailFrame);
// Deferred date/time: visible only for a deferred recurring event.
- mDeferGroup = new QGroupBox(1, Qt::Vertical, i18n("Deferred Alarm"), mainPage, "deferGroup");
+ mDeferGroup = new TQGroupBox(1, Qt::Vertical, i18n("Deferred Alarm"), mainPage, "deferGroup");
topLayout->addWidget(mDeferGroup);
- QLabel* label = new QLabel(i18n("Deferred to:"), mDeferGroup);
+ TQLabel* label = new TQLabel(i18n("Deferred to:"), mDeferGroup);
label->setFixedSize(label->sizeHint());
- mDeferTimeLabel = new QLabel(mDeferGroup);
+ mDeferTimeLabel = new TQLabel(mDeferGroup);
- mDeferChangeButton = new QPushButton(i18n("C&hange..."), mDeferGroup);
+ mDeferChangeButton = new TQPushButton(i18n("C&hange..."), mDeferGroup);
mDeferChangeButton->setFixedSize(mDeferChangeButton->sizeHint());
- connect(mDeferChangeButton, SIGNAL(clicked()), SLOT(slotEditDeferral()));
- QWhatsThis::add(mDeferChangeButton, i18n("Change the alarm's deferred time, or cancel the deferral"));
+ connect(mDeferChangeButton, TQT_SIGNAL(clicked()), TQT_SLOT(slotEditDeferral()));
+ TQWhatsThis::add(mDeferChangeButton, i18n("Change the alarm's deferred time, or cancel the deferral"));
mDeferGroup->addSpace(0);
- layout = new QHBoxLayout(topLayout);
+ layout = new TQHBoxLayout(topLayout);
// Date and time entry
if (mTemplate)
{
mTemplateTimeGroup = new ButtonGroup(i18n("Time"), mainPage, "templateGroup");
- connect(mTemplateTimeGroup, SIGNAL(buttonSet(int)), SLOT(slotTemplateTimeType(int)));
+ connect(mTemplateTimeGroup, TQT_SIGNAL(buttonSet(int)), TQT_SLOT(slotTemplateTimeType(int)));
layout->addWidget(mTemplateTimeGroup);
- grid = new QGridLayout(mTemplateTimeGroup, 2, 2, marginHint(), spacingHint());
+ grid = new TQGridLayout(mTemplateTimeGroup, 2, 2, marginHint(), spacingHint());
grid->addRowSpacing(0, fontMetrics().lineSpacing()/2);
- // Get alignment to use in QGridLayout (AlignAuto doesn't work correctly there)
- int alignment = QApplication::reverseLayout() ? Qt::AlignRight : Qt::AlignLeft;
+ // Get alignment to use in TQGridLayout (AlignAuto doesn't work correctly there)
+ int alignment = TQApplication::reverseLayout() ? Qt::AlignRight : Qt::AlignLeft;
mTemplateDefaultTime = new RadioButton(i18n("&Default time"), mTemplateTimeGroup, "templateDefTimeButton");
mTemplateDefaultTime->setFixedSize(mTemplateDefaultTime->sizeHint());
mTemplateDefaultTime->setReadOnly(mReadOnly);
- QWhatsThis::add(mTemplateDefaultTime,
+ TQWhatsThis::add(mTemplateDefaultTime,
i18n("Do not specify a start time for alarms based on this template. "
"The normal default start time will be used."));
grid->addWidget(mTemplateDefaultTime, 0, 0, alignment);
- QHBox* box = new QHBox(mTemplateTimeGroup);
+ TQHBox* box = new TQHBox(mTemplateTimeGroup);
box->setSpacing(spacingHint());
mTemplateUseTime = new RadioButton(i18n("Time:"), box, "templateTimeButton");
mTemplateUseTime->setFixedSize(mTemplateUseTime->sizeHint());
mTemplateUseTime->setReadOnly(mReadOnly);
- QWhatsThis::add(mTemplateUseTime,
+ TQWhatsThis::add(mTemplateUseTime,
i18n("Specify a start time for alarms based on this template."));
mTemplateTimeGroup->insert(mTemplateUseTime);
mTemplateTime = new TimeEdit(box, "templateTimeEdit");
mTemplateTime->setFixedSize(mTemplateTime->sizeHint());
mTemplateTime->setReadOnly(mReadOnly);
- QWhatsThis::add(mTemplateTime,
- QString("%1\n\n%2").arg(i18n("Enter the start time for alarms based on this template."))
+ TQWhatsThis::add(mTemplateTime,
+ TQString("%1\n\n%2").arg(i18n("Enter the start time for alarms based on this template."))
.arg(TimeSpinBox::shiftWhatsThis()));
- box->setStretchFactor(new QWidget(box), 1); // left adjust the controls
+ box->setStretchFactor(new TQWidget(box), 1); // left adjust the controls
box->setFixedHeight(box->sizeHint().height());
grid->addWidget(box, 0, 1, alignment);
mTemplateAnyTime = new RadioButton(i18n("An&y time"), mTemplateTimeGroup, "templateAnyTimeButton");
mTemplateAnyTime->setFixedSize(mTemplateAnyTime->sizeHint());
mTemplateAnyTime->setReadOnly(mReadOnly);
- QWhatsThis::add(mTemplateAnyTime,
+ TQWhatsThis::add(mTemplateAnyTime,
i18n("Set the '%1' option for alarms based on this template.").arg(i18n("Any time")));
grid->addWidget(mTemplateAnyTime, 1, 0, alignment);
- box = new QHBox(mTemplateTimeGroup);
+ box = new TQHBox(mTemplateTimeGroup);
box->setSpacing(spacingHint());
mTemplateUseTimeAfter = new RadioButton(AlarmTimeWidget::i18n_w_TimeFromNow(), box, "templateFromNowButton");
mTemplateUseTimeAfter->setFixedSize(mTemplateUseTimeAfter->sizeHint());
mTemplateUseTimeAfter->setReadOnly(mReadOnly);
- QWhatsThis::add(mTemplateUseTimeAfter,
+ TQWhatsThis::add(mTemplateUseTimeAfter,
i18n("Set alarms based on this template to start after the specified time "
"interval from when the alarm is created."));
mTemplateTimeGroup->insert(mTemplateUseTimeAfter);
@@ -344,8 +344,8 @@ EditAlarmDlg::EditAlarmDlg(bool Template, const QString& caption, QWidget* paren
mTemplateTimeAfter->setValue(1439);
mTemplateTimeAfter->setFixedSize(mTemplateTimeAfter->sizeHint());
mTemplateTimeAfter->setReadOnly(mReadOnly);
- QWhatsThis::add(mTemplateTimeAfter,
- QString("%1\n\n%2").arg(AlarmTimeWidget::i18n_TimeAfterPeriod())
+ TQWhatsThis::add(mTemplateTimeAfter,
+ TQString("%1\n\n%2").arg(AlarmTimeWidget::i18n_TimeAfterPeriod())
.arg(TimeSpinBox::shiftWhatsThis()));
box->setFixedHeight(box->sizeHint().height());
grid->addWidget(box, 1, 1, alignment);
@@ -355,15 +355,15 @@ EditAlarmDlg::EditAlarmDlg(bool Template, const QString& caption, QWidget* paren
else
{
mTimeWidget = new AlarmTimeWidget(i18n("Time"), AlarmTimeWidget::AT_TIME, mainPage, "timeGroup");
- connect(mTimeWidget, SIGNAL(anyTimeToggled(bool)), SLOT(slotAnyTimeToggled(bool)));
+ connect(mTimeWidget, TQT_SIGNAL(anyTimeToggled(bool)), TQT_SLOT(slotAnyTimeToggled(bool)));
topLayout->addWidget(mTimeWidget);
}
// Reminder
- static const QString reminderText = i18n("Enter how long in advance of the main alarm to display a reminder alarm.");
+ static const TQString reminderText = i18n("Enter how long in advance of the main alarm to display a reminder alarm.");
mReminder = new Reminder(i18n("Rem&inder:"),
i18n("Check to additionally display a reminder in advance of the main alarm time(s)."),
- QString("%1\n\n%2").arg(reminderText).arg(TimeSpinBox::shiftWhatsThis()),
+ TQString("%1\n\n%2").arg(reminderText).arg(TimeSpinBox::shiftWhatsThis()),
true, true, mainPage);
mReminder->setFixedSize(mReminder->sizeHint());
topLayout->addWidget(mReminder, 0, Qt::AlignAuto);
@@ -373,7 +373,7 @@ EditAlarmDlg::EditAlarmDlg(bool Template, const QString& caption, QWidget* paren
topLayout->addWidget(mLateCancel, 0, Qt::AlignAuto);
// Acknowledgement confirmation required - default = no confirmation
- layout = new QHBoxLayout(topLayout, 0);
+ layout = new TQHBoxLayout(topLayout, 0);
mConfirmAck = createConfirmAckCheckbox(mainPage);
mConfirmAck->setFixedSize(mConfirmAck->sizeHint());
layout->addWidget(mConfirmAck);
@@ -385,7 +385,7 @@ EditAlarmDlg::EditAlarmDlg(bool Template, const QString& caption, QWidget* paren
// Show in KOrganizer checkbox
mShowInKorganizer = new CheckBox(i18n_ShowInKOrganizer(), mainPage);
mShowInKorganizer->setFixedSize(mShowInKorganizer->sizeHint());
- QWhatsThis::add(mShowInKorganizer, i18n("Check to copy the alarm into KOrganizer's calendar"));
+ TQWhatsThis::add(mShowInKorganizer, i18n("Check to copy the alarm into KOrganizer's calendar"));
layout->addWidget(mShowInKorganizer);
}
@@ -414,31 +414,31 @@ EditAlarmDlg::~EditAlarmDlg()
/******************************************************************************
* Set up the dialog controls common to display alarms.
*/
-void EditAlarmDlg::initDisplayAlarms(QWidget* parent)
+void EditAlarmDlg::initDisplayAlarms(TQWidget* parent)
{
- mDisplayAlarmsFrame = new QFrame(parent);
- mDisplayAlarmsFrame->setFrameStyle(QFrame::NoFrame);
- QBoxLayout* frameLayout = new QVBoxLayout(mDisplayAlarmsFrame, 0, spacingHint());
+ mDisplayAlarmsFrame = new TQFrame(parent);
+ mDisplayAlarmsFrame->setFrameStyle(TQFrame::NoFrame);
+ TQBoxLayout* frameLayout = new TQVBoxLayout(mDisplayAlarmsFrame, 0, spacingHint());
// Text message edit box
mTextMessageEdit = new TextEdit(mDisplayAlarmsFrame);
mTextMessageEdit->setWordWrap(KTextEdit::NoWrap);
- QWhatsThis::add(mTextMessageEdit, i18n("Enter the text of the alarm message. It may be multi-line."));
+ TQWhatsThis::add(mTextMessageEdit, i18n("Enter the text of the alarm message. It may be multi-line."));
frameLayout->addWidget(mTextMessageEdit);
// File name edit box
- mFileBox = new QHBox(mDisplayAlarmsFrame);
+ mFileBox = new TQHBox(mDisplayAlarmsFrame);
frameLayout->addWidget(mFileBox);
mFileMessageEdit = new LineEdit(LineEdit::Url, mFileBox);
mFileMessageEdit->setAcceptDrops(true);
- QWhatsThis::add(mFileMessageEdit, i18n("Enter the name or URL of a text or image file to display."));
+ TQWhatsThis::add(mFileMessageEdit, i18n("Enter the name or URL of a text or image file to display."));
// File browse button
- mFileBrowseButton = new QPushButton(mFileBox);
+ mFileBrowseButton = new TQPushButton(mFileBox);
mFileBrowseButton->setPixmap(SmallIcon("fileopen"));
mFileBrowseButton->setFixedSize(mFileBrowseButton->sizeHint());
- QToolTip::add(mFileBrowseButton, i18n("Choose a file"));
- QWhatsThis::add(mFileBrowseButton, i18n("Select a text or image file to display."));
+ TQToolTip::add(mFileBrowseButton, i18n("Choose a file"));
+ TQWhatsThis::add(mFileBrowseButton, i18n("Select a text or image file to display."));
mFileRadio->init(mFileBrowseButton, mFileMessageEdit);
// Font and colour choice button and sample text
@@ -446,18 +446,18 @@ void EditAlarmDlg::initDisplayAlarms(QWidget* parent)
mFontColourButton->setMaximumHeight(mFontColourButton->sizeHint().height());
frameLayout->addWidget(mFontColourButton);
- QHBoxLayout* layout = new QHBoxLayout(frameLayout, 0, 0);
- mBgColourBox = new QHBox(mDisplayAlarmsFrame);
+ TQHBoxLayout* layout = new TQHBoxLayout(frameLayout, 0, 0);
+ mBgColourBox = new TQHBox(mDisplayAlarmsFrame);
mBgColourBox->setSpacing(spacingHint());
layout->addWidget(mBgColourBox);
layout->addStretch();
- QLabel* label = new QLabel(i18n("&Background color:"), mBgColourBox);
+ TQLabel* label = new TQLabel(i18n("&Background color:"), mBgColourBox);
mBgColourButton = new ColourCombo(mBgColourBox);
label->setBuddy(mBgColourButton);
- QWhatsThis::add(mBgColourBox, i18n("Select the alarm message background color"));
+ TQWhatsThis::add(mBgColourBox, i18n("Select the alarm message background color"));
// Sound checkbox and file selector
- layout = new QHBoxLayout(frameLayout);
+ layout = new TQHBoxLayout(frameLayout);
mSoundPicker = new SoundPicker(mDisplayAlarmsFrame);
mSoundPicker->setFixedSize(mSoundPicker->sizeHint());
layout->addWidget(mSoundPicker);
@@ -473,7 +473,7 @@ void EditAlarmDlg::initDisplayAlarms(QWidget* parent)
}
// Top-adjust the controls
- mFilePadding = new QHBox(mDisplayAlarmsFrame);
+ mFilePadding = new TQHBox(mDisplayAlarmsFrame);
frameLayout->addWidget(mFilePadding);
frameLayout->setStretchFactor(mFilePadding, 1);
}
@@ -481,60 +481,60 @@ void EditAlarmDlg::initDisplayAlarms(QWidget* parent)
/******************************************************************************
* Set up the command alarm dialog controls.
*/
-void EditAlarmDlg::initCommand(QWidget* parent)
+void EditAlarmDlg::initCommand(TQWidget* parent)
{
- mCommandFrame = new QFrame(parent);
- mCommandFrame->setFrameStyle(QFrame::NoFrame);
- QBoxLayout* frameLayout = new QVBoxLayout(mCommandFrame, 0, spacingHint());
+ mCommandFrame = new TQFrame(parent);
+ mCommandFrame->setFrameStyle(TQFrame::NoFrame);
+ TQBoxLayout* frameLayout = new TQVBoxLayout(mCommandFrame, 0, spacingHint());
mCmdTypeScript = new CheckBox(i18n_p_EnterScript(), mCommandFrame);
mCmdTypeScript->setFixedSize(mCmdTypeScript->sizeHint());
- connect(mCmdTypeScript, SIGNAL(toggled(bool)), SLOT(slotCmdScriptToggled(bool)));
- QWhatsThis::add(mCmdTypeScript, i18n("Check to enter the contents of a script instead of a shell command line"));
+ connect(mCmdTypeScript, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotCmdScriptToggled(bool)));
+ TQWhatsThis::add(mCmdTypeScript, i18n("Check to enter the contents of a script instead of a shell command line"));
frameLayout->addWidget(mCmdTypeScript, 0, Qt::AlignAuto);
mCmdCommandEdit = new LineEdit(LineEdit::Url, mCommandFrame);
- QWhatsThis::add(mCmdCommandEdit, i18n("Enter a shell command to execute."));
+ TQWhatsThis::add(mCmdCommandEdit, i18n("Enter a shell command to execute."));
frameLayout->addWidget(mCmdCommandEdit);
mCmdScriptEdit = new TextEdit(mCommandFrame);
- QWhatsThis::add(mCmdScriptEdit, i18n("Enter the contents of a script to execute"));
+ TQWhatsThis::add(mCmdScriptEdit, i18n("Enter the contents of a script to execute"));
frameLayout->addWidget(mCmdScriptEdit);
// What to do with command output
mCmdOutputGroup = new ButtonGroup(i18n("Command Output"), mCommandFrame);
frameLayout->addWidget(mCmdOutputGroup);
- QBoxLayout* layout = new QVBoxLayout(mCmdOutputGroup, marginHint(), spacingHint());
+ TQBoxLayout* layout = new TQVBoxLayout(mCmdOutputGroup, marginHint(), spacingHint());
layout->addSpacing(fontMetrics().lineSpacing()/2);
// Execute in terminal window
RadioButton* button = new RadioButton(i18n_u_ExecInTermWindow(), mCmdOutputGroup, "execInTerm");
button->setFixedSize(button->sizeHint());
- QWhatsThis::add(button, i18n("Check to execute the command in a terminal window"));
+ TQWhatsThis::add(button, i18n("Check to execute the command in a terminal window"));
mCmdOutputGroup->insert(button, EXEC_IN_TERMINAL);
layout->addWidget(button, 0, Qt::AlignAuto);
// Log file name edit box
- QHBox* box = new QHBox(mCmdOutputGroup);
- (new QWidget(box))->setFixedWidth(button->style().subRect(QStyle::SR_RadioButtonIndicator, button).width()); // indent the edit box
-// (new QWidget(box))->setFixedWidth(button->style().pixelMetric(QStyle::PM_ExclusiveIndicatorWidth)); // indent the edit box
+ TQHBox* box = new TQHBox(mCmdOutputGroup);
+ (new TQWidget(box))->setFixedWidth(button->style().subRect(TQStyle::SR_RadioButtonIndicator, button).width()); // indent the edit box
+// (new TQWidget(box))->setFixedWidth(button->style().pixelMetric(TQStyle::PM_ExclusiveIndicatorWidth)); // indent the edit box
mCmdLogFileEdit = new LineEdit(LineEdit::Url, box);
mCmdLogFileEdit->setAcceptDrops(true);
- QWhatsThis::add(mCmdLogFileEdit, i18n("Enter the name or path of the log file."));
+ TQWhatsThis::add(mCmdLogFileEdit, i18n("Enter the name or path of the log file."));
// Log file browse button.
// The file browser dialogue is activated by the PickLogFileRadio class.
- QPushButton* browseButton = new QPushButton(box);
+ TQPushButton* browseButton = new TQPushButton(box);
browseButton->setPixmap(SmallIcon("fileopen"));
browseButton->setFixedSize(browseButton->sizeHint());
- QToolTip::add(browseButton, i18n("Choose a file"));
- QWhatsThis::add(browseButton, i18n("Select a log file."));
+ TQToolTip::add(browseButton, i18n("Choose a file"));
+ TQWhatsThis::add(browseButton, i18n("Select a log file."));
// Log output to file
button = new PickLogFileRadio(browseButton, mCmdLogFileEdit, i18n_g_LogToFile(), mCmdOutputGroup, "cmdLog");
button->setFixedSize(button->sizeHint());
- QWhatsThis::add(button,
+ TQWhatsThis::add(button,
i18n("Check to log the command output to a local file. The output will be appended to any existing contents of the file."));
mCmdOutputGroup->insert(button, LOG_TO_FILE);
layout->addWidget(button, 0, Qt::AlignAuto);
@@ -543,12 +543,12 @@ void EditAlarmDlg::initCommand(QWidget* parent)
// Discard output
button = new RadioButton(i18n("Discard"), mCmdOutputGroup, "cmdDiscard");
button->setFixedSize(button->sizeHint());
- QWhatsThis::add(button, i18n("Check to discard command output."));
+ TQWhatsThis::add(button, i18n("Check to discard command output."));
mCmdOutputGroup->insert(button, DISCARD_OUTPUT);
layout->addWidget(button, 0, Qt::AlignAuto);
// Top-adjust the controls
- mCmdPadding = new QHBox(mCommandFrame);
+ mCmdPadding = new TQHBox(mCommandFrame);
frameLayout->addWidget(mCmdPadding);
frameLayout->setStretchFactor(mCmdPadding, 1);
}
@@ -556,98 +556,98 @@ void EditAlarmDlg::initCommand(QWidget* parent)
/******************************************************************************
* Set up the email alarm dialog controls.
*/
-void EditAlarmDlg::initEmail(QWidget* parent)
+void EditAlarmDlg::initEmail(TQWidget* parent)
{
- mEmailFrame = new QFrame(parent);
- mEmailFrame->setFrameStyle(QFrame::NoFrame);
- QBoxLayout* layout = new QVBoxLayout(mEmailFrame, 0, spacingHint());
- QGridLayout* grid = new QGridLayout(layout, 3, 3, spacingHint());
+ mEmailFrame = new TQFrame(parent);
+ mEmailFrame->setFrameStyle(TQFrame::NoFrame);
+ TQBoxLayout* layout = new TQVBoxLayout(mEmailFrame, 0, spacingHint());
+ TQGridLayout* grid = new TQGridLayout(layout, 3, 3, spacingHint());
grid->setColStretch(1, 1);
mEmailFromList = 0;
if (Preferences::emailFrom() == Preferences::MAIL_FROM_KMAIL)
{
// Email sender identity
- QLabel* label = new QLabel(i18n_EmailFrom(), mEmailFrame);
+ TQLabel* label = new TQLabel(i18n_EmailFrom(), mEmailFrame);
label->setFixedSize(label->sizeHint());
grid->addWidget(label, 0, 0);
mEmailFromList = new EmailIdCombo(KAMail::identityManager(), mEmailFrame);
mEmailFromList->setMinimumSize(mEmailFromList->sizeHint());
label->setBuddy(mEmailFromList);
- QWhatsThis::add(mEmailFromList,
+ TQWhatsThis::add(mEmailFromList,
i18n("Your email identity, used to identify you as the sender when sending email alarms."));
grid->addMultiCellWidget(mEmailFromList, 0, 0, 1, 2);
}
// Email recipients
- QLabel* label = new QLabel(i18n_EmailTo(), mEmailFrame);
+ TQLabel* label = new TQLabel(i18n_EmailTo(), mEmailFrame);
label->setFixedSize(label->sizeHint());
grid->addWidget(label, 1, 0);
mEmailToEdit = new LineEdit(LineEdit::Emails, mEmailFrame);
mEmailToEdit->setMinimumSize(mEmailToEdit->sizeHint());
- QWhatsThis::add(mEmailToEdit,
+ TQWhatsThis::add(mEmailToEdit,
i18n("Enter the addresses of the email recipients. Separate multiple addresses by "
"commas or semicolons."));
grid->addWidget(mEmailToEdit, 1, 1);
- mEmailAddressButton = new QPushButton(mEmailFrame);
+ mEmailAddressButton = new TQPushButton(mEmailFrame);
mEmailAddressButton->setPixmap(SmallIcon("contents"));
mEmailAddressButton->setFixedSize(mEmailAddressButton->sizeHint());
- connect(mEmailAddressButton, SIGNAL(clicked()), SLOT(openAddressBook()));
- QToolTip::add(mEmailAddressButton, i18n("Open address book"));
- QWhatsThis::add(mEmailAddressButton, i18n("Select email addresses from your address book."));
+ connect(mEmailAddressButton, TQT_SIGNAL(clicked()), TQT_SLOT(openAddressBook()));
+ TQToolTip::add(mEmailAddressButton, i18n("Open address book"));
+ TQWhatsThis::add(mEmailAddressButton, i18n("Select email addresses from your address book."));
grid->addWidget(mEmailAddressButton, 1, 2);
// Email subject
- label = new QLabel(i18n_j_EmailSubject(), mEmailFrame);
+ label = new TQLabel(i18n_j_EmailSubject(), mEmailFrame);
label->setFixedSize(label->sizeHint());
grid->addWidget(label, 2, 0);
mEmailSubjectEdit = new LineEdit(mEmailFrame);
mEmailSubjectEdit->setMinimumSize(mEmailSubjectEdit->sizeHint());
label->setBuddy(mEmailSubjectEdit);
- QWhatsThis::add(mEmailSubjectEdit, i18n("Enter the email subject."));
+ TQWhatsThis::add(mEmailSubjectEdit, i18n("Enter the email subject."));
grid->addMultiCellWidget(mEmailSubjectEdit, 2, 2, 1, 2);
// Email body
mEmailMessageEdit = new TextEdit(mEmailFrame);
- QWhatsThis::add(mEmailMessageEdit, i18n("Enter the email message."));
+ TQWhatsThis::add(mEmailMessageEdit, i18n("Enter the email message."));
layout->addWidget(mEmailMessageEdit);
// Email attachments
- grid = new QGridLayout(layout, 2, 3, spacingHint());
- label = new QLabel(i18n("Attachment&s:"), mEmailFrame);
+ grid = new TQGridLayout(layout, 2, 3, spacingHint());
+ label = new TQLabel(i18n("Attachment&s:"), mEmailFrame);
label->setFixedSize(label->sizeHint());
grid->addWidget(label, 0, 0);
- mEmailAttachList = new QComboBox(true, mEmailFrame);
+ mEmailAttachList = new TQComboBox(true, mEmailFrame);
mEmailAttachList->setMinimumSize(mEmailAttachList->sizeHint());
mEmailAttachList->lineEdit()->setReadOnly(true);
-QListBox* list = mEmailAttachList->listBox();
-QRect rect = list->geometry();
+TQListBox* list = mEmailAttachList->listBox();
+TQRect rect = list->geometry();
list->setGeometry(rect.left() - 50, rect.top(), rect.width(), rect.height());
label->setBuddy(mEmailAttachList);
- QWhatsThis::add(mEmailAttachList,
+ TQWhatsThis::add(mEmailAttachList,
i18n("Files to send as attachments to the email."));
grid->addWidget(mEmailAttachList, 0, 1);
grid->setColStretch(1, 1);
- mEmailAddAttachButton = new QPushButton(i18n("Add..."), mEmailFrame);
- connect(mEmailAddAttachButton, SIGNAL(clicked()), SLOT(slotAddAttachment()));
- QWhatsThis::add(mEmailAddAttachButton, i18n("Add an attachment to the email."));
+ mEmailAddAttachButton = new TQPushButton(i18n("Add..."), mEmailFrame);
+ connect(mEmailAddAttachButton, TQT_SIGNAL(clicked()), TQT_SLOT(slotAddAttachment()));
+ TQWhatsThis::add(mEmailAddAttachButton, i18n("Add an attachment to the email."));
grid->addWidget(mEmailAddAttachButton, 0, 2);
- mEmailRemoveButton = new QPushButton(i18n("Remo&ve"), mEmailFrame);
- connect(mEmailRemoveButton, SIGNAL(clicked()), SLOT(slotRemoveAttachment()));
- QWhatsThis::add(mEmailRemoveButton, i18n("Remove the highlighted attachment from the email."));
+ mEmailRemoveButton = new TQPushButton(i18n("Remo&ve"), mEmailFrame);
+ connect(mEmailRemoveButton, TQT_SIGNAL(clicked()), TQT_SLOT(slotRemoveAttachment()));
+ TQWhatsThis::add(mEmailRemoveButton, i18n("Remove the highlighted attachment from the email."));
grid->addWidget(mEmailRemoveButton, 1, 2);
// BCC email to sender
mEmailBcc = new CheckBox(i18n_s_CopyEmailToSelf(), mEmailFrame);
mEmailBcc->setFixedSize(mEmailBcc->sizeHint());
- QWhatsThis::add(mEmailBcc,
+ TQWhatsThis::add(mEmailBcc,
i18n("If checked, the email will be blind copied to you."));
grid->addMultiCellWidget(mEmailBcc, 1, 1, 0, 1, Qt::AlignAuto);
}
@@ -708,7 +708,7 @@ void EditAlarmDlg::initialise(const KAEvent* event)
if (event->isTemplate())
{
// Initialising from an alarm template: use current date
- QDateTime now = QDateTime::currentDateTime();
+ TQDateTime now = TQDateTime::currentDateTime();
int afterTime = event->templateAfterTime();
if (afterTime >= 0)
{
@@ -717,12 +717,12 @@ void EditAlarmDlg::initialise(const KAEvent* event)
}
else
{
- QDate d = now.date();
- QTime t = event->startDateTime().time();
+ TQDate d = now.date();
+ TQTime t = event->startDateTime().time();
bool dateOnly = event->startDateTime().isDateOnly();
if (!dateOnly && now.time() >= t)
d = d.addDays(1); // alarm time has already passed, so use tomorrow
- mTimeWidget->setDateTime(DateTime(QDateTime(d, t), dateOnly));
+ mTimeWidget->setDateTime(DateTime(TQDateTime(d, t), dateOnly));
}
}
else
@@ -804,7 +804,7 @@ void EditAlarmDlg::initialise(const KAEvent* event)
mFontColourButton->setBgColour(Preferences::defaultBgColour());
mFontColourButton->setFgColour(Preferences::defaultFgColour());
mBgColourButton->setColour(Preferences::defaultBgColour());
- QDateTime defaultTime = QDateTime::currentDateTime().addSecs(60);
+ TQDateTime defaultTime = TQDateTime::currentDateTime().addSecs(60);
if (mTemplate)
{
mTemplateTimeGroup->setButton(mTemplateTimeGroup->id(mTemplateDefaultTime));
@@ -922,9 +922,9 @@ void EditAlarmDlg::setReadOnly()
*/
void EditAlarmDlg::setAction(KAEvent::Action action, const AlarmText& alarmText)
{
- QString text = alarmText.displayText();
+ TQString text = alarmText.displayText();
bool script;
- QRadioButton* radio;
+ TQRadioButton* radio;
switch (action)
{
case KAEvent::FILE:
@@ -972,10 +972,10 @@ void EditAlarmDlg::setAction(KAEvent::Action action, const AlarmText& alarmText)
/******************************************************************************
* Create an "acknowledgement confirmation required" checkbox.
*/
-CheckBox* EditAlarmDlg::createConfirmAckCheckbox(QWidget* parent, const char* name)
+CheckBox* EditAlarmDlg::createConfirmAckCheckbox(TQWidget* parent, const char* name)
{
CheckBox* widget = new CheckBox(i18n_k_ConfirmAck(), parent, name);
- QWhatsThis::add(widget,
+ TQWhatsThis::add(widget,
i18n("Check to be prompted for confirmation when you acknowledge the alarm."));
return widget;
}
@@ -1046,7 +1046,7 @@ bool EditAlarmDlg::stateChanged() const
mOnlyDeferred = false;
if (!mSavedEvent)
return true;
- QString textFileCommandMessage;
+ TQString textFileCommandMessage;
checkText(textFileCommandMessage, false);
if (mTemplate)
{
@@ -1111,7 +1111,7 @@ bool EditAlarmDlg::stateChanged() const
}
else if (mEmailRadio->isOn())
{
- QStringList emailAttach;
+ TQStringList emailAttach;
for (int i = 0; i < mEmailAttachList->count(); ++i)
emailAttach += mEmailAttachList->text(i);
if (mEmailFromList && mSavedEmailFrom != mEmailFromList->currentIdentityName()
@@ -1162,15 +1162,15 @@ bool EditAlarmDlg::getEvent(KAEvent& event)
* If 'trial' is true, the event is set up for a simple one-off test, ignoring
* recurrence, reminder, template etc. data.
*/
-void EditAlarmDlg::setEvent(KAEvent& event, const QString& text, bool trial)
+void EditAlarmDlg::setEvent(KAEvent& event, const TQString& text, bool trial)
{
- QDateTime dt;
+ TQDateTime dt;
if (!trial)
{
if (!mTemplate)
dt = mAlarmDateTime.dateTime();
else if (mTemplateUseTime->isOn())
- dt = QDateTime(QDate(2000,1,1), mTemplateTime->time());
+ dt = TQDateTime(TQDate(2000,1,1), mTemplateTime->time());
}
KAEvent::Action type = getAlarmType();
event.set(dt, text, (mFileRadio->isOn() ? mBgColourButton->colour() : mFontColourButton->bgColour()),
@@ -1212,7 +1212,7 @@ void EditAlarmDlg::setEvent(KAEvent& event, const QString& text, bool trial)
if (mRecurrenceEdit->repeatType() != RecurrenceEdit::NO_RECUR)
{
mRecurrenceEdit->updateEvent(event, !mTemplate);
- QDateTime now = QDateTime::currentDateTime();
+ TQDateTime now = TQDateTime::currentDateTime();
bool dateOnly = mAlarmDateTime.isDateOnly();
if (dateOnly && mAlarmDateTime.date() < now.date()
|| !dateOnly && mAlarmDateTime.rawDateTime() < now)
@@ -1232,7 +1232,7 @@ void EditAlarmDlg::setEvent(KAEvent& event, const QString& text, bool trial)
DateTime remindTime = mAlarmDateTime.addMins(-reminder);
if (mDeferDateTime >= remindTime)
{
- if (remindTime > QDateTime::currentDateTime())
+ if (remindTime > TQDateTime::currentDateTime())
deferral = false; // ignore deferral if it's after next reminder
else if (mDeferDateTime > remindTime)
deferReminder = true; // it's the reminder which is being deferred
@@ -1289,12 +1289,12 @@ KAEvent::Action EditAlarmDlg::getAlarmType() const
* The first time through, sets the size to the same as the last time it was
* displayed.
*/
-void EditAlarmDlg::showEvent(QShowEvent* se)
+void EditAlarmDlg::showEvent(TQShowEvent* se)
{
if (!mDeferGroupHeight)
{
mDeferGroupHeight = mDeferGroup->height() + spacingHint();
- QSize s;
+ TQSize s;
if (KAlarm::readConfigWindowSize(EDIT_DIALOG_NAME, s))
s.setHeight(s.height() + (mDeferGroup->isHidden() ? 0 : mDeferGroupHeight));
else
@@ -1310,11 +1310,11 @@ void EditAlarmDlg::showEvent(QShowEvent* se)
* Records the new size (adjusted to ignore the optional height of the deferred
* time edit widget) in the config file.
*/
-void EditAlarmDlg::resizeEvent(QResizeEvent* re)
+void EditAlarmDlg::resizeEvent(TQResizeEvent* re)
{
if (isVisible())
{
- QSize s = re->size();
+ TQSize s = re->size();
s.setHeight(s.height() - (mDeferGroup->isHidden() ? 0 : mDeferGroupHeight));
KAlarm::writeConfigWindowSize(EDIT_DIALOG_NAME, s);
}
@@ -1344,8 +1344,8 @@ void EditAlarmDlg::slotOk()
if (mTemplate)
{
// Check that the template name is not blank and is unique
- QString errmsg;
- QString name = mTemplateName->text();
+ TQString errmsg;
+ TQString name = mTemplateName->text();
if (name.isEmpty())
errmsg = i18n("You must enter a name for the alarm template");
else if (name != mSavedTemplateName)
@@ -1363,7 +1363,7 @@ void EditAlarmDlg::slotOk()
}
else
{
- QWidget* errWidget;
+ TQWidget* errWidget;
mAlarmDateTime = mTimeWidget->getDateTime(0, !timedRecurrence, false, &errWidget);
if (errWidget)
{
@@ -1381,7 +1381,7 @@ void EditAlarmDlg::slotOk()
{
if (timedRecurrence)
{
- QDateTime now = QDateTime::currentDateTime();
+ TQDateTime now = TQDateTime::currentDateTime();
if (mAlarmDateTime.date() < now.date()
|| mAlarmDateTime.date() == now.date()
&& !mAlarmDateTime.isDateOnly() && mAlarmDateTime.time() < now.time())
@@ -1400,8 +1400,8 @@ void EditAlarmDlg::slotOk()
}
}
}
- QString errmsg;
- QWidget* errWidget = mRecurrenceEdit->checkData(mAlarmDateTime.dateTime(), errmsg);
+ TQString errmsg;
+ TQWidget* errWidget = mRecurrenceEdit->checkData(mAlarmDateTime.dateTime(), errmsg);
if (errWidget)
{
mTabs->setCurrentPage(mRecurPageIndex);
@@ -1461,7 +1461,7 @@ void EditAlarmDlg::slotOk()
*/
void EditAlarmDlg::slotTry()
{
- QString text;
+ TQString text;
if (checkText(text))
{
if (mEmailRadio->isOn())
@@ -1484,7 +1484,7 @@ void EditAlarmDlg::slotTry()
}
else if (mEmailRadio->isOn())
{
- QString bcc;
+ TQString bcc;
if (mEmailBcc->isChecked())
bcc = i18n("\nBcc: %1").arg(Preferences::emailBccAddress());
KMessageBox::information(this, i18n("Email sent to:\n%1%2").arg(mEmailAddresses.join("\n")).arg(bcc));
@@ -1508,7 +1508,7 @@ void EditAlarmDlg::slotCancel()
void EditAlarmDlg::slotDefault()
{
TemplatePickDlg dlg(this, "templPickDlg");
- if (dlg.exec() == QDialog::Accepted)
+ if (dlg.exec() == TQDialog::Accepted)
initialise(dlg.selectedTemplate());
}
@@ -1530,7 +1530,7 @@ void EditAlarmDlg::slotEditDeferral()
return;
limit = false;
}
- QDateTime now = QDateTime::currentDateTime();
+ TQDateTime now = TQDateTime::currentDateTime();
if (limit)
{
if (repeatCount && start < now)
@@ -1557,15 +1557,15 @@ void EditAlarmDlg::slotEditDeferral()
if (reminder)
{
DateTime remindTime = start.addMins(-reminder);
- if (QDateTime::currentDateTime() < remindTime)
+ if (TQDateTime::currentDateTime() < remindTime)
start = remindTime;
}
deferDlg.setLimit(start.addSecs(-60));
}
- if (deferDlg.exec() == QDialog::Accepted)
+ if (deferDlg.exec() == TQDialog::Accepted)
{
mDeferDateTime = deferDlg.getDateTime();
- mDeferTimeLabel->setText(mDeferDateTime.isValid() ? mDeferDateTime.formatLocale() : QString::null);
+ mDeferTimeLabel->setText(mDeferDateTime.isValid() ? mDeferDateTime.formatLocale() : TQString::null);
}
}
@@ -1604,7 +1604,7 @@ void EditAlarmDlg::slotShowRecurrenceEdit()
mRecurPageIndex = mTabs->currentPageIndex();
if (!mReadOnly && !mTemplate)
{
- QDateTime now = QDateTime::currentDateTime();
+ TQDateTime now = TQDateTime::currentDateTime();
mAlarmDateTime = mTimeWidget->getDateTime(0, false, false);
bool expired = (mAlarmDateTime.dateTime() < now);
if (mRecurSetDefaultEndDate)
@@ -1682,9 +1682,9 @@ bool EditAlarmDlg::checkCommandData()
if (mCommandRadio->isOn() && mCmdOutputGroup->selectedId() == LOG_TO_FILE)
{
// Validate the log file name
- QString file = mCmdLogFileEdit->text();
- QFileInfo info(file);
- QDir::setCurrent(QDir::homeDirPath());
+ TQString file = mCmdLogFileEdit->text();
+ TQFileInfo info(file);
+ TQDir::setCurrent(TQDir::homeDirPath());
bool err = file.isEmpty() || info.isDir();
if (!err)
{
@@ -1694,7 +1694,7 @@ bool EditAlarmDlg::checkCommandData()
}
else
{
- QFileInfo dirinfo(info.dirPath(true)); // get absolute directory path
+ TQFileInfo dirinfo(info.dirPath(true)); // get absolute directory path
err = (!dirinfo.isDir() || !dirinfo.isWritable());
}
}
@@ -1719,12 +1719,12 @@ bool EditAlarmDlg::checkEmailData()
{
if (mEmailRadio->isOn())
{
- QString addrs = mEmailToEdit->text();
+ TQString addrs = mEmailToEdit->text();
if (addrs.isEmpty())
mEmailAddresses.clear();
else
{
- QString bad = KAMail::convertAddresses(addrs, mEmailAddresses);
+ TQString bad = KAMail::convertAddresses(addrs, mEmailAddresses);
if (!bad.isEmpty())
{
mEmailToEdit->setFocus();
@@ -1742,7 +1742,7 @@ bool EditAlarmDlg::checkEmailData()
mEmailAttachments.clear();
for (int i = 0; i < mEmailAttachList->count(); ++i)
{
- QString att = mEmailAttachList->text(i);
+ TQString att = mEmailAttachList->text(i);
switch (KAMail::checkAttachment(att))
{
case 1:
@@ -1767,7 +1767,7 @@ bool EditAlarmDlg::checkEmailData()
void EditAlarmDlg::slotAlarmTypeChanged(int)
{
bool displayAlarm = false;
- QWidget* focus = 0;
+ TQWidget* focus = 0;
if (mMessageRadio->isOn())
{
mFileBox->hide();
@@ -1883,7 +1883,7 @@ void EditAlarmDlg::openAddressBook()
if (a.isEmpty())
return;
Person person(a.realName(), a.preferredEmail());
- QString addrs = mEmailToEdit->text().stripWhiteSpace();
+ TQString addrs = mEmailToEdit->text().stripWhiteSpace();
if (!addrs.isEmpty())
addrs += ", ";
addrs += person.fullName();
@@ -1895,8 +1895,8 @@ void EditAlarmDlg::openAddressBook()
*/
void EditAlarmDlg::slotAddAttachment()
{
- QString url = KAlarm::browseFile(i18n("Choose File to Attach"), mAttachDefaultDir, QString::null,
- QString::null, KFile::ExistingOnly, this, "pickAttachFile");
+ TQString url = KAlarm::browseFile(i18n("Choose File to Attach"), mAttachDefaultDir, TQString::null,
+ TQString::null, KFile::ExistingOnly, this, "pickAttachFile");
if (!url.isEmpty())
{
mEmailAttachList->insertItem(url);
@@ -1926,7 +1926,7 @@ void EditAlarmDlg::slotRemoveAttachment()
/******************************************************************************
* Clean up the alarm text, and if it's a file, check whether it's valid.
*/
-bool EditAlarmDlg::checkText(QString& result, bool showErrorMessage) const
+bool EditAlarmDlg::checkText(TQString& result, bool showErrorMessage) const
{
if (mMessageRadio->isOn())
result = mTextMessageEdit->text();
@@ -1942,13 +1942,13 @@ bool EditAlarmDlg::checkText(QString& result, bool showErrorMessage) const
}
else if (mFileRadio->isOn())
{
- QString alarmtext = mFileMessageEdit->text().stripWhiteSpace();
+ TQString alarmtext = mFileMessageEdit->text().stripWhiteSpace();
// Convert any relative file path to absolute
// (using home directory as the default)
enum Err { NONE = 0, BLANK, NONEXISTENT, DIRECTORY, UNREADABLE, NOT_TEXT_IMAGE };
Err err = NONE;
KURL url;
- int i = alarmtext.find(QString::fromLatin1("/"));
+ int i = alarmtext.find(TQString::fromLatin1("/"));
if (i > 0 && alarmtext[i - 1] == ':')
{
url = alarmtext;
@@ -1969,11 +1969,11 @@ bool EditAlarmDlg::checkText(QString& result, bool showErrorMessage) const
else
{
// It's a local file - convert to absolute path & check validity
- QFileInfo info(alarmtext);
- QDir::setCurrent(QDir::homeDirPath());
+ TQFileInfo info(alarmtext);
+ TQDir::setCurrent(TQDir::homeDirPath());
alarmtext = info.absFilePath();
url.setPath(alarmtext);
- alarmtext = QString::fromLatin1("file:") + alarmtext;
+ alarmtext = TQString::fromLatin1("file:") + alarmtext;
if (!err)
{
if (info.isDir()) err = DIRECTORY;
@@ -1998,7 +1998,7 @@ bool EditAlarmDlg::checkText(QString& result, bool showErrorMessage) const
if (err && showErrorMessage)
{
mFileMessageEdit->setFocus();
- QString errmsg;
+ TQString errmsg;
switch (err)
{
case BLANK:
@@ -2027,15 +2027,15 @@ bool EditAlarmDlg::checkText(QString& result, bool showErrorMessage) const
= A text edit field with a minimum height of 3 text lines.
= Provides KDE 2 compatibility.
=============================================================================*/
-TextEdit::TextEdit(QWidget* parent, const char* name)
+TextEdit::TextEdit(TQWidget* parent, const char* name)
: KTextEdit(parent, name)
{
- QSize tsize = sizeHint();
+ TQSize tsize = sizeHint();
tsize.setHeight(fontMetrics().lineSpacing()*13/4 + 2*frameWidth());
setMinimumSize(tsize);
}
-void TextEdit::dragEnterEvent(QDragEnterEvent* e)
+void TextEdit::dragEnterEvent(TQDragEnterEvent* e)
{
if (KCal::ICalDrag::canDecode(e))
e->accept(false); // don't accept "text/calendar" objects
diff --git a/kalarm/editdlg.h b/kalarm/editdlg.h
index 8a8f40ce9..069e873f4 100644
--- a/kalarm/editdlg.h
+++ b/kalarm/editdlg.h
@@ -21,8 +21,8 @@
#ifndef EDITDLG_H
#define EDITDLG_H
-#include <qdatetime.h>
-#include <qlineedit.h>
+#include <tqdatetime.h>
+#include <tqlineedit.h>
#include <kdialogbase.h>
@@ -62,37 +62,37 @@ class EditAlarmDlg : public KDialogBase
enum MessageType { MESSAGE, FILE };
enum CmdLogType { DISCARD_OUTPUT, LOG_TO_FILE, EXEC_IN_TERMINAL };
- EditAlarmDlg(bool Template, const QString& caption, QWidget* parent = 0, const char* name = 0,
+ EditAlarmDlg(bool Template, const TQString& caption, TQWidget* parent = 0, const char* name = 0,
const KAEvent* = 0, bool readOnly = false);
virtual ~EditAlarmDlg();
bool getEvent(KAEvent&);
void setAction(KAEvent::Action, const AlarmText& = AlarmText());
- static CheckBox* createConfirmAckCheckbox(QWidget* parent, const char* name = 0);
+ static CheckBox* createConfirmAckCheckbox(TQWidget* parent, const char* name = 0);
- static QString i18n_ConfirmAck(); // plain text of 'Confirm acknowledgement' checkbox
- static QString i18n_k_ConfirmAck(); // text of 'Confirm acknowledgement' checkbox, with 'k' shortcut
- static QString i18n_SpecialActions(); // plain text of 'Special Actions...' button
- static QString i18n_ShowInKOrganizer(); // plain text of 'Show in KOrganizer' checkbox
- static QString i18n_g_ShowInKOrganizer(); // text of 'Show in KOrganizer' checkbox, with 'G' shortcut
- static QString i18n_EnterScript(); // plain text of 'Enter a script' checkbox
- static QString i18n_p_EnterScript(); // text of 'Enter a script' checkbox, with 'P' shortcut
- static QString i18n_ExecInTermWindow(); // plain text of 'Execute in terminal window' checkbox
- static QString i18n_w_ExecInTermWindow(); // text of 'Execute in terminal window' radio button, with 'W' shortcut
- static QString i18n_u_ExecInTermWindow(); // text of 'Execute in terminal window' radio button, with 'U' shortcut
- static QString i18n_g_LogToFile(); // text of 'Log to file' radio button, with 'G' shortcut
- static QString i18n_CopyEmailToSelf(); // plain text of 'Copy email to self' checkbox
- static QString i18n_e_CopyEmailToSelf(); // text of 'Copy email to self' checkbox, with 'E' shortcut
- static QString i18n_s_CopyEmailToSelf(); // text of 'Copy email to self' checkbox, with 'S' shortcut
- static QString i18n_EmailFrom(); // plain text of 'From:' (email address)
- static QString i18n_f_EmailFrom(); // text of 'From:' (email address), with 'F' shortcut
- static QString i18n_EmailTo(); // plain text of 'To:' (email addressee)
- static QString i18n_EmailSubject(); // plain text of 'Subject:' (email)
- static QString i18n_j_EmailSubject(); // text of 'Subject:' (email), with 'J' shortcut
+ static TQString i18n_ConfirmAck(); // plain text of 'Confirm acknowledgement' checkbox
+ static TQString i18n_k_ConfirmAck(); // text of 'Confirm acknowledgement' checkbox, with 'k' shortcut
+ static TQString i18n_SpecialActions(); // plain text of 'Special Actions...' button
+ static TQString i18n_ShowInKOrganizer(); // plain text of 'Show in KOrganizer' checkbox
+ static TQString i18n_g_ShowInKOrganizer(); // text of 'Show in KOrganizer' checkbox, with 'G' shortcut
+ static TQString i18n_EnterScript(); // plain text of 'Enter a script' checkbox
+ static TQString i18n_p_EnterScript(); // text of 'Enter a script' checkbox, with 'P' shortcut
+ static TQString i18n_ExecInTermWindow(); // plain text of 'Execute in terminal window' checkbox
+ static TQString i18n_w_ExecInTermWindow(); // text of 'Execute in terminal window' radio button, with 'W' shortcut
+ static TQString i18n_u_ExecInTermWindow(); // text of 'Execute in terminal window' radio button, with 'U' shortcut
+ static TQString i18n_g_LogToFile(); // text of 'Log to file' radio button, with 'G' shortcut
+ static TQString i18n_CopyEmailToSelf(); // plain text of 'Copy email to self' checkbox
+ static TQString i18n_e_CopyEmailToSelf(); // text of 'Copy email to self' checkbox, with 'E' shortcut
+ static TQString i18n_s_CopyEmailToSelf(); // text of 'Copy email to self' checkbox, with 'S' shortcut
+ static TQString i18n_EmailFrom(); // plain text of 'From:' (email address)
+ static TQString i18n_f_EmailFrom(); // text of 'From:' (email address), with 'F' shortcut
+ static TQString i18n_EmailTo(); // plain text of 'To:' (email addressee)
+ static TQString i18n_EmailSubject(); // plain text of 'Subject:' (email)
+ static TQString i18n_j_EmailSubject(); // text of 'Subject:' (email), with 'J' shortcut
protected:
- virtual void resizeEvent(QResizeEvent*);
- virtual void showEvent(QShowEvent*);
+ virtual void resizeEvent(TQResizeEvent*);
+ virtual void showEvent(TQShowEvent*);
protected slots:
virtual void slotOk();
virtual void slotCancel();
@@ -116,22 +116,22 @@ class EditAlarmDlg : public KDialogBase
private:
void initialise(const KAEvent*);
void setReadOnly();
- void setEvent(KAEvent&, const QString& text, bool trial);
+ void setEvent(KAEvent&, const TQString& text, bool trial);
KAEvent::Action getAlarmType() const;
int getAlarmFlags() const;
- bool checkText(QString& result, bool showErrorMessage = true) const;
+ bool checkText(TQString& result, bool showErrorMessage = true) const;
void setSoundPicker();
void setRecurTabTitle(const KAEvent* = 0);
bool checkCommandData();
bool checkEmailData();
- void initDisplayAlarms(QWidget* parent);
- void initCommand(QWidget* parent);
- void initEmail(QWidget* parent);
+ void initDisplayAlarms(TQWidget* parent);
+ void initCommand(TQWidget* parent);
+ void initEmail(TQWidget* parent);
void saveState(const KAEvent*);
bool stateChanged() const;
- QTabWidget* mTabs; // the tabs in the dialog
+ TQTabWidget* mTabs; // the tabs in the dialog
int mMainPageIndex;
int mRecurPageIndex;
bool mMainPageShown; // true once the main tab has been displayed
@@ -143,10 +143,10 @@ class EditAlarmDlg : public KDialogBase
RadioButton* mCommandRadio;
PickAlarmFileRadio* mFileRadio;
RadioButton* mEmailRadio;
- QWidgetStack* mAlarmTypeStack;
+ TQWidgetStack* mAlarmTypeStack;
// Templates
- QLineEdit* mTemplateName;
+ TQLineEdit* mTemplateName;
ButtonGroup* mTemplateTimeGroup;
RadioButton* mTemplateDefaultTime; // no alarm time is specified
RadioButton* mTemplateUseTimeAfter;// alarm time is specified as an offset from current
@@ -156,14 +156,14 @@ class EditAlarmDlg : public KDialogBase
TimeEdit* mTemplateTime; // the alarm time which is specified
// Display alarm options widgets
- QFrame* mDisplayAlarmsFrame;
- QHBox* mFileBox;
- QHBox* mFilePadding;
+ TQFrame* mDisplayAlarmsFrame;
+ TQHBox* mFileBox;
+ TQHBox* mFilePadding;
SoundPicker* mSoundPicker;
CheckBox* mConfirmAck;
FontColourButton* mFontColourButton; // for text display option
ColourCombo* mBgColourButton; // for file display option
- QHBox* mBgColourBox;
+ TQHBox* mBgColourBox;
SpecialActionsButton* mSpecialActionsButton;
Reminder* mReminder;
bool mReminderDeferral;
@@ -172,32 +172,32 @@ class EditAlarmDlg : public KDialogBase
TextEdit* mTextMessageEdit; // text message edit box
// Text file alarm widgets
LineEdit* mFileMessageEdit; // text file URL edit box
- QPushButton* mFileBrowseButton; // text file browse button
- QString mFileDefaultDir; // default directory for browse button
+ TQPushButton* mFileBrowseButton; // text file browse button
+ TQString mFileDefaultDir; // default directory for browse button
// Command alarm widgets
- QFrame* mCommandFrame;
+ TQFrame* mCommandFrame;
CheckBox* mCmdTypeScript; // entering a script
LineEdit* mCmdCommandEdit; // command line edit box
TextEdit* mCmdScriptEdit; // script edit box
ButtonGroup* mCmdOutputGroup; // what to do with command output
LineEdit* mCmdLogFileEdit; // log file URL edit box
- QWidget* mCmdPadding;
+ TQWidget* mCmdPadding;
// Email alarm widgets
- QFrame* mEmailFrame;
+ TQFrame* mEmailFrame;
EmailIdCombo* mEmailFromList;
LineEdit* mEmailToEdit;
- QPushButton* mEmailAddressButton; // email open address book button
- QLineEdit* mEmailSubjectEdit;
+ TQPushButton* mEmailAddressButton; // email open address book button
+ TQLineEdit* mEmailSubjectEdit;
TextEdit* mEmailMessageEdit; // email body edit box
- QComboBox* mEmailAttachList;
- QPushButton* mEmailAddAttachButton;
- QPushButton* mEmailRemoveButton;
+ TQComboBox* mEmailAttachList;
+ TQPushButton* mEmailAddAttachButton;
+ TQPushButton* mEmailRemoveButton;
CheckBox* mEmailBcc;
- QString mAttachDefaultDir;
+ TQString mAttachDefaultDir;
- QGroupBox* mDeferGroup;
- QLabel* mDeferTimeLabel;
- QPushButton* mDeferChangeButton;
+ TQGroupBox* mDeferGroup;
+ TQLabel* mDeferTimeLabel;
+ TQPushButton* mDeferChangeButton;
AlarmTimeWidget* mTimeWidget;
LateCancelSelector* mLateCancel;
@@ -205,11 +205,11 @@ class EditAlarmDlg : public KDialogBase
RecurrenceEdit* mRecurrenceEdit;
- QString mAlarmMessage; // message text/file name/command/email message
+ TQString mAlarmMessage; // message text/file name/command/email message
DateTime mAlarmDateTime;
DateTime mDeferDateTime;
EmailAddressList mEmailAddresses; // list of addresses to send email to
- QStringList mEmailAttachments; // list of email attachment file names
+ TQStringList mEmailAttachments; // list of email attachment file names
unsigned long mKMailSerialNumber; // if email text, message's KMail serial number, else 0
int mDeferGroupHeight; // height added by deferred time widget
int mDesktop; // desktop to display the dialog in
@@ -222,34 +222,34 @@ class EditAlarmDlg : public KDialogBase
// Initial state of all controls
KAEvent* mSavedEvent;
- QString mSavedTemplateName; // mTemplateName value
- QButton* mSavedTemplateTimeType; // selected button in mTemplateTimeGroup
- QTime mSavedTemplateTime; // mTemplateTime value
+ TQString mSavedTemplateName; // mTemplateName value
+ TQButton* mSavedTemplateTimeType; // selected button in mTemplateTimeGroup
+ TQTime mSavedTemplateTime; // mTemplateTime value
int mSavedTemplateAfterTime; // mTemplateAfterTime value
- QButton* mSavedTypeRadio; // mMessageRadio, etc
+ TQButton* mSavedTypeRadio; // mMessageRadio, etc
SoundPicker::Type mSavedSoundType; // mSoundPicker sound type
bool mSavedRepeatSound; // mSoundPicker repeat status
- QString mSavedSoundFile; // mSoundPicker sound file
+ TQString mSavedSoundFile; // mSoundPicker sound file
float mSavedSoundVolume; // mSoundPicker volume
float mSavedSoundFadeVolume;// mSoundPicker fade volume
int mSavedSoundFadeSeconds;// mSoundPicker fade time
bool mSavedConfirmAck; // mConfirmAck status
- QFont mSavedFont; // mFontColourButton font
- QColor mSavedBgColour; // mFontColourButton background colour
- QColor mSavedFgColour; // mFontColourButton foreground colour
- QString mSavedPreAction; // mSpecialActionsButton pre-alarm action
- QString mSavedPostAction; // mSpecialActionsButton post-alarm action
+ TQFont mSavedFont; // mFontColourButton font
+ TQColor mSavedBgColour; // mFontColourButton background colour
+ TQColor mSavedFgColour; // mFontColourButton foreground colour
+ TQString mSavedPreAction; // mSpecialActionsButton pre-alarm action
+ TQString mSavedPostAction; // mSpecialActionsButton post-alarm action
int mSavedReminder; // mReminder value
bool mSavedOnceOnly; // mReminder once-only status
- QString mSavedTextFileCommandMessage; // mTextMessageEdit/mFileMessageEdit/mCmdCommandEdit/mEmailMessageEdit value
- QString mSavedEmailFrom; // mEmailFromList current value
- QString mSavedEmailTo; // mEmailToEdit value
- QString mSavedEmailSubject; // mEmailSubjectEdit value
- QStringList mSavedEmailAttach; // mEmailAttachList values
+ TQString mSavedTextFileCommandMessage; // mTextMessageEdit/mFileMessageEdit/mCmdCommandEdit/mEmailMessageEdit value
+ TQString mSavedEmailFrom; // mEmailFromList current value
+ TQString mSavedEmailTo; // mEmailToEdit value
+ TQString mSavedEmailSubject; // mEmailSubjectEdit value
+ TQStringList mSavedEmailAttach; // mEmailAttachList values
bool mSavedEmailBcc; // mEmailBcc status
bool mSavedCmdScript; // mCmdTypeScript status
- QButton* mSavedCmdOutputRadio; // selected button in mCmdOutputGroup
- QString mSavedCmdLogFile; // mCmdLogFileEdit value
+ TQButton* mSavedCmdOutputRadio; // selected button in mCmdOutputGroup
+ TQString mSavedCmdLogFile; // mCmdLogFileEdit value
DateTime mSavedDateTime; // mTimeWidget value
int mSavedRecurrenceType; // RecurrenceEdit::RepeatType value
int mSavedLateCancel; // mLateCancel value
diff --git a/kalarm/editdlgprivate.h b/kalarm/editdlgprivate.h
index cbcddb62f..6cf664006 100644
--- a/kalarm/editdlgprivate.h
+++ b/kalarm/editdlgprivate.h
@@ -28,9 +28,9 @@ class PageFrame : public QFrame
{
Q_OBJECT
public:
- PageFrame(QWidget* parent = 0, const char* name = 0) : QFrame(parent, name) { }
+ PageFrame(TQWidget* parent = 0, const char* name = 0) : TQFrame(parent, name) { }
protected:
- virtual void showEvent(QShowEvent*) { emit shown(); }
+ virtual void showEvent(TQShowEvent*) { emit shown(); }
signals:
void shown();
};
@@ -39,9 +39,9 @@ class TextEdit : public KTextEdit
{
Q_OBJECT
public:
- TextEdit(QWidget* parent, const char* name = 0);
+ TextEdit(TQWidget* parent, const char* name = 0);
protected:
- virtual void dragEnterEvent(QDragEnterEvent*);
+ virtual void dragEnterEvent(TQDragEnterEvent*);
};
#endif // EDITDLGPRIVATE_H
diff --git a/kalarm/emailidcombo.cpp b/kalarm/emailidcombo.cpp
index fc4fc6e74..baa8c2103 100644
--- a/kalarm/emailidcombo.cpp
+++ b/kalarm/emailidcombo.cpp
@@ -21,12 +21,12 @@
#include "emailidcombo.moc"
-EmailIdCombo::EmailIdCombo(KPIM::IdentityManager* manager, QWidget* parent, const char* name)
+EmailIdCombo::EmailIdCombo(KPIM::IdentityManager* manager, TQWidget* parent, const char* name)
: KPIM::IdentityCombo(manager, parent, name),
mReadOnly(false)
{ }
-void EmailIdCombo::mousePressEvent(QMouseEvent* e)
+void EmailIdCombo::mousePressEvent(TQMouseEvent* e)
{
if (mReadOnly)
{
@@ -37,25 +37,25 @@ void EmailIdCombo::mousePressEvent(QMouseEvent* e)
KPIM::IdentityCombo::mousePressEvent(e);
}
-void EmailIdCombo::mouseReleaseEvent(QMouseEvent* e)
+void EmailIdCombo::mouseReleaseEvent(TQMouseEvent* e)
{
if (!mReadOnly)
KPIM::IdentityCombo::mouseReleaseEvent(e);
}
-void EmailIdCombo::mouseMoveEvent(QMouseEvent* e)
+void EmailIdCombo::mouseMoveEvent(TQMouseEvent* e)
{
if (!mReadOnly)
KPIM::IdentityCombo::mouseMoveEvent(e);
}
-void EmailIdCombo::keyPressEvent(QKeyEvent* e)
+void EmailIdCombo::keyPressEvent(TQKeyEvent* e)
{
if (!mReadOnly || e->key() == Qt::Key_Escape)
KPIM::IdentityCombo::keyPressEvent(e);
}
-void EmailIdCombo::keyReleaseEvent(QKeyEvent* e)
+void EmailIdCombo::keyReleaseEvent(TQKeyEvent* e)
{
if (!mReadOnly)
KPIM::IdentityCombo::keyReleaseEvent(e);
diff --git a/kalarm/emailidcombo.h b/kalarm/emailidcombo.h
index d0399ec08..378f5c6b2 100644
--- a/kalarm/emailidcombo.h
+++ b/kalarm/emailidcombo.h
@@ -29,14 +29,14 @@ class EmailIdCombo : public KPIM::IdentityCombo
{
Q_OBJECT
public:
- explicit EmailIdCombo(KPIM::IdentityManager*, QWidget* parent = 0, const char* name = 0);
+ explicit EmailIdCombo(KPIM::IdentityManager*, TQWidget* parent = 0, const char* name = 0);
void setReadOnly(bool ro) { mReadOnly = ro; }
protected:
- virtual void mousePressEvent(QMouseEvent*);
- virtual void mouseReleaseEvent(QMouseEvent*);
- virtual void mouseMoveEvent(QMouseEvent*);
- virtual void keyPressEvent(QKeyEvent*);
- virtual void keyReleaseEvent(QKeyEvent*);
+ virtual void mousePressEvent(TQMouseEvent*);
+ virtual void mouseReleaseEvent(TQMouseEvent*);
+ virtual void mouseMoveEvent(TQMouseEvent*);
+ virtual void keyPressEvent(TQKeyEvent*);
+ virtual void keyReleaseEvent(TQKeyEvent*);
private:
bool mReadOnly; // value cannot be changed
};
diff --git a/kalarm/eventlistviewbase.cpp b/kalarm/eventlistviewbase.cpp
index 1a25e2ac0..a0f5d4952 100644
--- a/kalarm/eventlistviewbase.cpp
+++ b/kalarm/eventlistviewbase.cpp
@@ -20,8 +20,8 @@
#include "kalarm.h"
-#include <qwhatsthis.h>
-#include <qheader.h>
+#include <tqwhatsthis.h>
+#include <tqheader.h>
#include <kiconloader.h>
#include <kdebug.h>
@@ -33,8 +33,8 @@
class EventListWhatsThisBase : public QWhatsThis
{
public:
- EventListWhatsThisBase(EventListViewBase* lv) : QWhatsThis(lv), mListView(lv) { }
- virtual QString text(const QPoint&);
+ EventListWhatsThisBase(EventListViewBase* lv) : TQWhatsThis(lv), mListView(lv) { }
+ virtual TQString text(const TQPoint&);
private:
EventListViewBase* mListView;
};
@@ -45,7 +45,7 @@ class EventListWhatsThisBase : public QWhatsThis
= Base class for displaying a list of events.
=============================================================================*/
-EventListViewBase::EventListViewBase(QWidget* parent, const char* name)
+EventListViewBase::EventListViewBase(TQWidget* parent, const char* name)
: KListView(parent, name),
mFind(0),
mLastColumn(-1),
@@ -57,12 +57,12 @@ EventListViewBase::EventListViewBase(QWidget* parent, const char* name)
new EventListWhatsThisBase(this);
}
-void EventListViewBase::addLastColumn(const QString& title)
+void EventListViewBase::addLastColumn(const TQString& title)
{
addColumn(title);
mLastColumn = columns() - 1;
mLastColumnHeaderWidth = columnWidth(mLastColumn);
- setColumnWidthMode(mLastColumn, QListView::Maximum);
+ setColumnWidthMode(mLastColumn, TQListView::Maximum);
}
/******************************************************************************
@@ -70,7 +70,7 @@ void EventListViewBase::addLastColumn(const QString& title)
*/
void EventListViewBase::refresh()
{
- QString currentID;
+ TQString currentID;
if (currentItem())
currentID = currentItem()->event().id(); // save current item for restoration afterwards
clear();
@@ -87,7 +87,7 @@ void EventListViewBase::refresh()
/******************************************************************************
* Get the item for a given event ID.
*/
-EventListViewItemBase* EventListViewBase::getEntry(const QString& eventID) const
+EventListViewItemBase* EventListViewBase::getEntry(const TQString& eventID) const
{
if (!eventID.isEmpty())
{
@@ -114,7 +114,7 @@ void EventListViewBase::addEvent(const KAEvent& event, const InstanceList& insta
* If 'selectionView' is non-null, the selection highlight is moved to the
* modified event in that listView instance.
*/
-void EventListViewBase::modifyEvent(const QString& oldEventID, const KAEvent& newEvent,
+void EventListViewBase::modifyEvent(const TQString& oldEventID, const KAEvent& newEvent,
const InstanceList& instanceList, EventListViewBase* selectionView)
{
for (InstanceListConstIterator it = instanceList.begin(); it != instanceList.end(); ++it)
@@ -130,7 +130,7 @@ void EventListViewBase::modifyEvent(const QString& oldEventID, const KAEvent& ne
/******************************************************************************
* Delete an event from every displayed list.
*/
-void EventListViewBase::deleteEvent(const QString& eventID, const InstanceList& instanceList)
+void EventListViewBase::deleteEvent(const TQString& eventID, const InstanceList& instanceList)
{
for (InstanceListConstIterator it = instanceList.begin(); it != instanceList.end(); ++it)
{
@@ -199,7 +199,7 @@ void EventListViewBase::slotFind()
if (!mFind)
{
mFind = new Find(this);
- connect(mFind, SIGNAL(active(bool)), SIGNAL(findActive(bool)));
+ connect(mFind, TQT_SIGNAL(active(bool)), TQT_SIGNAL(findActive(bool)));
}
mFind->display();
}
@@ -219,7 +219,7 @@ void EventListViewBase::findNext(bool forward)
*/
void EventListViewBase::slotSelectAll()
{
- if (selectionMode() == QListView::Multi || selectionMode() == QListView::Extended)
+ if (selectionMode() == TQListView::Multi || selectionMode() == TQListView::Extended)
selectAll(true);
}
@@ -237,7 +237,7 @@ void EventListViewBase::slotDeselect()
*/
bool EventListViewBase::anySelected() const
{
- for (QListViewItem* item = KListView::firstChild(); item; item = item->nextSibling())
+ for (TQListViewItem* item = KListView::firstChild(); item; item = item->nextSibling())
if (isSelected(item))
return true;
return false;
@@ -257,16 +257,16 @@ const KAEvent* EventListViewBase::selectedEvent() const
/******************************************************************************
* Fetch the single selected item.
* This method works in both Single and Multi selection mode, unlike
-* QListView::selectedItem().
+* TQListView::selectedItem().
* Reply = null if no items are selected, or if multiple items are selected.
*/
EventListViewItemBase* EventListViewBase::selectedItem() const
{
- if (selectionMode() == QListView::Single)
+ if (selectionMode() == TQListView::Single)
return (EventListViewItemBase*)KListView::selectedItem();
- QListViewItem* item = 0;
- for (QListViewItem* it = firstChild(); it; it = it->nextSibling())
+ TQListViewItem* item = 0;
+ for (TQListViewItem* it = firstChild(); it; it = it->nextSibling())
{
if (isSelected(it))
{
@@ -281,10 +281,10 @@ EventListViewItemBase* EventListViewBase::selectedItem() const
/******************************************************************************
* Fetch all selected items.
*/
-QValueList<EventListViewItemBase*> EventListViewBase::selectedItems() const
+TQValueList<EventListViewItemBase*> EventListViewBase::selectedItems() const
{
- QValueList<EventListViewItemBase*> items;
- for (QListViewItem* item = firstChild(); item; item = item->nextSibling())
+ TQValueList<EventListViewItemBase*> items;
+ for (TQListViewItem* item = firstChild(); item; item = item->nextSibling())
{
if (isSelected(item))
items.append((EventListViewItemBase*)item);
@@ -298,7 +298,7 @@ QValueList<EventListViewItemBase*> EventListViewBase::selectedItems() const
int EventListViewBase::selectedCount() const
{
int count = 0;
- for (QListViewItem* item = firstChild(); item; item = item->nextSibling())
+ for (TQListViewItem* item = firstChild(); item; item = item->nextSibling())
{
if (isSelected(item))
++count;
@@ -319,7 +319,7 @@ void EventListViewBase::resizeLastColumn()
if (mw > lastColumnWidth)
lastColumnWidth = mw;
}
- QHeader* head = header();
+ TQHeader* head = header();
int x = head->sectionPos(mLastColumn);
int availableWidth = visibleWidth() - x;
int rightColWidth = 0;
@@ -344,7 +344,7 @@ void EventListViewBase::resizeLastColumn()
* Sets the last column in the list view to extend at least to the right hand
* edge of the list view.
*/
-void EventListViewBase::resizeEvent(QResizeEvent* re)
+void EventListViewBase::resizeEvent(TQResizeEvent* re)
{
KListView::resizeEvent(re);
resizeLastColumn();
@@ -355,7 +355,7 @@ void EventListViewBase::resizeEvent(QResizeEvent* re)
* Sets the last column in the list view to extend at least to the right hand
* edge of the list view.
*/
-void EventListViewBase::showEvent(QShowEvent* se)
+void EventListViewBase::showEvent(TQShowEvent* se)
{
KListView::showEvent(se);
resizeLastColumn();
@@ -370,7 +370,7 @@ int EventListViewBase::itemHeight()
if (!item)
{
// The list is empty, so create a temporary item to find its height
- QListViewItem* item = new QListViewItem(this, QString::null);
+ TQListViewItem* item = new TQListViewItem(this, TQString::null);
int height = item->height();
delete item;
return height;
@@ -385,15 +385,15 @@ int EventListViewBase::itemHeight()
= Base class containing the details of one event for display in an
* EventListViewBase.
=============================================================================*/
-QPixmap* EventListViewItemBase::mTextIcon;
-QPixmap* EventListViewItemBase::mFileIcon;
-QPixmap* EventListViewItemBase::mCommandIcon;
-QPixmap* EventListViewItemBase::mEmailIcon;
+TQPixmap* EventListViewItemBase::mTextIcon;
+TQPixmap* EventListViewItemBase::mFileIcon;
+TQPixmap* EventListViewItemBase::mCommandIcon;
+TQPixmap* EventListViewItemBase::mEmailIcon;
int EventListViewItemBase::mIconWidth = 0;
EventListViewItemBase::EventListViewItemBase(EventListViewBase* parent, const KAEvent& event)
- : QListViewItem(parent),
+ : TQListViewItem(parent),
mEvent(event)
{
iconWidth(); // load the icons
@@ -416,10 +416,10 @@ int EventListViewItemBase::iconWidth()
{
if (!mIconWidth)
{
- mTextIcon = new QPixmap(SmallIcon("message"));
- mFileIcon = new QPixmap(SmallIcon("file"));
- mCommandIcon = new QPixmap(SmallIcon("exec"));
- mEmailIcon = new QPixmap(SmallIcon("mail_generic"));
+ mTextIcon = new TQPixmap(SmallIcon("message"));
+ mFileIcon = new TQPixmap(SmallIcon("file"));
+ mCommandIcon = new TQPixmap(SmallIcon("exec"));
+ mEmailIcon = new TQPixmap(SmallIcon("mail_generic"));
if (mTextIcon)
mIconWidth = mTextIcon->width();
if (mFileIcon && mFileIcon->width() > mIconWidth)
@@ -435,7 +435,7 @@ int EventListViewItemBase::iconWidth()
/******************************************************************************
* Return the icon associated with the event's action.
*/
-QPixmap* EventListViewItemBase::eventIcon() const
+TQPixmap* EventListViewItemBase::eventIcon() const
{
switch (mEvent.action())
{
@@ -453,13 +453,13 @@ QPixmap* EventListViewItemBase::eventIcon() const
= Sets What's This? text depending on where in the list view is clicked.
=============================================================================*/
-QString EventListWhatsThisBase::text(const QPoint& pt)
+TQString EventListWhatsThisBase::text(const TQPoint& pt)
{
int column = -1;
- QPoint viewportPt = mListView->viewport()->mapFrom(mListView, pt);
- QRect frame = mListView->header()->frameGeometry();
+ TQPoint viewportPt = mListView->viewport()->mapFrom(mListView, pt);
+ TQRect frame = mListView->header()->frameGeometry();
if (frame.contains(pt)
- || mListView->itemAt(QPoint(mListView->itemMargin(), viewportPt.y())) && frame.contains(QPoint(pt.x(), frame.y())))
+ || mListView->itemAt(TQPoint(mListView->itemMargin(), viewportPt.y())) && frame.contains(TQPoint(pt.x(), frame.y())))
column = mListView->header()->sectionAt(pt.x());
return mListView->whatsThisText(column);
}
diff --git a/kalarm/eventlistviewbase.h b/kalarm/eventlistviewbase.h
index 23831c71d..8da8d2c7f 100644
--- a/kalarm/eventlistviewbase.h
+++ b/kalarm/eventlistviewbase.h
@@ -23,7 +23,7 @@
#include "kalarm.h"
-#include <qvaluelist.h>
+#include <tqvaluelist.h>
#include <klistview.h>
#include "alarmevent.h"
@@ -37,25 +37,25 @@ class EventListViewBase : public KListView
{
Q_OBJECT
public:
- typedef QValueList<EventListViewBase*> InstanceList;
- typedef QValueListIterator<EventListViewBase*> InstanceListIterator;
- typedef QValueListConstIterator<EventListViewBase*> InstanceListConstIterator;
+ typedef TQValueList<EventListViewBase*> InstanceList;
+ typedef TQValueListIterator<EventListViewBase*> InstanceListIterator;
+ typedef TQValueListConstIterator<EventListViewBase*> InstanceListConstIterator;
- EventListViewBase(QWidget* parent = 0, const char* name = 0);
+ EventListViewBase(TQWidget* parent = 0, const char* name = 0);
virtual ~EventListViewBase() { }
- EventListViewItemBase* getEntry(const QString& eventID) const;
+ EventListViewItemBase* getEntry(const TQString& eventID) const;
void addEvent(const KAEvent& e) { addEvent(e, instances(), this); }
void modifyEvent(const KAEvent& e)
{ modifyEvent(e.id(), e, instances(), this); }
- void modifyEvent(const QString& oldEventID, const KAEvent& newEvent)
+ void modifyEvent(const TQString& oldEventID, const KAEvent& newEvent)
{ modifyEvent(oldEventID, newEvent, instances(), this); }
- void deleteEvent(const QString& eventID) { deleteEvent(eventID, instances()); }
+ void deleteEvent(const TQString& eventID) { deleteEvent(eventID, instances()); }
static void addEvent(const KAEvent&, const InstanceList&, EventListViewBase* selectionView);
static void modifyEvent(const KAEvent& e, const InstanceList& list, EventListViewBase* selectionView)
{ modifyEvent(e.id(), e, list, selectionView); }
- static void modifyEvent(const QString& oldEventID, const KAEvent& newEvent, const InstanceList&, EventListViewBase* selectionView);
- static void deleteEvent(const QString& eventID, const InstanceList&);
- static void undeleteEvent(const QString& oldEventID, const KAEvent& event, const InstanceList& list, EventListViewBase* selectionView)
+ static void modifyEvent(const TQString& oldEventID, const KAEvent& newEvent, const InstanceList&, EventListViewBase* selectionView);
+ static void deleteEvent(const TQString& eventID, const InstanceList&);
+ static void undeleteEvent(const TQString& oldEventID, const KAEvent& event, const InstanceList& list, EventListViewBase* selectionView)
{ modifyEvent(oldEventID, event, list, selectionView); }
void resizeLastColumn();
int itemHeight();
@@ -64,10 +64,10 @@ class EventListViewBase : public KListView
bool anySelected() const; // are any items selected?
const KAEvent* selectedEvent() const;
EventListViewItemBase* selectedItem() const;
- QValueList<EventListViewItemBase*> selectedItems() const;
+ TQValueList<EventListViewItemBase*> selectedItems() const;
int selectedCount() const;
int lastColumn() const { return mLastColumn; }
- virtual QString whatsThisText(int column) const = 0;
+ virtual TQString whatsThisText(int column) const = 0;
virtual InstanceList instances() = 0; // return all instances
public slots:
@@ -89,9 +89,9 @@ class EventListViewBase : public KListView
EventListViewItemBase* addEntry(const KAEvent&, bool setSize = false, bool reselect = false);
EventListViewItemBase* addEntry(EventListViewItemBase*, bool setSize, bool reselect);
EventListViewItemBase* updateEntry(EventListViewItemBase*, const KAEvent& newEvent, bool setSize = false, bool reselect = false);
- void addLastColumn(const QString& title);
- virtual void showEvent(QShowEvent*);
- virtual void resizeEvent(QResizeEvent*);
+ void addLastColumn(const TQString& title);
+ virtual void showEvent(TQShowEvent*);
+ virtual void resizeEvent(TQResizeEvent*);
private:
void deleteEntry(EventListViewItemBase*, bool setSize = false);
@@ -108,20 +108,20 @@ class EventListViewItemBase : public QListViewItem
public:
EventListViewItemBase(EventListViewBase* parent, const KAEvent&);
const KAEvent& event() const { return mEvent; }
- QPixmap* eventIcon() const;
+ TQPixmap* eventIcon() const;
int lastColumnWidth() const { return mLastColumnWidth; }
- EventListViewItemBase* nextSibling() const { return (EventListViewItemBase*)QListViewItem::nextSibling(); }
+ EventListViewItemBase* nextSibling() const { return (EventListViewItemBase*)TQListViewItem::nextSibling(); }
static int iconWidth();
protected:
void setLastColumnText();
- virtual QString lastColumnText() const = 0; // get the text to display in the last column
+ virtual TQString lastColumnText() const = 0; // get the text to display in the last column
private:
- static QPixmap* mTextIcon;
- static QPixmap* mFileIcon;
- static QPixmap* mCommandIcon;
- static QPixmap* mEmailIcon;
+ static TQPixmap* mTextIcon;
+ static TQPixmap* mFileIcon;
+ static TQPixmap* mCommandIcon;
+ static TQPixmap* mEmailIcon;
static int mIconWidth; // maximum width of any icon
KAEvent mEvent; // the event for this item
diff --git a/kalarm/find.cpp b/kalarm/find.cpp
index 7caf4bde0..a05517826 100644
--- a/kalarm/find.cpp
+++ b/kalarm/find.cpp
@@ -20,10 +20,10 @@
#include "kalarm.h"
-#include <qlayout.h>
-#include <qwhatsthis.h>
-#include <qgroupbox.h>
-#include <qcheckbox.h>
+#include <tqlayout.h>
+#include <tqwhatsthis.h>
+#include <tqgroupbox.h>
+#include <tqcheckbox.h>
#include <kfinddialog.h>
#include <kfind.h>
@@ -50,7 +50,7 @@ static long FIND_KALARM_OPTIONS = FIND_LIVE | FIND_EXPIRED | FIND_MESSAGE | FIND
Find::Find(EventListViewBase* parent)
- : QObject(parent),
+ : TQObject(parent),
mListView(parent),
mDialog(0),
mFind(0),
@@ -90,25 +90,25 @@ void Find::display()
mDialog = new KFindDialog(false, mListView, "FindDlg", mOptions, mHistory, (mListView->selectedCount() > 1));
#endif
mDialog->setHasSelection(false);
- QWidget* kalarmWidgets = mDialog->findExtension();
+ TQWidget* kalarmWidgets = mDialog->findExtension();
// Alarm types
- QBoxLayout* layout = new QVBoxLayout(kalarmWidgets, 0, KDialog::spacingHint());
- QGroupBox* group = new QGroupBox(i18n("Alarm Type"), kalarmWidgets);
+ TQBoxLayout* layout = new TQVBoxLayout(kalarmWidgets, 0, KDialog::spacingHint());
+ TQGroupBox* group = new TQGroupBox(i18n("Alarm Type"), kalarmWidgets);
layout->addWidget(group);
- QGridLayout* grid = new QGridLayout(group, 2, 2, KDialog::marginHint(), KDialog::spacingHint());
+ TQGridLayout* grid = new TQGridLayout(group, 2, 2, KDialog::marginHint(), KDialog::spacingHint());
grid->addRowSpacing(0, mDialog->fontMetrics().lineSpacing()/2);
grid->setColStretch(1, 1);
// Live & expired alarm selection
- mLive = new QCheckBox(i18n("Acti&ve"), group);
+ mLive = new TQCheckBox(i18n("Acti&ve"), group);
mLive->setFixedSize(mLive->sizeHint());
- QWhatsThis::add(mLive, i18n("Check to include active alarms in the search."));
+ TQWhatsThis::add(mLive, i18n("Check to include active alarms in the search."));
grid->addWidget(mLive, 1, 0, Qt::AlignAuto);
- mExpired = new QCheckBox(i18n("Ex&pired"), group);
+ mExpired = new TQCheckBox(i18n("Ex&pired"), group);
mExpired->setFixedSize(mExpired->sizeHint());
- QWhatsThis::add(mExpired,
+ TQWhatsThis::add(mExpired,
i18n("Check to include expired alarms in the search. "
"This option is only available if expired alarms are currently being displayed."));
grid->addWidget(mExpired, 1, 2, Qt::AlignAuto);
@@ -117,24 +117,24 @@ void Find::display()
grid->addMultiCellWidget(mActiveExpiredSep, 2, 2, 0, 2);
// Alarm actions
- mMessageType = new QCheckBox(i18n("Text"), group, "message");
+ mMessageType = new TQCheckBox(i18n("Text"), group, "message");
mMessageType->setFixedSize(mMessageType->sizeHint());
- QWhatsThis::add(mMessageType, i18n("Check to include text message alarms in the search."));
+ TQWhatsThis::add(mMessageType, i18n("Check to include text message alarms in the search."));
grid->addWidget(mMessageType, 3, 0);
- mFileType = new QCheckBox(i18n("Fi&le"), group, "file");
+ mFileType = new TQCheckBox(i18n("Fi&le"), group, "file");
mFileType->setFixedSize(mFileType->sizeHint());
- QWhatsThis::add(mFileType, i18n("Check to include file alarms in the search."));
+ TQWhatsThis::add(mFileType, i18n("Check to include file alarms in the search."));
grid->addWidget(mFileType, 3, 2);
- mCommandType = new QCheckBox(i18n("Co&mmand"), group, "command");
+ mCommandType = new TQCheckBox(i18n("Co&mmand"), group, "command");
mCommandType->setFixedSize(mCommandType->sizeHint());
- QWhatsThis::add(mCommandType, i18n("Check to include command alarms in the search."));
+ TQWhatsThis::add(mCommandType, i18n("Check to include command alarms in the search."));
grid->addWidget(mCommandType, 4, 0);
- mEmailType = new QCheckBox(i18n("&Email"), group, "email");
+ mEmailType = new TQCheckBox(i18n("&Email"), group, "email");
mEmailType->setFixedSize(mEmailType->sizeHint());
- QWhatsThis::add(mEmailType, i18n("Check to include email alarms in the search."));
+ TQWhatsThis::add(mEmailType, i18n("Check to include email alarms in the search."));
grid->addWidget(mEmailType, 4, 2);
// Set defaults
@@ -146,7 +146,7 @@ void Find::display()
mEmailType->setChecked(mOptions & FIND_EMAIL);
#ifndef MODAL_FIND
- connect(mDialog, SIGNAL(okClicked()), this, SLOT(slotFind()));
+ connect(mDialog, TQT_SIGNAL(okClicked()), this, TQT_SLOT(slotFind()));
#endif
}
@@ -195,7 +195,7 @@ void Find::display()
mDialog->setHasCursor(mListView->currentItem());
#ifdef MODAL_FIND
- if (mDialog->exec() == QDialog::Accepted)
+ if (mDialog->exec() == TQDialog::Accepted)
slotFind();
else
delete mDialog;
@@ -245,12 +245,12 @@ void Find::slotFind()
#else
mFind = new KFind(mLastPattern, options, mListView, mDialog);
#endif
- connect(mFind, SIGNAL(destroyed()), SLOT(slotKFindDestroyed()));
+ connect(mFind, TQT_SIGNAL(destroyed()), TQT_SLOT(slotKFindDestroyed()));
mFind->closeFindNextDialog(); // prevent 'Find Next' dialog appearing
}
// Set the starting point for the search
- mStartID = QString::null;
+ mStartID = TQString::null;
mNoCurrentItem = newPattern;
bool checkEnd = false;
if (newPattern)
@@ -363,9 +363,9 @@ void Find::findNext(bool forward, bool sort, bool checkEnd, bool fromCurrent)
// No match was found
if (mFound || checkEnd)
{
- QString msg = forward ? i18n("End of alarm list reached.\nContinue from the beginning?")
+ TQString msg = forward ? i18n("End of alarm list reached.\nContinue from the beginning?")
: i18n("Beginning of alarm list reached.\nContinue from the end?");
- if (KMessageBox::questionYesNo(mListView, msg, QString::null, KStdGuiItem::cont(), KStdGuiItem::cancel()) == KMessageBox::Yes)
+ if (KMessageBox::questionYesNo(mListView, msg, TQString::null, KStdGuiItem::cont(), KStdGuiItem::cancel()) == KMessageBox::Yes)
{
mNoCurrentItem = true;
findNext(forward, false);
@@ -383,7 +383,7 @@ void Find::findNext(bool forward, bool sort, bool checkEnd, bool fromCurrent)
*/
EventListViewItemBase* Find::nextItem(EventListViewItemBase* item, bool forward) const
{
- QListViewItem* it;
+ TQListViewItem* it;
if (mOptions & KFindDialog::FindBackwards)
forward = !forward;
if (forward)
diff --git a/kalarm/find.h b/kalarm/find.h
index 1bb4913b1..12e2a520c 100644
--- a/kalarm/find.h
+++ b/kalarm/find.h
@@ -21,9 +21,9 @@
#ifndef FIND_H
#define FIND_H
-#include <qobject.h>
-#include <qguardedptr.h>
-#include <qstringlist.h>
+#include <tqobject.h>
+#include <tqguardedptr.h>
+#include <tqstringlist.h>
class QCheckBox;
class KFindDialog;
@@ -54,18 +54,18 @@ class Find : public QObject
EventListViewItemBase* nextItem(EventListViewItemBase*, bool forward) const;
EventListViewBase* mListView; // parent list view
- QGuardedPtr<KFindDialog> mDialog;
- QCheckBox* mExpired;
- QCheckBox* mLive;
+ TQGuardedPtr<KFindDialog> mDialog;
+ TQCheckBox* mExpired;
+ TQCheckBox* mLive;
KSeparator* mActiveExpiredSep;
- QCheckBox* mMessageType;
- QCheckBox* mFileType;
- QCheckBox* mCommandType;
- QCheckBox* mEmailType;
+ TQCheckBox* mMessageType;
+ TQCheckBox* mFileType;
+ TQCheckBox* mCommandType;
+ TQCheckBox* mEmailType;
KFind* mFind;
- QStringList mHistory; // list of history items for Find dialog
- QString mLastPattern; // pattern used in last search
- QString mStartID; // ID of first alarm searched if 'from cursor' was selected
+ TQStringList mHistory; // list of history items for Find dialog
+ TQString mLastPattern; // pattern used in last search
+ TQString mStartID; // ID of first alarm searched if 'from cursor' was selected
long mOptions; // OR of find dialog options
bool mNoCurrentItem; // there is no current item for the purposes of searching
bool mFound; // true if any matches have been found
diff --git a/kalarm/fontcolour.cpp b/kalarm/fontcolour.cpp
index dae2e9856..4273125a3 100644
--- a/kalarm/fontcolour.cpp
+++ b/kalarm/fontcolour.cpp
@@ -18,14 +18,14 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#include <qobjectlist.h>
-#include <qwidget.h>
-#include <qgroupbox.h>
-#include <qpushbutton.h>
-#include <qhbox.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qwhatsthis.h>
+#include <tqobjectlist.h>
+#include <tqwidget.h>
+#include <tqgroupbox.h>
+#include <tqpushbutton.h>
+#include <tqhbox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqwhatsthis.h>
#include <kglobal.h>
#include <klocale.h>
@@ -38,88 +38,88 @@
#include "fontcolour.moc"
-FontColourChooser::FontColourChooser(QWidget *parent, const char *name,
- bool onlyFixed, const QStringList &fontList,
- const QString& frameLabel, bool editColours, bool fg, bool defaultFont,
+FontColourChooser::FontColourChooser(TQWidget *parent, const char *name,
+ bool onlyFixed, const TQStringList &fontList,
+ const TQString& frameLabel, bool editColours, bool fg, bool defaultFont,
int visibleListSize)
- : QWidget(parent, name),
+ : TQWidget(parent, name),
mFgColourButton(0),
mRemoveColourButton(0),
mColourList(Preferences::messageColours()),
mReadOnly(false)
{
- QVBoxLayout* topLayout = new QVBoxLayout(this, 0, KDialog::spacingHint());
- QWidget* page = this;
+ TQVBoxLayout* topLayout = new TQVBoxLayout(this, 0, KDialog::spacingHint());
+ TQWidget* page = this;
if (!frameLabel.isNull())
{
- page = new QGroupBox(frameLabel, this);
+ page = new TQGroupBox(frameLabel, this);
topLayout->addWidget(page);
- topLayout = new QVBoxLayout(page, KDialog::marginHint(), KDialog::spacingHint());
+ topLayout = new TQVBoxLayout(page, KDialog::marginHint(), KDialog::spacingHint());
topLayout->addSpacing(fontMetrics().height() - KDialog::marginHint() + KDialog::spacingHint());
}
- QHBoxLayout* hlayout = new QHBoxLayout(topLayout);
- QVBoxLayout* colourLayout = new QVBoxLayout(hlayout);
+ TQHBoxLayout* hlayout = new TQHBoxLayout(topLayout);
+ TQVBoxLayout* colourLayout = new TQVBoxLayout(hlayout);
if (fg)
{
- QHBox* box = new QHBox(page); // to group widgets for QWhatsThis text
+ TQHBox* box = new TQHBox(page); // to group widgets for TQWhatsThis text
box->setSpacing(KDialog::spacingHint()/2);
colourLayout->addWidget(box);
- QLabel* label = new QLabel(i18n("&Foreground color:"), box);
- box->setStretchFactor(new QWidget(box), 0);
+ TQLabel* label = new TQLabel(i18n("&Foreground color:"), box);
+ box->setStretchFactor(new TQWidget(box), 0);
mFgColourButton = new ColourCombo(box);
- connect(mFgColourButton, SIGNAL(activated(const QString&)), SLOT(setSampleColour()));
+ connect(mFgColourButton, TQT_SIGNAL(activated(const TQString&)), TQT_SLOT(setSampleColour()));
label->setBuddy(mFgColourButton);
- QWhatsThis::add(box, i18n("Select the alarm message foreground color"));
+ TQWhatsThis::add(box, i18n("Select the alarm message foreground color"));
}
- QHBox* box = new QHBox(page); // to group widgets for QWhatsThis text
+ TQHBox* box = new TQHBox(page); // to group widgets for TQWhatsThis text
box->setSpacing(KDialog::spacingHint()/2);
colourLayout->addWidget(box);
- QLabel* label = new QLabel(i18n("&Background color:"), box);
- box->setStretchFactor(new QWidget(box), 0);
+ TQLabel* label = new TQLabel(i18n("&Background color:"), box);
+ box->setStretchFactor(new TQWidget(box), 0);
mBgColourButton = new ColourCombo(box);
- connect(mBgColourButton, SIGNAL(activated(const QString&)), SLOT(setSampleColour()));
+ connect(mBgColourButton, TQT_SIGNAL(activated(const TQString&)), TQT_SLOT(setSampleColour()));
label->setBuddy(mBgColourButton);
- QWhatsThis::add(box, i18n("Select the alarm message background color"));
+ TQWhatsThis::add(box, i18n("Select the alarm message background color"));
hlayout->addStretch();
if (editColours)
{
- QHBoxLayout* layout = new QHBoxLayout(topLayout);
- QPushButton* button = new QPushButton(i18n("Add Co&lor..."), page);
+ TQHBoxLayout* layout = new TQHBoxLayout(topLayout);
+ TQPushButton* button = new TQPushButton(i18n("Add Co&lor..."), page);
button->setFixedSize(button->sizeHint());
- connect(button, SIGNAL(clicked()), SLOT(slotAddColour()));
- QWhatsThis::add(button, i18n("Choose a new color to add to the color selection list."));
+ connect(button, TQT_SIGNAL(clicked()), TQT_SLOT(slotAddColour()));
+ TQWhatsThis::add(button, i18n("Choose a new color to add to the color selection list."));
layout->addWidget(button);
- mRemoveColourButton = new QPushButton(i18n("&Remove Color"), page);
+ mRemoveColourButton = new TQPushButton(i18n("&Remove Color"), page);
mRemoveColourButton->setFixedSize(mRemoveColourButton->sizeHint());
- connect(mRemoveColourButton, SIGNAL(clicked()), SLOT(slotRemoveColour()));
- QWhatsThis::add(mRemoveColourButton,
+ connect(mRemoveColourButton, TQT_SIGNAL(clicked()), TQT_SLOT(slotRemoveColour()));
+ TQWhatsThis::add(mRemoveColourButton,
i18n("Remove the color currently shown in the background color chooser, from the color selection list."));
layout->addWidget(mRemoveColourButton);
}
if (defaultFont)
{
- QHBoxLayout* layout = new QHBoxLayout(topLayout);
+ TQHBoxLayout* layout = new TQHBoxLayout(topLayout);
mDefaultFont = new CheckBox(i18n("Use &default font"), page);
mDefaultFont->setMinimumSize(mDefaultFont->sizeHint());
- connect(mDefaultFont, SIGNAL(toggled(bool)), SLOT(slotDefaultFontToggled(bool)));
- QWhatsThis::add(mDefaultFont,
+ connect(mDefaultFont, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotDefaultFontToggled(bool)));
+ TQWhatsThis::add(mDefaultFont,
i18n("Check to use the default font current at the time the alarm is displayed."));
layout->addWidget(mDefaultFont);
- layout->addWidget(new QWidget(page)); // left adjust the widget
+ layout->addWidget(new TQWidget(page)); // left adjust the widget
}
else
mDefaultFont = 0;
mFontChooser = new KFontChooser(page, name, onlyFixed, fontList, false, visibleListSize);
mFontChooser->installEventFilter(this); // for read-only mode
- const QObjectList* kids = mFontChooser->queryList();
- for (QObjectList::ConstIterator it = kids->constBegin(); it != kids->constEnd(); ++it)
+ const TQObjectList* kids = mFontChooser->queryList();
+ for (TQObjectList::ConstIterator it = kids->constBegin(); it != kids->constEnd(); ++it)
(*it)->installEventFilter(this);
topLayout->addWidget(mFontChooser);
@@ -132,7 +132,7 @@ void FontColourChooser::setDefaultFont()
mDefaultFont->setChecked(true);
}
-void FontColourChooser::setFont(const QFont& font, bool onlyFixed)
+void FontColourChooser::setFont(const TQFont& font, bool onlyFixed)
{
if (mDefaultFont)
mDefaultFont->setChecked(false);
@@ -144,12 +144,12 @@ bool FontColourChooser::defaultFont() const
return mDefaultFont ? mDefaultFont->isChecked() : false;
}
-QFont FontColourChooser::font() const
+TQFont FontColourChooser::font() const
{
- return (mDefaultFont && mDefaultFont->isChecked()) ? QFont() : mFontChooser->font();
+ return (mDefaultFont && mDefaultFont->isChecked()) ? TQFont() : mFontChooser->font();
}
-void FontColourChooser::setBgColour(const QColor& colour)
+void FontColourChooser::setBgColour(const TQColor& colour)
{
mBgColourButton->setColor(colour);
mFontChooser->setBackgroundColor(colour);
@@ -157,42 +157,42 @@ void FontColourChooser::setBgColour(const QColor& colour)
void FontColourChooser::setSampleColour()
{
- QColor bg = mBgColourButton->color();
+ TQColor bg = mBgColourButton->color();
mFontChooser->setBackgroundColor(bg);
- QColor fg = fgColour();
+ TQColor fg = fgColour();
mFontChooser->setColor(fg);
if (mRemoveColourButton)
mRemoveColourButton->setEnabled(!mBgColourButton->isCustomColour()); // no deletion of custom colour
}
-QColor FontColourChooser::bgColour() const
+TQColor FontColourChooser::bgColour() const
{
return mBgColourButton->color();
}
-QColor FontColourChooser::fgColour() const
+TQColor FontColourChooser::fgColour() const
{
if (mFgColourButton)
return mFgColourButton->color();
else
{
- QColor bg = mBgColourButton->color();
- QPalette pal(bg, bg);
- return pal.color(QPalette::Active, QColorGroup::Text);
+ TQColor bg = mBgColourButton->color();
+ TQPalette pal(bg, bg);
+ return pal.color(TQPalette::Active, TQColorGroup::Text);
}
}
-QString FontColourChooser::sampleText() const
+TQString FontColourChooser::sampleText() const
{
return mFontChooser->sampleText();
}
-void FontColourChooser::setSampleText(const QString& text)
+void FontColourChooser::setSampleText(const TQString& text)
{
mFontChooser->setSampleText(text);
}
-void FontColourChooser::setFgColour(const QColor& colour)
+void FontColourChooser::setFgColour(const TQColor& colour)
{
if (mFgColourButton)
{
@@ -213,17 +213,17 @@ void FontColourChooser::setReadOnly(bool ro)
}
}
-bool FontColourChooser::eventFilter(QObject*, QEvent* e)
+bool FontColourChooser::eventFilter(TQObject*, TQEvent* e)
{
if (mReadOnly)
{
switch (e->type())
{
- case QEvent::MouseButtonPress:
- case QEvent::MouseButtonRelease:
- case QEvent::MouseButtonDblClick:
- case QEvent::KeyPress:
- case QEvent::KeyRelease:
+ case TQEvent::MouseButtonPress:
+ case TQEvent::MouseButtonRelease:
+ case TQEvent::MouseButtonDblClick:
+ case TQEvent::KeyPress:
+ case TQEvent::KeyRelease:
return true; // prevent the event being handled
default:
break;
@@ -246,8 +246,8 @@ void FontColourChooser::setColours(const ColourList& colours)
void FontColourChooser::slotAddColour()
{
- QColor colour;
- if (KColorDialog::getColor(colour, this) == QDialog::Accepted)
+ TQColor colour;
+ if (KColorDialog::getColor(colour, this) == TQDialog::Accepted)
{
mColourList.insert(colour);
mBgColourButton->setColours(mColourList);
diff --git a/kalarm/fontcolour.h b/kalarm/fontcolour.h
index 1e37b3836..091e6bd7a 100644
--- a/kalarm/fontcolour.h
+++ b/kalarm/fontcolour.h
@@ -22,8 +22,8 @@
#define FONTCOLOUR_H
#include <kdeversion.h>
-#include <qwidget.h>
-#include <qstringlist.h>
+#include <tqwidget.h>
+#include <tqstringlist.h>
#include <kfontdialog.h>
#include "colourlist.h"
@@ -36,28 +36,28 @@ class FontColourChooser : public QWidget
{
Q_OBJECT
public:
- explicit FontColourChooser(QWidget* parent = 0, const char* name = 0,
+ explicit FontColourChooser(TQWidget* parent = 0, const char* name = 0,
bool onlyFixed = false,
- const QStringList& fontList = QStringList(),
- const QString& frameLabel = i18n("Requested font"),
+ const TQStringList& fontList = TQStringList(),
+ const TQString& frameLabel = i18n("Requested font"),
bool editColours = false, bool fg = true, bool defaultFont = false,
int visibleListSize = 8);
void setDefaultFont();
- void setFont(const QFont&, bool onlyFixed = false);
+ void setFont(const TQFont&, bool onlyFixed = false);
bool defaultFont() const;
- QFont font() const;
- QColor fgColour() const;
- QColor bgColour() const;
+ TQFont font() const;
+ TQColor fgColour() const;
+ TQColor bgColour() const;
const ColourList& colours() const { return mColourList; }
- void setFgColour(const QColor&);
- void setBgColour(const QColor&);
+ void setFgColour(const TQColor&);
+ void setBgColour(const TQColor&);
void setColours(const ColourList&);
- QString sampleText() const;
- void setSampleText(const QString& text);
+ TQString sampleText() const;
+ void setSampleText(const TQString& text);
bool isReadOnly() const { return mReadOnly; }
void setReadOnly(bool);
- virtual bool eventFilter(QObject*, QEvent*);
+ virtual bool eventFilter(TQObject*, TQEvent*);
private slots:
void setSampleColour();
@@ -68,7 +68,7 @@ private slots:
private:
ColourCombo* mFgColourButton; // or null
ColourCombo* mBgColourButton;
- QPushButton* mRemoveColourButton;
+ TQPushButton* mRemoveColourButton;
KFontChooser* mFontChooser;
CheckBox* mDefaultFont; // or null
ColourList mColourList;
diff --git a/kalarm/fontcolourbutton.cpp b/kalarm/fontcolourbutton.cpp
index b3a55359a..48d0f9220 100644
--- a/kalarm/fontcolourbutton.cpp
+++ b/kalarm/fontcolourbutton.cpp
@@ -20,9 +20,9 @@
#include "kalarm.h"
-#include <qcheckbox.h>
-#include <qlayout.h>
-#include <qwhatsthis.h>
+#include <tqcheckbox.h>
+#include <tqlayout.h>
+#include <tqwhatsthis.h>
#include <klocale.h>
#include <kdebug.h>
@@ -38,28 +38,28 @@
= Font/colour selection button.
=============================================================================*/
-FontColourButton::FontColourButton(QWidget* parent, const char* name)
- : QFrame(parent, name),
+FontColourButton::FontColourButton(TQWidget* parent, const char* name)
+ : TQFrame(parent, name),
mReadOnly(false)
{
setFrameStyle(NoFrame);
- QHBoxLayout* layout = new QHBoxLayout(this, 0, KDialog::spacingHint());
+ TQHBoxLayout* layout = new TQHBoxLayout(this, 0, KDialog::spacingHint());
mButton = new PushButton(i18n("Font && Co&lor..."), this);
mButton->setFixedSize(mButton->sizeHint());
- connect(mButton, SIGNAL(clicked()), SLOT(slotButtonPressed()));
- QWhatsThis::add(mButton,
+ connect(mButton, TQT_SIGNAL(clicked()), TQT_SLOT(slotButtonPressed()));
+ TQWhatsThis::add(mButton,
i18n("Choose the font, and foreground and background color, for the alarm message."));
layout->addWidget(mButton);
// Font and colour sample display
- mSample = new QLineEdit(this);
+ mSample = new TQLineEdit(this);
mSample->setMinimumHeight(QMAX(mSample->fontMetrics().lineSpacing(), mButton->height()*3/2));
- mSample->setSizePolicy(QSizePolicy::Ignored, QSizePolicy::MinimumExpanding);
+ mSample->setSizePolicy(TQSizePolicy::Ignored, TQSizePolicy::MinimumExpanding);
mSample->setText(i18n("The Quick Brown Fox Jumps Over The Lazy Dog"));
mSample->setCursorPosition(0);
mSample->setAlignment(Qt::AlignCenter);
- QWhatsThis::add(mSample,
+ TQWhatsThis::add(mSample,
i18n("This sample text illustrates the current font and color settings. "
"You may edit it to test special characters."));
layout->addWidget(mSample);
@@ -71,20 +71,20 @@ void FontColourButton::setDefaultFont()
mSample->setFont(Preferences::messageFont());
}
-void FontColourButton::setFont(const QFont& font)
+void FontColourButton::setFont(const TQFont& font)
{
mDefaultFont = false;
mFont = font;
mSample->setFont(mFont);
}
-void FontColourButton::setBgColour(const QColor& colour)
+void FontColourButton::setBgColour(const TQColor& colour)
{
mBgColour = colour;
mSample->setPaletteBackgroundColor(mBgColour);
}
-void FontColourButton::setFgColour(const QColor& colour)
+void FontColourButton::setFgColour(const TQColor& colour)
{
mFgColour = colour;
mSample->setPaletteForegroundColor(mFgColour);
@@ -99,7 +99,7 @@ void FontColourButton::slotButtonPressed()
FontColourDlg dlg(mBgColour, mFgColour, mFont, mDefaultFont,
i18n("Choose Alarm Font & Color"), this, "fontColourDlg");
dlg.setReadOnly(mReadOnly);
- if (dlg.exec() == QDialog::Accepted)
+ if (dlg.exec() == TQDialog::Accepted)
{
mDefaultFont = dlg.defaultFont();
mFont = dlg.font();
@@ -118,15 +118,15 @@ void FontColourButton::slotButtonPressed()
= Font/colour selection dialog.
=============================================================================*/
-FontColourDlg::FontColourDlg(const QColor& bgColour, const QColor& fgColour, const QFont& font,
- bool defaultFont, const QString& caption, QWidget* parent, const char* name)
+FontColourDlg::FontColourDlg(const TQColor& bgColour, const TQColor& fgColour, const TQFont& font,
+ bool defaultFont, const TQString& caption, TQWidget* parent, const char* name)
: KDialogBase(parent, name, true, caption, Ok|Cancel, Ok, false),
mReadOnly(false)
{
- QWidget* page = new QWidget(this);
+ TQWidget* page = new TQWidget(this);
setMainWidget(page);
- QVBoxLayout* layout = new QVBoxLayout(page, 0, spacingHint());
- mChooser = new FontColourChooser(page, 0, false, QStringList(), QString::null, false, true, true);
+ TQVBoxLayout* layout = new TQVBoxLayout(page, 0, spacingHint());
+ mChooser = new FontColourChooser(page, 0, false, TQStringList(), TQString::null, false, true, true);
mChooser->setBgColour(bgColour);
mChooser->setFgColour(fgColour);
if (defaultFont)
diff --git a/kalarm/fontcolourbutton.h b/kalarm/fontcolourbutton.h
index 9bbe3d8db..1b78c434a 100644
--- a/kalarm/fontcolourbutton.h
+++ b/kalarm/fontcolourbutton.h
@@ -21,9 +21,9 @@
#ifndef FONTCOLOURBUTTON_H
#define FONTCOLOURBUTTON_H
-#include <qfont.h>
-#include <qcolor.h>
-#include <qframe.h>
+#include <tqfont.h>
+#include <tqcolor.h>
+#include <tqframe.h>
#include <kdialogbase.h>
class QLineEdit;
@@ -35,15 +35,15 @@ class FontColourButton : public QFrame
{
Q_OBJECT
public:
- FontColourButton(QWidget* parent = 0, const char* name = 0);
+ FontColourButton(TQWidget* parent = 0, const char* name = 0);
void setDefaultFont();
- void setFont(const QFont&);
- void setBgColour(const QColor&);
- void setFgColour(const QColor&);
+ void setFont(const TQFont&);
+ void setBgColour(const TQColor&);
+ void setFgColour(const TQColor&);
bool defaultFont() const { return mDefaultFont; }
- QFont font() const { return mFont; }
- QColor bgColour() const { return mBgColour; }
- QColor fgColour() const { return mFgColour; }
+ TQFont font() const { return mFont; }
+ TQColor bgColour() const { return mBgColour; }
+ TQColor fgColour() const { return mFgColour; }
virtual void setReadOnly(bool ro) { mReadOnly = ro; }
virtual bool isReadOnly() const { return mReadOnly; }
@@ -55,9 +55,9 @@ class FontColourButton : public QFrame
private:
PushButton* mButton;
- QColor mBgColour, mFgColour;
- QFont mFont;
- QLineEdit* mSample;
+ TQColor mBgColour, mFgColour;
+ TQFont mFont;
+ TQLineEdit* mSample;
bool mDefaultFont;
bool mReadOnly;
};
@@ -68,12 +68,12 @@ class FontColourDlg : public KDialogBase
{
Q_OBJECT
public:
- FontColourDlg(const QColor& bg, const QColor& fg, const QFont&, bool defaultFont,
- const QString& caption, QWidget* parent = 0, const char* name = 0);
+ FontColourDlg(const TQColor& bg, const TQColor& fg, const TQFont&, bool defaultFont,
+ const TQString& caption, TQWidget* parent = 0, const char* name = 0);
bool defaultFont() const { return mDefaultFont; }
- QFont font() const { return mFont; }
- QColor bgColour() const { return mBgColour; }
- QColor fgColour() const { return mFgColour; }
+ TQFont font() const { return mFont; }
+ TQColor bgColour() const { return mBgColour; }
+ TQColor fgColour() const { return mFgColour; }
void setReadOnly(bool);
bool isReadOnly() const { return mReadOnly; }
@@ -82,8 +82,8 @@ class FontColourDlg : public KDialogBase
private:
FontColourChooser* mChooser;
- QColor mBgColour, mFgColour;
- QFont mFont;
+ TQColor mBgColour, mFgColour;
+ TQFont mFont;
bool mDefaultFont;
bool mReadOnly;
};
diff --git a/kalarm/functions.cpp b/kalarm/functions.cpp
index dd83fea43..45537e3d9 100644
--- a/kalarm/functions.cpp
+++ b/kalarm/functions.cpp
@@ -34,9 +34,9 @@
#include "templatelistview.h"
#include "templatemenuaction.h"
-#include <qdeepcopy.h>
-#include <qdir.h>
-#include <qregexp.h>
+#include <tqdeepcopy.h>
+#include <tqdir.h>
+#include <tqregexp.h>
#include <kconfig.h>
#include <kaction.h>
@@ -61,14 +61,14 @@
namespace
{
bool resetDaemonQueued = false;
-QCString korganizerName = "korganizer";
-QString korgStartError;
+TQCString korganizerName = "korganizer";
+TQString korgStartError;
#define KORG_DCOP_OBJECT "KOrganizerIface"
const char* KORG_DCOP_WINDOW = "KOrganizer MainWindow";
const char* KMAIL_DCOP_WINDOW = "kmail-mainwindow#1";
bool sendToKOrganizer(const KAEvent&);
-bool deleteFromKOrganizer(const QString& eventID);
+bool deleteFromKOrganizer(const TQString& eventID);
bool runKOrganizer();
}
#ifdef HAVE_XTEST
@@ -82,7 +82,7 @@ namespace KAlarm
/******************************************************************************
* Display a main window with the specified event selected.
*/
-MainWindow* displayMainWindowSelected(const QString& eventID)
+MainWindow* displayMainWindowSelected(const TQString& eventID)
{
MainWindow* win = MainWindow::firstWindow();
if (!win)
@@ -112,7 +112,7 @@ MainWindow* displayMainWindowSelected(const QString& eventID)
/******************************************************************************
* Create a New Alarm KAction.
*/
-KAction* createNewAlarmAction(const QString& label, QObject* receiver, const char* slot, KActionCollection* actions, const char* name)
+KAction* createNewAlarmAction(const TQString& label, TQObject* receiver, const char* slot, KActionCollection* actions, const char* name)
{
return new KAction(label, "filenew", KStdAccel::openNew(), receiver, slot, actions, name);
}
@@ -120,7 +120,7 @@ KAction* createNewAlarmAction(const QString& label, QObject* receiver, const cha
/******************************************************************************
* Create a New From Template KAction.
*/
-TemplateMenuAction* createNewFromTemplateAction(const QString& label, QObject* receiver, const char* slot, KActionCollection* actions, const char* name)
+TemplateMenuAction* createNewFromTemplateAction(const TQString& label, TQObject* receiver, const char* slot, KActionCollection* actions, const char* name)
{
return new TemplateMenuAction(label, "new_from_template", receiver, slot, actions, name);
}
@@ -132,7 +132,7 @@ TemplateMenuAction* createNewFromTemplateAction(const QString& label, QObject* r
* event in that listView instance.
* 'event' is updated with the actual event ID.
*/
-UpdateStatus addEvent(KAEvent& event, AlarmListView* selectionView, QWidget* errmsgParent, bool useEventID, bool allowKOrgUpdate)
+UpdateStatus addEvent(KAEvent& event, AlarmListView* selectionView, TQWidget* errmsgParent, bool useEventID, bool allowKOrgUpdate)
{
kdDebug(5950) << "KAlarm::addEvent(): " << event.id() << endl;
UpdateStatus status = UPDATE_OK;
@@ -177,7 +177,7 @@ bool addExpiredEvent(KAEvent& event)
return false;
bool archiving = (KAEvent::uidStatus(event.id()) == KAEvent::ACTIVE);
if (archiving)
- event.setSaveDateTime(QDateTime::currentDateTime()); // time stamp to control purging
+ event.setSaveDateTime(TQDateTime::currentDateTime()); // time stamp to control purging
KCal::Event* kcalEvent = cal->addEvent(event);
cal->save();
@@ -196,7 +196,7 @@ bool addExpiredEvent(KAEvent& event)
* event in that listView instance.
* 'event' is updated with the actual event ID.
*/
-UpdateStatus addTemplate(KAEvent& event, TemplateListView* selectionView, QWidget* errmsgParent)
+UpdateStatus addTemplate(KAEvent& event, TemplateListView* selectionView, TQWidget* errmsgParent)
{
kdDebug(5950) << "KAlarm::addTemplate(): " << event.id() << endl;
UpdateStatus status = UPDATE_OK;
@@ -228,7 +228,7 @@ UpdateStatus addTemplate(KAEvent& event, TemplateListView* selectionView, QWidge
* If 'selectionView' is non-null, the selection highlight is moved to the
* modified event in that listView instance.
*/
-UpdateStatus modifyEvent(KAEvent& oldEvent, const KAEvent& newEvent, AlarmListView* selectionView, QWidget* errmsgParent)
+UpdateStatus modifyEvent(KAEvent& oldEvent, const KAEvent& newEvent, AlarmListView* selectionView, TQWidget* errmsgParent)
{
kdDebug(5950) << "KAlarm::modifyEvent(): '" << oldEvent.id() << endl;
@@ -283,7 +283,7 @@ UpdateStatus modifyEvent(KAEvent& oldEvent, const KAEvent& newEvent, AlarmListVi
* The event is not updated in KOrganizer, since this function is called when an
* existing alarm is rescheduled (due to recurrence or deferral).
*/
-UpdateStatus updateEvent(KAEvent& event, AlarmListView* selectionView, QWidget* errmsgParent, bool archiveOnDelete, bool incRevision)
+UpdateStatus updateEvent(KAEvent& event, AlarmListView* selectionView, TQWidget* errmsgParent, bool archiveOnDelete, bool incRevision)
{
kdDebug(5950) << "KAlarm::updateEvent(): " << event.id() << endl;
@@ -314,7 +314,7 @@ UpdateStatus updateEvent(KAEvent& event, AlarmListView* selectionView, QWidget*
* If 'selectionView' is non-null, the selection highlight is moved to the
* updated event in that listView instance.
*/
-UpdateStatus updateTemplate(const KAEvent& event, TemplateListView* selectionView, QWidget* errmsgParent)
+UpdateStatus updateTemplate(const KAEvent& event, TemplateListView* selectionView, TQWidget* errmsgParent)
{
UpdateStatus status = UPDATE_OK;
AlarmCalendar* cal = AlarmCalendar::templateCalendarOpen();
@@ -341,9 +341,9 @@ UpdateStatus updateTemplate(const KAEvent& event, TemplateListView* selectionVie
* Delete an alarm from the calendar file and from every main window instance.
* If the event is archived, the event's ID is changed to an expired ID if necessary.
*/
-UpdateStatus deleteEvent(KAEvent& event, bool archive, QWidget* errmsgParent)
+UpdateStatus deleteEvent(KAEvent& event, bool archive, TQWidget* errmsgParent)
{
- QString id = event.id();
+ TQString id = event.id();
kdDebug(5950) << "KAlarm::deleteEvent(): " << id << endl;
// Update the window lists
@@ -388,7 +388,7 @@ UpdateStatus deleteEvent(KAEvent& event, bool archive, QWidget* errmsgParent)
*/
UpdateStatus deleteTemplate(const KAEvent& event)
{
- QString id = event.id();
+ TQString id = event.id();
// Delete the template from the calendar file
AlarmCalendar* cal = AlarmCalendar::templateCalendarOpen();
@@ -406,7 +406,7 @@ UpdateStatus deleteTemplate(const KAEvent& event)
/******************************************************************************
* Delete an alarm from the display calendar.
*/
-void deleteDisplayEvent(const QString& eventID)
+void deleteDisplayEvent(const TQString& eventID)
{
kdDebug(5950) << "KAlarm::deleteDisplayEvent(" << eventID << ")\n";
@@ -426,13 +426,13 @@ void deleteDisplayEvent(const QString& eventID)
*/
UpdateStatus reactivateEvent(KAEvent& event, AlarmListView* selectionView, bool useEventID)
{
- QString id = event.id();
+ TQString id = event.id();
kdDebug(5950) << "KAlarm::reactivateEvent(): " << id << endl;
// Delete the event from the expired calendar file
if (KAEvent::uidStatus(id) == KAEvent::EXPIRED)
{
- QDateTime now = QDateTime::currentDateTime();
+ TQDateTime now = TQDateTime::currentDateTime();
if (event.occursAfter(now, true))
{
if (event.recurs() || event.repeatCount())
@@ -501,9 +501,9 @@ UpdateStatus enableEvent(KAEvent& event, AlarmListView* selectionView, bool enab
/******************************************************************************
* Display an error message about an error saving an event.
*/
-void displayUpdateError(QWidget* parent, UpdateStatus, UpdateError code, int nAlarms)
+void displayUpdateError(TQWidget* parent, UpdateStatus, UpdateError code, int nAlarms)
{
- QString errmsg;
+ TQString errmsg;
switch (code)
{
case ERR_ADD:
@@ -528,9 +528,9 @@ void displayUpdateError(QWidget* parent, UpdateStatus, UpdateError code, int nAl
/******************************************************************************
* Display an error message corresponding to a specified alarm update error code.
*/
-void displayKOrgUpdateError(QWidget* parent, KOrgUpdateError code, int nAlarms)
+void displayKOrgUpdateError(TQWidget* parent, KOrgUpdateError code, int nAlarms)
{
- QString errmsg;
+ TQString errmsg;
switch (code)
{
case KORG_ERR_ADD:
@@ -551,7 +551,7 @@ void displayKOrgUpdateError(QWidget* parent, KOrgUpdateError code, int nAlarms)
/******************************************************************************
* Display the alarm edit dialogue to edit a specified alarm.
*/
-bool edit(const QString& eventID)
+bool edit(const TQString& eventID)
{
AlarmCalendar* cal;
switch (KAEvent::uidStatus(eventID))
@@ -581,7 +581,7 @@ bool edit(const QString& eventID)
* Display the alarm edit dialogue to edit a new alarm, optionally preset with
* a template.
*/
-bool editNew(const QString& templateName)
+bool editNew(const TQString& templateName)
{
bool result = true;
if (!templateName.isEmpty())
@@ -607,9 +607,9 @@ bool editNew(const QString& templateName)
* Returns a list of all alarm templates.
* If shell commands are disabled, command alarm templates are omitted.
*/
-QValueList<KAEvent> templateList()
+TQValueList<KAEvent> templateList()
{
- QValueList<KAEvent> templates;
+ TQValueList<KAEvent> templates;
AlarmCalendar* cal = AlarmCalendar::templateCalendarOpen();
if (cal)
{
@@ -631,7 +631,7 @@ QValueList<KAEvent> templateList()
* Prompt the user to re-enable alarms if they are currently disabled, and if
* it's an email alarm, warn if no 'From' email address is configured.
*/
-void outputAlarmWarnings(QWidget* parent, const KAEvent* event)
+void outputAlarmWarnings(TQWidget* parent, const KAEvent* event)
{
if (event && event->action() == KAEvent::EMAIL
&& Preferences::emailAddress().isEmpty())
@@ -641,8 +641,8 @@ void outputAlarmWarnings(QWidget* parent, const KAEvent* event)
if (!Daemon::monitoringAlarms())
{
if (KMessageBox::warningYesNo(parent, i18n("Alarms are currently disabled.\nDo you want to enable alarms now?"),
- QString::null, i18n("Enable"), i18n("Keep Disabled"),
- QString::fromLatin1("EditEnableAlarms"))
+ TQString::null, i18n("Enable"), i18n("Keep Disabled"),
+ TQString::fromLatin1("EditEnableAlarms"))
== KMessageBox::Yes)
Daemon::setAlarmsEnabled();
}
@@ -703,13 +703,13 @@ void resetDaemonIfQueued()
* Reply = reason for failure to run KMail (which may be the empty string)
* = null string if success.
*/
-QString runKMail(bool minimise)
+TQString runKMail(bool minimise)
{
- QCString dcopName;
- QString errmsg;
+ TQCString dcopName;
+ TQString errmsg;
if (!runProgram("kmail", (minimise ? KMAIL_DCOP_WINDOW : ""), dcopName, errmsg))
return i18n("Unable to start KMail\n(%1)").arg(errmsg);
- return QString::null;
+ return TQString::null;
}
/******************************************************************************
@@ -719,12 +719,12 @@ QString runKMail(bool minimise)
* 'errorMessage' contains an error message if failure.
* Reply = true if the program is now running.
*/
-bool runProgram(const QCString& program, const QCString& windowName, QCString& dcopName, QString& errorMessage)
+bool runProgram(const TQCString& program, const TQCString& windowName, TQCString& dcopName, TQString& errorMessage)
{
if (!kapp->dcopClient()->isApplicationRegistered(program))
{
// KOrganizer is not already running, so start it
- if (KApplication::startServiceByDesktopName(QString::fromLatin1(program), QString::null, &errorMessage, &dcopName))
+ if (KApplication::startServiceByDesktopName(TQString::fromLatin1(program), TQString::null, &errorMessage, &dcopName))
{
kdError(5950) << "runProgram(): couldn't start " << program << " (" << errorMessage << ")\n";
return false;
@@ -732,11 +732,11 @@ bool runProgram(const QCString& program, const QCString& windowName, QCString& d
// Minimise its window - don't use hide() since this would remove all
// trace of it from the panel if it is not configured to be docked in
// the system tray.
- kapp->dcopClient()->send(dcopName, windowName, "minimize()", QString::null);
+ kapp->dcopClient()->send(dcopName, windowName, "minimize()", TQString::null);
}
else if (dcopName.isEmpty())
dcopName = program;
- errorMessage = QString::null;
+ errorMessage = TQString::null;
return true;
}
@@ -746,13 +746,13 @@ bool runProgram(const QCString& program, const QCString& windowName, QCString& d
* Reply = true if size set in the config file, in which case 'result' is set
* = false if no size is set, in which case 'result' is unchanged.
*/
-bool readConfigWindowSize(const char* window, QSize& result)
+bool readConfigWindowSize(const char* window, TQSize& result)
{
KConfig* config = KGlobal::config();
- config->setGroup(QString::fromLatin1(window));
- QWidget* desktop = KApplication::desktop();
- QSize s = QSize(config->readNumEntry(QString::fromLatin1("Width %1").arg(desktop->width()), 0),
- config->readNumEntry(QString::fromLatin1("Height %1").arg(desktop->height()), 0));
+ config->setGroup(TQString::fromLatin1(window));
+ TQWidget* desktop = KApplication::desktop();
+ TQSize s = TQSize(config->readNumEntry(TQString::fromLatin1("Width %1").arg(desktop->width()), 0),
+ config->readNumEntry(TQString::fromLatin1("Height %1").arg(desktop->height()), 0));
if (s.isEmpty())
return false;
result = s;
@@ -763,13 +763,13 @@ bool readConfigWindowSize(const char* window, QSize& result)
* Write the size for the specified window to the config file, for the
* current screen resolution.
*/
-void writeConfigWindowSize(const char* window, const QSize& size)
+void writeConfigWindowSize(const char* window, const TQSize& size)
{
KConfig* config = KGlobal::config();
- config->setGroup(QString::fromLatin1(window));
- QWidget* desktop = KApplication::desktop();
- config->writeEntry(QString::fromLatin1("Width %1").arg(desktop->width()), size.width());
- config->writeEntry(QString::fromLatin1("Height %1").arg(desktop->height()), size.height());
+ config->setGroup(TQString::fromLatin1(window));
+ TQWidget* desktop = KApplication::desktop();
+ config->writeEntry(TQString::fromLatin1("Width %1").arg(desktop->width()), size.width());
+ config->writeEntry(TQString::fromLatin1("Height %1").arg(desktop->height()), size.height());
config->sync();
}
@@ -790,12 +790,12 @@ int Version()
* e.g. 010203 for 1.2.3
* = 0 if invalid version string.
*/
-int getVersionNumber(const QString& version, QString* subVersion)
+int getVersionNumber(const TQString& version, TQString* subVersion)
{
// N.B. Remember to change Version(int major, int minor, int rev)
// if the representation returned by this method changes.
if (subVersion)
- *subVersion = QString::null;
+ *subVersion = TQString::null;
int count = version.contains('.') + 1;
if (count < 2)
return 0;
@@ -810,7 +810,7 @@ int getVersionNumber(const QString& version, QString* subVersion)
if (count >= 3)
{
// Issue number: allow other characters to follow the last digit
- QString issue = version.section('.', 2);
+ TQString issue = version.section('.', 2);
if (!issue.at(0).isDigit())
return 0;
int n = issue.length();
@@ -829,7 +829,7 @@ int getVersionNumber(const QString& version, QString* subVersion)
* If a text file, its type is distinguished.
* Reply = file type.
*/
-FileType fileType(const QString& mimetype)
+FileType fileType(const TQString& mimetype)
{
static const char* applicationTypes[] = {
"x-shellscript", "x-nawk", "x-awk", "x-perl", "x-python",
@@ -837,20 +837,20 @@ FileType fileType(const QString& mimetype)
static const char* formattedTextTypes[] = {
"html", "xml", 0 };
- if (mimetype.startsWith(QString::fromLatin1("image/")))
+ if (mimetype.startsWith(TQString::fromLatin1("image/")))
return Image;
int slash = mimetype.find('/');
if (slash < 0)
return Unknown;
- QString type = mimetype.mid(slash + 1);
+ TQString type = mimetype.mid(slash + 1);
const char* typel = type.latin1();
- if (mimetype.startsWith(QString::fromLatin1("application")))
+ if (mimetype.startsWith(TQString::fromLatin1("application")))
{
for (int i = 0; applicationTypes[i]; ++i)
if (!strcmp(typel, applicationTypes[i]))
return TextApplication;
}
- else if (mimetype.startsWith(QString::fromLatin1("text")))
+ else if (mimetype.startsWith(TQString::fromLatin1("text")))
{
for (int i = 0; formattedTextTypes[i]; ++i)
if (!strcmp(typel, formattedTextTypes[i]))
@@ -870,20 +870,20 @@ FileType fileType(const QString& mimetype)
* @param mode OR of KFile::Mode values, e.g. ExistingOnly, LocalOnly.
* Reply = URL selected. If none is selected, URL.isEmpty() is true.
*/
-QString browseFile(const QString& caption, QString& defaultDir, const QString& initialFile,
- const QString& filter, int mode, QWidget* parent, const char* name)
+TQString browseFile(const TQString& caption, TQString& defaultDir, const TQString& initialFile,
+ const TQString& filter, int mode, TQWidget* parent, const char* name)
{
- QString initialDir = !initialFile.isEmpty() ? QString(initialFile).remove(QRegExp("/[^/]*$"))
+ TQString initialDir = !initialFile.isEmpty() ? TQString(initialFile).remove(TQRegExp("/[^/]*$"))
: !defaultDir.isEmpty() ? defaultDir
- : QDir::homeDirPath();
+ : TQDir::homeDirPath();
KFileDialog fileDlg(initialDir, filter, parent, name, true);
fileDlg.setOperationMode(mode & KFile::ExistingOnly ? KFileDialog::Opening : KFileDialog::Saving);
fileDlg.setMode(KFile::File | mode);
fileDlg.setCaption(caption);
if (!initialFile.isEmpty())
fileDlg.setSelection(initialFile);
- if (fileDlg.exec() != QDialog::Accepted)
- return QString::null;
+ if (fileDlg.exec() != TQDialog::Accepted)
+ return TQString::null;
KURL url = fileDlg.selectedURL();
defaultDir = url.path();
return (mode & KFile::LocalOnly) ? url.path() : url.prettyURL();
@@ -904,13 +904,13 @@ int localeFirstDayOfWeek()
/******************************************************************************
* Return the supplied string with any accelerator code stripped out.
*/
-QString stripAccel(const QString& text)
+TQString stripAccel(const TQString& text)
{
unsigned len = text.length();
- QString out = QDeepCopy<QString>(text);
- QChar *corig = (QChar*)out.unicode();
- QChar *cout = corig;
- QChar *cin = cout;
+ TQString out = TQDeepCopy<TQString>(text);
+ TQChar *corig = (TQChar*)out.unicode();
+ TQChar *cout = corig;
+ TQChar *cin = cout;
while (len)
{
if ( *cin == '&' )
@@ -955,10 +955,10 @@ namespace {
bool sendToKOrganizer(const KAEvent& event)
{
KCal::Event* kcalEvent = event.event();
- QString uid = KAEvent::uid(event.id(), KAEvent::KORGANIZER);
+ TQString uid = KAEvent::uid(event.id(), KAEvent::KORGANIZER);
kcalEvent->setUid(uid);
kcalEvent->clearAlarms();
- QString userEmail;
+ TQString userEmail;
switch (event.action())
{
case KAEvent::MESSAGE:
@@ -969,37 +969,37 @@ bool sendToKOrganizer(const KAEvent& event)
break;
case KAEvent::EMAIL:
{
- QString from = event.emailFromId()
+ TQString from = event.emailFromId()
? KAMail::identityManager()->identityForUoid(event.emailFromId()).fullEmailAddr()
: Preferences::emailAddress();
AlarmText atext;
- atext.setEmail(event.emailAddresses(", "), from, QString::null, QString::null, event.emailSubject(), QString::null);
+ atext.setEmail(event.emailAddresses(", "), from, TQString::null, TQString::null, event.emailSubject(), TQString::null);
kcalEvent->setSummary(atext.displayText());
userEmail = from;
break;
}
}
- kcalEvent->setOrganizer(KCal::Person(QString::null, userEmail));
+ kcalEvent->setOrganizer(KCal::Person(TQString::null, userEmail));
// Translate the event into string format
KCal::ICalFormat format;
- format.setTimeZone(QString::null, false);
- QString iCal = format.toICalString(kcalEvent);
+ format.setTimeZone(TQString::null, false);
+ TQString iCal = format.toICalString(kcalEvent);
kdDebug(5950)<<"Korg->"<<iCal<<endl;
delete kcalEvent;
// Send the event to KOrganizer
if (!runKOrganizer()) // start KOrganizer if it isn't already running
return false;
- QByteArray data, replyData;
- QCString replyType;
- QDataStream arg(data, IO_WriteOnly);
+ TQByteArray data, replyData;
+ TQCString replyType;
+ TQDataStream arg(data, IO_WriteOnly);
arg << iCal;
- if (kapp->dcopClient()->call(korganizerName, KORG_DCOP_OBJECT, "addIncidence(QString)", data, replyType, replyData)
+ if (kapp->dcopClient()->call(korganizerName, KORG_DCOP_OBJECT, "addIncidence(TQString)", data, replyType, replyData)
&& replyType == "bool")
{
bool result;
- QDataStream reply(replyData, IO_ReadOnly);
+ TQDataStream reply(replyData, IO_ReadOnly);
reply >> result;
if (result)
{
@@ -1014,20 +1014,20 @@ kdDebug(5950)<<"Korg->"<<iCal<<endl;
/******************************************************************************
* Tell KOrganizer to delete an event from its calendar.
*/
-bool deleteFromKOrganizer(const QString& eventID)
+bool deleteFromKOrganizer(const TQString& eventID)
{
if (!runKOrganizer()) // start KOrganizer if it isn't already running
return false;
- QString newID = KAEvent::uid(eventID, KAEvent::KORGANIZER);
- QByteArray data, replyData;
- QCString replyType;
- QDataStream arg(data, IO_WriteOnly);
+ TQString newID = KAEvent::uid(eventID, KAEvent::KORGANIZER);
+ TQByteArray data, replyData;
+ TQCString replyType;
+ TQDataStream arg(data, IO_WriteOnly);
arg << newID << true;
- if (kapp->dcopClient()->call(korganizerName, KORG_DCOP_OBJECT, "deleteIncidence(QString,bool)", data, replyType, replyData)
+ if (kapp->dcopClient()->call(korganizerName, KORG_DCOP_OBJECT, "deleteIncidence(TQString,bool)", data, replyType, replyData)
&& replyType == "bool")
{
bool result;
- QDataStream reply(replyData, IO_ReadOnly);
+ TQDataStream reply(replyData, IO_ReadOnly);
reply >> result;
if (result)
{
@@ -1044,9 +1044,9 @@ bool deleteFromKOrganizer(const QString& eventID)
*/
bool runKOrganizer()
{
- QString error;
- QCString dcopService;
- int result = KDCOPServiceStarter::self()->findServiceFor("DCOP/Organizer", QString::null, QString::null, &error, &dcopService);
+ TQString error;
+ TQCString dcopService;
+ int result = KDCOPServiceStarter::self()->findServiceFor("DCOP/Organizer", TQString::null, TQString::null, &error, &dcopService);
if (result)
{
kdDebug(5950) << "Unable to start DCOP/Organizer: " << dcopService << " " << error << endl;
@@ -1055,8 +1055,8 @@ bool runKOrganizer()
// If Kontact is running, there is be a load() method which needs to be called
// to load KOrganizer into Kontact. But if KOrganizer is running independently,
// the load() method doesn't exist.
- QCString dummy;
- if (!kapp->dcopClient()->findObject(dcopService, KORG_DCOP_OBJECT, "", QByteArray(), dummy, dummy))
+ TQCString dummy;
+ if (!kapp->dcopClient()->findObject(dcopService, KORG_DCOP_OBJECT, "", TQByteArray(), dummy, dummy))
{
DCOPRef ref(dcopService, dcopService); // talk to the KUniqueApplication or its Kontact wrapper
DCOPReply reply = ref.call("load()");
@@ -1065,7 +1065,7 @@ bool runKOrganizer()
kdWarning(5950) << "Error loading " << dcopService << endl;
return false;
}
- if (!kapp->dcopClient()->findObject(dcopService, KORG_DCOP_OBJECT, "", QByteArray(), dummy, dummy))
+ if (!kapp->dcopClient()->findObject(dcopService, KORG_DCOP_OBJECT, "", TQByteArray(), dummy, dummy))
{
kdWarning(5950) << "Unable to access KOrganizer's "KORG_DCOP_OBJECT" DCOP object" << endl;
return false;
@@ -1079,7 +1079,7 @@ bool runKOrganizer()
#ifdef HAVE_XTEST
#include <X11/keysym.h>
#include <X11/extensions/XTest.h>
-#include <qwindowdefs.h>
+#include <tqwindowdefs.h>
/******************************************************************************
* Cancel the screen saver, in case it is active.
diff --git a/kalarm/functions.h b/kalarm/functions.h
index c5337cc48..359eca65d 100644
--- a/kalarm/functions.h
+++ b/kalarm/functions.h
@@ -23,8 +23,8 @@
/** @file functions.h - miscellaneous functions */
-#include <qsize.h>
-#include <qstring.h>
+#include <tqsize.h>
+#include <tqstring.h>
#include "alarmevent.h"
@@ -62,54 +62,54 @@ enum KOrgUpdateError { KORG_ERR_ADD, KORG_ERR_MODIFY, KORG_ERR_DELETE };
/** Display a main window with the specified event selected */
-MainWindow* displayMainWindowSelected(const QString& eventID = QString::null);
-bool readConfigWindowSize(const char* window, QSize&);
-void writeConfigWindowSize(const char* window, const QSize&);
+MainWindow* displayMainWindowSelected(const TQString& eventID = TQString::null);
+bool readConfigWindowSize(const char* window, TQSize&);
+void writeConfigWindowSize(const char* window, const TQSize&);
/** Check from its mime type whether a file appears to be a text or image file.
* If a text file, its type is distinguished.
*/
-FileType fileType(const QString& mimetype);
+FileType fileType(const TQString& mimetype);
/** Return current KAlarm version number */
int Version();
inline int Version(int major, int minor, int rev) { return major*10000 + minor*100 + rev; }
-int getVersionNumber(const QString& version, QString* subVersion = 0);
+int getVersionNumber(const TQString& version, TQString* subVersion = 0);
/** Return which version of KAlarm was the first to use the current calendar/event format */
inline int currentCalendarVersion() { return KAEvent::calVersion(); }
-inline QString currentCalendarVersionString() { return KAEvent::calVersionString(); }
-QString browseFile(const QString& caption, QString& defaultDir, const QString& initialFile = QString::null,
- const QString& filter = QString::null, int mode = 0, QWidget* parent = 0, const char* name = 0);
-bool edit(const QString& eventID);
-bool editNew(const QString& templateName = QString::null);
+inline TQString currentCalendarVersionString() { return KAEvent::calVersionString(); }
+TQString browseFile(const TQString& caption, TQString& defaultDir, const TQString& initialFile = TQString::null,
+ const TQString& filter = TQString::null, int mode = 0, TQWidget* parent = 0, const char* name = 0);
+bool edit(const TQString& eventID);
+bool editNew(const TQString& templateName = TQString::null);
/** Create a "New Alarm" KAction */
-KAction* createNewAlarmAction(const QString& label, QObject* receiver, const char* slot, KActionCollection*, const char* name);
+KAction* createNewAlarmAction(const TQString& label, TQObject* receiver, const char* slot, KActionCollection*, const char* name);
/** Create a "New From Template" KAction */
-TemplateMenuAction* createNewFromTemplateAction(const QString& label, QObject* receiver, const char* slot, KActionCollection*, const char* name);
+TemplateMenuAction* createNewFromTemplateAction(const TQString& label, TQObject* receiver, const char* slot, KActionCollection*, const char* name);
/** Returns a list of all alarm templates.
* If shell commands are disabled, command alarm templates are omitted.
*/
-QValueList<KAEvent> templateList();
-void outputAlarmWarnings(QWidget* parent, const KAEvent* = 0);
+TQValueList<KAEvent> templateList();
+void outputAlarmWarnings(TQWidget* parent, const KAEvent* = 0);
void resetDaemon();
void resetDaemonIfQueued(); // must only be called from KAlarmApp::processQueue()
-QString runKMail(bool minimise);
-bool runProgram(const QCString& program, const QCString& windowName, QCString& dcopName, QString& errorMessage);
+TQString runKMail(bool minimise);
+bool runProgram(const TQCString& program, const TQCString& windowName, TQCString& dcopName, TQString& errorMessage);
-UpdateStatus addEvent(KAEvent&, AlarmListView* selectionView, QWidget* errmsgParent = 0, bool useEventID = false, bool allowKOrgUpdate = true);
+UpdateStatus addEvent(KAEvent&, AlarmListView* selectionView, TQWidget* errmsgParent = 0, bool useEventID = false, bool allowKOrgUpdate = true);
bool addExpiredEvent(KAEvent&);
-UpdateStatus addTemplate(KAEvent&, TemplateListView* selectionView, QWidget* errmsgParent = 0);
-UpdateStatus modifyEvent(KAEvent& oldEvent, const KAEvent& newEvent, AlarmListView* selectionView, QWidget* errmsgParent = 0);
-UpdateStatus updateEvent(KAEvent&, AlarmListView* selectionView, QWidget* errmsgParent = 0, bool archiveOnDelete = true, bool incRevision = true);
-UpdateStatus updateTemplate(const KAEvent&, TemplateListView* selectionView, QWidget* errmsgParent = 0);
-UpdateStatus deleteEvent(KAEvent&, bool archive = true, QWidget* errmsgParent = 0);
+UpdateStatus addTemplate(KAEvent&, TemplateListView* selectionView, TQWidget* errmsgParent = 0);
+UpdateStatus modifyEvent(KAEvent& oldEvent, const KAEvent& newEvent, AlarmListView* selectionView, TQWidget* errmsgParent = 0);
+UpdateStatus updateEvent(KAEvent&, AlarmListView* selectionView, TQWidget* errmsgParent = 0, bool archiveOnDelete = true, bool incRevision = true);
+UpdateStatus updateTemplate(const KAEvent&, TemplateListView* selectionView, TQWidget* errmsgParent = 0);
+UpdateStatus deleteEvent(KAEvent&, bool archive = true, TQWidget* errmsgParent = 0);
UpdateStatus deleteTemplate(const KAEvent&);
-void deleteDisplayEvent(const QString& eventID);
+void deleteDisplayEvent(const TQString& eventID);
UpdateStatus reactivateEvent(KAEvent&, AlarmListView* selectionView, bool useEventID = false);
UpdateStatus enableEvent(KAEvent&, AlarmListView* selectionView, bool enable);
-void displayUpdateError(QWidget* parent, UpdateStatus, UpdateError, int nAlarms);
-void displayKOrgUpdateError(QWidget* parent, KOrgUpdateError, int nAlarms);
+void displayUpdateError(TQWidget* parent, UpdateStatus, UpdateError, int nAlarms);
+void displayKOrgUpdateError(TQWidget* parent, KOrgUpdateError, int nAlarms);
void cancelScreenSaver();
-QString stripAccel(const QString&);
+TQString stripAccel(const TQString&);
int localeFirstDayOfWeek();
diff --git a/kalarm/kalarmapp.cpp b/kalarm/kalarmapp.cpp
index b222eeece..f4daec9c2 100644
--- a/kalarm/kalarmapp.cpp
+++ b/kalarm/kalarmapp.cpp
@@ -24,10 +24,10 @@
#include <ctype.h>
#include <iostream>
-#include <qobjectlist.h>
-#include <qtimer.h>
-#include <qregexp.h>
-#include <qfile.h>
+#include <tqobjectlist.h>
+#include <tqtimer.h>
+#include <tqregexp.h>
+#include <tqfile.h>
#include <kcmdlineargs.h>
#include <klocale.h>
@@ -68,8 +68,8 @@
#include <netwm.h>
-static bool convWakeTime(const QCString& timeParam, QDateTime&, bool& noTime);
-static bool convInterval(const QCString& timeParam, KARecurrence::Type&, int& timeInterval, bool allowMonthYear = false);
+static bool convWakeTime(const TQCString& timeParam, TQDateTime&, bool& noTime);
+static bool convInterval(const TQCString& timeParam, KARecurrence::Type&, int& timeInterval, bool allowMonthYear = false);
/******************************************************************************
* Find the maximum number of seconds late which a late-cancel alarm is allowed
@@ -87,7 +87,7 @@ static inline int maxLateness(int lateCancel)
KAlarmApp* KAlarmApp::theInstance = 0;
int KAlarmApp::mActiveCount = 0;
int KAlarmApp::mFatalError = 0;
-QString KAlarmApp::mFatalMessage;
+TQString KAlarmApp::mFatalMessage;
/******************************************************************************
@@ -109,7 +109,7 @@ KAlarmApp::KAlarmApp()
mSpeechEnabled(false)
{
Preferences::initialise();
- Preferences::connect(SIGNAL(preferencesChanged()), this, SLOT(slotPreferencesChanged()));
+ Preferences::connect(TQT_SIGNAL(preferencesChanged()), this, TQT_SLOT(slotPreferencesChanged()));
KCal::CalFormat::setApplication(aboutData()->programName(), AlarmCalendar::icalProductId());
KARecurrence::setDefaultFeb29Type(Preferences::defaultFeb29Type());
@@ -118,11 +118,11 @@ KAlarmApp::KAlarmApp()
if (AlarmCalendar::initialiseCalendars())
{
- connect(AlarmCalendar::expiredCalendar(), SIGNAL(purged()), SLOT(slotExpiredPurged()));
+ connect(AlarmCalendar::expiredCalendar(), TQT_SIGNAL(purged()), TQT_SLOT(slotExpiredPurged()));
KConfig* config = kapp->config();
- config->setGroup(QString::fromLatin1("General"));
- mNoSystemTray = config->readBoolEntry(QString::fromLatin1("NoSystemTray"), false);
+ config->setGroup(TQString::fromLatin1("General"));
+ mNoSystemTray = config->readBoolEntry(TQString::fromLatin1("NoSystemTray"), false);
mSavedNoSystemTray = mNoSystemTray;
mOldRunInSystemTray = wantRunInSystemTray();
mDisableAlarmsIfStopped = mOldRunInSystemTray && !mNoSystemTray && Preferences::disableAlarmsIfStopped();
@@ -139,7 +139,7 @@ KAlarmApp::KAlarmApp()
if (!mSpeechEnabled)
kdDebug(5950) << "KAlarmApp::KAlarmApp(): speech synthesis disabled (KTTSD not found)" << endl;
// Check if KOrganizer is installed
- QString korg = QString::fromLatin1("korganizer");
+ TQString korg = TQString::fromLatin1("korganizer");
mKOrganizerEnabled = !locate("exe", korg).isNull() || !KStandardDirs::findExe(korg).isNull();
if (!mKOrganizerEnabled)
kdDebug(5950) << "KAlarmApp::KAlarmApp(): KOrganizer options disabled (KOrganizer not found)" << endl;
@@ -204,8 +204,8 @@ bool KAlarmApp::restoreSession()
MainWindow* trayParent = 0;
for (int i = 1; KMainWindow::canBeRestored(i); ++i)
{
- QString type = KMainWindow::classNameOfToplevel(i);
- if (type == QString::fromLatin1("MainWindow"))
+ TQString type = KMainWindow::classNameOfToplevel(i);
+ if (type == TQString::fromLatin1("MainWindow"))
{
MainWindow* win = MainWindow::create(true);
win->restore(i, false);
@@ -214,7 +214,7 @@ bool KAlarmApp::restoreSession()
else
win->show();
}
- else if (type == QString::fromLatin1("MessageWin"))
+ else if (type == TQString::fromLatin1("MessageWin"))
{
MessageWin* win = new MessageWin;
win->restore(i, false);
@@ -261,7 +261,7 @@ int KAlarmApp::newInstance()
bool dontRedisplay = false;
if (!firstInstance || !isRestored())
{
- QString usage;
+ TQString usage;
KCmdLineArgs* args = KCmdLineArgs::parsedArgs();
// Use a 'do' loop which is executed only once to allow easy error exits.
@@ -329,9 +329,9 @@ int KAlarmApp::newInstance()
if (args->isSet("triggerEvent")) { function = EVENT_TRIGGER; option = "triggerEvent"; ++count; }
if (args->isSet("cancelEvent")) { function = EVENT_CANCEL; option = "cancelEvent"; ++count; }
if (!count)
- USAGE(i18n("%1 requires %2, %3 or %4").arg(QString::fromLatin1("--calendarURL")).arg(QString::fromLatin1("--handleEvent")).arg(QString::fromLatin1("--triggerEvent")).arg(QString::fromLatin1("--cancelEvent")))
+ USAGE(i18n("%1 requires %2, %3 or %4").arg(TQString::fromLatin1("--calendarURL")).arg(TQString::fromLatin1("--handleEvent")).arg(TQString::fromLatin1("--triggerEvent")).arg(TQString::fromLatin1("--cancelEvent")))
if (count > 1)
- USAGE(i18n("%1, %2, %3 mutually exclusive").arg(QString::fromLatin1("--handleEvent")).arg(QString::fromLatin1("--triggerEvent")).arg(QString::fromLatin1("--cancelEvent")));
+ USAGE(i18n("%1, %2, %3 mutually exclusive").arg(TQString::fromLatin1("--handleEvent")).arg(TQString::fromLatin1("--triggerEvent")).arg(TQString::fromLatin1("--cancelEvent")));
if (!initCheck(true)) // open the calendar, don't register with daemon yet
{
exitCode = 1;
@@ -339,13 +339,13 @@ int KAlarmApp::newInstance()
}
if (args->isSet("calendarURL"))
{
- QString calendarUrl = args->getOption("calendarURL");
+ TQString calendarUrl = args->getOption("calendarURL");
if (KURL(calendarUrl).url() != AlarmCalendar::activeCalendar()->urlString())
- USAGE(i18n("%1: wrong calendar file").arg(QString::fromLatin1("--calendarURL")))
+ USAGE(i18n("%1: wrong calendar file").arg(TQString::fromLatin1("--calendarURL")))
}
- QString eventID = args->getOption(option);
+ TQString eventID = args->getOption(option);
args->clear(); // free up memory
- if (eventID.startsWith(QString::fromLatin1("ad:")))
+ if (eventID.startsWith(TQString::fromLatin1("ad:")))
{
// It's a notification from the alarm deamon
eventID = eventID.mid(3);
@@ -361,7 +361,7 @@ int KAlarmApp::newInstance()
else
if (args->isSet("edit"))
{
- QString eventID = args->getOption("edit");
+ TQString eventID = args->getOption("edit");
if (!initCheck())
{
exitCode = 1;
@@ -369,7 +369,7 @@ int KAlarmApp::newInstance()
}
if (!KAlarm::edit(eventID))
{
- USAGE(i18n("%1: Event %2 not found, or not editable").arg(QString::fromLatin1("--edit")).arg(eventID))
+ USAGE(i18n("%1: Event %2 not found, or not editable").arg(TQString::fromLatin1("--edit")).arg(eventID))
exitCode = 1;
break;
}
@@ -377,7 +377,7 @@ int KAlarmApp::newInstance()
else
if (args->isSet("edit-new") || args->isSet("edit-new-preset"))
{
- QString templ;
+ TQString templ;
if (args->isSet("edit-new-preset"))
templ = args->getOption("edit-new-preset");
if (!initCheck())
@@ -392,20 +392,20 @@ int KAlarmApp::newInstance()
{
// Display a message or file, execute a command, or send an email
KAEvent::Action action = KAEvent::MESSAGE;
- QCString alMessage;
+ TQCString alMessage;
uint alFromID = 0;
EmailAddressList alAddresses;
- QStringList alAttachments;
- QCString alSubject;
+ TQStringList alAttachments;
+ TQCString alSubject;
if (args->isSet("file"))
{
kdDebug(5950)<<"KAlarmApp::newInstance(): file\n";
if (args->isSet("exec"))
- USAGE(i18n("%1 incompatible with %2").arg(QString::fromLatin1("--exec")).arg(QString::fromLatin1("--file")))
+ USAGE(i18n("%1 incompatible with %2").arg(TQString::fromLatin1("--exec")).arg(TQString::fromLatin1("--file")))
if (args->isSet("mail"))
- USAGE(i18n("%1 incompatible with %2").arg(QString::fromLatin1("--mail")).arg(QString::fromLatin1("--file")))
+ USAGE(i18n("%1 incompatible with %2").arg(TQString::fromLatin1("--mail")).arg(TQString::fromLatin1("--file")))
if (args->count())
- USAGE(i18n("message incompatible with %1").arg(QString::fromLatin1("--file")))
+ USAGE(i18n("message incompatible with %1").arg(TQString::fromLatin1("--file")))
alMessage = args->getOption("file");
action = KAEvent::FILE;
}
@@ -413,7 +413,7 @@ int KAlarmApp::newInstance()
{
kdDebug(5950)<<"KAlarmApp::newInstance(): exec\n";
if (args->isSet("mail"))
- USAGE(i18n("%1 incompatible with %2").arg(QString::fromLatin1("--mail")).arg(QString::fromLatin1("--exec")))
+ USAGE(i18n("%1 incompatible with %2").arg(TQString::fromLatin1("--mail")).arg(TQString::fromLatin1("--exec")))
alMessage = args->getOption("exec");
int n = args->count();
for (int i = 0; i < n; ++i)
@@ -433,14 +433,14 @@ int KAlarmApp::newInstance()
QCStringList params = args->getOptionList("mail");
for (QCStringList::Iterator i = params.begin(); i != params.end(); ++i)
{
- QString addr = QString::fromLocal8Bit(*i);
+ TQString addr = TQString::fromLocal8Bit(*i);
if (!KAMail::checkAddress(addr))
- USAGE(i18n("%1: invalid email address").arg(QString::fromLatin1("--mail")))
- alAddresses += KCal::Person(QString::null, addr);
+ USAGE(i18n("%1: invalid email address").arg(TQString::fromLatin1("--mail")))
+ alAddresses += KCal::Person(TQString::null, addr);
}
params = args->getOptionList("attach");
for (QCStringList::Iterator i = params.begin(); i != params.end(); ++i)
- alAttachments += QString::fromLocal8Bit(*i);
+ alAttachments += TQString::fromLocal8Bit(*i);
alMessage = args->arg(0);
action = KAEvent::EMAIL;
}
@@ -453,87 +453,87 @@ int KAlarmApp::newInstance()
if (action != KAEvent::EMAIL)
{
if (args->isSet("subject"))
- USAGE(i18n("%1 requires %2").arg(QString::fromLatin1("--subject")).arg(QString::fromLatin1("--mail")))
+ USAGE(i18n("%1 requires %2").arg(TQString::fromLatin1("--subject")).arg(TQString::fromLatin1("--mail")))
if (args->isSet("from-id"))
- USAGE(i18n("%1 requires %2").arg(QString::fromLatin1("--from-id")).arg(QString::fromLatin1("--mail")))
+ USAGE(i18n("%1 requires %2").arg(TQString::fromLatin1("--from-id")).arg(TQString::fromLatin1("--mail")))
if (args->isSet("attach"))
- USAGE(i18n("%1 requires %2").arg(QString::fromLatin1("--attach")).arg(QString::fromLatin1("--mail")))
+ USAGE(i18n("%1 requires %2").arg(TQString::fromLatin1("--attach")).arg(TQString::fromLatin1("--mail")))
if (args->isSet("bcc"))
- USAGE(i18n("%1 requires %2").arg(QString::fromLatin1("--bcc")).arg(QString::fromLatin1("--mail")))
+ USAGE(i18n("%1 requires %2").arg(TQString::fromLatin1("--bcc")).arg(TQString::fromLatin1("--mail")))
}
bool alarmNoTime = false;
- QDateTime alarmTime, endTime;
- QColor bgColour = Preferences::defaultBgColour();
- QColor fgColour = Preferences::defaultFgColour();
+ TQDateTime alarmTime, endTime;
+ TQColor bgColour = Preferences::defaultBgColour();
+ TQColor fgColour = Preferences::defaultFgColour();
KARecurrence recurrence;
int repeatCount = 0;
int repeatInterval = 0;
if (args->isSet("color"))
{
// Background colour is specified
- QCString colourText = args->getOption("color");
+ TQCString colourText = args->getOption("color");
if (static_cast<const char*>(colourText)[0] == '0'
&& tolower(static_cast<const char*>(colourText)[1]) == 'x')
colourText.replace(0, 2, "#");
bgColour.setNamedColor(colourText);
if (!bgColour.isValid())
- USAGE(i18n("Invalid %1 parameter").arg(QString::fromLatin1("--color")))
+ USAGE(i18n("Invalid %1 parameter").arg(TQString::fromLatin1("--color")))
}
if (args->isSet("colorfg"))
{
// Foreground colour is specified
- QCString colourText = args->getOption("colorfg");
+ TQCString colourText = args->getOption("colorfg");
if (static_cast<const char*>(colourText)[0] == '0'
&& tolower(static_cast<const char*>(colourText)[1]) == 'x')
colourText.replace(0, 2, "#");
fgColour.setNamedColor(colourText);
if (!fgColour.isValid())
- USAGE(i18n("Invalid %1 parameter").arg(QString::fromLatin1("--colorfg")))
+ USAGE(i18n("Invalid %1 parameter").arg(TQString::fromLatin1("--colorfg")))
}
if (args->isSet("time"))
{
- QCString dateTime = args->getOption("time");
+ TQCString dateTime = args->getOption("time");
if (!convWakeTime(dateTime, alarmTime, alarmNoTime))
- USAGE(i18n("Invalid %1 parameter").arg(QString::fromLatin1("--time")))
+ USAGE(i18n("Invalid %1 parameter").arg(TQString::fromLatin1("--time")))
}
else
- alarmTime = QDateTime::currentDateTime();
+ alarmTime = TQDateTime::currentDateTime();
bool haveRecurrence = args->isSet("recurrence");
if (haveRecurrence)
{
if (args->isSet("login"))
- USAGE(i18n("%1 incompatible with %2").arg(QString::fromLatin1("--login")).arg(QString::fromLatin1("--recurrence")))
+ USAGE(i18n("%1 incompatible with %2").arg(TQString::fromLatin1("--login")).arg(TQString::fromLatin1("--recurrence")))
if (args->isSet("until"))
- USAGE(i18n("%1 incompatible with %2").arg(QString::fromLatin1("--until")).arg(QString::fromLatin1("--recurrence")))
- QCString rule = args->getOption("recurrence");
- recurrence.set(QString::fromLocal8Bit(static_cast<const char*>(rule)));
+ USAGE(i18n("%1 incompatible with %2").arg(TQString::fromLatin1("--until")).arg(TQString::fromLatin1("--recurrence")))
+ TQCString rule = args->getOption("recurrence");
+ recurrence.set(TQString::fromLocal8Bit(static_cast<const char*>(rule)));
}
if (args->isSet("interval"))
{
// Repeat count is specified
int count;
if (args->isSet("login"))
- USAGE(i18n("%1 incompatible with %2").arg(QString::fromLatin1("--login")).arg(QString::fromLatin1("--interval")))
+ USAGE(i18n("%1 incompatible with %2").arg(TQString::fromLatin1("--login")).arg(TQString::fromLatin1("--interval")))
bool ok;
if (args->isSet("repeat"))
{
count = args->getOption("repeat").toInt(&ok);
if (!ok || !count || count < -1 || (count < 0 && haveRecurrence))
- USAGE(i18n("Invalid %1 parameter").arg(QString::fromLatin1("--repeat")))
+ USAGE(i18n("Invalid %1 parameter").arg(TQString::fromLatin1("--repeat")))
}
else if (haveRecurrence)
- USAGE(i18n("%1 requires %2").arg(QString::fromLatin1("--interval")).arg(QString::fromLatin1("--repeat")))
+ USAGE(i18n("%1 requires %2").arg(TQString::fromLatin1("--interval")).arg(TQString::fromLatin1("--repeat")))
else if (args->isSet("until"))
{
count = 0;
- QCString dateTime = args->getOption("until");
+ TQCString dateTime = args->getOption("until");
if (!convWakeTime(dateTime, endTime, alarmNoTime))
- USAGE(i18n("Invalid %1 parameter").arg(QString::fromLatin1("--until")))
+ USAGE(i18n("Invalid %1 parameter").arg(TQString::fromLatin1("--until")))
if (endTime < alarmTime)
- USAGE(i18n("%1 earlier than %2").arg(QString::fromLatin1("--until")).arg(QString::fromLatin1("--time")))
+ USAGE(i18n("%1 earlier than %2").arg(TQString::fromLatin1("--until")).arg(TQString::fromLatin1("--time")))
}
else
count = -1;
@@ -543,16 +543,16 @@ int KAlarmApp::newInstance()
KARecurrence::Type recurType;
if (!convInterval(args->getOption("interval"), recurType, interval, !haveRecurrence)
|| interval < 0)
- USAGE(i18n("Invalid %1 parameter").arg(QString::fromLatin1("--interval")))
+ USAGE(i18n("Invalid %1 parameter").arg(TQString::fromLatin1("--interval")))
if (alarmNoTime && recurType == KARecurrence::MINUTELY)
- USAGE(i18n("Invalid %1 parameter for date-only alarm").arg(QString::fromLatin1("--interval")))
+ USAGE(i18n("Invalid %1 parameter for date-only alarm").arg(TQString::fromLatin1("--interval")))
if (haveRecurrence)
{
// There is a also a recurrence specified, so set up a sub-repetition
int longestInterval = recurrence.longestInterval();
if (count * interval > longestInterval)
- USAGE(i18n("Invalid %1 and %2 parameters: repetition is longer than %3 interval").arg(QString::fromLatin1("--interval")).arg(QString::fromLatin1("--repeat")).arg(QString::fromLatin1("--recurrence")));
+ USAGE(i18n("Invalid %1 and %2 parameters: repetition is longer than %3 interval").arg(TQString::fromLatin1("--interval")).arg(TQString::fromLatin1("--repeat")).arg(TQString::fromLatin1("--recurrence")));
repeatCount = count;
repeatInterval = interval;
}
@@ -566,12 +566,12 @@ int KAlarmApp::newInstance()
else
{
if (args->isSet("repeat"))
- USAGE(i18n("%1 requires %2").arg(QString::fromLatin1("--repeat")).arg(QString::fromLatin1("--interval")))
+ USAGE(i18n("%1 requires %2").arg(TQString::fromLatin1("--repeat")).arg(TQString::fromLatin1("--interval")))
if (args->isSet("until"))
- USAGE(i18n("%1 requires %2").arg(QString::fromLatin1("--until")).arg(QString::fromLatin1("--interval")))
+ USAGE(i18n("%1 requires %2").arg(TQString::fromLatin1("--until")).arg(TQString::fromLatin1("--interval")))
}
- QCString audioFile;
+ TQCString audioFile;
float audioVolume = -1;
#ifdef WITHOUT_ARTS
bool audioRepeat = false;
@@ -582,11 +582,11 @@ int KAlarmApp::newInstance()
{
// Play a sound with the alarm
if (audioRepeat && args->isSet("play"))
- USAGE(i18n("%1 incompatible with %2").arg(QString::fromLatin1("--play")).arg(QString::fromLatin1("--play-repeat")))
+ USAGE(i18n("%1 incompatible with %2").arg(TQString::fromLatin1("--play")).arg(TQString::fromLatin1("--play-repeat")))
if (args->isSet("beep"))
- USAGE(i18n("%1 incompatible with %2").arg(QString::fromLatin1("--beep")).arg(QString::fromLatin1(audioRepeat ? "--play-repeat" : "--play")))
+ USAGE(i18n("%1 incompatible with %2").arg(TQString::fromLatin1("--beep")).arg(TQString::fromLatin1(audioRepeat ? "--play-repeat" : "--play")))
if (args->isSet("speak"))
- USAGE(i18n("%1 incompatible with %2").arg(QString::fromLatin1("--speak")).arg(QString::fromLatin1(audioRepeat ? "--play-repeat" : "--play")))
+ USAGE(i18n("%1 incompatible with %2").arg(TQString::fromLatin1("--speak")).arg(TQString::fromLatin1(audioRepeat ? "--play-repeat" : "--play")))
audioFile = args->getOption(audioRepeat ? "play-repeat" : "play");
#ifndef WITHOUT_ARTS
if (args->isSet("volume"))
@@ -594,21 +594,21 @@ int KAlarmApp::newInstance()
bool ok;
int volumepc = args->getOption("volume").toInt(&ok);
if (!ok || volumepc < 0 || volumepc > 100)
- USAGE(i18n("Invalid %1 parameter").arg(QString::fromLatin1("--volume")))
+ USAGE(i18n("Invalid %1 parameter").arg(TQString::fromLatin1("--volume")))
audioVolume = static_cast<float>(volumepc) / 100;
}
#endif
}
#ifndef WITHOUT_ARTS
else if (args->isSet("volume"))
- USAGE(i18n("%1 requires %2 or %3").arg(QString::fromLatin1("--volume")).arg(QString::fromLatin1("--play")).arg(QString::fromLatin1("--play-repeat")))
+ USAGE(i18n("%1 requires %2 or %3").arg(TQString::fromLatin1("--volume")).arg(TQString::fromLatin1("--play")).arg(TQString::fromLatin1("--play-repeat")))
#endif
if (args->isSet("speak"))
{
if (args->isSet("beep"))
- USAGE(i18n("%1 incompatible with %2").arg(QString::fromLatin1("--beep")).arg(QString::fromLatin1("--speak")))
+ USAGE(i18n("%1 incompatible with %2").arg(TQString::fromLatin1("--beep")).arg(TQString::fromLatin1("--speak")))
if (!mSpeechEnabled)
- USAGE(i18n("%1 requires speech synthesis to be configured using KTTSD").arg(QString::fromLatin1("--speak")))
+ USAGE(i18n("%1 requires speech synthesis to be configured using KTTSD").arg(TQString::fromLatin1("--speak")))
}
int reminderMinutes = 0;
bool onceOnly = args->isSet("reminder-once");
@@ -616,14 +616,14 @@ int KAlarmApp::newInstance()
{
// Issue a reminder alarm in advance of the main alarm
if (onceOnly && args->isSet("reminder"))
- USAGE(i18n("%1 incompatible with %2").arg(QString::fromLatin1("--reminder")).arg(QString::fromLatin1("--reminder-once")))
- QString opt = onceOnly ? QString::fromLatin1("--reminder-once") : QString::fromLatin1("--reminder");
+ USAGE(i18n("%1 incompatible with %2").arg(TQString::fromLatin1("--reminder")).arg(TQString::fromLatin1("--reminder-once")))
+ TQString opt = onceOnly ? TQString::fromLatin1("--reminder-once") : TQString::fromLatin1("--reminder");
if (args->isSet("exec"))
- USAGE(i18n("%1 incompatible with %2").arg(opt).arg(QString::fromLatin1("--exec")))
+ USAGE(i18n("%1 incompatible with %2").arg(opt).arg(TQString::fromLatin1("--exec")))
if (args->isSet("mail"))
- USAGE(i18n("%1 incompatible with %2").arg(opt).arg(QString::fromLatin1("--mail")))
+ USAGE(i18n("%1 incompatible with %2").arg(opt).arg(TQString::fromLatin1("--mail")))
KARecurrence::Type recurType;
- QString optval = args->getOption(onceOnly ? "reminder-once" : "reminder");
+ TQString optval = args->getOption(onceOnly ? "reminder-once" : "reminder");
if (!convInterval(args->getOption(onceOnly ? "reminder-once" : "reminder"), recurType, reminderMinutes))
USAGE(i18n("Invalid %1 parameter").arg(opt))
if (recurType == KARecurrence::MINUTELY && alarmNoTime)
@@ -636,10 +636,10 @@ int KAlarmApp::newInstance()
KARecurrence::Type recurType;
bool ok = convInterval(args->getOption("late-cancel"), recurType, lateCancel);
if (!ok || lateCancel <= 0)
- USAGE(i18n("Invalid %1 parameter").arg(QString::fromLatin1("late-cancel")))
+ USAGE(i18n("Invalid %1 parameter").arg(TQString::fromLatin1("late-cancel")))
}
else if (args->isSet("auto-close"))
- USAGE(i18n("%1 requires %2").arg(QString::fromLatin1("--auto-close")).arg(QString::fromLatin1("--late-cancel")))
+ USAGE(i18n("%1 requires %2").arg(TQString::fromLatin1("--auto-close")).arg(TQString::fromLatin1("--late-cancel")))
int flags = KAEvent::DEFAULT_FONT;
if (args->isSet("ack-confirm"))
@@ -670,7 +670,7 @@ int KAlarmApp::newInstance()
exitCode = 1;
break;
}
- if (!scheduleEvent(action, alMessage, alarmTime, lateCancel, flags, bgColour, fgColour, QFont(), audioFile,
+ if (!scheduleEvent(action, alMessage, alarmTime, lateCancel, flags, bgColour, fgColour, TQFont(), audioFile,
audioVolume, reminderMinutes, recurrence, repeatInterval, repeatCount,
alFromID, alAddresses, alSubject, alAttachments))
{
@@ -683,52 +683,52 @@ int KAlarmApp::newInstance()
// No arguments - run interactively & display the main window
kdDebug(5950)<<"KAlarmApp::newInstance(): interactive\n";
if (args->isSet("ack-confirm"))
- usage += QString::fromLatin1("--ack-confirm ");
+ usage += TQString::fromLatin1("--ack-confirm ");
if (args->isSet("attach"))
- usage += QString::fromLatin1("--attach ");
+ usage += TQString::fromLatin1("--attach ");
if (args->isSet("auto-close"))
- usage += QString::fromLatin1("--auto-close ");
+ usage += TQString::fromLatin1("--auto-close ");
if (args->isSet("bcc"))
- usage += QString::fromLatin1("--bcc ");
+ usage += TQString::fromLatin1("--bcc ");
if (args->isSet("beep"))
- usage += QString::fromLatin1("--beep ");
+ usage += TQString::fromLatin1("--beep ");
if (args->isSet("color"))
- usage += QString::fromLatin1("--color ");
+ usage += TQString::fromLatin1("--color ");
if (args->isSet("colorfg"))
- usage += QString::fromLatin1("--colorfg ");
+ usage += TQString::fromLatin1("--colorfg ");
if (args->isSet("disable"))
- usage += QString::fromLatin1("--disable ");
+ usage += TQString::fromLatin1("--disable ");
if (args->isSet("from-id"))
- usage += QString::fromLatin1("--from-id ");
+ usage += TQString::fromLatin1("--from-id ");
if (args->isSet("korganizer"))
- usage += QString::fromLatin1("--korganizer ");
+ usage += TQString::fromLatin1("--korganizer ");
if (args->isSet("late-cancel"))
- usage += QString::fromLatin1("--late-cancel ");
+ usage += TQString::fromLatin1("--late-cancel ");
if (args->isSet("login"))
- usage += QString::fromLatin1("--login ");
+ usage += TQString::fromLatin1("--login ");
if (args->isSet("play"))
- usage += QString::fromLatin1("--play ");
+ usage += TQString::fromLatin1("--play ");
#ifndef WITHOUT_ARTS
if (args->isSet("play-repeat"))
- usage += QString::fromLatin1("--play-repeat ");
+ usage += TQString::fromLatin1("--play-repeat ");
#endif
if (args->isSet("reminder"))
- usage += QString::fromLatin1("--reminder ");
+ usage += TQString::fromLatin1("--reminder ");
if (args->isSet("reminder-once"))
- usage += QString::fromLatin1("--reminder-once ");
+ usage += TQString::fromLatin1("--reminder-once ");
if (args->isSet("speak"))
- usage += QString::fromLatin1("--speak ");
+ usage += TQString::fromLatin1("--speak ");
if (args->isSet("subject"))
- usage += QString::fromLatin1("--subject ");
+ usage += TQString::fromLatin1("--subject ");
if (args->isSet("time"))
- usage += QString::fromLatin1("--time ");
+ usage += TQString::fromLatin1("--time ");
#ifndef WITHOUT_ARTS
if (args->isSet("volume"))
- usage += QString::fromLatin1("--volume ");
+ usage += TQString::fromLatin1("--volume ");
#endif
if (!usage.isEmpty())
{
- usage += i18n(": option(s) only valid with a message/%1/%2").arg(QString::fromLatin1("--file")).arg(QString::fromLatin1("--exec"));
+ usage += i18n(": option(s) only valid with a message/%1/%2").arg(TQString::fromLatin1("--file")).arg(TQString::fromLatin1("--exec"));
break;
}
@@ -816,13 +816,13 @@ void KAlarmApp::quitIf(int exitCode, bool force)
* Closes the system tray window and all main windows, but does not exit the
* program if other windows are still open.
*/
-void KAlarmApp::doQuit(QWidget* parent)
+void KAlarmApp::doQuit(TQWidget* parent)
{
kdDebug(5950) << "KAlarmApp::doQuit()\n";
if (mDisableAlarmsIfStopped
&& MessageBox::warningContinueCancel(parent, KMessageBox::Cancel,
i18n("Quitting will disable alarms\n(once any alarm message windows are closed)."),
- QString::null, KStdGuiItem::quit(), Preferences::QUIT_WARN
+ TQString::null, KStdGuiItem::quit(), Preferences::QUIT_WARN
) != KMessageBox::Yes)
return;
quitIf(0, true);
@@ -842,14 +842,14 @@ void KAlarmApp::commitData(QSessionManager& sm)
* Display an error message for a fatal error. Prevent further actions since
* the program state is unsafe.
*/
-void KAlarmApp::displayFatalError(const QString& message)
+void KAlarmApp::displayFatalError(const TQString& message)
{
if (!mFatalError)
{
mFatalError = 1;
mFatalMessage = message;
if (theInstance)
- QTimer::singleShot(0, theInstance, SLOT(quitFatal()));
+ TQTimer::singleShot(0, theInstance, TQT_SLOT(quitFatal()));
}
}
@@ -873,7 +873,7 @@ void KAlarmApp::quitFatal()
theInstance->quitIf(1, true);
break;
}
- QTimer::singleShot(1000, this, SLOT(quitFatal()));
+ TQTimer::singleShot(1000, this, TQT_SLOT(quitFatal()));
}
/******************************************************************************
@@ -989,7 +989,7 @@ bool KAlarmApp::displayTrayIcon(bool show, MainWindow* parent)
creating = false;
}
mTrayWindow = new TrayWindow(parent ? parent : MainWindow::firstWindow());
- connect(mTrayWindow, SIGNAL(deleted()), SIGNAL(trayIconToggled()));
+ connect(mTrayWindow, TQT_SIGNAL(deleted()), TQT_SIGNAL(trayIconToggled()));
mTrayWindow->show();
emit trayIconToggled();
@@ -998,7 +998,7 @@ bool KAlarmApp::displayTrayIcon(bool show, MainWindow* parent)
mCheckingSystemTray = true;
mSavedNoSystemTray = mNoSystemTray;
mNoSystemTray = false;
- QTimer::singleShot(0, this, SLOT(slotSystemTrayTimer()));
+ TQTimer::singleShot(0, this, TQT_SLOT(slotSystemTrayTimer()));
}
}
else if (mTrayWindow)
@@ -1043,8 +1043,8 @@ bool KAlarmApp::checkSystemTray()
// tray and alarms are disabled when KAlarm is not running, registering with
// NO_START_NOTIFY could result in alarms never being seen.
KConfig* config = kapp->config();
- config->setGroup(QString::fromLatin1("General"));
- config->writeEntry(QString::fromLatin1("NoSystemTray"), mNoSystemTray);
+ config->setGroup(TQString::fromLatin1("General"));
+ config->writeEntry(TQString::fromLatin1("NoSystemTray"), mNoSystemTray);
config->sync();
// Update other settings and reregister with the alarm daemon
@@ -1132,7 +1132,7 @@ void KAlarmApp::slotPreferencesChanged()
void KAlarmApp::changeStartOfDay()
{
Daemon::notifyTimeChanged(); // tell the alarm daemon the new time
- QTime sod = Preferences::startOfDay();
+ TQTime sod = Preferences::startOfDay();
DateTime::setStartOfDay(sod);
AlarmCalendar* cal = AlarmCalendar::activeCalendar();
if (KAEvent::adjustStartOfDay(cal->events()))
@@ -1164,22 +1164,22 @@ bool KAlarmApp::wantRunInSystemTray() const
* to command line options.
* Reply = true unless there was a parameter error or an error opening calendar file.
*/
-bool KAlarmApp::scheduleEvent(KAEvent::Action action, const QString& text, const QDateTime& dateTime,
- int lateCancel, int flags, const QColor& bg, const QColor& fg, const QFont& font,
- const QString& audioFile, float audioVolume, int reminderMinutes,
+bool KAlarmApp::scheduleEvent(KAEvent::Action action, const TQString& text, const TQDateTime& dateTime,
+ int lateCancel, int flags, const TQColor& bg, const TQColor& fg, const TQFont& font,
+ const TQString& audioFile, float audioVolume, int reminderMinutes,
const KARecurrence& recurrence, int repeatInterval, int repeatCount,
uint mailFromID, const EmailAddressList& mailAddresses,
- const QString& mailSubject, const QStringList& mailAttachments)
+ const TQString& mailSubject, const TQStringList& mailAttachments)
{
kdDebug(5950) << "KAlarmApp::scheduleEvent(): " << text << endl;
if (!dateTime.isValid())
return false;
- QDateTime now = QDateTime::currentDateTime();
+ TQDateTime now = TQDateTime::currentDateTime();
if (lateCancel && dateTime < now.addSecs(-maxLateness(lateCancel)))
return true; // alarm time was already expired too long ago
- QDateTime alarmTime = dateTime;
+ TQDateTime alarmTime = dateTime;
// Round down to the nearest minute to avoid scheduling being messed up
- alarmTime.setTime(QTime(alarmTime.time().hour(), alarmTime.time().minute(), 0));
+ alarmTime.setTime(TQTime(alarmTime.time().hour(), alarmTime.time().minute(), 0));
KAEvent event(alarmTime, text, bg, fg, font, action, lateCancel, flags);
if (reminderMinutes)
@@ -1212,7 +1212,7 @@ bool KAlarmApp::scheduleEvent(KAEvent::Action action, const QString& text, const
// Queue the alarm for insertion into the calendar file
mDcopQueue.append(DcopQEntry(event));
if (mInitialised)
- QTimer::singleShot(0, this, SLOT(processQueue()));
+ TQTimer::singleShot(0, this, TQT_SLOT(processQueue()));
return true;
}
@@ -1222,7 +1222,7 @@ bool KAlarmApp::scheduleEvent(KAEvent::Action action, const QString& text, const
* Optionally display the event. Delete the event from the calendar file and
* from every main window instance.
*/
-bool KAlarmApp::handleEvent(const QString& urlString, const QString& eventID, EventFunc function)
+bool KAlarmApp::handleEvent(const TQString& urlString, const TQString& eventID, EventFunc function)
{
kdDebug(5950) << "KAlarmApp::handleEvent(DCOP): " << eventID << endl;
AlarmCalendar* cal = AlarmCalendar::activeCalendar(); // this can be called before calendars have been initialised
@@ -1234,7 +1234,7 @@ bool KAlarmApp::handleEvent(const QString& urlString, const QString& eventID, Ev
}
mDcopQueue.append(DcopQEntry(function, eventID));
if (mInitialised)
- QTimer::singleShot(0, this, SLOT(processQueue()));
+ TQTimer::singleShot(0, this, TQT_SLOT(processQueue()));
return true;
}
@@ -1246,7 +1246,7 @@ bool KAlarmApp::handleEvent(const QString& urlString, const QString& eventID, Ev
* If the event is deleted, it is removed from the calendar file and from every
* main window instance.
*/
-bool KAlarmApp::handleEvent(const QString& eventID, EventFunc function)
+bool KAlarmApp::handleEvent(const TQString& eventID, EventFunc function)
{
kdDebug(5950) << "KAlarmApp::handleEvent(): " << eventID << ", " << (function==EVENT_TRIGGER?"TRIGGER":function==EVENT_CANCEL?"CANCEL":function==EVENT_HANDLE?"HANDLE":"?") << endl;
KCal::Event* kcalEvent = AlarmCalendar::activeCalendar()->event(eventID);
@@ -1266,7 +1266,7 @@ bool KAlarmApp::handleEvent(const QString& eventID, EventFunc function)
case EVENT_TRIGGER: // handle it if it's due, else execute it regardless
case EVENT_HANDLE: // handle it if it's due
{
- QDateTime now = QDateTime::currentDateTime();
+ TQDateTime now = TQDateTime::currentDateTime();
bool updateCalAndDisplay = false;
bool alarmToExecuteValid = false;
KAAlarm alarmToExecute;
@@ -1310,7 +1310,7 @@ bool KAlarmApp::handleEvent(const QString& eventID, EventFunc function)
{
// The alarm has no time, so cancel it if its date is too far past
int maxlate = alarm.lateCancel() / 1440; // maximum lateness in days
- QDateTime limit(alarm.date().addDays(maxlate + 1), Preferences::startOfDay());
+ TQDateTime limit(alarm.date().addDays(maxlate + 1), Preferences::startOfDay());
if (now >= limit)
{
// It's too late to display the scheduled occurrence.
@@ -1472,7 +1472,7 @@ void KAlarmApp::alarmCompleted(const KAEvent& event)
{
if (!event.postAction().isEmpty() && ShellProcess::authorised())
{
- QString command = event.postAction();
+ TQString command = event.postAction();
kdDebug(5950) << "KAlarmApp::alarmCompleted(" << event.id() << "): " << command << endl;
doShellCommand(command, event, 0, ProcData::POST_ACTION);
}
@@ -1502,7 +1502,7 @@ void KAlarmApp::rescheduleAlarm(KAEvent& event, const KAAlarm& alarm, bool updat
else
{
// Reschedule the alarm for its next recurrence.
- KAEvent::OccurType type = event.setNextOccurrence(QDateTime::currentDateTime());
+ KAEvent::OccurType type = event.setNextOccurrence(TQDateTime::currentDateTime());
switch (type)
{
case KAEvent::NO_OCCURRENCE:
@@ -1554,7 +1554,7 @@ void KAlarmApp::cancelAlarm(KAEvent& event, KAAlarm::Type alarmType, bool update
if (alarmType == KAAlarm::MAIN_ALARM && !event.displaying() && event.toBeArchived())
{
// The event is being deleted. Save it in the expired calendar file first.
- QString id = event.id(); // save event ID since KAlarm::addExpiredEvent() changes it
+ TQString id = event.id(); // save event ID since KAlarm::addExpiredEvent() changes it
KAlarm::addExpiredEvent(event);
event.setEventID(id); // restore event ID
}
@@ -1601,7 +1601,7 @@ void* KAlarmApp::execAlarm(KAEvent& event, const KAAlarm& alarm, bool reschedule
// (other than a reminder window) currently displayed for this alarm,
// and we need to execute a command before displaying the new window.
// Check whether the command is already being executed for this alarm.
- for (QValueList<ProcData*>::Iterator it = mCommandProcesses.begin(); it != mCommandProcesses.end(); ++it)
+ for (TQValueList<ProcData*>::Iterator it = mCommandProcesses.begin(); it != mCommandProcesses.end(); ++it)
{
ProcData* pd = *it;
if (pd->event->id() == event.id() && (pd->flags & ProcData::PRE_ACTION))
@@ -1611,7 +1611,7 @@ void* KAlarmApp::execAlarm(KAEvent& event, const KAAlarm& alarm, bool reschedule
}
}
- QString command = event.preAction();
+ TQString command = event.preAction();
kdDebug(5950) << "KAlarmApp::execAlarm(): pre-DISPLAY command: " << command << endl;
int flags = (reschedule ? ProcData::RESCHEDULE : 0) | (allowDefer ? ProcData::ALLOW_DEFER : 0);
if (doShellCommand(command, event, &alarm, (flags | ProcData::PRE_ACTION)))
@@ -1645,12 +1645,12 @@ void* KAlarmApp::execAlarm(KAEvent& event, const KAAlarm& alarm, bool reschedule
case KAAlarm::COMMAND:
{
int flags = event.commandXterm() ? ProcData::EXEC_IN_XTERM : 0;
- QString command = event.cleanText();
+ TQString command = event.cleanText();
if (event.commandScript())
{
// Store the command script in a temporary file for execution
kdDebug(5950) << "KAlarmApp::execAlarm(): COMMAND: (script)" << endl;
- QString tmpfile = createTempScriptFile(command, false, event, alarm);
+ TQString tmpfile = createTempScriptFile(command, false, event, alarm);
if (tmpfile.isEmpty())
result = 0;
else
@@ -1668,7 +1668,7 @@ void* KAlarmApp::execAlarm(KAEvent& event, const KAAlarm& alarm, bool reschedule
case KAAlarm::EMAIL:
{
kdDebug(5950) << "KAlarmApp::execAlarm(): EMAIL to: " << event.emailAddresses(", ") << endl;
- QStringList errmsgs;
+ TQStringList errmsgs;
if (!KAMail::send(event, errmsgs, (reschedule || allowDefer)))
result = 0;
if (!errmsgs.isEmpty())
@@ -1696,12 +1696,12 @@ void* KAlarmApp::execAlarm(KAEvent& event, const KAAlarm& alarm, bool reschedule
* execAlarm() once the command completes, the execAlarm() parameters being
* derived from the remaining bits in 'flags'.
*/
-ShellProcess* KAlarmApp::doShellCommand(const QString& command, const KAEvent& event, const KAAlarm* alarm, int flags)
+ShellProcess* KAlarmApp::doShellCommand(const TQString& command, const KAEvent& event, const KAAlarm* alarm, int flags)
{
kdDebug(5950) << "KAlarmApp::doShellCommand(" << command << ", " << event.id() << ")" << endl;
KProcess::Communication comms = KProcess::NoCommunication;
- QString cmd;
- QString tmpXtermFile;
+ TQString cmd;
+ TQString tmpXtermFile;
if (flags & ProcData::EXEC_IN_XTERM)
{
// Execute the command in a terminal window.
@@ -1724,7 +1724,7 @@ ShellProcess* KAlarmApp::doShellCommand(const QString& command, const KAEvent& e
{
// Execute the command from a temporary script file,
// with a sleep after the command is executed
- tmpXtermFile = createTempScriptFile(command + QString::fromLatin1("\nsleep 86400\n"), true, event, *alarm);
+ tmpXtermFile = createTempScriptFile(command + TQString::fromLatin1("\nsleep 86400\n"), true, event, *alarm);
if (tmpXtermFile.isEmpty())
return 0;
cmd.replace("%W", tmpXtermFile); // %w indicates where to insert the command
@@ -1733,14 +1733,14 @@ ShellProcess* KAlarmApp::doShellCommand(const QString& command, const KAEvent& e
{
// Append a sleep to the command.
// Quote the command in case it contains characters such as [>|;].
- QString exec = KShellProcess::quote(command + QString::fromLatin1("; sleep 86400"));
+ TQString exec = KShellProcess::quote(command + TQString::fromLatin1("; sleep 86400"));
cmd.replace("%w", exec); // %w indicates where to insert the command string
}
else
{
// Set the command to execute.
// Put it in quotes in case it contains characters such as [>|;].
- QString exec = KShellProcess::quote(command);
+ TQString exec = KShellProcess::quote(command);
if (cmd.find("%c") >= 0)
cmd.replace("%c", exec); // %c indicates where to insert the command string
else
@@ -1753,21 +1753,21 @@ ShellProcess* KAlarmApp::doShellCommand(const QString& command, const KAEvent& e
comms = KProcess::AllOutput;
}
ShellProcess* proc = new ShellProcess(cmd);
- connect(proc, SIGNAL(shellExited(ShellProcess*)), SLOT(slotCommandExited(ShellProcess*)));
- QGuardedPtr<ShellProcess> logproc = 0;
+ connect(proc, TQT_SIGNAL(shellExited(ShellProcess*)), TQT_SLOT(slotCommandExited(ShellProcess*)));
+ TQGuardedPtr<ShellProcess> logproc = 0;
if (comms == KProcess::AllOutput && !event.logFile().isEmpty())
{
// Output is to be appended to a log file.
// Set up a logging process to write the command's output to.
- connect(proc, SIGNAL(receivedStdout(KProcess*,char*,int)), SLOT(slotCommandOutput(KProcess*,char*,int)));
- connect(proc, SIGNAL(receivedStderr(KProcess*,char*,int)), SLOT(slotCommandOutput(KProcess*,char*,int)));
- logproc = new ShellProcess(QString::fromLatin1("cat >>%1").arg(event.logFile()));
- connect(logproc, SIGNAL(shellExited(ShellProcess*)), SLOT(slotLogProcExited(ShellProcess*)));
+ connect(proc, TQT_SIGNAL(receivedStdout(KProcess*,char*,int)), TQT_SLOT(slotCommandOutput(KProcess*,char*,int)));
+ connect(proc, TQT_SIGNAL(receivedStderr(KProcess*,char*,int)), TQT_SLOT(slotCommandOutput(KProcess*,char*,int)));
+ logproc = new ShellProcess(TQString::fromLatin1("cat >>%1").arg(event.logFile()));
+ connect(logproc, TQT_SIGNAL(shellExited(ShellProcess*)), TQT_SLOT(slotLogProcExited(ShellProcess*)));
logproc->start(KProcess::Stdin);
- QCString heading;
+ TQCString heading;
if (alarm && alarm->dateTime().isValid())
{
- QString dateTime = alarm->dateTime().isDateOnly()
+ TQString dateTime = alarm->dateTime().isDateOnly()
? KGlobal::locale()->formatDate(alarm->dateTime().date(), true)
: KGlobal::locale()->formatDateTime(alarm->dateTime().dateTime());
heading.sprintf("\n******* KAlarm %s *******\n", dateTime.latin1());
@@ -1797,11 +1797,11 @@ ShellProcess* KAlarmApp::doShellCommand(const QString& command, const KAEvent& e
* Create a temporary script file containing the specified command string.
* Reply = path of temporary file, or null string if error.
*/
-QString KAlarmApp::createTempScriptFile(const QString& command, bool insertShell, const KAEvent& event, const KAAlarm& alarm)
+TQString KAlarmApp::createTempScriptFile(const TQString& command, bool insertShell, const KAEvent& event, const KAAlarm& alarm)
{
- KTempFile tmpFile(QString::null, QString::null, 0700);
+ KTempFile tmpFile(TQString::null, TQString::null, 0700);
tmpFile.setAutoDelete(false); // don't delete file when it is destructed
- QTextStream* stream = tmpFile.textStream();
+ TQTextStream* stream = tmpFile.textStream();
if (!stream)
kdError(5950) << "KAlarmApp::createTempScript(): Unable to create a temporary script file" << endl;
else
@@ -1816,9 +1816,9 @@ QString KAlarmApp::createTempScriptFile(const QString& command, bool insertShell
return tmpFile.name();
}
- QStringList errmsgs(i18n("Error creating temporary script file"));
+ TQStringList errmsgs(i18n("Error creating temporary script file"));
(new MessageWin(event, alarm.dateTime(), errmsgs))->show();
- return QString::null;
+ return TQString::null;
}
/******************************************************************************
@@ -1826,9 +1826,9 @@ QString KAlarmApp::createTempScriptFile(const QString& command, bool insertShell
*/
void KAlarmApp::slotCommandOutput(KProcess* proc, char* buffer, int bufflen)
{
-//kdDebug(5950) << "KAlarmApp::slotCommandOutput(): '" << QCString(buffer, bufflen+1) << "'\n";
+//kdDebug(5950) << "KAlarmApp::slotCommandOutput(): '" << TQCString(buffer, bufflen+1) << "'\n";
// Find this command in the command list
- for (QValueList<ProcData*>::Iterator it = mCommandProcesses.begin(); it != mCommandProcesses.end(); ++it)
+ for (TQValueList<ProcData*>::Iterator it = mCommandProcesses.begin(); it != mCommandProcesses.end(); ++it)
{
ProcData* pd = *it;
if (pd->process == proc && pd->logProcess)
@@ -1856,7 +1856,7 @@ void KAlarmApp::slotCommandExited(ShellProcess* proc)
{
kdDebug(5950) << "KAlarmApp::slotCommandExited()\n";
// Find this command in the command list
- for (QValueList<ProcData*>::Iterator it = mCommandProcesses.begin(); it != mCommandProcesses.end(); ++it)
+ for (TQValueList<ProcData*>::Iterator it = mCommandProcesses.begin(); it != mCommandProcesses.end(); ++it)
{
ProcData* pd = *it;
if (pd->process == proc)
@@ -1868,12 +1868,12 @@ void KAlarmApp::slotCommandExited(ShellProcess* proc)
// Check its exit status
if (!proc->normalExit())
{
- QString errmsg = proc->errorMessage();
+ TQString errmsg = proc->errorMessage();
kdWarning(5950) << "KAlarmApp::slotCommandExited(" << pd->event->cleanText() << "): " << errmsg << endl;
if (pd->messageBoxParent)
{
// Close the existing informational KMessageBox for this process
- QObjectList* dialogs = pd->messageBoxParent->queryList("KDialogBase", 0, false, true);
+ TQObjectList* dialogs = pd->messageBoxParent->queryList("KDialogBase", 0, false, true);
KDialogBase* dialog = (KDialogBase*)dialogs->getFirst();
delete dialog;
delete dialogs;
@@ -1905,7 +1905,7 @@ void KAlarmApp::slotCommandExited(ShellProcess* proc)
*/
void KAlarmApp::commandErrorMsg(const ShellProcess* proc, const KAEvent& event, const KAAlarm* alarm, int flags)
{
- QStringList errmsgs;
+ TQStringList errmsgs;
if (flags & ProcData::PRE_ACTION)
errmsgs += i18n("Pre-alarm action:");
else if (flags & ProcData::POST_ACTION)
@@ -1919,10 +1919,10 @@ void KAlarmApp::commandErrorMsg(const ShellProcess* proc, const KAEvent& event,
/******************************************************************************
* Notes that an informational KMessageBox is displayed for this process.
*/
-void KAlarmApp::commandMessage(ShellProcess* proc, QWidget* parent)
+void KAlarmApp::commandMessage(ShellProcess* proc, TQWidget* parent)
{
// Find this command in the command list
- for (QValueList<ProcData*>::Iterator it = mCommandProcesses.begin(); it != mCommandProcesses.end(); ++it)
+ for (TQValueList<ProcData*>::Iterator it = mCommandProcesses.begin(); it != mCommandProcesses.end(); ++it)
{
ProcData* pd = *it;
if (pd->process == proc)
@@ -1942,7 +1942,7 @@ void KAlarmApp::setUpDcop()
{
mInitialised = true; // we're now ready to handle DCOP calls
Daemon::createDcopHandler();
- QTimer::singleShot(0, this, SLOT(processQueue())); // process anything already queued
+ TQTimer::singleShot(0, this, TQT_SLOT(processQueue())); // process anything already queued
}
}
@@ -1999,7 +1999,7 @@ bool KAlarmApp::initCheck(bool calendarOnly)
* The parameter is in the form [[[yyyy-]mm-]dd-]hh:mm or yyyy-mm-dd.
* Reply = true if successful.
*/
-static bool convWakeTime(const QCString& timeParam, QDateTime& dateTime, bool& noTime)
+static bool convWakeTime(const TQCString& timeParam, TQDateTime& dateTime, bool& noTime)
{
if (timeParam.length() > 19)
return false;
@@ -2059,8 +2059,8 @@ static bool convWakeTime(const QCString& timeParam, QDateTime& dateTime, bool& n
}
}
- QDate date(dt[0], dt[1], dt[2]);
- QTime time(0, 0, 0);
+ TQDate date(dt[0], dt[1], dt[2]);
+ TQTime time(0, 0, 0);
if (noTime)
{
// No time was specified, so the full date must have been specified
@@ -2070,7 +2070,7 @@ static bool convWakeTime(const QCString& timeParam, QDateTime& dateTime, bool& n
else
{
// Compile the values into a date/time structure
- QDateTime now = QDateTime::currentDateTime();
+ TQDateTime now = TQDateTime::currentDateTime();
if (dt[0] < 0)
date.setYMD(now.date().year(),
(dt[1] < 0 ? now.date().month() : dt[1]),
@@ -2092,9 +2092,9 @@ static bool convWakeTime(const QCString& timeParam, QDateTime& dateTime, bool& n
* false, 'timeInterval' is converted to minutes.
* Reply = true if successful.
*/
-static bool convInterval(const QCString& timeParam, KARecurrence::Type& recurType, int& timeInterval, bool allowMonthYear)
+static bool convInterval(const TQCString& timeParam, KARecurrence::Type& recurType, int& timeInterval, bool allowMonthYear)
{
- QCString timeString = timeParam;
+ TQCString timeString = timeParam;
// Get the recurrence interval
bool ok = true;
uint interval = 0;
@@ -2177,7 +2177,7 @@ KAlarmApp::ProcData::~ProcData()
while (!tempFiles.isEmpty())
{
// Delete the temporary file called by the XTerm command
- QFile f(tempFiles.first());
+ TQFile f(tempFiles.first());
f.remove();
tempFiles.remove(tempFiles.begin());
}
diff --git a/kalarm/kalarmapp.h b/kalarm/kalarmapp.h
index 22c7649b3..3f33bfa51 100644
--- a/kalarm/kalarmapp.h
+++ b/kalarm/kalarmapp.h
@@ -23,7 +23,7 @@
/** @file kalarmapp.h - the KAlarm application object */
-#include <qguardedptr.h>
+#include <tqguardedptr.h>
class QTimer;
class QDateTime;
@@ -61,8 +61,8 @@ class KAlarmApp : public KUniqueApplication
bool restoreSession();
bool sessionClosingDown() const { return mSessionClosingDown; }
void quitIf() { quitIf(0); }
- void doQuit(QWidget* parent);
- static void displayFatalError(const QString& message);
+ void doQuit(TQWidget* parent);
+ static void displayFatalError(const TQString& message);
void addWindow(TrayWindow* w) { mTrayWindow = w; }
void removeWindow(TrayWindow*);
TrayWindow* trayWindow() const { return mTrayWindow; }
@@ -75,20 +75,20 @@ class KAlarmApp : public KUniqueApplication
void* execAlarm(KAEvent&, const KAAlarm&, bool reschedule, bool allowDefer = true, bool noPreAction = false);
void alarmShowing(KAEvent&, KAAlarm::Type, const DateTime&);
void alarmCompleted(const KAEvent&);
- bool deleteEvent(const QString& eventID) { return handleEvent(eventID, EVENT_CANCEL); }
- void commandMessage(ShellProcess*, QWidget* parent);
+ bool deleteEvent(const TQString& eventID) { return handleEvent(eventID, EVENT_CANCEL); }
+ void commandMessage(ShellProcess*, TQWidget* parent);
// Methods called indirectly by the DCOP interface
- bool scheduleEvent(KAEvent::Action, const QString& text, const QDateTime&,
- int lateCancel, int flags, const QColor& bg, const QColor& fg,
- const QFont&, const QString& audioFile, float audioVolume,
+ bool scheduleEvent(KAEvent::Action, const TQString& text, const TQDateTime&,
+ int lateCancel, int flags, const TQColor& bg, const TQColor& fg,
+ const TQFont&, const TQString& audioFile, float audioVolume,
int reminderMinutes, const KARecurrence& recurrence,
int repeatInterval, int repeatCount,
uint mailFromID = 0, const EmailAddressList& mailAddresses = EmailAddressList(),
- const QString& mailSubject = QString::null,
- const QStringList& mailAttachments = QStringList());
- bool handleEvent(const QString& calendarFile, const QString& eventID) { return handleEvent(calendarFile, eventID, EVENT_HANDLE); }
- bool triggerEvent(const QString& calendarFile, const QString& eventID) { return handleEvent(calendarFile, eventID, EVENT_TRIGGER); }
- bool deleteEvent(const QString& calendarFile, const QString& eventID) { return handleEvent(calendarFile, eventID, EVENT_CANCEL); }
+ const TQString& mailSubject = TQString::null,
+ const TQStringList& mailAttachments = TQStringList());
+ bool handleEvent(const TQString& calendarFile, const TQString& eventID) { return handleEvent(calendarFile, eventID, EVENT_HANDLE); }
+ bool triggerEvent(const TQString& calendarFile, const TQString& eventID) { return handleEvent(calendarFile, eventID, EVENT_TRIGGER); }
+ bool deleteEvent(const TQString& calendarFile, const TQString& eventID) { return handleEvent(calendarFile, eventID, EVENT_CANCEL); }
public slots:
void processQueue();
signals:
@@ -123,20 +123,20 @@ class KAlarmApp : public KUniqueApplication
bool tempFile() const { return flags & TEMP_FILE; }
bool execInXterm() const { return flags & EXEC_IN_XTERM; }
ShellProcess* process;
- QGuardedPtr<ShellProcess> logProcess;
+ TQGuardedPtr<ShellProcess> logProcess;
KAEvent* event;
KAAlarm* alarm;
- QGuardedPtr<QWidget> messageBoxParent;
- QStringList tempFiles;
+ TQGuardedPtr<TQWidget> messageBoxParent;
+ TQStringList tempFiles;
int flags;
};
struct DcopQEntry
{
- DcopQEntry(EventFunc f, const QString& id) : function(f), eventId(id) { }
+ DcopQEntry(EventFunc f, const TQString& id) : function(f), eventId(id) { }
DcopQEntry(const KAEvent& e, EventFunc f = EVENT_HANDLE) : function(f), event(e) { }
DcopQEntry() { }
EventFunc function;
- QString eventId;
+ TQString eventId;
KAEvent event;
};
@@ -146,29 +146,29 @@ class KAlarmApp : public KUniqueApplication
bool checkSystemTray();
void changeStartOfDay();
void setUpDcop();
- bool handleEvent(const QString& calendarFile, const QString& eventID, EventFunc);
- bool handleEvent(const QString& eventID, EventFunc);
+ bool handleEvent(const TQString& calendarFile, const TQString& eventID, EventFunc);
+ bool handleEvent(const TQString& eventID, EventFunc);
void rescheduleAlarm(KAEvent&, const KAAlarm&, bool updateCalAndDisplay);
void cancelAlarm(KAEvent&, KAAlarm::Type, bool updateCalAndDisplay);
- ShellProcess* doShellCommand(const QString& command, const KAEvent&, const KAAlarm*, int flags = 0);
- QString createTempScriptFile(const QString& command, bool insertShell, const KAEvent&, const KAAlarm&);
+ ShellProcess* doShellCommand(const TQString& command, const KAEvent&, const KAAlarm*, int flags = 0);
+ TQString createTempScriptFile(const TQString& command, bool insertShell, const KAEvent&, const KAAlarm&);
void commandErrorMsg(const ShellProcess*, const KAEvent&, const KAAlarm*, int flags = 0);
static KAlarmApp* theInstance; // the one and only KAlarmApp instance
static int mActiveCount; // number of active instances without main windows
static int mFatalError; // a fatal error has occurred - just wait to exit
- static QString mFatalMessage; // fatal error message to output
+ static TQString mFatalMessage; // fatal error message to output
bool mInitialised; // initialisation complete: ready to handle DCOP calls
DcopHandler* mDcopHandler; // the parent of the main DCOP receiver object
#ifdef OLD_DCOP
DcopHandlerOld* mDcopHandlerOld; // the parent of the old main DCOP receiver object
#endif
TrayWindow* mTrayWindow; // active system tray icon
- QTime mStartOfDay; // start-of-day time currently in use
- QColor mPrefsExpiredColour; // expired alarms text colour
+ TQTime mStartOfDay; // start-of-day time currently in use
+ TQColor mPrefsExpiredColour; // expired alarms text colour
int mPrefsExpiredKeepDays;// how long expired alarms are being kept
- QValueList<ProcData*> mCommandProcesses; // currently active command alarm processes
- QValueList<DcopQEntry> mDcopQueue; // DCOP command queue
+ TQValueList<ProcData*> mCommandProcesses; // currently active command alarm processes
+ TQValueList<DcopQEntry> mDcopQueue; // DCOP command queue
int mPendingQuitCode; // exit code for a pending quit
bool mPendingQuit; // quit once the DCOP command and shell command queues have been processed
bool mProcessingQueue; // a mDcopQueue entry is currently being processed
diff --git a/kalarm/kalarmd/adcalendar.cpp b/kalarm/kalarmd/adcalendar.cpp
index 8af97cc0b..1f325be48 100644
--- a/kalarm/kalarmd/adcalendar.cpp
+++ b/kalarm/kalarmd/adcalendar.cpp
@@ -21,7 +21,7 @@
#include <unistd.h>
#include <assert.h>
-#include <qfile.h>
+#include <tqfile.h>
#include <ktempfile.h>
#include <kio/job.h>
@@ -30,14 +30,14 @@
#include "adcalendar.moc"
-QValueList<ADCalendar*> ADCalendar::mCalendars;
+TQValueList<ADCalendar*> ADCalendar::mCalendars;
ADCalendar::EventsMap ADCalendar::mEventsHandled;
ADCalendar::EventsMap ADCalendar::mEventsPending;
-QStringList ADCalendar::mCalendarUrls; // never delete or reorder anything in this list!
+TQStringList ADCalendar::mCalendarUrls; // never delete or reorder anything in this list!
-ADCalendar::ADCalendar(const QString& url, const QCString& appname)
- : KCal::CalendarLocal(QString::fromLatin1("UTC")),
+ADCalendar::ADCalendar(const TQString& url, const TQCString& appname)
+ : KCal::CalendarLocal(TQString::fromLatin1("UTC")),
mUrlString(url),
mAppName(appname),
mLoaded(false),
@@ -96,7 +96,7 @@ bool ADCalendar::loadFile(bool reset)
KURL dest;
dest.setPath(mTempFileName);
KIO::FileCopyJob* job = KIO::file_copy(url, dest, -1, true);
- connect(job, SIGNAL(result(KIO::Job*)), SLOT(slotDownloadJobResult(KIO::Job*)));
+ connect(job, TQT_SIGNAL(result(KIO::Job*)), TQT_SLOT(slotDownloadJobResult(KIO::Job*)));
}
return true;
}
@@ -114,12 +114,12 @@ void ADCalendar::slotDownloadJobResult(KIO::Job *job)
kdDebug(5900) << "--- Downloaded to " << mTempFileName << endl;
loadLocalFile(mTempFileName);
}
- unlink(QFile::encodeName(mTempFileName));
- mTempFileName = QString::null;
+ unlink(TQFile::encodeName(mTempFileName));
+ mTempFileName = TQString::null;
emit loaded(this, mLoaded);
}
-void ADCalendar::loadLocalFile(const QString& filename)
+void ADCalendar::loadLocalFile(const TQString& filename)
{
mLoaded = load(filename);
if (!mLoaded)
@@ -140,7 +140,7 @@ bool ADCalendar::setLoadedConnected()
* Check whether all the alarms for the event with the given ID have already
* been handled.
*/
-bool ADCalendar::eventHandled(const KCal::Event* event, const QValueList<QDateTime>& alarmtimes)
+bool ADCalendar::eventHandled(const KCal::Event* event, const TQValueList<TQDateTime>& alarmtimes)
{
EventsMap::ConstIterator it = mEventsHandled.find(EventKey(event->uid(), mUrlIndex));
if (it == mEventsHandled.end())
@@ -164,7 +164,7 @@ bool ADCalendar::eventHandled(const KCal::Event* event, const QValueList<QDateTi
* Remember that the event with the given ID has been handled.
* It must already be in the pending list.
*/
-void ADCalendar::setEventHandled(const QString& eventID)
+void ADCalendar::setEventHandled(const TQString& eventID)
{
kdDebug(5900) << "ADCalendar::setEventHandled(" << eventID << ")\n";
EventKey key(eventID, mUrlIndex);
@@ -182,7 +182,7 @@ void ADCalendar::setEventHandled(const QString& eventID)
* Remember that the specified alarms for the event with the given ID have been
* notified to KAlarm, but no reply has come back yet.
*/
-void ADCalendar::setEventPending(const KCal::Event* event, const QValueList<QDateTime>& alarmtimes)
+void ADCalendar::setEventPending(const KCal::Event* event, const TQValueList<TQDateTime>& alarmtimes)
{
if (event)
{
@@ -195,7 +195,7 @@ void ADCalendar::setEventPending(const KCal::Event* event, const QValueList<QDat
/******************************************************************************
* Add a specified entry to the events pending or handled list.
*/
-void ADCalendar::setEventInMap(EventsMap& map, const EventKey& key, const QValueList<QDateTime>& alarmtimes, int sequence)
+void ADCalendar::setEventInMap(EventsMap& map, const EventKey& key, const TQValueList<TQDateTime>& alarmtimes, int sequence)
{
EventsMap::Iterator it = map.find(key);
if (it != map.end())
@@ -239,7 +239,7 @@ void ADCalendar::clearEventMap(EventsMap& map, bool nonexistentOnly)
/******************************************************************************
* Look up the calendar with the specified full calendar URL.
*/
-ADCalendar* ADCalendar::getCalendar(const QString& calendarURL)
+ADCalendar* ADCalendar::getCalendar(const TQString& calendarURL)
{
if (!calendarURL.isEmpty())
{
diff --git a/kalarm/kalarmd/adcalendar.h b/kalarm/kalarmd/adcalendar.h
index 656070bef..67e2fac92 100644
--- a/kalarm/kalarmd/adcalendar.h
+++ b/kalarm/kalarmd/adcalendar.h
@@ -31,12 +31,12 @@ class ADCalendar : public KCal::CalendarLocal
{
Q_OBJECT
public:
- typedef QValueList<ADCalendar*>::ConstIterator ConstIterator;
+ typedef TQValueList<ADCalendar*>::ConstIterator ConstIterator;
~ADCalendar();
- const QString& urlString() const { return mUrlString; }
- const QCString& appName() const { return mAppName; }
+ const TQString& urlString() const { return mUrlString; }
+ const TQCString& appName() const { return mAppName; }
void setEnabled(bool enabled) { mEnabled = enabled; }
bool enabled() const { return mEnabled && !unregistered(); }
@@ -47,10 +47,10 @@ class ADCalendar : public KCal::CalendarLocal
void setUnregistered(bool u) { mUnregistered = u; }
bool unregistered() const { return mUnregistered; }
- void setEventPending(const KCal::Event*, const QValueList<QDateTime>&);
- void setEventHandled(const QString& eventID);
+ void setEventPending(const KCal::Event*, const TQValueList<TQDateTime>&);
+ void setEventHandled(const TQString& eventID);
void clearEventsHandled(bool nonexistentOnly = false);
- bool eventHandled(const KCal::Event*, const QValueList<QDateTime>&);
+ bool eventHandled(const KCal::Event*, const TQValueList<TQDateTime>&);
bool loadFile(bool reset);
bool setLoadedConnected(); // check status of mLoadedConnected and set it to true
@@ -60,7 +60,7 @@ class ADCalendar : public KCal::CalendarLocal
static ConstIterator begin() { return mCalendars.begin(); }
static ConstIterator end() { return mCalendars.end(); }
- static ADCalendar* getCalendar(const QString& calendarURL);
+ static ADCalendar* getCalendar(const TQString& calendarURL);
signals:
void loaded(ADCalendar*, bool success);
@@ -68,7 +68,7 @@ class ADCalendar : public KCal::CalendarLocal
protected:
// Only ClientInfo can construct ADCalendar objects
friend class ClientInfo;
- ADCalendar(const QString& url, const QCString& appname);
+ ADCalendar(const TQString& url, const TQCString& appname);
private slots:
void slotDownloadJobResult(KIO::Job*);
@@ -77,39 +77,39 @@ class ADCalendar : public KCal::CalendarLocal
struct EventKey
{
EventKey() : calendarIndex(-1) { }
- EventKey(const QString& id, int cal) : eventID(id), calendarIndex(cal) { }
+ EventKey(const TQString& id, int cal) : eventID(id), calendarIndex(cal) { }
bool operator<(const EventKey& k) const
{ return (calendarIndex == k.calendarIndex)
? (eventID < k.eventID) : (calendarIndex < k.calendarIndex);
}
- QString eventID;
+ TQString eventID;
int calendarIndex;
};
struct EventItem
{
EventItem() : eventSequence(0) { }
- EventItem(int seqno, const QValueList<QDateTime>& alarmtimes)
+ EventItem(int seqno, const TQValueList<TQDateTime>& alarmtimes)
: eventSequence(seqno), alarmTimes(alarmtimes) {}
int eventSequence;
- QValueList<QDateTime> alarmTimes;
+ TQValueList<TQDateTime> alarmTimes;
};
- typedef QMap<EventKey, EventItem> EventsMap; // calendar/event ID, event sequence num
+ typedef TQMap<EventKey, EventItem> EventsMap; // calendar/event ID, event sequence num
static EventsMap mEventsHandled; // IDs of already triggered events which have been processed by KAlarm
static EventsMap mEventsPending; // IDs of already triggered events not yet processed by KAlarm
- static QStringList mCalendarUrls; // URLs of all calendars ever opened
- static QValueList<ADCalendar*> mCalendars; // list of all constructed calendars
+ static TQStringList mCalendarUrls; // URLs of all calendars ever opened
+ static TQValueList<ADCalendar*> mCalendars; // list of all constructed calendars
ADCalendar(const ADCalendar&); // prohibit copying
ADCalendar& operator=(const ADCalendar&); // prohibit copying
- void loadLocalFile(const QString& filename);
+ void loadLocalFile(const TQString& filename);
void clearEventMap(EventsMap&, bool nonexistentOnly);
- void setEventInMap(EventsMap&, const EventKey&, const QValueList<QDateTime>& alarmtimes, int sequence);
+ void setEventInMap(EventsMap&, const EventKey&, const TQValueList<TQDateTime>& alarmtimes, int sequence);
- QString mUrlString; // calendar file URL
- QCString mAppName; // name of application owning this calendar
- QString mTempFileName; // temporary file used if currently downloading, else null
+ TQString mUrlString; // calendar file URL
+ TQCString mAppName; // name of application owning this calendar
+ TQString mTempFileName; // temporary file used if currently downloading, else null
int mUrlIndex; // unique index to URL in mCalendarUrls
bool mLoaded; // true if calendar file is currently loaded
bool mLoadedConnected; // true if the loaded() signal has been connected to AlarmDaemon
diff --git a/kalarm/kalarmd/adconfigdata.cpp b/kalarm/kalarmd/adconfigdata.cpp
index 11dc6bf67..c8c5dd355 100644
--- a/kalarm/kalarmd/adconfigdata.cpp
+++ b/kalarm/kalarmd/adconfigdata.cpp
@@ -20,8 +20,8 @@
#include "kalarmd.h"
-#include <qregexp.h>
-#include <qstringlist.h>
+#include <tqregexp.h>
+#include <tqstringlist.h>
#include <kconfig.h>
#include <kstandarddirs.h>
@@ -31,13 +31,13 @@
#include "adconfigdata.h"
// Config file key strings
-const QString CLIENT_GROUP(QString::fromLatin1("Client "));
-const QRegExp CLIENT_GROUP_SEARCH("^Client ");
+const TQString CLIENT_GROUP(TQString::fromLatin1("Client "));
+const TQRegExp CLIENT_GROUP_SEARCH("^Client ");
// Client data file key strings
-const QString CALENDAR_KEY(QString::fromLatin1("Calendar"));
-const QString TITLE_KEY(QString::fromLatin1("Title"));
-const QString DCOP_OBJECT_KEY(QString::fromLatin1("DCOP object"));
-const QString START_CLIENT_KEY(QString::fromLatin1("Start"));
+const TQString CALENDAR_KEY(TQString::fromLatin1("Calendar"));
+const TQString TITLE_KEY(TQString::fromLatin1("Title"));
+const TQString DCOP_OBJECT_KEY(TQString::fromLatin1("DCOP object"));
+const TQString START_CLIENT_KEY(TQString::fromLatin1("Start"));
/******************************************************************************
@@ -49,17 +49,17 @@ void ADConfigData::readConfig()
kdDebug(5900) << "ADConfigData::readConfig()" << endl;
ClientInfo::clear();
KConfig* config = KGlobal::config();
- QStringList clients = config->groupList().grep(CLIENT_GROUP_SEARCH);
- for (QStringList::Iterator cl = clients.begin(); cl != clients.end(); ++cl)
+ TQStringList clients = config->groupList().grep(CLIENT_GROUP_SEARCH);
+ for (TQStringList::Iterator cl = clients.begin(); cl != clients.end(); ++cl)
{
// Read this client's configuration
config->setGroup(*cl);
- QString client = *cl;
+ TQString client = *cl;
client.remove(CLIENT_GROUP_SEARCH);
- QString title = config->readEntry(TITLE_KEY, client); // read app title (default = app name)
- QCString dcopObject = config->readEntry(DCOP_OBJECT_KEY).local8Bit();
+ TQString title = config->readEntry(TITLE_KEY, client); // read app title (default = app name)
+ TQCString dcopObject = config->readEntry(DCOP_OBJECT_KEY).local8Bit();
bool startClient = config->readBoolEntry(START_CLIENT_KEY, false);
- QString calendar = config->readPathEntry(CALENDAR_KEY);
+ TQString calendar = config->readPathEntry(CALENDAR_KEY);
// Verify the configuration
bool ok = false;
@@ -99,12 +99,12 @@ void ADConfigData::readConfig()
/******************************************************************************
* Write a client application's details to the config file.
*/
-void ADConfigData::writeClient(const QCString& appName, const ClientInfo* cinfo)
+void ADConfigData::writeClient(const TQCString& appName, const ClientInfo* cinfo)
{
KConfig* config = KGlobal::config();
- config->setGroup(CLIENT_GROUP + QString::fromLocal8Bit(appName));
+ config->setGroup(CLIENT_GROUP + TQString::fromLocal8Bit(appName));
config->writeEntry(TITLE_KEY, cinfo->title());
- config->writeEntry(DCOP_OBJECT_KEY, QString::fromLocal8Bit(cinfo->dcopObject()));
+ config->writeEntry(DCOP_OBJECT_KEY, TQString::fromLocal8Bit(cinfo->dcopObject()));
config->writeEntry(START_CLIENT_KEY, cinfo->startClient());
config->writePathEntry(CALENDAR_KEY, cinfo->calendar()->urlString());
config->sync();
@@ -113,20 +113,20 @@ void ADConfigData::writeClient(const QCString& appName, const ClientInfo* cinfo)
/******************************************************************************
* Remove a client application's details from the config file.
*/
-void ADConfigData::removeClient(const QCString& appName)
+void ADConfigData::removeClient(const TQCString& appName)
{
KConfig* config = KGlobal::config();
- config->deleteGroup(CLIENT_GROUP + QString::fromLocal8Bit(appName));
+ config->deleteGroup(CLIENT_GROUP + TQString::fromLocal8Bit(appName));
config->sync();
}
/******************************************************************************
* Set the calendar file URL for a specified application.
*/
-void ADConfigData::setCalendar(const QCString& appName, ADCalendar* cal)
+void ADConfigData::setCalendar(const TQCString& appName, ADCalendar* cal)
{
KConfig* config = KGlobal::config();
- config->setGroup(CLIENT_GROUP + QString::fromLocal8Bit(appName));
+ config->setGroup(CLIENT_GROUP + TQString::fromLocal8Bit(appName));
config->writePathEntry(CALENDAR_KEY, cal->urlString());
config->sync();
}
@@ -139,8 +139,8 @@ void ADConfigData::enableAutoStart(bool on)
kdDebug(5900) << "ADConfigData::enableAutoStart(" << on << ")\n";
KConfig* config = KGlobal::config();
config->reparseConfiguration();
- config->setGroup(QString::fromLatin1(DAEMON_AUTOSTART_SECTION));
- config->writeEntry(QString::fromLatin1(DAEMON_AUTOSTART_KEY), on);
+ config->setGroup(TQString::fromLatin1(DAEMON_AUTOSTART_SECTION));
+ config->writeEntry(TQString::fromLatin1(DAEMON_AUTOSTART_KEY), on);
config->sync();
}
diff --git a/kalarm/kalarmd/adconfigdata.h b/kalarm/kalarmd/adconfigdata.h
index 2c841fdff..4b7dddbe1 100644
--- a/kalarm/kalarmd/adconfigdata.h
+++ b/kalarm/kalarmd/adconfigdata.h
@@ -32,9 +32,9 @@ class ADConfigData
{
public:
static void readConfig();
- static void writeClient(const QCString& appName, const ClientInfo*);
- static void removeClient(const QCString& appName);
- static void setCalendar(const QCString& appName, ADCalendar*);
+ static void writeClient(const TQCString& appName, const ClientInfo*);
+ static void removeClient(const TQCString& appName);
+ static void setCalendar(const TQCString& appName, ADCalendar*);
static void enableAutoStart(bool);
};
diff --git a/kalarm/kalarmd/alarmdaemon.cpp b/kalarm/kalarmd/alarmdaemon.cpp
index 576678574..d8bcf83a2 100644
--- a/kalarm/kalarmd/alarmdaemon.cpp
+++ b/kalarm/kalarmd/alarmdaemon.cpp
@@ -24,9 +24,9 @@
#include <unistd.h>
#include <stdlib.h>
-#include <qtimer.h>
-#include <qfile.h>
-#include <qdatetime.h>
+#include <tqtimer.h>
+#include <tqfile.h>
+#include <tqdatetime.h>
#include <kapplication.h>
#include <kstandarddirs.h>
@@ -54,13 +54,13 @@ static const int KALARM_AUTOSTART_TIMEOUT = 30;
static const int SECS_PER_DAY = 3600 * 24;
// KAlarm config file keys
-static const QString START_OF_DAY(QString::fromLatin1("StartOfDay"));
-static const QString AUTOSTART_TRAY(QString::fromLatin1("AutostartTray"));
+static const TQString START_OF_DAY(TQString::fromLatin1("StartOfDay"));
+static const TQString AUTOSTART_TRAY(TQString::fromLatin1("AutostartTray"));
-AlarmDaemon::AlarmDaemon(bool autostart, QObject *parent, const char *name)
+AlarmDaemon::AlarmDaemon(bool autostart, TQObject *parent, const char *name)
: DCOPObject(name),
- QObject(parent, name),
+ TQObject(parent, name),
mAlarmTimer(0)
{
kdDebug(5900) << "AlarmDaemon::AlarmDaemon()" << endl;
@@ -84,12 +84,12 @@ AlarmDaemon::AlarmDaemon(bool autostart, QObject *parent, const char *name)
* itself and instead will simply open a new window.
*/
KConfig kaconfig(locate("config", "kalarmrc"));
- kaconfig.setGroup(QString::fromLatin1("General"));
+ kaconfig.setGroup(TQString::fromLatin1("General"));
autostart = kaconfig.readBoolEntry(AUTOSTART_TRAY, false);
if (autostart)
{
kdDebug(5900) << "AlarmDaemon::AlarmDaemon(): wait to autostart KAlarm\n";
- QTimer::singleShot(KALARM_AUTOSTART_TIMEOUT * 1000, this, SLOT(autostartKAlarm()));
+ TQTimer::singleShot(KALARM_AUTOSTART_TIMEOUT * 1000, this, TQT_SLOT(autostartKAlarm()));
}
}
if (!autostart)
@@ -118,9 +118,9 @@ void AlarmDaemon::autostartKAlarm()
return; // KAlarm has already registered with us
}
kdDebug(5900) << "AlarmDaemon::autostartKAlarm(): starting KAlarm\n";
- QStringList args;
- args << QString::fromLatin1("--tray");
- int ret = KApplication::kdeinitExec(QString::fromLatin1("kalarm"), args);
+ TQStringList args;
+ args << TQString::fromLatin1("--tray");
+ int ret = KApplication::kdeinitExec(TQString::fromLatin1("kalarm"), args);
if (ret)
kdError(5900) << "AlarmDaemon::autostartKAlarm(): error=" << ret << endl;
else
@@ -136,8 +136,8 @@ void AlarmDaemon::autostartKAlarm()
void AlarmDaemon::startMonitoring()
{
// Set up the alarm timer
- mAlarmTimer = new QTimer(this);
- connect(mAlarmTimer, SIGNAL(timeout()), SLOT(checkAlarmsSlot()));
+ mAlarmTimer = new TQTimer(this);
+ connect(mAlarmTimer, TQT_SIGNAL(timeout()), TQT_SLOT(checkAlarmsSlot()));
setTimerStatus();
// Start monitoring calendar files.
@@ -149,7 +149,7 @@ void AlarmDaemon::startMonitoring()
/******************************************************************************
* DCOP call to enable or disable monitoring of a calendar.
*/
-void AlarmDaemon::enableCal(const QString& urlString, bool enable)
+void AlarmDaemon::enableCal(const TQString& urlString, bool enable)
{
kdDebug(5900) << "AlarmDaemon::enableCal(" << urlString << ")" << endl;
ADCalendar* cal = ADCalendar::getCalendar(urlString);
@@ -163,7 +163,7 @@ void AlarmDaemon::enableCal(const QString& urlString, bool enable)
/******************************************************************************
* DCOP call to reload, and optionally reset, the specified calendar.
*/
-void AlarmDaemon::reloadCal(const QCString& appname, const QString& urlString, bool reset)
+void AlarmDaemon::reloadCal(const TQCString& appname, const TQString& urlString, bool reset)
{
kdDebug(5900) << "AlarmDaemon::reloadCal(" << urlString << ")" << endl;
ADCalendar* cal = ADCalendar::getCalendar(urlString);
@@ -185,7 +185,7 @@ void AlarmDaemon::reloadCal(ADCalendar* cal, bool reset)
{
cal->close();
if (!cal->setLoadedConnected())
- connect(cal, SIGNAL(loaded(ADCalendar*, bool)), SLOT(calendarLoaded(ADCalendar*, bool)));
+ connect(cal, TQT_SIGNAL(loaded(ADCalendar*, bool)), TQT_SLOT(calendarLoaded(ADCalendar*, bool)));
cal->loadFile(reset);
}
else if (reset)
@@ -205,9 +205,9 @@ void AlarmDaemon::calendarLoaded(ADCalendar* cal, bool success)
* DCOP call to notify the daemon that an event has been handled, and optionally
* to tell it to reload the calendar.
*/
-void AlarmDaemon::eventHandled(const QCString& appname, const QString& calendarUrl, const QString& eventID, bool reload)
+void AlarmDaemon::eventHandled(const TQCString& appname, const TQString& calendarUrl, const TQString& eventID, bool reload)
{
- QString urlString = expandURL(calendarUrl);
+ TQString urlString = expandURL(calendarUrl);
kdDebug(5900) << "AlarmDaemon::eventHandled(" << urlString << (reload ? "): reload" : ")") << endl;
ADCalendar* cal = ADCalendar::getCalendar(urlString);
if (!cal || cal->appName() != appname)
@@ -224,8 +224,8 @@ void AlarmDaemon::eventHandled(const QCString& appname, const QString& calendarU
* a hang if the daemon happens to send a notification to KAlarm at the
* same time as KAlarm calls this DCCOP method.
*/
-void AlarmDaemon::registerApp(const QCString& appName, const QString& appTitle,
- const QCString& dcopObject, const QString& calendarUrl,
+void AlarmDaemon::registerApp(const TQCString& appName, const TQString& appTitle,
+ const TQCString& dcopObject, const TQString& calendarUrl,
bool startClient)
{
kdDebug(5900) << "AlarmDaemon::registerApp(" << appName << ", " << appTitle << ", "
@@ -280,7 +280,7 @@ void AlarmDaemon::registerApp(const QCString& appName, const QString& appTitle,
* a hang if the daemon happens to send a notification to KAlarm at the
* same time as KAlarm calls this DCCOP method.
*/
-void AlarmDaemon::registerChange(const QCString& appName, bool startClient)
+void AlarmDaemon::registerChange(const TQCString& appName, bool startClient)
{
kdDebug(5900) << "AlarmDaemon::registerChange(" << appName << ", " << startClient << ")" << endl;
KAlarmd::RegisterResult result;
@@ -330,7 +330,7 @@ void AlarmDaemon::checkAlarmsSlot()
}
else if (--mAlarmTimerSyncCount <= 0)
{
- int interval = DAEMON_CHECK_INTERVAL + 1 - QTime::currentTime().second();
+ int interval = DAEMON_CHECK_INTERVAL + 1 - TQTime::currentTime().second();
if (interval < DAEMON_CHECK_INTERVAL - 1)
{
// Need to re-synch to 1 second past the minute
@@ -365,59 +365,59 @@ void AlarmDaemon::checkAlarms(ADCalendar* cal)
if (!cal->loaded() || !cal->enabled())
return;
- QDateTime now = QDateTime::currentDateTime();
+ TQDateTime now = TQDateTime::currentDateTime();
kdDebug(5901) << " To: " << now.toString() << endl;
- QValueList<KCal::Alarm*> alarms = cal->alarmsTo(now);
+ TQValueList<KCal::Alarm*> alarms = cal->alarmsTo(now);
if (!alarms.count())
return;
- QValueList<KCal::Event*> eventsDone;
- for (QValueList<KCal::Alarm*>::ConstIterator it = alarms.begin(); it != alarms.end(); ++it)
+ TQValueList<KCal::Event*> eventsDone;
+ for (TQValueList<KCal::Alarm*>::ConstIterator it = alarms.begin(); it != alarms.end(); ++it)
{
KCal::Event* event = dynamic_cast<KCal::Event*>((*it)->parent());
if (!event || eventsDone.find(event) != eventsDone.end())
continue; // either not an event, or the event has already been processed
eventsDone += event;
- const QString& eventID = event->uid();
+ const TQString& eventID = event->uid();
kdDebug(5901) << "AlarmDaemon::checkAlarms(): event " << eventID << endl;
// Check which of the alarms for this event are due.
// The times in 'alarmtimes' corresponding to due alarms are set.
// The times for non-due alarms are set invalid in 'alarmtimes'.
bool recurs = event->doesRecur();
- const QStringList cats = event->categories();
- bool floats = (cats.find(QString::fromLatin1("DATE")) != cats.end());
- QDateTime nextDateTime = event->dtStart();
+ const TQStringList cats = event->categories();
+ bool floats = (cats.find(TQString::fromLatin1("DATE")) != cats.end());
+ TQDateTime nextDateTime = event->dtStart();
if (recurs)
{
- QString prop = event->customProperty("KALARM", "NEXTRECUR");
+ TQString prop = event->customProperty("KALARM", "NEXTRECUR");
if (prop.length() >= 8)
{
// The next due recurrence time is specified
- QDate d(prop.left(4).toInt(), prop.mid(4,2).toInt(), prop.mid(6,2).toInt());
+ TQDate d(prop.left(4).toInt(), prop.mid(4,2).toInt(), prop.mid(6,2).toInt());
if (d.isValid())
{
if (floats && prop.length() == 8)
nextDateTime = d;
- else if (!floats && prop.length() == 15 && prop[8] == QChar('T'))
+ else if (!floats && prop.length() == 15 && prop[8] == TQChar('T'))
{
- QTime t(prop.mid(9,2).toInt(), prop.mid(11,2).toInt(), prop.mid(13,2).toInt());
+ TQTime t(prop.mid(9,2).toInt(), prop.mid(11,2).toInt(), prop.mid(13,2).toInt());
if (t.isValid())
- nextDateTime = QDateTime(d, t);
+ nextDateTime = TQDateTime(d, t);
}
}
}
}
if (floats)
nextDateTime.setTime(mStartOfDay);
- QValueList<QDateTime> alarmtimes;
+ TQValueList<TQDateTime> alarmtimes;
KCal::Alarm::List alarms = event->alarms();
for (KCal::Alarm::List::ConstIterator al = alarms.begin(); al != alarms.end(); ++al)
{
KCal::Alarm* alarm = *al;
- QDateTime dt;
+ TQDateTime dt;
if (alarm->enabled())
{
- QDateTime dt1;
+ TQDateTime dt1;
if (!alarm->hasTime())
{
// Find the latest recurrence for the alarm.
@@ -429,7 +429,7 @@ void AlarmDaemon::checkAlarms(ADCalendar* cal)
{
dt1 = nextDateTime.addSecs(floats ? (offset/SECS_PER_DAY)*SECS_PER_DAY : offset);
if (dt1 > now)
- dt1 = QDateTime();
+ dt1 = TQDateTime();
}
}
// Get latest due repetition, or the recurrence time if none
@@ -438,7 +438,7 @@ void AlarmDaemon::checkAlarms(ADCalendar* cal)
{
int snoozeSecs = alarm->snoozeTime() * 60;
int offset = alarm->repeatCount() * snoozeSecs;
- QDateTime lastRepetition = nextDateTime.addSecs(floats ? (offset/SECS_PER_DAY)*SECS_PER_DAY : offset);
+ TQDateTime lastRepetition = nextDateTime.addSecs(floats ? (offset/SECS_PER_DAY)*SECS_PER_DAY : offset);
if (lastRepetition <= now)
dt = lastRepetition;
else
@@ -466,11 +466,11 @@ void AlarmDaemon::checkAlarms(ADCalendar* cal)
* Send a DCOP message to KAlarm telling it that an alarm should now be handled.
* Reply = false if the event should be held pending until KAlarm can be started.
*/
-bool AlarmDaemon::notifyEvent(ADCalendar* calendar, const QString& eventID)
+bool AlarmDaemon::notifyEvent(ADCalendar* calendar, const TQString& eventID)
{
if (!calendar)
return true;
- QCString appname = calendar->appName();
+ TQCString appname = calendar->appName();
const ClientInfo* client = ClientInfo::get(appname);
if (!client)
{
@@ -478,7 +478,7 @@ bool AlarmDaemon::notifyEvent(ADCalendar* calendar, const QString& eventID)
return false;
}
kdDebug(5900) << "AlarmDaemon::notifyEvent(" << appname << ", " << eventID << "): notification type=" << client->startClient() << endl;
- QString id = QString::fromLatin1("ad:") + eventID; // prefix to indicate that the notification if from the daemon
+ TQString id = TQString::fromLatin1("ad:") + eventID; // prefix to indicate that the notification if from the daemon
// Check if the client application is running and ready to receive notification
bool registered = kapp->dcopClient()->isApplicationRegistered(static_cast<const char*>(appname));
@@ -504,7 +504,7 @@ bool AlarmDaemon::notifyEvent(ADCalendar* calendar, const QString& eventID)
// Start KAlarm, using the command line to specify the alarm
KProcess p;
- QString cmd = locate("exe", appname);
+ TQString cmd = locate("exe", appname);
if (cmd.isEmpty())
{
kdDebug(5900) << "AlarmDaemon::notifyEvent(): '" << appname << "' not found" << endl;
@@ -553,7 +553,7 @@ void AlarmDaemon::setTimerStatus()
{
// Timeout every minute.
// But first synchronise to one second after the minute boundary.
- int firstInterval = DAEMON_CHECK_INTERVAL + 1 - QTime::currentTime().second();
+ int firstInterval = DAEMON_CHECK_INTERVAL + 1 - TQTime::currentTime().second();
mAlarmTimer->start(1000 * firstInterval);
mAlarmTimerSyncing = (firstInterval != DAEMON_CHECK_INTERVAL);
kdDebug(5900) << "Started alarm timer" << endl;
@@ -574,7 +574,7 @@ void AlarmDaemon::notifyCalStatus(const ADCalendar* cal)
ClientInfo* client = ClientInfo::get(cal);
if (!client)
return;
- QCString appname = client->appName();
+ TQCString appname = client->appName();
if (kapp->dcopClient()->isApplicationRegistered(static_cast<const char*>(appname)))
{
KAlarmd::CalendarStatus change = cal->available() ? (cal->enabled() ? KAlarmd::CALENDAR_ENABLED : KAlarmd::CALENDAR_DISABLED)
@@ -595,8 +595,8 @@ void AlarmDaemon::notifyCalStatus(const ADCalendar* cal)
void AlarmDaemon::readKAlarmConfig()
{
KConfig config(locate("config", "kalarmrc"));
- config.setGroup(QString::fromLatin1("General"));
- QDateTime defTime(QDate(1900,1,1), QTime());
+ config.setGroup(TQString::fromLatin1("General"));
+ TQDateTime defTime(TQDate(1900,1,1), TQTime());
mStartOfDay = config.readDateTimeEntry(START_OF_DAY, &defTime).time();
kdDebug(5900) << "AlarmDaemon::readKAlarmConfig()" << endl;
}
@@ -606,9 +606,9 @@ void AlarmDaemon::readKAlarmConfig()
* (We must store full URLs in the calendar data since otherwise later calls to
* reload or remove calendars won't necessarily find a match.)
*/
-QString AlarmDaemon::expandURL(const QString& urlString)
+TQString AlarmDaemon::expandURL(const TQString& urlString)
{
if (urlString.isEmpty())
- return QString();
+ return TQString();
return KURL(urlString).url();
}
diff --git a/kalarm/kalarmd/alarmdaemon.h b/kalarm/kalarmd/alarmdaemon.h
index 6ab5d0f9a..54e7980a2 100644
--- a/kalarm/kalarmd/alarmdaemon.h
+++ b/kalarm/kalarmd/alarmdaemon.h
@@ -29,11 +29,11 @@
class ADCalendar;
-class AlarmDaemon : public QObject, virtual public AlarmDaemonIface
+class AlarmDaemon : public TQObject, virtual public AlarmDaemonIface
{
Q_OBJECT
public:
- AlarmDaemon(bool autostart, QObject* parent = 0, const char* name = 0);
+ AlarmDaemon(bool autostart, TQObject* parent = 0, const char* name = 0);
private slots:
//#ifdef AUTOSTART_KALARM
@@ -46,34 +46,34 @@ class AlarmDaemon : public QObject, virtual public AlarmDaemonIface
private:
// DCOP interface
void enableAutoStart(bool enable);
- void enableCalendar(const QString& urlString, bool enable)
+ void enableCalendar(const TQString& urlString, bool enable)
{ enableCal(expandURL(urlString), enable); }
- void reloadCalendar(const QCString& appname, const QString& urlString)
+ void reloadCalendar(const TQCString& appname, const TQString& urlString)
{ reloadCal(appname, expandURL(urlString), false); }
- void resetCalendar(const QCString& appname, const QString& urlString)
+ void resetCalendar(const TQCString& appname, const TQString& urlString)
{ reloadCal(appname, expandURL(urlString), true); }
- void registerApp(const QCString& appName, const QString& appTitle, const QCString& dcopObject,
- const QString& calendarUrl, bool startClient);
- void registerChange(const QCString& appName, bool startClient);
- void eventHandled(const QCString& appname, const QString& calendarURL, const QString& eventID, bool reload);
+ void registerApp(const TQCString& appName, const TQString& appTitle, const TQCString& dcopObject,
+ const TQString& calendarUrl, bool startClient);
+ void registerChange(const TQCString& appName, bool startClient);
+ void eventHandled(const TQCString& appname, const TQString& calendarURL, const TQString& eventID, bool reload);
void timeConfigChanged() { readKAlarmConfig(); }
void quit();
// Other methods
void readKAlarmConfig();
void startMonitoring();
- void enableCal(const QString& urlString, bool enable);
- void reloadCal(const QCString& appname, const QString& urlString, bool reset);
+ void enableCal(const TQString& urlString, bool enable);
+ void reloadCal(const TQCString& appname, const TQString& urlString, bool reset);
void reloadCal(ADCalendar*, bool reset);
void checkAlarms(ADCalendar*);
- bool notifyEvent(ADCalendar*, const QString& eventID);
+ bool notifyEvent(ADCalendar*, const TQString& eventID);
void notifyCalStatus(const ADCalendar*);
void setTimerStatus();
- static QString expandURL(const QString& urlString);
+ static TQString expandURL(const TQString& urlString);
- QTimer* mAlarmTimer;
+ TQTimer* mAlarmTimer;
int mAlarmTimerSyncCount; // countdown to re-synching the alarm timer
bool mAlarmTimerSyncing; // true while alarm timer interval < 1 minute
- QTime mStartOfDay; // start of day for date-only alarms
+ TQTime mStartOfDay; // start of day for date-only alarms
};
#endif // ALARMDAEMON_H
diff --git a/kalarm/kalarmd/alarmdaemoniface.h b/kalarm/kalarmd/alarmdaemoniface.h
index 708f5b281..75723ce60 100644
--- a/kalarm/kalarmd/alarmdaemoniface.h
+++ b/kalarm/kalarmd/alarmdaemoniface.h
@@ -31,13 +31,13 @@ class AlarmDaemonIface : virtual public DCOPObject
K_DCOP
k_dcop:
virtual ASYNC enableAutoStart(bool enable) = 0;
- virtual ASYNC enableCalendar(const QString& urlString, bool enable) = 0;
- virtual ASYNC reloadCalendar(const QCString& appname, const QString& urlString) = 0;
- virtual ASYNC resetCalendar(const QCString& appname, const QString& urlString) = 0;
- virtual ASYNC registerApp(const QCString& appName, const QString& appTitle, const QCString& dcopObject,
- const QString& calendarUrl, bool startClient) = 0;
- virtual ASYNC registerChange(const QCString& appName, bool startClient) = 0;
- virtual ASYNC eventHandled(const QCString& appname, const QString& calendarURL, const QString& eventID, bool reload) = 0;
+ virtual ASYNC enableCalendar(const TQString& urlString, bool enable) = 0;
+ virtual ASYNC reloadCalendar(const TQCString& appname, const TQString& urlString) = 0;
+ virtual ASYNC resetCalendar(const TQCString& appname, const TQString& urlString) = 0;
+ virtual ASYNC registerApp(const TQCString& appName, const TQString& appTitle, const TQCString& dcopObject,
+ const TQString& calendarUrl, bool startClient) = 0;
+ virtual ASYNC registerChange(const TQCString& appName, bool startClient) = 0;
+ virtual ASYNC eventHandled(const TQCString& appname, const TQString& calendarURL, const TQString& eventID, bool reload) = 0;
virtual ASYNC timeConfigChanged() = 0;
virtual ASYNC quit() = 0;
};
diff --git a/kalarm/kalarmd/alarmguiiface.h b/kalarm/kalarmd/alarmguiiface.h
index 7e98c831d..d221fd345 100644
--- a/kalarm/kalarmd/alarmguiiface.h
+++ b/kalarm/kalarmd/alarmguiiface.h
@@ -55,11 +55,11 @@ class AlarmGuiIface : virtual public DCOPObject
/** Called to notify a change in status of the calendar.
@param calendarStatus new calendar status. Value is of type CalendarStatus.
*/
- virtual ASYNC alarmDaemonUpdate(int calendarStatus, const QString& calendarURL) = 0;
+ virtual ASYNC alarmDaemonUpdate(int calendarStatus, const TQString& calendarURL) = 0;
/** Called to notify that an alarm is due.
*/
- virtual ASYNC handleEvent(const QString& calendarURL, const QString& eventID) = 0;
+ virtual ASYNC handleEvent(const TQString& calendarURL, const TQString& eventID) = 0;
/** Called to indicate success/failure of (re)register() call.
@param result success/failure code. Value is of type RegisterResult.
diff --git a/kalarm/kalarmd/clientinfo.cpp b/kalarm/kalarmd/clientinfo.cpp
index 21889082e..e8c5ea6c7 100644
--- a/kalarm/kalarmd/clientinfo.cpp
+++ b/kalarm/kalarmd/clientinfo.cpp
@@ -21,11 +21,11 @@
#include "adcalendar.h"
#include "clientinfo.h"
-QMap<QCString, ClientInfo*> ClientInfo::mClients;
+TQMap<TQCString, ClientInfo*> ClientInfo::mClients;
-ClientInfo::ClientInfo(const QCString& appName, const QString& title,
- const QCString& dcopObj, const QString& calendar, bool startClient)
+ClientInfo::ClientInfo(const TQCString& appName, const TQString& title,
+ const TQCString& dcopObj, const TQString& calendar, bool startClient)
: mAppName(appName),
mTitle(title),
mDcopObject(dcopObj),
@@ -35,8 +35,8 @@ ClientInfo::ClientInfo(const QCString& appName, const QString& title,
mClients[mAppName] = this;
}
-ClientInfo::ClientInfo(const QCString& appName, const QString& title,
- const QCString& dcopObj, ADCalendar* calendar, bool startClient)
+ClientInfo::ClientInfo(const TQCString& appName, const TQString& title,
+ const TQCString& dcopObj, ADCalendar* calendar, bool startClient)
: mAppName(appName),
mTitle(title),
mDcopObject(dcopObj),
@@ -55,7 +55,7 @@ ClientInfo::~ClientInfo()
/******************************************************************************
* Set a new calendar for the specified client application.
*/
-ADCalendar* ClientInfo::setCalendar(const QString& url)
+ADCalendar* ClientInfo::setCalendar(const TQString& url)
{
if (url != mCalendar->urlString())
{
@@ -68,11 +68,11 @@ ADCalendar* ClientInfo::setCalendar(const QString& url)
/******************************************************************************
* Return the ClientInfo object for the specified client application.
*/
-ClientInfo* ClientInfo::get(const QCString& appName)
+ClientInfo* ClientInfo::get(const TQCString& appName)
{
if (appName.isEmpty())
return 0;
- QMap<QCString, ClientInfo*>::ConstIterator it = mClients.find(appName);
+ TQMap<TQCString, ClientInfo*>::ConstIterator it = mClients.find(appName);
if (it == mClients.end())
return 0;
return it.data();
@@ -94,7 +94,7 @@ ClientInfo* ClientInfo::get(const ADCalendar* cal)
*/
void ClientInfo::clear()
{
- QMap<QCString, ClientInfo*>::Iterator it;
+ TQMap<TQCString, ClientInfo*>::Iterator it;
while ((it = mClients.begin()) != mClients.end())
delete it.data();
}
@@ -102,9 +102,9 @@ void ClientInfo::clear()
/******************************************************************************
* Delete the client with the specified name.
*/
-void ClientInfo::remove(const QCString& appName)
+void ClientInfo::remove(const TQCString& appName)
{
- QMap<QCString, ClientInfo*>::Iterator it = mClients.find(appName);
+ TQMap<TQCString, ClientInfo*>::Iterator it = mClients.find(appName);
if (it != mClients.end())
delete it.data();
}
diff --git a/kalarm/kalarmd/clientinfo.h b/kalarm/kalarmd/clientinfo.h
index fe6491d7e..d679669ec 100644
--- a/kalarm/kalarmd/clientinfo.h
+++ b/kalarm/kalarmd/clientinfo.h
@@ -22,9 +22,9 @@
#ifndef _CALCLIENT_H
#define _CALCLIENT_H
-#include <qcstring.h>
-#include <qstring.h>
-#include <qmap.h>
+#include <tqcstring.h>
+#include <tqstring.h>
+#include <tqmap.h>
class ADCalendar;
@@ -36,35 +36,35 @@ class ADCalendar;
class ClientInfo
{
public:
- typedef QMap<QCString, ClientInfo*>::ConstIterator ConstIterator;
+ typedef TQMap<TQCString, ClientInfo*>::ConstIterator ConstIterator;
- ClientInfo(const QCString &appName, const QString &title, const QCString &dcopObj,
- const QString& calendar, bool startClient);
- ClientInfo(const QCString &appName, const QString &title, const QCString &dcopObj,
+ ClientInfo(const TQCString &appName, const TQString &title, const TQCString &dcopObj,
+ const TQString& calendar, bool startClient);
+ ClientInfo(const TQCString &appName, const TQString &title, const TQCString &dcopObj,
ADCalendar* calendar, bool startClient);
~ClientInfo();
- ADCalendar* setCalendar(const QString& url);
+ ADCalendar* setCalendar(const TQString& url);
void detachCalendar() { mCalendar = 0; }
void setStartClient(bool start) { mStartClient = start; }
- QCString appName() const { return mAppName; }
- QString title() const { return mTitle; }
- QCString dcopObject() const { return mDcopObject; }
+ TQCString appName() const { return mAppName; }
+ TQString title() const { return mTitle; }
+ TQCString dcopObject() const { return mDcopObject; }
ADCalendar* calendar() const { return mCalendar; }
bool startClient() const { return mStartClient; }
static ConstIterator begin() { return mClients.begin(); }
static ConstIterator end() { return mClients.end(); }
- static ClientInfo* get(const QCString& appName);
+ static ClientInfo* get(const TQCString& appName);
static ClientInfo* get(const ADCalendar*);
- static void remove(const QCString& appName);
+ static void remove(const TQCString& appName);
static void clear();
private:
- static QMap<QCString, ClientInfo*> mClients; // list of all constructed clients
- QCString mAppName; // client's executable and DCOP name
- QString mTitle; // application title for display purposes
- QCString mDcopObject; // object to receive DCOP messages
+ static TQMap<TQCString, ClientInfo*> mClients; // list of all constructed clients
+ TQCString mAppName; // client's executable and DCOP name
+ TQString mTitle; // application title for display purposes
+ TQCString mDcopObject; // object to receive DCOP messages
ADCalendar* mCalendar; // this client's event calendar
bool mStartClient; // whether to notify events via command line if client app isn't running
};
diff --git a/kalarm/kalarmiface.h b/kalarm/kalarmiface.h
index cd3aaf0cc..2654072ee 100644
--- a/kalarm/kalarmiface.h
+++ b/kalarm/kalarmiface.h
@@ -26,7 +26,7 @@
// No forward declarations - dcopidl2cpp won't work
#include <dcopobject.h>
#include <kurl.h>
-#include <qstringlist.h>
+#include <tqstringlist.h>
class QString;
/** KAlarmIface provides a DCOP interface for other applications to request
@@ -88,7 +88,7 @@ class KAlarmIface : virtual public DCOPObject
* current calendar file.
* @param eventId - The unique ID of the event to be cancelled, as stored in the calendar file @p url.
*/
- virtual bool cancelEvent(const QString& url, const QString& eventId) = 0;
+ virtual bool cancelEvent(const TQString& url, const TQString& eventId) = 0;
/** Trigger the immediate display or execution of an alarm, regardless of what time it is scheduled for.
* @param url - The URL (not path) of the calendar file containing the event to be triggered.
@@ -96,22 +96,22 @@ class KAlarmIface : virtual public DCOPObject
* current calendar file.
* @param eventId - The unique ID of the event to be triggered, as stored in the calendar file @p url.
*/
- virtual bool triggerEvent(const QString& url, const QString& eventId) = 0;
+ virtual bool triggerEvent(const TQString& url, const TQString& eventId) = 0;
/** Schedule a message display alarm.
* @param message The text of the message to display.
* @param startDateTime Start date/time, in the format YYYY-MM-DD[THH:MM[:SS]] or [T]HH:MM[:SS]
* @param lateCancel Late-cancellation period in minutes, or 0 for no cancellation.
* @param flags OR of flag bits defined in Flags enum.
- * @param bgColor The background colour for the alarm message window, or QString::null for the
+ * @param bgColor The background colour for the alarm message window, or TQString::null for the
* current default background colour. The string may be in any of the formats
- * accepted by QColor::QColor(const QString&).
- * @param fgColor The foreground colour for the alarm message, or QString::null for the current
+ * accepted by TQColor::TQColor(const TQString&).
+ * @param fgColor The foreground colour for the alarm message, or TQString::null for the current
* default foreground colour. The format of the string is the same as for @p bgColor.
- * @param font The font for the alarm message, or QString::null for the default message font
+ * @param font The font for the alarm message, or TQString::null for the default message font
* current at the time the message is displayed. The string should be in format
- * returned by QFont::toString().
- * @param audioFile The audio file to play when the alarm is displayed, or QString::null for none.
+ * returned by TQFont::toString().
+ * @param audioFile The audio file to play when the alarm is displayed, or TQString::null for none.
* @param reminderMins The number of minutes in advance of the main alarm and its recurrences to display
* a reminder alarm, or 0 for no reminder.
* @param recurrence Recurrence specification using iCalendar syntax (defined in RFC2445).
@@ -119,24 +119,24 @@ class KAlarmIface : virtual public DCOPObject
* @param repeatCount Simple repetition repeat count (after the first occurrence), or 0 for no sub-repetition.
* @return true if alarm was scheduled successfully, false if configuration errors were found.
*/
- virtual bool scheduleMessage(const QString& message, const QString& startDateTime, int lateCancel, unsigned flags,
- const QString& bgColor, const QString& fgColor, const QString& font,
- const KURL& audioFile, int reminderMins, const QString& recurrence,
+ virtual bool scheduleMessage(const TQString& message, const TQString& startDateTime, int lateCancel, unsigned flags,
+ const TQString& bgColor, const TQString& fgColor, const TQString& font,
+ const KURL& audioFile, int reminderMins, const TQString& recurrence,
int repeatInterval, int repeatCount) = 0;
/** Schedule a message display alarm.
* @param message The text of the message to display.
* @param startDateTime Start date/time, in the format YYYY-MM-DD[THH:MM[:SS]] or [T]HH:MM[:SS]
* @param lateCancel Late-cancellation period in minutes, or 0 for no cancellation.
* @param flags OR of flag bits defined in Flags enum.
- * @param bgColor The background colour for the alarm message window, or QString::null for the
+ * @param bgColor The background colour for the alarm message window, or TQString::null for the
* current default background colour. The string may be in any of the formats
- * accepted by QColor::QColor(const QString&).
- * @param fgColor The foreground colour for the alarm message, or QString::null for the current
+ * accepted by TQColor::TQColor(const TQString&).
+ * @param fgColor The foreground colour for the alarm message, or TQString::null for the current
* default foreground colour. The format of the string is the same as for @p bgColor.
- * @param font The font for the alarm message, or QString::null for the default message font
+ * @param font The font for the alarm message, or TQString::null for the default message font
* current at the time the message is displayed. The string should be in format
- * returned by QFont::toString().
- * @param audioFile The audio file to play when the alarm is displayed, or QString::null for none.
+ * returned by TQFont::toString().
+ * @param audioFile The audio file to play when the alarm is displayed, or TQString::null for none.
* @param reminderMins The number of minutes in advance of the main alarm and its recurrences to display
* a reminder alarm, or 0 for no reminder.
* @param repeatType The time units to use for recurrence. The actual recurrence interval is equal to
@@ -146,8 +146,8 @@ class KAlarmIface : virtual public DCOPObject
* @param repeatCount Recurrence count (after the first occurrence), or 0 for no recurrence.
* @return true if alarm was scheduled successfully, false if configuration errors were found.
*/
- virtual bool scheduleMessage(const QString& message, const QString& startDateTime, int lateCancel, unsigned flags,
- const QString& bgColor, const QString& fgColor, const QString& font,
+ virtual bool scheduleMessage(const TQString& message, const TQString& startDateTime, int lateCancel, unsigned flags,
+ const TQString& bgColor, const TQString& fgColor, const TQString& font,
const KURL& audioFile, int reminderMins,
int repeatType, int repeatInterval, int repeatCount) = 0;
/** Schedule a message display alarm.
@@ -155,15 +155,15 @@ class KAlarmIface : virtual public DCOPObject
* @param startDateTime Start date/time, in the format YYYY-MM-DD[THH:MM[:SS]] or [T]HH:MM[:SS]
* @param lateCancel Late-cancellation period in minutes, or 0 for no cancellation.
* @param flags OR of flag bits defined in Flags enum.
- * @param bgColor The background colour for the alarm message window, or QString::null for the
+ * @param bgColor The background colour for the alarm message window, or TQString::null for the
* current default background colour. The string may be in any of the formats
- * accepted by QColor::QColor(const QString&).
- * @param fgColor The foreground colour for the alarm message, or QString::null for the current
+ * accepted by TQColor::TQColor(const TQString&).
+ * @param fgColor The foreground colour for the alarm message, or TQString::null for the current
* default foreground colour. The format of the string is the same as for @p bgColor.
- * @param font The font for the alarm message, or QString::null for the default message font
+ * @param font The font for the alarm message, or TQString::null for the default message font
* current at the time the message is displayed. The string should be in format
- * returned by QFont::toString().
- * @param audioFile The audio file to play when the alarm is displayed, or QString::null for none.
+ * returned by TQFont::toString().
+ * @param audioFile The audio file to play when the alarm is displayed, or TQString::null for none.
* @param reminderMins The number of minutes in advance of the main alarm and its recurrences to display
* a reminder alarm, or 0 for no reminder.
* @param repeatType The time units to use for recurrence. The actual recurrence interval is equal to
@@ -173,20 +173,20 @@ class KAlarmIface : virtual public DCOPObject
* @param endDateTime Date/time after which the recurrence will end.
* @return true if alarm was scheduled successfully, false if configuration errors were found.
*/
- virtual bool scheduleMessage(const QString& message, const QString& startDateTime, int lateCancel, unsigned flags,
- const QString& bgColor, const QString& fgColor, const QString& font,
+ virtual bool scheduleMessage(const TQString& message, const TQString& startDateTime, int lateCancel, unsigned flags,
+ const TQString& bgColor, const TQString& fgColor, const TQString& font,
const KURL& audioFile, int reminderMins,
- int repeatType, int repeatInterval, const QString& endDateTime) = 0;
+ int repeatType, int repeatInterval, const TQString& endDateTime) = 0;
/** Schedule a file display alarm.
* @param file The text or image file to display.
* @param startDateTime Start date/time, in the format YYYY-MM-DD[THH:MM[:SS]] or [T]HH:MM[:SS]
* @param lateCancel Late-cancellation period in minutes, or 0 for no cancellation.
* @param flags OR of flag bits defined in Flags enum.
- * @param bgColor The background colour for the alarm message window, or QString::null for the
+ * @param bgColor The background colour for the alarm message window, or TQString::null for the
* current default background colour. The string may be in any of the formats
- * accepted by QColor::QColor(const QString&).
- * @param audioFile The audio file to play when the alarm is displayed, or QString::null for none.
+ * accepted by TQColor::TQColor(const TQString&).
+ * @param audioFile The audio file to play when the alarm is displayed, or TQString::null for none.
* @param reminderMins The number of minutes in advance of the main alarm and its recurrences to display
* a reminder alarm, or 0 for no reminder.
* @param recurrence Recurrence specification using iCalendar syntax (defined in RFC2445).
@@ -194,18 +194,18 @@ class KAlarmIface : virtual public DCOPObject
* @param repeatCount Simple repetition repeat count (after the first occurrence), or 0 for no sub-repetition.
* @return true if alarm was scheduled successfully, false if configuration errors were found.
*/
- virtual bool scheduleFile(const KURL& file, const QString& startDateTime, int lateCancel, unsigned flags, const QString& bgColor,
- const KURL& audioFile, int reminderMins, const QString& recurrence,
+ virtual bool scheduleFile(const KURL& file, const TQString& startDateTime, int lateCancel, unsigned flags, const TQString& bgColor,
+ const KURL& audioFile, int reminderMins, const TQString& recurrence,
int repeatInterval, int repeatCount) = 0;
/** Schedule a file display alarm.
* @param file The text or image file to display.
* @param startDateTime Start date/time, in the format YYYY-MM-DD[THH:MM[:SS]] or [T]HH:MM[:SS]
* @param lateCancel Late-cancellation period in minutes, or 0 for no cancellation.
* @param flags OR of flag bits defined in Flags enum.
- * @param bgColor The background colour for the alarm message window, or QString::null for the
+ * @param bgColor The background colour for the alarm message window, or TQString::null for the
* current default background colour. The string may be in any of the formats
- * accepted by QColor::QColor(const QString&).
- * @param audioFile The audio file to play when the alarm is displayed, or QString::null for none.
+ * accepted by TQColor::TQColor(const TQString&).
+ * @param audioFile The audio file to play when the alarm is displayed, or TQString::null for none.
* @param reminderMins The number of minutes in advance of the main alarm and its recurrences to display
* a reminder alarm, or 0 for no reminder.
* @param repeatType The time units to use for recurrence. The actual recurrence interval is equal to
@@ -215,17 +215,17 @@ class KAlarmIface : virtual public DCOPObject
* @param repeatCount Recurrence count (after the first occurrence), or 0 for no recurrence.
* @return true if alarm was scheduled successfully, false if configuration errors were found.
*/
- virtual bool scheduleFile(const KURL& file, const QString& startDateTime, int lateCancel, unsigned flags, const QString& bgColor,
+ virtual bool scheduleFile(const KURL& file, const TQString& startDateTime, int lateCancel, unsigned flags, const TQString& bgColor,
const KURL& audioFile, int reminderMins, int repeatType, int repeatInterval, int repeatCount) = 0;
/** Schedule a file display alarm.
* @param file The text or image file to display.
* @param startDateTime Start date/time, in the format YYYY-MM-DD[THH:MM[:SS]] or [T]HH:MM[:SS]
* @param lateCancel Late-cancellation period in minutes, or 0 for no cancellation.
* @param flags OR of flag bits defined in Flags enum.
- * @param bgColor The background colour for the alarm message window, or QString::null for the
+ * @param bgColor The background colour for the alarm message window, or TQString::null for the
* current default background colour. The string may be in any of the formats
- * accepted by QColor::QColor(const QString&).
- * @param audioFile The audio file to play when the alarm is displayed, or QString::null for none.
+ * accepted by TQColor::TQColor(const TQString&).
+ * @param audioFile The audio file to play when the alarm is displayed, or TQString::null for none.
* @param reminderMins The number of minutes in advance of the main alarm and its recurrences to display
* a reminder alarm, or 0 for no reminder.
* @param repeatType The time units to use for recurrence. The actual recurrence interval is equal to
@@ -235,9 +235,9 @@ class KAlarmIface : virtual public DCOPObject
* @param endDateTime Date/time after which the recurrence will end.
* @return true if alarm was scheduled successfully, false if configuration errors were found.
*/
- virtual bool scheduleFile(const KURL& file, const QString& startDateTime, int lateCancel, unsigned flags, const QString& bgColor,
+ virtual bool scheduleFile(const KURL& file, const TQString& startDateTime, int lateCancel, unsigned flags, const TQString& bgColor,
const KURL& audioFile, int reminderMins,
- int repeatType, int repeatInterval, const QString& endDateTime) = 0;
+ int repeatType, int repeatInterval, const TQString& endDateTime) = 0;
/** Schedule a command execution alarm.
* @param commandLine The command line or command script to execute.
@@ -249,8 +249,8 @@ class KAlarmIface : virtual public DCOPObject
* @param repeatCount Simple repetition repeat count (after the first occurrence), or 0 for no sub-repetition.
* @return true if alarm was scheduled successfully, false if configuration errors were found.
*/
- virtual bool scheduleCommand(const QString& commandLine, const QString& startDateTime, int lateCancel, unsigned flags,
- const QString& recurrence, int repeatInterval, int repeatCount) = 0;
+ virtual bool scheduleCommand(const TQString& commandLine, const TQString& startDateTime, int lateCancel, unsigned flags,
+ const TQString& recurrence, int repeatInterval, int repeatCount) = 0;
/** Schedule a command execution alarm.
* @param commandLine The command line or command script to execute.
* @param startDateTime Start date/time, in the format YYYY-MM-DD[THH:MM[:SS]] or [T]HH:MM[:SS]
@@ -263,7 +263,7 @@ class KAlarmIface : virtual public DCOPObject
* @param repeatCount Recurrence count (after the first occurrence), or 0 for no recurrence.
* @return true if alarm was scheduled successfully, false if configuration errors were found.
*/
- virtual bool scheduleCommand(const QString& commandLine, const QString& startDateTime, int lateCancel, unsigned flags,
+ virtual bool scheduleCommand(const TQString& commandLine, const TQString& startDateTime, int lateCancel, unsigned flags,
int repeatType, int repeatInterval, int repeatCount) = 0;
/** Schedule a command execution alarm.
* @param commandLine The command line or command script to execute.
@@ -277,11 +277,11 @@ class KAlarmIface : virtual public DCOPObject
* @param endDateTime Date/time after which the recurrence will end.
* @return true if alarm was scheduled successfully, false if configuration errors were found.
*/
- virtual bool scheduleCommand(const QString& commandLine, const QString& startDateTime, int lateCancel, unsigned flags,
- int repeatType, int repeatInterval, const QString& endDateTime) = 0;
+ virtual bool scheduleCommand(const TQString& commandLine, const TQString& startDateTime, int lateCancel, unsigned flags,
+ int repeatType, int repeatInterval, const TQString& endDateTime) = 0;
/** Schedule an email alarm.
- * @param fromID The KMail identity to use as the sender of the email, or QString::null to use KAlarm's default sender ID.
+ * @param fromID The KMail identity to use as the sender of the email, or TQString::null to use KAlarm's default sender ID.
* @param addresses Comma-separated list of addresses to send the email to.
* @param subject Subject line of the email.
* @param message Email message's body text.
@@ -295,11 +295,11 @@ class KAlarmIface : virtual public DCOPObject
* @param repeatCount Simple repetition repeat count (after the first occurrence), or 0 for no sub-repetition.
* @return true if alarm was scheduled successfully, false if configuration errors were found.
*/
- virtual bool scheduleEmail(const QString& fromID, const QString& addresses, const QString& subject, const QString& message,
- const QString& attachments, const QString& startDateTime, int lateCancel, unsigned flags,
- const QString& recurrence, int repeatInterval, int repeatCount) = 0;
+ virtual bool scheduleEmail(const TQString& fromID, const TQString& addresses, const TQString& subject, const TQString& message,
+ const TQString& attachments, const TQString& startDateTime, int lateCancel, unsigned flags,
+ const TQString& recurrence, int repeatInterval, int repeatCount) = 0;
/** Schedule an email alarm.
- * @param fromID The KMail identity to use as the sender of the email, or QString::null to use KAlarm's default sender ID.
+ * @param fromID The KMail identity to use as the sender of the email, or TQString::null to use KAlarm's default sender ID.
* @param addresses Comma-separated list of addresses to send the email to.
* @param subject Subject line of the email.
* @param message Email message's body text.
@@ -315,11 +315,11 @@ class KAlarmIface : virtual public DCOPObject
* @param repeatCount Recurrence count (after the first occurrence), or 0 for no recurrence.
* @return true if alarm was scheduled successfully, false if configuration errors were found.
*/
- virtual bool scheduleEmail(const QString& fromID, const QString& addresses, const QString& subject, const QString& message,
- const QString& attachments, const QString& startDateTime, int lateCancel, unsigned flags,
+ virtual bool scheduleEmail(const TQString& fromID, const TQString& addresses, const TQString& subject, const TQString& message,
+ const TQString& attachments, const TQString& startDateTime, int lateCancel, unsigned flags,
int repeatType, int repeatInterval, int repeatCount) = 0;
/** Schedule an email alarm.
- * @param fromID The KMail identity to use as the sender of the email, or QString::null to use KAlarm's default sender ID.
+ * @param fromID The KMail identity to use as the sender of the email, or TQString::null to use KAlarm's default sender ID.
* @param addresses Comma-separated list of addresses to send the email to.
* @param subject Subject line of the email.
* @param message Email message's body text.
@@ -335,21 +335,21 @@ class KAlarmIface : virtual public DCOPObject
* @param endDateTime Date/time after which the recurrence will end.
* @return true if alarm was scheduled successfully, false if configuration errors were found.
*/
- virtual bool scheduleEmail(const QString& fromID, const QString& addresses, const QString& subject, const QString& message,
- const QString& attachments, const QString& startDateTime, int lateCancel, unsigned flags,
- int repeatType, int repeatInterval, const QString& endDateTime) = 0;
+ virtual bool scheduleEmail(const TQString& fromID, const TQString& addresses, const TQString& subject, const TQString& message,
+ const TQString& attachments, const TQString& startDateTime, int lateCancel, unsigned flags,
+ int repeatType, int repeatInterval, const TQString& endDateTime) = 0;
/** Open the alarm edit dialog to edit an existing alarm.
- * @param eventId The unique ID of the event to be edited, or QString::null to create a new alarm.
+ * @param eventId The unique ID of the event to be edited, or TQString::null to create a new alarm.
* @return false if the alarm could not be found or is read-only, true otherwise.
*/
- virtual bool edit(const QString& eventID) = 0;
+ virtual bool edit(const TQString& eventID) = 0;
/** Open the alarm edit dialog to edit a new alarm.
- * @param templateName Name of the alarm template to base the new alarm on, or QString::null if none.
+ * @param templateName Name of the alarm template to base the new alarm on, or TQString::null if none.
* If a template is specified but cannot be found, the alarm edit dialog is still
* opened but is (obviously) not preset with the template.
* @return false if an alarm template was specified but could not be found, true otherwise.
*/
- virtual bool editNew(const QString& templateName) = 0;
+ virtual bool editNew(const TQString& templateName) = 0;
};
#endif // KALARMIFACE_H
diff --git a/kalarm/kamail.cpp b/kalarm/kamail.cpp
index 3042a270f..18bb03945 100644
--- a/kalarm/kamail.cpp
+++ b/kalarm/kamail.cpp
@@ -27,8 +27,8 @@
#include <sys/time.h>
#include <pwd.h>
-#include <qfile.h>
-#include <qregexp.h>
+#include <tqfile.h>
+#include <tqregexp.h>
#include <kstandarddirs.h>
#include <dcopclient.h>
@@ -63,29 +63,29 @@ namespace HeaderParsing
bool parseAddress( const char* & scursor, const char * const send,
KMime::Types::Address & result, bool isCRLF=false );
bool parseAddressList( const char* & scursor, const char * const send,
- QValueList<KMime::Types::Address> & result, bool isCRLF=false );
+ TQValueList<KMime::Types::Address> & result, bool isCRLF=false );
}
namespace
{
-QString getHostName();
+TQString getHostName();
}
struct KAMailData
{
- KAMailData(const KAEvent& e, const QString& fr, const QString& bc, bool allownotify)
+ KAMailData(const KAEvent& e, const TQString& fr, const TQString& bc, bool allownotify)
: event(e), from(fr), bcc(bc), allowNotify(allownotify) { }
const KAEvent& event;
- QString from;
- QString bcc;
+ TQString from;
+ TQString bcc;
bool allowNotify;
};
-QString KAMail::i18n_NeedFromEmailAddress()
+TQString KAMail::i18n_NeedFromEmailAddress()
{ return i18n("A 'From' email address must be configured in order to execute email alarms."); }
-QString KAMail::i18n_sent_mail()
+TQString KAMail::i18n_sent_mail()
{ return i18n("KMail folder name: this should be translated the same as in kmail", "sent-mail"); }
KPIM::IdentityManager* KAMail::mIdentityManager = 0;
@@ -102,10 +102,10 @@ KPIM::IdentityManager* KAMail::identityManager()
* Reply = true if the message was sent - 'errmsgs' may contain copy error messages.
* = false if the message was not sent - 'errmsgs' contains the error messages.
*/
-bool KAMail::send(const KAEvent& event, QStringList& errmsgs, bool allowNotify)
+bool KAMail::send(const KAEvent& event, TQStringList& errmsgs, bool allowNotify)
{
- QString err;
- QString from;
+ TQString err;
+ TQString from;
KPIM::Identity identity;
if (!event.emailFromId())
from = Preferences::emailAddress();
@@ -144,7 +144,7 @@ bool KAMail::send(const KAEvent& event, QStringList& errmsgs, bool allowNotify)
return false;
}
KAMailData data(event, from,
- (event.emailBcc() ? Preferences::emailBccAddress() : QString::null),
+ (event.emailBcc() ? Preferences::emailBccAddress() : TQString::null),
allowNotify);
kdDebug(5950) << "KAlarmApp::sendEmail(): To: " << event.emailAddresses(", ")
<< "\nSubject: " << event.emailSubject() << endl;
@@ -152,31 +152,31 @@ bool KAMail::send(const KAEvent& event, QStringList& errmsgs, bool allowNotify)
if (Preferences::emailClient() == Preferences::SENDMAIL)
{
// Use sendmail to send the message
- QString textComplete;
- QString command = KStandardDirs::findExe(QString::fromLatin1("sendmail"),
- QString::fromLatin1("/sbin:/usr/sbin:/usr/lib"));
+ TQString textComplete;
+ TQString command = KStandardDirs::findExe(TQString::fromLatin1("sendmail"),
+ TQString::fromLatin1("/sbin:/usr/sbin:/usr/lib"));
if (!command.isNull())
{
- command += QString::fromLatin1(" -f ");
+ command += TQString::fromLatin1(" -f ");
command += KPIM::getEmailAddress(from);
- command += QString::fromLatin1(" -oi -t ");
+ command += TQString::fromLatin1(" -oi -t ");
textComplete = initHeaders(data, false);
}
else
{
- command = KStandardDirs::findExe(QString::fromLatin1("mail"));
+ command = KStandardDirs::findExe(TQString::fromLatin1("mail"));
if (command.isNull())
{
- errmsgs = errors(i18n("%1 not found").arg(QString::fromLatin1("sendmail"))); // give up
+ errmsgs = errors(i18n("%1 not found").arg(TQString::fromLatin1("sendmail"))); // give up
return false;
}
- command += QString::fromLatin1(" -s ");
+ command += TQString::fromLatin1(" -s ");
command += KShellProcess::quote(event.emailSubject());
if (!data.bcc.isEmpty())
{
- command += QString::fromLatin1(" -b ");
+ command += TQString::fromLatin1(" -b ");
command += KShellProcess::quote(data.bcc);
}
@@ -233,29 +233,29 @@ bool KAMail::send(const KAEvent& event, QStringList& errmsgs, bool allowNotify)
* Reply = reason for failure (which may be the empty string)
* = null string if success.
*/
-QString KAMail::sendKMail(const KAMailData& data)
+TQString KAMail::sendKMail(const KAMailData& data)
{
- QString err = KAlarm::runKMail(true);
+ TQString err = KAlarm::runKMail(true);
if (!err.isNull())
return err;
// KMail is now running. Determine which DCOP call to use.
bool useSend = false;
- QCString sendFunction = "sendMessage(QString,QString,QString,QString,QString,QString,KURL::List)";
+ TQCString sendFunction = "sendMessage(TQString,TQString,TQString,TQString,TQString,TQString,KURL::List)";
QCStringList funcs = kapp->dcopClient()->remoteFunctions("kmail", "MailTransportServiceIface");
for (QCStringList::Iterator it=funcs.begin(); it != funcs.end() && !useSend; ++it)
{
- QCString func = DCOPClient::normalizeFunctionSignature(*it);
+ TQCString func = DCOPClient::normalizeFunctionSignature(*it);
if (func.left(5) == "bool ")
{
func = func.mid(5);
- func.replace(QRegExp(" [0-9A-Za-z_:]+"), "");
+ func.replace(TQRegExp(" [0-9A-Za-z_:]+"), "");
useSend = (func == sendFunction);
}
}
- QByteArray callData;
- QDataStream arg(callData, IO_WriteOnly);
+ TQByteArray callData;
+ TQDataStream arg(callData, IO_WriteOnly);
kdDebug(5950) << "KAMail::sendKMail(): using " << (useSend ? "sendMessage()" : "dcopAddMessage()") << endl;
if (useSend)
{
@@ -281,7 +281,7 @@ QString KAMail::sendKMail(const KAMailData& data)
}
if (data.allowNotify)
notifyQueued(data.event);
- return QString::null;
+ return TQString::null;
}
/******************************************************************************
@@ -289,14 +289,14 @@ QString KAMail::sendKMail(const KAMailData& data)
* Reply = reason for failure (which may be the empty string)
* = null string if success.
*/
-QString KAMail::addToKMailFolder(const KAMailData& data, const char* folder, bool checkKmailRunning)
+TQString KAMail::addToKMailFolder(const KAMailData& data, const char* folder, bool checkKmailRunning)
{
- QString err;
+ TQString err;
if (checkKmailRunning)
err = KAlarm::runKMail(true);
if (err.isNull())
{
- QString message = initHeaders(data, true);
+ TQString message = initHeaders(data, true);
err = appendBodyAttachments(message, data.event);
if (!err.isNull())
return err;
@@ -304,26 +304,26 @@ QString KAMail::addToKMailFolder(const KAMailData& data, const char* folder, boo
// Write to a temporary file for feeding to KMail
KTempFile tmpFile;
tmpFile.setAutoDelete(true); // delete file when it is destructed
- QTextStream* stream = tmpFile.textStream();
+ TQTextStream* stream = tmpFile.textStream();
if (!stream)
{
kdError(5950) << "KAMail::addToKMailFolder(" << folder << "): Unable to open a temporary mail file" << endl;
- return QString("");
+ return TQString("");
}
*stream << message;
tmpFile.close();
if (tmpFile.status())
{
kdError(5950) << "KAMail::addToKMailFolder(" << folder << "): Error " << tmpFile.status() << " writing to temporary mail file" << endl;
- return QString("");
+ return TQString("");
}
// Notify KMail of the message in the temporary file
- QByteArray callData;
- QDataStream arg(callData, IO_WriteOnly);
- arg << QString::fromLatin1(folder) << tmpFile.name();
- if (callKMail(callData, "KMailIface", "dcopAddMessage(QString,QString)", "int"))
- return QString::null;
+ TQByteArray callData;
+ TQDataStream arg(callData, IO_WriteOnly);
+ arg << TQString::fromLatin1(folder) << tmpFile.name();
+ if (callKMail(callData, "KMailIface", "dcopAddMessage(TQString,TQString)", "int"))
+ return TQString::null;
err = i18n("Error calling KMail");
}
kdError(5950) << "KAMail::addToKMailFolder(" << folder << "): " << err << endl;
@@ -333,21 +333,21 @@ QString KAMail::addToKMailFolder(const KAMailData& data, const char* folder, boo
/******************************************************************************
* Call KMail via DCOP. The DCOP function must return an 'int'.
*/
-bool KAMail::callKMail(const QByteArray& callData, const QCString& iface, const QCString& function, const QCString& funcType)
+bool KAMail::callKMail(const TQByteArray& callData, const TQCString& iface, const TQCString& function, const TQCString& funcType)
{
- QCString replyType;
- QByteArray replyData;
+ TQCString replyType;
+ TQByteArray replyData;
if (!kapp->dcopClient()->call("kmail", iface, function, callData, replyType, replyData)
|| replyType != funcType)
{
- QCString funcname = function;
- funcname.replace(QRegExp("(.+$"), "()");
+ TQCString funcname = function;
+ funcname.replace(TQRegExp("(.+$"), "()");
kdError(5950) << "KAMail::callKMail(): kmail " << funcname << " call failed\n";;
return false;
}
- QDataStream replyStream(replyData, IO_ReadOnly);
- QCString funcname = function;
- funcname.replace(QRegExp("(.+$"), "()");
+ TQDataStream replyStream(replyData, IO_ReadOnly);
+ TQCString funcname = function;
+ funcname.replace(TQRegExp("(.+$"), "()");
if (replyType == "int")
{
int result;
@@ -374,9 +374,9 @@ bool KAMail::callKMail(const QByteArray& callData, const QCString& iface, const
/******************************************************************************
* Create the headers part of the email.
*/
-QString KAMail::initHeaders(const KAMailData& data, bool dateId)
+TQString KAMail::initHeaders(const KAMailData& data, bool dateId)
{
- QString message;
+ TQString message;
if (dateId)
{
struct timeval tod;
@@ -384,17 +384,17 @@ QString KAMail::initHeaders(const KAMailData& data, bool dateId)
time_t timenow = tod.tv_sec;
char buff[64];
strftime(buff, sizeof(buff), "Date: %a, %d %b %Y %H:%M:%S %z", localtime(&timenow));
- QString from = data.from;
- from.replace(QRegExp("^.*<"), QString::null).replace(QRegExp(">.*$"), QString::null);
- message = QString::fromLatin1(buff);
- message += QString::fromLatin1("\nMessage-Id: <%1.%2.%3>\n").arg(timenow).arg(tod.tv_usec).arg(from);
+ TQString from = data.from;
+ from.replace(TQRegExp("^.*<"), TQString::null).replace(TQRegExp(">.*$"), TQString::null);
+ message = TQString::fromLatin1(buff);
+ message += TQString::fromLatin1("\nMessage-Id: <%1.%2.%3>\n").arg(timenow).arg(tod.tv_usec).arg(from);
}
- message += QString::fromLatin1("From: ") + data.from;
- message += QString::fromLatin1("\nTo: ") + data.event.emailAddresses(", ");
+ message += TQString::fromLatin1("From: ") + data.from;
+ message += TQString::fromLatin1("\nTo: ") + data.event.emailAddresses(", ");
if (!data.bcc.isEmpty())
- message += QString::fromLatin1("\nBcc: ") + data.bcc;
- message += QString::fromLatin1("\nSubject: ") + data.event.emailSubject();
- message += QString::fromLatin1("\nX-Mailer: %1/" KALARM_VERSION).arg(kapp->aboutData()->programName());
+ message += TQString::fromLatin1("\nBcc: ") + data.bcc;
+ message += TQString::fromLatin1("\nSubject: ") + data.event.emailSubject();
+ message += TQString::fromLatin1("\nX-Mailer: %1/" KALARM_VERSION).arg(kapp->aboutData()->programName());
return message;
}
@@ -403,7 +403,7 @@ QString KAMail::initHeaders(const KAMailData& data, bool dateId)
* Reply = reason for error
* = 0 if successful.
*/
-QString KAMail::appendBodyAttachments(QString& message, const KAEvent& event)
+TQString KAMail::appendBodyAttachments(TQString& message, const KAEvent& event)
{
static const char* textMimeTypes[] = {
"application/x-sh", "application/x-csh", "application/x-shellscript",
@@ -411,7 +411,7 @@ QString KAMail::appendBodyAttachments(QString& message, const KAEvent& event)
"application/x-perl", "application/x-desktop",
0
};
- QStringList attachments = event.emailAttachments();
+ TQStringList attachments = event.emailAttachments();
if (!attachments.count())
{
// There are no attachments, so simply append the message body
@@ -424,23 +424,23 @@ QString KAMail::appendBodyAttachments(QString& message, const KAEvent& event)
// Create a boundary string
time_t timenow;
time(&timenow);
- QCString boundary;
+ TQCString boundary;
boundary.sprintf("------------_%lu_-%lx=", 2*timenow, timenow);
- message += QString::fromLatin1("\nMIME-Version: 1.0");
- message += QString::fromLatin1("\nContent-Type: multipart/mixed;\n boundary=\"%1\"\n").arg(boundary);
+ message += TQString::fromLatin1("\nMIME-Version: 1.0");
+ message += TQString::fromLatin1("\nContent-Type: multipart/mixed;\n boundary=\"%1\"\n").arg(boundary);
if (!event.message().isEmpty())
{
// There is a message body
- message += QString::fromLatin1("\n--%1\nContent-Type: text/plain\nContent-Transfer-Encoding: 8bit\n\n").arg(boundary);
+ message += TQString::fromLatin1("\n--%1\nContent-Type: text/plain\nContent-Transfer-Encoding: 8bit\n\n").arg(boundary);
message += event.message();
}
// Append each attachment in turn
- QString attachError = i18n("Error attaching file:\n%1");
- for (QStringList::Iterator at = attachments.begin(); at != attachments.end(); ++at)
+ TQString attachError = i18n("Error attaching file:\n%1");
+ for (TQStringList::Iterator at = attachments.begin(); at != attachments.end(); ++at)
{
- QString attachment = (*at).local8Bit();
+ TQString attachment = (*at).local8Bit();
KURL url(attachment);
url.cleanPath();
KIO::UDSEntry uds;
@@ -455,7 +455,7 @@ QString KAMail::appendBodyAttachments(QString& message, const KAEvent& event)
}
// Check if the attachment is a text file
- QString mimeType = fi.mimetype();
+ TQString mimeType = fi.mimetype();
bool text = mimeType.startsWith("text/");
if (!text)
{
@@ -463,29 +463,29 @@ QString KAMail::appendBodyAttachments(QString& message, const KAEvent& event)
text = (mimeType == textMimeTypes[i]);
}
- message += QString::fromLatin1("\n--%1").arg(boundary);
- message += QString::fromLatin1("\nContent-Type: %2; name=\"%3\"").arg(mimeType).arg(fi.text());
- message += QString::fromLatin1("\nContent-Transfer-Encoding: %1").arg(QString::fromLatin1(text ? "8bit" : "BASE64"));
- message += QString::fromLatin1("\nContent-Disposition: attachment; filename=\"%4\"\n\n").arg(fi.text());
+ message += TQString::fromLatin1("\n--%1").arg(boundary);
+ message += TQString::fromLatin1("\nContent-Type: %2; name=\"%3\"").arg(mimeType).arg(fi.text());
+ message += TQString::fromLatin1("\nContent-Transfer-Encoding: %1").arg(TQString::fromLatin1(text ? "8bit" : "BASE64"));
+ message += TQString::fromLatin1("\nContent-Disposition: attachment; filename=\"%4\"\n\n").arg(fi.text());
// Read the file contents
- QString tmpFile;
+ TQString tmpFile;
if (!KIO::NetAccess::download(url, tmpFile, MainWindow::mainMainWindow())) {
kdError(5950) << "KAMail::appendBodyAttachments(): load failure: " << attachment << endl;
return attachError.arg(attachment);
}
- QFile file(tmpFile);
+ TQFile file(tmpFile);
if (!file.open(IO_ReadOnly) ) {
kdDebug(5950) << "KAMail::appendBodyAttachments() tmp load error: " << attachment << endl;
return attachError.arg(attachment);
}
- QIODevice::Offset size = file.size();
+ TQIODevice::Offset size = file.size();
char* contents = new char [size + 1];
Q_LONG bytes = file.readBlock(contents, size);
file.close();
contents[size] = 0;
bool atterror = false;
- if (bytes == -1 || (QIODevice::Offset)bytes < size) {
+ if (bytes == -1 || (TQIODevice::Offset)bytes < size) {
kdDebug(5950) << "KAMail::appendBodyAttachments() read error: " << attachment << endl;
atterror = true;
}
@@ -497,23 +497,23 @@ QString KAMail::appendBodyAttachments(QString& message, const KAEvent& event)
else
{
// Convert the attachment to BASE64 encoding
- QIODevice::Offset base64Size;
+ TQIODevice::Offset base64Size;
char* base64 = base64Encode(contents, size, base64Size);
- if (base64Size == (QIODevice::Offset)-1) {
+ if (base64Size == (TQIODevice::Offset)-1) {
kdDebug(5950) << "KAMail::appendBodyAttachments() base64 buffer overflow: " << attachment << endl;
atterror = true;
}
else
- message += QString::fromLatin1(base64, base64Size);
+ message += TQString::fromLatin1(base64, base64Size);
delete[] base64;
}
delete[] contents;
if (atterror)
return attachError.arg(attachment);
}
- message += QString::fromLatin1("\n--%1--\n.\n").arg(boundary);
+ message += TQString::fromLatin1("\n--%1--\n.\n").arg(boundary);
}
- return QString::null;
+ return TQString::null;
}
/******************************************************************************
@@ -523,23 +523,23 @@ QString KAMail::appendBodyAttachments(QString& message, const KAEvent& event)
void KAMail::notifyQueued(const KAEvent& event)
{
KMime::Types::Address addr;
- QString localhost = QString::fromLatin1("localhost");
- QString hostname = getHostName();
+ TQString localhost = TQString::fromLatin1("localhost");
+ TQString hostname = getHostName();
const EmailAddressList& addresses = event.emailAddresses();
- for (QValueList<KCal::Person>::ConstIterator it = addresses.begin(); it != addresses.end(); ++it)
+ for (TQValueList<KCal::Person>::ConstIterator it = addresses.begin(); it != addresses.end(); ++it)
{
- QCString email = (*it).email().local8Bit();
+ TQCString email = (*it).email().local8Bit();
const char* em = email;
if (!email.isEmpty()
&& HeaderParsing::parseAddress(em, em + email.length(), addr))
{
- QString domain = addr.mailboxList.first().addrSpec.domain;
+ TQString domain = addr.mailboxList.first().addrSpec.domain;
if (!domain.isEmpty() && domain != localhost && domain != hostname)
{
- QString text = (Preferences::emailClient() == Preferences::KMAIL)
+ TQString text = (Preferences::emailClient() == Preferences::KMAIL)
? i18n("An email has been queued to be sent by KMail")
: i18n("An email has been queued to be sent");
- KMessageBox::information(0, text, QString::null, Preferences::EMAIL_QUEUED_NOTIFY);
+ KMessageBox::information(0, text, TQString::null, Preferences::EMAIL_QUEUED_NOTIFY);
return;
}
}
@@ -558,7 +558,7 @@ bool KAMail::identitiesExist()
/******************************************************************************
* Fetch the uoid of an email identity name or uoid string.
*/
-uint KAMail::identityUoid(const QString& identityUoidOrName)
+uint KAMail::identityUoid(const TQString& identityUoidOrName)
{
bool ok;
uint id = identityUoidOrName.toUInt(&ok);
@@ -581,7 +581,7 @@ uint KAMail::identityUoid(const QString& identityUoidOrName)
/******************************************************************************
* Fetch the user's email address configured in the KDE Control Centre.
*/
-QString KAMail::controlCentreAddress()
+TQString KAMail::controlCentreAddress()
{
KEMailSettings e;
return e.getSetting(KEMailSettings::EmailAddress);
@@ -592,26 +592,26 @@ QString KAMail::controlCentreAddress()
* entered by the user.
* Reply = the invalid item if error, else empty string.
*/
-QString KAMail::convertAddresses(const QString& items, EmailAddressList& list)
+TQString KAMail::convertAddresses(const TQString& items, EmailAddressList& list)
{
list.clear();
- QCString addrs = items.local8Bit();
+ TQCString addrs = items.local8Bit();
const char* ad = static_cast<const char*>(addrs);
// parse an address-list
- QValueList<KMime::Types::Address> maybeAddressList;
+ TQValueList<KMime::Types::Address> maybeAddressList;
if (!HeaderParsing::parseAddressList(ad, ad + addrs.length(), maybeAddressList))
- return QString::fromLocal8Bit(ad); // return the address in error
+ return TQString::fromLocal8Bit(ad); // return the address in error
// extract the mailboxes and complain if there are groups
- for (QValueList<KMime::Types::Address>::ConstIterator it = maybeAddressList.begin();
+ for (TQValueList<KMime::Types::Address>::ConstIterator it = maybeAddressList.begin();
it != maybeAddressList.end(); ++it)
{
- QString bad = convertAddress(*it, list);
+ TQString bad = convertAddress(*it, list);
if (!bad.isEmpty())
return bad;
}
- return QString::null;
+ return TQString::null;
}
#if 0
@@ -620,9 +620,9 @@ QString KAMail::convertAddresses(const QString& items, EmailAddressList& list)
* user, and append it to the specified list.
* Reply = the invalid item if error, else empty string.
*/
-QString KAMail::convertAddress(const QString& item, EmailAddressList& list)
+TQString KAMail::convertAddress(const TQString& item, EmailAddressList& list)
{
- QCString addr = item.local8Bit();
+ TQCString addr = item.local8Bit();
const char* ad = static_cast<const char*>(addr);
KMime::Types::Address maybeAddress;
if (!HeaderParsing::parseAddress(ad, ad + addr.length(), maybeAddress))
@@ -635,33 +635,33 @@ QString KAMail::convertAddress(const QString& item, EmailAddressList& list)
* Convert a single KMime::Types address to a KCal::Person instance and append
* it to the specified list.
*/
-QString KAMail::convertAddress(KMime::Types::Address addr, EmailAddressList& list)
+TQString KAMail::convertAddress(KMime::Types::Address addr, EmailAddressList& list)
{
if (!addr.displayName.isEmpty())
{
kdDebug(5950) << "mailbox groups not allowed! Name: \"" << addr.displayName << "\"" << endl;
return addr.displayName;
}
- const QValueList<KMime::Types::Mailbox>& mblist = addr.mailboxList;
- for (QValueList<KMime::Types::Mailbox>::ConstIterator mb = mblist.begin();
+ const TQValueList<KMime::Types::Mailbox>& mblist = addr.mailboxList;
+ for (TQValueList<KMime::Types::Mailbox>::ConstIterator mb = mblist.begin();
mb != mblist.end(); ++mb)
{
- QString addrPart = (*mb).addrSpec.localPart;
+ TQString addrPart = (*mb).addrSpec.localPart;
if (!(*mb).addrSpec.domain.isEmpty())
{
- addrPart += QChar('@');
+ addrPart += TQChar('@');
addrPart += (*mb).addrSpec.domain;
}
list += KCal::Person((*mb).displayName, addrPart);
}
- return QString::null;
+ return TQString::null;
}
/*
-QString KAMail::convertAddresses(const QString& items, QStringList& list)
+TQString KAMail::convertAddresses(const TQString& items, TQStringList& list)
{
EmailAddressList addrs;
- QString item = convertAddresses(items, addrs);
+ TQString item = convertAddresses(items, addrs);
if (!item.isEmpty())
return item;
for (EmailAddressList::Iterator ad = addrs.begin(); ad != addrs.end(); ++ad)
@@ -678,7 +678,7 @@ QString KAMail::convertAddresses(const QString& items, QStringList& list)
return item;
}
}
- return QString::null;
+ return TQString::null;
}*/
/******************************************************************************
@@ -687,7 +687,7 @@ QString KAMail::convertAddresses(const QString& items, QStringList& list)
* email address rules, only some basic checks are made.
* Reply = 1 if alright, 0 if empty, -1 if error.
*/
-int KAMail::checkAddress(QString& address)
+int KAMail::checkAddress(TQString& address)
{
address = address.stripWhiteSpace();
// Check that there are no list separator characters present
@@ -733,10 +733,10 @@ int KAMail::checkAddress(QString& address)
/******************************************************************************
* Convert a comma or semicolon delimited list of attachments into a
-* QStringList. The items are checked for validity.
+* TQStringList. The items are checked for validity.
* Reply = the invalid item if error, else empty string.
*/
-QString KAMail::convertAttachments(const QString& items, QStringList& list)
+TQString KAMail::convertAttachments(const TQString& items, TQStringList& list)
{
KURL url;
list.clear();
@@ -752,7 +752,7 @@ QString KAMail::convertAttachments(const QString& items, QStringList& list)
sc = items.length();
if (sc < i)
i = sc;
- QString item = items.mid(next, i - next).stripWhiteSpace();
+ TQString item = items.mid(next, i - next).stripWhiteSpace();
switch (checkAttachment(item))
{
case 1: list += item; break;
@@ -762,7 +762,7 @@ QString KAMail::convertAttachments(const QString& items, QStringList& list)
}
next = i + 1;
}
- return QString::null;
+ return TQString::null;
}
#if 0
@@ -771,11 +771,11 @@ QString KAMail::convertAttachments(const QString& items, QStringList& list)
* KURL::List. The items are checked for validity.
* Reply = the invalid item if error, else empty string.
*/
-QString KAMail::convertAttachments(const QString& items, KURL::List& list)
+TQString KAMail::convertAttachments(const TQString& items, KURL::List& list)
{
KURL url;
list.clear();
- QCString addrs = items.local8Bit();
+ TQCString addrs = items.local8Bit();
int length = items.length();
for (int next = 0; next < length; )
{
@@ -788,7 +788,7 @@ QString KAMail::convertAttachments(const QString& items, KURL::List& list)
sc = items.length();
if (sc < i)
i = sc;
- QString item = items.mid(next, i - next);
+ TQString item = items.mid(next, i - next);
switch (checkAttachment(item, &url))
{
case 1: list += url; break;
@@ -798,7 +798,7 @@ QString KAMail::convertAttachments(const QString& items, KURL::List& list)
}
next = i + 1;
}
- return QString::null;
+ return TQString::null;
}
#endif
@@ -809,7 +809,7 @@ QString KAMail::convertAttachments(const QString& items, KURL::List& list)
* = 0 if null name
* = -1 if doesn't exist.
*/
-int KAMail::checkAttachment(QString& attachment, KURL* url)
+int KAMail::checkAttachment(TQString& attachment, KURL* url)
{
attachment = attachment.stripWhiteSpace();
if (attachment.isEmpty())
@@ -847,7 +847,7 @@ bool KAMail::checkAttachment(const KURL& url)
* -1 if overflow.
* Reply = BASE64 buffer, which the caller must delete[] afterwards.
*/
-char* KAMail::base64Encode(const char* in, QIODevice::Offset size, QIODevice::Offset& outSize)
+char* KAMail::base64Encode(const char* in, TQIODevice::Offset size, TQIODevice::Offset& outSize)
{
const int MAX_LINELEN = 72;
static unsigned char dtable[65] =
@@ -856,10 +856,10 @@ char* KAMail::base64Encode(const char* in, QIODevice::Offset size, QIODevice::Of
"0123456789+/";
char* out = new char [2*size + 5];
- outSize = (QIODevice::Offset)-1;
- QIODevice::Offset outIndex = 0;
+ outSize = (TQIODevice::Offset)-1;
+ TQIODevice::Offset outIndex = 0;
int lineLength = 0;
- for (QIODevice::Offset inIndex = 0; inIndex < size; )
+ for (TQIODevice::Offset inIndex = 0; inIndex < size; )
{
unsigned char igroup[3];
int n;
@@ -919,13 +919,13 @@ char* KAMail::base64Encode(const char* in, QIODevice::Offset size, QIODevice::Of
/******************************************************************************
* Set the appropriate error messages for a given error string.
*/
-QStringList KAMail::errors(const QString& err, bool sendfail)
+TQStringList KAMail::errors(const TQString& err, bool sendfail)
{
- QString error1 = sendfail ? i18n("Failed to send email")
+ TQString error1 = sendfail ? i18n("Failed to send email")
: i18n("Error copying sent email to KMail %1 folder").arg(i18n_sent_mail());
if (err.isEmpty())
- return QStringList(error1);
- QStringList errs(QString::fromLatin1("%1:").arg(error1));
+ return TQStringList(error1);
+ TQStringList errs(TQString::fromLatin1("%1:").arg(error1));
errs += err;
return errs;
}
@@ -933,20 +933,20 @@ QStringList KAMail::errors(const QString& err, bool sendfail)
/******************************************************************************
* Get the body of an email, given its serial number.
*/
-QString KAMail::getMailBody(Q_UINT32 serialNumber)
+TQString KAMail::getMailBody(Q_UINT32 serialNumber)
{
// Get the body of the email from KMail
- QCString replyType;
- QByteArray replyData;
- QByteArray data;
- QDataStream arg(data, IO_WriteOnly);
+ TQCString replyType;
+ TQByteArray replyData;
+ TQByteArray data;
+ TQDataStream arg(data, IO_WriteOnly);
arg << serialNumber;
arg << (int)0;
- QString body;
+ TQString body;
if (kapp->dcopClient()->call("kmail", "KMailIface", "getDecodedBodyPart(Q_UINT32,int)", data, replyType, replyData)
- && replyType == "QString")
+ && replyType == "TQString")
{
- QDataStream reply_stream(replyData, IO_ReadOnly);
+ TQDataStream reply_stream(replyData, IO_ReadOnly);
reply_stream >> body;
}
else
@@ -959,12 +959,12 @@ namespace
/******************************************************************************
* Get the local system's host name.
*/
-QString getHostName()
+TQString getHostName()
{
char hname[256];
if (gethostname(hname, sizeof(hname)))
- return QString::null;
- return QString::fromLocal8Bit(hname);
+ return TQString::null;
+ return TQString::fromLocal8Bit(hname);
}
}
@@ -987,10 +987,10 @@ using namespace KMime::HeaderParsing;
* Allow a local user name to be specified as an email address.
*/
bool parseUserName( const char* & scursor, const char * const send,
- QString & result, bool isCRLF ) {
+ TQString & result, bool isCRLF ) {
- QString maybeLocalPart;
- QString tmp;
+ TQString maybeLocalPart;
+ TQString tmp;
if ( scursor != send ) {
// first, eat any whitespace
@@ -1005,7 +1005,7 @@ bool parseUserName( const char* & scursor, const char * const send,
default: // atom
scursor--; // re-set scursor to point to ch again
- tmp = QString::null;
+ tmp = TQString::null;
if ( parseAtom( scursor, send, result, false /* no 8bit */ ) ) {
if (getpwnam(result.local8Bit()))
return true;
@@ -1033,7 +1033,7 @@ bool parseAddress( const char* & scursor, const char * const send,
const char * oldscursor = scursor;
if ( parseMailbox( scursor, send, maybeMailbox, isCRLF ) ) {
// yes, it is:
- result.displayName = QString::null;
+ result.displayName = TQString::null;
result.mailboxList.append( maybeMailbox );
return true;
}
@@ -1041,13 +1041,13 @@ bool parseAddress( const char* & scursor, const char * const send,
// KAlarm: Allow a local user name to be specified
// no, it's not a single mailbox. Try if it's a local user name:
- QString maybeUserName;
+ TQString maybeUserName;
if ( parseUserName( scursor, send, maybeUserName, isCRLF ) ) {
// yes, it is:
- maybeMailbox.displayName = QString::null;
+ maybeMailbox.displayName = TQString::null;
maybeMailbox.addrSpec.localPart = maybeUserName;
- maybeMailbox.addrSpec.domain = QString::null;
- result.displayName = QString::null;
+ maybeMailbox.addrSpec.domain = TQString::null;
+ result.displayName = TQString::null;
result.mailboxList.append( maybeMailbox );
return true;
}
@@ -1071,7 +1071,7 @@ bool parseAddress( const char* & scursor, const char * const send,
* Allow either ',' or ';' to be used as an email address separator.
*/
bool parseAddressList( const char* & scursor, const char * const send,
- QValueList<Address> & result, bool isCRLF ) {
+ TQValueList<Address> & result, bool isCRLF ) {
while ( scursor != send ) {
eatCFWS( scursor, send, isCRLF );
// end of header: this is OK.
diff --git a/kalarm/kamail.h b/kalarm/kamail.h
index 86c0482a5..3ef561506 100644
--- a/kalarm/kamail.h
+++ b/kalarm/kamail.h
@@ -21,8 +21,8 @@
#ifndef KAMAIL_H
#define KAMAIL_H
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
class KURL;
class KAEvent;
class EmailAddressList;
@@ -35,31 +35,31 @@ struct KAMailData;
class KAMail
{
public:
- static bool send(const KAEvent&, QStringList& errmsgs, bool allowNotify = true);
- static int checkAddress(QString& address);
- static int checkAttachment(QString& attachment, KURL* = 0);
+ static bool send(const KAEvent&, TQStringList& errmsgs, bool allowNotify = true);
+ static int checkAddress(TQString& address);
+ static int checkAttachment(TQString& attachment, KURL* = 0);
static bool checkAttachment(const KURL&);
- static QString convertAddresses(const QString& addresses, EmailAddressList&);
- static QString convertAttachments(const QString& attachments, QStringList& list);
+ static TQString convertAddresses(const TQString& addresses, EmailAddressList&);
+ static TQString convertAttachments(const TQString& attachments, TQStringList& list);
static KPIM::IdentityManager* identityManager();
static bool identitiesExist();
- static uint identityUoid(const QString& identityUoidOrName);
- static QString controlCentreAddress();
- static QString getMailBody(Q_UINT32 serialNumber);
- static QString i18n_NeedFromEmailAddress();
- static QString i18n_sent_mail();
+ static uint identityUoid(const TQString& identityUoidOrName);
+ static TQString controlCentreAddress();
+ static TQString getMailBody(Q_UINT32 serialNumber);
+ static TQString i18n_NeedFromEmailAddress();
+ static TQString i18n_sent_mail();
private:
static KPIM::IdentityManager* mIdentityManager; // KMail identity manager
- static QString sendKMail(const KAMailData&);
- static QString initHeaders(const KAMailData&, bool dateId);
- static QString appendBodyAttachments(QString& message, const KAEvent&);
- static QString addToKMailFolder(const KAMailData&, const char* folder, bool checkKmailRunning);
- static bool callKMail(const QByteArray& callData, const QCString& iface, const QCString& function, const QCString& funcType);
- static QString convertAddress(KMime::Types::Address, EmailAddressList&);
+ static TQString sendKMail(const KAMailData&);
+ static TQString initHeaders(const KAMailData&, bool dateId);
+ static TQString appendBodyAttachments(TQString& message, const KAEvent&);
+ static TQString addToKMailFolder(const KAMailData&, const char* folder, bool checkKmailRunning);
+ static bool callKMail(const TQByteArray& callData, const TQCString& iface, const TQCString& function, const TQCString& funcType);
+ static TQString convertAddress(KMime::Types::Address, EmailAddressList&);
static void notifyQueued(const KAEvent&);
- static char* base64Encode(const char* in, QIODevice::Offset size, QIODevice::Offset& outSize);
- static QStringList errors(const QString& error = QString::null, bool sendfail = true);
+ static char* base64Encode(const char* in, TQIODevice::Offset size, TQIODevice::Offset& outSize);
+ static TQStringList errors(const TQString& error = TQString::null, bool sendfail = true);
};
#endif // KAMAIL_H
diff --git a/kalarm/karecurrence.cpp b/kalarm/karecurrence.cpp
index 9461d71ec..8b7e9068f 100644
--- a/kalarm/karecurrence.cpp
+++ b/kalarm/karecurrence.cpp
@@ -20,7 +20,7 @@
#include "kalarm.h"
-#include <qbitarray.h>
+#include <tqbitarray.h>
#include <kdebug.h>
#include <libkcal/icalformat.h>
@@ -57,7 +57,7 @@ KARecurrence::Feb29Type KARecurrence::mDefaultFeb29 = KARecurrence::FEB29_FEB29;
* Only a restricted subset of recurrence types is allowed.
* Reply = true if successful.
*/
-bool KARecurrence::set(Type recurType, int freq, int count, int f29, const DateTime& start, const QDateTime& end)
+bool KARecurrence::set(Type recurType, int freq, int count, int f29, const DateTime& start, const TQDateTime& end)
{
mCachedType = -1;
RecurrenceRule::PeriodType rrtype;
@@ -78,7 +78,7 @@ bool KARecurrence::set(Type recurType, int freq, int count, int f29, const DateT
{
case WEEKLY:
{
- QBitArray days(7);
+ TQBitArray days(7);
days.setBit(start.date().dayOfWeek() - 1);
addWeeklyDays(days);
break;
@@ -101,7 +101,7 @@ bool KARecurrence::set(Type recurType, int freq, int count, int f29, const DateT
* Reply = true if successful.
*/
bool KARecurrence::init(RecurrenceRule::PeriodType recurType, int freq, int count, int f29, const DateTime& start,
- const QDateTime& end)
+ const TQDateTime& end)
{
mCachedType = -1;
Feb29Type feb29Type = (f29 == -1) ? mDefaultFeb29 : static_cast<Feb29Type>(f29);
@@ -133,12 +133,12 @@ bool KARecurrence::init(RecurrenceRule::PeriodType recurType, int freq, int coun
setEndDate(end.date());
else
setEndDateTime(end);
- QDateTime startdt = start.dateTime();
+ TQDateTime startdt = start.dateTime();
if (recurType == RecurrenceRule::rYearly
&& feb29Type == FEB29_FEB28 || feb29Type == FEB29_MAR1)
{
int year = startdt.date().year();
- if (!QDate::leapYear(year)
+ if (!TQDate::leapYear(year)
&& startdt.date().dayOfYear() == (feb29Type == FEB29_MAR1 ? 60 : 59))
{
/* The event start date is February 28th or March 1st, but it
@@ -148,8 +148,8 @@ bool KARecurrence::init(RecurrenceRule::PeriodType recurType, int freq, int coun
* This is necessary because KARecurrence represents all types
* of 29th February recurrences by a simple 29th February.
*/
- while (!QDate::leapYear(--year)) ;
- startdt.setDate(QDate(year, 2, 29));
+ while (!TQDate::leapYear(--year)) ;
+ startdt.setDate(TQDate(year, 2, 29));
}
mFeb29Type = feb29Type;
}
@@ -163,9 +163,9 @@ bool KARecurrence::init(RecurrenceRule::PeriodType recurType, int freq, int coun
/******************************************************************************
* Initialise the recurrence from an iCalendar RRULE string.
*/
-bool KARecurrence::set(const QString& icalRRULE)
+bool KARecurrence::set(const TQString& icalRRULE)
{
- static QString RRULE = QString::fromLatin1("RRULE:");
+ static TQString RRULE = TQString::fromLatin1("RRULE:");
mCachedType = -1;
clear();
if (icalRRULE.isEmpty())
@@ -237,7 +237,7 @@ void KARecurrence::fix()
|| rrule->startDt() != rrules[0]->startDt())
break;
}
- QValueList<int> ds = rrule->byYearDays();
+ TQValueList<int> ds = rrule->byYearDays();
if (!ds.isEmpty() && ds.first() == 60)
{
++convert; // this rule needs to be converted
@@ -249,7 +249,7 @@ void KARecurrence::fix()
}
case rYearlyMonth:
{
- QValueList<int> ds = rrule->byMonthDays();
+ TQValueList<int> ds = rrule->byMonthDays();
if (!ds.isEmpty())
{
int day = ds.first();
@@ -271,7 +271,7 @@ void KARecurrence::fix()
if (day == -1)
{
// Last day of the month - only combine if it's February
- QValueList<int> months = rrule->byMonths();
+ TQValueList<int> months = rrule->byMonths();
if (months.count() != 1 || months.first() != 2)
day = 0;
}
@@ -301,9 +301,9 @@ void KARecurrence::fix()
delete *rr;
}
- QDate end;
+ TQDate end;
int count;
- QValueList<int> months;
+ TQValueList<int> months;
if (convert == 2)
{
// There are two yearly recurrence rules to combine into a February 29th recurrence.
@@ -344,7 +344,7 @@ void KARecurrence::fix()
RecurrenceRule* rrule = defaultRRule();
months.append(2);
rrule->setByMonths(months);
- QValueList<int> ds;
+ TQValueList<int> ds;
ds.append(29);
rrule->setByMonthDays(ds);
if (count)
@@ -356,7 +356,7 @@ void KARecurrence::fix()
/******************************************************************************
* Get the next time the recurrence occurs, strictly after a specified time.
*/
-QDateTime KARecurrence::getNextDateTime(const QDateTime& preDateTime) const
+TQDateTime KARecurrence::getNextDateTime(const TQDateTime& preDateTime) const
{
switch (type())
{
@@ -375,7 +375,7 @@ QDateTime KARecurrence::getNextDateTime(const QDateTime& preDateTime) const
/******************************************************************************
* Get the previous time the recurrence occurred, strictly before a specified time.
*/
-QDateTime KARecurrence::getPreviousDateTime(const QDateTime& afterDateTime) const
+TQDateTime KARecurrence::getPreviousDateTime(const TQDateTime& afterDateTime) const
{
switch (type())
{
@@ -430,8 +430,8 @@ void KARecurrence::writeRecurrence(KCal::Recurrence& recur) const
break;
case ANNUAL_DATE:
{
- QValueList<int> months = rrule->byMonths();
- QValueList<int> days = monthDays();
+ TQValueList<int> months = rrule->byMonths();
+ TQValueList<int> days = monthDays();
bool special = (mFeb29Type != FEB29_FEB29 && !days.isEmpty()
&& days.first() == 29 && months.remove(2));
RecurrenceRule* rrule1 = recur.defaultRRule();
@@ -451,16 +451,16 @@ void KARecurrence::writeRecurrence(KCal::Recurrence& recur) const
rrule2->setEndDt(endDateTime());
if (mFeb29Type == FEB29_MAR1)
{
- QValueList<int> ds;
+ TQValueList<int> ds;
ds.append(60);
rrule2->setByYearDays(ds);
}
else
{
- QValueList<int> ds;
+ TQValueList<int> ds;
ds.append(-1);
rrule2->setByMonthDays(ds);
- QValueList<int> ms;
+ TQValueList<int> ms;
ms.append(2);
rrule2->setByMonths(ms);
}
@@ -492,7 +492,7 @@ void KARecurrence::writeRecurrence(KCal::Recurrence& recur) const
* all. In that case, retain it so that the February 29th characteristic
* is not lost should the user later change the recurrence count.
*/
- QDateTime end = endDateTime();
+ TQDateTime end = endDateTime();
kdDebug()<<"29th recurrence: count="<<count<<", end date="<<end.toString()<<endl;
int count1 = rrule1->durationTo(end)
- (rrule1->recursOn(startDate()) ? 0 : 1);
@@ -520,7 +520,7 @@ kdDebug()<<"29th recurrence: count="<<count<<", end date="<<end.toString()<<endl
/******************************************************************************
* Return the date/time of the last recurrence.
*/
-QDateTime KARecurrence::endDateTime() const
+TQDateTime KARecurrence::endDateTime() const
{
if (mFeb29Type == FEB29_FEB29 || duration() <= 1)
{
@@ -539,8 +539,8 @@ QDateTime KARecurrence::endDateTime() const
*/
RecurrenceRule* rrule = new RecurrenceRule();
rrule->setRecurrenceType(RecurrenceRule::rYearly);
- QDateTime dt = startDateTime();
- QDate d = dt.date();
+ TQDateTime dt = startDateTime();
+ TQDate d = dt.date();
switch (d.day())
{
case 29:
@@ -549,14 +549,14 @@ QDateTime KARecurrence::endDateTime() const
d.setYMD(d.year(), d.month(), 28);
break;
case 28:
- if (d.month() != 2 || mFeb29Type != FEB29_FEB28 || QDate::leapYear(d.year()))
+ if (d.month() != 2 || mFeb29Type != FEB29_FEB28 || TQDate::leapYear(d.year()))
{
// Start date is not a recurrence date, so shift it to 27th
d.setYMD(d.year(), d.month(), 27);
}
break;
case 1:
- if (d.month() == 3 && mFeb29Type == FEB29_MAR1 && !QDate::leapYear(d.year()))
+ if (d.month() == 3 && mFeb29Type == FEB29_MAR1 && !TQDate::leapYear(d.year()))
{
// Start date is a March 1st recurrence date, so shift
// start date to the temporary recurrence date of the 28th
@@ -571,7 +571,7 @@ QDateTime KARecurrence::endDateTime() const
rrule->setFloats(doesFloat());
rrule->setFrequency(frequency());
rrule->setDuration(duration());
- QValueList<int> ds;
+ TQValueList<int> ds;
ds.append(28);
rrule->setByMonthDays(ds);
rrule->setByMonths(defaultRRuleConst()->byMonths());
@@ -580,7 +580,7 @@ QDateTime KARecurrence::endDateTime() const
// We've found the end date for a recurrence on the 28th. Unless that date
// is a real February 28th recurrence, adjust to the actual recurrence date.
- if (mFeb29Type == FEB29_FEB28 && dt.date().month() == 2 && !QDate::leapYear(dt.date().year()))
+ if (mFeb29Type == FEB29_FEB28 && dt.date().month() == 2 && !TQDate::leapYear(dt.date().year()))
return dt;
return dt.addDays(1);
}
@@ -588,17 +588,17 @@ QDateTime KARecurrence::endDateTime() const
/******************************************************************************
* Return the date/time of the last recurrence.
*/
-QDate KARecurrence::endDate() const
+TQDate KARecurrence::endDate() const
{
- QDateTime end = endDateTime();
- return end.isValid() ? end.date() : QDate();
+ TQDateTime end = endDateTime();
+ return end.isValid() ? end.date() : TQDate();
}
/******************************************************************************
* Return whether the event will recur on the specified date.
* The start date only returns true if it matches the recurrence rules.
*/
-bool KARecurrence::recursOn(const QDate& dt) const
+bool KARecurrence::recursOn(const TQDate& dt) const
{
if (!Recurrence::recursOn(dt))
return false;
@@ -623,7 +623,7 @@ bool KARecurrence::recursOn(const QDate& dt) const
* Find the duration of two RRULEs combined.
* Use the shorter of the two if they differ.
*/
-int KARecurrence::combineDurations(const RecurrenceRule* rrule1, const RecurrenceRule* rrule2, QDate& end) const
+int KARecurrence::combineDurations(const RecurrenceRule* rrule1, const RecurrenceRule* rrule2, TQDate& end) const
{
int count1 = rrule1->duration();
int count2 = rrule2->duration();
@@ -644,8 +644,8 @@ int KARecurrence::combineDurations(const RecurrenceRule* rrule1, const Recurrenc
if (!count1 || !count2)
count1 = count2 = 0;
// Get the two rules sorted by end date.
- QDateTime end1 = rrule1->endDt();
- QDateTime end2 = rrule2->endDt();
+ TQDateTime end1 = rrule1->endDt();
+ TQDateTime end2 = rrule2->endDt();
if (end1.date() == end2.date())
{
end = end1.date();
@@ -659,7 +659,7 @@ int KARecurrence::combineDurations(const RecurrenceRule* rrule1, const Recurrenc
// Swap the two rules to make rr1 have the earlier end date
rr1 = rrule2;
rr2 = rrule1;
- QDateTime e = end1;
+ TQDateTime e = end1;
end1 = end2;
end2 = e;
}
@@ -672,7 +672,7 @@ int KARecurrence::combineDurations(const RecurrenceRule* rrule1, const Recurrenc
// Get the date of the next occurrence after the end of the earlier ending rule
RecurrenceRule rr(*rr1);
rr.setDuration(-1);
- QDateTime next1(rr.getNextDate(end1).date());
+ TQDateTime next1(rr.getNextDate(end1).date());
if (!next1.isValid())
end = end1.date();
else
@@ -685,7 +685,7 @@ int KARecurrence::combineDurations(const RecurrenceRule* rrule1, const Recurrenc
end = end2.date();
return count1 + count2;
}
- QDate prev2 = rr2->getPreviousDate(next1).date();
+ TQDate prev2 = rr2->getPreviousDate(next1).date();
end = (prev2 > end1.date()) ? prev2 : end1.date();
}
if (count2)
@@ -707,14 +707,14 @@ int KARecurrence::longestInterval() const
case DAILY:
{
- QValueList<RecurrenceRule::WDayPos> days = defaultRRuleConst()->byDays();
+ TQValueList<RecurrenceRule::WDayPos> days = defaultRRuleConst()->byDays();
if (days.isEmpty())
return freq * 1440;
// It recurs only on certain days of the week, so the maximum interval
// may be greater than the frequency.
bool ds[7] = { false, false, false, false, false, false, false };
- for (QValueList<RecurrenceRule::WDayPos>::ConstIterator it = days.begin(); it != days.end(); ++it)
+ for (TQValueList<RecurrenceRule::WDayPos>::ConstIterator it = days.begin(); it != days.end(); ++it)
if ((*it).pos() == 0)
ds[(*it).day() - 1] = true;
if (freq % 7)
@@ -751,7 +751,7 @@ int KARecurrence::longestInterval() const
{
// Find which days of the week it recurs on, and if on more than
// one, reduce the maximum interval accordingly.
- QBitArray ds = days();
+ TQBitArray ds = days();
int first = -1;
int last = -1;
int maxgap = 1;
@@ -784,7 +784,7 @@ int KARecurrence::longestInterval() const
{
// Find which months of the year it recurs on, and if on more than
// one, reduce the maximum interval accordingly.
- const QValueList<int> months = yearMonths(); // month list is sorted
+ const TQValueList<int> months = yearMonths(); // month list is sorted
if (months.isEmpty())
break; // no months recur
if (months.count() == 1)
@@ -792,19 +792,19 @@ int KARecurrence::longestInterval() const
int first = -1;
int last = -1;
int maxgap = 0;
- for (QValueListConstIterator<int> it = months.begin(); it != months.end(); ++it)
+ for (TQValueListConstIterator<int> it = months.begin(); it != months.end(); ++it)
{
if (first < 0)
first = *it;
else
{
- int span = QDate(2001, last, 1).daysTo(QDate(2001, *it, 1));
+ int span = TQDate(2001, last, 1).daysTo(TQDate(2001, *it, 1));
if (span > maxgap)
maxgap = span;
}
last = *it;
}
- int span = QDate(2001, first, 1).daysTo(QDate(2001, last, 1));
+ int span = TQDate(2001, first, 1).daysTo(TQDate(2001, last, 1));
if (freq > 1)
return (freq*365 - span) * 1440;
if (365 - span > maxgap)
@@ -860,12 +860,12 @@ bool KARecurrence::dailyType(const RecurrenceRule* rrule)
|| !rrule->bySetPos().isEmpty()
|| !rrule->byYearDays().isEmpty())
return false;
- QValueList<RecurrenceRule::WDayPos> days = rrule->byDays();
+ TQValueList<RecurrenceRule::WDayPos> days = rrule->byDays();
if (days.isEmpty())
return true;
// Check that all the positions are zero (i.e. every time)
bool found = false;
- for (QValueList<RecurrenceRule::WDayPos>::ConstIterator it = days.begin(); it != days.end(); ++it)
+ for (TQValueList<RecurrenceRule::WDayPos>::ConstIterator it = days.begin(); it != days.end(); ++it)
{
if ((*it).pos() != 0)
return false;
diff --git a/kalarm/karecurrence.h b/kalarm/karecurrence.h
index ed0fc2fc9..f574cd59a 100644
--- a/kalarm/karecurrence.h
+++ b/kalarm/karecurrence.h
@@ -51,22 +51,22 @@ class KARecurrence : public KCal::Recurrence
KARecurrence() : KCal::Recurrence(), mFeb29Type(FEB29_FEB29), mCachedType(-1) { }
KARecurrence(const KCal::Recurrence& r) : KCal::Recurrence(r) { fix(); }
KARecurrence(const KARecurrence& r) : KCal::Recurrence(r), mFeb29Type(r.mFeb29Type), mCachedType(r.mCachedType) { }
- bool set(const QString& icalRRULE);
- bool set(Type t, int freq, int count, const DateTime& start, const QDateTime& end)
+ bool set(const TQString& icalRRULE);
+ bool set(Type t, int freq, int count, const DateTime& start, const TQDateTime& end)
{ return set(t, freq, count, -1, start, end); }
- bool set(Type t, int freq, int count, const DateTime& start, const QDateTime& end, Feb29Type f29)
+ bool set(Type t, int freq, int count, const DateTime& start, const TQDateTime& end, Feb29Type f29)
{ return set(t, freq, count, f29, start, end); }
- bool init(KCal::RecurrenceRule::PeriodType t, int freq, int count, const DateTime& start, const QDateTime& end)
+ bool init(KCal::RecurrenceRule::PeriodType t, int freq, int count, const DateTime& start, const TQDateTime& end)
{ return init(t, freq, count, -1, start, end); }
- bool init(KCal::RecurrenceRule::PeriodType t, int freq, int count, const DateTime& start, const QDateTime& end, Feb29Type f29)
+ bool init(KCal::RecurrenceRule::PeriodType t, int freq, int count, const DateTime& start, const TQDateTime& end, Feb29Type f29)
{ return init(t, freq, count, f29, start, end); }
void fix();
void writeRecurrence(KCal::Recurrence&) const;
- QDateTime endDateTime() const;
- QDate endDate() const;
- bool recursOn(const QDate&) const;
- QDateTime getNextDateTime(const QDateTime& preDateTime) const;
- QDateTime getPreviousDateTime(const QDateTime& afterDateTime) const;
+ TQDateTime endDateTime() const;
+ TQDate endDate() const;
+ bool recursOn(const TQDate&) const;
+ TQDateTime getNextDateTime(const TQDateTime& preDateTime) const;
+ TQDateTime getPreviousDateTime(const TQDateTime& afterDateTime) const;
int longestInterval() const;
Type type() const;
static Type type(const KCal::RecurrenceRule*);
@@ -76,10 +76,10 @@ class KARecurrence : public KCal::Recurrence
static void setDefaultFeb29Type(Feb29Type t) { mDefaultFeb29 = t; }
private:
- bool set(Type, int freq, int count, int feb29Type, const DateTime& start, const QDateTime& end);
- bool init(KCal::RecurrenceRule::PeriodType, int freq, int count, int feb29Type, const DateTime& start, const QDateTime& end);
- int combineDurations(const KCal::RecurrenceRule*, const KCal::RecurrenceRule*, QDate& end) const;
- int longestWeeklyInterval(const QBitArray& days, int frequency);
+ bool set(Type, int freq, int count, int feb29Type, const DateTime& start, const TQDateTime& end);
+ bool init(KCal::RecurrenceRule::PeriodType, int freq, int count, int feb29Type, const DateTime& start, const TQDateTime& end);
+ int combineDurations(const KCal::RecurrenceRule*, const KCal::RecurrenceRule*, TQDate& end) const;
+ int longestWeeklyInterval(const TQBitArray& days, int frequency);
static Feb29Type mDefaultFeb29;
Feb29Type mFeb29Type; // yearly recurrence on Feb 29th (leap years) / Mar 1st (non-leap years)
diff --git a/kalarm/latecancel.cpp b/kalarm/latecancel.cpp
index ed5563b1d..3c7fab3b2 100644
--- a/kalarm/latecancel.cpp
+++ b/kalarm/latecancel.cpp
@@ -20,9 +20,9 @@
#include "kalarm.h"
-#include <qwidgetstack.h>
-#include <qlayout.h>
-#include <qwhatsthis.h>
+#include <tqwidgetstack.h>
+#include <tqlayout.h>
+#include <tqwhatsthis.h>
#include <klocale.h>
#include <kdialog.h>
@@ -32,55 +32,55 @@
// Collect these widget labels together to ensure consistent wording and
// translations across different modules.
-QString LateCancelSelector::i18n_CancelIfLate() { return i18n("Cancel if late"); }
-QString LateCancelSelector::i18n_n_CancelIfLate() { return i18n("Ca&ncel if late"); }
-QString LateCancelSelector::i18n_AutoCloseWin() { return i18n("Auto-close window after this time"); }
-QString LateCancelSelector::i18n_AutoCloseWinLC() { return i18n("Auto-close window after late-cancelation time"); }
-QString LateCancelSelector::i18n_i_AutoCloseWinLC() { return i18n("Auto-close w&indow after late-cancelation time"); }
+TQString LateCancelSelector::i18n_CancelIfLate() { return i18n("Cancel if late"); }
+TQString LateCancelSelector::i18n_n_CancelIfLate() { return i18n("Ca&ncel if late"); }
+TQString LateCancelSelector::i18n_AutoCloseWin() { return i18n("Auto-close window after this time"); }
+TQString LateCancelSelector::i18n_AutoCloseWinLC() { return i18n("Auto-close window after late-cancelation time"); }
+TQString LateCancelSelector::i18n_i_AutoCloseWinLC() { return i18n("Auto-close w&indow after late-cancelation time"); }
-LateCancelSelector::LateCancelSelector(bool allowHourMinute, QWidget* parent, const char* name)
- : QFrame(parent, name),
+LateCancelSelector::LateCancelSelector(bool allowHourMinute, TQWidget* parent, const char* name)
+ : TQFrame(parent, name),
mDateOnly(false),
mReadOnly(false),
mAutoCloseShown(false)
{
- QString whatsThis = i18n("If checked, the alarm will be canceled if it cannot be triggered within the "
+ TQString whatsThis = i18n("If checked, the alarm will be canceled if it cannot be triggered within the "
"specified period after its scheduled time. Possible reasons for not triggering "
"include your being logged off, X not running, or the alarm daemon not running.\n\n"
"If unchecked, the alarm will be triggered at the first opportunity after "
"its scheduled time, regardless of how late it is.");
- setFrameStyle(QFrame::NoFrame);
- mLayout = new QVBoxLayout(this, 0, KDialog::spacingHint());
+ setFrameStyle(TQFrame::NoFrame);
+ mLayout = new TQVBoxLayout(this, 0, KDialog::spacingHint());
- mStack = new QWidgetStack(this);
- mCheckboxFrame = new QFrame(mStack);
- mCheckboxFrame->setFrameStyle(QFrame::NoFrame);
+ mStack = new TQWidgetStack(this);
+ mCheckboxFrame = new TQFrame(mStack);
+ mCheckboxFrame->setFrameStyle(TQFrame::NoFrame);
mStack->addWidget(mCheckboxFrame, 1);
- QBoxLayout* layout = new QVBoxLayout(mCheckboxFrame, 0, 0);
+ TQBoxLayout* layout = new TQVBoxLayout(mCheckboxFrame, 0, 0);
mCheckbox = new CheckBox(i18n_n_CancelIfLate(), mCheckboxFrame);
mCheckbox->setFixedSize(mCheckbox->sizeHint());
- connect(mCheckbox, SIGNAL(toggled(bool)), SLOT(slotToggled(bool)));
- QWhatsThis::add(mCheckbox, whatsThis);
+ connect(mCheckbox, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotToggled(bool)));
+ TQWhatsThis::add(mCheckbox, whatsThis);
layout->addWidget(mCheckbox, 0, Qt::AlignAuto);
- mTimeSelectorFrame = new QFrame(mStack);
- mTimeSelectorFrame->setFrameStyle(QFrame::NoFrame);
+ mTimeSelectorFrame = new TQFrame(mStack);
+ mTimeSelectorFrame->setFrameStyle(TQFrame::NoFrame);
mStack->addWidget(mTimeSelectorFrame, 2);
- layout = new QVBoxLayout(mTimeSelectorFrame, 0, 0);
- mTimeSelector = new TimeSelector(i18n("Cancel if late by 10 minutes", "Ca&ncel if late by"), QString::null,
+ layout = new TQVBoxLayout(mTimeSelectorFrame, 0, 0);
+ mTimeSelector = new TimeSelector(i18n("Cancel if late by 10 minutes", "Ca&ncel if late by"), TQString::null,
whatsThis, i18n("Enter how late will cause the alarm to be canceled"),
allowHourMinute, mTimeSelectorFrame);
- connect(mTimeSelector, SIGNAL(toggled(bool)), SLOT(slotToggled(bool)));
+ connect(mTimeSelector, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotToggled(bool)));
layout->addWidget(mTimeSelector);
mLayout->addWidget(mStack);
- layout = new QHBoxLayout(mLayout, KDialog::spacingHint());
+ layout = new TQHBoxLayout(mLayout, KDialog::spacingHint());
layout->addSpacing(3*KDialog::spacingHint());
mAutoClose = new CheckBox(i18n_AutoCloseWin(), this);
mAutoClose->setFixedSize(mAutoClose->sizeHint());
- QWhatsThis::add(mAutoClose, i18n("Automatically close the alarm window after the expiry of the late-cancelation period"));
+ TQWhatsThis::add(mAutoClose, i18n("Automatically close the alarm window after the expiry of the late-cancelation period"));
layout->addWidget(mAutoClose);
layout->addStretch();
diff --git a/kalarm/latecancel.h b/kalarm/latecancel.h
index ccbc389b3..ff20866bd 100644
--- a/kalarm/latecancel.h
+++ b/kalarm/latecancel.h
@@ -21,7 +21,7 @@
#ifndef LATECANCEL_H
#define LATECANCEL_H
-#include <qframe.h>
+#include <tqframe.h>
#include "timeperiod.h"
#include "timeselector.h"
@@ -34,7 +34,7 @@ class LateCancelSelector : public QFrame
{
Q_OBJECT
public:
- LateCancelSelector(bool allowHourMinute, QWidget* parent, const char* name = 0);
+ LateCancelSelector(bool allowHourMinute, TQWidget* parent, const char* name = 0);
int minutes() const;
void setMinutes(int Minutes, bool dateOnly, TimePeriod::Units defaultUnits);
void setDateOnly(bool dateOnly);
@@ -44,21 +44,21 @@ class LateCancelSelector : public QFrame
bool isReadOnly() const { return mReadOnly; }
void setReadOnly(bool);
- static QString i18n_CancelIfLate(); // plain text of 'Cancel if late' checkbox
- static QString i18n_n_CancelIfLate(); // text of 'Cancel if late' checkbox, with 'N' shortcut
- static QString i18n_AutoCloseWin(); // plain text of 'Auto-close window after this time' checkbox
- static QString i18n_AutoCloseWinLC(); // plain text of 'Auto-close window after late-cancelation time' checkbox
- static QString i18n_i_AutoCloseWinLC(); // text of 'Auto-close window after late-cancelation time' checkbox, with 'I' shortcut
+ static TQString i18n_CancelIfLate(); // plain text of 'Cancel if late' checkbox
+ static TQString i18n_n_CancelIfLate(); // text of 'Cancel if late' checkbox, with 'N' shortcut
+ static TQString i18n_AutoCloseWin(); // plain text of 'Auto-close window after this time' checkbox
+ static TQString i18n_AutoCloseWinLC(); // plain text of 'Auto-close window after late-cancelation time' checkbox
+ static TQString i18n_i_AutoCloseWinLC(); // text of 'Auto-close window after late-cancelation time' checkbox, with 'I' shortcut
private slots:
void slotToggled(bool);
private:
- QBoxLayout* mLayout; // overall layout for the widget
- QWidgetStack* mStack; // contains mCheckboxFrame and mTimeSelectorFrame
- QFrame* mCheckboxFrame;
+ TQBoxLayout* mLayout; // overall layout for the widget
+ TQWidgetStack* mStack; // contains mCheckboxFrame and mTimeSelectorFrame
+ TQFrame* mCheckboxFrame;
CheckBox* mCheckbox; // displayed when late cancellation is not selected
- QFrame* mTimeSelectorFrame;
+ TQFrame* mTimeSelectorFrame;
TimeSelector* mTimeSelector; // displayed when late cancellation is selected
CheckBox* mAutoClose;
bool mDateOnly; // hours/minutes units not allowed
diff --git a/kalarm/lib/buttongroup.cpp b/kalarm/lib/buttongroup.cpp
index b448df48a..018640123 100644
--- a/kalarm/lib/buttongroup.cpp
+++ b/kalarm/lib/buttongroup.cpp
@@ -1,5 +1,5 @@
/*
- * buttongroup.cpp - QButtonGroup with an extra signal and KDE 2 compatibility
+ * buttongroup.cpp - TQButtonGroup with an extra signal and KDE 2 compatibility
* Program: kalarm
* Copyright (c) 2002, 2004 by David Jarvie <software@astrojar.org.uk>
*
@@ -19,45 +19,45 @@
*/
#include "kalarm.h"
-#include <qlayout.h>
-#include <qbutton.h>
+#include <tqlayout.h>
+#include <tqbutton.h>
#include <kdialog.h>
#include "buttongroup.moc"
-ButtonGroup::ButtonGroup(QWidget* parent, const char* name)
- : QButtonGroup(parent, name)
+ButtonGroup::ButtonGroup(TQWidget* parent, const char* name)
+ : TQButtonGroup(parent, name)
{
- connect(this, SIGNAL(clicked(int)), SIGNAL(buttonSet(int)));
+ connect(this, TQT_SIGNAL(clicked(int)), TQT_SIGNAL(buttonSet(int)));
}
-ButtonGroup::ButtonGroup(const QString& title, QWidget* parent, const char* name)
- : QButtonGroup(title, parent, name)
+ButtonGroup::ButtonGroup(const TQString& title, TQWidget* parent, const char* name)
+ : TQButtonGroup(title, parent, name)
{
- connect(this, SIGNAL(clicked(int)), SIGNAL(buttonSet(int)));
+ connect(this, TQT_SIGNAL(clicked(int)), TQT_SIGNAL(buttonSet(int)));
}
-ButtonGroup::ButtonGroup(int strips, Qt::Orientation orient, QWidget* parent, const char* name)
- : QButtonGroup(strips, orient, parent, name)
+ButtonGroup::ButtonGroup(int strips, Qt::Orientation orient, TQWidget* parent, const char* name)
+ : TQButtonGroup(strips, orient, parent, name)
{
- connect(this, SIGNAL(clicked(int)), SIGNAL(buttonSet(int)));
+ connect(this, TQT_SIGNAL(clicked(int)), TQT_SIGNAL(buttonSet(int)));
}
-ButtonGroup::ButtonGroup(int strips, Qt::Orientation orient, const QString& title, QWidget* parent, const char* name)
- : QButtonGroup(strips, orient, title, parent, name)
+ButtonGroup::ButtonGroup(int strips, Qt::Orientation orient, const TQString& title, TQWidget* parent, const char* name)
+ : TQButtonGroup(strips, orient, title, parent, name)
{
- connect(this, SIGNAL(clicked(int)), SIGNAL(buttonSet(int)));
+ connect(this, TQT_SIGNAL(clicked(int)), TQT_SIGNAL(buttonSet(int)));
}
/******************************************************************************
* Inserts a button in the group.
* This should really be a virtual method...
*/
-int ButtonGroup::insert(QButton* button, int id)
+int ButtonGroup::insert(TQButton* button, int id)
{
- id = QButtonGroup::insert(button, id);
- connect(button, SIGNAL(toggled(bool)), SLOT(slotButtonToggled(bool)));
+ id = TQButtonGroup::insert(button, id);
+ connect(button, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotButtonToggled(bool)));
return id;
}
diff --git a/kalarm/lib/buttongroup.h b/kalarm/lib/buttongroup.h
index 1d647b420..8fbadae77 100644
--- a/kalarm/lib/buttongroup.h
+++ b/kalarm/lib/buttongroup.h
@@ -1,5 +1,5 @@
/*
- * buttongroup.h - QButtonGroup with an extra signal and Qt 2 compatibility
+ * buttongroup.h - TQButtonGroup with an extra signal and Qt 2 compatibility
* Program: kalarm
* Copyright © 2002,2004,2006 by David Jarvie <software@astrojar.org.uk>
*
@@ -20,17 +20,17 @@
#ifndef BUTTONGROUP_H
#define BUTTONGROUP_H
-#include <qbuttongroup.h>
+#include <tqbuttongroup.h>
/**
- * @short A QButtonGroup with signal on new selection, plus Qt 2 compatibility.
+ * @short A TQButtonGroup with signal on new selection, plus Qt 2 compatibility.
*
- * The ButtonGroup class provides an enhanced version of the QButtonGroup class.
+ * The ButtonGroup class provides an enhanced version of the TQButtonGroup class.
*
* It emits an additional signal, buttonSet(int), whenever any of its buttons
* changes state, for whatever reason, including programmatic control. (The
- * QButtonGroup class only emits signals when buttons are clicked on by the user.)
+ * TQButtonGroup class only emits signals when buttons are clicked on by the user.)
* The class also provides Qt 2 compatibility.
*
* @author David Jarvie <software@astrojar.org.uk>
@@ -43,20 +43,20 @@ class ButtonGroup : public QButtonGroup
* @param parent The parent object of this widget.
* @param name The name of this widget.
*/
- explicit ButtonGroup(QWidget* parent, const char* name = 0);
+ explicit ButtonGroup(TQWidget* parent, const char* name = 0);
/** Constructor.
* @param title The title displayed for this button group.
* @param parent The parent object of this widget.
* @param name The name of this widget.
*/
- ButtonGroup(const QString& title, QWidget* parent, const char* name = 0);
+ ButtonGroup(const TQString& title, TQWidget* parent, const char* name = 0);
/** Constructor.
* @param strips The number of rows or columns of buttons.
* @param orient The orientation (Qt::Horizontal or Qt::Vertical) of the button group.
* @param parent The parent object of this widget.
* @param name The name of this widget.
*/
- ButtonGroup(int strips, Qt::Orientation orient, QWidget* parent, const char* name = 0);
+ ButtonGroup(int strips, Qt::Orientation orient, TQWidget* parent, const char* name = 0);
/** Constructor.
* @param strips The number of rows or columns of buttons.
* @param orient The orientation (Qt::Horizontal or Qt::Vertical) of the button group.
@@ -64,19 +64,19 @@ class ButtonGroup : public QButtonGroup
* @param parent The parent object of this widget.
* @param name The name of this widget.
*/
- ButtonGroup(int strips, Qt::Orientation orient, const QString& title, QWidget* parent, const char* name = 0);
+ ButtonGroup(int strips, Qt::Orientation orient, const TQString& title, TQWidget* parent, const char* name = 0);
/** Inserts a button in the group.
- * This overrides the insert() method of QButtonGroup, which should really be a virtual method...
+ * This overrides the insert() method of TQButtonGroup, which should really be a virtual method...
* @param button The button to insert.
* @param id The identifier for the button.
* @return The identifier of the inserted button.
*/
- int insert(QButton* button, int id = -1);
+ int insert(TQButton* button, int id = -1);
/** Sets the button with the specified identifier to be on. If this is an exclusive group,
* all other buttons in the group will be set off. The buttonSet() signal is emitted.
* @param id The identifier of the button to set on.
*/
- virtual void setButton(int id) { QButtonGroup::setButton(id); emit buttonSet(id); }
+ virtual void setButton(int id) { TQButtonGroup::setButton(id); emit buttonSet(id); }
private slots:
void slotButtonToggled(bool);
signals:
diff --git a/kalarm/lib/checkbox.cpp b/kalarm/lib/checkbox.cpp
index c600a4950..dde0d10ff 100644
--- a/kalarm/lib/checkbox.cpp
+++ b/kalarm/lib/checkbox.cpp
@@ -21,15 +21,15 @@
#include "checkbox.moc"
-CheckBox::CheckBox(QWidget* parent, const char* name)
- : QCheckBox(parent, name),
+CheckBox::CheckBox(TQWidget* parent, const char* name)
+ : TQCheckBox(parent, name),
mFocusPolicy(focusPolicy()),
mFocusWidget(0),
mReadOnly(false)
{ }
-CheckBox::CheckBox(const QString& text, QWidget* parent, const char* name)
- : QCheckBox(text, parent, name),
+CheckBox::CheckBox(const TQString& text, TQWidget* parent, const char* name)
+ : TQCheckBox(text, parent, name),
mFocusPolicy(focusPolicy()),
mFocusWidget(0),
mReadOnly(false)
@@ -44,7 +44,7 @@ void CheckBox::setReadOnly(bool ro)
if ((int)ro != (int)mReadOnly)
{
mReadOnly = ro;
- setFocusPolicy(ro ? QWidget::NoFocus : mFocusPolicy);
+ setFocusPolicy(ro ? TQWidget::NoFocus : mFocusPolicy);
if (ro)
clearFocus();
}
@@ -53,14 +53,14 @@ void CheckBox::setReadOnly(bool ro)
/******************************************************************************
* Specify a widget to receive focus when the checkbox is clicked on.
*/
-void CheckBox::setFocusWidget(QWidget* w, bool enable)
+void CheckBox::setFocusWidget(TQWidget* w, bool enable)
{
mFocusWidget = w;
mFocusWidgetEnable = enable;
if (w)
- connect(this, SIGNAL(clicked()), SLOT(slotClicked()));
+ connect(this, TQT_SIGNAL(clicked()), TQT_SLOT(slotClicked()));
else
- disconnect(this, SIGNAL(clicked()), this, SLOT(slotClicked()));
+ disconnect(this, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotClicked()));
}
/******************************************************************************
@@ -81,7 +81,7 @@ void CheckBox::slotClicked()
* Event handlers to intercept events if in read-only mode.
* Any events which could change the checkbox state are discarded.
*/
-void CheckBox::mousePressEvent(QMouseEvent* e)
+void CheckBox::mousePressEvent(TQMouseEvent* e)
{
if (mReadOnly)
{
@@ -89,10 +89,10 @@ void CheckBox::mousePressEvent(QMouseEvent* e)
if (e->button() == Qt::LeftButton)
return;
}
- QCheckBox::mousePressEvent(e);
+ TQCheckBox::mousePressEvent(e);
}
-void CheckBox::mouseReleaseEvent(QMouseEvent* e)
+void CheckBox::mouseReleaseEvent(TQMouseEvent* e)
{
if (mReadOnly)
{
@@ -100,16 +100,16 @@ void CheckBox::mouseReleaseEvent(QMouseEvent* e)
if (e->button() == Qt::LeftButton)
return;
}
- QCheckBox::mouseReleaseEvent(e);
+ TQCheckBox::mouseReleaseEvent(e);
}
-void CheckBox::mouseMoveEvent(QMouseEvent* e)
+void CheckBox::mouseMoveEvent(TQMouseEvent* e)
{
if (!mReadOnly)
- QCheckBox::mouseMoveEvent(e);
+ TQCheckBox::mouseMoveEvent(e);
}
-void CheckBox::keyPressEvent(QKeyEvent* e)
+void CheckBox::keyPressEvent(TQKeyEvent* e)
{
if (mReadOnly)
switch (e->key())
@@ -123,11 +123,11 @@ void CheckBox::keyPressEvent(QKeyEvent* e)
default:
return;
}
- QCheckBox::keyPressEvent(e);
+ TQCheckBox::keyPressEvent(e);
}
-void CheckBox::keyReleaseEvent(QKeyEvent* e)
+void CheckBox::keyReleaseEvent(TQKeyEvent* e)
{
if (!mReadOnly)
- QCheckBox::keyReleaseEvent(e);
+ TQCheckBox::keyReleaseEvent(e);
}
diff --git a/kalarm/lib/checkbox.h b/kalarm/lib/checkbox.h
index 72ad4aee3..fc7f82cbd 100644
--- a/kalarm/lib/checkbox.h
+++ b/kalarm/lib/checkbox.h
@@ -21,13 +21,13 @@
#ifndef CHECKBOX_H
#define CHECKBOX_H
-#include <qcheckbox.h>
+#include <tqcheckbox.h>
/**
- * @short A QCheckBox with focus widget and read-only options.
+ * @short A TQCheckBox with focus widget and read-only options.
*
- * The CheckBox class is a QCheckBox with the ability to transfer focus to another
+ * The CheckBox class is a TQCheckBox with the ability to transfer focus to another
* widget when checked, and with a read-only option.
*
* Another widget may be specified as the focus widget for the check box. Whenever
@@ -47,13 +47,13 @@ class CheckBox : public QCheckBox
* @param parent The parent object of this widget.
* @param name The name of this widget.
*/
- explicit CheckBox(QWidget* parent, const char* name = 0);
+ explicit CheckBox(TQWidget* parent, const char* name = 0);
/** Constructor.
* @param text Text to display.
* @param parent The parent object of this widget.
* @param name The name of this widget.
*/
- CheckBox(const QString& text, QWidget* parent, const char* name = 0);
+ CheckBox(const TQString& text, TQWidget* parent, const char* name = 0);
/** Returns true if the widget is read only. */
bool isReadOnly() const { return mReadOnly; }
/** Sets whether the check box is read-only for the user. If read-only,
@@ -62,25 +62,25 @@ class CheckBox : public QCheckBox
*/
virtual void setReadOnly(bool readOnly);
/** Returns the widget which receives focus when the user selects the check box by clicking on it. */
- QWidget* focusWidget() const { return mFocusWidget; }
+ TQWidget* focusWidget() const { return mFocusWidget; }
/** Specifies a widget to receive focus when the user selects the check box by clicking on it.
* @param widget Widget to receive focus.
* @param enable If true, @p widget will be enabled before receiving focus. If
* false, the enabled state of @p widget will be left unchanged when
* the check box is clicked.
*/
- void setFocusWidget(QWidget* widget, bool enable = true);
+ void setFocusWidget(TQWidget* widget, bool enable = true);
protected:
- virtual void mousePressEvent(QMouseEvent*);
- virtual void mouseReleaseEvent(QMouseEvent*);
- virtual void mouseMoveEvent(QMouseEvent*);
- virtual void keyPressEvent(QKeyEvent*);
- virtual void keyReleaseEvent(QKeyEvent*);
+ virtual void mousePressEvent(TQMouseEvent*);
+ virtual void mouseReleaseEvent(TQMouseEvent*);
+ virtual void mouseMoveEvent(TQMouseEvent*);
+ virtual void keyPressEvent(TQKeyEvent*);
+ virtual void keyReleaseEvent(TQKeyEvent*);
protected slots:
void slotClicked();
private:
- QWidget::FocusPolicy mFocusPolicy; // default focus policy for the QCheckBox
- QWidget* mFocusWidget; // widget to receive focus when button is clicked on
+ TQWidget::FocusPolicy mFocusPolicy; // default focus policy for the QCheckBox
+ TQWidget* mFocusWidget; // widget to receive focus when button is clicked on
bool mFocusWidgetEnable; // enable focus widget before setting focus
bool mReadOnly; // value cannot be changed
};
diff --git a/kalarm/lib/colourcombo.cpp b/kalarm/lib/colourcombo.cpp
index d5fa052ac..9cf09ce13 100644
--- a/kalarm/lib/colourcombo.cpp
+++ b/kalarm/lib/colourcombo.cpp
@@ -21,7 +21,7 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#include <qpainter.h>
+#include <tqpainter.h>
#include <klocale.h>
#include <kcolordialog.h>
@@ -30,8 +30,8 @@
#include "colourcombo.moc"
-ColourCombo::ColourCombo(QWidget* parent, const char* name, const QColor& defaultColour)
- : QComboBox(parent, name),
+ColourCombo::ColourCombo(TQWidget* parent, const char* name, const TQColor& defaultColour)
+ : TQComboBox(parent, name),
mColourList(Preferences::messageColours()),
mSelectedColour(defaultColour),
mCustomColour(255, 255, 255),
@@ -39,12 +39,12 @@ ColourCombo::ColourCombo(QWidget* parent, const char* name, const QColor& defaul
mDisabled(false)
{
addColours();
- connect(this, SIGNAL(activated(int)), SLOT(slotActivated(int)));
- connect(this, SIGNAL(highlighted(int)), SLOT(slotHighlighted(int)));
- Preferences::connect(SIGNAL(preferencesChanged()), this, SLOT(slotPreferencesChanged()));
+ connect(this, TQT_SIGNAL(activated(int)), TQT_SLOT(slotActivated(int)));
+ connect(this, TQT_SIGNAL(highlighted(int)), TQT_SLOT(slotHighlighted(int)));
+ Preferences::connect(TQT_SIGNAL(preferencesChanged()), this, TQT_SLOT(slotPreferencesChanged()));
}
-void ColourCombo::setColour(const QColor& colour)
+void ColourCombo::setColour(const TQColor& colour)
{
mSelectedColour = colour;
addColours();
@@ -94,14 +94,14 @@ void ColourCombo::setEnabled(bool enable)
if (end > 1)
{
// Add a dialog background colour item
- QPixmap pm = *pixmap(1);
+ TQPixmap pm = *pixmap(1);
pm.fill(paletteBackgroundColor());
insertItem(pm);
setCurrentItem(end);
}
mDisabled = true;
}
- QComboBox::setEnabled(enable);
+ TQComboBox::setEnabled(enable);
}
void ColourCombo::slotActivated(int index)
@@ -110,9 +110,9 @@ void ColourCombo::slotActivated(int index)
mSelectedColour = mColourList[index - 1];
else
{
- if (KColorDialog::getColor(mCustomColour, this) == QDialog::Accepted)
+ if (KColorDialog::getColor(mCustomColour, this) == TQDialog::Accepted)
{
- QRect rect;
+ TQRect rect;
drawCustomItem(rect, false);
}
mSelectedColour = mCustomColour;
@@ -144,16 +144,16 @@ void ColourCombo::addColours()
break;
}
- QRect rect;
+ TQRect rect;
drawCustomItem(rect, true);
- QPainter painter;
- QPixmap pixmap(rect.width(), rect.height());
+ TQPainter painter;
+ TQPixmap pixmap(rect.width(), rect.height());
int i = 1;
for (ColourList::const_iterator it = mColourList.begin(); it != mColourList.end(); ++i, ++it)
{
painter.begin(&pixmap);
- QBrush brush(*it);
+ TQBrush brush(*it);
painter.fillRect(rect, brush);
painter.end();
@@ -165,21 +165,21 @@ void ColourCombo::addColours()
}
}
-void ColourCombo::drawCustomItem(QRect& rect, bool insert)
+void ColourCombo::drawCustomItem(TQRect& rect, bool insert)
{
- QPen pen;
+ TQPen pen;
if (qGray(mCustomColour.rgb()) < 128)
pen.setColor(Qt::white);
else
pen.setColor(Qt::black);
- QPainter painter;
- QFontMetrics fm = QFontMetrics(painter.font());
+ TQPainter painter;
+ TQFontMetrics fm = TQFontMetrics(painter.font());
rect.setRect(0, 0, width(), fm.height() + 4);
- QPixmap pixmap(rect.width(), rect.height());
+ TQPixmap pixmap(rect.width(), rect.height());
painter.begin(&pixmap);
- QBrush brush(mCustomColour);
+ TQBrush brush(mCustomColour);
painter.fillRect(rect, brush);
painter.setPen(pen);
painter.drawText(2, fm.ascent() + 2, i18n("Custom..."));
@@ -197,13 +197,13 @@ void ColourCombo::setReadOnly(bool ro)
mReadOnly = ro;
}
-void ColourCombo::resizeEvent(QResizeEvent* re)
+void ColourCombo::resizeEvent(TQResizeEvent* re)
{
- QComboBox::resizeEvent(re);
+ TQComboBox::resizeEvent(re);
addColours();
}
-void ColourCombo::mousePressEvent(QMouseEvent* e)
+void ColourCombo::mousePressEvent(TQMouseEvent* e)
{
if (mReadOnly)
{
@@ -211,29 +211,29 @@ void ColourCombo::mousePressEvent(QMouseEvent* e)
if (e->button() == Qt::LeftButton)
return;
}
- QComboBox::mousePressEvent(e);
+ TQComboBox::mousePressEvent(e);
}
-void ColourCombo::mouseReleaseEvent(QMouseEvent* e)
+void ColourCombo::mouseReleaseEvent(TQMouseEvent* e)
{
if (!mReadOnly)
- QComboBox::mouseReleaseEvent(e);
+ TQComboBox::mouseReleaseEvent(e);
}
-void ColourCombo::mouseMoveEvent(QMouseEvent* e)
+void ColourCombo::mouseMoveEvent(TQMouseEvent* e)
{
if (!mReadOnly)
- QComboBox::mouseMoveEvent(e);
+ TQComboBox::mouseMoveEvent(e);
}
-void ColourCombo::keyPressEvent(QKeyEvent* e)
+void ColourCombo::keyPressEvent(TQKeyEvent* e)
{
if (!mReadOnly || e->key() == Qt::Key_Escape)
- QComboBox::keyPressEvent(e);
+ TQComboBox::keyPressEvent(e);
}
-void ColourCombo::keyReleaseEvent(QKeyEvent* e)
+void ColourCombo::keyReleaseEvent(TQKeyEvent* e)
{
if (!mReadOnly)
- QComboBox::keyReleaseEvent(e);
+ TQComboBox::keyReleaseEvent(e);
}
diff --git a/kalarm/lib/colourcombo.h b/kalarm/lib/colourcombo.h
index f3e4ebca6..b05f78823 100644
--- a/kalarm/lib/colourcombo.h
+++ b/kalarm/lib/colourcombo.h
@@ -21,7 +21,7 @@
#ifndef COLOURCOMBO_H
#define COLOURCOMBO_H
-#include <qcombobox.h>
+#include <tqcombobox.h>
#include "colourlist.h"
@@ -43,22 +43,22 @@
class ColourCombo : public QComboBox
{
Q_OBJECT
- Q_PROPERTY(QColor color READ color WRITE setColor)
+ Q_PROPERTY(TQColor color READ color WRITE setColor)
public:
/** Constructor.
* @param parent The parent object of this widget.
* @param name The name of this widget.
* @param defaultColour The colour which is selected by default.
*/
- explicit ColourCombo(QWidget* parent = 0, const char* name = 0, const QColor& defaultColour = 0xFFFFFF);
+ explicit ColourCombo(TQWidget* parent = 0, const char* name = 0, const TQColor& defaultColour = 0xFFFFFF);
/** Returns the selected colour. */
- QColor color() const { return mSelectedColour; }
+ TQColor color() const { return mSelectedColour; }
/** Returns the selected colour. */
- QColor colour() const { return mSelectedColour; }
+ TQColor colour() const { return mSelectedColour; }
/** Sets the selected colour to @p c. */
- void setColor(const QColor& c) { setColour(c); }
+ void setColor(const TQColor& c) { setColour(c); }
/** Sets the selected colour to @p c. */
- void setColour(const QColor& c);
+ void setColour(const TQColor& c);
/** Initialises the list of colours to @p list. */
void setColours(const ColourList& list);
/** Returns true if the first entry in the list, i.e. the custom colour, is selected. */
@@ -71,30 +71,30 @@ class ColourCombo : public QComboBox
virtual void setReadOnly(bool readOnly);
signals:
/** Signal emitted when a new colour has been selected. */
- void activated(const QColor&); // a new colour box has been selected
+ void activated(const TQColor&); // a new colour box has been selected
/** Signal emitted when a new colour has been highlighted. */
- void highlighted(const QColor&); // a new item has been highlighted
+ void highlighted(const TQColor&); // a new item has been highlighted
public slots:
/** Enables or disables the widget. */
virtual void setEnabled(bool enabled);
protected:
- virtual void resizeEvent(QResizeEvent*);
- virtual void mousePressEvent(QMouseEvent*);
- virtual void mouseReleaseEvent(QMouseEvent*);
- virtual void mouseMoveEvent(QMouseEvent*);
- virtual void keyPressEvent(QKeyEvent*);
- virtual void keyReleaseEvent(QKeyEvent*);
+ virtual void resizeEvent(TQResizeEvent*);
+ virtual void mousePressEvent(TQMouseEvent*);
+ virtual void mouseReleaseEvent(TQMouseEvent*);
+ virtual void mouseMoveEvent(TQMouseEvent*);
+ virtual void keyPressEvent(TQKeyEvent*);
+ virtual void keyReleaseEvent(TQKeyEvent*);
private slots:
void slotActivated(int index);
void slotHighlighted(int index);
void slotPreferencesChanged();
private:
void addColours();
- void drawCustomItem(QRect&, bool insert);
+ void drawCustomItem(TQRect&, bool insert);
ColourList mColourList; // the sorted colours to display
- QColor mSelectedColour; // currently selected colour
- QColor mCustomColour; // current colour of the Custom item
+ TQColor mSelectedColour; // currently selected colour
+ TQColor mCustomColour; // current colour of the Custom item
bool mReadOnly; // value cannot be changed
bool mDisabled;
};
diff --git a/kalarm/lib/colourlist.cpp b/kalarm/lib/colourlist.cpp
index e02a64466..93886b5fa 100644
--- a/kalarm/lib/colourlist.cpp
+++ b/kalarm/lib/colourlist.cpp
@@ -21,16 +21,16 @@
#include "colourlist.h"
-ColourList::ColourList(const QColor* colours)
+ColourList::ColourList(const TQColor* colours)
{
while (colours->isValid())
mList.append((*colours++).rgb());
}
-void ColourList::insert(const QColor& colour)
+void ColourList::insert(const TQColor& colour)
{
QRgb rgb = colour.rgb();
- for (QValueListIterator<QRgb> it = mList.begin(); it != mList.end(); ++it)
+ for (TQValueListIterator<QRgb> it = mList.begin(); it != mList.end(); ++it)
{
if (rgb <= *it)
{
diff --git a/kalarm/lib/colourlist.h b/kalarm/lib/colourlist.h
index ef641c04a..a20a44d6a 100644
--- a/kalarm/lib/colourlist.h
+++ b/kalarm/lib/colourlist.h
@@ -21,9 +21,9 @@
#ifndef COLOURLIST_H
#define COLOURLIST_H
-#include <qtl.h>
-#include <qcolor.h>
-#include <qvaluelist.h>
+#include <tqtl.h>
+#include <tqcolor.h>
+#include <tqvaluelist.h>
/**
@@ -31,8 +31,8 @@
*
* The ColourList class holds a list of colours, sorted in RGB value order.
*
- * It provides a sorted QValueList of colours in RGB value order, with iterators
- * and other access methods which return either QRgb or QColor objects.
+ * It provides a sorted TQValueList of colours in RGB value order, with iterators
+ * and other access methods which return either QRgb or TQColor objects.
*
* @author David Jarvie <software@astrojar.org.uk>
*/
@@ -40,30 +40,30 @@ class ColourList
{
public:
typedef size_t size_type;
- typedef QValueListConstIterator<QRgb> const_iterator;
+ typedef TQValueListConstIterator<QRgb> const_iterator;
/** Constructs an empty list. */
ColourList() { }
/** Copy constructor. */
ColourList(const ColourList& l) : mList(l.mList) { }
/** Constructs a list whose values are preset to the colours in @p list. */
- ColourList(const QValueList<QRgb>& list) : mList(list) { qHeapSort(mList); }
+ ColourList(const TQValueList<QRgb>& list) : mList(list) { qHeapSort(mList); }
/** Constructs a list whose values are preset to the colours in the @p list.
* Terminate @p list by an invalid colour.
*/
- ColourList(const QColor* list);
+ ColourList(const TQColor* list);
/** Assignment operator. */
ColourList& operator=(const ColourList& l) { mList = l.mList; return *this; }
/** Sets the list to comprise the colours in @p list. */
- ColourList& operator=(const QValueList<QRgb>& list) { mList = list; qHeapSort(mList); return *this; }
+ ColourList& operator=(const TQValueList<QRgb>& list) { mList = list; qHeapSort(mList); return *this; }
/** Removes all values from the list. */
void clear() { mList.clear(); }
/** Adds the specified colour @p c to the list. */
- void insert(const QColor& c);
+ void insert(const TQColor& c);
/** Removes the colour @p c from the list. */
- void remove(const QColor& c) { mList.remove(c.rgb()); }
+ void remove(const TQColor& c) { mList.remove(c.rgb()); }
/** Adds the specified colour @p c to the list. */
- ColourList& operator+=(const QColor& c) { insert(c); return *this; }
+ ColourList& operator+=(const TQColor& c) { insert(c); return *this; }
/** Adds the colours in @p list to this list. */
ColourList& operator+=(const ColourList& list) { mList += list.mList; qHeapSort(mList); return *this; }
/** Returns true if the colours in the two lists are the same. */
@@ -83,28 +83,28 @@ class ColourList
/** Returns an iterator pointing to the colour at position @p i in the list. */
const_iterator at(size_type i) const { return mList.at(i); }
/** Returns true if the list contains the colour @p c. */
- size_type contains(const QColor& c) const { return mList.contains(c.rgb()); }
+ size_type contains(const TQColor& c) const { return mList.contains(c.rgb()); }
/** Returns an iterator pointing to the first occurrence of colour @p c in the list.
* Returns end() if colour @p c is not in the list.
*/
- const_iterator find(const QColor& c) const { return mList.find(c.rgb()); }
+ const_iterator find(const TQColor& c) const { return mList.find(c.rgb()); }
/** Returns an iterator pointing to the first occurrence of colour @p c in the list, starting.
* from position @p it. Returns end() if colour @p c is not in the list.
*/
- const_iterator find(const_iterator it, const QColor& c) const { return mList.find(it, c.rgb()); }
+ const_iterator find(const_iterator it, const TQColor& c) const { return mList.find(it, c.rgb()); }
/** Returns the index to the first occurrence of colour @p c in the list.
* Returns -1 if colour @p c is not in the list.
*/
- int findIndex(const QColor& c) const { return mList.findIndex(c.rgb()); }
+ int findIndex(const TQColor& c) const { return mList.findIndex(c.rgb()); }
/** Returns the first colour in the list. If the list is empty, the result is undefined. */
- QColor first() const { return QColor(mList.first()); }
+ TQColor first() const { return TQColor(mList.first()); }
/** Returns the last colour in the list. If the list is empty, the result is undefined. */
- QColor last() const { return QColor(mList.last()); }
+ TQColor last() const { return TQColor(mList.last()); }
/** Returns the colour at position @p i in the list. If the item does not exist, the result is undefined. */
- QColor operator[](size_type i) const { return QColor(mList[i]); }
+ TQColor operator[](size_type i) const { return TQColor(mList[i]); }
private:
void sort();
- QValueList<QRgb> mList;
+ TQValueList<QRgb> mList;
};
#endif // COLOURLIST_H
diff --git a/kalarm/lib/combobox.cpp b/kalarm/lib/combobox.cpp
index 7e0bea4bd..bb232ffe5 100644
--- a/kalarm/lib/combobox.cpp
+++ b/kalarm/lib/combobox.cpp
@@ -18,17 +18,17 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#include <qlineedit.h>
+#include <tqlineedit.h>
#include "combobox.moc"
-ComboBox::ComboBox(QWidget* parent, const char* name)
- : QComboBox(parent, name),
+ComboBox::ComboBox(TQWidget* parent, const char* name)
+ : TQComboBox(parent, name),
mReadOnly(false)
{ }
-ComboBox::ComboBox(bool rw, QWidget* parent, const char* name)
- : QComboBox(rw, parent, name),
+ComboBox::ComboBox(bool rw, TQWidget* parent, const char* name)
+ : TQComboBox(rw, parent, name),
mReadOnly(false)
{ }
@@ -42,7 +42,7 @@ void ComboBox::setReadOnly(bool ro)
}
}
-void ComboBox::mousePressEvent(QMouseEvent* e)
+void ComboBox::mousePressEvent(TQMouseEvent* e)
{
if (mReadOnly)
{
@@ -50,29 +50,29 @@ void ComboBox::mousePressEvent(QMouseEvent* e)
if (e->button() == Qt::LeftButton)
return;
}
- QComboBox::mousePressEvent(e);
+ TQComboBox::mousePressEvent(e);
}
-void ComboBox::mouseReleaseEvent(QMouseEvent* e)
+void ComboBox::mouseReleaseEvent(TQMouseEvent* e)
{
if (!mReadOnly)
- QComboBox::mouseReleaseEvent(e);
+ TQComboBox::mouseReleaseEvent(e);
}
-void ComboBox::mouseMoveEvent(QMouseEvent* e)
+void ComboBox::mouseMoveEvent(TQMouseEvent* e)
{
if (!mReadOnly)
- QComboBox::mouseMoveEvent(e);
+ TQComboBox::mouseMoveEvent(e);
}
-void ComboBox::keyPressEvent(QKeyEvent* e)
+void ComboBox::keyPressEvent(TQKeyEvent* e)
{
if (!mReadOnly || e->key() == Qt::Key_Escape)
- QComboBox::keyPressEvent(e);
+ TQComboBox::keyPressEvent(e);
}
-void ComboBox::keyReleaseEvent(QKeyEvent* e)
+void ComboBox::keyReleaseEvent(TQKeyEvent* e)
{
if (!mReadOnly)
- QComboBox::keyReleaseEvent(e);
+ TQComboBox::keyReleaseEvent(e);
}
diff --git a/kalarm/lib/combobox.h b/kalarm/lib/combobox.h
index d33ac147e..3f33a63db 100644
--- a/kalarm/lib/combobox.h
+++ b/kalarm/lib/combobox.h
@@ -21,13 +21,13 @@
#ifndef COMBOBOX_H
#define COMBOBOX_H
-#include <qcombobox.h>
+#include <tqcombobox.h>
/**
- * @short A QComboBox with read-only option.
+ * @short A TQComboBox with read-only option.
*
- * The ComboBox class is a QComboBox with a read-only option.
+ * The ComboBox class is a TQComboBox with a read-only option.
*
* The widget may be set as read-only. This has the same effect as disabling it, except
* that its appearance is unchanged.
@@ -42,13 +42,13 @@ class ComboBox : public QComboBox
* @param parent The parent object of this widget.
* @param name The name of this widget.
*/
- explicit ComboBox(QWidget* parent = 0, const char* name = 0);
+ explicit ComboBox(TQWidget* parent = 0, const char* name = 0);
/** Constructor.
* @param rw True for a read-write combo box, false for a read-only combo box.
* @param parent The parent object of this widget.
* @param name The name of this widget.
*/
- explicit ComboBox(bool rw, QWidget* parent = 0, const char* name = 0);
+ explicit ComboBox(bool rw, TQWidget* parent = 0, const char* name = 0);
/** Returns true if the widget is read only. */
bool isReadOnly() const { return mReadOnly; }
/** Sets whether the combo box is read-only for the user. If read-only,
@@ -57,11 +57,11 @@ class ComboBox : public QComboBox
*/
virtual void setReadOnly(bool readOnly);
protected:
- virtual void mousePressEvent(QMouseEvent*);
- virtual void mouseReleaseEvent(QMouseEvent*);
- virtual void mouseMoveEvent(QMouseEvent*);
- virtual void keyPressEvent(QKeyEvent*);
- virtual void keyReleaseEvent(QKeyEvent*);
+ virtual void mousePressEvent(TQMouseEvent*);
+ virtual void mouseReleaseEvent(TQMouseEvent*);
+ virtual void mouseMoveEvent(TQMouseEvent*);
+ virtual void keyPressEvent(TQKeyEvent*);
+ virtual void keyReleaseEvent(TQKeyEvent*);
private:
bool mReadOnly; // value cannot be changed
};
diff --git a/kalarm/lib/dateedit.cpp b/kalarm/lib/dateedit.cpp
index 71553d704..2fef25de5 100644
--- a/kalarm/lib/dateedit.cpp
+++ b/kalarm/lib/dateedit.cpp
@@ -25,13 +25,13 @@
#include "dateedit.moc"
-DateEdit::DateEdit(QWidget* parent, const char* name)
+DateEdit::DateEdit(TQWidget* parent, const char* name)
: KDateEdit(parent, name)
{
- connect(this, SIGNAL(dateEntered(const QDate&)), SLOT(newDateEntered(const QDate&)));
+ connect(this, TQT_SIGNAL(dateEntered(const TQDate&)), TQT_SLOT(newDateEntered(const TQDate&)));
}
-void DateEdit::setMinDate(const QDate& d, const QString& errorDate)
+void DateEdit::setMinDate(const TQDate& d, const TQString& errorDate)
{
mMinDate = d;
if (mMinDate.isValid() && date().isValid() && date() < mMinDate)
@@ -39,7 +39,7 @@ void DateEdit::setMinDate(const QDate& d, const QString& errorDate)
mMinDateErrString = errorDate;
}
-void DateEdit::setMaxDate(const QDate& d, const QString& errorDate)
+void DateEdit::setMaxDate(const TQDate& d, const TQString& errorDate)
{
mMaxDate = d;
if (mMaxDate.isValid() && date().isValid() && date() > mMaxDate)
@@ -49,11 +49,11 @@ void DateEdit::setMaxDate(const QDate& d, const QString& errorDate)
void DateEdit::setInvalid()
{
- setDate(QDate());
+ setDate(TQDate());
}
// Check a new date against any minimum or maximum date.
-void DateEdit::newDateEntered(const QDate& newDate)
+void DateEdit::newDateEntered(const TQDate& newDate)
{
if (newDate.isValid())
{
@@ -72,12 +72,12 @@ void DateEdit::newDateEntered(const QDate& newDate)
}
}
-void DateEdit::pastLimitMessage(const QDate& limit, const QString& error, const QString& defaultError)
+void DateEdit::pastLimitMessage(const TQDate& limit, const TQString& error, const TQString& defaultError)
{
- QString errString = error;
+ TQString errString = error;
if (errString.isNull())
{
- if (limit == QDate::currentDate())
+ if (limit == TQDate::currentDate())
errString = i18n("today");
else
errString = KGlobal::locale()->formatDate(limit, true);
@@ -86,7 +86,7 @@ void DateEdit::pastLimitMessage(const QDate& limit, const QString& error, const
KMessageBox::sorry(this, errString);
}
-void DateEdit::mousePressEvent(QMouseEvent *e)
+void DateEdit::mousePressEvent(TQMouseEvent *e)
{
if (isReadOnly())
{
@@ -97,25 +97,25 @@ void DateEdit::mousePressEvent(QMouseEvent *e)
KDateEdit::mousePressEvent(e);
}
-void DateEdit::mouseReleaseEvent(QMouseEvent* e)
+void DateEdit::mouseReleaseEvent(TQMouseEvent* e)
{
if (!isReadOnly())
KDateEdit::mouseReleaseEvent(e);
}
-void DateEdit::mouseMoveEvent(QMouseEvent* e)
+void DateEdit::mouseMoveEvent(TQMouseEvent* e)
{
if (!isReadOnly())
KDateEdit::mouseMoveEvent(e);
}
-void DateEdit::keyPressEvent(QKeyEvent* e)
+void DateEdit::keyPressEvent(TQKeyEvent* e)
{
if (!isReadOnly())
KDateEdit::keyPressEvent(e);
}
-void DateEdit::keyReleaseEvent(QKeyEvent* e)
+void DateEdit::keyReleaseEvent(TQKeyEvent* e)
{
if (!isReadOnly())
KDateEdit::keyReleaseEvent(e);
diff --git a/kalarm/lib/dateedit.h b/kalarm/lib/dateedit.h
index 031a96741..c7c015785 100644
--- a/kalarm/lib/dateedit.h
+++ b/kalarm/lib/dateedit.h
@@ -42,49 +42,49 @@ class DateEdit : public KDateEdit
* @param parent The parent object of this widget.
* @param name The name of this widget.
*/
- explicit DateEdit(QWidget* parent = 0, const char* name = 0);
+ explicit DateEdit(TQWidget* parent = 0, const char* name = 0);
/** Returns true if the widget contains a valid date. */
bool isValid() const { return date().isValid(); }
/** Returns the earliest date which can be entered.
* If there is no minimum date, returns an invalid date.
*/
- const QDate& minDate() const { return mMinDate; }
+ const TQDate& minDate() const { return mMinDate; }
/** Returns the latest date which can be entered.
* If there is no maximum date, returns an invalid date.
*/
- const QDate& maxDate() const { return mMaxDate; }
+ const TQDate& maxDate() const { return mMaxDate; }
/** Sets the earliest date which can be entered.
* @param date Earliest date allowed. If invalid, any minimum limit is removed.
* @param errorDate Error message to be displayed when a date earlier than
- * @p date is entered. Set to QString::null to use the default error message.
+ * @p date is entered. Set to TQString::null to use the default error message.
*/
- void setMinDate(const QDate& date, const QString& errorDate = QString::null);
+ void setMinDate(const TQDate& date, const TQString& errorDate = TQString::null);
/** Sets the latest date which can be entered.
* @param date Latest date allowed. If invalid, any maximum limit is removed.
* @param errorDate Error message to be displayed when a date later than
- * @p date is entered. Set to QString::null to use the default error message.
+ * @p date is entered. Set to TQString::null to use the default error message.
*/
- void setMaxDate(const QDate& date, const QString& errorDate = QString::null);
+ void setMaxDate(const TQDate& date, const TQString& errorDate = TQString::null);
/** Sets the date held in the widget to an invalid date. */
void setInvalid();
protected:
- virtual void mousePressEvent(QMouseEvent*);
- virtual void mouseReleaseEvent(QMouseEvent*);
- virtual void mouseMoveEvent(QMouseEvent*);
- virtual void keyPressEvent(QKeyEvent*);
- virtual void keyReleaseEvent(QKeyEvent*);
+ virtual void mousePressEvent(TQMouseEvent*);
+ virtual void mouseReleaseEvent(TQMouseEvent*);
+ virtual void mouseMoveEvent(TQMouseEvent*);
+ virtual void keyPressEvent(TQKeyEvent*);
+ virtual void keyReleaseEvent(TQKeyEvent*);
private slots:
- void newDateEntered(const QDate&);
+ void newDateEntered(const TQDate&);
private:
- void pastLimitMessage(const QDate& limit, const QString& error, const QString& defaultError);
+ void pastLimitMessage(const TQDate& limit, const TQString& error, const TQString& defaultError);
- QDate mMinDate; // minimum allowed date, or invalid for no minimum
- QDate mMaxDate; // maximum allowed date, or invalid for no maximum
- QString mMinDateErrString; // error message when entered date < mMinDate
- QString mMaxDateErrString; // error message when entered date > mMaxDate
+ TQDate mMinDate; // minimum allowed date, or invalid for no minimum
+ TQDate mMaxDate; // maximum allowed date, or invalid for no maximum
+ TQString mMinDateErrString; // error message when entered date < mMinDate
+ TQString mMaxDateErrString; // error message when entered date > mMaxDate
};
#endif // DATEEDIT_H
diff --git a/kalarm/lib/datetime.cpp b/kalarm/lib/datetime.cpp
index d7f5ee862..3ebaccd30 100644
--- a/kalarm/lib/datetime.cpp
+++ b/kalarm/lib/datetime.cpp
@@ -24,26 +24,26 @@
#include "datetime.h"
-QTime DateTime::mStartOfDay;
+TQTime DateTime::mStartOfDay;
-QTime DateTime::time() const
+TQTime DateTime::time() const
{
return mDateOnly ? mStartOfDay : mDateTime.time();
}
-QDateTime DateTime::dateTime() const
+TQDateTime DateTime::dateTime() const
{
- return mDateOnly ? QDateTime(mDateTime.date(), mStartOfDay) : mDateTime;
+ return mDateOnly ? TQDateTime(mDateTime.date(), mStartOfDay) : mDateTime;
}
-QString DateTime::formatLocale(bool shortFormat) const
+TQString DateTime::formatLocale(bool shortFormat) const
{
if (mDateOnly)
return KGlobal::locale()->formatDate(mDateTime.date(), shortFormat);
else if (mTimeValid)
return KGlobal::locale()->formatDateTime(mDateTime, shortFormat);
else
- return QString::null;
+ return TQString::null;
}
bool operator==(const DateTime& dt1, const DateTime& dt2)
@@ -73,7 +73,7 @@ bool operator<(const DateTime& dt1, const DateTime& dt2)
return false;
if (!dt1.mDateOnly && !dt2.mDateOnly)
return dt1.mDateTime.time() < dt2.mDateTime.time();
- QTime t = DateTime::startOfDay();
+ TQTime t = DateTime::startOfDay();
if (dt1.mDateOnly)
return t < dt2.mDateTime.time();
return dt1.mDateTime.time() < t;
diff --git a/kalarm/lib/datetime.h b/kalarm/lib/datetime.h
index 3b0831918..eb40d6b5c 100644
--- a/kalarm/lib/datetime.h
+++ b/kalarm/lib/datetime.h
@@ -20,15 +20,15 @@
#ifndef DATETIME_H
#define DATETIME_H
-#include <qdatetime.h>
+#include <tqdatetime.h>
/**
- * @short A QDateTime with date-only option.
+ * @short A TQDateTime with date-only option.
*
* The DateTime class holds a date, with or without a time.
*
- * DateTime is very similar to the QDateTime class, with the additional option to
+ * DateTime is very similar to the TQDateTime class, with the additional option to
* hold a date-only value. This allows a single date-time representation to be used
* for both an event having a specific date and time, and an all-day event.
*
@@ -44,17 +44,17 @@ class DateTime
*/
DateTime() : mDateOnly(false), mTimeValid(false) { }
/** Constructor for a date-only value. */
- DateTime(const QDate& d) : mDateTime(d), mDateOnly(true) { }
+ DateTime(const TQDate& d) : mDateTime(d), mDateOnly(true) { }
/** Constructor for a date-time value. */
- DateTime(const QDate& d, const QTime& t)
+ DateTime(const TQDate& d, const TQTime& t)
: mDateTime(d, t), mDateOnly(false), mTimeValid(true) { }
/** Constructor for a date-time or date-only value.
* @param dt the date and time to use.
* @param dateOnly True to construct a date-only value; false to construct a date-time value.
*/
- DateTime(const QDateTime& dt, bool dateOnly = false)
+ DateTime(const TQDateTime& dt, bool dateOnly = false)
: mDateTime(dt), mDateOnly(dateOnly), mTimeValid(true)
- { if (dateOnly) mDateTime.setTime(QTime()); }
+ { if (dateOnly) mDateTime.setTime(TQTime()); }
/** Assignment operator.
* Sets the value to a specified date-time or date-only value.
*/
@@ -63,13 +63,13 @@ class DateTime
/** Assignment operator.
* Sets the value to a specified date-time.
*/
- DateTime& operator=(const QDateTime& dt)
+ DateTime& operator=(const TQDateTime& dt)
{ mDateTime = dt; mDateOnly = false; mTimeValid = true; return *this; }
/** Assignment operator.
* Sets the value to a specified date-only value.
*/
- DateTime& operator=(const QDate& d)
- { mDateTime.setDate(d); mDateTime.setTime(QTime()); mDateOnly = true; return *this; }
+ DateTime& operator=(const TQDate& d)
+ { mDateTime.setDate(d); mDateTime.setTime(TQTime()); mDateOnly = true; return *this; }
/** Returns true if the date is null and, if it is a date-time value, the time is also null. */
bool isNull() const { return mDateTime.date().isNull() && (mDateOnly || mDateTime.time().isNull()); }
/** Returns true if the date is valid and, if it is a date-time value, the time is also valid. */
@@ -79,44 +79,44 @@ class DateTime
/** Sets the value to be either date-only or date-time.
* @param d True to set the value to be date-only; false to set it to a date-time value.
*/
- void setDateOnly(bool d) { if (d) mDateTime.setTime(QTime());
+ void setDateOnly(bool d) { if (d) mDateTime.setTime(TQTime());
else if (mDateOnly) mTimeValid = false;
mDateOnly = d;
}
/** Returns the date part of the value. */
- QDate date() const { return mDateTime.date(); }
+ TQDate date() const { return mDateTime.date(); }
/** Returns the time part of the value.
* If the value is date-only, the time returned is the start-of-day time set by setStartOfDay().
*/
- QTime time() const;
+ TQTime time() const;
/** Returns the date and time of the value.
* If the value is date-only, the time part returned is equal to the start-of-day time set
* by setStartOfDay().
*/
- QDateTime dateTime() const;
+ TQDateTime dateTime() const;
/** Returns the date and time of the value.
* if the value is date-only, the time part returned is 00:00:00.
*/
- QDateTime rawDateTime() const { return mDateTime; }
+ TQDateTime rawDateTime() const { return mDateTime; }
/** Sets a date-time or date-only value.
* @param dt the date-time to use.
* @param dateOnly True to set a date-only value; false to set a date-time value.
*/
- void set(const QDateTime& dt, bool dateOnly = false)
+ void set(const TQDateTime& dt, bool dateOnly = false)
{
mDateTime = dt;
mDateOnly = dateOnly;
if (dateOnly)
- mDateTime.setTime(QTime());
+ mDateTime.setTime(TQTime());
mTimeValid = true;
}
/** Sets a date-time value. */
- void set(const QDate& d, const QTime& t)
+ void set(const TQDate& d, const TQTime& t)
{ mDateTime.setDate(d); mDateTime.setTime(t); mDateOnly = false; mTimeValid = true; }
/** Sets the time component of the value.
* The value is converted if necessary to be a date-time value.
*/
- void setTime(const QTime& t) { mDateTime.setTime(t); mDateOnly = false; mTimeValid = true; }
+ void setTime(const TQTime& t) { mDateTime.setTime(t); mDateOnly = false; mTimeValid = true; }
/** Sets the value to a specified date-time value.
* @param secs The time_t date-time value, expressed as the number of seconds elapsed
* since 1970-01-01 00:00:00 UTC.
@@ -169,46 +169,46 @@ class DateTime
* If it is a date-time, both time and date are included in the output.
* If it is date-only, only the date is included in the output.
*/
- QString toString(Qt::DateFormat f = Qt::TextDate) const
+ TQString toString(Qt::DateFormat f = Qt::TextDate) const
{
if (mDateOnly)
return mDateTime.date().toString(f);
else if (mTimeValid)
return mDateTime.toString(f);
else
- return QString::null;
+ return TQString::null;
}
/** Returns the value as a string.
* If it is a date-time, both time and date are included in the output.
* If it is date-only, only the date is included in the output.
*/
- QString toString(const QString& format) const
+ TQString toString(const TQString& format) const
{
if (mDateOnly)
return mDateTime.date().toString(format);
else if (mTimeValid)
return mDateTime.toString(format);
else
- return QString::null;
+ return TQString::null;
}
/** Returns the value as a string, formatted according to the user's locale.
* If it is a date-time, both time and date are included in the output.
* If it is date-only, only the date is included in the output.
*/
- QString formatLocale(bool shortFormat = true) const;
+ TQString formatLocale(bool shortFormat = true) const;
/** Sets the start-of-day time.
* The default value is midnight (0000 hrs).
*/
- static void setStartOfDay(const QTime& sod) { mStartOfDay = sod; }
+ static void setStartOfDay(const TQTime& sod) { mStartOfDay = sod; }
/** Returns the start-of-day time. */
- static QTime startOfDay() { return mStartOfDay; }
+ static TQTime startOfDay() { return mStartOfDay; }
friend bool operator==(const DateTime& dt1, const DateTime& dt2);
friend bool operator<(const DateTime& dt1, const DateTime& dt2);
private:
- static QTime mStartOfDay;
- QDateTime mDateTime;
+ static TQTime mStartOfDay;
+ TQDateTime mDateTime;
bool mDateOnly;
bool mTimeValid; // whether the time is potentially valid - applicable only if mDateOnly false
};
diff --git a/kalarm/lib/label.cpp b/kalarm/lib/label.cpp
index c61ce76ad..69cef7544 100644
--- a/kalarm/lib/label.cpp
+++ b/kalarm/lib/label.cpp
@@ -19,24 +19,24 @@
*/
#include "kalarm.h"
-#include <qradiobutton.h>
+#include <tqradiobutton.h>
#include "label.moc"
-Label::Label(QWidget* parent, const char* name, WFlags f)
- : QLabel(parent, name, f),
+Label::Label(TQWidget* parent, const char* name, WFlags f)
+ : TQLabel(parent, name, f),
mRadioButton(0),
mFocusWidget(0)
{ }
-Label::Label(const QString& text, QWidget* parent, const char* name, WFlags f)
- : QLabel(text, parent, name, f),
+Label::Label(const TQString& text, TQWidget* parent, const char* name, WFlags f)
+ : TQLabel(text, parent, name, f),
mRadioButton(0),
mFocusWidget(0)
{ }
-Label::Label(QWidget* buddy, const QString& text, QWidget* parent, const char* name, WFlags f)
- : QLabel(buddy, text, parent, name, f),
+Label::Label(TQWidget* buddy, const TQString& text, TQWidget* parent, const char* name, WFlags f)
+ : TQLabel(buddy, text, parent, name, f),
mRadioButton(0),
mFocusWidget(0)
{ }
@@ -47,22 +47,22 @@ Label::Label(QWidget* buddy, const QString& text, QWidget* parent, const char* n
* When the accelerator key is pressed, the focus widget then receives focus.
* That event triggers the selection of the radio button.
*/
-void Label::setBuddy(QWidget* bud)
+void Label::setBuddy(TQWidget* bud)
{
if (mRadioButton)
- disconnect(mRadioButton, SIGNAL(destroyed()), this, SLOT(buddyDead()));
- QWidget* w = bud;
+ disconnect(mRadioButton, TQT_SIGNAL(destroyed()), this, TQT_SLOT(buddyDead()));
+ TQWidget* w = bud;
if (w)
{
while (w->focusProxy())
w = w->focusProxy();
- if (!w->inherits("QRadioButton"))
+ if (!w->inherits("TQRadioButton"))
w = 0;
}
if (!w)
{
// The buddy widget isn't a radio button
- QLabel::setBuddy(bud);
+ TQLabel::setBuddy(bud);
delete mFocusWidget;
mFocusWidget = 0;
mRadioButton = 0;
@@ -72,9 +72,9 @@ void Label::setBuddy(QWidget* bud)
// The buddy widget is a radio button, so set a different buddy
if (!mFocusWidget)
mFocusWidget = new LabelFocusWidget(this);
- QLabel::setBuddy(mFocusWidget);
- mRadioButton = (QRadioButton*)bud;
- connect(mRadioButton, SIGNAL(destroyed()), this, SLOT(buddyDead()));
+ TQLabel::setBuddy(mFocusWidget);
+ mRadioButton = (TQRadioButton*)bud;
+ connect(mRadioButton, TQT_SIGNAL(destroyed()), this, TQT_SLOT(buddyDead()));
}
}
@@ -103,14 +103,14 @@ void Label::activated()
* Class: LabelFocusWidget
=============================================================================*/
-LabelFocusWidget::LabelFocusWidget(QWidget* parent, const char* name)
- : QWidget(parent, name)
+LabelFocusWidget::LabelFocusWidget(TQWidget* parent, const char* name)
+ : TQWidget(parent, name)
{
setFocusPolicy(ClickFocus);
- setFixedSize(QSize(1,1));
+ setFixedSize(TQSize(1,1));
}
-void LabelFocusWidget::focusInEvent(QFocusEvent*)
+void LabelFocusWidget::focusInEvent(TQFocusEvent*)
{
Label* parent = (Label*)parentWidget();
parent->activated();
diff --git a/kalarm/lib/label.h b/kalarm/lib/label.h
index c65a7fcd6..4c0d74216 100644
--- a/kalarm/lib/label.h
+++ b/kalarm/lib/label.h
@@ -21,12 +21,12 @@
#ifndef LABEL_H
#define LABEL_H
-#include <qlabel.h>
+#include <tqlabel.h>
class QRadioButton;
class LabelFocusWidget;
/**
- * @short A QLabel with option for a buddy radio button.
+ * @short A TQLabel with option for a buddy radio button.
*
* The Label class provides a text display, with special behaviour when a radio
* button is set as a buddy.
@@ -34,7 +34,7 @@ class LabelFocusWidget;
* The Label object in effect acts as if it were part of the buddy radio button,
* in that when the label's accelerator key is pressed, the radio button receives
* focus and is switched on. When a non-radio button is specified as a buddy, the
- * behaviour is the same as for QLabel.
+ * behaviour is the same as for TQLabel.
*
* @author David Jarvie <software@astrojar.org.uk>
*/
@@ -46,16 +46,16 @@ class Label : public QLabel
/** Constructs an empty label.
* @param parent The parent object of this widget.
* @param name The name of this widget.
- * @param f Flags. See QWidget constructor for details.
+ * @param f Flags. See TQWidget constructor for details.
*/
- explicit Label(QWidget* parent, const char* name = 0, WFlags f = 0);
+ explicit Label(TQWidget* parent, const char* name = 0, WFlags f = 0);
/** Constructs a label that displays @p text.
* @param text Text string to display.
* @param parent The parent object of this widget.
* @param name The name of this widget.
- * @param f Flags. See QWidget constructor for details.
+ * @param f Flags. See TQWidget constructor for details.
*/
- Label(const QString& text, QWidget* parent, const char* name = 0, WFlags f = 0);
+ Label(const TQString& text, TQWidget* parent, const char* name = 0, WFlags f = 0);
/** Constructs a label, with a buddy widget, that displays @p text.
* @param buddy Buddy widget which receives the keyboard focus when the
* label's accelerator key is pressed. If @p buddy is a radio
@@ -64,21 +64,21 @@ class Label : public QLabel
* @param text Text string to display.
* @param parent The parent object of this widget.
* @param name The name of this widget.
- * @param f Flags. See QWidget constructor for details.
+ * @param f Flags. See TQWidget constructor for details.
*/
- Label(QWidget* buddy, const QString& text, QWidget* parent, const char* name = 0, WFlags f = 0);
+ Label(TQWidget* buddy, const TQString& text, TQWidget* parent, const char* name = 0, WFlags f = 0);
/** Sets the label's buddy widget which receives the keyboard focus when the
* label's accelerator key is pressed. If @p buddy is a radio button,
* @p buddy is in addition selected when the accelerator key is pressed.
*/
- virtual void setBuddy(QWidget* buddy);
+ virtual void setBuddy(TQWidget* buddy);
protected:
- virtual void drawContents(QPainter* p) { QLabel::drawContents(p); }
+ virtual void drawContents(TQPainter* p) { TQLabel::drawContents(p); }
private slots:
void buddyDead();
private:
void activated();
- QRadioButton* mRadioButton; // buddy widget if it's a radio button, else 0
+ TQRadioButton* mRadioButton; // buddy widget if it's a radio button, else 0
LabelFocusWidget* mFocusWidget;
};
@@ -88,9 +88,9 @@ class LabelFocusWidget : public QWidget
{
Q_OBJECT
public:
- LabelFocusWidget(QWidget* parent, const char* name = 0);
+ LabelFocusWidget(TQWidget* parent, const char* name = 0);
protected:
- virtual void focusInEvent(QFocusEvent*);
+ virtual void focusInEvent(TQFocusEvent*);
};
#endif // LABEL_H
diff --git a/kalarm/lib/lineedit.cpp b/kalarm/lib/lineedit.cpp
index 943d7b2d0..64c79ea7b 100644
--- a/kalarm/lib/lineedit.cpp
+++ b/kalarm/lib/lineedit.cpp
@@ -20,8 +20,8 @@
#include "kalarm.h"
-#include <qregexp.h>
-#include <qdragobject.h>
+#include <tqregexp.h>
+#include <tqdragobject.h>
#include <kurldrag.h>
#include <kurlcompletion.h>
@@ -39,7 +39,7 @@
* It has an option to prevent its contents being selected when it receives
= focus.
=============================================================================*/
-LineEdit::LineEdit(Type type, QWidget* parent, const char* name)
+LineEdit::LineEdit(Type type, TQWidget* parent, const char* name)
: KLineEdit(parent, name),
mType(type),
mNoSelect(false),
@@ -48,7 +48,7 @@ LineEdit::LineEdit(Type type, QWidget* parent, const char* name)
init();
}
-LineEdit::LineEdit(QWidget* parent, const char* name)
+LineEdit::LineEdit(TQWidget* parent, const char* name)
: KLineEdit(parent, name),
mType(Text),
mNoSelect(false),
@@ -75,39 +75,39 @@ void LineEdit::init()
* Called when the line edit receives focus.
* If 'noSelect' is true, prevent the contents being selected.
*/
-void LineEdit::focusInEvent(QFocusEvent* e)
+void LineEdit::focusInEvent(TQFocusEvent* e)
{
if (mNoSelect)
- QFocusEvent::setReason(QFocusEvent::Other);
+ TQFocusEvent::setReason(TQFocusEvent::Other);
KLineEdit::focusInEvent(e);
if (mNoSelect)
{
- QFocusEvent::resetReason();
+ TQFocusEvent::resetReason();
mNoSelect = false;
}
}
-void LineEdit::setText(const QString& text)
+void LineEdit::setText(const TQString& text)
{
KLineEdit::setText(text);
setCursorPosition(mSetCursorAtEnd ? text.length() : 0);
}
-void LineEdit::dragEnterEvent(QDragEnterEvent* e)
+void LineEdit::dragEnterEvent(TQDragEnterEvent* e)
{
if (KCal::ICalDrag::canDecode(e))
e->accept(false); // don't accept "text/calendar" objects
- e->accept(QTextDrag::canDecode(e)
+ e->accept(TQTextDrag::canDecode(e)
|| KURLDrag::canDecode(e)
|| mType != Url && KPIM::MailListDrag::canDecode(e)
|| mType == Emails && KVCardDrag::canDecode(e));
}
-void LineEdit::dropEvent(QDropEvent* e)
+void LineEdit::dropEvent(TQDropEvent* e)
{
- QString newText;
- QStringList newEmails;
- QString txt;
+ TQString newText;
+ TQStringList newEmails;
+ TQString txt;
KPIM::MailList mailList;
KURL::List files;
KABC::Addressee::List addrList;
@@ -132,7 +132,7 @@ void LineEdit::dropEvent(QDropEvent* e)
// KAddressBook entries
for (KABC::Addressee::List::Iterator it = addrList.begin(); it != addrList.end(); ++it)
{
- QString em((*it).fullEmail());
+ TQString em((*it).fullEmail());
if (!em.isEmpty())
newEmails.append(em);
}
@@ -149,7 +149,7 @@ void LineEdit::dropEvent(QDropEvent* e)
case Emails:
{
// Email entry field - ignore all but mailto: URLs
- QString mailto = QString::fromLatin1("mailto");
+ TQString mailto = TQString::fromLatin1("mailto");
for (KURL::List::Iterator it = files.begin(); it != files.end(); ++it)
{
if ((*it).protocol() == mailto)
@@ -162,15 +162,15 @@ void LineEdit::dropEvent(QDropEvent* e)
break;
}
}
- else if (QTextDrag::decode(e, txt))
+ else if (TQTextDrag::decode(e, txt))
{
// Plain text
if (mType == Emails)
{
// Remove newlines from a list of email addresses, and allow an eventual mailto: protocol
- QString mailto = QString::fromLatin1("mailto:");
- newEmails = QStringList::split(QRegExp("[\r\n]+"), txt);
- for (QStringList::Iterator it = newEmails.begin(); it != newEmails.end(); ++it)
+ TQString mailto = TQString::fromLatin1("mailto:");
+ newEmails = TQStringList::split(TQRegExp("[\r\n]+"), txt);
+ for (TQStringList::Iterator it = newEmails.begin(); it != newEmails.end(); ++it)
{
if ((*it).startsWith(mailto))
{
diff --git a/kalarm/lib/lineedit.h b/kalarm/lib/lineedit.h
index 57f8378ee..612b12a33 100644
--- a/kalarm/lib/lineedit.h
+++ b/kalarm/lib/lineedit.h
@@ -64,12 +64,12 @@ class LineEdit : public KLineEdit
* @param parent The parent object of this widget.
* @param name The name of this widget.
*/
- explicit LineEdit(Type type, QWidget* parent = 0, const char* name = 0);
+ explicit LineEdit(Type type, TQWidget* parent = 0, const char* name = 0);
/** Constructs a line edit whose content type is Text.
* @param parent The parent object of this widget.
* @param name The name of this widget.
*/
- explicit LineEdit(QWidget* parent = 0, const char* name = 0);
+ explicit LineEdit(TQWidget* parent = 0, const char* name = 0);
/** Prevents the line edit's contents being selected when the widget receives focus. */
void setNoSelect() { mNoSelect = true; }
/** Sets whether the cursor should be set at the beginning or end of the text when
@@ -78,11 +78,11 @@ class LineEdit : public KLineEdit
void setCursorAtEnd(bool end = true) { mSetCursorAtEnd = end; }
public slots:
/** Sets the contents of the line edit to be @p str. */
- virtual void setText(const QString& str);
+ virtual void setText(const TQString& str);
protected:
- virtual void focusInEvent(QFocusEvent*);
- virtual void dragEnterEvent(QDragEnterEvent*);
- virtual void dropEvent(QDropEvent*);
+ virtual void focusInEvent(TQFocusEvent*);
+ virtual void dragEnterEvent(TQDragEnterEvent*);
+ virtual void dropEvent(TQDropEvent*);
private:
void init();
diff --git a/kalarm/lib/messagebox.cpp b/kalarm/lib/messagebox.cpp
index 514b45bc2..48c18f1cd 100644
--- a/kalarm/lib/messagebox.cpp
+++ b/kalarm/lib/messagebox.cpp
@@ -24,14 +24,14 @@
KConfig* MessageBox::mConfig = 0;
-QMap<QString, KMessageBox::ButtonCode> MessageBox::mContinueDefaults;
+TQMap<TQString, KMessageBox::ButtonCode> MessageBox::mContinueDefaults;
/******************************************************************************
* Set the default button for continue/cancel message boxes with the specified
* 'dontAskAgainName'.
*/
-void MessageBox::setContinueDefault(const QString& dontAskAgainName, ButtonCode defaultButton)
+void MessageBox::setContinueDefault(const TQString& dontAskAgainName, ButtonCode defaultButton)
{
mContinueDefaults[dontAskAgainName] = (defaultButton == Cancel ? Cancel : Continue);
}
@@ -40,12 +40,12 @@ void MessageBox::setContinueDefault(const QString& dontAskAgainName, ButtonCode
* Get the default button for continue/cancel message boxes with the specified
* 'dontAskAgainName'.
*/
-KMessageBox::ButtonCode MessageBox::getContinueDefault(const QString& dontAskAgainName)
+KMessageBox::ButtonCode MessageBox::getContinueDefault(const TQString& dontAskAgainName)
{
ButtonCode defaultButton = Continue;
if (!dontAskAgainName.isEmpty())
{
- QMap<QString, ButtonCode>::ConstIterator it = mContinueDefaults.find(dontAskAgainName);
+ TQMap<TQString, ButtonCode>::ConstIterator it = mContinueDefaults.find(dontAskAgainName);
if (it != mContinueDefaults.end())
defaultButton = it.data();
}
@@ -60,8 +60,8 @@ KMessageBox::ButtonCode MessageBox::getContinueDefault(const QString& dontAskAga
* warningContinueCancel() for that 'dontAskAgainName' value. If neither method
* has set a default button, Continue is the default.
*/
-int MessageBox::warningContinueCancel(QWidget* parent, const QString& text, const QString& caption,
- const KGuiItem& buttonContinue, const QString& dontAskAgainName)
+int MessageBox::warningContinueCancel(TQWidget* parent, const TQString& text, const TQString& caption,
+ const KGuiItem& buttonContinue, const TQString& dontAskAgainName)
{
ButtonCode defaultButton = getContinueDefault(dontAskAgainName);
return warningContinueCancel(parent, defaultButton, text, caption, buttonContinue, dontAskAgainName);
@@ -72,9 +72,9 @@ int MessageBox::warningContinueCancel(QWidget* parent, const QString& text, cons
* If 'dontAskAgainName' is specified, the message box will only be suppressed
* if the user chose Continue last time.
*/
-int MessageBox::warningContinueCancel(QWidget* parent, ButtonCode defaultButton, const QString& text,
- const QString& caption, const KGuiItem& buttonContinue,
- const QString& dontAskAgainName)
+int MessageBox::warningContinueCancel(TQWidget* parent, ButtonCode defaultButton, const TQString& text,
+ const TQString& caption, const KGuiItem& buttonContinue,
+ const TQString& dontAskAgainName)
{
setContinueDefault(dontAskAgainName, defaultButton);
if (defaultButton != Cancel)
@@ -103,13 +103,13 @@ int MessageBox::warningContinueCancel(QWidget* parent, ButtonCode defaultButton,
* previously to set this for this 'dontShowAgainName' value.
* Reply = true if 'defaultShow' was written.
*/
-bool MessageBox::setDefaultShouldBeShownContinue(const QString& dontShowAgainName, bool defaultShow)
+bool MessageBox::setDefaultShouldBeShownContinue(const TQString& dontShowAgainName, bool defaultShow)
{
if (dontShowAgainName.isEmpty())
return false;
// First check whether there is an existing setting
KConfig* config = mConfig ? mConfig : KGlobal::config();
- config->setGroup(QString::fromLatin1("Notification Messages"));
+ config->setGroup(TQString::fromLatin1("Notification Messages"));
if (config->hasKey(dontShowAgainName))
return false;
@@ -124,7 +124,7 @@ bool MessageBox::setDefaultShouldBeShownContinue(const QString& dontShowAgainNam
* or warningContinueCancel() must have been called previously to set this for this
* 'dontShowAgainName' value.
*/
-bool MessageBox::shouldBeShownContinue(const QString& dontShowAgainName)
+bool MessageBox::shouldBeShownContinue(const TQString& dontShowAgainName)
{
if (getContinueDefault(dontShowAgainName) != Cancel)
return KMessageBox::shouldBeShownContinue(dontShowAgainName);
@@ -139,7 +139,7 @@ bool MessageBox::shouldBeShownContinue(const QString& dontShowAgainName)
* If 'dontShow' is true, the message box will be suppressed and it will return
* 'result'.
*/
-void MessageBox::saveDontShowAgainYesNo(const QString& dontShowAgainName, bool dontShow, ButtonCode result)
+void MessageBox::saveDontShowAgainYesNo(const TQString& dontShowAgainName, bool dontShow, ButtonCode result)
{
saveDontShowAgain(dontShowAgainName, true, dontShow, (result == Yes ? "yes" : "no"));
}
@@ -152,7 +152,7 @@ void MessageBox::saveDontShowAgainYesNo(const QString& dontShowAgainName, bool d
* or warningContinueCancel() must have been called previously to set this for this
* 'dontShowAgainName' value.
*/
-void MessageBox::saveDontShowAgainContinue(const QString& dontShowAgainName, bool dontShow)
+void MessageBox::saveDontShowAgainContinue(const TQString& dontShowAgainName, bool dontShow)
{
if (getContinueDefault(dontShowAgainName) == Cancel)
saveDontShowAgainYesNo(dontShowAgainName, dontShow, Yes);
@@ -163,15 +163,15 @@ void MessageBox::saveDontShowAgainContinue(const QString& dontShowAgainName, boo
/******************************************************************************
* Save whether the message box should not be shown again.
*/
-void MessageBox::saveDontShowAgain(const QString& dontShowAgainName, bool yesno, bool dontShow, const char* yesnoResult)
+void MessageBox::saveDontShowAgain(const TQString& dontShowAgainName, bool yesno, bool dontShow, const char* yesnoResult)
{
if (dontShowAgainName.isEmpty())
return;
KConfig* config = mConfig ? mConfig : KGlobal::config();
- config->setGroup(QString::fromLatin1("Notification Messages"));
+ config->setGroup(TQString::fromLatin1("Notification Messages"));
bool global = (dontShowAgainName[0] == ':');
if (yesno)
- config->writeEntry(dontShowAgainName, QString::fromLatin1(dontShow ? yesnoResult : ""), true, global);
+ config->writeEntry(dontShowAgainName, TQString::fromLatin1(dontShow ? yesnoResult : ""), true, global);
else
config->writeEntry(dontShowAgainName, !dontShow, true, global);
config->sync();
diff --git a/kalarm/lib/messagebox.h b/kalarm/lib/messagebox.h
index 32e0d7325..6d65b0934 100644
--- a/kalarm/lib/messagebox.h
+++ b/kalarm/lib/messagebox.h
@@ -50,13 +50,13 @@ class MessageBox : public KMessageBox
* "don't ask again" name.
* @param dontAskAgainName The identifier controlling whether the message box is suppressed.
*/
- static ButtonCode getContinueDefault(const QString& dontAskAgainName);
+ static ButtonCode getContinueDefault(const TQString& dontAskAgainName);
/** Sets the default button for the Continue/Cancel message box with the specified
* "don't ask again" name.
* @param dontAskAgainName The identifier controlling whether the message box is suppressed.
* @param defaultButton The default button for the message box. Valid values are Continue or Cancel.
*/
- static void setContinueDefault(const QString& dontAskAgainName, ButtonCode defaultButton);
+ static void setContinueDefault(const TQString& dontAskAgainName, ButtonCode defaultButton);
/** Displays a Continue/Cancel message box with the option as to which button is the default.
* @param parent Parent widget
* @param defaultButton The default button for the message box. Valid values are Continue or Cancel.
@@ -66,10 +66,10 @@ class MessageBox : public KMessageBox
* @param dontAskAgainName If specified, the message box will only be suppressed
* if the user chose Continue last time.
*/
- static int warningContinueCancel(QWidget* parent, ButtonCode defaultButton, const QString& text,
- const QString& caption = QString::null,
+ static int warningContinueCancel(TQWidget* parent, ButtonCode defaultButton, const TQString& text,
+ const TQString& caption = TQString::null,
const KGuiItem& buttonContinue = KStdGuiItem::cont(),
- const QString& dontAskAgainName = QString::null);
+ const TQString& dontAskAgainName = TQString::null);
/** Displays a Continue/Cancel message box.
* @param parent Parent widget
* @param text Message string
@@ -81,9 +81,9 @@ class MessageBox : public KMessageBox
* @p dontAskAgainName value. If neither method has been used to set a default button,
* Continue is the default.
*/
- 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);
/** If there is no current setting for whether a non-Yes/No message box should be
* shown, sets it to @p defaultShow.
* If a Continue/Cancel message box has Cancel as the default button, either
@@ -91,20 +91,20 @@ class MessageBox : public KMessageBox
* previously to set this for the specified @p dontShowAgainName value.
* @return true if @p defaultShow was written.
*/
- static bool setDefaultShouldBeShownContinue(const QString& dontShowAgainName, bool defaultShow);
+ static bool setDefaultShouldBeShownContinue(const TQString& dontShowAgainName, bool defaultShow);
/** Returns whether a non-Yes/No message box should be shown.
* If the message box has Cancel as the default button, either setContinueDefault()
* or warningContinueCancel() must have been called previously to set this for the
* specified @p dontShowAgainName value.
* @param dontShowAgainName The identifier controlling whether the message box is suppressed.
*/
- static bool shouldBeShownContinue(const QString& dontShowAgainName);
+ static bool shouldBeShownContinue(const TQString& dontShowAgainName);
/** Stores whether the Yes/No message box should or should not be shown again.
* @param dontShowAgainName The identifier controlling whether the message box is suppressed.
* @param dontShow If true, the message box will be suppressed and will return @p result.
* @param result The button code to return if the message box is suppressed.
*/
- static void saveDontShowAgainYesNo(const QString& dontShowAgainName, bool dontShow = true, ButtonCode result = No);
+ static void saveDontShowAgainYesNo(const TQString& dontShowAgainName, bool dontShow = true, ButtonCode result = No);
/** Stores whether a non-Yes/No message box should or should not be shown again.
* If the message box has Cancel as the default button, either setContinueDefault()
* or warningContinueCancel() must have been called previously to set this for the
@@ -112,14 +112,14 @@ class MessageBox : public KMessageBox
* @param dontShowAgainName The identifier controlling whether the message box is suppressed.
* @param dontShow If true, the message box will be suppressed and will return Continue.
*/
- static void saveDontShowAgainContinue(const QString& dontShowAgainName, bool dontShow = true);
+ static void saveDontShowAgainContinue(const TQString& dontShowAgainName, bool dontShow = true);
/** Sets the KConfig object to be used by the MessageBox class. */
static void setDontShowAskAgainConfig(KConfig* cfg) { mConfig = cfg; }
private:
- static void saveDontShowAgain(const QString& dontShowAgainName, bool yesno, bool dontShow, const char* yesnoResult = 0);
+ static void saveDontShowAgain(const TQString& dontShowAgainName, bool yesno, bool dontShow, const char* yesnoResult = 0);
static KConfig* mConfig;
- static QMap<QString, ButtonCode> mContinueDefaults;
+ static TQMap<TQString, ButtonCode> mContinueDefaults;
};
#endif
diff --git a/kalarm/lib/pushbutton.cpp b/kalarm/lib/pushbutton.cpp
index 8b279082c..ed8440a05 100644
--- a/kalarm/lib/pushbutton.cpp
+++ b/kalarm/lib/pushbutton.cpp
@@ -21,20 +21,20 @@
#include "pushbutton.moc"
-PushButton::PushButton(QWidget* parent, const char* name)
- : QPushButton(parent, name),
+PushButton::PushButton(TQWidget* parent, const char* name)
+ : TQPushButton(parent, name),
mFocusPolicy(focusPolicy()),
mReadOnly(false)
{ }
-PushButton::PushButton(const QString& text, QWidget* parent, const char* name)
- : QPushButton(text, parent, name),
+PushButton::PushButton(const TQString& text, TQWidget* parent, const char* name)
+ : TQPushButton(text, parent, name),
mFocusPolicy(focusPolicy()),
mReadOnly(false)
{ }
-PushButton::PushButton(const QIconSet& icon, const QString& text, QWidget* parent, const char* name)
- : QPushButton(icon, text, parent, name),
+PushButton::PushButton(const TQIconSet& icon, const TQString& text, TQWidget* parent, const char* name)
+ : TQPushButton(icon, text, parent, name),
mFocusPolicy(focusPolicy()),
mReadOnly(false)
{ }
@@ -44,13 +44,13 @@ void PushButton::setReadOnly(bool ro)
if ((int)ro != (int)mReadOnly)
{
mReadOnly = ro;
- setFocusPolicy(ro ? QWidget::NoFocus : mFocusPolicy);
+ setFocusPolicy(ro ? TQWidget::NoFocus : mFocusPolicy);
if (ro)
clearFocus();
}
}
-void PushButton::mousePressEvent(QMouseEvent* e)
+void PushButton::mousePressEvent(TQMouseEvent* e)
{
if (mReadOnly)
{
@@ -58,10 +58,10 @@ void PushButton::mousePressEvent(QMouseEvent* e)
if (e->button() == Qt::LeftButton)
return;
}
- QPushButton::mousePressEvent(e);
+ TQPushButton::mousePressEvent(e);
}
-void PushButton::mouseReleaseEvent(QMouseEvent* e)
+void PushButton::mouseReleaseEvent(TQMouseEvent* e)
{
if (mReadOnly)
{
@@ -69,16 +69,16 @@ void PushButton::mouseReleaseEvent(QMouseEvent* e)
if (e->button() == Qt::LeftButton)
return;
}
- QPushButton::mouseReleaseEvent(e);
+ TQPushButton::mouseReleaseEvent(e);
}
-void PushButton::mouseMoveEvent(QMouseEvent* e)
+void PushButton::mouseMoveEvent(TQMouseEvent* e)
{
if (!mReadOnly)
- QPushButton::mouseMoveEvent(e);
+ TQPushButton::mouseMoveEvent(e);
}
-void PushButton::keyPressEvent(QKeyEvent* e)
+void PushButton::keyPressEvent(TQKeyEvent* e)
{
if (mReadOnly)
switch (e->key())
@@ -92,11 +92,11 @@ void PushButton::keyPressEvent(QKeyEvent* e)
default:
return;
}
- QPushButton::keyPressEvent(e);
+ TQPushButton::keyPressEvent(e);
}
-void PushButton::keyReleaseEvent(QKeyEvent* e)
+void PushButton::keyReleaseEvent(TQKeyEvent* e)
{
if (!mReadOnly)
- QPushButton::keyReleaseEvent(e);
+ TQPushButton::keyReleaseEvent(e);
}
diff --git a/kalarm/lib/pushbutton.h b/kalarm/lib/pushbutton.h
index 6ef0f3a2a..8d82ac96e 100644
--- a/kalarm/lib/pushbutton.h
+++ b/kalarm/lib/pushbutton.h
@@ -21,13 +21,13 @@
#ifndef PUSHBUTTON_H
#define PUSHBUTTON_H
-#include <qpushbutton.h>
+#include <tqpushbutton.h>
/**
- * @short A QPushButton with read-only option.
+ * @short A TQPushButton with read-only option.
*
- * The PushButton class is a QPushButton with a read-only option.
+ * The PushButton class is a TQPushButton with a read-only option.
*
* The widget may be set as read-only. This has the same effect as disabling it, except
* that its appearance is unchanged.
@@ -43,20 +43,20 @@ class PushButton : public QPushButton
* @param parent The parent object of this widget.
* @param name The name of this widget.
*/
- explicit PushButton(QWidget* parent, const char* name = 0);
+ explicit PushButton(TQWidget* parent, const char* name = 0);
/** Constructor for a push button which displays a text.
* @param text The text to show on the button.
* @param parent The parent object of this widget.
* @param name The name of this widget.
*/
- PushButton(const QString& text, QWidget* parent, const char* name = 0);
+ PushButton(const TQString& text, TQWidget* parent, const char* name = 0);
/** Constructor for a push button which displays an icon and a text.
* @param icon The icon to show on the button.
* @param text The text to show on the button.
* @param parent The parent object of this widget.
* @param name The name of this widget.
*/
- PushButton(const QIconSet& icon, const QString& text, QWidget* parent, const char* name = 0);
+ PushButton(const TQIconSet& icon, const TQString& text, TQWidget* parent, const char* name = 0);
/** Sets whether the push button is read-only for the user.
* @param readOnly True to set the widget read-only, false to enable its action.
*/
@@ -64,13 +64,13 @@ class PushButton : public QPushButton
/** Returns true if the widget is read only. */
virtual bool isReadOnly() const { return mReadOnly; }
protected:
- virtual void mousePressEvent(QMouseEvent*);
- virtual void mouseReleaseEvent(QMouseEvent*);
- virtual void mouseMoveEvent(QMouseEvent*);
- virtual void keyPressEvent(QKeyEvent*);
- virtual void keyReleaseEvent(QKeyEvent*);
+ virtual void mousePressEvent(TQMouseEvent*);
+ virtual void mouseReleaseEvent(TQMouseEvent*);
+ virtual void mouseMoveEvent(TQMouseEvent*);
+ virtual void keyPressEvent(TQKeyEvent*);
+ virtual void keyReleaseEvent(TQKeyEvent*);
private:
- QWidget::FocusPolicy mFocusPolicy; // default focus policy for the QPushButton
+ TQWidget::FocusPolicy mFocusPolicy; // default focus policy for the QPushButton
bool mReadOnly; // value cannot be changed
};
diff --git a/kalarm/lib/radiobutton.cpp b/kalarm/lib/radiobutton.cpp
index d66911eeb..7cf58f082 100644
--- a/kalarm/lib/radiobutton.cpp
+++ b/kalarm/lib/radiobutton.cpp
@@ -21,15 +21,15 @@
#include "radiobutton.moc"
-RadioButton::RadioButton(QWidget* parent, const char* name)
- : QRadioButton(parent, name),
+RadioButton::RadioButton(TQWidget* parent, const char* name)
+ : TQRadioButton(parent, name),
mFocusPolicy(focusPolicy()),
mFocusWidget(0),
mReadOnly(false)
{ }
-RadioButton::RadioButton(const QString& text, QWidget* parent, const char* name)
- : QRadioButton(text, parent, name),
+RadioButton::RadioButton(const TQString& text, TQWidget* parent, const char* name)
+ : TQRadioButton(text, parent, name),
mFocusPolicy(focusPolicy()),
mFocusWidget(0),
mReadOnly(false)
@@ -44,7 +44,7 @@ void RadioButton::setReadOnly(bool ro)
if ((int)ro != (int)mReadOnly)
{
mReadOnly = ro;
- setFocusPolicy(ro ? QWidget::NoFocus : mFocusPolicy);
+ setFocusPolicy(ro ? TQWidget::NoFocus : mFocusPolicy);
if (ro)
clearFocus();
}
@@ -53,14 +53,14 @@ void RadioButton::setReadOnly(bool ro)
/******************************************************************************
* Specify a widget to receive focus when the button is clicked on.
*/
-void RadioButton::setFocusWidget(QWidget* w, bool enable)
+void RadioButton::setFocusWidget(TQWidget* w, bool enable)
{
mFocusWidget = w;
mFocusWidgetEnable = enable;
if (w)
- connect(this, SIGNAL(clicked()), SLOT(slotClicked()));
+ connect(this, TQT_SIGNAL(clicked()), TQT_SLOT(slotClicked()));
else
- disconnect(this, SIGNAL(clicked()), this, SLOT(slotClicked()));
+ disconnect(this, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotClicked()));
}
/******************************************************************************
@@ -81,7 +81,7 @@ void RadioButton::slotClicked()
* Event handlers to intercept events if in read-only mode.
* Any events which could change the button state are discarded.
*/
-void RadioButton::mousePressEvent(QMouseEvent* e)
+void RadioButton::mousePressEvent(TQMouseEvent* e)
{
if (mReadOnly)
{
@@ -89,10 +89,10 @@ void RadioButton::mousePressEvent(QMouseEvent* e)
if (e->button() == Qt::LeftButton)
return;
}
- QRadioButton::mousePressEvent(e);
+ TQRadioButton::mousePressEvent(e);
}
-void RadioButton::mouseReleaseEvent(QMouseEvent* e)
+void RadioButton::mouseReleaseEvent(TQMouseEvent* e)
{
if (mReadOnly)
{
@@ -100,16 +100,16 @@ void RadioButton::mouseReleaseEvent(QMouseEvent* e)
if (e->button() == Qt::LeftButton)
return;
}
- QRadioButton::mouseReleaseEvent(e);
+ TQRadioButton::mouseReleaseEvent(e);
}
-void RadioButton::mouseMoveEvent(QMouseEvent* e)
+void RadioButton::mouseMoveEvent(TQMouseEvent* e)
{
if (!mReadOnly)
- QRadioButton::mouseMoveEvent(e);
+ TQRadioButton::mouseMoveEvent(e);
}
-void RadioButton::keyPressEvent(QKeyEvent* e)
+void RadioButton::keyPressEvent(TQKeyEvent* e)
{
if (mReadOnly)
switch (e->key())
@@ -124,11 +124,11 @@ void RadioButton::keyPressEvent(QKeyEvent* e)
default:
return;
}
- QRadioButton::keyPressEvent(e);
+ TQRadioButton::keyPressEvent(e);
}
-void RadioButton::keyReleaseEvent(QKeyEvent* e)
+void RadioButton::keyReleaseEvent(TQKeyEvent* e)
{
if (!mReadOnly)
- QRadioButton::keyReleaseEvent(e);
+ TQRadioButton::keyReleaseEvent(e);
}
diff --git a/kalarm/lib/radiobutton.h b/kalarm/lib/radiobutton.h
index 96bca04dd..c87ef97b8 100644
--- a/kalarm/lib/radiobutton.h
+++ b/kalarm/lib/radiobutton.h
@@ -21,13 +21,13 @@
#ifndef RADIOBUTTON_H
#define RADIOBUTTON_H
-#include <qradiobutton.h>
+#include <tqradiobutton.h>
/**
- * @short A QRadioButton with focus widget and read-only options.
+ * @short A TQRadioButton with focus widget and read-only options.
*
- * The RadioButton class is a QRadioButton with the ability to transfer focus to
+ * The RadioButton class is a TQRadioButton with the ability to transfer focus to
* another widget when checked, and with a read-only option.
*
* Another widget may be specified as the focus widget for the radio button. Whenever
@@ -47,13 +47,13 @@ class RadioButton : public QRadioButton
* @param parent The parent object of this widget.
* @param name The name of this widget.
*/
- explicit RadioButton(QWidget* parent, const char* name = 0);
+ explicit RadioButton(TQWidget* parent, const char* name = 0);
/** Constructor.
* @param text Text to display.
* @param parent The parent object of this widget.
* @param name The name of this widget.
*/
- RadioButton(const QString& text, QWidget* parent, const char* name = 0);
+ RadioButton(const TQString& text, TQWidget* parent, const char* name = 0);
/** Returns true if the widget is read only. */
bool isReadOnly() const { return mReadOnly; }
/** Sets whether the radio button is read-only for the user. If read-only,
@@ -62,25 +62,25 @@ class RadioButton : public QRadioButton
*/
virtual void setReadOnly(bool readOnly);
/** Returns the widget which receives focus when the button is clicked. */
- QWidget* focusWidget() const { return mFocusWidget; }
+ TQWidget* focusWidget() const { return mFocusWidget; }
/** Specifies a widget to receive focus when the button is clicked.
* @param widget Widget to receive focus.
* @param enable If true, @p widget will be enabled before receiving focus. If
* false, the enabled state of @p widget will be left unchanged when
* the radio button is clicked.
*/
- void setFocusWidget(QWidget* widget, bool enable = true);
+ void setFocusWidget(TQWidget* widget, bool enable = true);
protected:
- virtual void mousePressEvent(QMouseEvent*);
- virtual void mouseReleaseEvent(QMouseEvent*);
- virtual void mouseMoveEvent(QMouseEvent*);
- virtual void keyPressEvent(QKeyEvent*);
- virtual void keyReleaseEvent(QKeyEvent*);
+ virtual void mousePressEvent(TQMouseEvent*);
+ virtual void mouseReleaseEvent(TQMouseEvent*);
+ virtual void mouseMoveEvent(TQMouseEvent*);
+ virtual void keyPressEvent(TQKeyEvent*);
+ virtual void keyReleaseEvent(TQKeyEvent*);
protected slots:
void slotClicked();
private:
- QWidget::FocusPolicy mFocusPolicy; // default focus policy for the QRadioButton
- QWidget* mFocusWidget; // widget to receive focus when button is clicked on
+ TQWidget::FocusPolicy mFocusPolicy; // default focus policy for the QRadioButton
+ TQWidget* mFocusWidget; // widget to receive focus when button is clicked on
bool mFocusWidgetEnable; // enable focus widget before setting focus
bool mReadOnly; // value cannot be changed
};
diff --git a/kalarm/lib/shellprocess.cpp b/kalarm/lib/shellprocess.cpp
index 1e37d2e74..209f1aad8 100644
--- a/kalarm/lib/shellprocess.cpp
+++ b/kalarm/lib/shellprocess.cpp
@@ -31,13 +31,13 @@
#include "shellprocess.moc"
-QCString ShellProcess::mShellName;
-QCString ShellProcess::mShellPath;
+TQCString ShellProcess::mShellName;
+TQCString ShellProcess::mShellPath;
bool ShellProcess::mInitialised = false;
bool ShellProcess::mAuthorised = false;
-ShellProcess::ShellProcess(const QString& command)
+ShellProcess::ShellProcess(const TQString& command)
: KShellProcess(shellName()),
mCommand(command),
mStatus(INACTIVE),
@@ -56,8 +56,8 @@ bool ShellProcess::start(Communication comm)
return false;
}
KShellProcess::operator<<(mCommand);
- connect(this, SIGNAL(wroteStdin(KProcess*)), SLOT(writtenStdin(KProcess*)));
- connect(this, SIGNAL(processExited(KProcess*)), SLOT(slotExited(KProcess*)));
+ connect(this, TQT_SIGNAL(wroteStdin(KProcess*)), TQT_SLOT(writtenStdin(KProcess*)));
+ connect(this, TQT_SIGNAL(processExited(KProcess*)), TQT_SLOT(slotExited(KProcess*)));
if (!KShellProcess::start(KProcess::NotifyOnExit, comm))
{
mStatus = START_FAIL;
@@ -101,7 +101,7 @@ void ShellProcess::slotExited(KProcess* proc)
*/
void ShellProcess::writeStdin(const char* buffer, int bufflen)
{
- QCString scopy(buffer, bufflen+1); // construct a deep copy
+ TQCString scopy(buffer, bufflen+1); // construct a deep copy
bool write = mStdinQueue.isEmpty();
mStdinQueue.append(scopy);
if (write)
@@ -138,7 +138,7 @@ void ShellProcess::stdinExit()
* Return the error message corresponding to the command exit status.
* Reply = null string if not yet exited, or if command successful.
*/
-QString ShellProcess::errorMessage() const
+TQString ShellProcess::errorMessage() const
{
switch (mStatus)
{
@@ -153,7 +153,7 @@ QString ShellProcess::errorMessage() const
case RUNNING:
case SUCCESS:
default:
- return QString::null;
+ return TQString::null;
}
}
@@ -162,13 +162,13 @@ QString ShellProcess::errorMessage() const
* This is a duplication of what KShellProcess does, but we need to know
* which shell is used in order to decide what its exit code means.
*/
-const QCString& ShellProcess::shellPath()
+const TQCString& ShellProcess::shellPath()
{
if (mShellPath.isEmpty())
{
// Get the path to the shell
mShellPath = "/bin/sh";
- QCString envshell = QCString(getenv("SHELL")).stripWhiteSpace();
+ TQCString envshell = TQCString(getenv("SHELL")).stripWhiteSpace();
if (!envshell.isEmpty())
{
struct stat fileinfo;
diff --git a/kalarm/lib/shellprocess.h b/kalarm/lib/shellprocess.h
index 06a262a8d..a3b8a574b 100644
--- a/kalarm/lib/shellprocess.h
+++ b/kalarm/lib/shellprocess.h
@@ -72,7 +72,7 @@ class ShellProcess : public KShellProcess
/** Constructor.
* @param command The command line to be run when start() is called.
*/
- explicit ShellProcess(const QString& command);
+ explicit ShellProcess(const TQString& command);
/** Executes the configured command.
* @param comm Which communication links should be established to the child process
* (stdin/stdout/stderr).
@@ -85,12 +85,12 @@ class ShellProcess : public KShellProcess
*/
bool normalExit() const { return mStatus == SUCCESS; }
/** Returns the command configured to be run. */
- const QString& command() const { return mCommand; }
+ const TQString& command() const { return mCommand; }
/** Returns the error message corresponding to the command exit status.
* @return Error message if an error occurred. Null string if the command has not yet
* exited, or if the command ran successfully.
*/
- QString errorMessage() const;
+ TQString errorMessage() const;
/** Writes a string to the process's STDIN. */
void writeStdin(const char* buffer, int bufflen);
/** Tell the process to exit once any outstanding STDIN strings have been written. */
@@ -102,11 +102,11 @@ class ShellProcess : public KShellProcess
/** Determines which shell to use.
* @return file name of shell, excluding path.
*/
- static const QCString& shellName() { shellPath(); return mShellName; }
+ static const TQCString& shellName() { shellPath(); return mShellName; }
/** Determines which shell to use.
* @return path name of shell.
*/
- static const QCString& shellPath();
+ static const TQCString& shellPath();
signals:
/** Signal emitted when the shell process execution completes. It is not emitted
@@ -120,17 +120,17 @@ class ShellProcess : public KShellProcess
private:
// Prohibit the following inherited methods
- ShellProcess& operator<<(const QString&);
- ShellProcess& operator<<(const QCString&);
- ShellProcess& operator<<(const QStringList&);
+ ShellProcess& operator<<(const TQString&);
+ ShellProcess& operator<<(const TQCString&);
+ ShellProcess& operator<<(const TQStringList&);
ShellProcess& operator<<(const char*);
- static QCString mShellName; // name of shell to be used
- static QCString mShellPath; // path of shell to be used
+ static TQCString mShellName; // name of shell to be used
+ static TQCString mShellPath; // path of shell to be used
static bool mInitialised; // true once static data has been initialised
static bool mAuthorised; // true if shell commands are authorised
- QString mCommand; // copy of command to be executed
- QValueList<QCString> mStdinQueue; // queued strings to send to STDIN
+ TQString mCommand; // copy of command to be executed
+ TQValueList<TQCString> mStdinQueue; // queued strings to send to STDIN
Status mStatus; // current execution status
bool mStdinExit; // exit once STDIN queue has been written
};
diff --git a/kalarm/lib/slider.cpp b/kalarm/lib/slider.cpp
index 1a0999645..afe7d679c 100644
--- a/kalarm/lib/slider.cpp
+++ b/kalarm/lib/slider.cpp
@@ -21,18 +21,18 @@
#include "slider.moc"
-Slider::Slider(QWidget* parent, const char* name)
- : QSlider(parent, name),
+Slider::Slider(TQWidget* parent, const char* name)
+ : TQSlider(parent, name),
mReadOnly(false)
{ }
-Slider::Slider(Orientation o, QWidget* parent, const char* name)
- : QSlider(o, parent, name),
+Slider::Slider(Orientation o, TQWidget* parent, const char* name)
+ : TQSlider(o, parent, name),
mReadOnly(false)
{ }
-Slider::Slider(int minval, int maxval, int pageStep, int value, Orientation o, QWidget* parent, const char* name)
- : QSlider(minval, maxval, pageStep, value, o, parent, name),
+Slider::Slider(int minval, int maxval, int pageStep, int value, Orientation o, TQWidget* parent, const char* name)
+ : TQSlider(minval, maxval, pageStep, value, o, parent, name),
mReadOnly(false)
{ }
@@ -49,7 +49,7 @@ void Slider::setReadOnly(bool ro)
* Event handlers to intercept events if in read-only mode.
* Any events which could change the slider value are discarded.
*/
-void Slider::mousePressEvent(QMouseEvent* e)
+void Slider::mousePressEvent(TQMouseEvent* e)
{
if (mReadOnly)
{
@@ -57,29 +57,29 @@ void Slider::mousePressEvent(QMouseEvent* e)
if (e->button() == Qt::LeftButton)
return;
}
- QSlider::mousePressEvent(e);
+ TQSlider::mousePressEvent(e);
}
-void Slider::mouseReleaseEvent(QMouseEvent* e)
+void Slider::mouseReleaseEvent(TQMouseEvent* e)
{
if (!mReadOnly)
- QSlider::mouseReleaseEvent(e);
+ TQSlider::mouseReleaseEvent(e);
}
-void Slider::mouseMoveEvent(QMouseEvent* e)
+void Slider::mouseMoveEvent(TQMouseEvent* e)
{
if (!mReadOnly)
- QSlider::mouseMoveEvent(e);
+ TQSlider::mouseMoveEvent(e);
}
-void Slider::keyPressEvent(QKeyEvent* e)
+void Slider::keyPressEvent(TQKeyEvent* e)
{
if (!mReadOnly || e->key() == Qt::Key_Escape)
- QSlider::keyPressEvent(e);
+ TQSlider::keyPressEvent(e);
}
-void Slider::keyReleaseEvent(QKeyEvent* e)
+void Slider::keyReleaseEvent(TQKeyEvent* e)
{
if (!mReadOnly)
- QSlider::keyReleaseEvent(e);
+ TQSlider::keyReleaseEvent(e);
}
diff --git a/kalarm/lib/slider.h b/kalarm/lib/slider.h
index 17635e68a..8fa54d452 100644
--- a/kalarm/lib/slider.h
+++ b/kalarm/lib/slider.h
@@ -21,13 +21,13 @@
#ifndef SLIDER_H
#define SLIDER_H
-#include <qslider.h>
+#include <tqslider.h>
/**
- * @short A QSlider with read-only option.
+ * @short A TQSlider with read-only option.
*
- * The Slider class is a QSlider with a read-only option.
+ * The Slider class is a TQSlider with a read-only option.
*
* The widget may be set as read-only. This has the same effect as disabling it, except
* that its appearance is unchanged.
@@ -43,13 +43,13 @@ class Slider : public QSlider
* @param parent The parent object of this widget.
* @param name The name of this widget.
*/
- explicit Slider(QWidget* parent = 0, const char* name = 0);
+ explicit Slider(TQWidget* parent = 0, const char* name = 0);
/** Constructor.
* @param orient The orientation of the slider, either Qt::Horizonal or Qt::Vertical.
* @param parent The parent object of this widget.
* @param name The name of this widget.
*/
- explicit Slider(Orientation orient, QWidget* parent = 0, const char* name = 0);
+ explicit Slider(Orientation orient, TQWidget* parent = 0, const char* name = 0);
/** Constructor.
* @param minValue The minimum value which the slider can have.
* @param maxValue The maximum value which the slider can have.
@@ -60,7 +60,7 @@ class Slider : public QSlider
* @param name The name of this widget.
*/
Slider(int minValue, int maxValue, int pageStep, int value, Orientation orient,
- QWidget* parent = 0, const char* name = 0);
+ TQWidget* parent = 0, const char* name = 0);
/** Returns true if the slider is read only. */
bool isReadOnly() const { return mReadOnly; }
/** Sets whether the slider is read-only for the user.
@@ -68,11 +68,11 @@ class Slider : public QSlider
*/
virtual void setReadOnly(bool readOnly);
protected:
- virtual void mousePressEvent(QMouseEvent*);
- virtual void mouseReleaseEvent(QMouseEvent*);
- virtual void mouseMoveEvent(QMouseEvent*);
- virtual void keyPressEvent(QKeyEvent*);
- virtual void keyReleaseEvent(QKeyEvent*);
+ virtual void mousePressEvent(TQMouseEvent*);
+ virtual void mouseReleaseEvent(TQMouseEvent*);
+ virtual void mouseMoveEvent(TQMouseEvent*);
+ virtual void keyPressEvent(TQKeyEvent*);
+ virtual void keyReleaseEvent(TQKeyEvent*);
private:
bool mReadOnly; // value cannot be changed by the user
};
diff --git a/kalarm/lib/spinbox.cpp b/kalarm/lib/spinbox.cpp
index bb9ef2441..6145114a3 100644
--- a/kalarm/lib/spinbox.cpp
+++ b/kalarm/lib/spinbox.cpp
@@ -19,21 +19,21 @@
*/
#include <kdeversion.h>
-#include <qlineedit.h>
-#include <qobjectlist.h>
+#include <tqlineedit.h>
+#include <tqobjectlist.h>
#include "spinbox.moc"
-SpinBox::SpinBox(QWidget* parent, const char* name)
- : QSpinBox(0, 99999, 1, parent, name),
- mMinValue(QSpinBox::minValue()),
- mMaxValue(QSpinBox::maxValue())
+SpinBox::SpinBox(TQWidget* parent, const char* name)
+ : TQSpinBox(0, 99999, 1, parent, name),
+ mMinValue(TQSpinBox::minValue()),
+ mMaxValue(TQSpinBox::maxValue())
{
init();
}
-SpinBox::SpinBox(int minValue, int maxValue, int step, QWidget* parent, const char* name)
- : QSpinBox(minValue, maxValue, step, parent, name),
+SpinBox::SpinBox(int minValue, int maxValue, int step, TQWidget* parent, const char* name)
+ : TQSpinBox(minValue, maxValue, step, parent, name),
mMinValue(minValue),
mMaxValue(maxValue)
{
@@ -42,7 +42,7 @@ SpinBox::SpinBox(int minValue, int maxValue, int step, QWidget* parent, const ch
void SpinBox::init()
{
- int step = QSpinBox::lineStep();
+ int step = TQSpinBox::lineStep();
mLineStep = step;
mLineShiftStep = step;
mCurrentButton = NO_BUTTON;
@@ -56,8 +56,8 @@ void SpinBox::init()
// Find the spin widgets which are part of the spin boxes, in order to
// handle their shift-button presses.
- QObjectList* spinwidgets = queryList("QSpinWidget", 0, false, true);
- QSpinWidget* spin = (QSpinWidget*)spinwidgets->getFirst();
+ TQObjectList* spinwidgets = queryList("TQSpinWidget", 0, false, true);
+ TQSpinWidget* spin = (TQSpinWidget*)spinwidgets->getFirst();
if (spin)
spin->installEventFilter(this); // handle shift-button presses
delete spinwidgets;
@@ -65,7 +65,7 @@ void SpinBox::init()
#if KDE_IS_VERSION(3,1,90)
// Detect when the text field is edited
- connect(editor(), SIGNAL(textChanged(const QString&)), SLOT(textEdited()));
+ connect(editor(), TQT_SIGNAL(textChanged(const TQString&)), TQT_SLOT(textEdited()));
#endif
}
@@ -88,14 +88,14 @@ int SpinBox::bound(int val) const
void SpinBox::setMinValue(int val)
{
mMinValue = val;
- QSpinBox::setMinValue(val);
+ TQSpinBox::setMinValue(val);
mShiftMinBound = false;
}
void SpinBox::setMaxValue(int val)
{
mMaxValue = val;
- QSpinBox::setMaxValue(val);
+ TQSpinBox::setMaxValue(val);
mShiftMaxBound = false;
}
@@ -103,26 +103,26 @@ void SpinBox::setLineStep(int step)
{
mLineStep = step;
if (!mShiftMouse)
- QSpinBox::setLineStep(step);
+ TQSpinBox::setLineStep(step);
}
void SpinBox::setLineShiftStep(int step)
{
mLineShiftStep = step;
if (mShiftMouse)
- QSpinBox::setLineStep(step);
+ TQSpinBox::setLineStep(step);
}
void SpinBox::stepUp()
{
- int step = QSpinBox::lineStep();
+ int step = TQSpinBox::lineStep();
addValue(step);
emit stepped(step);
}
void SpinBox::stepDown()
{
- int step = -QSpinBox::lineStep();
+ int step = -TQSpinBox::lineStep();
addValue(step);
emit stepped(step);
}
@@ -135,8 +135,8 @@ void SpinBox::stepDown()
void SpinBox::addValue(int change, bool current)
{
int newval = value() + change;
- int maxval = current ? QSpinBox::maxValue() : mMaxValue;
- int minval = current ? QSpinBox::minValue() : mMinValue;
+ int maxval = current ? TQSpinBox::maxValue() : mMaxValue;
+ int minval = current ? TQSpinBox::minValue() : mMinValue;
if (wrapping())
{
int range = maxval - minval + 1;
@@ -163,20 +163,20 @@ void SpinBox::valueChange()
if (mShiftMinBound && val >= mMinValue)
{
// Reinstate the minimum bound now that the value has returned to the normal range.
- QSpinBox::setMinValue(mMinValue);
+ TQSpinBox::setMinValue(mMinValue);
mShiftMinBound = false;
}
if (mShiftMaxBound && val <= mMaxValue)
{
// Reinstate the maximum bound now that the value has returned to the normal range.
- QSpinBox::setMaxValue(mMaxValue);
+ TQSpinBox::setMaxValue(mMaxValue);
mShiftMaxBound = false;
}
bool focus = !mSelectOnStep && hasFocus();
if (focus)
clearFocus(); // prevent selection of the spin box text
- QSpinBox::valueChange();
+ TQSpinBox::valueChange();
if (focus)
setFocus();
}
@@ -193,13 +193,13 @@ void SpinBox::textEdited()
void SpinBox::updateDisplay()
{
mEdited = false;
- QSpinBox::updateDisplay();
+ TQSpinBox::updateDisplay();
}
/******************************************************************************
* Receives events destined for the spin widget or for the edit field.
*/
-bool SpinBox::eventFilter(QObject* obj, QEvent* e)
+bool SpinBox::eventFilter(TQObject* obj, TQEvent* e)
{
if (obj == editor())
{
@@ -207,10 +207,10 @@ bool SpinBox::eventFilter(QObject* obj, QEvent* e)
bool shift = false;
switch (e->type())
{
- case QEvent::KeyPress:
+ case TQEvent::KeyPress:
{
// Up and down arrow keys step the value
- QKeyEvent* ke = (QKeyEvent*)e;
+ TQKeyEvent* ke = (TQKeyEvent*)e;
int key = ke->key();
if (key == Qt::Key_Up)
step = 1;
@@ -219,15 +219,15 @@ bool SpinBox::eventFilter(QObject* obj, QEvent* e)
shift = ((ke->state() & (Qt::ShiftButton | Qt::AltButton)) == Qt::ShiftButton);
break;
}
- case QEvent::Wheel:
+ case TQEvent::Wheel:
{
- QWheelEvent* we = (QWheelEvent*)e;
+ TQWheelEvent* we = (TQWheelEvent*)e;
step = (we->delta() > 0) ? 1 : -1;
shift = ((we->state() & (Qt::ShiftButton | Qt::AltButton)) == Qt::ShiftButton);
break;
}
#if KDE_IS_VERSION(3,1,90)
- case QEvent::Leave:
+ case TQEvent::Leave:
if (mEdited)
interpretText();
break;
@@ -259,10 +259,10 @@ bool SpinBox::eventFilter(QObject* obj, QEvent* e)
int etype = e->type(); // avoid switch compile warnings
switch (etype)
{
- case QEvent::MouseButtonPress:
- case QEvent::MouseButtonDblClick:
+ case TQEvent::MouseButtonPress:
+ case TQEvent::MouseButtonDblClick:
{
- QMouseEvent* me = (QMouseEvent*)e;
+ TQMouseEvent* me = (TQMouseEvent*)e;
if (me->button() == Qt::LeftButton)
{
// It's a left button press. Set normal or shift stepping as appropriate.
@@ -278,9 +278,9 @@ bool SpinBox::eventFilter(QObject* obj, QEvent* e)
}
break;
}
- case QEvent::MouseButtonRelease:
+ case TQEvent::MouseButtonRelease:
{
- QMouseEvent* me = (QMouseEvent*)e;
+ TQMouseEvent* me = (TQMouseEvent*)e;
if (me->button() == Qt::LeftButton && mShiftMouse)
{
setShiftStepping(false, mCurrentButton); // cancel shift stepping
@@ -288,9 +288,9 @@ bool SpinBox::eventFilter(QObject* obj, QEvent* e)
}
break;
}
- case QEvent::MouseMove:
+ case TQEvent::MouseMove:
{
- QMouseEvent* me = (QMouseEvent*)e;
+ TQMouseEvent* me = (TQMouseEvent*)e;
if (me->state() & Qt::LeftButton)
{
// The left button is down. Track which spin button it's in.
@@ -310,19 +310,19 @@ bool SpinBox::eventFilter(QObject* obj, QEvent* e)
}
break;
}
- case QEvent::Wheel:
+ case TQEvent::Wheel:
{
- QWheelEvent* we = (QWheelEvent*)e;
+ TQWheelEvent* we = (TQWheelEvent*)e;
bool shift = (we->state() & (Qt::ShiftButton | Qt::AltButton)) == Qt::ShiftButton;
if (setShiftStepping(shift, (we->delta() > 0 ? UP : DOWN)))
return true; // hide the event from the spin widget
return false; // forward event to the destination widget
}
- case QEvent::KeyPress:
- case QEvent::KeyRelease:
- case QEvent::AccelOverride: // this is needed to receive Shift presses!
+ case TQEvent::KeyPress:
+ case TQEvent::KeyRelease:
+ case TQEvent::AccelOverride: // this is needed to receive Shift presses!
{
- QKeyEvent* ke = (QKeyEvent*)e;
+ TQKeyEvent* ke = (TQKeyEvent*)e;
int key = ke->key();
int state = ke->state();
if ((state & Qt::LeftButton)
@@ -345,7 +345,7 @@ bool SpinBox::eventFilter(QObject* obj, QEvent* e)
}
}
}
- return QSpinBox::eventFilter(obj, e);
+ return TQSpinBox::eventFilter(obj, e);
}
/******************************************************************************
@@ -389,7 +389,7 @@ bool SpinBox::setShiftStepping(bool shift, int currentButton)
newval = mMinValue;
else
newval = (newval <= minval) ? minval : mMaxValue;
- QSpinBox::setValue(newval);
+ TQSpinBox::setValue(newval);
emit stepped(step);
return true;
}
@@ -399,12 +399,12 @@ bool SpinBox::setShiftStepping(bool shift, int currentButton)
int tempval = val + adjust;
if (tempval < mMinValue)
{
- QSpinBox::setMinValue(tempval);
+ TQSpinBox::setMinValue(tempval);
mShiftMinBound = true;
}
else if (tempval > mMaxValue)
{
- QSpinBox::setMaxValue(tempval);
+ TQSpinBox::setMaxValue(tempval);
mShiftMaxBound = true;
}
}
@@ -417,14 +417,14 @@ bool SpinBox::setShiftStepping(bool shift, int currentButton)
blockSignals(blocked);
mSuppressSignals = false;
}
- QSpinBox::setLineStep(mLineShiftStep);
+ TQSpinBox::setLineStep(mLineShiftStep);
}
else if (!shift && mShiftMouse)
{
// Reinstate to normal (non-shift) stepping
- QSpinBox::setLineStep(mLineStep);
- QSpinBox::setMinValue(mMinValue);
- QSpinBox::setMaxValue(mMaxValue);
+ TQSpinBox::setLineStep(mLineStep);
+ TQSpinBox::setMinValue(mMinValue);
+ TQSpinBox::setMaxValue(mMaxValue);
mShiftMinBound = mShiftMaxBound = false;
mShiftMouse = false;
}
@@ -466,7 +466,7 @@ int SpinBox::shiftStepAdjustment(int oldValue, int shiftStep)
/******************************************************************************
* Find which spin widget button a mouse event is in.
*/
-int SpinBox::whichButton(const QPoint& pos)
+int SpinBox::whichButton(const TQPoint& pos)
{
if (upRect().contains(pos))
return UP;
diff --git a/kalarm/lib/spinbox.h b/kalarm/lib/spinbox.h
index 0df910233..cf74e9deb 100644
--- a/kalarm/lib/spinbox.h
+++ b/kalarm/lib/spinbox.h
@@ -21,13 +21,13 @@
#ifndef SPINBOX_H
#define SPINBOX_H
-#include <qspinbox.h>
+#include <tqspinbox.h>
/**
* @short Spin box with accelerated shift key stepping and read-only option.
*
- * The SpinBox class provides a QSpinBox with accelerated stepping using the shift key.
+ * The SpinBox class provides a TQSpinBox with accelerated stepping using the shift key.
*
* A separate step increment may optionally be specified for use when the shift key is
* held down. Typically this would be larger than the normal step. Then, when the user
@@ -47,7 +47,7 @@ class SpinBox : public QSpinBox
* @param parent The parent object of this widget.
* @param name The name of this widget.
*/
- explicit SpinBox(QWidget* parent = 0, const char* name = 0);
+ explicit SpinBox(TQWidget* parent = 0, const char* name = 0);
/** Constructor.
* @param minValue The minimum value which the spin box can have.
* @param maxValue The maximum value which the spin box can have.
@@ -55,7 +55,7 @@ class SpinBox : public QSpinBox
* @param parent The parent object of this widget.
* @param name The name of this widget.
*/
- SpinBox(int minValue, int maxValue, int step = 1, QWidget* parent = 0, const char* name = 0);
+ SpinBox(int minValue, int maxValue, int step = 1, TQWidget* parent = 0, const char* name = 0);
/** Returns true if the widget is read only. */
bool isReadOnly() const { return mReadOnly; }
/** Sets whether the spin box can be changed by the user.
@@ -123,8 +123,8 @@ class SpinBox : public QSpinBox
*/
virtual int shiftStepAdjustment(int oldValue, int shiftStep);
/** Receives events destined for the spin widget or for the edit field. */
- virtual bool eventFilter(QObject*, QEvent*);
- /** Updates the contents of the embedded QLineEdit to reflect the current value
+ virtual bool eventFilter(TQObject*, TQEvent*);
+ /** Updates the contents of the embedded TQLineEdit to reflect the current value
* using mapValueToText(). Also enables/disables the up/down push buttons accordingly.
*/
virtual void updateDisplay();
@@ -134,7 +134,7 @@ class SpinBox : public QSpinBox
private:
void init();
void addValue(int change, bool current);
- int whichButton(const QPoint&);
+ int whichButton(const TQPoint&);
bool setShiftStepping(bool, int currentButton);
enum { NO_BUTTON, UP, DOWN };
diff --git a/kalarm/lib/spinbox2.cpp b/kalarm/lib/spinbox2.cpp
index 313d3eb56..48b88d51c 100644
--- a/kalarm/lib/spinbox2.cpp
+++ b/kalarm/lib/spinbox2.cpp
@@ -18,17 +18,17 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#include <qglobal.h>
+#include <tqglobal.h>
#include <stdlib.h>
-#include <qstyle.h>
-#include <qobjectlist.h>
-#include <qapplication.h>
-#include <qpixmap.h>
-#include <qcursor.h>
-#include <qtimer.h>
-#include <qwmatrix.h>
+#include <tqstyle.h>
+#include <tqobjectlist.h>
+#include <tqapplication.h>
+#include <tqpixmap.h>
+#include <tqcursor.h>
+#include <tqtimer.h>
+#include <tqwmatrix.h>
#include "spinbox2.moc"
#include "spinbox2private.moc"
@@ -43,29 +43,29 @@ static const char* mirrorStyles[] = {
"PlastikStyle",
0 // list terminator
};
-static bool mirrorStyle(const QStyle&);
+static bool mirrorStyle(const TQStyle&);
int SpinBox2::mReverseLayout = -1;
-SpinBox2::SpinBox2(QWidget* parent, const char* name)
- : QFrame(parent, name),
+SpinBox2::SpinBox2(TQWidget* parent, const char* name)
+ : TQFrame(parent, name),
mReverseWithLayout(true)
{
- mUpdown2Frame = new QFrame(this);
- mSpinboxFrame = new QFrame(this);
+ mUpdown2Frame = new TQFrame(this);
+ mSpinboxFrame = new TQFrame(this);
mUpdown2 = new ExtraSpinBox(mUpdown2Frame, "updown2");
// mSpinbox = new MainSpinBox(0, 1, 1, this, mSpinboxFrame);
mSpinbox = new MainSpinBox(this, mSpinboxFrame);
init();
}
-SpinBox2::SpinBox2(int minValue, int maxValue, int step, int step2, QWidget* parent, const char* name)
- : QFrame(parent, name),
+SpinBox2::SpinBox2(int minValue, int maxValue, int step, int step2, TQWidget* parent, const char* name)
+ : TQFrame(parent, name),
mReverseWithLayout(true)
{
- mUpdown2Frame = new QFrame(this);
- mSpinboxFrame = new QFrame(this);
+ mUpdown2Frame = new TQFrame(this);
+ mSpinboxFrame = new TQFrame(this);
mUpdown2 = new ExtraSpinBox(minValue, maxValue, step2, mUpdown2Frame, "updown2");
mSpinbox = new MainSpinBox(minValue, maxValue, step, this, mSpinboxFrame);
setSteps(step, step2);
@@ -75,7 +75,7 @@ SpinBox2::SpinBox2(int minValue, int maxValue, int step, int step2, QWidget* par
void SpinBox2::init()
{
if (mReverseLayout < 0)
- mReverseLayout = QApplication::reverseLayout() ? 1 : 0;
+ mReverseLayout = TQApplication::reverseLayout() ? 1 : 0;
mMinValue = mSpinbox->minValue();
mMaxValue = mSpinbox->maxValue();
mLineStep = mSpinbox->lineStep();
@@ -85,15 +85,15 @@ void SpinBox2::init()
mSpinbox->setSelectOnStep(false); // default
mUpdown2->setSelectOnStep(false); // always false
setFocusProxy(mSpinbox);
- mUpdown2->setFocusPolicy(QWidget::NoFocus);
+ mUpdown2->setFocusPolicy(TQWidget::NoFocus);
mSpinMirror = new SpinMirror(mUpdown2, mUpdown2Frame, this);
if (!mirrorStyle(style()))
mSpinMirror->hide(); // hide mirrored spin buttons when they are inappropriate
- connect(mSpinbox, SIGNAL(valueChanged(int)), SLOT(valueChange()));
- connect(mSpinbox, SIGNAL(valueChanged(int)), SIGNAL(valueChanged(int)));
- connect(mSpinbox, SIGNAL(valueChanged(const QString&)), SIGNAL(valueChanged(const QString&)));
- connect(mUpdown2, SIGNAL(stepped(int)), SLOT(stepPage(int)));
- connect(mUpdown2, SIGNAL(styleUpdated()), SLOT(updateMirror()));
+ connect(mSpinbox, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(valueChange()));
+ connect(mSpinbox, TQT_SIGNAL(valueChanged(int)), TQT_SIGNAL(valueChanged(int)));
+ connect(mSpinbox, TQT_SIGNAL(valueChanged(const TQString&)), TQT_SIGNAL(valueChanged(const TQString&)));
+ connect(mUpdown2, TQT_SIGNAL(stepped(int)), TQT_SLOT(stepPage(int)));
+ connect(mUpdown2, TQT_SIGNAL(styleUpdated()), TQT_SLOT(updateMirror()));
}
void SpinBox2::setReadOnly(bool ro)
@@ -118,7 +118,7 @@ void SpinBox2::setReverseWithLayout(bool reverse)
void SpinBox2::setEnabled(bool enabled)
{
- QFrame::setEnabled(enabled);
+ TQFrame::setEnabled(enabled);
updateMirror();
}
@@ -128,12 +128,12 @@ void SpinBox2::setWrapping(bool on)
mUpdown2->setWrapping(on);
}
-QRect SpinBox2::up2Rect() const
+TQRect SpinBox2::up2Rect() const
{
return mUpdown2->upRect();
}
-QRect SpinBox2::down2Rect() const
+TQRect SpinBox2::down2Rect() const
{
return mUpdown2->downRect();
}
@@ -179,7 +179,7 @@ void SpinBox2::setShiftSteps(int line, int page)
}
}
-void SpinBox2::setButtonSymbols(QSpinBox::ButtonSymbols newSymbols)
+void SpinBox2::setButtonSymbols(TQSpinBox::ButtonSymbols newSymbols)
{
if (mSpinbox->buttonSymbols() == newSymbols)
return;
@@ -220,28 +220,28 @@ void SpinBox2::valueChange()
* (At construction time, the spin button widths cannot be determined correctly,
* so we need to wait until now to definitively rearrange the widget.)
*/
-void SpinBox2::showEvent(QShowEvent*)
+void SpinBox2::showEvent(TQShowEvent*)
{
arrange();
}
-QSize SpinBox2::sizeHint() const
+TQSize SpinBox2::sizeHint() const
{
getMetrics();
- QSize size = mSpinbox->sizeHint();
+ TQSize size = mSpinbox->sizeHint();
size.setWidth(size.width() - xSpinbox + wUpdown2 + wGap);
return size;
}
-QSize SpinBox2::minimumSizeHint() const
+TQSize SpinBox2::minimumSizeHint() const
{
getMetrics();
- QSize size = mSpinbox->minimumSizeHint();
+ TQSize size = mSpinbox->minimumSizeHint();
size.setWidth(size.width() - xSpinbox + wUpdown2 + wGap);
return size;
}
-void SpinBox2::styleChange(QStyle&)
+void SpinBox2::styleChange(TQStyle&)
{
if (mirrorStyle(style()))
mSpinMirror->show(); // show rounded corners with Plastik etc.
@@ -256,7 +256,7 @@ void SpinBox2::styleChange(QStyle&)
*/
void SpinBox2::updateMirror()
{
- mSpinMirror->setNormalButtons(QPixmap::grabWidget(mUpdown2Frame, 0, 0));
+ mSpinMirror->setNormalButtons(TQPixmap::grabWidget(mUpdown2Frame, 0, 0));
}
/******************************************************************************
@@ -265,15 +265,15 @@ void SpinBox2::updateMirror()
void SpinBox2::arrange()
{
getMetrics();
- QRect arrowRect = QStyle::visualRect(QRect(0, 0, wUpdown2, height()), this);
+ TQRect arrowRect = TQStyle::visualRect(TQRect(0, 0, wUpdown2, height()), this);
mUpdown2Frame->setGeometry(arrowRect);
mUpdown2->setGeometry(-xUpdown2, 0, mUpdown2->width(), height());
- mSpinboxFrame->setGeometry(QStyle::visualRect(QRect(wUpdown2 + wGap, 0, width() - wUpdown2 - wGap, height()), this));
+ mSpinboxFrame->setGeometry(TQStyle::visualRect(TQRect(wUpdown2 + wGap, 0, width() - wUpdown2 - wGap, height()), this));
mSpinbox->setGeometry(-xSpinbox, 0, mSpinboxFrame->width() + xSpinbox, height());
mSpinMirror->resize(wUpdown2, mUpdown2->height());
mSpinMirror->setGeometry(arrowRect);
-//mSpinMirror->setGeometry(QStyle::visualRect(QRect(0, 11, wUpdown2, height()), this));
- mSpinMirror->setNormalButtons(QPixmap::grabWidget(mUpdown2Frame, 0, 0));
+//mSpinMirror->setGeometry(TQStyle::visualRect(TQRect(0, 11, wUpdown2, height()), this));
+ mSpinMirror->setNormalButtons(TQPixmap::grabWidget(mUpdown2Frame, 0, 0));
}
/******************************************************************************
@@ -282,16 +282,16 @@ void SpinBox2::arrange()
*/
void SpinBox2::getMetrics() const
{
- QRect rect = mUpdown2->style().querySubControlMetrics(QStyle::CC_SpinWidget, mUpdown2, QStyle::SC_SpinWidgetButtonField);
+ TQRect rect = mUpdown2->style().querySubControlMetrics(TQStyle::CC_SpinWidget, mUpdown2, TQStyle::SC_SpinWidgetButtonField);
if (style().inherits("PlastikStyle"))
rect.setLeft(rect.left() - 1); // Plastik excludes left border from spin widget rectangle
xUpdown2 = mReverseLayout ? 0 : rect.left();
wUpdown2 = mUpdown2->width() - rect.left();
- xSpinbox = mSpinbox->style().querySubControlMetrics(QStyle::CC_SpinWidget, mSpinbox, QStyle::SC_SpinWidgetEditField).left();
+ xSpinbox = mSpinbox->style().querySubControlMetrics(TQStyle::CC_SpinWidget, mSpinbox, TQStyle::SC_SpinWidgetEditField).left();
wGap = 0;
// Make style-specific adjustments for a better appearance
- if (style().inherits("QMotifPlusStyle"))
+ if (style().inherits("TQMotifPlusStyle"))
{
xSpinbox = 0; // show the edit control left border
wGap = 2; // leave a space to the right of the left-hand pair of spin buttons
@@ -334,7 +334,7 @@ void SpinBox2::stepPage(int step)
mSpinbox->selectAll();
// Make the covering arrows image show the pressed arrow
- mSpinMirror->redraw(QPixmap::grabWidget(mUpdown2Frame, 0, 0));
+ mSpinMirror->redraw(TQPixmap::grabWidget(mUpdown2Frame, 0, 0));
}
@@ -376,7 +376,7 @@ int SpinBox2::MainSpinBox::shiftStepAdjustment(int oldValue, int shiftStep)
* presumably reasonable assumption that when a style change occurs, the spin
* buttons are unpressed.
*/
-void ExtraSpinBox::paintEvent(QPaintEvent* e)
+void ExtraSpinBox::paintEvent(TQPaintEvent* e)
{
SpinBox::paintEvent(e);
if (mNewStylePending)
@@ -391,24 +391,24 @@ void ExtraSpinBox::paintEvent(QPaintEvent* e)
= Class SpinMirror
=============================================================================*/
-SpinMirror::SpinMirror(SpinBox* spinbox, QFrame* spinFrame, QWidget* parent, const char* name)
- : QCanvasView(new QCanvas, parent, name),
+SpinMirror::SpinMirror(SpinBox* spinbox, TQFrame* spinFrame, TQWidget* parent, const char* name)
+ : TQCanvasView(new TQCanvas, parent, name),
mSpinbox(spinbox),
mSpinFrame(spinFrame),
mReadOnly(false)
{
- setVScrollBarMode(QScrollView::AlwaysOff);
- setHScrollBarMode(QScrollView::AlwaysOff);
- setFrameStyle(QFrame::NoFrame);
+ setVScrollBarMode(TQScrollView::AlwaysOff);
+ setHScrollBarMode(TQScrollView::AlwaysOff);
+ setFrameStyle(TQFrame::NoFrame);
// Find the spin widget which is part of the spin box, in order to
// pass on its shift-button presses.
- QObjectList* spinwidgets = spinbox->queryList("QSpinWidget", 0, false, true);
+ TQObjectList* spinwidgets = spinbox->queryList("TQSpinWidget", 0, false, true);
mSpinWidget = (SpinBox*)spinwidgets->getFirst();
delete spinwidgets;
}
-void SpinMirror::setNormalButtons(const QPixmap& px)
+void SpinMirror::setNormalButtons(const TQPixmap& px)
{
mNormalButtons = px;
redraw(mNormalButtons);
@@ -416,12 +416,12 @@ void SpinMirror::setNormalButtons(const QPixmap& px)
void SpinMirror::redraw()
{
- redraw(QPixmap::grabWidget(mSpinFrame, 0, 0));
+ redraw(TQPixmap::grabWidget(mSpinFrame, 0, 0));
}
-void SpinMirror::redraw(const QPixmap& px)
+void SpinMirror::redraw(const TQPixmap& px)
{
- QCanvas* c = canvas();
+ TQCanvas* c = canvas();
c->setBackgroundPixmap(px);
c->setAllChanged();
c->update();
@@ -430,28 +430,28 @@ void SpinMirror::redraw(const QPixmap& px)
void SpinMirror::resize(int w, int h)
{
canvas()->resize(w, h);
- QCanvasView::resize(w, h);
+ TQCanvasView::resize(w, h);
resizeContents(w, h);
- setWorldMatrix(QWMatrix(-1, 0, 0, 1, w - 1, 0)); // mirror left to right
+ setWorldMatrix(TQWMatrix(-1, 0, 0, 1, w - 1, 0)); // mirror left to right
}
/******************************************************************************
* Pass on all mouse events to the spinbox which we're covering up.
*/
-void SpinMirror::contentsMouseEvent(QMouseEvent* e)
+void SpinMirror::contentsMouseEvent(TQMouseEvent* e)
{
if (mReadOnly)
return;
- QPoint pt = contentsToViewport(e->pos());
+ TQPoint pt = contentsToViewport(e->pos());
pt.setX(pt.x() + mSpinbox->upRect().left());
- QApplication::postEvent(mSpinWidget, new QMouseEvent(e->type(), pt, e->button(), e->state()));
+ TQApplication::postEvent(mSpinWidget, new TQMouseEvent(e->type(), pt, e->button(), e->state()));
// If the mouse button has been pressed or released, refresh the spin buttons
switch (e->type())
{
- case QEvent::MouseButtonPress:
- case QEvent::MouseButtonRelease:
- QTimer::singleShot(0, this, SLOT(redraw()));
+ case TQEvent::MouseButtonPress:
+ case TQEvent::MouseButtonRelease:
+ TQTimer::singleShot(0, this, TQT_SLOT(redraw()));
break;
default:
break;
@@ -461,36 +461,36 @@ void SpinMirror::contentsMouseEvent(QMouseEvent* e)
/******************************************************************************
* Pass on all mouse events to the spinbox which we're covering up.
*/
-void SpinMirror::contentsWheelEvent(QWheelEvent* e)
+void SpinMirror::contentsWheelEvent(TQWheelEvent* e)
{
if (mReadOnly)
return;
- QPoint pt = contentsToViewport(e->pos());
+ TQPoint pt = contentsToViewport(e->pos());
pt.setX(pt.x() + mSpinbox->upRect().left());
- QApplication::postEvent(mSpinWidget, new QWheelEvent(pt, e->delta(), e->state(), e->orientation()));
+ TQApplication::postEvent(mSpinWidget, new TQWheelEvent(pt, e->delta(), e->state(), e->orientation()));
}
/******************************************************************************
* Pass on to the main spinbox events which are needed to activate mouseover and
* other graphic effects when the mouse cursor enters and leaves the widget.
*/
-bool SpinMirror::event(QEvent* e)
+bool SpinMirror::event(TQEvent* e)
{
switch (e->type())
{
- case QEvent::Leave:
- case QEvent::Enter:
- QApplication::postEvent(mSpinWidget, new QEvent(e->type()));
- QTimer::singleShot(0, this, SLOT(redraw()));
+ case TQEvent::Leave:
+ case TQEvent::Enter:
+ TQApplication::postEvent(mSpinWidget, new TQEvent(e->type()));
+ TQTimer::singleShot(0, this, TQT_SLOT(redraw()));
break;
- case QEvent::FocusIn:
+ case TQEvent::FocusIn:
mSpinbox->setFocus();
- QTimer::singleShot(0, this, SLOT(redraw()));
+ TQTimer::singleShot(0, this, TQT_SLOT(redraw()));
break;
default:
break;
}
- return QCanvasView::event(e);
+ return TQCanvasView::event(e);
}
@@ -502,7 +502,7 @@ bool SpinMirror::event(QEvent* e)
* Determine whether the extra pair of spin buttons needs to be mirrored
* left-to-right in the specified style.
*/
-static bool mirrorStyle(const QStyle& style)
+static bool mirrorStyle(const TQStyle& style)
{
for (const char** s = mirrorStyles; *s; ++s)
if (style.inherits(*s))
diff --git a/kalarm/lib/spinbox2.h b/kalarm/lib/spinbox2.h
index 772eaee70..06a48d1af 100644
--- a/kalarm/lib/spinbox2.h
+++ b/kalarm/lib/spinbox2.h
@@ -21,8 +21,8 @@
#ifndef SPINBOX2_H
#define SPINBOX2_H
-#include <qglobal.h>
-#include <qlineedit.h>
+#include <tqglobal.h>
+#include <tqlineedit.h>
class SpinMirror;
class ExtraSpinBox;
@@ -61,7 +61,7 @@ class SpinBox2 : public QFrame
* @param parent The parent object of this widget.
* @param name The name of this widget.
*/
- explicit SpinBox2(QWidget* parent = 0, const char* name = 0);
+ explicit SpinBox2(TQWidget* parent = 0, const char* name = 0);
/** Constructor.
* @param minValue The minimum value which the spin box can have.
* @param maxValue The maximum value which the spin box can have.
@@ -71,7 +71,7 @@ class SpinBox2 : public QFrame
* @param name The name of this widget.
*/
SpinBox2(int minValue, int maxValue, int step = 1, int step2 = 1,
- QWidget* parent = 0, const char* name = 0);
+ TQWidget* parent = 0, const char* name = 0);
/** Sets whether the spin box can be changed by the user.
* @param readOnly True to set the widget read-only, false to set it read-write.
*/
@@ -88,22 +88,22 @@ class SpinBox2 : public QFrame
bool reverseButtons() const { return mReverseLayout && !mReverseWithLayout; }
/** Returns the spin box's text, including any prefix() and suffix(). */
- QString text() const { return mSpinbox->text(); }
+ TQString text() const { return mSpinbox->text(); }
/** Returns the prefix for the spin box's text. */
- virtual QString prefix() const { return mSpinbox->prefix(); }
+ virtual TQString prefix() const { return mSpinbox->prefix(); }
/** Returns the suffix for the spin box's text. */
- virtual QString suffix() const { return mSpinbox->suffix(); }
+ virtual TQString suffix() const { return mSpinbox->suffix(); }
/** Returns the spin box's text with no prefix(), suffix() or leading or trailing whitespace. */
- virtual QString cleanText() const { return mSpinbox->cleanText(); }
+ virtual TQString cleanText() const { return mSpinbox->cleanText(); }
/** Sets the special-value text which, if non-null, is displayed instead of a numeric
* value when the current value is equal to minValue().
*/
- virtual void setSpecialValueText(const QString& text) { mSpinbox->setSpecialValueText(text); }
+ virtual void setSpecialValueText(const TQString& text) { mSpinbox->setSpecialValueText(text); }
/** Returns the special-value text which, if non-null, is displayed instead of a numeric
* value when the current value is equal to minValue().
*/
- QString specialValueText() const { return mSpinbox->specialValueText(); }
+ TQString specialValueText() const { return mSpinbox->specialValueText(); }
/** Sets whether it is possible to step the value from the highest value to the
* lowest value and vice versa.
@@ -117,21 +117,21 @@ class SpinBox2 : public QFrame
/** Set the text alignment of the widget */
void setAlignment(int a) { mSpinbox->setAlignment(a); }
/** Sets the button symbols to use (arrows or plus/minus). */
- virtual void setButtonSymbols(QSpinBox::ButtonSymbols);
+ virtual void setButtonSymbols(TQSpinBox::ButtonSymbols);
/** Returns the button symbols currently in use (arrows or plus/minus). */
- QSpinBox::ButtonSymbols buttonSymbols() const { return mSpinbox->buttonSymbols(); }
+ TQSpinBox::ButtonSymbols buttonSymbols() const { return mSpinbox->buttonSymbols(); }
/** Sets the validator to @p v. The validator controls what keyboard input is accepted
* when the user is editing the value field.
*/
- virtual void setValidator(const QValidator* v) { mSpinbox->setValidator(v); }
+ virtual void setValidator(const TQValidator* v) { mSpinbox->setValidator(v); }
/** Returns the current validator. The validator controls what keyboard input is accepted
* when the user is editing the value field.
*/
- const QValidator* validator() const { return mSpinbox->validator(); }
+ const TQValidator* validator() const { return mSpinbox->validator(); }
- virtual QSize sizeHint() const;
- virtual QSize minimumSizeHint() const;
+ virtual TQSize sizeHint() const;
+ virtual TQSize minimumSizeHint() const;
/** Returns the minimum value of the spin box. */
int minValue() const { return mMinValue; }
@@ -149,13 +149,13 @@ class SpinBox2 : public QFrame
int bound(int val) const;
/** Returns the geometry of the right-hand "up" button. */
- QRect upRect() const { return mSpinbox->upRect(); }
+ TQRect upRect() const { return mSpinbox->upRect(); }
/** Returns the geometry of the right-hand "down" button. */
- QRect downRect() const { return mSpinbox->downRect(); }
+ TQRect downRect() const { return mSpinbox->downRect(); }
/** Returns the geometry of the left-hand "up" button. */
- QRect up2Rect() const;
+ TQRect up2Rect() const;
/** Returns the geometry of the left-hand "down" button. */
- QRect down2Rect() const;
+ TQRect down2Rect() const;
/** Returns the unshifted step increment for the right-hand spin buttons,
* i.e. the amount by which the spin box value changes when a right-hand
@@ -220,9 +220,9 @@ class SpinBox2 : public QFrame
/** Sets the current value to @p val. */
virtual void setValue(int val) { mSpinbox->setValue(val); }
/** Sets the prefix which is prepended to the start of the displayed text. */
- virtual void setPrefix(const QString& text) { mSpinbox->setPrefix(text); }
+ virtual void setPrefix(const TQString& text) { mSpinbox->setPrefix(text); }
/** Sets the suffix which is prepended to the start of the displayed text. */
- virtual void setSuffix(const QString& text) { mSpinbox->setSuffix(text); }
+ virtual void setSuffix(const TQString& text) { mSpinbox->setSuffix(text); }
/** Increments the current value by adding the unshifted step increment for
* the right-hand spin buttons.
*/
@@ -248,14 +248,14 @@ class SpinBox2 : public QFrame
/** Signal which is emitted whenever the value of the spin box changes. */
void valueChanged(int value);
/** Signal which is emitted whenever the value of the spin box changes. */
- void valueChanged(const QString& valueText);
+ void valueChanged(const TQString& valueText);
protected:
- virtual QString mapValueToText(int v) { return mSpinbox->mapValToText(v); }
+ virtual TQString mapValueToText(int v) { return mSpinbox->mapValToText(v); }
virtual int mapTextToValue(bool* ok) { return mSpinbox->mapTextToVal(ok); }
- virtual void resizeEvent(QResizeEvent*) { arrange(); }
- virtual void showEvent(QShowEvent*);
- virtual void styleChange(QStyle&);
+ virtual void resizeEvent(TQResizeEvent*) { arrange(); }
+ virtual void showEvent(TQShowEvent*);
+ virtual void styleChange(TQStyle&);
virtual void getMetrics() const;
mutable int wUpdown2; // width of second spin widget
@@ -273,7 +273,7 @@ class SpinBox2 : public QFrame
private:
void init();
void arrange();
- int whichButton(QObject* spinWidget, const QPoint&);
+ int whichButton(TQObject* spinWidget, const TQPoint&);
void setShiftStepping(bool on);
// Visible spin box class.
@@ -281,14 +281,14 @@ class SpinBox2 : public QFrame
class MainSpinBox : public SpinBox
{
public:
- MainSpinBox(SpinBox2* sb2, QWidget* parent, const char* name = 0)
+ MainSpinBox(SpinBox2* sb2, TQWidget* parent, const char* name = 0)
: SpinBox(parent, name), owner(sb2) { }
- MainSpinBox(int minValue, int maxValue, int step, SpinBox2* sb2, QWidget* parent, const char* name = 0)
+ MainSpinBox(int minValue, int maxValue, int step, SpinBox2* sb2, TQWidget* parent, const char* name = 0)
: SpinBox(minValue, maxValue, step, parent, name), owner(sb2) { }
void setAlignment(int a) { editor()->setAlignment(a); }
- virtual QString mapValueToText(int v) { return owner->mapValueToText(v); }
+ virtual TQString mapValueToText(int v) { return owner->mapValueToText(v); }
virtual int mapTextToValue(bool* ok) { return owner->mapTextToValue(ok); }
- QString mapValToText(int v) { return SpinBox::mapValueToText(v); }
+ TQString mapValToText(int v) { return SpinBox::mapValueToText(v); }
int mapTextToVal(bool* ok) { return SpinBox::mapTextToValue(ok); }
virtual int shiftStepAdjustment(int oldValue, int shiftStep);
private:
@@ -298,8 +298,8 @@ class SpinBox2 : public QFrame
enum { NO_BUTTON = -1, UP, DOWN, UP2, DOWN2 };
static int mReverseLayout; // widgets are mirrored right to left
- QFrame* mUpdown2Frame; // contains visible part of the extra pair of spin buttons
- QFrame* mSpinboxFrame; // contains the main spin box
+ TQFrame* mUpdown2Frame; // contains visible part of the extra pair of spin buttons
+ TQFrame* mSpinboxFrame; // contains the main spin box
ExtraSpinBox* mUpdown2; // the extra pair of spin buttons
MainSpinBox* mSpinbox; // the visible spin box
SpinMirror* mSpinMirror; // image of the extra pair of spin buttons
diff --git a/kalarm/lib/spinbox2private.h b/kalarm/lib/spinbox2private.h
index 74fbeb66c..682c84b8d 100644
--- a/kalarm/lib/spinbox2private.h
+++ b/kalarm/lib/spinbox2private.h
@@ -21,7 +21,7 @@
#ifndef SPINBOX2PRIVATE_H
#define SPINBOX2PRIVATE_H
-#include <qcanvas.h>
+#include <tqcanvas.h>
#include "spinbox.h"
@@ -35,15 +35,15 @@ class ExtraSpinBox : public SpinBox
{
Q_OBJECT
public:
- explicit ExtraSpinBox(QWidget* parent, const char* name = 0)
+ explicit ExtraSpinBox(TQWidget* parent, const char* name = 0)
: SpinBox(parent, name), mNewStylePending(false) { }
- ExtraSpinBox(int minValue, int maxValue, int step, QWidget* parent, const char* name = 0)
+ ExtraSpinBox(int minValue, int maxValue, int step, TQWidget* parent, const char* name = 0)
: SpinBox(minValue, maxValue, step, parent, name), mNewStylePending(false) { }
signals:
void styleUpdated();
protected:
- virtual void paintEvent(QPaintEvent*);
- virtual void styleChange(QStyle&) { mNewStylePending = true; }
+ virtual void paintEvent(TQPaintEvent*);
+ virtual void styleChange(TQStyle&) { mNewStylePending = true; }
private:
bool mNewStylePending; // style has changed, but not yet repainted
};
@@ -61,31 +61,31 @@ class SpinMirror : public QCanvasView
{
Q_OBJECT
public:
- explicit SpinMirror(SpinBox*, QFrame* spinFrame, QWidget* parent = 0, const char* name = 0);
+ explicit SpinMirror(SpinBox*, TQFrame* spinFrame, TQWidget* parent = 0, const char* name = 0);
void setReadOnly(bool ro) { mReadOnly = ro; }
bool isReadOnly() const { return mReadOnly; }
- void setNormalButtons(const QPixmap&);
- void redraw(const QPixmap&);
+ void setNormalButtons(const TQPixmap&);
+ void redraw(const TQPixmap&);
public slots:
virtual void resize(int w, int h);
void redraw();
protected:
- virtual void contentsMousePressEvent(QMouseEvent* e) { contentsMouseEvent(e); }
- virtual void contentsMouseReleaseEvent(QMouseEvent* e) { contentsMouseEvent(e); }
- virtual void contentsMouseMoveEvent(QMouseEvent* e) { contentsMouseEvent(e); }
- virtual void contentsMouseDoubleClickEvent(QMouseEvent* e) { contentsMouseEvent(e); }
- virtual void contentsWheelEvent(QWheelEvent*);
- virtual bool event(QEvent*);
+ virtual void contentsMousePressEvent(TQMouseEvent* e) { contentsMouseEvent(e); }
+ virtual void contentsMouseReleaseEvent(TQMouseEvent* e) { contentsMouseEvent(e); }
+ virtual void contentsMouseMoveEvent(TQMouseEvent* e) { contentsMouseEvent(e); }
+ virtual void contentsMouseDoubleClickEvent(TQMouseEvent* e) { contentsMouseEvent(e); }
+ virtual void contentsWheelEvent(TQWheelEvent*);
+ virtual bool event(TQEvent*);
private:
- void contentsMouseEvent(QMouseEvent*);
+ void contentsMouseEvent(TQMouseEvent*);
SpinBox* mSpinbox; // spinbox whose spin buttons are being mirrored
- QFrame* mSpinFrame; // widget containing mSpinbox's spin buttons
- QWidget* mSpinWidget; // spin buttons in mSpinbox
- QPixmap mNormalButtons; // image of spin buttons in unpressed state
+ TQFrame* mSpinFrame; // widget containing mSpinbox's spin buttons
+ TQWidget* mSpinWidget; // spin buttons in mSpinbox
+ TQPixmap mNormalButtons; // image of spin buttons in unpressed state
bool mReadOnly; // value cannot be changed
};
diff --git a/kalarm/lib/synchtimer.cpp b/kalarm/lib/synchtimer.cpp
index 1b681d6eb..eecef7d4b 100644
--- a/kalarm/lib/synchtimer.cpp
+++ b/kalarm/lib/synchtimer.cpp
@@ -19,7 +19,7 @@
*/
#include "kalarm.h"
-#include <qtimer.h>
+#include <tqtimer.h>
#include <kdebug.h>
#include "synchtimer.moc"
@@ -31,7 +31,7 @@
SynchTimer::SynchTimer()
{
- mTimer = new QTimer(this, "mTimer");
+ mTimer = new TQTimer(this, "mTimer");
}
SynchTimer::~SynchTimer()
@@ -43,16 +43,16 @@ SynchTimer::~SynchTimer()
/******************************************************************************
* Connect to the timer. The timer is started if necessary.
*/
-void SynchTimer::connecT(QObject* receiver, const char* member)
+void SynchTimer::connecT(TQObject* receiver, const char* member)
{
Connection connection(receiver, member);
if (mConnections.find(connection) != mConnections.end())
return; // the slot is already connected, so ignore request
- connect(mTimer, SIGNAL(timeout()), receiver, member);
+ connect(mTimer, TQT_SIGNAL(timeout()), receiver, member);
mConnections.append(connection);
if (!mTimer->isActive())
{
- connect(mTimer, SIGNAL(timeout()), this, SLOT(slotTimer()));
+ connect(mTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotTimer()));
start();
}
}
@@ -60,7 +60,7 @@ void SynchTimer::connecT(QObject* receiver, const char* member)
/******************************************************************************
* Disconnect from the timer. The timer is stopped if no longer needed.
*/
-void SynchTimer::disconnecT(QObject* receiver, const char* member)
+void SynchTimer::disconnecT(TQObject* receiver, const char* member)
{
if (mTimer)
{
@@ -69,7 +69,7 @@ void SynchTimer::disconnecT(QObject* receiver, const char* member)
mConnections.remove(Connection(receiver, member));
else
{
- for (QValueList<Connection>::Iterator it = mConnections.begin(); it != mConnections.end(); )
+ for (TQValueList<Connection>::Iterator it = mConnections.begin(); it != mConnections.end(); )
{
if ((*it).receiver == receiver)
it = mConnections.remove(it);
@@ -109,7 +109,7 @@ MinuteTimer* MinuteTimer::instance()
void MinuteTimer::slotTimer()
{
kdDebug(5950) << "MinuteTimer::slotTimer()" << endl;
- int interval = 62 - QTime::currentTime().second();
+ int interval = 62 - TQTime::currentTime().second();
mTimer->start(interval * 1000, true); // execute a single shot
}
@@ -119,9 +119,9 @@ void MinuteTimer::slotTimer()
= Application-wide timer synchronised to midnight.
=============================================================================*/
-QValueList<DailyTimer*> DailyTimer::mFixedTimers;
+TQValueList<DailyTimer*> DailyTimer::mFixedTimers;
-DailyTimer::DailyTimer(const QTime& timeOfDay, bool fixed)
+DailyTimer::DailyTimer(const TQTime& timeOfDay, bool fixed)
: mTime(timeOfDay),
mFixed(fixed)
{
@@ -135,9 +135,9 @@ DailyTimer::~DailyTimer()
mFixedTimers.remove(this);
}
-DailyTimer* DailyTimer::fixedInstance(const QTime& timeOfDay, bool create)
+DailyTimer* DailyTimer::fixedInstance(const TQTime& timeOfDay, bool create)
{
- for (QValueList<DailyTimer*>::Iterator it = mFixedTimers.begin(); it != mFixedTimers.end(); ++it)
+ for (TQValueList<DailyTimer*>::Iterator it = mFixedTimers.begin(); it != mFixedTimers.end(); ++it)
if ((*it)->mTime == timeOfDay)
return *it;
return create ? new DailyTimer(timeOfDay, true) : 0;
@@ -147,7 +147,7 @@ DailyTimer* DailyTimer::fixedInstance(const QTime& timeOfDay, bool create)
* Disconnect from the timer signal which triggers at the given fixed time of day.
* If there are no remaining connections to that timer, it is destroyed.
*/
-void DailyTimer::disconnect(const QTime& timeOfDay, QObject* receiver, const char* member)
+void DailyTimer::disconnect(const TQTime& timeOfDay, TQObject* receiver, const char* member)
{
DailyTimer* timer = fixedInstance(timeOfDay, false);
if (!timer)
@@ -160,7 +160,7 @@ void DailyTimer::disconnect(const QTime& timeOfDay, QObject* receiver, const cha
/******************************************************************************
* Change the time at which the variable timer triggers.
*/
-void DailyTimer::changeTime(const QTime& newTimeOfDay, bool triggerMissed)
+void DailyTimer::changeTime(const TQTime& newTimeOfDay, bool triggerMissed)
{
if (mFixed)
return;
@@ -170,7 +170,7 @@ void DailyTimer::changeTime(const QTime& newTimeOfDay, bool triggerMissed)
bool triggerNow = false;
if (triggerMissed)
{
- QTime now = QTime::currentTime();
+ TQTime now = TQTime::currentTime();
if (now >= newTimeOfDay && now < mTime)
{
// The trigger time is now earlier and it has already arrived today.
@@ -196,7 +196,7 @@ void DailyTimer::changeTime(const QTime& newTimeOfDay, bool triggerMissed)
void DailyTimer::start()
{
// TIMEZONE = local time
- QDateTime now = QDateTime::currentDateTime();
+ TQDateTime now = TQDateTime::currentDateTime();
// Find out whether to trigger today or tomorrow.
// In preference, use the last trigger date to determine this, since
// that will avoid possible errors due to daylight savings time changes.
@@ -205,11 +205,11 @@ void DailyTimer::start()
today = (mLastDate < now.date());
else
today = (now.time() < mTime);
- QDateTime next;
+ TQDateTime next;
if (today)
- next = QDateTime(now.date(), mTime);
+ next = TQDateTime(now.date(), mTime);
else
- next = QDateTime(now.date().addDays(1), mTime);
+ next = TQDateTime(now.date().addDays(1), mTime);
uint interval = next.toTime_t() - now.toTime_t();
mTimer->start(interval * 1000, true); // execute a single shot
kdDebug(5950) << "DailyTimer::start(at " << mTime.hour() << ":" << mTime.minute() << "): interval = " << interval/3600 << ":" << (interval/60)%60 << ":" << interval%60 << endl;
@@ -224,9 +224,9 @@ void DailyTimer::start()
void DailyTimer::slotTimer()
{
// TIMEZONE = local time
- QDateTime now = QDateTime::currentDateTime();
+ TQDateTime now = TQDateTime::currentDateTime();
mLastDate = now.date();
- QDateTime next = QDateTime(mLastDate.addDays(1), mTime);
+ TQDateTime next = TQDateTime(mLastDate.addDays(1), mTime);
uint interval = next.toTime_t() - now.toTime_t();
mTimer->start(interval * 1000, true); // execute a single shot
kdDebug(5950) << "DailyTimer::slotTimer(at " << mTime.hour() << ":" << mTime.minute() << "): interval = " << interval/3600 << ":" << (interval/60)%60 << ":" << interval%60 << endl;
diff --git a/kalarm/lib/synchtimer.h b/kalarm/lib/synchtimer.h
index 551fd1687..1860815e7 100644
--- a/kalarm/lib/synchtimer.h
+++ b/kalarm/lib/synchtimer.h
@@ -23,10 +23,10 @@
/* @file synchtimer.h - timers which synchronise to time boundaries */
-#include <qobject.h>
-#include <qvaluelist.h>
-#include <qcstring.h>
-#include <qdatetime.h>
+#include <tqobject.h>
+#include <tqvaluelist.h>
+#include <tqcstring.h>
+#include <tqdatetime.h>
class QTimer;
/** SynchTimer is a virtual base class for application-wide timers synchronised
@@ -43,29 +43,29 @@ class SynchTimer : public QObject
struct Connection
{
Connection() { }
- Connection(QObject* r, const char* s) : receiver(r), slot(s) { }
+ Connection(TQObject* r, const char* s) : receiver(r), slot(s) { }
bool operator==(const Connection& c) const { return receiver == c.receiver && slot == c.slot; }
- QObject* receiver;
- const QCString slot;
+ TQObject* receiver;
+ const TQCString slot;
};
protected:
SynchTimer();
virtual void start() = 0;
- void connecT(QObject* receiver, const char* member);
- void disconnecT(QObject* receiver, const char* member = 0);
+ void connecT(TQObject* receiver, const char* member);
+ void disconnecT(TQObject* receiver, const char* member = 0);
bool hasConnections() const { return !mConnections.isEmpty(); }
- QTimer* mTimer;
+ TQTimer* mTimer;
protected slots:
virtual void slotTimer() = 0;
private slots:
- void slotReceiverGone(QObject* r) { disconnecT(r); }
+ void slotReceiverGone(TQObject* r) { disconnecT(r); }
private:
SynchTimer(const SynchTimer&); // prohibit copying
- QValueList<Connection> mConnections; // list of current clients
+ TQValueList<Connection> mConnections; // list of current clients
};
@@ -82,14 +82,14 @@ class MinuteTimer : public SynchTimer
* @param receiver Receiving object.
* @param member Slot to activate.
*/
- static void connect(QObject* receiver, const char* member)
+ static void connect(TQObject* receiver, const char* member)
{ instance()->connecT(receiver, member); }
/** Disconnect from the timer signal.
* @param receiver Receiving object.
* @param member Slot to disconnect. If null, all slots belonging to
* @p receiver will be disconnected.
*/
- static void disconnect(QObject* receiver, const char* member = 0)
+ static void disconnect(TQObject* receiver, const char* member = 0)
{ if (mInstance) mInstance->disconnecT(receiver, member); }
protected:
@@ -123,7 +123,7 @@ class DailyTimer : public SynchTimer
* @param receiver Receiving object.
* @param member Slot to activate.
*/
- static void connect(const QTime& timeOfDay, QObject* receiver, const char* member)
+ static void connect(const TQTime& timeOfDay, TQObject* receiver, const char* member)
{ fixedInstance(timeOfDay)->connecT(receiver, member); }
/** Disconnect from the timer signal which triggers at the given fixed time of day.
* If there are no remaining connections to that timer, it is destroyed.
@@ -132,16 +132,16 @@ class DailyTimer : public SynchTimer
* @param member Slot to disconnect. If null, all slots belonging to
* @p receiver will be disconnected.
*/
- static void disconnect(const QTime& timeOfDay, QObject* receiver, const char* member = 0);
+ static void disconnect(const TQTime& timeOfDay, TQObject* receiver, const char* member = 0);
/** Change the time at which this variable timer triggers.
* @param newTimeOfDay New time at which the timer should trigger.
* @param triggerMissed If true, and if @p newTimeOfDay < @p oldTimeOfDay, and if the current
* time is between @p newTimeOfDay and @p oldTimeOfDay, the timer will be
* triggered immediately so as to avoid missing today's trigger.
*/
- void changeTime(const QTime& newTimeOfDay, bool triggerMissed = true);
+ void changeTime(const TQTime& newTimeOfDay, bool triggerMissed = true);
/** Return the current time of day at which this variable timer triggers. */
- QTime timeOfDay() const { return mTime; }
+ TQTime timeOfDay() const { return mTime; }
protected:
/** Construct an instance.
@@ -149,7 +149,7 @@ class DailyTimer : public SynchTimer
* can construct instances. This ensures that multiple timers are not created for the same
* use.
*/
- DailyTimer(const QTime&, bool fixed);
+ DailyTimer(const TQTime&, bool fixed);
/** Return the instance which triggers at the specified fixed time of day,
* optionally creating a new instance if necessary.
* @param timeOfDay Time at which the timer triggers.
@@ -157,16 +157,16 @@ class DailyTimer : public SynchTimer
* for @p timeOfDay.
* @return The instance for @p timeOfDay, or 0 if it does not exist.
*/
- static DailyTimer* fixedInstance(const QTime& timeOfDay, bool create = true);
+ static DailyTimer* fixedInstance(const TQTime& timeOfDay, bool create = true);
virtual void start();
protected slots:
virtual void slotTimer();
private:
- static QValueList<DailyTimer*> mFixedTimers; // list of timers whose trigger time is fixed
- QTime mTime;
- QDate mLastDate; // the date on which the timer was last triggered
+ static TQValueList<DailyTimer*> mFixedTimers; // list of timers whose trigger time is fixed
+ TQTime mTime;
+ TQDate mLastDate; // the date on which the timer was last triggered
bool mFixed; // the time at which the timer triggers cannot be changed
};
@@ -182,15 +182,15 @@ class MidnightTimer
* @param receiver Receiving object.
* @param member Slot to activate.
*/
- static void connect(QObject* receiver, const char* member)
- { DailyTimer::connect(QTime(0,0), receiver, member); }
+ static void connect(TQObject* receiver, const char* member)
+ { DailyTimer::connect(TQTime(0,0), receiver, member); }
/** Disconnect from the timer signal.
* @param receiver Receiving object.
* @param member Slot to disconnect. If null, all slots belonging to
* @p receiver will be disconnected.
*/
- static void disconnect(QObject* receiver, const char* member = 0)
- { DailyTimer::disconnect(QTime(0,0), receiver, member); }
+ static void disconnect(TQObject* receiver, const char* member = 0)
+ { DailyTimer::disconnect(TQTime(0,0), receiver, member); }
};
diff --git a/kalarm/lib/timeedit.cpp b/kalarm/lib/timeedit.cpp
index 8aabb90b6..01152fcee 100644
--- a/kalarm/lib/timeedit.cpp
+++ b/kalarm/lib/timeedit.cpp
@@ -28,8 +28,8 @@
#include "timeedit.moc"
-TimeEdit::TimeEdit(QWidget* parent, const char* name)
- : QHBox(parent, name),
+TimeEdit::TimeEdit(TQWidget* parent, const char* name)
+ : TQHBox(parent, name),
mAmPm(0),
mAmIndex(-1),
mPmIndex(-1),
@@ -38,13 +38,13 @@ TimeEdit::TimeEdit(QWidget* parent, const char* name)
bool use12hour = KGlobal::locale()->use12Clock();
mSpinBox = new TimeSpinBox(!use12hour, this);
mSpinBox->setFixedSize(mSpinBox->sizeHint());
- connect(mSpinBox, SIGNAL(valueChanged(int)), SLOT(slotValueChanged(int)));
+ connect(mSpinBox, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(slotValueChanged(int)));
if (use12hour)
{
mAmPm = new ComboBox(this);
setAmPmCombo(1, 1); // add "am" and "pm" options to the combo box
mAmPm->setFixedSize(mAmPm->sizeHint());
- connect(mAmPm, SIGNAL(highlighted(int)), SLOT(slotAmPmChanged(int)));
+ connect(mAmPm, TQT_SIGNAL(highlighted(int)), TQT_SLOT(slotAmPmChanged(int)));
}
}
diff --git a/kalarm/lib/timeedit.h b/kalarm/lib/timeedit.h
index 5888c7665..9cbfb6f8c 100644
--- a/kalarm/lib/timeedit.h
+++ b/kalarm/lib/timeedit.h
@@ -21,8 +21,8 @@
#ifndef TIMEEDIT_H
#define TIMEEDIT_H
-#include <qdatetime.h>
-#include <qhbox.h>
+#include <tqdatetime.h>
+#include <tqhbox.h>
class ComboBox;
class TimeSpinBox;
@@ -55,7 +55,7 @@ class TimeEdit : public QHBox
* @param parent The parent object of this widget.
* @param name The name of this widget.
*/
- explicit TimeEdit(QWidget* parent = 0, const char* name = 0);
+ explicit TimeEdit(TQWidget* parent = 0, const char* name = 0);
/** Returns true if the widget is read only. */
bool isReadOnly() const { return mReadOnly; }
/** Sets whether the widget is read-only for the user. If read-only,
@@ -74,8 +74,8 @@ class TimeEdit : public QHBox
void setValid(bool valid);
/** Returns the entered time as a value in minutes. */
int value() const;
- /** Returns the entered time as a QTime value. */
- QTime time() const { int m = value(); return QTime(m/60, m%60); }
+ /** Returns the entered time as a TQTime value. */
+ TQTime time() const { int m = value(); return TQTime(m/60, m%60); }
/** Returns true if it is possible to step the value from the highest value to the lowest value and vice versa. */
bool wrapping() const;
/** Sets whether it is possible to step the value from the highest value to the lowest value and vice versa.
@@ -86,19 +86,19 @@ class TimeEdit : public QHBox
int minValue() const;
/** Returns the maximum value of the widget in minutes. */
int maxValue() const;
- /** Returns the maximum value of the widget as a QTime value. */
- QTime maxTime() const { int mv = maxValue(); return QTime(mv/60, mv%60); }
+ /** Returns the maximum value of the widget as a TQTime value. */
+ TQTime maxTime() const { int mv = maxValue(); return TQTime(mv/60, mv%60); }
/** Sets the minimum value of the widget. */
void setMinValue(int minutes);
/** Sets the maximum value of the widget. */
void setMaxValue(int minutes);
/** Sets the maximum value of the widget. */
- void setMaxValue(const QTime& time) { setMaxValue(time.hour()*60 + time.minute()); }
+ void setMaxValue(const TQTime& time) { setMaxValue(time.hour()*60 + time.minute()); }
public slots:
/** Sets the value of the widget. */
virtual void setValue(int minutes);
/** Sets the value of the widget. */
- void setValue(const QTime& t) { setValue(t.hour()*60 + t.minute()); }
+ void setValue(const TQTime& t) { setValue(t.hour()*60 + t.minute()); }
signals:
/** This signal is emitted every time the value of the widget changes
* (for whatever reason).
diff --git a/kalarm/lib/timeperiod.cpp b/kalarm/lib/timeperiod.cpp
index 22a7c3179..e372615a7 100644
--- a/kalarm/lib/timeperiod.cpp
+++ b/kalarm/lib/timeperiod.cpp
@@ -20,8 +20,8 @@
#include "kalarm.h"
-#include <qwidgetstack.h>
-#include <qwhatsthis.h>
+#include <tqwidgetstack.h>
+#include <tqwhatsthis.h>
#include <klocale.h>
#include <kdialog.h>
@@ -34,14 +34,14 @@
// Collect these widget labels together to ensure consistent wording and
// translations across different modules.
-QString TimePeriod::i18n_minutes() { return i18n("minutes"); }
-QString TimePeriod::i18n_Minutes() { return i18n("Minutes"); }
-QString TimePeriod::i18n_hours_mins() { return i18n("hours/minutes"); }
-QString TimePeriod::i18n_Hours_Mins() { return i18n("Hours/Minutes"); }
-QString TimePeriod::i18n_days() { return i18n("days"); }
-QString TimePeriod::i18n_Days() { return i18n("Days"); }
-QString TimePeriod::i18n_weeks() { return i18n("weeks"); }
-QString TimePeriod::i18n_Weeks() { return i18n("Weeks"); }
+TQString TimePeriod::i18n_minutes() { return i18n("minutes"); }
+TQString TimePeriod::i18n_Minutes() { return i18n("Minutes"); }
+TQString TimePeriod::i18n_hours_mins() { return i18n("hours/minutes"); }
+TQString TimePeriod::i18n_Hours_Mins() { return i18n("Hours/Minutes"); }
+TQString TimePeriod::i18n_days() { return i18n("days"); }
+TQString TimePeriod::i18n_Days() { return i18n("Days"); }
+TQString TimePeriod::i18n_weeks() { return i18n("weeks"); }
+TQString TimePeriod::i18n_Weeks() { return i18n("Weeks"); }
static const int maxMinutes = 1000*60-1; // absolute maximum value for hours:minutes = 999H59M
@@ -50,25 +50,25 @@ static const int maxMinutes = 1000*60-1; // absolute maximum value for hours:m
= Contains a time unit combo box, plus a time spinbox, to select a time period.
=============================================================================*/
-TimePeriod::TimePeriod(bool allowHourMinute, QWidget* parent, const char* name)
- : QHBox(parent, name),
+TimePeriod::TimePeriod(bool allowHourMinute, TQWidget* parent, const char* name)
+ : TQHBox(parent, name),
mMaxDays(9999),
mNoHourMinute(!allowHourMinute),
mReadOnly(false)
{
setSpacing(KDialog::spacingHint());
- mSpinStack = new QWidgetStack(this);
+ mSpinStack = new TQWidgetStack(this);
mSpinBox = new SpinBox(mSpinStack);
mSpinBox->setLineStep(1);
mSpinBox->setLineShiftStep(10);
mSpinBox->setRange(1, mMaxDays);
- connect(mSpinBox, SIGNAL(valueChanged(int)), SLOT(slotDaysChanged(int)));
+ connect(mSpinBox, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(slotDaysChanged(int)));
mSpinStack->addWidget(mSpinBox, 0);
mTimeSpinBox = new TimeSpinBox(0, 99999, mSpinStack);
mTimeSpinBox->setRange(1, maxMinutes); // max 999H59M
- connect(mTimeSpinBox, SIGNAL(valueChanged(int)), SLOT(slotTimeChanged(int)));
+ connect(mTimeSpinBox, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(slotTimeChanged(int)));
mSpinStack->addWidget(mTimeSpinBox, 1);
mSpinStack->setFixedSize(mSpinBox->sizeHint().expandedTo(mTimeSpinBox->sizeHint()));
@@ -88,7 +88,7 @@ TimePeriod::TimePeriod(bool allowHourMinute, QWidget* parent, const char* name)
mUnitsCombo->insertItem(i18n_weeks());
mMaxUnitShown = WEEKS;
mUnitsCombo->setFixedSize(mUnitsCombo->sizeHint());
- connect(mUnitsCombo, SIGNAL(activated(int)), SLOT(slotUnitsSelected(int)));
+ connect(mUnitsCombo, TQT_SIGNAL(activated(int)), TQT_SLOT(slotUnitsSelected(int)));
setFocusProxy(mUnitsCombo);
setTabOrder(mUnitsCombo, mSpinStack);
@@ -376,9 +376,9 @@ void TimePeriod::showHourMin(bool hourMinute)
* If the hours:minutes text is omitted, both spinboxes are set to the same
* WhatsThis text.
*/
-void TimePeriod::setWhatsThis(const QString& units, const QString& dayWeek, const QString& hourMin)
+void TimePeriod::setWhatsThis(const TQString& units, const TQString& dayWeek, const TQString& hourMin)
{
- QWhatsThis::add(mUnitsCombo, units);
- QWhatsThis::add(mSpinBox, dayWeek);
- QWhatsThis::add(mTimeSpinBox, (hourMin.isNull() ? dayWeek : hourMin));
+ TQWhatsThis::add(mUnitsCombo, units);
+ TQWhatsThis::add(mSpinBox, dayWeek);
+ TQWhatsThis::add(mTimeSpinBox, (hourMin.isNull() ? dayWeek : hourMin));
}
diff --git a/kalarm/lib/timeperiod.h b/kalarm/lib/timeperiod.h
index ef1a3b5c3..2f9513dcd 100644
--- a/kalarm/lib/timeperiod.h
+++ b/kalarm/lib/timeperiod.h
@@ -21,8 +21,8 @@
#ifndef TIMEPERIOD_H
#define TIMEPERIOD_H
-#include <qhbox.h>
-#include <qstring.h>
+#include <tqhbox.h>
+#include <tqstring.h>
class QWidgetStack;
class ComboBox;
@@ -67,7 +67,7 @@ class TimePeriod : public QHBox
* @param parent The parent object of this widget.
* @param name The name of this widget.
*/
- TimePeriod(bool allowMinute, QWidget* parent, const char* name = 0);
+ TimePeriod(bool allowMinute, TQWidget* parent, const char* name = 0);
/** Returns true if the widget is read only. */
bool isReadOnly() const { return mReadOnly; }
/** Sets whether the widget is read-only for the user. If read-only,
@@ -103,16 +103,16 @@ class TimePeriod : public QHBox
/** Sets separate WhatsThis texts for the count spin boxes and the units combo box.
* If @p hourMin is omitted, both spin boxes are set to the same WhatsThis text.
*/
- void setWhatsThis(const QString& units, const QString& dayWeek, const QString& hourMin = QString::null);
+ void setWhatsThis(const TQString& units, const TQString& dayWeek, const TQString& hourMin = TQString::null);
- static QString i18n_minutes(); // text of 'minutes' units, lower case
- static QString i18n_Minutes(); // text of 'Minutes' units, initial capitals
- static QString i18n_hours_mins(); // text of 'hours/minutes' units, lower case
- static QString i18n_Hours_Mins(); // text of 'Hours/Minutes' units, initial capitals
- static QString i18n_days(); // text of 'days' units, lower case
- static QString i18n_Days(); // text of 'Days' units, initial capital
- static QString i18n_weeks(); // text of 'weeks' units, lower case
- static QString i18n_Weeks(); // text of 'Weeks' units, initial capital
+ static TQString i18n_minutes(); // text of 'minutes' units, lower case
+ static TQString i18n_Minutes(); // text of 'Minutes' units, initial capitals
+ static TQString i18n_hours_mins(); // text of 'hours/minutes' units, lower case
+ static TQString i18n_Hours_Mins(); // text of 'Hours/Minutes' units, initial capitals
+ static TQString i18n_days(); // text of 'days' units, lower case
+ static TQString i18n_Days(); // text of 'Days' units, initial capital
+ static TQString i18n_weeks(); // text of 'weeks' units, lower case
+ static TQString i18n_Weeks(); // text of 'Weeks' units, initial capital
signals:
/** This signal is emitted whenever the value held in the widget changes.
@@ -131,7 +131,7 @@ class TimePeriod : public QHBox
void showHourMin(bool hourMin);
void adjustDayWeekShown();
- QWidgetStack* mSpinStack; // displays either the days/weeks or hours:minutes spinbox
+ TQWidgetStack* mSpinStack; // displays either the days/weeks or hours:minutes spinbox
SpinBox* mSpinBox; // the minutes/days/weeks value spinbox
TimeSpinBox* mTimeSpinBox; // the hours:minutes value spinbox
ComboBox* mUnitsCombo;
diff --git a/kalarm/lib/timespinbox.cpp b/kalarm/lib/timespinbox.cpp
index 7a22cd230..20073d878 100644
--- a/kalarm/lib/timespinbox.cpp
+++ b/kalarm/lib/timespinbox.cpp
@@ -20,8 +20,8 @@
#include "kalarm.h"
-#include <qvalidator.h>
-#include <qlineedit.h>
+#include <tqvalidator.h>
+#include <tqlineedit.h>
#include <klocale.h>
#include "timespinbox.moc"
@@ -30,10 +30,10 @@
class TimeSpinBox::TimeValidator : public QValidator
{
public:
- TimeValidator(int minMin, int maxMin, QWidget* parent, const char* name = 0)
- : QValidator(parent, name),
+ TimeValidator(int minMin, int maxMin, TQWidget* parent, const char* name = 0)
+ : TQValidator(parent, name),
minMinute(minMin), maxMinute(maxMin), m12Hour(false), mPm(false) { }
- virtual State validate(QString&, int&) const;
+ virtual State validate(TQString&, int&) const;
int minMinute, maxMinute;
bool m12Hour;
bool mPm;
@@ -54,7 +54,7 @@ class TimeSpinBox::TimeValidator : public QValidator
/******************************************************************************
* Construct a wrapping 00:00 - 23:59, or 12:00 - 11:59 time spin box.
*/
-TimeSpinBox::TimeSpinBox(bool use24hour, QWidget* parent, const char* name)
+TimeSpinBox::TimeSpinBox(bool use24hour, TQWidget* parent, const char* name)
: SpinBox2(0, 1439, 1, 60, parent, name),
mMinimumValue(0),
m12Hour(!use24hour),
@@ -70,13 +70,13 @@ TimeSpinBox::TimeSpinBox(bool use24hour, QWidget* parent, const char* name)
setShiftSteps(5, 360); // shift-left button increments 5 min / 6 hours
setSelectOnStep(false);
setAlignment(Qt::AlignHCenter);
- connect(this, SIGNAL(valueChanged(int)), SLOT(slotValueChanged(int)));
+ connect(this, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(slotValueChanged(int)));
}
/******************************************************************************
* Construct a non-wrapping time spin box.
*/
-TimeSpinBox::TimeSpinBox(int minMinute, int maxMinute, QWidget* parent, const char* name)
+TimeSpinBox::TimeSpinBox(int minMinute, int maxMinute, TQWidget* parent, const char* name)
: SpinBox2(minMinute, maxMinute, 1, 60, parent, name),
mMinimumValue(minMinute),
m12Hour(false),
@@ -88,20 +88,20 @@ TimeSpinBox::TimeSpinBox(int minMinute, int maxMinute, QWidget* parent, const ch
setReverseWithLayout(false); // keep buttons the same way round even if right-to-left language
setShiftSteps(5, 300); // shift-left button increments 5 min / 5 hours
setSelectOnStep(false);
- setAlignment(QApplication::reverseLayout() ? Qt::AlignLeft : Qt::AlignRight);
+ setAlignment(TQApplication::reverseLayout() ? Qt::AlignLeft : Qt::AlignRight);
}
-QString TimeSpinBox::shiftWhatsThis()
+TQString TimeSpinBox::shiftWhatsThis()
{
return i18n("Press the Shift key while clicking the spin buttons to adjust the time by a larger step (6 hours / 5 minutes).");
}
-QTime TimeSpinBox::time() const
+TQTime TimeSpinBox::time() const
{
- return QTime(value() / 60, value() % 60);
+ return TQTime(value() / 60, value() % 60);
}
-QString TimeSpinBox::mapValueToText(int v)
+TQString TimeSpinBox::mapValueToText(int v)
{
if (m12Hour)
{
@@ -110,7 +110,7 @@ QString TimeSpinBox::mapValueToText(int v)
else if (v >= 780)
v -= 720; // convert 13 - 23 hours to 1 - 11
}
- QString s;
+ TQString s;
s.sprintf((wrapping() ? "%02d:%02d" : "%d:%02d"), v/60, v%60);
return s;
}
@@ -123,13 +123,13 @@ QString TimeSpinBox::mapValueToText(int v)
*/
int TimeSpinBox::mapTextToValue(bool* ok)
{
- QString text = cleanText();
+ TQString text = cleanText();
int colon = text.find(':');
if (colon >= 0)
{
// [h]:m format for any time value
- QString hour = text.left(colon).stripWhiteSpace();
- QString minute = text.mid(colon + 1).stripWhiteSpace();
+ TQString hour = text.left(colon).stripWhiteSpace();
+ TQString minute = text.mid(colon + 1).stripWhiteSpace();
if (!minute.isEmpty())
{
bool okmin;
@@ -204,14 +204,14 @@ void TimeSpinBox::setValid(bool valid)
mInvalid = false;
if (value() < mMinimumValue)
SpinBox2::setValue(mMinimumValue);
- setSpecialValueText(QString());
+ setSpecialValueText(TQString());
SpinBox2::setMinValue(mMinimumValue);
}
else if (!valid && !mInvalid)
{
mInvalid = true;
SpinBox2::setMinValue(mMinimumValue - 1);
- setSpecialValueText(QString::fromLatin1("**:**"));
+ setSpecialValueText(TQString::fromLatin1("**:**"));
SpinBox2::setValue(mMinimumValue - 1);
}
}
@@ -241,7 +241,7 @@ void TimeSpinBox::setValue(int minutes)
if (mInvalid)
{
mInvalid = false;
- setSpecialValueText(QString());
+ setSpecialValueText(TQString());
SpinBox2::setMinValue(mMinimumValue);
}
SpinBox2::setValue(minutes);
@@ -280,18 +280,18 @@ void TimeSpinBox::slotValueChanged(int value)
mPm = mValidator->mPm = (value >= 720);
}
-QSize TimeSpinBox::sizeHint() const
+TQSize TimeSpinBox::sizeHint() const
{
- QSize sz = SpinBox2::sizeHint();
- QFontMetrics fm(font());
- return QSize(sz.width() + fm.width(":"), sz.height());
+ TQSize sz = SpinBox2::sizeHint();
+ TQFontMetrics fm(font());
+ return TQSize(sz.width() + fm.width(":"), sz.height());
}
-QSize TimeSpinBox::minimumSizeHint() const
+TQSize TimeSpinBox::minimumSizeHint() const
{
- QSize sz = SpinBox2::minimumSizeHint();
- QFontMetrics fm(font());
- return QSize(sz.width() + fm.width(":"), sz.height());
+ TQSize sz = SpinBox2::minimumSizeHint();
+ TQFontMetrics fm(font());
+ return TQSize(sz.width() + fm.width(":"), sz.height());
}
/******************************************************************************
@@ -299,24 +299,24 @@ QSize TimeSpinBox::minimumSizeHint() const
* The entered time must either be 4 digits, or it must contain a colon, but
* hours may be blank.
*/
-QValidator::State TimeSpinBox::TimeValidator::validate(QString& text, int& /*cursorPos*/) const
+TQValidator::State TimeSpinBox::TimeValidator::validate(TQString& text, int& /*cursorPos*/) const
{
- QString cleanText = text.stripWhiteSpace();
+ TQString cleanText = text.stripWhiteSpace();
if (cleanText.isEmpty())
- return QValidator::Intermediate;
- QValidator::State state = QValidator::Acceptable;
- QString hour;
+ return TQValidator::Intermediate;
+ TQValidator::State state = TQValidator::Acceptable;
+ TQString hour;
bool ok;
int hr = 0;
int mn = 0;
int colon = cleanText.find(':');
if (colon >= 0)
{
- QString minute = cleanText.mid(colon + 1);
+ TQString minute = cleanText.mid(colon + 1);
if (minute.isEmpty())
- state = QValidator::Intermediate;
+ state = TQValidator::Intermediate;
else if ((mn = minute.toUInt(&ok)) >= 60 || !ok)
- return QValidator::Invalid;
+ return TQValidator::Invalid;
hour = cleanText.left(colon);
}
@@ -324,19 +324,19 @@ QValidator::State TimeSpinBox::TimeValidator::validate(QString& text, int& /*cur
{
// The hhmm form of entry is only allowed for time-of-day, i.e. <= 2359
hour = cleanText;
- state = QValidator::Intermediate;
+ state = TQValidator::Intermediate;
}
else
{
if (cleanText.length() > 4)
- return QValidator::Invalid;
+ return TQValidator::Invalid;
if (cleanText.length() < 4)
- state = QValidator::Intermediate;
+ state = TQValidator::Intermediate;
hour = cleanText.left(2);
- QString minute = cleanText.mid(2);
+ TQString minute = cleanText.mid(2);
if (!minute.isEmpty()
&& ((mn = minute.toUInt(&ok)) >= 60 || !ok))
- return QValidator::Invalid;
+ return TQValidator::Invalid;
}
if (!hour.isEmpty())
@@ -352,13 +352,13 @@ QValidator::State TimeSpinBox::TimeValidator::validate(QString& text, int& /*cur
hr += 12; // convert to PM
}
if (!ok || hr > maxMinute/60)
- return QValidator::Invalid;
+ return TQValidator::Invalid;
}
- if (state == QValidator::Acceptable)
+ if (state == TQValidator::Acceptable)
{
int t = hr * 60 + mn;
if (t < minMinute || t > maxMinute)
- return QValidator::Invalid;
+ return TQValidator::Invalid;
}
return state;
}
diff --git a/kalarm/lib/timespinbox.h b/kalarm/lib/timespinbox.h
index 275fdf309..909541ad9 100644
--- a/kalarm/lib/timespinbox.h
+++ b/kalarm/lib/timespinbox.h
@@ -21,7 +21,7 @@
#ifndef TIMESPINBOX_H
#define TIMESPINBOX_H
-#include <qdatetime.h>
+#include <tqdatetime.h>
#include "spinbox2.h"
@@ -52,14 +52,14 @@ class TimeSpinBox : public SpinBox2
* @param parent The parent object of this widget.
* @param name The name of this widget.
*/
- explicit TimeSpinBox(bool use24hour, QWidget* parent = 0, const char* name = 0);
+ explicit TimeSpinBox(bool use24hour, TQWidget* parent = 0, const char* name = 0);
/** Constructor for a non-wrapping time spin box which can be used to enter a length of time.
* @param minMinute The minimum value which the spin box can hold, in minutes.
* @param maxMinute The maximum value which the spin box can hold, in minutes.
* @param parent The parent object of this widget.
* @param name The name of this widget.
*/
- TimeSpinBox(int minMinute, int maxMinute, QWidget* parent = 0, const char* name = 0);
+ TimeSpinBox(int minMinute, int maxMinute, TQWidget* parent = 0, const char* name = 0);
/** Returns true if the spin box holds a valid value.
* An invalid value is displayed as asterisks.
*/
@@ -72,7 +72,7 @@ class TimeSpinBox : public SpinBox2
/** Returns the current value held in the spin box.
* If an invalid value is displayed, returns a value lower than the minimum value.
*/
- QTime time() const;
+ TQTime time() const;
/** Sets the maximum value which can be held in the spin box.
* @param minutes The maximum value expressed in minutes.
*/
@@ -82,16 +82,16 @@ class TimeSpinBox : public SpinBox2
*/
virtual void setMaxValue(int minutes) { SpinBox2::setMaxValue(minutes); }
/** Sets the maximum value which can be held in the spin box. */
- void setMaxValue(const QTime& t) { SpinBox2::setMaxValue(t.hour()*60 + t.minute()); }
+ void setMaxValue(const TQTime& t) { SpinBox2::setMaxValue(t.hour()*60 + t.minute()); }
/** Returns the maximum value which can be held in the spin box. */
- QTime maxTime() const { int mv = maxValue(); return QTime(mv/60, mv%60); }
+ TQTime maxTime() const { int mv = maxValue(); return TQTime(mv/60, mv%60); }
/** Returns a text describing use of the shift key as an accelerator for
* the spin buttons, designed for incorporation into WhatsThis texts.
*/
- static QString shiftWhatsThis();
+ static TQString shiftWhatsThis();
- virtual QSize sizeHint() const;
- virtual QSize minimumSizeHint() const;
+ virtual TQSize sizeHint() const;
+ virtual TQSize minimumSizeHint() const;
public slots:
/** Sets the value of the spin box.
@@ -99,7 +99,7 @@ class TimeSpinBox : public SpinBox2
*/
virtual void setValue(int minutes);
/** Sets the value of the spin box. */
- void setValue(const QTime& t) { setValue(t.hour()*60 + t.minute()); }
+ void setValue(const TQTime& t) { setValue(t.hour()*60 + t.minute()); }
/** Increments the spin box value.
* If the value was previously invalid, the spin box is set to the minimum value.
*/
@@ -110,7 +110,7 @@ class TimeSpinBox : public SpinBox2
virtual void stepDown();
protected:
- virtual QString mapValueToText(int v);
+ virtual TQString mapValueToText(int v);
virtual int mapTextToValue(bool* ok);
private slots:
void slotValueChanged(int value);
diff --git a/kalarm/mainwindow.cpp b/kalarm/mainwindow.cpp
index 01ddc83d3..a3e8e423f 100644
--- a/kalarm/mainwindow.cpp
+++ b/kalarm/mainwindow.cpp
@@ -20,9 +20,9 @@
#include "kalarm.h"
-#include <qiconset.h>
-#include <qdragobject.h>
-#include <qheader.h>
+#include <tqiconset.h>
+#include <tqdragobject.h>
+#include <tqheader.h>
#include <kmenubar.h>
#include <ktoolbar.h>
@@ -71,19 +71,19 @@ using namespace KCal;
static const char* UI_FILE = "kalarmui.rc";
static const char* WINDOW_NAME = "MainWindow";
-static const QString VIEW_GROUP = QString::fromLatin1("View");
-static const QString SHOW_TIME_KEY = QString::fromLatin1("ShowAlarmTime");
-static const QString SHOW_TIME_TO_KEY = QString::fromLatin1("ShowTimeToAlarm");
-static const QString SHOW_ARCHIVED_KEY = QString::fromLatin1("ShowArchivedAlarms");
-static const QString SHOW_RESOURCES_KEY = QString::fromLatin1("ShowResources");
+static const TQString VIEW_GROUP = TQString::fromLatin1("View");
+static const TQString SHOW_TIME_KEY = TQString::fromLatin1("ShowAlarmTime");
+static const TQString SHOW_TIME_TO_KEY = TQString::fromLatin1("ShowTimeToAlarm");
+static const TQString SHOW_ARCHIVED_KEY = TQString::fromLatin1("ShowArchivedAlarms");
+static const TQString SHOW_RESOURCES_KEY = TQString::fromLatin1("ShowResources");
-static QString undoText;
-static QString undoTextStripped;
-static QString undoIcon;
+static TQString undoText;
+static TQString undoTextStripped;
+static TQString undoIcon;
static KShortcut undoShortcut;
-static QString redoText;
-static QString redoTextStripped;
-static QString redoIcon;
+static TQString redoText;
+static TQString redoTextStripped;
+static TQString redoIcon;
static KShortcut redoShortcut;
@@ -96,14 +96,14 @@ TemplateDlg* MainWindow::mTemplateDlg = 0;
// Collect these widget labels together to ensure consistent wording and
// translations across different modules.
-QString MainWindow::i18n_a_ShowAlarmTimes() { return i18n("Show &Alarm Times"); }
-QString MainWindow::i18n_m_ShowAlarmTime() { return i18n("Show alarm ti&me"); }
-QString MainWindow::i18n_o_ShowTimeToAlarms() { return i18n("Show Time t&o Alarms"); }
-QString MainWindow::i18n_l_ShowTimeToAlarm() { return i18n("Show time unti&l alarm"); }
-QString MainWindow::i18n_ShowExpiredAlarms() { return i18n("Show Expired Alarms"); }
-QString MainWindow::i18n_e_ShowExpiredAlarms() { return i18n("Show &Expired Alarms"); }
-QString MainWindow::i18n_HideExpiredAlarms() { return i18n("Hide Expired Alarms"); }
-QString MainWindow::i18n_e_HideExpiredAlarms() { return i18n("Hide &Expired Alarms"); }
+TQString MainWindow::i18n_a_ShowAlarmTimes() { return i18n("Show &Alarm Times"); }
+TQString MainWindow::i18n_m_ShowAlarmTime() { return i18n("Show alarm ti&me"); }
+TQString MainWindow::i18n_o_ShowTimeToAlarms() { return i18n("Show Time t&o Alarms"); }
+TQString MainWindow::i18n_l_ShowTimeToAlarm() { return i18n("Show time unti&l alarm"); }
+TQString MainWindow::i18n_ShowExpiredAlarms() { return i18n("Show Expired Alarms"); }
+TQString MainWindow::i18n_e_ShowExpiredAlarms() { return i18n("Show &Expired Alarms"); }
+TQString MainWindow::i18n_HideExpiredAlarms() { return i18n("Hide Expired Alarms"); }
+TQString MainWindow::i18n_e_HideExpiredAlarms() { return i18n("Hide &Expired Alarms"); }
/******************************************************************************
@@ -123,7 +123,7 @@ MainWindow::MainWindow(bool restored)
mHiddenTrayParent(false)
{
kdDebug(5950) << "MainWindow::MainWindow()\n";
- setAutoSaveSettings(QString::fromLatin1(WINDOW_NAME)); // save window sizes etc.
+ setAutoSaveSettings(TQString::fromLatin1(WINDOW_NAME)); // save window sizes etc.
setPlainCaption(kapp->aboutData()->programName());
KConfig* config = KGlobal::config();
config->setGroup(VIEW_GROUP);
@@ -132,12 +132,12 @@ MainWindow::MainWindow(bool restored)
mShowTimeTo = config->readBoolEntry(SHOW_TIME_TO_KEY, false);
if (!restored)
{
- QSize s;
+ TQSize s;
if (KAlarm::readConfigWindowSize(WINDOW_NAME, s))
resize(s);
}
- config->setGroup(QString::fromLatin1(WINDOW_NAME));
- QValueList<int> order = config->readIntListEntry(QString::fromLatin1("ColumnOrder"));
+ config->setGroup(TQString::fromLatin1(WINDOW_NAME));
+ TQValueList<int> order = config->readIntListEntry(TQString::fromLatin1("ColumnOrder"));
setAcceptDrops(true); // allow drag-and-drop onto this window
if (!mShowTimeTo)
@@ -149,14 +149,14 @@ MainWindow::MainWindow(bool restored)
mListView->refresh(); // populate the alarm list
mListView->clearSelection();
- connect(mListView, SIGNAL(itemDeleted()), SLOT(slotDeletion()));
- connect(mListView, SIGNAL(selectionChanged()), SLOT(slotSelection()));
- connect(mListView, SIGNAL(contextMenuRequested(QListViewItem*, const QPoint&, int)),
- SLOT(slotContextMenuRequested(QListViewItem*, const QPoint&, int)));
- connect(mListView, SIGNAL(mouseButtonClicked(int, QListViewItem*, const QPoint&, int)),
- SLOT(slotMouseClicked(int, QListViewItem*, const QPoint&, int)));
- connect(mListView, SIGNAL(executed(QListViewItem*)), SLOT(slotDoubleClicked(QListViewItem*)));
- connect(mListView->header(), SIGNAL(indexChange(int, int, int)), SLOT(columnsReordered()));
+ connect(mListView, TQT_SIGNAL(itemDeleted()), TQT_SLOT(slotDeletion()));
+ connect(mListView, TQT_SIGNAL(selectionChanged()), TQT_SLOT(slotSelection()));
+ connect(mListView, TQT_SIGNAL(contextMenuRequested(TQListViewItem*, const TQPoint&, int)),
+ TQT_SLOT(slotContextMenuRequested(TQListViewItem*, const TQPoint&, int)));
+ connect(mListView, TQT_SIGNAL(mouseButtonClicked(int, TQListViewItem*, const TQPoint&, int)),
+ TQT_SLOT(slotMouseClicked(int, TQListViewItem*, const TQPoint&, int)));
+ connect(mListView, TQT_SIGNAL(executed(TQListViewItem*)), TQT_SLOT(slotDoubleClicked(TQListViewItem*)));
+ connect(mListView->header(), TQT_SIGNAL(indexChange(int, int, int)), TQT_SLOT(columnsReordered()));
initActions();
mWindowList.append(this);
@@ -201,10 +201,10 @@ MainWindow::~MainWindow()
*/
void MainWindow::saveProperties(KConfig* config)
{
- config->writeEntry(QString::fromLatin1("HiddenTrayParent"), isTrayParent() && isHidden());
- config->writeEntry(QString::fromLatin1("ShowExpired"), mShowExpired);
- config->writeEntry(QString::fromLatin1("ShowTime"), mShowTime);
- config->writeEntry(QString::fromLatin1("ShowTimeTo"), mShowTimeTo);
+ config->writeEntry(TQString::fromLatin1("HiddenTrayParent"), isTrayParent() && isHidden());
+ config->writeEntry(TQString::fromLatin1("ShowExpired"), mShowExpired);
+ config->writeEntry(TQString::fromLatin1("ShowTime"), mShowTime);
+ config->writeEntry(TQString::fromLatin1("ShowTimeTo"), mShowTimeTo);
}
/******************************************************************************
@@ -214,10 +214,10 @@ void MainWindow::saveProperties(KConfig* config)
*/
void MainWindow::readProperties(KConfig* config)
{
- mHiddenTrayParent = config->readBoolEntry(QString::fromLatin1("HiddenTrayParent"));
- mShowExpired = config->readBoolEntry(QString::fromLatin1("ShowExpired"));
- mShowTime = config->readBoolEntry(QString::fromLatin1("ShowTime"));
- mShowTimeTo = config->readBoolEntry(QString::fromLatin1("ShowTimeTo"));
+ mHiddenTrayParent = config->readBoolEntry(TQString::fromLatin1("HiddenTrayParent"));
+ mShowExpired = config->readBoolEntry(TQString::fromLatin1("ShowExpired"));
+ mShowTime = config->readBoolEntry(TQString::fromLatin1("ShowTime"));
+ mShowTimeTo = config->readBoolEntry(TQString::fromLatin1("ShowTimeTo"));
}
/******************************************************************************
@@ -263,7 +263,7 @@ void MainWindow::closeAll()
* edge of the list view.
* Records the new size in the config file.
*/
-void MainWindow::resizeEvent(QResizeEvent* re)
+void MainWindow::resizeEvent(TQResizeEvent* re)
{
// Save the window's new size only if it's the first main window
if (mainMainWindow() == this)
@@ -276,7 +276,7 @@ void MainWindow::resizeEvent(QResizeEvent* re)
* Sets the last column in the list view to extend at least to the right hand
* edge of the list view.
*/
-void MainWindow::showEvent(QShowEvent* se)
+void MainWindow::showEvent(TQShowEvent* se)
{
setUpdateTimer();
slotUpdateTimeTo();
@@ -294,7 +294,7 @@ void MainWindow::show()
// Show error message now that the main window has been displayed.
// Waiting until now lets the user easily associate the message with
// the main window which is faulty.
- KMessageBox::error(this, i18n("Failure to create menus\n(perhaps %1 missing or corrupted)").arg(QString::fromLatin1(UI_FILE)));
+ KMessageBox::error(this, i18n("Failure to create menus\n(perhaps %1 missing or corrupted)").arg(TQString::fromLatin1(UI_FILE)));
mMenuError = false;
}
}
@@ -302,7 +302,7 @@ void MainWindow::show()
/******************************************************************************
* Called after the window is hidden.
*/
-void MainWindow::hideEvent(QHideEvent* he)
+void MainWindow::hideEvent(TQHideEvent* he)
{
setUpdateTimer();
MainWindowBase::hideEvent(he);
@@ -315,8 +315,8 @@ void MainWindow::hideEvent(QHideEvent* he)
void MainWindow::columnsReordered()
{
KConfig* config = KGlobal::config();
- config->setGroup(QString::fromLatin1(WINDOW_NAME));
- config->writeEntry(QString::fromLatin1("ColumnOrder"), mListView->columnOrder());
+ config->setGroup(TQString::fromLatin1(WINDOW_NAME));
+ config->writeEntry(TQString::fromLatin1("ColumnOrder"), mListView->columnOrder());
config->sync();
}
@@ -326,27 +326,27 @@ void MainWindow::columnsReordered()
void MainWindow::initActions()
{
KActionCollection* actions = actionCollection();
- mActionTemplates = new KAction(i18n("&Templates..."), 0, this, SLOT(slotTemplates()), actions, "templates");
- mActionNew = KAlarm::createNewAlarmAction(i18n("&New..."), this, SLOT(slotNew()), actions, "new");
- mActionNewFromTemplate = KAlarm::createNewFromTemplateAction(i18n("New &From Template"), this, SLOT(slotNewFromTemplate(const KAEvent&)), actions, "newFromTempl");
- mActionCreateTemplate = new KAction(i18n("Create Tem&plate..."), 0, this, SLOT(slotNewTemplate()), actions, "createTemplate");
- mActionCopy = new KAction(i18n("&Copy..."), "editcopy", Qt::SHIFT+Qt::Key_Insert, this, SLOT(slotCopy()), actions, "copy");
- mActionModify = new KAction(i18n("&Edit..."), "edit", Qt::CTRL+Qt::Key_E, this, SLOT(slotModify()), actions, "modify");
- mActionDelete = new KAction(i18n("&Delete"), "editdelete", Qt::Key_Delete, this, SLOT(slotDelete()), actions, "delete");
- mActionReactivate = new KAction(i18n("Reac&tivate"), 0, Qt::CTRL+Qt::Key_R, this, SLOT(slotReactivate()), actions, "undelete");
- mActionEnable = new KAction(QString::null, 0, Qt::CTRL+Qt::Key_B, this, SLOT(slotEnable()), actions, "disable");
- mActionView = new KAction(i18n("&View"), "viewmag", Qt::CTRL+Qt::Key_W, this, SLOT(slotView()), actions, "view");
- mActionShowTime = new KToggleAction(i18n_a_ShowAlarmTimes(), Qt::CTRL+Qt::Key_M, this, SLOT(slotShowTime()), actions, "showAlarmTimes");
+ mActionTemplates = new KAction(i18n("&Templates..."), 0, this, TQT_SLOT(slotTemplates()), actions, "templates");
+ mActionNew = KAlarm::createNewAlarmAction(i18n("&New..."), this, TQT_SLOT(slotNew()), actions, "new");
+ mActionNewFromTemplate = KAlarm::createNewFromTemplateAction(i18n("New &From Template"), this, TQT_SLOT(slotNewFromTemplate(const KAEvent&)), actions, "newFromTempl");
+ mActionCreateTemplate = new KAction(i18n("Create Tem&plate..."), 0, this, TQT_SLOT(slotNewTemplate()), actions, "createTemplate");
+ mActionCopy = new KAction(i18n("&Copy..."), "editcopy", Qt::SHIFT+Qt::Key_Insert, this, TQT_SLOT(slotCopy()), actions, "copy");
+ mActionModify = new KAction(i18n("&Edit..."), "edit", Qt::CTRL+Qt::Key_E, this, TQT_SLOT(slotModify()), actions, "modify");
+ mActionDelete = new KAction(i18n("&Delete"), "editdelete", Qt::Key_Delete, this, TQT_SLOT(slotDelete()), actions, "delete");
+ mActionReactivate = new KAction(i18n("Reac&tivate"), 0, Qt::CTRL+Qt::Key_R, this, TQT_SLOT(slotReactivate()), actions, "undelete");
+ mActionEnable = new KAction(TQString::null, 0, Qt::CTRL+Qt::Key_B, this, TQT_SLOT(slotEnable()), actions, "disable");
+ mActionView = new KAction(i18n("&View"), "viewmag", Qt::CTRL+Qt::Key_W, this, TQT_SLOT(slotView()), actions, "view");
+ mActionShowTime = new KToggleAction(i18n_a_ShowAlarmTimes(), Qt::CTRL+Qt::Key_M, this, TQT_SLOT(slotShowTime()), actions, "showAlarmTimes");
mActionShowTime->setCheckedState(i18n("Hide &Alarm Times"));
- mActionShowTimeTo = new KToggleAction(i18n_o_ShowTimeToAlarms(), Qt::CTRL+Qt::Key_I, this, SLOT(slotShowTimeTo()), actions, "showTimeToAlarms");
+ mActionShowTimeTo = new KToggleAction(i18n_o_ShowTimeToAlarms(), Qt::CTRL+Qt::Key_I, this, TQT_SLOT(slotShowTimeTo()), actions, "showTimeToAlarms");
mActionShowTimeTo->setCheckedState(i18n("Hide Time t&o Alarms"));
- mActionShowExpired = new KToggleAction(i18n_e_ShowExpiredAlarms(), "history", Qt::CTRL+Qt::Key_P, this, SLOT(slotShowExpired()), actions, "showExpiredAlarms");
+ mActionShowExpired = new KToggleAction(i18n_e_ShowExpiredAlarms(), "history", Qt::CTRL+Qt::Key_P, this, TQT_SLOT(slotShowExpired()), actions, "showExpiredAlarms");
mActionShowExpired->setCheckedState(i18n_e_HideExpiredAlarms());
- mActionToggleTrayIcon = new KToggleAction(i18n("Show in System &Tray"), 0, this, SLOT(slotToggleTrayIcon()), actions, "showInSystemTray");
+ mActionToggleTrayIcon = new KToggleAction(i18n("Show in System &Tray"), 0, this, TQT_SLOT(slotToggleTrayIcon()), actions, "showInSystemTray");
mActionToggleTrayIcon->setCheckedState(i18n("Hide From System &Tray"));
- new KAction(i18n("Import &Alarms..."), 0, this, SLOT(slotImportAlarms()), actions, "importAlarms");
- new KAction(i18n("Import &Birthdays..."), 0, this, SLOT(slotBirthdays()), actions, "importBirthdays");
- new KAction(i18n("&Refresh Alarms"), "reload", 0, this, SLOT(slotResetDaemon()), actions, "refreshAlarms");
+ new KAction(i18n("Import &Alarms..."), 0, this, TQT_SLOT(slotImportAlarms()), actions, "importAlarms");
+ new KAction(i18n("Import &Birthdays..."), 0, this, TQT_SLOT(slotBirthdays()), actions, "importBirthdays");
+ new KAction(i18n("&Refresh Alarms"), "reload", 0, this, TQT_SLOT(slotResetDaemon()), actions, "refreshAlarms");
Daemon::createAlarmEnableAction(actions, "alarmEnable");
if (undoText.isNull())
{
@@ -364,32 +364,32 @@ void MainWindow::initActions()
redoTextStripped = KAlarm::stripAccel(redoText);
delete act;
}
- mActionUndo = new KToolBarPopupAction(undoText, undoIcon, undoShortcut, this, SLOT(slotUndo()), actions, "edit_undo");
- mActionRedo = new KToolBarPopupAction(redoText, redoIcon, redoShortcut, this, SLOT(slotRedo()), actions, "edit_redo");
- KStdAction::find(mListView, SLOT(slotFind()), actions);
- mActionFindNext = KStdAction::findNext(mListView, SLOT(slotFindNext()), actions);
- mActionFindPrev = KStdAction::findPrev(mListView, SLOT(slotFindPrev()), actions);
- KStdAction::selectAll(mListView, SLOT(slotSelectAll()), actions);
- KStdAction::deselect(mListView, SLOT(slotDeselect()), actions);
- KStdAction::quit(this, SLOT(slotQuit()), actions);
- KStdAction::keyBindings(this, SLOT(slotConfigureKeys()), actions);
- KStdAction::configureToolbars(this, SLOT(slotConfigureToolbar()), actions);
- KStdAction::preferences(this, SLOT(slotPreferences()), actions);
+ mActionUndo = new KToolBarPopupAction(undoText, undoIcon, undoShortcut, this, TQT_SLOT(slotUndo()), actions, "edit_undo");
+ mActionRedo = new KToolBarPopupAction(redoText, redoIcon, redoShortcut, this, TQT_SLOT(slotRedo()), actions, "edit_redo");
+ KStdAction::find(mListView, TQT_SLOT(slotFind()), actions);
+ mActionFindNext = KStdAction::findNext(mListView, TQT_SLOT(slotFindNext()), actions);
+ mActionFindPrev = KStdAction::findPrev(mListView, TQT_SLOT(slotFindPrev()), actions);
+ KStdAction::selectAll(mListView, TQT_SLOT(slotSelectAll()), actions);
+ KStdAction::deselect(mListView, TQT_SLOT(slotDeselect()), actions);
+ KStdAction::quit(this, TQT_SLOT(slotQuit()), actions);
+ KStdAction::keyBindings(this, TQT_SLOT(slotConfigureKeys()), actions);
+ KStdAction::configureToolbars(this, TQT_SLOT(slotConfigureToolbar()), actions);
+ KStdAction::preferences(this, TQT_SLOT(slotPreferences()), actions);
setStandardToolBarMenuEnabled(true);
createGUI(UI_FILE);
mContextMenu = static_cast<KPopupMenu*>(factory()->container("listContext", this));
mActionsMenu = static_cast<KPopupMenu*>(factory()->container("actions", this));
mMenuError = (!mContextMenu || !mActionsMenu);
- connect(mActionsMenu, SIGNAL(aboutToShow()), SLOT(updateActionsMenu()));
- connect(mActionUndo->popupMenu(), SIGNAL(aboutToShow()), SLOT(slotInitUndoMenu()));
- connect(mActionUndo->popupMenu(), SIGNAL(activated(int)), SLOT(slotUndoItem(int)));
- connect(mActionRedo->popupMenu(), SIGNAL(aboutToShow()), SLOT(slotInitRedoMenu()));
- connect(mActionRedo->popupMenu(), SIGNAL(activated(int)), SLOT(slotRedoItem(int)));
- connect(Undo::instance(), SIGNAL(changed(const QString&, const QString&)), SLOT(slotUndoStatus(const QString&, const QString&)));
- connect(mListView, SIGNAL(findActive(bool)), SLOT(slotFindActive(bool)));
- Preferences::connect(SIGNAL(preferencesChanged()), this, SLOT(slotPrefsChanged()));
- connect(theApp(), SIGNAL(trayIconToggled()), SLOT(updateTrayIconAction()));
+ connect(mActionsMenu, TQT_SIGNAL(aboutToShow()), TQT_SLOT(updateActionsMenu()));
+ connect(mActionUndo->popupMenu(), TQT_SIGNAL(aboutToShow()), TQT_SLOT(slotInitUndoMenu()));
+ connect(mActionUndo->popupMenu(), TQT_SIGNAL(activated(int)), TQT_SLOT(slotUndoItem(int)));
+ connect(mActionRedo->popupMenu(), TQT_SIGNAL(aboutToShow()), TQT_SLOT(slotInitRedoMenu()));
+ connect(mActionRedo->popupMenu(), TQT_SIGNAL(activated(int)), TQT_SLOT(slotRedoItem(int)));
+ connect(Undo::instance(), TQT_SIGNAL(changed(const TQString&, const TQString&)), TQT_SLOT(slotUndoStatus(const TQString&, const TQString&)));
+ connect(mListView, TQT_SIGNAL(findActive(bool)), TQT_SLOT(slotFindActive(bool)));
+ Preferences::connect(TQT_SIGNAL(preferencesChanged()), this, TQT_SLOT(slotPrefsChanged()));
+ connect(theApp(), TQT_SIGNAL(trayIconToggled()), TQT_SLOT(updateTrayIconAction()));
// Set menu item states
setEnableText(true);
@@ -485,7 +485,7 @@ void MainWindow::setUpdateTimer()
{
// Timeout every minute.
needTimer->mMinuteTimerActive = true;
- MinuteTimer::connect(needTimer, SLOT(slotUpdateTimeTo()));
+ MinuteTimer::connect(needTimer, TQT_SLOT(slotUpdateTimeTo()));
kdDebug(5950) << "MainWindow::setUpdateTimer(): started timer" << endl;
}
else if (!needTimer && timerWindow)
@@ -512,7 +512,7 @@ void MainWindow::slotUpdateTimeTo()
/******************************************************************************
* Select an alarm in the displayed list.
*/
-void MainWindow::selectEvent(const QString& eventID)
+void MainWindow::selectEvent(const TQString& eventID)
{
mListView->clearSelection();
AlarmListViewItem* item = mListView->getEntry(eventID);
@@ -541,7 +541,7 @@ void MainWindow::executeNew(MainWindow* win, const KAEvent* evnt, KAEvent::Actio
EditAlarmDlg editDlg(false, i18n("New Alarm"), win, 0, evnt);
if (!text.isEmpty())
editDlg.setAction(action, text);
- if (editDlg.exec() == QDialog::Accepted)
+ if (editDlg.exec() == TQDialog::Accepted)
{
KAEvent event;
editDlg.getEvent(event);
@@ -609,7 +609,7 @@ void MainWindow::slotModify()
void MainWindow::executeEdit(KAEvent& event, MainWindow* win)
{
EditAlarmDlg editDlg(false, i18n("Edit Alarm"), win, 0, &event);
- if (editDlg.exec() == QDialog::Accepted)
+ if (editDlg.exec() == TQDialog::Accepted)
{
KAEvent newEvent;
bool changeDeferral = !editDlg.getEvent(newEvent);
@@ -656,12 +656,12 @@ void MainWindow::slotView()
*/
void MainWindow::slotDelete()
{
- QValueList<EventListViewItemBase*> items = mListView->selectedItems();
+ TQValueList<EventListViewItemBase*> items = mListView->selectedItems();
// Copy the events to be deleted, in case any are deleted by being
// triggered while the confirmation prompt is displayed.
- QValueList<KAEvent> events;
- QValueList<KAEvent> origEvents;
- for (QValueList<EventListViewItemBase*>::Iterator iit = items.begin(); iit != items.end(); ++iit)
+ TQValueList<KAEvent> events;
+ TQValueList<KAEvent> origEvents;
+ for (TQValueList<EventListViewItemBase*>::Iterator iit = items.begin(); iit != items.end(); ++iit)
{
AlarmListViewItem* item = (AlarmListViewItem*)(*iit);
events.append(item->event());
@@ -683,7 +683,7 @@ void MainWindow::slotDelete()
int warnKOrg = 0;
AlarmCalendar::activeCalendar()->startUpdate(); // prevent multiple saves of the calendars until we're finished
AlarmCalendar::expiredCalendar()->startUpdate();
- for (QValueList<KAEvent>::Iterator it = events.begin(); it != events.end(); ++it)
+ for (TQValueList<KAEvent>::Iterator it = events.begin(); it != events.end(); ++it)
{
// Delete the event from the calendar and displays
switch (KAlarm::deleteEvent(*it))
@@ -719,12 +719,12 @@ void MainWindow::slotReactivate()
{
int warnErr = 0;
int warnKOrg = 0;
- QValueList<KAEvent> events;
- QValueList<EventListViewItemBase*> items = mListView->selectedItems();
+ TQValueList<KAEvent> events;
+ TQValueList<EventListViewItemBase*> items = mListView->selectedItems();
mListView->clearSelection();
AlarmCalendar::activeCalendar()->startUpdate(); // prevent multiple saves of the calendars until we're finished
AlarmCalendar::expiredCalendar()->startUpdate();
- for (QValueList<EventListViewItemBase*>::Iterator it = items.begin(); it != items.end(); ++it)
+ for (TQValueList<EventListViewItemBase*>::Iterator it = items.begin(); it != items.end(); ++it)
{
// Add the alarm to the displayed lists and to the calendar file
AlarmListViewItem* item = (AlarmListViewItem*)(*it);
@@ -763,9 +763,9 @@ void MainWindow::slotEnable()
{
bool enable = mActionEnableEnable; // save since changed in response to KAlarm::enableEvent()
int warnErr = 0;
- QValueList<EventListViewItemBase*> items = mListView->selectedItems();
+ TQValueList<EventListViewItemBase*> items = mListView->selectedItems();
AlarmCalendar::activeCalendar()->startUpdate(); // prevent multiple saves of the calendars until we're finished
- for (QValueList<EventListViewItemBase*>::Iterator it = items.begin(); it != items.end(); ++it)
+ for (TQValueList<EventListViewItemBase*>::Iterator it = items.begin(); it != items.end(); ++it)
{
AlarmListViewItem* item = (AlarmListViewItem*)(*it);
KAEvent event = item->event();
@@ -851,15 +851,15 @@ void MainWindow::slotImportAlarms()
void MainWindow::slotBirthdays()
{
BirthdayDlg dlg(this);
- if (dlg.exec() == QDialog::Accepted)
+ if (dlg.exec() == TQDialog::Accepted)
{
- QValueList<KAEvent> events = dlg.events();
+ TQValueList<KAEvent> events = dlg.events();
if (events.count())
{
mListView->clearSelection();
int warnErr = 0;
int warnKOrg = 0;
- for (QValueList<KAEvent>::Iterator ev = events.begin(); ev != events.end(); ++ev)
+ for (TQValueList<KAEvent>::Iterator ev = events.begin(); ev != events.end(); ++ev)
{
// Add alarm to the displayed lists and to the calendar file
switch (KAlarm::addEvent(*ev, mListView))
@@ -895,7 +895,7 @@ void MainWindow::slotTemplates()
{
mTemplateDlg = TemplateDlg::create(this);
enableTemplateMenuItem(false); // disable menu item in all windows
- connect(mTemplateDlg, SIGNAL(finished()), SLOT(slotTemplatesEnd()));
+ connect(mTemplateDlg, TQT_SIGNAL(finished()), TQT_SLOT(slotTemplatesEnd()));
mTemplateDlg->show();
}
}
@@ -1015,14 +1015,14 @@ void MainWindow::slotInitRedoMenu()
void MainWindow::initUndoMenu(KPopupMenu* menu, Undo::Type type)
{
menu->clear();
- const QString& action = (type == Undo::UNDO) ? undoTextStripped : redoTextStripped;
- QValueList<int> ids = Undo::ids(type);
- for (QValueList<int>::ConstIterator it = ids.begin(); it != ids.end(); ++it)
+ const TQString& action = (type == Undo::UNDO) ? undoTextStripped : redoTextStripped;
+ TQValueList<int> ids = Undo::ids(type);
+ for (TQValueList<int>::ConstIterator it = ids.begin(); it != ids.end(); ++it)
{
int id = *it;
- QString actText = Undo::actionText(type, id);
- QString descrip = Undo::description(type, id);
- QString text = descrip.isEmpty()
+ TQString actText = Undo::actionText(type, id);
+ TQString descrip = Undo::description(type, id);
+ TQString text = descrip.isEmpty()
? i18n("Undo/Redo [action]", "%1 %2").arg(action).arg(actText)
: i18n("Undo [action]: message", "%1 %2: %3").arg(action).arg(actText).arg(descrip);
menu->insertItem(text, id);
@@ -1033,7 +1033,7 @@ void MainWindow::initUndoMenu(KPopupMenu* menu, Undo::Type type)
* Called when the status of the Undo or Redo list changes.
* Change the Undo or Redo text to include the action which would be undone/redone.
*/
-void MainWindow::slotUndoStatus(const QString& undo, const QString& redo)
+void MainWindow::slotUndoStatus(const TQString& undo, const TQString& redo)
{
if (undo.isNull())
{
@@ -1043,7 +1043,7 @@ void MainWindow::slotUndoStatus(const QString& undo, const QString& redo)
else
{
mActionUndo->setEnabled(true);
- mActionUndo->setText(QString("%1 %2").arg(undoText).arg(undo));
+ mActionUndo->setText(TQString("%1 %2").arg(undoText).arg(undo));
}
if (redo.isNull())
{
@@ -1053,7 +1053,7 @@ void MainWindow::slotUndoStatus(const QString& undo, const QString& redo)
else
{
mActionRedo->setEnabled(true);
- mActionRedo->setText(QString("%1 %2").arg(redoText).arg(redo));
+ mActionRedo->setText(TQString("%1 %2").arg(redoText).arg(redo));
}
}
@@ -1088,7 +1088,7 @@ void MainWindow::slotConfigureToolbar()
{
saveMainWindowSettings(KGlobal::config(), WINDOW_NAME);
KEditToolbar dlg(factory());
- connect(&dlg, SIGNAL(newToolbarConfig()), this, SLOT(slotNewToolbarConfig()));
+ connect(&dlg, TQT_SIGNAL(newToolbarConfig()), this, TQT_SLOT(slotNewToolbarConfig()));
dlg.exec();
}
@@ -1113,7 +1113,7 @@ void MainWindow::slotQuit()
/******************************************************************************
* Called when the user or the session manager attempts to close the window.
*/
-void MainWindow::closeEvent(QCloseEvent* ce)
+void MainWindow::closeEvent(TQCloseEvent* ce)
{
if (!theApp()->sessionClosingDown() && isTrayParent())
{
@@ -1150,7 +1150,7 @@ void MainWindow::slotDeletion()
/******************************************************************************
* Called when the drag cursor enters the window.
*/
-void MainWindow::dragEnterEvent(QDragEnterEvent* e)
+void MainWindow::dragEnterEvent(TQDragEnterEvent* e)
{
executeDragEnterEvent(e);
}
@@ -1159,12 +1159,12 @@ void MainWindow::dragEnterEvent(QDragEnterEvent* e)
* Called when the drag cursor enters a main or system tray window, to accept
* or reject the dragged object.
*/
-void MainWindow::executeDragEnterEvent(QDragEnterEvent* e)
+void MainWindow::executeDragEnterEvent(TQDragEnterEvent* e)
{
if (KCal::ICalDrag::canDecode(e))
e->accept(!AlarmListView::dragging()); // don't accept "text/calendar" objects from KAlarm
else
- e->accept(QTextDrag::canDecode(e)
+ e->accept(TQTextDrag::canDecode(e)
|| KURLDrag::canDecode(e)
|| KPIM::MailListDrag::canDecode(e));
}
@@ -1173,33 +1173,33 @@ void MainWindow::executeDragEnterEvent(QDragEnterEvent* e)
* Called when an object is dropped on the window.
* If the object is recognised, the edit alarm dialog is opened appropriately.
*/
-void MainWindow::dropEvent(QDropEvent* e)
+void MainWindow::dropEvent(TQDropEvent* e)
{
executeDropEvent(this, e);
}
-static QString getMailHeader(const char* header, KMime::Content& content)
+static TQString getMailHeader(const char* header, KMime::Content& content)
{
KMime::Headers::Base* hd = content.getHeaderByType(header);
- return hd ? hd->asUnicodeString() : QString::null;
+ return hd ? hd->asUnicodeString() : TQString::null;
}
/******************************************************************************
* Called when an object is dropped on a main or system tray window, to
* evaluate the action required and extract the text.
*/
-void MainWindow::executeDropEvent(MainWindow* win, QDropEvent* e)
+void MainWindow::executeDropEvent(MainWindow* win, TQDropEvent* e)
{
KAEvent::Action action = KAEvent::MESSAGE;
- QString text;
- QByteArray bytes;
+ TQString text;
+ TQByteArray bytes;
AlarmText alarmText;
KPIM::MailList mailList;
KURL::List files;
- KCal::CalendarLocal calendar(QString::fromLatin1("UTC"));
+ KCal::CalendarLocal calendar(TQString::fromLatin1("UTC"));
calendar.setLocalTime(); // default to local time (i.e. no time zone)
#ifndef NDEBUG
- QCString fmts;
+ TQCString fmts;
for (int idbg = 0; e->format(idbg); ++idbg)
{
if (idbg) fmts += ", ";
@@ -1217,11 +1217,11 @@ void MainWindow::executeDropEvent(MainWindow* win, QDropEvent* e)
{
// Email message(s). Ignore all but the first.
kdDebug(5950) << "MainWindow::executeDropEvent(email)" << endl;
- QCString mails(bytes.data(), bytes.size());
+ TQCString mails(bytes.data(), bytes.size());
KMime::Content content;
content.setContent(mails);
content.parse();
- QString body;
+ TQString body;
if (content.textContent())
content.textContent()->decodedText(body, true, true); // strip trailing newlines & spaces
unsigned long sernum = 0;
@@ -1254,10 +1254,10 @@ void MainWindow::executeDropEvent(MainWindow* win, QDropEvent* e)
if (!mailList.count())
return;
KPIM::MailSummary& summary = mailList.first();
- QDateTime dt;
+ TQDateTime dt;
dt.setTime_t(summary.date());
- QString body = KAMail::getMailBody(summary.serialNumber());
- alarmText.setEmail(summary.to(), summary.from(), QString::null,
+ TQString body = KAMail::getMailBody(summary.serialNumber());
+ alarmText.setEmail(summary.to(), summary.from(), TQString::null,
KGlobal::locale()->formatDateTime(dt), summary.subject(),
body, summary.serialNumber());
}
@@ -1273,7 +1273,7 @@ void MainWindow::executeDropEvent(MainWindow* win, QDropEvent* e)
}
return;
}
- else if (QTextDrag::decode(e, text))
+ else if (TQTextDrag::decode(e, text))
{
kdDebug(5950) << "MainWindow::executeDropEvent(text)" << endl;
alarmText.setText(text);
@@ -1292,15 +1292,15 @@ void MainWindow::executeDropEvent(MainWindow* win, QDropEvent* e)
void MainWindow::slotSelection()
{
// Find which item has been selected, and whether more than one is selected
- QValueList<EventListViewItemBase*> items = mListView->selectedItems();
+ TQValueList<EventListViewItemBase*> items = mListView->selectedItems();
int count = items.count();
AlarmListViewItem* item = (AlarmListViewItem*)((count == 1) ? items.first() : 0);
bool enableReactivate = true;
bool enableEnableDisable = true;
bool enableEnable = false;
bool enableDisable = false;
- QDateTime now = QDateTime::currentDateTime();
- for (QValueList<EventListViewItemBase*>::Iterator it = items.begin(); it != items.end(); ++it)
+ TQDateTime now = TQDateTime::currentDateTime();
+ for (TQValueList<EventListViewItemBase*>::Iterator it = items.begin(); it != items.end(); ++it)
{
const KAEvent& event = ((AlarmListViewItem*)(*it))->event();
if (enableReactivate
@@ -1336,7 +1336,7 @@ void MainWindow::slotSelection()
* Called when a context menu is requested either by a mouse click or by a
* key press.
*/
-void MainWindow::slotContextMenuRequested(QListViewItem* item, const QPoint& pt, int)
+void MainWindow::slotContextMenuRequested(TQListViewItem* item, const TQPoint& pt, int)
{
kdDebug(5950) << "MainWindow::slotContextMenuRequested()" << endl;
if (mContextMenu)
@@ -1348,7 +1348,7 @@ void MainWindow::slotContextMenuRequested(QListViewItem* item, const QPoint& pt,
* Deselects the current item and disables the actions if appropriate.
* Note that if a right button click is handled by slotContextMenuRequested().
*/
-void MainWindow::slotMouseClicked(int button, QListViewItem* item, const QPoint& pt, int)
+void MainWindow::slotMouseClicked(int button, TQListViewItem* item, const TQPoint& pt, int)
{
if (button != Qt::RightButton && !item)
{
@@ -1368,7 +1368,7 @@ void MainWindow::slotMouseClicked(int button, QListViewItem* item, const QPoint&
* Called when the mouse is double clicked on the ListView.
* Displays the Edit Alarm dialog, for the clicked item if applicable.
*/
-void MainWindow::slotDoubleClicked(QListViewItem* item)
+void MainWindow::slotDoubleClicked(TQListViewItem* item)
{
kdDebug(5950) << "MainWindow::slotDoubleClicked()\n";
if (item)
diff --git a/kalarm/mainwindow.h b/kalarm/mainwindow.h
index 7a11b8b86..21e47e05e 100644
--- a/kalarm/mainwindow.h
+++ b/kalarm/mainwindow.h
@@ -49,7 +49,7 @@ class MainWindow : public MainWindowBase
bool isTrayParent() const;
bool isHiddenTrayParent() const { return mHiddenTrayParent; }
bool showingExpired() const { return mShowExpired; }
- void selectEvent(const QString& eventID);
+ void selectEvent(const TQString& eventID);
static void refresh();
static void updateExpired();
@@ -59,33 +59,33 @@ class MainWindow : public MainWindowBase
static void executeNew(const KAEvent& e, MainWindow* w = 0)
{ executeNew(w, &e); }
static void executeEdit(KAEvent&, MainWindow* = 0);
- static void executeDragEnterEvent(QDragEnterEvent*);
- static void executeDropEvent(MainWindow*, QDropEvent*);
+ static void executeDragEnterEvent(TQDragEnterEvent*);
+ static void executeDropEvent(MainWindow*, TQDropEvent*);
static void closeAll();
static MainWindow* toggleWindow(MainWindow*);
static MainWindow* mainMainWindow();
static MainWindow* firstWindow() { return mWindowList.first(); }
static int count() { return mWindowList.count(); }
- static QString i18n_a_ShowAlarmTimes(); // text of 'Show Alarm Times' checkbox, with 'A' shortcut
- static QString i18n_m_ShowAlarmTime(); // text of 'Show alarm time' checkbox, with 'M' shortcut
- static QString i18n_o_ShowTimeToAlarms(); // text of 'Show Time to Alarms' checkbox, with 'O' shortcut
- static QString i18n_l_ShowTimeToAlarm(); // text of 'Show time until alarm' checkbox, with 'L' shortcut
- static QString i18n_ShowExpiredAlarms(); // plain text of 'Show Expired Alarms' action
- static QString i18n_e_ShowExpiredAlarms(); // text of 'Show Expired Alarms' checkbox, with 'E' shortcut
- static QString i18n_HideExpiredAlarms(); // plain text of 'Hide Expired Alarms' action
- static QString i18n_e_HideExpiredAlarms(); // text of 'Hide Expired Alarms' action, with 'E' shortcut
+ static TQString i18n_a_ShowAlarmTimes(); // text of 'Show Alarm Times' checkbox, with 'A' shortcut
+ static TQString i18n_m_ShowAlarmTime(); // text of 'Show alarm time' checkbox, with 'M' shortcut
+ static TQString i18n_o_ShowTimeToAlarms(); // text of 'Show Time to Alarms' checkbox, with 'O' shortcut
+ static TQString i18n_l_ShowTimeToAlarm(); // text of 'Show time until alarm' checkbox, with 'L' shortcut
+ static TQString i18n_ShowExpiredAlarms(); // plain text of 'Show Expired Alarms' action
+ static TQString i18n_e_ShowExpiredAlarms(); // text of 'Show Expired Alarms' checkbox, with 'E' shortcut
+ static TQString i18n_HideExpiredAlarms(); // plain text of 'Hide Expired Alarms' action
+ static TQString i18n_e_HideExpiredAlarms(); // text of 'Hide Expired Alarms' action, with 'E' shortcut
public slots:
virtual void show();
protected:
- virtual void resizeEvent(QResizeEvent*);
- virtual void showEvent(QShowEvent*);
- virtual void hideEvent(QHideEvent*);
- virtual void closeEvent(QCloseEvent*);
- virtual void dragEnterEvent(QDragEnterEvent*);
- virtual void dropEvent(QDropEvent*);
+ virtual void resizeEvent(TQResizeEvent*);
+ virtual void showEvent(TQShowEvent*);
+ virtual void hideEvent(TQHideEvent*);
+ virtual void closeEvent(TQCloseEvent*);
+ virtual void dragEnterEvent(TQDragEnterEvent*);
+ virtual void dropEvent(TQDropEvent*);
virtual void saveProperties(KConfig*);
virtual void readProperties(KConfig*);
@@ -112,9 +112,9 @@ class MainWindow : public MainWindowBase
void slotQuit();
void slotDeletion();
void slotSelection();
- void slotContextMenuRequested(QListViewItem*, const QPoint&, int);
- void slotMouseClicked(int button, QListViewItem*, const QPoint&, int);
- void slotDoubleClicked(QListViewItem*);
+ void slotContextMenuRequested(TQListViewItem*, const TQPoint&, int);
+ void slotMouseClicked(int button, TQListViewItem*, const TQPoint&, int);
+ void slotDoubleClicked(TQListViewItem*);
void slotShowTime();
void slotShowTimeTo();
void slotShowExpired();
@@ -125,7 +125,7 @@ class MainWindow : public MainWindowBase
void slotRedoItem(int id);
void slotInitUndoMenu();
void slotInitRedoMenu();
- void slotUndoStatus(const QString&, const QString&);
+ void slotUndoStatus(const TQString&, const TQString&);
void slotFindActive(bool);
void slotPrefsChanged();
void updateTrayIconAction();
@@ -133,13 +133,13 @@ class MainWindow : public MainWindowBase
void columnsReordered();
private:
- typedef QValueList<MainWindow*> WindowList;
+ typedef TQValueList<MainWindow*> WindowList;
MainWindow(bool restored);
void createListView(bool recreate);
void initActions();
void setEnableText(bool enable);
- static KAEvent::Action getDropAction(QDropEvent*, QString& text);
+ static KAEvent::Action getDropAction(TQDropEvent*, TQString& text);
static void executeNew(MainWindow*, const KAEvent*, KAEvent::Action = KAEvent::MESSAGE, const AlarmText& = AlarmText());
static void initUndoMenu(KPopupMenu*, Undo::Type);
static void setUpdateTimer();
diff --git a/kalarm/mainwindowbase.cpp b/kalarm/mainwindowbase.cpp
index 2f0cfa16b..80c68c532 100644
--- a/kalarm/mainwindowbase.cpp
+++ b/kalarm/mainwindowbase.cpp
@@ -28,7 +28,7 @@
* Called when a close event is received.
* Only quits the application if there is no system tray icon displayed.
*/
-void MainWindowBase::closeEvent(QCloseEvent* ce)
+void MainWindowBase::closeEvent(TQCloseEvent* ce)
{
disableQuit = theApp()->trayIconDisplayed();
KMainWindow::closeEvent(ce);
diff --git a/kalarm/mainwindowbase.h b/kalarm/mainwindowbase.h
index 32e339738..63467258e 100644
--- a/kalarm/mainwindowbase.h
+++ b/kalarm/mainwindowbase.h
@@ -36,11 +36,11 @@ class MainWindowBase : public KMainWindow
Q_OBJECT
public:
- explicit MainWindowBase(QWidget* parent = 0, const char* name = 0, WFlags f = WType_TopLevel | WDestructiveClose)
+ explicit MainWindowBase(TQWidget* parent = 0, const char* name = 0, WFlags f = WType_TopLevel | WDestructiveClose)
: KMainWindow(parent, name, f), disableQuit(false) { }
protected:
- virtual void closeEvent(QCloseEvent*);
+ virtual void closeEvent(TQCloseEvent*);
virtual bool queryExit();
private:
diff --git a/kalarm/messagewin.cpp b/kalarm/messagewin.cpp
index acee6b9b3..35d769c50 100644
--- a/kalarm/messagewin.cpp
+++ b/kalarm/messagewin.cpp
@@ -23,16 +23,16 @@
#include <stdlib.h>
#include <string.h>
-#include <qfile.h>
-#include <qfileinfo.h>
-#include <qlayout.h>
-#include <qpushbutton.h>
-#include <qlabel.h>
-#include <qwhatsthis.h>
-#include <qtooltip.h>
-#include <qdragobject.h>
-#include <qtextedit.h>
-#include <qtimer.h>
+#include <tqfile.h>
+#include <tqfileinfo.h>
+#include <tqlayout.h>
+#include <tqpushbutton.h>
+#include <tqlabel.h>
+#include <tqwhatsthis.h>
+#include <tqtooltip.h>
+#include <tqdragobject.h>
+#include <tqtextedit.h>
+#include <tqtimer.h>
#include <kstandarddirs.h>
#include <kaction.h>
@@ -93,32 +93,32 @@ static bool wantModal();
class MessageText : public QTextEdit
{
public:
- MessageText(const QString& text, const QString& context = QString::null, QWidget* parent = 0, const char* name = 0)
- : QTextEdit(text, context, parent, name)
+ MessageText(const TQString& text, const TQString& context = TQString::null, TQWidget* parent = 0, const char* name = 0)
+ : TQTextEdit(text, context, parent, name)
{
setReadOnly(true);
- setWordWrap(QTextEdit::NoWrap);
+ setWordWrap(TQTextEdit::NoWrap);
}
int scrollBarHeight() const { return horizontalScrollBar()->height(); }
int scrollBarWidth() const { return verticalScrollBar()->width(); }
- virtual QSize sizeHint() const { return QSize(contentsWidth() + scrollBarWidth(), contentsHeight() + scrollBarHeight()); }
+ virtual TQSize sizeHint() const { return TQSize(contentsWidth() + scrollBarWidth(), contentsHeight() + scrollBarHeight()); }
};
class MWMimeSourceFactory : public QMimeSourceFactory
{
public:
- MWMimeSourceFactory(const QString& absPath, KTextBrowser*);
+ MWMimeSourceFactory(const TQString& absPath, KTextBrowser*);
virtual ~MWMimeSourceFactory();
- virtual const QMimeSource* data(const QString& abs_name) const;
+ virtual const TQMimeSource* data(const TQString& abs_name) const;
private:
// Prohibit the following methods
- virtual void setData(const QString&, QMimeSource*) {}
- virtual void setExtensionType(const QString&, const char*) {}
+ virtual void setData(const TQString&, TQMimeSource*) {}
+ virtual void setExtensionType(const TQString&, const char*) {}
- QString mTextFile;
- QCString mMimeType;
- mutable const QMimeSource* mLast;
+ TQString mTextFile;
+ TQCString mMimeType;
+ mutable const TQMimeSource* mLast;
};
@@ -133,8 +133,8 @@ enum {
};
-QValueList<MessageWin*> MessageWin::mWindowList;
-QMap<QString, unsigned> MessageWin::mErrorMessages;
+TQValueList<MessageWin*> MessageWin::mWindowList;
+TQMap<TQString, unsigned> MessageWin::mErrorMessages;
/******************************************************************************
@@ -191,7 +191,7 @@ MessageWin::MessageWin(const KAEvent& event, const KAAlarm& alarm, bool reschedu
kdDebug(5950) << "MessageWin::MessageWin(event)" << endl;
// Set to save settings automatically, but don't save window size.
// File alarm window size is saved elsewhere.
- setAutoSaveSettings(QString::fromLatin1("MessageWin"), false);
+ setAutoSaveSettings(TQString::fromLatin1("MessageWin"), false);
initView();
mWindowList.append(this);
if (event.autoClose())
@@ -201,7 +201,7 @@ MessageWin::MessageWin(const KAEvent& event, const KAAlarm& alarm, bool reschedu
/******************************************************************************
* Construct the message window for a specified error message.
*/
-MessageWin::MessageWin(const KAEvent& event, const DateTime& alarmDateTime, const QStringList& errmsgs)
+MessageWin::MessageWin(const KAEvent& event, const DateTime& alarmDateTime, const TQStringList& errmsgs)
: MainWindowBase(0, "MessageWin", WFLAGS | Qt::WGroupLeader | Qt::WStyle_ContextHelp),
mMessage(event.cleanText()),
mDateTime(alarmDateTime),
@@ -290,38 +290,38 @@ void MessageWin::initView()
bool reminder = (!mErrorWindow && (mAlarmType & KAAlarm::REMINDER_ALARM));
int leading = fontMetrics().leading();
setCaption((mAlarmType & KAAlarm::REMINDER_ALARM) ? i18n("Reminder") : i18n("Message"));
- QWidget* topWidget = new QWidget(this, "messageWinTop");
+ TQWidget* topWidget = new TQWidget(this, "messageWinTop");
setCentralWidget(topWidget);
- QVBoxLayout* topLayout = new QVBoxLayout(topWidget, KDialog::marginHint(), KDialog::spacingHint());
+ TQVBoxLayout* topLayout = new TQVBoxLayout(topWidget, KDialog::marginHint(), KDialog::spacingHint());
if (mDateTime.isValid())
{
// Show the alarm date/time, together with an "Advance reminder" text where appropriate
- QFrame* frame = 0;
- QVBoxLayout* layout = topLayout;
+ TQFrame* frame = 0;
+ TQVBoxLayout* layout = topLayout;
if (reminder)
{
- frame = new QFrame(topWidget);
- frame->setFrameStyle(QFrame::Box | QFrame::Raised);
+ frame = new TQFrame(topWidget);
+ frame->setFrameStyle(TQFrame::Box | TQFrame::Raised);
topLayout->addWidget(frame, 0, Qt::AlignHCenter);
- layout = new QVBoxLayout(frame, leading + frame->frameWidth(), leading);
+ layout = new TQVBoxLayout(frame, leading + frame->frameWidth(), leading);
}
// Alarm date/time
- QLabel* label = new QLabel(frame ? frame : topWidget);
+ TQLabel* label = new TQLabel(frame ? frame : topWidget);
label->setText(mDateTime.isDateOnly()
? KGlobal::locale()->formatDate(mDateTime.date(), true)
: KGlobal::locale()->formatDateTime(mDateTime.dateTime()));
if (!frame)
- label->setFrameStyle(QFrame::Box | QFrame::Raised);
+ label->setFrameStyle(TQFrame::Box | TQFrame::Raised);
label->setFixedSize(label->sizeHint());
layout->addWidget(label, 0, Qt::AlignHCenter);
- QWhatsThis::add(label,
+ TQWhatsThis::add(label,
i18n("The scheduled date/time for the message (as opposed to the actual time of display)."));
if (frame)
{
- label = new QLabel(frame);
+ label = new TQLabel(frame);
label->setText(i18n("Reminder"));
label->setFixedSize(label->sizeHint());
layout->addWidget(label, 0, Qt::AlignHCenter);
@@ -337,21 +337,21 @@ void MessageWin::initView()
case KAEvent::FILE:
{
// Display the file name
- QLabel* label = new QLabel(mMessage, topWidget);
- label->setFrameStyle(QFrame::Box | QFrame::Raised);
+ TQLabel* label = new TQLabel(mMessage, topWidget);
+ label->setFrameStyle(TQFrame::Box | TQFrame::Raised);
label->setFixedSize(label->sizeHint());
- QWhatsThis::add(label, i18n("The file whose contents are displayed below"));
+ TQWhatsThis::add(label, i18n("The file whose contents are displayed below"));
topLayout->addWidget(label, 0, Qt::AlignHCenter);
// Display contents of file
bool opened = false;
bool dir = false;
- QString tmpFile;
+ TQString tmpFile;
KURL url(mMessage);
if (KIO::NetAccess::download(url, tmpFile, MainWindow::mainMainWindow()))
{
- QFile qfile(tmpFile);
- QFileInfo info(qfile);
+ TQFile qfile(tmpFile);
+ TQFileInfo info(qfile);
if (!(dir = info.isDir()))
{
opened = true;
@@ -365,8 +365,8 @@ void MessageWin::initView()
// is overridden by the user-set default stored in the config file.
// So there is no need to calculate an accurate size.
int h = 20*view->fontMetrics().lineSpacing() + 2*view->frameWidth();
- view->resize(QSize(h, h).expandedTo(view->sizeHint()));
- QWhatsThis::add(view, i18n("The contents of the file to be displayed"));
+ view->resize(TQSize(h, h).expandedTo(view->sizeHint()));
+ TQWhatsThis::add(view, i18n("The contents of the file to be displayed"));
}
KIO::NetAccess::removeTempFile(tmpFile);
}
@@ -381,19 +381,19 @@ void MessageWin::initView()
case KAEvent::MESSAGE:
{
// Message label
- // Using MessageText instead of QLabel allows scrolling and mouse copying
- MessageText* text = new MessageText(mMessage, QString::null, topWidget);
- text->setFrameStyle(QFrame::NoFrame);
+ // Using MessageText instead of TQLabel allows scrolling and mouse copying
+ MessageText* text = new MessageText(mMessage, TQString::null, topWidget);
+ text->setFrameStyle(TQFrame::NoFrame);
text->setPaper(mBgColour);
text->setPaletteForegroundColor(mFgColour);
text->setFont(mFont);
int lineSpacing = text->fontMetrics().lineSpacing();
- QSize s = text->sizeHint();
+ TQSize s = text->sizeHint();
int h = s.height();
text->setMaximumHeight(h + text->scrollBarHeight());
text->setMinimumHeight(QMIN(h, lineSpacing*4));
text->setMaximumWidth(s.width() + text->scrollBarWidth());
- QWhatsThis::add(text, i18n("The alarm message"));
+ TQWhatsThis::add(text, i18n("The alarm message"));
int vspace = lineSpacing/2;
int hspace = lineSpacing - KDialog::marginHint();
topLayout->addSpacing(vspace);
@@ -405,7 +405,7 @@ void MessageWin::initView()
topLayout->addWidget(text, 1, Qt::AlignHCenter);
else
{
- QBoxLayout* layout = new QHBoxLayout(topLayout);
+ TQBoxLayout* layout = new TQHBoxLayout(topLayout);
layout->addSpacing(hspace);
layout->addWidget(text, 1, Qt::AlignHCenter);
layout->addSpacing(hspace);
@@ -423,18 +423,18 @@ void MessageWin::initView()
if (reminder)
{
// Reminder: show remaining time until the actual alarm
- mRemainingText = new QLabel(topWidget);
- mRemainingText->setFrameStyle(QFrame::Box | QFrame::Raised);
+ mRemainingText = new TQLabel(topWidget);
+ mRemainingText->setFrameStyle(TQFrame::Box | TQFrame::Raised);
mRemainingText->setMargin(leading);
- if (mDateTime.isDateOnly() || QDate::currentDate().daysTo(mDateTime.date()) > 0)
+ if (mDateTime.isDateOnly() || TQDate::currentDate().daysTo(mDateTime.date()) > 0)
{
setRemainingTextDay();
- MidnightTimer::connect(this, SLOT(setRemainingTextDay())); // update every day
+ MidnightTimer::connect(this, TQT_SLOT(setRemainingTextDay())); // update every day
}
else
{
setRemainingTextMinute();
- MinuteTimer::connect(this, SLOT(setRemainingTextMinute())); // update every minute
+ MinuteTimer::connect(this, TQT_SLOT(setRemainingTextMinute())); // update every minute
}
topLayout->addWidget(mRemainingText, 0, Qt::AlignHCenter);
topLayout->addSpacing(KDialog::spacingHint());
@@ -449,23 +449,23 @@ void MessageWin::initView()
case KAEvent::EMAIL:
{
// Display the email addresses and subject.
- QFrame* frame = new QFrame(topWidget);
- frame->setFrameStyle(QFrame::Box | QFrame::Raised);
- QWhatsThis::add(frame, i18n("The email to send"));
+ TQFrame* frame = new TQFrame(topWidget);
+ frame->setFrameStyle(TQFrame::Box | TQFrame::Raised);
+ TQWhatsThis::add(frame, i18n("The email to send"));
topLayout->addWidget(frame, 0, Qt::AlignHCenter);
- QGridLayout* grid = new QGridLayout(frame, 2, 2, KDialog::marginHint(), KDialog::spacingHint());
+ TQGridLayout* grid = new TQGridLayout(frame, 2, 2, KDialog::marginHint(), KDialog::spacingHint());
- QLabel* label = new QLabel(i18n("Email addressee", "To:"), frame);
+ TQLabel* label = new TQLabel(i18n("Email addressee", "To:"), frame);
label->setFixedSize(label->sizeHint());
grid->addWidget(label, 0, 0, Qt::AlignLeft);
- label = new QLabel(mEvent.emailAddresses("\n"), frame);
+ label = new TQLabel(mEvent.emailAddresses("\n"), frame);
label->setFixedSize(label->sizeHint());
grid->addWidget(label, 0, 1, Qt::AlignLeft);
- label = new QLabel(i18n("Email subject", "Subject:"), frame);
+ label = new TQLabel(i18n("Email subject", "Subject:"), frame);
label->setFixedSize(label->sizeHint());
grid->addWidget(label, 1, 0, Qt::AlignLeft);
- label = new QLabel(mEvent.emailSubject(), frame);
+ label = new TQLabel(mEvent.emailSubject(), frame);
label->setFixedSize(label->sizeHint());
grid->addWidget(label, 1, 1, Qt::AlignLeft);
break;
@@ -484,24 +484,24 @@ void MessageWin::initView()
else
{
setCaption(i18n("Error"));
- QBoxLayout* layout = new QHBoxLayout(topLayout);
+ TQBoxLayout* layout = new TQHBoxLayout(topLayout);
layout->setMargin(2*KDialog::marginHint());
layout->addStretch();
- QLabel* label = new QLabel(topWidget);
+ TQLabel* label = new TQLabel(topWidget);
label->setPixmap(DesktopIcon("error"));
label->setFixedSize(label->sizeHint());
layout->addWidget(label, 0, Qt::AlignRight);
- QBoxLayout* vlayout = new QVBoxLayout(layout);
- for (QStringList::Iterator it = mErrorMsgs.begin(); it != mErrorMsgs.end(); ++it)
+ TQBoxLayout* vlayout = new TQVBoxLayout(layout);
+ for (TQStringList::Iterator it = mErrorMsgs.begin(); it != mErrorMsgs.end(); ++it)
{
- label = new QLabel(*it, topWidget);
+ label = new TQLabel(*it, topWidget);
label->setFixedSize(label->sizeHint());
vlayout->addWidget(label, 0, Qt::AlignLeft);
}
layout->addStretch();
}
- QGridLayout* grid = new QGridLayout(1, 4);
+ TQGridLayout* grid = new TQGridLayout(1, 4);
topLayout->addLayout(grid);
grid->setColStretch(0, 1); // keep the buttons right-adjusted in the window
int gridIndex = 1;
@@ -510,32 +510,32 @@ void MessageWin::initView()
mOkButton = new KPushButton(KStdGuiItem::close(), topWidget);
// Prevent accidental acknowledgement of the message if the user is typing when the window appears
mOkButton->clearFocus();
- mOkButton->setFocusPolicy(QWidget::ClickFocus); // don't allow keyboard selection
+ mOkButton->setFocusPolicy(TQWidget::ClickFocus); // don't allow keyboard selection
mOkButton->setFixedSize(mOkButton->sizeHint());
- connect(mOkButton, SIGNAL(clicked()), SLOT(close()));
+ connect(mOkButton, TQT_SIGNAL(clicked()), TQT_SLOT(close()));
grid->addWidget(mOkButton, 0, gridIndex++, AlignHCenter);
- QWhatsThis::add(mOkButton, i18n("Acknowledge the alarm"));
+ TQWhatsThis::add(mOkButton, i18n("Acknowledge the alarm"));
if (mShowEdit)
{
// Edit button
- mEditButton = new QPushButton(i18n("&Edit..."), topWidget);
- mEditButton->setFocusPolicy(QWidget::ClickFocus); // don't allow keyboard selection
+ mEditButton = new TQPushButton(i18n("&Edit..."), topWidget);
+ mEditButton->setFocusPolicy(TQWidget::ClickFocus); // don't allow keyboard selection
mEditButton->setFixedSize(mEditButton->sizeHint());
- connect(mEditButton, SIGNAL(clicked()), SLOT(slotEdit()));
+ connect(mEditButton, TQT_SIGNAL(clicked()), TQT_SLOT(slotEdit()));
grid->addWidget(mEditButton, 0, gridIndex++, AlignHCenter);
- QWhatsThis::add(mEditButton, i18n("Edit the alarm."));
+ TQWhatsThis::add(mEditButton, i18n("Edit the alarm."));
}
if (!mNoDefer)
{
// Defer button
- mDeferButton = new QPushButton(i18n("&Defer..."), topWidget);
- mDeferButton->setFocusPolicy(QWidget::ClickFocus); // don't allow keyboard selection
+ mDeferButton = new TQPushButton(i18n("&Defer..."), topWidget);
+ mDeferButton->setFocusPolicy(TQWidget::ClickFocus); // don't allow keyboard selection
mDeferButton->setFixedSize(mDeferButton->sizeHint());
- connect(mDeferButton, SIGNAL(clicked()), SLOT(slotDefer()));
+ connect(mDeferButton, TQT_SIGNAL(clicked()), TQT_SLOT(slotDefer()));
grid->addWidget(mDeferButton, 0, gridIndex++, AlignHCenter);
- QWhatsThis::add(mDeferButton,
+ TQWhatsThis::add(mDeferButton,
i18n("Defer the alarm until later.\n"
"You will be prompted to specify when the alarm should be redisplayed."));
@@ -546,14 +546,14 @@ void MessageWin::initView()
if (!mAudioFile.isEmpty() && (mVolume || mFadeVolume > 0))
{
// Silence button to stop sound repetition
- QPixmap pixmap = MainBarIcon("player_stop");
- mSilenceButton = new QPushButton(topWidget);
+ TQPixmap pixmap = MainBarIcon("player_stop");
+ mSilenceButton = new TQPushButton(topWidget);
mSilenceButton->setPixmap(pixmap);
mSilenceButton->setFixedSize(mSilenceButton->sizeHint());
- connect(mSilenceButton, SIGNAL(clicked()), SLOT(stopPlay()));
+ connect(mSilenceButton, TQT_SIGNAL(clicked()), TQT_SLOT(stopPlay()));
grid->addWidget(mSilenceButton, 0, gridIndex++, AlignHCenter);
- QToolTip::add(mSilenceButton, i18n("Stop sound"));
- QWhatsThis::add(mSilenceButton, i18n("Stop playing the sound"));
+ TQToolTip::add(mSilenceButton, i18n("Stop sound"));
+ TQWhatsThis::add(mSilenceButton, i18n("Stop playing the sound"));
// To avoid getting in a mess, disable the button until sound playing has been set up
mSilenceButton->setEnabled(false);
}
@@ -563,28 +563,28 @@ void MessageWin::initView()
if (mKMailSerialNumber)
{
// KMail button
- QPixmap pixmap = iconLoader.loadIcon(QString::fromLatin1("kmail"), KIcon::MainToolbar);
- mKMailButton = new QPushButton(topWidget);
+ TQPixmap pixmap = iconLoader.loadIcon(TQString::fromLatin1("kmail"), KIcon::MainToolbar);
+ mKMailButton = new TQPushButton(topWidget);
mKMailButton->setPixmap(pixmap);
mKMailButton->setFixedSize(mKMailButton->sizeHint());
- connect(mKMailButton, SIGNAL(clicked()), SLOT(slotShowKMailMessage()));
+ connect(mKMailButton, TQT_SIGNAL(clicked()), TQT_SLOT(slotShowKMailMessage()));
grid->addWidget(mKMailButton, 0, gridIndex++, AlignHCenter);
- QToolTip::add(mKMailButton, i18n("Locate this email in KMail", "Locate in KMail"));
- QWhatsThis::add(mKMailButton, i18n("Locate and highlight this email in KMail"));
+ TQToolTip::add(mKMailButton, i18n("Locate this email in KMail", "Locate in KMail"));
+ TQWhatsThis::add(mKMailButton, i18n("Locate and highlight this email in KMail"));
}
else
mKMailButton = 0;
// KAlarm button
- QPixmap pixmap = iconLoader.loadIcon(QString::fromLatin1(kapp->aboutData()->appName()), KIcon::MainToolbar);
- mKAlarmButton = new QPushButton(topWidget);
+ TQPixmap pixmap = iconLoader.loadIcon(TQString::fromLatin1(kapp->aboutData()->appName()), KIcon::MainToolbar);
+ mKAlarmButton = new TQPushButton(topWidget);
mKAlarmButton->setPixmap(pixmap);
mKAlarmButton->setFixedSize(mKAlarmButton->sizeHint());
- connect(mKAlarmButton, SIGNAL(clicked()), SLOT(displayMainWindow()));
+ connect(mKAlarmButton, TQT_SIGNAL(clicked()), TQT_SLOT(displayMainWindow()));
grid->addWidget(mKAlarmButton, 0, gridIndex++, AlignHCenter);
- QString actKAlarm = i18n("Activate KAlarm");
- QToolTip::add(mKAlarmButton, actKAlarm);
- QWhatsThis::add(mKAlarmButton, actKAlarm);
+ TQString actKAlarm = i18n("Activate KAlarm");
+ TQToolTip::add(mKAlarmButton, actKAlarm);
+ TQWhatsThis::add(mKAlarmButton, actKAlarm);
// Disable all buttons initially, to prevent accidental clicking on if they happen to be
// under the mouse just as the window appears.
@@ -598,7 +598,7 @@ void MessageWin::initView()
mKAlarmButton->setEnabled(false);
topLayout->activate();
- setMinimumSize(QSize(grid->sizeHint().width() + 2*KDialog::marginHint(), sizeHint().height()));
+ setMinimumSize(TQSize(grid->sizeHint().width() + 2*KDialog::marginHint(), sizeHint().height()));
bool modal = !(getWFlags() & Qt::WX11BypassWM);
@@ -614,14 +614,14 @@ void MessageWin::initView()
*/
void MessageWin::setRemainingTextDay()
{
- QString text;
- int days = QDate::currentDate().daysTo(mDateTime.date());
+ TQString text;
+ int days = TQDate::currentDate().daysTo(mDateTime.date());
if (days <= 0 && !mDateTime.isDateOnly())
{
// The alarm is due today, so start refreshing every minute
- MidnightTimer::disconnect(this, SLOT(setRemainingTextDay()));
+ MidnightTimer::disconnect(this, TQT_SLOT(setRemainingTextDay()));
setRemainingTextMinute();
- MinuteTimer::connect(this, SLOT(setRemainingTextMinute())); // update every minute
+ MinuteTimer::connect(this, TQT_SLOT(setRemainingTextMinute())); // update every minute
}
else
{
@@ -641,8 +641,8 @@ void MessageWin::setRemainingTextDay()
*/
void MessageWin::setRemainingTextMinute()
{
- QString text;
- int mins = (QDateTime::currentDateTime().secsTo(mDateTime.dateTime()) + 59) / 60;
+ TQString text;
+ int mins = (TQDateTime::currentDateTime().secsTo(mDateTime.dateTime()) + 59) / 60;
if (mins < 60)
text = i18n("in 1 minute's time", "in %n minutes' time", (mins > 0 ? mins : 0));
else if (mins % 60 == 0)
@@ -662,38 +662,38 @@ void MessageWin::saveProperties(KConfig* config)
{
if (mShown && !mErrorWindow)
{
- config->writeEntry(QString::fromLatin1("EventID"), mEventID);
- config->writeEntry(QString::fromLatin1("AlarmType"), mAlarmType);
- config->writeEntry(QString::fromLatin1("Message"), mMessage);
- config->writeEntry(QString::fromLatin1("Type"), mAction);
- config->writeEntry(QString::fromLatin1("Font"), mFont);
- config->writeEntry(QString::fromLatin1("BgColour"), mBgColour);
- config->writeEntry(QString::fromLatin1("FgColour"), mFgColour);
- config->writeEntry(QString::fromLatin1("ConfirmAck"), mConfirmAck);
+ config->writeEntry(TQString::fromLatin1("EventID"), mEventID);
+ config->writeEntry(TQString::fromLatin1("AlarmType"), mAlarmType);
+ config->writeEntry(TQString::fromLatin1("Message"), mMessage);
+ config->writeEntry(TQString::fromLatin1("Type"), mAction);
+ config->writeEntry(TQString::fromLatin1("Font"), mFont);
+ config->writeEntry(TQString::fromLatin1("BgColour"), mBgColour);
+ config->writeEntry(TQString::fromLatin1("FgColour"), mFgColour);
+ config->writeEntry(TQString::fromLatin1("ConfirmAck"), mConfirmAck);
if (mDateTime.isValid())
{
- config->writeEntry(QString::fromLatin1("Time"), mDateTime.dateTime());
- config->writeEntry(QString::fromLatin1("DateOnly"), mDateTime.isDateOnly());
+ config->writeEntry(TQString::fromLatin1("Time"), mDateTime.dateTime());
+ config->writeEntry(TQString::fromLatin1("DateOnly"), mDateTime.isDateOnly());
}
if (mCloseTime.isValid())
- config->writeEntry(QString::fromLatin1("Expiry"), mCloseTime);
+ config->writeEntry(TQString::fromLatin1("Expiry"), mCloseTime);
#ifndef WITHOUT_ARTS
if (mAudioRepeat && mSilenceButton && mSilenceButton->isEnabled())
{
// Only need to restart sound file playing if it's being repeated
- config->writePathEntry(QString::fromLatin1("AudioFile"), mAudioFile);
- config->writeEntry(QString::fromLatin1("Volume"), static_cast<int>(mVolume * 100));
+ config->writePathEntry(TQString::fromLatin1("AudioFile"), mAudioFile);
+ config->writeEntry(TQString::fromLatin1("Volume"), static_cast<int>(mVolume * 100));
}
#endif
- config->writeEntry(QString::fromLatin1("Speak"), mSpeak);
- config->writeEntry(QString::fromLatin1("Height"), height());
- config->writeEntry(QString::fromLatin1("DeferMins"), mDefaultDeferMinutes);
- config->writeEntry(QString::fromLatin1("NoDefer"), mNoDefer);
- config->writeEntry(QString::fromLatin1("NoPostAction"), mNoPostAction);
- config->writeEntry(QString::fromLatin1("KMailSerial"), mKMailSerialNumber);
+ config->writeEntry(TQString::fromLatin1("Speak"), mSpeak);
+ config->writeEntry(TQString::fromLatin1("Height"), height());
+ config->writeEntry(TQString::fromLatin1("DeferMins"), mDefaultDeferMinutes);
+ config->writeEntry(TQString::fromLatin1("NoDefer"), mNoDefer);
+ config->writeEntry(TQString::fromLatin1("NoPostAction"), mNoPostAction);
+ config->writeEntry(TQString::fromLatin1("KMailSerial"), mKMailSerialNumber);
}
else
- config->writeEntry(QString::fromLatin1("Invalid"), true);
+ config->writeEntry(TQString::fromLatin1("Invalid"), true);
}
/******************************************************************************
@@ -703,34 +703,34 @@ void MessageWin::saveProperties(KConfig* config)
*/
void MessageWin::readProperties(KConfig* config)
{
- mInvalid = config->readBoolEntry(QString::fromLatin1("Invalid"), false);
- mEventID = config->readEntry(QString::fromLatin1("EventID"));
- mAlarmType = KAAlarm::Type(config->readNumEntry(QString::fromLatin1("AlarmType")));
- mMessage = config->readEntry(QString::fromLatin1("Message"));
- mAction = KAEvent::Action(config->readNumEntry(QString::fromLatin1("Type")));
- mFont = config->readFontEntry(QString::fromLatin1("Font"));
- mBgColour = config->readColorEntry(QString::fromLatin1("BgColour"));
- mFgColour = config->readColorEntry(QString::fromLatin1("FgColour"));
- mConfirmAck = config->readBoolEntry(QString::fromLatin1("ConfirmAck"));
- QDateTime invalidDateTime;
- QDateTime dt = config->readDateTimeEntry(QString::fromLatin1("Time"), &invalidDateTime);
- bool dateOnly = config->readBoolEntry(QString::fromLatin1("DateOnly"));
+ mInvalid = config->readBoolEntry(TQString::fromLatin1("Invalid"), false);
+ mEventID = config->readEntry(TQString::fromLatin1("EventID"));
+ mAlarmType = KAAlarm::Type(config->readNumEntry(TQString::fromLatin1("AlarmType")));
+ mMessage = config->readEntry(TQString::fromLatin1("Message"));
+ mAction = KAEvent::Action(config->readNumEntry(TQString::fromLatin1("Type")));
+ mFont = config->readFontEntry(TQString::fromLatin1("Font"));
+ mBgColour = config->readColorEntry(TQString::fromLatin1("BgColour"));
+ mFgColour = config->readColorEntry(TQString::fromLatin1("FgColour"));
+ mConfirmAck = config->readBoolEntry(TQString::fromLatin1("ConfirmAck"));
+ TQDateTime invalidDateTime;
+ TQDateTime dt = config->readDateTimeEntry(TQString::fromLatin1("Time"), &invalidDateTime);
+ bool dateOnly = config->readBoolEntry(TQString::fromLatin1("DateOnly"));
mDateTime.set(dt, dateOnly);
- mCloseTime = config->readDateTimeEntry(QString::fromLatin1("Expiry"), &invalidDateTime);
+ mCloseTime = config->readDateTimeEntry(TQString::fromLatin1("Expiry"), &invalidDateTime);
#ifndef WITHOUT_ARTS
- mAudioFile = config->readPathEntry(QString::fromLatin1("AudioFile"));
- mVolume = static_cast<float>(config->readNumEntry(QString::fromLatin1("Volume"))) / 100;
+ mAudioFile = config->readPathEntry(TQString::fromLatin1("AudioFile"));
+ mVolume = static_cast<float>(config->readNumEntry(TQString::fromLatin1("Volume"))) / 100;
mFadeVolume = -1;
mFadeSeconds = 0;
if (!mAudioFile.isEmpty())
mAudioRepeat = true;
#endif
- mSpeak = config->readBoolEntry(QString::fromLatin1("Speak"));
- mRestoreHeight = config->readNumEntry(QString::fromLatin1("Height"));
- mDefaultDeferMinutes = config->readNumEntry(QString::fromLatin1("DeferMins"));
- mNoDefer = config->readBoolEntry(QString::fromLatin1("NoDefer"));
- mNoPostAction = config->readBoolEntry(QString::fromLatin1("NoPostAction"));
- mKMailSerialNumber = config->readUnsignedLongNumEntry(QString::fromLatin1("KMailSerial"));
+ mSpeak = config->readBoolEntry(TQString::fromLatin1("Speak"));
+ mRestoreHeight = config->readNumEntry(TQString::fromLatin1("Height"));
+ mDefaultDeferMinutes = config->readNumEntry(TQString::fromLatin1("DeferMins"));
+ mNoDefer = config->readBoolEntry(TQString::fromLatin1("NoDefer"));
+ mNoPostAction = config->readBoolEntry(TQString::fromLatin1("NoPostAction"));
+ mKMailSerialNumber = config->readUnsignedLongNumEntry(TQString::fromLatin1("KMailSerial"));
mShowEdit = false;
kdDebug(5950) << "MessageWin::readProperties(" << mEventID << ")" << endl;
if (mAlarmType != KAAlarm::INVALID_ALARM)
@@ -761,9 +761,9 @@ void MessageWin::readProperties(KConfig* config)
* Returns the existing message window (if any) which is displaying the event
* with the specified ID.
*/
-MessageWin* MessageWin::findEvent(const QString& eventID)
+MessageWin* MessageWin::findEvent(const TQString& eventID)
{
- for (QValueList<MessageWin*>::Iterator it = mWindowList.begin(); it != mWindowList.end(); ++it)
+ for (TQValueList<MessageWin*>::Iterator it = mWindowList.begin(); it != mWindowList.end(); ++it)
{
MessageWin* w = *it;
if (w->mEventID == eventID && !w->mErrorWindow)
@@ -781,29 +781,29 @@ void MessageWin::playAudio()
{
// Beep using two methods, in case the sound card/speakers are switched off or not working
KNotifyClient::beep(); // beep through the sound card & speakers
- QApplication::beep(); // beep through the internal speaker
+ TQApplication::beep(); // beep through the internal speaker
}
if (!mAudioFile.isEmpty())
{
if (!mVolume && mFadeVolume <= 0)
return; // ensure zero volume doesn't play anything
#ifdef WITHOUT_ARTS
- QString play = mAudioFile;
- QString file = QString::fromLatin1("file:");
+ TQString play = mAudioFile;
+ TQString file = TQString::fromLatin1("file:");
if (mAudioFile.startsWith(file))
play = mAudioFile.mid(file.length());
- KAudioPlayer::play(QFile::encodeName(play));
+ KAudioPlayer::play(TQFile::encodeName(play));
#else
// An audio file is specified. Because loading it may take some time,
// call it on a timer to allow the window to display first.
- QTimer::singleShot(0, this, SLOT(slotPlayAudio()));
+ TQTimer::singleShot(0, this, TQT_SLOT(slotPlayAudio()));
#endif
}
else if (mSpeak)
{
// The message is to be spoken. In case of error messges,
// call it on a timer to allow the window to display first.
- QTimer::singleShot(0, this, SLOT(slotSpeak()));
+ TQTimer::singleShot(0, this, TQT_SLOT(slotSpeak()));
}
}
@@ -817,8 +817,8 @@ void MessageWin::slotSpeak()
if (!client->isApplicationRegistered("kttsd"))
{
// kttsd is not running, so start it
- QString error;
- if (kapp->startServiceByDesktopName("kttsd", QStringList(), &error))
+ TQString error;
+ if (kapp->startServiceByDesktopName("kttsd", TQStringList(), &error))
{
kdDebug(5950) << "MessageWin::slotSpeak(): failed to start kttsd: " << error << endl;
if (!haveErrorMessage(ErrMsg_Speak))
@@ -829,10 +829,10 @@ void MessageWin::slotSpeak()
return;
}
}
- QByteArray data;
- QDataStream arg(data, IO_WriteOnly);
+ TQByteArray data;
+ TQDataStream arg(data, IO_WriteOnly);
arg << mMessage << "";
- if (!client->send("kttsd", "KSpeech", "sayMessage(QString,QString)", data))
+ if (!client->send("kttsd", "KSpeech", "sayMessage(TQString,TQString)", data))
{
kdDebug(5950) << "MessageWin::slotSpeak(): sayMessage() DCOP error" << endl;
if (!haveErrorMessage(ErrMsg_Speak))
@@ -867,11 +867,11 @@ void MessageWin::slotPlayAudio()
if (!mArtsDispatcher)
{
mFadeTimer = 0;
- mPlayTimer = new QTimer(this);
- connect(mPlayTimer, SIGNAL(timeout()), SLOT(checkAudioPlay()));
+ mPlayTimer = new TQTimer(this);
+ connect(mPlayTimer, TQT_SIGNAL(timeout()), TQT_SLOT(checkAudioPlay()));
mArtsDispatcher = new KArtsDispatcher;
mPlayedOnce = false;
- mAudioFileStart = QTime::currentTime();
+ mAudioFileStart = TQTime::currentTime();
initAudio(true);
if (!mPlayObject->object().isNull())
checkAudioPlay();
@@ -883,7 +883,7 @@ void MessageWin::slotPlayAudio()
if (!haveErrorMessage(ErrMsg_Volume))
{
KMessageBox::information(this, i18n("Unable to set master volume\n(Error accessing KMix:\n%1)").arg(mKMixError),
- QString::null, QString::fromLatin1("KMixError"));
+ TQString::null, TQString::fromLatin1("KMixError"));
clearErrorMessage(ErrMsg_Volume);
}
}
@@ -935,7 +935,7 @@ void MessageWin::initAudio(bool firstTime)
}
mSilenceButton->setEnabled(true);
mPlayed = false;
- connect(mPlayObject, SIGNAL(playObjectCreated()), SLOT(checkAudioPlay()));
+ connect(mPlayObject, TQT_SIGNAL(playObjectCreated()), TQT_SLOT(checkAudioPlay()));
if (!mPlayObject->object().isNull())
checkAudioPlay();
}
@@ -967,7 +967,7 @@ void MessageWin::checkAudioPlay()
if (!mPlayedOnce)
{
// Start playing the file for the first time
- QTime now = QTime::currentTime();
+ TQTime now = TQTime::currentTime();
mAudioFileLoadSecs = mAudioFileStart.secsTo(now);
if (mAudioFileLoadSecs < 0)
mAudioFileLoadSecs += 86400;
@@ -975,8 +975,8 @@ void MessageWin::checkAudioPlay()
{
// Set up volume fade
mAudioFileStart = now;
- mFadeTimer = new QTimer(this);
- connect(mFadeTimer, SIGNAL(timeout()), SLOT(slotFade()));
+ mFadeTimer = new TQTimer(this);
+ connect(mFadeTimer, TQT_SIGNAL(timeout()), TQT_SLOT(slotFade()));
mFadeTimer->start(1000); // adjust volume every second
}
mPlayedOnce = true;
@@ -1058,7 +1058,7 @@ void MessageWin::stopPlay()
if (!mLocalAudioFile.isEmpty())
{
KIO::NetAccess::removeTempFile(mLocalAudioFile); // removes it only if it IS a temporary file
- mLocalAudioFile = QString::null;
+ mLocalAudioFile = TQString::null;
}
if (mSilenceButton)
mSilenceButton->setEnabled(false);
@@ -1071,7 +1071,7 @@ void MessageWin::stopPlay()
void MessageWin::slotFade()
{
#ifndef WITHOUT_ARTS
- QTime now = QTime::currentTime();
+ TQTime now = TQTime::currentTime();
int elapsed = mAudioFileStart.secsTo(now);
if (elapsed < 0)
elapsed += 86400; // it's the next day
@@ -1114,14 +1114,14 @@ int MessageWin::getKMixVolume()
{
if (!KAlarm::runProgram(KMIX_APP_NAME, KMIX_DCOP_WINDOW, mKMixName, mKMixError)) // start KMix if it isn't already running
return -1;
- QByteArray data, replyData;
- QCString replyType;
- QDataStream arg(data, IO_WriteOnly);
+ TQByteArray data, replyData;
+ TQCString replyType;
+ TQDataStream arg(data, IO_WriteOnly);
if (!kapp->dcopClient()->call(mKMixName, KMIX_DCOP_OBJECT, "masterVolume()", data, replyType, replyData)
|| replyType != "int")
return -1;
int result;
- QDataStream reply(replyData, IO_ReadOnly);
+ TQDataStream reply(replyData, IO_ReadOnly);
reply >> result;
return (result >= 0) ? result : 0;
}
@@ -1135,8 +1135,8 @@ void MessageWin::setKMixVolume(int percent)
return;
if (!KAlarm::runProgram(KMIX_APP_NAME, KMIX_DCOP_WINDOW, mKMixName, mKMixError)) // start KMix if it isn't already running
return;
- QByteArray data;
- QDataStream arg(data, IO_WriteOnly);
+ TQByteArray data;
+ TQDataStream arg(data, IO_WriteOnly);
arg << percent;
if (!kapp->dcopClient()->send(mKMixName, KMIX_DCOP_OBJECT, "setMasterVolume(int)", data))
kdError(5950) << "MessageWin::setKMixVolume(): kmix dcop call failed\n";
@@ -1183,10 +1183,10 @@ void MessageWin::show()
if (mCloseTime.isValid())
{
// Set a timer to auto-close the window
- int delay = QDateTime::currentDateTime().secsTo(mCloseTime);
+ int delay = TQDateTime::currentDateTime().secsTo(mCloseTime);
if (delay < 0)
delay = 0;
- QTimer::singleShot(delay * 1000, this, SLOT(close()));
+ TQTimer::singleShot(delay * 1000, this, TQT_SLOT(close()));
if (!delay)
return; // don't show the window if auto-closing is already due
}
@@ -1200,16 +1200,16 @@ void MessageWin::show()
* For message windows, the size if limited to fit inside the working area of
* the desktop.
*/
-QSize MessageWin::sizeHint() const
+TQSize MessageWin::sizeHint() const
{
if (mAction != KAEvent::MESSAGE)
return MainWindowBase::sizeHint();
if (!mWinModule)
mWinModule = new KWinModule(0, KWinModule::INFO_DESKTOP);
- QSize frame = frameGeometry().size();
- QSize contents = geometry().size();
- QSize desktop = mWinModule->workArea().size();
- QSize maxSize(desktop.width() - (frame.width() - contents.width()),
+ TQSize frame = frameGeometry().size();
+ TQSize contents = geometry().size();
+ TQSize desktop = mWinModule->workArea().size();
+ TQSize maxSize(desktop.width() - (frame.width() - contents.width()),
desktop.height() - (frame.height() - contents.height()));
return MainWindowBase::sizeHint().boundedTo(maxSize);
}
@@ -1219,7 +1219,7 @@ QSize MessageWin::sizeHint() const
* The first time, output any required audio notification, and reschedule or
* delete the event from the calendar file.
*/
-void MessageWin::showEvent(QShowEvent* se)
+void MessageWin::showEvent(TQShowEvent* se)
{
MainWindowBase::showEvent(se);
if (!mShown)
@@ -1233,7 +1233,7 @@ void MessageWin::showEvent(QShowEvent* se)
* method is called, so for large windows the size needs to be
* set again later.
*/
- QSize s = sizeHint(); // fit the window round the message
+ TQSize s = sizeHint(); // fit the window round the message
if (mAction == KAEvent::FILE && !mErrorMsgs.count())
KAlarm::readConfigWindowSize("FileMessage", s);
resize(s);
@@ -1258,18 +1258,18 @@ void MessageWin::showEvent(QShowEvent* se)
* message is displayed on a screen other than that currently being
* worked with, it might not be noticed.)
*/
- QPoint cursor = QCursor::pos();
+ TQPoint cursor = TQCursor::pos();
if (!mWinModule)
mWinModule = new KWinModule(0, KWinModule::INFO_DESKTOP);
- QRect desk = mWinModule->workArea();
- QDesktopWidget* dw = QApplication::desktop();
+ TQRect desk = mWinModule->workArea();
+ TQDesktopWidget* dw = TQApplication::desktop();
if (dw->numScreens() > 1)
desk &= dw->screenGeometry(dw->screenNumber(cursor));
- QRect frame = frameGeometry();
- QRect rect = geometry();
+ TQRect frame = frameGeometry();
+ TQRect rect = geometry();
// Find the offsets from the outside of the frame to the edges of the OK button
- QRect button(mOkButton->mapToParent(QPoint(0, 0)), mOkButton->mapToParent(mOkButton->rect().bottomRight()));
+ TQRect button(mOkButton->mapToParent(TQPoint(0, 0)), mOkButton->mapToParent(mOkButton->rect().bottomRight()));
int buttonLeft = button.left() + rect.left() - frame.left();
int buttonRight = width() - button.right() + frame.right() - rect.right();
int buttonTop = button.top() + rect.top() - frame.top();
@@ -1282,7 +1282,7 @@ void MessageWin::showEvent(QShowEvent* se)
// Find the enclosing rectangle for the new button positions
// and check if the cursor is too near
- QRect buttons = mOkButton->geometry().unite(mKAlarmButton->geometry());
+ TQRect buttons = mOkButton->geometry().unite(mKAlarmButton->geometry());
buttons.moveBy(rect.left() + x - frame.left(), rect.top() + y - frame.top());
int minDistance = proximityMultiple * mOkButton->height();
if ((abs(cursor.x() - buttons.left()) < minDistance
@@ -1302,7 +1302,7 @@ void MessageWin::showEvent(QShowEvent* se)
if (mAction == KAEvent::MESSAGE)
{
// Set the window size once the frame size is known
- QTimer::singleShot(0, this, SLOT(setMaxSize()));
+ TQTimer::singleShot(0, this, TQT_SLOT(setMaxSize()));
}
}
mShown = true;
@@ -1312,7 +1312,7 @@ void MessageWin::showEvent(QShowEvent* se)
/******************************************************************************
* Called when the window has been moved.
*/
-void MessageWin::moveEvent(QMoveEvent* e)
+void MessageWin::moveEvent(TQMoveEvent* e)
{
MainWindowBase::moveEvent(e);
if (mPositioning)
@@ -1328,7 +1328,7 @@ void MessageWin::moveEvent(QMoveEvent* e)
*/
void MessageWin::setMaxSize()
{
- QSize s = sizeHint();
+ TQSize s = sizeHint();
if (width() > s.width() || height() > s.height())
resize(s);
}
@@ -1345,7 +1345,7 @@ void MessageWin::displayComplete()
// Enable the window's buttons either now or after the configured delay
if (mButtonDelay > 0)
- QTimer::singleShot(mButtonDelay, this, SLOT(enableButtons()));
+ TQTimer::singleShot(mButtonDelay, this, TQT_SLOT(enableButtons()));
else
enableButtons();
}
@@ -1368,14 +1368,14 @@ void MessageWin::enableButtons()
/******************************************************************************
* Called when the window's size has changed (before it is painted).
*/
-void MessageWin::resizeEvent(QResizeEvent* re)
+void MessageWin::resizeEvent(TQResizeEvent* re)
{
if (mRestoreHeight)
{
// Restore the window height on session restoration
if (mRestoreHeight != re->size().height())
{
- QSize size = re->size();
+ TQSize size = re->size();
size.setHeight(mRestoreHeight);
resize(size);
}
@@ -1394,7 +1394,7 @@ void MessageWin::resizeEvent(QResizeEvent* re)
* Called when a close event is received.
* Only quits the application if there is no system tray icon displayed.
*/
-void MessageWin::closeEvent(QCloseEvent* ce)
+void MessageWin::closeEvent(TQCloseEvent* ce)
{
// Don't prompt or delete the alarm from the display calendar if the session is closing
if (!mErrorWindow && !theApp()->sessionClosingDown())
@@ -1428,21 +1428,21 @@ void MessageWin::slotShowKMailMessage()
kdDebug(5950) << "MessageWin::slotShowKMailMessage()\n";
if (!mKMailSerialNumber)
return;
- QString err = KAlarm::runKMail(false);
+ TQString err = KAlarm::runKMail(false);
if (!err.isNull())
{
KMessageBox::sorry(this, err);
return;
}
- QCString replyType;
- QByteArray data, replyData;
- QDataStream arg(data, IO_WriteOnly);
- arg << (Q_UINT32)mKMailSerialNumber << QString::null;
- if (kapp->dcopClient()->call("kmail", KMAIL_DCOP_OBJECT, "showMail(Q_UINT32,QString)", data, replyType, replyData)
+ TQCString replyType;
+ TQByteArray data, replyData;
+ TQDataStream arg(data, IO_WriteOnly);
+ arg << (Q_UINT32)mKMailSerialNumber << TQString::null;
+ if (kapp->dcopClient()->call("kmail", KMAIL_DCOP_OBJECT, "showMail(Q_UINT32,TQString)", data, replyType, replyData)
&& replyType == "bool")
{
bool result;
- QDataStream replyStream(replyData, IO_ReadOnly);
+ TQDataStream replyStream(replyData, IO_ReadOnly);
replyStream >> result;
if (result)
return; // success
@@ -1459,7 +1459,7 @@ void MessageWin::slotEdit()
{
kdDebug(5950) << "MessageWin::slotEdit()" << endl;
EditAlarmDlg editDlg(false, i18n("Edit Alarm"), this, "editDlg", &mEvent);
- if (editDlg.exec() == QDialog::Accepted)
+ if (editDlg.exec() == TQDialog::Accepted)
{
KAEvent event;
editDlg.getEvent(event);
@@ -1497,7 +1497,7 @@ void MessageWin::setDeferralLimit(const KAEvent& event)
if (mDeferButton)
{
mDeferLimit = event.deferralLimit().dateTime();
- MidnightTimer::connect(this, SLOT(checkDeferralLimit())); // check every day
+ MidnightTimer::connect(this, TQT_SLOT(checkDeferralLimit())); // check every day
mDisableDeferral = false;
checkDeferralLimit();
}
@@ -1506,27 +1506,27 @@ void MessageWin::setDeferralLimit(const KAEvent& event)
/******************************************************************************
* Check whether the deferral limit has been reached.
* If so, disable the Defer button.
-* N.B. Ideally, just a single QTimer::singleShot() call would be made to disable
+* N.B. Ideally, just a single TQTimer::singleShot() call would be made to disable
* the defer button at the corret time. But for a 32-bit integer, the
* milliseconds parameter overflows in about 25 days, so instead a daily
* check is done until the day when the deferral limit is reached, followed
-* by a non-overflowing QTimer::singleShot() call.
+* by a non-overflowing TQTimer::singleShot() call.
*/
void MessageWin::checkDeferralLimit()
{
if (!mDeferButton || !mDeferLimit.isValid())
return;
- int n = QDate::currentDate().daysTo(mDeferLimit.date());
+ int n = TQDate::currentDate().daysTo(mDeferLimit.date());
if (n > 0)
return;
- MidnightTimer::disconnect(this, SLOT(checkDeferralLimit()));
+ MidnightTimer::disconnect(this, TQT_SLOT(checkDeferralLimit()));
if (n == 0)
{
// The deferral limit will be reached today
- n = QTime::currentTime().secsTo(mDeferLimit.time());
+ n = TQTime::currentTime().secsTo(mDeferLimit.time());
if (n > 0)
{
- QTimer::singleShot(n * 1000, this, SLOT(checkDeferralLimit()));
+ TQTimer::singleShot(n * 1000, this, TQT_SLOT(checkDeferralLimit()));
return;
}
}
@@ -1540,14 +1540,14 @@ void MessageWin::checkDeferralLimit()
*/
void MessageWin::slotDefer()
{
- mDeferDlg = new DeferAlarmDlg(i18n("Defer Alarm"), QDateTime::currentDateTime().addSecs(60),
+ mDeferDlg = new DeferAlarmDlg(i18n("Defer Alarm"), TQDateTime::currentDateTime().addSecs(60),
false, this, "deferDlg");
if (mDefaultDeferMinutes > 0)
mDeferDlg->setDeferMinutes(mDefaultDeferMinutes);
mDeferDlg->setLimit(mEventID);
if (!Preferences::modalMessages())
lower();
- if (mDeferDlg->exec() == QDialog::Accepted)
+ if (mDeferDlg->exec() == TQDialog::Accepted)
{
DateTime dateTime = mDeferDlg->getDateTime();
int delayMins = mDeferDlg->deferMinutes();
@@ -1664,16 +1664,16 @@ bool wantModal()
/*=============================================================================
= Class MWMimeSourceFactory
* Gets the mime type of a text file from not only its extension (as per
-* QMimeSourceFactory), but also from its contents. This allows the detection
+* TQMimeSourceFactory), but also from its contents. This allows the detection
* of plain text files without file name extensions.
=============================================================================*/
-MWMimeSourceFactory::MWMimeSourceFactory(const QString& absPath, KTextBrowser* view)
- : QMimeSourceFactory(),
+MWMimeSourceFactory::MWMimeSourceFactory(const TQString& absPath, KTextBrowser* view)
+ : TQMimeSourceFactory(),
mMimeType("text/plain"),
mLast(0)
{
view->setMimeSourceFactory(this);
- QString type = KMimeType::findByPath(absPath)->name();
+ TQString type = KMimeType::findByPath(absPath)->name();
switch (KAlarm::fileType(type))
{
case KAlarm::TextPlain:
@@ -1684,18 +1684,18 @@ MWMimeSourceFactory::MWMimeSourceFactory(const QString& absPath, KTextBrowser* v
default:
// It's assumed to be a text file
mTextFile = absPath;
- view->QTextBrowser::setSource(absPath);
+ view->TQTextBrowser::setSource(absPath);
break;
case KAlarm::Image:
// It's an image file
- QString text = "<img source=\"";
+ TQString text = "<img source=\"";
text += absPath;
text += "\">";
view->setText(text);
break;
}
- setFilePath(QFileInfo(absPath).dirPath(true));
+ setFilePath(TQFileInfo(absPath).dirPath(true));
}
MWMimeSourceFactory::~MWMimeSourceFactory()
@@ -1703,19 +1703,19 @@ MWMimeSourceFactory::~MWMimeSourceFactory()
delete mLast;
}
-const QMimeSource* MWMimeSourceFactory::data(const QString& abs_name) const
+const TQMimeSource* MWMimeSourceFactory::data(const TQString& abs_name) const
{
if (abs_name == mTextFile)
{
- QFileInfo fi(abs_name);
+ TQFileInfo fi(abs_name);
if (fi.isReadable())
{
- QFile f(abs_name);
+ TQFile f(abs_name);
if (f.open(IO_ReadOnly) && f.size())
{
- QByteArray ba(f.size());
+ TQByteArray ba(f.size());
f.readBlock(ba.data(), ba.size());
- QStoredDrag* sr = new QStoredDrag(mMimeType);
+ TQStoredDrag* sr = new TQStoredDrag(mMimeType);
sr->setEncodedData(ba);
delete mLast;
mLast = sr;
@@ -1723,5 +1723,5 @@ const QMimeSource* MWMimeSourceFactory::data(const QString& abs_name) const
}
}
}
- return QMimeSourceFactory::data(abs_name);
+ return TQMimeSourceFactory::data(abs_name);
}
diff --git a/kalarm/messagewin.h b/kalarm/messagewin.h
index 0a10b39ce..d8f49ec4b 100644
--- a/kalarm/messagewin.h
+++ b/kalarm/messagewin.h
@@ -23,7 +23,7 @@
/** @file messagewin.h - displays an alarm message */
-#include <qmap.h>
+#include <tqmap.h>
#include "mainwindowbase.h"
#include "alarmevent.h"
@@ -47,7 +47,7 @@ class MessageWin : public MainWindowBase
public:
MessageWin(); // for session management restoration only
MessageWin(const KAEvent&, const KAAlarm&, bool reschedule_event = true, bool allowDefer = true);
- MessageWin(const KAEvent&, const DateTime& alarmDateTime, const QStringList& errmsgs);
+ MessageWin(const KAEvent&, const DateTime& alarmDateTime, const TQStringList& errmsgs);
~MessageWin();
void repeat(const KAAlarm&);
void setRecreating() { mRecreating = true; }
@@ -56,15 +56,15 @@ class MessageWin : public MainWindowBase
bool hasDefer() const { return !!mDeferButton; }
bool isValid() const { return !mInvalid; }
virtual void show();
- virtual QSize sizeHint() const;
+ virtual TQSize sizeHint() const;
static int instanceCount() { return mWindowList.count(); }
- static MessageWin* findEvent(const QString& eventID);
+ static MessageWin* findEvent(const TQString& eventID);
protected:
- virtual void showEvent(QShowEvent*);
- virtual void moveEvent(QMoveEvent*);
- virtual void resizeEvent(QResizeEvent*);
- virtual void closeEvent(QCloseEvent*);
+ virtual void showEvent(TQShowEvent*);
+ virtual void moveEvent(TQMoveEvent*);
+ virtual void resizeEvent(TQResizeEvent*);
+ virtual void closeEvent(TQCloseEvent*);
virtual void saveProperties(KConfig*);
virtual void readProperties(KConfig*);
@@ -97,16 +97,16 @@ class MessageWin : public MainWindowBase
bool haveErrorMessage(unsigned msg) const;
void clearErrorMessage(unsigned msg) const;
- static QValueList<MessageWin*> mWindowList; // list of existing message windows
- static QMap<QString, unsigned> mErrorMessages; // error messages currently displayed, by event ID
+ static TQValueList<MessageWin*> mWindowList; // list of existing message windows
+ static TQMap<TQString, unsigned> mErrorMessages; // error messages currently displayed, by event ID
// Properties needed by readProperties()
- QString mMessage;
- QFont mFont;
- QColor mBgColour, mFgColour;
+ TQString mMessage;
+ TQFont mFont;
+ TQColor mBgColour, mFgColour;
DateTime mDateTime; // date/time displayed in the message window
- QDateTime mCloseTime; // time at which window should be auto-closed
- QString mEventID;
- QString mAudioFile;
+ TQDateTime mCloseTime; // time at which window should be auto-closed
+ TQString mEventID;
+ TQString mAudioFile;
float mVolume;
float mFadeVolume;
int mFadeSeconds;
@@ -114,7 +114,7 @@ class MessageWin : public MainWindowBase
KAAlarm::Type mAlarmType;
KAEvent::Action mAction;
unsigned long mKMailSerialNumber; // if email text, message's KMail serial number, else 0
- QStringList mErrorMsgs;
+ TQStringList mErrorMsgs;
int mRestoreHeight;
bool mAudioRepeat;
bool mConfirmAck;
@@ -124,27 +124,27 @@ class MessageWin : public MainWindowBase
// Sound file playing
KArtsDispatcher* mArtsDispatcher;
KDE::PlayObject* mPlayObject;
- QCString mKMixName; // DCOP name for KMix
- QString mKMixError; // error message starting KMix
- QTimer* mPlayTimer; // timer for repeating the sound file
- QTimer* mFadeTimer; // timer for fading the sound volume
+ TQCString mKMixName; // DCOP name for KMix
+ TQString mKMixError; // error message starting KMix
+ TQTimer* mPlayTimer; // timer for repeating the sound file
+ TQTimer* mFadeTimer; // timer for fading the sound volume
float mOldVolume; // volume before volume was set for sound file
- QString mLocalAudioFile; // local copy of audio file
- QTime mAudioFileStart; // time when audio file loading first started, or when play first started
+ TQString mLocalAudioFile; // local copy of audio file
+ TQTime mAudioFileStart; // time when audio file loading first started, or when play first started
int mAudioFileLoadSecs; // how many seconds it took to load audio file
bool mPlayedOnce; // the sound file has started playing at least once
bool mPlayed; // the PlayObject->play() has been called
// Miscellaneous
KAEvent mEvent; // the whole event, for updating the calendar file
- QLabel* mRemainingText; // the remaining time (for a reminder window)
+ TQLabel* mRemainingText; // the remaining time (for a reminder window)
KPushButton* mOkButton;
- QPushButton* mEditButton;
- QPushButton* mDeferButton;
- QPushButton* mSilenceButton;
- QPushButton* mKAlarmButton;
- QPushButton* mKMailButton;
+ TQPushButton* mEditButton;
+ TQPushButton* mDeferButton;
+ TQPushButton* mSilenceButton;
+ TQPushButton* mKAlarmButton;
+ TQPushButton* mKMailButton;
DeferAlarmDlg* mDeferDlg;
- QDateTime mDeferLimit; // last time to which the message can currently be deferred
+ TQDateTime mDeferLimit; // last time to which the message can currently be deferred
mutable KWinModule* mWinModule;
int mFlags;
int mLateCancel;
diff --git a/kalarm/pickfileradio.cpp b/kalarm/pickfileradio.cpp
index c00276502..15b56d942 100644
--- a/kalarm/pickfileradio.cpp
+++ b/kalarm/pickfileradio.cpp
@@ -20,9 +20,9 @@
#include "kalarm.h"
-#include <qbuttongroup.h>
-#include <qpushbutton.h>
-#include <qtimer.h>
+#include <tqbuttongroup.h>
+#include <tqpushbutton.h>
+#include <tqtimer.h>
#include <kdebug.h>
@@ -30,7 +30,7 @@
#include "pickfileradio.moc"
-PickFileRadio::PickFileRadio(QPushButton* button, LineEdit* edit, const QString& text, QButtonGroup* parent, const char* name)
+PickFileRadio::PickFileRadio(TQPushButton* button, LineEdit* edit, const TQString& text, TQButtonGroup* parent, const char* name)
: RadioButton(text, parent, name),
mGroup(parent),
mEdit(edit),
@@ -41,13 +41,13 @@ PickFileRadio::PickFileRadio(QPushButton* button, LineEdit* edit, const QString&
Q_ASSERT(parent);
Q_ASSERT(button);
mButton->setEnabled(false);
- connect(mButton, SIGNAL(clicked()), SLOT(slotPickFile()));
+ connect(mButton, TQT_SIGNAL(clicked()), TQT_SLOT(slotPickFile()));
if (mEdit)
mEdit->setEnabled(false);
- connect(mGroup, SIGNAL(buttonSet(int)), SLOT(slotSelectionChanged(int)));
+ connect(mGroup, TQT_SIGNAL(buttonSet(int)), TQT_SLOT(slotSelectionChanged(int)));
}
-PickFileRadio::PickFileRadio(const QString& text, QButtonGroup* parent, const char* name)
+PickFileRadio::PickFileRadio(const TQString& text, TQButtonGroup* parent, const char* name)
: RadioButton(text, parent, name),
mGroup(parent),
mEdit(0),
@@ -58,16 +58,16 @@ PickFileRadio::PickFileRadio(const QString& text, QButtonGroup* parent, const ch
Q_ASSERT(parent);
}
-void PickFileRadio::init(QPushButton* button, LineEdit* edit)
+void PickFileRadio::init(TQPushButton* button, LineEdit* edit)
{
Q_ASSERT(button);
mEdit = edit;
mButton = button;
mButton->setEnabled(false);
- connect(mButton, SIGNAL(clicked()), SLOT(slotPickFile()));
+ connect(mButton, TQT_SIGNAL(clicked()), TQT_SLOT(slotPickFile()));
if (mEdit)
mEdit->setEnabled(false);
- connect(mGroup, SIGNAL(buttonSet(int)), SLOT(slotSelectionChanged(int)));
+ connect(mGroup, TQT_SIGNAL(buttonSet(int)), TQT_SLOT(slotSelectionChanged(int)));
setReadOnly(RadioButton::isReadOnly());
}
@@ -85,12 +85,12 @@ void PickFileRadio::setReadOnly(bool ro)
}
}
-void PickFileRadio::setFile(const QString& file)
+void PickFileRadio::setFile(const TQString& file)
{
mFile = file;
}
-QString PickFileRadio::file() const
+TQString PickFileRadio::file() const
{
return mEdit ? mEdit->text() : mFile;
}
@@ -165,7 +165,7 @@ void PickFileRadio::slotPickFile()
// No file is selected, so revert to the previous radio button selection.
// But wait a moment before setting the radio button, or it won't work.
mRevertId = true; // prevent picker dialogue popping up twice
- QTimer::singleShot(0, this, SLOT(setLastId()));
+ TQTimer::singleShot(0, this, TQT_SLOT(setLastId()));
}
}
diff --git a/kalarm/pickfileradio.h b/kalarm/pickfileradio.h
index 5486a8a6e..974d55023 100644
--- a/kalarm/pickfileradio.h
+++ b/kalarm/pickfileradio.h
@@ -58,19 +58,19 @@ class PickFileRadio : public RadioButton
* @param parent Button group which is to be the parent object for the radio button.
* @param name The name of this widget.
*/
- PickFileRadio(QPushButton* button, LineEdit* edit, const QString& text, QButtonGroup* parent, const char* name = 0);
+ PickFileRadio(TQPushButton* button, LineEdit* edit, const TQString& text, TQButtonGroup* parent, const char* name = 0);
/** Constructor.
* The init() method must be called before the widget can be used.
* @param text Radio button's text.
* @param parent Button group which is to be the parent object for the radio button.
* @param name The name of this widget.
*/
- PickFileRadio(const QString& text, QButtonGroup* parent, const char* name = 0);
+ PickFileRadio(const TQString& text, TQButtonGroup* parent, const char* name = 0);
/** Initialises the widget.
* @param button Push button to invoke the file picker dialogue.
* @param edit File name edit widget, or null if there is none.
*/
- void init(QPushButton* button, LineEdit* edit = 0);
+ void init(TQPushButton* button, LineEdit* edit = 0);
/** Sets whether the radio button and associated widgets are read-only for the user.
* If read-only, their states cannot be changed by the user.
* @param readOnly True to set the widgets read-only, false to set them read-write.
@@ -79,21 +79,21 @@ class PickFileRadio : public RadioButton
/** Chooses a file, for example by displaying a file selection dialogue.
* This method is called when the push button is clicked - the client
* should not activate a file selection dialogue directly.
- * @return Selected file name, or QString::null if no selection made.
+ * @return Selected file name, or TQString::null if no selection made.
*/
- virtual QString pickFile() = 0;
+ virtual TQString pickFile() = 0;
/** Notifies the widget of the currently selected file name.
* This should only be used when no file name edit box is used.
* It should be called to initialise the widget's data, and also any time the file
* name is changed without using the push button.
*/
- void setFile(const QString& file);
+ void setFile(const TQString& file);
/** Returns the currently selected file name. */
- QString file() const;
+ TQString file() const;
/** Returns the associated file name edit widget, or null if none. */
LineEdit* fileEdit() const { return mEdit; }
/** Returns the associated file browse push button. */
- QPushButton* pushButton() const { return mButton; }
+ TQPushButton* pushButton() const { return mButton; }
public slots:
/** Enables or disables the radio button, and adjusts the enabled state of the
@@ -109,10 +109,10 @@ class PickFileRadio : public RadioButton
private:
bool pickFileIfNone();
- QButtonGroup* mGroup; // button group which radio button is in
+ TQButtonGroup* mGroup; // button group which radio button is in
LineEdit* mEdit; // file name edit box, or null if none
- QPushButton* mButton; // push button to pick a file
- QString mFile; // saved file name (if mEdit is null)
+ TQPushButton* mButton; // push button to pick a file
+ TQString mFile; // saved file name (if mEdit is null)
int mLastId; // previous radio button selected
bool mRevertId; // true to revert to the previous radio button selection
};
diff --git a/kalarm/prefdlg.cpp b/kalarm/prefdlg.cpp
index 2b07c4995..ff312416d 100644
--- a/kalarm/prefdlg.cpp
+++ b/kalarm/prefdlg.cpp
@@ -20,18 +20,18 @@
#include "kalarm.h"
-#include <qobjectlist.h>
-#include <qlayout.h>
-#include <qbuttongroup.h>
-#include <qvbox.h>
-#include <qlineedit.h>
-#include <qcheckbox.h>
-#include <qradiobutton.h>
-#include <qpushbutton.h>
-#include <qcombobox.h>
-#include <qwhatsthis.h>
-#include <qtooltip.h>
-#include <qstyle.h>
+#include <tqobjectlist.h>
+#include <tqlayout.h>
+#include <tqbuttongroup.h>
+#include <tqvbox.h>
+#include <tqlineedit.h>
+#include <tqcheckbox.h>
+#include <tqradiobutton.h>
+#include <tqpushbutton.h>
+#include <tqcombobox.h>
+#include <tqwhatsthis.h>
+#include <tqtooltip.h>
+#include <tqstyle.h>
#include <kglobal.h>
#include <klocale.h>
@@ -80,14 +80,14 @@
// %w = command to execute in terminal, with 'sleep 86400' appended
// %C = temporary command file to execute in terminal
// %W = temporary command file to execute in terminal, with 'sleep 86400' appended
-static QString xtermCommands[] = {
- QString::fromLatin1("xterm -sb -hold -title %t -e %c"),
- QString::fromLatin1("konsole --noclose -T %t -e ${SHELL:-sh} -c %c"),
- QString::fromLatin1("gnome-terminal -t %t -e %W"),
- QString::fromLatin1("eterm --pause -T %t -e %C"), // some systems use eterm...
- QString::fromLatin1("Eterm --pause -T %t -e %C"), // while some use Eterm
- QString::fromLatin1("rxvt -title %t -e ${SHELL:-sh} -c %w"),
- QString::null // end of list indicator - don't change!
+static TQString xtermCommands[] = {
+ TQString::fromLatin1("xterm -sb -hold -title %t -e %c"),
+ TQString::fromLatin1("konsole --noclose -T %t -e ${SHELL:-sh} -c %c"),
+ TQString::fromLatin1("gnome-terminal -t %t -e %W"),
+ TQString::fromLatin1("eterm --pause -T %t -e %C"), // some systems use eterm...
+ TQString::fromLatin1("Eterm --pause -T %t -e %C"), // while some use Eterm
+ TQString::fromLatin1("rxvt -title %t -e ${SHELL:-sh} -c %w"),
+ TQString::null // end of list indicator - don't change!
};
@@ -122,7 +122,7 @@ KAlarmPrefDlg::KAlarmPrefDlg()
setWFlags(Qt::WDestructiveClose);
setIconListAllVisible(true);
- QVBox* frame = addVBoxPage(i18n("General"), i18n("General"), DesktopIcon("misc"));
+ TQVBox* frame = addVBoxPage(i18n("General"), i18n("General"), DesktopIcon("misc"));
mMiscPage = new MiscPrefTab(frame);
frame = addVBoxPage(i18n("Email"), i18n("Email Alarm Settings"), DesktopIcon("mail_generic"));
@@ -166,7 +166,7 @@ void KAlarmPrefDlg::slotHelp()
void KAlarmPrefDlg::slotApply()
{
kdDebug(5950) << "KAlarmPrefDlg::slotApply()" << endl;
- QString errmsg = mEmailPage->validate();
+ TQString errmsg = mEmailPage->validate();
if (!errmsg.isEmpty())
{
showPage(pageIndex(mEmailPage->parentWidget()));
@@ -228,12 +228,12 @@ void KAlarmPrefDlg::restore()
=============================================================================*/
int PrefsTabBase::mIndentWidth = 0;
-PrefsTabBase::PrefsTabBase(QVBox* frame)
- : QWidget(frame),
+PrefsTabBase::PrefsTabBase(TQVBox* frame)
+ : TQWidget(frame),
mPage(frame)
{
if (!mIndentWidth)
- mIndentWidth = style().subRect(QStyle::SR_RadioButtonIndicator, this).width();
+ mIndentWidth = style().subRect(TQStyle::SR_RadioButtonIndicator, this).width();
}
void PrefsTabBase::apply(bool syncToDisc)
@@ -247,24 +247,24 @@ void PrefsTabBase::apply(bool syncToDisc)
= Class MiscPrefTab
=============================================================================*/
-MiscPrefTab::MiscPrefTab(QVBox* frame)
+MiscPrefTab::MiscPrefTab(TQVBox* frame)
: PrefsTabBase(frame)
{
- // Get alignment to use in QGridLayout (AlignAuto doesn't work correctly there)
- int alignment = QApplication::reverseLayout() ? Qt::AlignRight : Qt::AlignLeft;
+ // Get alignment to use in TQGridLayout (AlignAuto doesn't work correctly there)
+ int alignment = TQApplication::reverseLayout() ? Qt::AlignRight : Qt::AlignLeft;
- QGroupBox* group = new QButtonGroup(i18n("Run Mode"), mPage, "modeGroup");
- QGridLayout* grid = new QGridLayout(group, 6, 2, KDialog::marginHint(), KDialog::spacingHint());
+ TQGroupBox* group = new TQButtonGroup(i18n("Run Mode"), mPage, "modeGroup");
+ TQGridLayout* grid = new TQGridLayout(group, 6, 2, KDialog::marginHint(), KDialog::spacingHint());
grid->setColStretch(2, 1);
grid->addColSpacing(0, indentWidth());
grid->addColSpacing(1, indentWidth());
grid->addRowSpacing(0, fontMetrics().lineSpacing()/2);
// Run-on-demand radio button
- mRunOnDemand = new QRadioButton(i18n("&Run only on demand"), group, "runDemand");
+ mRunOnDemand = new TQRadioButton(i18n("&Run only on demand"), group, "runDemand");
mRunOnDemand->setFixedSize(mRunOnDemand->sizeHint());
- connect(mRunOnDemand, SIGNAL(toggled(bool)), SLOT(slotRunModeToggled(bool)));
- QWhatsThis::add(mRunOnDemand,
+ connect(mRunOnDemand, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotRunModeToggled(bool)));
+ TQWhatsThis::add(mRunOnDemand,
i18n("Check to run KAlarm only when required.\n\n"
"Notes:\n"
"1. Alarms are displayed even when KAlarm is not running, since alarm monitoring is done by the alarm daemon.\n"
@@ -272,10 +272,10 @@ MiscPrefTab::MiscPrefTab(QVBox* frame)
grid->addMultiCellWidget(mRunOnDemand, 1, 1, 0, 2, alignment);
// Run-in-system-tray radio button
- mRunInSystemTray = new QRadioButton(i18n("Run continuously in system &tray"), group, "runTray");
+ mRunInSystemTray = new TQRadioButton(i18n("Run continuously in system &tray"), group, "runTray");
mRunInSystemTray->setFixedSize(mRunInSystemTray->sizeHint());
- connect(mRunInSystemTray, SIGNAL(toggled(bool)), SLOT(slotRunModeToggled(bool)));
- QWhatsThis::add(mRunInSystemTray,
+ connect(mRunInSystemTray, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotRunModeToggled(bool)));
+ TQWhatsThis::add(mRunInSystemTray,
i18n("Check to run KAlarm continuously in the KDE system tray.\n\n"
"Notes:\n"
"1. With this option selected, closing the system tray icon will quit KAlarm.\n"
@@ -284,117 +284,117 @@ MiscPrefTab::MiscPrefTab(QVBox* frame)
grid->addMultiCellWidget(mRunInSystemTray, 2, 2, 0, 2, alignment);
// Run continuously options
- mDisableAlarmsIfStopped = new QCheckBox(i18n("Disa&ble alarms while not running"), group, "disableAl");
+ mDisableAlarmsIfStopped = new TQCheckBox(i18n("Disa&ble alarms while not running"), group, "disableAl");
mDisableAlarmsIfStopped->setFixedSize(mDisableAlarmsIfStopped->sizeHint());
- connect(mDisableAlarmsIfStopped, SIGNAL(toggled(bool)), SLOT(slotDisableIfStoppedToggled(bool)));
- QWhatsThis::add(mDisableAlarmsIfStopped,
+ connect(mDisableAlarmsIfStopped, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotDisableIfStoppedToggled(bool)));
+ TQWhatsThis::add(mDisableAlarmsIfStopped,
i18n("Check to disable alarms whenever KAlarm is not running. Alarms will only appear while the system tray icon is visible."));
grid->addMultiCellWidget(mDisableAlarmsIfStopped, 3, 3, 1, 2, alignment);
- mQuitWarn = new QCheckBox(i18n("Warn before &quitting"), group, "disableAl");
+ mQuitWarn = new TQCheckBox(i18n("Warn before &quitting"), group, "disableAl");
mQuitWarn->setFixedSize(mQuitWarn->sizeHint());
- QWhatsThis::add(mQuitWarn,
+ TQWhatsThis::add(mQuitWarn,
i18n("Check to display a warning prompt before quitting KAlarm."));
grid->addWidget(mQuitWarn, 4, 2, alignment);
- mAutostartTrayIcon = new QCheckBox(i18n("Autostart at &login"), group, "autoTray");
+ mAutostartTrayIcon = new TQCheckBox(i18n("Autostart at &login"), group, "autoTray");
#ifdef AUTOSTART_BY_KALARMD
- connect(mAutostartTrayIcon, SIGNAL(toggled(bool)), SLOT(slotAutostartToggled(bool)));
+ connect(mAutostartTrayIcon, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotAutostartToggled(bool)));
#endif
grid->addMultiCellWidget(mAutostartTrayIcon, 5, 5, 0, 2, alignment);
// Autostart alarm daemon
- mAutostartDaemon = new QCheckBox(i18n("Start alarm monitoring at lo&gin"), group, "startDaemon");
+ mAutostartDaemon = new TQCheckBox(i18n("Start alarm monitoring at lo&gin"), group, "startDaemon");
mAutostartDaemon->setFixedSize(mAutostartDaemon->sizeHint());
- connect(mAutostartDaemon, SIGNAL(clicked()), SLOT(slotAutostartDaemonClicked()));
- QWhatsThis::add(mAutostartDaemon,
+ connect(mAutostartDaemon, TQT_SIGNAL(clicked()), TQT_SLOT(slotAutostartDaemonClicked()));
+ TQWhatsThis::add(mAutostartDaemon,
i18n("Automatically start alarm monitoring whenever you start KDE, by running the alarm daemon (%1).\n\n"
"This option should always be checked unless you intend to discontinue use of KAlarm.")
- .arg(QString::fromLatin1(DAEMON_APP_NAME)));
+ .arg(TQString::fromLatin1(DAEMON_APP_NAME)));
grid->addMultiCellWidget(mAutostartDaemon, 6, 6, 0, 2, alignment);
group->setFixedHeight(group->sizeHint().height());
// Start-of-day time
- QHBox* itemBox = new QHBox(mPage);
- QHBox* box = new QHBox(itemBox); // this is to control the QWhatsThis text display area
+ TQHBox* itemBox = new TQHBox(mPage);
+ TQHBox* box = new TQHBox(itemBox); // this is to control the TQWhatsThis text display area
box->setSpacing(KDialog::spacingHint());
- QLabel* label = new QLabel(i18n("&Start of day for date-only alarms:"), box);
+ TQLabel* label = new TQLabel(i18n("&Start of day for date-only alarms:"), box);
mStartOfDay = new TimeEdit(box);
mStartOfDay->setFixedSize(mStartOfDay->sizeHint());
label->setBuddy(mStartOfDay);
- static const QString startOfDayText = i18n("The earliest time of day at which a date-only alarm (i.e. "
+ static const TQString startOfDayText = i18n("The earliest time of day at which a date-only alarm (i.e. "
"an alarm with \"any time\" specified) will be triggered.");
- QWhatsThis::add(box, QString("%1\n\n%2").arg(startOfDayText).arg(TimeSpinBox::shiftWhatsThis()));
- itemBox->setStretchFactor(new QWidget(itemBox), 1); // left adjust the controls
+ TQWhatsThis::add(box, TQString("%1\n\n%2").arg(startOfDayText).arg(TimeSpinBox::shiftWhatsThis()));
+ itemBox->setStretchFactor(new TQWidget(itemBox), 1); // left adjust the controls
itemBox->setFixedHeight(box->sizeHint().height());
// Confirm alarm deletion?
- itemBox = new QHBox(mPage); // this is to allow left adjustment
- mConfirmAlarmDeletion = new QCheckBox(i18n("Con&firm alarm deletions"), itemBox, "confirmDeletion");
+ itemBox = new TQHBox(mPage); // this is to allow left adjustment
+ mConfirmAlarmDeletion = new TQCheckBox(i18n("Con&firm alarm deletions"), itemBox, "confirmDeletion");
mConfirmAlarmDeletion->setMinimumSize(mConfirmAlarmDeletion->sizeHint());
- QWhatsThis::add(mConfirmAlarmDeletion,
+ TQWhatsThis::add(mConfirmAlarmDeletion,
i18n("Check to be prompted for confirmation each time you delete an alarm."));
- itemBox->setStretchFactor(new QWidget(itemBox), 1); // left adjust the controls
+ itemBox->setStretchFactor(new TQWidget(itemBox), 1); // left adjust the controls
itemBox->setFixedHeight(itemBox->sizeHint().height());
// Expired alarms
- group = new QGroupBox(i18n("Expired Alarms"), mPage);
- grid = new QGridLayout(group, 2, 2, KDialog::marginHint(), KDialog::spacingHint());
+ group = new TQGroupBox(i18n("Expired Alarms"), mPage);
+ grid = new TQGridLayout(group, 2, 2, KDialog::marginHint(), KDialog::spacingHint());
grid->setColStretch(1, 1);
grid->addColSpacing(0, indentWidth());
grid->addRowSpacing(0, fontMetrics().lineSpacing()/2);
- mKeepExpired = new QCheckBox(i18n("Keep alarms after e&xpiry"), group, "keepExpired");
+ mKeepExpired = new TQCheckBox(i18n("Keep alarms after e&xpiry"), group, "keepExpired");
mKeepExpired->setFixedSize(mKeepExpired->sizeHint());
- connect(mKeepExpired, SIGNAL(toggled(bool)), SLOT(slotExpiredToggled(bool)));
- QWhatsThis::add(mKeepExpired,
+ connect(mKeepExpired, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotExpiredToggled(bool)));
+ TQWhatsThis::add(mKeepExpired,
i18n("Check to store alarms after expiry or deletion (except deleted alarms which were never triggered)."));
grid->addMultiCellWidget(mKeepExpired, 1, 1, 0, 1, alignment);
- box = new QHBox(group);
+ box = new TQHBox(group);
box->setSpacing(KDialog::spacingHint());
- mPurgeExpired = new QCheckBox(i18n("Discard ex&pired alarms after:"), box, "purgeExpired");
+ mPurgeExpired = new TQCheckBox(i18n("Discard ex&pired alarms after:"), box, "purgeExpired");
mPurgeExpired->setMinimumSize(mPurgeExpired->sizeHint());
- connect(mPurgeExpired, SIGNAL(toggled(bool)), SLOT(slotExpiredToggled(bool)));
+ connect(mPurgeExpired, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotExpiredToggled(bool)));
mPurgeAfter = new SpinBox(box);
mPurgeAfter->setMinValue(1);
mPurgeAfter->setLineShiftStep(10);
mPurgeAfter->setMinimumSize(mPurgeAfter->sizeHint());
- mPurgeAfterLabel = new QLabel(i18n("da&ys"), box);
+ mPurgeAfterLabel = new TQLabel(i18n("da&ys"), box);
mPurgeAfterLabel->setMinimumSize(mPurgeAfterLabel->sizeHint());
mPurgeAfterLabel->setBuddy(mPurgeAfter);
- QWhatsThis::add(box,
+ TQWhatsThis::add(box,
i18n("Uncheck to store expired alarms indefinitely. Check to enter how long expired alarms should be stored."));
grid->addWidget(box, 2, 1, alignment);
- mClearExpired = new QPushButton(i18n("Clear Expired Alar&ms"), group);
+ mClearExpired = new TQPushButton(i18n("Clear Expired Alar&ms"), group);
mClearExpired->setFixedSize(mClearExpired->sizeHint());
- connect(mClearExpired, SIGNAL(clicked()), SLOT(slotClearExpired()));
- QWhatsThis::add(mClearExpired,
+ connect(mClearExpired, TQT_SIGNAL(clicked()), TQT_SLOT(slotClearExpired()));
+ TQWhatsThis::add(mClearExpired,
i18n("Delete all existing expired alarms."));
grid->addWidget(mClearExpired, 3, 1, alignment);
group->setFixedHeight(group->sizeHint().height());
// Terminal window to use for command alarms
- group = new QGroupBox(i18n("Terminal for Command Alarms"), mPage);
- QWhatsThis::add(group,
+ group = new TQGroupBox(i18n("Terminal for Command Alarms"), mPage);
+ TQWhatsThis::add(group,
i18n("Choose which application to use when a command alarm is executed in a terminal window"));
- grid = new QGridLayout(group, 1, 3, KDialog::marginHint(), KDialog::spacingHint());
+ grid = new TQGridLayout(group, 1, 3, KDialog::marginHint(), KDialog::spacingHint());
grid->addRowSpacing(0, fontMetrics().lineSpacing()/2);
int row = 0;
- mXtermType = new QButtonGroup(group);
+ mXtermType = new TQButtonGroup(group);
mXtermType->hide();
- QString whatsThis = i18n("The parameter is a command line, e.g. 'xterm -e'", "Check to execute command alarms in a terminal window by '%1'");
+ TQString whatsThis = i18n("The parameter is a command line, e.g. 'xterm -e'", "Check to execute command alarms in a terminal window by '%1'");
int index = 0;
mXtermFirst = -1;
for (mXtermCount = 0; !xtermCommands[mXtermCount].isNull(); ++mXtermCount)
{
- QString cmd = xtermCommands[mXtermCount];
- QStringList args = KShell::splitArgs(cmd);
+ TQString cmd = xtermCommands[mXtermCount];
+ TQStringList args = KShell::splitArgs(cmd);
if (args.isEmpty() || KStandardDirs::findExe(args[0]).isEmpty())
continue;
- QRadioButton* radio = new QRadioButton(args[0], group);
+ TQRadioButton* radio = new TQRadioButton(args[0], group);
radio->setMinimumSize(radio->sizeHint());
mXtermType->insert(radio, mXtermCount);
if (mXtermFirst < 0)
@@ -404,26 +404,26 @@ MiscPrefTab::MiscPrefTab(QVBox* frame)
cmd.replace("%w", "<command; sleep>");
cmd.replace("%C", "[command]");
cmd.replace("%W", "[command; sleep]");
- QWhatsThis::add(radio, whatsThis.arg(cmd));
+ TQWhatsThis::add(radio, whatsThis.arg(cmd));
grid->addWidget(radio, (row = index/3 + 1), index % 3, Qt::AlignAuto);
++index;
}
- box = new QHBox(group);
+ box = new TQHBox(group);
grid->addMultiCellWidget(box, row + 1, row + 1, 0, 2, Qt::AlignAuto);
- QRadioButton* radio = new QRadioButton(i18n("Other:"), box);
+ TQRadioButton* radio = new TQRadioButton(i18n("Other:"), box);
radio->setFixedSize(radio->sizeHint());
- connect(radio, SIGNAL(toggled(bool)), SLOT(slotOtherTerminalToggled(bool)));
+ connect(radio, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotOtherTerminalToggled(bool)));
mXtermType->insert(radio, mXtermCount);
if (mXtermFirst < 0)
mXtermFirst = mXtermCount; // note the id of the first button
- mXtermCommand = new QLineEdit(box);
- QWhatsThis::add(box,
+ mXtermCommand = new TQLineEdit(box);
+ TQWhatsThis::add(box,
i18n("Enter the full command line needed to execute a command in your chosen terminal window. "
"By default the alarm's command string will be appended to what you enter here. "
"See the KAlarm Handbook for details of special codes to tailor the command line."));
- mPage->setStretchFactor(new QWidget(mPage), 1); // top adjust the widgets
+ mPage->setStretchFactor(new TQWidget(mPage), 1); // top adjust the widgets
}
void MiscPrefTab::restore()
@@ -438,7 +438,7 @@ void MiscPrefTab::restore()
mConfirmAlarmDeletion->setChecked(Preferences::confirmAlarmDeletion());
mStartOfDay->setValue(Preferences::mStartOfDay);
setExpiredControls(Preferences::mExpiredKeepDays);
- QString xtermCmd = Preferences::cmdXTermCommand();
+ TQString xtermCmd = Preferences::cmdXTermCommand();
int id = mXtermFirst;
if (!xtermCmd.isEmpty())
{
@@ -460,13 +460,13 @@ void MiscPrefTab::apply(bool syncToDisc)
int xtermID = mXtermType->selectedId();
if (xtermID >= mXtermCount)
{
- QString cmd = mXtermCommand->text();
+ TQString cmd = mXtermCommand->text();
if (cmd.isEmpty())
xtermID = -1; // 'Other' is only acceptable if it's non-blank
else
{
- QStringList args = KShell::splitArgs(cmd);
- cmd = args.isEmpty() ? QString::null : args[0];
+ TQStringList args = KShell::splitArgs(cmd);
+ cmd = args.isEmpty() ? TQString::null : args[0];
if (KStandardDirs::findExe(cmd).isEmpty())
{
mXtermCommand->setFocus();
@@ -526,7 +526,7 @@ void MiscPrefTab::slotAutostartDaemonClicked()
if (!mAutostartDaemon->isChecked()
&& KMessageBox::warningYesNo(this,
i18n("You should not uncheck this option unless you intend to discontinue use of KAlarm"),
- QString::null, KStdGuiItem::cont(), KStdGuiItem::cancel()
+ TQString::null, KStdGuiItem::cont(), KStdGuiItem::cancel()
) != KMessageBox::Yes)
mAutostartDaemon->setChecked(true);
}
@@ -535,7 +535,7 @@ void MiscPrefTab::slotRunModeToggled(bool)
{
bool systray = mRunInSystemTray->isOn();
mAutostartTrayIcon->setText(systray ? i18n("Autostart at &login") : i18n("Autostart system tray &icon at login"));
- QWhatsThis::add(mAutostartTrayIcon, (systray ? i18n("Check to run KAlarm whenever you start KDE.")
+ TQWhatsThis::add(mAutostartTrayIcon, (systray ? i18n("Check to run KAlarm whenever you start KDE.")
: i18n("Check to display the system tray icon whenever you start KDE.")));
mDisableAlarmsIfStopped->setEnabled(systray);
slotDisableIfStoppedToggled(true);
@@ -593,14 +593,14 @@ void MiscPrefTab::slotOtherTerminalToggled(bool on)
= Class EmailPrefTab
=============================================================================*/
-EmailPrefTab::EmailPrefTab(QVBox* frame)
+EmailPrefTab::EmailPrefTab(TQVBox* frame)
: PrefsTabBase(frame),
mAddressChanged(false),
mBccAddressChanged(false)
{
- QHBox* box = new QHBox(mPage);
+ TQHBox* box = new TQHBox(mPage);
box->setSpacing(2*KDialog::spacingHint());
- QLabel* label = new QLabel(i18n("Email client:"), box);
+ TQLabel* label = new TQLabel(i18n("Email client:"), box);
mEmailClient = new ButtonGroup(box);
mEmailClient->hide();
RadioButton* radio = new RadioButton(i18n("&KMail"), box, "kmail");
@@ -609,25 +609,25 @@ EmailPrefTab::EmailPrefTab(QVBox* frame)
radio = new RadioButton(i18n("&Sendmail"), box, "sendmail");
radio->setMinimumSize(radio->sizeHint());
mEmailClient->insert(radio, Preferences::SENDMAIL);
- connect(mEmailClient, SIGNAL(buttonSet(int)), SLOT(slotEmailClientChanged(int)));
+ connect(mEmailClient, TQT_SIGNAL(buttonSet(int)), TQT_SLOT(slotEmailClientChanged(int)));
box->setFixedHeight(box->sizeHint().height());
- QWhatsThis::add(box,
+ TQWhatsThis::add(box,
i18n("Choose how to send email when an email alarm is triggered.\n"
"KMail: The email is sent automatically via KMail. KMail is started first if necessary.\n"
"Sendmail: The email is sent automatically. This option will only work if "
"your system is configured to use sendmail or a sendmail compatible mail transport agent."));
- box = new QHBox(mPage); // this is to allow left adjustment
- mEmailCopyToKMail = new QCheckBox(i18n("Co&py sent emails into KMail's %1 folder").arg(KAMail::i18n_sent_mail()), box);
+ box = new TQHBox(mPage); // this is to allow left adjustment
+ mEmailCopyToKMail = new TQCheckBox(i18n("Co&py sent emails into KMail's %1 folder").arg(KAMail::i18n_sent_mail()), box);
mEmailCopyToKMail->setFixedSize(mEmailCopyToKMail->sizeHint());
- QWhatsThis::add(mEmailCopyToKMail,
+ TQWhatsThis::add(mEmailCopyToKMail,
i18n("After sending an email, store a copy in KMail's %1 folder").arg(KAMail::i18n_sent_mail()));
- box->setStretchFactor(new QWidget(box), 1); // left adjust the controls
+ box->setStretchFactor(new TQWidget(box), 1); // left adjust the controls
box->setFixedHeight(box->sizeHint().height());
// Your Email Address group box
- QGroupBox* group = new QGroupBox(i18n("Your Email Address"), mPage);
- QGridLayout* grid = new QGridLayout(group, 6, 3, KDialog::marginHint(), KDialog::spacingHint());
+ TQGroupBox* group = new TQGroupBox(i18n("Your Email Address"), mPage);
+ TQGridLayout* grid = new TQGridLayout(group, 6, 3, KDialog::marginHint(), KDialog::spacingHint());
grid->addRowSpacing(0, fontMetrics().lineSpacing()/2);
grid->setColStretch(1, 1);
@@ -637,7 +637,7 @@ EmailPrefTab::EmailPrefTab(QVBox* frame)
grid->addWidget(label, 1, 0);
mFromAddressGroup = new ButtonGroup(group);
mFromAddressGroup->hide();
- connect(mFromAddressGroup, SIGNAL(buttonSet(int)), SLOT(slotFromAddrChanged(int)));
+ connect(mFromAddressGroup, TQT_SIGNAL(buttonSet(int)), TQT_SLOT(slotFromAddrChanged(int)));
// Line edit to enter a 'From' email address
radio = new RadioButton(group);
@@ -645,11 +645,11 @@ EmailPrefTab::EmailPrefTab(QVBox* frame)
radio->setFixedSize(radio->sizeHint());
label->setBuddy(radio);
grid->addWidget(radio, 1, 1);
- mEmailAddress = new QLineEdit(group);
- connect(mEmailAddress, SIGNAL(textChanged(const QString&)), SLOT(slotAddressChanged()));
- QString whatsThis = i18n("Your email address, used to identify you as the sender when sending email alarms.");
- QWhatsThis::add(radio, whatsThis);
- QWhatsThis::add(mEmailAddress, whatsThis);
+ mEmailAddress = new TQLineEdit(group);
+ connect(mEmailAddress, TQT_SIGNAL(textChanged(const TQString&)), TQT_SLOT(slotAddressChanged()));
+ TQString whatsThis = i18n("Your email address, used to identify you as the sender when sending email alarms.");
+ TQWhatsThis::add(radio, whatsThis);
+ TQWhatsThis::add(mEmailAddress, whatsThis);
radio->setFocusWidget(mEmailAddress);
grid->addWidget(mEmailAddress, 1, 2);
@@ -657,7 +657,7 @@ EmailPrefTab::EmailPrefTab(QVBox* frame)
radio = new RadioButton(i18n("&Use address from Control Center"), group);
radio->setFixedSize(radio->sizeHint());
mFromAddressGroup->insert(radio, Preferences::MAIL_FROM_CONTROL_CENTRE);
- QWhatsThis::add(radio,
+ TQWhatsThis::add(radio,
i18n("Check to use the email address set in the KDE Control Center, to identify you as the sender when sending email alarms."));
grid->addMultiCellWidget(radio, 2, 2, 1, 2, Qt::AlignAuto);
@@ -665,7 +665,7 @@ EmailPrefTab::EmailPrefTab(QVBox* frame)
radio = new RadioButton(i18n("Use KMail &identities"), group);
radio->setFixedSize(radio->sizeHint());
mFromAddressGroup->insert(radio, Preferences::MAIL_FROM_KMAIL);
- QWhatsThis::add(radio,
+ TQWhatsThis::add(radio,
i18n("Check to use KMail's email identities to identify you as the sender when sending email alarms. "
"For existing email alarms, KMail's default identity will be used. "
"For new email alarms, you will be able to pick which of KMail's identities to use."));
@@ -678,7 +678,7 @@ EmailPrefTab::EmailPrefTab(QVBox* frame)
grid->addWidget(label, 5, 0);
mBccAddressGroup = new ButtonGroup(group);
mBccAddressGroup->hide();
- connect(mBccAddressGroup, SIGNAL(buttonSet(int)), SLOT(slotBccAddrChanged(int)));
+ connect(mBccAddressGroup, TQT_SIGNAL(buttonSet(int)), TQT_SLOT(slotBccAddrChanged(int)));
// Line edit to enter a 'Bcc' email address
radio = new RadioButton(group);
@@ -686,11 +686,11 @@ EmailPrefTab::EmailPrefTab(QVBox* frame)
mBccAddressGroup->insert(radio, Preferences::MAIL_FROM_ADDR);
label->setBuddy(radio);
grid->addWidget(radio, 5, 1);
- mEmailBccAddress = new QLineEdit(group);
+ mEmailBccAddress = new TQLineEdit(group);
whatsThis = i18n("Your email address, used for blind copying email alarms to yourself. "
"If you want blind copies to be sent to your account on the computer which KAlarm runs on, you can simply enter your user login name.");
- QWhatsThis::add(radio, whatsThis);
- QWhatsThis::add(mEmailBccAddress, whatsThis);
+ TQWhatsThis::add(radio, whatsThis);
+ TQWhatsThis::add(mEmailBccAddress, whatsThis);
radio->setFocusWidget(mEmailBccAddress);
grid->addWidget(mEmailBccAddress, 5, 2);
@@ -698,22 +698,22 @@ EmailPrefTab::EmailPrefTab(QVBox* frame)
radio = new RadioButton(i18n("Us&e address from Control Center"), group);
radio->setFixedSize(radio->sizeHint());
mBccAddressGroup->insert(radio, Preferences::MAIL_FROM_CONTROL_CENTRE);
- QWhatsThis::add(radio,
+ TQWhatsThis::add(radio,
i18n("Check to use the email address set in the KDE Control Center, for blind copying email alarms to yourself."));
grid->addMultiCellWidget(radio, 6, 6, 1, 2, Qt::AlignAuto);
group->setFixedHeight(group->sizeHint().height());
- box = new QHBox(mPage); // this is to allow left adjustment
- mEmailQueuedNotify = new QCheckBox(i18n("&Notify when remote emails are queued"), box);
+ box = new TQHBox(mPage); // this is to allow left adjustment
+ mEmailQueuedNotify = new TQCheckBox(i18n("&Notify when remote emails are queued"), box);
mEmailQueuedNotify->setFixedSize(mEmailQueuedNotify->sizeHint());
- QWhatsThis::add(mEmailQueuedNotify,
+ TQWhatsThis::add(mEmailQueuedNotify,
i18n("Display a notification message whenever an email alarm has queued an email for sending to a remote system. "
"This could be useful if, for example, you have a dial-up connection, so that you can then ensure that the email is actually transmitted."));
- box->setStretchFactor(new QWidget(box), 1); // left adjust the controls
+ box->setStretchFactor(new TQWidget(box), 1); // left adjust the controls
box->setFixedHeight(box->sizeHint().height());
- mPage->setStretchFactor(new QWidget(mPage), 1); // top adjust the widgets
+ mPage->setStretchFactor(new TQWidget(mPage), 1); // top adjust the widgets
}
void EmailPrefTab::restore()
@@ -745,16 +745,16 @@ void EmailPrefTab::setDefaults()
mEmailQueuedNotify->setChecked(Preferences::default_emailQueuedNotify);
}
-void EmailPrefTab::setEmailAddress(Preferences::MailFrom from, const QString& address)
+void EmailPrefTab::setEmailAddress(Preferences::MailFrom from, const TQString& address)
{
mFromAddressGroup->setButton(from);
- mEmailAddress->setText(from == Preferences::MAIL_FROM_ADDR ? address.stripWhiteSpace() : QString());
+ mEmailAddress->setText(from == Preferences::MAIL_FROM_ADDR ? address.stripWhiteSpace() : TQString());
}
-void EmailPrefTab::setEmailBccAddress(bool useControlCentre, const QString& address)
+void EmailPrefTab::setEmailBccAddress(bool useControlCentre, const TQString& address)
{
mBccAddressGroup->setButton(useControlCentre ? Preferences::MAIL_FROM_CONTROL_CENTRE : Preferences::MAIL_FROM_ADDR);
- mEmailBccAddress->setText(useControlCentre ? QString() : address.stripWhiteSpace());
+ mEmailBccAddress->setText(useControlCentre ? TQString() : address.stripWhiteSpace());
}
void EmailPrefTab::slotEmailClientChanged(int id)
@@ -774,12 +774,12 @@ void EmailPrefTab::slotBccAddrChanged(int id)
mBccAddressChanged = true;
}
-QString EmailPrefTab::validate()
+TQString EmailPrefTab::validate()
{
if (mAddressChanged)
{
mAddressChanged = false;
- QString errmsg = validateAddr(mFromAddressGroup, mEmailAddress, KAMail::i18n_NeedFromEmailAddress());
+ TQString errmsg = validateAddr(mFromAddressGroup, mEmailAddress, KAMail::i18n_NeedFromEmailAddress());
if (!errmsg.isEmpty())
return errmsg;
}
@@ -788,27 +788,27 @@ QString EmailPrefTab::validate()
mBccAddressChanged = false;
return validateAddr(mBccAddressGroup, mEmailBccAddress, i18n("No valid 'Bcc' email address is specified."));
}
- return QString::null;
+ return TQString::null;
}
-QString EmailPrefTab::validateAddr(ButtonGroup* group, QLineEdit* addr, const QString& msg)
+TQString EmailPrefTab::validateAddr(ButtonGroup* group, TQLineEdit* addr, const TQString& msg)
{
- QString errmsg = i18n("%1\nAre you sure you want to save your changes?").arg(msg);
+ TQString errmsg = i18n("%1\nAre you sure you want to save your changes?").arg(msg);
switch (group->selectedId())
{
case Preferences::MAIL_FROM_CONTROL_CENTRE:
if (!KAMail::controlCentreAddress().isEmpty())
- return QString::null;
+ return TQString::null;
errmsg = i18n("No email address is currently set in the KDE Control Center. %1").arg(errmsg);
break;
case Preferences::MAIL_FROM_KMAIL:
if (KAMail::identitiesExist())
- return QString::null;
+ return TQString::null;
errmsg = i18n("No KMail identities currently exist. %1").arg(errmsg);
break;
case Preferences::MAIL_FROM_ADDR:
if (!addr->text().stripWhiteSpace().isEmpty())
- return QString::null;
+ return TQString::null;
break;
}
return errmsg;
@@ -819,35 +819,35 @@ QString EmailPrefTab::validateAddr(ButtonGroup* group, QLineEdit* addr, const QS
= Class FontColourPrefTab
=============================================================================*/
-FontColourPrefTab::FontColourPrefTab(QVBox* frame)
+FontColourPrefTab::FontColourPrefTab(TQVBox* frame)
: PrefsTabBase(frame)
{
- mFontChooser = new FontColourChooser(mPage, 0, false, QStringList(), i18n("Message Font && Color"), true, false);
+ mFontChooser = new FontColourChooser(mPage, 0, false, TQStringList(), i18n("Message Font && Color"), true, false);
mPage->setStretchFactor(mFontChooser, 1);
- QFrame* layoutBox = new QFrame(mPage);
- QHBoxLayout* hlayout = new QHBoxLayout(layoutBox);
- QVBoxLayout* colourLayout = new QVBoxLayout(hlayout, KDialog::spacingHint());
+ TQFrame* layoutBox = new TQFrame(mPage);
+ TQHBoxLayout* hlayout = new TQHBoxLayout(layoutBox);
+ TQVBoxLayout* colourLayout = new TQVBoxLayout(hlayout, KDialog::spacingHint());
hlayout->addStretch();
- QHBox* box = new QHBox(layoutBox); // to group widgets for QWhatsThis text
+ TQHBox* box = new TQHBox(layoutBox); // to group widgets for TQWhatsThis text
box->setSpacing(KDialog::spacingHint()/2);
colourLayout->addWidget(box);
- QLabel* label1 = new QLabel(i18n("Di&sabled alarm color:"), box);
- box->setStretchFactor(new QWidget(box), 1);
+ TQLabel* label1 = new TQLabel(i18n("Di&sabled alarm color:"), box);
+ box->setStretchFactor(new TQWidget(box), 1);
mDisabledColour = new KColorCombo(box);
label1->setBuddy(mDisabledColour);
- QWhatsThis::add(box,
+ TQWhatsThis::add(box,
i18n("Choose the text color in the alarm list for disabled alarms."));
- box = new QHBox(layoutBox); // to group widgets for QWhatsThis text
+ box = new TQHBox(layoutBox); // to group widgets for TQWhatsThis text
box->setSpacing(KDialog::spacingHint()/2);
colourLayout->addWidget(box);
- QLabel* label2 = new QLabel(i18n("E&xpired alarm color:"), box);
- box->setStretchFactor(new QWidget(box), 1);
+ TQLabel* label2 = new TQLabel(i18n("E&xpired alarm color:"), box);
+ box->setStretchFactor(new TQWidget(box), 1);
mExpiredColour = new KColorCombo(box);
label2->setBuddy(mExpiredColour);
- QWhatsThis::add(box,
+ TQWhatsThis::add(box,
i18n("Choose the text color in the alarm list for expired alarms."));
}
@@ -884,140 +884,140 @@ void FontColourPrefTab::setDefaults()
= Class EditPrefTab
=============================================================================*/
-EditPrefTab::EditPrefTab(QVBox* frame)
+EditPrefTab::EditPrefTab(TQVBox* frame)
: PrefsTabBase(frame)
{
- // Get alignment to use in QLabel::setAlignment(alignment | Qt::WordBreak)
+ // Get alignment to use in TQLabel::setAlignment(alignment | Qt::WordBreak)
// (AlignAuto doesn't work correctly there)
- int alignment = QApplication::reverseLayout() ? Qt::AlignRight : Qt::AlignLeft;
+ int alignment = TQApplication::reverseLayout() ? Qt::AlignRight : Qt::AlignLeft;
int groupTopMargin = fontMetrics().lineSpacing()/2;
- QString defsetting = i18n("The default setting for \"%1\" in the alarm edit dialog.");
- QString soundSetting = i18n("Check to select %1 as the default setting for \"%2\" in the alarm edit dialog.");
+ TQString defsetting = i18n("The default setting for \"%1\" in the alarm edit dialog.");
+ TQString soundSetting = i18n("Check to select %1 as the default setting for \"%2\" in the alarm edit dialog.");
// DISPLAY ALARMS
- QGroupBox* group = new QGroupBox(i18n("Display Alarms"), mPage);
- QBoxLayout* layout = new QVBoxLayout(group, KDialog::marginHint(), KDialog::spacingHint());
+ TQGroupBox* group = new TQGroupBox(i18n("Display Alarms"), mPage);
+ TQBoxLayout* layout = new TQVBoxLayout(group, KDialog::marginHint(), KDialog::spacingHint());
layout->addSpacing(groupTopMargin);
- mConfirmAck = new QCheckBox(EditAlarmDlg::i18n_k_ConfirmAck(), group, "defConfAck");
+ mConfirmAck = new TQCheckBox(EditAlarmDlg::i18n_k_ConfirmAck(), group, "defConfAck");
mConfirmAck->setMinimumSize(mConfirmAck->sizeHint());
- QWhatsThis::add(mConfirmAck, defsetting.arg(EditAlarmDlg::i18n_ConfirmAck()));
+ TQWhatsThis::add(mConfirmAck, defsetting.arg(EditAlarmDlg::i18n_ConfirmAck()));
layout->addWidget(mConfirmAck, 0, Qt::AlignAuto);
- mAutoClose = new QCheckBox(LateCancelSelector::i18n_i_AutoCloseWinLC(), group, "defAutoClose");
+ mAutoClose = new TQCheckBox(LateCancelSelector::i18n_i_AutoCloseWinLC(), group, "defAutoClose");
mAutoClose->setMinimumSize(mAutoClose->sizeHint());
- QWhatsThis::add(mAutoClose, defsetting.arg(LateCancelSelector::i18n_AutoCloseWin()));
+ TQWhatsThis::add(mAutoClose, defsetting.arg(LateCancelSelector::i18n_AutoCloseWin()));
layout->addWidget(mAutoClose, 0, Qt::AlignAuto);
- QHBox* box = new QHBox(group);
+ TQHBox* box = new TQHBox(group);
box->setSpacing(KDialog::spacingHint());
layout->addWidget(box);
- QLabel* label = new QLabel(i18n("Reminder &units:"), box);
+ TQLabel* label = new TQLabel(i18n("Reminder &units:"), box);
label->setFixedSize(label->sizeHint());
- mReminderUnits = new QComboBox(box, "defWarnUnits");
+ mReminderUnits = new TQComboBox(box, "defWarnUnits");
mReminderUnits->insertItem(TimePeriod::i18n_Minutes(), TimePeriod::MINUTES);
mReminderUnits->insertItem(TimePeriod::i18n_Hours_Mins(), TimePeriod::HOURS_MINUTES);
mReminderUnits->insertItem(TimePeriod::i18n_Days(), TimePeriod::DAYS);
mReminderUnits->insertItem(TimePeriod::i18n_Weeks(), TimePeriod::WEEKS);
mReminderUnits->setFixedSize(mReminderUnits->sizeHint());
label->setBuddy(mReminderUnits);
- QWhatsThis::add(box,
+ TQWhatsThis::add(box,
i18n("The default units for the reminder in the alarm edit dialog."));
- box->setStretchFactor(new QWidget(box), 1); // left adjust the control
+ box->setStretchFactor(new TQWidget(box), 1); // left adjust the control
mSpecialActionsButton = new SpecialActionsButton(EditAlarmDlg::i18n_SpecialActions(), box);
mSpecialActionsButton->setFixedSize(mSpecialActionsButton->sizeHint());
// SOUND
- QButtonGroup* bgroup = new QButtonGroup(SoundPicker::i18n_Sound(), mPage, "soundGroup");
- layout = new QVBoxLayout(bgroup, KDialog::marginHint(), KDialog::spacingHint());
+ TQButtonGroup* bgroup = new TQButtonGroup(SoundPicker::i18n_Sound(), mPage, "soundGroup");
+ layout = new TQVBoxLayout(bgroup, KDialog::marginHint(), KDialog::spacingHint());
layout->addSpacing(groupTopMargin);
- QBoxLayout* hlayout = new QHBoxLayout(layout, KDialog::spacingHint());
- mSound = new QComboBox(false, bgroup, "defSound");
+ TQBoxLayout* hlayout = new TQHBoxLayout(layout, KDialog::spacingHint());
+ mSound = new TQComboBox(false, bgroup, "defSound");
mSound->insertItem(SoundPicker::i18n_None()); // index 0
mSound->insertItem(SoundPicker::i18n_Beep()); // index 1
mSound->insertItem(SoundPicker::i18n_File()); // index 2
if (theApp()->speechEnabled())
mSound->insertItem(SoundPicker::i18n_Speak()); // index 3
mSound->setMinimumSize(mSound->sizeHint());
- QWhatsThis::add(mSound, defsetting.arg(SoundPicker::i18n_Sound()));
+ TQWhatsThis::add(mSound, defsetting.arg(SoundPicker::i18n_Sound()));
hlayout->addWidget(mSound);
hlayout->addStretch(1);
#ifndef WITHOUT_ARTS
- mSoundRepeat = new QCheckBox(i18n("Repea&t sound file"), bgroup, "defRepeatSound");
+ mSoundRepeat = new TQCheckBox(i18n("Repea&t sound file"), bgroup, "defRepeatSound");
mSoundRepeat->setMinimumSize(mSoundRepeat->sizeHint());
- QWhatsThis::add(mSoundRepeat, i18n("sound file \"Repeat\" checkbox", "The default setting for sound file \"%1\" in the alarm edit dialog.").arg(SoundDlg::i18n_Repeat()));
+ TQWhatsThis::add(mSoundRepeat, i18n("sound file \"Repeat\" checkbox", "The default setting for sound file \"%1\" in the alarm edit dialog.").arg(SoundDlg::i18n_Repeat()));
hlayout->addWidget(mSoundRepeat);
#endif
- box = new QHBox(bgroup); // this is to control the QWhatsThis text display area
+ box = new TQHBox(bgroup); // this is to control the TQWhatsThis text display area
box->setSpacing(KDialog::spacingHint());
- mSoundFileLabel = new QLabel(i18n("Sound &file:"), box);
+ mSoundFileLabel = new TQLabel(i18n("Sound &file:"), box);
mSoundFileLabel->setFixedSize(mSoundFileLabel->sizeHint());
- mSoundFile = new QLineEdit(box);
+ mSoundFile = new TQLineEdit(box);
mSoundFileLabel->setBuddy(mSoundFile);
- mSoundFileBrowse = new QPushButton(box);
+ mSoundFileBrowse = new TQPushButton(box);
mSoundFileBrowse->setPixmap(SmallIcon("fileopen"));
mSoundFileBrowse->setFixedSize(mSoundFileBrowse->sizeHint());
- connect(mSoundFileBrowse, SIGNAL(clicked()), SLOT(slotBrowseSoundFile()));
- QToolTip::add(mSoundFileBrowse, i18n("Choose a sound file"));
- QWhatsThis::add(box,
+ connect(mSoundFileBrowse, TQT_SIGNAL(clicked()), TQT_SLOT(slotBrowseSoundFile()));
+ TQToolTip::add(mSoundFileBrowse, i18n("Choose a sound file"));
+ TQWhatsThis::add(box,
i18n("Enter the default sound file to use in the alarm edit dialog."));
box->setFixedHeight(box->sizeHint().height());
layout->addWidget(box);
bgroup->setFixedHeight(bgroup->sizeHint().height());
// COMMAND ALARMS
- group = new QGroupBox(i18n("Command Alarms"), mPage);
- layout = new QVBoxLayout(group, KDialog::marginHint(), KDialog::spacingHint());
+ group = new TQGroupBox(i18n("Command Alarms"), mPage);
+ layout = new TQVBoxLayout(group, KDialog::marginHint(), KDialog::spacingHint());
layout->addSpacing(groupTopMargin);
- layout = new QHBoxLayout(layout, KDialog::spacingHint());
+ layout = new TQHBoxLayout(layout, KDialog::spacingHint());
- mCmdScript = new QCheckBox(EditAlarmDlg::i18n_p_EnterScript(), group, "defCmdScript");
+ mCmdScript = new TQCheckBox(EditAlarmDlg::i18n_p_EnterScript(), group, "defCmdScript");
mCmdScript->setMinimumSize(mCmdScript->sizeHint());
- QWhatsThis::add(mCmdScript, defsetting.arg(EditAlarmDlg::i18n_EnterScript()));
+ TQWhatsThis::add(mCmdScript, defsetting.arg(EditAlarmDlg::i18n_EnterScript()));
layout->addWidget(mCmdScript);
layout->addStretch();
- mCmdXterm = new QCheckBox(EditAlarmDlg::i18n_w_ExecInTermWindow(), group, "defCmdXterm");
+ mCmdXterm = new TQCheckBox(EditAlarmDlg::i18n_w_ExecInTermWindow(), group, "defCmdXterm");
mCmdXterm->setMinimumSize(mCmdXterm->sizeHint());
- QWhatsThis::add(mCmdXterm, defsetting.arg(EditAlarmDlg::i18n_ExecInTermWindow()));
+ TQWhatsThis::add(mCmdXterm, defsetting.arg(EditAlarmDlg::i18n_ExecInTermWindow()));
layout->addWidget(mCmdXterm);
// EMAIL ALARMS
- group = new QGroupBox(i18n("Email Alarms"), mPage);
- layout = new QVBoxLayout(group, KDialog::marginHint(), KDialog::spacingHint());
+ group = new TQGroupBox(i18n("Email Alarms"), mPage);
+ layout = new TQVBoxLayout(group, KDialog::marginHint(), KDialog::spacingHint());
layout->addSpacing(groupTopMargin);
// BCC email to sender
- mEmailBcc = new QCheckBox(EditAlarmDlg::i18n_e_CopyEmailToSelf(), group, "defEmailBcc");
+ mEmailBcc = new TQCheckBox(EditAlarmDlg::i18n_e_CopyEmailToSelf(), group, "defEmailBcc");
mEmailBcc->setMinimumSize(mEmailBcc->sizeHint());
- QWhatsThis::add(mEmailBcc, defsetting.arg(EditAlarmDlg::i18n_CopyEmailToSelf()));
+ TQWhatsThis::add(mEmailBcc, defsetting.arg(EditAlarmDlg::i18n_CopyEmailToSelf()));
layout->addWidget(mEmailBcc, 0, Qt::AlignAuto);
// MISCELLANEOUS
// Show in KOrganizer
- mCopyToKOrganizer = new QCheckBox(EditAlarmDlg::i18n_g_ShowInKOrganizer(), mPage, "defShowKorg");
+ mCopyToKOrganizer = new TQCheckBox(EditAlarmDlg::i18n_g_ShowInKOrganizer(), mPage, "defShowKorg");
mCopyToKOrganizer->setMinimumSize(mCopyToKOrganizer->sizeHint());
- QWhatsThis::add(mCopyToKOrganizer, defsetting.arg(EditAlarmDlg::i18n_ShowInKOrganizer()));
+ TQWhatsThis::add(mCopyToKOrganizer, defsetting.arg(EditAlarmDlg::i18n_ShowInKOrganizer()));
// Late cancellation
- box = new QHBox(mPage);
+ box = new TQHBox(mPage);
box->setSpacing(KDialog::spacingHint());
- mLateCancel = new QCheckBox(LateCancelSelector::i18n_n_CancelIfLate(), box, "defCancelLate");
+ mLateCancel = new TQCheckBox(LateCancelSelector::i18n_n_CancelIfLate(), box, "defCancelLate");
mLateCancel->setMinimumSize(mLateCancel->sizeHint());
- QWhatsThis::add(mLateCancel, defsetting.arg(LateCancelSelector::i18n_CancelIfLate()));
- box->setStretchFactor(new QWidget(box), 1); // left adjust the control
+ TQWhatsThis::add(mLateCancel, defsetting.arg(LateCancelSelector::i18n_CancelIfLate()));
+ box->setStretchFactor(new TQWidget(box), 1); // left adjust the control
// Recurrence
- QHBox* itemBox = new QHBox(box); // this is to control the QWhatsThis text display area
+ TQHBox* itemBox = new TQHBox(box); // this is to control the TQWhatsThis text display area
itemBox->setSpacing(KDialog::spacingHint());
- label = new QLabel(i18n("&Recurrence:"), itemBox);
+ label = new TQLabel(i18n("&Recurrence:"), itemBox);
label->setFixedSize(label->sizeHint());
- mRecurPeriod = new QComboBox(itemBox, "defRecur");
+ mRecurPeriod = new TQComboBox(itemBox, "defRecur");
mRecurPeriod->insertItem(RecurrenceEdit::i18n_NoRecur());
mRecurPeriod->insertItem(RecurrenceEdit::i18n_AtLogin());
mRecurPeriod->insertItem(RecurrenceEdit::i18n_HourlyMinutely());
@@ -1027,36 +1027,36 @@ EditPrefTab::EditPrefTab(QVBox* frame)
mRecurPeriod->insertItem(RecurrenceEdit::i18n_Yearly());
mRecurPeriod->setFixedSize(mRecurPeriod->sizeHint());
label->setBuddy(mRecurPeriod);
- QWhatsThis::add(itemBox,
+ TQWhatsThis::add(itemBox,
i18n("The default setting for the recurrence rule in the alarm edit dialog."));
box->setFixedHeight(itemBox->sizeHint().height());
// How to handle February 29th in yearly recurrences
- QVBox* vbox = new QVBox(mPage); // this is to control the QWhatsThis text display area
+ TQVBox* vbox = new TQVBox(mPage); // this is to control the TQWhatsThis text display area
vbox->setSpacing(KDialog::spacingHint());
- label = new QLabel(i18n("In non-leap years, repeat yearly February 29th alarms on:"), vbox);
+ label = new TQLabel(i18n("In non-leap years, repeat yearly February 29th alarms on:"), vbox);
label->setAlignment(alignment | Qt::WordBreak);
- itemBox = new QHBox(vbox);
+ itemBox = new TQHBox(vbox);
itemBox->setSpacing(2*KDialog::spacingHint());
- mFeb29 = new QButtonGroup(itemBox);
+ mFeb29 = new TQButtonGroup(itemBox);
mFeb29->hide();
- QWidget* widget = new QWidget(itemBox);
+ TQWidget* widget = new TQWidget(itemBox);
widget->setFixedWidth(3*KDialog::spacingHint());
- QRadioButton* radio = new QRadioButton(i18n("February 2&8th"), itemBox);
+ TQRadioButton* radio = new TQRadioButton(i18n("February 2&8th"), itemBox);
radio->setMinimumSize(radio->sizeHint());
mFeb29->insert(radio, KARecurrence::FEB29_FEB28);
- radio = new QRadioButton(i18n("March &1st"), itemBox);
+ radio = new TQRadioButton(i18n("March &1st"), itemBox);
radio->setMinimumSize(radio->sizeHint());
mFeb29->insert(radio, KARecurrence::FEB29_MAR1);
- radio = new QRadioButton(i18n("Do &not repeat"), itemBox);
+ radio = new TQRadioButton(i18n("Do &not repeat"), itemBox);
radio->setMinimumSize(radio->sizeHint());
mFeb29->insert(radio, KARecurrence::FEB29_FEB29);
itemBox->setFixedHeight(itemBox->sizeHint().height());
- QWhatsThis::add(vbox,
+ TQWhatsThis::add(vbox,
i18n("For yearly recurrences, choose what date, if any, alarms due on February 29th should occur in non-leap years.\n"
"Note that the next scheduled occurrence of existing alarms is not re-evaluated when you change this setting."));
- mPage->setStretchFactor(new QWidget(mPage), 1); // top adjust the widgets
+ mPage->setStretchFactor(new TQWidget(mPage), 1); // top adjust the widgets
}
void EditPrefTab::restore()
@@ -1141,8 +1141,8 @@ void EditPrefTab::setDefaults()
void EditPrefTab::slotBrowseSoundFile()
{
- QString defaultDir;
- QString url = SoundPicker::browseFile(defaultDir, mSoundFile->text());
+ TQString defaultDir;
+ TQString url = SoundPicker::browseFile(defaultDir, mSoundFile->text());
if (!url.isEmpty())
mSoundFile->setText(url);
}
@@ -1174,14 +1174,14 @@ int EditPrefTab::recurIndex(RecurrenceEdit::RepeatType type)
}
}
-QString EditPrefTab::validate()
+TQString EditPrefTab::validate()
{
if (mSound->currentItem() == SoundPicker::PLAY_FILE && mSoundFile->text().isEmpty())
{
mSoundFile->setFocus();
return i18n("You must enter a sound file when %1 is selected as the default sound type").arg(SoundPicker::i18n_File());;
}
- return QString::null;
+ return TQString::null;
}
@@ -1189,85 +1189,85 @@ QString EditPrefTab::validate()
= Class ViewPrefTab
=============================================================================*/
-ViewPrefTab::ViewPrefTab(QVBox* frame)
+ViewPrefTab::ViewPrefTab(TQVBox* frame)
: PrefsTabBase(frame)
{
- QGroupBox* group = new QGroupBox(i18n("System Tray Tooltip"), mPage);
- QGridLayout* grid = new QGridLayout(group, 5, 3, KDialog::marginHint(), KDialog::spacingHint());
+ TQGroupBox* group = new TQGroupBox(i18n("System Tray Tooltip"), mPage);
+ TQGridLayout* grid = new TQGridLayout(group, 5, 3, KDialog::marginHint(), KDialog::spacingHint());
grid->setColStretch(2, 1);
grid->addColSpacing(0, indentWidth());
grid->addColSpacing(1, indentWidth());
grid->addRowSpacing(0, fontMetrics().lineSpacing()/2);
- mTooltipShowAlarms = new QCheckBox(i18n("Show next &24 hours' alarms"), group, "tooltipShow");
+ mTooltipShowAlarms = new TQCheckBox(i18n("Show next &24 hours' alarms"), group, "tooltipShow");
mTooltipShowAlarms->setMinimumSize(mTooltipShowAlarms->sizeHint());
- connect(mTooltipShowAlarms, SIGNAL(toggled(bool)), SLOT(slotTooltipAlarmsToggled(bool)));
- QWhatsThis::add(mTooltipShowAlarms,
+ connect(mTooltipShowAlarms, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotTooltipAlarmsToggled(bool)));
+ TQWhatsThis::add(mTooltipShowAlarms,
i18n("Specify whether to include in the system tray tooltip, a summary of alarms due in the next 24 hours"));
grid->addMultiCellWidget(mTooltipShowAlarms, 1, 1, 0, 2, Qt::AlignAuto);
- QHBox* box = new QHBox(group);
+ TQHBox* box = new TQHBox(group);
box->setSpacing(KDialog::spacingHint());
- mTooltipMaxAlarms = new QCheckBox(i18n("Ma&ximum number of alarms to show:"), box, "tooltipMax");
+ mTooltipMaxAlarms = new TQCheckBox(i18n("Ma&ximum number of alarms to show:"), box, "tooltipMax");
mTooltipMaxAlarms->setMinimumSize(mTooltipMaxAlarms->sizeHint());
- connect(mTooltipMaxAlarms, SIGNAL(toggled(bool)), SLOT(slotTooltipMaxToggled(bool)));
+ connect(mTooltipMaxAlarms, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotTooltipMaxToggled(bool)));
mTooltipMaxAlarmCount = new SpinBox(1, 99, 1, box);
mTooltipMaxAlarmCount->setLineShiftStep(5);
mTooltipMaxAlarmCount->setMinimumSize(mTooltipMaxAlarmCount->sizeHint());
- QWhatsThis::add(box,
+ TQWhatsThis::add(box,
i18n("Uncheck to display all of the next 24 hours' alarms in the system tray tooltip. "
"Check to enter an upper limit on the number to be displayed."));
grid->addMultiCellWidget(box, 2, 2, 1, 2, Qt::AlignAuto);
- mTooltipShowTime = new QCheckBox(MainWindow::i18n_m_ShowAlarmTime(), group, "tooltipTime");
+ mTooltipShowTime = new TQCheckBox(MainWindow::i18n_m_ShowAlarmTime(), group, "tooltipTime");
mTooltipShowTime->setMinimumSize(mTooltipShowTime->sizeHint());
- connect(mTooltipShowTime, SIGNAL(toggled(bool)), SLOT(slotTooltipTimeToggled(bool)));
- QWhatsThis::add(mTooltipShowTime,
+ connect(mTooltipShowTime, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotTooltipTimeToggled(bool)));
+ TQWhatsThis::add(mTooltipShowTime,
i18n("Specify whether to show in the system tray tooltip, the time at which each alarm is due"));
grid->addMultiCellWidget(mTooltipShowTime, 3, 3, 1, 2, Qt::AlignAuto);
- mTooltipShowTimeTo = new QCheckBox(MainWindow::i18n_l_ShowTimeToAlarm(), group, "tooltipTimeTo");
+ mTooltipShowTimeTo = new TQCheckBox(MainWindow::i18n_l_ShowTimeToAlarm(), group, "tooltipTimeTo");
mTooltipShowTimeTo->setMinimumSize(mTooltipShowTimeTo->sizeHint());
- connect(mTooltipShowTimeTo, SIGNAL(toggled(bool)), SLOT(slotTooltipTimeToToggled(bool)));
- QWhatsThis::add(mTooltipShowTimeTo,
+ connect(mTooltipShowTimeTo, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotTooltipTimeToToggled(bool)));
+ TQWhatsThis::add(mTooltipShowTimeTo,
i18n("Specify whether to show in the system tray tooltip, how long until each alarm is due"));
grid->addMultiCellWidget(mTooltipShowTimeTo, 4, 4, 1, 2, Qt::AlignAuto);
- box = new QHBox(group); // this is to control the QWhatsThis text display area
+ box = new TQHBox(group); // this is to control the TQWhatsThis text display area
box->setSpacing(KDialog::spacingHint());
- mTooltipTimeToPrefixLabel = new QLabel(i18n("&Prefix:"), box);
+ mTooltipTimeToPrefixLabel = new TQLabel(i18n("&Prefix:"), box);
mTooltipTimeToPrefixLabel->setFixedSize(mTooltipTimeToPrefixLabel->sizeHint());
- mTooltipTimeToPrefix = new QLineEdit(box);
+ mTooltipTimeToPrefix = new TQLineEdit(box);
mTooltipTimeToPrefixLabel->setBuddy(mTooltipTimeToPrefix);
- QWhatsThis::add(box,
+ TQWhatsThis::add(box,
i18n("Enter the text to be displayed in front of the time until the alarm, in the system tray tooltip"));
box->setFixedHeight(box->sizeHint().height());
grid->addWidget(box, 5, 2, Qt::AlignAuto);
group->setMaximumHeight(group->sizeHint().height());
- mModalMessages = new QCheckBox(i18n("Message &windows have a title bar and take keyboard focus"), mPage, "modalMsg");
+ mModalMessages = new TQCheckBox(i18n("Message &windows have a title bar and take keyboard focus"), mPage, "modalMsg");
mModalMessages->setMinimumSize(mModalMessages->sizeHint());
- QWhatsThis::add(mModalMessages,
+ TQWhatsThis::add(mModalMessages,
i18n("Specify the characteristics of alarm message windows:\n"
"- If checked, the window is a normal window with a title bar, which grabs keyboard input when it is displayed.\n"
"- If unchecked, the window does not interfere with your typing when "
"it is displayed, but it has no title bar and cannot be moved or resized."));
- QHBox* itemBox = new QHBox(mPage); // this is to control the QWhatsThis text display area
- box = new QHBox(itemBox);
+ TQHBox* itemBox = new TQHBox(mPage); // this is to control the TQWhatsThis text display area
+ box = new TQHBox(itemBox);
box->setSpacing(KDialog::spacingHint());
- QLabel* label = new QLabel(i18n("System tray icon &update interval:"), box);
+ TQLabel* label = new TQLabel(i18n("System tray icon &update interval:"), box);
mDaemonTrayCheckInterval = new SpinBox(1, 9999, 1, box, "daemonCheck");
mDaemonTrayCheckInterval->setLineShiftStep(10);
mDaemonTrayCheckInterval->setMinimumSize(mDaemonTrayCheckInterval->sizeHint());
label->setBuddy(mDaemonTrayCheckInterval);
- label = new QLabel(i18n("seconds"), box);
- QWhatsThis::add(box,
+ label = new TQLabel(i18n("seconds"), box);
+ TQWhatsThis::add(box,
i18n("How often to update the system tray icon to indicate whether or not the Alarm Daemon is monitoring alarms."));
- itemBox->setStretchFactor(new QWidget(itemBox), 1); // left adjust the controls
+ itemBox->setStretchFactor(new TQWidget(itemBox), 1); // left adjust the controls
itemBox->setFixedHeight(box->sizeHint().height());
- mPage->setStretchFactor(new QWidget(mPage), 1); // top adjust the widgets
+ mPage->setStretchFactor(new TQWidget(mPage), 1); // top adjust the widgets
}
void ViewPrefTab::restore()
@@ -1304,7 +1304,7 @@ void ViewPrefTab::setDefaults()
mDaemonTrayCheckInterval->setValue(Preferences::default_daemonTrayCheckInterval);
}
-void ViewPrefTab::setTooltip(int maxAlarms, bool time, bool timeTo, const QString& prefix)
+void ViewPrefTab::setTooltip(int maxAlarms, bool time, bool timeTo, const TQString& prefix)
{
if (!timeTo)
time = true; // ensure that at least one time option is ticked
diff --git a/kalarm/prefdlg.h b/kalarm/prefdlg.h
index a5f1ee9a1..5eec5f224 100644
--- a/kalarm/prefdlg.h
+++ b/kalarm/prefdlg.h
@@ -21,8 +21,8 @@
#ifndef PREFDLG_H
#define PREFDLG_H
-#include <qsize.h>
-#include <qdatetime.h>
+#include <tqsize.h>
+#include <tqdatetime.h>
#include <ktabctl.h>
#include <kdialogbase.h>
@@ -84,7 +84,7 @@ class PrefsTabBase : public QWidget
{
Q_OBJECT
public:
- PrefsTabBase(QVBox*);
+ PrefsTabBase(TQVBox*);
void setPreferences();
virtual void restore() = 0;
@@ -93,7 +93,7 @@ class PrefsTabBase : public QWidget
static int indentWidth() { return mIndentWidth; }
protected:
- QVBox* mPage;
+ TQVBox* mPage;
private:
static int mIndentWidth; // indent width for checkboxes etc.
@@ -105,7 +105,7 @@ class MiscPrefTab : public PrefsTabBase
{
Q_OBJECT
public:
- MiscPrefTab(QVBox*);
+ MiscPrefTab(TQVBox*);
virtual void restore();
virtual void apply(bool syncToDisc);
@@ -125,21 +125,21 @@ class MiscPrefTab : public PrefsTabBase
private:
void setExpiredControls(int purgeDays);
- QCheckBox* mAutostartDaemon;
- QRadioButton* mRunInSystemTray;
- QRadioButton* mRunOnDemand;
- QCheckBox* mDisableAlarmsIfStopped;
- QCheckBox* mQuitWarn;
- QCheckBox* mAutostartTrayIcon;
- QCheckBox* mConfirmAlarmDeletion;
- QCheckBox* mKeepExpired;
- QCheckBox* mPurgeExpired;
+ TQCheckBox* mAutostartDaemon;
+ TQRadioButton* mRunInSystemTray;
+ TQRadioButton* mRunOnDemand;
+ TQCheckBox* mDisableAlarmsIfStopped;
+ TQCheckBox* mQuitWarn;
+ TQCheckBox* mAutostartTrayIcon;
+ TQCheckBox* mConfirmAlarmDeletion;
+ TQCheckBox* mKeepExpired;
+ TQCheckBox* mPurgeExpired;
SpinBox* mPurgeAfter;
- QLabel* mPurgeAfterLabel;
- QPushButton* mClearExpired;
+ TQLabel* mPurgeAfterLabel;
+ TQPushButton* mClearExpired;
TimeEdit* mStartOfDay;
- QButtonGroup* mXtermType;
- QLineEdit* mXtermCommand;
+ TQButtonGroup* mXtermType;
+ TQLineEdit* mXtermCommand;
int mXtermFirst; // id of first terminal window radio button
int mXtermCount; // number of terminal window types
};
@@ -150,9 +150,9 @@ class EmailPrefTab : public PrefsTabBase
{
Q_OBJECT
public:
- EmailPrefTab(QVBox*);
+ EmailPrefTab(TQVBox*);
- QString validate();
+ TQString validate();
virtual void restore();
virtual void apply(bool syncToDisc);
virtual void setDefaults();
@@ -164,17 +164,17 @@ class EmailPrefTab : public PrefsTabBase
void slotAddressChanged() { mAddressChanged = true; }
private:
- void setEmailAddress(Preferences::MailFrom, const QString& address);
- void setEmailBccAddress(bool useControlCentre, const QString& address);
- QString validateAddr(ButtonGroup*, QLineEdit* addr, const QString& msg);
+ void setEmailAddress(Preferences::MailFrom, const TQString& address);
+ void setEmailBccAddress(bool useControlCentre, const TQString& address);
+ TQString validateAddr(ButtonGroup*, TQLineEdit* addr, const TQString& msg);
ButtonGroup* mEmailClient;
ButtonGroup* mFromAddressGroup;
- QLineEdit* mEmailAddress;
+ TQLineEdit* mEmailAddress;
ButtonGroup* mBccAddressGroup;
- QLineEdit* mEmailBccAddress;
- QCheckBox* mEmailQueuedNotify;
- QCheckBox* mEmailCopyToKMail;
+ TQLineEdit* mEmailBccAddress;
+ TQCheckBox* mEmailQueuedNotify;
+ TQCheckBox* mEmailCopyToKMail;
bool mAddressChanged;
bool mBccAddressChanged;
};
@@ -185,9 +185,9 @@ class EditPrefTab : public PrefsTabBase
{
Q_OBJECT
public:
- EditPrefTab(QVBox*);
+ EditPrefTab(TQVBox*);
- QString validate();
+ TQString validate();
virtual void restore();
virtual void apply(bool syncToDisc);
virtual void setDefaults();
@@ -196,22 +196,22 @@ class EditPrefTab : public PrefsTabBase
void slotBrowseSoundFile();
private:
- QCheckBox* mAutoClose;
- QCheckBox* mConfirmAck;
- QComboBox* mReminderUnits;
+ TQCheckBox* mAutoClose;
+ TQCheckBox* mConfirmAck;
+ TQComboBox* mReminderUnits;
SpecialActionsButton* mSpecialActionsButton;
- QCheckBox* mCmdScript;
- QCheckBox* mCmdXterm;
- QCheckBox* mEmailBcc;
- QComboBox* mSound;
- QLabel* mSoundFileLabel;
- QLineEdit* mSoundFile;
- QPushButton* mSoundFileBrowse;
- QCheckBox* mSoundRepeat;
- QCheckBox* mCopyToKOrganizer;
- QCheckBox* mLateCancel;
- QComboBox* mRecurPeriod;
- QButtonGroup* mFeb29;
+ TQCheckBox* mCmdScript;
+ TQCheckBox* mCmdXterm;
+ TQCheckBox* mEmailBcc;
+ TQComboBox* mSound;
+ TQLabel* mSoundFileLabel;
+ TQLineEdit* mSoundFile;
+ TQPushButton* mSoundFileBrowse;
+ TQCheckBox* mSoundRepeat;
+ TQCheckBox* mCopyToKOrganizer;
+ TQCheckBox* mLateCancel;
+ TQComboBox* mRecurPeriod;
+ TQButtonGroup* mFeb29;
static int soundIndex(SoundPicker::Type);
static int recurIndex(RecurrenceEdit::RepeatType);
@@ -223,7 +223,7 @@ class ViewPrefTab : public PrefsTabBase
{
Q_OBJECT
public:
- ViewPrefTab(QVBox*);
+ ViewPrefTab(TQVBox*);
virtual void restore();
virtual void apply(bool syncToDisc);
@@ -236,16 +236,16 @@ class ViewPrefTab : public PrefsTabBase
void slotTooltipTimeToToggled(bool);
private:
- void setTooltip(int maxAlarms, bool time, bool timeTo, const QString& prefix);
+ void setTooltip(int maxAlarms, bool time, bool timeTo, const TQString& prefix);
- QCheckBox* mTooltipShowAlarms;
- QCheckBox* mTooltipMaxAlarms;
+ TQCheckBox* mTooltipShowAlarms;
+ TQCheckBox* mTooltipMaxAlarms;
SpinBox* mTooltipMaxAlarmCount;
- QCheckBox* mTooltipShowTime;
- QCheckBox* mTooltipShowTimeTo;
- QLineEdit* mTooltipTimeToPrefix;
- QLabel* mTooltipTimeToPrefixLabel;
- QCheckBox* mModalMessages;
+ TQCheckBox* mTooltipShowTime;
+ TQCheckBox* mTooltipShowTimeTo;
+ TQLineEdit* mTooltipTimeToPrefix;
+ TQLabel* mTooltipTimeToPrefixLabel;
+ TQCheckBox* mModalMessages;
SpinBox* mDaemonTrayCheckInterval;
};
@@ -255,7 +255,7 @@ class FontColourPrefTab : public PrefsTabBase
{
Q_OBJECT
public:
- FontColourPrefTab(QVBox*);
+ FontColourPrefTab(TQVBox*);
virtual void restore();
virtual void apply(bool syncToDisc);
diff --git a/kalarm/preferences.cpp b/kalarm/preferences.cpp
index ad96098e0..3c2b5f185 100644
--- a/kalarm/preferences.cpp
+++ b/kalarm/preferences.cpp
@@ -37,17 +37,17 @@
#include "preferences.moc"
-static QString translateXTermPath(KConfig*, const QString& cmdline, bool write);
+static TQString translateXTermPath(KConfig*, const TQString& cmdline, bool write);
Preferences* Preferences::mInstance = 0;
// Default config file settings
-QColor defaultMessageColours[] = { Qt::red, Qt::green, Qt::blue, Qt::cyan, Qt::magenta, Qt::yellow, Qt::white, Qt::lightGray, Qt::black, QColor() };
+TQColor defaultMessageColours[] = { Qt::red, Qt::green, Qt::blue, Qt::cyan, Qt::magenta, Qt::yellow, Qt::white, Qt::lightGray, Qt::black, TQColor() };
const ColourList Preferences::default_messageColours(defaultMessageColours);
-const QColor Preferences::default_defaultBgColour(Qt::red);
-const QColor Preferences::default_defaultFgColour(Qt::black);
-QFont Preferences::mDefault_messageFont; // initialised in constructor
-const QTime Preferences::default_startOfDay(0, 0);
+const TQColor Preferences::default_defaultBgColour(Qt::red);
+const TQColor Preferences::default_defaultFgColour(Qt::black);
+TQFont Preferences::mDefault_messageFont; // initialised in constructor
+const TQTime Preferences::default_startOfDay(0, 0);
const bool Preferences::default_runInSystemTray = true;
const bool Preferences::default_disableAlarmsIfStopped = true;
const bool Preferences::default_quitWarn = true;
@@ -58,14 +58,14 @@ const int Preferences::default_messageButtonDelay =
const int Preferences::default_tooltipAlarmCount = 5;
const bool Preferences::default_showTooltipAlarmTime = true;
const bool Preferences::default_showTooltipTimeToAlarm = true;
-const QString Preferences::default_tooltipTimeToPrefix = QString::fromLatin1("+");
+const TQString Preferences::default_tooltipTimeToPrefix = TQString::fromLatin1("+");
const int Preferences::default_daemonTrayCheckInterval = 10; // (seconds)
const bool Preferences::default_emailCopyToKMail = false;
const bool Preferences::default_emailQueuedNotify = false;
-const QColor Preferences::default_disabledColour(Qt::lightGray);
-const QColor Preferences::default_expiredColour(Qt::darkRed);
+const TQColor Preferences::default_disabledColour(Qt::lightGray);
+const TQColor Preferences::default_expiredColour(Qt::darkRed);
const int Preferences::default_expiredKeepDays = 7;
-const QString Preferences::default_defaultSoundFile = QString::null;
+const TQString Preferences::default_defaultSoundFile = TQString::null;
const float Preferences::default_defaultSoundVolume = -1;
const int Preferences::default_defaultLateCancel = 0;
const bool Preferences::default_defaultAutoClose = false;
@@ -76,15 +76,15 @@ const bool Preferences::default_defaultConfirmAck =
const bool Preferences::default_defaultCmdScript = false;
const EditAlarmDlg::CmdLogType Preferences::default_defaultCmdLogType = EditAlarmDlg::DISCARD_OUTPUT;
const bool Preferences::default_defaultEmailBcc = false;
-const QString Preferences::default_emailAddress = QString::null;
-const QString Preferences::default_emailBccAddress = QString::null;
+const TQString Preferences::default_emailAddress = TQString::null;
+const TQString Preferences::default_emailBccAddress = TQString::null;
const Preferences::MailClient Preferences::default_emailClient = KMAIL;
const Preferences::MailFrom Preferences::default_emailBccFrom = MAIL_FROM_CONTROL_CENTRE;
const RecurrenceEdit::RepeatType Preferences::default_defaultRecurPeriod = RecurrenceEdit::NO_RECUR;
const KARecurrence::Feb29Type Preferences::default_defaultFeb29Type = KARecurrence::FEB29_MAR1;
const TimePeriod::Units Preferences::default_defaultReminderUnits = TimePeriod::HOURS_MINUTES;
-const QString Preferences::default_defaultPreAction;
-const QString Preferences::default_defaultPostAction;
+const TQString Preferences::default_defaultPreAction;
+const TQString Preferences::default_defaultPostAction;
Preferences::MailFrom Preferences::default_emailFrom()
{
@@ -93,9 +93,9 @@ Preferences::MailFrom Preferences::default_emailFrom()
// Active config file settings
ColourList Preferences::mMessageColours;
-QColor Preferences::mDefaultBgColour;
-QFont Preferences::mMessageFont;
-QTime Preferences::mStartOfDay;
+TQColor Preferences::mDefaultBgColour;
+TQFont Preferences::mMessageFont;
+TQTime Preferences::mStartOfDay;
bool Preferences::mRunInSystemTray;
bool Preferences::mDisableAlarmsIfStopped;
bool Preferences::mAutostartTrayIcon;
@@ -105,20 +105,20 @@ int Preferences::mMessageButtonDelay;
int Preferences::mTooltipAlarmCount;
bool Preferences::mShowTooltipAlarmTime;
bool Preferences::mShowTooltipTimeToAlarm;
-QString Preferences::mTooltipTimeToPrefix;
+TQString Preferences::mTooltipTimeToPrefix;
int Preferences::mDaemonTrayCheckInterval;
-QString Preferences::mEmailAddress;
-QString Preferences::mEmailBccAddress;
+TQString Preferences::mEmailAddress;
+TQString Preferences::mEmailBccAddress;
Preferences::MailClient Preferences::mEmailClient;
Preferences::MailFrom Preferences::mEmailFrom;
Preferences::MailFrom Preferences::mEmailBccFrom;
bool Preferences::mEmailCopyToKMail;
-QString Preferences::mCmdXTermCommand;
-QColor Preferences::mDisabledColour;
-QColor Preferences::mExpiredColour;
+TQString Preferences::mCmdXTermCommand;
+TQColor Preferences::mDisabledColour;
+TQColor Preferences::mExpiredColour;
int Preferences::mExpiredKeepDays;
// Default settings for Edit Alarm dialog
-QString Preferences::mDefaultSoundFile;
+TQString Preferences::mDefaultSoundFile;
float Preferences::mDefaultSoundVolume;
int Preferences::mDefaultLateCancel;
bool Preferences::mDefaultAutoClose;
@@ -129,82 +129,82 @@ bool Preferences::mDefaultConfirmAck;
bool Preferences::mDefaultEmailBcc;
bool Preferences::mDefaultCmdScript;
EditAlarmDlg::CmdLogType Preferences::mDefaultCmdLogType;
-QString Preferences::mDefaultCmdLogFile;
+TQString Preferences::mDefaultCmdLogFile;
RecurrenceEdit::RepeatType Preferences::mDefaultRecurPeriod;
TimePeriod::Units Preferences::mDefaultReminderUnits;
-QString Preferences::mDefaultPreAction;
-QString Preferences::mDefaultPostAction;
+TQString Preferences::mDefaultPreAction;
+TQString Preferences::mDefaultPostAction;
// Change tracking
-QTime Preferences::mOldStartOfDay;
+TQTime Preferences::mOldStartOfDay;
bool Preferences::mStartOfDayChanged;
-static const QString defaultFeb29RecurType = QString::fromLatin1("Mar1");
-static const QString defaultEmailClient = QString::fromLatin1("kmail");
+static const TQString defaultFeb29RecurType = TQString::fromLatin1("Mar1");
+static const TQString defaultEmailClient = TQString::fromLatin1("kmail");
// Config file entry names
-static const QString GENERAL_SECTION = QString::fromLatin1("General");
-static const QString VERSION_NUM = QString::fromLatin1("Version");
-static const QString MESSAGE_COLOURS = QString::fromLatin1("MessageColours");
-static const QString MESSAGE_BG_COLOUR = QString::fromLatin1("MessageBackgroundColour");
-static const QString MESSAGE_FONT = QString::fromLatin1("MessageFont");
-static const QString RUN_IN_SYSTEM_TRAY = QString::fromLatin1("RunInSystemTray");
-static const QString DISABLE_IF_STOPPED = QString::fromLatin1("DisableAlarmsIfStopped");
-static const QString AUTOSTART_TRAY = QString::fromLatin1("AutostartTray");
-static const QString FEB29_RECUR_TYPE = QString::fromLatin1("Feb29Recur");
-static const QString MODAL_MESSAGES = QString::fromLatin1("ModalMessages");
-static const QString MESSAGE_BUTTON_DELAY = QString::fromLatin1("MessageButtonDelay");
-static const QString TOOLTIP_ALARM_COUNT = QString::fromLatin1("TooltipAlarmCount");
-static const QString TOOLTIP_ALARM_TIME = QString::fromLatin1("ShowTooltipAlarmTime");
-static const QString TOOLTIP_TIME_TO_ALARM = QString::fromLatin1("ShowTooltipTimeToAlarm");
-static const QString TOOLTIP_TIME_TO_PREFIX = QString::fromLatin1("TooltipTimeToPrefix");
-static const QString DAEMON_TRAY_INTERVAL = QString::fromLatin1("DaemonTrayCheckInterval");
-static const QString EMAIL_CLIENT = QString::fromLatin1("EmailClient");
-static const QString EMAIL_COPY_TO_KMAIL = QString::fromLatin1("EmailCopyToKMail");
-static const QString EMAIL_FROM = QString::fromLatin1("EmailFrom");
-static const QString EMAIL_BCC_ADDRESS = QString::fromLatin1("EmailBccAddress");
-static const QString CMD_XTERM_COMMAND = QString::fromLatin1("CmdXTerm");
-static const QString START_OF_DAY = QString::fromLatin1("StartOfDay");
-static const QString START_OF_DAY_CHECK = QString::fromLatin1("Sod");
-static const QString DISABLED_COLOUR = QString::fromLatin1("DisabledColour");
-static const QString EXPIRED_COLOUR = QString::fromLatin1("ExpiredColour");
-static const QString EXPIRED_KEEP_DAYS = QString::fromLatin1("ExpiredKeepDays");
-static const QString DEFAULTS_SECTION = QString::fromLatin1("Defaults");
-static const QString DEF_LATE_CANCEL = QString::fromLatin1("DefLateCancel");
-static const QString DEF_AUTO_CLOSE = QString::fromLatin1("DefAutoClose");
-static const QString DEF_CONFIRM_ACK = QString::fromLatin1("DefConfirmAck");
-static const QString DEF_COPY_TO_KORG = QString::fromLatin1("DefCopyKOrg");
-static const QString DEF_SOUND_TYPE = QString::fromLatin1("DefSoundType");
-static const QString DEF_SOUND_FILE = QString::fromLatin1("DefSoundFile");
-static const QString DEF_SOUND_VOLUME = QString::fromLatin1("DefSoundVolume");
-static const QString DEF_SOUND_REPEAT = QString::fromLatin1("DefSoundRepeat");
-static const QString DEF_CMD_SCRIPT = QString::fromLatin1("DefCmdScript");
-static const QString DEF_CMD_LOG_TYPE = QString::fromLatin1("DefCmdLogType");
-static const QString DEF_LOG_FILE = QString::fromLatin1("DefLogFile");
-static const QString DEF_EMAIL_BCC = QString::fromLatin1("DefEmailBcc");
-static const QString DEF_RECUR_PERIOD = QString::fromLatin1("DefRecurPeriod");
-static const QString DEF_REMIND_UNITS = QString::fromLatin1("RemindUnits");
-static const QString DEF_PRE_ACTION = QString::fromLatin1("DefPreAction");
-static const QString DEF_POST_ACTION = QString::fromLatin1("DefPostAction");
+static const TQString GENERAL_SECTION = TQString::fromLatin1("General");
+static const TQString VERSION_NUM = TQString::fromLatin1("Version");
+static const TQString MESSAGE_COLOURS = TQString::fromLatin1("MessageColours");
+static const TQString MESSAGE_BG_COLOUR = TQString::fromLatin1("MessageBackgroundColour");
+static const TQString MESSAGE_FONT = TQString::fromLatin1("MessageFont");
+static const TQString RUN_IN_SYSTEM_TRAY = TQString::fromLatin1("RunInSystemTray");
+static const TQString DISABLE_IF_STOPPED = TQString::fromLatin1("DisableAlarmsIfStopped");
+static const TQString AUTOSTART_TRAY = TQString::fromLatin1("AutostartTray");
+static const TQString FEB29_RECUR_TYPE = TQString::fromLatin1("Feb29Recur");
+static const TQString MODAL_MESSAGES = TQString::fromLatin1("ModalMessages");
+static const TQString MESSAGE_BUTTON_DELAY = TQString::fromLatin1("MessageButtonDelay");
+static const TQString TOOLTIP_ALARM_COUNT = TQString::fromLatin1("TooltipAlarmCount");
+static const TQString TOOLTIP_ALARM_TIME = TQString::fromLatin1("ShowTooltipAlarmTime");
+static const TQString TOOLTIP_TIME_TO_ALARM = TQString::fromLatin1("ShowTooltipTimeToAlarm");
+static const TQString TOOLTIP_TIME_TO_PREFIX = TQString::fromLatin1("TooltipTimeToPrefix");
+static const TQString DAEMON_TRAY_INTERVAL = TQString::fromLatin1("DaemonTrayCheckInterval");
+static const TQString EMAIL_CLIENT = TQString::fromLatin1("EmailClient");
+static const TQString EMAIL_COPY_TO_KMAIL = TQString::fromLatin1("EmailCopyToKMail");
+static const TQString EMAIL_FROM = TQString::fromLatin1("EmailFrom");
+static const TQString EMAIL_BCC_ADDRESS = TQString::fromLatin1("EmailBccAddress");
+static const TQString CMD_XTERM_COMMAND = TQString::fromLatin1("CmdXTerm");
+static const TQString START_OF_DAY = TQString::fromLatin1("StartOfDay");
+static const TQString START_OF_DAY_CHECK = TQString::fromLatin1("Sod");
+static const TQString DISABLED_COLOUR = TQString::fromLatin1("DisabledColour");
+static const TQString EXPIRED_COLOUR = TQString::fromLatin1("ExpiredColour");
+static const TQString EXPIRED_KEEP_DAYS = TQString::fromLatin1("ExpiredKeepDays");
+static const TQString DEFAULTS_SECTION = TQString::fromLatin1("Defaults");
+static const TQString DEF_LATE_CANCEL = TQString::fromLatin1("DefLateCancel");
+static const TQString DEF_AUTO_CLOSE = TQString::fromLatin1("DefAutoClose");
+static const TQString DEF_CONFIRM_ACK = TQString::fromLatin1("DefConfirmAck");
+static const TQString DEF_COPY_TO_KORG = TQString::fromLatin1("DefCopyKOrg");
+static const TQString DEF_SOUND_TYPE = TQString::fromLatin1("DefSoundType");
+static const TQString DEF_SOUND_FILE = TQString::fromLatin1("DefSoundFile");
+static const TQString DEF_SOUND_VOLUME = TQString::fromLatin1("DefSoundVolume");
+static const TQString DEF_SOUND_REPEAT = TQString::fromLatin1("DefSoundRepeat");
+static const TQString DEF_CMD_SCRIPT = TQString::fromLatin1("DefCmdScript");
+static const TQString DEF_CMD_LOG_TYPE = TQString::fromLatin1("DefCmdLogType");
+static const TQString DEF_LOG_FILE = TQString::fromLatin1("DefLogFile");
+static const TQString DEF_EMAIL_BCC = TQString::fromLatin1("DefEmailBcc");
+static const TQString DEF_RECUR_PERIOD = TQString::fromLatin1("DefRecurPeriod");
+static const TQString DEF_REMIND_UNITS = TQString::fromLatin1("RemindUnits");
+static const TQString DEF_PRE_ACTION = TQString::fromLatin1("DefPreAction");
+static const TQString DEF_POST_ACTION = TQString::fromLatin1("DefPostAction");
// Config file entry name for temporary use
-static const QString TEMP = QString::fromLatin1("Temp");
+static const TQString TEMP = TQString::fromLatin1("Temp");
// Values for EmailFrom entry
-static const QString FROM_CONTROL_CENTRE = QString::fromLatin1("@ControlCenter");
-static const QString FROM_KMAIL = QString::fromLatin1("@KMail");
+static const TQString FROM_CONTROL_CENTRE = TQString::fromLatin1("@ControlCenter");
+static const TQString FROM_KMAIL = TQString::fromLatin1("@KMail");
// Config file entry names for notification messages
-const QString Preferences::QUIT_WARN = QString::fromLatin1("QuitWarn");
-const QString Preferences::CONFIRM_ALARM_DELETION = QString::fromLatin1("ConfirmAlarmDeletion");
-const QString Preferences::EMAIL_QUEUED_NOTIFY = QString::fromLatin1("EmailQueuedNotify");
+const TQString Preferences::QUIT_WARN = TQString::fromLatin1("QuitWarn");
+const TQString Preferences::CONFIRM_ALARM_DELETION = TQString::fromLatin1("ConfirmAlarmDeletion");
+const TQString Preferences::EMAIL_QUEUED_NOTIFY = TQString::fromLatin1("EmailQueuedNotify");
static const int SODxor = 0x82451630;
inline int Preferences::startOfDayCheck()
{
// Combine with a 'random' constant to prevent 'clever' people fiddling the
// value, and thereby screwing things up.
- return QTime().msecsTo(mStartOfDay) ^ SODxor;
+ return TQTime().msecsTo(mStartOfDay) ^ SODxor;
}
@@ -214,7 +214,7 @@ void Preferences::initialise()
{
// Initialise static variables here to avoid static initialisation
// sequencing errors.
- mDefault_messageFont = QFont(KGlobalSettings::generalFont().family(), 16, QFont::Bold);
+ mDefault_messageFont = TQFont(KGlobalSettings::generalFont().family(), 16, TQFont::Bold);
mInstance = new Preferences;
@@ -229,10 +229,10 @@ void Preferences::initialise()
}
}
-void Preferences::connect(const char* signal, const QObject* receiver, const char* member)
+void Preferences::connect(const char* signal, const TQObject* receiver, const char* member)
{
initialise();
- QObject::connect(mInstance, signal, receiver, member);
+ TQObject::connect(mInstance, signal, receiver, member);
}
void Preferences::emitStartOfDayChanged()
@@ -254,15 +254,15 @@ void Preferences::read()
KConfig* config = KGlobal::config();
config->setGroup(GENERAL_SECTION);
- QStringList cols = config->readListEntry(MESSAGE_COLOURS);
+ TQStringList cols = config->readListEntry(MESSAGE_COLOURS);
if (!cols.count())
mMessageColours = default_messageColours;
else
{
mMessageColours.clear();
- for (QStringList::Iterator it = cols.begin(); it != cols.end(); ++it)
+ for (TQStringList::Iterator it = cols.begin(); it != cols.end(); ++it)
{
- QColor c((*it));
+ TQColor c((*it));
if (c.isValid())
mMessageColours.insert(c);
}
@@ -287,12 +287,12 @@ void Preferences::read()
mDaemonTrayCheckInterval = static_cast<int>(config->readUnsignedNumEntry(DAEMON_TRAY_INTERVAL, default_daemonTrayCheckInterval));
if (mDaemonTrayCheckInterval < 1)
mDaemonTrayCheckInterval = 1;
- QCString client = config->readEntry(EMAIL_CLIENT, defaultEmailClient).local8Bit(); // don't use readPathEntry() here (values are hard-coded)
+ TQCString client = config->readEntry(EMAIL_CLIENT, defaultEmailClient).local8Bit(); // don't use readPathEntry() here (values are hard-coded)
mEmailClient = (client == "sendmail" ? SENDMAIL : KMAIL);
mEmailCopyToKMail = config->readBoolEntry(EMAIL_COPY_TO_KMAIL, default_emailCopyToKMail);
- QString from = config->readEntry(EMAIL_FROM, emailFrom(default_emailFrom(), false, false));
+ TQString from = config->readEntry(EMAIL_FROM, emailFrom(default_emailFrom(), false, false));
mEmailFrom = emailFrom(from);
- QString bccFrom = config->readEntry(EMAIL_BCC_ADDRESS, emailFrom(default_emailBccFrom, false, true));
+ TQString bccFrom = config->readEntry(EMAIL_BCC_ADDRESS, emailFrom(default_emailBccFrom, false, true));
mEmailBccFrom = emailFrom(bccFrom);
if (mEmailFrom == MAIL_FROM_CONTROL_CENTRE || mEmailBccFrom == MAIL_FROM_CONTROL_CENTRE)
mEmailAddress = mEmailBccAddress = KAMail::controlCentreAddress();
@@ -301,7 +301,7 @@ void Preferences::read()
if (mEmailBccFrom == MAIL_FROM_ADDR)
mEmailBccAddress = bccFrom;
mCmdXTermCommand = translateXTermPath(config, config->readEntry(CMD_XTERM_COMMAND), false);
- QDateTime defStartOfDay(QDate(1900,1,1), default_startOfDay);
+ TQDateTime defStartOfDay(TQDate(1900,1,1), default_startOfDay);
mStartOfDay = config->readDateTimeEntry(START_OF_DAY, &defStartOfDay).time();
mOldStartOfDay.setHMS(0,0,0);
int sod = config->readNumEntry(START_OF_DAY_CHECK, 0);
@@ -335,13 +335,13 @@ void Preferences::read()
int recurPeriod = config->readNumEntry(DEF_RECUR_PERIOD, default_defaultRecurPeriod);
mDefaultRecurPeriod = (recurPeriod < RecurrenceEdit::SUBDAILY || recurPeriod > RecurrenceEdit::ANNUAL)
? default_defaultRecurPeriod : (RecurrenceEdit::RepeatType)recurPeriod;
- QCString feb29 = config->readEntry(FEB29_RECUR_TYPE, defaultFeb29RecurType).local8Bit();
+ TQCString feb29 = config->readEntry(FEB29_RECUR_TYPE, defaultFeb29RecurType).local8Bit();
mDefaultFeb29Type = (feb29 == "Mar1") ? KARecurrence::FEB29_MAR1 : (feb29 == "Feb28") ? KARecurrence::FEB29_FEB28 : KARecurrence::FEB29_FEB29;
- QString remindUnits = config->readEntry(DEF_REMIND_UNITS);
- mDefaultReminderUnits = (remindUnits == QString::fromLatin1("Minutes")) ? TimePeriod::MINUTES
- : (remindUnits == QString::fromLatin1("HoursMinutes")) ? TimePeriod::HOURS_MINUTES
- : (remindUnits == QString::fromLatin1("Days")) ? TimePeriod::DAYS
- : (remindUnits == QString::fromLatin1("Weeks")) ? TimePeriod::WEEKS : default_defaultReminderUnits;
+ TQString remindUnits = config->readEntry(DEF_REMIND_UNITS);
+ mDefaultReminderUnits = (remindUnits == TQString::fromLatin1("Minutes")) ? TimePeriod::MINUTES
+ : (remindUnits == TQString::fromLatin1("HoursMinutes")) ? TimePeriod::HOURS_MINUTES
+ : (remindUnits == TQString::fromLatin1("Days")) ? TimePeriod::DAYS
+ : (remindUnits == TQString::fromLatin1("Weeks")) ? TimePeriod::WEEKS : default_defaultReminderUnits;
mDefaultPreAction = config->readEntry(DEF_PRE_ACTION, default_defaultPreAction);
mDefaultPostAction = config->readEntry(DEF_POST_ACTION, default_defaultPostAction);
mInstance->emitPreferencesChanged();
@@ -361,9 +361,9 @@ void Preferences::save(bool syncToDisc)
KConfig* config = KGlobal::config();
config->setGroup(GENERAL_SECTION);
config->writeEntry(VERSION_NUM, KALARM_VERSION);
- QStringList colours;
+ TQStringList colours;
for (ColourList::const_iterator it = mMessageColours.begin(); it != mMessageColours.end(); ++it)
- colours.append(QColor(*it).name());
+ colours.append(TQColor(*it).name());
config->writeEntry(MESSAGE_COLOURS, colours);
config->writeEntry(MESSAGE_BG_COLOUR, mDefaultBgColour);
config->writeEntry(MESSAGE_FONT, mMessageFont);
@@ -382,7 +382,7 @@ void Preferences::save(bool syncToDisc)
config->writeEntry(EMAIL_FROM, emailFrom(mEmailFrom, true, false));
config->writeEntry(EMAIL_BCC_ADDRESS, emailFrom(mEmailBccFrom, true, true));
config->writeEntry(CMD_XTERM_COMMAND, translateXTermPath(config, mCmdXTermCommand, true));
- config->writeEntry(START_OF_DAY, QDateTime(QDate(1900,1,1), mStartOfDay));
+ config->writeEntry(START_OF_DAY, TQDateTime(TQDate(1900,1,1), mStartOfDay));
// Start-of-day check value is only written once the start-of-day time has been processed.
config->writeEntry(DISABLED_COLOUR, mDisabledColour);
config->writeEntry(EXPIRED_COLOUR, mExpiredColour);
@@ -403,14 +403,14 @@ void Preferences::save(bool syncToDisc)
config->writeEntry(DEF_EMAIL_BCC, mDefaultEmailBcc);
config->writeEntry(DEF_RECUR_PERIOD, mDefaultRecurPeriod);
config->writeEntry(FEB29_RECUR_TYPE, (mDefaultFeb29Type == KARecurrence::FEB29_MAR1 ? "Mar1" : mDefaultFeb29Type == KARecurrence::FEB29_FEB28 ? "Feb28" : "None"));
- QString value;
+ TQString value;
switch (mDefaultReminderUnits)
{
- case TimePeriod::MINUTES: value = QString::fromLatin1("Minutes"); break;
- case TimePeriod::HOURS_MINUTES: value = QString::fromLatin1("HoursMinutes"); break;
- case TimePeriod::DAYS: value = QString::fromLatin1("Days"); break;
- case TimePeriod::WEEKS: value = QString::fromLatin1("Weeks"); break;
- default: value = QString::null; break;
+ case TimePeriod::MINUTES: value = TQString::fromLatin1("Minutes"); break;
+ case TimePeriod::HOURS_MINUTES: value = TQString::fromLatin1("HoursMinutes"); break;
+ case TimePeriod::DAYS: value = TQString::fromLatin1("Days"); break;
+ case TimePeriod::WEEKS: value = TQString::fromLatin1("Weeks"); break;
+ default: value = TQString::null; break;
}
config->writeEntry(DEF_REMIND_UNITS, value);
config->writeEntry(DEF_PRE_ACTION, mDefaultPreAction);
@@ -440,7 +440,7 @@ void Preferences::updateStartOfDayCheck()
mStartOfDayChanged = false;
}
-QString Preferences::emailFrom(Preferences::MailFrom from, bool useAddress, bool bcc)
+TQString Preferences::emailFrom(Preferences::MailFrom from, bool useAddress, bool bcc)
{
switch (from)
{
@@ -449,13 +449,13 @@ QString Preferences::emailFrom(Preferences::MailFrom from, bool useAddress, bool
case MAIL_FROM_CONTROL_CENTRE:
return FROM_CONTROL_CENTRE;
case MAIL_FROM_ADDR:
- return useAddress ? (bcc ? mEmailBccAddress : mEmailAddress) : QString::null;
+ return useAddress ? (bcc ? mEmailBccAddress : mEmailAddress) : TQString::null;
default:
- return QString::null;
+ return TQString::null;
}
}
-Preferences::MailFrom Preferences::emailFrom(const QString& str)
+Preferences::MailFrom Preferences::emailFrom(const TQString& str)
{
if (str == FROM_KMAIL)
return MAIL_FROM_KMAIL;
@@ -467,7 +467,7 @@ Preferences::MailFrom Preferences::emailFrom(const QString& str)
/******************************************************************************
* Get user's default 'From' email address.
*/
-QString Preferences::emailAddress()
+TQString Preferences::emailAddress()
{
switch (mEmailFrom)
{
@@ -478,11 +478,11 @@ QString Preferences::emailAddress()
case MAIL_FROM_ADDR:
return mEmailAddress;
default:
- return QString::null;
+ return TQString::null;
}
}
-QString Preferences::emailBccAddress()
+TQString Preferences::emailBccAddress()
{
switch (mEmailBccFrom)
{
@@ -491,11 +491,11 @@ QString Preferences::emailBccAddress()
case MAIL_FROM_ADDR:
return mEmailBccAddress;
default:
- return QString::null;
+ return TQString::null;
}
}
-void Preferences::setEmailAddress(Preferences::MailFrom from, const QString& address)
+void Preferences::setEmailAddress(Preferences::MailFrom from, const TQString& address)
{
switch (from)
{
@@ -513,7 +513,7 @@ void Preferences::setEmailAddress(Preferences::MailFrom from, const QString& add
mEmailFrom = from;
}
-void Preferences::setEmailBccAddress(bool useControlCentre, const QString& address)
+void Preferences::setEmailBccAddress(bool useControlCentre, const TQString& address)
{
if (useControlCentre)
mEmailBccAddress = KAMail::controlCentreAddress();
@@ -526,7 +526,7 @@ void Preferences::setEmailBccAddress(bool useControlCentre, const QString& addre
* Called to allow or suppress output of the specified message dialog, where the
* dialog has a checkbox to turn notification off.
*/
-void Preferences::setNotify(const QString& messageID, bool notify)
+void Preferences::setNotify(const TQString& messageID, bool notify)
{
MessageBox::saveDontShowAgainContinue(messageID, !notify);
}
@@ -538,7 +538,7 @@ void Preferences::setNotify(const QString& messageID, bool notify)
* "don't ask again")
* = true in all other cases.
*/
-bool Preferences::notifying(const QString& messageID)
+bool Preferences::notifying(const TQString& messageID)
{
return MessageBox::shouldBeShownContinue(messageID);
}
@@ -558,12 +558,12 @@ void Preferences::convertOldPrefs()
if (version <= KAlarm::Version(1,4,21))
{
// Convert KAlarm 1.4.21 preferences
- static const QString OLD_REMIND_UNITS = QString::fromLatin1("DefRemindUnits");
+ static const TQString OLD_REMIND_UNITS = TQString::fromLatin1("DefRemindUnits");
config->setGroup(DEFAULTS_SECTION);
int intUnit = config->readNumEntry(OLD_REMIND_UNITS, 0);
- QString strUnit = (intUnit == 1) ? QString::fromLatin1("Days")
- : (intUnit == 2) ? QString::fromLatin1("Weeks")
- : QString::fromLatin1("HoursMinutes");
+ TQString strUnit = (intUnit == 1) ? TQString::fromLatin1("Days")
+ : (intUnit == 2) ? TQString::fromLatin1("Weeks")
+ : TQString::fromLatin1("HoursMinutes");
config->deleteEntry(OLD_REMIND_UNITS);
config->writeEntry(DEF_REMIND_UNITS, strUnit);
}
@@ -571,11 +571,11 @@ void Preferences::convertOldPrefs()
if (version <= KAlarm::Version(1,4,20))
{
// Convert KAlarm 1.4.20 preferences
- static const QString VIEW_SECTION = QString::fromLatin1("View");
- static const QString SHOW_ARCHIVED_ALARMS = QString::fromLatin1("ShowArchivedAlarms");
- static const QString SHOW_EXPIRED_ALARMS = QString::fromLatin1("ShowExpiredAlarms");
- static const QString SHOW_ALARM_TIME = QString::fromLatin1("ShowAlarmTime");
- static const QString SHOW_TIME_TO_ALARM = QString::fromLatin1("ShowTimeToAlarm");
+ static const TQString VIEW_SECTION = TQString::fromLatin1("View");
+ static const TQString SHOW_ARCHIVED_ALARMS = TQString::fromLatin1("ShowArchivedAlarms");
+ static const TQString SHOW_EXPIRED_ALARMS = TQString::fromLatin1("ShowExpiredAlarms");
+ static const TQString SHOW_ALARM_TIME = TQString::fromLatin1("ShowAlarmTime");
+ static const TQString SHOW_TIME_TO_ALARM = TQString::fromLatin1("ShowTimeToAlarm");
config->setGroup(GENERAL_SECTION);
bool showExpired = config->readBoolEntry(SHOW_EXPIRED_ALARMS, false);
bool showTime = config->readBoolEntry(SHOW_ALARM_TIME, true);
@@ -592,7 +592,7 @@ void Preferences::convertOldPrefs()
if (version <= KAlarm::Version(1,4,5))
{
// Convert KAlarm 1.4.5 preferences
- static const QString DEF_SOUND = QString::fromLatin1("DefSound");
+ static const TQString DEF_SOUND = TQString::fromLatin1("DefSound");
config->setGroup(DEFAULTS_SECTION);
bool sound = config->readBoolEntry(DEF_SOUND, false);
if (!sound)
@@ -603,10 +603,10 @@ void Preferences::convertOldPrefs()
if (version < KAlarm::Version(1,3,0))
{
// Convert KAlarm pre-1.3 preferences
- static const QString EMAIL_ADDRESS = QString::fromLatin1("EmailAddress");
- static const QString EMAIL_USE_CTRL_CENTRE = QString::fromLatin1("EmailUseControlCenter");
- static const QString EMAIL_BCC_USE_CTRL_CENTRE = QString::fromLatin1("EmailBccUseControlCenter");
- QMap<QString, QString> entries = config->entryMap(GENERAL_SECTION);
+ static const TQString EMAIL_ADDRESS = TQString::fromLatin1("EmailAddress");
+ static const TQString EMAIL_USE_CTRL_CENTRE = TQString::fromLatin1("EmailUseControlCenter");
+ static const TQString EMAIL_BCC_USE_CTRL_CENTRE = TQString::fromLatin1("EmailBccUseControlCenter");
+ TQMap<TQString, TQString> entries = config->entryMap(GENERAL_SECTION);
if (entries.find(EMAIL_FROM) == entries.end()
&& entries.find(EMAIL_USE_CTRL_CENTRE) != entries.end())
{
@@ -628,7 +628,7 @@ void Preferences::convertOldPrefs()
config->deleteEntry(EMAIL_USE_CTRL_CENTRE);
}
// Convert KAlarm 1.2 preferences
- static const QString DEF_CMD_XTERM = QString::fromLatin1("DefCmdXterm");
+ static const TQString DEF_CMD_XTERM = TQString::fromLatin1("DefCmdXterm");
config->setGroup(DEFAULTS_SECTION);
if (config->hasKey(DEF_CMD_XTERM))
{
@@ -651,14 +651,14 @@ void Preferences::convertOldPrefs()
* causes a crash on some systems, so it's necessary to extract the
* executable path first before processing.
*/
-QString translateXTermPath(KConfig* config, const QString& cmdline, bool write)
+TQString translateXTermPath(KConfig* config, const TQString& cmdline, bool write)
{
- QString params;
- QString cmd = cmdline;
+ TQString params;
+ TQString cmd = cmdline;
if (cmdline.isEmpty())
return cmdline;
// Strip any leading quote
- QChar quote = cmdline[0];
+ TQChar quote = cmdline[0];
char q = static_cast<char>(quote);
bool quoted = (q == '"' || q == '\'');
if (quoted)
diff --git a/kalarm/preferences.h b/kalarm/preferences.h
index f0eeb4ea6..38cf9ad8a 100644
--- a/kalarm/preferences.h
+++ b/kalarm/preferences.h
@@ -23,11 +23,11 @@
#include "kalarm.h"
-#include <qobject.h>
-#include <qcolor.h>
-#include <qfont.h>
-#include <qdatetime.h>
-#include <qvaluelist.h>
+#include <tqobject.h>
+#include <tqcolor.h>
+#include <tqfont.h>
+#include <tqdatetime.h>
+#include <tqvaluelist.h>
class QWidget;
#include "colourlist.h"
@@ -51,14 +51,14 @@ class Preferences : public QObject
static void save(bool syncToDisc = true);
static void syncToDisc();
static void updateStartOfDayCheck();
- static void connect(const char* signal, const QObject* receiver, const char* member);
+ static void connect(const char* signal, const TQObject* receiver, const char* member);
// Access to settings
static const ColourList& messageColours() { return mMessageColours; }
- static QColor defaultBgColour() { return mDefaultBgColour; }
- static QColor defaultFgColour() { return default_defaultFgColour; }
- static const QFont& messageFont() { return mMessageFont; }
- static const QTime& startOfDay() { return mStartOfDay; }
+ static TQColor defaultBgColour() { return mDefaultBgColour; }
+ static TQColor defaultFgColour() { return default_defaultFgColour; }
+ static const TQFont& messageFont() { return mMessageFont; }
+ static const TQTime& startOfDay() { return mStartOfDay; }
static bool hasStartOfDayChanged() { return mStartOfDayChanged; }
static bool runInSystemTray() { return mRunInSystemTray; }
static bool disableAlarmsIfStopped() { return mDisableAlarmsIfStopped; }
@@ -72,7 +72,7 @@ class Preferences : public QObject
static int tooltipAlarmCount() { return mTooltipAlarmCount; }
static bool showTooltipAlarmTime() { return mShowTooltipAlarmTime; }
static bool showTooltipTimeToAlarm() { return mShowTooltipTimeToAlarm; }
- static const QString& tooltipTimeToPrefix() { return mTooltipTimeToPrefix; }
+ static const TQString& tooltipTimeToPrefix() { return mTooltipTimeToPrefix; }
static int daemonTrayCheckInterval() { return mDaemonTrayCheckInterval; }
static MailClient emailClient() { return mEmailClient; }
static bool emailCopyToKMail() { return mEmailCopyToKMail && mEmailClient == SENDMAIL; }
@@ -80,14 +80,14 @@ class Preferences : public QObject
static void setEmailQueuedNotify(bool yes) { setNotify(EMAIL_QUEUED_NOTIFY, yes); }
static MailFrom emailFrom() { return mEmailFrom; }
static bool emailBccUseControlCentre() { return mEmailBccFrom == MAIL_FROM_CONTROL_CENTRE; }
- static QString emailAddress();
- static QString emailBccAddress();
- static QString cmdXTermCommand() { return mCmdXTermCommand; }
- static QColor disabledColour() { return mDisabledColour; }
- static QColor expiredColour() { return mExpiredColour; }
+ static TQString emailAddress();
+ static TQString emailBccAddress();
+ static TQString cmdXTermCommand() { return mCmdXTermCommand; }
+ static TQColor disabledColour() { return mDisabledColour; }
+ static TQColor expiredColour() { return mExpiredColour; }
static int expiredKeepDays() { return mExpiredKeepDays; }
static SoundPicker::Type defaultSoundType() { return mDefaultSoundType; }
- static const QString& defaultSoundFile() { return mDefaultSoundFile; }
+ static const TQString& defaultSoundFile() { return mDefaultSoundFile; }
static float defaultSoundVolume() { return mDefaultSoundVolume; }
static bool defaultSoundRepeat() { return mDefaultSoundRepeat; }
static int defaultLateCancel() { return mDefaultLateCancel; }
@@ -97,27 +97,27 @@ class Preferences : public QObject
static bool defaultCmdScript() { return mDefaultCmdScript; }
static EditAlarmDlg::CmdLogType
defaultCmdLogType() { return mDefaultCmdLogType; }
- static QString defaultCmdLogFile() { return mDefaultCmdLogFile; }
+ static TQString defaultCmdLogFile() { return mDefaultCmdLogFile; }
static bool defaultEmailBcc() { return mDefaultEmailBcc; }
static RecurrenceEdit::RepeatType
defaultRecurPeriod() { return mDefaultRecurPeriod; }
static KARecurrence::Feb29Type
defaultFeb29Type() { return mDefaultFeb29Type; }
static TimePeriod::Units defaultReminderUnits() { return mDefaultReminderUnits; }
- static const QString& defaultPreAction() { return mDefaultPreAction; }
- static const QString& defaultPostAction() { return mDefaultPostAction; }
+ static const TQString& defaultPreAction() { return mDefaultPreAction; }
+ static const TQString& defaultPostAction() { return mDefaultPostAction; }
// Config file entry names for notification messages
- static const QString QUIT_WARN;
- static const QString CONFIRM_ALARM_DELETION;
- static const QString EMAIL_QUEUED_NOTIFY;
+ static const TQString QUIT_WARN;
+ static const TQString CONFIRM_ALARM_DELETION;
+ static const TQString EMAIL_QUEUED_NOTIFY;
// Default values for settings
static const ColourList default_messageColours;
- static const QColor default_defaultBgColour;
- static const QColor default_defaultFgColour;
- static const QFont& default_messageFont() { return mDefault_messageFont; };
- static const QTime default_startOfDay;
+ static const TQColor default_defaultBgColour;
+ static const TQColor default_defaultFgColour;
+ static const TQFont& default_messageFont() { return mDefault_messageFont; };
+ static const TQTime default_startOfDay;
static const bool default_runInSystemTray;
static const bool default_disableAlarmsIfStopped;
static const bool default_quitWarn;
@@ -128,19 +128,19 @@ class Preferences : public QObject
static const int default_tooltipAlarmCount;
static const bool default_showTooltipAlarmTime;
static const bool default_showTooltipTimeToAlarm;
- static const QString default_tooltipTimeToPrefix;
+ static const TQString default_tooltipTimeToPrefix;
static const int default_daemonTrayCheckInterval;
static const MailClient default_emailClient;
static const bool default_emailCopyToKMail;
static MailFrom default_emailFrom();
static const bool default_emailQueuedNotify;
static const MailFrom default_emailBccFrom;
- static const QString default_emailAddress;
- static const QString default_emailBccAddress;
- static const QColor default_disabledColour;
- static const QColor default_expiredColour;
+ static const TQString default_emailAddress;
+ static const TQString default_emailBccAddress;
+ static const TQColor default_disabledColour;
+ static const TQColor default_expiredColour;
static const int default_expiredKeepDays;
- static const QString default_defaultSoundFile;
+ static const TQString default_defaultSoundFile;
static const float default_defaultSoundVolume;
static const int default_defaultLateCancel;
static const bool default_defaultAutoClose;
@@ -154,12 +154,12 @@ class Preferences : public QObject
static const RecurrenceEdit::RepeatType default_defaultRecurPeriod;
static const KARecurrence::Feb29Type default_defaultFeb29Type;
static const TimePeriod::Units default_defaultReminderUnits;
- static const QString default_defaultPreAction;
- static const QString default_defaultPostAction;
+ static const TQString default_defaultPreAction;
+ static const TQString default_defaultPostAction;
signals:
void preferencesChanged();
- void startOfDayChanged(const QTime& oldStartOfDay);
+ void startOfDayChanged(const TQTime& oldStartOfDay);
private:
Preferences() { } // only one instance allowed
@@ -170,14 +170,14 @@ class Preferences : public QObject
static void convertOldPrefs();
static int startOfDayCheck();
static QString emailFrom(MailFrom, bool useAddress, bool bcc);
- static MailFrom emailFrom(const QString&);
- static void setNotify(const QString& messageID, bool notify);
- static bool notifying(const QString& messageID);
+ static MailFrom emailFrom(const TQString&);
+ static void setNotify(const TQString& messageID, bool notify);
+ static bool notifying(const TQString& messageID);
static Preferences* mInstance;
- static QFont mDefault_messageFont;
- static QString mEmailAddress;
- static QString mEmailBccAddress;
+ static TQFont mDefault_messageFont;
+ static TQString mEmailAddress;
+ static TQString mEmailBccAddress;
// All the following members are accessed by the Preferences dialog classes
friend class MiscPrefTab;
@@ -185,12 +185,12 @@ class Preferences : public QObject
friend class ViewPrefTab;
friend class FontColourPrefTab;
friend class EmailPrefTab;
- static void setEmailAddress(MailFrom, const QString& address);
- static void setEmailBccAddress(bool useControlCentre, const QString& address);
+ static void setEmailAddress(MailFrom, const TQString& address);
+ static void setEmailBccAddress(bool useControlCentre, const TQString& address);
static ColourList mMessageColours;
- static QColor mDefaultBgColour;
- static QFont mMessageFont;
- static QTime mStartOfDay;
+ static TQColor mDefaultBgColour;
+ static TQFont mMessageFont;
+ static TQTime mStartOfDay;
static bool mRunInSystemTray;
static bool mDisableAlarmsIfStopped;
static bool mAutostartTrayIcon;
@@ -199,18 +199,18 @@ class Preferences : public QObject
static int mTooltipAlarmCount;
static bool mShowTooltipAlarmTime;
static bool mShowTooltipTimeToAlarm;
- static QString mTooltipTimeToPrefix;
+ static TQString mTooltipTimeToPrefix;
static int mDaemonTrayCheckInterval;
static MailClient mEmailClient;
static MailFrom mEmailFrom;
static MailFrom mEmailBccFrom;
static bool mEmailCopyToKMail;
- static QString mCmdXTermCommand;
- static QColor mDisabledColour;
- static QColor mExpiredColour;
+ static TQString mCmdXTermCommand;
+ static TQColor mDisabledColour;
+ static TQColor mExpiredColour;
static int mExpiredKeepDays; // 0 = don't keep, -1 = keep indefinitely
// Default settings for Edit Alarm dialog
- static QString mDefaultSoundFile;
+ static TQString mDefaultSoundFile;
static float mDefaultSoundVolume;
static int mDefaultLateCancel;
static bool mDefaultAutoClose;
@@ -221,14 +221,14 @@ class Preferences : public QObject
static bool mDefaultEmailBcc;
static bool mDefaultCmdScript;
static EditAlarmDlg::CmdLogType mDefaultCmdLogType;
- static QString mDefaultCmdLogFile;
+ static TQString mDefaultCmdLogFile;
static RecurrenceEdit::RepeatType mDefaultRecurPeriod;
static KARecurrence::Feb29Type mDefaultFeb29Type;
static TimePeriod::Units mDefaultReminderUnits;
- static QString mDefaultPreAction;
- static QString mDefaultPostAction;
+ static TQString mDefaultPreAction;
+ static TQString mDefaultPostAction;
// Change tracking
- static QTime mOldStartOfDay; // previous start-of-day time
+ static TQTime mOldStartOfDay; // previous start-of-day time
static bool mStartOfDayChanged; // start-of-day check value doesn't tally with mStartOfDay
};
diff --git a/kalarm/recurrenceedit.cpp b/kalarm/recurrenceedit.cpp
index c7aef494b..bc70e4fe0 100644
--- a/kalarm/recurrenceedit.cpp
+++ b/kalarm/recurrenceedit.cpp
@@ -23,16 +23,16 @@
#include "kalarm.h"
-#include <qtooltip.h>
-#include <qlayout.h>
-#include <qvbox.h>
-#include <qwidgetstack.h>
-#include <qlistbox.h>
-#include <qframe.h>
-#include <qlabel.h>
-#include <qpushbutton.h>
-#include <qlineedit.h>
-#include <qwhatsthis.h>
+#include <tqtooltip.h>
+#include <tqlayout.h>
+#include <tqvbox.h>
+#include <tqwidgetstack.h>
+#include <tqlistbox.h>
+#include <tqframe.h>
+#include <tqlabel.h>
+#include <tqpushbutton.h>
+#include <tqlineedit.h>
+#include <tqwhatsthis.h>
#include <kglobal.h>
#include <klocale.h>
@@ -66,24 +66,24 @@ using namespace KCal;
// Collect these widget labels together to ensure consistent wording and
// translations across different modules.
-QString RecurrenceEdit::i18n_Norecur() { return i18n("No recurrence"); }
-QString RecurrenceEdit::i18n_NoRecur() { return i18n("No Recurrence"); }
-QString RecurrenceEdit::i18n_AtLogin() { return i18n("At Login"); }
-QString RecurrenceEdit::i18n_l_Atlogin() { return i18n("At &login"); }
-QString RecurrenceEdit::i18n_HourlyMinutely() { return i18n("Hourly/Minutely"); }
-QString RecurrenceEdit::i18n_u_HourlyMinutely() { return i18n("Ho&urly/Minutely"); }
-QString RecurrenceEdit::i18n_Daily() { return i18n("Daily"); }
-QString RecurrenceEdit::i18n_d_Daily() { return i18n("&Daily"); }
-QString RecurrenceEdit::i18n_Weekly() { return i18n("Weekly"); }
-QString RecurrenceEdit::i18n_w_Weekly() { return i18n("&Weekly"); }
-QString RecurrenceEdit::i18n_Monthly() { return i18n("Monthly"); }
-QString RecurrenceEdit::i18n_m_Monthly() { return i18n("&Monthly"); }
-QString RecurrenceEdit::i18n_Yearly() { return i18n("Yearly"); }
-QString RecurrenceEdit::i18n_y_Yearly() { return i18n("&Yearly"); }
-
-
-RecurrenceEdit::RecurrenceEdit(bool readOnly, QWidget* parent, const char* name)
- : QFrame(parent, name),
+TQString RecurrenceEdit::i18n_Norecur() { return i18n("No recurrence"); }
+TQString RecurrenceEdit::i18n_NoRecur() { return i18n("No Recurrence"); }
+TQString RecurrenceEdit::i18n_AtLogin() { return i18n("At Login"); }
+TQString RecurrenceEdit::i18n_l_Atlogin() { return i18n("At &login"); }
+TQString RecurrenceEdit::i18n_HourlyMinutely() { return i18n("Hourly/Minutely"); }
+TQString RecurrenceEdit::i18n_u_HourlyMinutely() { return i18n("Ho&urly/Minutely"); }
+TQString RecurrenceEdit::i18n_Daily() { return i18n("Daily"); }
+TQString RecurrenceEdit::i18n_d_Daily() { return i18n("&Daily"); }
+TQString RecurrenceEdit::i18n_Weekly() { return i18n("Weekly"); }
+TQString RecurrenceEdit::i18n_w_Weekly() { return i18n("&Weekly"); }
+TQString RecurrenceEdit::i18n_Monthly() { return i18n("Monthly"); }
+TQString RecurrenceEdit::i18n_m_Monthly() { return i18n("&Monthly"); }
+TQString RecurrenceEdit::i18n_Yearly() { return i18n("Yearly"); }
+TQString RecurrenceEdit::i18n_y_Yearly() { return i18n("&Yearly"); }
+
+
+RecurrenceEdit::RecurrenceEdit(bool readOnly, TQWidget* parent, const char* name)
+ : TQFrame(parent, name),
mRule(0),
mRuleButtonType(INVALID_RECUR),
mDailyShown(false),
@@ -93,8 +93,8 @@ RecurrenceEdit::RecurrenceEdit(bool readOnly, QWidget* parent, const char* name)
mNoEmitTypeChanged(true),
mReadOnly(readOnly)
{
- QBoxLayout* layout;
- QVBoxLayout* topLayout = new QVBoxLayout(this, 0, KDialog::spacingHint());
+ TQBoxLayout* layout;
+ TQVBoxLayout* topLayout = new TQVBoxLayout(this, 0, KDialog::spacingHint());
/* Create the recurrence rule Group box which holds the recurrence period
* selection buttons, and the weekly, monthly and yearly recurrence rule
@@ -103,61 +103,61 @@ RecurrenceEdit::RecurrenceEdit(bool readOnly, QWidget* parent, const char* name)
* selection of its corresponding radio button.
*/
- QGroupBox* recurGroup = new QGroupBox(1, Qt::Vertical, i18n("Recurrence Rule"), this, "recurGroup");
+ TQGroupBox* recurGroup = new TQGroupBox(1, Qt::Vertical, i18n("Recurrence Rule"), this, "recurGroup");
topLayout->addWidget(recurGroup);
- QFrame* ruleFrame = new QFrame(recurGroup, "ruleFrame");
- layout = new QVBoxLayout(ruleFrame, 0);
+ TQFrame* ruleFrame = new TQFrame(recurGroup, "ruleFrame");
+ layout = new TQVBoxLayout(ruleFrame, 0);
layout->addSpacing(KDialog::spacingHint()/2);
- layout = new QHBoxLayout(layout, 0);
- QBoxLayout* lay = new QVBoxLayout(layout, 0);
+ layout = new TQHBoxLayout(layout, 0);
+ TQBoxLayout* lay = new TQVBoxLayout(layout, 0);
mRuleButtonGroup = new ButtonGroup(1, Qt::Horizontal, ruleFrame);
mRuleButtonGroup->setInsideMargin(0);
- mRuleButtonGroup->setFrameStyle(QFrame::NoFrame);
+ mRuleButtonGroup->setFrameStyle(TQFrame::NoFrame);
lay->addWidget(mRuleButtonGroup);
lay->addStretch(); // top-adjust the interval radio buttons
- connect(mRuleButtonGroup, SIGNAL(buttonSet(int)), SLOT(periodClicked(int)));
+ connect(mRuleButtonGroup, TQT_SIGNAL(buttonSet(int)), TQT_SLOT(periodClicked(int)));
mNoneButton = new RadioButton(i18n_Norecur(), mRuleButtonGroup);
mNoneButton->setFixedSize(mNoneButton->sizeHint());
mNoneButton->setReadOnly(mReadOnly);
- QWhatsThis::add(mNoneButton, i18n("Do not repeat the alarm"));
+ TQWhatsThis::add(mNoneButton, i18n("Do not repeat the alarm"));
mAtLoginButton = new RadioButton(i18n_l_Atlogin(), mRuleButtonGroup);
mAtLoginButton->setFixedSize(mAtLoginButton->sizeHint());
mAtLoginButton->setReadOnly(mReadOnly);
- QWhatsThis::add(mAtLoginButton,
+ TQWhatsThis::add(mAtLoginButton,
i18n("Trigger the alarm at the specified date/time and at every login until then.\n"
"Note that it will also be triggered any time the alarm daemon is restarted."));
mSubDailyButton = new RadioButton(i18n_u_HourlyMinutely(), mRuleButtonGroup);
mSubDailyButton->setFixedSize(mSubDailyButton->sizeHint());
mSubDailyButton->setReadOnly(mReadOnly);
- QWhatsThis::add(mSubDailyButton,
+ TQWhatsThis::add(mSubDailyButton,
i18n("Repeat the alarm at hourly/minutely intervals"));
mDailyButton = new RadioButton(i18n_d_Daily(), mRuleButtonGroup);
mDailyButton->setFixedSize(mDailyButton->sizeHint());
mDailyButton->setReadOnly(mReadOnly);
- QWhatsThis::add(mDailyButton,
+ TQWhatsThis::add(mDailyButton,
i18n("Repeat the alarm at daily intervals"));
mWeeklyButton = new RadioButton(i18n_w_Weekly(), mRuleButtonGroup);
mWeeklyButton->setFixedSize(mWeeklyButton->sizeHint());
mWeeklyButton->setReadOnly(mReadOnly);
- QWhatsThis::add(mWeeklyButton,
+ TQWhatsThis::add(mWeeklyButton,
i18n("Repeat the alarm at weekly intervals"));
mMonthlyButton = new RadioButton(i18n_m_Monthly(), mRuleButtonGroup);
mMonthlyButton->setFixedSize(mMonthlyButton->sizeHint());
mMonthlyButton->setReadOnly(mReadOnly);
- QWhatsThis::add(mMonthlyButton,
+ TQWhatsThis::add(mMonthlyButton,
i18n("Repeat the alarm at monthly intervals"));
mYearlyButton = new RadioButton(i18n_y_Yearly(), mRuleButtonGroup);
mYearlyButton->setFixedSize(mYearlyButton->sizeHint());
mYearlyButton->setReadOnly(mReadOnly);
- QWhatsThis::add(mYearlyButton,
+ TQWhatsThis::add(mYearlyButton,
i18n("Repeat the alarm at annual intervals"));
mNoneButtonId = mRuleButtonGroup->id(mNoneButton);
@@ -172,20 +172,20 @@ RecurrenceEdit::RecurrenceEdit(bool readOnly, QWidget* parent, const char* name)
mSubRepetition = new RepetitionButton(i18n("Sub-Repetition"), true, ruleFrame);
mSubRepetition->setFixedSize(mSubRepetition->sizeHint());
mSubRepetition->setReadOnly(mReadOnly);
- connect(mSubRepetition, SIGNAL(needsInitialisation()), SIGNAL(repeatNeedsInitialisation()));
- connect(mSubRepetition, SIGNAL(changed()), SIGNAL(frequencyChanged()));
- QWhatsThis::add(mSubRepetition, i18n("Set up a repetition within the recurrence, to trigger the alarm multiple times each time the recurrence is due."));
+ connect(mSubRepetition, TQT_SIGNAL(needsInitialisation()), TQT_SIGNAL(repeatNeedsInitialisation()));
+ connect(mSubRepetition, TQT_SIGNAL(changed()), TQT_SIGNAL(frequencyChanged()));
+ TQWhatsThis::add(mSubRepetition, i18n("Set up a repetition within the recurrence, to trigger the alarm multiple times each time the recurrence is due."));
lay->addSpacing(KDialog::spacingHint());
lay->addWidget(mSubRepetition);
- lay = new QVBoxLayout(layout);
+ lay = new TQVBoxLayout(layout);
lay->addStretch();
- layout = new QHBoxLayout(lay);
+ layout = new TQHBoxLayout(lay);
layout->addSpacing(KDialog::marginHint());
- QFrame* divider = new QFrame(ruleFrame);
- divider->setFrameStyle(QFrame::VLine | QFrame::Sunken);
+ TQFrame* divider = new TQFrame(ruleFrame);
+ divider->setFrameStyle(TQFrame::VLine | TQFrame::Sunken);
layout->addWidget(divider);
layout->addSpacing(KDialog::marginHint());
@@ -196,13 +196,13 @@ RecurrenceEdit::RecurrenceEdit(bool readOnly, QWidget* parent, const char* name)
mMonthlyRule = new MonthlyRule(mReadOnly, ruleFrame, "monthFrame");
mYearlyRule = new YearlyRule(mReadOnly, ruleFrame, "yearFrame");
- connect(mSubDailyRule, SIGNAL(frequencyChanged()), this, SIGNAL(frequencyChanged()));
- connect(mDailyRule, SIGNAL(frequencyChanged()), this, SIGNAL(frequencyChanged()));
- connect(mWeeklyRule, SIGNAL(frequencyChanged()), this, SIGNAL(frequencyChanged()));
- connect(mMonthlyRule, SIGNAL(frequencyChanged()), this, SIGNAL(frequencyChanged()));
- connect(mYearlyRule, SIGNAL(frequencyChanged()), this, SIGNAL(frequencyChanged()));
+ connect(mSubDailyRule, TQT_SIGNAL(frequencyChanged()), this, TQT_SIGNAL(frequencyChanged()));
+ connect(mDailyRule, TQT_SIGNAL(frequencyChanged()), this, TQT_SIGNAL(frequencyChanged()));
+ connect(mWeeklyRule, TQT_SIGNAL(frequencyChanged()), this, TQT_SIGNAL(frequencyChanged()));
+ connect(mMonthlyRule, TQT_SIGNAL(frequencyChanged()), this, TQT_SIGNAL(frequencyChanged()));
+ connect(mYearlyRule, TQT_SIGNAL(frequencyChanged()), this, TQT_SIGNAL(frequencyChanged()));
- mRuleStack = new QWidgetStack(ruleFrame);
+ mRuleStack = new TQWidgetStack(ruleFrame);
layout->addWidget(mRuleStack);
layout->addStretch(1);
mRuleStack->addWidget(mNoRule, 0);
@@ -217,33 +217,33 @@ RecurrenceEdit::RecurrenceEdit(bool readOnly, QWidget* parent, const char* name)
// which specify how long the recurrence is to last.
mRangeButtonGroup = new ButtonGroup(i18n("Recurrence End"), this, "mRangeButtonGroup");
- connect(mRangeButtonGroup, SIGNAL(buttonSet(int)), SLOT(rangeTypeClicked()));
+ connect(mRangeButtonGroup, TQT_SIGNAL(buttonSet(int)), TQT_SLOT(rangeTypeClicked()));
topLayout->addWidget(mRangeButtonGroup);
- QVBoxLayout* vlayout = new QVBoxLayout(mRangeButtonGroup, KDialog::marginHint(), KDialog::spacingHint());
+ TQVBoxLayout* vlayout = new TQVBoxLayout(mRangeButtonGroup, KDialog::marginHint(), KDialog::spacingHint());
vlayout->addSpacing(fontMetrics().lineSpacing()/2);
mNoEndDateButton = new RadioButton(i18n("No &end"), mRangeButtonGroup);
mNoEndDateButton->setFixedSize(mNoEndDateButton->sizeHint());
mNoEndDateButton->setReadOnly(mReadOnly);
- QWhatsThis::add(mNoEndDateButton, i18n("Repeat the alarm indefinitely"));
+ TQWhatsThis::add(mNoEndDateButton, i18n("Repeat the alarm indefinitely"));
vlayout->addWidget(mNoEndDateButton, 1, Qt::AlignAuto);
- QSize size = mNoEndDateButton->size();
+ TQSize size = mNoEndDateButton->size();
- layout = new QHBoxLayout(vlayout, KDialog::spacingHint());
+ layout = new TQHBoxLayout(vlayout, KDialog::spacingHint());
mRepeatCountButton = new RadioButton(i18n("End a&fter:"), mRangeButtonGroup);
mRepeatCountButton->setReadOnly(mReadOnly);
- QWhatsThis::add(mRepeatCountButton,
+ TQWhatsThis::add(mRepeatCountButton,
i18n("Repeat the alarm for the number of times specified"));
mRepeatCountEntry = new SpinBox(1, 9999, 1, mRangeButtonGroup);
mRepeatCountEntry->setFixedSize(mRepeatCountEntry->sizeHint());
mRepeatCountEntry->setLineShiftStep(10);
mRepeatCountEntry->setSelectOnStep(false);
mRepeatCountEntry->setReadOnly(mReadOnly);
- connect(mRepeatCountEntry, SIGNAL(valueChanged(int)), SLOT(repeatCountChanged(int)));
- QWhatsThis::add(mRepeatCountEntry,
+ connect(mRepeatCountEntry, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(repeatCountChanged(int)));
+ TQWhatsThis::add(mRepeatCountEntry,
i18n("Enter the total number of times to trigger the alarm"));
mRepeatCountButton->setFocusWidget(mRepeatCountEntry);
- mRepeatCountLabel = new QLabel(i18n("occurrence(s)"), mRangeButtonGroup);
+ mRepeatCountLabel = new TQLabel(i18n("occurrence(s)"), mRangeButtonGroup);
mRepeatCountLabel->setFixedSize(mRepeatCountLabel->sizeHint());
layout->addWidget(mRepeatCountButton);
layout->addSpacing(KDialog::spacingHint());
@@ -252,28 +252,28 @@ RecurrenceEdit::RecurrenceEdit(bool readOnly, QWidget* parent, const char* name)
layout->addStretch();
size = size.expandedTo(mRepeatCountButton->sizeHint());
- layout = new QHBoxLayout(vlayout, KDialog::spacingHint());
+ layout = new TQHBoxLayout(vlayout, KDialog::spacingHint());
mEndDateButton = new RadioButton(i18n("End &by:"), mRangeButtonGroup);
mEndDateButton->setReadOnly(mReadOnly);
- QWhatsThis::add(mEndDateButton,
+ TQWhatsThis::add(mEndDateButton,
i18n("Repeat the alarm until the date/time specified.\n\n"
"Note: This applies to the main recurrence only. It does not limit any sub-repetition which will occur regardless after the last main recurrence."));
mEndDateEdit = new DateEdit(mRangeButtonGroup);
mEndDateEdit->setFixedSize(mEndDateEdit->sizeHint());
mEndDateEdit->setReadOnly(mReadOnly);
- QWhatsThis::add(mEndDateEdit,
+ TQWhatsThis::add(mEndDateEdit,
i18n("Enter the last date to repeat the alarm"));
mEndDateButton->setFocusWidget(mEndDateEdit);
mEndTimeEdit = new TimeEdit(mRangeButtonGroup);
mEndTimeEdit->setFixedSize(mEndTimeEdit->sizeHint());
mEndTimeEdit->setReadOnly(mReadOnly);
- static const QString lastTimeText = i18n("Enter the last time to repeat the alarm.");
- QWhatsThis::add(mEndTimeEdit, QString("%1\n\n%2").arg(lastTimeText).arg(TimeSpinBox::shiftWhatsThis()));
+ static const TQString lastTimeText = i18n("Enter the last time to repeat the alarm.");
+ TQWhatsThis::add(mEndTimeEdit, TQString("%1\n\n%2").arg(lastTimeText).arg(TimeSpinBox::shiftWhatsThis()));
mEndAnyTimeCheckBox = new CheckBox(i18n("Any time"), mRangeButtonGroup);
mEndAnyTimeCheckBox->setFixedSize(mEndAnyTimeCheckBox->sizeHint());
mEndAnyTimeCheckBox->setReadOnly(mReadOnly);
- connect(mEndAnyTimeCheckBox, SIGNAL(toggled(bool)), SLOT(slotAnyTimeToggled(bool)));
- QWhatsThis::add(mEndAnyTimeCheckBox,
+ connect(mEndAnyTimeCheckBox, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotAnyTimeToggled(bool)));
+ TQWhatsThis::add(mEndAnyTimeCheckBox,
i18n("Stop repeating the alarm after your first login on or after the specified end date"));
layout->addWidget(mEndDateButton);
layout->addSpacing(KDialog::spacingHint());
@@ -290,18 +290,18 @@ RecurrenceEdit::RecurrenceEdit(bool readOnly, QWidget* parent, const char* name)
// Create the exceptions group which specifies dates to be excluded
// from the recurrence.
- mExceptionGroup = new QGroupBox(i18n("E&xceptions"), this, "mExceptionGroup");
+ mExceptionGroup = new TQGroupBox(i18n("E&xceptions"), this, "mExceptionGroup");
topLayout->addWidget(mExceptionGroup);
topLayout->setStretchFactor(mExceptionGroup, 2);
- vlayout = new QVBoxLayout(mExceptionGroup, KDialog::marginHint(), KDialog::spacingHint());
+ vlayout = new TQVBoxLayout(mExceptionGroup, KDialog::marginHint(), KDialog::spacingHint());
vlayout->addSpacing(fontMetrics().lineSpacing()/2);
- layout = new QHBoxLayout(vlayout, KDialog::spacingHint());
- vlayout = new QVBoxLayout(layout);
+ layout = new TQHBoxLayout(vlayout, KDialog::spacingHint());
+ vlayout = new TQVBoxLayout(layout);
- mExceptionDateList = new QListBox(mExceptionGroup);
- mExceptionDateList->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding));
- connect(mExceptionDateList, SIGNAL(selectionChanged()), SLOT(enableExceptionButtons()));
- QWhatsThis::add(mExceptionDateList,
+ mExceptionDateList = new TQListBox(mExceptionGroup);
+ mExceptionDateList->setSizePolicy(TQSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding));
+ connect(mExceptionDateList, TQT_SIGNAL(selectionChanged()), TQT_SLOT(enableExceptionButtons()));
+ TQWhatsThis::add(mExceptionDateList,
i18n("The list of exceptions, i.e. dates/times excluded from the recurrence"));
vlayout->addWidget(mExceptionDateList);
@@ -313,34 +313,34 @@ RecurrenceEdit::RecurrenceEdit(bool readOnly, QWidget* parent, const char* name)
}
else
{
- vlayout = new QVBoxLayout(layout);
+ vlayout = new TQVBoxLayout(layout);
mExceptionDateEdit = new DateEdit(mExceptionGroup);
mExceptionDateEdit->setFixedSize(mExceptionDateEdit->sizeHint());
- mExceptionDateEdit->setDate(QDate::currentDate());
- QWhatsThis::add(mExceptionDateEdit,
+ mExceptionDateEdit->setDate(TQDate::currentDate());
+ TQWhatsThis::add(mExceptionDateEdit,
i18n("Enter a date to insert in the exceptions list. "
"Use in conjunction with the Add or Change button below."));
vlayout->addWidget(mExceptionDateEdit);
- layout = new QHBoxLayout(vlayout, KDialog::spacingHint());
- QPushButton* button = new QPushButton(i18n("Add"), mExceptionGroup);
+ layout = new TQHBoxLayout(vlayout, KDialog::spacingHint());
+ TQPushButton* button = new TQPushButton(i18n("Add"), mExceptionGroup);
button->setFixedSize(button->sizeHint());
- connect(button, SIGNAL(clicked()), SLOT(addException()));
- QWhatsThis::add(button,
+ connect(button, TQT_SIGNAL(clicked()), TQT_SLOT(addException()));
+ TQWhatsThis::add(button,
i18n("Add the date entered above to the exceptions list"));
layout->addWidget(button);
- mChangeExceptionButton = new QPushButton(i18n("Change"), mExceptionGroup);
+ mChangeExceptionButton = new TQPushButton(i18n("Change"), mExceptionGroup);
mChangeExceptionButton->setFixedSize(mChangeExceptionButton->sizeHint());
- connect(mChangeExceptionButton, SIGNAL(clicked()), SLOT(changeException()));
- QWhatsThis::add(mChangeExceptionButton,
+ connect(mChangeExceptionButton, TQT_SIGNAL(clicked()), TQT_SLOT(changeException()));
+ TQWhatsThis::add(mChangeExceptionButton,
i18n("Replace the currently highlighted item in the exceptions list with the date entered above"));
layout->addWidget(mChangeExceptionButton);
- mDeleteExceptionButton = new QPushButton(i18n("Delete"), mExceptionGroup);
+ mDeleteExceptionButton = new TQPushButton(i18n("Delete"), mExceptionGroup);
mDeleteExceptionButton->setFixedSize(mDeleteExceptionButton->sizeHint());
- connect(mDeleteExceptionButton, SIGNAL(clicked()), SLOT(deleteException()));
- QWhatsThis::add(mDeleteExceptionButton,
+ connect(mDeleteExceptionButton, TQT_SIGNAL(clicked()), TQT_SLOT(deleteException()));
+ TQWhatsThis::add(mDeleteExceptionButton,
i18n("Remove the currently highlighted item from the exceptions list"));
layout->addWidget(mDeleteExceptionButton);
}
@@ -352,19 +352,19 @@ RecurrenceEdit::RecurrenceEdit(bool readOnly, QWidget* parent, const char* name)
* Verify the consistency of the entered data.
* Reply = widget to receive focus on error, or 0 if no error.
*/
-QWidget* RecurrenceEdit::checkData(const QDateTime& startDateTime, QString& errorMessage) const
+TQWidget* RecurrenceEdit::checkData(const TQDateTime& startDateTime, TQString& errorMessage) const
{
if (mAtLoginButton->isOn())
return 0;
const_cast<RecurrenceEdit*>(this)->mCurrStartDateTime = startDateTime;
if (mEndDateButton->isChecked())
{
- QWidget* errWidget = 0;
+ TQWidget* errWidget = 0;
bool noTime = !mEndTimeEdit->isEnabled();
- QDate endDate = mEndDateEdit->date();
+ TQDate endDate = mEndDateEdit->date();
if (endDate < startDateTime.date())
errWidget = mEndDateEdit;
- else if (!noTime && QDateTime(endDate, mEndTimeEdit->time()) < startDateTime)
+ else if (!noTime && TQDateTime(endDate, mEndTimeEdit->time()) < startDateTime)
errWidget = mEndTimeEdit;
if (errWidget)
{
@@ -452,7 +452,7 @@ void RecurrenceEdit::periodClicked(int id)
void RecurrenceEdit::slotAnyTimeToggled(bool on)
{
- QButton* button = mRuleButtonGroup->selected();
+ TQButton* button = mRuleButtonGroup->selected();
mEndTimeEdit->setEnabled(button == mAtLoginButton && !on
|| button == mSubDailyButton && mEndDateButton->isChecked());
}
@@ -472,7 +472,7 @@ void RecurrenceEdit::rangeTypeClicked()
mRepeatCountLabel->setEnabled(repeatCount);
}
-void RecurrenceEdit::showEvent(QShowEvent*)
+void RecurrenceEdit::showEvent(TQShowEvent*)
{
if (mRule)
mRule->setFrequencyFocus();
@@ -548,8 +548,8 @@ void RecurrenceEdit::addException()
{
if (!mExceptionDateEdit || !mExceptionDateEdit->isValid())
return;
- QDate date = mExceptionDateEdit->date();
- QValueList<QDate>::Iterator it;
+ TQDate date = mExceptionDateEdit->date();
+ TQValueList<TQDate>::Iterator it;
int index = 0;
bool insert = true;
for (it = mExceptionDates.begin(); it != mExceptionDates.end(); ++index, ++it)
@@ -580,8 +580,8 @@ void RecurrenceEdit::changeException()
int index = mExceptionDateList->currentItem();
if (index >= 0 && mExceptionDateList->isSelected(index))
{
- QDate olddate = mExceptionDates[index];
- QDate newdate = mExceptionDateEdit->date();
+ TQDate olddate = mExceptionDates[index];
+ TQDate newdate = mExceptionDateEdit->date();
if (newdate != olddate)
{
mExceptionDates.remove(mExceptionDates.at(index));
@@ -619,13 +619,13 @@ void RecurrenceEdit::enableExceptionButtons()
mChangeExceptionButton->setEnabled(enable);
// Prevent the exceptions list box receiving keyboard focus is it's empty
- mExceptionDateList->setFocusPolicy(mExceptionDateList->count() ? QWidget::WheelFocus : QWidget::NoFocus);
+ mExceptionDateList->setFocusPolicy(mExceptionDateList->count() ? TQWidget::WheelFocus : TQWidget::NoFocus);
}
/******************************************************************************
* Notify this instance of a change in the alarm start date.
*/
-void RecurrenceEdit::setStartDate(const QDate& start, const QDate& today)
+void RecurrenceEdit::setStartDate(const TQDate& start, const TQDate& today)
{
if (!mReadOnly)
{
@@ -638,7 +638,7 @@ void RecurrenceEdit::setStartDate(const QDate& start, const QDate& today)
}
else
{
- const QString startString = i18n("Date cannot be earlier than start date", "start date");
+ const TQString startString = i18n("Date cannot be earlier than start date", "start date");
mEndDateEdit->setMinDate(start, startString);
if (mExceptionDateEdit)
mExceptionDateEdit->setMinDate(start, startString);
@@ -649,7 +649,7 @@ void RecurrenceEdit::setStartDate(const QDate& start, const QDate& today)
/******************************************************************************
* Specify the default recurrence end date.
*/
-void RecurrenceEdit::setDefaultEndDate(const QDate& end)
+void RecurrenceEdit::setDefaultEndDate(const TQDate& end)
{
if (!mEndDateButton->isOn())
mEndDateEdit->setDate(end);
@@ -673,10 +673,10 @@ DateTime RecurrenceEdit::endDateTime() const
/******************************************************************************
* Set all controls to their default values.
*/
-void RecurrenceEdit::setDefaults(const QDateTime& from)
+void RecurrenceEdit::setDefaults(const TQDateTime& from)
{
mCurrStartDateTime = from;
- QDate fromDate = from.date();
+ TQDate fromDate = from.date();
mNoEndDateButton->setChecked(true);
mSubDailyRule->setFrequency(1);
@@ -716,7 +716,7 @@ void RecurrenceEdit::setDefaults(const QDateTime& from)
* Set the controls for weekly, monthly and yearly rules which have not so far
* been shown, to their default values, depending on the recurrence start date.
*/
-void RecurrenceEdit::setRuleDefaults(const QDate& fromDate)
+void RecurrenceEdit::setRuleDefaults(const TQDate& fromDate)
{
int day = fromDate.day();
int dayOfWeek = fromDate.dayOfWeek();
@@ -759,7 +759,7 @@ void RecurrenceEdit::set(const KAEvent& event, bool keepDuration)
case KARecurrence::DAILY:
{
mRuleButtonGroup->setButton(mDailyButtonId);
- QBitArray rDays = recurrence->days();
+ TQBitArray rDays = recurrence->days();
bool set = false;
for (int i = 0; i < 7 && !set; ++i)
set = rDays.testBit(i);
@@ -772,13 +772,13 @@ void RecurrenceEdit::set(const KAEvent& event, bool keepDuration)
case KARecurrence::WEEKLY:
{
mRuleButtonGroup->setButton(mWeeklyButtonId);
- QBitArray rDays = recurrence->days();
+ TQBitArray rDays = recurrence->days();
mWeeklyRule->setDays(rDays);
break;
}
case KARecurrence::MONTHLY_POS: // on nth (Tuesday) of the month
{
- QValueList<RecurrenceRule::WDayPos> posns = recurrence->monthPositions();
+ TQValueList<RecurrenceRule::WDayPos> posns = recurrence->monthPositions();
int i = posns.first().pos();
if (!i)
{
@@ -786,8 +786,8 @@ void RecurrenceEdit::set(const KAEvent& event, bool keepDuration)
// (but ignoring any non-every xxxDay positions).
mRuleButtonGroup->setButton(mWeeklyButtonId);
mWeeklyRule->setFrequency(recurrence->frequency());
- QBitArray rDays(7);
- for (QValueList<RecurrenceRule::WDayPos>::ConstIterator it = posns.begin(); it != posns.end(); ++it)
+ TQBitArray rDays(7);
+ for (TQValueList<RecurrenceRule::WDayPos>::ConstIterator it = posns.begin(); it != posns.end(); ++it)
{
if (!(*it).pos())
rDays.setBit((*it).day() - 1, 1);
@@ -802,7 +802,7 @@ void RecurrenceEdit::set(const KAEvent& event, bool keepDuration)
case KARecurrence::MONTHLY_DAY: // on nth day of the month
{
mRuleButtonGroup->setButton(mMonthlyButtonId);
- QValueList<int> rmd = recurrence->monthDays();
+ TQValueList<int> rmd = recurrence->monthDays();
int day = (rmd.isEmpty()) ? event.mainDate().day() : rmd.first();
mMonthlyRule->setDate(day);
break;
@@ -813,7 +813,7 @@ void RecurrenceEdit::set(const KAEvent& event, bool keepDuration)
if (rtype == KARecurrence::ANNUAL_DATE)
{
mRuleButtonGroup->setButton(mYearlyButtonId);
- const QValueList<int> rmd = recurrence->monthDays();
+ const TQValueList<int> rmd = recurrence->monthDays();
int day = (rmd.isEmpty()) ? event.mainDate().day() : rmd.first();
mYearlyRule->setDate(day);
mYearlyRule->setFeb29Type(recurrence->feb29Type());
@@ -821,7 +821,7 @@ void RecurrenceEdit::set(const KAEvent& event, bool keepDuration)
else if (rtype == KARecurrence::ANNUAL_POS)
{
mRuleButtonGroup->setButton(mYearlyButtonId);
- QValueList<RecurrenceRule::WDayPos> posns = recurrence->yearPositions();
+ TQValueList<RecurrenceRule::WDayPos> posns = recurrence->yearPositions();
mYearlyRule->setPosition(posns.first().pos(), posns.first().day());
}
mYearlyRule->setMonths(recurrence->yearMonths());
@@ -834,7 +834,7 @@ void RecurrenceEdit::set(const KAEvent& event, bool keepDuration)
mRule->setFrequency(recurrence->frequency());
// Get range information
- QDateTime endtime = mCurrStartDateTime;
+ TQDateTime endtime = mCurrStartDateTime;
int duration = recurrence->duration();
if (duration == -1)
mNoEndDateButton->setChecked(true);
@@ -875,8 +875,8 @@ void RecurrenceEdit::set(const KAEvent& event, bool keepDuration)
void RecurrenceEdit::updateEvent(KAEvent& event, bool adjustStart)
{
// Get end date and repeat count, common to all types of recurring events
- QDate endDate;
- QTime endTime;
+ TQDate endDate;
+ TQTime endTime;
int repeatCount;
if (mNoEndDateButton->isChecked())
repeatCount = -1;
@@ -890,12 +890,12 @@ void RecurrenceEdit::updateEvent(KAEvent& event, bool adjustStart)
}
// Set up the recurrence according to the type selected
- QButton* button = mRuleButtonGroup->selected();
+ TQButton* button = mRuleButtonGroup->selected();
event.setRepeatAtLogin(button == mAtLoginButton);
int frequency = mRule ? mRule->frequency() : 0;
if (button == mSubDailyButton)
{
- QDateTime endDateTime(endDate, endTime);
+ TQDateTime endDateTime(endDate, endTime);
event.setRecurMinutely(frequency, repeatCount, endDateTime);
}
else if (button == mDailyButton)
@@ -915,7 +915,7 @@ void RecurrenceEdit::updateEvent(KAEvent& event, bool adjustStart)
pos.days.fill(false);
pos.days.setBit(mMonthlyRule->dayOfWeek() - 1);
pos.weeknum = mMonthlyRule->week();
- QValueList<KAEvent::MonthPos> poses;
+ TQValueList<KAEvent::MonthPos> poses;
poses.append(pos);
event.setRecurMonthlyByPos(frequency, poses, repeatCount, endDate);
}
@@ -923,14 +923,14 @@ void RecurrenceEdit::updateEvent(KAEvent& event, bool adjustStart)
{
// It's by day
int daynum = mMonthlyRule->date();
- QValueList<int> daynums;
+ TQValueList<int> daynums;
daynums.append(daynum);
event.setRecurMonthlyByDate(frequency, daynums, repeatCount, endDate);
}
}
else if (button == mYearlyButton)
{
- QValueList<int> months = mYearlyRule->months();
+ TQValueList<int> months = mYearlyRule->months();
if (mYearlyRule->type() == YearlyRule::POS)
{
// It's by position
@@ -938,7 +938,7 @@ void RecurrenceEdit::updateEvent(KAEvent& event, bool adjustStart)
pos.days.fill(false);
pos.days.setBit(mYearlyRule->dayOfWeek() - 1);
pos.weeknum = mYearlyRule->week();
- QValueList<KAEvent::MonthPos> poses;
+ TQValueList<KAEvent::MonthPos> poses;
poses.append(pos);
event.setRecurAnnualByPos(frequency, poses, months, repeatCount, endDate);
}
@@ -984,7 +984,7 @@ void RecurrenceEdit::saveState()
if (mSavedRangeButton == mRepeatCountButton)
mSavedRecurCount = mRepeatCountEntry->value();
else if (mSavedRangeButton == mEndDateButton)
- mSavedEndDateTime.set(QDateTime(mEndDateEdit->date(), mEndTimeEdit->time()), mEndAnyTimeCheckBox->isChecked());
+ mSavedEndDateTime.set(TQDateTime(mEndDateEdit->date(), mEndTimeEdit->time()), mEndAnyTimeCheckBox->isChecked());
mSavedExceptionDates = mExceptionDates;
mSavedRepeatInterval = mSubRepetition->interval();
mSavedRepeatCount = mSubRepetition->count();
@@ -1003,7 +1003,7 @@ bool RecurrenceEdit::stateChanged() const
&& mSavedRecurCount != mRepeatCountEntry->value())
return true;
if (mSavedRangeButton == mEndDateButton
- && mSavedEndDateTime != DateTime(QDateTime(mEndDateEdit->date(), mEndTimeEdit->time()), mEndAnyTimeCheckBox->isChecked()))
+ && mSavedEndDateTime != DateTime(TQDateTime(mEndDateEdit->date(), mEndTimeEdit->time()), mEndAnyTimeCheckBox->isChecked()))
return true;
if (mSavedExceptionDates != mExceptionDates
|| mSavedRepeatInterval != mSubRepetition->interval()
@@ -1019,16 +1019,16 @@ bool RecurrenceEdit::stateChanged() const
= Base class for rule widgets, including recurrence frequency.
=============================================================================*/
-Rule::Rule(const QString& freqText, const QString& freqWhatsThis, bool time, bool readOnly, QWidget* parent, const char* name)
+Rule::Rule(const TQString& freqText, const TQString& freqWhatsThis, bool time, bool readOnly, TQWidget* parent, const char* name)
: NoRule(parent, name)
{
- mLayout = new QVBoxLayout(this, 0, KDialog::spacingHint());
- QHBox* freqBox = new QHBox(this);
+ mLayout = new TQVBoxLayout(this, 0, KDialog::spacingHint());
+ TQHBox* freqBox = new TQHBox(this);
mLayout->addWidget(freqBox);
- QHBox* box = new QHBox(freqBox); // this is to control the QWhatsThis text display area
+ TQHBox* box = new TQHBox(freqBox); // this is to control the TQWhatsThis text display area
box->setSpacing(KDialog::spacingHint());
- QLabel* label = new QLabel(i18n("Recur e&very"), box);
+ TQLabel* label = new TQLabel(i18n("Recur e&very"), box);
label->setFixedSize(label->sizeHint());
if (time)
{
@@ -1044,14 +1044,14 @@ Rule::Rule(const QString& freqText, const QString& freqWhatsThis, bool time, boo
mIntSpinBox->setFixedSize(mIntSpinBox->sizeHint());
mIntSpinBox->setReadOnly(readOnly);
}
- connect(mSpinBox, SIGNAL(valueChanged(int)), SIGNAL(frequencyChanged()));
+ connect(mSpinBox, TQT_SIGNAL(valueChanged(int)), TQT_SIGNAL(frequencyChanged()));
label->setBuddy(mSpinBox);
- label = new QLabel(freqText, box);
+ label = new TQLabel(freqText, box);
label->setFixedSize(label->sizeHint());
box->setFixedSize(sizeHint());
- QWhatsThis::add(box, freqWhatsThis);
+ TQWhatsThis::add(box, freqWhatsThis);
- new QWidget(freqBox); // left adjust the visible widgets
+ new TQWidget(freqBox); // left adjust the visible widgets
freqBox->setFixedHeight(freqBox->sizeHint().height());
freqBox->setFocusProxy(mSpinBox);
}
@@ -1095,7 +1095,7 @@ bool Rule::stateChanged() const
= Sub-daily rule widget.
=============================================================================*/
-SubDailyRule::SubDailyRule(bool readOnly, QWidget* parent, const char* name)
+SubDailyRule::SubDailyRule(bool readOnly, TQWidget* parent, const char* name)
: Rule(i18n("hours:minutes"),
i18n("Enter the number of hours and minutes between repetitions of the alarm"),
true, readOnly, parent, name)
@@ -1107,23 +1107,23 @@ SubDailyRule::SubDailyRule(bool readOnly, QWidget* parent, const char* name)
= Daily/weekly rule widget base class.
=============================================================================*/
-DayWeekRule::DayWeekRule(const QString& freqText, const QString& freqWhatsThis, const QString& daysWhatsThis,
- bool readOnly, QWidget* parent, const char* name)
+DayWeekRule::DayWeekRule(const TQString& freqText, const TQString& freqWhatsThis, const TQString& daysWhatsThis,
+ bool readOnly, TQWidget* parent, const char* name)
: Rule(freqText, freqWhatsThis, false, readOnly, parent, name),
mSavedDays(7)
{
- QGridLayout* grid = new QGridLayout(layout(), 1, 4, KDialog::spacingHint());
+ TQGridLayout* grid = new TQGridLayout(layout(), 1, 4, KDialog::spacingHint());
grid->setRowStretch(0, 1);
- QLabel* label = new QLabel(i18n("On: Tuesday", "O&n:"), this);
+ TQLabel* label = new TQLabel(i18n("On: Tuesday", "O&n:"), this);
label->setFixedSize(label->sizeHint());
grid->addWidget(label, 0, 0, Qt::AlignRight | Qt::AlignTop);
grid->addColSpacing(1, KDialog::spacingHint());
// List the days of the week starting at the user's start day of the week.
// Save the first day of the week, just in case it changes while the dialog is open.
- QWidget* box = new QWidget(this); // this is to control the QWhatsThis text display area
- QGridLayout* dgrid = new QGridLayout(box, 4, 2, 0, KDialog::spacingHint());
+ TQWidget* box = new TQWidget(this); // this is to control the TQWhatsThis text display area
+ TQGridLayout* dgrid = new TQGridLayout(box, 4, 2, 0, KDialog::spacingHint());
const KCalendarSystem* calendar = KGlobal::locale()->calendar();
for (int i = 0; i < 7; ++i)
{
@@ -1134,7 +1134,7 @@ DayWeekRule::DayWeekRule(const QString& freqText, const QString& freqWhatsThis,
dgrid->addWidget(mDayBox[i], i%4, i/4, Qt::AlignAuto);
}
box->setFixedSize(box->sizeHint());
- QWhatsThis::add(box, daysWhatsThis);
+ TQWhatsThis::add(box, daysWhatsThis);
grid->addWidget(box, 0, 2, Qt::AlignAuto);
label->setBuddy(mDayBox[0]);
grid->setColStretch(3, 1);
@@ -1143,9 +1143,9 @@ DayWeekRule::DayWeekRule(const QString& freqText, const QString& freqWhatsThis,
/******************************************************************************
* Fetch which days of the week have been ticked.
*/
-QBitArray DayWeekRule::days() const
+TQBitArray DayWeekRule::days() const
{
- QBitArray ds(7);
+ TQBitArray ds(7);
ds.fill(false);
for (int i = 0; i < 7; ++i)
if (mDayBox[i]->isChecked())
@@ -1165,7 +1165,7 @@ void DayWeekRule::setDays(bool tick)
/******************************************************************************
* Tick/untick each day of the week according to the specified bits.
*/
-void DayWeekRule::setDays(const QBitArray& days)
+void DayWeekRule::setDays(const TQBitArray& days)
{
for (int i = 0; i < 7; ++i)
{
@@ -1188,7 +1188,7 @@ void DayWeekRule::setDay(int dayOfWeek)
/******************************************************************************
* Validate: check that at least one day is selected.
*/
-QWidget* DayWeekRule::validate(QString& errorMessage)
+TQWidget* DayWeekRule::validate(TQString& errorMessage)
{
for (int i = 0; i < 7; ++i)
if (mDayBox[i]->isChecked())
@@ -1221,7 +1221,7 @@ bool DayWeekRule::stateChanged() const
= Daily rule widget.
=============================================================================*/
-DailyRule::DailyRule(bool readOnly, QWidget* parent, const char* name)
+DailyRule::DailyRule(bool readOnly, TQWidget* parent, const char* name)
: DayWeekRule(i18n("day(s)"),
i18n("Enter the number of days between repetitions of the alarm"),
i18n("Select the days of the week on which the alarm is allowed to occur"),
@@ -1234,7 +1234,7 @@ DailyRule::DailyRule(bool readOnly, QWidget* parent, const char* name)
= Weekly rule widget.
=============================================================================*/
-WeeklyRule::WeeklyRule(bool readOnly, QWidget* parent, const char* name)
+WeeklyRule::WeeklyRule(bool readOnly, TQWidget* parent, const char* name)
: DayWeekRule(i18n("week(s)"),
i18n("Enter the number of weeks between repetitions of the alarm"),
i18n("Select the days of the week on which to repeat the alarm"),
@@ -1247,8 +1247,8 @@ WeeklyRule::WeeklyRule(bool readOnly, QWidget* parent, const char* name)
= Monthly/yearly rule widget base class.
=============================================================================*/
-MonthYearRule::MonthYearRule(const QString& freqText, const QString& freqWhatsThis, bool allowEveryWeek,
- bool readOnly, QWidget* parent, const char* name)
+MonthYearRule::MonthYearRule(const TQString& freqText, const TQString& freqWhatsThis, bool allowEveryWeek,
+ bool readOnly, TQWidget* parent, const char* name)
: Rule(freqText, freqWhatsThis, false, readOnly, parent, name),
mEveryWeek(allowEveryWeek)
{
@@ -1256,7 +1256,7 @@ MonthYearRule::MonthYearRule(const QString& freqText, const QString& freqWhatsTh
mButtonGroup->hide();
// Month day selector
- QHBox* box = new QHBox(this);
+ TQHBox* box = new TQHBox(this);
box->setSpacing(KDialog::spacingHint());
layout()->addWidget(box);
@@ -1264,24 +1264,24 @@ MonthYearRule::MonthYearRule(const QString& freqText, const QString& freqWhatsTh
mDayButton->setFixedSize(mDayButton->sizeHint());
mDayButton->setReadOnly(readOnly);
mDayButtonId = mButtonGroup->insert(mDayButton);
- QWhatsThis::add(mDayButton, i18n("Repeat the alarm on the selected day of the month"));
+ TQWhatsThis::add(mDayButton, i18n("Repeat the alarm on the selected day of the month"));
mDayCombo = new ComboBox(false, box);
mDayCombo->setSizeLimit(11);
for (int i = 0; i < 31; ++i)
- mDayCombo->insertItem(QString::number(i + 1));
+ mDayCombo->insertItem(TQString::number(i + 1));
mDayCombo->insertItem(i18n("Last day of month", "Last"));
mDayCombo->setFixedSize(mDayCombo->sizeHint());
mDayCombo->setReadOnly(readOnly);
- QWhatsThis::add(mDayCombo, i18n("Select the day of the month on which to repeat the alarm"));
+ TQWhatsThis::add(mDayCombo, i18n("Select the day of the month on which to repeat the alarm"));
mDayButton->setFocusWidget(mDayCombo);
- connect(mDayCombo, SIGNAL(activated(int)), SLOT(slotDaySelected(int)));
+ connect(mDayCombo, TQT_SIGNAL(activated(int)), TQT_SLOT(slotDaySelected(int)));
- box->setStretchFactor(new QWidget(box), 1); // left adjust the controls
+ box->setStretchFactor(new TQWidget(box), 1); // left adjust the controls
box->setFixedHeight(box->sizeHint().height());
// Month position selector
- box = new QHBox(this);
+ box = new TQHBox(this);
box->setSpacing(KDialog::spacingHint());
layout()->addWidget(box);
@@ -1289,7 +1289,7 @@ MonthYearRule::MonthYearRule(const QString& freqText, const QString& freqWhatsTh
mPosButton->setFixedSize(mPosButton->sizeHint());
mPosButton->setReadOnly(readOnly);
mPosButtonId = mButtonGroup->insert(mPosButton);
- QWhatsThis::add(mPosButton,
+ TQWhatsThis::add(mPosButton,
i18n("Repeat the alarm on one day of the week, in the selected week of the month"));
mWeekCombo = new ComboBox(false, box);
@@ -1308,7 +1308,7 @@ MonthYearRule::MonthYearRule(const QString& freqText, const QString& freqWhatsTh
mWeekCombo->insertItem(i18n("Every (Monday...) in month", "Every"));
mWeekCombo->setSizeLimit(11);
}
- QWhatsThis::add(mWeekCombo, i18n("Select the week of the month in which to repeat the alarm"));
+ TQWhatsThis::add(mWeekCombo, i18n("Select the week of the month in which to repeat the alarm"));
mWeekCombo->setFixedSize(mWeekCombo->sizeHint());
mWeekCombo->setReadOnly(readOnly);
mPosButton->setFocusWidget(mWeekCombo);
@@ -1321,11 +1321,11 @@ MonthYearRule::MonthYearRule(const QString& freqText, const QString& freqWhatsTh
mDayOfWeekCombo->insertItem(calendar->weekDayName(day));
}
mDayOfWeekCombo->setReadOnly(readOnly);
- QWhatsThis::add(mDayOfWeekCombo, i18n("Select the day of the week on which to repeat the alarm"));
+ TQWhatsThis::add(mDayOfWeekCombo, i18n("Select the day of the week on which to repeat the alarm"));
- box->setStretchFactor(new QWidget(box), 1); // left adjust the controls
+ box->setStretchFactor(new TQWidget(box), 1); // left adjust the controls
box->setFixedHeight(box->sizeHint().height());
- connect(mButtonGroup, SIGNAL(buttonSet(int)), SLOT(clicked(int)));
+ connect(mButtonGroup, TQT_SIGNAL(buttonSet(int)), TQT_SLOT(clicked(int)));
}
MonthYearRule::DayPosType MonthYearRule::type() const
@@ -1438,7 +1438,7 @@ bool MonthYearRule::stateChanged() const
= Monthly rule widget.
=============================================================================*/
-MonthlyRule::MonthlyRule(bool readOnly, QWidget* parent, const char* name)
+MonthlyRule::MonthlyRule(bool readOnly, TQWidget* parent, const char* name)
: MonthYearRule(i18n("month(s)"),
i18n("Enter the number of months between repetitions of the alarm"),
false, readOnly, parent, name)
@@ -1450,23 +1450,23 @@ MonthlyRule::MonthlyRule(bool readOnly, QWidget* parent, const char* name)
= Yearly rule widget.
=============================================================================*/
-YearlyRule::YearlyRule(bool readOnly, QWidget* parent, const char* name)
+YearlyRule::YearlyRule(bool readOnly, TQWidget* parent, const char* name)
: MonthYearRule(i18n("year(s)"),
i18n("Enter the number of years between repetitions of the alarm"),
true, readOnly, parent, name)
{
// Set up the month selection widgets
- QBoxLayout* hlayout = new QHBoxLayout(layout(), KDialog::spacingHint());
- QLabel* label = new QLabel(i18n("List of months to select", "Months:"), this);
+ TQBoxLayout* hlayout = new TQHBoxLayout(layout(), KDialog::spacingHint());
+ TQLabel* label = new TQLabel(i18n("List of months to select", "Months:"), this);
label->setFixedSize(label->sizeHint());
hlayout->addWidget(label, 0, Qt::AlignAuto | Qt::AlignTop);
// List the months of the year.
- QWidget* w = new QWidget(this); // this is to control the QWhatsThis text display area
+ TQWidget* w = new TQWidget(this); // this is to control the TQWhatsThis text display area
hlayout->addWidget(w, 1, Qt::AlignAuto);
- QGridLayout* grid = new QGridLayout(w, 4, 3, 0, KDialog::spacingHint());
+ TQGridLayout* grid = new TQGridLayout(w, 4, 3, 0, KDialog::spacingHint());
const KCalendarSystem* calendar = KGlobal::locale()->calendar();
- int year = QDate::currentDate().year();
+ int year = TQDate::currentDate().year();
for (int i = 0; i < 12; ++i)
{
mMonthBox[i] = new CheckBox(calendar->monthName(i + 1, year, true), w);
@@ -1474,16 +1474,16 @@ YearlyRule::YearlyRule(bool readOnly, QWidget* parent, const char* name)
mMonthBox[i]->setReadOnly(readOnly);
grid->addWidget(mMonthBox[i], i%3, i/3, Qt::AlignAuto);
}
- connect(mMonthBox[1], SIGNAL(toggled(bool)), SLOT(enableFeb29()));
+ connect(mMonthBox[1], TQT_SIGNAL(toggled(bool)), TQT_SLOT(enableFeb29()));
w->setFixedHeight(w->sizeHint().height());
- QWhatsThis::add(w, i18n("Select the months of the year in which to repeat the alarm"));
+ TQWhatsThis::add(w, i18n("Select the months of the year in which to repeat the alarm"));
// February 29th handling option
- QHBox* f29box = new QHBox(this);
+ TQHBox* f29box = new TQHBox(this);
layout()->addWidget(f29box);
- QHBox* box = new QHBox(f29box); // this is to control the QWhatsThis text display area
+ TQHBox* box = new TQHBox(f29box); // this is to control the TQWhatsThis text display area
box->setSpacing(KDialog::spacingHint());
- mFeb29Label = new QLabel(i18n("February 2&9th alarm in non-leap years:"), box);
+ mFeb29Label = new TQLabel(i18n("February 2&9th alarm in non-leap years:"), box);
mFeb29Label->setFixedSize(mFeb29Label->sizeHint());
mFeb29Combo = new ComboBox(false, box);
mFeb29Combo->insertItem(i18n("No date", "None"));
@@ -1493,9 +1493,9 @@ YearlyRule::YearlyRule(bool readOnly, QWidget* parent, const char* name)
mFeb29Combo->setReadOnly(readOnly);
mFeb29Label->setBuddy(mFeb29Combo);
box->setFixedSize(box->sizeHint());
- QWhatsThis::add(box,
+ TQWhatsThis::add(box,
i18n("Select which date, if any, the February 29th alarm should trigger in non-leap years"));
- new QWidget(f29box); // left adjust the visible widgets
+ new TQWidget(f29box); // left adjust the visible widgets
f29box->setFixedHeight(f29box->sizeHint().height());
}
@@ -1513,9 +1513,9 @@ void YearlyRule::setDefaultValues(int dayOfMonth, int dayOfWeek, int month)
* Fetch which months have been checked (1 - 12).
* Reply = true if February has been checked.
*/
-QValueList<int> YearlyRule::months() const
+TQValueList<int> YearlyRule::months() const
{
- QValueList<int> mnths;
+ TQValueList<int> mnths;
for (int i = 0; i < 12; ++i)
if (mMonthBox[i]->isChecked() && mMonthBox[i]->isEnabled())
mnths.append(i + 1);
@@ -1525,12 +1525,12 @@ QValueList<int> YearlyRule::months() const
/******************************************************************************
* Check/uncheck each month of the year according to the specified list.
*/
-void YearlyRule::setMonths(const QValueList<int>& mnths)
+void YearlyRule::setMonths(const TQValueList<int>& mnths)
{
bool checked[12];
for (int i = 0; i < 12; ++i)
checked[i] = false;
- for (QValueListConstIterator<int> it = mnths.begin(); it != mnths.end(); ++it)
+ for (TQValueListConstIterator<int> it = mnths.begin(); it != mnths.end(); ++it)
checked[(*it) - 1] = true;
for (int i = 0; i < 12; ++i)
mMonthBox[i]->setChecked(checked[i]);
@@ -1573,7 +1573,7 @@ void YearlyRule::setFeb29Type(KARecurrence::Feb29Type type)
/******************************************************************************
* Validate: check that at least one month is selected.
*/
-QWidget* YearlyRule::validate(QString& errorMessage)
+TQWidget* YearlyRule::validate(TQString& errorMessage)
{
for (int i = 0; i < 12; ++i)
if (mMonthBox[i]->isChecked() && mMonthBox[i]->isEnabled())
diff --git a/kalarm/recurrenceedit.h b/kalarm/recurrenceedit.h
index f366978db..7700877aa 100644
--- a/kalarm/recurrenceedit.h
+++ b/kalarm/recurrenceedit.h
@@ -24,9 +24,9 @@
#ifndef RECURRENCEEDIT_H
#define RECURRENCEEDIT_H
-#include <qframe.h>
-#include <qdatetime.h>
-#include <qvaluelist.h>
+#include <tqframe.h>
+#include <tqdatetime.h>
+#include <tqvaluelist.h>
#include "datetime.h"
class QWidgetStack;
@@ -60,44 +60,44 @@ class RecurrenceEdit : public QFrame
// Don't alter the order of these recurrence types
enum RepeatType { INVALID_RECUR = -1, NO_RECUR, AT_LOGIN, SUBDAILY, DAILY, WEEKLY, MONTHLY, ANNUAL };
- RecurrenceEdit(bool readOnly, QWidget* parent, const char* name = 0);
+ RecurrenceEdit(bool readOnly, TQWidget* parent, const char* name = 0);
virtual ~RecurrenceEdit() { }
/** Set widgets to default values */
- void setDefaults(const QDateTime& from);
+ void setDefaults(const TQDateTime& from);
/** Initialise according to a specified event */
void set(const KAEvent&, bool keepDuration);
/** Write recurrence settings into an event */
void updateEvent(KAEvent&, bool adjustStart);
- QWidget* checkData(const QDateTime& startDateTime, QString& errorMessage) const;
+ TQWidget* checkData(const TQDateTime& startDateTime, TQString& errorMessage) const;
RepeatType repeatType() const { return mRuleButtonType; }
bool isTimedRepeatType() const { return mRuleButtonType >= SUBDAILY; }
int subRepeatCount(int* subRepeatInterval = 0) const;
void setSubRepetition(int reminderMinutes, bool dateOnly);
- void setStartDate(const QDate&, const QDate& today);
- void setDefaultEndDate(const QDate&);
+ void setStartDate(const TQDate&, const TQDate& today);
+ void setDefaultEndDate(const TQDate&);
void setEndDateTime(const DateTime&);
DateTime endDateTime() const;
bool stateChanged() const;
void activateSubRepetition();
- static QString i18n_Norecur(); // text of 'No recurrence' selection, lower case
- static QString i18n_NoRecur(); // text of 'No Recurrence' selection, initial capitals
- static QString i18n_AtLogin(); // text of 'At Login' selection
- static QString i18n_l_Atlogin(); // text of 'At &login' selection, with 'L' shortcut
- static QString i18n_HourlyMinutely(); // text of 'Hourly/Minutely'
- static QString i18n_u_HourlyMinutely(); // text of 'Ho&urly/Minutely' selection, with 'U' shortcut
- static QString i18n_Daily(); // text of 'Daily' selection
- static QString i18n_d_Daily(); // text of '&Daily' selection, with 'D' shortcut
- static QString i18n_Weekly(); // text of 'Weekly' selection
- static QString i18n_w_Weekly(); // text of '&Weekly' selection, with 'W' shortcut
- static QString i18n_Monthly(); // text of 'Monthly' selection
- static QString i18n_m_Monthly(); // text of '&Monthly' selection, with 'M' shortcut
- static QString i18n_Yearly(); // text of 'Yearly' selection
- static QString i18n_y_Yearly(); // text of '&Yearly' selection, with 'Y' shortcut
+ static TQString i18n_Norecur(); // text of 'No recurrence' selection, lower case
+ static TQString i18n_NoRecur(); // text of 'No Recurrence' selection, initial capitals
+ static TQString i18n_AtLogin(); // text of 'At Login' selection
+ static TQString i18n_l_Atlogin(); // text of 'At &login' selection, with 'L' shortcut
+ static TQString i18n_HourlyMinutely(); // text of 'Hourly/Minutely'
+ static TQString i18n_u_HourlyMinutely(); // text of 'Ho&urly/Minutely' selection, with 'U' shortcut
+ static TQString i18n_Daily(); // text of 'Daily' selection
+ static TQString i18n_d_Daily(); // text of '&Daily' selection, with 'D' shortcut
+ static TQString i18n_Weekly(); // text of 'Weekly' selection
+ static TQString i18n_w_Weekly(); // text of '&Weekly' selection, with 'W' shortcut
+ static TQString i18n_Monthly(); // text of 'Monthly' selection
+ static TQString i18n_m_Monthly(); // text of '&Monthly' selection, with 'M' shortcut
+ static TQString i18n_Yearly(); // text of 'Yearly' selection
+ static TQString i18n_y_Yearly(); // text of '&Yearly' selection, with 'Y' shortcut
public slots:
- void setDateTime(const QDateTime& start) { mCurrStartDateTime = start; }
+ void setDateTime(const TQDateTime& start) { mCurrStartDateTime = start; }
signals:
void shown();
@@ -106,7 +106,7 @@ class RecurrenceEdit : public QFrame
void repeatNeedsInitialisation();
protected:
- virtual void showEvent(QShowEvent*);
+ virtual void showEvent(TQShowEvent*);
private slots:
void periodClicked(int);
@@ -119,11 +119,11 @@ class RecurrenceEdit : public QFrame
void enableExceptionButtons();
private:
- void setRuleDefaults(const QDate& start);
+ void setRuleDefaults(const TQDate& start);
void saveState();
// Main rule box and choices
- QWidgetStack* mRuleStack;
+ TQWidgetStack* mRuleStack;
Rule* mRule; // current rule widget, or 0 if NoRule
NoRule* mNoRule;
SubDailyRule* mSubDailyRule;
@@ -158,32 +158,32 @@ class RecurrenceEdit : public QFrame
RadioButton* mNoEndDateButton;
RadioButton* mRepeatCountButton;
SpinBox* mRepeatCountEntry;
- QLabel* mRepeatCountLabel;
+ TQLabel* mRepeatCountLabel;
RadioButton* mEndDateButton;
DateEdit* mEndDateEdit;
TimeEdit* mEndTimeEdit;
CheckBox* mEndAnyTimeCheckBox;
// Exceptions
- QGroupBox* mExceptionGroup;
- QListBox* mExceptionDateList;
+ TQGroupBox* mExceptionGroup;
+ TQListBox* mExceptionDateList;
DateEdit* mExceptionDateEdit;
- QPushButton* mChangeExceptionButton;
- QPushButton* mDeleteExceptionButton;
- QValueList<QDate> mExceptionDates;
+ TQPushButton* mChangeExceptionButton;
+ TQPushButton* mDeleteExceptionButton;
+ TQValueList<TQDate> mExceptionDates;
// Current start date and time
- QDateTime mCurrStartDateTime;
+ TQDateTime mCurrStartDateTime;
RepetitionButton* mSubRepetition;
bool mNoEmitTypeChanged; // suppress typeChanged() signal
bool mReadOnly;
// Initial state of non-rule controls
- QButton* mSavedRuleButton; // which rule button was selected
- QButton* mSavedRangeButton; // which range button was selected
+ TQButton* mSavedRuleButton; // which rule button was selected
+ TQButton* mSavedRangeButton; // which range button was selected
int mSavedRecurCount; // recurrence repeat count
DateTime mSavedEndDateTime; // end date/time
- QValueList<QDate> mSavedExceptionDates; // exception dates
+ TQValueList<TQDate> mSavedExceptionDates; // exception dates
int mSavedRepeatInterval; // sub-repetition interval (via mSubRepetition button)
int mSavedRepeatCount; // sub-repetition count (via mSubRepetition button)
};
diff --git a/kalarm/recurrenceeditprivate.h b/kalarm/recurrenceeditprivate.h
index 1210f95c6..b9a1fced5 100644
--- a/kalarm/recurrenceeditprivate.h
+++ b/kalarm/recurrenceeditprivate.h
@@ -21,9 +21,9 @@
#ifndef RECURRENCEEDITPRIVATE_H
#define RECURRENCEEDITPRIVATE_H
-#include <qframe.h>
-#include <qvaluelist.h>
-#include <qbitarray.h>
+#include <tqframe.h>
+#include <tqvaluelist.h>
+#include <tqbitarray.h>
class QWidget;
class QVBoxLayout;
@@ -39,8 +39,8 @@ class QString;
class NoRule : public QFrame
{
public:
- NoRule(QWidget* parent, const char* name = 0) : QFrame(parent, name)
- { setFrameStyle(QFrame::NoFrame); }
+ NoRule(TQWidget* parent, const char* name = 0) : TQFrame(parent, name)
+ { setFrameStyle(TQFrame::NoFrame); }
virtual int frequency() const { return 0; }
};
@@ -48,22 +48,22 @@ class Rule : public NoRule
{
Q_OBJECT
public:
- Rule(const QString& freqText, const QString& freqWhatsThis, bool time, bool readOnly,
- QWidget* parent, const char* name = 0);
+ Rule(const TQString& freqText, const TQString& freqWhatsThis, bool time, bool readOnly,
+ TQWidget* parent, const char* name = 0);
int frequency() const;
void setFrequency(int);
virtual void setFrequencyFocus() { mSpinBox->setFocus(); }
- QVBoxLayout* layout() const { return mLayout; }
- virtual QWidget* validate(QString&) { return 0; }
+ TQVBoxLayout* layout() const { return mLayout; }
+ virtual TQWidget* validate(TQString&) { return 0; }
virtual void saveState();
virtual bool stateChanged() const;
signals:
void frequencyChanged();
private:
- QWidget* mSpinBox;
+ TQWidget* mSpinBox;
SpinBox* mIntSpinBox;
TimeSpinBox* mTimeSpinBox;
- QVBoxLayout* mLayout;
+ TQVBoxLayout* mLayout;
// Saved state of all controls
int mSavedFrequency; // frequency for the selected rule
};
@@ -73,7 +73,7 @@ class SubDailyRule : public Rule
{
Q_OBJECT
public:
- SubDailyRule(bool readOnly, QWidget* parent, const char* name = 0);
+ SubDailyRule(bool readOnly, TQWidget* parent, const char* name = 0);
};
// Daily/weekly rule choices base class
@@ -81,33 +81,33 @@ class DayWeekRule : public Rule
{
Q_OBJECT
public:
- DayWeekRule(const QString& freqText, const QString& freqWhatsThis, const QString& daysWhatsThis,
- bool readOnly, QWidget* parent, const char* name = 0);
- QBitArray days() const;
+ DayWeekRule(const TQString& freqText, const TQString& freqWhatsThis, const TQString& daysWhatsThis,
+ bool readOnly, TQWidget* parent, const char* name = 0);
+ TQBitArray days() const;
void setDays(bool);
- void setDays(const QBitArray& days);
+ void setDays(const TQBitArray& days);
void setDay(int dayOfWeek);
- virtual QWidget* validate(QString& errorMessage);
+ virtual TQWidget* validate(TQString& errorMessage);
virtual void saveState();
virtual bool stateChanged() const;
private:
CheckBox* mDayBox[7];
// Saved state of all controls
- QBitArray mSavedDays; // ticked days for weekly rule
+ TQBitArray mSavedDays; // ticked days for weekly rule
};
// Daily rule choices
class DailyRule : public DayWeekRule
{
public:
- DailyRule(bool readOnly, QWidget* parent, const char* name = 0);
+ DailyRule(bool readOnly, TQWidget* parent, const char* name = 0);
};
// Weekly rule choices
class WeeklyRule : public DayWeekRule
{
public:
- WeeklyRule(bool readOnly, QWidget* parent, const char* name = 0);
+ WeeklyRule(bool readOnly, TQWidget* parent, const char* name = 0);
};
// Monthly/yearly rule choices base class
@@ -117,8 +117,8 @@ class MonthYearRule : public Rule
public:
enum DayPosType { DATE, POS };
- MonthYearRule(const QString& freqText, const QString& freqWhatsThis, bool allowEveryWeek,
- bool readOnly, QWidget* parent, const char* name = 0);
+ MonthYearRule(const TQString& freqText, const TQString& freqWhatsThis, bool allowEveryWeek,
+ bool readOnly, TQWidget* parent, const char* name = 0);
DayPosType type() const;
int date() const; // if date in month is selected
int week() const; // if position is selected
@@ -161,7 +161,7 @@ class MonthYearRule : public Rule
class MonthlyRule : public MonthYearRule
{
public:
- MonthlyRule(bool readOnly, QWidget* parent, const char* name = 0);
+ MonthlyRule(bool readOnly, TQWidget* parent, const char* name = 0);
};
// Yearly rule choices
@@ -169,13 +169,13 @@ class YearlyRule : public MonthYearRule
{
Q_OBJECT
public:
- YearlyRule(bool readOnly, QWidget* parent, const char* name = 0);
- QValueList<int> months() const;
- void setMonths(const QValueList<int>& months);
+ YearlyRule(bool readOnly, TQWidget* parent, const char* name = 0);
+ TQValueList<int> months() const;
+ void setMonths(const TQValueList<int>& months);
void setDefaultValues(int dayOfMonth, int dayOfWeek, int month);
KARecurrence::Feb29Type feb29Type() const;
void setFeb29Type(KARecurrence::Feb29Type);
- virtual QWidget* validate(QString& errorMessage);
+ virtual TQWidget* validate(TQString& errorMessage);
virtual void saveState();
virtual bool stateChanged() const;
protected:
@@ -186,10 +186,10 @@ class YearlyRule : public MonthYearRule
void enableFeb29();
private:
CheckBox* mMonthBox[12];
- QLabel* mFeb29Label;
+ TQLabel* mFeb29Label;
ComboBox* mFeb29Combo;
// Saved state of all controls
- QValueList<int> mSavedMonths; // ticked months for yearly rule
+ TQValueList<int> mSavedMonths; // ticked months for yearly rule
int mSavedFeb29Type; // February 29th recurrence type
};
diff --git a/kalarm/reminder.cpp b/kalarm/reminder.cpp
index f31a2d0dd..60c603368 100644
--- a/kalarm/reminder.cpp
+++ b/kalarm/reminder.cpp
@@ -20,8 +20,8 @@
#include "kalarm.h"
-#include <qlayout.h>
-#include <qwhatsthis.h>
+#include <tqlayout.h>
+#include <tqwhatsthis.h>
#include <kglobal.h>
#include <klocale.h>
@@ -36,32 +36,32 @@
// Collect these widget labels together to ensure consistent wording and
// translations across different modules.
-QString Reminder::i18n_first_recurrence_only() { return i18n("Reminder for first recurrence only"); }
-QString Reminder::i18n_u_first_recurrence_only() { return i18n("Reminder for first rec&urrence only"); }
+TQString Reminder::i18n_first_recurrence_only() { return i18n("Reminder for first recurrence only"); }
+TQString Reminder::i18n_u_first_recurrence_only() { return i18n("Reminder for first rec&urrence only"); }
-Reminder::Reminder(const QString& caption, const QString& reminderWhatsThis, const QString& valueWhatsThis,
- bool allowHourMinute, bool showOnceOnly, QWidget* parent, const char* name)
- : QFrame(parent, name),
+Reminder::Reminder(const TQString& caption, const TQString& reminderWhatsThis, const TQString& valueWhatsThis,
+ bool allowHourMinute, bool showOnceOnly, TQWidget* parent, const char* name)
+ : TQFrame(parent, name),
mReadOnly(false),
mOnceOnlyEnabled(showOnceOnly)
{
- setFrameStyle(QFrame::NoFrame);
- QVBoxLayout* topLayout = new QVBoxLayout(this, 0, KDialog::spacingHint());
+ setFrameStyle(TQFrame::NoFrame);
+ TQVBoxLayout* topLayout = new TQVBoxLayout(this, 0, KDialog::spacingHint());
mTime = new TimeSelector(caption, i18n("in advance"), reminderWhatsThis,
valueWhatsThis, allowHourMinute, this, "timeOption");
mTime->setFixedSize(mTime->sizeHint());
- connect(mTime, SIGNAL(toggled(bool)), SLOT(slotReminderToggled(bool)));
+ connect(mTime, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotReminderToggled(bool)));
topLayout->addWidget(mTime);
if (showOnceOnly)
{
- QBoxLayout* layout = new QHBoxLayout(topLayout, KDialog::spacingHint());
+ TQBoxLayout* layout = new TQHBoxLayout(topLayout, KDialog::spacingHint());
layout->addSpacing(3*KDialog::spacingHint());
mOnceOnly = new CheckBox(i18n_u_first_recurrence_only(), this);
mOnceOnly->setFixedSize(mOnceOnly->sizeHint());
- QWhatsThis::add(mOnceOnly, i18n("Display the reminder only before the first time the alarm is scheduled"));
+ TQWhatsThis::add(mOnceOnly, i18n("Display the reminder only before the first time the alarm is scheduled"));
layout->addWidget(mOnceOnly);
layout->addStretch();
}
diff --git a/kalarm/reminder.h b/kalarm/reminder.h
index 1403621d2..2470a0c3d 100644
--- a/kalarm/reminder.h
+++ b/kalarm/reminder.h
@@ -21,7 +21,7 @@
#ifndef REMINDER_H
#define REMINDER_H
-#include <qframe.h>
+#include <tqframe.h>
class TimeSelector;
class CheckBox;
@@ -31,8 +31,8 @@ class Reminder : public QFrame
{
Q_OBJECT
public:
- Reminder(const QString& caption, const QString& reminderWhatsThis, const QString& valueWhatsThis,
- bool allowHourMinute, bool showOnceOnly, QWidget* parent, const char* name = 0);
+ Reminder(const TQString& caption, const TQString& reminderWhatsThis, const TQString& valueWhatsThis,
+ bool allowHourMinute, bool showOnceOnly, TQWidget* parent, const char* name = 0);
bool isReminder() const;
bool isOnceOnly() const;
int minutes() const;
@@ -44,8 +44,8 @@ class Reminder : public QFrame
void setOnceOnly(bool);
void enableOnceOnly(bool enable);
- static QString i18n_first_recurrence_only(); // plain text of 'Reminder for first recurrence only' checkbox
- static QString i18n_u_first_recurrence_only(); // text of 'Reminder for first recurrence only' checkbox, with 'u' shortcut
+ static TQString i18n_first_recurrence_only(); // plain text of 'Reminder for first recurrence only' checkbox
+ static TQString i18n_u_first_recurrence_only(); // text of 'Reminder for first recurrence only' checkbox, with 'u' shortcut
protected slots:
void slotReminderToggled(bool);
diff --git a/kalarm/repetition.cpp b/kalarm/repetition.cpp
index dc6613ee8..2df201300 100644
--- a/kalarm/repetition.cpp
+++ b/kalarm/repetition.cpp
@@ -20,8 +20,8 @@
#include "kalarm.h"
-#include <qlayout.h>
-#include <qwhatsthis.h>
+#include <tqlayout.h>
+#include <tqwhatsthis.h>
#include <kdebug.h>
#include <kdialog.h>
@@ -40,8 +40,8 @@
= Button to display the Alarm Sub-Repetition dialogue.
=============================================================================*/
-RepetitionButton::RepetitionButton(const QString& caption, bool waitForInitialisation, QWidget* parent, const char* name)
- : QPushButton(caption, parent, name),
+RepetitionButton::RepetitionButton(const TQString& caption, bool waitForInitialisation, TQWidget* parent, const char* name)
+ : TQPushButton(caption, parent, name),
mDialog(0),
mInterval(0),
mCount(0),
@@ -52,7 +52,7 @@ RepetitionButton::RepetitionButton(const QString& caption, bool waitForInitialis
{
setToggleButton(true);
setOn(false);
- connect(this, SIGNAL(clicked()), SLOT(slotPressed()));
+ connect(this, TQT_SIGNAL(clicked()), TQT_SLOT(slotPressed()));
}
void RepetitionButton::set(int interval, int count)
@@ -127,7 +127,7 @@ void RepetitionButton::displayDialog()
mDialog->setReadOnly(true);
mDialog->exec();
}
- else if (mDialog->exec() == QDialog::Accepted)
+ else if (mDialog->exec() == TQDialog::Accepted)
{
mCount = mDialog->count();
mInterval = mDialog->interval();
@@ -149,59 +149,59 @@ void RepetitionButton::displayDialog()
static const int MAX_COUNT = 9999; // maximum range for count spinbox
-RepetitionDlg::RepetitionDlg(const QString& caption, bool readOnly, QWidget* parent, const char* name)
+RepetitionDlg::RepetitionDlg(const TQString& caption, bool readOnly, TQWidget* parent, const char* name)
: KDialogBase(parent, name, true, caption, Ok|Cancel),
mMaxDuration(-1),
mDateOnly(false),
mReadOnly(readOnly)
{
int spacing = spacingHint();
- QWidget* page = new QWidget(this);
+ TQWidget* page = new TQWidget(this);
setMainWidget(page);
- QVBoxLayout* topLayout = new QVBoxLayout(page, 0, spacing);
+ TQVBoxLayout* topLayout = new TQVBoxLayout(page, 0, spacing);
- mTimeSelector = new TimeSelector(i18n("Repeat every 10 minutes", "&Repeat every"), QString::null,
+ mTimeSelector = new TimeSelector(i18n("Repeat every 10 minutes", "&Repeat every"), TQString::null,
i18n("Instead of the alarm triggering just once at each recurrence, "
"checking this option makes the alarm trigger multiple times at each recurrence."),
i18n("Enter the time between repetitions of the alarm"),
true, page);
mTimeSelector->setFixedSize(mTimeSelector->sizeHint());
- connect(mTimeSelector, SIGNAL(valueChanged(int)), SLOT(intervalChanged(int)));
- connect(mTimeSelector, SIGNAL(toggled(bool)), SLOT(repetitionToggled(bool)));
+ connect(mTimeSelector, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(intervalChanged(int)));
+ connect(mTimeSelector, TQT_SIGNAL(toggled(bool)), TQT_SLOT(repetitionToggled(bool)));
topLayout->addWidget(mTimeSelector, 0, Qt::AlignAuto);
mButtonGroup = new ButtonGroup(page, "buttonGroup");
- connect(mButtonGroup, SIGNAL(buttonSet(int)), SLOT(typeClicked()));
+ connect(mButtonGroup, TQT_SIGNAL(buttonSet(int)), TQT_SLOT(typeClicked()));
topLayout->addWidget(mButtonGroup);
- QBoxLayout* vlayout = new QVBoxLayout(mButtonGroup, marginHint(), spacing);
- QBoxLayout* layout = new QHBoxLayout(vlayout, spacing);
+ TQBoxLayout* vlayout = new TQVBoxLayout(mButtonGroup, marginHint(), spacing);
+ TQBoxLayout* layout = new TQHBoxLayout(vlayout, spacing);
mCountButton = new RadioButton(i18n("&Number of repetitions:"), mButtonGroup);
mCountButton->setFixedSize(mCountButton->sizeHint());
- QWhatsThis::add(mCountButton,
+ TQWhatsThis::add(mCountButton,
i18n("Check to specify the number of times the alarm should repeat after each recurrence"));
layout->addWidget(mCountButton);
mCount = new SpinBox(1, MAX_COUNT, 1, mButtonGroup);
mCount->setFixedSize(mCount->sizeHint());
mCount->setLineShiftStep(10);
mCount->setSelectOnStep(false);
- connect(mCount, SIGNAL(valueChanged(int)), SLOT(countChanged(int)));
- QWhatsThis::add(mCount,
+ connect(mCount, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(countChanged(int)));
+ TQWhatsThis::add(mCount,
i18n("Enter the number of times to trigger the alarm after its initial occurrence"));
layout->addWidget(mCount);
mCountButton->setFocusWidget(mCount);
layout->addStretch();
- layout = new QHBoxLayout(vlayout, spacing);
+ layout = new TQHBoxLayout(vlayout, spacing);
mDurationButton = new RadioButton(i18n("&Duration:"), mButtonGroup);
mDurationButton->setFixedSize(mDurationButton->sizeHint());
- QWhatsThis::add(mDurationButton,
+ TQWhatsThis::add(mDurationButton,
i18n("Check to specify how long the alarm is to be repeated"));
layout->addWidget(mDurationButton);
mDuration = new TimePeriod(true, mButtonGroup);
mDuration->setFixedSize(mDuration->sizeHint());
- connect(mDuration, SIGNAL(valueChanged(int)), SLOT(durationChanged(int)));
- QWhatsThis::add(mDuration,
+ connect(mDuration, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(durationChanged(int)));
+ TQWhatsThis::add(mDuration,
i18n("Enter the length of time to repeat the alarm"));
layout->addWidget(mDuration);
mDurationButton->setFocusWidget(mDuration);
diff --git a/kalarm/repetition.h b/kalarm/repetition.h
index 64837b875..c8a32ce88 100644
--- a/kalarm/repetition.h
+++ b/kalarm/repetition.h
@@ -21,7 +21,7 @@
#ifndef REPETITION_H
#define REPETITION_H
-#include <qpushbutton.h>
+#include <tqpushbutton.h>
#include <kdialogbase.h>
class ButtonGroup;
@@ -36,7 +36,7 @@ class RepetitionButton : public QPushButton
{
Q_OBJECT
public:
- RepetitionButton(const QString& caption, bool waitForInitialisation, QWidget* parent, const char* name = 0);
+ RepetitionButton(const TQString& caption, bool waitForInitialisation, TQWidget* parent, const char* name = 0);
void set(int interval, int count);
void set(int interval, int count, bool dateOnly, int maxDuration = -1);
void initialise(int interval, int count, bool dateOnly, int maxDuration = -1); // use only after needsInitialisation() signal
@@ -71,7 +71,7 @@ class RepetitionDlg : public KDialogBase
{
Q_OBJECT
public:
- RepetitionDlg(const QString& caption, bool readOnly, QWidget* parent = 0, const char* name = 0);
+ RepetitionDlg(const TQString& caption, bool readOnly, TQWidget* parent = 0, const char* name = 0);
void setReadOnly(bool);
void set(int interval, int count, bool dateOnly = false, int maxDuration = -1);
int interval() const; // get the interval between repetitions, in minutes
diff --git a/kalarm/sounddlg.cpp b/kalarm/sounddlg.cpp
index fe1df0bad..2df7542b1 100644
--- a/kalarm/sounddlg.cpp
+++ b/kalarm/sounddlg.cpp
@@ -22,14 +22,14 @@
#include "kalarm.h"
-#include <qlabel.h>
-#include <qhbox.h>
-#include <qgroupbox.h>
-#include <qlayout.h>
-#include <qfile.h>
-#include <qdir.h>
-#include <qwhatsthis.h>
-#include <qtooltip.h>
+#include <tqlabel.h>
+#include <tqhbox.h>
+#include <tqgroupbox.h>
+#include <tqlayout.h>
+#include <tqfile.h>
+#include <tqdir.h>
+#include <tqwhatsthis.h>
+#include <tqtooltip.h>
#include <klocale.h>
#include <kstandarddirs.h>
@@ -37,7 +37,7 @@
#ifdef WITHOUT_ARTS
#include <kaudioplayer.h>
#else
-#include <qtimer.h>
+#include <tqtimer.h>
#include <arts/kartsdispatcher.h>
#include <arts/kartsserver.h>
#include <arts/kplayobjectfactory.h>
@@ -60,123 +60,123 @@
// Collect these widget labels together to ensure consistent wording and
// translations across different modules.
-QString SoundDlg::i18n_SetVolume() { return i18n("Set volume"); }
-QString SoundDlg::i18n_v_SetVolume() { return i18n("Set &volume"); }
-QString SoundDlg::i18n_Repeat() { return i18n("Repeat"); }
-QString SoundDlg::i18n_p_Repeat() { return i18n("Re&peat"); }
+TQString SoundDlg::i18n_SetVolume() { return i18n("Set volume"); }
+TQString SoundDlg::i18n_v_SetVolume() { return i18n("Set &volume"); }
+TQString SoundDlg::i18n_Repeat() { return i18n("Repeat"); }
+TQString SoundDlg::i18n_p_Repeat() { return i18n("Re&peat"); }
static const char SOUND_DIALOG_NAME[] = "SoundDialog";
-SoundDlg::SoundDlg(const QString& file, float volume, float fadeVolume, int fadeSeconds, bool repeat,
- const QString& caption, QWidget* parent, const char* name)
+SoundDlg::SoundDlg(const TQString& file, float volume, float fadeVolume, int fadeSeconds, bool repeat,
+ const TQString& caption, TQWidget* parent, const char* name)
: KDialogBase(parent, name, true, caption, Ok|Cancel, Ok, false),
mReadOnly(false),
mArtsDispatcher(0),
mPlayObject(0),
mPlayTimer(0)
{
- QWidget* page = new QWidget(this);
+ TQWidget* page = new TQWidget(this);
setMainWidget(page);
- QVBoxLayout* layout = new QVBoxLayout(page, 0, spacingHint());
+ TQVBoxLayout* layout = new TQVBoxLayout(page, 0, spacingHint());
// File play button
- QHBox* box = new QHBox(page);
+ TQHBox* box = new TQHBox(page);
layout->addWidget(box);
- mFilePlay = new QPushButton(box);
+ mFilePlay = new TQPushButton(box);
mFilePlay->setPixmap(SmallIcon("player_play"));
mFilePlay->setFixedSize(mFilePlay->sizeHint());
- connect(mFilePlay, SIGNAL(clicked()), SLOT(playSound()));
- QToolTip::add(mFilePlay, i18n("Test the sound"));
- QWhatsThis::add(mFilePlay, i18n("Play the selected sound file."));
+ connect(mFilePlay, TQT_SIGNAL(clicked()), TQT_SLOT(playSound()));
+ TQToolTip::add(mFilePlay, i18n("Test the sound"));
+ TQWhatsThis::add(mFilePlay, i18n("Play the selected sound file."));
// File name edit box
mFileEdit = new LineEdit(LineEdit::Url, box);
mFileEdit->setAcceptDrops(true);
- QWhatsThis::add(mFileEdit, i18n("Enter the name or URL of a sound file to play."));
+ TQWhatsThis::add(mFileEdit, i18n("Enter the name or URL of a sound file to play."));
// File browse button
mFileBrowseButton = new PushButton(box);
mFileBrowseButton->setPixmap(SmallIcon("fileopen"));
mFileBrowseButton->setFixedSize(mFileBrowseButton->sizeHint());
- connect(mFileBrowseButton, SIGNAL(clicked()), SLOT(slotPickFile()));
- QToolTip::add(mFileBrowseButton, i18n("Choose a file"));
- QWhatsThis::add(mFileBrowseButton, i18n("Select a sound file to play."));
+ connect(mFileBrowseButton, TQT_SIGNAL(clicked()), TQT_SLOT(slotPickFile()));
+ TQToolTip::add(mFileBrowseButton, i18n("Choose a file"));
+ TQWhatsThis::add(mFileBrowseButton, i18n("Select a sound file to play."));
// Sound repetition checkbox
mRepeatCheckbox = new CheckBox(i18n_p_Repeat(), page);
mRepeatCheckbox->setFixedSize(mRepeatCheckbox->sizeHint());
- QWhatsThis::add(mRepeatCheckbox,
+ TQWhatsThis::add(mRepeatCheckbox,
i18n("If checked, the sound file will be played repeatedly for as long as the message is displayed."));
layout->addWidget(mRepeatCheckbox);
// Volume
- QGroupBox* group = new QGroupBox(i18n("Volume"), page);
+ TQGroupBox* group = new TQGroupBox(i18n("Volume"), page);
layout->addWidget(group);
- QGridLayout* grid = new QGridLayout(group, 4, 3, marginHint(), spacingHint());
+ TQGridLayout* grid = new TQGridLayout(group, 4, 3, marginHint(), spacingHint());
grid->addRowSpacing(0, fontMetrics().height() - marginHint() + spacingHint());
grid->setColStretch(2, 1);
int indentWidth = 3 * KDialog::spacingHint();
grid->addColSpacing(0, indentWidth);
grid->addColSpacing(1, indentWidth);
- // Get alignment to use in QGridLayout (AlignAuto doesn't work correctly there)
- int alignment = QApplication::reverseLayout() ? Qt::AlignRight : Qt::AlignLeft;
+ // Get alignment to use in TQGridLayout (AlignAuto doesn't work correctly there)
+ int alignment = TQApplication::reverseLayout() ? Qt::AlignRight : Qt::AlignLeft;
// 'Set volume' checkbox
- box = new QHBox(group);
+ box = new TQHBox(group);
box->setSpacing(spacingHint());
grid->addMultiCellWidget(box, 1, 1, 0, 2);
mVolumeCheckbox = new CheckBox(i18n_v_SetVolume(), box);
mVolumeCheckbox->setFixedSize(mVolumeCheckbox->sizeHint());
- connect(mVolumeCheckbox, SIGNAL(toggled(bool)), SLOT(slotVolumeToggled(bool)));
- QWhatsThis::add(mVolumeCheckbox,
+ connect(mVolumeCheckbox, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotVolumeToggled(bool)));
+ TQWhatsThis::add(mVolumeCheckbox,
i18n("Select to choose the volume for playing the sound file."));
// Volume slider
mVolumeSlider = new Slider(0, 100, 10, 0, Qt::Horizontal, box);
- mVolumeSlider->setTickmarks(QSlider::Below);
+ mVolumeSlider->setTickmarks(TQSlider::Below);
mVolumeSlider->setTickInterval(10);
- mVolumeSlider->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed));
- QWhatsThis::add(mVolumeSlider, i18n("Choose the volume for playing the sound file."));
+ mVolumeSlider->setSizePolicy(TQSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Fixed));
+ TQWhatsThis::add(mVolumeSlider, i18n("Choose the volume for playing the sound file."));
mVolumeCheckbox->setFocusWidget(mVolumeSlider);
// Fade checkbox
mFadeCheckbox = new CheckBox(i18n("Fade"), group);
mFadeCheckbox->setFixedSize(mFadeCheckbox->sizeHint());
- connect(mFadeCheckbox, SIGNAL(toggled(bool)), SLOT(slotFadeToggled(bool)));
- QWhatsThis::add(mFadeCheckbox,
+ connect(mFadeCheckbox, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotFadeToggled(bool)));
+ TQWhatsThis::add(mFadeCheckbox,
i18n("Select to fade the volume when the sound file first starts to play."));
grid->addMultiCellWidget(mFadeCheckbox, 2, 2, 1, 2, alignment);
// Fade time
- mFadeBox = new QHBox(group);
+ mFadeBox = new TQHBox(group);
mFadeBox->setSpacing(spacingHint());
grid->addWidget(mFadeBox, 3, 2, alignment);
- QLabel* label = new QLabel(i18n("Time period over which to fade the sound", "Fade time:"), mFadeBox);
+ TQLabel* label = new TQLabel(i18n("Time period over which to fade the sound", "Fade time:"), mFadeBox);
label->setFixedSize(label->sizeHint());
mFadeTime = new SpinBox(1, 999, 1, mFadeBox);
mFadeTime->setLineShiftStep(10);
mFadeTime->setFixedSize(mFadeTime->sizeHint());
label->setBuddy(mFadeTime);
- label = new QLabel(i18n("seconds"), mFadeBox);
+ label = new TQLabel(i18n("seconds"), mFadeBox);
label->setFixedSize(label->sizeHint());
- QWhatsThis::add(mFadeBox, i18n("Enter how many seconds to fade the sound before reaching the set volume."));
+ TQWhatsThis::add(mFadeBox, i18n("Enter how many seconds to fade the sound before reaching the set volume."));
// Fade slider
- mFadeVolumeBox = new QHBox(group);
+ mFadeVolumeBox = new TQHBox(group);
mFadeVolumeBox->setSpacing(spacingHint());
grid->addWidget(mFadeVolumeBox, 4, 2);
- label = new QLabel(i18n("Initial volume:"), mFadeVolumeBox);
+ label = new TQLabel(i18n("Initial volume:"), mFadeVolumeBox);
label->setFixedSize(label->sizeHint());
mFadeSlider = new Slider(0, 100, 10, 0, Qt::Horizontal, mFadeVolumeBox);
- mFadeSlider->setTickmarks(QSlider::Below);
+ mFadeSlider->setTickmarks(TQSlider::Below);
mFadeSlider->setTickInterval(10);
- mFadeSlider->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed));
+ mFadeSlider->setSizePolicy(TQSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Fixed));
label->setBuddy(mFadeSlider);
- QWhatsThis::add(mFadeVolumeBox, i18n("Choose the initial volume for playing the sound file."));
+ TQWhatsThis::add(mFadeVolumeBox, i18n("Choose the initial volume for playing the sound file."));
// Restore the dialogue size from last time
- QSize s;
+ TQSize s;
if (KAlarm::readConfigWindowSize(SOUND_DIALOG_NAME, s))
resize(s);
@@ -241,7 +241,7 @@ bool SoundDlg::getSettings(float& volume, float& fadeVolume, int& fadeSeconds) c
* Called when the dialog's size has changed.
* Records the new size in the config file.
*/
-void SoundDlg::resizeEvent(QResizeEvent* re)
+void SoundDlg::resizeEvent(TQResizeEvent* re)
{
if (isVisible())
KAlarm::writeConfigWindowSize(SOUND_DIALOG_NAME, re->size());
@@ -249,7 +249,7 @@ void SoundDlg::resizeEvent(QResizeEvent* re)
KDialog::resizeEvent(re);
}
-void SoundDlg::showEvent(QShowEvent* se)
+void SoundDlg::showEvent(TQShowEvent* se)
{
mVolumeSlider->resize(mFadeSlider->size());
KDialog::showEvent(se);
@@ -272,7 +272,7 @@ void SoundDlg::slotOk()
*/
void SoundDlg::slotPickFile()
{
- QString url = SoundPicker::browseFile(mDefaultDir, mFileEdit->text());
+ TQString url = SoundPicker::browseFile(mDefaultDir, mFileEdit->text());
if (!url.isEmpty())
mFileEdit->setText(url);
}
@@ -284,7 +284,7 @@ void SoundDlg::playSound()
{
#ifdef WITHOUT_ARTS
if (checkFile())
- KAudioPlayer::play(QFile::encodeName(mFileName));
+ KAudioPlayer::play(TQFile::encodeName(mFileName));
#else
if (mPlayObject)
{
@@ -302,8 +302,8 @@ void SoundDlg::playSound()
KMessageBox::error(this, i18n("Cannot open audio file:\n%1").arg(mFileName));
return;
}
- mPlayTimer = new QTimer(this);
- connect(mPlayTimer, SIGNAL(timeout()), SLOT(checkAudioPlay()));
+ mPlayTimer = new TQTimer(this);
+ connect(mPlayTimer, TQT_SIGNAL(timeout()), TQT_SLOT(checkAudioPlay()));
mArtsDispatcher = new KArtsDispatcher;
mPlayStarted = false;
KArtsServer aserver;
@@ -311,9 +311,9 @@ void SoundDlg::playSound()
KDE::PlayObjectFactory factory(sserver);
mPlayObject = factory.createPlayObject(mLocalAudioFile, true);
mFilePlay->setPixmap(SmallIcon("player_stop"));
- QToolTip::add(mFilePlay, i18n("Stop sound"));
- QWhatsThis::add(mFilePlay, i18n("Stop playing the sound"));
- connect(mPlayObject, SIGNAL(playObjectCreated()), SLOT(checkAudioPlay()));
+ TQToolTip::add(mFilePlay, i18n("Stop sound"));
+ TQWhatsThis::add(mFilePlay, i18n("Stop playing the sound"));
+ connect(mPlayObject, TQT_SIGNAL(playObjectCreated()), TQT_SLOT(checkAudioPlay()));
if (!mPlayObject->object().isNull())
checkAudioPlay();
#endif
@@ -370,11 +370,11 @@ void SoundDlg::stopPlay()
if (!mLocalAudioFile.isEmpty())
{
KIO::NetAccess::removeTempFile(mLocalAudioFile); // removes it only if it IS a temporary file
- mLocalAudioFile = QString::null;
+ mLocalAudioFile = TQString::null;
}
mFilePlay->setPixmap(SmallIcon("player_play"));
- QToolTip::add(mFilePlay, i18n("Test the sound"));
- QWhatsThis::add(mFilePlay, i18n("Play the selected sound file."));
+ TQToolTip::add(mFilePlay, i18n("Test the sound"));
+ TQWhatsThis::add(mFilePlay, i18n("Play the selected sound file."));
#endif
}
@@ -389,7 +389,7 @@ bool SoundDlg::checkFile()
if (KURL::isRelativeURL(mFileName))
{
// It's not an absolute URL, so check for an absolute path
- QFileInfo f(mFileName);
+ TQFileInfo f(mFileName);
if (!f.isRelative())
url.setPath(mFileName);
}
@@ -413,12 +413,12 @@ bool SoundDlg::checkFile()
{
// It's a relative path.
// Find the first sound resource that contains files.
- QStringList soundDirs = KGlobal::dirs()->resourceDirs("sound");
+ TQStringList soundDirs = KGlobal::dirs()->resourceDirs("sound");
if (!soundDirs.isEmpty())
{
- QDir dir;
- dir.setFilter(QDir::Files | QDir::Readable);
- for (QStringList::ConstIterator it = soundDirs.begin(); it != soundDirs.end(); ++it)
+ TQDir dir;
+ dir.setFilter(TQDir::Files | TQDir::Readable);
+ for (TQStringList::ConstIterator it = soundDirs.begin(); it != soundDirs.end(); ++it)
{
dir = *it;
if (dir.isReadable() && dir.count() > 2)
@@ -433,7 +433,7 @@ bool SoundDlg::checkFile()
}
}
}
- url.setPath(QDir::homeDirPath());
+ url.setPath(TQDir::homeDirPath());
url.addPath(mFileName);
if (KIO::NetAccess::exists(url, true, this))
{
@@ -443,7 +443,7 @@ bool SoundDlg::checkFile()
}
#ifdef WITHOUT_ARTS
KMessageBox::sorry(this, i18n("File not found"));
- mFileName = QString::null;
+ mFileName = TQString::null;
return false;
#else
return true;
diff --git a/kalarm/sounddlg.h b/kalarm/sounddlg.h
index ee4273b5d..6bca01d16 100644
--- a/kalarm/sounddlg.h
+++ b/kalarm/sounddlg.h
@@ -21,8 +21,8 @@
#ifndef SOUNDDLG_H
#define SOUNDDLG_H
-#include <qframe.h>
-#include <qstring.h>
+#include <tqframe.h>
+#include <tqstring.h>
#include <kdialogbase.h>
class QHBox;
@@ -40,23 +40,23 @@ class SoundDlg : public KDialogBase
{
Q_OBJECT
public:
- SoundDlg(const QString& file, float volume, float fadeVolume, int fadeSeconds, bool repeat,
- const QString& caption, QWidget* parent, const char* name = 0);
+ SoundDlg(const TQString& file, float volume, float fadeVolume, int fadeSeconds, bool repeat,
+ const TQString& caption, TQWidget* parent, const char* name = 0);
~SoundDlg();
void setReadOnly(bool);
bool isReadOnly() const { return mReadOnly; }
- QString getFile() const { return mFileName; }
+ TQString getFile() const { return mFileName; }
bool getSettings(float& volume, float& fadeVolume, int& fadeSeconds) const;
- QString defaultDir() const { return mDefaultDir; }
+ TQString defaultDir() const { return mDefaultDir; }
- static QString i18n_SetVolume(); // plain text of Set volume checkbox
- static QString i18n_v_SetVolume(); // text of Set volume checkbox, with 'V' shortcut
- static QString i18n_Repeat(); // plain text of Repeat checkbox
- static QString i18n_p_Repeat(); // text of Repeat checkbox, with 'P' shortcut
+ static TQString i18n_SetVolume(); // plain text of Set volume checkbox
+ static TQString i18n_v_SetVolume(); // text of Set volume checkbox, with 'V' shortcut
+ static TQString i18n_Repeat(); // plain text of Repeat checkbox
+ static TQString i18n_p_Repeat(); // text of Repeat checkbox, with 'P' shortcut
protected:
- virtual void showEvent(QShowEvent*);
- virtual void resizeEvent(QResizeEvent*);
+ virtual void showEvent(TQShowEvent*);
+ virtual void resizeEvent(TQResizeEvent*);
protected slots:
virtual void slotOk();
@@ -72,25 +72,25 @@ class SoundDlg : public KDialogBase
void stopPlay();
bool checkFile();
- QPushButton* mFilePlay;
+ TQPushButton* mFilePlay;
LineEdit* mFileEdit;
PushButton* mFileBrowseButton;
CheckBox* mRepeatCheckbox;
CheckBox* mVolumeCheckbox;
Slider* mVolumeSlider;
CheckBox* mFadeCheckbox;
- QHBox* mFadeBox;
+ TQHBox* mFadeBox;
SpinBox* mFadeTime;
- QHBox* mFadeVolumeBox;
+ TQHBox* mFadeVolumeBox;
Slider* mFadeSlider;
- QString mDefaultDir; // current default directory for mFileEdit
- QString mFileName;
+ TQString mDefaultDir; // current default directory for mFileEdit
+ TQString mFileName;
bool mReadOnly;
// Sound file playing
KArtsDispatcher* mArtsDispatcher;
KDE::PlayObject* mPlayObject;
- QTimer* mPlayTimer; // timer for playing the sound file
- QString mLocalAudioFile; // local copy of audio file
+ TQTimer* mPlayTimer; // timer for playing the sound file
+ TQString mLocalAudioFile; // local copy of audio file
bool mPlayStarted; // the sound file has started playing
};
diff --git a/kalarm/soundpicker.cpp b/kalarm/soundpicker.cpp
index 0e0626de9..cd40a778f 100644
--- a/kalarm/soundpicker.cpp
+++ b/kalarm/soundpicker.cpp
@@ -20,13 +20,13 @@
#include "kalarm.h"
-#include <qlayout.h>
-#include <qregexp.h>
-#include <qtooltip.h>
-#include <qtimer.h>
-#include <qlabel.h>
-#include <qhbox.h>
-#include <qwhatsthis.h>
+#include <tqlayout.h>
+#include <tqregexp.h>
+#include <tqtooltip.h>
+#include <tqtimer.h>
+#include <tqlabel.h>
+#include <tqhbox.h>
+#include <tqwhatsthis.h>
#include <kglobal.h>
#include <klocale.h>
@@ -48,22 +48,22 @@
// Collect these widget labels together to ensure consistent wording and
// translations across different modules.
-QString SoundPicker::i18n_Sound() { return i18n("An audio sound", "Sound"); }
-QString SoundPicker::i18n_None() { return i18n("None"); }
-QString SoundPicker::i18n_Beep() { return i18n("Beep"); }
-QString SoundPicker::i18n_Speak() { return i18n("Speak"); }
-QString SoundPicker::i18n_File() { return i18n("Sound file"); }
+TQString SoundPicker::i18n_Sound() { return i18n("An audio sound", "Sound"); }
+TQString SoundPicker::i18n_None() { return i18n("None"); }
+TQString SoundPicker::i18n_Beep() { return i18n("Beep"); }
+TQString SoundPicker::i18n_Speak() { return i18n("Speak"); }
+TQString SoundPicker::i18n_File() { return i18n("Sound file"); }
-SoundPicker::SoundPicker(QWidget* parent, const char* name)
- : QFrame(parent, name)
+SoundPicker::SoundPicker(TQWidget* parent, const char* name)
+ : TQFrame(parent, name)
{
- setFrameStyle(QFrame::NoFrame);
- QHBoxLayout* soundLayout = new QHBoxLayout(this, 0, KDialog::spacingHint());
- mTypeBox = new QHBox(this); // this is to control the QWhatsThis text display area
+ setFrameStyle(TQFrame::NoFrame);
+ TQHBoxLayout* soundLayout = new TQHBoxLayout(this, 0, KDialog::spacingHint());
+ mTypeBox = new TQHBox(this); // this is to control the TQWhatsThis text display area
mTypeBox->setSpacing(KDialog::spacingHint());
- QLabel* label = new QLabel(i18n("An audio sound", "&Sound:"), mTypeBox);
+ TQLabel* label = new TQLabel(i18n("An audio sound", "&Sound:"), mTypeBox);
label->setFixedSize(label->sizeHint());
// Sound type combo box
@@ -74,7 +74,7 @@ SoundPicker::SoundPicker(QWidget* parent, const char* name)
mTypeCombo->insertItem(i18n_File()); // index PLAY_FILE
mSpeakShowing = !theApp()->speechEnabled();
showSpeak(!mSpeakShowing); // index SPEAK (only displayed if appropriate)
- connect(mTypeCombo, SIGNAL(activated(int)), SLOT(slotTypeSelected(int)));
+ connect(mTypeCombo, TQT_SIGNAL(activated(int)), TQT_SLOT(slotTypeSelected(int)));
label->setBuddy(mTypeCombo);
soundLayout->addWidget(mTypeBox);
@@ -82,9 +82,9 @@ SoundPicker::SoundPicker(QWidget* parent, const char* name)
mFilePicker = new PushButton(this);
mFilePicker->setPixmap(SmallIcon("playsound"));
mFilePicker->setFixedSize(mFilePicker->sizeHint());
- connect(mFilePicker, SIGNAL(clicked()), SLOT(slotPickFile()));
- QToolTip::add(mFilePicker, i18n("Configure sound file"));
- QWhatsThis::add(mFilePicker, i18n("Configure a sound file to play when the alarm is displayed."));
+ connect(mFilePicker, TQT_SIGNAL(clicked()), TQT_SLOT(slotPickFile()));
+ TQToolTip::add(mFilePicker, i18n("Configure sound file"));
+ TQWhatsThis::add(mFilePicker, i18n("Configure a sound file to play when the alarm is displayed."));
soundLayout->addWidget(mFilePicker);
// Initialise the file picker button state and tooltip
@@ -113,7 +113,7 @@ void SoundPicker::showSpeak(bool show)
show = false; // speech capability is not installed
if (show == mSpeakShowing)
return; // no change
- QString whatsThis = "<p>" + i18n("Choose a sound to play when the message is displayed.")
+ TQString whatsThis = "<p>" + i18n("Choose a sound to play when the message is displayed.")
+ "<br>" + i18n("%1: the message is displayed silently.").arg("<b>" + i18n_None() + "</b>")
+ "<br>" + i18n("%1: a simple beep is sounded.").arg("<b>" + i18n_Beep() + "</b>")
+ "<br>" + i18n("%1: an audio file is played. You will be prompted to choose the file and set play options.").arg("<b>" + i18n_File() + "</b>");
@@ -126,7 +126,7 @@ void SoundPicker::showSpeak(bool show)
mTypeCombo->insertItem(i18n_Speak());
whatsThis += "<br>" + i18n("%1: the message text is spoken.").arg("<b>" + i18n_Speak() + "</b>") + "</p>";
}
- QWhatsThis::add(mTypeBox, whatsThis + "</p>");
+ TQWhatsThis::add(mTypeBox, whatsThis + "</p>");
mSpeakShowing = show;
}
@@ -142,9 +142,9 @@ SoundPicker::Type SoundPicker::sound() const
* Return the selected sound file, if the File option is selected.
* Returns null string if File is not currently selected.
*/
-QString SoundPicker::file() const
+TQString SoundPicker::file() const
{
- return (mTypeCombo->currentItem() == PLAY_FILE) ? mFile : QString::null;
+ return (mTypeCombo->currentItem() == PLAY_FILE) ? mFile : TQString::null;
}
/******************************************************************************
@@ -179,7 +179,7 @@ bool SoundPicker::repeat() const
/******************************************************************************
* Initialise the widget's state.
*/
-void SoundPicker::set(SoundPicker::Type type, const QString& f, float volume, float fadeVolume, int fadeSeconds, bool repeat)
+void SoundPicker::set(SoundPicker::Type type, const TQString& f, float volume, float fadeVolume, int fadeSeconds, bool repeat)
{
if (type == PLAY_FILE && f.isEmpty())
type = BEEP;
@@ -191,9 +191,9 @@ void SoundPicker::set(SoundPicker::Type type, const QString& f, float volume, fl
mTypeCombo->setCurrentItem(type); // this doesn't trigger slotTypeSelected()
mFilePicker->setEnabled(type == PLAY_FILE);
if (type == PLAY_FILE)
- QToolTip::add(mTypeCombo, mFile);
+ TQToolTip::add(mTypeCombo, mFile);
else
- QToolTip::remove(mTypeCombo);
+ TQToolTip::remove(mTypeCombo);
mLastType = type;
}
@@ -205,11 +205,11 @@ void SoundPicker::slotTypeSelected(int id)
Type newType = static_cast<Type>(id);
if (newType == mLastType)
return;
- QString tooltip;
+ TQString tooltip;
if (mLastType == PLAY_FILE)
{
mFilePicker->setEnabled(false);
- QToolTip::remove(mTypeCombo);
+ TQToolTip::remove(mTypeCombo);
}
else if (newType == PLAY_FILE)
{
@@ -220,7 +220,7 @@ void SoundPicker::slotTypeSelected(int id)
return; // revert to previously selected type
}
mFilePicker->setEnabled(true);
- QToolTip::add(mTypeCombo, mFile);
+ TQToolTip::add(mTypeCombo, mFile);
}
mLastType = newType;
}
@@ -231,14 +231,14 @@ void SoundPicker::slotTypeSelected(int id)
void SoundPicker::slotPickFile()
{
#ifdef WITHOUT_ARTS
- QString url = browseFile(mDefaultDir, mFile);
+ TQString url = browseFile(mDefaultDir, mFile);
if (!url.isEmpty())
mFile = url;
#else
- QString file = mFile;
+ TQString file = mFile;
SoundDlg dlg(mFile, mVolume, mFadeVolume, mFadeSeconds, mRepeat, i18n("Sound File"), this, "soundDlg");
dlg.setReadOnly(mReadOnly);
- bool accepted = (dlg.exec() == QDialog::Accepted);
+ bool accepted = (dlg.exec() == TQDialog::Accepted);
if (mReadOnly)
return;
if (accepted)
@@ -261,10 +261,10 @@ void SoundPicker::slotPickFile()
{
// No audio file is selected, so revert to previously selected option
mTypeCombo->setCurrentItem(mLastType);
- QToolTip::remove(mTypeCombo);
+ TQToolTip::remove(mTypeCombo);
}
else
- QToolTip::add(mTypeCombo, mFile);
+ TQToolTip::add(mTypeCombo, mFile);
}
/******************************************************************************
@@ -273,9 +273,9 @@ void SoundPicker::slotPickFile()
* 'defaultDir' is updated to the directory containing the chosen file.
* Reply = URL selected. If none is selected, URL.isEmpty() is true.
*/
-QString SoundPicker::browseFile(QString& defaultDir, const QString& initialFile)
+TQString SoundPicker::browseFile(TQString& defaultDir, const TQString& initialFile)
{
- static QString kdeSoundDir; // directory containing KDE sound files
+ static TQString kdeSoundDir; // directory containing KDE sound files
if (defaultDir.isEmpty())
{
if (kdeSoundDir.isNull())
@@ -283,10 +283,10 @@ QString SoundPicker::browseFile(QString& defaultDir, const QString& initialFile)
defaultDir = kdeSoundDir;
}
#ifdef WITHOUT_ARTS
- QString filter = QString::fromLatin1("*.wav *.mp3 *.ogg|%1\n*|%2").arg(i18n("Sound Files")).arg(i18n("All Files"));
+ TQString filter = TQString::fromLatin1("*.wav *.mp3 *.ogg|%1\n*|%2").arg(i18n("Sound Files")).arg(i18n("All Files"));
#else
- QStringList filters = KDE::PlayObjectFactory::mimeTypes();
- QString filter = filters.join(" ");
+ TQStringList filters = KDE::PlayObjectFactory::mimeTypes();
+ TQString filter = filters.join(" ");
#endif
return KAlarm::browseFile(i18n("Choose Sound File"), defaultDir, initialFile, filter, KFile::ExistingOnly, 0, "pickSoundFile");
}
diff --git a/kalarm/soundpicker.h b/kalarm/soundpicker.h
index 7cad7f380..b07d63e39 100644
--- a/kalarm/soundpicker.h
+++ b/kalarm/soundpicker.h
@@ -21,8 +21,8 @@
#ifndef SOUNDPICKER_H
#define SOUNDPICKER_H
-#include <qframe.h>
-#include <qstring.h>
+#include <tqframe.h>
+#include <tqstring.h>
#include <kurl.h>
class QHBox;
@@ -45,7 +45,7 @@ class SoundPicker : public QFrame
* @param parent The parent object of this widget.
* @param name The name of this widget.
*/
- explicit SoundPicker(QWidget* parent, const char* name = 0);
+ explicit SoundPicker(TQWidget* parent, const char* name = 0);
/** Initialises the widget's state.
* @param type The option to select.
* @param filename The full path or URL of the sound file to select. If the 'file' option is
@@ -64,7 +64,7 @@ class SoundPicker : public QFrame
* selected, @p repeat provides the default should 'file' later be selected by
* the user.
*/
- void set(Type type, const QString& filename, float volume, float fadeVolume, int fadeSeconds, bool repeat);
+ void set(Type type, const TQString& filename, float volume, float fadeVolume, int fadeSeconds, bool repeat);
/** Returns true if the widget is read only for the user. */
bool isReadOnly() const { return mReadOnly; }
/** Sets whether the widget can be changed the user.
@@ -80,7 +80,7 @@ class SoundPicker : public QFrame
/** If the 'file' option is selected, returns the URL of the chosen file.
* Otherwise returns a null string.
*/
- QString file() const;
+ TQString file() const;
/** Returns the volume and fade characteristics for playing a sound file.
* @param fadeVolume Receives the initial volume if the volume is to be faded, else -1.
* @param fadeSeconds Receives the number of seconds over which the volume is to be faded, else 0.
@@ -92,7 +92,7 @@ class SoundPicker : public QFrame
*/
bool repeat() const;
/** Returns the current file URL regardless of whether the 'file' option is selected. */
- QString fileSetting() const { return mFile; }
+ TQString fileSetting() const { return mFile; }
/** Returns the current file repetition setting regardless of whether the 'file' option is selected. */
bool repeatSetting() const { return mRepeat; }
/** Display a dialogue to choose a sound file, initially highlighting
@@ -103,13 +103,13 @@ class SoundPicker : public QFrame
* If null, no file will be highlighted.
* @return URL selected, in human readable format. If none is selected, URL.isEmpty() is true.
*/
- static QString browseFile(QString& initialDir, const QString& initialFile = QString::null);
+ static TQString browseFile(TQString& initialDir, const TQString& initialFile = TQString::null);
- static QString i18n_Sound(); // plain text of Sound label
- static QString i18n_None(); // plain text of None combo box item
- static QString i18n_Beep(); // plain text of Beep combo box item
- static QString i18n_Speak(); // plain text of Speak combo box item
- static QString i18n_File(); // plain text of File combo box item
+ static TQString i18n_Sound(); // plain text of Sound label
+ static TQString i18n_None(); // plain text of None combo box item
+ static TQString i18n_Beep(); // plain text of Beep combo box item
+ static TQString i18n_Speak(); // plain text of Speak combo box item
+ static TQString i18n_File(); // plain text of File combo box item
private slots:
@@ -119,10 +119,10 @@ class SoundPicker : public QFrame
private:
ComboBox* mTypeCombo;
- QHBox* mTypeBox;
+ TQHBox* mTypeBox;
PushButton* mFilePicker;
- QString mDefaultDir;
- QString mFile; // sound file to play when alarm is triggered
+ TQString mDefaultDir;
+ TQString mFile; // sound file to play when alarm is triggered
float mVolume; // volume for file, or < 0 to not set volume
float mFadeVolume; // initial volume for file, or < 0 for no fading
int mFadeSeconds; // fade interval in seconds
diff --git a/kalarm/specialactions.cpp b/kalarm/specialactions.cpp
index a92166eea..ed8555859 100644
--- a/kalarm/specialactions.cpp
+++ b/kalarm/specialactions.cpp
@@ -20,9 +20,9 @@
#include "kalarm.h"
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qwhatsthis.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqwhatsthis.h>
#include <klineedit.h>
#include <kapplication.h>
@@ -40,14 +40,14 @@
= Button to display the Special Alarm Actions dialogue.
=============================================================================*/
-SpecialActionsButton::SpecialActionsButton(const QString& caption, QWidget* parent, const char* name)
- : QPushButton(caption, parent, name),
+SpecialActionsButton::SpecialActionsButton(const TQString& caption, TQWidget* parent, const char* name)
+ : TQPushButton(caption, parent, name),
mReadOnly(false)
{
setToggleButton(true);
setOn(false);
- connect(this, SIGNAL(clicked()), SLOT(slotButtonPressed()));
- QWhatsThis::add(this,
+ connect(this, TQT_SIGNAL(clicked()), TQT_SLOT(slotButtonPressed()));
+ TQWhatsThis::add(this,
i18n("Specify actions to execute before and after the alarm is displayed."));
}
@@ -55,7 +55,7 @@ SpecialActionsButton::SpecialActionsButton(const QString& caption, QWidget* pare
* Set the pre- and post-alarm actions.
* The button's pressed state is set to reflect whether any actions are set.
*/
-void SpecialActionsButton::setActions(const QString& pre, const QString& post)
+void SpecialActionsButton::setActions(const TQString& pre, const TQString& post)
{
mPreAction = pre;
mPostAction = post;
@@ -71,7 +71,7 @@ void SpecialActionsButton::slotButtonPressed()
SpecialActionsDlg dlg(mPreAction, mPostAction,
i18n("Special Alarm Actions"), this, "actionsDlg");
dlg.setReadOnly(mReadOnly);
- if (dlg.exec() == QDialog::Accepted)
+ if (dlg.exec() == TQDialog::Accepted)
{
mPreAction = dlg.preAction();
mPostAction = dlg.postAction();
@@ -89,20 +89,20 @@ void SpecialActionsButton::slotButtonPressed()
static const char SPEC_ACT_DIALOG_NAME[] = "SpecialActionsDialog";
-SpecialActionsDlg::SpecialActionsDlg(const QString& preAction, const QString& postAction,
- const QString& caption, QWidget* parent, const char* name)
+SpecialActionsDlg::SpecialActionsDlg(const TQString& preAction, const TQString& postAction,
+ const TQString& caption, TQWidget* parent, const char* name)
: KDialogBase(parent, name, true, caption, Ok|Cancel, Ok, false)
{
- QWidget* page = new QWidget(this);
+ TQWidget* page = new TQWidget(this);
setMainWidget(page);
- QVBoxLayout* layout = new QVBoxLayout(page, 0, spacingHint());
+ TQVBoxLayout* layout = new TQVBoxLayout(page, 0, spacingHint());
mActions = new SpecialActions(page);
mActions->setActions(preAction, postAction);
layout->addWidget(mActions);
layout->addSpacing(KDialog::spacingHint());
- QSize s;
+ TQSize s;
if (KAlarm::readConfigWindowSize(SPEC_ACT_DIALOG_NAME, s))
resize(s);
}
@@ -121,7 +121,7 @@ void SpecialActionsDlg::slotOk()
* Called when the dialog's size has changed.
* Records the new size in the config file.
*/
-void SpecialActionsDlg::resizeEvent(QResizeEvent* re)
+void SpecialActionsDlg::resizeEvent(TQResizeEvent* re)
{
if (isVisible())
KAlarm::writeConfigWindowSize(SPEC_ACT_DIALOG_NAME, re->size());
@@ -134,20 +134,20 @@ void SpecialActionsDlg::resizeEvent(QResizeEvent* re)
= Pre- and post-alarm actions widget.
=============================================================================*/
-SpecialActions::SpecialActions(QWidget* parent, const char* name)
- : QWidget(parent, name),
+SpecialActions::SpecialActions(TQWidget* parent, const char* name)
+ : TQWidget(parent, name),
mReadOnly(false)
{
- QBoxLayout* topLayout = new QVBoxLayout(this, 0, KDialog::spacingHint());
+ TQBoxLayout* topLayout = new TQVBoxLayout(this, 0, KDialog::spacingHint());
// Pre-alarm action
- QLabel* label = new QLabel(i18n("Pre-a&larm action:"), this);
+ TQLabel* label = new TQLabel(i18n("Pre-a&larm action:"), this);
label->setFixedSize(label->sizeHint());
topLayout->addWidget(label, 0, Qt::AlignAuto);
mPreAction = new KLineEdit(this);
label->setBuddy(mPreAction);
- QWhatsThis::add(mPreAction,
+ TQWhatsThis::add(mPreAction,
i18n("Enter a shell command to execute before the alarm is displayed.\n"
"Note that it is executed only when the alarm proper is displayed, not when a reminder or deferred alarm is displayed.\n"
"N.B. KAlarm will wait for the command to complete before displaying the alarm."));
@@ -155,31 +155,31 @@ SpecialActions::SpecialActions(QWidget* parent, const char* name)
topLayout->addSpacing(KDialog::spacingHint());
// Post-alarm action
- label = new QLabel(i18n("Post-alar&m action:"), this);
+ label = new TQLabel(i18n("Post-alar&m action:"), this);
label->setFixedSize(label->sizeHint());
topLayout->addWidget(label, 0, Qt::AlignAuto);
mPostAction = new KLineEdit(this);
label->setBuddy(mPostAction);
- QWhatsThis::add(mPostAction,
+ TQWhatsThis::add(mPostAction,
i18n("Enter a shell command to execute after the alarm window is closed.\n"
"Note that it is not executed after closing a reminder window. If you defer "
"the alarm, it is not executed until the alarm is finally acknowledged or closed."));
topLayout->addWidget(mPostAction);
}
-void SpecialActions::setActions(const QString& pre, const QString& post)
+void SpecialActions::setActions(const TQString& pre, const TQString& post)
{
mPreAction->setText(pre);
mPostAction->setText(post);
}
-QString SpecialActions::preAction() const
+TQString SpecialActions::preAction() const
{
return mPreAction->text();
}
-QString SpecialActions::postAction() const
+TQString SpecialActions::postAction() const
{
return mPostAction->text();
}
diff --git a/kalarm/specialactions.h b/kalarm/specialactions.h
index ba1106d04..4cc7b698d 100644
--- a/kalarm/specialactions.h
+++ b/kalarm/specialactions.h
@@ -22,8 +22,8 @@
#define SPECIALACTIONS_H
#include <kdialogbase.h>
-#include <qwidget.h>
-#include <qpushbutton.h>
+#include <tqwidget.h>
+#include <tqpushbutton.h>
class KLineEdit;
@@ -32,10 +32,10 @@ class SpecialActionsButton : public QPushButton
{
Q_OBJECT
public:
- SpecialActionsButton(const QString& caption, QWidget* parent = 0, const char* name = 0);
- void setActions(const QString& pre, const QString& post);
- const QString& preAction() const { return mPreAction; }
- const QString& postAction() const { return mPostAction; }
+ SpecialActionsButton(const TQString& caption, TQWidget* parent = 0, const char* name = 0);
+ void setActions(const TQString& pre, const TQString& post);
+ const TQString& preAction() const { return mPreAction; }
+ const TQString& postAction() const { return mPostAction; }
virtual void setReadOnly(bool ro) { mReadOnly = ro; }
virtual bool isReadOnly() const { return mReadOnly; }
@@ -46,8 +46,8 @@ class SpecialActionsButton : public QPushButton
void slotButtonPressed();
private:
- QString mPreAction;
- QString mPostAction;
+ TQString mPreAction;
+ TQString mPostAction;
bool mReadOnly;
};
@@ -57,10 +57,10 @@ class SpecialActions : public QWidget
{
Q_OBJECT
public:
- SpecialActions(QWidget* parent = 0, const char* name = 0);
- void setActions(const QString& pre, const QString& post);
- QString preAction() const;
- QString postAction() const;
+ SpecialActions(TQWidget* parent = 0, const char* name = 0);
+ void setActions(const TQString& pre, const TQString& post);
+ TQString preAction() const;
+ TQString postAction() const;
void setReadOnly(bool);
bool isReadOnly() const { return mReadOnly; }
@@ -76,15 +76,15 @@ class SpecialActionsDlg : public KDialogBase
{
Q_OBJECT
public:
- SpecialActionsDlg(const QString& preAction, const QString& postAction,
- const QString& caption, QWidget* parent = 0, const char* name = 0);
- QString preAction() const { return mActions->preAction(); }
- QString postAction() const { return mActions->postAction(); }
+ SpecialActionsDlg(const TQString& preAction, const TQString& postAction,
+ const TQString& caption, TQWidget* parent = 0, const char* name = 0);
+ TQString preAction() const { return mActions->preAction(); }
+ TQString postAction() const { return mActions->postAction(); }
void setReadOnly(bool ro) { mActions->setReadOnly(ro); }
bool isReadOnly() const { return mActions->isReadOnly(); }
protected:
- virtual void resizeEvent(QResizeEvent*);
+ virtual void resizeEvent(TQResizeEvent*);
protected slots:
virtual void slotOk();
diff --git a/kalarm/startdaytimer.cpp b/kalarm/startdaytimer.cpp
index 41ee3bc83..84f0096ce 100644
--- a/kalarm/startdaytimer.cpp
+++ b/kalarm/startdaytimer.cpp
@@ -29,7 +29,7 @@ StartOfDayTimer* StartOfDayTimer::mInstance = 0;
StartOfDayTimer::StartOfDayTimer()
: DailyTimer(Preferences::startOfDay(), false)
{
- Preferences::connect(SIGNAL(startOfDayChanged(const QTime&)), this, SLOT(startOfDayChanged(const QTime&)));
+ Preferences::connect(TQT_SIGNAL(startOfDayChanged(const TQTime&)), this, TQT_SLOT(startOfDayChanged(const TQTime&)));
}
StartOfDayTimer* StartOfDayTimer::instance()
@@ -43,7 +43,7 @@ StartOfDayTimer* StartOfDayTimer::instance()
* Called when the start-of-day time has changed.
* The timer is adjusted and if appropriate timer events are triggered now.
*/
-void StartOfDayTimer::startOfDayChanged(const QTime&)
+void StartOfDayTimer::startOfDayChanged(const TQTime&)
{
changeTime(Preferences::startOfDay(), true);
}
diff --git a/kalarm/startdaytimer.h b/kalarm/startdaytimer.h
index 52f50d8cc..d8a305ac9 100644
--- a/kalarm/startdaytimer.h
+++ b/kalarm/startdaytimer.h
@@ -41,14 +41,14 @@ class StartOfDayTimer : public DailyTimer
* @param receiver Receiving object.
* @param member Slot to activate.
*/
- static void connect(QObject* receiver, const char* member)
+ static void connect(TQObject* receiver, const char* member)
{ instance()->connecT(receiver, member); }
/** Disconnect from the timer signal.
* @param receiver Receiving object.
* @param member Slot to disconnect. If null, all slots belonging to
* @p receiver will be disconnected.
*/
- static void disconnect(QObject* receiver, const char* member = 0)
+ static void disconnect(TQObject* receiver, const char* member = 0)
{ if (mInstance) mInstance->disconnecT(receiver, member); }
protected:
@@ -56,7 +56,7 @@ class StartOfDayTimer : public DailyTimer
static StartOfDayTimer* instance();
private slots:
- void startOfDayChanged(const QTime& oldTime);
+ void startOfDayChanged(const TQTime& oldTime);
private:
static StartOfDayTimer* mInstance; // exists solely to receive signals
diff --git a/kalarm/templatedlg.cpp b/kalarm/templatedlg.cpp
index 917c1ea9f..f586f2e7b 100644
--- a/kalarm/templatedlg.cpp
+++ b/kalarm/templatedlg.cpp
@@ -20,9 +20,9 @@
#include "kalarm.h"
-#include <qlayout.h>
-#include <qpushbutton.h>
-#include <qwhatsthis.h>
+#include <tqlayout.h>
+#include <tqpushbutton.h>
+#include <tqwhatsthis.h>
#include <klocale.h>
#include <kguiitem.h>
@@ -43,51 +43,51 @@ static const char TMPL_DIALOG_NAME[] = "TemplateDialog";
TemplateDlg* TemplateDlg::mInstance = 0;
-TemplateDlg::TemplateDlg(QWidget* parent, const char* name)
+TemplateDlg::TemplateDlg(TQWidget* parent, const char* name)
: KDialogBase(KDialogBase::Plain, i18n("Alarm Templates"), Close, Ok, parent, name, false, true)
{
- QWidget* topWidget = plainPage();
- QBoxLayout* topLayout = new QHBoxLayout(topWidget);
+ TQWidget* topWidget = plainPage();
+ TQBoxLayout* topLayout = new TQHBoxLayout(topWidget);
topLayout->setSpacing(spacingHint());
- QBoxLayout* layout = new QVBoxLayout(topLayout);
+ TQBoxLayout* layout = new TQVBoxLayout(topLayout);
mTemplateList = new TemplateListView(true, i18n("The list of alarm templates"), topWidget);
- mTemplateList->setSelectionMode(QListView::Extended);
- mTemplateList->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding));
- connect(mTemplateList, SIGNAL(selectionChanged()), SLOT(slotSelectionChanged()));
+ mTemplateList->setSelectionMode(TQListView::Extended);
+ mTemplateList->setSizePolicy(TQSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding));
+ connect(mTemplateList, TQT_SIGNAL(selectionChanged()), TQT_SLOT(slotSelectionChanged()));
layout->addWidget(mTemplateList);
- layout = new QVBoxLayout(topLayout);
- QPushButton* button = new QPushButton(i18n("&New..."), topWidget);
- connect(button, SIGNAL(clicked()), SLOT(slotNew()));
- QWhatsThis::add(button, i18n("Create a new alarm template"));
+ layout = new TQVBoxLayout(topLayout);
+ TQPushButton* button = new TQPushButton(i18n("&New..."), topWidget);
+ connect(button, TQT_SIGNAL(clicked()), TQT_SLOT(slotNew()));
+ TQWhatsThis::add(button, i18n("Create a new alarm template"));
layout->addWidget(button);
- mEditButton = new QPushButton(i18n("&Edit..."), topWidget);
- connect(mEditButton, SIGNAL(clicked()), SLOT(slotEdit()));
- QWhatsThis::add(mEditButton, i18n("Edit the currently highlighted alarm template"));
+ mEditButton = new TQPushButton(i18n("&Edit..."), topWidget);
+ connect(mEditButton, TQT_SIGNAL(clicked()), TQT_SLOT(slotEdit()));
+ TQWhatsThis::add(mEditButton, i18n("Edit the currently highlighted alarm template"));
layout->addWidget(mEditButton);
- mCopyButton = new QPushButton(i18n("Co&py"), topWidget);
- connect(mCopyButton, SIGNAL(clicked()), SLOT(slotCopy()));
- QWhatsThis::add(mCopyButton,
+ mCopyButton = new TQPushButton(i18n("Co&py"), topWidget);
+ connect(mCopyButton, TQT_SIGNAL(clicked()), TQT_SLOT(slotCopy()));
+ TQWhatsThis::add(mCopyButton,
i18n("Create a new alarm template based on a copy of the currently highlighted template"));
layout->addWidget(mCopyButton);
- mDeleteButton = new QPushButton(i18n("&Delete"), topWidget);
- connect(mDeleteButton, SIGNAL(clicked()), SLOT(slotDelete()));
- QWhatsThis::add(mDeleteButton, i18n("Delete the currently highlighted alarm template"));
+ mDeleteButton = new TQPushButton(i18n("&Delete"), topWidget);
+ connect(mDeleteButton, TQT_SIGNAL(clicked()), TQT_SLOT(slotDelete()));
+ TQWhatsThis::add(mDeleteButton, i18n("Delete the currently highlighted alarm template"));
layout->addWidget(mDeleteButton);
KAccel* accel = new KAccel(this);
- accel->insert(KStdAccel::SelectAll, mTemplateList, SLOT(slotSelectAll()));
- accel->insert(KStdAccel::Deselect, mTemplateList, SLOT(slotDeselect()));
+ accel->insert(KStdAccel::SelectAll, mTemplateList, TQT_SLOT(slotSelectAll()));
+ accel->insert(KStdAccel::Deselect, mTemplateList, TQT_SLOT(slotDeselect()));
accel->readSettings();
mTemplateList->refresh();
slotSelectionChanged(); // enable/disable buttons as appropriate
- QSize s;
+ TQSize s;
if (KAlarm::readConfigWindowSize(TMPL_DIALOG_NAME, s))
resize(s);
}
@@ -103,7 +103,7 @@ TemplateDlg::~TemplateDlg()
/******************************************************************************
* Create an instance, if none already exists.
*/
-TemplateDlg* TemplateDlg::create(QWidget* parent, const char* name)
+TemplateDlg* TemplateDlg::create(TQWidget* parent, const char* name)
{
if (mInstance)
return 0;
@@ -138,10 +138,10 @@ void TemplateDlg::slotCopy()
* Create a new template.
* If 'event' is non-zero, base the new template on an existing event or template.
*/
-void TemplateDlg::createTemplate(const KAEvent* event, QWidget* parent, TemplateListView* view)
+void TemplateDlg::createTemplate(const KAEvent* event, TQWidget* parent, TemplateListView* view)
{
EditAlarmDlg editDlg(true, i18n("New Alarm Template"), parent, 0, event);
- if (editDlg.exec() == QDialog::Accepted)
+ if (editDlg.exec() == TQDialog::Accepted)
{
KAEvent event;
editDlg.getEvent(event);
@@ -163,11 +163,11 @@ void TemplateDlg::slotEdit()
{
KAEvent event = item->event();
EditAlarmDlg editDlg(true, i18n("Edit Alarm Template"), this, 0, &event);
- if (editDlg.exec() == QDialog::Accepted)
+ if (editDlg.exec() == TQDialog::Accepted)
{
KAEvent newEvent;
editDlg.getEvent(newEvent);
- QString id = event.id();
+ TQString id = event.id();
newEvent.setEventID(id);
// Update the event in the displays and in the calendar file
@@ -183,7 +183,7 @@ void TemplateDlg::slotEdit()
*/
void TemplateDlg::slotDelete()
{
- QValueList<EventListViewItemBase*> items = mTemplateList->selectedItems();
+ TQValueList<EventListViewItemBase*> items = mTemplateList->selectedItems();
int n = items.count();
if (KMessageBox::warningContinueCancel(this, i18n("Do you really want to delete the selected alarm template?",
"Do you really want to delete the %n selected alarm templates?", n),
@@ -193,9 +193,9 @@ void TemplateDlg::slotDelete()
int warnErr = 0;
KAlarm::UpdateStatus status = KAlarm::UPDATE_OK;
- QValueList<KAEvent> events;
+ TQValueList<KAEvent> events;
AlarmCalendar::templateCalendar()->startUpdate(); // prevent multiple saves of the calendar until we're finished
- for (QValueList<EventListViewItemBase*>::Iterator it = items.begin(); it != items.end(); ++it)
+ for (TQValueList<EventListViewItemBase*>::Iterator it = items.begin(); it != items.end(); ++it)
{
TemplateListViewItem* item = (TemplateListViewItem*)(*it);
events.append(item->event());
@@ -233,7 +233,7 @@ void TemplateDlg::slotSelectionChanged()
* Called when the dialog's size has changed.
* Records the new size in the config file.
*/
-void TemplateDlg::resizeEvent(QResizeEvent* re)
+void TemplateDlg::resizeEvent(TQResizeEvent* re)
{
if (isVisible())
KAlarm::writeConfigWindowSize(TMPL_DIALOG_NAME, re->size());
diff --git a/kalarm/templatedlg.h b/kalarm/templatedlg.h
index c93359861..f06f0edc4 100644
--- a/kalarm/templatedlg.h
+++ b/kalarm/templatedlg.h
@@ -31,15 +31,15 @@ class TemplateDlg : public KDialogBase
{
Q_OBJECT
public:
- static TemplateDlg* create(QWidget* parent = 0, const char* name = 0);
+ static TemplateDlg* create(TQWidget* parent = 0, const char* name = 0);
~TemplateDlg();
- static void createTemplate(const KAEvent* = 0, QWidget* parent = 0, TemplateListView* = 0);
+ static void createTemplate(const KAEvent* = 0, TQWidget* parent = 0, TemplateListView* = 0);
signals:
void emptyToggled(bool notEmpty);
protected:
- virtual void resizeEvent(QResizeEvent*);
+ virtual void resizeEvent(TQResizeEvent*);
private slots:
void slotNew();
@@ -49,14 +49,14 @@ class TemplateDlg : public KDialogBase
void slotSelectionChanged();
private:
- TemplateDlg(QWidget* parent, const char* name);
+ TemplateDlg(TQWidget* parent, const char* name);
static TemplateDlg* mInstance; // the current instance, to prevent multiple dialogues
TemplateListView* mTemplateList;
- QPushButton* mEditButton;
- QPushButton* mCopyButton;
- QPushButton* mDeleteButton;
+ TQPushButton* mEditButton;
+ TQPushButton* mCopyButton;
+ TQPushButton* mDeleteButton;
};
#endif // TEMPLATEDLG_H
diff --git a/kalarm/templatelistview.cpp b/kalarm/templatelistview.cpp
index bf1e00850..1c0dd504b 100644
--- a/kalarm/templatelistview.cpp
+++ b/kalarm/templatelistview.cpp
@@ -32,21 +32,21 @@
= Class: TemplateListView
= Displays the list of outstanding alarms.
=============================================================================*/
-QValueList<EventListViewBase*> TemplateListView::mInstanceList;
+TQValueList<EventListViewBase*> TemplateListView::mInstanceList;
-TemplateListView::TemplateListView(bool includeCmdAlarms, const QString& whatsThisText, QWidget* parent, const char* name)
+TemplateListView::TemplateListView(bool includeCmdAlarms, const TQString& whatsThisText, TQWidget* parent, const char* name)
: EventListViewBase(parent, name),
mWhatsThisText(whatsThisText),
mIconColumn(0),
mNameColumn(1),
mExcludeCmdAlarms(!includeCmdAlarms)
{
- addColumn(QString::null); // icon column
+ addColumn(TQString::null); // icon column
addLastColumn(i18n("Name"));
setSorting(mNameColumn); // sort initially by name
setColumnAlignment(mIconColumn, Qt::AlignHCenter);
- setColumnWidthMode(mIconColumn, QListView::Maximum);
+ setColumnWidthMode(mIconColumn, TQListView::Maximum);
mInstanceList.append(this);
}
@@ -61,8 +61,8 @@ TemplateListView::~TemplateListView()
*/
void TemplateListView::populate()
{
- QValueList<KAEvent> templates = KAlarm::templateList();
- for (QValueList<KAEvent>::Iterator it = templates.begin(); it != templates.end(); ++it)
+ TQValueList<KAEvent> templates = KAlarm::templateList();
+ for (TQValueList<KAEvent>::Iterator it = templates.begin(); it != templates.end(); ++it)
addEntry(*it);
}
@@ -75,9 +75,9 @@ EventListViewItemBase* TemplateListView::createItem(const KAEvent& event)
}
/******************************************************************************
-* Returns the QWhatsThis text for a specified column.
+* Returns the TQWhatsThis text for a specified column.
*/
-QString TemplateListView::whatsThisText(int column) const
+TQString TemplateListView::whatsThisText(int column) const
{
if (column == mIconColumn)
return i18n("Alarm type");
@@ -113,7 +113,7 @@ TemplateListViewItem::TemplateListViewItem(TemplateListView* parent, const KAEve
/******************************************************************************
* Return the alarm summary text.
*/
-QString TemplateListViewItem::lastColumnText() const
+TQString TemplateListViewItem::lastColumnText() const
{
return event().templateName();
}
@@ -121,7 +121,7 @@ QString TemplateListViewItem::lastColumnText() const
/******************************************************************************
* Return the column sort order for one item in the list.
*/
-QString TemplateListViewItem::key(int column, bool) const
+TQString TemplateListViewItem::key(int column, bool) const
{
TemplateListView* listView = templateListView();
if (column == listView->iconColumn())
diff --git a/kalarm/templatelistview.h b/kalarm/templatelistview.h
index f420641b9..0a629eb36 100644
--- a/kalarm/templatelistview.h
+++ b/kalarm/templatelistview.h
@@ -23,7 +23,7 @@
#include "kalarm.h"
-#include <qmap.h>
+#include <tqmap.h>
#include <klistview.h>
#include "eventlistviewbase.h"
@@ -37,12 +37,12 @@ class TemplateListViewItem : public EventListViewItemBase
TemplateListViewItem(TemplateListView* parent, const KAEvent&);
TemplateListView* templateListView() const { return (TemplateListView*)listView(); }
// Overridden base class methods
- TemplateListViewItem* nextSibling() const { return (TemplateListViewItem*)QListViewItem::nextSibling(); }
- virtual QString key(int column, bool ascending) const;
+ TemplateListViewItem* nextSibling() const { return (TemplateListViewItem*)TQListViewItem::nextSibling(); }
+ virtual TQString key(int column, bool ascending) const;
protected:
- virtual QString lastColumnText() const;
+ virtual TQString lastColumnText() const;
private:
- QString mIconOrder; // controls ordering of icon column
+ TQString mIconOrder; // controls ordering of icon column
};
@@ -50,7 +50,7 @@ class TemplateListView : public EventListViewBase
{
Q_OBJECT
public:
- explicit TemplateListView(bool includeCmdAlarms, const QString& whatsThisText, QWidget* parent = 0, const char* name = 0);
+ explicit TemplateListView(bool includeCmdAlarms, const TQString& whatsThisText, TQWidget* parent = 0, const char* name = 0);
~TemplateListView();
int iconColumn() const { return mIconColumn; }
int nameColumn() const { return mNameColumn; }
@@ -59,26 +59,26 @@ class TemplateListView : public EventListViewBase
{ EventListViewBase::addEvent(e, mInstanceList, v); }
static void modifyEvent(const KAEvent& e, EventListViewBase* v)
{ EventListViewBase::modifyEvent(e.id(), e, mInstanceList, v); }
- static void modifyEvent(const QString& oldEventID, const KAEvent& newEvent, EventListViewBase* v)
+ static void modifyEvent(const TQString& oldEventID, const KAEvent& newEvent, EventListViewBase* v)
{ EventListViewBase::modifyEvent(oldEventID, newEvent, mInstanceList, v); }
- static void deleteEvent(const QString& eventID)
+ static void deleteEvent(const TQString& eventID)
{ EventListViewBase::deleteEvent(eventID, mInstanceList); }
- TemplateListViewItem* getEntry(const QString& eventID) { return (TemplateListViewItem*)EventListViewBase::getEntry(eventID); }
+ TemplateListViewItem* getEntry(const TQString& eventID) { return (TemplateListViewItem*)EventListViewBase::getEntry(eventID); }
TemplateListViewItem* selectedItem() const { return (TemplateListViewItem*)EventListViewBase::selectedItem(); }
TemplateListViewItem* currentItem() const { return (TemplateListViewItem*)EventListViewBase::currentItem(); }
TemplateListViewItem* firstChild() const { return (TemplateListViewItem*)EventListViewBase::firstChild(); }
- virtual void setSelected(QListViewItem* item, bool selected) { EventListViewBase::setSelected(item, selected); }
+ virtual void setSelected(TQListViewItem* item, bool selected) { EventListViewBase::setSelected(item, selected); }
virtual void setSelected(TemplateListViewItem* item, bool selected) { EventListViewBase::setSelected(item, selected); }
- virtual QValueList<EventListViewBase*> instances() { return mInstanceList; }
+ virtual TQValueList<EventListViewBase*> instances() { return mInstanceList; }
protected:
virtual void populate();
EventListViewItemBase* createItem(const KAEvent&);
- virtual QString whatsThisText(int column) const;
+ virtual TQString whatsThisText(int column) const;
private:
- static QValueList<EventListViewBase*> mInstanceList;
- QString mWhatsThisText; // default QWhatsThis text
+ static TQValueList<EventListViewBase*> mInstanceList;
+ TQString mWhatsThisText; // default TQWhatsThis text
int mIconColumn; // index to icon column
int mNameColumn; // index to template name column
bool mExcludeCmdAlarms; // omit command alarms from the list
diff --git a/kalarm/templatemenuaction.cpp b/kalarm/templatemenuaction.cpp
index dae3bc127..7f61d6f9b 100644
--- a/kalarm/templatemenuaction.cpp
+++ b/kalarm/templatemenuaction.cpp
@@ -30,14 +30,14 @@
#include "templatemenuaction.moc"
-TemplateMenuAction::TemplateMenuAction(const QString& label, const QString& icon, QObject* receiver,
+TemplateMenuAction::TemplateMenuAction(const TQString& label, const TQString& icon, TQObject* receiver,
const char* slot, KActionCollection* actions, const char* name)
: KActionMenu(label, icon, actions, name)
{
setDelayed(false);
- connect(popupMenu(), SIGNAL(aboutToShow()), SLOT(slotInitMenu()));
- connect(popupMenu(), SIGNAL(activated(int)), SLOT(slotSelected(int)));
- connect(this, SIGNAL(selected(const KAEvent&)), receiver, slot);
+ connect(popupMenu(), TQT_SIGNAL(aboutToShow()), TQT_SLOT(slotInitMenu()));
+ connect(popupMenu(), TQT_SIGNAL(activated(int)), TQT_SLOT(slotSelected(int)));
+ connect(this, TQT_SIGNAL(selected(const KAEvent&)), receiver, slot);
}
/******************************************************************************
@@ -49,18 +49,18 @@ void TemplateMenuAction::slotInitMenu()
KPopupMenu* menu = popupMenu();
menu->clear();
mOriginalTexts.clear();
- QValueList<KAEvent> templates = KAlarm::templateList();
- for (QValueList<KAEvent>::ConstIterator it = templates.constBegin(); it != templates.constEnd(); ++it)
+ TQValueList<KAEvent> templates = KAlarm::templateList();
+ for (TQValueList<KAEvent>::ConstIterator it = templates.constBegin(); it != templates.constEnd(); ++it)
{
- QString name = (*it).templateName();
+ TQString name = (*it).templateName();
// Insert the template in sorted order
- QStringList::Iterator tit;
+ TQStringList::Iterator tit;
for (tit = mOriginalTexts.begin();
- tit != mOriginalTexts.end() && QString::localeAwareCompare(name, *tit) > 0;
+ tit != mOriginalTexts.end() && TQString::localeAwareCompare(name, *tit) > 0;
++tit);
mOriginalTexts.insert(tit, name);
}
- for (QStringList::ConstIterator tit = mOriginalTexts.constBegin(); tit != mOriginalTexts.constEnd(); ++tit)
+ for (TQStringList::ConstIterator tit = mOriginalTexts.constBegin(); tit != mOriginalTexts.constEnd(); ++tit)
menu->insertItem(*tit);
}
@@ -71,7 +71,7 @@ void TemplateMenuAction::slotInitMenu()
void TemplateMenuAction::slotSelected(int id)
{
KPopupMenu* menu = popupMenu();
- QString item = mOriginalTexts[menu->indexOf(id)];
+ TQString item = mOriginalTexts[menu->indexOf(id)];
if (!item.isEmpty())
{
AlarmCalendar* cal = AlarmCalendar::templateCalendarOpen();
diff --git a/kalarm/templatemenuaction.h b/kalarm/templatemenuaction.h
index 20d9f30a1..de7151982 100644
--- a/kalarm/templatemenuaction.h
+++ b/kalarm/templatemenuaction.h
@@ -29,7 +29,7 @@ class TemplateMenuAction : public KActionMenu
{
Q_OBJECT
public:
- TemplateMenuAction(const QString& label, const QString& icon, QObject* receiver,
+ TemplateMenuAction(const TQString& label, const TQString& icon, TQObject* receiver,
const char* slot, KActionCollection* parent, const char* name = 0);
signals:
@@ -40,7 +40,7 @@ class TemplateMenuAction : public KActionMenu
void slotSelected(int id);
private:
- QStringList mOriginalTexts; // menu item texts without added ampersands
+ TQStringList mOriginalTexts; // menu item texts without added ampersands
};
#endif // TEMPLATEMENUACTION_H
diff --git a/kalarm/templatepickdlg.cpp b/kalarm/templatepickdlg.cpp
index 50ec2b6e9..3df2d8dd7 100644
--- a/kalarm/templatepickdlg.cpp
+++ b/kalarm/templatepickdlg.cpp
@@ -20,8 +20,8 @@
#include "kalarm.h"
-#include <qlayout.h>
-#include <qwhatsthis.h>
+#include <tqlayout.h>
+#include <tqwhatsthis.h>
#include <klocale.h>
#include <kdebug.h>
@@ -34,26 +34,26 @@
static const char TMPL_PICK_DIALOG_NAME[] = "TemplatePickDialog";
-TemplatePickDlg::TemplatePickDlg(QWidget* parent, const char* name)
+TemplatePickDlg::TemplatePickDlg(TQWidget* parent, const char* name)
: KDialogBase(KDialogBase::Plain, i18n("Choose Alarm Template"), Ok|Cancel, Ok, parent, name)
{
- QWidget* topWidget = plainPage();
- QBoxLayout* topLayout = new QVBoxLayout(topWidget);
+ TQWidget* topWidget = plainPage();
+ TQBoxLayout* topLayout = new TQVBoxLayout(topWidget);
topLayout->setSpacing(spacingHint());
// Display the list of templates, but exclude command alarms if in kiosk mode.
bool includeCmdAlarms = ShellProcess::authorised();
mTemplateList = new TemplateListView(includeCmdAlarms, i18n("Select a template to base the new alarm on."), topWidget, "list");
- mTemplateList->setSelectionMode(QListView::Single);
+ mTemplateList->setSelectionMode(TQListView::Single);
mTemplateList->refresh(); // populate the template list
- connect(mTemplateList, SIGNAL(selectionChanged()), SLOT(slotSelectionChanged()));
+ connect(mTemplateList, TQT_SIGNAL(selectionChanged()), TQT_SLOT(slotSelectionChanged()));
// Require a real double click (even if KDE is in single-click mode) to accept the selection
- connect(mTemplateList, SIGNAL(doubleClicked(QListViewItem*, const QPoint&, int)), SLOT(slotOk()));
+ connect(mTemplateList, TQT_SIGNAL(doubleClicked(TQListViewItem*, const TQPoint&, int)), TQT_SLOT(slotOk()));
topLayout->addWidget(mTemplateList);
slotSelectionChanged(); // enable or disable the OK button
- QSize s;
+ TQSize s;
if (KAlarm::readConfigWindowSize(TMPL_PICK_DIALOG_NAME, s))
resize(s);
}
@@ -79,7 +79,7 @@ void TemplatePickDlg::slotSelectionChanged()
* Called when the dialog's size has changed.
* Records the new size in the config file.
*/
-void TemplatePickDlg::resizeEvent(QResizeEvent* re)
+void TemplatePickDlg::resizeEvent(TQResizeEvent* re)
{
if (isVisible())
KAlarm::writeConfigWindowSize(TMPL_PICK_DIALOG_NAME, re->size());
diff --git a/kalarm/templatepickdlg.h b/kalarm/templatepickdlg.h
index 9bc97bfae..2f003d91a 100644
--- a/kalarm/templatepickdlg.h
+++ b/kalarm/templatepickdlg.h
@@ -30,10 +30,10 @@ class TemplatePickDlg : public KDialogBase
{
Q_OBJECT
public:
- TemplatePickDlg(QWidget* parent = 0, const char* name = 0);
+ TemplatePickDlg(TQWidget* parent = 0, const char* name = 0);
const KAEvent* selectedTemplate() const;
protected:
- virtual void resizeEvent(QResizeEvent*);
+ virtual void resizeEvent(TQResizeEvent*);
private slots:
void slotSelectionChanged();
private:
diff --git a/kalarm/timeselector.cpp b/kalarm/timeselector.cpp
index 0bfc142de..9ec5c9813 100644
--- a/kalarm/timeselector.cpp
+++ b/kalarm/timeselector.cpp
@@ -20,10 +20,10 @@
#include "kalarm.h"
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qhbox.h>
-#include <qwhatsthis.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqhbox.h>
+#include <tqwhatsthis.h>
#include <klocale.h>
#include <kdialog.h>
@@ -33,35 +33,35 @@
#include "timeselector.moc"
-TimeSelector::TimeSelector(const QString& selectText, const QString& postfix, const QString& selectWhatsThis,
- const QString& valueWhatsThis, bool allowHourMinute, QWidget* parent, const char* name)
- : QFrame(parent, name),
+TimeSelector::TimeSelector(const TQString& selectText, const TQString& postfix, const TQString& selectWhatsThis,
+ const TQString& valueWhatsThis, bool allowHourMinute, TQWidget* parent, const char* name)
+ : TQFrame(parent, name),
mLabel(0),
mReadOnly(false)
{
- setFrameStyle(QFrame::NoFrame);
- QVBoxLayout* topLayout = new QVBoxLayout(this, 0, KDialog::spacingHint());
- QHBoxLayout* layout = new QHBoxLayout(topLayout, KDialog::spacingHint());
+ setFrameStyle(TQFrame::NoFrame);
+ TQVBoxLayout* topLayout = new TQVBoxLayout(this, 0, KDialog::spacingHint());
+ TQHBoxLayout* layout = new TQHBoxLayout(topLayout, KDialog::spacingHint());
mSelect = new CheckBox(selectText, this);
mSelect->setFixedSize(mSelect->sizeHint());
- connect(mSelect, SIGNAL(toggled(bool)), SLOT(selectToggled(bool)));
- QWhatsThis::add(mSelect, selectWhatsThis);
+ connect(mSelect, TQT_SIGNAL(toggled(bool)), TQT_SLOT(selectToggled(bool)));
+ TQWhatsThis::add(mSelect, selectWhatsThis);
layout->addWidget(mSelect);
- QHBox* box = new QHBox(this); // to group widgets for QWhatsThis text
+ TQHBox* box = new TQHBox(this); // to group widgets for TQWhatsThis text
box->setSpacing(KDialog::spacingHint());
layout->addWidget(box);
mPeriod = new TimePeriod(allowHourMinute, box);
mPeriod->setFixedSize(mPeriod->sizeHint());
mPeriod->setSelectOnStep(false);
- connect(mPeriod, SIGNAL(valueChanged(int)), SLOT(periodChanged(int)));
+ connect(mPeriod, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(periodChanged(int)));
mSelect->setFocusWidget(mPeriod);
mPeriod->setEnabled(false);
if (!postfix.isEmpty())
{
- mLabel = new QLabel(postfix, box);
- QWhatsThis::add(box, valueWhatsThis);
+ mLabel = new TQLabel(postfix, box);
+ TQWhatsThis::add(box, valueWhatsThis);
mLabel->setEnabled(false);
}
}
diff --git a/kalarm/timeselector.h b/kalarm/timeselector.h
index 9ba66c098..5c9ca7d56 100644
--- a/kalarm/timeselector.h
+++ b/kalarm/timeselector.h
@@ -21,7 +21,7 @@
#ifndef TIMESELECTOR_H
#define TIMESELECTOR_H
-#include <qframe.h>
+#include <tqframe.h>
#include "timeperiod.h"
class QLabel;
@@ -32,8 +32,8 @@ class TimeSelector : public QFrame
{
Q_OBJECT
public:
- TimeSelector(const QString& selectText, const QString& postfix, const QString& selectWhatsThis,
- const QString& valueWhatsThis, bool allowHourMinute, QWidget* parent, const char* name = 0);
+ TimeSelector(const TQString& selectText, const TQString& postfix, const TQString& selectWhatsThis,
+ const TQString& valueWhatsThis, bool allowHourMinute, TQWidget* parent, const char* name = 0);
bool isChecked() const;
void setChecked(bool on);
int minutes() const;
@@ -54,7 +54,7 @@ class TimeSelector : public QFrame
private:
CheckBox* mSelect;
TimePeriod* mPeriod;
- QLabel* mLabel;
+ TQLabel* mLabel;
bool mReadOnly; // the widget is read only
};
diff --git a/kalarm/traywindow.cpp b/kalarm/traywindow.cpp
index e968e02ba..14ee6bf4a 100644
--- a/kalarm/traywindow.cpp
+++ b/kalarm/traywindow.cpp
@@ -22,7 +22,7 @@
#include <stdlib.h>
-#include <qtooltip.h>
+#include <tqtooltip.h>
#include <kapplication.h>
#include <klocale.h>
@@ -53,16 +53,16 @@
class TrayTooltip : public QToolTip
{
public:
- TrayTooltip(QWidget* parent) : QToolTip(parent) { }
+ TrayTooltip(TQWidget* parent) : TQToolTip(parent) { }
virtual ~TrayTooltip() {}
protected:
- virtual void maybeTip(const QPoint&);
+ virtual void maybeTip(const TQPoint&);
};
struct TipItem
{
- QDateTime dateTime;
- QString text;
+ TQDateTime dateTime;
+ TQString text;
};
@@ -87,16 +87,16 @@ TrayWindow::TrayWindow(MainWindow* parent, const char* name)
KActionCollection* actcol = actionCollection();
AlarmEnableAction* a = Daemon::createAlarmEnableAction(actcol, "tAlarmEnable");
a->plug(contextMenu());
- connect(a, SIGNAL(switched(bool)), SLOT(setEnabledStatus(bool)));
- KAlarm::createNewAlarmAction(i18n("&New Alarm..."), this, SLOT(slotNewAlarm()), actcol, "tNew")->plug(contextMenu());
- KAlarm::createNewFromTemplateAction(i18n("New Alarm From &Template"), this, SLOT(slotNewFromTemplate(const KAEvent&)), actcol, "tNewFromTempl")->plug(contextMenu());
- KStdAction::preferences(this, SLOT(slotPreferences()), actcol)->plug(contextMenu());
+ connect(a, TQT_SIGNAL(switched(bool)), TQT_SLOT(setEnabledStatus(bool)));
+ KAlarm::createNewAlarmAction(i18n("&New Alarm..."), this, TQT_SLOT(slotNewAlarm()), actcol, "tNew")->plug(contextMenu());
+ KAlarm::createNewFromTemplateAction(i18n("New Alarm From &Template"), this, TQT_SLOT(slotNewFromTemplate(const KAEvent&)), actcol, "tNewFromTempl")->plug(contextMenu());
+ KStdAction::preferences(this, TQT_SLOT(slotPreferences()), actcol)->plug(contextMenu());
// Replace the default handler for the Quit context menu item
const char* quitName = KStdAction::name(KStdAction::Quit);
actcol->remove(actcol->action(quitName));
actcol->accel()->remove(quitName);
- KStdAction::quit(this, SLOT(slotQuit()), actcol);
+ KStdAction::quit(this, TQT_SLOT(slotQuit()), actcol);
// Set icon to correspond with the alarms enabled menu status
Daemon::checkStatus();
@@ -171,7 +171,7 @@ void TrayWindow::setEnabledStatus(bool status)
* A left click displays the KAlarm main window.
* A middle button click displays the New Alarm window.
*/
-void TrayWindow::mousePressEvent(QMouseEvent* e)
+void TrayWindow::mousePressEvent(TQMouseEvent* e)
{
if (e->button() == LeftButton && !theApp()->wantRunInSystemTray())
{
@@ -189,7 +189,7 @@ void TrayWindow::mousePressEvent(QMouseEvent* e)
* The main window (if not hidden) is raised and made the active window.
* If this is done in mousePressEvent(), it doesn't work.
*/
-void TrayWindow::mouseReleaseEvent(QMouseEvent* e)
+void TrayWindow::mouseReleaseEvent(TQMouseEvent* e)
{
if (e->button() == LeftButton && mAssocMainWindow && mAssocMainWindow->isVisible())
{
@@ -203,7 +203,7 @@ void TrayWindow::mouseReleaseEvent(QMouseEvent* e)
/******************************************************************************
* Called when the drag cursor enters the panel icon.
*/
-void TrayWindow::dragEnterEvent(QDragEnterEvent* e)
+void TrayWindow::dragEnterEvent(TQDragEnterEvent* e)
{
MainWindow::executeDragEnterEvent(e);
}
@@ -212,7 +212,7 @@ void TrayWindow::dragEnterEvent(QDragEnterEvent* e)
* Called when an object is dropped on the panel icon.
* If the object is recognised, the edit alarm dialog is opened appropriately.
*/
-void TrayWindow::dropEvent(QDropEvent* e)
+void TrayWindow::dropEvent(TQDropEvent* e)
{
MainWindow::executeDropEvent(0, e);
}
@@ -221,16 +221,16 @@ void TrayWindow::dropEvent(QDropEvent* e)
* Return the tooltip text showing alarms due in the next 24 hours.
* The limit of 24 hours is because only times, not dates, are displayed.
*/
-void TrayWindow::tooltipAlarmText(QString& text) const
+void TrayWindow::tooltipAlarmText(TQString& text) const
{
KAEvent event;
- const QString& prefix = Preferences::tooltipTimeToPrefix();
+ const TQString& prefix = Preferences::tooltipTimeToPrefix();
int maxCount = Preferences::tooltipAlarmCount();
- QDateTime now = QDateTime::currentDateTime();
+ TQDateTime now = TQDateTime::currentDateTime();
// Get today's and tomorrow's alarms, sorted in time order
- QValueList<TipItem> items;
- QValueList<TipItem>::Iterator iit;
+ TQValueList<TipItem> items;
+ TQValueList<TipItem>::Iterator iit;
KCal::Event::List events = AlarmCalendar::activeCalendar()->eventsWithAlarms(now.date(), now.addDays(1));
for (KCal::Event::List::ConstIterator it = events.begin(); it != events.end(); ++it)
{
@@ -346,10 +346,10 @@ bool TrayWindow::inSystemTray() const
/******************************************************************************
* Displays the appropriate tooltip depending on preference settings.
*/
-void TrayTooltip::maybeTip(const QPoint&)
+void TrayTooltip::maybeTip(const TQPoint&)
{
TrayWindow* parent = (TrayWindow*)parentWidget();
- QString text;
+ TQString text;
if (Daemon::monitoringAlarms())
text = kapp->aboutData()->programName();
else
diff --git a/kalarm/traywindow.h b/kalarm/traywindow.h
index e2e2d5d95..7ca5c6e60 100644
--- a/kalarm/traywindow.h
+++ b/kalarm/traywindow.h
@@ -21,7 +21,7 @@
#ifndef TRAYWINDOW_H
#define TRAYWINDOW_H
-#include <qpixmap.h>
+#include <tqpixmap.h>
#include <ksystemtray.h>
class KPopupMenu;
@@ -39,7 +39,7 @@ class TrayWindow : public KSystemTray
MainWindow* assocMainWindow() const { return mAssocMainWindow; }
void setAssocMainWindow(MainWindow* win) { mAssocMainWindow = win; }
bool inSystemTray() const;
- void tooltipAlarmText(QString& text) const;
+ void tooltipAlarmText(TQString& text) const;
public slots:
void slotQuit();
@@ -49,10 +49,10 @@ class TrayWindow : public KSystemTray
protected:
virtual void contextMenuAboutToShow(KPopupMenu*);
- virtual void mousePressEvent(QMouseEvent*);
- virtual void mouseReleaseEvent(QMouseEvent*);
- virtual void dragEnterEvent(QDragEnterEvent*);
- virtual void dropEvent(QDropEvent*);
+ virtual void mousePressEvent(TQMouseEvent*);
+ virtual void mouseReleaseEvent(TQMouseEvent*);
+ virtual void dragEnterEvent(TQDragEnterEvent*);
+ virtual void dropEvent(TQDropEvent*);
private slots:
void slotNewAlarm();
@@ -64,7 +64,7 @@ class TrayWindow : public KSystemTray
friend class TrayTooltip;
MainWindow* mAssocMainWindow; // main window associated with this, or null
- QPixmap mPixmapEnabled, mPixmapDisabled;
+ TQPixmap mPixmapEnabled, mPixmapDisabled;
TrayTooltip* mTooltip;
};
diff --git a/kalarm/undo.cpp b/kalarm/undo.cpp
index bab085ae3..8d6a46a32 100644
--- a/kalarm/undo.cpp
+++ b/kalarm/undo.cpp
@@ -20,8 +20,8 @@
#include "kalarm.h"
-#include <qobject.h>
-#include <qstringlist.h>
+#include <tqobject.h>
+#include <tqstringlist.h>
#include <kapplication.h>
#include <klocale.h>
@@ -44,18 +44,18 @@ class UndoItem
UndoItem(); // needed by QValueList
virtual ~UndoItem();
virtual Operation operation() const = 0;
- virtual QString actionText() const = 0;
- virtual QString description() const { return QString::null; }
- virtual QString eventID() const { return QString::null; }
- virtual QString oldEventID() const { return QString::null; }
- virtual QString newEventID() const { return QString::null; }
+ virtual TQString actionText() const = 0;
+ virtual TQString description() const { return TQString::null; }
+ virtual TQString eventID() const { return TQString::null; }
+ virtual TQString oldEventID() const { return TQString::null; }
+ virtual TQString newEventID() const { return TQString::null; }
int id() const { return mId; }
Undo::Type type() const { return mType; }
void setType(Undo::Type t) { mType = t; }
KAEvent::Status calendar() const { return mCalendar; }
virtual void setCalendar(KAEvent::Status s) { mCalendar = s; }
virtual UndoItem* restore() = 0;
- virtual bool deleteID(const QString& /*id*/) { return false; }
+ virtual bool deleteID(const TQString& /*id*/) { return false; }
enum Error { ERR_NONE, ERR_PROG, ERR_NOT_FOUND, ERR_CREATE, ERR_TEMPLATE, ERR_EXPIRED };
enum Warning { WARN_NONE, WARN_KORG_ADD, WARN_KORG_MODIFY, WARN_KORG_DELETE };
@@ -66,8 +66,8 @@ class UndoItem
protected:
UndoItem(Undo::Type);
- static QString addDeleteActionText(KAEvent::Status, bool add);
- QString description(const KAEvent&) const;
+ static TQString addDeleteActionText(KAEvent::Status, bool add);
+ TQString description(const KAEvent&) const;
void replaceWith(UndoItem* item) { Undo::replace(this, item); }
int mId; // unique identifier (only for mType = UNDO, REDO)
@@ -89,11 +89,11 @@ class UndoMultiBase : public UndoItem
template <class T> class UndoMulti : public UndoMultiBase
{
public:
- UndoMulti(Undo::Type, const QValueList<KAEvent>&);
+ UndoMulti(Undo::Type, const TQValueList<KAEvent>&);
UndoMulti(Undo::Type t, Undo::List& undos) : UndoMultiBase(t, undos) { }
virtual Operation operation() const { return MULTI; }
virtual UndoItem* restore();
- virtual bool deleteID(const QString& id);
+ virtual bool deleteID(const TQString& id);
virtual UndoItem* createRedo(Undo::List&) = 0;
};
@@ -103,35 +103,35 @@ class UndoAdd : public UndoItem
UndoAdd(Undo::Type, const KAEvent&);
UndoAdd(Undo::Type, const KAEvent&, KAEvent::Status);
virtual Operation operation() const { return ADD; }
- virtual QString actionText() const;
- virtual QString description() const { return mDescription; }
- virtual QString eventID() const { return mEventID; }
- virtual QString newEventID() const { return mEventID; }
+ virtual TQString actionText() const;
+ virtual TQString description() const { return mDescription; }
+ virtual TQString eventID() const { return mEventID; }
+ virtual TQString newEventID() const { return mEventID; }
virtual UndoItem* restore() { return doRestore(); }
protected:
UndoItem* doRestore(bool setArchive = false);
virtual UndoItem* createRedo(const KAEvent&);
private:
- QString mEventID;
- QString mDescription;
+ TQString mEventID;
+ TQString mDescription;
};
class UndoEdit : public UndoItem
{
public:
- UndoEdit(Undo::Type, const KAEvent& oldEvent, const QString& newEventID, const QString& description);
+ UndoEdit(Undo::Type, const KAEvent& oldEvent, const TQString& newEventID, const TQString& description);
~UndoEdit();
virtual Operation operation() const { return EDIT; }
- virtual QString actionText() const;
- virtual QString description() const { return mDescription; }
- virtual QString eventID() const { return mNewEventID; }
- virtual QString oldEventID() const { return mOldEvent->id(); }
- virtual QString newEventID() const { return mNewEventID; }
+ virtual TQString actionText() const;
+ virtual TQString description() const { return mDescription; }
+ virtual TQString eventID() const { return mNewEventID; }
+ virtual TQString oldEventID() const { return mOldEvent->id(); }
+ virtual TQString newEventID() const { return mNewEventID; }
virtual UndoItem* restore();
private:
KAEvent* mOldEvent;
- QString mNewEventID;
- QString mDescription;
+ TQString mNewEventID;
+ TQString mDescription;
};
class UndoDelete : public UndoItem
@@ -140,10 +140,10 @@ class UndoDelete : public UndoItem
UndoDelete(Undo::Type, const KAEvent&);
~UndoDelete();
virtual Operation operation() const { return DELETE; }
- virtual QString actionText() const;
- virtual QString description() const { return UndoItem::description(*mEvent); }
- virtual QString eventID() const { return mEvent->id(); }
- virtual QString oldEventID() const { return mEvent->id(); }
+ virtual TQString actionText() const;
+ virtual TQString description() const { return UndoItem::description(*mEvent); }
+ virtual TQString eventID() const { return mEvent->id(); }
+ virtual TQString oldEventID() const { return mEvent->id(); }
virtual UndoItem* restore();
KAEvent* event() const { return mEvent; }
protected:
@@ -157,7 +157,7 @@ class UndoReactivate : public UndoAdd
public:
UndoReactivate(Undo::Type t, const KAEvent& e) : UndoAdd(t, e, KAEvent::ACTIVE) { }
virtual Operation operation() const { return REACTIVATE; }
- virtual QString actionText() const;
+ virtual TQString actionText() const;
virtual UndoItem* restore();
protected:
virtual UndoItem* createRedo(const KAEvent&);
@@ -168,7 +168,7 @@ class UndoDeactivate : public UndoDelete
public:
UndoDeactivate(Undo::Type t, const KAEvent& e) : UndoDelete(t, e) { }
virtual Operation operation() const { return DEACTIVATE; }
- virtual QString actionText() const;
+ virtual TQString actionText() const;
virtual UndoItem* restore();
protected:
virtual UndoItem* createRedo(const KAEvent&);
@@ -177,22 +177,22 @@ class UndoDeactivate : public UndoDelete
class UndoDeletes : public UndoMulti<UndoDelete>
{
public:
- UndoDeletes(Undo::Type t, const QValueList<KAEvent>& events)
+ UndoDeletes(Undo::Type t, const TQValueList<KAEvent>& events)
: UndoMulti<UndoDelete>(t, events) { } // UNDO only
UndoDeletes(Undo::Type t, Undo::List& undos)
: UndoMulti<UndoDelete>(t, undos) { }
- virtual QString actionText() const;
+ virtual TQString actionText() const;
virtual UndoItem* createRedo(Undo::List&);
};
class UndoReactivates : public UndoMulti<UndoReactivate>
{
public:
- UndoReactivates(Undo::Type t, const QValueList<KAEvent>& events)
+ UndoReactivates(Undo::Type t, const TQValueList<KAEvent>& events)
: UndoMulti<UndoReactivate>(t, events) { } // UNDO only
UndoReactivates(Undo::Type t, Undo::List& undos)
: UndoMulti<UndoReactivate>(t, undos) { }
- virtual QString actionText() const;
+ virtual TQString actionText() const;
virtual UndoItem* createRedo(Undo::List&);
};
@@ -252,7 +252,7 @@ void Undo::saveDelete(const KAEvent& event)
emitChanged();
}
-void Undo::saveDeletes(const QValueList<KAEvent>& events)
+void Undo::saveDeletes(const TQValueList<KAEvent>& events)
{
int count = events.count();
if (count == 1)
@@ -260,7 +260,7 @@ void Undo::saveDeletes(const QValueList<KAEvent>& events)
else if (count > 1)
{
new UndoDeletes(UNDO, events);
- for (QValueList<KAEvent>::ConstIterator it = events.begin(); it != events.end(); ++it)
+ for (TQValueList<KAEvent>::ConstIterator it = events.begin(); it != events.end(); ++it)
removeRedos((*it).id()); // remove any redos which are made invalid by these deletions
emitChanged();
}
@@ -272,7 +272,7 @@ void Undo::saveReactivate(const KAEvent& event)
emitChanged();
}
-void Undo::saveReactivates(const QValueList<KAEvent>& events)
+void Undo::saveReactivates(const TQValueList<KAEvent>& events)
{
int count = events.count();
if (count == 1)
@@ -287,9 +287,9 @@ void Undo::saveReactivates(const QValueList<KAEvent>& events)
/******************************************************************************
* Remove any redos which are made invalid by a new undo.
*/
-void Undo::removeRedos(const QString& eventID)
+void Undo::removeRedos(const TQString& eventID)
{
- QString id = eventID;
+ TQString id = eventID;
for (Iterator it = mRedoList.begin(); it != mRedoList.end(); )
{
UndoItem* item = *it;
@@ -320,7 +320,7 @@ void Undo::removeRedos(const QString& eventID)
* Undo or redo a specified item.
* Reply = true if success, or if the item no longer exists.
*/
-bool Undo::undo(Undo::Iterator it, Undo::Type type, QWidget* parent, const QString& action)
+bool Undo::undo(Undo::Iterator it, Undo::Type type, TQWidget* parent, const TQString& action)
{
UndoItem::mRestoreError = UndoItem::ERR_NONE;
UndoItem::mRestoreWarning = UndoItem::WARN_NONE;
@@ -332,7 +332,7 @@ bool Undo::undo(Undo::Iterator it, Undo::Type type, QWidget* parent, const QStri
emitChanged();
}
- QString err;
+ TQString err;
switch (UndoItem::mRestoreError)
{
case UndoItem::ERR_NONE:
@@ -416,28 +416,28 @@ void Undo::replace(UndoItem* old, UndoItem* New)
/******************************************************************************
* Return the action description of the latest undo/redo item.
*/
-QString Undo::actionText(Undo::Type type)
+TQString Undo::actionText(Undo::Type type)
{
List* list = (type == UNDO) ? &mUndoList : (type == REDO) ? &mRedoList : 0;
- return (list && !list->isEmpty()) ? list->first()->actionText() : QString::null;
+ return (list && !list->isEmpty()) ? list->first()->actionText() : TQString::null;
}
/******************************************************************************
* Return the action description of the undo/redo item with the specified ID.
*/
-QString Undo::actionText(Undo::Type type, int id)
+TQString Undo::actionText(Undo::Type type, int id)
{
UndoItem* undo = getItem(id, type);
- return undo ? undo->actionText() : QString::null;
+ return undo ? undo->actionText() : TQString::null;
}
/******************************************************************************
* Return the alarm description of the undo/redo item with the specified ID.
*/
-QString Undo::description(Undo::Type type, int id)
+TQString Undo::description(Undo::Type type, int id)
{
UndoItem* undo = getItem(id, type);
- return undo ? undo->description() : QString::null;
+ return undo ? undo->description() : TQString::null;
}
/******************************************************************************
@@ -446,10 +446,10 @@ QString Undo::description(Undo::Type type, int id)
* listed, to force dependent undos to be executed in their correct order.
* If 'ids' is non-null, also returns a list of their corresponding IDs.
*/
-QValueList<int> Undo::ids(Undo::Type type)
+TQValueList<int> Undo::ids(Undo::Type type)
{
- QValueList<int> ids;
- QStringList ignoreIDs;
+ TQValueList<int> ids;
+ TQStringList ignoreIDs;
//int n=0;
List* list = (type == UNDO) ? &mUndoList : (type == REDO) ? &mRedoList : 0;
if (!list)
@@ -463,11 +463,11 @@ QValueList<int> Undo::ids(Undo::Type type)
if (item->operation() == UndoItem::MULTI)
{
// If any item in a multi-undo is disqualified, omit the whole multi-undo
- QStringList newIDs;
+ TQStringList newIDs;
const Undo::List& undos = ((UndoMultiBase*)item)->undos();
for (Undo::List::ConstIterator u = undos.begin(); u != undos.end(); ++u)
{
- QString evid = (*u)->eventID();
+ TQString evid = (*u)->eventID();
if (ignoreIDs.find(evid) != ignoreIDs.end())
omit = true;
else if (omit)
@@ -477,7 +477,7 @@ QValueList<int> Undo::ids(Undo::Type type)
}
if (omit)
{
- for (QStringList::ConstIterator i = newIDs.begin(); i != newIDs.end(); ++i)
+ for (TQStringList::ConstIterator i = newIDs.begin(); i != newIDs.end(); ++i)
ignoreIDs.append(*i);
}
}
@@ -578,7 +578,7 @@ UndoItem::~UndoItem()
/******************************************************************************
* Return the description of an event.
*/
-QString UndoItem::description(const KAEvent& event) const
+TQString UndoItem::description(const KAEvent& event) const
{
return (mCalendar == KAEvent::TEMPLATE) ? event.templateName() : AlarmText::summary(event);
}
@@ -586,7 +586,7 @@ QString UndoItem::description(const KAEvent& event) const
/******************************************************************************
* Return the action description of an add or delete Undo/Redo item for displaying.
*/
-QString UndoItem::addDeleteActionText(KAEvent::Status calendar, bool add)
+TQString UndoItem::addDeleteActionText(KAEvent::Status calendar, bool add)
{
switch (calendar)
{
@@ -605,7 +605,7 @@ QString UndoItem::addDeleteActionText(KAEvent::Status calendar, bool add)
default:
break;
}
- return QString::null;
+ return TQString::null;
}
@@ -615,10 +615,10 @@ QString UndoItem::addDeleteActionText(KAEvent::Status calendar, bool add)
=============================================================================*/
template <class T>
-UndoMulti<T>::UndoMulti(Undo::Type type, const QValueList<KAEvent>& events)
+UndoMulti<T>::UndoMulti(Undo::Type type, const TQValueList<KAEvent>& events)
: UndoMultiBase(type) // UNDO only
{
- for (QValueList<KAEvent>::ConstIterator it = events.begin(); it != events.end(); ++it)
+ for (TQValueList<KAEvent>::ConstIterator it = events.begin(); it != events.end(); ++it)
mUndos.append(new T(Undo::NONE, *it));
}
@@ -659,7 +659,7 @@ UndoItem* UndoMulti<T>::restore()
* = false otherwise.
*/
template <class T>
-bool UndoMulti<T>::deleteID(const QString& id)
+bool UndoMulti<T>::deleteID(const TQString& id)
{
for (Undo::List::Iterator it = mUndos.begin(); it != mUndos.end(); ++it)
{
@@ -776,7 +776,7 @@ UndoItem* UndoAdd::createRedo(const KAEvent& event)
/******************************************************************************
* Return the action description of the Undo item for displaying.
*/
-QString UndoAdd::actionText() const
+TQString UndoAdd::actionText() const
{
return addDeleteActionText(calendar(), (type() == Undo::UNDO));
}
@@ -787,7 +787,7 @@ QString UndoAdd::actionText() const
= Undo item for alarm edit.
=============================================================================*/
-UndoEdit::UndoEdit(Undo::Type type, const KAEvent& oldEvent, const QString& newEventID, const QString& description)
+UndoEdit::UndoEdit(Undo::Type type, const KAEvent& oldEvent, const TQString& newEventID, const TQString& description)
: UndoItem(type),
mOldEvent(new KAEvent(oldEvent)),
mNewEventID(newEventID),
@@ -856,7 +856,7 @@ UndoItem* UndoEdit::restore()
/******************************************************************************
* Return the action description of the Undo item for displaying.
*/
-QString UndoEdit::actionText() const
+TQString UndoEdit::actionText() const
{
switch (calendar())
{
@@ -867,7 +867,7 @@ QString UndoEdit::actionText() const
default:
break;
}
- return QString::null;
+ return TQString::null;
}
@@ -972,7 +972,7 @@ UndoItem* UndoDelete::createRedo(const KAEvent& event)
/******************************************************************************
* Return the action description of the Undo item for displaying.
*/
-QString UndoDelete::actionText() const
+TQString UndoDelete::actionText() const
{
return addDeleteActionText(calendar(), (type() == Undo::REDO));
}
@@ -995,10 +995,10 @@ UndoItem* UndoDeletes::createRedo(Undo::List& undos)
/******************************************************************************
* Return the action description of the Undo item for displaying.
*/
-QString UndoDeletes::actionText() const
+TQString UndoDeletes::actionText() const
{
if (mUndos.isEmpty())
- return QString::null;
+ return TQString::null;
for (Undo::List::ConstIterator it = mUndos.begin(); it != mUndos.end(); ++it)
{
switch ((*it)->calendar())
@@ -1010,7 +1010,7 @@ QString UndoDeletes::actionText() const
case KAEvent::EXPIRED:
break; // check if they are ALL expired
default:
- return QString::null;
+ return TQString::null;
}
}
return i18n("Delete multiple expired alarms");
@@ -1054,7 +1054,7 @@ UndoItem* UndoReactivate::createRedo(const KAEvent& event)
/******************************************************************************
* Return the action description of the Undo item for displaying.
*/
-QString UndoReactivate::actionText() const
+TQString UndoReactivate::actionText() const
{
return i18n("Reactivate alarm");
}
@@ -1098,7 +1098,7 @@ UndoItem* UndoDeactivate::createRedo(const KAEvent& event)
/******************************************************************************
* Return the action description of the Undo item for displaying.
*/
-QString UndoDeactivate::actionText() const
+TQString UndoDeactivate::actionText() const
{
return i18n("Reactivate alarm");
}
@@ -1121,7 +1121,7 @@ UndoItem* UndoReactivates::createRedo(Undo::List& undos)
/******************************************************************************
* Return the action description of the Undo item for displaying.
*/
-QString UndoReactivates::actionText() const
+TQString UndoReactivates::actionText() const
{
return i18n("Reactivate multiple alarms");
}
diff --git a/kalarm/undo.h b/kalarm/undo.h
index 99e06f979..0af181530 100644
--- a/kalarm/undo.h
+++ b/kalarm/undo.h
@@ -23,8 +23,8 @@
/** @file undo.h - undo/redo facility */
-#include <qvaluelist.h>
-#include <qstringlist.h>
+#include <tqvaluelist.h>
+#include <tqstringlist.h>
class KAEvent;
class UndoItem;
@@ -40,31 +40,31 @@ class Undo : public QObject
static void saveAdd(const KAEvent&);
static void saveEdit(const KAEvent& oldEvent, const KAEvent& newEvent);
static void saveDelete(const KAEvent&);
- static void saveDeletes(const QValueList<KAEvent>&);
+ static void saveDeletes(const TQValueList<KAEvent>&);
static void saveReactivate(const KAEvent&);
- static void saveReactivates(const QValueList<KAEvent>&);
- static bool undo(QWidget* parent, const QString& action)
+ static void saveReactivates(const TQValueList<KAEvent>&);
+ static bool undo(TQWidget* parent, const TQString& action)
{ return undo(mUndoList.begin(), UNDO, parent, action); }
- static bool undo(int id, QWidget* parent, const QString& action)
+ static bool undo(int id, TQWidget* parent, const TQString& action)
{ return undo(findItem(id, UNDO), UNDO, parent, action); }
- static bool redo(QWidget* parent, const QString& action)
+ static bool redo(TQWidget* parent, const TQString& action)
{ return undo(mRedoList.begin(), REDO, parent, action); }
- static bool redo(int id, QWidget* parent, const QString& action)
+ static bool redo(int id, TQWidget* parent, const TQString& action)
{ return undo(findItem(id, REDO), REDO, parent, action); }
static void clear();
static bool haveUndo() { return !mUndoList.isEmpty(); }
static bool haveRedo() { return !mRedoList.isEmpty(); }
- static QString actionText(Type);
- static QString actionText(Type, int id);
- static QString description(Type, int id);
- static QValueList<int> ids(Type);
+ static TQString actionText(Type);
+ static TQString actionText(Type, int id);
+ static TQString description(Type, int id);
+ static TQValueList<int> ids(Type);
static void emitChanged();
// Types for use by UndoItem class and its descendants
- typedef QValueList<UndoItem*> List;
+ typedef TQValueList<UndoItem*> List;
signals:
- void changed(const QString& undo, const QString& redo);
+ void changed(const TQString& undo, const TQString& redo);
protected:
// Methods for use by UndoItem class
@@ -73,14 +73,14 @@ class Undo : public QObject
static void replace(UndoItem* old, UndoItem* New);
private:
- typedef QValueList<UndoItem*>::Iterator Iterator;
+ typedef TQValueList<UndoItem*>::Iterator Iterator;
- Undo(QObject* parent) : QObject(parent) { }
- static void removeRedos(const QString& eventID);
- static bool undo(Iterator, Type, QWidget* parent, const QString& action);
+ Undo(TQObject* parent) : TQObject(parent) { }
+ static void removeRedos(const TQString& eventID);
+ static bool undo(Iterator, Type, TQWidget* parent, const TQString& action);
static UndoItem* getItem(int id, Type);
static Iterator findItem(int id, Type);
- void emitChanged(const QString& undo, const QString& redo)
+ void emitChanged(const TQString& undo, const TQString& redo)
{ emit changed(undo, redo); }
static Undo* mInstance; // the one and only Undo instance
diff --git a/kandy/src/atcommand.cpp b/kandy/src/atcommand.cpp
index 006fedf15..20e771cc1 100644
--- a/kandy/src/atcommand.cpp
+++ b/kandy/src/atcommand.cpp
@@ -32,7 +32,7 @@ ATParameter::ATParameter()
mUserInput = false;
}
-ATParameter::ATParameter(const QString &value,const QString &name,
+ATParameter::ATParameter(const TQString &value,const TQString &name,
bool userInput)
{
mName = name;
@@ -48,7 +48,7 @@ ATCommand::ATCommand()
construct();
}
-ATCommand::ATCommand(const QString &cmdString)
+ATCommand::ATCommand(const TQString &cmdString)
{
setCmdName(i18n("New Command"));
setCmdString(cmdString);
@@ -59,7 +59,7 @@ ATCommand::ATCommand(const QString &cmdString)
construct();
}
-ATCommand::ATCommand(const QString &cmdName,const QString &cmdString,
+ATCommand::ATCommand(const TQString &cmdName,const TQString &cmdString,
bool hexOutput)
{
setCmdName(cmdName);
@@ -82,18 +82,18 @@ ATCommand::~ATCommand()
}
-void ATCommand::setCmdName(const QString &cmdName)
+void ATCommand::setCmdName(const TQString &cmdName)
{
mCmdName = cmdName;
}
-QString ATCommand::cmdName()
+TQString ATCommand::cmdName()
{
return mCmdName;
}
-void ATCommand::setCmdString(const QString &cmdString)
+void ATCommand::setCmdString(const TQString &cmdString)
{
mCmdString = cmdString;
@@ -104,15 +104,15 @@ void ATCommand::setCmdString(const QString &cmdString)
// kdDebug() << "ATCommand: Id: " << mId << endl;
}
-QString ATCommand::cmdString()
+TQString ATCommand::cmdString()
{
return mCmdString;
}
-QString ATCommand::cmd()
+TQString ATCommand::cmd()
{
if (mParameters.count() > 0) {
- QString cmd = cmdString().left(cmdString().find("=") + 1);
+ TQString cmd = cmdString().left(cmdString().find("=") + 1);
// kdDebug() << "--1-cmd: " << cmd << endl;
for(uint i=0;i<mParameters.count();++i) {
cmd += mParameters.at(i)->value();
@@ -125,7 +125,7 @@ QString ATCommand::cmd()
}
}
-QString ATCommand::id()
+TQString ATCommand::id()
{
return mId;
}
@@ -140,24 +140,24 @@ bool ATCommand::hexOutput()
return mHexOutput;
}
-void ATCommand::setResultString(const QString &resultString)
+void ATCommand::setResultString(const TQString &resultString)
{
mResultString = resultString;
mResultFieldsList.clear();
- QStringList resultFields = QStringList::split("\n",mResultString);
+ TQStringList resultFields = TQStringList::split("\n",mResultString);
- for(QStringList::Iterator it = resultFields.begin();
+ for(TQStringList::Iterator it = resultFields.begin();
it != resultFields.end(); ++it) {
setResultFields(*it);
}
}
-void ATCommand::setResultFields( QString fieldsString )
+void ATCommand::setResultFields( TQString fieldsString )
{
- QString id = mId.upper().left( mId.find( '=' ) );
+ TQString id = mId.upper().left( mId.find( '=' ) );
// Truncate the command name prepended to the output by the modem.
@@ -168,9 +168,9 @@ void ATCommand::setResultFields( QString fieldsString )
if ( ( fieldsString[ 0 ] == '(' ) && ( fieldsString[ fieldsString.length() - 1 ] == ')' ) )
fieldsString = fieldsString.mid( 1, fieldsString.length() - 2 );
- QStringList *fields = new QStringList;
- QStringList TmpFields = QStringList::split( ',', fieldsString );
- QString TmpString = "";
+ TQStringList *fields = new QStringList;
+ TQStringList TmpFields = TQStringList::split( ',', fieldsString );
+ TQString TmpString = "";
// Assume a phonebook entry of the mobile phone has the format
@@ -181,7 +181,7 @@ void ATCommand::setResultFields( QString fieldsString )
// Hence, the fieldsString needs to be parsed a little bit. Names stored on
// the mobile phone are quoted. Commas within a quoted are of the fieldsString
// must not be divided into differend fields.
- for ( QStringList::Iterator it = TmpFields.begin(); it != TmpFields.end(); it++ )
+ for ( TQStringList::Iterator it = TmpFields.begin(); it != TmpFields.end(); it++ )
{
// Start of a quoted area
if ( ( (*it)[ 0 ] == '\"' ) && ( (*it)[ (*it).length() - 1 ] != '\"' ) )
@@ -206,18 +206,18 @@ void ATCommand::setResultFields( QString fieldsString )
}
-QString ATCommand::resultString()
+TQString ATCommand::resultString()
{
return mResultString;
}
-QString ATCommand::resultField(int index)
+TQString ATCommand::resultField(int index)
{
if (mResultFieldsList.count() == 0) return "";
- QStringList *resultFields = mResultFieldsList.at(0);
+ TQStringList *resultFields = mResultFieldsList.at(0);
- QStringList::Iterator it = resultFields->at(index);
+ TQStringList::Iterator it = resultFields->at(index);
if (it == resultFields->end()) {
kdDebug() << "ATCommand::resultField: index " << index << " out of range."
<< endl;
@@ -228,7 +228,7 @@ QString ATCommand::resultField(int index)
}
-QPtrList<QStringList> *ATCommand::resultFields()
+TQPtrList<TQStringList> *ATCommand::resultFields()
{
return &mResultFieldsList;
}
@@ -243,12 +243,12 @@ void ATCommand::clearParameters()
mParameters.clear();
}
-QPtrList<ATParameter> ATCommand::parameters()
+TQPtrList<ATParameter> ATCommand::parameters()
{
return mParameters;
}
-void ATCommand::setParameter(int index,const QString &value)
+void ATCommand::setParameter(int index,const TQString &value)
{
if (mParameters.count() <= (unsigned int)index) {
kdDebug() << "ATCommand " << cmdName() << " has no Parameter " << index
@@ -261,19 +261,19 @@ void ATCommand::setParameter(int index,const QString &value)
void ATCommand::setParameter(int index,int value)
{
- setParameter(index,QString::number(value));
+ setParameter(index,TQString::number(value));
}
-QString ATCommand::processOutput(const QString &output)
+TQString ATCommand::processOutput(const TQString &output)
{
if (hexOutput()) {
- QString hexString = output.mid(output.find('\n')+1);
+ TQString hexString = output.mid(output.find('\n')+1);
int i=0;
- QString aChar = hexString.mid(i,2);
- QString result;
+ TQString aChar = hexString.mid(i,2);
+ TQString result;
while(!aChar.isEmpty()) {
int charValue = aChar.toInt(0,16);
- QChar charEncoded(charValue);
+ TQChar charEncoded(charValue);
// result += aChar + ": " + charEncoded + "\n";
result += charEncoded;
i += 2;
@@ -286,7 +286,7 @@ QString ATCommand::processOutput(const QString &output)
}
}
-QString ATCommand::processOutput()
+TQString ATCommand::processOutput()
{
return processOutput(mResultString);
}
@@ -298,15 +298,15 @@ void ATCommand::extractParameters()
int pos = cmdString().find("=");
if (pos < 0) return;
- QString paraString = cmdString().mid(pos+1);
+ TQString paraString = cmdString().mid(pos+1);
// kdDebug() << "Para String: " << paraString << endl;
- QStringList paraList = QStringList::split(",",paraString);
+ TQStringList paraList = TQStringList::split(",",paraString);
- QStringList::ConstIterator it = paraList.begin();
- QStringList::ConstIterator end = paraList.end();
+ TQStringList::ConstIterator it = paraList.begin();
+ TQStringList::ConstIterator end = paraList.end();
int argNum = 1;
while(it != end) {
- addParameter(new ATParameter(*it,i18n("Arg %1").arg(QString::number(argNum++)),
+ addParameter(new ATParameter(*it,i18n("Arg %1").arg(TQString::number(argNum++)),
false));
++it;
}
diff --git a/kandy/src/atcommand.h b/kandy/src/atcommand.h
index 8296d1291..f8f8f6a3f 100644
--- a/kandy/src/atcommand.h
+++ b/kandy/src/atcommand.h
@@ -24,26 +24,26 @@
#ifndef ATCOMMAND_H
#define ATCOMMAND_H
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qptrlist.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqptrlist.h>
class ATParameter {
public:
ATParameter();
- ATParameter(const QString &value,const QString &name="",
+ ATParameter(const TQString &value,const TQString &name="",
bool userInput=false);
- void setName(const QString &name) { mName = name; }
- QString name() const { return mName; }
- void setValue(const QString &value) { mValue = value; }
- QString value() const { return mValue; }
+ void setName(const TQString &name) { mName = name; }
+ TQString name() const { return mName; }
+ void setValue(const TQString &value) { mValue = value; }
+ TQString value() const { return mValue; }
void setUserInput(bool userInput) { mUserInput = userInput; }
bool userInput() const { return mUserInput; }
private:
- QString mName;
- QString mValue;
+ TQString mName;
+ TQString mValue;
bool mUserInput;
};
@@ -54,37 +54,37 @@ class ATParameter {
class ATCommand {
public:
ATCommand();
- ATCommand(const QString &cmdString);
- ATCommand(const QString &cmdName,const QString &cmdString,
+ ATCommand(const TQString &cmdString);
+ ATCommand(const TQString &cmdName,const TQString &cmdString,
bool hexOutput=false);
virtual ~ATCommand();
- void setCmdName(const QString &);
- QString cmdName();
+ void setCmdName(const TQString &);
+ TQString cmdName();
- void setCmdString(const QString &);
- QString cmdString();
+ void setCmdString(const TQString &);
+ TQString cmdString();
- QString cmd();
+ TQString cmd();
- QString id();
+ TQString id();
void setHexOutput(bool);
bool hexOutput();
- QString processOutput(const QString &);
- QString processOutput();
+ TQString processOutput(const TQString &);
+ TQString processOutput();
- void setResultString(const QString &);
- QString resultString();
- QString resultField(int index);
- QPtrList<QStringList> *resultFields();
+ void setResultString(const TQString &);
+ TQString resultString();
+ TQString resultField(int index);
+ TQPtrList<TQStringList> *resultFields();
void addParameter(ATParameter *);
void clearParameters();
- QPtrList<ATParameter> parameters();
+ TQPtrList<ATParameter> parameters();
- void setParameter(int index,const QString &value);
+ void setParameter(int index,const TQString &value);
void setParameter(int index,int value);
void setAutoDelete(bool autoDelete) { mAutoDelete = autoDelete; }
@@ -92,18 +92,18 @@ class ATCommand {
private:
void construct();
- void setResultFields(QString fieldsString);
+ void setResultFields(TQString fieldsString);
void extractParameters();
- QString mCmdName;
- QString mCmdString;
- QString mId;
+ TQString mCmdName;
+ TQString mCmdString;
+ TQString mId;
bool mHexOutput;
- QString mResultString;
- QPtrList<QStringList> mResultFieldsList;
+ TQString mResultString;
+ TQPtrList<TQStringList> mResultFieldsList;
- QPtrList<ATParameter> mParameters;
+ TQPtrList<ATParameter> mParameters;
bool mAutoDelete;
};
diff --git a/kandy/src/cmdpropertiesdialog.cpp b/kandy/src/cmdpropertiesdialog.cpp
index f871a02bb..f9667c268 100644
--- a/kandy/src/cmdpropertiesdialog.cpp
+++ b/kandy/src/cmdpropertiesdialog.cpp
@@ -22,9 +22,9 @@
without including the source code for Qt in the source distribution.
*/
-#include <qlistview.h>
-#include <qlineedit.h>
-#include <qcheckbox.h>
+#include <tqlistview.h>
+#include <tqlineedit.h>
+#include <tqcheckbox.h>
#include <kinputdialog.h>
#include <klocale.h>
@@ -34,10 +34,10 @@
#include "cmdpropertiesdialog.h"
#include "cmdpropertiesdialog.moc"
-class ParameterItem : public QCheckListItem {
+class ParameterItem : public TQCheckListItem {
public:
- ParameterItem(ATParameter *p,QListView *parent) :
- QCheckListItem(parent,p->name(),CheckBox),mParameter(p)
+ ParameterItem(ATParameter *p,TQListView *parent) :
+ TQCheckListItem(parent,p->name(),CheckBox),mParameter(p)
{
setText(1,p->value());
setOn(p->userInput());
@@ -62,7 +62,7 @@ class ParameterItem : public QCheckListItem {
* The dialog will by default be modeless, unless you set 'modal' to
* TRUE to construct a modal dialog.
*/
-CmdPropertiesDialog::CmdPropertiesDialog(ATCommand *cmd, QWidget* parent,
+CmdPropertiesDialog::CmdPropertiesDialog(ATCommand *cmd, TQWidget* parent,
const char* name, bool modal,
WFlags fl )
: CmdPropertiesDialog_base( parent, name, modal, fl )
@@ -82,7 +82,7 @@ void CmdPropertiesDialog::readCommand()
mStringEdit->setText(mCmd->cmdString());
mHexCheck->setChecked(mCmd->hexOutput());
- QPtrList<ATParameter> parameters = mCmd->parameters();
+ TQPtrList<ATParameter> parameters = mCmd->parameters();
for(int i=(int)parameters.count()-1;i>=0;--i) {
ATParameter *p = parameters.at(i);
new ParameterItem(p,mParameterList);
@@ -101,11 +101,11 @@ void CmdPropertiesDialog::writeCommand()
}
}
-void CmdPropertiesDialog::editParameterName(QListViewItem *item)
+void CmdPropertiesDialog::editParameterName(TQListViewItem *item)
{
bool ok = false;
- QString newName = KInputDialog::getText(QString::null,
+ TQString newName = KInputDialog::getText(TQString::null,
i18n("Enter parameter name:"),item->text(0),&ok,this);
if (ok) {
diff --git a/kandy/src/cmdpropertiesdialog.h b/kandy/src/cmdpropertiesdialog.h
index 18849d3d6..ee37852aa 100644
--- a/kandy/src/cmdpropertiesdialog.h
+++ b/kandy/src/cmdpropertiesdialog.h
@@ -32,12 +32,12 @@ class CmdPropertiesDialog : public CmdPropertiesDialog_base
{
Q_OBJECT
public:
- CmdPropertiesDialog(ATCommand *cmd,QWidget* parent=0,const char* name=0,
+ CmdPropertiesDialog(ATCommand *cmd,TQWidget* parent=0,const char* name=0,
bool modal=false,WFlags fl=0);
~CmdPropertiesDialog();
protected slots:
- void editParameterName(QListViewItem *);
+ void editParameterName(TQListViewItem *);
void slotAccept();
private:
diff --git a/kandy/src/commanditem.cpp b/kandy/src/commanditem.cpp
index fde599c3f..4785e89ff 100644
--- a/kandy/src/commanditem.cpp
+++ b/kandy/src/commanditem.cpp
@@ -22,7 +22,7 @@
without including the source code for Qt in the source distribution.
*/
-#include <qdom.h>
+#include <tqdom.h>
#include <kdebug.h>
@@ -30,8 +30,8 @@
#include "commanditem.h"
-CommandItem::CommandItem(QListView *listView,ATCommand *command)
- : QListViewItem(listView)
+CommandItem::CommandItem(TQListView *listView,ATCommand *command)
+ : TQListViewItem(listView)
{
mCommand = command;
@@ -47,15 +47,15 @@ ATCommand *CommandItem::command()
return mCommand;
}
-void CommandItem::load(QDomElement *c)
+void CommandItem::load(TQDomElement *c)
{
mCommand->setCmdName(c->attribute("name","unknown"));
mCommand->setCmdString(c->attribute("string","at"));
mCommand->setHexOutput(c->attribute("hexoutput","n") == "y");
- QDomNode n = c->firstChild();
+ TQDomNode n = c->firstChild();
while(!n.isNull()) {
- QDomElement e = n.toElement();
+ TQDomElement e = n.toElement();
if (!e.isNull()) {
ATParameter *p = new ATParameter;
p->setName(e.attribute("name","unnamed"));
@@ -70,24 +70,24 @@ void CommandItem::load(QDomElement *c)
setItemText();
}
-void CommandItem::save(QDomDocument *doc,QDomElement *parent)
+void CommandItem::save(TQDomDocument *doc,TQDomElement *parent)
{
- QDomElement c = doc->createElement("command");
+ TQDomElement c = doc->createElement("command");
c.setAttribute("name",mCommand->cmdName());
c.setAttribute("string",mCommand->cmdString());
c.setAttribute("hexoutput",mCommand->hexOutput() ? "y" : "n");
parent->appendChild(c);
- QPtrList<ATParameter> paras = mCommand->parameters();
+ TQPtrList<ATParameter> paras = mCommand->parameters();
for(uint i=0;i<paras.count();++i) {
saveParameter(paras.at(i),doc,&c);
}
}
-void CommandItem::saveParameter(ATParameter *p, QDomDocument *doc,
- QDomElement *parent)
+void CommandItem::saveParameter(ATParameter *p, TQDomDocument *doc,
+ TQDomElement *parent)
{
- QDomElement e = doc->createElement("parameter");
+ TQDomElement e = doc->createElement("parameter");
e.setAttribute("name",p->name());
e.setAttribute("value",p->value());
e.setAttribute("userinput",p->userInput() ? "y" : "n");
diff --git a/kandy/src/commanditem.h b/kandy/src/commanditem.h
index 853bba01b..ccd89a0a0 100644
--- a/kandy/src/commanditem.h
+++ b/kandy/src/commanditem.h
@@ -25,7 +25,7 @@
#ifndef _COMMAND_ITEM_H_
#define _COMMAND_ITEM_H_
-#include <qlistview.h>
+#include <tqlistview.h>
class ATCommand;
class ATParameter;
@@ -33,22 +33,22 @@ class QDomElement;
class QDomDocument;
/**
- QListView item representing a modem command.
+ TQListView item representing a modem command.
*/
-class CommandItem : public QListViewItem {
+class CommandItem : public TQListViewItem {
public:
- CommandItem(QListView *listView,ATCommand *command);
+ CommandItem(TQListView *listView,ATCommand *command);
~CommandItem();
ATCommand *command();
- void load(QDomElement *c);
- void save(QDomDocument *doc,QDomElement *parent);
+ void load(TQDomElement *c);
+ void save(TQDomDocument *doc,TQDomElement *parent);
void setItemText();
protected:
- void saveParameter(ATParameter *p, QDomDocument *doc,QDomElement *parent);
+ void saveParameter(ATParameter *p, TQDomDocument *doc,TQDomElement *parent);
private:
ATCommand *mCommand;
diff --git a/kandy/src/commandscheduler.cpp b/kandy/src/commandscheduler.cpp
index 23544e8a2..bef11cac8 100644
--- a/kandy/src/commandscheduler.cpp
+++ b/kandy/src/commandscheduler.cpp
@@ -30,13 +30,13 @@
#include "commandscheduler.h"
#include "commandscheduler.moc"
-CommandScheduler::CommandScheduler(Modem *modem,QObject *parent,
+CommandScheduler::CommandScheduler(Modem *modem,TQObject *parent,
const char *name) :
- QObject(parent,name),
+ TQObject(parent,name),
mModem(modem)
{
- connect(mModem,SIGNAL(gotLine(const char *)),
- SLOT(processOutput(const char *)));
+ connect(mModem,TQT_SIGNAL(gotLine(const char *)),
+ TQT_SLOT(processOutput(const char *)));
}
void CommandScheduler::execute(ATCommand *command)
@@ -52,7 +52,7 @@ void CommandScheduler::execute(ATCommand *command)
if (mCommandQueue.count() == 1) sendCommand(command->cmd());
}
-void CommandScheduler::execute(const QString &command)
+void CommandScheduler::execute(const TQString &command)
{
ATCommand *cmd = new ATCommand("",command);
cmd->setAutoDelete(true);
@@ -60,9 +60,9 @@ void CommandScheduler::execute(const QString &command)
execute(cmd);
}
-void CommandScheduler::executeId(const QString &id)
+void CommandScheduler::executeId(const TQString &id)
{
- QPtrList<ATCommand> *cmds = mCommandSet.commandList();
+ TQPtrList<ATCommand> *cmds = mCommandSet.commandList();
for(uint i=0;i<cmds->count();++i) {
if (cmds->at(i)->id() == id) {
@@ -73,7 +73,7 @@ void CommandScheduler::executeId(const QString &id)
kdDebug(5960) << "CommandScheduler::executeId(): Id '" << id << "' not found" << endl;
}
-void CommandScheduler::sendCommand(const QString &command)
+void CommandScheduler::sendCommand(const TQString &command)
{
if (command.isEmpty()) {
kdDebug(5960) << "CommandScheduler::sendCommand(): Warning! Empty command."
@@ -89,7 +89,7 @@ void CommandScheduler::sendCommand(const QString &command)
void CommandScheduler::processOutput(const char *line)
{
- QString l = line;
+ TQString l = line;
ATCommand *cmd = mCommandQueue.first();
if (l == "OK") {
mState = WAITING;
@@ -123,7 +123,7 @@ void CommandScheduler::nextCommand()
}
}
-bool CommandScheduler::loadProfile(const QString& filename)
+bool CommandScheduler::loadProfile(const TQString& filename)
{
mCommandSet.clear();
@@ -132,7 +132,7 @@ bool CommandScheduler::loadProfile(const QString& filename)
return true;
}
-bool CommandScheduler::saveProfile(const QString& filename)
+bool CommandScheduler::saveProfile(const TQString& filename)
{
if (!mCommandSet.saveFile(filename)) return false;
diff --git a/kandy/src/commandscheduler.h b/kandy/src/commandscheduler.h
index 20398aafa..231ad325b 100644
--- a/kandy/src/commandscheduler.h
+++ b/kandy/src/commandscheduler.h
@@ -24,38 +24,38 @@
#ifndef COMMANDSCHEDULER_H
#define COMMANDSCHEDULER_H
-#include <qobject.h>
-#include <qptrlist.h>
+#include <tqobject.h>
+#include <tqptrlist.h>
#include "atcommand.h"
#include "commandset.h"
class Modem;
-class CommandScheduler : public QObject {
+class CommandScheduler : public TQObject {
Q_OBJECT
public:
- CommandScheduler (Modem *modem,QObject *parent = 0, const char *name = 0);
+ CommandScheduler (Modem *modem,TQObject *parent = 0, const char *name = 0);
- void execute(const QString &command);
+ void execute(const TQString &command);
void execute(ATCommand *command);
- void executeId(const QString &id);
+ void executeId(const TQString &id);
Modem *modem() { return mModem; }
CommandSet *commandSet() { return &mCommandSet; }
- bool loadProfile(const QString& filename);
- bool saveProfile(const QString& filename);
+ bool loadProfile(const TQString& filename);
+ bool saveProfile(const TQString& filename);
signals:
- void result(const QString &);
+ void result(const TQString &);
void commandProcessed(ATCommand *);
private slots:
void processOutput(const char *line);
private:
- void sendCommand(const QString &command);
+ void sendCommand(const TQString &command);
void nextCommand();
private:
@@ -65,12 +65,12 @@ class CommandScheduler : public QObject {
ATCommand *mLastCommand;
- QPtrList<ATCommand> mCommandQueue;
+ TQPtrList<ATCommand> mCommandQueue;
enum State { WAITING, PROCESSING };
State mState;
- QString mResult;
+ TQString mResult;
};
#endif
diff --git a/kandy/src/commandset.cpp b/kandy/src/commandset.cpp
index f44899cac..17a50b811 100644
--- a/kandy/src/commandset.cpp
+++ b/kandy/src/commandset.cpp
@@ -22,9 +22,9 @@
without including the source code for Qt in the source distribution.
*/
-#include <qdom.h>
-#include <qfile.h>
-#include <qtextstream.h>
+#include <tqdom.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
#include <kdebug.h>
@@ -51,12 +51,12 @@ void CommandSet::deleteCommand(ATCommand *command)
mList.removeRef(command);
}
-bool CommandSet::loadFile(const QString& filename)
+bool CommandSet::loadFile(const TQString& filename)
{
// kdDebug(5960) << "CommandSet::loadFile(): " << filename << endl;
- QDomDocument doc("Kandy");
- QFile f(filename);
+ TQDomDocument doc("Kandy");
+ TQFile f(filename);
if (!f.open(IO_ReadOnly))
return false;
if (!doc.setContent(&f)) {
@@ -65,9 +65,9 @@ bool CommandSet::loadFile(const QString& filename)
}
f.close();
- QDomNodeList commands = doc.elementsByTagName("command");
+ TQDomNodeList commands = doc.elementsByTagName("command");
for(uint i=0;i<commands.count();++i) {
- QDomElement c = commands.item(i).toElement();
+ TQDomElement c = commands.item(i).toElement();
if (!c.isNull()) {
ATCommand *cmd = new ATCommand;
loadCommand(cmd,&c);
@@ -78,24 +78,24 @@ bool CommandSet::loadFile(const QString& filename)
return true;
}
-bool CommandSet::saveFile(const QString& filename)
+bool CommandSet::saveFile(const TQString& filename)
{
kdDebug(5960) << "CommandSet::saveFile(): " << filename << endl;
- QDomDocument doc("Kandy");
- QDomElement set = doc.createElement("commandset");
+ TQDomDocument doc("Kandy");
+ TQDomElement set = doc.createElement("commandset");
doc.appendChild(set);
for(uint i=0; i<mList.count();++i) {
saveCommand(mList.at(i),&doc,&set);
}
- QFile xmlfile(filename);
+ TQFile xmlfile(filename);
if (!xmlfile.open(IO_WriteOnly)) {
kdDebug(5960) << "Error opening file for write." << endl;
return false;
}
- QTextStream ts(&xmlfile);
+ TQTextStream ts(&xmlfile);
doc.documentElement().save(ts,2);
xmlfile.close();
@@ -107,15 +107,15 @@ void CommandSet::clear()
mList.clear();
}
-void CommandSet::loadCommand(ATCommand *command,QDomElement *c)
+void CommandSet::loadCommand(ATCommand *command,TQDomElement *c)
{
command->setCmdName(c->attribute("name","unknown"));
command->setCmdString(c->attribute("string","at"));
command->setHexOutput(c->attribute("hexoutput","n") == "y");
- QDomNode n = c->firstChild();
+ TQDomNode n = c->firstChild();
while(!n.isNull()) {
- QDomElement e = n.toElement();
+ TQDomElement e = n.toElement();
if (!e.isNull()) {
ATParameter *p = new ATParameter;
p->setName(e.attribute("name","unnamed"));
@@ -128,25 +128,25 @@ void CommandSet::loadCommand(ATCommand *command,QDomElement *c)
}
}
-void CommandSet::saveCommand(ATCommand *command,QDomDocument *doc,
- QDomElement *parent)
+void CommandSet::saveCommand(ATCommand *command,TQDomDocument *doc,
+ TQDomElement *parent)
{
- QDomElement c = doc->createElement("command");
+ TQDomElement c = doc->createElement("command");
c.setAttribute("name",command->cmdName());
c.setAttribute("string",command->cmdString());
c.setAttribute("hexoutput",command->hexOutput() ? "y" : "n");
parent->appendChild(c);
- QPtrList<ATParameter> paras = command->parameters();
+ TQPtrList<ATParameter> paras = command->parameters();
for(uint i=0;i<paras.count();++i) {
saveParameter(paras.at(i),doc,&c);
}
}
-void CommandSet::saveParameter(ATParameter *p, QDomDocument *doc,
- QDomElement *parent)
+void CommandSet::saveParameter(ATParameter *p, TQDomDocument *doc,
+ TQDomElement *parent)
{
- QDomElement e = doc->createElement("parameter");
+ TQDomElement e = doc->createElement("parameter");
e.setAttribute("name",p->name());
e.setAttribute("value",p->value());
e.setAttribute("userinput",p->userInput() ? "y" : "n");
diff --git a/kandy/src/commandset.h b/kandy/src/commandset.h
index 41c9cd144..3f385fea5 100644
--- a/kandy/src/commandset.h
+++ b/kandy/src/commandset.h
@@ -24,7 +24,7 @@
#ifndef COMMANDSET_H
#define COMMANDSET_H
-#include <qlistview.h>
+#include <tqlistview.h>
class ATCommand;
class ATParameter;
@@ -32,7 +32,7 @@ class QDomElement;
class QDomDocument;
/**
- QListView item representing a modem command.
+ TQListView item representing a modem command.
*/
class CommandSet {
public:
@@ -42,20 +42,20 @@ class CommandSet {
void addCommand(ATCommand *);
void deleteCommand(ATCommand *);
- bool loadFile(const QString &);
- bool saveFile(const QString &);
+ bool loadFile(const TQString &);
+ bool saveFile(const TQString &);
void clear();
- QPtrList<ATCommand> *commandList() { return &mList; }
+ TQPtrList<ATCommand> *commandList() { return &mList; }
protected:
- void loadCommand(ATCommand *,QDomElement *c);
- void saveCommand(ATCommand *,QDomDocument *doc,QDomElement *parent);
- void saveParameter(ATParameter *p, QDomDocument *doc,QDomElement *parent);
+ void loadCommand(ATCommand *,TQDomElement *c);
+ void saveCommand(ATCommand *,TQDomDocument *doc,TQDomElement *parent);
+ void saveParameter(ATParameter *p, TQDomDocument *doc,TQDomElement *parent);
private:
- QPtrList<ATCommand> mList;
+ TQPtrList<ATCommand> mList;
};
#endif
diff --git a/kandy/src/kandy.cpp b/kandy/src/kandy.cpp
index 860aff5bb..d7da32e86 100644
--- a/kandy/src/kandy.cpp
+++ b/kandy/src/kandy.cpp
@@ -22,11 +22,11 @@
without including the source code for Qt in the source distribution.
*/
-#include <qlineedit.h>
-#include <qprinter.h>
-#include <qprintdialog.h>
-#include <qpainter.h>
-#include <qpaintdevicemetrics.h>
+#include <tqlineedit.h>
+#include <tqprinter.h>
+#include <tqprintdialog.h>
+#include <tqpainter.h>
+#include <tqpaintdevicemetrics.h>
#include <kglobal.h>
#include <klocale.h>
@@ -81,16 +81,16 @@ Kandy::Kandy(CommandScheduler *scheduler)
setAutoSaveSettings();
// allow the view to change the statusbar and caption
- connect(mView, SIGNAL(signalChangeStatusbar(const QString&)),
- this, SLOT(changeStatusbar(const QString&)));
- connect(mView, SIGNAL(signalChangeCaption(const QString&)),
- this, SLOT(changeCaption(const QString&)));
+ connect(mView, TQT_SIGNAL(signalChangeStatusbar(const TQString&)),
+ this, TQT_SLOT(changeStatusbar(const TQString&)));
+ connect(mView, TQT_SIGNAL(signalChangeCaption(const TQString&)),
+ this, TQT_SLOT(changeCaption(const TQString&)));
- connect(mView,SIGNAL(modifiedChanged(bool)),SLOT(setTitle()));
+ connect(mView,TQT_SIGNAL(modifiedChanged(bool)),TQT_SLOT(setTitle()));
KConfig *config = KGlobal::config();
config->setGroup("General");
- QString currentProfile = config->readEntry("CurrentProfile",
+ TQString currentProfile = config->readEntry("CurrentProfile",
locate("appdata","default.kandy"));
if (!currentProfile.isEmpty()) load(currentProfile);
}
@@ -99,7 +99,7 @@ Kandy::~Kandy()
{
}
-void Kandy::load(const QString& filename)
+void Kandy::load(const TQString& filename)
{
if (!mView->loadFile(filename)) {
KMessageBox::error(this,i18n("Could not load file %1").arg(filename));
@@ -109,7 +109,7 @@ void Kandy::load(const QString& filename)
setTitle();
}
-void Kandy::save(const QString & filename)
+void Kandy::save(const TQString & filename)
{
if (!filename.isEmpty()) {
if (!mView->saveFile(filename)) {
@@ -123,26 +123,26 @@ void Kandy::save(const QString & filename)
void Kandy::setupActions()
{
- KStdAction::open(this, SLOT(fileOpen()), actionCollection());
- KStdAction::save(this, SLOT(fileSave()), actionCollection());
- KStdAction::saveAs(this, SLOT(fileSaveAs()), actionCollection());
-// KStdAction::print(this, SLOT(filePrint()), actionCollection());
- KStdAction::quit(this, SLOT(close()), actionCollection());
+ KStdAction::open(this, TQT_SLOT(fileOpen()), actionCollection());
+ KStdAction::save(this, TQT_SLOT(fileSave()), actionCollection());
+ KStdAction::saveAs(this, TQT_SLOT(fileSaveAs()), actionCollection());
+// KStdAction::print(this, TQT_SLOT(filePrint()), actionCollection());
+ KStdAction::quit(this, TQT_SLOT(close()), actionCollection());
createStandardStatusBarAction();
setStandardToolBarMenuEnabled(true);
- KStdAction::keyBindings(this, SLOT(optionsConfigureKeys()), actionCollection());
- KStdAction::configureToolbars(this, SLOT(optionsConfigureToolbars()), actionCollection());
- KStdAction::preferences(this, SLOT(optionsPreferences()), actionCollection());
+ KStdAction::keyBindings(this, TQT_SLOT(optionsConfigureKeys()), actionCollection());
+ KStdAction::configureToolbars(this, TQT_SLOT(optionsConfigureToolbars()), actionCollection());
+ KStdAction::preferences(this, TQT_SLOT(optionsPreferences()), actionCollection());
- new KAction(i18n("Mobile GUI"),0,this,SLOT(showMobileGui()),
+ new KAction(i18n("Mobile GUI"),0,this,TQT_SLOT(showMobileGui()),
actionCollection(),"show_mobilegui");
- mConnectAction = new KAction(i18n("Connect"),0,this,SLOT(modemConnect()),
+ mConnectAction = new KAction(i18n("Connect"),0,this,TQT_SLOT(modemConnect()),
actionCollection(),"modem_connect");
mDisconnectAction = new KAction(i18n("Disconnect"),0,this,
- SLOT(modemDisconnect()),actionCollection(),
+ TQT_SLOT(modemDisconnect()),actionCollection(),
"modem_disconnect");
createGUI();
@@ -163,7 +163,7 @@ void Kandy::readProperties(KConfig */*config*/)
// in 'saveProperties'
}
-void Kandy::dragEnterEvent(QDragEnterEvent *event)
+void Kandy::dragEnterEvent(TQDragEnterEvent *event)
{
// do nothing
KMainWindow::dragEnterEvent(event);
@@ -172,7 +172,7 @@ void Kandy::dragEnterEvent(QDragEnterEvent *event)
// event->accept(KURLDrag::canDecode(event));
}
-void Kandy::dropEvent(QDropEvent *event)
+void Kandy::dropEvent(TQDropEvent *event)
{
// this is a very simplistic implementation of a drop event. we
// will only accept a dropped URL. the Qt dnd code can do *much*
@@ -203,7 +203,7 @@ void Kandy::fileOpen()
// this slot is called whenever the File->Open menu is selected,
// the Open shortcut is pressed (usually CTRL+O) or the Open toolbar
// button is clicked
- QString filename = KFileDialog::getOpenFileName();
+ TQString filename = KFileDialog::getOpenFileName();
if (!filename.isEmpty()) load(filename);
}
@@ -215,7 +215,7 @@ void Kandy::fileSave()
void Kandy::fileSaveAs()
{
- QString filename = KFileDialog::getSaveFileName();
+ TQString filename = KFileDialog::getSaveFileName();
save(filename);
}
@@ -225,16 +225,16 @@ void Kandy::filePrint()
// the Print shortcut is pressed (usually CTRL+P) or the Print toolbar
// button is clicked
if (!mPrinter) mPrinter = new QPrinter;
- if (QPrintDialog::getPrinterSetup(mPrinter))
+ if (TQPrintDialog::getPrinterSetup(mPrinter))
{
// setup the printer. with Qt, you always "print" to a
- // QPainter.. whether the output medium is a pixmap, a screen,
+ // TQPainter.. whether the output medium is a pixmap, a screen,
// or paper
- QPainter p;
+ TQPainter p;
p.begin(mPrinter);
// we let our view do the actual printing
- QPaintDeviceMetrics metrics(mPrinter);
+ TQPaintDeviceMetrics metrics(mPrinter);
mView->print(&p, metrics.height(), metrics.width());
// and send the result to the printer
@@ -252,7 +252,7 @@ void Kandy::optionsConfigureToolbars()
// use the standard toolbar editor
saveMainWindowSettings( KGlobal::config(), autoSaveGroup() );
KEditToolbar dlg(actionCollection());
- connect(&dlg, SIGNAL(newToolbarConfig()), this, SLOT(newToolbarConfig()));
+ connect(&dlg, TQT_SIGNAL(newToolbarConfig()), this, TQT_SLOT(newToolbarConfig()));
dlg.exec();
}
@@ -275,13 +275,13 @@ void Kandy::optionsPreferences()
mPreferencesDialog->raise();
}
-void Kandy::changeStatusbar(const QString& text)
+void Kandy::changeStatusbar(const TQString& text)
{
// display the text on the statusbar
statusBar()->message(text);
}
-void Kandy::changeCaption(const QString& text)
+void Kandy::changeCaption(const TQString& text)
{
// display the text on the caption
setCaption(text);
@@ -300,7 +300,7 @@ bool Kandy::queryClose()
{
if (mView->isModified()) {
switch (KMessageBox::warningYesNoCancel(this,
- i18n("Save changes to profile %1?").arg(mFilename), QString::null, KStdGuiItem::save(), KStdGuiItem::discard())) {
+ i18n("Save changes to profile %1?").arg(mFilename), TQString::null, KStdGuiItem::save(), KStdGuiItem::discard())) {
case KMessageBox::Yes :
fileSave();
return true;
@@ -342,7 +342,7 @@ void Kandy::showMobileGui()
emit showMobileWin();
}
-void Kandy::showErrorMessage( const QString &text )
+void Kandy::showErrorMessage( const TQString &text )
{
KMessageBox::error( 0, text );
}
diff --git a/kandy/src/kandy.h b/kandy/src/kandy.h
index ba2e66155..3d122dc93 100644
--- a/kandy/src/kandy.h
+++ b/kandy/src/kandy.h
@@ -62,15 +62,15 @@ class Kandy : public KMainWindow
/**
* Use this method to load whatever file/URL you have
*/
- void load(const QString& url);
- void save(const QString& url);
+ void load(const TQString& url);
+ void save(const TQString& url);
public slots:
void setTitle();
void modemConnect();
- void showErrorMessage( const QString & );
+ void showErrorMessage( const TQString & );
signals:
void showMobileWin();
@@ -80,8 +80,8 @@ class Kandy : public KMainWindow
/**
* Overridden virtuals for Qt drag 'n drop (XDND)
*/
- virtual void dragEnterEvent(QDragEnterEvent *event);
- virtual void dropEvent(QDropEvent *event);
+ virtual void dragEnterEvent(TQDragEnterEvent *event);
+ virtual void dropEvent(TQDropEvent *event);
bool queryClose();
@@ -112,8 +112,8 @@ class Kandy : public KMainWindow
void showMobileGui();
void newToolbarConfig();
- void changeStatusbar(const QString& text);
- void changeCaption(const QString& text);
+ void changeStatusbar(const TQString& text);
+ void changeCaption(const TQString& text);
private:
@@ -125,12 +125,12 @@ class Kandy : public KMainWindow
KandyView *mView;
- QPrinter *mPrinter;
+ TQPrinter *mPrinter;
KAction *mConnectAction;
KAction *mDisconnectAction;
- QString mFilename;
+ TQString mFilename;
KandyPrefsDialog *mPreferencesDialog;
};
diff --git a/kandy/src/kandy_client.cpp b/kandy/src/kandy_client.cpp
index ece43f5da..b927afc3a 100644
--- a/kandy/src/kandy_client.cpp
+++ b/kandy/src/kandy_client.cpp
@@ -24,8 +24,8 @@
#include <kapplication.h>
#include <dcopclient.h>
-#include <qdatastream.h>
-#include <qstring.h>
+#include <tqdatastream.h>
+#include <tqstring.h>
int main(int argc, char **argv)
{
@@ -36,13 +36,13 @@ int main(int argc, char **argv)
client->attach();
// do a 'send' for now
- QByteArray data;
- QDataStream ds(data, IO_WriteOnly);
+ TQByteArray data;
+ TQDataStream ds(data, IO_WriteOnly);
if (argc > 1)
- ds << QString(argv[1]);
+ ds << TQString(argv[1]);
else
- ds << QString("http://www.kde.org");
- client->send("kandy", "KandyIface", "openURL(QString)", data);
+ ds << TQString("http://www.kde.org");
+ client->send("kandy", "KandyIface", "openURL(TQString)", data);
return app.exec();
}
diff --git a/kandy/src/kandyprefsdialog.cpp b/kandy/src/kandyprefsdialog.cpp
index d25688ff9..d98989dc2 100644
--- a/kandy/src/kandyprefsdialog.cpp
+++ b/kandy/src/kandyprefsdialog.cpp
@@ -22,20 +22,20 @@
without including the source code for Qt in the source distribution.
*/
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qgroupbox.h>
-#include <qbuttongroup.h>
-#include <qlineedit.h>
-#include <qfont.h>
-#include <qslider.h>
-#include <qfile.h>
-#include <qtextstream.h>
-#include <qcombobox.h>
-#include <qvbox.h>
-#include <qhbox.h>
-#include <qspinbox.h>
-#include <qdatetime.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqgroupbox.h>
+#include <tqbuttongroup.h>
+#include <tqlineedit.h>
+#include <tqfont.h>
+#include <tqslider.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
+#include <tqcombobox.h>
+#include <tqvbox.h>
+#include <tqhbox.h>
+#include <tqspinbox.h>
+#include <tqdatetime.h>
#include <kapplication.h>
#include <kdebug.h>
@@ -54,7 +54,7 @@
#include "kandyprefsdialog.moc"
-KandyPrefsDialog::KandyPrefsDialog(QWidget *parent, char *name, bool modal) :
+KandyPrefsDialog::KandyPrefsDialog(TQWidget *parent, char *name, bool modal) :
KPrefsDialog(KandyPrefs::self(),parent,name,modal)
{
setupSerialTab();
@@ -74,10 +74,10 @@ KandyPrefsDialog::~KandyPrefsDialog()
void KandyPrefsDialog::setupSerialTab()
{
- QFrame *topFrame = addPage(i18n("Serial Interface"),0,
+ TQFrame *topFrame = addPage(i18n("Serial Interface"),0,
DesktopIcon("connect_no",KIcon::SizeMedium));
- QGridLayout *topLayout = new QGridLayout(topFrame,6,2);
+ TQGridLayout *topLayout = new TQGridLayout(topFrame,6,2);
topLayout->setSpacing(spacingHint());
topLayout->setMargin(marginHint());
@@ -113,10 +113,10 @@ void KandyPrefsDialog::setupSerialTab()
void KandyPrefsDialog::setupAddressbookTab()
{
- QFrame *topFrame = addPage(i18n("Address Book"), 0,
+ TQFrame *topFrame = addPage(i18n("Address Book"), 0,
DesktopIcon("kaddressbook", KIcon::SizeMedium));
- QGridLayout *topLayout = new QGridLayout(topFrame, 13, 4);
+ TQGridLayout *topLayout = new TQGridLayout(topFrame, 13, 4);
topLayout->setSpacing(spacingHint());
topLayout->setMargin(marginHint());
@@ -292,68 +292,68 @@ void KandyPrefsDialog::setupAddressbookTab()
}
- connect( useHomeSuff->checkBox(), SIGNAL(toggled(bool)),
- HomeSuff->lineEdit(), SLOT(setEnabled(bool)) );
- connect( useHomeSuff->checkBox(), SIGNAL(toggled(bool)),
- HomeSuff->label(), SLOT(setEnabled(bool)) );
-
- connect( useWorkSuff->checkBox(), SIGNAL(toggled(bool)),
- WorkSuff->lineEdit(), SLOT(setEnabled(bool)) );
- connect( useWorkSuff->checkBox(), SIGNAL(toggled(bool)),
- WorkSuff->label(), SLOT(setEnabled(bool)) );
-
- connect( useMessagingSuff->checkBox(), SIGNAL(toggled(bool)),
- MessagingSuff->lineEdit(), SLOT(setEnabled(bool)) );
- connect( useMessagingSuff->checkBox(), SIGNAL(toggled(bool)),
- MessagingSuff->label(), SLOT(setEnabled(bool)) );
-
- connect( useFaxSuff->checkBox(), SIGNAL(toggled(bool)),
- FaxSuff->lineEdit(), SLOT(setEnabled(bool)) );
- connect( useFaxSuff->checkBox(), SIGNAL(toggled(bool)),
- FaxSuff->label(), SLOT(setEnabled(bool)) );
-
- connect( useCellSuff->checkBox(), SIGNAL(toggled(bool)),
- CellSuff->lineEdit(), SLOT(setEnabled(bool)) );
- connect( useCellSuff->checkBox(), SIGNAL(toggled(bool)),
- CellSuff->label(), SLOT(setEnabled(bool)) );
-
- connect( useVideoSuff->checkBox(), SIGNAL(toggled(bool)),
- VideoSuff->lineEdit(), SLOT(setEnabled(bool)) );
- connect( useVideoSuff->checkBox(), SIGNAL(toggled(bool)),
- VideoSuff->label(), SLOT(setEnabled(bool)) );
-
- connect( useMailboxSuff->checkBox(), SIGNAL(toggled(bool)),
- MailboxSuff->lineEdit(), SLOT(setEnabled(bool)) );
- connect( useMailboxSuff->checkBox(), SIGNAL(toggled(bool)),
- MailboxSuff->label(), SLOT(setEnabled(bool)) );
-
- connect( useModemSuff->checkBox(), SIGNAL(toggled(bool)),
- ModemSuff->lineEdit(), SLOT(setEnabled(bool)) );
- connect( useModemSuff->checkBox(), SIGNAL(toggled(bool)),
- ModemSuff->label(), SLOT(setEnabled(bool)) );
-
- connect( useCarSuff->checkBox(), SIGNAL(toggled(bool)),
- CarSuff->lineEdit(), SLOT(setEnabled(bool)) );
- connect( useCarSuff->checkBox(), SIGNAL(toggled(bool)),
- CarSuff->label(), SLOT(setEnabled(bool)) );
-
- connect( useISDNSuff->checkBox(), SIGNAL(toggled(bool)),
- ISDNSuff->lineEdit(), SLOT(setEnabled(bool)) );
- connect( useISDNSuff->checkBox(), SIGNAL(toggled(bool)),
- ISDNSuff->label(), SLOT(setEnabled(bool)) );
-
- connect( usePagerSuff->checkBox(), SIGNAL(toggled(bool)),
- PagerSuff->lineEdit(), SLOT(setEnabled(bool)) );
- connect( usePagerSuff->checkBox(), SIGNAL(toggled(bool)),
- PagerSuff->label(), SLOT(setEnabled(bool)) );
+ connect( useHomeSuff->checkBox(), TQT_SIGNAL(toggled(bool)),
+ HomeSuff->lineEdit(), TQT_SLOT(setEnabled(bool)) );
+ connect( useHomeSuff->checkBox(), TQT_SIGNAL(toggled(bool)),
+ HomeSuff->label(), TQT_SLOT(setEnabled(bool)) );
+
+ connect( useWorkSuff->checkBox(), TQT_SIGNAL(toggled(bool)),
+ WorkSuff->lineEdit(), TQT_SLOT(setEnabled(bool)) );
+ connect( useWorkSuff->checkBox(), TQT_SIGNAL(toggled(bool)),
+ WorkSuff->label(), TQT_SLOT(setEnabled(bool)) );
+
+ connect( useMessagingSuff->checkBox(), TQT_SIGNAL(toggled(bool)),
+ MessagingSuff->lineEdit(), TQT_SLOT(setEnabled(bool)) );
+ connect( useMessagingSuff->checkBox(), TQT_SIGNAL(toggled(bool)),
+ MessagingSuff->label(), TQT_SLOT(setEnabled(bool)) );
+
+ connect( useFaxSuff->checkBox(), TQT_SIGNAL(toggled(bool)),
+ FaxSuff->lineEdit(), TQT_SLOT(setEnabled(bool)) );
+ connect( useFaxSuff->checkBox(), TQT_SIGNAL(toggled(bool)),
+ FaxSuff->label(), TQT_SLOT(setEnabled(bool)) );
+
+ connect( useCellSuff->checkBox(), TQT_SIGNAL(toggled(bool)),
+ CellSuff->lineEdit(), TQT_SLOT(setEnabled(bool)) );
+ connect( useCellSuff->checkBox(), TQT_SIGNAL(toggled(bool)),
+ CellSuff->label(), TQT_SLOT(setEnabled(bool)) );
+
+ connect( useVideoSuff->checkBox(), TQT_SIGNAL(toggled(bool)),
+ VideoSuff->lineEdit(), TQT_SLOT(setEnabled(bool)) );
+ connect( useVideoSuff->checkBox(), TQT_SIGNAL(toggled(bool)),
+ VideoSuff->label(), TQT_SLOT(setEnabled(bool)) );
+
+ connect( useMailboxSuff->checkBox(), TQT_SIGNAL(toggled(bool)),
+ MailboxSuff->lineEdit(), TQT_SLOT(setEnabled(bool)) );
+ connect( useMailboxSuff->checkBox(), TQT_SIGNAL(toggled(bool)),
+ MailboxSuff->label(), TQT_SLOT(setEnabled(bool)) );
+
+ connect( useModemSuff->checkBox(), TQT_SIGNAL(toggled(bool)),
+ ModemSuff->lineEdit(), TQT_SLOT(setEnabled(bool)) );
+ connect( useModemSuff->checkBox(), TQT_SIGNAL(toggled(bool)),
+ ModemSuff->label(), TQT_SLOT(setEnabled(bool)) );
+
+ connect( useCarSuff->checkBox(), TQT_SIGNAL(toggled(bool)),
+ CarSuff->lineEdit(), TQT_SLOT(setEnabled(bool)) );
+ connect( useCarSuff->checkBox(), TQT_SIGNAL(toggled(bool)),
+ CarSuff->label(), TQT_SLOT(setEnabled(bool)) );
+
+ connect( useISDNSuff->checkBox(), TQT_SIGNAL(toggled(bool)),
+ ISDNSuff->lineEdit(), TQT_SLOT(setEnabled(bool)) );
+ connect( useISDNSuff->checkBox(), TQT_SIGNAL(toggled(bool)),
+ ISDNSuff->label(), TQT_SLOT(setEnabled(bool)) );
+
+ connect( usePagerSuff->checkBox(), TQT_SIGNAL(toggled(bool)),
+ PagerSuff->lineEdit(), TQT_SLOT(setEnabled(bool)) );
+ connect( usePagerSuff->checkBox(), TQT_SIGNAL(toggled(bool)),
+ PagerSuff->label(), TQT_SLOT(setEnabled(bool)) );
}
void KandyPrefsDialog::setupWindowsTab()
{
- QFrame *topFrame = addPage(i18n("Windows"),0,
+ TQFrame *topFrame = addPage(i18n("Windows"),0,
DesktopIcon("window_list",KIcon::SizeMedium));
- QGridLayout *topLayout = new QGridLayout(topFrame,6,2);
+ TQGridLayout *topLayout = new TQGridLayout(topFrame,6,2);
topLayout->setSpacing(spacingHint());
topLayout->setMargin(marginHint());
diff --git a/kandy/src/kandyprefsdialog.h b/kandy/src/kandyprefsdialog.h
index 5d63331c5..7929e92d5 100644
--- a/kandy/src/kandyprefsdialog.h
+++ b/kandy/src/kandyprefsdialog.h
@@ -25,12 +25,12 @@
#ifndef _KANDYPREFSDIALOG_H
#define _KANDYPREFSDIALOG_H
-#include <qframe.h>
-#include <qlineedit.h>
-#include <qcombobox.h>
-#include <qcheckbox.h>
-#include <qradiobutton.h>
-#include <qpushbutton.h>
+#include <tqframe.h>
+#include <tqlineedit.h>
+#include <tqcombobox.h>
+#include <tqcheckbox.h>
+#include <tqradiobutton.h>
+#include <tqpushbutton.h>
#include <kdialogbase.h>
@@ -44,7 +44,7 @@ class KandyPrefsDialog : public KPrefsDialog
Q_OBJECT
public:
/** Initialize dialog and pages */
- KandyPrefsDialog(QWidget *parent=0,char *name=0,bool modal=false);
+ KandyPrefsDialog(TQWidget *parent=0,char *name=0,bool modal=false);
~KandyPrefsDialog();
protected:
diff --git a/kandy/src/kandyview.cpp b/kandy/src/kandyview.cpp
index 5b9f06194..27d3b7b6b 100644
--- a/kandy/src/kandyview.cpp
+++ b/kandy/src/kandyview.cpp
@@ -24,19 +24,19 @@
#include <unistd.h>
-#include <qpainter.h>
-#include <qlayout.h>
-#include <qhbox.h>
-#include <qvbox.h>
-#include <qtextedit.h>
-#include <qlistview.h>
-#include <qdom.h>
-#include <qtextstream.h>
-#include <qfile.h>
-#include <qlineedit.h>
-#include <qcheckbox.h>
-#include <qlabel.h>
-#include <qpushbutton.h>
+#include <tqpainter.h>
+#include <tqlayout.h>
+#include <tqhbox.h>
+#include <tqvbox.h>
+#include <tqtextedit.h>
+#include <tqlistview.h>
+#include <tqdom.h>
+#include <tqtextstream.h>
+#include <tqfile.h>
+#include <tqlineedit.h>
+#include <tqcheckbox.h>
+#include <tqlabel.h>
+#include <tqpushbutton.h>
#include <kurl.h>
#include <kmessagebox.h>
@@ -57,90 +57,90 @@
#include "kandyview.h"
#include "kandyview.moc"
-KandyView::KandyView(CommandScheduler *scheduler,QWidget *parent)
- : QWidget(parent)
+KandyView::KandyView(CommandScheduler *scheduler,TQWidget *parent)
+ : TQWidget(parent)
{
mModified = false;
mScheduler = scheduler;
- QBoxLayout *topLayout = new QVBoxLayout( this );
+ TQBoxLayout *topLayout = new TQVBoxLayout( this );
- QSplitter *mainSplitter = new QSplitter( Horizontal, this );
+ TQSplitter *mainSplitter = new TQSplitter( Horizontal, this );
topLayout->addWidget( mainSplitter );
- QWidget *commandBox = new QWidget( mainSplitter );
+ TQWidget *commandBox = new TQWidget( mainSplitter );
- QBoxLayout *commandLayout = new QVBoxLayout( commandBox );
+ TQBoxLayout *commandLayout = new TQVBoxLayout( commandBox );
commandLayout->setMargin( KDialog::marginHint() );
commandLayout->setSpacing( KDialog::spacingHint() );
- mCommandList = new QListView( commandBox );
+ mCommandList = new TQListView( commandBox );
mCommandList->addColumn( i18n( "Name" ) );
mCommandList->addColumn( i18n( "Command" ) );
mCommandList->addColumn( i18n( "Hex" ) );
commandLayout->addWidget( mCommandList );
- connect( mCommandList, SIGNAL( doubleClicked(QListViewItem*) ),
- SLOT( executeCommand() ) );
+ connect( mCommandList, TQT_SIGNAL( doubleClicked(TQListViewItem*) ),
+ TQT_SLOT( executeCommand() ) );
- QPushButton *buttonAdd = new QPushButton( i18n("Add..."), commandBox );
+ TQPushButton *buttonAdd = new TQPushButton( i18n("Add..."), commandBox );
commandLayout->addWidget( buttonAdd );
- connect( buttonAdd, SIGNAL( clicked() ), SLOT( addCommand() ) );
+ connect( buttonAdd, TQT_SIGNAL( clicked() ), TQT_SLOT( addCommand() ) );
- QPushButton *buttonEdit = new QPushButton( i18n("Edit..."), commandBox );
+ TQPushButton *buttonEdit = new TQPushButton( i18n("Edit..."), commandBox );
commandLayout->addWidget( buttonEdit );
- connect( buttonEdit, SIGNAL( clicked() ), SLOT( editCommand() ) );
+ connect( buttonEdit, TQT_SIGNAL( clicked() ), TQT_SLOT( editCommand() ) );
- QPushButton *buttonDelete = new QPushButton( i18n("Delete"), commandBox );
+ TQPushButton *buttonDelete = new TQPushButton( i18n("Delete"), commandBox );
commandLayout->addWidget( buttonDelete );
- connect( buttonDelete, SIGNAL( clicked() ), SLOT( deleteCommand() ) );
+ connect( buttonDelete, TQT_SIGNAL( clicked() ), TQT_SLOT( deleteCommand() ) );
- QPushButton *buttonExecute = new QPushButton( i18n("Execute"), commandBox );
+ TQPushButton *buttonExecute = new TQPushButton( i18n("Execute"), commandBox );
commandLayout->addWidget( buttonExecute );
- connect( buttonExecute, SIGNAL( clicked() ), SLOT( executeCommand() ) );
+ connect( buttonExecute, TQT_SIGNAL( clicked() ), TQT_SLOT( executeCommand() ) );
- QSplitter *ioSplitter = new QSplitter( Vertical, mainSplitter );
+ TQSplitter *ioSplitter = new TQSplitter( Vertical, mainSplitter );
- QWidget *inBox = new QWidget( ioSplitter );
+ TQWidget *inBox = new TQWidget( ioSplitter );
- QBoxLayout *inLayout = new QVBoxLayout( inBox );
+ TQBoxLayout *inLayout = new TQVBoxLayout( inBox );
- QLabel *inLabel = new QLabel( i18n("Input:"), inBox );
+ TQLabel *inLabel = new TQLabel( i18n("Input:"), inBox );
inLabel->setMargin( 2 );
inLayout->addWidget( inLabel );
- mInput = new QTextEdit( inBox );
+ mInput = new TQTextEdit( inBox );
inLayout->addWidget( mInput );
- QWidget *outBox = new QWidget( ioSplitter );
+ TQWidget *outBox = new TQWidget( ioSplitter );
- QBoxLayout *outLayout = new QVBoxLayout( outBox );
+ TQBoxLayout *outLayout = new TQVBoxLayout( outBox );
- QLabel *outLabel = new QLabel( i18n( "Output:"), outBox );
+ TQLabel *outLabel = new TQLabel( i18n( "Output:"), outBox );
outLabel->setMargin( 2 );
outLayout->addWidget( outLabel );
- mOutput = new QTextEdit( outBox );
+ mOutput = new TQTextEdit( outBox );
mOutput->setReadOnly( true );
outLayout->addWidget( mOutput );
- QVBox *resultBox = new QVBox( mainSplitter );
+ TQVBox *resultBox = new TQVBox( mainSplitter );
- QLabel *resultLabel = new QLabel( i18n("Result:"), resultBox );
+ TQLabel *resultLabel = new TQLabel( i18n("Result:"), resultBox );
resultLabel->setMargin( 2 );
- mResultView = new QTextEdit( resultBox );
+ mResultView = new TQTextEdit( resultBox );
mResultView->setReadOnly( true );
- connect (mInput,SIGNAL(returnPressed()),SLOT(processLastLine()));
+ connect (mInput,TQT_SIGNAL(returnPressed()),TQT_SLOT(processLastLine()));
- connect(mScheduler->modem(),SIGNAL(gotLine(const char *)),
- SLOT(appendOutput(const char *)));
+ connect(mScheduler->modem(),TQT_SIGNAL(gotLine(const char *)),
+ TQT_SLOT(appendOutput(const char *)));
- connect(mScheduler,SIGNAL(result(const QString &)),
- mResultView,SLOT(setText(const QString &)));
- connect(mScheduler,SIGNAL(commandProcessed(ATCommand *)),
- SLOT(setResult(ATCommand *)));
+ connect(mScheduler,TQT_SIGNAL(result(const TQString &)),
+ mResultView,TQT_SLOT(setText(const TQString &)));
+ connect(mScheduler,TQT_SIGNAL(commandProcessed(ATCommand *)),
+ TQT_SLOT(setResult(ATCommand *)));
}
KandyView::~KandyView()
@@ -148,7 +148,7 @@ KandyView::~KandyView()
}
-void KandyView::print(QPainter *, int, int)
+void KandyView::print(TQPainter *, int, int)
{
// do the actual printing, here
// p->drawText(etc..)
@@ -158,12 +158,12 @@ void KandyView::importPhonebook()
{
#if 0
createMobileGui();
- connect (mMobileGui,SIGNAL(phonebookRead()),mMobileGui,SLOT(writeKab()));
+ connect (mMobileGui,TQT_SIGNAL(phonebookRead()),mMobileGui,TQT_SLOT(writeKab()));
mMobileGui->readPhonebook();
#endif
}
-void KandyView::slotSetTitle(const QString& title)
+void KandyView::slotSetTitle(const TQString& title)
{
emit signalChangeCaption(title);
}
@@ -212,7 +212,7 @@ void KandyView::addCommand()
int result = dlg->exec();
- if (result == QDialog::Accepted) {
+ if (result == TQDialog::Accepted) {
new CommandItem(mCommandList,cmd);
mScheduler->commandSet()->addCommand(cmd);
setModified();
@@ -223,7 +223,7 @@ void KandyView::addCommand()
void KandyView::editCommand()
{
- QListViewItem *item = mCommandList->currentItem();
+ TQListViewItem *item = mCommandList->currentItem();
if (item) {
CommandItem *cmdItem = (CommandItem *)item;
ATCommand *cmd = cmdItem->command();
@@ -232,7 +232,7 @@ void KandyView::editCommand()
int result = dlg->exec();
- if (result == QDialog::Accepted) {
+ if (result == TQDialog::Accepted) {
cmdItem->setItemText();
setModified();
}
@@ -244,13 +244,13 @@ void KandyView::executeCommand()
CommandItem *item = (CommandItem *)(mCommandList->currentItem());
if (item) {
ATCommand *cmd = item->command();
- QPtrList<ATParameter> paraList = cmd->parameters();
+ TQPtrList<ATParameter> paraList = cmd->parameters();
for(uint i=0;i<paraList.count();++i) {
ATParameter *p = paraList.at(i);
if (p->userInput()) {
bool ok = false;
- QString value = KInputDialog::getText(QString::null,
- i18n("Enter value for %1:").arg(p->name()),QString::null,&ok,this);
+ TQString value = KInputDialog::getText(TQString::null,
+ i18n("Enter value for %1:").arg(p->name()),TQString::null,&ok,this);
if (!ok)
return;
p->setValue(value);
@@ -271,13 +271,13 @@ void KandyView::deleteCommand()
}
}
-bool KandyView::loadFile(const QString& filename)
+bool KandyView::loadFile(const TQString& filename)
{
mCommandList->clear();
if (!mScheduler->loadProfile(filename)) return false;
- QPtrList<ATCommand> *cmds = mScheduler->commandSet()->commandList();
+ TQPtrList<ATCommand> *cmds = mScheduler->commandSet()->commandList();
for(uint i=0;i<cmds->count();++i) {
new CommandItem(mCommandList,cmds->at(i));
@@ -292,7 +292,7 @@ bool KandyView::loadFile(const QString& filename)
return true;
}
-bool KandyView::saveFile(const QString& filename)
+bool KandyView::saveFile(const TQString& filename)
{
if (!mScheduler->saveProfile(filename)) return false;
diff --git a/kandy/src/kandyview.h b/kandy/src/kandyview.h
index 259ee6c78..ed5171cac 100644
--- a/kandy/src/kandyview.h
+++ b/kandy/src/kandyview.h
@@ -24,7 +24,7 @@
#ifndef KANDYVIEW_H
#define KANDYVIEW_H
-#include <qwidget.h>
+#include <tqwidget.h>
class QPainter;
class QTextStream;
@@ -55,7 +55,7 @@ class KandyView : public QWidget
/**
* Default constructor
*/
- KandyView(CommandScheduler *,QWidget *parent);
+ KandyView(CommandScheduler *,TQWidget *parent);
/**
* Destructor
@@ -71,10 +71,10 @@ class KandyView : public QWidget
/**
* Print this view to any medium -- paper or not
*/
- void print(QPainter *, int height, int width);
+ void print(TQPainter *, int height, int width);
- bool loadFile(const QString& filename);
- bool saveFile(const QString& filename);
+ bool loadFile(const TQString& filename);
+ bool saveFile(const TQString& filename);
void setModified(bool modified=true);
bool isModified();
@@ -89,12 +89,12 @@ class KandyView : public QWidget
/**
* Use this signal to change the content of the statusbar
*/
- void signalChangeStatusbar(const QString& text);
+ void signalChangeStatusbar(const TQString& text);
/**
* Use this signal to change the content of the caption
*/
- void signalChangeCaption(const QString& text);
+ void signalChangeCaption(const TQString& text);
void modifiedChanged(bool);
@@ -104,21 +104,21 @@ class KandyView : public QWidget
void setResult(ATCommand *);
private slots:
- void slotSetTitle(const QString& title);
+ void slotSetTitle(const TQString& title);
void processLastLine();
private:
- QString mLastInput;
+ TQString mLastInput;
CommandScheduler *mScheduler;
bool mModified;
- QListView *mCommandList;
+ TQListView *mCommandList;
- QTextEdit *mInput;
- QTextEdit *mOutput;
- QTextEdit *mResultView;
+ TQTextEdit *mInput;
+ TQTextEdit *mOutput;
+ TQTextEdit *mResultView;
};
#endif // KANDYVIEW_H
diff --git a/kandy/src/main.cpp b/kandy/src/main.cpp
index 9343c1ece..982a1a7f2 100644
--- a/kandy/src/main.cpp
+++ b/kandy/src/main.cpp
@@ -22,7 +22,7 @@
without including the source code for Qt in the source distribution.
*/
-#include <qfile.h>
+#include <tqfile.h>
#include <kapplication.h>
#include <dcopclient.h>
@@ -128,25 +128,25 @@ int main(int argc, char **argv)
}
if (args->count() == 1) {
- k->load(QFile::decodeName(args->arg(0)));
+ k->load(TQFile::decodeName(args->arg(0)));
} else if (args->count() > 1) {
args->usage();
}
args->clear();
- QObject::connect(k,SIGNAL(showMobileWin()),m,SLOT(show()));
- QObject::connect(m,SIGNAL(showTerminalWin()),k,SLOT(show()));
- QObject::connect(m,SIGNAL(showPreferencesWin()),
- k,SLOT(optionsPreferences()));
+ TQObject::connect(k,TQT_SIGNAL(showMobileWin()),m,TQT_SLOT(show()));
+ TQObject::connect(m,TQT_SIGNAL(showTerminalWin()),k,TQT_SLOT(show()));
+ TQObject::connect(m,TQT_SIGNAL(showPreferencesWin()),
+ k,TQT_SLOT(optionsPreferences()));
- QObject::connect( m->view(), SIGNAL( connectModem() ), k,
- SLOT( modemConnect() ) );
- QObject::connect( m->view(), SIGNAL( disconnectModem() ), k,
- SLOT( modemDisconnect() ) );
+ TQObject::connect( m->view(), TQT_SIGNAL( connectModem() ), k,
+ TQT_SLOT( modemConnect() ) );
+ TQObject::connect( m->view(), TQT_SIGNAL( disconnectModem() ), k,
+ TQT_SLOT( modemDisconnect() ) );
- QObject::connect( modem, SIGNAL( errorMessage( const QString & ) ),
- k, SLOT( showErrorMessage( const QString & ) ) );
+ TQObject::connect( modem, TQT_SIGNAL( errorMessage( const TQString & ) ),
+ k, TQT_SLOT( showErrorMessage( const TQString & ) ) );
initModem( modem );
diff --git a/kandy/src/mobilegui.cpp b/kandy/src/mobilegui.cpp
index 374660902..14c828381 100644
--- a/kandy/src/mobilegui.cpp
+++ b/kandy/src/mobilegui.cpp
@@ -24,15 +24,15 @@
#include <time.h>
-#include <qlabel.h>
-#include <qlistview.h>
-#include <qfile.h>
-#include <qtextstream.h>
-#include <qmessagebox.h>
+#include <tqlabel.h>
+#include <tqlistview.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
+#include <tqmessagebox.h>
-#include <qtextedit.h>
-#include <qgroupbox.h>
-#include <qpushbutton.h>
+#include <tqtextedit.h>
+#include <tqgroupbox.h>
+#include <tqpushbutton.h>
#include <kdebug.h>
#include <kfiledialog.h>
@@ -71,8 +71,8 @@ class SyncEntry
class SyncEntryKab : public SyncEntry
{
public:
- SyncEntryKab( bool on, const QString &index, const QString &name,
- const QString &phone )
+ SyncEntryKab( bool on, const TQString &index, const TQString &name,
+ const TQString &phone )
{
mOn = on;
@@ -84,9 +84,9 @@ class SyncEntryKab : public SyncEntry
mPhoneNumberIndex = -1;
}
- QString mIndex;
- QString mName;
- QString mPhone;
+ TQString mIndex;
+ TQString mName;
+ TQString mPhone;
KABC::Addressee mAddressee;
int mKABindex;
@@ -97,8 +97,8 @@ class SyncEntryKab : public SyncEntry
class SyncEntryMobile : public SyncEntry
{
public:
- SyncEntryMobile( bool on, const QString &index, const QString &phone,
- const QString &name )
+ SyncEntryMobile( bool on, const TQString &index, const TQString &phone,
+ const TQString &name )
{
mOn = on;
mToBeDeleted = false;
@@ -108,9 +108,9 @@ class SyncEntryMobile : public SyncEntry
mPhone = phone;
}
- QString mIndex;
- QString mName;
- QString mPhone;
+ TQString mIndex;
+ TQString mName;
+ TQString mPhone;
bool mToBeDeleted;
};
@@ -142,24 +142,24 @@ class AddressSyncer
mCommonEntries.setAutoDelete( true );
}
- QPtrList<SyncEntryKab> mKabEntries;
- QPtrList<SyncEntryMobile> mMobileEntries;
- QPtrList<SyncEntryCommon> mCommonEntries;
+ TQPtrList<SyncEntryKab> mKabEntries;
+ TQPtrList<SyncEntryMobile> mMobileEntries;
+ TQPtrList<SyncEntryCommon> mCommonEntries;
};
class PhoneBookItem : public QCheckListItem
{
public:
- PhoneBookItem( QListView *v ) :
- QCheckListItem( v, "", QCheckListItem::CheckBox )
+ PhoneBookItem( TQListView *v ) :
+ TQCheckListItem( v, "", TQCheckListItem::CheckBox )
{
mSyncEntry = 0;
}
- PhoneBookItem( QListView *v, SyncEntry *syncEntry, const QString &name,
- const QString &phone, const QString &index ) :
- QCheckListItem( v, index, QCheckListItem::CheckBox )
+ PhoneBookItem( TQListView *v, SyncEntry *syncEntry, const TQString &name,
+ const TQString &phone, const TQString &index ) :
+ TQCheckListItem( v, index, TQCheckListItem::CheckBox )
{
mSyncEntry = syncEntry;
@@ -183,7 +183,7 @@ class PhoneBookItem : public QCheckListItem
* TRUE to construct a modal dialog.
*/
MobileGui::MobileGui( CommandScheduler *scheduler, KandyPrefs *kprefs,
- QWidget* parent, const char* name, WFlags fl ) :
+ TQWidget* parent, const char* name, WFlags fl ) :
DCOPObject( "KandyIface" ), MobileGui_base( parent, name, fl )
{
// Setup links to related classes
@@ -220,10 +220,10 @@ MobileGui::MobileGui( CommandScheduler *scheduler, KandyPrefs *kprefs,
setMobState( UNLOADED );
// Setup signal handlers
- connect( mScheduler, SIGNAL( commandProcessed( ATCommand * ) ),
- SLOT( processResult( ATCommand * ) ) );
- connect( mScheduler->modem(), SIGNAL( gotLine( const char * ) ),
- SLOT( termAddOutput( const char * ) ) );
+ connect( mScheduler, TQT_SIGNAL( commandProcessed( ATCommand * ) ),
+ TQT_SLOT( processResult( ATCommand * ) ) );
+ connect( mScheduler->modem(), TQT_SIGNAL( gotLine( const char * ) ),
+ TQT_SLOT( termAddOutput( const char * ) ) );
}
@@ -282,7 +282,7 @@ void MobileGui::readPhonebook()
mComingFromReadPhonebook = true;
if ( !warnMobState( LOADED ) ) {
mComingFromReadPhonebook = false;
- QString tmp = "";
+ TQString tmp = "";
ATCommand *cmd = new ATCommand( "+cpbr=" );
cmd->setAutoDelete( true );
@@ -345,13 +345,13 @@ void MobileGui::writePhonebook()
for ( uint i = 0; i < mSyncer->mMobileEntries.count(); i++ ) {
SyncEntryMobile *entry = mSyncer->mMobileEntries.at( i );
- QString id;
+ TQString id;
// Only process changed items of the mobile phonebook in
// order to save time.
if ( entry->mToBeUpdated || entry->mToBeInserted ) {
- QString tmp = "";
+ TQString tmp = "";
if ( entry->mToBeUpdated ) {
@@ -403,7 +403,7 @@ void MobileGui::writePhonebook()
if ( !mPBIndexOccupied[ theIndex - mPBStartIndex ] ) {
// Index of item to be deleted still is 0, so that index position
// wasn't reused. We must delete it explicitly.
- QString id = "+cpbw=" + entry->mIndex;
+ TQString id = "+cpbw=" + entry->mIndex;
mLastWriteId = id;
@@ -441,7 +441,7 @@ void MobileGui::writePhonebookPostProcessing()
} else
if ( mComingFromReadPhonebook ) {
mComingFromReadPhonebook = false;
- QString tmp = "";
+ TQString tmp = "";
ATCommand *cmd = new ATCommand( "+cpbr=" );
cmd->setAutoDelete( true );
@@ -463,7 +463,7 @@ void MobileGui::writePhonebookPostProcessing()
void MobileGui::setClock()
{
char *timeStr = new char[50];
- QString id = "+cclk=";
+ TQString id = "+cclk=";
ATCommand *cmd = new ATCommand( id );
@@ -474,7 +474,7 @@ void MobileGui::setClock()
struct tm *theTime = localtime( &tloc );
strftime( timeStr, 50, "%y/%m/%d,%T+00", theTime );
- QString Time = timeStr;
+ TQString Time = timeStr;
cmd->addParameter( new ATParameter( quote( Time ) ) );
mScheduler->execute( cmd );
@@ -500,7 +500,7 @@ void MobileGui::readKabc()
for ( it = addressBook->begin(); it != addressBook->end();
it++, kabIndex++ ) {
- QString index, name;
+ TQString index, name;
KABC::PhoneNumber phoneNumber;
KABC::PhoneNumber::List phoneNumbers = (*it).phoneNumbers();
KABC::PhoneNumber::List::Iterator it2;
@@ -512,7 +512,7 @@ void MobileGui::readKabc()
it2++, phoneNumberIndex++ ) {
bool excludeNumber = false;
phoneNumber = (*it2);
- QString phone = phoneNumber.number();
+ TQString phone = phoneNumber.number();
if ( (*mPrefs).excludeHome() &&
@@ -646,15 +646,15 @@ void MobileGui::readKabc()
}
-QString MobileGui::decodeSuffix( const QString &suffix )
+TQString MobileGui::decodeSuffix( const TQString &suffix )
{
- QString theSuffix = suffix;
+ TQString theSuffix = suffix;
// Check whether suffix is quoted. If so, it should be interpreted
// as Hex-Number of a special GSM character.
if ( ( theSuffix.left( 1 ) == "\"" ) && ( theSuffix.right( 1 ) == "\"" ) ) {
- QString tmp = "";
+ TQString tmp = "";
char suffixNumber = (char) dequote( suffix ).toUInt( 0, 16 );
tmp += suffixNumber;
@@ -665,9 +665,9 @@ QString MobileGui::decodeSuffix( const QString &suffix )
}
-void MobileGui::formatPBName( QString *name, QString suffix )
+void MobileGui::formatPBName( TQString *name, TQString suffix )
{
- QString theSuffix = decodeSuffix( suffix );
+ TQString theSuffix = decodeSuffix( suffix );
if ( name->length() + theSuffix.length() > mPBNameLength ) {
@@ -684,7 +684,7 @@ void MobileGui::formatPBName( QString *name, QString suffix )
}
-QString MobileGui::stripWhiteSpaces( const QString &theString )
+TQString MobileGui::stripWhiteSpaces( const TQString &theString )
{
int pos = 0;
int len = theString.length();
@@ -726,7 +726,7 @@ void MobileGui::writeKabc()
for ( uint i = 0; i < mSyncer->mKabEntries.count(); i++ ) {
SyncEntryKab *kabEntry = mSyncer->mKabEntries.at( i );
- QString phoneNumber = kabEntry->mPhone;
+ TQString phoneNumber = kabEntry->mPhone;
if ( kabEntry->mToBeUpdated ) {
@@ -751,7 +751,7 @@ void MobileGui::writeKabc()
bool goon = true;
KABC::AddressBook::Iterator it;
bool equivalentEntryFound = false;
- QString name = kabEntry->mName;
+ TQString name = kabEntry->mName;
//
@@ -759,7 +759,7 @@ void MobileGui::writeKabc()
// If a suffix is found, remove it from the name.
//
if ( goon && (*mPrefs).useHomeSuff() ) {
- QString theSuffix = decodeSuffix( (*mPrefs).homeSuff() );
+ TQString theSuffix = decodeSuffix( (*mPrefs).homeSuff() );
if ( name.right( theSuffix.length() ) == theSuffix ) {
phoneType = KABC::PhoneNumber::Home;
name = stripWhiteSpaces(
@@ -768,7 +768,7 @@ void MobileGui::writeKabc()
}
}
if ( goon && (*mPrefs).useWorkSuff() ) {
- QString theSuffix = decodeSuffix( (*mPrefs).workSuff() );
+ TQString theSuffix = decodeSuffix( (*mPrefs).workSuff() );
if ( name.right( theSuffix.length() ) == theSuffix ) {
phoneType = KABC::PhoneNumber::Work;
name = stripWhiteSpaces(
@@ -777,7 +777,7 @@ void MobileGui::writeKabc()
}
}
if ( goon && (*mPrefs).useMessagingSuff() ) {
- QString theSuffix = decodeSuffix( (*mPrefs).messagingSuff() );
+ TQString theSuffix = decodeSuffix( (*mPrefs).messagingSuff() );
if ( name.right( theSuffix.length() ) == theSuffix ) {
phoneType = KABC::PhoneNumber::Msg;
name = stripWhiteSpaces(
@@ -786,7 +786,7 @@ void MobileGui::writeKabc()
}
}
if ( goon && (*mPrefs).useFaxSuff() ) {
- QString theSuffix = decodeSuffix( (*mPrefs).faxSuff() );
+ TQString theSuffix = decodeSuffix( (*mPrefs).faxSuff() );
if ( name.right( theSuffix.length() ) == theSuffix ) {
phoneType = KABC::PhoneNumber::Fax;
name = stripWhiteSpaces(
@@ -795,7 +795,7 @@ void MobileGui::writeKabc()
}
}
if ( goon && (*mPrefs).useCellSuff() ) {
- QString theSuffix = decodeSuffix( (*mPrefs).cellSuff() );
+ TQString theSuffix = decodeSuffix( (*mPrefs).cellSuff() );
if ( name.right( theSuffix.length() ) == theSuffix ) {
phoneType = KABC::PhoneNumber::Cell;
name = stripWhiteSpaces(
@@ -804,7 +804,7 @@ void MobileGui::writeKabc()
}
}
if ( goon && (*mPrefs).useVideoSuff() ) {
- QString theSuffix = decodeSuffix( (*mPrefs).videoSuff() );
+ TQString theSuffix = decodeSuffix( (*mPrefs).videoSuff() );
if ( name.right( theSuffix.length() ) == theSuffix ) {
phoneType = KABC::PhoneNumber::Video;
name = stripWhiteSpaces(
@@ -813,7 +813,7 @@ void MobileGui::writeKabc()
}
}
if ( goon && (*mPrefs).useMailboxSuff() ) {
- QString theSuffix = decodeSuffix( (*mPrefs).mailboxSuff() );
+ TQString theSuffix = decodeSuffix( (*mPrefs).mailboxSuff() );
if ( name.right( theSuffix.length() ) == theSuffix ) {
phoneType = KABC::PhoneNumber::Bbs;
name = stripWhiteSpaces(
@@ -822,7 +822,7 @@ void MobileGui::writeKabc()
}
}
if ( goon && (*mPrefs).useModemSuff() ) {
- QString theSuffix = decodeSuffix( (*mPrefs).modemSuff() );
+ TQString theSuffix = decodeSuffix( (*mPrefs).modemSuff() );
if ( name.right( theSuffix.length() ) == theSuffix ) {
phoneType = KABC::PhoneNumber::Modem;
name = stripWhiteSpaces(
@@ -831,7 +831,7 @@ void MobileGui::writeKabc()
}
}
if ( goon && (*mPrefs).useCarSuff() ) {
- QString theSuffix = decodeSuffix( (*mPrefs).carSuff() );
+ TQString theSuffix = decodeSuffix( (*mPrefs).carSuff() );
if ( name.right( theSuffix.length() ) == theSuffix ) {
phoneType = KABC::PhoneNumber::Car;
name = stripWhiteSpaces(
@@ -840,7 +840,7 @@ void MobileGui::writeKabc()
}
}
if ( goon && (*mPrefs).useISDNSuff() ) {
- QString theSuffix = decodeSuffix( (*mPrefs).iSDNSuff() );
+ TQString theSuffix = decodeSuffix( (*mPrefs).iSDNSuff() );
if ( name.right( theSuffix.length() ) == theSuffix ) {
phoneType = KABC::PhoneNumber::Isdn;
name = stripWhiteSpaces(
@@ -849,7 +849,7 @@ void MobileGui::writeKabc()
}
}
if ( goon && (*mPrefs).usePagerSuff() ) {
- QString theSuffix = decodeSuffix( (*mPrefs).pagerSuff() );
+ TQString theSuffix = decodeSuffix( (*mPrefs).pagerSuff() );
if ( name.right( theSuffix.length() ) == theSuffix ) {
phoneType = KABC::PhoneNumber::Pager;
name = stripWhiteSpaces(
@@ -865,7 +865,7 @@ void MobileGui::writeKabc()
//
for ( it = addressBook->begin(); it != addressBook->end(); it++ ) {
- QString kabName = (*it).familyName();
+ TQString kabName = (*it).familyName();
KABC::AddressBook::Iterator it3;
KABC::Addressee::List tmp;
bool firstCharIsUnique = true;
@@ -916,15 +916,15 @@ void MobileGui::writeKabc()
if ( !equivalentEntryFound ) {
KABC::Addressee entry;
- QStringList *fields = new QStringList;
+ TQStringList *fields = new QStringList;
- *fields = QStringList::split( ',', name );
+ *fields = TQStringList::split( ',', name );
if ( fields->count() > 1 ) {
// Name string contains comma separated entry so that we
// need to build family and given names out of them.
- QString givenName = "";
+ TQString givenName = "";
entry.setFamilyName( stripWhiteSpaces( (*fields)[ 0 ] ) );
@@ -985,8 +985,8 @@ void MobileGui::processResult( ATCommand *command )
else
if ( command->id() == "+cpbr=?" )
{
- QStringList tmpList = QStringList::split( "-", command->resultField( 0 ) );
- QString tmpString = tmpList.first().right( tmpList.first().length() - 1 );
+ TQStringList tmpList = TQStringList::split( "-", command->resultField( 0 ) );
+ TQString tmpString = tmpList.first().right( tmpList.first().length() - 1 );
mPBStartIndex = tmpString.toUInt();
mPBNameLength = command->resultField( 2 ).toUInt();
} else
@@ -1010,13 +1010,13 @@ void MobileGui::processResult( ATCommand *command )
writePhonebookPostProcessing();
else
if ( command->id() == "+cpbs=?" ) {
- QPtrList<QStringList> *list = command->resultFields();
- QStringList *fields = list->first();
+ TQPtrList<TQStringList> *list = command->resultFields();
+ TQStringList *fields = list->first();
while( fields ) {
for ( unsigned int i = 0; i < fields->count(); i++ ) {
- QString memory = dequote( (*fields)[ i ] );
+ TQString memory = dequote( (*fields)[ i ] );
if ( memory == "FD" )
@@ -1051,9 +1051,9 @@ void MobileGui::processResult( ATCommand *command )
}
-QString MobileGui::noSpaces( const QString &theString )
+TQString MobileGui::noSpaces( const TQString &theString )
{
- QString result = "";
+ TQString result = "";
for ( unsigned int i = 0; i < theString.length(); i++ )
@@ -1083,9 +1083,9 @@ int MobileGui::firstFreeIndex()
}
-QString MobileGui::string2GSM( const QString &theString )
+TQString MobileGui::string2GSM( const TQString &theString )
{
- QString result = "";
+ TQString result = "";
for ( unsigned int i = 0; i < theString.length(); i++ )
@@ -1107,9 +1107,9 @@ QString MobileGui::string2GSM( const QString &theString )
}
-QString MobileGui::GSM2String( const QString &theString )
+TQString MobileGui::GSM2String( const TQString &theString )
{
- QString result = "";
+ TQString result = "";
for ( unsigned int i = 0; i < theString.length(); i++ )
@@ -1135,17 +1135,17 @@ void MobileGui::fillPhonebook( ATCommand *cmd )
{
mSyncer->mMobileEntries.clear();
- QPtrList<QStringList> *list = cmd->resultFields();
- QStringList *fields = list->first();
+ TQPtrList<TQStringList> *list = cmd->resultFields();
+ TQStringList *fields = list->first();
while( fields ) {
if ( fields->count() != 4 )
kdDebug() << "Error! Unexpected number of address fields." << endl;
else {
- QString index = (*fields)[0];
- QString phone = (*fields)[1];
- QString type = (*fields)[2];
- QString name = GSM2String( (*fields)[3] );
+ TQString index = (*fields)[0];
+ TQString phone = (*fields)[1];
+ TQString type = (*fields)[2];
+ TQString name = GSM2String( (*fields)[3] );
SyncEntryMobile *phoneEntry = new SyncEntryMobile( true, dequote( index ),
dequote( phone ),
@@ -1166,7 +1166,7 @@ void MobileGui::fillPhonebook( ATCommand *cmd )
}
-QString MobileGui::quote( const QString &str )
+TQString MobileGui::quote( const TQString &str )
{
if ( ( str.left(1) == "\"" ) && ( str.right(1) == "\"" ) )
return str;
@@ -1175,7 +1175,7 @@ QString MobileGui::quote( const QString &str )
}
-QString MobileGui::dequote( const QString &str )
+TQString MobileGui::dequote( const TQString &str )
{
int pos = 0;
int len = str.length();
@@ -1198,11 +1198,11 @@ void MobileGui::savePhonebook()
if ( mMobState == UNLOADED )
return;
- QString fileName = KFileDialog::getSaveFileName( "phonebook.csv" );
- QFile outFile( fileName );
+ TQString fileName = KFileDialog::getSaveFileName( "phonebook.csv" );
+ TQFile outFile( fileName );
if ( outFile.open( IO_WriteOnly ) ) {
- QTextStream t( &outFile ); // use a text stream
+ TQTextStream t( &outFile ); // use a text stream
for( uint i = 0; i < mSyncer->mMobileEntries.count(); i++) {
SyncEntryMobile *e = mSyncer->mMobileEntries.at( i );
@@ -1310,16 +1310,16 @@ void MobileGui::mergePhonebooks()
} else {
// Conflict: 2 Entries have same name but different numbers.
// Prompt user.
- QString text = "<qt><b>" + i18n( "Kab Entry:" ) + "</b><br>";
+ TQString text = "<qt><b>" + i18n( "Kab Entry:" ) + "</b><br>";
text += " " + theCommonEntry->mKabEntry->mName + " " +
theCommonEntry->mKabEntry->mPhone + "<br>";
text += "<b>" + i18n( "Mobile Entry:" ) + "</b><br>";
text += " " + mobileEntry->mName + " " + mobileEntry->mPhone;
text += "</qt>";
- QMessageBox *msg =
- new QMessageBox( i18n( "Conflicting Entries" ), text,
- QMessageBox::Warning, 1, 2, 0, this );
+ TQMessageBox *msg =
+ new TQMessageBox( i18n( "Conflicting Entries" ), text,
+ TQMessageBox::Warning, 1, 2, 0, this );
msg->setButtonText( 1, i18n( "Use Kab Entry" ) );
msg->setButtonText( 2, i18n( "Use Mobile Entry" ) );
@@ -1560,12 +1560,12 @@ void MobileGui::setKabState( ABState newState )
void MobileGui::warnKabState( ABState newState )
{
if ( ( mKabState == MODIFIED ) && ( newState != MODIFIED ) ) {
- QString text = "<qt><b>" + i18n( "Warning" ) + "</b><br>";
+ TQString text = "<qt><b>" + i18n( "Warning" ) + "</b><br>";
text += i18n( "The KDE address book contains unsaved changes." ) +
"<br></qt>";
- QMessageBox *msg = new QMessageBox( i18n( "Unsaved Changes" ), text,
- QMessageBox::Critical, 1, 2, 0, this );
+ TQMessageBox *msg = new TQMessageBox( i18n( "Unsaved Changes" ), text,
+ TQMessageBox::Critical, 1, 2, 0, this );
msg->setButtonText( 1, i18n( "Save" ) );
msg->setButtonText( 2, i18n( "Discard" ) );
@@ -1645,12 +1645,12 @@ bool MobileGui::warnMobState( ABState newState )
{
if ( ( mMobState == MODIFIED ) && ( newState != MODIFIED ) )
{
- QString text = "<qt><b>" + i18n( "Warning" ) + "</b><br>";
+ TQString text = "<qt><b>" + i18n( "Warning" ) + "</b><br>";
text += i18n( "The mobile phone book contains unsaved changes." ) +
"<br></qt>";
- QMessageBox *msg = new QMessageBox( i18n( "Unsaved Changes" ), text,
- QMessageBox::Critical, 1, 2, 0, this );
+ TQMessageBox *msg = new TQMessageBox( i18n( "Unsaved Changes" ), text,
+ TQMessageBox::Critical, 1, 2, 0, this );
msg->setButtonText( 1, i18n( "Save" ) );
msg->setButtonText( 2, i18n( "Discard" ) );
diff --git a/kandy/src/mobilegui.h b/kandy/src/mobilegui.h
index b3dbd33ff..2d0f3b073 100644
--- a/kandy/src/mobilegui.h
+++ b/kandy/src/mobilegui.h
@@ -28,7 +28,7 @@
#include "mobilegui_base.h"
#include "kandyprefs.h"
-#include "qvaluevector.h"
+#include "tqvaluevector.h"
class CommandScheduler;
@@ -41,18 +41,18 @@ class MobileGui : public MobileGui_base, virtual public KandyIface
Q_OBJECT
public:
- MobileGui( CommandScheduler *, KandyPrefs *kprefs, QWidget* parent=0,
+ MobileGui( CommandScheduler *, KandyPrefs *kprefs, TQWidget* parent=0,
const char* name=0, WFlags fl=0 );
~MobileGui();
void exit();
signals:
- void sendCommand( const QString & );
+ void sendCommand( const TQString & );
void phonebookRead();
- void statusMessage( const QString & );
- void transientStatusMessage( const QString & );
+ void statusMessage( const TQString & );
+ void transientStatusMessage( const TQString & );
void connectModem();
void disconnectModem();
@@ -79,18 +79,18 @@ class MobileGui : public MobileGui_base, virtual public KandyIface
CommandScheduler *mScheduler;
AddressSyncer *mSyncer;
KandyPrefs *mPrefs;
- QWidget *mparent;
+ TQWidget *mparent;
/* String Formatting Routines */
- QString quote( const QString & );
- QString dequote( const QString & );
- void formatPBName( QString *, QString );
- QString noSpaces( const QString & );
+ TQString quote( const TQString & );
+ TQString dequote( const TQString & );
+ void formatPBName( TQString *, TQString );
+ TQString noSpaces( const TQString & );
int firstFreeIndex();
- QString string2GSM( const QString & );
- QString GSM2String( const QString & );
- QString decodeSuffix( const QString & );
- QString stripWhiteSpaces( const QString & );
+ TQString string2GSM( const TQString & );
+ TQString GSM2String( const TQString & );
+ TQString decodeSuffix( const TQString & );
+ TQString stripWhiteSpaces( const TQString & );
/* Routines for GUI updates */
void updateKabBook();
@@ -98,12 +98,12 @@ class MobileGui : public MobileGui_base, virtual public KandyIface
void disconnectGUI();
/* Phone specific items */
- QString mMobManufacturer;
- QString mMobModel;
+ TQString mMobManufacturer;
+ TQString mMobModel;
unsigned int mPBStartIndex;
unsigned int mPBLength;
unsigned int mPBNameLength;
- QValueVector<bool> mPBIndexOccupied;
+ TQValueVector<bool> mPBIndexOccupied;
bool mMobHasFD;
bool mMobHasLD;
bool mMobHasME;
@@ -114,7 +114,7 @@ class MobileGui : public MobileGui_base, virtual public KandyIface
bool mMobHasRC;
/* Routines and Flags for asynchronous control flow */
- QString mLastWriteId;
+ TQString mLastWriteId;
bool mComingFromToggleConnection;
bool mComingFromReadPhonebook;
bool mComingFromSyncPhonebooks;
diff --git a/kandy/src/mobilemain.cpp b/kandy/src/mobilemain.cpp
index 118ee7f4e..6143dec7b 100644
--- a/kandy/src/mobilemain.cpp
+++ b/kandy/src/mobilemain.cpp
@@ -39,7 +39,7 @@
#include <kaction.h>
#include <kstdaction.h>
-#include <qpushbutton.h>
+#include <tqpushbutton.h>
#include "mobilegui.h"
@@ -55,10 +55,10 @@ MobileMain::MobileMain(CommandScheduler *scheduler, KandyPrefs *prefs)
setupActions();
statusBar()->insertItem(i18n(" Disconnected "),1,0,true);
- connect(mView,SIGNAL(statusMessage(const QString &)),
- SLOT(showStatusMessage(const QString &)));
- connect(mView,SIGNAL(transientStatusMessage(const QString &)),
- SLOT(showTransientStatusMessage(const QString &)));
+ connect(mView,TQT_SIGNAL(statusMessage(const TQString &)),
+ TQT_SLOT(showStatusMessage(const TQString &)));
+ connect(mView,TQT_SIGNAL(transientStatusMessage(const TQString &)),
+ TQT_SLOT(showTransientStatusMessage(const TQString &)));
statusBar()->show();
@@ -71,17 +71,17 @@ MobileMain::~MobileMain()
void MobileMain::setupActions()
{
- KStdAction::quit(this, SLOT(close()), actionCollection());
+ KStdAction::quit(this, TQT_SLOT(close()), actionCollection());
- new KAction(i18n("Terminal"),0,this,SLOT(showTerminal()),
+ new KAction(i18n("Terminal"),0,this,TQT_SLOT(showTerminal()),
actionCollection(),"show_terminal");
createStandardStatusBarAction();
setStandardToolBarMenuEnabled(true);
- KStdAction::keyBindings(this, SLOT(optionsConfigureKeys()), actionCollection());
- KStdAction::configureToolbars(this, SLOT(optionsConfigureToolbars()), actionCollection());
- KStdAction::preferences(this, SLOT(optionsPreferences()), actionCollection());
+ KStdAction::keyBindings(this, TQT_SLOT(optionsConfigureKeys()), actionCollection());
+ KStdAction::configureToolbars(this, TQT_SLOT(optionsConfigureToolbars()), actionCollection());
+ KStdAction::preferences(this, TQT_SLOT(optionsPreferences()), actionCollection());
createGUI("kandymobileui.rc");
}
@@ -101,7 +101,7 @@ void MobileMain::readProperties(KConfig */*config*/)
// in 'saveProperties'
}
-void MobileMain::dragEnterEvent(QDragEnterEvent *event)
+void MobileMain::dragEnterEvent(TQDragEnterEvent *event)
{
// do nothing
KMainWindow::dragEnterEvent(event);
@@ -110,7 +110,7 @@ void MobileMain::dragEnterEvent(QDragEnterEvent *event)
// event->accept(KURLDrag::canDecode(event));
}
-void MobileMain::dropEvent(QDropEvent *event)
+void MobileMain::dropEvent(TQDropEvent *event)
{
// this is a very simplistic implementation of a drop event. we
// will only accept a dropped URL. the Qt dnd code can do *much*
@@ -130,7 +130,7 @@ void MobileMain::optionsConfigureToolbars()
// use the standard toolbar editor
saveMainWindowSettings( KGlobal::config(), autoSaveGroup() );
KEditToolbar dlg(actionCollection());
- connect(&dlg, SIGNAL(newToolbarConfig()), this, SLOT(newToolbarConfig()));
+ connect(&dlg, TQT_SIGNAL(newToolbarConfig()), this, TQT_SLOT(newToolbarConfig()));
dlg.exec();
}
@@ -146,19 +146,19 @@ void MobileMain::optionsPreferences()
emit showPreferencesWin();
}
-void MobileMain::showStatusMessage(const QString& text)
+void MobileMain::showStatusMessage(const TQString& text)
{
// display the text on the statusbar
statusBar()->message(text);
}
-void MobileMain::showTransientStatusMessage(const QString& text)
+void MobileMain::showTransientStatusMessage(const TQString& text)
{
// display the text on the statusbar for 2 s.
statusBar()->message(text,2000);
}
-void MobileMain::changeCaption(const QString& text)
+void MobileMain::changeCaption(const TQString& text)
{
// display the text on the caption
setCaption(text);
diff --git a/kandy/src/mobilemain.h b/kandy/src/mobilemain.h
index 091d0de0e..46c8bc576 100644
--- a/kandy/src/mobilemain.h
+++ b/kandy/src/mobilemain.h
@@ -67,8 +67,8 @@ class MobileMain : public KMainWindow
/**
* Overridden virtuals for Qt drag 'n drop (XDND)
*/
- virtual void dragEnterEvent(QDragEnterEvent *event);
- virtual void dropEvent(QDropEvent *event);
+ virtual void dragEnterEvent(TQDragEnterEvent *event);
+ virtual void dropEvent(TQDropEvent *event);
bool queryClose();
@@ -94,9 +94,9 @@ class MobileMain : public KMainWindow
void optionsPreferences();
void newToolbarConfig();
- void showStatusMessage(const QString& text);
- void showTransientStatusMessage(const QString& text);
- void changeCaption(const QString& text);
+ void showStatusMessage(const TQString& text);
+ void showTransientStatusMessage(const TQString& text);
+ void changeCaption(const TQString& text);
private:
diff --git a/kandy/src/modem.cpp b/kandy/src/modem.cpp
index 3341ad589..a7d246950 100644
--- a/kandy/src/modem.cpp
+++ b/kandy/src/modem.cpp
@@ -40,7 +40,7 @@
#include <pwd.h>
#include <errno.h>
-#include <qglobal.h>
+#include <tqglobal.h>
#include <klocale.h>
#include <kdebug.h>
@@ -74,16 +74,16 @@
-Modem::Modem( KandyPrefs *kprefs, QObject *parent, const char *name ) :
- QObject(parent, name)
+Modem::Modem( KandyPrefs *kprefs, TQObject *parent, const char *name ) :
+ TQObject(parent, name)
{
mOpen = false;
prefs = kprefs;
- timer = new QTimer( this, "modemtimer" );
+ timer = new TQTimer( this, "modemtimer" );
Q_CHECK_PTR( timer );
- connect( timer, SIGNAL( timeout() ), SLOT( timerDone() ) );
+ connect( timer, TQT_SIGNAL( timeout() ), TQT_SLOT( timerDone() ) );
init();
xreset();
@@ -191,7 +191,7 @@ bool Modem::open()
if ( !lockDevice() )
return false;
- QCString dev = QFile::encodeName( (*prefs).serialDevice() );
+ TQCString dev = TQFile::encodeName( (*prefs).serialDevice() );
const char *fdev = dev.data();
if ( ( fd = ::open( fdev, O_RDWR | O_NOCTTY | O_NONBLOCK ) ) == -1 ) {
emit errorMessage( i18n( "Unable to open device '%1'. "
@@ -226,10 +226,10 @@ bool Modem::open()
return false;
}
- sn = new QSocketNotifier( fd, QSocketNotifier::Read, this,
+ sn = new TQSocketNotifier( fd, TQSocketNotifier::Read, this,
"modemsocketnotifier" );
Q_CHECK_PTR( sn );
- connect( sn, SIGNAL( activated( int ) ), SLOT( readChar( int ) ) );
+ connect( sn, TQT_SIGNAL( activated( int ) ), TQT_SLOT( readChar( int ) ) );
mOpen = true;
@@ -287,17 +287,17 @@ bool Modem::lockDevice()
pid_t pid;
int lfd;
struct passwd *pw;
- QStringList pathList;
- QString fileName, content;
+ TQStringList pathList;
+ TQString fileName, content;
- pathList = QStringList::split( "/", (*prefs).serialDevice() );
+ pathList = TQStringList::split( "/", (*prefs).serialDevice() );
fileName = (*prefs).lockDirectory() + "/LCK.." + pathList.last();
- if ( !access( QFile::encodeName( fileName ).data(), F_OK ) ) {
+ if ( !access( TQFile::encodeName( fileName ).data(), F_OK ) ) {
char buf[256];
- if ( ( lfd = ::open( QFile::encodeName( fileName ), O_RDONLY ) ) < 0 ) {
+ if ( ( lfd = ::open( TQFile::encodeName( fileName ), O_RDONLY ) ) < 0 ) {
emit errorMessage( i18n( "Unable to open lock file '%1'.")
.arg( fileName ) );
return false;
@@ -333,7 +333,7 @@ bool Modem::lockDevice()
}
}
- if ( ( lfd = creat( QFile::encodeName( fileName ).data(), 0644 ) ) == -1 ) {
+ if ( ( lfd = creat( TQFile::encodeName( fileName ).data(), 0644 ) ) == -1 ) {
emit errorMessage( i18n( "Unable to create lock file '%1'. "
"Please check that you have sufficient permissions.")
.arg( fileName ) );
@@ -343,7 +343,7 @@ bool Modem::lockDevice()
pid = (int) getpid();
pw = getpwuid( getuid() );
content.sprintf( "%08d %s %s", pid, "kandy", pw->pw_name );
- write( lfd, QFile::encodeName( content ).data(), content.length() );
+ write( lfd, TQFile::encodeName( content ).data(), content.length() );
::close( lfd );
is_locked = true;
@@ -359,9 +359,9 @@ void Modem::unlockDevice()
dev_unlock( (*prefs).serialDevice().local8Bit(), getpid() );
#else
if ( is_locked ) {
- QStringList pathList = QStringList::split( "/", (*prefs).serialDevice() );
+ TQStringList pathList = TQStringList::split( "/", (*prefs).serialDevice() );
- QFile::remove( (*prefs).lockDirectory() + "/LCK.." + pathList.last() );
+ TQFile::remove( (*prefs).lockDirectory() + "/LCK.." + pathList.last() );
is_locked = false;
}
#endif
@@ -438,7 +438,7 @@ void Modem::timerStart( int msec )
void Modem::receiveXModem( bool crc )
{
disconnect( sn, 0, this, 0 );
- connect( sn, SIGNAL( activated( int ) ), SLOT( readXChar( int ) ) );
+ connect( sn, TQT_SIGNAL( activated( int ) ), TQT_SLOT( readXChar( int ) ) );
xcrc = crc;
@@ -664,7 +664,7 @@ void Modem::xreset()
if ( sn ) {
disconnect( sn, 0, this, 0 );
- connect( sn, SIGNAL( activated( int ) ), SLOT( readChar( int ) ) );
+ connect( sn, TQT_SIGNAL( activated( int ) ), TQT_SLOT( readChar( int ) ) );
}
}
diff --git a/kandy/src/modem.h b/kandy/src/modem.h
index ecb0cfe91..52321894f 100644
--- a/kandy/src/modem.h
+++ b/kandy/src/modem.h
@@ -32,11 +32,11 @@
#include <termios.h>
-#include <qobject.h>
-#include <qstring.h>
-#include <qtimer.h>
-#include <qsocketnotifier.h>
-#include <qfile.h>
+#include <tqobject.h>
+#include <tqstring.h>
+#include <tqtimer.h>
+#include <tqsocketnotifier.h>
+#include <tqfile.h>
#include "kandyprefs.h"
@@ -47,7 +47,7 @@ class Modem : public QObject
{
Q_OBJECT
public:
- Modem(KandyPrefs *kprefs, QObject *parent = 0, const char *name = 0);
+ Modem(KandyPrefs *kprefs, TQObject *parent = 0, const char *name = 0);
virtual ~Modem();
void setSpeed(int speed);
@@ -98,8 +98,8 @@ private:
tcflag_t cflag;
int fd;
- QTimer *timer;
- QSocketNotifier *sn;
+ TQTimer *timer;
+ TQSocketNotifier *sn;
uchar buffer[1024];
int bufpos;
@@ -117,7 +117,7 @@ signals:
void xmodemDone(bool);
void timeout();
- void errorMessage( const QString & );
+ void errorMessage( const TQString & );
};
diff --git a/karm/csvexportdialog.cpp b/karm/csvexportdialog.cpp
index 4a5536d40..f1e0fce66 100644
--- a/karm/csvexportdialog.cpp
+++ b/karm/csvexportdialog.cpp
@@ -25,15 +25,15 @@
#include <klocale.h>
#include <kpushbutton.h>
#include <kurlrequester.h>
-#include <qbuttongroup.h>
-#include <qcombobox.h>
-#include <qradiobutton.h>
+#include <tqbuttongroup.h>
+#include <tqcombobox.h>
+#include <tqradiobutton.h>
#include "csvexportdialog.h"
#include "reportcriteria.h"
CSVExportDialog::CSVExportDialog( ReportCriteria::REPORTTYPE rt,
- QWidget *parent,
+ TQWidget *parent,
const char *name
)
: CSVExportDialogBase( parent, name )
@@ -55,7 +55,7 @@ CSVExportDialog::CSVExportDialog( ReportCriteria::REPORTTYPE rt,
// If decimal symbol is a comma, then default field seperator to semi-colon.
// In France and Germany, one-and-a-half is written as 1,5 not 1.5
- QString d = KGlobal::locale()->decimalSymbol();
+ TQString d = KGlobal::locale()->decimalSymbol();
if ( "," == d ) CSVExportDialogBase::radioSemicolon->setChecked(true);
else CSVExportDialogBase::radioComma->setChecked(true);
@@ -83,10 +83,10 @@ ReportCriteria CSVExportDialog::reportCriteria()
// moment.
rc.allTasks = true;
- QString t = grpTimeFormat->selected()->name();
+ TQString t = grpTimeFormat->selected()->name();
rc.decimalMinutes = ( t == i18n( "radioDecimal" ) );
- QString d = grpDelimiter->selected()->name();
+ TQString d = grpDelimiter->selected()->name();
if ( d == "radioComma" ) rc.delimiter = ",";
else if ( d == "radioTab" ) rc.delimiter = "\t";
else if ( d == "radioSemicolon" ) rc.delimiter = ";";
diff --git a/karm/csvexportdialog.h b/karm/csvexportdialog.h
index eae6bd4ab..fe13cf9c6 100644
--- a/karm/csvexportdialog.h
+++ b/karm/csvexportdialog.h
@@ -30,7 +30,7 @@ class CSVExportDialog : public CSVExportDialogBase
public:
CSVExportDialog( ReportCriteria::REPORTTYPE rt,
- QWidget *parent = 0,
+ TQWidget *parent = 0,
const char *name = 0
);
diff --git a/karm/desktoplist.h b/karm/desktoplist.h
index ab8404822..5956d0e7f 100644
--- a/karm/desktoplist.h
+++ b/karm/desktoplist.h
@@ -1,8 +1,8 @@
#ifndef KARM_DESKTOP_LIST_H
#define KARM_DESKTOP_LIST_H
-#include <qvaluevector.h>
+#include <tqvaluevector.h>
-typedef QValueVector<int> DesktopList;
+typedef TQValueVector<int> DesktopList;
#endif // KARM_DESKTOP_LIST_H
diff --git a/karm/desktoptracker.cpp b/karm/desktoptracker.cpp
index 52eb67210..deab87548 100644
--- a/karm/desktoptracker.cpp
+++ b/karm/desktoptracker.cpp
@@ -1,6 +1,6 @@
#include <algorithm> // std::find
-#include <qtimer.h>
+#include <tqtimer.h>
#include <kdebug.h>
#include "desktoptracker.h"
@@ -11,8 +11,8 @@ const int minimumInterval = 5; // seconds
DesktopTracker::DesktopTracker ()
{
// Setup desktop change handling
- connect( &kWinModule, SIGNAL( currentDesktopChanged(int) ),
- this, SLOT( handleDesktopChange(int) ));
+ connect( &kWinModule, TQT_SIGNAL( currentDesktopChanged(int) ),
+ this, TQT_SLOT( handleDesktopChange(int) ));
_desktopCount = kWinModule.numberOfDesktops();
_previousDesktop = kWinModule.currentDesktop()-1;
@@ -20,8 +20,8 @@ DesktopTracker::DesktopTracker ()
// currentDesktop will return 0 if no window manager is started
if( _previousDesktop < 0 ) _previousDesktop = 0;
- _timer = new QTimer(this);
- connect( _timer, SIGNAL( timeout() ), this, SLOT( changeTimers() ) );
+ _timer = new TQTimer(this);
+ connect( _timer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( changeTimers() ) );
}
void DesktopTracker::handleDesktopChange( int desktop )
@@ -57,9 +57,9 @@ void DesktopTracker::changeTimers()
// emit updateButtons();
}
-QString DesktopTracker::startTracking()
+TQString DesktopTracker::startTracking()
{
- QString err;
+ TQString err;
int currentDesktop = kWinModule.currentDesktop() -1;
// TODO: removed? fixed by Lubos?
// currentDesktop will return 0 if no window manager is started
diff --git a/karm/desktoptracker.h b/karm/desktoptracker.h
index fee7a026f..a0377b68d 100644
--- a/karm/desktoptracker.h
+++ b/karm/desktoptracker.h
@@ -25,7 +25,7 @@ class DesktopTracker: public QObject
public:
DesktopTracker();
void printTrackers();
- QString startTracking();
+ TQString startTracking();
void registerForDesktops( Task* task, DesktopList dl );
int desktopCount() const { return _desktopCount; };
@@ -39,7 +39,7 @@ class DesktopTracker: public QObject
int _previousDesktop;
int _desktopCount;
int _desktop;
- QTimer *_timer;
+ TQTimer *_timer;
signals:
void reachedtActiveDesktop( Task* task );
diff --git a/karm/edittaskdialog.cpp b/karm/edittaskdialog.cpp
index fb3c49b88..74d3417bd 100644
--- a/karm/edittaskdialog.cpp
+++ b/karm/edittaskdialog.cpp
@@ -20,18 +20,18 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
*/
-#include <qbuttongroup.h>
-#include <qcombobox.h>
-#include <qgroupbox.h>
-#include <qhbox.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qlineedit.h>
-#include <qradiobutton.h>
-#include <qsizepolicy.h>
-#include <qstring.h>
-#include <qwidget.h>
-#include <qwhatsthis.h>
+#include <tqbuttongroup.h>
+#include <tqcombobox.h>
+#include <tqgroupbox.h>
+#include <tqhbox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqlineedit.h>
+#include <tqradiobutton.h>
+#include <tqsizepolicy.h>
+#include <tqstring.h>
+#include <tqwidget.h>
+#include <tqwhatsthis.h>
#include <klocale.h> // i18n
#include <kwinmodule.h>
@@ -40,27 +40,27 @@
#include "ktimewidget.h"
#include "kdebug.h"
-EditTaskDialog::EditTaskDialog( QString caption, bool editDlg,
+EditTaskDialog::EditTaskDialog( TQString caption, bool editDlg,
DesktopList* desktopList)
: KDialogBase(0, "EditTaskDialog", true, caption, Ok|Cancel, Ok, true ),
origTime( 0 ), origSession( 0 )
{
- QWidget *page = new QWidget( this );
+ TQWidget *page = new TQWidget( this );
setMainWidget(page);
KWinModule kwinmodule(0, KWinModule::INFO_DESKTOP);
- QVBoxLayout *lay1 = new QVBoxLayout(page);
+ TQVBoxLayout *lay1 = new TQVBoxLayout(page);
- QHBoxLayout *lay2 = new QHBoxLayout();
+ TQHBoxLayout *lay2 = new TQHBoxLayout();
lay1->addLayout(lay2);
// The name of the widget
- QLabel *label = new QLabel( i18n("Task &name:"), page, "name" );
+ TQLabel *label = new TQLabel( i18n("Task &name:"), page, "name" );
lay2->addWidget( label );
lay2->addSpacing(5);
- _name = new QLineEdit( page, "lineedit" );
+ _name = new TQLineEdit( page, "lineedit" );
_name->setMinimumWidth(fontMetrics().maxWidth()*15);
lay2->addWidget( _name );
@@ -69,26 +69,26 @@ EditTaskDialog::EditTaskDialog( QString caption, bool editDlg,
// The "Edit Absolut" radio button
lay1->addSpacing(10);lay1->addStretch(1);
- _absoluteRB = new QRadioButton( i18n( "Edit &absolute" ), page,
+ _absoluteRB = new TQRadioButton( i18n( "Edit &absolute" ), page,
"_absoluteRB" );
lay1->addWidget( _absoluteRB );
- connect( _absoluteRB, SIGNAL( clicked() ), this, SLOT( slotAbsolutePressed() ) );
+ connect( _absoluteRB, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotAbsolutePressed() ) );
// Absolute times
- QHBoxLayout *lay5 = new QHBoxLayout();
+ TQHBoxLayout *lay5 = new TQHBoxLayout();
lay1->addLayout(lay5);
lay5->addSpacing(20);
- QGridLayout *lay3 = new QGridLayout( 2, 2, -1, "lay3" );
+ TQGridLayout *lay3 = new TQGridLayout( 2, 2, -1, "lay3" );
lay5->addLayout(lay3);
- _sessionLA = new QLabel( i18n("&Session time: "), page, "session time" );
+ _sessionLA = new TQLabel( i18n("&Session time: "), page, "session time" );
// Time
- _timeLA = new QLabel( i18n("&Time:"), page, "time" );
+ _timeLA = new TQLabel( i18n("&Time:"), page, "time" );
lay3->addWidget( _timeLA, 0, 0 );
- _timeLA->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1,
- (QSizePolicy::SizeType)0,
+ _timeLA->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1,
+ (TQSizePolicy::SizeType)0,
0,
0,
_timeLA->sizePolicy().hasHeightForWidth()) );
@@ -110,8 +110,8 @@ EditTaskDialog::EditTaskDialog( QString caption, bool editDlg,
_sessionTW = new KArmTimeWidget( page, "_sessionTW" );
lay3->addWidget( _sessionTW, 1, 1 );
_sessionLA->setBuddy( _sessionTW );
- _sessionLA->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1,
- (QSizePolicy::SizeType)0,
+ _sessionLA->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1,
+ (TQSizePolicy::SizeType)0,
0,
0,
_sessionLA->sizePolicy().hasHeightForWidth()) );
@@ -121,21 +121,21 @@ EditTaskDialog::EditTaskDialog( QString caption, bool editDlg,
// The "Edit relative" radio button
lay1->addSpacing(10);
lay1->addStretch(1);
- _relativeRB = new QRadioButton( i18n( "Edit &relative (apply to both time and"
+ _relativeRB = new TQRadioButton( i18n( "Edit &relative (apply to both time and"
" session time)" ), page, "_relativeRB" );
lay1->addWidget( _relativeRB );
- connect( _relativeRB, SIGNAL( clicked() ), this, SLOT(slotRelativePressed()) );
+ connect( _relativeRB, TQT_SIGNAL( clicked() ), this, TQT_SLOT(slotRelativePressed()) );
// The relative times
- QHBoxLayout *lay4 = new QHBoxLayout();
+ TQHBoxLayout *lay4 = new TQHBoxLayout();
lay1->addLayout( lay4 );
lay4->addSpacing(20);
- _operator = new QComboBox(page);
- _operator->insertItem( QString::fromLatin1( "+" ) );
- _operator->insertItem( QString::fromLatin1( "-" ) );
- _operator->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1,
- (QSizePolicy::SizeType)0,
+ _operator = new TQComboBox(page);
+ _operator->insertItem( TQString::fromLatin1( "+" ) );
+ _operator->insertItem( TQString::fromLatin1( "-" ) );
+ _operator->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1,
+ (TQSizePolicy::SizeType)0,
0,
0,
_operator->sizePolicy().hasHeightForWidth()) );
@@ -165,24 +165,24 @@ EditTaskDialog::EditTaskDialog( QString caption, bool editDlg,
lay1->addSpacing(10);
lay1->addStretch(1);
- _desktopCB = new QCheckBox(i18n("A&uto tracking"), page);
+ _desktopCB = new TQCheckBox(i18n("A&uto tracking"), page);
_desktopCB->setEnabled(true);
lay1->addWidget(_desktopCB);
- QGroupBox* groupBox;
+ TQGroupBox* groupBox;
{
int lines = (int)(desktopCount/2);
if (lines*2 != desktopCount) lines++;
- groupBox = new QButtonGroup( lines, QGroupBox::Horizontal,
+ groupBox = new TQButtonGroup( lines, TQGroupBox::Horizontal,
i18n("In Desktop"), page, "_desktopsGB");
}
lay1->addWidget(groupBox);
- QHBoxLayout *lay6 = new QHBoxLayout();
+ TQHBoxLayout *lay6 = new TQHBoxLayout();
lay1->addLayout(lay6);
for (int i=0; i<desktopCount; i++) {
- _deskBox.push_back(new QCheckBox(groupBox,QString::number(i).latin1()));
+ _deskBox.push_back(new TQCheckBox(groupBox,TQString::number(i).latin1()));
_deskBox[i]->setText(kwinmodule.desktopName(i+1));
_deskBox[i]->setChecked(false);
@@ -207,7 +207,7 @@ EditTaskDialog::EditTaskDialog( QString caption, bool editDlg,
for (int i=0; i<desktopCount; i++)
_deskBox[i]->setEnabled(enableDesktops);
- connect(_desktopCB, SIGNAL(clicked()), this, SLOT(slotAutoTrackingPressed()));
+ connect(_desktopCB, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotAutoTrackingPressed()));
lay1->addStretch(1);
@@ -224,32 +224,32 @@ EditTaskDialog::EditTaskDialog( QString caption, bool editDlg,
slotRelativePressed();
// Whats this help.
- QWhatsThis::add( _name,
+ TQWhatsThis::add( _name,
i18n( "Enter the name of the task here. "
"This name is for your eyes only."));
- QWhatsThis::add( _absoluteRB,
+ TQWhatsThis::add( _absoluteRB,
i18n( "Use this option to set the time spent on this task "
"to an absolute value.\n\nFor example, if you have "
"worked exactly four hours on this task during the current "
"session, you would set the Session time to 4 hr." ) );
- QWhatsThis::add( _relativeRB,
+ TQWhatsThis::add( _relativeRB,
i18n( "Use this option to change the time spent on this task "
"relative to its current value.\n\nFor example, if you worked "
"on this task for one hour without the timer running, you "
"would add 1 hr." ) );
- QWhatsThis::add( _timeTW,
+ TQWhatsThis::add( _timeTW,
i18n( "This is the time the task has been "
"running since all times were reset."));
- QWhatsThis::add( _sessionTW,
+ TQWhatsThis::add( _sessionTW,
i18n( "This is the time the task has been running this "
"session."));
- QWhatsThis::add( _diffTW, i18n( "Specify how much time to add or subtract "
+ TQWhatsThis::add( _diffTW, i18n( "Specify how much time to add or subtract "
"to the overall and session time"));
- QWhatsThis::add( _desktopCB,
+ TQWhatsThis::add( _desktopCB,
i18n( "Use this option to automatically start the timer "
"on this task when you switch to the specified desktop(s)." ) );
- QWhatsThis::add( groupBox,
+ TQWhatsThis::add( groupBox,
i18n( "Select the desktop(s) that will automatically start the "
"timer on this task." ) );
}
@@ -294,7 +294,7 @@ void EditTaskDialog::slotAutoTrackingPressed()
_deskBox[i]->setChecked(false);
}
-void EditTaskDialog::setTask( const QString &name, long time, long session )
+void EditTaskDialog::setTask( const TQString &name, long time, long session )
{
_name->setText( name );
@@ -305,7 +305,7 @@ void EditTaskDialog::setTask( const QString &name, long time, long session )
}
-QString EditTaskDialog::taskName() const
+TQString EditTaskDialog::taskName() const
{
return( _name->text() );
}
diff --git a/karm/edittaskdialog.h b/karm/edittaskdialog.h
index 0954d8b5d..91eb361d8 100644
--- a/karm/edittaskdialog.h
+++ b/karm/edittaskdialog.h
@@ -24,7 +24,7 @@
#include <vector>
#include <kdialogbase.h>
-#include <qcheckbox.h>
+#include <tqcheckbox.h>
#include "desktoplist.h"
@@ -45,9 +45,9 @@ class EditTaskDialog : public KDialogBase
Q_OBJECT
public:
- EditTaskDialog(QString caption, bool editDlg, DesktopList* desktopList=0);
- void setTask(const QString &name, long time, long sessionTime);
- QString taskName() const;
+ EditTaskDialog(TQString caption, bool editDlg, DesktopList* desktopList=0);
+ void setTask(const TQString &name, long time, long sessionTime);
+ TQString taskName() const;
// return user choices
void status( long *time, long *timeDiff,
@@ -60,25 +60,25 @@ class EditTaskDialog : public KDialogBase
void slotAutoTrackingPressed();
private:
- QLineEdit* _name;
+ TQLineEdit* _name;
KArmTimeWidget* _timeTW;
KArmTimeWidget* _sessionTW;
KArmTimeWidget* _diffTW;
- QComboBox* _operator;
- std::vector<QCheckBox*> _deskBox; // we only need an array, but ISO forbids
+ TQComboBox* _operator;
+ std::vector<TQCheckBox*> _deskBox; // we only need an array, but ISO forbids
// passing an array as a function argument
long origTime;
long origSession;
- QRadioButton *_absoluteRB;
- QRadioButton *_relativeRB;
+ TQRadioButton *_absoluteRB;
+ TQRadioButton *_relativeRB;
- QCheckBox *_desktopCB;
+ TQCheckBox *_desktopCB;
int desktopCount;
- QLabel* _timeLA;
- QLabel* _sessionLA;
+ TQLabel* _timeLA;
+ TQLabel* _sessionLA;
};
diff --git a/karm/idletimedetector.cpp b/karm/idletimedetector.cpp
index 878993798..b2b17a29c 100644
--- a/karm/idletimedetector.cpp
+++ b/karm/idletimedetector.cpp
@@ -1,8 +1,8 @@
#include "idletimedetector.h"
-#include <qdatetime.h>
-#include <qmessagebox.h>
-#include <qtimer.h>
+#include <tqdatetime.h>
+#include <tqmessagebox.h>
+#include <tqtimer.h>
#include <kglobal.h>
#include <klocale.h> // i18n
@@ -25,8 +25,8 @@ IdleTimeDetector::IdleTimeDetector(int maxIdle)
_idleDetectionPossible = false;
}
- _timer = new QTimer(this);
- connect(_timer, SIGNAL(timeout()), this, SLOT(check()));
+ _timer = new TQTimer(this);
+ connect(_timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(check()));
#else
_idleDetectionPossible = false;
#endif // HAVE_LIBXSS
@@ -67,22 +67,22 @@ void IdleTimeDetector::informOverrun(int idleSeconds)
_timer->stop();
- QDateTime idleStart = QDateTime::currentDateTime().addSecs(-idleSeconds);
- QString idleStartQString = KGlobal::locale()->formatTime(idleStart.time());
+ TQDateTime idleStart = TQDateTime::currentDateTime().addSecs(-idleSeconds);
+ TQString idleStartQString = KGlobal::locale()->formatTime(idleStart.time());
- int id = QMessageBox::warning( 0, i18n("Idle Detection"),
+ int id = TQMessageBox::warning( 0, i18n("Idle Detection"),
i18n("Desktop has been idle since %1."
" What should we do?").arg(idleStartQString),
i18n("Revert && Stop"),
i18n("Revert && Continue"),
i18n("Continue Timing"),0,2);
- QDateTime end = QDateTime::currentDateTime();
+ TQDateTime end = TQDateTime::currentDateTime();
int diff = idleStart.secsTo(end)/secsPerMinute;
if (id == 0)
{
// Revert And Stop
- kdDebug(5970) << "Now it is " << QDateTime::currentDateTime() << endl;
+ kdDebug(5970) << "Now it is " << TQDateTime::currentDateTime() << endl;
kdDebug(5970) << "Reverting timer to " << KGlobal::locale()->formatTime(idleStart.time()).ascii() << endl;
emit(extractTime(idleSeconds/60+diff)); // we need to subtract the time that has been added during idleness.
emit(stopAllTimersAt(idleStart));
diff --git a/karm/idletimedetector.h b/karm/idletimedetector.h
index b7092930c..8234b427b 100644
--- a/karm/idletimedetector.h
+++ b/karm/idletimedetector.h
@@ -1,9 +1,9 @@
#ifndef KARM_IDLE_TIME_DETECTOR_H
#define KARM_IDLE_TIME_DETECTOR_H
-#include <qobject.h>
+#include <tqobject.h>
#include "config.h" // HAVE_LIBXSS
-#include <qdatetime.h>
+#include <tqdatetime.h>
#include <kdebug.h>
class QTimer;
@@ -55,8 +55,8 @@ signals:
/** Tells the listener to stop timing **/
void stopAllTimers();
- /** Tells the listener to stop timing for QDateTime **/
- void stopAllTimersAt(QDateTime qdt);
+ /** Tells the listener to stop timing for TQDateTime **/
+ void stopAllTimersAt(TQDateTime qdt);
public slots:
/**
@@ -98,7 +98,7 @@ private:
bool _idleDetectionPossible;
bool _overAllIdleDetect; // Based on preferences.
int _maxIdle;
- QTimer *_timer;
+ TQTimer *_timer;
};
#endif // KARM_IDLE_TIME_DETECTOR_H
diff --git a/karm/kaccelmenuwatch.cpp b/karm/kaccelmenuwatch.cpp
index f3aac3230..ddabb1d86 100644
--- a/karm/kaccelmenuwatch.cpp
+++ b/karm/kaccelmenuwatch.cpp
@@ -5,12 +5,12 @@
*/
#include <assert.h>
-#include <qpopupmenu.h>
+#include <tqpopupmenu.h>
#include "kaccelmenuwatch.h"
-KAccelMenuWatch::KAccelMenuWatch( KAccel *accel, QObject *parent )
- : QObject( parent ),
+KAccelMenuWatch::KAccelMenuWatch( KAccel *accel, TQObject *parent )
+ : TQObject( parent ),
_accel( accel ),
_menu ( 0 )
{
@@ -18,7 +18,7 @@ KAccelMenuWatch::KAccelMenuWatch( KAccel *accel, QObject *parent )
_menuList.setAutoDelete( false );
}
-void KAccelMenuWatch::setMenu( QPopupMenu *menu )
+void KAccelMenuWatch::setMenu( TQPopupMenu *menu )
{
assert( menu );
@@ -27,7 +27,7 @@ void KAccelMenuWatch::setMenu( QPopupMenu *menu )
if ( !_menuList.findRef( menu ) ) {
_menuList.append( menu );
- connect( menu, SIGNAL(destroyed()), this, SLOT(removeDeadMenu()) );
+ connect( menu, TQT_SIGNAL(destroyed()), this, TQT_SLOT(removeDeadMenu()) );
}
_menu = menu;
@@ -36,7 +36,7 @@ void KAccelMenuWatch::setMenu( QPopupMenu *menu )
void KAccelMenuWatch::connectAccel( int itemId, const char *action )
{
AccelItem *item = newAccelItem( _menu, itemId, StringAccel ) ;
- item->action = QString::fromLocal8Bit( action );
+ item->action = TQString::fromLocal8Bit( action );
}
void KAccelMenuWatch::connectAccel( int itemId, KStdAccel::StdAccel accel )
@@ -49,7 +49,7 @@ void KAccelMenuWatch::updateMenus()
{
assert( _accel != 0 );
- QPtrListIterator<AccelItem> iter( _accList );
+ TQPtrListIterator<AccelItem> iter( _accList );
AccelItem *item;
for( ; (item = iter.current()) ; ++iter ) {
@@ -71,7 +71,7 @@ void KAccelMenuWatch::updateMenus()
void KAccelMenuWatch::removeDeadMenu()
{
- QPopupMenu *sdr = (QPopupMenu *) sender();
+ TQPopupMenu *sdr = (TQPopupMenu *) sender();
assert( sdr );
if ( !_menuList.findRef( sdr ) )
@@ -96,7 +96,7 @@ loop:
return;
}
-KAccelMenuWatch::AccelItem *KAccelMenuWatch::newAccelItem( QPopupMenu *,
+KAccelMenuWatch::AccelItem *KAccelMenuWatch::newAccelItem( TQPopupMenu *,
int itemId, AccelType type )
{
AccelItem *item = new AccelItem;
diff --git a/karm/kaccelmenuwatch.h b/karm/kaccelmenuwatch.h
index 76b27f018..89da1ce8f 100644
--- a/karm/kaccelmenuwatch.h
+++ b/karm/kaccelmenuwatch.h
@@ -5,8 +5,8 @@
#ifndef KARM_K_ACCEL_MENU_WATCH_H
#define KARM_K_ACCEL_MENU_WATCH_H
-#include <qobject.h>
-#include <qptrlist.h>
+#include <tqobject.h>
+#include <tqptrlist.h>
#include <kaccel.h>
@@ -40,30 +40,30 @@ class KAccelMenuWatch : public QObject
enum AccelType { StdAccel, StringAccel };
typedef struct AccelItem {
- QPopupMenu *menu;
+ TQPopupMenu *menu;
int itemId;
AccelType type;
// only one of these is used at a time
- QString action;
+ TQString action;
KStdAccel::StdAccel stdAction;
} AccelItem;
KAccel *_accel;
- QPtrList<AccelItem> _accList;
- QPtrList<QPopupMenu> _menuList;
+ TQPtrList<AccelItem> _accList;
+ TQPtrList<TQPopupMenu> _menuList;
- QPopupMenu *_menu;
+ TQPopupMenu *_menu;
- KAccelMenuWatch::AccelItem *newAccelItem( QPopupMenu *menu,
+ KAccelMenuWatch::AccelItem *newAccelItem( TQPopupMenu *menu,
int itemId, AccelType type );
public:
/**
* KAccelMenuWatch Constructor
*/
- KAccelMenuWatch( KAccel *accel, QObject *parent = 0 );
+ KAccelMenuWatch( KAccel *accel, TQObject *parent = 0 );
/**
* KAccelMenuWatch Destructor
@@ -76,13 +76,13 @@ class KAccelMenuWatch : public QObject
* with this menu. You can call this function any number of
* times, so multiple menus can be handled.
*/
- void setMenu( QPopupMenu *menu );
+ void setMenu( TQPopupMenu *menu );
/**
- * Return the last menu set with KAccelMenuWatch::setMenu(QPopupMenu*),
+ * Return the last menu set with KAccelMenuWatch::setMenu(TQPopupMenu*),
* or 0 if none has been set.
*/
- QPopupMenu *currentMenu() const { return _menu; }
+ TQPopupMenu *currentMenu() const { return _menu; }
/**
* Connect the menu item identified to currentMenu()/id to
diff --git a/karm/karm_part.cpp b/karm/karm_part.cpp
index c7729f0fa..c535bec41 100644
--- a/karm/karm_part.cpp
+++ b/karm/karm_part.cpp
@@ -15,14 +15,14 @@
#include <kglobal.h>
#include <klocale.h>
-#include <qfile.h>
-#include <qtextstream.h>
-#include <qmultilineedit.h>
-#include <qpopupmenu.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
+#include <tqmultilineedit.h>
+#include <tqpopupmenu.h>
#include "mainwindow.h"
-karmPart::karmPart( QWidget *parentWidget, const char *widgetName,
- QObject *parent, const char *name )
+karmPart::karmPart( TQWidget *parentWidget, const char *widgetName,
+ TQObject *parent, const char *name )
: DCOPObject ( "KarmDCOPIface" ), KParts::ReadWritePart(parent, name),
_accel ( new KAccel( parentWidget ) ),
_watcher ( new KAccelMenuWatch( _accel, parentWidget ) )
@@ -40,9 +40,9 @@ karmPart::karmPart( QWidget *parentWidget, const char *widgetName,
setWidget(_taskView);
// create our actions
- KStdAction::open(this, SLOT(fileOpen()), actionCollection());
- KStdAction::saveAs(this, SLOT(fileSaveAs()), actionCollection());
- KStdAction::save(this, SLOT(save()), actionCollection());
+ KStdAction::open(this, TQT_SLOT(fileOpen()), actionCollection());
+ KStdAction::saveAs(this, TQT_SLOT(fileSaveAs()), actionCollection());
+ KStdAction::save(this, TQT_SLOT(save()), actionCollection());
makeMenus();
@@ -50,29 +50,29 @@ karmPart::karmPart( QWidget *parentWidget, const char *widgetName,
// connections
- connect( _taskView, SIGNAL( totalTimesChanged( long, long ) ),
- this, SLOT( updateTime( long, long ) ) );
- connect( _taskView, SIGNAL( selectionChanged ( QListViewItem * )),
- this, SLOT(slotSelectionChanged()));
- connect( _taskView, SIGNAL( updateButtons() ),
- this, SLOT(slotSelectionChanged()));
+ connect( _taskView, TQT_SIGNAL( totalTimesChanged( long, long ) ),
+ this, TQT_SLOT( updateTime( long, long ) ) );
+ connect( _taskView, TQT_SIGNAL( selectionChanged ( TQListViewItem * )),
+ this, TQT_SLOT(slotSelectionChanged()));
+ connect( _taskView, TQT_SIGNAL( updateButtons() ),
+ this, TQT_SLOT(slotSelectionChanged()));
// Setup context menu request handling
connect( _taskView,
- SIGNAL( contextMenuRequested( QListViewItem*, const QPoint&, int )),
+ TQT_SIGNAL( contextMenuRequested( TQListViewItem*, const TQPoint&, int )),
this,
- SLOT( contextMenuRequest( QListViewItem*, const QPoint&, int )));
+ TQT_SLOT( contextMenuRequest( TQListViewItem*, const TQPoint&, int )));
_tray = new KarmTray( this );
- connect( _tray, SIGNAL( quitSelected() ), SLOT( quit() ) );
+ connect( _tray, TQT_SIGNAL( quitSelected() ), TQT_SLOT( quit() ) );
- connect( _taskView, SIGNAL( timersActive() ), _tray, SLOT( startClock() ) );
- connect( _taskView, SIGNAL( timersActive() ), this, SLOT( enableStopAll() ));
- connect( _taskView, SIGNAL( timersInactive() ), _tray, SLOT( stopClock() ) );
- connect( _taskView, SIGNAL( timersInactive() ), this, SLOT( disableStopAll()));
- connect( _taskView, SIGNAL( tasksChanged( QPtrList<Task> ) ),
- _tray, SLOT( updateToolTip( QPtrList<Task> ) ));
+ connect( _taskView, TQT_SIGNAL( timersActive() ), _tray, TQT_SLOT( startClock() ) );
+ connect( _taskView, TQT_SIGNAL( timersActive() ), this, TQT_SLOT( enableStopAll() ));
+ connect( _taskView, TQT_SIGNAL( timersInactive() ), _tray, TQT_SLOT( stopClock() ) );
+ connect( _taskView, TQT_SIGNAL( timersInactive() ), this, TQT_SLOT( disableStopAll()));
+ connect( _taskView, TQT_SIGNAL( tasksChanged( TQPtrList<Task> ) ),
+ _tray, TQT_SLOT( updateToolTip( TQPtrList<Task> ) ));
_taskView->load();
@@ -113,119 +113,119 @@ void karmPart::makeMenus()
*actionNew,
*actionNewSub;
- (void) KStdAction::quit( this, SLOT( quit() ), actionCollection());
- (void) KStdAction::print( this, SLOT( print() ), actionCollection());
- actionKeyBindings = KStdAction::keyBindings( this, SLOT( keyBindings() ),
+ (void) KStdAction::quit( this, TQT_SLOT( quit() ), actionCollection());
+ (void) KStdAction::print( this, TQT_SLOT( print() ), actionCollection());
+ actionKeyBindings = KStdAction::keyBindings( this, TQT_SLOT( keyBindings() ),
actionCollection() );
actionPreferences = KStdAction::preferences(_preferences,
- SLOT(showDialog()),
+ TQT_SLOT(showDialog()),
actionCollection() );
- (void) KStdAction::save( this, SLOT( save() ), actionCollection() );
+ (void) KStdAction::save( this, TQT_SLOT( save() ), actionCollection() );
KAction* actionStartNewSession = new KAction( i18n("Start &New Session"),
0,
this,
- SLOT( startNewSession() ),
+ TQT_SLOT( startNewSession() ),
actionCollection(),
"start_new_session");
KAction* actionResetAll = new KAction( i18n("&Reset All Times"),
0,
this,
- SLOT( resetAllTimes() ),
+ TQT_SLOT( resetAllTimes() ),
actionCollection(),
"reset_all_times");
actionStart = new KAction( i18n("&Start"),
- QString::fromLatin1("1rightarrow"), Key_S,
+ TQString::fromLatin1("1rightarrow"), Key_S,
_taskView,
- SLOT( startCurrentTimer() ), actionCollection(),
+ TQT_SLOT( startCurrentTimer() ), actionCollection(),
"start");
actionStop = new KAction( i18n("S&top"),
- QString::fromLatin1("stop"), 0,
+ TQString::fromLatin1("stop"), 0,
_taskView,
- SLOT( stopCurrentTimer() ), actionCollection(),
+ TQT_SLOT( stopCurrentTimer() ), actionCollection(),
"stop");
actionStopAll = new KAction( i18n("Stop &All Timers"),
Key_Escape,
_taskView,
- SLOT( stopAllTimers() ), actionCollection(),
+ TQT_SLOT( stopAllTimers() ), actionCollection(),
"stopAll");
actionStopAll->setEnabled(false);
actionNew = new KAction( i18n("&New..."),
- QString::fromLatin1("filenew"), CTRL+Key_N,
+ TQString::fromLatin1("filenew"), CTRL+Key_N,
_taskView,
- SLOT( newTask() ), actionCollection(),
+ TQT_SLOT( newTask() ), actionCollection(),
"new_task");
actionNewSub = new KAction( i18n("New &Subtask..."),
- QString::fromLatin1("kmultiple"), CTRL+ALT+Key_N,
+ TQString::fromLatin1("kmultiple"), CTRL+ALT+Key_N,
_taskView,
- SLOT( newSubTask() ), actionCollection(),
+ TQT_SLOT( newSubTask() ), actionCollection(),
"new_sub_task");
actionDelete = new KAction( i18n("&Delete"),
- QString::fromLatin1("editdelete"), Key_Delete,
+ TQString::fromLatin1("editdelete"), Key_Delete,
_taskView,
- SLOT( deleteTask() ), actionCollection(),
+ TQT_SLOT( deleteTask() ), actionCollection(),
"delete_task");
actionEdit = new KAction( i18n("&Edit..."),
- QString::fromLatin1("edit"), CTRL + Key_E,
+ TQString::fromLatin1("edit"), CTRL + Key_E,
_taskView,
- SLOT( editTask() ), actionCollection(),
+ TQT_SLOT( editTask() ), actionCollection(),
"edit_task");
// actionAddComment = new KAction( i18n("&Add Comment..."),
-// QString::fromLatin1("document"),
+// TQString::fromLatin1("document"),
// CTRL+ALT+Key_E,
// _taskView,
-// SLOT( addCommentToTask() ),
+// TQT_SLOT( addCommentToTask() ),
// actionCollection(),
// "add_comment_to_task");
actionMarkAsComplete = new KAction( i18n("&Mark as Complete"),
- QString::fromLatin1("document"),
+ TQString::fromLatin1("document"),
CTRL+Key_M,
_taskView,
- SLOT( markTaskAsComplete() ),
+ TQT_SLOT( markTaskAsComplete() ),
actionCollection(),
"mark_as_complete");
actionMarkAsIncomplete = new KAction( i18n("&Mark as Incomplete"),
- QString::fromLatin1("document"),
+ TQString::fromLatin1("document"),
CTRL+Key_M,
_taskView,
- SLOT( markTaskAsIncomplete() ),
+ TQT_SLOT( markTaskAsIncomplete() ),
actionCollection(),
"mark_as_incomplete");
actionClipTotals = new KAction( i18n("&Copy Totals to Clipboard"),
- QString::fromLatin1("klipper"),
+ TQString::fromLatin1("klipper"),
CTRL+Key_C,
_taskView,
- SLOT( clipTotals() ),
+ TQT_SLOT( clipTotals() ),
actionCollection(),
"clip_totals");
actionClipHistory = new KAction( i18n("Copy &History to Clipboard"),
- QString::fromLatin1("klipper"),
+ TQString::fromLatin1("klipper"),
CTRL+ALT+Key_C,
_taskView,
- SLOT( clipHistory() ),
+ TQT_SLOT( clipHistory() ),
actionCollection(),
"clip_history");
new KAction( i18n("Import &Legacy Flat File..."), 0,
- _taskView, SLOT(loadFromFlatFile()), actionCollection(),
+ _taskView, TQT_SLOT(loadFromFlatFile()), actionCollection(),
"import_flatfile");
new KAction( i18n("&Export to CSV File..."), 0,
- _taskView, SLOT(exportcsvFile()), actionCollection(),
+ _taskView, TQT_SLOT(exportcsvFile()), actionCollection(),
"export_csvfile");
new KAction( i18n("Export &History to CSV File..."), 0,
- this, SLOT(exportcsvHistory()), actionCollection(),
+ this, TQT_SLOT(exportcsvHistory()), actionCollection(),
"export_csvhistory");
new KAction( i18n("Import Tasks From &Planner..."), 0,
- _taskView, SLOT(importPlanner()), actionCollection(),
+ _taskView, TQT_SLOT(importPlanner()), actionCollection(),
"import_planner");
new KAction( i18n("Configure KArm..."), 0,
- _preferences, SLOT(showDialog()), actionCollection(),
+ _preferences, TQT_SLOT(showDialog()), actionCollection(),
"configure_karm");
/*
new KAction( i18n("Import E&vents"), 0,
_taskView,
- SLOT( loadFromKOrgEvents() ), actionCollection(),
+ TQT_SLOT( loadFromKOrgEvents() ), actionCollection(),
"import_korg_events");
*/
@@ -287,12 +287,12 @@ void karmPart::setReadWrite(bool rw)
{
// notify your internal widget of the read-write state
if (rw)
- connect(_taskView, SIGNAL(textChanged()),
- this, SLOT(setModified()));
+ connect(_taskView, TQT_SIGNAL(textChanged()),
+ this, TQT_SLOT(setModified()));
else
{
- disconnect(_taskView, SIGNAL(textChanged()),
- this, SLOT(setModified()));
+ disconnect(_taskView, TQT_SIGNAL(textChanged()),
+ this, TQT_SLOT(setModified()));
}
ReadWritePart::setReadWrite(rw);
@@ -318,7 +318,7 @@ void karmPart::setModified(bool modified)
bool karmPart::openFile()
{
- // m_file is always local so we can use QFile on it
+ // m_file is always local so we can use TQFile on it
_taskView->load(m_file);
// just for fun, set the status bar
@@ -334,12 +334,12 @@ bool karmPart::saveFile()
return false;
// m_file is always local, so we use QFile
- QFile file(m_file);
+ TQFile file(m_file);
if (file.open(IO_WriteOnly) == false)
return false;
- // use QTextStream to dump the text to the file
- QTextStream stream(&file);
+ // use TQTextStream to dump the text to the file
+ TQTextStream stream(&file);
file.close();
@@ -351,7 +351,7 @@ void karmPart::fileOpen()
// this slot is called whenever the File->Open menu is selected,
// the Open shortcut is pressed (usually CTRL+O) or the Open toolbar
// button is clicked
- QString file_name = KFileDialog::getOpenFileName();
+ TQString file_name = KFileDialog::getOpenFileName();
if (file_name.isEmpty() == false)
openURL(file_name);
@@ -360,7 +360,7 @@ void karmPart::fileOpen()
void karmPart::fileSaveAs()
{
// this slot is called whenever the File->Save As menu is selected,
- QString file_name = KFileDialog::getSaveFileName();
+ TQString file_name = KFileDialog::getSaveFileName();
if (file_name.isEmpty() == false)
saveAs(file_name);
}
@@ -387,15 +387,15 @@ karmPartFactory::~karmPartFactory()
s_instance = 0L;
}
-KParts::Part* karmPartFactory::createPartObject( QWidget *parentWidget, const char *widgetName,
- QObject *parent, const char *name,
- const char *classname, const QStringList &args )
+KParts::Part* karmPartFactory::createPartObject( TQWidget *parentWidget, const char *widgetName,
+ TQObject *parent, const char *name,
+ const char *classname, const TQStringList &args )
{
// Create an instance of our Part
karmPart* obj = new karmPart( parentWidget, widgetName, parent, name );
// See if we are to be read-write or not
- if (QCString(classname) == "KParts::ReadOnlyPart")
+ if (TQCString(classname) == "KParts::ReadOnlyPart")
obj->setReadWrite(false);
return obj;
@@ -421,9 +421,9 @@ extern "C"
}
}
-void karmPart::contextMenuRequest( QListViewItem*, const QPoint& point, int )
+void karmPart::contextMenuRequest( TQListViewItem*, const TQPoint& point, int )
{
- QPopupMenu* pop = dynamic_cast<QPopupMenu*>(
+ TQPopupMenu* pop = dynamic_cast<TQPopupMenu*>(
factory()->container( i18n( "task_popup" ), this ) );
if ( pop )
pop->popup( point );
@@ -435,12 +435,12 @@ void karmPart::contextMenuRequest( QListViewItem*, const QPoint& point, int )
//
//----------------------------------------------------------------------------
-QString karmPart::version() const
+TQString karmPart::version() const
{
return KARM_VERSION;
}
-QString karmPart::deletetodo()
+TQString karmPart::deletetodo()
{
_taskView->deleteTask();
return "";
@@ -451,15 +451,15 @@ bool karmPart::getpromptdelete()
return _preferences->promptDelete();
}
-QString karmPart::setpromptdelete( bool prompt )
+TQString karmPart::setpromptdelete( bool prompt )
{
_preferences->setPromptDelete( prompt );
return "";
}
-QString karmPart::taskIdFromName( const QString &taskname ) const
+TQString karmPart::taskIdFromName( const TQString &taskname ) const
{
- QString rval = "";
+ TQString rval = "";
Task* task = _taskView->first_child();
while ( rval.isEmpty() && task )
@@ -479,17 +479,17 @@ void karmPart::quit()
bool karmPart::save()
{
kdDebug(5970) << "Saving time data to disk." << endl;
- QString err=_taskView->save(); // untranslated error msg.
+ TQString err=_taskView->save(); // untranslated error msg.
// TODO:
/* if (err.isEmpty()) statusBar()->message(i18n("Successfully saved tasks and history"),1807);
else statusBar()->message(i18n(err.ascii()),7707); // no msgbox since save is called when exiting */
return true;
}
-int karmPart::addTask( const QString& taskname )
+int karmPart::addTask( const TQString& taskname )
{
DesktopList desktopList;
- QString uid = _taskView->addTask( taskname, 0, 0, desktopList );
+ TQString uid = _taskView->addTask( taskname, 0, 0, desktopList );
kdDebug(5970) << "MainWindow::addTask( " << taskname << " ) returns " << uid << endl;
if ( uid.length() > 0 ) return 0;
else
@@ -500,20 +500,20 @@ int karmPart::addTask( const QString& taskname )
}
}
-QString karmPart::setPerCentComplete( const QString& taskName, int perCent )
+TQString karmPart::setPerCentComplete( const TQString& taskName, int perCent )
{
int index = 0;
- QString err="no such task";
+ TQString err="no such task";
for (int i=0; i<_taskView->count(); i++)
{
if ((_taskView->item_at_index(i)->name()==taskName))
{
index=i;
- if (err==QString::null) err="task name is abigious";
- if (err=="no such task") err=QString::null;
+ if (err==TQString::null) err="task name is abigious";
+ if (err=="no such task") err=TQString::null;
}
}
- if (err==QString::null)
+ if (err==TQString::null)
{
_taskView->item_at_index(index)->setPercentComplete( perCent, _taskView->storage() );
}
@@ -521,12 +521,12 @@ QString karmPart::setPerCentComplete( const QString& taskName, int perCent )
}
int karmPart::bookTime
-( const QString& taskId, const QString& datetime, long minutes )
+( const TQString& taskId, const TQString& datetime, long minutes )
{
int rval = 0;
- QDate startDate;
- QTime startTime;
- QDateTime startDateTime;
+ TQDate startDate;
+ TQTime startTime;
+ TQDateTime startDateTime;
Task *task, *t;
if ( minutes <= 0 ) rval = KARM_ERR_INVALID_DURATION;
@@ -544,15 +544,15 @@ int karmPart::bookTime
// Parse datetime
if ( !rval )
{
- startDate = QDate::fromString( datetime, Qt::ISODate );
+ startDate = TQDate::fromString( datetime, Qt::ISODate );
if ( datetime.length() > 10 ) // "YYYY-MM-DD".length() = 10
{
- startTime = QTime::fromString( datetime, Qt::ISODate );
+ startTime = TQTime::fromString( datetime, Qt::ISODate );
}
- else startTime = QTime( 12, 0 );
+ else startTime = TQTime( 12, 0 );
if ( startDate.isValid() && startTime.isValid() )
{
- startDateTime = QDateTime( startDate, startTime );
+ startDateTime = TQDateTime( startDate, startTime );
}
else rval = KARM_ERR_INVALID_DATE;
@@ -573,13 +573,13 @@ int karmPart::bookTime
// There was something really bad going on with DCOP when I used a particular
// argument name; if I recall correctly, the argument name was errno.
-QString karmPart::getError( int mkb ) const
+TQString karmPart::getError( int mkb ) const
{
if ( mkb <= KARM_MAX_ERROR_NO ) return m_error[ mkb ];
else return i18n( "Invalid error number: %1" ).arg( mkb );
}
-int karmPart::totalMinutesForTaskId( const QString& taskId )
+int karmPart::totalMinutesForTaskId( const TQString& taskId )
{
int rval = 0;
Task *task, *t;
@@ -608,9 +608,9 @@ int karmPart::totalMinutesForTaskId( const QString& taskId )
return rval;
}
-QString karmPart::_hasTask( Task* task, const QString &taskname ) const
+TQString karmPart::_hasTask( Task* task, const TQString &taskname ) const
{
- QString rval = "";
+ TQString rval = "";
if ( task->name() == taskname )
{
rval = task->uid();
@@ -627,7 +627,7 @@ QString karmPart::_hasTask( Task* task, const QString &taskname ) const
return rval;
}
-Task* karmPart::_hasUid( Task* task, const QString &uid ) const
+Task* karmPart::_hasUid( Task* task, const TQString &uid ) const
{
Task *rval = NULL;
@@ -646,9 +646,9 @@ Task* karmPart::_hasUid( Task* task, const QString &uid ) const
return rval;
}
-QString karmPart::starttimerfor( const QString& taskname )
+TQString karmPart::starttimerfor( const TQString& taskname )
{
- QString err="no such task";
+ TQString err="no such task";
for (int i=0; i<_taskView->count(); i++)
{
if ((_taskView->item_at_index(i)->name()==taskname))
@@ -660,9 +660,9 @@ QString karmPart::starttimerfor( const QString& taskname )
return err;
}
-QString karmPart::stoptimerfor( const QString& taskname )
+TQString karmPart::stoptimerfor( const TQString& taskname )
{
- QString err="no such task";
+ TQString err="no such task";
for (int i=0; i<_taskView->count(); i++)
{
if ((_taskView->item_at_index(i)->name()==taskname))
@@ -674,21 +674,21 @@ QString karmPart::stoptimerfor( const QString& taskname )
return err;
}
-QString karmPart::exportcsvfile( QString filename, QString from, QString to, int type, bool decimalMinutes, bool allTasks, QString delimiter, QString quote )
+TQString karmPart::exportcsvfile( TQString filename, TQString from, TQString to, int type, bool decimalMinutes, bool allTasks, TQString delimiter, TQString quote )
{
ReportCriteria rc;
rc.allTasks=allTasks;
rc.decimalMinutes=decimalMinutes;
rc.delimiter=delimiter;
- rc.from=QDate::fromString( from );
+ rc.from=TQDate::fromString( from );
rc.quote=quote;
rc.reportType=(ReportCriteria::REPORTTYPE) type;
- rc.to=QDate::fromString( to );
+ rc.to=TQDate::fromString( to );
rc.url=filename;
return _taskView->report( rc );
}
-QString karmPart::importplannerfile( QString fileName )
+TQString karmPart::importplannerfile( TQString fileName )
{
return _taskView->importPlanner(fileName);
}
@@ -699,5 +699,5 @@ void karmPart::startNewSession()
_taskView->save();
}
-#include <qpopupmenu.h>
+#include <tqpopupmenu.h>
#include "karm_part.moc"
diff --git a/karm/karm_part.h b/karm/karm_part.h
index 85c1e99f7..86308b09c 100644
--- a/karm/karm_part.h
+++ b/karm/karm_part.h
@@ -6,7 +6,7 @@
#include <kparts/factory.h>
#include <karmdcopiface.h>
#include "reportcriteria.h"
-#include <qlistview.h>
+#include <tqlistview.h>
class KAccel;
class KAccelMenuWatch;
@@ -33,9 +33,9 @@ class karmPart : public KParts::ReadWritePart, virtual public KarmDCOPIface
private:
void makeMenus();
- QString _hastodo( Task* task, const QString &taskname ) const;
- QString _hasTask( Task* task, const QString &taskname ) const;
- Task* _hasUid( Task* task, const QString &uid ) const;
+ TQString _hastodo( Task* task, const TQString &taskname ) const;
+ TQString _hasTask( Task* task, const TQString &taskname ) const;
+ Task* _hasUid( Task* task, const TQString &uid ) const;
KAccel* _accel;
KAccelMenuWatch* _watcher;
@@ -53,34 +53,34 @@ class karmPart : public KParts::ReadWritePart, virtual public KarmDCOPIface
KAction* actionPreferences;
KAction* actionClipTotals;
KAction* actionClipHistory;
- QString m_error[ KARM_MAX_ERROR_NO + 1 ];
+ TQString m_error[ KARM_MAX_ERROR_NO + 1 ];
friend class KarmTray;
public:
- karmPart(QWidget *parentWidget, const char *widgetName,
- QObject *parent, const char *name);
+ karmPart(TQWidget *parentWidget, const char *widgetName,
+ TQObject *parent, const char *name);
// DCOP
void quit();
virtual bool save();
- QString version() const;
- QString taskIdFromName( const QString &taskName ) const;
+ TQString version() const;
+ TQString taskIdFromName( const TQString &taskName ) const;
/** @reimp from KarmDCOPIface */
- int addTask( const QString &taskName );
+ int addTask( const TQString &taskName );
/** @reimp from KarmDCOPIface */
- QString setPerCentComplete( const QString& taskName, int PerCent );
+ TQString setPerCentComplete( const TQString& taskName, int PerCent );
/** @reimp from KarmDCOPIface */
- int bookTime( const QString& taskId, const QString& iso8601StartDateTime, long durationInMinutes );
+ int bookTime( const TQString& taskId, const TQString& iso8601StartDateTime, long durationInMinutes );
/** @reimp from KarmDCOPIface */
- QString getError( int karmErrorNumber ) const;
- int totalMinutesForTaskId( const QString& taskId );
- QString starttimerfor( const QString &taskname );
- QString stoptimerfor( const QString &taskname );
- QString deletetodo();
+ TQString getError( int karmErrorNumber ) const;
+ int totalMinutesForTaskId( const TQString& taskId );
+ TQString starttimerfor( const TQString &taskname );
+ TQString stoptimerfor( const TQString &taskname );
+ TQString deletetodo();
bool getpromptdelete();
- QString setpromptdelete( bool prompt );
- QString exportcsvfile( QString filename, QString from, QString to, int type = 0, bool decimalMinutes=true, bool allTasks=true, QString delimiter="r", QString quote="q" );
- QString importplannerfile( QString filename );
+ TQString setpromptdelete( bool prompt );
+ TQString exportcsvfile( TQString filename, TQString from, TQString to, int type = 0, bool decimalMinutes=true, bool allTasks=true, TQString delimiter="r", TQString quote="q" );
+ TQString importplannerfile( TQString filename );
virtual ~karmPart();
@@ -108,7 +108,7 @@ protected:
virtual bool saveFile();
protected slots:
- void contextMenuRequest( QListViewItem*, const QPoint& point, int );
+ void contextMenuRequest( TQListViewItem*, const TQPoint& point, int );
void fileOpen();
void fileSaveAs();
void slotSelectionChanged();
@@ -124,9 +124,9 @@ class karmPartFactory : public KParts::Factory
public:
karmPartFactory();
virtual ~karmPartFactory();
- 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();
private:
diff --git a/karm/karmdcopiface.h b/karm/karmdcopiface.h
index 1135c81e6..6c0480336 100644
--- a/karm/karmdcopiface.h
+++ b/karm/karmdcopiface.h
@@ -30,10 +30,10 @@ class KarmDCOPIface : virtual public DCOPObject
k_dcop:
/** Return karm version. */
- virtual QString version() const = 0;
+ virtual TQString version() const = 0;
/** Return id of task found, empty string if no match. */
- virtual QString taskIdFromName( const QString& taskName ) const = 0;
+ virtual TQString taskIdFromName( const TQString& taskName ) const = 0;
/**
* Add a new top-level task.
@@ -44,7 +44,7 @@ class KarmDCOPIface : virtual public DCOPObject
*
* @return 0 on success, error number on failure.
*/
- virtual int addTask( const QString& taskName ) = 0;
+ virtual int addTask( const TQString& taskName ) = 0;
/**
* Set percent complete to a task
@@ -54,7 +54,7 @@ class KarmDCOPIface : virtual public DCOPObject
*
* @return "" on success, error msg on failure.
*/
- virtual QString setPerCentComplete( const QString& taskName, int perCent ) = 0;
+ virtual TQString setPerCentComplete( const TQString& taskName, int perCent ) = 0;
/**
* Add time to a task.
@@ -74,7 +74,7 @@ class KarmDCOPIface : virtual public DCOPObject
* @param durationInMinutes The amount of time to book against the taskId.
*
*/
- virtual int bookTime( const QString& taskId, const QString& iso8601StartDateTime,
+ virtual int bookTime( const TQString& taskId, const TQString& iso8601StartDateTime,
long durationInMinutes ) = 0;
/**
@@ -87,7 +87,7 @@ class KarmDCOPIface : virtual public DCOPObject
* the return value.
*
*/
- virtual QString getError( int karmErrorNumber ) const = 0;
+ virtual TQString getError( int karmErrorNumber ) const = 0;
/**
* Total time currently associated with a task.
@@ -97,30 +97,30 @@ class KarmDCOPIface : virtual public DCOPObject
*
* @param taskId Unique ID of task to lookup bookings for.
*/
- virtual int totalMinutesForTaskId( const QString& taskId ) = 0;
+ virtual int totalMinutesForTaskId( const TQString& taskId ) = 0;
/** Start timer for all tasks with the summary taskname. */
// may conflict with unitaskmode
- virtual QString starttimerfor( const QString& taskname ) = 0;
+ virtual TQString starttimerfor( const TQString& taskname ) = 0;
/** Stop timer for all tasks with the summary taskname. */
// may conflict with unitaskmode
- virtual QString stoptimerfor( const QString& taskname ) = 0;
+ virtual TQString stoptimerfor( const TQString& taskname ) = 0;
/** delete the current item */
- virtual QString deletetodo() = 0;
+ virtual TQString deletetodo() = 0;
/** set if prompted on deleting a task */
- virtual QString setpromptdelete( bool prompt ) = 0;
+ virtual TQString setpromptdelete( bool prompt ) = 0;
/** get if prompted on deleting a task */
virtual bool getpromptdelete() = 0;
/** export csv history or totals file */
- virtual QString exportcsvfile( QString filename, QString from, QString to, int type = 0, bool decimalMinutes=true, bool allTasks=true, QString delimiter=";", QString quote="'" ) = 0;
+ virtual TQString exportcsvfile( TQString filename, TQString from, TQString to, int type = 0, bool decimalMinutes=true, bool allTasks=true, TQString delimiter=";", TQString quote="'" ) = 0;
/** import planner project file */
- virtual QString importplannerfile( QString filename ) = 0;
+ virtual TQString importplannerfile( TQString filename ) = 0;
/** save your tasks */
virtual bool save() = 0;
diff --git a/karm/karmstorage.cpp b/karm/karmstorage.cpp
index 7e150d057..e895d2639 100644
--- a/karm/karmstorage.cpp
+++ b/karm/karmstorage.cpp
@@ -27,12 +27,12 @@
#include <cassert>
-#include <qfile.h>
-#include <qsize.h>
-#include <qdict.h>
-#include <qdatetime.h>
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqfile.h>
+#include <tqsize.h>
+#include <tqdict.h>
+#include <tqdatetime.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
#include "incidence.h"
#include "kapplication.h" // kapp
@@ -80,7 +80,7 @@ KarmStorage::KarmStorage()
_calendar = 0;
}
-QString KarmStorage::load (TaskView* view, const Preferences* preferences, QString fileName )
+TQString KarmStorage::load (TaskView* view, const Preferences* preferences, TQString fileName )
// loads data from filename into view. If no filename is given, filename from preferences is used.
// filename might be of use if this program is run as embedded konqueror plugin.
{
@@ -92,7 +92,7 @@ QString KarmStorage::load (TaskView* view, const Preferences* preferences, QStri
// Use KDE_CXXFLAGS=$(USE_EXCEPTIONS) in Makefile.am if you want to use
// exceptions (David Faure)
- QString err;
+ TQString err;
KEMailSettings settings;
if ( fileName.isEmpty() ) fileName = preferences->iCalFile();
@@ -107,7 +107,7 @@ QString KarmStorage::load (TaskView* view, const Preferences* preferences, QStri
{
int handle;
handle = open (
- QFile::encodeName( fileName ),
+ TQFile::encodeName( fileName ),
O_CREAT|O_EXCL|O_WRONLY,
S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH
);
@@ -132,10 +132,10 @@ QString KarmStorage::load (TaskView* view, const Preferences* preferences, QStri
}
_calendar = resource;
- QObject::connect (_calendar, SIGNAL(resourceChanged(ResourceCalendar *)),
- view, SLOT(iCalFileModified(ResourceCalendar *)));
+ TQObject::connect (_calendar, TQT_SIGNAL(resourceChanged(ResourceCalendar *)),
+ view, TQT_SLOT(iCalFileModified(ResourceCalendar *)));
_calendar->setTimeZoneId( KPimPrefs::timezone() );
- _calendar->setResourceName( QString::fromLatin1("KArm") );
+ _calendar->setResourceName( TQString::fromLatin1("KArm") );
_calendar->open();
_calendar->load();
@@ -153,10 +153,10 @@ QString KarmStorage::load (TaskView* view, const Preferences* preferences, QStri
{
KCal::Todo::List todoList;
KCal::Todo::List::ConstIterator todo;
- QDict< Task > map;
+ TQDict< Task > map;
// Build dictionary to look up Task object from Todo uid. Each task is a
- // QListViewItem, and is initially added with the view as the parent.
+ // TQListViewItem, and is initially added with the view as the parent.
todoList = _calendar->rawTodos();
kdDebug(5970) << "KarmStorage::load "
<< "rawTodo count (includes completed todos) ="
@@ -213,21 +213,21 @@ QString KarmStorage::load (TaskView* view, const Preferences* preferences, QStri
return err;
}
-QString KarmStorage::icalfile()
+TQString KarmStorage::icalfile()
{
kdDebug(5970) << "Entering KarmStorage::icalfile" << endl;
return _icalfile;
}
-QString KarmStorage::buildTaskView(KCal::ResourceCalendar *rc, TaskView *view)
+TQString KarmStorage::buildTaskView(KCal::ResourceCalendar *rc, TaskView *view)
// makes *view contain the tasks out of *rc.
{
- QString err;
+ TQString err;
KCal::Todo::List todoList;
KCal::Todo::List::ConstIterator todo;
- QDict< Task > map;
- vector<QString> runningTasks;
- vector<QDateTime> startTimes;
+ TQDict< Task > map;
+ vector<TQString> runningTasks;
+ vector<TQDateTime> startTimes;
// remember tasks that are running and their start times
for ( int i=0; i<view->count(); i++)
@@ -245,7 +245,7 @@ QString KarmStorage::buildTaskView(KCal::ResourceCalendar *rc, TaskView *view)
// 1. insert tasks form rc into taskview
// 1.1. Build dictionary to look up Task object from Todo uid. Each task is a
- // QListViewItem, and is initially added with the view as the parent.
+ // TQListViewItem, and is initially added with the view as the parent.
todoList = rc->rawTodos();
for( todo = todoList.begin(); todo != todoList.end(); ++todo )
{
@@ -305,12 +305,12 @@ void KarmStorage::closeStorage(TaskView* view)
}
}
-QString KarmStorage::save(TaskView* taskview)
+TQString KarmStorage::save(TaskView* taskview)
{
kdDebug(5970) << "entering KarmStorage::save" << endl;
- QString err=QString();
+ TQString err=TQString();
- QPtrStack< KCal::Todo > parents;
+ TQPtrStack< KCal::Todo > parents;
for (Task* task=taskview->first_child(); task; task = task->nextSibling())
{
@@ -336,10 +336,10 @@ QString KarmStorage::save(TaskView* taskview)
return err;
}
-QString KarmStorage::writeTaskAsTodo(Task* task, const int level,
- QPtrStack< KCal::Todo >& parents )
+TQString KarmStorage::writeTaskAsTodo(Task* task, const int level,
+ TQPtrStack< KCal::Todo >& parents )
{
- QString err;
+ TQString err;
KCal::Todo* todo;
todo = _calendar->todo(task->uid());
@@ -381,15 +381,15 @@ bool KarmStorage::isNewStorage(const Preferences* preferences) const
// These only stored total and session times.
//
-QString KarmStorage::loadFromFlatFile(TaskView* taskview,
- const QString& filename)
+TQString KarmStorage::loadFromFlatFile(TaskView* taskview,
+ const TQString& filename)
{
- QString err;
+ TQString err;
kdDebug(5970)
<< "KarmStorage::loadFromFlatFile: " << filename << endl;
- QFile f(filename);
+ TQFile f(filename);
if( !f.exists() )
err = i18n("File \"%1\" not found.").arg(filename);
@@ -402,12 +402,12 @@ QString KarmStorage::loadFromFlatFile(TaskView* taskview,
if (!err)
{
- QString line;
+ TQString line;
- QPtrStack<Task> stack;
+ TQPtrStack<Task> stack;
Task *task;
- QTextStream stream(&f);
+ TQTextStream stream(&f);
while( !stream.atEnd() ) {
// lukas: this breaks for non-latin1 chars!!!
@@ -422,7 +422,7 @@ QString KarmStorage::loadFromFlatFile(TaskView* taskview,
long minutes;
int level;
- QString name;
+ TQString name;
DesktopList desktopList;
if (!parseLine(line, &minutes, &name, &level, &desktopList))
continue;
@@ -464,10 +464,10 @@ QString KarmStorage::loadFromFlatFile(TaskView* taskview,
return err;
}
-QString KarmStorage::loadFromFlatFileCumulative(TaskView* taskview,
- const QString& filename)
+TQString KarmStorage::loadFromFlatFileCumulative(TaskView* taskview,
+ const TQString& filename)
{
- QString err = loadFromFlatFile(taskview, filename);
+ TQString err = loadFromFlatFile(taskview, filename);
if (!err)
{
for (Task* task = taskview->first_child(); task;
@@ -479,7 +479,7 @@ QString KarmStorage::loadFromFlatFileCumulative(TaskView* taskview,
return err;
}
-bool KarmStorage::parseLine(QString line, long *time, QString *name,
+bool KarmStorage::parseLine(TQString line, long *time, TQString *name,
int *level, DesktopList* desktopList)
{
if (line.find('#') == 0) {
@@ -493,8 +493,8 @@ bool KarmStorage::parseLine(QString line, long *time, QString *name,
return false;
}
- QString levelStr = line.left(index);
- QString rest = line.remove(0,index+1);
+ TQString levelStr = line.left(index);
+ TQString rest = line.remove(0,index+1);
index = rest.find('\t');
if (index == -1) {
@@ -502,7 +502,7 @@ bool KarmStorage::parseLine(QString line, long *time, QString *name,
return false;
}
- QString timeStr = rest.left(index);
+ TQString timeStr = rest.left(index);
rest = rest.remove(0,index+1);
bool ok;
@@ -510,11 +510,11 @@ bool KarmStorage::parseLine(QString line, long *time, QString *name,
index = rest.find('\t'); // check for optional desktops string
if (index >= 0) {
*name = rest.left(index);
- QString deskLine = rest.remove(0,index+1);
+ TQString deskLine = rest.remove(0,index+1);
// now transform the ds string (e.g. "3", or "1,4,5") into
// an DesktopList
- QString ds;
+ TQString ds;
int d;
int commaIdx = deskLine.find(',');
while (commaIdx >= 0) {
@@ -572,22 +572,22 @@ void KarmStorage::adjustFromLegacyFileFormat(Task* task)
//----------------------------------------------------------------------------
// Routines that handle Comma-Separated Values export file format.
//
-QString KarmStorage::exportcsvFile( TaskView *taskview,
+TQString KarmStorage::exportcsvFile( TaskView *taskview,
const ReportCriteria &rc )
{
- QString delim = rc.delimiter;
- QString dquote = rc.quote;
- QString double_dquote = dquote + dquote;
+ TQString delim = rc.delimiter;
+ TQString dquote = rc.quote;
+ TQString double_dquote = dquote + dquote;
bool to_quote = true;
- QString err;
+ TQString err;
Task* task;
int maxdepth=0;
kdDebug(5970)
<< "KarmStorage::exportcsvFile: " << rc.url << endl;
- QString title = i18n("Export Progress");
+ TQString title = i18n("Export Progress");
KProgressDialog dialog( taskview, 0, title );
dialog.setAutoClose( true );
dialog.setAllowCancel( true );
@@ -595,13 +595,13 @@ QString KarmStorage::exportcsvFile( TaskView *taskview,
// The default dialog was not displaying all the text in the title bar.
int width = taskview->fontMetrics().width(title) * 3;
- QSize dialogsize;
+ TQSize dialogsize;
dialogsize.setWidth(width);
dialog.setInitialSize( dialogsize, true );
if ( taskview->count() > 1 ) dialog.show();
- QString retval;
+ TQString retval;
// Find max task depth
int tasknr = 0;
@@ -663,15 +663,15 @@ QString KarmStorage::exportcsvFile( TaskView *taskview,
// save, either locally or remote
if ((rc.url.isLocalFile()) || (!rc.url.url().contains("/")))
{
- QString filename=rc.url.path();
+ TQString filename=rc.url.path();
if (filename.isEmpty()) filename=rc.url.url();
- QFile f( filename );
+ TQFile f( filename );
if( !f.open( IO_WriteOnly ) ) {
err = i18n( "Could not open \"%1\"." ).arg( filename );
}
if (!err)
{
- QTextStream stream(&f);
+ TQTextStream stream(&f);
// Export to file
stream << retval;
f.close();
@@ -680,13 +680,13 @@ QString KarmStorage::exportcsvFile( TaskView *taskview,
else // use remote file
{
KTempFile tmpFile;
- if ( tmpFile.status() != 0 ) err = QString::fromLatin1( "Unable to get temporary file" );
+ if ( tmpFile.status() != 0 ) err = TQString::fromLatin1( "Unable to get temporary file" );
else
{
- QTextStream *stream=tmpFile.textStream();
+ TQTextStream *stream=tmpFile.textStream();
*stream << retval;
tmpFile.close();
- if (!KIO::NetAccess::upload( tmpFile.name(), rc.url, 0 )) err=QString::fromLatin1("Could not upload");
+ if (!KIO::NetAccess::upload( tmpFile.name(), rc.url, 0 )) err=TQString::fromLatin1("Could not upload");
}
}
@@ -701,10 +701,10 @@ QString KarmStorage::exportcsvFile( TaskView *taskview,
// public routines:
//
-QString KarmStorage::addTask(const Task* task, const Task* parent)
+TQString KarmStorage::addTask(const Task* task, const Task* parent)
{
KCal::Todo* todo;
- QString uid;
+ TQString uid;
todo = new KCal::Todo();
if ( _calendar->addTodo( todo ) )
@@ -755,7 +755,7 @@ bool KarmStorage::removeTask(Task* task)
return true;
}
-void KarmStorage::addComment(const Task* task, const QString& comment)
+void KarmStorage::addComment(const Task* task, const TQString& comment)
{
KCal::Todo* todo;
@@ -764,7 +764,7 @@ void KarmStorage::addComment(const Task* task, const QString& comment)
// Do this to avoid compiler warnings about comment not being used. once we
// transition to using the addComment method, we need this second param.
- QString s = comment;
+ TQString s = comment;
// TODO: Use libkcal comments
// todo->addComment(comment);
@@ -776,28 +776,28 @@ void KarmStorage::addComment(const Task* task, const QString& comment)
long KarmStorage::printTaskHistory (
const Task *task,
- const QMap<QString,long> &taskdaytotals,
- QMap<QString,long> &daytotals,
- const QDate &from,
- const QDate &to,
+ const TQMap<TQString,long> &taskdaytotals,
+ TQMap<TQString,long> &daytotals,
+ const TQDate &from,
+ const TQDate &to,
const int level,
- vector <QString> &matrix,
+ vector <TQString> &matrix,
const ReportCriteria &rc)
// to>=from is precondition
{
long ownline=linenr++; // the how many-th instance of this function is this
long colrectot=0; // colum where to write the task's total recursive time
- vector <QString> cell; // each line of the matrix is stored in an array of cells, one containing the recursive total
+ vector <TQString> cell; // each line of the matrix is stored in an array of cells, one containing the recursive total
long add; // total recursive time of all subtasks
- QString delim = rc.delimiter;
- QString dquote = rc.quote;
- QString double_dquote = dquote + dquote;
+ TQString delim = rc.delimiter;
+ TQString dquote = rc.quote;
+ TQString double_dquote = dquote + dquote;
bool to_quote = true;
- const QString cr = QString::fromLatin1("\n");
- QString buf;
- QString daytaskkey, daykey;
- QDate day;
+ const TQString cr = TQString::fromLatin1("\n");
+ TQString buf;
+ TQString daytaskkey, daykey;
+ TQDate day;
long sum;
if ( !task ) return 0;
@@ -807,14 +807,14 @@ long KarmStorage::printTaskHistory (
while (day <= to)
{
// write the time in seconds for the given task for the given day to s
- daykey = day.toString(QString::fromLatin1("yyyyMMdd"));
- daytaskkey = QString::fromLatin1("%1_%2")
+ daykey = day.toString(TQString::fromLatin1("yyyyMMdd"));
+ daytaskkey = TQString::fromLatin1("%1_%2")
.arg(daykey)
.arg(task->uid());
if (taskdaytotals.contains(daytaskkey))
{
- cell.push_back(QString::fromLatin1("%1")
+ cell.push_back(TQString::fromLatin1("%1")
.arg(formatTime(taskdaytotals[daytaskkey]/60, rc.decimalMinutes)));
sum += taskdaytotals[daytaskkey]; // in seconds
@@ -829,7 +829,7 @@ long KarmStorage::printTaskHistory (
}
// Total for task
- cell.push_back(QString::fromLatin1("%1").arg(formatTime(sum/60, rc.decimalMinutes)));
+ cell.push_back(TQString::fromLatin1("%1").arg(formatTime(sum/60, rc.decimalMinutes)));
// room for the recursive total time (that cannot be calculated now)
cell.push_back(delim);
@@ -865,14 +865,14 @@ long KarmStorage::printTaskHistory (
add += printTaskHistory( subTask, taskdaytotals, daytotals, from, to , level+1, matrix,
rc );
}
- cell[colrectot]=(QString::fromLatin1("%1").arg(formatTime((add+sum)/60, rc.decimalMinutes )));
+ cell[colrectot]=(TQString::fromLatin1("%1").arg(formatTime((add+sum)/60, rc.decimalMinutes )));
for (unsigned int i=0; i < cell.size(); i++) matrix[ownline]+=cell[i];
return add+sum;
}
-QString KarmStorage::report( TaskView *taskview, const ReportCriteria &rc )
+TQString KarmStorage::report( TaskView *taskview, const ReportCriteria &rc )
{
- QString err;
+ TQString err;
if ( rc.reportType == ReportCriteria::CSVHistoryExport )
err = exportcsvHistory( taskview, rc.from, rc.to, rc );
else if ( rc.reportType == ReportCriteria::CSVTotalsExport )
@@ -884,33 +884,33 @@ QString KarmStorage::report( TaskView *taskview, const ReportCriteria &rc )
}
// export history report as csv, all tasks X all dates in one block
-QString KarmStorage::exportcsvHistory ( TaskView *taskview,
- const QDate &from,
- const QDate &to,
+TQString KarmStorage::exportcsvHistory ( TaskView *taskview,
+ const TQDate &from,
+ const TQDate &to,
const ReportCriteria &rc)
{
- QString delim = rc.delimiter;
- const QString cr = QString::fromLatin1("\n");
- QString err;
+ TQString delim = rc.delimiter;
+ const TQString cr = TQString::fromLatin1("\n");
+ TQString err;
// below taken from timekard.cpp
- QString retval;
- QString taskhdr, totalhdr;
- QString line, buf;
+ TQString retval;
+ TQString taskhdr, totalhdr;
+ TQString line, buf;
long sum;
- QValueList<HistoryEvent> events;
- QValueList<HistoryEvent>::iterator event;
- QMap<QString, long> taskdaytotals;
- QMap<QString, long> daytotals;
- QString daytaskkey, daykey;
- QDate day;
- QDate dayheading;
+ TQValueList<HistoryEvent> events;
+ TQValueList<HistoryEvent>::iterator event;
+ TQMap<TQString, long> taskdaytotals;
+ TQMap<TQString, long> daytotals;
+ TQString daytaskkey, daykey;
+ TQDate day;
+ TQDate dayheading;
// parameter-plausi
if ( from > to )
{
- err = QString::fromLatin1 (
+ err = TQString::fromLatin1 (
"'to' has to be a date later than or equal to 'from'.");
}
@@ -921,7 +921,7 @@ QString KarmStorage::exportcsvHistory ( TaskView *taskview,
.arg(KGlobal::locale()->formatDate(to));
retval += cr;
retval += i18n("Printed on: %1")
- .arg(KGlobal::locale()->formatDateTime(QDateTime::currentDateTime()));
+ .arg(KGlobal::locale()->formatDateTime(TQDateTime::currentDateTime()));
retval += cr;
day=from;
@@ -936,8 +936,8 @@ QString KarmStorage::exportcsvHistory ( TaskView *taskview,
// so times are accumulated for each task.
for (event = events.begin(); event != events.end(); ++event)
{
- daykey = (*event).start().date().toString(QString::fromLatin1("yyyyMMdd"));
- daytaskkey = QString(QString::fromLatin1("%1_%2"))
+ daykey = (*event).start().date().toString(TQString::fromLatin1("yyyyMMdd"));
+ daytaskkey = TQString(TQString::fromLatin1("%1_%2"))
.arg(daykey)
.arg((*event).todoUid());
@@ -953,7 +953,7 @@ QString KarmStorage::exportcsvHistory ( TaskView *taskview,
while ( dayheading <= to )
{
// Use ISO 8601 format for date.
- retval += dayheading.toString(QString::fromLatin1("yyyy-MM-dd"));
+ retval += dayheading.toString(TQString::fromLatin1("yyyy-MM-dd"));
retval += delim;
dayheading=dayheading.addDays(1);
}
@@ -962,7 +962,7 @@ QString KarmStorage::exportcsvHistory ( TaskView *taskview,
retval += line;
// the tasks
- vector <QString> matrix;
+ vector <TQString> matrix;
linenr=0;
for (int i=0; i<=taskview->count()+1; i++) matrix.push_back("");
if (events.empty())
@@ -993,11 +993,11 @@ QString KarmStorage::exportcsvHistory ( TaskView *taskview,
day = from;
while (day<=to)
{
- daykey = day.toString(QString::fromLatin1("yyyyMMdd"));
+ daykey = day.toString(TQString::fromLatin1("yyyyMMdd"));
if (daytotals.contains(daykey))
{
- retval += QString::fromLatin1("%1")
+ retval += TQString::fromLatin1("%1")
.arg(formatTime(daytotals[daykey]/60, rc.decimalMinutes));
sum += daytotals[daykey]; // in seconds
}
@@ -1005,7 +1005,7 @@ QString KarmStorage::exportcsvHistory ( TaskView *taskview,
day = day.addDays(1);
}
- retval += QString::fromLatin1("%1%2%3%4")
+ retval += TQString::fromLatin1("%1%2%3%4")
.arg( formatTime( sum/60, rc.decimalMinutes ) )
.arg( delim ).arg( delim )
.arg( i18n( "Total" ) );
@@ -1017,15 +1017,15 @@ QString KarmStorage::exportcsvHistory ( TaskView *taskview,
if ((rc.url.isLocalFile()) || (!rc.url.url().contains("/")))
{
- QString filename=rc.url.path();
+ TQString filename=rc.url.path();
if (filename.isEmpty()) filename=rc.url.url();
- QFile f( filename );
+ TQFile f( filename );
if( !f.open( IO_WriteOnly ) ) {
err = i18n( "Could not open \"%1\"." ).arg( filename );
}
if (!err)
{
- QTextStream stream(&f);
+ TQTextStream stream(&f);
// Export to file
stream << retval;
f.close();
@@ -1036,20 +1036,20 @@ QString KarmStorage::exportcsvHistory ( TaskView *taskview,
KTempFile tmpFile;
if ( tmpFile.status() != 0 )
{
- err = QString::fromLatin1( "Unable to get temporary file" );
+ err = TQString::fromLatin1( "Unable to get temporary file" );
}
else
{
- QTextStream *stream=tmpFile.textStream();
+ TQTextStream *stream=tmpFile.textStream();
*stream << retval;
tmpFile.close();
- if (!KIO::NetAccess::upload( tmpFile.name(), rc.url, 0 )) err=QString::fromLatin1("Could not upload");
+ if (!KIO::NetAccess::upload( tmpFile.name(), rc.url, 0 )) err=TQString::fromLatin1("Could not upload");
}
}
return err;
}
-void KarmStorage::stopTimer(const Task* task, QDateTime when)
+void KarmStorage::stopTimer(const Task* task, TQDateTime when)
{
kdDebug(5970) << "Entering KarmStorage::stopTimer" << endl;
long delta = task->startTime().secsTo(when);
@@ -1057,12 +1057,12 @@ void KarmStorage::stopTimer(const Task* task, QDateTime when)
}
bool KarmStorage::bookTime(const Task* task,
- const QDateTime& startDateTime,
+ const TQDateTime& startDateTime,
const long durationInSeconds)
{
// Ignores preferences setting re: logging history.
KCal::Event* e;
- QDateTime end;
+ TQDateTime end;
e = baseEvent( task );
e->setDtStart( startDateTime );
@@ -1070,8 +1070,8 @@ bool KarmStorage::bookTime(const Task* task,
// Use a custom property to keep a record of negative durations
e->setCustomProperty( kapp->instanceName(),
- QCString("duration"),
- QString::number(durationInSeconds));
+ TQCString("duration"),
+ TQString::number(durationInSeconds));
return _calendar->addEvent(e);
}
@@ -1080,7 +1080,7 @@ void KarmStorage::changeTime(const Task* task, const long deltaSeconds)
{
kdDebug(5970) << "Entering KarmStorage::changeTime ( " << task->name() << "," << deltaSeconds << " )" << endl;
KCal::Event* e;
- QDateTime end;
+ TQDateTime end;
// Don't write events (with timer start/stop duration) if user has turned
// this off in the settings dialog.
@@ -1096,8 +1096,8 @@ void KarmStorage::changeTime(const Task* task, const long deltaSeconds)
// Use a custom property to keep a record of negative durations
e->setCustomProperty( kapp->instanceName(),
- QCString("duration"),
- QString::number(deltaSeconds));
+ TQCString("duration"),
+ TQString::number(deltaSeconds));
_calendar->addEvent(e);
@@ -1116,7 +1116,7 @@ void KarmStorage::changeTime(const Task* task, const long deltaSeconds)
KCal::Event* KarmStorage::baseEvent(const Task * task)
{
KCal::Event* e;
- QStringList categories;
+ TQStringList categories;
e = new KCal::Event;
e->setSummary(task->name());
@@ -1138,8 +1138,8 @@ KCal::Event* KarmStorage::baseEvent(const Task * task)
return e;
}
-HistoryEvent::HistoryEvent(QString uid, QString name, long duration,
- QDateTime start, QDateTime stop, QString todoUid)
+HistoryEvent::HistoryEvent(TQString uid, TQString name, long duration,
+ TQDateTime start, TQDateTime stop, TQString todoUid)
{
_uid = uid;
_name = name;
@@ -1150,16 +1150,16 @@ HistoryEvent::HistoryEvent(QString uid, QString name, long duration,
}
-QValueList<HistoryEvent> KarmStorage::getHistory(const QDate& from,
- const QDate& to)
+TQValueList<HistoryEvent> KarmStorage::getHistory(const TQDate& from,
+ const TQDate& to)
{
- QValueList<HistoryEvent> retval;
- QStringList processed;
+ TQValueList<HistoryEvent> retval;
+ TQStringList processed;
KCal::Event::List events;
KCal::Event::List::iterator event;
- QString duration;
+ TQString duration;
- for(QDate d = from; d <= to; d = d.addDays(1))
+ for(TQDate d = from; d <= to; d = d.addDays(1))
{
events = _calendar->rawEventsForDate( d );
for (event = events.begin(); event != events.end(); ++event)
@@ -1176,7 +1176,7 @@ QValueList<HistoryEvent> KarmStorage::getHistory(const QDate& from,
processed.append( (*event)->uid());
duration = (*event)->customProperty(kapp->instanceName(),
- QCString("duration"));
+ TQCString("duration"));
if ( ! duration.isNull() )
{
if ( (*event)->relatedTo()
@@ -1206,9 +1206,9 @@ QValueList<HistoryEvent> KarmStorage::getHistory(const QDate& from,
return retval;
}
-bool KarmStorage::remoteResource( const QString& file ) const
+bool KarmStorage::remoteResource( const TQString& file ) const
{
- QString f = file.lower();
+ TQString f = file.lower();
bool rval = f.startsWith( "http://" ) || f.startsWith( "ftp://" );
kdDebug(5970) << "KarmStorage::remoteResource( " << file << " ) returns " << rval << endl;
diff --git a/karm/karmstorage.h b/karm/karmstorage.h
index c84658297..6c02ca901 100644
--- a/karm/karmstorage.h
+++ b/karm/karmstorage.h
@@ -23,8 +23,8 @@
#ifndef KARM_STORAGE_H
#define KARM_STORAGE_H
-#include <qdict.h>
-#include <qptrstack.h>
+#include <tqdict.h>
+#include <tqptrstack.h>
#include "journal.h"
#include "reportcriteria.h"
@@ -100,19 +100,19 @@ class KarmStorage
* @return empty string if success, error message if error.
*
*/
- QString load(TaskView* taskview, const Preferences* preferences, QString fileName="" );
+ TQString load(TaskView* taskview, const Preferences* preferences, TQString fileName="" );
/*
* Return the name of the iCal file
*/
- QString icalfile();
+ TQString icalfile();
/*
* Build up the taskview.
*
* This is needed if the iCal file has been modified
*/
- QString buildTaskView(KCal::ResourceCalendar *rc, TaskView *view);
+ TQString buildTaskView(KCal::ResourceCalendar *rc, TaskView *view);
/* Close calendar and clear view. Release lock if holding one. */
void closeStorage(TaskView* view);
@@ -127,7 +127,7 @@ class KarmStorage
*
* @param taskview The list group used in the TaskView
*/
- QString save(TaskView* taskview);
+ TQString save(TaskView* taskview);
/**
* Read tasks and their total times from a text file (legacy storage).
@@ -142,7 +142,7 @@ class KarmStorage
* string task name
* [string] desktops, in which to count. e.g. "1,2,5" (optional)
*/
- QString loadFromFlatFile(TaskView* taskview, const QString& filename);
+ TQString loadFromFlatFile(TaskView* taskview, const TQString& filename);
/**
* Reads tasks and their total times from text file (legacy).
@@ -152,13 +152,13 @@ class KarmStorage
*
* @see loadFromFlatFile
*/
- QString loadFromFlatFileCumulative(TaskView* taskview,
- const QString& filename);
+ TQString loadFromFlatFileCumulative(TaskView* taskview,
+ const TQString& filename);
/**
Output a report based on contents of ReportCriteria.
*/
- QString report( TaskView *taskview, const ReportCriteria &rc );
+ TQString report( TaskView *taskview, const ReportCriteria &rc );
/**
* Log the change in a task's time.
@@ -203,7 +203,7 @@ class KarmStorage
* @return true if event was added, false if not (if, for example, the
* attempted file lock failed).
*/
- bool bookTime(const Task* task, const QDateTime& startDateTime,
+ bool bookTime(const Task* task, const TQDateTime& startDateTime,
long durationInSeconds);
/**
@@ -217,7 +217,7 @@ class KarmStorage
* @param oldname The old name of the task. The new name is in the task
* object already.
*/
- void setName(const Task* task, const QString& oldname) { Q_UNUSED(task); Q_UNUSED(oldname); }
+ void setName(const Task* task, const TQString& oldname) { Q_UNUSED(task); Q_UNUSED(oldname); }
/**
@@ -239,7 +239,7 @@ class KarmStorage
*
* @param task The task the timer was stopped for.
*/
- void stopTimer(const Task* task, QDateTime when=QDateTime::currentDateTime());
+ void stopTimer(const Task* task, TQDateTime when=TQDateTime::currentDateTime());
/**
* Log a new comment for this task.
@@ -250,7 +250,7 @@ class KarmStorage
* @param task The task that gets the comment
* @param comment The comment
*/
- void addComment(const Task* task, const QString& comment);
+ void addComment(const Task* task, const TQString& comment);
/**
@@ -272,10 +272,10 @@ class KarmStorage
* @param task The task to be removed.
* @param parent The parent of this task. Must have a uid() that is in
* the existing calendar. If zero, this task is considered a root task.
- * @return The unique ID for the new VTODO. Return an null QString if
+ * @return The unique ID for the new VTODO. Return an null TQString if
* there was an error creating the new calendar object.
*/
- QString addTask(const Task* task, const Task* parent);
+ TQString addTask(const Task* task, const Task* parent);
/**
* Check if the iCalendar file currently loaded has any Todos in it.
@@ -297,23 +297,23 @@ class KarmStorage
bool isNewStorage(const Preferences* preferences) const;
/** Return a list of start/stop events for the given date range. */
- QValueList<HistoryEvent> getHistory(const QDate& from, const QDate& to);
+ TQValueList<HistoryEvent> getHistory(const TQDate& from, const TQDate& to);
private:
static KarmStorage *_instance;
KCal::ResourceCalendar *_calendar;
- QString _icalfile;
+ TQString _icalfile;
KarmStorage();
void adjustFromLegacyFileFormat(Task* task);
- bool parseLine(QString line, long *time, QString *name, int *level,
+ bool parseLine(TQString line, long *time, TQString *name, int *level,
DesktopList* desktopList);
- QString writeTaskAsTodo
- (Task* task, const int level, QPtrStack< KCal::Todo >& parents);
+ TQString writeTaskAsTodo
+ (Task* task, const int level, TQPtrStack< KCal::Todo >& parents);
bool saveCalendar();
KCal::Event* baseEvent(const Task*);
- bool remoteResource( const QString& file ) const;
+ bool remoteResource( const TQString& file ) const;
/**
* Writes all tasks and their totals to a Comma-Separated Values file.
@@ -322,26 +322,26 @@ class KarmStorage
* taskName,subtaskName,..,sessionTime,time,totalSessionTime,totalTime
* the number of subtasks is determined at runtime.
*/
- QString exportcsvFile( TaskView *taskview, const ReportCriteria &rc );
+ TQString exportcsvFile( TaskView *taskview, const ReportCriteria &rc );
/**
* Write task history to file as comma-delimited data.
*/
- QString exportcsvHistory (
+ TQString exportcsvHistory (
TaskView* taskview,
- const QDate& from,
- const QDate& to,
+ const TQDate& from,
+ const TQDate& to,
const ReportCriteria &rc
);
long printTaskHistory (
const Task *task,
- const QMap<QString,long>& taskdaytotals,
- QMap<QString,long>& daytotals,
- const QDate& from,
- const QDate& to,
+ const TQMap<TQString,long>& taskdaytotals,
+ TQMap<TQString,long>& daytotals,
+ const TQDate& from,
+ const TQDate& to,
const int level,
- std::vector <QString> &matrix,
+ std::vector <TQString> &matrix,
const ReportCriteria &rc
);
};
@@ -358,23 +358,23 @@ class HistoryEvent
public:
/** Needed to be used in a value list. */
HistoryEvent() {}
- HistoryEvent(QString uid, QString name, long duration,
- QDateTime start, QDateTime stop, QString todoUid);
- QString uid() {return _uid; }
- QString name() {return _name; }
+ HistoryEvent(TQString uid, TQString name, long duration,
+ TQDateTime start, TQDateTime stop, TQString todoUid);
+ TQString uid() {return _uid; }
+ TQString name() {return _name; }
/** In seconds. */
long duration() {return _duration; }
- QDateTime start() {return _start; }
- QDateTime stop() { return _stop; }
- QString todoUid() {return _todoUid; }
+ TQDateTime start() {return _start; }
+ TQDateTime stop() { return _stop; }
+ TQString todoUid() {return _todoUid; }
private:
- QString _uid;
- QString _todoUid;
- QString _name;
+ TQString _uid;
+ TQString _todoUid;
+ TQString _name;
long _duration;
- QDateTime _start;
- QDateTime _stop;
+ TQDateTime _start;
+ TQDateTime _stop;
};
diff --git a/karm/karmutility.cpp b/karm/karmutility.cpp
index 1663b178c..8a2de530a 100644
--- a/karm/karmutility.cpp
+++ b/karm/karmutility.cpp
@@ -7,9 +7,9 @@
#include <klocale.h>
#include "karmutility.h"
-QString formatTime( long minutes, bool decimal )
+TQString formatTime( long minutes, bool decimal )
{
- QString time;
+ TQString time;
if ( decimal ) {
time.sprintf("%.2f", minutes / 60.0);
time.replace( '.', KGlobal::locale()->decimalSymbol() );
diff --git a/karm/karmutility.h b/karm/karmutility.h
index 28fbdc029..7c5608fbe 100644
--- a/karm/karmutility.h
+++ b/karm/karmutility.h
@@ -1,7 +1,7 @@
#ifndef KARMUTILITY_H
#define KARMUTILITY_H
-#include <qstring.h>
+#include <tqstring.h>
/**
* Format time for output. All times output on screen or report output go
@@ -11,6 +11,6 @@
* Otherwise the format is hh:mi.
*
*/
-QString formatTime( long minutes, bool decimal=false );
+TQString formatTime( long minutes, bool decimal=false );
#endif
diff --git a/karm/ktimewidget.cpp b/karm/ktimewidget.cpp
index e7040f4f7..9de79d9dd 100644
--- a/karm/ktimewidget.cpp
+++ b/karm/ktimewidget.cpp
@@ -1,11 +1,11 @@
#include <stdlib.h> // abs()
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qlineedit.h>
-#include <qstring.h>
-#include <qvalidator.h>
-#include <qwidget.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqlineedit.h>
+#include <tqstring.h>
+#include <tqvalidator.h>
+#include <tqwidget.h>
#include <klocale.h> // i18n
#include <kglobal.h>
@@ -16,12 +16,12 @@ enum ValidatorType { HOUR, MINUTE };
class TimeValidator : public QValidator
{
public:
- TimeValidator( ValidatorType tp, QWidget *parent=0, const char *name=0)
- : QValidator(parent, name)
+ TimeValidator( ValidatorType tp, TQWidget *parent=0, const char *name=0)
+ : TQValidator(parent, name)
{
_tp = tp;
}
- State validate(QString &str, int &) const
+ State validate(TQString &str, int &) const
{
if (str.isEmpty())
return Acceptable;
@@ -46,26 +46,26 @@ class KarmLineEdit : public QLineEdit
{
public:
- KarmLineEdit( QWidget* parent, const char* name = 0 )
- : QLineEdit( parent, name ) {}
+ KarmLineEdit( TQWidget* parent, const char* name = 0 )
+ : TQLineEdit( parent, name ) {}
protected:
- virtual void keyPressEvent( QKeyEvent *event )
+ virtual void keyPressEvent( TQKeyEvent *event )
{
- QLineEdit::keyPressEvent( event );
+ TQLineEdit::keyPressEvent( event );
if ( text().length() == 2 && !event->text().isEmpty() )
focusNextPrevChild(true);
}
};
-KArmTimeWidget::KArmTimeWidget( QWidget* parent, const char* name )
- : QWidget(parent, name)
+KArmTimeWidget::KArmTimeWidget( TQWidget* parent, const char* name )
+ : TQWidget(parent, name)
{
- QHBoxLayout *layout = new QHBoxLayout(this);
+ TQHBoxLayout *layout = new TQHBoxLayout(this);
- _hourLE = new QLineEdit( this);
+ _hourLE = new TQLineEdit( this);
// 9999 hours > 1 year!
// 999 hours = 41 days (That should be enough ...)
_hourLE->setFixedWidth( fontMetrics().maxWidth() * 3
@@ -77,7 +77,7 @@ KArmTimeWidget::KArmTimeWidget( QWidget* parent, const char* name )
_hourLE->setAlignment( Qt::AlignRight );
- QLabel *hr = new QLabel( i18n( "abbreviation for hours", " hr. " ), this );
+ TQLabel *hr = new TQLabel( i18n( "abbreviation for hours", " hr. " ), this );
layout->addWidget( hr );
_minuteLE = new KarmLineEdit(this);
@@ -91,7 +91,7 @@ KArmTimeWidget::KArmTimeWidget( QWidget* parent, const char* name )
_minuteLE->setMaxLength(2);
_minuteLE->setAlignment( Qt::AlignRight );
- QLabel *min = new QLabel( i18n( "abbreviation for minutes", " min. " ), this );
+ TQLabel *min = new TQLabel( i18n( "abbreviation for minutes", " min. " ), this );
layout->addWidget( min );
layout->addStretch(1);
@@ -100,7 +100,7 @@ KArmTimeWidget::KArmTimeWidget( QWidget* parent, const char* name )
void KArmTimeWidget::setTime( long minutes )
{
- QString dummy;
+ TQString dummy;
long hourpart = labs(minutes) / 60;
long minutepart = labs(minutes) % 60;
@@ -111,7 +111,7 @@ void KArmTimeWidget::setTime( long minutes )
dummy.setNum( minutepart );
if (minutepart < 10 ) {
- dummy = QString::fromLatin1( "0" ) + dummy;
+ dummy = TQString::fromLatin1( "0" ) + dummy;
}
_minuteLE->setText( dummy );
}
diff --git a/karm/ktimewidget.h b/karm/ktimewidget.h
index 9c6eb3b42..a079fdc9a 100644
--- a/karm/ktimewidget.h
+++ b/karm/ktimewidget.h
@@ -10,15 +10,15 @@ class KarmLineEdit;
* Widget used for entering minutes and seconds with validation.
*/
-class KArmTimeWidget : public QWidget
+class KArmTimeWidget : public TQWidget
{
public:
- KArmTimeWidget( QWidget* parent = 0, const char* name = 0 );
+ KArmTimeWidget( TQWidget* parent = 0, const char* name = 0 );
void setTime( long minutes );
long time() const;
private:
- QLineEdit *_hourLE;
+ TQLineEdit *_hourLE;
KarmLineEdit *_minuteLE;
};
diff --git a/karm/main.cpp b/karm/main.cpp
index cc1fc1cde..b075b55c3 100644
--- a/karm/main.cpp
+++ b/karm/main.cpp
@@ -56,7 +56,7 @@ int main( int argc, char *argv[] )
MainWindow *mainWindow;
if ( args->count() > 0 )
{
- QString icsfile = QString::fromLocal8Bit( args->arg( 0 ) );
+ TQString icsfile = TQString::fromLocal8Bit( args->arg( 0 ) );
// FIXME: there is probably a Qt or KDE fcn for this test
if ( icsfile.startsWith( "/" )
|| icsfile.lower().startsWith( "http://" )
diff --git a/karm/mainwindow.cpp b/karm/mainwindow.cpp
index 141eafef9..6a80fa009 100644
--- a/karm/mainwindow.cpp
+++ b/karm/mainwindow.cpp
@@ -18,10 +18,10 @@
#include <kmessagebox.h>
#include <kstatusbar.h> // statusBar()
#include <kstdaction.h>
-#include <qkeycode.h>
-#include <qpopupmenu.h>
-#include <qptrlist.h>
-#include <qstring.h>
+#include <tqkeycode.h>
+#include <tqpopupmenu.h>
+#include <tqptrlist.h>
+#include <tqstring.h>
#include "karmerrors.h"
#include "karmutility.h"
@@ -34,7 +34,7 @@
#include "tray.h"
#include "version.h"
-MainWindow::MainWindow( const QString &icsfile )
+MainWindow::MainWindow( const TQString &icsfile )
: DCOPObject ( "KarmDCOPIface" ),
KParts::MainWindow(0,Qt::WStyle_ContextHelp),
_accel ( new KAccel( this ) ),
@@ -57,33 +57,33 @@ MainWindow::MainWindow( const QString &icsfile )
_watcher->updateMenus();
// connections
- connect( _taskView, SIGNAL( totalTimesChanged( long, long ) ),
- this, SLOT( updateTime( long, long ) ) );
- connect( _taskView, SIGNAL( selectionChanged ( QListViewItem * )),
- this, SLOT(slotSelectionChanged()));
- connect( _taskView, SIGNAL( updateButtons() ),
- this, SLOT(slotSelectionChanged()));
- connect( _taskView, SIGNAL( setStatusBar( QString ) ),
- this, SLOT(setStatusBar( QString )));
+ connect( _taskView, TQT_SIGNAL( totalTimesChanged( long, long ) ),
+ this, TQT_SLOT( updateTime( long, long ) ) );
+ connect( _taskView, TQT_SIGNAL( selectionChanged ( TQListViewItem * )),
+ this, TQT_SLOT(slotSelectionChanged()));
+ connect( _taskView, TQT_SIGNAL( updateButtons() ),
+ this, TQT_SLOT(slotSelectionChanged()));
+ connect( _taskView, TQT_SIGNAL( setStatusBar( TQString ) ),
+ this, TQT_SLOT(setStatusBar( TQString )));
loadGeometry();
// Setup context menu request handling
connect( _taskView,
- SIGNAL( contextMenuRequested( QListViewItem*, const QPoint&, int )),
+ TQT_SIGNAL( contextMenuRequested( TQListViewItem*, const TQPoint&, int )),
this,
- SLOT( contextMenuRequest( QListViewItem*, const QPoint&, int )));
+ TQT_SLOT( contextMenuRequest( TQListViewItem*, const TQPoint&, int )));
_tray = new KarmTray( this );
- connect( _tray, SIGNAL( quitSelected() ), SLOT( quit() ) );
+ connect( _tray, TQT_SIGNAL( quitSelected() ), TQT_SLOT( quit() ) );
- connect( _taskView, SIGNAL( timersActive() ), _tray, SLOT( startClock() ) );
- connect( _taskView, SIGNAL( timersActive() ), this, SLOT( enableStopAll() ));
- connect( _taskView, SIGNAL( timersInactive() ), _tray, SLOT( stopClock() ) );
- connect( _taskView, SIGNAL( timersInactive() ), this, SLOT( disableStopAll()));
- connect( _taskView, SIGNAL( tasksChanged( QPtrList<Task> ) ),
- _tray, SLOT( updateToolTip( QPtrList<Task> ) ));
+ connect( _taskView, TQT_SIGNAL( timersActive() ), _tray, TQT_SLOT( startClock() ) );
+ connect( _taskView, TQT_SIGNAL( timersActive() ), this, TQT_SLOT( enableStopAll() ));
+ connect( _taskView, TQT_SIGNAL( timersInactive() ), _tray, TQT_SLOT( stopClock() ) );
+ connect( _taskView, TQT_SIGNAL( timersInactive() ), this, TQT_SLOT( disableStopAll()));
+ connect( _taskView, TQT_SIGNAL( tasksChanged( TQPtrList<Task> ) ),
+ _tray, TQT_SLOT( updateToolTip( TQPtrList<Task> ) ));
_taskView->load();
@@ -134,7 +134,7 @@ void MainWindow::slotSelectionChanged()
// actionAddComment->setEnabled( on );
//}
-void MainWindow::setStatusBar(QString qs)
+void MainWindow::setStatusBar(TQString qs)
{
statusBar()->message(i18n(qs.ascii()));
}
@@ -142,7 +142,7 @@ void MainWindow::setStatusBar(QString qs)
bool MainWindow::save()
{
kdDebug(5970) << "Saving time data to disk." << endl;
- QString err=_taskView->save(); // untranslated error msg.
+ TQString err=_taskView->save(); // untranslated error msg.
if (err.isEmpty()) statusBar()->message(i18n("Successfully saved tasks and history"),1807);
else statusBar()->message(i18n(err.ascii()),7707); // no msgbox since save is called when exiting
saveGeometry();
@@ -152,7 +152,7 @@ bool MainWindow::save()
void MainWindow::exportcsvHistory()
{
kdDebug(5970) << "Exporting History to disk." << endl;
- QString err=_taskView->exportcsvHistory();
+ TQString err=_taskView->exportcsvHistory();
if (err.isEmpty()) statusBar()->message(i18n("Successfully exported History to CSV-file"),1807);
else KMessageBox::error(this, err.ascii());
saveGeometry();
@@ -199,7 +199,7 @@ void MainWindow::updateTime( long sessionDiff, long totalDiff )
void MainWindow::updateStatusBar( )
{
- QString time;
+ TQString time;
time = formatTime( _sessionSum );
statusBar()->changeItem( i18n("Session: %1").arg(time), 0 );
@@ -251,128 +251,128 @@ void MainWindow::makeMenus()
*actionNew,
*actionNewSub;
- (void) KStdAction::quit( this, SLOT( quit() ), actionCollection());
- (void) KStdAction::print( this, SLOT( print() ), actionCollection());
- actionKeyBindings = KStdAction::keyBindings( this, SLOT( keyBindings() ),
+ (void) KStdAction::quit( this, TQT_SLOT( quit() ), actionCollection());
+ (void) KStdAction::print( this, TQT_SLOT( print() ), actionCollection());
+ actionKeyBindings = KStdAction::keyBindings( this, TQT_SLOT( keyBindings() ),
actionCollection() );
actionPreferences = KStdAction::preferences(_preferences,
- SLOT(showDialog()),
+ TQT_SLOT(showDialog()),
actionCollection() );
- (void) KStdAction::save( this, SLOT( save() ), actionCollection() );
+ (void) KStdAction::save( this, TQT_SLOT( save() ), actionCollection() );
KAction* actionStartNewSession = new KAction( i18n("Start &New Session"),
0,
this,
- SLOT( startNewSession() ),
+ TQT_SLOT( startNewSession() ),
actionCollection(),
"start_new_session");
KAction* actionResetAll = new KAction( i18n("&Reset All Times"),
0,
this,
- SLOT( resetAllTimes() ),
+ TQT_SLOT( resetAllTimes() ),
actionCollection(),
"reset_all_times");
actionStart = new KAction( i18n("&Start"),
- QString::fromLatin1("1rightarrow"), Key_S,
+ TQString::fromLatin1("1rightarrow"), Key_S,
_taskView,
- SLOT( startCurrentTimer() ), actionCollection(),
+ TQT_SLOT( startCurrentTimer() ), actionCollection(),
"start");
actionStop = new KAction( i18n("S&top"),
- QString::fromLatin1("stop"), Key_S,
+ TQString::fromLatin1("stop"), Key_S,
_taskView,
- SLOT( stopCurrentTimer() ), actionCollection(),
+ TQT_SLOT( stopCurrentTimer() ), actionCollection(),
"stop");
actionStopAll = new KAction( i18n("Stop &All Timers"),
Key_Escape,
_taskView,
- SLOT( stopAllTimers() ), actionCollection(),
+ TQT_SLOT( stopAllTimers() ), actionCollection(),
"stopAll");
actionStopAll->setEnabled(false);
actionNew = new KAction( i18n("&New..."),
- QString::fromLatin1("filenew"), CTRL+Key_N,
+ TQString::fromLatin1("filenew"), CTRL+Key_N,
_taskView,
- SLOT( newTask() ), actionCollection(),
+ TQT_SLOT( newTask() ), actionCollection(),
"new_task");
actionNewSub = new KAction( i18n("New &Subtask..."),
- QString::fromLatin1("kmultiple"), CTRL+ALT+Key_N,
+ TQString::fromLatin1("kmultiple"), CTRL+ALT+Key_N,
_taskView,
- SLOT( newSubTask() ), actionCollection(),
+ TQT_SLOT( newSubTask() ), actionCollection(),
"new_sub_task");
actionDelete = new KAction( i18n("&Delete"),
- QString::fromLatin1("editdelete"), Key_Delete,
+ TQString::fromLatin1("editdelete"), Key_Delete,
_taskView,
- SLOT( deleteTask() ), actionCollection(),
+ TQT_SLOT( deleteTask() ), actionCollection(),
"delete_task");
actionEdit = new KAction( i18n("&Edit..."),
- QString::fromLatin1("edit"), CTRL + Key_E,
+ TQString::fromLatin1("edit"), CTRL + Key_E,
_taskView,
- SLOT( editTask() ), actionCollection(),
+ TQT_SLOT( editTask() ), actionCollection(),
"edit_task");
// actionAddComment = new KAction( i18n("&Add Comment..."),
-// QString::fromLatin1("document"),
+// TQString::fromLatin1("document"),
// CTRL+ALT+Key_E,
// _taskView,
-// SLOT( addCommentToTask() ),
+// TQT_SLOT( addCommentToTask() ),
// actionCollection(),
// "add_comment_to_task");
actionMarkAsComplete = new KAction( i18n("&Mark as Complete"),
- QString::fromLatin1("document"),
+ TQString::fromLatin1("document"),
CTRL+Key_M,
_taskView,
- SLOT( markTaskAsComplete() ),
+ TQT_SLOT( markTaskAsComplete() ),
actionCollection(),
"mark_as_complete");
actionMarkAsIncomplete = new KAction( i18n("&Mark as Incomplete"),
- QString::fromLatin1("document"),
+ TQString::fromLatin1("document"),
CTRL+Key_M,
_taskView,
- SLOT( markTaskAsIncomplete() ),
+ TQT_SLOT( markTaskAsIncomplete() ),
actionCollection(),
"mark_as_incomplete");
actionClipTotals = new KAction( i18n("&Copy Totals to Clipboard"),
- QString::fromLatin1("klipper"),
+ TQString::fromLatin1("klipper"),
CTRL+Key_C,
_taskView,
- SLOT( clipTotals() ),
+ TQT_SLOT( clipTotals() ),
actionCollection(),
"clip_totals");
// actionClipTotals will never be used again, overwrite it
actionClipTotals = new KAction( i18n("&Copy Session Time to Clipboard"),
- QString::fromLatin1("klipper"),
+ TQString::fromLatin1("klipper"),
0,
_taskView,
- SLOT( clipSession() ),
+ TQT_SLOT( clipSession() ),
actionCollection(),
"clip_session");
actionClipHistory = new KAction( i18n("Copy &History to Clipboard"),
- QString::fromLatin1("klipper"),
+ TQString::fromLatin1("klipper"),
CTRL+ALT+Key_C,
_taskView,
- SLOT( clipHistory() ),
+ TQT_SLOT( clipHistory() ),
actionCollection(),
"clip_history");
new KAction( i18n("Import &Legacy Flat File..."), 0,
- _taskView, SLOT(loadFromFlatFile()), actionCollection(),
+ _taskView, TQT_SLOT(loadFromFlatFile()), actionCollection(),
"import_flatfile");
new KAction( i18n("&Export to CSV File..."), 0,
- _taskView, SLOT(exportcsvFile()), actionCollection(),
+ _taskView, TQT_SLOT(exportcsvFile()), actionCollection(),
"export_csvfile");
new KAction( i18n("Export &History to CSV File..."), 0,
- this, SLOT(exportcsvHistory()), actionCollection(),
+ this, TQT_SLOT(exportcsvHistory()), actionCollection(),
"export_csvhistory");
new KAction( i18n("Import Tasks From &Planner..."), 0,
- _taskView, SLOT(importPlanner()), actionCollection(),
+ _taskView, TQT_SLOT(importPlanner()), actionCollection(),
"import_planner");
/*
new KAction( i18n("Import E&vents"), 0,
_taskView,
- SLOT( loadFromKOrgEvents() ), actionCollection(),
+ TQT_SLOT( loadFromKOrgEvents() ), actionCollection(),
"import_korg_events");
*/
- setXMLFile( QString::fromLatin1("karmui.rc") );
+ setXMLFile( TQString::fromLatin1("karmui.rc") );
createGUI( 0 );
// Tool tips must be set after the createGUI.
@@ -442,9 +442,9 @@ void MainWindow::loadGeometry()
{
KConfig &config = *kapp->config();
- config.setGroup( QString::fromLatin1("Main Window Geometry") );
- int w = config.readNumEntry( QString::fromLatin1("Width"), 100 );
- int h = config.readNumEntry( QString::fromLatin1("Height"), 100 );
+ config.setGroup( TQString::fromLatin1("Main Window Geometry") );
+ int w = config.readNumEntry( TQString::fromLatin1("Width"), 100 );
+ int h = config.readNumEntry( TQString::fromLatin1("Height"), 100 );
w = QMAX( w, sizeHint().width() );
h = QMAX( h, sizeHint().height() );
resize(w, h);
@@ -455,9 +455,9 @@ void MainWindow::loadGeometry()
void MainWindow::saveGeometry()
{
KConfig &config = *KGlobal::config();
- config.setGroup( QString::fromLatin1("Main Window Geometry"));
- config.writeEntry( QString::fromLatin1("Width"), width());
- config.writeEntry( QString::fromLatin1("Height"), height());
+ config.setGroup( TQString::fromLatin1("Main Window Geometry"));
+ config.writeEntry( TQString::fromLatin1("Width"), width());
+ config.writeEntry( TQString::fromLatin1("Height"), height());
config.sync();
}
@@ -470,9 +470,9 @@ bool MainWindow::queryClose()
return KMainWindow::queryClose();
}
-void MainWindow::contextMenuRequest( QListViewItem*, const QPoint& point, int )
+void MainWindow::contextMenuRequest( TQListViewItem*, const TQPoint& point, int )
{
- QPopupMenu* pop = dynamic_cast<QPopupMenu*>(
+ TQPopupMenu* pop = dynamic_cast<TQPopupMenu*>(
factory()->container( i18n( "task_popup" ), this ) );
if ( pop )
pop->popup( point );
@@ -484,12 +484,12 @@ void MainWindow::contextMenuRequest( QListViewItem*, const QPoint& point, int )
//
//----------------------------------------------------------------------------
-QString MainWindow::version() const
+TQString MainWindow::version() const
{
return KARM_VERSION;
}
-QString MainWindow::deletetodo()
+TQString MainWindow::deletetodo()
{
_taskView->deleteTask();
return "";
@@ -500,15 +500,15 @@ bool MainWindow::getpromptdelete()
return _preferences->promptDelete();
}
-QString MainWindow::setpromptdelete( bool prompt )
+TQString MainWindow::setpromptdelete( bool prompt )
{
_preferences->setPromptDelete( prompt );
return "";
}
-QString MainWindow::taskIdFromName( const QString &taskname ) const
+TQString MainWindow::taskIdFromName( const TQString &taskname ) const
{
- QString rval = "";
+ TQString rval = "";
Task* task = _taskView->first_child();
while ( rval.isEmpty() && task )
@@ -520,10 +520,10 @@ QString MainWindow::taskIdFromName( const QString &taskname ) const
return rval;
}
-int MainWindow::addTask( const QString& taskname )
+int MainWindow::addTask( const TQString& taskname )
{
DesktopList desktopList;
- QString uid = _taskView->addTask( taskname, 0, 0, desktopList );
+ TQString uid = _taskView->addTask( taskname, 0, 0, desktopList );
kdDebug(5970) << "MainWindow::addTask( " << taskname << " ) returns " << uid << endl;
if ( uid.length() > 0 ) return 0;
else
@@ -534,20 +534,20 @@ int MainWindow::addTask( const QString& taskname )
}
}
-QString MainWindow::setPerCentComplete( const QString& taskName, int perCent )
+TQString MainWindow::setPerCentComplete( const TQString& taskName, int perCent )
{
int index;
- QString err="no such task";
+ TQString err="no such task";
for (int i=0; i<_taskView->count(); i++)
{
if ((_taskView->item_at_index(i)->name()==taskName))
{
index=i;
- if (err==QString::null) err="task name is abigious";
- if (err=="no such task") err=QString::null;
+ if (err==TQString::null) err="task name is abigious";
+ if (err=="no such task") err=TQString::null;
}
}
- if (err==QString::null)
+ if (err==TQString::null)
{
_taskView->item_at_index(index)->setPercentComplete( perCent, _taskView->storage() );
}
@@ -555,12 +555,12 @@ QString MainWindow::setPerCentComplete( const QString& taskName, int perCent )
}
int MainWindow::bookTime
-( const QString& taskId, const QString& datetime, long minutes )
+( const TQString& taskId, const TQString& datetime, long minutes )
{
int rval = 0;
- QDate startDate;
- QTime startTime;
- QDateTime startDateTime;
+ TQDate startDate;
+ TQTime startTime;
+ TQDateTime startDateTime;
Task *task, *t;
if ( minutes <= 0 ) rval = KARM_ERR_INVALID_DURATION;
@@ -578,15 +578,15 @@ int MainWindow::bookTime
// Parse datetime
if ( !rval )
{
- startDate = QDate::fromString( datetime, Qt::ISODate );
+ startDate = TQDate::fromString( datetime, Qt::ISODate );
if ( datetime.length() > 10 ) // "YYYY-MM-DD".length() = 10
{
- startTime = QTime::fromString( datetime, Qt::ISODate );
+ startTime = TQTime::fromString( datetime, Qt::ISODate );
}
- else startTime = QTime( 12, 0 );
+ else startTime = TQTime( 12, 0 );
if ( startDate.isValid() && startTime.isValid() )
{
- startDateTime = QDateTime( startDate, startTime );
+ startDateTime = TQDateTime( startDate, startTime );
}
else rval = KARM_ERR_INVALID_DATE;
@@ -607,13 +607,13 @@ int MainWindow::bookTime
// There was something really bad going on with DCOP when I used a particular
// argument name; if I recall correctly, the argument name was errno.
-QString MainWindow::getError( int mkb ) const
+TQString MainWindow::getError( int mkb ) const
{
if ( mkb <= KARM_MAX_ERROR_NO ) return m_error[ mkb ];
else return i18n( "Invalid error number: %1" ).arg( mkb );
}
-int MainWindow::totalMinutesForTaskId( const QString& taskId )
+int MainWindow::totalMinutesForTaskId( const TQString& taskId )
{
int rval = 0;
Task *task, *t;
@@ -642,9 +642,9 @@ int MainWindow::totalMinutesForTaskId( const QString& taskId )
return rval;
}
-QString MainWindow::_hasTask( Task* task, const QString &taskname ) const
+TQString MainWindow::_hasTask( Task* task, const TQString &taskname ) const
{
- QString rval = "";
+ TQString rval = "";
if ( task->name() == taskname )
{
rval = task->uid();
@@ -661,7 +661,7 @@ QString MainWindow::_hasTask( Task* task, const QString &taskname ) const
return rval;
}
-Task* MainWindow::_hasUid( Task* task, const QString &uid ) const
+Task* MainWindow::_hasUid( Task* task, const TQString &uid ) const
{
Task *rval = NULL;
@@ -679,49 +679,49 @@ Task* MainWindow::_hasUid( Task* task, const QString &uid ) const
}
return rval;
}
-QString MainWindow::starttimerfor( const QString& taskname )
+TQString MainWindow::starttimerfor( const TQString& taskname )
{
int index;
- QString err="no such task";
+ TQString err="no such task";
for (int i=0; i<_taskView->count(); i++)
{
if ((_taskView->item_at_index(i)->name()==taskname))
{
index=i;
- if (err==QString::null) err="task name is abigious";
- if (err=="no such task") err=QString::null;
+ if (err==TQString::null) err="task name is abigious";
+ if (err=="no such task") err=TQString::null;
}
}
- if (err==QString::null) _taskView->startTimerFor( _taskView->item_at_index(index) );
+ if (err==TQString::null) _taskView->startTimerFor( _taskView->item_at_index(index) );
return err;
}
-QString MainWindow::stoptimerfor( const QString& taskname )
+TQString MainWindow::stoptimerfor( const TQString& taskname )
{
int index;
- QString err="no such task";
+ TQString err="no such task";
for (int i=0; i<_taskView->count(); i++)
{
if ((_taskView->item_at_index(i)->name()==taskname))
{
index=i;
- if (err==QString::null) err="task name is abigious";
- if (err=="no such task") err=QString::null;
+ if (err==TQString::null) err="task name is abigious";
+ if (err=="no such task") err=TQString::null;
}
}
- if (err==QString::null) _taskView->stopTimerFor( _taskView->item_at_index(index) );
+ if (err==TQString::null) _taskView->stopTimerFor( _taskView->item_at_index(index) );
return err;
}
-QString MainWindow::exportcsvfile( QString filename, QString from, QString to, int type, bool decimalMinutes, bool allTasks, QString delimiter, QString quote )
+TQString MainWindow::exportcsvfile( TQString filename, TQString from, TQString to, int type, bool decimalMinutes, bool allTasks, TQString delimiter, TQString quote )
{
ReportCriteria rc;
rc.url=filename;
- rc.from=QDate::fromString( from );
- if ( rc.from.isNull() ) rc.from=QDate::fromString( from, Qt::ISODate );
+ rc.from=TQDate::fromString( from );
+ if ( rc.from.isNull() ) rc.from=TQDate::fromString( from, Qt::ISODate );
kdDebug(5970) << "rc.from " << rc.from << endl;
- rc.to=QDate::fromString( to );
- if ( rc.to.isNull() ) rc.to=QDate::fromString( to, Qt::ISODate );
+ rc.to=TQDate::fromString( to );
+ if ( rc.to.isNull() ) rc.to=TQDate::fromString( to, Qt::ISODate );
kdDebug(5970) << "rc.to " << rc.to << endl;
rc.reportType=(ReportCriteria::REPORTTYPE) type; // history report or totals report
rc.decimalMinutes=decimalMinutes;
@@ -731,7 +731,7 @@ QString MainWindow::exportcsvfile( QString filename, QString from, QString to, i
return _taskView->report( rc );
}
-QString MainWindow::importplannerfile( QString fileName )
+TQString MainWindow::importplannerfile( TQString fileName )
{
return _taskView->importPlanner(fileName);
}
diff --git a/karm/mainwindow.h b/karm/mainwindow.h
index 7f066af30..f4f25f7d1 100644
--- a/karm/mainwindow.h
+++ b/karm/mainwindow.h
@@ -29,8 +29,8 @@ class MainWindow : public KParts::MainWindow, virtual public KarmDCOPIface
private:
void makeMenus();
- QString _hasTask( Task* task, const QString &taskname ) const;
- Task* _hasUid( Task* task, const QString &uid ) const;
+ TQString _hasTask( Task* task, const TQString &taskname ) const;
+ Task* _hasUid( Task* task, const TQString &uid ) const;
KAccel* _accel;
KAccelMenuWatch* _watcher;
@@ -49,7 +49,7 @@ class MainWindow : public KParts::MainWindow, virtual public KarmDCOPIface
KAction* actionPreferences;
KAction* actionClipTotals;
KAction* actionClipHistory;
- QString m_error[ KARM_MAX_ERROR_NO + 1 ];
+ TQString m_error[ KARM_MAX_ERROR_NO + 1 ];
friend class KarmTray;
@@ -60,35 +60,35 @@ class MainWindow : public KParts::MainWindow, virtual public KarmDCOPIface
public:
- MainWindow( const QString &icsfile = "" );
+ MainWindow( const TQString &icsfile = "" );
virtual ~MainWindow();
// DCOP
- QString version() const;
- QString taskIdFromName( const QString &taskName ) const;
+ TQString version() const;
+ TQString taskIdFromName( const TQString &taskName ) const;
/** @reimp from KarmDCOPIface::addTask */
- int addTask( const QString &storage );
+ int addTask( const TQString &storage );
/** @reimp from KarmDCOPIface::setPerCentComplete */
- QString setPerCentComplete( const QString& taskName, int PerCent );
+ TQString setPerCentComplete( const TQString& taskName, int PerCent );
/** @reimp from KarmDCOPIface::bookTime */
- int bookTime( const QString& taskId, const QString& iso8601StartDateTime, long durationInMinutes );
+ int bookTime( const TQString& taskId, const TQString& iso8601StartDateTime, long durationInMinutes );
/** @reimp from KarmDCOPIface::getError */
- QString getError( int karmErrorNumber ) const;
- int totalMinutesForTaskId( const QString& taskId );
+ TQString getError( int karmErrorNumber ) const;
+ int totalMinutesForTaskId( const TQString& taskId );
/** start the timer for taskname */
- QString starttimerfor( const QString &taskname );
+ TQString starttimerfor( const TQString &taskname );
/** stop the timer for taskname */
- QString stoptimerfor( const QString &taskname );
- QString deletetodo();
+ TQString stoptimerfor( const TQString &taskname );
+ TQString deletetodo();
/** shall there be a "really delete" question */
bool getpromptdelete();
/** set if there will be a "really delete" question */
- QString setpromptdelete( bool prompt );
- QString exportcsvfile( QString filename, QString from, QString to, int type, bool decimalMinutes, bool allTasks, QString delimiter, QString quote );
- QString importplannerfile( QString filename );
+ TQString setpromptdelete( bool prompt );
+ TQString exportcsvfile( TQString filename, TQString from, TQString to, int type, bool decimalMinutes, bool allTasks, TQString delimiter, TQString quote );
+ TQString importplannerfile( TQString filename );
public slots:
- void setStatusBar( QString );
+ void setStatusBar( TQString );
void quit();
protected slots:
@@ -101,7 +101,7 @@ class MainWindow : public KParts::MainWindow, virtual public KarmDCOPIface
void exportcsvHistory();
void print();
void slotSelectionChanged();
- void contextMenuRequest( QListViewItem*, const QPoint&, int );
+ void contextMenuRequest( TQListViewItem*, const TQPoint&, int );
void enableStopAll();
void disableStopAll();
// void timeLoggingChanged( bool on );
diff --git a/karm/plannerparser.cpp b/karm/plannerparser.cpp
index 21e0c4f76..67f7bd53f 100644
--- a/karm/plannerparser.cpp
+++ b/karm/plannerparser.cpp
@@ -48,22 +48,22 @@ test cases:
return true;
}
- bool PlannerParser::startElement( const QString&, const QString&, const QString& qName, const QXmlAttributes& att )
+ bool PlannerParser::startElement( const TQString&, const TQString&, const TQString& qName, const TQXmlAttributes& att )
{
kdDebug() << "entering startElement" << endl;
- QString taskName;
+ TQString taskName;
int taskComplete=0;
// only <task>s within <tasks> are processed
- if (qName == QString::fromLatin1("tasks")) withInTasks=true;
- if ((qName == QString::fromLatin1("task")) && (withInTasks))
+ if (qName == TQString::fromLatin1("tasks")) withInTasks=true;
+ if ((qName == TQString::fromLatin1("task")) && (withInTasks))
{
// find out name and percent-complete
for (int i=0; i<att.length(); i++)
{
- if (att.qName(i) == QString::fromLatin1("name")) taskName=att.value(i);
- if (att.qName(i)==QString::fromLatin1("percent-complete")) taskComplete=att.value(i).toInt();
+ if (att.qName(i) == TQString::fromLatin1("name")) taskName=att.value(i);
+ if (att.qName(i)==TQString::fromLatin1("percent-complete")) taskComplete=att.value(i).toInt();
}
// at the moment, task is still the old task or the old father task (if an endElement occurred) or not existing (if the
@@ -87,7 +87,7 @@ test cases:
return true;
}
- bool PlannerParser::endElement( const QString&, const QString&, const QString& qName)
+ bool PlannerParser::endElement( const TQString&, const TQString&, const TQString& qName)
{
// only <task>s within <tasks> increased level, so only decrease for <task>s within <tasks>
if (withInTasks)
diff --git a/karm/plannerparser.h b/karm/plannerparser.h
index a626d6f03..6a7ff0281 100644
--- a/karm/plannerparser.h
+++ b/karm/plannerparser.h
@@ -27,7 +27,7 @@ test cases:
@author Thorsten Staerk
*/
-#include <qxml.h>
+#include <tqxml.h>
#include <klocale.h>
#include "taskview.h"
#include "task.h"
@@ -45,10 +45,10 @@ public:
bool startDocument();
/** given by the framework from qxml. Called when the reader occurs an open tag (e.g. \<b\> ) */
- bool startElement( const QString&, const QString&, const QString& qName, const QXmlAttributes& att );
+ bool startElement( const TQString&, const TQString&, const TQString& qName, const TQXmlAttributes& att );
/** given by the framework from qxml. Called when the reader occurs a closed tag (e.g. \</b\> )*/
- bool endElement( const QString&, const QString&, const QString& qName);
+ bool endElement( const TQString&, const TQString&, const TQString& qName);
private:
bool withInTasks; // within <tasks> ?
diff --git a/karm/preferences.cpp b/karm/preferences.cpp
index 9316aa440..efc621802 100644
--- a/karm/preferences.cpp
+++ b/karm/preferences.cpp
@@ -1,9 +1,9 @@
#undef Unsorted // for --enable-final
-#include <qcheckbox.h>
-#include <qlabel.h>
-#include <qstring.h>
-#include <qspinbox.h>
-#include <qlayout.h>
+#include <tqcheckbox.h>
+#include <tqlabel.h>
+#include <tqstring.h>
+#include <tqspinbox.h>
+#include <tqlayout.h>
#include <kapplication.h> // kapp
#include <kconfig.h>
@@ -19,7 +19,7 @@
Preferences *Preferences::_instance = 0;
-Preferences::Preferences( const QString& icsFile )
+Preferences::Preferences( const TQString& icsFile )
: KDialogBase( IconList, i18n("Preferences"), Ok|Cancel, Ok )
{
@@ -36,7 +36,7 @@ Preferences::Preferences( const QString& icsFile )
}
-Preferences *Preferences::instance( const QString &icsfile )
+Preferences *Preferences::instance( const TQString &icsfile )
{
if (_instance == 0) {
_instance = new Preferences( icsfile );
@@ -46,12 +46,12 @@ Preferences *Preferences::instance( const QString &icsfile )
void Preferences::makeBehaviorPage()
{
- QPixmap icon = SmallIcon( "kcmsystem", KIcon::SizeMedium);
- QFrame* behaviorPage = addPage( i18n("Behavior"), i18n("Behavior Settings"),
+ TQPixmap icon = SmallIcon( "kcmsystem", KIcon::SizeMedium);
+ TQFrame* behaviorPage = addPage( i18n("Behavior"), i18n("Behavior Settings"),
icon );
- QVBoxLayout* topLevel = new QVBoxLayout( behaviorPage, 0, spacingHint() );
- QGridLayout* layout = new QGridLayout( topLevel, 2, 2 );
+ TQVBoxLayout* topLevel = new TQVBoxLayout( behaviorPage, 0, spacingHint() );
+ TQGridLayout* layout = new TQGridLayout( topLevel, 2, 2 );
layout->setColStretch( 1, 1 );
_doIdleDetectionW = new QCheckBox
@@ -68,29 +68,29 @@ void Preferences::makeBehaviorPage()
topLevel->addStretch();
- connect( _doIdleDetectionW, SIGNAL( clicked() ), this,
- SLOT( idleDetectCheckBoxChanged() ));
+ connect( _doIdleDetectionW, TQT_SIGNAL( clicked() ), this,
+ TQT_SLOT( idleDetectCheckBoxChanged() ));
}
void Preferences::makeDisplayPage()
{
- QPixmap icon = SmallIcon( "viewmag", KIcon::SizeMedium );
- QFrame* displayPage = addPage( i18n("Display"), i18n("Display Settings"),
+ TQPixmap icon = SmallIcon( "viewmag", KIcon::SizeMedium );
+ TQFrame* displayPage = addPage( i18n("Display"), i18n("Display Settings"),
icon );
- QVBoxLayout* topLevel = new QVBoxLayout( displayPage, 0, spacingHint() );
- QGridLayout* layout = new QGridLayout( topLevel, 5, 2 );
+ TQVBoxLayout* topLevel = new TQVBoxLayout( displayPage, 0, spacingHint() );
+ TQGridLayout* layout = new TQGridLayout( topLevel, 5, 2 );
layout->setColStretch( 1, 1 );
- QLabel* _displayColumnsLabelW = new QLabel( i18n("Columns displayed:"),
+ TQLabel* _displayColumnsLabelW = new TQLabel( i18n("Columns displayed:"),
displayPage );
- _displaySessionW = new QCheckBox ( i18n("Session time"),
+ _displaySessionW = new TQCheckBox ( i18n("Session time"),
displayPage, "_displaySessionW");
- _displayTimeW = new QCheckBox ( i18n("Cumulative task time"),
+ _displayTimeW = new TQCheckBox ( i18n("Cumulative task time"),
displayPage, "_displayTimeW");
- _displayTotalSessionW = new QCheckBox( i18n("Total session time"),
+ _displayTotalSessionW = new TQCheckBox( i18n("Total session time"),
displayPage, "_displayTotalSessionW");
- _displayTotalTimeW = new QCheckBox ( i18n("Total task time"),
+ _displayTotalTimeW = new TQCheckBox ( i18n("Total task time"),
displayPage, "_displayTotalTimeW");
layout->addMultiCellWidget( _displayColumnsLabelW, 0, 0, 0, 1 );
@@ -104,28 +104,28 @@ void Preferences::makeDisplayPage()
void Preferences::makeStoragePage()
{
- QPixmap icon = SmallIcon( "kfm", KIcon::SizeMedium );
- QFrame* storagePage = addPage( i18n("Storage"), i18n("Storage Settings"),
+ TQPixmap icon = SmallIcon( "kfm", KIcon::SizeMedium );
+ TQFrame* storagePage = addPage( i18n("Storage"), i18n("Storage Settings"),
icon );
- QVBoxLayout* topLevel = new QVBoxLayout( storagePage, 0, spacingHint() );
- QGridLayout* layout = new QGridLayout( topLevel, 4, 2 );
+ TQVBoxLayout* topLevel = new TQVBoxLayout( storagePage, 0, spacingHint() );
+ TQGridLayout* layout = new TQGridLayout( topLevel, 4, 2 );
layout->setColStretch( 1, 1 );
// autosave
_doAutoSaveW = new QCheckBox
( i18n("Save tasks every"), storagePage, "_doAutoSaveW" );
- _autoSaveValueW = new QSpinBox(1, 60*24, 1, storagePage, "_autoSaveValueW");
+ _autoSaveValueW = new TQSpinBox(1, 60*24, 1, storagePage, "_autoSaveValueW");
_autoSaveValueW->setSuffix(i18n(" min"));
// iCalendar
- QLabel* _iCalFileLabel = new QLabel( i18n("iCalendar file:"), storagePage);
+ TQLabel* _iCalFileLabel = new TQLabel( i18n("iCalendar file:"), storagePage);
_iCalFileW = new KURLRequester(storagePage, "_iCalFileW");
- _iCalFileW->setFilter(QString::fromLatin1("*.ics"));
+ _iCalFileW->setFilter(TQString::fromLatin1("*.ics"));
_iCalFileW->setMode(KFile::File);
// Log time?
- _loggingW = new QCheckBox
+ _loggingW = new TQCheckBox
( i18n("Log history"), storagePage, "_loggingW" );
// add widgets to layout
@@ -138,8 +138,8 @@ void Preferences::makeStoragePage()
topLevel->addStretch();
// checkboxes disable file selection controls
- connect( _doAutoSaveW, SIGNAL( clicked() ),
- this, SLOT( autoSaveCheckBoxChanged() ));
+ connect( _doAutoSaveW, TQT_SIGNAL( clicked() ),
+ this, TQT_SLOT( autoSaveCheckBoxChanged() ));
}
void Preferences::disableIdleDetection()
@@ -234,17 +234,17 @@ void Preferences::emitSignals()
emit setupChanged();
}
-QString Preferences::iCalFile() const { return _iCalFileV; }
-QString Preferences::activeCalendarFile() const { return _iCalFileV; }
+TQString Preferences::iCalFile() const { return _iCalFileV; }
+TQString Preferences::activeCalendarFile() const { return _iCalFileV; }
bool Preferences::detectIdleness() const { return _doIdleDetectionV; }
int Preferences::idlenessTimeout() const { return _idleDetectValueV; }
bool Preferences::autoSave() const { return _doAutoSaveV; }
int Preferences::autoSavePeriod() const { return _autoSaveValueV; }
bool Preferences::logging() const { return _loggingV; }
bool Preferences::promptDelete() const { return _promptDeleteV; }
-QString Preferences::setPromptDelete(bool prompt) { _promptDeleteV=prompt; return ""; }
+TQString Preferences::setPromptDelete(bool prompt) { _promptDeleteV=prompt; return ""; }
bool Preferences::displayColumn(int n) const { return _displayColumnV[n]; }
-QString Preferences::userRealName() const { return _userRealName; }
+TQString Preferences::userRealName() const { return _userRealName; }
//---------------------------------------------------------------------------
// Load and Save
@@ -253,32 +253,32 @@ void Preferences::load()
{
KConfig &config = *kapp->config();
- config.setGroup( QString::fromLatin1("Idle detection") );
- _doIdleDetectionV = config.readBoolEntry( QString::fromLatin1("enabled"),
+ config.setGroup( TQString::fromLatin1("Idle detection") );
+ _doIdleDetectionV = config.readBoolEntry( TQString::fromLatin1("enabled"),
true );
- _idleDetectValueV = config.readNumEntry(QString::fromLatin1("period"), 15);
+ _idleDetectValueV = config.readNumEntry(TQString::fromLatin1("period"), 15);
- config.setGroup( QString::fromLatin1("Saving") );
+ config.setGroup( TQString::fromLatin1("Saving") );
_iCalFileV = config.readPathEntry
- ( QString::fromLatin1("ical file"),
- locateLocal( "appdata", QString::fromLatin1( "karm.ics")));
+ ( TQString::fromLatin1("ical file"),
+ locateLocal( "appdata", TQString::fromLatin1( "karm.ics")));
_doAutoSaveV = config.readBoolEntry
- ( QString::fromLatin1("auto save"), true);
+ ( TQString::fromLatin1("auto save"), true);
_autoSaveValueV = config.readNumEntry
- ( QString::fromLatin1("auto save period"), 5);
+ ( TQString::fromLatin1("auto save period"), 5);
_promptDeleteV = config.readBoolEntry
- ( QString::fromLatin1("prompt delete"), true);
+ ( TQString::fromLatin1("prompt delete"), true);
_loggingV = config.readBoolEntry
- ( QString::fromLatin1("logging"), true);
+ ( TQString::fromLatin1("logging"), true);
_displayColumnV[0] = config.readBoolEntry
- ( QString::fromLatin1("display session time"), true);
+ ( TQString::fromLatin1("display session time"), true);
_displayColumnV[1] = config.readBoolEntry
- ( QString::fromLatin1("display time"), true);
+ ( TQString::fromLatin1("display time"), true);
_displayColumnV[2] = config.readBoolEntry
- ( QString::fromLatin1("display total session time"), true);
+ ( TQString::fromLatin1("display total session time"), true);
_displayColumnV[3] = config.readBoolEntry
- ( QString::fromLatin1("display total time"), true);
+ ( TQString::fromLatin1("display total time"), true);
KEMailSettings settings;
_userRealName = settings.getSetting( KEMailSettings::RealName );
@@ -288,44 +288,44 @@ void Preferences::save()
{
KConfig &config = *KGlobal::config();
- config.setGroup( QString::fromLatin1("Idle detection"));
- config.writeEntry( QString::fromLatin1("enabled"), _doIdleDetectionV);
- config.writeEntry( QString::fromLatin1("period"), _idleDetectValueV);
+ config.setGroup( TQString::fromLatin1("Idle detection"));
+ config.writeEntry( TQString::fromLatin1("enabled"), _doIdleDetectionV);
+ config.writeEntry( TQString::fromLatin1("period"), _idleDetectValueV);
- config.setGroup( QString::fromLatin1("Saving"));
- config.writePathEntry( QString::fromLatin1("ical file"), _iCalFileV);
- config.writeEntry( QString::fromLatin1("auto save"), _doAutoSaveV);
- config.writeEntry( QString::fromLatin1("logging"), _loggingV);
- config.writeEntry( QString::fromLatin1("auto save period"), _autoSaveValueV);
- config.writeEntry( QString::fromLatin1("prompt delete"), _promptDeleteV);
+ config.setGroup( TQString::fromLatin1("Saving"));
+ config.writePathEntry( TQString::fromLatin1("ical file"), _iCalFileV);
+ config.writeEntry( TQString::fromLatin1("auto save"), _doAutoSaveV);
+ config.writeEntry( TQString::fromLatin1("logging"), _loggingV);
+ config.writeEntry( TQString::fromLatin1("auto save period"), _autoSaveValueV);
+ config.writeEntry( TQString::fromLatin1("prompt delete"), _promptDeleteV);
- config.writeEntry( QString::fromLatin1("display session time"),
+ config.writeEntry( TQString::fromLatin1("display session time"),
_displayColumnV[0]);
- config.writeEntry( QString::fromLatin1("display time"),
+ config.writeEntry( TQString::fromLatin1("display time"),
_displayColumnV[1]);
- config.writeEntry( QString::fromLatin1("display total session time"),
+ config.writeEntry( TQString::fromLatin1("display total session time"),
_displayColumnV[2]);
- config.writeEntry( QString::fromLatin1("display total time"),
+ config.writeEntry( TQString::fromLatin1("display total time"),
_displayColumnV[3]);
config.sync();
}
// HACK: this entire config dialog should be upgraded to KConfigXT
-bool Preferences::readBoolEntry( const QString& key )
+bool Preferences::readBoolEntry( const TQString& key )
{
KConfig &config = *KGlobal::config();
return config.readBoolEntry ( key, true );
}
-void Preferences::writeEntry( const QString &key, bool value)
+void Preferences::writeEntry( const TQString &key, bool value)
{
KConfig &config = *KGlobal::config();
config.writeEntry( key, value );
config.sync();
}
-void Preferences::deleteEntry( const QString &key )
+void Preferences::deleteEntry( const TQString &key )
{
KConfig &config = *KGlobal::config();
config.deleteEntry( key );
diff --git a/karm/preferences.h b/karm/preferences.h
index e917d70bb..adfcd14ec 100644
--- a/karm/preferences.h
+++ b/karm/preferences.h
@@ -18,26 +18,26 @@ class Preferences :public KDialogBase
Q_OBJECT
public:
- static Preferences *instance( const QString& icsfile = "" );
+ static Preferences *instance( const TQString& icsfile = "" );
void disableIdleDetection();
// Retrive information about settings
bool detectIdleness() const;
int idlenessTimeout() const;
- QString iCalFile() const;
- QString activeCalendarFile() const;
+ TQString iCalFile() const;
+ TQString activeCalendarFile() const;
bool autoSave() const;
bool logging() const;
int autoSavePeriod() const;
bool promptDelete() const;
- QString setPromptDelete( bool prompt );
+ TQString setPromptDelete( bool prompt );
bool displayColumn(int n) const;
- QString userRealName() const;
+ TQString userRealName() const;
void emitSignals();
- bool readBoolEntry( const QString& uid );
- void writeEntry( const QString &key, bool value );
- void deleteEntry( const QString &key );
+ bool readBoolEntry( const TQString& uid );
+ void writeEntry( const TQString &key, bool value );
+ void deleteEntry( const TQString &key );
public slots:
void showDialog();
@@ -47,7 +47,7 @@ class Preferences :public KDialogBase
signals:
void detectIdleness(bool on);
void idlenessTimeout(int minutes);
- void iCalFile(QString);
+ void iCalFile(TQString);
void autoSave(bool on);
void autoSavePeriod(int minutes);
void setupChanged();
@@ -63,27 +63,27 @@ class Preferences :public KDialogBase
void makeBehaviorPage();
void makeStoragePage();
- Preferences( const QString& icsfile = "" );
+ Preferences( const TQString& icsfile = "" );
static Preferences *_instance;
bool _unsavedChanges;
// Widgets
- QCheckBox *_doIdleDetectionW, *_doAutoSaveW, *_promptDeleteW;
- QCheckBox *_displayTimeW, *_displaySessionW,
+ TQCheckBox *_doIdleDetectionW, *_doAutoSaveW, *_promptDeleteW;
+ TQCheckBox *_displayTimeW, *_displaySessionW,
*_displayTotalTimeW, *_displayTotalSessionW;
- QCheckBox *_loggingW;
- QLabel *_idleDetectLabelW, *_displayColumnsLabelW;
- QSpinBox *_idleDetectValueW, *_autoSaveValueW;
+ TQCheckBox *_loggingW;
+ TQLabel *_idleDetectLabelW, *_displayColumnsLabelW;
+ TQSpinBox *_idleDetectValueW, *_autoSaveValueW;
KURLRequester *_iCalFileW ;
// Values
bool _doIdleDetectionV, _doAutoSaveV, _promptDeleteV, _loggingV;
bool _displayColumnV[4];
int _idleDetectValueV, _autoSaveValueV;
- QString _iCalFileV;
+ TQString _iCalFileV;
/** real name of the user, used during ICAL saving */
- QString _userRealName;
+ TQString _userRealName;
};
#endif // KARM_PREFERENCES_H
diff --git a/karm/print.cpp b/karm/print.cpp
index ff00a3bc3..1badb4f9f 100644
--- a/karm/print.cpp
+++ b/karm/print.cpp
@@ -1,8 +1,8 @@
// #include <iostream>
-#include <qdatetime.h>
-#include <qpaintdevicemetrics.h>
-#include <qpainter.h>
+#include <tqdatetime.h>
+#include <tqpaintdevicemetrics.h>
+#include <tqpainter.h>
#include <kglobal.h>
#include <klocale.h> // i18n
@@ -24,9 +24,9 @@ void MyPrinter::print()
// FIXME: make a better caption for the printingdialog
if (setup(0L, i18n("Print Times"))) {
// setup
- QPainter painter(this);
- QPaintDeviceMetrics deviceMetrics(this);
- QFontMetrics metrics = painter.fontMetrics();
+ TQPainter painter(this);
+ TQPaintDeviceMetrics deviceMetrics(this);
+ TQFontMetrics metrics = painter.fontMetrics();
pageHeight = deviceMetrics.height();
int pageWidth = deviceMetrics.width();
xMargin = margins().width();
@@ -68,17 +68,17 @@ void MyPrinter::print()
int realPageWidth = nameFieldWidth + timeWidth + sessionTimeWidth + 2*5;
// Print the header
- QFont origFont, newFont;
+ TQFont origFont, newFont;
origFont = painter.font();
newFont = origFont;
newFont.setPixelSize( static_cast<int>(origFont.pixelSize() * 1.5) );
painter.setFont(newFont);
int height = metrics.height();
- QString now = KGlobal::locale()->formatDateTime(QDateTime::currentDateTime());
+ TQString now = KGlobal::locale()->formatDateTime(TQDateTime::currentDateTime());
painter.drawText(xMargin, yoff, pageWidth, height,
- QPainter::AlignCenter,
+ TQPainter::AlignCenter,
i18n("KArm - %1").arg(now));
painter.setFont(origFont);
@@ -106,12 +106,12 @@ void MyPrinter::print()
// Print the Totals
printLine( formatTime( totalTotal ),
formatTime( sessionTotal ),
- QString(), painter, 0);
+ TQString(), painter, 0);
}
}
int MyPrinter::calculateReqNameWidth( Task* task,
- QFontMetrics &metrics,
+ TQFontMetrics &metrics,
int level)
{
int width = metrics.width(task->name()) + level * levelIndent;
@@ -125,11 +125,11 @@ int MyPrinter::calculateReqNameWidth( Task* task,
return width;
}
-void MyPrinter::printTask(Task *task, QPainter &painter, int level)
+void MyPrinter::printTask(Task *task, TQPainter &painter, int level)
{
- QString time = formatTime(task->totalTime());
- QString sessionTime = formatTime(task->totalSessionTime());
- QString name = task->name();
+ TQString time = formatTime(task->totalTime());
+ TQString sessionTime = formatTime(task->totalSessionTime());
+ TQString name = task->name();
printLine(time, sessionTime, name, painter, level);
for ( Task* subTask = task->firstChild();
@@ -140,21 +140,21 @@ void MyPrinter::printTask(Task *task, QPainter &painter, int level)
}
}
-void MyPrinter::printLine( QString total, QString session, QString name,
- QPainter &painter, int level )
+void MyPrinter::printLine( TQString total, TQString session, TQString name,
+ TQPainter &painter, int level )
{
int xoff = xMargin + 10 * level;
painter.drawText( xoff, yoff, nameFieldWidth, lineHeight,
- QPainter::AlignLeft, name);
+ TQPainter::AlignLeft, name);
xoff = xMargin + nameFieldWidth;
painter.drawText( xoff, yoff, sessionTimeWidth, lineHeight,
- QPainter::AlignRight, session);
+ TQPainter::AlignRight, session);
xoff += sessionTimeWidth+ 5;
painter.drawText( xoff, yoff, timeWidth, lineHeight,
- QPainter::AlignRight, total);
+ TQPainter::AlignRight, total);
xoff += timeWidth+5;
yoff += lineHeight;
diff --git a/karm/print.h b/karm/print.h
index 5c51a2c45..22e0d6570 100644
--- a/karm/print.h
+++ b/karm/print.h
@@ -20,10 +20,10 @@ class MyPrinter : public KPrinter
public:
MyPrinter( const TaskView *taskView );
void print();
- void printLine( QString total, QString session, QString name, QPainter &,
+ void printLine( TQString total, TQString session, TQString name, TQPainter &,
int );
- void printTask( Task *task, QPainter &, int level );
- int calculateReqNameWidth( Task *task, QFontMetrics &metrics,
+ void printTask( Task *task, TQPainter &, int level );
+ int calculateReqNameWidth( Task *task, TQFontMetrics &metrics,
int level);
private:
diff --git a/karm/printdialog.cpp b/karm/printdialog.cpp
index b2e4635d9..92a306a01 100644
--- a/karm/printdialog.cpp
+++ b/karm/printdialog.cpp
@@ -20,17 +20,17 @@
*
*/
-#include <qbuttongroup.h>
-#include <qcheckbox.h>
-#include <qhbox.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qlineedit.h>
-#include <qpixmap.h>
-#include <qpushbutton.h>
-#include <qstring.h>
-#include <qwidget.h>
-#include <qwhatsthis.h>
+#include <tqbuttongroup.h>
+#include <tqcheckbox.h>
+#include <tqhbox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqlineedit.h>
+#include <tqpixmap.h>
+#include <tqpushbutton.h>
+#include <tqstring.h>
+#include <tqwidget.h>
+#include <tqwhatsthis.h>
#include <kiconloader.h>
#include <klocale.h> // i18n
@@ -44,57 +44,57 @@ PrintDialog::PrintDialog()
: KDialogBase(0, "PrintDialog", true, i18n("Print Dialog"), Ok|Cancel,
Ok, true )
{
- QWidget *page = new QWidget( this );
+ TQWidget *page = new TQWidget( this );
setMainWidget(page);
int year, month;
- QVBoxLayout *layout = new QVBoxLayout(page, KDialog::spacingHint());
+ TQVBoxLayout *layout = new TQVBoxLayout(page, KDialog::spacingHint());
layout->addSpacing(10);
layout->addStretch(1);
// Date Range
- QGroupBox *rangeGroup = new QGroupBox(1, Horizontal, i18n("Date Range"),
+ TQGroupBox *rangeGroup = new TQGroupBox(1, Horizontal, i18n("Date Range"),
page);
layout->addWidget(rangeGroup);
- QWidget *rangeWidget = new QWidget(rangeGroup);
- QHBoxLayout *rangeLayout = new QHBoxLayout(rangeWidget, 0, spacingHint());
+ TQWidget *rangeWidget = new TQWidget(rangeGroup);
+ TQHBoxLayout *rangeLayout = new TQHBoxLayout(rangeWidget, 0, spacingHint());
- rangeLayout->addWidget(new QLabel(i18n("From:"), rangeWidget));
+ rangeLayout->addWidget(new TQLabel(i18n("From:"), rangeWidget));
_from = new KDateEdit(rangeWidget);
// Default from date to beginning of the month
- year = QDate::currentDate().year();
- month = QDate::currentDate().month();
- _from->setDate(QDate(year, month, 1));
+ year = TQDate::currentDate().year();
+ month = TQDate::currentDate().month();
+ _from->setDate(TQDate(year, month, 1));
rangeLayout->addWidget(_from);
- rangeLayout->addWidget(new QLabel(i18n("To:"), rangeWidget));
+ rangeLayout->addWidget(new TQLabel(i18n("To:"), rangeWidget));
_to = new KDateEdit(rangeWidget);
rangeLayout->addWidget(_to);
layout->addSpacing(10);
layout->addStretch(1);
- _allTasks = new QComboBox( page );
+ _allTasks = new TQComboBox( page );
_allTasks->insertItem( i18n( "Selected Task" ) );
_allTasks->insertItem( i18n( "All Tasks" ) );
layout->addWidget( _allTasks );
- _perWeek = new QCheckBox( i18n( "Summarize per week" ), page );
+ _perWeek = new TQCheckBox( i18n( "Summarize per week" ), page );
layout->addWidget( _perWeek );
- _totalsOnly = new QCheckBox( i18n( "Totals only" ), page );
+ _totalsOnly = new TQCheckBox( i18n( "Totals only" ), page );
layout->addWidget( _totalsOnly );
layout->addSpacing(10);
layout->addStretch(1);
}
-QDate PrintDialog::from() const
+TQDate PrintDialog::from() const
{
return _from->date();
}
-QDate PrintDialog::to() const
+TQDate PrintDialog::to() const
{
return _to->date();
}
diff --git a/karm/printdialog.h b/karm/printdialog.h
index 6c2c4c581..089950f8e 100644
--- a/karm/printdialog.h
+++ b/karm/printdialog.h
@@ -36,10 +36,10 @@ class PrintDialog : public KDialogBase
PrintDialog();
/* Return the from date entered. */
- QDate from() const;
+ TQDate from() const;
/* Return the to date entered. */
- QDate to() const;
+ TQDate to() const;
/* Whether to summarize per week */
bool perWeek() const;
@@ -52,9 +52,9 @@ class PrintDialog : public KDialogBase
private:
KDateEdit *_from, *_to;
- QCheckBox *_perWeek;
- QComboBox *_allTasks;
- QCheckBox *_totalsOnly;
+ TQCheckBox *_perWeek;
+ TQComboBox *_allTasks;
+ TQCheckBox *_totalsOnly;
};
#endif // KARM_PRINT_DIALOG_H
diff --git a/karm/reportcriteria.h b/karm/reportcriteria.h
index 66b5b8a02..e8b4c248e 100644
--- a/karm/reportcriteria.h
+++ b/karm/reportcriteria.h
@@ -21,7 +21,7 @@
#ifndef REPORTCRITERIA_H
#define REPORTCRITERIA_H
-#include <qdatetime.h>
+#include <tqdatetime.h>
#include <kurl.h>
class QString;
@@ -57,12 +57,12 @@ class ReportCriteria
/**
For history reports, the lower bound of the date range to report on.
*/
- QDate from;
+ TQDate from;
/**
For history reports, the upper bound of the date range to report on.
*/
- QDate to;
+ TQDate to;
/**
True if the report should contain all tasks in Karm.
@@ -80,12 +80,12 @@ class ReportCriteria
/**
The delimiter to use when outputting comma-seperated value reports.
*/
- QString delimiter;
+ TQString delimiter;
/**
The quote to use for text fields when outputting comma-seperated reports.
*/
- QString quote;
+ TQString quote;
};
#endif
diff --git a/karm/task.cpp b/karm/task.cpp
index 07e934e53..5ade426f0 100644
--- a/karm/task.cpp
+++ b/karm/task.cpp
@@ -1,7 +1,7 @@
-#include <qcstring.h>
-#include <qdatetime.h>
-#include <qstring.h>
-#include <qtimer.h>
+#include <tqcstring.h>
+#include <tqdatetime.h>
+#include <tqstring.h>
+#include <tqtimer.h>
#include <kiconloader.h>
@@ -19,27 +19,27 @@
const int gSecondsPerMinute = 60;
-QPtrVector<QPixmap> *Task::icons = 0;
+TQPtrVector<TQPixmap> *Task::icons = 0;
-Task::Task( const QString& taskName, long minutes, long sessionTime,
+Task::Task( const TQString& taskName, long minutes, long sessionTime,
DesktopList desktops, TaskView *parent)
- : QObject(), QListViewItem(parent)
+ : TQObject(), TQListViewItem(parent)
{
init(taskName, minutes, sessionTime, desktops, 0);
}
-Task::Task( const QString& taskName, long minutes, long sessionTime,
+Task::Task( const TQString& taskName, long minutes, long sessionTime,
DesktopList desktops, Task *parent)
- : QObject(), QListViewItem(parent)
+ : TQObject(), TQListViewItem(parent)
{
init(taskName, minutes, sessionTime, desktops, 0);
}
Task::Task( KCal::Todo* todo, TaskView* parent )
- : QObject(), QListViewItem( parent )
+ : TQObject(), TQListViewItem( parent )
{
long minutes = 0;
- QString name;
+ TQString name;
long sessionTime = 0;
int percent_complete = 0;
DesktopList desktops;
@@ -48,25 +48,25 @@ Task::Task( KCal::Todo* todo, TaskView* parent )
init(name, minutes, sessionTime, desktops, percent_complete);
}
-void Task::init( const QString& taskName, long minutes, long sessionTime,
+void Task::init( const TQString& taskName, long minutes, long sessionTime,
DesktopList desktops, int percent_complete)
{
// If our parent is the taskview then connect our totalTimesChanged
// signal to its receiver
if ( ! parent() )
- connect( this, SIGNAL( totalTimesChanged ( long, long ) ),
- listView(), SLOT( taskTotalTimesChanged( long, long) ));
+ connect( this, TQT_SIGNAL( totalTimesChanged ( long, long ) ),
+ listView(), TQT_SLOT( taskTotalTimesChanged( long, long) ));
- connect( this, SIGNAL( deletingTask( Task* ) ),
- listView(), SLOT( deletingTask( Task* ) ));
+ connect( this, TQT_SIGNAL( deletingTask( Task* ) ),
+ listView(), TQT_SLOT( deletingTask( Task* ) ));
if (icons == 0) {
- icons = new QPtrVector<QPixmap>(8);
+ icons = new TQPtrVector<TQPixmap>(8);
KIconLoader kil("karm"); // always load icons from the KArm application
for (int i=0; i<8; i++)
{
- QPixmap *icon = new QPixmap();
- QString name;
+ TQPixmap *icon = new TQPixmap();
+ TQString name;
name.sprintf("watch-%d.xpm",i);
*icon = kil.loadIcon( name, KIcon::User );
icons->insert(i,icon);
@@ -75,13 +75,13 @@ void Task::init( const QString& taskName, long minutes, long sessionTime,
_removing = false;
_name = taskName.stripWhiteSpace();
- _lastStart = QDateTime::currentDateTime();
+ _lastStart = TQDateTime::currentDateTime();
_totalTime = _time = minutes;
_totalSessionTime = _sessionTime = sessionTime;
- _timer = new QTimer(this);
+ _timer = new TQTimer(this);
_desktops = desktops;
- connect(_timer, SIGNAL(timeout()), this, SLOT(updateActiveIcon()));
- setPixmap(1, UserIcon(QString::fromLatin1("empty-watch.xpm")));
+ connect(_timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(updateActiveIcon()));
+ setPixmap(1, UserIcon(TQString::fromLatin1("empty-watch.xpm")));
_currentPic = 0;
_percentcomplete = percent_complete;
@@ -94,7 +94,7 @@ Task::~Task() {
delete _timer;
}
-void Task::setRunning( bool on, KarmStorage* storage, QDateTime whenStarted, QDateTime whenStopped )
+void Task::setRunning( bool on, KarmStorage* storage, TQDateTime whenStarted, TQDateTime whenStopped )
// Sets a task running or stopped. If the task is to be stopped, whenStarted is not evaluated.
// on=true if the task shall be started on=false if the task shall be stopped
// This is the back-end, the front-end is StartTimerFor()
@@ -119,13 +119,13 @@ void Task::setRunning( bool on, KarmStorage* storage, QDateTime whenStarted, QDa
if ( ! _removing )
{
storage->stopTimer(this, whenStopped);
- setPixmap(1, UserIcon(QString::fromLatin1("empty-watch.xpm")));
+ setPixmap(1, UserIcon(TQString::fromLatin1("empty-watch.xpm")));
}
}
}
}
-void Task::setUid(QString uid) {
+void Task::setUid(TQString uid) {
_uid = uid;
}
@@ -134,11 +134,11 @@ bool Task::isRunning() const
return _timer->isActive();
}
-void Task::setName( const QString& name, KarmStorage* storage )
+void Task::setName( const TQString& name, KarmStorage* storage )
{
kdDebug(5970) << "Task:setName: " << name << endl;
- QString oldname = _name;
+ TQString oldname = _name;
if ( oldname != name ) {
_name = name;
storage->setName(this, oldname);
@@ -183,7 +183,7 @@ void Task::setPercentComplete(const int percent, KarmStorage *storage)
void Task::setPixmapProgress()
{
- QPixmap* icon = new QPixmap();
+ TQPixmap* icon = new TQPixmap();
if (_percentcomplete >= 100)
*icon = UserIcon("task-complete.xpm");
else
@@ -255,7 +255,7 @@ void Task::changeParentTotalTimes( long minutesSession, long minutes )
parent()->changeTotalTimes( minutesSession, minutes );
}
-bool Task::remove( QPtrList<Task>& activeTasks, KarmStorage* storage)
+bool Task::remove( TQPtrList<Task>& activeTasks, KarmStorage* storage)
{
kdDebug(5970) << "Task::remove: " << _name << endl;
@@ -285,12 +285,12 @@ void Task::updateActiveIcon()
setPixmap(1, *(*icons)[_currentPic]);
}
-QString Task::fullName() const
+TQString Task::fullName() const
{
if (isRoot())
return name();
else
- return parent()->fullName() + QString::fromLatin1("/") + name();
+ return parent()->fullName() + TQString::fromLatin1("/") + name();
}
KCal::Todo* Task::asTodo(KCal::Todo* todo) const
@@ -307,15 +307,15 @@ KCal::Todo* Task::asTodo(KCal::Todo* todo) const
// todo->setDtStart( current );
todo->setCustomProperty( kapp->instanceName(),
- QCString( "totalTaskTime" ), QString::number( _time ) );
+ TQCString( "totalTaskTime" ), TQString::number( _time ) );
todo->setCustomProperty( kapp->instanceName(),
- QCString( "totalSessionTime" ), QString::number( _sessionTime) );
+ TQCString( "totalSessionTime" ), TQString::number( _sessionTime) );
if (getDesktopStr().isEmpty())
- todo->removeCustomProperty(kapp->instanceName(), QCString("desktopList"));
+ todo->removeCustomProperty(kapp->instanceName(), TQCString("desktopList"));
else
todo->setCustomProperty( kapp->instanceName(),
- QCString( "desktopList" ), getDesktopStr() );
+ TQCString( "desktopList" ), getDesktopStr() );
todo->setOrganizer( Preferences::instance()->userRealName() );
@@ -325,7 +325,7 @@ KCal::Todo* Task::asTodo(KCal::Todo* todo) const
}
bool Task::parseIncidence( KCal::Incidence* incident, long& minutes,
- long& sessionMinutes, QString& name, DesktopList& desktops,
+ long& sessionMinutes, TQString& name, DesktopList& desktops,
int& percent_complete )
{
bool ok;
@@ -337,23 +337,23 @@ bool Task::parseIncidence( KCal::Incidence* incident, long& minutes,
ok = false;
minutes = incident->customProperty( kapp->instanceName(),
- QCString( "totalTaskTime" )).toInt( &ok );
+ TQCString( "totalTaskTime" )).toInt( &ok );
if ( !ok )
minutes = 0;
ok = false;
sessionMinutes = incident->customProperty( kapp->instanceName(),
- QCString( "totalSessionTime" )).toInt( &ok );
+ TQCString( "totalSessionTime" )).toInt( &ok );
if ( !ok )
sessionMinutes = 0;
- QString desktopList = incident->customProperty( kapp->instanceName(),
- QCString( "desktopList" ) );
- QStringList desktopStrList = QStringList::split( QString::fromLatin1(","),
+ TQString desktopList = incident->customProperty( kapp->instanceName(),
+ TQCString( "desktopList" ) );
+ TQStringList desktopStrList = TQStringList::split( TQString::fromLatin1(","),
desktopList );
desktops.clear();
- for ( QStringList::iterator iter = desktopStrList.begin();
+ for ( TQStringList::iterator iter = desktopStrList.begin();
iter != desktopStrList.end();
++iter ) {
int desktopInt = (*iter).toInt( &ok );
@@ -371,16 +371,16 @@ bool Task::parseIncidence( KCal::Incidence* incident, long& minutes,
return true;
}
-QString Task::getDesktopStr() const
+TQString Task::getDesktopStr() const
{
if ( _desktops.empty() )
- return QString();
+ return TQString();
- QString desktopstr;
+ TQString desktopstr;
for ( DesktopList::const_iterator iter = _desktops.begin();
iter != _desktops.end();
++iter ) {
- desktopstr += QString::number( *iter ) + QString::fromLatin1( "," );
+ desktopstr += TQString::number( *iter ) + TQString::fromLatin1( "," );
}
desktopstr.remove( desktopstr.length() - 1, 1 );
return desktopstr;
@@ -417,18 +417,18 @@ void Task::update()
setText(4, formatTime(_totalTime));
}
-void Task::addComment( QString comment, KarmStorage* storage )
+void Task::addComment( TQString comment, KarmStorage* storage )
{
- _comment = _comment + QString::fromLatin1("\n") + comment;
+ _comment = _comment + TQString::fromLatin1("\n") + comment;
storage->addComment(this, comment);
}
-QString Task::comment() const
+TQString Task::comment() const
{
return _comment;
}
-int Task::compare ( QListViewItem * i, int col, bool ascending ) const
+int Task::compare ( TQListViewItem * i, int col, bool ascending ) const
{
long thistime = 0;
long thattime = 0;
diff --git a/karm/task.h b/karm/task.h
index 8a9ca7833..37e75f12a 100644
--- a/karm/task.h
+++ b/karm/task.h
@@ -1,13 +1,13 @@
#ifndef KARM_TASK_H
#define KARM_TASK_H
-// Required b/c QPtrList is a struct, not a class.
-#include <qptrlist.h>
+// Required b/c TQPtrList is a struct, not a class.
+#include <tqptrlist.h>
-// Requred b/c/ QPtrVector is a template (?)
-#include <qptrvector.h>
+// Requred b/c/ TQPtrVector is a template (?)
+#include <tqptrvector.h>
-#include <qdatetime.h>
+#include <tqdatetime.h>
// Required b/c DesktopList is a typedef not a class.
#include "desktoplist.h"
@@ -38,17 +38,17 @@ class QPixmap;
* too.
*
* It can also contain subtasks - these are managed using the
- * QListViewItem class.
+ * TQListViewItem class.
*/
-class Task : public QObject, public QListViewItem
+class Task : public TQObject, public QListViewItem
{
Q_OBJECT
public:
//@{ constructors
- Task( const QString& taskame, long minutes, long sessionTime,
+ Task( const TQString& taskame, long minutes, long sessionTime,
DesktopList desktops, TaskView* parent = 0);
- Task( const QString& taskame, long minutes, long sessionTime,
+ Task( const TQString& taskame, long minutes, long sessionTime,
DesktopList desktops, Task* parent = 0);
Task( KCal::Todo* incident, TaskView* parent );
//@}
@@ -56,11 +56,11 @@ class Task : public QObject, public QListViewItem
~Task();
/** return parent Task or null in case of TaskView.
- * same as QListViewItem::parent()
+ * same as TQListViewItem::parent()
*/
- Task* firstChild() const { return (Task*)QListViewItem::firstChild(); }
- Task* nextSibling() const { return (Task*)QListViewItem::nextSibling(); }
- Task* parent() const { return (Task*)QListViewItem::parent(); }
+ Task* firstChild() const { return (Task*)TQListViewItem::firstChild(); }
+ Task* nextSibling() const { return (Task*)TQListViewItem::nextSibling(); }
+ Task* parent() const { return (Task*)TQListViewItem::parent(); }
/** Return task view for this task */
TaskView* taskView() const {
@@ -68,7 +68,7 @@ class Task : public QObject, public QListViewItem
}
/** Return unique iCalendar Todo ID for this task. */
- QString uid() const { return _uid; }
+ TQString uid() const { return _uid; }
/**
* Set unique id for the task.
@@ -77,7 +77,7 @@ class Task : public QObject, public QListViewItem
*
* @param uid The new unique id.
*/
- void setUid(const QString uid);
+ void setUid(const TQString uid);
/** cut Task out of parent Task or the TaskView */
void cut();
@@ -88,7 +88,7 @@ class Task : public QObject, public QListViewItem
void paste(Task* destination);
/** Sort times numerically, not alphabetically. */
- int compare ( QListViewItem * i, int col, bool ascending ) const;
+ int compare ( TQListViewItem * i, int col, bool ascending ) const;
//@{ timing related functions
@@ -135,7 +135,7 @@ class Task : public QObject, public QListViewItem
/**
* Return time the task was started.
*/
- QDateTime startTime() const { return _lastStart; };
+ TQDateTime startTime() const { return _lastStart; };
/** sets session time to zero. */
void startNewSession() { changeTimes( -_sessionTime, 0 ); };
@@ -146,7 +146,7 @@ class Task : public QObject, public QListViewItem
void setDesktopList ( DesktopList dl );
DesktopList getDesktops() const { return _desktops;}
- QString getDesktopStr() const;
+ TQString getDesktopStr() const;
//@}
//@{ name related functions
@@ -155,19 +155,19 @@ class Task : public QObject, public QListViewItem
* @param name a pointer to the name. A deep copy will be made.
* @param storage a pointer to a KarmStorage object.
*/
- void setName( const QString& name, KarmStorage* storage );
+ void setName( const TQString& name, KarmStorage* storage );
/** returns the name of this task.
* @return a pointer to the name.
*/
- QString name() const { return _name; };
+ TQString name() const { return _name; };
/**
* Returns that task name, prefixed by parent tree up to root.
*
* Task names are seperated by a forward slash: /
*/
- QString fullName() const;
+ TQString fullName() const;
//@}
/** Update the display of the task (all columns) in the UI. */
@@ -179,11 +179,11 @@ class Task : public QObject, public QListViewItem
* @param on true or false for starting or stopping a task
* @param storage a pointer to a KarmStorage object.
* @param whenStarted time when the task was started. Normally
- QDateTime::currentDateTime, but if calendar has
+ TQDateTime::currentDateTime, but if calendar has
been changed by another program and being reloaded
the task is set to running with another start date
*/
- void setRunning( bool on, KarmStorage* storage, QDateTime whenStarted=QDateTime::currentDateTime(), QDateTime whenStopped=QDateTime::currentDateTime());
+ void setRunning( bool on, KarmStorage* storage, TQDateTime whenStarted=TQDateTime::currentDateTime(), TQDateTime whenStopped=TQDateTime::currentDateTime());
/** return the state of a task - if it's running or not
* @return true or false depending on whether the task is running
@@ -192,7 +192,7 @@ class Task : public QObject, public QListViewItem
//@}
bool parseIncidence(KCal::Incidence*, long& minutes,
- long& sessionMinutes, QString& name, DesktopList& desktops,
+ long& sessionMinutes, TQString& name, DesktopList& desktops,
int& percent_complete);
/**
@@ -201,10 +201,10 @@ class Task : public QObject, public QListViewItem
KCal::Todo* asTodo(KCal::Todo* calendar) const;
/** Add a comment to this task. */
- void addComment( QString comment, KarmStorage* storage );
+ void addComment( TQString comment, KarmStorage* storage );
/** Retrieve the entire comment for the task. */
- QString comment() const;
+ TQString comment() const;
/** tells you whether this task is the root of the task tree */
bool isRoot() const { return parent() == 0; }
@@ -213,7 +213,7 @@ class Task : public QObject, public QListViewItem
* @param activeTasks - list of aktive tasks
* @param storage a pointer to a KarmStorage object.
*/
- bool remove( QPtrList<Task>& activeTasks, KarmStorage* storage );
+ bool remove( TQPtrList<Task>& activeTasks, KarmStorage* storage );
/**
* Update percent complete for this task.
@@ -236,7 +236,7 @@ class Task : public QObject, public QListViewItem
void removeFromView();
/** delivers when the task was started last */
- QDateTime lastStart() { return _lastStart; }
+ TQDateTime lastStart() { return _lastStart; }
protected:
void changeParentTotalTimes( long minutesSession, long minutes );
@@ -253,10 +253,10 @@ class Task : public QObject, public QListViewItem
private:
/** The iCal unique ID of the Todo for this task. */
- QString _uid;
+ TQString _uid;
/** The comment associated with this Task. */
- QString _comment;
+ TQString _comment;
int _percentcomplete;
@@ -266,15 +266,15 @@ class Task : public QObject, public QListViewItem
void noNegativeTimes();
/** initialize a task */
- void init( const QString& taskame, long minutes, long sessionTime,
+ void init( const TQString& taskame, long minutes, long sessionTime,
DesktopList desktops, int percent_complete);
/** task name */
- QString _name;
+ TQString _name;
/** Last time this task was started. */
- QDateTime _lastStart;
+ TQDateTime _lastStart;
//@{ totals of the whole subtree including self
long _totalTime;
@@ -286,9 +286,9 @@ class Task : public QObject, public QListViewItem
long _sessionTime;
//@}
DesktopList _desktops;
- QTimer *_timer;
+ TQTimer *_timer;
int _currentPic;
- static QPtrVector<QPixmap> *icons;
+ static TQPtrVector<TQPixmap> *icons;
/** Don't need to update storage when deleting task from list. */
bool _removing;
diff --git a/karm/taskview.cpp b/karm/taskview.cpp
index 590744408..0af5c7bd4 100644
--- a/karm/taskview.cpp
+++ b/karm/taskview.cpp
@@ -1,14 +1,14 @@
-#include <qclipboard.h>
-#include <qfile.h>
-#include <qlayout.h>
-#include <qlistbox.h>
-#include <qlistview.h>
-#include <qptrlist.h>
-#include <qptrstack.h>
-#include <qstring.h>
-#include <qtextstream.h>
-#include <qtimer.h>
-#include <qxml.h>
+#include <tqclipboard.h>
+#include <tqfile.h>
+#include <tqlayout.h>
+#include <tqlistbox.h>
+#include <tqlistview.h>
+#include <tqptrlist.h>
+#include <tqptrstack.h>
+#include <tqstring.h>
+#include <tqtextstream.h>
+#include <tqtimer.h>
+#include <tqxml.h>
#include "kapplication.h" // kapp
#include <kconfig.h>
@@ -37,15 +37,15 @@
class DesktopTracker;
-TaskView::TaskView(QWidget *parent, const char *name, const QString &icsfile ):KListView(parent,name)
+TaskView::TaskView(TQWidget *parent, const char *name, const TQString &icsfile ):KListView(parent,name)
{
_preferences = Preferences::instance( icsfile );
_storage = KarmStorage::instance();
- connect( this, SIGNAL( expanded( QListViewItem * ) ),
- this, SLOT( itemStateChanged( QListViewItem * ) ) );
- connect( this, SIGNAL( collapsed( QListViewItem * ) ),
- this, SLOT( itemStateChanged( QListViewItem * ) ) );
+ connect( this, TQT_SIGNAL( expanded( TQListViewItem * ) ),
+ this, TQT_SLOT( itemStateChanged( TQListViewItem * ) ) );
+ connect( this, TQT_SIGNAL( collapsed( TQListViewItem * ) ),
+ this, TQT_SLOT( itemStateChanged( TQListViewItem * ) ) );
// setup default values
previousColumnWidths[0] = previousColumnWidths[1]
@@ -64,50 +64,50 @@ TaskView::TaskView(QWidget *parent, const char *name, const QString &icsfile ):K
setAllColumnsShowFocus( true );
// set up the minuteTimer
- _minuteTimer = new QTimer(this);
- connect( _minuteTimer, SIGNAL( timeout() ), this, SLOT( minuteUpdate() ));
+ _minuteTimer = new TQTimer(this);
+ connect( _minuteTimer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( minuteUpdate() ));
_minuteTimer->start(1000 * secsPerMinute);
// React when user changes iCalFile
- connect(_preferences, SIGNAL(iCalFile(QString)),
- this, SLOT(iCalFileChanged(QString)));
+ connect(_preferences, TQT_SIGNAL(iCalFile(TQString)),
+ this, TQT_SLOT(iCalFileChanged(TQString)));
// resize columns when config is changed
- connect(_preferences, SIGNAL( setupChanged() ), this,SLOT( adaptColumns() ));
+ connect(_preferences, TQT_SIGNAL( setupChanged() ), this,TQT_SLOT( adaptColumns() ));
_minuteTimer->start(1000 * secsPerMinute);
// Set up the idle detection.
_idleTimeDetector = new IdleTimeDetector( _preferences->idlenessTimeout() );
- connect( _idleTimeDetector, SIGNAL( extractTime(int) ),
- this, SLOT( extractTime(int) ));
- connect( _idleTimeDetector, SIGNAL( stopAllTimersAt(QDateTime) ),
- this, SLOT( stopAllTimersAt(QDateTime) ));
- connect( _preferences, SIGNAL( idlenessTimeout(int) ),
- _idleTimeDetector, SLOT( setMaxIdle(int) ));
- connect( _preferences, SIGNAL( detectIdleness(bool) ),
- _idleTimeDetector, SLOT( toggleOverAllIdleDetection(bool) ));
+ connect( _idleTimeDetector, TQT_SIGNAL( extractTime(int) ),
+ this, TQT_SLOT( extractTime(int) ));
+ connect( _idleTimeDetector, TQT_SIGNAL( stopAllTimersAt(TQDateTime) ),
+ this, TQT_SLOT( stopAllTimersAt(TQDateTime) ));
+ connect( _preferences, TQT_SIGNAL( idlenessTimeout(int) ),
+ _idleTimeDetector, TQT_SLOT( setMaxIdle(int) ));
+ connect( _preferences, TQT_SIGNAL( detectIdleness(bool) ),
+ _idleTimeDetector, TQT_SLOT( toggleOverAllIdleDetection(bool) ));
if (!_idleTimeDetector->isIdleDetectionPossible())
_preferences->disableIdleDetection();
// Setup auto save timer
- _autoSaveTimer = new QTimer(this);
- connect( _preferences, SIGNAL( autoSave(bool) ),
- this, SLOT( autoSaveChanged(bool) ));
- connect( _preferences, SIGNAL( autoSavePeriod(int) ),
- this, SLOT( autoSavePeriodChanged(int) ));
- connect( _autoSaveTimer, SIGNAL( timeout() ), this, SLOT( save() ));
+ _autoSaveTimer = new TQTimer(this);
+ connect( _preferences, TQT_SIGNAL( autoSave(bool) ),
+ this, TQT_SLOT( autoSaveChanged(bool) ));
+ connect( _preferences, TQT_SIGNAL( autoSavePeriod(int) ),
+ this, TQT_SLOT( autoSavePeriodChanged(int) ));
+ connect( _autoSaveTimer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( save() ));
// Setup manual save timer (to save changes a little while after they happen)
- _manualSaveTimer = new QTimer(this);
- connect( _manualSaveTimer, SIGNAL( timeout() ), this, SLOT( save() ));
+ _manualSaveTimer = new TQTimer(this);
+ connect( _manualSaveTimer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( save() ));
// Connect desktop tracker events to task starting/stopping
_desktopTracker = new DesktopTracker();
- connect( _desktopTracker, SIGNAL( reachedtActiveDesktop( Task* ) ),
- this, SLOT( startTimerFor(Task*) ));
- connect( _desktopTracker, SIGNAL( leftActiveDesktop( Task* ) ),
- this, SLOT( stopTimerFor(Task*) ));
+ connect( _desktopTracker, TQT_SIGNAL( reachedtActiveDesktop( Task* ) ),
+ this, TQT_SLOT( startTimerFor(Task*) ));
+ connect( _desktopTracker, TQT_SIGNAL( leftActiveDesktop( Task* ) ),
+ this, TQT_SLOT( stopTimerFor(Task*) ));
new TaskViewWhatsThis( this );
}
@@ -116,7 +116,7 @@ KarmStorage* TaskView::storage()
return _storage;
}
-void TaskView::contentsMousePressEvent ( QMouseEvent * e )
+void TaskView::contentsMousePressEvent ( TQMouseEvent * e )
{
kdDebug(5970) << "entering contentsMousePressEvent" << endl;
KListView::contentsMousePressEvent(e);
@@ -139,7 +139,7 @@ void TaskView::contentsMousePressEvent ( QMouseEvent * e )
}
}
-void TaskView::contentsMouseDoubleClickEvent ( QMouseEvent * e )
+void TaskView::contentsMouseDoubleClickEvent ( TQMouseEvent * e )
// if the user double-clicks onto a tasks, he says "I am now working exclusively
// on that task". That means, on a doubleclick, we check if it occurs on an item
// not in the blank space, if yes, stop all other tasks and start the new timer.
@@ -184,12 +184,12 @@ Task* TaskView::item_at_index(int i)
return static_cast<Task*>(itemAtIndex(i));
}
-void TaskView::load( QString fileName )
+void TaskView::load( TQString fileName )
{
// if the program is used as an embedded plugin for konqueror, there may be a need
// to load from a file without touching the preferences.
_isloading = true;
- QString err = _storage->load(this, _preferences, fileName);
+ TQString err = _storage->load(this, _preferences, fileName);
if (!err.isEmpty())
{
@@ -207,13 +207,13 @@ void TaskView::load( QString fileName )
setSelected(first_child(), true);
setCurrentItem(first_child());
- if ( _desktopTracker->startTracking() != QString() )
+ if ( _desktopTracker->startTracking() != TQString() )
KMessageBox::error( 0, i18n("You are on a too high logical desktop, desktop tracking will not work") );
_isloading = false;
refresh();
}
-void TaskView::restoreItemState( QListViewItem *item )
+void TaskView::restoreItemState( TQListViewItem *item )
{
while( item )
{
@@ -224,7 +224,7 @@ void TaskView::restoreItemState( QListViewItem *item )
}
}
-void TaskView::itemStateChanged( QListViewItem *item )
+void TaskView::itemStateChanged( TQListViewItem *item )
{
if ( !item || _isloading ) return;
Task *t = (Task *)item;
@@ -278,10 +278,10 @@ void TaskView::loadFromFlatFile()
//KFileDialog::getSaveFileName("icalout.ics",i18n("*.ics|ICalendars"),this);
- QString fileName(KFileDialog::getOpenFileName(QString::null, QString::null,
+ TQString fileName(KFileDialog::getOpenFileName(TQString::null, TQString::null,
0));
if (!fileName.isEmpty()) {
- QString err = _storage->loadFromFlatFile(this, fileName);
+ TQString err = _storage->loadFromFlatFile(this, fileName);
if (!err.isEmpty())
{
KMessageBox::error(this, err);
@@ -300,26 +300,26 @@ void TaskView::loadFromFlatFile()
setSelected(first_child(), true);
setCurrentItem(first_child());
- if ( _desktopTracker->startTracking() != QString() )
+ if ( _desktopTracker->startTracking() != TQString() )
KMessageBox::error(0, i18n("You are on a too high logical desktop, desktop tracking will not work") );
}
}
-QString TaskView::importPlanner(QString fileName)
+TQString TaskView::importPlanner(TQString fileName)
{
kdDebug(5970) << "entering importPlanner" << endl;
PlannerParser* handler=new PlannerParser(this);
- if (fileName.isEmpty()) fileName=KFileDialog::getOpenFileName(QString::null, QString::null, 0);
- QFile xmlFile( fileName );
- QXmlInputSource source( xmlFile );
- QXmlSimpleReader reader;
+ if (fileName.isEmpty()) fileName=KFileDialog::getOpenFileName(TQString::null, TQString::null, 0);
+ TQFile xmlFile( fileName );
+ TQXmlInputSource source( xmlFile );
+ TQXmlSimpleReader reader;
reader.setContentHandler( handler );
reader.parse( source );
refresh();
return "";
}
-QString TaskView::report( const ReportCriteria& rc )
+TQString TaskView::report( const ReportCriteria& rc )
{
return _storage->report( this, rc );
}
@@ -333,15 +333,15 @@ void TaskView::exportcsvFile()
dialog.enableTasksToExportQuestion();
dialog.urlExportTo->KURLRequester::setMode(KFile::File);
if ( dialog.exec() ) {
- QString err = _storage->report( this, dialog.reportCriteria() );
+ TQString err = _storage->report( this, dialog.reportCriteria() );
if ( !err.isEmpty() ) KMessageBox::error( this, i18n(err.ascii()) );
}
}
-QString TaskView::exportcsvHistory()
+TQString TaskView::exportcsvHistory()
{
kdDebug(5970) << "TaskView::exportcsvHistory()" << endl;
- QString err;
+ TQString err;
CSVExportDialog dialog( ReportCriteria::CSVHistoryExport, this );
if ( current_item() && current_item()->isRoot() )
@@ -362,11 +362,11 @@ void TaskView::scheduleSave()
Preferences* TaskView::preferences() { return _preferences; }
-QString TaskView::save()
+TQString TaskView::save()
// This saves the tasks. If they do not yet have an endDate, their startDate is also not saved.
{
kdDebug(5970) << "Entering TaskView::save" << endl;
- QString err = _storage->save(this);
+ TQString err = _storage->save(this);
emit(setStatusBar(err));
return err;
}
@@ -383,10 +383,10 @@ long TaskView::count()
return n;
}
-void TaskView::startTimerFor(Task* task, QDateTime startTime )
+void TaskView::startTimerFor(Task* task, TQDateTime startTime )
{
kdDebug(5970) << "Entering TaskView::startTimerFor" << endl;
- if (save()==QString())
+ if (save()==TQString())
{
if (task != 0 && activeTasks.findRef(task) == -1)
{
@@ -423,7 +423,7 @@ void TaskView::stopAllTimers()
emit tasksChanged( activeTasks );
}
-void TaskView::stopAllTimersAt(QDateTime qdt)
+void TaskView::stopAllTimersAt(TQDateTime qdt)
// stops all timers for the time qdt. This makes sense, if the idletimedetector detected
// the last work has been done 50 minutes ago.
{
@@ -443,7 +443,7 @@ void TaskView::stopAllTimersAt(QDateTime qdt)
void TaskView::startNewSession()
{
- QListViewItemIterator item( first_child());
+ TQListViewItemIterator item( first_child());
for ( ; item.current(); ++item ) {
Task * task = (Task *) item.current();
task->startNewSession();
@@ -452,7 +452,7 @@ void TaskView::startNewSession()
void TaskView::resetTimeForAllTasks()
{
- QListViewItemIterator item( first_child());
+ TQListViewItemIterator item( first_child());
for ( ; item.current(); ++item ) {
Task * task = (Task *) item.current();
task->resetTimes();
@@ -495,15 +495,15 @@ void TaskView::newTask()
newTask(i18n("New Task"), 0);
}
-void TaskView::newTask(QString caption, Task *parent)
+void TaskView::newTask(TQString caption, Task *parent)
{
EditTaskDialog *dialog = new EditTaskDialog(caption, false);
long total, totalDiff, session, sessionDiff;
DesktopList desktopList;
int result = dialog->exec();
- if ( result == QDialog::Accepted ) {
- QString taskName = i18n( "Unnamed Task" );
+ if ( result == TQDialog::Accepted ) {
+ TQString taskName = i18n( "Unnamed Task" );
if ( !dialog->taskName().isEmpty()) taskName = dialog->taskName();
total = totalDiff = session = sessionDiff = 0;
@@ -514,7 +514,7 @@ void TaskView::newTask(QString caption, Task *parent)
if ( desktopList.size() == ( unsigned int ) _desktopTracker->desktopCount() )
desktopList.clear();
- QString uid = addTask( taskName, total, session, desktopList, parent );
+ TQString uid = addTask( taskName, total, session, desktopList, parent );
if ( uid.isNull() )
{
KMessageBox::error( 0, i18n(
@@ -525,8 +525,8 @@ void TaskView::newTask(QString caption, Task *parent)
}
}
-QString TaskView::addTask
-( const QString& taskname, long total, long session,
+TQString TaskView::addTask
+( const TQString& taskname, long total, long session,
const DesktopList& desktops, Task* parent )
{
Task *task;
@@ -536,7 +536,7 @@ QString TaskView::addTask
else task = new Task( taskname, total, session, desktops, this );
task->setUid( _storage->addTask( task, parent ) );
- QString taskuid=task->uid();
+ TQString taskuid=task->uid();
if ( ! taskuid.isNull() )
{
_desktopTracker->registerForDesktops( task, desktops );
@@ -574,8 +574,8 @@ void TaskView::editTask()
task->time(),
task->sessionTime() );
int result = dialog->exec();
- if (result == QDialog::Accepted) {
- QString taskName = i18n("Unnamed Task");
+ if (result == TQDialog::Accepted) {
+ TQString taskName = i18n("Unnamed Task");
if (!dialog->taskName().isEmpty()) {
taskName = dialog->taskName();
}
@@ -612,9 +612,9 @@ void TaskView::editTask()
// return;
// bool ok;
-// QString comment = KLineEditDlg::getText(i18n("Comment"),
+// TQString comment = KLineEditDlg::getText(i18n("Comment"),
// i18n("Log comment for task '%1':").arg(task->name()),
-// QString(), &ok, this);
+// TQString(), &ok, this);
// if ( ok )
// task->addComment( comment, _storage );
//}
@@ -681,7 +681,7 @@ void TaskView::deleteTask(bool markingascomplete)
}
else
{
- QString uid=task->uid();
+ TQString uid=task->uid();
task->remove(activeTasks, _storage);
task->removeFromView();
if( _preferences ) _preferences->deleteEntry( uid ); // forget if the item was expanded or collapsed
@@ -741,14 +741,14 @@ void TaskView::adaptColumns()
{
setColumnWidth( x, previousColumnWidths[x-1] );
previousColumnWidths[x-1] = HIDDEN_COLUMN;
- setColumnWidthMode( x, QListView::Maximum );
+ setColumnWidthMode( x, TQListView::Maximum );
}
// the column was visible before and were switching it off now
else
if( ! _preferences->displayColumn(x-1)
&& previousColumnWidths[x-1] == HIDDEN_COLUMN )
{
- setColumnWidthMode( x, QListView::Manual ); // we don't want update()
+ setColumnWidthMode( x, TQListView::Manual ); // we don't want update()
// to resize/unhide the col
previousColumnWidths[x-1] = columnWidth( x );
setColumnWidth( x, 0 );
@@ -766,7 +766,7 @@ void TaskView::deletingTask(Task* deletedTask)
emit tasksChanged( activeTasks);
}
-void TaskView::iCalFileChanged(QString file)
+void TaskView::iCalFileChanged(TQString file)
// User might have picked a new file in the preferences dialog.
// This is not iCalFileModified.
{
@@ -779,8 +779,8 @@ void TaskView::iCalFileChanged(QString file)
}
}
-QValueList<HistoryEvent> TaskView::getHistory(const QDate& from,
- const QDate& to) const
+TQValueList<HistoryEvent> TaskView::getHistory(const TQDate& from,
+ const TQDate& to) const
{
return _storage->getHistory(from, to);
}
@@ -860,7 +860,7 @@ void TaskView::clipSession()
void TaskView::clipHistory()
{
PrintDialog dialog;
- if (dialog.exec()== QDialog::Accepted)
+ if (dialog.exec()== TQDialog::Accepted)
{
TimeKard t;
KApplication::clipboard()->
diff --git a/karm/taskview.h b/karm/taskview.h
index f1cf78078..7b60f7e8f 100644
--- a/karm/taskview.h
+++ b/karm/taskview.h
@@ -1,9 +1,9 @@
#ifndef KARM_TASK_VIEW_H
#define KARM_TASK_VIEW_H
-#include <qdict.h>
-#include <qptrlist.h>
-#include <qptrstack.h>
+#include <tqdict.h>
+#include <tqptrlist.h>
+#include <tqptrstack.h>
#include <klistview.h>
@@ -12,7 +12,7 @@
#include "karmstorage.h"
#include "mainwindow.h"
#include "reportcriteria.h"
-#include <qtimer.h>
+#include <tqtimer.h>
//#include "desktoptracker.h"
//#include "karmutility.h"
@@ -44,7 +44,7 @@ class TaskView : public KListView
Q_OBJECT
public:
- TaskView( QWidget *parent = 0, const char *name = 0, const QString &icsfile = "" );
+ TaskView( TQWidget *parent = 0, const char *name = 0, const TQString &icsfile = "" );
virtual ~TaskView();
/** Return the first item in the view, cast to a Task pointer. */
@@ -57,7 +57,7 @@ class TaskView : public KListView
Task* item_at_index(int i);
/** Load the view from storage. */
- void load( QString filename="" );
+ void load( TQString filename="" );
/** Close the storage and release lock. */
void closeStorage();
@@ -72,7 +72,7 @@ class TaskView : public KListView
long count();
/** Return list of start/stop events for given date range. */
- QValueList<HistoryEvent> getHistory(const QDate& from, const QDate& to) const;
+ TQValueList<HistoryEvent> getHistory(const TQDate& from, const TQDate& to) const;
/** Schedule that we should save very soon */
void scheduleSave();
@@ -81,12 +81,12 @@ class TaskView : public KListView
Preferences *preferences();
/** Add a task to view and storage. */
- QString addTask( const QString& taskame, long total, long session, const DesktopList& desktops,
+ TQString addTask( const TQString& taskame, long total, long session, const DesktopList& desktops,
Task* parent = 0 );
public slots:
/** Save to persistent storage. */
- QString save();
+ TQString save();
/** Start the timer on the current item (task) in view. */
void startCurrentTimer();
@@ -98,13 +98,13 @@ class TaskView : public KListView
void stopAllTimers();
/** Stop all running timers as if it was qdt */
- void stopAllTimersAt(QDateTime qdt);
+ void stopAllTimersAt(TQDateTime qdt);
/** Calls newTask dialog with caption "New Task". */
void newTask();
/** Display edit task dialog and create a new task with results. */
- void newTask( QString caption, Task* parent );
+ void newTask( TQString caption, Task* parent );
/** Used to refresh (e.g. after import) */
void refresh();
@@ -113,16 +113,16 @@ class TaskView : public KListView
void loadFromFlatFile();
/** used to import tasks from imendio planner */
- QString importPlanner( QString fileName="" );
+ TQString importPlanner( TQString fileName="" );
/** call export function for csv totals or history */
- QString report( const ReportCriteria &rc );
+ TQString report( const ReportCriteria &rc );
/** Export comma separated values format for task time totals. */
void exportcsvFile();
/** Export comma-separated values format for task history. */
- QString exportcsvHistory();
+ TQString exportcsvHistory();
/** Calls newTask dialog with caption "New Sub Task". */
void newSubTask();
@@ -172,7 +172,7 @@ class TaskView : public KListView
* @param task task to start timer of
* @param startTime if taskview has been modified by another program, we
have to set the starting time to not-now. */
- void startTimerFor( Task* task, QDateTime startTime = QDateTime::currentDateTime() );
+ void startTimerFor( Task* task, TQDateTime startTime = TQDateTime::currentDateTime() );
void stopTimerFor( Task* task );
/** clears all active tasks. Needed e.g. if iCal file was modified by
@@ -183,7 +183,7 @@ class TaskView : public KListView
/** User might have picked a new iCalendar file on preferences screen.
Verify the file is not the same as before and load the new one.
This is not iCalFileModified. */
- void iCalFileChanged(QString file);
+ void iCalFileChanged(TQString file);
/** Copy totals for current and all sub tasks to clipboard. */
void clipTotals();
@@ -199,16 +199,16 @@ class TaskView : public KListView
void updateButtons();
void timersActive();
void timersInactive();
- void tasksChanged( QPtrList<Task> activeTasks );
- void setStatusBar( QString );
+ void tasksChanged( TQPtrList<Task> activeTasks );
+ void setStatusBar( TQString );
private: // member variables
IdleTimeDetector *_idleTimeDetector;
- QTimer *_minuteTimer;
- QTimer *_autoSaveTimer;
- QTimer *_manualSaveTimer;
+ TQTimer *_minuteTimer;
+ TQTimer *_autoSaveTimer;
+ TQTimer *_manualSaveTimer;
Preferences *_preferences;
- QPtrList<Task> activeTasks;
+ TQPtrList<Task> activeTasks;
int previousColumnWidths[4];
DesktopTracker* _desktopTracker;
bool _isloading;
@@ -217,20 +217,20 @@ class TaskView : public KListView
KarmStorage * _storage;
private:
- void contentsMousePressEvent ( QMouseEvent * e );
- void contentsMouseDoubleClickEvent ( QMouseEvent * e );
+ void contentsMousePressEvent ( TQMouseEvent * e );
+ void contentsMouseDoubleClickEvent ( TQMouseEvent * e );
void updateParents( Task* task, long totalDiff, long sesssionDiff);
void deleteChildTasks( Task *item );
void addTimeToActiveTasks( int minutes, bool save_data = true );
/** item state stores if a task is expanded so you can see the subtasks */
- void restoreItemState( QListViewItem *item );
+ void restoreItemState( TQListViewItem *item );
protected slots:
void autoSaveChanged( bool );
void autoSavePeriodChanged( int period );
void minuteUpdate();
/** item state stores if a task is expanded so you can see the subtasks */
- void itemStateChanged( QListViewItem *item );
+ void itemStateChanged( TQListViewItem *item );
/** React on another process having modified the iCal file we rely on. */
void iCalFileModified(ResourceCalendar *);
};
diff --git a/karm/taskviewwhatsthis.cpp b/karm/taskviewwhatsthis.cpp
index 9beb163df..72d640e9d 100644
--- a/karm/taskviewwhatsthis.cpp
+++ b/karm/taskviewwhatsthis.cpp
@@ -2,7 +2,7 @@
// C++ Implementation: taskviewwhatsthis
//
// Description:
-// This is a subclass of QWhatsThis, specially adapted for karm's taskview.
+// This is a subclass of TQWhatsThis, specially adapted for karm's taskview.
//
// Author: Thorsten Staerk <thorsten@staerk.de>, (C) 2005
//
@@ -14,8 +14,8 @@
#include <klistview.h>
#include <klocale.h>
-TaskViewWhatsThis::TaskViewWhatsThis( QWidget* qw )
- : QWhatsThis( qw )
+TaskViewWhatsThis::TaskViewWhatsThis( TQWidget* qw )
+ : TQWhatsThis( qw )
{
_listView=(KListView *) qw;
}
@@ -24,9 +24,9 @@ TaskViewWhatsThis::~TaskViewWhatsThis()
{
}
-QString TaskViewWhatsThis::text ( const QPoint & pos )
+TQString TaskViewWhatsThis::text ( const TQPoint & pos )
{
- QString desc = QString::null;
+ TQString desc = TQString::null;
kdDebug(5970) << "entering TaskViewWhatsThis::text" << endl;
kdDebug(5970) << "x-pos:" << pos.x() << endl;
if ( pos.x() < _listView->columnWidth( 0 ) )
diff --git a/karm/taskviewwhatsthis.h b/karm/taskviewwhatsthis.h
index af8a82969..65f40f9f5 100644
--- a/karm/taskviewwhatsthis.h
+++ b/karm/taskviewwhatsthis.h
@@ -10,7 +10,7 @@
#ifndef TASKVIEWWHATSTHIS_H
#define TASKVIEWWHATSTHIS_H
-#include <qwhatsthis.h>
+#include <tqwhatsthis.h>
#include <klistview.h>
/**
@@ -21,10 +21,10 @@ this is the karm-taskview-specific implementation of qwhatsthis
class TaskViewWhatsThis : public QWhatsThis
{
public:
- TaskViewWhatsThis( QWidget* );
+ TaskViewWhatsThis( TQWidget* );
~TaskViewWhatsThis();
- QString text ( const QPoint & );
+ TQString text ( const TQPoint & );
private:
KListView* _listView; // stores the associated listview for column widths
diff --git a/karm/test/lockerthread.cpp b/karm/test/lockerthread.cpp
index 6ec6e7ba2..914682210 100644
--- a/karm/test/lockerthread.cpp
+++ b/karm/test/lockerthread.cpp
@@ -1,5 +1,5 @@
-#include <qthread.h>
-#include <qstring.h>
+#include <tqthread.h>
+#include <tqstring.h>
#include <resourcecalendar.h>
#include <resourcelocal.h>
@@ -7,14 +7,14 @@
#include "lockerthread.h"
-LockerThread::LockerThread( const QString &icsfile )
+LockerThread::LockerThread( const TQString &icsfile )
{
m_gotlock = false;
m_icsfile = icsfile;
}
/*
-void LockerThread::setIcsFile( const QString &filename )
+void LockerThread::setIcsFile( const TQString &filename )
{
m_icsfile = filename;
}
@@ -26,7 +26,7 @@ void LockerThread::run()
KCal::ResourceCalendar *calendar = 0;
KCal::CalendarResources::Ticket *lock = 0;
- calendars = new KCal::CalendarResources( QString::fromLatin1( "UTC" ) );
+ calendars = new KCal::CalendarResources( TQString::fromLatin1( "UTC" ) );
calendar = new KCal::ResourceLocal( m_icsfile );
lock = calendars->requestSaveTicket( calendar );
if ( lock )
diff --git a/karm/test/lockerthread.h b/karm/test/lockerthread.h
index d40f234ad..95915b478 100644
--- a/karm/test/lockerthread.h
+++ b/karm/test/lockerthread.h
@@ -1,4 +1,4 @@
-#include <qthread.h>
+#include <tqthread.h>
class QString;
@@ -10,12 +10,12 @@ class QString;
class LockerThread : public QThread
{
public:
- LockerThread( const QString &filename );
- //void setIcsFile( const QString &filename );
+ LockerThread( const TQString &filename );
+ //void setIcsFile( const TQString &filename );
void run();
bool gotlock() const { return m_gotlock; };
private:
- QString m_icsfile;
+ TQString m_icsfile;
bool m_gotlock;
};
diff --git a/karm/test/locking.cpp b/karm/test/locking.cpp
index 49c7637d3..940a344d1 100644
--- a/karm/test/locking.cpp
+++ b/karm/test/locking.cpp
@@ -1,8 +1,8 @@
#include <assert.h>
-#include <qstring.h>
-#include <qfile.h>
-#include <qdir.h>
+#include <tqstring.h>
+#include <tqfile.h>
+#include <tqdir.h>
#include <kcmdlineargs.h>
#include <kapplication.h>
@@ -12,7 +12,7 @@
#include "lockerthread.h"
-const QString icalfilename = "karmtest.ics";
+const TQString icalfilename = "karmtest.ics";
// If one thread has the file is locked, the other cannot get the lock.
short test1()
@@ -23,7 +23,7 @@ short test1()
KCal::ResourceCalendar *calendar = 0;
KCal::CalendarResources::Ticket *lock = 0;
- calendars = new KCal::CalendarResources( QString::fromLatin1( "UTC" ) );
+ calendars = new KCal::CalendarResources( TQString::fromLatin1( "UTC" ) );
calendar = new KCal::ResourceLocal( icalfilename );
lock = calendars->requestSaveTicket( calendar );
@@ -62,7 +62,7 @@ short test2()
KCal::ResourceCalendar *calendar = 0;
KCal::CalendarResources::Ticket *lock = 0;
- calendars = new KCal::CalendarResources( QString::fromLatin1( "UTC" ) );
+ calendars = new KCal::CalendarResources( TQString::fromLatin1( "UTC" ) );
calendar = new KCal::ResourceLocal( icalfilename );
LockerThread thread( icalfilename );
@@ -88,7 +88,7 @@ short test3()
KCal::ResourceCalendar *calendar = 0;
KCal::CalendarResources::Ticket *lock = 0;
- calendars = new KCal::CalendarResources( QString::fromLatin1( "UTC" ) );
+ calendars = new KCal::CalendarResources( TQString::fromLatin1( "UTC" ) );
calendar = new KCal::ResourceLocal( icalfilename );
// lock then unlock
@@ -130,7 +130,7 @@ int main( int argc, char *argv[] )
// Use another directory than the real one, just to keep things clean
// KDEHOME needs to be writable though, for a ksycoca database
// FIXME: Delete this directory when done with test.
- setenv( "KDEHOME", QFile::encodeName( QDir::homeDirPath() + "/.kde-testresource" ), true );
+ setenv( "KDEHOME", TQFile::encodeName( TQDir::homeDirPath() + "/.kde-testresource" ), true );
// Copied from Till's test in libkcal. Not sure what this is for.
setenv( "KDE_FORK_SLAVES", "yes", true ); // simpler, for the final cleanup
diff --git a/karm/test/runscripts.cpp b/karm/test/runscripts.cpp
index aa5449541..1b44f4821 100644
--- a/karm/test/runscripts.cpp
+++ b/karm/test/runscripts.cpp
@@ -18,32 +18,32 @@
*/
#include <kdebug.h>
-#include <qdir.h>
-#include <qfile.h>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qtextstream.h>
+#include <tqdir.h>
+#include <tqfile.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqtextstream.h>
#include "script.h"
-static QString srcdir();
+static TQString srcdir();
static int runscripts
-( const QString &interpreter, const QString &extension, const QString &path );
+( const TQString &interpreter, const TQString &extension, const TQString &path );
-const QString dots = "..................................................";
-const QString not_a_test_filename_prefix = "__";
+const TQString dots = "..................................................";
+const TQString not_a_test_filename_prefix = "__";
// Read srcdir from Makefile (for builddir != srcdir).
-QString srcdir()
+TQString srcdir()
{
bool found = false;
- QString dir;
+ TQString dir;
- QFile file( "Makefile" );
+ TQFile file( "Makefile" );
if ( !file.open( IO_ReadOnly | IO_Translate ) ) return "";
- QTextStream in( &file );
- QString line;
+ TQTextStream in( &file );
+ TQString line;
while ( !found && !in.atEnd() )
{
line = in.readLine();
@@ -60,29 +60,29 @@ QString srcdir()
}
int runscripts
-( const QString &interpreter, const QString &extension, const QString &path )
+( const TQString &interpreter, const TQString &extension, const TQString &path )
{
int rval = 0;
int oneBadApple = 0;
- QStringList files;
+ TQStringList files;
- QDir dir( path );
+ TQDir dir( path );
Script* s = new Script( dir );
dir.setNameFilter( extension );
- dir.setFilter( QDir::Files );
- dir.setSorting( QDir::Name | QDir::IgnoreCase );
+ dir.setFilter( TQDir::Files );
+ dir.setSorting( TQDir::Name | TQDir::IgnoreCase );
const QFileInfoList *list = dir.entryInfoList();
QFileInfoListIterator it( *list );
- QFileInfo *fi;
+ TQFileInfo *fi;
while ( !rval && ( fi = it.current() ) != 0 )
{
// Don't run scripts that are shared routines.
if ( ! fi->fileName().startsWith( not_a_test_filename_prefix ) )
{
s->addArgument( interpreter );
- s->addArgument( path + QDir::separator() + fi->fileName().latin1() );
+ s->addArgument( path + TQDir::separator() + fi->fileName().latin1() );
// Thorsten's xautomation tests run with user interaction by default.
if ( interpreter == "sh" ) s->addArgument( "--batch" );
@@ -116,7 +116,7 @@ int main( int, char** )
{
int rval = 0;
- QString path = srcdir();
+ TQString path = srcdir();
if ( !rval ) rval = runscripts( "python", "*.py *.Py *.PY *.pY", path );
diff --git a/karm/test/script.cpp b/karm/test/script.cpp
index 37fe058d3..f9fa9d9e0 100644
--- a/karm/test/script.cpp
+++ b/karm/test/script.cpp
@@ -17,11 +17,11 @@
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
-#include <qdir.h>
-#include <qprocess.h>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qtimer.h>
+#include <tqdir.h>
+#include <tqprocess.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqtimer.h>
#include <kdebug.h>
@@ -38,23 +38,23 @@
// kill() doesn't let script interpreter try to clean up.
const int NICE_KILL_TIMEOUT_IN_SECS = 5;
-Script::Script( const QDir& workingDirectory )
+Script::Script( const TQDir& workingDirectory )
{
m_status = 0;
m_stderr = false;
m_timeoutInSeconds = 5;
- m_proc = new QProcess( this );
+ m_proc = new TQProcess( this );
m_proc->setWorkingDirectory( workingDirectory );
- connect ( m_proc, SIGNAL( readyReadStdout() ),
- this , SLOT ( stdout() )
+ connect ( m_proc, TQT_SIGNAL( readyReadStdout() ),
+ this , TQT_SLOT ( stdout() )
);
- connect ( m_proc, SIGNAL( readyReadStderr() ),
- this , SLOT ( stderr() )
+ connect ( m_proc, TQT_SIGNAL( readyReadStderr() ),
+ this , TQT_SLOT ( stderr() )
);
- connect ( m_proc, SIGNAL( processExited() ),
- this , SLOT ( exit() )
+ connect ( m_proc, TQT_SIGNAL( processExited() ),
+ this , TQT_SLOT ( exit() )
);
}
@@ -64,7 +64,7 @@ Script::~Script()
m_proc = 0;
}
-void Script::addArgument( const QString &arg )
+void Script::addArgument( const TQString &arg )
{
m_proc->addArgument( arg );
}
@@ -79,7 +79,7 @@ int Script::run()
{
m_proc->start();
// This didn't work. But Ctrl-C does. :P
- //QTimer::singleShot( m_timeoutInSeconds * 1000, m_proc, SLOT( kill() ) );
+ //TQTimer::singleShot( m_timeoutInSeconds * 1000, m_proc, TQT_SLOT( kill() ) );
//while ( ! m_proc->normalExit() );
while ( m_proc->isRunning() );
return m_status;
@@ -89,7 +89,7 @@ void Script::terminate()
{
// These both trigger processExited, so exit() will run.
m_proc->tryTerminate();
- QTimer::singleShot( NICE_KILL_TIMEOUT_IN_SECS*1000, m_proc, SLOT( kill() ) );
+ TQTimer::singleShot( NICE_KILL_TIMEOUT_IN_SECS*1000, m_proc, TQT_SLOT( kill() ) );
}
void Script::exit()
@@ -103,13 +103,13 @@ void Script::stderr()
{
// Treat any output to std err as a script failure
m_status = 1;
- QString data = QString( m_proc->readStderr() );
+ TQString data = TQString( m_proc->readStderr() );
m_stderr= true;
}
void Script::stdout()
{
- QString data = QString( m_proc->readStdout() );
+ TQString data = TQString( m_proc->readStdout() );
}
#include "script.moc"
diff --git a/karm/test/script.h b/karm/test/script.h
index f5ae1e227..318d2872b 100644
--- a/karm/test/script.h
+++ b/karm/test/script.h
@@ -20,8 +20,8 @@
#ifndef _script_h_
#define _script_h_
-//#include <qvariant.h>
-#include <qobject.h>
+//#include <tqvariant.h>
+#include <tqobject.h>
class QDir;
class QProcess;
@@ -32,9 +32,9 @@ class Script : public QObject
{
Q_OBJECT
public:
- Script( const QDir& workingDirectory );
+ Script( const TQDir& workingDirectory );
virtual ~Script();
- void addArgument( const QString &arg );
+ void addArgument( const TQString &arg );
void setTimeout( int seconds );
int run();
private slots:
@@ -43,7 +43,7 @@ private slots:
void stdout();
void terminate();
private:
- QProcess *m_proc;
+ TQProcess *m_proc;
int m_status;
bool m_stderr;
int m_timeoutInSeconds;
diff --git a/karm/timekard.cpp b/karm/timekard.cpp
index b7ff21f0e..984baf741 100644
--- a/karm/timekard.cpp
+++ b/karm/timekard.cpp
@@ -22,10 +22,10 @@
// #include <iostream>
-#include <qdatetime.h>
-#include <qpaintdevicemetrics.h>
-#include <qpainter.h>
-#include <qmap.h>
+#include <tqdatetime.h>
+#include <tqpaintdevicemetrics.h>
+#include <tqpainter.h>
+#include <tqmap.h>
#include <kglobal.h>
#include <kdebug.h>
@@ -43,15 +43,15 @@ const int timeWidth = 6;
const int totalTimeWidth = 7;
const int reportWidth = taskWidth + timeWidth;
-const QString cr = QString::fromLatin1("\n");
+const TQString cr = TQString::fromLatin1("\n");
-QString TimeKard::totalsAsText(TaskView* taskview, bool justThisTask, WhichTime which)
+TQString TimeKard::totalsAsText(TaskView* taskview, bool justThisTask, WhichTime which)
// Print the total Times as text. If justThisTask, use activeTask, else, all tasks
{
kdDebug(5970) << "Entering TimeKard::totalsAsText" << endl;
- QString retval;
- QString line;
- QString buf;
+ TQString retval;
+ TQString line;
+ TQString buf;
long sum;
line.fill('-', reportWidth);
@@ -59,9 +59,9 @@ QString TimeKard::totalsAsText(TaskView* taskview, bool justThisTask, WhichTime
// header
retval += i18n("Task Totals") + cr;
- retval += KGlobal::locale()->formatDateTime(QDateTime::currentDateTime());
+ retval += KGlobal::locale()->formatDateTime(TQDateTime::currentDateTime());
retval += cr + cr;
- retval += QString(QString::fromLatin1("%1 %2"))
+ retval += TQString(TQString::fromLatin1("%1 %2"))
.arg(i18n("Time"), timeWidth)
.arg(i18n("Task"));
retval += cr;
@@ -92,8 +92,8 @@ QString TimeKard::totalsAsText(TaskView* taskview, bool justThisTask, WhichTime
// total
buf.fill('-', reportWidth);
- retval += QString(QString::fromLatin1("%1")).arg(buf, timeWidth) + cr;
- retval += QString(QString::fromLatin1("%1 %2"))
+ retval += TQString(TQString::fromLatin1("%1")).arg(buf, timeWidth) + cr;
+ retval += TQString(TQString::fromLatin1("%1 %2"))
.arg(formatTime(sum),timeWidth)
.arg(i18n("Total"));
}
@@ -104,12 +104,12 @@ QString TimeKard::totalsAsText(TaskView* taskview, bool justThisTask, WhichTime
}
// Print out "<indent for level> <task total> <task>", for task and subtasks. Used by totalsAsText.
-void TimeKard::printTask(Task *task, QString &s, int level, WhichTime which)
+void TimeKard::printTask(Task *task, TQString &s, int level, WhichTime which)
{
- QString buf;
+ TQString buf;
s += buf.fill(' ', level);
- s += QString(QString::fromLatin1("%1 %2"))
+ s += TQString(TQString::fromLatin1("%1 %2"))
.arg(formatTime(which == TotalTime?task->totalTime():task->totalSessionTime()), timeWidth)
.arg(task->name());
s += cr;
@@ -125,17 +125,17 @@ void TimeKard::printTask(Task *task, QString &s, int level, WhichTime which)
}
void TimeKard::printTaskHistory(const Task *task,
- const QMap<QString,long>& taskdaytotals,
- QMap<QString,long>& daytotals,
- const QDate& from,
- const QDate& to,
- const int level, QString& s, bool totalsOnly)
+ const TQMap<TQString,long>& taskdaytotals,
+ TQMap<TQString,long>& daytotals,
+ const TQDate& from,
+ const TQDate& to,
+ const int level, TQString& s, bool totalsOnly)
{
long sectionsum = 0;
- for ( QDate day = from; day <= to; day = day.addDays(1) )
+ for ( TQDate day = from; day <= to; day = day.addDays(1) )
{
- QString daykey = day.toString(QString::fromLatin1("yyyyMMdd"));
- QString daytaskkey = QString::fromLatin1("%1_%2")
+ TQString daykey = day.toString(TQString::fromLatin1("yyyyMMdd"));
+ TQString daytaskkey = TQString::fromLatin1("%1_%2")
.arg(daykey)
.arg(task->uid());
@@ -143,7 +143,7 @@ void TimeKard::printTaskHistory(const Task *task,
{
if ( !totalsOnly )
{
- s += QString::fromLatin1("%1")
+ s += TQString::fromLatin1("%1")
.arg(formatTime(taskdaytotals[daytaskkey]/60), timeWidth);
}
sectionsum += taskdaytotals[daytaskkey]; // in seconds
@@ -155,19 +155,19 @@ void TimeKard::printTaskHistory(const Task *task,
}
else if ( !totalsOnly )
{
- QString buf;
+ TQString buf;
buf.fill(' ', timeWidth);
s += buf;
}
}
// Total for task this section (e.g. week)
- s += QString::fromLatin1("%1").arg(formatTime(sectionsum/60), totalTimeWidth);
+ s += TQString::fromLatin1("%1").arg(formatTime(sectionsum/60), totalTimeWidth);
// Task name
- QString buf;
+ TQString buf;
s += buf.fill(' ', level + 1);
- s += QString::fromLatin1("%1").arg(task->name());
+ s += TQString::fromLatin1("%1").arg(task->name());
s += cr;
for (Task* subTask = task->firstChild();
@@ -179,21 +179,21 @@ void TimeKard::printTaskHistory(const Task *task,
}
}
-QString TimeKard::sectionHistoryAsText(
+TQString TimeKard::sectionHistoryAsText(
TaskView* taskview,
- const QDate& sectionFrom, const QDate& sectionTo,
- const QDate& from, const QDate& to,
- const QString& name,
+ const TQDate& sectionFrom, const TQDate& sectionTo,
+ const TQDate& from, const TQDate& to,
+ const TQString& name,
bool justThisTask, bool totalsOnly)
{
const int sectionReportWidth = taskWidth + ( totalsOnly ? 0 : sectionFrom.daysTo(sectionTo) * timeWidth ) + totalTimeWidth;
assert( sectionReportWidth > 0 );
- QString line;
+ TQString line;
line.fill('-', sectionReportWidth);
line += cr;
- QValueList<HistoryEvent> events;
+ TQValueList<HistoryEvent> events;
if ( sectionFrom < from && sectionTo > to)
{
events = taskview->getHistory(from, to);
@@ -211,18 +211,18 @@ QString TimeKard::sectionHistoryAsText(
events = taskview->getHistory(sectionFrom, sectionTo);
}
- QMap<QString, long> taskdaytotals;
- QMap<QString, long> daytotals;
+ TQMap<TQString, long> taskdaytotals;
+ TQMap<TQString, long> daytotals;
// Build lookup dictionary used to output data in table cells. keys are
// in this format: YYYYMMDD_NNNNNN, where Y = year, M = month, d = day and
// NNNNN = the VTODO uid. The value is the total seconds logged against
// that task on that day. Note the UID is the todo id, not the event id,
// so times are accumulated for each task.
- for (QValueList<HistoryEvent>::iterator event = events.begin(); event != events.end(); ++event)
+ for (TQValueList<HistoryEvent>::iterator event = events.begin(); event != events.end(); ++event)
{
- QString daykey = (*event).start().date().toString(QString::fromLatin1("yyyyMMdd"));
- QString daytaskkey = QString::fromLatin1("%1_%2")
+ TQString daykey = (*event).start().date().toString(TQString::fromLatin1("yyyyMMdd"));
+ TQString daytaskkey = TQString::fromLatin1("%1_%2")
.arg(daykey)
.arg((*event).todoUid());
@@ -233,10 +233,10 @@ QString TimeKard::sectionHistoryAsText(
taskdaytotals.insert(daytaskkey, (*event).duration());
}
- QString retval;
+ TQString retval;
// section name (e.g. week name)
retval += cr + cr;
- QString buf;
+ TQString buf;
if ( name.length() < (unsigned int)sectionReportWidth )
buf.fill(' ', int((sectionReportWidth - name.length()) / 2));
retval += buf + name + cr;
@@ -244,9 +244,9 @@ QString TimeKard::sectionHistoryAsText(
if ( !totalsOnly )
{
// day headings
- for (QDate day = sectionFrom; day <= sectionTo; day = day.addDays(1))
+ for (TQDate day = sectionFrom; day <= sectionTo; day = day.addDays(1))
{
- retval += QString::fromLatin1("%1").arg(day.day(), timeWidth);
+ retval += TQString::fromLatin1("%1").arg(day.day(), timeWidth);
}
retval += cr;
retval += line;
@@ -278,15 +278,15 @@ QString TimeKard::sectionHistoryAsText(
// per-day totals at the bottom of the section
long sum = 0;
- for (QDate day = sectionFrom; day <= sectionTo; day = day.addDays(1))
+ for (TQDate day = sectionFrom; day <= sectionTo; day = day.addDays(1))
{
- QString daykey = day.toString(QString::fromLatin1("yyyyMMdd"));
+ TQString daykey = day.toString(TQString::fromLatin1("yyyyMMdd"));
if (daytotals.contains(daykey))
{
if ( !totalsOnly )
{
- retval += QString::fromLatin1("%1")
+ retval += TQString::fromLatin1("%1")
.arg(formatTime(daytotals[daykey]/60), timeWidth);
}
sum += daytotals[daykey]; // in seconds
@@ -298,18 +298,18 @@ QString TimeKard::sectionHistoryAsText(
}
}
- retval += QString::fromLatin1("%1 %2")
+ retval += TQString::fromLatin1("%1 %2")
.arg(formatTime(sum/60), totalTimeWidth)
.arg(i18n("Total"));
}
return retval;
}
-QString TimeKard::historyAsText(TaskView* taskview, const QDate& from,
- const QDate& to, bool justThisTask, bool perWeek, bool totalsOnly)
+TQString TimeKard::historyAsText(TaskView* taskview, const TQDate& from,
+ const TQDate& to, bool justThisTask, bool perWeek, bool totalsOnly)
{
// header
- QString retval;
+ TQString retval;
retval += totalsOnly ? i18n("Task Totals") : i18n("Task History");
retval += cr;
retval += i18n("From %1 to %2")
@@ -317,13 +317,13 @@ QString TimeKard::historyAsText(TaskView* taskview, const QDate& from,
.arg(KGlobal::locale()->formatDate(to));
retval += cr;
retval += i18n("Printed on: %1")
- .arg(KGlobal::locale()->formatDateTime(QDateTime::currentDateTime()));
+ .arg(KGlobal::locale()->formatDateTime(TQDateTime::currentDateTime()));
if ( perWeek )
{
// output one time card table for each week in the date range
- QValueList<Week> weeks = Week::weeksFromDateRange(from, to);
- for (QValueList<Week>::iterator week = weeks.begin(); week != weeks.end(); ++week)
+ TQValueList<Week> weeks = Week::weeksFromDateRange(from, to);
+ for (TQValueList<Week>::iterator week = weeks.begin(); week != weeks.end(); ++week)
{
retval += sectionHistoryAsText( taskview, (*week).start(), (*week).end(), from, to, (*week).name(), justThisTask, totalsOnly );
}
@@ -336,37 +336,37 @@ QString TimeKard::historyAsText(TaskView* taskview, const QDate& from,
Week::Week() {}
-Week::Week(QDate from)
+Week::Week(TQDate from)
{
_start = from;
}
-QDate Week::start() const
+TQDate Week::start() const
{
return _start;
}
-QDate Week::end() const
+TQDate Week::end() const
{
return _start.addDays(6);
}
-QString Week::name() const
+TQString Week::name() const
{
return i18n("Week of %1").arg(KGlobal::locale()->formatDate(start()));
}
-QValueList<Week> Week::weeksFromDateRange(const QDate& from, const QDate& to)
+TQValueList<Week> Week::weeksFromDateRange(const TQDate& from, const TQDate& to)
{
- QDate start;
- QValueList<Week> weeks;
+ TQDate start;
+ TQValueList<Week> weeks;
- // The QDate weekNumber() method always puts monday as the first day of the
+ // The TQDate weekNumber() method always puts monday as the first day of the
// week.
//
// Not that it matters here, but week 1 always includes the first Thursday
// of the year. For example, January 1, 2000 was a Saturday, so
- // QDate(2000,1,1).weekNumber() returns 52.
+ // TQDate(2000,1,1).weekNumber() returns 52.
// Since report always shows a full week, we generate a full week of dates,
// even if from and to are the same date. The week starts on the day
@@ -374,7 +374,7 @@ QValueList<Week> Week::weeksFromDateRange(const QDate& from, const QDate& to)
start = from.addDays(
-((7 - KGlobal::locale()->weekStartDay() + from.dayOfWeek()) % 7));
- for (QDate d = start; d <= to; d = d.addDays(7))
+ for (TQDate d = start; d <= to; d = d.addDays(7))
weeks.append(Week(d));
return weeks;
diff --git a/karm/timekard.h b/karm/timekard.h
index f47129fda..df0bd3285 100644
--- a/karm/timekard.h
+++ b/karm/timekard.h
@@ -46,12 +46,12 @@ class TaskView;
class Week
{
public:
- /** Need an empty constructor to use in a QValueList. */
+ /** Need an empty constructor to use in a TQValueList. */
Week();
- Week(QDate from);
- QDate start() const;
- QDate end() const;
- QValueList<QDate> days() const;
+ Week(TQDate from);
+ TQDate start() const;
+ TQDate end() const;
+ TQValueList<TQDate> days() const;
/**
* Returns a list of weeks for the given date range.
@@ -63,8 +63,8 @@ class Week
* days, one being a Sunday and the other being a Monday, you will get two
* weeks back in the list.
*/
- static QValueList<Week> weeksFromDateRange(const QDate& from,
- const QDate& to);
+ static TQValueList<Week> weeksFromDateRange(const TQDate& from,
+ const TQDate& to);
/**
* Return the name of the week.
@@ -72,11 +72,11 @@ class Week
* Uses whatever the user has set up for the long date format in
* KControlPanel, prefixed by "Week of".
*/
- QString name() const;
+ TQString name() const;
private:
- QDate _start;
+ TQDate _start;
};
/**
@@ -101,28 +101,28 @@ class TimeKard
* print the task subtree for a root task and when they want to print
* all tasks.
*/
- QString totalsAsText(TaskView* taskview, bool justThisTask, WhichTime which);
+ TQString totalsAsText(TaskView* taskview, bool justThisTask, WhichTime which);
/**
* Generates ascii text of weekly task history, for current task on down.
*
* Formatted for pasting into clipboard.
*/
- QString historyAsText(TaskView* taskview, const QDate& from,
- const QDate& to, bool justThisTask, bool perWeek, bool totalsOnly);
+ TQString historyAsText(TaskView* taskview, const TQDate& from,
+ const TQDate& to, bool justThisTask, bool perWeek, bool totalsOnly);
private:
- void printTask(Task *t, QString &s, int level, WhichTime which);
+ void printTask(Task *t, TQString &s, int level, WhichTime which);
- void printTaskHistory(const Task *t, const QMap<QString, long>& datamap,
- QMap<QString, long>& daytotals,
- const QDate& from, const QDate& to,
- const int level, QString& retval, bool totalsOnly);
+ void printTaskHistory(const Task *t, const TQMap<TQString, long>& datamap,
+ TQMap<TQString, long>& daytotals,
+ const TQDate& from, const TQDate& to,
+ const int level, TQString& retval, bool totalsOnly);
- QString sectionHistoryAsText(TaskView* taskview,
- const QDate& sectionFrom, const QDate& sectionTo,
- const QDate& from, const QDate& to,
- const QString& name,
+ TQString sectionHistoryAsText(TaskView* taskview,
+ const TQDate& sectionFrom, const TQDate& sectionTo,
+ const TQDate& from, const TQDate& to,
+ const TQString& name,
bool justThisTask, bool totalsOnly);
};
diff --git a/karm/tray.cpp b/karm/tray.cpp
index 228d807d8..ac820abbb 100644
--- a/karm/tray.cpp
+++ b/karm/tray.cpp
@@ -8,13 +8,13 @@
*/
-// #include <qkeycode.h>
-// #include <qlayout.h>
-#include <qpixmap.h>
-#include <qptrlist.h>
-#include <qstring.h>
-#include <qtimer.h>
-#include <qtooltip.h>
+// #include <tqkeycode.h>
+// #include <tqlayout.h>
+#include <tqpixmap.h>
+#include <tqptrlist.h>
+#include <tqstring.h>
+#include <tqtimer.h>
+#include <tqtooltip.h>
#include <kaction.h> // actionPreferences()
#include <kglobal.h>
@@ -28,21 +28,21 @@
#include "task.h"
#include "tray.h"
-QPtrVector<QPixmap> *KarmTray::icons = 0;
+TQPtrVector<TQPixmap> *KarmTray::icons = 0;
KarmTray::KarmTray(MainWindow* parent)
: KSystemTray(parent, "Karm Tray")
{
// the timer that updates the "running" icon in the tray
- _taskActiveTimer = new QTimer(this);
- connect( _taskActiveTimer, SIGNAL( timeout() ), this,
- SLOT( advanceClock()) );
+ _taskActiveTimer = new TQTimer(this);
+ connect( _taskActiveTimer, TQT_SIGNAL( timeout() ), this,
+ TQT_SLOT( advanceClock()) );
if (icons == 0) {
- icons = new QPtrVector<QPixmap>(8);
+ icons = new TQPtrVector<TQPixmap>(8);
for (int i=0; i<8; i++) {
- QPixmap *icon = new QPixmap();
- QString name;
+ TQPixmap *icon = new TQPixmap();
+ TQString name;
name.sprintf("active-icon-%d.xpm",i);
*icon = UserIcon(name);
icons->insert(i,icon);
@@ -66,7 +66,7 @@ KarmTray::KarmTray(MainWindow* parent)
// experimenting with menus for the tray
/*
trayPopupMenu = contextMenu();
- trayPopupMenu2 = new QPopupMenu();
+ trayPopupMenu2 = new TQPopupMenu();
trayPopupMenu->insertItem(i18n("Submenu"), *trayPopupMenu2);
*/
}
@@ -85,7 +85,7 @@ KarmTray::~KarmTray()
// experiment
/*
-void KarmTray::insertTitle(QString title)
+void KarmTray::insertTitle(TQString title)
{
trayPopupMenu->insertTitle(title);
}
@@ -125,29 +125,29 @@ void KarmTray::resetClock()
void KarmTray::initToolTip()
{
- updateToolTip(QPtrList<Task> ());
+ updateToolTip(TQPtrList<Task> ());
}
-void KarmTray::updateToolTip(QPtrList<Task> activeTasks)
+void KarmTray::updateToolTip(TQPtrList<Task> activeTasks)
{
if ( activeTasks.isEmpty() ) {
- QToolTip::add( this, i18n("No active tasks") );
+ TQToolTip::add( this, i18n("No active tasks") );
return;
}
- QFontMetrics fm( QToolTip::font() );
- const QString continued = i18n( ", ..." );
+ TQFontMetrics fm( TQToolTip::font() );
+ const TQString continued = i18n( ", ..." );
const int buffer = fm.boundingRect( continued ).width();
const int desktopWidth = KGlobalSettings::desktopGeometry(this).width();
const int maxWidth = desktopWidth - buffer;
- QString qTip;
- QString s;
+ TQString qTip;
+ TQString s;
// Build the tool tip with all of the names of the active tasks.
// If at any time the width of the tool tip is larger than the desktop,
// stop building it.
- QPtrListIterator<Task> item( activeTasks );
+ TQPtrListIterator<Task> item( activeTasks );
for ( int i = 0; item.current(); ++item, ++i ) {
Task* task = item.current();
if ( i > 0 )
@@ -162,7 +162,7 @@ void KarmTray::updateToolTip(QPtrList<Task> activeTasks)
qTip = s;
}
- QToolTip::add( this, qTip );
+ TQToolTip::add( this, qTip );
}
#include "tray.moc"
diff --git a/karm/tray.h b/karm/tray.h
index 34701cff4..6868e060b 100644
--- a/karm/tray.h
+++ b/karm/tray.h
@@ -1,9 +1,9 @@
#ifndef KARM_TRAY_H
#define KARM_TRAY_H
-#include <qptrvector.h>
-#include <qpixmap.h>
-#include <qptrlist.h>
+#include <tqptrvector.h>
+#include <tqpixmap.h>
+#include <tqptrlist.h>
// experiement
// #include <kpopupmenu.h>
#include <ksystemtray.h>
@@ -32,14 +32,14 @@ class KarmTray : public KSystemTray
private:
int _activeIcon;
- static QPtrVector<QPixmap> *icons;
- QTimer *_taskActiveTimer;
+ static TQPtrVector<TQPixmap> *icons;
+ TQTimer *_taskActiveTimer;
public slots:
void startClock();
void stopClock();
void resetClock();
- void updateToolTip( QPtrList<Task> activeTasks);
+ void updateToolTip( TQPtrList<Task> activeTasks);
void initToolTip();
protected slots:
@@ -47,11 +47,11 @@ class KarmTray : public KSystemTray
// experiment
/*
- void insertTitle(QString title);
+ void insertTitle(TQString title);
private:
KPopupMenu *trayPopupMenu;
- QPopupMenu *trayPopupMenu2;
+ TQPopupMenu *trayPopupMenu2;
*/
};
diff --git a/kdgantt/KDGanttMinimizeSplitter.cpp b/kdgantt/KDGanttMinimizeSplitter.cpp
index 790b381ad..60908e8e8 100644
--- a/kdgantt/KDGanttMinimizeSplitter.cpp
+++ b/kdgantt/KDGanttMinimizeSplitter.cpp
@@ -34,24 +34,24 @@
#include "KDGanttMinimizeSplitter.h"
#ifndef QT_NO_SPLITTER
-#include "qpainter.h"
-#include "qdrawutil.h"
-#include "qbitmap.h"
+#include "tqpainter.h"
+#include "tqdrawutil.h"
+#include "tqbitmap.h"
#if QT_VERSION >= 300
-#include "qptrlist.h"
-#include "qmemarray.h"
+#include "tqptrlist.h"
+#include "tqmemarray.h"
#else
-#include <qlist.h>
-#include <qarray.h>
-#define QPtrList QList
-#define QMemArray QArray
+#include <tqlist.h>
+#include <tqarray.h>
+#define TQPtrList QList
+#define TQMemArray QArray
#endif
#include "qlayoutengine_p.h"
-#include "qobjectlist.h"
-#include "qstyle.h"
-#include "qapplication.h" //sendPostedEvents
-#include <qvaluelist.h>
-#include <qcursor.h>
+#include "tqobjectlist.h"
+#include "tqstyle.h"
+#include "tqapplication.h" //sendPostedEvents
+#include <tqvaluelist.h>
+#include <tqcursor.h>
#ifndef KDGANTT_MASTER_CVS
#include "KDGanttMinimizeSplitter.moc"
#endif
@@ -66,16 +66,16 @@ static int opaqueOldPos = -1; //### there's only one mouse, but this is a bit ri
KDGanttSplitterHandle::KDGanttSplitterHandle( Qt::Orientation o,
KDGanttMinimizeSplitter *parent, const char * name )
- : QWidget( parent, name ), _activeButton( 0 ), _collapsed( false )
+ : TQWidget( parent, name ), _activeButton( 0 ), _collapsed( false )
{
s = parent;
setOrientation(o);
setMouseTracking( true );
}
-QSize KDGanttSplitterHandle::sizeHint() const
+TQSize KDGanttSplitterHandle::sizeHint() const
{
- return QSize(8,8);
+ return TQSize(8,8);
}
void KDGanttSplitterHandle::setOrientation( Qt::Orientation o )
@@ -90,7 +90,7 @@ void KDGanttSplitterHandle::setOrientation( Qt::Orientation o )
}
-void KDGanttSplitterHandle::mouseMoveEvent( QMouseEvent *e )
+void KDGanttSplitterHandle::mouseMoveEvent( TQMouseEvent *e )
{
updateCursor( e->pos() );
if ( !(e->state()&LeftButton) )
@@ -111,7 +111,7 @@ void KDGanttSplitterHandle::mouseMoveEvent( QMouseEvent *e )
_collapsed = false;
}
-void KDGanttSplitterHandle::mousePressEvent( QMouseEvent *e )
+void KDGanttSplitterHandle::mousePressEvent( TQMouseEvent *e )
{
if ( e->button() == LeftButton ) {
_activeButton = onButton( e->pos() );
@@ -122,7 +122,7 @@ void KDGanttSplitterHandle::mousePressEvent( QMouseEvent *e )
}
}
-void KDGanttSplitterHandle::updateCursor( const QPoint& p)
+void KDGanttSplitterHandle::updateCursor( const TQPoint& p)
{
if ( onButton( p ) != 0 ) {
setCursor( arrowCursor );
@@ -136,7 +136,7 @@ void KDGanttSplitterHandle::updateCursor( const QPoint& p)
}
-void KDGanttSplitterHandle::mouseReleaseEvent( QMouseEvent *e )
+void KDGanttSplitterHandle::mouseReleaseEvent( TQMouseEvent *e )
{
if ( _activeButton != 0 ) {
if ( onButton( e->pos() ) == _activeButton )
@@ -153,7 +153,7 @@ void KDGanttSplitterHandle::mouseReleaseEvent( QMouseEvent *e )
pos = max;
}
- _origPos = s->pick(mapToParent( QPoint( 0,0 ) ));
+ _origPos = s->pick(mapToParent( TQPoint( 0,0 ) ));
s->moveSplitter( pos, id() );
_collapsed = true;
}
@@ -177,12 +177,12 @@ void KDGanttSplitterHandle::mouseReleaseEvent( QMouseEvent *e )
repaint();
}
-int KDGanttSplitterHandle::onButton( const QPoint& p )
+int KDGanttSplitterHandle::onButton( const TQPoint& p )
{
- QValueList<QPointArray> list = buttonRegions();
+ TQValueList<TQPointArray> list = buttonRegions();
int index = 1;
- for( QValueList<QPointArray>::Iterator it = list.begin(); it != list.end(); ++it ) {
- QRect rect = (*it).boundingRect();
+ for( TQValueList<TQPointArray>::Iterator it = list.begin(); it != list.end(); ++it ) {
+ TQRect rect = (*it).boundingRect();
rect.setLeft( rect.left()- 4 );
rect.setRight( rect.right() + 4);
rect.setTop( rect.top()- 4 );
@@ -196,14 +196,14 @@ int KDGanttSplitterHandle::onButton( const QPoint& p )
}
-QValueList<QPointArray> KDGanttSplitterHandle::buttonRegions()
+TQValueList<TQPointArray> KDGanttSplitterHandle::buttonRegions()
{
- QValueList<QPointArray> list;
+ TQValueList<TQPointArray> list;
int sw = 8;
int voffset[] = { (int) -sw*3, (int) sw*3 };
for ( int i = 0; i < 2; i++ ) {
- QPointArray arr;
+ TQPointArray arr;
if ( !_collapsed && s->minimizeDirection() == KDGanttMinimizeSplitter::Right ||
_collapsed && s->minimizeDirection() == KDGanttMinimizeSplitter::Left) {
int mid = height()/2 + voffset[i];
@@ -241,32 +241,32 @@ QValueList<QPointArray> KDGanttSplitterHandle::buttonRegions()
return list;
}
-void KDGanttSplitterHandle::paintEvent( QPaintEvent * )
+void KDGanttSplitterHandle::paintEvent( TQPaintEvent * )
{
- QPixmap buffer( size() );
- QPainter p( &buffer );
+ TQPixmap buffer( size() );
+ TQPainter p( &buffer );
// Draw the splitter rectangle
p.setBrush( colorGroup().background() );
p.setPen( colorGroup().foreground() );
p.drawRect( rect() );
- parentWidget()->style().drawPrimitive( QStyle::PE_Panel, &p, rect(),
+ parentWidget()->style().drawPrimitive( TQStyle::PE_Panel, &p, rect(),
parentWidget()->colorGroup());
int sw = 8; // Hardcoded, given I didn't use styles anymore, I didn't like to use their size
// arrow color
- QColor col = colorGroup().background().dark( 200 );
+ TQColor col = colorGroup().background().dark( 200 );
p.setBrush( col );
p.setPen( col );
- QValueList<QPointArray> list = buttonRegions();
+ TQValueList<TQPointArray> list = buttonRegions();
int index = 1;
- for ( QValueList<QPointArray>::Iterator it = list.begin(); it != list.end(); ++it ) {
+ for ( TQValueList<TQPointArray>::Iterator it = list.begin(); it != list.end(); ++it ) {
if ( index == _activeButton ) {
p.save();
- p.translate( parentWidget()->style().pixelMetric( QStyle::PM_ButtonShiftHorizontal ),
- parentWidget()->style().pixelMetric( QStyle::PM_ButtonShiftVertical ) );
+ p.translate( parentWidget()->style().pixelMetric( TQStyle::PM_ButtonShiftHorizontal ),
+ parentWidget()->style().pixelMetric( TQStyle::PM_ButtonShiftVertical ) );
p.drawPolygon( *it, true );
p.restore();
}
@@ -299,7 +299,7 @@ public:
KDGanttMinimizeSplitter::ResizeMode mode;
QCOORD sizer;
bool isSplitter;
- QWidget *wid;
+ TQWidget *wid;
};
class QSplitterData
@@ -307,12 +307,12 @@ class QSplitterData
public:
QSplitterData() : opaque( FALSE ), firstShow( TRUE ) {}
- QPtrList<QSplitterLayoutStruct> list;
+ TQPtrList<QSplitterLayoutStruct> list;
bool opaque;
bool firstShow;
};
-void kdganttGeomCalc( QMemArray<QLayoutStruct> &chain, int start, int count, int pos,
+void kdganttGeomCalc( TQMemArray<QLayoutStruct> &chain, int start, int count, int pos,
int space, int spacer );
#endif // DOXYGEN_SKIP_INTERNAL
@@ -323,8 +323,8 @@ void kdganttGeomCalc( QMemArray<QLayoutStruct> &chain, int start, int count, int
widget with minimize buttons.
This class (and its documentation) is largely a copy of Qt's
- QSplitter; the copying was necessary because QSplitter is not
- extensible at all. QSplitter and its documentation are licensed
+ QSplitter; the copying was necessary because TQSplitter is not
+ extensible at all. TQSplitter and its documentation are licensed
according to the GPL and the Qt Professional License (if you hold
such a license) and are (C) Trolltech AS.
@@ -332,18 +332,18 @@ void kdganttGeomCalc( QMemArray<QLayoutStruct> &chain, int start, int count, int
dragging the boundary between the children. Any number of widgets
may be controlled.
- To show a QListBox, a QListView and a QTextEdit side by side:
+ To show a TQListBox, a TQListView and a TQTextEdit side by side:
\code
KDGanttMinimizeSplitter *split = new KDGanttMinimizeSplitter( parent );
- QListBox *lb = new QListBox( split );
- QListView *lv = new QListView( split );
- QTextEdit *ed = new QTextEdit( split );
+ TQListBox *lb = new TQListBox( split );
+ TQListView *lv = new TQListView( split );
+ TQTextEdit *ed = new TQTextEdit( split );
\endcode
In KDGanttMinimizeSplitter, the boundary can be either horizontal or
vertical. The default is horizontal (the children are side by side)
- but you can use setOrientation( QSplitter::Vertical ) to set it to
+ but you can use setOrientation( TQSplitter::Vertical ) to set it to
vertical.
Use setResizeMode() to specify
@@ -366,33 +366,33 @@ void kdganttGeomCalc( QMemArray<QLayoutStruct> &chain, int start, int count, int
-static QSize minSize( const QWidget* /*w*/ )
+static TQSize minSize( const TQWidget* /*w*/ )
{
- return QSize(0,0);
+ return TQSize(0,0);
}
// This is the original version of minSize
-static QSize minSizeHint( const QWidget* w )
+static TQSize minSizeHint( const TQWidget* w )
{
- QSize min = w->minimumSize();
- QSize s;
+ TQSize min = w->minimumSize();
+ TQSize s;
if ( min.height() <= 0 || min.width() <= 0 )
s = w->minimumSizeHint();
if ( min.height() > 0 )
s.setHeight( min.height() );
if ( min.width() > 0 )
s.setWidth( min.width() );
- return s.expandedTo(QSize(0,0));
+ return s.expandedTo(TQSize(0,0));
}
/*!
Constructs a horizontal splitter with the \a parent and \a
- name arguments being passed on to the QFrame constructor.
+ name arguments being passed on to the TQFrame constructor.
*/
-KDGanttMinimizeSplitter::KDGanttMinimizeSplitter( QWidget *parent, const char *name )
- :QFrame(parent,name,WPaintUnclipped)
+KDGanttMinimizeSplitter::KDGanttMinimizeSplitter( TQWidget *parent, const char *name )
+ :TQFrame(parent,name,WPaintUnclipped)
{
#if QT_VERSION >= 300
orient = Horizontal;
@@ -402,10 +402,10 @@ KDGanttMinimizeSplitter::KDGanttMinimizeSplitter( QWidget *parent, const char *n
/*!
Constructs a splitter with orientation \a o with the \a parent
- and \a name arguments being passed on to the QFrame constructor.
+ and \a name arguments being passed on to the TQFrame constructor.
*/
-KDGanttMinimizeSplitter::KDGanttMinimizeSplitter( Orientation o, QWidget *parent, const char *name )
- :QFrame(parent,name,WPaintUnclipped)
+KDGanttMinimizeSplitter::KDGanttMinimizeSplitter( Orientation o, TQWidget *parent, const char *name )
+ :TQFrame(parent,name,WPaintUnclipped)
{
#if QT_VERSION >= 300
orient = o;
@@ -430,9 +430,9 @@ void KDGanttMinimizeSplitter::init()
{
data = new QSplitterData;
if ( orient == Horizontal )
- setSizePolicy( QSizePolicy(QSizePolicy::Expanding,QSizePolicy::Minimum) );
+ setSizePolicy( TQSizePolicy(TQSizePolicy::Expanding,TQSizePolicy::Minimum) );
else
- setSizePolicy( QSizePolicy(QSizePolicy::Minimum,QSizePolicy::Expanding) );
+ setSizePolicy( TQSizePolicy(TQSizePolicy::Minimum,TQSizePolicy::Expanding) );
}
#endif
@@ -452,9 +452,9 @@ void KDGanttMinimizeSplitter::setOrientation( Orientation o )
orient = o;
if ( orient == Horizontal )
- setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Minimum ) );
+ setSizePolicy( TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Minimum ) );
else
- setSizePolicy( QSizePolicy( QSizePolicy::Minimum, QSizePolicy::Expanding ) );
+ setSizePolicy( TQSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Expanding ) );
QSplitterLayoutStruct *s = data->list.first();
while ( s ) {
@@ -471,7 +471,7 @@ void KDGanttMinimizeSplitter::setOrientation( Orientation o )
/*!
Reimplemented from superclass.
*/
-void KDGanttMinimizeSplitter::resizeEvent( QResizeEvent * )
+void KDGanttMinimizeSplitter::resizeEvent( TQResizeEvent * )
{
doResize();
}
@@ -486,14 +486,14 @@ void KDGanttMinimizeSplitter::resizeEvent( QResizeEvent * )
needed. (If \a first is TRUE, then recalcId is very probably
needed.)
*/
-QSplitterLayoutStruct *KDGanttMinimizeSplitter::addWidget( QWidget *w, bool first )
+QSplitterLayoutStruct *KDGanttMinimizeSplitter::addWidget( TQWidget *w, bool first )
{
QSplitterLayoutStruct *s;
KDGanttSplitterHandle *newHandle = 0;
if ( data->list.count() > 0 ) {
s = new QSplitterLayoutStruct;
s->mode = KeepSize;
- QString tmp = "qt_splithandle_";
+ TQString tmp = "qt_splithandle_";
tmp += w->name();
newHandle = new KDGanttSplitterHandle( orientation(), this, tmp.latin1() );
s->wid = newHandle;
@@ -527,13 +527,13 @@ QSplitterLayoutStruct *KDGanttMinimizeSplitter::addWidget( QWidget *w, bool firs
Tells the splitter that a child widget has been inserted or removed.
The event is passed in \a c.
*/
-void KDGanttMinimizeSplitter::childEvent( QChildEvent *c )
+void KDGanttMinimizeSplitter::childEvent( TQChildEvent *c )
{
- if ( c->type() == QEvent::ChildInserted ) {
+ if ( c->type() == TQEvent::ChildInserted ) {
if ( !c->child()->isWidgetType() )
return;
- if ( ((QWidget*)c->child())->testWFlags( WType_TopLevel ) )
+ if ( ((TQWidget*)c->child())->testWFlags( WType_TopLevel ) )
return;
QSplitterLayoutStruct *s = data->list.first();
@@ -542,10 +542,10 @@ void KDGanttMinimizeSplitter::childEvent( QChildEvent *c )
return;
s = data->list.next();
}
- addWidget( (QWidget*)c->child() );
+ addWidget( (TQWidget*)c->child() );
recalc( isVisible() );
- } else if ( c->type() == QEvent::ChildRemoved ) {
+ } else if ( c->type() == TQEvent::ChildRemoved ) {
QSplitterLayoutStruct *p = 0;
if ( data->list.count() > 1 )
p = data->list.at(1); //remove handle _after_ first widget.
@@ -576,13 +576,13 @@ void KDGanttMinimizeSplitter::childEvent( QChildEvent *c )
*/
void KDGanttMinimizeSplitter::setRubberband( int p )
{
- QPainter paint( this );
+ TQPainter paint( this );
paint.setPen( gray );
paint.setBrush( gray );
paint.setRasterOp( XorROP );
- QRect r = contentsRect();
+ TQRect r = contentsRect();
const int rBord = 3; //Themable????
- int sw = style().pixelMetric(QStyle::PM_SplitterWidth, this);
+ int sw = style().pixelMetric(TQStyle::PM_SplitterWidth, this);
if ( orient == Horizontal ) {
if ( opaqueOldPos >= 0 )
paint.drawRect( opaqueOldPos + sw/2 - rBord , r.y(),
@@ -601,14 +601,14 @@ void KDGanttMinimizeSplitter::setRubberband( int p )
/*! Reimplemented from superclass. */
-bool KDGanttMinimizeSplitter::event( QEvent *e )
+bool KDGanttMinimizeSplitter::event( TQEvent *e )
{
- if ( e->type() == QEvent::LayoutHint || ( e->type() == QEvent::Show && data->firstShow ) ) {
+ if ( e->type() == TQEvent::LayoutHint || ( e->type() == TQEvent::Show && data->firstShow ) ) {
recalc( isVisible() );
- if ( e->type() == QEvent::Show )
+ if ( e->type() == TQEvent::Show )
data->firstShow = FALSE;
}
- return QWidget::event( e );
+ return TQWidget::event( e );
}
@@ -617,14 +617,14 @@ bool KDGanttMinimizeSplitter::event( QEvent *e )
Draws the splitter handle in the rectangle described by \a x, \a y,
\a w, \a h using painter \a p.
- \sa QStyle::drawPrimitive()
+ \sa TQStyle::drawPrimitive()
*/
-void KDGanttMinimizeSplitter::drawSplitter( QPainter *p,
+void KDGanttMinimizeSplitter::drawSplitter( TQPainter *p,
QCOORD x, QCOORD y, QCOORD w, QCOORD h )
{
- style().drawPrimitive(QStyle::PE_Splitter, p, QRect(x, y, w, h), colorGroup(),
+ style().drawPrimitive(TQStyle::PE_Splitter, p, TQRect(x, y, w, h), colorGroup(),
(orientation() == Qt::Horizontal ?
- QStyle::Style_Horizontal : 0));
+ TQStyle::Style_Horizontal : 0));
}
@@ -633,7 +633,7 @@ void KDGanttMinimizeSplitter::drawSplitter( QPainter *p,
or 0 if there is no such splitter
(i.e. it is either not in this KDGanttMinimizeSplitter or it is at the end).
*/
-int KDGanttMinimizeSplitter::idAfter( QWidget* w ) const
+int KDGanttMinimizeSplitter::idAfter( TQWidget* w ) const
{
QSplitterLayoutStruct *s = data->list.first();
bool seen_w = FALSE;
@@ -667,7 +667,7 @@ void KDGanttMinimizeSplitter::moveSplitter( QCOORD p, int id )
QSplitterLayoutStruct *s = data->list.at(id);
int oldP = orient == Horizontal ? s->wid->x() : s->wid->y();
bool upLeft;
- if ( QApplication::reverseLayout() && orient == Horizontal ) {
+ if ( TQApplication::reverseLayout() && orient == Horizontal ) {
p += s->wid->width();
upLeft = p > oldP;
} else
@@ -680,10 +680,10 @@ void KDGanttMinimizeSplitter::moveSplitter( QCOORD p, int id )
}
-void KDGanttMinimizeSplitter::setG( QWidget *w, int p, int s, bool isSplitter )
+void KDGanttMinimizeSplitter::setG( TQWidget *w, int p, int s, bool isSplitter )
{
if ( orient == Horizontal ) {
- if ( QApplication::reverseLayout() && orient == Horizontal && !isSplitter )
+ if ( TQApplication::reverseLayout() && orient == Horizontal && !isSplitter )
p = contentsRect().width() - p - s;
w->setGeometry( p, contentsRect().y(), s, contentsRect().height() );
} else
@@ -703,13 +703,13 @@ void KDGanttMinimizeSplitter::moveBefore( int pos, int id, bool upLeft )
QSplitterLayoutStruct *s = data->list.at(id);
if ( !s )
return;
- QWidget *w = s->wid;
+ TQWidget *w = s->wid;
if ( w->isHidden() ) {
moveBefore( pos, id-1, upLeft );
} else if ( s->isSplitter ) {
int pos1, pos2;
int dd = s->sizer;
- if( QApplication::reverseLayout() && orient == Horizontal ) {
+ if( TQApplication::reverseLayout() && orient == Horizontal ) {
pos1 = pos;
pos2 = pos + dd;
} else {
@@ -725,7 +725,7 @@ void KDGanttMinimizeSplitter::moveBefore( int pos, int id, bool upLeft )
}
} else {
int dd, newLeft, nextPos;
- if( QApplication::reverseLayout() && orient == Horizontal ) {
+ if( TQApplication::reverseLayout() && orient == Horizontal ) {
dd = w->geometry().right() - pos;
dd = QMAX( pick(minSize(w)), QMIN(dd, pick(w->maximumSize())));
newLeft = pos+1;
@@ -753,7 +753,7 @@ void KDGanttMinimizeSplitter::moveAfter( int pos, int id, bool upLeft )
data->list.at(id) : 0;
if ( !s )
return;
- QWidget *w = s->wid;
+ TQWidget *w = s->wid;
if ( w->isHidden() ) {
moveAfter( pos, id+1, upLeft );
} else if ( pick( w->pos() ) == pos ) {
@@ -762,7 +762,7 @@ void KDGanttMinimizeSplitter::moveAfter( int pos, int id, bool upLeft )
} else if ( s->isSplitter ) {
int dd = s->sizer;
int pos1, pos2;
- if( QApplication::reverseLayout() && orient == Horizontal ) {
+ if( TQApplication::reverseLayout() && orient == Horizontal ) {
pos2 = pos - dd;
pos1 = pos2 + 1;
} else {
@@ -779,7 +779,7 @@ void KDGanttMinimizeSplitter::moveAfter( int pos, int id, bool upLeft )
} else {
int left = pick( w->pos() );
int right, dd,/* newRight,*/ newLeft, nextPos;
- if ( QApplication::reverseLayout() && orient == Horizontal ) {
+ if ( TQApplication::reverseLayout() && orient == Horizontal ) {
dd = pos - left + 1;
dd = QMAX( pick(minSize(w)), QMIN(dd, pick(w->maximumSize())));
newLeft = pos-dd+1;
@@ -802,16 +802,16 @@ void KDGanttMinimizeSplitter::moveAfter( int pos, int id, bool upLeft )
void KDGanttMinimizeSplitter::expandPos( int id, int* min, int* max )
{
QSplitterLayoutStruct *s = data->list.at(id-1);
- QWidget* w = s->wid;
- *min = pick( w->mapToParent( QPoint(0,0) ) );
+ TQWidget* w = s->wid;
+ *min = pick( w->mapToParent( TQPoint(0,0) ) );
if ( (uint) id == data->list.count() ) {
pick( size() );
}
else {
QSplitterLayoutStruct *s = data->list.at(id+1);
- QWidget* w = s->wid;
- *max = pick( w->mapToParent( QPoint( w->width(), w->height() ) ) ) -8;
+ TQWidget* w = s->wid;
+ *max = pick( w->mapToParent( TQPoint( w->width(), w->height() ) ) ) -8;
}
}
@@ -856,9 +856,9 @@ void KDGanttMinimizeSplitter::getRange( int id, int *min, int *max )
maxA += pick( s->wid->maximumSize() );
}
}
- QRect r = contentsRect();
- if ( orient == Horizontal && QApplication::reverseLayout() ) {
- int splitterWidth = style().pixelMetric(QStyle::PM_SplitterWidth, this);
+ TQRect r = contentsRect();
+ if ( orient == Horizontal && TQApplication::reverseLayout() ) {
+ int splitterWidth = style().pixelMetric(TQStyle::PM_SplitterWidth, this);
if ( min )
*min = pick(r.topRight()) - QMIN( maxB, pick(r.size())-minA ) - splitterWidth;
if ( max )
@@ -891,10 +891,10 @@ int KDGanttMinimizeSplitter::adjustPos( int p, int id )
void KDGanttMinimizeSplitter::doResize()
{
- QRect r = contentsRect();
+ TQRect r = contentsRect();
int i;
int n = data->list.count();
- QMemArray<QLayoutStruct> a( n );
+ TQMemArray<QLayoutStruct> a( n );
for ( i = 0; i< n; i++ ) {
a[i].init();
QSplitterLayoutStruct *s = data->list.at(i);
@@ -972,7 +972,7 @@ void KDGanttMinimizeSplitter::recalc( bool update )
minl += s->sizer;
maxl += s->sizer;
} else {
- QSize minS = minSize(s->wid);
+ TQSize minS = minSize(s->wid);
minl += pick( minS );
maxl += pick( s->wid->maximumSize() );
mint = QMAX( mint, trans( minS ));
@@ -1013,7 +1013,7 @@ void KDGanttMinimizeSplitter::recalc( bool update )
\sa ResizeMode
*/
-void KDGanttMinimizeSplitter::setResizeMode( QWidget *w, ResizeMode mode )
+void KDGanttMinimizeSplitter::setResizeMode( TQWidget *w, ResizeMode mode )
{
processChildEvents();
QSplitterLayoutStruct *s = data->list.first();
@@ -1059,7 +1059,7 @@ void KDGanttMinimizeSplitter::setOpaqueResize( bool on )
Moves widget \a w to the leftmost/top position.
*/
-void KDGanttMinimizeSplitter::moveToFirst( QWidget *w )
+void KDGanttMinimizeSplitter::moveToFirst( TQWidget *w )
{
processChildEvents();
bool found = FALSE;
@@ -1088,7 +1088,7 @@ void KDGanttMinimizeSplitter::moveToFirst( QWidget *w )
Moves widget \a w to the rightmost/bottom position.
*/
-void KDGanttMinimizeSplitter::moveToLast( QWidget *w )
+void KDGanttMinimizeSplitter::moveToLast( TQWidget *w )
{
processChildEvents();
bool found = FALSE;
@@ -1126,21 +1126,21 @@ void KDGanttMinimizeSplitter::recalcId()
/*! Reimplemented from superclass.
*/
-QSize KDGanttMinimizeSplitter::sizeHint() const
+TQSize KDGanttMinimizeSplitter::sizeHint() const
{
constPolish();
int l = 0;
int t = 0;
if ( children() ) {
- const QObjectList * c = children();
- QObjectListIt it( *c );
- QObject * o;
+ const TQObjectList * c = children();
+ TQObjectListIt it( *c );
+ TQObject * o;
while( (o=it.current()) != 0 ) {
++it;
if ( o->isWidgetType() &&
- !((QWidget*)o)->isHidden() ) {
- QSize s = ((QWidget*)o)->sizeHint();
+ !((TQWidget*)o)->isHidden() ) {
+ TQSize s = ((TQWidget*)o)->sizeHint();
if ( s.isValid() ) {
l += pick( s );
t = QMAX( t, trans( s ) );
@@ -1148,7 +1148,7 @@ QSize KDGanttMinimizeSplitter::sizeHint() const
}
}
}
- return orientation() == Horizontal ? QSize( l, t ) : QSize( t, l );
+ return orientation() == Horizontal ? TQSize( l, t ) : TQSize( t, l );
}
@@ -1156,21 +1156,21 @@ QSize KDGanttMinimizeSplitter::sizeHint() const
\reimp
*/
-QSize KDGanttMinimizeSplitter::minimumSizeHint() const
+TQSize KDGanttMinimizeSplitter::minimumSizeHint() const
{
constPolish();
int l = 0;
int t = 0;
if ( children() ) {
- const QObjectList * c = children();
- QObjectListIt it( *c );
- QObject * o;
+ const TQObjectList * c = children();
+ TQObjectListIt it( *c );
+ TQObject * o;
while( (o=it.current()) != 0 ) {
++it;
if ( o->isWidgetType() &&
- !((QWidget*)o)->isHidden() ) {
- QSize s = minSizeHint((QWidget*)o);
+ !((TQWidget*)o)->isHidden() ) {
+ TQSize s = minSizeHint((TQWidget*)o);
if ( s.isValid() ) {
l += pick( s );
t = QMAX( t, trans( s ) );
@@ -1178,7 +1178,7 @@ QSize KDGanttMinimizeSplitter::minimumSizeHint() const
}
}
}
- return orientation() == Horizontal ? QSize( l, t ) : QSize( t, l );
+ return orientation() == Horizontal ? TQSize( l, t ) : TQSize( t, l );
}
@@ -1203,10 +1203,10 @@ void KDGanttMinimizeSplitter::storeSizes()
Hides \a w if \a hide is TRUE and updates the splitter.
\warning Due to a limitation in the current implementation,
- calling QWidget::hide() will not work.
+ calling TQWidget::hide() will not work.
*/
-void KDGanttMinimizeSplitter::setHidden( QWidget *w, bool hide )
+void KDGanttMinimizeSplitter::setHidden( TQWidget *w, bool hide )
{
if ( w == w1 ) {
w1show = !hide;
@@ -1230,7 +1230,7 @@ void KDGanttMinimizeSplitter::setHidden( QWidget *w, bool hide )
Returns the hidden status of \a w
*/
-bool KDGanttMinimizeSplitter::isHidden( QWidget *w ) const
+bool KDGanttMinimizeSplitter::isHidden( TQWidget *w ) const
{
if ( w == w1 )
return !w1show;
@@ -1255,8 +1255,8 @@ bool KDGanttMinimizeSplitter::isHidden( QWidget *w ) const
Note that if you want to iterate over the list, you should
iterate over a copy, e.g.
\code
- QValueList<int> list = mySplitter.sizes();
- QValueList<int>::Iterator it = list.begin();
+ TQValueList<int> list = mySplitter.sizes();
+ TQValueList<int>::Iterator it = list.begin();
while( it != list.end() ) {
myProcessing( *it );
++it;
@@ -1266,13 +1266,13 @@ bool KDGanttMinimizeSplitter::isHidden( QWidget *w ) const
\sa setSizes()
*/
-QValueList<int> KDGanttMinimizeSplitter::sizes() const
+TQValueList<int> KDGanttMinimizeSplitter::sizes() const
{
if ( !testWState(WState_Polished) ) {
- QWidget* that = (QWidget*) this;
+ TQWidget* that = (TQWidget*) this;
that->polish();
}
- QValueList<int> list;
+ TQValueList<int> list;
QSplitterLayoutStruct *s = data->list.first();
while ( s ) {
if ( !s->isSplitter )
@@ -1297,10 +1297,10 @@ QValueList<int> KDGanttMinimizeSplitter::sizes() const
\sa sizes()
*/
-void KDGanttMinimizeSplitter::setSizes( QValueList<int> list )
+void KDGanttMinimizeSplitter::setSizes( TQValueList<int> list )
{
processChildEvents();
- QValueList<int>::Iterator it = list.begin();
+ TQValueList<int>::Iterator it = list.begin();
QSplitterLayoutStruct *s = data->list.first();
while ( s && it != list.end() ) {
if ( !s->isSplitter ) {
@@ -1320,7 +1320,7 @@ void KDGanttMinimizeSplitter::setSizes( QValueList<int> list )
void KDGanttMinimizeSplitter::processChildEvents()
{
- QApplication::sendPostedEvents( this, QEvent::ChildInserted );
+ TQApplication::sendPostedEvents( this, TQEvent::ChildInserted );
}
@@ -1328,9 +1328,9 @@ void KDGanttMinimizeSplitter::processChildEvents()
Reimplemented from superclass.
*/
-void KDGanttMinimizeSplitter::styleChange( QStyle& old )
+void KDGanttMinimizeSplitter::styleChange( TQStyle& old )
{
- int sw = style().pixelMetric(QStyle::PM_SplitterWidth, this);
+ int sw = style().pixelMetric(TQStyle::PM_SplitterWidth, this);
QSplitterLayoutStruct *s = data->list.first();
while ( s ) {
if ( s->isSplitter )
@@ -1338,7 +1338,7 @@ void KDGanttMinimizeSplitter::styleChange( QStyle& old )
s = data->list.next();
}
doResize();
- QFrame::styleChange( old );
+ TQFrame::styleChange( old );
}
#endif
@@ -1371,7 +1371,7 @@ static inline int toFixed( int i ) { return i * 256; }
static inline int fRound( int i ) {
return ( i % 256 < 128 ) ? i / 256 : 1 + i / 256;
}
-void kdganttGeomCalc( QMemArray<QLayoutStruct> &chain, int start, int count, int pos,
+void kdganttGeomCalc( TQMemArray<QLayoutStruct> &chain, int start, int count, int pos,
int space, int spacer )
{
typedef int fixed;
diff --git a/kdgantt/KDGanttMinimizeSplitter.h b/kdgantt/KDGanttMinimizeSplitter.h
index 1581d6157..801fc0112 100644
--- a/kdgantt/KDGanttMinimizeSplitter.h
+++ b/kdgantt/KDGanttMinimizeSplitter.h
@@ -35,8 +35,8 @@
#define KDGANTTMINIMIZESPLITTER_H
#ifndef QT_H
-#include "qframe.h"
-#include "qvaluelist.h"
+#include "tqframe.h"
+#include "tqvaluelist.h"
#endif // QT_H
#ifndef QT_NO_SPLITTER
@@ -55,8 +55,8 @@ public:
enum ResizeMode { Stretch, KeepSize, FollowSizeHint };
enum Direction { Left, Right, Up, Down };
- KDGanttMinimizeSplitter( QWidget* parent=0, const char* name=0 );
- KDGanttMinimizeSplitter( Orientation, QWidget* parent=0, const char* name=0 );
+ KDGanttMinimizeSplitter( TQWidget* parent=0, const char* name=0 );
+ KDGanttMinimizeSplitter( Orientation, TQWidget* parent=0, const char* name=0 );
~KDGanttMinimizeSplitter();
virtual void setOrientation( Orientation );
@@ -66,33 +66,33 @@ public:
Direction minimizeDirection() const;
#if QT_VERSION >= 300
- virtual void setResizeMode( QWidget *w, ResizeMode );
+ virtual void setResizeMode( TQWidget *w, ResizeMode );
virtual void setOpaqueResize( bool = TRUE );
bool opaqueResize() const;
- void moveToFirst( QWidget * );
- void moveToLast( QWidget * );
+ void moveToFirst( TQWidget * );
+ void moveToLast( TQWidget * );
void refresh() { recalc( TRUE ); }
- virtual QSize sizeHint() const;
- virtual QSize minimumSizeHint() const;
+ virtual TQSize sizeHint() const;
+ virtual TQSize minimumSizeHint() const;
- QValueList<int> sizes() const;
- void setSizes( QValueList<int> );
+ TQValueList<int> sizes() const;
+ void setSizes( TQValueList<int> );
void expandPos( int id, int* min, int* max );
protected:
- void childEvent( QChildEvent * );
+ void childEvent( TQChildEvent * );
- bool event( QEvent * );
- void resizeEvent( QResizeEvent * );
+ bool event( TQEvent * );
+ void resizeEvent( TQResizeEvent * );
- int idAfter( QWidget* ) const;
+ int idAfter( TQWidget* ) const;
void moveSplitter( QCOORD pos, int id );
- virtual void drawSplitter( QPainter*, QCOORD x, QCOORD y,
+ virtual void drawSplitter( TQPainter*, QCOORD x, QCOORD y,
QCOORD w, QCOORD h );
- void styleChange( QStyle& );
+ void styleChange( TQStyle& );
int adjustPos( int , int );
virtual void setRubberband( int );
void getRange( int id, int*, int* );
@@ -103,20 +103,20 @@ private:
void doResize();
void storeSizes();
void processChildEvents();
- QSplitterLayoutStruct *addWidget( QWidget*, bool first = FALSE );
+ QSplitterLayoutStruct *addWidget( TQWidget*, bool first = FALSE );
void recalcId();
void moveBefore( int pos, int id, bool upLeft );
void moveAfter( int pos, int id, bool upLeft );
- void setG( QWidget *w, int p, int s, bool isSplitter = FALSE );
+ void setG( TQWidget *w, int p, int s, bool isSplitter = FALSE );
- QCOORD pick( const QPoint &p ) const
+ QCOORD pick( const TQPoint &p ) const
{ return orient == Horizontal ? p.x() : p.y(); }
- QCOORD pick( const QSize &s ) const
+ QCOORD pick( const TQSize &s ) const
{ return orient == Horizontal ? s.width() : s.height(); }
- QCOORD trans( const QPoint &p ) const
+ QCOORD trans( const TQPoint &p ) const
{ return orient == Vertical ? p.x() : p.y(); }
- QCOORD trans( const QSize &s ) const
+ QCOORD trans( const TQSize &s ) const
{ return orient == Vertical ? s.width() : s.height(); }
QSplitterData *data;
@@ -152,19 +152,19 @@ public:
bool opaque() const { return s->opaqueResize(); }
- QSize sizeHint() const;
+ TQSize sizeHint() const;
int id() const { return myId; } // data->list.at(id())->wid == this
void setId( int i ) { myId = i; }
protected:
- QValueList<QPointArray> buttonRegions();
- void paintEvent( QPaintEvent * );
- void mouseMoveEvent( QMouseEvent * );
- void mousePressEvent( QMouseEvent * );
- void mouseReleaseEvent( QMouseEvent * );
- int onButton( const QPoint& p );
- void updateCursor( const QPoint& p );
+ TQValueList<TQPointArray> buttonRegions();
+ void paintEvent( TQPaintEvent * );
+ void mouseMoveEvent( TQMouseEvent * );
+ void mousePressEvent( TQMouseEvent * );
+ void mouseReleaseEvent( TQMouseEvent * );
+ int onButton( const TQPoint& p );
+ void updateCursor( const TQPoint& p );
private:
Qt::Orientation orient;
diff --git a/kdgantt/KDGanttSemiSizingControl.cpp b/kdgantt/KDGanttSemiSizingControl.cpp
index 916296627..e81b77817 100644
--- a/kdgantt/KDGanttSemiSizingControl.cpp
+++ b/kdgantt/KDGanttSemiSizingControl.cpp
@@ -33,12 +33,12 @@
#include "KDGanttSemiSizingControl.h"
-#include <qpushbutton.h>
-#include <qpointarray.h>
-#include <qpainter.h>
-#include <qbitmap.h>
-#include <qtooltip.h>
-#include <qwhatsthis.h>
+#include <tqpushbutton.h>
+#include <tqpointarray.h>
+#include <tqpainter.h>
+#include <tqbitmap.h>
+#include <tqtooltip.h>
+#include <tqwhatsthis.h>
/*!
\class KDGanttSemiSizingControl KDGanttSemiSizingControl.h
This class provides exactly one child widget with a button for
@@ -63,7 +63,7 @@
the base class.
*/
-KDGanttSemiSizingControl::KDGanttSemiSizingControl( QWidget* parent,
+KDGanttSemiSizingControl::KDGanttSemiSizingControl( TQWidget* parent,
const char* name ) :
KDGanttSizingControl( parent, name ), _orient( Horizontal ),
_arrowPos( Before ), _minimizedWidget(0), _maximizedWidget(0)
@@ -85,7 +85,7 @@ KDGanttSemiSizingControl::KDGanttSemiSizingControl( QWidget* parent,
*/
KDGanttSemiSizingControl::KDGanttSemiSizingControl( Orientation orientation,
- QWidget* parent,
+ TQWidget* parent,
const char* name ) :
KDGanttSizingControl( parent, name ), _orient( orientation ),
_arrowPos( Before ), _minimizedWidget(0), _maximizedWidget(0)
@@ -109,7 +109,7 @@ KDGanttSemiSizingControl::KDGanttSemiSizingControl( Orientation orientation,
KDGanttSemiSizingControl::KDGanttSemiSizingControl( ArrowPosition arrowPosition,
Orientation orientation,
- QWidget* parent,
+ TQWidget* parent,
const char* name ) :
KDGanttSizingControl( parent, name ), _orient( orientation ),
_arrowPos( arrowPosition ), _minimizedWidget(0), _maximizedWidget(0)
@@ -127,7 +127,7 @@ KDGanttSemiSizingControl::KDGanttSemiSizingControl( ArrowPosition arrowPosition,
\sa minimizedWidget()
*/
-void KDGanttSemiSizingControl::setMinimizedWidget( QWidget* widget )
+void KDGanttSemiSizingControl::setMinimizedWidget( TQWidget* widget )
{
_minimizedWidget = widget;
if( _minimizedWidget ) _minimizedWidget->hide();
@@ -143,7 +143,7 @@ void KDGanttSemiSizingControl::setMinimizedWidget( QWidget* widget )
\sa setMinimizedWidget()
*/
-QWidget* KDGanttSemiSizingControl::minimizedWidget() const
+TQWidget* KDGanttSemiSizingControl::minimizedWidget() const
{
return _minimizedWidget;
}
@@ -157,7 +157,7 @@ QWidget* KDGanttSemiSizingControl::minimizedWidget() const
\sa maximizedWidget()
*/
-void KDGanttSemiSizingControl::setMaximizedWidget( QWidget* widget )
+void KDGanttSemiSizingControl::setMaximizedWidget( TQWidget* widget )
{
_maximizedWidget = widget;
//if( _maximizedWidget ) _maximizedWidget->show();
@@ -172,7 +172,7 @@ void KDGanttSemiSizingControl::setMaximizedWidget( QWidget* widget )
\sa setMaximizedWidget()
*/
-QWidget* KDGanttSemiSizingControl::maximizedWidget() const
+TQWidget* KDGanttSemiSizingControl::maximizedWidget() const
{
return _maximizedWidget;
}
@@ -246,12 +246,12 @@ KDGanttSemiSizingControl::ArrowPosition KDGanttSemiSizingControl::arrowPosition(
void KDGanttSemiSizingControl::init()
{
- _but = new QPushButton( this );
- _but->setSizePolicy( QSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed ) );
- connect( _but, SIGNAL( clicked() ), this, SLOT(changeState()) );
+ _but = new TQPushButton( this );
+ _but->setSizePolicy( TQSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Fixed ) );
+ connect( _but, TQT_SIGNAL( clicked() ), this, TQT_SLOT(changeState()) );
_layout = 0;
- QWhatsThis::add( _but, "Click on this button to show the \nlegend at the bottom of the widget");
- QToolTip::add( _but, "Show / hide legend");
+ TQWhatsThis::add( _but, "Click on this button to show the \nlegend at the bottom of the widget");
+ TQToolTip::add( _but, "Show / hide legend");
}
@@ -260,17 +260,17 @@ void KDGanttSemiSizingControl::setup()
{
//-------------------------------------------------- Setup layout
delete _layout;
- QBoxLayout* butLayout; // _layout will delete me
+ TQBoxLayout* butLayout; // _layout will delete me
if ( _orient == Horizontal || isMinimized() )
- _layout = new QHBoxLayout( this );
+ _layout = new TQHBoxLayout( this );
else
- _layout = new QVBoxLayout( this );
+ _layout = new TQVBoxLayout( this );
if ( _orient == Vertical && !isMinimized() )
- butLayout = new QHBoxLayout( _layout );
+ butLayout = new TQHBoxLayout( _layout );
else
- butLayout = new QVBoxLayout( _layout );
+ butLayout = new TQVBoxLayout( _layout );
@@ -298,7 +298,7 @@ void KDGanttSemiSizingControl::setup()
}
// Set widget in the correct possition
- QWidget* widget;
+ TQWidget* widget;
/* ************************** old code ***************
if ( isMinimized() )
widget = _minimizedWidget;
@@ -380,12 +380,12 @@ void KDGanttSemiSizingControl::minimize( bool minimize )
}
}
-QPixmap KDGanttSemiSizingControl::pixmap( Direction direction ) {
+TQPixmap KDGanttSemiSizingControl::pixmap( Direction direction ) {
int s = 10;
- QPixmap pix( s, s );
+ TQPixmap pix( s, s );
pix.fill( blue );
- QPointArray arr;
+ TQPointArray arr;
switch ( direction ) {
case Up: arr.setPoints( 3, 0, s-1, s-1, s-1, 0, s/2 ); ;break;
case Down: arr.setPoints( 3, 0, 0, s-1, 0, s/2, s-1 ); break;
@@ -393,14 +393,14 @@ QPixmap KDGanttSemiSizingControl::pixmap( Direction direction ) {
case Right: arr.setPoints( 3, 0,0, s-1, s/2, 0, s-1 ); break;
}
- QPainter p( &pix );
+ TQPainter p( &pix );
p.setPen( black );
p.setBrush( colorGroup().button() );
p.drawPolygon( arr );
- QBitmap bit( s, s );
+ TQBitmap bit( s, s );
bit.fill( color0 );
- QPainter p2( &bit );
+ TQPainter p2( &bit );
p2.setPen( color1 );
p2.setBrush( color1 );
p2.drawPolygon( arr );
diff --git a/kdgantt/KDGanttSemiSizingControl.h b/kdgantt/KDGanttSemiSizingControl.h
index 6fb56e32c..af7a74e74 100644
--- a/kdgantt/KDGanttSemiSizingControl.h
+++ b/kdgantt/KDGanttSemiSizingControl.h
@@ -36,7 +36,7 @@
#define KDGANTTSEMISIZINGCONTROL_H
#include "KDGanttSizingControl.h"
-#include <qlayout.h>
+#include <tqlayout.h>
class QPushButton;
class QBoxLayout;
@@ -49,17 +49,17 @@ class KDGanttSemiSizingControl : public KDGanttSizingControl
public:
enum ArrowPosition { Before, After };
- KDGanttSemiSizingControl( QWidget* parent = 0, const char* name = 0 );
- KDGanttSemiSizingControl( Orientation orientation, QWidget* parent = 0,
+ KDGanttSemiSizingControl( TQWidget* parent = 0, const char* name = 0 );
+ KDGanttSemiSizingControl( Orientation orientation, TQWidget* parent = 0,
const char* name = 0 );
KDGanttSemiSizingControl( ArrowPosition arrowPosition,
- Orientation orientation, QWidget* parent = 0,
+ Orientation orientation, TQWidget* parent = 0,
const char* name = 0 );
- void setMinimizedWidget( QWidget* widget );
- void setMaximizedWidget( QWidget* widget );
- QWidget* minimizedWidget() const;
- QWidget* maximizedWidget() const;
+ void setMinimizedWidget( TQWidget* widget );
+ void setMaximizedWidget( TQWidget* widget );
+ TQWidget* minimizedWidget() const;
+ TQWidget* maximizedWidget() const;
void setOrientation( Qt::Orientation orientation );
Qt::Orientation orientation() const;
@@ -75,15 +75,15 @@ protected:
void setup();
void init();
enum Direction {Left, Right, Up, Down };
- QPixmap pixmap( Direction );
+ TQPixmap pixmap( Direction );
private:
Orientation _orient;
ArrowPosition _arrowPos;
- QWidget* _minimizedWidget;
- QWidget* _maximizedWidget;
- QBoxLayout* _layout;
- QPushButton* _but;
+ TQWidget* _minimizedWidget;
+ TQWidget* _maximizedWidget;
+ TQBoxLayout* _layout;
+ TQPushButton* _but;
};
diff --git a/kdgantt/KDGanttSizingControl.cpp b/kdgantt/KDGanttSizingControl.cpp
index 5f4c004ac..a650a6e4a 100644
--- a/kdgantt/KDGanttSizingControl.cpp
+++ b/kdgantt/KDGanttSizingControl.cpp
@@ -56,8 +56,8 @@
*/
-KDGanttSizingControl::KDGanttSizingControl( QWidget* parent, const char* name, WFlags f )
- :QWidget( parent, name, f ), _isMinimized( false )
+KDGanttSizingControl::KDGanttSizingControl( TQWidget* parent, const char* name, WFlags f )
+ :TQWidget( parent, name, f ), _isMinimized( false )
{
}
diff --git a/kdgantt/KDGanttSizingControl.h b/kdgantt/KDGanttSizingControl.h
index 12fa075ea..de7003999 100644
--- a/kdgantt/KDGanttSizingControl.h
+++ b/kdgantt/KDGanttSizingControl.h
@@ -33,7 +33,7 @@
#ifndef KDGANTTSIZINGCONTROL_H
#define KDGANTTSIZINGCONTROL_H
-#include <qwidget.h>
+#include <tqwidget.h>
class KDGanttSizingControl : public QWidget
{
@@ -43,7 +43,7 @@ public:
bool isMinimized() const;
protected:
- KDGanttSizingControl( QWidget* parent = 0, const char* name = 0, WFlags f = 0 );
+ KDGanttSizingControl( TQWidget* parent = 0, const char* name = 0, WFlags f = 0 );
public slots:
virtual void minimize( bool minimize );
diff --git a/kdgantt/KDGanttView.cpp b/kdgantt/KDGanttView.cpp
index 0b09ce109..9403c10ff 100644
--- a/kdgantt/KDGanttView.cpp
+++ b/kdgantt/KDGanttView.cpp
@@ -39,19 +39,19 @@
#include "KDGanttViewItem.h"
#include "KDGanttXMLTools.h"
#include "itemAttributeDialog.h"
-#include <qprinter.h>
-#include <qpainter.h>
-#include <qlayout.h>
-#include <qpaintdevicemetrics.h>
-#include <qfile.h>
-#include <qheader.h>
-#include <qscrollview.h>
-#include <qapplication.h>
-#include <qevent.h>
-#include <qiconview.h>
-
-#include <qmessagebox.h>
-#include <qfileinfo.h>
+#include <tqprinter.h>
+#include <tqpainter.h>
+#include <tqlayout.h>
+#include <tqpaintdevicemetrics.h>
+#include <tqfile.h>
+#include <tqheader.h>
+#include <tqscrollview.h>
+#include <tqapplication.h>
+#include <tqevent.h>
+#include <tqiconview.h>
+
+#include <tqmessagebox.h>
+#include <tqfileinfo.h>
#ifndef KDGANTT_MASTER_CVS
#include "KDGanttView.moc"
@@ -80,7 +80,7 @@
\param name the internal debugging name
*/
-KDGanttView::KDGanttView( QWidget* parent, const char* name )
+KDGanttView::KDGanttView( TQWidget* parent, const char* name )
: KDGanttMinimizeSplitter( Qt::Vertical, parent, name ),
myCanvasView(0),
myTimeHeaderScroll(0),
@@ -93,41 +93,41 @@ KDGanttView::KDGanttView( QWidget* parent, const char* name )
setMinimizeDirection ( KDGanttMinimizeSplitter::Down );
mySplitter = new KDGanttMinimizeSplitter( this );
mySplitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Left );
- leftWidget = new QVBox( mySplitter );
- rightWidget = new QVBox( mySplitter );
+ leftWidget = new TQVBox( mySplitter );
+ rightWidget = new TQVBox( mySplitter );
myLegend = new KDLegendWidget( leftWidget, this );
- spacerLeft = new QHBox( leftWidget );
+ spacerLeft = new TQHBox( leftWidget );
myListView = new KDListView(leftWidget, this);
- myListView->setVScrollBarMode (QScrollView::AlwaysOff );
- connect( myListView, SIGNAL( selectionChanged( QListViewItem* ) ),
- this, SLOT( slotSelectionChanged( QListViewItem* ) ) );
+ myListView->setVScrollBarMode (TQScrollView::AlwaysOff );
+ connect( myListView, TQT_SIGNAL( selectionChanged( TQListViewItem* ) ),
+ this, TQT_SLOT( slotSelectionChanged( TQListViewItem* ) ) );
- connect( myListView, SIGNAL( mouseButtonClicked ( int, QListViewItem * , const QPoint &, int ) ), this, SLOT( slotmouseButtonClicked ( int , QListViewItem * , const QPoint &, int ) ) );
- connect( myListView, SIGNAL( contextMenuRequested ( QListViewItem * , const QPoint &, int ) ), this, SLOT( slotcontextMenuRequested ( QListViewItem * , const QPoint & , int ) ) );
+ connect( myListView, TQT_SIGNAL( mouseButtonClicked ( int, TQListViewItem * , const TQPoint &, int ) ), this, TQT_SLOT( slotmouseButtonClicked ( int , TQListViewItem * , const TQPoint &, int ) ) );
+ connect( myListView, TQT_SIGNAL( contextMenuRequested ( TQListViewItem * , const TQPoint &, int ) ), this, TQT_SLOT( slotcontextMenuRequested ( TQListViewItem * , const TQPoint & , int ) ) );
- connect( myListView, SIGNAL(currentChanged( QListViewItem * ) ), this, SLOT(slotCurrentChanged ( QListViewItem * ) ) );
- connect( myListView, SIGNAL(itemRenamed ( QListViewItem * , int , const QString & ) ), this, SLOT(slotItemRenamed ( QListViewItem *, int , const QString & ) ) );
- connect( myListView, SIGNAL(mouseButtonPressed( int, QListViewItem * , const QPoint &, int ) ), this, SLOT(slotMouseButtonPressed ( int , QListViewItem * , const QPoint & , int ) ) );
+ connect( myListView, TQT_SIGNAL(currentChanged( TQListViewItem * ) ), this, TQT_SLOT(slotCurrentChanged ( TQListViewItem * ) ) );
+ connect( myListView, TQT_SIGNAL(itemRenamed ( TQListViewItem * , int , const TQString & ) ), this, TQT_SLOT(slotItemRenamed ( TQListViewItem *, int , const TQString & ) ) );
+ connect( myListView, TQT_SIGNAL(mouseButtonPressed( int, TQListViewItem * , const TQPoint &, int ) ), this, TQT_SLOT(slotMouseButtonPressed ( int , TQListViewItem * , const TQPoint & , int ) ) );
- //connect( myListView, SIGNAL( ), this, SLOT( ) );
+ //connect( myListView, TQT_SIGNAL( ), this, TQT_SLOT( ) );
myTimeTable = new KDTimeTableWidget (rightWidget,this);
- spacerRight = new QWidget( rightWidget );
+ spacerRight = new TQWidget( rightWidget );
- myTimeHeaderContainer = new QHBox( rightWidget );
- myTimeHeaderContainer->setFrameStyle( QFrame::NoFrame );
+ myTimeHeaderContainer = new TQHBox( rightWidget );
+ myTimeHeaderContainer->setFrameStyle( TQFrame::NoFrame );
myTimeHeaderContainer->setMargin( 0 );
- myTimeHeaderScroll = new QScrollView ( myTimeHeaderContainer );
- myTimeHeaderScroll->setHScrollBarMode( QScrollView::AlwaysOff );
- myTimeHeaderScroll->setVScrollBarMode( QScrollView::AlwaysOff );
- timeHeaderSpacerWidget = new QWidget( myTimeHeaderContainer );
+ myTimeHeaderScroll = new TQScrollView ( myTimeHeaderContainer );
+ myTimeHeaderScroll->setHScrollBarMode( TQScrollView::AlwaysOff );
+ myTimeHeaderScroll->setVScrollBarMode( TQScrollView::AlwaysOff );
+ timeHeaderSpacerWidget = new TQWidget( myTimeHeaderContainer );
/*
- myTimeHeaderScroll = new QScrollView ( rightWidget );
- myTimeHeaderScroll->setHScrollBarMode( QScrollView::AlwaysOff );
- myTimeHeaderScroll->setVScrollBarMode( QScrollView::AlwaysOn );
+ myTimeHeaderScroll = new TQScrollView ( rightWidget );
+ myTimeHeaderScroll->setHScrollBarMode( TQScrollView::AlwaysOff );
+ myTimeHeaderScroll->setVScrollBarMode( TQScrollView::AlwaysOn );
*/
//myTimeHeader = new KDTimeHeaderWidget (rightWidget,this);
myTimeHeader = new KDTimeHeaderWidget (myTimeHeaderScroll->viewport(),this);
@@ -135,18 +135,18 @@ KDGanttView::KDGanttView( QWidget* parent, const char* name )
myTimeHeaderScroll->viewport()->setBackgroundColor( myTimeHeader->backgroundColor() );
timeHeaderSpacerWidget->setBackgroundColor( myTimeHeader->backgroundColor() );
myCanvasView = new KDGanttCanvasView (this,myTimeTable,rightWidget);
- myTimeHeaderScroll->setFrameStyle( QFrame::NoFrame );
+ myTimeHeaderScroll->setFrameStyle( TQFrame::NoFrame );
//
- myCanvasView->setFrameStyle( QFrame::NoFrame );
+ myCanvasView->setFrameStyle( TQFrame::NoFrame );
myCanvasView->setMargin( 0 );
//
myTimeHeaderScroll->setMargin( 0 );//myCanvasView->frameWidth() );
setFrameStyle(myListView->frameStyle());
setLineWidth( 2 );
- myListView->setFrameStyle( QFrame::NoFrame );
+ myListView->setFrameStyle( TQFrame::NoFrame );
myListView->setMargin( 0 );
- QObject::connect(myListView, SIGNAL ( expanded ( QListViewItem * ) ) , myTimeTable , SLOT( expandItem(QListViewItem * ))) ;
- QObject::connect(myListView, SIGNAL (collapsed ( QListViewItem * ) ) , myTimeTable , SLOT(collapseItem(QListViewItem * ))) ;
+ TQObject::connect(myListView, TQT_SIGNAL ( expanded ( TQListViewItem * ) ) , myTimeTable , TQT_SLOT( expandItem(TQListViewItem * ))) ;
+ TQObject::connect(myListView, TQT_SIGNAL (collapsed ( TQListViewItem * ) ) , myTimeTable , TQT_SLOT(collapseItem(TQListViewItem * ))) ;
timeHeaderSpacerWidget->setFixedWidth(myCanvasView->verticalScrollBar()->width() );
listViewIsVisible = true;
@@ -157,8 +157,8 @@ KDGanttView::KDGanttView( QWidget* parent, const char* name )
_showHeader = false;
myTextColor = Qt::black;
- myLegendItems = new QPtrList<legendItem>;
- //QObject::connect( this, SIGNAL (itemDoubleClicked( KDGanttViewItem* ) ) , this, SLOT( editItem( KDGanttViewItem* ))) ;
+ myLegendItems = new TQPtrList<legendItem>;
+ //TQObject::connect( this, TQT_SIGNAL (itemDoubleClicked( KDGanttViewItem* ) ) , this, TQT_SLOT( editItem( KDGanttViewItem* ))) ;
myItemAttributeDialog = new itemAttributeDialog();
setRepaintMode( KDGanttView::Medium );
//setRepaintMode( KDGanttView::Always );
@@ -166,19 +166,19 @@ KDGanttView::KDGanttView( QWidget* parent, const char* name )
setHeaderVisible( false );
// now connecting the widgets
- connect(myCanvasView->horizontalScrollBar(), SIGNAL ( valueChanged ( int )) ,myTimeHeaderScroll->horizontalScrollBar(), SLOT( setValue ( int))) ;
- connect(myCanvasView, SIGNAL ( heightResized( int )) ,myTimeTable, SLOT( checkHeight ( int))) ;
- connect(myCanvasView, SIGNAL ( widthResized( int )) ,myTimeHeader, SLOT( checkWidth ( int))) ;
-
- QObject::connect(myCanvasView->verticalScrollBar(), SIGNAL ( valueChanged ( int ) ) ,myListView->verticalScrollBar(), SLOT( setValue ( int ))) ;
- connect(myTimeHeader, SIGNAL ( sizeChanged( int ) ) ,this, SLOT(slotHeaderSizeChanged() )) ;
- connect(myTimeHeader, SIGNAL ( sizeChanged( int ) ) ,myTimeTable, SLOT(resetWidth( int ) )) ;
- connect(myListView, SIGNAL ( contentsMoving ( int, int ) ) ,myCanvasView, SLOT( moveMyContent( int, int ))) ;
- connect(myTimeTable, SIGNAL ( heightComputed ( int ) ) ,myCanvasView, SLOT( setMyContentsHeight( int ))) ;
+ connect(myCanvasView->horizontalScrollBar(), TQT_SIGNAL ( valueChanged ( int )) ,myTimeHeaderScroll->horizontalScrollBar(), TQT_SLOT( setValue ( int))) ;
+ connect(myCanvasView, TQT_SIGNAL ( heightResized( int )) ,myTimeTable, TQT_SLOT( checkHeight ( int))) ;
+ connect(myCanvasView, TQT_SIGNAL ( widthResized( int )) ,myTimeHeader, TQT_SLOT( checkWidth ( int))) ;
+
+ TQObject::connect(myCanvasView->verticalScrollBar(), TQT_SIGNAL ( valueChanged ( int ) ) ,myListView->verticalScrollBar(), TQT_SLOT( setValue ( int ))) ;
+ connect(myTimeHeader, TQT_SIGNAL ( sizeChanged( int ) ) ,this, TQT_SLOT(slotHeaderSizeChanged() )) ;
+ connect(myTimeHeader, TQT_SIGNAL ( sizeChanged( int ) ) ,myTimeTable, TQT_SLOT(resetWidth( int ) )) ;
+ connect(myListView, TQT_SIGNAL ( contentsMoving ( int, int ) ) ,myCanvasView, TQT_SLOT( moveMyContent( int, int ))) ;
+ connect(myTimeTable, TQT_SIGNAL ( heightComputed ( int ) ) ,myCanvasView, TQT_SLOT( setMyContentsHeight( int ))) ;
// the next three are for adding new ticks at left/right
- connect( myCanvasView->horizontalScrollBar(), SIGNAL (prevLine () ) ,this, SLOT(addTickLeft()));
- connect( myCanvasView->horizontalScrollBar(), SIGNAL (nextLine () ) ,this, SLOT(addTickRight()));
- connect( myCanvasView->horizontalScrollBar(), SIGNAL (valueChanged ( int ) ) ,this, SLOT( enableAdding( int )));
+ connect( myCanvasView->horizontalScrollBar(), TQT_SIGNAL (prevLine () ) ,this, TQT_SLOT(addTickLeft()));
+ connect( myCanvasView->horizontalScrollBar(), TQT_SIGNAL (nextLine () ) ,this, TQT_SLOT(addTickRight()));
+ connect( myCanvasView->horizontalScrollBar(), TQT_SIGNAL (valueChanged ( int ) ) ,this, TQT_SLOT( enableAdding( int )));
// now initing
fCenterTimeLineAfterShow = false;
@@ -186,9 +186,9 @@ KDGanttView::KDGanttView( QWidget* parent, const char* name )
fDropEnabled = false;
closingBlocked = false;
myTimeHeader->computeTicks();
- centerTimelineAfterShow( QDateTime::currentDateTime () );
+ centerTimelineAfterShow( TQDateTime::currentDateTime () );
setDisplayEmptyTasksAsLine( false );
- QValueList<int> list;
+ TQValueList<int> list;
list.append(240);
list.append(530);
mySplitter->setSizes( list );
@@ -287,7 +287,7 @@ void KDGanttView::show()
else
myCanvasView->horizontalScrollBar()->setValue(1 );
myTimeTable->updateMyContent();
- QWidget::show();
+ TQWidget::show();
myCanvasView->setMyContentsHeight( 0 );
if ( fCenterTimeLineAfterShow ) {
fCenterTimeLineAfterShow = false;
@@ -306,7 +306,7 @@ bool KDGanttView::close ( bool alsoDelete )
//qDebug("close ");
if ( closingBlocked )
return false;
- return QWidget::close ( alsoDelete );
+ return TQWidget::close ( alsoDelete );
}
@@ -318,13 +318,13 @@ bool KDGanttView::close ( bool alsoDelete )
height() of TimeHeader + height() of TimeTable + height() of Legend (if shown)
*/
-QSize KDGanttView::sizeHint() const
+TQSize KDGanttView::sizeHint() const
{
bool block = myTimeTable->blockUpdating();
myTimeTable->setBlockUpdating( false );
myTimeTable->updateMyContent();
/* The below causes recursive calls to various size updating methods, which
- * cause QCanvas to hide and show items like mad, which is very slow. If
+ * cause TQCanvas to hide and show items like mad, which is very slow. If
* there is a legitimate gui updating issue here somewhere, it will need
* to be solved differently.
*/
@@ -348,7 +348,7 @@ QSize KDGanttView::sizeHint() const
// add 10 for the splitter-bars
// qDebug("sizehint %d %d ",hintWid+10, hintHeight );
myTimeTable->setBlockUpdating( block );
- return QSize( hintWid+10, hintHeight );
+ return TQSize( hintWid+10, hintHeight );
}
@@ -418,7 +418,7 @@ bool KDGanttView::headerVisible() const
\param global true if coordX is a global position, false otherwise
\return the date and time at coordinate X in the Gantt view.
*/
-QDateTime KDGanttView::getDateTimeForCoordX(int coordX, bool global ) const
+TQDateTime KDGanttView::getDateTimeForCoordX(int coordX, bool global ) const
{
// default for myTimeHeader->getDateTimeForIndex() is local
return myTimeHeader->getDateTimeForIndex(coordX, !global );
@@ -428,7 +428,7 @@ QDateTime KDGanttView::getDateTimeForCoordX(int coordX, bool global ) const
/*!
Implements a casted pass-through of the selectionChanged() signal.
*/
-void KDGanttView::slotSelectionChanged( QListViewItem* item )
+void KDGanttView::slotSelectionChanged( TQListViewItem* item )
{
KDGanttViewItem* gItem = static_cast<KDGanttViewItem*>( item );
Q_ASSERT( gItem );
@@ -440,8 +440,8 @@ void KDGanttView::slotSelectionChanged( QListViewItem* item )
Implements a casted pass-through of the mouseButtonClicked() signal.
Signals itemLeftClicked() , itemMidClicked() are emitted as well.
*/
-void KDGanttView::slotmouseButtonClicked ( int button, QListViewItem * item,
- const QPoint & pos, int c )
+void KDGanttView::slotmouseButtonClicked ( int button, TQListViewItem * item,
+ const TQPoint & pos, int c )
{
KDGanttViewItem* gItem = static_cast<KDGanttViewItem*>( item );
emit lvMouseButtonClicked ( button , gItem, pos, c );
@@ -476,7 +476,7 @@ void KDGanttView::slotmouseButtonClicked ( int button, QListViewItem * item,
The signal itemRightClicked() is emitted as well;
the position is the global position.
*/
-void KDGanttView::slotcontextMenuRequested ( QListViewItem * item, const QPoint & pos, int col )
+void KDGanttView::slotcontextMenuRequested ( TQListViewItem * item, const TQPoint & pos, int col )
{
KDGanttViewItem* gItem = static_cast<KDGanttViewItem*>( item );
emit lvContextMenuRequested ( gItem, pos, col );
@@ -485,7 +485,7 @@ void KDGanttView::slotcontextMenuRequested ( QListViewItem * item, const QPoint
}
-void KDGanttView::emptySpaceDoubleClicked( QMouseEvent * e )
+void KDGanttView::emptySpaceDoubleClicked( TQMouseEvent * e )
{
emit dateTimeDoubleClicked( getDateTimeForCoordX( e->x(), false ) );
}
@@ -494,7 +494,7 @@ void KDGanttView::emptySpaceDoubleClicked( QMouseEvent * e )
/*
Implements a casted pass-through of the currentChanged() signal.
*/
-void KDGanttView::slotCurrentChanged ( QListViewItem * item )
+void KDGanttView::slotCurrentChanged ( TQListViewItem * item )
{
KDGanttViewItem* gItem = static_cast<KDGanttViewItem*>( item );
myCurrentItem = gItem;
@@ -505,8 +505,8 @@ void KDGanttView::slotCurrentChanged ( QListViewItem * item )
/*
Implements a casted pass-through of the itemRenamed() signal.
*/
-void KDGanttView::slotItemRenamed ( QListViewItem * item , int col,
- const QString & text )
+void KDGanttView::slotItemRenamed ( TQListViewItem * item , int col,
+ const TQString & text )
{
KDGanttViewItem* gItem = static_cast<KDGanttViewItem*>( item );
emit lvItemRenamed( gItem, col, text );
@@ -516,8 +516,8 @@ void KDGanttView::slotItemRenamed ( QListViewItem * item , int col,
/*
Implements a casted pass-through of the mouseButtonPressed() signal.
*/
-void KDGanttView::slotMouseButtonPressed ( int button, QListViewItem * item,
- const QPoint & pos, int c )
+void KDGanttView::slotMouseButtonPressed ( int button, TQListViewItem * item,
+ const TQPoint & pos, int c )
{
KDGanttViewItem* gItem = static_cast<KDGanttViewItem*>( item );
emit lvMouseButtonPressed( button, gItem, pos, c );
@@ -541,7 +541,7 @@ void KDGanttView::slotMouseButtonPressed ( int button, QListViewItem * item,
void KDGanttView::setRepaintMode( RepaintMode mode )
{
- QScrollBar *cvh, *cvv;
+ TQScrollBar *cvh, *cvv;
cvh = myCanvasView->horizontalScrollBar();
cvv = myCanvasView->verticalScrollBar();
// first disconnect
@@ -553,18 +553,18 @@ void KDGanttView::setRepaintMode( RepaintMode mode )
break;
case Medium:
- connect( cvv, SIGNAL (sliderReleased () ) ,this, SLOT(forceRepaint()));
- connect( cvh, SIGNAL (sliderReleased () ) ,this, SLOT(forceRepaint()));
- connect( cvv, SIGNAL (nextLine () ) ,this, SLOT(forceRepaint()));
- connect( cvh, SIGNAL (nextLine () ) ,this, SLOT(forceRepaint()));
- connect( cvv, SIGNAL (prevLine () ) ,this, SLOT(forceRepaint()));
- connect( cvh, SIGNAL (prevLine () ) ,this, SLOT(forceRepaint()));
+ connect( cvv, TQT_SIGNAL (sliderReleased () ) ,this, TQT_SLOT(forceRepaint()));
+ connect( cvh, TQT_SIGNAL (sliderReleased () ) ,this, TQT_SLOT(forceRepaint()));
+ connect( cvv, TQT_SIGNAL (nextLine () ) ,this, TQT_SLOT(forceRepaint()));
+ connect( cvh, TQT_SIGNAL (nextLine () ) ,this, TQT_SLOT(forceRepaint()));
+ connect( cvv, TQT_SIGNAL (prevLine () ) ,this, TQT_SLOT(forceRepaint()));
+ connect( cvh, TQT_SIGNAL (prevLine () ) ,this, TQT_SLOT(forceRepaint()));
break;
case Always:
- connect( cvv, SIGNAL (valueChanged ( int ) ) ,this, SLOT(forceRepaint( int )));
- connect( cvh, SIGNAL (valueChanged ( int ) ) ,this, SLOT(forceRepaint( int )));
- connect( cvv, SIGNAL (sliderReleased () ) ,this, SLOT(forceRepaint()));
- connect( cvh, SIGNAL (sliderReleased () ) ,this, SLOT(forceRepaint()));
+ connect( cvv, TQT_SIGNAL (valueChanged ( int ) ) ,this, TQT_SLOT(forceRepaint( int )));
+ connect( cvh, TQT_SIGNAL (valueChanged ( int ) ) ,this, TQT_SLOT(forceRepaint( int )));
+ connect( cvv, TQT_SIGNAL (sliderReleased () ) ,this, TQT_SLOT(forceRepaint()));
+ connect( cvh, TQT_SIGNAL (sliderReleased () ) ,this, TQT_SLOT(forceRepaint()));
break;
}
}
@@ -644,7 +644,7 @@ void KDGanttView::slotHeaderSizeChanged()
DO NOT DELETE THIS POINTER!
\sa setShowLegend(), setLegendIsDockwindow(),legendIsDockwindow()
*/
-QDockWindow* KDGanttView::legendDockwindow() const
+TQDockWindow* KDGanttView::legendDockwindow() const
{
return myLegend->dockwindow();
}
@@ -776,15 +776,15 @@ bool KDGanttView::editable() const
\sa loadProject()
*/
-bool KDGanttView::saveProject( QIODevice* device )
+bool KDGanttView::saveProject( TQIODevice* device )
{
Q_ASSERT( device );
- QDomDocument doc = saveXML();
+ TQDomDocument doc = saveXML();
if( device->isOpen() )
device->close();
if( device->open( IO_WriteOnly ) ) {
- QTextStream ts( device );
+ TQTextStream ts( device );
ts << doc.toString();
return true;
} else
@@ -803,15 +803,15 @@ bool KDGanttView::saveProject( QIODevice* device )
\sa saveProject()
*/
-bool KDGanttView::loadProject( QIODevice* device )
+bool KDGanttView::loadProject( TQIODevice* device )
{
Q_ASSERT( device );
if( device->isOpen() )
device->close();
if( device->open( IO_ReadOnly ) ) {
- QDomDocument doc( "GanttView" );
- QString err;
+ TQDomDocument doc( "GanttView" );
+ TQString err;
int errline, errcol;
if ( !doc.setContent( device, &err, &errline, &errcol ) ) {
qDebug("KDGantt::Error parsing XML data at line %d. Message is:", errline );
@@ -828,8 +828,8 @@ bool KDGanttView::loadProject( QIODevice* device )
/*!
Sends a Gantt view to a printer. The printer should already be set
- up for printing (by calling QPrinter::setup()).
- If the printer is not set up, QPrinter::setup() is called before printing
+ up for printing (by calling TQPrinter::setup()).
+ If the printer is not set up, TQPrinter::setup() is called before printing
You can specify, whether the ListView, TimeLine, or Legend will be
printed. All combinations of these three widgets are allowed.
@@ -844,13 +844,13 @@ bool KDGanttView::loadProject( QIODevice* device )
\sa drawContents()
*/
-void KDGanttView::print( QPrinter* printer ,
+void KDGanttView::print( TQPrinter* printer ,
bool printListView, bool printTimeLine,
bool printLegend )
{
bool deletePrinter = false;
if (! printer ) {
- printer = new QPrinter();
+ printer = new TQPrinter();
deletePrinter = true;
if ( !printer->setup()) {
delete printer;
@@ -858,17 +858,17 @@ void KDGanttView::print( QPrinter* printer ,
}
}
// now we have a printer to print on
- QPainter p( printer );
+ TQPainter p( printer );
// get the paper metrics
- QPaintDeviceMetrics m = QPaintDeviceMetrics ( printer );
+ TQPaintDeviceMetrics m = TQPaintDeviceMetrics ( printer );
float dx, dy;
// get the size of the desired output for scaling.
// here we want to print all: ListView, TimeLine, and Legend
// for this purpose, we call drawContents() with a 0 pointer as painter
- QSize size = drawContents( 0, printListView, printTimeLine, printLegend );
+ TQSize size = drawContents( 0, printListView, printTimeLine, printLegend );
// at the top, we want to print current time/date
- QString date = "Printing Time: " + QDateTime::currentDateTime().toString();
+ TQString date = "Printing Time: " + TQDateTime::currentDateTime().toString();
int hei = p.boundingRect(0,0, 5, 5, Qt::AlignLeft, date ).height();
p.drawText( 0, 0, date );
@@ -898,7 +898,7 @@ void KDGanttView::print( QPrinter* printer ,
/*!
- Paints a Gantt view on a QPainter.
+ Paints a Gantt view on a TQPainter.
You can specify, whether the list view, the time line, or the legend
is painted.
All combinations of these three widgets are allowed.
@@ -911,7 +911,7 @@ void KDGanttView::print( QPrinter* printer ,
the scale of the painter, before calling this method with a painter.
In order to get the output fitted to your paper and your printer,
call first
- QSize size = drawContents( 0, printListView, printTimeLine, printLegend );
+ TQSize size = drawContents( 0, printListView, printTimeLine, printLegend );
//then compute the scale
dx = paper.width() / size.width();
dy = paper.height() / size.height();
@@ -936,10 +936,10 @@ void KDGanttView::print( QPrinter* printer ,
\return the size of the painted area
\sa print()
*/
-QSize KDGanttView::drawContents( QPainter* p,
+TQSize KDGanttView::drawContents( TQPainter* p,
bool drawListView , bool drawTimeLine, bool drawLegend )
{
- QSize size;
+ TQSize size;
int lvX, lvY, thX, thY, tlX, tlY, lwX, lwY, allX, allY;
lvX = myListView->contentsWidth();
lvY = myCanvasView->canvas()->height() + 20;
@@ -964,7 +964,7 @@ QSize KDGanttView::drawContents( QPainter* p,
if ( allX < lwX )
allX = lwX ;
}
- size = QSize( allX, allY );
+ size = TQSize( allX, allY );
int temp = 0;
if ( p ) {
if ( drawListView ) {
@@ -1055,7 +1055,7 @@ void KDGanttView::zoomToFit()
\sa zoomToFit()
*/
-void KDGanttView::zoomToSelection( const QDateTime& start, const QDateTime& end )
+void KDGanttView::zoomToSelection( const TQDateTime& start, const TQDateTime& end )
{
myTimeHeader->zoomToSelection( start, end);
@@ -1076,21 +1076,21 @@ void KDGanttView::ensureVisible( KDGanttViewItem* item )
/*!
- Makes sure that the specified QDateTime is in the center of the
+ Makes sure that the specified TQDateTime is in the center of the
visible Gantt chart (if possible).
If you want to center the timeline when the KDGanttView is hidden,
calling centerTimelineAfterShow() is the better alternative.
\sa center(), centerTimelineAfterShow()
*/
-void KDGanttView::centerTimeline( const QDateTime& center )
+void KDGanttView::centerTimeline( const TQDateTime& center )
{
myTimeHeader->centerDateTime( center );
}
/*!
- Makes sure that the specified QDateTime is in the center of the
+ Makes sure that the specified TQDateTime is in the center of the
visible Gantt chart (if possible). If the KDGanttView is currently
hidden, this method resets the center once again after the next
show() call. Use this method if you want to center the timeline when
@@ -1102,7 +1102,7 @@ void KDGanttView::centerTimeline( const QDateTime& center )
\sa center(), centerTimeline()
*/
-void KDGanttView::centerTimelineAfterShow( const QDateTime& center )
+void KDGanttView::centerTimelineAfterShow( const TQDateTime& center )
{
myTimeHeader->centerDateTime( center );
if ( ! isVisible() ) {
@@ -1206,13 +1206,13 @@ bool KDGanttView::showTaskLinks() const
\param font the new font of the widget
*/
-void KDGanttView::setFont(const QFont& font)
+void KDGanttView::setFont(const TQFont& font)
{
myListView->setFont(font);
myListView->repaint();
myTimeHeader->setFont(font);
myLegend->setFont( font );
- QWidget::setFont( font );
+ TQWidget::setFont( font );
setScale(scale());
}
@@ -1322,7 +1322,7 @@ void KDGanttView::setShapes( KDGanttViewItem::Type type,
bool overwriteExisting )
{
if ( overwriteExisting ) {
- QListViewItemIterator it(myListView);
+ TQListViewItemIterator it(myListView);
for ( ; it.current(); ++it ) {
if ( ((KDGanttViewItem*)it.current())->type() == type)
((KDGanttViewItem*)it.current())->setShapes(start,middle, end );
@@ -1379,12 +1379,12 @@ bool KDGanttView::shapes( KDGanttViewItem::Type type,
\sa colors(), setDefaultColors(), defaultColors()
*/
void KDGanttView::setColors( KDGanttViewItem::Type type,
- const QColor& start, const QColor& middle,
- const QColor& end,
+ const TQColor& start, const TQColor& middle,
+ const TQColor& end,
bool overwriteExisting )
{
if ( overwriteExisting ) {
- QListViewItemIterator it(myListView);
+ TQListViewItemIterator it(myListView);
for ( ; it.current(); ++it ) {
if ( ((KDGanttViewItem*)it.current())->type() == type)
((KDGanttViewItem*)it.current())->setColors(start,middle, end );
@@ -1411,7 +1411,7 @@ void KDGanttView::setColors( KDGanttViewItem::Type type,
\sa setColors(), setDefaultColor(), defaultColor()
*/
bool KDGanttView::colors( KDGanttViewItem::Type type,
- QColor& start, QColor& middle, QColor& end ) const
+ TQColor& start, TQColor& middle, TQColor& end ) const
{
int index = getIndex( type );
start = myColor [index*3];
@@ -1441,13 +1441,13 @@ bool KDGanttView::colors( KDGanttViewItem::Type type,
\sa highlightColors(), setDefaultHighlightColor(), defaultHighlightColor()
*/
void KDGanttView::setHighlightColors( KDGanttViewItem::Type type,
- const QColor& start,
- const QColor& middle,
- const QColor& end,
+ const TQColor& start,
+ const TQColor& middle,
+ const TQColor& end,
bool overwriteExisting )
{
if ( overwriteExisting ) {
- QListViewItemIterator it(myListView);
+ TQListViewItemIterator it(myListView);
for ( ; it.current(); ++it ) {
if ( ((KDGanttViewItem*)it.current())->type() == type)
((KDGanttViewItem*)it.current())->setHighlightColors(start,middle, end );
@@ -1477,8 +1477,8 @@ void KDGanttView::setHighlightColors( KDGanttViewItem::Type type,
defaultHighlightColor()
*/
bool KDGanttView::highlightColors( KDGanttViewItem::Type type,
- QColor& start, QColor& middle,
- QColor& end ) const
+ TQColor& start, TQColor& middle,
+ TQColor& end ) const
{
int index = getIndex( type );
start = myColorHL [index*3];
@@ -1495,9 +1495,9 @@ bool KDGanttView::highlightColors( KDGanttViewItem::Type type,
\param color the text color to use
\sa textColor()
*/
-void KDGanttView::setTextColor( const QColor& color )
+void KDGanttView::setTextColor( const TQColor& color )
{
- QListViewItemIterator it(myListView);
+ TQListViewItemIterator it(myListView);
for ( ; it.current(); ++it ) {
((KDGanttViewItem*)it.current())->setTextColor(color);
}
@@ -1511,7 +1511,7 @@ void KDGanttView::setTextColor( const QColor& color )
\return the color used for texts in the Gantt chart.
\sa setTextColor()
*/
-QColor KDGanttView::textColor() const
+TQColor KDGanttView::textColor() const
{
return myTextColor;
}
@@ -1527,7 +1527,7 @@ QColor KDGanttView::textColor() const
KDGanttView::noInformationBrush()
*/
-void KDGanttView::setNoInformationBrush( const QBrush& brush )
+void KDGanttView::setNoInformationBrush( const TQBrush& brush )
{
myTimeTable->setNoInformationBrush( brush );
}
@@ -1539,7 +1539,7 @@ void KDGanttView::setNoInformationBrush( const QBrush& brush )
\sa KDGanttViewItem::showNoInformation(), KDGanttViewItem::setShowNoInformation(),
setNoInformationBrush()
*/
-QBrush KDGanttView::noInformationBrush() const
+TQBrush KDGanttView::noInformationBrush() const
{
return myTimeTable->noInformationBrush();
}
@@ -1555,7 +1555,7 @@ void KDGanttView::clearLegend( )
myLegend->clearLegend();
myLegendItems->setAutoDelete( true );
delete myLegendItems;
- myLegendItems = new QPtrList<legendItem>;
+ myLegendItems = new TQPtrList<legendItem>;
}
@@ -1568,8 +1568,8 @@ void KDGanttView::clearLegend( )
\sa clearLegend()
*/
void KDGanttView::addLegendItem( KDGanttViewItem::Shape shape,
- const QColor& shapeColor,
- const QString& text )
+ const TQColor& shapeColor,
+ const TQString& text )
{
myLegend->addLegendItem( shape,shapeColor,text );
legendItem* item = new legendItem;
@@ -1587,7 +1587,7 @@ void KDGanttView::addLegendItem( KDGanttViewItem::Shape shape,
\param start the start of the horizon
\sa horizonStart()
*/
-void KDGanttView::setHorizonStart( const QDateTime& start )
+void KDGanttView::setHorizonStart( const TQDateTime& start )
{
myTimeHeader->setHorizonStart(start);
}
@@ -1599,7 +1599,7 @@ void KDGanttView::setHorizonStart( const QDateTime& start )
\return the start of the horizon of the Gantt chart
\sa setHorizonStart()
*/
-QDateTime KDGanttView::horizonStart() const
+TQDateTime KDGanttView::horizonStart() const
{
return myTimeHeader->horizonStart();
}
@@ -1612,7 +1612,7 @@ QDateTime KDGanttView::horizonStart() const
\param end the end of the horizon
\sa setHorizonEnd()
*/
-void KDGanttView::setHorizonEnd( const QDateTime& end )
+void KDGanttView::setHorizonEnd( const TQDateTime& end )
{
myTimeHeader->setHorizonEnd(end);
}
@@ -1625,7 +1625,7 @@ void KDGanttView::setHorizonEnd( const QDateTime& end )
\sa setHorizonEnd()
*/
-QDateTime KDGanttView::horizonEnd() const
+TQDateTime KDGanttView::horizonEnd() const
{
return myTimeHeader->horizonEnd();
}
@@ -1884,8 +1884,8 @@ bool KDGanttView::showMinorTicks() const
\sa columnBackgroundColor(), setWeekendBackgroundColor(),
weekendBackgroundColor()
*/
-void KDGanttView::setColumnBackgroundColor( const QDateTime& column,
- const QColor& color ,
+void KDGanttView::setColumnBackgroundColor( const TQDateTime& column,
+ const TQColor& color ,
Scale mini, Scale maxi )
{
myTimeHeader->setColumnBackgroundColor( column, color,mini,maxi );
@@ -1896,7 +1896,7 @@ void KDGanttView::setColumnBackgroundColor( const QDateTime& column,
Sets the background color for a time interval given by \a start and
\a end. \a start may be later than \a end. If there is already a
background interval with the same \a start and \a end values
- defined, the values (i.e. const QColor& color , Scale mini, Scale
+ defined, the values (i.e. const TQColor& color , Scale mini, Scale
maxi) of this background interval are changed. Change the times of
an already defined interval with \a changeBackgroundInterval().
Delete an already defined interval with \a
@@ -1918,9 +1918,9 @@ void KDGanttView::setColumnBackgroundColor( const QDateTime& column,
columnBackgroundColor(), setWeekendBackgroundColor(),
weekendBackgroundColor()
*/
-void KDGanttView::setIntervalBackgroundColor( const QDateTime& start,
- const QDateTime& end,
- const QColor& color ,
+void KDGanttView::setIntervalBackgroundColor( const TQDateTime& start,
+ const TQDateTime& end,
+ const TQColor& color ,
Scale mini, Scale maxi )
{
myTimeHeader->setIntervalBackgroundColor( start, end, color,mini,maxi );
@@ -1945,10 +1945,10 @@ void KDGanttView::setIntervalBackgroundColor( const QDateTime& start,
columnBackgroundColor(), setWeekendBackgroundColor(),
weekendBackgroundColor()
*/
-bool KDGanttView::changeBackgroundInterval( const QDateTime& oldstart,
- const QDateTime& oldend,
- const QDateTime& newstart,
- const QDateTime& newend )
+bool KDGanttView::changeBackgroundInterval( const TQDateTime& oldstart,
+ const TQDateTime& oldend,
+ const TQDateTime& newstart,
+ const TQDateTime& newend )
{
return myTimeHeader->changeBackgroundInterval( oldstart, oldend,
newstart, newend );
@@ -1963,8 +1963,8 @@ bool KDGanttView::changeBackgroundInterval( const QDateTime& oldstart,
\a start and \a end found (and hence deleted).
\sa changeBackgroundInterval(), columnBackgroundColor()
*/
-bool KDGanttView::deleteBackgroundInterval( const QDateTime& start,
- const QDateTime& end)
+bool KDGanttView::deleteBackgroundInterval( const TQDateTime& start,
+ const TQDateTime& end)
{
return myTimeHeader->deleteBackgroundInterval( start, end );
}
@@ -2002,7 +2002,7 @@ void KDGanttView::clearBackgroundColor()
\sa setColumnBackgroundColor(), setWeekendBackgroundColor(),
weekendBackgroundColor()
*/
-QColor KDGanttView::columnBackgroundColor( const QDateTime& column ) const
+TQColor KDGanttView::columnBackgroundColor( const TQDateTime& column ) const
{
return myTimeHeader->columnBackgroundColor( column ) ;
}
@@ -2016,7 +2016,7 @@ QColor KDGanttView::columnBackgroundColor( const QDateTime& column ) const
\param color the background color to use for weekend days.
\sa weekendBackgroundColor(), setWeekendDays(), weekendDays()
*/
-void KDGanttView::setWeekendBackgroundColor( const QColor& color )
+void KDGanttView::setWeekendBackgroundColor( const TQColor& color )
{
myTimeHeader->setWeekendBackgroundColor( color );
}
@@ -2028,7 +2028,7 @@ void KDGanttView::setWeekendBackgroundColor( const QColor& color )
\return the background color for weekend days
\sa setWeekendBackgroundColor(), setWeekendDays(), weekendDays()
*/
-QColor KDGanttView::weekendBackgroundColor() const
+TQColor KDGanttView::weekendBackgroundColor() const
{
return myTimeHeader->weekendBackgroundColor();
}
@@ -2044,7 +2044,7 @@ QColor KDGanttView::weekendBackgroundColor() const
\param weekday the day of the week (Monday = 1, Sunday = 7)
\sa weekendBackgroundColor(), setWeekendDays(), weekendDays()
*/
-void KDGanttView::setWeekdayBackgroundColor( const QColor& color, int weekday )
+void KDGanttView::setWeekdayBackgroundColor( const TQColor& color, int weekday )
{
myTimeHeader->setWeekdayBackgroundColor( color, weekday );
}
@@ -2057,7 +2057,7 @@ void KDGanttView::setWeekdayBackgroundColor( const QColor& color, int weekday )
\return the background color for weekend days
\sa setWeekendBackgroundColor(), setWeekendDays(), weekendDays()
*/
-QColor KDGanttView::weekdayBackgroundColor(int weekday) const
+TQColor KDGanttView::weekdayBackgroundColor(int weekday) const
{
return myTimeHeader->weekdayBackgroundColor( weekday);
}
@@ -2249,11 +2249,11 @@ int KDGanttView::minorScaleCount() const
\sa defaultColor(), setColors(), colors()
*/
void KDGanttView::setDefaultColor( KDGanttViewItem::Type type,
- const QColor& color,
+ const TQColor& color,
bool overwriteExisting )
{
if ( overwriteExisting ) {
- QListViewItemIterator it(myListView);
+ TQListViewItemIterator it(myListView);
for ( ; it.current(); ++it ) {
if ( ((KDGanttViewItem*)it.current())->type() == type)
((KDGanttViewItem*)it.current())->setDefaultColor(color );
@@ -2275,7 +2275,7 @@ void KDGanttView::setDefaultColor( KDGanttViewItem::Type type,
\return color the default color used
\sa setDefaultColor(), setColors(), colors()
*/
-QColor KDGanttView::defaultColor( KDGanttViewItem::Type type ) const
+TQColor KDGanttView::defaultColor( KDGanttViewItem::Type type ) const
{
int index = getIndex( type );
return myDefaultColor [index];
@@ -2295,11 +2295,11 @@ QColor KDGanttView::defaultColor( KDGanttViewItem::Type type ) const
\sa defaultHighlightColor(), setHighlightColors(), highlightColors()
*/
void KDGanttView::setDefaultHighlightColor( KDGanttViewItem::Type type,
- const QColor& color,
+ const TQColor& color,
bool overwriteExisting )
{
if ( overwriteExisting ) {
- QListViewItemIterator it(myListView);
+ TQListViewItemIterator it(myListView);
for ( ; it.current(); ++it ) {
if ( ((KDGanttViewItem*)it.current())->type() == type)
((KDGanttViewItem*)it.current())->setDefaultHighlightColor(color );
@@ -2321,7 +2321,7 @@ void KDGanttView::setDefaultHighlightColor( KDGanttViewItem::Type type,
\return color the default highlighting color used
\sa setDefaultHighlightColor(), setHighlightColors(), highlightColors()
*/
-QColor KDGanttView::defaultHighlightColor( KDGanttViewItem::Type type ) const
+TQColor KDGanttView::defaultHighlightColor( KDGanttViewItem::Type type ) const
{
int index = getIndex( type );
return myDefaultColorHL [index];
@@ -2386,7 +2386,7 @@ bool KDGanttView::calendarMode() const
*/
void KDGanttView::setDisplaySubitemsAsGroup( bool show )
{
- QListViewItemIterator it( myListView );
+ TQListViewItemIterator it( myListView );
for ( ; it.current(); ++it ) {
KDGanttViewItem* currentItem = ( KDGanttViewItem* )it.current();
currentItem->setDisplaySubitemsAsGroup( show );
@@ -2437,7 +2437,7 @@ bool KDGanttView::displayEmptyTasksAsLine() const
/*!
Defines the horizontal background lines of the Gantt chart.
Call setHorBackgroundLines()
- (equivalent to setHorBackgroundLines( 2, QBrush( QColor ( 240,240,240 )) ) )
+ (equivalent to setHorBackgroundLines( 2, TQBrush( TQColor ( 240,240,240 )) ) )
to draw a light grey horizontal background line for every second Gantt item.
Call setHorBackgroundLines(0) in order to not show horizontal
background lines.
@@ -2448,7 +2448,7 @@ bool KDGanttView::displayEmptyTasksAsLine() const
for count < 2, no background lines are drawn
\param brush the brush of the lines
*/
-void KDGanttView::setHorBackgroundLines( int count, QBrush brush )
+void KDGanttView::setHorBackgroundLines( int count, TQBrush brush )
{
myTimeTable->setHorBackgroundLines( count, brush );
}
@@ -2463,7 +2463,7 @@ void KDGanttView::setHorBackgroundLines( int count, QBrush brush )
if 0 is returned, no backgroud lines are drawn
*/
-int KDGanttView::horBackgroundLines( QBrush& brush )
+int KDGanttView::horBackgroundLines( TQBrush& brush )
{
return myTimeTable->horBackgroundLines( brush );
}
@@ -2485,7 +2485,7 @@ KDGanttViewItem* KDGanttView::lastItem() const
\return the list of task links in the Gantt view
*/
-QPtrList<KDGanttViewTaskLink> KDGanttView::taskLinks() const
+TQPtrList<KDGanttViewTaskLink> KDGanttView::taskLinks() const
{
return myTimeTable->taskLinks();
@@ -2497,7 +2497,7 @@ QPtrList<KDGanttViewTaskLink> KDGanttView::taskLinks() const
\return the list of task link groups in the Gantt view
*/
-QPtrList<KDGanttViewTaskLinkGroup> KDGanttView::taskLinkGroups() const
+TQPtrList<KDGanttViewTaskLinkGroup> KDGanttView::taskLinkGroups() const
{
return myTaskLinkGroupList;
}
@@ -2510,14 +2510,14 @@ QPtrList<KDGanttViewTaskLinkGroup> KDGanttView::taskLinkGroups() const
format error occurred
\sa saveXML
*/
-bool KDGanttView::loadXML( const QDomDocument& doc )
+bool KDGanttView::loadXML( const TQDomDocument& doc )
{
- QDomElement docRoot = doc.documentElement(); // ChartParams element
- QDomNode node = docRoot.firstChild();
+ TQDomElement docRoot = doc.documentElement(); // ChartParams element
+ TQDomNode node = docRoot.firstChild();
while( !node.isNull() ) {
- QDomElement element = node.toElement();
+ TQDomElement element = node.toElement();
if( !element.isNull() ) { // was really an element
- QString tagName = element.tagName();
+ TQString tagName = element.tagName();
if( tagName == "ShowLegend" ) {
bool value;
if( KDGanttXML::readBoolNode( element, value ) )
@@ -2551,35 +2551,35 @@ bool KDGanttView::loadXML( const QDomDocument& doc )
if( KDGanttXML::readBoolNode( element, value ) )
setDisplayEmptyTasksAsLine( value );
} else if( tagName == "GlobalFont" ) {
- QFont font;
+ TQFont font;
if( KDGanttXML::readFontNode( element, font ) )
setFont( font );
} else if( tagName == "HorizonStart" ) {
- QDateTime value;
+ TQDateTime value;
if( KDGanttXML::readDateTimeNode( element, value ) )
setHorizonStart( value );
} else if( tagName == "HorizonEnd" ) {
- QDateTime value;
+ TQDateTime value;
if( KDGanttXML::readDateTimeNode( element, value ) )
setHorizonEnd( value );
} else if( tagName == "Scale" ) {
- QString value;
+ TQString value;
if( KDGanttXML::readStringNode( element, value ) )
setScale( stringToScale( value ) );
} else if( tagName == "MinimumScale" ) {
- QString value;
+ TQString value;
if( KDGanttXML::readStringNode( element, value ) )
setMinimumScale( stringToScale( value ) );
} else if( tagName == "MaximumScale" ) {
- QString value;
+ TQString value;
if( KDGanttXML::readStringNode( element, value ) )
setMaximumScale( stringToScale( value ) );
} else if( tagName == "YearFormat" ) {
- QString value;
+ TQString value;
if( KDGanttXML::readStringNode( element, value ) )
setYearFormat( stringToYearFormat( value ) );
} else if( tagName == "HourFormat" ) {
- QString value;
+ TQString value;
if( KDGanttXML::readStringNode( element, value ) )
setHourFormat( stringToHourFormat( value ) );
} else if( tagName == "ShowMinorTicks" ) {
@@ -2607,7 +2607,7 @@ bool KDGanttView::loadXML( const QDomDocument& doc )
if( KDGanttXML::readBoolNode( element, value ) )
setEditable( value );
} else if( tagName == "TextColor" ) {
- QColor value;
+ TQColor value;
if( KDGanttXML::readColorNode( element, value ) )
setTextColor( value );
} else if( tagName == "MajorScaleCount" ) {
@@ -2631,43 +2631,43 @@ bool KDGanttView::loadXML( const QDomDocument& doc )
if( KDGanttXML::readIntNode( element, value ) )
setGanttMaximumWidth( value );
} else if( tagName == "NoInformationBrush" ) {
- QBrush value;
+ TQBrush value;
if( KDGanttXML::readBrushNode( element, value ) )
setNoInformationBrush( value );
} else if( tagName == "GanttViewBackgroundColor" ) {
- QColor value;
+ TQColor value;
if( KDGanttXML::readColorNode( element, value ) )
setGvBackgroundColor( value );
} else if( tagName == "ListViewBackgroundColor" ) {
- QColor value;
+ TQColor value;
if( KDGanttXML::readColorNode( element, value ) )
setLvBackgroundColor( value );
} else if( tagName == "TimeHeaderBackgroundColor" ) {
- QColor value;
+ TQColor value;
if( KDGanttXML::readColorNode( element, value ) )
setTimeHeaderBackgroundColor( value );
} else if( tagName == "LegendHeaderBackgroundColor" ) {
- QColor value;
+ TQColor value;
if( KDGanttXML::readColorNode( element, value ) )
setLegendHeaderBackgroundColor( value );
} else if( tagName == "WeekendBackgroundColor" ) {
- QColor value;
+ TQColor value;
if( KDGanttXML::readColorNode( element, value ) )
setWeekendBackgroundColor( value );
} else if( tagName == "WeekdayBackgroundColor" ) {
- QDomNode node = element.firstChild();
+ TQDomNode node = element.firstChild();
int day = 0;
- QColor color;
+ TQColor color;
while( !node.isNull() ) {
- QDomElement element = node.toElement();
+ TQDomElement element = node.toElement();
if( !element.isNull() ) { // was really an elemente
- QString tagName = element.tagName();
+ TQString tagName = element.tagName();
if( tagName == "Day" ) {
int value;
if( KDGanttXML::readIntNode( element, value ) )
day = value;
} else if( tagName == "Color" ) {
- QColor value;
+ TQColor value;
if( KDGanttXML::readColorNode( element, value ) )
color = value;
} else {
@@ -2681,8 +2681,8 @@ bool KDGanttView::loadXML( const QDomDocument& doc )
if( day && color.isValid() )
setWeekdayBackgroundColor( color, day );
} else if( tagName == "WeekendDays" ) {
- QString startString = element.attribute( "Start" );
- QString endString = element.attribute( "End" );
+ TQString startString = element.attribute( "Start" );
+ TQString endString = element.attribute( "End" );
bool startOk = false, endOk = false;
int start = startString.toInt( &startOk );
int end = startString.toInt( &endOk );
@@ -2701,36 +2701,36 @@ bool KDGanttView::loadXML( const QDomDocument& doc )
if( KDGanttXML::readBoolNode( element, value ) )
setShowTimeTablePopupMenu( value );
} else if( tagName == "Shapes" ) {
- QDomNode node = element.firstChild();
+ TQDomNode node = element.firstChild();
bool undefinedShape = false;
while( !node.isNull() ) {
- QDomElement element = node.toElement();
+ TQDomElement element = node.toElement();
if( !element.isNull() ) { // was really an elemente
- QString tagName = element.tagName();
+ TQString tagName = element.tagName();
if( tagName == "Event" ) {
KDGanttViewItem::Shape startShape, middleShape, endShape;
startShape = KDGanttViewItem::TriangleDown;
middleShape = KDGanttViewItem::TriangleDown;
endShape = KDGanttViewItem::TriangleDown;
- QDomNode node = element.firstChild();
+ TQDomNode node = element.firstChild();
while( !node.isNull() ) {
- QDomElement element = node.toElement();
+ TQDomElement element = node.toElement();
if( !element.isNull() ) { // was really an elemente
- QString tagName = element.tagName();
+ TQString tagName = element.tagName();
if( tagName == "Start" ) {
- QString value;
+ TQString value;
if( KDGanttXML::readStringNode( element, value ) )
startShape = KDGanttViewItem::stringToShape( value );
if ( value == "Undefined" )
undefinedShape = true;
} else if( tagName == "Middle" ) {
- QString value;
+ TQString value;
if( KDGanttXML::readStringNode( element, value ) )
middleShape = KDGanttViewItem::stringToShape( value );
if ( value == "Undefined" )
undefinedShape = true;
} else if( tagName == "End" ) {
- QString value;
+ TQString value;
if( KDGanttXML::readStringNode( element, value ) )
endShape = KDGanttViewItem::stringToShape( value );
if ( value == "Undefined" )
@@ -2751,25 +2751,25 @@ bool KDGanttView::loadXML( const QDomDocument& doc )
startShape = KDGanttViewItem::TriangleDown;
middleShape = KDGanttViewItem::TriangleDown;
endShape = KDGanttViewItem::TriangleDown;
- QDomNode node = element.firstChild();
+ TQDomNode node = element.firstChild();
while( !node.isNull()) {
- QDomElement element = node.toElement();
+ TQDomElement element = node.toElement();
if( !element.isNull() ) { // was really an elemente
- QString tagName = element.tagName();
+ TQString tagName = element.tagName();
if( tagName == "Start" ) {
- QString value;
+ TQString value;
if( KDGanttXML::readStringNode( element, value ) )
startShape = KDGanttViewItem::stringToShape( value );
if ( value == "Undefined" )
undefinedShape = true;
} else if( tagName == "Middle" ) {
- QString value;
+ TQString value;
if( KDGanttXML::readStringNode( element, value ) )
middleShape = KDGanttViewItem::stringToShape( value );
if ( value == "Undefined" )
undefinedShape = true;
} else if( tagName == "End" ) {
- QString value;
+ TQString value;
if( KDGanttXML::readStringNode( element, value ) )
endShape = KDGanttViewItem::stringToShape( value );
if ( value == "Undefined" )
@@ -2789,25 +2789,25 @@ bool KDGanttView::loadXML( const QDomDocument& doc )
startShape = KDGanttViewItem::TriangleDown;
middleShape = KDGanttViewItem::TriangleDown;
endShape = KDGanttViewItem::TriangleDown;
- QDomNode node = element.firstChild();
+ TQDomNode node = element.firstChild();
while( !node.isNull() ) {
- QDomElement element = node.toElement();
+ TQDomElement element = node.toElement();
if( !element.isNull() ) { // was really an elemente
- QString tagName = element.tagName();
+ TQString tagName = element.tagName();
if( tagName == "Start" ) {
- QString value;
+ TQString value;
if( KDGanttXML::readStringNode( element, value ) )
startShape = KDGanttViewItem::stringToShape( value );
if ( value == "Undefined" )
undefinedShape = true;
} else if( tagName == "Middle" ) {
- QString value;
+ TQString value;
if( KDGanttXML::readStringNode( element, value ) )
middleShape = KDGanttViewItem::stringToShape( value );
if ( value == "Undefined" )
undefinedShape = true;
} else if( tagName == "End" ) {
- QString value;
+ TQString value;
if( KDGanttXML::readStringNode( element, value ) )
endShape = KDGanttViewItem::stringToShape( value );
if ( value == "Undefined" )
@@ -2831,28 +2831,28 @@ bool KDGanttView::loadXML( const QDomDocument& doc )
node = node.nextSibling();
}
} else if( tagName == "Colors" ) {
- QDomNode node = element.firstChild();
+ TQDomNode node = element.firstChild();
while( !node.isNull()) {
- QDomElement element = node.toElement();
+ TQDomElement element = node.toElement();
if( !element.isNull() ) { // was really an elemente
- QString tagName = element.tagName();
+ TQString tagName = element.tagName();
if( tagName == "Event" ) {
- QColor startColor, middleColor, endColor;
- QDomNode node = element.firstChild();
+ TQColor startColor, middleColor, endColor;
+ TQDomNode node = element.firstChild();
while( !node.isNull() ) {
- QDomElement element = node.toElement();
+ TQDomElement element = node.toElement();
if( !element.isNull() ) { // was really an elemente
- QString tagName = element.tagName();
+ TQString tagName = element.tagName();
if( tagName == "Start" ) {
- QColor value;
+ TQColor value;
if( KDGanttXML::readColorNode( element, value ) )
startColor = value;
} else if( tagName == "Middle" ) {
- QColor value;
+ TQColor value;
if( KDGanttXML::readColorNode( element, value ) )
middleColor = value;
} else if( tagName == "End" ) {
- QColor value;
+ TQColor value;
if( KDGanttXML::readColorNode( element, value ) )
endColor = value;
} else {
@@ -2865,22 +2865,22 @@ bool KDGanttView::loadXML( const QDomDocument& doc )
setColors( KDGanttViewItem::Event, startColor,
middleColor, endColor, false );
} else if( tagName == "Task" ) {
- QColor startColor, middleColor, endColor;
- QDomNode node = element.firstChild();
+ TQColor startColor, middleColor, endColor;
+ TQDomNode node = element.firstChild();
while( !node.isNull() ) {
- QDomElement element = node.toElement();
+ TQDomElement element = node.toElement();
if( !element.isNull() ) { // was really an elemente
- QString tagName = element.tagName();
+ TQString tagName = element.tagName();
if( tagName == "Start" ) {
- QColor value;
+ TQColor value;
if( KDGanttXML::readColorNode( element, value ) )
startColor = value;
} else if( tagName == "Middle" ) {
- QColor value;
+ TQColor value;
if( KDGanttXML::readColorNode( element, value ) )
middleColor = value;
} else if( tagName == "End" ) {
- QColor value;
+ TQColor value;
if( KDGanttXML::readColorNode( element, value ) )
endColor = value;
} else {
@@ -2893,22 +2893,22 @@ bool KDGanttView::loadXML( const QDomDocument& doc )
setColors( KDGanttViewItem::Task, startColor,
middleColor, endColor, false );
} else if( tagName == "Summary" ) {
- QColor startColor, middleColor, endColor;
- QDomNode node = element.firstChild();
+ TQColor startColor, middleColor, endColor;
+ TQDomNode node = element.firstChild();
while( !node.isNull() ) {
- QDomElement element = node.toElement();
+ TQDomElement element = node.toElement();
if( !element.isNull() ) { // was really an elemente
- QString tagName = element.tagName();
+ TQString tagName = element.tagName();
if( tagName == "Start" ) {
- QColor value;
+ TQColor value;
if( KDGanttXML::readColorNode( element, value ) )
startColor = value;
} else if( tagName == "Middle" ) {
- QColor value;
+ TQColor value;
if( KDGanttXML::readColorNode( element, value ) )
middleColor = value;
} else if( tagName == "End" ) {
- QColor value;
+ TQColor value;
if( KDGanttXML::readColorNode( element, value ) )
endColor = value;
} else {
@@ -2928,23 +2928,23 @@ bool KDGanttView::loadXML( const QDomDocument& doc )
node = node.nextSibling();
}
} else if( tagName == "DefaultColors" ) {
- QDomNode node = element.firstChild();
+ TQDomNode node = element.firstChild();
while( !node.isNull() ) {
- QDomElement element = node.toElement();
+ TQDomElement element = node.toElement();
if( !element.isNull() ) { // was really an element
- QString tagName = element.tagName();
+ TQString tagName = element.tagName();
if( tagName == "Event" ) {
- QColor value;
+ TQColor value;
if( KDGanttXML::readColorNode( element, value ) )
setDefaultColor( KDGanttViewItem::Event,
value, false );
} else if( tagName == "Task" ) {
- QColor value;
+ TQColor value;
if( KDGanttXML::readColorNode( element, value ) )
setDefaultColor( KDGanttViewItem::Task,
value, false );
} else if( tagName == "Summary" ) {
- QColor value;
+ TQColor value;
if( KDGanttXML::readColorNode( element, value ) )
setDefaultColor( KDGanttViewItem::Summary,
value , false);
@@ -2957,28 +2957,28 @@ bool KDGanttView::loadXML( const QDomDocument& doc )
node = node.nextSibling();
}
} else if( tagName == "HighlightColors" ) {
- QDomNode node = element.firstChild();
+ TQDomNode node = element.firstChild();
while( !node.isNull() ) {
- QDomElement element = node.toElement();
+ TQDomElement element = node.toElement();
if( !element.isNull() ) { // was really an elemente
- QString tagName = element.tagName();
+ TQString tagName = element.tagName();
if( tagName == "Event" ) {
- QColor startColor, middleColor, endColor;
- QDomNode node = element.firstChild();
+ TQColor startColor, middleColor, endColor;
+ TQDomNode node = element.firstChild();
while( !node.isNull() ) {
- QDomElement element = node.toElement();
+ TQDomElement element = node.toElement();
if( !element.isNull() ) { // was really an elemente
- QString tagName = element.tagName();
+ TQString tagName = element.tagName();
if( tagName == "Start" ) {
- QColor value;
+ TQColor value;
if( KDGanttXML::readColorNode( element, value ) )
startColor = value;
} else if( tagName == "Middle" ) {
- QColor value;
+ TQColor value;
if( KDGanttXML::readColorNode( element, value ) )
middleColor = value;
} else if( tagName == "End" ) {
- QColor value;
+ TQColor value;
if( KDGanttXML::readColorNode( element, value ) )
endColor = value;
} else {
@@ -2992,22 +2992,22 @@ bool KDGanttView::loadXML( const QDomDocument& doc )
startColor,
middleColor, endColor, false );
} else if( tagName == "Task" ) {
- QColor startColor, middleColor, endColor;
- QDomNode node = element.firstChild();
+ TQColor startColor, middleColor, endColor;
+ TQDomNode node = element.firstChild();
while( !node.isNull() ) {
- QDomElement element = node.toElement();
+ TQDomElement element = node.toElement();
if( !element.isNull() ) { // was really an elemente
- QString tagName = element.tagName();
+ TQString tagName = element.tagName();
if( tagName == "Start" ) {
- QColor value;
+ TQColor value;
if( KDGanttXML::readColorNode( element, value ) )
startColor = value;
} else if( tagName == "Middle" ) {
- QColor value;
+ TQColor value;
if( KDGanttXML::readColorNode( element, value ) )
middleColor = value;
} else if( tagName == "End" ) {
- QColor value;
+ TQColor value;
if( KDGanttXML::readColorNode( element, value ) )
endColor = value;
} else {
@@ -3021,22 +3021,22 @@ bool KDGanttView::loadXML( const QDomDocument& doc )
startColor,
middleColor, endColor , false);
} else if( tagName == "Summary" ) {
- QColor startColor, middleColor, endColor;
- QDomNode node = element.firstChild();
+ TQColor startColor, middleColor, endColor;
+ TQDomNode node = element.firstChild();
while( !node.isNull() ) {
- QDomElement element = node.toElement();
+ TQDomElement element = node.toElement();
if( !element.isNull() ) { // was really an elemente
- QString tagName = element.tagName();
+ TQString tagName = element.tagName();
if( tagName == "Start" ) {
- QColor value;
+ TQColor value;
if( KDGanttXML::readColorNode( element, value ) )
startColor = value;
} else if( tagName == "Middle" ) {
- QColor value;
+ TQColor value;
if( KDGanttXML::readColorNode( element, value ) )
middleColor = value;
} else if( tagName == "End" ) {
- QColor value;
+ TQColor value;
if( KDGanttXML::readColorNode( element, value ) )
endColor = value;
} else {
@@ -3057,23 +3057,23 @@ bool KDGanttView::loadXML( const QDomDocument& doc )
node = node.nextSibling();
}
} else if( tagName == "DefaultHighlightColors" ) {
- QDomNode node = element.firstChild();
+ TQDomNode node = element.firstChild();
while( !node.isNull() ) {
- QDomElement element = node.toElement();
+ TQDomElement element = node.toElement();
if( !element.isNull() ) { // was really an element
- QString tagName = element.tagName();
+ TQString tagName = element.tagName();
if( tagName == "Event" ) {
- QColor value;
+ TQColor value;
if( KDGanttXML::readColorNode( element, value ) )
setDefaultHighlightColor( KDGanttViewItem::Event,
value , false);
} else if( tagName == "Task" ) {
- QColor value;
+ TQColor value;
if( KDGanttXML::readColorNode( element, value ) )
setDefaultHighlightColor( KDGanttViewItem::Task,
value, false );
} else if( tagName == "Summary" ) {
- QColor value;
+ TQColor value;
if( KDGanttXML::readColorNode( element, value ) )
setDefaultHighlightColor( KDGanttViewItem::Summary,
value, false );
@@ -3086,12 +3086,12 @@ bool KDGanttView::loadXML( const QDomDocument& doc )
node = node.nextSibling();
}
} else if( tagName == "Items" ) {
- QDomNode node = element.firstChild();
+ TQDomNode node = element.firstChild();
KDGanttViewItem* previous = 0;
while( !node.isNull() ) {
- QDomElement element = node.toElement();
+ TQDomElement element = node.toElement();
if( !element.isNull() ) { // was really an element
- QString tagName = element.tagName();
+ TQString tagName = element.tagName();
if( tagName == "Item" ) {
KDGanttViewItem* newItem;
if( previous )
@@ -3113,11 +3113,11 @@ bool KDGanttView::loadXML( const QDomDocument& doc )
node = node.nextSibling();
}
} else if( tagName == "TaskLinks" ) {
- QDomNode node = element.firstChild();
+ TQDomNode node = element.firstChild();
while( !node.isNull() ) {
- QDomElement element = node.toElement();
+ TQDomElement element = node.toElement();
if( !element.isNull() ) { // was really an element
- QString tagName = element.tagName();
+ TQString tagName = element.tagName();
if( tagName == "TaskLink" )
KDGanttViewTaskLink::createFromDomElement( element );
else {
@@ -3129,11 +3129,11 @@ bool KDGanttView::loadXML( const QDomDocument& doc )
node = node.nextSibling();
}
} else if( tagName == "TaskLinkGroups" ) {
- QDomNode node = element.firstChild();
+ TQDomNode node = element.firstChild();
while( !node.isNull() ) {
- QDomElement element = node.toElement();
+ TQDomElement element = node.toElement();
if( !element.isNull() ) { // was really an element
- QString tagName = element.tagName();
+ TQString tagName = element.tagName();
if( tagName == "TaskLink" )
KDGanttViewTaskLinkGroup::createFromDomElement( element );
} else {
@@ -3144,27 +3144,27 @@ bool KDGanttView::loadXML( const QDomDocument& doc )
node = node.nextSibling();
}
} else if( tagName == "ColumnBackgroundColors" ) {
- QDomNode node = element.firstChild();
+ TQDomNode node = element.firstChild();
while( !node.isNull() ) {
- QDomElement element = node.toElement();
+ TQDomElement element = node.toElement();
if( !element.isNull() ) { // was really an element
- QString tagName = element.tagName();
+ TQString tagName = element.tagName();
if( tagName == "ColumnBackgroundColor" ) {
- QDomNode node = element.firstChild();
- QDateTime dateTime;
- QColor color;
+ TQDomNode node = element.firstChild();
+ TQDateTime dateTime;
+ TQColor color;
while( !node.isNull() ) {
- QDomElement element = node.toElement();
+ TQDomElement element = node.toElement();
if( !element.isNull() ) { // was
// really an
// element
- QString tagName = element.tagName();
+ TQString tagName = element.tagName();
if( tagName == "DateTime" ) {
- QDateTime value;
+ TQDateTime value;
if( KDGanttXML::readDateTimeNode( element, value ) )
dateTime = value;
} else if( tagName == "Color" ) {
- QColor value;
+ TQColor value;
if( KDGanttXML::readColorNode( element, value ) )
color = value;
} else {
@@ -3185,36 +3185,36 @@ bool KDGanttView::loadXML( const QDomDocument& doc )
}
} else if( tagName == "LegendItems" ) {
clearLegend();
- QDomNode node = element.firstChild();
+ TQDomNode node = element.firstChild();
while( !node.isNull() ) {
- QDomElement element = node.toElement();
+ TQDomElement element = node.toElement();
if( !element.isNull() ) { // was really an element
- QString tagName = element.tagName();
+ TQString tagName = element.tagName();
if( tagName == "LegendItem" ) {
KDGanttViewItem::Shape tempLegendShape;
tempLegendShape = KDGanttViewItem::TriangleDown;
- QColor tempLegendColor;
- QString tempLegendString;
+ TQColor tempLegendColor;
+ TQString tempLegendString;
bool ok = true;
- QDomNode node = element.firstChild();
+ TQDomNode node = element.firstChild();
while( !node.isNull() ) {
- QDomElement element = node.toElement();
+ TQDomElement element = node.toElement();
if( !element.isNull() ) { // was really an element
- QString tagName = element.tagName();
+ TQString tagName = element.tagName();
if( tagName == "Shape" ) {
- QString value;
+ TQString value;
if( KDGanttXML::readStringNode( element, value ) )
tempLegendShape = KDGanttViewItem::stringToShape( value );
else
ok = false;
} else if( tagName == "Color" ) {
- QColor value;
+ TQColor value;
if( KDGanttXML::readColorNode( element, value ) )
tempLegendColor = value;
else
ok = false;
} else if( tagName == "Text" ) {
- QString value;
+ TQString value;
if( KDGanttXML::readStringNode( element, value ) )
tempLegendString = value;
else
@@ -3259,19 +3259,19 @@ bool KDGanttView::loadXML( const QDomDocument& doc )
\return the XML document that represents the parameters
\sa loadXML
*/
-QDomDocument KDGanttView::saveXML( bool withPI ) const
+TQDomDocument KDGanttView::saveXML( bool withPI ) const
{
// Create an inital DOM document
- QString docstart = "<GanttView/>";
+ TQString docstart = "<GanttView/>";
- QDomDocument doc( "GanttView" );
+ TQDomDocument doc( "GanttView" );
doc.setContent( docstart );
if( withPI ) {
- QDomProcessingInstruction pin = doc.createProcessingInstruction( "kdgantt", "version=\"1.0\" encoding=\"UTF-8\"" ) ;
+ TQDomProcessingInstruction pin = doc.createProcessingInstruction( "kdgantt", "version=\"1.0\" encoding=\"UTF-8\"" ) ;
doc.appendChild ( pin );
}
- QDomElement docRoot = doc.documentElement();
+ TQDomElement docRoot = doc.documentElement();
docRoot.setAttribute( "xmlns", "http://www.klaralvdalens-datakonsult.se/kdgantt" );
docRoot.setAttribute( "xmlns:xsi", "http://www.w3.org/2000/10/XMLSchema-instance" );
docRoot.setAttribute( "xsi:schemaLocation", "http://www.klaralvdalens-datakonsult.se/kdgantt" );
@@ -3383,9 +3383,9 @@ QDomDocument KDGanttView::saveXML( bool withPI ) const
// the WeekdayBackgroundColor elements
for( int weekday = 1; weekday <= 7; weekday++ ) {
- QColor color = weekdayBackgroundColor( weekday );
+ TQColor color = weekdayBackgroundColor( weekday );
if( color.isValid() ) {
- QDomElement weekendBackgroundColorElement = doc.createElement( "WeekdayBackgroundColor" );
+ TQDomElement weekendBackgroundColorElement = doc.createElement( "WeekdayBackgroundColor" );
docRoot.appendChild( weekendBackgroundColorElement );
KDGanttXML::createIntNode( doc, weekendBackgroundColorElement,
"Day", weekday );
@@ -3395,7 +3395,7 @@ QDomDocument KDGanttView::saveXML( bool withPI ) const
}
// the WeekendDays element
- QDomElement weekendDaysElement = doc.createElement( "WeekendDays" );
+ TQDomElement weekendDaysElement = doc.createElement( "WeekendDays" );
docRoot.appendChild( weekendDaysElement );
int weekendStart, weekendEnd;
weekendDays( weekendStart, weekendEnd );
@@ -3415,9 +3415,9 @@ QDomDocument KDGanttView::saveXML( bool withPI ) const
showTimeTablePopupMenu() );
// the Shapes element
- QDomElement shapesElement = doc.createElement( "Shapes" );
+ TQDomElement shapesElement = doc.createElement( "Shapes" );
docRoot.appendChild( shapesElement );
- QDomElement shapesEventElement = doc.createElement( "Event" );
+ TQDomElement shapesEventElement = doc.createElement( "Event" );
shapesElement.appendChild( shapesEventElement );
KDGanttViewItem::Shape start, middle, end;
if( shapes( KDGanttViewItem::Event, start, middle, end ) ) {
@@ -3435,7 +3435,7 @@ QDomDocument KDGanttView::saveXML( bool withPI ) const
KDGanttXML::createStringNode( doc, shapesEventElement, "End",
"Undefined" );
}
- QDomElement shapesTaskElement = doc.createElement( "Task" );
+ TQDomElement shapesTaskElement = doc.createElement( "Task" );
shapesElement.appendChild( shapesTaskElement );
if( shapes( KDGanttViewItem::Task, start, middle, end ) ) {
KDGanttXML::createStringNode( doc, shapesTaskElement, "Start",
@@ -3452,7 +3452,7 @@ QDomDocument KDGanttView::saveXML( bool withPI ) const
KDGanttXML::createStringNode( doc, shapesTaskElement, "End",
"Undefined" );
}
- QDomElement shapesSummaryElement = doc.createElement( "Summary" );
+ TQDomElement shapesSummaryElement = doc.createElement( "Summary" );
shapesElement.appendChild( shapesSummaryElement );
if( shapes( KDGanttViewItem::Event, start, middle, end ) ) {
KDGanttXML::createStringNode( doc, shapesSummaryElement, "Start",
@@ -3471,22 +3471,22 @@ QDomDocument KDGanttView::saveXML( bool withPI ) const
}
// the Colors element
- QDomElement colorsElement = doc.createElement( "Colors" );
+ TQDomElement colorsElement = doc.createElement( "Colors" );
docRoot.appendChild( colorsElement );
- QDomElement colorsEventElement = doc.createElement( "Event" );
+ TQDomElement colorsEventElement = doc.createElement( "Event" );
colorsElement.appendChild( colorsEventElement );
- QColor startColor, middleColor, endColor;
+ TQColor startColor, middleColor, endColor;
colors( KDGanttViewItem::Event, startColor, middleColor, endColor );
KDGanttXML::createColorNode( doc, colorsEventElement, "Start", startColor );
KDGanttXML::createColorNode( doc, colorsEventElement, "Middle", middleColor );
KDGanttXML::createColorNode( doc, colorsEventElement, "End", endColor );
- QDomElement colorsTaskElement = doc.createElement( "Task" );
+ TQDomElement colorsTaskElement = doc.createElement( "Task" );
colorsElement.appendChild( colorsTaskElement );
colors( KDGanttViewItem::Task, startColor, middleColor, endColor );
KDGanttXML::createColorNode( doc, colorsTaskElement, "Start", startColor );
KDGanttXML::createColorNode( doc, colorsTaskElement, "Middle", middleColor );
KDGanttXML::createColorNode( doc, colorsTaskElement, "End", endColor );
- QDomElement colorsSummaryElement = doc.createElement( "Summary" );
+ TQDomElement colorsSummaryElement = doc.createElement( "Summary" );
colorsElement.appendChild( colorsSummaryElement );
colors( KDGanttViewItem::Event, startColor, middleColor, endColor );
KDGanttXML::createColorNode( doc, colorsSummaryElement, "Start", startColor );
@@ -3494,7 +3494,7 @@ QDomDocument KDGanttView::saveXML( bool withPI ) const
KDGanttXML::createColorNode( doc, colorsSummaryElement, "End", endColor );
// the DefaultColor element
- QDomElement defaultColorsElement = doc.createElement( "DefaultColors" );
+ TQDomElement defaultColorsElement = doc.createElement( "DefaultColors" );
docRoot.appendChild( defaultColorsElement );
KDGanttXML::createColorNode( doc, defaultColorsElement, "Event",
defaultColor( KDGanttViewItem::Event ) );
@@ -3505,21 +3505,21 @@ QDomDocument KDGanttView::saveXML( bool withPI ) const
// the HighlightColors element
- QDomElement highlightColorsElement = doc.createElement( "HighlightColors" );
+ TQDomElement highlightColorsElement = doc.createElement( "HighlightColors" );
docRoot.appendChild( highlightColorsElement );
- QDomElement highlightColorsEventElement = doc.createElement( "Event" );
+ TQDomElement highlightColorsEventElement = doc.createElement( "Event" );
highlightColorsElement.appendChild( highlightColorsEventElement );
highlightColors( KDGanttViewItem::Event, startColor, middleColor, endColor );
KDGanttXML::createColorNode( doc, highlightColorsEventElement, "Start", startColor );
KDGanttXML::createColorNode( doc, highlightColorsEventElement, "Middle", middleColor );
KDGanttXML::createColorNode( doc, highlightColorsEventElement, "End", endColor );
- QDomElement highlightColorsTaskElement = doc.createElement( "Task" );
+ TQDomElement highlightColorsTaskElement = doc.createElement( "Task" );
highlightColorsElement.appendChild( highlightColorsTaskElement );
highlightColors( KDGanttViewItem::Task, startColor, middleColor, endColor );
KDGanttXML::createColorNode( doc, highlightColorsTaskElement, "Start", startColor );
KDGanttXML::createColorNode( doc, highlightColorsTaskElement, "Middle", middleColor );
KDGanttXML::createColorNode( doc, highlightColorsTaskElement, "End", endColor );
- QDomElement highlightColorsSummaryElement = doc.createElement( "Summary" );
+ TQDomElement highlightColorsSummaryElement = doc.createElement( "Summary" );
highlightColorsElement.appendChild( highlightColorsSummaryElement );
highlightColors( KDGanttViewItem::Event, startColor, middleColor, endColor );
KDGanttXML::createColorNode( doc, highlightColorsSummaryElement, "Start", startColor );
@@ -3533,13 +3533,13 @@ QDomDocument KDGanttView::saveXML( bool withPI ) const
KDGanttXML::createColorNode( doc, highlightColorsSummaryElement, "Middle", middleColor );
KDGanttXML::createColorNode( doc, highlightColorsSummaryElement, "End", endColor );
} else {
- KDGanttXML::createColorNode( doc, highlightColorsSummaryElement, "Start", QColor() );
- KDGanttXML::createColorNode( doc, highlightColorsSummaryElement, "Middle", QColor() );
- KDGanttXML::createColorNode( doc, highlightColorsSummaryElement, "End", QColor() );
+ KDGanttXML::createColorNode( doc, highlightColorsSummaryElement, "Start", TQColor() );
+ KDGanttXML::createColorNode( doc, highlightColorsSummaryElement, "Middle", TQColor() );
+ KDGanttXML::createColorNode( doc, highlightColorsSummaryElement, "End", TQColor() );
}
*/
// the DefaultHighlightColor element
- QDomElement defaultHighlightColorsElement = doc.createElement( "DefaultHighlightColors" );
+ TQDomElement defaultHighlightColorsElement = doc.createElement( "DefaultHighlightColors" );
docRoot.appendChild( defaultHighlightColorsElement );
KDGanttXML::createColorNode( doc, defaultHighlightColorsElement, "Event",
defaultHighlightColor( KDGanttViewItem::Event ) );
@@ -3550,7 +3550,7 @@ QDomDocument KDGanttView::saveXML( bool withPI ) const
// the Items element
- QDomElement itemsElement = doc.createElement( "Items" );
+ TQDomElement itemsElement = doc.createElement( "Items" );
docRoot.appendChild( itemsElement );
KDGanttViewItem* currentItem = firstChild();
while( currentItem ) {
@@ -3559,32 +3559,32 @@ QDomDocument KDGanttView::saveXML( bool withPI ) const
}
// the TaskLinks element
- QDomElement taskLinksElement = doc.createElement( "TaskLinks" );
+ TQDomElement taskLinksElement = doc.createElement( "TaskLinks" );
docRoot.appendChild( taskLinksElement );
- QPtrList<KDGanttViewTaskLink> taskLinkList = taskLinks();
+ TQPtrList<KDGanttViewTaskLink> taskLinkList = taskLinks();
KDGanttViewTaskLink* currentTL = 0;
for( currentTL = taskLinkList.first(); currentTL;
currentTL = taskLinkList.next() )
currentTL->createNode( doc, taskLinksElement );
// the TaskLinkGroups element
- QDomElement taskLinkGroupsElement = doc.createElement( "TaskLinkGroups" );
+ TQDomElement taskLinkGroupsElement = doc.createElement( "TaskLinkGroups" );
docRoot.appendChild( taskLinkGroupsElement );
- QPtrList<KDGanttViewTaskLinkGroup> taskLinkGroupList = taskLinkGroups();
+ TQPtrList<KDGanttViewTaskLinkGroup> taskLinkGroupList = taskLinkGroups();
KDGanttViewTaskLinkGroup* currentTLG = 0;
for( currentTLG = taskLinkGroupList.first(); currentTLG;
currentTLG = taskLinkGroupList.next() )
currentTLG->createNode( doc, taskLinkGroupsElement );
// the ColumnBackgroundColors element
- QDomElement columnBackgroundColorsElement =
+ TQDomElement columnBackgroundColorsElement =
doc.createElement( "ColumnBackgroundColors" );
docRoot.appendChild( columnBackgroundColorsElement );
KDTimeHeaderWidget::ColumnColorList ccList =
myTimeHeader->columnBackgroundColorList();
for( KDTimeHeaderWidget::ColumnColorList::iterator it = ccList.begin();
it != ccList.end(); ++it ) {
- QDomElement columnBackgroundColorElement =
+ TQDomElement columnBackgroundColorElement =
doc.createElement( "ColumnBackgroundColor" );
columnBackgroundColorsElement.appendChild( columnBackgroundColorElement );
KDGanttXML::createDateTimeNode( doc, columnBackgroundColorElement,
@@ -3594,14 +3594,14 @@ QDomDocument KDGanttView::saveXML( bool withPI ) const
}
// the LegendItems element
- QDomElement legendItemsElement =
+ TQDomElement legendItemsElement =
doc.createElement( "LegendItems" );
docRoot.appendChild( legendItemsElement );
legendItem* current;
- QPtrListIterator<legendItem> lit( *myLegendItems );
+ TQPtrListIterator<legendItem> lit( *myLegendItems );
while( ( current = lit.current() ) ) {
++lit;
- QDomElement legendItemElement = doc.createElement( "LegendItem" );
+ TQDomElement legendItemElement = doc.createElement( "LegendItem" );
legendItemsElement.appendChild( legendItemElement );
KDGanttXML::createStringNode( doc, legendItemElement, "Shape",
KDGanttViewItem::shapeToString( current->shape ) );
@@ -3625,7 +3625,7 @@ QDomDocument KDGanttView::saveXML( bool withPI ) const
-QString KDGanttView::scaleToString( Scale scale )
+TQString KDGanttView::scaleToString( Scale scale )
{
switch( scale ) {
case Minute:
@@ -3645,7 +3645,7 @@ QString KDGanttView::scaleToString( Scale scale )
}
-KDGanttView::Scale KDGanttView::stringToScale( const QString& string )
+KDGanttView::Scale KDGanttView::stringToScale( const TQString& string )
{
if( string == "Minute" )
return Minute;
@@ -3664,7 +3664,7 @@ KDGanttView::Scale KDGanttView::stringToScale( const QString& string )
}
-QString KDGanttView::yearFormatToString( YearFormat format )
+TQString KDGanttView::yearFormatToString( YearFormat format )
{
switch( format ) {
case FourDigit:
@@ -3680,7 +3680,7 @@ QString KDGanttView::yearFormatToString( YearFormat format )
}
-KDGanttView::YearFormat KDGanttView::stringToYearFormat( const QString& string )
+KDGanttView::YearFormat KDGanttView::stringToYearFormat( const TQString& string )
{
if( string == "FourDigit" )
return FourDigit;
@@ -3695,7 +3695,7 @@ KDGanttView::YearFormat KDGanttView::stringToYearFormat( const QString& string )
}
-QString KDGanttView::hourFormatToString( HourFormat format )
+TQString KDGanttView::hourFormatToString( HourFormat format )
{
switch( format ) {
case Hour_12:
@@ -3709,7 +3709,7 @@ QString KDGanttView::hourFormatToString( HourFormat format )
}
-KDGanttView::HourFormat KDGanttView::stringToHourFormat( const QString& string )
+KDGanttView::HourFormat KDGanttView::stringToHourFormat( const TQString& string )
{
if( string == "Hour_12" )
return Hour_12;
@@ -3766,24 +3766,24 @@ void KDGanttView::editItem( KDGanttViewItem* item)
\param itemSize the size of the shape
\return the generated shape pixmap
*/
-QPixmap KDGanttView::getPixmap( KDGanttViewItem::Shape shape,
- const QColor& shapeColor,
- const QColor& backgroundColor, int itemSize)
+TQPixmap KDGanttView::getPixmap( KDGanttViewItem::Shape shape,
+ const TQColor& shapeColor,
+ const TQColor& backgroundColor, int itemSize)
{
// 10 is a good value as size
int size = itemSize+2;
int hei = ( itemSize/3 ) / 2;
- QPixmap p = QPixmap( size+4, size+4 );
+ TQPixmap p = TQPixmap( size+4, size+4 );
p.fill( backgroundColor );
- QPainter paint (&p);
- QBrush b = QBrush ( Qt::SolidPattern );
+ TQPainter paint (&p);
+ TQBrush b = TQBrush ( Qt::SolidPattern );
b.setColor( shapeColor );
paint.setBrush( b );
- QPen pen( Qt::black, 1 ) ;
+ TQPen pen( Qt::black, 1 ) ;
paint.setPen( pen );
switch (shape) {
case KDGanttViewItem::TriangleDown:{
- QPointArray arr = QPointArray(3);
+ TQPointArray arr = TQPointArray(3);
arr.setPoint(0,-size/2,-hei);
arr.setPoint(1,size/2,-hei);
arr.setPoint(2,0,((size/2)-hei));
@@ -3792,7 +3792,7 @@ QPixmap KDGanttView::getPixmap( KDGanttViewItem::Shape shape,
break;
}
case KDGanttViewItem::TriangleUp :{
- QPointArray arr = QPointArray(3);
+ TQPointArray arr = TQPointArray(3);
arr.setPoint(0,-size/2,hei);
arr.setPoint(1,size/2,hei);
arr.setPoint(2,0,(-size/2)+hei);
@@ -3801,7 +3801,7 @@ QPixmap KDGanttView::getPixmap( KDGanttViewItem::Shape shape,
break;
}
case KDGanttViewItem::Diamond :{
- QPointArray arr = QPointArray(4);
+ TQPointArray arr = TQPointArray(4);
arr.setPoint(0,0,-size/2);
arr.setPoint(1,size/2,0);
arr.setPoint(2,0,size/2);
@@ -3811,7 +3811,7 @@ QPixmap KDGanttView::getPixmap( KDGanttViewItem::Shape shape,
break;
}
case KDGanttViewItem::Square :{
- QPointArray arr = QPointArray(4);
+ TQPointArray arr = TQPointArray(4);
arr.setPoint(0,-size/2,-size/2);
arr.setPoint(1,size/2,-size/2);
arr.setPoint(2,size/2,size/2);
@@ -3877,19 +3877,19 @@ void KDGanttView::initDefaults()
/*!
- Calls to this method are passed through to the underlying \a QListView.
+ Calls to this method are passed through to the underlying \a TQListView.
*/
-int KDGanttView::addColumn( const QString& label, int width )
+int KDGanttView::addColumn( const TQString& label, int width )
{
return myListView->addColumn( label, width );
}
/*!
- Calls to this method are passed through to the underlying \a QListView.
+ Calls to this method are passed through to the underlying \a TQListView.
*/
-int KDGanttView::addColumn( const QIconSet& iconset, const QString& label,
+int KDGanttView::addColumn( const TQIconSet& iconset, const TQString& label,
int width )
{
return myListView->addColumn( iconset, label, width );
@@ -3897,7 +3897,7 @@ int KDGanttView::addColumn( const QIconSet& iconset, const QString& label,
/*!
- Calls to this method are passed through to the underlying \a QListView.
+ Calls to this method are passed through to the underlying \a TQListView.
*/
void KDGanttView::removeColumn( int index )
{
@@ -3906,7 +3906,7 @@ void KDGanttView::removeColumn( int index )
/*!
- Calls to this method are passed through to the underlying \a QListView.
+ Calls to this method are passed through to the underlying \a TQListView.
*/
KDGanttViewItem* KDGanttView::selectedItem() const
{
@@ -3915,7 +3915,7 @@ KDGanttViewItem* KDGanttView::selectedItem() const
/*!
- Calls to this method are passed through to the underlying \a QListView.
+ Calls to this method are passed through to the underlying \a TQListView.
*/
void KDGanttView::setSelected( KDGanttViewItem* item, bool selected )
{
@@ -3935,7 +3935,7 @@ void KDGanttView::setSelected( KDGanttViewItem* item, bool selected )
in the Gantt view with this name.
*/
-KDGanttViewItem* KDGanttView::getItemByName( const QString& name ) const
+KDGanttViewItem* KDGanttView::getItemByName( const TQString& name ) const
{
KDGanttViewItem* temp = firstChild(),* ret;
while (temp != 0) {
@@ -3958,7 +3958,7 @@ KDGanttViewItem* KDGanttView::getItemByName( const QString& name ) const
no item in the list view at this position.
*/
-KDGanttViewItem* KDGanttView::getItemByListViewPos( const QPoint& pos ) const
+KDGanttViewItem* KDGanttView::getItemByListViewPos( const TQPoint& pos ) const
{
return static_cast<KDGanttViewItem*>( myListView->itemAt(myListView->mapFromGlobal(pos) ));
}
@@ -3978,13 +3978,13 @@ KDGanttViewItem* KDGanttView::getItemByListViewPos( const QPoint& pos ) const
in the Gantt view at this position.
*/
-KDGanttViewItem* KDGanttView::getItemByGanttViewPos( const QPoint& pos ) const
+KDGanttViewItem* KDGanttView::getItemByGanttViewPos( const TQPoint& pos ) const
{
KDGanttViewItem* item;
- QPoint local = myCanvasView->mapFromGlobal(pos);
+ TQPoint local = myCanvasView->mapFromGlobal(pos);
- QCanvasItemList il = myTimeTable->collisions( myCanvasView->viewportToContents( local ));
- QCanvasItemList::Iterator it;
+ TQCanvasItemList il = myTimeTable->collisions( myCanvasView->viewportToContents( local ));
+ TQCanvasItemList::Iterator it;
for ( it = il.begin(); it != il.end(); ++it ) {
if ( myCanvasView->getType(*it) == Type_is_KDGanttViewItem) {
item = myCanvasView->getItem(*it);
@@ -4010,10 +4010,10 @@ KDGanttViewItem* KDGanttView::getItemByGanttViewPos( const QPoint& pos ) const
in the Gantt view at this position.
*/
-KDGanttViewItem* KDGanttView::getItemAt( const QPoint& pos, bool global ) const
+KDGanttViewItem* KDGanttView::getItemAt( const TQPoint& pos, bool global ) const
{
/* buggy code - commented out
- QPoint myPos;
+ TQPoint myPos;
if ( global )
myPos = myListView->contentsToViewport( myListView->mapFromGlobal(pos) );
else
@@ -4099,7 +4099,7 @@ void KDGanttView::clear()
/*!
Passes on the signal from the list view.
*/
-void KDGanttView::slot_lvDropped(QDropEvent* e, KDGanttViewItem* droppedItem, KDGanttViewItem* itemBelowMouse )
+void KDGanttView::slot_lvDropped(TQDropEvent* e, KDGanttViewItem* droppedItem, KDGanttViewItem* itemBelowMouse )
{
emit dropped( e, droppedItem, itemBelowMouse);
}
@@ -4107,7 +4107,7 @@ void KDGanttView::slot_lvDropped(QDropEvent* e, KDGanttViewItem* droppedItem, KD
/*!
Implements a pass-through to the list view.
*/
-QDragObject * KDGanttView::dragObject ()
+TQDragObject * KDGanttView::dragObject ()
{
return myListView->dragObject ();
}
@@ -4125,9 +4125,9 @@ void KDGanttView::startDrag ()
/*!
This method is overridden for internal purposes.
*/
-void KDGanttView::setPaletteBackgroundColor( const QColor& col)
+void KDGanttView::setPaletteBackgroundColor( const TQColor& col)
{
- QWidget::setPaletteBackgroundColor( col );
+ TQWidget::setPaletteBackgroundColor( col );
timeHeaderSpacerWidget->setPaletteBackgroundColor( col );
}
@@ -4138,7 +4138,7 @@ void KDGanttView::setPaletteBackgroundColor( const QColor& col)
\param c the background color of the Gantt view.
\sa gvBackgroundColor()
*/
-void KDGanttView::setGvBackgroundColor ( const QColor & c )
+void KDGanttView::setGvBackgroundColor ( const TQColor & c )
{
myTimeTable->setBackgroundColor( c );
}
@@ -4150,7 +4150,7 @@ void KDGanttView::setGvBackgroundColor ( const QColor & c )
\param c the background color of the time header.
\sa timeHeaderBackgroundColor()
*/
-void KDGanttView::setTimeHeaderBackgroundColor ( const QColor & c )
+void KDGanttView::setTimeHeaderBackgroundColor ( const TQColor & c )
{
myTimeHeader->setPaletteBackgroundColor( c );
//rightWidget->setPaletteBackgroundColor( c );
@@ -4164,7 +4164,7 @@ void KDGanttView::setTimeHeaderBackgroundColor ( const QColor & c )
\param c the background color of the legend header
\sa legendHeaderBackgroundColor()
*/
-void KDGanttView::setLegendHeaderBackgroundColor ( const QColor & c )
+void KDGanttView::setLegendHeaderBackgroundColor ( const TQColor & c )
{
myLegend->setPaletteBackgroundColor( c );
leftWidget->setPaletteBackgroundColor( c );
@@ -4177,7 +4177,7 @@ void KDGanttView::setLegendHeaderBackgroundColor ( const QColor & c )
\param c the background color of the list view
\sa lvBackgroundColor()
*/
-void KDGanttView::setLvBackgroundColor ( const QColor & c )
+void KDGanttView::setLvBackgroundColor ( const TQColor & c )
{
myListView->viewport()->setPaletteBackgroundColor( c );
}
@@ -4189,7 +4189,7 @@ void KDGanttView::setLvBackgroundColor ( const QColor & c )
\return the background color of the list view
\sa setLvBackgroundColor()
*/
-QColor KDGanttView::lvBackgroundColor ( )const
+TQColor KDGanttView::lvBackgroundColor ( )const
{
return myListView->viewport()->paletteBackgroundColor( );
}
@@ -4201,7 +4201,7 @@ QColor KDGanttView::lvBackgroundColor ( )const
\return the background color of the Gantt view
\sa setGvBackgroundColor()
*/
-QColor KDGanttView::gvBackgroundColor () const
+TQColor KDGanttView::gvBackgroundColor () const
{
return myTimeTable->backgroundColor( );
}
@@ -4213,7 +4213,7 @@ QColor KDGanttView::gvBackgroundColor () const
\return the background color of the time header
\sa setTimeHeaderBackgroundColor()
*/
-QColor KDGanttView::timeHeaderBackgroundColor () const
+TQColor KDGanttView::timeHeaderBackgroundColor () const
{
return myTimeHeader->paletteBackgroundColor( );
}
@@ -4225,7 +4225,7 @@ QColor KDGanttView::timeHeaderBackgroundColor () const
\return the background color of the legend header
\sa setLegendHeaderBackgroundColor()
*/
-QColor KDGanttView::legendHeaderBackgroundColor () const
+TQColor KDGanttView::legendHeaderBackgroundColor () const
{
return myLegend->paletteBackgroundColor( );
}
@@ -4235,20 +4235,20 @@ QColor KDGanttView::legendHeaderBackgroundColor () const
Adds a widget to the spacer widget above the list view part and
below the ShowLegendButton. To assign all the space above the
Listview to the spacer widget, hide the ShowLegendButton by calling
- setShowLegendButton( false ). The spacer widget is a QHBox. You
+ setShowLegendButton( false ). The spacer widget is a TQHBox. You
may add as many widgets as you want. They are ordered horizontally
from left to right. To remove a widget from the spacer widget, call
widget->reparent(newParent,...) or delete the widget. Since the spacer
- is a QHBox, the layout of the added widgets is managed by this
- QHBox.
+ is a TQHBox, the layout of the added widgets is managed by this
+ TQHBox.
\param w A pointer to the widget to be added.
\sa setShowLegendButton( )
*/
-void KDGanttView::addUserdefinedLegendHeaderWidget( QWidget * w )
+void KDGanttView::addUserdefinedLegendHeaderWidget( TQWidget * w )
{
if ( w ) {
- w->reparent ( spacerLeft, 0, QPoint(0,0) );
+ w->reparent ( spacerLeft, 0, TQPoint(0,0) );
}
}
@@ -4264,7 +4264,7 @@ void KDGanttView::addUserdefinedLegendHeaderWidget( QWidget * w )
void KDGanttView::setDragEnabled( bool b )
{
fDragEnabled = b;
- QListViewItemIterator it( myListView );
+ TQListViewItemIterator it( myListView );
for ( ; it.current(); ++it ) {
(( KDGanttViewItem* )it.current())->setDragEnabled(b);
}
@@ -4285,7 +4285,7 @@ void KDGanttView::setDropEnabled( bool b )
fDropEnabled = b;
//myListView->setAcceptDrops( b );
- QListViewItemIterator it( myListView );
+ TQListViewItemIterator it( myListView );
for ( ; it.current(); ++it ) {
(( KDGanttViewItem* )it.current())->setDropEnabled(b);
}
@@ -4375,7 +4375,7 @@ bool KDGanttView::dropEnabled() const
true, when the internal drop handling should not be executed
\sa lvDropEvent(), lvStartDrag()
*/
-bool KDGanttView::lvDropEvent ( QDropEvent* e,
+bool KDGanttView::lvDropEvent ( TQDropEvent* e,
KDGanttViewItem* droppedItem,
KDGanttViewItem* itemBelowMouse )
{
@@ -4391,20 +4391,20 @@ bool KDGanttView::lvDropEvent ( QDropEvent* e,
// ************** begin example ************
/*
- if ( QUriDrag::canDecode( e ) ) {
- QStrList lst;
- QUriDrag::decode( e, lst );
+ if ( TQUriDrag::canDecode( e ) ) {
+ TQStrList lst;
+ TQUriDrag::decode( e, lst );
// we try the first file of icon-url-list
- QString str = lst.at ( 0 );
+ TQString str = lst.at ( 0 );
// remove file: at beginning of string
str = str.right( str.length() - 5 );
- QFileInfo info;
+ TQFileInfo info;
info.setFile( str ) ;
if ( info.isFile() ) {
- if (!QMessageBox::information( this, "KDGantt Drag&Drop test",
+ if (!TQMessageBox::information( this, "KDGantt Drag&Drop test",
"Try to insert file: "+ str + " ?",
"&Okay", "&Cancel",0,1 ) ) {
- QFile file( str );
+ TQFile file( str );
// store current updating status
bool uen = myTimeTable->blockUpdating();
// block updating while insertion of items
@@ -4439,7 +4439,7 @@ bool KDGanttView::lvDropEvent ( QDropEvent* e,
\sa lvDropEvent(), lvStartDrag(), lvDragMoveEvent()
*/
-void KDGanttView::lvDragEnterEvent ( QDragEnterEvent * e)
+void KDGanttView::lvDragEnterEvent ( TQDragEnterEvent * e)
{
// the standard behaviour:
// accept drag enter events, if KDGanttViewItemDrag can decode the event
@@ -4456,7 +4456,7 @@ void KDGanttView::lvDragEnterEvent ( QDragEnterEvent * e)
// Please uncomment the following lines for this behaviour
// You have to uncomment lines in lvDragMoveEvent() and lvDropEvent () as well
- // if ( QUriDrag::canDecode( e ) ) {
+ // if ( TQUriDrag::canDecode( e ) ) {
// e->accept(true);
// return;
// }
@@ -4493,7 +4493,7 @@ void KDGanttView::lvDragEnterEvent ( QDragEnterEvent * e)
if you have called e->accept( true ) before.
\sa lvDropEvent(), lvStartDrag()
*/
-bool KDGanttView::lvDragMoveEvent ( QDragMoveEvent* /*e*/,
+bool KDGanttView::lvDragMoveEvent ( TQDragMoveEvent* /*e*/,
KDGanttViewItem* /* draggedItem*/,
KDGanttViewItem* /*itemBelowMouse*/)
{
@@ -4513,7 +4513,7 @@ bool KDGanttView::lvDragMoveEvent ( QDragMoveEvent* /*e*/,
// a saved Gantt file, subclass KDGanttView
// and reimplement this method with to following code uncommented:
- // if ( QUriDrag::canDecode( e ) ) {
+ // if ( TQUriDrag::canDecode( e ) ) {
// e->accept(true);
// return true;
// }
@@ -4525,7 +4525,7 @@ bool KDGanttView::lvDragMoveEvent ( QDragMoveEvent* /*e*/,
/*!
- This virtual method creates a QDragObject and starts a drag for a
+ This virtual method creates a TQDragObject and starts a drag for a
KDGanttViewItem.
In order to prevent drags of particular items, subclass from
KDGanttView and reimplement this method.
@@ -4535,7 +4535,7 @@ bool KDGanttView::lvDragMoveEvent ( QDragMoveEvent* /*e*/,
*/
void KDGanttView::lvStartDrag (KDGanttViewItem* item)
{
- QDragObject* d = new KDGanttViewItemDrag(item, this, "itemdrag" );
+ TQDragObject* d = new KDGanttViewItemDrag(item, this, "itemdrag" );
// call d->drag() to start the dragging
// d->drag() returns true, if a move was requested as a drag
// if a copy (by pressing the <Ctrl>-key) was performed, d->drag() returns false
@@ -4561,7 +4561,7 @@ void KDGanttView::lvStartDrag (KDGanttViewItem* item)
void KDGanttView::setListViewWidth( int w )
{
int sw = mySplitter->width();
- QValueList<int> list;
+ TQValueList<int> list;
list.append(w);
list.append(sw-w);
mySplitter->setSizes( list );
@@ -4589,7 +4589,7 @@ int KDGanttView::listViewWidth( )
\param m the scrollbar mode.
\sa setGvVScrollBarMode( )
*/
-void KDGanttView::setLvVScrollBarMode( QScrollView::ScrollBarMode m )
+void KDGanttView::setLvVScrollBarMode( TQScrollView::ScrollBarMode m )
{
myListView->setVScrollBarMode ( m );
}
@@ -4604,14 +4604,14 @@ void KDGanttView::setLvVScrollBarMode( QScrollView::ScrollBarMode m )
\param m The scrollbar mode.
\sa setLvVScrollBarMode( )
*/
-void KDGanttView::setGvVScrollBarMode( QScrollView::ScrollBarMode m )
+void KDGanttView::setGvVScrollBarMode( TQScrollView::ScrollBarMode m )
{
- if ( m == QScrollView::Auto )
- qDebug("KDGanttView::setListViewVScrollBarMode: QScrollView::Auto not supported. Nothing changed. ");
+ if ( m == TQScrollView::Auto )
+ qDebug("KDGanttView::setListViewVScrollBarMode: TQScrollView::Auto not supported. Nothing changed. ");
else
{
myCanvasView->setVScrollBarMode ( m );
- if ( m == QScrollView::AlwaysOn )
+ if ( m == TQScrollView::AlwaysOn )
timeHeaderSpacerWidget->setFixedWidth(myCanvasView->verticalScrollBar()->width() );
else
timeHeaderSpacerWidget->setFixedWidth( 0 );
@@ -4650,17 +4650,17 @@ bool KDGanttView::isLinkItemsEnabled() const
}
/*!
- \fn void KDGanttView::timeIntervalSelected( const QDateTime& start, const QDateTime& end);
+ \fn void KDGanttView::timeIntervalSelected( const TQDateTime& start, const TQDateTime& end);
This signal is emitted when the user selects a time
interval with the mouse on the time header connect this signal to
- the slot void zoomToSelection( const QDateTime& start, const
- QDateTime& end) to obtain automatic zooming.
+ the slot void zoomToSelection( const TQDateTime& start, const
+ TQDateTime& end) to obtain automatic zooming.
*/
/*!
- \fn void KDGanttView::timeIntervallSelected( const QDateTime& start, const QDateTime& end);
+ \fn void KDGanttView::timeIntervallSelected( const TQDateTime& start, const TQDateTime& end);
\deprecated This signal is deprecated, do not use it in new code;
use timeIntervalSelected() instead. timeIntervallSelected() will be
@@ -4715,7 +4715,7 @@ bool KDGanttView::isLinkItemsEnabled() const
*/
/*!
- \fn void KDGanttView::gvMouseButtonClicked ( int button, KDGanttViewItem* item, const QPoint & pos)
+ \fn void KDGanttView::gvMouseButtonClicked ( int button, KDGanttViewItem* item, const TQPoint & pos)
This signal is emitted when the user clicks into the Gantt view with
any mouse button. Notice that \a pos is the absolute mouse position.
@@ -4728,7 +4728,7 @@ bool KDGanttView::isLinkItemsEnabled() const
*/
/*!
- \fn void KDGanttView::gvContextMenuRequested ( KDGanttViewItem * item, const QPoint & pos )
+ \fn void KDGanttView::gvContextMenuRequested ( KDGanttViewItem * item, const TQPoint & pos )
This signal is emitted when the user requests a context menu in the
Gantt view. Notice that \a pos is the absolute mouse position.
@@ -4774,7 +4774,7 @@ bool KDGanttView::isLinkItemsEnabled() const
/*!
\fn void KDGanttView::lvMouseButtonPressed ( int button,
- KDGanttViewItem* item, const QPoint & pos, int col)
+ KDGanttViewItem* item, const TQPoint & pos, int col)
This signal is emitted when the user presses any mouse button in the
list view. Notice that \a pos is the absolute mouse position.
@@ -4782,7 +4782,7 @@ bool KDGanttView::isLinkItemsEnabled() const
/*!
\fn void KDGanttView::lvMouseButtonClicked ( int button,
- KDGanttViewItem* item, const QPoint & pos, int col)
+ KDGanttViewItem* item, const TQPoint & pos, int col)
This signal is emitted when the user clicks into the
list view with any mouse button . Notice that \a pos is the absolute
@@ -4797,7 +4797,7 @@ bool KDGanttView::isLinkItemsEnabled() const
/*!
\fn void KDGanttView::lvItemRenamed( KDGanttViewItem*, int col,
- const QString& text )
+ const TQString& text )
This signal is emitted whenever the user changes the name of an item
in the list view using in-place editing. \a text contains the new
@@ -4806,7 +4806,7 @@ bool KDGanttView::isLinkItemsEnabled() const
/*!
\fn void KDGanttView::lvContextMenuRequested( KDGanttViewItem *
- item, const QPoint & pos, int col )
+ item, const TQPoint & pos, int col )
This signal is emitted when the user requests a context menu in the
list view. Notice that \a pos is the absolute mouse position.
@@ -4821,7 +4821,7 @@ bool KDGanttView::isLinkItemsEnabled() const
/*!
- \fn void KDGanttView::dropped ( QDropEvent * e, KDGanttViewItem* droppedItem, KDGanttViewItem* itemBelowMouse)
+ \fn void KDGanttView::dropped ( TQDropEvent * e, KDGanttViewItem* droppedItem, KDGanttViewItem* itemBelowMouse)
This signal is emitted whenever a Gantt item is dropped onto the
Gantt view. \a droppedItem is 0, if this is a drag operation from
diff --git a/kdgantt/KDGanttView.h b/kdgantt/KDGanttView.h
index c0c9bbba9..b3913d671 100644
--- a/kdgantt/KDGanttView.h
+++ b/kdgantt/KDGanttView.h
@@ -35,14 +35,14 @@
#ifndef KDGANTTVIEW_H
#define KDGANTTVIEW_H
-#include <qptrlist.h>
-#include <qwidget.h>
-#include <qlistview.h>
-#include <qsplitter.h>
-#include <qlayout.h>
-#include <qfont.h>
-#include <qdom.h>
-#include <qvbox.h>
+#include <tqptrlist.h>
+#include <tqwidget.h>
+#include <tqlistview.h>
+#include <tqsplitter.h>
+#include <tqlayout.h>
+#include <tqfont.h>
+#include <tqdom.h>
+#include <tqvbox.h>
#include "KDGanttViewItem.h"
@@ -75,15 +75,15 @@ class KDGanttView : public KDGanttMinimizeSplitter
Q_PROPERTY( bool showListView READ showListView WRITE setShowListView )
Q_PROPERTY( bool showTaskLinks READ showTaskLinks WRITE setShowTaskLinks )
Q_PROPERTY( bool editorEnabled READ editorEnabled WRITE setEditorEnabled )
- Q_PROPERTY( QDateTime horizonStart READ horizonStart WRITE setHorizonStart )
- Q_PROPERTY( QDateTime horizonEnd READ horizonEnd WRITE setHorizonEnd )
+ Q_PROPERTY( TQDateTime horizonStart READ horizonStart WRITE setHorizonStart )
+ Q_PROPERTY( TQDateTime horizonEnd READ horizonEnd WRITE setHorizonEnd )
Q_PROPERTY( Scale scale READ scale WRITE setScale )
Q_PROPERTY( YearFormat yearFormat READ yearFormat WRITE setYearFormat )
Q_PROPERTY( HourFormat hourFormat READ hourFormat WRITE setHourFormat )
Q_PROPERTY( bool showMinorTicks READ showMinorTicks WRITE setShowMinorTicks )
Q_PROPERTY( bool showMajorTicks READ showMajorTicks WRITE setShowMajorTicks )
Q_PROPERTY( bool editable READ editable WRITE setEditable )
- Q_PROPERTY( QColor textColor READ textColor WRITE setTextColor )
+ Q_PROPERTY( TQColor textColor READ textColor WRITE setTextColor )
Q_PROPERTY( int majorScaleCount READ majorScaleCount WRITE setMajorScaleCount )
Q_PROPERTY( int minorScaleCount READ minorScaleCount WRITE setMinorScaleCount )
Q_PROPERTY( int autoScaleMinorTickCount READ autoScaleMinorTickCount WRITE setAutoScaleMinorTickCount )
@@ -91,11 +91,11 @@ class KDGanttView : public KDGanttMinimizeSplitter
Q_PROPERTY( Scale minimumScale READ minimumScale WRITE setMinimumScale )
Q_PROPERTY( int minimumColumnWidth READ minimumColumnWidth WRITE setMinimumColumnWidth )
Q_PROPERTY( int ganttMaximumWidth READ ganttMaximumWidth WRITE setGanttMaximumWidth )
- Q_PROPERTY( QColor weekendBackgroundColor READ weekendBackgroundColor WRITE setWeekendBackgroundColor )
- Q_PROPERTY( QColor ganttViewBackgroundColor READ gvBackgroundColor WRITE setGvBackgroundColor )
- Q_PROPERTY( QColor listViewBackgroundColor READ lvBackgroundColor WRITE setLvBackgroundColor )
- Q_PROPERTY( QColor timeHeaderBackgroundColor READ timeHeaderBackgroundColor WRITE setTimeHeaderBackgroundColor )
- Q_PROPERTY( QColor legendHeaderBackgroundColor READ legendHeaderBackgroundColor WRITE setLegendHeaderBackgroundColor )
+ Q_PROPERTY( TQColor weekendBackgroundColor READ weekendBackgroundColor WRITE setWeekendBackgroundColor )
+ Q_PROPERTY( TQColor ganttViewBackgroundColor READ gvBackgroundColor WRITE setGvBackgroundColor )
+ Q_PROPERTY( TQColor listViewBackgroundColor READ lvBackgroundColor WRITE setLvBackgroundColor )
+ Q_PROPERTY( TQColor timeHeaderBackgroundColor READ timeHeaderBackgroundColor WRITE setTimeHeaderBackgroundColor )
+ Q_PROPERTY( TQColor legendHeaderBackgroundColor READ legendHeaderBackgroundColor WRITE setLegendHeaderBackgroundColor )
Q_PROPERTY( double zoomFactor READ zoomFactor )
Q_PROPERTY( bool showHeaderPopupMenu READ showHeaderPopupMenu WRITE setShowHeaderPopupMenu )
Q_PROPERTY( bool showTimeTablePopupMenu READ showTimeTablePopupMenu WRITE setShowTimeTablePopupMenu )
@@ -103,7 +103,7 @@ class KDGanttView : public KDGanttMinimizeSplitter
Q_PROPERTY( bool showLegendButton READ showLegendButton WRITE setShowLegendButton )
Q_PROPERTY( bool legendIsDockwindow READ legendIsDockwindow WRITE setLegendIsDockwindow )
Q_PROPERTY( bool displayEmptyTasksAsLine READ displayEmptyTasksAsLine WRITE setDisplayEmptyTasksAsLine )
- Q_PROPERTY( QBrush noInformationBrush READ noInformationBrush WRITE setNoInformationBrush )
+ Q_PROPERTY( TQBrush noInformationBrush READ noInformationBrush WRITE setNoInformationBrush )
Q_PROPERTY( bool dragEnabled READ dragEnabled WRITE setDragEnabled )
Q_PROPERTY( bool dropEnabled READ dropEnabled WRITE setDropEnabled )
Q_PROPERTY( bool calendarMode READ calendarMode WRITE setCalendarMode )
@@ -118,7 +118,7 @@ public:
enum HourFormat { Hour_24, Hour_12, Hour_24_FourDigit };
enum RepaintMode { No, Medium, Always };
- KDGanttView( QWidget* parent = 0, const char* name = 0 );
+ KDGanttView( TQWidget* parent = 0, const char* name = 0 );
~KDGanttView();
virtual void show();
@@ -133,7 +133,7 @@ public:
bool showLegend() const;
void setLegendIsDockwindow( bool dock );
bool legendIsDockwindow( ) const;
- QDockWindow* legendDockwindow( ) const;
+ TQDockWindow* legendDockwindow( ) const;
void setShowListView( bool show );
bool showListView() const;
void setEditorEnabled( bool enable );
@@ -150,16 +150,16 @@ public:
bool displayEmptyTasksAsLine() const;
void setHorBackgroundLines( int count = 2,
- QBrush brush =
- QBrush( QColor ( 200,200,200 ),
+ TQBrush brush =
+ TQBrush( TQColor ( 200,200,200 ),
Qt::Dense6Pattern ));
- int horBackgroundLines( QBrush& brush );
- bool saveProject( QIODevice* );
- bool loadProject( QIODevice* );
- void print( QPrinter* printer = 0 ,
+ int horBackgroundLines( TQBrush& brush );
+ bool saveProject( TQIODevice* );
+ bool loadProject( TQIODevice* );
+ void print( TQPrinter* printer = 0 ,
bool printListView = true, bool printTimeLine = true,
bool printLegend = false );
- QSize drawContents( QPainter* p = 0,
+ TQSize drawContents( TQPainter* p = 0,
bool drawListView = true, bool drawTimeLine = true,
bool drawLegend = false );
void setZoomFactor( double factor, bool absolute );
@@ -167,8 +167,8 @@ public:
void zoomToFit();
void ensureVisible( KDGanttViewItem* );
void center( KDGanttViewItem* );
- void centerTimeline( const QDateTime& center );
- void centerTimelineAfterShow( const QDateTime& center );
+ void centerTimeline( const TQDateTime& center );
+ void centerTimelineAfterShow( const TQDateTime& center );
void setTimelineToStart();
void setTimelineToEnd();
void addTicksLeft( int num = 1 );
@@ -176,7 +176,7 @@ public:
void setShowTaskLinks( bool show );
bool showTaskLinks() const;
- void setFont(const QFont& f);
+ void setFont(const TQFont& f);
void setShowHeaderPopupMenu( bool show = true,
bool showZoom = true,
bool showScale = true,
@@ -197,43 +197,43 @@ public:
KDGanttViewItem::Shape& middle,
KDGanttViewItem::Shape& end ) const;
void setColors( KDGanttViewItem::Type type,
- const QColor& start, const QColor& middle,
- const QColor& end,
+ const TQColor& start, const TQColor& middle,
+ const TQColor& end,
bool overwriteExisting = true );
bool colors( KDGanttViewItem::Type type,
- QColor& start, QColor& middle, QColor& end ) const;
+ TQColor& start, TQColor& middle, TQColor& end ) const;
void setDefaultColor( KDGanttViewItem::Type type,
- const QColor&,
+ const TQColor&,
bool overwriteExisting = true );
- QColor defaultColor( KDGanttViewItem::Type type ) const;
+ TQColor defaultColor( KDGanttViewItem::Type type ) const;
void setHighlightColors( KDGanttViewItem::Type type,
- const QColor& start, const QColor& middle,
- const QColor& end,
+ const TQColor& start, const TQColor& middle,
+ const TQColor& end,
bool overwriteExisting = true );
bool highlightColors( KDGanttViewItem::Type type,
- QColor& start, QColor& middle, QColor& end ) const;
+ TQColor& start, TQColor& middle, TQColor& end ) const;
void setDefaultHighlightColor( KDGanttViewItem::Type type,
- const QColor&,
+ const TQColor&,
bool overwriteExisting = true );
- QColor defaultHighlightColor( KDGanttViewItem::Type type ) const;
- void setTextColor( const QColor& color );
- QColor textColor() const;
+ TQColor defaultHighlightColor( KDGanttViewItem::Type type ) const;
+ void setTextColor( const TQColor& color );
+ TQColor textColor() const;
- void setNoInformationBrush( const QBrush& brush );
- QBrush noInformationBrush() const;
+ void setNoInformationBrush( const TQBrush& brush );
+ TQBrush noInformationBrush() const;
// Link-related stuff
- QPtrList<KDGanttViewTaskLink> taskLinks() const;
- QPtrList<KDGanttViewTaskLinkGroup> taskLinkGroups() const;
+ TQPtrList<KDGanttViewTaskLink> taskLinks() const;
+ TQPtrList<KDGanttViewTaskLinkGroup> taskLinkGroups() const;
// Legend-related stuff
- void addLegendItem( KDGanttViewItem::Shape shape, const QColor& shapeColor, const QString& text );
+ void addLegendItem( KDGanttViewItem::Shape shape, const TQColor& shapeColor, const TQString& text );
void clearLegend();
// Header-related stuff
- void setHorizonStart( const QDateTime& start );
- QDateTime horizonStart() const;
- void setHorizonEnd( const QDateTime& start );
- QDateTime horizonEnd() const;
+ void setHorizonStart( const TQDateTime& start );
+ TQDateTime horizonStart() const;
+ void setHorizonEnd( const TQDateTime& start );
+ TQDateTime horizonEnd() const;
void setScale( Scale );
Scale scale() const;
void setMaximumScale( Scale );
@@ -256,48 +256,48 @@ public:
bool showMajorTicks() const;
void setShowMinorTicks( bool );
bool showMinorTicks() const;
- void setColumnBackgroundColor( const QDateTime& column,
- const QColor& color,
+ void setColumnBackgroundColor( const TQDateTime& column,
+ const TQColor& color,
Scale mini = KDGanttView::Minute ,
Scale maxi = KDGanttView::Month);
#if 0
// This API has been replaced with KDIntervalColorRectangle and addIntervalBackgroundColor
- void setIntervalBackgroundColor( const QDateTime& start,
- const QDateTime& end,
- const QColor& color,
+ void setIntervalBackgroundColor( const TQDateTime& start,
+ const TQDateTime& end,
+ const TQColor& color,
Scale mini = KDGanttView::Minute ,
Scale maxi = KDGanttView::Month);
- bool changeBackgroundInterval( const QDateTime& oldstart,
- const QDateTime& oldend,
- const QDateTime& newstart,
- const QDateTime& newend );
- bool deleteBackgroundInterval( const QDateTime& start,
- const QDateTime& end );
+ bool changeBackgroundInterval( const TQDateTime& oldstart,
+ const TQDateTime& oldend,
+ const TQDateTime& newstart,
+ const TQDateTime& newend );
+ bool deleteBackgroundInterval( const TQDateTime& start,
+ const TQDateTime& end );
#endif
void addIntervalBackgroundColor( KDIntervalColorRectangle* newItem );
void clearBackgroundColor();
- QColor columnBackgroundColor( const QDateTime& column ) const;
- void setWeekendBackgroundColor( const QColor& color );
- QColor weekendBackgroundColor() const;
- void setWeekdayBackgroundColor( const QColor& color, int weekday );
- QColor weekdayBackgroundColor(int weekday) const;
-
-
- void setPaletteBackgroundColor(const QColor& col);
- void setGvBackgroundColor ( const QColor & );
- void setLvBackgroundColor ( const QColor & );
- void setTimeHeaderBackgroundColor ( const QColor & );
- void setLegendHeaderBackgroundColor ( const QColor & );
- QColor gvBackgroundColor () const ;
- QColor lvBackgroundColor () const ;
- QColor timeHeaderBackgroundColor () const ;
- QColor legendHeaderBackgroundColor () const ;
- void addUserdefinedLegendHeaderWidget( QWidget * w );
+ TQColor columnBackgroundColor( const TQDateTime& column ) const;
+ void setWeekendBackgroundColor( const TQColor& color );
+ TQColor weekendBackgroundColor() const;
+ void setWeekdayBackgroundColor( const TQColor& color, int weekday );
+ TQColor weekdayBackgroundColor(int weekday) const;
+
+
+ void setPaletteBackgroundColor(const TQColor& col);
+ void setGvBackgroundColor ( const TQColor & );
+ void setLvBackgroundColor ( const TQColor & );
+ void setTimeHeaderBackgroundColor ( const TQColor & );
+ void setLegendHeaderBackgroundColor ( const TQColor & );
+ TQColor gvBackgroundColor () const ;
+ TQColor lvBackgroundColor () const ;
+ TQColor timeHeaderBackgroundColor () const ;
+ TQColor legendHeaderBackgroundColor () const ;
+ void addUserdefinedLegendHeaderWidget( TQWidget * w );
void setWeekendDays( int start, int end );
void weekendDays( int& start, int& end ) const;
- static QPixmap getPixmap( KDGanttViewItem::Shape shape, const QColor& shapeColor,const QColor& backgroundColor, int itemSize);
+ static TQPixmap getPixmap( KDGanttViewItem::Shape shape, const TQColor& shapeColor,const TQColor& backgroundColor, int itemSize);
void setHeaderVisible( bool );
bool headerVisible() const;
@@ -306,8 +306,8 @@ public:
bool showLegendButton() const;
// Pass-through methods from QListView
- virtual int addColumn( const QString& label, int width = -1 );
- virtual int addColumn( const QIconSet& iconset, const QString& label,
+ virtual int addColumn( const TQString& label, int width = -1 );
+ virtual int addColumn( const TQIconSet& iconset, const TQString& label,
int width = -1 );
virtual void removeColumn( int index );
KDGanttViewItem* selectedItem() const;
@@ -325,21 +325,21 @@ public:
bool isDragEnabled() const;
bool isDropEnabled() const;
- virtual bool lvDropEvent ( QDropEvent *e, KDGanttViewItem*, KDGanttViewItem*);
+ virtual bool lvDropEvent ( TQDropEvent *e, KDGanttViewItem*, KDGanttViewItem*);
virtual void lvStartDrag (KDGanttViewItem*);
- virtual bool lvDragMoveEvent (QDragMoveEvent * e,KDGanttViewItem*, KDGanttViewItem*);
- virtual void lvDragEnterEvent (QDragEnterEvent * e );
- virtual QSize sizeHint() const;
- KDGanttViewItem* getItemByName( const QString& name ) const;
- QDateTime getDateTimeForCoordX(int coordX, bool global = true ) const;
- KDGanttViewItem* getItemByListViewPos( const QPoint& pos ) const;
- KDGanttViewItem* getItemByGanttViewPos( const QPoint& pos ) const;
- KDGanttViewItem* getItemAt( const QPoint& pos , bool global = true ) const;
+ virtual bool lvDragMoveEvent (TQDragMoveEvent * e,KDGanttViewItem*, KDGanttViewItem*);
+ virtual void lvDragEnterEvent (TQDragEnterEvent * e );
+ virtual TQSize sizeHint() const;
+ KDGanttViewItem* getItemByName( const TQString& name ) const;
+ TQDateTime getDateTimeForCoordX(int coordX, bool global = true ) const;
+ KDGanttViewItem* getItemByListViewPos( const TQPoint& pos ) const;
+ KDGanttViewItem* getItemByGanttViewPos( const TQPoint& pos ) const;
+ KDGanttViewItem* getItemAt( const TQPoint& pos , bool global = true ) const;
// setting the vertical scrollbars of the listview and the timetable
// default values: always off for the listview, always on for the timetable
- void setLvVScrollBarMode( QScrollView::ScrollBarMode );
- void setGvVScrollBarMode( QScrollView::ScrollBarMode );
+ void setLvVScrollBarMode( TQScrollView::ScrollBarMode );
+ void setGvVScrollBarMode( TQScrollView::ScrollBarMode );
void setLinkItemsEnabled(bool on);
bool isLinkItemsEnabled() const;
@@ -351,13 +351,13 @@ public:
public slots:
void editItem( KDGanttViewItem* );
- void zoomToSelection( const QDateTime& start, const QDateTime& end);
+ void zoomToSelection( const TQDateTime& start, const TQDateTime& end);
signals:
- void timeIntervallSelected( const QDateTime& start, const QDateTime& end);
- void timeIntervalSelected( const QDateTime& start, const QDateTime& end);
+ void timeIntervallSelected( const TQDateTime& start, const TQDateTime& end);
+ void timeIntervalSelected( const TQDateTime& start, const TQDateTime& end);
void rescaling( KDGanttView::Scale );
- void intervalColorRectangleMoved( const QDateTime& start, const QDateTime& end );
+ void intervalColorRectangleMoved( const TQDateTime& start, const TQDateTime& end );
// the following signals are emitted if an item is clicked in the
// listview (inclusive) or in the ganttview
@@ -378,21 +378,21 @@ signals:
void gvItemMidClicked( KDGanttViewItem* );
void gvItemRightClicked( KDGanttViewItem* );
// the point is the global position!!
- void gvMouseButtonClicked ( int button, KDGanttViewItem* item, const QPoint & pos);
+ void gvMouseButtonClicked ( int button, KDGanttViewItem* item, const TQPoint & pos);
void gvItemDoubleClicked( KDGanttViewItem* );
// the point is the global position!!
- void gvContextMenuRequested ( KDGanttViewItem * item, const QPoint & pos );
+ void gvContextMenuRequested ( KDGanttViewItem * item, const TQPoint & pos );
void gvItemMoved( KDGanttViewItem* );
// lv... means item in listview clicked
void lvCurrentChanged( KDGanttViewItem* );
- void lvItemRenamed( KDGanttViewItem* , int col, const QString & text );
- void lvMouseButtonPressed( int button, KDGanttViewItem * item, const QPoint & pos, int c );
+ void lvItemRenamed( KDGanttViewItem* , int col, const TQString & text );
+ void lvMouseButtonPressed( int button, KDGanttViewItem * item, const TQPoint & pos, int c );
void lvItemLeftClicked( KDGanttViewItem* );
void lvItemMidClicked( KDGanttViewItem* );
void lvItemRightClicked( KDGanttViewItem* );
- void lvContextMenuRequested ( KDGanttViewItem * item, const QPoint & pos, int col );
- void lvMouseButtonClicked ( int button, KDGanttViewItem* item, const QPoint & pos, int c );
+ void lvContextMenuRequested ( KDGanttViewItem * item, const TQPoint & pos, int col );
+ void lvMouseButtonClicked ( int button, KDGanttViewItem* item, const TQPoint & pos, int c );
void lvItemDoubleClicked( KDGanttViewItem* );
void lvSelectionChanged( KDGanttViewItem* );
@@ -403,39 +403,39 @@ signals:
void taskLinkRightClicked( KDGanttViewTaskLink* );
void taskLinkDoubleClicked( KDGanttViewTaskLink* );
- void dateTimeDoubleClicked (const QDateTime& );
+ void dateTimeDoubleClicked (const TQDateTime& );
- void dropped ( QDropEvent * e, KDGanttViewItem* droppedItem, KDGanttViewItem* itemBelowMouse);
+ void dropped ( TQDropEvent * e, KDGanttViewItem* droppedItem, KDGanttViewItem* itemBelowMouse);
private slots:
void forceRepaint( int val = 0 );
- void slotSelectionChanged( QListViewItem* item );
- void slotCurrentChanged ( QListViewItem * item );
- void slotItemRenamed ( QListViewItem * item, int col, const QString & text );
- void slotMouseButtonPressed ( int button, QListViewItem * item, const QPoint & pos, int c );
- void slotmouseButtonClicked ( int button, QListViewItem * item, const QPoint & pos, int c );
- void slotcontextMenuRequested ( QListViewItem * item, const QPoint & pos, int col );
+ void slotSelectionChanged( TQListViewItem* item );
+ void slotCurrentChanged ( TQListViewItem * item );
+ void slotItemRenamed ( TQListViewItem * item, int col, const TQString & text );
+ void slotMouseButtonPressed ( int button, TQListViewItem * item, const TQPoint & pos, int c );
+ void slotmouseButtonClicked ( int button, TQListViewItem * item, const TQPoint & pos, int c );
+ void slotcontextMenuRequested ( TQListViewItem * item, const TQPoint & pos, int col );
void slotHeaderSizeChanged();
void addTickRight();
void addTickLeft();
void enableAdding( int );
- void slot_lvDropped(QDropEvent* e, KDGanttViewItem* droppedItem, KDGanttViewItem* itemBelowMouse );
+ void slot_lvDropped(TQDropEvent* e, KDGanttViewItem* droppedItem, KDGanttViewItem* itemBelowMouse );
private:
struct legendItem {
KDGanttViewItem::Shape shape;
- QColor color;
- QString text;
+ TQColor color;
+ TQString text;
};
- bool loadXML( const QDomDocument& doc );
- QDomDocument saveXML( bool withPI = true ) const;
+ bool loadXML( const TQDomDocument& doc );
+ TQDomDocument saveXML( bool withPI = true ) const;
- void emptySpaceDoubleClicked( QMouseEvent* e );
+ void emptySpaceDoubleClicked( TQMouseEvent* e );
- static QString scaleToString( Scale scale );
- static QString yearFormatToString( YearFormat format );
- static QString hourFormatToString( HourFormat format );
- static Scale stringToScale( const QString& string );
- static YearFormat stringToYearFormat( const QString& string );
- static HourFormat stringToHourFormat( const QString& string );
+ static TQString scaleToString( Scale scale );
+ static TQString yearFormatToString( YearFormat format );
+ static TQString hourFormatToString( HourFormat format );
+ static Scale stringToScale( const TQString& string );
+ static YearFormat stringToYearFormat( const TQString& string );
+ static HourFormat stringToHourFormat( const TQString& string );
// PENDING(lutz) Review these
friend class KDGanttCanvasView;
@@ -457,12 +457,12 @@ private:
KDTimeTableWidget * myTimeTable;
KDLegendWidget * myLegend;
itemAttributeDialog* myItemAttributeDialog;
- QVBox * leftWidget, * rightWidget;
- QHBox * spacerLeft;
- QScrollView* myTimeHeaderScroll;
- QHBox* myTimeHeaderContainer ;
- QWidget* timeHeaderSpacerWidget;
- QWidget *spacerRight;
+ TQVBox * leftWidget, * rightWidget;
+ TQHBox * spacerLeft;
+ TQScrollView* myTimeHeaderScroll;
+ TQHBox* myTimeHeaderContainer ;
+ TQWidget* timeHeaderSpacerWidget;
+ TQWidget *spacerRight;
bool listViewIsVisible;
bool chartIsEditable;
@@ -476,14 +476,14 @@ private:
bool fDragEnabled;
bool fDropEnabled;
bool closingBlocked;
- QDateTime dtCenterTimeLineAfterShow;
+ TQDateTime dtCenterTimeLineAfterShow;
KDGanttViewItem::Shape myDefaultShape [9];
- QColor myColor[9],myColorHL[9];
+ TQColor myColor[9],myColorHL[9];
bool undefinedShape[3],undefinedColor[3],undefinedColorHL[3];
- QColor myTextColor;
- QColor myDefaultColor[3],myDefaultColorHL[3];
- QPtrList<KDGanttViewTaskLinkGroup> myTaskLinkGroupList;
- QPtrList<legendItem> *myLegendItems;
+ TQColor myTextColor;
+ TQColor myDefaultColor[3],myDefaultColorHL[3];
+ TQPtrList<KDGanttViewTaskLinkGroup> myTaskLinkGroupList;
+ TQPtrList<legendItem> *myLegendItems;
void addTaskLinkGroup(KDGanttViewTaskLinkGroup*);
void removeTaskLinkGroup(KDGanttViewTaskLinkGroup*);
int getIndex( KDGanttViewItem::Type ) const;
@@ -493,7 +493,7 @@ private:
KDGanttMinimizeSplitter *mySplitter;
bool mFixedHorizon;
protected:
- virtual QDragObject * dragObject ();
+ virtual TQDragObject * dragObject ();
virtual void startDrag ();
};
diff --git a/kdgantt/KDGanttViewEventItem.cpp b/kdgantt/KDGanttViewEventItem.cpp
index aa6e707db..01172af82 100644
--- a/kdgantt/KDGanttViewEventItem.cpp
+++ b/kdgantt/KDGanttViewEventItem.cpp
@@ -53,8 +53,8 @@
is specified, a unique name will be generated
*/
KDGanttViewEventItem::KDGanttViewEventItem( KDGanttView* view,
- const QString& lvtext,
- const QString& name ) :
+ const TQString& lvtext,
+ const TQString& name ) :
KDGanttViewItem( Event, view, lvtext, name )
{
initItem();
@@ -70,8 +70,8 @@ KDGanttViewEventItem::KDGanttViewEventItem( KDGanttView* view,
is specified, a unique name will be generated
*/
KDGanttViewEventItem::KDGanttViewEventItem( KDGanttViewItem* parent,
- const QString& lvtext,
- const QString& name ) :
+ const TQString& lvtext,
+ const TQString& name ) :
KDGanttViewItem( Event, parent, lvtext, name )
{
initItem();
@@ -90,8 +90,8 @@ KDGanttViewEventItem::KDGanttViewEventItem( KDGanttViewItem* parent,
*/
KDGanttViewEventItem::KDGanttViewEventItem( KDGanttView* view,
KDGanttViewItem* after,
- const QString& lvtext,
- const QString& name ) :
+ const TQString& lvtext,
+ const TQString& name ) :
KDGanttViewItem( Event, view, after, lvtext, name )
{
@@ -110,8 +110,8 @@ KDGanttViewEventItem::KDGanttViewEventItem( KDGanttView* view,
*/
KDGanttViewEventItem::KDGanttViewEventItem( KDGanttViewItem* parent,
KDGanttViewItem* after,
- const QString& lvtext,
- const QString& name ) :
+ const TQString& lvtext,
+ const TQString& name ) :
KDGanttViewItem( Event, parent, after, lvtext, name )
{
@@ -136,7 +136,7 @@ KDGanttViewEventItem::~KDGanttViewEventItem()
\param start the start time
\sa startTime()
*/
-void KDGanttViewEventItem::setStartTime( const QDateTime& start )
+void KDGanttViewEventItem::setStartTime( const TQDateTime& start )
{
if (! start.isValid() ) {
qDebug("KDGanttViewEventItem::setStartTime():Invalid parameter-no time set");
@@ -160,11 +160,11 @@ void KDGanttViewEventItem::setStartTime( const QDateTime& start )
the start time is set to this lead time automatically.
\param leadTimeStart the start time of the lead time; pass an
- invalid QDateTime object in order to turn the lead time off.
+ invalid TQDateTime object in order to turn the lead time off.
\sa leadTime()
*/
-void KDGanttViewEventItem::setLeadTime( const QDateTime& leadTimeStart )
+void KDGanttViewEventItem::setLeadTime( const TQDateTime& leadTimeStart )
{
if (!myLeadTime) myLeadTime = new QDateTime;
*myLeadTime = leadTimeStart;
@@ -182,11 +182,11 @@ void KDGanttViewEventItem::setLeadTime( const QDateTime& leadTimeStart )
yes, when the lead time starts.
\return if the event item is shown with a lead time line, returns
- the QDateTime object representing the start of the lead time,
- otherwise returns an invalid QDateTime object
+ the TQDateTime object representing the start of the lead time,
+ otherwise returns an invalid TQDateTime object
\sa setLeadTime()
*/
-QDateTime KDGanttViewEventItem::leadTime() const
+TQDateTime KDGanttViewEventItem::leadTime() const
{
if(myLeadTime)
return *myLeadTime;
@@ -255,9 +255,9 @@ void KDGanttViewEventItem::showItem(bool show, int coordY)
int floatStartX = myGanttView->myTimeHeader->getCoordX(myFloatStartTime);
int hei = startShape->boundingRect().height();
// FIXME: Configurable colors
- QBrush b(startShape->brush().color(), Dense4Pattern);
+ TQBrush b(startShape->brush().color(), Dense4Pattern);
floatStartTemp->setBrush(b);
- floatStartTemp->setPen(QPen(gray));
+ floatStartTemp->setPen(TQPen(gray));
if (floatStartX < startX) {
floatStartTemp->setSize(startX - floatStartX, hei/2);
floatStartTemp->move(floatStartX, allY-hei/4);
@@ -272,9 +272,9 @@ void KDGanttViewEventItem::showItem(bool show, int coordY)
int floatEndX = myGanttView->myTimeHeader->getCoordX(myFloatEndTime);
int hei = startShape->boundingRect().height();
// FIXME: Configurable colors
- QBrush b(startShape->brush().color(), Dense4Pattern);
+ TQBrush b(startShape->brush().color(), Dense4Pattern);
floatEndTemp->setBrush(b);
- floatEndTemp->setPen(QPen(gray));
+ floatEndTemp->setPen(TQPen(gray));
if (floatEndX > startX) {
floatEndTemp->setSize(floatEndX - startX, hei/2);
floatEndTemp->move(startX, allY-hei/4);
diff --git a/kdgantt/KDGanttViewEventItem.h b/kdgantt/KDGanttViewEventItem.h
index 5cd029eef..6697e60c3 100644
--- a/kdgantt/KDGanttViewEventItem.h
+++ b/kdgantt/KDGanttViewEventItem.h
@@ -41,26 +41,26 @@ class KDGanttViewEventItem : public KDGanttViewItem
{
public:
KDGanttViewEventItem( KDGanttView* view,
- const QString& lvtext = QString::null,
- const QString& name = QString::null );
+ const TQString& lvtext = TQString::null,
+ const TQString& name = TQString::null );
KDGanttViewEventItem( KDGanttViewItem* parent,
- const QString& lvtext = QString::null,
- const QString& name = QString::null );
+ const TQString& lvtext = TQString::null,
+ const TQString& name = TQString::null );
KDGanttViewEventItem( KDGanttView* view, KDGanttViewItem* after,
- const QString& lvtext = QString::null,
- const QString& name = QString::null );
+ const TQString& lvtext = TQString::null,
+ const TQString& name = TQString::null );
KDGanttViewEventItem( KDGanttViewItem* parent, KDGanttViewItem* after,
- const QString& lvtext = QString::null,
- const QString& name = QString::null );
+ const TQString& lvtext = TQString::null,
+ const TQString& name = TQString::null );
virtual ~KDGanttViewEventItem();
- void setLeadTime( const QDateTime& leadTimeStart );
- void setStartTime( const QDateTime& start );
- QDateTime leadTime() const;
+ void setLeadTime( const TQDateTime& leadTimeStart );
+ void setStartTime( const TQDateTime& start );
+ TQDateTime leadTime() const;
private:
void showItem( bool show = true, int coordY = 0 );
- QDateTime* myLeadTime;
+ TQDateTime* myLeadTime;
void initItem();
void hideMe();
};
diff --git a/kdgantt/KDGanttViewItem.cpp b/kdgantt/KDGanttViewItem.cpp
index 16665e5a2..3d36683b2 100644
--- a/kdgantt/KDGanttViewItem.cpp
+++ b/kdgantt/KDGanttViewItem.cpp
@@ -39,7 +39,7 @@
#include "KDGanttViewEventItem.h"
#include "itemAttributeDialog.h"
-#include "qpainter.h"
+#include "tqpainter.h"
#include "KDGanttXMLTools.h"
@@ -71,13 +71,13 @@
When a new item is created, the colors are set to the default values
for items of the type of this item, defined in the KDGanttView class with
void setColors( KDGanttViewItem::Type type,
- const QColor& start,
- const QColor& middle,
- const QColor& end );
+ const TQColor& start,
+ const TQColor& middle,
+ const TQColor& end );
If there is no default value defined for this type,
the colors of the shapes are set to the default color for items of this type,
defined in the KDGanttView class with:
- void setDefaultColor( KDGanttViewItem::Type type, const QColor& );
+ void setDefaultColor( KDGanttViewItem::Type type, const TQColor& );
The initial default color in the KDGanttView class is set to
blue for KDGanttViewItem::Event,
green for KDGanttViewItem::Task,
@@ -88,13 +88,13 @@
values for items of the type of this item,
defined in the KDGanttView class with:
void setHighlightColors( KDGanttViewItem::Type type,
- const QColor& start,
- const QColor& middle,
- const QColor& end );
+ const TQColor& start,
+ const TQColor& middle,
+ const TQColor& end );
If there is no default value defined for this type,
the highlight colors of the shapes are set to the default color for
items of this type, defined in the KDGanttView class with:
- void setDefaultHighlightColor( KDGanttViewItem::Type type, const QColor& );
+ void setDefaultHighlightColor( KDGanttViewItem::Type type, const TQColor& );
The initial default highlight color in the KDGanttView class is set to red
for all types.
@@ -157,7 +157,7 @@
*/
-QDict<KDGanttViewItem> KDGanttViewItem::sItemDict;
+TQDict<KDGanttViewItem> KDGanttViewItem::sItemDict;
/*!
Constructs an empty Gantt item.
@@ -169,9 +169,9 @@ QDict<KDGanttViewItem> KDGanttViewItem::sItemDict;
is specified, a unique name will be generated
*/
KDGanttViewItem::KDGanttViewItem( Type type, KDGanttView* view,
- const QString& lvtext,
- const QString& name ) :
- QListViewItem(view->myListView,lvtext)
+ const TQString& lvtext,
+ const TQString& name ) :
+ TQListViewItem(view->myListView,lvtext)
{
initColorAndShapes(type);
generateAndInsertName( name );
@@ -189,9 +189,9 @@ KDGanttViewItem::KDGanttViewItem( Type type, KDGanttView* view,
*/
KDGanttViewItem::KDGanttViewItem( Type type, KDGanttViewItem* parentItem,
- const QString& lvtext,
- const QString& name ) :
- QListViewItem(parentItem,lvtext)
+ const TQString& lvtext,
+ const TQString& name ) :
+ TQListViewItem(parentItem,lvtext)
{
initColorAndShapes(type);
generateAndInsertName( name );
@@ -211,9 +211,9 @@ KDGanttViewItem::KDGanttViewItem( Type type, KDGanttViewItem* parentItem,
KDGanttViewItem::KDGanttViewItem( Type type, KDGanttView* view,
KDGanttViewItem* after,
- const QString& lvtext,
- const QString& name ) :
- QListViewItem(view->myListView,after, lvtext)
+ const TQString& lvtext,
+ const TQString& name ) :
+ TQListViewItem(view->myListView,after, lvtext)
{
initColorAndShapes(type);
generateAndInsertName( name );
@@ -233,9 +233,9 @@ KDGanttViewItem::KDGanttViewItem( Type type, KDGanttView* view,
KDGanttViewItem::KDGanttViewItem( Type type, KDGanttViewItem* parentItem,
KDGanttViewItem* after,
- const QString& lvtext,
- const QString& name ) :
- QListViewItem( parentItem, after, lvtext )
+ const TQString& lvtext,
+ const TQString& name ) :
+ TQListViewItem( parentItem, after, lvtext )
{
initColorAndShapes(type);
generateAndInsertName( name );
@@ -283,7 +283,7 @@ KDGanttViewItem::~KDGanttViewItem()
Generates a unique name if necessary and inserts it into the item
dictionary.
*/
-void KDGanttViewItem::generateAndInsertName( const QString& name )
+void KDGanttViewItem::generateAndInsertName( const TQString& name )
{
// First check if we already had a name. This can be the case if
// the item was reconstructed from an XML file.
@@ -291,7 +291,7 @@ void KDGanttViewItem::generateAndInsertName( const QString& name )
// We had a name, remove it
sItemDict.remove( _name );
- QString newName;
+ TQString newName;
if ( name.isEmpty() || sItemDict.find( name ) ) {
// create unique name
newName.sprintf( "%p", (void* )this );
@@ -311,7 +311,7 @@ void KDGanttViewItem::generateAndInsertName( const QString& name )
\return the unique item name
*/
-QString KDGanttViewItem::name() const
+TQString KDGanttViewItem::name() const
{
return _name;
}
@@ -325,7 +325,7 @@ QString KDGanttViewItem::name() const
with that name exists
*/
-KDGanttViewItem* KDGanttViewItem::find( const QString& name )
+KDGanttViewItem* KDGanttViewItem::find( const TQString& name )
{
if (name.isEmpty()) // avoid error msg from QDict
return 0;
@@ -369,7 +369,7 @@ void KDGanttViewItem::setEnabled( bool on )
temp->setEnabled( on );
temp = temp->nextSibling();
}
- QListViewItem::setEnabled( on );
+ TQListViewItem::setEnabled( on );
myGanttView->myTimeTable->dec_blockUpdating();
}
updateCanvasItems();
@@ -414,7 +414,7 @@ void KDGanttViewItem::setItemVisible( bool on )
*/
bool KDGanttViewItem::itemVisible () const
{
- return QListViewItem::isVisible();
+ return TQListViewItem::isVisible();
}
@@ -534,7 +534,7 @@ int KDGanttViewItem::priority()
\param start the start time
\sa startTime(), setEndTime(), endTime()
*/
-void KDGanttViewItem::setStartTime( const QDateTime& )
+void KDGanttViewItem::setStartTime( const TQDateTime& )
{
}
@@ -545,7 +545,7 @@ void KDGanttViewItem::setStartTime( const QDateTime& )
\return the start time of this item
\sa setStartTime(), setEndTime(), endTime()
*/
-QDateTime KDGanttViewItem::startTime() const
+TQDateTime KDGanttViewItem::startTime() const
{
return myStartTime;
}
@@ -559,7 +559,7 @@ QDateTime KDGanttViewItem::startTime() const
\param end the end time
\sa endTime(), setStartTime(), startTime()
*/
-void KDGanttViewItem::setEndTime( const QDateTime& end )
+void KDGanttViewItem::setEndTime( const TQDateTime& end )
{
switch( type() ) {
case Event:
@@ -583,7 +583,7 @@ void KDGanttViewItem::setEndTime( const QDateTime& end )
\return the end time of this item
\sa setEndTime(), setStartTime(), startTime()
*/
-QDateTime KDGanttViewItem::endTime() const
+TQDateTime KDGanttViewItem::endTime() const
{
return myEndTime;
}
@@ -600,7 +600,7 @@ QDateTime KDGanttViewItem::endTime() const
\sa text(), setTextColor(), textColor(), setListViewText(),
listViewText()
*/
-void KDGanttViewItem::setText( const QString& text )
+void KDGanttViewItem::setText( const TQString& text )
{
textCanvas->setText(text);
textCanvasText = text;
@@ -615,18 +615,18 @@ void KDGanttViewItem::setText( const QString& text )
\sa setText(), setTextColor(), textColor(), setListViewText(),
listViewText()
*/
-QString KDGanttViewItem::text() const
+TQString KDGanttViewItem::text() const
{
return textCanvasText;
}
/*!
- \deprecated Use setListViewTest( int, const QString& ) instead
+ \deprecated Use setListViewTest( int, const TQString& ) instead
*/
-void KDGanttViewItem::setListViewText( const QString& text, int column )
+void KDGanttViewItem::setListViewText( const TQString& text, int column )
{
- QListViewItem::setText( column, text );
+ TQListViewItem::setText( column, text );
}
@@ -637,9 +637,9 @@ void KDGanttViewItem::setListViewText( const QString& text, int column )
\param text the text to be shown
\sa text(), setTextColor(), textColor(), setText(), listViewText()
*/
-void KDGanttViewItem::setListViewText( int column, const QString& text )
+void KDGanttViewItem::setListViewText( int column, const TQString& text )
{
- QListViewItem::setText( column, text );
+ TQListViewItem::setText( column, text );
}
@@ -651,9 +651,9 @@ void KDGanttViewItem::setListViewText( int column, const QString& text )
\sa setText(), setTextColor(), textColor(), text(),
setListViewText()
*/
-QString KDGanttViewItem::listViewText( int column ) const
+TQString KDGanttViewItem::listViewText( int column ) const
{
- return QListViewItem::text( column );
+ return TQListViewItem::text( column );
}
@@ -663,7 +663,7 @@ QString KDGanttViewItem::listViewText( int column ) const
\param font the font to be shown
\sa font()
*/
-void KDGanttViewItem::setFont( const QFont& font )
+void KDGanttViewItem::setFont( const TQFont& font )
{
textCanvas->setFont(font);
updateCanvasItems();
@@ -676,7 +676,7 @@ void KDGanttViewItem::setFont( const QFont& font )
\return the font used for the text in this item
\sa setFont()
*/
-QFont KDGanttViewItem::font() const
+TQFont KDGanttViewItem::font() const
{
return textCanvas->font();
}
@@ -688,7 +688,7 @@ QFont KDGanttViewItem::font() const
\param text the tooltip text
\sa tooltipText()
*/
-void KDGanttViewItem::setTooltipText( const QString& text )
+void KDGanttViewItem::setTooltipText( const TQString& text )
{
myToolTipText = text;
}
@@ -700,7 +700,7 @@ void KDGanttViewItem::setTooltipText( const QString& text )
\return the tooltip text
\sa setTooltipText()
*/
-QString KDGanttViewItem::tooltipText() const
+TQString KDGanttViewItem::tooltipText() const
{
return myToolTipText;
@@ -713,7 +713,7 @@ QString KDGanttViewItem::tooltipText() const
\param text the what's this text
\sa whatsThisText()
*/
-void KDGanttViewItem::setWhatsThisText( const QString& text )
+void KDGanttViewItem::setWhatsThisText( const TQString& text )
{
myWhatsThisText = text;
}
@@ -726,7 +726,7 @@ void KDGanttViewItem::setWhatsThisText( const QString& text )
\sa setWhatsThisText()
*/
-QString KDGanttViewItem::whatsThisText() const
+TQString KDGanttViewItem::whatsThisText() const
{
return myWhatsThisText;
}
@@ -819,25 +819,25 @@ void KDGanttViewItem::createShape( KDCanvasPolygonItem* &itemShape,
if (itemShape) delete itemShape;
if (itemShapeBack) delete itemShapeBack;
- QCanvasPolygonalItem * item;
- QCanvasPolygonalItem * itemBack;
+ TQCanvasPolygonalItem * item;
+ TQCanvasPolygonalItem * itemBack;
int size = myItemSize+2;
int hei = (myItemSize/3)/2;
switch (shape) {
case TriangleDown:
{
item = new KDCanvasPolygon(myGanttView->myTimeTable, this,Type_is_KDGanttViewItem);
- QPointArray arr = QPointArray(3);
+ TQPointArray arr = TQPointArray(3);
arr.setPoint(0,-size/2,-hei);
arr.setPoint(1,size/2,-hei);
arr.setPoint(2,0,((size/2)-hei));
- ((QCanvasPolygon*)item)->setPoints(arr);
+ ((TQCanvasPolygon*)item)->setPoints(arr);
size += 4;hei +=1;
itemBack = new KDCanvasPolygon(myGanttView->myTimeTable, this,Type_is_KDGanttViewItem);
arr.setPoint(0,-size/2,-hei);
arr.setPoint(1,size/2,-hei);
arr.setPoint(2,0,((size/2)-hei));
- ((QCanvasPolygon*)itemBack)->setPoints(arr);
+ ((TQCanvasPolygon*)itemBack)->setPoints(arr);
break;
}
@@ -847,17 +847,17 @@ void KDGanttViewItem::createShape( KDCanvasPolygonItem* &itemShape,
// of the same size as a TriangleDown-icon, if we increment the size by 2
size+=2;
item = new KDCanvasPolygon(myGanttView->myTimeTable, this,Type_is_KDGanttViewItem);
- QPointArray arr = QPointArray(3);
+ TQPointArray arr = TQPointArray(3);
arr.setPoint(0,-size/2,hei);
arr.setPoint(1,size/2,hei);
arr.setPoint(2,0,(-size/2)+hei);
- ((QCanvasPolygon*)item)->setPoints(arr);
+ ((TQCanvasPolygon*)item)->setPoints(arr);
size += 4;hei +=1;
itemBack = new KDCanvasPolygon(myGanttView->myTimeTable, this,Type_is_KDGanttViewItem);
arr.setPoint(0,-size/2,hei);
arr.setPoint(1,size/2,hei);
arr.setPoint(2,0,(-size/2)+hei);
- ((QCanvasPolygon*)itemBack)->setPoints(arr);
+ ((TQCanvasPolygon*)itemBack)->setPoints(arr);
break;
}
@@ -865,19 +865,19 @@ void KDGanttViewItem::createShape( KDCanvasPolygonItem* &itemShape,
case Diamond:
{
item = new KDCanvasPolygon(myGanttView->myTimeTable, this,Type_is_KDGanttViewItem);
- QPointArray arr = QPointArray(4);
+ TQPointArray arr = TQPointArray(4);
arr.setPoint(0,0,-size/2);
arr.setPoint(1,size/2,0);
arr.setPoint(2,0,size/2);
arr.setPoint(3,-size/2,0);
- ((QCanvasPolygon*)item)->setPoints(arr);
+ ((TQCanvasPolygon*)item)->setPoints(arr);
size += 2;hei +=1;
itemBack = new KDCanvasPolygon(myGanttView->myTimeTable, this,Type_is_KDGanttViewItem);
arr.setPoint(0,0,-size/2);
arr.setPoint(1,size/2,0);
arr.setPoint(2,0,size/2);
arr.setPoint(3,-size/2,0);
- ((QCanvasPolygon*)itemBack)->setPoints(arr);
+ ((TQCanvasPolygon*)itemBack)->setPoints(arr);
break;
}
@@ -885,19 +885,19 @@ void KDGanttViewItem::createShape( KDCanvasPolygonItem* &itemShape,
{
size -=2;
item = new KDCanvasPolygon(myGanttView->myTimeTable, this,Type_is_KDGanttViewItem);
- QPointArray arr = QPointArray(4);
+ TQPointArray arr = TQPointArray(4);
arr.setPoint(0,-size/2,-size/2);
arr.setPoint(1,size/2,-size/2);
arr.setPoint(2,size/2,size/2);
arr.setPoint(3,-size/2,size/2);
- ((QCanvasPolygon*)item)->setPoints(arr);
+ ((TQCanvasPolygon*)item)->setPoints(arr);
size += 2;hei +=1;
itemBack = new KDCanvasPolygon(myGanttView->myTimeTable, this,Type_is_KDGanttViewItem);
arr.setPoint(0,-size/2,-size/2);
arr.setPoint(1,size/2,-size/2);
arr.setPoint(2,size/2,size/2);
arr.setPoint(3,-size/2,size/2);
- ((QCanvasPolygon*)itemBack)->setPoints(arr);
+ ((TQCanvasPolygon*)itemBack)->setPoints(arr);
break;
}
@@ -954,8 +954,8 @@ void KDGanttViewItem::shapes( Shape& start, Shape& middle, Shape& end ) const
\param end the color for the end shape
\sa colors(), setShapes(), shapes(), setDefaultColor(), defaultColor()
*/
-void KDGanttViewItem::setColors( const QColor& start, const QColor& middle,
- const QColor& end )
+void KDGanttViewItem::setColors( const TQColor& start, const TQColor& middle,
+ const TQColor& end )
{
myStartColor=start ;
@@ -982,7 +982,7 @@ void KDGanttViewItem::setColors( const QColor& start, const QColor& middle,
\param end returns the end color
\sa setColors(), setShapes(), shapes(), setDefaultColor(), defaultColor()
*/
-void KDGanttViewItem::colors( QColor& start, QColor& middle, QColor& end ) const
+void KDGanttViewItem::colors( TQColor& start, TQColor& middle, TQColor& end ) const
{
start = myStartColor ;
middle = myMiddleColor;
@@ -1008,7 +1008,7 @@ void KDGanttViewItem::colors( QColor& start, QColor& middle, QColor& end ) const
\param end the highlight color for the end shape
\sa highlightColors(), setShapes(), shapes()
*/
-void KDGanttViewItem::setHighlightColors( const QColor& start, const QColor& middle, const QColor& end )
+void KDGanttViewItem::setHighlightColors( const TQColor& start, const TQColor& middle, const TQColor& end )
{
myStartColorHL=start ;
myMiddleColorHL= middle;
@@ -1034,7 +1034,7 @@ void KDGanttViewItem::setHighlightColors( const QColor& start, const QColor& mid
\param end returns the end highlight color
\sa setHighlightColors(), setShapes(), shapes()
*/
-void KDGanttViewItem::highlightColors( QColor& start, QColor& middle, QColor& end ) const
+void KDGanttViewItem::highlightColors( TQColor& start, TQColor& middle, TQColor& end ) const
{
start = myStartColorHL ;
middle = myMiddleColorHL;
@@ -1054,7 +1054,7 @@ void KDGanttViewItem::highlightColors( QColor& start, QColor& middle, QColor& en
\param color the text color
\sa textColor(), setText(), text()
*/
-void KDGanttViewItem::setTextColor( const QColor& color )
+void KDGanttViewItem::setTextColor( const TQColor& color )
{
myTextColor = color;
@@ -1077,7 +1077,7 @@ void KDGanttViewItem::setTextColor( const QColor& color )
\return the text color
\sa setTextColor(), setText(), text()
*/
-QColor KDGanttViewItem::textColor() const
+TQColor KDGanttViewItem::textColor() const
{
return myTextColor;
}
@@ -1105,17 +1105,17 @@ QColor KDGanttViewItem::textColor() const
\param pixmap the pixmap to show
\sa pixmap()
*/
-void KDGanttViewItem::setPixmap( int column, const QPixmap& pixmap )
+void KDGanttViewItem::setPixmap( int column, const TQPixmap& pixmap )
{
- QListViewItem::setPixmap( column, pixmap );
+ TQListViewItem::setPixmap( column, pixmap );
}
/*!
- \deprecated use setPixmap( int, const QPixmap& ) instead
+ \deprecated use setPixmap( int, const TQPixmap& ) instead
*/
-void KDGanttViewItem::setPixmap( const QPixmap& pixmap )
+void KDGanttViewItem::setPixmap( const TQPixmap& pixmap )
{
- QListViewItem::setPixmap( 0, pixmap );
+ TQListViewItem::setPixmap( 0, pixmap );
}
@@ -1126,9 +1126,9 @@ void KDGanttViewItem::setPixmap( const QPixmap& pixmap )
\return a pointer to the pixmap shown
\sa setPixmap()
*/
-const QPixmap* KDGanttViewItem::pixmap( int column ) const
+const TQPixmap* KDGanttViewItem::pixmap( int column ) const
{
- return QListViewItem::pixmap( column );
+ return TQListViewItem::pixmap( column );
}
@@ -1147,7 +1147,7 @@ const QPixmap* KDGanttViewItem::pixmap( int column ) const
\param color the default color to use
\sa defaultColor(), setColors(), colors()
*/
-void KDGanttViewItem::setDefaultColor( const QColor& color )
+void KDGanttViewItem::setDefaultColor( const TQColor& color )
{
myDefaultColor = color;
@@ -1173,7 +1173,7 @@ void KDGanttViewItem::setDefaultColor( const QColor& color )
\return color the default color used
\sa setDefaultColor(), setColors(), colors()
*/
-QColor KDGanttViewItem::defaultColor() const
+TQColor KDGanttViewItem::defaultColor() const
{
return myDefaultColor;
}
@@ -1194,7 +1194,7 @@ QColor KDGanttViewItem::defaultColor() const
\param color the default highlighting color to use
\sa defaultHighlightColor(), setHighlightColors(), highlightColors()
*/
-void KDGanttViewItem::setDefaultHighlightColor( const QColor& color )
+void KDGanttViewItem::setDefaultHighlightColor( const TQColor& color )
{
myDefaultColorHL = color;
if ( displaySubitemsAsGroup() ) {
@@ -1217,7 +1217,7 @@ void KDGanttViewItem::setDefaultHighlightColor( const QColor& color )
\return color the default highlighting color used
\sa setDefaultHighlightColor(), setHighlightColors(), highlightColors()
*/
-QColor KDGanttViewItem::defaultHighlightColor() const
+TQColor KDGanttViewItem::defaultHighlightColor() const
{
return myDefaultColorHL;
}
@@ -1231,7 +1231,7 @@ QColor KDGanttViewItem::defaultHighlightColor() const
KDGanttViewItem* KDGanttViewItem::firstChild() const
{
- return (KDGanttViewItem* )QListViewItem::firstChild();
+ return (KDGanttViewItem* )TQListViewItem::firstChild();
}
@@ -1243,7 +1243,7 @@ KDGanttViewItem* KDGanttViewItem::firstChild() const
*/
KDGanttViewItem* KDGanttViewItem::nextSibling() const
{
- return (KDGanttViewItem* )QListViewItem::nextSibling();
+ return (KDGanttViewItem* )TQListViewItem::nextSibling();
}
@@ -1255,7 +1255,7 @@ KDGanttViewItem* KDGanttViewItem::nextSibling() const
*/
KDGanttViewItem* KDGanttViewItem::parent() const
{
- return (KDGanttViewItem*)QListViewItem::parent();
+ return (KDGanttViewItem*)TQListViewItem::parent();
}
@@ -1266,7 +1266,7 @@ KDGanttViewItem* KDGanttViewItem::parent() const
*/
KDGanttViewItem* KDGanttViewItem::itemAbove()
{
- return (KDGanttViewItem* )QListViewItem::itemAbove();
+ return (KDGanttViewItem* )TQListViewItem::itemAbove();
}
@@ -1281,7 +1281,7 @@ KDGanttViewItem* KDGanttViewItem::itemAbove()
KDGanttViewItem* KDGanttViewItem::itemBelow( bool includeDisabled )
{
- KDGanttViewItem* retItem = (KDGanttViewItem* )QListViewItem::itemBelow();
+ KDGanttViewItem* retItem = (KDGanttViewItem* )TQListViewItem::itemBelow();
if ( !includeDisabled ) {
return retItem;
}
@@ -1290,7 +1290,7 @@ KDGanttViewItem* KDGanttViewItem::itemBelow( bool includeDisabled )
return retItem;
}
}
- KDGanttViewItem* Item2 = (KDGanttViewItem* )QListViewItem::listView()->itemAt(QPoint (2, QListViewItem::itemPos() + QListViewItem::height() +2) );
+ KDGanttViewItem* Item2 = (KDGanttViewItem* )TQListViewItem::listView()->itemAt(TQPoint (2, TQListViewItem::itemPos() + TQListViewItem::height() +2) );
if ( Item2 != 0 )
if (!Item2->enabled() )
return Item2;
@@ -1304,8 +1304,8 @@ KDGanttViewItem* KDGanttViewItem::itemBelow( bool includeDisabled )
void KDGanttViewItem::updateCanvasItems()
{
if (blockUpdating) return;
- QPen p,pBack;
- QBrush b;
+ TQPen p,pBack;
+ TQBrush b;
b.setStyle(Qt::SolidPattern);
if ( enabled() ) {
textCanvas->setColor(myTextColor);
@@ -1338,9 +1338,9 @@ void KDGanttViewItem::updateCanvasItems()
endLine->setPen(p);
}
} else {
- //QColor discol = Qt::lightGray;
- QColor discol = QColor(232,232,232);
- textCanvas->setColor( QColor(150,150,150) );
+ //TQColor discol = Qt::lightGray;
+ TQColor discol = TQColor(232,232,232);
+ textCanvas->setColor( TQColor(150,150,150) );
b.setStyle(Qt::SolidPattern);
b.setColor(discol);
startShape->setBrush(b);
@@ -1354,7 +1354,7 @@ void KDGanttViewItem::updateCanvasItems()
pBack.setWidth((myItemSize/3-1)+2);
startLineBack->setPen(pBack);
endLineBack->setPen(pBack);
- QFont f = textCanvas->font();
+ TQFont f = textCanvas->font();
f.setPixelSize(myItemSize);
textCanvas->setFont(f);
//if (isvisible) {
@@ -1380,7 +1380,7 @@ void KDGanttViewItem::setOpen( bool open )
} else {
- QListViewItem::setOpen( open );
+ TQListViewItem::setOpen( open );
}
}
@@ -1390,16 +1390,16 @@ void KDGanttViewItem::showItem( bool, int )
}
-QPoint KDGanttViewItem::getTaskLinkStartCoord(QPoint p)
+TQPoint KDGanttViewItem::getTaskLinkStartCoord(TQPoint p)
{
textCanvas->move(p.x()+myItemSize, itemPos() + height()/2-myItemSize/2);
- return QPoint (myGanttView->myTimeHeader->getCoordX(myEndTime) +myItemSize/2,itemPos()+height()/2);
+ return TQPoint (myGanttView->myTimeHeader->getCoordX(myEndTime) +myItemSize/2,itemPos()+height()/2);
}
-QPoint KDGanttViewItem::getTaskLinkEndCoord()
+TQPoint KDGanttViewItem::getTaskLinkEndCoord()
{
- return QPoint (myGanttView->myTimeHeader->getCoordX(myStartTime)-myItemSize/2 ,itemPos()-myItemSize/2+height()/2-2);
+ return TQPoint (myGanttView->myTimeHeader->getCoordX(myStartTime)-myItemSize/2 ,itemPos()-myItemSize/2+height()/2-2);
}
@@ -1423,7 +1423,7 @@ void KDGanttViewItem::initColorAndShapes(Type t)
{
_isMoveable = false;
_isResizeable = false;
- setTextOffset(QPoint(0,0));
+ setTextOffset(TQPoint(0,0));
//_isCalendar = false;
_callListViewOnSetOpen = true;
myType = t;
@@ -1445,8 +1445,8 @@ void KDGanttViewItem::initColorAndShapes(Type t)
myGanttView->myTimeHeader->saveCenterDateTime();
myStartTime = myGanttView->myTimeHeader->myCenterDateTime;
myEndTime = myStartTime;
- myToolTipText =QListViewItem::text(0);
- myWhatsThisText = QListViewItem::text(0);
+ myToolTipText =TQListViewItem::text(0);
+ myWhatsThisText = TQListViewItem::text(0);
isHighlighted = false;
isEditable = true;
_displaySubitemsAsGroup = myGanttView->displaySubitemsAsGroup();
@@ -1458,7 +1458,7 @@ void KDGanttViewItem::initColorAndShapes(Type t)
startLineBack->setZ(1);endLineBack->setZ(1);
actualEnd = new KDCanvasLine(myGanttView->myTimeTable,this,Type_is_KDGanttViewItem);
actualEnd->setZ(5);
- actualEnd->setPen( QPen ( Qt::red, 3 ) );
+ actualEnd->setPen( TQPen ( Qt::red, 3 ) );
textCanvas = new KDCanvasText(myGanttView->myTimeTable,this,Type_is_KDGanttViewItem);
textCanvas->setText("");
@@ -1498,7 +1498,7 @@ void KDGanttViewItem::initColorAndShapes(Type t)
setHighlightColors(defaultHighlightColor(),defaultHighlightColor(), defaultHighlightColor());
setFont(myGanttView->font());
// if (type() == Task)
- //setText(QListViewItem::text(0)); // testing only
+ //setText(TQListViewItem::text(0)); // testing only
//isvisible = true;
_priority = 150;
_showNoInformation = false;
@@ -1508,7 +1508,7 @@ void KDGanttViewItem::initColorAndShapes(Type t)
}
-QString KDGanttViewItem::shapeToString( Shape shape )
+TQString KDGanttViewItem::shapeToString( Shape shape )
{
switch( shape ) {
case TriangleDown:
@@ -1526,7 +1526,7 @@ QString KDGanttViewItem::shapeToString( Shape shape )
}
-KDGanttViewItem::Shape KDGanttViewItem::stringToShape( const QString& string )
+KDGanttViewItem::Shape KDGanttViewItem::stringToShape( const TQString& string )
{
if( string == "TriangleDown" )
return TriangleDown;
@@ -1549,10 +1549,10 @@ KDGanttViewItem::Shape KDGanttViewItem::stringToShape( const QString& string )
\param doc the DOM document to which the node belongs
\param parentElement the element into which to insert this node
*/
-void KDGanttViewItem::createNode( QDomDocument& doc,
- QDomElement& parentElement )
+void KDGanttViewItem::createNode( TQDomDocument& doc,
+ TQDomElement& parentElement )
{
- QDomElement itemElement = doc.createElement( "Item" );
+ TQDomElement itemElement = doc.createElement( "Item" );
parentElement.appendChild( itemElement );
itemElement.setAttribute( "Type", typeToString( type() ) );
@@ -1579,7 +1579,7 @@ void KDGanttViewItem::createNode( QDomDocument& doc,
KDGanttXML::createStringNode( doc, itemElement, "EndShape",
shapeToString( endShape ) );
KDGanttXML::createColorNode( doc, itemElement, "DefaultColor", defaultColor() );
- QColor startColor, middleColor, endColor;
+ TQColor startColor, middleColor, endColor;
colors( startColor, middleColor, endColor );
KDGanttXML::createColorNode( doc, itemElement, "StartColor", startColor );
KDGanttXML::createColorNode( doc, itemElement, "MiddleColor", middleColor );
@@ -1594,7 +1594,7 @@ void KDGanttViewItem::createNode( QDomDocument& doc,
KDGanttXML::createColorNode( doc, itemElement, "EndHighlightColor", endColor );
KDGanttXML::createColorNode( doc, itemElement, "TextColor", textColor() );
KDGanttXML::createStringNode( doc, itemElement, "Name", name() );
- QDomElement itemsElement = doc.createElement( "Items" );
+ TQDomElement itemsElement = doc.createElement( "Items" );
itemElement.appendChild( itemsElement );
KDGanttViewItem* currentItem = firstChild();
while( currentItem ) {
@@ -1615,9 +1615,9 @@ void KDGanttViewItem::createNode( QDomDocument& doc,
\return the newly created item
*/
KDGanttViewItem* KDGanttViewItem::createFromDomElement( KDGanttView* view,
- QDomElement& element )
+ TQDomElement& element )
{
- QString typeString = element.attribute( "Type" );
+ TQString typeString = element.attribute( "Type" );
Q_ASSERT( !typeString.isEmpty() );
KDGanttViewItem* item;
if( typeString == "Task" )
@@ -1647,9 +1647,9 @@ KDGanttViewItem* KDGanttViewItem::createFromDomElement( KDGanttView* view,
*/
KDGanttViewItem* KDGanttViewItem::createFromDomElement( KDGanttView* view,
KDGanttViewItem* previous,
- QDomElement& element )
+ TQDomElement& element )
{
- QString typeString = element.attribute( "Type" );
+ TQString typeString = element.attribute( "Type" );
Q_ASSERT( !typeString.isEmpty() );
KDGanttViewItem* item;
if( typeString == "Task" )
@@ -1679,9 +1679,9 @@ KDGanttViewItem* KDGanttViewItem::createFromDomElement( KDGanttView* view,
\return the newly created element
*/
KDGanttViewItem* KDGanttViewItem::createFromDomElement( KDGanttViewItem* parent,
- QDomElement& element )
+ TQDomElement& element )
{
- QString typeString = element.attribute( "Type" );
+ TQString typeString = element.attribute( "Type" );
Q_ASSERT( !typeString.isEmpty() );
KDGanttViewItem* item;
if( typeString == "Task" )
@@ -1711,9 +1711,9 @@ KDGanttViewItem* KDGanttViewItem::createFromDomElement( KDGanttViewItem* parent,
*/
KDGanttViewItem* KDGanttViewItem::createFromDomElement( KDGanttViewItem* parent,
KDGanttViewItem* previous,
- QDomElement& element )
+ TQDomElement& element )
{
- QString typeString = element.attribute( "Type" );
+ TQString typeString = element.attribute( "Type" );
Q_ASSERT( !typeString.isEmpty() );
KDGanttViewItem* item;
if( typeString == "Task" )
@@ -1735,48 +1735,48 @@ KDGanttViewItem* KDGanttViewItem::createFromDomElement( KDGanttViewItem* parent,
/*
Fills in the values in the item by reading the DOM element.
*/
-void KDGanttViewItem::loadFromDomElement( QDomElement& element )
+void KDGanttViewItem::loadFromDomElement( TQDomElement& element )
{
- QDomNode node = element.firstChild();
+ TQDomNode node = element.firstChild();
Shape startShape = TriangleDown, middleShape = TriangleDown,
endShape = TriangleDown;
- QColor startColor, middleColor, endColor;
- QColor startHighlightColor, middleHighlightColor, endHighlightColor;
- QString tempName;
+ TQColor startColor, middleColor, endColor;
+ TQColor startHighlightColor, middleHighlightColor, endHighlightColor;
+ TQString tempName;
while( !node.isNull() ) {
- QDomElement element = node.toElement();
+ TQDomElement element = node.toElement();
if( !element.isNull() ) { // was really an element
- QString tagName = element.tagName();
+ TQString tagName = element.tagName();
if( tagName == "StartTime" ) {
- QDateTime value;
+ TQDateTime value;
if( KDGanttXML::readDateTimeNode( element, value ) )
setStartTime( value );
} else if( tagName == "EndTime" ) {
- QDateTime value;
+ TQDateTime value;
if( KDGanttXML::readDateTimeNode( element, value ) )
setEndTime( value );
} else if( tagName == "Text" ) {
- QString value;
+ TQString value;
if( KDGanttXML::readStringNode( element, value ) )
setText( value );
} else if( tagName == "Font" ) {
- QFont value;
+ TQFont value;
if( KDGanttXML::readFontNode( element, value ) )
setFont( value );
} else if( tagName == "TooltipText" ) {
- QString value;
+ TQString value;
if( KDGanttXML::readStringNode( element, value ) )
setTooltipText( value );
} else if( tagName == "WhatsThisText" ) {
- QString value;
+ TQString value;
if( KDGanttXML::readStringNode( element, value ) )
setWhatsThisText( value );
} else if( tagName == "Pixmap" ) {
- QPixmap value;
+ TQPixmap value;
if( KDGanttXML::readPixmapNode( element, value ) )
setPixmap( value );
} else if( tagName == "ListViewText" ) {
- QString value;
+ TQString value;
if( KDGanttXML::readStringNode( element, value ) )
setListViewText( value );
} else if( tagName == "Open" ) {
@@ -1788,64 +1788,64 @@ void KDGanttViewItem::loadFromDomElement( QDomElement& element )
if( KDGanttXML::readBoolNode( element, value ) )
setHighlight( value );
} else if( tagName == "StartShape" ) {
- QString value;
+ TQString value;
if( KDGanttXML::readStringNode( element, value ) )
startShape = stringToShape( value );
} else if( tagName == "MiddleShape" ) {
- QString value;
+ TQString value;
if( KDGanttXML::readStringNode( element, value ) )
middleShape = stringToShape( value );
} else if( tagName == "EndShape" ) {
- QString value;
+ TQString value;
if( KDGanttXML::readStringNode( element, value ) )
endShape = stringToShape( value );
} else if( tagName == "DefaultColor" ) {
- QColor value;
+ TQColor value;
if( KDGanttXML::readColorNode( element, value ) )
setDefaultColor( value );
} else if( tagName == "StartColor" ) {
- QColor value;
+ TQColor value;
if( KDGanttXML::readColorNode( element, value ) )
startColor = value;
} else if( tagName == "MiddleColor" ) {
- QColor value;
+ TQColor value;
if( KDGanttXML::readColorNode( element, value ) )
middleColor = value;
} else if( tagName == "EndColor" ) {
- QColor value;
+ TQColor value;
if( KDGanttXML::readColorNode( element, value ) )
endColor = value;
} else if( tagName == "DefaultHighlightColor" ) {
- QColor value;
+ TQColor value;
if( KDGanttXML::readColorNode( element, value ) )
setDefaultHighlightColor( value );
} else if( tagName == "StartHighlightColor" ) {
- QColor value;
+ TQColor value;
if( KDGanttXML::readColorNode( element, value ) )
startHighlightColor = value;
} else if( tagName == "MiddleHighlightColor" ) {
- QColor value;
+ TQColor value;
if( KDGanttXML::readColorNode( element, value ) )
middleHighlightColor = value;
} else if( tagName == "EndHighlightColor" ) {
- QColor value;
+ TQColor value;
if( KDGanttXML::readColorNode( element, value ) )
endHighlightColor = value;
} else if( tagName == "TextColor" ) {
- QColor value;
+ TQColor value;
if( KDGanttXML::readColorNode( element, value ) )
setTextColor( value );
} else if( tagName == "Name" ) {
- QString value;
+ TQString value;
if( KDGanttXML::readStringNode( element, value ) )
tempName = value;
} else if( tagName == "Items" ) {
- QDomNode node = element.firstChild();
+ TQDomNode node = element.firstChild();
KDGanttViewItem* previous = 0;
while( !node.isNull() ) {
- QDomElement element = node.toElement();
+ TQDomElement element = node.toElement();
if( !element.isNull() ) { // was really an element
- QString tagName = element.tagName();
+ TQString tagName = element.tagName();
if( tagName == "Item" ) {
KDGanttViewItem* newItem;
if( previous )
@@ -1883,7 +1883,7 @@ void KDGanttViewItem::loadFromDomElement( QDomElement& element )
}
-QString KDGanttViewItem::typeToString( Type type )
+TQString KDGanttViewItem::typeToString( Type type )
{
switch( type ) {
case Event:
@@ -1948,9 +1948,9 @@ void KDGanttViewItem::showSubitemTree( int CoordY )
\return the start time of the children of this item
*/
-QDateTime KDGanttViewItem::myChildStartTime()
+TQDateTime KDGanttViewItem::myChildStartTime()
{
- QDateTime ret, tempTime;
+ TQDateTime ret, tempTime;
bool set = true;
KDGanttViewItem* temp = (KDGanttViewItem*) firstChild();
if (temp) {
@@ -1982,9 +1982,9 @@ QDateTime KDGanttViewItem::myChildStartTime()
\return the end time of the children of this item
*/
-QDateTime KDGanttViewItem::myChildEndTime()
+TQDateTime KDGanttViewItem::myChildEndTime()
{
- QDateTime ret, tempTime;
+ TQDateTime ret, tempTime;
bool set = true;
KDGanttViewItem* temp = (KDGanttViewItem*) firstChild();
if (temp) {
@@ -2030,7 +2030,7 @@ bool KDGanttViewItem::showNoInformation()
The height of the line is the height of the item.
The brush of the line is specified by KDGanttView::setNoInformationBrush().
(i.e. the same brush for all items of the Gantt view).
- The default brush is QBrush( QColor ( 100,100,100 ), Qt::FDiagPattern );
+ The default brush is TQBrush( TQColor ( 100,100,100 ), Qt::FDiagPattern );
\param show if true, the 'showNoInformation' line is shown for this item
\sa showNoInformation(), KDGanttView::setNoInformationBrush(), KDGanttView::noInformationBrush()
*/
@@ -2049,7 +2049,7 @@ void KDGanttViewItem::setShowNoInformation( bool show )
\param name the name of the item
\return the pointer to the item with name \a name
*/
-KDGanttViewItem* KDGanttViewItem::getChildByName( const QString& name )
+KDGanttViewItem* KDGanttViewItem::getChildByName( const TQString& name )
{
if ( listViewText() == name )
return this;
@@ -2064,7 +2064,7 @@ KDGanttViewItem* KDGanttViewItem::getChildByName( const QString& name )
/*
-void KDGanttViewItem::printinfo( QString s )
+void KDGanttViewItem::printinfo( TQString s )
{
KDGanttViewItem* temp = firstChild();
while (temp != 0) {
@@ -2105,7 +2105,7 @@ int KDGanttViewItem::computeHeight()
showItem( false );
if ( firstChild() )
firstChild()->hideSubtree();
- // qDebug("KDGanttViewItem::computeHeight() %s returns 0 ", QListViewItem::text(0).latin1());
+ // qDebug("KDGanttViewItem::computeHeight() %s returns 0 ", TQListViewItem::text(0).latin1());
return 0;
}
@@ -2146,7 +2146,7 @@ int KDGanttViewItem::computeHeight()
// display closed item as usual
//
if ( isOpen() ) {
- //qDebug("KDGanttViewItem::computeHeight() %s is open ", QListViewItem::text(0).latin1());
+ //qDebug("KDGanttViewItem::computeHeight() %s is open ", TQListViewItem::text(0).latin1());
temp = firstChild();
// if item opened, iterate over all subitems
int tempHeight;
@@ -2169,7 +2169,7 @@ int KDGanttViewItem::computeHeight()
temp = temp->nextSibling();
}
} else { // closed!
- //qDebug("KDGanttViewItem::computeHeight() %s is closed ", QListViewItem::text(0).latin1());
+ //qDebug("KDGanttViewItem::computeHeight() %s is closed ", TQListViewItem::text(0).latin1());
if ( !displaySubitemsAsGroup() ) {
if ( firstChild() ) {
@@ -2187,7 +2187,7 @@ int KDGanttViewItem::computeHeight()
showItem( true );
hei += height();
- //qDebug("KDGanttViewItem::computeHeight() %s returns: %d ", QListViewItem::text(0).latin1(), hei);
+ //qDebug("KDGanttViewItem::computeHeight() %s returns: %d ", TQListViewItem::text(0).latin1(), hei);
return hei;
}
@@ -2209,10 +2209,10 @@ bool KDGanttViewItem::showNoCross()
}
-void KDGanttViewItem::paintBranches ( QPainter* p, const QColorGroup& cg,
+void KDGanttViewItem::paintBranches ( TQPainter* p, const TQColorGroup& cg,
int w, int y, int h )
{
- QListViewItem::paintBranches ( p, cg, w, y, h);
+ TQListViewItem::paintBranches ( p, cg, w, y, h);
if ( !myGanttView->calendarMode() )
return;
else {
@@ -2224,7 +2224,7 @@ void KDGanttViewItem::paintBranches ( QPainter* p, const QColorGroup& cg,
int hei = temp->height();
//qDebug(" y %d w %d h %d ", y,w,h);
//qDebug("yc %d hei %d",y_coord,hei );
- myGanttView->myListView->paintemptyarea( p, QRect( 0,y+y_coord,w,hei));
+ myGanttView->myListView->paintemptyarea( p, TQRect( 0,y+y_coord,w,hei));
int x_c = w/2;
int y_c = y+y_coord+ temp->height ()/2;
int y_ce ;
@@ -2465,16 +2465,16 @@ bool KDGanttViewItem::isCalendar( ) const
/*!
Returns the coordinate of this items middle left point
*/
-QPoint KDGanttViewItem::middleLeft()
+TQPoint KDGanttViewItem::middleLeft()
{
- return QPoint(myGanttView->myTimeHeader->getCoordX(myStartTime), itemPos()+height()/2);
+ return TQPoint(myGanttView->myTimeHeader->getCoordX(myStartTime), itemPos()+height()/2);
}
/*!
Returns the coordinate of this items middle right point
*/
-QPoint KDGanttViewItem::middleRight()
+TQPoint KDGanttViewItem::middleRight()
{
- return QPoint(myGanttView->myTimeHeader->getCoordX(myEndTime), itemPos()+height()/2);
+ return TQPoint(myGanttView->myTimeHeader->getCoordX(myEndTime), itemPos()+height()/2);
}
/*!
Moves this items text.
@@ -2496,21 +2496,21 @@ void KDGanttViewItem::moveTextCanvas(int x, int y)
*/
void KDGanttViewItem::moveTextCanvas()
{
- QPoint m = myTextOffset+middleRight();
+ TQPoint m = myTextOffset+middleRight();
textCanvas->move(m.x(), m.y()-myItemSize/2);
}
/*!
Sets with how much the item text is offset.
*/
-void KDGanttViewItem::setTextOffset(QPoint p)
+void KDGanttViewItem::setTextOffset(TQPoint p)
{
//qDebug("%s: setTextOffset() offset: %d,%d",listViewText(0).latin1(),p.x(),p.y());
myTextOffset.setX(p.x());
myTextOffset.setY(p.y());
}
-bool KDGanttViewItem::isMyTextCanvas(QCanvasItem *tc)
+bool KDGanttViewItem::isMyTextCanvas(TQCanvasItem *tc)
{
return tc == textCanvas;
}
@@ -2534,7 +2534,7 @@ void KDGanttViewItem::setProgress(int percent)
\param start the float start time
*/
-void KDGanttViewItem::setFloatStartTime(const QDateTime &start)
+void KDGanttViewItem::setFloatStartTime(const TQDateTime &start)
{
myFloatStartTime = start;
}
@@ -2545,7 +2545,7 @@ void KDGanttViewItem::setFloatStartTime(const QDateTime &start)
\param end the float end time
*/
-void KDGanttViewItem::setFloatEndTime(const QDateTime &end)
+void KDGanttViewItem::setFloatEndTime(const TQDateTime &end)
{
myFloatEndTime = end;
}
diff --git a/kdgantt/KDGanttViewItem.h b/kdgantt/KDGanttViewItem.h
index e296db0ad..cebced302 100644
--- a/kdgantt/KDGanttViewItem.h
+++ b/kdgantt/KDGanttViewItem.h
@@ -36,15 +36,15 @@
#ifndef KDGANTTVIEWITEM_H
#define KDGANTTVIEWITEM_H
-#include <qdatetime.h>
-#include <qstring.h>
-#include <qcolor.h>
-#include <qpixmap.h>
-#include <qfont.h>
-#include <qlistview.h>
-#include <qcanvas.h>
-#include <qdom.h>
-#include <qdict.h>
+#include <tqdatetime.h>
+#include <tqstring.h>
+#include <tqcolor.h>
+#include <tqpixmap.h>
+#include <tqfont.h>
+#include <tqlistview.h>
+#include <tqcanvas.h>
+#include <tqdom.h>
+#include <tqdict.h>
class KDGanttView;
class KDTimeTableWidget;
@@ -63,26 +63,26 @@ public:
protected:
KDGanttViewItem( Type type, KDGanttView* view,
- const QString& lvtext = QString::null,
- const QString& name = QString::null );
+ const TQString& lvtext = TQString::null,
+ const TQString& name = TQString::null );
KDGanttViewItem( Type type, KDGanttViewItem* parent,
- const QString& lvtext = QString::null,
- const QString& name = QString::null );
+ const TQString& lvtext = TQString::null,
+ const TQString& name = TQString::null );
KDGanttViewItem( Type type, KDGanttView* view, KDGanttViewItem* after,
- const QString& lvtext = QString::null,
- const QString& name = QString::null );
+ const TQString& lvtext = TQString::null,
+ const TQString& name = TQString::null );
KDGanttViewItem( Type type, KDGanttViewItem* parent,
KDGanttViewItem* after,
- const QString& lvtext = QString::null,
- const QString& name = QString::null );
+ const TQString& lvtext = TQString::null,
+ const TQString& name = TQString::null );
//bool _isCalendar;
bool isVisibleInGanttView;
void updateCanvasItems();
int getCoordY();
- QDateTime myChildStartTime();
- QDateTime myChildEndTime();
- void generateAndInsertName( const QString& name );
+ TQDateTime myChildStartTime();
+ TQDateTime myChildEndTime();
+ void generateAndInsertName( const TQString& name );
KDCanvasLine * startLine, *endLine,
* startLineBack, *endLineBack, *actualEnd ;
KDCanvasPolygonItem* startShape,* midShape, *endShape, *progressShape,
@@ -90,16 +90,16 @@ protected:
* floatStartShape, * floatEndShape;
KDGanttView* myGanttView;
KDCanvasText* textCanvas;
- QString textCanvasText;
- QDateTime myStartTime, myEndTime;
+ TQString textCanvasText;
+ TQDateTime myStartTime, myEndTime;
bool isHighlighted, isEditable;
int myItemSize;
bool blockUpdating;
void moveTextCanvas(int x, int y);
int myProgress;
- QDateTime myFloatStartTime;
- QDateTime myFloatEndTime;
+ TQDateTime myFloatStartTime;
+ TQDateTime myFloatEndTime;
public:
virtual ~KDGanttViewItem();
@@ -118,25 +118,25 @@ public:
bool displaySubitemsAsGroup() const;
void setPriority( int prio );
int priority();
- virtual void setStartTime( const QDateTime& start );
- QDateTime startTime() const;
- virtual void setEndTime( const QDateTime& end );
- QDateTime endTime() const;
-
- void setText( const QString& text );
- QString text() const;
- void setListViewText( const QString& text, int column = 0 );
- void setListViewText( int column, const QString& text );
- QString listViewText( int column = 0 ) const;
- void setFont( const QFont& font );
- QFont font() const;
- void setTooltipText( const QString& text );
- QString tooltipText() const;
- void setWhatsThisText( const QString& text );
- QString whatsThisText() const;
- void setPixmap( int column, const QPixmap& pixmap );
- void setPixmap( const QPixmap& pixmap );
- const QPixmap* pixmap( int column = 0 ) const;
+ virtual void setStartTime( const TQDateTime& start );
+ TQDateTime startTime() const;
+ virtual void setEndTime( const TQDateTime& end );
+ TQDateTime endTime() const;
+
+ void setText( const TQString& text );
+ TQString text() const;
+ void setListViewText( const TQString& text, int column = 0 );
+ void setListViewText( int column, const TQString& text );
+ TQString listViewText( int column = 0 ) const;
+ void setFont( const TQFont& font );
+ TQFont font() const;
+ void setTooltipText( const TQString& text );
+ TQString tooltipText() const;
+ void setWhatsThisText( const TQString& text );
+ TQString whatsThisText() const;
+ void setPixmap( int column, const TQPixmap& pixmap );
+ void setPixmap( const TQPixmap& pixmap );
+ const TQPixmap* pixmap( int column = 0 ) const;
void setHighlight( bool );
bool highlight() const;
@@ -147,44 +147,44 @@ public:
void setShapes( Shape start, Shape middle, Shape end );
void shapes( Shape& start, Shape& middle, Shape& end ) const;
- void setDefaultColor( const QColor& );
- QColor defaultColor() const;
- void setColors( const QColor& start, const QColor& middle,
- const QColor& end );
- void colors( QColor& start, QColor& middle, QColor& end ) const;
- void setDefaultHighlightColor( const QColor& );
- QColor defaultHighlightColor() const;
- void setHighlightColors( const QColor& start, const QColor& middle,
- const QColor& end );
- void highlightColors( QColor& start, QColor& middle, QColor& end ) const;
- void setTextColor( const QColor& color );
- QColor textColor() const;
+ void setDefaultColor( const TQColor& );
+ TQColor defaultColor() const;
+ void setColors( const TQColor& start, const TQColor& middle,
+ const TQColor& end );
+ void colors( TQColor& start, TQColor& middle, TQColor& end ) const;
+ void setDefaultHighlightColor( const TQColor& );
+ TQColor defaultHighlightColor() const;
+ void setHighlightColors( const TQColor& start, const TQColor& middle,
+ const TQColor& end );
+ void highlightColors( TQColor& start, TQColor& middle, TQColor& end ) const;
+ void setTextColor( const TQColor& color );
+ TQColor textColor() const;
void setProgress(int percent);
- void setFloatStartTime(const QDateTime &start);
- void setFloatEndTime(const QDateTime &end);
+ void setFloatStartTime(const TQDateTime &start);
+ void setFloatEndTime(const TQDateTime &end);
KDGanttViewItem* firstChild() const;
KDGanttViewItem* nextSibling() const;
KDGanttViewItem* parent() const;
KDGanttViewItem* itemAbove();
KDGanttViewItem* itemBelow( bool includeDisabled = true );
- KDGanttViewItem* getChildByName( const QString& name );
- QString name() const;
- static KDGanttViewItem* find( const QString& name );
+ KDGanttViewItem* getChildByName( const TQString& name );
+ TQString name() const;
+ static KDGanttViewItem* find( const TQString& name );
- void createNode( QDomDocument& doc,
- QDomElement& parentElement );
+ void createNode( TQDomDocument& doc,
+ TQDomElement& parentElement );
static KDGanttViewItem* createFromDomElement( KDGanttView* view,
- QDomElement& element );
+ TQDomElement& element );
static KDGanttViewItem* createFromDomElement( KDGanttView* view,
KDGanttViewItem* previous,
- QDomElement& element );
+ TQDomElement& element );
static KDGanttViewItem* createFromDomElement( KDGanttViewItem* parent,
- QDomElement& element );
+ TQDomElement& element );
static KDGanttViewItem* createFromDomElement( KDGanttViewItem* parent,
KDGanttViewItem* previous,
- QDomElement& element );
+ TQDomElement& element );
void setMoveable( bool m );
bool isMoveable() const;
@@ -202,9 +202,9 @@ private:
friend class KDGanttViewItemDrag;
friend class itemAttributeDialog;
- static QString shapeToString( Shape shape );
- static Shape stringToShape( const QString& string );
- static QString typeToString( Type type );
+ static TQString shapeToString( Shape shape );
+ static Shape stringToShape( const TQString& string );
+ static TQString typeToString( Type type );
Type myType;
void initColorAndShapes(Type t);
@@ -218,33 +218,33 @@ private:
void setCallListViewOnSetOpen( bool call );
bool showNoCross();
void createShape(KDCanvasPolygonItem* &,KDCanvasPolygonItem* &, Shape);
- void loadFromDomElement( QDomElement& element );
+ void loadFromDomElement( TQDomElement& element );
- //QFont myFont;
- QString myToolTipText,myWhatsThisText;
- void paintBranches ( QPainter * p, const QColorGroup & cg, int w, int y, int h );
+ //TQFont myFont;
+ TQString myToolTipText,myWhatsThisText;
+ void paintBranches ( TQPainter * p, const TQColorGroup & cg, int w, int y, int h );
bool _displaySubitemsAsGroup;
bool _showNoInformation;
bool _enabled;
bool _callListViewOnSetOpen;
Shape myStartShape,myMiddleShape,myEndShape;
- QColor myStartColor,myMiddleColor,myEndColor;
- QColor myStartColorHL,myMiddleColorHL,myEndColorHL;
- QColor myDefaultColor,myDefaultColorHL;
- QColor myTextColor;
+ TQColor myStartColor,myMiddleColor,myEndColor;
+ TQColor myStartColorHL,myMiddleColorHL,myEndColorHL;
+ TQColor myDefaultColor,myDefaultColorHL;
+ TQColor myTextColor;
bool colorDefined,colorHLDefined;
- QPoint getTaskLinkStartCoord(QPoint);
- QPoint getTaskLinkEndCoord();
- QPoint middleLeft();
- QPoint middleRight();
+ TQPoint getTaskLinkStartCoord(TQPoint);
+ TQPoint getTaskLinkEndCoord();
+ TQPoint middleLeft();
+ TQPoint middleRight();
void moveTextCanvas();
- void setTextOffset(QPoint p);
- bool isMyTextCanvas(QCanvasItem *tc);
- QPoint myTextOffset;
- QString _name;
+ void setTextOffset(TQPoint p);
+ bool isMyTextCanvas(TQCanvasItem *tc);
+ TQPoint myTextOffset;
+ TQString _name;
bool shapeDefined;
int _priority;
- static QDict<KDGanttViewItem> sItemDict;
+ static TQDict<KDGanttViewItem> sItemDict;
bool _isMoveable;
bool _isResizeable;
diff --git a/kdgantt/KDGanttViewItemDrag.cpp b/kdgantt/KDGanttViewItemDrag.cpp
index bbc629141..23bf90ac9 100644
--- a/kdgantt/KDGanttViewItemDrag.cpp
+++ b/kdgantt/KDGanttViewItemDrag.cpp
@@ -32,7 +32,7 @@
#include <KDGanttViewItemDrag.h>
#include <KDGanttViewItem.h>
-#include <qpixmap.h>
+#include <tqpixmap.h>
#include <KDGanttView.h>
/*!
@@ -54,28 +54,28 @@
\param source the source widget
\param name the internal object name
*/
-KDGanttViewItemDrag::KDGanttViewItemDrag( KDGanttViewItem* item , QWidget *source, const char * name ) : QStoredDrag("x-application/x-KDGanttViewItemDrag", source, name )
+KDGanttViewItemDrag::KDGanttViewItemDrag( KDGanttViewItem* item , TQWidget *source, const char * name ) : TQStoredDrag("x-application/x-KDGanttViewItemDrag", source, name )
{
myItem = item;
- QPixmap pix;
+ TQPixmap pix;
if (item->pixmap() )
pix = *(item->pixmap()) ;
else {
KDGanttViewItem::Shape start, middle, end;
item->shapes( start, middle, end );
- QColor st, mi, en;
+ TQColor st, mi, en;
item->colors( st, mi, en );
pix =item->myGanttView->getPixmap( start, st, item->myGanttView->lvBackgroundColor(), 11 );
}
- setPixmap( pix , QPoint( -10,-10 ));
- QDomDocument doc( "GanttView" );
- QString docstart = "<GanttView/>";
+ setPixmap( pix , TQPoint( -10,-10 ));
+ TQDomDocument doc( "GanttView" );
+ TQString docstart = "<GanttView/>";
doc.setContent( docstart );
- QDomElement itemsElement = doc.createElement( "Items" );
+ TQDomElement itemsElement = doc.createElement( "Items" );
doc.documentElement().appendChild( itemsElement );
item->createNode( doc, itemsElement );
- QDataStream s( array, IO_WriteOnly );
+ TQDataStream s( array, IO_WriteOnly );
s << doc.toString();
}
@@ -86,13 +86,13 @@ KDGanttViewItemDrag::KDGanttViewItemDrag( KDGanttViewItem* item , QWidget *sourc
\param c the format of the data
\return the encoded data of the drag object
*/
-QByteArray KDGanttViewItemDrag::encodedData( const char * c) const
+TQByteArray KDGanttViewItemDrag::encodedData( const char * c) const
{
- QString s ( c );
+ TQString s ( c );
if ( s == "x-application/x-KDGanttViewItemDrag" ) {
return array;
}
- return QByteArray();
+ return TQByteArray();
}
/*!
@@ -112,9 +112,9 @@ KDGanttViewItem* KDGanttViewItemDrag::getItem()
\param e the mime source that has been dragged
\return true if KDGanttViewItemDrag can decode the data in \a e.
*/
-bool KDGanttViewItemDrag::canDecode ( const QMimeSource * e )
+bool KDGanttViewItemDrag::canDecode ( const TQMimeSource * e )
{
- if ( QString( e->format() ) == "x-application/x-KDGanttViewItemDrag" )
+ if ( TQString( e->format() ) == "x-application/x-KDGanttViewItemDrag" )
return true;
return false;
@@ -129,11 +129,11 @@ bool KDGanttViewItemDrag::canDecode ( const QMimeSource * e )
\param string the resulting XML string
\return true if the operation succeeded
*/
-bool KDGanttViewItemDrag::decode ( const QMimeSource * e , QString & string)
+bool KDGanttViewItemDrag::decode ( const TQMimeSource * e , TQString & string)
{
- QByteArray arr;
+ TQByteArray arr;
arr = e->encodedData( "x-application/x-KDGanttViewItemDrag");
- QDataStream s( arr, IO_ReadOnly );
+ TQDataStream s( arr, IO_ReadOnly );
s >> string;
return true;
}
diff --git a/kdgantt/KDGanttViewItemDrag.h b/kdgantt/KDGanttViewItemDrag.h
index c017720ea..2512711ea 100644
--- a/kdgantt/KDGanttViewItemDrag.h
+++ b/kdgantt/KDGanttViewItemDrag.h
@@ -32,9 +32,9 @@
#ifndef KDGANTTVIEWITEMGRAG_H
#define KDGANTTVIEWITEMGRAG_H
-#include <qwidget.h>
-#include <qcstring.h>
-#include <qdragobject.h>
+#include <tqwidget.h>
+#include <tqcstring.h>
+#include <tqdragobject.h>
class KDGanttViewItem;
@@ -42,16 +42,16 @@ class KDGanttViewItem;
class KDGanttViewItemDrag :public QStoredDrag
{
public:
- KDGanttViewItemDrag(KDGanttViewItem* item, QWidget *source, const char * name ) ;
+ KDGanttViewItemDrag(KDGanttViewItem* item, TQWidget *source, const char * name ) ;
- QByteArray encodedData( const char * c) const;
+ TQByteArray encodedData( const char * c) const;
KDGanttViewItem* getItem();
- static bool canDecode ( const QMimeSource * e );
- static bool decode ( const QMimeSource * e, QString & );
+ static bool canDecode ( const TQMimeSource * e );
+ static bool decode ( const TQMimeSource * e, TQString & );
protected:
private:
- QByteArray array;
+ TQByteArray array;
KDGanttViewItem* myItem;
};
diff --git a/kdgantt/KDGanttViewSubwidgets.cpp b/kdgantt/KDGanttViewSubwidgets.cpp
index d35f7eba5..ffec65282 100644
--- a/kdgantt/KDGanttViewSubwidgets.cpp
+++ b/kdgantt/KDGanttViewSubwidgets.cpp
@@ -41,43 +41,43 @@
#include "KDGanttViewSubwidgets.moc"
#endif
-#include <qlabel.h>
-#include <qheader.h>
-#include <qpainter.h>
-#include <qrect.h>
-#include <qtooltip.h>
-#include <qapplication.h>
-#include <qdrawutil.h>
-#include <qpalette.h>
-#include <qdragobject.h>
-#include <qptrlist.h>
-#include <qpen.h>
+#include <tqlabel.h>
+#include <tqheader.h>
+#include <tqpainter.h>
+#include <tqrect.h>
+#include <tqtooltip.h>
+#include <tqapplication.h>
+#include <tqdrawutil.h>
+#include <tqpalette.h>
+#include <tqdragobject.h>
+#include <tqptrlist.h>
+#include <tqpen.h>
#include <kglobal.h>
#include <klocale.h>
#include <kcalendarsystem.h>
#include <kdebug.h>
-KDTimeTableWidget:: KDTimeTableWidget( QWidget* parent,KDGanttView* myGantt)
- : QCanvas (parent)
+KDTimeTableWidget:: KDTimeTableWidget( TQWidget* parent,KDGanttView* myGantt)
+ : TQCanvas (parent)
{
myGanttView = myGantt;
taskLinksVisible = true;
flag_blockUpdating = false;
int_blockUpdating = 0;
gridPen.setStyle(Qt::DotLine);
- gridPen.setColor(QColor(100,100,100));
+ gridPen.setColor(TQColor(100,100,100));
maximumComputedGridHeight = 0;
denseLineCount = 0;
- denseLineBrush = QBrush( QColor ( 240,240,240 ));
- noInfoLineBrush = QBrush( QColor ( 100,100,100 ), Qt::FDiagPattern );
+ denseLineBrush = TQBrush( TQColor ( 240,240,240 ));
+ noInfoLineBrush = TQBrush( TQColor ( 100,100,100 ), Qt::FDiagPattern );
pendingHeight = 0;
pendingWidth = 0;
retune(256);
resize(1,1);
}
-QPtrList<KDGanttViewTaskLink> KDTimeTableWidget::taskLinks()
+TQPtrList<KDGanttViewTaskLink> KDTimeTableWidget::taskLinks()
{
return myTaskLinkList;
}
@@ -85,7 +85,7 @@ QPtrList<KDGanttViewTaskLink> KDTimeTableWidget::taskLinks()
void KDTimeTableWidget::clearTaskLinks()
{
// cannot use clear() here, as tasklinks will remove themselves from my list when deleted!
- QPtrListIterator<KDGanttViewTaskLink> it(myTaskLinkList);
+ TQPtrListIterator<KDGanttViewTaskLink> it(myTaskLinkList);
while (it.current()) {
delete it.current();
}
@@ -120,38 +120,38 @@ void KDTimeTableWidget::checkHeight( int hei )
}
-void KDTimeTableWidget::setNoInformationBrush( const QBrush& brush )
+void KDTimeTableWidget::setNoInformationBrush( const TQBrush& brush )
{
noInfoLineBrush = brush;
updateMyContent();
}
-QBrush KDTimeTableWidget::noInformationBrush() const
+TQBrush KDTimeTableWidget::noInformationBrush() const
{
return noInfoLineBrush;
}
void KDTimeTableWidget::removeItemFromTasklinks( KDGanttViewItem* item)
{
- QPtrListIterator<KDGanttViewTaskLink> it((myTaskLinkList));
+ TQPtrListIterator<KDGanttViewTaskLink> it((myTaskLinkList));
for ( ; it.current(); ++it ) {
it.current()->removeItemFromList( item );
}
}
-void KDTimeTableWidget::expandItem( QListViewItem * item)
+void KDTimeTableWidget::expandItem( TQListViewItem * item)
{
item->invalidateHeight () ;
//qApp->processEvents();
updateMyContent();
}
-void KDTimeTableWidget::collapseItem( QListViewItem * item)
+void KDTimeTableWidget::collapseItem( TQListViewItem * item)
{
item->invalidateHeight () ;
//qApp->processEvents();
updateMyContent();
}
-void KDTimeTableWidget::highlightItem( QListViewItem * item )
+void KDTimeTableWidget::highlightItem( TQListViewItem * item )
{
static bool itemwashighlighted;
static KDGanttViewItem* highlightedItem = 0;
@@ -203,15 +203,15 @@ void KDTimeTableWidget::computeVerticalGrid()
wid = width();
KDCanvasLine* templine;
KDCanvasRectangle* temprect;
- QColor colcol;
- QPen colPen;
+ TQColor colcol;
+ TQPen colPen;
bool colorIterator = true;
if (myGanttView->showMinorTicks()){//minor
colPen.setWidth(cw);
- QPtrListIterator<KDCanvasRectangle> itcol(columnColorList);
- QPtrListIterator<KDCanvasLine> itgrid(verGridList);
+ TQPtrListIterator<KDCanvasRectangle> itcol(columnColorList);
+ TQPtrListIterator<KDCanvasLine> itgrid(verGridList);
for ( ; itgrid.current(); ++itgrid ) {
if (i < wid) {
itgrid.current()->setPoints(i,0,i,h);
@@ -229,8 +229,8 @@ void KDTimeTableWidget::computeVerticalGrid()
itcol.current()->setPoints(i+(cw/2),0,i+(cw/2),h);
*/
- itcol.current()->setPen( QPen::NoPen );
- itcol.current()->setBrush( QBrush( colcol, SolidPattern) );
+ itcol.current()->setPen( TQPen::NoPen );
+ itcol.current()->setBrush( TQBrush( colcol, SolidPattern) );
itcol.current()->setSize(cw ,h );
itcol.current()->move( i, 0 );
itcol.current()->show();
@@ -243,8 +243,8 @@ void KDTimeTableWidget::computeVerticalGrid()
templine->setPoints(i+(cw/2),0,i+(cw/2),h);
*/
temprect = new KDCanvasRectangle(this,0,Type_is_KDGanttGridItem);
- temprect->setPen( QPen::NoPen );
- temprect->setBrush( QBrush( colcol, SolidPattern) );
+ temprect->setPen( TQPen::NoPen );
+ temprect->setBrush( TQBrush( colcol, SolidPattern) );
temprect->setSize(cw ,h );
temprect->move( i, 0 );
temprect->setZ(-20);
@@ -275,16 +275,16 @@ void KDTimeTableWidget::computeVerticalGrid()
itcol.current()->setPen(colPen);
itcol.current()->setPoints(i+(cw/2),0,i+(cw/2),h);
*/
- itcol.current()->setPen( QPen::NoPen );
- itcol.current()->setBrush( QBrush( colcol, SolidPattern) );
+ itcol.current()->setPen( TQPen::NoPen );
+ itcol.current()->setBrush( TQBrush( colcol, SolidPattern) );
itcol.current()->setSize(cw ,h );
itcol.current()->move( i, 0 );
itcol.current()->show();
++itcol;
} else {
temprect = new KDCanvasRectangle(this,0,Type_is_KDGanttGridItem);
- temprect->setPen( QPen::NoPen );
- temprect->setBrush( QBrush( colcol, SolidPattern) );
+ temprect->setPen( TQPen::NoPen );
+ temprect->setBrush( TQBrush( colcol, SolidPattern) );
temprect->setSize(cw ,h );
temprect->move( i, 0 );
temprect->setZ(-20);
@@ -306,10 +306,10 @@ void KDTimeTableWidget::computeVerticalGrid()
itcol.current()->hide();
} else {//major
if (myGanttView->showMajorTicks()) {
- QValueList<int>::iterator intIt = myGanttView->myTimeHeader->majorTicks.begin();
- QValueList<int>::iterator intItEnd = myGanttView->myTimeHeader->majorTicks.end();
- QPtrListIterator<KDCanvasRectangle> itcol(columnColorList);
- QPtrListIterator<KDCanvasLine> itgrid(verGridList);
+ TQValueList<int>::iterator intIt = myGanttView->myTimeHeader->majorTicks.begin();
+ TQValueList<int>::iterator intItEnd = myGanttView->myTimeHeader->majorTicks.end();
+ TQPtrListIterator<KDCanvasRectangle> itcol(columnColorList);
+ TQPtrListIterator<KDCanvasLine> itgrid(verGridList);
int left = 0;
for ( ; itgrid.current(); ++itgrid ) {
if (intIt != intItEnd) {
@@ -331,16 +331,16 @@ void KDTimeTableWidget::computeVerticalGrid()
itcol.current()->setPen(colPen);
itcol.current()->setPoints(i+mid,0,mid,h);
*/
- itcol.current()->setPen( QPen::NoPen );
- itcol.current()->setBrush( QBrush( colcol, SolidPattern) );
+ itcol.current()->setPen( TQPen::NoPen );
+ itcol.current()->setBrush( TQBrush( colcol, SolidPattern) );
itcol.current()->setSize(mid ,h );
itcol.current()->move( left, 0 );
itcol.current()->show();
++itcol;
} else {
temprect = new KDCanvasRectangle(this,0,Type_is_KDGanttGridItem);
- temprect->setPen( QPen::NoPen );
- temprect->setBrush( QBrush( colcol, SolidPattern) );
+ temprect->setPen( TQPen::NoPen );
+ temprect->setBrush( TQBrush( colcol, SolidPattern) );
temprect->setSize(mid,h );
temprect->move( left, 0 );
temprect->setZ(-20);
@@ -385,16 +385,16 @@ void KDTimeTableWidget::computeVerticalGrid()
itcol.current()->setPen(colPen);
itcol.current()->setPoints(i+mid,0,mid,h);
*/
- itcol.current()->setPen( QPen::NoPen );
- itcol.current()->setBrush( QBrush( colcol, SolidPattern) );
+ itcol.current()->setPen( TQPen::NoPen );
+ itcol.current()->setBrush( TQBrush( colcol, SolidPattern) );
itcol.current()->setSize(mid ,h );
itcol.current()->move( left, 0 );
itcol.current()->show();
++itcol;
} else {
temprect = new KDCanvasRectangle(this,0,Type_is_KDGanttGridItem);
- temprect->setPen( QPen::NoPen );
- temprect->setBrush( QBrush( colcol, SolidPattern) );
+ temprect->setPen( TQPen::NoPen );
+ temprect->setBrush( TQBrush( colcol, SolidPattern) );
temprect->setSize(mid ,h );
temprect->move( left, 0 );
temprect->setZ(-20);
@@ -420,11 +420,11 @@ void KDTimeTableWidget::computeVerticalGrid()
}
else {
//hideall
- QPtrListIterator<KDCanvasLine> itgrid(verGridList);
+ TQPtrListIterator<KDCanvasLine> itgrid(verGridList);
for ( ; itgrid.current(); ++itgrid ) {
itgrid.current()->hide();
}
- QPtrListIterator<KDCanvasRectangle> itcol(columnColorList);
+ TQPtrListIterator<KDCanvasRectangle> itcol(columnColorList);
for ( ; itcol.current(); ++itcol ) {
itcol.current()->hide();
}
@@ -442,7 +442,7 @@ void KDTimeTableWidget::computeHorizontalGrid()
else
wid = width();
KDCanvasLine* templine;
- QPtrListIterator<KDCanvasLine> ithor(horGridList);
+ TQPtrListIterator<KDCanvasLine> ithor(horGridList);
if ( ithor.current() ) {
templine = ithor.current();
++ithor;
@@ -467,11 +467,11 @@ void KDTimeTableWidget::computeHorizontalGrid()
templine->setZ(0);
horGridList.append(templine);
}
- if ( templine->endPoint() != QPoint(wid,posY ))
+ if ( templine->endPoint() != TQPoint(wid,posY ))
templine->setPoints(0,posY,wid,posY );
if ( !templine->isVisible() )
templine->show();
- //QString ts = "asGroup";
+ //TQString ts = "asGroup";
//if (!temp->displaySubitemsAsGroup() )
// ts = " NOT asGroup";
//qDebug("temp name %s %s", temp->listViewText(0).latin1(), ts.latin1());
@@ -493,7 +493,7 @@ void KDTimeTableWidget::computeDenseLines()
wid = pendingWidth;
else
wid = width();
- QPtrListIterator<KDCanvasRectangle> ithordense(horDenseList);
+ TQPtrListIterator<KDCanvasRectangle> ithordense(horDenseList);
KDCanvasRectangle* denseLine;
int tempDenseLineCount = 0;
while ( temp ) {
@@ -509,12 +509,12 @@ void KDTimeTableWidget::computeDenseLines()
denseLine->setZ(-2);
horDenseList.append( denseLine );
}
- if ( denseLine->rect() != QRect(0, temp->itemPos(),wid, temp->height()) ) {
+ if ( denseLine->rect() != TQRect(0, temp->itemPos(),wid, temp->height()) ) {
denseLine->move( 0, temp->itemPos() );
denseLine->setSize( wid, temp->height());
}
if (denseLine->brush() != denseLineBrush ) {
- denseLine->setPen( QPen( Qt::NoPen ) );
+ denseLine->setPen( TQPen( Qt::NoPen ) );
denseLine->setBrush( denseLineBrush);
}
if (!denseLine->isVisible() )
@@ -541,7 +541,7 @@ void KDTimeTableWidget::computeShowNoInformation()
wid = pendingWidth;
else
wid = width();
- QPtrListIterator<KDCanvasRectangle> itnoinfo(showNoInfoList);
+ TQPtrListIterator<KDCanvasRectangle> itnoinfo(showNoInfoList);
KDCanvasRectangle* noInfoLine;
while ( temp ) {
if ( temp->showNoInformation() ) {
@@ -555,7 +555,7 @@ void KDTimeTableWidget::computeShowNoInformation()
}
noInfoLine->move( 0, temp->itemPos() );
noInfoLine->setSize( wid, temp->height());
- noInfoLine->setPen( QPen( Qt::NoPen ) );
+ noInfoLine->setPen( TQPen( Qt::NoPen ) );
noInfoLine->setBrush( noInfoLineBrush);
noInfoLine->show();
}
@@ -571,7 +571,7 @@ void KDTimeTableWidget::computeShowNoInformation()
void KDTimeTableWidget::computeTaskLinks()
{
//compute and show tasklinks
- QPtrListIterator<KDGanttViewTaskLink> it((myTaskLinkList));
+ TQPtrListIterator<KDGanttViewTaskLink> it((myTaskLinkList));
for ( ; it.current(); ++it ) {
if (it.current()->isVisible())
it.current()->showMe(true);
@@ -673,7 +673,7 @@ bool KDTimeTableWidget::showTaskLinks()
{
return taskLinksVisible;
}
-void KDTimeTableWidget::setHorBackgroundLines( int count, QBrush brush )
+void KDTimeTableWidget::setHorBackgroundLines( int count, TQBrush brush )
{
denseLineBrush = brush;
denseLineCount = 0;
@@ -682,32 +682,32 @@ void KDTimeTableWidget::setHorBackgroundLines( int count, QBrush brush )
}
-int KDTimeTableWidget::horBackgroundLines( QBrush& brush )
+int KDTimeTableWidget::horBackgroundLines( TQBrush& brush )
{
brush = denseLineBrush;
return denseLineCount;
}
-int KDTimeTableWidget::getCoordX( QDateTime dt ) {
+int KDTimeTableWidget::getCoordX( TQDateTime dt ) {
return myGanttView->myTimeHeader->getCoordX(dt);
}
/* ***************************************************************
KDTimeHeaderWidget:: KDTimeHeaderWidget
***************************************************************** */
-KDTimeHeaderWidget:: KDTimeHeaderWidget( QWidget* parent,KDGanttView* gant )
- : QWidget (parent)
+KDTimeHeaderWidget:: KDTimeHeaderWidget( TQWidget* parent,KDGanttView* gant )
+ : TQWidget (parent)
{
myToolTip = new KDTimeHeaderToolTip(this,this);
mySizeHint = 0;
myGanttView = gant;
flagDoNotRecomputeAfterChange = true;
- QDateTime start = (QDateTime::currentDateTime ()).addSecs(-3600);
+ TQDateTime start = (TQDateTime::currentDateTime ()).addSecs(-3600);
setHorizonStart(start);
setHorizonEnd( start.addSecs(3600*2));
flagStartTimeSet = false;
flagEndTimeSet = false;
- myCenterDateTime = QDateTime::currentDateTime ();
+ myCenterDateTime = TQDateTime::currentDateTime ();
setScale(KDGanttView::Auto);
//setScale(KDGanttView::Hour);
myMaxScale = KDGanttView::Month;
@@ -719,48 +719,48 @@ KDTimeHeaderWidget:: KDTimeHeaderWidget( QWidget* parent,KDGanttView* gant )
setYearFormat(KDGanttView::FourDigit );
setHourFormat( KDGanttView::Hour_12 );
myZoomFactor = 1.0;
- setWeekendBackgroundColor(QColor(220,220,220) );
+ setWeekendBackgroundColor(TQColor(220,220,220) );
setWeekendDays( 6, 7 );
myGridMinorWidth = 0;
- myPopupMenu = new QPopupMenu(this);
- QPopupMenu * zoomPopupMenu = new QPopupMenu(this);
+ myPopupMenu = new TQPopupMenu(this);
+ TQPopupMenu * zoomPopupMenu = new TQPopupMenu(this);
myPopupMenu->insertItem (i18n("Zoom"),zoomPopupMenu, 1);
- zoomPopupMenu->insertItem( i18n("Zoom to 100%"),this, SLOT(setSettings(int)),0 ,21,21 );
- zoomPopupMenu->insertItem( i18n("Zoom to Fit"),this, SLOT(setSettings(int)),0 ,20,20 );
- zoomPopupMenu->insertItem( i18n("Zoom In (x 2)"),this, SLOT(setSettings(int)),0 ,22,22 );
- zoomPopupMenu->insertItem( i18n("Zoom In (x 6)"),this, SLOT(setSettings(int)),0 ,24,24 );
- zoomPopupMenu->insertItem( i18n("Zoom In (x 12)"),this, SLOT(setSettings(int)),0 ,26,26 );
- zoomPopupMenu->insertItem( i18n("Zoom Out (x 1/2)"),this, SLOT(setSettings(int)),0 ,23,23 );
- zoomPopupMenu->insertItem( i18n("Zoom Out (x 1/6)"),this, SLOT(setSettings(int)),0 ,25,25 );
- zoomPopupMenu->insertItem( i18n("Zoom Out (x 1/12)"),this, SLOT(setSettings(int)),0 ,27,27 );
- scalePopupMenu = new QPopupMenu(this);
+ zoomPopupMenu->insertItem( i18n("Zoom to 100%"),this, TQT_SLOT(setSettings(int)),0 ,21,21 );
+ zoomPopupMenu->insertItem( i18n("Zoom to Fit"),this, TQT_SLOT(setSettings(int)),0 ,20,20 );
+ zoomPopupMenu->insertItem( i18n("Zoom In (x 2)"),this, TQT_SLOT(setSettings(int)),0 ,22,22 );
+ zoomPopupMenu->insertItem( i18n("Zoom In (x 6)"),this, TQT_SLOT(setSettings(int)),0 ,24,24 );
+ zoomPopupMenu->insertItem( i18n("Zoom In (x 12)"),this, TQT_SLOT(setSettings(int)),0 ,26,26 );
+ zoomPopupMenu->insertItem( i18n("Zoom Out (x 1/2)"),this, TQT_SLOT(setSettings(int)),0 ,23,23 );
+ zoomPopupMenu->insertItem( i18n("Zoom Out (x 1/6)"),this, TQT_SLOT(setSettings(int)),0 ,25,25 );
+ zoomPopupMenu->insertItem( i18n("Zoom Out (x 1/12)"),this, TQT_SLOT(setSettings(int)),0 ,27,27 );
+ scalePopupMenu = new TQPopupMenu(this);
myPopupMenu->insertItem (i18n("Scale"),scalePopupMenu, 2);
- scalePopupMenu->insertItem( i18n("Minute"),this, SLOT(setSettings(int)),0 ,1,1 );
- scalePopupMenu->insertItem( i18n("Hour"),this, SLOT(setSettings(int)),0 ,2,2 );
- scalePopupMenu->insertItem( i18n("Day"),this, SLOT(setSettings(int)),0 ,3,3 );
- scalePopupMenu->insertItem( i18n("Week"),this, SLOT(setSettings(int)),0 ,4,4 );
- scalePopupMenu->insertItem( i18n("Month"),this, SLOT(setSettings(int)),0 ,5,5 );
- scalePopupMenu->insertItem( i18n("Auto"),this, SLOT(setSettings(int)),0 ,6,6 );
+ scalePopupMenu->insertItem( i18n("Minute"),this, TQT_SLOT(setSettings(int)),0 ,1,1 );
+ scalePopupMenu->insertItem( i18n("Hour"),this, TQT_SLOT(setSettings(int)),0 ,2,2 );
+ scalePopupMenu->insertItem( i18n("Day"),this, TQT_SLOT(setSettings(int)),0 ,3,3 );
+ scalePopupMenu->insertItem( i18n("Week"),this, TQT_SLOT(setSettings(int)),0 ,4,4 );
+ scalePopupMenu->insertItem( i18n("Month"),this, TQT_SLOT(setSettings(int)),0 ,5,5 );
+ scalePopupMenu->insertItem( i18n("Auto"),this, TQT_SLOT(setSettings(int)),0 ,6,6 );
scalePopupMenu->setCheckable ( true );
- timePopupMenu = new QPopupMenu(this);
+ timePopupMenu = new TQPopupMenu(this);
myPopupMenu->insertItem (i18n("Time Format"),timePopupMenu, 3);
- timePopupMenu->insertItem( i18n("24 Hour"),this, SLOT(setSettings(int)),0 ,40,40 );
- timePopupMenu->insertItem( i18n("12 PM Hour"),this, SLOT(setSettings(int)),0 ,41,41 );
- timePopupMenu->insertItem( i18n("24:00 Hour"),this, SLOT(setSettings(int)),0 ,42,42 );
- yearPopupMenu = new QPopupMenu(this);
+ timePopupMenu->insertItem( i18n("24 Hour"),this, TQT_SLOT(setSettings(int)),0 ,40,40 );
+ timePopupMenu->insertItem( i18n("12 PM Hour"),this, TQT_SLOT(setSettings(int)),0 ,41,41 );
+ timePopupMenu->insertItem( i18n("24:00 Hour"),this, TQT_SLOT(setSettings(int)),0 ,42,42 );
+ yearPopupMenu = new TQPopupMenu(this);
myPopupMenu->insertItem (i18n("Year Format"),yearPopupMenu, 4);
- yearPopupMenu->insertItem( i18n("Four Digit"),this, SLOT(setSettings(int)),0 ,50,50 );
- yearPopupMenu->insertItem( i18n("Two Digit"),this, SLOT(setSettings(int)),0 ,51,51 );
- yearPopupMenu->insertItem( i18n("Two Digit Apostrophe"),this, SLOT(setSettings(int)),0 ,52,52 );
- yearPopupMenu->insertItem( i18n("No Date on Minute/Hour Scale"),this, SLOT(setSettings(int)),0 ,53,53 );
+ yearPopupMenu->insertItem( i18n("Four Digit"),this, TQT_SLOT(setSettings(int)),0 ,50,50 );
+ yearPopupMenu->insertItem( i18n("Two Digit"),this, TQT_SLOT(setSettings(int)),0 ,51,51 );
+ yearPopupMenu->insertItem( i18n("Two Digit Apostrophe"),this, TQT_SLOT(setSettings(int)),0 ,52,52 );
+ yearPopupMenu->insertItem( i18n("No Date on Minute/Hour Scale"),this, TQT_SLOT(setSettings(int)),0 ,53,53 );
- gridPopupMenu = new QPopupMenu(this);
+ gridPopupMenu = new TQPopupMenu(this);
myPopupMenu->insertItem (i18n("Grid"),gridPopupMenu,5);
- gridPopupMenu->insertItem( i18n("Show Minor Grid"),this, SLOT(setSettings(int)),0 ,10,10 );
- gridPopupMenu->insertItem( i18n("Show Major Grid"),this, SLOT(setSettings(int)),0 ,11,11 );
- gridPopupMenu->insertItem( i18n("Show No Grid"),this, SLOT(setSettings(int)),0 ,12,12 );
- myPopupMenu->insertItem( i18n("Print"),this, SLOT(setSettings(int)),0 ,30,30 );
- connect(myPopupMenu, SIGNAL ( aboutToShow () ) , this, SLOT( preparePopupMenu() )) ;
+ gridPopupMenu->insertItem( i18n("Show Minor Grid"),this, TQT_SLOT(setSettings(int)),0 ,10,10 );
+ gridPopupMenu->insertItem( i18n("Show Major Grid"),this, TQT_SLOT(setSettings(int)),0 ,11,11 );
+ gridPopupMenu->insertItem( i18n("Show No Grid"),this, TQT_SLOT(setSettings(int)),0 ,12,12 );
+ myPopupMenu->insertItem( i18n("Print"),this, TQT_SLOT(setSettings(int)),0 ,30,30 );
+ connect(myPopupMenu, TQT_SIGNAL ( aboutToShow () ) , this, TQT_SLOT( preparePopupMenu() )) ;
flagZoomToFit = false;
setShowMinorTicks( true );
myRealEnd = myHorizonEnd;
@@ -792,7 +792,7 @@ void KDTimeHeaderWidget::preparePopupMenu()
if (flagZoomToFit)
myPopupMenu->changeItem( 1, i18n("Zoom (Fit)"));
else
- myPopupMenu->changeItem( 1, i18n("Zoom (%1)").arg( QString::number( zoomFactor(), 'f',3) ) );
+ myPopupMenu->changeItem( 1, i18n("Zoom (%1)").arg( TQString::number( zoomFactor(), 'f',3) ) );
int i = 0;
int id;
while ( ( id = scalePopupMenu->idAt( i++ )) >= 0 ) {
@@ -822,7 +822,7 @@ void KDTimeHeaderWidget::preparePopupMenu()
}
-QString KDTimeHeaderWidget::getToolTipText(QPoint p)
+TQString KDTimeHeaderWidget::getToolTipText(TQPoint p)
{
return KGlobal::locale()->formatDateTime(getDateTimeForIndex(p.x()));
}
@@ -860,7 +860,7 @@ void KDTimeHeaderWidget::checkWidth( int wid )
// Update (horizontal) scrollbar,
// We probably come from an external resize and then we must
// calculate on basis of myCanvasView.
- // (NOTE: we have disconnected the auto QScrollView scrollbar update)
+ // (NOTE: we have disconnected the auto TQScrollView scrollbar update)
if (myGanttView && myGanttView->myCanvasView)
myGanttView->myCanvasView->updateScrollBars();
}
@@ -868,9 +868,9 @@ void KDTimeHeaderWidget::checkWidth( int wid )
bool KDTimeHeaderWidget::registerStartTime()
{
- QListViewItemIterator it( myGanttView->myListView );
+ TQListViewItemIterator it( myGanttView->myListView );
if (!flagStartTimeSet) {
- QDateTime temp , time;
+ TQDateTime temp , time;
KDGanttViewItem* item;
bool setNewTime = false;
item = (KDGanttViewItem*)myGanttView->myListView->firstChild();
@@ -916,14 +916,14 @@ bool KDTimeHeaderWidget::registerStartTime()
bool KDTimeHeaderWidget::registerEndTime()
{
if (!flagEndTimeSet) {
- QDateTime temp , time;
+ TQDateTime temp , time;
KDGanttViewItem* item;
bool setNewTime = false;
item = (KDGanttViewItem*)myGanttView->myListView->firstChild();
if ( item ) {
temp = item->startTime();
time = temp;
- QListViewItemIterator it( myGanttView->myListView );
+ TQListViewItemIterator it( myGanttView->myListView );
for ( ; it.current(); ++it ) {
item = ( KDGanttViewItem* )it.current();
if (item->isVisibleInGanttView) {
@@ -1094,9 +1094,9 @@ double KDTimeHeaderWidget::zoomFactor()
{
return myZoomFactor;
}
-double KDTimeHeaderWidget::secsFromTo( QDateTime begin, QDateTime end )
+double KDTimeHeaderWidget::secsFromTo( TQDateTime begin, TQDateTime end )
{
- QDateTime temp;
+ TQDateTime temp;
double secs, days;
days = begin.daysTo(end);
temp = begin.addDays((int) days);
@@ -1106,7 +1106,7 @@ double KDTimeHeaderWidget::secsFromTo( QDateTime begin, QDateTime end )
}
-void KDTimeHeaderWidget::zoomToSelection( QDateTime start, QDateTime end)
+void KDTimeHeaderWidget::zoomToSelection( TQDateTime start, TQDateTime end)
{
if (start < myHorizonStart) {
myHorizonStart = start;
@@ -1189,7 +1189,7 @@ void KDTimeHeaderWidget::zoom(double factor, bool absolute)
\param start the start of the horizon
\sa horizonStart()
*/
-void KDTimeHeaderWidget::setHorizonStart( const QDateTime& start )
+void KDTimeHeaderWidget::setHorizonStart( const TQDateTime& start )
{
myHorizonStart = start;
flagStartTimeSet = true;
@@ -1203,7 +1203,7 @@ void KDTimeHeaderWidget::setHorizonStart( const QDateTime& start )
\return the start of the horizon of the Gantt chart
\sa setHorizonStart()
*/
-QDateTime KDTimeHeaderWidget::horizonStart() const
+TQDateTime KDTimeHeaderWidget::horizonStart() const
{
return myHorizonStart;
}
@@ -1216,7 +1216,7 @@ QDateTime KDTimeHeaderWidget::horizonStart() const
\param end the end of the horizon
\sa setHorizonEnd()
*/
-void KDTimeHeaderWidget::setHorizonEnd( const QDateTime& start )
+void KDTimeHeaderWidget::setHorizonEnd( const TQDateTime& start )
{
myHorizonEnd = start;
flagEndTimeSet = true;
@@ -1231,7 +1231,7 @@ void KDTimeHeaderWidget::setHorizonEnd( const QDateTime& start )
\return the end of the horizon of the Gantt chart
\sa setHorizonEnd()
*/
-QDateTime KDTimeHeaderWidget::horizonEnd() const
+TQDateTime KDTimeHeaderWidget::horizonEnd() const
{
return myHorizonEnd;
}
@@ -1461,8 +1461,8 @@ bool KDTimeHeaderWidget::showMinorTicks() const
\sa columnBackgroundColor(), setWeekendBackgroundColor(),
weekendBackgroundColor()
*/
-void KDTimeHeaderWidget::setColumnBackgroundColor( const QDateTime& column,
- const QColor& color,
+void KDTimeHeaderWidget::setColumnBackgroundColor( const TQDateTime& column,
+ const TQColor& color,
Scale mini, Scale maxi )
{
ColumnColorList::iterator it;
@@ -1498,10 +1498,10 @@ void KDTimeHeaderWidget::addIntervalBackgroundColor( KDIntervalColorRectangle* n
}
#if 0
-bool KDTimeHeaderWidget::changeBackgroundInterval( const QDateTime& oldstart,
- const QDateTime& oldend,
- const QDateTime& newstart,
- const QDateTime& newend )
+bool KDTimeHeaderWidget::changeBackgroundInterval( const TQDateTime& oldstart,
+ const TQDateTime& oldend,
+ const TQDateTime& newstart,
+ const TQDateTime& newend )
{
IntervalColorList::iterator it;
for ( it = icList.begin(); it != icList.end(); ++it ) {
@@ -1519,8 +1519,8 @@ bool KDTimeHeaderWidget::changeBackgroundInterval( const QDateTime& oldstart,
}
return false;
}
-bool KDTimeHeaderWidget::deleteBackgroundInterval( const QDateTime& start,
- const QDateTime& end)
+bool KDTimeHeaderWidget::deleteBackgroundInterval( const TQDateTime& start,
+ const TQDateTime& end)
{
IntervalColorList::iterator it;
for ( it = icList.begin(); it != icList.end(); ++it ) {
@@ -1535,9 +1535,9 @@ bool KDTimeHeaderWidget::deleteBackgroundInterval( const QDateTime& start,
return false;
}
-void KDTimeHeaderWidget::setIntervalBackgroundColor( const QDateTime& start,
- const QDateTime& end,
- const QColor& color,
+void KDTimeHeaderWidget::setIntervalBackgroundColor( const TQDateTime& start,
+ const TQDateTime& end,
+ const TQColor& color,
Scale mini ,
Scale maxi )
{
@@ -1581,11 +1581,11 @@ void KDTimeHeaderWidget::clearBackgroundColor()
icList.clear();
updateTimeTable();
}
-QDateTime KDTimeHeaderWidget::getDateTimeForIndex(int X, bool local )
+TQDateTime KDTimeHeaderWidget::getDateTimeForIndex(int X, bool local )
{
int coordX = X;
if ( !local ) {
- QPoint p = QPoint ( X, 1 );
+ TQPoint p = TQPoint ( X, 1 );
coordX = myGanttView->myTimeHeaderScroll->viewportToContents(myGanttView->myTimeHeaderScroll->mapFromGlobal( p )).x();
}
@@ -1602,11 +1602,11 @@ QDateTime KDTimeHeaderWidget::getDateTimeForIndex(int X, bool local )
// *none* get weekend color (haven't figured out why)
// Proposal: Only use weekend color if the whole column is a weekend.
// Alt: Color the area that actually is the weekend.
-bool KDTimeHeaderWidget::getColumnColor(QColor& col,int coordLow, int coordHigh)
+bool KDTimeHeaderWidget::getColumnColor(TQColor& col,int coordLow, int coordHigh)
{
if (!flagShowMajorTicks && !flagShowMinorTicks)
return false;
- QDateTime start,end;
+ TQDateTime start,end;
start = getDateTimeForIndex(coordLow);
end = getDateTimeForIndex(coordHigh).addSecs(-1);
Scale tempScale = myRealScale;
@@ -1663,9 +1663,9 @@ bool KDTimeHeaderWidget::getColumnColor(QColor& col,int coordLow, int coordHigh)
\sa setColumnBackgroundColor(), setWeekendBackgroundColor(),
weekendBackgroundColor()
*/
-QColor KDTimeHeaderWidget::columnBackgroundColor( const QDateTime& column ) const
+TQColor KDTimeHeaderWidget::columnBackgroundColor( const TQDateTime& column ) const
{
- QColor c;
+ TQColor c;
c = white;
ColumnColorList::const_iterator ite;
for ( ite = ccList.begin(); ite != ccList.end(); ++ite ) {
@@ -1685,7 +1685,7 @@ QColor KDTimeHeaderWidget::columnBackgroundColor( const QDateTime& column ) cons
\param color the background color to use for weekend days.
\sa weekendBackgroundColor(), setWeekendDays(), weekendDays()
*/
-void KDTimeHeaderWidget::setWeekendBackgroundColor( const QColor& color )
+void KDTimeHeaderWidget::setWeekendBackgroundColor( const TQColor& color )
{
myWeekendBackgroundColor = color ;
updateTimeTable();
@@ -1698,7 +1698,7 @@ void KDTimeHeaderWidget::setWeekendBackgroundColor( const QColor& color )
\return the background color for weekend days
\sa setWeekendBackgroundColor(), setWeekendDays(), weekendDays()
*/
-QColor KDTimeHeaderWidget::weekendBackgroundColor() const
+TQColor KDTimeHeaderWidget::weekendBackgroundColor() const
{
return myWeekendBackgroundColor;
}
@@ -1713,7 +1713,7 @@ QColor KDTimeHeaderWidget::weekendBackgroundColor() const
\param weekday the day of the week (Monday = 1, Sunday = 7)
\sa weekendBackgroundColor(), setWeekendDays(), weekendDays()
*/
-void KDTimeHeaderWidget::setWeekdayBackgroundColor( const QColor& color, int weekday )
+void KDTimeHeaderWidget::setWeekdayBackgroundColor( const TQColor& color, int weekday )
{
weekdayColor[weekday] = color;
updateTimeTable();
@@ -1727,7 +1727,7 @@ void KDTimeHeaderWidget::setWeekdayBackgroundColor( const QColor& color, int we
\return the background color for weekend days
\sa setWeekendBackgroundColor(), setWeekendDays(), weekendDays()
*/
-QColor KDTimeHeaderWidget::weekdayBackgroundColor(int weekday) const
+TQColor KDTimeHeaderWidget::weekdayBackgroundColor(int weekday) const
{
return weekdayColor[weekday];
}
@@ -1817,7 +1817,7 @@ int KDTimeHeaderWidget::minorScaleCount() const
}
-void KDTimeHeaderWidget::resizeEvent ( QResizeEvent * )
+void KDTimeHeaderWidget::resizeEvent ( TQResizeEvent * )
{
// qDebug("KDTimeHeaderWidget:: resizeEvent ");
paintPix.resize( 800, height () );
@@ -1831,7 +1831,7 @@ void KDTimeHeaderWidget::updateTimeTable()
// setting the scrolling steps
int scrollLineStep = myGridMinorWidth;
if (showMajorTicks()) {
- QValueList<int>::iterator intIt = majorTicks.begin();
+ TQValueList<int>::iterator intIt = majorTicks.begin();
scrollLineStep = 5 * myGridMinorWidth;
if (intIt != majorTicks.end()) {
int left = *intIt;
@@ -1861,22 +1861,22 @@ int KDTimeHeaderWidget::autoScaleMinorTickCount()
}
-void KDTimeHeaderWidget::repaintMe(int left,int paintwid, QPainter* painter)
+void KDTimeHeaderWidget::repaintMe(int left,int paintwid, TQPainter* painter)
{
if (flagDoNotRecomputeAfterChange) return;
- QColorGroup qcg =QColorGroup( white, black,white, darkGray,black,gray,gray) ;
- QPainter* p;
+ TQColorGroup qcg =TQColorGroup( white, black,white, darkGray,black,gray,gray) ;
+ TQPainter* p;
int offsetLeft = 0;
if ( paintwid > paintPix.width()-100 )
paintPix.resize( paintwid+100, height () );
if ( painter )
p = painter;
else {
- p = new QPainter( &paintPix );
+ p = new TQPainter( &paintPix );
offsetLeft = left-50;
}
if ( mouseDown ) {
- p->fillRect( left-offsetLeft, 0, paintwid, height(), QBrush(paletteBackgroundColor()) );
+ p->fillRect( left-offsetLeft, 0, paintwid, height(), TQBrush(paletteBackgroundColor()) );
int start ;
int wid;
if ( beginMouseDown < endMouseDown ) {
@@ -1886,13 +1886,13 @@ void KDTimeHeaderWidget::repaintMe(int left,int paintwid, QPainter* painter)
start = endMouseDown ;
wid = -endMouseDown + beginMouseDown ;
}
- p->fillRect( start-offsetLeft, 0, wid, height(), QBrush(paletteBackgroundColor().dark()) );
+ p->fillRect( start-offsetLeft, 0, wid, height(), TQBrush(paletteBackgroundColor().dark()) );
} else {
if (! painter )
- p->fillRect( left-offsetLeft, 0, paintwid, height(), QBrush(paletteBackgroundColor()) );
+ p->fillRect( left-offsetLeft, 0, paintwid, height(), TQBrush(paletteBackgroundColor()) );
}
- p->setPen(QColor(40,40,40));
- QFont tempFont = p->font();
+ p->setPen(TQColor(40,40,40));
+ TQFont tempFont = p->font();
tempFont.setWeight(63);
p->setFont(tempFont);
int hei1 = myMajorGridHeight,
@@ -1901,8 +1901,8 @@ void KDTimeHeaderWidget::repaintMe(int left,int paintwid, QPainter* painter)
int xCoord;
int lwid = 1;
- QValueList<QString>::iterator it;
- QValueList<int>::iterator intIt = majorTicks.begin();
+ TQValueList<TQString>::iterator it;
+ TQValueList<int>::iterator intIt = majorTicks.begin();
for ( it = majorText.begin(); it != majorText.end(); ++it ) {
xCoord = (*intIt++);
if (((*intIt)>= left && xCoord <= left+paintwid)) {
@@ -1933,9 +1933,9 @@ void KDTimeHeaderWidget::repaintMe(int left,int paintwid, QPainter* painter)
// cuts the secs in the DateTime if scale is Minute ,
// the minutes and secs if scale is Hour and so on
-QDateTime KDTimeHeaderWidget::getEvenTimeDate(QDateTime tempdatetime ,Scale sc)
+TQDateTime KDTimeHeaderWidget::getEvenTimeDate(TQDateTime tempdatetime ,Scale sc)
{
- QDate tempdate;
+ TQDate tempdate;
int min, hour;
int tempMinorScaleCount = myRealMinorScaleCount;
switch (sc)
@@ -1946,24 +1946,24 @@ QDateTime KDTimeHeaderWidget::getEvenTimeDate(QDateTime tempdatetime ,Scale sc)
tempdate = tempdate.addDays(-1);
//while (tempdate.month ()!= 1 )
//tempdate = tempdate.addMonths(-1);
- tempdatetime = QDateTime (tempdate, QTime (0,0));
+ tempdatetime = TQDateTime (tempdate, TQTime (0,0));
break;
case KDGanttView::Week:
tempdate = tempdatetime.date();
while (tempdate.dayOfWeek ()!= KGlobal::locale()->weekStartDay())
tempdate = tempdate.addDays(-1);
//tempdate = tempdate.addDays(-7);
- tempdatetime = QDateTime (tempdate, QTime (0,0));
+ tempdatetime = TQDateTime (tempdate, TQTime (0,0));
break;
case KDGanttView::Day:
- tempdatetime = QDateTime (tempdatetime.date(), QTime ( 0,0 ) );
+ tempdatetime = TQDateTime (tempdatetime.date(), TQTime ( 0,0 ) );
break;
case KDGanttView::Hour:
hour = tempdatetime.time().hour();
while (24%tempMinorScaleCount > 0 && 24%tempMinorScaleCount < 24)
++tempMinorScaleCount;
hour = ( hour /tempMinorScaleCount)*tempMinorScaleCount;
- tempdatetime = QDateTime (tempdatetime.date(), QTime (hour, 0 ));
+ tempdatetime = TQDateTime (tempdatetime.date(), TQTime (hour, 0 ));
break;
case KDGanttView::Minute:
min = tempdatetime.time().minute();
@@ -1971,7 +1971,7 @@ QDateTime KDTimeHeaderWidget::getEvenTimeDate(QDateTime tempdatetime ,Scale sc)
++tempMinorScaleCount;
// qDebug("myMinorScaleCount %d %d %d",myMinorScaleCount, myRealMinorScaleCount, tempMinorScaleCount);
min = (min /tempMinorScaleCount)*tempMinorScaleCount;
- tempdatetime = QDateTime (tempdatetime.date(), QTime (tempdatetime.time().hour(),min ));
+ tempdatetime = TQDateTime (tempdatetime.date(), TQTime (tempdatetime.time().hour(),min ));
break;
case KDGanttView::Auto:
@@ -1981,7 +1981,7 @@ QDateTime KDTimeHeaderWidget::getEvenTimeDate(QDateTime tempdatetime ,Scale sc)
}
-void KDTimeHeaderWidget::computeRealScale(QDateTime start)
+void KDTimeHeaderWidget::computeRealScale(TQDateTime start)
{
if (myScale ==KDGanttView::Auto) {
@@ -2083,11 +2083,11 @@ void KDTimeHeaderWidget::computeTicks(bool doNotComputeRealScale)
int minorItems,minorPerMajor = 1;
minorItems = (int) (secsFromTo( myRealStart, myHorizonEnd)/60.0);
//qDebug("tempMinorScaleCount %d ", tempMinorScaleCount);
- QPainter p(this);
+ TQPainter p(this);
int Width, Height;
- QString testTextMinor,testTextMajor, tempStr;
- QRect itemRectMinor, itemRectMajor;
- QDate tempDate = myRealStart.date();
+ TQString testTextMinor,testTextMajor, tempStr;
+ TQRect itemRectMinor, itemRectMajor;
+ TQDate tempDate = myRealStart.date();
myRealEnd = myRealStart;
// preparing the testtext for the differennt scales
switch (myRealScale)
@@ -2109,25 +2109,25 @@ void KDTimeHeaderWidget::computeTicks(bool doNotComputeRealScale)
testTextMinor = "12 AM";
testTextMajor = "Mon Aug 30, x";
if ( yearFormat() != KDGanttView::NoDate )
- testTextMajor += getYear(QDate::currentDate());
+ testTextMajor += getYear(TQDate::currentDate());
minorPerMajor = 2400;
break;
case KDGanttView::Day:
minorItems = minorItems/(60*24);
testTextMinor = "88";
- testTextMajor = "Aug 30, x"+getYear(QDate::currentDate());
+ testTextMajor = "Aug 30, x"+getYear(TQDate::currentDate());
minorPerMajor = 700;
break;
case KDGanttView::Week:
minorItems = minorItems/(60*24*7);
testTextMinor = "88";
- testTextMajor = "Aug x"+getYear(QDate::currentDate());
+ testTextMajor = "Aug x"+getYear(TQDate::currentDate());
minorPerMajor = 435; // 435 = 365days/12months/7days * 100
break;
case KDGanttView::Month:
minorItems = (minorItems*12)/(60*24*365);
testTextMinor = "M";
- testTextMajor = "x"+getYear(QDate::currentDate());
+ testTextMajor = "x"+getYear(TQDate::currentDate());
minorPerMajor = 1200;
break;
case KDGanttView::Auto:
@@ -2214,8 +2214,8 @@ void KDTimeHeaderWidget::computeTicks(bool doNotComputeRealScale)
emit sizeChanged( Width );
}
myMajorGridHeight = itemRectMajor.height()+5;
- QTime tempTime = myRealStart.time();
- QDateTime tempDateTime;
+ TQTime tempTime = myRealStart.time();
+ TQDateTime tempDateTime;
int i;
const KCalendarSystem * calendar = KGlobal::locale()->calendar();
switch (myRealScale)
@@ -2280,7 +2280,7 @@ void KDTimeHeaderWidget::computeTicks(bool doNotComputeRealScale)
if (tempMinorScaleCount == 1)
minorText.append((calendar->weekDayName(tempDate, true)).left(1)); //TODO: BIDI
else
- minorText.append(QString::number(tempDate.day()));
+ minorText.append(TQString::number(tempDate.day()));
tempDate = tempDate.addDays(tempMinorScaleCount);
}
tempDate = myRealStart.date();
@@ -2361,7 +2361,7 @@ void KDTimeHeaderWidget::saveCenterDateTime()
}
-void KDTimeHeaderWidget::centerDateTime( const QDateTime& center )
+void KDTimeHeaderWidget::centerDateTime( const TQDateTime& center )
{
moveTimeLineTo(getCoordX( center )-(myGanttView->myCanvasView->viewport()->width() /2));
// qDebug("centerDateTime %s %d %d", center.toString().latin1(),getCoordX( center ),(myGanttView->myCanvasView->viewport()->width() /2) );
@@ -2369,23 +2369,23 @@ void KDTimeHeaderWidget::centerDateTime( const QDateTime& center )
}
-void KDTimeHeaderWidget::paintEvent(QPaintEvent *p)
+void KDTimeHeaderWidget::paintEvent(TQPaintEvent *p)
{
repaintMe(p->rect().x(),p->rect().width());
}
-int KDTimeHeaderWidget::getCoordX(QDate date)
+int KDTimeHeaderWidget::getCoordX(TQDate date)
{
int wid = width();
int daysAll = myRealStart.daysTo(myRealEnd);
if (daysAll == 0) return 0;
- int days = myRealStart.daysTo(QDateTime(date));
+ int days = myRealStart.daysTo(TQDateTime(date));
return (wid *days) /daysAll;
}
-int KDTimeHeaderWidget::getCoordX(QDateTime datetime)
+int KDTimeHeaderWidget::getCoordX(TQDateTime datetime)
{
double wid = width();
double secsAll = secsFromTo( myRealStart, myRealEnd );
@@ -2395,9 +2395,9 @@ int KDTimeHeaderWidget::getCoordX(QDateTime datetime)
}
-QString KDTimeHeaderWidget::getYear(QDate date)
+TQString KDTimeHeaderWidget::getYear(TQDate date)
{
- QString ret;
+ TQString ret;
ret.setNum(date.year());
switch (yearFormat()) {
case KDGanttView::FourDigit:
@@ -2417,9 +2417,9 @@ QString KDTimeHeaderWidget::getYear(QDate date)
}
-QString KDTimeHeaderWidget::getHour(QTime time)
+TQString KDTimeHeaderWidget::getHour(TQTime time)
{
- QString ret;
+ TQString ret;
int hour = time.hour();
if (myHourFormat == KDGanttView::Hour_12) {
if (hour >= 12) {
@@ -2443,7 +2443,7 @@ QString KDTimeHeaderWidget::getHour(QTime time)
}
-void KDTimeHeaderWidget::mousePressEvent ( QMouseEvent * e )
+void KDTimeHeaderWidget::mousePressEvent ( TQMouseEvent * e )
{
mouseDown = false;
switch ( e->button() ) {
@@ -2465,7 +2465,7 @@ void KDTimeHeaderWidget::mousePressEvent ( QMouseEvent * e )
}
-void KDTimeHeaderWidget::mouseReleaseEvent ( QMouseEvent * )
+void KDTimeHeaderWidget::mouseReleaseEvent ( TQMouseEvent * )
{
if ( mouseDown ) {
mouseDown = false;
@@ -2493,13 +2493,13 @@ void KDTimeHeaderWidget::mouseReleaseEvent ( QMouseEvent * )
}
-void KDTimeHeaderWidget::mouseDoubleClickEvent ( QMouseEvent * )
+void KDTimeHeaderWidget::mouseDoubleClickEvent ( TQMouseEvent * )
{
}
-void KDTimeHeaderWidget::mouseMoveEvent ( QMouseEvent * e )
+void KDTimeHeaderWidget::mouseMoveEvent ( TQMouseEvent * e )
{
if ( mouseDown ) {
if ( e->pos().y() < -height() || e->pos().y() > 2* height() ) {
@@ -2537,17 +2537,17 @@ void KDTimeHeaderWidget::mouseMoveEvent ( QMouseEvent * e )
/* ***************************************************************
KDLegendWidget:: KDLegendWidget
***************************************************************** */
-KDLegendWidget:: KDLegendWidget( QWidget* parent,
+KDLegendWidget:: KDLegendWidget( TQWidget* parent,
KDGanttMinimizeSplitter* legendParent ) :
KDGanttSemiSizingControl ( KDGanttSemiSizingControl::Before, Vertical,
parent)
{
myLegendParent = legendParent;
dock = 0;
- scroll = new QScrollView( legendParent );
+ scroll = new TQScrollView( legendParent );
setMaximizedWidget( scroll );
- setMinimizedWidget( myLabel = new QLabel( i18n( " Legend is hidden" ), this) );
+ setMinimizedWidget( myLabel = new TQLabel( i18n( " Legend is hidden" ), this) );
setGeometry( 0, 0, 50, 50 );
myLegend = 0;
clearLegend();
@@ -2562,7 +2562,7 @@ void KDLegendWidget::setAsDockwindow( bool dockwin )
setMaximizedWidget( 0 );
showMe ( false );
if ( dock ) delete dock;
- dock = new QDockWindow(QDockWindow:: OutsideDock,0 );
+ dock = new TQDockWindow(TQDockWindow:: OutsideDock,0 );
dock->resize( 200, 100 );
dock->setHorizontallyStretchable( true );
dock->setVerticallyStretchable( true );
@@ -2571,7 +2571,7 @@ void KDLegendWidget::setAsDockwindow( bool dockwin )
delete myLegend;
myLegend = 0;
delete scroll;
- scroll = new QScrollView( dock );
+ scroll = new TQScrollView( dock );
clearLegend();
dock->setWidget(scroll);
setMaximizedWidget( dock );
@@ -2585,7 +2585,7 @@ void KDLegendWidget::setAsDockwindow( bool dockwin )
delete scroll;
delete dock;
dock = 0;
- scroll = new QScrollView( myLegendParent );
+ scroll = new TQScrollView( myLegendParent );
clearLegend();
setMaximizedWidget( scroll );
showMe ( false );
@@ -2602,36 +2602,36 @@ bool KDLegendWidget::asDockwindow( )
}
-QDockWindow* KDLegendWidget::dockwindow( )
+TQDockWindow* KDLegendWidget::dockwindow( )
{
return dock;
}
-void KDLegendWidget::setFont( QFont font)
+void KDLegendWidget::setFont( TQFont font)
{
myLegend->setFont( font);
myLabel->setFont( font);
- QWidget::setFont( font );
+ TQWidget::setFont( font );
}
-void KDLegendWidget::drawToPainter( QPainter *p )
+void KDLegendWidget::drawToPainter( TQPainter *p )
{
- p->drawPixmap( 0, 0, QPixmap::grabWidget( myLegend ) );
+ p->drawPixmap( 0, 0, TQPixmap::grabWidget( myLegend ) );
}
-QSize KDLegendWidget::legendSize()
+TQSize KDLegendWidget::legendSize()
{
return myLegend->size();
}
-QSize KDLegendWidget::legendSizeHint()
+TQSize KDLegendWidget::legendSizeHint()
{
- QApplication::sendPostedEvents( 0, QEvent::LayoutHint );
- return QSize( myLegend->sizeHint().width(), myLegend->sizeHint().height()+scroll->horizontalScrollBar()->height());
+ TQApplication::sendPostedEvents( 0, TQEvent::LayoutHint );
+ return TQSize( myLegend->sizeHint().width(), myLegend->sizeHint().height()+scroll->horizontalScrollBar()->height());
}
@@ -2645,15 +2645,15 @@ void KDLegendWidget::clearLegend ( )
{
if ( myLegend ) delete myLegend;
if ( dock )
- myLegend = new QGroupBox( 1, Qt::Horizontal, scroll->viewport() );
+ myLegend = new TQGroupBox( 1, Qt::Horizontal, scroll->viewport() );
else
- myLegend = new QGroupBox( 1, Qt::Horizontal, i18n( "Legend" ), scroll->viewport() );
+ myLegend = new TQGroupBox( 1, Qt::Horizontal, i18n( "Legend" ), scroll->viewport() );
myLegend->setBackgroundColor( Qt::white );
myLegend->setFont( font() );
scroll->addChild( myLegend );
- scroll->setResizePolicy( QScrollView::AutoOneFit );
+ scroll->setResizePolicy( TQScrollView::AutoOneFit );
myLegend->layout()->setMargin( 11 );
- myLegend->setFrameStyle( QFrame::NoFrame );
+ myLegend->setFrameStyle( TQFrame::NoFrame );
if ( dock )
scroll->setMaximumHeight( 32000 );
else
@@ -2661,17 +2661,17 @@ void KDLegendWidget::clearLegend ( )
}
-void KDLegendWidget::addLegendItem( KDGanttViewItem::Shape shape, const QColor& shapeColor, const QString& text )
+void KDLegendWidget::addLegendItem( KDGanttViewItem::Shape shape, const TQColor& shapeColor, const TQString& text )
{
- QLabel * temp;
- QPixmap p = KDGanttView::getPixmap( shape, shapeColor, Qt::white, 10);
- QWidget *w = new QWidget( myLegend );
+ TQLabel * temp;
+ TQPixmap p = KDGanttView::getPixmap( shape, shapeColor, Qt::white, 10);
+ TQWidget *w = new TQWidget( myLegend );
w->setBackgroundColor( Qt::white );
- QHBoxLayout *lay = new QHBoxLayout( w ,0, 6);
- temp = new QLabel ( w );
+ TQHBoxLayout *lay = new TQHBoxLayout( w ,0, 6);
+ temp = new TQLabel ( w );
lay->addWidget( temp, 0, Qt:: AlignRight);
temp->setPixmap(p);
- temp = new QLabel ( text, w );
+ temp = new TQLabel ( text, w );
temp->setBackgroundColor( Qt::white );
lay->addWidget( temp, 0, Qt:: AlignLeft);
lay->addStretch();
@@ -2688,7 +2688,7 @@ bool KDLegendWidget::isShown ( )
}
-KDListView::KDListView(QWidget* parent, KDGanttView* gantView):QListView (parent)
+KDListView::KDListView(TQWidget* parent, KDGanttView* gantView):TQListView (parent)
{
myGanttView = gantView;
setAcceptDrops(true);
@@ -2697,21 +2697,21 @@ KDListView::KDListView(QWidget* parent, KDGanttView* gantView):QListView (parent
setAllColumnsShowFocus( true );
addColumn( i18n( "Task Name" ) );
setSorting( -1 );
- //setVScrollBarMode (QScrollView::AlwaysOn );
- setHScrollBarMode (QScrollView::AlwaysOn );
- setDefaultRenameAction(QListView::Accept);
+ //setVScrollBarMode (TQScrollView::AlwaysOn );
+ setHScrollBarMode (TQScrollView::AlwaysOn );
+ setDefaultRenameAction(TQListView::Accept);
setColumnWidthMode ( 0,Maximum );
_calendarMode = false;
- // QObject::connect(this, SIGNAL ( pressed ( QListViewItem * )) , this, SLOT( dragItem( QListViewItem *))) ;
+ // TQObject::connect(this, TQT_SIGNAL ( pressed ( TQListViewItem * )) , this, TQT_SLOT( dragItem( TQListViewItem *))) ;
}
-void KDListView::dragItem( QListViewItem * )
+void KDListView::dragItem( TQListViewItem * )
{
// qDebug("drag ");
// startDrag();
}
-QString KDListView::getWhatsThisText(QPoint p)
+TQString KDListView::getWhatsThisText(TQPoint p)
{
KDGanttViewItem* item = ( KDGanttViewItem* ) itemAt( p );
if ( item )
@@ -2725,18 +2725,18 @@ void KDListView::setCalendarMode( bool mode )
// setRootIsDecorated ( ! mode );
}
-void KDListView::setOpen(QListViewItem * item, bool open )
+void KDListView::setOpen(TQListViewItem * item, bool open )
{
if (! _calendarMode || ! open ) {
(( KDGanttViewItem*)item)->setCallListViewOnSetOpen( false );
- QListView::setOpen ( item, open );
+ TQListView::setOpen ( item, open );
(( KDGanttViewItem*)item)->setCallListViewOnSetOpen( true );
return;
}
// we are in calendarmode
// in calendarmode only items can be opened which have subitems which have subitems
- QListViewItem* temp;
+ TQListViewItem* temp;
temp = item->firstChild();
bool openItem = false;
while (temp) {
@@ -2752,17 +2752,17 @@ void KDListView::setOpen(QListViewItem * item, bool open )
}
if ( openItem ) {
(( KDGanttViewItem*)item)->setCallListViewOnSetOpen( false );
- QListView::setOpen ( item, open );
+ TQListView::setOpen ( item, open );
(( KDGanttViewItem*)item)->setCallListViewOnSetOpen( true );
}
}
-void KDListView::contentsMouseDoubleClickEvent ( QMouseEvent * e )
+void KDListView::contentsMouseDoubleClickEvent ( TQMouseEvent * e )
{
- QListView::contentsMouseDoubleClickEvent ( e );
+ TQListView::contentsMouseDoubleClickEvent ( e );
//if ( ! _calendarMode )
- // QListView::contentsMouseDoubleClickEvent ( e );
+ // TQListView::contentsMouseDoubleClickEvent ( e );
// else
{
@@ -2773,7 +2773,7 @@ void KDListView::contentsMouseDoubleClickEvent ( QMouseEvent * e )
}
-void KDListView::drawToPainter ( QPainter * p, bool drawHeader )
+void KDListView::drawToPainter ( TQPainter * p, bool drawHeader )
{
// Draw list
drawAllContents ( p, 0, 0, contentsWidth(), contentsHeight() );
@@ -2781,11 +2781,11 @@ void KDListView::drawToPainter ( QPainter * p, bool drawHeader )
return;
}
// Draw headers
- QPen pen = QPen(Qt::lightGray, 1);
+ TQPen pen = TQPen(Qt::lightGray, 1);
p->save();
- QHeader *h = header();
+ TQHeader *h = header();
for (int s = 0; s < h->count(); ++s) {
- QRect r = h->sectionRect(s);
+ TQRect r = h->sectionRect(s);
if (s==0) {
p->translate(0, -r.height());
}
@@ -2800,7 +2800,7 @@ void KDListView::drawToPainter ( QPainter * p, bool drawHeader )
p->restore();
}
-int KDListView::buildDrawables(QPtrList<KDListView::DrawableItem> &lst, int level, int ypos, QListViewItem *item, int ymin, int ymax) const {
+int KDListView::buildDrawables(TQPtrList<KDListView::DrawableItem> &lst, int level, int ypos, TQListViewItem *item, int ymin, int ymax) const {
int y = ypos;
int ih = item->height();
if (y < ymin && y+ih > ymin) {
@@ -2813,26 +2813,26 @@ int KDListView::buildDrawables(QPtrList<KDListView::DrawableItem> &lst, int leve
}
y += ih;
if (item->isOpen()) {
- QListViewItem *child = item->firstChild();
+ TQListViewItem *child = item->firstChild();
for (; child; child = child->nextSibling()) {
y = buildDrawables(lst, level+1, y, child, ymin, ymax);
}
}
return y;
}
-// This is a copy of QListView::drawContentsOffset(), with a few changes
+// This is a copy of TQListView::drawContentsOffset(), with a few changes
// because drawContentsOffset() only draws *visible* items,
// we want to draw *all* items.
// FIXME: Haven't got paintBraches() to work, atm live without it.
-void KDListView::drawAllContents(QPainter * p, int cx, int cy, int cw, int ch) {
+void KDListView::drawAllContents(TQPainter * p, int cx, int cy, int cw, int ch) {
if ( columns() == 0 ) {
- paintEmptyArea( p, QRect( cx, cy, cw, ch ) );
+ paintEmptyArea( p, TQRect( cx, cy, cw, ch ) );
return;
}
- //kdDebug()<<k_funcinfo<<QRect(cx, cy, cw, ch)<<endl;
- QPtrList<KDListView::DrawableItem> drawables;
+ //kdDebug()<<k_funcinfo<<TQRect(cx, cy, cw, ch)<<endl;
+ TQPtrList<KDListView::DrawableItem> drawables;
drawables.setAutoDelete(true);
- QListViewItem *child = firstChild();
+ TQListViewItem *child = firstChild();
int level = 0;
int ypos = 0;
for (; child; child = child->nextSibling()) {
@@ -2841,9 +2841,9 @@ void KDListView::drawAllContents(QPainter * p, int cx, int cy, int cw, int ch) {
p->setFont( font() );
- QPtrListIterator<KDListView::DrawableItem> it(drawables);
+ TQPtrListIterator<KDListView::DrawableItem> it(drawables);
- QRect r;
+ TQRect r;
int fx = -1, x, fc = 0, lc = 0;
int tx = -1;
KDListView::DrawableItem * current;
@@ -2884,7 +2884,7 @@ void KDListView::drawAllContents(QPainter * p, int cx, int cy, int cw, int ch) {
c = fc;
// draw to last interesting column
- const QColorGroup &cg = ( palette().inactive() );
+ const TQColorGroup &cg = ( palette().inactive() );
while ( c < lc && !drawables.isEmpty() ) {
int i = header()->mapToLogical( c );
@@ -2957,11 +2957,11 @@ void KDListView::drawAllContents(QPainter * p, int cx, int cy, int cw, int ch) {
}
}
-void KDListView::resizeEvent(QResizeEvent *)
+void KDListView::resizeEvent(TQResizeEvent *)
{
triggerUpdate ();
}
-void KDListView::dragEnterEvent ( QDragEnterEvent * e)
+void KDListView::dragEnterEvent ( TQDragEnterEvent * e)
{
if ( !myGanttView->dropEnabled() ) {
e->accept( false );
@@ -2971,7 +2971,7 @@ void KDListView::dragEnterEvent ( QDragEnterEvent * e)
//e->accept(KDGanttViewItemDrag::canDecode(e) );
}
-void KDListView::dragMoveEvent ( QDragMoveEvent * e)
+void KDListView::dragMoveEvent ( TQDragMoveEvent * e)
{
if ( !myGanttView->dropEnabled() ) {
e->accept( false );
@@ -3007,11 +3007,11 @@ void KDListView::dragMoveEvent ( QDragMoveEvent * e)
e->accept( true );
}
-void KDListView::dragLeaveEvent ( QDragLeaveEvent * )
+void KDListView::dragLeaveEvent ( TQDragLeaveEvent * )
{
//qDebug("contentsDragLeaveEvent ");
}
-void KDListView::dropEvent ( QDropEvent *e )
+void KDListView::dropEvent ( TQDropEvent *e )
{
if ( !myGanttView->dropEnabled() ) {
e->accept( false );
@@ -3023,7 +3023,7 @@ void KDListView::dropEvent ( QDropEvent *e )
draggedItem = myGanttView->myCanvasView->lastClickedItem;
if (myGanttView->lvDropEvent ( e, draggedItem, gItem ))
return;
- QString string;
+ TQString string;
KDGanttViewItemDrag::decode( e, string );
KDGanttViewItem* newItem = 0;
@@ -3032,22 +3032,22 @@ void KDListView::dropEvent ( QDropEvent *e )
return;
}
- QDomDocument doc( "GanttView" );
+ TQDomDocument doc( "GanttView" );
doc.setContent( string );
- QDomElement docRoot = doc.documentElement(); // ChartParams element
- QDomNode node = docRoot.firstChild();
+ TQDomElement docRoot = doc.documentElement(); // ChartParams element
+ TQDomNode node = docRoot.firstChild();
bool enable = myGanttView->myTimeTable->blockUpdating( );
myGanttView->myTimeTable->setBlockUpdating( true );
while( !node.isNull() ) {
- QDomElement element = node.toElement();
+ TQDomElement element = node.toElement();
if( !element.isNull() ) { // was really an element
- QString tagName = element.tagName();
+ TQString tagName = element.tagName();
if( tagName == "Items" ) {
- QDomNode node = element.firstChild();
+ TQDomNode node = element.firstChild();
while( !node.isNull() ) {
- QDomElement element = node.toElement();
+ TQDomElement element = node.toElement();
if( !element.isNull() ) { // was really an element
- QString tagName = element.tagName();
+ TQString tagName = element.tagName();
if( tagName == "Item" ) {
if ( gItem )
newItem = KDGanttViewItem::createFromDomElement( gItem,
@@ -3076,9 +3076,9 @@ void KDListView::dropEvent ( QDropEvent *e )
return;
}
-QDragObject * KDListView::dragObject ()
+TQDragObject * KDListView::dragObject ()
{
- return QListView::dragObject ();
+ return TQListView::dragObject ();
}
void KDListView::startDrag ()
@@ -3093,7 +3093,7 @@ void KDListView::startDrag ()
KDCanvasText::KDCanvasText( KDTimeTableWidget* canvas,
void* parentItem,
int type ) :
- QCanvasText(canvas)
+ TQCanvasText(canvas)
{
myParentType = type;
myParentItem = parentItem;
@@ -3103,7 +3103,7 @@ KDCanvasText::KDCanvasText( KDTimeTableWidget* canvas,
KDCanvasLine::KDCanvasLine( KDTimeTableWidget* canvas,
void* parentItem,
int type ) :
- QCanvasLine(canvas)
+ TQCanvasLine(canvas)
{
myParentType = type;
myParentItem = parentItem;
@@ -3113,7 +3113,7 @@ KDCanvasLine::KDCanvasLine( KDTimeTableWidget* canvas,
KDCanvasPolygonItem::KDCanvasPolygonItem( KDTimeTableWidget* canvas,
void* parentItem,
int type ) :
- QCanvasPolygonalItem( canvas )
+ TQCanvasPolygonalItem( canvas )
{
myParentType = type;
myParentItem = parentItem;
@@ -3123,7 +3123,7 @@ KDCanvasPolygonItem::KDCanvasPolygonItem( KDTimeTableWidget* canvas,
KDCanvasPolygon::KDCanvasPolygon( KDTimeTableWidget* canvas,
void* parentItem,
int type ) :
- QCanvasPolygon( canvas )
+ TQCanvasPolygon( canvas )
{
myParentType = type;
myParentItem = parentItem;
@@ -3133,7 +3133,7 @@ KDCanvasPolygon::KDCanvasPolygon( KDTimeTableWidget* canvas,
KDCanvasEllipse::KDCanvasEllipse( KDTimeTableWidget* canvas,
void* parentItem,
int type ) :
- QCanvasEllipse( canvas )
+ TQCanvasEllipse( canvas )
{
myParentType = type;
myParentItem = parentItem;
@@ -3143,7 +3143,7 @@ KDCanvasEllipse::KDCanvasEllipse( KDTimeTableWidget* canvas,
KDCanvasRectangle::KDCanvasRectangle( KDTimeTableWidget* canvas,
void* parentItem,
int type ) :
- QCanvasRectangle( canvas )
+ TQCanvasRectangle( canvas )
{
myParentType = type;
myParentItem = parentItem;
@@ -3152,13 +3152,13 @@ KDCanvasRectangle::KDCanvasRectangle( KDTimeTableWidget* canvas,
-KDGanttCanvasView::KDGanttCanvasView( KDGanttView* sender,QCanvas* canvas, QWidget* parent, const
- char* name ) : QCanvasView ( canvas, parent, name ),
+KDGanttCanvasView::KDGanttCanvasView( KDGanttView* sender,TQCanvas* canvas, TQWidget* parent, const
+ char* name ) : TQCanvasView ( canvas, parent, name ),
movingGVItem( 0 ),
scrollBarTimer( 0, "scrollBarTimer" )
{
- setHScrollBarMode (QScrollView::AlwaysOn );
- setVScrollBarMode( QScrollView::AlwaysOn );
+ setHScrollBarMode (TQScrollView::AlwaysOn );
+ setVScrollBarMode( TQScrollView::AlwaysOn );
myToolTip = new KDCanvasToolTip(viewport(),this);
mySignalSender = sender;
currentItem = 0;
@@ -3168,61 +3168,61 @@ KDGanttCanvasView::KDGanttCanvasView( KDGanttView* sender,QCanvas* canvas, QWidg
fromArea = 0;
linkItemsEnabled = false;
mouseDown = false;
- linkLine = new QCanvasLine(canvas);
+ linkLine = new TQCanvasLine(canvas);
linkLine->hide();
linkLine->setZ(1000);
set_Mouse_Tracking(true); // mouse cursor changes over KDIntervalColorRectangle borders
new KDCanvasWhatsThis(viewport(),this);
- onItem = new QPopupMenu( this );
- QPopupMenu * newMenu = new QPopupMenu( this );
- QPopupMenu * onView = new QPopupMenu( this );
+ onItem = new TQPopupMenu( this );
+ TQPopupMenu * newMenu = new TQPopupMenu( this );
+ TQPopupMenu * onView = new TQPopupMenu( this );
onView->insertItem( i18n( "Summary" ), this,
- SLOT ( newRootItem( int ) ), 0, 0 );
+ TQT_SLOT ( newRootItem( int ) ), 0, 0 );
onView->insertItem( i18n( "Event" ), this,
- SLOT ( newRootItem( int ) ), 0, 1);
+ TQT_SLOT ( newRootItem( int ) ), 0, 1);
onView->insertItem( i18n( "Task" ), this,
- SLOT ( newRootItem( int ) ), 0, 2 );
+ TQT_SLOT ( newRootItem( int ) ), 0, 2 );
onItem->insertItem( i18n( "New Root" ), onView );
newMenu->insertItem( i18n( "Summary" ),
- this, SLOT ( newChildItem( int) ), 0, 0 );
+ this, TQT_SLOT ( newChildItem( int) ), 0, 0 );
newMenu->insertItem( i18n( "Event" ),
- this, SLOT ( newChildItem( int ) ), 0, 1 );
+ this, TQT_SLOT ( newChildItem( int ) ), 0, 1 );
newMenu->insertItem( i18n( "Task" ),
- this, SLOT ( newChildItem( int ) ), 0, 2 );
+ this, TQT_SLOT ( newChildItem( int ) ), 0, 2 );
onItem->insertItem( i18n( "New Child" ), newMenu );
- QPopupMenu * afterMenu = new QPopupMenu( this );
+ TQPopupMenu * afterMenu = new TQPopupMenu( this );
afterMenu->insertItem( i18n( "Summary" ),
- this, SLOT ( newChildItem( int) ), 0, 0+4 );
+ this, TQT_SLOT ( newChildItem( int) ), 0, 0+4 );
afterMenu->insertItem( i18n( "Event" ),
- this, SLOT ( newChildItem( int ) ), 0, 1+4 );
+ this, TQT_SLOT ( newChildItem( int ) ), 0, 1+4 );
afterMenu->insertItem( i18n( "Task" ),
- this, SLOT ( newChildItem( int ) ), 0, 2+4 );
+ this, TQT_SLOT ( newChildItem( int ) ), 0, 2+4 );
onItem->insertItem( i18n( "New After" ), afterMenu );
- QPopupMenu *pasteMenu = new QPopupMenu( this );
+ TQPopupMenu *pasteMenu = new TQPopupMenu( this );
pasteMenu->insertItem( i18n( "As Root" ),
- this, SLOT ( pasteItem( int ) ), 0, 0 );
+ this, TQT_SLOT ( pasteItem( int ) ), 0, 0 );
pasteMenu->insertItem( i18n( "As Child" ),
- this, SLOT ( pasteItem( int ) ), 0, 1 );
+ this, TQT_SLOT ( pasteItem( int ) ), 0, 1 );
pasteMenu->insertItem( i18n( "After" ),
- this, SLOT ( pasteItem( int ) ), 0, 2 );
+ this, TQT_SLOT ( pasteItem( int ) ), 0, 2 );
onItem->insertItem( i18n( "Paste" ), pasteMenu, 3 );
- onItem->insertItem( i18n( "Cut Item" ), this, SLOT ( cutItem() ) );
+ onItem->insertItem( i18n( "Cut Item" ), this, TQT_SLOT ( cutItem() ) );
onItem->setItemEnabled( 3, false );
myMyContentsHeight = 0;
_showItemAddPopupMenu = false;
- QObject *scrollViewTimer = child( "scrollview scrollbar timer", "QTimer", false );
+ TQObject *scrollViewTimer = child( "scrollview scrollbar timer", "TQTimer", false );
Q_ASSERT( scrollViewTimer );
if ( scrollViewTimer ) {
- disconnect( scrollViewTimer, SIGNAL(timeout()), this, SLOT(updateScrollBars() ) );
+ disconnect( scrollViewTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(updateScrollBars() ) );
}
// If they needed a scrollbar timer in scrollview...
- connect( &scrollBarTimer, SIGNAL(timeout()), this, SLOT(myUpdateScrollBars() ) );
+ connect( &scrollBarTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(myUpdateScrollBars() ) );
- myScrollTimer = new QTimer( this, "myScrollTimer" );
- connect( myScrollTimer, SIGNAL( timeout() ), SLOT( slotScrollTimer() ) );
+ myScrollTimer = new TQTimer( this, "myScrollTimer" );
+ connect( myScrollTimer, TQT_SIGNAL( timeout() ), TQT_SLOT( slotScrollTimer() ) );
autoScrollEnabled = false;
}
@@ -3248,22 +3248,22 @@ void KDGanttCanvasView::moveMyContent( int, int y)
setContentsPos(contentsX(), y);
}
-void KDGanttCanvasView::resizeEvent ( QResizeEvent * e )
+void KDGanttCanvasView::resizeEvent ( TQResizeEvent * e )
{
int ho = e->oldSize().height();
int wo = e->oldSize().width();
int hi = height();
int wi = width();
- //QScrollView::blockSignals( true );
+ //TQScrollView::blockSignals( true );
verticalScrollBar()->setUpdatesEnabled( false );
- QScrollView::resizeEvent ( e ) ;
+ TQScrollView::resizeEvent ( e ) ;
if ( ho != hi )
emit heightResized( viewport()->height());
if ( wo != wi )
emit widthResized( viewport()->width() );
//setMyContentsHeight( 0 ); // via timer
- //QScrollView::blockSignals( false );
+ //TQScrollView::blockSignals( false );
scrollBarTimer.start(0, true);
}
@@ -3444,14 +3444,14 @@ void KDGanttCanvasView::newChildItem( int type )
mySignalSender->editItem( temp );
}
-void KDGanttCanvasView::drawToPainter ( QPainter * p )
+void KDGanttCanvasView::drawToPainter ( TQPainter * p )
{
drawContents ( p, 0, 0, canvas()->width(), canvas()->height() );
}
-QString KDGanttCanvasView::getToolTipText(QPoint p)
+TQString KDGanttCanvasView::getToolTipText(TQPoint p)
{
- QCanvasItemList il = canvas()->collisions ( viewportToContents( p ));
- QCanvasItemList::Iterator it;
+ TQCanvasItemList il = canvas()->collisions ( viewportToContents( p ));
+ TQCanvasItemList::Iterator it;
for ( it = il.begin(); it != il.end(); ++it ) {
switch (getType(*it)) {
case Type_is_KDGanttViewItem:
@@ -3467,10 +3467,10 @@ QString KDGanttCanvasView::getToolTipText(QPoint p)
return "";
}
-QString KDGanttCanvasView::getWhatsThisText(QPoint p)
+TQString KDGanttCanvasView::getWhatsThisText(TQPoint p)
{
- QCanvasItemList il = canvas() ->collisions (viewportToContents( p ));
- QCanvasItemList::Iterator it;
+ TQCanvasItemList il = canvas() ->collisions (viewportToContents( p ));
+ TQCanvasItemList::Iterator it;
for ( it = il.begin(); it != il.end(); ++it ) {
switch (getType(*it)) {
case Type_is_KDGanttViewItem:
@@ -3487,7 +3487,7 @@ QString KDGanttCanvasView::getWhatsThisText(QPoint p)
}
-KDGanttCanvasView::MovingOperation KDGanttCanvasView::gvItemHitTest( KDGanttViewItem *item, KDTimeHeaderWidget* timeHeader, const QPoint &pos )
+KDGanttCanvasView::MovingOperation KDGanttCanvasView::gvItemHitTest( KDGanttViewItem *item, KDTimeHeaderWidget* timeHeader, const TQPoint &pos )
{
const int left = timeHeader->getCoordX( item->startTime() );
const int right = timeHeader->getCoordX( item->endTime() );
@@ -3507,7 +3507,7 @@ KDGanttCanvasView::MovingOperation KDGanttCanvasView::gvItemHitTest( KDGanttView
*/
-void KDGanttCanvasView::contentsMousePressEvent ( QMouseEvent * e )
+void KDGanttCanvasView::contentsMousePressEvent ( TQMouseEvent * e )
{
//qDebug("mousepress! %d ", this);
//qDebug("focus %d ",qApp->focusWidget());
@@ -3517,12 +3517,12 @@ void KDGanttCanvasView::contentsMousePressEvent ( QMouseEvent * e )
movingItem = 0;
mouseDown = true;
if (e->button() == RightButton && mySignalSender->editable()) {
- lastClickedItem = (KDGanttViewItem*) mySignalSender->myListView->itemAt( QPoint(2,e->pos().y()));
+ lastClickedItem = (KDGanttViewItem*) mySignalSender->myListView->itemAt( TQPoint(2,e->pos().y()));
if ( lastClickedItem ) {
if ( lastClickedItem->displaySubitemsAsGroup() && ! lastClickedItem->isOpen() ) {
// findSub subitem
- QCanvasItemList il = canvas() ->collisions ( e->pos() );
- QCanvasItemList::Iterator it;
+ TQCanvasItemList il = canvas() ->collisions ( e->pos() );
+ TQCanvasItemList::Iterator it;
for ( it = il.begin(); it != il.end(); ++it ) {
if ( getType(*it) == Type_is_KDGanttViewItem ) {
lastClickedItem = getItem(*it);
@@ -3533,8 +3533,8 @@ void KDGanttCanvasView::contentsMousePressEvent ( QMouseEvent * e )
onItem->popup(e->globalPos());
}
}
- QCanvasItemList il = canvas() ->collisions ( e->pos() );
- QCanvasItemList::Iterator it;
+ TQCanvasItemList il = canvas() ->collisions ( e->pos() );
+ TQCanvasItemList::Iterator it;
for ( it = il.begin(); it != il.end(); ++it ) {
switch ( e->button() ) {
case LeftButton:
@@ -3577,7 +3577,7 @@ void KDGanttCanvasView::contentsMousePressEvent ( QMouseEvent * e )
if ( (*it)->rtti() == KDIntervalColorRectangle::RTTI ) {
// Cleaner would be isMovable()/isResizeable() in an interface
// implemented by all movable objects...
- movingItem = static_cast<QCanvasRectangle *>(*it);
+ movingItem = static_cast<TQCanvasRectangle *>(*it);
movingStart = e->pos();
KDIntervalColorRectangle* icr = static_cast<KDIntervalColorRectangle *>( movingItem );
KDIntervalColorRectangle::HitTest hitTest = icr->hitTest( mySignalSender->myTimeHeader, movingStart );
@@ -3632,7 +3632,7 @@ void KDGanttCanvasView::contentsMousePressEvent ( QMouseEvent * e )
*/
-void KDGanttCanvasView::contentsMouseReleaseEvent ( QMouseEvent * e )
+void KDGanttCanvasView::contentsMouseReleaseEvent ( TQMouseEvent * e )
{
mouseDown = false;
static KDGanttViewItem* lastClicked = 0;
@@ -3654,8 +3654,8 @@ void KDGanttCanvasView::contentsMouseReleaseEvent ( QMouseEvent * e )
if (linkItemsEnabled && fromItem) {
linkLine->hide();
canvas()->update();
- QCanvasItemList il = canvas() ->collisions ( e->pos() );
- QCanvasItemList::Iterator it;
+ TQCanvasItemList il = canvas() ->collisions ( e->pos() );
+ TQCanvasItemList::Iterator it;
for ( it = il.begin(); it != il.end(); ++it ) {
if (getType(*it) == Type_is_KDGanttViewItem) {
KDGanttViewItem *toItem = getItem(*it);
@@ -3709,9 +3709,9 @@ void KDGanttCanvasView::contentsMouseReleaseEvent ( QMouseEvent * e )
*/
-void KDGanttCanvasView::contentsMouseDoubleClickEvent ( QMouseEvent * e )
+void KDGanttCanvasView::contentsMouseDoubleClickEvent ( TQMouseEvent * e )
{
- QCanvasItemList il = canvas() ->collisions ( e->pos() );
+ TQCanvasItemList il = canvas() ->collisions ( e->pos() );
if ( il.isEmpty() && e->button() == LeftButton ) {
//not directly sending a signal here (encapsulation and whatnot)
@@ -3719,7 +3719,7 @@ void KDGanttCanvasView::contentsMouseDoubleClickEvent ( QMouseEvent * e )
return;
}
- QCanvasItemList::Iterator it;
+ TQCanvasItemList::Iterator it;
for ( it = il.begin(); it != il.end(); ++it ) {
switch ( e->button() ) {
case LeftButton:
@@ -3776,13 +3776,13 @@ void KDGanttCanvasView::contentsMouseDoubleClickEvent ( QMouseEvent * e )
*/
-void KDGanttCanvasView::contentsMouseMoveEvent ( QMouseEvent *e )
+void KDGanttCanvasView::contentsMouseMoveEvent ( TQMouseEvent *e )
{
if ( !mouseDown ) {
// Update cursor
bool found = false;
- QCanvasItemList il = canvas() ->collisions ( e->pos() );
- QCanvasItemList::Iterator it;
+ TQCanvasItemList il = canvas() ->collisions ( e->pos() );
+ TQCanvasItemList::Iterator it;
for ( it = il.begin(); it != il.end(); ++it ) {
if ( (*it)->rtti() == KDIntervalColorRectangle::RTTI ) {
found = true;
@@ -3817,7 +3817,7 @@ void KDGanttCanvasView::contentsMouseMoveEvent ( QMouseEvent *e )
return;
}
- const QPoint p = e->pos();
+ const TQPoint p = e->pos();
if ( movingItem ) {
int x = qRound( movingItem->x() );
int width = movingItem->width();
@@ -3837,8 +3837,8 @@ void KDGanttCanvasView::contentsMouseMoveEvent ( QMouseEvent *e )
movingStart = p;
if ( movingItem->rtti() == KDIntervalColorRectangle::RTTI ) {
KDIntervalColorRectangle* icr = static_cast<KDIntervalColorRectangle *>(movingItem);
- const QDateTime newStart = mySignalSender->myTimeHeader->getDateTimeForIndex(x);
- const QDateTime newEnd = mySignalSender->myTimeHeader->getDateTimeForIndex(x + width);
+ const TQDateTime newStart = mySignalSender->myTimeHeader->getDateTimeForIndex(x);
+ const TQDateTime newEnd = mySignalSender->myTimeHeader->getDateTimeForIndex(x + width);
icr->setDateTimes( newStart, newEnd );
emit mySignalSender->intervalColorRectangleMoved( newStart, newEnd );
mySignalSender->myTimeHeader->computeIntervals( movingItem->height() );
@@ -3849,7 +3849,7 @@ void KDGanttCanvasView::contentsMouseMoveEvent ( QMouseEvent *e )
if ( movingGVItem ) {
int dx = movingStart.x() - e->pos().x();
int x = movingGVItem->middleLeft().x() - dx;
- QDateTime dt = mySignalSender->getDateTimeForCoordX( x, false );
+ TQDateTime dt = mySignalSender->getDateTimeForCoordX( x, false );
int duration = movingGVItem->startTime().secsTo( movingGVItem->endTime() );
if ( movingOperation == Moving ) {
movingGVItem->setStartTime( dt );
@@ -3871,7 +3871,7 @@ void KDGanttCanvasView::contentsMouseMoveEvent ( QMouseEvent *e )
currentItem = 0;
}
if (autoScrollEnabled)
- mousePos = e->pos()- QPoint(contentsX(),contentsY()); // make mousePos relative 0
+ mousePos = e->pos()- TQPoint(contentsX(),contentsY()); // make mousePos relative 0
if (fromItem) {
//qDebug("mousemove: linking %s: %d,%d ",fromItem->listViewText().latin1(), e->pos().x(), e->pos().y());
linkLine->setPoints(linkLine->startPoint().x(), linkLine->startPoint().y(), e->pos().x(), e->pos().y());
@@ -3879,46 +3879,46 @@ void KDGanttCanvasView::contentsMouseMoveEvent ( QMouseEvent *e )
}
// no action implemented
}
-void KDGanttCanvasView::viewportPaintEvent ( QPaintEvent * pe )
+void KDGanttCanvasView::viewportPaintEvent ( TQPaintEvent * pe )
{
- QCanvasView::viewportPaintEvent ( pe );
+ TQCanvasView::viewportPaintEvent ( pe );
}
void KDGanttCanvasView::set_Mouse_Tracking(bool on)
{
viewport()->setMouseTracking(on);
}
-int KDGanttCanvasView::getType(QCanvasItem* it)
+int KDGanttCanvasView::getType(TQCanvasItem* it)
{
switch (it->rtti()) {
- case QCanvasItem::Rtti_Line: return ((KDCanvasLine*)it)->myParentType;
- case QCanvasItem::Rtti_Ellipse: return ((KDCanvasEllipse *)it)->myParentType;
- case QCanvasItem::Rtti_Text: return ((KDCanvasText *)it)->myParentType;
- case QCanvasItem::Rtti_Polygon: return ((KDCanvasPolygon *)it)->myParentType;
- case QCanvasItem::Rtti_Rectangle:
+ case TQCanvasItem::Rtti_Line: return ((KDCanvasLine*)it)->myParentType;
+ case TQCanvasItem::Rtti_Ellipse: return ((KDCanvasEllipse *)it)->myParentType;
+ case TQCanvasItem::Rtti_Text: return ((KDCanvasText *)it)->myParentType;
+ case TQCanvasItem::Rtti_Polygon: return ((KDCanvasPolygon *)it)->myParentType;
+ case TQCanvasItem::Rtti_Rectangle:
case KDIntervalColorRectangle::RTTI:
return ((KDCanvasRectangle *)it)->myParentType;
}
return -1;
}
-KDGanttViewItem* KDGanttCanvasView::getItem(QCanvasItem* it)
+KDGanttViewItem* KDGanttCanvasView::getItem(TQCanvasItem* it)
{
switch (it->rtti()) {
- case QCanvasItem::Rtti_Line: return (KDGanttViewItem*) ((KDCanvasLine*)it)->myParentItem;
- case QCanvasItem::Rtti_Ellipse: return (KDGanttViewItem*) ((KDCanvasEllipse *)it)->myParentItem;
- case QCanvasItem::Rtti_Text: return (KDGanttViewItem*) ((KDCanvasText *)it)->myParentItem;
- case QCanvasItem::Rtti_Polygon: return (KDGanttViewItem*) ((KDCanvasPolygon *)it)->myParentItem;
- case QCanvasItem::Rtti_Rectangle: return (KDGanttViewItem*) ((KDCanvasRectangle *)it)->myParentItem;
+ case TQCanvasItem::Rtti_Line: return (KDGanttViewItem*) ((KDCanvasLine*)it)->myParentItem;
+ case TQCanvasItem::Rtti_Ellipse: return (KDGanttViewItem*) ((KDCanvasEllipse *)it)->myParentItem;
+ case TQCanvasItem::Rtti_Text: return (KDGanttViewItem*) ((KDCanvasText *)it)->myParentItem;
+ case TQCanvasItem::Rtti_Polygon: return (KDGanttViewItem*) ((KDCanvasPolygon *)it)->myParentItem;
+ case TQCanvasItem::Rtti_Rectangle: return (KDGanttViewItem*) ((KDCanvasRectangle *)it)->myParentItem;
}
return 0;
}
-KDGanttViewTaskLink* KDGanttCanvasView::getLink(QCanvasItem* it)
+KDGanttViewTaskLink* KDGanttCanvasView::getLink(TQCanvasItem* it)
{
switch (it->rtti()) {
- case QCanvasItem::Rtti_Line: return (KDGanttViewTaskLink*) ((KDCanvasLine*)it)->myParentItem;
- case QCanvasItem::Rtti_Ellipse: return (KDGanttViewTaskLink*) ((KDCanvasEllipse *)it)->myParentItem;
- case QCanvasItem::Rtti_Text: return (KDGanttViewTaskLink*) ((KDCanvasText *)it)->myParentItem;
- case QCanvasItem::Rtti_Polygon: return (KDGanttViewTaskLink*) ((KDCanvasPolygon *)it)->myParentItem;
+ case TQCanvasItem::Rtti_Line: return (KDGanttViewTaskLink*) ((KDCanvasLine*)it)->myParentItem;
+ case TQCanvasItem::Rtti_Ellipse: return (KDGanttViewTaskLink*) ((KDCanvasEllipse *)it)->myParentItem;
+ case TQCanvasItem::Rtti_Text: return (KDGanttViewTaskLink*) ((KDCanvasText *)it)->myParentItem;
+ case TQCanvasItem::Rtti_Polygon: return (KDGanttViewTaskLink*) ((KDCanvasPolygon *)it)->myParentItem;
}
return 0;
}
@@ -3997,8 +3997,8 @@ KDIntervalColorRectangle::KDIntervalColorRectangle( KDGanttView* view )
\param start start datetime of the time interval
\param end end datetime of the time interval
*/
-void KDIntervalColorRectangle::setDateTimes( const QDateTime& start,
- const QDateTime& end )
+void KDIntervalColorRectangle::setDateTimes( const TQDateTime& start,
+ const TQDateTime& end )
{
mStart = start;
mEnd = end;
@@ -4010,7 +4010,7 @@ void KDIntervalColorRectangle::setDateTimes( const QDateTime& start,
Sets the background color
\param color the background color
*/
-void KDIntervalColorRectangle::setColor( const QColor& color )
+void KDIntervalColorRectangle::setColor( const TQColor& color )
{
mColor = color;
}
@@ -4024,8 +4024,8 @@ void KDIntervalColorRectangle::layout( KDTimeHeaderWidget* timeHeader, int heigh
int right = timeHeader->getCoordX(mEnd);
if ( right == left )
++right;
- setPen( QPen::NoPen );
- setBrush( QBrush(mColor, SolidPattern) );
+ setPen( TQPen::NoPen );
+ setBrush( TQBrush(mColor, SolidPattern) );
setSize( right - left, height );
move( left, 0 );
show();
@@ -4034,7 +4034,7 @@ void KDIntervalColorRectangle::layout( KDTimeHeaderWidget* timeHeader, int heigh
/*!
\internal
*/
-KDIntervalColorRectangle::HitTest KDIntervalColorRectangle::hitTest( KDTimeHeaderWidget* timeHeader, const QPoint& pos ) const
+KDIntervalColorRectangle::HitTest KDIntervalColorRectangle::hitTest( KDTimeHeaderWidget* timeHeader, const TQPoint& pos ) const
{
const int left = timeHeader->getCoordX(mStart);
const int right = timeHeader->getCoordX(mEnd);
diff --git a/kdgantt/KDGanttViewSubwidgets.h b/kdgantt/KDGanttViewSubwidgets.h
index b8d9d57a7..1a88411a3 100644
--- a/kdgantt/KDGanttViewSubwidgets.h
+++ b/kdgantt/KDGanttViewSubwidgets.h
@@ -37,24 +37,24 @@
#define KDGANTTVIEWSUBWIDGETS_H
-#include <qwidget.h>
-#include <qlistview.h>
-#include <qsplitter.h>
-#include <qevent.h>
-#include <qvaluelist.h>
-#include <qcanvas.h>
-#include <qwhatsthis.h>
-#include <qpopupmenu.h>
-#include <qtooltip.h>
-#include <qtimer.h>
-#include <qgroupbox.h>
-#include <qvgroupbox.h>
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qbrush.h>
-#include <qvbox.h>
-#include <qdockwindow.h>
-#include <qtimer.h>
+#include <tqwidget.h>
+#include <tqlistview.h>
+#include <tqsplitter.h>
+#include <tqevent.h>
+#include <tqvaluelist.h>
+#include <tqcanvas.h>
+#include <tqwhatsthis.h>
+#include <tqpopupmenu.h>
+#include <tqtooltip.h>
+#include <tqtimer.h>
+#include <tqgroupbox.h>
+#include <tqvgroupbox.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqbrush.h>
+#include <tqvbox.h>
+#include <tqdockwindow.h>
+#include <tqtimer.h>
#include "KDGanttView.h"
#include "KDGanttViewTaskLink.h"
@@ -82,36 +82,36 @@ public:
typedef KDGanttView::YearFormat YearFormat;
typedef KDGanttView::HourFormat HourFormat;
struct DateTimeColor {
- QDateTime datetime;
- QDateTime end;
- QColor color;
+ TQDateTime datetime;
+ TQDateTime end;
+ TQColor color;
Scale minScaleView;
Scale maxScaleView;
//KDCanvasLine* canvasLine;
KDCanvasRectangle* canvasRect;
};
- typedef QValueList<DateTimeColor> ColumnColorList;
- typedef QValueList<KDIntervalColorRectangle *> IntervalColorList;
+ typedef TQValueList<DateTimeColor> ColumnColorList;
+ typedef TQValueList<KDIntervalColorRectangle *> IntervalColorList;
/*
enum Scale { Minute, Hour, Day, Week, Month, Auto };
enum YearFormat { FourDigit, TwoDigit, TwoDigitApostrophe };
enum HourFormat { Hour_24, Hour_12 };
*/
- KDTimeHeaderWidget (QWidget* parent,KDGanttView* gant);
+ KDTimeHeaderWidget (TQWidget* parent,KDGanttView* gant);
~KDTimeHeaderWidget();
- QString getToolTipText(QPoint p);
+ TQString getToolTipText(TQPoint p);
void zoomToFit();
void zoom(double, bool absolute = true);
- void zoomToSelection( QDateTime startTime, QDateTime endTime);
+ void zoomToSelection( TQDateTime startTime, TQDateTime endTime);
double zoomFactor();
void setAutoScaleMinorTickCount( int count );
int autoScaleMinorTickCount();
- void setHorizonStart( const QDateTime& start );
- QDateTime horizonStart() const;
- void setHorizonEnd( const QDateTime& start );
- QDateTime horizonEnd() const;
+ void setHorizonStart( const TQDateTime& start );
+ TQDateTime horizonStart() const;
+ void setHorizonEnd( const TQDateTime& start );
+ TQDateTime horizonEnd() const;
void setMaximumScale( Scale );
KDTimeHeaderWidget::Scale maximumScale() const;
@@ -133,38 +133,38 @@ public:
void setShowMinorTicks( bool );
void setScale( Scale unit);
bool showMinorTicks() const;
- void setColumnBackgroundColor( const QDateTime& column,
- const QColor& color,
+ void setColumnBackgroundColor( const TQDateTime& column,
+ const TQColor& color,
Scale mini = KDGanttView::Minute ,
Scale maxi = KDGanttView::Month);
#if 0
// This API has been replaced with KDIntervalColorRectangle and addIntervalBackgroundColor
- void setIntervalBackgroundColor( const QDateTime& start,
- const QDateTime& end,
- const QColor& color,
+ void setIntervalBackgroundColor( const TQDateTime& start,
+ const TQDateTime& end,
+ const TQColor& color,
Scale mini = KDGanttView::Minute ,
Scale maxi = KDGanttView::Month);
- bool changeBackgroundInterval( const QDateTime& oldstart,
- const QDateTime& oldend,
- const QDateTime& newstart,
- const QDateTime& newend );
- bool deleteBackgroundInterval( const QDateTime& start,
- const QDateTime& end );
+ bool changeBackgroundInterval( const TQDateTime& oldstart,
+ const TQDateTime& oldend,
+ const TQDateTime& newstart,
+ const TQDateTime& newend );
+ bool deleteBackgroundInterval( const TQDateTime& start,
+ const TQDateTime& end );
#endif
void addIntervalBackgroundColor( KDIntervalColorRectangle* newItem );
void clearBackgroundColor();
- QColor columnBackgroundColor( const QDateTime& column ) const;
- void setWeekendBackgroundColor( const QColor& color );
- QColor weekendBackgroundColor() const;
- void setWeekdayBackgroundColor( const QColor& color, int weekday );
- QColor weekdayBackgroundColor(int weekday) const;
+ TQColor columnBackgroundColor( const TQDateTime& column ) const;
+ void setWeekendBackgroundColor( const TQColor& color );
+ TQColor weekendBackgroundColor() const;
+ void setWeekdayBackgroundColor( const TQColor& color, int weekday );
+ TQColor weekdayBackgroundColor(int weekday) const;
void setWeekendDays( int start, int end );
void weekendDays( int& start, int& end ) const;
void computeTicks(bool doNotComputeRealScale = false);
- void paintEvent(QPaintEvent *);
- int getCoordX(QDate);
- int getCoordX(QDateTime);
- QDateTime getDateTimeForIndex(int coordX, bool local = true );
+ void paintEvent(TQPaintEvent *);
+ int getCoordX(TQDate);
+ int getCoordX(TQDateTime);
+ TQDateTime getDateTimeForIndex(int coordX, bool local = true );
void setShowPopupMenu( bool show, bool showZoom, bool showScale,bool showTime,
bool showYear,bool showGrid, bool showPrint);
bool registerStartTime();
@@ -173,10 +173,10 @@ public:
ColumnColorList columnBackgroundColorList() const {
return ccList;
}
- QColor weekdayColor[8];
- void repaintMe(int left, int wid, QPainter *p = 0);
+ TQColor weekdayColor[8];
+ void repaintMe(int left, int wid, TQPainter *p = 0);
- void centerDateTime( const QDateTime& center );
+ void centerDateTime( const TQDateTime& center );
public slots:
void setSettings(int);
@@ -192,22 +192,22 @@ private:
friend class KDGanttViewItem;
friend class KDGanttView;
friend class KDGanttCanvasView; // calls computeIntervals
- virtual void mousePressEvent ( QMouseEvent * e );
- virtual void mouseReleaseEvent ( QMouseEvent * e );
- virtual void mouseDoubleClickEvent ( QMouseEvent * e );
- virtual void mouseMoveEvent ( QMouseEvent * e );
- double secsFromTo( QDateTime begin, QDateTime end );
+ virtual void mousePressEvent ( TQMouseEvent * e );
+ virtual void mouseReleaseEvent ( TQMouseEvent * e );
+ virtual void mouseDoubleClickEvent ( TQMouseEvent * e );
+ virtual void mouseMoveEvent ( TQMouseEvent * e );
+ double secsFromTo( TQDateTime begin, TQDateTime end );
void updateTimeTable();
void computeIntervals( int height );
- bool getColumnColor(QColor& col,int coordLow, int coordHigh);
+ bool getColumnColor(TQColor& col,int coordLow, int coordHigh);
void moveTimeLineTo(int x);
- //void mousePressEvent ( QMouseEvent * ) ;
- void resizeEvent ( QResizeEvent * ) ;
- QValueList<int> majorTicks;
- QValueList<QString> minorText;
- QValueList<QString> majorText;
- QDateTime myHorizonStart, myHorizonEnd, myRealEnd,myRealStart;
- QDateTime myCenterDateTime;
+ //void mousePressEvent ( TQMouseEvent * ) ;
+ void resizeEvent ( TQResizeEvent * ) ;
+ TQValueList<int> majorTicks;
+ TQValueList<TQString> minorText;
+ TQValueList<TQString> majorText;
+ TQDateTime myHorizonStart, myHorizonEnd, myRealEnd,myRealStart;
+ TQDateTime myCenterDateTime;
void saveCenterDateTime();
Scale myScale,myRealScale,myMaxScale,myMinScale;
YearFormat myYearFormat;
@@ -217,21 +217,21 @@ private:
bool flagShowZoom, flagShowScale ,flagShowTime ,flagShowYear;
bool flagShowGrid ,flagShowPrint;
bool flagStartTimeSet,flagEndTimeSet;
- QColor myWeekendBackgroundColor;
+ TQColor myWeekendBackgroundColor;
int myWeekendDaysStart, myWeekendDaysEnd;
ColumnColorList ccList;
IntervalColorList icList;
int myMinorScaleCount,myMajorScaleCount;
int myRealMinorScaleCount,myRealMajorScaleCount;
bool flagDoNotRecomputeAfterChange,flagDoNotRepaintAfterChange;
- QString getYear(QDate);
- QString getHour(QTime);
- QDateTime getEvenTimeDate(QDateTime ,Scale);
- void computeRealScale(QDateTime start);
+ TQString getYear(TQDate);
+ TQString getHour(TQTime);
+ TQDateTime getEvenTimeDate(TQDateTime ,Scale);
+ void computeRealScale(TQDateTime start);
int myGridMinorWidth;
int myMajorGridHeight;
- QPopupMenu * myPopupMenu, *scalePopupMenu, *timePopupMenu;
- QPopupMenu * yearPopupMenu, *gridPopupMenu;
+ TQPopupMenu * myPopupMenu, *scalePopupMenu, *timePopupMenu;
+ TQPopupMenu * yearPopupMenu, *gridPopupMenu;
KDGanttView* myGanttView;
double myZoomFactor;
int myAutoScaleMinorTickcount;
@@ -244,7 +244,7 @@ private:
int beginMouseDown;
int endMouseDown;
bool autoComputeTimeLine;
- QPixmap paintPix;
+ TQPixmap paintPix;
};
/* KDTimeTableWidget */
@@ -255,7 +255,7 @@ class KDTimeTableWidget : public QCanvas
Q_OBJECT
public:
- KDTimeTableWidget (QWidget* parent,KDGanttView* my);
+ KDTimeTableWidget (TQWidget* parent,KDGanttView* my);
void setBlockUpdating( bool block = true );
bool blockUpdating();
@@ -263,25 +263,25 @@ public:
void dec_blockUpdating();
void setShowTaskLinks( bool show );
bool showTaskLinks();
- QPtrList<KDGanttViewTaskLink>taskLinks();
+ TQPtrList<KDGanttViewTaskLink>taskLinks();
void clearTaskLinks();
void updateMyContent();
void removeItemFromTasklinks( KDGanttViewItem * );
- void setHorBackgroundLines( int count, QBrush brush );
- int horBackgroundLines( QBrush& brush );
+ void setHorBackgroundLines( int count, TQBrush brush );
+ int horBackgroundLines( TQBrush& brush );
- void setNoInformationBrush( const QBrush& brush );
- QBrush noInformationBrush() const;
+ void setNoInformationBrush( const TQBrush& brush );
+ TQBrush noInformationBrush() const;
- int getCoordX( QDateTime dt );
+ int getCoordX( TQDateTime dt );
signals:
void heightComputed( int );
public slots:
- void expandItem(QListViewItem * );
- void collapseItem(QListViewItem * );
- void highlightItem(QListViewItem * );
+ void expandItem(TQListViewItem * );
+ void collapseItem(TQListViewItem * );
+ void highlightItem(TQListViewItem * );
void resetWidth( int );
void checkHeight( int );
private:
@@ -293,15 +293,15 @@ private:
bool taskLinksVisible;
- QPtrList<KDGanttViewTaskLink> myTaskLinkList;
+ TQPtrList<KDGanttViewTaskLink> myTaskLinkList;
- QPtrList<KDCanvasLine> verGridList;
- QPtrList<KDCanvasLine> horGridList;
- QPtrList<KDCanvasRectangle> horDenseList;
- QPtrList<KDCanvasRectangle> showNoInfoList;
+ TQPtrList<KDCanvasLine> verGridList;
+ TQPtrList<KDCanvasLine> horGridList;
+ TQPtrList<KDCanvasRectangle> horDenseList;
+ TQPtrList<KDCanvasRectangle> showNoInfoList;
int denseLineCount;
- QBrush denseLineBrush, noInfoLineBrush;
- QPtrList<KDCanvasRectangle> columnColorList;
+ TQBrush denseLineBrush, noInfoLineBrush;
+ TQPtrList<KDCanvasRectangle> columnColorList;
int computeHeight();
void computeVerticalGrid();
@@ -316,7 +316,7 @@ private:
void showMinorGrid();
void hideGrid();
- QPen gridPen;
+ TQPen gridPen;
int maximumComputedGridHeight;
int minimumHeight;
int int_blockUpdating;
@@ -331,23 +331,23 @@ class KDLegendWidget : public KDGanttSemiSizingControl
Q_OBJECT
public:
- KDLegendWidget ( QWidget* parent, KDGanttMinimizeSplitter* legendParent );
+ KDLegendWidget ( TQWidget* parent, KDGanttMinimizeSplitter* legendParent );
void showMe(bool);
bool isShown();
- void addLegendItem( KDGanttViewItem::Shape shape, const QColor& shapeColor, const QString& text );
+ void addLegendItem( KDGanttViewItem::Shape shape, const TQColor& shapeColor, const TQString& text );
void clearLegend();
- void setFont( QFont );
- void drawToPainter( QPainter *p );
+ void setFont( TQFont );
+ void drawToPainter( TQPainter *p );
void setAsDockwindow( bool dockwin );
bool asDockwindow();
- QDockWindow* dockwindow();
- QSize legendSize();
- QSize legendSizeHint();
+ TQDockWindow* dockwindow();
+ TQSize legendSize();
+ TQSize legendSizeHint();
private:
- QGroupBox * myLegend;
- QLabel* myLabel;
- QScrollView * scroll;
- QDockWindow* dock;
+ TQGroupBox * myLegend;
+ TQLabel* myLabel;
+ TQScrollView * scroll;
+ TQDockWindow* dock;
KDGanttMinimizeSplitter* myLegendParent;
};
@@ -357,38 +357,38 @@ class KDListView : public QListView
Q_OBJECT
public:
- KDListView (QWidget* parent,KDGanttView* gv );
+ KDListView (TQWidget* parent,KDGanttView* gv );
KDGanttView* myGanttView;
- void drawToPainter( QPainter *p, bool drawHeader=false );
+ void drawToPainter( TQPainter *p, bool drawHeader=false );
void setCalendarMode( bool mode );
bool calendarMode() { return _calendarMode; };
- QString getWhatsThisText(QPoint p);
- void setOpen ( QListViewItem * item, bool open );
- void dragEnterEvent ( QDragEnterEvent * );
- void dragMoveEvent ( QDragMoveEvent * );
- void dragLeaveEvent ( QDragLeaveEvent * );
- void dropEvent ( QDropEvent * );
- QDragObject * dragObject ();
+ TQString getWhatsThisText(TQPoint p);
+ void setOpen ( TQListViewItem * item, bool open );
+ void dragEnterEvent ( TQDragEnterEvent * );
+ void dragMoveEvent ( TQDragMoveEvent * );
+ void dragLeaveEvent ( TQDragLeaveEvent * );
+ void dropEvent ( TQDropEvent * );
+ TQDragObject * dragObject ();
void startDrag ();
- void paintemptyarea ( QPainter * p, const QRect & rect ){ QListView::paintEmptyArea( p, rect );};
+ void paintemptyarea ( TQPainter * p, const TQRect & rect ){ TQListView::paintEmptyArea( p, rect );};
public:
class DrawableItem {
public:
- DrawableItem(int level, int ypos, QListViewItem *item ) { y = ypos; l = level; i = item; };
+ DrawableItem(int level, int ypos, TQListViewItem *item ) { y = ypos; l = level; i = item; };
int y;
int l;
- QListViewItem * i;
+ TQListViewItem * i;
};
protected:
- void drawAllContents(QPainter * p, int cx, int cy, int cw, int ch);
- int buildDrawables(QPtrList<KDListView::DrawableItem> &lst, int level, int ypos, QListViewItem *item, int ymin, int ymax) const;
+ void drawAllContents(TQPainter * p, int cx, int cy, int cw, int ch);
+ int buildDrawables(TQPtrList<KDListView::DrawableItem> &lst, int level, int ypos, TQListViewItem *item, int ymin, int ymax) const;
private slots:
- void dragItem( QListViewItem * );
+ void dragItem( TQListViewItem * );
private:
- void resizeEvent ( QResizeEvent * ) ;
- void contentsMouseDoubleClickEvent ( QMouseEvent * e );
+ void resizeEvent ( TQResizeEvent * ) ;
+ void contentsMouseDoubleClickEvent ( TQMouseEvent * e );
bool _calendarMode;
@@ -457,15 +457,15 @@ class KDIntervalColorRectangle: public KDCanvasRectangle
public:
KDIntervalColorRectangle( KDGanttView* view );
- void setDateTimes( const QDateTime& start,
- const QDateTime& end );
- QDateTime start() const { return mStart; }
- QDateTime end() const { return mEnd; }
+ void setDateTimes( const TQDateTime& start,
+ const TQDateTime& end );
+ TQDateTime start() const { return mStart; }
+ TQDateTime end() const { return mEnd; }
- void setColor( const QColor& color );
+ void setColor( const TQColor& color );
enum HitTest { Start, Middle, End };
- HitTest hitTest( KDTimeHeaderWidget* timeHeader, const QPoint& pos ) const;
+ HitTest hitTest( KDTimeHeaderWidget* timeHeader, const TQPoint& pos ) const;
void layout( KDTimeHeaderWidget* timeHeader, int height );
@@ -473,9 +473,9 @@ public:
/*reimp*/ int rtti() const { return RTTI; }
private:
- QColor mColor;
- QDateTime mStart;
- QDateTime mEnd;
+ TQColor mColor;
+ TQDateTime mStart;
+ TQDateTime mEnd;
};
class KDCanvasToolTip;
@@ -485,11 +485,11 @@ class KDGanttCanvasView : public QCanvasView
Q_OBJECT
public:
- KDGanttCanvasView(KDGanttView* sender, QCanvas* canvas = 0, QWidget* parent = 0, const char* name = 0 );
+ KDGanttCanvasView(KDGanttView* sender, TQCanvas* canvas = 0, TQWidget* parent = 0, const char* name = 0 );
~KDGanttCanvasView();
- QString getToolTipText(QPoint p);
- QString getWhatsThisText(QPoint p);
- void drawToPainter ( QPainter * p );
+ TQString getToolTipText(TQPoint p);
+ TQString getWhatsThisText(TQPoint p);
+ void drawToPainter ( TQPainter * p );
void resetCutPaste( KDGanttViewItem* );
void setShowPopupMenu( bool show );
bool showPopupMenu();
@@ -500,35 +500,35 @@ public:
protected:
friend class KDGanttView;
friend class KDListView;
- virtual void contentsMousePressEvent ( QMouseEvent * ) ;
- virtual void contentsMouseReleaseEvent ( QMouseEvent * );
- virtual void contentsMouseDoubleClickEvent ( QMouseEvent * );
- virtual void contentsMouseMoveEvent ( QMouseEvent * ) ;
- virtual void viewportPaintEvent ( QPaintEvent * pe );
- void resizeEvent ( QResizeEvent * ) ;
+ virtual void contentsMousePressEvent ( TQMouseEvent * ) ;
+ virtual void contentsMouseReleaseEvent ( TQMouseEvent * );
+ virtual void contentsMouseDoubleClickEvent ( TQMouseEvent * );
+ virtual void contentsMouseMoveEvent ( TQMouseEvent * ) ;
+ virtual void viewportPaintEvent ( TQPaintEvent * pe );
+ void resizeEvent ( TQResizeEvent * ) ;
void set_MouseTracking(bool on);
- int getType(QCanvasItem*);
- KDGanttViewItem* getItem(QCanvasItem*);
- KDGanttViewTaskLink* getLink(QCanvasItem*);
+ int getType(TQCanvasItem*);
+ KDGanttViewItem* getItem(TQCanvasItem*);
+ KDGanttViewTaskLink* getLink(TQCanvasItem*);
int getItemArea(KDGanttViewItem *item, int x);
int getLinkType(int from, int to);
KDGanttView* mySignalSender;
KDGanttViewItem* currentItem, *lastClickedItem, *cuttedItem;
- QCanvasRectangle* movingItem;
+ TQCanvasRectangle* movingItem;
KDGanttViewTaskItem* movingGVItem;
- QPoint movingStart;
- QDateTime movingStartDate;
+ TQPoint movingStart;
+ TQDateTime movingStartDate;
enum MovingOperation { Moving, ResizingLeft, ResizingRight };
MovingOperation movingOperation;
KDGanttViewTaskLink* currentLink;
KDCanvasWhatsThis* myWhatsThis;
- QPopupMenu* onItem;
+ TQPopupMenu* onItem;
bool _showItemAddPopupMenu;
int myMyContentsHeight;
KDGanttViewItem *fromItem;
bool linkItemsEnabled;
- QCanvasLine *linkLine;
+ TQCanvasLine *linkLine;
int fromArea;
bool autoScrollEnabled;
bool mouseDown;
@@ -551,29 +551,29 @@ private slots:
void myUpdateScrollBars();
private:
- MovingOperation gvItemHitTest( KDGanttViewItem *item, KDTimeHeaderWidget* timeHeader, const QPoint &pos );
+ MovingOperation gvItemHitTest( KDGanttViewItem *item, KDTimeHeaderWidget* timeHeader, const TQPoint &pos );
private:
KDCanvasToolTip* myToolTip;
- QTimer *myScrollTimer;
- QPoint mousePos;
- QTimer scrollBarTimer;
+ TQTimer *myScrollTimer;
+ TQPoint mousePos;
+ TQTimer scrollBarTimer;
};
class KDTimeHeaderToolTip :public QToolTip
{
public:
- KDTimeHeaderToolTip( QWidget *wid, KDTimeHeaderWidget* header ) : QToolTip( wid ), _wid(wid),_header (header) {
+ KDTimeHeaderToolTip( TQWidget *wid, KDTimeHeaderWidget* header ) : TQToolTip( wid ), _wid(wid),_header (header) {
};
protected:
- virtual void maybeTip( const QPoint& p)
+ virtual void maybeTip( const TQPoint& p)
{
static bool ishidden = true;
- if (QToolTip::isGloballyEnabled () ) {
+ if (TQToolTip::isGloballyEnabled () ) {
if (ishidden) {
- tip( QRect( p.x(),p.y(),5,5), _header->getToolTipText(p));
+ tip( TQRect( p.x(),p.y(),5,5), _header->getToolTipText(p));
}
else
hide();
@@ -581,7 +581,7 @@ protected:
}
}
private:
- QWidget* _wid;
+ TQWidget* _wid;
KDTimeHeaderWidget * _header;
};
@@ -589,17 +589,17 @@ class KDCanvasToolTip :public QToolTip
{
public:
- KDCanvasToolTip( QWidget *wid, KDGanttCanvasView* canview ) : QToolTip( wid ), _wid(wid),_canview (canview) {
+ KDCanvasToolTip( TQWidget *wid, KDGanttCanvasView* canview ) : TQToolTip( wid ), _wid(wid),_canview (canview) {
};
protected:
- virtual void maybeTip( const QPoint& p)
+ virtual void maybeTip( const TQPoint& p)
{
static bool ishidden = true;
- if (QToolTip::isGloballyEnabled () ) {
+ if (TQToolTip::isGloballyEnabled () ) {
if (ishidden) {
- tip( QRect( p.x()-2,p.y()-2,5,5), _canview->getToolTipText(p));
+ tip( TQRect( p.x()-2,p.y()-2,5,5), _canview->getToolTipText(p));
}
else
hide();
@@ -607,37 +607,37 @@ protected:
}
}
private:
- QWidget* _wid;
+ TQWidget* _wid;
KDGanttCanvasView * _canview;
};
class KDCanvasWhatsThis :public QWhatsThis
{
public:
- KDCanvasWhatsThis( QWidget *wid, KDGanttCanvasView* canview ) : QWhatsThis( wid ), _wid(wid),_canview (canview) { };
+ KDCanvasWhatsThis( TQWidget *wid, KDGanttCanvasView* canview ) : TQWhatsThis( wid ), _wid(wid),_canview (canview) { };
protected:
- virtual QString text( const QPoint& p)
+ virtual TQString text( const TQPoint& p)
{
return _canview->getWhatsThisText(p) ;
}
private:
- QWidget* _wid;
+ TQWidget* _wid;
KDGanttCanvasView * _canview;
};
class KDListViewWhatsThis :public QWhatsThis
{
public:
- KDListViewWhatsThis( QWidget *wid, KDListView* view ) : QWhatsThis( wid ), _wid(wid),_view (view) { };
+ KDListViewWhatsThis( TQWidget *wid, KDListView* view ) : TQWhatsThis( wid ), _wid(wid),_view (view) { };
protected:
- virtual QString text( const QPoint& p)
+ virtual TQString text( const TQPoint& p)
{
return _view->getWhatsThisText(p) ;
}
private:
- QWidget* _wid;
+ TQWidget* _wid;
KDListView * _view;
};
diff --git a/kdgantt/KDGanttViewSummaryItem.cpp b/kdgantt/KDGanttViewSummaryItem.cpp
index a9cf23c6a..d73a27257 100644
--- a/kdgantt/KDGanttViewSummaryItem.cpp
+++ b/kdgantt/KDGanttViewSummaryItem.cpp
@@ -54,8 +54,8 @@
is specified, a unique name will be generated
*/
KDGanttViewSummaryItem::KDGanttViewSummaryItem( KDGanttView* view,
- const QString& lvtext,
- const QString& name ) :
+ const TQString& lvtext,
+ const TQString& name ) :
KDGanttViewItem( Summary, view, lvtext, name )
{
initItem();
@@ -71,8 +71,8 @@ KDGanttViewSummaryItem::KDGanttViewSummaryItem( KDGanttView* view,
is specified, a unique name will be generated
*/
KDGanttViewSummaryItem::KDGanttViewSummaryItem( KDGanttViewItem* parent,
- const QString& lvtext,
- const QString& name ) :
+ const TQString& lvtext,
+ const TQString& name ) :
KDGanttViewItem( Summary, parent, lvtext, name )
{
initItem();
@@ -90,8 +90,8 @@ KDGanttViewSummaryItem::KDGanttViewSummaryItem( KDGanttViewItem* parent,
*/
KDGanttViewSummaryItem::KDGanttViewSummaryItem( KDGanttView* view,
KDGanttViewItem* after,
- const QString& lvtext,
- const QString& name ) :
+ const TQString& lvtext,
+ const TQString& name ) :
KDGanttViewItem( Summary, view, after, lvtext, name )
{
initItem();
@@ -109,8 +109,8 @@ KDGanttViewSummaryItem::KDGanttViewSummaryItem( KDGanttView* view,
*/
KDGanttViewSummaryItem::KDGanttViewSummaryItem( KDGanttViewItem* parent,
KDGanttViewItem* after,
- const QString& lvtext,
- const QString& name ) :
+ const TQString& lvtext,
+ const TQString& name ) :
KDGanttViewItem( Summary, parent, after, lvtext, name )
{
@@ -135,7 +135,7 @@ KDGanttViewSummaryItem::~KDGanttViewSummaryItem()
\param dateTime the middle time
\sa middleTime()
*/
-void KDGanttViewSummaryItem::setMiddleTime( const QDateTime& dateTime )
+void KDGanttViewSummaryItem::setMiddleTime( const TQDateTime& dateTime )
{
if (! dateTime.isValid() ) {
qDebug("KDGanttViewSummaryItem::setMiddleTime():Invalid parameter-no time set");
@@ -158,7 +158,7 @@ void KDGanttViewSummaryItem::setMiddleTime( const QDateTime& dateTime )
\return the middle time of this summary item.
If there is no middle time defined, the start time is returned.
*/
-QDateTime KDGanttViewSummaryItem::middleTime() const
+TQDateTime KDGanttViewSummaryItem::middleTime() const
{
if(myMiddleTime)
return *myMiddleTime;
@@ -174,7 +174,7 @@ QDateTime KDGanttViewSummaryItem::middleTime() const
\param end the end time
\sa endTime(), setStartTime(), startTime()
*/
-void KDGanttViewSummaryItem::setEndTime( const QDateTime& end )
+void KDGanttViewSummaryItem::setEndTime( const TQDateTime& end )
{
if (! end.isValid() ) {
qDebug("KDGanttViewSummaryItem::setEndTime():Invalid parameter-no time set");
@@ -197,7 +197,7 @@ void KDGanttViewSummaryItem::setEndTime( const QDateTime& end )
\param start the start time
\sa startTime(), setEndTime(), endTime()
*/
-void KDGanttViewSummaryItem::setStartTime( const QDateTime& start )
+void KDGanttViewSummaryItem::setStartTime( const TQDateTime& start )
{
if (! start.isValid() ) {
qDebug("KDGanttViewSummaryItem::setStartTime():Invalid parameter-no time set");
@@ -221,7 +221,7 @@ void KDGanttViewSummaryItem::setStartTime( const QDateTime& start )
\sa actualEndTime()
startTime()
*/
-void KDGanttViewSummaryItem::setActualEndTime( const QDateTime& end )
+void KDGanttViewSummaryItem::setActualEndTime( const TQDateTime& end )
{
if (!myActualEndTime) myActualEndTime = new QDateTime;
*myActualEndTime = end;
@@ -238,7 +238,7 @@ void KDGanttViewSummaryItem::setActualEndTime( const QDateTime& end )
\sa setActualEndTime()
*/
-QDateTime KDGanttViewSummaryItem::actualEndTime() const
+TQDateTime KDGanttViewSummaryItem::actualEndTime() const
{
if(myActualEndTime)
return *myActualEndTime;
diff --git a/kdgantt/KDGanttViewSummaryItem.h b/kdgantt/KDGanttViewSummaryItem.h
index e8fcd6186..6102dbff9 100644
--- a/kdgantt/KDGanttViewSummaryItem.h
+++ b/kdgantt/KDGanttViewSummaryItem.h
@@ -41,28 +41,28 @@ class KDGanttViewSummaryItem : public KDGanttViewItem
{
public:
KDGanttViewSummaryItem( KDGanttView* view,
- const QString& lvtext = QString::null,
- const QString& name = QString::null );
+ const TQString& lvtext = TQString::null,
+ const TQString& name = TQString::null );
KDGanttViewSummaryItem( KDGanttViewItem* parent,
- const QString& lvtext = QString::null,
- const QString& name = QString::null );
+ const TQString& lvtext = TQString::null,
+ const TQString& name = TQString::null );
KDGanttViewSummaryItem( KDGanttView* view, KDGanttViewItem* after,
- const QString& lvtext = QString::null,
- const QString& name = QString::null );
+ const TQString& lvtext = TQString::null,
+ const TQString& name = TQString::null );
KDGanttViewSummaryItem( KDGanttViewItem* parent, KDGanttViewItem* after,
- const QString& lvtext = QString::null,
- const QString& name = QString::null );
+ const TQString& lvtext = TQString::null,
+ const TQString& name = TQString::null );
virtual ~KDGanttViewSummaryItem();
- void setMiddleTime( const QDateTime& );
- QDateTime middleTime() const;
- void setActualEndTime( const QDateTime& end );
- QDateTime actualEndTime() const;
- void setStartTime( const QDateTime& start );
- void setEndTime( const QDateTime& end );
+ void setMiddleTime( const TQDateTime& );
+ TQDateTime middleTime() const;
+ void setActualEndTime( const TQDateTime& end );
+ TQDateTime actualEndTime() const;
+ void setStartTime( const TQDateTime& start );
+ void setEndTime( const TQDateTime& end );
private:
void showItem( bool show = true, int coordY = 0 );
- QDateTime* myActualEndTime,*myMiddleTime;
+ TQDateTime* myActualEndTime,*myMiddleTime;
void initItem();
void hideMe();
diff --git a/kdgantt/KDGanttViewTaskItem.cpp b/kdgantt/KDGanttViewTaskItem.cpp
index a9f1bec96..1bcb96a65 100644
--- a/kdgantt/KDGanttViewTaskItem.cpp
+++ b/kdgantt/KDGanttViewTaskItem.cpp
@@ -67,8 +67,8 @@
is specified, a unique name will be generated
*/
KDGanttViewTaskItem::KDGanttViewTaskItem( KDGanttView* view,
- const QString& lvtext,
- const QString& name ) :
+ const TQString& lvtext,
+ const TQString& name ) :
KDGanttViewItem( Task, view, lvtext, name )
{
@@ -85,8 +85,8 @@ KDGanttViewTaskItem::KDGanttViewTaskItem( KDGanttView* view,
is specified, a unique name will be generated
*/
KDGanttViewTaskItem::KDGanttViewTaskItem( KDGanttViewItem* parent,
- const QString& lvtext,
- const QString& name ) :
+ const TQString& lvtext,
+ const TQString& name ) :
KDGanttViewItem( Task, parent, lvtext, name )
{
initItem();
@@ -104,8 +104,8 @@ KDGanttViewTaskItem::KDGanttViewTaskItem( KDGanttViewItem* parent,
*/
KDGanttViewTaskItem::KDGanttViewTaskItem( KDGanttView* view,
KDGanttViewItem* after,
- const QString& lvtext,
- const QString& name ) :
+ const TQString& lvtext,
+ const TQString& name ) :
KDGanttViewItem( Task, view, after, lvtext, name )
{
initItem();
@@ -123,8 +123,8 @@ KDGanttViewTaskItem::KDGanttViewTaskItem( KDGanttView* view,
*/
KDGanttViewTaskItem::KDGanttViewTaskItem( KDGanttViewItem* parent,
KDGanttViewItem* after,
- const QString& lvtext,
- const QString& name ) :
+ const TQString& lvtext,
+ const TQString& name ) :
KDGanttViewItem( Task, parent, after, lvtext, name )
{
initItem();
@@ -149,7 +149,7 @@ KDGanttViewTaskItem::~KDGanttViewTaskItem()
\param end the end time
\sa setStartTime(), startTime(), endTime()
*/
-void KDGanttViewTaskItem::setEndTime( const QDateTime& end )
+void KDGanttViewTaskItem::setEndTime( const TQDateTime& end )
{
myEndTime = end;
if ( myEndTime < startTime() )
@@ -168,7 +168,7 @@ void KDGanttViewTaskItem::setEndTime( const QDateTime& end )
\param start the start time
\sa startTime(), setEndTime(), endTime()
*/
-void KDGanttViewTaskItem::setStartTime( const QDateTime& start )
+void KDGanttViewTaskItem::setStartTime( const TQDateTime& start )
{
if (! start.isValid() ) {
qDebug("KDGanttViewTaskItem::setStartTime():Invalid parameter-no time set");
@@ -248,8 +248,8 @@ void KDGanttViewTaskItem::showItem(bool show, int coordY)
if ( par )
hei = par->height();
}
- if (myGanttView->myListView->itemAt( QPoint(2, allY)))
- hei = myGanttView->myListView->itemAt( QPoint(2, allY))->height();
+ if (myGanttView->myListView->itemAt( TQPoint(2, allY)))
+ hei = myGanttView->myListView->itemAt( TQPoint(2, allY))->height();
if ( takedefaultHeight )
hei = 16;
if ( myStartTime == myEndTime ) {
@@ -281,12 +281,12 @@ void KDGanttViewTaskItem::showItem(bool show, int coordY)
temp->show();
if (progX > 0) {
// FIXME: For now, just use inverted color for progress
- QColor c = temp->brush().color();
+ TQColor c = temp->brush().color();
int h, s, v;
c.getHsv(&h, &s, &v);
h > 359/2 ? h -= 359/2 : h += 359/2;
c.setHsv(h, s, v);
- progtemp->setBrush(QBrush(c));
+ progtemp->setBrush(TQBrush(c));
progtemp->setSize(progX, hei-3);
progtemp->move(temp->x(), temp->y());
@@ -296,9 +296,9 @@ void KDGanttViewTaskItem::showItem(bool show, int coordY)
KDCanvasRectangle* floatStartTemp = (KDCanvasRectangle*) floatStartShape;
int floatStartX = myGanttView->myTimeHeader->getCoordX(myFloatStartTime);
// FIXME: Configurable colors
- QBrush b(temp->brush().color(), Dense4Pattern);
+ TQBrush b(temp->brush().color(), Dense4Pattern);
floatStartTemp->setBrush(b);
- floatStartTemp->setPen(QPen(gray));
+ floatStartTemp->setPen(TQPen(gray));
if (floatStartX < startX) {
floatStartTemp->setSize(startX - floatStartX, temp->size().height()/2);
floatStartTemp->move(floatStartX, temp->y() + temp->size().height()/4);
@@ -312,9 +312,9 @@ void KDGanttViewTaskItem::showItem(bool show, int coordY)
KDCanvasRectangle* floatEndTemp = (KDCanvasRectangle*) floatEndShape;
int floatEndX = myGanttView->myTimeHeader->getCoordX(myFloatEndTime);
// FIXME: Configurable colors
- QBrush b(temp->brush().color(), Dense4Pattern);
+ TQBrush b(temp->brush().color(), Dense4Pattern);
floatEndTemp->setBrush(b);
- floatEndTemp->setPen(QPen(gray));
+ floatEndTemp->setPen(TQPen(gray));
int ex = startX + temp->size().width();
if (floatEndX > ex) {
floatEndTemp->setSize(floatEndX - ex, temp->size().height()/2);
@@ -335,7 +335,7 @@ void KDGanttViewTaskItem::showItem(bool show, int coordY)
textCanvas->hide();
else {
textCanvas->move(startX+3, allY-textCanvas->boundingRect().height()/2);
- QString temp = textCanvasText;
+ TQString temp = textCanvasText;
textCanvas->setText(temp);
int len = temp.length();
while ( textCanvas->boundingRect().width() > wid ) {
diff --git a/kdgantt/KDGanttViewTaskItem.h b/kdgantt/KDGanttViewTaskItem.h
index d4a73cf06..63b4678e2 100644
--- a/kdgantt/KDGanttViewTaskItem.h
+++ b/kdgantt/KDGanttViewTaskItem.h
@@ -44,21 +44,21 @@ class KDGanttViewTaskItem : public KDGanttViewItem
{
public:
KDGanttViewTaskItem( KDGanttView* view,
- const QString& lvtext = QString::null,
- const QString& name = QString::null );
+ const TQString& lvtext = TQString::null,
+ const TQString& name = TQString::null );
KDGanttViewTaskItem( KDGanttViewItem* parent,
- const QString& lvtext = QString::null,
- const QString& name = QString::null );
+ const TQString& lvtext = TQString::null,
+ const TQString& name = TQString::null );
KDGanttViewTaskItem( KDGanttView* view, KDGanttViewItem* after,
- const QString& lvtext = QString::null,
- const QString& name = QString::null );
+ const TQString& lvtext = TQString::null,
+ const TQString& name = TQString::null );
KDGanttViewTaskItem( KDGanttViewItem* parent, KDGanttViewItem* after,
- const QString& lvtext = QString::null,
- const QString& name = QString::null );
+ const TQString& lvtext = TQString::null,
+ const TQString& name = TQString::null );
virtual ~KDGanttViewTaskItem();
- void setStartTime( const QDateTime& start );
- void setEndTime( const QDateTime& end );
+ void setStartTime( const TQDateTime& start );
+ void setEndTime( const TQDateTime& end );
protected:
void showItem( bool show = true, int coordY = 0 );
@@ -66,7 +66,7 @@ protected:
private:
void initItem();
void hideMe();
- QBrush myBrush, undefinedBrush;
+ TQBrush myBrush, undefinedBrush;
bool _showUndefinedBrush;
};
diff --git a/kdgantt/KDGanttViewTaskLink.cpp b/kdgantt/KDGanttViewTaskLink.cpp
index 22a50b8ab..2f5ca479f 100644
--- a/kdgantt/KDGanttViewTaskLink.cpp
+++ b/kdgantt/KDGanttViewTaskLink.cpp
@@ -62,8 +62,8 @@
\param to the target items
\param type the link type for the connection
*/
-KDGanttViewTaskLink::KDGanttViewTaskLink( QPtrList<KDGanttViewItem> from,
- QPtrList<KDGanttViewItem> to,
+KDGanttViewTaskLink::KDGanttViewTaskLink( TQPtrList<KDGanttViewItem> from,
+ TQPtrList<KDGanttViewItem> to,
LinkType type )
{
fromList= from;
@@ -109,8 +109,8 @@ KDGanttViewTaskLink::KDGanttViewTaskLink( KDGanttViewItem* from,
*/
KDGanttViewTaskLink::KDGanttViewTaskLink( KDGanttViewTaskLinkGroup* group,
- QPtrList<KDGanttViewItem> from,
- QPtrList<KDGanttViewItem> to,
+ TQPtrList<KDGanttViewItem> from,
+ TQPtrList<KDGanttViewItem> to,
LinkType type )
{
fromList = from;
@@ -166,14 +166,14 @@ KDGanttViewTaskLink::~KDGanttViewTaskLink( )
void KDGanttViewTaskLink::initTaskLink()
{
- horLineList = new QPtrList<KDCanvasLine>;
- verLineList = new QPtrList<KDCanvasLine>;
- horLineList2 = new QPtrList<KDCanvasLine>;
- verLineList2 = new QPtrList<KDCanvasLine>;
- horLineList3 = new QPtrList<KDCanvasLine>;
- topList = new QPtrList<KDCanvasPolygon>;
- topLeftList = new QPtrList<KDCanvasPolygon>;
- topRightList = new QPtrList<KDCanvasPolygon>;
+ horLineList = new TQPtrList<KDCanvasLine>;
+ verLineList = new TQPtrList<KDCanvasLine>;
+ horLineList2 = new TQPtrList<KDCanvasLine>;
+ verLineList2 = new TQPtrList<KDCanvasLine>;
+ horLineList3 = new TQPtrList<KDCanvasLine>;
+ topList = new TQPtrList<KDCanvasPolygon>;
+ topLeftList = new TQPtrList<KDCanvasPolygon>;
+ topRightList = new TQPtrList<KDCanvasPolygon>;
horLineList->setAutoDelete( true );
verLineList->setAutoDelete( true );
horLineList2->setAutoDelete( true );
@@ -200,7 +200,7 @@ void KDGanttViewTaskLink::initTaskLink()
top = new KDCanvasPolygon(myTimeTable,this,Type_is_KDGanttTaskLink);
topLeft = new KDCanvasPolygon(myTimeTable,this,Type_is_KDGanttTaskLink);
topRight = new KDCanvasPolygon(myTimeTable,this,Type_is_KDGanttTaskLink);
- QPointArray arr = QPointArray(3);
+ TQPointArray arr = TQPointArray(3);
arr.setPoint(0,-4,-5);
arr.setPoint(1,4,-5);
arr.setPoint(2,0,0);
@@ -265,8 +265,8 @@ void KDGanttViewTaskLink::showMe( bool visible )
isvisible = visible;
int wid = 1;
- QPen p;
- QBrush b;
+ TQPen p;
+ TQBrush b;
p.setWidth(wid);
b.setStyle(Qt::SolidPattern);
if (ishighlighted) {
@@ -277,17 +277,17 @@ void KDGanttViewTaskLink::showMe( bool visible )
b.setColor(myColor);
p.setColor(myColor);
}
- QPoint start, end;
- QPtrListIterator<KDCanvasLine> horIt(*horLineList);
- QPtrListIterator<KDCanvasLine> verIt(*verLineList);
- QPtrListIterator<KDCanvasPolygon> topIt(*topList);
- QPtrListIterator<KDGanttViewItem> fromIt(fromList);
- QPtrListIterator<KDGanttViewItem> toIt(toList);
+ TQPoint start, end;
+ TQPtrListIterator<KDCanvasLine> horIt(*horLineList);
+ TQPtrListIterator<KDCanvasLine> verIt(*verLineList);
+ TQPtrListIterator<KDCanvasPolygon> topIt(*topList);
+ TQPtrListIterator<KDGanttViewItem> fromIt(fromList);
+ TQPtrListIterator<KDGanttViewItem> toIt(toList);
for ( ; fromIt.current(); ++fromIt ) {
- (*fromIt)->setTextOffset(QPoint(0,0));
+ (*fromIt)->setTextOffset(TQPoint(0,0));
toIt.toFirst();
for ( ; toIt.current(); ++toIt ) {
- (*toIt)->setTextOffset(QPoint(0,0));
+ (*toIt)->setTextOffset(TQPoint(0,0));
if (!isvisible || ! (*fromIt)->isVisibleInGanttView || !(*toIt)->isVisibleInGanttView || !myTimeTable->taskLinksVisible) {
(*horIt)->hide();
(*verIt)->hide();
@@ -330,8 +330,8 @@ void KDGanttViewTaskLink::showMeType( bool visible )
hide();
isvisible = visible;
int wid = 1;
- QPen p;
- QBrush b;
+ TQPen p;
+ TQBrush b;
p.setWidth(wid);
b.setStyle(Qt::SolidPattern);
if (ishighlighted) {
@@ -342,19 +342,19 @@ void KDGanttViewTaskLink::showMeType( bool visible )
b.setColor(myColor);
p.setColor(myColor);
}
- QPoint start, end;
- QPtrListIterator<KDCanvasLine> horIt(*horLineList);
- QPtrListIterator<KDCanvasLine> verIt(*verLineList);
- QPtrListIterator<KDCanvasLine> horIt2(*horLineList2);
- QPtrListIterator<KDCanvasLine> verIt2(*verLineList2);
- QPtrListIterator<KDCanvasLine> horIt3(*horLineList3);
- QPtrListIterator<KDCanvasPolygon> topIt(*topList);
- QPtrListIterator<KDCanvasPolygon> topLeftIt(*topLeftList);
- QPtrListIterator<KDCanvasPolygon> topRightIt(*topRightList);
- QPtrListIterator<KDGanttViewItem> fromIt(fromList);
- QPtrListIterator<KDGanttViewItem> toIt(toList);
+ TQPoint start, end;
+ TQPtrListIterator<KDCanvasLine> horIt(*horLineList);
+ TQPtrListIterator<KDCanvasLine> verIt(*verLineList);
+ TQPtrListIterator<KDCanvasLine> horIt2(*horLineList2);
+ TQPtrListIterator<KDCanvasLine> verIt2(*verLineList2);
+ TQPtrListIterator<KDCanvasLine> horIt3(*horLineList3);
+ TQPtrListIterator<KDCanvasPolygon> topIt(*topList);
+ TQPtrListIterator<KDCanvasPolygon> topLeftIt(*topLeftList);
+ TQPtrListIterator<KDCanvasPolygon> topRightIt(*topRightList);
+ TQPtrListIterator<KDGanttViewItem> fromIt(fromList);
+ TQPtrListIterator<KDGanttViewItem> toIt(toList);
for ( ; fromIt.current(); ++fromIt ) {
- (*fromIt)->setTextOffset(QPoint(30,0));
+ (*fromIt)->setTextOffset(TQPoint(30,0));
(*fromIt)->moveTextCanvas();
toIt.toFirst();
for ( ; toIt.current(); ++toIt ) {
@@ -368,12 +368,12 @@ void KDGanttViewTaskLink::showMeType( bool visible )
(*topIt)->setBrush(b);
(*topLeftIt)->setBrush(b);
(*topRightIt)->setBrush(b);
- (*toIt)->setTextOffset(QPoint(30,0));
+ (*toIt)->setTextOffset(TQPoint(30,0));
(*toIt)->moveTextCanvas();
switch (linkType()) {
case StartStart: {
start = (*fromIt)->middleLeft();
- end = (*toIt)->middleLeft()-QPoint(12,0);
+ end = (*toIt)->middleLeft()-TQPoint(12,0);
bool down = start.y() < end.y();
(*horIt)->setPoints(start.x()-xOffset(*fromIt),start.y(),
start.x()-10, start.y());
@@ -401,7 +401,7 @@ void KDGanttViewTaskLink::showMeType( bool visible )
}
case FinishFinish: {
start = (*fromIt)->middleRight();
- end = (*toIt)->middleRight()+QPoint(12,0);
+ end = (*toIt)->middleRight()+TQPoint(12,0);
bool down = start.y() < end.y();
(*horIt)->setPoints(start.x()+xOffset(*fromIt),start.y(),
start.x()+10, start.y());
@@ -429,7 +429,7 @@ void KDGanttViewTaskLink::showMeType( bool visible )
}
case FinishStart: {
start = (*fromIt)->middleRight();
- end = (*toIt)->middleLeft() - QPoint(12,0);
+ end = (*toIt)->middleLeft() - TQPoint(12,0);
bool down = start.y() < end.y();
(*horIt)->setPoints(start.x()+xOffset(*fromIt),start.y(),
start.x()+10,start.y());
@@ -459,7 +459,7 @@ void KDGanttViewTaskLink::showMeType( bool visible )
}
case StartFinish: {
start = (*fromIt)->middleRight();
- end = (*toIt)->middleRight()+QPoint(12,0);
+ end = (*toIt)->middleRight()+TQPoint(12,0);
bool down = start.y() < end.y();
(*horIt)->setPoints(start.x()+xOffset(*fromIt),start.y(),
start.x()+10, start.y());
@@ -589,7 +589,7 @@ bool KDGanttViewTaskLink::highlight() const
\param color the color to draw this task link in
\sa color()
*/
-void KDGanttViewTaskLink::setColor( const QColor& color )
+void KDGanttViewTaskLink::setColor( const TQColor& color )
{
myColor = color;
//if ( isvisible) setVisible(true );
@@ -603,7 +603,7 @@ void KDGanttViewTaskLink::setColor( const QColor& color )
\return the color in which this task link is drawn
\sa setColor()
*/
-QColor KDGanttViewTaskLink::color() const
+TQColor KDGanttViewTaskLink::color() const
{
return myColor;
}
@@ -615,7 +615,7 @@ QColor KDGanttViewTaskLink::color() const
\param color the highlight color to draw this task link in
\sa highlightColor()
*/
-void KDGanttViewTaskLink::setHighlightColor( const QColor& color )
+void KDGanttViewTaskLink::setHighlightColor( const TQColor& color )
{
myColorHL = color;
//if ( isvisible) setVisible(true );
@@ -629,7 +629,7 @@ void KDGanttViewTaskLink::setHighlightColor( const QColor& color )
\return the highlight color in which this task link is drawn
\sa setHighlightColor()
*/
-QColor KDGanttViewTaskLink::highlightColor() const
+TQColor KDGanttViewTaskLink::highlightColor() const
{
return myColorHL;
}
@@ -641,7 +641,7 @@ QColor KDGanttViewTaskLink::highlightColor() const
\param text the tooltip text
\sa tooltipText()
*/
-void KDGanttViewTaskLink::setTooltipText( const QString& text )
+void KDGanttViewTaskLink::setTooltipText( const TQString& text )
{
myToolTipText = text;
}
@@ -653,7 +653,7 @@ void KDGanttViewTaskLink::setTooltipText( const QString& text )
\return the tooltip text of this task link
\sa setTooltipText()
*/
-QString KDGanttViewTaskLink::tooltipText() const
+TQString KDGanttViewTaskLink::tooltipText() const
{
return myToolTipText;
}
@@ -665,7 +665,7 @@ QString KDGanttViewTaskLink::tooltipText() const
\param text the what's this text
\sa whatsThisText()
*/
-void KDGanttViewTaskLink::setWhatsThisText( const QString& text )
+void KDGanttViewTaskLink::setWhatsThisText( const TQString& text )
{
myWhatsThisText = text;
@@ -678,7 +678,7 @@ void KDGanttViewTaskLink::setWhatsThisText( const QString& text )
\return the what's this text of this task link
\sa setWhatsThisText()
*/
-QString KDGanttViewTaskLink::whatsThisText() const
+TQString KDGanttViewTaskLink::whatsThisText() const
{
return myWhatsThisText;
}
@@ -690,7 +690,7 @@ QString KDGanttViewTaskLink::whatsThisText() const
\return the ist of source item of this task link
\sa to()
*/
-QPtrList<KDGanttViewItem> KDGanttViewTaskLink::from() const
+TQPtrList<KDGanttViewItem> KDGanttViewTaskLink::from() const
{
return fromList;
}
@@ -722,7 +722,7 @@ void KDGanttViewTaskLink::removeItemFromList( KDGanttViewItem* item )
\return the list of target item of this task link
\sa from()
*/
-QPtrList<KDGanttViewItem> KDGanttViewTaskLink::to() const
+TQPtrList<KDGanttViewItem> KDGanttViewTaskLink::to() const
{
return toList;
}
@@ -734,23 +734,23 @@ QPtrList<KDGanttViewItem> KDGanttViewTaskLink::to() const
\param doc the DOM document to which the node belongs
\param parentElement the element into which to insert this node
*/
-void KDGanttViewTaskLink::createNode( QDomDocument& doc,
- QDomElement& parentElement )
+void KDGanttViewTaskLink::createNode( TQDomDocument& doc,
+ TQDomElement& parentElement )
{
- QDomElement taskLinkElement = doc.createElement( "TaskLink" );
+ TQDomElement taskLinkElement = doc.createElement( "TaskLink" );
parentElement.appendChild( taskLinkElement );
- QDomElement fromItemsElement = doc.createElement( "FromItems" );
+ TQDomElement fromItemsElement = doc.createElement( "FromItems" );
taskLinkElement.appendChild( fromItemsElement );
- QPtrList<KDGanttViewItem> fromList = from();
+ TQPtrList<KDGanttViewItem> fromList = from();
KDGanttViewItem* item;
for( item = fromList.first(); item;
item = fromList.next() )
KDGanttXML::createStringNode( doc, fromItemsElement, "Item", item->name() );
- QDomElement toItemsElement = doc.createElement( "ToItems" );
+ TQDomElement toItemsElement = doc.createElement( "ToItems" );
taskLinkElement.appendChild( toItemsElement );
- QPtrList<KDGanttViewItem> toList = to();
+ TQPtrList<KDGanttViewItem> toList = to();
for( item = toList.first(); item;
item = toList.next() )
KDGanttXML::createStringNode( doc, toItemsElement, "Item", item->name() );
@@ -780,26 +780,26 @@ void KDGanttViewTaskLink::createNode( QDomDocument& doc,
\param element the DOM element from which to read the specification
\return the newly created task link
*/
-KDGanttViewTaskLink* KDGanttViewTaskLink::createFromDomElement( QDomElement& element )
+KDGanttViewTaskLink* KDGanttViewTaskLink::createFromDomElement( TQDomElement& element )
{
- QDomNode node = element.firstChild();
- QStringList fromList, toList;
+ TQDomNode node = element.firstChild();
+ TQStringList fromList, toList;
bool highlight = false, visible = false;
- QColor color, highlightColor;
- QString tooltipText, whatsThisText, group;
+ TQColor color, highlightColor;
+ TQString tooltipText, whatsThisText, group;
LinkType linktype=None;
while( !node.isNull() ) {
- QDomElement element = node.toElement();
+ TQDomElement element = node.toElement();
if( !element.isNull() ) { // was really an element
- QString tagName = element.tagName();
+ TQString tagName = element.tagName();
if( tagName == "FromItems" ) {
- QDomNode node = element.firstChild();
+ TQDomNode node = element.firstChild();
while( !node.isNull() ) {
- QDomElement element = node.toElement();
+ TQDomElement element = node.toElement();
if( !element.isNull() ) { // was really an element
- QString tagName = element.tagName();
+ TQString tagName = element.tagName();
if( tagName == "Item" ) {
- QString value;
+ TQString value;
if( KDGanttXML::readStringNode( element, value ) )
fromList << value;
} else {
@@ -810,13 +810,13 @@ KDGanttViewTaskLink* KDGanttViewTaskLink::createFromDomElement( QDomElement& ele
node = node.nextSibling();
}
} else if( tagName == "ToItems" ) {
- QDomNode node = element.firstChild();
+ TQDomNode node = element.firstChild();
while( !node.isNull() ) {
- QDomElement element = node.toElement();
+ TQDomElement element = node.toElement();
if( !element.isNull() ) { // was really an element
- QString tagName = element.tagName();
+ TQString tagName = element.tagName();
if( tagName == "Item" ) {
- QString value;
+ TQString value;
if( KDGanttXML::readStringNode( element, value ) )
toList << value;
} else {
@@ -835,27 +835,27 @@ KDGanttViewTaskLink* KDGanttViewTaskLink::createFromDomElement( QDomElement& ele
if( KDGanttXML::readBoolNode( element, value ) )
visible = value;
} else if( tagName == "Color" ) {
- QColor value;
+ TQColor value;
if( KDGanttXML::readColorNode( element, value ) )
color = value;
} else if( tagName == "HighlightColor" ) {
- QColor value;
+ TQColor value;
if( KDGanttXML::readColorNode( element, value ) )
highlightColor = value;
} else if( tagName == "TooltipText" ) {
- QString value;
+ TQString value;
if( KDGanttXML::readStringNode( element, value ) )
tooltipText = value;
} else if( tagName == "WhatsThisText" ) {
- QString value;
+ TQString value;
if( KDGanttXML::readStringNode( element, value ) )
whatsThisText = value;
} else if( tagName == "Group" ) {
- QString value;
+ TQString value;
if( KDGanttXML::readStringNode( element, value ) )
group = value;
} else if( tagName == "Linktype" ) {
- QString value;
+ TQString value;
if( KDGanttXML::readStringNode( element, value ) )
linktype = stringToLinkType( value );
} else {
@@ -866,15 +866,15 @@ KDGanttViewTaskLink* KDGanttViewTaskLink::createFromDomElement( QDomElement& ele
node = node.nextSibling();
}
- QPtrList<KDGanttViewItem> fromItemList;
- QPtrList<KDGanttViewItem> toItemList;
- for( QStringList::const_iterator fromIt = fromList.begin();
+ TQPtrList<KDGanttViewItem> fromItemList;
+ TQPtrList<KDGanttViewItem> toItemList;
+ for( TQStringList::const_iterator fromIt = fromList.begin();
fromIt != fromList.end(); ++fromIt ) {
KDGanttViewItem* item = KDGanttViewItem::find( *fromIt );
if( item )
fromItemList.append( item );
}
- for( QStringList::const_iterator toIt = toList.begin();
+ for( TQStringList::const_iterator toIt = toList.begin();
toIt != toList.end(); ++toIt ) {
KDGanttViewItem* item = KDGanttViewItem::find( *toIt );
if( item )
@@ -935,16 +935,16 @@ int KDGanttViewTaskLink::xOffset(KDGanttViewItem *item)
void KDGanttViewTaskLink::hide()
{
- QPtrListIterator<KDCanvasLine> horIt(*horLineList);
- QPtrListIterator<KDCanvasLine> verIt(*verLineList);
- QPtrListIterator<KDCanvasLine> horIt2(*horLineList2);
- QPtrListIterator<KDCanvasLine> verIt2(*verLineList2);
- QPtrListIterator<KDCanvasLine> horIt3(*horLineList3);
- QPtrListIterator<KDCanvasPolygon> topIt(*topList);
- QPtrListIterator<KDCanvasPolygon> topLeftIt(*topLeftList);
- QPtrListIterator<KDCanvasPolygon> topRightIt(*topRightList);
- QPtrListIterator<KDGanttViewItem> fromIt(fromList);
- QPtrListIterator<KDGanttViewItem> toIt(toList);
+ TQPtrListIterator<KDCanvasLine> horIt(*horLineList);
+ TQPtrListIterator<KDCanvasLine> verIt(*verLineList);
+ TQPtrListIterator<KDCanvasLine> horIt2(*horLineList2);
+ TQPtrListIterator<KDCanvasLine> verIt2(*verLineList2);
+ TQPtrListIterator<KDCanvasLine> horIt3(*horLineList3);
+ TQPtrListIterator<KDCanvasPolygon> topIt(*topList);
+ TQPtrListIterator<KDCanvasPolygon> topLeftIt(*topLeftList);
+ TQPtrListIterator<KDCanvasPolygon> topRightIt(*topRightList);
+ TQPtrListIterator<KDGanttViewItem> fromIt(fromList);
+ TQPtrListIterator<KDGanttViewItem> toIt(toList);
for ( ; fromIt.current(); ++fromIt ) {
toIt.toFirst();
for ( ; toIt.current(); ++toIt ) {
@@ -968,7 +968,7 @@ void KDGanttViewTaskLink::hide()
}
}
-QString KDGanttViewTaskLink::linkTypeToString( LinkType type )
+TQString KDGanttViewTaskLink::linkTypeToString( LinkType type )
{
switch( type ) {
case None:
@@ -992,7 +992,7 @@ QString KDGanttViewTaskLink::linkTypeToString( LinkType type )
return "";
}
-KDGanttViewTaskLink::LinkType KDGanttViewTaskLink::stringToLinkType( const QString type )
+KDGanttViewTaskLink::LinkType KDGanttViewTaskLink::stringToLinkType( const TQString type )
{
if (type == "FinishStart")
return FinishStart;
diff --git a/kdgantt/KDGanttViewTaskLink.h b/kdgantt/KDGanttViewTaskLink.h
index efafb50fd..40f6660f6 100644
--- a/kdgantt/KDGanttViewTaskLink.h
+++ b/kdgantt/KDGanttViewTaskLink.h
@@ -35,10 +35,10 @@
#ifndef KDGANTTVIEWTASKLINK_H
#define KDGANTTVIEWTASKLINK_H
-#include <qcolor.h>
-#include <qstring.h>
-#include <qptrlist.h>
-#include <qcanvas.h>
+#include <tqcolor.h>
+#include <tqstring.h>
+#include <tqptrlist.h>
+#include <tqcanvas.h>
#include "KDGanttViewItem.h"
class KDGanttViewTaskLinkGroup;
@@ -50,12 +50,12 @@ class KDGanttViewTaskLink
public:
enum LinkType { None, FinishStart, StartStart, FinishFinish, StartFinish };
- KDGanttViewTaskLink( QPtrList<KDGanttViewItem> from,
- QPtrList<KDGanttViewItem> to,
+ KDGanttViewTaskLink( TQPtrList<KDGanttViewItem> from,
+ TQPtrList<KDGanttViewItem> to,
LinkType type=None );
KDGanttViewTaskLink( KDGanttViewTaskLinkGroup* group,
- QPtrList<KDGanttViewItem> from,
- QPtrList<KDGanttViewItem> to,
+ TQPtrList<KDGanttViewItem> from,
+ TQPtrList<KDGanttViewItem> to,
LinkType type=None );
KDGanttViewTaskLink( KDGanttViewTaskLinkGroup* group,
KDGanttViewItem* from,
@@ -65,8 +65,8 @@ public:
KDGanttViewItem* to,
LinkType type=None );
~KDGanttViewTaskLink();
- QPtrList<KDGanttViewItem> from() const;
- QPtrList<KDGanttViewItem> to() const;
+ TQPtrList<KDGanttViewItem> from() const;
+ TQPtrList<KDGanttViewItem> to() const;
void removeItemFromList( KDGanttViewItem* );
void setVisible( bool );
@@ -78,19 +78,19 @@ public:
void setHighlight( bool highlight );
bool highlight() const;
- void setColor( const QColor& color );
- QColor color() const;
- void setHighlightColor( const QColor& color );
- QColor highlightColor() const;
+ void setColor( const TQColor& color );
+ TQColor color() const;
+ void setHighlightColor( const TQColor& color );
+ TQColor highlightColor() const;
- void setTooltipText( const QString& text );
- QString tooltipText() const;
- void setWhatsThisText( const QString& text );
- QString whatsThisText() const;
+ void setTooltipText( const TQString& text );
+ TQString tooltipText() const;
+ void setWhatsThisText( const TQString& text );
+ TQString whatsThisText() const;
- void createNode( QDomDocument& doc,
- QDomElement& parentElement );
- static KDGanttViewTaskLink* createFromDomElement( QDomElement& );
+ void createNode( TQDomDocument& doc,
+ TQDomElement& parentElement );
+ static KDGanttViewTaskLink* createFromDomElement( TQDomElement& );
int linkType();
void setLinkType(int type);
@@ -98,22 +98,22 @@ public:
private:
friend class KDGanttViewTaskLinkGroup;
friend class KDTimeTableWidget;
- QPtrList<KDGanttViewItem> fromList,toList;
- QPtrList<KDCanvasLine>* horLineList;
- QPtrList<KDCanvasLine>* verLineList;
- QPtrList<KDCanvasPolygon>* topList;
+ TQPtrList<KDGanttViewItem> fromList,toList;
+ TQPtrList<KDCanvasLine>* horLineList;
+ TQPtrList<KDCanvasLine>* verLineList;
+ TQPtrList<KDCanvasPolygon>* topList;
// also used when linkType != None
- QPtrList<KDCanvasLine>* horLineList2;
- QPtrList<KDCanvasLine>* verLineList2;
- QPtrList<KDCanvasLine>* horLineList3;
- QPtrList<KDCanvasPolygon>* topLeftList;
- QPtrList<KDCanvasPolygon>* topRightList;
+ TQPtrList<KDCanvasLine>* horLineList2;
+ TQPtrList<KDCanvasLine>* verLineList2;
+ TQPtrList<KDCanvasLine>* horLineList3;
+ TQPtrList<KDCanvasPolygon>* topLeftList;
+ TQPtrList<KDCanvasPolygon>* topRightList;
KDGanttViewTaskLinkGroup* myGroup;
bool isvisible,ishighlighted;
- QColor myColor, myColorHL;
- QString myToolTipText,myWhatsThisText;
+ TQColor myColor, myColorHL;
+ TQString myToolTipText,myWhatsThisText;
KDTimeTableWidget* myTimeTable;
void initTaskLink();
void showMe( bool );
@@ -122,8 +122,8 @@ private:
int xOffset(KDGanttViewItem *item);
LinkType myLinkType;
- static QString linkTypeToString( LinkType type );
- static LinkType stringToLinkType( const QString type );
+ static TQString linkTypeToString( LinkType type );
+ static LinkType stringToLinkType( const TQString type );
};
#endif
diff --git a/kdgantt/KDGanttViewTaskLinkGroup.cpp b/kdgantt/KDGanttViewTaskLinkGroup.cpp
index c7142f672..5109168d5 100644
--- a/kdgantt/KDGanttViewTaskLinkGroup.cpp
+++ b/kdgantt/KDGanttViewTaskLinkGroup.cpp
@@ -36,7 +36,7 @@
#include "KDGanttXMLTools.h"
#include "KDGanttView.h"
-QDict<KDGanttViewTaskLinkGroup> KDGanttViewTaskLinkGroup::sGroupDict;
+TQDict<KDGanttViewTaskLinkGroup> KDGanttViewTaskLinkGroup::sGroupDict;
/*! \class KDGanttViewTaskLinkGroup KDGanttViewTaskLinkGroup.h
A group of task links.
@@ -50,7 +50,7 @@ QDict<KDGanttViewTaskLinkGroup> KDGanttViewTaskLinkGroup::sGroupDict;
*/
KDGanttViewTaskLinkGroup::KDGanttViewTaskLinkGroup()
{
- generateAndInsertName(QString());
+ generateAndInsertName(TQString());
}
/*!
@@ -74,7 +74,7 @@ KDGanttViewTaskLinkGroup::~KDGanttViewTaskLinkGroup()
\param name the search name of this task link group
*/
-KDGanttViewTaskLinkGroup::KDGanttViewTaskLinkGroup( const QString& name )
+KDGanttViewTaskLinkGroup::KDGanttViewTaskLinkGroup( const TQString& name )
{
generateAndInsertName( name );
}
@@ -121,7 +121,7 @@ bool KDGanttViewTaskLinkGroup::remove (KDGanttViewTaskLink* link)
void KDGanttViewTaskLinkGroup::setVisible( bool show )
{
isvisible = show;
- QPtrListIterator<KDGanttViewTaskLink> it(myTaskLinkList);
+ TQPtrListIterator<KDGanttViewTaskLink> it(myTaskLinkList);
for ( ; it.current(); ++it ) {
it.current()->setVisible(show);
}
@@ -151,7 +151,7 @@ bool KDGanttViewTaskLinkGroup::visible() const
void KDGanttViewTaskLinkGroup::setHighlight( bool highlight )
{
ishighlighted= highlight;
- QPtrListIterator<KDGanttViewTaskLink> it(myTaskLinkList);
+ TQPtrListIterator<KDGanttViewTaskLink> it(myTaskLinkList);
for ( ; it.current(); ++it )
it.current()->setHighlight(highlight );
@@ -179,10 +179,10 @@ bool KDGanttViewTaskLinkGroup::highlight() const
\param color the color to draw the task links in this group in
\sa color()
*/
-void KDGanttViewTaskLinkGroup::setColor( const QColor& color )
+void KDGanttViewTaskLinkGroup::setColor( const TQColor& color )
{
myColor = color;
- QPtrListIterator<KDGanttViewTaskLink> it(myTaskLinkList);
+ TQPtrListIterator<KDGanttViewTaskLink> it(myTaskLinkList);
for ( ; it.current(); ++it )
it.current()->setColor(color);
}
@@ -198,7 +198,7 @@ void KDGanttViewTaskLinkGroup::setColor( const QColor& color )
\return the color in which the task links in this group are drawn
\sa setColor()
*/
-QColor KDGanttViewTaskLinkGroup::color() const
+TQColor KDGanttViewTaskLinkGroup::color() const
{
return myColor;
}
@@ -210,11 +210,11 @@ QColor KDGanttViewTaskLinkGroup::color() const
\param color the highlight color to draw the task links in this group in
\sa color()
*/
-void KDGanttViewTaskLinkGroup::setHighlightColor( const QColor& color )
+void KDGanttViewTaskLinkGroup::setHighlightColor( const TQColor& color )
{
myColorHL = color;
- QPtrListIterator<KDGanttViewTaskLink> it(myTaskLinkList);
+ TQPtrListIterator<KDGanttViewTaskLink> it(myTaskLinkList);
for ( ; it.current(); ++it )
it.current()->setHighlightColor(color);
}
@@ -230,7 +230,7 @@ void KDGanttViewTaskLinkGroup::setHighlightColor( const QColor& color )
are drawn
\sa setColor()
*/
-QColor KDGanttViewTaskLinkGroup::highlightColor() const
+TQColor KDGanttViewTaskLinkGroup::highlightColor() const
{
return myColorHL;
}
@@ -268,7 +268,7 @@ void KDGanttViewTaskLinkGroup::removeItem (KDGanttViewTaskLink* link)
\return the task link group with the specified name; 0 if no group
with that name exists
*/
-KDGanttViewTaskLinkGroup* KDGanttViewTaskLinkGroup::find( const QString& name )
+KDGanttViewTaskLinkGroup* KDGanttViewTaskLinkGroup::find( const TQString& name )
{
if (name.isEmpty()) // avoid error msg from QDict
return 0;
@@ -282,10 +282,10 @@ KDGanttViewTaskLinkGroup* KDGanttViewTaskLinkGroup::find( const QString& name )
\param doc the DOM document to which the node belongs
\param parentElement the element into which to insert this node
*/
-void KDGanttViewTaskLinkGroup::createNode( QDomDocument& doc,
- QDomElement& parentElement )
+void KDGanttViewTaskLinkGroup::createNode( TQDomDocument& doc,
+ TQDomElement& parentElement )
{
- QDomElement taskLinkGroupElement = doc.createElement( "TaskLink" );
+ TQDomElement taskLinkGroupElement = doc.createElement( "TaskLink" );
parentElement.appendChild( taskLinkGroupElement );
KDGanttXML::createBoolNode( doc, taskLinkGroupElement, "Highlight",
@@ -306,16 +306,16 @@ void KDGanttViewTaskLinkGroup::createNode( QDomDocument& doc,
\param element the DOM element from which to read the specification
\return the newly created task link group
*/
-KDGanttViewTaskLinkGroup* KDGanttViewTaskLinkGroup::createFromDomElement( QDomElement& element )
+KDGanttViewTaskLinkGroup* KDGanttViewTaskLinkGroup::createFromDomElement( TQDomElement& element )
{
- QDomNode node = element.firstChild();
+ TQDomNode node = element.firstChild();
bool highlight = false, visible = false;
- QColor color, highlightColor;
- QString name;
+ TQColor color, highlightColor;
+ TQString name;
while( !node.isNull() ) {
- QDomElement element = node.toElement();
+ TQDomElement element = node.toElement();
if( !element.isNull() ) { // was really an element
- QString tagName = element.tagName();
+ TQString tagName = element.tagName();
if( tagName == "Highlight" ) {
bool value;
if( KDGanttXML::readBoolNode( element, value ) )
@@ -325,15 +325,15 @@ KDGanttViewTaskLinkGroup* KDGanttViewTaskLinkGroup::createFromDomElement( QDomEl
if( KDGanttXML::readBoolNode( element, value ) )
visible = value;
} else if( tagName == "Color" ) {
- QColor value;
+ TQColor value;
if( KDGanttXML::readColorNode( element, value ) )
color = value;
} else if( tagName == "HighlightColor" ) {
- QColor value;
+ TQColor value;
if( KDGanttXML::readColorNode( element, value ) )
highlightColor = value;
} else if( tagName == "Name" ) {
- QString value;
+ TQString value;
if( KDGanttXML::readStringNode( element, value ) )
name = value;
} else {
@@ -362,7 +362,7 @@ KDGanttViewTaskLinkGroup* KDGanttViewTaskLinkGroup::createFromDomElement( QDomEl
Generates a unique name if necessary and inserts it into the group
dictionary.
*/
-void KDGanttViewTaskLinkGroup::generateAndInsertName( const QString& name )
+void KDGanttViewTaskLinkGroup::generateAndInsertName( const TQString& name )
{
// First check if we already had a name. This can be the case if
// the item was reconstructed from an XML file.
@@ -370,7 +370,7 @@ void KDGanttViewTaskLinkGroup::generateAndInsertName( const QString& name )
// We had a name, remove it
sGroupDict.remove( _name );
- QString newName;
+ TQString newName;
if ( name.isEmpty() || sGroupDict.find( name ) ) {
// create unique name
newName.sprintf( "%p", (void* )this );
diff --git a/kdgantt/KDGanttViewTaskLinkGroup.h b/kdgantt/KDGanttViewTaskLinkGroup.h
index 2b0f31b33..b401c590f 100644
--- a/kdgantt/KDGanttViewTaskLinkGroup.h
+++ b/kdgantt/KDGanttViewTaskLinkGroup.h
@@ -36,8 +36,8 @@
#define KDGANTTVIEWTASKLINKGROUP_H
#include "KDGanttViewTaskLink.h"
-#include <qptrlist.h>
-#include <qdict.h>
+#include <tqptrlist.h>
+#include <tqdict.h>
class KDTimeTableWidget;
class KDGanttView;
@@ -45,7 +45,7 @@ class KDGanttView;
class KDGanttViewTaskLinkGroup : public QObject
{
public:
- KDGanttViewTaskLinkGroup( const QString& name );
+ KDGanttViewTaskLinkGroup( const TQString& name );
KDGanttViewTaskLinkGroup();
~KDGanttViewTaskLinkGroup();
void insert (KDGanttViewTaskLink*) ;
@@ -57,32 +57,32 @@ public:
void setHighlight( bool highlight );
bool highlight() const;
- void setColor( const QColor& color );
- QColor color() const;
- void setHighlightColor( const QColor& color );
- QColor highlightColor() const;
+ void setColor( const TQColor& color );
+ TQColor color() const;
+ void setHighlightColor( const TQColor& color );
+ TQColor highlightColor() const;
- static KDGanttViewTaskLinkGroup* find( const QString& name );
+ static KDGanttViewTaskLinkGroup* find( const TQString& name );
- void createNode( QDomDocument& doc,
- QDomElement& parentElement );
- static KDGanttViewTaskLinkGroup* createFromDomElement( QDomElement& );
+ void createNode( TQDomDocument& doc,
+ TQDomElement& parentElement );
+ static KDGanttViewTaskLinkGroup* createFromDomElement( TQDomElement& );
- void generateAndInsertName( const QString& name );
+ void generateAndInsertName( const TQString& name );
private:
friend class KDTimeTableWidget;
friend class KDGanttViewTaskLink;
bool isvisible,ishighlighted;
- QColor myColor, myColorHL;
- QPtrList<KDGanttViewTaskLink> myTaskLinkList;
- QString _name;
+ TQColor myColor, myColorHL;
+ TQPtrList<KDGanttViewTaskLink> myTaskLinkList;
+ TQString _name;
void insertItem(KDGanttViewTaskLink*);
void removeItem (KDGanttViewTaskLink*);
- static QDict<KDGanttViewTaskLinkGroup> sGroupDict;
+ static TQDict<KDGanttViewTaskLinkGroup> sGroupDict;
};
#endif
diff --git a/kdgantt/KDGanttXMLTools.cpp b/kdgantt/KDGanttXMLTools.cpp
index 68c832071..f5f97a36a 100644
--- a/kdgantt/KDGanttXMLTools.cpp
+++ b/kdgantt/KDGanttXMLTools.cpp
@@ -33,30 +33,30 @@
**********************************************************************/
#include "KDGanttXMLTools.h"
-#include <qbrush.h>
-#include <qbuffer.h>
-#include <qimage.h>
+#include <tqbrush.h>
+#include <tqbuffer.h>
+#include <tqimage.h>
#include <zlib.h>
namespace KDGanttXML {
-void createBoolNode( QDomDocument& doc, QDomNode& parent,
- const QString& elementName, bool value )
+void createBoolNode( TQDomDocument& doc, TQDomNode& parent,
+ const TQString& elementName, bool value )
{
- QDomElement newElement =
+ TQDomElement newElement =
doc.createElement( elementName );
parent.appendChild( newElement );
- QDomText elementContent =
+ TQDomText elementContent =
doc.createTextNode( value ? "true" : "false" );
newElement.appendChild( elementContent );
}
-void createSizeNode( QDomDocument& doc, QDomNode& parent,
- const QString& elementName, const QSize& value )
+void createSizeNode( TQDomDocument& doc, TQDomNode& parent,
+ const TQString& elementName, const TQSize& value )
{
- QDomElement newElement =
+ TQDomElement newElement =
doc.createElement( elementName );
parent.appendChild( newElement );
newElement.setAttribute( "Width", value.width() );
@@ -64,62 +64,62 @@ void createSizeNode( QDomDocument& doc, QDomNode& parent,
}
-void createIntNode( QDomDocument& doc, QDomNode& parent,
- const QString& elementName, int value )
+void createIntNode( TQDomDocument& doc, TQDomNode& parent,
+ const TQString& elementName, int value )
{
- QDomElement newElement =
+ TQDomElement newElement =
doc.createElement( elementName );
parent.appendChild( newElement );
- QDomText elementContent =
- doc.createTextNode( QString::number( value ) );
+ TQDomText elementContent =
+ doc.createTextNode( TQString::number( value ) );
newElement.appendChild( elementContent );
}
-void createDoubleNode( QDomDocument& doc, QDomNode& parent,
- const QString& elementName, double value )
+void createDoubleNode( TQDomDocument& doc, TQDomNode& parent,
+ const TQString& elementName, double value )
{
- QDomElement newElement =
+ TQDomElement newElement =
doc.createElement( elementName );
parent.appendChild( newElement );
- QDomText elementContent =
- doc.createTextNode( QString::number( value ) );
+ TQDomText elementContent =
+ doc.createTextNode( TQString::number( value ) );
newElement.appendChild( elementContent );
}
-void createStringNode( QDomDocument& doc, QDomNode& parent,
- const QString& elementName,
- const QString& text )
+void createStringNode( TQDomDocument& doc, TQDomNode& parent,
+ const TQString& elementName,
+ const TQString& text )
{
- QDomElement newElement =
+ TQDomElement newElement =
doc.createElement( elementName );
parent.appendChild( newElement );
- QDomText elementContent =
+ TQDomText elementContent =
doc.createTextNode( text );
newElement.appendChild( elementContent );
}
-void createColorNode( QDomDocument& doc, QDomNode& parent,
- const QString& elementName, const QColor& color )
+void createColorNode( TQDomDocument& doc, TQDomNode& parent,
+ const TQString& elementName, const TQColor& color )
{
- QDomElement colorElement = doc.createElement( elementName );
+ TQDomElement colorElement = doc.createElement( elementName );
parent.appendChild( colorElement );
colorElement.setAttribute( "Red",
- QString::number( color.red() ) );
+ TQString::number( color.red() ) );
colorElement.setAttribute( "Green",
- QString::number( color.green() ) );
+ TQString::number( color.green() ) );
colorElement.setAttribute( "Blue",
- QString::number( color.blue() ) );
+ TQString::number( color.blue() ) );
}
-void createBrushNode( QDomDocument& doc, QDomNode& parent,
- const QString& elementName, const QBrush& brush )
+void createBrushNode( TQDomDocument& doc, TQDomNode& parent,
+ const TQString& elementName, const TQBrush& brush )
{
- QDomElement brushElement = doc.createElement( elementName );
+ TQDomElement brushElement = doc.createElement( elementName );
parent.appendChild( brushElement );
createColorNode( doc, brushElement, "Color", brush.color() );
createStringNode( doc, brushElement, "Style",
@@ -129,27 +129,27 @@ void createBrushNode( QDomDocument& doc, QDomNode& parent,
}
-void createPixmapNode( QDomDocument& doc, QDomNode& parent,
- const QString& elementName, const QPixmap& pixmap )
+void createPixmapNode( TQDomDocument& doc, TQDomNode& parent,
+ const TQString& elementName, const TQPixmap& pixmap )
{
- QDomElement pixmapElement = doc.createElement( elementName );
+ TQDomElement pixmapElement = doc.createElement( elementName );
parent.appendChild( pixmapElement );
// Convert the pixmap to an image, save that image to an in-memory
// XPM representation and compress this representation. This
// conforms to the file format Qt Designer uses.
- QByteArray ba;
- QBuffer buffer( ba );
+ TQByteArray ba;
+ TQBuffer buffer( ba );
buffer.open( IO_WriteOnly );
- QImageIO imgio( &buffer, "XPM" );
- QImage image = pixmap.convertToImage();
+ TQImageIO imgio( &buffer, "XPM" );
+ TQImage image = pixmap.convertToImage();
imgio.setImage( image );
imgio.write();
buffer.close();
ulong len = ba.size() * 2;
- QByteArray bazip( len );
+ TQByteArray bazip( len );
::compress( (uchar*) bazip.data(), &len, (uchar*) ba.data(), ba.size() );
- QString dataString;
+ TQString dataString;
static const char hexchars[] = "0123456789abcdef";
for ( int i = 0; i < (int)len; ++i ) {
uchar c = (uchar) bazip[i];
@@ -163,51 +163,51 @@ void createPixmapNode( QDomDocument& doc, QDomNode& parent,
}
-void createRectNode( QDomDocument& doc, QDomNode& parent,
- const QString& elementName, const QRect& rect )
+void createRectNode( TQDomDocument& doc, TQDomNode& parent,
+ const TQString& elementName, const TQRect& rect )
{
- QDomElement rectElement = doc.createElement( elementName );
+ TQDomElement rectElement = doc.createElement( elementName );
parent.appendChild( rectElement );
- QDomElement xElement = doc.createElement( "X" );
+ TQDomElement xElement = doc.createElement( "X" );
rectElement.appendChild( xElement );
- QDomText xContent = doc.createTextNode( QString::number( rect.x() ) );
+ TQDomText xContent = doc.createTextNode( TQString::number( rect.x() ) );
xElement.appendChild( xContent );
- QDomElement yElement = doc.createElement( "Y" );
+ TQDomElement yElement = doc.createElement( "Y" );
rectElement.appendChild( yElement );
- QDomText yContent = doc.createTextNode( QString::number( rect.y() ) );
+ TQDomText yContent = doc.createTextNode( TQString::number( rect.y() ) );
yElement.appendChild( yContent );
- QDomElement widthElement = doc.createElement( "Width" );
+ TQDomElement widthElement = doc.createElement( "Width" );
rectElement.appendChild( widthElement );
- QDomText widthContent = doc.createTextNode( QString::number( rect.width() ) );
+ TQDomText widthContent = doc.createTextNode( TQString::number( rect.width() ) );
widthElement.appendChild( widthContent );
- QDomElement heightElement = doc.createElement( "Height" );
+ TQDomElement heightElement = doc.createElement( "Height" );
rectElement.appendChild( heightElement );
- QDomText heightContent = doc.createTextNode( QString::number( rect.height() ) );
+ TQDomText heightContent = doc.createTextNode( TQString::number( rect.height() ) );
heightElement.appendChild( heightContent );
}
-void createStringListNodes( QDomDocument& doc, QDomNode& parent,
- const QString& elementName,
- const QStringList* list )
+void createStringListNodes( TQDomDocument& doc, TQDomNode& parent,
+ const TQString& elementName,
+ const TQStringList* list )
{
if( !list )
return;
- for( QStringList::ConstIterator it = list->begin();
+ for( TQStringList::ConstIterator it = list->begin();
it != list->end(); ++it ) {
- QDomElement element = doc.createElement( elementName );
+ TQDomElement element = doc.createElement( elementName );
parent.appendChild( element );
- QDomText elementContent = doc.createTextNode( *it );
+ TQDomText elementContent = doc.createTextNode( *it );
element.appendChild( elementContent );
}
}
-void createFontNode( QDomDocument& doc, QDomNode& parent,
- const QString& elementName, const QFont& font )
+void createFontNode( TQDomDocument& doc, TQDomNode& parent,
+ const TQString& elementName, const TQFont& font )
{
- QDomElement fontElement = doc.createElement( elementName );
+ TQDomElement fontElement = doc.createElement( elementName );
parent.appendChild( fontElement );
createStringNode( doc, fontElement, "Family", font.family() );
createIntNode( doc, fontElement, "PointSize", font.pointSize() );
@@ -221,10 +221,10 @@ void createFontNode( QDomDocument& doc, QDomNode& parent,
}
-void createPenNode( QDomDocument& doc, QDomNode& parent,
- const QString& elementName, const QPen& pen )
+void createPenNode( TQDomDocument& doc, TQDomNode& parent,
+ const TQString& elementName, const TQPen& pen )
{
- QDomElement penElement = doc.createElement( elementName );
+ TQDomElement penElement = doc.createElement( elementName );
parent.appendChild( penElement );
createIntNode( doc, penElement, "Width", pen.width() );
createColorNode( doc, penElement, "Color", pen.color() );
@@ -232,45 +232,45 @@ void createPenNode( QDomDocument& doc, QDomNode& parent,
}
-void createDateTimeNode( QDomDocument& doc, QDomNode& parent,
- const QString& elementName,
- const QDateTime& datetime )
+void createDateTimeNode( TQDomDocument& doc, TQDomNode& parent,
+ const TQString& elementName,
+ const TQDateTime& datetime )
{
- QDomElement dateTimeElement = doc.createElement( elementName );
+ TQDomElement dateTimeElement = doc.createElement( elementName );
parent.appendChild( dateTimeElement );
createDateNode( doc, dateTimeElement, "Date", datetime.date() );
createTimeNode( doc, dateTimeElement, "Time", datetime.time() );
}
-void createDateNode( QDomDocument& doc, QDomNode& parent,
- const QString& elementName, const QDate& date )
+void createDateNode( TQDomDocument& doc, TQDomNode& parent,
+ const TQString& elementName, const TQDate& date )
{
- QDomElement dateElement = doc.createElement( elementName );
+ TQDomElement dateElement = doc.createElement( elementName );
parent.appendChild( dateElement );
- dateElement.setAttribute( "Year", QString::number( date.year() ) );
- dateElement.setAttribute( "Month", QString::number( date.month() ) );
- dateElement.setAttribute( "Day", QString::number( date.day() ) );
+ dateElement.setAttribute( "Year", TQString::number( date.year() ) );
+ dateElement.setAttribute( "Month", TQString::number( date.month() ) );
+ dateElement.setAttribute( "Day", TQString::number( date.day() ) );
}
-void createTimeNode( QDomDocument& doc, QDomNode& parent,
- const QString& elementName, const QTime& time )
+void createTimeNode( TQDomDocument& doc, TQDomNode& parent,
+ const TQString& elementName, const TQTime& time )
{
- QDomElement timeElement = doc.createElement( elementName );
+ TQDomElement timeElement = doc.createElement( elementName );
parent.appendChild( timeElement );
timeElement.setAttribute( "Hour",
- QString::number( time.hour() ) );
+ TQString::number( time.hour() ) );
timeElement.setAttribute( "Minute",
- QString::number( time.minute() ) );
+ TQString::number( time.minute() ) );
timeElement.setAttribute( "Second",
- QString::number( time.second() ) );
+ TQString::number( time.second() ) );
timeElement.setAttribute( "Millisecond",
- QString::number( time.msec() ) );
+ TQString::number( time.msec() ) );
}
-QString penStyleToString( Qt::PenStyle style )
+TQString penStyleToString( Qt::PenStyle style )
{
switch( style ) {
case Qt::NoPen:
@@ -292,7 +292,7 @@ QString penStyleToString( Qt::PenStyle style )
-QString brushStyleToString( Qt::BrushStyle style )
+TQString brushStyleToString( Qt::BrushStyle style )
{
// PENDING(kalle) Support custom patterns
switch( style ) {
@@ -332,14 +332,14 @@ QString brushStyleToString( Qt::BrushStyle style )
}
-bool readStringNode( const QDomElement& element, QString& value )
+bool readStringNode( const TQDomElement& element, TQString& value )
{
value = element.text();
return true;
}
-bool readIntNode( const QDomElement& element, int& value )
+bool readIntNode( const TQDomElement& element, int& value )
{
bool ok = false;
int temp = element.text().toInt( &ok );
@@ -349,7 +349,7 @@ bool readIntNode( const QDomElement& element, int& value )
}
-bool readDoubleNode( const QDomElement& element, double& value )
+bool readDoubleNode( const TQDomElement& element, double& value )
{
bool ok = false;
double temp = element.text().toDouble( &ok );
@@ -359,7 +359,7 @@ bool readDoubleNode( const QDomElement& element, double& value )
}
-bool readBoolNode( const QDomElement& element, bool& value )
+bool readBoolNode( const TQDomElement& element, bool& value )
{
if( element.text() == "true" ) {
value = true;
@@ -372,7 +372,7 @@ bool readBoolNode( const QDomElement& element, bool& value )
}
-bool readColorNode( const QDomElement& element, QColor& value )
+bool readColorNode( const TQDomElement& element, TQColor& value )
{
bool ok = true;
int red, green, blue;
@@ -399,21 +399,21 @@ bool readColorNode( const QDomElement& element, QColor& value )
}
-bool readBrushNode( const QDomElement& element, QBrush& brush )
+bool readBrushNode( const TQDomElement& element, TQBrush& brush )
{
bool ok = true;
- QColor tempColor;
+ TQColor tempColor;
Qt::BrushStyle tempStyle;
- QPixmap tempPixmap;
- QDomNode node = element.firstChild();
+ TQPixmap tempPixmap;
+ TQDomNode node = element.firstChild();
while( !node.isNull() ) {
- QDomElement element = node.toElement();
+ TQDomElement element = node.toElement();
if( !element.isNull() ) { // was really an element
- QString tagName = element.tagName();
+ TQString tagName = element.tagName();
if( tagName == "Color" ) {
ok = ok & readColorNode( element, tempColor );
} else if( tagName == "Style" ) {
- QString value;
+ TQString value;
ok = ok & readStringNode( element, value );
tempStyle = stringToBrushStyle( value );
} else if( tagName == "Pixmap" ) {
@@ -436,18 +436,18 @@ bool readBrushNode( const QDomElement& element, QBrush& brush )
}
-bool readPixmapNode( const QDomElement& element, QPixmap& pixmap )
+bool readPixmapNode( const TQDomElement& element, TQPixmap& pixmap )
{
bool ok = true;
int tempLengthi;
- QString tempData;
- QDomNode node = element.firstChild();
+ TQString tempData;
+ TQDomNode node = element.firstChild();
while( !node.isNull() ) {
- QDomElement element = node.toElement();
+ TQDomElement element = node.toElement();
if( !element.isNull() ) { // was really an element
- QString tagName = element.tagName();
+ TQString tagName = element.tagName();
if( tagName == "Format" ) {
- QString formatName;
+ TQString formatName;
ok = ok & readStringNode( element, formatName );
#ifndef NDEBUG
if( formatName != "XPM.GZ" )
@@ -487,10 +487,10 @@ bool readPixmapNode( const QDomElement& element, QPixmap& pixmap )
if( tempLengthi < (int)tempData.length() * 5 )
tempLengthi = tempData.length() * 5;
unsigned long tempLength = tempLengthi;
- QByteArray baunzip( tempLength );
+ TQByteArray baunzip( tempLength );
::uncompress( (uchar*) baunzip.data(), &tempLength,
(uchar*) ba, tempData.length()/2 );
- QImage image;
+ TQImage image;
image.loadFromData( (const uchar*)baunzip.data(), tempLength, "XPM" );
if( image.isNull() )
@@ -505,23 +505,23 @@ bool readPixmapNode( const QDomElement& element, QPixmap& pixmap )
}
-bool readPenNode( const QDomElement& element, QPen& pen )
+bool readPenNode( const TQDomElement& element, TQPen& pen )
{
bool ok = true;
int tempWidth;
- QColor tempColor;
+ TQColor tempColor;
Qt::PenStyle tempStyle;
- QDomNode node = element.firstChild();
+ TQDomNode node = element.firstChild();
while( !node.isNull() ) {
- QDomElement element = node.toElement();
+ TQDomElement element = node.toElement();
if( !element.isNull() ) { // was really an element
- QString tagName = element.tagName();
+ TQString tagName = element.tagName();
if( tagName == "Width" ) {
ok = ok & readIntNode( element, tempWidth );
} else if( tagName == "Color" ) {
ok = ok & readColorNode( element, tempColor );
} else if( tagName == "Style" ) {
- QString value;
+ TQString value;
ok = ok & readStringNode( element, value );
tempStyle = stringToPenStyle( value );
} else {
@@ -540,18 +540,18 @@ bool readPenNode( const QDomElement& element, QPen& pen )
return ok;
}
-bool readFontNode( const QDomElement& element, QFont& font )
+bool readFontNode( const TQDomElement& element, TQFont& font )
{
bool ok = true;
- QString family;
+ TQString family;
int pointSize, pixelSize, weight;
bool italic;
int charSet;
- QDomNode node = element.firstChild();
+ TQDomNode node = element.firstChild();
while( !node.isNull() ) {
- QDomElement element = node.toElement();
+ TQDomElement element = node.toElement();
if( !element.isNull() ) { // was really an element
- QString tagName = element.tagName();
+ TQString tagName = element.tagName();
if( tagName == "Family" ) {
ok = ok & readStringNode( element, family );
} else if( tagName == "PointSize" ) {
@@ -579,22 +579,22 @@ bool readFontNode( const QDomElement& element, QFont& font )
font.setItalic( italic );
#if QT_VERSION < 300
// Qt 3 handles charsets internally.
- font.setCharSet( (QFont::CharSet)charSet );
+ font.setCharSet( (TQFont::CharSet)charSet );
#endif
}
return ok;
}
-bool readRectNode( const QDomElement& element, QRect& value )
+bool readRectNode( const TQDomElement& element, TQRect& value )
{
bool ok = true;
int width, height, x, y;
- QDomNode node = element.firstChild();
+ TQDomNode node = element.firstChild();
while( !node.isNull() ) {
- QDomElement element = node.toElement();
+ TQDomElement element = node.toElement();
if( !element.isNull() ) { // was really an element
- QString tagName = element.tagName();
+ TQString tagName = element.tagName();
if( tagName == "Width" ) {
ok = ok & readIntNode( element, width );
} else if( tagName == "Height" ) {
@@ -622,16 +622,16 @@ bool readRectNode( const QDomElement& element, QRect& value )
-bool readDateTimeNode( const QDomElement& element, QDateTime& datetime )
+bool readDateTimeNode( const TQDomElement& element, TQDateTime& datetime )
{
bool ok = true;
- QDate tempDate;
- QTime tempTime;
- QDomNode node = element.firstChild();
+ TQDate tempDate;
+ TQTime tempTime;
+ TQDomNode node = element.firstChild();
while( !node.isNull() ) {
- QDomElement element = node.toElement();
+ TQDomElement element = node.toElement();
if( !element.isNull() ) { // was really an element
- QString tagName = element.tagName();
+ TQString tagName = element.tagName();
if( tagName == "Date" ) {
ok = ok & readDateNode( element, tempDate );
} else if( tagName == "Time" ) {
@@ -652,7 +652,7 @@ bool readDateTimeNode( const QDomElement& element, QDateTime& datetime )
}
-bool readDateNode( const QDomElement& element, QDate& value )
+bool readDateNode( const TQDomElement& element, TQDate& value )
{
bool ok = true;
int year, month, day;
@@ -680,7 +680,7 @@ bool readDateNode( const QDomElement& element, QDate& value )
-bool readTimeNode( const QDomElement& element, QTime& value )
+bool readTimeNode( const TQDomElement& element, TQTime& value )
{
bool ok = true;
int hour, minute, second, msec;
@@ -713,7 +713,7 @@ bool readTimeNode( const QDomElement& element, QTime& value )
-Qt::PenStyle stringToPenStyle( const QString& style )
+Qt::PenStyle stringToPenStyle( const TQString& style )
{
if( style == "NoPen" )
return Qt::NoPen;
@@ -732,7 +732,7 @@ Qt::PenStyle stringToPenStyle( const QString& style )
}
-Qt::BrushStyle stringToBrushStyle( const QString& style )
+Qt::BrushStyle stringToBrushStyle( const TQString& style )
{
// PENDING(kalle) Support custom patterns
if( style == "NoBrush" )
diff --git a/kdgantt/KDGanttXMLTools.h b/kdgantt/KDGanttXMLTools.h
index 67865b960..784bc2e10 100644
--- a/kdgantt/KDGanttXMLTools.h
+++ b/kdgantt/KDGanttXMLTools.h
@@ -35,67 +35,67 @@
#ifndef __KDGANTTXMLTOOLS_H__
#define __KDGANTTXMLTOOLS_H__
-#include <qpen.h>
-#include <qdom.h>
-#include <qstring.h>
-#include <qcolor.h>
-#include <qrect.h>
-#include <qfont.h>
-#include <qstringlist.h>
-#include <qdatetime.h>
+#include <tqpen.h>
+#include <tqdom.h>
+#include <tqstring.h>
+#include <tqcolor.h>
+#include <tqrect.h>
+#include <tqfont.h>
+#include <tqstringlist.h>
+#include <tqdatetime.h>
namespace KDGanttXML {
- QString penStyleToString( Qt::PenStyle style );
- Qt::PenStyle stringToPenStyle( const QString& style );
- QString brushStyleToString( Qt::BrushStyle style );
- Qt::BrushStyle stringToBrushStyle( const QString& style );
+ TQString penStyleToString( Qt::PenStyle style );
+ Qt::PenStyle stringToPenStyle( const TQString& style );
+ TQString brushStyleToString( Qt::BrushStyle style );
+ Qt::BrushStyle stringToBrushStyle( const TQString& style );
- void createBoolNode( QDomDocument& doc, QDomNode& parent,
- const QString& elementName, bool value );
- void createSizeNode( QDomDocument& doc, QDomNode& parent,
- const QString& elementName, const QSize& value );
- void createIntNode( QDomDocument& doc, QDomNode& parent,
- const QString& elementName, int value );
- void createDoubleNode( QDomDocument& doc, QDomNode& parent,
- const QString& elementName, double value );
- void createStringNode( QDomDocument& doc, QDomNode& parent,
- const QString& elementName,
- const QString& text );
- void createColorNode( QDomDocument& doc, QDomNode& parent,
- const QString& elementName, const QColor& color );
- void createBrushNode( QDomDocument& doc, QDomNode& parent,
- const QString& elementName, const QBrush& brush );
- void createPixmapNode( QDomDocument& doc, QDomNode& parent,
- const QString& elementName, const QPixmap& pixmap );
- void createRectNode( QDomDocument& doc, QDomNode& parent,
- const QString& elementName, const QRect& rect );
- void createStringListNodes( QDomDocument& doc, QDomNode& parent,
- const QString& elementName,
- const QStringList* list );
- void createFontNode( QDomDocument& doc, QDomNode& parent,
- const QString& elementName, const QFont& font );
+ void createBoolNode( TQDomDocument& doc, TQDomNode& parent,
+ const TQString& elementName, bool value );
+ void createSizeNode( TQDomDocument& doc, TQDomNode& parent,
+ const TQString& elementName, const TQSize& value );
+ void createIntNode( TQDomDocument& doc, TQDomNode& parent,
+ const TQString& elementName, int value );
+ void createDoubleNode( TQDomDocument& doc, TQDomNode& parent,
+ const TQString& elementName, double value );
+ void createStringNode( TQDomDocument& doc, TQDomNode& parent,
+ const TQString& elementName,
+ const TQString& text );
+ void createColorNode( TQDomDocument& doc, TQDomNode& parent,
+ const TQString& elementName, const TQColor& color );
+ void createBrushNode( TQDomDocument& doc, TQDomNode& parent,
+ const TQString& elementName, const TQBrush& brush );
+ void createPixmapNode( TQDomDocument& doc, TQDomNode& parent,
+ const TQString& elementName, const TQPixmap& pixmap );
+ void createRectNode( TQDomDocument& doc, TQDomNode& parent,
+ const TQString& elementName, const TQRect& rect );
+ void createStringListNodes( TQDomDocument& doc, TQDomNode& parent,
+ const TQString& elementName,
+ const TQStringList* list );
+ void createFontNode( TQDomDocument& doc, TQDomNode& parent,
+ const TQString& elementName, const TQFont& font );
- void createPenNode( QDomDocument& doc, QDomNode& parent,
- const QString& elementName, const QPen& pen );
- void createDateTimeNode( QDomDocument& doc, QDomNode& parent,
- const QString& elementName,
- const QDateTime& datetime );
- void createDateNode( QDomDocument& doc, QDomNode& parent,
- const QString& elementName, const QDate& date );
- void createTimeNode( QDomDocument& doc, QDomNode& parent,
- const QString& elementName, const QTime& time );
- bool readIntNode( const QDomElement& element, int& value );
- bool readStringNode( const QDomElement& element, QString& value );
- bool readDoubleNode( const QDomElement& element, double& value );
- bool readBoolNode( const QDomElement& element, bool& value );
- bool readColorNode( const QDomElement& element, QColor& value );
- bool readBrushNode( const QDomElement& element, QBrush& brush );
- bool readPixmapNode( const QDomElement& element, QPixmap& pixmap );
- bool readRectNode( const QDomElement& element, QRect& value );
- bool readFontNode( const QDomElement& element, QFont& font );
- bool readPenNode( const QDomElement& element, QPen& pen );
- bool readDateTimeNode( const QDomElement& element, QDateTime& datetime );
- bool readDateNode( const QDomElement& element, QDate& date );
- bool readTimeNode( const QDomElement& element, QTime& time );
+ void createPenNode( TQDomDocument& doc, TQDomNode& parent,
+ const TQString& elementName, const TQPen& pen );
+ void createDateTimeNode( TQDomDocument& doc, TQDomNode& parent,
+ const TQString& elementName,
+ const TQDateTime& datetime );
+ void createDateNode( TQDomDocument& doc, TQDomNode& parent,
+ const TQString& elementName, const TQDate& date );
+ void createTimeNode( TQDomDocument& doc, TQDomNode& parent,
+ const TQString& elementName, const TQTime& time );
+ bool readIntNode( const TQDomElement& element, int& value );
+ bool readStringNode( const TQDomElement& element, TQString& value );
+ bool readDoubleNode( const TQDomElement& element, double& value );
+ bool readBoolNode( const TQDomElement& element, bool& value );
+ bool readColorNode( const TQDomElement& element, TQColor& value );
+ bool readBrushNode( const TQDomElement& element, TQBrush& brush );
+ bool readPixmapNode( const TQDomElement& element, TQPixmap& pixmap );
+ bool readRectNode( const TQDomElement& element, TQRect& value );
+ bool readFontNode( const TQDomElement& element, TQFont& font );
+ bool readPenNode( const TQDomElement& element, TQPen& pen );
+ bool readDateTimeNode( const TQDomElement& element, TQDateTime& datetime );
+ bool readDateNode( const TQDomElement& element, TQDate& date );
+ bool readTimeNode( const TQDomElement& element, TQTime& time );
}
#endif
diff --git a/kdgantt/itemAttributeDialog.ui.h b/kdgantt/itemAttributeDialog.ui.h
index 9ce60bdb9..2ca8b6718 100644
--- a/kdgantt/itemAttributeDialog.ui.h
+++ b/kdgantt/itemAttributeDialog.ui.h
@@ -36,7 +36,7 @@
** a constructor, and a destroy() slot in place of a destructor.
*****************************************************************************/
-#include <qcolordialog.h>
+#include <tqcolordialog.h>
void itemAttributeDialog::init( )
{
@@ -49,10 +49,10 @@ void itemAttributeDialog::init( )
void itemAttributeDialog::ChangeText_clicked()
{
if ( !myItem) return;
- QColor c = QColorDialog::getColor( myItem->textColor(), this );
+ TQColor c = QColorDialog::getColor( myItem->textColor(), this );
if ( c.isValid() )
myItem->setTextColor( c );
- QPixmap * pix = (QPixmap *)ChangeText->pixmap();
+ TQPixmap * pix = (TQPixmap *)ChangeText->pixmap();
pix->fill( myItem->textColor() );
ChangeText->repaint();
}
@@ -63,9 +63,9 @@ void itemAttributeDialog::ChangeStart_clicked()
if ( !myItem) return;
KDGanttViewItem::Shape start, middle, end;
myItem->shapes( start, middle, end );
- QColor st, mi, en;
+ TQColor st, mi, en;
myItem->colors( st, mi, en );
- QColor c = QColorDialog::getColor( st, this );
+ TQColor c = QColorDialog::getColor( st, this );
if ( c.isValid() ) {
st = c;
ChangeStart->setPixmap( KDGanttView::getPixmap( start, st, backgroundColor(), 10 ) );
@@ -80,9 +80,9 @@ void itemAttributeDialog::ChangeMiddle_clicked()
if ( !myItem) return;
KDGanttViewItem::Shape start, middle, end;
myItem->shapes( start, middle, end );
- QColor st, mi, en;
+ TQColor st, mi, en;
myItem->colors( st, mi, en );
- QColor c = QColorDialog::getColor( mi, this );
+ TQColor c = QColorDialog::getColor( mi, this );
if ( c.isValid() ) {
mi = c;
ChangeMiddle->setPixmap( KDGanttView::getPixmap( middle, mi, backgroundColor(), 10 ) );
@@ -96,9 +96,9 @@ void itemAttributeDialog::ChangeEnd_clicked()
if ( !myItem) return;
KDGanttViewItem::Shape start, middle, end;
myItem->shapes( start, middle, end );
- QColor st, mi, en;
+ TQColor st, mi, en;
myItem->colors( st, mi, en );
- QColor c = QColorDialog::getColor( en, this );
+ TQColor c = QColorDialog::getColor( en, this );
if ( c.isValid() ) {
en = c;
ChangeEnd->setPixmap( KDGanttView::getPixmap( end, en, backgroundColor(), 10 ) );
@@ -237,15 +237,15 @@ void itemAttributeDialog::reset( KDGanttViewItem * item )
TimeEdit1->setTime( item->startTime().time() );
if ( item->pixmap() != 0 )
setIcon( *(item->pixmap()) );
- setCaption( "Properties of " + ((QListViewItem*)item)->text(0) );
- itemName->setText(((QListViewItem*)item)->text(0) );
+ setCaption( "Properties of " + ((TQListViewItem*)item)->text(0) );
+ itemName->setText(((TQListViewItem*)item)->text(0) );
// DateEdit1->setRange(item->startTime().date().addYears(-10), item->endTime().date() );
// DateEdit3->setRange(item->startTime().date(), item->endTime().date().addYears(10));
LineEdit1->setText( item->text() );
KDGanttViewItem::Shape start, middle, end;
item->shapes( start, middle, end );
- QColor st, mi, en;
+ TQColor st, mi, en;
item->colors( st, mi, en );
ChangeStart->setPixmap( KDGanttView::getPixmap( start, st, backgroundColor(), 10 ) );
ChangeMiddle->setPixmap( KDGanttView::getPixmap( middle, mi, backgroundColor(), 10 ) );
@@ -254,9 +254,9 @@ void itemAttributeDialog::reset( KDGanttViewItem * item )
HighStart->setPixmap( KDGanttView::getPixmap( start, st, backgroundColor(), 10 ) );
HighMiddle->setPixmap( KDGanttView::getPixmap( middle, mi, backgroundColor(), 10 ) );
HighEnd->setPixmap( KDGanttView::getPixmap( end, en, backgroundColor(), 10 ) );
- ChangeText->setPixmap(QPixmap( 16,16 ));
- QPixmap * pix;
- pix = (QPixmap *)ChangeText->pixmap();
+ ChangeText->setPixmap(TQPixmap( 16,16 ));
+ TQPixmap * pix;
+ pix = (TQPixmap *)ChangeText->pixmap();
pix->fill( item->textColor() );
StartBox->setCurrentItem((int)start );
MiddleBox->setCurrentItem((int)middle );
@@ -273,9 +273,9 @@ void itemAttributeDialog::HighStart_clicked()
if ( !myItem) return;
KDGanttViewItem::Shape start, middle, end;
myItem->shapes( start, middle, end );
- QColor st, mi, en;
+ TQColor st, mi, en;
myItem->highlightColors( st, mi, en );
- QColor c = QColorDialog::getColor( st, this );
+ TQColor c = QColorDialog::getColor( st, this );
if ( c.isValid() ) {
st = c;
HighStart->setPixmap( KDGanttView::getPixmap( start, st, backgroundColor(), 10 ) );
@@ -290,9 +290,9 @@ void itemAttributeDialog::HighMiddle_clicked()
if ( !myItem) return;
KDGanttViewItem::Shape start, middle, end;
myItem->shapes( start, middle, end );
- QColor st, mi, en;
+ TQColor st, mi, en;
myItem->highlightColors( st, mi, en );
- QColor c = QColorDialog::getColor( mi, this );
+ TQColor c = QColorDialog::getColor( mi, this );
if ( c.isValid() ) {
mi = c;
HighMiddle->setPixmap( KDGanttView::getPixmap( middle, mi, backgroundColor(), 10 ) );
@@ -307,9 +307,9 @@ void itemAttributeDialog::HighEnd_clicked()
if ( !myItem) return;
KDGanttViewItem::Shape start, middle, end;
myItem->shapes( start, middle, end );
- QColor st, mi, en;
+ TQColor st, mi, en;
myItem->highlightColors( st, mi, en );
- QColor c = QColorDialog::getColor( en, this );
+ TQColor c = QColorDialog::getColor( en, this );
if ( c.isValid() ) {
en = c;
HighEnd->setPixmap( KDGanttView::getPixmap( end, en, backgroundColor(), 10 ) );
@@ -319,10 +319,10 @@ void itemAttributeDialog::HighEnd_clicked()
}
-void itemAttributeDialog::DateEdit1_valueChanged( const QDate & )
+void itemAttributeDialog::DateEdit1_valueChanged( const TQDate & )
{
if ( !myItem) return;
- QDateTime dt;
+ TQDateTime dt;
dt.setDate( DateEdit1->date() );
dt.setTime( TimeEdit1->time() );
if ( dt.isValid() )
@@ -333,10 +333,10 @@ void itemAttributeDialog::DateEdit1_valueChanged( const QDate & )
}
-void itemAttributeDialog::TimeEdit1_valueChanged( const QTime & )
+void itemAttributeDialog::TimeEdit1_valueChanged( const TQTime & )
{
if ( !myItem) return;
- QDateTime dt;
+ TQDateTime dt;
dt.setDate( DateEdit1->date() );
dt.setTime( TimeEdit1->time() );
if ( dt.isValid() ) {
@@ -347,10 +347,10 @@ void itemAttributeDialog::TimeEdit1_valueChanged( const QTime & )
}
-void itemAttributeDialog::DateEdit2_valueChanged( const QDate & )
+void itemAttributeDialog::DateEdit2_valueChanged( const TQDate & )
{
if ( !myItem) return;
- QDateTime dt;
+ TQDateTime dt;
dt.setDate( DateEdit2->date() );
dt.setTime( TimeEdit2->time() );
if ( dt.isValid() ) {
@@ -360,10 +360,10 @@ void itemAttributeDialog::DateEdit2_valueChanged( const QDate & )
}
-void itemAttributeDialog::TimeEdit2_valueChanged( const QTime & )
+void itemAttributeDialog::TimeEdit2_valueChanged( const TQTime & )
{
if ( !myItem) return;
- QDateTime dt;
+ TQDateTime dt;
dt.setDate( DateEdit2->date() );
dt.setTime( TimeEdit2->time() );
if ( dt.isValid() ) {
@@ -373,10 +373,10 @@ void itemAttributeDialog::TimeEdit2_valueChanged( const QTime & )
}
-void itemAttributeDialog::DateEdit3_valueChanged( const QDate & )
+void itemAttributeDialog::DateEdit3_valueChanged( const TQDate & )
{
if ( !myItem) return;
- QDateTime dt;
+ TQDateTime dt;
dt.setDate( DateEdit3->date() );
dt.setTime( TimeEdit3->time() );
if ( dt.isValid() ) {
@@ -386,10 +386,10 @@ void itemAttributeDialog::DateEdit3_valueChanged( const QDate & )
}
-void itemAttributeDialog::TimeEdit3_valueChanged( const QTime & )
+void itemAttributeDialog::TimeEdit3_valueChanged( const TQTime & )
{
if ( !myItem) return;
- QDateTime dt;
+ TQDateTime dt;
dt.setDate( DateEdit3->date() );
dt.setTime( TimeEdit3->time() );
if ( dt.isValid() ) {
@@ -399,14 +399,14 @@ void itemAttributeDialog::TimeEdit3_valueChanged( const QTime & )
}
-void itemAttributeDialog::LineEdit1_textChanged( const QString & )
+void itemAttributeDialog::LineEdit1_textChanged( const TQString & )
{
if ( !myItem) return;
myItem->setText(LineEdit1->text());
}
-void itemAttributeDialog::StartBox_activated( const QString & s )
+void itemAttributeDialog::StartBox_activated( const TQString & s )
{
KDGanttViewItem::Shape start, middle, end;
myItem->shapes( start, middle, end );
@@ -416,7 +416,7 @@ void itemAttributeDialog::StartBox_activated( const QString & s )
}
-void itemAttributeDialog::MiddleBox_activated( const QString & s )
+void itemAttributeDialog::MiddleBox_activated( const TQString & s )
{
KDGanttViewItem::Shape start, middle, end;
myItem->shapes( start, middle, end );
@@ -427,7 +427,7 @@ void itemAttributeDialog::MiddleBox_activated( const QString & s )
}
-void itemAttributeDialog::EndBox_activated( const QString & s )
+void itemAttributeDialog::EndBox_activated( const TQString & s )
{
KDGanttViewItem::Shape start, middle, end;
myItem->shapes( start, middle, end );
@@ -438,10 +438,10 @@ void itemAttributeDialog::EndBox_activated( const QString & s )
}
-void itemAttributeDialog::DateEdit4_valueChanged( const QDate & )
+void itemAttributeDialog::DateEdit4_valueChanged( const TQDate & )
{
if ( !myItem) return;
- QDateTime dt;
+ TQDateTime dt;
dt.setDate( DateEdit4->date() );
dt.setTime( TimeEdit4->time() );
if ( dt.isValid() ) {
@@ -451,10 +451,10 @@ void itemAttributeDialog::DateEdit4_valueChanged( const QDate & )
}
-void itemAttributeDialog::TimeEdit4_valueChanged( const QTime & )
+void itemAttributeDialog::TimeEdit4_valueChanged( const TQTime & )
{
if ( !myItem) return;
- QDateTime dt;
+ TQDateTime dt;
dt.setDate( DateEdit4->date() );
dt.setTime( TimeEdit4->time() );
if ( dt.isValid() ) {
@@ -464,10 +464,10 @@ void itemAttributeDialog::TimeEdit4_valueChanged( const QTime & )
}
-void itemAttributeDialog::DateEdit5_valueChanged( const QDate & )
+void itemAttributeDialog::DateEdit5_valueChanged( const TQDate & )
{
if ( !myItem) return;
- QDateTime dt;
+ TQDateTime dt;
dt.setDate( DateEdit5->date() );
dt.setTime( TimeEdit5->time() );
if ( dt.isValid() ) {
@@ -477,10 +477,10 @@ void itemAttributeDialog::DateEdit5_valueChanged( const QDate & )
}
-void itemAttributeDialog::TimeEdit5_valueChanged( const QTime & )
+void itemAttributeDialog::TimeEdit5_valueChanged( const TQTime & )
{
if ( !myItem) return;
- QDateTime dt;
+ TQDateTime dt;
dt.setDate( DateEdit5->date() );
dt.setTime( TimeEdit5->time() );
if ( dt.isValid() ) {
@@ -491,10 +491,10 @@ void itemAttributeDialog::TimeEdit5_valueChanged( const QTime & )
-void itemAttributeDialog::itemName_textChanged( const QString & )
+void itemAttributeDialog::itemName_textChanged( const TQString & )
{
if ( !myItem) return;
- ((QListViewItem*)myItem)->setText( 0, itemName->text() );
+ ((TQListViewItem*)myItem)->setText( 0, itemName->text() );
setCaption( "Properties of " + itemName->text() );
}
diff --git a/kdgantt/qlayoutengine_p.h b/kdgantt/qlayoutengine_p.h
index 2d6a55685..fed046aeb 100644
--- a/kdgantt/qlayoutengine_p.h
+++ b/kdgantt/qlayoutengine_p.h
@@ -56,7 +56,7 @@
#ifndef QT_H
-#include "qabstractlayout.h"
+#include "tqabstractlayout.h"
#endif // QT_H
#ifndef QT_NO_LAYOUT
@@ -81,7 +81,7 @@ struct QLayoutStruct
};
-void qGeomCalc( QMemArray<QLayoutStruct> &chain, int start, int count, int pos,
+void qGeomCalc( TQMemArray<QLayoutStruct> &chain, int start, int count, int pos,
int space, int spacer );
diff --git a/kfile-plugins/ics/kfile_ics.cpp b/kfile-plugins/ics/kfile_ics.cpp
index a78ec0400..0d85344e7 100644
--- a/kfile-plugins/ics/kfile_ics.cpp
+++ b/kfile-plugins/ics/kfile_ics.cpp
@@ -18,8 +18,8 @@ t it will be useful,
*
*/
-#include <qdatetime.h>
-#include <qfile.h>
+#include <tqdatetime.h>
+#include <tqfile.h>
#include <libkcal/calendarlocal.h>
#include <libkcal/todo.h>
@@ -33,7 +33,7 @@ using namespace KCal;
typedef KGenericFactory<ICSPlugin> ICSFactory;
K_EXPORT_COMPONENT_FACTORY(kfile_ics, ICSFactory( "kfile_ics" ))
-ICSPlugin::ICSPlugin( QObject *parent, const char *name, const QStringList& args )
+ICSPlugin::ICSPlugin( TQObject *parent, const char *name, const TQStringList& args )
: KFilePlugin( parent, name, args )
{
KFileMimeTypeInfo* info = addMimeTypeInfo( "text/calendar" ); //TODO: vcs !!
@@ -41,13 +41,13 @@ ICSPlugin::ICSPlugin( QObject *parent, const char *name, const QStringList& args
KFileMimeTypeInfo::GroupInfo* group = 0L;
group = addGroupInfo(info, "ICSInfo", i18n("Calendar Statistics"));
- addItemInfo( group, "ProductID", i18n("Product ID"), QVariant::String );
- addItemInfo( group, "Events", i18n("Events"), QVariant::Int );
- addItemInfo( group, "Todos", i18n("To-dos"), QVariant::Int );
- addItemInfo( group, "TodoCompleted", i18n("Completed To-dos"), QVariant::Int );
- addItemInfo( group, "TodoOverdue", i18n("Overdue To-dos"), QVariant::Int );
- addItemInfo( group, "Journals", i18n("Journals"), QVariant::Int );
-// addItemInfo( group, "Reminders", i18n("Reminders"), QVariant::Int );
+ addItemInfo( group, "ProductID", i18n("Product ID"), TQVariant::String );
+ addItemInfo( group, "Events", i18n("Events"), TQVariant::Int );
+ addItemInfo( group, "Todos", i18n("To-dos"), TQVariant::Int );
+ addItemInfo( group, "TodoCompleted", i18n("Completed To-dos"), TQVariant::Int );
+ addItemInfo( group, "TodoOverdue", i18n("Overdue To-dos"), TQVariant::Int );
+ addItemInfo( group, "Journals", i18n("Journals"), TQVariant::Int );
+// addItemInfo( group, "Reminders", i18n("Reminders"), TQVariant::Int );
}
@@ -59,15 +59,15 @@ bool ICSPlugin::readInfo( KFileMetaInfo& info, uint /*what*/ )
{
KFileMetaInfoGroup group = appendGroup( info, "ICSInfo");
- CalendarLocal cal ( QString::fromLatin1( "UTC" ) );
+ CalendarLocal cal ( TQString::fromLatin1( "UTC" ) );
if( !cal.load( info.path() ) ) {
kdDebug() << "Could not load calendar" << endl;
return false;
}
- appendItem( group, "ProductID", QVariant( cal.productId() ) );
- appendItem( group, "Events", QVariant( int( cal.events().count() ) ) );
- appendItem( group, "Journals", QVariant( int( cal.journals().count() ) ) );
+ appendItem( group, "ProductID", TQVariant( cal.productId() ) );
+ appendItem( group, "Events", TQVariant( int( cal.events().count() ) ) );
+ appendItem( group, "Journals", TQVariant( int( cal.journals().count() ) ) );
Todo::List todos = cal.todos();
// count completed and overdue
@@ -80,13 +80,13 @@ bool ICSPlugin::readInfo( KFileMetaInfo& info, uint /*what*/ )
Todo *todo = *it;
if ( todo->isCompleted() )
++completed;
- else if ( todo->hasDueDate() && todo->dtDue().date() < QDate::currentDate() )
+ else if ( todo->hasDueDate() && todo->dtDue().date() < TQDate::currentDate() )
++overdue;
}
- appendItem( group, "Todos", QVariant( int(todos.count() ) ) );
- appendItem( group, "TodoCompleted", QVariant( completed ) );
- appendItem( group, "TodoOverdue", QVariant( overdue ) );
+ appendItem( group, "Todos", TQVariant( int(todos.count() ) ) );
+ appendItem( group, "TodoCompleted", TQVariant( completed ) );
+ appendItem( group, "TodoOverdue", TQVariant( overdue ) );
cal.close();
diff --git a/kfile-plugins/ics/kfile_ics.h b/kfile-plugins/ics/kfile_ics.h
index 27e7e43db..50f0b84c7 100644
--- a/kfile-plugins/ics/kfile_ics.h
+++ b/kfile-plugins/ics/kfile_ics.h
@@ -28,7 +28,7 @@ class ICSPlugin : public KFilePlugin
{
Q_OBJECT
public:
- ICSPlugin( QObject *parent, const char *name, const QStringList& args );
+ ICSPlugin( TQObject *parent, const char *name, const TQStringList& args );
virtual bool readInfo( KFileMetaInfo& info, uint what );
};
diff --git a/kfile-plugins/palm-databases/kfile_palm.cpp b/kfile-plugins/palm-databases/kfile_palm.cpp
index 3b6c13c3e..c38650766 100644
--- a/kfile-plugins/palm-databases/kfile_palm.cpp
+++ b/kfile-plugins/palm-databases/kfile_palm.cpp
@@ -24,8 +24,8 @@
#include <klocale.h>
#include <kgenericfactory.h>
-#include <qfile.h>
-#include <qdatetime.h>
+#include <tqfile.h>
+#include <tqdatetime.h>
#include <pi-file.h>
@@ -33,8 +33,8 @@ typedef KGenericFactory<KPalmPlugin> PalmFactory;
K_EXPORT_COMPONENT_FACTORY(kfile_palm, PalmFactory( "kfile_palm" ))
-KPalmPlugin::KPalmPlugin(QObject *parent, const char *name,
- const QStringList &args)
+KPalmPlugin::KPalmPlugin(TQObject *parent, const char *name,
+ const TQStringList &args)
: KFilePlugin(parent, name, args)
{
@@ -44,31 +44,31 @@ KPalmPlugin::KPalmPlugin(QObject *parent, const char *name,
KFileMimeTypeInfo::ItemInfo* item;
group = addGroupInfo(info, "General", i18n("General Information"));
- item = addItemInfo(group, "Name", i18n("Name"), QVariant::String);
- item = addItemInfo(group, "DBType", i18n("DB Type"), QVariant::String);
- item = addItemInfo(group, "TypeID", i18n("Type ID"), QVariant::String);
- item = addItemInfo(group, "CreatorID", i18n("Creator ID"), QVariant::String);
- item = addItemInfo(group, "NrRecords", i18n("# of Records"), QVariant::Int);
+ item = addItemInfo(group, "Name", i18n("Name"), TQVariant::String);
+ item = addItemInfo(group, "DBType", i18n("DB Type"), TQVariant::String);
+ item = addItemInfo(group, "TypeID", i18n("Type ID"), TQVariant::String);
+ item = addItemInfo(group, "CreatorID", i18n("Creator ID"), TQVariant::String);
+ item = addItemInfo(group, "NrRecords", i18n("# of Records"), TQVariant::Int);
group = addGroupInfo(info, "TimeStamps", i18n("Time Stamps"));
- item = addItemInfo(group, "CreationDate", i18n("Creation Date"), QVariant::DateTime);
- item = addItemInfo(group, "ModificationDate", i18n("Modification Date"), QVariant::DateTime);
- item = addItemInfo(group, "BackupDate", i18n("Backup Date"), QVariant::DateTime);
+ item = addItemInfo(group, "CreationDate", i18n("Creation Date"), TQVariant::DateTime);
+ item = addItemInfo(group, "ModificationDate", i18n("Modification Date"), TQVariant::DateTime);
+ item = addItemInfo(group, "BackupDate", i18n("Backup Date"), TQVariant::DateTime);
group = addGroupInfo(info, "Flags", i18n("Flags"));
- item = addItemInfo(group, "ReadOnly", i18n("Read-Only"), QVariant::String);
- item = addItemInfo(group, "MakeBackup", i18n("Make Backup"), QVariant::String);
- item = addItemInfo(group, "CopyProtected", i18n("Copy Protected"), QVariant::String);
- item = addItemInfo(group, "Reset", i18n("Reset Handheld After Installing"), QVariant::String);
- item = addItemInfo(group, "ExcludeFromSync", i18n("Exclude From Sync"), QVariant::String);
+ item = addItemInfo(group, "ReadOnly", i18n("Read-Only"), TQVariant::String);
+ item = addItemInfo(group, "MakeBackup", i18n("Make Backup"), TQVariant::String);
+ item = addItemInfo(group, "CopyProtected", i18n("Copy Protected"), TQVariant::String);
+ item = addItemInfo(group, "Reset", i18n("Reset Handheld After Installing"), TQVariant::String);
+ item = addItemInfo(group, "ExcludeFromSync", i18n("Exclude From Sync"), TQVariant::String);
}
bool KPalmPlugin::readInfo( KFileMetaInfo& info, uint /*what*/ )
{
int nrRec;
- QString tempName = info.path();
- QCString fileName = QFile::encodeName(tempName);
+ TQString tempName = info.path();
+ TQCString fileName = TQFile::encodeName(tempName);
pi_file *dbFile = pi_file_open(const_cast < char *>((const char *) fileName));
if (dbFile == 0L) return false;
@@ -93,7 +93,7 @@ bool KPalmPlugin::readInfo( KFileMetaInfo& info, uint /*what*/ )
KFileMetaInfoGroup timeGroup = appendGroup(info, "TimeStamps");
- QDateTime tm;
+ TQDateTime tm;
tm.setTime_t( dBInfo.createDate );
appendItem(timeGroup, "CreationDate", tm);
tm.setTime_t( dBInfo.modifyDate );
diff --git a/kfile-plugins/palm-databases/kfile_palm.h b/kfile-plugins/palm-databases/kfile_palm.h
index fcd928a00..d397d49de 100644
--- a/kfile-plugins/palm-databases/kfile_palm.h
+++ b/kfile-plugins/palm-databases/kfile_palm.h
@@ -31,7 +31,7 @@ class KPalmPlugin: public KFilePlugin
Q_OBJECT
public:
- KPalmPlugin( QObject *parent, const char *name, const QStringList& args );
+ KPalmPlugin( TQObject *parent, const char *name, const TQStringList& args );
virtual bool readInfo( KFileMetaInfo& info, uint what);
// virtual bool writeInfo( const KFileMetaInfo& info ) const;
diff --git a/kfile-plugins/rfc822/kfile_rfc822.cpp b/kfile-plugins/rfc822/kfile_rfc822.cpp
index 794d335d6..6d2488841 100644
--- a/kfile-plugins/rfc822/kfile_rfc822.cpp
+++ b/kfile-plugins/rfc822/kfile_rfc822.cpp
@@ -26,11 +26,11 @@
#include <kstringvalidator.h>
#include <kdebug.h>
-#include <qdict.h>
-#include <qvalidator.h>
-#include <qcstring.h>
-#include <qfile.h>
-#include <qdatetime.h>
+#include <tqdict.h>
+#include <tqvalidator.h>
+#include <tqcstring.h>
+#include <tqfile.h>
+#include <tqdatetime.h>
#if !defined(__osf__)
#include <inttypes.h>
@@ -42,8 +42,8 @@ typedef KGenericFactory<KRfc822Plugin> Rfc822Factory;
K_EXPORT_COMPONENT_FACTORY(kfile_rfc822, Rfc822Factory( "kfile_rfc822" ))
-KRfc822Plugin::KRfc822Plugin(QObject *parent, const char *name,
- const QStringList &args)
+KRfc822Plugin::KRfc822Plugin(TQObject *parent, const char *name,
+ const TQStringList &args)
: KFilePlugin(parent, name, args)
{
@@ -55,27 +55,27 @@ KRfc822Plugin::KRfc822Plugin(QObject *parent, const char *name,
KFileMimeTypeInfo::ItemInfo* item;
- item = addItemInfo(group, "From", i18n("From"), QVariant::String);
- item = addItemInfo(group, "To", i18n("To"), QVariant::String);
- item = addItemInfo(group, "Subject", i18n("Subject"), QVariant::String);
- item = addItemInfo(group, "Date", i18n("Date"), QVariant::String);
- item = addItemInfo(group, "Content-Type", i18n("Content-Type"), QVariant::String);
+ item = addItemInfo(group, "From", i18n("From"), TQVariant::String);
+ item = addItemInfo(group, "To", i18n("To"), TQVariant::String);
+ item = addItemInfo(group, "Subject", i18n("Subject"), TQVariant::String);
+ item = addItemInfo(group, "Date", i18n("Date"), TQVariant::String);
+ item = addItemInfo(group, "Content-Type", i18n("Content-Type"), TQVariant::String);
}
bool KRfc822Plugin::readInfo( KFileMetaInfo& info, uint /*what*/ )
{
- QFile file(info.path());
+ TQFile file(info.path());
if (!file.open(IO_ReadOnly))
{
- kdDebug(7034) << "Couldn't open " << QFile::encodeName(info.path()) << endl;
+ kdDebug(7034) << "Couldn't open " << TQFile::encodeName(info.path()) << endl;
return false;
}
/*
- Note to self: probably should use QCString for all this, but
+ Note to self: probably should use TQCString for all this, but
what we're doing is simple and self-contained so never mind..
*/
diff --git a/kfile-plugins/rfc822/kfile_rfc822.h b/kfile-plugins/rfc822/kfile_rfc822.h
index f2066754a..e78cd3f55 100644
--- a/kfile-plugins/rfc822/kfile_rfc822.h
+++ b/kfile-plugins/rfc822/kfile_rfc822.h
@@ -29,7 +29,7 @@ class KRfc822Plugin: public KFilePlugin
Q_OBJECT
public:
- KRfc822Plugin( QObject *parent, const char *name, const QStringList& args );
+ KRfc822Plugin( TQObject *parent, const char *name, const TQStringList& args );
virtual bool readInfo( KFileMetaInfo& info, uint what);
};
diff --git a/kfile-plugins/vcf/kfile_vcf.cpp b/kfile-plugins/vcf/kfile_vcf.cpp
index f9440f6d1..76b3383c6 100644
--- a/kfile-plugins/vcf/kfile_vcf.cpp
+++ b/kfile-plugins/vcf/kfile_vcf.cpp
@@ -26,15 +26,15 @@
#include <kgenericfactory.h>
#include <kabc/vcardconverter.h>
-#include <qdict.h>
-#include <qfile.h>
+#include <tqdict.h>
+#include <tqfile.h>
typedef KGenericFactory<KVcfPlugin> VcfFactory;
K_EXPORT_COMPONENT_FACTORY(kfile_vcf, VcfFactory( "kfile_vcf" ))
-KVcfPlugin::KVcfPlugin(QObject *parent, const char *name,
- const QStringList &args)
+KVcfPlugin::KVcfPlugin(TQObject *parent, const char *name,
+ const TQStringList &args)
: KFilePlugin(parent, name, args)
{
@@ -46,25 +46,25 @@ KVcfPlugin::KVcfPlugin(QObject *parent, const char *name,
KFileMimeTypeInfo::ItemInfo* item;
- item = addItemInfo(group, "Name", i18n("Name"), QVariant::String);
- item = addItemInfo(group, "Email", i18n("Email"), QVariant::String);
- item = addItemInfo(group, "Telephone", i18n("Telephone"), QVariant::String);
+ item = addItemInfo(group, "Name", i18n("Name"), TQVariant::String);
+ item = addItemInfo(group, "Email", i18n("Email"), TQVariant::String);
+ item = addItemInfo(group, "Telephone", i18n("Telephone"), TQVariant::String);
}
bool KVcfPlugin::readInfo( KFileMetaInfo& info, uint /*what*/ )
{
- QFile file(info.path());
+ TQFile file(info.path());
if (!file.open(IO_ReadOnly))
{
- kdDebug(7034) << "Couldn't open " << QFile::encodeName(info.path()) << endl;
+ kdDebug(7034) << "Couldn't open " << TQFile::encodeName(info.path()) << endl;
return false;
}
- // even the vcard thumbnail QString::fromUtf8(buf_name));creator reads the full file ...
+ // even the vcard thumbnail TQString::fromUtf8(buf_name));creator reads the full file ...
// The following is partly copied from there
- QString contents = file.readAll();
+ TQString contents = file.readAll();
file.close();
KABC::VCardConverter converter;
@@ -73,7 +73,7 @@ bool KVcfPlugin::readInfo( KFileMetaInfo& info, uint /*what*/ )
KFileMetaInfoGroup group = appendGroup(info, "Technical");
// prepare the text
- QString name = addr.formattedName().simplifyWhiteSpace();
+ TQString name = addr.formattedName().simplifyWhiteSpace();
if ( name.isEmpty() )
name = addr.givenName() + " " + addr.familyName();
name = name.simplifyWhiteSpace();
@@ -85,9 +85,9 @@ bool KVcfPlugin::readInfo( KFileMetaInfo& info, uint /*what*/ )
appendItem(group, "Email", addr.preferredEmail());
KABC::PhoneNumber::List pnList = addr.phoneNumbers();
- QStringList phoneNumbers;
+ TQStringList phoneNumbers;
for (unsigned int no=0; no<pnList.count(); ++no) {
- QString pn = pnList[no].number().simplifyWhiteSpace();
+ TQString pn = pnList[no].number().simplifyWhiteSpace();
if (!pn.isEmpty() && !phoneNumbers.contains(pn))
phoneNumbers.append(pn);
}
diff --git a/kfile-plugins/vcf/kfile_vcf.h b/kfile-plugins/vcf/kfile_vcf.h
index a0b147c63..3bd75fb48 100644
--- a/kfile-plugins/vcf/kfile_vcf.h
+++ b/kfile-plugins/vcf/kfile_vcf.h
@@ -29,7 +29,7 @@ class KVcfPlugin: public KFilePlugin
Q_OBJECT
public:
- KVcfPlugin( QObject *parent, const char *name, const QStringList& args );
+ KVcfPlugin( TQObject *parent, const char *name, const TQStringList& args );
virtual bool readInfo( KFileMetaInfo& info, uint what);
};
diff --git a/kgantt/kgantt/KGantt.cpp b/kgantt/kgantt/KGantt.cpp
index 6e2c01c0a..f16d47762 100644
--- a/kgantt/kgantt/KGantt.cpp
+++ b/kgantt/kgantt/KGantt.cpp
@@ -9,14 +9,14 @@
#include "KGantt.h"
-#include <qcolor.h>
-#include <qstylefactory.h>
-#include <qscrollview.h>
+#include <tqcolor.h>
+#include <tqstylefactory.h>
+#include <tqscrollview.h>
KGantt::KGantt(KGanttItem* toplevelitem,
- QWidget* parent, const char * name, WFlags f)
- : QWidget(parent,name,f)
+ TQWidget* parent, const char * name, WFlags f)
+ : TQWidget(parent,name,f)
{
#ifdef _DEBUG_
printf("KGantt::KGantt()\n");
@@ -24,8 +24,8 @@ KGantt::KGantt(KGanttItem* toplevelitem,
if(toplevelitem == 0) {
_toplevelitem = new KGanttItem(0, "toplevelitem",
- QDateTime::currentDateTime(),
- QDateTime::currentDateTime() );
+ TQDateTime::currentDateTime(),
+ TQDateTime::currentDateTime() );
_toplevelitem->setMode(KGanttItem::Rubberband);
_deleteItem = true;
}
@@ -34,19 +34,19 @@ KGantt::KGantt(KGanttItem* toplevelitem,
_deleteItem = false;
}
- setBackgroundColor(QColor(white));
+ setBackgroundColor(TQColor(white));
- _splitter = new QSplitter(this);
+ _splitter = new TQSplitter(this);
/*
-// QStyle *cdestyle=QStyleFactory::create("CDE");
+// TQStyle *cdestyle=TQStyleFactory::create("CDE");
// if(cdestyle)
// _splitter->setStyle(cdestyle);
*/
- QPalette pal1(_splitter->palette());
-/* QPalette pal(_splitter->palette());
- QColorGroup cg(pal.active());
- cg.setColor( QColorGroup::Foreground, blue );
- cg.setColor( QColorGroup::Background, white );
+ TQPalette pal1(_splitter->palette());
+/* TQPalette pal(_splitter->palette());
+ TQColorGroup cg(pal.active());
+ cg.setColor( TQColorGroup::Foreground, blue );
+ cg.setColor( TQColorGroup::Background, white );
pal.setActive( cg );
_splitter->setPalette(pal);*/
@@ -58,8 +58,8 @@ KGantt::KGantt(KGanttItem* toplevelitem,
_ganttbar = new xQGanttBarView(_toplevelitem, _splitter);
_ganttbar->setPalette(pal1);
- connect(_ganttbar, SIGNAL(contentsMoving(int,int)),
- _ganttlist, SLOT(contentsMoved(int,int)));
+ connect(_ganttbar, TQT_SIGNAL(contentsMoving(int,int)),
+ _ganttlist, TQT_SLOT(contentsMoved(int,int)));
_ganttlist->setBarView(_ganttbar);
@@ -81,7 +81,7 @@ void
KGantt::dumpItems()
/////////////////////////
{
- QTextOStream cout(stdout);
+ TQTextOStream cout(stdout);
cout << "\n<Gantt>\n";
cout << " start : " << _toplevelitem->getStart().toString() << endl;
diff --git a/kgantt/kgantt/KGantt.h b/kgantt/kgantt/KGantt.h
index 90c3b86f9..fbde52d73 100644
--- a/kgantt/kgantt/KGantt.h
+++ b/kgantt/kgantt/KGantt.h
@@ -34,8 +34,8 @@
*/
-#include <qwidget.h>
-#include <qsplitter.h>
+#include <tqwidget.h>
+#include <tqsplitter.h>
#include <kpopupmenu.h>
#include <kdepimmacros.h>
@@ -66,8 +66,8 @@
KGanttItem* t1 = new KGanttItem(toplevel,
"task 1, no subtasks",
- QDateTime::currentDateTime().addDays(10),
- QDateTime::currentDateTime().addDays(20) );
+ TQDateTime::currentDateTime().addDays(10),
+ TQDateTime::currentDateTime().addDays(20) );
...
@@ -102,7 +102,7 @@ public:
*
*/
KGantt(KGanttItem* toplevelitem = 0,
- QWidget* parent = 0, const char * name=0, WFlags f=0 );
+ TQWidget* parent = 0, const char * name=0, WFlags f=0 );
/// Destructor.
@@ -158,7 +158,7 @@ public:
- QSplitter* splitter() {
+ TQSplitter* splitter() {
return _splitter;
}
@@ -194,7 +194,7 @@ public:
* you want to access the pointer to a already created toolbar you
* can invoke this method without any parameter.
*/
- KToolBar* toolbar(QMainWindow* mw = 0) {
+ KToolBar* toolbar(TQMainWindow* mw = 0) {
return _ganttbar->viewport()->toolbar(mw);
}
@@ -212,7 +212,7 @@ public:
/*!
* All selected KGanttItems will be added to the passed list.
*/
- void getSelectedItems(QPtrList<KGanttItem>& list) {
+ void getSelectedItems(TQPtrList<KGanttItem>& list) {
_ganttbar->viewport()->getSelectedItems(list);
}
@@ -296,7 +296,7 @@ public slots:
protected:
- void resizeEvent(QResizeEvent* /*e*/) {
+ void resizeEvent(TQResizeEvent* /*e*/) {
_splitter->resize(width(),height());
};
@@ -305,7 +305,7 @@ private:
KGanttItem* _toplevelitem;
- QSplitter *_splitter;
+ TQSplitter *_splitter;
xQGanttBarView* _ganttbar;
xQGanttListView* _ganttlist;
diff --git a/kgantt/kgantt/KGanttBarConfig.cpp b/kgantt/kgantt/KGanttBarConfig.cpp
index d5faa208a..ff5f4ee8e 100644
--- a/kgantt/kgantt/KGanttBarConfig.cpp
+++ b/kgantt/kgantt/KGanttBarConfig.cpp
@@ -13,20 +13,20 @@
KGanttBarConfig::KGanttBarConfig(xQGanttBarView* barview,
- QWidget* parent,
+ TQWidget* parent,
const char * name, WFlags f)
- : QWidget(parent,name,f)
+ : TQWidget(parent,name,f)
{
_barview = barview;
KColorButton* b = new KColorButton(this);
- connect(b, SIGNAL(changed(const QColor&)),
- this, SLOT(changeBackground(const QColor&)));
+ connect(b, TQT_SIGNAL(changed(const TQColor&)),
+ this, TQT_SLOT(changeBackground(const TQColor&)));
}
-void KGanttBarConfig::changeBackground(const QColor& color) {
+void KGanttBarConfig::changeBackground(const TQColor& color) {
_barview->viewport()->setBackgroundColor(color);
}
#include "KGanttBarConfig.moc"
diff --git a/kgantt/kgantt/KGanttBarConfig.h b/kgantt/kgantt/KGanttBarConfig.h
index 5be04f72d..88049feae 100644
--- a/kgantt/kgantt/KGanttBarConfig.h
+++ b/kgantt/kgantt/KGanttBarConfig.h
@@ -29,7 +29,7 @@
*/
-#include <qwidget.h>
+#include <tqwidget.h>
class xQGanttBarView;
@@ -42,12 +42,12 @@ class KGanttBarConfig : public QWidget
public:
KGanttBarConfig(xQGanttBarView* barview,
- QWidget* parent = 0, const char* name=0, WFlags f=0);
+ TQWidget* parent = 0, const char* name=0, WFlags f=0);
protected slots:
- void changeBackground(const QColor& color);
+ void changeBackground(const TQColor& color);
protected:
diff --git a/kgantt/kgantt/KGanttItem.cpp b/kgantt/kgantt/KGanttItem.cpp
index 9b086ae58..4ddddf01a 100644
--- a/kgantt/kgantt/KGanttItem.cpp
+++ b/kgantt/kgantt/KGanttItem.cpp
@@ -9,12 +9,12 @@
#include "KGanttItem.h"
-QBrush KGanttItem::_selectBrush(QColor(255,0,0));
+TQBrush KGanttItem::_selectBrush(TQColor(255,0,0));
-KGanttItem::KGanttItem(KGanttItem* parentItem, const QString& text,
- const QDateTime& start, const QDateTime& end)
- : QObject()
+KGanttItem::KGanttItem(KGanttItem* parentItem, const TQString& text,
+ const TQDateTime& start, const TQDateTime& end)
+ : TQObject()
////////////////////////////////////////////////////////
{
init(parentItem,text, start,end);
@@ -22,9 +22,9 @@ KGanttItem::KGanttItem(KGanttItem* parentItem, const QString& text,
-KGanttItem::KGanttItem(KGanttItem* parentItem, const QString& text,
- const QDateTime& start, long durationMin)
- : QObject()
+KGanttItem::KGanttItem(KGanttItem* parentItem, const TQString& text,
+ const TQDateTime& start, long durationMin)
+ : TQObject()
////////////////////////////////////////////////////////
{
init(parentItem, text, start, start.addSecs( durationMin * 60));
@@ -33,8 +33,8 @@ KGanttItem::KGanttItem(KGanttItem* parentItem, const QString& text,
void
-KGanttItem::init(KGanttItem* parentItem, const QString& text,
- const QDateTime& start, const QDateTime& end)
+KGanttItem::init(KGanttItem* parentItem, const TQString& text,
+ const TQDateTime& start, const TQDateTime& end)
///////////////////////////////////////////////////////////////
{
_style = DrawAll - DrawHandle;
@@ -44,9 +44,9 @@ KGanttItem::init(KGanttItem* parentItem, const QString& text,
_mode = Normal;
- _brush = QBrush(QColor(140,140,255));
- _pen = QPen(QColor(100,100,100));
- _textPen = QPen(QColor(black));
+ _brush = TQBrush(TQColor(140,140,255));
+ _pen = TQPen(TQColor(100,100,100));
+ _textPen = TQPen(TQColor(black));
_height = 24;
@@ -88,14 +88,14 @@ KGanttItem::~KGanttItem()
KGanttRelation*
KGanttItem::addRelation(KGanttItem* from, KGanttItem* to,
- const QString& text)
+ const TQString& text)
{
if(_subitems.containsRef(from) > 0 && _subitems.containsRef(to) >0) {
KGanttRelation* rel = new KGanttRelation(from,to,text);
_relations.append(rel);
- connect(rel, SIGNAL(destroyed(KGanttRelation*)),
- this, SLOT(removeRelation(KGanttRelation*)));
+ connect(rel, TQT_SIGNAL(destroyed(KGanttRelation*)),
+ this, TQT_SLOT(removeRelation(KGanttRelation*)));
emit changed(this, RelationAdded);
return rel;
@@ -130,8 +130,8 @@ KGanttItem::registerItem(KGanttItem* item)
{
_subitems.append(item);
- connect(item, SIGNAL(changed(KGanttItem*, KGanttItem::Change)),
- this, SLOT(subItemChanged(KGanttItem*, KGanttItem::Change)) );
+ connect(item, TQT_SIGNAL(changed(KGanttItem*, KGanttItem::Change)),
+ this, TQT_SLOT(subItemChanged(KGanttItem*, KGanttItem::Change)) );
bool minChanged = false;
bool maxChanged = false;
@@ -204,7 +204,7 @@ KGanttItem::unregisterItem(KGanttItem* item)
-QDateTime
+TQDateTime
KGanttItem::getStart()
{
if(_mode == Rubberband && _subitems.count()>0)
@@ -216,7 +216,7 @@ KGanttItem::getStart()
-QDateTime
+TQDateTime
KGanttItem::getEnd()
/////////////////
{
@@ -229,7 +229,7 @@ KGanttItem::getEnd()
void
-KGanttItem::setStart(const QDateTime& start)
+KGanttItem::setStart(const TQDateTime& start)
{
if(!_editable) return;
@@ -266,7 +266,7 @@ KGanttItem::setStart(const QDateTime& start)
void
-KGanttItem::setEnd(const QDateTime& end)
+KGanttItem::setEnd(const TQDateTime& end)
{
if(!_editable) return;
@@ -339,8 +339,8 @@ KGanttItem::adjustMinMax()
// _min = start and _max = end.
//
- QDateTime min = _minDateTime;
- QDateTime max = _maxDateTime;
+ TQDateTime min = _minDateTime;
+ TQDateTime max = _maxDateTime;
Change c = NoChange;
if(_subitems.count()==0) {
@@ -419,7 +419,7 @@ KGanttItem::subItemChanged(KGanttItem* /*item*/, Change change)
void
-KGanttItem::setText(const QString& text)
+KGanttItem::setText(const TQString& text)
///////////////////////////////////////
{
if(!_editable) return;
@@ -500,7 +500,7 @@ KGanttItem::setStyle(int flag, bool includeSubItems)
void
-KGanttItem::setBrush(const QBrush& brush)
+KGanttItem::setBrush(const TQBrush& brush)
///////////////////////////////////////
{
_brush = brush;
@@ -509,7 +509,7 @@ KGanttItem::setBrush(const QBrush& brush)
void
-KGanttItem::setPen(const QPen& pen)
+KGanttItem::setPen(const TQPen& pen)
///////////////////////////////
{
_pen = pen;
@@ -562,7 +562,7 @@ KGanttItem::getWidth()
void
-KGanttItem::dump(QTextOStream& cout, const QString& pre)
+KGanttItem::dump(TQTextOStream& cout, const TQString& pre)
////////////////////////////////////////////////////
{
cout << pre << "<Item. text = [" << _text << "]>\n";
@@ -599,7 +599,7 @@ QString
KGanttItem::ChangeAsString(Change c)
//////////////////////////////////
{
- QString ret;
+ TQString ret;
if(c & StartChanged) ret += "StartChanged, ";
if(c & EndChanged) ret += "EndChanged, ";
diff --git a/kgantt/kgantt/KGanttItem.h b/kgantt/kgantt/KGanttItem.h
index 0528e4782..9971508cc 100644
--- a/kgantt/kgantt/KGanttItem.h
+++ b/kgantt/kgantt/KGanttItem.h
@@ -32,11 +32,11 @@
*/
-#include <qobject.h>
-#include <qdatetime.h>
-#include <qtextstream.h>
-#include <qptrlist.h>
-#include <qpainter.h>
+#include <tqobject.h>
+#include <tqdatetime.h>
+#include <tqtextstream.h>
+#include <tqptrlist.h>
+#include <tqpainter.h>
#include <kdepimmacros.h>
@@ -138,8 +138,8 @@ public:
/*!
*
*/
- KGanttItem(KGanttItem* parentItem, const QString& text,
- const QDateTime& start, const QDateTime& end);
+ KGanttItem(KGanttItem* parentItem, const TQString& text,
+ const TQDateTime& start, const TQDateTime& end);
@@ -147,8 +147,8 @@ public:
/*!
*
*/
- KGanttItem(KGanttItem* parentItem, const QString& text,
- const QDateTime& start, long durationMin);
+ KGanttItem(KGanttItem* parentItem, const TQString& text,
+ const TQDateTime& start, long durationMin);
@@ -165,7 +165,7 @@ public:
*
*/
KGanttRelation* addRelation(KGanttItem* from, KGanttItem* to,
- const QString& text);
+ const TQString& text);
@@ -262,7 +262,7 @@ public:
/*!
*
*/
- void setBrush(const QBrush& brush);
+ void setBrush(const TQBrush& brush);
@@ -270,7 +270,7 @@ public:
/*!
*
*/
- QBrush& getBrush() {
+ TQBrush& getBrush() {
return _brush;
}
@@ -280,7 +280,7 @@ public:
/*!
*
*/
- QBrush& getSelectBrush() {
+ TQBrush& getSelectBrush() {
return _selectBrush;
}
@@ -290,7 +290,7 @@ public:
/*!
*
*/
- void setPen(const QPen& pen);
+ void setPen(const TQPen& pen);
@@ -298,7 +298,7 @@ public:
/*!
*
*/
- QPen& getPen() {
+ TQPen& getPen() {
return _pen;
}
@@ -308,7 +308,7 @@ public:
/*!
*
*/
- void setTextPen(const QPen& pen) {
+ void setTextPen(const TQPen& pen) {
_textPen = pen;
}
@@ -318,7 +318,7 @@ public:
/*!
*
*/
- QPen& getTextPen() {
+ TQPen& getTextPen() {
return _textPen;
}
@@ -328,7 +328,7 @@ public:
/*!
*
*/
- void setText(const QString& text);
+ void setText(const TQString& text);
@@ -336,7 +336,7 @@ public:
/*!
*
*/
- QString getText() { return _text; }
+ TQString getText() { return _text; }
@@ -346,7 +346,7 @@ public:
* subitems, start of the item is determined by the start of the
* earliest subitem. <br>
*/
- QDateTime getStart();
+ TQDateTime getStart();
@@ -354,7 +354,7 @@ public:
/*!
*
*/
- QDateTime getEnd();
+ TQDateTime getEnd();
@@ -362,7 +362,7 @@ public:
/*!
*
*/
- void setStart(const QDateTime& start);
+ void setStart(const TQDateTime& start);
@@ -370,7 +370,7 @@ public:
/*!
*
*/
- void setEnd(const QDateTime& end);
+ void setEnd(const TQDateTime& end);
@@ -417,7 +417,7 @@ public:
/*!
*
*/
- QPtrList<KGanttItem>& getSubItems() {
+ TQPtrList<KGanttItem>& getSubItems() {
return _subitems;
}
@@ -427,7 +427,7 @@ public:
/*!
*
*/
- QPtrList<KGanttRelation>& getRelations() {
+ TQPtrList<KGanttRelation>& getRelations() {
return _relations;
}
@@ -457,7 +457,7 @@ public:
/*!
*
*/
- static QString ChangeAsString(Change c);
+ static TQString ChangeAsString(Change c);
@@ -466,7 +466,7 @@ public:
/*!
*
*/
- void dump(QTextOStream& cout, const QString& pre);
+ void dump(TQTextOStream& cout, const TQString& pre);
signals:
@@ -501,8 +501,8 @@ private:
void registerItem(KGanttItem* item);
void unregisterItem(KGanttItem* item);
- void init(KGanttItem* parentItem, const QString& text,
- const QDateTime& start, const QDateTime& end);
+ void init(KGanttItem* parentItem, const TQString& text,
+ const TQDateTime& start, const TQDateTime& end);
// set min/max date and time according to subitems
@@ -526,21 +526,21 @@ private:
KGanttItem* _parentItem;
- QPtrList<KGanttItem> _subitems;
- QPtrList<KGanttRelation> _relations;
+ TQPtrList<KGanttItem> _subitems;
+ TQPtrList<KGanttRelation> _relations;
// start/end date.
// start must always be earlier then _minDateTime
// end must always be later then _maxDateTime
- QDateTime _start, _end, _minDateTime, _maxDateTime;
+ TQDateTime _start, _end, _minDateTime, _maxDateTime;
- QString _text;
+ TQString _text;
- QBrush _brush;
- QPen _pen, _textPen;
+ TQBrush _brush;
+ TQPen _pen, _textPen;
- static QBrush _selectBrush;
+ static TQBrush _selectBrush;
};
diff --git a/kgantt/kgantt/KGanttRelation.cpp b/kgantt/kgantt/KGanttRelation.cpp
index b9123acc2..f95deea10 100644
--- a/kgantt/kgantt/KGanttRelation.cpp
+++ b/kgantt/kgantt/KGanttRelation.cpp
@@ -10,24 +10,24 @@
#include "KGanttItem.h"
-QPen KGanttRelation::_selectPen(QColor(255,0,0));
+TQPen KGanttRelation::_selectPen(TQColor(255,0,0));
KGanttRelation::KGanttRelation(KGanttItem* from, KGanttItem* to,
- const QString& text )
- : QObject()
+ const TQString& text )
+ : TQObject()
////////////////////////////////////////////////////////
{
_from = from;
_to = to;
_text = text;
- _pen = QPen(QColor(20,20,20),1);
+ _pen = TQPen(TQColor(20,20,20),1);
- connect(from, SIGNAL(destroyed(KGanttItem*)),
- this, SLOT(itemDestroyed(KGanttItem*)));
+ connect(from, TQT_SIGNAL(destroyed(KGanttItem*)),
+ this, TQT_SLOT(itemDestroyed(KGanttItem*)));
- connect(to, SIGNAL(destroyed(KGanttItem*)),
- this, SLOT(itemDestroyed(KGanttItem*)));
+ connect(to, TQT_SIGNAL(destroyed(KGanttItem*)),
+ this, TQT_SLOT(itemDestroyed(KGanttItem*)));
}
@@ -77,7 +77,7 @@ KGanttRelation::itemDestroyed(KGanttItem* /*item*/)
void
-KGanttRelation::setText(const QString& text)
+KGanttRelation::setText(const TQString& text)
///////////////////////////////////////
{
if(!_editable) return;
@@ -107,7 +107,7 @@ KGanttRelation::select(bool f)
void
-KGanttRelation::setPen(const QPen& pen)
+KGanttRelation::setPen(const TQPen& pen)
{
_pen = pen;
}
@@ -116,7 +116,7 @@ KGanttRelation::setPen(const QPen& pen)
void
-KGanttRelation::dump(QTextOStream& cout, const QString& pre)
+KGanttRelation::dump(TQTextOStream& cout, const TQString& pre)
{
cout << pre << "<Relation. text = [" << _text << "]>\n";
@@ -142,7 +142,7 @@ QString
KGanttRelation::ChangeAsString(Change c)
//////////////////////////////////
{
- QString ret;
+ TQString ret;
/*
if(c & StartChanged) ret += "StartChanged, ";
diff --git a/kgantt/kgantt/KGanttRelation.h b/kgantt/kgantt/KGanttRelation.h
index 26baf7c4b..548789500 100644
--- a/kgantt/kgantt/KGanttRelation.h
+++ b/kgantt/kgantt/KGanttRelation.h
@@ -28,11 +28,11 @@
*/
-#include <qobject.h>
-#include <qdatetime.h>
-#include <qtextstream.h>
-#include <qptrlist.h>
-#include <qpainter.h>
+#include <tqobject.h>
+#include <tqdatetime.h>
+#include <tqtextstream.h>
+#include <tqptrlist.h>
+#include <tqpainter.h>
class KGanttItem;
@@ -113,7 +113,7 @@ public:
/*!
*
*/
- QPen& getSelectPen() {
+ TQPen& getSelectPen() {
return _selectPen;
}
@@ -123,7 +123,7 @@ public:
/*!
*
*/
- void setPen(const QPen& pen);
+ void setPen(const TQPen& pen);
@@ -131,7 +131,7 @@ public:
/*!
*
*/
- QPen& getPen() {
+ TQPen& getPen() {
return _pen;
}
@@ -141,7 +141,7 @@ public:
/*!
*
*/
- void setTextPen(const QPen& pen) {
+ void setTextPen(const TQPen& pen) {
_textPen = pen;
}
@@ -151,7 +151,7 @@ public:
/*!
*
*/
- QPen& getTextPen() {
+ TQPen& getTextPen() {
return _textPen;
}
@@ -161,7 +161,7 @@ public:
/*!
*
*/
- void setText(const QString& text);
+ void setText(const TQString& text);
@@ -169,7 +169,7 @@ public:
/*!
*
*/
- QString getText() { return _text; }
+ TQString getText() { return _text; }
@@ -195,10 +195,10 @@ public:
/*!
*
*/
- void dump(QTextOStream& cout, const QString& pre);
+ void dump(TQTextOStream& cout, const TQString& pre);
- QString ChangeAsString(Change c);
+ TQString ChangeAsString(Change c);
signals:
@@ -232,7 +232,7 @@ protected:
*
*/
KGanttRelation(KGanttItem* from, KGanttItem* to,
- const QString& text );
+ const TQString& text );
private:
@@ -245,11 +245,11 @@ private:
KGanttItem* _from;
KGanttItem* _to;
- QString _text;
+ TQString _text;
- QPen _pen, _textPen;
+ TQPen _pen, _textPen;
- static QPen _selectPen;
+ static TQPen _selectPen;
};
diff --git a/kgantt/kgantt/xQGanttBarView.cpp b/kgantt/kgantt/xQGanttBarView.cpp
index 4a79de600..7cc410d11 100644
--- a/kgantt/kgantt/xQGanttBarView.cpp
+++ b/kgantt/kgantt/xQGanttBarView.cpp
@@ -12,18 +12,18 @@
xQGanttBarView::xQGanttBarView(KGanttItem* toplevelitem,
- QWidget* parent,
+ TQWidget* parent,
const char * name, WFlags f)
- : QScrollView(parent,name,f)
+ : TQScrollView(parent,name,f)
{
_config = NULL;
_toplevelitem = toplevelitem;
- setFrameStyle(QFrame::Sunken);
+ setFrameStyle(TQFrame::Sunken);
setLineWidth(1);
- _headerBackBrush = QBrush(QColor(250,250,250));
+ _headerBackBrush = TQBrush(TQColor(250,250,250));
setMargins( 1, TOPMARGIN , 1, 1 );
@@ -33,14 +33,14 @@ xQGanttBarView::xQGanttBarView(KGanttItem* toplevelitem,
_viewport->setMode(xQGanttBarViewPort::Select);
- connect(_viewport, SIGNAL(scroll(int,int)),
- this, SLOT(scrollBy(int,int)) );
+ connect(_viewport, TQT_SIGNAL(scroll(int,int)),
+ this, TQT_SLOT(scrollBy(int,int)) );
- connect(_viewport, SIGNAL(recalculated()),
- this, SLOT(drawHeader()) );
+ connect(_viewport, TQT_SIGNAL(recalculated()),
+ this, TQT_SLOT(drawHeader()) );
- connect(horizontalScrollBar(), SIGNAL(valueChanged(int)),
- this, SLOT(horizontalScrollBarChanged(int)) );
+ connect(horizontalScrollBar(), TQT_SIGNAL(valueChanged(int)),
+ this, TQT_SLOT(horizontalScrollBarChanged(int)) );
}
@@ -67,12 +67,12 @@ void
xQGanttBarView::drawHeader()
////////////////////////////////
{
- static QPen _dotPen( QColor(35,35,35), 0, DotLine);
- static QPen _normalPen(QColor(0,0,0));
- static QPen _redPen(QColor(254,0,0));
- static QPen _greyPen(QColor(150,150,150));
+ static TQPen _dotPen( TQColor(35,35,35), 0, DotLine);
+ static TQPen _normalPen(TQColor(0,0,0));
+ static TQPen _redPen(TQColor(254,0,0));
+ static TQPen _greyPen(TQColor(150,150,150));
- QPainter p(this);
+ TQPainter p(this);
p.setPen( _normalPen );
p.fillRect(0,0,width(),TOPMARGIN, _headerBackBrush );
@@ -87,10 +87,10 @@ xQGanttBarView::drawHeader()
int wx = _viewport->worldX(contentsX());
- QDate startDate = _toplevelitem->getStart().addSecs( wx * 60 ).date();
+ TQDate startDate = _toplevelitem->getStart().addSecs( wx * 60 ).date();
wx = _viewport->worldX(contentsX()+width());
- QDate endDate = _toplevelitem->getStart().addSecs( wx * 60 ).date();
+ TQDate endDate = _toplevelitem->getStart().addSecs( wx * 60 ).date();
endDate = endDate.addDays(1);
int end = (int) startDate.daysTo(endDate);
@@ -98,12 +98,12 @@ xQGanttBarView::drawHeader()
// draw week, which first day is not visible
- QDate t = startDate.addDays(-startDate.dayOfWeek()+1);
+ TQDate t = startDate.addDays(-startDate.dayOfWeek()+1);
tmp = _toplevelitem->getStart().secsTo(t)/60;
a = _viewport->screenX(tmp) - contentsX();
- p.fillRect(a, top, (int) (5. * dayWidth), height, QBrush(QColor(240,240,240)));
+ p.fillRect(a, top, (int) (5. * dayWidth), height, TQBrush(TQColor(240,240,240)));
p.drawRect(a, top, (int) (5. * dayWidth), height );
// draw month, which first day is not visible
@@ -114,12 +114,12 @@ xQGanttBarView::drawHeader()
a = _viewport->screenX(tmp) - contentsX();
e = t.daysInMonth();
- p.fillRect(a, top + height + skip, (int) (e*dayWidth), height, QBrush(QColor(240,240,240)));
+ p.fillRect(a, top + height + skip, (int) (e*dayWidth), height, TQBrush(TQColor(240,240,240)));
p.drawRect(a, top + height + skip, (int) (e*dayWidth), height );
if(a<0) a = 0;
p.drawText(a+5, int( top + height + skip + (0.8*height) ),
- t.shortMonthName(t.month()) + " " + QString::number(t.year()) );
+ t.shortMonthName(t.month()) + " " + TQString::number(t.year()) );
// draw snapgrid for first month
@@ -146,15 +146,15 @@ xQGanttBarView::drawHeader()
tmp = _toplevelitem->getStart().secsTo(t)/60;
a = _viewport->screenX(tmp) - contentsX();
- p.setPen( QPen(QColor(black)) );
+ p.setPen( TQPen(TQColor(black)) );
if(t.dayOfWeek() == 1) {
- p.fillRect(a, top, (int) (5. * dayWidth), height, QBrush(QColor(240,240,240)));
+ p.fillRect(a, top, (int) (5. * dayWidth), height, TQBrush(TQColor(240,240,240)));
p.drawRect(a, top, (int) (5. * dayWidth), height );
if(!drawDays)
- p.drawText(a+5, (int) (top + (0.8*height)), QString::number(t.day()) );
+ p.drawText(a+5, (int) (top + (0.8*height)), TQString::number(t.day()) );
}
@@ -162,15 +162,15 @@ xQGanttBarView::drawHeader()
if(a<0) a = 0;
- QString str = t.shortDayName(t.dayOfWeek()) + " " + QString::number(t.day());
- QRect rect = p.boundingRect(a+5, (int)(0.8 * height),
+ TQString str = t.shortDayName(t.dayOfWeek()) + " " + TQString::number(t.day());
+ TQRect rect = p.boundingRect(a+5, (int)(0.8 * height),
(int) dayWidth, height, AlignLeft, str );
if(t.dayOfWeek() > 5)
p.fillRect(rect.x(), rect.y(), rect.width(), -rect.height(), _headerBackBrush );
else
p.fillRect(rect.x(), rect.y(),
- rect.width(), -rect.height(), QBrush(QColor(240,240,240)));
+ rect.width(), -rect.height(), TQBrush(TQColor(240,240,240)));
p.drawText(a+5, (int)(0.8 * height), str );
@@ -188,12 +188,12 @@ xQGanttBarView::drawHeader()
p.setPen(_normalPen);
p.fillRect(a, top + height + skip,
- (int) (e * dayWidth), height, QBrush(QColor(240,240,240)));
+ (int) (e * dayWidth), height, TQBrush(TQColor(240,240,240)));
p.drawRect(a, top + height + skip, (int) (e * dayWidth), height );
p.drawText(a+5,
top + (int)(1.8 * height) + skip,
- t.shortMonthName(t.month()) + " " + QString::number(t.year()) );
+ t.shortMonthName(t.month()) + " " + TQString::number(t.year()) );
// draw snapgrid
@@ -214,7 +214,7 @@ xQGanttBarView::drawHeader()
void
-xQGanttBarView::paintEvent(QPaintEvent * /*e*/)
+xQGanttBarView::paintEvent(TQPaintEvent * /*e*/)
{
drawHeader();
}
diff --git a/kgantt/kgantt/xQGanttBarView.h b/kgantt/kgantt/xQGanttBarView.h
index 4bb3446fa..08105727c 100644
--- a/kgantt/kgantt/xQGanttBarView.h
+++ b/kgantt/kgantt/xQGanttBarView.h
@@ -33,7 +33,7 @@
#define TOPMARGIN 45
-#include <qscrollview.h>
+#include <tqscrollview.h>
#include "xQGanttBarViewPort.h"
@@ -61,7 +61,7 @@ public:
/*!
*
*/
- xQGanttBarView(KGanttItem* toplevelitem, QWidget* parent = 0,
+ xQGanttBarView(KGanttItem* toplevelitem, TQWidget* parent = 0,
const char * name=0, WFlags f=0 );
@@ -107,9 +107,9 @@ protected:
xQGanttBarViewPort* _viewport;
- QBrush _headerBackBrush;
+ TQBrush _headerBackBrush;
- void paintEvent(QPaintEvent * e);
+ void paintEvent(TQPaintEvent * e);
KGanttItem* _toplevelitem;
KGanttBarConfig* _config;
diff --git a/kgantt/kgantt/xQGanttBarViewPort.cpp b/kgantt/kgantt/xQGanttBarViewPort.cpp
index feabc07e0..b0985dd7f 100644
--- a/kgantt/kgantt/xQGanttBarViewPort.cpp
+++ b/kgantt/kgantt/xQGanttBarViewPort.cpp
@@ -8,8 +8,8 @@
#include "xQGanttBarViewPort.h"
#include "xQGanttBarView.h"
-#include <qcolor.h>
-#include <qtoolbutton.h>
+#include <tqcolor.h>
+#include <tqtoolbutton.h>
#include "lupe.xpm"
#include "open.xpm"
@@ -24,44 +24,44 @@
xQGanttBarViewPort::xQGanttBarViewPort(KGanttItem* toplevelitem,
xQGanttBarView* parent,
const char * name, WFlags f)
- : QFrame(parent,name,f)
+ : TQFrame(parent,name,f)
/////////////////////////////////////////////////////////////////////////////
{
_parent = parent;
- closedIcon = QPixmap(open_xpm);
- openedIcon = QPixmap(close_xpm);
+ closedIcon = TQPixmap(open_xpm);
+ openedIcon = TQPixmap(close_xpm);
_observedList = NULL;
_toolbar = NULL;
- _gItemList = QPtrDict<xQTaskPosition>(449);
+ _gItemList = TQPtrDict<xQTaskPosition>(449);
_gItemList.setAutoDelete(true);
_toplevelitem = toplevelitem;
- _itemInfo = new QLabel(this);
- _itemInfo->setBackgroundColor(QColor(235,235,255));
+ _itemInfo = new TQLabel(this);
+ _itemInfo->setBackgroundColor(TQColor(235,235,255));
_itemInfo->setFrameStyle( Panel | Sunken );
_itemInfo->setMargin( 5 );
_itemInfo->setLineWidth(1);
_itemInfo->hide();
- _itemTextEdit = new QLineEdit(this);
+ _itemTextEdit = new TQLineEdit(this);
_itemTextEdit->hide();
_itemTextEdit->setFrame(false);
- connect(_itemTextEdit, SIGNAL(returnPressed ()),
- this, SLOT(textEdited()));
+ connect(_itemTextEdit, TQT_SIGNAL(returnPressed ()),
+ this, TQT_SLOT(textEdited()));
_iconloader = new KIconLoader();
initMenu();
- setBackgroundColor(QColor(white));
+ setBackgroundColor(TQColor(white));
/*
- QPixmap back("background.png");
+ TQPixmap back("background.png");
setBackgroundPixmap ( back );
*/
@@ -79,16 +79,16 @@ xQGanttBarViewPort::xQGanttBarViewPort(KGanttItem* toplevelitem,
_margin = 4; // margin item in pixel
- _startPoint = new QPoint(); _endPoint = new QPoint();
+ _startPoint = new TQPoint(); _endPoint = new TQPoint();
- _cursor_lupe = new QCursor( QPixmap(lupe) );
+ _cursor_lupe = new TQCursor( TQPixmap(lupe) );
- connect(_toplevelitem, SIGNAL(changed(KGanttItem*, KGanttItem::Change)),
- this, SLOT(toplevelitemChanged(KGanttItem*, KGanttItem::Change)) );
+ connect(_toplevelitem, TQT_SIGNAL(changed(KGanttItem*, KGanttItem::Change)),
+ this, TQT_SLOT(toplevelitemChanged(KGanttItem*, KGanttItem::Change)) );
recalc(); adjustSize();
- setFocusPolicy(QWidget::StrongFocus);
+ setFocusPolicy(TQWidget::StrongFocus);
_mode = Init;
}
@@ -103,11 +103,11 @@ xQGanttBarViewPort::~xQGanttBarViewPort()
KToolBar*
-xQGanttBarViewPort::toolbar(QMainWindow* mw)
+xQGanttBarViewPort::toolbar(TQMainWindow* mw)
{
if(_toolbar || mw == 0) return _toolbar;
- _toolbar = new KToolBar(mw,QMainWindow::DockTop);
+ _toolbar = new KToolBar(mw,TQMainWindow::DockTop);
mw->addToolBar(_toolbar);
@@ -116,8 +116,8 @@ xQGanttBarViewPort::toolbar(QMainWindow* mw)
_toolbar->insertButton("ganttSelect.png", 0,
- SIGNAL(clicked()),
- this, SLOT(setSelect()),
+ TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(setSelect()),
true, i18n("Select") );
KPopupMenu *selectMenu = new KPopupMenu(_toolbar);
@@ -126,9 +126,9 @@ xQGanttBarViewPort::toolbar(QMainWindow* mw)
/*
select all items
*/
- QPixmap pix = _iconloader->loadIcon("ganttSelecttask.png", KIcon::Toolbar , 16 );
+ TQPixmap pix = _iconloader->loadIcon("ganttSelecttask.png", KIcon::Toolbar , 16 );
if(pix.isNull()) printf("ganttSelecttask.png not found !\n");
- selectMenu->insertItem(pix, i18n("Select All"), this, SLOT(selectAll()) );
+ selectMenu->insertItem(pix, i18n("Select All"), this, TQT_SLOT(selectAll()) );
/*
@@ -136,7 +136,7 @@ xQGanttBarViewPort::toolbar(QMainWindow* mw)
*/
pix = _iconloader->loadIcon("ganttUnselecttask", KIcon::Toolbar , 16 );
if(pix.isNull()) printf("ganttUnselecttask.png not found !\n");
- selectMenu->insertItem(pix, i18n("Unselect All"), this, SLOT(unselectAll()) );
+ selectMenu->insertItem(pix, i18n("Unselect All"), this, TQT_SLOT(unselectAll()) );
KToolBarButton* b = _toolbar->getButton(0);
@@ -144,31 +144,31 @@ xQGanttBarViewPort::toolbar(QMainWindow* mw)
_toolbar->insertButton("viewmag.png", 1,
- SIGNAL(clicked()),
- this, SLOT(setZoom()),
+ TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(setZoom()),
true, i18n("Zoom") );
KPopupMenu* zoomMenu = new KPopupMenu(_toolbar);
pix = _iconloader->loadIcon("viewmag.png", KIcon::Toolbar , 16 );
if(pix.isNull()) printf("viewmag.png not found !\n");
- zoomMenu->insertItem(pix, i18n("Zoom All"), this, SLOT(zoomAll()) );
+ zoomMenu->insertItem(pix, i18n("Zoom All"), this, TQT_SLOT(zoomAll()) );
zoomMenu->insertSeparator();
pix = _iconloader->loadIcon("viewmag+.png", KIcon::Toolbar , 16 );
if(pix.isNull()) printf("viewmag+.png not found !\n");
- zoomMenu->insertItem(pix, i18n("Zoom In +"), this, SLOT(zoomIn()) );
+ zoomMenu->insertItem(pix, i18n("Zoom In +"), this, TQT_SLOT(zoomIn()) );
pix = _iconloader->loadIcon("viewmag-.png", KIcon::Toolbar , 16 );
if(pix.isNull()) printf("viewmag-.png not found !\n");
- zoomMenu->insertItem(pix, i18n("Zoom Out -"), this, SLOT(zoomOut()) );
+ zoomMenu->insertItem(pix, i18n("Zoom Out -"), this, TQT_SLOT(zoomOut()) );
b = _toolbar->getButton(1);
b->setDelayedPopup(zoomMenu);
_toolbar->insertButton("move.png", 2,
- SIGNAL(clicked()),
- this, SLOT(setMove()),
+ TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(setMove()),
true, i18n("Move") );
return _toolbar;
@@ -189,19 +189,19 @@ xQGanttBarViewPort::initMenu()
_selectMenu = new KPopupMenu(_menu);
- QPixmap pix = _iconloader->loadIcon("ganttSelect.png", KIcon::Toolbar , 16 );
+ TQPixmap pix = _iconloader->loadIcon("ganttSelect.png", KIcon::Toolbar , 16 );
if(pix.isNull()) printf("ganttSelect.png not found !\n");
- _selectMenu->insertItem(pix, i18n("Select Mode"), this, SLOT(setSelect()));
+ _selectMenu->insertItem(pix, i18n("Select Mode"), this, TQT_SLOT(setSelect()));
_selectMenu->insertSeparator();
pix = _iconloader->loadIcon("ganttSelecttask.png", KIcon::Toolbar , 16 );
if(pix.isNull()) printf("ganttSelecttask.png not found !\n");
- _selectMenu->insertItem(pix, i18n("Select All"), this, SLOT(selectAll()) );
+ _selectMenu->insertItem(pix, i18n("Select All"), this, TQT_SLOT(selectAll()) );
pix = _iconloader->loadIcon("ganttUnselecttask", KIcon::Toolbar , 16 );
if(pix.isNull()) printf("ganttUnselecttask.png not found !\n");
- _selectMenu->insertItem(pix, i18n("Unselect All"), this, SLOT(unselectAll()) );
+ _selectMenu->insertItem(pix, i18n("Unselect All"), this, TQT_SLOT(unselectAll()) );
_menu->insertItem( i18n("Select"), _selectMenu);
@@ -214,32 +214,32 @@ xQGanttBarViewPort::initMenu()
pix = _iconloader->loadIcon("viewmag.png", KIcon::Toolbar , 16 );
if(pix.isNull()) printf("viewmag.png not found !\n");
- _zoomMenu->insertItem(i18n("Zoom Mode"), this, SLOT(setZoom()) );
+ _zoomMenu->insertItem(i18n("Zoom Mode"), this, TQT_SLOT(setZoom()) );
_zoomMenu->insertSeparator();
- _zoomMenu->insertItem(pix, i18n("Zoom All"), this, SLOT(zoomAll()) );
+ _zoomMenu->insertItem(pix, i18n("Zoom All"), this, TQT_SLOT(zoomAll()) );
_zoomMenu->insertSeparator();
pix = _iconloader->loadIcon("viewmag+.png", KIcon::Toolbar , 16 );
if(pix.isNull()) printf("viewmag+.png not found !\n");
- _zoomMenu->insertItem(pix, i18n("Zoom In +"), this, SLOT(zoomIn()) );
+ _zoomMenu->insertItem(pix, i18n("Zoom In +"), this, TQT_SLOT(zoomIn()) );
pix = _iconloader->loadIcon("viewmag-.png", KIcon::Toolbar , 16 );
if(pix.isNull()) printf("viewmag-.png not found !\n");
- _zoomMenu->insertItem(pix, i18n("Zoom Out -"), this, SLOT(zoomOut()) );
+ _zoomMenu->insertItem(pix, i18n("Zoom Out -"), this, TQT_SLOT(zoomOut()) );
_menu->insertItem( "Zoom", _zoomMenu);
pix = _iconloader->loadIcon("move.png", KIcon::Toolbar , 16 );
if(pix.isNull()) printf("move.png not found !\n");
- _menu->insertItem(pix, i18n("Move Mode"), this, SLOT(setMove()) );
+ _menu->insertItem(pix, i18n("Move Mode"), this, TQT_SLOT(setMove()) );
_menu->insertSeparator();
pix = _iconloader->loadIcon("configure.png", KIcon::Toolbar , 16 );
if(pix.isNull()) printf("configure.png not found !\n");
- _menu->insertItem(pix, i18n("Configure Gantt..."), _parent, SLOT(showConfig()));
+ _menu->insertItem(pix, i18n("Configure Gantt..."), _parent, TQT_SLOT(showConfig()));
}
@@ -286,26 +286,26 @@ void
xQGanttBarViewPort::update(int x1, int y1, int x2, int y2)
//////////////////////////////////////////////////////////
{
- QPainter p(this);
+ TQPainter p(this);
- // QTime time1 = QTime::currentTime();
+ // TQTime time1 = TQTime::currentTime();
if(_drawGrid)
drawGrid(&p, x1, y1, x2, y2);
- // QTime time2 = QTime::currentTime();
+ // TQTime time2 = TQTime::currentTime();
// printf("%d msec for drawing grid.\n", time1.msecsTo( time2 ) );
// drawContents(&p, x1, y1, x2, y2);
- drawItem(_toplevelitem, &p, QRect(x1, y1, x2-x1, y2-y1) );
+ drawItem(_toplevelitem, &p, TQRect(x1, y1, x2-x1, y2-y1) );
- // time1 = QTime::currentTime();
+ // time1 = TQTime::currentTime();
// printf("%d msec for drawing contents.\n", time2.msecsTo( time1 ) );
if(_drawHeader)
drawHeader(&p, x1, y1, x2, y2);
- // time2 = QTime::currentTime();<
+ // time2 = TQTime::currentTime();<
// printf("%d msec for drawing header.\n", time1.msecsTo( time2 ) );
}
@@ -313,28 +313,28 @@ xQGanttBarViewPort::update(int x1, int y1, int x2, int y2)
void
-xQGanttBarViewPort::drawGrid(QPainter* p, int x1, int y1, int x2, int y2)
+xQGanttBarViewPort::drawGrid(TQPainter* p, int x1, int y1, int x2, int y2)
////////////////////////////////////////////////////////////////
{
y2 += 5; // avoid white lines at bottom of redrawn region
static int a, w, end, tmp;
- static QBrush _sat( QColor(200,200,200));
- static QBrush _sun( QColor(255,110,110));
- static QBrush _hol( QColor(200,200,250));
- static QPen penDay( QColor(235,235,235), 0, DotLine);
- static QPen penMonth( QColor(0,150,0), 3, DashDotLine);
- static QPen penHour( QColor(0,0,150), 0, DashDotLine);
+ static TQBrush _sat( TQColor(200,200,200));
+ static TQBrush _sun( TQColor(255,110,110));
+ static TQBrush _hol( TQColor(200,200,250));
+ static TQPen penDay( TQColor(235,235,235), 0, DotLine);
+ static TQPen penMonth( TQColor(0,150,0), 3, DashDotLine);
+ static TQPen penHour( TQColor(0,0,150), 0, DashDotLine);
- QDate start( _toplevelitem->getStart().addSecs(worldX(x1)*60).date() );
+ TQDate start( _toplevelitem->getStart().addSecs(worldX(x1)*60).date() );
end = (int) ((x2-x1)/(1440.*_scaleX))+1;
w = (int) (1440. * _scaleX + 0.5);
// draw holydays
- QDate* ptrDate;
- QDate cmp(start.addDays(-1));
+ TQDate* ptrDate;
+ TQDate cmp(start.addDays(-1));
for(ptrDate = _holidays.first(); ptrDate != 0; ptrDate = _holidays.next() ) {
if(*ptrDate > cmp) {
@@ -456,8 +456,8 @@ xQGanttBarViewPort::recalc(KGanttItem* item, int xPos, int yPos,
void
-xQGanttBarViewPort::drawItem(KGanttItem* item, QPainter* p,
- const QRect& rect )
+xQGanttBarViewPort::drawItem(KGanttItem* item, TQPainter* p,
+ const TQRect& rect )
{
xQTaskPosition* tpos = _gItemList[item];
@@ -478,7 +478,7 @@ xQGanttBarViewPort::drawItem(KGanttItem* item, QPainter* p,
p->drawLine(tpos->_screenX, tpos->_screenY,
tpos->_screenX, tpos->_screenY + tpos->_screenH );
- QPointArray a(4);
+ TQPointArray a(4);
a.setPoint(0, tpos->_screenX, tpos->_screenY + _margin );
a.setPoint(1, tpos->_screenX - tpos->_screenH / 2 + _margin,
tpos->_screenY + tpos->_screenH / 2 );
@@ -534,7 +534,7 @@ xQGanttBarViewPort::drawItem(KGanttItem* item, QPainter* p,
((style & KGanttItem::DrawHandleWSubitems) && item->getSubItems().count()>0) ) {
/*
- p->setBrush(QColor("steelblue"));
+ p->setBrush(TQColor("steelblue"));
p->drawRect(tpos->_screenHandleX, tpos->_screenHandleY,
tpos->_screenHandleW, tpos->_screenHandleH);
*/
@@ -553,7 +553,7 @@ xQGanttBarViewPort::drawItem(KGanttItem* item, QPainter* p,
if(item->isSelected()) {
- p->setPen( QPen(QColor(red),1));
+ p->setPen( TQPen(TQColor(red),1));
p->setBrush(NoBrush);
p->drawRect(tpos->_screenX - 2, tpos->_screenY,
@@ -580,7 +580,7 @@ xQGanttBarViewPort::drawItem(KGanttItem* item, QPainter* p,
void
-xQGanttBarViewPort::drawRelation(QPainter* p,
+xQGanttBarViewPort::drawRelation(TQPainter* p,
KGanttRelation* rel)
{
static int hw = 20;
@@ -594,7 +594,7 @@ xQGanttBarViewPort::drawRelation(QPainter* p,
p->setPen(rel->getPen());
- QPointArray a(6);
+ TQPointArray a(6);
int x,y;
int i=0;
@@ -638,7 +638,7 @@ xQGanttBarViewPort::drawRelation(QPainter* p,
p->drawChord( a.point(0).x()-3, a.point(0).y()-3, 6, 6, 0, 5760 );
- QPointArray b(3);
+ TQPointArray b(3);
b.setPoint(0, x,y);
b.setPoint(1, x -5, y - 5);
@@ -651,18 +651,18 @@ xQGanttBarViewPort::drawRelation(QPainter* p,
void
-xQGanttBarViewPort::drawHeader(QPainter* p, int /*x1*/, int /*y1*/, int /*x2*/, int /*y2*/)
+xQGanttBarViewPort::drawHeader(TQPainter* p, int /*x1*/, int /*y1*/, int /*x2*/, int /*y2*/)
//////////////////////////////////////////////////////////////////////////
{
bool drawDays = false;
int a,e,tmp;
- QDate start( _toplevelitem->getStart().addSecs(-_marginX * 60 ).date() );
+ TQDate start( _toplevelitem->getStart().addSecs(-_marginX * 60 ).date() );
// subtract 1 month to draw first month
- QDate t(start.year(), start.month()-1, start.day() );
+ TQDate t(start.year(), start.month()-1, start.day() );
- QDateTime itemstart = _toplevelitem->getStart();
+ TQDateTime itemstart = _toplevelitem->getStart();
int end = (int) (width()/(1440*_scaleX));
@@ -670,7 +670,7 @@ xQGanttBarViewPort::drawHeader(QPainter* p, int /*x1*/, int /*y1*/, int /*x2*/,
end += 30; // add 30 days to draw last month
- p->setPen( QPen(QColor(black)) );
+ p->setPen( TQPen(TQColor(black)) );
for(int i=0; i<=end; i++, t = t.addDays(1) ) {
@@ -679,22 +679,22 @@ xQGanttBarViewPort::drawHeader(QPainter* p, int /*x1*/, int /*y1*/, int /*x2*/,
if(t.dayOfWeek() == 1) {
- p->fillRect(a, 0, (int)( 1440*5*_scaleX ), 20, QBrush(QColor(240,240,240)));
+ p->fillRect(a, 0, (int)( 1440*5*_scaleX ), 20, TQBrush(TQColor(240,240,240)));
p->drawRect(a, 0, (int)( 1440*5*_scaleX ), 20 );
if(!drawDays)
- p->drawText(a+5, 15, QString::number(t.day()) );
+ p->drawText(a+5, 15, TQString::number(t.day()) );
}
if(drawDays) {
- p->drawText(a+5, 15, t.shortDayName(t.dayOfWeek()) + " " + QString::number(t.day()) );
+ p->drawText(a+5, 15, t.shortDayName(t.dayOfWeek()) + " " + TQString::number(t.day()) );
}
if(t.day()==1) {
e = t.daysInMonth();
- p->fillRect(a, 21, (int)( 1440*e*_scaleX ), 20, QBrush(QColor(240,240,240)));
+ p->fillRect(a, 21, (int)( 1440*e*_scaleX ), 20, TQBrush(TQColor(240,240,240)));
p->drawRect(a, 21, (int)( 1440*e*_scaleX ), 20 );
if(a<0) a = 0;
@@ -841,7 +841,7 @@ xQGanttBarViewPort::zoom(double sfactor, int sx, int sy)
_parent->center(screenX(wx), screenY(wy) );
- QWidget::update();
+ TQWidget::update();
printf("zoom ok.\n");
@@ -885,9 +885,9 @@ xQGanttBarViewPort::zoomAll()
void
xQGanttBarViewPort::addHoliday(int y, int m, int d)
{
- QDate* date = new QDate(y,m,d);
+ TQDate* date = new TQDate(y,m,d);
- QDate* ptrDate;
+ TQDate* ptrDate;
int i=0;
for(ptrDate = _holidays.first();
@@ -910,7 +910,7 @@ xQGanttBarViewPort::addHoliday(int y, int m, int d)
xQGanttBarViewPort::Position
xQGanttBarViewPort::check(KGanttItem** founditem, int x, int y)
{
- QPtrDictIterator<xQTaskPosition> it(_gItemList);
+ TQPtrDictIterator<xQTaskPosition> it(_gItemList);
static int ty, ty2, tx, tx2, hx, hx2, hy, hy2;
bool increased;
@@ -970,7 +970,7 @@ void
xQGanttBarViewPort::unselectAll()
{
selectItem(_toplevelitem, false);
- QWidget::update();
+ TQWidget::update();
}
@@ -979,7 +979,7 @@ void
xQGanttBarViewPort::selectAll()
{
selectItem(_toplevelitem, true);
- QWidget::update();
+ TQWidget::update();
}
@@ -1006,7 +1006,7 @@ xQGanttBarViewPort::deleteSelectedItems()
printf("-> xQGanttBarViewPort::deleteSelectedItems()\n");
#endif
- QPtrList<KGanttItem> list;
+ TQPtrList<KGanttItem> list;
observeList(&list);
getSelectedItems(_toplevelitem,list);
@@ -1017,8 +1017,8 @@ xQGanttBarViewPort::deleteSelectedItems()
#ifdef _DEBUG_
printf(" : %s \n", subitem->getText().latin1() );
#endif
- connect(subitem, SIGNAL(destroyed(KGanttItem*)),
- this, SLOT(itemDestroyed(KGanttItem*)));
+ connect(subitem, TQT_SIGNAL(destroyed(KGanttItem*)),
+ this, TQT_SLOT(itemDestroyed(KGanttItem*)));
}
list.remove(_toplevelitem);
@@ -1036,7 +1036,7 @@ xQGanttBarViewPort::deleteSelectedItems()
void
-xQGanttBarViewPort::observeList(QPtrList<KGanttItem> *list)
+xQGanttBarViewPort::observeList(TQPtrList<KGanttItem> *list)
{
_observedList = list;
}
@@ -1053,7 +1053,7 @@ xQGanttBarViewPort::itemDestroyed(KGanttItem* item)
void
xQGanttBarViewPort::getSelectedItems (KGanttItem* item,
- QPtrList<KGanttItem>& list)
+ TQPtrList<KGanttItem>& list)
{
if(item->isSelected()) list.append(item);
@@ -1071,7 +1071,7 @@ xQGanttBarViewPort::getSelectedItems (KGanttItem* item,
void
xQGanttBarViewPort::insertIntoSelectedItem()
{
- QPtrList<KGanttItem> list;
+ TQPtrList<KGanttItem> list;
getSelectedItems(_toplevelitem,list);
diff --git a/kgantt/kgantt/xQGanttBarViewPort.h b/kgantt/kgantt/xQGanttBarViewPort.h
index 7f30ad297..1b3de985f 100644
--- a/kgantt/kgantt/xQGanttBarViewPort.h
+++ b/kgantt/kgantt/xQGanttBarViewPort.h
@@ -32,16 +32,16 @@
#include "KGanttItem.h"
-#include <qcursor.h>
-#include <qtimer.h>
-#include <qlabel.h>
+#include <tqcursor.h>
+#include <tqtimer.h>
+#include <tqlabel.h>
#include <kpopupmenu.h>
#include <ktoolbar.h>
-#include <qptrdict.h>
-#include <qaction.h>
-#include <qlineedit.h>
+#include <tqptrdict.h>
+#include <tqaction.h>
+#include <tqlineedit.h>
class xQGanttBarView;
@@ -123,7 +123,7 @@ public:
- QPtrDict<xQTaskPosition> _gItemList;
+ TQPtrDict<xQTaskPosition> _gItemList;
/// Add holiday.
@@ -154,7 +154,7 @@ public:
/*!
*
*/
- KToolBar* toolbar(QMainWindow* mw = 0);
+ KToolBar* toolbar(TQMainWindow* mw = 0);
// zoom by factor sfactor and move wx,wy to the center
@@ -164,7 +164,7 @@ public:
void zoom(double sfactor);
- void getSelectedItems(QPtrList<KGanttItem>& list) {
+ void getSelectedItems(TQPtrList<KGanttItem>& list) {
getSelectedItems(_toplevelitem, list);
}
@@ -175,7 +175,7 @@ signals:
void scroll(int x, int y);
void resized();
void recalculated();
- void message(const QString& msg);
+ void message(const TQString& msg);
protected slots:
@@ -257,10 +257,10 @@ private:
int _margin;
- QCursor* _cursor_lupe;
+ TQCursor* _cursor_lupe;
- QLabel* _itemInfo;
- QLineEdit* _itemTextEdit;
+ TQLabel* _itemInfo;
+ TQLineEdit* _itemTextEdit;
// all item are stored here
@@ -275,49 +275,49 @@ private:
KToolBar* _toolbar;
- QPoint* _startPoint, *_endPoint;
+ TQPoint* _startPoint, *_endPoint;
- QPtrList<QDate> _holidays;
+ TQPtrList<TQDate> _holidays;
- QPtrList<KGanttItem> *_observedList;
+ TQPtrList<KGanttItem> *_observedList;
///
void initMenu();
- void drawGrid(QPainter*, int x1, int y1, int x2, int y2);
- void drawHeader(QPainter*, int x1, int y1, int x2, int y2);
- void drawItem(KGanttItem* item, QPainter* p, const QRect& rect );
+ void drawGrid(TQPainter*, int x1, int y1, int x2, int y2);
+ void drawHeader(TQPainter*, int x1, int y1, int x2, int y2);
+ void drawItem(KGanttItem* item, TQPainter* p, const TQRect& rect );
- void drawRelation(QPainter*, KGanttRelation*);
+ void drawRelation(TQPainter*, KGanttRelation*);
void recalc(KGanttItem* item, int xPos, int yPos, int depth, int nr );
void recalc();
void selectItem(KGanttItem*,bool);
- void getSelectedItems(KGanttItem*, QPtrList<KGanttItem>&);
+ void getSelectedItems(KGanttItem*, TQPtrList<KGanttItem>&);
void adjustSize();
- void observeList(QPtrList<KGanttItem>*);
+ void observeList(TQPtrList<KGanttItem>*);
Position check(KGanttItem** founditem, int x, int y);
- void mousePressEvent(QMouseEvent*);
- void mouseReleaseEvent(QMouseEvent*);
+ void mousePressEvent(TQMouseEvent*);
+ void mouseReleaseEvent(TQMouseEvent*);
- void wheelEvent ( QWheelEvent * /*e*/) {
+ void wheelEvent ( TQWheelEvent * /*e*/) {
printf("wheelEvent\n");
}
- void mouseMoveEvent(QMouseEvent*);
- void keyPressEvent(QKeyEvent* e);
- void paintEvent(QPaintEvent * e);
+ void mouseMoveEvent(TQMouseEvent*);
+ void keyPressEvent(TQKeyEvent* e);
+ void paintEvent(TQPaintEvent * e);
- QPixmap closedIcon, openedIcon;
+ TQPixmap closedIcon, openedIcon;
};
diff --git a/kgantt/kgantt/xQGanttBarViewPort_Events.cpp b/kgantt/kgantt/xQGanttBarViewPort_Events.cpp
index 8609962b7..1791689e3 100644
--- a/kgantt/kgantt/xQGanttBarViewPort_Events.cpp
+++ b/kgantt/kgantt/xQGanttBarViewPort_Events.cpp
@@ -23,11 +23,11 @@ static int _timediff;
static bool _changeEnd, _changeStart;
static int oldw = -1, oldx = -1;
-QDateTime _tmpStartDateTime, _tmpEndDateTime;
+TQDateTime _tmpStartDateTime, _tmpEndDateTime;
void
-xQGanttBarViewPort::mousePressEvent(QMouseEvent* e)
+xQGanttBarViewPort::mousePressEvent(TQMouseEvent* e)
{
// set _currentItem to pushed mousebutton
_currentMButton = e->button();
@@ -67,9 +67,9 @@ xQGanttBarViewPort::mousePressEvent(QMouseEvent* e)
if(e->button() == MidButton && _mode == Select) {
xQTaskPosition* tp = _gItemList.find(_currentItem);
- QPainter p(this);
+ TQPainter p(this);
- QRect rect = p.boundingRect(tp->_textPosX,
+ TQRect rect = p.boundingRect(tp->_textPosX,
tp->_textPosY, 200,
tp->_screenH, AlignLeft, _currentItem->getText() );
@@ -109,7 +109,7 @@ xQGanttBarViewPort::mousePressEvent(QMouseEvent* e)
if(e->state() == ShiftButton) {
- QString tmp; tmp.sprintf("%s\n", _currentItem->getText().latin1() );
+ TQString tmp; tmp.sprintf("%s\n", _currentItem->getText().latin1() );
tmp += _currentItem->getStart().toString();
tmp += " - ";
@@ -154,7 +154,7 @@ xQGanttBarViewPort::mousePressEvent(QMouseEvent* e)
void
-xQGanttBarViewPort::mouseReleaseEvent(QMouseEvent* e)
+xQGanttBarViewPort::mouseReleaseEvent(TQMouseEvent* e)
{
switch(_mode) {
@@ -176,7 +176,7 @@ xQGanttBarViewPort::mouseReleaseEvent(QMouseEvent* e)
oldx = -1; oldw = -1;
recalc();
- QWidget::update();
+ TQWidget::update();
}
}
@@ -193,7 +193,7 @@ xQGanttBarViewPort::mouseReleaseEvent(QMouseEvent* e)
_currentItem->select( !state );
}
- QWidget::update();
+ TQWidget::update();
_selectItem = false;
}
@@ -226,8 +226,8 @@ xQGanttBarViewPort::mouseReleaseEvent(QMouseEvent* e)
if(_currentMButton == LeftButton) {
- QPainter p(this);
- QPen pen(DashLine);
+ TQPainter p(this);
+ TQPen pen(DashLine);
pen.setColor(red);
p.setRasterOp(XorROP);
p.setPen( pen );
@@ -269,14 +269,14 @@ xQGanttBarViewPort::mouseReleaseEvent(QMouseEvent* e)
void
-xQGanttBarViewPort::mouseMoveEvent(QMouseEvent* e)
+xQGanttBarViewPort::mouseMoveEvent(TQMouseEvent* e)
{
if(fabs((float)(_startPoint->x() - e->x())) < 2 &&
fabs((float)(_startPoint->y() - e->y())) < 2 )
return;
- static QPen _dashPen(QColor(255,0,0),DashLine);
- static QPen _solidPen(QColor(200,200,200));
+ static TQPen _dashPen(TQColor(255,0,0),DashLine);
+ static TQPen _solidPen(TQColor(200,200,200));
_Mousemoved = true;
@@ -286,13 +286,13 @@ xQGanttBarViewPort::mouseMoveEvent(QMouseEvent* e)
if(_currentMButton == LeftButton && _currentItem) {
- QPainter p(this);
+ TQPainter p(this);
p.setRasterOp(XorROP);
- // QPen pen(DashLine);
+ // TQPen pen(DashLine);
// pen.setColor(red);
p.setPen( _dashPen );
- QString stmp;
+ TQString stmp;
stmp.sprintf("%s\n", _currentItem->getText().latin1() );
int pixeldiff = e->x() - _startPoint->x();
@@ -318,10 +318,10 @@ xQGanttBarViewPort::mouseMoveEvent(QMouseEvent* e)
if(_changeStart) {
- QDateTime movedStart( _currentItem->getStart().addSecs(_timediff*60) );
+ TQDateTime movedStart( _currentItem->getStart().addSecs(_timediff*60) );
_tmpStartDateTime.setDate( movedStart.date() );
- _tmpStartDateTime.setTime(QTime(0,0,0,0));
+ _tmpStartDateTime.setTime(TQTime(0,0,0,0));
double diff = _tmpStartDateTime.secsTo(movedStart)/60;
@@ -341,10 +341,10 @@ xQGanttBarViewPort::mouseMoveEvent(QMouseEvent* e)
if(_changeEnd) {
- QDateTime movedEnd( _currentItem->getEnd().addSecs(_timediff*60) );
+ TQDateTime movedEnd( _currentItem->getEnd().addSecs(_timediff*60) );
_tmpEndDateTime.setDate( movedEnd.date() );
- _tmpEndDateTime.setTime(QTime(0,0,0,0));
+ _tmpEndDateTime.setTime(TQTime(0,0,0,0));
double diff = _tmpEndDateTime.secsTo(movedEnd)/60;
@@ -372,7 +372,7 @@ xQGanttBarViewPort::mouseMoveEvent(QMouseEvent* e)
if(oldx > 0) {
p.fillRect(oldx, _gItemList.find(_currentItem)->_screenY,
oldw, _gItemList.find(_currentItem)->_screenH,
- QBrush(QColor(50,50,50), Dense4Pattern));
+ TQBrush(TQColor(50,50,50), Dense4Pattern));
p.drawRect(oldx, _gItemList.find(_currentItem)->_screenY,
oldw, _gItemList.find(_currentItem)->_screenH);
@@ -388,7 +388,7 @@ xQGanttBarViewPort::mouseMoveEvent(QMouseEvent* e)
p.setPen(_dashPen);
p.fillRect(x, _gItemList.find(_currentItem)->_screenY,
w, _gItemList.find(_currentItem)->_screenH,
- QBrush(QColor(50,50,50), Dense4Pattern) );
+ TQBrush(TQColor(50,50,50), Dense4Pattern) );
p.drawRect(x, _gItemList.find(_currentItem)->_screenY,
w, _gItemList.find(_currentItem)->_screenH);
@@ -444,15 +444,15 @@ xQGanttBarViewPort::mouseMoveEvent(QMouseEvent* e)
if(_currentMButton == LeftButton) {
- static QString strpos;
+ static TQString strpos;
strpos = "";
int s = worldX(_startPoint->x());
- QDateTime d1 = _toplevelitem->getStart().addSecs(s*60);
+ TQDateTime d1 = _toplevelitem->getStart().addSecs(s*60);
s = worldX(e->x());
- QDateTime d2 = _toplevelitem->getStart().addSecs(s*60);
+ TQDateTime d2 = _toplevelitem->getStart().addSecs(s*60);
strpos += d1.date().toString();
strpos += " - ";
@@ -460,8 +460,8 @@ xQGanttBarViewPort::mouseMoveEvent(QMouseEvent* e)
emit message(strpos);
- QPainter p(this);
- QPen pen(DashLine);
+ TQPainter p(this);
+ TQPen pen(DashLine);
pen.setColor(red);
p.setRasterOp(XorROP);
@@ -473,7 +473,7 @@ xQGanttBarViewPort::mouseMoveEvent(QMouseEvent* e)
_endPoint->x()-_startPoint->x(),
_endPoint->y() - _startPoint->y());
- QBrush _selectedbrush( QColor(50,50,50), Dense4Pattern );
+ TQBrush _selectedbrush( TQColor(50,50,50), Dense4Pattern );
p.fillRect( _startPoint->x(), _startPoint->y(),
_endPoint->x()-_startPoint->x(), _endPoint->y() - _startPoint->y(),
@@ -509,7 +509,7 @@ xQGanttBarViewPort::mouseMoveEvent(QMouseEvent* e)
void
-xQGanttBarViewPort::keyPressEvent(QKeyEvent* e)
+xQGanttBarViewPort::keyPressEvent(TQKeyEvent* e)
{
printf("xQGanttBarViewPort::keyPressEvent() key = %d \n", e->key() );
@@ -577,7 +577,7 @@ xQGanttBarViewPort::keyPressEvent(QKeyEvent* e)
void
-xQGanttBarViewPort::paintEvent(QPaintEvent * e)
+xQGanttBarViewPort::paintEvent(TQPaintEvent * e)
/////////////////////////////////////////////////
{
update(e->rect().left(), e->rect().top(),
diff --git a/kgantt/kgantt/xQGanttListView.cpp b/kgantt/kgantt/xQGanttListView.cpp
index 01b4ac246..3f5f44c28 100644
--- a/kgantt/kgantt/xQGanttListView.cpp
+++ b/kgantt/kgantt/xQGanttListView.cpp
@@ -7,20 +7,20 @@
#include "xQGanttListView.h"
-#include <qcolor.h>
+#include <tqcolor.h>
#include <klocale.h>
-xQGanttListView::xQGanttListView(KGanttItem* toplevelitem, QWidget* parent,
+xQGanttListView::xQGanttListView(KGanttItem* toplevelitem, TQWidget* parent,
const char * name, WFlags f)
- : QScrollView(parent,name,f)
+ : TQScrollView(parent,name,f)
/////////////////////////////////////////////////////////
{
_toplevelitem = toplevelitem;
- setFrameStyle(QFrame::Sunken);
+ setFrameStyle(TQFrame::Sunken);
setLineWidth(1);
- _headerBackBrush = QBrush(QColor(230,230,230));
+ _headerBackBrush = TQBrush(TQColor(230,230,230));
setMargins( 1, TOPMARGIN , 1, 1 );
@@ -29,7 +29,7 @@ xQGanttListView::xQGanttListView(KGanttItem* toplevelitem, QWidget* parent,
_viewport = new xQGanttListViewPort(toplevelitem,viewport());
addChild(_viewport);
- viewport()->setBackgroundColor(QColor(white));
+ viewport()->setBackgroundColor(TQColor(white));
}
@@ -47,8 +47,8 @@ xQGanttListView::drawHeader()
{
// printf("xQGanttListView::drawHeader()\n");
- QPainter p(this);
- p.setPen( QPen(QColor(black)) );
+ TQPainter p(this);
+ p.setPen( TQPen(TQColor(black)) );
p.fillRect(0,0,width(),TOPMARGIN, _headerBackBrush );
p.drawText(5, (int)(0.8 * TOPMARGIN), i18n("Items"));
@@ -68,7 +68,7 @@ xQGanttListView::contentsMoved(int x, int y)
void
-xQGanttListView::paintEvent(QPaintEvent * /*e*/)
+xQGanttListView::paintEvent(TQPaintEvent * /*e*/)
{
drawHeader();
}
diff --git a/kgantt/kgantt/xQGanttListView.h b/kgantt/kgantt/xQGanttListView.h
index 36a2bbc02..ff002a7b1 100644
--- a/kgantt/kgantt/xQGanttListView.h
+++ b/kgantt/kgantt/xQGanttListView.h
@@ -34,7 +34,7 @@
#include "xQGanttBarView.h"
#include "xQGanttListViewPort.h"
-#include <qscrollview.h>
+#include <tqscrollview.h>
@@ -58,7 +58,7 @@ public:
/*!
*
*/
- xQGanttListView(KGanttItem* toplevelitem, QWidget* parent = 0,
+ xQGanttListView(KGanttItem* toplevelitem, TQWidget* parent = 0,
const char * name=0, WFlags f=0 );
@@ -90,13 +90,13 @@ protected:
// ptr to toplevelitem
KGanttItem* _toplevelitem;
- QBrush _headerBackBrush;
+ TQBrush _headerBackBrush;
xQGanttBarView* _barview;
xQGanttListViewPort* _viewport;
void drawHeader();
- void paintEvent(QPaintEvent * e);
+ void paintEvent(TQPaintEvent * e);
};
diff --git a/kgantt/kgantt/xQGanttListViewPort.cpp b/kgantt/kgantt/xQGanttListViewPort.cpp
index 573d8fbe9..a792ad992 100644
--- a/kgantt/kgantt/xQGanttListViewPort.cpp
+++ b/kgantt/kgantt/xQGanttListViewPort.cpp
@@ -7,26 +7,26 @@
#include "xQGanttListViewPort.h"
-#include <qcolor.h>
+#include <tqcolor.h>
int xQGanttListViewPort::_ListViewCounter = 0;
-xQGanttListViewPort::xQGanttListViewPort(KGanttItem* toplevelitem, QWidget* parent,
+xQGanttListViewPort::xQGanttListViewPort(KGanttItem* toplevelitem, TQWidget* parent,
const char * name, WFlags f )
- : QFrame(parent,name,f)
+ : TQFrame(parent,name,f)
{
_toplevelitem = toplevelitem;
- setBackgroundColor(QColor(white));
+ setBackgroundColor(TQColor(white));
_barviewport = NULL;
_width = 1000;
- brush1 = QBrush(QColor(200,200,230));
- brush2 = QBrush(QColor(240,240,240));
+ brush1 = TQBrush(TQColor(200,200,230));
+ brush2 = TQBrush(TQColor(240,240,240));
}
@@ -50,16 +50,16 @@ xQGanttListViewPort::setBarViewPort(xQGanttBarViewPort* v)
printf("setBarViewPort()\n");
- connect(_barviewport, SIGNAL(resized()),
- this, SLOT(barViewResized()));
+ connect(_barviewport, TQT_SIGNAL(resized()),
+ this, TQT_SLOT(barViewResized()));
- connect(_barviewport, SIGNAL(recalculated()),
- this, SLOT(update()));
+ connect(_barviewport, TQT_SIGNAL(recalculated()),
+ this, TQT_SLOT(update()));
/*
- connect(_barviewport, SIGNAL(contentsRepainted()),
- this, SLOT(barViewRepainted()));
+ connect(_barviewport, TQT_SIGNAL(contentsRepainted()),
+ this, TQT_SLOT(barViewRepainted()));
*/
}
@@ -85,7 +85,7 @@ xQGanttListViewPort::barViewResized()
void
-xQGanttListViewPort::drawContents(QPainter* p, int x1, int y1, int x2, int y2)
+xQGanttListViewPort::drawContents(TQPainter* p, int x1, int y1, int x2, int y2)
//////////////////////////////////////////////////////////////////////////////
{
/*printf("\nxQGanttListViewPort::drawContents(%d,%d,%d,%d)\n",
@@ -95,7 +95,7 @@ xQGanttListViewPort::drawContents(QPainter* p, int x1, int y1, int x2, int y2)
_ListViewCounter = 0;
if(_barviewport) {
- drawItem(_toplevelitem, p, QRect(x1, y1, x2-x1, y2-y1), 5 );
+ drawItem(_toplevelitem, p, TQRect(x1, y1, x2-x1, y2-y1), 5 );
}
}
@@ -103,7 +103,7 @@ xQGanttListViewPort::drawContents(QPainter* p, int x1, int y1, int x2, int y2)
void
-xQGanttListViewPort::drawItem(KGanttItem* item, QPainter* p, const QRect& rect,
+xQGanttListViewPort::drawItem(KGanttItem* item, TQPainter* p, const TQRect& rect,
int offsetX )
/////////////////////////////////////////////////////////////////////////////
{
@@ -118,7 +118,7 @@ xQGanttListViewPort::drawItem(KGanttItem* item, QPainter* p, const QRect& rect,
((tpos->_screenY + tpos->_screenH)+5 >= rect.y() &&
(tpos->_screenY + tpos->_screenH)-5 <= rect.y() + rect.height() ) ) {
- p->setPen(QPen(QColor(black)));
+ p->setPen(TQPen(TQColor(black)));
int y = tpos->_screenY;
int h = tpos->_screenH;
@@ -130,7 +130,7 @@ xQGanttListViewPort::drawItem(KGanttItem* item, QPainter* p, const QRect& rect,
p->fillRect(0 + margin, y + margin,
_width - 2* margin, h - 2* margin, brush2);
- QString str = item->getText() + " [" +
+ TQString str = item->getText() + " [" +
item->getStart().toString() + " / " +
item->getEnd().toString() + "]";
@@ -149,7 +149,7 @@ xQGanttListViewPort::drawItem(KGanttItem* item, QPainter* p, const QRect& rect,
}
- p->setPen(QPen(QColor(blue),2));
+ p->setPen(TQPen(TQColor(blue),2));
p->drawLine(offsetX + 3, tpos->_textPosY + 3,
offsetX + 3, tpos->_screenY + tpos->_screenHS - 3);
@@ -162,7 +162,7 @@ void
xQGanttListViewPort::update(int x1, int y1, int x2, int y2)
/////////////////////////////////////////////////
{
- QPainter p(this);
+ TQPainter p(this);
/*
printf("\nxQGanttListViewPort::update(%d,%d,%d,%d)\n",
diff --git a/kgantt/kgantt/xQGanttListViewPort.h b/kgantt/kgantt/xQGanttListViewPort.h
index d133d129b..cc16ca8c8 100644
--- a/kgantt/kgantt/xQGanttListViewPort.h
+++ b/kgantt/kgantt/xQGanttListViewPort.h
@@ -34,7 +34,7 @@
#include "KGanttItem.h"
-#include <qcursor.h>
+#include <tqcursor.h>
@@ -60,7 +60,7 @@ public:
/*!
*
*/
- xQGanttListViewPort(KGanttItem* toplevelitem, QWidget* parent = 0,
+ xQGanttListViewPort(KGanttItem* toplevelitem, TQWidget* parent = 0,
const char * name=0, WFlags f=0 );
@@ -94,8 +94,8 @@ protected:
void setBarViewPort(xQGanttBarViewPort* v);
- void drawContents(QPainter*, int x1, int y1, int x2, int y2);
- void drawItem(KGanttItem*, QPainter* p, const QRect&, int);
+ void drawContents(TQPainter*, int x1, int y1, int x2, int y2);
+ void drawItem(KGanttItem*, TQPainter* p, const TQRect&, int);
xQGanttBarViewPort* _barviewport;
@@ -103,15 +103,15 @@ protected:
KGanttItem* _toplevelitem;
- void paintEvent(QPaintEvent * e) {
+ void paintEvent(TQPaintEvent * e) {
// printf("xQGanttListViewPort::paintEvent()\n");
update(e->rect().left(), e->rect().top(),
e->rect().right(), e->rect().bottom() );
}
- QPopupMenu* _menu;
+ TQPopupMenu* _menu;
- void mousePressEvent(QMouseEvent* e) {
+ void mousePressEvent(TQMouseEvent* e) {
if(e->button() == RightButton && e->state() == ControlButton ) {
_menu->popup(e->globalPos());
@@ -121,7 +121,7 @@ protected:
}
- QBrush brush1, brush2;
+ TQBrush brush1, brush2;
static int _ListViewCounter;
diff --git a/kioslaves/imap4/imap4.cc b/kioslaves/imap4/imap4.cc
index eeef10fd4..1cfd56027 100644
--- a/kioslaves/imap4/imap4.cc
+++ b/kioslaves/imap4/imap4.cc
@@ -78,9 +78,9 @@ extern "C" {
}
#endif
-#include <qbuffer.h>
-#include <qdatetime.h>
-#include <qregexp.h>
+#include <tqbuffer.h>
+#include <tqdatetime.h>
+#include <tqregexp.h>
#include <kprotocolmanager.h>
#include <kmessagebox.h>
#include <kdebug.h>
@@ -161,7 +161,7 @@ sigchld_handler (int signo)
}
}
-IMAP4Protocol::IMAP4Protocol (const QCString & pool, const QCString & app, bool isSSL):TCPSlaveBase ((isSSL ? 993 : 143),
+IMAP4Protocol::IMAP4Protocol (const TQCString & pool, const TQCString & app, bool isSSL):TCPSlaveBase ((isSSL ? 993 : 143),
(isSSL ? IMAP_SSL_PROTOCOL : IMAP_PROTOCOL), pool,
app, isSSL), imapParser (), mimeIO (), outputBuffer(outputCache)
{
@@ -172,7 +172,7 @@ IMAP4Protocol::IMAP4Protocol (const QCString & pool, const QCString & app, bool
readBufferLen = 0;
cacheOutput = false;
decodeContent = false;
- mTimeOfLastNoop = QDateTime();
+ mTimeOfLastNoop = TQDateTime();
}
IMAP4Protocol::~IMAP4Protocol ()
@@ -186,7 +186,7 @@ IMAP4Protocol::get (const KURL & _url)
{
if (!makeLogin()) return;
kdDebug(7116) << "IMAP4::get - " << _url.prettyURL() << endl;
- QString aBox, aSequence, aType, aSection, aValidity, aDelimiter, aInfo;
+ TQString aBox, aSequence, aType, aSection, aValidity, aDelimiter, aInfo;
enum IMAP_TYPE aEnum =
parseURL (_url, aBox, aSection, aType, aSequence, aValidity, aDelimiter, aInfo);
if (aEnum != ITYPE_ATTACH)
@@ -227,7 +227,7 @@ IMAP4Protocol::get (const KURL & _url)
// * Otherwise, it specifies the exact data items to request. In this case, all
// the logic is in the app.
- QString aUpper = aSection.upper();
+ TQString aUpper = aSection.upper();
if (aUpper.find ("STRUCTURE") != -1)
{
aSection = "BODYSTRUCTURE";
@@ -267,26 +267,26 @@ IMAP4Protocol::get (const KURL & _url)
("Content-Type: multipart/digest; boundary=\"IMAPDIGEST\"\r\n", 55);
if (selectInfo.recentAvailable ())
outputLineStr ("X-Recent: " +
- QString::number(selectInfo.recent ()) + "\r\n");
+ TQString::number(selectInfo.recent ()) + "\r\n");
if (selectInfo.countAvailable ())
- outputLineStr ("X-Count: " + QString::number(selectInfo.count ()) +
+ outputLineStr ("X-Count: " + TQString::number(selectInfo.count ()) +
"\r\n");
if (selectInfo.unseenAvailable ())
outputLineStr ("X-Unseen: " +
- QString::number(selectInfo.unseen ()) + "\r\n");
+ TQString::number(selectInfo.unseen ()) + "\r\n");
if (selectInfo.uidValidityAvailable ())
outputLineStr ("X-uidValidity: " +
- QString::number(selectInfo.uidValidity ()) +
+ TQString::number(selectInfo.uidValidity ()) +
"\r\n");
if (selectInfo.uidNextAvailable ())
outputLineStr ("X-UidNext: " +
- QString::number(selectInfo.uidNext ()) + "\r\n");
+ TQString::number(selectInfo.uidNext ()) + "\r\n");
if (selectInfo.flagsAvailable ())
- outputLineStr ("X-Flags: " + QString::number(selectInfo.flags ()) +
+ outputLineStr ("X-Flags: " + TQString::number(selectInfo.flags ()) +
"\r\n");
if (selectInfo.permanentFlagsAvailable ())
outputLineStr ("X-PermanentFlags: " +
- QString::number(selectInfo.permanentFlags ()) + "\r\n");
+ TQString::number(selectInfo.permanentFlags ()) + "\r\n");
if (selectInfo.readWriteAvailable ()) {
if (selectInfo.readWrite()) {
outputLine ("X-Access: Read/Write\r\n", 22);
@@ -295,7 +295,7 @@ IMAP4Protocol::get (const KURL & _url)
}
}
outputLine ("\r\n", 2);
- flushOutput(QString::null);
+ flushOutput(TQString::null);
cacheOutput = false;
}
@@ -304,11 +304,11 @@ IMAP4Protocol::get (const KURL & _url)
if (aSequence != "0:0")
{
- QString contentEncoding;
+ TQString contentEncoding;
if (aEnum == ITYPE_ATTACH && decodeContent)
{
// get the MIME header and fill getLastHandled()
- QString mySection = aSection;
+ TQString mySection = aSection;
mySection.replace("]", ".MIME]");
cmd = sendCommand (imapCommand::clientFetch (aSequence, mySection));
do
@@ -356,15 +356,15 @@ IMAP4Protocol::get (const KURL & _url)
cacheOutput = true;
if (cache && cache->getUid () != 0)
outputLineStr ("X-UID: " +
- QString::number(cache->getUid ()) + "\r\n");
+ TQString::number(cache->getUid ()) + "\r\n");
if (cache && cache->getSize () != 0)
outputLineStr ("X-Length: " +
- QString::number(cache->getSize ()) + "\r\n");
+ TQString::number(cache->getSize ()) + "\r\n");
if (cache && !cache->getDate ().isEmpty())
outputLineStr ("X-Date: " + cache->getDate () + "\r\n");
if (cache && cache->getFlags () != 0)
outputLineStr ("X-Flags: " +
- QString::number(cache->getFlags ()) + "\r\n");
+ TQString::number(cache->getFlags ()) + "\r\n");
} else cacheOutput = true;
if ( lastone && !decodeContent )
lastone->outputPart (*this);
@@ -385,7 +385,7 @@ IMAP4Protocol::get (const KURL & _url)
}
// just to keep everybody happy when no data arrived
- data (QByteArray ());
+ data (TQByteArray ());
finished ();
relayEnabled = false;
@@ -407,7 +407,7 @@ IMAP4Protocol::listDir (const KURL & _url)
return;
}
- QString myBox, mySequence, myLType, mySection, myValidity, myDelimiter, myInfo;
+ TQString myBox, mySequence, myLType, mySection, myValidity, myDelimiter, myInfo;
// parseURL with caching
enum IMAP_TYPE myType =
parseURL (_url, myBox, mySection, myLType, mySequence, myValidity,
@@ -417,7 +417,7 @@ IMAP4Protocol::listDir (const KURL & _url)
if (myType == ITYPE_DIR || myType == ITYPE_DIR_AND_BOX)
{
- QString listStr = myBox;
+ TQString listStr = myBox;
imapCommand *cmd;
if (!listStr.isEmpty () && !listStr.endsWith(myDelimiter) &&
@@ -436,7 +436,7 @@ IMAP4Protocol::listDir (const KURL & _url)
(myLType == "LSUB" || myLType == "LSUBNOCHECK")));
if (cmd->result () == "OK")
{
- QString mailboxName;
+ TQString mailboxName;
UDSEntry entry;
UDSAtom atom;
KURL aURL = _url;
@@ -448,13 +448,13 @@ IMAP4Protocol::listDir (const KURL & _url)
if (myLType == "LSUB")
{
// fire the same command as LIST to check if the box really exists
- QValueList<imapList> listResponsesSave = listResponses;
+ TQValueList<imapList> listResponsesSave = listResponses;
doCommand (imapCommand::clientList ("", listStr, false));
- for (QValueListIterator < imapList > it = listResponsesSave.begin ();
+ for (TQValueListIterator < imapList > it = listResponsesSave.begin ();
it != listResponsesSave.end (); ++it)
{
bool boxOk = false;
- for (QValueListIterator < imapList > it2 = listResponses.begin ();
+ for (TQValueListIterator < imapList > it2 = listResponses.begin ();
it2 != listResponses.end (); ++it2)
{
if ((*it2).name() == (*it).name())
@@ -474,7 +474,7 @@ IMAP4Protocol::listDir (const KURL & _url)
}
else // LIST or LSUBNOCHECK
{
- for (QValueListIterator < imapList > it = listResponses.begin ();
+ for (TQValueListIterator < imapList > it = listResponses.begin ();
it != listResponses.end (); ++it)
{
doListEntry (aURL, myBox, (*it), (mySection != "FOLDERONLY"));
@@ -495,12 +495,12 @@ IMAP4Protocol::listDir (const KURL & _url)
&& myLType != "LIST" && myLType != "LSUB" && myLType != "LSUBNOCHECK")
{
KURL aURL = _url;
- aURL.setQuery (QString::null);
- const QString encodedUrl = aURL.url(0, 106); // utf-8
+ aURL.setQuery (TQString::null);
+ const TQString encodedUrl = aURL.url(0, 106); // utf-8
if (!_url.query ().isEmpty ())
{
- QString query = KURL::decode_string (_url.query ());
+ TQString query = KURL::decode_string (_url.query ());
query = query.right (query.length () - 1);
if (!query.isEmpty())
{
@@ -519,15 +519,15 @@ IMAP4Protocol::listDir (const KURL & _url)
}
completeQueue.removeRef (cmd);
- QStringList list = getResults ();
+ TQStringList list = getResults ();
int stretch = 0;
if (selectInfo.uidNextAvailable ())
- stretch = QString::number(selectInfo.uidNext ()).length ();
+ stretch = TQString::number(selectInfo.uidNext ()).length ();
UDSEntry entry;
imapCache fake;
- for (QStringList::ConstIterator it = list.begin(); it != list.end();
+ for (TQStringList::ConstIterator it = list.begin(); it != list.end();
++it)
{
fake.setUid((*it).toULong());
@@ -566,7 +566,7 @@ IMAP4Protocol::listDir (const KURL & _url)
KURL newUrl = _url;
newUrl.setPath ("/" + myBox + ";UIDVALIDITY=" +
- QString::number(selectInfo.uidValidity ()));
+ TQString::number(selectInfo.uidValidity ()));
kdDebug(7116) << "IMAP4::listDir - redirecting to " << newUrl.prettyURL() << endl;
redirection (newUrl);
@@ -579,7 +579,7 @@ IMAP4Protocol::listDir (const KURL & _url)
int stretch = 0;
if (selectInfo.uidNextAvailable ())
- stretch = QString::number(selectInfo.uidNext ()).length ();
+ stretch = TQString::number(selectInfo.uidNext ()).length ();
// kdDebug(7116) << selectInfo.uidNext() << "d used to stretch " << stretch << endl;
UDSEntry entry;
@@ -622,8 +622,8 @@ IMAP4Protocol::listDir (const KURL & _url)
}
void
-IMAP4Protocol::setHost (const QString & _host, int _port,
- const QString & _user, const QString & _pass)
+IMAP4Protocol::setHost (const TQString & _host, int _port,
+ const TQString & _user, const TQString & _pass)
{
if (myHost != _host || myPort != _port || myUser != _user || myPass != _pass)
{ // what's the point of doing 4 string compares to avoid 4 string copies?
@@ -638,7 +638,7 @@ IMAP4Protocol::setHost (const QString & _host, int _port,
}
void
-IMAP4Protocol::parseRelay (const QByteArray & buffer)
+IMAP4Protocol::parseRelay (const TQByteArray & buffer)
{
if (relayEnabled) {
// relay data immediately
@@ -665,7 +665,7 @@ IMAP4Protocol::parseRelay (ulong len)
}
-bool IMAP4Protocol::parseRead(QByteArray & buffer, ulong len, ulong relay)
+bool IMAP4Protocol::parseRead(TQByteArray & buffer, ulong len, ulong relay)
{
char buf[8192];
while (buffer.size() < len)
@@ -681,7 +681,7 @@ bool IMAP4Protocol::parseRead(QByteArray & buffer, ulong len, ulong relay)
}
if (relay > buffer.size())
{
- QByteArray relayData;
+ TQByteArray relayData;
ssize_t relbuf = relay - buffer.size();
int currentRelay = QMIN(relbuf, readLen);
relayData.setRawData(buf, currentRelay);
@@ -689,7 +689,7 @@ bool IMAP4Protocol::parseRead(QByteArray & buffer, ulong len, ulong relay)
relayData.resetRawData(buf, currentRelay);
}
{
- QBuffer stream (buffer);
+ TQBuffer stream (buffer);
stream.open (IO_WriteOnly);
stream.at (buffer.size ());
stream.writeBlock (buf, readLen);
@@ -700,7 +700,7 @@ bool IMAP4Protocol::parseRead(QByteArray & buffer, ulong len, ulong relay)
}
-bool IMAP4Protocol::parseReadLine (QByteArray & buffer, ulong relay)
+bool IMAP4Protocol::parseReadLine (TQByteArray & buffer, ulong relay)
{
if (myHost.isEmpty()) return FALSE;
@@ -712,7 +712,7 @@ bool IMAP4Protocol::parseReadLine (QByteArray & buffer, ulong relay)
if (copyLen < readBufferLen) copyLen++;
if (relay > 0)
{
- QByteArray relayData;
+ TQByteArray relayData;
if (copyLen < (ssize_t) relay)
relay = copyLen;
@@ -723,7 +723,7 @@ bool IMAP4Protocol::parseReadLine (QByteArray & buffer, ulong relay)
}
// append to buffer
{
- QBuffer stream (buffer);
+ TQBuffer stream (buffer);
stream.open (IO_WriteOnly);
stream.at (buffer.size ());
@@ -776,7 +776,7 @@ IMAP4Protocol::put (const KURL & _url, int, bool, bool)
{
kdDebug(7116) << "IMAP4::put - " << _url.prettyURL() << endl;
// KIO::TCPSlaveBase::put(_url,permissions,overwrite,resume);
- QString aBox, aSequence, aLType, aSection, aValidity, aDelimiter, aInfo;
+ TQString aBox, aSequence, aLType, aSection, aValidity, aDelimiter, aInfo;
enum IMAP_TYPE aType =
parseURL (_url, aBox, aSection, aLType, aSequence, aValidity, aDelimiter, aInfo);
@@ -796,14 +796,14 @@ IMAP4Protocol::put (const KURL & _url, int, bool, bool)
}
else
{
- QPtrList < QByteArray > bufferList;
+ TQPtrList < TQByteArray > bufferList;
int length = 0;
int result;
// Loop until we got 'dataEnd'
do
{
- QByteArray *buffer = new QByteArray ();
+ TQByteArray *buffer = new TQByteArray ();
dataReq (); // Request for data
result = readData (*buffer);
if (result > 0)
@@ -832,7 +832,7 @@ IMAP4Protocol::put (const KURL & _url, int, bool, bool)
bool sendOk = true;
ulong wrote = 0;
- QByteArray *buffer;
+ TQByteArray *buffer;
// send data to server
while (!bufferList.isEmpty () && sendOk)
{
@@ -874,7 +874,7 @@ IMAP4Protocol::put (const KURL & _url, int, bool, bool)
{
if (hasCapability("UIDPLUS"))
{
- QString uid = cmd->resultInfo();
+ TQString uid = cmd->resultInfo();
if (uid.find("APPENDUID") != -1)
{
uid = uid.section(" ", 2, 2);
@@ -911,7 +911,7 @@ void
IMAP4Protocol::mkdir (const KURL & _url, int)
{
kdDebug(7116) << "IMAP4::mkdir - " << _url.prettyURL() << endl;
- QString aBox, aSequence, aLType, aSection, aValidity, aDelimiter, aInfo;
+ TQString aBox, aSequence, aLType, aSection, aValidity, aDelimiter, aInfo;
parseURL(_url, aBox, aSection, aLType, aSequence, aValidity, aDelimiter, aInfo);
kdDebug(7116) << "IMAP4::mkdir - create " << aBox << endl;
imapCommand *cmd = doCommand (imapCommand::clientCreate(aBox));
@@ -961,8 +961,8 @@ void
IMAP4Protocol::copy (const KURL & src, const KURL & dest, int, bool overwrite)
{
kdDebug(7116) << "IMAP4::copy - [" << (overwrite ? "Overwrite" : "NoOverwrite") << "] " << src.prettyURL() << " -> " << dest.prettyURL() << endl;
- QString sBox, sSequence, sLType, sSection, sValidity, sDelimiter, sInfo;
- QString dBox, dSequence, dLType, dSection, dValidity, dDelimiter, dInfo;
+ TQString sBox, sSequence, sLType, sSection, sValidity, sDelimiter, sInfo;
+ TQString dBox, dSequence, dLType, dSection, dValidity, dDelimiter, dInfo;
enum IMAP_TYPE sType =
parseURL (src, sBox, sSection, sLType, sSequence, sValidity, sDelimiter, sInfo);
enum IMAP_TYPE dType =
@@ -979,8 +979,8 @@ IMAP4Protocol::copy (const KURL & src, const KURL & dest, int, bool overwrite)
{
KURL testDir = dest;
- QString subDir = dBox.right (dBox.length () - dBox.findRev ('/'));
- QString topDir = dBox.left (sub);
+ TQString subDir = dBox.right (dBox.length () - dBox.findRev ('/'));
+ TQString topDir = dBox.left (sub);
testDir.setPath ("/" + topDir);
dType =
parseURL (testDir, topDir, dSection, dLType, dSequence, dValidity,
@@ -1048,7 +1048,7 @@ IMAP4Protocol::copy (const KURL & src, const KURL & dest, int, bool overwrite)
} else {
if (hasCapability("UIDPLUS"))
{
- QString uid = cmd->resultInfo();
+ TQString uid = cmd->resultInfo();
if (uid.find("COPYUID") != -1)
{
uid = uid.section(" ", 2, 3);
@@ -1071,7 +1071,7 @@ void
IMAP4Protocol::del (const KURL & _url, bool isFile)
{
kdDebug(7116) << "IMAP4::del - [" << (isFile ? "File" : "NoFile") << "] " << _url.prettyURL() << endl;
- QString aBox, aSequence, aLType, aSection, aValidity, aDelimiter, aInfo;
+ TQString aBox, aSequence, aLType, aSection, aValidity, aDelimiter, aInfo;
enum IMAP_TYPE aType =
parseURL (_url, aBox, aSection, aLType, aSequence, aValidity, aDelimiter, aInfo);
@@ -1201,7 +1201,7 @@ IMAP4Protocol::del (const KURL & _url, bool isFile)
* Note that the namespace can be empty
* Unsubscribe: data = 'U' + URL (KURL)
* Subscribe: data = 'u' + URL (KURL)
- * Change the status: data = 'S' + URL (KURL) + Flags (QCString)
+ * Change the status: data = 'S' + URL (KURL) + Flags (TQCString)
* ACL commands: data = 'A' + command + URL (KURL) + command-dependent args
* AnnotateMore commands: data = 'M' + 'G'et/'S'et + URL + entry + command-dependent args
* Search: data = 'E' + URL (KURL)
@@ -1209,12 +1209,12 @@ IMAP4Protocol::del (const KURL & _url, bool isFile)
* Custom command: data = 'X' + 'N'ormal/'E'xtended + command + command-dependent args
*/
void
-IMAP4Protocol::special (const QByteArray & aData)
+IMAP4Protocol::special (const TQByteArray & aData)
{
kdDebug(7116) << "IMAP4Protocol::special" << endl;
if (!makeLogin()) return;
- QDataStream stream(aData, IO_ReadOnly);
+ TQDataStream stream(aData, IO_ReadOnly);
int tmp;
stream >> tmp;
@@ -1264,7 +1264,7 @@ IMAP4Protocol::special (const QByteArray & aData)
// unsubscribe
KURL _url;
stream >> _url;
- QString aBox, aSequence, aLType, aSection, aValidity, aDelimiter, aInfo;
+ TQString aBox, aSequence, aLType, aSection, aValidity, aDelimiter, aInfo;
parseURL (_url, aBox, aSection, aLType, aSequence, aValidity, aDelimiter, aInfo);
imapCommand *cmd = doCommand(imapCommand::clientUnsubscribe(aBox));
if (cmd->result () != "OK")
@@ -1285,7 +1285,7 @@ IMAP4Protocol::special (const QByteArray & aData)
// subscribe
KURL _url;
stream >> _url;
- QString aBox, aSequence, aLType, aSection, aValidity, aDelimiter, aInfo;
+ TQString aBox, aSequence, aLType, aSection, aValidity, aDelimiter, aInfo;
parseURL (_url, aBox, aSection, aLType, aSequence, aValidity, aDelimiter, aInfo);
imapCommand *cmd = doCommand(imapCommand::clientSubscribe(aBox));
if (cmd->result () != "OK")
@@ -1341,15 +1341,15 @@ IMAP4Protocol::special (const QByteArray & aData)
{
// status
KURL _url;
- QCString newFlags;
+ TQCString newFlags;
stream >> _url >> newFlags;
- QString aBox, aSequence, aLType, aSection, aValidity, aDelimiter, aInfo;
+ TQString aBox, aSequence, aLType, aSection, aValidity, aDelimiter, aInfo;
parseURL (_url, aBox, aSection, aLType, aSequence, aValidity, aDelimiter, aInfo);
if (!assureBox(aBox, false)) return;
// make sure we only touch flags we know
- QCString knownFlags = "\\SEEN \\ANSWERED \\FLAGGED \\DRAFT";
+ TQCString knownFlags = "\\SEEN \\ANSWERED \\FLAGGED \\DRAFT";
const imapInfo info = getSelected();
if ( info.permanentFlagsAvailable() && (info.permanentFlags() & imapInfo::User) ) {
knownFlags += " KMAILFORWARDED KMAILTODO KMAILWATCHED KMAILIGNORED $FORWARDED $TODO $WATCHED $IGNORED";
@@ -1386,10 +1386,10 @@ IMAP4Protocol::special (const QByteArray & aData)
// seen
KURL _url;
bool seen;
- QCString newFlags;
+ TQCString newFlags;
stream >> _url >> seen;
- QString aBox, aSequence, aLType, aSection, aValidity, aDelimiter, aInfo;
+ TQString aBox, aSequence, aLType, aSection, aValidity, aDelimiter, aInfo;
parseURL (_url, aBox, aSection, aLType, aSequence, aValidity, aDelimiter, aInfo);
if ( !assureBox(aBox, true) ) // read-only because changing SEEN should be possible even then
return;
@@ -1426,24 +1426,24 @@ IMAP4Protocol::special (const QByteArray & aData)
}
default:
kdWarning(7116) << "Unknown command in special(): " << tmp << endl;
- error( ERR_UNSUPPORTED_ACTION, QString(QChar(tmp)) );
+ error( ERR_UNSUPPORTED_ACTION, TQString(TQChar(tmp)) );
break;
}
}
void
-IMAP4Protocol::specialACLCommand( int command, QDataStream& stream )
+IMAP4Protocol::specialACLCommand( int command, TQDataStream& stream )
{
// All commands start with the URL to the box
KURL _url;
stream >> _url;
- QString aBox, aSequence, aLType, aSection, aValidity, aDelimiter, aInfo;
+ TQString aBox, aSequence, aLType, aSection, aValidity, aDelimiter, aInfo;
parseURL (_url, aBox, aSection, aLType, aSequence, aValidity, aDelimiter, aInfo);
switch( command ) {
case 'S': // SETACL
{
- QString user, acl;
+ TQString user, acl;
stream >> user >> acl;
kdDebug(7116) << "SETACL " << aBox << " " << user << " " << acl << endl;
imapCommand *cmd = doCommand(imapCommand::clientSetACL(aBox, user, acl));
@@ -1462,7 +1462,7 @@ IMAP4Protocol::specialACLCommand( int command, QDataStream& stream )
}
case 'D': // DELETEACL
{
- QString user;
+ TQString user;
stream >> user;
kdDebug(7116) << "DELETEACL " << aBox << " " << user << endl;
imapCommand *cmd = doCommand(imapCommand::clientDeleteACL(aBox, user));
@@ -1503,7 +1503,7 @@ IMAP4Protocol::specialACLCommand( int command, QDataStream& stream )
case 'L': // LISTRIGHTS
{
// Do we need this one? It basically shows which rights are tied together, but that's all?
- error( ERR_UNSUPPORTED_ACTION, QString(QChar(command)) );
+ error( ERR_UNSUPPORTED_ACTION, TQString(TQChar(command)) );
break;
}
case 'M': // MYRIGHTS
@@ -1518,7 +1518,7 @@ IMAP4Protocol::specialACLCommand( int command, QDataStream& stream )
.arg(cmd->resultInfo()));
return;
}
- QStringList lst = getResults();
+ TQStringList lst = getResults();
kdDebug(7116) << "myrights results: " << lst << endl;
if ( !lst.isEmpty() ) {
Q_ASSERT( lst.count() == 1 );
@@ -1529,17 +1529,17 @@ IMAP4Protocol::specialACLCommand( int command, QDataStream& stream )
}
default:
kdWarning(7116) << "Unknown special ACL command:" << command << endl;
- error( ERR_UNSUPPORTED_ACTION, QString(QChar(command)) );
+ error( ERR_UNSUPPORTED_ACTION, TQString(TQChar(command)) );
}
}
void
-IMAP4Protocol::specialSearchCommand( QDataStream& stream )
+IMAP4Protocol::specialSearchCommand( TQDataStream& stream )
{
kdDebug(7116) << "IMAP4Protocol::specialSearchCommand" << endl;
KURL _url;
stream >> _url;
- QString aBox, aSequence, aLType, aSection, aValidity, aDelimiter, aInfo;
+ TQString aBox, aSequence, aLType, aSection, aValidity, aDelimiter, aInfo;
parseURL (_url, aBox, aSection, aLType, aSequence, aValidity, aDelimiter, aInfo);
if (!assureBox(aBox, false)) return;
@@ -1553,7 +1553,7 @@ IMAP4Protocol::specialSearchCommand( QDataStream& stream )
return;
}
completeQueue.removeRef(cmd);
- QStringList lst = getResults();
+ TQStringList lst = getResults();
kdDebug(7116) << "IMAP4Protocol::specialSearchCommand '" << aSection <<
"' returns " << lst << endl;
infoMessage( lst.join( " " ) );
@@ -1562,11 +1562,11 @@ IMAP4Protocol::specialSearchCommand( QDataStream& stream )
}
void
-IMAP4Protocol::specialCustomCommand( QDataStream& stream )
+IMAP4Protocol::specialCustomCommand( TQDataStream& stream )
{
kdDebug(7116) << "IMAP4Protocol::specialCustomCommand" << endl;
- QString command, arguments;
+ TQString command, arguments;
int type;
stream >> type;
stream >> command >> arguments;
@@ -1588,7 +1588,7 @@ IMAP4Protocol::specialCustomCommand( QDataStream& stream )
return;
}
completeQueue.removeRef(cmd);
- QStringList lst = getResults();
+ TQStringList lst = getResults();
kdDebug(7116) << "IMAP4Protocol::specialCustomCommand '" << command <<
":" << arguments <<
"' returns " << lst << endl;
@@ -1602,13 +1602,13 @@ IMAP4Protocol::specialCustomCommand( QDataStream& stream )
*/
if ( type == 'E' ) {
kdDebug(7116) << "IMAP4Protocol::specialCustomCommand: extended mode" << endl;
- imapCommand *cmd = sendCommand (imapCommand::clientCustom( command, QString() ));
+ imapCommand *cmd = sendCommand (imapCommand::clientCustom( command, TQString() ));
while ( !parseLoop () ) ;
// see if server is waiting
if (!cmd->isComplete () && !getContinuation ().isEmpty ())
{
- const QByteArray buffer = arguments.utf8();
+ const TQByteArray buffer = arguments.utf8();
// send data to server
bool sendOk = (write (buffer.data (), buffer.size ()) == (ssize_t)buffer.size ());
@@ -1632,7 +1632,7 @@ IMAP4Protocol::specialCustomCommand( QDataStream& stream )
completeQueue.removeRef (cmd);
- QStringList lst = getResults();
+ TQStringList lst = getResults();
kdDebug(7116) << "IMAP4Protocol::specialCustomCommand: returns " << lst << endl;
infoMessage( lst.join( " " ) );
@@ -1641,12 +1641,12 @@ IMAP4Protocol::specialCustomCommand( QDataStream& stream )
}
void
-IMAP4Protocol::specialAnnotateMoreCommand( int command, QDataStream& stream )
+IMAP4Protocol::specialAnnotateMoreCommand( int command, TQDataStream& stream )
{
// All commands start with the URL to the box
KURL _url;
stream >> _url;
- QString aBox, aSequence, aLType, aSection, aValidity, aDelimiter, aInfo;
+ TQString aBox, aSequence, aLType, aSection, aValidity, aDelimiter, aInfo;
parseURL (_url, aBox, aSection, aLType, aSequence, aValidity, aDelimiter, aInfo);
switch( command ) {
@@ -1654,10 +1654,10 @@ IMAP4Protocol::specialAnnotateMoreCommand( int command, QDataStream& stream )
{
// Params:
// KURL URL of the mailbox
- // QString entry (should be an actual entry name, no % or *; empty for server entries)
- // QMap<QString,QString> attributes (name and value)
- QString entry;
- QMap<QString, QString> attributes;
+ // TQString entry (should be an actual entry name, no % or *; empty for server entries)
+ // TQMap<TQString,TQString> attributes (name and value)
+ TQString entry;
+ TQMap<TQString, TQString> attributes;
stream >> entry >> attributes;
kdDebug(7116) << "SETANNOTATION " << aBox << " " << entry << " " << attributes.count() << " attributes" << endl;
imapCommand *cmd = doCommand(imapCommand::clientSetAnnotation(aBox, entry, attributes));
@@ -1678,10 +1678,10 @@ IMAP4Protocol::specialAnnotateMoreCommand( int command, QDataStream& stream )
{
// Params:
// KURL URL of the mailbox
- // QString entry (should be an actual entry name, no % or *; empty for server entries)
- // QStringList attributes (list of attributes to be retrieved, possibly with % or *)
- QString entry;
- QStringList attributeNames;
+ // TQString entry (should be an actual entry name, no % or *; empty for server entries)
+ // TQStringList attributes (list of attributes to be retrieved, possibly with % or *)
+ TQString entry;
+ TQStringList attributeNames;
stream >> entry >> attributeNames;
kdDebug(7116) << "GETANNOTATION " << aBox << " " << entry << " " << attributeNames << endl;
imapCommand *cmd = doCommand(imapCommand::clientGetAnnotation(aBox, entry, attributeNames));
@@ -1704,21 +1704,21 @@ IMAP4Protocol::specialAnnotateMoreCommand( int command, QDataStream& stream )
}
default:
kdWarning(7116) << "Unknown special annotate command:" << command << endl;
- error( ERR_UNSUPPORTED_ACTION, QString(QChar(command)) );
+ error( ERR_UNSUPPORTED_ACTION, TQString(TQChar(command)) );
}
}
void
-IMAP4Protocol::specialQuotaCommand( int command, QDataStream& stream )
+IMAP4Protocol::specialQuotaCommand( int command, TQDataStream& stream )
{
// All commands start with the URL to the box
KURL _url;
stream >> _url;
- QString aBox, aSequence, aLType, aSection, aValidity, aDelimiter, aInfo;
+ TQString aBox, aSequence, aLType, aSection, aValidity, aDelimiter, aInfo;
parseURL (_url, aBox, aSection, aLType, aSequence, aValidity, aDelimiter, aInfo);
switch( command ) {
- case 'R': // GETQUOTAROOT
+ case 'R': // GEQUOTAROOT
{
kdDebug(7116) << "QUOTAROOT " << aBox << endl;
imapCommand *cmd = doCommand(imapCommand::clientGetQuotaroot( aBox ) );
@@ -1734,21 +1734,21 @@ IMAP4Protocol::specialQuotaCommand( int command, QDataStream& stream )
finished();
break;
}
- case 'G': // GETQUOTA
+ case 'G': // GEQUOTA
{
- kdDebug(7116) << "GETQUOTA command" << endl;
+ kdDebug(7116) << "GEQUOTA command" << endl;
kdWarning(7116) << "UNIMPLEMENTED" << endl;
break;
}
- case 'S': // SETQUOTA
+ case 'S': // SEQUOTA
{
- kdDebug(7116) << "SETQUOTA command" << endl;
+ kdDebug(7116) << "SEQUOTA command" << endl;
kdWarning(7116) << "UNIMPLEMENTED" << endl;
break;
}
default:
kdWarning(7116) << "Unknown special quota command:" << command << endl;
- error( ERR_UNSUPPORTED_ACTION, QString(QChar(command)) );
+ error( ERR_UNSUPPORTED_ACTION, TQString(TQChar(command)) );
}
}
@@ -1756,8 +1756,8 @@ void
IMAP4Protocol::rename (const KURL & src, const KURL & dest, bool overwrite)
{
kdDebug(7116) << "IMAP4::rename - [" << (overwrite ? "Overwrite" : "NoOverwrite") << "] " << src.prettyURL() << " -> " << dest.prettyURL() << endl;
- QString sBox, sSequence, sLType, sSection, sValidity, sDelimiter, sInfo;
- QString dBox, dSequence, dLType, dSection, dValidity, dDelimiter, dInfo;
+ TQString sBox, sSequence, sLType, sSection, sValidity, sDelimiter, sInfo;
+ TQString dBox, dSequence, dLType, dSection, dValidity, dDelimiter, dInfo;
enum IMAP_TYPE sType =
parseURL (src, sBox, sSection, sLType, sSequence, sValidity, sDelimiter, sInfo, false);
enum IMAP_TYPE dType =
@@ -1815,11 +1815,11 @@ IMAP4Protocol::slave_status ()
{
bool connected = (getState() != ISTATE_NO) && isConnectionValid();
kdDebug(7116) << "IMAP4::slave_status " << connected << endl;
- slaveStatus ( connected ? myHost : QString::null, connected );
+ slaveStatus ( connected ? myHost : TQString::null, connected );
}
void
-IMAP4Protocol::dispatch (int command, const QByteArray & data)
+IMAP4Protocol::dispatch (int command, const TQByteArray & data)
{
kdDebug(7116) << "IMAP4::dispatch - command=" << command << endl;
KIO::TCPSlaveBase::dispatch (command, data);
@@ -1829,7 +1829,7 @@ void
IMAP4Protocol::stat (const KURL & _url)
{
kdDebug(7116) << "IMAP4::stat - " << _url.prettyURL() << endl;
- QString aBox, aSequence, aLType, aSection, aValidity, aDelimiter, aInfo;
+ TQString aBox, aSequence, aLType, aSection, aValidity, aDelimiter, aInfo;
// parseURL with caching
enum IMAP_TYPE aType =
parseURL (_url, aBox, aSection, aLType, aSequence, aValidity, aDelimiter,
@@ -1857,7 +1857,7 @@ IMAP4Protocol::stat (const KURL & _url)
setState(ISTATE_LOGIN);
}
bool ok = false;
- QString cmdInfo;
+ TQString cmdInfo;
if (aType == ITYPE_MSG || aType == ITYPE_ATTACH)
ok = true;
else
@@ -1873,7 +1873,7 @@ IMAP4Protocol::stat (const KURL & _url)
imapCommand *cmd = doCommand (imapCommand::clientList ("", aBox));
if (cmd->result () == "OK")
{
- for (QValueListIterator < imapList > it = listResponses.begin ();
+ for (TQValueListIterator < imapList > it = listResponses.begin ();
it != listResponses.end (); ++it)
{
if (aBox == (*it).name ()) found = true;
@@ -1890,7 +1890,7 @@ IMAP4Protocol::stat (const KURL & _url)
|| (aSection == "UNSEEN" && getStatus().unseenAvailable()))
{
atom.m_uds = UDS_SIZE;
- atom.m_str = QString::null;
+ atom.m_str = TQString::null;
atom.m_long = (aSection == "UIDNEXT") ? getStatus().uidNext()
: getStatus().unseen();
entry.append(atom);
@@ -1924,7 +1924,7 @@ IMAP4Protocol::stat (const KURL & _url)
KURL newUrl = _url;
newUrl.setPath ("/" + aBox + ";UIDVALIDITY=" +
- QString::number(validity));
+ TQString::number(validity));
kdDebug(7116) << "IMAP4::stat - redirecting to " << newUrl.prettyURL() << endl;
redirection (newUrl);
}
@@ -1953,7 +1953,7 @@ IMAP4Protocol::stat (const KURL & _url)
{
case ITYPE_DIR:
atom.m_uds = UDS_FILE_TYPE;
- atom.m_str = QString::null;
+ atom.m_str = TQString::null;
atom.m_long = S_IFDIR;
entry.append (atom);
break;
@@ -1961,7 +1961,7 @@ IMAP4Protocol::stat (const KURL & _url)
case ITYPE_BOX:
case ITYPE_DIR_AND_BOX:
atom.m_uds = UDS_FILE_TYPE;
- atom.m_str = QString::null;
+ atom.m_str = TQString::null;
atom.m_long = S_IFDIR;
entry.append (atom);
break;
@@ -1969,7 +1969,7 @@ IMAP4Protocol::stat (const KURL & _url)
case ITYPE_MSG:
case ITYPE_ATTACH:
atom.m_uds = UDS_FILE_TYPE;
- atom.m_str = QString::null;
+ atom.m_str = TQString::null;
atom.m_long = S_IFREG;
entry.append (atom);
break;
@@ -2007,7 +2007,7 @@ void IMAP4Protocol::closeConnection()
completeQueue.clear();
sentQueue.clear();
lastHandled = 0;
- currentBox = QString::null;
+ currentBox = TQString::null;
readBufferLen = 0;
}
@@ -2033,13 +2033,13 @@ bool IMAP4Protocol::makeLogin ()
unhandled.clear ();
if (!alreadyConnected) while (!parseLoop ()) ; //get greeting
- QString greeting;
+ TQString greeting;
if (!unhandled.isEmpty()) greeting = unhandled.first().stripWhiteSpace();
unhandled.clear (); //get rid of it
cmd = doCommand (new imapCommand ("CAPABILITY", ""));
kdDebug(7116) << "IMAP4: setHost: capability" << endl;
- for (QStringList::Iterator it = imapCapabilities.begin ();
+ for (TQStringList::Iterator it = imapCapabilities.begin ();
it != imapCapabilities.end (); ++it)
{
kdDebug(7116) << "'" << (*it) << "'" << endl;
@@ -2057,7 +2057,7 @@ bool IMAP4Protocol::makeLogin ()
if (metaData("nologin") == "on") return TRUE;
- if (myTLS == "on" && !hasCapability(QString("STARTTLS")))
+ if (myTLS == "on" && !hasCapability(TQString("STARTTLS")))
{
error(ERR_COULD_NOT_LOGIN, i18n("The server does not support TLS.\n"
"Disable this security feature to connect unencrypted."));
@@ -2065,7 +2065,7 @@ bool IMAP4Protocol::makeLogin ()
return false;
}
if ((myTLS == "on" || (canUseTLS() && myTLS != "off")) &&
- hasCapability(QString("STARTTLS")))
+ hasCapability(TQString("STARTTLS")))
{
imapCommand *cmd = doCommand (imapCommand::clientStartTLS());
if (cmd->result () == "OK")
@@ -2076,7 +2076,7 @@ bool IMAP4Protocol::makeLogin ()
{
kdDebug(7116) << "TLS mode has been enabled." << endl;
imapCommand *cmd2 = doCommand (new imapCommand ("CAPABILITY", ""));
- for (QStringList::Iterator it = imapCapabilities.begin ();
+ for (TQStringList::Iterator it = imapCapabilities.begin ();
it != imapCapabilities.end (); ++it)
{
kdDebug(7116) << "'" << (*it) << "'" << endl;
@@ -2092,14 +2092,14 @@ bool IMAP4Protocol::makeLogin ()
}
if (myAuth.isEmpty () || myAuth == "*") {
- if (hasCapability (QString ("LOGINDISABLED"))) {
+ if (hasCapability (TQString ("LOGINDISABLED"))) {
error (ERR_COULD_NOT_LOGIN, i18n("LOGIN is disabled by the server."));
closeConnection();
return false;
}
}
else {
- if (!hasCapability (QString ("AUTH=") + myAuth)) {
+ if (!hasCapability (TQString ("AUTH=") + myAuth)) {
error (ERR_COULD_NOT_LOGIN, i18n("The authentication method %1 is not "
"supported by the server.").arg(myAuth));
closeConnection();
@@ -2107,7 +2107,7 @@ bool IMAP4Protocol::makeLogin ()
}
}
- if ( greeting.contains( QRegExp( "Cyrus IMAP4 v2.1" ) ) ) {
+ if ( greeting.contains( TQRegExp( "Cyrus IMAP4 v2.1" ) ) ) {
removeCapability( "ANNOTATEMORE" );
}
@@ -2120,7 +2120,7 @@ bool IMAP4Protocol::makeLogin ()
kdDebug(7116) << "IMAP4::makeLogin - open_PassDlg said user=" << myUser << " pass=xx" << endl;
- QString resultInfo;
+ TQString resultInfo;
if (myAuth.isEmpty () || myAuth == "*")
{
if (myUser.isEmpty () || myPass.isEmpty ()) {
@@ -2161,7 +2161,7 @@ bool IMAP4Protocol::makeLogin ()
cmd = doCommand( imapCommand::clientList("", "") );
if (cmd->result () == "OK")
{
- QValueListIterator < imapList > it = listResponses.begin();
+ TQValueListIterator < imapList > it = listResponses.begin();
if ( it == listResponses.end() )
{
// empty answer - this is a buggy imap server
@@ -2175,13 +2175,13 @@ bool IMAP4Protocol::makeLogin ()
}
if ( it != listResponses.end() )
{
- namespaceToDelimiter[QString::null] = (*it).hierarchyDelimiter();
+ namespaceToDelimiter[TQString::null] = (*it).hierarchyDelimiter();
kdDebug(7116) << "makeLogin - delimiter for empty ns='" <<
(*it).hierarchyDelimiter() << "'" << endl;
if ( !hasCapability("NAMESPACE") )
{
// server does not support namespaces
- QString nsentry = QString::number( 0 ) + "=="
+ TQString nsentry = TQString::number( 0 ) + "=="
+ (*it).hierarchyDelimiter();
imapNamespaces.append( nsentry );
}
@@ -2196,10 +2196,10 @@ bool IMAP4Protocol::makeLogin ()
}
void
-IMAP4Protocol::parseWriteLine (const QString & aStr)
+IMAP4Protocol::parseWriteLine (const TQString & aStr)
{
//kdDebug(7116) << "Writing: " << aStr << endl;
- QCString writer = aStr.utf8();
+ TQCString writer = aStr.utf8();
int len = writer.length();
// append CRLF if necessary
@@ -2251,15 +2251,15 @@ IMAP4Protocol::doListEntry (const KURL & _url, int stretch, imapCache * cache,
bool withFlags, bool withSubject)
{
KURL aURL = _url;
- aURL.setQuery (QString::null);
- const QString encodedUrl = aURL.url(0, 106); // utf-8
+ aURL.setQuery (TQString::null);
+ const TQString encodedUrl = aURL.url(0, 106); // utf-8
doListEntry(encodedUrl, stretch, cache, withFlags, withSubject);
}
void
-IMAP4Protocol::doListEntry (const QString & encodedUrl, int stretch, imapCache * cache,
+IMAP4Protocol::doListEntry (const TQString & encodedUrl, int stretch, imapCache * cache,
bool withFlags, bool withSubject)
{
if (cache)
@@ -2269,7 +2269,7 @@ IMAP4Protocol::doListEntry (const QString & encodedUrl, int stretch, imapCache *
entry.clear ();
- const QString uid = QString::number(cache->getUid());
+ const TQString uid = TQString::number(cache->getUid());
atom.m_uds = UDS_NAME;
atom.m_str = uid;
@@ -2296,7 +2296,7 @@ IMAP4Protocol::doListEntry (const QString & encodedUrl, int stretch, imapCache *
entry.append (atom);
atom.m_uds = UDS_FILE_TYPE;
- atom.m_str = QString::null;
+ atom.m_str = TQString::null;
atom.m_long = S_IFREG;
entry.append (atom);
@@ -2322,18 +2322,18 @@ IMAP4Protocol::doListEntry (const QString & encodedUrl, int stretch, imapCache *
}
void
-IMAP4Protocol::doListEntry (const KURL & _url, const QString & myBox,
+IMAP4Protocol::doListEntry (const KURL & _url, const TQString & myBox,
const imapList & item, bool appendPath)
{
KURL aURL = _url;
- aURL.setQuery (QString::null);
+ aURL.setQuery (TQString::null);
UDSEntry entry;
UDSAtom atom;
int hdLen = item.hierarchyDelimiter().length();
{
// mailboxName will be appended to the path if appendPath is true
- QString mailboxName = item.name ();
+ TQString mailboxName = item.name ();
// some beautification
if (mailboxName.find (myBox) == 0 && mailboxName.length() > myBox.length())
@@ -2379,7 +2379,7 @@ IMAP4Protocol::doListEntry (const KURL & _url, const QString & myBox,
// explicitly set this as a directory for KFileDialog
atom.m_uds = UDS_FILE_TYPE;
- atom.m_str = QString::null;
+ atom.m_str = TQString::null;
atom.m_long = S_IFDIR;
entry.append (atom);
}
@@ -2393,7 +2393,7 @@ IMAP4Protocol::doListEntry (const KURL & _url, const QString & myBox,
// explicitly set this as a directory for KFileDialog
atom.m_uds = UDS_FILE_TYPE;
- atom.m_str = QString::null;
+ atom.m_str = TQString::null;
atom.m_long = S_IFDIR;
entry.append (atom);
}
@@ -2406,7 +2406,7 @@ IMAP4Protocol::doListEntry (const KURL & _url, const QString & myBox,
}
atom.m_uds = UDS_URL;
- QString path = aURL.path();
+ TQString path = aURL.path();
atom.m_str = aURL.url (0, 106); // utf-8
if (appendPath)
{
@@ -2446,10 +2446,10 @@ IMAP4Protocol::doListEntry (const KURL & _url, const QString & myBox,
}
enum IMAP_TYPE
-IMAP4Protocol::parseURL (const KURL & _url, QString & _box,
- QString & _section, QString & _type, QString & _uid,
- QString & _validity, QString & _hierarchyDelimiter,
- QString & _info, bool cache)
+IMAP4Protocol::parseURL (const KURL & _url, TQString & _box,
+ TQString & _section, TQString & _type, TQString & _uid,
+ TQString & _validity, TQString & _hierarchyDelimiter,
+ TQString & _info, bool cache)
{
enum IMAP_TYPE retVal;
retVal = ITYPE_UNKNOWN;
@@ -2458,7 +2458,7 @@ IMAP4Protocol::parseURL (const KURL & _url, QString & _box,
// kdDebug(7116) << "URL: query - '" << KURL::decode_string(_url.query()) << "'" << endl;
// get the delimiter
- QString myNamespace = namespaceForBox( _box );
+ TQString myNamespace = namespaceForBox( _box );
kdDebug(7116) << "IMAP4::parseURL - namespace=" << myNamespace << endl;
if ( namespaceToDelimiter.contains(myNamespace) )
{
@@ -2487,7 +2487,7 @@ IMAP4Protocol::parseURL (const KURL & _url, QString & _box,
cmd = doCommand (imapCommand::clientList ("", _box));
if (cmd->result () == "OK")
{
- for (QValueListIterator < imapList > it = listResponses.begin ();
+ for (TQValueListIterator < imapList > it = listResponses.begin ();
it != listResponses.end (); ++it)
{
//kdDebug(7116) << "IMAP4::parseURL - checking " << _box << " to " << (*it).name() << endl;
@@ -2576,7 +2576,7 @@ IMAP4Protocol::parseURL (const KURL & _url, QString & _box,
}
int
-IMAP4Protocol::outputLine (const QCString & _str, int len)
+IMAP4Protocol::outputLine (const TQCString & _str, int len)
{
if (len == -1) {
len = _str.length();
@@ -2593,7 +2593,7 @@ IMAP4Protocol::outputLine (const QCString & _str, int len)
return 0;
}
- QByteArray temp;
+ TQByteArray temp;
bool relay = relayEnabled;
relayEnabled = true;
@@ -2605,7 +2605,7 @@ IMAP4Protocol::outputLine (const QCString & _str, int len)
return 0;
}
-void IMAP4Protocol::flushOutput(QString contentEncoding)
+void IMAP4Protocol::flushOutput(TQString contentEncoding)
{
// send out cached data to the application
if (outputBufferIndex == 0)
@@ -2615,7 +2615,7 @@ void IMAP4Protocol::flushOutput(QString contentEncoding)
if (decodeContent)
{
// get the coding from the MIME header
- QByteArray decoded;
+ TQByteArray decoded;
if (contentEncoding.find("quoted-printable", 0, false) == 0)
decoded = KCodecs::quotedPrintableDecode(outputCache);
else if (contentEncoding.find("base64", 0, false) == 0)
@@ -2623,7 +2623,7 @@ void IMAP4Protocol::flushOutput(QString contentEncoding)
else
decoded = outputCache;
- QString mimetype = KMimeType::findByContent( decoded )->name();
+ TQString mimetype = KMimeType::findByContent( decoded )->name();
kdDebug(7116) << "IMAP4::flushOutput - mimeType " << mimetype << endl;
mimeType(mimetype);
decodeContent = false;
@@ -2654,7 +2654,7 @@ ssize_t IMAP4Protocol::myRead(void *data, ssize_t len)
}
bool
-IMAP4Protocol::assureBox (const QString & aBox, bool readonly)
+IMAP4Protocol::assureBox (const TQString & aBox, bool readonly)
{
if (aBox.isEmpty()) return false;
@@ -2667,7 +2667,7 @@ IMAP4Protocol::assureBox (const QString & aBox, bool readonly)
selectInfo = imapInfo();
cmd = doCommand (imapCommand::clientSelect (aBox, readonly));
bool ok = cmd->result() == "OK";
- QString cmdInfo = cmd->resultInfo();
+ TQString cmdInfo = cmd->resultInfo();
completeQueue.removeRef (cmd);
if (!ok)
@@ -2676,7 +2676,7 @@ IMAP4Protocol::assureBox (const QString & aBox, bool readonly)
cmd = doCommand (imapCommand::clientList ("", aBox));
if (cmd->result () == "OK")
{
- for (QValueListIterator < imapList > it = listResponses.begin ();
+ for (TQValueListIterator < imapList > it = listResponses.begin ();
it != listResponses.end (); ++it)
{
if (aBox == (*it).name ()) found = true;
@@ -2702,10 +2702,10 @@ IMAP4Protocol::assureBox (const QString & aBox, bool readonly)
// Doing this means a server roundtrip and since assureBox is called
// after every mail, we do it with a timeout.
kdDebug(7116) << "IMAP4Protocol::assureBox - reusing box" << endl;
- if ( mTimeOfLastNoop.secsTo( QDateTime::currentDateTime() ) > 10 ) {
+ if ( mTimeOfLastNoop.secsTo( TQDateTime::currentDateTime() ) > 10 ) {
cmd = doCommand (imapCommand::clientNoop ());
completeQueue.removeRef (cmd);
- mTimeOfLastNoop = QDateTime::currentDateTime();
+ mTimeOfLastNoop = TQDateTime::currentDateTime();
kdDebug(7116) << "IMAP4Protocol::assureBox - noop timer fired" << endl;
}
}
diff --git a/kioslaves/imap4/imap4.h b/kioslaves/imap4/imap4.h
index b86a3815b..9920ecac4 100644
--- a/kioslaves/imap4/imap4.h
+++ b/kioslaves/imap4/imap4.h
@@ -28,7 +28,7 @@
#include "mimeio.h"
#include <kio/tcpslavebase.h>
-#include <qbuffer.h>
+#include <tqbuffer.h>
#define IMAP_BUFFER 8192
@@ -55,14 +55,14 @@ class IMAP4Protocol:public
public:
// reimplement the TCPSlave
- IMAP4Protocol (const QCString & pool, const QCString & app, bool isSSL);
+ IMAP4Protocol (const TQCString & pool, const TQCString & app, bool isSSL);
virtual ~IMAP4Protocol ();
virtual void openConnection();
virtual void closeConnection();
- 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);
/**
* @brief get a message or part of a message
* the data is normally send as we get it from the server
@@ -83,13 +83,13 @@ public:
* @brief Capabilites, NOOP, (Un)subscribe, Change status,
* Change ACL
*/
- virtual void special (const QByteArray & data);
+ virtual void special (const TQByteArray & data);
/**
* @brief list a directory/mailbox
*/
virtual void listDir (const KURL & _url);
virtual void setSubURL (const KURL & _url);
- virtual void dispatch (int command, const QByteArray & data);
+ virtual void dispatch (int command, const TQByteArray & data);
/**
* @brief create a mailbox
*/
@@ -103,7 +103,7 @@ public:
/** @brief reimplement the parser
* relay hook to send the fetched data directly to an upper level
*/
- virtual void parseRelay (const QByteArray & buffer);
+ virtual void parseRelay (const TQByteArray & buffer);
/** @brief reimplement the parser
* relay hook to announce the fetched data directly to an upper level
@@ -112,26 +112,26 @@ public:
/** @brief reimplement the parser
* read at least len bytes */
- virtual bool parseRead (QByteArray &buffer,ulong len,ulong relay=0);
+ virtual bool parseRead (TQByteArray &buffer,ulong len,ulong relay=0);
/** @brief reimplement the parser
* @brief read at least a line (up to CRLF) */
- virtual bool parseReadLine (QByteArray & buffer, ulong relay = 0);
+ virtual bool parseReadLine (TQByteArray & buffer, ulong relay = 0);
/** @brief reimplement the parser
* @brief write argument to the server */
- virtual void parseWriteLine (const QString &);
+ virtual void parseWriteLine (const TQString &);
/** @brief reimplement the mimeIO */
- virtual int outputLine (const QCString & _str, int len = -1);
+ virtual int outputLine (const TQCString & _str, int len = -1);
/** @brief send out cached data to the application */
- virtual void flushOutput(QString contentEncoding = QString::null);
+ virtual void flushOutput(TQString contentEncoding = TQString::null);
protected:
// select or examine the box if needed
- bool assureBox (const QString & aBox, bool readonly);
+ bool assureBox (const TQString & aBox, bool readonly);
ssize_t myRead(void *data, ssize_t len);
@@ -143,15 +143,15 @@ protected:
* set to ITYPE_DIR_AND_BOX
*/
enum IMAP_TYPE
- parseURL (const KURL & _url, QString & _box, QString & _section,
- QString & _type, QString & _uid, QString & _validity,
- QString & _hierarchyDelimiter, QString & _info,
+ parseURL (const KURL & _url, TQString & _box, TQString & _section,
+ TQString & _type, TQString & _uid, TQString & _validity,
+ TQString & _hierarchyDelimiter, TQString & _info,
bool cache = false);
- QString getMimeType (enum IMAP_TYPE);
+ TQString getMimeType (enum IMAP_TYPE);
bool makeLogin ();
- void outputLineStr (const QString & _str)
+ void outputLineStr (const TQString & _str)
{
outputLine (_str.latin1 (), _str.length());
}
@@ -163,43 +163,43 @@ protected:
* If @p appendPath is true the foldername will be appended
* to the path of @p url
*/
- void doListEntry (const KURL & url, const QString & myBox,
+ void doListEntry (const KURL & url, const TQString & myBox,
const imapList & item, bool appendPath = true);
/** Send an ACL command which is identified by @p command */
- void specialACLCommand( int command, QDataStream& stream );
+ void specialACLCommand( int command, TQDataStream& stream );
/** Send an annotation command which is identified by @p command */
- void specialAnnotateMoreCommand( int command, QDataStream& stream );
- void specialQuotaCommand( int command, QDataStream& stream );
+ void specialAnnotateMoreCommand( int command, TQDataStream& stream );
+ void specialQuotaCommand( int command, TQDataStream& stream );
/** Search current folder, the search string is passed as SECTION */
- void specialSearchCommand( QDataStream& );
+ void specialSearchCommand( TQDataStream& );
/** Send a custom command to the server */
- void specialCustomCommand( QDataStream& );
+ void specialCustomCommand( TQDataStream& );
private:
// This method behaves like the above method but takes an already encoded url,
// so you don't have to call KURL::url() for every mail.
- void doListEntry (const QString & encodedUrl, int stretch, imapCache * cache = NULL,
+ void doListEntry (const TQString & encodedUrl, int stretch, imapCache * cache = NULL,
bool withFlags = FALSE, bool withSubject = FALSE);
- QString myHost, myUser, myPass, myAuth, myTLS;
+ TQString myHost, myUser, myPass, myAuth, myTLS;
int myPort;
bool mySSL;
bool relayEnabled, cacheOutput, decodeContent;
- QByteArray outputCache;
- QBuffer outputBuffer;
+ TQByteArray outputCache;
+ TQBuffer outputBuffer;
Q_ULONG outputBufferIndex;
KIO::filesize_t mProcessedSize;
char readBuffer[IMAP_BUFFER];
ssize_t readBufferLen;
int readSize;
- QDateTime mTimeOfLastNoop;
+ TQDateTime mTimeOfLastNoop;
};
#endif
diff --git a/kioslaves/imap4/imapcommand.cc b/kioslaves/imap4/imapcommand.cc
index e5eee776f..ae26f0ab2 100644
--- a/kioslaves/imap4/imapcommand.cc
+++ b/kioslaves/imap4/imapcommand.cc
@@ -43,8 +43,8 @@
#include <unistd.h>
#include <stdlib.h>
-#include <qregexp.h>
-#include <qbuffer.h>
+#include <tqregexp.h>
+#include <tqbuffer.h>
#include <kprotocolmanager.h>
#include <ksock.h>
@@ -58,10 +58,10 @@
imapCommand::imapCommand ()
{
mComplete = false;
- mId = QString::null;
+ mId = TQString::null;
}
-imapCommand::imapCommand (const QString & command, const QString & parameter)
+imapCommand::imapCommand (const TQString & command, const TQString & parameter)
// aCommand(NULL),
// mResult(NULL),
// mParameter(NULL)
@@ -69,7 +69,7 @@ imapCommand::imapCommand (const QString & command, const QString & parameter)
mComplete = false;
aCommand = command;
aParameter = parameter;
- mId = QString::null;
+ mId = TQString::null;
}
bool
@@ -78,38 +78,38 @@ imapCommand::isComplete ()
return mComplete;
}
-const QString &
+const TQString &
imapCommand::result ()
{
return mResult;
}
-const QString &
+const TQString &
imapCommand::resultInfo ()
{
return mResultInfo;
}
-const QString &
+const TQString &
imapCommand::id ()
{
return mId;
}
-const QString &
+const TQString &
imapCommand::parameter ()
{
return aParameter;
}
-const QString &
+const TQString &
imapCommand::command ()
{
return aCommand;
}
void
-imapCommand::setId (const QString & id)
+imapCommand::setId (const TQString & id)
{
if (mId.isEmpty ())
mId = id;
@@ -122,25 +122,25 @@ imapCommand::setComplete ()
}
void
-imapCommand::setResult (const QString & result)
+imapCommand::setResult (const TQString & result)
{
mResult = result;
}
void
-imapCommand::setResultInfo (const QString & result)
+imapCommand::setResultInfo (const TQString & result)
{
mResultInfo = result;
}
void
-imapCommand::setCommand (const QString & command)
+imapCommand::setCommand (const TQString & command)
{
aCommand = command;
}
void
-imapCommand::setParameter (const QString & parameter)
+imapCommand::setParameter (const TQString & parameter)
{
aParameter = parameter;
}
@@ -161,16 +161,16 @@ imapCommand::clientNoop ()
}
imapCommand *
-imapCommand::clientFetch (ulong uid, const QString & fields, bool nouid)
+imapCommand::clientFetch (ulong uid, const TQString & fields, bool nouid)
{
return clientFetch (uid, uid, fields, nouid);
}
imapCommand *
-imapCommand::clientFetch (ulong fromUid, ulong toUid, const QString & fields,
+imapCommand::clientFetch (ulong fromUid, ulong toUid, const TQString & fields,
bool nouid)
{
- QString uid = QString::number(fromUid);
+ TQString uid = TQString::number(fromUid);
if (fromUid != toUid)
{
@@ -178,13 +178,13 @@ imapCommand::clientFetch (ulong fromUid, ulong toUid, const QString & fields,
if (toUid < fromUid)
uid += "*";
else
- uid += QString::number(toUid);
+ uid += TQString::number(toUid);
}
return clientFetch (uid, fields, nouid);
}
imapCommand *
-imapCommand::clientFetch (const QString & sequence, const QString & fields,
+imapCommand::clientFetch (const TQString & sequence, const TQString & fields,
bool nouid)
{
return new imapCommand (nouid ? "FETCH" : "UID FETCH",
@@ -192,23 +192,23 @@ imapCommand::clientFetch (const QString & sequence, const QString & fields,
}
imapCommand *
-imapCommand::clientList (const QString & reference, const QString & path,
+imapCommand::clientList (const TQString & reference, const TQString & path,
bool lsub)
{
return new imapCommand (lsub ? "LSUB" : "LIST",
- QString ("\"") + rfcDecoder::toIMAP (reference) +
+ TQString ("\"") + rfcDecoder::toIMAP (reference) +
"\" \"" + rfcDecoder::toIMAP (path) + "\"");
}
imapCommand *
-imapCommand::clientSelect (const QString & path, bool examine)
+imapCommand::clientSelect (const TQString & path, bool examine)
{
Q_UNUSED(examine);
/** @note We use always SELECT, because UW-IMAP doesn't check for new mail, when
used with the "mbox driver" and the folder is opened with EXAMINE
and Courier can't append to a mailbox that is in EXAMINE state */
return new imapCommand ("SELECT",
- QString ("\"") + rfcDecoder::toIMAP (path) + "\"");
+ TQString ("\"") + rfcDecoder::toIMAP (path) + "\"");
}
imapCommand *
@@ -218,7 +218,7 @@ imapCommand::clientClose()
}
imapCommand *
-imapCommand::clientCopy (const QString & box, const QString & sequence,
+imapCommand::clientCopy (const TQString & box, const TQString & sequence,
bool nouid)
{
return new imapCommand (nouid ? "COPY" : "UID COPY",
@@ -226,74 +226,74 @@ imapCommand::clientCopy (const QString & box, const QString & sequence,
}
imapCommand *
-imapCommand::clientAppend (const QString & box, const QString & flags,
+imapCommand::clientAppend (const TQString & box, const TQString & flags,
ulong size)
{
return new imapCommand ("APPEND",
"\"" + rfcDecoder::toIMAP (box) + "\" " +
((flags.isEmpty()) ? "" : ("(" + flags + ") ")) +
- "{" + QString::number(size) + "}");
+ "{" + TQString::number(size) + "}");
}
imapCommand *
-imapCommand::clientStatus (const QString & path, const QString & parameters)
+imapCommand::clientStatus (const TQString & path, const TQString & parameters)
{
return new imapCommand ("STATUS",
- QString ("\"") + rfcDecoder::toIMAP (path) +
+ TQString ("\"") + rfcDecoder::toIMAP (path) +
"\" (" + parameters + ")");
}
imapCommand *
-imapCommand::clientCreate (const QString & path)
+imapCommand::clientCreate (const TQString & path)
{
return new imapCommand ("CREATE",
- QString ("\"") + rfcDecoder::toIMAP (path) + "\"");
+ TQString ("\"") + rfcDecoder::toIMAP (path) + "\"");
}
imapCommand *
-imapCommand::clientDelete (const QString & path)
+imapCommand::clientDelete (const TQString & path)
{
return new imapCommand ("DELETE",
- QString ("\"") + rfcDecoder::toIMAP (path) + "\"");
+ TQString ("\"") + rfcDecoder::toIMAP (path) + "\"");
}
imapCommand *
-imapCommand::clientSubscribe (const QString & path)
+imapCommand::clientSubscribe (const TQString & path)
{
return new imapCommand ("SUBSCRIBE",
- QString ("\"") + rfcDecoder::toIMAP (path) + "\"");
+ TQString ("\"") + rfcDecoder::toIMAP (path) + "\"");
}
imapCommand *
-imapCommand::clientUnsubscribe (const QString & path)
+imapCommand::clientUnsubscribe (const TQString & path)
{
return new imapCommand ("UNSUBSCRIBE",
- QString ("\"") + rfcDecoder::toIMAP (path) + "\"");
+ TQString ("\"") + rfcDecoder::toIMAP (path) + "\"");
}
imapCommand *
imapCommand::clientExpunge ()
{
- return new imapCommand ("EXPUNGE", QString (""));
+ return new imapCommand ("EXPUNGE", TQString (""));
}
imapCommand *
-imapCommand::clientRename (const QString & src, const QString & dest)
+imapCommand::clientRename (const TQString & src, const TQString & dest)
{
return new imapCommand ("RENAME",
- QString ("\"") + rfcDecoder::toIMAP (src) +
+ TQString ("\"") + rfcDecoder::toIMAP (src) +
"\" \"" + rfcDecoder::toIMAP (dest) + "\"");
}
imapCommand *
-imapCommand::clientSearch (const QString & search, bool nouid)
+imapCommand::clientSearch (const TQString & search, bool nouid)
{
return new imapCommand (nouid ? "SEARCH" : "UID SEARCH", search);
}
imapCommand *
-imapCommand::clientStore (const QString & set, const QString & item,
- const QString & data, bool nouid)
+imapCommand::clientStore (const TQString & set, const TQString & item,
+ const TQString & data, bool nouid)
{
return new imapCommand (nouid ? "STORE" : "UID STORE",
set + " " + item + " (" + data + ")");
@@ -312,50 +312,50 @@ imapCommand::clientStartTLS ()
}
imapCommand *
-imapCommand::clientSetACL( const QString& box, const QString& user, const QString& acl )
+imapCommand::clientSetACL( const TQString& box, const TQString& user, const TQString& acl )
{
- return new imapCommand ("SETACL", QString("\"") + rfcDecoder::toIMAP (box)
+ return new imapCommand ("SETACL", TQString("\"") + rfcDecoder::toIMAP (box)
+ "\" \"" + rfcDecoder::toIMAP (user)
+ "\" \"" + rfcDecoder::toIMAP (acl) + "\"");
}
imapCommand *
-imapCommand::clientDeleteACL( const QString& box, const QString& user )
+imapCommand::clientDeleteACL( const TQString& box, const TQString& user )
{
- return new imapCommand ("DELETEACL", QString("\"") + rfcDecoder::toIMAP (box)
+ return new imapCommand ("DELETEACL", TQString("\"") + rfcDecoder::toIMAP (box)
+ "\" \"" + rfcDecoder::toIMAP (user)
+ "\"");
}
imapCommand *
-imapCommand::clientGetACL( const QString& box )
+imapCommand::clientGetACL( const TQString& box )
{
- return new imapCommand ("GETACL", QString("\"") + rfcDecoder::toIMAP (box)
+ return new imapCommand ("GETACL", TQString("\"") + rfcDecoder::toIMAP (box)
+ "\"");
}
imapCommand *
-imapCommand::clientListRights( const QString& box, const QString& user )
+imapCommand::clientListRights( const TQString& box, const TQString& user )
{
- return new imapCommand ("LISTRIGHTS", QString("\"") + rfcDecoder::toIMAP (box)
+ return new imapCommand ("LISTRIGHTS", TQString("\"") + rfcDecoder::toIMAP (box)
+ "\" \"" + rfcDecoder::toIMAP (user)
+ "\"");
}
imapCommand *
-imapCommand::clientMyRights( const QString& box )
+imapCommand::clientMyRights( const TQString& box )
{
- return new imapCommand ("MYRIGHTS", QString("\"") + rfcDecoder::toIMAP (box)
+ return new imapCommand ("MYRIGHTS", TQString("\"") + rfcDecoder::toIMAP (box)
+ "\"");
}
imapCommand *
-imapCommand::clientSetAnnotation( const QString& box, const QString& entry, const QMap<QString, QString>& attributes )
+imapCommand::clientSetAnnotation( const TQString& box, const TQString& entry, const TQMap<TQString, TQString>& attributes )
{
- QString parameter = QString("\"") + rfcDecoder::toIMAP (box)
+ TQString parameter = TQString("\"") + rfcDecoder::toIMAP (box)
+ "\" \"" + rfcDecoder::toIMAP (entry)
+ "\" (";
- for( QMap<QString,QString>::ConstIterator it = attributes.begin(); it != attributes.end(); ++it ) {
+ for( TQMap<TQString,TQString>::ConstIterator it = attributes.begin(); it != attributes.end(); ++it ) {
parameter += "\"";
parameter += rfcDecoder::toIMAP (it.key());
parameter += "\" \"";
@@ -369,16 +369,16 @@ imapCommand::clientSetAnnotation( const QString& box, const QString& entry, cons
}
imapCommand *
-imapCommand::clientGetAnnotation( const QString& box, const QString& entry, const QStringList& attributeNames )
+imapCommand::clientGetAnnotation( const TQString& box, const TQString& entry, const TQStringList& attributeNames )
{
- QString parameter = QString("\"") + rfcDecoder::toIMAP (box)
+ TQString parameter = TQString("\"") + rfcDecoder::toIMAP (box)
+ "\" \"" + rfcDecoder::toIMAP (entry)
+ "\" ";
if ( attributeNames.count() == 1 )
parameter += "\"" + rfcDecoder::toIMAP (attributeNames.first()) + '"';
else {
parameter += '(';
- for( QStringList::ConstIterator it = attributeNames.begin(); it != attributeNames.end(); ++it ) {
+ for( TQStringList::ConstIterator it = attributeNames.begin(); it != attributeNames.end(); ++it ) {
parameter += "\"" + rfcDecoder::toIMAP (*it) + "\" ";
}
// Turn last space into a ')'
@@ -394,14 +394,14 @@ imapCommand::clientNamespace()
}
imapCommand *
-imapCommand::clientGetQuotaroot( const QString& box )
+imapCommand::clientGetQuotaroot( const TQString& box )
{
- QString parameter = QString("\"") + rfcDecoder::toIMAP (box) + '"';
- return new imapCommand ("GETQUOTAROOT", parameter);
+ TQString parameter = TQString("\"") + rfcDecoder::toIMAP (box) + '"';
+ return new imapCommand ("GEQUOTAROOT", parameter);
}
imapCommand *
-imapCommand::clientCustom( const QString& command, const QString& arguments )
+imapCommand::clientCustom( const TQString& command, const TQString& arguments )
{
return new imapCommand (command, arguments);
}
diff --git a/kioslaves/imap4/imapcommand.h b/kioslaves/imap4/imapcommand.h
index f06c5af86..f91b93292 100644
--- a/kioslaves/imap4/imapcommand.h
+++ b/kioslaves/imap4/imapcommand.h
@@ -23,9 +23,9 @@
*
*********************************************************************/
-#include <qstringlist.h>
-#include <qstring.h>
-#include <qmap.h>
+#include <tqstringlist.h>
+#include <tqstring.h>
+#include <tqmap.h>
/**
* @brief encapulate a IMAP command
@@ -43,13 +43,13 @@ public:
*/
imapCommand ();
/**
- * @fn imapCommand (const QString & command, const QString & parameter);
+ * @fn imapCommand (const TQString & command, const TQString & parameter);
* @brief Constructor
* @param command Imap command
* @param parameter Parameters to the command
* @return none
*/
- imapCommand (const QString & command, const QString & parameter);
+ imapCommand (const TQString & command, const TQString & parameter);
/**
* @fn bool isComplete ();
* @brief is it complete?
@@ -57,43 +57,43 @@ public:
*/
bool isComplete ();
/**
- * @fn const QString & result ();
+ * @fn const TQString & result ();
* @brief get the result of the command
* @return The result, i.e. first word of the result line, like OK
*/
- const QString & result ();
+ const TQString & result ();
/**
- * @fn const QString & resultInfo ();
+ * @fn const TQString & resultInfo ();
* @brief get information about the result
* @return Information about the result, i.e. the rest of the result line
*/
- const QString & resultInfo ();
+ const TQString & resultInfo ();
/**
- * @fn const QString & parameter ();
+ * @fn const TQString & parameter ();
* @brief get the parameter
* @return the parameter
*/
- const QString & parameter ();
+ const TQString & parameter ();
/**
- * @fn const QString & command ();
+ * @fn const TQString & command ();
* @brief get the command
* @return the command
*/
- const QString & command ();
+ const TQString & command ();
/**
- * @fn const QString & id ();
+ * @fn const TQString & id ();
* @brief get the id
* @return the id
*/
- const QString & id ();
+ const TQString & id ();
/**
- * @fn void setId (const QString &);
+ * @fn void setId (const TQString &);
* @brief set the id
* @param id the id used by the command
* @return none
*/
- void setId (const QString &);
+ void setId (const TQString &);
/**
* @fn void setComplete ();
* @brief set the completed state
@@ -101,42 +101,42 @@ public:
*/
void setComplete ();
/**
- * @fn void setResult (const QString &);
+ * @fn void setResult (const TQString &);
* @brief set the completed state
* @param result the command result
* @return none
*/
- void setResult (const QString &);
+ void setResult (const TQString &);
/**
- * @fn void setResultInfo (const QString &);
+ * @fn void setResultInfo (const TQString &);
* @brief set the completed state
* @param result the command result information
* @return none
*/
- void setResultInfo (const QString &);
+ void setResultInfo (const TQString &);
/**
- * @fn void setCommand (const QString &);
+ * @fn void setCommand (const TQString &);
* @brief set the command
* @param command the imap command
* @return none
*/
- void setCommand (const QString &);
+ void setCommand (const TQString &);
/**
- * @fn void setParameter (const QString &);
+ * @fn void setParameter (const TQString &);
* @brief set the command parameter(s)
* @param parameter the comand parameter(s)
* @return none
*/
- void setParameter (const QString &);
+ void setParameter (const TQString &);
/**
- * @fn const QString getStr ();
+ * @fn const TQString getStr ();
* @brief returns the data to send to the server
* The function returns the complete data to be sent to
* the server (\<id\> \<command\> [\<parameter\>])
* @return the data to send to the server
* @todo possibly rename function to be clear of it's purpose
*/
- const QString getStr ();
+ const TQString getStr ();
/**
* @fn static imapCommand *clientNoop ();
@@ -145,7 +145,7 @@ public:
*/
static imapCommand *clientNoop ();
/**
- * @fn static imapCommand *clientFetch (ulong uid, const QString & fields, bool nouid = false);
+ * @fn static imapCommand *clientFetch (ulong uid, const TQString & fields, bool nouid = false);
* @brief Create a FETCH command
* @param uid Uid of the message to fetch
* @param fields options to pass to the server
@@ -153,10 +153,10 @@ public:
* @return a FETCH imapCommand
* Fetch a single uid
*/
- static imapCommand *clientFetch (ulong uid, const QString & fields,
+ static imapCommand *clientFetch (ulong uid, const TQString & fields,
bool nouid = false);
/**
- * @fn static imapCommand *clientFetch (ulong fromUid, ulong toUid, const QString & fields, bool nouid = false);
+ * @fn static imapCommand *clientFetch (ulong fromUid, ulong toUid, const TQString & fields, bool nouid = false);
* @brief Create a FETCH command
* @param fromUid start uid of the messages to fetch
* @param toUid last uid of the messages to fetch
@@ -166,10 +166,10 @@ public:
* Fetch a range of uids
*/
static imapCommand *clientFetch (ulong fromUid, ulong toUid,
- const QString & fields, bool nouid =
+ const TQString & fields, bool nouid =
false);
/**
- * @fn static imapCommand *clientFetch (const QString & sequence, const QString & fields, bool nouid = false);
+ * @fn static imapCommand *clientFetch (const TQString & sequence, const TQString & fields, bool nouid = false);
* @brief Create a FETCH command
* @param sequence a IMAP FETCH sequence string
* @param fields options to pass to the server
@@ -178,27 +178,27 @@ public:
* Fetch a range of uids. The other clientFetch functions are just
* wrappers around this function.
*/
- static imapCommand *clientFetch (const QString & sequence,
- const QString & fields, bool nouid =
+ static imapCommand *clientFetch (const TQString & sequence,
+ const TQString & fields, bool nouid =
false);
/**
- * @fn static imapCommand *clientList (const QString & reference, const QString & path, bool lsub = false);
+ * @fn static imapCommand *clientList (const TQString & reference, const TQString & path, bool lsub = false);
* @brief Create a LIST command
* @param reference
* @param path The path to list
* @param lsub Perform a LIST or a LSUB command
* @return a LIST imapCommand
*/
- static imapCommand *clientList (const QString & reference,
- const QString & path, bool lsub = false);
+ static imapCommand *clientList (const TQString & reference,
+ const TQString & path, bool lsub = false);
/**
- * @fn static imapCommand *clientSelect (const QString & path, bool examine = false);
+ * @fn static imapCommand *clientSelect (const TQString & path, bool examine = false);
* @brief Create a SELECT command
* @param path The path to select
* @param lsub Perform a SELECT or a EXAMINE command
* @return a SELECT imapCommand
*/
- static imapCommand *clientSelect (const QString & path, bool examine =
+ static imapCommand *clientSelect (const TQString & path, bool examine =
false);
/**
* @fn static imapCommand *clientClose();
@@ -212,8 +212,8 @@ public:
* @param parameters
* @return a STATUS imapCommand
*/
- static imapCommand *clientStatus (const QString & path,
- const QString & parameters);
+ static imapCommand *clientStatus (const TQString & path,
+ const TQString & parameters);
/**
* @brief Create a COPY command
* @param box
@@ -221,8 +221,8 @@ public:
* @param nouid Perform a COPY or UID COPY command
* @return a COPY imapCommand
*/
- static imapCommand *clientCopy (const QString & box,
- const QString & sequence, bool nouid =
+ static imapCommand *clientCopy (const TQString & box,
+ const TQString & sequence, bool nouid =
false);
/**
* @brief Create a APPEND command
@@ -231,32 +231,32 @@ public:
* @param size
* @return a APPEND imapCommand
*/
- static imapCommand *clientAppend (const QString & box,
- const QString & flags, ulong size);
+ static imapCommand *clientAppend (const TQString & box,
+ const TQString & flags, ulong size);
/**
* @brief Create a CREATE command
* @param path
* @return a CREATE imapCommand
*/
- static imapCommand *clientCreate (const QString & path);
+ static imapCommand *clientCreate (const TQString & path);
/**
* @brief Create a DELETE command
* @param path
* @return a DELETE imapCommand
*/
- static imapCommand *clientDelete (const QString & path);
+ static imapCommand *clientDelete (const TQString & path);
/**
* @brief Create a SUBSCRIBE command
* @param path
* @return a SUBSCRIBE imapCommand
*/
- static imapCommand *clientSubscribe (const QString & path);
+ static imapCommand *clientSubscribe (const TQString & path);
/**
* @brief Create a UNSUBSCRIBE command
* @param path
* @return a UNSUBSCRIBE imapCommand
*/
- static imapCommand *clientUnsubscribe (const QString & path);
+ static imapCommand *clientUnsubscribe (const TQString & path);
/**
* @brief Create a EXPUNGE command
* @return a EXPUNGE imapCommand
@@ -268,15 +268,15 @@ public:
* @param dest Destination
* @return a RENAME imapCommand
*/
- static imapCommand *clientRename (const QString & src,
- const QString & dest);
+ static imapCommand *clientRename (const TQString & src,
+ const TQString & dest);
/**
* @brief Create a SEARCH command
* @param search
* @param nouid Perform a UID SEARCH or a SEARCH command
* @return a SEARCH imapCommand
*/
- static imapCommand *clientSearch (const QString & search, bool nouid =
+ static imapCommand *clientSearch (const TQString & search, bool nouid =
false);
/**
* @brief Create a STORE command
@@ -286,8 +286,8 @@ public:
* @param nouid Perform a UID STORE or a STORE command
* @return a STORE imapCommand
*/
- static imapCommand *clientStore (const QString & set, const QString & item,
- const QString & data, bool nouid = false);
+ static imapCommand *clientStore (const TQString & set, const TQString & item,
+ const TQString & data, bool nouid = false);
/**
* @brief Create a LOGOUT command
* @return a LOGOUT imapCommand
@@ -307,7 +307,7 @@ public:
* @param acl access right modification (starting with optional +/-)
* @return a SETACL imapCommand
*/
- static imapCommand *clientSetACL ( const QString& box, const QString& user, const QString& acl );
+ static imapCommand *clientSetACL ( const TQString& box, const TQString& user, const TQString& acl );
/**
* @brief Create a DELETEACL command
@@ -315,14 +315,14 @@ public:
* @param user authentication identifier
* @return a DELETEACL imapCommand
*/
- static imapCommand *clientDeleteACL ( const QString& box, const QString& user );
+ static imapCommand *clientDeleteACL ( const TQString& box, const TQString& user );
/**
* @brief Create a GETACL command
* @param box mailbox name
* @return a GETACL imapCommand
*/
- static imapCommand *clientGetACL ( const QString& box );
+ static imapCommand *clientGetACL ( const TQString& box );
/**
* @brief Create a LISTRIGHTS command
@@ -330,14 +330,14 @@ public:
* @param user authentication identifier
* @return a LISTRIGHTS imapCommand
*/
- static imapCommand *clientListRights ( const QString& box, const QString& user );
+ static imapCommand *clientListRights ( const TQString& box, const TQString& user );
/**
* @brief Create a MYRIGHTS command
* @param box mailbox name
* @return a MYRIGHTS imapCommand
*/
- static imapCommand *clientMyRights ( const QString& box );
+ static imapCommand *clientMyRights ( const TQString& box );
//////////// ANNOTATEMORE support /////////////
/**
@@ -347,7 +347,7 @@ public:
* @param attributes map of attribute names + values
* @return a SETANNOTATION imapCommand
*/
- static imapCommand *clientSetAnnotation ( const QString& box, const QString& entry, const QMap<QString, QString>& attributes );
+ static imapCommand *clientSetAnnotation ( const TQString& box, const TQString& entry, const TQMap<TQString, TQString>& attributes );
/**
* @brief Create a GETANNOTATION command
@@ -356,7 +356,7 @@ public:
* @param attributeNames attribute specifier
* @return a GETANNOTATION imapCommand
*/
- static imapCommand *clientGetAnnotation ( const QString& box, const QString& entry, const QStringList& attributeNames );
+ static imapCommand *clientGetAnnotation ( const TQString& box, const TQString& entry, const TQStringList& attributeNames );
/**
* @brief Create a NAMESPACE command
@@ -365,11 +365,11 @@ public:
static imapCommand *clientNamespace ();
/**
- * @brief Create a GETQUOTAROOT command
+ * @brief Create a GEQUOTAROOT command
* @param box mailbox name
- * @return a GETQUOTAROOT imapCommand
+ * @return a GEQUOTAROOT imapCommand
*/
- static imapCommand *clientGetQuotaroot ( const QString& box );
+ static imapCommand *clientGetQuotaroot ( const TQString& box );
/**
* @brief Create a custom command
@@ -377,15 +377,15 @@ public:
* @param arguments The custom arguments
* @return a custom imapCommand
*/
- static imapCommand *clientCustom ( const QString& command, const QString& arguments );
+ static imapCommand *clientCustom ( const TQString& command, const TQString& arguments );
protected:
- QString aCommand;
- QString mId;
+ TQString aCommand;
+ TQString mId;
bool mComplete;
- QString aParameter;
- QString mResult;
- QString mResultInfo;
+ TQString aParameter;
+ TQString mResult;
+ TQString mResultInfo;
private:
imapCommand & operator = (const imapCommand &);
diff --git a/kioslaves/imap4/imapinfo.cc b/kioslaves/imap4/imapinfo.cc
index d06618d75..4d1fc805c 100644
--- a/kioslaves/imap4/imapinfo.cc
+++ b/kioslaves/imap4/imapinfo.cc
@@ -107,7 +107,7 @@ imapInfo & imapInfo::operator = (const imapInfo & mi)
return *this;
}
-imapInfo::imapInfo (const QStringList & list):count_ (0),
+imapInfo::imapInfo (const TQStringList & list):count_ (0),
recent_ (0),
unseen_ (0),
uidValidity_ (0),
@@ -123,12 +123,12 @@ uidNextAvailable_ (false),
flagsAvailable_ (false),
permanentFlagsAvailable_ (false), readWriteAvailable_ (false)
{
- for (QStringList::ConstIterator it (list.begin ()); it != list.end (); ++it)
+ for (TQStringList::ConstIterator it (list.begin ()); it != list.end (); ++it)
{
- QString line (*it);
+ TQString line (*it);
line.truncate(line.length() - 2);
- QStringList tokens(QStringList::split (' ', line));
+ TQStringList tokens(TQStringList::split (' ', line));
kdDebug(7116) << "Processing: " << line << endl;
if (tokens[0] != "*")
@@ -191,7 +191,7 @@ permanentFlagsAvailable_ (false), readWriteAvailable_ (false)
}
-ulong imapInfo::_flags (const QCString & inFlags)
+ulong imapInfo::_flags (const TQCString & inFlags)
{
ulong flags = 0;
parseString flagsString;
@@ -202,7 +202,7 @@ ulong imapInfo::_flags (const QCString & inFlags)
while (!flagsString.isEmpty () && flagsString[0] != ')')
{
- QCString entry = imapParser::parseOneWordC(flagsString).upper();
+ TQCString entry = imapParser::parseOneWordC(flagsString).upper();
if (entry.isEmpty ())
flagsString.clear();
diff --git a/kioslaves/imap4/imapinfo.h b/kioslaves/imap4/imapinfo.h
index 068e6db54..735054496 100644
--- a/kioslaves/imap4/imapinfo.h
+++ b/kioslaves/imap4/imapinfo.h
@@ -23,8 +23,8 @@
*
*********************************************************************/
-#include <qstringlist.h>
-#include <qstring.h>
+#include <tqstringlist.h>
+#include <tqstring.h>
//class handling the info we get on EXAMINE and SELECT
class imapInfo
@@ -50,11 +50,11 @@ public:
imapInfo ();
- imapInfo (const QStringList &);
+ imapInfo (const TQStringList &);
imapInfo (const imapInfo &);
imapInfo & operator = (const imapInfo &);
- static ulong _flags (const QCString &);
+ static ulong _flags (const TQCString &);
void setCount (ulong l)
{
@@ -92,7 +92,7 @@ public:
flags_ = l;
}
- void setFlags (const QCString & inFlag)
+ void setFlags (const TQCString & inFlag)
{
flagsAvailable_ = true;
flags_ = _flags (inFlag);
@@ -104,7 +104,7 @@ public:
permanentFlags_ = l;
}
- void setPermanentFlags (const QCString & inFlag)
+ void setPermanentFlags (const TQCString & inFlag)
{
permanentFlagsAvailable_ = true;
permanentFlags_ = _flags (inFlag);
@@ -201,14 +201,14 @@ public:
return readWriteAvailable_;
}
- QCString alert() const
+ TQCString alert() const
{
return alert_;
}
private:
- QCString alert_;
+ TQCString alert_;
ulong count_;
ulong recent_;
diff --git a/kioslaves/imap4/imaplist.cc b/kioslaves/imap4/imaplist.cc
index 6054535c6..b15c821d2 100644
--- a/kioslaves/imap4/imaplist.cc
+++ b/kioslaves/imap4/imaplist.cc
@@ -81,7 +81,7 @@ imapList & imapList::operator = (const imapList & lr)
return *this;
}
-imapList::imapList (const QString & inStr, imapParser &parser)
+imapList::imapList (const TQString & inStr, imapParser &parser)
: parser_(&parser),
noInferiors_ (false),
noSelect_ (false),
@@ -103,13 +103,13 @@ hasNoChildren_ (false)
hierarchyDelimiter_ = parser_->parseOneWordC(s);
if (hierarchyDelimiter_ == "NIL")
- hierarchyDelimiter_ = QString::null;
+ hierarchyDelimiter_ = TQString::null;
name_ = rfcDecoder::fromIMAP (parser_->parseLiteral (s)); // decode modified UTF7
}
void imapList::parseAttributes( parseString & str )
{
- QCString attribute, orig;
+ TQCString attribute, orig;
while ( !str.isEmpty () && str[0] != ')' )
{
diff --git a/kioslaves/imap4/imaplist.h b/kioslaves/imap4/imaplist.h
index 5945011f4..9aa01f78d 100644
--- a/kioslaves/imap4/imaplist.h
+++ b/kioslaves/imap4/imaplist.h
@@ -23,8 +23,8 @@
*
*********************************************************************/
-#include <qstringlist.h>
-#include <qstring.h>
+#include <tqstringlist.h>
+#include <tqstring.h>
class parseString;
class imapParser;
@@ -35,7 +35,7 @@ class imapList
public:
imapList ();
- imapList (const QString &, imapParser &);
+ imapList (const TQString &, imapParser &);
imapList (const imapList &);
imapList & operator = (const imapList &);
@@ -43,25 +43,25 @@ public:
void parseAttributes( parseString & );
// return all atributes concatenated
- QString attributesAsString() const
+ TQString attributesAsString() const
{
return attributes_.join(",");
}
- QString hierarchyDelimiter () const
+ TQString hierarchyDelimiter () const
{
return hierarchyDelimiter_;
}
- void setHierarchyDelimiter (const QString & _str)
+ void setHierarchyDelimiter (const TQString & _str)
{
hierarchyDelimiter_ = _str;
}
- QString name () const
+ TQString name () const
{
return name_;
}
- void setName (const QString & _str)
+ void setName (const TQString & _str)
{
name_ = _str;
}
@@ -123,15 +123,15 @@ public:
private:
imapParser* parser_;
- QString hierarchyDelimiter_;
- QString name_;
+ TQString hierarchyDelimiter_;
+ TQString name_;
bool noInferiors_;
bool noSelect_;
bool marked_;
bool unmarked_;
bool hasChildren_;
bool hasNoChildren_;
- QStringList attributes_;
+ TQStringList attributes_;
};
#endif
diff --git a/kioslaves/imap4/imapparser.cc b/kioslaves/imap4/imapparser.cc
index cf3465a4c..e4294bd06 100644
--- a/kioslaves/imap4/imapparser.cc
+++ b/kioslaves/imap4/imapparser.cc
@@ -47,10 +47,10 @@ extern "C" {
}
#endif
-#include <qregexp.h>
-#include <qbuffer.h>
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqregexp.h>
+#include <tqbuffer.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
#include <kdebug.h>
#include <kmdcodec.h>
@@ -103,11 +103,11 @@ imapParser::doCommand (imapCommand * aCmd)
imapCommand *
imapParser::sendCommand (imapCommand * aCmd)
{
- aCmd->setId (QString::number(commandCounter++));
+ aCmd->setId (TQString::number(commandCounter++));
sentQueue.append (aCmd);
continuation.resize(0);
- const QString& command = aCmd->command();
+ const TQString& command = aCmd->command();
if (command == "SELECT" || command == "EXAMINE")
{
@@ -120,7 +120,7 @@ imapParser::sendCommand (imapCommand * aCmd)
else if (command == "CLOSE")
{
// we no longer have a box open
- currentBox = QString::null;
+ currentBox = TQString::null;
}
else if (command.find ("SEARCH") != -1
|| command == "GETACL"
@@ -128,8 +128,8 @@ imapParser::sendCommand (imapCommand * aCmd)
|| command == "MYRIGHTS"
|| command == "GETANNOTATION"
|| command == "NAMESPACE"
- || command == "GETQUOTAROOT"
- || command == "GETQUOTA"
+ || command == "GEQUOTAROOT"
+ || command == "GEQUOTA"
|| command == "X-GET-OTHER-USERS"
|| command == "X-GET-DELEGATES"
|| command == "X-GET-OUT-OF-OFFICE")
@@ -146,8 +146,8 @@ imapParser::sendCommand (imapCommand * aCmd)
}
bool
-imapParser::clientLogin (const QString & aUser, const QString & aPass,
- QString & resultInfo)
+imapParser::clientLogin (const TQString & aUser, const TQString & aPass,
+ TQString & resultInfo)
{
imapCommand *cmd;
bool retVal = false;
@@ -216,7 +216,7 @@ static bool sasl_interact( KIO::SlaveBase *slave, KIO::AuthInfo &ai, void *in )
bool
imapParser::clientAuthenticate ( KIO::SlaveBase *slave, KIO::AuthInfo &ai,
- const QString & aFQDN, const QString & aAuth, bool isSSL, QString & resultInfo)
+ const TQString & aFQDN, const TQString & aAuth, bool isSSL, TQString & resultInfo)
{
bool retVal = false;
#ifdef HAVE_LIBSASL2
@@ -226,7 +226,7 @@ imapParser::clientAuthenticate ( KIO::SlaveBase *slave, KIO::AuthInfo &ai,
const char *out = 0;
uint outlen = 0;
const char *mechusing = 0;
- QByteArray tmp, challenge;
+ TQByteArray tmp, challenge;
kdDebug(7116) << "aAuth: " << aAuth << " FQDN: " << aFQDN << " isSSL: " << isSSL << endl;
@@ -242,7 +242,7 @@ imapParser::clientAuthenticate ( KIO::SlaveBase *slave, KIO::AuthInfo &ai,
if ( result != SASL_OK ) {
kdDebug(7116) << "sasl_client_new failed with: " << result << endl;
- resultInfo = QString::fromUtf8( sasl_errdetail( conn ) );
+ resultInfo = TQString::fromUtf8( sasl_errdetail( conn ) );
return false;
}
@@ -260,7 +260,7 @@ imapParser::clientAuthenticate ( KIO::SlaveBase *slave, KIO::AuthInfo &ai,
if ( result != SASL_CONTINUE && result != SASL_OK ) {
kdDebug(7116) << "sasl_client_start failed with: " << result << endl;
- resultInfo = QString::fromUtf8( sasl_errdetail( conn ) );
+ resultInfo = TQString::fromUtf8( sasl_errdetail( conn ) );
sasl_dispose( &conn );
return false;
}
@@ -270,10 +270,10 @@ imapParser::clientAuthenticate ( KIO::SlaveBase *slave, KIO::AuthInfo &ai,
KCodecs::base64Encode( tmp, challenge );
tmp.resetRawData( out, outlen );
// then lets try it
- QString firstCommand = aAuth;
+ TQString firstCommand = aAuth;
if ( !challenge.isEmpty() ) {
firstCommand += " ";
- firstCommand += QString::fromLatin1( challenge.data(), challenge.size() );
+ firstCommand += TQString::fromLatin1( challenge.data(), challenge.size() );
}
cmd = sendCommand (new imapCommand ("AUTHENTICATE", firstCommand.latin1()));
@@ -285,11 +285,11 @@ imapParser::clientAuthenticate ( KIO::SlaveBase *slave, KIO::AuthInfo &ai,
if (!continuation.isEmpty())
{
-// kdDebug(7116) << "S: " << QCString(continuation.data(),continuation.size()+1) << endl;
+// kdDebug(7116) << "S: " << TQCString(continuation.data(),continuation.size()+1) << endl;
if ( continuation.size() > 4 ) {
tmp.setRawData( continuation.data() + 2, continuation.size() - 4 );
KCodecs::base64Decode( tmp, challenge );
-// kdDebug(7116) << "S-1: " << QCString(challenge.data(),challenge.size()+1) << endl;
+// kdDebug(7116) << "S-1: " << TQCString(challenge.data(),challenge.size()+1) << endl;
tmp.resetRawData( continuation.data() + 2, continuation.size() - 4 );
}
@@ -309,16 +309,16 @@ imapParser::clientAuthenticate ( KIO::SlaveBase *slave, KIO::AuthInfo &ai,
if ( result != SASL_CONTINUE && result != SASL_OK ) {
kdDebug(7116) << "sasl_client_step failed with: " << result << endl;
- resultInfo = QString::fromUtf8( sasl_errdetail( conn ) );
+ resultInfo = TQString::fromUtf8( sasl_errdetail( conn ) );
sasl_dispose( &conn );
return false;
}
tmp.setRawData( out, outlen );
-// kdDebug(7116) << "C-1: " << QCString(tmp.data(),tmp.size()+1) << endl;
+// kdDebug(7116) << "C-1: " << TQCString(tmp.data(),tmp.size()+1) << endl;
KCodecs::base64Encode( tmp, challenge );
tmp.resetRawData( out, outlen );
-// kdDebug(7116) << "C: " << QCString(challenge.data(),challenge.size()+1) << endl;
+// kdDebug(7116) << "C: " << TQCString(challenge.data(),challenge.size()+1) << endl;
parseWriteLine (challenge);
continuation.resize(0);
}
@@ -343,7 +343,7 @@ imapParser::parseUntagged (parseString & result)
//kdDebug(7116) << "imapParser::parseUntagged - '" << result.cstr() << "'" << endl;
parseOneWordC(result); // *
- QByteArray what = parseLiteral (result); // see whats coming next
+ TQByteArray what = parseLiteral (result); // see whats coming next
switch (what[0])
{
@@ -478,7 +478,7 @@ imapParser::parseUntagged (parseString & result)
ulong number;
bool valid;
- number = QCString(what, what.size() + 1).toUInt(&valid);
+ number = TQCString(what, what.size() + 1).toUInt(&valid);
if (valid)
{
what = parseLiteral (result);
@@ -498,7 +498,7 @@ imapParser::parseUntagged (parseString & result)
case 'F':
if (qstrncmp(what, "FETCH", what.size()) == 0)
{
- seenUid = QString::null;
+ seenUid = TQString::null;
parseFetch (number, result);
}
break;
@@ -506,7 +506,7 @@ imapParser::parseUntagged (parseString & result)
case 'S':
if (qstrncmp(what, "STORE", what.size()) == 0) // deprecated store
{
- seenUid = QString::null;
+ seenUid = TQString::null;
parseFetch (number, result);
}
break;
@@ -528,8 +528,8 @@ imapParser::parseUntagged (parseString & result)
void
-imapParser::parseResult (QByteArray & result, parseString & rest,
- const QString & command)
+imapParser::parseResult (TQByteArray & result, parseString & rest,
+ const TQString & command)
{
if (command == "SELECT")
selectInfo.setReadWrite(true);
@@ -537,7 +537,7 @@ imapParser::parseResult (QByteArray & result, parseString & rest,
if (rest[0] == '[')
{
rest.pos++;
- QCString option = parseOneWordC(rest, TRUE);
+ TQCString option = parseOneWordC(rest, TRUE);
switch (option[0])
{
@@ -564,7 +564,7 @@ imapParser::parseResult (QByteArray & result, parseString & rest,
else if (option == "PERMANENTFLAGS")
{
uint end = rest.data.find(']', rest.pos);
- QCString flags(rest.data.data() + rest.pos, end - rest.pos);
+ TQCString flags(rest.data.data() + rest.pos, end - rest.pos);
selectInfo.setPermanentFlags (flags);
rest.pos = end;
}
@@ -645,7 +645,7 @@ imapParser::parseResult (QByteArray & result, parseString & rest,
{
if (currentState == ISTATE_SELECT)
currentState = ISTATE_LOGIN;
- currentBox = QString::null;
+ currentBox = TQString::null;
}
kdDebug(7116) << "imapParser::parseResult - current box is now " << currentBox << endl;
}
@@ -660,7 +660,7 @@ imapParser::parseResult (QByteArray & result, parseString & rest,
{
if (currentState == ISTATE_SELECT)
currentState = ISTATE_LOGIN;
- currentBox = QString::null;
+ currentBox = TQString::null;
}
kdDebug(7116) << "imapParser::parseResult - current box is now " << currentBox << endl;
}
@@ -674,8 +674,8 @@ imapParser::parseResult (QByteArray & result, parseString & rest,
void imapParser::parseCapability (parseString & result)
{
- QCString temp( result.cstr() );
- imapCapabilities = QStringList::split ( ' ', KPIM::kAsciiToLower( temp.data() ) );
+ TQCString temp( result.cstr() );
+ imapCapabilities = TQStringList::split ( ' ', KPIM::kAsciiToLower( temp.data() ) );
}
void imapParser::parseFlags (parseString & result)
@@ -715,7 +715,7 @@ void imapParser::parseListRights (parseString & result)
parseOneWordC (result); // skip user id
int outlen = 1;
while ( outlen ) {
- QCString word = parseOneWordC (result, false, &outlen);
+ TQCString word = parseOneWordC (result, false, &outlen);
lastResults.append (word);
}
}
@@ -726,7 +726,7 @@ void imapParser::parseAcl (parseString & result)
int outlen = 1;
// The result is user1 perm1 user2 perm2 etc. The caller will sort it out.
while ( outlen && !result.isEmpty() ) {
- QCString word = parseLiteralC (result, false, false, &outlen);
+ TQCString word = parseLiteralC (result, false, false, &outlen);
lastResults.append (word);
}
}
@@ -744,7 +744,7 @@ void imapParser::parseAnnotation (parseString & result)
int outlen = 1;
// The result is name1 value1 name2 value2 etc. The caller will sort it out.
while ( outlen && !result.isEmpty() && result[0] != ')' ) {
- QCString word = parseLiteralC (result, false, false, &outlen);
+ TQCString word = parseLiteralC (result, false, false, &outlen);
lastResults.append (word);
}
}
@@ -755,7 +755,7 @@ void imapParser::parseQuota (parseString & result)
// quota_response ::= "QUOTA" SP astring SP quota_list
// quota_list ::= "(" #quota_resource ")"
// quota_resource ::= atom SP number SP number
- QCString root = parseOneWordC( result );
+ TQCString root = parseOneWordC( result );
if ( root.isEmpty() ) {
lastResults.append( "" );
} else {
@@ -765,10 +765,10 @@ void imapParser::parseQuota (parseString & result)
return;
result.pos++;
skipWS (result);
- QStringList triplet;
+ TQStringList triplet;
int outlen = 1;
while ( outlen && !result.isEmpty() && result[0] != ')' ) {
- QCString word = parseLiteralC (result, false, false, &outlen);
+ TQCString word = parseLiteralC (result, false, false, &outlen);
triplet.append(word);
}
lastResults.append( triplet.join(" ") );
@@ -782,10 +782,10 @@ void imapParser::parseQuotaRoot (parseString & result)
skipWS (result);
if ( result.isEmpty() )
return;
- QStringList roots;
+ TQStringList roots;
int outlen = 1;
while ( outlen && !result.isEmpty() ) {
- QCString word = parseLiteralC (result, false, false, &outlen);
+ TQCString word = parseLiteralC (result, false, false, &outlen);
roots.append (word);
}
lastResults.append( roots.isEmpty()? "" : roots.join(" ") );
@@ -794,7 +794,7 @@ void imapParser::parseQuotaRoot (parseString & result)
void imapParser::parseCustom (parseString & result)
{
int outlen = 1;
- QCString word = parseLiteralC (result, false, false, &outlen);
+ TQCString word = parseLiteralC (result, false, false, &outlen);
lastResults.append( word );
}
@@ -805,12 +805,12 @@ void imapParser::parseOtherUser (parseString & result)
void imapParser::parseDelegate (parseString & result)
{
- const QString email = parseOneWordC( result );
+ const TQString email = parseOneWordC( result );
- QStringList rights;
+ TQStringList rights;
int outlen = 1;
while ( outlen && !result.isEmpty() ) {
- QCString word = parseLiteralC( result, false, false, &outlen );
+ TQCString word = parseLiteralC( result, false, false, &outlen );
rights.append( word );
}
@@ -819,13 +819,13 @@ void imapParser::parseDelegate (parseString & result)
void imapParser::parseOutOfOffice (parseString & result)
{
- const QString state = parseOneWordC (result);
+ const TQString state = parseOneWordC (result);
parseOneWordC (result); // skip encoding
int outlen = 1;
- QCString msg = parseLiteralC (result, false, false, &outlen);
+ TQCString msg = parseLiteralC (result, false, false, &outlen);
- lastResults.append( state + "^" + QString::fromUtf8( msg ) );
+ lastResults.append( state + "^" + TQString::fromUtf8( msg ) );
}
void imapParser::parseMyRights (parseString & result)
@@ -841,7 +841,7 @@ void imapParser::parseSearch (parseString & result)
while (parseOneNumber (result, value))
{
- lastResults.append (QString::number(value));
+ lastResults.append (TQString::number(value));
}
}
@@ -860,7 +860,7 @@ void imapParser::parseStatus (parseString & inWords)
{
ulong value;
- QCString label = parseOneWordC(inWords);
+ TQCString label = parseOneWordC(inWords);
if (parseOneNumber (inWords, value))
{
if (label == "MESSAGES")
@@ -893,7 +893,7 @@ void imapParser::parseExpunge (ulong value, parseString & result)
Q_UNUSED(result);
}
-void imapParser::parseAddressList (parseString & inWords, QPtrList<mailAddress>& list)
+void imapParser::parseAddressList (parseString & inWords, TQPtrList<mailAddress>& list)
{
if (inWords.isEmpty())
return;
@@ -957,7 +957,7 @@ mailHeader * imapParser::parseEnvelope (parseString & inWords)
//subject
envelope->setSubject(parseLiteralC(inWords));
- QPtrList<mailAddress> list;
+ TQPtrList<mailAddress> list;
list.setAutoDelete(true);
//from
@@ -1015,10 +1015,10 @@ mailHeader * imapParser::parseEnvelope (parseString & inWords)
// parse parameter pairs into a dictionary
// caller must clean up the dictionary items
-QAsciiDict < QString > imapParser::parseDisposition (parseString & inWords)
+TQAsciiDict < TQString > imapParser::parseDisposition (parseString & inWords)
{
- QCString disposition;
- QAsciiDict < QString > retVal (17, false);
+ TQCString disposition;
+ TQAsciiDict < TQString > retVal (17, false);
// return value is a shallow copy
retVal.setAutoDelete (false);
@@ -1044,7 +1044,7 @@ QAsciiDict < QString > imapParser::parseDisposition (parseString & inWords)
if (!disposition.isEmpty ())
{
- retVal.insert ("content-disposition", new QString(disposition));
+ retVal.insert ("content-disposition", new TQString(disposition));
}
return retVal;
@@ -1052,9 +1052,9 @@ QAsciiDict < QString > imapParser::parseDisposition (parseString & inWords)
// parse parameter pairs into a dictionary
// caller must clean up the dictionary items
-QAsciiDict < QString > imapParser::parseParameters (parseString & inWords)
+TQAsciiDict < TQString > imapParser::parseParameters (parseString & inWords)
{
- QAsciiDict < QString > retVal (17, false);
+ TQAsciiDict < TQString > retVal (17, false);
// return value is a shallow copy
retVal.setAutoDelete (false);
@@ -1071,9 +1071,9 @@ QAsciiDict < QString > imapParser::parseParameters (parseString & inWords)
while (!inWords.isEmpty () && inWords[0] != ')')
{
- QCString l1 = parseLiteralC(inWords);
- QCString l2 = parseLiteralC(inWords);
- retVal.insert (l1, new QString(l2));
+ TQCString l1 = parseLiteralC(inWords);
+ TQCString l2 = parseLiteralC(inWords);
+ retVal.insert (l1, new TQString(l2));
}
if (inWords[0] != ')')
@@ -1086,11 +1086,11 @@ QAsciiDict < QString > imapParser::parseParameters (parseString & inWords)
}
mimeHeader * imapParser::parseSimplePart (parseString & inWords,
- QString & inSection, mimeHeader * localPart)
+ TQString & inSection, mimeHeader * localPart)
{
- QCString subtype;
- QCString typeStr;
- QAsciiDict < QString > parameters (17, false);
+ TQCString subtype;
+ TQCString typeStr;
+ TQAsciiDict < TQString > parameters (17, false);
ulong size;
parameters.setAutoDelete (true);
@@ -1117,7 +1117,7 @@ mimeHeader * imapParser::parseSimplePart (parseString & inWords,
//body parameter parenthesized list
parameters = parseParameters (inWords);
{
- QAsciiDictIterator < QString > it (parameters);
+ TQAsciiDictIterator < TQString > it (parameters);
while (it.current ())
{
@@ -1170,12 +1170,12 @@ mimeHeader * imapParser::parseSimplePart (parseString & inWords,
// body disposition
parameters = parseDisposition (inWords);
{
- QString *disposition = parameters["content-disposition"];
+ TQString *disposition = parameters["content-disposition"];
if (disposition)
localPart->setDisposition (disposition->ascii ());
parameters.remove ("content-disposition");
- QAsciiDictIterator < QString > it (parameters);
+ TQAsciiDictIterator < TQString > it (parameters);
while (it.current ())
{
localPart->setDispositionParm (it.currentKey (),
@@ -1207,7 +1207,7 @@ mimeHeader * imapParser::parseSimplePart (parseString & inWords,
}
mimeHeader * imapParser::parseBodyStructure (parseString & inWords,
- QString & inSection, mimeHeader * localPart)
+ TQString & inSection, mimeHeader * localPart)
{
bool init = false;
if (inSection.isEmpty())
@@ -1230,9 +1230,9 @@ mimeHeader * imapParser::parseBodyStructure (parseString & inWords,
if (inWords[0] == '(')
{
- QByteArray subtype;
- QAsciiDict < QString > parameters (17, false);
- QString outSection;
+ TQByteArray subtype;
+ TQAsciiDict < TQString > parameters (17, false);
+ TQString outSection;
parameters.setAutoDelete (true);
if (!localPart)
localPart = new mimeHeader;
@@ -1258,7 +1258,7 @@ mimeHeader * imapParser::parseBodyStructure (parseString & inWords,
// is multipart (otherwise its a simplepart and handled later)
while (inWords[0] == '(')
{
- outSection = QString::number(++section);
+ outSection = TQString::number(++section);
if (!init)
outSection = inSection + "." + outSection;
mimeHeader *subpart = parseBodyStructure (inWords, outSection, 0);
@@ -1273,7 +1273,7 @@ mimeHeader * imapParser::parseBodyStructure (parseString & inWords,
// fetch parameters
parameters = parseParameters (inWords);
{
- QAsciiDictIterator < QString > it (parameters);
+ TQAsciiDictIterator < TQString > it (parameters);
while (it.current ())
{
@@ -1286,12 +1286,12 @@ mimeHeader * imapParser::parseBodyStructure (parseString & inWords,
// body disposition
parameters = parseDisposition (inWords);
{
- QString *disposition = parameters["content-disposition"];
+ TQString *disposition = parameters["content-disposition"];
if (disposition)
localPart->setDisposition (disposition->ascii ());
parameters.remove ("content-disposition");
- QAsciiDictIterator < QString > it (parameters);
+ TQAsciiDictIterator < TQString > it (parameters);
while (it.current ())
{
localPart->setDispositionParm (it.currentKey (),
@@ -1339,8 +1339,8 @@ void imapParser::parseBody (parseString & inWords)
// see if we got a part specifier
if (inWords[0] == '[')
{
- QCString specifier;
- QCString label;
+ TQCString specifier;
+ TQCString label;
inWords.pos++;
specifier = parseOneWordC (inWords, TRUE);
@@ -1378,7 +1378,7 @@ void imapParser::parseBody (parseString & inWords)
{
kdDebug(7116) << "imapParser::parseBody - reading " << envelope << " " << seenUid.ascii () << endl;
// fill it up with data
- QString theHeader = parseLiteralC(inWords, true);
+ TQString theHeader = parseLiteralC(inWords, true);
mimeIOQString myIO;
myIO.setString (theHeader);
@@ -1390,7 +1390,7 @@ void imapParser::parseBody (parseString & inWords)
{
// BODY[HEADER.FIELDS (References)] {n}
//kdDebug(7116) << "imapParser::parseBody - HEADER.FIELDS: "
- // << QCString(label.data(), label.size()+1) << endl;
+ // << TQCString(label.data(), label.size()+1) << endl;
if (label == "REFERENCES")
{
mailHeader *envelope = 0;
@@ -1405,7 +1405,7 @@ void imapParser::parseBody (parseString & inWords)
}
else
{
- QCString references = parseLiteralC(inWords, true);
+ TQCString references = parseLiteralC(inWords, true);
int start = references.find ('<');
int end = references.findRev ('>');
if (start < end)
@@ -1423,7 +1423,7 @@ void imapParser::parseBody (parseString & inWords)
if (specifier.find(".MIME") != -1)
{
mailHeader *envelope = new mailHeader;
- QString theHeader = parseLiteralC(inWords, false);
+ TQString theHeader = parseLiteralC(inWords, false);
mimeIOQString myIO;
myIO.setString (theHeader);
envelope->parseHeader (myIO);
@@ -1453,7 +1453,7 @@ void imapParser::parseBody (parseString & inWords)
{
kdDebug(7116) << "imapParser::parseBody - reading " << envelope << " " << seenUid.ascii () << endl;
// fill it up with data
- QString section;
+ TQString section;
mimeHeader *body = parseBodyStructure (inWords, section, envelope);
if (body != envelope)
delete body;
@@ -1477,7 +1477,7 @@ void imapParser::parseFetch (ulong /* value */, parseString & inWords)
parseSentence (inWords);
else
{
- QCString word = parseLiteralC(inWords, false, true);
+ TQCString word = parseLiteralC(inWords, false, true);
switch (word[0])
{
@@ -1528,11 +1528,11 @@ void imapParser::parseFetch (ulong /* value */, parseString & inWords)
envelope = lastHandled->getHeader ();
// fill it up with data
- QString section;
+ TQString section;
mimeHeader *body =
parseBodyStructure (inWords, section, envelope);
- QByteArray data;
- QDataStream stream( data, IO_WriteOnly );
+ TQByteArray data;
+ TQDataStream stream( data, IO_WriteOnly );
if (body) body->serialize(stream);
parseRelay(data);
@@ -1583,7 +1583,7 @@ void imapParser::parseFetch (ulong /* value */, parseString & inWords)
case 'I':
if (word == "INTERNALDATE")
{
- QCString date = parseOneWordC(inWords);
+ TQCString date = parseOneWordC(inWords);
if (!lastHandled) lastHandled = new imapCache();
lastHandled->setDate(date);
}
@@ -1674,9 +1674,9 @@ void imapParser::parseNamespace (parseString & result)
if ( result[0] != '(' )
return;
- QString delimEmpty;
- if ( namespaceToDelimiter.contains( QString::null ) )
- delimEmpty = namespaceToDelimiter[QString::null];
+ TQString delimEmpty;
+ if ( namespaceToDelimiter.contains( TQString::null ) )
+ delimEmpty = namespaceToDelimiter[TQString::null];
namespaceToDelimiter.clear();
imapNamespaces.clear();
@@ -1696,9 +1696,9 @@ void imapParser::parseNamespace (parseString & result)
++ns;
}
// namespace prefix
- QCString prefix = parseOneWordC( result );
+ TQCString prefix = parseOneWordC( result );
// delimiter
- QCString delim = parseOneWordC( result );
+ TQCString delim = parseOneWordC( result );
kdDebug(7116) << "imapParser::parseNamespace ns='" << prefix <<
"',delim='" << delim << "'" << endl;
if ( ns == 0 )
@@ -1706,8 +1706,8 @@ void imapParser::parseNamespace (parseString & result)
// at least one personal ns
personalAvailable = true;
}
- QString nsentry = QString::number( ns ) + "=" + QString(prefix) +
- "=" + QString(delim);
+ TQString nsentry = TQString::number( ns ) + "=" + TQString(prefix) +
+ "=" + TQString(delim);
imapNamespaces.append( nsentry );
if ( prefix.right( 1 ) == delim ) {
// strip delimiter to get a correct entry for comparisons
@@ -1733,12 +1733,12 @@ void imapParser::parseNamespace (parseString & result)
}
if ( !delimEmpty.isEmpty() ) {
// remember default delimiter
- namespaceToDelimiter[QString::null] = delimEmpty;
+ namespaceToDelimiter[TQString::null] = delimEmpty;
if ( !personalAvailable )
{
// at least one personal ns would be nice
kdDebug(7116) << "imapParser::parseNamespace - registering own personal ns" << endl;
- QString nsentry = "0==" + delimEmpty;
+ TQString nsentry = "0==" + delimEmpty;
imapNamespaces.append( nsentry );
}
}
@@ -1774,11 +1774,11 @@ int imapParser::parseLoop ()
break;
default:
{
- QCString tag = parseLiteralC(result);
+ TQCString tag = parseLiteralC(result);
if (current->id() == tag.data())
{
result.data.resize(result.data.size() - 2); // tie off CRLF
- QByteArray resultCode = parseLiteral (result); //the result
+ TQByteArray resultCode = parseLiteral (result); //the result
current->setResult (resultCode);
current->setResultInfo(result.cstr());
current->setComplete ();
@@ -1791,7 +1791,7 @@ int imapParser::parseLoop ()
else
{
kdDebug(7116) << "imapParser::parseLoop - unknown tag '" << tag << "'" << endl;
- QCString cstr = tag + " " + result.cstr();
+ TQCString cstr = tag + " " + result.cstr();
result.data = cstr;
result.pos = 0;
result.data.resize(cstr.length());
@@ -1805,7 +1805,7 @@ int imapParser::parseLoop ()
}
void
-imapParser::parseRelay (const QByteArray & buffer)
+imapParser::parseRelay (const TQByteArray & buffer)
{
Q_UNUSED(buffer);
qWarning
@@ -1820,7 +1820,7 @@ imapParser::parseRelay (ulong len)
("imapParser::parseRelay - virtual function not reimplemented - announcement lost");
}
-bool imapParser::parseRead (QByteArray & buffer, ulong len, ulong relay)
+bool imapParser::parseRead (TQByteArray & buffer, ulong len, ulong relay)
{
Q_UNUSED(buffer);
Q_UNUSED(len);
@@ -1830,7 +1830,7 @@ bool imapParser::parseRead (QByteArray & buffer, ulong len, ulong relay)
return FALSE;
}
-bool imapParser::parseReadLine (QByteArray & buffer, ulong relay)
+bool imapParser::parseReadLine (TQByteArray & buffer, ulong relay)
{
Q_UNUSED(buffer);
Q_UNUSED(relay);
@@ -1840,7 +1840,7 @@ bool imapParser::parseReadLine (QByteArray & buffer, ulong relay)
}
void
-imapParser::parseWriteLine (const QString & str)
+imapParser::parseWriteLine (const TQString & str)
{
Q_UNUSED(str);
qWarning
@@ -1848,25 +1848,25 @@ imapParser::parseWriteLine (const QString & str)
}
void
-imapParser::parseURL (const KURL & _url, QString & _box, QString & _section,
- QString & _type, QString & _uid, QString & _validity, QString & _info)
+imapParser::parseURL (const KURL & _url, TQString & _box, TQString & _section,
+ TQString & _type, TQString & _uid, TQString & _validity, TQString & _info)
{
- QStringList parameters;
+ TQStringList parameters;
_box = _url.path ();
kdDebug(7116) << "imapParser::parseURL " << _box << endl;
int paramStart = _box.find("/;");
if ( paramStart > -1 )
{
- QString paramString = _box.right( _box.length() - paramStart-2 );
- parameters = QStringList::split (';', paramString); //split parameters
+ TQString paramString = _box.right( _box.length() - paramStart-2 );
+ parameters = TQStringList::split (';', paramString); //split parameters
_box.truncate( paramStart ); // strip parameters
}
// extract parameters
- for (QStringList::ConstIterator it (parameters.begin ());
+ for (TQStringList::ConstIterator it (parameters.begin ());
it != parameters.end (); ++it)
{
- QString temp = (*it);
+ TQString temp = (*it);
int pt = temp.find ('/');
if (pt > 0)
@@ -1906,17 +1906,17 @@ imapParser::parseURL (const KURL & _url, QString & _box, QString & _section,
}
-QCString imapParser::parseLiteralC(parseString & inWords, bool relay, bool stopAtBracket, int *outlen) {
+TQCString imapParser::parseLiteralC(parseString & inWords, bool relay, bool stopAtBracket, int *outlen) {
if (!inWords.isEmpty() && inWords[0] == '{')
{
- QCString retVal;
+ TQCString retVal;
ulong runLen = inWords.find ('}', 1);
if (runLen > 0)
{
bool proper;
ulong runLenSave = runLen + 1;
- QCString tmpstr(runLen);
+ TQCString tmpstr(runLen);
inWords.takeMidNoResize(tmpstr, 1, runLen - 1);
runLen = tmpstr.toULong (&proper);
inWords.pos += runLenSave;
@@ -1925,7 +1925,7 @@ QCString imapParser::parseLiteralC(parseString & inWords, bool relay, bool stopA
//now get the literal from the server
if (relay)
parseRelay (runLen);
- QByteArray rv;
+ TQByteArray rv;
parseRead (rv, runLen, relay ? runLen : 0);
rv.resize(QMAX(runLen, rv.size())); // what's the point?
retVal = b2c(rv);
@@ -1956,12 +1956,12 @@ QCString imapParser::parseLiteralC(parseString & inWords, bool relay, bool stopA
}
// does not know about literals ( {7} literal )
-QCString imapParser::parseOneWordC (parseString & inWords, bool stopAtBracket, int *outLen)
+TQCString imapParser::parseOneWordC (parseString & inWords, bool stopAtBracket, int *outLen)
{
uint retValSize = 0;
uint len = inWords.length();
if (len == 0) {
- return QCString();
+ return TQCString();
}
if (len > 0 && inWords[0] == '"')
@@ -1976,7 +1976,7 @@ QCString imapParser::parseOneWordC (parseString & inWords, bool stopAtBracket, i
}
if (i < len)
{
- QCString retVal(i);
+ TQCString retVal(i);
inWords.pos++;
inWords.takeLeftNoResize(retVal, i - 1);
len = i - 1;
@@ -2000,7 +2000,7 @@ QCString imapParser::parseOneWordC (parseString & inWords, bool stopAtBracket, i
else
{
kdDebug(7116) << "imapParser::parseOneWord - error parsing unmatched \"" << endl;
- QCString retVal = inWords.cstr();
+ TQCString retVal = inWords.cstr();
retValSize = len;
inWords.clear();
if (outLen) {
@@ -2021,7 +2021,7 @@ QCString imapParser::parseOneWordC (parseString & inWords, bool stopAtBracket, i
break;
}
- QCString retVal(i+1);
+ TQCString retVal(i+1);
inWords.takeLeftNoResize(retVal, i);
retValSize = i;
inWords.pos += i;
@@ -2045,11 +2045,11 @@ bool imapParser::parseOneNumber (parseString & inWords, ulong & num)
return valid;
}
-bool imapParser::hasCapability (const QString & cap)
+bool imapParser::hasCapability (const TQString & cap)
{
- QString c = cap.lower();
+ TQString c = cap.lower();
// kdDebug(7116) << "imapParser::hasCapability - Looking for '" << cap << "'" << endl;
- for (QStringList::ConstIterator it = imapCapabilities.begin ();
+ for (TQStringList::ConstIterator it = imapCapabilities.begin ();
it != imapCapabilities.end (); ++it)
{
// kdDebug(7116) << "imapParser::hasCapability - Examining '" << (*it) << "'" << endl;
@@ -2061,20 +2061,20 @@ bool imapParser::hasCapability (const QString & cap)
return false;
}
-void imapParser::removeCapability (const QString & cap)
+void imapParser::removeCapability (const TQString & cap)
{
imapCapabilities.remove(cap.lower());
}
-QString imapParser::namespaceForBox( const QString & box )
+TQString imapParser::namespaceForBox( const TQString & box )
{
kdDebug(7116) << "imapParse::namespaceForBox " << box << endl;
- QString myNamespace;
+ TQString myNamespace;
if ( !box.isEmpty() )
{
- QValueList<QString> list = namespaceToDelimiter.keys();
- QString cleanPrefix;
- for ( QValueList<QString>::Iterator it = list.begin(); it != list.end(); ++it )
+ TQValueList<TQString> list = namespaceToDelimiter.keys();
+ TQString cleanPrefix;
+ for ( TQValueList<TQString>::Iterator it = list.begin(); it != list.end(); ++it )
{
if ( !(*it).isEmpty() && box.find( *it ) != -1 )
return (*it);
diff --git a/kioslaves/imap4/imapparser.h b/kioslaves/imap4/imapparser.h
index 74fad1457..61bc2a805 100644
--- a/kioslaves/imap4/imapparser.h
+++ b/kioslaves/imap4/imapparser.h
@@ -24,10 +24,10 @@
*
*********************************************************************/
-#include <qstringlist.h>
-#include <qvaluelist.h>
-#include <qptrlist.h>
-#include <qasciidict.h>
+#include <tqstringlist.h>
+#include <tqvaluelist.h>
+#include <tqptrlist.h>
+#include <tqasciidict.h>
#include <kio/authinfo.h>
#include <kio/slavebase.h>
@@ -55,10 +55,10 @@ public:
parseString() { pos = 0; }
char operator[](uint i) const { return data[i + pos]; }
bool isEmpty() const { return pos >= data.size(); }
- QCString cstr() const
+ TQCString cstr() const
{
- if (pos >= data.size()) return QCString();
- return QCString(data.data() + pos, data.size() - pos + 1);
+ if (pos >= data.size()) return TQCString();
+ return TQCString(data.data() + pos, data.size() - pos + 1);
}
int find(char c, int index = 0)
{
@@ -66,24 +66,24 @@ public:
return (res == -1) ? res : (res - pos);
}
// Warning: does not check for going past end of "data"
- void takeLeft(QCString& dest, uint len) const
+ void takeLeft(TQCString& dest, uint len) const
{
dest.resize(len + 1);
qmemmove(dest.data(), data.data() + pos, len);
}
// Warning: does not check for going past end of "data"
- void takeLeftNoResize(QCString& dest, uint len) const
+ void takeLeftNoResize(TQCString& dest, uint len) const
{
qmemmove(dest.data(), data.data() + pos, len);
}
// Warning: does not check for going past end of "data"
- void takeMid(QCString& dest, uint start, uint len) const
+ void takeMid(TQCString& dest, uint start, uint len) const
{
dest.resize(len + 1);
qmemmove(dest.data(), data.data() + pos + start, len);
}
// Warning: does not check for going past end of "data"
- void takeMidNoResize(QCString& dest, uint start, uint len) const
+ void takeMidNoResize(TQCString& dest, uint start, uint len) const
{
qmemmove(dest.data(), data.data() + pos + start, len);
}
@@ -96,12 +96,12 @@ public:
{
return data.size() - pos;
}
- void fromString(const QString &s)
+ void fromString(const TQString &s)
{
clear();
data.duplicate(s.latin1(), s.length());
}
- QByteArray data;
+ TQByteArray data;
uint pos;
};
@@ -157,11 +157,11 @@ public:
myFlags = inFlags;
}
- QCString getDate ()
+ TQCString getDate ()
{
return myDate;
}
- void setDate (const QCString & _str)
+ void setDate (const TQCString & _str)
{
myDate = _str;
}
@@ -171,7 +171,7 @@ public:
myHeader = NULL;
mySize = 0;
myFlags = 0;
- myDate = QCString();
+ myDate = TQCString();
myUid = 0;
}
@@ -180,7 +180,7 @@ protected:
ulong mySize;
ulong myFlags;
ulong myUid;
- QCString myDate;
+ TQCString myDate;
};
@@ -208,7 +208,7 @@ public:
void setState(enum IMAP_STATE state) { currentState = state; }
/* @brief return the currently selected mailbox */
- const QString getCurrentBox ()
+ const TQString getCurrentBox ()
{
return rfcDecoder::fromIMAP(currentBox);
};
@@ -234,7 +234,7 @@ public:
* @param resultInfo The resultinfo from the command
* @return success or failure
*/
- bool clientLogin (const QString & aUser, const QString & aPass, QString & resultInfo);
+ bool clientLogin (const TQString & aUser, const TQString & aPass, TQString & resultInfo);
/**
* @brief non-plaintext login
* @param aUser Username
@@ -244,8 +244,8 @@ public:
* @param resultInfo The resultinfo from the command
* @return success or failure
*/
- bool clientAuthenticate (KIO::SlaveBase *slave, KIO::AuthInfo &ai, const QString & aFQDN,
- const QString & aAuth, bool isSSL, QString & resultInfo);
+ bool clientAuthenticate (KIO::SlaveBase *slave, KIO::AuthInfo &ai, const TQString & aFQDN,
+ const TQString & aAuth, bool isSSL, TQString & resultInfo);
/**
* main loop for the parser
@@ -262,8 +262,8 @@ public:
/** @brief parse a RECENT line */
void parseRecent (ulong value, parseString & result);
/** @brief parse a RESULT line */
- void parseResult (QByteArray & result, parseString & rest,
- const QString & command = QString::null);
+ void parseResult (TQByteArray & result, parseString & rest,
+ const TQString & command = TQString::null);
/** @brief parse a CAPABILITY line */
void parseCapability (parseString & result);
/** @brief parse a FLAGS line */
@@ -312,7 +312,7 @@ public:
/** read a envelope from imap and parse the addresses */
mailHeader *parseEnvelope (parseString & inWords);
/** @brief parse an address list and return a list of addresses */
- void parseAddressList (parseString & inWords, QPtrList<mailAddress>& list);
+ void parseAddressList (parseString & inWords, TQPtrList<mailAddress>& list);
/** @brief parse an address and return the ref again */
const mailAddress& parseAddress (parseString & inWords, mailAddress& buffer);
@@ -321,38 +321,38 @@ public:
/** parse the body structure recursively */
mimeHeader *parseBodyStructure (parseString & inWords,
- QString & section, mimeHeader * inHeader = 0);
+ TQString & section, mimeHeader * inHeader = 0);
/** parse only one not nested part */
- mimeHeader *parseSimplePart (parseString & inWords, QString & section,
+ mimeHeader *parseSimplePart (parseString & inWords, TQString & section,
mimeHeader * localPart = 0);
/** parse a parameter list (name value pairs) */
- QAsciiDict < QString > parseParameters (parseString & inWords);
+ TQAsciiDict < TQString > parseParameters (parseString & inWords);
/**
* parse the disposition list (disposition (name value pairs))
* the disposition has the key 'content-disposition'
*/
- QAsciiDict < QString > parseDisposition (parseString & inWords);
+ TQAsciiDict < TQString > parseDisposition (parseString & inWords);
// reimplement these
/** relay hook to send the fetched data directly to an upper level */
- virtual void parseRelay (const QByteArray & buffer);
+ virtual void parseRelay (const TQByteArray & buffer);
/** relay hook to announce the fetched data directly to an upper level
*/
virtual void parseRelay (ulong);
/** read at least len bytes */
- virtual bool parseRead (QByteArray & buffer, ulong len, ulong relay = 0);
+ virtual bool parseRead (TQByteArray & buffer, ulong len, ulong relay = 0);
/** read at least a line (up to CRLF) */
- virtual bool parseReadLine (QByteArray & buffer, ulong relay = 0);
+ virtual bool parseReadLine (TQByteArray & buffer, ulong relay = 0);
/** write argument to server */
- virtual void parseWriteLine (const QString &);
+ virtual void parseWriteLine (const TQString &);
// generic parser routines
@@ -360,33 +360,33 @@ public:
void parseSentence (parseString & inWords);
/** parse a literal or word, may require more data */
- QCString parseLiteralC(parseString & inWords, bool relay = false,
+ TQCString parseLiteralC(parseString & inWords, bool relay = false,
bool stopAtBracket = false, int *outlen = 0);
- inline QByteArray parseLiteral (parseString & inWords, bool relay = false,
+ inline TQByteArray parseLiteral (parseString & inWords, bool relay = false,
bool stopAtBracket = false) {
int len = 0; // string size
- // Choice: we can create an extra QCString, or we can get the buffer in
+ // Choice: we can create an extra TQCString, or we can get the buffer in
// the wrong size to start. Let's try option b.
- QCString tmp = parseLiteralC(inWords, relay, stopAtBracket, &len);
- return QByteArray().duplicate(tmp.data(), len);
+ TQCString tmp = parseLiteralC(inWords, relay, stopAtBracket, &len);
+ return TQByteArray().duplicate(tmp.data(), len);
}
// static parser routines, can be used elsewhere
- static QCString b2c(const QByteArray &ba)
- { return QCString(ba.data(), ba.size() + 1); }
+ static TQCString b2c(const TQByteArray &ba)
+ { return TQCString(ba.data(), ba.size() + 1); }
/** parse one word (maybe quoted) upto next space " ) ] } */
- static QCString parseOneWordC (parseString & inWords,
+ static TQCString parseOneWordC (parseString & inWords,
bool stopAtBracket = FALSE, int *len = 0);
/** parse one number using parseOneWord */
static bool parseOneNumber (parseString & inWords, ulong & num);
/** extract the box,section,list type, uid, uidvalidity,info from an url */
- static void parseURL (const KURL & _url, QString & _box, QString & _section,
- QString & _type, QString & _uid, QString & _validity,
- QString & _info);
+ static void parseURL (const KURL & _url, TQString & _box, TQString & _section,
+ TQString & _type, TQString & _uid, TQString & _validity,
+ TQString & _info);
/** @brief return the last handled foo
@@ -398,7 +398,7 @@ public:
};
/** @brief return the last results */
- const QStringList & getResults ()
+ const TQStringList & getResults ()
{
return lastResults;
};
@@ -414,15 +414,15 @@ public:
return selectInfo;
};
- const QByteArray & getContinuation ()
+ const TQByteArray & getContinuation ()
{
return continuation;
};
/** @brief see if server has a capability */
- bool hasCapability (const QString &);
+ bool hasCapability (const TQString &);
- void removeCapability (const QString & cap);
+ void removeCapability (const TQString & cap);
static inline void skipWS (parseString & inWords)
{
@@ -435,7 +435,7 @@ public:
}
/** @brief find the namespace for the given box */
- QString namespaceForBox( const QString & box );
+ TQString namespaceForBox( const TQString & box );
protected:
@@ -444,7 +444,7 @@ protected:
enum IMAP_STATE currentState;
/** the box selected */
- QString currentBox;
+ TQString currentBox;
/** @brief here we store the result from select/examine and unsolicited updates */
imapInfo selectInfo;
@@ -453,43 +453,43 @@ protected:
imapInfo lastStatus;
/** @brief the results from the capabilities, split at ' ' */
- QStringList imapCapabilities;
+ TQStringList imapCapabilities;
/** @brief the results from list/lsub/listrights commands */
- QValueList < imapList > listResponses;
+ TQValueList < imapList > listResponses;
/** @brief queues handling the running commands */
- QPtrList < imapCommand > sentQueue; // no autodelete
- QPtrList < imapCommand > completeQueue; // autodelete !!
+ TQPtrList < imapCommand > sentQueue; // no autodelete
+ TQPtrList < imapCommand > completeQueue; // autodelete !!
/**
* everything we didn't handle, everything but the greeting is bogus
*/
- QStringList unhandled;
+ TQStringList unhandled;
/** the last continuation request (there MUST not be more than one pending) */
- QByteArray continuation;
+ TQByteArray continuation;
/** the last uid seen while a fetch */
- QString seenUid;
+ TQString seenUid;
imapCache *lastHandled;
ulong commandCounter;
/** @brief the results from search/acl commands */
- QStringList lastResults;
+ TQStringList lastResults;
/**
* @brief namespace prefix - delimiter association
* The namespace is cleaned before so that it does not contain the delimiter
*/
- QMap<QString, QString> namespaceToDelimiter;
+ TQMap<TQString, TQString> namespaceToDelimiter;
/**
* @brief list of namespaces in the form: section=namespace=delimiter
* section is 0 (personal), 1 (other users) or 2 (shared)
*/
- QStringList imapNamespaces;
+ TQStringList imapNamespaces;
private:
diff --git a/kioslaves/imap4/mailaddress.cc b/kioslaves/imap4/mailaddress.cc
index a70b2d591..227defa97 100644
--- a/kioslaves/imap4/mailaddress.cc
+++ b/kioslaves/imap4/mailaddress.cc
@@ -93,15 +93,15 @@ mailAddress::parseAddress (char *aCStr)
{
case '"':
advance = mimeHdrLine::parseQuoted ('"', '"', aCStr);
- rawFullName += QCString (aCStr, advance + 1);
+ rawFullName += TQCString (aCStr, advance + 1);
break;
case '(':
advance = mimeHdrLine::parseQuoted ('(', ')', aCStr);
- rawComment += QCString (aCStr, advance + 1);
+ rawComment += TQCString (aCStr, advance + 1);
break;
case '<':
advance = mimeHdrLine::parseQuoted ('<', '>', aCStr);
- user = QCString (aCStr, advance + 1); // copy it
+ user = TQCString (aCStr, advance + 1); // copy it
len = advance;
user = user.mid (1, len - 2); // strip <>
len -= 2;
@@ -116,7 +116,7 @@ mailAddress::parseAddress (char *aCStr)
{
if (*aCStr != ',')
{
- rawFullName += QCString (aCStr, advance + 1);
+ rawFullName += TQCString (aCStr, advance + 1);
if (mimeHdrLine::skipWS ((const char *) &aCStr[advance]) > 0)
{
rawFullName += ' ';
@@ -199,7 +199,7 @@ mailAddress::parseAddress (char *aCStr)
const QCString
mailAddress::getStr ()
{
- QCString retVal(128); // Should be generally big enough
+ TQCString retVal(128); // Should be generally big enough
if (!rawFullName.isEmpty ())
{
@@ -231,7 +231,7 @@ mailAddress::isEmpty () const
}
void
-mailAddress::setFullName (const QString & _str)
+mailAddress::setFullName (const TQString & _str)
{
rawFullName = rfcDecoder::encodeRFC2047String (_str).latin1 ();
}
@@ -242,13 +242,13 @@ mailAddress::getFullName () const
}
void
-mailAddress::setCommentRaw (const QCString & _str)
+mailAddress::setCommentRaw (const TQCString & _str)
{
rawComment = _str;
}
void
-mailAddress::setComment (const QString & _str)
+mailAddress::setComment (const TQString & _str)
{
rawComment = rfcDecoder::encodeRFC2047String (_str).latin1 ();
}
@@ -258,7 +258,7 @@ mailAddress::getComment () const
return rfcDecoder::decodeRFC2047String (rawComment);
}
-const QCString &
+const TQCString &
mailAddress::getCommentRaw () const
{
return rawComment;
@@ -267,7 +267,7 @@ mailAddress::getCommentRaw () const
QString
mailAddress::emailAddrAsAnchor (const mailAddress & adr, bool shortAdr)
{
- QString retVal;
+ TQString retVal;
if (!adr.getFullName ().isEmpty ())
{
// should do some umlaut escaping
@@ -288,7 +288,7 @@ mailAddress::emailAddrAsAnchor (const mailAddress & adr, bool shortAdr)
if (!adr.getUser ().isEmpty ())
{
- QString mail;
+ TQString mail;
mail = adr.getUser ();
if (!mail.isEmpty () && !adr.getHost ().isEmpty ())
mail += "@" + adr.getHost ();
@@ -299,10 +299,10 @@ mailAddress::emailAddrAsAnchor (const mailAddress & adr, bool shortAdr)
}
QString
-mailAddress::emailAddrAsAnchor (const QPtrList < mailAddress > &list, bool value)
+mailAddress::emailAddrAsAnchor (const TQPtrList < mailAddress > &list, bool value)
{
- QString retVal;
- QPtrListIterator < mailAddress > it (list);
+ TQString retVal;
+ TQPtrListIterator < mailAddress > it (list);
while (it.current ())
{
diff --git a/kioslaves/imap4/mailaddress.h b/kioslaves/imap4/mailaddress.h
index 4ee68a396..644034b24 100644
--- a/kioslaves/imap4/mailaddress.h
+++ b/kioslaves/imap4/mailaddress.h
@@ -23,9 +23,9 @@
*
*********************************************************************/
-#include <qptrlist.h>
-#include <qstring.h>
-#include <qcstring.h>
+#include <tqptrlist.h>
+#include <tqstring.h>
+#include <tqcstring.h>
#include "rfcdecoder.h"
class mailAddress
@@ -37,45 +37,45 @@ public:
mailAddress (const mailAddress &);
mailAddress & operator = (const mailAddress &);
- void setUser (const QCString & aUser)
+ void setUser (const TQCString & aUser)
{
user = aUser;
}
- const QCString & getUser () const
+ const TQCString & getUser () const
{
return user;
}
- void setHost (const QCString & aHost)
+ void setHost (const TQCString & aHost)
{
host = aHost;
}
- const QCString & getHost () const
+ const TQCString & getHost () const
{
return host;
}
- void setFullName (const QString & aFull);
- const QString getFullName () const;
+ void setFullName (const TQString & aFull);
+ const TQString getFullName () const;
- void setComment (const QString & aComment);
- void setCommentRaw (const QCString &);
- const QString getComment () const;
- const QCString & getCommentRaw () const;
+ void setComment (const TQString & aComment);
+ void setCommentRaw (const TQCString &);
+ const TQString getComment () const;
+ const TQCString & getCommentRaw () const;
int parseAddress (char *);
- const QCString getStr ();
+ const TQCString getStr ();
bool isEmpty () const;
- static QString emailAddrAsAnchor (const mailAddress &, bool);
- static QString emailAddrAsAnchor (const QPtrList < mailAddress > &, bool);
+ static TQString emailAddrAsAnchor (const mailAddress &, bool);
+ static TQString emailAddrAsAnchor (const TQPtrList < mailAddress > &, bool);
void clear();
private:
- QCString user;
- QCString host;
- QCString rawFullName;
- QCString rawComment;
+ TQCString user;
+ TQCString host;
+ TQCString rawFullName;
+ TQCString rawComment;
};
#endif
diff --git a/kioslaves/imap4/mailheader.cc b/kioslaves/imap4/mailheader.cc
index 960e5ba52..dea9ce5fd 100644
--- a/kioslaves/imap4/mailheader.cc
+++ b/kioslaves/imap4/mailheader.cc
@@ -36,8 +36,8 @@ mailHeader::addHdrLine (mimeHdrLine * inLine)
{
mimeHdrLine *addLine = new mimeHdrLine (inLine);
- const QCString label(addLine->getLabel());
- const QCString value(addLine->getValue());
+ const TQCString label(addLine->getLabel());
+ const TQCString value(addLine->getValue());
if (!qstricmp (label, "Return-Path")) {
returnpathAdr.parseAddress (value.data ());
@@ -109,18 +109,18 @@ mailHeader::addHdrLine (mimeHdrLine * inLine)
void
mailHeader::outputHeader (mimeIO & useIO)
{
- static const QCString __returnPath("Return-Path: ", 14);
- static const QCString __from ("From: ", 7);
- static const QCString __sender ("Sender: ", 9);
- static const QCString __replyTo ("Reply-To: ", 11);
- static const QCString __to ("To: ", 5);
- static const QCString __cc ("CC: ", 5);
- static const QCString __bcc ("BCC: ", 6);
- static const QCString __subject ("Subject: ", 10);
- static const QCString __messageId ("Message-ID: ", 13);
- static const QCString __inReplyTo ("In-Reply-To: ", 14);
- static const QCString __references("References: ", 13);
- static const QCString __date ("Date: ", 7);
+ static const TQCString __returnPath("Return-Path: ", 14);
+ static const TQCString __from ("From: ", 7);
+ static const TQCString __sender ("Sender: ", 9);
+ static const TQCString __replyTo ("Reply-To: ", 11);
+ static const TQCString __to ("To: ", 5);
+ static const TQCString __cc ("CC: ", 5);
+ static const TQCString __bcc ("BCC: ", 6);
+ static const TQCString __subject ("Subject: ", 10);
+ static const TQCString __messageId ("Message-ID: ", 13);
+ static const TQCString __inReplyTo ("In-Reply-To: ", 14);
+ static const TQCString __references("References: ", 13);
+ static const TQCString __date ("Date: ", 7);
if (!returnpathAdr.isEmpty())
useIO.outputMimeLine(__returnPath + returnpathAdr.getStr());
@@ -156,7 +156,7 @@ mailHeader::outputHeader (mimeIO & useIO)
int
mailHeader::parseAddressList (const char *inCStr,
- QPtrList < mailAddress > *aList)
+ TQPtrList < mailAddress > *aList)
{
int advance = 0;
int skip = 1;
@@ -187,11 +187,11 @@ mailHeader::parseAddressList (const char *inCStr,
}
QCString
-mailHeader::getAddressStr (QPtrList < mailAddress > *aList)
+mailHeader::getAddressStr (TQPtrList < mailAddress > *aList)
{
- QCString retVal;
+ TQCString retVal;
- QPtrListIterator < mailAddress > it = QPtrListIterator < mailAddress > (*aList);
+ TQPtrListIterator < mailAddress > it = TQPtrListIterator < mailAddress > (*aList);
while (it.current ())
{
retVal += it.current ()->getStr ();
diff --git a/kioslaves/imap4/mailheader.h b/kioslaves/imap4/mailheader.h
index 0586b3a0c..633d61b78 100644
--- a/kioslaves/imap4/mailheader.h
+++ b/kioslaves/imap4/mailheader.h
@@ -66,29 +66,29 @@ public:
replytoAdr = _adr;
}
- const QCString& getMessageId ()
+ const TQCString& getMessageId ()
{
return messageID;
}
- void setMessageId (const QCString & _str)
+ void setMessageId (const TQCString & _str)
{
messageID = _str;
}
- const QCString& getInReplyTo ()
+ const TQCString& getInReplyTo ()
{
return inReplyTo;
}
- void setInReplyTo (const QCString & _str)
+ void setInReplyTo (const TQCString & _str)
{
inReplyTo = _str;
}
- const QCString& getReferences ()
+ const TQCString& getReferences ()
{
return references;
}
- void setReferences (const QCString & _str)
+ void setReferences (const TQCString & _str)
{
references = _str;
}
@@ -96,14 +96,14 @@ public:
/**
* set a unicode subject
*/
- void setSubject (const QString & _str)
+ void setSubject (const TQString & _str)
{
_subject = rfcDecoder::encodeRFC2047String(_str).latin1();
}
/**
* set a encoded subject
*/
- void setSubjectEncoded (const QCString & _str)
+ void setSubjectEncoded (const TQCString & _str)
{
_subject = _str.simplifyWhiteSpace();
}
@@ -111,14 +111,14 @@ public:
/**
* get the unicode subject
*/
- const QString getSubject ()
+ const TQString getSubject ()
{
return rfcDecoder::decodeRFC2047String(_subject);
}
/**
* get the encoded subject
*/
- const QCString& getSubjectEncoded ()
+ const TQCString& getSubjectEncoded ()
{
return _subject;
}
@@ -126,7 +126,7 @@ public:
/**
* set the date
*/
- void setDate (const QCString & _str)
+ void setDate (const TQCString & _str)
{
mDate = _str;
}
@@ -134,27 +134,27 @@ public:
/**
* get the date
*/
- const QCString& date ()
+ const TQCString& date ()
{
return mDate;
}
- static int parseAddressList (const char *, QPtrList < mailAddress > *);
- static QCString getAddressStr (QPtrList < mailAddress > *);
- QPtrList < mailAddress > &to ()
+ static int parseAddressList (const char *, TQPtrList < mailAddress > *);
+ static TQCString getAddressStr (TQPtrList < mailAddress > *);
+ TQPtrList < mailAddress > &to ()
{
return toAdr;
}
- QPtrList < mailAddress > &cc ()
+ TQPtrList < mailAddress > &cc ()
{
return ccAdr;
}
- QPtrList < mailAddress > &bcc ()
+ TQPtrList < mailAddress > &bcc ()
{
return bccAdr;
}
#ifdef KMAIL_COMPATIBLE
- QString subject ()
+ TQString subject ()
{
return getSubject ();
}
@@ -172,19 +172,19 @@ public:
#endif
private:
- QPtrList < mailAddress > toAdr;
- QPtrList < mailAddress > ccAdr;
- QPtrList < mailAddress > bccAdr;
+ TQPtrList < mailAddress > toAdr;
+ TQPtrList < mailAddress > ccAdr;
+ TQPtrList < mailAddress > bccAdr;
mailAddress fromAdr;
mailAddress senderAdr;
mailAddress returnpathAdr;
mailAddress replytoAdr;
- QCString _subject;
- QCString mDate;
+ TQCString _subject;
+ TQCString mDate;
int gmt_offset;
- QCString messageID;
- QCString inReplyTo;
- QCString references;
+ TQCString messageID;
+ TQCString inReplyTo;
+ TQCString references;
};
#endif
diff --git a/kioslaves/imap4/mimehdrline.cc b/kioslaves/imap4/mimehdrline.cc
index 9b03ec923..0706d04c4 100644
--- a/kioslaves/imap4/mimehdrline.cc
+++ b/kioslaves/imap4/mimehdrline.cc
@@ -40,7 +40,7 @@ mimeValue ((const char *) NULL), mimeLabel ((const char *) NULL)
{
}
-mimeHdrLine::mimeHdrLine (const QCString & aLabel, const QCString & aValue):
+mimeHdrLine::mimeHdrLine (const TQCString & aLabel, const TQCString & aValue):
mimeValue (aValue),
mimeLabel (aLabel)
{
@@ -69,11 +69,11 @@ mimeHdrLine::appendStr (const char *inCStr)
{
if (skip > 0)
{
- mimeValue += QCString (aCStr, skip + 1);
+ mimeValue += TQCString (aCStr, skip + 1);
aCStr += skip;
retVal += skip;
skip = parseFullLine (aCStr);
- mimeValue += QCString (aCStr, skip + 1);
+ mimeValue += TQCString (aCStr, skip + 1);
retVal += skip;
aCStr += skip;
}
@@ -96,8 +96,8 @@ mimeHdrLine::setStr (const char *inCStr)
int retVal = 0;
char *aCStr = (char *) inCStr;
// char *begin = aCStr;
- mimeLabel = QCString ((const char *) NULL);
- mimeValue = QCString ((const char *) NULL);
+ mimeLabel = TQCString ((const char *) NULL);
+ mimeValue = TQCString ((const char *) NULL);
if (aCStr)
{
@@ -113,7 +113,7 @@ mimeHdrLine::setStr (const char *inCStr)
retVal = 0;
else
{
- mimeLabel = QCString (aCStr, label); //length including zero
+ mimeLabel = TQCString (aCStr, label); //length including zero
retVal += label;
aCStr += label;
}
@@ -127,7 +127,7 @@ mimeHdrLine::setStr (const char *inCStr)
aCStr += skip;
retVal += skip;
skip = parseFullLine (aCStr);
- mimeValue = QCString (aCStr, skip + 1);
+ mimeValue = TQCString (aCStr, skip + 1);
retVal += skip;
aCStr += skip;
}
@@ -465,14 +465,14 @@ mimeHdrLine::parseSeparator (char separator, const char *inCStr)
/** return the label */
-const QCString&
+const TQCString&
mimeHdrLine::getLabel ()
{
return mimeLabel;
}
/** return the value */
-const QCString&
+const TQCString&
mimeHdrLine::getValue ()
{
return mimeValue;
@@ -481,10 +481,10 @@ mimeHdrLine::getValue ()
// FIXME: very inefficient still
QCString
-mimeHdrLine::truncateLine(QCString aLine, unsigned int truncate)
+mimeHdrLine::truncateLine(TQCString aLine, unsigned int truncate)
{
int cutHere;
- QCString retVal;
+ TQCString retVal;
uint len = aLine.length();
// see if we have a line of the form "key: value" (like "Subject: bla")
diff --git a/kioslaves/imap4/mimehdrline.h b/kioslaves/imap4/mimehdrline.h
index ae8fdd57c..e31c18649 100644
--- a/kioslaves/imap4/mimehdrline.h
+++ b/kioslaves/imap4/mimehdrline.h
@@ -19,8 +19,8 @@
#define MIMEHDRLINE_H
-#include <qcstring.h>
-#include <qasciidict.h>
+#include <tqcstring.h>
+#include <tqasciidict.h>
/**
*@author Sven Carstens
@@ -31,17 +31,17 @@ class mimeHdrLine
public:
mimeHdrLine ();
mimeHdrLine (mimeHdrLine *);
- mimeHdrLine (const QCString &, const QCString &);
+ mimeHdrLine (const TQCString &, const TQCString &);
~mimeHdrLine ();
/** parse a Line into the class
and report characters slurped */
int setStr (const char *);
int appendStr (const char *);
/** return the value */
- const QCString& getValue ();
+ const TQCString& getValue ();
/** return the label */
- const QCString& getLabel ();
- static QCString truncateLine (QCString, unsigned int truncate = 80);
+ const TQCString& getLabel ();
+ static TQCString truncateLine (TQCString, unsigned int truncate = 80);
static int parseSeparator (char, const char *);
static int parseQuoted (char, char, const char *);
/** skip all white space characters */
@@ -54,10 +54,10 @@ and report characters slurped */
protected: // Protected attributes
/** contains the Value
*/
- QCString mimeValue;
+ TQCString mimeValue;
/** contains the Label of the line
*/
- QCString mimeLabel;
+ TQCString mimeLabel;
protected: // Protected methods
/** parses a continuated line */
int parseFullLine (const char *);
diff --git a/kioslaves/imap4/mimeheader.cc b/kioslaves/imap4/mimeheader.cc
index 17d3a3fd8..676e0d72f 100644
--- a/kioslaves/imap4/mimeheader.cc
+++ b/kioslaves/imap4/mimeheader.cc
@@ -20,7 +20,7 @@
#include "mailheader.h"
#include "rfcdecoder.h"
-#include <qregexp.h>
+#include <tqregexp.h>
// #include <iostream.h>
#include <kglobal.h>
@@ -50,9 +50,9 @@ mimeHeader::~mimeHeader ()
}
/*
-QPtrList<mimeHeader> mimeHeader::getAllParts()
+TQPtrList<mimeHeader> mimeHeader::getAllParts()
{
- QPtrList<mimeHeader> retVal;
+ TQPtrList<mimeHeader> retVal;
// caller is responsible for clearing
retVal.setAutoDelete( false );
@@ -85,7 +85,7 @@ mimeHeader::addHdrLine (mimeHdrLine * aHdrLine)
{
int skip;
char *aCStr = addLine->getValue ().data ();
- QDict < QString > *aList = 0;
+ TQDict < TQString > *aList = 0;
skip = mimeHdrLine::parseSeparator (';', aCStr);
if (skip > 0)
@@ -102,7 +102,7 @@ mimeHeader::addHdrLine (mimeHdrLine * aHdrLine)
if (aCStr[skip - 1] == ';')
cut++;
}
- QCString mimeValue = QCString (aCStr, skip - cut + 1); // cutting of one because of 0x00
+ TQCString mimeValue = TQCString (aCStr, skip - cut + 1); // cutting of one because of 0x00
if (!qstricmp (addLine->getLabel (), "Content-Disposition"))
@@ -147,9 +147,9 @@ mimeHeader::addHdrLine (mimeHdrLine * aHdrLine)
{
if (skip > 0)
{
- addParameter (QCString (aCStr, skip).simplifyWhiteSpace(), aList);
+ addParameter (TQCString (aCStr, skip).simplifyWhiteSpace(), aList);
// cout << "-- '" << aParm.data() << "'" << endl;
- mimeValue = QCString (addLine->getValue ().data (), skip);
+ mimeValue = TQCString (addLine->getValue ().data (), skip);
aCStr += skip;
}
else
@@ -161,16 +161,16 @@ mimeHeader::addHdrLine (mimeHdrLine * aHdrLine)
}
void
-mimeHeader::addParameter (const QCString& aParameter, QDict < QString > *aList)
+mimeHeader::addParameter (const TQCString& aParameter, TQDict < TQString > *aList)
{
if ( !aList )
return;
- QString *aValue;
- QCString aLabel;
+ TQString *aValue;
+ TQCString aLabel;
int pos = aParameter.find ('=');
// cout << aParameter.left(pos).data();
- aValue = new QString ();
+ aValue = new TQString ();
aValue->setLatin1 (aParameter.right (aParameter.length () - pos - 1));
aLabel = aParameter.left (pos);
if ((*aValue)[0] == '"')
@@ -181,48 +181,48 @@ mimeHeader::addParameter (const QCString& aParameter, QDict < QString > *aList)
}
QString
-mimeHeader::getDispositionParm (const QCString& aStr)
+mimeHeader::getDispositionParm (const TQCString& aStr)
{
return getParameter (aStr, &dispositionList);
}
QString
-mimeHeader::getTypeParm (const QCString& aStr)
+mimeHeader::getTypeParm (const TQCString& aStr)
{
return getParameter (aStr, &typeList);
}
void
-mimeHeader::setDispositionParm (const QCString& aLabel, const QString& aValue)
+mimeHeader::setDispositionParm (const TQCString& aLabel, const TQString& aValue)
{
setParameter (aLabel, aValue, &dispositionList);
return;
}
void
-mimeHeader::setTypeParm (const QCString& aLabel, const QString& aValue)
+mimeHeader::setTypeParm (const TQCString& aLabel, const TQString& aValue)
{
setParameter (aLabel, aValue, &typeList);
}
-QDictIterator < QString > mimeHeader::getDispositionIterator ()
+TQDictIterator < TQString > mimeHeader::getDispositionIterator ()
{
- return QDictIterator < QString > (dispositionList);
+ return TQDictIterator < TQString > (dispositionList);
}
-QDictIterator < QString > mimeHeader::getTypeIterator ()
+TQDictIterator < TQString > mimeHeader::getTypeIterator ()
{
- return QDictIterator < QString > (typeList);
+ return TQDictIterator < TQString > (typeList);
}
-QPtrListIterator < mimeHdrLine > mimeHeader::getOriginalIterator ()
+TQPtrListIterator < mimeHdrLine > mimeHeader::getOriginalIterator ()
{
- return QPtrListIterator < mimeHdrLine > (originalHdrLines);
+ return TQPtrListIterator < mimeHdrLine > (originalHdrLines);
}
-QPtrListIterator < mimeHdrLine > mimeHeader::getAdditionalIterator ()
+TQPtrListIterator < mimeHdrLine > mimeHeader::getAdditionalIterator ()
{
- return QPtrListIterator < mimeHdrLine > (additionalHdrLines);
+ return TQPtrListIterator < mimeHdrLine > (additionalHdrLines);
}
void
@@ -230,41 +230,41 @@ mimeHeader::outputHeader (mimeIO & useIO)
{
if (!getDisposition ().isEmpty ())
{
- useIO.outputMimeLine (QCString ("Content-Disposition: ")
+ useIO.outputMimeLine (TQCString ("Content-Disposition: ")
+ getDisposition ()
+ outputParameter (&dispositionList));
}
if (!getType ().isEmpty ())
{
- useIO.outputMimeLine (QCString ("Content-Type: ")
+ useIO.outputMimeLine (TQCString ("Content-Type: ")
+ getType () + outputParameter (&typeList));
}
if (!getDescription ().isEmpty ())
- useIO.outputMimeLine (QCString ("Content-Description: ") +
+ useIO.outputMimeLine (TQCString ("Content-Description: ") +
getDescription ());
if (!getID ().isEmpty ())
- useIO.outputMimeLine (QCString ("Content-ID: ") + getID ());
+ useIO.outputMimeLine (TQCString ("Content-ID: ") + getID ());
if (!getMD5 ().isEmpty ())
- useIO.outputMimeLine (QCString ("Content-MD5: ") + getMD5 ());
+ useIO.outputMimeLine (TQCString ("Content-MD5: ") + getMD5 ());
if (!getEncoding ().isEmpty ())
- useIO.outputMimeLine (QCString ("Content-Transfer-Encoding: ") +
+ useIO.outputMimeLine (TQCString ("Content-Transfer-Encoding: ") +
getEncoding ());
- QPtrListIterator < mimeHdrLine > ait = getAdditionalIterator ();
+ TQPtrListIterator < mimeHdrLine > ait = getAdditionalIterator ();
while (ait.current ())
{
useIO.outputMimeLine (ait.current ()->getLabel () + ": " +
ait.current ()->getValue ());
++ait;
}
- useIO.outputMimeLine (QCString (""));
+ useIO.outputMimeLine (TQCString (""));
}
QString
-mimeHeader::getParameter (const QCString& aStr, QDict < QString > *aDict)
+mimeHeader::getParameter (const TQCString& aStr, TQDict < TQString > *aDict)
{
- QString retVal, *found;
+ TQString retVal, *found;
if (aDict)
{
//see if it is a normal parameter
@@ -276,12 +276,12 @@ mimeHeader::getParameter (const QCString& aStr, QDict < QString > *aDict)
if (!found)
{
//continuated parameter
- QString decoded, encoded;
+ TQString decoded, encoded;
int part = 0;
do
{
- QCString search;
+ TQCString search;
search.setNum (part);
search = aStr + "*" + search;
found = aDict->find (search);
@@ -305,7 +305,7 @@ mimeHeader::getParameter (const QCString& aStr, QDict < QString > *aDict)
else
{
retVal =
- rfcDecoder::decodeRFC2231String (QCString ("''") +
+ rfcDecoder::decodeRFC2231String (TQCString ("''") +
encoded.local8Bit ());
}
}
@@ -324,12 +324,12 @@ mimeHeader::getParameter (const QCString& aStr, QDict < QString > *aDict)
}
void
-mimeHeader::setParameter (const QCString& aLabel, const QString& aValue,
- QDict < QString > *aDict)
+mimeHeader::setParameter (const TQCString& aLabel, const TQString& aValue,
+ TQDict < TQString > *aDict)
{
bool encoded = true;
uint vlen, llen;
- QString val = aValue;
+ TQString val = aValue;
if (aDict)
{
@@ -350,8 +350,8 @@ mimeHeader::setParameter (const QCString& aLabel, const QString& aValue,
// by 1 or 2 in order to prevent an encoded character from being
// split in half
int i = 0;
- QString shortValue;
- QCString shortLabel;
+ TQString shortValue;
+ TQCString shortLabel;
while (!val.isEmpty ())
{
@@ -391,24 +391,24 @@ mimeHeader::setParameter (const QCString& aLabel, const QString& aValue,
//kdDebug(7116) << "mimeHeader::setParameter() - shortLabel = '" << shortLabel << "'" << endl;
//kdDebug(7116) << "mimeHeader::setParameter() - shortValue = '" << shortValue << "'" << endl;
//kdDebug(7116) << "mimeHeader::setParameter() - val = '" << val << "'" << endl;
- aDict->insert (shortLabel, new QString (shortValue));
+ aDict->insert (shortLabel, new TQString (shortValue));
i++;
}
}
else
{
- aDict->insert (aLabel, new QString (val));
+ aDict->insert (aLabel, new TQString (val));
}
}
}
QCString
-mimeHeader::outputParameter (QDict < QString > *aDict)
+mimeHeader::outputParameter (TQDict < TQString > *aDict)
{
- QCString retVal;
+ TQCString retVal;
if (aDict)
{
- QDictIterator < QString > it (*aDict);
+ TQDictIterator < TQString > it (*aDict);
while (it.current ())
{
retVal += (";\n\t" + it.currentKey () + "=").latin1 ();
@@ -431,8 +431,8 @@ mimeHeader::outputParameter (QDict < QString > *aDict)
void
mimeHeader::outputPart (mimeIO & useIO)
{
- QPtrListIterator < mimeHeader > nestedParts = getNestedIterator ();
- QCString boundary;
+ TQPtrListIterator < mimeHeader > nestedParts = getNestedIterator ();
+ TQCString boundary;
if (!getTypeParm ("boundary").isEmpty ())
boundary = getTypeParm ("boundary").latin1 ();
@@ -455,11 +455,11 @@ mimeHeader::outputPart (mimeIO & useIO)
}
int
-mimeHeader::parsePart (mimeIO & useIO, const QString& boundary)
+mimeHeader::parsePart (mimeIO & useIO, const TQString& boundary)
{
int retVal = 0;
bool mbox = false;
- QCString preNested, postNested;
+ TQCString preNested, postNested;
mbox = parseHeader (useIO);
kdDebug(7116) << "mimeHeader::parsePart - parsing part '" << getType () << "'" << endl;
@@ -496,19 +496,19 @@ mimeHeader::parsePart (mimeIO & useIO, const QString& boundary)
}
int
-mimeHeader::parseBody (mimeIO & useIO, QCString & messageBody,
- const QString& boundary, bool mbox)
+mimeHeader::parseBody (mimeIO & useIO, TQCString & messageBody,
+ const TQString& boundary, bool mbox)
{
- QCString inputStr;
- QCString buffer;
- QString partBoundary;
- QString partEnd;
+ TQCString inputStr;
+ TQCString buffer;
+ TQString partBoundary;
+ TQString partEnd;
int retVal = 0; //default is last part
if (!boundary.isEmpty ())
{
- partBoundary = QString ("--") + boundary;
- partEnd = QString ("--") + boundary + "--";
+ partBoundary = TQString ("--") + boundary;
+ partEnd = TQString ("--") + boundary + "--";
}
while (useIO.inputLine (inputStr))
@@ -550,7 +550,7 @@ mimeHeader::parseHeader (mimeIO & useIO)
bool mbox = false;
bool first = true;
mimeHdrLine my_line;
- QCString inputStr;
+ TQCString inputStr;
kdDebug(7116) << "mimeHeader::parseHeader - starting parsing" << endl;
while (useIO.inputLine (inputStr))
@@ -581,13 +581,13 @@ mimeHeader::parseHeader (mimeIO & useIO)
}
mimeHeader *
-mimeHeader::bodyPart (const QString & _str)
+mimeHeader::bodyPart (const TQString & _str)
{
// see if it is nested a little deeper
int pt = _str.find('.');
if (pt != -1)
{
- QString tempStr = _str;
+ TQString tempStr = _str;
mimeHeader *tempPart;
tempStr = _str.right (_str.length () - pt - 1);
@@ -617,12 +617,12 @@ mimeHeader::bodyPart (const QString & _str)
return nestedParts.at (_str.toULong () - 1);
}
-void mimeHeader::serialize(QDataStream& stream)
+void mimeHeader::serialize(TQDataStream& stream)
{
int nestedcount = nestedParts.count();
if (nestedParts.isEmpty() && nestedMessage)
nestedcount = 1;
- stream << nestedcount << contentType << QString (getTypeParm ("name")) << _contentDescription
+ stream << nestedcount << contentType << TQString (getTypeParm ("name")) << _contentDescription
<< _contentDisposition << contentEncoding << contentLength << partSpecifier;
// serialize nested message
if (nestedMessage)
@@ -631,7 +631,7 @@ void mimeHeader::serialize(QDataStream& stream)
// serialize nested parts
if (!nestedParts.isEmpty())
{
- QPtrListIterator < mimeHeader > it(nestedParts);
+ TQPtrListIterator < mimeHeader > it(nestedParts);
mimeHeader* part;
while ( (part = it.current()) != 0 )
{
@@ -647,16 +647,16 @@ QString
mimeHeader::bodyDecoded ()
{
kdDebug(7116) << "mimeHeader::bodyDecoded" << endl;
- QByteArray temp;
+ TQByteArray temp;
temp = bodyDecodedBinary ();
- return QString::fromLatin1 (temp.data (), temp.count ());
+ return TQString::fromLatin1 (temp.data (), temp.count ());
}
QByteArray
mimeHeader::bodyDecodedBinary ()
{
- QByteArray retVal;
+ TQByteArray retVal;
if (contentEncoding.find ("quoted-printable", 0, false) == 0)
retVal = KCodecs::quotedPrintableDecode(postMultipartBody);
@@ -669,15 +669,15 @@ mimeHeader::bodyDecodedBinary ()
}
void
-mimeHeader::setBodyEncodedBinary (const QByteArray & _arr)
+mimeHeader::setBodyEncodedBinary (const TQByteArray & _arr)
{
setBodyEncoded (_arr);
}
void
-mimeHeader::setBodyEncoded (const QByteArray & _arr)
+mimeHeader::setBodyEncoded (const TQByteArray & _arr)
{
- QByteArray setVal;
+ TQByteArray setVal;
kdDebug(7116) << "mimeHeader::setBodyEncoded - in size " << _arr.size () << endl;
if (contentEncoding.find ("quoted-printable", 0, false) == 0)
@@ -695,11 +695,11 @@ mimeHeader::setBodyEncoded (const QByteArray & _arr)
QString
mimeHeader::iconName ()
{
- QString fileName;
+ TQString fileName;
// FIXME: bug? Why throw away this data?
fileName =
- KMimeType::mimeType (contentType.lower ())->icon (QString::null, false);
+ KMimeType::mimeType (contentType.lower ())->icon (TQString::null, false);
fileName =
KGlobal::instance ()->iconLoader ()->iconPath (fileName, KIcon::Desktop);
// if (fileName.isEmpty())
@@ -726,8 +726,8 @@ mimeHeader::headerAsString ()
QString
mimeHeader::magicSetType (bool aAutoDecode)
{
- QString mimetype;
- QByteArray body;
+ TQString mimetype;
+ TQByteArray body;
KMimeMagicResult *result;
KMimeMagic::self ()->setFollowLinks (TRUE); // is it necessary ?
diff --git a/kioslaves/imap4/mimeheader.h b/kioslaves/imap4/mimeheader.h
index a56ec6cb8..0eb46630b 100644
--- a/kioslaves/imap4/mimeheader.h
+++ b/kioslaves/imap4/mimeheader.h
@@ -18,8 +18,8 @@
#ifndef MIMEHEADER_H
#define MIMEHEADER_H
-#include <qptrlist.h>
-#include <qdict.h>
+#include <tqptrlist.h>
+#include <tqdict.h>
#include "mimehdrline.h"
#include "mimeio.h"
@@ -40,75 +40,75 @@ public:
virtual void outputPart (mimeIO &);
- QCString outputParameter (QDict < QString > *);
+ TQCString outputParameter (TQDict < TQString > *);
- int parsePart (mimeIO &, const QString&);
- int parseBody (mimeIO &, QCString &, const QString&, bool mbox = false);
+ int parsePart (mimeIO &, const TQString&);
+ int parseBody (mimeIO &, TQCString &, const TQString&, bool mbox = false);
// parse a header. returns true if it had a leading 'From ' line
bool parseHeader (mimeIO &);
- QString getDispositionParm (const QCString&);
- void setDispositionParm (const QCString&, const QString&);
- QDictIterator < QString > getDispositionIterator ();
+ TQString getDispositionParm (const TQCString&);
+ void setDispositionParm (const TQCString&, const TQString&);
+ TQDictIterator < TQString > getDispositionIterator ();
- QString getTypeParm (const QCString&);
- void setTypeParm (const QCString&, const QString&);
- QDictIterator < QString > getTypeIterator ();
+ TQString getTypeParm (const TQCString&);
+ void setTypeParm (const TQCString&, const TQString&);
+ TQDictIterator < TQString > getTypeIterator ();
// recursively serialize all important contents to the QDataStream
- void serialize(QDataStream& stream);
+ void serialize(TQDataStream& stream);
- const QCString& getType ()
+ const TQCString& getType ()
{
return contentType;
}
- void setType (const QCString & _str)
+ void setType (const TQCString & _str)
{
contentType = _str;
}
- const QCString& getDescription ()
+ const TQCString& getDescription ()
{
return _contentDescription;
}
- void setDescription (const QCString & _str)
+ void setDescription (const TQCString & _str)
{
_contentDescription = _str;
}
- QCString getDisposition ()
+ TQCString getDisposition ()
{
return _contentDisposition;
}
- void setDisposition (const QCString & _str)
+ void setDisposition (const TQCString & _str)
{
_contentDisposition = _str;
}
- QCString getEncoding ()
+ TQCString getEncoding ()
{
return contentEncoding;
}
- void setEncoding (const QCString & _str)
+ void setEncoding (const TQCString & _str)
{
contentEncoding = _str;
}
- QCString getMD5 ()
+ TQCString getMD5 ()
{
return contentMD5;
}
- void setMD5 (const QCString & _str)
+ void setMD5 (const TQCString & _str)
{
contentMD5 = _str;
}
- QCString getID ()
+ TQCString getID ()
{
return contentID;
}
- void setID (const QCString & _str)
+ void setID (const TQCString & _str)
{
contentID = _str;
}
@@ -122,44 +122,44 @@ public:
contentLength = _len;
}
- const QString & getPartSpecifier ()
+ const TQString & getPartSpecifier ()
{
return partSpecifier;
}
- void setPartSpecifier (const QString & _str)
+ void setPartSpecifier (const TQString & _str)
{
partSpecifier = _str;
}
- QPtrListIterator < mimeHdrLine > getOriginalIterator ();
- QPtrListIterator < mimeHdrLine > getAdditionalIterator ();
- void setContent (const QCString &aContent)
+ TQPtrListIterator < mimeHdrLine > getOriginalIterator ();
+ TQPtrListIterator < mimeHdrLine > getAdditionalIterator ();
+ void setContent (const TQCString &aContent)
{
mimeContent = aContent;
}
- QCString getContent ()
+ TQCString getContent ()
{
return mimeContent;
}
- QCString getBody ()
+ TQCString getBody ()
{
return preMultipartBody + postMultipartBody;
}
- QCString getPreBody ()
+ TQCString getPreBody ()
{
return preMultipartBody;
}
- void setPreBody (QCString & inBody)
+ void setPreBody (TQCString & inBody)
{
preMultipartBody = inBody;
}
- QCString getPostBody ()
+ TQCString getPostBody ()
{
return postMultipartBody;
}
- void setPostBody (QCString & inBody)
+ void setPostBody (TQCString & inBody)
{
postMultipartBody = inBody;
contentLength = inBody.length ();
@@ -181,9 +181,9 @@ public:
{
nestedParts.append (inPart);
}
- QPtrListIterator < mimeHeader > getNestedIterator ()
+ TQPtrListIterator < mimeHeader > getNestedIterator ()
{
- return QPtrListIterator < mimeHeader > (nestedParts);
+ return TQPtrListIterator < mimeHeader > (nestedParts);
}
// clears all parts and deletes them from memory
@@ -205,7 +205,7 @@ public:
}
// return the specified body part or NULL
- mimeHeader *bodyPart (const QString &);
+ mimeHeader *bodyPart (const TQString &);
#ifdef KMAIL_COMPATIBLE
ulong msgSize ()
@@ -222,115 +222,115 @@ public:
(*ret) = nestedParts.at (which);
return nestedParts.at (which);
}
- void write (const QString &)
+ void write (const TQString &)
{
}
- QString typeStr ()
+ TQString typeStr ()
{
- return QString (contentType.left (contentType.find ('/')));
+ return TQString (contentType.left (contentType.find ('/')));
}
- void setTypeStr (const QString & _str)
+ void setTypeStr (const TQString & _str)
{
- contentType = QCString (_str.latin1 ()) + "/" + subtypeStr ().latin1 ();
+ contentType = TQCString (_str.latin1 ()) + "/" + subtypeStr ().latin1 ();
}
- QString subtypeStr ()
+ TQString subtypeStr ()
{
- return QString (contentType.
+ return TQString (contentType.
right (contentType.length () - contentType.find ('/') -
1));
}
- void setSubtypeStr (const QString & _str)
+ void setSubtypeStr (const TQString & _str)
{
- contentType = QCString (typeStr ().latin1 ()) + "/" + _str.latin1 ();
+ contentType = TQCString (typeStr ().latin1 ()) + "/" + _str.latin1 ();
}
- QString cteStr ()
+ TQString cteStr ()
{
- return QString (getEncoding ());
+ return TQString (getEncoding ());
}
- void setCteStr (const QString & _str)
+ void setCteStr (const TQString & _str)
{
setEncoding (_str.latin1 ());
}
- QString contentDisposition ()
+ TQString contentDisposition ()
{
- return QString (_contentDisposition);
+ return TQString (_contentDisposition);
}
- QString body ()
+ TQString body ()
{
- return QString (postMultipartBody);
+ return TQString (postMultipartBody);
}
- QString charset ()
+ TQString charset ()
{
return getTypeParm ("charset");
}
- QString bodyDecoded ();
- void setBodyEncoded (const QByteArray &);
- void setBodyEncodedBinary (const QByteArray &);
- QByteArray bodyDecodedBinary ();
- QString name ()
+ TQString bodyDecoded ();
+ void setBodyEncoded (const TQByteArray &);
+ void setBodyEncodedBinary (const TQByteArray &);
+ TQByteArray bodyDecodedBinary ();
+ TQString name ()
{
- return QString (getTypeParm ("name"));
+ return TQString (getTypeParm ("name"));
}
- void setName (const QString & _str)
+ void setName (const TQString & _str)
{
setTypeParm ("name", _str);
}
- QString fileName ()
+ TQString fileName ()
{
- return QString (getDispositionParm ("filename"));
+ return TQString (getDispositionParm ("filename"));
}
- QString contentDescription ()
+ TQString contentDescription ()
{
- return QString (rfcDecoder::decodeRFC2047String (_contentDescription));
+ return TQString (rfcDecoder::decodeRFC2047String (_contentDescription));
}
- void setContentDescription (const QString & _str)
+ void setContentDescription (const TQString & _str)
{
_contentDescription = rfcDecoder::encodeRFC2047String (_str).latin1 ();
}
- QString msgIdMD5 ()
+ TQString msgIdMD5 ()
{
- return QString (contentMD5);
+ return TQString (contentMD5);
}
- QString iconName ();
- QString magicSetType (bool aAutoDecode = true);
- QString headerAsString ();
+ TQString iconName ();
+ TQString magicSetType (bool aAutoDecode = true);
+ TQString headerAsString ();
ulong size ()
{
return 0;
}
- void fromString (const QByteArray &)
+ void fromString (const TQByteArray &)
{;
}
- void setContentDisposition (const QString & _str)
+ void setContentDisposition (const TQString & _str)
{
setDisposition (_str.latin1 ());
}
#endif
protected:
- static void addParameter (const QCString&, QDict < QString > *);
- static QString getParameter (const QCString&, QDict < QString > *);
- static void setParameter (const QCString&, const QString&, QDict < QString > *);
+ static void addParameter (const TQCString&, TQDict < TQString > *);
+ static TQString getParameter (const TQCString&, TQDict < TQString > *);
+ static void setParameter (const TQCString&, const TQString&, TQDict < TQString > *);
- QPtrList < mimeHdrLine > originalHdrLines;
+ TQPtrList < mimeHdrLine > originalHdrLines;
private:
- QPtrList < mimeHdrLine > additionalHdrLines;
- QDict < QString > typeList;
- QDict < QString > dispositionList;
- QCString contentType;
- QCString _contentDisposition;
- QCString contentEncoding;
- QCString _contentDescription;
- QCString contentID;
- QCString contentMD5;
+ TQPtrList < mimeHdrLine > additionalHdrLines;
+ TQDict < TQString > typeList;
+ TQDict < TQString > dispositionList;
+ TQCString contentType;
+ TQCString _contentDisposition;
+ TQCString contentEncoding;
+ TQCString _contentDescription;
+ TQCString contentID;
+ TQCString contentMD5;
unsigned long contentLength;
- QCString mimeContent;
- QCString preMultipartBody;
- QCString postMultipartBody;
+ TQCString mimeContent;
+ TQCString preMultipartBody;
+ TQCString postMultipartBody;
mimeHeader *nestedMessage;
- QPtrList < mimeHeader > nestedParts;
- QString partSpecifier;
+ TQPtrList < mimeHeader > nestedParts;
+ TQString partSpecifier;
};
diff --git a/kioslaves/imap4/mimeio.cc b/kioslaves/imap4/mimeio.cc
index 7a41c843a..5adf28f98 100644
--- a/kioslaves/imap4/mimeio.cc
+++ b/kioslaves/imap4/mimeio.cc
@@ -31,7 +31,7 @@ mimeIO::~mimeIO ()
}
int
-mimeIO::inputLine (QCString & aLine)
+mimeIO::inputLine (TQCString & aLine)
{
char input;
@@ -47,7 +47,7 @@ mimeIO::inputLine (QCString & aLine)
}
int
-mimeIO::outputLine (const QCString & aLine, int len)
+mimeIO::outputLine (const TQCString & aLine, int len)
{
int i;
@@ -62,10 +62,10 @@ mimeIO::outputLine (const QCString & aLine, int len)
}
int
-mimeIO::outputMimeLine (const QCString & inLine)
+mimeIO::outputMimeLine (const TQCString & inLine)
{
int retVal = 0;
- QCString aLine = inLine;
+ TQCString aLine = inLine;
int len = inLine.length();
int theLF = aLine.findRev ('\n');
@@ -127,7 +127,7 @@ mimeIO::setCRLF (const char *aCRLF)
crlfLen = strlen(aCRLF);
}
-mimeIOQFile::mimeIOQFile (const QString & aName):
+mimeIOQFile::mimeIOQFile (const TQString & aName):
mimeIO (),
myFile (aName)
{
@@ -140,13 +140,13 @@ mimeIOQFile::~mimeIOQFile ()
}
int
-mimeIOQFile::outputLine (const QCString &, int)
+mimeIOQFile::outputLine (const TQCString &, int)
{
return 0;
}
int
-mimeIOQFile::inputLine (QCString & data)
+mimeIOQFile::inputLine (TQCString & data)
{
data.resize( 1024 );
myFile.readLine (data.data(), 1024);
@@ -163,7 +163,7 @@ mimeIOQString::~mimeIOQString ()
}
int
-mimeIOQString::outputLine (const QCString & _str, int len)
+mimeIOQString::outputLine (const TQCString & _str, int len)
{
if (len == -1) {
len = _str.length();
@@ -173,7 +173,7 @@ mimeIOQString::outputLine (const QCString & _str, int len)
}
int
-mimeIOQString::inputLine (QCString & _str)
+mimeIOQString::inputLine (TQCString & _str)
{
if (theString.isEmpty ())
return 0;
diff --git a/kioslaves/imap4/mimeio.h b/kioslaves/imap4/mimeio.h
index 0de2fbd4d..e14861a8b 100644
--- a/kioslaves/imap4/mimeio.h
+++ b/kioslaves/imap4/mimeio.h
@@ -18,8 +18,8 @@
#ifndef MIMEIO_H
#define MIMEIO_H
-#include <qcstring.h>
-#include <qfile.h>
+#include <tqcstring.h>
+#include <tqfile.h>
/**
*@author Sven Carstens
@@ -31,29 +31,29 @@ public:
mimeIO ();
virtual ~ mimeIO ();
- virtual int outputLine (const QCString &, int len = -1);
- virtual int outputMimeLine (const QCString &);
- virtual int inputLine (QCString &);
+ virtual int outputLine (const TQCString &, int len = -1);
+ virtual int outputMimeLine (const TQCString &);
+ virtual int inputLine (TQCString &);
virtual int outputChar (char);
virtual int inputChar (char &);
void setCRLF (const char *);
protected:
- QCString theCRLF;
+ TQCString theCRLF;
int crlfLen;
};
class mimeIOQFile:public mimeIO
{
public:
- mimeIOQFile (const QString &);
+ mimeIOQFile (const TQString &);
virtual ~ mimeIOQFile ();
- virtual int outputLine (const QCString &, int len = -1);
- virtual int inputLine (QCString &);
+ virtual int outputLine (const TQCString &, int len = -1);
+ virtual int inputLine (TQCString &);
protected:
- QFile myFile;
+ TQFile myFile;
};
class mimeIOQString:public mimeIO
@@ -61,19 +61,19 @@ class mimeIOQString:public mimeIO
public:
mimeIOQString ();
virtual ~ mimeIOQString ();
- virtual int outputLine (const QCString &, int len = -1);
- virtual int inputLine (QCString &);
- const QString& getString () const
+ virtual int outputLine (const TQCString &, int len = -1);
+ virtual int inputLine (TQCString &);
+ const TQString& getString () const
{
return theString;
}
- void setString (const QString & _str)
+ void setString (const TQString & _str)
{
theString = _str;
}
protected:
- QString theString;
+ TQString theString;
};
#endif
diff --git a/kioslaves/imap4/rfcdecoder.cc b/kioslaves/imap4/rfcdecoder.cc
index 0e2bc9f73..0aa237d6b 100644
--- a/kioslaves/imap4/rfcdecoder.cc
+++ b/kioslaves/imap4/rfcdecoder.cc
@@ -28,9 +28,9 @@
#include <stdio.h>
#include <stdlib.h>
-#include <qtextcodec.h>
-#include <qbuffer.h>
-#include <qregexp.h>
+#include <tqtextcodec.h>
+#include <tqbuffer.h>
+#include <tqregexp.h>
#include <kmdcodec.h>
// This part taken from rfc 2192 IMAP URL Scheme. C. Newman. September 1997.
@@ -52,14 +52,14 @@ static unsigned char base64chars[] =
/* Convert an IMAP mailbox to a Unicode path
*/
-QString rfcDecoder::fromIMAP (const QString & inSrc)
+TQString rfcDecoder::fromIMAP (const TQString & inSrc)
{
unsigned char c, i, bitcount;
unsigned long ucs4, utf16, bitbuf;
unsigned char base64[256], utf8[6];
unsigned long srcPtr = 0;
- QCString dst;
- QCString src = inSrc.ascii ();
+ TQCString dst;
+ TQCString src = inSrc.ascii ();
uint srcLen = inSrc.length();
/* initialize modified base64 decoding table */
@@ -151,14 +151,14 @@ QString rfcDecoder::fromIMAP (const QString & inSrc)
++srcPtr;
}
}
- return QString::fromUtf8 (dst.data ());
+ return TQString::fromUtf8 (dst.data ());
}
/* replace " with \" and \ with \\ " and \ characters */
-QString rfcDecoder::quoteIMAP(const QString &src)
+TQString rfcDecoder::quoteIMAP(const TQString &src)
{
uint len = src.length();
- QString result;
+ TQString result;
result.reserve(2 * len);
for (unsigned int i = 0; i < len; i++)
{
@@ -172,12 +172,12 @@ QString rfcDecoder::quoteIMAP(const QString &src)
/* Convert Unicode path to modified UTF-7 IMAP mailbox
*/
-QString rfcDecoder::toIMAP (const QString & inSrc)
+TQString rfcDecoder::toIMAP (const TQString & inSrc)
{
unsigned int utf8pos, utf8total, c, utf7mode, bitstogo, utf16flag;
unsigned long ucs4, bitbuf;
- QCString src = inSrc.utf8 ();
- QString dst;
+ TQCString src = inSrc.utf8 ();
+ TQString dst;
ulong srcPtr = 0;
utf7mode = 0;
@@ -292,9 +292,9 @@ QString rfcDecoder::toIMAP (const QString & inSrc)
}
//-----------------------------------------------------------------------------
-QString rfcDecoder::decodeQuoting(const QString &aStr)
+TQString rfcDecoder::decodeQuoting(const TQString &aStr)
{
- QString result;
+ TQString result;
unsigned int strLength(aStr.length());
for (unsigned int i = 0; i < strLength ; i++)
{
@@ -305,46 +305,46 @@ QString rfcDecoder::decodeQuoting(const QString &aStr)
}
//-----------------------------------------------------------------------------
-QTextCodec *
-rfcDecoder::codecForName (const QString & _str)
+TQTextCodec *
+rfcDecoder::codecForName (const TQString & _str)
{
if (_str.isEmpty ())
return NULL;
- return QTextCodec::codecForName (_str.lower ().
+ return TQTextCodec::codecForName (_str.lower ().
replace ("windows", "cp").latin1 ());
}
//-----------------------------------------------------------------------------
const QString
-rfcDecoder::decodeRFC2047String (const QString & _str)
+rfcDecoder::decodeRFC2047String (const TQString & _str)
{
- QString throw_away;
+ TQString throw_away;
return decodeRFC2047String (_str, throw_away);
}
//-----------------------------------------------------------------------------
const QString
-rfcDecoder::decodeRFC2047String (const QString & _str, QString & charset)
+rfcDecoder::decodeRFC2047String (const TQString & _str, TQString & charset)
{
- QString throw_away;
+ TQString throw_away;
return decodeRFC2047String (_str, charset, throw_away);
}
//-----------------------------------------------------------------------------
const QString
-rfcDecoder::decodeRFC2047String (const QString & _str, QString & charset,
- QString & language)
+rfcDecoder::decodeRFC2047String (const TQString & _str, TQString & charset,
+ TQString & language)
{
//do we have a rfc string
if (_str.find("=?") < 0)
return _str;
- QCString aStr = _str.ascii (); // QString.length() means Unicode chars
- QCString result;
+ TQCString aStr = _str.ascii (); // TQString.length() means Unicode chars
+ TQCString result;
char *pos, *beg, *end, *mid = NULL;
- QCString str;
+ TQCString str;
char encoding = 0, ch;
bool valid;
const int maxLen = 200;
@@ -370,7 +370,7 @@ rfcDecoder::decodeRFC2047String (const QString & _str, QString & charset,
valid = FALSE;
else
{
- charset = QCString (beg, i - 1); // -2 + 1 for the zero
+ charset = TQCString (beg, i - 1); // -2 + 1 for the zero
int pt = charset.findRev('*');
if (pt != -1)
{
@@ -407,7 +407,7 @@ rfcDecoder::decodeRFC2047String (const QString & _str, QString & charset,
{
ch = *pos;
*pos = '\0';
- str = QCString (mid).left ((int) (mid - pos - 1));
+ str = TQCString (mid).left ((int) (mid - pos - 1));
if (encoding == 'Q')
{
// decode quoted printable text
@@ -427,7 +427,7 @@ rfcDecoder::decodeRFC2047String (const QString & _str, QString & charset,
*pos = ch;
int len = str.length();
for (i = 0; i < len; i++)
- result += (char) (QChar) str[i];
+ result += (char) (TQChar) str[i];
pos = end - 1;
}
@@ -443,7 +443,7 @@ rfcDecoder::decodeRFC2047String (const QString & _str, QString & charset,
}
if (!charset.isEmpty ())
{
- QTextCodec *aCodec = codecForName (charset.ascii ());
+ TQTextCodec *aCodec = codecForName (charset.ascii ());
if (aCodec)
{
// kdDebug(7116) << "Codec is " << aCodec->name() << endl;
@@ -458,7 +458,7 @@ rfcDecoder::decodeRFC2047String (const QString & _str, QString & charset,
const char especials[17] = "()<>@,;:\"/[]?.= ";
const QString
-rfcDecoder::encodeRFC2047String (const QString & _str)
+rfcDecoder::encodeRFC2047String (const TQString & _str)
{
if (_str.isEmpty ())
return _str;
@@ -468,7 +468,7 @@ rfcDecoder::encodeRFC2047String (const QString & _str)
int rptr = 0;
// My stats show this number results in 12 resize() out of 73,000
int resultLen = 3 * _str.length() / 2;
- QCString result(resultLen);
+ TQCString result(resultLen);
while (*latin)
{
@@ -572,7 +572,7 @@ rfcDecoder::encodeRFC2047String (const QString & _str)
//-----------------------------------------------------------------------------
const QString
-rfcDecoder::encodeRFC2231String (const QString & _str)
+rfcDecoder::encodeRFC2231String (const TQString & _str)
{
if (_str.isEmpty ())
return _str;
@@ -593,7 +593,7 @@ rfcDecoder::encodeRFC2231String (const QString & _str)
free(latin);
return _str.ascii ();
}
- QCString result;
+ TQCString result;
l = latin;
while (*l)
{
@@ -626,7 +626,7 @@ rfcDecoder::encodeRFC2231String (const QString & _str)
//-----------------------------------------------------------------------------
const QString
-rfcDecoder::decodeRFC2231String (const QString & _str)
+rfcDecoder::decodeRFC2231String (const TQString & _str)
{
int p = _str.find ('\'');
@@ -641,9 +641,9 @@ rfcDecoder::decodeRFC2231String (const QString & _str)
return _str;
//first is charset or empty
- QString charset = _str.left (p);
- QString st = _str.mid (l + 1);
- QString language = _str.mid (p + 1, l - p - 1);
+ TQString charset = _str.left (p);
+ TQString st = _str.mid (l + 1);
+ TQString language = _str.mid (p + 1, l - p - 1);
//kdDebug(7116) << "Charset: " << charset << " Language: " << language << endl;
diff --git a/kioslaves/imap4/rfcdecoder.h b/kioslaves/imap4/rfcdecoder.h
index 1df5c0dae..98a34dc7e 100644
--- a/kioslaves/imap4/rfcdecoder.h
+++ b/kioslaves/imap4/rfcdecoder.h
@@ -23,7 +23,7 @@
*
*********************************************************************/
-#include <qstring.h>
+#include <tqstring.h>
class QTextCodec;
@@ -40,50 +40,50 @@ public:
/** Convert an IMAP mailbox to a Unicode path
*/
- static QString fromIMAP (const QString & src);
+ static TQString fromIMAP (const TQString & src);
/** Convert Unicode path to modified UTF-7 IMAP mailbox
*/
- static QString toIMAP (const QString & inSrc);
+ static TQString toIMAP (const TQString & inSrc);
/** replace " with \" and \ with \\ " and \ characters */
- static QString quoteIMAP (const QString & src);
+ static TQString quoteIMAP (const TQString & src);
/** remove \ from a string
* @bug I'm pretty sure this doesn't do what the author meant it to do
*/
- static QString decodeQuoting(const QString &aStr);
+ static TQString decodeQuoting(const TQString &aStr);
/**
* fetch a codec by name
* @return Text Codec object
*/
- static QTextCodec *codecForName (const QString &);
+ static TQTextCodec *codecForName (const TQString &);
// decoder for RFC2047 and RFC1522
/** decode a RFC2047 String */
- static const QString decodeRFC2047String (const QString & _str,
- QString & charset,
- QString & language);
+ static const TQString decodeRFC2047String (const TQString & _str,
+ TQString & charset,
+ TQString & language);
/** decode a RFC2047 String */
- static const QString decodeRFC2047String (const QString & _str,
- QString & charset);
+ static const TQString decodeRFC2047String (const TQString & _str,
+ TQString & charset);
/** decode a RFC2047 String */
- static const QString decodeRFC2047String (const QString & _str);
+ static const TQString decodeRFC2047String (const TQString & _str);
// encoder for RFC2047 and RFC1522
/** encode a RFC2047 String */
- static const QString encodeRFC2047String (const QString & _str,
- QString & charset,
- QString & language);
+ static const TQString encodeRFC2047String (const TQString & _str,
+ TQString & charset,
+ TQString & language);
/** encode a RFC2047 String */
- static const QString encodeRFC2047String (const QString & _str,
- QString & charset);
+ static const TQString encodeRFC2047String (const TQString & _str,
+ TQString & charset);
/** encode a RFC2047 String */
- static const QString encodeRFC2047String (const QString & _str);
+ static const TQString encodeRFC2047String (const TQString & _str);
/** encode a RFC2231 String */
- static const QString encodeRFC2231String (const QString & _str);
+ static const TQString encodeRFC2231String (const TQString & _str);
/** decode a RFC2231 String */
- static const QString decodeRFC2231String (const QString & _str);
+ static const TQString decodeRFC2231String (const TQString & _str);
};
#endif
diff --git a/kioslaves/imap4/selectinfo.h b/kioslaves/imap4/selectinfo.h
index c059a952f..bf75a85b8 100644
--- a/kioslaves/imap4/selectinfo.h
+++ b/kioslaves/imap4/selectinfo.h
@@ -23,8 +23,8 @@
*
*********************************************************************/
-#include <qstringlist.h>
-#include <qstring.h>
+#include <tqstringlist.h>
+#include <tqstring.h>
//class handling the info we get on EXAMINE and SELECT
class imapInfo
@@ -32,11 +32,11 @@ class imapInfo
public:
imapInfo ();
- imapInfo (const QStringList &);
+ imapInfo (const TQStringList &);
imapInfo (const imapInfo &);
imapInfo & operator = (const imapInfo &);
- ulong _flags (const QString &) const;
+ ulong _flags (const TQString &) const;
void setCount (ulong l)
{
@@ -74,7 +74,7 @@ public:
flags_ = l;
}
- void setFlags (const QString & inFlag)
+ void setFlags (const TQString & inFlag)
{
flagsAvailable_ = true;
flags_ = _flags (inFlag);
@@ -86,7 +86,7 @@ public:
permanentFlags_ = l;
}
- void setPermanentFlags (const QString & inFlag)
+ void setPermanentFlags (const TQString & inFlag)
{
permanentFlagsAvailable_ = true;
permanentFlags_ = _flags (inFlag);
diff --git a/kioslaves/mbox/mbox.cc b/kioslaves/mbox/mbox.cc
index 8ad8d09ab..1828401b6 100644
--- a/kioslaves/mbox/mbox.cc
+++ b/kioslaves/mbox/mbox.cc
@@ -22,8 +22,8 @@
#include "stat.h"
#include "urlinfo.h"
-#include <qstring.h>
-#include <qcstring.h>
+#include <tqstring.h>
+#include <tqcstring.h>
#include <kdebug.h>
#include <klocale.h>
@@ -58,7 +58,7 @@ int kdemain( int argc, char * argv[] )
return 0;
}
-MBoxProtocol::MBoxProtocol( const QCString& arg1, const QCString& arg2 )
+MBoxProtocol::MBoxProtocol( const TQCString& arg1, const TQCString& arg2 )
: KIO::SlaveBase( "mbox2", arg1, arg2 ),
m_errorState( true )
{
@@ -74,8 +74,8 @@ void MBoxProtocol::get( const KURL& url )
m_errorState = false;
UrlInfo info( url, UrlInfo::message );
- QString line;
- QByteArray ba_line;
+ TQString line;
+ TQByteArray ba_line;
if( info.type() == UrlInfo::invalid && !m_errorState )
{
@@ -89,7 +89,7 @@ void MBoxProtocol::get( const KURL& url )
{
line = mbox.currentLine();
line += '\n';
- ba_line = QCString( line.utf8() );
+ ba_line = TQCString( line.utf8() );
ba_line.truncate( ba_line.size() - 1 ); //Removing training '\0'
data( ba_line );
mbox.nextLine();
@@ -97,7 +97,7 @@ void MBoxProtocol::get( const KURL& url )
if( !m_errorState )
{
- data( QByteArray() );
+ data( TQByteArray() );
finished();
}
}
@@ -160,7 +160,7 @@ void MBoxProtocol::mimetype( const KURL& url )
finished();
}
-void MBoxProtocol::emitError( int errno, const QString& arg )
+void MBoxProtocol::emitError( int errno, const TQString& arg )
{
m_errorState = true;
error( errno, arg );
diff --git a/kioslaves/mbox/mbox.h b/kioslaves/mbox/mbox.h
index 4d3768bd4..c8741bf2b 100644
--- a/kioslaves/mbox/mbox.h
+++ b/kioslaves/mbox/mbox.h
@@ -34,7 +34,7 @@ public:
/**
* Constructor, for the parameters, See KIO::SlaveBase
*/
- MBoxProtocol( const QCString&, const QCString& );
+ MBoxProtocol( const TQCString&, const TQCString& );
/**
* Empty destructor
*/
@@ -72,7 +72,7 @@ public:
* @param errno The error number to be thrown
* @param arg The argument of the error message of the error number.
*/
- void emitError( int errno, const QString& arg );
+ void emitError( int errno, const TQString& arg );
private:
bool m_errorState;
};
diff --git a/kioslaves/mbox/readmbox.cc b/kioslaves/mbox/readmbox.cc
index c7513c6eb..35b24db45 100644
--- a/kioslaves/mbox/readmbox.cc
+++ b/kioslaves/mbox/readmbox.cc
@@ -26,10 +26,10 @@
#include <kdebug.h>
#include <kio/global.h>
-#include <qfile.h>
-#include <qfileinfo.h>
-#include <qstring.h>
-#include <qtextstream.h>
+#include <tqfile.h>
+#include <tqfileinfo.h>
+#include <tqstring.h>
+#include <tqtextstream.h>
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
@@ -41,8 +41,8 @@ ReadMBox::ReadMBox( const UrlInfo* info, MBoxProtocol* parent, bool onlynew, boo
: MBoxFile( info, parent ),
m_file( 0 ),
m_stream( 0 ),
- m_current_line( new QString( QString::null ) ),
- m_current_id( new QString( QString::null ) ),
+ m_current_line( new TQString( TQString::null ) ),
+ m_current_id( new TQString( TQString::null ) ),
m_atend( true ),
m_prev_time( 0 ),
m_only_new( onlynew ),
@@ -69,12 +69,12 @@ ReadMBox::~ReadMBox()
close();
}
-QString ReadMBox::currentLine() const
+TQString ReadMBox::currentLine() const
{
return *m_current_line;
}
-QString ReadMBox::currentID() const
+TQString ReadMBox::currentID() const
{
return *m_current_id;
}
@@ -88,7 +88,7 @@ bool ReadMBox::nextLine()
m_atend = m_current_line->isNull();
if( m_atend ) // Cursor was at EOF
{
- *m_current_id = QString::null;
+ *m_current_id = TQString::null;
m_prev_status = m_status;
return true;
}
@@ -116,7 +116,7 @@ bool ReadMBox::nextLine()
return false;
}
-bool ReadMBox::searchMessage( const QString& id )
+bool ReadMBox::searchMessage( const TQString& id )
{
if( !m_stream )
return false;
@@ -166,7 +166,7 @@ bool ReadMBox::open( bool savetime )
{
if( savetime )
{
- QFileInfo info( m_info->filename() );
+ TQFileInfo info( m_info->filename() );
m_prev_time = new utimbuf;
m_prev_time->actime = info.lastRead().toTime_t();
@@ -176,14 +176,14 @@ bool ReadMBox::open( bool savetime )
if( m_file )
return false; //File already open
- m_file = new QFile( m_info->filename() );
+ m_file = new TQFile( m_info->filename() );
if( !m_file->open( IO_ReadOnly ) )
{
delete m_file;
m_file = 0;
return false;
}
- m_stream = new QTextStream( m_file );
+ m_stream = new TQTextStream( m_file );
skipMessage();
return true;
@@ -199,6 +199,6 @@ void ReadMBox::close()
delete m_file; m_file = 0;
if( m_prev_time )
- utime( QFile::encodeName( m_info->filename() ), m_prev_time );
+ utime( TQFile::encodeName( m_info->filename() ), m_prev_time );
}
diff --git a/kioslaves/mbox/readmbox.h b/kioslaves/mbox/readmbox.h
index 01b813df7..6fb7394cb 100644
--- a/kioslaves/mbox/readmbox.h
+++ b/kioslaves/mbox/readmbox.h
@@ -53,16 +53,16 @@ public:
/**
* This functions return the current line
- * @return The line last read, or QString::null if there wasn't such last line
+ * @return The line last read, or TQString::null if there wasn't such last line
*/
- QString currentLine() const;
+ TQString currentLine() const;
/**
* This function returns the current id. The id is the first line of an email,
* and is used in filenaming. The id normally starts with "From ".
- * @return The current ID, or QString::null if no id was found yet.
+ * @return The current ID, or TQString::null if no id was found yet.
*/
- QString currentID() const;
+ TQString currentID() const;
/**
* This function reads the next line. The next line can be read by the currentLine()
@@ -78,7 +78,7 @@ public:
* @param id The id of the message to be found.
* @return true if the message was found, false otherwise.
*/
- bool searchMessage( const QString& id );
+ bool searchMessage( const TQString& id );
/**
* Skips all lines which belongs to the current message. The cursor is on the first line
@@ -117,10 +117,10 @@ private:
void close();
private:
- QFile* m_file;
- QTextStream* m_stream;
- QString* m_current_line;
- QString* m_current_id;
+ TQFile* m_file;
+ TQTextStream* m_stream;
+ TQString* m_current_line;
+ TQString* m_current_id;
bool m_atend;
struct utimbuf* m_prev_time;
diff --git a/kioslaves/mbox/stat.cc b/kioslaves/mbox/stat.cc
index e3418cbbd..c34f0bceb 100644
--- a/kioslaves/mbox/stat.cc
+++ b/kioslaves/mbox/stat.cc
@@ -40,7 +40,7 @@ KIO::UDSEntry Stat::stat( ReadMBox& mbox, const UrlInfo& info )
{
kdDebug() << "Stat::stat()" << endl;
KIO::UDSEntry entry;
- QString url;
+ TQString url;
if( info.type() == UrlInfo::invalid )
return entry;
@@ -50,7 +50,7 @@ KIO::UDSEntry Stat::stat( ReadMBox& mbox, const UrlInfo& info )
Stat::addAtom( entry, KIO::UDS_FILE_TYPE, S_IFREG );
Stat::addAtom( entry, KIO::UDS_MIME_TYPE, "message/rfc822" );
- url = QString( "mbox:%1/%2" ).arg( info.filename(), mbox.currentID() );
+ url = TQString( "mbox:%1/%2" ).arg( info.filename(), mbox.currentID() );
Stat::addAtom( entry, KIO::UDS_URL, url );
if( mbox.currentID().isEmpty() )
Stat::addAtom( entry, KIO::UDS_NAME, "foobar" );
@@ -79,7 +79,7 @@ KIO::UDSEntry Stat::statMessage( const UrlInfo& info )
{
kdDebug() << "statMessage( " << info.url() << " )" << endl;
KIO::UDSEntry entry;
- QString url = QString( "mbox:%1" ).arg( info.url() );
+ TQString url = TQString( "mbox:%1" ).arg( info.url() );
//Specific things for a message
Stat::addAtom( entry, KIO::UDS_FILE_TYPE, S_IFREG );
@@ -92,7 +92,7 @@ KIO::UDSEntry Stat::statMessage( const UrlInfo& info )
return entry;
}
-void Stat::addAtom( KIO::UDSEntry& entry, unsigned int uds, const QString& str )
+void Stat::addAtom( KIO::UDSEntry& entry, unsigned int uds, const TQString& str )
{
KIO::UDSAtom atom;
atom.m_uds = uds;
@@ -107,7 +107,7 @@ void Stat::addAtom( KIO::UDSEntry& entry, unsigned int uds, long lng )
{
KIO::UDSAtom atom;
atom.m_uds = uds;
- atom.m_str = QString::null;
+ atom.m_str = TQString::null;
atom.m_long = lng;
entry.append( atom );
diff --git a/kioslaves/mbox/stat.h b/kioslaves/mbox/stat.h
index f26f4338d..c7474d82a 100644
--- a/kioslaves/mbox/stat.h
+++ b/kioslaves/mbox/stat.h
@@ -75,7 +75,7 @@ public:
*/
static KIO::UDSEntry statMessage( const UrlInfo& info );
private:
- static void addAtom( KIO::UDSEntry& entry, unsigned int key, const QString& value );
+ static void addAtom( KIO::UDSEntry& entry, unsigned int key, const TQString& value );
static void addAtom( KIO::UDSEntry& entry, unsigned int key, const long value );
};
diff --git a/kioslaves/mbox/urlinfo.cc b/kioslaves/mbox/urlinfo.cc
index 710dc6f0c..2153afb13 100644
--- a/kioslaves/mbox/urlinfo.cc
+++ b/kioslaves/mbox/urlinfo.cc
@@ -21,13 +21,13 @@
#include <kdebug.h>
#include <kurl.h>
-#include <qfileinfo.h>
-#include <qstring.h>
+#include <tqfileinfo.h>
+#include <tqstring.h>
UrlInfo::UrlInfo( const KURL& url, const UrlType type )
: m_type( invalid ),
- m_filename( new QString ),
- m_id( new QString )
+ m_filename( new TQString ),
+ m_id( new TQString )
{
calculateInfo( url, type );
}
@@ -38,7 +38,7 @@ UrlInfo::~UrlInfo()
delete m_id;
}
-QString UrlInfo::mimetype() const
+TQString UrlInfo::mimetype() const
{
switch( m_type )
{
@@ -52,17 +52,17 @@ QString UrlInfo::mimetype() const
}
}
-QString UrlInfo::filename() const
+TQString UrlInfo::filename() const
{
return *m_filename;
}
-QString UrlInfo::id() const
+TQString UrlInfo::id() const
{
return *m_id;
}
-QString UrlInfo::url() const
+TQString UrlInfo::url() const
{
return *m_filename + "/" + *m_id;
}
@@ -87,8 +87,8 @@ void UrlInfo::calculateInfo( const KURL& url, const UrlType type )
bool UrlInfo::isDirectory( const KURL& url )
{
//Check is url is in the form mbox://{filename}
- QString filename = url.path();
- QFileInfo info;
+ TQString filename = url.path();
+ TQFileInfo info;
//Remove ending /
while( filename.length() > 1 && filename.right( 1 ) == "/" )
@@ -101,7 +101,7 @@ bool UrlInfo::isDirectory( const KURL& url )
//Setting paramaters
*m_filename = filename;
- *m_id = QString::null;
+ *m_id = TQString::null;
m_type = directory;
kdDebug() << "urlInfo::isDirectory( " << url << " )" << endl;
return true;
@@ -109,8 +109,8 @@ bool UrlInfo::isDirectory( const KURL& url )
bool UrlInfo::isMessage( const KURL& url )
{
- QString path = url.path();
- QFileInfo info;
+ TQString path = url.path();
+ TQFileInfo info;
int cutindex = path.findRev( '/' );
//Does it contain at least one /?
diff --git a/kioslaves/mbox/urlinfo.h b/kioslaves/mbox/urlinfo.h
index c3177db5e..feebd689c 100644
--- a/kioslaves/mbox/urlinfo.h
+++ b/kioslaves/mbox/urlinfo.h
@@ -52,21 +52,21 @@ public:
/**
* @return the mimetype of the url
*/
- QString mimetype() const;
+ TQString mimetype() const;
/**
* @return The location of the mbox-file
*/
- QString filename() const;
+ TQString filename() const;
/**
* @return The id given in the url.
*/
- QString id() const;
+ TQString id() const;
/**
* @return the while url as QString
*/
- QString url() const;
+ TQString url() const;
private:
void calculateInfo( const KURL& url, const UrlType type );
@@ -75,8 +75,8 @@ private:
private:
UrlType m_type;
- QString *m_filename;
- QString *m_id;
+ TQString *m_filename;
+ TQString *m_id;
};
#endif
diff --git a/kioslaves/opengroupware/opengroupware.cpp b/kioslaves/opengroupware/opengroupware.cpp
index 76abeb10e..55525aff3 100644
--- a/kioslaves/opengroupware/opengroupware.cpp
+++ b/kioslaves/opengroupware/opengroupware.cpp
@@ -84,8 +84,8 @@ int kdemain( int argc, char **argv )
return 0;
}
-OpenGroupware::OpenGroupware( const QCString &protocol, const QCString &pool,
- const QCString &app )
+OpenGroupware::OpenGroupware( const TQCString &protocol, const TQCString &pool,
+ const TQCString &app )
: SlaveBase( protocol, pool, app )
{
}
@@ -103,7 +103,7 @@ void OpenGroupware::get( const KURL &url )
mimeType( "text/plain" );
- QString path = url.path();
+ TQString path = url.path();
debugMessage( "Path: " + path );
if ( path.startsWith( "/freebusy/" ) ) {
@@ -113,7 +113,7 @@ void OpenGroupware::get( const KURL &url )
} else if ( path.startsWith( "/addressbook/" ) ) {
getAddressbook( url );
} else {
- QString error = i18n("Unknown path. Known paths are '/freebusy/', "
+ TQString error = i18n("Unknown path. Known paths are '/freebusy/', "
"'/calendar/' and '/addressbook/'.");
errorMessage( error );
}
@@ -123,16 +123,16 @@ void OpenGroupware::get( const KURL &url )
void OpenGroupware::getFreeBusy( const KURL &url )
{
- QString file = url.filename();
+ TQString file = url.filename();
if ( file.right( 4 ) != ".ifb" ) {
- QString error = i18n("Illegal filename. File has to have '.ifb' suffix.");
+ TQString error = i18n("Illegal filename. File has to have '.ifb' suffix.");
errorMessage( error );
} else {
- QString email = file.left( file.length() - 4 );
+ TQString email = file.left( file.length() - 4 );
debugMessage( "Email: " + email );
- QString user = url.user();
- QString pass = url.pass();
+ TQString user = url.user();
+ TQString pass = url.pass();
debugMessage( "URL: " );
debugMessage( "User: " + user );
@@ -146,8 +146,8 @@ void OpenGroupware::getFreeBusy( const KURL &url )
// FIXME get from server
// FIXME: Read range from configuration or URL parameters.
- QDate start = QDate::currentDate().addDays( -3 );
- QDate end = QDate::currentDate().addDays( 60 );
+ TQDate start = TQDate::currentDate().addDays( -3 );
+ TQDate end = TQDate::currentDate().addDays( 60 );
fb->setDtStart( start );
fb->setDtEnd( end );
@@ -157,15 +157,15 @@ void OpenGroupware::getFreeBusy( const KURL &url )
}
#if 0
- QDateTime s = QDateTime( QDate( 2004, 9, 27 ), QTime( 10, 0 ) );
- QDateTime e = QDateTime( QDate( 2004, 9, 27 ), QTime( 11, 0 ) );
+ TQDateTime s = TQDateTime( TQDate( 2004, 9, 27 ), TQTime( 10, 0 ) );
+ TQDateTime e = TQDateTime( TQDate( 2004, 9, 27 ), TQTime( 11, 0 ) );
fb->addPeriod( s, e );
#endif
KCal::ICalFormat format;
- QString ical = format.createScheduleMessage( fb, KCal::Scheduler::Publish );
+ TQString ical = format.createScheduleMessage( fb, KCal::Scheduler::Publish );
data( ical.utf8() );
@@ -178,10 +178,10 @@ void OpenGroupware::getCalendar( const KURL &_url )
{
KURL url( _url ); // we'll be changing it
- QString user = url.user();
- QString pass = url.pass();
+ TQString user = url.user();
+ TQString pass = url.pass();
- QDomDocument props = WebdavHandler::createAllPropsRequest();
+ TQDomDocument props = WebdavHandler::createAllPropsRequest();
debugMessage( "URL: " );
debugMessage( "User: " + user );
@@ -194,8 +194,8 @@ void OpenGroupware::getCalendar( const KURL &_url )
// FIXME do progress handling
mListEventsJob = KIO::davPropFind( url, props, "0", false );
- connect( mListEventsJob, SIGNAL( result( KIO::Job * ) ),
- SLOT( slotGetCalendarListingResult( KIO::Job * ) ) );
+ connect( mListEventsJob, TQT_SIGNAL( result( KIO::Job * ) ),
+ TQT_SLOT( slotGetCalendarListingResult( KIO::Job * ) ) );
}
void OpenGroupware::getAddressbook( const KURL &url )
@@ -203,12 +203,12 @@ void OpenGroupware::getAddressbook( const KURL &url )
}
-void OpenGroupware::errorMessage( const QString &msg )
+void OpenGroupware::errorMessage( const TQString &msg )
{
error( KIO::ERR_SLAVE_DEFINED, msg );
}
-void OpenGroupware::debugMessage( const QString &msg )
+void OpenGroupware::debugMessage( const TQString &msg )
{
#if 0
data( ( msg + "\n" ).utf8() );
@@ -228,13 +228,13 @@ void OpenGroupware::slotGetCalendarListingResult( KIO::Job *job )
} else {
kdDebug() << "ResourceSlox::slotResult() success" << endl;
- QDomDocument doc = mListEventsJob->response();
+ TQDomDocument doc = mListEventsJob->response();
}
KCal::ICalFormat format;
KCal::CalendarLocal calendar;
- QString ical = format.toString( &calendar );
+ TQString ical = format.toString( &calendar );
data( ical.utf8() );
diff --git a/kioslaves/opengroupware/opengroupware.h b/kioslaves/opengroupware/opengroupware.h
index 04eadf456..1a7b143e7 100644
--- a/kioslaves/opengroupware/opengroupware.h
+++ b/kioslaves/opengroupware/opengroupware.h
@@ -22,7 +22,7 @@
#include <kio/slavebase.h>
-#include <qobject.h>
+#include <tqobject.h>
namespace KIO {
class Job;
@@ -30,18 +30,18 @@ namespace KIO {
}
-class OpenGroupware : public QObject, public KIO::SlaveBase
+class OpenGroupware : public TQObject, public KIO::SlaveBase
{
Q_OBJECT
public:
- OpenGroupware( const QCString &protocol, const QCString &pool,
- const QCString &app );
+ OpenGroupware( const TQCString &protocol, const TQCString &pool,
+ const TQCString &app );
void get( const KURL &url );
protected:
- void debugMessage( const QString & );
- void errorMessage( const QString & );
+ void debugMessage( const TQString & );
+ void errorMessage( const TQString & );
void getFreeBusy( const KURL &url );
void getCalendar( const KURL &url );
diff --git a/kioslaves/opengroupware/webdavhandler.cpp b/kioslaves/opengroupware/webdavhandler.cpp
index 683302003..1177624c5 100644
--- a/kioslaves/opengroupware/webdavhandler.cpp
+++ b/kioslaves/opengroupware/webdavhandler.cpp
@@ -29,7 +29,7 @@
#include <kdebug.h>
#include <kconfig.h>
-#include <qfile.h>
+#include <tqfile.h>
WebdavHandler::WebdavHandler()
@@ -37,41 +37,41 @@ WebdavHandler::WebdavHandler()
}
-QDomElement WebdavHandler::addElement( QDomDocument &doc, QDomNode &node,
- const QString &tag )
+TQDomElement WebdavHandler::addElement( TQDomDocument &doc, TQDomNode &node,
+ const TQString &tag )
{
- QDomElement el = doc.createElement( tag );
+ TQDomElement el = doc.createElement( tag );
node.appendChild( el );
return el;
}
-QDomElement WebdavHandler::addDavElement( QDomDocument &doc, QDomNode &node,
- const QString &tag )
+TQDomElement WebdavHandler::addDavElement( TQDomDocument &doc, TQDomNode &node,
+ const TQString &tag )
{
- QDomElement el = doc.createElementNS( "DAV", tag );
+ TQDomElement el = doc.createElementNS( "DAV", tag );
node.appendChild( el );
return el;
}
-QDomElement WebdavHandler::addSloxElement( QDomDocument &doc, QDomNode &node,
- const QString &tag,
- const QString &text )
+TQDomElement WebdavHandler::addSloxElement( TQDomDocument &doc, TQDomNode &node,
+ const TQString &tag,
+ const TQString &text )
{
- QDomElement el = doc.createElementNS( "SLOX", tag );
+ TQDomElement el = doc.createElementNS( "SLOX", tag );
if ( !text.isEmpty() ) {
- QDomText textnode = doc.createTextNode( text );
+ TQDomText textnode = doc.createTextNode( text );
el.appendChild( textnode );
}
node.appendChild( el );
return el;
}
-QDomDocument WebdavHandler::createAllPropsRequest()
+TQDomDocument WebdavHandler::createAllPropsRequest()
{
- QDomDocument doc;
+ TQDomDocument doc;
- QDomElement root = WebdavHandler::addDavElement( doc, doc, "propfind" );
- QDomElement prop = WebdavHandler::addDavElement( doc, root, "prop" );
+ TQDomElement root = WebdavHandler::addDavElement( doc, doc, "propfind" );
+ TQDomElement prop = WebdavHandler::addDavElement( doc, root, "prop" );
WebdavHandler::addDavElement( doc, prop, "getcontentlength");
WebdavHandler::addDavElement( doc, prop, "getlastmodified" );
WebdavHandler::addDavElement( doc, prop, "displayname" );
diff --git a/kioslaves/opengroupware/webdavhandler.h b/kioslaves/opengroupware/webdavhandler.h
index 3c1320812..367ff3aa3 100644
--- a/kioslaves/opengroupware/webdavhandler.h
+++ b/kioslaves/opengroupware/webdavhandler.h
@@ -20,10 +20,10 @@
#ifndef WEBDAVHANDLER_H
#define WEBDAVHANDLER_H
-#include <qvaluelist.h>
-#include <qstring.h>
-#include <qdatetime.h>
-#include <qdom.h>
+#include <tqvaluelist.h>
+#include <tqstring.h>
+#include <tqdatetime.h>
+#include <tqdom.h>
class WebdavHandler
{
@@ -31,14 +31,14 @@ class WebdavHandler
WebdavHandler();
- static QDomElement addElement( QDomDocument &, QDomNode &,
- const QString &tag );
- static QDomElement addDavElement( QDomDocument &, QDomNode &,
- const QString &tag );
- static QDomElement addSloxElement( QDomDocument &, QDomNode &,
- const QString &tag,
- const QString &text = QString::null );
- static QDomDocument createAllPropsRequest();
+ static TQDomElement addElement( TQDomDocument &, TQDomNode &,
+ const TQString &tag );
+ static TQDomElement addDavElement( TQDomDocument &, TQDomNode &,
+ const TQString &tag );
+ static TQDomElement addSloxElement( TQDomDocument &, TQDomNode &,
+ const TQString &tag,
+ const TQString &text = TQString::null );
+ static TQDomDocument createAllPropsRequest();
};
#endif
diff --git a/kioslaves/sieve/sieve.cpp b/kioslaves/sieve/sieve.cpp
index 012d77d15..9f3b547a2 100644
--- a/kioslaves/sieve/sieve.cpp
+++ b/kioslaves/sieve/sieve.cpp
@@ -40,8 +40,8 @@ extern "C" {
#include <kmdcodec.h>
#include <kglobal.h>
-#include <qcstring.h>
-#include <qregexp.h>
+#include <tqcstring.h>
+#include <tqregexp.h>
#include <cstdlib>
using std::exit;
@@ -123,25 +123,25 @@ const uint kio_sieveResponse::getQuantity() const
}
/* ---------------------------------------------------------------------------------- */
-const QCString& kio_sieveResponse::getAction() const
+const TQCString& kio_sieveResponse::getAction() const
{
return key;
}
/* ---------------------------------------------------------------------------------- */
-const QCString& kio_sieveResponse::getKey() const
+const TQCString& kio_sieveResponse::getKey() const
{
return key;
}
/* ---------------------------------------------------------------------------------- */
-const QCString& kio_sieveResponse::getVal() const
+const TQCString& kio_sieveResponse::getVal() const
{
return val;
}
/* ---------------------------------------------------------------------------------- */
-const QCString& kio_sieveResponse::getExtra() const
+const TQCString& kio_sieveResponse::getExtra() const
{
return extra;
}
@@ -154,27 +154,27 @@ void kio_sieveResponse::setQuantity(const uint& newQty)
}
/* ---------------------------------------------------------------------------------- */
-void kio_sieveResponse::setAction(const QCString& newAction)
+void kio_sieveResponse::setAction(const TQCString& newAction)
{
rType = ACTION;
key = newAction.copy();
}
/* ---------------------------------------------------------------------------------- */
-void kio_sieveResponse::setKey(const QCString& newKey)
+void kio_sieveResponse::setKey(const TQCString& newKey)
{
rType = KEY_VAL_PAIR;
key = newKey.copy();
}
/* ---------------------------------------------------------------------------------- */
-void kio_sieveResponse::setVal(const QCString& newVal)
+void kio_sieveResponse::setVal(const TQCString& newVal)
{
val = newVal.copy();
}
/* ---------------------------------------------------------------------------------- */
-void kio_sieveResponse::setExtra(const QCString& newExtra)
+void kio_sieveResponse::setExtra(const TQCString& newExtra)
{
extra = newExtra.copy();
}
@@ -183,12 +183,12 @@ void kio_sieveResponse::setExtra(const QCString& newExtra)
void kio_sieveResponse::clear()
{
rType = NONE;
- extra = key = val = QCString("");
+ extra = key = val = TQCString("");
quantity = 0;
}
/* ---------------------------------------------------------------------------------- */
-kio_sieveProtocol::kio_sieveProtocol(const QCString &pool_socket, const QCString &app_socket)
+kio_sieveProtocol::kio_sieveProtocol(const TQCString &pool_socket, const TQCString &app_socket)
: TCPSlaveBase( SIEVE_DEFAULT_PORT, "sieve", pool_socket, app_socket, false)
, m_connMode(NORMAL)
, m_supportsTLS(false)
@@ -204,7 +204,7 @@ kio_sieveProtocol::~kio_sieveProtocol()
}
/* ---------------------------------------------------------------------------------- */
-void kio_sieveProtocol::setHost (const QString &host, int port, const QString &user, const QString &pass)
+void kio_sieveProtocol::setHost (const TQString &host, int port, const TQString &user, const TQString &pass)
{
if ( isConnectionValid() &&
( m_sServer != host ||
@@ -258,13 +258,13 @@ bool kio_sieveProtocol::parseCapabilities(bool requestCapabilities/* = false*/)
} else if (r.getKey() == "SASL") {
// Save list of available SASL methods
- m_sasl_caps = QStringList::split(' ', r.getVal());
+ m_sasl_caps = TQStringList::split(' ', r.getVal());
ksDebug() << "Server SASL authentication methods: " << m_sasl_caps.join(", ") << endl;
setMetaData("saslMethods", r.getVal());
} else if (r.getKey() == "SIEVE") {
// Save script capabilities; report back as meta data:
- ksDebug() << "Server script capabilities: " << QStringList::split(' ', r.getVal()).join(", ") << endl;
+ ksDebug() << "Server script capabilities: " << TQStringList::split(' ', r.getVal()).join(", ") << endl;
setMetaData("sieveExtensions", r.getVal());
} else if (r.getKey() == "STARTTLS") {
@@ -293,15 +293,15 @@ bool kio_sieveProtocol::parseCapabilities(bool requestCapabilities/* = false*/)
*/
void kio_sieveProtocol::changeCheck( const KURL &url )
{
- QString auth;
+ TQString auth;
if (!metaData("sasl").isEmpty())
auth = metaData("sasl").upper();
else {
- QString query = url.query();
+ TQString query = url.query();
if ( query.startsWith("?") ) query.remove( 0, 1 );
- QStringList q = QStringList::split( ",", query );
- QStringList::iterator it;
+ TQStringList q = TQStringList::split( ",", query );
+ TQStringList::iterator it;
for ( it = q.begin(); it != q.end(); ++it ) {
if ( ( (*it).section('=',0,0) ).lower() == "x-mech" ) {
@@ -415,10 +415,10 @@ void kio_sieveProtocol::disconnect(bool forcibly)
}*/
/* ---------------------------------------------------------------------------------- */
-void kio_sieveProtocol::special(const QByteArray &data)
+void kio_sieveProtocol::special(const TQByteArray &data)
{
int tmp;
- QDataStream stream(data, IO_ReadOnly);
+ TQDataStream stream(data, IO_ReadOnly);
KURL url;
stream >> tmp;
@@ -452,7 +452,7 @@ bool kio_sieveProtocol::activate(const KURL& url)
infoMessage(i18n("Activating script..."));
- QString filename = url.fileName(false);
+ TQString filename = url.fileName(false);
if (filename.isEmpty()) {
error(ERR_DOES_NOT_EXIST, url.prettyURL());
@@ -489,7 +489,7 @@ bool kio_sieveProtocol::deactivate()
}
}
-static void append_lf2crlf( QByteArray & out, const QByteArray & in ) {
+static void append_lf2crlf( TQByteArray & out, const TQByteArray & in ) {
if ( in.isEmpty() )
return;
const unsigned int oldOutSize = out.size();
@@ -514,17 +514,17 @@ void kio_sieveProtocol::put(const KURL& url, int /*permissions*/, bool /*overwri
infoMessage(i18n("Sending data..."));
- QString filename = url.fileName(false);
+ TQString filename = url.fileName(false);
if (filename.isEmpty()) {
error(ERR_MALFORMED_URL, url.prettyURL());
return;
}
- QByteArray data;
+ TQByteArray data;
for (;;) {
dataReq();
- QByteArray buffer;
+ TQByteArray buffer;
const int newSize = readData(buffer);
append_lf2crlf( data, buffer );
if ( newSize < 0 ) {
@@ -552,7 +552,7 @@ void kio_sieveProtocol::put(const KURL& url, int /*permissions*/, bool /*overwri
#ifndef HAVE_BROKEN_TIMSIEVED
// first, check quota (it's a SHOULD in draft std)
if (!sendData("HAVESPACE \"" + filename.utf8() + "\" "
- + QCString().setNum( bufLen )))
+ + TQCString().setNum( bufLen )))
return;
if (!operationSuccessful()) {
@@ -562,7 +562,7 @@ void kio_sieveProtocol::put(const KURL& url, int /*permissions*/, bool /*overwri
#endif
if (!sendData("PUTSCRIPT \"" + filename.utf8() + "\" {"
- + QCString().setNum( bufLen ) + "+}"))
+ + TQCString().setNum( bufLen ) + "+}"))
return;
// atEnd() lies so the code below doesn't work.
@@ -612,7 +612,7 @@ void kio_sieveProtocol::put(const KURL& url, int /*permissions*/, bool /*overwri
* error is reported. */
if (r.getAction().length() > 3) {
// make a copy of the extra info
- QCString extra = r.getAction().right(r.getAction().length() - 3);
+ TQCString extra = r.getAction().right(r.getAction().length() - 3);
// send the extra message off for re-processing
receiveData(false, &extra);
@@ -621,7 +621,7 @@ void kio_sieveProtocol::put(const KURL& url, int /*permissions*/, bool /*overwri
// length of the error message
uint len = r.getQuantity();
- QCString errmsg(len + 1);
+ TQCString errmsg(len + 1);
read(errmsg.data(), len);
@@ -655,10 +655,10 @@ void kio_sieveProtocol::put(const KURL& url, int /*permissions*/, bool /*overwri
finished();
}
-static void inplace_crlf2lf( QByteArray & in ) {
+static void inplace_crlf2lf( TQByteArray & in ) {
if ( in.isEmpty() )
return;
- QByteArray & out = in; // inplace
+ TQByteArray & out = in; // inplace
const char * s = in.begin();
const char * const end = in.end();
char * d = out.begin();
@@ -680,14 +680,14 @@ void kio_sieveProtocol::get(const KURL& url)
infoMessage(i18n("Retrieving data..."));
- QString filename = url.fileName(false);
+ TQString filename = url.fileName(false);
if (filename.isEmpty()) {
error(ERR_MALFORMED_URL, url.prettyURL());
return;
}
- //SlaveBase::mimetype( QString("text/plain") ); // "application/sieve");
+ //SlaveBase::mimetype( TQString("text/plain") ); // "application/sieve");
if (!sendData("GETSCRIPT \"" + filename.utf8() + "\""))
return;
@@ -709,7 +709,7 @@ void kio_sieveProtocol::get(const KURL& url)
// ...read data...
// Only read as much as we need, otherwise we slurp in the OK that
// operationSuccessful() is expecting below.
- QByteArray dat( kMin( total_len - recv_len, ssize_t(64 * 1024 )) );
+ TQByteArray dat( kMin( total_len - recv_len, ssize_t(64 * 1024 )) );
ssize_t this_recv_len = read( dat.data(), dat.size() );
if ( this_recv_len < 1 && !isConnectionValid() ) {
@@ -728,7 +728,7 @@ void kio_sieveProtocol::get(const KURL& url)
} while ( recv_len < total_len );
infoMessage(i18n("Finishing up...") );
- data(QByteArray());
+ data(TQByteArray());
if (operationSuccessful())
ksDebug() << "Script retrieval complete." << endl;
@@ -757,7 +757,7 @@ void kio_sieveProtocol::del(const KURL &url, bool isfile)
infoMessage(i18n("Deleting file..."));
- QString filename = url.fileName(false);
+ TQString filename = url.fileName(false);
if (filename.isEmpty()) {
error(ERR_MALFORMED_URL, url.prettyURL());
@@ -808,7 +808,7 @@ void kio_sieveProtocol::stat(const KURL& url)
UDSEntry entry;
- QString filename = url.fileName(false);
+ TQString filename = url.fileName(false);
if (filename.isEmpty()) {
UDSAtom atom;
@@ -837,12 +837,12 @@ void kio_sieveProtocol::stat(const KURL& url)
break;
} else
- if (filename == QString::fromUtf8(r.getKey())) {
+ if (filename == TQString::fromUtf8(r.getKey())) {
entry.clear();
UDSAtom atom;
atom.m_uds = KIO::UDS_NAME;
- atom.m_str = QString::fromUtf8(r.getKey());
+ atom.m_str = TQString::fromUtf8(r.getKey());
entry.append(atom);
atom.m_uds = KIO::UDS_FILE_TYPE;
@@ -894,7 +894,7 @@ void kio_sieveProtocol::listDir(const KURL& url)
UDSAtom atom;
atom.m_uds = KIO::UDS_NAME;
- atom.m_str = QString::fromUtf8(r.getKey());
+ atom.m_str = TQString::fromUtf8(r.getKey());
entry.append(atom);
atom.m_uds = KIO::UDS_FILE_TYPE;
@@ -973,7 +973,7 @@ bool kio_sieveProtocol::saslInteract( void *in, AuthInfo &ai )
}
#define SASLERROR error(ERR_COULD_NOT_AUTHENTICATE, i18n("An error occurred during authentication: %1").arg( \
- QString::fromUtf8( sasl_errdetail( conn ) )));
+ TQString::fromUtf8( sasl_errdetail( conn ) )));
bool kio_sieveProtocol::authenticate()
{
@@ -983,7 +983,7 @@ bool kio_sieveProtocol::authenticate()
const char *out = NULL;
uint outlen;
const char *mechusing = NULL;
- QByteArray challenge, tmp;
+ TQByteArray challenge, tmp;
/* Retrieve authentication details from user.
* Note: should this require realm as well as user & pass details
@@ -1010,7 +1010,7 @@ bool kio_sieveProtocol::authenticate()
return false;
}
- QStringList strList;
+ TQStringList strList;
// strList.append("NTLM");
if ( !m_sAuth.isEmpty() )
@@ -1038,20 +1038,20 @@ bool kio_sieveProtocol::authenticate()
ksDebug() << "Preferred authentication method is " << mechusing << "." << endl;
- QString firstCommand = "AUTHENTICATE \"" + QString::fromLatin1( mechusing ) + "\"";
+ TQString firstCommand = "AUTHENTICATE \"" + TQString::fromLatin1( mechusing ) + "\"";
tmp.setRawData( out, outlen );
KCodecs::base64Encode( tmp, challenge );
tmp.resetRawData( out, outlen );
if ( !challenge.isEmpty() ) {
firstCommand += " \"";
- firstCommand += QString::fromLatin1( challenge.data(), challenge.size() );
+ firstCommand += TQString::fromLatin1( challenge.data(), challenge.size() );
firstCommand += "\"";
}
if (!sendData( firstCommand.latin1() ))
return false;
- QCString command;
+ TQCString command;
do {
receiveData();
@@ -1085,7 +1085,7 @@ bool kio_sieveProtocol::authenticate()
KCodecs::base64Decode( tmp, challenge );
tmp.resetRawData( r.getAction().data(), qty );
// ksDebug() << "S: [" << r.getAction() << "]." << endl;
-// ksDebug() << "S-1: [" << QCString(challenge.data(), challenge.size()+1) << "]." << endl;
+// ksDebug() << "S-1: [" << TQCString(challenge.data(), challenge.size()+1) << "]." << endl;
do {
result = sasl_client_step(conn, challenge.isEmpty() ? 0 : challenge.data(),
@@ -1111,8 +1111,8 @@ bool kio_sieveProtocol::authenticate()
tmp.setRawData( out, outlen );
KCodecs::base64Encode( tmp, challenge );
tmp.resetRawData( out, outlen );
- sendData("\"" + QCString( challenge.data(), challenge.size()+1 ) + "\"");
-// ksDebug() << "C: [" << QCString(challenge.data(), challenge.size()+1) << "]." << endl;
+ sendData("\"" + TQCString( challenge.data(), challenge.size()+1 ) + "\"");
+// ksDebug() << "C: [" << TQCString(challenge.data(), challenge.size()+1) << "]." << endl;
// ksDebug() << "C-1: [" << out << "]." << endl;
} while ( true );
@@ -1144,9 +1144,9 @@ void kio_sieveProtocol::mimetype(const KURL & url)
/* --------------------------------------------------------------------------- */
-bool kio_sieveProtocol::sendData(const QCString &data)
+bool kio_sieveProtocol::sendData(const TQCString &data)
{
- QCString write_buf = data + "\r\n";
+ TQCString write_buf = data + "\r\n";
//ksDebug() << "C: " << data << endl;
@@ -1162,9 +1162,9 @@ bool kio_sieveProtocol::sendData(const QCString &data)
}
/* --------------------------------------------------------------------------- */
-bool kio_sieveProtocol::receiveData(bool waitForData, QCString *reparse)
+bool kio_sieveProtocol::receiveData(bool waitForData, TQCString *reparse)
{
- QCString interpret;
+ TQCString interpret;
int start, end;
if (!reparse) {
@@ -1178,7 +1178,7 @@ bool kio_sieveProtocol::receiveData(bool waitForData, QCString *reparse)
buffer[SIEVE_DEFAULT_RECIEVE_BUFFER-1] = '\0';
// strip LF/CR
- interpret = QCString(buffer).left(qstrlen(buffer) - 2);
+ interpret = TQCString(buffer).left(qstrlen(buffer) - 2);
} else {
interpret = reparse->copy();
@@ -1252,7 +1252,7 @@ bool kio_sieveProtocol::operationSuccessful()
{
while (receiveData(false)) {
if (r.getType() == kio_sieveResponse::ACTION) {
- QCString response = r.getAction().left(2);
+ TQCString response = r.getAction().left(2);
if (response == "OK") {
return true;
} else if (response == "NO") {
@@ -1266,7 +1266,7 @@ bool kio_sieveProtocol::operationSuccessful()
int kio_sieveProtocol::operationResult()
{
if (r.getType() == kio_sieveResponse::ACTION) {
- QCString response = r.getAction().left(2);
+ TQCString response = r.getAction().left(2);
if (response == "OK") {
return OK;
} else if (response == "NO") {
@@ -1284,12 +1284,12 @@ bool kio_sieveProtocol::requestCapabilitiesAfterStartTLS() const
// Cyrus didn't send CAPABILITIES after STARTTLS until 2.3.11, which is
// not standard conform, but we need to support that anyway.
// m_implementation looks like this 'Cyrus timsieved v2.2.12' for Cyrus btw.
- QRegExp regExp( "Cyrus\\stimsieved\\sv(\\d+)\\.(\\d+)\\.(\\d+)([-\\w]*)", false );
+ TQRegExp regExp( "Cyrus\\stimsieved\\sv(\\d+)\\.(\\d+)\\.(\\d+)([-\\w]*)", false );
if ( regExp.search( m_implementation ) >= 0 ) {
const int major = regExp.cap( 1 ).toInt();
const int minor = regExp.cap( 2 ).toInt();
const int patch = regExp.cap( 3 ).toInt();
- const QString vendor = regExp.cap( 4 );
+ const TQString vendor = regExp.cap( 4 );
if ( major < 2 || (major == 2 && (minor < 3 || (minor == 3 && patch < 11))) || (vendor == "-kolab-nocaps") ) {
ksDebug() << k_funcinfo << "Enabling compat mode for Cyrus < 2.3.11 or Cyrus marked as \"kolab-nocaps\"" << endl;
return true;
diff --git a/kioslaves/sieve/sieve.h b/kioslaves/sieve/sieve.h
index 1e064bbf6..f8749f013 100644
--- a/kioslaves/sieve/sieve.h
+++ b/kioslaves/sieve/sieve.h
@@ -19,9 +19,9 @@
#include <kio/tcpslavebase.h>
#include <kio/authinfo.h>
-#include <qstring.h>
-#include <qcstring.h>
-#include <qstringlist.h>
+#include <tqstring.h>
+#include <tqcstring.h>
+#include <tqstringlist.h>
class KDESasl;
class KURL;
@@ -36,17 +36,17 @@ public:
const uint& getType() const;
- const QCString& getAction() const;
+ const TQCString& getAction() const;
const uint getQuantity() const;
- const QCString& getKey() const;
- const QCString& getVal() const;
- const QCString& getExtra() const;
+ const TQCString& getKey() const;
+ const TQCString& getVal() const;
+ const TQCString& getExtra() const;
void setQuantity(const uint& quantity);
- void setAction(const QCString& newAction);
- void setKey(const QCString& newKey);
- void setVal(const QCString& newVal);
- void setExtra(const QCString& newExtra);
+ void setAction(const TQCString& newAction);
+ void setKey(const TQCString& newKey);
+ void setVal(const TQCString& newVal);
+ void setExtra(const TQCString& newExtra);
void clear();
@@ -65,7 +65,7 @@ public:
enum connectionModes { NORMAL, CONNECTION_ORIENTED };
enum Results { OK, NO, BYE, OTHER };
- kio_sieveProtocol(const QCString &pool_socket, const QCString &app_socket);
+ kio_sieveProtocol(const TQCString &pool_socket, const TQCString &app_socket);
virtual ~kio_sieveProtocol();
virtual void mimetype(const KURL& url);
@@ -77,7 +77,7 @@ public:
virtual void chmod(const KURL& url, int permissions);
virtual void stat(const KURL& url);
- 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 openConnection();
virtual void closeConnection();
//virtual void slave_status();
@@ -88,7 +88,7 @@ public:
* 2 - deactivate (all - only one active at any one time) scripts
* 3 - request capabilities, returned as metadata
*/
- virtual void special(const QByteArray &data);
+ virtual void special(const TQByteArray &data);
bool activate(const KURL& url);
bool deactivate();
@@ -98,8 +98,8 @@ protected:
void disconnect(bool forcibly = false);
void changeCheck( const KURL &url );
- bool sendData(const QCString &data);
- bool receiveData(bool waitForData = true, QCString *reparse = 0);
+ bool sendData(const TQCString &data);
+ bool receiveData(bool waitForData = true, TQCString *reparse = 0);
bool operationSuccessful();
int operationResult();
@@ -126,7 +126,7 @@ protected:
private:
bool requestCapabilitiesAfterStartTLS() const;
- QString m_implementation;
+ TQString m_implementation;
};
#endif
diff --git a/kitchensync/libqopensync/callbackhandler.cpp b/kitchensync/libqopensync/callbackhandler.cpp
index 86f279f14..504afea99 100644
--- a/kitchensync/libqopensync/callbackhandler.cpp
+++ b/kitchensync/libqopensync/callbackhandler.cpp
@@ -23,7 +23,7 @@
#include <libqopensync/engine.h>
-#include <qapplication.h>
+#include <tqapplication.h>
#include "callbackhandler.h"
@@ -33,7 +33,7 @@ class CallbackHandler::ConflictEvent : public QCustomEvent
{
public:
ConflictEvent( const SyncMapping& mapping )
- : QCustomEvent( ConflictEventType ), mMapping( mapping )
+ : TQCustomEvent( ConflictEventType ), mMapping( mapping )
{
}
@@ -47,7 +47,7 @@ class CallbackHandler::ChangeEvent : public QCustomEvent
{
public:
ChangeEvent( const SyncChangeUpdate& change )
- : QCustomEvent( ChangeEventType ), mChange( change )
+ : TQCustomEvent( ChangeEventType ), mChange( change )
{
}
@@ -61,7 +61,7 @@ class CallbackHandler::MappingEvent : public QCustomEvent
{
public:
MappingEvent( const SyncMappingUpdate& mapping )
- : QCustomEvent( MappingEventType ), mMapping( mapping )
+ : TQCustomEvent( MappingEventType ), mMapping( mapping )
{
}
@@ -75,7 +75,7 @@ class CallbackHandler::EngineEvent : public QCustomEvent
{
public:
EngineEvent( const SyncEngineUpdate& engine )
- : QCustomEvent( EngineEventType ), mEngine( engine )
+ : TQCustomEvent( EngineEventType ), mEngine( engine )
{
}
@@ -89,7 +89,7 @@ class CallbackHandler::MemberEvent : public QCustomEvent
{
public:
MemberEvent( const SyncMemberUpdate& member )
- : QCustomEvent( MemberEventType ), mMember( member )
+ : TQCustomEvent( MemberEventType ), mMember( member )
{
}
@@ -123,21 +123,21 @@ Engine* CallbackHandler::engine() const
return mEngine;
}
-void CallbackHandler::customEvent( QCustomEvent *event )
+void CallbackHandler::customEvent( TQCustomEvent *event )
{
- if ( event->type() == static_cast<QEvent::Type>( ConflictEventType ) ) {
+ if ( event->type() == static_cast<TQEvent::Type>( ConflictEventType ) ) {
ConflictEvent *conflictEvent = static_cast<ConflictEvent*>( event );
emit conflict( conflictEvent->mapping() );
- } else if ( event->type() == static_cast<QEvent::Type>( ChangeEventType ) ) {
+ } else if ( event->type() == static_cast<TQEvent::Type>( ChangeEventType ) ) {
ChangeEvent *changeEvent = static_cast<ChangeEvent*>( event );
emit change( changeEvent->change() );
- } else if ( event->type() == static_cast<QEvent::Type>( MappingEventType ) ) {
+ } else if ( event->type() == static_cast<TQEvent::Type>( MappingEventType ) ) {
MappingEvent *mappingEvent = static_cast<MappingEvent*>( event );
emit mapping( mappingEvent->mapping() );
- } else if ( event->type() == static_cast<QEvent::Type>( EngineEventType ) ) {
+ } else if ( event->type() == static_cast<TQEvent::Type>( EngineEventType ) ) {
EngineEvent *engineEvent = static_cast<EngineEvent*>( event );
emit engine( engineEvent->engine() );
- } else if ( event->type() == static_cast<QEvent::Type>( MemberEventType ) ) {
+ } else if ( event->type() == static_cast<TQEvent::Type>( MemberEventType ) ) {
MemberEvent *memberEvent = static_cast<MemberEvent*>( event );
emit member( memberEvent->member() );
}
@@ -149,7 +149,7 @@ void CallbackHandler::conflict_callback( OSyncEngine *engine, OSyncMapping *omap
CallbackHandler *handler = static_cast<CallbackHandler*>( data );
- QApplication::postEvent( handler, new ConflictEvent( mapping ) );
+ TQApplication::postEvent( handler, new ConflictEvent( mapping ) );
}
void CallbackHandler::change_callback( OSyncEngine*, OSyncChangeUpdate *update, void *data )
@@ -158,7 +158,7 @@ void CallbackHandler::change_callback( OSyncEngine*, OSyncChangeUpdate *update,
CallbackHandler *handler = static_cast<CallbackHandler*>( data );
- QApplication::postEvent( handler, new ChangeEvent( change ) );
+ TQApplication::postEvent( handler, new ChangeEvent( change ) );
}
void CallbackHandler::mapping_callback( OSyncMappingUpdate *update, void *data )
@@ -167,7 +167,7 @@ void CallbackHandler::mapping_callback( OSyncMappingUpdate *update, void *data )
SyncMappingUpdate mapping( update, handler->engine()->mEngine );
- QApplication::postEvent( handler, new MappingEvent( mapping ) );
+ TQApplication::postEvent( handler, new MappingEvent( mapping ) );
}
void CallbackHandler::engine_callback( OSyncEngine*, OSyncEngineUpdate *update, void *data )
@@ -176,7 +176,7 @@ void CallbackHandler::engine_callback( OSyncEngine*, OSyncEngineUpdate *update,
CallbackHandler *handler = static_cast<CallbackHandler*>( data );
- QApplication::postEvent( handler, new EngineEvent( engine ) );
+ TQApplication::postEvent( handler, new EngineEvent( engine ) );
}
void CallbackHandler::member_callback( OSyncMemberUpdate *update, void *data )
@@ -185,7 +185,7 @@ void CallbackHandler::member_callback( OSyncMemberUpdate *update, void *data )
CallbackHandler *handler = static_cast<CallbackHandler*>( data );
- QApplication::postEvent( handler, new MemberEvent( member ) );
+ TQApplication::postEvent( handler, new MemberEvent( member ) );
}
#include "callbackhandler.moc"
diff --git a/kitchensync/libqopensync/callbackhandler.h b/kitchensync/libqopensync/callbackhandler.h
index a31132559..72845de14 100644
--- a/kitchensync/libqopensync/callbackhandler.h
+++ b/kitchensync/libqopensync/callbackhandler.h
@@ -25,7 +25,7 @@
#include <libqopensync/syncmapping.h>
#include <libqopensync/syncupdates.h>
-#include <qobject.h>
+#include <tqobject.h>
class OSyncEngine;
class OSyncMapping;
@@ -59,7 +59,7 @@ class CallbackHandler : public QObject
void member( const QSync::SyncMemberUpdate &update );
protected:
- virtual void customEvent( QCustomEvent *event );
+ virtual void customEvent( TQCustomEvent *event );
private:
enum EventType {
diff --git a/kitchensync/libqopensync/conversion.cpp b/kitchensync/libqopensync/conversion.cpp
index bf4eb948a..0be2fdb73 100644
--- a/kitchensync/libqopensync/conversion.cpp
+++ b/kitchensync/libqopensync/conversion.cpp
@@ -39,17 +39,17 @@ bool Conversion::isValid() const
return mEnvironment != 0;
}
-QStringList Conversion::objectTypes() const
+TQStringList Conversion::objectTypes() const
{
Q_ASSERT( mEnvironment );
OSyncFormatEnv *formatEnv = osync_conv_env_new( mEnvironment );
Q_ASSERT( formatEnv );
- QStringList types;
+ TQStringList types;
for ( int i = 0; i < osync_conv_num_objtypes( formatEnv ); i++ ) {
OSyncObjType *type = osync_conv_nth_objtype( formatEnv, i );
- types.append( QString::fromUtf8( osync_objtype_get_name( type ) ) );
+ types.append( TQString::fromUtf8( osync_objtype_get_name( type ) ) );
}
osync_conv_env_free( formatEnv );
diff --git a/kitchensync/libqopensync/conversion.h b/kitchensync/libqopensync/conversion.h
index 327f8b475..e4b32c580 100644
--- a/kitchensync/libqopensync/conversion.h
+++ b/kitchensync/libqopensync/conversion.h
@@ -22,7 +22,7 @@
#ifndef QSYNC_CONVERSION_H
#define QSYNC_CONVERSION_H
-#include <qstringlist.h>
+#include <tqstringlist.h>
class OSyncEnv;
@@ -44,7 +44,7 @@ class Conversion
/**
Returns the list of names of supported object types.
*/
- QStringList objectTypes() const;
+ TQStringList objectTypes() const;
private:
OSyncEnv *mEnvironment;
diff --git a/kitchensync/libqopensync/environment.cpp b/kitchensync/libqopensync/environment.cpp
index d878c61d5..f0d918083 100644
--- a/kitchensync/libqopensync/environment.cpp
+++ b/kitchensync/libqopensync/environment.cpp
@@ -103,7 +103,7 @@ Group Environment::groupAt( int pos ) const
return group;
}
-Group Environment::groupByName( const QString &name ) const
+Group Environment::groupByName( const TQString &name ) const
{
Group group;
@@ -152,7 +152,7 @@ Plugin Environment::pluginAt( int pos ) const
return plugin;
}
-Plugin Environment::pluginByName( const QString &name ) const
+Plugin Environment::pluginByName( const TQString &name ) const
{
Plugin plugin;
diff --git a/kitchensync/libqopensync/environment.h b/kitchensync/libqopensync/environment.h
index f412a32c0..469ffd972 100644
--- a/kitchensync/libqopensync/environment.h
+++ b/kitchensync/libqopensync/environment.h
@@ -22,7 +22,7 @@
#ifndef OSYNC_ENVIRONMENT_H
#define OSYNC_ENVIRONMENT_H
-#include <qstring.h>
+#include <tqstring.h>
#include <libqopensync/group.h>
#include <libqopensync/plugin.h>
@@ -155,7 +155,7 @@ class Environment
Returns a group by name or an invalid group when the group with this
name doesn't exists.
*/
- Group groupByName( const QString &name ) const;
+ Group groupByName( const TQString &name ) const;
/**
Adds a new group to the environment.
@@ -183,7 +183,7 @@ class Environment
Returns a plugin by name or an invalid plugin when the plugin with this
name doesn't exists.
*/
- Plugin pluginByName( const QString &name ) const;
+ Plugin pluginByName( const TQString &name ) const;
/**
Returns the conversion object of this environment.
diff --git a/kitchensync/libqopensync/filter.cpp b/kitchensync/libqopensync/filter.cpp
index fdfcf032f..dc5fe2eee 100644
--- a/kitchensync/libqopensync/filter.cpp
+++ b/kitchensync/libqopensync/filter.cpp
@@ -39,17 +39,17 @@ bool Filter::isValid() const
return (mFilter != 0);
}
-void Filter::setConfiguration( const QString &configuration )
+void Filter::setConfiguration( const TQString &configuration )
{
Q_ASSERT( mFilter );
osync_filter_set_config( mFilter, (const char*)configuration.utf8() );
}
-QString Filter::configuration() const
+TQString Filter::configuration() const
{
Q_ASSERT( mFilter );
- return QString::fromUtf8( osync_filter_get_config( mFilter ) );
+ return TQString::fromUtf8( osync_filter_get_config( mFilter ) );
}
diff --git a/kitchensync/libqopensync/filter.h b/kitchensync/libqopensync/filter.h
index 55e3099e1..f10ac18f4 100644
--- a/kitchensync/libqopensync/filter.h
+++ b/kitchensync/libqopensync/filter.h
@@ -22,7 +22,7 @@
#ifndef QSYNC_FILTER_H
#define QSYNC_FILTER_H
-#include <qstring.h>
+#include <tqstring.h>
class OSyncFilter;
@@ -45,12 +45,12 @@ class Filter
Sets the configuration string of this filter. The format of
string is filter specific.
*/
- void setConfiguration( const QString &configuration );
+ void setConfiguration( const TQString &configuration );
/**
Returns the configuration string of this filter.
*/
- QString configuration() const;
+ TQString configuration() const;
bool operator==( const Filter &filter ) const { return mFilter == filter.mFilter; }
diff --git a/kitchensync/libqopensync/group.cpp b/kitchensync/libqopensync/group.cpp
index 75beab90c..bc94e2208 100644
--- a/kitchensync/libqopensync/group.cpp
+++ b/kitchensync/libqopensync/group.cpp
@@ -20,8 +20,8 @@
*/
/** hack includes **/
-#include <qdom.h>
-#include <qfile.h>
+#include <tqdom.h>
+#include <tqfile.h>
/** hack includes **/
#include <opensync/opensync.h>
@@ -42,31 +42,31 @@ GroupConfig::GroupConfig()
{
}
-QStringList GroupConfig::activeObjectTypes() const
+TQStringList GroupConfig::activeObjectTypes() const
{
Q_ASSERT( mGroup );
- const QString fileName = QString( "%1/filter.conf" ).arg( osync_group_get_configdir( mGroup ) );
+ const TQString fileName = TQString( "%1/filter.conf" ).arg( osync_group_get_configdir( mGroup ) );
- QFile file( fileName );
+ TQFile file( fileName );
if ( !file.open( IO_ReadOnly ) )
- return QStringList();
+ return TQStringList();
- QDomDocument document;
+ TQDomDocument document;
- QString message;
+ TQString message;
if ( !document.setContent( &file, &message ) ) {
qDebug( "Error on loading %s: %s", fileName.latin1(), message.latin1() );
- return QStringList();
+ return TQStringList();
}
file.close();
- QStringList objectTypes;
+ TQStringList objectTypes;
- QDomElement element = document.documentElement();
- QDomNode node = element.firstChild();
+ TQDomElement element = document.documentElement();
+ TQDomNode node = element.firstChild();
while ( !node.isNull() ) {
- QDomElement childElement = node.toElement();
+ TQDomElement childElement = node.toElement();
if ( !childElement.isNull() )
objectTypes.append( childElement.tagName() );
@@ -76,30 +76,30 @@ QStringList GroupConfig::activeObjectTypes() const
return objectTypes;
}
-void GroupConfig::setActiveObjectTypes( const QStringList &objectTypes )
+void GroupConfig::setActiveObjectTypes( const TQStringList &objectTypes )
{
Q_ASSERT( mGroup );
- QDomDocument document( "Filter" );
+ TQDomDocument document( "Filter" );
document.appendChild( document.createProcessingInstruction(
"xml", "version=\"1.0\" encoding=\"UTF-8\"" ) );
- QDomElement element = document.createElement( "filter" );
+ TQDomElement element = document.createElement( "filter" );
document.appendChild( element );
for ( uint i = 0; i < objectTypes.count(); ++i ) {
- QDomElement entry = document.createElement( objectTypes[ i ] );
+ TQDomElement entry = document.createElement( objectTypes[ i ] );
element.appendChild( entry );
}
- const QString fileName = QString( "%1/filter.conf" ).arg( osync_group_get_configdir( mGroup ) );
+ const TQString fileName = TQString( "%1/filter.conf" ).arg( osync_group_get_configdir( mGroup ) );
- QFile file( fileName );
+ TQFile file( fileName );
if ( !file.open( IO_WriteOnly ) )
return;
- QTextStream s( &file );
- s.setEncoding( QTextStream::UnicodeUTF8 );
+ TQTextStream s( &file );
+ s.setEncoding( TQTextStream::UnicodeUTF8 );
s << document.toString();
file.close();
}
@@ -135,21 +135,21 @@ Group::Iterator Group::end()
return it;
}
-void Group::setName( const QString &name )
+void Group::setName( const TQString &name )
{
Q_ASSERT( mGroup );
osync_group_set_name( mGroup, name.latin1() );
}
-QString Group::name() const
+TQString Group::name() const
{
Q_ASSERT( mGroup );
- return QString::fromLatin1( osync_group_get_name( mGroup ) );
+ return TQString::fromLatin1( osync_group_get_name( mGroup ) );
}
-void Group::setLastSynchronization( const QDateTime &dateTime )
+void Group::setLastSynchronization( const TQDateTime &dateTime )
{
Q_ASSERT( mGroup );
@@ -157,11 +157,11 @@ void Group::setLastSynchronization( const QDateTime &dateTime )
osync_group_set_last_synchronization( mGroup, dateTime.toTime_t() );
}
-QDateTime Group::lastSynchronization() const
+TQDateTime Group::lastSynchronization() const
{
Q_ASSERT( mGroup );
- QDateTime dateTime;
+ TQDateTime dateTime;
time_t time = osync_group_get_last_synchronization( mGroup );
if ( time != 0 )
dateTime.setTime_t( time );
@@ -269,14 +269,14 @@ Result Group::save()
return Result();
}
-void Group::setObjectTypeEnabled( const QString &objectType, bool enabled )
+void Group::setObjectTypeEnabled( const TQString &objectType, bool enabled )
{
Q_ASSERT( mGroup );
osync_group_set_objtype_enabled( mGroup, objectType.utf8(), enabled );
}
-bool Group::isObjectTypeEnabled( const QString &objectType ) const
+bool Group::isObjectTypeEnabled( const TQString &objectType ) const
{
return osync_group_objtype_enabled( mGroup, objectType.utf8() );
}
diff --git a/kitchensync/libqopensync/group.h b/kitchensync/libqopensync/group.h
index e03365dfe..750e7c41c 100644
--- a/kitchensync/libqopensync/group.h
+++ b/kitchensync/libqopensync/group.h
@@ -22,8 +22,8 @@
#ifndef QSYNC_GROUP_H
#define QSYNC_GROUP_H
-#include <qdatetime.h>
-#include <qstringlist.h>
+#include <tqdatetime.h>
+#include <tqstringlist.h>
#include <libqopensync/filter.h>
#include <libqopensync/member.h>
@@ -42,8 +42,8 @@ class GroupConfig
public:
GroupConfig();
- QStringList activeObjectTypes() const;
- void setActiveObjectTypes( const QStringList &objectTypes );
+ TQStringList activeObjectTypes() const;
+ void setActiveObjectTypes( const TQStringList &objectTypes );
private:
OSyncGroup *mGroup;
@@ -119,22 +119,22 @@ class Group
/**
Sets the name of the group.
*/
- void setName( const QString &name );
+ void setName( const TQString &name );
/**
Returns the name of the group.
*/
- QString name() const;
+ TQString name() const;
/**
Sets the time of the last successfull synchronization.
*/
- void setLastSynchronization( const QDateTime &dateTime );
+ void setLastSynchronization( const TQDateTime &dateTime );
/**
Returns the time of the last successfull synchronization.
*/
- QDateTime lastSynchronization() const;
+ TQDateTime lastSynchronization() const;
/**
Locks the group.
@@ -186,13 +186,13 @@ class Group
Set, if the object type with given name is enabled for synchronisation for
this group.
*/
- void setObjectTypeEnabled( const QString &objectType, bool enabled );
+ void setObjectTypeEnabled( const TQString &objectType, bool enabled );
/**
Returns whether the object type with given name is enabled for synchronisation for
this group.
*/
- bool isObjectTypeEnabled( const QString &objectType ) const;
+ bool isObjectTypeEnabled( const TQString &objectType ) const;
/**
Saves the configuration to hard disc.
diff --git a/kitchensync/libqopensync/member.cpp b/kitchensync/libqopensync/member.cpp
index 3ac24f0dc..35cb04632 100644
--- a/kitchensync/libqopensync/member.cpp
+++ b/kitchensync/libqopensync/member.cpp
@@ -51,18 +51,18 @@ bool Member::isValid() const
return true;
}
-QString Member::configurationDirectory() const
+TQString Member::configurationDirectory() const
{
Q_ASSERT( mMember );
- return QString::fromLatin1( osync_member_get_configdir( mMember ) );
+ return TQString::fromLatin1( osync_member_get_configdir( mMember ) );
}
-QString Member::pluginName() const
+TQString Member::pluginName() const
{
Q_ASSERT( mMember );
- return QString::fromLatin1( osync_member_get_pluginname( mMember ) );
+ return TQString::fromLatin1( osync_member_get_pluginname( mMember ) );
}
Plugin Member::plugin() const
@@ -85,28 +85,28 @@ int Member::id() const
return osync_member_get_id( mMember );
}
-void Member::setName( const QString &name )
+void Member::setName( const TQString &name )
{
Q_ASSERT( mMember );
osync_member_set_name( mMember, (const char*)name.utf8() );
}
-QString Member::name() const
+TQString Member::name() const
{
Q_ASSERT( mMember );
- return QString::fromUtf8( osync_member_get_name( mMember ) );
+ return TQString::fromUtf8( osync_member_get_name( mMember ) );
}
-void Member::setConfiguration( const QByteArray &configurationData )
+void Member::setConfiguration( const TQByteArray &configurationData )
{
Q_ASSERT( mMember );
osync_member_set_config( mMember, configurationData.data(), configurationData.size() );
}
-Result Member::configuration( QByteArray &configurationData, bool useDefault )
+Result Member::configuration( TQByteArray &configurationData, bool useDefault )
{
Q_ASSERT( mMember );
@@ -155,7 +155,7 @@ bool Member::operator==( const Member &member ) const
return mMember == member.mMember;
}
-QString Member::scanDevices( const QString &query )
+TQString Member::scanDevices( const TQString &query )
{
Q_ASSERT( mMember );
@@ -163,15 +163,15 @@ QString Member::scanDevices( const QString &query )
char *data = (char*)osync_member_call_plugin( mMember, "scan_devices", const_cast<char*>( query.utf8().data() ), &error );
if ( error != 0 ) {
osync_error_free( &error );
- return QString();
+ return TQString();
} else {
- QString xml = QString::fromUtf8( data );
+ TQString xml = TQString::fromUtf8( data );
free( data );
return xml;
}
}
-bool Member::testConnection( const QString &configuration )
+bool Member::testConnection( const TQString &configuration )
{
Q_ASSERT( mMember );
diff --git a/kitchensync/libqopensync/member.h b/kitchensync/libqopensync/member.h
index d0d883db3..294c19f15 100644
--- a/kitchensync/libqopensync/member.h
+++ b/kitchensync/libqopensync/member.h
@@ -48,12 +48,12 @@ class Member
/**
Returns the configuration directory.
*/
- QString configurationDirectory() const;
+ TQString configurationDirectory() const;
/**
Returns the name of the plugin, the member belongs to.
*/
- QString pluginName() const;
+ TQString pluginName() const;
/**
Returns the plugin, the member belongs to.
@@ -68,18 +68,18 @@ class Member
/**
Sets the name of this member.
*/
- void setName( const QString &name );
+ void setName( const TQString &name );
/**
Returns the name of this member.
*/
- QString name() const;
+ TQString name() const;
/**
Sets the configuration data as byte array. The developer has to decide the
type of the data ( e.g. xml, plain text, binary ).
*/
- void setConfiguration( const QByteArray &configurationData );
+ void setConfiguration( const TQByteArray &configurationData );
/**
Gets the configuration data as byte array. The developer has to decide the
@@ -91,7 +91,7 @@ class Member
@returns The result of this operation.
*/
- Result configuration( QByteArray &configurationData,
+ Result configuration( TQByteArray &configurationData,
bool useDefault = true );
/**
@@ -111,13 +111,13 @@ class Member
The @param query is a plugin specific xml document as well as
the return value.
*/
- QString scanDevices( const QString &query );
+ TQString scanDevices( const TQString &query );
/**
This method can be used to test whether the plugin can connect
to the device with the given configuration.
*/
- bool testConnection( const QString &configuration );
+ bool testConnection( const TQString &configuration );
private:
OSyncMember *mMember;
diff --git a/kitchensync/libqopensync/plugin.cpp b/kitchensync/libqopensync/plugin.cpp
index d22a5f344..acd54447a 100644
--- a/kitchensync/libqopensync/plugin.cpp
+++ b/kitchensync/libqopensync/plugin.cpp
@@ -39,24 +39,24 @@ bool Plugin::isValid() const
return ( mPlugin != 0 );
}
-QString Plugin::name() const
+TQString Plugin::name() const
{
Q_ASSERT( mPlugin );
- return QString::fromLatin1( osync_plugin_get_name( mPlugin ) );
+ return TQString::fromLatin1( osync_plugin_get_name( mPlugin ) );
}
-QString Plugin::longName() const
+TQString Plugin::longName() const
{
Q_ASSERT( mPlugin );
- return QString::fromLatin1( osync_plugin_get_longname( mPlugin ) );
+ return TQString::fromLatin1( osync_plugin_get_longname( mPlugin ) );
}
-QString Plugin::description() const
+TQString Plugin::description() const
{
Q_ASSERT( mPlugin );
- return QString::fromLatin1( osync_plugin_get_description( mPlugin ) );
+ return TQString::fromLatin1( osync_plugin_get_description( mPlugin ) );
}
diff --git a/kitchensync/libqopensync/plugin.h b/kitchensync/libqopensync/plugin.h
index e951dfffa..d26c2826c 100644
--- a/kitchensync/libqopensync/plugin.h
+++ b/kitchensync/libqopensync/plugin.h
@@ -22,7 +22,7 @@
#ifndef QSYNC_PLUGIN_H
#define QSYNC_PLUGIN_H
-#include <qstring.h>
+#include <tqstring.h>
class OSyncPlugin;
@@ -45,17 +45,17 @@ class Plugin
/**
Returns the name of the plugin.
*/
- QString name() const;
+ TQString name() const;
/**
Returns the long name of the plugin.
*/
- QString longName() const;
+ TQString longName() const;
/**
Returns the description of the plugin.
*/
- QString description() const;
+ TQString description() const;
private:
OSyncPlugin *mPlugin;
diff --git a/kitchensync/libqopensync/result.cpp b/kitchensync/libqopensync/result.cpp
index b46040418..d38c32a3d 100644
--- a/kitchensync/libqopensync/result.cpp
+++ b/kitchensync/libqopensync/result.cpp
@@ -96,8 +96,8 @@ Result::Result( OSyncError **error, bool deleteError )
}
mType = type;
- mName = QString::fromUtf8( osync_error_get_name( error ) );
- mMessage = QString::fromUtf8( osync_error_print( error ) );
+ mName = TQString::fromUtf8( osync_error_get_name( error ) );
+ mMessage = TQString::fromUtf8( osync_error_print( error ) );
if ( deleteError )
osync_error_free( error );
@@ -107,22 +107,22 @@ Result::~Result()
{
}
-void Result::setName( const QString &name )
+void Result::setName( const TQString &name )
{
mName = name;
}
-QString Result::name() const
+TQString Result::name() const
{
return mName;
}
-void Result::setMessage( const QString &message )
+void Result::setMessage( const TQString &message )
{
mMessage = message;
}
-QString Result::message() const
+TQString Result::message() const
{
return mMessage;
}
diff --git a/kitchensync/libqopensync/result.h b/kitchensync/libqopensync/result.h
index c7cf13d70..f35ed347a 100644
--- a/kitchensync/libqopensync/result.h
+++ b/kitchensync/libqopensync/result.h
@@ -22,7 +22,7 @@
#ifndef QSYNC_RESULT_H
#define QSYNC_RESULT_H
-#include <qstring.h>
+#include <tqstring.h>
struct OSyncError;
@@ -78,22 +78,22 @@ class Result
/**
Sets the name of the result.
*/
- void setName( const QString &name );
+ void setName( const TQString &name );
/**
Returns the name of the result.
*/
- QString name() const;
+ TQString name() const;
/**
Sets the message text of the result.
*/
- void setMessage( const QString &message );
+ void setMessage( const TQString &message );
/**
Returns the message text of the result.
*/
- QString message() const;
+ TQString message() const;
/**
Sets the type of the result.
@@ -116,8 +116,8 @@ class Result
bool isError() const;
private:
- QString mName;
- QString mMessage;
+ TQString mName;
+ TQString mMessage;
Type mType;
};
diff --git a/kitchensync/libqopensync/syncchange.cpp b/kitchensync/libqopensync/syncchange.cpp
index f64ef6493..5dd72d7ff 100644
--- a/kitchensync/libqopensync/syncchange.cpp
+++ b/kitchensync/libqopensync/syncchange.cpp
@@ -44,42 +44,42 @@ bool SyncChange::isValid() const
return ( mSyncChange != 0 );
}
-void SyncChange::setUid( const QString &uid )
+void SyncChange::setUid( const TQString &uid )
{
osync_change_set_uid( mSyncChange, uid.utf8() );
}
-QString SyncChange::uid() const
+TQString SyncChange::uid() const
{
- return QString::fromUtf8( osync_change_get_uid( mSyncChange ) );
+ return TQString::fromUtf8( osync_change_get_uid( mSyncChange ) );
}
-void SyncChange::setHash( const QString &hash )
+void SyncChange::setHash( const TQString &hash )
{
osync_change_set_hash( mSyncChange, hash.utf8() );
}
-QString SyncChange::hash() const
+TQString SyncChange::hash() const
{
- return QString::fromUtf8( osync_change_get_hash( mSyncChange ) );
+ return TQString::fromUtf8( osync_change_get_hash( mSyncChange ) );
}
-void SyncChange::setData( const QString &data )
+void SyncChange::setData( const TQString &data )
{
osync_change_set_data( mSyncChange, const_cast<char*>( data.utf8().data() ), data.utf8().size(), true );
}
-QString SyncChange::data() const
+TQString SyncChange::data() const
{
int size = osync_change_get_datasize( mSyncChange );
- QString content;
+ TQString content;
if ( objectFormatName() == "file" ) {
fileFormat *format = (fileFormat*)osync_change_get_data( mSyncChange );
if ( format )
- content = QString::fromUtf8( format->data, format->size );
+ content = TQString::fromUtf8( format->data, format->size );
} else
- content = QString::fromUtf8( osync_change_get_data( mSyncChange ), size );
+ content = TQString::fromUtf8( osync_change_get_data( mSyncChange ), size );
return content;
}
@@ -89,12 +89,12 @@ bool SyncChange::hasData() const
return osync_change_has_data( mSyncChange );
}
-QString SyncChange::objectFormatName() const
+TQString SyncChange::objectFormatName() const
{
OSyncObjFormat *format = osync_change_get_objformat( mSyncChange );
Q_ASSERT( format );
- return QString::fromUtf8( osync_objformat_get_name( format ) );
+ return TQString::fromUtf8( osync_objformat_get_name( format ) );
}
Member SyncChange::member() const
diff --git a/kitchensync/libqopensync/syncchange.h b/kitchensync/libqopensync/syncchange.h
index 775d3a8ed..53d9c4401 100644
--- a/kitchensync/libqopensync/syncchange.h
+++ b/kitchensync/libqopensync/syncchange.h
@@ -54,32 +54,32 @@ class SyncChange
/**
Sets the uid of this change.
*/
- void setUid( const QString &uid );
+ void setUid( const TQString &uid );
/**
Returns the uid of this change.
*/
- QString uid() const;
+ TQString uid() const;
/**
Sets the hash of this change.
*/
- void setHash( const QString &hash );
+ void setHash( const TQString &hash );
/**
Returns the hash of this change.
*/
- QString hash() const;
+ TQString hash() const;
/**
Sets the data provided by the plugin.
*/
- void setData( const QString &data );
+ void setData( const TQString &data );
/**
Returns the data provided by the plugin.
*/
- QString data() const;
+ TQString data() const;
/**
Returns whether the change contains data.
@@ -89,7 +89,7 @@ class SyncChange
/**
Returns the object format name.
*/
- QString objectFormatName() const;
+ TQString objectFormatName() const;
/**
Returns the parent member of this change.
diff --git a/kitchensync/libqopensync/syncmapping.cpp b/kitchensync/libqopensync/syncmapping.cpp
index 8097c5482..95939ab85 100644
--- a/kitchensync/libqopensync/syncmapping.cpp
+++ b/kitchensync/libqopensync/syncmapping.cpp
@@ -19,7 +19,7 @@
Boston, MA 02110-1301, USA.
*/
-#include <qstring.h>
+#include <tqstring.h>
#include <osengine/engine.h>
#include "syncmapping.h"
diff --git a/kitchensync/opensyncdbus/dbusclient.cpp b/kitchensync/opensyncdbus/dbusclient.cpp
index fcf6eda30..f992350cf 100644
--- a/kitchensync/opensyncdbus/dbusclient.cpp
+++ b/kitchensync/opensyncdbus/dbusclient.cpp
@@ -29,8 +29,8 @@
#include <dbus/qdbusmessage.h>
#include <dbus/qdbusproxy.h>
-#include <qapplication.h>
-#include <qtimer.h>
+#include <tqapplication.h>
+#include <tqtimer.h>
#include <iostream>
@@ -58,7 +58,7 @@ bool OpenSyncService::handleMethodCall( const QDBusMessage &message )
QDBusMessage reply;
- QString function = message.member();
+ TQString function = message.member();
if ( function == "hello" ) {
reply = hello( message );
} else if ( function == "randomNumber" ) {
@@ -84,11 +84,11 @@ QDBusMessage OpenSyncService::showMember( const QDBusMessage &message )
{
if ( message.count() != 2 ) {
return error( message, "arg_count",
- QString("Wrong number of arguments. Expected 2, got %1.")
+ TQString("Wrong number of arguments. Expected 2, got %1.")
.arg( message.count() ) );
}
- QString groupName = message[ 0 ].toString();
+ TQString groupName = message[ 0 ].toString();
if ( groupName.isEmpty() ) {
return error( message, "missing_arg", "Missing argument: group name." );
}
@@ -110,14 +110,14 @@ QDBusMessage OpenSyncService::showMember( const QDBusMessage &message )
QSync::Group group = env.groupByName( groupName );
if ( !group.isValid() ) {
- return error( message, "group_name", QString("Unknown group '%1'.")
+ return error( message, "group_name", TQString("Unknown group '%1'.")
.arg( groupName ) );
}
QSync::Member member = group.memberById( memberId );
if ( !member.isValid() ) {
return error( message, "member_id",
- QString("Unknown member id '%1' in group '%2'.").arg( groupName )
+ TQString("Unknown member id '%1' in group '%2'.").arg( groupName )
.arg( memberId ) );
}
@@ -135,11 +135,11 @@ QDBusMessage OpenSyncService::showGroup( const QDBusMessage &message )
{
if ( message.count() != 1 ) {
return error( message, "arg_count",
- QString("Wrong number of arguments. Expected 1, got %1")
+ TQString("Wrong number of arguments. Expected 1, got %1")
.arg( message.count() ) );
}
- QString groupName = message[ 0 ].toString();
+ TQString groupName = message[ 0 ].toString();
if ( groupName.isEmpty() ) {
return error( message, "missing_arg", "Missing argument group name." );
}
@@ -155,14 +155,14 @@ QDBusMessage OpenSyncService::showGroup( const QDBusMessage &message )
QSync::Group group = env.groupByName( groupName );
if ( !group.isValid() ) {
- return error( message, "group_name", QString("Unknown group '%1'")
+ return error( message, "group_name", TQString("Unknown group '%1'")
.arg( groupName ) );
}
QSync::Group::Iterator it( &group );
for( it = group.begin(); it != group.end(); ++it ) {
QSync::Member member = *it;
- reply.append( QVariant( member.id() ) );
+ reply.append( TQVariant( member.id() ) );
}
env.finalize();
@@ -172,8 +172,8 @@ QDBusMessage OpenSyncService::showGroup( const QDBusMessage &message )
}
QDBusMessage OpenSyncService::error( const QDBusMessage &message,
- const QString &errorCode,
- const QString &errorMessage )
+ const TQString &errorCode,
+ const TQString &errorMessage )
{
QDBusError error( "org.opensync." + errorCode, errorMessage );
return QDBusMessage::methodError( message, error );
@@ -193,7 +193,7 @@ QDBusMessage OpenSyncService::listPlugins( const QDBusMessage &message )
QSync::Environment::PluginIterator it( env.pluginBegin() );
for ( ; it != env.pluginEnd(); ++it ) {
- reply.append( QVariant( (*it).name() ) );
+ reply.append( TQVariant( (*it).name() ) );
}
env.finalize();
@@ -216,7 +216,7 @@ QDBusMessage OpenSyncService::listGroups( const QDBusMessage &message )
QSync::Environment::GroupIterator it( env.groupBegin() );
for ( ; it != env.groupEnd(); ++it ) {
- reply.append( QVariant( (*it).name() ) );
+ reply.append( TQVariant( (*it).name() ) );
}
env.finalize();
@@ -232,7 +232,7 @@ QDBusMessage OpenSyncService::hello( const QDBusMessage &message )
// QDBusError error;
// reply = QDBusMessage::methodError( message, error );
- reply.append( QVariant( QString( "Hello!" ) ) );
+ reply.append( TQVariant( TQString( "Hello!" ) ) );
return reply;
}
@@ -243,14 +243,14 @@ QDBusMessage OpenSyncService::randomNumber( const QDBusMessage &message )
int number = rand();
- reply.append( QVariant( number ) );
+ reply.append( TQVariant( number ) );
return reply;
}
int main( int argc, char *argv[] )
{
- QApplication app(argc, argv);
+ TQApplication app(argc, argv);
std::cout << "Hello" << std::endl;
diff --git a/kitchensync/opensyncdbus/dbusclient.h b/kitchensync/opensyncdbus/dbusclient.h
index 5cd6635f7..bffcd4ccf 100644
--- a/kitchensync/opensyncdbus/dbusclient.h
+++ b/kitchensync/opensyncdbus/dbusclient.h
@@ -21,7 +21,7 @@
#ifndef DBUSCLIENT_H
#define DBUSCLIENT_H
-#include <qobject.h>
+#include <tqobject.h>
#include <dbus/qdbusobject.h>
@@ -46,8 +46,8 @@ class OpenSyncService : public QDBusObjectBase
QDBusMessage showGroup( const QDBusMessage &message );
QDBusMessage showMember( const QDBusMessage &message );
- QDBusMessage error( const QDBusMessage &, const QString &errorCode,
- const QString &errorMessage );
+ QDBusMessage error( const QDBusMessage &, const TQString &errorCode,
+ const TQString &errorMessage );
private:
QDBusConnection *mConnection;
diff --git a/kitchensync/src/aboutpage.cpp b/kitchensync/src/aboutpage.cpp
index f8110c4d0..0909fa0fc 100644
--- a/kitchensync/src/aboutpage.cpp
+++ b/kitchensync/src/aboutpage.cpp
@@ -18,8 +18,8 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#include <qfile.h>
-#include <qlayout.h>
+#include <tqfile.h>
+#include <tqlayout.h>
#include <kaboutdata.h>
#include <kapplication.h>
@@ -33,28 +33,28 @@
#include "aboutpage.h"
-static QString readFile( const QString &fileName )
+static TQString readFile( const TQString &fileName )
{
- QFile file( fileName );
+ TQFile file( fileName );
if ( !file.open( IO_ReadOnly ) ) {
kdDebug() << "Unable to open file '" << fileName << "'" << endl;
- return QCString();
+ return TQCString();
}
- QString content = QString::fromUtf8( file.readAll() );
+ TQString content = TQString::fromUtf8( file.readAll() );
file.close();
return content;
}
-AboutPage::AboutPage( QWidget *parent )
- : QWidget( parent, "AboutPage" )
+AboutPage::AboutPage( TQWidget *parent )
+ : TQWidget( parent, "AboutPage" )
{
- QVBoxLayout *layout = new QVBoxLayout( this );
+ TQVBoxLayout *layout = new TQVBoxLayout( this );
- QString location = locate( "data", "kitchensync/about/main.html" );
- QString content = readFile( location );
+ TQString location = locate( "data", "kitchensync/about/main.html" );
+ TQString content = readFile( location );
content = content.arg( locate( "data", "libkdepim/about/kde_infopage.css" ) );
if ( kapp->reverseLayout() )
content = content.arg( "@import \"%1\";" ).arg( locate( "data", "libkdepim/about/kde_infopage_rtl.css" ) );
@@ -66,21 +66,21 @@ AboutPage::AboutPage( QWidget *parent )
part->begin( KURL( location ) );
- QString appName( i18n( "KDE KitchenSync" ) );
- QString catchPhrase( i18n( "Get Synchronized!" ) );
- QString quickDescription( i18n( "The KDE Synchronization Tool" ) );
+ TQString appName( i18n( "KDE KitchenSync" ) );
+ TQString catchPhrase( i18n( "Get Synchronized!" ) );
+ TQString quickDescription( i18n( "The KDE Synchronization Tool" ) );
- part->write( content.arg( QFont().pointSize() + 2 ).arg( appName )
+ part->write( content.arg( TQFont().pointSize() + 2 ).arg( appName )
.arg( catchPhrase ).arg( quickDescription ).arg( htmlText() ) );
part->end();
connect( part->browserExtension(),
- SIGNAL( openURLRequest( const KURL&, const KParts::URLArgs& ) ),
- SLOT( handleUrl( const KURL& ) ) );
+ TQT_SIGNAL( openURLRequest( const KURL&, const KParts::URLArgs& ) ),
+ TQT_SLOT( handleUrl( const KURL& ) ) );
connect( part->browserExtension(),
- SIGNAL( createNewWindow( const KURL&, const KParts::URLArgs& ) ),
- SLOT( handleUrl( const KURL& ) ) );
+ TQT_SIGNAL( createNewWindow( const KURL&, const KParts::URLArgs& ) ),
+ TQT_SLOT( handleUrl( const KURL& ) ) );
}
void AboutPage::handleUrl( const KURL &url )
@@ -92,16 +92,16 @@ void AboutPage::handleUrl( const KURL &url )
new KRun( url, this );
}
-QString AboutPage::htmlText() const
+TQString AboutPage::htmlText() const
{
KIconLoader *iconloader = KGlobal::iconLoader();
int iconSize = iconloader->currentSize( KIcon::Desktop );
- QString handbook_icon_path = iconloader->iconPath( "contents2", KIcon::Desktop );
- QString html_icon_path = iconloader->iconPath( "html", KIcon::Desktop );
- QString wizard_icon_path = iconloader->iconPath( "wizard", KIcon::Desktop );
+ TQString handbook_icon_path = iconloader->iconPath( "contents2", KIcon::Desktop );
+ TQString html_icon_path = iconloader->iconPath( "html", KIcon::Desktop );
+ TQString wizard_icon_path = iconloader->iconPath( "wizard", KIcon::Desktop );
- QString info = i18n( "<h2 style='text-align:center; margin-top: 0px;'>Welcome to KitchenSync %1</h2>"
+ TQString info = i18n( "<h2 style='text-align:center; margin-top: 0px;'>Welcome to KitchenSync %1</h2>"
"<p>%1</p>"
"<table align=\"center\">"
"<tr><td><a href=\"%1\"><img width=\"%1\" height=\"%1\" src=\"%1\" /></a></td>"
diff --git a/kitchensync/src/aboutpage.h b/kitchensync/src/aboutpage.h
index d0bed85a0..75f9d489e 100644
--- a/kitchensync/src/aboutpage.h
+++ b/kitchensync/src/aboutpage.h
@@ -23,14 +23,14 @@
#include <kurl.h>
-#include <qwidget.h>
+#include <tqwidget.h>
class AboutPage : public QWidget
{
Q_OBJECT
public:
- AboutPage( QWidget *parent );
+ AboutPage( TQWidget *parent );
signals:
void addGroup();
@@ -39,7 +39,7 @@ class AboutPage : public QWidget
void handleUrl( const KURL& );
private:
- QString htmlText() const;
+ TQString htmlText() const;
};
#endif
diff --git a/kitchensync/src/addresseediffalgo.cpp b/kitchensync/src/addresseediffalgo.cpp
index 18b924b5a..fc73c3677 100644
--- a/kitchensync/src/addresseediffalgo.cpp
+++ b/kitchensync/src/addresseediffalgo.cpp
@@ -25,7 +25,7 @@
using namespace KSync;
-static bool compareString( const QString &left, const QString &right )
+static bool compareString( const TQString &left, const TQString &right )
{
if ( left.isEmpty() && right.isEmpty() )
return true;
@@ -39,8 +39,8 @@ AddresseeDiffAlgo::AddresseeDiffAlgo( const KABC::Addressee &leftAddressee,
{
}
-AddresseeDiffAlgo::AddresseeDiffAlgo( const QString &leftAddressee,
- const QString &rightAddressee )
+AddresseeDiffAlgo::AddresseeDiffAlgo( const TQString &leftAddressee,
+ const TQString &rightAddressee )
{
KABC::VCardConverter converter;
@@ -131,19 +131,19 @@ void AddresseeDiffAlgo::run()
end();
}
-QString AddresseeDiffAlgo::toString( const KABC::PhoneNumber &number )
+TQString AddresseeDiffAlgo::toString( const KABC::PhoneNumber &number )
{
return number.number();
}
-QString AddresseeDiffAlgo::toString( const KABC::Address &addr )
+TQString AddresseeDiffAlgo::toString( const KABC::Address &addr )
{
return addr.formattedAddress();
}
template <class L>
-void AddresseeDiffAlgo::diffList( const QString &id,
- const QValueList<L> &left, const QValueList<L> &right )
+void AddresseeDiffAlgo::diffList( const TQString &id,
+ const TQValueList<L> &left, const TQValueList<L> &right )
{
for ( uint i = 0; i < left.count(); ++i ) {
if ( right.find( left[ i ] ) == right.end() )
diff --git a/kitchensync/src/addresseediffalgo.h b/kitchensync/src/addresseediffalgo.h
index 6eef5a179..e049e9b24 100644
--- a/kitchensync/src/addresseediffalgo.h
+++ b/kitchensync/src/addresseediffalgo.h
@@ -33,16 +33,16 @@ class AddresseeDiffAlgo : public DiffAlgo
{
public:
AddresseeDiffAlgo( const KABC::Addressee &leftAddressee, const KABC::Addressee &rightAddressee );
- AddresseeDiffAlgo( const QString &leftAddressee, const QString &rightAddressee );
+ AddresseeDiffAlgo( const TQString &leftAddressee, const TQString &rightAddressee );
void run();
private:
template <class L>
- void diffList( const QString &id, const QValueList<L> &left, const QValueList<L> &right );
+ void diffList( const TQString &id, const TQValueList<L> &left, const TQValueList<L> &right );
- QString toString( const KABC::PhoneNumber &number );
- QString toString( const KABC::Address &address );
+ TQString toString( const KABC::PhoneNumber &number );
+ TQString toString( const KABC::Address &address );
KABC::Addressee mLeftAddressee;
KABC::Addressee mRightAddressee;
diff --git a/kitchensync/src/calendardiffalgo.cpp b/kitchensync/src/calendardiffalgo.cpp
index f7ef174a2..9d18649a8 100644
--- a/kitchensync/src/calendardiffalgo.cpp
+++ b/kitchensync/src/calendardiffalgo.cpp
@@ -28,7 +28,7 @@
using namespace KSync;
#ifndef KDE_USE_FINAL
-static bool compareString( const QString &left, const QString &right )
+static bool compareString( const TQString &left, const TQString &right )
{
if ( left.isEmpty() && right.isEmpty() )
return true;
@@ -37,42 +37,42 @@ static bool compareString( const QString &left, const QString &right )
}
#endif
-static QString toString( KCal::Attendee *attendee )
+static TQString toString( KCal::Attendee *attendee )
{
return attendee->name() + "<" + attendee->email() + ">";
}
-static QString toString( KCal::Alarm * )
+static TQString toString( KCal::Alarm * )
{
- return QString::null;
+ return TQString::null;
}
-static QString toString( KCal::Incidence * )
+static TQString toString( KCal::Incidence * )
{
- return QString::null;
+ return TQString::null;
}
-static QString toString( KCal::Attachment * )
+static TQString toString( KCal::Attachment * )
{
- return QString::null;
+ return TQString::null;
}
-static QString toString( const QDate &date )
+static TQString toString( const TQDate &date )
{
return date.toString();
}
-static QString toString( const QDateTime &dateTime )
+static TQString toString( const TQDateTime &dateTime )
{
return dateTime.toString();
}
-static QString toString( const QString str )
+static TQString toString( const TQString str )
{
return str;
}
-static QString toString( bool value )
+static TQString toString( bool value )
{
if ( value )
return i18n( "Yes" );
@@ -128,7 +128,7 @@ void CalendarDiffAlgo::diffIncidenceBase( KCal::IncidenceBase *left, KCal::Incid
conflictField( i18n( "Has duration" ), toString( left->hasDuration() ), toString( right->hasDuration() ) );
if ( left->duration() != right->duration() )
- conflictField( i18n( "Duration" ), QString::number( left->duration() ), QString::number( right->duration() ) );
+ conflictField( i18n( "Duration" ), TQString::number( left->duration() ), TQString::number( right->duration() ) );
}
void CalendarDiffAlgo::diffIncidence( KCal::Incidence *left, KCal::Incidence *right )
@@ -195,15 +195,15 @@ void CalendarDiffAlgo::diffTodo( KCal::Todo *left, KCal::Todo *right )
conflictField( i18n( "Has Complete Date" ), toString( left->hasCompletedDate() ), toString( right->hasCompletedDate() ) );
if ( left->percentComplete() != right->percentComplete() )
- conflictField( i18n( "Complete" ), QString::number( left->percentComplete() ), QString::number( right->percentComplete() ) );
+ conflictField( i18n( "Complete" ), TQString::number( left->percentComplete() ), TQString::number( right->percentComplete() ) );
if ( left->completed() != right->completed() )
conflictField( i18n( "Completed" ), toString( left->completed() ), toString( right->completed() ) );
}
template <class L>
-void CalendarDiffAlgo::diffList( const QString &id,
- const QValueList<L> &left, const QValueList<L> &right )
+void CalendarDiffAlgo::diffList( const TQString &id,
+ const TQValueList<L> &left, const TQValueList<L> &right )
{
for ( uint i = 0; i < left.count(); ++i ) {
if ( right.find( left[ i ] ) == right.end() )
diff --git a/kitchensync/src/calendardiffalgo.h b/kitchensync/src/calendardiffalgo.h
index fbfb92daa..0310a0838 100644
--- a/kitchensync/src/calendardiffalgo.h
+++ b/kitchensync/src/calendardiffalgo.h
@@ -39,7 +39,7 @@ class CalendarDiffAlgo : public DiffAlgo
private:
template <class L>
- void diffList( const QString &id, const QValueList<L> &left, const QValueList<L> &right );
+ void diffList( const TQString &id, const TQValueList<L> &left, const TQValueList<L> &right );
void diffIncidenceBase( KCal::IncidenceBase*, KCal::IncidenceBase* );
void diffIncidence( KCal::Incidence*, KCal::Incidence* );
diff --git a/kitchensync/src/configgui.cpp b/kitchensync/src/configgui.cpp
index c57b4d991..6e2aa5d70 100644
--- a/kitchensync/src/configgui.cpp
+++ b/kitchensync/src/configgui.cpp
@@ -45,40 +45,40 @@
#include <klocale.h>
#include <klineedit.h>
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qtextedit.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqtextedit.h>
-ConfigGui::ConfigGui( const QSync::Member &member, QWidget *parent )
- : QWidget( parent ), mMember( member )
+ConfigGui::ConfigGui( const QSync::Member &member, TQWidget *parent )
+ : TQWidget( parent ), mMember( member )
{
- mTopLayout = new QVBoxLayout( this );
+ mTopLayout = new TQVBoxLayout( this );
mTopLayout->setSpacing( KDialog::spacingHint() );
mTopLayout->setMargin( KDialog::marginHint() );
- QBoxLayout *nameLayout = new QHBoxLayout( mTopLayout );
+ TQBoxLayout *nameLayout = new TQHBoxLayout( mTopLayout );
- QLabel *label = new QLabel( i18n("Name:"), this );
+ TQLabel *label = new TQLabel( i18n("Name:"), this );
nameLayout->addWidget( label );
mNameEdit = new KLineEdit( this );
nameLayout->addWidget( mNameEdit );
}
-void ConfigGui::setInstanceName( const QString &t )
+void ConfigGui::setInstanceName( const TQString &t )
{
mNameEdit->setText( t );
}
-QString ConfigGui::instanceName() const
+TQString ConfigGui::instanceName() const
{
return mNameEdit->text();
}
ConfigGui *ConfigGui::Factory::create( const QSync::Member &member,
- QWidget *parent )
+ TQWidget *parent )
{
- QString name = member.pluginName();
+ TQString name = member.pluginName();
if ( name == "file-sync" ) {
return new ConfigGuiFile( member, parent );
} else if ( name == "palm-sync" ) {
@@ -117,19 +117,19 @@ ConfigGui *ConfigGui::Factory::create( const QSync::Member &member,
}
-ConfigGuiXml::ConfigGuiXml( const QSync::Member &member, QWidget *parent )
+ConfigGuiXml::ConfigGuiXml( const QSync::Member &member, TQWidget *parent )
: ConfigGui( member, parent )
{
- mTextEdit = new QTextEdit( this );
+ mTextEdit = new TQTextEdit( this );
topLayout()->addWidget( mTextEdit );
}
-void ConfigGuiXml::load( const QString &xml )
+void ConfigGuiXml::load( const TQString &xml )
{
mTextEdit->setText( xml );
}
-QString ConfigGuiXml::save() const
+TQString ConfigGuiXml::save() const
{
return mTextEdit->text();
}
diff --git a/kitchensync/src/configgui.h b/kitchensync/src/configgui.h
index 0423be715..f339604fc 100644
--- a/kitchensync/src/configgui.h
+++ b/kitchensync/src/configgui.h
@@ -23,7 +23,7 @@
#include <libqopensync/member.h>
-#include <qwidget.h>
+#include <tqwidget.h>
class QBoxLayout;
class KLineEdit;
@@ -32,41 +32,41 @@ class QTextEdit;
class ConfigGui : public QWidget
{
public:
- ConfigGui( const QSync::Member &, QWidget *parent );
+ ConfigGui( const QSync::Member &, TQWidget *parent );
class Factory
{
public:
- static ConfigGui *create( const QSync::Member &, QWidget *parent );
+ static ConfigGui *create( const QSync::Member &, TQWidget *parent );
};
- void setInstanceName( const QString & );
- QString instanceName() const;
+ void setInstanceName( const TQString & );
+ TQString instanceName() const;
- virtual void load( const QString &xml ) = 0;
- virtual QString save() const = 0;
+ virtual void load( const TQString &xml ) = 0;
+ virtual TQString save() const = 0;
QSync::Member member() const { return mMember; }
- QBoxLayout *topLayout() const { return mTopLayout; }
+ TQBoxLayout *topLayout() const { return mTopLayout; }
private:
QSync::Member mMember;
- QBoxLayout *mTopLayout;
+ TQBoxLayout *mTopLayout;
KLineEdit *mNameEdit;
};
class ConfigGuiXml : public ConfigGui
{
public:
- ConfigGuiXml( const QSync::Member &, QWidget *parent );
+ ConfigGuiXml( const QSync::Member &, TQWidget *parent );
- void load( const QString & );
- QString save() const;
+ void load( const TQString & );
+ TQString save() const;
private:
- QTextEdit *mTextEdit;
+ TQTextEdit *mTextEdit;
};
#endif
diff --git a/kitchensync/src/configguiblank.cpp b/kitchensync/src/configguiblank.cpp
index e3f7dbbc1..3e9d47b65 100644
--- a/kitchensync/src/configguiblank.cpp
+++ b/kitchensync/src/configguiblank.cpp
@@ -23,22 +23,22 @@
#include <klocale.h>
-#include <qlabel.h>
-#include <qlayout.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
-ConfigGuiBlank::ConfigGuiBlank( const QSync::Member &member, QWidget *parent )
+ConfigGuiBlank::ConfigGuiBlank( const QSync::Member &member, TQWidget *parent )
: ConfigGui( member, parent )
{
- QLabel *label = new QLabel( i18n( "This member/plugin needs no configuration." ), this );
+ TQLabel *label = new TQLabel( i18n( "This member/plugin needs no configuration." ), this );
topLayout()->addWidget( label );
}
-void ConfigGuiBlank::load( const QString& )
+void ConfigGuiBlank::load( const TQString& )
{
}
-QString ConfigGuiBlank::save() const
+TQString ConfigGuiBlank::save() const
{
- QString xml = "<config></config>";
+ TQString xml = "<config></config>";
return xml;
}
diff --git a/kitchensync/src/configguiblank.h b/kitchensync/src/configguiblank.h
index 692d470e3..e2048ac79 100644
--- a/kitchensync/src/configguiblank.h
+++ b/kitchensync/src/configguiblank.h
@@ -26,10 +26,10 @@
class ConfigGuiBlank : public ConfigGui
{
public:
- ConfigGuiBlank( const QSync::Member &member, QWidget *parent = 0 );
+ ConfigGuiBlank( const QSync::Member &member, TQWidget *parent = 0 );
- void load( const QString &xml );
- QString save() const;
+ void load( const TQString &xml );
+ TQString save() const;
};
#endif
diff --git a/kitchensync/src/configguievo2.cpp b/kitchensync/src/configguievo2.cpp
index a8856c1e8..c313ce3ab 100644
--- a/kitchensync/src/configguievo2.cpp
+++ b/kitchensync/src/configguievo2.cpp
@@ -21,10 +21,10 @@
#include "configguievo2.h"
-#include <qdom.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qstring.h>
+#include <tqdom.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqstring.h>
#include <kurlrequester.h>
#include <kurl.h>
@@ -32,20 +32,20 @@
#include <kdialog.h>
#include <klocale.h>
-ConfigGuiEvo2::ConfigGuiEvo2( const QSync::Member &member, QWidget *parent )
+ConfigGuiEvo2::ConfigGuiEvo2( const QSync::Member &member, TQWidget *parent )
: ConfigGui( member, parent )
{
initGUI();
}
-void ConfigGuiEvo2::load( const QString &xml )
+void ConfigGuiEvo2::load( const TQString &xml )
{
- QDomDocument doc;
+ TQDomDocument doc;
doc.setContent( xml );
- QDomElement docElement = doc.documentElement();
- QDomNode node;
+ TQDomElement docElement = doc.documentElement();
+ TQDomNode node;
for( node = docElement.firstChild(); !node.isNull(); node = node.nextSibling() ) {
- QDomElement element = node.toElement();
+ TQDomElement element = node.toElement();
if ( element.tagName() == "address_path" ) {
mAddressPath->setURL( element.text() );
} else if ( element.tagName() == "calendar_path" ) {
@@ -56,13 +56,13 @@ void ConfigGuiEvo2::load( const QString &xml )
}
}
-QString ConfigGuiEvo2::save() const
+TQString ConfigGuiEvo2::save() const
{
- QString config = "<config>\n";
+ TQString config = "<config>\n";
- config += QString( "<address_path>%1</address_path>\n" ).arg( mAddressPath->url() );
- config += QString( "<calendar_path>%1</calendar_path>\n" ).arg( mCalendarPath->url() );
- config += QString( "<tasks_path>%1</tasks_path>\n" ).arg( mTasksPath->url() );
+ config += TQString( "<address_path>%1</address_path>\n" ).arg( mAddressPath->url() );
+ config += TQString( "<calendar_path>%1</calendar_path>\n" ).arg( mCalendarPath->url() );
+ config += TQString( "<tasks_path>%1</tasks_path>\n" ).arg( mTasksPath->url() );
config += "</config>";
@@ -71,20 +71,20 @@ QString ConfigGuiEvo2::save() const
void ConfigGuiEvo2::initGUI()
{
- QGridLayout *layout = new QGridLayout( topLayout(), 12, 3, KDialog::spacingHint() );
+ TQGridLayout *layout = new TQGridLayout( topLayout(), 12, 3, KDialog::spacingHint() );
layout->setMargin( KDialog::marginHint() );
- layout->addWidget( new QLabel( i18n( "Address Book location:" ), this ), 0, 0 );
+ layout->addWidget( new TQLabel( i18n( "Address Book location:" ), this ), 0, 0 );
mAddressPath = new KURLRequester( this );
mAddressPath->setMode( KFile::Directory );
layout->addMultiCellWidget( mAddressPath, 0, 0, 1, 2 );
- layout->addWidget( new QLabel( i18n( "Calendar location:" ), this ), 1, 0 );
+ layout->addWidget( new TQLabel( i18n( "Calendar location:" ), this ), 1, 0 );
mCalendarPath = new KURLRequester( this );
mCalendarPath->setMode( KFile::Directory );
layout->addMultiCellWidget( mCalendarPath, 1, 1, 1, 2 );
- layout->addWidget( new QLabel( i18n( "Task list location:" ), this ), 2, 0 );
+ layout->addWidget( new TQLabel( i18n( "Task list location:" ), this ), 2, 0 );
mTasksPath = new KURLRequester( this );
mTasksPath->setMode( KFile::Directory );
layout->addMultiCellWidget( mTasksPath, 2, 2, 1, 2 );
diff --git a/kitchensync/src/configguievo2.h b/kitchensync/src/configguievo2.h
index f9e7ad19e..7e3a17679 100644
--- a/kitchensync/src/configguievo2.h
+++ b/kitchensync/src/configguievo2.h
@@ -29,11 +29,11 @@ class KURLRequester;
class ConfigGuiEvo2 : public ConfigGui
{
public:
- ConfigGuiEvo2( const QSync::Member &, QWidget *parent );
+ ConfigGuiEvo2( const QSync::Member &, TQWidget *parent );
- void load( const QString &xml );
+ void load( const TQString &xml );
- QString save() const;
+ TQString save() const;
private:
void initGUI();
diff --git a/kitchensync/src/configguifile.cpp b/kitchensync/src/configguifile.cpp
index e7974ecb6..6a8b0402c 100644
--- a/kitchensync/src/configguifile.cpp
+++ b/kitchensync/src/configguifile.cpp
@@ -25,39 +25,39 @@
#include <klocale.h>
#include <kdialog.h>
-#include <qlayout.h>
-#include <qcheckbox.h>
-#include <qlabel.h>
-#include <qdom.h>
+#include <tqlayout.h>
+#include <tqcheckbox.h>
+#include <tqlabel.h>
+#include <tqdom.h>
-ConfigGuiFile::ConfigGuiFile( const QSync::Member &member, QWidget *parent )
+ConfigGuiFile::ConfigGuiFile( const QSync::Member &member, TQWidget *parent )
: ConfigGui( member, parent )
{
- QBoxLayout *filenameLayout = new QHBoxLayout( topLayout() );
+ TQBoxLayout *filenameLayout = new TQHBoxLayout( topLayout() );
- QLabel *label = new QLabel( i18n("Directory name:"), this );
+ TQLabel *label = new TQLabel( i18n("Directory name:"), this );
filenameLayout->addWidget( label );
mFilename = new KURLRequester( this );
mFilename->setMode( KFile::Directory | KFile::LocalOnly );
filenameLayout->addWidget( mFilename );
- QBoxLayout *recursiveLayout = new QHBoxLayout( topLayout() );
+ TQBoxLayout *recursiveLayout = new TQHBoxLayout( topLayout() );
- mRecursive = new QCheckBox( i18n("Sync all subdirectories"), this );
+ mRecursive = new TQCheckBox( i18n("Sync all subdirectories"), this );
recursiveLayout->addWidget( mRecursive );
topLayout()->addStretch( 1 );
}
-void ConfigGuiFile::load( const QString &xml )
+void ConfigGuiFile::load( const TQString &xml )
{
- QDomDocument doc;
+ TQDomDocument doc;
doc.setContent( xml );
- QDomElement docElement = doc.documentElement();
- QDomNode n;
+ TQDomElement docElement = doc.documentElement();
+ TQDomNode n;
for( n = docElement.firstChild(); !n.isNull(); n = n.nextSibling() ) {
- QDomElement e = n.toElement();
+ TQDomElement e = n.toElement();
if ( e.tagName() == "path" ) {
mFilename->setURL( e.text() );
} else if ( e.tagName() == "recursive" ) {
@@ -66,9 +66,9 @@ void ConfigGuiFile::load( const QString &xml )
}
}
-QString ConfigGuiFile::save() const
+TQString ConfigGuiFile::save() const
{
- QString xml;
+ TQString xml;
xml = "<config>";
xml += "<path>" + mFilename->url() + "</path>";
xml += "<recursive>";
diff --git a/kitchensync/src/configguifile.h b/kitchensync/src/configguifile.h
index 6da034f57..4f1a0b345 100644
--- a/kitchensync/src/configguifile.h
+++ b/kitchensync/src/configguifile.h
@@ -29,14 +29,14 @@ class QCheckBox;
class ConfigGuiFile : public ConfigGui
{
public:
- ConfigGuiFile( const QSync::Member &, QWidget *parent );
+ ConfigGuiFile( const QSync::Member &, TQWidget *parent );
- void load( const QString &xml );
- QString save() const;
+ void load( const TQString &xml );
+ TQString save() const;
private:
KURLRequester *mFilename;
- QCheckBox *mRecursive;
+ TQCheckBox *mRecursive;
};
#endif
diff --git a/kitchensync/src/configguigcalendar.cpp b/kitchensync/src/configguigcalendar.cpp
index 0434de789..8e8006764 100644
--- a/kitchensync/src/configguigcalendar.cpp
+++ b/kitchensync/src/configguigcalendar.cpp
@@ -24,52 +24,52 @@
#include <klocale.h>
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qdom.h>
-#include <qlineedit.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqdom.h>
+#include <tqlineedit.h>
-ConfigGuiGoogleCalendar::ConfigGuiGoogleCalendar( const QSync::Member &member, QWidget *parent )
+ConfigGuiGoogleCalendar::ConfigGuiGoogleCalendar( const QSync::Member &member, TQWidget *parent )
: ConfigGui( member, parent )
{
- QBoxLayout *userLayout = new QHBoxLayout( topLayout() );
+ TQBoxLayout *userLayout = new TQHBoxLayout( topLayout() );
- QLabel *userLbl= new QLabel( i18n("Username:"), this );
+ TQLabel *userLbl= new TQLabel( i18n("Username:"), this );
userLayout->addWidget(userLbl);
- mUsername = new QLineEdit(this);
+ mUsername = new TQLineEdit(this);
userLayout->addWidget(mUsername);
- QBoxLayout *passLayout = new QHBoxLayout( topLayout() );
+ TQBoxLayout *passLayout = new TQHBoxLayout( topLayout() );
- QLabel *passLbl = new QLabel( i18n("Password:"), this );
+ TQLabel *passLbl = new TQLabel( i18n("Password:"), this );
passLayout->addWidget(passLbl);
- mPassword = new QLineEdit(this);
- mPassword->setEchoMode(QLineEdit::Password);
+ mPassword = new TQLineEdit(this);
+ mPassword->setEchoMode(TQLineEdit::Password);
passLayout->addWidget(mPassword);
- topLayout()->addWidget(new QLabel( i18n("Please notice that currently the password is stored as plain text in the plugin configuration file"), this ));
+ topLayout()->addWidget(new TQLabel( i18n("Please notice that currently the password is stored as plain text in the plugin configuration file"), this ));
- QBoxLayout *urlLayout = new QHBoxLayout( topLayout() );
- QLabel *urlLbl = new QLabel( i18n("Calendar URL:"), this );
+ TQBoxLayout *urlLayout = new TQHBoxLayout( topLayout() );
+ TQLabel *urlLbl = new TQLabel( i18n("Calendar URL:"), this );
urlLayout->addWidget(urlLbl);
- mUrl = new QLineEdit(this);
+ mUrl = new TQLineEdit(this);
urlLayout->addWidget(mUrl);
topLayout()->addStretch( 1 );
}
-void ConfigGuiGoogleCalendar::load( const QString &xml )
+void ConfigGuiGoogleCalendar::load( const TQString &xml )
{
- QDomDocument doc;
+ TQDomDocument doc;
doc.setContent( xml );
- QDomElement docElement = doc.documentElement();
- QDomNode n;
+ TQDomElement docElement = doc.documentElement();
+ TQDomNode n;
for( n = docElement.firstChild(); !n.isNull(); n = n.nextSibling() ) {
- QDomElement e = n.toElement();
+ TQDomElement e = n.toElement();
if ( e.tagName() == "username" ) {
mUsername->setText(e.text());
} else if ( e.tagName() == "password" ) {
@@ -80,21 +80,21 @@ void ConfigGuiGoogleCalendar::load( const QString &xml )
}
}
-QString ConfigGuiGoogleCalendar::save() const
+TQString ConfigGuiGoogleCalendar::save() const
{
- QDomDocument doc;
- QDomElement root = doc.createElement("config");
+ TQDomDocument doc;
+ TQDomElement root = doc.createElement("config");
doc.appendChild(root);
- QDomElement un = doc.createElement("username");
+ TQDomElement un = doc.createElement("username");
root.appendChild(un);
un.appendChild(doc.createTextNode(mUsername->text()));
- QDomElement pass = doc.createElement("password");
+ TQDomElement pass = doc.createElement("password");
root.appendChild(pass);
pass.appendChild(doc.createTextNode(mPassword->text()));
- QDomElement url = doc.createElement("url");
+ TQDomElement url = doc.createElement("url");
root.appendChild(url);
url.appendChild(doc.createTextNode(mUrl->text()));
diff --git a/kitchensync/src/configguigcalendar.h b/kitchensync/src/configguigcalendar.h
index e87eb300d..e1ebdef84 100644
--- a/kitchensync/src/configguigcalendar.h
+++ b/kitchensync/src/configguigcalendar.h
@@ -29,15 +29,15 @@ class QLineEdit;
class ConfigGuiGoogleCalendar : public ConfigGui
{
public:
- ConfigGuiGoogleCalendar( const QSync::Member &, QWidget *parent );
+ ConfigGuiGoogleCalendar( const QSync::Member &, TQWidget *parent );
- void load( const QString &xml );
- QString save() const;
+ void load( const TQString &xml );
+ TQString save() const;
private:
- QLineEdit *mUsername;
- QLineEdit *mPassword;
- QLineEdit *mUrl;
+ TQLineEdit *mUsername;
+ TQLineEdit *mPassword;
+ TQLineEdit *mUrl;
};
#endif
diff --git a/kitchensync/src/configguignokii.cpp b/kitchensync/src/configguignokii.cpp
index 1379f5e5a..38f2fbf3a 100644
--- a/kitchensync/src/configguignokii.cpp
+++ b/kitchensync/src/configguignokii.cpp
@@ -27,20 +27,20 @@
#include <kdebug.h>
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qlineedit.h>
-#include <qcombobox.h>
-#include <qdom.h>
-#include <qvbox.h>
-
-ConfigGuiGnokii::ConfigGuiGnokii( const QSync::Member &member, QWidget *parent )
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqlineedit.h>
+#include <tqcombobox.h>
+#include <tqdom.h>
+#include <tqvbox.h>
+
+ConfigGuiGnokii::ConfigGuiGnokii( const QSync::Member &member, TQWidget *parent )
: ConfigGui( member, parent )
{
- QGridLayout *layout = new QGridLayout( topLayout() );
+ TQGridLayout *layout = new TQGridLayout( topLayout() );
// Model
- QLabel *label = new QLabel( i18n("Model:"), this );
+ TQLabel *label = new TQLabel( i18n("Model:"), this );
layout->addWidget( label, 0, 0 );
mModel = new KComboBox( true, this );
@@ -62,18 +62,18 @@ ConfigGuiGnokii::ConfigGuiGnokii( const QSync::Member &member, QWidget *parent )
mModel->insertItem( "symbian" );
mModel->insertItem( "sx1" );
- connect( mModel, SIGNAL (activated( int ) ),
- this, SLOT( slotModelChanged () ) );
+ connect( mModel, TQT_SIGNAL (activated( int ) ),
+ this, TQT_SLOT( slotModelChanged () ) );
// Connection
- label = new QLabel( i18n("Connection:"), this );
+ label = new TQLabel( i18n("Connection:"), this );
layout->addWidget( label, 1, 0 );
- mConnection = new QComboBox( this );
+ mConnection = new TQComboBox( this );
layout->addWidget( mConnection, 1, 1 );
- connect( mConnection, SIGNAL (activated( int ) ),
- this, SLOT( slotConnectionChanged ( int ) ) );
+ connect( mConnection, TQT_SIGNAL (activated( int ) ),
+ this, TQT_SLOT( slotConnectionChanged ( int ) ) );
// this is a list of all connection types accepted by the gnokii-sync plugin
mConnectionTypes.append( ConnectionType( "bluetooth", i18n( "Bluetooth" ) ) );
@@ -93,7 +93,7 @@ ConfigGuiGnokii::ConfigGuiGnokii( const QSync::Member &member, QWidget *parent )
mConnection->insertItem( (*it).second );
}
- QVBox *connectionWidget = new QVBox( this );
+ TQVBox *connectionWidget = new TQVBox( this );
connectionWidget->setMargin( KDialog::marginHint() );
connectionWidget->setSpacing( 5 );
@@ -103,7 +103,7 @@ ConfigGuiGnokii::ConfigGuiGnokii( const QSync::Member &member, QWidget *parent )
layout->addMultiCellWidget( connectionWidget, 2, 2, 0, 1 );
// Port
- mPortLabel = new QLabel( i18n("Port:"), this );
+ mPortLabel = new TQLabel( i18n("Port:"), this );
layout->addWidget( mPortLabel, 2, 0 );
mPortLabel->hide();
@@ -161,14 +161,14 @@ void ConfigGuiGnokii::slotModelChanged()
mBluetooth->setChannel("");
}
-void ConfigGuiGnokii::load( const QString &xml )
+void ConfigGuiGnokii::load( const TQString &xml )
{
- QDomDocument doc;
+ TQDomDocument doc;
doc.setContent( xml );
- QDomElement docElement = doc.documentElement();
- QDomNode n;
+ TQDomElement docElement = doc.documentElement();
+ TQDomNode n;
for( n = docElement.firstChild(); !n.isNull(); n = n.nextSibling() ) {
- QDomElement e = n.toElement();
+ TQDomElement e = n.toElement();
if ( e.tagName() == "connection" ) {
for ( uint i = 0; i < mConnectionTypes.count(); i++ ) {
if ( mConnectionTypes[i].first == e.text()) {
@@ -188,9 +188,9 @@ void ConfigGuiGnokii::load( const QString &xml )
}
}
-QString ConfigGuiGnokii::save() const
+TQString ConfigGuiGnokii::save() const
{
- QString xml;
+ TQString xml;
xml = "<config>";
ConnectionTypeList::ConstIterator it;
@@ -204,7 +204,7 @@ QString ConfigGuiGnokii::save() const
if ( (*it).first == "bluetooth" )
xml += "<port>" + mBluetooth->address() + "</port>";
else if ( (*it).first == "dku2libusb" )
- xml += "<port>" + QString("FF:FF:FF:FF:FF:FF") + "</port>"; // Only place holder for libgnokii
+ xml += "<port>" + TQString("FF:FF:FF:FF:FF:FF") + "</port>"; // Only place holder for libgnokii
else
xml += "<port>" + mPort->currentText() + "</port>";
diff --git a/kitchensync/src/configguignokii.h b/kitchensync/src/configguignokii.h
index 6f413a4c1..939e46730 100644
--- a/kitchensync/src/configguignokii.h
+++ b/kitchensync/src/configguignokii.h
@@ -24,8 +24,8 @@
#include "configgui.h"
#include "connectionwidgets.h"
-#include <qvaluelist.h>
-#include <qpair.h>
+#include <tqvaluelist.h>
+#include <tqpair.h>
class QLabel;
class QLineEdit;
@@ -36,21 +36,21 @@ class ConfigGuiGnokii : public ConfigGui
Q_OBJECT
public:
- ConfigGuiGnokii( const QSync::Member &, QWidget *parent );
+ ConfigGuiGnokii( const QSync::Member &, TQWidget *parent );
- void load( const QString &xml );
- QString save() const;
+ void load( const TQString &xml );
+ TQString save() const;
private:
- QComboBox *mConnection;
+ TQComboBox *mConnection;
KComboBox *mPort;
- QLabel *mPortLabel;
+ TQLabel *mPortLabel;
KComboBox *mModel;
BluetoothWidget *mBluetooth;
- typedef QPair<QString, QString> ConnectionType;
- typedef QValueList<ConnectionType> ConnectionTypeList;
+ typedef QPair<TQString, TQString> ConnectionType;
+ typedef TQValueList<ConnectionType> ConnectionTypeList;
ConnectionTypeList mConnectionTypes;
protected slots:
diff --git a/kitchensync/src/configguigpe.cpp b/kitchensync/src/configguigpe.cpp
index 4b71c766a..b3bff63af 100644
--- a/kitchensync/src/configguigpe.cpp
+++ b/kitchensync/src/configguigpe.cpp
@@ -21,18 +21,18 @@
#include "configguigpe.h"
-#include <qcheckbox.h>
-#include <qdom.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qspinbox.h>
+#include <tqcheckbox.h>
+#include <tqdom.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqspinbox.h>
#include <kcombobox.h>
#include <kdialog.h>
#include <klineedit.h>
#include <klocale.h>
-ConfigGuiGpe::ConfigGuiGpe( const QSync::Member &member, QWidget *parent )
+ConfigGuiGpe::ConfigGuiGpe( const QSync::Member &member, TQWidget *parent )
: ConfigGui( member, parent )
{
initGUI();
@@ -41,14 +41,14 @@ ConfigGuiGpe::ConfigGuiGpe( const QSync::Member &member, QWidget *parent )
mConnectionMode->insertItem( i18n( "Ssh" ) );
}
-void ConfigGuiGpe::load( const QString &xml )
+void ConfigGuiGpe::load( const TQString &xml )
{
- QDomDocument doc;
+ TQDomDocument doc;
doc.setContent( xml );
- QDomElement docElement = doc.documentElement();
- QDomNode node;
+ TQDomElement docElement = doc.documentElement();
+ TQDomNode node;
for( node = docElement.firstChild(); !node.isNull(); node = node.nextSibling() ) {
- QDomElement element = node.toElement();
+ TQDomElement element = node.toElement();
if ( element.tagName() == "use_local" ) {
if ( element.text().toInt() == 1 )
mConnectionMode->setCurrentItem( 0 );
@@ -64,15 +64,15 @@ void ConfigGuiGpe::load( const QString &xml )
}
}
-QString ConfigGuiGpe::save() const
+TQString ConfigGuiGpe::save() const
{
- QString config = "<config>";
+ TQString config = "<config>";
- config += QString( "<use_local>%1</use_local>" ).arg( mConnectionMode->currentItem() == 0 );
- config += QString( "<use_ssh>%1</use_ssh>" ).arg( mConnectionMode->currentItem() == 1 );
- config += QString( "<handheld_ip>%1</handheld_ip>" ).arg( mIP->text() );
- config += QString( "<handheld_port>%1</handheld_port>" ).arg( mPort->value() );
- config += QString( "<handheld_user>%1</handheld_user>" ).arg( mUser->text() );
+ config += TQString( "<use_local>%1</use_local>" ).arg( mConnectionMode->currentItem() == 0 );
+ config += TQString( "<use_ssh>%1</use_ssh>" ).arg( mConnectionMode->currentItem() == 1 );
+ config += TQString( "<handheld_ip>%1</handheld_ip>" ).arg( mIP->text() );
+ config += TQString( "<handheld_port>%1</handheld_port>" ).arg( mPort->value() );
+ config += TQString( "<handheld_user>%1</handheld_user>" ).arg( mUser->text() );
config += "</config>";
@@ -81,23 +81,23 @@ QString ConfigGuiGpe::save() const
void ConfigGuiGpe::initGUI()
{
- QGridLayout *layout = new QGridLayout( topLayout(), 12, 4, KDialog::spacingHint() );
+ TQGridLayout *layout = new TQGridLayout( topLayout(), 12, 4, KDialog::spacingHint() );
layout->setMargin( KDialog::marginHint() );
- layout->addWidget( new QLabel( i18n( "Connection Mode:" ), this ), 0, 0 );
+ layout->addWidget( new TQLabel( i18n( "Connection Mode:" ), this ), 0, 0 );
mConnectionMode = new KComboBox( this );
layout->addMultiCellWidget( mConnectionMode, 0, 0, 0, 3 );
- layout->addWidget( new QLabel( i18n( "IP Address:" ), this ), 1, 0 );
+ layout->addWidget( new TQLabel( i18n( "IP Address:" ), this ), 1, 0 );
mIP = new KLineEdit( this );
mIP->setInputMask( "000.000.000.000" );
layout->addWidget( mIP, 1, 1 );
- layout->addWidget( new QLabel( i18n( "Port:" ), this ), 1, 2, Qt::AlignRight );
- mPort = new QSpinBox( 1, 65536, 1, this );
+ layout->addWidget( new TQLabel( i18n( "Port:" ), this ), 1, 2, Qt::AlignRight );
+ mPort = new TQSpinBox( 1, 65536, 1, this );
layout->addWidget( mPort, 1, 3 );
- layout->addWidget( new QLabel( i18n( "User:" ), this ), 2, 0 );
+ layout->addWidget( new TQLabel( i18n( "User:" ), this ), 2, 0 );
mUser = new KLineEdit( this );
layout->addMultiCellWidget( mUser, 2, 2, 1, 3 );
}
diff --git a/kitchensync/src/configguigpe.h b/kitchensync/src/configguigpe.h
index 48f66674e..141f084e3 100644
--- a/kitchensync/src/configguigpe.h
+++ b/kitchensync/src/configguigpe.h
@@ -32,10 +32,10 @@ class KLineEdit;
class ConfigGuiGpe : public ConfigGui
{
public:
- ConfigGuiGpe( const QSync::Member &, QWidget *parent );
+ ConfigGuiGpe( const QSync::Member &, TQWidget *parent );
- void load( const QString &xml );
- QString save() const;
+ void load( const TQString &xml );
+ TQString save() const;
private:
void initGUI();
@@ -43,7 +43,7 @@ class ConfigGuiGpe : public ConfigGui
KComboBox *mConnectionMode;
KLineEdit *mIP;
- QSpinBox *mPort;
+ TQSpinBox *mPort;
KLineEdit *mUser;
};
diff --git a/kitchensync/src/configguiirmc.cpp b/kitchensync/src/configguiirmc.cpp
index 54d837b68..721c82d70 100644
--- a/kitchensync/src/configguiirmc.cpp
+++ b/kitchensync/src/configguiirmc.cpp
@@ -30,19 +30,19 @@
#include <kdebug.h>
-#include <qapplication.h>
-#include <qeventloop.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qpushbutton.h>
-#include <qspinbox.h>
-#include <qtabwidget.h>
-#include <qtooltip.h>
-#include <qvbox.h>
+#include <tqapplication.h>
+#include <tqeventloop.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqpushbutton.h>
+#include <tqspinbox.h>
+#include <tqtabwidget.h>
+#include <tqtooltip.h>
+#include <tqvbox.h>
#include "configguiirmc.h"
-ConfigGuiIRMC::ConfigGuiIRMC( const QSync::Member &member, QWidget *parent )
+ConfigGuiIRMC::ConfigGuiIRMC( const QSync::Member &member, TQWidget *parent )
: ConfigGui( member, parent )
{
initGUI();
@@ -51,20 +51,20 @@ ConfigGuiIRMC::ConfigGuiIRMC( const QSync::Member &member, QWidget *parent )
mConnectionType->insertItem( i18n( "InfraRed (IR)" ) );
mConnectionType->insertItem( i18n( "Cable" ) );
- connect( mConnectionType, SIGNAL( activated( int ) ),
- this, SLOT( connectionTypeChanged( int ) ) );
+ connect( mConnectionType, TQT_SIGNAL( activated( int ) ),
+ this, TQT_SLOT( connectionTypeChanged( int ) ) );
connectionTypeChanged( 0 );
}
-void ConfigGuiIRMC::load( const QString &xml )
+void ConfigGuiIRMC::load( const TQString &xml )
{
- QDomDocument doc;
+ TQDomDocument doc;
doc.setContent( xml );
- QDomElement docElement = doc.documentElement();
- QDomNode node;
+ TQDomElement docElement = doc.documentElement();
+ TQDomNode node;
for ( node = docElement.firstChild(); !node.isNull(); node = node.nextSibling() ) {
- QDomElement element = node.toElement();
+ TQDomElement element = node.toElement();
if ( element.tagName() == "connectmedium" ) {
if ( element.text() == "bluetooth" ) {
mConnectionType->setCurrentItem( 0 );
@@ -91,13 +91,13 @@ void ConfigGuiIRMC::load( const QString &xml )
mCableWidget->load( docElement );
}
-QString ConfigGuiIRMC::save() const
+TQString ConfigGuiIRMC::save() const
{
- QDomDocument doc;
- QDomElement config = doc.createElement( "config" );
+ TQDomDocument doc;
+ TQDomElement config = doc.createElement( "config" );
doc.appendChild( config );
- QDomElement element = doc.createElement( "connectmedium" );
+ TQDomElement element = doc.createElement( "connectmedium" );
if ( mConnectionType->currentItem() == 0 )
element.appendChild( doc.createTextNode( "bluetooth" ) );
if ( mConnectionType->currentItem() == 1 )
@@ -108,11 +108,11 @@ QString ConfigGuiIRMC::save() const
config.appendChild( element );
if ( mConnectionType->currentItem() == 0 ) {
- QDomElement btunit = doc.createElement( "btunit" );
+ TQDomElement btunit = doc.createElement( "btunit" );
if ( !mBluetoothWidget->address().isEmpty() )
btunit.appendChild( doc.createTextNode( mBluetoothWidget->address() ) );
- QDomElement btchannel = doc.createElement( "btchannel" );
+ TQDomElement btchannel = doc.createElement( "btchannel" );
if ( !mBluetoothWidget->channel().isEmpty() )
btchannel.appendChild( doc.createTextNode( mBluetoothWidget->channel() ) );
@@ -121,7 +121,7 @@ QString ConfigGuiIRMC::save() const
}
if ( mDontTellSync->isChecked() ) {
- QDomElement dontellsync = doc.createElement( "donttellsync" );
+ TQDomElement dontellsync = doc.createElement( "donttellsync" );
dontellsync.appendChild( doc.createTextNode( "true" ) );
config.appendChild( dontellsync );
}
@@ -148,17 +148,17 @@ void ConfigGuiIRMC::connectionTypeChanged( int type )
void ConfigGuiIRMC::initGUI()
{
- QTabWidget *tabWidget = new QTabWidget( this );
+ TQTabWidget *tabWidget = new TQTabWidget( this );
topLayout()->addWidget( tabWidget );
- QVBox *connectionWidget = new QVBox( tabWidget );
+ TQVBox *connectionWidget = new TQVBox( tabWidget );
connectionWidget->setMargin( KDialog::marginHint() );
connectionWidget->setSpacing( 5 );
tabWidget->addTab( connectionWidget, i18n( "Connection" ) );
mConnectionType = new KComboBox( connectionWidget );
- QToolTip::add( mConnectionType, i18n( "Select your connection type." ) );
+ TQToolTip::add( mConnectionType, i18n( "Select your connection type." ) );
mBluetoothWidget = new BluetoothWidget( connectionWidget );
mBluetoothWidget->hide();
@@ -173,18 +173,18 @@ void ConfigGuiIRMC::initGUI()
connectionWidget->setStretchFactor( mIRWidget, 1 );
connectionWidget->setStretchFactor( mCableWidget, 1 );
- QVBox *optionsWidget = new QVBox( tabWidget );
+ TQVBox *optionsWidget = new TQVBox( tabWidget );
optionsWidget->setMargin( KDialog::marginHint() );
optionsWidget->setSpacing( 5 );
tabWidget->addTab( optionsWidget, i18n( "Options" ) );
- QHBox *optionBox = new QHBox( optionsWidget );
+ TQHBox *optionBox = new TQHBox( optionsWidget );
optionBox->setSpacing( KDialog::spacingHint() );
- QLabel *label = new QLabel( i18n( "Don't send OBEX UUID (IRMC-SYNC)" ), optionBox );
- mDontTellSync = new QCheckBox( optionBox );
- QToolTip::add( mDontTellSync, i18n( "Don't send OBEX UUID while connecting. Needed for older IrMC based mobile phones." ) );
+ TQLabel *label = new TQLabel( i18n( "Don't send OBEX UUID (IRMC-SYNC)" ), optionBox );
+ mDontTellSync = new TQCheckBox( optionBox );
+ TQToolTip::add( mDontTellSync, i18n( "Don't send OBEX UUID while connecting. Needed for older IrMC based mobile phones." ) );
label->setBuddy( mDontTellSync );
}
diff --git a/kitchensync/src/configguiirmc.h b/kitchensync/src/configguiirmc.h
index a50051679..20f1197c8 100644
--- a/kitchensync/src/configguiirmc.h
+++ b/kitchensync/src/configguiirmc.h
@@ -22,8 +22,8 @@
#ifndef CONFIGGUIIRMC_H
#define CONFIGGUIIRMC_H
-#include <qcheckbox.h>
-#include <qdom.h>
+#include <tqcheckbox.h>
+#include <tqdom.h>
#include "configgui.h"
#include "connectionwidgets.h"
@@ -39,10 +39,10 @@ class ConfigGuiIRMC : public ConfigGui
Q_OBJECT
public:
- ConfigGuiIRMC( const QSync::Member &, QWidget *parent );
+ ConfigGuiIRMC( const QSync::Member &, TQWidget *parent );
- void load( const QString &xml );
- QString save() const;
+ void load( const TQString &xml );
+ TQString save() const;
protected slots:
void connectionTypeChanged( int type );
@@ -51,7 +51,7 @@ class ConfigGuiIRMC : public ConfigGui
void initGUI();
KComboBox *mConnectionType;
- QCheckBox *mDontTellSync;
+ TQCheckBox *mDontTellSync;
BluetoothWidget *mBluetoothWidget;
IRWidget *mIRWidget;
diff --git a/kitchensync/src/configguijescs.cpp b/kitchensync/src/configguijescs.cpp
index 6a66e8590..2b37ad424 100644
--- a/kitchensync/src/configguijescs.cpp
+++ b/kitchensync/src/configguijescs.cpp
@@ -21,29 +21,29 @@
#include "configguijescs.h"
-#include <qcheckbox.h>
-#include <qdom.h>
-#include <qlabel.h>
-#include <qlayout.h>
+#include <tqcheckbox.h>
+#include <tqdom.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
#include <klineedit.h>
#include <kdialog.h>
#include <klocale.h>
-ConfigGuiJescs::ConfigGuiJescs( const QSync::Member &member, QWidget *parent )
+ConfigGuiJescs::ConfigGuiJescs( const QSync::Member &member, TQWidget *parent )
: ConfigGui( member, parent )
{
initGUI();
}
-void ConfigGuiJescs::load( const QString &xml )
+void ConfigGuiJescs::load( const TQString &xml )
{
- QDomDocument doc;
+ TQDomDocument doc;
doc.setContent( xml );
- QDomElement docElement = doc.documentElement();
- QDomNode node;
+ TQDomElement docElement = doc.documentElement();
+ TQDomNode node;
for( node = docElement.firstChild(); !node.isNull(); node = node.nextSibling() ) {
- QDomElement element = node.toElement();
+ TQDomElement element = node.toElement();
if ( element.tagName() == "url" ) {
mUrl->setText( element.text() );
} else if ( element.tagName() == "username" ) {
@@ -56,18 +56,18 @@ void ConfigGuiJescs::load( const QString &xml )
}
}
-QString ConfigGuiJescs::save() const
+TQString ConfigGuiJescs::save() const
{
int delNotifyState;
- QString config = "<config>\n";
+ TQString config = "<config>\n";
- config += QString( "<url>%1</url>\n" ).arg( mUrl->text() );
- config += QString( "<username>%1</username>\n" ).arg( mUsername->text() );
- config += QString( "<password>%1</password>\n" ).arg( mPassword->text() );
+ config += TQString( "<url>%1</url>\n" ).arg( mUrl->text() );
+ config += TQString( "<username>%1</username>\n" ).arg( mUsername->text() );
+ config += TQString( "<password>%1</password>\n" ).arg( mPassword->text() );
if ( mDelNotify->isChecked() ) { delNotifyState = 1;
} else { delNotifyState = 0;
}
- config += QString( "<del_notify>%1</del_notify>\n" ).arg( delNotifyState );
+ config += TQString( "<del_notify>%1</del_notify>\n" ).arg( delNotifyState );
config += "</config>";
@@ -76,23 +76,23 @@ QString ConfigGuiJescs::save() const
void ConfigGuiJescs::initGUI()
{
- QGridLayout *layout = new QGridLayout( topLayout(), 12, 3, KDialog::spacingHint() );
+ TQGridLayout *layout = new TQGridLayout( topLayout(), 12, 3, KDialog::spacingHint() );
layout->setMargin( KDialog::marginHint() );
- layout->addWidget( new QLabel( i18n( "URL:" ), this ), 0, 0 );
+ layout->addWidget( new TQLabel( i18n( "URL:" ), this ), 0, 0 );
mUrl = new KLineEdit( this );
layout->addMultiCellWidget( mUrl, 0, 0, 1, 2 );
- layout->addWidget( new QLabel( i18n( "Username:" ), this ), 1, 0 );
+ layout->addWidget( new TQLabel( i18n( "Username:" ), this ), 1, 0 );
mUsername = new KLineEdit( this );
layout->addMultiCellWidget( mUsername, 1, 1, 1, 2 );
- layout->addWidget( new QLabel( i18n( "Password:" ), this ), 2, 0 );
+ layout->addWidget( new TQLabel( i18n( "Password:" ), this ), 2, 0 );
mPassword = new KLineEdit( this );
mPassword->setEchoMode( KLineEdit::Password );
layout->addMultiCellWidget( mPassword, 2, 2, 1, 2 );
- mDelNotify = new QCheckBox( this );
+ mDelNotify = new TQCheckBox( this );
mDelNotify->setText( "Notify attendees about event/task deletion" );
layout->addMultiCellWidget( mDelNotify, 3, 3, 0, 2 );
}
diff --git a/kitchensync/src/configguijescs.h b/kitchensync/src/configguijescs.h
index 4e56376bb..672d81b72 100644
--- a/kitchensync/src/configguijescs.h
+++ b/kitchensync/src/configguijescs.h
@@ -30,11 +30,11 @@ class QCheckBox;
class ConfigGuiJescs : public ConfigGui
{
public:
- ConfigGuiJescs( const QSync::Member &, QWidget *parent );
+ ConfigGuiJescs( const QSync::Member &, TQWidget *parent );
- void load( const QString &xml );
+ void load( const TQString &xml );
- QString save() const;
+ TQString save() const;
private:
void initGUI();
@@ -42,7 +42,7 @@ class ConfigGuiJescs : public ConfigGui
KLineEdit *mUrl;
KLineEdit *mUsername;
KLineEdit *mPassword;
- QCheckBox *mDelNotify;
+ TQCheckBox *mDelNotify;
};
#endif
diff --git a/kitchensync/src/configguildap.cpp b/kitchensync/src/configguildap.cpp
index ce4881156..3ef451c36 100644
--- a/kitchensync/src/configguildap.cpp
+++ b/kitchensync/src/configguildap.cpp
@@ -21,18 +21,18 @@
#include "configguildap.h"
-#include <qcheckbox.h>
-#include <qdom.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qspinbox.h>
+#include <tqcheckbox.h>
+#include <tqdom.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqspinbox.h>
#include <kcombobox.h>
#include <kdialog.h>
#include <klineedit.h>
#include <klocale.h>
-ConfigGuiLdap::ConfigGuiLdap( const QSync::Member &member, QWidget *parent )
+ConfigGuiLdap::ConfigGuiLdap( const QSync::Member &member, TQWidget *parent )
: ConfigGui( member, parent )
{
initGUI();
@@ -42,14 +42,14 @@ ConfigGuiLdap::ConfigGuiLdap( const QSync::Member &member, QWidget *parent )
mSearchScope->insertItem( i18n( "Sub" ) );
}
-void ConfigGuiLdap::load( const QString &xml )
+void ConfigGuiLdap::load( const TQString &xml )
{
- QDomDocument doc;
+ TQDomDocument doc;
doc.setContent( xml );
- QDomElement docElement = doc.documentElement();
- QDomNode node;
+ TQDomElement docElement = doc.documentElement();
+ TQDomNode node;
for( node = docElement.firstChild(); !node.isNull(); node = node.nextSibling() ) {
- QDomElement element = node.toElement();
+ TQDomElement element = node.toElement();
if ( element.tagName() == "servername" ) {
mLdapWidget->setHost( element.text() );
} else if ( element.tagName() == "serverport" ) {
@@ -69,7 +69,7 @@ void ConfigGuiLdap::load( const QString &xml )
} else if ( element.tagName() == "keyattr" ) {
mKeyAttribute->setText( element.text() );
} else if ( element.tagName() == "scope" ) {
- QStringList list;
+ TQStringList list;
list << "base" << "one" << "sub";
for ( uint i = 0; i < list.count(); ++i )
if ( list[ i ] == element.text() )
@@ -89,30 +89,30 @@ void ConfigGuiLdap::load( const QString &xml )
}
}
-QString ConfigGuiLdap::save() const
+TQString ConfigGuiLdap::save() const
{
- QString config = "<config>\n";
-
- config += QString( "<servername>%1</servername>\n" ).arg( mLdapWidget->host() );
- config += QString( "<serverport>%1</serverport>\n" ).arg( mLdapWidget->port() );
- config += QString( "<binddn>%1</binddn>\n" ).arg( mLdapWidget->bindDN() );
- config += QString( "<password>%1</password>\n" ).arg( mLdapWidget->password() );
- config += QString( "<anonymous>%1</anonymous>\n" ).arg( mLdapWidget->isAuthAnon() ? "1" : "0" );
- config += QString( "<searchbase>%1</searchbase>\n" ).arg( mLdapWidget->dn() );
- config += QString( "<searchfilter>%1</searchfilter>\n" ).arg( mLdapWidget->filter() );
- config += QString( "<storebase>%1</storebase>\n" ).arg( mLdapWidget->dn() );
- config += QString( "<keyattr>%1</keyattr>\n" ).arg( mKeyAttribute->text() );
-
- QStringList scopes;
+ TQString config = "<config>\n";
+
+ config += TQString( "<servername>%1</servername>\n" ).arg( mLdapWidget->host() );
+ config += TQString( "<serverport>%1</serverport>\n" ).arg( mLdapWidget->port() );
+ config += TQString( "<binddn>%1</binddn>\n" ).arg( mLdapWidget->bindDN() );
+ config += TQString( "<password>%1</password>\n" ).arg( mLdapWidget->password() );
+ config += TQString( "<anonymous>%1</anonymous>\n" ).arg( mLdapWidget->isAuthAnon() ? "1" : "0" );
+ config += TQString( "<searchbase>%1</searchbase>\n" ).arg( mLdapWidget->dn() );
+ config += TQString( "<searchfilter>%1</searchfilter>\n" ).arg( mLdapWidget->filter() );
+ config += TQString( "<storebase>%1</storebase>\n" ).arg( mLdapWidget->dn() );
+ config += TQString( "<keyattr>%1</keyattr>\n" ).arg( mKeyAttribute->text() );
+
+ TQStringList scopes;
scopes << "base" << "one" << "sub";
- config += QString( "<scope>%1</scope>\n" ).arg( scopes[ mSearchScope->currentItem() ] );
+ config += TQString( "<scope>%1</scope>\n" ).arg( scopes[ mSearchScope->currentItem() ] );
- config += QString( "<authmech>SIMPLE</authmech>\n" );
- config += QString( "<encryption>%1</encryption>\n" ).arg( mEncryption->isChecked() ? "1" : "0" );
+ config += TQString( "<authmech>SIMPLE</authmech>\n" );
+ config += TQString( "<encryption>%1</encryption>\n" ).arg( mEncryption->isChecked() ? "1" : "0" );
- config += QString( "<ldap_read>%1</ldap_read>\n" ).arg( mReadLdap->isChecked() ? "1" : "0" );
- config += QString( "<ldap_write>%1</ldap_write>\n" ).arg( mWriteLdap->isChecked() ? "1" : "0" );
+ config += TQString( "<ldap_read>%1</ldap_read>\n" ).arg( mReadLdap->isChecked() ? "1" : "0" );
+ config += TQString( "<ldap_write>%1</ldap_write>\n" ).arg( mWriteLdap->isChecked() ? "1" : "0" );
config += "</config>";
@@ -121,7 +121,7 @@ QString ConfigGuiLdap::save() const
void ConfigGuiLdap::initGUI()
{
- QGridLayout *layout = new QGridLayout( topLayout(), 12, 4, KDialog::spacingHint() );
+ TQGridLayout *layout = new TQGridLayout( topLayout(), 12, 4, KDialog::spacingHint() );
layout->setMargin( KDialog::marginHint() );
mLdapWidget = new KABC::LdapConfigWidget( KABC::LdapConfigWidget::W_HOST |
@@ -135,14 +135,14 @@ void ConfigGuiLdap::initGUI()
mKeyAttribute = new KLineEdit( this );
mSearchScope = new KComboBox( this );
- mEncryption = new QCheckBox( i18n( "Use encryption" ), this );
- mReadLdap = new QCheckBox( i18n( "Load data from LDAP" ), this );
- mWriteLdap = new QCheckBox( i18n( "Save data to LDAP" ), this );
+ mEncryption = new TQCheckBox( i18n( "Use encryption" ), this );
+ mReadLdap = new TQCheckBox( i18n( "Load data from LDAP" ), this );
+ mWriteLdap = new TQCheckBox( i18n( "Save data to LDAP" ), this );
layout->addMultiCellWidget( mLdapWidget, 0, 9, 0, 3 );
- layout->addWidget( new QLabel( i18n( "Key Attribute:" ), this ), 10, 0 );
+ layout->addWidget( new TQLabel( i18n( "Key Attribute:" ), this ), 10, 0 );
layout->addMultiCellWidget( mKeyAttribute, 10, 10, 1, 2 );
- layout->addWidget( new QLabel( i18n( "Search Scope:" ), this ), 11, 0 );
+ layout->addWidget( new TQLabel( i18n( "Search Scope:" ), this ), 11, 0 );
layout->addMultiCellWidget( mSearchScope, 11, 11, 1, 2 );
layout->addWidget( mEncryption, 12, 0 );
layout->addWidget( mReadLdap, 13, 0 );
diff --git a/kitchensync/src/configguildap.h b/kitchensync/src/configguildap.h
index e02d7ab68..d40c01e38 100644
--- a/kitchensync/src/configguildap.h
+++ b/kitchensync/src/configguildap.h
@@ -38,10 +38,10 @@ class ConfigGuiLdap : public ConfigGui
Q_OBJECT
public:
- ConfigGuiLdap( const QSync::Member &, QWidget *parent );
+ ConfigGuiLdap( const QSync::Member &, TQWidget *parent );
- void load( const QString &xml );
- QString save() const;
+ void load( const TQString &xml );
+ TQString save() const;
private:
void initGUI();
@@ -49,9 +49,9 @@ class ConfigGuiLdap : public ConfigGui
KABC::LdapConfigWidget *mLdapWidget;
KLineEdit *mKeyAttribute;
KComboBox *mSearchScope;
- QCheckBox *mEncryption;
- QCheckBox *mReadLdap;
- QCheckBox *mWriteLdap;
+ TQCheckBox *mEncryption;
+ TQCheckBox *mReadLdap;
+ TQCheckBox *mWriteLdap;
};
diff --git a/kitchensync/src/configguimoto.cpp b/kitchensync/src/configguimoto.cpp
index 80c493dca..a310692f0 100644
--- a/kitchensync/src/configguimoto.cpp
+++ b/kitchensync/src/configguimoto.cpp
@@ -21,39 +21,39 @@
#include "configguimoto.h"
-#include <qdom.h>
-#include <qlabel.h>
-#include <qlayout.h>
+#include <tqdom.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
#include <klineedit.h>
#include <kdialog.h>
#include <klocale.h>
-ConfigGuiMoto::ConfigGuiMoto( const QSync::Member &member, QWidget *parent )
+ConfigGuiMoto::ConfigGuiMoto( const QSync::Member &member, TQWidget *parent )
: ConfigGui( member, parent )
{
initGUI();
}
-void ConfigGuiMoto::load( const QString &xml )
+void ConfigGuiMoto::load( const TQString &xml )
{
- QDomDocument doc;
+ TQDomDocument doc;
doc.setContent( xml );
- QDomElement docElement = doc.documentElement();
- QDomNode node;
+ TQDomElement docElement = doc.documentElement();
+ TQDomNode node;
for( node = docElement.firstChild(); !node.isNull(); node = node.nextSibling() ) {
- QDomElement element = node.toElement();
+ TQDomElement element = node.toElement();
if ( element.tagName() == "device" ) {
mDeviceString->setText( element.text() );
}
}
}
-QString ConfigGuiMoto::save() const
+TQString ConfigGuiMoto::save() const
{
- QString config = "<config>\n";
+ TQString config = "<config>\n";
- config += QString( "<device>%1</device>\n" ).arg( mDeviceString->text() );
+ config += TQString( "<device>%1</device>\n" ).arg( mDeviceString->text() );
config += "</config>";
@@ -62,10 +62,10 @@ QString ConfigGuiMoto::save() const
void ConfigGuiMoto::initGUI()
{
- QGridLayout *layout = new QGridLayout( topLayout(), 12, 3, KDialog::spacingHint() );
+ TQGridLayout *layout = new TQGridLayout( topLayout(), 12, 3, KDialog::spacingHint() );
layout->setMargin( KDialog::marginHint() );
- layout->addWidget( new QLabel( i18n( "Device String:" ), this ), 0, 0 );
+ layout->addWidget( new TQLabel( i18n( "Device String:" ), this ), 0, 0 );
mDeviceString = new KLineEdit( this );
layout->addMultiCellWidget( mDeviceString, 0, 0, 1, 2 );
}
diff --git a/kitchensync/src/configguimoto.h b/kitchensync/src/configguimoto.h
index 54afcb759..cd588facf 100644
--- a/kitchensync/src/configguimoto.h
+++ b/kitchensync/src/configguimoto.h
@@ -29,10 +29,10 @@ class KLineEdit;
class ConfigGuiMoto : public ConfigGui
{
public:
- ConfigGuiMoto( const QSync::Member &, QWidget *parent );
+ ConfigGuiMoto( const QSync::Member &, TQWidget *parent );
- void load( const QString &xml );
- QString save() const;
+ void load( const TQString &xml );
+ TQString save() const;
private:
void initGUI();
diff --git a/kitchensync/src/configguiopie.cpp b/kitchensync/src/configguiopie.cpp
index 6d0a5d80c..e823ffe3e 100644
--- a/kitchensync/src/configguiopie.cpp
+++ b/kitchensync/src/configguiopie.cpp
@@ -23,59 +23,59 @@
#include <klocale.h>
-#include <qcombobox.h>
-#include <qdom.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qlineedit.h>
-#include <qspinbox.h>
-
-ConfigGuiOpie::ConfigGuiOpie( const QSync::Member &member, QWidget *parent )
+#include <tqcombobox.h>
+#include <tqdom.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqlineedit.h>
+#include <tqspinbox.h>
+
+ConfigGuiOpie::ConfigGuiOpie( const QSync::Member &member, TQWidget *parent )
: ConfigGui( member, parent )
{
- QGridLayout *layout = new QGridLayout( topLayout() );
+ TQGridLayout *layout = new TQGridLayout( topLayout() );
- QLabel *label = new QLabel( i18n("Device IP:"), this );
+ TQLabel *label = new TQLabel( i18n("Device IP:"), this );
layout->addWidget( label, 0, 0 );
- mDeviceIP = new QLineEdit( this );
+ mDeviceIP = new TQLineEdit( this );
mDeviceIP->setInputMask( "000.000.000.000" );
label->setBuddy( mDeviceIP );
layout->addWidget( mDeviceIP, 0, 1 );
- label = new QLabel( i18n("Device Type:"), this );
+ label = new TQLabel( i18n("Device Type:"), this );
layout->addWidget( label, 1, 0 );
- mDeviceType = new QComboBox( this );
+ mDeviceType = new TQComboBox( this );
label->setBuddy( mDeviceType );
layout->addWidget( mDeviceType, 1, 1 );
- label = new QLabel( i18n("Username:"), this );
+ label = new TQLabel( i18n("Username:"), this );
layout->addWidget( label, 2, 0 );
- mUserName = new QLineEdit( this );
+ mUserName = new TQLineEdit( this );
label->setBuddy( mUserName );
layout->addWidget( mUserName, 2, 1 );
- label = new QLabel( i18n("Password:"), this );
+ label = new TQLabel( i18n("Password:"), this );
layout->addWidget( label, 3, 0 );
- mPassword = new QLineEdit( this );
- mPassword->setEchoMode( QLineEdit::Password );
+ mPassword = new TQLineEdit( this );
+ mPassword->setEchoMode( TQLineEdit::Password );
label->setBuddy( mPassword );
layout->addWidget( mPassword, 3, 1 );
- label = new QLabel( i18n("Protocol:"), this );
+ label = new TQLabel( i18n("Protocol:"), this );
layout->addWidget( label, 4, 0 );
- mConnectionType = new QComboBox( this );
+ mConnectionType = new TQComboBox( this );
label->setBuddy( mConnectionType );
layout->addWidget( mConnectionType, 4, 1 );
- label = new QLabel( i18n("Port:"), this );
+ label = new TQLabel( i18n("Port:"), this );
layout->addWidget( label, 5, 0 );
- mPort = new QSpinBox( this );
+ mPort = new TQSpinBox( this );
mPort->setRange( 0, 65335 );
label->setBuddy( mPort );
layout->addWidget( mPort, 5, 1 );
@@ -89,14 +89,14 @@ ConfigGuiOpie::ConfigGuiOpie( const QSync::Member &member, QWidget *parent )
topLayout()->addStretch( 1 );
}
-void ConfigGuiOpie::load( const QString &xml )
+void ConfigGuiOpie::load( const TQString &xml )
{
- QDomDocument doc;
+ TQDomDocument doc;
doc.setContent( xml );
- QDomElement docElement = doc.documentElement();
- QDomNode n;
+ TQDomElement docElement = doc.documentElement();
+ TQDomNode n;
for( n = docElement.firstChild(); !n.isNull(); n = n.nextSibling() ) {
- QDomElement e = n.toElement();
+ TQDomElement e = n.toElement();
if ( e.tagName() == "username" ) {
mUserName->setText( e.text() );
} else if ( e.tagName() == "password" ) {
@@ -119,16 +119,16 @@ void ConfigGuiOpie::load( const QString &xml )
}
}
-QString ConfigGuiOpie::save() const
+TQString ConfigGuiOpie::save() const
{
- QString xml;
+ TQString xml;
xml = "<config>";
xml += "<username>" + mUserName->text() + "</username>";
xml += "<password>" + mPassword->text() + "</password>";
xml += "<url>" + mDeviceIP->text() + "</url>";
- xml += "<device>" + QString( mDeviceType->currentItem() == 0 ? "opie" : "qtopia2" ) + "</device>";
- xml += "<port>" + QString::number( mPort->value() ) + "</port>";
- xml += "<conntype>" + QString( mConnectionType->currentItem() == 0 ? "scp" : "ftp" ) + "</conntype>";
+ xml += "<device>" + TQString( mDeviceType->currentItem() == 0 ? "opie" : "qtopia2" ) + "</device>";
+ xml += "<port>" + TQString::number( mPort->value() ) + "</port>";
+ xml += "<conntype>" + TQString( mConnectionType->currentItem() == 0 ? "scp" : "ftp" ) + "</conntype>";
xml += "</config>";
return xml;
diff --git a/kitchensync/src/configguiopie.h b/kitchensync/src/configguiopie.h
index 671526d6d..8d5e195a2 100644
--- a/kitchensync/src/configguiopie.h
+++ b/kitchensync/src/configguiopie.h
@@ -30,18 +30,18 @@ class QSpinBox;
class ConfigGuiOpie : public ConfigGui
{
public:
- ConfigGuiOpie( const QSync::Member &, QWidget *parent );
+ ConfigGuiOpie( const QSync::Member &, TQWidget *parent );
- void load( const QString &xml );
- QString save() const;
+ void load( const TQString &xml );
+ TQString save() const;
private:
- QLineEdit *mDeviceIP;
- QComboBox *mDeviceType;
- QLineEdit *mUserName;
- QLineEdit *mPassword;
- QComboBox *mConnectionType;
- QSpinBox *mPort;
+ TQLineEdit *mDeviceIP;
+ TQComboBox *mDeviceType;
+ TQLineEdit *mUserName;
+ TQLineEdit *mPassword;
+ TQComboBox *mConnectionType;
+ TQSpinBox *mPort;
};
#endif
diff --git a/kitchensync/src/configguipalm.cpp b/kitchensync/src/configguipalm.cpp
index de18e92c2..03d87cdb4 100644
--- a/kitchensync/src/configguipalm.cpp
+++ b/kitchensync/src/configguipalm.cpp
@@ -24,18 +24,18 @@
#include <klineedit.h>
#include <klocale.h>
-#include <qbuttongroup.h>
-#include <qcheckbox.h>
-#include <qdom.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qradiobutton.h>
-#include <qspinbox.h>
-#include <qtabwidget.h>
+#include <tqbuttongroup.h>
+#include <tqcheckbox.h>
+#include <tqdom.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqradiobutton.h>
+#include <tqspinbox.h>
+#include <tqtabwidget.h>
#include "configguipalm.h"
-ConfigGuiPalm::ConfigGuiPalm( const QSync::Member &member, QWidget *parent )
+ConfigGuiPalm::ConfigGuiPalm( const QSync::Member &member, TQWidget *parent )
: ConfigGui( member, parent )
{
initGUI();
@@ -53,14 +53,14 @@ ConfigGuiPalm::ConfigGuiPalm( const QSync::Member &member, QWidget *parent )
mSpeed->insertItem( "115200" );
}
-void ConfigGuiPalm::load( const QString &xml )
+void ConfigGuiPalm::load( const TQString &xml )
{
- QDomDocument doc;
+ TQDomDocument doc;
doc.setContent( xml );
- QDomElement docElement = doc.documentElement();
- QDomNode node;
+ TQDomElement docElement = doc.documentElement();
+ TQDomNode node;
for( node = docElement.firstChild(); !node.isNull(); node = node.nextSibling() ) {
- QDomElement element = node.toElement();
+ TQDomElement element = node.toElement();
if ( element.tagName() == "sockaddr" ) {
mDevice->setCurrentText( element.text() );
} else if ( element.tagName() == "speed" ) {
@@ -88,20 +88,20 @@ void ConfigGuiPalm::load( const QString &xml )
}
}
-QString ConfigGuiPalm::save() const
+TQString ConfigGuiPalm::save() const
{
- QString config = "<config>";
+ TQString config = "<config>";
config += "<sockaddr>" + mDevice->currentText() + "</sockaddr>";
config += "<username>" + mUserName->text() + "</username>";
- config += "<timeout>" + QString::number( mTimeout->value() ) + "</timeout>";
+ config += "<timeout>" + TQString::number( mTimeout->value() ) + "</timeout>";
config += "<type>0</type>";
config += "<speed>" + mSpeed->currentText() + "</speed>";
config += "<id>0</id>";
config += "<codepage>cp1252</codepage>";
- config += "<popup>" + QString( mPopup->isChecked() ? "1" : "0" ) + "</popup>";
+ config += "<popup>" + TQString( mPopup->isChecked() ? "1" : "0" ) + "</popup>";
- QString popup;
+ TQString popup;
if ( mSyncAlways->isChecked() )
popup = "0";
else if ( mSyncAsk->isChecked() )
@@ -118,29 +118,29 @@ QString ConfigGuiPalm::save() const
void ConfigGuiPalm::initGUI()
{
- QFont boldFont = font();
+ TQFont boldFont = font();
boldFont.setBold( true );
- QTabWidget *tabWidget = new QTabWidget( this );
+ TQTabWidget *tabWidget = new TQTabWidget( this );
- QWidget *connectionWidget = new QWidget( tabWidget );
- QVBoxLayout *connectionLayout = new QVBoxLayout( connectionWidget,
+ TQWidget *connectionWidget = new TQWidget( tabWidget );
+ TQVBoxLayout *connectionLayout = new TQVBoxLayout( connectionWidget,
KDialog::marginHint(), KDialog::spacingHint() );
- QLabel *label = new QLabel( i18n( "Connection" ), connectionWidget );
+ TQLabel *label = new TQLabel( i18n( "Connection" ), connectionWidget );
label->setFont( boldFont );
connectionLayout->addWidget( label );
- QGridLayout *gridLayout = new QGridLayout( connectionLayout, 3, 2, KDialog::spacingHint() );
+ TQGridLayout *gridLayout = new TQGridLayout( connectionLayout, 3, 2, KDialog::spacingHint() );
gridLayout->setMargin( KDialog::marginHint() );
- gridLayout->addWidget( new QLabel( i18n( "Port:" ), connectionWidget ), 0, 0 );
- gridLayout->addWidget( new QLabel( i18n( "Speed:" ), connectionWidget ), 1, 0 );
- gridLayout->addWidget( new QLabel( i18n( "Timeout:" ), connectionWidget ), 2, 0 );
+ gridLayout->addWidget( new TQLabel( i18n( "Port:" ), connectionWidget ), 0, 0 );
+ gridLayout->addWidget( new TQLabel( i18n( "Speed:" ), connectionWidget ), 1, 0 );
+ gridLayout->addWidget( new TQLabel( i18n( "Timeout:" ), connectionWidget ), 2, 0 );
mDevice = new KComboBox( true, connectionWidget );
mSpeed = new KComboBox( connectionWidget );
- mTimeout = new QSpinBox( 1, 60, 1, connectionWidget );
+ mTimeout = new TQSpinBox( 1, 60, 1, connectionWidget );
mTimeout->setSuffix( i18n( " sec" ) );
gridLayout->addWidget( mDevice, 0, 1 );
@@ -148,49 +148,49 @@ void ConfigGuiPalm::initGUI()
gridLayout->addWidget( mTimeout, 2, 1 );
gridLayout->setColStretch( 1, 1 );
- label = new QLabel( i18n( "User" ), connectionWidget );
+ label = new TQLabel( i18n( "User" ), connectionWidget );
label->setFont( boldFont );
connectionLayout->addWidget( label );
- gridLayout = new QGridLayout( connectionLayout, 1, 2, KDialog::spacingHint() );
+ gridLayout = new TQGridLayout( connectionLayout, 1, 2, KDialog::spacingHint() );
gridLayout->setMargin( KDialog::marginHint() );
- gridLayout->addWidget( new QLabel( i18n( "Username:" ), connectionWidget ), 0, 0 );
+ gridLayout->addWidget( new TQLabel( i18n( "Username:" ), connectionWidget ), 0, 0 );
mUserName = new KLineEdit( connectionWidget );
gridLayout->addWidget( mUserName, 0, 1 );
- label = new QLabel( i18n( "What to do if Username does not match" ), connectionWidget );
+ label = new TQLabel( i18n( "What to do if Username does not match" ), connectionWidget );
label->setFont( boldFont );
connectionLayout->addWidget( label );
- gridLayout = new QGridLayout( connectionLayout, 1, 2, KDialog::spacingHint() );
+ gridLayout = new TQGridLayout( connectionLayout, 1, 2, KDialog::spacingHint() );
gridLayout->setMargin( KDialog::marginHint() );
- QButtonGroup *buttonGroup = new QButtonGroup( 1, Qt::Horizontal, connectionWidget );
+ TQButtonGroup *buttonGroup = new TQButtonGroup( 1, Qt::Horizontal, connectionWidget );
buttonGroup->setExclusive( true );
- buttonGroup->setFrameStyle( QFrame::NoFrame );
- mSyncAlways = new QRadioButton( i18n( "Sync Anyway" ), buttonGroup );
- mSyncAsk = new QRadioButton( i18n( "Ask What To Do" ), buttonGroup );
- mSyncAbort = new QRadioButton( i18n( "Abort Sync" ), buttonGroup );
+ buttonGroup->setFrameStyle( TQFrame::NoFrame );
+ mSyncAlways = new TQRadioButton( i18n( "Sync Anyway" ), buttonGroup );
+ mSyncAsk = new TQRadioButton( i18n( "Ask What To Do" ), buttonGroup );
+ mSyncAbort = new TQRadioButton( i18n( "Abort Sync" ), buttonGroup );
gridLayout->addMultiCellWidget( buttonGroup, 0, 0, 0, 1 );
connectionLayout->addStretch( 1 );
tabWidget->addTab( connectionWidget, i18n( "Connection" ) );
- QWidget *optionWidget = new QWidget( tabWidget );
- QVBoxLayout *optionLayout = new QVBoxLayout( optionWidget,
+ TQWidget *optionWidget = new TQWidget( tabWidget );
+ TQVBoxLayout *optionLayout = new TQVBoxLayout( optionWidget,
KDialog::marginHint(), KDialog::spacingHint() );
- label = new QLabel( i18n( "Hotsync Notification" ), optionWidget );
+ label = new TQLabel( i18n( "Hotsync Notification" ), optionWidget );
label->setFont( boldFont );
optionLayout->addWidget( label );
- gridLayout = new QGridLayout( optionLayout, 1, 2, KDialog::spacingHint() );
+ gridLayout = new TQGridLayout( optionLayout, 1, 2, KDialog::spacingHint() );
gridLayout->setMargin( KDialog::marginHint() );
- mPopup = new QCheckBox( i18n( "Popup when interaction is required" ), optionWidget );
+ mPopup = new TQCheckBox( i18n( "Popup when interaction is required" ), optionWidget );
gridLayout->addMultiCellWidget( mPopup, 0, 0, 0, 1 );
optionLayout->addStretch( 1 );
diff --git a/kitchensync/src/configguipalm.h b/kitchensync/src/configguipalm.h
index 212ef61a6..bfae30a24 100644
--- a/kitchensync/src/configguipalm.h
+++ b/kitchensync/src/configguipalm.h
@@ -33,25 +33,25 @@ class QSpinBox;
class ConfigGuiPalm : public ConfigGui
{
public:
- ConfigGuiPalm( const QSync::Member &, QWidget *parent );
+ ConfigGuiPalm( const QSync::Member &, TQWidget *parent );
- void load( const QString &xml );
- QString save() const;
+ void load( const TQString &xml );
+ TQString save() const;
private:
void initGUI();
KComboBox *mDevice;
KComboBox *mSpeed;
- QSpinBox *mTimeout;
+ TQSpinBox *mTimeout;
KLineEdit *mUserName;
- QRadioButton *mSyncAlways;
- QRadioButton *mSyncAsk;
- QRadioButton *mSyncAbort;
+ TQRadioButton *mSyncAlways;
+ TQRadioButton *mSyncAsk;
+ TQRadioButton *mSyncAbort;
- QCheckBox *mPopup;
+ TQCheckBox *mPopup;
KComboBox *mVerbosity;
KComboBox *mCodePage;
};
diff --git a/kitchensync/src/configguisunbird.cpp b/kitchensync/src/configguisunbird.cpp
index 7b09cd50c..99e86f3c7 100644
--- a/kitchensync/src/configguisunbird.cpp
+++ b/kitchensync/src/configguisunbird.cpp
@@ -22,16 +22,16 @@
#include "configguisunbird.h"
-#include <qdom.h>
-#include <qtabwidget.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qbuttongroup.h>
-#include <qcheckbox.h>
-#include <qsizepolicy.h>
-#include <qptrlist.h>
-#include <qspinbox.h>
-#include <qwidget.h>
+#include <tqdom.h>
+#include <tqtabwidget.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqbuttongroup.h>
+#include <tqcheckbox.h>
+#include <tqsizepolicy.h>
+#include <tqptrlist.h>
+#include <tqspinbox.h>
+#include <tqwidget.h>
#include <kurlrequester.h>
#include <klineedit.h>
@@ -40,131 +40,131 @@
#include <klocale.h>
#include <kfile.h>
-ConfigGuiSunbird::ConfigGuiSunbird( const QSync::Member &member, QWidget *parent )
+ConfigGuiSunbird::ConfigGuiSunbird( const QSync::Member &member, TQWidget *parent )
: ConfigGui( member, parent )
{
- QTabWidget *tabWidget = new QTabWidget( this );
+ TQTabWidget *tabWidget = new TQTabWidget( this );
topLayout()->addWidget( tabWidget );
- mLocalWidget = new QWidget( tabWidget );
- mLocalLayout = new QVBoxLayout( mLocalWidget, KDialog::spacingHint() );
+ mLocalWidget = new TQWidget( tabWidget );
+ mLocalLayout = new TQVBoxLayout( mLocalWidget, KDialog::spacingHint() );
- mWebdavWidget = new QWidget( tabWidget );
- mWebdavLayout = new QVBoxLayout( mWebdavWidget, KDialog::spacingHint() );
+ mWebdavWidget = new TQWidget( tabWidget );
+ mWebdavLayout = new TQVBoxLayout( mWebdavWidget, KDialog::spacingHint() );
tabWidget->addTab( mLocalWidget, i18n( "Local Calendars" ) );
tabWidget->addTab( mWebdavWidget, i18n( "WebDAV Calendars" ) );
KPushButton *mLocalAddButton = new KPushButton( mLocalWidget );
mLocalAddButton->setText( i18n( "Add new calendar" ) );
- mLocalAddButton->setSizePolicy( QSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed ) );
+ mLocalAddButton->setSizePolicy( TQSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Fixed ) );
mLocalLayout->addWidget( mLocalAddButton );
- connect( mLocalAddButton, SIGNAL( clicked() ),
- this, SLOT( addLocalCalendar() ) );
+ connect( mLocalAddButton, TQT_SIGNAL( clicked() ),
+ this, TQT_SLOT( addLocalCalendar() ) );
KPushButton *mWebdavAddButton = new KPushButton( mWebdavWidget );
mWebdavAddButton->setText( i18n( "Add new calendar" ) );
- mWebdavAddButton->setSizePolicy( QSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed ) );
+ mWebdavAddButton->setSizePolicy( TQSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Fixed ) );
mWebdavLayout->addWidget( mWebdavAddButton );
- connect( mWebdavAddButton, SIGNAL( clicked() ),
- this, SLOT( addWebdavCalendar() ) );
+ connect( mWebdavAddButton, TQT_SIGNAL( clicked() ),
+ this, TQT_SLOT( addWebdavCalendar() ) );
- mLocalSpacer = new QSpacerItem( 20, 40, QSizePolicy::Expanding );
+ mLocalSpacer = new TQSpacerItem( 20, 40, TQSizePolicy::Expanding );
mLocalLayout->addItem( mLocalSpacer );
- mWebdavSpacer = new QSpacerItem( 20, 40, QSizePolicy::Expanding );
+ mWebdavSpacer = new TQSpacerItem( 20, 40, TQSizePolicy::Expanding );
mWebdavLayout->addItem( mWebdavSpacer );
}
-void ConfigGuiSunbird::load( const QString &xml )
+void ConfigGuiSunbird::load( const TQString &xml )
{
- QString path;
- QString url;
- QString username;
- QString password;
- QString defaultcal;
- QString days;
-
- QDomDocument doc;
+ TQString path;
+ TQString url;
+ TQString username;
+ TQString password;
+ TQString defaultcal;
+ TQString days;
+
+ TQDomDocument doc;
doc.setContent( xml );
- QDomElement docElement = doc.documentElement();
- QDomNode node;
+ TQDomElement docElement = doc.documentElement();
+ TQDomNode node;
for( node = docElement.firstChild(); !node.isNull(); node = node.nextSibling() ) {
- QDomElement element = node.toElement();
+ TQDomElement element = node.toElement();
if ( element.tagName() == "file" ) {
- QDomAttr pathAttr = element.attributeNode( "path" );
+ TQDomAttr pathAttr = element.attributeNode( "path" );
path = pathAttr.value();
- QDomAttr defaultAttr = element.attributeNode( "default" );
+ TQDomAttr defaultAttr = element.attributeNode( "default" );
defaultcal = defaultAttr.value();
- QDomAttr daysAttr = element.attributeNode( "deletedaysold" );
+ TQDomAttr daysAttr = element.attributeNode( "deletedaysold" );
days = daysAttr.value();
LocalCalendar *cal = new LocalCalendar( path, defaultcal, days, mLocalWidget );
mLocalLayout->removeItem( mLocalSpacer );
- cal->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
+ cal->setSizePolicy( TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Fixed ) );
mLocalLayout->addWidget( cal );
mLocalLayout->addItem( mLocalSpacer );
mLocalList.append( cal );
- connect( cal, SIGNAL( deleteRequest( LocalCalendar* ) ), SLOT( delLocalCalendar( LocalCalendar* ) ) );
+ connect( cal, TQT_SIGNAL( deleteRequest( LocalCalendar* ) ), TQT_SLOT( delLocalCalendar( LocalCalendar* ) ) );
cal->show();
} else if ( element.tagName() == "webdav" ) {
- QDomAttr urlAttr = element.attributeNode( "url" );
+ TQDomAttr urlAttr = element.attributeNode( "url" );
url = urlAttr.value();
- QDomAttr unameAttr = element.attributeNode( "username" );
+ TQDomAttr unameAttr = element.attributeNode( "username" );
username = unameAttr.value();
- QDomAttr pwordAttr = element.attributeNode( "password" );
+ TQDomAttr pwordAttr = element.attributeNode( "password" );
password = pwordAttr.value();
- QDomAttr defaultAttr = element.attributeNode( "default" );
+ TQDomAttr defaultAttr = element.attributeNode( "default" );
defaultcal = defaultAttr.value();
- QDomAttr daysAttr = element.attributeNode( "deletedaysold" );
+ TQDomAttr daysAttr = element.attributeNode( "deletedaysold" );
days = daysAttr.value();
WebdavCalendar *cal = new WebdavCalendar( username, password,
url, defaultcal, days, mWebdavWidget );
mWebdavLayout->removeItem( mWebdavSpacer );
- cal->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
+ cal->setSizePolicy( TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Fixed ) );
mWebdavLayout->addWidget( cal );
mWebdavLayout->addItem( mWebdavSpacer );
mWebdavList.append( cal );
- connect( cal, SIGNAL( deleteRequest( WebdavCalendar* ) ), SLOT( delWebdavCalendar( WebdavCalendar* ) ) );
+ connect( cal, TQT_SIGNAL( deleteRequest( WebdavCalendar* ) ), TQT_SLOT( delWebdavCalendar( WebdavCalendar* ) ) );
cal->show();
}
}
}
-QString ConfigGuiSunbird::save() const
+TQString ConfigGuiSunbird::save() const
{
- QString config = "<config>\n";
+ TQString config = "<config>\n";
for ( uint i = 0; i < mLocalList.count(); ++i ) {
LocalCalendar *lcal = mLocalList[ i ];
- config += QString( "<file " );
- config += QString( "path=\"%1\" " ).arg( lcal->mPathRequester->url() );
+ config += TQString( "<file " );
+ config += TQString( "path=\"%1\" " ).arg( lcal->mPathRequester->url() );
if ( lcal->mDaysCheckBox->isChecked() ) {
- config += QString( "deletedaysold=\"%1\" " ).arg( lcal->mDaysSpinBox->value() );
+ config += TQString( "deletedaysold=\"%1\" " ).arg( lcal->mDaysSpinBox->value() );
}
if ( lcal->mDefaultCheckBox->isChecked() ) {
- config += QString( "default=\"1\" " );
+ config += TQString( "default=\"1\" " );
}
- config += QString( "/>\n" );
+ config += TQString( "/>\n" );
}
for ( uint i = 0; i < mWebdavList.count(); ++i ) {
WebdavCalendar *wcal = mWebdavList[ i ];
- config += QString( "<webdav " );
- config += QString( "username=\"%1\" " ).arg( wcal->mUsername->text() );
- config += QString( "password=\"%1\" " ).arg( wcal->mPassword->text() );
- config += QString( "url=\"%1\" " ).arg( wcal->mUrl->text() );
+ config += TQString( "<webdav " );
+ config += TQString( "username=\"%1\" " ).arg( wcal->mUsername->text() );
+ config += TQString( "password=\"%1\" " ).arg( wcal->mPassword->text() );
+ config += TQString( "url=\"%1\" " ).arg( wcal->mUrl->text() );
if ( wcal->mDaysCheckBox->isChecked() ) {
- config += QString( "deletedaysold=\"%1\" " ).arg( wcal->mDaysSpinBox->value() );
+ config += TQString( "deletedaysold=\"%1\" " ).arg( wcal->mDaysSpinBox->value() );
}
if ( wcal->mDefaultCheckBox->isChecked() ) {
- config += QString( "default=\"1\" " );
+ config += TQString( "default=\"1\" " );
}
- config += QString( "/>\n" );
+ config += TQString( "/>\n" );
}
config += "</config>";
@@ -175,12 +175,12 @@ void ConfigGuiSunbird::addLocalCalendar()
{
LocalCalendar *cal = new LocalCalendar( mLocalWidget );
mLocalLayout->removeItem( mLocalSpacer );
- cal->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
+ cal->setSizePolicy( TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Fixed ) );
mLocalLayout->addWidget( cal );
mLocalLayout->addItem( mLocalSpacer );
mLocalList.append( cal );
- connect( cal, SIGNAL( deleteRequest( LocalCalendar* ) ), SLOT( delLocalCalendar( LocalCalendar* ) ) );
+ connect( cal, TQT_SIGNAL( deleteRequest( LocalCalendar* ) ), TQT_SLOT( delLocalCalendar( LocalCalendar* ) ) );
cal->show();
}
@@ -194,12 +194,12 @@ void ConfigGuiSunbird::addWebdavCalendar()
{
WebdavCalendar *cal = new WebdavCalendar( mWebdavWidget );
mWebdavLayout->removeItem( mWebdavSpacer );
- cal->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
+ cal->setSizePolicy( TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Fixed ) );
mWebdavLayout->addWidget( cal );
mWebdavLayout->addItem( mWebdavSpacer );
mWebdavList.append( cal );
- connect( cal, SIGNAL( deleteRequest( WebdavCalendar* ) ), SLOT( delWebdavCalendar( WebdavCalendar* ) ) );
+ connect( cal, TQT_SIGNAL( deleteRequest( WebdavCalendar* ) ), TQT_SLOT( delWebdavCalendar( WebdavCalendar* ) ) );
cal->show();
}
@@ -209,14 +209,14 @@ void ConfigGuiSunbird::delWebdavCalendar( WebdavCalendar *calendar )
calendar->deleteLater();
}
-LocalCalendar::LocalCalendar( QWidget *parent )
- : QWidget( parent )
+LocalCalendar::LocalCalendar( TQWidget *parent )
+ : TQWidget( parent )
{
initGui();
}
-LocalCalendar::LocalCalendar( const QString &path, const QString &defaultcal, const QString &days, QWidget *parent )
- : QWidget( parent )
+LocalCalendar::LocalCalendar( const TQString &path, const TQString &defaultcal, const TQString &days, TQWidget *parent )
+ : TQWidget( parent )
{
initGui();
@@ -232,39 +232,39 @@ LocalCalendar::LocalCalendar( const QString &path, const QString &defaultcal, co
void LocalCalendar::initGui()
{
- QBoxLayout *bottomLayout = new QHBoxLayout();
+ TQBoxLayout *bottomLayout = new TQHBoxLayout();
- mDaysCheckBox = new QCheckBox( this );
+ mDaysCheckBox = new TQCheckBox( this );
mDaysCheckBox->setText( i18n( "Sync only events newer than" ) );
- mDaysSpinBox = new QSpinBox( this );
+ mDaysSpinBox = new TQSpinBox( this );
mDaysSpinBox->setDisabled( true );
- mDaysSpinBox->setSizePolicy( QSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed ) );
+ mDaysSpinBox->setSizePolicy( TQSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Fixed ) );
- connect( mDaysCheckBox, SIGNAL( toggled( bool ) ),
- this, SLOT( toggleDays( bool ) ) );
+ connect( mDaysCheckBox, TQT_SIGNAL( toggled( bool ) ),
+ this, TQT_SLOT( toggleDays( bool ) ) );
bottomLayout->addWidget( mDaysCheckBox );
bottomLayout->addWidget( mDaysSpinBox );
- bottomLayout->addWidget( new QLabel( i18n( "day(s)" ), this ) );
+ bottomLayout->addWidget( new TQLabel( i18n( "day(s)" ), this ) );
- QGridLayout *localLayout = new QGridLayout( this );
+ TQGridLayout *localLayout = new TQGridLayout( this );
mPathRequester = new KURLRequester( this );
KPushButton *removeButton = new KPushButton( this );
- removeButton->setSizePolicy( QSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed ) );
+ removeButton->setSizePolicy( TQSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Fixed ) );
removeButton->setText( i18n( "Remove" ) );
- connect( removeButton, SIGNAL( clicked() ),
- this, SLOT( deleteWidget() ) );
+ connect( removeButton, TQT_SIGNAL( clicked() ),
+ this, TQT_SLOT( deleteWidget() ) );
- mDefaultCheckBox = new QCheckBox( this );
+ mDefaultCheckBox = new TQCheckBox( this );
mDefaultCheckBox->setText( i18n( "Set as Default" ) );
- localLayout->addItem( new QSpacerItem( 40, 20, QSizePolicy::Expanding ), 0, 0 );
- localLayout->addWidget( new QLabel( i18n( "Location:" ), this ), 1, 0 );
+ localLayout->addItem( new TQSpacerItem( 40, 20, TQSizePolicy::Expanding ), 0, 0 );
+ localLayout->addWidget( new TQLabel( i18n( "Location:" ), this ), 1, 0 );
localLayout->addWidget( mPathRequester, 1, 1 );
- localLayout->addItem( new QSpacerItem( 40, 20, QSizePolicy::Fixed ), 1, 2 );
+ localLayout->addItem( new TQSpacerItem( 40, 20, TQSizePolicy::Fixed ), 1, 2 );
localLayout->addWidget( removeButton, 1, 3 );
localLayout->addMultiCellLayout( bottomLayout, 2, 2, 0, 2 );
localLayout->addWidget( mDefaultCheckBox, 2, 3 );
@@ -275,15 +275,15 @@ void LocalCalendar::deleteWidget()
emit deleteRequest( this );
}
-WebdavCalendar::WebdavCalendar( QWidget *parent )
- : QWidget( parent )
+WebdavCalendar::WebdavCalendar( TQWidget *parent )
+ : TQWidget( parent )
{
initGui();
};
-WebdavCalendar::WebdavCalendar( const QString &username, const QString &password, const QString &url,
- const QString &defaultcal, const QString &days, QWidget *parent )
- : QWidget( parent )
+WebdavCalendar::WebdavCalendar( const TQString &username, const TQString &password, const TQString &url,
+ const TQString &defaultcal, const TQString &days, TQWidget *parent )
+ : TQWidget( parent )
{
initGui();
@@ -301,23 +301,23 @@ WebdavCalendar::WebdavCalendar( const QString &username, const QString &password
void WebdavCalendar::initGui()
{
- QBoxLayout *bottomLayout = new QHBoxLayout();
+ TQBoxLayout *bottomLayout = new TQHBoxLayout();
- mDaysCheckBox = new QCheckBox( this );
+ mDaysCheckBox = new TQCheckBox( this );
mDaysCheckBox->setText( i18n( "Sync only events newer than" ) );
- mDaysSpinBox = new QSpinBox( this );
+ mDaysSpinBox = new TQSpinBox( this );
mDaysSpinBox->setDisabled( true );
- mDaysSpinBox->setSizePolicy( QSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed ) );
+ mDaysSpinBox->setSizePolicy( TQSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Fixed ) );
- connect( mDaysCheckBox, SIGNAL( toggled( bool ) ),
- this, SLOT( toggleDays( bool ) ) );
+ connect( mDaysCheckBox, TQT_SIGNAL( toggled( bool ) ),
+ this, TQT_SLOT( toggleDays( bool ) ) );
bottomLayout->addWidget( mDaysCheckBox );
bottomLayout->addWidget( mDaysSpinBox );
- bottomLayout->addWidget( new QLabel( i18n( "day(s)" ), this ) );
+ bottomLayout->addWidget( new TQLabel( i18n( "day(s)" ), this ) );
- QGridLayout *webdavLayout = new QGridLayout();
+ TQGridLayout *webdavLayout = new TQGridLayout();
mUrl = new KLineEdit( this );
mUsername = new KLineEdit( this );
@@ -326,26 +326,26 @@ void WebdavCalendar::initGui()
KPushButton *removeButton = new KPushButton( this );
removeButton->setText( i18n( "Remove" ) );
- connect( removeButton, SIGNAL( clicked() ),
- this, SLOT( deleteWidget() ) );
+ connect( removeButton, TQT_SIGNAL( clicked() ),
+ this, TQT_SLOT( deleteWidget() ) );
- mDefaultCheckBox = new QCheckBox( this );
+ mDefaultCheckBox = new TQCheckBox( this );
mDefaultCheckBox->setText( i18n( "Set as Default" ) );
- webdavLayout->addWidget( new QLabel( i18n( "Location:" ), this ), 0, 0 );
+ webdavLayout->addWidget( new TQLabel( i18n( "Location:" ), this ), 0, 0 );
webdavLayout->addWidget( mUrl, 0, 1 );
- webdavLayout->addItem( new QSpacerItem( 40, 20, QSizePolicy::Fixed ), 0, 2 );
+ webdavLayout->addItem( new TQSpacerItem( 40, 20, TQSizePolicy::Fixed ), 0, 2 );
webdavLayout->addWidget( removeButton, 0, 3 );
webdavLayout->addMultiCellLayout( bottomLayout, 1, 1, 0, 1 );
webdavLayout->addWidget( mDefaultCheckBox, 1, 3 );
- QGridLayout *mainLayout = new QGridLayout( this );
- mainLayout->addItem( new QSpacerItem( 40, 20, QSizePolicy::Fixed ), 0, 0 );
+ TQGridLayout *mainLayout = new TQGridLayout( this );
+ mainLayout->addItem( new TQSpacerItem( 40, 20, TQSizePolicy::Fixed ), 0, 0 );
mainLayout->addMultiCellLayout( webdavLayout, 1, 1, 0, 4 );
- mainLayout->addWidget( new QLabel( i18n( "Username:" ), this ), 2, 0 );
+ mainLayout->addWidget( new TQLabel( i18n( "Username:" ), this ), 2, 0 );
mainLayout->addWidget( mUsername, 2, 1 );
- mainLayout->addItem( new QSpacerItem( 40, 20, QSizePolicy::Fixed ), 2, 2 );
- mainLayout->addWidget( new QLabel( i18n( "Password:" ), this ), 2, 3 );
+ mainLayout->addItem( new TQSpacerItem( 40, 20, TQSizePolicy::Fixed ), 2, 2 );
+ mainLayout->addWidget( new TQLabel( i18n( "Password:" ), this ), 2, 3 );
mainLayout->addWidget( mPassword, 2, 4 );
}
diff --git a/kitchensync/src/configguisunbird.h b/kitchensync/src/configguisunbird.h
index df69417f7..98164a2e1 100644
--- a/kitchensync/src/configguisunbird.h
+++ b/kitchensync/src/configguisunbird.h
@@ -41,15 +41,15 @@ class LocalCalendar : public QWidget
Q_OBJECT
public:
- LocalCalendar( QWidget *parent = 0 );
- LocalCalendar( const QString &path,
- const QString &defaultcal,
- const QString &days, QWidget *parent = 0 );
+ LocalCalendar( TQWidget *parent = 0 );
+ LocalCalendar( const TQString &path,
+ const TQString &defaultcal,
+ const TQString &days, TQWidget *parent = 0 );
KURLRequester *mPathRequester;
- QCheckBox *mDaysCheckBox;
- QSpinBox *mDaysSpinBox;
- QCheckBox *mDefaultCheckBox;
+ TQCheckBox *mDaysCheckBox;
+ TQSpinBox *mDaysSpinBox;
+ TQCheckBox *mDefaultCheckBox;
signals:
void deleteRequest( LocalCalendar* );
@@ -67,17 +67,17 @@ class WebdavCalendar : public QWidget
Q_OBJECT
public:
- WebdavCalendar( QWidget *parent = 0 );
- WebdavCalendar( const QString &username,
- const QString &password,
- const QString &url,
- const QString &defaultcal,
- const QString &days, QWidget *parent = 0 );
+ WebdavCalendar( TQWidget *parent = 0 );
+ WebdavCalendar( const TQString &username,
+ const TQString &password,
+ const TQString &url,
+ const TQString &defaultcal,
+ const TQString &days, TQWidget *parent = 0 );
KLineEdit *mUrl;
- QCheckBox *mDaysCheckBox;
- QSpinBox *mDaysSpinBox;
- QCheckBox *mDefaultCheckBox;
+ TQCheckBox *mDaysCheckBox;
+ TQSpinBox *mDaysSpinBox;
+ TQCheckBox *mDefaultCheckBox;
KLineEdit *mUsername;
KLineEdit *mPassword;
@@ -97,11 +97,11 @@ class ConfigGuiSunbird : public ConfigGui
Q_OBJECT
public:
- ConfigGuiSunbird( const QSync::Member &, QWidget *parent );
+ ConfigGuiSunbird( const QSync::Member &, TQWidget *parent );
- void load( const QString &xml );
+ void load( const TQString &xml );
- QString save() const;
+ TQString save() const;
public slots:
void addLocalCalendar();
@@ -111,20 +111,20 @@ class ConfigGuiSunbird : public ConfigGui
void delWebdavCalendar( WebdavCalendar* );
private:
- QValueList<LocalCalendar*> mLocalList;
- QValueList<WebdavCalendar*> mWebdavList;
+ TQValueList<LocalCalendar*> mLocalList;
+ TQValueList<WebdavCalendar*> mWebdavList;
- QWidget *mLocalWidget;
- QWidget *mWebdavWidget;
+ TQWidget *mLocalWidget;
+ TQWidget *mWebdavWidget;
- QVBoxLayout *mLocalLayout;
- QVBoxLayout *mWebdavLayout;
+ TQVBoxLayout *mLocalLayout;
+ TQVBoxLayout *mWebdavLayout;
KPushButton *mLocalAddButton;
KPushButton *mWebdavAddButton;
- QSpacerItem *mLocalSpacer;
- QSpacerItem *mWebdavSpacer;
+ TQSpacerItem *mLocalSpacer;
+ TQSpacerItem *mWebdavSpacer;
};
#endif
diff --git a/kitchensync/src/configguisynce.cpp b/kitchensync/src/configguisynce.cpp
index 43b509a46..6e521beeb 100644
--- a/kitchensync/src/configguisynce.cpp
+++ b/kitchensync/src/configguisynce.cpp
@@ -21,29 +21,29 @@
#include "configguisynce.h"
-#include <qdom.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qcheckbox.h>
+#include <tqdom.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqcheckbox.h>
#include <klineedit.h>
#include <kdialog.h>
#include <klocale.h>
-ConfigGuiSynce::ConfigGuiSynce( const QSync::Member &member, QWidget *parent )
+ConfigGuiSynce::ConfigGuiSynce( const QSync::Member &member, TQWidget *parent )
: ConfigGui( member, parent )
{
initGUI();
}
-void ConfigGuiSynce::load( const QString &xml )
+void ConfigGuiSynce::load( const TQString &xml )
{
- QDomDocument doc;
+ TQDomDocument doc;
doc.setContent( xml );
- QDomElement docElement = doc.documentElement();
- QDomNode node;
+ TQDomElement docElement = doc.documentElement();
+ TQDomNode node;
for( node = docElement.firstChild(); !node.isNull(); node = node.nextSibling() ) {
- QDomElement element = node.toElement();
+ TQDomElement element = node.toElement();
if ( element.tagName() == "contact" ) {
mContacts->setChecked( element.text().toInt() == 1 );
} else if ( element.tagName() == "todos" ) {
@@ -56,14 +56,14 @@ void ConfigGuiSynce::load( const QString &xml )
}
}
-QString ConfigGuiSynce::save() const
+TQString ConfigGuiSynce::save() const
{
- QString config = "<config>\n";
+ TQString config = "<config>\n";
- config += QString( "<contact>%1</contact>\n" ).arg( mContacts->isChecked() ? "1" : "0" );
- config += QString( "<todos>%1</todos>\n" ).arg( mTodos->isChecked() ? "1" : "0" );
- config += QString( "<calendar>%1</calendar>\n" ).arg( mCalendar->isChecked() ? "1" : "0" );
- config += QString( "<file>%1</file>\n" ).arg( mFile->text() );
+ config += TQString( "<contact>%1</contact>\n" ).arg( mContacts->isChecked() ? "1" : "0" );
+ config += TQString( "<todos>%1</todos>\n" ).arg( mTodos->isChecked() ? "1" : "0" );
+ config += TQString( "<calendar>%1</calendar>\n" ).arg( mCalendar->isChecked() ? "1" : "0" );
+ config += TQString( "<file>%1</file>\n" ).arg( mFile->text() );
config += "</config>";
@@ -72,22 +72,22 @@ QString ConfigGuiSynce::save() const
void ConfigGuiSynce::initGUI()
{
- QGridLayout *layout = new QGridLayout( topLayout(), 12, 2, KDialog::spacingHint() );
+ TQGridLayout *layout = new TQGridLayout( topLayout(), 12, 2, KDialog::spacingHint() );
layout->setMargin( KDialog::marginHint() );
- mContacts = new QCheckBox( this );
+ mContacts = new TQCheckBox( this );
mContacts->setText( "Sync Contacts" );
layout->addMultiCellWidget( mContacts, 0, 0, 0, 1 );
- mTodos = new QCheckBox( this );
+ mTodos = new TQCheckBox( this );
mTodos->setText( "Sync \'Todo\' items" );
layout->addMultiCellWidget( mTodos, 1, 1, 0, 1 );
- mCalendar = new QCheckBox( this );
+ mCalendar = new TQCheckBox( this );
mCalendar->setText( "Sync Calendar" );
layout->addMultiCellWidget( mCalendar, 2, 2, 0, 1 );
- layout->addWidget( new QLabel( i18n( "File:" ), this ), 3, 0 );
+ layout->addWidget( new TQLabel( i18n( "File:" ), this ), 3, 0 );
mFile = new KLineEdit( this );
layout->addWidget( mFile, 3, 1 );
}
diff --git a/kitchensync/src/configguisynce.h b/kitchensync/src/configguisynce.h
index 07835572e..9d5f126be 100644
--- a/kitchensync/src/configguisynce.h
+++ b/kitchensync/src/configguisynce.h
@@ -31,18 +31,18 @@ class KLineEdit;
class ConfigGuiSynce : public ConfigGui
{
public:
- ConfigGuiSynce( const QSync::Member &, QWidget *parent );
+ ConfigGuiSynce( const QSync::Member &, TQWidget *parent );
- void load( const QString &xml );
+ void load( const TQString &xml );
- QString save() const;
+ TQString save() const;
private:
void initGUI();
- QCheckBox *mContacts;
- QCheckBox *mTodos;
- QCheckBox *mCalendar;
+ TQCheckBox *mContacts;
+ TQCheckBox *mTodos;
+ TQCheckBox *mCalendar;
KLineEdit *mFile;
};
diff --git a/kitchensync/src/configguisyncmlhttp.cpp b/kitchensync/src/configguisyncmlhttp.cpp
index 63a073c90..26a8c2241 100644
--- a/kitchensync/src/configguisyncmlhttp.cpp
+++ b/kitchensync/src/configguisyncmlhttp.cpp
@@ -27,46 +27,46 @@
#include <klocale.h>
#include <kurlrequester.h>
-#include <qcheckbox.h>
-#include <qdom.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qspinbox.h>
-#include <qtabwidget.h>
-#include <qvbox.h>
-
-ConfigGuiSyncmlHttp::ConfigGuiSyncmlHttp( const QSync::Member &member, QWidget *parent )
+#include <tqcheckbox.h>
+#include <tqdom.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqspinbox.h>
+#include <tqtabwidget.h>
+#include <tqvbox.h>
+
+ConfigGuiSyncmlHttp::ConfigGuiSyncmlHttp( const QSync::Member &member, TQWidget *parent )
: ConfigGui( member, parent ), mUrl( 0 ), mPort( 0 )
{
- QTabWidget *tabWidget = new QTabWidget( this );
+ TQTabWidget *tabWidget = new TQTabWidget( this );
topLayout()->addWidget( tabWidget );
// Connection
- QWidget *connectionWidget = new QWidget( tabWidget );
- QVBoxLayout *connectionLayout = new QVBoxLayout( connectionWidget,
+ TQWidget *connectionWidget = new TQWidget( tabWidget );
+ TQVBoxLayout *connectionLayout = new TQVBoxLayout( connectionWidget,
KDialog::marginHint(), KDialog::spacingHint() );
tabWidget->addTab( connectionWidget, i18n( "Connection" ) );
- mGridLayout = new QGridLayout( connectionLayout );
+ mGridLayout = new TQGridLayout( connectionLayout );
- QLabel *label = new QLabel( i18n("Port:"), connectionWidget );
+ TQLabel *label = new TQLabel( i18n("Port:"), connectionWidget );
mGridLayout->addWidget( label, 0, 0 );
- mPort = new QSpinBox( connectionWidget );
+ mPort = new TQSpinBox( connectionWidget );
mPort->setMinValue( 1 );
mPort->setMaxValue( 65536 );
mGridLayout->addWidget( mPort, 0, 1 );
// Database
- QWidget *databaseWidget = new QWidget( tabWidget );
- QVBoxLayout *databaseLayout = new QVBoxLayout( databaseWidget,
+ TQWidget *databaseWidget = new TQWidget( tabWidget );
+ TQVBoxLayout *databaseLayout = new TQVBoxLayout( databaseWidget,
KDialog::marginHint(), KDialog::spacingHint() );
tabWidget->addTab( databaseWidget, i18n( "Databases" ) );
- mGridLayout = new QGridLayout( databaseLayout );
+ mGridLayout = new TQGridLayout( databaseLayout );
addLineEdit( databaseWidget, i18n("Contact Database:"), &mContactDb, 0 );
addLineEdit( databaseWidget, i18n("Calendar Database:"), &mCalendarDb, 1 );
addLineEdit( databaseWidget, i18n("Note Database:"), &mNoteDb, 2 );
@@ -81,55 +81,55 @@ ConfigGuiSyncmlHttp::ConfigGuiSyncmlHttp( const QSync::Member &member, QWidget *
// Options
- QWidget *optionWidget = new QWidget( tabWidget );
- QVBoxLayout *optionLayout = new QVBoxLayout( optionWidget,
+ TQWidget *optionWidget = new TQWidget( tabWidget );
+ TQVBoxLayout *optionLayout = new TQVBoxLayout( optionWidget,
KDialog::marginHint(), KDialog::spacingHint() );
tabWidget->addTab( optionWidget, i18n( "Options" ) );
- mGridLayout = new QGridLayout( optionLayout );
+ mGridLayout = new TQGridLayout( optionLayout );
- label = new QLabel( i18n("User name:"), optionWidget );
+ label = new TQLabel( i18n("User name:"), optionWidget );
mGridLayout->addWidget( label, 0, 0 );
mUsername = new KLineEdit( optionWidget );
mGridLayout->addWidget( mUsername, 0, 1 );
- label = new QLabel( i18n("Password:"), optionWidget );
+ label = new TQLabel( i18n("Password:"), optionWidget );
mGridLayout->addWidget( label, 1, 0 );
mPassword = new KLineEdit( optionWidget );
- mPassword->setEchoMode( QLineEdit::Password );
+ mPassword->setEchoMode( TQLineEdit::Password );
mGridLayout->addWidget( mPassword, 1, 1 );
- mUseStringTable = new QCheckBox( i18n("Use String Table"), optionWidget );
+ mUseStringTable = new TQCheckBox( i18n("Use String Table"), optionWidget );
mGridLayout->addMultiCellWidget( mUseStringTable, 2, 2, 0, 1 );
- mOnlyReplace = new QCheckBox( i18n("Only Replace Entries"), optionWidget );
+ mOnlyReplace = new TQCheckBox( i18n("Only Replace Entries"), optionWidget );
mGridLayout->addMultiCellWidget( mOnlyReplace, 3, 3, 0, 1 );
// Url
- label = new QLabel( i18n("URL:"), optionWidget );
+ label = new TQLabel( i18n("URL:"), optionWidget );
mGridLayout->addWidget( label, 4, 0 );
mUrl = new KLineEdit( optionWidget );
mGridLayout->addWidget( mUrl, 4, 1 );
// recvLimit
- label = new QLabel( i18n("Receive Limit:"), optionWidget );
+ label = new TQLabel( i18n("Receive Limit:"), optionWidget );
mGridLayout->addWidget( label, 5, 0 );
- mRecvLimit = new QSpinBox( optionWidget );
+ mRecvLimit = new TQSpinBox( optionWidget );
mRecvLimit->setMinValue( 1 );
mRecvLimit->setMaxValue( 65536 );
mGridLayout->addWidget( mRecvLimit, 5, 1 );
// maxObjSize
- label = new QLabel( i18n("Maximum Object Size"), optionWidget );
+ label = new TQLabel( i18n("Maximum Object Size"), optionWidget );
mGridLayout->addWidget( label, 6, 0 );
- mMaxObjSize = new QSpinBox( optionWidget );
+ mMaxObjSize = new TQSpinBox( optionWidget );
mMaxObjSize->setMinValue( 1 );
mMaxObjSize->setMaxValue( 65536 );
mGridLayout->addWidget( mMaxObjSize, 6, 1 );
@@ -137,25 +137,25 @@ ConfigGuiSyncmlHttp::ConfigGuiSyncmlHttp( const QSync::Member &member, QWidget *
topLayout()->addStretch( 1 );
}
-void ConfigGuiSyncmlHttp::addLineEdit( QWidget *parent, const QString &text, KComboBox **edit, int row )
+void ConfigGuiSyncmlHttp::addLineEdit( TQWidget *parent, const TQString &text, KComboBox **edit, int row )
{
- QLabel *label = new QLabel( text, parent);
+ TQLabel *label = new TQLabel( text, parent);
mGridLayout->addWidget( label, row, 0 );
*edit = new KComboBox( true, parent );
mGridLayout->addWidget( *edit, row, 1 );
}
-void ConfigGuiSyncmlHttp::load( const QString &xml )
+void ConfigGuiSyncmlHttp::load( const TQString &xml )
{
- QDomDocument document;
+ TQDomDocument document;
document.setContent( xml );
- QDomElement docElement = document.documentElement();
- QDomNode node;
+ TQDomElement docElement = document.documentElement();
+ TQDomNode node;
for ( node = docElement.firstChild(); !node.isNull(); node = node.nextSibling() ) {
- QDomElement element = node.toElement();
+ TQDomElement element = node.toElement();
if ( element.tagName() == "username" ) {
mUsername->setText( element.text() );
} else if ( element.tagName() == "password" ) {
@@ -186,20 +186,20 @@ void ConfigGuiSyncmlHttp::load( const QString &xml )
}
}
-QString ConfigGuiSyncmlHttp::save() const
+TQString ConfigGuiSyncmlHttp::save() const
{
- QString xml;
+ TQString xml;
xml = "<config>\n";
xml += "<username>" + mUsername->text() + "</username>\n";
xml += "<password>" + mPassword->text() + "</password>\n";
xml += "<url>" + mUrl->text() + "</url>\n";
- xml += "<port>" + QString::number( mPort->value() ) + "</port>\n";
+ xml += "<port>" + TQString::number( mPort->value() ) + "</port>\n";
// Receive Limit
- xml += "<recvLimit>" + QString::number( mRecvLimit->value() ) + "</recvLimit>\n";
+ xml += "<recvLimit>" + TQString::number( mRecvLimit->value() ) + "</recvLimit>\n";
// Maximal Object Size
- xml += "<maxObjSize>" + QString::number( mMaxObjSize->value() ) + "</maxObjSize>\n";
+ xml += "<maxObjSize>" + TQString::number( mMaxObjSize->value() ) + "</maxObjSize>\n";
xml += "<usestringtable>";
if ( mUseStringTable->isChecked() )
diff --git a/kitchensync/src/configguisyncmlhttp.h b/kitchensync/src/configguisyncmlhttp.h
index 2cbcfc40a..8230f6d0c 100644
--- a/kitchensync/src/configguisyncmlhttp.h
+++ b/kitchensync/src/configguisyncmlhttp.h
@@ -21,7 +21,7 @@
#ifndef CONFIGGUISYNCML_H
#define CONFIGGUISYNCML_H
-#include <qdom.h>
+#include <tqdom.h>
#include "configgui.h"
@@ -38,30 +38,30 @@ class ConfigGuiSyncmlHttp : public ConfigGui
Q_OBJECT
public:
- ConfigGuiSyncmlHttp( const QSync::Member &, QWidget *parent );
+ ConfigGuiSyncmlHttp( const QSync::Member &, TQWidget *parent );
- void load( const QString &xml );
- QString save() const;
+ void load( const TQString &xml );
+ TQString save() const;
private:
- QGridLayout *mGridLayout;
+ TQGridLayout *mGridLayout;
KLineEdit *mUsername;
KLineEdit *mPassword;
KLineEdit *mUrl;
- QSpinBox *mPort;
- QCheckBox *mUseStringTable;
- QCheckBox *mOnlyReplace;
+ TQSpinBox *mPort;
+ TQCheckBox *mUseStringTable;
+ TQCheckBox *mOnlyReplace;
- QSpinBox *mRecvLimit;
- QSpinBox *mMaxObjSize;
+ TQSpinBox *mRecvLimit;
+ TQSpinBox *mMaxObjSize;
KComboBox *mContactDb;
KComboBox *mCalendarDb;
KComboBox *mNoteDb;
protected slots:
- void addLineEdit( QWidget *parent, const QString &text, KComboBox **edit, int row );
+ void addLineEdit( TQWidget *parent, const TQString &text, KComboBox **edit, int row );
};
#endif
diff --git a/kitchensync/src/configguisyncmlobex.cpp b/kitchensync/src/configguisyncmlobex.cpp
index 488a0d944..372cf9261 100644
--- a/kitchensync/src/configguisyncmlobex.cpp
+++ b/kitchensync/src/configguisyncmlobex.cpp
@@ -28,23 +28,23 @@
#include <klocale.h>
#include <kurlrequester.h>
-#include <qlayout.h>
-#include <qcheckbox.h>
-#include <qcombobox.h>
-#include <qlabel.h>
-#include <qdom.h>
-#include <qspinbox.h>
-#include <qtabwidget.h>
-#include <qvbox.h>
-
-ConfigGuiSyncmlObex::ConfigGuiSyncmlObex( const QSync::Member &member, QWidget *parent )
+#include <tqlayout.h>
+#include <tqcheckbox.h>
+#include <tqcombobox.h>
+#include <tqlabel.h>
+#include <tqdom.h>
+#include <tqspinbox.h>
+#include <tqtabwidget.h>
+#include <tqvbox.h>
+
+ConfigGuiSyncmlObex::ConfigGuiSyncmlObex( const QSync::Member &member, TQWidget *parent )
: ConfigGui( member, parent )
{
- QTabWidget *tabWidget = new QTabWidget( this );
+ TQTabWidget *tabWidget = new TQTabWidget( this );
topLayout()->addWidget( tabWidget );
// Connection
- QVBox *connectionWidget = new QVBox( this );
+ TQVBox *connectionWidget = new TQVBox( this );
connectionWidget->setMargin( KDialog::marginHint() );
connectionWidget->setSpacing( 5 );
@@ -52,8 +52,8 @@ ConfigGuiSyncmlObex::ConfigGuiSyncmlObex( const QSync::Member &member, QWidget *
mConnection = new KComboBox( connectionWidget );
- connect( mConnection, SIGNAL (activated( int ) ),
- this, SLOT( slotConnectionChanged ( int ) ) );
+ connect( mConnection, TQT_SIGNAL (activated( int ) ),
+ this, TQT_SLOT( slotConnectionChanged ( int ) ) );
mConnectionTypes.append( ConnectionType( 2, i18n( "Bluetooth" ) ) );
mConnectionTypes.append( ConnectionType( 5, i18n( "USB" ) ) );
@@ -72,13 +72,13 @@ ConfigGuiSyncmlObex::ConfigGuiSyncmlObex( const QSync::Member &member, QWidget *
connectionWidget->setStretchFactor( mUsb, 1 );
// Databases
- QWidget *databaseWidget = new QWidget( tabWidget );
- QVBoxLayout *databaseLayout = new QVBoxLayout( databaseWidget,
+ TQWidget *databaseWidget = new TQWidget( tabWidget );
+ TQVBoxLayout *databaseLayout = new TQVBoxLayout( databaseWidget,
KDialog::marginHint(), KDialog::spacingHint() );
tabWidget->addTab( databaseWidget, i18n( "Databases" ) );
- mGridLayout = new QGridLayout( databaseLayout );
+ mGridLayout = new TQGridLayout( databaseLayout );
addLineEdit( databaseWidget, i18n("Contact Database:"), &mContactDb, 0 );
addLineEdit( databaseWidget, i18n("Calendar Database:"), &mCalendarDb, 1 );
addLineEdit( databaseWidget, i18n("Note Database:"), &mNoteDb, 2 );
@@ -92,38 +92,38 @@ ConfigGuiSyncmlObex::ConfigGuiSyncmlObex( const QSync::Member &member, QWidget *
mNoteDb->insertItem( "notes" );
// Options
- QWidget *optionsWidget = new QWidget( tabWidget );
- QVBoxLayout *optionsLayout = new QVBoxLayout( optionsWidget,
+ TQWidget *optionsWidget = new TQWidget( tabWidget );
+ TQVBoxLayout *optionsLayout = new TQVBoxLayout( optionsWidget,
KDialog::marginHint(), KDialog::spacingHint() );
tabWidget->addTab( optionsWidget, i18n( "Options" ) );
- mGridLayout = new QGridLayout( optionsLayout );
+ mGridLayout = new TQGridLayout( optionsLayout );
- QLabel *label = new QLabel( i18n("User name:"), optionsWidget );
+ TQLabel *label = new TQLabel( i18n("User name:"), optionsWidget );
mGridLayout->addWidget( label, 0, 0 );
mUsername = new KLineEdit( optionsWidget );
mGridLayout->addWidget( mUsername, 0, 1 );
- label = new QLabel( i18n("Password:"), optionsWidget );
+ label = new TQLabel( i18n("Password:"), optionsWidget );
mGridLayout->addWidget( label, 1, 0 );
mPassword = new KLineEdit( optionsWidget );
- mPassword->setEchoMode( QLineEdit::Password );
+ mPassword->setEchoMode( TQLineEdit::Password );
mGridLayout->addWidget( mPassword, 1, 1 );
- mUseStringTable = new QCheckBox( i18n("Use String Table"), optionsWidget );
+ mUseStringTable = new TQCheckBox( i18n("Use String Table"), optionsWidget );
mGridLayout->addMultiCellWidget( mUseStringTable, 2, 2, 0, 1 );
- mOnlyReplace = new QCheckBox( i18n("Only Replace Entries"), optionsWidget );
+ mOnlyReplace = new TQCheckBox( i18n("Only Replace Entries"), optionsWidget );
mGridLayout->addMultiCellWidget( mOnlyReplace, 3, 3, 0, 1 );
// SynML Version
- label = new QLabel( i18n("SyncML Version:"), optionsWidget );
+ label = new TQLabel( i18n("SyncML Version:"), optionsWidget );
mGridLayout->addWidget( label, 4, 0 );
- mSyncmlVersion = new QComboBox( optionsWidget );
+ mSyncmlVersion = new TQComboBox( optionsWidget );
mGridLayout->addWidget( mSyncmlVersion, 4, 1 );
mSyncmlVersions.append( SyncmlVersion( 0, i18n( "1.0" ) ) );
@@ -135,11 +135,11 @@ ConfigGuiSyncmlObex::ConfigGuiSyncmlObex( const QSync::Member &member, QWidget *
mSyncmlVersion->insertItem( (*itVersion).second );
// WBXML
- mWbxml = new QCheckBox( i18n("WAP Binary XML"), optionsWidget );
+ mWbxml = new TQCheckBox( i18n("WAP Binary XML"), optionsWidget );
mGridLayout->addMultiCellWidget( mWbxml, 12, 12, 0, 1 );
// Identifier
- label = new QLabel( i18n("Software Identifier:"), optionsWidget );
+ label = new TQLabel( i18n("Software Identifier:"), optionsWidget );
mGridLayout->addWidget( label, 13, 0 );
mIdentifier = new KComboBox( true, optionsWidget );
@@ -149,19 +149,19 @@ ConfigGuiSyncmlObex::ConfigGuiSyncmlObex( const QSync::Member &member, QWidget *
mIdentifier->insertItem( "PC Suite" );
// recvLimit
- label = new QLabel( i18n("Receive Limit:"), optionsWidget );
+ label = new TQLabel( i18n("Receive Limit:"), optionsWidget );
mGridLayout->addWidget( label, 14, 0 );
- mRecvLimit = new QSpinBox( optionsWidget );
+ mRecvLimit = new TQSpinBox( optionsWidget );
mRecvLimit->setMinValue( 1 );
mRecvLimit->setMaxValue( 65536 );
mGridLayout->addWidget( mRecvLimit, 14, 1 );
// maxObjSize
- label = new QLabel( i18n("Maximum Object Size"), optionsWidget );
+ label = new TQLabel( i18n("Maximum Object Size"), optionsWidget );
mGridLayout->addWidget( label, 15, 0 );
- mMaxObjSize = new QSpinBox( optionsWidget );
+ mMaxObjSize = new TQSpinBox( optionsWidget );
mMaxObjSize->setMinValue( 1 );
mMaxObjSize->setMaxValue( 65536 );
mGridLayout->addWidget( mMaxObjSize, 15, 1 );
@@ -180,16 +180,16 @@ void ConfigGuiSyncmlObex::slotConnectionChanged( int pos )
mUsb->show();
}
-void ConfigGuiSyncmlObex::load( const QString &xml )
+void ConfigGuiSyncmlObex::load( const TQString &xml )
{
- QDomDocument document;
+ TQDomDocument document;
document.setContent( xml );
- QDomElement docElement = document.documentElement();
+ TQDomElement docElement = document.documentElement();
- QDomNode node;
+ TQDomNode node;
for( node = docElement.firstChild(); !node.isNull(); node = node.nextSibling() ) {
- QDomElement element = node.toElement();
+ TQDomElement element = node.toElement();
if ( element.tagName() == "username" ) {
mUsername->setText( element.text() );
} else if ( element.tagName() == "password" ) {
@@ -237,16 +237,16 @@ void ConfigGuiSyncmlObex::load( const QString &xml )
}
}
-QString ConfigGuiSyncmlObex::save() const
+TQString ConfigGuiSyncmlObex::save() const
{
- QString xml;
+ TQString xml;
xml = "<config>\n";
xml += "<username>" + mUsername->text() + "</username>\n";
xml += "<password>" + mPassword->text() + "</password>\n";
ConnectionTypeList::ConstIterator it;
for ( it = mConnectionTypes.begin(); it != mConnectionTypes.end(); it++ ) {
if ( mConnection->currentText() == (*it).second ) {
- xml += "<type>" + QString("%1").arg((*it).first) + "</type>\n";
+ xml += "<type>" + TQString("%1").arg((*it).first) + "</type>\n";
break;
}
}
@@ -258,13 +258,13 @@ QString ConfigGuiSyncmlObex::save() const
xml += "<bluetooth_channel>" + mBluetooth->channel() + "</bluetooth_channel>\n";
// USB Interface
- xml += "<interface>" + QString::number( mUsb->interface() ) +"</interface>\n";
+ xml += "<interface>" + TQString::number( mUsb->interface() ) +"</interface>\n";
// SyncML Version
SyncmlVersionList::ConstIterator itVersion;
for ( itVersion = mSyncmlVersions.begin(); itVersion != mSyncmlVersions.end(); itVersion++ ) {
if ( mSyncmlVersion->currentText() == (*itVersion).second ) {
- xml += "<version>" + QString("%1").arg((*itVersion).first) + "</version>\n";
+ xml += "<version>" + TQString("%1").arg((*itVersion).first) + "</version>\n";
break;
}
}
@@ -281,10 +281,10 @@ QString ConfigGuiSyncmlObex::save() const
xml += "</wbxml>\n";
// Receive Limit
- xml += "<recvLimit>" + QString::number( mRecvLimit->value() ) + "</recvLimit>\n";
+ xml += "<recvLimit>" + TQString::number( mRecvLimit->value() ) + "</recvLimit>\n";
// Maximal Object Size
- xml += "<maxObjSize>" + QString::number( mMaxObjSize->value() ) + "</maxObjSize>\n";
+ xml += "<maxObjSize>" + TQString::number( mMaxObjSize->value() ) + "</maxObjSize>\n";
xml += "<usestringtable>";
if ( mUseStringTable->isChecked() )
@@ -308,9 +308,9 @@ QString ConfigGuiSyncmlObex::save() const
return xml;
}
-void ConfigGuiSyncmlObex::addLineEdit( QWidget *parent, const QString &text, KComboBox **edit, int row )
+void ConfigGuiSyncmlObex::addLineEdit( TQWidget *parent, const TQString &text, KComboBox **edit, int row )
{
- QLabel *label = new QLabel( text, parent );
+ TQLabel *label = new TQLabel( text, parent );
mGridLayout->addWidget( label, row, 0 );
*edit = new KComboBox( true, parent );
diff --git a/kitchensync/src/configguisyncmlobex.h b/kitchensync/src/configguisyncmlobex.h
index a10d06a52..028f8b077 100644
--- a/kitchensync/src/configguisyncmlobex.h
+++ b/kitchensync/src/configguisyncmlobex.h
@@ -22,7 +22,7 @@
#ifndef CONFIGGUISYNCMLOBEX_H
#define CONFIGGUISYNCMLOBEX_H
-#include <qdom.h>
+#include <tqdom.h>
#include "configgui.h"
#include "connectionwidgets.h"
@@ -40,48 +40,48 @@ class ConfigGuiSyncmlObex : public ConfigGui
Q_OBJECT
public:
- ConfigGuiSyncmlObex( const QSync::Member &, QWidget *parent = 0 );
+ ConfigGuiSyncmlObex( const QSync::Member &, TQWidget *parent = 0 );
- void load( const QString &xml );
- QString save() const;
+ void load( const TQString &xml );
+ TQString save() const;
public slots:
void slotConnectionChanged( int pos );
private:
// Connection
- typedef QPair<int, QString> ConnectionType;
- typedef QValueList<ConnectionType> ConnectionTypeList;
+ typedef QPair<int, TQString> ConnectionType;
+ typedef TQValueList<ConnectionType> ConnectionTypeList;
ConnectionTypeList mConnectionTypes;
- QComboBox *mConnection;
+ TQComboBox *mConnection;
BluetoothWidget *mBluetooth;
UsbWidget *mUsb;
// Options
- typedef QPair<int, QString> SyncmlVersion;
- typedef QValueList<SyncmlVersion> SyncmlVersionList;
+ typedef QPair<int, TQString> SyncmlVersion;
+ typedef TQValueList<SyncmlVersion> SyncmlVersionList;
SyncmlVersionList mSyncmlVersions;
- QStringList mIdentiferList;
+ TQStringList mIdentiferList;
KLineEdit *mUsername;
KLineEdit *mPassword;
- QCheckBox *mUseStringTable;
- QCheckBox *mOnlyReplace;
- QSpinBox *mRecvLimit;
- QSpinBox *mMaxObjSize;
- QComboBox *mSyncmlVersion;
+ TQCheckBox *mUseStringTable;
+ TQCheckBox *mOnlyReplace;
+ TQSpinBox *mRecvLimit;
+ TQSpinBox *mMaxObjSize;
+ TQComboBox *mSyncmlVersion;
KComboBox *mIdentifier;
- QCheckBox *mWbxml;
+ TQCheckBox *mWbxml;
- QGridLayout *mGridLayout;
+ TQGridLayout *mGridLayout;
KComboBox *mContactDb;
KComboBox *mCalendarDb;
KComboBox *mNoteDb;
protected slots:
- void addLineEdit( QWidget *parent, const QString &text, KComboBox **edit, int row );
+ void addLineEdit( TQWidget *parent, const TQString &text, KComboBox **edit, int row );
};
#endif
diff --git a/kitchensync/src/conflictdialog.cpp b/kitchensync/src/conflictdialog.cpp
index a021e121a..39943ffe4 100644
--- a/kitchensync/src/conflictdialog.cpp
+++ b/kitchensync/src/conflictdialog.cpp
@@ -20,7 +20,7 @@
#include "conflictdialog.h"
-ConflictDialog::ConflictDialog( QSync::SyncMapping &mapping, QWidget *parent )
- : QDialog( parent ), mMapping( mapping )
+ConflictDialog::ConflictDialog( QSync::SyncMapping &mapping, TQWidget *parent )
+ : TQDialog( parent ), mMapping( mapping )
{
}
diff --git a/kitchensync/src/conflictdialog.h b/kitchensync/src/conflictdialog.h
index 9718f4c65..1a17e06ca 100644
--- a/kitchensync/src/conflictdialog.h
+++ b/kitchensync/src/conflictdialog.h
@@ -21,7 +21,7 @@
#ifndef CONFLICTDIALOG_H
#define CONFLICTDIALOG_H
-#include <qdialog.h>
+#include <tqdialog.h>
#include <libqopensync/syncmapping.h>
@@ -31,7 +31,7 @@
class ConflictDialog : public QDialog
{
public:
- ConflictDialog( QSync::SyncMapping &mapping, QWidget *parent );
+ ConflictDialog( QSync::SyncMapping &mapping, TQWidget *parent );
protected:
QSync::SyncMapping mMapping;
diff --git a/kitchensync/src/connectionwidgets.cpp b/kitchensync/src/connectionwidgets.cpp
index 76d2297b7..ac5277fb7 100644
--- a/kitchensync/src/connectionwidgets.cpp
+++ b/kitchensync/src/connectionwidgets.cpp
@@ -28,35 +28,35 @@
#include <klocale.h>
#include <kmessagebox.h>
-#include <qapplication.h>
-#include <qeventloop.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qpushbutton.h>
-#include <qspinbox.h>
-#include <qtabwidget.h>
-#include <qtooltip.h>
-#include <qvbox.h>
+#include <tqapplication.h>
+#include <tqeventloop.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqpushbutton.h>
+#include <tqspinbox.h>
+#include <tqtabwidget.h>
+#include <tqtooltip.h>
+#include <tqvbox.h>
#include "connectionwidgets.h"
-BluetoothWidget::BluetoothWidget( QWidget *parent )
- : QWidget( parent )
+BluetoothWidget::BluetoothWidget( TQWidget *parent )
+ : TQWidget( parent )
{
- QGridLayout *layout = new QGridLayout( this );
+ TQGridLayout *layout = new TQGridLayout( this );
mAddress = new KLineEdit( this );
mAddress->setInputMask( ">NN:NN:NN:NN:NN:NN;" );
layout->addWidget( mAddress, 1, 0 );
- QLabel *label = new QLabel( i18n( "Bluetooth address:" ), this );
+ TQLabel *label = new TQLabel( i18n( "Bluetooth address:" ), this );
label->setBuddy( mAddress );
layout->addWidget( label, 0, 0 );
mChannel = new KLineEdit( this );
layout->addWidget( mChannel, 1, 1 );
- mChannelLabel = new QLabel( i18n( "Channel:" ), this );
+ mChannelLabel = new TQLabel( i18n( "Channel:" ), this );
mChannelLabel->setBuddy( mChannel );
layout->addWidget( mChannelLabel, 0, 1 );
@@ -75,35 +75,35 @@ void BluetoothWidget::showChannel()
mChannel->show();
}
-void BluetoothWidget::setAddress( const QString address )
+void BluetoothWidget::setAddress( const TQString address )
{
mAddress->setText( address );
}
-void BluetoothWidget::setChannel( const QString channel )
+void BluetoothWidget::setChannel( const TQString channel )
{
if ( mChannel )
mChannel->setText( channel );
}
-QString BluetoothWidget::address() const
+TQString BluetoothWidget::address() const
{
return mAddress->text();
}
-QString BluetoothWidget::channel() const
+TQString BluetoothWidget::channel() const
{
if ( mChannel->text().isEmpty() )
- return QString();
+ return TQString();
return mChannel->text();
}
// FIXME - Only IrMC specific
-IRWidget::IRWidget( QWidget *parent )
- : QWidget( parent )
+IRWidget::IRWidget( TQWidget *parent )
+ : TQWidget( parent )
{
- QGridLayout *layout = new QGridLayout( this, 3, 3, 11, 3 );
+ TQGridLayout *layout = new TQGridLayout( this, 3, 3, 11, 3 );
mDevice = new KLineEdit( this );
mSerialNumber = new KLineEdit( this );
@@ -111,22 +111,22 @@ IRWidget::IRWidget( QWidget *parent )
layout->addWidget( mDevice, 1, 0 );
layout->addWidget( mSerialNumber, 1, 1 );
- QLabel *label = new QLabel( i18n( "Device Name:" ), this );
+ TQLabel *label = new TQLabel( i18n( "Device Name:" ), this );
label->setBuddy( mDevice );
layout->addWidget( label, 0, 0 );
- label = new QLabel( i18n( "Serial Number:" ), this );
+ label = new TQLabel( i18n( "Serial Number:" ), this );
label->setBuddy( mSerialNumber );
layout->addWidget( label, 0, 1 );
layout->setRowStretch( 2, 1 );
}
-void IRWidget::load( const QDomElement &parent )
+void IRWidget::load( const TQDomElement &parent )
{
- QDomNode node;
+ TQDomNode node;
for ( node = parent.firstChild(); !node.isNull(); node = node.nextSibling() ) {
- QDomElement element = node.toElement();
+ TQDomElement element = node.toElement();
if ( element.tagName() == "irname" )
mDevice->setText( element.text() );
else if ( element.tagName() == "irserial" )
@@ -134,9 +134,9 @@ void IRWidget::load( const QDomElement &parent )
}
}
-void IRWidget::save( QDomDocument &doc, QDomElement &parent )
+void IRWidget::save( TQDomDocument &doc, TQDomElement &parent )
{
- QDomElement element = doc.createElement( "irname" );
+ TQDomElement element = doc.createElement( "irname" );
element.appendChild( doc.createTextNode( mDevice->text() ) );
parent.appendChild( element );
@@ -146,10 +146,10 @@ void IRWidget::save( QDomDocument &doc, QDomElement &parent )
}
// FIXME - Only IrMC specific
-CableWidget::CableWidget( QWidget *parent )
- : QWidget( parent )
+CableWidget::CableWidget( TQWidget *parent )
+ : TQWidget( parent )
{
- QGridLayout *layout = new QGridLayout( this, 3, 2, 11, 3 );
+ TQGridLayout *layout = new TQGridLayout( this, 3, 2, 11, 3 );
mManufacturer = new KComboBox( this );
mDevice = new KComboBox( true, this );
@@ -157,11 +157,11 @@ CableWidget::CableWidget( QWidget *parent )
layout->addWidget( mManufacturer, 0, 1 );
layout->addWidget( mDevice, 1, 1 );
- QLabel *label = new QLabel( i18n( "Device Manufacturer:" ), this );
+ TQLabel *label = new TQLabel( i18n( "Device Manufacturer:" ), this );
label->setBuddy( mManufacturer );
layout->addWidget( label, 0, 0 );
- label = new QLabel( i18n( "Device:" ), this );
+ label = new TQLabel( i18n( "Device:" ), this );
label->setBuddy( mDevice );
layout->addWidget( label, 1, 0 );
@@ -176,11 +176,11 @@ CableWidget::CableWidget( QWidget *parent )
mDevice->insertItem( "/dev/ttyUSB1" );
}
-void CableWidget::load( const QDomElement &parent )
+void CableWidget::load( const TQDomElement &parent )
{
- QDomNode node;
+ TQDomNode node;
for ( node = parent.firstChild(); !node.isNull(); node = node.nextSibling() ) {
- QDomElement element = node.toElement();
+ TQDomElement element = node.toElement();
if ( element.tagName() == "cabletype" )
mManufacturer->setCurrentItem( element.text().toInt() );
else if ( element.tagName() == "cabledev" )
@@ -188,10 +188,10 @@ void CableWidget::load( const QDomElement &parent )
}
}
-void CableWidget::save( QDomDocument &doc, QDomElement &parent )
+void CableWidget::save( TQDomDocument &doc, TQDomElement &parent )
{
- QDomElement element = doc.createElement( "cabletype" );
- element.appendChild( doc.createTextNode( QString::number( mManufacturer->currentItem() ) ) );
+ TQDomElement element = doc.createElement( "cabletype" );
+ element.appendChild( doc.createTextNode( TQString::number( mManufacturer->currentItem() ) ) );
parent.appendChild( element );
element = doc.createElement( "cabledev" );
@@ -199,15 +199,15 @@ void CableWidget::save( QDomDocument &doc, QDomElement &parent )
parent.appendChild( element );
}
-UsbWidget::UsbWidget( QWidget *parent )
- : QWidget( parent )
+UsbWidget::UsbWidget( TQWidget *parent )
+ : TQWidget( parent )
{
- QGridLayout *layout = new QGridLayout( this, 3, 2, 11, 3);
+ TQGridLayout *layout = new TQGridLayout( this, 3, 2, 11, 3);
- mInterface = new QSpinBox( this );
+ mInterface = new TQSpinBox( this );
layout->addWidget( mInterface, 0, 1 );
- QLabel *label = new QLabel( i18n( "USB Interface:" ), this );
+ TQLabel *label = new TQLabel( i18n( "USB Interface:" ), this );
label->setBuddy( mInterface );
layout->addWidget( label, 0, 0 );
diff --git a/kitchensync/src/connectionwidgets.h b/kitchensync/src/connectionwidgets.h
index cb7dfb428..b9cc25e8a 100644
--- a/kitchensync/src/connectionwidgets.h
+++ b/kitchensync/src/connectionwidgets.h
@@ -23,7 +23,7 @@
#ifndef CONNECTIONWIDGETS_H
#define CONNECTIONWIDGETS_H
-#include <qdom.h>
+#include <tqdom.h>
#include "configgui.h"
@@ -40,20 +40,20 @@ class BluetoothWidget : public QWidget
Q_OBJECT
public:
- BluetoothWidget( QWidget *parent );
+ BluetoothWidget( TQWidget *parent );
void hideChannel();
void showChannel();
- void setAddress( const QString address );
- void setChannel( const QString channel );
- QString address() const;
- QString channel() const;
+ void setAddress( const TQString address );
+ void setChannel( const TQString channel );
+ TQString address() const;
+ TQString channel() const;
private:
KLineEdit *mAddress;
KLineEdit *mChannel;
- QLabel *mChannelLabel;
+ TQLabel *mChannelLabel;
};
class IRWidget : public QWidget
@@ -61,10 +61,10 @@ class IRWidget : public QWidget
Q_OBJECT
public:
- IRWidget( QWidget *parent );
+ IRWidget( TQWidget *parent );
- void load( const QDomElement& );
- void save( QDomDocument&, QDomElement& );
+ void load( const TQDomElement& );
+ void save( TQDomDocument&, TQDomElement& );
private:
KLineEdit *mDevice;
@@ -74,10 +74,10 @@ class IRWidget : public QWidget
class CableWidget : public QWidget
{
public:
- CableWidget( QWidget *parent );
+ CableWidget( TQWidget *parent );
- void load( const QDomElement& );
- void save( QDomDocument&, QDomElement& );
+ void load( const TQDomElement& );
+ void save( TQDomDocument&, TQDomElement& );
private:
KComboBox *mManufacturer;
@@ -87,13 +87,13 @@ class CableWidget : public QWidget
class UsbWidget : public QWidget
{
public:
- UsbWidget( QWidget *parent );
+ UsbWidget( TQWidget *parent );
int interface() const;
void setInterface( int interface );
private:
- QSpinBox *mInterface;
+ TQSpinBox *mInterface;
};
#endif // CONNECTIONWIDGETS_H
diff --git a/kitchensync/src/genericdiffalgo.cpp b/kitchensync/src/genericdiffalgo.cpp
index 9c03360e9..67e49bab4 100644
--- a/kitchensync/src/genericdiffalgo.cpp
+++ b/kitchensync/src/genericdiffalgo.cpp
@@ -19,7 +19,7 @@
Boston, MA 02110-1301, USA.
*/
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include <klocale.h>
@@ -32,7 +32,7 @@ using namespace KSync;
#ifndef KDE_USE_FINAL
// With --enable-final, we get the (identical) compareString from
// addresseediffalgo.cpp
-static bool compareString( const QString &left, const QString &right )
+static bool compareString( const TQString &left, const TQString &right )
{
if ( left.isEmpty() && right.isEmpty() )
return true;
@@ -41,7 +41,7 @@ static bool compareString( const QString &left, const QString &right )
}
#endif
-GenericDiffAlgo::GenericDiffAlgo( const QString &leftData, const QString &rightData )
+GenericDiffAlgo::GenericDiffAlgo( const TQString &leftData, const TQString &rightData )
: mLeftData( leftData ), mRightData( rightData )
{
}
@@ -50,8 +50,8 @@ void GenericDiffAlgo::run()
{
begin();
- QStringList leftList = QStringList::split( '\n', mLeftData, true );
- QStringList rightList = QStringList::split( '\n', mRightData, true );
+ TQStringList leftList = TQStringList::split( '\n', mLeftData, true );
+ TQStringList rightList = TQStringList::split( '\n', mRightData, true );
uint lines = MAX( leftList.count(), rightList.count() );
for ( uint i = 0; i < lines; ++i ) {
diff --git a/kitchensync/src/genericdiffalgo.h b/kitchensync/src/genericdiffalgo.h
index 64f4a4404..c87e6bc02 100644
--- a/kitchensync/src/genericdiffalgo.h
+++ b/kitchensync/src/genericdiffalgo.h
@@ -31,13 +31,13 @@ namespace KSync {
class GenericDiffAlgo : public DiffAlgo
{
public:
- GenericDiffAlgo( const QString &left, const QString &right );
+ GenericDiffAlgo( const TQString &left, const TQString &right );
void run();
private:
- QString mLeftData;
- QString mRightData;
+ TQString mLeftData;
+ TQString mRightData;
};
}
diff --git a/kitchensync/src/groupconfig.cpp b/kitchensync/src/groupconfig.cpp
index 2ad4af631..cfedcbfad 100644
--- a/kitchensync/src/groupconfig.cpp
+++ b/kitchensync/src/groupconfig.cpp
@@ -37,42 +37,42 @@
#include <kmessagebox.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qpushbutton.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqpushbutton.h>
-GroupConfig::GroupConfig( QWidget *parent )
- : QWidget( parent )
+GroupConfig::GroupConfig( TQWidget *parent )
+ : TQWidget( parent )
{
- QBoxLayout *topLayout = new QVBoxLayout( this );
+ TQBoxLayout *topLayout = new TQVBoxLayout( this );
topLayout->setSpacing( KDialog::spacingHint() );
- QFrame *titleFrame = new QFrame( this );
+ TQFrame *titleFrame = new TQFrame( this );
topLayout->addWidget( titleFrame );
titleFrame->setPaletteForegroundColor( colorGroup().light() );
titleFrame->setPaletteBackgroundColor( colorGroup().mid() );
- QBoxLayout *nameLayout = new QHBoxLayout( titleFrame );
+ TQBoxLayout *nameLayout = new TQHBoxLayout( titleFrame );
nameLayout->setMargin( 4 );
- QPixmap icon = KGlobal::iconLoader()->loadIcon( "kontact_summary",
+ TQPixmap icon = KGlobal::iconLoader()->loadIcon( "kontact_summary",
KIcon::Desktop );
- QLabel *iconLabel = new QLabel( titleFrame );
+ TQLabel *iconLabel = new TQLabel( titleFrame );
iconLabel->setPixmap( icon );
nameLayout->addWidget( iconLabel );
nameLayout->addSpacing( 8 );
- QLabel *label = new QLabel( i18n("Group:"), titleFrame );
- QFont font = label->font();
+ TQLabel *label = new TQLabel( i18n("Group:"), titleFrame );
+ TQFont font = label->font();
font.setBold( true );
font.setPointSize( font.pointSize() + 2 );
label->setFont( font );
nameLayout->addWidget( label );
- mNameLabel = new QLabel( titleFrame );
+ mNameLabel = new TQLabel( titleFrame );
font = mNameLabel->font();
font.setBold( true );
font.setPointSize( font.pointSize() + 2 );
@@ -84,18 +84,18 @@ GroupConfig::GroupConfig( QWidget *parent )
mMemberView = new KJanusWidget( this, 0, KJanusWidget::IconList );
topLayout->addWidget( mMemberView );
- QBoxLayout *buttonLayout = new QHBoxLayout( topLayout );
+ TQBoxLayout *buttonLayout = new TQHBoxLayout( topLayout );
- QPushButton *addButton = new QPushButton( i18n("Add Member..."), this );
- connect( addButton, SIGNAL( clicked() ), SLOT( addMember() ) );
+ TQPushButton *addButton = new TQPushButton( i18n("Add Member..."), this );
+ connect( addButton, TQT_SIGNAL( clicked() ), TQT_SLOT( addMember() ) );
buttonLayout->addWidget( addButton );
buttonLayout->addStretch( 1 );
icon = KGlobal::iconLoader()->loadIcon( "bookmark", KIcon::Desktop );
- QFrame *page = mMemberView->addPage( i18n("Group"),
+ TQFrame *page = mMemberView->addPage( i18n("Group"),
i18n("General Group Settings"), icon );
- QBoxLayout *pageLayout = new QVBoxLayout( page );
+ TQBoxLayout *pageLayout = new TQVBoxLayout( page );
mCommonConfig = new GroupConfigCommon( page );
pageLayout->addWidget( mCommonConfig );
@@ -113,11 +113,11 @@ void GroupConfig::setSyncProcess( SyncProcess *process )
void GroupConfig::updateMembers()
{
- QValueList<MemberConfig *>::ConstIterator memberIt;
+ TQValueList<MemberConfig *>::ConstIterator memberIt;
for ( memberIt = mMemberConfigs.begin(); memberIt != mMemberConfigs.end(); ++memberIt )
(*memberIt)->saveData();
- QValueList<QFrame *>::ConstIterator it2;
+ TQValueList<TQFrame *>::ConstIterator it2;
for ( it2 = mConfigPages.begin(); it2 != mConfigPages.end(); ++it2 ) {
mMemberView->removePage( *it2 );
delete *it2;
@@ -130,10 +130,10 @@ void GroupConfig::updateMembers()
for ( ; it != group.end(); ++it ) {
QSync::Member member = *it;
MemberInfo mi( member );
- QFrame *page = mMemberView->addPage( mi.name(),
- QString( "%1 (%2)" ).arg( mi.name() ).arg(member.pluginName()), mi.desktopIcon() );
+ TQFrame *page = mMemberView->addPage( mi.name(),
+ TQString( "%1 (%2)" ).arg( mi.name() ).arg(member.pluginName()), mi.desktopIcon() );
- QBoxLayout *pageLayout = new QVBoxLayout( page );
+ TQBoxLayout *pageLayout = new TQVBoxLayout( page );
mConfigPages.append( page );
MemberConfig *memberConfig = new MemberConfig( page, member );
@@ -148,7 +148,7 @@ void GroupConfig::saveConfig()
{
mProcess->group().save();
- QValueList<MemberConfig *>::ConstIterator it;
+ TQValueList<MemberConfig *>::ConstIterator it;
for ( it = mMemberConfigs.begin(); it != mMemberConfigs.end(); ++it )
(*it)->saveData();
diff --git a/kitchensync/src/groupconfig.h b/kitchensync/src/groupconfig.h
index d46d64575..3c23b6925 100644
--- a/kitchensync/src/groupconfig.h
+++ b/kitchensync/src/groupconfig.h
@@ -20,8 +20,8 @@
#ifndef GROUPCONFIG_H
#define GROUPCONFIG_H
-#include <qwidget.h>
-#include <qvaluelist.h>
+#include <tqwidget.h>
+#include <tqvaluelist.h>
class QFrame;
class QLabel;
@@ -36,7 +36,7 @@ class GroupConfig : public QWidget
Q_OBJECT
public:
- GroupConfig( QWidget *parent );
+ GroupConfig( TQWidget *parent );
void setSyncProcess( SyncProcess *process );
@@ -48,15 +48,15 @@ class GroupConfig : public QWidget
void addMember();
private:
- QLabel *mNameLabel;
+ TQLabel *mNameLabel;
KJanusWidget *mMemberView;
SyncProcess *mProcess;
GroupConfigCommon *mCommonConfig;
- QValueList<MemberConfig *> mMemberConfigs;
- QValueList<QFrame *> mConfigPages;
+ TQValueList<MemberConfig *> mMemberConfigs;
+ TQValueList<TQFrame *> mConfigPages;
};
#endif
diff --git a/kitchensync/src/groupconfigcommon.cpp b/kitchensync/src/groupconfigcommon.cpp
index d5b0bd1c1..9f629c4d2 100644
--- a/kitchensync/src/groupconfigcommon.cpp
+++ b/kitchensync/src/groupconfigcommon.cpp
@@ -25,9 +25,9 @@
#include <klocale.h>
#include <kdebug.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qcheckbox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqcheckbox.h>
#include <libqopensync/group.h>
#include <libqopensync/conversion.h>
@@ -38,26 +38,26 @@
#include "groupconfigcommon.h"
-ObjectTypeSelector::ObjectTypeSelector( QWidget *parent )
- : QWidget( parent )
+ObjectTypeSelector::ObjectTypeSelector( TQWidget *parent )
+ : TQWidget( parent )
{
- QGridLayout *layout = new QGridLayout( this );
+ TQGridLayout *layout = new TQGridLayout( this );
layout->setMargin( 0 );
const QSync::Conversion conversion = SyncProcessManager::self()->environment()->conversion();
- QMap<QString, QString> objectTypeMap;
+ TQMap<TQString, TQString> objectTypeMap;
objectTypeMap.insert( "contact", i18n( "Contacts" ) );
objectTypeMap.insert( "event", i18n( "Events" ) );
objectTypeMap.insert( "todo", i18n( "To-dos" ) );
objectTypeMap.insert( "note", i18n( "Notes" ) );
- QStringList objectTypes = conversion.objectTypes();
+ TQStringList objectTypes = conversion.objectTypes();
// reorder the entries so that contact and event are the first one
qHeapSort( objectTypes );
- QStringList reoderedObjectTypes, stack;
+ TQStringList reoderedObjectTypes, stack;
for ( uint i = 0; i < objectTypes.count(); ++i ) {
if ( objectTypes[ i ] == "contact" || objectTypes[ i ] == "event" )
reoderedObjectTypes.append( objectTypes[ i ] );
@@ -66,18 +66,18 @@ ObjectTypeSelector::ObjectTypeSelector( QWidget *parent )
}
reoderedObjectTypes += stack;
- QStringList::ConstIterator it;
+ TQStringList::ConstIterator it;
int row = 0;
int col = 0;
for( it = reoderedObjectTypes.begin(); it != reoderedObjectTypes.end(); ++it ) {
- QString objectType = *it;
+ TQString objectType = *it;
// Don't display object type "data". Object type "data" is a kind of wildcard - so don't filter *
if ( objectType == "data" )
continue;
- QCheckBox *objectCheckBox = new QCheckBox( objectTypeMap[ objectType ], this );
+ TQCheckBox *objectCheckBox = new TQCheckBox( objectTypeMap[ objectType ], this );
layout->addWidget( objectCheckBox, row, col );
mObjectTypeChecks.insert( objectType, objectCheckBox );
@@ -93,27 +93,27 @@ void ObjectTypeSelector::load( const QSync::Group &group )
{
const QSync::GroupConfig config = group.config();
- const QStringList objectTypes = config.activeObjectTypes();
+ const TQStringList objectTypes = config.activeObjectTypes();
// Enable everything on the inital load
bool initialLoad = false;
if ( objectTypes.isEmpty() )
initialLoad = true;
- QMap<QString, QCheckBox*>::ConstIterator it;
+ TQMap<TQString, TQCheckBox*>::ConstIterator it;
for( it = mObjectTypeChecks.begin(); it != mObjectTypeChecks.end(); ++it ) {
- QCheckBox *check = it.data();
+ TQCheckBox *check = it.data();
check->setChecked( objectTypes.contains( it.key() ) || initialLoad );
}
}
void ObjectTypeSelector::save( QSync::Group group )
{
- QStringList objectTypes;
+ TQStringList objectTypes;
- QMap<QString,QCheckBox *>::ConstIterator it;
+ TQMap<TQString,TQCheckBox *>::ConstIterator it;
for( it = mObjectTypeChecks.begin(); it != mObjectTypeChecks.end(); ++it ) {
- QCheckBox *check = it.data();
+ TQCheckBox *check = it.data();
if ( check->isChecked() )
objectTypes.append( it.key() );
}
@@ -125,17 +125,17 @@ void ObjectTypeSelector::save( QSync::Group group )
config.setActiveObjectTypes( objectTypes );
}
-GroupConfigCommon::GroupConfigCommon( QWidget *parent )
- : QWidget( parent )
+GroupConfigCommon::GroupConfigCommon( TQWidget *parent )
+ : TQWidget( parent )
{
- QGridLayout *layout = new QGridLayout( this, 2, 2, KDialog::marginHint(), KDialog::spacingHint() );
+ TQGridLayout *layout = new TQGridLayout( this, 2, 2, KDialog::marginHint(), KDialog::spacingHint() );
- layout->addWidget( new QLabel( i18n( "Name:" ), this ), 0, 0 );
+ layout->addWidget( new TQLabel( i18n( "Name:" ), this ), 0, 0 );
mGroupName = new KLineEdit( this );
layout->addWidget( mGroupName, 0, 1 );
- layout->addWidget( new QLabel( i18n( "Object Types to be Synchronized:"), this ), 1, 0, Qt::AlignTop );
+ layout->addWidget( new TQLabel( i18n( "Object Types to be Synchronized:"), this ), 1, 0, Qt::AlignTop );
mObjectTypeSelector = new ObjectTypeSelector( this );
layout->addWidget( mObjectTypeSelector, 1, 1 );
diff --git a/kitchensync/src/groupconfigcommon.h b/kitchensync/src/groupconfigcommon.h
index b28499aa0..6721358e6 100644
--- a/kitchensync/src/groupconfigcommon.h
+++ b/kitchensync/src/groupconfigcommon.h
@@ -21,8 +21,8 @@
#ifndef GROUPCONFIGCOMMON_H
#define GROUPCONFIGCOMMON_H
-#include <qwidget.h>
-#include <qmap.h>
+#include <tqwidget.h>
+#include <tqmap.h>
#include <libqopensync/group.h>
@@ -33,19 +33,19 @@ class QCheckBox;
class ObjectTypeSelector : public QWidget
{
public:
- ObjectTypeSelector( QWidget *parent );
+ ObjectTypeSelector( TQWidget *parent );
void load( const QSync::Group &group );
void save( QSync::Group group );
private:
- QMap<QString,QCheckBox *> mObjectTypeChecks;
+ TQMap<TQString,TQCheckBox *> mObjectTypeChecks;
};
class GroupConfigCommon : public QWidget
{
public:
- GroupConfigCommon( QWidget *parent );
+ GroupConfigCommon( TQWidget *parent );
void setSyncProcess( SyncProcess *syncProcess );
void save();
diff --git a/kitchensync/src/groupconfigdialog.cpp b/kitchensync/src/groupconfigdialog.cpp
index 868915da2..4d8be65d0 100644
--- a/kitchensync/src/groupconfigdialog.cpp
+++ b/kitchensync/src/groupconfigdialog.cpp
@@ -24,15 +24,15 @@
#include <klocale.h>
-#include <qlayout.h>
+#include <tqlayout.h>
-GroupConfigDialog::GroupConfigDialog( QWidget *parent, SyncProcess *process )
+GroupConfigDialog::GroupConfigDialog( TQWidget *parent, SyncProcess *process )
: KDialogBase( parent, 0, true, i18n("Configure Synchronization Group"),
Ok )
{
- QFrame *topFrame = makeMainWidget();
+ TQFrame *topFrame = makeMainWidget();
- QBoxLayout *topLayout = new QVBoxLayout( topFrame );
+ TQBoxLayout *topLayout = new TQVBoxLayout( topFrame );
mConfigWidget = new GroupConfig( topFrame );
topLayout->addWidget( mConfigWidget );
diff --git a/kitchensync/src/groupconfigdialog.h b/kitchensync/src/groupconfigdialog.h
index 10000b960..5fd70884f 100644
--- a/kitchensync/src/groupconfigdialog.h
+++ b/kitchensync/src/groupconfigdialog.h
@@ -30,7 +30,7 @@ class GroupConfigDialog : public KDialogBase
Q_OBJECT
public:
- GroupConfigDialog( QWidget *parent, SyncProcess * );
+ GroupConfigDialog( TQWidget *parent, SyncProcess * );
~GroupConfigDialog();
protected slots:
diff --git a/kitchensync/src/groupitem.cpp b/kitchensync/src/groupitem.cpp
index bd5a8821d..784991c6f 100644
--- a/kitchensync/src/groupitem.cpp
+++ b/kitchensync/src/groupitem.cpp
@@ -27,11 +27,11 @@
#include <kpassivepopup.h>
#include <kurllabel.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qpixmap.h>
-#include <qprogressbar.h>
-#include <qvbox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqpixmap.h>
+#include <tqprogressbar.h>
+#include <tqvbox.h>
#include "memberinfo.h"
#include "multiconflictdialog.h"
@@ -46,42 +46,42 @@ GroupItem::GroupItem( KWidgetList *parent, SyncProcess *process )
mProcessedItems( 0 ), mMaxProcessedItems( 0 ),
mSynchronizing( false )
{
- QFont boldFont;
+ TQFont boldFont;
boldFont.setBold( true );
boldFont.setPointSize( boldFont.pointSize() + 2 );
- QGridLayout *layout = new QGridLayout( this, 4, 4, KDialog::marginHint(), KDialog::spacingHint() );
+ TQGridLayout *layout = new TQGridLayout( this, 4, 4, KDialog::marginHint(), KDialog::spacingHint() );
- mBox = new QVBox( this );
+ mBox = new TQVBox( this );
mBox->setMargin( 5 );
- mProgressBar = new QProgressBar( this );
+ mProgressBar = new TQProgressBar( this );
mProgressBar->setTotalSteps( 100 );
- mTime = new QLabel( this );
+ mTime = new TQLabel( this );
mSyncAction = new KURLLabel( "exec:/sync", i18n( "Synchronize Now" ), this );
mConfigureAction = new KURLLabel( "exec:/config", i18n( "Configure" ), this );
// header
- QHBox* hbox = new QHBox( this );
+ TQHBox* hbox = new TQHBox( this );
hbox->setMargin( 2 );
- static QPixmap icon;
+ static TQPixmap icon;
if ( icon.isNull() )
icon = KGlobal::iconLoader()->loadIcon( "kontact_summary", KIcon::Desktop );
- mIcon = new QLabel( hbox );
+ mIcon = new TQLabel( hbox );
mIcon->setPixmap( icon );
mIcon->setFixedSize( mIcon->sizeHint() );
mIcon->setPaletteBackgroundColor( colorGroup().mid() );
- mGroupName = new QLabel( hbox );
+ mGroupName = new TQLabel( hbox );
mGroupName->setAlignment( AlignLeft | AlignVCenter );
mGroupName->setIndent( KDialog::spacingHint() );
mGroupName->setFont( boldFont );
mGroupName->setPaletteForegroundColor( colorGroup().light() );
mGroupName->setPaletteBackgroundColor( colorGroup().mid() );
- mStatus = new QLabel( hbox );
+ mStatus = new TQLabel( hbox );
mStatus->setAlignment( Qt::AlignRight );
mStatus->setAlignment( AlignRight | AlignVCenter );
mStatus->setIndent( KDialog::spacingHint() );
@@ -104,22 +104,22 @@ GroupItem::GroupItem( KWidgetList *parent, SyncProcess *process )
setPaletteBackgroundColor( kapp->palette().active().base() );
- connect( mCallbackHandler, SIGNAL( conflict( QSync::SyncMapping ) ),
- this, SLOT( conflict( QSync::SyncMapping ) ) );
- connect( mCallbackHandler, SIGNAL( change( const QSync::SyncChangeUpdate& ) ),
- this, SLOT( change( const QSync::SyncChangeUpdate& ) ) );
- connect( mCallbackHandler, SIGNAL( mapping( const QSync::SyncMappingUpdate& ) ),
- this, SLOT( mapping( const QSync::SyncMappingUpdate& ) ) );
- connect( mCallbackHandler, SIGNAL( engine( const QSync::SyncEngineUpdate& ) ),
- this, SLOT( engine( const QSync::SyncEngineUpdate& ) ) );
- connect( mCallbackHandler, SIGNAL( member( const QSync::SyncMemberUpdate& ) ),
- this, SLOT( member( const QSync::SyncMemberUpdate& ) ) );
- connect( mSyncAction, SIGNAL( leftClickedURL() ),
- this, SLOT( synchronize() ) );
- connect( mConfigureAction, SIGNAL( leftClickedURL() ),
- this, SLOT( configure() ) );
- connect( mSyncProcess, SIGNAL( engineChanged( QSync::Engine* ) ),
- this, SLOT( engineChanged( QSync::Engine* ) ) );
+ connect( mCallbackHandler, TQT_SIGNAL( conflict( QSync::SyncMapping ) ),
+ this, TQT_SLOT( conflict( QSync::SyncMapping ) ) );
+ connect( mCallbackHandler, TQT_SIGNAL( change( const QSync::SyncChangeUpdate& ) ),
+ this, TQT_SLOT( change( const QSync::SyncChangeUpdate& ) ) );
+ connect( mCallbackHandler, TQT_SIGNAL( mapping( const QSync::SyncMappingUpdate& ) ),
+ this, TQT_SLOT( mapping( const QSync::SyncMappingUpdate& ) ) );
+ connect( mCallbackHandler, TQT_SIGNAL( engine( const QSync::SyncEngineUpdate& ) ),
+ this, TQT_SLOT( engine( const QSync::SyncEngineUpdate& ) ) );
+ connect( mCallbackHandler, TQT_SIGNAL( member( const QSync::SyncMemberUpdate& ) ),
+ this, TQT_SLOT( member( const QSync::SyncMemberUpdate& ) ) );
+ connect( mSyncAction, TQT_SIGNAL( leftClickedURL() ),
+ this, TQT_SLOT( synchronize() ) );
+ connect( mConfigureAction, TQT_SIGNAL( leftClickedURL() ),
+ this, TQT_SLOT( configure() ) );
+ connect( mSyncProcess, TQT_SIGNAL( engineChanged( QSync::Engine* ) ),
+ this, TQT_SLOT( engineChanged( QSync::Engine* ) ) );
mCallbackHandler->setEngine( mSyncProcess->engine() );
@@ -141,7 +141,7 @@ void GroupItem::update()
mGroupName->setText( i18n( "Group: %1" ).arg( mSyncProcess->group().name() ) );
- QDateTime dateTime = mSyncProcess->group().lastSynchronization();
+ TQDateTime dateTime = mSyncProcess->group().lastSynchronization();
if ( dateTime.isValid() )
mTime->setText( i18n( "Last synchronized on: %1" ).arg( KGlobal::locale()->formatDateTime( dateTime ) ) );
else
@@ -164,9 +164,9 @@ void GroupItem::update()
void GroupItem::clear()
{
- mGroupName->setText( QString() );
+ mGroupName->setText( TQString() );
- QValueList<MemberItem*>::Iterator it;
+ TQValueList<MemberItem*>::Iterator it;
for ( it = mMemberItems.begin(); it != mMemberItems.end(); ++it )
delete *it;
@@ -220,7 +220,7 @@ void GroupItem::change( const QSync::SyncChangeUpdate &update )
KPassivePopup::message( update.result().message(), this );
break;
default:
- mStatus->setText( QString() );
+ mStatus->setText( TQString() );
break;
}
}
@@ -259,7 +259,7 @@ void GroupItem::engine( const QSync::SyncEngineUpdate &update )
break;
case QSync::SyncEngineUpdate::SyncSuccessfull:
mStatus->setText( i18n( "Successfully synchronized" ) );
- mSyncProcess->group().setLastSynchronization( QDateTime::currentDateTime() );
+ mSyncProcess->group().setLastSynchronization( TQDateTime::currentDateTime() );
mSyncProcess->group().save();
this->update();
@@ -274,14 +274,14 @@ void GroupItem::engine( const QSync::SyncEngineUpdate &update )
mMaxProcessedItems = mProcessedItems;
break;
default:
- mStatus->setText( QString() );
+ mStatus->setText( TQString() );
break;
}
}
void GroupItem::member( const QSync::SyncMemberUpdate &update )
{
- QValueList<MemberItem*>::Iterator it;
+ TQValueList<MemberItem*>::Iterator it;
for ( it = mMemberItems.begin(); it != mMemberItems.end(); ++it ) {
if ( (*it)->member() == update.member() ) {
switch ( update.type() ) {
@@ -345,43 +345,43 @@ void GroupItem::engineChanged( QSync::Engine *engine )
this->update();
}
-MemberItem::MemberItem( QWidget *parent, SyncProcess *process,
+MemberItem::MemberItem( TQWidget *parent, SyncProcess *process,
const QSync::Member &member )
- : QWidget( parent ), mSyncProcess( process ), mMember( member )
+ : TQWidget( parent ), mSyncProcess( process ), mMember( member )
{
- QFont boldFont;
+ TQFont boldFont;
boldFont.setBold( true );
MemberInfo mi( member );
- QPixmap icon = mi.smallIcon();
+ TQPixmap icon = mi.smallIcon();
QSync::Plugin plugin = member.plugin();
- QVBoxLayout *layout = new QVBoxLayout( this );
+ TQVBoxLayout *layout = new TQVBoxLayout( this );
- QHBox* box = new QHBox( this );
+ TQHBox* box = new TQHBox( this );
box->setMargin( 5 );
box->setSpacing( 6 );
layout->addWidget( box );
- mIcon = new QLabel( box );
+ mIcon = new TQLabel( box );
mIcon->setPixmap( icon );
mIcon->setAlignment( Qt::AlignTop );
mIcon->setFixedWidth( mIcon->sizeHint().width() );
- QVBox *nameBox = new QVBox( box );
- mMemberName = new QLabel( nameBox );
+ TQVBox *nameBox = new TQVBox( box );
+ mMemberName = new TQLabel( nameBox );
mMemberName->setFont( boldFont );
- mDescription = new QLabel( nameBox );
+ mDescription = new TQLabel( nameBox );
- mStatus = new QLabel( box );
+ mStatus = new TQLabel( box );
mMemberName->setText( member.name() );
mDescription->setText( plugin.longName() );
}
-void MemberItem::setStatusMessage( const QString &msg )
+void MemberItem::setStatusMessage( const TQString &msg )
{
mStatus->setText( msg );
}
diff --git a/kitchensync/src/groupitem.h b/kitchensync/src/groupitem.h
index a18ca1d83..c53f26c0b 100644
--- a/kitchensync/src/groupitem.h
+++ b/kitchensync/src/groupitem.h
@@ -71,16 +71,16 @@ class GroupItem : public KWidgetListItem
private:
SyncProcess *mSyncProcess;
QSync::CallbackHandler *mCallbackHandler;
- QValueList<MemberItem*> mMemberItems;
+ TQValueList<MemberItem*> mMemberItems;
- QLabel *mIcon;
- QLabel *mGroupName;
- QLabel *mStatus;
- QLabel *mTime;
+ TQLabel *mIcon;
+ TQLabel *mGroupName;
+ TQLabel *mStatus;
+ TQLabel *mTime;
KURLLabel *mSyncAction;
KURLLabel *mConfigureAction;
- QVBox *mBox;
- QProgressBar *mProgressBar;
+ TQVBox *mBox;
+ TQProgressBar *mProgressBar;
int mProcessedItems;
int mMaxProcessedItems;
@@ -90,22 +90,22 @@ class GroupItem : public KWidgetListItem
class MemberItem : public QWidget
{
public:
- MemberItem( QWidget *parent, SyncProcess *syncProcess,
+ MemberItem( TQWidget *parent, SyncProcess *syncProcess,
const QSync::Member &member );
SyncProcess* syncProcess() const { return mSyncProcess; }
QSync::Member member() const { return mMember; }
- void setStatusMessage( const QString &msg );
+ void setStatusMessage( const TQString &msg );
private:
SyncProcess *mSyncProcess;
QSync::Member mMember;
- QLabel *mIcon;
- QLabel *mMemberName;
- QLabel *mDescription;
- QLabel *mStatus;
+ TQLabel *mIcon;
+ TQLabel *mMemberName;
+ TQLabel *mDescription;
+ TQLabel *mStatus;
};
#endif
diff --git a/kitchensync/src/groupview.cpp b/kitchensync/src/groupview.cpp
index b0c061e84..8e1adf87e 100644
--- a/kitchensync/src/groupview.cpp
+++ b/kitchensync/src/groupview.cpp
@@ -18,7 +18,7 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#include <qlayout.h>
+#include <tqlayout.h>
#include "aboutpage.h"
#include "groupitem.h"
@@ -26,10 +26,10 @@
#include "groupview.h"
-GroupView::GroupView( QWidget *parent )
- : QWidget( parent ), mAboutPage( 0 )
+GroupView::GroupView( TQWidget *parent )
+ : TQWidget( parent ), mAboutPage( 0 )
{
- mLayout = new QVBoxLayout( this );
+ mLayout = new TQVBoxLayout( this );
mWidgetList = new KWidgetList( this );
@@ -61,7 +61,7 @@ void GroupView::updateView()
mAboutPage = new AboutPage( this );
mLayout->addWidget( mAboutPage );
- connect( mAboutPage, SIGNAL( addGroup() ), SIGNAL( addGroup() ) );
+ connect( mAboutPage, TQT_SIGNAL( addGroup() ), TQT_SIGNAL( addGroup() ) );
}
mAboutPage->show();
@@ -76,12 +76,12 @@ void GroupView::updateView()
SyncProcess *process = SyncProcessManager::self()->at( i );
GroupItem *item = new GroupItem( mWidgetList, process );
- connect( item, SIGNAL( synchronizeGroup( SyncProcess* ) ),
- SIGNAL( synchronizeGroup( SyncProcess* ) ) );
- connect( item, SIGNAL( abortSynchronizeGroup( SyncProcess* ) ),
- SIGNAL( abortSynchronizeGroup( SyncProcess* ) ) );
- connect( item, SIGNAL( configureGroup( SyncProcess* ) ),
- SIGNAL( configureGroup( SyncProcess* ) ) );
+ connect( item, TQT_SIGNAL( synchronizeGroup( SyncProcess* ) ),
+ TQT_SIGNAL( synchronizeGroup( SyncProcess* ) ) );
+ connect( item, TQT_SIGNAL( abortSynchronizeGroup( SyncProcess* ) ),
+ TQT_SIGNAL( abortSynchronizeGroup( SyncProcess* ) ) );
+ connect( item, TQT_SIGNAL( configureGroup( SyncProcess* ) ),
+ TQT_SIGNAL( configureGroup( SyncProcess* ) ) );
mWidgetList->appendItem( item );
}
diff --git a/kitchensync/src/groupview.h b/kitchensync/src/groupview.h
index 7aba895a1..4d2917b42 100644
--- a/kitchensync/src/groupview.h
+++ b/kitchensync/src/groupview.h
@@ -31,7 +31,7 @@ class GroupView : public QWidget
Q_OBJECT
public:
- GroupView( QWidget *parent );
+ GroupView( TQWidget *parent );
SyncProcess* selectedSyncProcess() const;
@@ -51,7 +51,7 @@ class GroupView : public QWidget
AboutPage *mAboutPage;
KWidgetList *mWidgetList;
- QVBoxLayout *mLayout;
+ TQVBoxLayout *mLayout;
};
#endif
diff --git a/kitchensync/src/htmldiffalgodisplay.cpp b/kitchensync/src/htmldiffalgodisplay.cpp
index b3b1bf819..610f05a54 100644
--- a/kitchensync/src/htmldiffalgodisplay.cpp
+++ b/kitchensync/src/htmldiffalgodisplay.cpp
@@ -25,17 +25,17 @@
using namespace KSync;
-static QString textToHTML( const QString &text )
+static TQString textToHTML( const TQString &text )
{
- return QStyleSheet::convertFromPlainText( text );
+ return TQStyleSheet::convertFromPlainText( text );
}
-HTMLDiffAlgoDisplay::HTMLDiffAlgoDisplay( QWidget *parent )
+HTMLDiffAlgoDisplay::HTMLDiffAlgoDisplay( TQWidget *parent )
: KTextBrowser( parent )
{
- setWrapPolicy( QTextEdit::AtWordBoundary );
- setVScrollBarMode( QScrollView::AlwaysOff );
- setHScrollBarMode( QScrollView::AlwaysOff );
+ setWrapPolicy( TQTextEdit::AtWordBoundary );
+ setVScrollBarMode( TQScrollView::AlwaysOff );
+ setHScrollBarMode( TQScrollView::AlwaysOff );
}
void HTMLDiffAlgoDisplay::begin()
@@ -44,12 +44,12 @@ void HTMLDiffAlgoDisplay::begin()
mText = "";
mText.append( "<html>" );
- mText.append( QString( "<body text=\"%1\" bgcolor=\"%2\">" )
+ mText.append( TQString( "<body text=\"%1\" bgcolor=\"%2\">" )
.arg( KGlobalSettings::textColor().name() )
.arg( KGlobalSettings::baseColor().name() ) );
mText.append( "<center><table>" );
- mText.append( QString( "<tr><th></th><th align=\"center\">%1</th><td> </td><th align=\"center\">%2</th></tr>" )
+ mText.append( TQString( "<tr><th></th><th align=\"center\">%1</th><td> </td><th align=\"center\">%2</th></tr>" )
.arg( mLeftTitle )
.arg( mRightTitle ) );
}
@@ -63,34 +63,34 @@ void HTMLDiffAlgoDisplay::end()
setText( mText );
}
-void HTMLDiffAlgoDisplay::setLeftSourceTitle( const QString &title )
+void HTMLDiffAlgoDisplay::setLeftSourceTitle( const TQString &title )
{
mLeftTitle = title;
}
-void HTMLDiffAlgoDisplay::setRightSourceTitle( const QString &title )
+void HTMLDiffAlgoDisplay::setRightSourceTitle( const TQString &title )
{
mRightTitle = title;
}
-void HTMLDiffAlgoDisplay::additionalLeftField( const QString &id, const QString &value )
+void HTMLDiffAlgoDisplay::additionalLeftField( const TQString &id, const TQString &value )
{
- mText.append( QString( "<tr><td align=\"right\"><b>%1:</b></td><td bgcolor=\"#9cff83\">%2</td><td></td><td></td></tr>" )
+ mText.append( TQString( "<tr><td align=\"right\"><b>%1:</b></td><td bgcolor=\"#9cff83\">%2</td><td></td><td></td></tr>" )
.arg( id )
.arg( textToHTML( value ) ) );
}
-void HTMLDiffAlgoDisplay::additionalRightField( const QString &id, const QString &value )
+void HTMLDiffAlgoDisplay::additionalRightField( const TQString &id, const TQString &value )
{
- mText.append( QString( "<tr><td align=\"right\"><b>%1:</b></td><td></td><td></td><td bgcolor=\"#9cff83\">%2</td></tr>" )
+ mText.append( TQString( "<tr><td align=\"right\"><b>%1:</b></td><td></td><td></td><td bgcolor=\"#9cff83\">%2</td></tr>" )
.arg( id )
.arg( textToHTML( value ) ) );
}
-void HTMLDiffAlgoDisplay::conflictField( const QString &id, const QString &leftValue,
- const QString &rightValue )
+void HTMLDiffAlgoDisplay::conflictField( const TQString &id, const TQString &leftValue,
+ const TQString &rightValue )
{
- mText.append( QString( "<tr><td align=\"right\"><b>%1:</b></td><td bgcolor=\"#ff8686\">%2</td><td></td><td bgcolor=\"#ff8686\">%3</td></tr>" )
+ mText.append( TQString( "<tr><td align=\"right\"><b>%1:</b></td><td bgcolor=\"#ff8686\">%2</td><td></td><td bgcolor=\"#ff8686\">%3</td></tr>" )
.arg( id )
.arg( textToHTML( leftValue ) )
.arg( textToHTML( rightValue ) ) );
diff --git a/kitchensync/src/htmldiffalgodisplay.h b/kitchensync/src/htmldiffalgodisplay.h
index e35e5eb40..b3d52259f 100644
--- a/kitchensync/src/htmldiffalgodisplay.h
+++ b/kitchensync/src/htmldiffalgodisplay.h
@@ -32,21 +32,21 @@ namespace KSync {
class HTMLDiffAlgoDisplay : virtual public DiffAlgoDisplay, public KTextBrowser
{
public:
- HTMLDiffAlgoDisplay( QWidget *parent );
+ HTMLDiffAlgoDisplay( TQWidget *parent );
void begin();
void end();
- void setLeftSourceTitle( const QString &title );
- void setRightSourceTitle( const QString &title );
- void additionalLeftField( const QString &id, const QString &value );
- void additionalRightField( const QString &id, const QString &value );
- void conflictField( const QString &id, const QString &leftValue,
- const QString &rightValue );
+ void setLeftSourceTitle( const TQString &title );
+ void setRightSourceTitle( const TQString &title );
+ void additionalLeftField( const TQString &id, const TQString &value );
+ void additionalRightField( const TQString &id, const TQString &value );
+ void conflictField( const TQString &id, const TQString &leftValue,
+ const TQString &rightValue );
private:
- QString mLeftTitle;
- QString mRightTitle;
- QString mText;
+ TQString mLeftTitle;
+ TQString mRightTitle;
+ TQString mText;
};
}
diff --git a/kitchensync/src/kwidgetlist.cpp b/kitchensync/src/kwidgetlist.cpp
index 450a719e8..d34fcb2b3 100644
--- a/kitchensync/src/kwidgetlist.cpp
+++ b/kitchensync/src/kwidgetlist.cpp
@@ -19,7 +19,7 @@
Boston, MA 02110-1301, USA.
*/
-#include <qvbox.h>
+#include <tqvbox.h>
#include <kglobalsettings.h>
@@ -33,20 +33,20 @@ class KWidgetList::Private
{
}
- QValueList<KWidgetListItem*> mItems;
+ TQValueList<KWidgetListItem*> mItems;
KWidgetListItem *mSelectedItem;
- QVBox *mBox;
+ TQVBox *mBox;
};
-KWidgetList::KWidgetList( QWidget *parent, const char *name )
- : QScrollView( parent, name ),
+KWidgetList::KWidgetList( TQWidget *parent, const char *name )
+ : TQScrollView( parent, name ),
d( new Private )
{
- d->mBox = new QVBox( viewport() );
+ d->mBox = new TQVBox( viewport() );
addChild( d->mBox );
setResizePolicy( AutoOneFit );
- setFocusPolicy( QWidget::StrongFocus );
+ setFocusPolicy( TQWidget::StrongFocus );
viewport()->setFocus();
}
@@ -71,7 +71,7 @@ void KWidgetList::appendItem( KWidgetListItem *item )
if ( !d->mItems.contains( item ) ) {
d->mItems.append( item );
- item->reparent( d->mBox, 0, QPoint( 0, 0 ), true );
+ item->reparent( d->mBox, 0, TQPoint( 0, 0 ), true );
item->setSelected( false );
item->installEventFilter( this );
@@ -111,7 +111,7 @@ void KWidgetList::removeItem( int index )
void KWidgetList::takeItem( KWidgetListItem *item )
{
d->mItems.remove( item );
- item->reparent( 0, 0, QPoint( 0, 0 ) );
+ item->reparent( 0, 0, TQPoint( 0, 0 ) );
item->removeEventFilter( this );
item->hide();
@@ -174,7 +174,7 @@ int KWidgetList::index( KWidgetListItem *item ) const
void KWidgetList::clear()
{
- QValueList<KWidgetListItem*>::Iterator it;
+ TQValueList<KWidgetListItem*>::Iterator it;
for ( it = d->mItems.begin(); it != d->mItems.end(); ++it )
delete *it;
@@ -188,12 +188,12 @@ void KWidgetList::setFocus()
viewport()->setFocus();
}
-bool KWidgetList::eventFilter( QObject *object, QEvent *event )
+bool KWidgetList::eventFilter( TQObject *object, TQEvent *event )
{
- if ( event->type() == QEvent::MouseButtonPress ) {
- QMouseEvent *mouseEvent = static_cast<QMouseEvent*>( event );
+ if ( event->type() == TQEvent::MouseButtonPress ) {
+ TQMouseEvent *mouseEvent = static_cast<TQMouseEvent*>( event );
if ( mouseEvent->button() & LeftButton ) {
- QValueList<KWidgetListItem*>::Iterator it;
+ TQValueList<KWidgetListItem*>::Iterator it;
for ( it = d->mItems.begin(); it != d->mItems.end(); ++it ) {
if ( *it == object ) {
if ( d->mItems.count() != 1 ) {
@@ -204,8 +204,8 @@ bool KWidgetList::eventFilter( QObject *object, QEvent *event )
}
}
}
- } else if ( event->type() == QEvent::MouseButtonDblClick ) {
- QValueList<KWidgetListItem*>::Iterator it;
+ } else if ( event->type() == TQEvent::MouseButtonDblClick ) {
+ TQValueList<KWidgetListItem*>::Iterator it;
for ( it = d->mItems.begin(); it != d->mItems.end(); ++it ) {
if ( *it == object ) {
if ( d->mItems.count() != 1 ) {
@@ -215,8 +215,8 @@ bool KWidgetList::eventFilter( QObject *object, QEvent *event )
return true;
}
}
- } else if ( event->type() == QEvent::KeyPress ) {
- QKeyEvent *keyEvent = static_cast<QKeyEvent*>( event );
+ } else if ( event->type() == TQEvent::KeyPress ) {
+ TQKeyEvent *keyEvent = static_cast<TQKeyEvent*>( event );
if ( keyEvent->key() == Qt::Key_Up ) {
if ( d->mSelectedItem == 0 ) {
if ( !d->mItems.isEmpty() ) {
@@ -253,18 +253,18 @@ bool KWidgetList::eventFilter( QObject *object, QEvent *event )
}
}
- return QScrollView::eventFilter( object, event );
+ return TQScrollView::eventFilter( object, event );
}
KWidgetListItem::KWidgetListItem( KWidgetList *parent, const char *name )
- : QWidget( parent, name )
+ : TQWidget( parent, name )
{
mForegroundColor = KGlobalSettings::textColor();
mBackgroundColor = KGlobalSettings::baseColor();
mSelectionForegroundColor = KGlobalSettings::highlightedTextColor();
mSelectionBackgroundColor = KGlobalSettings::highlightColor();
- setFocusPolicy( QWidget::StrongFocus );
+ setFocusPolicy( TQWidget::StrongFocus );
}
KWidgetListItem::~KWidgetListItem()
@@ -282,22 +282,22 @@ void KWidgetListItem::setSelected( bool select )
}
}
-void KWidgetListItem::setForegroundColor( const QColor &color )
+void KWidgetListItem::setForegroundColor( const TQColor &color )
{
mForegroundColor = color;
}
-void KWidgetListItem::setBackgroundColor( const QColor &color )
+void KWidgetListItem::setBackgroundColor( const TQColor &color )
{
mBackgroundColor = color;
}
-void KWidgetListItem::setSelectionForegroundColor( const QColor &color )
+void KWidgetListItem::setSelectionForegroundColor( const TQColor &color )
{
mSelectionForegroundColor = color;
}
-void KWidgetListItem::setSelectionBackgroundColor( const QColor &color )
+void KWidgetListItem::setSelectionBackgroundColor( const TQColor &color )
{
mSelectionBackgroundColor = color;
}
diff --git a/kitchensync/src/kwidgetlist.h b/kitchensync/src/kwidgetlist.h
index 59567b7d5..83c928f25 100644
--- a/kitchensync/src/kwidgetlist.h
+++ b/kitchensync/src/kwidgetlist.h
@@ -22,7 +22,7 @@
#ifndef KWIDGETLIST_H
#define KWIDGETLIST_H
-#include <qscrollview.h>
+#include <tqscrollview.h>
class KWidgetListItem;
@@ -31,7 +31,7 @@ class KWidgetList : public QScrollView
Q_OBJECT
public:
- KWidgetList( QWidget *parent = 0, const char *name = 0 );
+ KWidgetList( TQWidget *parent = 0, const char *name = 0 );
~KWidgetList();
uint count() const;
@@ -51,7 +51,7 @@ class KWidgetList : public QScrollView
int index( KWidgetListItem *item ) const;
- virtual bool eventFilter( QObject *object, QEvent *event );
+ virtual bool eventFilter( TQObject *object, TQEvent *event );
public slots:
void clear();
@@ -75,16 +75,16 @@ class KWidgetListItem : public QWidget
void setSelected( bool selected );
protected:
- void setForegroundColor( const QColor& );
- void setBackgroundColor( const QColor& );
- void setSelectionForegroundColor( const QColor& );
- void setSelectionBackgroundColor( const QColor& );
+ void setForegroundColor( const TQColor& );
+ void setBackgroundColor( const TQColor& );
+ void setSelectionForegroundColor( const TQColor& );
+ void setSelectionBackgroundColor( const TQColor& );
private:
- QColor mForegroundColor;
- QColor mBackgroundColor;
- QColor mSelectionForegroundColor;
- QColor mSelectionBackgroundColor;
+ TQColor mForegroundColor;
+ TQColor mBackgroundColor;
+ TQColor mSelectionForegroundColor;
+ TQColor mSelectionBackgroundColor;
};
#endif
diff --git a/kitchensync/src/mainwidget.cpp b/kitchensync/src/mainwidget.cpp
index 683436364..d04542f9d 100644
--- a/kitchensync/src/mainwidget.cpp
+++ b/kitchensync/src/mainwidget.cpp
@@ -38,10 +38,10 @@
#include <kstdaction.h>
#include <kxmlguiclient.h>
-#include <qlayout.h>
+#include <tqlayout.h>
-MainWidget::MainWidget( KXMLGUIClient *guiClient, QWidget *widget, const char *name )
- : QWidget( widget, name ), mGUIClient( guiClient )
+MainWidget::MainWidget( KXMLGUIClient *guiClient, TQWidget *widget, const char *name )
+ : TQWidget( widget, name ), mGUIClient( guiClient )
{
initGUI();
initActions();
@@ -55,10 +55,10 @@ MainWidget::MainWidget( KXMLGUIClient *guiClient, QWidget *widget, const char *n
mGroupView->updateView();
- connect( SyncProcessManager::self(), SIGNAL( changed() ),
- mGroupView, SLOT( updateView() ) );
- connect( SyncProcessManager::self(), SIGNAL( syncProcessChanged( SyncProcess* ) ),
- mGroupView, SLOT( updateSyncProcess( SyncProcess* ) ) );
+ connect( SyncProcessManager::self(), TQT_SIGNAL( changed() ),
+ mGroupView, TQT_SLOT( updateView() ) );
+ connect( SyncProcessManager::self(), TQT_SIGNAL( syncProcessChanged( SyncProcess* ) ),
+ mGroupView, TQT_SLOT( updateSyncProcess( SyncProcess* ) ) );
enableActions();
}
@@ -86,29 +86,29 @@ KAboutData *MainWidget::aboutData()
void MainWidget::initGUI()
{
- QVBoxLayout *topLayout = new QVBoxLayout( this );
+ TQVBoxLayout *topLayout = new TQVBoxLayout( this );
mGroupView = new GroupView( this );
topLayout->addWidget( mGroupView );
- connect( mGroupView, SIGNAL( addGroup() ), SLOT( addGroup() ) );
- connect( mGroupView, SIGNAL( synchronizeGroup( SyncProcess* ) ),
- SLOT( sync( SyncProcess* ) ) );
- connect( mGroupView, SIGNAL( abortSynchronizeGroup( SyncProcess* ) ),
- SLOT( abortSync( SyncProcess* ) ) );
- connect( mGroupView, SIGNAL( configureGroup( SyncProcess* ) ),
- SLOT( editGroup( SyncProcess* ) ) );
+ connect( mGroupView, TQT_SIGNAL( addGroup() ), TQT_SLOT( addGroup() ) );
+ connect( mGroupView, TQT_SIGNAL( synchronizeGroup( SyncProcess* ) ),
+ TQT_SLOT( sync( SyncProcess* ) ) );
+ connect( mGroupView, TQT_SIGNAL( abortSynchronizeGroup( SyncProcess* ) ),
+ TQT_SLOT( abortSync( SyncProcess* ) ) );
+ connect( mGroupView, TQT_SIGNAL( configureGroup( SyncProcess* ) ),
+ TQT_SLOT( editGroup( SyncProcess* ) ) );
}
void MainWidget::initActions()
{
- mActionSynchronize = new KAction( i18n("Synchronize"), "hotsync", 0, this, SLOT( sync() ),
+ mActionSynchronize = new KAction( i18n("Synchronize"), "hotsync", 0, this, TQT_SLOT( sync() ),
mGUIClient->actionCollection(), "sync" );
- mActionAddGroup = new KAction( i18n("Add Group..."), "filenew", 0, this, SLOT( addGroup() ),
+ mActionAddGroup = new KAction( i18n("Add Group..."), "filenew", 0, this, TQT_SLOT( addGroup() ),
mGUIClient->actionCollection(), "add_group" );
- mActionDeleteGroup = new KAction( i18n("Delete Group..."), "editdelete", 0, this, SLOT( deleteGroup() ),
+ mActionDeleteGroup = new KAction( i18n("Delete Group..."), "editdelete", 0, this, TQT_SLOT( deleteGroup() ),
mGUIClient->actionCollection(), "delete_group" );
- mActionEditGroup = new KAction( i18n("Edit Group..."), "edit", 0, this, SLOT( editGroup() ),
+ mActionEditGroup = new KAction( i18n("Edit Group..."), "edit", 0, this, TQT_SLOT( editGroup() ),
mGUIClient->actionCollection(), "edit_group" );
}
@@ -124,8 +124,8 @@ void MainWidget::enableActions()
void MainWidget::addGroup()
{
bool ok;
- QString name = KInputDialog::getText( i18n("Create Synchronization Group"),
- i18n("Name for new synchronization group."), QString::null, &ok, this );
+ TQString name = KInputDialog::getText( i18n("Create Synchronization Group"),
+ i18n("Name for new synchronization group."), TQString::null, &ok, this );
if ( ok ) {
SyncProcessManager::self()->addGroup( name );
enableActions();
diff --git a/kitchensync/src/mainwidget.h b/kitchensync/src/mainwidget.h
index 3bbfcb5cd..acd353434 100644
--- a/kitchensync/src/mainwidget.h
+++ b/kitchensync/src/mainwidget.h
@@ -23,7 +23,7 @@
#include <libqopensync/engine.h>
#include <kdemacros.h>
-#include <qwidget.h>
+#include <tqwidget.h>
class KAboutData;
class KAction;
@@ -40,7 +40,7 @@ class KDE_EXPORT MainWidget : public QWidget
{
Q_OBJECT
public:
- MainWidget( KXMLGUIClient *guiClient, QWidget *widget = 0, const char *name = 0 );
+ MainWidget( KXMLGUIClient *guiClient, TQWidget *widget = 0, const char *name = 0 );
~MainWidget();
virtual KXMLGUIClient *guiClient() const;
diff --git a/kitchensync/src/mainwindow.cpp b/kitchensync/src/mainwindow.cpp
index 2426b11dc..4052cb0c1 100644
--- a/kitchensync/src/mainwindow.cpp
+++ b/kitchensync/src/mainwindow.cpp
@@ -55,7 +55,7 @@ MainWindow::~MainWindow()
void MainWindow::initActions()
{
- KStdAction::quit( this, SLOT( close() ), actionCollection() );
+ KStdAction::quit( this, TQT_SLOT( close() ), actionCollection() );
}
#include "mainwindow.moc"
diff --git a/kitchensync/src/memberconfig.cpp b/kitchensync/src/memberconfig.cpp
index 932830cd8..37755a504 100644
--- a/kitchensync/src/memberconfig.cpp
+++ b/kitchensync/src/memberconfig.cpp
@@ -26,14 +26,14 @@
#include <klocale.h>
#include <kmessagebox.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qtabwidget.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqtabwidget.h>
-MemberConfig::MemberConfig( QWidget *parent, const QSync::Member &member )
- : QWidget( parent ), mMember( member )
+MemberConfig::MemberConfig( TQWidget *parent, const QSync::Member &member )
+ : TQWidget( parent ), mMember( member )
{
- QBoxLayout *topLayout = new QVBoxLayout( this );
+ TQBoxLayout *topLayout = new TQVBoxLayout( this );
mGui = ConfigGui::Factory::create( member, this );
topLayout->addWidget( mGui );
@@ -45,7 +45,7 @@ MemberConfig::~MemberConfig()
void MemberConfig::loadData()
{
- QByteArray cfg;
+ TQByteArray cfg;
QSync::Result error = mMember.configuration( cfg );
if ( error ) {
@@ -53,7 +53,7 @@ void MemberConfig::loadData()
i18n("Unable to read config from plugin '%1':\n%2")
.arg( mMember.pluginName() ).arg( error.message() ) );
} else {
- QString txt = QString::fromUtf8( cfg.data(), cfg.size() );
+ TQString txt = TQString::fromUtf8( cfg.data(), cfg.size() );
mGui->load( txt );
MemberInfo mi( mMember );
mGui->setInstanceName( mi.name() );
@@ -62,12 +62,12 @@ void MemberConfig::loadData()
void MemberConfig::saveData()
{
- QString txt = mGui->save();
+ TQString txt = mGui->save();
if ( txt.isEmpty() ) {
KMessageBox::sorry( this, i18n("Configuration of %1 is empty.").arg( mMember.pluginName() ) );
} else {
- QByteArray cfg = txt.utf8();
+ TQByteArray cfg = txt.utf8();
cfg.truncate(cfg.size() - 1); /* discard NUL terminator */
mMember.setConfiguration( cfg );
mMember.setName( mGui->instanceName() );
diff --git a/kitchensync/src/memberconfig.h b/kitchensync/src/memberconfig.h
index 5bb46b8ff..6e10da3dd 100644
--- a/kitchensync/src/memberconfig.h
+++ b/kitchensync/src/memberconfig.h
@@ -22,7 +22,7 @@
#include <libqopensync/member.h>
-#include <qwidget.h>
+#include <tqwidget.h>
class QTextEdit;
class ConfigGui;
@@ -32,7 +32,7 @@ class MemberConfig : public QWidget
Q_OBJECT
public:
- MemberConfig( QWidget *parent, const QSync::Member & );
+ MemberConfig( TQWidget *parent, const QSync::Member & );
~MemberConfig();
void loadData();
diff --git a/kitchensync/src/memberinfo.cpp b/kitchensync/src/memberinfo.cpp
index be43991fd..212e2e396 100644
--- a/kitchensync/src/memberinfo.cpp
+++ b/kitchensync/src/memberinfo.cpp
@@ -30,24 +30,24 @@ MemberInfo::MemberInfo( const QSync::Member &member )
{
}
-QPixmap MemberInfo::smallIcon() const
+TQPixmap MemberInfo::smallIcon() const
{
return KGlobal::iconLoader()->loadIcon( iconName(), KIcon::Small );
}
-QPixmap MemberInfo::desktopIcon() const
+TQPixmap MemberInfo::desktopIcon() const
{
return KGlobal::iconLoader()->loadIcon( iconName(), KIcon::Desktop );
}
-QString MemberInfo::iconName() const
+TQString MemberInfo::iconName() const
{
return pluginIconName( mMember.pluginName() );
}
-QString MemberInfo::name() const
+TQString MemberInfo::name() const
{
- static QMap<QString, QString> nameMap;
+ static TQMap<TQString, TQString> nameMap;
if ( nameMap.isEmpty() ) {
nameMap.insert( "file-sync", i18n( "File" ) );
nameMap.insert( "palm-sync", i18n( "Palm" ) );
@@ -69,12 +69,12 @@ QString MemberInfo::name() const
}
if ( mMember.name().isEmpty() )
- return nameMap[ mMember.pluginName() ] + " (" + QString::number( mMember.id() ) + ") ";
+ return nameMap[ mMember.pluginName() ] + " (" + TQString::number( mMember.id() ) + ") ";
else
return mMember.name();
}
-QString MemberInfo::pluginIconName( const QString &pluginName )
+TQString MemberInfo::pluginIconName( const TQString &pluginName )
{
if ( pluginName == "file-sync" ) return "folder";
if ( pluginName == "palm-sync" ) return "pda_black";
@@ -95,5 +95,5 @@ QString MemberInfo::pluginIconName( const QString &pluginName )
if ( pluginName == "jescs-sync" ) return "www";
- return QString::null;
+ return TQString::null;
}
diff --git a/kitchensync/src/memberinfo.h b/kitchensync/src/memberinfo.h
index 2ec35cfaa..8f0d7f4f7 100644
--- a/kitchensync/src/memberinfo.h
+++ b/kitchensync/src/memberinfo.h
@@ -23,22 +23,22 @@
#include <libqopensync/member.h>
-#include <qstring.h>
-#include <qpixmap.h>
+#include <tqstring.h>
+#include <tqpixmap.h>
class MemberInfo
{
public:
MemberInfo( const QSync::Member &member );
- QPixmap smallIcon() const;
- QPixmap desktopIcon() const;
+ TQPixmap smallIcon() const;
+ TQPixmap desktopIcon() const;
- QString iconName() const;
+ TQString iconName() const;
- QString name() const;
+ TQString name() const;
- static QString pluginIconName( const QString &pluginName );
+ static TQString pluginIconName( const TQString &pluginName );
private:
QSync::Member mMember;
diff --git a/kitchensync/src/multiconflictdialog.cpp b/kitchensync/src/multiconflictdialog.cpp
index 996ef08af..7d7805c42 100644
--- a/kitchensync/src/multiconflictdialog.cpp
+++ b/kitchensync/src/multiconflictdialog.cpp
@@ -22,9 +22,9 @@
#include <klocale.h>
#include <kwidgetlist.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qpushbutton.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqpushbutton.h>
#include "memberinfo.h"
@@ -37,12 +37,12 @@ class ChangeItem : public KWidgetListItem
: KWidgetListItem( parent ),
mChange( change )
{
- QGridLayout *layout = new QGridLayout( this, 2, 1, KDialog::marginHint(), KDialog::spacingHint() );
+ TQGridLayout *layout = new TQGridLayout( this, 2, 1, KDialog::marginHint(), KDialog::spacingHint() );
MemberInfo mi( change.member() );
- layout->addWidget( new QLabel( mi.name(), this ), 0, 0 );
+ layout->addWidget( new TQLabel( mi.name(), this ), 0, 0 );
- QString type;
+ TQString type;
switch ( change.changeType() ) {
case QSync::SyncChange::UnknownChange:
type = i18n( "Unknown" );
@@ -62,7 +62,7 @@ class ChangeItem : public KWidgetListItem
break;
}
- layout->addWidget( new QLabel( type, this ), 1, 0 );
+ layout->addWidget( new TQLabel( type, this ), 1, 0 );
}
QSync::SyncChange change() const { return mChange; }
@@ -71,7 +71,7 @@ class ChangeItem : public KWidgetListItem
QSync::SyncChange mChange;
};
-MultiConflictDialog::MultiConflictDialog( QSync::SyncMapping &mapping, QWidget *parent )
+MultiConflictDialog::MultiConflictDialog( QSync::SyncMapping &mapping, TQWidget *parent )
: ConflictDialog( mapping, parent )
{
initGUI();
@@ -118,23 +118,23 @@ void MultiConflictDialog::ignoreChange()
void MultiConflictDialog::initGUI()
{
- QGridLayout *layout = new QGridLayout( this, 3, 3, KDialog::marginHint(), KDialog::spacingHint() );
+ TQGridLayout *layout = new TQGridLayout( this, 3, 3, KDialog::marginHint(), KDialog::spacingHint() );
- layout->addMultiCellWidget( new QLabel( i18n( "A conflict has appeared, please solve it manually." ), this ), 0, 0, 0, 2 );
+ layout->addMultiCellWidget( new TQLabel( i18n( "A conflict has appeared, please solve it manually." ), this ), 0, 0, 0, 2 );
mWidgetList = new KWidgetList( this );
layout->addMultiCellWidget( mWidgetList, 1, 1, 0, 2 );
- QPushButton *button = new QPushButton( i18n( "Use Selected Item" ), this );
- connect( button, SIGNAL( clicked() ), SLOT( useSelectedChange() ) );
+ TQPushButton *button = new TQPushButton( i18n( "Use Selected Item" ), this );
+ connect( button, TQT_SIGNAL( clicked() ), TQT_SLOT( useSelectedChange() ) );
layout->addWidget( button, 2, 0 );
- button = new QPushButton( i18n( "Duplicate Items" ), this );
- connect( button, SIGNAL( clicked() ), SLOT( duplicateChange() ) );
+ button = new TQPushButton( i18n( "Duplicate Items" ), this );
+ connect( button, TQT_SIGNAL( clicked() ), TQT_SLOT( duplicateChange() ) );
layout->addWidget( button, 2, 1 );
- button = new QPushButton( i18n( "Ignore Conflict" ), this );
- connect( button, SIGNAL( clicked() ), SLOT( ignoreChange() ) );
+ button = new TQPushButton( i18n( "Ignore Conflict" ), this );
+ connect( button, TQT_SIGNAL( clicked() ), TQT_SLOT( ignoreChange() ) );
layout->addWidget( button, 2, 2 );
}
diff --git a/kitchensync/src/multiconflictdialog.h b/kitchensync/src/multiconflictdialog.h
index d98fb927b..a7dcfaddc 100644
--- a/kitchensync/src/multiconflictdialog.h
+++ b/kitchensync/src/multiconflictdialog.h
@@ -30,7 +30,7 @@ class MultiConflictDialog : public ConflictDialog
Q_OBJECT
public:
- MultiConflictDialog( QSync::SyncMapping &mapping, QWidget *parent );
+ MultiConflictDialog( QSync::SyncMapping &mapping, TQWidget *parent );
~MultiConflictDialog();
private slots:
diff --git a/kitchensync/src/part.cpp b/kitchensync/src/part.cpp
index e0d65cf40..f66eece63 100644
--- a/kitchensync/src/part.cpp
+++ b/kitchensync/src/part.cpp
@@ -18,8 +18,8 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#include <qlayout.h>
-#include <qvbox.h>
+#include <tqlayout.h>
+#include <tqvbox.h>
#include <kaction.h>
#include <kapplication.h>
@@ -36,14 +36,14 @@
typedef KParts::GenericFactory< KitchenSyncPart > KitchenSyncFactory;
K_EXPORT_COMPONENT_FACTORY( libkitchensyncpart, KitchenSyncFactory )
-KitchenSyncPart::KitchenSyncPart( QWidget *parentWidget, const char *widgetName,
- QObject *parent, const char *name,
- const QStringList& )
+KitchenSyncPart::KitchenSyncPart( TQWidget *parentWidget, const char *widgetName,
+ TQObject *parent, const char *name,
+ const TQStringList& )
: KParts::ReadOnlyPart( parent, name )
{
setInstance( KitchenSyncFactory::instance() );
- QVBox *canvas = new QVBox( parentWidget, widgetName );
+ TQVBox *canvas = new TQVBox( parentWidget, widgetName );
setWidget( canvas );
new MainWidget( this, canvas );
diff --git a/kitchensync/src/part.h b/kitchensync/src/part.h
index f51ddd158..3e053bbdc 100644
--- a/kitchensync/src/part.h
+++ b/kitchensync/src/part.h
@@ -32,8 +32,8 @@ class KitchenSyncPart: public KParts::ReadOnlyPart
Q_OBJECT
public:
- KitchenSyncPart( QWidget *parentWidget, const char *widgetName,
- QObject *parent, const char *name, const QStringList& );
+ KitchenSyncPart( TQWidget *parentWidget, const char *widgetName,
+ TQObject *parent, const char *name, const TQStringList& );
virtual ~KitchenSyncPart();
static KAboutData *createAboutData();
diff --git a/kitchensync/src/pluginpicker.cpp b/kitchensync/src/pluginpicker.cpp
index 5fe4b5e81..d981599bd 100644
--- a/kitchensync/src/pluginpicker.cpp
+++ b/kitchensync/src/pluginpicker.cpp
@@ -31,23 +31,23 @@
#include <kiconloader.h>
#include <klocale.h>
-#include <qlabel.h>
-#include <qlayout.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
PluginItem::PluginItem( KWidgetList *list, const QSync::Plugin &plugin )
: KWidgetListItem( list ), mPlugin( plugin )
{
- QString iconName = MemberInfo::pluginIconName( mPlugin.name() );
- QGridLayout *layout = new QGridLayout( this, 2, 2, KDialog::marginHint(), KDialog::spacingHint() );
+ TQString iconName = MemberInfo::pluginIconName( mPlugin.name() );
+ TQGridLayout *layout = new TQGridLayout( this, 2, 2, KDialog::marginHint(), KDialog::spacingHint() );
- QLabel *icon = new QLabel( this );
+ TQLabel *icon = new TQLabel( this );
icon->setPixmap( KGlobal::iconLoader()->loadIcon( iconName, KIcon::Desktop ) );
icon->setFixedSize( icon->sizeHint() );
- QLabel *name = new QLabel( plugin.longName(), this );
- QLabel *description = new QLabel( plugin.description(), this );
+ TQLabel *name = new TQLabel( plugin.longName(), this );
+ TQLabel *description = new TQLabel( plugin.description(), this );
- QFont font = name->font();
+ TQFont font = name->font();
font.setBold( true );
name->setFont( font );
@@ -57,16 +57,16 @@ PluginItem::PluginItem( KWidgetList *list, const QSync::Plugin &plugin )
}
-PluginPicker::PluginPicker( QWidget *parent )
- : QWidget( parent )
+PluginPicker::PluginPicker( TQWidget *parent )
+ : TQWidget( parent )
{
- QBoxLayout *layout = new QVBoxLayout( this );
+ TQBoxLayout *layout = new TQVBoxLayout( this );
mPluginList = new KWidgetList( this );
layout->addWidget( mPluginList );
- connect( mPluginList, SIGNAL( doubleClicked( KWidgetListItem* ) ),
- SIGNAL( selected() ) );
+ connect( mPluginList, TQT_SIGNAL( doubleClicked( KWidgetListItem* ) ),
+ TQT_SIGNAL( selected() ) );
updatePluginList();
@@ -94,19 +94,19 @@ QSync::Plugin PluginPicker::selectedPlugin() const
}
-PluginPickerDialog::PluginPickerDialog( QWidget *parent )
+PluginPickerDialog::PluginPickerDialog( TQWidget *parent )
: KDialogBase( parent, 0, true, i18n("Select Member Type"), Ok | Cancel )
{
- QFrame *topFrame = makeMainWidget();
+ TQFrame *topFrame = makeMainWidget();
- QBoxLayout *topLayout = new QVBoxLayout( topFrame );
+ TQBoxLayout *topLayout = new TQVBoxLayout( topFrame );
mPicker = new PluginPicker( topFrame );
topLayout->addWidget( mPicker );
- connect( mPicker, SIGNAL( selected() ), SLOT( slotOk() ) );
+ connect( mPicker, TQT_SIGNAL( selected() ), TQT_SLOT( slotOk() ) );
- setInitialSize( QSize( 460, 380 ) );
+ setInitialSize( TQSize( 460, 380 ) );
}
QSync::Plugin PluginPickerDialog::selectedPlugin() const
@@ -114,7 +114,7 @@ QSync::Plugin PluginPickerDialog::selectedPlugin() const
return mPicker->selectedPlugin();
}
-QSync::Plugin PluginPickerDialog::getPlugin( QWidget *parent )
+QSync::Plugin PluginPickerDialog::getPlugin( TQWidget *parent )
{
PluginPickerDialog dlg( parent );
if ( dlg.exec() )
diff --git a/kitchensync/src/pluginpicker.h b/kitchensync/src/pluginpicker.h
index 39630f448..81b49161e 100644
--- a/kitchensync/src/pluginpicker.h
+++ b/kitchensync/src/pluginpicker.h
@@ -26,7 +26,7 @@
#include <kdialogbase.h>
#include <kwidgetlist.h>
-#include <qwidget.h>
+#include <tqwidget.h>
class PluginItem : public KWidgetListItem
{
@@ -44,7 +44,7 @@ class PluginPicker : public QWidget
Q_OBJECT
public:
- PluginPicker( QWidget *parent );
+ PluginPicker( TQWidget *parent );
QSync::Plugin selectedPlugin() const;
@@ -63,11 +63,11 @@ class PluginPickerDialog : public KDialogBase
Q_OBJECT
public:
- PluginPickerDialog( QWidget *parent );
+ PluginPickerDialog( TQWidget *parent );
QSync::Plugin selectedPlugin() const;
- static QSync::Plugin getPlugin( QWidget *parent );
+ static QSync::Plugin getPlugin( TQWidget *parent );
protected slots:
void slotOk();
diff --git a/kitchensync/src/singleconflictdialog.cpp b/kitchensync/src/singleconflictdialog.cpp
index 53acba799..8975b6f98 100644
--- a/kitchensync/src/singleconflictdialog.cpp
+++ b/kitchensync/src/singleconflictdialog.cpp
@@ -21,9 +21,9 @@
#include <kdialog.h>
#include <klocale.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qpushbutton.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqpushbutton.h>
#include "addresseediffalgo.h"
#include "genericdiffalgo.h"
@@ -32,12 +32,12 @@
#include "singleconflictdialog.h"
-SingleConflictDialog::SingleConflictDialog( QSync::SyncMapping &mapping, QWidget *parent )
+SingleConflictDialog::SingleConflictDialog( QSync::SyncMapping &mapping, TQWidget *parent )
: ConflictDialog( mapping, parent ), mDiffAlgo( 0 )
{
initGUI();
- QString format = mapping.changeAt( 0 ).objectFormatName();
+ TQString format = mapping.changeAt( 0 ).objectFormatName();
QSync::SyncChange leftChange = mapping.changeAt( 0 );
QSync::SyncChange rightChange = mapping.changeAt( 1 );
@@ -96,27 +96,27 @@ void SingleConflictDialog::ignoreChange()
void SingleConflictDialog::initGUI()
{
- QGridLayout *layout = new QGridLayout( this, 3, 4, KDialog::marginHint(), KDialog::spacingHint() );
+ TQGridLayout *layout = new TQGridLayout( this, 3, 4, KDialog::marginHint(), KDialog::spacingHint() );
- layout->addMultiCellWidget( new QLabel( i18n( "A conflict has appeared, please solve it manually." ), this ), 0, 0, 0, 3 );
+ layout->addMultiCellWidget( new TQLabel( i18n( "A conflict has appeared, please solve it manually." ), this ), 0, 0, 0, 3 );
mDiffAlgoDisplay = new KSync::HTMLDiffAlgoDisplay( this );
layout->addMultiCellWidget( mDiffAlgoDisplay, 1, 1, 0, 3 );
- QPushButton *button = new QPushButton( i18n( "Use Item" ), this );
- connect( button, SIGNAL( clicked() ), SLOT( useFirstChange() ) );
+ TQPushButton *button = new TQPushButton( i18n( "Use Item" ), this );
+ connect( button, TQT_SIGNAL( clicked() ), TQT_SLOT( useFirstChange() ) );
layout->addWidget( button, 2, 0 );
- button = new QPushButton( i18n( "Duplicate Items" ), this );
- connect( button, SIGNAL( clicked() ), SLOT( duplicateChange() ) );
+ button = new TQPushButton( i18n( "Duplicate Items" ), this );
+ connect( button, TQT_SIGNAL( clicked() ), TQT_SLOT( duplicateChange() ) );
layout->addWidget( button, 2, 1 );
- button = new QPushButton( i18n( "Ignore Conflict" ), this );
- connect( button, SIGNAL( clicked() ), SLOT( ignoreChange() ) );
+ button = new TQPushButton( i18n( "Ignore Conflict" ), this );
+ connect( button, TQT_SIGNAL( clicked() ), TQT_SLOT( ignoreChange() ) );
layout->addWidget( button, 2, 2 );
- button = new QPushButton( i18n( "Use Item" ), this );
- connect( button, SIGNAL( clicked() ), SLOT( useSecondChange() ) );
+ button = new TQPushButton( i18n( "Use Item" ), this );
+ connect( button, TQT_SIGNAL( clicked() ), TQT_SLOT( useSecondChange() ) );
layout->addWidget( button, 2, 3 );
}
diff --git a/kitchensync/src/singleconflictdialog.h b/kitchensync/src/singleconflictdialog.h
index 75e083895..25ff4bd78 100644
--- a/kitchensync/src/singleconflictdialog.h
+++ b/kitchensync/src/singleconflictdialog.h
@@ -35,7 +35,7 @@ class SingleConflictDialog : public ConflictDialog
Q_OBJECT
public:
- SingleConflictDialog( QSync::SyncMapping &mapping, QWidget *parent );
+ SingleConflictDialog( QSync::SyncMapping &mapping, TQWidget *parent );
~SingleConflictDialog();
private slots:
diff --git a/kitchensync/src/syncprocess.cpp b/kitchensync/src/syncprocess.cpp
index b52cc6db4..60310b803 100644
--- a/kitchensync/src/syncprocess.cpp
+++ b/kitchensync/src/syncprocess.cpp
@@ -30,7 +30,7 @@
using namespace QSync;
SyncProcess::SyncProcess( const QSync::Group &group )
- : QObject( 0, "SyncProcess" )
+ : TQObject( 0, "SyncProcess" )
{
mGroup = group;
mEngine = new QSync::Engine( mGroup );
@@ -48,12 +48,12 @@ SyncProcess::~SyncProcess()
mEngine = 0;
}
-QString SyncProcess::groupStatus() const
+TQString SyncProcess::groupStatus() const
{
return i18n( "Ready" );
}
-QString SyncProcess::memberStatus( const QSync::Member& ) const
+TQString SyncProcess::memberStatus( const QSync::Member& ) const
{
return i18n( "Ready" );
}
@@ -86,8 +86,8 @@ void SyncProcess::reinitEngine()
void SyncProcess::applyObjectTypeFilter()
{
const QSync::Conversion conversion = SyncProcessManager::self()->environment()->conversion();
- const QStringList objectTypes = conversion.objectTypes();
- const QStringList activeObjectTypes = mGroup.config().activeObjectTypes();
+ const TQStringList objectTypes = conversion.objectTypes();
+ const TQStringList activeObjectTypes = mGroup.config().activeObjectTypes();
for ( uint i = 0; i < objectTypes.count(); ++i ) {
if ( activeObjectTypes.contains( objectTypes[ i ] ) ) {
diff --git a/kitchensync/src/syncprocess.h b/kitchensync/src/syncprocess.h
index 5b70a4b49..ef23f7c52 100644
--- a/kitchensync/src/syncprocess.h
+++ b/kitchensync/src/syncprocess.h
@@ -21,7 +21,7 @@
#ifndef SYNCPROCESS_H
#define SYNCPROCESS_H
-#include <qobject.h>
+#include <tqobject.h>
#include <libqopensync/group.h>
@@ -40,8 +40,8 @@ class SyncProcess : public QObject
QSync::Group group() const { return mGroup; }
QSync::Engine* engine() const { return mEngine; }
- QString groupStatus() const;
- QString memberStatus( const QSync::Member &member ) const;
+ TQString groupStatus() const;
+ TQString memberStatus( const QSync::Member &member ) const;
QSync::Result addMember( const QSync::Plugin &plugin );
diff --git a/kitchensync/src/syncprocessmanager.cpp b/kitchensync/src/syncprocessmanager.cpp
index f2cb1ab0a..fda111efd 100644
--- a/kitchensync/src/syncprocessmanager.cpp
+++ b/kitchensync/src/syncprocessmanager.cpp
@@ -55,7 +55,7 @@ SyncProcessManager::SyncProcessManager()
SyncProcessManager::~SyncProcessManager()
{
- QValueList<SyncProcess*>::Iterator it;
+ TQValueList<SyncProcess*>::Iterator it;
for ( it = mProcesses.begin(); it != mProcesses.end(); ++it )
delete *it;
@@ -80,7 +80,7 @@ SyncProcess* SyncProcessManager::at( int pos ) const
SyncProcess* SyncProcessManager::byGroup( const QSync::Group &group )
{
- QValueList<SyncProcess*>::Iterator it;
+ TQValueList<SyncProcess*>::Iterator it;
for ( it = mProcesses.begin(); it != mProcesses.end(); ++it )
if ( (*it)->group() == group )
return *it;
@@ -88,9 +88,9 @@ SyncProcess* SyncProcessManager::byGroup( const QSync::Group &group )
return 0;
}
-SyncProcess* SyncProcessManager::byGroupName( const QString &name )
+SyncProcess* SyncProcessManager::byGroupName( const TQString &name )
{
- QValueList<SyncProcess*>::Iterator it;
+ TQValueList<SyncProcess*>::Iterator it;
for ( it = mProcesses.begin(); it != mProcesses.end(); ++it )
if ( (*it)->group().name() == name )
return *it;
@@ -98,7 +98,7 @@ SyncProcess* SyncProcessManager::byGroupName( const QString &name )
return 0;
}
-void SyncProcessManager::addGroup( const QString &name )
+void SyncProcessManager::addGroup( const TQString &name )
{
SyncProcess* process = byGroupName( name );
if ( !process ) {
diff --git a/kitchensync/src/syncprocessmanager.h b/kitchensync/src/syncprocessmanager.h
index 488312939..b95018a84 100644
--- a/kitchensync/src/syncprocessmanager.h
+++ b/kitchensync/src/syncprocessmanager.h
@@ -21,7 +21,7 @@
#ifndef SYNCPROCESSMANAGER_H
#define SYNCPROCESSMANAGER_H
-#include <qobject.h>
+#include <tqobject.h>
#include <libqopensync/group.h>
@@ -65,12 +65,12 @@ class SyncProcessManager : public QObject
/**
Returns the SyncProcess with the given group @param name.
*/
- SyncProcess* byGroupName( const QString &name );
+ SyncProcess* byGroupName( const TQString &name );
/**
Adds a group with given @param name.
*/
- void addGroup( const QString &name );
+ void addGroup( const TQString &name );
/**
Removes the given @param sync process.
@@ -91,7 +91,7 @@ class SyncProcessManager : public QObject
void init( QSync::Environment *environment );
- QValueList<SyncProcess*> mProcesses;
+ TQValueList<SyncProcess*> mProcesses;
QSync::Environment *mEnvironment;
static SyncProcessManager *mSelf;
diff --git a/kmail/accountcombobox.cpp b/kmail/accountcombobox.cpp
index afa8398eb..c89ed360a 100644
--- a/kmail/accountcombobox.cpp
+++ b/kmail/accountcombobox.cpp
@@ -34,13 +34,13 @@
using namespace KMail;
-AccountComboBox::AccountComboBox( QWidget* parent, const char* name )
- : QComboBox( parent, name )
+AccountComboBox::AccountComboBox( TQWidget* parent, const char* name )
+ : TQComboBox( parent, name )
{
- connect( kmkernel->acctMgr(), SIGNAL( accountAdded( KMAccount* ) ),
- this, SLOT( slotRefreshAccounts() ) );
- connect( kmkernel->acctMgr(), SIGNAL( accountRemoved( KMAccount* ) ),
- this, SLOT( slotRefreshAccounts() ) );
+ connect( kmkernel->acctMgr(), TQT_SIGNAL( accountAdded( KMAccount* ) ),
+ this, TQT_SLOT( slotRefreshAccounts() ) );
+ connect( kmkernel->acctMgr(), TQT_SIGNAL( accountRemoved( KMAccount* ) ),
+ this, TQT_SLOT( slotRefreshAccounts() ) );
slotRefreshAccounts();
}
@@ -52,9 +52,9 @@ void AccountComboBox::slotRefreshAccounts()
// until clicking OK or Apply. This would make this class much more complex
// (this would have to be different depending on whether this combo is in the
// configuration dialog or not...)
- QStringList accountNames;
- QValueList<KMAccount *> lst = applicableAccounts();
- QValueList<KMAccount *>::ConstIterator it = lst.begin();
+ TQStringList accountNames;
+ TQValueList<KMAccount *> lst = applicableAccounts();
+ TQValueList<KMAccount *>::ConstIterator it = lst.begin();
for ( ; it != lst.end() ; ++it )
accountNames.append( (*it)->name() );
kdDebug() << k_funcinfo << accountNames << endl;
@@ -67,8 +67,8 @@ void AccountComboBox::slotRefreshAccounts()
void AccountComboBox::setCurrentAccount( KMAccount* account )
{
int i = 0;
- QValueList<KMAccount *> lst = applicableAccounts();
- QValueList<KMAccount *>::ConstIterator it = lst.begin();
+ TQValueList<KMAccount *> lst = applicableAccounts();
+ TQValueList<KMAccount *>::ConstIterator it = lst.begin();
for ( ; it != lst.end() ; ++it, ++i ) {
if ( (*it) == account ) {
setCurrentItem( i );
@@ -80,8 +80,8 @@ void AccountComboBox::setCurrentAccount( KMAccount* account )
KMAccount* AccountComboBox::currentAccount() const
{
int i = 0;
- QValueList<KMAccount *> lst = applicableAccounts();
- QValueList<KMAccount *>::ConstIterator it = lst.begin();
+ TQValueList<KMAccount *> lst = applicableAccounts();
+ TQValueList<KMAccount *>::ConstIterator it = lst.begin();
while ( it != lst.end() && i < currentItem() ) {
++it;
++i;
@@ -91,9 +91,9 @@ KMAccount* AccountComboBox::currentAccount() const
return 0;
}
-QValueList<KMAccount *> KMail::AccountComboBox::applicableAccounts() const
+TQValueList<KMAccount *> KMail::AccountComboBox::applicableAccounts() const
{
- QValueList<KMAccount *> lst;
+ TQValueList<KMAccount *> lst;
for( KMAccount *a = kmkernel->acctMgr()->first(); a;
a = kmkernel->acctMgr()->next() ) {
if ( a && a->type() == "cachedimap" ) { //// ## proko2 hack. Need a list of allowed account types as ctor param
diff --git a/kmail/accountcombobox.h b/kmail/accountcombobox.h
index 5c8d1bbd8..9229cb330 100644
--- a/kmail/accountcombobox.h
+++ b/kmail/accountcombobox.h
@@ -28,7 +28,7 @@
#ifndef KMAIL_ACCOUNTCOMBOBOX_H
#define KMAIL_ACCOUNTCOMBOBOX_H
-#include <qcombobox.h>
+#include <tqcombobox.h>
class KMAccount;
@@ -44,7 +44,7 @@ class AccountComboBox : public QComboBox
Q_OBJECT
public:
- AccountComboBox( QWidget* parent, const char* name = 0 );
+ AccountComboBox( TQWidget* parent, const char* name = 0 );
void setCurrentAccount( KMAccount* account );
KMAccount* currentAccount() const;
@@ -52,7 +52,7 @@ public:
private slots:
void slotRefreshAccounts();
private:
- QValueList<KMAccount *> applicableAccounts() const;
+ TQValueList<KMAccount *> applicableAccounts() const;
};
diff --git a/kmail/accountdialog.cpp b/kmail/accountdialog.cpp
index b517925a2..6203d3e87 100644
--- a/kmail/accountdialog.cpp
+++ b/kmail/accountdialog.cpp
@@ -21,20 +21,20 @@
#include "accountdialog.h"
-#include <qbuttongroup.h>
-#include <qcheckbox.h>
-#include <qlayout.h>
-#include <qtabwidget.h>
-#include <qradiobutton.h>
-#include <qvalidator.h>
-#include <qlabel.h>
-#include <qpushbutton.h>
-#include <qwhatsthis.h>
-#include <qhbox.h>
-#include <qcombobox.h>
-#include <qheader.h>
-#include <qtoolbutton.h>
-#include <qgrid.h>
+#include <tqbuttongroup.h>
+#include <tqcheckbox.h>
+#include <tqlayout.h>
+#include <tqtabwidget.h>
+#include <tqradiobutton.h>
+#include <tqvalidator.h>
+#include <tqlabel.h>
+#include <tqpushbutton.h>
+#include <tqwhatsthis.h>
+#include <tqhbox.h>
+#include <tqcombobox.h>
+#include <tqheader.h>
+#include <tqtoolbutton.h>
+#include <tqgrid.h>
#include <kfiledialog.h>
#include <klocale.h>
@@ -85,45 +85,45 @@ namespace KMail {
class ProcmailRCParser
{
public:
- ProcmailRCParser(QString fileName = QString::null);
+ ProcmailRCParser(TQString fileName = TQString::null);
~ProcmailRCParser();
- QStringList getLockFilesList() const { return mLockFiles; }
- QStringList getSpoolFilesList() const { return mSpoolFiles; }
+ TQStringList getLockFilesList() const { return mLockFiles; }
+ TQStringList getSpoolFilesList() const { return mSpoolFiles; }
protected:
- void processGlobalLock(const QString&);
- void processLocalLock(const QString&);
- void processVariableSetting(const QString&, int);
- QString expandVars(const QString&);
-
- QFile mProcmailrc;
- QTextStream *mStream;
- QStringList mLockFiles;
- QStringList mSpoolFiles;
- QAsciiDict<QString> mVars;
+ void processGlobalLock(const TQString&);
+ void processLocalLock(const TQString&);
+ void processVariableSetting(const TQString&, int);
+ TQString expandVars(const TQString&);
+
+ TQFile mProcmailrc;
+ TQTextStream *mStream;
+ TQStringList mLockFiles;
+ TQStringList mSpoolFiles;
+ TQAsciiDict<TQString> mVars;
};
-ProcmailRCParser::ProcmailRCParser(QString fname)
+ProcmailRCParser::ProcmailRCParser(TQString fname)
: mProcmailrc(fname),
- mStream(new QTextStream(&mProcmailrc))
+ mStream(new TQTextStream(&mProcmailrc))
{
mVars.setAutoDelete(true);
// predefined
- mVars.insert( "HOME", new QString( QDir::homeDirPath() ) );
+ mVars.insert( "HOME", new TQString( TQDir::homeDirPath() ) );
if( !fname || fname.isEmpty() ) {
- fname = QDir::homeDirPath() + "/.procmailrc";
+ fname = TQDir::homeDirPath() + "/.procmailrc";
mProcmailrc.setName(fname);
}
- QRegExp lockFileGlobal("^LOCKFILE=", true);
- QRegExp lockFileLocal("^:0", true);
+ TQRegExp lockFileGlobal("^LOCKFILE=", true);
+ TQRegExp lockFileLocal("^:0", true);
if( mProcmailrc.open(IO_ReadOnly) ) {
- QString s;
+ TQString s;
while( !mStream->eof() ) {
@@ -149,7 +149,7 @@ ProcmailRCParser::ProcmailRCParser(QString fname)
}
}
- QString default_Location = getenv("MAIL");
+ TQString default_Location = getenv("MAIL");
if (default_Location.isNull()) {
default_Location = _PATH_MAILDIR;
@@ -170,17 +170,17 @@ ProcmailRCParser::~ProcmailRCParser()
}
void
-ProcmailRCParser::processGlobalLock(const QString &s)
+ProcmailRCParser::processGlobalLock(const TQString &s)
{
- QString val = expandVars(s.mid(s.find('=') + 1).stripWhiteSpace());
+ TQString val = expandVars(s.mid(s.find('=') + 1).stripWhiteSpace());
if ( !mLockFiles.contains(val) )
mLockFiles << val;
}
void
-ProcmailRCParser::processLocalLock(const QString &s)
+ProcmailRCParser::processLocalLock(const TQString &s)
{
- QString val;
+ TQString val;
int colonPos = s.findRev(':');
if (colonPos > 0) { // we don't care about the leading one
@@ -197,7 +197,7 @@ ProcmailRCParser::processLocalLock(const QString &s)
}
// parse until we find the spoolfile
- QString line, prevLine;
+ TQString line, prevLine;
do {
prevLine = line;
line = mStream->readLine().stripWhiteSpace();
@@ -238,27 +238,27 @@ ProcmailRCParser::processLocalLock(const QString &s)
}
void
-ProcmailRCParser::processVariableSetting(const QString &s, int eqPos)
+ProcmailRCParser::processVariableSetting(const TQString &s, int eqPos)
{
if( eqPos == -1) return;
- QString varName = s.left(eqPos),
+ TQString varName = s.left(eqPos),
varValue = expandVars(s.mid(eqPos + 1).stripWhiteSpace());
- mVars.insert(varName.latin1(), new QString(varValue));
+ mVars.insert(varName.latin1(), new TQString(varValue));
}
QString
-ProcmailRCParser::expandVars(const QString &s)
+ProcmailRCParser::expandVars(const TQString &s)
{
if( s.isEmpty()) return s;
- QString expS = s;
+ TQString expS = s;
- QAsciiDictIterator<QString> it( mVars ); // iterator for dict
+ TQAsciiDictIterator<TQString> it( mVars ); // iterator for dict
while ( it.current() ) {
- expS.replace(QString::fromLatin1("$") + it.currentKey(), *it.current());
+ expS.replace(TQString::fromLatin1("$") + it.currentKey(), *it.current());
++it;
}
@@ -267,8 +267,8 @@ ProcmailRCParser::expandVars(const QString &s)
-AccountDialog::AccountDialog( const QString & caption, KMAccount *account,
- QWidget *parent, const char *name, bool modal )
+AccountDialog::AccountDialog( const TQString & caption, KMAccount *account,
+ TQWidget *parent, const char *name, bool modal )
: KDialogBase( parent, name, modal, caption, Ok|Cancel|Help, Ok, true ),
mAccount( account ),
mServerTest( 0 ),
@@ -278,10 +278,10 @@ AccountDialog::AccountDialog( const QString & caption, KMAccount *account,
mCapaTLS( AllCapa ),
mSieveConfigEditor( 0 )
{
- mValidator = new QRegExpValidator( QRegExp( "[A-Za-z0-9-_:.]*" ), 0 );
+ mValidator = new TQRegExpValidator( TQRegExp( "[A-Za-z0-9-_:.]*" ), 0 );
setHelp("receiving-mail");
- QString accountType = mAccount->type();
+ TQString accountType = mAccount->type();
if( accountType == "local" )
{
@@ -305,7 +305,7 @@ AccountDialog::AccountDialog( const QString & caption, KMAccount *account,
}
else
{
- QString msg = i18n( "Account type is not supported." );
+ TQString msg = i18n( "Account type is not supported." );
KMessageBox::information( topLevelWidget(),msg,i18n("Configure Account") );
return;
}
@@ -324,113 +324,113 @@ AccountDialog::~AccountDialog()
void AccountDialog::makeLocalAccountPage()
{
ProcmailRCParser procmailrcParser;
- QFrame *page = makeMainWidget();
- QGridLayout *topLayout = new QGridLayout( page, 12, 3, 0, spacingHint() );
+ TQFrame *page = makeMainWidget();
+ TQGridLayout *topLayout = new TQGridLayout( page, 12, 3, 0, spacingHint() );
topLayout->addColSpacing( 1, fontMetrics().maxWidth()*15 );
topLayout->setRowStretch( 11, 10 );
topLayout->setColStretch( 1, 10 );
- mLocal.titleLabel = new QLabel( i18n("Account Type: Local Account"), page );
+ mLocal.titleLabel = new TQLabel( i18n("Account Type: Local Account"), page );
topLayout->addMultiCellWidget( mLocal.titleLabel, 0, 0, 0, 2 );
- QFont titleFont( mLocal.titleLabel->font() );
+ TQFont titleFont( mLocal.titleLabel->font() );
titleFont.setBold( true );
mLocal.titleLabel->setFont( titleFont );
KSeparator *hline = new KSeparator( KSeparator::HLine, page);
topLayout->addMultiCellWidget( hline, 1, 1, 0, 2 );
- QLabel *label = new QLabel( i18n("Account &name:"), page );
+ TQLabel *label = new TQLabel( i18n("Account &name:"), page );
topLayout->addWidget( label, 2, 0 );
mLocal.nameEdit = new KLineEdit( page );
label->setBuddy( mLocal.nameEdit );
topLayout->addWidget( mLocal.nameEdit, 2, 1 );
- label = new QLabel( i18n("File &location:"), page );
+ label = new TQLabel( i18n("File &location:"), page );
topLayout->addWidget( label, 3, 0 );
- mLocal.locationEdit = new QComboBox( true, page );
+ mLocal.locationEdit = new TQComboBox( true, page );
label->setBuddy( mLocal.locationEdit );
topLayout->addWidget( mLocal.locationEdit, 3, 1 );
mLocal.locationEdit->insertStringList(procmailrcParser.getSpoolFilesList());
- QPushButton *choose = new QPushButton( i18n("Choo&se..."), page );
+ TQPushButton *choose = new TQPushButton( i18n("Choo&se..."), page );
choose->setAutoDefault( false );
- connect( choose, SIGNAL(clicked()), this, SLOT(slotLocationChooser()) );
+ connect( choose, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotLocationChooser()) );
topLayout->addWidget( choose, 3, 2 );
- QButtonGroup *group = new QButtonGroup(i18n("Locking Method"), page );
+ TQButtonGroup *group = new TQButtonGroup(i18n("Locking Method"), page );
group->setColumnLayout(0, Qt::Horizontal);
group->layout()->setSpacing( 0 );
group->layout()->setMargin( 0 );
- QGridLayout *groupLayout = new QGridLayout( group->layout() );
+ TQGridLayout *groupLayout = new TQGridLayout( group->layout() );
groupLayout->setAlignment( Qt::AlignTop );
groupLayout->setSpacing( 6 );
groupLayout->setMargin( 11 );
- mLocal.lockProcmail = new QRadioButton( i18n("Procmail loc&kfile:"), group);
+ mLocal.lockProcmail = new TQRadioButton( i18n("Procmail loc&kfile:"), group);
groupLayout->addWidget(mLocal.lockProcmail, 0, 0);
- mLocal.procmailLockFileName = new QComboBox( true, group );
+ mLocal.procmailLockFileName = new TQComboBox( true, group );
groupLayout->addWidget(mLocal.procmailLockFileName, 0, 1);
mLocal.procmailLockFileName->insertStringList(procmailrcParser.getLockFilesList());
mLocal.procmailLockFileName->setEnabled(false);
- QObject::connect(mLocal.lockProcmail, SIGNAL(toggled(bool)),
- mLocal.procmailLockFileName, SLOT(setEnabled(bool)));
+ TQObject::connect(mLocal.lockProcmail, TQT_SIGNAL(toggled(bool)),
+ mLocal.procmailLockFileName, TQT_SLOT(setEnabled(bool)));
- mLocal.lockMutt = new QRadioButton(
+ mLocal.lockMutt = new TQRadioButton(
i18n("&Mutt dotlock"), group);
groupLayout->addWidget(mLocal.lockMutt, 1, 0);
- mLocal.lockMuttPriv = new QRadioButton(
+ mLocal.lockMuttPriv = new TQRadioButton(
i18n("M&utt dotlock privileged"), group);
groupLayout->addWidget(mLocal.lockMuttPriv, 2, 0);
- mLocal.lockFcntl = new QRadioButton(
+ mLocal.lockFcntl = new TQRadioButton(
i18n("&FCNTL"), group);
groupLayout->addWidget(mLocal.lockFcntl, 3, 0);
- mLocal.lockNone = new QRadioButton(
+ mLocal.lockNone = new TQRadioButton(
i18n("Non&e (use with care)"), group);
groupLayout->addWidget(mLocal.lockNone, 4, 0);
topLayout->addMultiCellWidget( group, 4, 4, 0, 2 );
#if 0
- QHBox* resourceHB = new QHBox( page );
+ TQHBox* resourceHB = new TQHBox( page );
resourceHB->setSpacing( 11 );
mLocal.resourceCheck =
- new QCheckBox( i18n( "Account for semiautomatic resource handling" ), resourceHB );
+ new TQCheckBox( i18n( "Account for semiautomatic resource handling" ), resourceHB );
mLocal.resourceClearButton =
- new QPushButton( i18n( "Clear" ), resourceHB );
- QWhatsThis::add( mLocal.resourceClearButton,
+ new TQPushButton( i18n( "Clear" ), resourceHB );
+ TQWhatsThis::add( mLocal.resourceClearButton,
i18n( "Delete all allocations for the resource represented by this account." ) );
mLocal.resourceClearButton->setEnabled( false );
- connect( mLocal.resourceCheck, SIGNAL( toggled(bool) ),
- mLocal.resourceClearButton, SLOT( setEnabled(bool) ) );
- connect( mLocal.resourceClearButton, SIGNAL( clicked() ),
- this, SLOT( slotClearResourceAllocations() ) );
+ connect( mLocal.resourceCheck, TQT_SIGNAL( toggled(bool) ),
+ mLocal.resourceClearButton, TQT_SLOT( setEnabled(bool) ) );
+ connect( mLocal.resourceClearButton, TQT_SIGNAL( clicked() ),
+ this, TQT_SLOT( slotClearResourceAllocations() ) );
mLocal.resourceClearPastButton =
- new QPushButton( i18n( "Clear Past" ), resourceHB );
+ new TQPushButton( i18n( "Clear Past" ), resourceHB );
mLocal.resourceClearPastButton->setEnabled( false );
- connect( mLocal.resourceCheck, SIGNAL( toggled(bool) ),
- mLocal.resourceClearPastButton, SLOT( setEnabled(bool) ) );
- QWhatsThis::add( mLocal.resourceClearPastButton,
+ connect( mLocal.resourceCheck, TQT_SIGNAL( toggled(bool) ),
+ mLocal.resourceClearPastButton, TQT_SLOT( setEnabled(bool) ) );
+ TQWhatsThis::add( mLocal.resourceClearPastButton,
i18n( "Delete all outdated allocations for the resource represented by this account." ) );
- connect( mLocal.resourceClearPastButton, SIGNAL( clicked() ),
- this, SLOT( slotClearPastResourceAllocations() ) );
+ connect( mLocal.resourceClearPastButton, TQT_SIGNAL( clicked() ),
+ this, TQT_SLOT( slotClearPastResourceAllocations() ) );
topLayout->addMultiCellWidget( resourceHB, 5, 5, 0, 2 );
#endif
mLocal.includeInCheck =
- new QCheckBox( i18n("Include in m&anual mail check"),
+ new TQCheckBox( i18n("Include in m&anual mail check"),
page );
topLayout->addMultiCellWidget( mLocal.includeInCheck, 5, 5, 0, 2 );
mLocal.intervalCheck =
- new QCheckBox( i18n("Enable &interval mail checking"), page );
+ new TQCheckBox( i18n("Enable &interval mail checking"), page );
topLayout->addMultiCellWidget( mLocal.intervalCheck, 6, 6, 0, 2 );
- connect( mLocal.intervalCheck, SIGNAL(toggled(bool)),
- this, SLOT(slotEnableLocalInterval(bool)) );
- mLocal.intervalLabel = new QLabel( i18n("Check inter&val:"), page );
+ connect( mLocal.intervalCheck, TQT_SIGNAL(toggled(bool)),
+ this, TQT_SLOT(slotEnableLocalInterval(bool)) );
+ mLocal.intervalLabel = new TQLabel( i18n("Check inter&val:"), page );
topLayout->addWidget( mLocal.intervalLabel, 7, 0 );
mLocal.intervalSpin = new KIntNumInput( page );
mLocal.intervalLabel->setBuddy( mLocal.intervalSpin );
@@ -439,98 +439,98 @@ void AccountDialog::makeLocalAccountPage()
mLocal.intervalSpin->setValue( defaultmailcheckintervalmin );
topLayout->addWidget( mLocal.intervalSpin, 7, 1 );
- label = new QLabel( i18n("&Destination folder:"), page );
+ label = new TQLabel( i18n("&Destination folder:"), page );
topLayout->addWidget( label, 8, 0 );
- mLocal.folderCombo = new QComboBox( false, page );
+ mLocal.folderCombo = new TQComboBox( false, page );
label->setBuddy( mLocal.folderCombo );
topLayout->addWidget( mLocal.folderCombo, 8, 1 );
- label = new QLabel( i18n("&Pre-command:"), page );
+ label = new TQLabel( i18n("&Pre-command:"), page );
topLayout->addWidget( label, 9, 0 );
mLocal.precommand = new KLineEdit( page );
label->setBuddy( mLocal.precommand );
topLayout->addWidget( mLocal.precommand, 9, 1 );
- mLocal.identityLabel = new QLabel( i18n("Identity:"), page );
+ mLocal.identityLabel = new TQLabel( i18n("Identity:"), page );
topLayout->addWidget( mLocal.identityLabel, 10, 0 );
mLocal.identityCombo = new KPIM::IdentityCombo(kmkernel->identityManager(), page );
mLocal.identityLabel->setBuddy( mLocal.identityCombo );
topLayout->addWidget( mLocal.identityCombo, 10, 1 );
- connect(kapp,SIGNAL(kdisplayFontChanged()),SLOT(slotFontChanged()));
+ connect(kapp,TQT_SIGNAL(kdisplayFontChanged()),TQT_SLOT(slotFontChanged()));
}
void AccountDialog::makeMaildirAccountPage()
{
ProcmailRCParser procmailrcParser;
- QFrame *page = makeMainWidget();
- QGridLayout *topLayout = new QGridLayout( page, 11, 3, 0, spacingHint() );
+ TQFrame *page = makeMainWidget();
+ TQGridLayout *topLayout = new TQGridLayout( page, 11, 3, 0, spacingHint() );
topLayout->addColSpacing( 1, fontMetrics().maxWidth()*15 );
topLayout->setRowStretch( 11, 10 );
topLayout->setColStretch( 1, 10 );
- mMaildir.titleLabel = new QLabel( i18n("Account Type: Maildir Account"), page );
+ mMaildir.titleLabel = new TQLabel( i18n("Account Type: Maildir Account"), page );
topLayout->addMultiCellWidget( mMaildir.titleLabel, 0, 0, 0, 2 );
- QFont titleFont( mMaildir.titleLabel->font() );
+ TQFont titleFont( mMaildir.titleLabel->font() );
titleFont.setBold( true );
mMaildir.titleLabel->setFont( titleFont );
- QFrame *hline = new QFrame( page );
- hline->setFrameStyle( QFrame::Sunken | QFrame::HLine );
+ TQFrame *hline = new TQFrame( page );
+ hline->setFrameStyle( TQFrame::Sunken | TQFrame::HLine );
topLayout->addMultiCellWidget( hline, 1, 1, 0, 2 );
mMaildir.nameEdit = new KLineEdit( page );
topLayout->addWidget( mMaildir.nameEdit, 2, 1 );
- QLabel *label = new QLabel( mMaildir.nameEdit, i18n("Account &name:"), page );
+ TQLabel *label = new TQLabel( mMaildir.nameEdit, i18n("Account &name:"), page );
topLayout->addWidget( label, 2, 0 );
- mMaildir.locationEdit = new QComboBox( true, page );
+ mMaildir.locationEdit = new TQComboBox( true, page );
topLayout->addWidget( mMaildir.locationEdit, 3, 1 );
mMaildir.locationEdit->insertStringList(procmailrcParser.getSpoolFilesList());
- label = new QLabel( mMaildir.locationEdit, i18n("Folder &location:"), page );
+ label = new TQLabel( mMaildir.locationEdit, i18n("Folder &location:"), page );
topLayout->addWidget( label, 3, 0 );
- QPushButton *choose = new QPushButton( i18n("Choo&se..."), page );
+ TQPushButton *choose = new TQPushButton( i18n("Choo&se..."), page );
choose->setAutoDefault( false );
- connect( choose, SIGNAL(clicked()), this, SLOT(slotMaildirChooser()) );
+ connect( choose, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotMaildirChooser()) );
topLayout->addWidget( choose, 3, 2 );
#if 0
- QHBox* resourceHB = new QHBox( page );
+ TQHBox* resourceHB = new TQHBox( page );
resourceHB->setSpacing( 11 );
mMaildir.resourceCheck =
- new QCheckBox( i18n( "Account for semiautomatic resource handling" ), resourceHB );
+ new TQCheckBox( i18n( "Account for semiautomatic resource handling" ), resourceHB );
mMaildir.resourceClearButton =
- new QPushButton( i18n( "Clear" ), resourceHB );
+ new TQPushButton( i18n( "Clear" ), resourceHB );
mMaildir.resourceClearButton->setEnabled( false );
- connect( mMaildir.resourceCheck, SIGNAL( toggled(bool) ),
- mMaildir.resourceClearButton, SLOT( setEnabled(bool) ) );
- QWhatsThis::add( mMaildir.resourceClearButton,
+ connect( mMaildir.resourceCheck, TQT_SIGNAL( toggled(bool) ),
+ mMaildir.resourceClearButton, TQT_SLOT( setEnabled(bool) ) );
+ TQWhatsThis::add( mMaildir.resourceClearButton,
i18n( "Delete all allocations for the resource represented by this account." ) );
- connect( mMaildir.resourceClearButton, SIGNAL( clicked() ),
- this, SLOT( slotClearResourceAllocations() ) );
+ connect( mMaildir.resourceClearButton, TQT_SIGNAL( clicked() ),
+ this, TQT_SLOT( slotClearResourceAllocations() ) );
mMaildir.resourceClearPastButton =
- new QPushButton( i18n( "Clear Past" ), resourceHB );
+ new TQPushButton( i18n( "Clear Past" ), resourceHB );
mMaildir.resourceClearPastButton->setEnabled( false );
- connect( mMaildir.resourceCheck, SIGNAL( toggled(bool) ),
- mMaildir.resourceClearPastButton, SLOT( setEnabled(bool) ) );
- QWhatsThis::add( mMaildir.resourceClearPastButton,
+ connect( mMaildir.resourceCheck, TQT_SIGNAL( toggled(bool) ),
+ mMaildir.resourceClearPastButton, TQT_SLOT( setEnabled(bool) ) );
+ TQWhatsThis::add( mMaildir.resourceClearPastButton,
i18n( "Delete all outdated allocations for the resource represented by this account." ) );
- connect( mMaildir.resourceClearPastButton, SIGNAL( clicked() ),
- this, SLOT( slotClearPastResourceAllocations() ) );
+ connect( mMaildir.resourceClearPastButton, TQT_SIGNAL( clicked() ),
+ this, TQT_SLOT( slotClearPastResourceAllocations() ) );
topLayout->addMultiCellWidget( resourceHB, 4, 4, 0, 2 );
#endif
mMaildir.includeInCheck =
- new QCheckBox( i18n("Include in &manual mail check"), page );
+ new TQCheckBox( i18n("Include in &manual mail check"), page );
topLayout->addMultiCellWidget( mMaildir.includeInCheck, 4, 4, 0, 2 );
mMaildir.intervalCheck =
- new QCheckBox( i18n("Enable &interval mail checking"), page );
+ new TQCheckBox( i18n("Enable &interval mail checking"), page );
topLayout->addMultiCellWidget( mMaildir.intervalCheck, 5, 5, 0, 2 );
- connect( mMaildir.intervalCheck, SIGNAL(toggled(bool)),
- this, SLOT(slotEnableMaildirInterval(bool)) );
- mMaildir.intervalLabel = new QLabel( i18n("Check inter&val:"), page );
+ connect( mMaildir.intervalCheck, TQT_SIGNAL(toggled(bool)),
+ this, TQT_SLOT(slotEnableMaildirInterval(bool)) );
+ mMaildir.intervalLabel = new TQLabel( i18n("Check inter&val:"), page );
topLayout->addWidget( mMaildir.intervalLabel, 6, 0 );
mMaildir.intervalSpin = new KIntNumInput( page );
mMaildir.intervalSpin->setRange( GlobalSettings::self()->minimumCheckInterval(), 10000, 1, false );
@@ -539,74 +539,74 @@ void AccountDialog::makeMaildirAccountPage()
mMaildir.intervalLabel->setBuddy( mMaildir.intervalSpin );
topLayout->addWidget( mMaildir.intervalSpin, 6, 1 );
- mMaildir.folderCombo = new QComboBox( false, page );
+ mMaildir.folderCombo = new TQComboBox( false, page );
topLayout->addWidget( mMaildir.folderCombo, 7, 1 );
- label = new QLabel( mMaildir.folderCombo,
+ label = new TQLabel( mMaildir.folderCombo,
i18n("&Destination folder:"), page );
topLayout->addWidget( label, 7, 0 );
mMaildir.precommand = new KLineEdit( page );
topLayout->addWidget( mMaildir.precommand, 8, 1 );
- label = new QLabel( mMaildir.precommand, i18n("&Pre-command:"), page );
+ label = new TQLabel( mMaildir.precommand, i18n("&Pre-command:"), page );
topLayout->addWidget( label, 8, 0 );
- mMaildir.identityLabel = new QLabel( i18n("Identity:"), page );
+ mMaildir.identityLabel = new TQLabel( i18n("Identity:"), page );
topLayout->addWidget( mMaildir.identityLabel, 9, 0 );
mMaildir.identityCombo = new KPIM::IdentityCombo(kmkernel->identityManager(), page );
mMaildir.identityLabel->setBuddy( mMaildir.identityCombo );
topLayout->addWidget( mMaildir.identityCombo, 9, 1 );
- connect(kapp,SIGNAL(kdisplayFontChanged()),SLOT(slotFontChanged()));
+ connect(kapp,TQT_SIGNAL(kdisplayFontChanged()),TQT_SLOT(slotFontChanged()));
}
void AccountDialog::makePopAccountPage()
{
- QFrame *page = makeMainWidget();
- QVBoxLayout *topLayout = new QVBoxLayout( page, 0, spacingHint() );
+ TQFrame *page = makeMainWidget();
+ TQVBoxLayout *topLayout = new TQVBoxLayout( page, 0, spacingHint() );
- mPop.titleLabel = new QLabel( page );
+ mPop.titleLabel = new TQLabel( page );
mPop.titleLabel->setText( i18n("Account Type: POP Account") );
- QFont titleFont( mPop.titleLabel->font() );
+ TQFont titleFont( mPop.titleLabel->font() );
titleFont.setBold( true );
mPop.titleLabel->setFont( titleFont );
topLayout->addWidget( mPop.titleLabel );
KSeparator *hline = new KSeparator( KSeparator::HLine, page);
topLayout->addWidget( hline );
- QTabWidget *tabWidget = new QTabWidget(page);
+ TQTabWidget *tabWidget = new TQTabWidget(page);
topLayout->addWidget( tabWidget );
- QWidget *page1 = new QWidget( tabWidget );
+ TQWidget *page1 = new TQWidget( tabWidget );
tabWidget->addTab( page1, i18n("&General") );
- QGridLayout *grid = new QGridLayout( page1, 16, 2, marginHint(), spacingHint() );
+ TQGridLayout *grid = new TQGridLayout( page1, 16, 2, marginHint(), spacingHint() );
grid->addColSpacing( 1, fontMetrics().maxWidth()*15 );
grid->setRowStretch( 15, 10 );
grid->setColStretch( 1, 10 );
- QLabel *label = new QLabel( i18n("Account &name:"), page1 );
+ TQLabel *label = new TQLabel( i18n("Account &name:"), page1 );
grid->addWidget( label, 0, 0 );
mPop.nameEdit = new KLineEdit( page1 );
label->setBuddy( mPop.nameEdit );
grid->addWidget( mPop.nameEdit, 0, 1 );
- label = new QLabel( i18n("&Login:"), page1 );
- QWhatsThis::add( label, i18n("Your Internet Service Provider gave you a <em>user name</em> which is used to authenticate you with their servers. It usually is the first part of your email address (the part before <em>@</em>).") );
+ label = new TQLabel( i18n("&Login:"), page1 );
+ TQWhatsThis::add( label, i18n("Your Internet Service Provider gave you a <em>user name</em> which is used to authenticate you with their servers. It usually is the first part of your email address (the part before <em>@</em>).") );
grid->addWidget( label, 1, 0 );
mPop.loginEdit = new KLineEdit( page1 );
label->setBuddy( mPop.loginEdit );
grid->addWidget( mPop.loginEdit, 1, 1 );
- label = new QLabel( i18n("P&assword:"), page1 );
+ label = new TQLabel( i18n("P&assword:"), page1 );
grid->addWidget( label, 2, 0 );
mPop.passwordEdit = new KLineEdit( page1 );
- mPop.passwordEdit->setEchoMode( QLineEdit::Password );
+ mPop.passwordEdit->setEchoMode( TQLineEdit::Password );
label->setBuddy( mPop.passwordEdit );
grid->addWidget( mPop.passwordEdit, 2, 1 );
- label = new QLabel( i18n("Ho&st:"), page1 );
+ label = new TQLabel( i18n("Ho&st:"), page1 );
grid->addWidget( label, 3, 0 );
mPop.hostEdit = new KLineEdit( page1 );
// only letters, digits, '-', '.', ':' (IPv6) and '_' (for Windows
@@ -615,16 +615,16 @@ void AccountDialog::makePopAccountPage()
label->setBuddy( mPop.hostEdit );
grid->addWidget( mPop.hostEdit, 3, 1 );
- label = new QLabel( i18n("&Port:"), page1 );
+ label = new TQLabel( i18n("&Port:"), page1 );
grid->addWidget( label, 4, 0 );
mPop.portEdit = new KLineEdit( page1 );
- mPop.portEdit->setValidator( new QIntValidator(this) );
+ mPop.portEdit->setValidator( new TQIntValidator(this) );
label->setBuddy( mPop.portEdit );
grid->addWidget( mPop.portEdit, 4, 1 );
mPop.storePasswordCheck =
- new QCheckBox( i18n("Sto&re POP password"), page1 );
- QWhatsThis::add( mPop.storePasswordCheck,
+ new TQCheckBox( i18n("Sto&re POP password"), page1 );
+ TQWhatsThis::add( mPop.storePasswordCheck,
i18n("Check this option to have KMail store "
"the password.\nIf KWallet is available "
"the password will be stored there which is considered "
@@ -637,104 +637,104 @@ void AccountDialog::makePopAccountPage()
grid->addMultiCellWidget( mPop.storePasswordCheck, 5, 5, 0, 1 );
mPop.leaveOnServerCheck =
- new QCheckBox( i18n("Lea&ve fetched messages on the server"), page1 );
- connect( mPop.leaveOnServerCheck, SIGNAL( clicked() ),
- this, SLOT( slotLeaveOnServerClicked() ) );
+ new TQCheckBox( i18n("Lea&ve fetched messages on the server"), page1 );
+ connect( mPop.leaveOnServerCheck, TQT_SIGNAL( clicked() ),
+ this, TQT_SLOT( slotLeaveOnServerClicked() ) );
grid->addMultiCellWidget( mPop.leaveOnServerCheck, 6, 6, 0, 1 );
- QHBox *afterDaysBox = new QHBox( page1 );
+ TQHBox *afterDaysBox = new TQHBox( page1 );
afterDaysBox->setSpacing( KDialog::spacingHint() );
mPop.leaveOnServerDaysCheck =
- new QCheckBox( i18n("Leave messages on the server for"), afterDaysBox );
- connect( mPop.leaveOnServerDaysCheck, SIGNAL( toggled(bool) ),
- this, SLOT( slotEnableLeaveOnServerDays(bool)) );
+ new TQCheckBox( i18n("Leave messages on the server for"), afterDaysBox );
+ connect( mPop.leaveOnServerDaysCheck, TQT_SIGNAL( toggled(bool) ),
+ this, TQT_SLOT( slotEnableLeaveOnServerDays(bool)) );
mPop.leaveOnServerDaysSpin = new KIntNumInput( afterDaysBox );
mPop.leaveOnServerDaysSpin->setRange( 1, 365, 1, false );
- connect( mPop.leaveOnServerDaysSpin, SIGNAL(valueChanged(int)),
- SLOT(slotLeaveOnServerDaysChanged(int)));
+ connect( mPop.leaveOnServerDaysSpin, TQT_SIGNAL(valueChanged(int)),
+ TQT_SLOT(slotLeaveOnServerDaysChanged(int)));
mPop.leaveOnServerDaysSpin->setValue( 1 );
afterDaysBox->setStretchFactor( mPop.leaveOnServerDaysSpin, 1 );
grid->addMultiCellWidget( afterDaysBox, 7, 7, 0, 1 );
- QHBox *leaveOnServerCountBox = new QHBox( page1 );
+ TQHBox *leaveOnServerCountBox = new TQHBox( page1 );
leaveOnServerCountBox->setSpacing( KDialog::spacingHint() );
mPop.leaveOnServerCountCheck =
- new QCheckBox( i18n("Keep only the last"), leaveOnServerCountBox );
- connect( mPop.leaveOnServerCountCheck, SIGNAL( toggled(bool) ),
- this, SLOT( slotEnableLeaveOnServerCount(bool)) );
+ new TQCheckBox( i18n("Keep only the last"), leaveOnServerCountBox );
+ connect( mPop.leaveOnServerCountCheck, TQT_SIGNAL( toggled(bool) ),
+ this, TQT_SLOT( slotEnableLeaveOnServerCount(bool)) );
mPop.leaveOnServerCountSpin = new KIntNumInput( leaveOnServerCountBox );
mPop.leaveOnServerCountSpin->setRange( 1, 999999, 1, false );
- connect( mPop.leaveOnServerCountSpin, SIGNAL(valueChanged(int)),
- SLOT(slotLeaveOnServerCountChanged(int)));
+ connect( mPop.leaveOnServerCountSpin, TQT_SIGNAL(valueChanged(int)),
+ TQT_SLOT(slotLeaveOnServerCountChanged(int)));
mPop.leaveOnServerCountSpin->setValue( 100 );
grid->addMultiCellWidget( leaveOnServerCountBox, 8, 8, 0, 1 );
- QHBox *leaveOnServerSizeBox = new QHBox( page1 );
+ TQHBox *leaveOnServerSizeBox = new TQHBox( page1 );
leaveOnServerSizeBox->setSpacing( KDialog::spacingHint() );
mPop.leaveOnServerSizeCheck =
- new QCheckBox( i18n("Keep only the last"), leaveOnServerSizeBox );
- connect( mPop.leaveOnServerSizeCheck, SIGNAL( toggled(bool) ),
- this, SLOT( slotEnableLeaveOnServerSize(bool)) );
+ new TQCheckBox( i18n("Keep only the last"), leaveOnServerSizeBox );
+ connect( mPop.leaveOnServerSizeCheck, TQT_SIGNAL( toggled(bool) ),
+ this, TQT_SLOT( slotEnableLeaveOnServerSize(bool)) );
mPop.leaveOnServerSizeSpin = new KIntNumInput( leaveOnServerSizeBox );
mPop.leaveOnServerSizeSpin->setRange( 1, 999999, 1, false );
mPop.leaveOnServerSizeSpin->setSuffix( i18n(" MB") );
mPop.leaveOnServerSizeSpin->setValue( 10 );
grid->addMultiCellWidget( leaveOnServerSizeBox, 9, 9, 0, 1 );
#if 0
- QHBox *resourceHB = new QHBox( page1 );
+ TQHBox *resourceHB = new TQHBox( page1 );
resourceHB->setSpacing( 11 );
mPop.resourceCheck =
- new QCheckBox( i18n( "Account for semiautomatic resource handling" ), resourceHB );
+ new TQCheckBox( i18n( "Account for semiautomatic resource handling" ), resourceHB );
mPop.resourceClearButton =
- new QPushButton( i18n( "Clear" ), resourceHB );
+ new TQPushButton( i18n( "Clear" ), resourceHB );
mPop.resourceClearButton->setEnabled( false );
- connect( mPop.resourceCheck, SIGNAL( toggled(bool) ),
- mPop.resourceClearButton, SLOT( setEnabled(bool) ) );
- QWhatsThis::add( mPop.resourceClearButton,
+ connect( mPop.resourceCheck, TQT_SIGNAL( toggled(bool) ),
+ mPop.resourceClearButton, TQT_SLOT( setEnabled(bool) ) );
+ TQWhatsThis::add( mPop.resourceClearButton,
i18n( "Delete all allocations for the resource represented by this account." ) );
- connect( mPop.resourceClearButton, SIGNAL( clicked() ),
- this, SLOT( slotClearResourceAllocations() ) );
+ connect( mPop.resourceClearButton, TQT_SIGNAL( clicked() ),
+ this, TQT_SLOT( slotClearResourceAllocations() ) );
mPop.resourceClearPastButton =
- new QPushButton( i18n( "Clear Past" ), resourceHB );
+ new TQPushButton( i18n( "Clear Past" ), resourceHB );
mPop.resourceClearPastButton->setEnabled( false );
- connect( mPop.resourceCheck, SIGNAL( toggled(bool) ),
- mPop.resourceClearPastButton, SLOT( setEnabled(bool) ) );
- QWhatsThis::add( mPop.resourceClearPastButton,
+ connect( mPop.resourceCheck, TQT_SIGNAL( toggled(bool) ),
+ mPop.resourceClearPastButton, TQT_SLOT( setEnabled(bool) ) );
+ TQWhatsThis::add( mPop.resourceClearPastButton,
i18n( "Delete all outdated allocations for the resource represented by this account." ) );
- connect( mPop.resourceClearPastButton, SIGNAL( clicked() ),
- this, SLOT( slotClearPastResourceAllocations() ) );
+ connect( mPop.resourceClearPastButton, TQT_SIGNAL( clicked() ),
+ this, TQT_SLOT( slotClearPastResourceAllocations() ) );
grid->addMultiCellWidget( resourceHB, 10, 10, 0, 2 );
#endif
mPop.includeInCheck =
- new QCheckBox( i18n("Include in man&ual mail check"), page1 );
+ new TQCheckBox( i18n("Include in man&ual mail check"), page1 );
grid->addMultiCellWidget( mPop.includeInCheck, 10, 10, 0, 1 );
- QHBox * hbox = new QHBox( page1 );
+ TQHBox * hbox = new TQHBox( page1 );
hbox->setSpacing( KDialog::spacingHint() );
mPop.filterOnServerCheck =
- new QCheckBox( i18n("&Filter messages if they are greater than"), hbox );
+ new TQCheckBox( i18n("&Filter messages if they are greater than"), hbox );
mPop.filterOnServerSizeSpin = new KIntNumInput ( hbox );
mPop.filterOnServerSizeSpin->setEnabled( false );
hbox->setStretchFactor( mPop.filterOnServerSizeSpin, 1 );
mPop.filterOnServerSizeSpin->setRange( 1, 10000000, 100, false );
- connect(mPop.filterOnServerSizeSpin, SIGNAL(valueChanged(int)),
- SLOT(slotFilterOnServerSizeChanged(int)));
+ connect(mPop.filterOnServerSizeSpin, TQT_SIGNAL(valueChanged(int)),
+ TQT_SLOT(slotFilterOnServerSizeChanged(int)));
mPop.filterOnServerSizeSpin->setValue( 50000 );
grid->addMultiCellWidget( hbox, 11, 11, 0, 1 );
- connect( mPop.filterOnServerCheck, SIGNAL(toggled(bool)),
- mPop.filterOnServerSizeSpin, SLOT(setEnabled(bool)) );
- connect( mPop.filterOnServerCheck, SIGNAL( clicked() ),
- this, SLOT( slotFilterOnServerClicked() ) );
- QString msg = i18n("If you select this option, POP Filters will be used to "
+ connect( mPop.filterOnServerCheck, TQT_SIGNAL(toggled(bool)),
+ mPop.filterOnServerSizeSpin, TQT_SLOT(setEnabled(bool)) );
+ connect( mPop.filterOnServerCheck, TQT_SIGNAL( clicked() ),
+ this, TQT_SLOT( slotFilterOnServerClicked() ) );
+ TQString msg = i18n("If you select this option, POP Filters will be used to "
"decide what to do with messages. You can then select "
"to download, delete or keep them on the server." );
- QWhatsThis::add( mPop.filterOnServerCheck, msg );
- QWhatsThis::add( mPop.filterOnServerSizeSpin, msg );
+ TQWhatsThis::add( mPop.filterOnServerCheck, msg );
+ TQWhatsThis::add( mPop.filterOnServerSizeSpin, msg );
mPop.intervalCheck =
- new QCheckBox( i18n("Enable &interval mail checking"), page1 );
+ new TQCheckBox( i18n("Enable &interval mail checking"), page1 );
grid->addMultiCellWidget( mPop.intervalCheck, 12, 12, 0, 1 );
- connect( mPop.intervalCheck, SIGNAL(toggled(bool)),
- this, SLOT(slotEnablePopInterval(bool)) );
- mPop.intervalLabel = new QLabel( i18n("Chec&k interval:"), page1 );
+ connect( mPop.intervalCheck, TQT_SIGNAL(toggled(bool)),
+ this, TQT_SLOT(slotEnablePopInterval(bool)) );
+ mPop.intervalLabel = new TQLabel( i18n("Chec&k interval:"), page1 );
grid->addWidget( mPop.intervalLabel, 13, 0 );
mPop.intervalSpin = new KIntNumInput( page1 );
mPop.intervalSpin->setRange( GlobalSettings::self()->minimumCheckInterval(), 10000, 1, false );
@@ -743,142 +743,142 @@ void AccountDialog::makePopAccountPage()
mPop.intervalLabel->setBuddy( mPop.intervalSpin );
grid->addWidget( mPop.intervalSpin, 13, 1 );
- label = new QLabel( i18n("Des&tination folder:"), page1 );
+ label = new TQLabel( i18n("Des&tination folder:"), page1 );
grid->addWidget( label, 14, 0 );
- mPop.folderCombo = new QComboBox( false, page1 );
+ mPop.folderCombo = new TQComboBox( false, page1 );
label->setBuddy( mPop.folderCombo );
grid->addWidget( mPop.folderCombo, 14, 1 );
- label = new QLabel( i18n("Pre-com&mand:"), page1 );
+ label = new TQLabel( i18n("Pre-com&mand:"), page1 );
grid->addWidget( label, 15, 0 );
mPop.precommand = new KLineEdit( page1 );
label->setBuddy(mPop.precommand);
grid->addWidget( mPop.precommand, 15, 1 );
- mPop.identityLabel = new QLabel( i18n("Identity:"), page1 );
+ mPop.identityLabel = new TQLabel( i18n("Identity:"), page1 );
grid->addWidget( mPop.identityLabel, 16, 0 );
mPop.identityCombo = new KPIM::IdentityCombo(kmkernel->identityManager(), page1 );
mPop.identityLabel->setBuddy( mPop.identityCombo );
grid->addWidget( mPop.identityCombo, 16, 1 );
- QWidget *page2 = new QWidget( tabWidget );
+ TQWidget *page2 = new TQWidget( tabWidget );
tabWidget->addTab( page2, i18n("&Extras") );
- QVBoxLayout *vlay = new QVBoxLayout( page2, marginHint(), spacingHint() );
+ TQVBoxLayout *vlay = new TQVBoxLayout( page2, marginHint(), spacingHint() );
vlay->addSpacing( KDialog::spacingHint() );
- QHBoxLayout *buttonLay = new QHBoxLayout( vlay );
+ TQHBoxLayout *buttonLay = new TQHBoxLayout( vlay );
mPop.checkCapabilities =
- new QPushButton( i18n("Check &What the Server Supports"), page2 );
- connect(mPop.checkCapabilities, SIGNAL(clicked()),
- SLOT(slotCheckPopCapabilities()));
+ new TQPushButton( i18n("Check &What the Server Supports"), page2 );
+ connect(mPop.checkCapabilities, TQT_SIGNAL(clicked()),
+ TQT_SLOT(slotCheckPopCapabilities()));
buttonLay->addStretch();
buttonLay->addWidget( mPop.checkCapabilities );
buttonLay->addStretch();
vlay->addSpacing( KDialog::spacingHint() );
- mPop.encryptionGroup = new QButtonGroup( 1, Qt::Horizontal,
+ mPop.encryptionGroup = new TQButtonGroup( 1, Qt::Horizontal,
i18n("Encryption"), page2 );
mPop.encryptionNone =
- new QRadioButton( i18n("&None"), mPop.encryptionGroup );
+ new TQRadioButton( i18n("&None"), mPop.encryptionGroup );
mPop.encryptionSSL =
- new QRadioButton( i18n("Use &SSL for secure mail download"),
+ new TQRadioButton( i18n("Use &SSL for secure mail download"),
mPop.encryptionGroup );
mPop.encryptionTLS =
- new QRadioButton( i18n("Use &TLS for secure mail download"),
+ new TQRadioButton( i18n("Use &TLS for secure mail download"),
mPop.encryptionGroup );
- connect(mPop.encryptionGroup, SIGNAL(clicked(int)),
- SLOT(slotPopEncryptionChanged(int)));
+ connect(mPop.encryptionGroup, TQT_SIGNAL(clicked(int)),
+ TQT_SLOT(slotPopEncryptionChanged(int)));
vlay->addWidget( mPop.encryptionGroup );
- mPop.authGroup = new QButtonGroup( 1, Qt::Horizontal,
+ mPop.authGroup = new TQButtonGroup( 1, Qt::Horizontal,
i18n("Authentication Method"), page2 );
- mPop.authUser = new QRadioButton( i18n("Clear te&xt") , mPop.authGroup,
+ mPop.authUser = new TQRadioButton( i18n("Clear te&xt") , mPop.authGroup,
"auth clear text" );
- mPop.authLogin = new QRadioButton( i18n("Please translate this "
+ mPop.authLogin = new TQRadioButton( i18n("Please translate this "
"authentication method only if you have a good reason", "&LOGIN"),
mPop.authGroup, "auth login" );
- mPop.authPlain = new QRadioButton( i18n("Please translate this "
+ mPop.authPlain = new TQRadioButton( i18n("Please translate this "
"authentication method only if you have a good reason", "&PLAIN"),
mPop.authGroup, "auth plain" );
- mPop.authCRAM_MD5 = new QRadioButton( i18n("CRAM-MD&5"), mPop.authGroup, "auth cram-md5" );
- mPop.authDigestMd5 = new QRadioButton( i18n("&DIGEST-MD5"), mPop.authGroup, "auth digest-md5" );
- mPop.authNTLM = new QRadioButton( i18n("&NTLM"), mPop.authGroup, "auth ntlm" );
- mPop.authGSSAPI = new QRadioButton( i18n("&GSSAPI"), mPop.authGroup, "auth gssapi" );
+ mPop.authCRAM_MD5 = new TQRadioButton( i18n("CRAM-MD&5"), mPop.authGroup, "auth cram-md5" );
+ mPop.authDigestMd5 = new TQRadioButton( i18n("&DIGEST-MD5"), mPop.authGroup, "auth digest-md5" );
+ mPop.authNTLM = new TQRadioButton( i18n("&NTLM"), mPop.authGroup, "auth ntlm" );
+ mPop.authGSSAPI = new TQRadioButton( i18n("&GSSAPI"), mPop.authGroup, "auth gssapi" );
if ( KProtocolInfo::capabilities("pop3").contains("SASL") == 0 )
{
mPop.authNTLM->hide();
mPop.authGSSAPI->hide();
}
- mPop.authAPOP = new QRadioButton( i18n("&APOP"), mPop.authGroup, "auth apop" );
+ mPop.authAPOP = new TQRadioButton( i18n("&APOP"), mPop.authGroup, "auth apop" );
vlay->addWidget( mPop.authGroup );
mPop.usePipeliningCheck =
- new QCheckBox( i18n("&Use pipelining for faster mail download"), page2 );
- connect(mPop.usePipeliningCheck, SIGNAL(clicked()),
- SLOT(slotPipeliningClicked()));
+ new TQCheckBox( i18n("&Use pipelining for faster mail download"), page2 );
+ connect(mPop.usePipeliningCheck, TQT_SIGNAL(clicked()),
+ TQT_SLOT(slotPipeliningClicked()));
vlay->addWidget( mPop.usePipeliningCheck );
vlay->addStretch();
- connect(kapp,SIGNAL(kdisplayFontChanged()),SLOT(slotFontChanged()));
+ connect(kapp,TQT_SIGNAL(kdisplayFontChanged()),TQT_SLOT(slotFontChanged()));
}
void AccountDialog::makeImapAccountPage( bool connected )
{
- QFrame *page = makeMainWidget();
- QVBoxLayout *topLayout = new QVBoxLayout( page, 0, spacingHint() );
+ TQFrame *page = makeMainWidget();
+ TQVBoxLayout *topLayout = new TQVBoxLayout( page, 0, spacingHint() );
- mImap.titleLabel = new QLabel( page );
+ mImap.titleLabel = new TQLabel( page );
if( connected )
mImap.titleLabel->setText( i18n("Account Type: Disconnected IMAP Account") );
else
mImap.titleLabel->setText( i18n("Account Type: IMAP Account") );
- QFont titleFont( mImap.titleLabel->font() );
+ TQFont titleFont( mImap.titleLabel->font() );
titleFont.setBold( true );
mImap.titleLabel->setFont( titleFont );
topLayout->addWidget( mImap.titleLabel );
KSeparator *hline = new KSeparator( KSeparator::HLine, page);
topLayout->addWidget( hline );
- QTabWidget *tabWidget = new QTabWidget(page);
+ TQTabWidget *tabWidget = new TQTabWidget(page);
topLayout->addWidget( tabWidget );
- QWidget *page1 = new QWidget( tabWidget );
+ TQWidget *page1 = new TQWidget( tabWidget );
tabWidget->addTab( page1, i18n("&General") );
int row = -1;
- QGridLayout *grid = new QGridLayout( page1, 16, 2, marginHint(), spacingHint() );
+ TQGridLayout *grid = new TQGridLayout( page1, 16, 2, marginHint(), spacingHint() );
grid->addColSpacing( 1, fontMetrics().maxWidth()*16 );
++row;
- QLabel *label = new QLabel( i18n("Account &name:"), page1 );
+ TQLabel *label = new TQLabel( i18n("Account &name:"), page1 );
grid->addWidget( label, row, 0 );
mImap.nameEdit = new KLineEdit( page1 );
label->setBuddy( mImap.nameEdit );
grid->addWidget( mImap.nameEdit, row, 1 );
++row;
- label = new QLabel( i18n("&Login:"), page1 );
- QWhatsThis::add( label, i18n("Your Internet Service Provider gave you a <em>user name</em> which is used to authenticate you with their servers. It usually is the first part of your email address (the part before <em>@</em>).") );
+ label = new TQLabel( i18n("&Login:"), page1 );
+ TQWhatsThis::add( label, i18n("Your Internet Service Provider gave you a <em>user name</em> which is used to authenticate you with their servers. It usually is the first part of your email address (the part before <em>@</em>).") );
grid->addWidget( label, row, 0 );
mImap.loginEdit = new KLineEdit( page1 );
label->setBuddy( mImap.loginEdit );
grid->addWidget( mImap.loginEdit, row, 1 );
++row;
- label = new QLabel( i18n("P&assword:"), page1 );
+ label = new TQLabel( i18n("P&assword:"), page1 );
grid->addWidget( label, row, 0 );
mImap.passwordEdit = new KLineEdit( page1 );
- mImap.passwordEdit->setEchoMode( QLineEdit::Password );
+ mImap.passwordEdit->setEchoMode( TQLineEdit::Password );
label->setBuddy( mImap.passwordEdit );
grid->addWidget( mImap.passwordEdit, row, 1 );
++row;
- label = new QLabel( i18n("Ho&st:"), page1 );
+ label = new TQLabel( i18n("Ho&st:"), page1 );
grid->addWidget( label, row, 0 );
mImap.hostEdit = new KLineEdit( page1 );
// only letters, digits, '-', '.', ':' (IPv6) and '_' (for Windows
@@ -888,77 +888,77 @@ void AccountDialog::makeImapAccountPage( bool connected )
grid->addWidget( mImap.hostEdit, row, 1 );
++row;
- label = new QLabel( i18n("&Port:"), page1 );
+ label = new TQLabel( i18n("&Port:"), page1 );
grid->addWidget( label, row, 0 );
mImap.portEdit = new KLineEdit( page1 );
- mImap.portEdit->setValidator( new QIntValidator(this) );
+ mImap.portEdit->setValidator( new TQIntValidator(this) );
label->setBuddy( mImap.portEdit );
grid->addWidget( mImap.portEdit, row, 1 );
// namespace list
++row;
- QHBox* box = new QHBox( page1 );
- label = new QLabel( i18n("Namespaces:"), box );
- QWhatsThis::add( label, i18n( "Here you see the different namespaces that your IMAP server supports."
+ TQHBox* box = new TQHBox( page1 );
+ label = new TQLabel( i18n("Namespaces:"), box );
+ TQWhatsThis::add( label, i18n( "Here you see the different namespaces that your IMAP server supports."
"Each namespace represents a prefix that separates groups of folders."
"Namespaces allow KMail for example to display your personal folders and shared folders in one account." ) );
// button to reload
- QToolButton* button = new QToolButton( box );
+ TQToolButton* button = new TQToolButton( box );
button->setAutoRaise(true);
- button->setSizePolicy( QSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed ) );
+ button->setSizePolicy( TQSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Fixed ) );
button->setFixedSize( 22, 22 );
button->setIconSet(
KGlobal::iconLoader()->loadIconSet( "reload", KIcon::Small, 0 ) );
- connect( button, SIGNAL(clicked()), this, SLOT(slotReloadNamespaces()) );
- QWhatsThis::add( button,
+ connect( button, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotReloadNamespaces()) );
+ TQWhatsThis::add( button,
i18n("Reload the namespaces from the server. This overwrites any changes.") );
grid->addWidget( box, row, 0 );
// grid with label, namespace list and edit button
- QGrid* listbox = new QGrid( 3, page1 );
- label = new QLabel( i18n("Personal"), listbox );
- QWhatsThis::add( label, i18n( "Personal namespaces include your personal folders." ) );
+ TQGrid* listbox = new TQGrid( 3, page1 );
+ label = new TQLabel( i18n("Personal"), listbox );
+ TQWhatsThis::add( label, i18n( "Personal namespaces include your personal folders." ) );
mImap.personalNS = new KLineEdit( listbox );
mImap.personalNS->setReadOnly( true );
- mImap.editPNS = new QToolButton( listbox );
+ mImap.editPNS = new TQToolButton( listbox );
mImap.editPNS->setIconSet(
KGlobal::iconLoader()->loadIconSet( "edit", KIcon::Small, 0 ) );
mImap.editPNS->setAutoRaise( true );
- mImap.editPNS->setSizePolicy( QSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed ) );
+ mImap.editPNS->setSizePolicy( TQSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Fixed ) );
mImap.editPNS->setFixedSize( 22, 22 );
- connect( mImap.editPNS, SIGNAL(clicked()), this, SLOT(slotEditPersonalNamespace()) );
+ connect( mImap.editPNS, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotEditPersonalNamespace()) );
- label = new QLabel( i18n("Other Users"), listbox );
- QWhatsThis::add( label, i18n( "These namespaces include the folders of other users." ) );
+ label = new TQLabel( i18n("Other Users"), listbox );
+ TQWhatsThis::add( label, i18n( "These namespaces include the folders of other users." ) );
mImap.otherUsersNS = new KLineEdit( listbox );
mImap.otherUsersNS->setReadOnly( true );
- mImap.editONS = new QToolButton( listbox );
+ mImap.editONS = new TQToolButton( listbox );
mImap.editONS->setIconSet(
KGlobal::iconLoader()->loadIconSet( "edit", KIcon::Small, 0 ) );
mImap.editONS->setAutoRaise( true );
- mImap.editONS->setSizePolicy( QSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed ) );
+ mImap.editONS->setSizePolicy( TQSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Fixed ) );
mImap.editONS->setFixedSize( 22, 22 );
- connect( mImap.editONS, SIGNAL(clicked()), this, SLOT(slotEditOtherUsersNamespace()) );
+ connect( mImap.editONS, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotEditOtherUsersNamespace()) );
- label = new QLabel( i18n("Shared"), listbox );
- QWhatsThis::add( label, i18n( "These namespaces include the shared folders." ) );
+ label = new TQLabel( i18n("Shared"), listbox );
+ TQWhatsThis::add( label, i18n( "These namespaces include the shared folders." ) );
mImap.sharedNS = new KLineEdit( listbox );
mImap.sharedNS->setReadOnly( true );
- mImap.editSNS = new QToolButton( listbox );
+ mImap.editSNS = new TQToolButton( listbox );
mImap.editSNS->setIconSet(
KGlobal::iconLoader()->loadIconSet( "edit", KIcon::Small, 0 ) );
mImap.editSNS->setAutoRaise( true );
- mImap.editSNS->setSizePolicy( QSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed ) );
+ mImap.editSNS->setSizePolicy( TQSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Fixed ) );
mImap.editSNS->setFixedSize( 22, 22 );
- connect( mImap.editSNS, SIGNAL(clicked()), this, SLOT(slotEditSharedNamespace()) );
+ connect( mImap.editSNS, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotEditSharedNamespace()) );
label->setBuddy( listbox );
grid->addWidget( listbox, row, 1 );
++row;
mImap.storePasswordCheck =
- new QCheckBox( i18n("Sto&re IMAP password"), page1 );
- QWhatsThis::add( mImap.storePasswordCheck,
+ new TQCheckBox( i18n("Sto&re IMAP password"), page1 );
+ TQWhatsThis::add( mImap.storePasswordCheck,
i18n("Check this option to have KMail store "
"the password.\nIf KWallet is available "
"the password will be stored there which is considered "
@@ -973,31 +973,31 @@ void AccountDialog::makeImapAccountPage( bool connected )
if( !connected ) {
++row;
mImap.autoExpungeCheck =
- new QCheckBox( i18n("Automaticall&y compact folders (expunges deleted messages)"), page1);
+ new TQCheckBox( i18n("Automaticall&y compact folders (expunges deleted messages)"), page1);
grid->addMultiCellWidget( mImap.autoExpungeCheck, row, row, 0, 1 );
}
++row;
- mImap.hiddenFoldersCheck = new QCheckBox( i18n("Sho&w hidden folders"), page1);
+ mImap.hiddenFoldersCheck = new TQCheckBox( i18n("Sho&w hidden folders"), page1);
grid->addMultiCellWidget( mImap.hiddenFoldersCheck, row, row, 0, 1 );
++row;
- mImap.subscribedFoldersCheck = new QCheckBox(
+ mImap.subscribedFoldersCheck = new TQCheckBox(
i18n("Show only s&ubscribed folders"), page1);
grid->addMultiCellWidget( mImap.subscribedFoldersCheck, row, row, 0, 1 );
++row;
- mImap.locallySubscribedFoldersCheck = new QCheckBox(
+ mImap.locallySubscribedFoldersCheck = new TQCheckBox(
i18n("Show only &locally subscribed folders"), page1);
grid->addMultiCellWidget( mImap.locallySubscribedFoldersCheck, row, row, 0, 1 );
if ( !connected ) {
// not implemented for disconnected yet
++row;
- mImap.loadOnDemandCheck = new QCheckBox(
+ mImap.loadOnDemandCheck = new TQCheckBox(
i18n("Load attach&ments on demand"), page1);
- QWhatsThis::add( mImap.loadOnDemandCheck,
+ TQWhatsThis::add( mImap.loadOnDemandCheck,
i18n("Activate this to load attachments not automatically when you select the email but only when you click on the attachment. This way also big emails are shown instantly.") );
grid->addMultiCellWidget( mImap.loadOnDemandCheck, row, row, 0, 1 );
}
@@ -1005,53 +1005,53 @@ void AccountDialog::makeImapAccountPage( bool connected )
if ( !connected ) {
// not implemented for disconnected yet
++row;
- mImap.listOnlyOpenCheck = new QCheckBox(
+ mImap.listOnlyOpenCheck = new TQCheckBox(
i18n("List only open folders"), page1);
- QWhatsThis::add( mImap.listOnlyOpenCheck,
+ TQWhatsThis::add( mImap.listOnlyOpenCheck,
i18n("Only folders that are open (expanded) in the folder tree are checked for subfolders. Use this if there are many folders on the server.") );
grid->addMultiCellWidget( mImap.listOnlyOpenCheck, row, row, 0, 1 );
}
#if 0
++row;
- QHBox* resourceHB = new QHBox( page1 );
+ TQHBox* resourceHB = new TQHBox( page1 );
resourceHB->setSpacing( 11 );
mImap.resourceCheck =
- new QCheckBox( i18n( "Account for semiautomatic resource handling" ), resourceHB );
+ new TQCheckBox( i18n( "Account for semiautomatic resource handling" ), resourceHB );
mImap.resourceClearButton =
- new QPushButton( i18n( "Clear" ), resourceHB );
+ new TQPushButton( i18n( "Clear" ), resourceHB );
mImap.resourceClearButton->setEnabled( false );
- connect( mImap.resourceCheck, SIGNAL( toggled(bool) ),
- mImap.resourceClearButton, SLOT( setEnabled(bool) ) );
- QWhatsThis::add( mImap.resourceClearButton,
+ connect( mImap.resourceCheck, TQT_SIGNAL( toggled(bool) ),
+ mImap.resourceClearButton, TQT_SLOT( setEnabled(bool) ) );
+ TQWhatsThis::add( mImap.resourceClearButton,
i18n( "Delete all allocations for the resource represented by this account." ) );
- connect( mImap.resourceClearButton, SIGNAL( clicked() ),
- this, SLOT( slotClearResourceAllocations() ) );
+ connect( mImap.resourceClearButton, TQT_SIGNAL( clicked() ),
+ this, TQT_SLOT( slotClearResourceAllocations() ) );
mImap.resourceClearPastButton =
- new QPushButton( i18n( "Clear Past" ), resourceHB );
+ new TQPushButton( i18n( "Clear Past" ), resourceHB );
mImap.resourceClearPastButton->setEnabled( false );
- connect( mImap.resourceCheck, SIGNAL( toggled(bool) ),
- mImap.resourceClearPastButton, SLOT( setEnabled(bool) ) );
- QWhatsThis::add( mImap.resourceClearPastButton,
+ connect( mImap.resourceCheck, TQT_SIGNAL( toggled(bool) ),
+ mImap.resourceClearPastButton, TQT_SLOT( setEnabled(bool) ) );
+ TQWhatsThis::add( mImap.resourceClearPastButton,
i18n( "Delete all outdated allocations for the resource represented by this account." ) );
- connect( mImap.resourceClearPastButton, SIGNAL( clicked() ),
- this, SLOT( slotClearPastResourceAllocations() ) );
+ connect( mImap.resourceClearPastButton, TQT_SIGNAL( clicked() ),
+ this, TQT_SLOT( slotClearPastResourceAllocations() ) );
grid->addMultiCellWidget( resourceHB, row, row, 0, 2 );
#endif
++row;
mImap.includeInCheck =
- new QCheckBox( i18n("Include in manual mail chec&k"), page1 );
+ new TQCheckBox( i18n("Include in manual mail chec&k"), page1 );
grid->addMultiCellWidget( mImap.includeInCheck, row, row, 0, 1 );
++row;
mImap.intervalCheck =
- new QCheckBox( i18n("Enable &interval mail checking"), page1 );
+ new TQCheckBox( i18n("Enable &interval mail checking"), page1 );
grid->addMultiCellWidget( mImap.intervalCheck, row, row, 0, 2 );
- connect( mImap.intervalCheck, SIGNAL(toggled(bool)),
- this, SLOT(slotEnableImapInterval(bool)) );
+ connect( mImap.intervalCheck, TQT_SIGNAL(toggled(bool)),
+ this, TQT_SLOT(slotEnableImapInterval(bool)) );
++row;
- mImap.intervalLabel = new QLabel( i18n("Check inter&val:"), page1 );
+ mImap.intervalLabel = new TQLabel( i18n("Check inter&val:"), page1 );
grid->addWidget( mImap.intervalLabel, row, 0 );
mImap.intervalSpin = new KIntNumInput( page1 );
mImap.intervalSpin->setRange( GlobalSettings::minimumCheckInterval(), 60, 1, false );
@@ -1061,7 +1061,7 @@ void AccountDialog::makeImapAccountPage( bool connected )
grid->addWidget( mImap.intervalSpin, row, 1 );
++row;
- label = new QLabel( i18n("&Trash folder:"), page1 );
+ label = new TQLabel( i18n("&Trash folder:"), page1 );
grid->addWidget( label, row, 0 );
mImap.trashCombo = new FolderRequester( page1,
kmkernel->getKMMainWidget()->folderTree() );
@@ -1070,57 +1070,57 @@ void AccountDialog::makeImapAccountPage( bool connected )
grid->addWidget( mImap.trashCombo, row, 1 );
++row;
- mImap.identityLabel = new QLabel( i18n("Identity:"), page1 );
+ mImap.identityLabel = new TQLabel( i18n("Identity:"), page1 );
grid->addWidget( mImap.identityLabel, row, 0 );
mImap.identityCombo = new KPIM::IdentityCombo(kmkernel->identityManager(), page1 );
mImap.identityLabel->setBuddy( mImap.identityCombo );
grid->addWidget( mImap.identityCombo, row, 1 );
- QWidget *page2 = new QWidget( tabWidget );
+ TQWidget *page2 = new TQWidget( tabWidget );
tabWidget->addTab( page2, i18n("S&ecurity") );
- QVBoxLayout *vlay = new QVBoxLayout( page2, marginHint(), spacingHint() );
+ TQVBoxLayout *vlay = new TQVBoxLayout( page2, marginHint(), spacingHint() );
vlay->addSpacing( KDialog::spacingHint() );
- QHBoxLayout *buttonLay = new QHBoxLayout( vlay );
+ TQHBoxLayout *buttonLay = new TQHBoxLayout( vlay );
mImap.checkCapabilities =
- new QPushButton( i18n("Check &What the Server Supports"), page2 );
- connect(mImap.checkCapabilities, SIGNAL(clicked()),
- SLOT(slotCheckImapCapabilities()));
+ new TQPushButton( i18n("Check &What the Server Supports"), page2 );
+ connect(mImap.checkCapabilities, TQT_SIGNAL(clicked()),
+ TQT_SLOT(slotCheckImapCapabilities()));
buttonLay->addStretch();
buttonLay->addWidget( mImap.checkCapabilities );
buttonLay->addStretch();
vlay->addSpacing( KDialog::spacingHint() );
- mImap.encryptionGroup = new QButtonGroup( 1, Qt::Horizontal,
+ mImap.encryptionGroup = new TQButtonGroup( 1, Qt::Horizontal,
i18n("Encryption"), page2 );
mImap.encryptionNone =
- new QRadioButton( i18n("&None"), mImap.encryptionGroup );
+ new TQRadioButton( i18n("&None"), mImap.encryptionGroup );
mImap.encryptionSSL =
- new QRadioButton( i18n("Use &SSL for secure mail download"),
+ new TQRadioButton( i18n("Use &SSL for secure mail download"),
mImap.encryptionGroup );
mImap.encryptionTLS =
- new QRadioButton( i18n("Use &TLS for secure mail download"),
+ new TQRadioButton( i18n("Use &TLS for secure mail download"),
mImap.encryptionGroup );
- connect(mImap.encryptionGroup, SIGNAL(clicked(int)),
- SLOT(slotImapEncryptionChanged(int)));
+ connect(mImap.encryptionGroup, TQT_SIGNAL(clicked(int)),
+ TQT_SLOT(slotImapEncryptionChanged(int)));
vlay->addWidget( mImap.encryptionGroup );
- mImap.authGroup = new QButtonGroup( 1, Qt::Horizontal,
+ mImap.authGroup = new TQButtonGroup( 1, Qt::Horizontal,
i18n("Authentication Method"), page2 );
- mImap.authUser = new QRadioButton( i18n("Clear te&xt"), mImap.authGroup );
- mImap.authLogin = new QRadioButton( i18n("Please translate this "
+ mImap.authUser = new TQRadioButton( i18n("Clear te&xt"), mImap.authGroup );
+ mImap.authLogin = new TQRadioButton( i18n("Please translate this "
"authentication method only if you have a good reason", "&LOGIN"),
mImap.authGroup );
- mImap.authPlain = new QRadioButton( i18n("Please translate this "
+ mImap.authPlain = new TQRadioButton( i18n("Please translate this "
"authentication method only if you have a good reason", "&PLAIN"),
mImap.authGroup );
- mImap.authCramMd5 = new QRadioButton( i18n("CRAM-MD&5"), mImap.authGroup );
- mImap.authDigestMd5 = new QRadioButton( i18n("&DIGEST-MD5"), mImap.authGroup );
- mImap.authNTLM = new QRadioButton( i18n("&NTLM"), mImap.authGroup );
- mImap.authGSSAPI = new QRadioButton( i18n("&GSSAPI"), mImap.authGroup );
- mImap.authAnonymous = new QRadioButton( i18n("&Anonymous"), mImap.authGroup );
+ mImap.authCramMd5 = new TQRadioButton( i18n("CRAM-MD&5"), mImap.authGroup );
+ mImap.authDigestMd5 = new TQRadioButton( i18n("&DIGEST-MD5"), mImap.authGroup );
+ mImap.authNTLM = new TQRadioButton( i18n("&NTLM"), mImap.authGroup );
+ mImap.authGSSAPI = new TQRadioButton( i18n("&GSSAPI"), mImap.authGroup );
+ mImap.authAnonymous = new TQRadioButton( i18n("&Anonymous"), mImap.authGroup );
vlay->addWidget( mImap.authGroup );
vlay->addStretch();
@@ -1130,16 +1130,16 @@ void AccountDialog::makeImapAccountPage( bool connected )
mSieveConfigEditor->layout()->setMargin( KDialog::marginHint() );
tabWidget->addTab( mSieveConfigEditor, i18n("&Filtering") );
- connect(kapp,SIGNAL(kdisplayFontChanged()),SLOT(slotFontChanged()));
+ connect(kapp,TQT_SIGNAL(kdisplayFontChanged()),TQT_SLOT(slotFontChanged()));
}
void AccountDialog::setupSettings()
{
- QComboBox *folderCombo = 0;
+ TQComboBox *folderCombo = 0;
int interval = mAccount->checkInterval();
- QString accountType = mAccount->type();
+ TQString accountType = mAccount->type();
if( accountType == "local" )
{
ProcmailRCParser procmailrcParser;
@@ -1191,7 +1191,7 @@ void AccountDialog::setupSettings()
mPop.loginEdit->setText( ap.login() );
mPop.passwordEdit->setText( ap.passwd());
mPop.hostEdit->setText( ap.host() );
- mPop.portEdit->setText( QString("%1").arg( ap.port() ) );
+ mPop.portEdit->setText( TQString("%1").arg( ap.port() ) );
mPop.usePipeliningCheck->setChecked( ap.usePipelining() );
mPop.storePasswordCheck->setChecked( ap.storePasswd() );
mPop.leaveOnServerCheck->setChecked( ap.leaveOnServer() );
@@ -1256,7 +1256,7 @@ void AccountDialog::setupSettings()
mImap.loginEdit->setText( ai.login() );
mImap.passwordEdit->setText( ai.passwd());
mImap.hostEdit->setText( ai.host() );
- mImap.portEdit->setText( QString("%1").arg( ai.port() ) );
+ mImap.portEdit->setText( TQString("%1").arg( ai.port() ) );
mImap.autoExpungeCheck->setChecked( ai.autoExpunge() );
mImap.hiddenFoldersCheck->setChecked( ai.hiddenFolders() );
mImap.subscribedFoldersCheck->setChecked( ai.onlySubscribedFolders() );
@@ -1271,7 +1271,7 @@ void AccountDialog::setupSettings()
mImap.intervalCheck->setChecked( interval >= 1 );
if ( interval <= 0 ) mImap.intervalSpin->setValue( defaultmailcheckintervalmin );
else mImap.intervalSpin->setValue( interval );
- QString trashfolder = ai.trash();
+ TQString trashfolder = ai.trash();
if (trashfolder.isEmpty())
trashfolder = kmkernel->trashFolder()->idString();
mImap.trashCombo->setFolder( trashfolder );
@@ -1309,7 +1309,7 @@ void AccountDialog::setupSettings()
mImap.loginEdit->setText( ai.login() );
mImap.passwordEdit->setText( ai.passwd());
mImap.hostEdit->setText( ai.host() );
- mImap.portEdit->setText( QString("%1").arg( ai.port() ) );
+ mImap.portEdit->setText( TQString("%1").arg( ai.port() ) );
#if 0
mImap.resourceCheck->setChecked( ai.resource() );
#endif
@@ -1321,7 +1321,7 @@ void AccountDialog::setupSettings()
if ( interval <= 0 ) mImap.intervalSpin->setValue( defaultmailcheckintervalmin );
else mImap.intervalSpin->setValue( interval );
mImap.includeInCheck->setChecked( !ai.checkExclude() );
- QString trashfolder = ai.trash();
+ TQString trashfolder = ai.trash();
if (trashfolder.isEmpty())
trashfolder = kmkernel->trashFolder()->idString();
mImap.trashCombo->setFolder( trashfolder );
@@ -1407,7 +1407,7 @@ void AccountDialog::setupSettings()
kmkernel->folderMgr()->createI18nFolderList(&mFolderNames, &mFolderList);
while (i < mFolderNames.count())
{
- QValueList<QGuardedPtr<KMFolder> >::Iterator it = mFolderList.at(i);
+ TQValueList<TQGuardedPtr<KMFolder> >::Iterator it = mFolderList.at(i);
KMFolder *folder = *it;
if (folder->isSystemFolder())
{
@@ -1490,7 +1490,7 @@ void AccountDialog::slotPipeliningClicked()
"Supports\" button at the bottom of the dialog;\n"
"if your server does not announce it, but you want more speed, then "
"you should do some testing first by sending yourself a batch "
- "of mail and downloading it."), QString::null,
+ "of mail and downloading it."), TQString::null,
"pipelining");
}
@@ -1507,7 +1507,7 @@ void AccountDialog::slotPopEncryptionChanged(int id)
: ( id == SSL ) ? mCapaSSL
: mCapaNormal;
enablePopFeatures( mCurCapa );
- const QButton *old = mPop.authGroup->selected();
+ const TQButton *old = mPop.authGroup->selected();
if ( !old->isEnabled() )
checkHighest( mPop.authGroup );
}
@@ -1525,7 +1525,7 @@ void AccountDialog::slotImapEncryptionChanged(int id)
: ( id == SSL ) ? mCapaSSL
: mCapaNormal;
enableImapAuthMethods( authMethods );
- QButton *old = mImap.authGroup->selected();
+ TQButton *old = mImap.authGroup->selected();
if ( !old->isEnabled() )
checkHighest( mImap.authGroup );
}
@@ -1542,10 +1542,10 @@ void AccountDialog::slotCheckPopCapabilities()
delete mServerTest;
mServerTest = new KMServerTest(POP_PROTOCOL, mPop.hostEdit->text(),
mPop.portEdit->text().toInt());
- connect( mServerTest, SIGNAL( capabilities( const QStringList &,
- const QStringList & ) ),
- this, SLOT( slotPopCapabilities( const QStringList &,
- const QStringList & ) ) );
+ connect( mServerTest, TQT_SIGNAL( capabilities( const TQStringList &,
+ const TQStringList & ) ),
+ this, TQT_SLOT( slotPopCapabilities( const TQStringList &,
+ const TQStringList & ) ) );
mPop.checkCapabilities->setEnabled(false);
}
@@ -1561,20 +1561,20 @@ void AccountDialog::slotCheckImapCapabilities()
delete mServerTest;
mServerTest = new KMServerTest(IMAP_PROTOCOL, mImap.hostEdit->text(),
mImap.portEdit->text().toInt());
- connect( mServerTest, SIGNAL( capabilities( const QStringList &,
- const QStringList & ) ),
- this, SLOT( slotImapCapabilities( const QStringList &,
- const QStringList & ) ) );
+ connect( mServerTest, TQT_SIGNAL( capabilities( const TQStringList &,
+ const TQStringList & ) ),
+ this, TQT_SLOT( slotImapCapabilities( const TQStringList &,
+ const TQStringList & ) ) );
mImap.checkCapabilities->setEnabled(false);
}
-unsigned int AccountDialog::popCapabilitiesFromStringList( const QStringList & l )
+unsigned int AccountDialog::popCapabilitiesFromStringList( const TQStringList & l )
{
unsigned int capa = 0;
kdDebug( 5006 ) << k_funcinfo << l << endl;
- for ( QStringList::const_iterator it = l.begin() ; it != l.end() ; ++it ) {
- QString cur = (*it).upper();
+ for ( TQStringList::const_iterator it = l.begin() ; it != l.end() ; ++it ) {
+ TQString cur = (*it).upper();
if ( cur == "PLAIN" )
capa |= Plain;
else if ( cur == "LOGIN" )
@@ -1602,8 +1602,8 @@ unsigned int AccountDialog::popCapabilitiesFromStringList( const QStringList & l
}
-void AccountDialog::slotPopCapabilities( const QStringList & capaNormal,
- const QStringList & capaSSL )
+void AccountDialog::slotPopCapabilities( const TQStringList & capaNormal,
+ const TQStringList & capaSSL )
{
mPop.checkCapabilities->setEnabled( true );
mCapaNormal = popCapabilitiesFromStringList( capaNormal );
@@ -1682,11 +1682,11 @@ void AccountDialog::enablePopFeatures( unsigned int capa )
}
-unsigned int AccountDialog::imapCapabilitiesFromStringList( const QStringList & l )
+unsigned int AccountDialog::imapCapabilitiesFromStringList( const TQStringList & l )
{
unsigned int capa = 0;
- for ( QStringList::const_iterator it = l.begin() ; it != l.end() ; ++it ) {
- QString cur = (*it).upper();
+ for ( TQStringList::const_iterator it = l.begin() ; it != l.end() ; ++it ) {
+ TQString cur = (*it).upper();
if ( cur == "AUTH=PLAIN" )
capa |= Plain;
else if ( cur == "AUTH=LOGIN" )
@@ -1708,8 +1708,8 @@ unsigned int AccountDialog::imapCapabilitiesFromStringList( const QStringList &
}
-void AccountDialog::slotImapCapabilities( const QStringList & capaNormal,
- const QStringList & capaSSL )
+void AccountDialog::slotImapCapabilities( const TQStringList & capaNormal,
+ const TQStringList & capaSSL )
{
mImap.checkCapabilities->setEnabled( true );
mCapaNormal = imapCapabilitiesFromStringList( capaNormal );
@@ -1760,11 +1760,11 @@ void AccountDialog::enableImapAuthMethods( unsigned int capa )
}
-void AccountDialog::checkHighest( QButtonGroup *btnGroup )
+void AccountDialog::checkHighest( TQButtonGroup *btnGroup )
{
kdDebug(5006) << "checkHighest( " << btnGroup << " )" << endl;
for ( int i = btnGroup->count() - 1; i >= 0 ; --i ) {
- QButton * btn = btnGroup->find( i );
+ TQButton * btn = btnGroup->find( i );
if ( btn && btn->isEnabled() ) {
btn->animateClick();
return;
@@ -1782,7 +1782,7 @@ void AccountDialog::slotOk()
void AccountDialog::saveSettings()
{
- QString accountType = mAccount->type();
+ TQString accountType = mAccount->type();
if( accountType == "local" )
{
KMAcctLocal *acctLocal = dynamic_cast<KMAcctLocal*>(mAccount);
@@ -1957,7 +1957,7 @@ void AccountDialog::saveSettings()
ImapAccountBase::nsDelimMap::Iterator it;
ImapAccountBase::namespaceDelim::Iterator it2;
for ( it = mImap.nsMap.begin(); it != mImap.nsMap.end(); ++it ) {
- QStringList list;
+ TQStringList list;
for ( it2 = it.data().begin(); it2 != it.data().end(); ++it2 ) {
list << it2.key();
delimMap[it2.key()] = it2.data();
@@ -1992,9 +1992,9 @@ void AccountDialog::saveSettings()
void AccountDialog::slotLocationChooser()
{
- static QString directory( "/" );
+ static TQString directory( "/" );
- KFileDialog dialog( directory, QString::null, this, 0, true );
+ KFileDialog dialog( directory, TQString::null, this, 0, true );
dialog.setCaption( i18n("Choose Location") );
bool result = dialog.exec();
@@ -2020,9 +2020,9 @@ void AccountDialog::slotLocationChooser()
void AccountDialog::slotMaildirChooser()
{
- static QString directory( "/" );
+ static TQString directory( "/" );
- QString dir = KFileDialog::getExistingDirectory(directory, this, i18n("Choose Location"));
+ TQString dir = KFileDialog::getExistingDirectory(directory, this, i18n("Choose Location"));
if( dir.isEmpty() )
return;
@@ -2077,22 +2077,22 @@ void AccountDialog::slotEnableMaildirInterval( bool state )
void AccountDialog::slotFontChanged( void )
{
- QString accountType = mAccount->type();
+ TQString accountType = mAccount->type();
if( accountType == "local" )
{
- QFont titleFont( mLocal.titleLabel->font() );
+ TQFont titleFont( mLocal.titleLabel->font() );
titleFont.setBold( true );
mLocal.titleLabel->setFont(titleFont);
}
else if( accountType == "pop" )
{
- QFont titleFont( mPop.titleLabel->font() );
+ TQFont titleFont( mPop.titleLabel->font() );
titleFont.setBold( true );
mPop.titleLabel->setFont(titleFont);
}
else if( accountType == "imap" )
{
- QFont titleFont( mImap.titleLabel->font() );
+ TQFont titleFont( mImap.titleLabel->font() );
titleFont.setBold( true );
mImap.titleLabel->setFont(titleFont);
}
@@ -2117,35 +2117,35 @@ void AccountDialog::slotReloadNamespaces()
{
initAccountForConnect();
mImap.personalNS->setText( i18n("Fetching Namespaces...") );
- mImap.otherUsersNS->setText( QString::null );
- mImap.sharedNS->setText( QString::null );
+ mImap.otherUsersNS->setText( TQString::null );
+ mImap.sharedNS->setText( TQString::null );
ImapAccountBase* ai = static_cast<ImapAccountBase*>( mAccount );
- connect( ai, SIGNAL( namespacesFetched( const ImapAccountBase::nsDelimMap& ) ),
- this, SLOT( slotSetupNamespaces( const ImapAccountBase::nsDelimMap& ) ) );
- connect( ai, SIGNAL( connectionResult(int, const QString&) ),
- this, SLOT( slotConnectionResult(int, const QString&) ) );
+ connect( ai, TQT_SIGNAL( namespacesFetched( const ImapAccountBase::nsDelimMap& ) ),
+ this, TQT_SLOT( slotSetupNamespaces( const ImapAccountBase::nsDelimMap& ) ) );
+ connect( ai, TQT_SIGNAL( connectionResult(int, const TQString&) ),
+ this, TQT_SLOT( slotConnectionResult(int, const TQString&) ) );
ai->getNamespaces();
}
}
-void AccountDialog::slotConnectionResult( int errorCode, const QString& )
+void AccountDialog::slotConnectionResult( int errorCode, const TQString& )
{
if ( errorCode > 0 ) {
ImapAccountBase* ai = static_cast<ImapAccountBase*>( mAccount );
- disconnect( ai, SIGNAL( namespacesFetched( const ImapAccountBase::nsDelimMap& ) ),
- this, SLOT( slotSetupNamespaces( const ImapAccountBase::nsDelimMap& ) ) );
- disconnect( ai, SIGNAL( connectionResult(int, const QString&) ),
- this, SLOT( slotConnectionResult(int, const QString&) ) );
- mImap.personalNS->setText( QString::null );
+ disconnect( ai, TQT_SIGNAL( namespacesFetched( const ImapAccountBase::nsDelimMap& ) ),
+ this, TQT_SLOT( slotSetupNamespaces( const ImapAccountBase::nsDelimMap& ) ) );
+ disconnect( ai, TQT_SIGNAL( connectionResult(int, const TQString&) ),
+ this, TQT_SLOT( slotConnectionResult(int, const TQString&) ) );
+ mImap.personalNS->setText( TQString::null );
}
}
void AccountDialog::slotSetupNamespaces( const ImapAccountBase::nsDelimMap& map )
{
- disconnect( this, SLOT( slotSetupNamespaces( const ImapAccountBase::nsDelimMap& ) ) );
- mImap.personalNS->setText( QString::null );
- mImap.otherUsersNS->setText( QString::null );
- mImap.sharedNS->setText( QString::null );
+ disconnect( this, TQT_SLOT( slotSetupNamespaces( const ImapAccountBase::nsDelimMap& ) ) );
+ mImap.personalNS->setText( TQString::null );
+ mImap.otherUsersNS->setText( TQString::null );
+ mImap.sharedNS->setText( TQString::null );
mImap.nsMap = map;
ImapAccountBase::namespaceDelim ns = map[ImapAccountBase::PersonalNS];
@@ -2172,10 +2172,10 @@ void AccountDialog::slotSetupNamespaces( const ImapAccountBase::nsDelimMap& map
}
}
-const QString AccountDialog::namespaceListToString( const QStringList& list )
+const TQString AccountDialog::namespaceListToString( const TQStringList& list )
{
- QStringList myList = list;
- for ( QStringList::Iterator it = myList.begin(); it != myList.end(); ++it ) {
+ TQStringList myList = list;
+ for ( TQStringList::Iterator it = myList.begin(); it != myList.end(); ++it ) {
if ( (*it).isEmpty() ) {
(*it) = "<" + i18n("Empty") + ">";
}
@@ -2185,7 +2185,7 @@ const QString AccountDialog::namespaceListToString( const QStringList& list )
void AccountDialog::initAccountForConnect()
{
- QString type = mAccount->type();
+ TQString type = mAccount->type();
if ( type == "local" )
return;
@@ -2246,7 +2246,7 @@ void AccountDialog::initAccountForConnect()
void AccountDialog::slotEditPersonalNamespace()
{
NamespaceEditDialog dialog( this, ImapAccountBase::PersonalNS, &mImap.nsMap );
- if ( dialog.exec() == QDialog::Accepted ) {
+ if ( dialog.exec() == TQDialog::Accepted ) {
slotSetupNamespaces( mImap.nsMap );
}
}
@@ -2254,7 +2254,7 @@ void AccountDialog::slotEditPersonalNamespace()
void AccountDialog::slotEditOtherUsersNamespace()
{
NamespaceEditDialog dialog( this, ImapAccountBase::OtherUsersNS, &mImap.nsMap );
- if ( dialog.exec() == QDialog::Accepted ) {
+ if ( dialog.exec() == TQDialog::Accepted ) {
slotSetupNamespaces( mImap.nsMap );
}
}
@@ -2262,30 +2262,30 @@ void AccountDialog::slotEditOtherUsersNamespace()
void AccountDialog::slotEditSharedNamespace()
{
NamespaceEditDialog dialog( this, ImapAccountBase::SharedNS, &mImap.nsMap );
- if ( dialog.exec() == QDialog::Accepted ) {
+ if ( dialog.exec() == TQDialog::Accepted ) {
slotSetupNamespaces( mImap.nsMap );
}
}
-NamespaceLineEdit::NamespaceLineEdit( QWidget* parent )
+NamespaceLineEdit::NamespaceLineEdit( TQWidget* parent )
: KLineEdit( parent )
{
}
-void NamespaceLineEdit::setText( const QString& text )
+void NamespaceLineEdit::setText( const TQString& text )
{
mLastText = text;
KLineEdit::setText( text );
}
-NamespaceEditDialog::NamespaceEditDialog( QWidget *parent,
+NamespaceEditDialog::NamespaceEditDialog( TQWidget *parent,
ImapAccountBase::imapNamespace type, ImapAccountBase::nsDelimMap* map )
- : KDialogBase( parent, "edit_namespace", false, QString::null,
+ : KDialogBase( parent, "edit_namespace", false, TQString::null,
Ok|Cancel, Ok, true ), mType( type ), mNamespaceMap( map )
{
- QVBox *page = makeVBoxMainWidget();
+ TQVBox *page = makeVBoxMainWidget();
- QString ns;
+ TQString ns;
if ( mType == ImapAccountBase::PersonalNS ) {
ns = i18n("Personal");
} else if ( mType == ImapAccountBase::OtherUsersNS ) {
@@ -2294,20 +2294,20 @@ NamespaceEditDialog::NamespaceEditDialog( QWidget *parent,
ns = i18n("Shared");
}
setCaption( i18n("Edit Namespace '%1'").arg(ns) );
- QGrid* grid = new QGrid( 2, page );
+ TQGrid* grid = new TQGrid( 2, page );
- mBg = new QButtonGroup( 0 );
- connect( mBg, SIGNAL( clicked(int) ), this, SLOT( slotRemoveEntry(int) ) );
+ mBg = new TQButtonGroup( 0 );
+ connect( mBg, TQT_SIGNAL( clicked(int) ), this, TQT_SLOT( slotRemoveEntry(int) ) );
mDelimMap = mNamespaceMap->find( mType ).data();
ImapAccountBase::namespaceDelim::Iterator it;
for ( it = mDelimMap.begin(); it != mDelimMap.end(); ++it ) {
NamespaceLineEdit* edit = new NamespaceLineEdit( grid );
edit->setText( it.key() );
- QToolButton* button = new QToolButton( grid );
+ TQToolButton* button = new TQToolButton( grid );
button->setIconSet(
KGlobal::iconLoader()->loadIconSet( "editdelete", KIcon::Small, 0 ) );
button->setAutoRaise( true );
- button->setSizePolicy( QSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed ) );
+ button->setSizePolicy( TQSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Fixed ) );
button->setFixedSize( 22, 22 );
mLineEditMap[ mBg->insert( button ) ] = edit;
}
@@ -2334,7 +2334,7 @@ void NamespaceEditDialog::slotRemoveEntry( int id )
void NamespaceEditDialog::slotOk()
{
- QMap<int, NamespaceLineEdit*>::Iterator it;
+ TQMap<int, NamespaceLineEdit*>::Iterator it;
for ( it = mLineEditMap.begin(); it != mLineEditMap.end(); ++it ) {
NamespaceLineEdit* edit = it.data();
if ( edit->isModified() ) {
diff --git a/kmail/accountdialog.h b/kmail/accountdialog.h
index 784cee00b..837e23cf7 100644
--- a/kmail/accountdialog.h
+++ b/kmail/accountdialog.h
@@ -26,7 +26,7 @@
#include <kdialogbase.h>
#include <klistview.h>
#include <klineedit.h>
-#include <qguardedptr.h>
+#include <tqguardedptr.h>
#include "imapaccountbase.h"
class QRegExpValidator;
@@ -57,157 +57,157 @@ class AccountDialog : public KDialogBase
Q_OBJECT
public:
- AccountDialog( const QString & caption, KMAccount *account,
- QWidget *parent=0, const char *name=0, bool modal=true );
+ AccountDialog( const TQString & caption, KMAccount *account,
+ TQWidget *parent=0, const char *name=0, bool modal=true );
virtual ~AccountDialog();
private:
struct LocalWidgets
{
- QLabel *titleLabel;
- QLineEdit *nameEdit;
- QComboBox *locationEdit;
- QRadioButton *lockMutt;
- QRadioButton *lockMuttPriv;
- QRadioButton *lockProcmail;
- QComboBox *procmailLockFileName;
- QRadioButton *lockFcntl;
- QRadioButton *lockNone;
- QLineEdit *precommand;
+ TQLabel *titleLabel;
+ TQLineEdit *nameEdit;
+ TQComboBox *locationEdit;
+ TQRadioButton *lockMutt;
+ TQRadioButton *lockMuttPriv;
+ TQRadioButton *lockProcmail;
+ TQComboBox *procmailLockFileName;
+ TQRadioButton *lockFcntl;
+ TQRadioButton *lockNone;
+ TQLineEdit *precommand;
#if 0
- QCheckBox *resourceCheck;
- QPushButton *resourceClearButton;
- QPushButton *resourceClearPastButton;
+ TQCheckBox *resourceCheck;
+ TQPushButton *resourceClearButton;
+ TQPushButton *resourceClearPastButton;
#endif
- QCheckBox *includeInCheck;
- QCheckBox *intervalCheck;
- QLabel *intervalLabel;
+ TQCheckBox *includeInCheck;
+ TQCheckBox *intervalCheck;
+ TQLabel *intervalLabel;
KIntNumInput *intervalSpin;
- QComboBox *folderCombo;
- //QComboBox *identityCombo;
+ TQComboBox *folderCombo;
+ //TQComboBox *identityCombo;
KPIM::IdentityCombo *identityCombo;
- QLabel *identityLabel;
+ TQLabel *identityLabel;
};
struct MaildirWidgets
{
- QLabel *titleLabel;
- QLineEdit *nameEdit;
- QComboBox *locationEdit;
- QLineEdit *precommand;
+ TQLabel *titleLabel;
+ TQLineEdit *nameEdit;
+ TQComboBox *locationEdit;
+ TQLineEdit *precommand;
#if 0
- QCheckBox *resourceCheck;
- QPushButton *resourceClearButton;
- QPushButton *resourceClearPastButton;
+ TQCheckBox *resourceCheck;
+ TQPushButton *resourceClearButton;
+ TQPushButton *resourceClearPastButton;
#endif
- QCheckBox *includeInCheck;
- QCheckBox *intervalCheck;
- QLabel *intervalLabel;
+ TQCheckBox *includeInCheck;
+ TQCheckBox *intervalCheck;
+ TQLabel *intervalLabel;
KIntNumInput *intervalSpin;
- QComboBox *folderCombo;
- //QComboBox *identityCombo;
+ TQComboBox *folderCombo;
+ //TQComboBox *identityCombo;
KPIM::IdentityCombo *identityCombo;
- QLabel *identityLabel;
+ TQLabel *identityLabel;
};
struct PopWidgets
{
- QLabel *titleLabel;
- QLineEdit *nameEdit;
- QLineEdit *loginEdit;
- QLineEdit *passwordEdit;
- QLineEdit *hostEdit;
- QLineEdit *portEdit;
- QLineEdit *precommand;
- QButtonGroup *encryptionGroup;
- QRadioButton *encryptionNone;
- QRadioButton *encryptionSSL;
- QRadioButton *encryptionTLS;
- QButtonGroup *authGroup;
- QRadioButton *authUser;
- QRadioButton *authPlain;
- QRadioButton *authLogin;
- QRadioButton *authCRAM_MD5;
- QRadioButton *authDigestMd5;
- QRadioButton *authNTLM;
- QRadioButton *authGSSAPI;
- QRadioButton *authAPOP;
+ TQLabel *titleLabel;
+ TQLineEdit *nameEdit;
+ TQLineEdit *loginEdit;
+ TQLineEdit *passwordEdit;
+ TQLineEdit *hostEdit;
+ TQLineEdit *portEdit;
+ TQLineEdit *precommand;
+ TQButtonGroup *encryptionGroup;
+ TQRadioButton *encryptionNone;
+ TQRadioButton *encryptionSSL;
+ TQRadioButton *encryptionTLS;
+ TQButtonGroup *authGroup;
+ TQRadioButton *authUser;
+ TQRadioButton *authPlain;
+ TQRadioButton *authLogin;
+ TQRadioButton *authCRAM_MD5;
+ TQRadioButton *authDigestMd5;
+ TQRadioButton *authNTLM;
+ TQRadioButton *authGSSAPI;
+ TQRadioButton *authAPOP;
- QPushButton *checkCapabilities;
- QCheckBox *usePipeliningCheck;
- QCheckBox *storePasswordCheck;
- QCheckBox *leaveOnServerCheck;
- QCheckBox *leaveOnServerDaysCheck;
+ TQPushButton *checkCapabilities;
+ TQCheckBox *usePipeliningCheck;
+ TQCheckBox *storePasswordCheck;
+ TQCheckBox *leaveOnServerCheck;
+ TQCheckBox *leaveOnServerDaysCheck;
KIntNumInput *leaveOnServerDaysSpin;
- QCheckBox *leaveOnServerCountCheck;
+ TQCheckBox *leaveOnServerCountCheck;
KIntNumInput *leaveOnServerCountSpin;
- QCheckBox *leaveOnServerSizeCheck;
+ TQCheckBox *leaveOnServerSizeCheck;
KIntNumInput *leaveOnServerSizeSpin;
#if 0
- QCheckBox *resourceCheck;
- QPushButton *resourceClearButton;
- QPushButton *resourceClearPastButton;
+ TQCheckBox *resourceCheck;
+ TQPushButton *resourceClearButton;
+ TQPushButton *resourceClearPastButton;
#endif
- QCheckBox *includeInCheck;
- QCheckBox *intervalCheck;
- QCheckBox *filterOnServerCheck;
- QLabel *intervalLabel;
+ TQCheckBox *includeInCheck;
+ TQCheckBox *intervalCheck;
+ TQCheckBox *filterOnServerCheck;
+ TQLabel *intervalLabel;
KIntNumInput *intervalSpin;
KIntNumInput *filterOnServerSizeSpin;
- QComboBox *folderCombo;
- //QComboBox *identityCombo;
+ TQComboBox *folderCombo;
+ //TQComboBox *identityCombo;
KPIM::IdentityCombo *identityCombo;
- QLabel *identityLabel;
+ TQLabel *identityLabel;
};
struct ImapWidgets
{
- QLabel *titleLabel;
- QLineEdit *nameEdit;
- QLineEdit *loginEdit;
- QLineEdit *passwordEdit;
- QLineEdit *hostEdit;
- QLineEdit *portEdit;
+ TQLabel *titleLabel;
+ TQLineEdit *nameEdit;
+ TQLineEdit *loginEdit;
+ TQLineEdit *passwordEdit;
+ TQLineEdit *hostEdit;
+ TQLineEdit *portEdit;
#if 0
- QCheckBox *resourceCheck;
- QPushButton *resourceClearButton;
- QPushButton *resourceClearPastButton;
+ TQCheckBox *resourceCheck;
+ TQPushButton *resourceClearButton;
+ TQPushButton *resourceClearPastButton;
#endif
- QCheckBox *autoExpungeCheck; // only used by normal (online) IMAP
- QCheckBox *hiddenFoldersCheck;
- QCheckBox *subscribedFoldersCheck;
- QCheckBox *locallySubscribedFoldersCheck;
- QCheckBox *loadOnDemandCheck;
- QCheckBox *storePasswordCheck;
- QCheckBox *progressDialogCheck; // only used by Disconnected IMAP
- QCheckBox *includeInCheck;
- QCheckBox *intervalCheck;
- QCheckBox *listOnlyOpenCheck;
- QLabel *intervalLabel;
+ TQCheckBox *autoExpungeCheck; // only used by normal (online) IMAP
+ TQCheckBox *hiddenFoldersCheck;
+ TQCheckBox *subscribedFoldersCheck;
+ TQCheckBox *locallySubscribedFoldersCheck;
+ TQCheckBox *loadOnDemandCheck;
+ TQCheckBox *storePasswordCheck;
+ TQCheckBox *progressDialogCheck; // only used by Disconnected IMAP
+ TQCheckBox *includeInCheck;
+ TQCheckBox *intervalCheck;
+ TQCheckBox *listOnlyOpenCheck;
+ TQLabel *intervalLabel;
KIntNumInput *intervalSpin;
- QButtonGroup *encryptionGroup;
- QRadioButton *encryptionNone;
- QRadioButton *encryptionSSL;
- QRadioButton *encryptionTLS;
- QButtonGroup *authGroup;
- QRadioButton *authUser;
- QRadioButton *authPlain;
- QRadioButton *authLogin;
- QRadioButton *authCramMd5;
- QRadioButton *authDigestMd5;
- QRadioButton *authGSSAPI;
- QRadioButton *authNTLM;
- QRadioButton *authAnonymous;
- QPushButton *checkCapabilities;
+ TQButtonGroup *encryptionGroup;
+ TQRadioButton *encryptionNone;
+ TQRadioButton *encryptionSSL;
+ TQRadioButton *encryptionTLS;
+ TQButtonGroup *authGroup;
+ TQRadioButton *authUser;
+ TQRadioButton *authPlain;
+ TQRadioButton *authLogin;
+ TQRadioButton *authCramMd5;
+ TQRadioButton *authDigestMd5;
+ TQRadioButton *authGSSAPI;
+ TQRadioButton *authNTLM;
+ TQRadioButton *authAnonymous;
+ TQPushButton *checkCapabilities;
FolderRequester *trashCombo;
KLineEdit *personalNS;
KLineEdit *otherUsersNS;
KLineEdit *sharedNS;
- QToolButton *editPNS;
- QToolButton *editONS;
- QToolButton *editSNS;
+ TQToolButton *editPNS;
+ TQToolButton *editONS;
+ TQToolButton *editSNS;
ImapAccountBase::nsDelimMap nsMap;
KPIM::IdentityCombo *identityCombo;
- QLabel *identityLabel;
+ TQLabel *identityLabel;
};
private slots:
@@ -229,14 +229,14 @@ class AccountDialog : public KDialogBase
void slotImapEncryptionChanged(int);
void slotCheckPopCapabilities();
void slotCheckImapCapabilities();
- void slotPopCapabilities( const QStringList &, const QStringList & );
- void slotImapCapabilities( const QStringList &, const QStringList & );
+ void slotPopCapabilities( const TQStringList &, const TQStringList & );
+ void slotImapCapabilities( const TQStringList &, const TQStringList & );
void slotReloadNamespaces();
void slotSetupNamespaces( const ImapAccountBase::nsDelimMap& map );
void slotEditPersonalNamespace();
void slotEditOtherUsersNamespace();
void slotEditSharedNamespace();
- void slotConnectionResult( int errorCode, const QString& );
+ void slotConnectionResult( int errorCode, const TQString& );
void slotLeaveOnServerDaysChanged( int value );
void slotLeaveOnServerCountChanged( int value );
void slotFilterOnServerSizeChanged( int value );
@@ -253,13 +253,13 @@ class AccountDialog : public KDialogBase
void makeImapAccountPage( bool disconnected = false );
void setupSettings();
void saveSettings();
- void checkHighest( QButtonGroup * );
- static unsigned int popCapabilitiesFromStringList( const QStringList & );
- static unsigned int imapCapabilitiesFromStringList( const QStringList & );
+ void checkHighest( TQButtonGroup * );
+ static unsigned int popCapabilitiesFromStringList( const TQStringList & );
+ static unsigned int imapCapabilitiesFromStringList( const TQStringList & );
void enablePopFeatures( unsigned int );
void enableImapAuthMethods( unsigned int );
void initAccountForConnect();
- const QString namespaceListToString( const QStringList& list );
+ const TQString namespaceListToString( const TQStringList& list );
private:
LocalWidgets mLocal;
@@ -267,8 +267,8 @@ class AccountDialog : public KDialogBase
PopWidgets mPop;
ImapWidgets mImap;
KMAccount *mAccount;
- QValueList<QGuardedPtr<KMFolder> > mFolderList;
- QStringList mFolderNames;
+ TQValueList<TQGuardedPtr<KMFolder> > mFolderList;
+ TQStringList mFolderNames;
KMServerTest *mServerTest;
enum EncryptionMethods {
NoEncryption = 0,
@@ -296,7 +296,7 @@ class AccountDialog : public KDialogBase
unsigned int mCapaSSL;
unsigned int mCapaTLS;
KMail::SieveConfigEditor *mSieveConfigEditor;
- QRegExpValidator *mValidator;
+ TQRegExpValidator *mValidator;
};
class NamespaceLineEdit: public KLineEdit
@@ -304,15 +304,15 @@ class NamespaceLineEdit: public KLineEdit
Q_OBJECT
public:
- NamespaceLineEdit( QWidget* parent );
+ NamespaceLineEdit( TQWidget* parent );
- const QString& lastText() { return mLastText; }
+ const TQString& lastText() { return mLastText; }
public slots:
- virtual void setText ( const QString & );
+ virtual void setText ( const TQString & );
private:
- QString mLastText;
+ TQString mLastText;
};
class NamespaceEditDialog: public KDialogBase
@@ -320,7 +320,7 @@ class NamespaceEditDialog: public KDialogBase
Q_OBJECT
public:
- NamespaceEditDialog( QWidget* parent, ImapAccountBase::imapNamespace type,
+ NamespaceEditDialog( TQWidget* parent, ImapAccountBase::imapNamespace type,
ImapAccountBase::nsDelimMap* map );
protected slots:
@@ -331,8 +331,8 @@ class NamespaceEditDialog: public KDialogBase
ImapAccountBase::imapNamespace mType;
ImapAccountBase::nsDelimMap* mNamespaceMap;
ImapAccountBase::namespaceDelim mDelimMap;
- QMap<int, NamespaceLineEdit*> mLineEditMap;
- QButtonGroup* mBg;
+ TQMap<int, NamespaceLineEdit*> mLineEditMap;
+ TQButtonGroup* mBg;
};
} // namespace KMail
diff --git a/kmail/accountmanager.cpp b/kmail/accountmanager.cpp
index 54a1b4166..0610622f7 100644
--- a/kmail/accountmanager.cpp
+++ b/kmail/accountmanager.cpp
@@ -25,14 +25,14 @@
#include <kconfig.h>
#include <kapplication.h>
-#include <qregexp.h>
-#include <qvaluelist.h>
+#include <tqregexp.h>
+#include <tqvaluelist.h>
using namespace KMail;
//-----------------------------------------------------------------------------
AccountManager::AccountManager()
- :QObject(), mNewMailArrived( false ), mInteractive( false ),
+ :TQObject(), mNewMailArrived( false ), mInteractive( false ),
mTotalNewMailsArrived( 0 ), mDisplaySummary( false )
{
mAcctChecking.clear();
@@ -50,15 +50,15 @@ AccountManager::~AccountManager()
void AccountManager::writeConfig( bool withSync )
{
KConfig* config = KMKernel::config();
- QString groupName;
+ TQString groupName;
KConfigGroupSaver saver(config, "General");
config->writeEntry("accounts", mAcctList.count());
// first delete all account groups in the config file:
- QStringList accountGroups =
- config->groupList().grep( QRegExp( "Account \\d+" ) );
- for ( QStringList::Iterator it = accountGroups.begin() ;
+ TQStringList accountGroups =
+ config->groupList().grep( TQRegExp( "Account \\d+" ) );
+ for ( TQStringList::Iterator it = accountGroups.begin() ;
it != accountGroups.end() ; ++it )
config->deleteGroup( *it );
@@ -78,8 +78,8 @@ void AccountManager::readConfig(void)
{
KConfig* config = KMKernel::config();
KMAccount* acct;
- QString acctType, acctName;
- QCString groupName;
+ TQString acctType, acctName;
+ TQCString groupName;
int i, num;
uint id;
@@ -149,8 +149,8 @@ void AccountManager::processNextCheck( bool _newMail )
kdDebug(5006) << "account " << acct->name() << " finished check" << endl;
mAcctChecking.remove( acct );
kmkernel->filterMgr()->deref();
- disconnect( acct, SIGNAL( finishedCheck( bool, CheckStatus ) ),
- this, SLOT( processNextCheck( bool ) ) );
+ disconnect( acct, TQT_SIGNAL( finishedCheck( bool, CheckStatus ) ),
+ this, TQT_SLOT( processNextCheck( bool ) ) );
}
if ( mAcctChecking.isEmpty() ) {
// all checks finished, display summary
@@ -164,7 +164,7 @@ void AccountManager::processNextCheck( bool _newMail )
}
if ( mAcctTodo.isEmpty() ) return;
- QString accountHostName;
+ TQString accountHostName;
KMAccount *curAccount = 0;
for ( AccountList::Iterator it ( mAcctTodo.begin() ), last ( mAcctTodo.end() ); it != last; ) {
@@ -180,7 +180,7 @@ void AccountManager::processNextCheck( bool _newMail )
if ( curAccount->type() != "imap" && curAccount->type() != "cachedimap" &&
curAccount->folder() == 0 ) {
- QString tmp = i18n("Account %1 has no mailbox defined:\n"
+ TQString tmp = i18n("Account %1 has no mailbox defined:\n"
"mail checking aborted;\n"
"check your account settings.")
.arg(curAccount->name());
@@ -196,18 +196,18 @@ void AccountManager::processNextCheck( bool _newMail )
// Check with the network status daemon whether the network is available
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 << static_cast<NetworkAccount*>( curAccount )->host();
- if ( kapp->dcopClient()->call( "kded", "networkstatus", "status(QString)",
+ if ( kapp->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() << k_funcinfo << "networkstatus status = " << result << endl;
// if it's not unknown (no networks announced by network control apps), and not offline, give up now
@@ -219,8 +219,8 @@ void AccountManager::processNextCheck( bool _newMail )
}
}
- connect( curAccount, SIGNAL( finishedCheck( bool, CheckStatus ) ),
- this, SLOT( processNextCheck( bool ) ) );
+ connect( curAccount, TQT_SIGNAL( finishedCheck( bool, CheckStatus ) ),
+ this, TQT_SLOT( processNextCheck( bool ) ) );
KPIM::BroadcastStatus::instance()->setStatusMsg(
i18n("Checking account %1 for new mail").arg(curAccount->name()));
@@ -234,7 +234,7 @@ void AccountManager::processNextCheck( bool _newMail )
}
//-----------------------------------------------------------------------------
-KMAccount* AccountManager::create( const QString &aType, const QString &aName, uint id )
+KMAccount* AccountManager::create( const TQString &aType, const TQString &aName, uint id )
{
KMAccount* act = 0;
if ( id == 0 )
@@ -258,8 +258,8 @@ KMAccount* AccountManager::create( const QString &aType, const QString &aName, u
kdWarning(5006) << "Attempt to instantiate a non-existing account type!" << endl;
return 0;
}
- connect( act, SIGNAL( newMailsProcessed( const QMap<QString, int> & ) ),
- this, SLOT( addToTotalNewMailCount( const QMap<QString, int> & ) ) );
+ connect( act, TQT_SIGNAL( newMailsProcessed( const TQMap<TQString, int> & ) ),
+ this, TQT_SLOT( addToTotalNewMailCount( const TQMap<TQString, int> & ) ) );
return act;
}
@@ -281,7 +281,7 @@ void AccountManager::add( KMAccount *account )
//-----------------------------------------------------------------------------
-KMAccount* AccountManager::findByName(const QString &aName) const
+KMAccount* AccountManager::findByName(const TQString &aName) const
{
if ( aName.isEmpty() ) return 0;
@@ -370,9 +370,9 @@ void AccountManager::invalidateIMAPFolders()
//-----------------------------------------------------------------------------
-QStringList AccountManager::getAccounts() const
+TQStringList AccountManager::getAccounts() const
{
- QStringList strList;
+ TQStringList strList;
for ( AccountList::ConstIterator it( mAcctList.begin() ), end( mAcctList.end() ); it != end; ++it ) {
strList.append( (*it)->name() );
}
@@ -392,9 +392,9 @@ void AccountManager::intCheckMail(int item, bool _interactive)
//-----------------------------------------------------------------------------
-void AccountManager::addToTotalNewMailCount( const QMap<QString, int> & newInFolder )
+void AccountManager::addToTotalNewMailCount( const TQMap<TQString, int> & newInFolder )
{
- for ( QMap<QString, int>::const_iterator it = newInFolder.begin();
+ for ( TQMap<TQString, int>::const_iterator it = newInFolder.begin();
it != newInFolder.end(); ++it ) {
mTotalNewMailsArrived += it.data();
if ( mTotalNewInFolder.find( it.key() ) == mTotalNewInFolder.end() )
@@ -407,7 +407,7 @@ void AccountManager::addToTotalNewMailCount( const QMap<QString, int> & newInFol
//-----------------------------------------------------------------------------
uint AccountManager::createId()
{
- QValueList<uint> usedIds;
+ TQValueList<uint> usedIds;
for ( AccountList::ConstIterator it( mAcctList.begin() ), end( mAcctList.end() ); it != end; ++it ) {
usedIds << (*it)->id();
}
diff --git a/kmail/accountmanager.h b/kmail/accountmanager.h
index fda0591f7..95b7b49e9 100644
--- a/kmail/accountmanager.h
+++ b/kmail/accountmanager.h
@@ -20,7 +20,7 @@
#ifndef accountmanager_h
#define accountmanager_h
-#include <qobject.h>
+#include <tqobject.h>
#include "kmaccount.h"
#include <kdepimmacros.h>
@@ -51,8 +51,8 @@ public:
/** Create a new account of given type with given name. Currently
the types "local" for local mail folders and "pop" are supported. */
- KMAccount* create( const QString& type,
- const QString& name = QString::null,
+ KMAccount* create( const TQString& type,
+ const TQString& name = TQString::null,
uint id = 0);
/** Adds an account to the list of accounts */
@@ -60,7 +60,7 @@ public:
/** Find account by name. Returns 0 if account does not exist.
Search is done case sensitive. */
- KMAccount* findByName( const QString& name ) const;
+ KMAccount* findByName( const TQString& name ) const;
/** Find account by id. Returns 0 if account does not exist.
*/
@@ -84,7 +84,7 @@ public:
/** Delete all IMAP folders and resync them */
void invalidateIMAPFolders();
- QStringList getAccounts() const;
+ TQStringList getAccounts() const;
/// Called on exit (KMMainWin::queryExit)
void cancelMailCheck();
@@ -101,7 +101,7 @@ public slots:
/** this slot increases the count of new mails to show a total number
after checking in multiple accounts. */
- void addToTotalNewMailCount( const QMap<QString, int> & newInFolder );
+ void addToTotalNewMailCount( const TQMap<TQString, int> & newInFolder );
signals:
@@ -112,7 +112,7 @@ signals:
* @param newInFolder number of new messages for each folder
**/
void checkedMail( bool newMail, bool interactive,
- const QMap<QString, int> & newInFolder );
+ const TQMap<TQString, int> & newInFolder );
/** emitted when an account is removed */
void accountRemoved( KMAccount* account );
/** emitted when an account is added */
@@ -131,7 +131,7 @@ private:
int mTotalNewMailsArrived;
// for detailed (per folder) new mail notification
- QMap<QString, int> mTotalNewInFolder;
+ TQMap<TQString, int> mTotalNewInFolder;
// if a summary should be displayed
bool mDisplaySummary;
diff --git a/kmail/accountwizard.cpp b/kmail/accountwizard.cpp
index cc831790d..de6c43178 100644
--- a/kmail/accountwizard.cpp
+++ b/kmail/accountwizard.cpp
@@ -32,13 +32,13 @@
#include <klistbox.h>
#include <klocale.h>
-#include <qcheckbox.h>
-#include <qdir.h>
-#include <qhbox.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qpushbutton.h>
-#include <qvbox.h>
+#include <tqcheckbox.h>
+#include <tqdir.h>
+#include <tqhbox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqpushbutton.h>
+#include <tqvbox.h>
#include "kmacctlocal.h"
#include "kmkernel.h"
@@ -81,7 +81,7 @@ class AccountTypeBox : public KListBox
public:
enum Type { Local, POP3, IMAP, dIMAP, Maildir };
- AccountTypeBox( QWidget *parent )
+ AccountTypeBox( TQWidget *parent )
: KListBox( parent, "AccountTypeBox" )
{
mTypeList << i18n( "Local mailbox" );
@@ -104,10 +104,10 @@ class AccountTypeBox : public KListBox
}
private:
- QStringList mTypeList;
+ TQStringList mTypeList;
};
-AccountWizard::AccountWizard( KMKernel *kernel, QWidget *parent )
+AccountWizard::AccountWizard( KMKernel *kernel, TQWidget *parent )
: KWizard( parent, "KWizard" ), mKernel( kernel ),
mAccount( 0 ), mTransportInfo( 0 ), mServerTest( 0 )
{
@@ -118,21 +118,21 @@ AccountWizard::AccountWizard( KMKernel *kernel, QWidget *parent )
setupServerInformationPage();
}
-void AccountWizard::start( KMKernel *kernel, QWidget *parent )
+void AccountWizard::start( KMKernel *kernel, TQWidget *parent )
{
KConfigGroup wizardConfig( KMKernel::config(), "AccountWizard" );
if ( wizardConfig.readBoolEntry( "ShowOnStartup", true ) ) {
AccountWizard wizard( kernel, parent );
int result = wizard.exec();
- if ( result == QDialog::Accepted ) {
+ if ( result == TQDialog::Accepted ) {
wizardConfig.writeEntry( "ShowOnStartup", false );
kernel->slotConfigChanged();
}
}
}
-void AccountWizard::showPage( QWidget *page )
+void AccountWizard::showPage( TQWidget *page )
{
if ( page == mWelcomePage ) {
// do nothing
@@ -152,7 +152,7 @@ void AccountWizard::showPage( QWidget *page )
} else if ( page == mLoginInformationPage ) {
if ( mLoginName->text().isEmpty() ) {
// try to extract login from email address
- QString email = mEMailAddress->text();
+ TQString email = mEMailAddress->text();
int pos = email.find( '@' );
if ( pos != -1 )
mLoginName->setText( email.left( pos ) );
@@ -167,9 +167,9 @@ void AccountWizard::showPage( QWidget *page )
mIncomingLabel->setText( i18n( "Location:" ) );
if ( mTypeBox->type() == AccountTypeBox::Local )
- mIncomingLocation->setText( QDir::homeDirPath() + "/inbox" );
+ mIncomingLocation->setText( TQDir::homeDirPath() + "/inbox" );
else
- mIncomingLocation->setText( QDir::homeDirPath() + "/Mail/" );
+ mIncomingLocation->setText( TQDir::homeDirPath() + "/Mail/" );
} else {
mIncomingLocationWdg->hide();
mIncomingServerWdg->show();
@@ -179,20 +179,20 @@ void AccountWizard::showPage( QWidget *page )
setFinishEnabled( mServerInformationPage, true );
}
- QWizard::showPage( page );
+ TQWizard::showPage( page );
}
void AccountWizard::setupWelcomePage()
{
- mWelcomePage = new QVBox( this );
- ((QVBox*)mWelcomePage)->setSpacing( KDialog::spacingHint() );
+ mWelcomePage = new TQVBox( this );
+ ((TQVBox*)mWelcomePage)->setSpacing( KDialog::spacingHint() );
- QLabel *label = new QLabel( i18n( "Welcome to KMail" ), mWelcomePage );
- QFont font = label->font();
+ TQLabel *label = new TQLabel( i18n( "Welcome to KMail" ), mWelcomePage );
+ TQFont font = label->font();
font.setBold( true );
label->setFont( font );
- new QLabel( i18n( "<qt>It seems you have started KMail for the first time. "
+ new TQLabel( i18n( "<qt>It seems you have started KMail for the first time. "
"You can use this wizard to setup your mail accounts. Just "
"enter the connection data that you received from your email provider "
"into the following pages.</qt>" ), mWelcomePage );
@@ -202,10 +202,10 @@ void AccountWizard::setupWelcomePage()
void AccountWizard::setupAccountTypePage()
{
- mAccountTypePage = new QVBox( this );
- ((QVBox*)mAccountTypePage)->setSpacing( KDialog::spacingHint() );
+ mAccountTypePage = new TQVBox( this );
+ ((TQVBox*)mAccountTypePage)->setSpacing( KDialog::spacingHint() );
- new QLabel( i18n( "Select what kind of account you would like to create" ), mAccountTypePage );
+ new TQLabel( i18n( "Select what kind of account you would like to create" ), mAccountTypePage );
mTypeBox = new AccountTypeBox( mAccountTypePage );
@@ -214,25 +214,25 @@ void AccountWizard::setupAccountTypePage()
void AccountWizard::setupAccountInformationPage()
{
- mAccountInformationPage = new QWidget( this );
- QGridLayout *layout = new QGridLayout( mAccountInformationPage, 3, 2,
+ mAccountInformationPage = new TQWidget( this );
+ TQGridLayout *layout = new TQGridLayout( mAccountInformationPage, 3, 2,
KDialog::marginHint(), KDialog::spacingHint() );
- QLabel *label = new QLabel( i18n( "Real name:" ), mAccountInformationPage );
+ TQLabel *label = new TQLabel( i18n( "Real name:" ), mAccountInformationPage );
mRealName = new KLineEdit( mAccountInformationPage );
label->setBuddy( mRealName );
layout->addWidget( label, 0, 0 );
layout->addWidget( mRealName, 0, 1 );
- label = new QLabel( i18n( "E-mail address:" ), mAccountInformationPage );
+ label = new TQLabel( i18n( "E-mail address:" ), mAccountInformationPage );
mEMailAddress = new KLineEdit( mAccountInformationPage );
label->setBuddy( mEMailAddress );
layout->addWidget( label, 1, 0 );
layout->addWidget( mEMailAddress, 1, 1 );
- label = new QLabel( i18n( "Organization:" ), mAccountInformationPage );
+ label = new TQLabel( i18n( "Organization:" ), mAccountInformationPage );
mOrganization = new KLineEdit( mAccountInformationPage );
label->setBuddy( mOrganization );
@@ -244,20 +244,20 @@ void AccountWizard::setupAccountInformationPage()
void AccountWizard::setupLoginInformationPage()
{
- mLoginInformationPage = new QWidget( this );
- QGridLayout *layout = new QGridLayout( mLoginInformationPage, 2, 2,
+ mLoginInformationPage = new TQWidget( this );
+ TQGridLayout *layout = new TQGridLayout( mLoginInformationPage, 2, 2,
KDialog::marginHint(), KDialog::spacingHint() );
- QLabel *label = new QLabel( i18n( "Login name:" ), mLoginInformationPage );
+ TQLabel *label = new TQLabel( i18n( "Login name:" ), mLoginInformationPage );
mLoginName = new KLineEdit( mLoginInformationPage );
label->setBuddy( mLoginName );
layout->addWidget( label, 0, 0 );
layout->addWidget( mLoginName, 0, 1 );
- label = new QLabel( i18n( "Password:" ), mLoginInformationPage );
+ label = new TQLabel( i18n( "Password:" ), mLoginInformationPage );
mPassword = new KLineEdit( mLoginInformationPage );
- mPassword->setEchoMode( QLineEdit::Password );
+ mPassword->setEchoMode( TQLineEdit::Password );
label->setBuddy( mPassword );
layout->addWidget( label, 1, 0 );
@@ -268,67 +268,67 @@ void AccountWizard::setupLoginInformationPage()
void AccountWizard::setupServerInformationPage()
{
- mServerInformationPage = new QWidget( this );
- QGridLayout *layout = new QGridLayout( mServerInformationPage, 3, 2,
+ mServerInformationPage = new TQWidget( this );
+ TQGridLayout *layout = new TQGridLayout( mServerInformationPage, 3, 2,
KDialog::marginHint(), KDialog::spacingHint() );
- mIncomingLabel = new QLabel( mServerInformationPage );
+ mIncomingLabel = new TQLabel( mServerInformationPage );
- mIncomingServerWdg = new QVBox( mServerInformationPage );
+ mIncomingServerWdg = new TQVBox( mServerInformationPage );
mIncomingServer = new KLineEdit( mIncomingServerWdg );
- mIncomingUseSSL = new QCheckBox( i18n( "Use secure connection (SSL)" ), mIncomingServerWdg );
+ mIncomingUseSSL = new TQCheckBox( i18n( "Use secure connection (SSL)" ), mIncomingServerWdg );
- mIncomingLocationWdg = new QHBox( mServerInformationPage );
+ mIncomingLocationWdg = new TQHBox( mServerInformationPage );
mIncomingLocation = new KLineEdit( mIncomingLocationWdg );
- mChooseLocation = new QPushButton( i18n( "Choose..." ), mIncomingLocationWdg );
+ mChooseLocation = new TQPushButton( i18n( "Choose..." ), mIncomingLocationWdg );
- connect( mChooseLocation, SIGNAL( clicked() ),
- this, SLOT( chooseLocation() ) );
+ connect( mChooseLocation, TQT_SIGNAL( clicked() ),
+ this, TQT_SLOT( chooseLocation() ) );
layout->addWidget( mIncomingLabel, 0, 0, AlignTop );
layout->addWidget( mIncomingLocationWdg, 0, 1 );
layout->addWidget( mIncomingServerWdg, 0, 1 );
- QLabel *label = new QLabel( i18n( "Outgoing server:" ), mServerInformationPage );
+ TQLabel *label = new TQLabel( i18n( "Outgoing server:" ), mServerInformationPage );
mOutgoingServer = new KLineEdit( mServerInformationPage );
label->setBuddy( mOutgoingServer );
layout->addWidget( label, 1, 0 );
layout->addWidget( mOutgoingServer, 1, 1 );
- mOutgoingUseSSL = new QCheckBox( i18n( "Use secure connection (SSL)" ), mServerInformationPage );
+ mOutgoingUseSSL = new TQCheckBox( i18n( "Use secure connection (SSL)" ), mServerInformationPage );
layout->addWidget( mOutgoingUseSSL, 2, 1 );
- mLocalDelivery = new QCheckBox( i18n( "Use local delivery" ),
+ mLocalDelivery = new TQCheckBox( i18n( "Use local delivery" ),
mServerInformationPage );
layout->addWidget( mLocalDelivery, 3, 0 );
- connect( mLocalDelivery, SIGNAL( toggled( bool ) ),
- mOutgoingServer, SLOT( setDisabled( bool ) ) );
+ connect( mLocalDelivery, TQT_SIGNAL( toggled( bool ) ),
+ mOutgoingServer, TQT_SLOT( setDisabled( bool ) ) );
addPage( mServerInformationPage, i18n( "Server Information" ) );
}
void AccountWizard::chooseLocation()
{
- QString location;
+ TQString location;
if ( mTypeBox->type() == AccountTypeBox::Local ) {
- location = KFileDialog::getSaveFileName( QString(), QString(), this );
+ location = KFileDialog::getSaveFileName( TQString(), TQString(), this );
} else if ( mTypeBox->type() == AccountTypeBox::Maildir ) {
- location = KFileDialog::getExistingDirectory( QString(), this );
+ location = KFileDialog::getExistingDirectory( TQString(), this );
}
if ( !location.isEmpty() )
mIncomingLocation->setText( location );
}
-QString AccountWizard::accountName() const
+TQString AccountWizard::accountName() const
{
// create account name
- QString name( i18n( "None" ) );
+ TQString name( i18n( "None" ) );
- QString email = mEMailAddress->text();
+ TQString email = mEMailAddress->text();
int pos = email.find( '@' );
if ( pos != -1 ) {
name = email.mid( pos + 1 );
@@ -338,10 +338,10 @@ QString AccountWizard::accountName() const
return name;
}
-QLabel *AccountWizard::createInfoLabel( const QString &msg )
+TQLabel *AccountWizard::createInfoLabel( const TQString &msg )
{
- QLabel *label = new QLabel( msg, this );
- label->setFrameStyle( QFrame::Panel | QFrame::Raised );
+ TQLabel *label = new TQLabel( msg, this );
+ label->setFrameStyle( TQFrame::Panel | TQFrame::Raised );
label->resize( fontMetrics().width( msg ) + 20, label->height() * 2 );
label->move( width() / 2 - label->width() / 2, height() / 2 - label->height() / 2 );
label->show();
@@ -361,7 +361,7 @@ void AccountWizard::accept()
manager->commit();
- QTimer::singleShot( 0, this, SLOT( createTransport() ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( createTransport() ) );
}
void AccountWizard::createTransport()
@@ -386,7 +386,7 @@ void AccountWizard::createTransport()
mTransportInfo->auth = false;
mTransportInfo->setStorePasswd( false );
- QTimer::singleShot( 0, this, SLOT( transportCreated() ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( transportCreated() ) );
} else { // delivery via SMTP
mTransportInfo->type = "smtp";
mTransportInfo->name = accountName();
@@ -425,7 +425,7 @@ void AccountWizard::transportCreated()
mTransportInfoList.setAutoDelete( true );
mTransportInfoList.clear();
- QTimer::singleShot( 0, this, SLOT( createAccount() ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( createAccount() ) );
}
void AccountWizard::createAccount()
@@ -485,7 +485,7 @@ void AccountWizard::createAccount()
else if ( mTypeBox->type() == AccountTypeBox::IMAP || mTypeBox->type() == AccountTypeBox::dIMAP )
checkImapCapabilities( mIncomingServer->text(), port );
else
- QTimer::singleShot( 0, this, SLOT( accountCreated() ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( accountCreated() ) );
}
void AccountWizard::accountCreated()
@@ -503,48 +503,48 @@ void AccountWizard::finished()
{
GlobalSettings::self()->writeConfig();
- QWizard::accept();
+ TQWizard::accept();
}
// ----- Security Checks --------------
-void AccountWizard::checkPopCapabilities( const QString &server, int port )
+void AccountWizard::checkPopCapabilities( const TQString &server, int port )
{
delete mServerTest;
mServerTest = new KMServerTest( POP_PROTOCOL, server, port );
- connect( mServerTest, SIGNAL( capabilities( const QStringList&, const QStringList& ) ),
- this, SLOT( popCapabilities( const QStringList&, const QStringList& ) ) );
+ connect( mServerTest, TQT_SIGNAL( capabilities( const TQStringList&, const TQStringList& ) ),
+ this, TQT_SLOT( popCapabilities( const TQStringList&, const TQStringList& ) ) );
mAuthInfoLabel = createInfoLabel( i18n( "Check for supported security capabilities of %1..." ).arg( server ) );
}
-void AccountWizard::checkImapCapabilities( const QString &server, int port )
+void AccountWizard::checkImapCapabilities( const TQString &server, int port )
{
delete mServerTest;
mServerTest = new KMServerTest( IMAP_PROTOCOL, server, port );
- connect( mServerTest, SIGNAL( capabilities( const QStringList&, const QStringList& ) ),
- this, SLOT( imapCapabilities( const QStringList&, const QStringList& ) ) );
+ connect( mServerTest, TQT_SIGNAL( capabilities( const TQStringList&, const TQStringList& ) ),
+ this, TQT_SLOT( imapCapabilities( const TQStringList&, const TQStringList& ) ) );
mAuthInfoLabel = createInfoLabel( i18n( "Check for supported security capabilities of %1..." ).arg( server ) );
}
-void AccountWizard::checkSmtpCapabilities( const QString &server, int port )
+void AccountWizard::checkSmtpCapabilities( const TQString &server, int port )
{
delete mServerTest;
mServerTest = new KMServerTest( SMTP_PROTOCOL, server, port );
- connect( mServerTest, SIGNAL( capabilities( const QStringList&, const QStringList&,
- const QString&, const QString&, const QString& ) ),
- this, SLOT( smtpCapabilities( const QStringList&, const QStringList&,
- const QString&, const QString&, const QString& ) ) );
+ connect( mServerTest, TQT_SIGNAL( capabilities( const TQStringList&, const TQStringList&,
+ const TQString&, const TQString&, const TQString& ) ),
+ this, TQT_SLOT( smtpCapabilities( const TQStringList&, const TQStringList&,
+ const TQString&, const TQString&, const TQString& ) ) );
mAuthInfoLabel = createInfoLabel( i18n( "Check for supported security capabilities of %1..." ).arg( server ) );
}
-void AccountWizard::popCapabilities( const QStringList &capaNormalList,
- const QStringList &capaSSLList )
+void AccountWizard::popCapabilities( const TQStringList &capaNormalList,
+ const TQStringList &capaSSLList )
{
uint capaNormal = popCapabilitiesFromStringList( capaNormalList );
uint capaTLS = 0;
@@ -593,8 +593,8 @@ void AccountWizard::popCapabilities( const QStringList &capaNormalList,
}
-void AccountWizard::imapCapabilities( const QStringList &capaNormalList,
- const QStringList &capaSSLList )
+void AccountWizard::imapCapabilities( const TQStringList &capaNormalList,
+ const TQStringList &capaSSLList )
{
uint capaNormal = imapCapabilitiesFromStringList( capaNormalList );
uint capaTLS = 0;
@@ -641,11 +641,11 @@ void AccountWizard::imapCapabilities( const QStringList &capaNormalList,
accountCreated();
}
-void AccountWizard::smtpCapabilities( const QStringList &capaNormal,
- const QStringList &capaSSL,
- const QString &authNone,
- const QString &authSSL,
- const QString &authTLS )
+void AccountWizard::smtpCapabilities( const TQStringList &capaNormal,
+ const TQStringList &capaSSL,
+ const TQString &authNone,
+ const TQString &authSSL,
+ const TQString &authTLS )
{
uint authBitsNone, authBitsSSL, authBitsTLS;
@@ -699,12 +699,12 @@ void AccountWizard::smtpCapabilities( const QStringList &capaNormal,
transportCreated();
}
-uint AccountWizard::popCapabilitiesFromStringList( const QStringList & l )
+uint AccountWizard::popCapabilitiesFromStringList( const TQStringList & l )
{
unsigned int capa = 0;
- for ( QStringList::const_iterator it = l.begin() ; it != l.end() ; ++it ) {
- QString cur = (*it).upper();
+ for ( TQStringList::const_iterator it = l.begin() ; it != l.end() ; ++it ) {
+ TQString cur = (*it).upper();
if ( cur == "PLAIN" )
capa |= Plain;
else if ( cur == "LOGIN" )
@@ -726,12 +726,12 @@ uint AccountWizard::popCapabilitiesFromStringList( const QStringList & l )
return capa;
}
-uint AccountWizard::imapCapabilitiesFromStringList( const QStringList & l )
+uint AccountWizard::imapCapabilitiesFromStringList( const TQStringList & l )
{
unsigned int capa = 0;
- for ( QStringList::const_iterator it = l.begin() ; it != l.end() ; ++it ) {
- QString cur = (*it).upper();
+ for ( TQStringList::const_iterator it = l.begin() ; it != l.end() ; ++it ) {
+ TQString cur = (*it).upper();
if ( cur == "AUTH=PLAIN" )
capa |= Plain;
else if ( cur == "AUTH=LOGIN" )
@@ -753,12 +753,12 @@ uint AccountWizard::imapCapabilitiesFromStringList( const QStringList & l )
return capa;
}
-uint AccountWizard::authMethodsFromString( const QString & s )
+uint AccountWizard::authMethodsFromString( const TQString & s )
{
unsigned int result = 0;
- QStringList sl = QStringList::split( '\n', s.upper() );
- for ( QStringList::const_iterator it = sl.begin() ; it != sl.end() ; ++it )
+ TQStringList sl = TQStringList::split( '\n', s.upper() );
+ for ( TQStringList::const_iterator it = sl.begin() ; it != sl.end() ; ++it )
if ( *it == "SASL/LOGIN" )
result |= Login;
else if ( *it == "SASL/PLAIN" )
@@ -775,11 +775,11 @@ uint AccountWizard::authMethodsFromString( const QString & s )
return result;
}
-uint AccountWizard::authMethodsFromStringList( const QStringList & sl )
+uint AccountWizard::authMethodsFromStringList( const TQStringList & sl )
{
unsigned int result = 0;
- for ( QStringList::const_iterator it = sl.begin() ; it != sl.end() ; ++it )
+ for ( TQStringList::const_iterator it = sl.begin() ; it != sl.end() ; ++it )
if ( *it == "LOGIN" )
result |= Login;
else if ( *it == "PLAIN" )
diff --git a/kmail/accountwizard.h b/kmail/accountwizard.h
index 0dea0e442..56cba599c 100644
--- a/kmail/accountwizard.h
+++ b/kmail/accountwizard.h
@@ -54,15 +54,15 @@ class AccountWizard : public KWizard
@param kernel The mail kernel the wizard should work on.
@param parent The parent widget of the dialog.
*/
- static void start( KMKernel *kernel, QWidget *parent = 0 );
+ static void start( KMKernel *kernel, TQWidget *parent = 0 );
/**
Reimplemented
*/
- void showPage( QWidget *page );
+ void showPage( TQWidget *page );
protected:
- AccountWizard( KMKernel *kernel, QWidget *parent );
+ AccountWizard( KMKernel *kernel, TQWidget *parent );
~AccountWizard() {};
void setupWelcomePage();
@@ -81,57 +81,57 @@ class AccountWizard : public KWizard
void finished();
private slots:
- void popCapabilities( const QStringList&, const QStringList& );
- void imapCapabilities( const QStringList&, const QStringList& );
- void smtpCapabilities( const QStringList&, const QStringList&,
- const QString&, const QString&, const QString& );
+ void popCapabilities( const TQStringList&, const TQStringList& );
+ void imapCapabilities( const TQStringList&, const TQStringList& );
+ void smtpCapabilities( const TQStringList&, const TQStringList&,
+ const TQString&, const TQString&, const TQString& );
private:
- QString accountName() const;
- QLabel *createInfoLabel( const QString &msg );
+ TQString accountName() const;
+ TQLabel *createInfoLabel( const TQString &msg );
- void checkPopCapabilities( const QString&, int );
- void checkImapCapabilities( const QString&, int );
- void checkSmtpCapabilities( const QString&, int );
- uint popCapabilitiesFromStringList( const QStringList& );
- uint imapCapabilitiesFromStringList( const QStringList& );
- uint authMethodsFromString( const QString& );
- uint authMethodsFromStringList( const QStringList& );
+ void checkPopCapabilities( const TQString&, int );
+ void checkImapCapabilities( const TQString&, int );
+ void checkSmtpCapabilities( const TQString&, int );
+ uint popCapabilitiesFromStringList( const TQStringList& );
+ uint imapCapabilitiesFromStringList( const TQStringList& );
+ uint authMethodsFromString( const TQString& );
+ uint authMethodsFromStringList( const TQStringList& );
- QWidget *mWelcomePage;
+ TQWidget *mWelcomePage;
- QWidget *mAccountTypePage;
+ TQWidget *mAccountTypePage;
AccountTypeBox *mTypeBox;
- QWidget *mAccountInformationPage;
+ TQWidget *mAccountInformationPage;
KLineEdit *mRealName;
KLineEdit *mEMailAddress;
KLineEdit *mOrganization;
- QWidget *mLoginInformationPage;
+ TQWidget *mLoginInformationPage;
KLineEdit *mLoginName;
KLineEdit *mPassword;
- QWidget *mServerInformationPage;
- QLabel *mIncomingLabel;
+ TQWidget *mServerInformationPage;
+ TQLabel *mIncomingLabel;
KLineEdit *mIncomingServer;
- QCheckBox *mIncomingUseSSL;
+ TQCheckBox *mIncomingUseSSL;
KLineEdit *mIncomingLocation;
- QPushButton *mChooseLocation;
+ TQPushButton *mChooseLocation;
KLineEdit *mOutgoingServer;
- QCheckBox *mOutgoingUseSSL;
- QCheckBox *mLocalDelivery;
+ TQCheckBox *mOutgoingUseSSL;
+ TQCheckBox *mLocalDelivery;
- QWidget *mIncomingServerWdg;
- QWidget *mIncomingLocationWdg;
+ TQWidget *mIncomingServerWdg;
+ TQWidget *mIncomingLocationWdg;
- QLabel *mAuthInfoLabel;
+ TQLabel *mAuthInfoLabel;
KMKernel *mKernel;
KMAccount *mAccount;
KMTransportInfo *mTransportInfo;
- QPtrList<KMTransportInfo> mTransportInfoList;
+ TQPtrList<KMTransportInfo> mTransportInfoList;
KMServerTest *mServerTest;
};
diff --git a/kmail/acljobs.cpp b/kmail/acljobs.cpp
index 568a6f4bb..41931829e 100644
--- a/kmail/acljobs.cpp
+++ b/kmail/acljobs.cpp
@@ -36,11 +36,11 @@ using namespace KMail;
// Convert str to an ACLPermissions value.
// url and user are there only for the error message
-static unsigned int IMAPRightsToPermission( const QString& str, const KURL& url, const QString& user ) {
+static unsigned int IMAPRightsToPermission( const TQString& str, const KURL& url, const TQString& user ) {
unsigned int perm = 0;
uint len = str.length();
for (uint i = 0; i < len; ++i) {
- QChar ch = str[i];
+ TQChar ch = str[i];
switch ( ch.latin1() ) {
case 'l': perm |= ACLJobs::List; break;
case 'r': perm |= ACLJobs::Read; break;
@@ -69,8 +69,8 @@ static unsigned int IMAPRightsToPermission( const QString& str, const KURL& url,
return perm;
}
-static QCString permissionsToIMAPRights( unsigned int permissions ) {
- QCString str = "";
+static TQCString permissionsToIMAPRights( unsigned int permissions ) {
+ TQCString str = "";
if ( permissions & ACLJobs::List )
str += 'l';
if ( permissions & ACLJobs::Read )
@@ -93,9 +93,9 @@ static QCString permissionsToIMAPRights( unsigned int permissions ) {
}
#ifndef NDEBUG
-QString ACLJobs::permissionsToString( unsigned int permissions )
+TQString ACLJobs::permissionsToString( unsigned int permissions )
{
- QString str;
+ TQString str;
if ( permissions & ACLJobs::List )
str += "List ";
if ( permissions & ACLJobs::Read )
@@ -118,12 +118,12 @@ QString ACLJobs::permissionsToString( unsigned int permissions )
}
#endif
-KIO::SimpleJob* ACLJobs::setACL( KIO::Slave* slave, const KURL& url, const QString& user, unsigned int permissions )
+KIO::SimpleJob* ACLJobs::setACL( KIO::Slave* slave, const KURL& url, const TQString& user, unsigned int permissions )
{
- QString perm = QString::fromLatin1( permissionsToIMAPRights( permissions ) );
+ TQString perm = TQString::fromLatin1( permissionsToIMAPRights( permissions ) );
- QByteArray packedArgs;
- QDataStream stream( packedArgs, IO_WriteOnly );
+ TQByteArray packedArgs;
+ TQDataStream stream( packedArgs, IO_WriteOnly );
stream << (int)'A' << (int)'S' << url << user << perm;
KIO::SimpleJob* job = KIO::special( url, packedArgs, false );
@@ -131,10 +131,10 @@ KIO::SimpleJob* ACLJobs::setACL( KIO::Slave* slave, const KURL& url, const QStri
return job;
}
-ACLJobs::DeleteACLJob* ACLJobs::deleteACL( KIO::Slave* slave, const KURL& url, const QString& user )
+ACLJobs::DeleteACLJob* ACLJobs::deleteACL( KIO::Slave* slave, const KURL& url, const TQString& user )
{
- QByteArray packedArgs;
- QDataStream stream( packedArgs, IO_WriteOnly );
+ TQByteArray packedArgs;
+ TQDataStream stream( packedArgs, IO_WriteOnly );
stream << (int)'A' << (int)'D' << url << user;
ACLJobs::DeleteACLJob* job = new ACLJobs::DeleteACLJob( url, user, packedArgs, false );
@@ -144,8 +144,8 @@ ACLJobs::DeleteACLJob* ACLJobs::deleteACL( KIO::Slave* slave, const KURL& url, c
ACLJobs::GetACLJob* ACLJobs::getACL( KIO::Slave* slave, const KURL& url )
{
- QByteArray packedArgs;
- QDataStream stream( packedArgs, IO_WriteOnly );
+ TQByteArray packedArgs;
+ TQDataStream stream( packedArgs, IO_WriteOnly );
stream << (int)'A' << (int)'G' << url;
ACLJobs::GetACLJob* job = new ACLJobs::GetACLJob( url, packedArgs, false );
@@ -155,8 +155,8 @@ ACLJobs::GetACLJob* ACLJobs::getACL( KIO::Slave* slave, const KURL& url )
ACLJobs::GetUserRightsJob* ACLJobs::getUserRights( KIO::Slave* slave, const KURL& url )
{
- QByteArray packedArgs;
- QDataStream stream( packedArgs, IO_WriteOnly );
+ TQByteArray packedArgs;
+ TQDataStream stream( packedArgs, IO_WriteOnly );
stream << (int)'A' << (int)'M' << url;
ACLJobs::GetUserRightsJob* job = new ACLJobs::GetUserRightsJob( url, packedArgs, false );
@@ -164,43 +164,43 @@ ACLJobs::GetUserRightsJob* ACLJobs::getUserRights( KIO::Slave* slave, const KURL
return job;
}
-ACLJobs::GetACLJob::GetACLJob( const KURL& url, const QByteArray &packedArgs,
+ACLJobs::GetACLJob::GetACLJob( const KURL& url, const TQByteArray &packedArgs,
bool showProgressInfo )
: KIO::SimpleJob( url, KIO::CMD_SPECIAL, packedArgs, showProgressInfo )
{
- connect( this, SIGNAL(infoMessage(KIO::Job*,const QString&)),
- SLOT(slotInfoMessage(KIO::Job*,const QString&)) );
+ connect( this, TQT_SIGNAL(infoMessage(KIO::Job*,const TQString&)),
+ TQT_SLOT(slotInfoMessage(KIO::Job*,const TQString&)) );
}
-void ACLJobs::GetACLJob::slotInfoMessage( KIO::Job*, const QString& str )
+void ACLJobs::GetACLJob::slotInfoMessage( KIO::Job*, const TQString& str )
{
// Parse the result
- QStringList lst = QStringList::split( "\"", str, true );
+ TQStringList lst = TQStringList::split( "\"", str, true );
while ( lst.count() >= 2 ) // we take items 2 by 2
{
- QString user = lst.front(); lst.pop_front();
- QString imapRights = lst.front(); lst.pop_front();
+ TQString user = lst.front(); lst.pop_front();
+ TQString imapRights = lst.front(); lst.pop_front();
unsigned int perm = IMAPRightsToPermission( imapRights, url(), user );
m_entries.append( ACLListEntry( user, imapRights, perm ) );
}
}
-ACLJobs::GetUserRightsJob::GetUserRightsJob( const KURL& url, const QByteArray &packedArgs,
+ACLJobs::GetUserRightsJob::GetUserRightsJob( const KURL& url, const TQByteArray &packedArgs,
bool showProgressInfo )
: KIO::SimpleJob( url, KIO::CMD_SPECIAL, packedArgs, showProgressInfo )
{
- connect( this, SIGNAL(infoMessage(KIO::Job*,const QString&)),
- SLOT(slotInfoMessage(KIO::Job*,const QString&)) );
+ connect( this, TQT_SIGNAL(infoMessage(KIO::Job*,const TQString&)),
+ TQT_SLOT(slotInfoMessage(KIO::Job*,const TQString&)) );
}
-void ACLJobs::GetUserRightsJob::slotInfoMessage( KIO::Job*, const QString& str )
+void ACLJobs::GetUserRightsJob::slotInfoMessage( KIO::Job*, const TQString& str )
{
// Parse the result
- m_permissions = IMAPRightsToPermission( str, url(), QString::null );
+ m_permissions = IMAPRightsToPermission( str, url(), TQString::null );
}
-ACLJobs::DeleteACLJob::DeleteACLJob( const KURL& url, const QString& userId,
- const QByteArray &packedArgs,
+ACLJobs::DeleteACLJob::DeleteACLJob( const KURL& url, const TQString& userId,
+ const TQByteArray &packedArgs,
bool showProgressInfo )
: KIO::SimpleJob( url, KIO::CMD_SPECIAL, packedArgs, showProgressInfo ),
mUserId( userId )
@@ -214,7 +214,7 @@ ACLJobs::MultiSetACLJob::MultiSetACLJob( KIO::Slave* slave, const KURL& url, con
mSlave( slave ),
mUrl( url ), mACLList( acl ), mACLListIterator( mACLList.begin() )
{
- QTimer::singleShot(0, this, SLOT(slotStart()));
+ TQTimer::singleShot(0, this, TQT_SLOT(slotStart()));
}
void ACLJobs::MultiSetACLJob::slotStart()
diff --git a/kmail/acljobs.h b/kmail/acljobs.h
index 0d4a731dc..7abc8065b 100644
--- a/kmail/acljobs.h
+++ b/kmail/acljobs.h
@@ -33,22 +33,22 @@
#define KMACLJOBS_H
#include <kio/job.h>
-#include <qvaluevector.h>
+#include <tqvaluevector.h>
namespace KMail {
/// One entry in the ACL list: user and permissions
struct ACLListEntry {
ACLListEntry() {} // for QValueVector
- ACLListEntry( const QString& u, const QString& irl, int p )
+ ACLListEntry( const TQString& u, const TQString& irl, int p )
: userId( u ), internalRightsList( irl ), permissions( p ), changed( false ) {}
- QString userId;
- QString internalRightsList; ///< protocol-dependent string (e.g. IMAP rights list)
+ TQString userId;
+ TQString internalRightsList; ///< protocol-dependent string (e.g. IMAP rights list)
int permissions; ///< based on the ACLPermissions enum
bool changed; ///< special flag for KMFolderCachedImap
};
- typedef QValueVector<ACLListEntry> ACLList;
+ typedef TQValueVector<ACLListEntry> ACLList;
/**
* This namespace contains functions that return jobs for ACL operations.
@@ -78,11 +78,11 @@ namespace ACLJobs {
All = List | Read | WriteFlags | Insert | Post | Create | Delete | Administer | WriteSeenFlag
};
/// Set the permissions for a given user on a given url
- KIO::SimpleJob* setACL( KIO::Slave* slave, const KURL& url, const QString& user, unsigned int permissions );
+ KIO::SimpleJob* setACL( KIO::Slave* slave, const KURL& url, const TQString& user, unsigned int permissions );
class DeleteACLJob;
/// Delete the permissions for a given user on a given url
- DeleteACLJob* deleteACL( KIO::Slave* slave, const KURL& url, const QString& user );
+ DeleteACLJob* deleteACL( KIO::Slave* slave, const KURL& url, const TQString& user );
class GetACLJob;
/// List all ACLs for a given url
@@ -101,13 +101,13 @@ namespace ACLJobs {
{
Q_OBJECT
public:
- GetACLJob( const KURL& url, const QByteArray &packedArgs,
+ GetACLJob( const KURL& url, const TQByteArray &packedArgs,
bool showProgressInfo );
const ACLList& entries() const { return m_entries; }
protected slots:
- void slotInfoMessage( KIO::Job*, const QString& );
+ void slotInfoMessage( KIO::Job*, const TQString& );
private:
ACLList m_entries;
};
@@ -117,12 +117,12 @@ namespace ACLJobs {
{
Q_OBJECT
public:
- GetUserRightsJob( const KURL& url, const QByteArray &packedArgs,
+ GetUserRightsJob( const KURL& url, const TQByteArray &packedArgs,
bool showProgressInfo );
unsigned int permissions() const { return m_permissions; }
protected slots:
- void slotInfoMessage( KIO::Job*, const QString& );
+ void slotInfoMessage( KIO::Job*, const TQString& );
private:
unsigned int m_permissions;
};
@@ -133,14 +133,14 @@ namespace ACLJobs {
{
Q_OBJECT
public:
- DeleteACLJob( const KURL& url, const QString& userId,
- const QByteArray &packedArgs,
+ DeleteACLJob( const KURL& url, const TQString& userId,
+ const TQByteArray &packedArgs,
bool showProgressInfo );
- QString userId() const { return mUserId; }
+ TQString userId() const { return mUserId; }
private:
- QString mUserId;
+ TQString mUserId;
};
/// Set and delete a list of permissions for different users on a given url
@@ -153,7 +153,7 @@ namespace ACLJobs {
signals:
// Emitted when a given user's permissions were successfully changed.
// This allows the caller to keep track of what exactly was done (and handle errors better)
- void aclChanged( const QString& userId, int permissions );
+ void aclChanged( const TQString& userId, int permissions );
protected slots:
virtual void slotStart();
@@ -168,7 +168,7 @@ namespace ACLJobs {
#ifndef NDEBUG
- QString permissionsToString( unsigned int permissions );
+ TQString permissionsToString( unsigned int permissions );
#endif
}
diff --git a/kmail/actionscheduler.cpp b/kmail/actionscheduler.cpp
index 3d92cd7a1..0af6cdd4f 100644
--- a/kmail/actionscheduler.cpp
+++ b/kmail/actionscheduler.cpp
@@ -46,23 +46,23 @@
#include "accountmanager.h"
using KMail::AccountManager;
-#include <qtimer.h>
+#include <tqtimer.h>
#include <kconfig.h>
#include <kstandarddirs.h>
using namespace KMail;
-typedef QPtrList<KMMsgBase> KMMessageList;
+typedef TQPtrList<KMMsgBase> KMMessageList;
KMFolderMgr* ActionScheduler::tempFolderMgr = 0;
int ActionScheduler::refCount = 0;
int ActionScheduler::count = 0;
-QValueList<ActionScheduler*> *ActionScheduler::schedulerList = 0;
+TQValueList<ActionScheduler*> *ActionScheduler::schedulerList = 0;
bool ActionScheduler::sEnabled = false;
bool ActionScheduler::sEnabledChecked = false;
ActionScheduler::ActionScheduler(KMFilterMgr::FilterSet set,
- QValueList<KMFilter*> filters,
+ TQValueList<KMFilter*> filters,
KMHeaders *headers,
KMFolder *srcFolder)
:mSet( set ), mHeaders( headers )
@@ -81,22 +81,22 @@ ActionScheduler::ActionScheduler(KMFilterMgr::FilterSet set,
mAccount = false;
lastCommand = 0;
lastJob = 0;
- finishTimer = new QTimer( this, "finishTimer" );
- connect( finishTimer, SIGNAL(timeout()), this, SLOT(finish()));
- fetchMessageTimer = new QTimer( this, "fetchMessageTimer" );
- connect( fetchMessageTimer, SIGNAL(timeout()), this, SLOT(fetchMessage()));
- tempCloseFoldersTimer = new QTimer( this, "tempCloseFoldersTimer" );
- connect( tempCloseFoldersTimer, SIGNAL(timeout()), this, SLOT(tempCloseFolders()));
- processMessageTimer = new QTimer( this, "processMessageTimer" );
- connect( processMessageTimer, SIGNAL(timeout()), this, SLOT(processMessage()));
- filterMessageTimer = new QTimer( this, "filterMessageTimer" );
- connect( filterMessageTimer, SIGNAL(timeout()), this, SLOT(filterMessage()));
- timeOutTimer = new QTimer( this, "timeOutTimer" );
- connect( timeOutTimer, SIGNAL(timeout()), this, SLOT(timeOut()));
- fetchTimeOutTimer = new QTimer( this, "fetchTimeOutTimer" );
- connect( fetchTimeOutTimer, SIGNAL(timeout()), this, SLOT(fetchTimeOut()));
-
- QValueList<KMFilter*>::Iterator it = filters.begin();
+ finishTimer = new TQTimer( this, "finishTimer" );
+ connect( finishTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(finish()));
+ fetchMessageTimer = new TQTimer( this, "fetchMessageTimer" );
+ connect( fetchMessageTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(fetchMessage()));
+ tempCloseFoldersTimer = new TQTimer( this, "tempCloseFoldersTimer" );
+ connect( tempCloseFoldersTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(tempCloseFolders()));
+ processMessageTimer = new TQTimer( this, "processMessageTimer" );
+ connect( processMessageTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(processMessage()));
+ filterMessageTimer = new TQTimer( this, "filterMessageTimer" );
+ connect( filterMessageTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(filterMessage()));
+ timeOutTimer = new TQTimer( this, "timeOutTimer" );
+ connect( timeOutTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(timeOut()));
+ fetchTimeOutTimer = new TQTimer( this, "fetchTimeOutTimer" );
+ connect( fetchTimeOutTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(fetchTimeOut()));
+
+ TQValueList<KMFilter*>::Iterator it = filters.begin();
for (; it != filters.end(); ++it)
mFilters.append( **it );
mDestFolder = 0;
@@ -104,7 +104,7 @@ ActionScheduler::ActionScheduler(KMFilterMgr::FilterSet set,
mDeleteSrcFolder = false;
setSourceFolder( srcFolder );
} else {
- QString tmpName;
+ TQString tmpName;
tmpName.setNum( count );
if (!tempFolderMgr)
tempFolderMgr = new KMFolderMgr(locateLocal("data","kmail/filter"));
@@ -114,7 +114,7 @@ ActionScheduler::ActionScheduler(KMFilterMgr::FilterSet set,
setSourceFolder( tempFolder );
}
if (!schedulerList)
- schedulerList = new QValueList<ActionScheduler*>;
+ schedulerList = new TQValueList<ActionScheduler*>;
schedulerList->append( this );
}
@@ -122,10 +122,10 @@ ActionScheduler::~ActionScheduler()
{
schedulerList->remove( this );
tempCloseFolders();
- disconnect( mSrcFolder, SIGNAL(closed()),
- this, SLOT(folderClosedOrExpunged()) );
- disconnect( mSrcFolder, SIGNAL(expunged(KMFolder*)),
- this, SLOT(folderClosedOrExpunged()) );
+ disconnect( mSrcFolder, TQT_SIGNAL(closed()),
+ this, TQT_SLOT(folderClosedOrExpunged()) );
+ disconnect( mSrcFolder, TQT_SIGNAL(expunged(KMFolder*)),
+ this, TQT_SLOT(folderClosedOrExpunged()) );
mSrcFolder->close("actionschedsrc");
if (mDeleteSrcFolder)
@@ -157,12 +157,12 @@ void ActionScheduler::setSourceFolder( KMFolder *srcFolder )
{
srcFolder->open("actionschedsrc");
if (mSrcFolder) {
- disconnect( mSrcFolder, SIGNAL(msgAdded(KMFolder*, Q_UINT32)),
- this, SLOT(msgAdded(KMFolder*, Q_UINT32)) );
- disconnect( mSrcFolder, SIGNAL(closed()),
- this, SLOT(folderClosedOrExpunged()) );
- disconnect( mSrcFolder, SIGNAL(expunged(KMFolder*)),
- this, SLOT(folderClosedOrExpunged()) );
+ disconnect( mSrcFolder, TQT_SIGNAL(msgAdded(KMFolder*, Q_UINT32)),
+ this, TQT_SLOT(msgAdded(KMFolder*, Q_UINT32)) );
+ disconnect( mSrcFolder, TQT_SIGNAL(closed()),
+ this, TQT_SLOT(folderClosedOrExpunged()) );
+ disconnect( mSrcFolder, TQT_SIGNAL(expunged(KMFolder*)),
+ this, TQT_SLOT(folderClosedOrExpunged()) );
mSrcFolder->close("actionschedsrc");
}
mSrcFolder = srcFolder;
@@ -170,21 +170,21 @@ void ActionScheduler::setSourceFolder( KMFolder *srcFolder )
for (i = 0; i < mSrcFolder->count(); ++i)
enqueue( mSrcFolder->getMsgBase( i )->getMsgSerNum() );
if (mSrcFolder) {
- connect( mSrcFolder, SIGNAL(msgAdded(KMFolder*, Q_UINT32)),
- this, SLOT(msgAdded(KMFolder*, Q_UINT32)) );
- connect( mSrcFolder, SIGNAL(closed()),
- this, SLOT(folderClosedOrExpunged()) );
- connect( mSrcFolder, SIGNAL(expunged(KMFolder*)),
- this, SLOT(folderClosedOrExpunged()) );
+ connect( mSrcFolder, TQT_SIGNAL(msgAdded(KMFolder*, Q_UINT32)),
+ this, TQT_SLOT(msgAdded(KMFolder*, Q_UINT32)) );
+ connect( mSrcFolder, TQT_SIGNAL(closed()),
+ this, TQT_SLOT(folderClosedOrExpunged()) );
+ connect( mSrcFolder, TQT_SIGNAL(expunged(KMFolder*)),
+ this, TQT_SLOT(folderClosedOrExpunged()) );
}
}
-void ActionScheduler::setFilterList( QValueList<KMFilter*> filters )
+void ActionScheduler::setFilterList( TQValueList<KMFilter*> filters )
{
mFiltersAreQueued = true;
mQueuedFilters.clear();
- QValueList<KMFilter*>::Iterator it = filters.begin();
+ TQValueList<KMFilter*>::Iterator it = filters.begin();
for (; it != filters.end(); ++it)
mQueuedFilters.append( **it );
if (!mExecuting) {
@@ -221,7 +221,7 @@ int ActionScheduler::tempOpenFolder( KMFolder* aFolder )
void ActionScheduler::tempCloseFolders()
{
// close temp opened folders
- QValueListConstIterator<QGuardedPtr<KMFolder> > it;
+ TQValueListConstIterator<TQGuardedPtr<KMFolder> > it;
for (it = mOpenFolders.begin(); it != mOpenFolders.end(); ++it) {
KMFolder *folder = *it;
if (folder)
@@ -230,17 +230,17 @@ void ActionScheduler::tempCloseFolders()
mOpenFolders.clear();
}
-void ActionScheduler::execFilters(const QValueList<Q_UINT32> serNums)
+void ActionScheduler::execFilters(const TQValueList<Q_UINT32> serNums)
{
- QValueListConstIterator<Q_UINT32> it;
+ TQValueListConstIterator<Q_UINT32> it;
for (it = serNums.begin(); it != serNums.end(); ++it)
execFilters( *it );
}
-void ActionScheduler::execFilters(const QPtrList<KMMsgBase> msgList)
+void ActionScheduler::execFilters(const TQPtrList<KMMsgBase> msgList)
{
KMMsgBase *msgBase;
- QPtrList<KMMsgBase> list = msgList;
+ TQPtrList<KMMsgBase> list = msgList;
for (msgBase = list.first(); msgBase; msgBase = list.next())
execFilters( msgBase->getMsgSerNum() );
}
@@ -380,7 +380,7 @@ void ActionScheduler::finish()
void ActionScheduler::fetchMessage()
{
- QValueListIterator<Q_UINT32> mFetchMessageIt = mFetchSerNums.begin();
+ TQValueListIterator<Q_UINT32> mFetchMessageIt = mFetchSerNums.begin();
while (mFetchMessageIt != mFetchSerNums.end()) {
if (!MessageProperty::transferInProgress(*mFetchMessageIt))
break;
@@ -419,11 +419,11 @@ void ActionScheduler::fetchMessage()
if (msg && msg->isComplete()) {
messageFetched( msg );
} else if (msg) {
- fetchTimeOutTime = QTime::currentTime();
+ fetchTimeOutTime = TQTime::currentTime();
fetchTimeOutTimer->start( 60 * 1000, true );
FolderJob *job = msg->parent()->createJob( msg );
- connect( job, SIGNAL(messageRetrieved( KMMessage* )),
- SLOT(messageFetched( KMMessage* )) );
+ connect( job, TQT_SIGNAL(messageRetrieved( KMMessage* )),
+ TQT_SLOT(messageFetched( KMMessage* )) );
lastJob = job;
job->start();
} else {
@@ -450,7 +450,7 @@ void ActionScheduler::messageFetched( KMMessage *msg )
// Is the new serial number being set correctly then?
if ((mSet & KMFilterMgr::Explicit) ||
(msg->headerField( "X-KMail-Filtered" ).isEmpty())) {
- QString serNumS;
+ TQString serNumS;
serNumS.setNum( msg->getMsgSerNum() );
KMMessage *newMsg = new KMMessage;
newMsg->fromString(msg->asString());
@@ -563,8 +563,8 @@ void ActionScheduler::processMessage()
}
if (msg) {
FolderJob *job = msg->parent()->createJob( msg );
- connect( job, SIGNAL(messageRetrieved( KMMessage* )),
- SLOT(messageRetrieved( KMMessage* )) );
+ connect( job, TQT_SIGNAL(messageRetrieved( KMMessage* )),
+ TQT_SLOT(messageRetrieved( KMMessage* )) );
job->start();
} else {
mExecuting = false;
@@ -595,7 +595,7 @@ void ActionScheduler::filterMessage()
// filter is applicable
if ( FilterLog::instance()->isLogging() ) {
- QString logText( i18n( "<b>Evaluating filter rules:</b> " ) );
+ TQString logText( i18n( "<b>Evaluating filter rules:</b> " ) );
logText.append( (*mFilterIt).pattern()->asString() );
FilterLog::instance()->add( logText, FilterLog::patternDesc );
}
@@ -624,7 +624,7 @@ void ActionScheduler::actionMessage(KMFilterAction::ReturnCode res)
KMMessage *msg = message( *mMessageIt );
if (msg) {
if ( FilterLog::instance()->isLogging() ) {
- QString logText( i18n( "<b>Applying filter action:</b> %1" )
+ TQString logText( i18n( "<b>Applying filter action:</b> %1" )
.arg( mFilterAction->displayString() ) );
FilterLog::instance()->add( logText, FilterLog::appliedAction );
}
@@ -651,7 +651,7 @@ void ActionScheduler::moveMessage()
MessageProperty::setTransferInProgress( *mMessageIt, false, true );
KMMessage *msg = message( *mMessageIt );
KMFolder *folder = MessageProperty::filterFolder( *mMessageIt );
- QString serNumS = msg->headerField( "X-KMail-Filtered" );
+ TQString serNumS = msg->headerField( "X-KMail-Filtered" );
if (!serNumS.isEmpty())
mOriginalSerNum = serNumS.toUInt();
else
@@ -687,10 +687,10 @@ void ActionScheduler::moveMessage()
if (msg && folder && kmkernel->folderIsTrash( folder ))
KMFilterAction::sendMDN( msg, KMime::MDN::Deleted );
- timeOutTime = QTime::currentTime();
+ timeOutTime = TQTime::currentTime();
KMCommand *cmd = new KMMoveCommand( folder, msg );
- connect( cmd, SIGNAL( completed( KMCommand * ) ),
- this, SLOT( moveMessageFinished( KMCommand * ) ) );
+ connect( cmd, TQT_SIGNAL( completed( KMCommand * ) ),
+ this, TQT_SLOT( moveMessageFinished( KMCommand * ) ) );
cmd->start();
// sometimes the move command doesn't complete so time out after a minute
// and move onto the next message
@@ -727,16 +727,16 @@ void ActionScheduler::moveMessageFinished( KMCommand *command )
if (mResult == ResultOk) {
mExecutingLock = false;
if (cmd)
- connect( cmd, SIGNAL( completed( KMCommand * ) ),
- this, SLOT( processMessage() ) );
+ connect( cmd, TQT_SIGNAL( completed( KMCommand * ) ),
+ this, TQT_SLOT( processMessage() ) );
else
processMessageTimer->start( 0, true );
} else {
// Note: An alternative to consider is just calling
// finishTimer->start and returning
if (cmd)
- connect( cmd, SIGNAL( completed( KMCommand * ) ),
- this, SLOT( finish() ) );
+ connect( cmd, TQT_SIGNAL( completed( KMCommand * ) ),
+ this, TQT_SLOT( finish() ) );
else
finishTimer->start( 0, true );
}
@@ -758,8 +758,8 @@ void ActionScheduler::timeOut()
// Note: This is a good place for a debug statement
assert( lastCommand );
// sometimes imap jobs seem to just stall so give up and move on
- disconnect( lastCommand, SIGNAL( completed( KMCommand * ) ),
- this, SLOT( moveMessageFinished( KMCommand * ) ) );
+ disconnect( lastCommand, TQT_SIGNAL( completed( KMCommand * ) ),
+ this, TQT_SLOT( moveMessageFinished( KMCommand * ) ) );
lastCommand = 0;
mExecutingLock = false;
mExecuting = false;
@@ -773,41 +773,41 @@ void ActionScheduler::fetchTimeOut()
// Note: This is a good place for a debug statement
assert( lastJob );
// sometimes imap jobs seem to just stall so give up and move on
- disconnect( lastJob, SIGNAL(messageRetrieved( KMMessage* )),
- this, SLOT(messageFetched( KMMessage* )) );
+ disconnect( lastJob, TQT_SIGNAL(messageRetrieved( KMMessage* )),
+ this, TQT_SLOT(messageFetched( KMMessage* )) );
lastJob->kill();
lastJob = 0;
fetchMessageTimer->start( 0, true );
}
-QString ActionScheduler::debug()
+TQString ActionScheduler::debug()
{
- QString res;
- QValueList<ActionScheduler*>::iterator it;
+ TQString res;
+ TQValueList<ActionScheduler*>::iterator it;
int i = 1;
for ( it = schedulerList->begin(); it != schedulerList->end(); ++it ) {
- res.append( QString( "ActionScheduler #%1.\n" ).arg( i ) );
+ res.append( TQString( "ActionScheduler #%1.\n" ).arg( i ) );
if ((*it)->mAccount && kmkernel->find( (*it)->mAccountId )) {
- res.append( QString( "Account %1, Name %2.\n" )
+ res.append( TQString( "Account %1, Name %2.\n" )
.arg( (*it)->mAccountId )
.arg( kmkernel->acctMgr()->find( (*it)->mAccountId )->name() ) );
}
- res.append( QString( "mExecuting %1, " ).arg( (*it)->mExecuting ? "true" : "false" ) );
- res.append( QString( "mExecutingLock %1, " ).arg( (*it)->mExecutingLock ? "true" : "false" ) );
- res.append( QString( "mFetchExecuting %1.\n" ).arg( (*it)->mFetchExecuting ? "true" : "false" ) );
- res.append( QString( "mOriginalSerNum %1.\n" ).arg( (*it)->mOriginalSerNum ) );
- res.append( QString( "mMessageIt %1.\n" ).arg( ((*it)->mMessageIt != 0) ? *(*it)->mMessageIt : 0 ) );
- res.append( QString( "mSerNums count %1, " ).arg( (*it)->mSerNums.count() ) );
- res.append( QString( "mFetchSerNums count %1.\n" ).arg( (*it)->mFetchSerNums.count() ) );
- res.append( QString( "mResult " ) );
+ res.append( TQString( "mExecuting %1, " ).arg( (*it)->mExecuting ? "true" : "false" ) );
+ res.append( TQString( "mExecutingLock %1, " ).arg( (*it)->mExecutingLock ? "true" : "false" ) );
+ res.append( TQString( "mFetchExecuting %1.\n" ).arg( (*it)->mFetchExecuting ? "true" : "false" ) );
+ res.append( TQString( "mOriginalSerNum %1.\n" ).arg( (*it)->mOriginalSerNum ) );
+ res.append( TQString( "mMessageIt %1.\n" ).arg( ((*it)->mMessageIt != 0) ? *(*it)->mMessageIt : 0 ) );
+ res.append( TQString( "mSerNums count %1, " ).arg( (*it)->mSerNums.count() ) );
+ res.append( TQString( "mFetchSerNums count %1.\n" ).arg( (*it)->mFetchSerNums.count() ) );
+ res.append( TQString( "mResult " ) );
if ((*it)->mResult == ResultOk)
- res.append( QString( "ResultOk.\n" ) );
+ res.append( TQString( "ResultOk.\n" ) );
else if ((*it)->mResult == ResultError)
- res.append( QString( "ResultError.\n" ) );
+ res.append( TQString( "ResultError.\n" ) );
else if ((*it)->mResult == ResultCriticalError)
- res.append( QString( "ResultCriticalError.\n" ) );
+ res.append( TQString( "ResultCriticalError.\n" ) );
else
- res.append( QString( "Unknown.\n" ) );
+ res.append( TQString( "Unknown.\n" ) );
++i;
}
diff --git a/kmail/actionscheduler.h b/kmail/actionscheduler.h
index 027bce21c..e785210b6 100644
--- a/kmail/actionscheduler.h
+++ b/kmail/actionscheduler.h
@@ -37,9 +37,9 @@
#include "kmfiltermgr.h" // KMFilterMgr::FilterSet
#include "kmcommands.h"
-#include <qobject.h>
-#include <qguardedptr.h>
-#include <qtimer.h>
+#include <tqobject.h>
+#include <tqguardedptr.h>
+#include <tqtimer.h>
class KMHeaders;
@@ -54,7 +54,7 @@ public:
enum ReturnCode { ResultOk, ResultError, ResultCriticalError };
ActionScheduler(KMFilterMgr::FilterSet set,
- QValueList<KMFilter*> filters,
+ TQValueList<KMFilter*> filters,
KMHeaders *headers = 0,
KMFolder *srcFolder = 0);
~ActionScheduler();
@@ -75,7 +75,7 @@ public:
/** Set a list of filters to work with
The current list will not be updated until the queue
of messages left to process is empty */
- void setFilterList( QValueList<KMFilter*> filters );
+ void setFilterList( TQValueList<KMFilter*> filters );
/** Set the id of the account associated with this scheduler */
void setAccountId( uint id ) { mAccountId = id; mAccount = true; }
@@ -84,12 +84,12 @@ public:
void clearAccountId() { mAccountId = 0; mAccount = false; }
/** Queue a message for filtering */
- void execFilters(const QValueList<Q_UINT32> serNums);
- void execFilters(const QPtrList<KMMsgBase> msgList);
+ void execFilters(const TQValueList<Q_UINT32> serNums);
+ void execFilters(const TQPtrList<KMMsgBase> msgList);
void execFilters(KMMsgBase* msgBase);
void execFilters(Q_UINT32 serNum);
- static QString debug();
+ static TQString debug();
static bool isEnabled();
/** Allow or deny manipulations on the message to be filtered.
@@ -136,19 +136,19 @@ private slots:
void fetchTimeOut();
private:
- static QValueList<ActionScheduler*> *schedulerList; // for debugging
+ static TQValueList<ActionScheduler*> *schedulerList; // for debugging
static KMFolderMgr *tempFolderMgr;
static int refCount, count;
static bool sEnabled, sEnabledChecked;
- QValueListIterator<Q_UINT32> mMessageIt;
- QValueListIterator<KMFilter> mFilterIt;
- QValueList<Q_UINT32> mSerNums, mFetchSerNums;
- QValueList<QGuardedPtr<KMFolder> > mOpenFolders;
- QValueList<KMFilter> mFilters, mQueuedFilters;
+ TQValueListIterator<Q_UINT32> mMessageIt;
+ TQValueListIterator<KMFilter> mFilterIt;
+ TQValueList<Q_UINT32> mSerNums, mFetchSerNums;
+ TQValueList<TQGuardedPtr<KMFolder> > mOpenFolders;
+ TQValueList<KMFilter> mFilters, mQueuedFilters;
KMFilterAction* mFilterAction;
KMFilterMgr::FilterSet mSet;
KMHeaders *mHeaders;
- QGuardedPtr<KMFolder> mSrcFolder, mDestFolder;
+ TQGuardedPtr<KMFolder> mSrcFolder, mDestFolder;
bool mExecuting, mExecutingLock, mFetchExecuting;
bool mUnget, mFetchUnget;
bool mIgnore;
@@ -160,10 +160,10 @@ private:
Q_UINT32 mOriginalSerNum;
bool mDeleteSrcFolder;
ReturnCode mResult;
- QTimer *finishTimer, *fetchMessageTimer, *tempCloseFoldersTimer;
- QTimer *processMessageTimer, *filterMessageTimer;
- QTimer *timeOutTimer, *fetchTimeOutTimer;
- QTime timeOutTime, fetchTimeOutTime;
+ TQTimer *finishTimer, *fetchMessageTimer, *tempCloseFoldersTimer;
+ TQTimer *processMessageTimer, *filterMessageTimer;
+ TQTimer *timeOutTimer, *fetchTimeOutTimer;
+ TQTime timeOutTime, fetchTimeOutTime;
KMCommand *lastCommand;
FolderJob *lastJob;
};
diff --git a/kmail/annotationjobs.cpp b/kmail/annotationjobs.cpp
index 314f01fa4..6b9cd8e86 100644
--- a/kmail/annotationjobs.cpp
+++ b/kmail/annotationjobs.cpp
@@ -35,11 +35,11 @@
using namespace KMail;
KIO::SimpleJob* AnnotationJobs::setAnnotation(
- KIO::Slave* slave, const KURL& url, const QString& entry,
- const QMap<QString,QString>& attributes )
+ KIO::Slave* slave, const KURL& url, const TQString& entry,
+ const TQMap<TQString,TQString>& attributes )
{
- QByteArray packedArgs;
- QDataStream stream( packedArgs, IO_WriteOnly );
+ TQByteArray packedArgs;
+ TQDataStream stream( packedArgs, IO_WriteOnly );
stream << (int)'M' << (int)'S' << url << entry << attributes;
KIO::SimpleJob* job = KIO::special( url, packedArgs, false );
@@ -48,11 +48,11 @@ KIO::SimpleJob* AnnotationJobs::setAnnotation(
}
AnnotationJobs::GetAnnotationJob* AnnotationJobs::getAnnotation(
- KIO::Slave* slave, const KURL& url, const QString& entry,
- const QStringList& attributes )
+ KIO::Slave* slave, const KURL& url, const TQString& entry,
+ const TQStringList& attributes )
{
- QByteArray packedArgs;
- QDataStream stream( packedArgs, IO_WriteOnly );
+ TQByteArray packedArgs;
+ TQDataStream stream( packedArgs, IO_WriteOnly );
stream << (int)'M' << (int)'G' << url << entry << attributes;
GetAnnotationJob* job = new GetAnnotationJob( url, entry, packedArgs, false );
@@ -60,42 +60,42 @@ AnnotationJobs::GetAnnotationJob* AnnotationJobs::getAnnotation(
return job;
}
-AnnotationJobs::GetAnnotationJob::GetAnnotationJob( const KURL& url, const QString& entry,
- const QByteArray &packedArgs,
+AnnotationJobs::GetAnnotationJob::GetAnnotationJob( const KURL& url, const TQString& entry,
+ const TQByteArray &packedArgs,
bool showProgressInfo )
: KIO::SimpleJob( url, KIO::CMD_SPECIAL, packedArgs, showProgressInfo ),
mEntry( entry )
{
- connect( this, SIGNAL(infoMessage(KIO::Job*,const QString&)),
- SLOT(slotInfoMessage(KIO::Job*,const QString&)) );
+ connect( this, TQT_SIGNAL(infoMessage(KIO::Job*,const TQString&)),
+ TQT_SLOT(slotInfoMessage(KIO::Job*,const TQString&)) );
}
-void AnnotationJobs::GetAnnotationJob::slotInfoMessage( KIO::Job*, const QString& str )
+void AnnotationJobs::GetAnnotationJob::slotInfoMessage( KIO::Job*, const TQString& str )
{
// Parse the result
- QStringList lst = QStringList::split( "\r", str );
+ TQStringList lst = TQStringList::split( "\r", str );
while ( lst.count() >= 2 ) // we take items 2 by 2
{
- QString name = lst.front(); lst.pop_front();
- QString value = lst.front(); lst.pop_front();
+ TQString name = lst.front(); lst.pop_front();
+ TQString value = lst.front(); lst.pop_front();
mAnnotations.append( AnnotationAttribute( mEntry, name, value ) );
}
}
AnnotationJobs::MultiGetAnnotationJob::MultiGetAnnotationJob(
- KIO::Slave* slave, const KURL& url, const QStringList& entries, bool showProgressInfo )
+ KIO::Slave* slave, const KURL& url, const TQStringList& entries, bool showProgressInfo )
: KIO::Job( showProgressInfo ),
mSlave( slave ),
mUrl( url ), mEntryList( entries ), mEntryListIterator( mEntryList.begin() )
{
- QTimer::singleShot(0, this, SLOT(slotStart()));
+ TQTimer::singleShot(0, this, TQT_SLOT(slotStart()));
}
void AnnotationJobs::MultiGetAnnotationJob::slotStart()
{
if ( mEntryListIterator != mEntryList.end() ) {
- QStringList attributes;
+ TQStringList attributes;
attributes << "value";
KIO::Job* job = getAnnotation( mSlave, mUrl, *mEntryListIterator, attributes );
addSubjob( job );
@@ -111,8 +111,8 @@ void AnnotationJobs::MultiGetAnnotationJob::slotResult( KIO::Job *job )
return;
}
subjobs.remove( job );
- const QString& entry = *mEntryListIterator;
- QString value;
+ const TQString& entry = *mEntryListIterator;
+ TQString value;
bool found = false;
GetAnnotationJob* getJob = static_cast<GetAnnotationJob *>( job );
const AnnotationList& lst = getJob->annotations();
@@ -130,7 +130,7 @@ void AnnotationJobs::MultiGetAnnotationJob::slotResult( KIO::Job *job )
slotStart();
}
-AnnotationJobs::MultiGetAnnotationJob* AnnotationJobs::multiGetAnnotation( KIO::Slave* slave, const KURL& url, const QStringList& entries )
+AnnotationJobs::MultiGetAnnotationJob* AnnotationJobs::multiGetAnnotation( KIO::Slave* slave, const KURL& url, const TQStringList& entries )
{
return new MultiGetAnnotationJob( slave, url, entries, false /*showProgressInfo*/ );
}
@@ -143,7 +143,7 @@ AnnotationJobs::MultiSetAnnotationJob::MultiSetAnnotationJob(
mSlave( slave ),
mUrl( url ), mAnnotationList( annotations ), mAnnotationListIterator( mAnnotationList.begin() )
{
- QTimer::singleShot(0, this, SLOT(slotStart()));
+ TQTimer::singleShot(0, this, TQT_SLOT(slotStart()));
}
@@ -153,7 +153,7 @@ void AnnotationJobs::MultiSetAnnotationJob::slotStart()
const AnnotationAttribute& attr = *mAnnotationListIterator;
// setAnnotation can set multiple attributes for a given entry.
// So in theory we could group entries coming from our list. Bah.
- QMap<QString, QString> attributes;
+ TQMap<TQString, TQString> attributes;
attributes.insert( attr.name, attr.value );
kdDebug() << k_funcinfo << " setting annotation " << attr.entry << " " << attr.name << " " << attr.value << endl;
KIO::Job* job = setAnnotation( mSlave, mUrl, attr.entry, attributes );
@@ -187,8 +187,8 @@ AnnotationJobs::MultiSetAnnotationJob* AnnotationJobs::multiSetAnnotation(
AnnotationJobs::MultiUrlGetAnnotationJob::MultiUrlGetAnnotationJob( KIO::Slave* slave,
const KURL& baseUrl,
- const QStringList& paths,
- const QString& annotation )
+ const TQStringList& paths,
+ const TQString& annotation )
: KIO::Job( false ),
mSlave( slave ),
mUrl( baseUrl ),
@@ -196,14 +196,14 @@ AnnotationJobs::MultiUrlGetAnnotationJob::MultiUrlGetAnnotationJob( KIO::Slave*
mPathListIterator( mPathList.begin() ),
mAnnotation( annotation )
{
- QTimer::singleShot(0, this, SLOT(slotStart()));
+ TQTimer::singleShot(0, this, TQT_SLOT(slotStart()));
}
void AnnotationJobs::MultiUrlGetAnnotationJob::slotStart()
{
if ( mPathListIterator != mPathList.end() ) {
- QStringList attributes;
+ TQStringList attributes;
attributes << "value";
KURL url(mUrl);
url.setPath( *mPathListIterator );
@@ -221,7 +221,7 @@ void AnnotationJobs::MultiUrlGetAnnotationJob::slotResult( KIO::Job *job )
return;
}
subjobs.remove( job );
- const QString& path = *mPathListIterator;
+ const TQString& path = *mPathListIterator;
GetAnnotationJob* getJob = static_cast<GetAnnotationJob *>( job );
const AnnotationList& lst = getJob->annotations();
for ( unsigned int i = 0 ; i < lst.size() ; ++ i ) {
@@ -236,15 +236,15 @@ void AnnotationJobs::MultiUrlGetAnnotationJob::slotResult( KIO::Job *job )
slotStart();
}
-QMap<QString, QString> AnnotationJobs::MultiUrlGetAnnotationJob::annotations() const
+TQMap<TQString, TQString> AnnotationJobs::MultiUrlGetAnnotationJob::annotations() const
{
return mAnnotations;
}
AnnotationJobs::MultiUrlGetAnnotationJob* AnnotationJobs::multiUrlGetAnnotation( KIO::Slave* slave,
const KURL& baseUrl,
- const QStringList& paths,
- const QString& annotation )
+ const TQStringList& paths,
+ const TQString& annotation )
{
return new MultiUrlGetAnnotationJob( slave, baseUrl, paths, annotation );
}
diff --git a/kmail/annotationjobs.h b/kmail/annotationjobs.h
index 5375eeeda..2c6ca984d 100644
--- a/kmail/annotationjobs.h
+++ b/kmail/annotationjobs.h
@@ -33,21 +33,21 @@
#define ANNOTATIONJOBS_H
#include <kio/job.h>
-#include <qvaluevector.h>
+#include <tqvaluevector.h>
namespace KMail {
/// One entry in the annotation list: attribute name and attribute value
struct AnnotationAttribute {
AnnotationAttribute() {} // for QValueVector
- AnnotationAttribute( const QString& e, const QString& n, const QString& v )
+ AnnotationAttribute( const TQString& e, const TQString& n, const TQString& v )
: entry( e ), name( n ), value( v ) {}
- QString entry; // e.g. /comment
- QString name; // e.g. value.shared
- QString value;
+ TQString entry; // e.g. /comment
+ TQString name; // e.g. value.shared
+ TQString value;
};
-typedef QValueVector<AnnotationAttribute> AnnotationList;
+typedef TQValueVector<AnnotationAttribute> AnnotationList;
/**
* This namespace contains functions that return jobs for annotation operations.
@@ -65,8 +65,8 @@ namespace AnnotationJobs {
* @param entry the name of the annotation entry
* @param attributes attribute name+value pairs
*/
-KIO::SimpleJob* setAnnotation( KIO::Slave* slave, const KURL& url, const QString& entry,
- const QMap<QString,QString>& attributes );
+KIO::SimpleJob* setAnnotation( KIO::Slave* slave, const KURL& url, const TQString& entry,
+ const TQMap<TQString,TQString>& attributes );
class MultiSetAnnotationJob;
/**
@@ -82,15 +82,15 @@ class GetAnnotationJob;
* @param entry the name of the annotation entry
* @param attributes attribute names
*/
-GetAnnotationJob* getAnnotation( KIO::Slave* slave, const KURL& url, const QString& entry,
- const QStringList& attributes );
+GetAnnotationJob* getAnnotation( KIO::Slave* slave, const KURL& url, const TQString& entry,
+ const TQStringList& attributes );
class MultiGetAnnotationJob;
/**
* Get multiple annotation entries
* Currently we assume we want to get the "value" for each, to simplify the data structure.
*/
-MultiGetAnnotationJob* multiGetAnnotation( KIO::Slave* slave, const KURL& url, const QStringList& entries );
+MultiGetAnnotationJob* multiGetAnnotation( KIO::Slave* slave, const KURL& url, const TQStringList& entries );
class MultiUrlGetAnnotationJob;
/**
@@ -100,8 +100,8 @@ class MultiUrlGetAnnotationJob;
*/
MultiUrlGetAnnotationJob* multiUrlGetAnnotation( KIO::Slave* slave,
const KURL& baseUrl,
- const QStringList& paths,
- const QString& annotation );
+ const TQStringList& paths,
+ const TQString& annotation );
/// for getAnnotation()
@@ -109,16 +109,16 @@ class GetAnnotationJob : public KIO::SimpleJob
{
Q_OBJECT
public:
- GetAnnotationJob( const KURL& url, const QString& entry, const QByteArray &packedArgs,
+ GetAnnotationJob( const KURL& url, const TQString& entry, const TQByteArray &packedArgs,
bool showProgressInfo );
const AnnotationList& annotations() const { return mAnnotations; }
protected slots:
- void slotInfoMessage( KIO::Job*, const QString& );
+ void slotInfoMessage( KIO::Job*, const TQString& );
private:
AnnotationList mAnnotations;
- QString mEntry;
+ TQString mEntry;
};
/// for multiGetAnnotation
@@ -127,11 +127,11 @@ class MultiGetAnnotationJob : public KIO::Job
Q_OBJECT
public:
- MultiGetAnnotationJob( KIO::Slave* slave, const KURL& url, const QStringList& entries, bool showProgressInfo );
+ MultiGetAnnotationJob( KIO::Slave* slave, const KURL& url, const TQStringList& entries, bool showProgressInfo );
signals:
// Emitted when a given annotation was found - or not found
- void annotationResult( const QString& entry, const QString& value, bool found );
+ void annotationResult( const TQString& entry, const TQString& value, bool found );
protected slots:
virtual void slotStart();
@@ -140,8 +140,8 @@ protected slots:
private:
KIO::Slave* mSlave;
const KURL mUrl;
- const QStringList mEntryList;
- QStringList::const_iterator mEntryListIterator;
+ const TQStringList mEntryList;
+ TQStringList::const_iterator mEntryListIterator;
};
/// for multiUrlGetAnnotation
@@ -151,9 +151,9 @@ class MultiUrlGetAnnotationJob : public KIO::Job
public:
MultiUrlGetAnnotationJob( KIO::Slave* slave, const KURL& baseUrl,
- const QStringList& paths, const QString& annotation );
+ const TQStringList& paths, const TQString& annotation );
- QMap<QString, QString> annotations() const;
+ TQMap<TQString, TQString> annotations() const;
protected slots:
virtual void slotStart();
@@ -162,10 +162,10 @@ protected slots:
private:
KIO::Slave* mSlave;
const KURL mUrl;
- const QStringList mPathList;
- QStringList::const_iterator mPathListIterator;
- QString mAnnotation;
- QMap<QString, QString> mAnnotations;
+ const TQStringList mPathList;
+ TQStringList::const_iterator mPathListIterator;
+ TQString mAnnotation;
+ TQMap<TQString, TQString> mAnnotations;
};
/// for multiSetAnnotation
@@ -178,7 +178,7 @@ public:
signals:
// Emitted when a given annotation was successfully changed
- void annotationChanged( const QString& entry, const QString& attribute, const QString& value );
+ void annotationChanged( const TQString& entry, const TQString& attribute, const TQString& value );
protected slots:
virtual void slotStart();
diff --git a/kmail/antispamconfig.cpp b/kmail/antispamconfig.cpp
index 448bd9ac1..9a5b4a23e 100644
--- a/kmail/antispamconfig.cpp
+++ b/kmail/antispamconfig.cpp
@@ -59,13 +59,13 @@ void AntiSpamConfig::readConfig()
KConfigGroup general( &config, "General" );
unsigned int totalTools = general.readUnsignedNumEntry( "tools", 0 );
for ( unsigned int i = 1; i <= totalTools; ++i ) {
- KConfigGroup tool( &config, QString("Spamtool #%1").arg( i ) );
+ KConfigGroup tool( &config, TQString("Spamtool #%1").arg( i ) );
if ( tool.hasKey( "ScoreHeader" ) ) {
- QString name = tool.readEntry( "ScoreName" );
- QCString header = tool.readEntry( "ScoreHeader" ).latin1();
- QCString type = tool.readEntry( "ScoreType" ).latin1();
- QString score = tool.readEntryUntranslated( "ScoreValueRegexp" );
- QString threshold = tool.readEntryUntranslated( "ScoreThresholdRegexp" );
+ TQString name = tool.readEntry( "ScoreName" );
+ TQCString header = tool.readEntry( "ScoreHeader" ).latin1();
+ TQCString type = tool.readEntry( "ScoreType" ).latin1();
+ TQString score = tool.readEntryUntranslated( "ScoreValueRegexp" );
+ TQString threshold = tool.readEntryUntranslated( "ScoreThresholdRegexp" );
SpamAgentTypes typeE = SpamAgentNone;
if ( kasciistricmp( type.data(), "bool" ) == 0 )
typeE = SpamAgentBool;
@@ -75,20 +75,20 @@ void AntiSpamConfig::readConfig()
typeE = SpamAgentFloatLarge;
else if ( kasciistricmp( type.data(), "adjusted" ) == 0 )
typeE = SpamAgentAdjustedFloat;
- mAgents.append( SpamAgent( name, typeE, header, QRegExp( score ),
- QRegExp( threshold ) ) );
+ mAgents.append( SpamAgent( name, typeE, header, TQRegExp( score ),
+ TQRegExp( threshold ) ) );
}
}
}
const SpamAgents AntiSpamConfig::uniqueAgents() const
{
- QStringList seenAgents;
+ TQStringList seenAgents;
SpamAgents agents;
SpamAgents::ConstIterator it( mAgents.begin() );
SpamAgents::ConstIterator end( mAgents.end() );
for ( ; it != end ; ++it ) {
- const QString agent( ( *it ).name() );
+ const TQString agent( ( *it ).name() );
if ( seenAgents.find( agent ) == seenAgents.end() ) {
agents.append( *it );
seenAgents.append( agent );
diff --git a/kmail/antispamconfig.h b/kmail/antispamconfig.h
index 64394fe97..b4e73041e 100644
--- a/kmail/antispamconfig.h
+++ b/kmail/antispamconfig.h
@@ -34,8 +34,8 @@
#ifndef __KMAIL_ANTISPAMCONFIG_H__
#define __KMAIL_ANTISPAMCONFIG_H__
-#include <qvaluelist.h>
-#include <qregexp.h>
+#include <tqvaluelist.h>
+#include <tqregexp.h>
class QString;
class QCString;
@@ -54,26 +54,26 @@ namespace KMail {
class SpamAgent {
public:
SpamAgent() : mType( SpamAgentNone ) {}
- SpamAgent( const QString & name, SpamAgentTypes type, const QCString & field,
- const QRegExp & score, const QRegExp & threshold )
+ SpamAgent( const TQString & name, SpamAgentTypes type, const TQCString & field,
+ const TQRegExp & score, const TQRegExp & threshold )
: mName( name ), mType( type ), mField( field ),
mScore( score ), mThreshold( threshold ) {}
- QString name() const { return mName; }
+ TQString name() const { return mName; }
SpamAgentTypes scoreType() const { return mType; }
- QCString header() const { return mField; }
- QRegExp scorePattern() const { return mScore; }
- QRegExp thresholdPattern() const { return mThreshold; }
+ TQCString header() const { return mField; }
+ TQRegExp scorePattern() const { return mScore; }
+ TQRegExp thresholdPattern() const { return mThreshold; }
private:
- QString mName;
+ TQString mName;
SpamAgentTypes mType;
- QCString mField;
- QRegExp mScore;
- QRegExp mThreshold;
+ TQCString mField;
+ TQRegExp mScore;
+ TQRegExp mThreshold;
};
- typedef QValueList<SpamAgent> SpamAgents;
- typedef QValueListIterator<SpamAgent> SpamAgentsIterator;
+ typedef TQValueList<SpamAgent> SpamAgents;
+ typedef TQValueListIterator<SpamAgent> SpamAgentsIterator;
/**
@short Singleton to manage loading the kmail.antispamrc file.
diff --git a/kmail/antispamwizard.cpp b/kmail/antispamwizard.cpp
index bb8d74bbb..e01093fd3 100644
--- a/kmail/antispamwizard.cpp
+++ b/kmail/antispamwizard.cpp
@@ -49,16 +49,16 @@
#include <kmessagebox.h>
#include <kprocess.h>
-#include <qdom.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qtooltip.h>
-#include <qwhatsthis.h>
+#include <tqdom.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqtooltip.h>
+#include <tqwhatsthis.h>
using namespace KMail;
AntiSpamWizard::AntiSpamWizard( WizardMode mode,
- QWidget* parent, KMFolderTree * mainFolderTree )
+ TQWidget* parent, KMFolderTree * mainFolderTree )
: KWizard( parent ),
mInfoPage( 0 ),
mSpamRulesPage( 0 ),
@@ -77,7 +77,7 @@ AntiSpamWizard::AntiSpamWizard( WizardMode mode,
else
kdDebug(5006) << endl << "Considered anti-virus tools: " << endl;
#endif
- for ( QValueListIterator<SpamToolConfig> it = mToolList.begin();
+ for ( TQValueListIterator<SpamToolConfig> it = mToolList.begin();
it != mToolList.end(); ++it ) {
#ifndef NDEBUG
kdDebug(5006) << "Predefined tool: " << (*it).getId() << endl;
@@ -105,24 +105,24 @@ AntiSpamWizard::AntiSpamWizard( WizardMode mode,
( mMode == AntiSpam )
? i18n( "Welcome to the KMail Anti-Spam Wizard" )
: i18n( "Welcome to the KMail Anti-Virus Wizard" ) );
- connect( mInfoPage, SIGNAL( selectionChanged( void ) ),
- this, SLOT( checkProgramsSelections( void ) ) );
+ connect( mInfoPage, TQT_SIGNAL( selectionChanged( void ) ),
+ this, TQT_SLOT( checkProgramsSelections( void ) ) );
if ( mMode == AntiSpam ) {
mSpamRulesPage = new ASWizSpamRulesPage( 0, "", mainFolderTree );
addPage( mSpamRulesPage, i18n( "Options to fine-tune the handling of spam messages" ));
- connect( mSpamRulesPage, SIGNAL( selectionChanged( void ) ),
- this, SLOT( slotBuildSummary( void ) ) );
+ connect( mSpamRulesPage, TQT_SIGNAL( selectionChanged( void ) ),
+ this, TQT_SLOT( slotBuildSummary( void ) ) );
}
else {
mVirusRulesPage = new ASWizVirusRulesPage( 0, "", mainFolderTree );
addPage( mVirusRulesPage, i18n( "Options to fine-tune the handling of virus messages" ));
- connect( mVirusRulesPage, SIGNAL( selectionChanged( void ) ),
- this, SLOT( checkVirusRulesSelections( void ) ) );
+ connect( mVirusRulesPage, TQT_SIGNAL( selectionChanged( void ) ),
+ this, TQT_SLOT( checkVirusRulesSelections( void ) ) );
}
- connect( this, SIGNAL( helpClicked( void) ),
- this, SLOT( slotHelpClicked( void ) ) );
+ connect( this, TQT_SIGNAL( helpClicked( void) ),
+ this, TQT_SLOT( slotHelpClicked( void ) ) );
setNextEnabled( mInfoPage, false );
@@ -133,7 +133,7 @@ AntiSpamWizard::AntiSpamWizard( WizardMode mode,
setFinishEnabled( mSummaryPage, true );
}
- QTimer::singleShot( 0, this, SLOT( checkToolAvailability( void ) ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( checkToolAvailability( void ) ) );
}
@@ -150,13 +150,13 @@ void AntiSpamWizard::accept()
<< mVirusRulesPage->selectedFolderName() << endl;
KMFilterActionDict dict;
- QValueList<KMFilter*> filterList;
+ TQValueList<KMFilter*> filterList;
bool replaceExistingFilters = false;
// Let's start with virus detection and handling,
// so we can avoid spam checks for viral messages
if ( mMode == AntiVirus ) {
- for ( QValueListIterator<SpamToolConfig> it = mToolList.begin();
+ for ( TQValueListIterator<SpamToolConfig> it = mToolList.begin();
it != mToolList.end(); ++it ) {
if ( mInfoPage->isProgramSelected( (*it).getVisibleName() ) &&
( mVirusRulesPage->pipeRulesSelected() && (*it).isVirusTool() ) )
@@ -165,7 +165,7 @@ void AntiSpamWizard::accept()
// one single filter for each tool
// (could get combined but so it's easier to understand for the user)
KMFilter* pipeFilter = new KMFilter();
- QPtrList<KMFilterAction>* pipeFilterActions = pipeFilter->actions();
+ TQPtrList<KMFilterAction>* pipeFilterActions = pipeFilter->actions();
KMFilterAction* pipeFilterAction = dict["filter app"]->create();
pipeFilterAction->argsFromString( (*it).getDetectCmd() );
pipeFilterActions->append( pipeFilterAction );
@@ -187,7 +187,7 @@ void AntiSpamWizard::accept()
{
// Sort out viruses depending on header fields set by the tools
KMFilter* virusFilter = new KMFilter();
- QPtrList<KMFilterAction>* virusFilterActions = virusFilter->actions();
+ TQPtrList<KMFilterAction>* virusFilterActions = virusFilter->actions();
KMFilterAction* virusFilterAction1 = dict["transfer"]->create();
virusFilterAction1->argsFromString( mVirusRulesPage->selectedFolderName() );
virusFilterActions->append( virusFilterAction1 );
@@ -199,14 +199,14 @@ void AntiSpamWizard::accept()
KMSearchPattern* virusFilterPattern = virusFilter->pattern();
virusFilterPattern->setName( uniqueNameFor( i18n( "Virus handling" ) ) );
virusFilterPattern->setOp( KMSearchPattern::OpOr );
- for ( QValueListIterator<SpamToolConfig> it = mToolList.begin();
+ for ( TQValueListIterator<SpamToolConfig> it = mToolList.begin();
it != mToolList.end(); ++it ) {
if ( mInfoPage->isProgramSelected( (*it).getVisibleName() ))
{
if ( (*it).isVirusTool() )
{
- const QCString header = (*it).getDetectionHeader().ascii();
- const QString & pattern = (*it).getDetectionPattern();
+ const TQCString header = (*it).getDetectionHeader().ascii();
+ const TQString & pattern = (*it).getDetectionPattern();
if ( (*it).isUseRegExp() )
virusFilterPattern->append(
KMSearchRule::createInstance( header,
@@ -232,7 +232,7 @@ void AntiSpamWizard::accept()
// ATM and needs to be replaced with a value from a (still missing)
// checkbox in the GUI. At least, the replacement is announced in the GUI.
replaceExistingFilters = true;
- for ( QValueListIterator<SpamToolConfig> it = mToolList.begin();
+ for ( TQValueListIterator<SpamToolConfig> it = mToolList.begin();
it != mToolList.end(); ++it ) {
if ( mInfoPage->isProgramSelected( (*it).getVisibleName() ) &&
(*it).isSpamTool() && !(*it).isDetectionOnly() )
@@ -241,7 +241,7 @@ void AntiSpamWizard::accept()
// one single filter for each tool
// (could get combined but so it's easier to understand for the user)
KMFilter* pipeFilter = new KMFilter();
- QPtrList<KMFilterAction>* pipeFilterActions = pipeFilter->actions();
+ TQPtrList<KMFilterAction>* pipeFilterActions = pipeFilter->actions();
KMFilterAction* pipeFilterAction = dict["filter app"]->create();
pipeFilterAction->argsFromString( (*it).getDetectCmd() );
pipeFilterActions->append( pipeFilterAction );
@@ -264,7 +264,7 @@ void AntiSpamWizard::accept()
// Sort out spam depending on header fields set by the tools
KMFilter* spamFilter = new KMFilter();
- QPtrList<KMFilterAction>* spamFilterActions = spamFilter->actions();
+ TQPtrList<KMFilterAction>* spamFilterActions = spamFilter->actions();
if ( mSpamRulesPage->moveSpamSelected() )
{
KMFilterAction* spamFilterAction1 = dict["transfer"]->create();
@@ -285,14 +285,14 @@ void AntiSpamWizard::accept()
else
spamFilterPattern->setName( uniqueNameFor( i18n( "Spam handling" ) ) );
spamFilterPattern->setOp( KMSearchPattern::OpOr );
- for ( QValueListIterator<SpamToolConfig> it = mToolList.begin();
+ for ( TQValueListIterator<SpamToolConfig> it = mToolList.begin();
it != mToolList.end(); ++it ) {
if ( mInfoPage->isProgramSelected( (*it).getVisibleName() ) )
{
if ( (*it).isSpamTool() )
{
- const QCString header = (*it).getDetectionHeader().ascii();
- const QString & pattern = (*it).getDetectionPattern();
+ const TQCString header = (*it).getDetectionHeader().ascii();
+ const TQString & pattern = (*it).getDetectionPattern();
if ( (*it).isUseRegExp() )
spamFilterPattern->append(
KMSearchRule::createInstance( header,
@@ -316,7 +316,7 @@ void AntiSpamWizard::accept()
// Sort out messages classified as unsure
bool atLeastOneUnsurePattern = false;
KMFilter* unsureFilter = new KMFilter();
- QPtrList<KMFilterAction>* unsureFilterActions = unsureFilter->actions();
+ TQPtrList<KMFilterAction>* unsureFilterActions = unsureFilter->actions();
KMFilterAction* unsureFilterAction1 = dict["transfer"]->create();
unsureFilterAction1->argsFromString( mSpamRulesPage->selectedUnsureFolderName() );
unsureFilterActions->append( unsureFilterAction1 );
@@ -326,15 +326,15 @@ void AntiSpamWizard::accept()
else
unsureFilterPattern->setName( uniqueNameFor( i18n( "Semi spam (unsure) handling" ) ) );
unsureFilterPattern->setOp( KMSearchPattern::OpOr );
- for ( QValueListIterator<SpamToolConfig> it = mToolList.begin();
+ for ( TQValueListIterator<SpamToolConfig> it = mToolList.begin();
it != mToolList.end(); ++it ) {
if ( mInfoPage->isProgramSelected( (*it).getVisibleName() ) )
{
if ( (*it).isSpamTool() && (*it).hasTristateDetection())
{
atLeastOneUnsurePattern = true;
- const QCString header = (*it).getDetectionHeader().ascii();
- const QString & pattern = (*it).getDetectionPattern2();
+ const TQCString header = (*it).getDetectionHeader().ascii();
+ const TQString & pattern = (*it).getDetectionPattern2();
if ( (*it).isUseRegExp() )
unsureFilterPattern->append(
KMSearchRule::createInstance( header,
@@ -361,11 +361,11 @@ void AntiSpamWizard::accept()
// Classify messages manually as Spam
KMFilter* classSpamFilter = new KMFilter();
classSpamFilter->setIcon( "mail_spam" );
- QPtrList<KMFilterAction>* classSpamFilterActions = classSpamFilter->actions();
+ TQPtrList<KMFilterAction>* classSpamFilterActions = classSpamFilter->actions();
KMFilterAction* classSpamFilterActionFirst = dict["set status"]->create();
classSpamFilterActionFirst->argsFromString( "P" );
classSpamFilterActions->append( classSpamFilterActionFirst );
- for ( QValueListIterator<SpamToolConfig> it = mToolList.begin();
+ for ( TQValueListIterator<SpamToolConfig> it = mToolList.begin();
it != mToolList.end(); ++it ) {
if ( mInfoPage->isProgramSelected( (*it).getVisibleName() )
&& (*it).useBayesFilter() && !(*it).isDetectionOnly() )
@@ -400,11 +400,11 @@ void AntiSpamWizard::accept()
// Classify messages manually as not Spam / as Ham
KMFilter* classHamFilter = new KMFilter();
classHamFilter->setIcon( "mail_ham" );
- QPtrList<KMFilterAction>* classHamFilterActions = classHamFilter->actions();
+ TQPtrList<KMFilterAction>* classHamFilterActions = classHamFilter->actions();
KMFilterAction* classHamFilterActionFirst = dict["set status"]->create();
classHamFilterActionFirst->argsFromString( "H" );
classHamFilterActions->append( classHamFilterActionFirst );
- for ( QValueListIterator<SpamToolConfig> it = mToolList.begin();
+ for ( TQValueListIterator<SpamToolConfig> it = mToolList.begin();
it != mToolList.end(); ++it ) {
if ( mInfoPage->isProgramSelected( (*it).getVisibleName() )
&& (*it).useBayesFilter() && !(*it).isDetectionOnly() )
@@ -438,7 +438,7 @@ void AntiSpamWizard::accept()
KMKernel::self()->filterMgr()->appendFilters(
filterList, replaceExistingFilters );
- QDialog::accept();
+ TQDialog::accept();
}
@@ -449,7 +449,7 @@ void AntiSpamWizard::checkProgramsSelections()
mSpamToolsUsed = false;
mVirusToolsUsed = false;
- for ( QValueListIterator<SpamToolConfig> it = mToolList.begin();
+ for ( TQValueListIterator<SpamToolConfig> it = mToolList.begin();
it != mToolList.end(); ++it ) {
if ( mInfoPage->isProgramSelected( (*it).getVisibleName() ) )
{
@@ -488,13 +488,13 @@ void AntiSpamWizard::checkToolAvailability()
KCursorSaver busy( KBusyPtr::busy() );
bool found = false;
- for ( QValueListIterator<SpamToolConfig> it = mToolList.begin();
+ for ( TQValueListIterator<SpamToolConfig> it = mToolList.begin();
it != mToolList.end(); ++it ) {
- QString text( i18n("Scanning for %1...").arg( (*it).getId() ) );
+ TQString text( i18n("Scanning for %1...").arg( (*it).getId() ) );
mInfoPage->setScanProgressText( text );
if ( (*it).isSpamTool() && (*it).isServerBased() ) {
// check the configured account for pattern in <server>
- QString pattern = (*it).getServerPattern();
+ TQString pattern = (*it).getServerPattern();
kdDebug(5006) << "Testing for server pattern:" << pattern << endl;
AccountManager* mgr = kmkernel->acctMgr();
@@ -543,9 +543,9 @@ void AntiSpamWizard::slotHelpClicked()
void AntiSpamWizard::slotBuildSummary()
{
- QString text;
- QString newFilters;
- QString replaceFilters;
+ TQString text;
+ TQString newFilters;
+ TQString replaceFilters;
if ( mMode == AntiVirus ) {
text = ""; // TODO add summary for the virus part
@@ -562,7 +562,7 @@ void AntiSpamWizard::slotBuildSummary()
else
text += i18n( "<br>Spam messages are not moved into a certain folder.</p>" );
- for ( QValueListIterator<SpamToolConfig> it = mToolList.begin();
+ for ( TQValueListIterator<SpamToolConfig> it = mToolList.begin();
it != mToolList.end(); ++it ) {
if ( mInfoPage->isProgramSelected( (*it).getVisibleName() ) &&
(*it).isSpamTool() && !(*it).isDetectionOnly() ) {
@@ -574,7 +574,7 @@ void AntiSpamWizard::slotBuildSummary()
// The need for a andling of status "probably spam" depends on the tools chosen
if ( mSpamRulesPage->moveUnsureSelected() ) {
bool atLeastOneUnsurePattern = false;
- for ( QValueListIterator<SpamToolConfig> it = mToolList.begin();
+ for ( TQValueListIterator<SpamToolConfig> it = mToolList.begin();
it != mToolList.end(); ++it ) {
if ( mInfoPage->isProgramSelected( (*it).getVisibleName() ) ) {
if ( (*it).isSpamTool() && (*it).hasTristateDetection())
@@ -608,7 +608,7 @@ void AntiSpamWizard::slotBuildSummary()
}
-int AntiSpamWizard::checkForProgram( const QString &executable )
+int AntiSpamWizard::checkForProgram( const TQString &executable )
{
kdDebug(5006) << "Testing for executable:" << executable << endl;
KProcess process;
@@ -626,15 +626,15 @@ bool AntiSpamWizard::anyVirusOptionChecked()
}
-const QString AntiSpamWizard::uniqueNameFor( const QString & name )
+const TQString AntiSpamWizard::uniqueNameFor( const TQString & name )
{
return KMKernel::self()->filterMgr()->createUniqueName( name );
}
void AntiSpamWizard::sortFilterOnExistance(
- const QString & intendedFilterName,
- QString & newFilters, QString & replaceFilters )
+ const TQString & intendedFilterName,
+ TQString & newFilters, TQString & replaceFilters )
{
if ( uniqueNameFor( intendedFilterName ) == intendedFilterName )
newFilters += "<li>" + intendedFilterName + "</li>";
@@ -644,10 +644,10 @@ void AntiSpamWizard::sortFilterOnExistance(
//---------------------------------------------------------------------------
-AntiSpamWizard::SpamToolConfig::SpamToolConfig( QString toolId,
- int configVersion, int prio, QString name, QString exec,
- QString url, QString filter, QString detection, QString spam, QString ham,
- QString header, QString pattern, QString pattern2, QString serverPattern,
+AntiSpamWizard::SpamToolConfig::SpamToolConfig( TQString toolId,
+ int configVersion, int prio, TQString name, TQString exec,
+ TQString url, TQString filter, TQString detection, TQString spam, TQString ham,
+ TQString header, TQString pattern, TQString pattern2, TQString serverPattern,
bool detectionOnly, bool regExp, bool bayesFilter, bool tristateDetection,
WizardMode type )
: mId( toolId ), mVersion( configVersion ), mPrio( prio ),
@@ -670,7 +670,7 @@ bool AntiSpamWizard::SpamToolConfig::isServerBased() const
//---------------------------------------------------------------------------
AntiSpamWizard::ConfigReader::ConfigReader( WizardMode mode,
- QValueList<SpamToolConfig> & configList )
+ TQValueList<SpamToolConfig> & configList )
: mToolList( configList ),
mMode( mode )
{
@@ -688,9 +688,9 @@ AntiSpamWizard::ConfigReader::~ConfigReader( )
void AntiSpamWizard::ConfigReader::readAndMergeConfig()
{
- QString groupName = ( mMode == AntiSpam )
- ? QString("Spamtool #%1")
- : QString("Virustool #%1");
+ TQString groupName = ( mMode == AntiSpam )
+ ? TQString("Spamtool #%1")
+ : TQString("Virustool #%1");
// read the configuration from the global config file
mConfig->setReadDefaults( true );
KConfigGroup general( mConfig, "General" );
@@ -727,24 +727,24 @@ void AntiSpamWizard::ConfigReader::readAndMergeConfig()
AntiSpamWizard::SpamToolConfig
AntiSpamWizard::ConfigReader::readToolConfig( KConfigGroup & configGroup )
{
- QString id = configGroup.readEntry( "Ident" );
+ TQString id = configGroup.readEntry( "Ident" );
int version = configGroup.readNumEntry( "Version" );
#ifndef NDEBUG
kdDebug(5006) << "Found predefined tool: " << id << endl;
kdDebug(5006) << "With config version : " << version << endl;
#endif
int prio = configGroup.readNumEntry( "Priority", 1 );
- QString name = configGroup.readEntry( "VisibleName" );
- QString executable = configGroup.readEntry( "Executable" );
- QString url = configGroup.readEntry( "URL" );
- QString filterName = configGroup.readEntry( "PipeFilterName" );
- QString detectCmd = configGroup.readEntry( "PipeCmdDetect" );
- QString spamCmd = configGroup.readEntry( "ExecCmdSpam" );
- QString hamCmd = configGroup.readEntry( "ExecCmdHam" );
- QString header = configGroup.readEntry( "DetectionHeader" );
- QString pattern = configGroup.readEntry( "DetectionPattern" );
- QString pattern2 = configGroup.readEntry( "DetectionPattern2" );
- QString serverPattern = configGroup.readEntry( "ServerPattern" );
+ TQString name = configGroup.readEntry( "VisibleName" );
+ TQString executable = configGroup.readEntry( "Executable" );
+ TQString url = configGroup.readEntry( "URL" );
+ TQString filterName = configGroup.readEntry( "PipeFilterName" );
+ TQString detectCmd = configGroup.readEntry( "PipeCmdDetect" );
+ TQString spamCmd = configGroup.readEntry( "ExecCmdSpam" );
+ TQString hamCmd = configGroup.readEntry( "ExecCmdHam" );
+ TQString header = configGroup.readEntry( "DetectionHeader" );
+ TQString pattern = configGroup.readEntry( "DetectionPattern" );
+ TQString pattern2 = configGroup.readEntry( "DetectionPattern2" );
+ TQString serverPattern = configGroup.readEntry( "ServerPattern" );
bool detectionOnly = configGroup.readBoolEntry( "DetectionOnly", false );
bool useRegExp = configGroup.readBoolEntry( "UseRegExp" );
bool supportsBayes = configGroup.readBoolEntry( "SupportsBayes", false );
@@ -773,7 +773,7 @@ AntiSpamWizard::SpamToolConfig AntiSpamWizard::ConfigReader::createDummyConfig()
void AntiSpamWizard::ConfigReader::mergeToolConfig( AntiSpamWizard::SpamToolConfig config )
{
bool found = false;
- for ( QValueListIterator<SpamToolConfig> it = mToolList.begin();
+ for ( TQValueListIterator<SpamToolConfig> it = mToolList.begin();
it != mToolList.end(); ++it ) {
#ifndef NDEBUG
kdDebug(5006) << "Check against tool: " << (*it).getId() << endl;
@@ -800,13 +800,13 @@ void AntiSpamWizard::ConfigReader::mergeToolConfig( AntiSpamWizard::SpamToolConf
void AntiSpamWizard::ConfigReader::sortToolList()
{
- QValueList<SpamToolConfig> tmpList;
+ TQValueList<SpamToolConfig> tmpList;
SpamToolConfig config;
while ( !mToolList.isEmpty() ) {
- QValueListIterator<SpamToolConfig> highest;
+ TQValueListIterator<SpamToolConfig> highest;
int priority = 0; // ascending
- for ( QValueListIterator<SpamToolConfig> it = mToolList.begin();
+ for ( TQValueListIterator<SpamToolConfig> it = mToolList.begin();
it != mToolList.end(); ++it ) {
if ( (*it).getPrio() > priority ) {
priority = (*it).getPrio();
@@ -817,7 +817,7 @@ void AntiSpamWizard::ConfigReader::sortToolList()
tmpList.append( config );
mToolList.remove( highest );
}
- for ( QValueListIterator<SpamToolConfig> it = tmpList.begin();
+ for ( TQValueListIterator<SpamToolConfig> it = tmpList.begin();
it != tmpList.end(); ++it ) {
mToolList.append( (*it) );
}
@@ -825,35 +825,35 @@ void AntiSpamWizard::ConfigReader::sortToolList()
//---------------------------------------------------------------------------
-ASWizPage::ASWizPage( QWidget * parent, const char * name,
- const QString *bannerName )
- : QWidget( parent, name )
+ASWizPage::ASWizPage( TQWidget * parent, const char * name,
+ const TQString *bannerName )
+ : TQWidget( parent, name )
{
- QString banner = "kmwizard.png";
+ TQString banner = "kmwizard.png";
if ( bannerName && !bannerName->isEmpty() )
banner = *bannerName;
- mLayout = new QHBoxLayout( this, KDialog::marginHint(), KDialog::spacingHint() );
- mPixmap = new QPixmap( UserIcon(banner) );
- mBannerLabel = new QLabel( this );
+ mLayout = new TQHBoxLayout( this, KDialog::marginHint(), KDialog::spacingHint() );
+ mPixmap = new TQPixmap( UserIcon(banner) );
+ mBannerLabel = new TQLabel( this );
mBannerLabel->setPixmap( *mPixmap );
mBannerLabel->setScaledContents( false );
- mBannerLabel->setFrameShape( QFrame::StyledPanel );
- mBannerLabel->setFrameShadow( QFrame::Sunken );
+ mBannerLabel->setFrameShape( TQFrame::StyledPanel );
+ mBannerLabel->setFrameShadow( TQFrame::Sunken );
mLayout->addWidget( mBannerLabel );
- mLayout->addItem( new QSpacerItem( 5, 5, QSizePolicy::Minimum, QSizePolicy::Expanding ) );
+ mLayout->addItem( new TQSpacerItem( 5, 5, TQSizePolicy::Minimum, TQSizePolicy::Expanding ) );
}
//---------------------------------------------------------------------------
ASWizInfoPage::ASWizInfoPage( AntiSpamWizard::WizardMode mode,
- QWidget * parent, const char * name )
+ TQWidget * parent, const char * name )
: ASWizPage( parent, name )
{
- QBoxLayout * layout = new QVBoxLayout( mLayout );
+ TQBoxLayout * layout = new TQVBoxLayout( mLayout );
- mIntroText = new QLabel( this );
+ mIntroText = new TQLabel( this );
mIntroText->setText(
( mode == AntiSpamWizard::AntiSpam )
? i18n(
@@ -877,20 +877,20 @@ ASWizInfoPage::ASWizInfoPage( AntiSpamWizard::WizardMode mode,
) );
layout->addWidget( mIntroText );
- mScanProgressText = new QLabel( this );
+ mScanProgressText = new TQLabel( this );
mScanProgressText->setText( "" ) ;
layout->addWidget( mScanProgressText );
mToolsList = new KListBox( this );
mToolsList->hide();
- mToolsList->setSelectionMode( QListBox::Multi );
- mToolsList->setRowMode( QListBox::FixedNumber );
+ mToolsList->setSelectionMode( TQListBox::Multi );
+ mToolsList->setRowMode( TQListBox::FixedNumber );
mToolsList->setRowMode( 10 );
layout->addWidget( mToolsList );
- connect( mToolsList, SIGNAL(selectionChanged()),
- this, SLOT(processSelectionChange(void)) );
+ connect( mToolsList, TQT_SIGNAL(selectionChanged()),
+ this, TQT_SLOT(processSelectionChange(void)) );
- mSelectionHint = new QLabel( this );
+ mSelectionHint = new TQLabel( this );
mSelectionHint->setText( "" );
layout->addWidget( mSelectionHint );
@@ -898,15 +898,15 @@ ASWizInfoPage::ASWizInfoPage( AntiSpamWizard::WizardMode mode,
}
-void ASWizInfoPage::setScanProgressText( const QString &toolName )
+void ASWizInfoPage::setScanProgressText( const TQString &toolName )
{
mScanProgressText->setText( toolName );
}
-void ASWizInfoPage::addAvailableTool( const QString &visibleName )
+void ASWizInfoPage::addAvailableTool( const TQString &visibleName )
{
- QString listName = visibleName;
+ TQString listName = visibleName;
mToolsList->insertItem( listName );
if ( !mToolsList->isVisible() )
{
@@ -918,9 +918,9 @@ void ASWizInfoPage::addAvailableTool( const QString &visibleName )
}
}
-bool ASWizInfoPage::isProgramSelected( const QString &visibleName )
+bool ASWizInfoPage::isProgramSelected( const TQString &visibleName )
{
- QString listName = visibleName;
+ TQString listName = visibleName;
return mToolsList->isSelected( mToolsList->findItem( listName ) );
}
@@ -932,19 +932,19 @@ void ASWizInfoPage::processSelectionChange()
//---------------------------------------------------------------------------
-ASWizSpamRulesPage::ASWizSpamRulesPage( QWidget * parent, const char * name,
+ASWizSpamRulesPage::ASWizSpamRulesPage( TQWidget * parent, const char * name,
KMFolderTree * mainFolderTree )
: ASWizPage( parent, name )
{
- QVBoxLayout *layout = new QVBoxLayout( mLayout );
+ TQVBoxLayout *layout = new TQVBoxLayout( mLayout );
- mMarkRules = new QCheckBox( i18n("&Mark detected spam messages as read"), this );
- QWhatsThis::add( mMarkRules,
+ mMarkRules = new TQCheckBox( i18n("&Mark detected spam messages as read"), this );
+ TQWhatsThis::add( mMarkRules,
i18n( "Mark messages which have been classified as spam as read.") );
layout->addWidget( mMarkRules);
- mMoveSpamRules = new QCheckBox( i18n("Move &known spam to:"), this );
- QWhatsThis::add( mMoveSpamRules,
+ mMoveSpamRules = new TQCheckBox( i18n("Move &known spam to:"), this );
+ TQWhatsThis::add( mMoveSpamRules,
i18n( "The default folder for spam messages is the trash folder, "
"but you may change that in the folder view below.") );
layout->addWidget( mMoveSpamRules );
@@ -955,12 +955,12 @@ ASWizSpamRulesPage::ASWizSpamRulesPage( QWidget * parent, const char * name,
mFolderReqForSpamFolder->setShowOutbox( false );
mFolderReqForSpamFolder->setShowImapFolders( false );
- QHBoxLayout *hLayout1 = new QHBoxLayout( layout );
+ TQHBoxLayout *hLayout1 = new TQHBoxLayout( layout );
hLayout1->addSpacing( KDialog::spacingHint() * 3 );
hLayout1->addWidget( mFolderReqForSpamFolder );
- mMoveUnsureRules = new QCheckBox( i18n("Move &probable spam to:"), this );
- QWhatsThis::add( mMoveUnsureRules,
+ mMoveUnsureRules = new TQCheckBox( i18n("Move &probable spam to:"), this );
+ TQWhatsThis::add( mMoveUnsureRules,
i18n( "The default folder is the inbox folder, but you may change that "
"in the folder view below.<p>"
"Not all tools support a classification as unsure. If you haven't "
@@ -973,22 +973,22 @@ ASWizSpamRulesPage::ASWizSpamRulesPage( QWidget * parent, const char * name,
mFolderReqForUnsureFolder->setShowOutbox( false );
mFolderReqForUnsureFolder->setShowImapFolders( false );
- QHBoxLayout *hLayout2 = new QHBoxLayout( layout );
+ TQHBoxLayout *hLayout2 = new TQHBoxLayout( layout );
hLayout2->addSpacing( KDialog::spacingHint() * 3 );
hLayout2->addWidget( mFolderReqForUnsureFolder );
layout->addStretch();
- connect( mMarkRules, SIGNAL(clicked()),
- this, SLOT(processSelectionChange(void)) );
- connect( mMoveSpamRules, SIGNAL(clicked()),
- this, SLOT(processSelectionChange(void)) );
- connect( mMoveUnsureRules, SIGNAL(clicked()),
- this, SLOT(processSelectionChange(void)) );
- connect( mFolderReqForSpamFolder, SIGNAL(folderChanged(KMFolder*)),
- this, SLOT(processSelectionChange(KMFolder*)) );
- connect( mFolderReqForUnsureFolder, SIGNAL(folderChanged(KMFolder*)),
- this, SLOT(processSelectionChange(KMFolder*)) );
+ connect( mMarkRules, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(processSelectionChange(void)) );
+ connect( mMoveSpamRules, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(processSelectionChange(void)) );
+ connect( mMoveUnsureRules, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(processSelectionChange(void)) );
+ connect( mFolderReqForSpamFolder, TQT_SIGNAL(folderChanged(KMFolder*)),
+ this, TQT_SLOT(processSelectionChange(KMFolder*)) );
+ connect( mFolderReqForUnsureFolder, TQT_SIGNAL(folderChanged(KMFolder*)),
+ this, TQT_SLOT(processSelectionChange(KMFolder*)) );
mMarkRules->setChecked( true );
mMoveSpamRules->setChecked( true );
@@ -1013,18 +1013,18 @@ bool ASWizSpamRulesPage::moveUnsureSelected() const
}
-QString ASWizSpamRulesPage::selectedSpamFolderName() const
+TQString ASWizSpamRulesPage::selectedSpamFolderName() const
{
- QString name = "trash";
+ TQString name = "trash";
if ( mFolderReqForSpamFolder->folder() )
name = mFolderReqForSpamFolder->folder()->idString();
return name;
}
-QString ASWizSpamRulesPage::selectedUnsureFolderName() const
+TQString ASWizSpamRulesPage::selectedUnsureFolderName() const
{
- QString name = "inbox";
+ TQString name = "inbox";
if ( mFolderReqForUnsureFolder->folder() )
name = mFolderReqForUnsureFolder->folder()->idString();
return name;
@@ -1055,48 +1055,48 @@ void ASWizSpamRulesPage::allowUnsureFolderSelection( bool enabled )
//---------------------------------------------------------------------------
-ASWizVirusRulesPage::ASWizVirusRulesPage( QWidget * parent, const char * name,
+ASWizVirusRulesPage::ASWizVirusRulesPage( TQWidget * parent, const char * name,
KMFolderTree * mainFolderTree )
: ASWizPage( parent, name )
{
- QGridLayout *grid = new QGridLayout( mLayout, 5, 1, KDialog::spacingHint() );
+ TQGridLayout *grid = new TQGridLayout( mLayout, 5, 1, KDialog::spacingHint() );
- mPipeRules = new QCheckBox( i18n("Check messages using the anti-virus tools"), this );
- QWhatsThis::add( mPipeRules,
+ mPipeRules = new TQCheckBox( i18n("Check messages using the anti-virus tools"), this );
+ TQWhatsThis::add( mPipeRules,
i18n( "Let the anti-virus tools check your messages. The wizard "
"will create appropriate filters. The messages are usually "
"marked by the tools so that following filters can react "
"on this and, for example, move virus messages to a special folder.") );
grid->addWidget( mPipeRules, 0, 0 );
- mMoveRules = new QCheckBox( i18n("Move detected viral messages to the selected folder"), this );
- QWhatsThis::add( mMoveRules,
+ mMoveRules = new TQCheckBox( i18n("Move detected viral messages to the selected folder"), this );
+ TQWhatsThis::add( mMoveRules,
i18n( "A filter to detect messages classified as virus-infected and to move "
"those messages into a predefined folder is created. The "
"default folder is the trash folder, but you may change that "
"in the folder view.") );
grid->addWidget( mMoveRules, 1, 0 );
- mMarkRules = new QCheckBox( i18n("Additionally, mark detected viral messages as read"), this );
+ mMarkRules = new TQCheckBox( i18n("Additionally, mark detected viral messages as read"), this );
mMarkRules->setEnabled( false );
- QWhatsThis::add( mMarkRules,
+ TQWhatsThis::add( mMarkRules,
i18n( "Mark messages which have been classified as "
"virus-infected as read, as well as moving them "
"to the selected folder.") );
grid->addWidget( mMarkRules, 2, 0 );
- QString s = "trash";
+ TQString s = "trash";
mFolderTree = new SimpleFolderTree( this, mainFolderTree, s, true );
grid->addWidget( mFolderTree, 3, 0 );
- connect( mPipeRules, SIGNAL(clicked()),
- this, SLOT(processSelectionChange(void)) );
- connect( mMoveRules, SIGNAL(clicked()),
- this, SLOT(processSelectionChange(void)) );
- connect( mMarkRules, SIGNAL(clicked()),
- this, SLOT(processSelectionChange(void)) );
- connect( mMoveRules, SIGNAL( toggled( bool ) ),
- mMarkRules, SLOT( setEnabled( bool ) ) );
+ connect( mPipeRules, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(processSelectionChange(void)) );
+ connect( mMoveRules, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(processSelectionChange(void)) );
+ connect( mMarkRules, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(processSelectionChange(void)) );
+ connect( mMoveRules, TQT_SIGNAL( toggled( bool ) ),
+ mMarkRules, TQT_SLOT( setEnabled( bool ) ) );
}
bool ASWizVirusRulesPage::pipeRulesSelected() const
@@ -1116,9 +1116,9 @@ bool ASWizVirusRulesPage::markReadRulesSelected() const
}
-QString ASWizVirusRulesPage::selectedFolderName() const
+TQString ASWizVirusRulesPage::selectedFolderName() const
{
- QString name = "trash";
+ TQString name = "trash";
if ( mFolderTree->folder() )
name = mFolderTree->folder()->idString();
return name;
@@ -1131,18 +1131,18 @@ void ASWizVirusRulesPage::processSelectionChange()
//---------------------------------------------------------------------------
-ASWizSummaryPage::ASWizSummaryPage( QWidget * parent, const char * name )
+ASWizSummaryPage::ASWizSummaryPage( TQWidget * parent, const char * name )
: ASWizPage( parent, name )
{
- QBoxLayout * layout = new QVBoxLayout( mLayout );
+ TQBoxLayout * layout = new TQVBoxLayout( mLayout );
- mSummaryText = new QLabel( this );
+ mSummaryText = new TQLabel( this );
layout->addWidget( mSummaryText );
layout->addStretch();
}
-void ASWizSummaryPage::setSummaryText( const QString & text )
+void ASWizSummaryPage::setSummaryText( const TQString & text )
{
mSummaryText->setText( text );
}
diff --git a/kmail/antispamwizard.h b/kmail/antispamwizard.h
index 745edae60..be2e67e87 100644
--- a/kmail/antispamwizard.h
+++ b/kmail/antispamwizard.h
@@ -33,9 +33,9 @@
#include <klistbox.h>
#include <kwizard.h>
-#include <qcheckbox.h>
-#include <qdict.h>
-#include <qlayout.h>
+#include <tqcheckbox.h>
+#include <tqdict.h>
+#include <tqlayout.h>
class KActionCollection;
class KMFolder;
@@ -119,7 +119,7 @@ namespace KMail {
within one of the wizard pages.
*/
AntiSpamWizard( WizardMode mode,
- QWidget * parent, KMFolderTree * mainFolderTree );
+ TQWidget * parent, KMFolderTree * mainFolderTree );
protected:
/**
@@ -131,28 +131,28 @@ namespace KMail {
{
public:
SpamToolConfig() {}
- SpamToolConfig( QString toolId, int configVersion, int prio,
- QString name, QString exec, QString url, QString filter,
- QString detection, QString spam, QString ham,
- QString header, QString pattern, QString pattern2,
- QString serverPattern,
+ SpamToolConfig( TQString toolId, int configVersion, int prio,
+ TQString name, TQString exec, TQString url, TQString filter,
+ TQString detection, TQString spam, TQString ham,
+ TQString header, TQString pattern, TQString pattern2,
+ TQString serverPattern,
bool detectionOnly, bool regExp, bool bayesFilter,
bool tristateDetection, WizardMode type );
int getVersion() const { return mVersion; }
int getPrio() const { return mPrio; }
- QString getId() const { return mId; }
- QString getVisibleName() const { return mVisibleName; }
- QString getExecutable() const { return mExecutable; }
- QString getWhatsThisText() const { return mWhatsThisText; }
- QString getFilterName() const { return mFilterName; }
- QString getDetectCmd() const { return mDetectCmd; }
- QString getSpamCmd() const { return mSpamCmd; }
- QString getHamCmd() const { return mHamCmd; }
- QString getDetectionHeader() const { return mDetectionHeader; }
- QString getDetectionPattern() const { return mDetectionPattern; }
- QString getDetectionPattern2() const { return mDetectionPattern2; }
- QString getServerPattern() const { return mServerPattern; }
+ TQString getId() const { return mId; }
+ TQString getVisibleName() const { return mVisibleName; }
+ TQString getExecutable() const { return mExecutable; }
+ TQString getWhatsThisText() const { return mWhatsThisText; }
+ TQString getFilterName() const { return mFilterName; }
+ TQString getDetectCmd() const { return mDetectCmd; }
+ TQString getSpamCmd() const { return mSpamCmd; }
+ TQString getHamCmd() const { return mHamCmd; }
+ TQString getDetectionHeader() const { return mDetectionHeader; }
+ TQString getDetectionPattern() const { return mDetectionPattern; }
+ TQString getDetectionPattern2() const { return mDetectionPattern2; }
+ TQString getServerPattern() const { return mServerPattern; }
bool isServerBased() const;
bool isDetectionOnly() const { return mDetectionOnly; }
bool isUseRegExp() const { return mUseRegExp; }
@@ -165,34 +165,34 @@ namespace KMail {
private:
// used to identifiy configs for the same tool
- QString mId;
+ TQString mId;
// The version of the config data, used for merging and
// detecting newer configs
int mVersion;
// the priority of the tool in the list presented to the user
int mPrio;
// the name as shown by the checkbox in the dialog page
- QString mVisibleName;
+ TQString mVisibleName;
// the command to check the existance of the tool
- QString mExecutable;
+ TQString mExecutable;
// the What's This help text (e.g. url for the tool)
- QString mWhatsThisText;
+ TQString mWhatsThisText;
// name for the created filter in the filter list
- QString mFilterName;
+ TQString mFilterName;
// pipe through cmd used to detect spam messages
- QString mDetectCmd;
+ TQString mDetectCmd;
// pipe through cmd to let the tool learn a spam message
- QString mSpamCmd;
+ TQString mSpamCmd;
// pipe through cmd to let the tool learn a ham message
- QString mHamCmd;
+ TQString mHamCmd;
// by which header are messages marked as spam
- QString mDetectionHeader;
+ TQString mDetectionHeader;
// what header pattern is used to mark spam messages
- QString mDetectionPattern;
+ TQString mDetectionPattern;
// what header pattern is used to mark unsure messages
- QString mDetectionPattern2;
+ TQString mDetectionPattern2;
// what header pattern is used in the account to check for a certain server
- QString mServerPattern;
+ TQString mServerPattern;
// filter cannot search actively but relies on pattern by regExp or contain rule
bool mDetectionOnly;
// filter searches for the pattern by regExp or contain rule
@@ -214,15 +214,15 @@ namespace KMail {
{
public:
ConfigReader( WizardMode mode,
- QValueList<SpamToolConfig> & configList );
+ TQValueList<SpamToolConfig> & configList );
~ConfigReader( );
- QValueList<SpamToolConfig> & getToolList() { return mToolList; }
+ TQValueList<SpamToolConfig> & getToolList() { return mToolList; }
void readAndMergeConfig();
private:
- QValueList<SpamToolConfig> & mToolList;
+ TQValueList<SpamToolConfig> & mToolList;
KConfig *mConfig;
WizardMode mMode;
@@ -250,15 +250,15 @@ namespace KMail {
private:
/* Check for the availability of an executible along the PATH */
- int checkForProgram( const QString &executable );
+ int checkForProgram( const TQString &executable );
/* generic checks if any option in a page is checked */
bool anyVirusOptionChecked();
/* convenience method calling the appropriate filter manager method */
- const QString uniqueNameFor( const QString & name );
+ const TQString uniqueNameFor( const TQString & name );
/* convenience method to sort out new and existing filters */
- void sortFilterOnExistance( const QString & intendedFilterName,
- QString & newFilters,
- QString & replaceFilters );
+ void sortFilterOnExistance( const TQString & intendedFilterName,
+ TQString & newFilters,
+ TQString & replaceFilters );
/* The pages in the wizard */
ASWizInfoPage * mInfoPage;
@@ -267,7 +267,7 @@ namespace KMail {
ASWizSummaryPage * mSummaryPage;
/* The configured tools and it's settings to be used in the wizard. */
- QValueList<SpamToolConfig> mToolList;
+ TQValueList<SpamToolConfig> mToolList;
/* Are any spam tools selected? */
bool mSpamToolsUsed;
@@ -282,15 +282,15 @@ namespace KMail {
class ASWizPage : public QWidget
{
public:
- ASWizPage( QWidget *parent, const char *name,
- const QString *bannerName = 0);
+ ASWizPage( TQWidget *parent, const char *name,
+ const TQString *bannerName = 0);
protected:
- QBoxLayout *mLayout;
+ TQBoxLayout *mLayout;
private:
- QPixmap *mPixmap;
- QLabel *mBannerLabel;
+ TQPixmap *mPixmap;
+ TQLabel *mBannerLabel;
};
@@ -301,11 +301,11 @@ namespace KMail {
public:
ASWizInfoPage( AntiSpamWizard::WizardMode mode,
- QWidget *parent, const char *name );
+ TQWidget *parent, const char *name );
- void setScanProgressText( const QString &toolName );
- void addAvailableTool( const QString &visibleName );
- bool isProgramSelected( const QString &visibleName );
+ void setScanProgressText( const TQString &toolName );
+ void addAvailableTool( const TQString &visibleName );
+ bool isProgramSelected( const TQString &visibleName );
private slots:
void processSelectionChange();
@@ -314,9 +314,9 @@ namespace KMail {
void selectionChanged();
private:
- QLabel *mIntroText;
- QLabel *mScanProgressText;
- QLabel *mSelectionHint;
+ TQLabel *mIntroText;
+ TQLabel *mScanProgressText;
+ TQLabel *mSelectionHint;
KListBox *mToolsList;
};
@@ -326,14 +326,14 @@ namespace KMail {
Q_OBJECT
public:
- ASWizSpamRulesPage( QWidget * parent, const char * name, KMFolderTree * mainFolderTree );
+ ASWizSpamRulesPage( TQWidget * parent, const char * name, KMFolderTree * mainFolderTree );
bool markAsReadSelected() const;
bool moveSpamSelected() const;
bool moveUnsureSelected() const;
- QString selectedSpamFolderName() const;
- QString selectedUnsureFolderName() const;
+ TQString selectedSpamFolderName() const;
+ TQString selectedUnsureFolderName() const;
void allowUnsureFolderSelection( bool enabled );
@@ -345,9 +345,9 @@ namespace KMail {
void selectionChanged();
private:
- QCheckBox * mMarkRules;
- QCheckBox * mMoveSpamRules;
- QCheckBox * mMoveUnsureRules;
+ TQCheckBox * mMarkRules;
+ TQCheckBox * mMoveSpamRules;
+ TQCheckBox * mMoveUnsureRules;
FolderRequester *mFolderReqForSpamFolder;
FolderRequester *mFolderReqForUnsureFolder;
};
@@ -358,13 +358,13 @@ namespace KMail {
Q_OBJECT
public:
- ASWizVirusRulesPage( QWidget * parent, const char * name, KMFolderTree * mainFolderTree );
+ ASWizVirusRulesPage( TQWidget * parent, const char * name, KMFolderTree * mainFolderTree );
bool pipeRulesSelected() const;
bool moveRulesSelected() const;
bool markReadRulesSelected() const;
- QString selectedFolderName() const;
+ TQString selectedFolderName() const;
private slots:
void processSelectionChange();
@@ -372,10 +372,10 @@ namespace KMail {
void selectionChanged();
private:
- QCheckBox * mPipeRules;
- QCheckBox * mMoveRules;
+ TQCheckBox * mPipeRules;
+ TQCheckBox * mMoveRules;
SimpleFolderTree *mFolderTree;
- QCheckBox * mMarkRules;
+ TQCheckBox * mMarkRules;
};
//---------------------------------------------------------------------------
@@ -384,12 +384,12 @@ namespace KMail {
Q_OBJECT
public:
- ASWizSummaryPage( QWidget * parent, const char * name );
+ ASWizSummaryPage( TQWidget * parent, const char * name );
- void setSummaryText( const QString & text );
+ void setSummaryText( const TQString & text );
private:
- QLabel * mSummaryText;
+ TQLabel * mSummaryText;
};
diff --git a/kmail/attachmentlistview.cpp b/kmail/attachmentlistview.cpp
index b7c8bdd21..11c53f123 100644
--- a/kmail/attachmentlistview.cpp
+++ b/kmail/attachmentlistview.cpp
@@ -34,12 +34,12 @@ using KPIM::MailListDrag;
#include <kurldrag.h>
// other Qt headers
-#include <qevent.h>
-#include <qcstring.h>
-#include <qbuffer.h>
-#include <qptrlist.h>
-#include <qdatastream.h>
-#include <qstring.h>
+#include <tqevent.h>
+#include <tqcstring.h>
+#include <tqbuffer.h>
+#include <tqptrlist.h>
+#include <tqdatastream.h>
+#include <tqstring.h>
// other headers (none)
@@ -47,7 +47,7 @@ using KPIM::MailListDrag;
namespace KMail {
AttachmentListView::AttachmentListView( KMail::Composer * composer,
- QWidget* parent,
+ TQWidget* parent,
const char* name )
: KListView( parent, name ),
mComposer( composer )
@@ -64,7 +64,7 @@ AttachmentListView::~AttachmentListView()
//-----------------------------------------------------------------------------
-void AttachmentListView::contentsDragEnterEvent( QDragEnterEvent* e )
+void AttachmentListView::contentsDragEnterEvent( TQDragEnterEvent* e )
{
if( e->provides( MailListDrag::format() ) || KURLDrag::canDecode( e ) )
e->accept( true );
@@ -74,7 +74,7 @@ void AttachmentListView::contentsDragEnterEvent( QDragEnterEvent* e )
//-----------------------------------------------------------------------------
-void AttachmentListView::contentsDragMoveEvent( QDragMoveEvent* e )
+void AttachmentListView::contentsDragMoveEvent( TQDragMoveEvent* e )
{
if( e->provides( MailListDrag::format() ) || KURLDrag::canDecode( e ) )
e->accept( true );
@@ -84,19 +84,19 @@ void AttachmentListView::contentsDragMoveEvent( QDragMoveEvent* e )
//-----------------------------------------------------------------------------
-void AttachmentListView::contentsDropEvent( QDropEvent* e )
+void AttachmentListView::contentsDropEvent( TQDropEvent* e )
{
if( e->provides( MailListDrag::format() ) ) {
// Decode the list of serial numbers stored as the drag data
- QByteArray serNums;
+ TQByteArray serNums;
MailListDrag::decode( e, serNums );
- QBuffer serNumBuffer( serNums );
+ TQBuffer serNumBuffer( serNums );
serNumBuffer.open( IO_ReadOnly );
- QDataStream serNumStream( &serNumBuffer );
+ TQDataStream serNumStream( &serNumBuffer );
Q_UINT32 serNum;
KMFolder *folder = 0;
int idx;
- QPtrList<KMMsgBase> messageList;
+ TQPtrList<KMMsgBase> messageList;
while( !serNumStream.atEnd() ) {
KMMsgBase *msgBase = 0;
serNumStream >> serNum;
@@ -128,7 +128,7 @@ void AttachmentListView::contentsDropEvent( QDropEvent* e )
//-----------------------------------------------------------------------------
-void AttachmentListView::keyPressEvent( QKeyEvent * e )
+void AttachmentListView::keyPressEvent( TQKeyEvent * e )
{
if ( e->key() == Key_Delete ) {
emit attachmentDeleted();
diff --git a/kmail/attachmentlistview.h b/kmail/attachmentlistview.h
index 23ee67135..cd9a6e560 100644
--- a/kmail/attachmentlistview.h
+++ b/kmail/attachmentlistview.h
@@ -31,17 +31,17 @@ class AttachmentListView : public KListView
{
Q_OBJECT
public:
- AttachmentListView( KMail::Composer * composer = 0, QWidget* parent = 0,
+ AttachmentListView( KMail::Composer * composer = 0, TQWidget* parent = 0,
const char* name = 0 );
virtual ~AttachmentListView();
/** Drag and drop methods */
- void contentsDragEnterEvent( QDragEnterEvent* );
- void contentsDragMoveEvent( QDragMoveEvent* );
- void contentsDropEvent( QDropEvent* );
+ void contentsDragEnterEvent( TQDragEnterEvent* );
+ void contentsDragMoveEvent( TQDragMoveEvent* );
+ void contentsDropEvent( TQDropEvent* );
protected:
- virtual void keyPressEvent( QKeyEvent * e );
+ virtual void keyPressEvent( TQKeyEvent * e );
virtual void startDrag();
private:
diff --git a/kmail/attachmentstrategy.cpp b/kmail/attachmentstrategy.cpp
index 37584d847..8d1e59a90 100644
--- a/kmail/attachmentstrategy.cpp
+++ b/kmail/attachmentstrategy.cpp
@@ -38,7 +38,7 @@
#include "partNode.h"
#include "kmmsgpart.h"
-#include <qstring.h>
+#include <tqstring.h>
#include <kdebug.h>
@@ -166,8 +166,8 @@ namespace KMail {
return 0; // make compiler happy
}
- const AttachmentStrategy * AttachmentStrategy::create( const QString & type ) {
- QString lowerType = type.lower();
+ const AttachmentStrategy * AttachmentStrategy::create( const TQString & type ) {
+ TQString lowerType = type.lower();
if ( lowerType == "iconic" ) return iconic();
//if ( lowerType == "smart" ) return smart(); // not needed, see below
if ( lowerType == "inlined" ) return inlined();
diff --git a/kmail/attachmentstrategy.h b/kmail/attachmentstrategy.h
index bcd29cfda..7d052b695 100644
--- a/kmail/attachmentstrategy.h
+++ b/kmail/attachmentstrategy.h
@@ -49,7 +49,7 @@ namespace KMail {
enum Type { Iconic, Smart, Inlined, Hidden };
static const AttachmentStrategy * create( Type type );
- static const AttachmentStrategy * create( const QString & type );
+ static const AttachmentStrategy * create( const TQString & type );
static const AttachmentStrategy * iconic();
static const AttachmentStrategy * smart();
diff --git a/kmail/bodypartformatterfactory.cpp b/kmail/bodypartformatterfactory.cpp
index 24ee2fba3..680d0c483 100644
--- a/kmail/bodypartformatterfactory.cpp
+++ b/kmail/bodypartformatterfactory.cpp
@@ -45,9 +45,9 @@ using namespace KMail::BodyPartFormatterFactoryPrivate;
#include <kdebug.h>
// Qt
-#include <qstring.h>
-#include <qcstring.h>
-#include <qstringlist.h>
+#include <tqstring.h>
+#include <tqcstring.h>
+#include <tqstringlist.h>
#include <assert.h>
@@ -108,9 +108,9 @@ static void loadPlugins() {
kdWarning( 5006 ) << "BodyPartFormatterFactory: cannot instantiate plugin loader!" << endl;
return;
}
- const QStringList types = pl->types();
+ const TQStringList types = pl->types();
kdDebug( 5006 ) << "BodyPartFormatterFactory: found " << types.size() << " plugins." << endl;
- for ( QStringList::const_iterator it = types.begin() ; it != types.end() ; ++it ) {
+ for ( TQStringList::const_iterator it = types.begin() ; it != types.end() ; ++it ) {
const KMail::Interface::BodyPartFormatterPlugin * plugin = pl->createForName( *it );
if ( !plugin ) {
kdWarning( 5006 ) << "BodyPartFormatterFactory: plugin \"" << *it << "\" is not valid!" << endl;
@@ -182,10 +182,10 @@ const KMail::Interface::BodyPartFormatter * KMail::BodyPartFormatterFactory::cre
return (*subtype_it).second;
}
-const KMail::Interface::BodyPartFormatter * KMail::BodyPartFormatterFactory::createFor( const QString & type, const QString & subtype ) const {
+const KMail::Interface::BodyPartFormatter * KMail::BodyPartFormatterFactory::createFor( const TQString & type, const TQString & subtype ) const {
return createFor( type.latin1(), subtype.latin1() );
}
-const KMail::Interface::BodyPartFormatter * KMail::BodyPartFormatterFactory::createFor( const QCString & type, const QCString & subtype ) const {
+const KMail::Interface::BodyPartFormatter * KMail::BodyPartFormatterFactory::createFor( const TQCString & type, const TQCString & subtype ) const {
return createFor( type.data(), subtype.data() );
}
diff --git a/kmail/bodypartformatterfactory.h b/kmail/bodypartformatterfactory.h
index 63f43bd7d..4763a7d8a 100644
--- a/kmail/bodypartformatterfactory.h
+++ b/kmail/bodypartformatterfactory.h
@@ -52,8 +52,8 @@ namespace KMail {
static const BodyPartFormatterFactory * instance();
const Interface::BodyPartFormatter * createFor( const char * type, const char * subtype ) const;
- const Interface::BodyPartFormatter * createFor( const QString & type, const QString & subtype ) const;
- const Interface::BodyPartFormatter * createFor( const QCString & type, const QCString & subtype ) const;
+ const Interface::BodyPartFormatter * createFor( const TQString & type, const TQString & subtype ) const;
+ const Interface::BodyPartFormatter * createFor( const TQCString & type, const TQCString & subtype ) const;
//
// Only boring stuff below:
diff --git a/kmail/bodypartformatterfactory_p.h b/kmail/bodypartformatterfactory_p.h
index 7171ba29f..7ca101aba 100644
--- a/kmail/bodypartformatterfactory_p.h
+++ b/kmail/bodypartformatterfactory_p.h
@@ -34,7 +34,7 @@
#ifndef __KMAIL_BODYPARTFORMATTERFACTORY_P_H__
#define __KMAIL_BODYPARTFORMATTERFACTORY_P_H__
-#include <qcstring.h>
+#include <tqcstring.h>
#include <map>
diff --git a/kmail/bodyvisitor.cpp b/kmail/bodyvisitor.cpp
index 99af66196..04b7a98b8 100644
--- a/kmail/bodyvisitor.cpp
+++ b/kmail/bodyvisitor.cpp
@@ -61,16 +61,16 @@ namespace KMail {
}
//-----------------------------------------------------------------------------
- void BodyVisitor::visit( QPtrList<KMMessagePart> & list )
+ void BodyVisitor::visit( TQPtrList<KMMessagePart> & list )
{
mParts = list;
}
//-----------------------------------------------------------------------------
- QPtrList<KMMessagePart> BodyVisitor::partsToLoad()
+ TQPtrList<KMMessagePart> BodyVisitor::partsToLoad()
{
- QPtrListIterator<KMMessagePart> it( mParts );
- QPtrList<KMMessagePart> selected;
+ TQPtrListIterator<KMMessagePart> it( mParts );
+ TQPtrList<KMMessagePart> selected;
KMMessagePart *part = 0;
bool headerCheck = false;
while ( (part = it.current()) != 0 )
@@ -100,7 +100,7 @@ namespace KMail {
// from imap. As we probably need to load the header (e.g. in smart or inline mode)
// we add a fake part that is not included in the message itself
KMMessagePart *fake = new KMMessagePart();
- QString partId = part->partSpecifier().section( '.', 0, -2 )+".HEADER";
+ TQString partId = part->partSpecifier().section( '.', 0, -2 )+".HEADER";
fake->setPartSpecifier( partId );
fake->setOriginalContentTypeStr("");
fake->setLoadPart( true );
diff --git a/kmail/bodyvisitor.h b/kmail/bodyvisitor.h
index fa5d2fb5f..519dd86c9 100644
--- a/kmail/bodyvisitor.h
+++ b/kmail/bodyvisitor.h
@@ -31,8 +31,8 @@
#ifndef bodyiterator_h
#define bodyiterator_h
-#include <qptrlist.h>
-#include <qstringlist.h>
+#include <tqptrlist.h>
+#include <tqstringlist.h>
class KMMessagePart;
@@ -49,10 +49,10 @@ namespace KMail {
/** Register the parts that should be visited */
void visit( KMMessagePart * part );
- void visit( QPtrList<KMMessagePart> & list );
+ void visit( TQPtrList<KMMessagePart> & list );
/** Returns a list of parts that should be loaded */
- QPtrList<KMMessagePart> partsToLoad();
+ TQPtrList<KMMessagePart> partsToLoad();
/** Decides whether a part should be loaded.
This needs to be implemented by a subclass */
@@ -66,8 +66,8 @@ namespace KMail {
static bool parentNeedsLoading( KMMessagePart * part );
protected:
- QPtrList<KMMessagePart> mParts;
- QStringList mBasicList;
+ TQPtrList<KMMessagePart> mParts;
+ TQStringList mBasicList;
};
// Factory to create a visitor according to the Attachment Strategy
diff --git a/kmail/cachedimapjob.cpp b/kmail/cachedimapjob.cpp
index 8c6339612..3b8ff4115 100644
--- a/kmail/cachedimapjob.cpp
+++ b/kmail/cachedimapjob.cpp
@@ -57,35 +57,35 @@
namespace KMail {
// Get messages
-CachedImapJob::CachedImapJob( const QValueList<MsgForDownload>& msgs,
+CachedImapJob::CachedImapJob( const TQValueList<MsgForDownload>& msgs,
JobType type, KMFolderCachedImap* folder )
: FolderJob( type ), mFolder( folder ), mMsgsForDownload( msgs ),
mTotalBytes(0), mMsg(0), mParentFolder( 0 )
{
- QValueList<MsgForDownload>::ConstIterator it = msgs.begin();
+ TQValueList<MsgForDownload>::ConstIterator it = msgs.begin();
for ( ; it != msgs.end() ; ++it )
mTotalBytes += (*it).size;
}
// Put messages
-CachedImapJob::CachedImapJob( const QPtrList<KMMessage>& msgs, JobType type,
+CachedImapJob::CachedImapJob( const TQPtrList<KMMessage>& msgs, JobType type,
KMFolderCachedImap* folder )
- : FolderJob( msgs, QString::null, type, folder?folder->folder():0 ), mFolder( folder ),
+ : FolderJob( msgs, TQString::null, type, folder?folder->folder():0 ), mFolder( folder ),
mTotalBytes( msgs.count() ), // we abuse it as "total number of messages"
mMsg( 0 ), mParentFolder( 0 )
{
}
-CachedImapJob::CachedImapJob( const QValueList<unsigned long>& msgs,
+CachedImapJob::CachedImapJob( const TQValueList<unsigned long>& msgs,
JobType type, KMFolderCachedImap* folder )
- : FolderJob( QPtrList<KMMessage>(), QString::null, type, folder?folder->folder():0 ),
+ : FolderJob( TQPtrList<KMMessage>(), TQString::null, type, folder?folder->folder():0 ),
mFolder( folder ), mSerNumMsgList( msgs ), mTotalBytes( msgs.count() ), mMsg( 0 ),
mParentFolder ( 0 )
{
}
// Add sub folders
-CachedImapJob::CachedImapJob( const QValueList<KMFolderCachedImap*>& fList,
+CachedImapJob::CachedImapJob( const TQValueList<KMFolderCachedImap*>& fList,
JobType type, KMFolderCachedImap* folder )
: FolderJob( type ), mFolder( folder ), mFolderList( fList ), mMsg( 0 ),
mParentFolder ( 0 )
@@ -93,7 +93,7 @@ CachedImapJob::CachedImapJob( const QValueList<KMFolderCachedImap*>& fList,
}
// Rename folder
-CachedImapJob::CachedImapJob( const QString& string1, JobType type,
+CachedImapJob::CachedImapJob( const TQString& string1, JobType type,
KMFolderCachedImap* folder )
: FolderJob( type ), mFolder(folder), mMsg( 0 ), mString( string1 ),
mParentFolder ( 0 )
@@ -103,7 +103,7 @@ CachedImapJob::CachedImapJob( const QString& string1, JobType type,
}
// Delete folders or messages
-CachedImapJob::CachedImapJob( const QStringList& foldersOrMsgs, JobType type,
+CachedImapJob::CachedImapJob( const TQStringList& foldersOrMsgs, JobType type,
KMFolderCachedImap* folder )
: FolderJob( type ), mFolder( folder ), mFoldersOrMessages( foldersOrMsgs ),
mMsg( 0 ), mParentFolder( 0 )
@@ -155,11 +155,11 @@ void CachedImapJob::execute()
*/
if ( mAccount->groupwareType() == KMAcctCachedImap::GroupwareScalix ) {
if ( !mAccount->sentCustomLoginCommand() ) {
- QByteArray packedArgs;
- QDataStream stream( packedArgs, IO_WriteOnly );
+ TQByteArray packedArgs;
+ TQDataStream stream( packedArgs, IO_WriteOnly );
- const QString command = QString( "X-SCALIX-ID " );
- const QString argument = QString( "(\"name\" \"Evolution\" \"version\" \"2.10.0\")" );
+ const TQString command = TQString( "X-SCALIX-ID " );
+ const TQString argument = TQString( "(\"name\" \"Evolution\" \"version\" \"2.10.0\")" );
stream << (int) 'X' << 'N' << command << argument;
@@ -200,11 +200,11 @@ void CachedImapJob::listMessages()
ImapAccountBase::jobData jd( url.url(), mFolder->folder() );
jd.cancellable = true;
mAccount->insertJob( job, jd );
- connect( job, SIGNAL( result(KIO::Job *) ),
- this, SLOT( slotListMessagesResult( KIO::Job* ) ) );
+ connect( job, TQT_SIGNAL( result(KIO::Job *) ),
+ this, TQT_SLOT( slotListMessagesResult( KIO::Job* ) ) );
// send the data directly for KMFolderCachedImap
- connect( job, SIGNAL( data( KIO::Job*, const QByteArray& ) ),
- mFolder, SLOT( slotGetMessagesData( KIO::Job* , const QByteArray& ) ) );
+ connect( job, TQT_SIGNAL( data( KIO::Job*, const TQByteArray& ) ),
+ mFolder, TQT_SLOT( slotGetMessagesData( KIO::Job* , const TQByteArray& ) ) );
}
void CachedImapJob::slotDeleteNextMessages( KIO::Job* job )
@@ -230,32 +230,32 @@ void CachedImapJob::slotDeleteNextMessages( KIO::Job* job )
return;
}
- QString uids = mFoldersOrMessages.front(); mFoldersOrMessages.pop_front();
+ TQString uids = mFoldersOrMessages.front(); mFoldersOrMessages.pop_front();
KURL url = mAccount->getUrl();
url.setPath( mFolder->imapPath() +
- QString::fromLatin1(";UID=%1").arg(uids) );
+ TQString::fromLatin1(";UID=%1").arg(uids) );
KIO::SimpleJob *simpleJob = KIO::file_delete( url, false );
KIO::Scheduler::assignJobToSlave( mAccount->slave(), simpleJob );
ImapAccountBase::jobData jd( url.url(), mFolder->folder() );
mAccount->insertJob( simpleJob, jd );
- connect( simpleJob, SIGNAL( result(KIO::Job *) ),
- this, SLOT( slotDeleteNextMessages(KIO::Job *) ) );
+ connect( simpleJob, TQT_SIGNAL( result(KIO::Job *) ),
+ this, TQT_SLOT( slotDeleteNextMessages(KIO::Job *) ) );
}
void CachedImapJob::expungeFolder()
{
KURL url = mAccount->getUrl();
// Special URL that means EXPUNGE
- url.setPath( mFolder->imapPath() + QString::fromLatin1(";UID=*") );
+ url.setPath( mFolder->imapPath() + TQString::fromLatin1(";UID=*") );
KIO::SimpleJob *job = KIO::file_delete( url, false );
KIO::Scheduler::assignJobToSlave( mAccount->slave(), job );
ImapAccountBase::jobData jd( url.url(), mFolder->folder() );
mAccount->insertJob( job, jd );
- connect( job, SIGNAL( result(KIO::Job *) ),
- this, SLOT( slotExpungeResult(KIO::Job *) ) );
+ connect( job, TQT_SIGNAL( result(KIO::Job *) ),
+ this, TQT_SLOT( slotExpungeResult(KIO::Job *) ) );
}
void CachedImapJob::slotExpungeResult( KIO::Job * job )
@@ -341,7 +341,7 @@ void CachedImapJob::slotGetNextMessage(KIO::Job * job)
if( mfd.flags > 0 )
KMFolderImap::flagsToStatus(mMsg, mfd.flags, true, GlobalSettings::allowLocalFlags() ? mFolder->permanentFlags() : INT_MAX);
KURL url = mAccount->getUrl();
- url.setPath(mFolder->imapPath() + QString(";UID=%1;SECTION=BODY.PEEK[]").arg(mfd.uid));
+ url.setPath(mFolder->imapPath() + TQString(";UID=%1;SECTION=BODY.PEEK[]").arg(mfd.uid));
ImapAccountBase::jobData jd( url.url(), mFolder->folder() );
jd.cancellable = true;
@@ -349,12 +349,12 @@ void CachedImapJob::slotGetNextMessage(KIO::Job * job)
KIO::SimpleJob *simpleJob = KIO::get(url, false, false);
KIO::Scheduler::assignJobToSlave(mAccount->slave(), simpleJob);
mAccount->insertJob(simpleJob, jd);
- connect(simpleJob, SIGNAL(processedSize(KIO::Job *, KIO::filesize_t)),
- this, SLOT(slotProcessedSize(KIO::Job *, KIO::filesize_t)));
- connect(simpleJob, SIGNAL(result(KIO::Job *)),
- this, SLOT(slotGetNextMessage(KIO::Job *)));
- connect(simpleJob, SIGNAL(data(KIO::Job *, const QByteArray &)),
- mFolder, SLOT(slotSimpleData(KIO::Job *, const QByteArray &)));
+ connect(simpleJob, TQT_SIGNAL(processedSize(KIO::Job *, KIO::filesize_t)),
+ this, TQT_SLOT(slotProcessedSize(KIO::Job *, KIO::filesize_t)));
+ connect(simpleJob, TQT_SIGNAL(result(KIO::Job *)),
+ this, TQT_SLOT(slotGetNextMessage(KIO::Job *)));
+ connect(simpleJob, TQT_SIGNAL(data(KIO::Job *, const TQByteArray &)),
+ mFolder, TQT_SLOT(slotSimpleData(KIO::Job *, const TQByteArray &)));
}
void CachedImapJob::slotProcessedSize(KIO::Job *, KIO::filesize_t processed)
@@ -394,17 +394,17 @@ void CachedImapJob::slotPutNextMessage()
}
KURL url = mAccount->getUrl();
- QString flags = KMFolderImap::statusToFlags( mMsg->status(), mFolder->permanentFlags() );
+ TQString flags = KMFolderImap::statusToFlags( mMsg->status(), mFolder->permanentFlags() );
url.setPath( mFolder->imapPath() + ";SECTION=" + flags );
ImapAccountBase::jobData jd( url.url(), mFolder->folder() );
mMsg->setUID( 0 ); // for the index
- QCString cstr(mMsg->asString());
+ TQCString cstr(mMsg->asString());
int a = cstr.find("\nX-UID: ");
int b = cstr.find('\n', a);
if (a != -1 && b != -1 && cstr.find("\n\n") > a) cstr.remove(a, b-a);
- QCString mData(cstr.length() + cstr.contains('\n'));
+ TQCString mData(cstr.length() + cstr.contains('\n'));
unsigned int i = 0;
for( char *ch = cstr.data(); *ch; ch++ ) {
if ( *ch == '\n' ) {
@@ -420,20 +420,20 @@ void CachedImapJob::slotPutNextMessage()
KIO::SimpleJob *simpleJob = KIO::put(url, 0, false, false, false);
KIO::Scheduler::assignJobToSlave(mAccount->slave(), simpleJob);
mAccount->insertJob(simpleJob, jd);
- connect( simpleJob, SIGNAL( result(KIO::Job *) ),
- SLOT( slotPutMessageResult(KIO::Job *) ) );
- connect( simpleJob, SIGNAL( dataReq(KIO::Job *, QByteArray &) ),
- SLOT( slotPutMessageDataReq(KIO::Job *, QByteArray &) ) );
- connect( simpleJob, SIGNAL( data(KIO::Job *, const QByteArray &) ),
- mFolder, SLOT( slotSimpleData(KIO::Job *, const QByteArray &) ) );
- connect( simpleJob, SIGNAL(infoMessage(KIO::Job *, const QString &)),
- SLOT(slotPutMessageInfoData(KIO::Job *, const QString &)) );
+ connect( simpleJob, TQT_SIGNAL( result(KIO::Job *) ),
+ TQT_SLOT( slotPutMessageResult(KIO::Job *) ) );
+ connect( simpleJob, TQT_SIGNAL( dataReq(KIO::Job *, TQByteArray &) ),
+ TQT_SLOT( slotPutMessageDataReq(KIO::Job *, TQByteArray &) ) );
+ connect( simpleJob, TQT_SIGNAL( data(KIO::Job *, const TQByteArray &) ),
+ mFolder, TQT_SLOT( slotSimpleData(KIO::Job *, const TQByteArray &) ) );
+ connect( simpleJob, TQT_SIGNAL(infoMessage(KIO::Job *, const TQString &)),
+ TQT_SLOT(slotPutMessageInfoData(KIO::Job *, const TQString &)) );
}
//-----------------------------------------------------------------------------
// TODO: port to KIO::StoredTransferJob once it's ok to require kdelibs-3.3
-void CachedImapJob::slotPutMessageDataReq(KIO::Job *job, QByteArray &data)
+void CachedImapJob::slotPutMessageDataReq(KIO::Job *job, TQByteArray &data)
{
KMAcctCachedImap::JobIterator it = mAccount->findJob(job);
if ( it == mAccount->jobsEnd() ) { // Shouldn't happen
@@ -452,7 +452,7 @@ void CachedImapJob::slotPutMessageDataReq(KIO::Job *job, QByteArray &data)
}
//----------------------------------------------------------------------------
-void CachedImapJob::slotPutMessageInfoData(KIO::Job *job, const QString &data)
+void CachedImapJob::slotPutMessageInfoData(KIO::Job *job, const TQString &data)
{
KMFolderCachedImap * imapFolder = static_cast<KMFolderCachedImap*>(mDestFolder->storage());
KMAcctCachedImap *account = imapFolder->account();
@@ -535,7 +535,7 @@ void CachedImapJob::slotAddNextSubfolder( KIO::Job * job )
static_cast<KMFolderCachedImap*>((*it).parent->storage())->setSilentUpload( false );
if ( job->error() && !silentUpload ) {
- QString myError = "<p><b>" + i18n("Error while uploading folder")
+ TQString myError = "<p><b>" + i18n("Error while uploading folder")
+ "</b></p><p>" + i18n("Could not make the folder <b>%1</b> on the server.").arg((*it).items[0])
+ "</p><p>" + i18n("This could be because you do not have permission to do this, or because the folder is already present on the server; the error message from the server communication is here:") + "</p>";
mAccount->handleJobError( job, myError );
@@ -550,7 +550,7 @@ void CachedImapJob::slotAddNextSubfolder( KIO::Job * job )
Q_ASSERT( storage );
Q_ASSERT( parentStorage );
if ( storage->imapPath().isEmpty() ) {
- QString path = mAccount->createImapPath( parentStorage->imapPath(), storage->folder()->name() );
+ TQString path = mAccount->createImapPath( parentStorage->imapPath(), storage->folder()->name() );
if ( !storage->imapPathForCreation().isEmpty() )
path = storage->imapPathForCreation();
storage->setImapPath( path );
@@ -569,7 +569,7 @@ void CachedImapJob::slotAddNextSubfolder( KIO::Job * job )
KMFolderCachedImap *folder = mFolderList.front();
mFolderList.pop_front();
KURL url = mAccount->getUrl();
- QString path = mAccount->createImapPath( mFolder->imapPath(),
+ TQString path = mAccount->createImapPath( mFolder->imapPath(),
folder->folder()->name() );
if ( !folder->imapPathForCreation().isEmpty() ) {
// the folder knows it's namespace
@@ -587,14 +587,14 @@ void CachedImapJob::slotAddNextSubfolder( KIO::Job * job )
KIO::SimpleJob *simpleJob = KIO::mkdir(url);
KIO::Scheduler::assignJobToSlave(mAccount->slave(), simpleJob);
mAccount->insertJob(simpleJob, jd);
- connect( simpleJob, SIGNAL(result(KIO::Job *)),
- this, SLOT(slotAddNextSubfolder(KIO::Job *)) );
+ connect( simpleJob, TQT_SIGNAL(result(KIO::Job *)),
+ this, TQT_SLOT(slotAddNextSubfolder(KIO::Job *)) );
} else {
- QByteArray packedArgs;
- QDataStream stream( packedArgs, IO_WriteOnly );
+ TQByteArray packedArgs;
+ TQDataStream stream( packedArgs, IO_WriteOnly );
- const QString command = QString( "X-CREATE-SPECIAL" );
- const QString argument = QString( "%1 %2" ).arg( Scalix::Utils::contentsTypeToScalixId( folder->contentsType() ) )
+ const TQString command = TQString( "X-CREATE-SPECIAL" );
+ const TQString argument = TQString( "%1 %2" ).arg( Scalix::Utils::contentsTypeToScalixId( folder->contentsType() ) )
.arg( path );
stream << (int) 'X' << 'N' << command << argument;
@@ -605,8 +605,8 @@ void CachedImapJob::slotAddNextSubfolder( KIO::Job * job )
KIO::SimpleJob *simpleJob = KIO::special( url.url(), packedArgs, false );
KIO::Scheduler::assignJobToSlave(mAccount->slave(), simpleJob);
mAccount->insertJob(simpleJob, jd);
- connect( simpleJob, SIGNAL(result(KIO::Job *)),
- this, SLOT(slotAddNextSubfolder(KIO::Job *)) );
+ connect( simpleJob, TQT_SIGNAL(result(KIO::Job *)),
+ this, TQT_SLOT(slotAddNextSubfolder(KIO::Job *)) );
}
}
@@ -636,7 +636,7 @@ void CachedImapJob::slotDeleteNextFolder( KIO::Job *job )
return;
}
- QString folderPath = mFoldersOrMessages.front();
+ TQString folderPath = mFoldersOrMessages.front();
mFoldersOrMessages.pop_front();
KURL url = mAccount->getUrl();
url.setPath(folderPath);
@@ -645,8 +645,8 @@ void CachedImapJob::slotDeleteNextFolder( KIO::Job *job )
KIO::SimpleJob *simpleJob = KIO::file_delete(url, false);
KIO::Scheduler::assignJobToSlave(mAccount->slave(), simpleJob);
mAccount->insertJob(simpleJob, jd);
- connect( simpleJob, SIGNAL( result(KIO::Job *) ),
- SLOT( slotDeleteNextFolder(KIO::Job *) ) );
+ connect( simpleJob, TQT_SIGNAL( result(KIO::Job *) ),
+ TQT_SLOT( slotDeleteNextFolder(KIO::Job *) ) );
}
void CachedImapJob::checkUidValidity()
@@ -660,10 +660,10 @@ void CachedImapJob::checkUidValidity()
KIO::SimpleJob *job = KIO::get( url, false, false );
KIO::Scheduler::assignJobToSlave( mAccount->slave(), job );
mAccount->insertJob( job, jd );
- connect( job, SIGNAL(result(KIO::Job *)),
- SLOT(slotCheckUidValidityResult(KIO::Job *)) );
- connect( job, SIGNAL(data(KIO::Job *, const QByteArray &)),
- mFolder, SLOT(slotSimpleData(KIO::Job *, const QByteArray &)));
+ connect( job, TQT_SIGNAL(result(KIO::Job *)),
+ TQT_SLOT(slotCheckUidValidityResult(KIO::Job *)) );
+ connect( job, TQT_SIGNAL(data(KIO::Job *, const TQByteArray &)),
+ mFolder, TQT_SLOT(slotSimpleData(KIO::Job *, const TQByteArray &)));
}
void CachedImapJob::slotCheckUidValidityResult(KIO::Job * job)
@@ -682,7 +682,7 @@ void CachedImapJob::slotCheckUidValidityResult(KIO::Job * job)
}
// Check the uidValidity
- QCString cstr((*it).data.data(), (*it).data.size() + 1);
+ TQCString cstr((*it).data.data(), (*it).data.size() + 1);
int a = cstr.find("X-uidValidity: ");
if (a < 0) {
// Something is seriously rotten here!
@@ -693,7 +693,7 @@ void CachedImapJob::slotCheckUidValidityResult(KIO::Job * job)
else {
int b = cstr.find("\r\n", a);
if ( (b - a - 15) >= 0 ) {
- QString uidv = cstr.mid(a + 15, b - a - 15);
+ TQString uidv = cstr.mid(a + 15, b - a - 15);
// kdDebug(5006) << "New uidv = " << uidv << ", old uidv = "
// << mFolder->uidValidity() << endl;
if( !mFolder->uidValidity().isEmpty() && mFolder->uidValidity() != uidv ) {
@@ -726,7 +726,7 @@ void CachedImapJob::slotCheckUidValidityResult(KIO::Job * job)
}
-void CachedImapJob::renameFolder( const QString &newName )
+void CachedImapJob::renameFolder( const TQString &newName )
{
// Set the source URL
KURL urlSrc = mAccount->getUrl();
@@ -734,7 +734,7 @@ void CachedImapJob::renameFolder( const QString &newName )
// Set the destination URL - this is a bit trickier
KURL urlDst = mAccount->getUrl();
- QString imapPath( mFolder->imapPath() );
+ TQString imapPath( mFolder->imapPath() );
// Destination url = old imappath - oldname + new name
imapPath.truncate( imapPath.length() - mFolder->folder()->name().length() - 1);
imapPath += newName + '/';
@@ -746,12 +746,12 @@ void CachedImapJob::renameFolder( const QString &newName )
KIO::SimpleJob *simpleJob = KIO::rename( urlSrc, urlDst, false );
KIO::Scheduler::assignJobToSlave( mAccount->slave(), simpleJob );
mAccount->insertJob( simpleJob, jd );
- connect( simpleJob, SIGNAL(result(KIO::Job *)),
- SLOT(slotRenameFolderResult(KIO::Job *)) );
+ connect( simpleJob, TQT_SIGNAL(result(KIO::Job *)),
+ TQT_SLOT(slotRenameFolderResult(KIO::Job *)) );
}
-static void renameChildFolders( KMFolderDir* dir, const QString& oldPath,
- const QString& newPath )
+static void renameChildFolders( KMFolderDir* dir, const TQString& oldPath,
+ const TQString& newPath )
{
if( dir ) {
KMFolderNode *node = dir->first();
@@ -762,7 +762,7 @@ static void renameChildFolders( KMFolderDir* dir, const QString& oldPath,
if ( !imapFolder->imapPath().isEmpty() )
// Only rename folders that have been accepted by the server
if( imapFolder->imapPath().find( oldPath ) == 0 ) {
- QString p = imapFolder->imapPath();
+ TQString p = imapFolder->imapPath();
p = p.mid( oldPath.length() );
p.prepend( newPath );
imapFolder->setImapPath( p );
@@ -785,7 +785,7 @@ void CachedImapJob::slotRenameFolderResult( KIO::Job *job )
if( job->error() ) {
// Error, revert label change
- QMap<QString, KMAcctCachedImap::RenamedFolder>::ConstIterator renit = mAccount->renamedFolders().find( mFolder->imapPath() );
+ TQMap<TQString, KMAcctCachedImap::RenamedFolder>::ConstIterator renit = mAccount->renamedFolders().find( mFolder->imapPath() );
Q_ASSERT( renit != mAccount->renamedFolders().end() );
if ( renit != mAccount->renamedFolders().end() ) {
mFolder->folder()->setLabel( (*renit).mOldLabel );
@@ -795,14 +795,14 @@ void CachedImapJob::slotRenameFolderResult( KIO::Job *job )
} else {
// Okay, the folder seems to be renamed on the server,
// now rename it on disk
- QString oldName = mFolder->name();
- QString oldPath = mFolder->imapPath();
+ TQString oldName = mFolder->name();
+ TQString oldPath = mFolder->imapPath();
mAccount->removeRenamedFolder( oldPath );
mFolder->setImapPath( (*it).path );
mFolder->FolderStorage::rename( (*it).url );
if( oldPath.endsWith( "/" ) ) oldPath.truncate( oldPath.length() -1 );
- QString newPath = mFolder->imapPath();
+ TQString newPath = mFolder->imapPath();
if( newPath.endsWith( "/" ) ) newPath.truncate( newPath.length() -1 );
renameChildFolders( mFolder->folder()->child(), oldPath, newPath );
kmkernel->dimapFolderMgr()->contentsChanged();
diff --git a/kmail/cachedimapjob.h b/kmail/cachedimapjob.h
index ad5579a02..6581ec742 100644
--- a/kmail/cachedimapjob.h
+++ b/kmail/cachedimapjob.h
@@ -48,9 +48,9 @@
#include <kio/job.h>
#include <kio/global.h>
-#include <qptrlist.h>
-#include <qvaluelist.h>
-#include <qcstring.h>
+#include <tqptrlist.h>
+#include <tqvaluelist.h>
+#include <tqcstring.h>
class KMFolderCachedImap;
class KMAcctCachedImap;
@@ -63,7 +63,7 @@ class CachedImapJob : public FolderJob {
public:
/** Information about a message to be downloaded (from the 'IMAP envelope') */
struct MsgForDownload {
- MsgForDownload() : uid(0),flags(0),size(0) {} // for QValueList only
+ MsgForDownload() : uid(0),flags(0),size(0) {} // for TQValueList only
MsgForDownload( ulong _uid, int _flags, ulong _size )
: uid(_uid), flags(_flags), size(_size) {}
ulong uid;
@@ -72,22 +72,22 @@ public:
};
// Get messages
- CachedImapJob( const QValueList<MsgForDownload>& msgs,
+ CachedImapJob( const TQValueList<MsgForDownload>& msgs,
JobType type = tGetMessage, KMFolderCachedImap* folder = 0 );
// Put messages
- CachedImapJob( const QPtrList<KMMessage>& msgs,
+ CachedImapJob( const TQPtrList<KMMessage>& msgs,
JobType type, KMFolderCachedImap* folder=0 );
- CachedImapJob( const QValueList<unsigned long>& msgs,
+ CachedImapJob( const TQValueList<unsigned long>& msgs,
JobType type, KMFolderCachedImap* folder=0 );
// Add sub folders
- CachedImapJob( const QValueList<KMFolderCachedImap*>& folders,
+ CachedImapJob( const TQValueList<KMFolderCachedImap*>& folders,
JobType type = tAddSubfolders,
KMFolderCachedImap* folder = 0 );
// Rename folder
- CachedImapJob( const QString& string1, JobType type,
+ CachedImapJob( const TQString& string1, JobType type,
KMFolderCachedImap* folder );
// Delete folders or messages
- CachedImapJob( const QStringList& foldersOrMsgs, JobType type,
+ CachedImapJob( const TQStringList& foldersOrMsgs, JobType type,
KMFolderCachedImap* folder );
// Other jobs (list messages,expunge folder, check uid validity)
CachedImapJob( JobType type, KMFolderCachedImap* folder );
@@ -104,16 +104,16 @@ protected:
virtual void execute();
void expungeFolder();
void checkUidValidity();
- void renameFolder( const QString &newName );
+ void renameFolder( const TQString &newName );
void listMessages();
protected slots:
virtual void slotGetNextMessage( KIO::Job *job = 0 );
virtual void slotAddNextSubfolder( KIO::Job *job = 0 );
virtual void slotPutNextMessage();
- virtual void slotPutMessageDataReq( KIO::Job *job, QByteArray &data );
+ virtual void slotPutMessageDataReq( KIO::Job *job, TQByteArray &data );
virtual void slotPutMessageResult( KIO::Job *job );
- virtual void slotPutMessageInfoData(KIO::Job *, const QString &data);
+ virtual void slotPutMessageInfoData(KIO::Job *, const TQString &data);
virtual void slotExpungeResult( KIO::Job *job );
virtual void slotDeleteNextFolder( KIO::Job *job = 0 );
virtual void slotCheckUidValidityResult( KIO::Job *job );
@@ -125,14 +125,14 @@ protected slots:
private:
KMFolderCachedImap *mFolder;
KMAcctCachedImap *mAccount;
- QValueList<KMFolderCachedImap*> mFolderList;
- QValueList<MsgForDownload> mMsgsForDownload;
- QValueList<unsigned long> mSerNumMsgList;
+ TQValueList<KMFolderCachedImap*> mFolderList;
+ TQValueList<MsgForDownload> mMsgsForDownload;
+ TQValueList<unsigned long> mSerNumMsgList;
ulong mSentBytes; // previous messages
ulong mTotalBytes;
- QStringList mFoldersOrMessages; // Folder deletion: path list. Message deletion: sets of uids
+ TQStringList mFoldersOrMessages; // Folder deletion: path list. Message deletion: sets of uids
KMMessage* mMsg;
- QString mString; // Used as uids and as rename target
+ TQString mString; // Used as uids and as rename target
KMFolderCachedImap *mParentFolder;
};
diff --git a/kmail/callback.cpp b/kmail/callback.cpp
index e124e0cc0..0e25758c1 100644
--- a/kmail/callback.cpp
+++ b/kmail/callback.cpp
@@ -56,8 +56,8 @@ Callback::Callback( KMMessage* msg, KMReaderWin* readerWin )
{
}
-bool Callback::mailICal( const QString& to, const QString &iCal,
- const QString& subject, const QString &status,
+bool Callback::mailICal( const TQString& to, const TQString &iCal,
+ const TQString& subject, const TQString &status,
bool delMessage ) const
{
kdDebug(5006) << "Mailing message:\n" << iCal << endl;
@@ -66,14 +66,14 @@ bool Callback::mailICal( const QString& to, const QString &iCal,
msg->initHeader();
msg->setSubject( subject );
if ( GlobalSettings::self()->exchangeCompatibleInvitations() ) {
- if ( status == QString("cancel") )
- msg->setSubject( QString("Declined: %1").arg(subject).replace("Answer: ","") );
- else if ( status == QString("tentative") )
- msg->setSubject(QString("Tentative: %1").arg(subject).replace("Answer: ","") );
- else if ( status == QString("accepted") )
- msg->setSubject( QString("Accepted: %1").arg(subject).replace("Answer: ","") );
- else if ( status == QString("delegated") )
- msg->setSubject( QString("Delegated: %1").arg(subject).replace("Answer: ","") );
+ if ( status == TQString("cancel") )
+ msg->setSubject( TQString("Declined: %1").arg(subject).replace("Answer: ","") );
+ else if ( status == TQString("tentative") )
+ msg->setSubject(TQString("Tentative: %1").arg(subject).replace("Answer: ","") );
+ else if ( status == TQString("accepted") )
+ msg->setSubject( TQString("Accepted: %1").arg(subject).replace("Answer: ","") );
+ else if ( status == TQString("delegated") )
+ msg->setSubject( TQString("Delegated: %1").arg(subject).replace("Answer: ","") );
}
msg->setTo( to );
msg->setFrom( receiver() );
@@ -99,7 +99,7 @@ bool Callback::mailICal( const QString& to, const QString &iCal,
if( identity != KPIM::Identity::null() ) {
// Identity found. Use this
msg->setFrom( identity.fullEmailAddr() );
- msg->setHeaderField("X-KMail-Identity", QString::number( identity.uoid() ));
+ msg->setHeaderField("X-KMail-Identity", TQString::number( identity.uoid() ));
}
// Remove BCC from identity on ical invitations (https://intevation.de/roundup/kolab/issue474)
msg->setBcc( "" );
@@ -136,7 +136,7 @@ bool Callback::mailICal( const QString& to, const QString &iCal,
return true;
}
-QString Callback::receiver() const
+TQString Callback::receiver() const
{
if ( mReceiverSet )
// Already figured this out
@@ -144,9 +144,9 @@ QString Callback::receiver() const
mReceiverSet = true;
- QStringList addrs = KPIM::splitEmailAddrList( mMsg->to() );
+ TQStringList addrs = KPIM::splitEmailAddrList( mMsg->to() );
int found = 0;
- for( QStringList::Iterator it = addrs.begin(); it != addrs.end(); ++it ) {
+ for( TQStringList::Iterator it = addrs.begin(); it != addrs.end(); ++it ) {
if( kmkernel->identityManager()->identityForAddress( *it ) !=
KPIM::Identity::null() ) {
// Ok, this could be us
@@ -154,8 +154,8 @@ QString Callback::receiver() const
mReceiver = *it;
}
}
- QStringList ccaddrs = KPIM::splitEmailAddrList( mMsg->cc() );
- for( QStringList::Iterator it = ccaddrs.begin(); it != ccaddrs.end(); ++it ) {
+ TQStringList ccaddrs = KPIM::splitEmailAddrList( mMsg->cc() );
+ for( TQStringList::Iterator it = ccaddrs.begin(); it != ccaddrs.end(); ++it ) {
if( kmkernel->identityManager()->identityForAddress( *it ) !=
KPIM::Identity::null() ) {
// Ok, this could be us
@@ -165,7 +165,7 @@ QString Callback::receiver() const
}
if( found != 1 ) {
bool ok;
- QString selectMessage;
+ TQString selectMessage;
if (found == 0) {
selectMessage = i18n("<qt>None of your identities match the "
"receiver of this message,<br>please "
@@ -184,7 +184,7 @@ QString Callback::receiver() const
selectMessage,
addrs+ccaddrs, 0, FALSE, &ok, kmkernel->mainWin() );
if( !ok )
- mReceiver = QString::null;
+ mReceiver = TQString::null;
}
return mReceiver;
@@ -213,7 +213,7 @@ bool Callback::deleteInvitationAfterReply() const
return GlobalSettings::self()->deleteInvitationEmailsAfterSendingReply();
}
-QString Callback::sender() const
+TQString Callback::sender() const
{
return mMsg->from();
}
diff --git a/kmail/callback.h b/kmail/callback.h
index b66903bfc..9bd188899 100644
--- a/kmail/callback.h
+++ b/kmail/callback.h
@@ -33,7 +33,7 @@
#ifndef CALLBACK_H
#define CALLBACK_H
-#include <qstring.h>
+#include <tqstring.h>
class KMMessage;
class KMReaderWin;
@@ -62,15 +62,15 @@ public:
/** Mail a message
* @ param status can be accepted/cancel/tentative/delegated
*/
- bool mailICal( const QString &to, const QString &iCal,
- const QString &subject, const QString &status,
+ bool mailICal( const TQString &to, const TQString &iCal,
+ const TQString &subject, const TQString &status,
bool delMessage = true ) const;
/** Get the receiver of the mail */
- QString receiver() const;
+ TQString receiver() const;
/** Returns the sender of the mail. */
- QString sender() const;
+ TQString sender() const;
/** Close the main window showing this message, if it's a secondary window. */
void closeIfSecondaryWindow() const;
@@ -81,7 +81,7 @@ public:
private:
KMMessage* mMsg;
KMReaderWin* mReaderWin;
- mutable QString mReceiver;
+ mutable TQString mReceiver;
mutable bool mReceiverSet;
};
diff --git a/kmail/chiasmuskeyselector.cpp b/kmail/chiasmuskeyselector.cpp
index aac44362f..6c82c379a 100644
--- a/kmail/chiasmuskeyselector.cpp
+++ b/kmail/chiasmuskeyselector.cpp
@@ -4,19 +4,19 @@
#include <klistbox.h>
#include <klocale.h>
-#include <qlayout.h>
-#include <qlabel.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
-ChiasmusKeySelector::ChiasmusKeySelector( QWidget* parent, const QString& caption,
- const QStringList& keys, const QString& currentKey,
- const QString& lastOptions )
+ChiasmusKeySelector::ChiasmusKeySelector( TQWidget* parent, const TQString& caption,
+ const TQStringList& keys, const TQString& currentKey,
+ const TQString& lastOptions )
: KDialogBase( parent, "chiasmusKeySelector", true, caption, Ok|Cancel, Ok, true )
{
- QWidget *page = makeMainWidget();
+ TQWidget *page = makeMainWidget();
- QVBoxLayout *layout = new QVBoxLayout(page, KDialog::spacingHint());
+ TQVBoxLayout *layout = new TQVBoxLayout(page, KDialog::spacingHint());
- mLabel = new QLabel( i18n( "Please select the Chiasmus key file to use:" ), page );
+ mLabel = new TQLabel( i18n( "Please select the Chiasmus key file to use:" ), page );
layout->addWidget( mLabel );
mListBox = new KListBox( page );
@@ -26,7 +26,7 @@ ChiasmusKeySelector::ChiasmusKeySelector( QWidget* parent, const QString& captio
mListBox->ensureCurrentVisible();
layout->addWidget( mListBox, 1 );
- QLabel* optionLabel = new QLabel( i18n( "Additional arguments for chiasmus:" ), page );
+ TQLabel* optionLabel = new TQLabel( i18n( "Additional arguments for chiasmus:" ), page );
layout->addWidget( optionLabel );
mOptions = new KLineEdit( lastOptions, page );
@@ -35,18 +35,18 @@ ChiasmusKeySelector::ChiasmusKeySelector( QWidget* parent, const QString& captio
layout->addStretch();
- connect( mListBox, SIGNAL( doubleClicked( QListBoxItem * ) ), this, SLOT( slotOk() ) );
- connect( mListBox, SIGNAL( returnPressed( QListBoxItem * ) ), this, SLOT( slotOk() ) );
+ connect( mListBox, TQT_SIGNAL( doubleClicked( TQListBoxItem * ) ), this, TQT_SLOT( slotOk() ) );
+ connect( mListBox, TQT_SIGNAL( returnPressed( TQListBoxItem * ) ), this, TQT_SLOT( slotOk() ) );
mListBox->setFocus();
}
-QString ChiasmusKeySelector::key() const
+TQString ChiasmusKeySelector::key() const
{
return mListBox->currentText();
}
-QString ChiasmusKeySelector::options() const
+TQString ChiasmusKeySelector::options() const
{
return mOptions->text();
}
diff --git a/kmail/chiasmuskeyselector.h b/kmail/chiasmuskeyselector.h
index 3af0ec455..0272016a9 100644
--- a/kmail/chiasmuskeyselector.h
+++ b/kmail/chiasmuskeyselector.h
@@ -11,15 +11,15 @@ class ChiasmusKeySelector : public KDialogBase
Q_OBJECT
public:
- ChiasmusKeySelector( QWidget* parent, const QString& caption,
- const QStringList& keys, const QString& currentKey,
- const QString& lastOptions );
+ ChiasmusKeySelector( TQWidget* parent, const TQString& caption,
+ const TQStringList& keys, const TQString& currentKey,
+ const TQString& lastOptions );
- QString key() const;
- QString options() const;
+ TQString key() const;
+ TQString options() const;
private:
- QLabel* mLabel;
+ TQLabel* mLabel;
KListBox* mListBox;
KLineEdit* mOptions;
};
diff --git a/kmail/colorlistbox.cpp b/kmail/colorlistbox.cpp
index 2c6887b3b..0e6b3a400 100644
--- a/kmail/colorlistbox.cpp
+++ b/kmail/colorlistbox.cpp
@@ -22,17 +22,17 @@
#include <config.h>
#endif
-#include <qpainter.h>
+#include <tqpainter.h>
#include <kcolordialog.h>
#include <kcolordrag.h>
#include "colorlistbox.h"
-ColorListBox::ColorListBox( QWidget *parent, const char *name, WFlags f )
+ColorListBox::ColorListBox( TQWidget *parent, const char *name, WFlags f )
:KListBox( parent, name, f ), mCurrentOnDragEnter(-1)
{
- connect( this, SIGNAL(selected(int)), this, SLOT(newColor(int)) );
+ connect( this, TQT_SIGNAL(selected(int)), this, TQT_SLOT(newColor(int)) );
setAcceptDrops( true);
}
@@ -44,7 +44,7 @@ void ColorListBox::setEnabled( bool state )
return;
}
- QListBox::setEnabled( state );
+ TQListBox::setEnabled( state );
for( uint i=0; i<count(); i++ )
{
updateItem( i );
@@ -52,7 +52,7 @@ void ColorListBox::setEnabled( bool state )
}
-void ColorListBox::setColor( uint index, const QColor &color )
+void ColorListBox::setColor( uint index, const TQColor &color )
{
if( index < count() )
{
@@ -64,7 +64,7 @@ void ColorListBox::setColor( uint index, const QColor &color )
}
-QColor ColorListBox::color( uint index ) const
+TQColor ColorListBox::color( uint index ) const
{
if( index < count() )
{
@@ -87,8 +87,8 @@ void ColorListBox::newColor( int index )
if( (uint)index < count() )
{
- QColor c = color( index );
- if( KColorDialog::getColor( c, this ) != QDialog::Rejected )
+ TQColor c = color( index );
+ if( KColorDialog::getColor( c, this ) != TQDialog::Rejected )
{
setColor( index, c );
}
@@ -96,7 +96,7 @@ void ColorListBox::newColor( int index )
}
-void ColorListBox::dragEnterEvent( QDragEnterEvent *e )
+void ColorListBox::dragEnterEvent( TQDragEnterEvent *e )
{
if( KColorDrag::canDecode(e) && isEnabled() )
{
@@ -111,7 +111,7 @@ void ColorListBox::dragEnterEvent( QDragEnterEvent *e )
}
-void ColorListBox::dragLeaveEvent( QDragLeaveEvent * )
+void ColorListBox::dragLeaveEvent( TQDragLeaveEvent * )
{
if( mCurrentOnDragEnter != -1 )
{
@@ -121,7 +121,7 @@ void ColorListBox::dragLeaveEvent( QDragLeaveEvent * )
}
-void ColorListBox::dragMoveEvent( QDragMoveEvent *e )
+void ColorListBox::dragMoveEvent( TQDragMoveEvent *e )
{
if( KColorDrag::canDecode(e) && isEnabled() )
{
@@ -134,9 +134,9 @@ void ColorListBox::dragMoveEvent( QDragMoveEvent *e )
}
-void ColorListBox::dropEvent( QDropEvent *e )
+void ColorListBox::dropEvent( TQDropEvent *e )
{
- QColor color;
+ TQColor color;
if( KColorDrag::decode( e, color ) )
{
int index = currentItem();
@@ -152,28 +152,28 @@ void ColorListBox::dropEvent( QDropEvent *e )
-ColorListItem::ColorListItem( const QString &text, const QColor &color )
- : QListBoxItem(), mColor( color ), mBoxWidth( 30 )
+ColorListItem::ColorListItem( const TQString &text, const TQColor &color )
+ : TQListBoxItem(), mColor( color ), mBoxWidth( 30 )
{
setText( text );
}
-const QColor &ColorListItem::color( void )
+const TQColor &ColorListItem::color( void )
{
return( mColor );
}
-void ColorListItem::setColor( const QColor &color )
+void ColorListItem::setColor( const TQColor &color )
{
mColor = color;
}
-void ColorListItem::paint( QPainter *p )
+void ColorListItem::paint( TQPainter *p )
{
- QFontMetrics fm = p->fontMetrics();
+ TQFontMetrics fm = p->fontMetrics();
int h = fm.height();
p->drawText( mBoxWidth+3*2, fm.ascent() + fm.leading()/2, text() );
@@ -184,13 +184,13 @@ void ColorListItem::paint( QPainter *p )
}
-int ColorListItem::height(const QListBox *lb ) const
+int ColorListItem::height(const TQListBox *lb ) const
{
return( lb->fontMetrics().lineSpacing()+1 );
}
-int ColorListItem::width(const QListBox *lb ) const
+int ColorListItem::width(const TQListBox *lb ) const
{
return( mBoxWidth + lb->fontMetrics().width( text() ) + 6 );
}
diff --git a/kmail/colorlistbox.h b/kmail/colorlistbox.h
index 1759bc831..13db01afb 100644
--- a/kmail/colorlistbox.h
+++ b/kmail/colorlistbox.h
@@ -28,9 +28,9 @@ class ColorListBox : public KListBox
Q_OBJECT
public:
- ColorListBox( QWidget *parent=0, const char * name=0, WFlags f=0 );
- void setColor( uint index, const QColor &color );
- QColor color( uint index ) const;
+ ColorListBox( TQWidget *parent=0, const char * name=0, WFlags f=0 );
+ void setColor( uint index, const TQColor &color );
+ TQColor color( uint index ) const;
signals:
void changed();
@@ -38,10 +38,10 @@ signals:
virtual void setEnabled( bool state );
protected:
- void dragEnterEvent( QDragEnterEvent *e );
- void dragLeaveEvent( QDragLeaveEvent *e );
- void dragMoveEvent( QDragMoveEvent *e );
- void dropEvent( QDropEvent *e );
+ void dragEnterEvent( TQDragEnterEvent *e );
+ void dragLeaveEvent( TQDragLeaveEvent *e );
+ void dragMoveEvent( TQDragMoveEvent *e );
+ void dropEvent( TQDropEvent *e );
private slots:
void newColor( int index );
@@ -55,17 +55,17 @@ signals:
class ColorListItem : public QListBoxItem
{
public:
- ColorListItem( const QString &text, const QColor &color=Qt::black );
- const QColor &color( void );
- void setColor( const QColor &color );
+ ColorListItem( const TQString &text, const TQColor &color=Qt::black );
+ const TQColor &color( void );
+ void setColor( const TQColor &color );
protected:
- virtual void paint( QPainter * );
- virtual int height( const QListBox * ) const;
- virtual int width( const QListBox * ) const;
+ virtual void paint( TQPainter * );
+ virtual int height( const TQListBox * ) const;
+ virtual int width( const TQListBox * ) const;
private:
- QColor mColor;
+ TQColor mColor;
int mBoxWidth;
};
diff --git a/kmail/compactionjob.cpp b/kmail/compactionjob.cpp
index 1b9c143b4..243a17537 100644
--- a/kmail/compactionjob.cpp
+++ b/kmail/compactionjob.cpp
@@ -35,9 +35,9 @@ using KPIM::BroadcastStatus;
#include <kdebug.h>
#include <klocale.h>
-#include <qfile.h>
-#include <qfileinfo.h>
-#include <qdir.h>
+#include <tqfile.h>
+#include <tqfileinfo.h>
+#include <tqdir.h>
#include <sys/types.h>
#include <sys/stat.h>
@@ -71,14 +71,14 @@ void MboxCompactionJob::kill()
fclose( mTmpFile );
mTmpFile = 0;
if ( !mTempName.isEmpty() )
- QFile::remove( mTempName );
+ TQFile::remove( mTempName );
FolderJob::kill();
}
-QString MboxCompactionJob::realLocation() const
+TQString MboxCompactionJob::realLocation() const
{
- QString location = mSrcFolder->location();
- QFileInfo inf( location );
+ TQString location = mSrcFolder->location();
+ TQFileInfo inf( location );
if (inf.isSymLink()) {
KURL u; u.setPath( location );
// follow (and resolve) symlinks so that the final ::rename() always works
@@ -96,7 +96,7 @@ int MboxCompactionJob::executeNow( bool silent )
if (!storage->compactable()) {
kdDebug(5006) << storage->location() << " compaction skipped." << endl;
if ( !mSilent ) {
- QString str = i18n( "For safety reasons, compaction has been disabled for %1" ).arg( mbox->label() );
+ TQString str = i18n( "For safety reasons, compaction has been disabled for %1" ).arg( mbox->label() );
BroadcastStatus::instance()->setStatusMsg( str );
}
return 0;
@@ -109,13 +109,13 @@ int MboxCompactionJob::executeNow( bool silent )
// exit(1); backed out due to broken nfs
}
- const QFileInfo pathInfo( realLocation() );
+ const TQFileInfo pathInfo( realLocation() );
// Use /dir/.mailboxname.compacted so that it's hidden, and doesn't show up after restarting kmail
// (e.g. due to an unfortunate crash while compaction is happening)
mTempName = pathInfo.dirPath() + "/." + pathInfo.fileName() + ".compacted";
mode_t old_umask = umask(077);
- mTmpFile = fopen(QFile::encodeName(mTempName), "w");
+ mTmpFile = fopen(TQFile::encodeName(mTempName), "w");
umask(old_umask);
if (!mTmpFile) {
kdWarning(5006) << "Couldn't start compacting " << mSrcFolder->label()
@@ -131,7 +131,7 @@ int MboxCompactionJob::executeNow( bool silent )
mCurrentIndex = 0;
kdDebug(5006) << "MboxCompactionJob: starting to compact folder " << mSrcFolder->location() << " into " << mTempName << endl;
- connect( &mTimer, SIGNAL( timeout() ), SLOT( slotDoWork() ) );
+ connect( &mTimer, TQT_SIGNAL( timeout() ), TQT_SLOT( slotDoWork() ) );
if ( !mImmediate )
mTimer.start( COMPACTIONJOB_TIMERINTERVAL );
slotDoWork();
@@ -162,11 +162,11 @@ void MboxCompactionJob::done( int rc )
if (!rc)
rc = fsync(fileno(mTmpFile));
rc |= fclose(mTmpFile);
- QString str;
+ TQString str;
if (!rc) {
bool autoCreate = mbox->autoCreateIndex();
- QString box( realLocation() );
- ::rename(QFile::encodeName(mTempName), QFile::encodeName(box));
+ TQString box( realLocation() );
+ ::rename(TQFile::encodeName(mTempName), TQFile::encodeName(box));
mbox->writeIndex();
mbox->writeConfig();
mbox->setAutoCreateIndex( false );
@@ -180,7 +180,7 @@ void MboxCompactionJob::done( int rc )
str = i18n( "Error occurred while compacting \"%1\". Compaction aborted." ).arg( mSrcFolder->label() );
kdDebug(5006) << "Error occurred while compacting " << mbox->location() << endl;
kdDebug(5006) << "Compaction aborted." << endl;
- QFile::remove( mTempName );
+ TQFile::remove( mTempName );
}
mErrorCode = rc;
@@ -223,13 +223,13 @@ int MaildirCompactionJob::executeNow( bool silent )
storage->open("maildircompact");
mOpeningFolder = false;
mFolderOpen = true;
- QString subdirNew(storage->location() + "/new/");
- QDir d(subdirNew);
+ TQString subdirNew(storage->location() + "/new/");
+ TQDir d(subdirNew);
mEntryList = d.entryList();
mCurrentIndex = 0;
kdDebug(5006) << "MaildirCompactionJob: starting to compact in folder " << mSrcFolder->location() << endl;
- connect( &mTimer, SIGNAL( timeout() ), SLOT( slotDoWork() ) );
+ connect( &mTimer, TQT_SIGNAL( timeout() ), TQT_SLOT( slotDoWork() ) );
if ( !mImmediate )
mTimer.start( COMPACTIONJOB_TIMERINTERVAL );
slotDoWork();
@@ -254,7 +254,7 @@ void MaildirCompactionJob::done( int rc )
KMFolderMaildir* storage = static_cast<KMFolderMaildir *>( mSrcFolder->storage() );
mTimer.stop();
mCancellable = false;
- QString str;
+ TQString str;
if ( !rc ) {
str = i18n( "Folder \"%1\" successfully compacted" ).arg( mSrcFolder->label() );
} else {
diff --git a/kmail/compactionjob.h b/kmail/compactionjob.h
index 055713f6d..bb234a049 100644
--- a/kmail/compactionjob.h
+++ b/kmail/compactionjob.h
@@ -29,7 +29,7 @@
#define COMPACTIONJOB_H
#include "jobscheduler.h"
-#include <qstringlist.h>
+#include <tqstringlist.h>
namespace KMail {
@@ -53,12 +53,12 @@ private slots:
private:
// Real folder location, != location in case of symlinks
- QString realLocation() const;
+ TQString realLocation() const;
void done( int rc );
private:
- QTimer mTimer;
- QString mTempName;
+ TQTimer mTimer;
+ TQString mTempName;
FILE *mTmpFile;
off_t mOffset;
int mCurrentIndex;
@@ -88,8 +88,8 @@ private:
void done( int rc );
private:
- QTimer mTimer;
- QStringList mEntryList;
+ TQTimer mTimer;
+ TQStringList mEntryList;
int mCurrentIndex;
bool mFolderOpen;
bool mSilent;
diff --git a/kmail/composer.h b/kmail/composer.h
index 58d0860d7..a4eb179d1 100644
--- a/kmail/composer.h
+++ b/kmail/composer.h
@@ -10,8 +10,8 @@
#include <kurl.h>
#include <kglobalsettings.h>
-#include <qstring.h>
-#include <qcstring.h>
+#include <tqstring.h>
+#include <tqcstring.h>
class KMMessage;
class KMFolder;
@@ -42,18 +42,18 @@ namespace KMail {
* From MailComposerIface
*/
virtual void send( int how ) = 0;
- virtual void addAttachmentsAndSend(const KURL::List &urls, const QString &comment, int how) = 0;
- virtual void addAttachment( KURL url, QString comment ) = 0;
- virtual void addAttachment( const QString & name,
- const QCString & cte,
- const QByteArray & data,
- const QCString & type,
- const QCString & subType,
- const QCString & paramAttr,
- const QString & paramValue,
- const QCString & contDisp) = 0;
+ virtual void addAttachmentsAndSend(const KURL::List &urls, const TQString &comment, int how) = 0;
+ virtual void addAttachment( KURL url, TQString comment ) = 0;
+ virtual void addAttachment( const TQString & name,
+ const TQCString & cte,
+ const TQByteArray & data,
+ const TQCString & type,
+ const TQCString & subType,
+ const TQCString & paramAttr,
+ const TQString & paramValue,
+ const TQCString & contDisp) = 0;
public: // kmcommand
- virtual void setBody( QString body ) = 0;
+ virtual void setBody( TQString body ) = 0;
virtual const MailComposerIface * asMailComposerIFace() const = 0;
virtual MailComposerIface * asMailComposerIFace() = 0;
@@ -70,7 +70,7 @@ namespace KMail {
/**
* Set the filename which is used for autosaving.
*/
- virtual void setAutoSaveFilename( const QString & filename ) = 0;
+ virtual void setAutoSaveFilename( const TQString & filename ) = 0;
public: // kmkernel, callback
/**
@@ -96,7 +96,7 @@ namespace KMail {
/**
* Recode to the specified charset
*/
- virtual void setCharset( const QCString & aCharset, bool forceDefault=false ) = 0;
+ virtual void setCharset( const TQCString & aCharset, bool forceDefault=false ) = 0;
public: // kmcommand
/**
diff --git a/kmail/configuredialog.cpp b/kmail/configuredialog.cpp
index 321a374c5..ea0536a9f 100644
--- a/kmail/configuredialog.cpp
+++ b/kmail/configuredialog.cpp
@@ -101,21 +101,21 @@ using KMime::DateFormatter;
#include <kcmultidialog.h>
// Qt headers:
-#include <qvalidator.h>
-#include <qwhatsthis.h>
-#include <qvgroupbox.h>
-#include <qvbox.h>
-#include <qvbuttongroup.h>
-#include <qhbuttongroup.h>
-#include <qtooltip.h>
-#include <qlabel.h>
-#include <qtextcodec.h>
-#include <qheader.h>
-#include <qpopupmenu.h>
-#include <qradiobutton.h>
-#include <qlayout.h>
-#include <qcheckbox.h>
-#include <qwidgetstack.h>
+#include <tqvalidator.h>
+#include <tqwhatsthis.h>
+#include <tqvgroupbox.h>
+#include <tqvbox.h>
+#include <tqvbuttongroup.h>
+#include <tqhbuttongroup.h>
+#include <tqtooltip.h>
+#include <tqlabel.h>
+#include <tqtextcodec.h>
+#include <tqheader.h>
+#include <tqpopupmenu.h>
+#include <tqradiobutton.h>
+#include <tqlayout.h>
+#include <tqcheckbox.h>
+#include <tqwidgetstack.h>
// other headers:
#include <assert.h>
@@ -155,37 +155,37 @@ namespace {
I18N_NOOP("<qt><p>This setting has been fixed by your administrator.</p>"
"<p>If you think this is an error, please contact him.</p></qt>");
- void checkLockDown( QWidget * w, const KConfigBase & c, const char * key ) {
+ void checkLockDown( TQWidget * w, const KConfigBase & c, const char * key ) {
if ( c.entryIsImmutable( key ) ) {
w->setEnabled( false );
- QToolTip::add( w, i18n( lockedDownWarning ) );
+ TQToolTip::add( w, i18n( lockedDownWarning ) );
} else {
- QToolTip::remove( w );
+ TQToolTip::remove( w );
}
}
- void populateButtonGroup( QButtonGroup * g, const EnumConfigEntry & e ) {
+ void populateButtonGroup( TQButtonGroup * g, const EnumConfigEntry & e ) {
g->setTitle( i18n( e.desc ) );
g->layout()->setSpacing( KDialog::spacingHint() );
for ( int i = 0 ; i < e.numItems ; ++i )
- g->insert( new QRadioButton( i18n( e.items[i].desc ), g ), i );
+ g->insert( new TQRadioButton( i18n( e.items[i].desc ), g ), i );
}
- void populateCheckBox( QCheckBox * b, const BoolConfigEntry & e ) {
+ void populateCheckBox( TQCheckBox * b, const BoolConfigEntry & e ) {
b->setText( i18n( e.desc ) );
}
- void loadWidget( QCheckBox * b, const KConfigBase & c, const BoolConfigEntry & e ) {
+ void loadWidget( TQCheckBox * b, const KConfigBase & c, const BoolConfigEntry & e ) {
Q_ASSERT( c.group() == e.group );
checkLockDown( b, c, e.key );
b->setChecked( c.readBoolEntry( e.key, e.defaultValue ) );
}
- void loadWidget( QButtonGroup * g, const KConfigBase & c, const EnumConfigEntry & e ) {
+ void loadWidget( TQButtonGroup * g, const KConfigBase & c, const EnumConfigEntry & e ) {
Q_ASSERT( c.group() == e.group );
Q_ASSERT( g->count() == e.numItems );
checkLockDown( g, c, e.key );
- const QString s = c.readEntry( e.key, e.items[e.defaultItem].key );
+ const TQString s = c.readEntry( e.key, e.items[e.defaultItem].key );
for ( int i = 0 ; i < e.numItems ; ++i )
if ( s == e.items[i].key ) {
g->setButton( i );
@@ -194,12 +194,12 @@ namespace {
g->setButton( e.defaultItem );
}
- void saveCheckBox( QCheckBox * b, KConfigBase & c, const BoolConfigEntry & e ) {
+ void saveCheckBox( TQCheckBox * b, KConfigBase & c, const BoolConfigEntry & e ) {
Q_ASSERT( c.group() == e.group );
c.writeEntry( e.key, b->isChecked() );
}
- void saveButtonGroup( QButtonGroup * g, KConfigBase & c, const EnumConfigEntry & e ) {
+ void saveButtonGroup( TQButtonGroup * g, KConfigBase & c, const EnumConfigEntry & e ) {
Q_ASSERT( c.group() == e.group );
Q_ASSERT( g->count() == e.numItems );
c.writeEntry( e.key, e.items[ g->id( g->selected() ) ].key );
@@ -213,7 +213,7 @@ namespace {
}
-ConfigureDialog::ConfigureDialog( QWidget *parent, const char *name, bool modal )
+ConfigureDialog::ConfigureDialog( TQWidget *parent, const char *name, bool modal )
: KCMultiDialog( KDialogBase::IconList, KGuiItem( i18n( "&Load Profile..." ) ),
KGuiItem(), User2, i18n( "Configure" ), parent, name, modal )
, mProfileDialog( 0 )
@@ -241,7 +241,7 @@ ConfigureDialog::ConfigureDialog( QWidget *parent, const char *name, bool modal
}
-void ConfigureDialog::hideEvent( QHideEvent *ev ) {
+void ConfigureDialog::hideEvent( TQHideEvent *ev ) {
KConfigGroup geometry( KMKernel::config(), "Geometry" );
geometry.writeEntry( "ConfigureDialogWidth", width() );
geometry.writeEntry( "ConfigureDialogHeight",height() );
@@ -267,8 +267,8 @@ void ConfigureDialog::slotUser2() {
return;
}
mProfileDialog = new ProfileDialog( this, "mProfileDialog" );
- connect( mProfileDialog, SIGNAL(profileSelected(KConfig*)),
- this, SIGNAL(installProfile(KConfig*)) );
+ connect( mProfileDialog, TQT_SIGNAL(profileSelected(KConfig*)),
+ this, TQT_SIGNAL(installProfile(KConfig*)) );
mProfileDialog->show();
}
@@ -277,36 +277,36 @@ void ConfigureDialog::slotUser2() {
// * IdentityPage *
// * *
// *************************************************************
-QString IdentityPage::helpAnchor() const {
- return QString::fromLatin1("configure-identity");
+TQString IdentityPage::helpAnchor() const {
+ return TQString::fromLatin1("configure-identity");
}
-IdentityPage::IdentityPage( QWidget * parent, const char * name )
+IdentityPage::IdentityPage( TQWidget * parent, const char * name )
: ConfigModule( parent, name ),
mIdentityDialog( 0 )
{
- QHBoxLayout * hlay = new QHBoxLayout( this, 0, KDialog::spacingHint() );
+ TQHBoxLayout * hlay = new TQHBoxLayout( this, 0, KDialog::spacingHint() );
mIdentityList = new IdentityListView( this );
- connect( mIdentityList, SIGNAL(selectionChanged()),
- SLOT(slotIdentitySelectionChanged()) );
- connect( mIdentityList, SIGNAL(itemRenamed(QListViewItem*,const QString&,int)),
- SLOT(slotRenameIdentity(QListViewItem*,const QString&,int)) );
- connect( mIdentityList, SIGNAL(doubleClicked(QListViewItem*,const QPoint&,int)),
- SLOT(slotModifyIdentity()) );
- connect( mIdentityList, SIGNAL(contextMenu(KListView*,QListViewItem*,const QPoint&)),
- SLOT(slotContextMenu(KListView*,QListViewItem*,const QPoint&)) );
+ connect( mIdentityList, TQT_SIGNAL(selectionChanged()),
+ TQT_SLOT(slotIdentitySelectionChanged()) );
+ connect( mIdentityList, TQT_SIGNAL(itemRenamed(TQListViewItem*,const TQString&,int)),
+ TQT_SLOT(slotRenameIdentity(TQListViewItem*,const TQString&,int)) );
+ connect( mIdentityList, TQT_SIGNAL(doubleClicked(TQListViewItem*,const TQPoint&,int)),
+ TQT_SLOT(slotModifyIdentity()) );
+ connect( mIdentityList, TQT_SIGNAL(contextMenu(KListView*,TQListViewItem*,const TQPoint&)),
+ TQT_SLOT(slotContextMenu(KListView*,TQListViewItem*,const TQPoint&)) );
// ### connect dragged(...), ...
hlay->addWidget( mIdentityList, 1 );
- QVBoxLayout * vlay = new QVBoxLayout( hlay ); // inherits spacing
+ TQVBoxLayout * vlay = new TQVBoxLayout( hlay ); // inherits spacing
- QPushButton * button = new QPushButton( i18n("&Add..."), this );
- mModifyButton = new QPushButton( i18n("&Modify..."), this );
- mRenameButton = new QPushButton( i18n("&Rename"), this );
- mRemoveButton = new QPushButton( i18n("Remo&ve"), this );
- mSetAsDefaultButton = new QPushButton( i18n("Set as &Default"), this );
+ TQPushButton * button = new TQPushButton( i18n("&Add..."), this );
+ mModifyButton = new TQPushButton( i18n("&Modify..."), this );
+ mRenameButton = new TQPushButton( i18n("&Rename"), this );
+ mRemoveButton = new TQPushButton( i18n("Remo&ve"), this );
+ mSetAsDefaultButton = new TQPushButton( i18n("Set as &Default"), this );
button->setAutoDefault( false );
mModifyButton->setAutoDefault( false );
mModifyButton->setEnabled( false );
@@ -316,16 +316,16 @@ IdentityPage::IdentityPage( QWidget * parent, const char * name )
mRemoveButton->setEnabled( false );
mSetAsDefaultButton->setAutoDefault( false );
mSetAsDefaultButton->setEnabled( false );
- connect( button, SIGNAL(clicked()),
- this, SLOT(slotNewIdentity()) );
- connect( mModifyButton, SIGNAL(clicked()),
- this, SLOT(slotModifyIdentity()) );
- connect( mRenameButton, SIGNAL(clicked()),
- this, SLOT(slotRenameIdentity()) );
- connect( mRemoveButton, SIGNAL(clicked()),
- this, SLOT(slotRemoveIdentity()) );
- connect( mSetAsDefaultButton, SIGNAL(clicked()),
- this, SLOT(slotSetAsDefault()) );
+ connect( button, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotNewIdentity()) );
+ connect( mModifyButton, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotModifyIdentity()) );
+ connect( mRenameButton, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotRenameIdentity()) );
+ connect( mRemoveButton, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotRemoveIdentity()) );
+ connect( mSetAsDefaultButton, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotSetAsDefault()) );
vlay->addWidget( button );
vlay->addWidget( mModifyButton );
vlay->addWidget( mRenameButton );
@@ -341,7 +341,7 @@ void IdentityPage::load()
mOldNumberOfIdentities = im->shadowIdentities().count();
// Fill the list:
mIdentityList->clear();
- QListViewItem * item = 0;
+ TQListViewItem * item = 0;
for ( KPIM::IdentityManager::Iterator it = im->modifyBegin() ; it != im->modifyEnd() ; ++it )
item = new IdentityListViewItem( mIdentityList, item, *it );
mIdentityList->setSelected( mIdentityList->currentItem(), true );
@@ -378,8 +378,8 @@ void IdentityPage::slotNewIdentity()
KPIM::IdentityManager * im = kmkernel->identityManager();
NewIdentityDialog dialog( im->shadowIdentities(), this, "new", true );
- if( dialog.exec() == QDialog::Accepted ) {
- QString identityName = dialog.identityName().stripWhiteSpace();
+ if( dialog.exec() == TQDialog::Accepted ) {
+ TQString identityName = dialog.identityName().stripWhiteSpace();
assert( !identityName.isEmpty() );
//
@@ -404,7 +404,7 @@ void IdentityPage::slotNewIdentity()
// Insert into listview:
//
KPIM::Identity & newIdent = im->modifyIdentityForName( identityName );
- QListViewItem * item = mIdentityList->selectedItem();
+ TQListViewItem * item = mIdentityList->selectedItem();
if ( item )
item = item->itemAbove();
mIdentityList->setSelected( new IdentityListViewItem( mIdentityList,
@@ -425,7 +425,7 @@ void IdentityPage::slotModifyIdentity() {
mIdentityDialog->setIdentity( item->identity() );
// Hmm, an unmodal dialog would be nicer, but a modal one is easier ;-)
- if ( mIdentityDialog->exec() == QDialog::Accepted ) {
+ if ( mIdentityDialog->exec() == TQDialog::Accepted ) {
mIdentityDialog->updateIdentity( item->identity() );
item->redisplay();
emit changed(true);
@@ -447,7 +447,7 @@ void IdentityPage::slotRemoveIdentity()
dynamic_cast<IdentityListViewItem*>( mIdentityList->selectedItem() );
if ( !item ) return;
- QString msg = i18n("<qt>Do you really want to remove the identity named "
+ TQString msg = i18n("<qt>Do you really want to remove the identity named "
"<b>%1</b>?</qt>").arg( item->identity().identityName() );
if( KMessageBox::warningContinueCancel( this, msg, i18n("Remove Identity"),
KGuiItem(i18n("&Remove"),"editdelete") ) == KMessageBox::Continue )
@@ -461,21 +461,21 @@ void IdentityPage::slotRemoveIdentity()
void IdentityPage::slotRenameIdentity() {
assert( !mIdentityDialog );
- QListViewItem * item = mIdentityList->selectedItem();
+ TQListViewItem * item = mIdentityList->selectedItem();
if ( !item ) return;
mIdentityList->rename( item, 0 );
}
-void IdentityPage::slotRenameIdentity( QListViewItem * i,
- const QString & s, int col ) {
+void IdentityPage::slotRenameIdentity( TQListViewItem * i,
+ const TQString & s, int col ) {
assert( col == 0 );
Q_UNUSED( col );
IdentityListViewItem * item = dynamic_cast<IdentityListViewItem*>( i );
if ( !item ) return;
- QString newName = s.stripWhiteSpace();
+ TQString newName = s.stripWhiteSpace();
if ( !newName.isEmpty() &&
!kmkernel->identityManager()->shadowIdentities().contains( newName ) ) {
KPIM::Identity & ident = item->identity();
@@ -485,18 +485,18 @@ void IdentityPage::slotRenameIdentity( QListViewItem * i,
item->redisplay();
}
-void IdentityPage::slotContextMenu( KListView *, QListViewItem * i,
- const QPoint & pos ) {
+void IdentityPage::slotContextMenu( KListView *, TQListViewItem * i,
+ const TQPoint & pos ) {
IdentityListViewItem * item = dynamic_cast<IdentityListViewItem*>( i );
- QPopupMenu * menu = new QPopupMenu( this );
- menu->insertItem( i18n("Add..."), this, SLOT(slotNewIdentity()) );
+ TQPopupMenu * menu = new TQPopupMenu( this );
+ menu->insertItem( i18n("Add..."), this, TQT_SLOT(slotNewIdentity()) );
if ( item ) {
- menu->insertItem( i18n("Modify..."), this, SLOT(slotModifyIdentity()) );
+ menu->insertItem( i18n("Modify..."), this, TQT_SLOT(slotModifyIdentity()) );
if ( mIdentityList->childCount() > 1 )
- menu->insertItem( i18n("Remove"), this, SLOT(slotRemoveIdentity()) );
+ menu->insertItem( i18n("Remove"), this, TQT_SLOT(slotRemoveIdentity()) );
if ( !item->identity().isDefault() )
- menu->insertItem( i18n("Set as Default"), this, SLOT(slotSetAsDefault()) );
+ menu->insertItem( i18n("Set as Default"), this, TQT_SLOT(slotSetAsDefault()) );
}
menu->exec( pos );
delete menu;
@@ -516,7 +516,7 @@ void IdentityPage::slotSetAsDefault() {
}
void IdentityPage::refreshList() {
- for ( QListViewItemIterator it( mIdentityList ) ; it.current() ; ++it ) {
+ for ( TQListViewItemIterator it( mIdentityList ) ; it.current() ; ++it ) {
IdentityListViewItem * item =
dynamic_cast<IdentityListViewItem*>(it.current());
if ( item )
@@ -536,7 +536,7 @@ void IdentityPage::slotIdentitySelectionChanged()
mSetAsDefaultButton->setEnabled( item && !item->identity().isDefault() );
}
-void IdentityPage::slotUpdateTransportCombo( const QStringList & sl )
+void IdentityPage::slotUpdateTransportCombo( const TQStringList & sl )
{
if ( mIdentityDialog ) mIdentityDialog->slotUpdateTransportCombo( sl );
}
@@ -548,11 +548,11 @@ void IdentityPage::slotUpdateTransportCombo( const QStringList & sl )
// * AccountsPage *
// * *
// *************************************************************
-QString AccountsPage::helpAnchor() const {
- return QString::fromLatin1("configure-accounts");
+TQString AccountsPage::helpAnchor() const {
+ return TQString::fromLatin1("configure-accounts");
}
-AccountsPage::AccountsPage( QWidget * parent, const char * name )
+AccountsPage::AccountsPage( TQWidget * parent, const char * name )
: ConfigModuleWithTabs( parent, name )
{
//
@@ -560,42 +560,42 @@ AccountsPage::AccountsPage( QWidget * parent, const char * name )
//
mReceivingTab = new ReceivingTab();
addTab( mReceivingTab, i18n( "&Receiving" ) );
- connect( mReceivingTab, SIGNAL(accountListChanged(const QStringList &)),
- this, SIGNAL(accountListChanged(const QStringList &)) );
+ connect( mReceivingTab, TQT_SIGNAL(accountListChanged(const TQStringList &)),
+ this, TQT_SIGNAL(accountListChanged(const TQStringList &)) );
//
// "Sending" tab:
//
mSendingTab = new SendingTab();
addTab( mSendingTab, i18n( "&Sending" ) );
- connect( mSendingTab, SIGNAL(transportListChanged(const QStringList&)),
- this, SIGNAL(transportListChanged(const QStringList&)) );
+ connect( mSendingTab, TQT_SIGNAL(transportListChanged(const TQStringList&)),
+ this, TQT_SIGNAL(transportListChanged(const TQStringList&)) );
load();
}
-QString AccountsPage::SendingTab::helpAnchor() const {
- return QString::fromLatin1("configure-accounts-sending");
+TQString AccountsPage::SendingTab::helpAnchor() const {
+ return TQString::fromLatin1("configure-accounts-sending");
}
-AccountsPageSendingTab::AccountsPageSendingTab( QWidget * parent, const char * name )
+AccountsPageSendingTab::AccountsPageSendingTab( TQWidget * parent, const char * name )
: ConfigModuleTab( parent, name )
{
mTransportInfoList.setAutoDelete( true );
// temp. vars:
- QVBoxLayout *vlay;
- QVBoxLayout *btn_vlay;
- QHBoxLayout *hlay;
- QGridLayout *glay;
- QPushButton *button;
- QGroupBox *group;
-
- vlay = new QVBoxLayout( this, KDialog::marginHint(), KDialog::spacingHint() );
+ TQVBoxLayout *vlay;
+ TQVBoxLayout *btn_vlay;
+ TQHBoxLayout *hlay;
+ TQGridLayout *glay;
+ TQPushButton *button;
+ TQGroupBox *group;
+
+ vlay = new TQVBoxLayout( this, KDialog::marginHint(), KDialog::spacingHint() );
// label: zero stretch ### FIXME more
- vlay->addWidget( new QLabel( i18n("Outgoing accounts (add at least one):"), this ) );
+ vlay->addWidget( new TQLabel( i18n("Outgoing accounts (add at least one):"), this ) );
// hbox layout: stretch 10, spacing inherited from vlay
- hlay = new QHBoxLayout();
+ hlay = new TQHBoxLayout();
vlay->addLayout( hlay, 10 ); // high stretch b/c of the groupbox's sizeHint
// transport list: left widget in hlay; stretch 1
@@ -605,137 +605,137 @@ AccountsPageSendingTab::AccountsPageSendingTab( QWidget * parent, const char * n
mTransportList->addColumn( i18n("Type") );
mTransportList->setAllColumnsShowFocus( true );
mTransportList->setSorting( -1 );
- connect( mTransportList, SIGNAL(selectionChanged()),
- this, SLOT(slotTransportSelected()) );
- connect( mTransportList, SIGNAL(doubleClicked( QListViewItem *)),
- this, SLOT(slotModifySelectedTransport()) );
+ connect( mTransportList, TQT_SIGNAL(selectionChanged()),
+ this, TQT_SLOT(slotTransportSelected()) );
+ connect( mTransportList, TQT_SIGNAL(doubleClicked( TQListViewItem *)),
+ this, TQT_SLOT(slotModifySelectedTransport()) );
hlay->addWidget( mTransportList, 1 );
// a vbox layout for the buttons: zero stretch, spacing inherited from hlay
- btn_vlay = new QVBoxLayout( hlay );
+ btn_vlay = new TQVBoxLayout( hlay );
// "add..." button: stretch 0
- button = new QPushButton( i18n("A&dd..."), this );
+ button = new TQPushButton( i18n("A&dd..."), this );
button->setAutoDefault( false );
- connect( button, SIGNAL(clicked()),
- this, SLOT(slotAddTransport()) );
+ connect( button, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotAddTransport()) );
btn_vlay->addWidget( button );
// "modify..." button: stretch 0
- mModifyTransportButton = new QPushButton( i18n("&Modify..."), this );
+ mModifyTransportButton = new TQPushButton( i18n("&Modify..."), this );
mModifyTransportButton->setAutoDefault( false );
mModifyTransportButton->setEnabled( false ); // b/c no item is selected yet
- connect( mModifyTransportButton, SIGNAL(clicked()),
- this, SLOT(slotModifySelectedTransport()) );
+ connect( mModifyTransportButton, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotModifySelectedTransport()) );
btn_vlay->addWidget( mModifyTransportButton );
// "remove" button: stretch 0
- mRemoveTransportButton = new QPushButton( i18n("R&emove"), this );
+ mRemoveTransportButton = new TQPushButton( i18n("R&emove"), this );
mRemoveTransportButton->setAutoDefault( false );
mRemoveTransportButton->setEnabled( false ); // b/c no item is selected yet
- connect( mRemoveTransportButton, SIGNAL(clicked()),
- this, SLOT(slotRemoveSelectedTransport()) );
+ connect( mRemoveTransportButton, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotRemoveSelectedTransport()) );
btn_vlay->addWidget( mRemoveTransportButton );
- mSetDefaultTransportButton = new QPushButton( i18n("Set Default"), this );
+ mSetDefaultTransportButton = new TQPushButton( i18n("Set Default"), this );
mSetDefaultTransportButton->setAutoDefault( false );
mSetDefaultTransportButton->setEnabled( false );
- connect ( mSetDefaultTransportButton, SIGNAL(clicked()),
- this, SLOT(slotSetDefaultTransport()) );
+ connect ( mSetDefaultTransportButton, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotSetDefaultTransport()) );
btn_vlay->addWidget( mSetDefaultTransportButton );
btn_vlay->addStretch( 1 ); // spacer
// "Common options" groupbox:
- group = new QGroupBox( 0, Qt::Vertical,
+ group = new TQGroupBox( 0, Qt::Vertical,
i18n("Common Options"), this );
vlay->addWidget(group);
// a grid layout for the contents of the "common options" group box
- glay = new QGridLayout( group->layout(), 5, 3, KDialog::spacingHint() );
+ glay = new TQGridLayout( group->layout(), 5, 3, KDialog::spacingHint() );
glay->setColStretch( 2, 10 );
// "confirm before send" check box:
- mConfirmSendCheck = new QCheckBox( i18n("Confirm &before send"), group );
+ mConfirmSendCheck = new TQCheckBox( i18n("Confirm &before send"), group );
glay->addMultiCellWidget( mConfirmSendCheck, 0, 0, 0, 1 );
- connect( mConfirmSendCheck, SIGNAL( stateChanged( int ) ),
- this, SLOT( slotEmitChanged( void ) ) );
+ connect( mConfirmSendCheck, TQT_SIGNAL( stateChanged( int ) ),
+ this, TQT_SLOT( slotEmitChanged( void ) ) );
// "send on check" combo:
- mSendOnCheckCombo = new QComboBox( false, group );
- mSendOnCheckCombo->insertStringList( QStringList()
+ mSendOnCheckCombo = new TQComboBox( false, group );
+ mSendOnCheckCombo->insertStringList( TQStringList()
<< i18n("Never Automatically")
<< i18n("On Manual Mail Checks")
<< i18n("On All Mail Checks") );
glay->addWidget( mSendOnCheckCombo, 1, 1 );
- connect( mSendOnCheckCombo, SIGNAL( activated( int ) ),
- this, SLOT( slotEmitChanged( void ) ) );
+ connect( mSendOnCheckCombo, TQT_SIGNAL( activated( int ) ),
+ this, TQT_SLOT( slotEmitChanged( void ) ) );
// "default send method" combo:
- mSendMethodCombo = new QComboBox( false, group );
- mSendMethodCombo->insertStringList( QStringList()
+ mSendMethodCombo = new TQComboBox( false, group );
+ mSendMethodCombo->insertStringList( TQStringList()
<< i18n("Send Now")
<< i18n("Send Later") );
glay->addWidget( mSendMethodCombo, 2, 1 );
- connect( mSendMethodCombo, SIGNAL( activated( int ) ),
- this, SLOT( slotEmitChanged( void ) ) );
+ connect( mSendMethodCombo, TQT_SIGNAL( activated( int ) ),
+ this, TQT_SLOT( slotEmitChanged( void ) ) );
// "message property" combo:
// ### FIXME: remove completely?
- mMessagePropertyCombo = new QComboBox( false, group );
- mMessagePropertyCombo->insertStringList( QStringList()
+ mMessagePropertyCombo = new TQComboBox( false, group );
+ mMessagePropertyCombo->insertStringList( TQStringList()
<< i18n("Allow 8-bit")
<< i18n("MIME Compliant (Quoted Printable)") );
glay->addWidget( mMessagePropertyCombo, 3, 1 );
- connect( mMessagePropertyCombo, SIGNAL( activated( int ) ),
- this, SLOT( slotEmitChanged( void ) ) );
+ connect( mMessagePropertyCombo, TQT_SIGNAL( activated( int ) ),
+ this, TQT_SLOT( slotEmitChanged( void ) ) );
// "default domain" input field:
mDefaultDomainEdit = new KLineEdit( group );
glay->addMultiCellWidget( mDefaultDomainEdit, 4, 4, 1, 2 );
- connect( mDefaultDomainEdit, SIGNAL( textChanged( const QString& ) ),
- this, SLOT( slotEmitChanged( void ) ) );
+ connect( mDefaultDomainEdit, TQT_SIGNAL( textChanged( const TQString& ) ),
+ this, TQT_SLOT( slotEmitChanged( void ) ) );
// labels:
- QLabel *l = new QLabel( mSendOnCheckCombo, /*buddy*/
+ TQLabel *l = new TQLabel( mSendOnCheckCombo, /*buddy*/
i18n("Send &messages in outbox folder:"), group );
glay->addWidget( l, 1, 0 );
- QString msg = i18n( GlobalSettings::self()->sendOnCheckItem()->whatsThis().utf8() );
- QWhatsThis::add( l, msg );
- QWhatsThis::add( mSendOnCheckCombo, msg );
+ TQString msg = i18n( GlobalSettings::self()->sendOnCheckItem()->whatsThis().utf8() );
+ TQWhatsThis::add( l, msg );
+ TQWhatsThis::add( mSendOnCheckCombo, msg );
- glay->addWidget( new QLabel( mSendMethodCombo, /*buddy*/
+ glay->addWidget( new TQLabel( mSendMethodCombo, /*buddy*/
i18n("Defa&ult send method:"), group ), 2, 0 );
- glay->addWidget( new QLabel( mMessagePropertyCombo, /*buddy*/
+ glay->addWidget( new TQLabel( mMessagePropertyCombo, /*buddy*/
i18n("Message &property:"), group ), 3, 0 );
- l = new QLabel( mDefaultDomainEdit, /*buddy*/
+ l = new TQLabel( mDefaultDomainEdit, /*buddy*/
i18n("Defaul&t domain:"), group );
glay->addWidget( l, 4, 0 );
- // and now: add QWhatsThis:
+ // and now: add TQWhatsThis:
msg = i18n( "<qt><p>The default domain is used to complete email "
"addresses that only consist of the user's name."
"</p></qt>" );
- QWhatsThis::add( l, msg );
- QWhatsThis::add( mDefaultDomainEdit, msg );
+ TQWhatsThis::add( l, msg );
+ TQWhatsThis::add( mDefaultDomainEdit, msg );
}
void AccountsPage::SendingTab::slotTransportSelected()
{
- QListViewItem *cur = mTransportList->selectedItem();
+ TQListViewItem *cur = mTransportList->selectedItem();
mModifyTransportButton->setEnabled( cur );
mRemoveTransportButton->setEnabled( cur );
mSetDefaultTransportButton->setEnabled( cur );
}
// adds a number to @p name to make the name unique
-static inline QString uniqueName( const QStringList & list,
- const QString & name )
+static inline TQString uniqueName( const TQStringList & list,
+ const TQString & name )
{
int suffix = 1;
- QString result = name;
+ TQString result = name;
while ( list.find( result ) != list.end() ) {
result = i18n("%1: name; %2: number appended to it to make it unique "
"among a list of names", "%1 %2")
@@ -747,12 +747,12 @@ static inline QString uniqueName( const QStringList & list,
void AccountsPage::SendingTab::slotSetDefaultTransport()
{
- QListViewItem *item = mTransportList->selectedItem();
+ TQListViewItem *item = mTransportList->selectedItem();
if ( !item ) return;
KMTransportInfo ti;
- QListViewItemIterator it( mTransportList );
+ TQListViewItemIterator it( mTransportList );
for ( ; it.current(); ++it ) {
ti.readConfig( KMTransportInfo::findTransport( it.current()->text(0) ));
if ( ti.type != "sendmail" ) {
@@ -778,17 +778,17 @@ void AccountsPage::SendingTab::slotAddTransport()
{ // limit scope of selDialog
KMTransportSelDlg selDialog( this );
- if ( selDialog.exec() != QDialog::Accepted ) return;
+ if ( selDialog.exec() != TQDialog::Accepted ) return;
transportType = selDialog.selected();
}
KMTransportInfo *transportInfo = new KMTransportInfo();
switch ( transportType ) {
case 0: // smtp
- transportInfo->type = QString::fromLatin1("smtp");
+ transportInfo->type = TQString::fromLatin1("smtp");
break;
case 1: // sendmail
- transportInfo->type = QString::fromLatin1("sendmail");
+ transportInfo->type = TQString::fromLatin1("sendmail");
transportInfo->name = i18n("Sendmail");
transportInfo->host = _PATH_SENDMAIL; // ### FIXME: use const, not #define
break;
@@ -800,12 +800,12 @@ void AccountsPage::SendingTab::slotAddTransport()
// create list of names:
// ### move behind dialog.exec()?
- QStringList transportNames;
- QPtrListIterator<KMTransportInfo> it( mTransportInfoList );
+ TQStringList transportNames;
+ TQPtrListIterator<KMTransportInfo> it( mTransportInfoList );
for ( it.toFirst() ; it.current() ; ++it )
transportNames << (*it)->name;
- if( dialog.exec() != QDialog::Accepted ) {
+ if( dialog.exec() != TQDialog::Accepted ) {
delete transportInfo;
return;
}
@@ -819,8 +819,8 @@ void AccountsPage::SendingTab::slotAddTransport()
// append to listview:
// ### FIXME: insert before the selected item, append on empty selection
- QListViewItem *lastItem = mTransportList->firstChild();
- QString typeDisplayName;
+ TQListViewItem *lastItem = mTransportList->firstChild();
+ TQString typeDisplayName;
if ( lastItem ) {
typeDisplayName = transportInfo->type;
} else {
@@ -831,7 +831,7 @@ void AccountsPage::SendingTab::slotAddTransport()
.arg( transportInfo->type );
GlobalSettings::self()->setDefaultTransport( transportInfo->name );
}
- (void) new QListViewItem( mTransportList, lastItem, transportInfo->name,
+ (void) new TQListViewItem( mTransportList, lastItem, transportInfo->name,
typeDisplayName );
// notify anyone who cares:
@@ -841,24 +841,24 @@ void AccountsPage::SendingTab::slotAddTransport()
void AccountsPage::SendingTab::slotModifySelectedTransport()
{
- QListViewItem *item = mTransportList->selectedItem();
+ TQListViewItem *item = mTransportList->selectedItem();
if ( !item ) return;
- const QString& originalTransport = item->text(0);
+ const TQString& originalTransport = item->text(0);
- QPtrListIterator<KMTransportInfo> it( mTransportInfoList );
+ TQPtrListIterator<KMTransportInfo> it( mTransportInfoList );
for ( it.toFirst() ; it.current() ; ++it )
if ( (*it)->name == item->text(0) ) break;
if ( !it.current() ) return;
KMTransportDialog dialog( i18n("Modify Transport"), (*it), this );
- if ( dialog.exec() != QDialog::Accepted ) return;
+ if ( dialog.exec() != TQDialog::Accepted ) return;
// create the list of names of transports, but leave out the current
// item:
- QStringList transportNames;
- QPtrListIterator<KMTransportInfo> jt( mTransportInfoList );
+ TQStringList transportNames;
+ TQPtrListIterator<KMTransportInfo> jt( mTransportInfoList );
int entryLocation = -1;
for ( jt.toFirst() ; jt.current() ; ++jt )
if ( jt != it )
@@ -874,9 +874,9 @@ void AccountsPage::SendingTab::slotModifySelectedTransport()
// and insert the new name at the position of the old in the list of
// strings; then broadcast the new list:
transportNames.insert( transportNames.at( entryLocation ), (*it)->name );
- const QString& newTransportName = (*it)->name;
+ const TQString& newTransportName = (*it)->name;
- QStringList changedIdents;
+ TQStringList changedIdents;
KPIM::IdentityManager * im = kmkernel->identityManager();
for ( KPIM::IdentityManager::Iterator it = im->modifyBegin(); it != im->modifyEnd(); ++it ) {
if ( originalTransport == (*it).transport() ) {
@@ -886,7 +886,7 @@ void AccountsPage::SendingTab::slotModifySelectedTransport()
}
if ( !changedIdents.isEmpty() ) {
- QString information = i18n( "This identity has been changed to use the modified transport:",
+ TQString information = i18n( "This identity has been changed to use the modified transport:",
"These %n identities have been changed to use the modified transport:",
changedIdents.count() );
KMessageBox::informationList( this, information, changedIdents );
@@ -898,39 +898,39 @@ void AccountsPage::SendingTab::slotModifySelectedTransport()
void AccountsPage::SendingTab::slotRemoveSelectedTransport()
{
- QListViewItem *item = mTransportList->selectedItem();
+ TQListViewItem *item = mTransportList->selectedItem();
if ( !item ) return;
- QStringList changedIdents;
+ TQStringList changedIdents;
KPIM::IdentityManager * im = kmkernel->identityManager();
for ( KPIM::IdentityManager::Iterator it = im->modifyBegin(); it != im->modifyEnd(); ++it ) {
if ( item->text( 0 ) == (*it).transport() ) {
- (*it).setTransport( QString::null );
+ (*it).setTransport( TQString::null );
changedIdents += (*it).identityName();
}
}
// if the deleted transport is the currently used transport reset it to default
- const QString& currentTransport = GlobalSettings::self()->currentTransport();
+ const TQString& currentTransport = GlobalSettings::self()->currentTransport();
if ( item->text( 0 ) == currentTransport ) {
- GlobalSettings::self()->setCurrentTransport( QString::null );
+ GlobalSettings::self()->setCurrentTransport( TQString::null );
}
if ( !changedIdents.isEmpty() ) {
- QString information = i18n( "This identity has been changed to use the default transport:",
+ TQString information = i18n( "This identity has been changed to use the default transport:",
"These %n identities have been changed to use the default transport:",
changedIdents.count() );
KMessageBox::informationList( this, information, changedIdents );
}
- QPtrListIterator<KMTransportInfo> it( mTransportInfoList );
+ TQPtrListIterator<KMTransportInfo> it( mTransportInfoList );
for ( it.toFirst() ; it.current() ; ++it )
if ( (*it)->name == item->text(0) ) break;
if ( !it.current() ) return;
KMTransportInfo ti;
- QListViewItem *newCurrent = item->itemBelow();
+ TQListViewItem *newCurrent = item->itemBelow();
if ( !newCurrent ) newCurrent = item->itemAbove();
//mTransportList->removeItem( item );
if ( newCurrent ) {
@@ -946,13 +946,13 @@ void AccountsPage::SendingTab::slotRemoveSelectedTransport()
}
}
} else {
- GlobalSettings::self()->setDefaultTransport( QString::null );
+ GlobalSettings::self()->setDefaultTransport( TQString::null );
}
delete item;
mTransportInfoList.remove( it );
- QStringList transportNames;
+ TQStringList transportNames;
for ( it.toFirst() ; it.current() ; ++it )
transportNames << (*it)->name;
emit transportListChanged( transportNames );
@@ -969,22 +969,22 @@ void AccountsPage::SendingTab::doLoadOther() {
int numTransports = general.readNumEntry("transports", 0);
- QListViewItem *top = 0;
+ TQListViewItem *top = 0;
mTransportInfoList.clear();
mTransportList->clear();
- QStringList transportNames;
+ TQStringList transportNames;
for ( int i = 1 ; i <= numTransports ; i++ ) {
KMTransportInfo *ti = new KMTransportInfo();
ti->readConfig(i);
mTransportInfoList.append( ti );
transportNames << ti->name;
- top = new QListViewItem( mTransportList, top, ti->name, ti->type );
+ top = new TQListViewItem( mTransportList, top, ti->name, ti->type );
}
emit transportListChanged( transportNames );
- const QString &defaultTransport = GlobalSettings::self()->defaultTransport();
+ const TQString &defaultTransport = GlobalSettings::self()->defaultTransport();
- QListViewItemIterator it( mTransportList );
+ TQListViewItemIterator it( mTransportList );
for ( ; it.current(); ++it ) {
if ( it.current()->text(0) == defaultTransport ) {
if ( it.current()->text(1) != "sendmail" ) {
@@ -1008,7 +1008,7 @@ void AccountsPage::SendingTab::doLoadOther() {
mConfirmSendCheck->setChecked( composer.readBoolEntry( "confirm-before-send",
false ) );
- QString str = general.readEntry( "Default domain" );
+ TQString str = general.readEntry( "Default domain" );
if( str.isEmpty() )
{
//### FIXME: Use the global convenience function instead of the homebrewed
@@ -1020,7 +1020,7 @@ void AccountsPage::SendingTab::doLoadOther() {
buffer[255] = 0;
else
buffer[0] = 0;
- str = QString::fromLatin1( *buffer ? buffer : "localhost" );
+ str = TQString::fromLatin1( *buffer ? buffer : "localhost" );
}
mDefaultDomainEdit->setText( str );
}
@@ -1031,7 +1031,7 @@ void AccountsPage::SendingTab::save() {
// Save transports:
general.writeEntry( "transports", mTransportInfoList.count() );
- QPtrListIterator<KMTransportInfo> it( mTransportInfoList );
+ TQPtrListIterator<KMTransportInfo> it( mTransportInfoList );
for ( int i = 1 ; it.current() ; ++it, ++i )
(*it)->writeConfig(i);
@@ -1046,27 +1046,27 @@ void AccountsPage::SendingTab::save() {
general.writeEntry( "Default domain", mDefaultDomainEdit->text() );
}
-QString AccountsPage::ReceivingTab::helpAnchor() const {
- return QString::fromLatin1("configure-accounts-receiving");
+TQString AccountsPage::ReceivingTab::helpAnchor() const {
+ return TQString::fromLatin1("configure-accounts-receiving");
}
-AccountsPageReceivingTab::AccountsPageReceivingTab( QWidget * parent, const char * name )
+AccountsPageReceivingTab::AccountsPageReceivingTab( TQWidget * parent, const char * name )
: ConfigModuleTab ( parent, name )
{
// temp. vars:
- QVBoxLayout *vlay;
- QVBoxLayout *btn_vlay;
- QHBoxLayout *hlay;
- QPushButton *button;
- QGroupBox *group;
+ TQVBoxLayout *vlay;
+ TQVBoxLayout *btn_vlay;
+ TQHBoxLayout *hlay;
+ TQPushButton *button;
+ TQGroupBox *group;
- vlay = new QVBoxLayout( this, KDialog::marginHint(), KDialog::spacingHint() );
+ vlay = new TQVBoxLayout( this, KDialog::marginHint(), KDialog::spacingHint() );
// label: zero stretch
- vlay->addWidget( new QLabel( i18n("Incoming accounts (add at least one):"), this ) );
+ vlay->addWidget( new TQLabel( i18n("Incoming accounts (add at least one):"), this ) );
// hbox layout: stretch 10, spacing inherited from vlay
- hlay = new QHBoxLayout();
+ hlay = new TQHBoxLayout();
vlay->addLayout( hlay, 10 ); // high stretch to suppress groupbox's growing
// account list: left widget in hlay; stretch 1
@@ -1076,75 +1076,75 @@ AccountsPageReceivingTab::AccountsPageReceivingTab( QWidget * parent, const char
mAccountList->addColumn( i18n("Folder") );
mAccountList->setAllColumnsShowFocus( true );
mAccountList->setSorting( -1 );
- connect( mAccountList, SIGNAL(selectionChanged()),
- this, SLOT(slotAccountSelected()) );
- connect( mAccountList, SIGNAL(doubleClicked( QListViewItem *)),
- this, SLOT(slotModifySelectedAccount()) );
+ connect( mAccountList, TQT_SIGNAL(selectionChanged()),
+ this, TQT_SLOT(slotAccountSelected()) );
+ connect( mAccountList, TQT_SIGNAL(doubleClicked( TQListViewItem *)),
+ this, TQT_SLOT(slotModifySelectedAccount()) );
hlay->addWidget( mAccountList, 1 );
// a vbox layout for the buttons: zero stretch, spacing inherited from hlay
- btn_vlay = new QVBoxLayout( hlay );
+ btn_vlay = new TQVBoxLayout( hlay );
// "add..." button: stretch 0
- button = new QPushButton( i18n("A&dd..."), this );
+ button = new TQPushButton( i18n("A&dd..."), this );
button->setAutoDefault( false );
- connect( button, SIGNAL(clicked()),
- this, SLOT(slotAddAccount()) );
+ connect( button, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotAddAccount()) );
btn_vlay->addWidget( button );
// "modify..." button: stretch 0
- mModifyAccountButton = new QPushButton( i18n("&Modify..."), this );
+ mModifyAccountButton = new TQPushButton( i18n("&Modify..."), this );
mModifyAccountButton->setAutoDefault( false );
mModifyAccountButton->setEnabled( false ); // b/c no item is selected yet
- connect( mModifyAccountButton, SIGNAL(clicked()),
- this, SLOT(slotModifySelectedAccount()) );
+ connect( mModifyAccountButton, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotModifySelectedAccount()) );
btn_vlay->addWidget( mModifyAccountButton );
// "remove..." button: stretch 0
- mRemoveAccountButton = new QPushButton( i18n("R&emove"), this );
+ mRemoveAccountButton = new TQPushButton( i18n("R&emove"), this );
mRemoveAccountButton->setAutoDefault( false );
mRemoveAccountButton->setEnabled( false ); // b/c no item is selected yet
- connect( mRemoveAccountButton, SIGNAL(clicked()),
- this, SLOT(slotRemoveSelectedAccount()) );
+ connect( mRemoveAccountButton, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotRemoveSelectedAccount()) );
btn_vlay->addWidget( mRemoveAccountButton );
btn_vlay->addStretch( 1 ); // spacer
- mCheckmailStartupCheck = new QCheckBox( i18n("Chec&k mail on startup"), this );
+ mCheckmailStartupCheck = new TQCheckBox( i18n("Chec&k mail on startup"), this );
vlay->addWidget( mCheckmailStartupCheck );
- connect( mCheckmailStartupCheck, SIGNAL( stateChanged( int ) ),
- this, SLOT( slotEmitChanged( void ) ) );
+ connect( mCheckmailStartupCheck, TQT_SIGNAL( stateChanged( int ) ),
+ this, TQT_SLOT( slotEmitChanged( void ) ) );
// "New Mail Notification" group box: stretch 0
- group = new QVGroupBox( i18n("New Mail Notification"), this );
+ group = new TQVGroupBox( i18n("New Mail Notification"), this );
vlay->addWidget( group );
group->layout()->setSpacing( KDialog::spacingHint() );
// "beep on new mail" check box:
- mBeepNewMailCheck = new QCheckBox(i18n("&Beep"), group );
- mBeepNewMailCheck->setSizePolicy( QSizePolicy( QSizePolicy::MinimumExpanding,
- QSizePolicy::Fixed ) );
- connect( mBeepNewMailCheck, SIGNAL( stateChanged( int ) ),
- this, SLOT( slotEmitChanged( void ) ) );
+ mBeepNewMailCheck = new TQCheckBox(i18n("&Beep"), group );
+ mBeepNewMailCheck->setSizePolicy( TQSizePolicy( TQSizePolicy::MinimumExpanding,
+ TQSizePolicy::Fixed ) );
+ connect( mBeepNewMailCheck, TQT_SIGNAL( stateChanged( int ) ),
+ this, TQT_SLOT( slotEmitChanged( void ) ) );
// "Detailed new mail notification" check box
mVerboseNotificationCheck =
- new QCheckBox( i18n( "Deta&iled new mail notification" ), group );
- mVerboseNotificationCheck->setSizePolicy( QSizePolicy( QSizePolicy::MinimumExpanding,
- QSizePolicy::Fixed ) );
- QToolTip::add( mVerboseNotificationCheck,
+ new TQCheckBox( i18n( "Deta&iled new mail notification" ), group );
+ mVerboseNotificationCheck->setSizePolicy( TQSizePolicy( TQSizePolicy::MinimumExpanding,
+ TQSizePolicy::Fixed ) );
+ TQToolTip::add( mVerboseNotificationCheck,
i18n( "Show for each folder the number of newly arrived "
"messages" ) );
- QWhatsThis::add( mVerboseNotificationCheck,
+ TQWhatsThis::add( mVerboseNotificationCheck,
GlobalSettings::self()->verboseNewMailNotificationItem()->whatsThis() );
- connect( mVerboseNotificationCheck, SIGNAL( stateChanged( int ) ),
- this, SLOT( slotEmitChanged() ) );
+ connect( mVerboseNotificationCheck, TQT_SIGNAL( stateChanged( int ) ),
+ this, TQT_SLOT( slotEmitChanged() ) );
// "Other Actions" button:
- mOtherNewMailActionsButton = new QPushButton( i18n("Other Actio&ns"), group );
- mOtherNewMailActionsButton->setSizePolicy( QSizePolicy( QSizePolicy::Fixed,
- QSizePolicy::Fixed ) );
- connect( mOtherNewMailActionsButton, SIGNAL(clicked()),
- this, SLOT(slotEditNotifications()) );
+ mOtherNewMailActionsButton = new TQPushButton( i18n("Other Actio&ns"), group );
+ mOtherNewMailActionsButton->setSizePolicy( TQSizePolicy( TQSizePolicy::Fixed,
+ TQSizePolicy::Fixed ) );
+ connect( mOtherNewMailActionsButton, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotEditNotifications()) );
}
AccountsPageReceivingTab::~AccountsPageReceivingTab()
@@ -1153,14 +1153,14 @@ AccountsPageReceivingTab::~AccountsPageReceivingTab()
// we have a number of things to clean up:
// The newly created accounts
- QValueList< QGuardedPtr<KMAccount> >::Iterator it;
+ TQValueList< TQGuardedPtr<KMAccount> >::Iterator it;
for (it = mNewAccounts.begin(); it != mNewAccounts.end(); ++it ) {
delete (*it);
}
mNewAccounts.clear();
// The modified accounts
- QValueList<ModifiedAccountsType*>::Iterator j;
+ TQValueList<ModifiedAccountsType*>::Iterator j;
for ( j = mModifiedAccounts.begin() ; j != mModifiedAccounts.end() ; ++j ) {
delete (*j)->newAccount;
delete (*j);
@@ -1172,31 +1172,31 @@ AccountsPageReceivingTab::~AccountsPageReceivingTab()
void AccountsPage::ReceivingTab::slotAccountSelected()
{
- QListViewItem * item = mAccountList->selectedItem();
+ TQListViewItem * item = mAccountList->selectedItem();
mModifyAccountButton->setEnabled( item );
mRemoveAccountButton->setEnabled( item );
}
-QStringList AccountsPage::ReceivingTab::occupiedNames()
+TQStringList AccountsPage::ReceivingTab::occupiedNames()
{
- QStringList accountNames = kmkernel->acctMgr()->getAccounts();
+ TQStringList accountNames = kmkernel->acctMgr()->getAccounts();
- QValueList<ModifiedAccountsType*>::Iterator k;
+ TQValueList<ModifiedAccountsType*>::Iterator k;
for (k = mModifiedAccounts.begin(); k != mModifiedAccounts.end(); ++k )
if ((*k)->oldAccount)
accountNames.remove( (*k)->oldAccount->name() );
- QValueList< QGuardedPtr<KMAccount> >::Iterator l;
+ TQValueList< TQGuardedPtr<KMAccount> >::Iterator l;
for (l = mAccountsToDelete.begin(); l != mAccountsToDelete.end(); ++l )
if (*l)
accountNames.remove( (*l)->name() );
- QValueList< QGuardedPtr<KMAccount> >::Iterator it;
+ TQValueList< TQGuardedPtr<KMAccount> >::Iterator it;
for (it = mNewAccounts.begin(); it != mNewAccounts.end(); ++it )
if (*it)
accountNames += (*it)->name();
- QValueList<ModifiedAccountsType*>::Iterator j;
+ TQValueList<ModifiedAccountsType*>::Iterator j;
for (j = mModifiedAccounts.begin(); j != mModifiedAccounts.end(); ++j )
accountNames += (*j)->newAccount->name();
@@ -1205,7 +1205,7 @@ QStringList AccountsPage::ReceivingTab::occupiedNames()
void AccountsPage::ReceivingTab::slotAddAccount() {
KMAcctSelDlg accountSelectorDialog( this );
- if( accountSelectorDialog.exec() != QDialog::Accepted ) return;
+ if( accountSelectorDialog.exec() != TQDialog::Accepted ) return;
const char *accountType = 0;
switch ( accountSelectorDialog.selected() ) {
@@ -1223,7 +1223,7 @@ void AccountsPage::ReceivingTab::slotAddAccount() {
}
KMAccount *account
- = kmkernel->acctMgr()->create( QString::fromLatin1( accountType ) );
+ = kmkernel->acctMgr()->create( TQString::fromLatin1( accountType ) );
if ( !account ) {
// ### FIXME: Give the user more information. Is this error
// recoverable?
@@ -1235,9 +1235,9 @@ void AccountsPage::ReceivingTab::slotAddAccount() {
AccountDialog dialog( i18n("Add Account"), account, this );
- QStringList accountNames = occupiedNames();
+ TQStringList accountNames = occupiedNames();
- if( dialog.exec() != QDialog::Accepted ) {
+ if( dialog.exec() != TQDialog::Accepted ) {
delete account;
return;
}
@@ -1245,12 +1245,12 @@ void AccountsPage::ReceivingTab::slotAddAccount() {
account->deinstallTimer();
account->setName( uniqueName( accountNames, account->name() ) );
- QListViewItem *after = mAccountList->firstChild();
+ TQListViewItem *after = mAccountList->firstChild();
while ( after && after->nextSibling() )
after = after->nextSibling();
- QListViewItem *listItem =
- new QListViewItem( mAccountList, after, account->name(), account->type() );
+ TQListViewItem *listItem =
+ new TQListViewItem( mAccountList, after, account->name(), account->type() );
if( account->folder() )
listItem->setText( 2, account->folder()->label() );
@@ -1262,11 +1262,11 @@ void AccountsPage::ReceivingTab::slotAddAccount() {
void AccountsPage::ReceivingTab::slotModifySelectedAccount()
{
- QListViewItem *listItem = mAccountList->selectedItem();
+ TQListViewItem *listItem = mAccountList->selectedItem();
if( !listItem ) return;
KMAccount *account = 0;
- QValueList<ModifiedAccountsType*>::Iterator j;
+ TQValueList<ModifiedAccountsType*>::Iterator j;
for (j = mModifiedAccounts.begin(); j != mModifiedAccounts.end(); ++j )
if ( (*j)->newAccount->name() == listItem->text(0) ) {
account = (*j)->newAccount;
@@ -1274,7 +1274,7 @@ void AccountsPage::ReceivingTab::slotModifySelectedAccount()
}
if ( !account ) {
- QValueList< QGuardedPtr<KMAccount> >::Iterator it;
+ TQValueList< TQGuardedPtr<KMAccount> >::Iterator it;
for ( it = mNewAccounts.begin() ; it != mNewAccounts.end() ; ++it )
if ( (*it)->name() == listItem->text(0) ) {
account = *it;
@@ -1309,12 +1309,12 @@ void AccountsPage::ReceivingTab::slotModifySelectedAccount()
}
}
- QStringList accountNames = occupiedNames();
+ TQStringList accountNames = occupiedNames();
accountNames.remove( account->name() );
AccountDialog dialog( i18n("Modify Account"), account, this );
- if( dialog.exec() != QDialog::Accepted ) return;
+ if( dialog.exec() != TQDialog::Accepted ) return;
account->setName( uniqueName( accountNames, account->name() ) );
@@ -1329,11 +1329,11 @@ void AccountsPage::ReceivingTab::slotModifySelectedAccount()
void AccountsPage::ReceivingTab::slotRemoveSelectedAccount() {
- QListViewItem *listItem = mAccountList->selectedItem();
+ TQListViewItem *listItem = mAccountList->selectedItem();
if( !listItem ) return;
KMAccount *acct = 0;
- QValueList<ModifiedAccountsType*>::Iterator j;
+ TQValueList<ModifiedAccountsType*>::Iterator j;
for ( j = mModifiedAccounts.begin() ; j != mModifiedAccounts.end() ; ++j )
if ( (*j)->newAccount->name() == listItem->text(0) ) {
acct = (*j)->oldAccount;
@@ -1342,7 +1342,7 @@ void AccountsPage::ReceivingTab::slotRemoveSelectedAccount() {
break;
}
if ( !acct ) {
- QValueList< QGuardedPtr<KMAccount> >::Iterator it;
+ TQValueList< TQGuardedPtr<KMAccount> >::Iterator it;
for ( it = mNewAccounts.begin() ; it != mNewAccounts.end() ; ++it )
if ( (*it)->name() == listItem->text(0) ) {
acct = *it;
@@ -1362,7 +1362,7 @@ void AccountsPage::ReceivingTab::slotRemoveSelectedAccount() {
return;
}
- QListViewItem * item = listItem->itemBelow();
+ TQListViewItem * item = listItem->itemBelow();
if ( !item ) item = listItem->itemAbove();
delete listItem;
@@ -1388,17 +1388,17 @@ void AccountsPage::ReceivingTab::doLoadOther() {
KConfigGroup general( KMKernel::config(), "General" );
mAccountList->clear();
- QListViewItem *top = 0;
+ TQListViewItem *top = 0;
for( KMAccount *a = kmkernel->acctMgr()->first(); a!=0;
a = kmkernel->acctMgr()->next() ) {
- QListViewItem *listItem =
- new QListViewItem( mAccountList, top, a->name(), a->type() );
+ TQListViewItem *listItem =
+ new TQListViewItem( mAccountList, top, a->name(), a->type() );
if( a->folder() )
listItem->setText( 2, a->folder()->label() );
top = listItem;
}
- QListViewItem *listItem = mAccountList->firstChild();
+ TQListViewItem *listItem = mAccountList->firstChild();
if ( listItem ) {
mAccountList->setCurrentItem( listItem );
mAccountList->setSelected( listItem, true );
@@ -1406,7 +1406,7 @@ void AccountsPage::ReceivingTab::doLoadOther() {
mBeepNewMailCheck->setChecked( general.readBoolEntry("beep-on-mail", false ) );
mCheckmailStartupCheck->setChecked( general.readBoolEntry("checkmail-startup", false) );
- QTimer::singleShot( 0, this, SLOT( slotTweakAccountList() ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( slotTweakAccountList() ) );
}
void AccountsPage::ReceivingTab::slotTweakAccountList()
@@ -1418,13 +1418,13 @@ void AccountsPage::ReceivingTab::slotTweakAccountList()
void AccountsPage::ReceivingTab::save() {
// Add accounts marked as new
- QValueList< QGuardedPtr<KMAccount> >::Iterator it;
+ TQValueList< TQGuardedPtr<KMAccount> >::Iterator it;
for (it = mNewAccounts.begin(); it != mNewAccounts.end(); ++it ) {
kmkernel->acctMgr()->add( *it ); // calls installTimer too
}
// Update accounts that have been modified
- QValueList<ModifiedAccountsType*>::Iterator j;
+ TQValueList<ModifiedAccountsType*>::Iterator j;
for ( j = mModifiedAccounts.begin() ; j != mModifiedAccounts.end() ; ++j ) {
(*j)->oldAccount->pseudoAssign( (*j)->newAccount );
delete (*j)->newAccount;
@@ -1471,11 +1471,11 @@ void AccountsPage::ReceivingTab::save() {
// * AppearancePage *
// * *
// *************************************************************
-QString AppearancePage::helpAnchor() const {
- return QString::fromLatin1("configure-appearance");
+TQString AppearancePage::helpAnchor() const {
+ return TQString::fromLatin1("configure-appearance");
}
-AppearancePage::AppearancePage( QWidget * parent, const char * name )
+AppearancePage::AppearancePage( TQWidget * parent, const char * name )
: ConfigModuleWithTabs( parent, name )
{
//
@@ -1518,8 +1518,8 @@ AppearancePage::AppearancePage( QWidget * parent, const char * name )
}
-QString AppearancePage::FontsTab::helpAnchor() const {
- return QString::fromLatin1("configure-appearance-fonts");
+TQString AppearancePage::FontsTab::helpAnchor() const {
+ return TQString::fromLatin1("configure-appearance-fonts");
}
static const struct {
@@ -1545,58 +1545,58 @@ static const struct {
};
static const int numFontNames = sizeof fontNames / sizeof *fontNames;
-AppearancePageFontsTab::AppearancePageFontsTab( QWidget * parent, const char * name )
+AppearancePageFontsTab::AppearancePageFontsTab( TQWidget * parent, const char * name )
: ConfigModuleTab( parent, name ), mActiveFontIndex( -1 )
{
assert( numFontNames == sizeof mFont / sizeof *mFont );
// tmp. vars:
- QVBoxLayout *vlay;
- QHBoxLayout *hlay;
- QLabel *label;
+ TQVBoxLayout *vlay;
+ TQHBoxLayout *hlay;
+ TQLabel *label;
// "Use custom fonts" checkbox, followed by <hr>
- vlay = new QVBoxLayout( this, KDialog::marginHint(), KDialog::spacingHint() );
- mCustomFontCheck = new QCheckBox( i18n("&Use custom fonts"), this );
+ vlay = new TQVBoxLayout( this, KDialog::marginHint(), KDialog::spacingHint() );
+ mCustomFontCheck = new TQCheckBox( i18n("&Use custom fonts"), this );
vlay->addWidget( mCustomFontCheck );
vlay->addWidget( new KSeparator( KSeparator::HLine, this ) );
- connect ( mCustomFontCheck, SIGNAL( stateChanged( int ) ),
- this, SLOT( slotEmitChanged( void ) ) );
+ connect ( mCustomFontCheck, TQT_SIGNAL( stateChanged( int ) ),
+ this, TQT_SLOT( slotEmitChanged( void ) ) );
// "font location" combo box and label:
- hlay = new QHBoxLayout( vlay ); // inherites spacing
- mFontLocationCombo = new QComboBox( false, this );
+ hlay = new TQHBoxLayout( vlay ); // inherites spacing
+ mFontLocationCombo = new TQComboBox( false, this );
mFontLocationCombo->setEnabled( false ); // !mCustomFontCheck->isChecked()
- QStringList fontDescriptions;
+ TQStringList fontDescriptions;
for ( int i = 0 ; i < numFontNames ; i++ )
fontDescriptions << i18n( fontNames[i].displayName );
mFontLocationCombo->insertStringList( fontDescriptions );
- label = new QLabel( mFontLocationCombo, i18n("Apply &to:"), this );
+ label = new TQLabel( mFontLocationCombo, i18n("Apply &to:"), this );
label->setEnabled( false ); // since !mCustomFontCheck->isChecked()
hlay->addWidget( label );
hlay->addWidget( mFontLocationCombo );
hlay->addStretch( 10 );
vlay->addSpacing( KDialog::spacingHint() );
- mFontChooser = new KFontChooser( this, "font", false, QStringList(),
+ mFontChooser = new KFontChooser( this, "font", false, TQStringList(),
false, 4 );
mFontChooser->setEnabled( false ); // since !mCustomFontCheck->isChecked()
vlay->addWidget( mFontChooser );
- connect ( mFontChooser, SIGNAL( fontSelected( const QFont& ) ),
- this, SLOT( slotEmitChanged( void ) ) );
+ connect ( mFontChooser, TQT_SIGNAL( fontSelected( const TQFont& ) ),
+ this, TQT_SLOT( slotEmitChanged( void ) ) );
// {en,dis}able widgets depending on the state of mCustomFontCheck:
- connect( mCustomFontCheck, SIGNAL(toggled(bool)),
- label, SLOT(setEnabled(bool)) );
- connect( mCustomFontCheck, SIGNAL(toggled(bool)),
- mFontLocationCombo, SLOT(setEnabled(bool)) );
- connect( mCustomFontCheck, SIGNAL(toggled(bool)),
- mFontChooser, SLOT(setEnabled(bool)) );
+ connect( mCustomFontCheck, TQT_SIGNAL(toggled(bool)),
+ label, TQT_SLOT(setEnabled(bool)) );
+ connect( mCustomFontCheck, TQT_SIGNAL(toggled(bool)),
+ mFontLocationCombo, TQT_SLOT(setEnabled(bool)) );
+ connect( mCustomFontCheck, TQT_SIGNAL(toggled(bool)),
+ mFontChooser, TQT_SLOT(setEnabled(bool)) );
// load the right font settings into mFontChooser:
- connect( mFontLocationCombo, SIGNAL(activated(int) ),
- this, SLOT(slotFontSelectorChanged(int)) );
+ connect( mFontLocationCombo, TQT_SIGNAL(activated(int) ),
+ this, TQT_SLOT(slotFontSelectorChanged(int)) );
}
@@ -1623,14 +1623,14 @@ void AppearancePage::FontsTab::slotFontSelectorChanged( int index )
mActiveFontIndex = index;
// Disonnect so the "Apply" button is not activated by the change
- disconnect ( mFontChooser, SIGNAL( fontSelected( const QFont& ) ),
- this, SLOT( slotEmitChanged( void ) ) );
+ disconnect ( mFontChooser, TQT_SIGNAL( fontSelected( const TQFont& ) ),
+ this, TQT_SLOT( slotEmitChanged( void ) ) );
// Display the new setting:
mFontChooser->setFont( mFont[index], fontNames[index].onlyFixed );
- connect ( mFontChooser, SIGNAL( fontSelected( const QFont& ) ),
- this, SLOT( slotEmitChanged( void ) ) );
+ connect ( mFontChooser, TQT_SIGNAL( fontSelected( const TQFont& ) ),
+ this, TQT_SLOT( slotEmitChanged( void ) ) );
// Disable Family and Size list if we have selected a quote font:
mFontChooser->enableColumn( KFontChooser::FamilyList|KFontChooser::SizeList,
@@ -1641,7 +1641,7 @@ void AppearancePage::FontsTab::doLoadOther() {
KConfigGroup fonts( KMKernel::config(), "Fonts" );
mFont[0] = KGlobalSettings::generalFont();
- QFont fixedFont = KGlobalSettings::fixedFont();
+ TQFont fixedFont = KGlobalSettings::fixedFont();
for ( int i = 0 ; i < numFontNames ; i++ )
mFont[i] = fonts.readFontEntry( fontNames[i].configName,
(fontNames[i].onlyFixed) ? &fixedFont : &mFont[0] );
@@ -1687,8 +1687,8 @@ void AppearancePage::FontsTab::save() {
fonts.writeEntry( fontNames[i].configName, mFont[i] );
}
-QString AppearancePage::ColorsTab::helpAnchor() const {
- return QString::fromLatin1("configure-appearance-colors");
+TQString AppearancePage::ColorsTab::helpAnchor() const {
+ return TQString::fromLatin1("configure-appearance-colors");
}
@@ -1723,57 +1723,57 @@ static const struct {
};
static const int numColorNames = sizeof colorNames / sizeof *colorNames;
-AppearancePageColorsTab::AppearancePageColorsTab( QWidget * parent, const char * name )
+AppearancePageColorsTab::AppearancePageColorsTab( TQWidget * parent, const char * name )
: ConfigModuleTab( parent, name )
{
// tmp. vars:
- QVBoxLayout *vlay;
+ TQVBoxLayout *vlay;
// "use custom colors" check box
- vlay = new QVBoxLayout( this, KDialog::marginHint(), KDialog::spacingHint() );
- mCustomColorCheck = new QCheckBox( i18n("&Use custom colors"), this );
+ vlay = new TQVBoxLayout( this, KDialog::marginHint(), KDialog::spacingHint() );
+ mCustomColorCheck = new TQCheckBox( i18n("&Use custom colors"), this );
vlay->addWidget( mCustomColorCheck );
- connect( mCustomColorCheck, SIGNAL( stateChanged( int ) ),
- this, SLOT( slotEmitChanged( void ) ) );
+ connect( mCustomColorCheck, TQT_SIGNAL( stateChanged( int ) ),
+ this, TQT_SLOT( slotEmitChanged( void ) ) );
// color list box:
mColorList = new ColorListBox( this );
mColorList->setEnabled( false ); // since !mCustomColorCheck->isChecked()
- QStringList modeList;
+ TQStringList modeList;
for ( int i = 0 ; i < numColorNames ; i++ )
mColorList->insertItem( new ColorListItem( i18n( colorNames[i].displayName ) ) );
vlay->addWidget( mColorList, 1 );
// "recycle colors" check box:
mRecycleColorCheck =
- new QCheckBox( i18n("Recycle colors on deep &quoting"), this );
+ new TQCheckBox( i18n("Recycle colors on deep &quoting"), this );
mRecycleColorCheck->setEnabled( false );
vlay->addWidget( mRecycleColorCheck );
- connect( mRecycleColorCheck, SIGNAL( stateChanged( int ) ),
- this, SLOT( slotEmitChanged( void ) ) );
+ connect( mRecycleColorCheck, TQT_SIGNAL( stateChanged( int ) ),
+ this, TQT_SLOT( slotEmitChanged( void ) ) );
// close to quota threshold
- QHBoxLayout *hbox = new QHBoxLayout(vlay);
- QLabel *l = new QLabel( i18n("Close to quota threshold"), this );
+ TQHBoxLayout *hbox = new TQHBoxLayout(vlay);
+ TQLabel *l = new TQLabel( i18n("Close to quota threshold"), this );
hbox->addWidget( l );
l->setEnabled( false );
- mCloseToQuotaThreshold = new QSpinBox( 0, 100, 1, this );
- connect( mCloseToQuotaThreshold, SIGNAL( valueChanged( int ) ),
- this, SLOT( slotEmitChanged( void ) ) );
+ mCloseToQuotaThreshold = new TQSpinBox( 0, 100, 1, this );
+ connect( mCloseToQuotaThreshold, TQT_SIGNAL( valueChanged( int ) ),
+ this, TQT_SLOT( slotEmitChanged( void ) ) );
mCloseToQuotaThreshold->setSuffix( i18n("%"));
hbox->addWidget( mCloseToQuotaThreshold );
- hbox->addWidget( new QWidget(this), 2 );
+ hbox->addWidget( new TQWidget(this), 2 );
// {en,dir}able widgets depending on the state of mCustomColorCheck:
- connect( mCustomColorCheck, SIGNAL(toggled(bool)),
- mColorList, SLOT(setEnabled(bool)) );
- connect( mCustomColorCheck, SIGNAL(toggled(bool)),
- mRecycleColorCheck, SLOT(setEnabled(bool)) );
- connect( mCustomColorCheck, SIGNAL(toggled(bool)),
- l, SLOT(setEnabled(bool)) );
+ connect( mCustomColorCheck, TQT_SIGNAL(toggled(bool)),
+ mColorList, TQT_SLOT(setEnabled(bool)) );
+ connect( mCustomColorCheck, TQT_SIGNAL(toggled(bool)),
+ mRecycleColorCheck, TQT_SLOT(setEnabled(bool)) );
+ connect( mCustomColorCheck, TQT_SIGNAL(toggled(bool)),
+ l, TQT_SLOT(setEnabled(bool)) );
- connect( mCustomColorCheck, SIGNAL( stateChanged( int ) ),
- this, SLOT( slotEmitChanged( void ) ) );
+ connect( mCustomColorCheck, TQT_SIGNAL( stateChanged( int ) ),
+ this, TQT_SLOT( slotEmitChanged( void ) ) );
}
void AppearancePage::ColorsTab::doLoadOther() {
@@ -1783,26 +1783,26 @@ void AppearancePage::ColorsTab::doLoadOther() {
mRecycleColorCheck->setChecked( reader.readBoolEntry( "RecycleQuoteColors", false ) );
mCloseToQuotaThreshold->setValue( GlobalSettings::closeToQuotaThreshold() );
- static const QColor defaultColor[ numColorNames ] = {
+ static const TQColor defaultColor[ numColorNames ] = {
kapp->palette().active().base(), // bg
KGlobalSettings::alternateBackgroundColor(), // alt bg
kapp->palette().active().text(), // fg
- QColor( 0x00, 0x80, 0x00 ), // quoted l1
- QColor( 0x00, 0x70, 0x00 ), // quoted l2
- QColor( 0x00, 0x60, 0x00 ), // quoted l3
+ TQColor( 0x00, 0x80, 0x00 ), // quoted l1
+ TQColor( 0x00, 0x70, 0x00 ), // quoted l2
+ TQColor( 0x00, 0x60, 0x00 ), // quoted l3
KGlobalSettings::linkColor(), // link
KGlobalSettings::visitedLinkColor(), // visited link
Qt::red, // misspelled words
Qt::red, // new msg
Qt::blue, // unread mgs
- QColor( 0x00, 0x7F, 0x00 ), // important msg
+ TQColor( 0x00, 0x7F, 0x00 ), // important msg
Qt::blue, // todo mgs
- QColor( 0x00, 0x80, 0xFF ), // light blue // pgp encrypted
- QColor( 0x40, 0xFF, 0x40 ), // light green // pgp ok, trusted key
- QColor( 0xFF, 0xFF, 0x40 ), // light yellow // pgp ok, untrusted key
- QColor( 0xFF, 0xFF, 0x40 ), // light yellow // pgp unchk
+ TQColor( 0x00, 0x80, 0xFF ), // light blue // pgp encrypted
+ TQColor( 0x40, 0xFF, 0x40 ), // light green // pgp ok, trusted key
+ TQColor( 0xFF, 0xFF, 0x40 ), // light yellow // pgp ok, untrusted key
+ TQColor( 0xFF, 0xFF, 0x40 ), // light yellow // pgp unchk
Qt::red, // pgp bad
- QColor( 0xFF, 0x40, 0x40 ), // warning text color: light red
+ TQColor( 0xFF, 0x40, 0x40 ), // warning text color: light red
Qt::red, // close to quota
Qt::lightGray, // colorbar plain bg
Qt::black, // colorbar plain fg
@@ -1814,8 +1814,8 @@ void AppearancePage::ColorsTab::doLoadOther() {
mColorList->setColor( i,
reader.readColorEntry( colorNames[i].configName, &defaultColor[i] ) );
}
- connect( mColorList, SIGNAL( changed( ) ),
- this, SLOT( slotEmitChanged( void ) ) );
+ connect( mColorList, TQT_SIGNAL( changed( ) ),
+ this, TQT_SLOT( slotEmitChanged( void ) ) );
}
void AppearancePage::ColorsTab::installProfile( KConfig * profile ) {
@@ -1847,8 +1847,8 @@ void AppearancePage::ColorsTab::save() {
GlobalSettings::setCloseToQuotaThreshold( mCloseToQuotaThreshold->value() );
}
-QString AppearancePage::LayoutTab::helpAnchor() const {
- return QString::fromLatin1("configure-appearance-layout");
+TQString AppearancePage::LayoutTab::helpAnchor() const {
+ return TQString::fromLatin1("configure-appearance-layout");
}
static const EnumConfigEntryItem folderListModes[] = {
@@ -1891,45 +1891,45 @@ static const EnumConfigEntry readerWindowMode = {
readerWindowModes, DIM(readerWindowModes), 1
};
-AppearancePageLayoutTab::AppearancePageLayoutTab( QWidget * parent, const char * name )
+AppearancePageLayoutTab::AppearancePageLayoutTab( TQWidget * parent, const char * name )
: ConfigModuleTab( parent, name )
{
// tmp. vars:
- QVBoxLayout * vlay;
+ TQVBoxLayout * vlay;
- vlay = new QVBoxLayout( this, KDialog::marginHint(), KDialog::spacingHint() );
+ vlay = new TQVBoxLayout( this, KDialog::marginHint(), KDialog::spacingHint() );
// "folder list" radio buttons:
- populateButtonGroup( mFolderListGroup = new QHButtonGroup( this ), folderListMode );
+ populateButtonGroup( mFolderListGroup = new TQHButtonGroup( this ), folderListMode );
vlay->addWidget( mFolderListGroup );
- connect( mFolderListGroup, SIGNAL ( clicked( int ) ),
- this, SLOT( slotEmitChanged() ) );
+ connect( mFolderListGroup, TQT_SIGNAL ( clicked( int ) ),
+ this, TQT_SLOT( slotEmitChanged() ) );
- mFavoriteFolderViewCB = new QCheckBox( i18n("Show favorite folder view"), this );
- connect( mFavoriteFolderViewCB, SIGNAL(toggled(bool)), SLOT(slotEmitChanged()) );
+ mFavoriteFolderViewCB = new TQCheckBox( i18n("Show favorite folder view"), this );
+ connect( mFavoriteFolderViewCB, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotEmitChanged()) );
vlay->addWidget( mFavoriteFolderViewCB );
- mFolderQuickSearchCB = new QCheckBox( i18n("Show folder quick search field"), this );
- connect( mFolderQuickSearchCB, SIGNAL(toggled(bool)), SLOT(slotEmitChanged()) );
+ mFolderQuickSearchCB = new TQCheckBox( i18n("Show folder quick search field"), this );
+ connect( mFolderQuickSearchCB, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotEmitChanged()) );
vlay->addWidget( mFolderQuickSearchCB );
// "show reader window" radio buttons:
- populateButtonGroup( mReaderWindowModeGroup = new QVButtonGroup( this ), readerWindowMode );
+ populateButtonGroup( mReaderWindowModeGroup = new TQVButtonGroup( this ), readerWindowMode );
vlay->addWidget( mReaderWindowModeGroup );
- connect( mReaderWindowModeGroup, SIGNAL ( clicked( int ) ),
- this, SLOT( slotEmitChanged() ) );
+ connect( mReaderWindowModeGroup, TQT_SIGNAL ( clicked( int ) ),
+ this, TQT_SLOT( slotEmitChanged() ) );
// "Show MIME Tree" radio buttons:
- populateButtonGroup( mMIMETreeModeGroup = new QVButtonGroup( this ), mimeTreeMode );
+ populateButtonGroup( mMIMETreeModeGroup = new TQVButtonGroup( this ), mimeTreeMode );
vlay->addWidget( mMIMETreeModeGroup );
- connect( mMIMETreeModeGroup, SIGNAL ( clicked( int ) ),
- this, SLOT( slotEmitChanged() ) );
+ connect( mMIMETreeModeGroup, TQT_SIGNAL ( clicked( int ) ),
+ this, TQT_SLOT( slotEmitChanged() ) );
// "MIME Tree Location" radio buttons:
- populateButtonGroup( mMIMETreeLocationGroup = new QHButtonGroup( this ), mimeTreeLocation );
+ populateButtonGroup( mMIMETreeLocationGroup = new TQHButtonGroup( this ), mimeTreeLocation );
vlay->addWidget( mMIMETreeLocationGroup );
- connect( mMIMETreeLocationGroup, SIGNAL ( clicked( int ) ),
- this, SLOT( slotEmitChanged() ) );
+ connect( mMIMETreeLocationGroup, TQT_SIGNAL ( clicked( int ) ),
+ this, TQT_SLOT( slotEmitChanged() ) );
vlay->addStretch( 10 ); // spacer
}
@@ -1972,8 +1972,8 @@ void AppearancePage::LayoutTab::save() {
// Appearance Message List
//
-QString AppearancePage::HeadersTab::helpAnchor() const {
- return QString::fromLatin1("configure-appearance-headers");
+TQString AppearancePage::HeadersTab::helpAnchor() const {
+ return TQString::fromLatin1("configure-appearance-headers");
}
static const struct {
@@ -1989,87 +1989,87 @@ static const struct {
static const int numDateDisplayConfig =
sizeof dateDisplayConfig / sizeof *dateDisplayConfig;
-AppearancePageHeadersTab::AppearancePageHeadersTab( QWidget * parent, const char * name )
+AppearancePageHeadersTab::AppearancePageHeadersTab( TQWidget * parent, const char * name )
: ConfigModuleTab( parent, name ),
mCustomDateFormatEdit( 0 )
{
// tmp. vars:
- QButtonGroup * group;
- QRadioButton * radio;
+ TQButtonGroup * group;
+ TQRadioButton * radio;
- QVBoxLayout * vlay = new QVBoxLayout( this, KDialog::marginHint(), KDialog::spacingHint() );
+ TQVBoxLayout * vlay = new TQVBoxLayout( this, KDialog::marginHint(), KDialog::spacingHint() );
// "General Options" group:
- group = new QVButtonGroup( i18n( "General Options" ), this );
+ group = new TQVButtonGroup( i18n( "General Options" ), this );
group->layout()->setSpacing( KDialog::spacingHint() );
- mShowQuickSearch = new QCheckBox( i18n("Show Quick Search"), group );
+ mShowQuickSearch = new TQCheckBox( i18n("Show Quick Search"), group );
- mMessageSizeCheck = new QCheckBox( i18n("Display messa&ge sizes"), group );
+ mMessageSizeCheck = new TQCheckBox( i18n("Display messa&ge sizes"), group );
- mCryptoIconsCheck = new QCheckBox( i18n( "Show crypto &icons" ), group );
+ mCryptoIconsCheck = new TQCheckBox( i18n( "Show crypto &icons" ), group );
- mAttachmentCheck = new QCheckBox( i18n("Show attachment icon"), group );
+ mAttachmentCheck = new TQCheckBox( i18n("Show attachment icon"), group );
mNestedMessagesCheck =
- new QCheckBox( i18n("&Threaded message list"), group );
+ new TQCheckBox( i18n("&Threaded message list"), group );
- connect( mShowQuickSearch, SIGNAL( stateChanged( int ) ),
- this, SLOT( slotEmitChanged( void ) ) );
- connect( mMessageSizeCheck, SIGNAL( stateChanged( int ) ),
- this, SLOT( slotEmitChanged( void ) ) );
- connect( mAttachmentCheck, SIGNAL( stateChanged( int ) ),
- this, SLOT( slotEmitChanged( void ) ) );
- connect( mCryptoIconsCheck, SIGNAL( stateChanged( int ) ),
- this, SLOT( slotEmitChanged( void ) ) );
- connect( mNestedMessagesCheck, SIGNAL( stateChanged( int ) ),
- this, SLOT( slotEmitChanged( void ) ) );
+ connect( mShowQuickSearch, TQT_SIGNAL( stateChanged( int ) ),
+ this, TQT_SLOT( slotEmitChanged( void ) ) );
+ connect( mMessageSizeCheck, TQT_SIGNAL( stateChanged( int ) ),
+ this, TQT_SLOT( slotEmitChanged( void ) ) );
+ connect( mAttachmentCheck, TQT_SIGNAL( stateChanged( int ) ),
+ this, TQT_SLOT( slotEmitChanged( void ) ) );
+ connect( mCryptoIconsCheck, TQT_SIGNAL( stateChanged( int ) ),
+ this, TQT_SLOT( slotEmitChanged( void ) ) );
+ connect( mNestedMessagesCheck, TQT_SIGNAL( stateChanged( int ) ),
+ this, TQT_SLOT( slotEmitChanged( void ) ) );
vlay->addWidget( group );
// "Message Header Threading Options" group:
mNestingPolicy =
- new QVButtonGroup( i18n("Threaded Message List Options"), this );
+ new TQVButtonGroup( i18n("Threaded Message List Options"), this );
mNestingPolicy->layout()->setSpacing( KDialog::spacingHint() );
mNestingPolicy->insert(
- new QRadioButton( i18n("Always &keep threads open"),
+ new TQRadioButton( i18n("Always &keep threads open"),
mNestingPolicy ), 0 );
mNestingPolicy->insert(
- new QRadioButton( i18n("Threads default to o&pen"),
+ new TQRadioButton( i18n("Threads default to o&pen"),
mNestingPolicy ), 1 );
mNestingPolicy->insert(
- new QRadioButton( i18n("Threads default to closed"),
+ new TQRadioButton( i18n("Threads default to closed"),
mNestingPolicy ), 2 );
mNestingPolicy->insert(
- new QRadioButton( i18n("Open threads that contain ne&w, unread "
+ new TQRadioButton( i18n("Open threads that contain ne&w, unread "
"or important messages and open watched threads."),
mNestingPolicy ), 3 );
vlay->addWidget( mNestingPolicy );
- connect( mNestingPolicy, SIGNAL( clicked( int ) ),
- this, SLOT( slotEmitChanged( void ) ) );
+ connect( mNestingPolicy, TQT_SIGNAL( clicked( int ) ),
+ this, TQT_SLOT( slotEmitChanged( void ) ) );
// "Date Display" group:
- mDateDisplay = new QVButtonGroup( i18n("Date Display"), this );
+ mDateDisplay = new TQVButtonGroup( i18n("Date Display"), this );
mDateDisplay->layout()->setSpacing( KDialog::spacingHint() );
for ( int i = 0 ; i < numDateDisplayConfig ; i++ ) {
- QString buttonLabel = i18n(dateDisplayConfig[i].displayName);
+ TQString buttonLabel = i18n(dateDisplayConfig[i].displayName);
if ( buttonLabel.contains("%1") )
buttonLabel = buttonLabel.arg( DateFormatter::formatCurrentDate( dateDisplayConfig[i].dateDisplay ) );
- radio = new QRadioButton( buttonLabel, mDateDisplay );
+ radio = new TQRadioButton( buttonLabel, mDateDisplay );
mDateDisplay->insert( radio, i );
if ( dateDisplayConfig[i].dateDisplay == DateFormatter::Custom ) {
mCustomDateFormatEdit = new KLineEdit( mDateDisplay );
mCustomDateFormatEdit->setEnabled( false );
- connect( radio, SIGNAL(toggled(bool)),
- mCustomDateFormatEdit, SLOT(setEnabled(bool)) );
- connect( mCustomDateFormatEdit, SIGNAL(textChanged(const QString&)),
- this, SLOT(slotEmitChanged(void)) );
- QString customDateWhatsThis =
+ connect( radio, TQT_SIGNAL(toggled(bool)),
+ mCustomDateFormatEdit, TQT_SLOT(setEnabled(bool)) );
+ connect( mCustomDateFormatEdit, TQT_SIGNAL(textChanged(const TQString&)),
+ this, TQT_SLOT(slotEmitChanged(void)) );
+ TQString customDateWhatsThis =
i18n("<qt><p><strong>These expressions may be used for the date:"
"</strong></p>"
"<ul>"
@@ -2101,14 +2101,14 @@ AppearancePageHeadersTab::AppearancePageHeadersTab( QWidget * parent, const char
"</ul>"
"<p><strong>All other input characters will be ignored."
"</strong></p></qt>");
- QWhatsThis::add( mCustomDateFormatEdit, customDateWhatsThis );
- QWhatsThis::add( radio, customDateWhatsThis );
+ TQWhatsThis::add( mCustomDateFormatEdit, customDateWhatsThis );
+ TQWhatsThis::add( radio, customDateWhatsThis );
}
} // end for loop populating mDateDisplay
vlay->addWidget( mDateDisplay );
- connect( mDateDisplay, SIGNAL( clicked( int ) ),
- this, SLOT( slotEmitChanged( void ) ) );
+ connect( mDateDisplay, TQT_SIGNAL( clicked( int ) ),
+ this, TQT_SLOT( slotEmitChanged( void ) ) );
vlay->addStretch( 10 ); // spacer
@@ -2135,7 +2135,7 @@ void AppearancePage::HeadersTab::doLoadOther() {
general.readEntry( "customDateFormat" ) );
}
-void AppearancePage::HeadersTab::setDateDisplay( int num, const QString & format ) {
+void AppearancePage::HeadersTab::setDateDisplay( int num, const TQString & format ) {
DateFormatter::FormatType dateDisplay =
static_cast<DateFormatter::FormatType>( num );
@@ -2186,13 +2186,13 @@ void AppearancePage::HeadersTab::save() {
int result = KMessageBox::warningContinueCancel( this,
i18n("Changing the global threading setting will override "
"all folder specific values."),
- QString::null, KStdGuiItem::cont(), "threadOverride" );
+ TQString::null, KStdGuiItem::cont(), "threadOverride" );
if ( result == KMessageBox::Continue ) {
geometry.writeEntry( "nestedMessages", mNestedMessagesCheck->isChecked() );
// remove all threadMessagesOverride keys from all [Folder-*] groups:
- QStringList groups = KMKernel::config()->groupList().grep( QRegExp("^Folder-") );
+ TQStringList groups = KMKernel::config()->groupList().grep( TQRegExp("^Folder-") );
kdDebug(5006) << "groups.count() == " << groups.count() << endl;
- for ( QStringList::const_iterator it = groups.begin() ; it != groups.end() ; ++it ) {
+ for ( TQStringList::const_iterator it = groups.begin() ; it != groups.end() ; ++it ) {
KConfigGroup group( KMKernel::config(), *it );
group.deleteEntry( "threadMessagesOverride" );
}
@@ -2241,99 +2241,99 @@ static const BoolConfigEntry showExpandQuotesMark= {
};
-QString AppearancePage::ReaderTab::helpAnchor() const {
- return QString::fromLatin1("configure-appearance-reader");
+TQString AppearancePage::ReaderTab::helpAnchor() const {
+ return TQString::fromLatin1("configure-appearance-reader");
}
-AppearancePageReaderTab::AppearancePageReaderTab( QWidget * parent,
+AppearancePageReaderTab::AppearancePageReaderTab( TQWidget * parent,
const char * name )
: ConfigModuleTab( parent, name )
{
- QVBoxLayout *vlay = new QVBoxLayout( this, KDialog::marginHint(), KDialog::spacingHint() );
+ TQVBoxLayout *vlay = new TQVBoxLayout( this, KDialog::marginHint(), KDialog::spacingHint() );
// "show colorbar" check box:
- populateCheckBox( mShowColorbarCheck = new QCheckBox( this ), showColorbarMode );
+ populateCheckBox( mShowColorbarCheck = new TQCheckBox( this ), showColorbarMode );
vlay->addWidget( mShowColorbarCheck );
- connect( mShowColorbarCheck, SIGNAL ( stateChanged( int ) ),
- this, SLOT( slotEmitChanged() ) );
+ connect( mShowColorbarCheck, TQT_SIGNAL ( stateChanged( int ) ),
+ this, TQT_SLOT( slotEmitChanged() ) );
// "show spam status" check box;
- populateCheckBox( mShowSpamStatusCheck = new QCheckBox( this ), showSpamStatusMode );
+ populateCheckBox( mShowSpamStatusCheck = new TQCheckBox( this ), showSpamStatusMode );
vlay->addWidget( mShowSpamStatusCheck );
- connect( mShowSpamStatusCheck, SIGNAL ( stateChanged( int ) ),
- this, SLOT( slotEmitChanged() ) );
+ connect( mShowSpamStatusCheck, TQT_SIGNAL ( stateChanged( int ) ),
+ this, TQT_SLOT( slotEmitChanged() ) );
// "replace smileys by emoticons" check box;
- populateCheckBox( mShowEmoticonsCheck = new QCheckBox( this ), showEmoticons );
+ populateCheckBox( mShowEmoticonsCheck = new TQCheckBox( this ), showEmoticons );
vlay->addWidget( mShowEmoticonsCheck );
- connect( mShowEmoticonsCheck, SIGNAL ( stateChanged( int ) ),
- this, SLOT( slotEmitChanged() ) );
+ connect( mShowEmoticonsCheck, TQT_SIGNAL ( stateChanged( int ) ),
+ this, TQT_SLOT( slotEmitChanged() ) );
// "Use smaller font for quoted text" check box
- mShrinkQuotesCheck = new QCheckBox( i18n( shrinkQuotes.desc ), this,
+ mShrinkQuotesCheck = new TQCheckBox( i18n( shrinkQuotes.desc ), this,
"kcfg_ShrinkQuotes" );
vlay->addWidget( mShrinkQuotesCheck );
- connect( mShrinkQuotesCheck, SIGNAL( stateChanged( int ) ),
- this, SLOT( slotEmitChanged() ) );
+ connect( mShrinkQuotesCheck, TQT_SIGNAL( stateChanged( int ) ),
+ this, TQT_SLOT( slotEmitChanged() ) );
// "Show expand/collaps quote marks" check box;
- QHBoxLayout *hlay= new QHBoxLayout( vlay ); // inherits spacing
- populateCheckBox( mShowExpandQuotesMark= new QCheckBox( this ), showExpandQuotesMark);
+ TQHBoxLayout *hlay= new TQHBoxLayout( vlay ); // inherits spacing
+ populateCheckBox( mShowExpandQuotesMark= new TQCheckBox( this ), showExpandQuotesMark);
hlay->addWidget( mShowExpandQuotesMark);
- connect( mShowExpandQuotesMark, SIGNAL ( stateChanged( int ) ),
- this, SLOT( slotEmitChanged() ) );
+ connect( mShowExpandQuotesMark, TQT_SIGNAL ( stateChanged( int ) ),
+ this, TQT_SLOT( slotEmitChanged() ) );
hlay->addStretch( 1 );
mCollapseQuoteLevelSpin = new KIntSpinBox( 0/*min*/,10/*max*/,1/*step*/,
3/*init*/,10/*base*/,this );
- QLabel *label = new QLabel( mCollapseQuoteLevelSpin,
+ TQLabel *label = new TQLabel( mCollapseQuoteLevelSpin,
GlobalSettings::self()->collapseQuoteLevelSpinItem()->label(), this );
hlay->addWidget( label );
mCollapseQuoteLevelSpin->setEnabled( false ); //since !mShowExpandQuotesMark->isCheckec()
- connect( mCollapseQuoteLevelSpin, SIGNAL( valueChanged( int ) ),
- this, SLOT( slotEmitChanged( void ) ) );
+ connect( mCollapseQuoteLevelSpin, TQT_SIGNAL( valueChanged( int ) ),
+ this, TQT_SLOT( slotEmitChanged( void ) ) );
hlay->addWidget( mCollapseQuoteLevelSpin);
- connect( mShowExpandQuotesMark, SIGNAL( toggled( bool ) ),
- mCollapseQuoteLevelSpin, SLOT( setEnabled( bool ) ) );
+ connect( mShowExpandQuotesMark, TQT_SIGNAL( toggled( bool ) ),
+ mCollapseQuoteLevelSpin, TQT_SLOT( setEnabled( bool ) ) );
// Fallback Character Encoding
- hlay = new QHBoxLayout( vlay ); // inherits spacing
- mCharsetCombo = new QComboBox( this );
+ hlay = new TQHBoxLayout( vlay ); // inherits spacing
+ mCharsetCombo = new TQComboBox( this );
mCharsetCombo->insertStringList( KMMsgBase::supportedEncodings( false ) );
- connect( mCharsetCombo, SIGNAL( activated( int ) ),
- this, SLOT( slotEmitChanged( void ) ) );
+ connect( mCharsetCombo, TQT_SIGNAL( activated( int ) ),
+ this, TQT_SLOT( slotEmitChanged( void ) ) );
- QString fallbackCharsetWhatsThis =
+ TQString fallbackCharsetWhatsThis =
i18n( GlobalSettings::self()->fallbackCharacterEncodingItem()->whatsThis().utf8() );
- QWhatsThis::add( mCharsetCombo, fallbackCharsetWhatsThis );
+ TQWhatsThis::add( mCharsetCombo, fallbackCharsetWhatsThis );
- label = new QLabel( i18n("Fallback ch&aracter encoding:"), this );
+ label = new TQLabel( i18n("Fallback ch&aracter encoding:"), this );
label->setBuddy( mCharsetCombo );
hlay->addWidget( label );
hlay->addWidget( mCharsetCombo );
// Override Character Encoding
- QHBoxLayout *hlay2 = new QHBoxLayout( vlay ); // inherits spacing
- mOverrideCharsetCombo = new QComboBox( this );
- QStringList encodings = KMMsgBase::supportedEncodings( false );
+ TQHBoxLayout *hlay2 = new TQHBoxLayout( vlay ); // inherits spacing
+ mOverrideCharsetCombo = new TQComboBox( this );
+ TQStringList encodings = KMMsgBase::supportedEncodings( false );
encodings.prepend( i18n( "Auto" ) );
mOverrideCharsetCombo->insertStringList( encodings );
mOverrideCharsetCombo->setCurrentItem(0);
- connect( mOverrideCharsetCombo, SIGNAL( activated( int ) ),
- this, SLOT( slotEmitChanged( void ) ) );
+ connect( mOverrideCharsetCombo, TQT_SIGNAL( activated( int ) ),
+ this, TQT_SLOT( slotEmitChanged( void ) ) );
- QString overrideCharsetWhatsThis =
+ TQString overrideCharsetWhatsThis =
i18n( GlobalSettings::self()->overrideCharacterEncodingItem()->whatsThis().utf8() );
- QWhatsThis::add( mOverrideCharsetCombo, overrideCharsetWhatsThis );
+ TQWhatsThis::add( mOverrideCharsetCombo, overrideCharsetWhatsThis );
- label = new QLabel( i18n("&Override character encoding:"), this );
+ label = new TQLabel( i18n("&Override character encoding:"), this );
label->setBuddy( mOverrideCharsetCombo );
hlay2->addWidget( label );
@@ -2345,10 +2345,10 @@ AppearancePageReaderTab::AppearancePageReaderTab( QWidget * parent,
void AppearancePage::ReaderTab::readCurrentFallbackCodec()
{
- QStringList encodings = KMMsgBase::supportedEncodings( false );
- QStringList::ConstIterator it( encodings.begin() );
- QStringList::ConstIterator end( encodings.end() );
- QString currentEncoding = GlobalSettings::self()->fallbackCharacterEncoding();
+ TQStringList encodings = KMMsgBase::supportedEncodings( false );
+ TQStringList::ConstIterator it( encodings.begin() );
+ TQStringList::ConstIterator end( encodings.end() );
+ TQString currentEncoding = GlobalSettings::self()->fallbackCharacterEncoding();
currentEncoding = currentEncoding.replace( "iso ", "iso-", false );
///kdDebug(5006) << "Looking for encoding: " << currentEncoding << endl;
int i = 0;
@@ -2356,7 +2356,7 @@ void AppearancePage::ReaderTab::readCurrentFallbackCodec()
bool found = false;
for( ; it != end; ++it)
{
- const QString encoding = KGlobal::charsets()->encodingForName(*it);
+ const TQString encoding = KGlobal::charsets()->encodingForName(*it);
if ( encoding == "iso-8859-15" )
indexOfLatin9 = i;
if( encoding == currentEncoding )
@@ -2373,15 +2373,15 @@ void AppearancePage::ReaderTab::readCurrentFallbackCodec()
void AppearancePage::ReaderTab::readCurrentOverrideCodec()
{
- const QString &currentOverrideEncoding = GlobalSettings::self()->overrideCharacterEncoding();
+ const TQString &currentOverrideEncoding = GlobalSettings::self()->overrideCharacterEncoding();
if ( currentOverrideEncoding.isEmpty() ) {
mOverrideCharsetCombo->setCurrentItem( 0 );
return;
}
- QStringList encodings = KMMsgBase::supportedEncodings( false );
+ TQStringList encodings = KMMsgBase::supportedEncodings( false );
encodings.prepend( i18n( "Auto" ) );
- QStringList::Iterator it( encodings.begin() );
- QStringList::Iterator end( encodings.end() );
+ TQStringList::Iterator it( encodings.begin() );
+ TQStringList::Iterator end( encodings.end() );
uint i = 0;
for( ; it != end; ++it)
{
@@ -2397,7 +2397,7 @@ void AppearancePage::ReaderTab::readCurrentOverrideCodec()
kdWarning(5006) << "Unknown override character encoding \"" << currentOverrideEncoding
<< "\". Resetting to Auto." << endl;
mOverrideCharsetCombo->setCurrentItem( 0 );
- GlobalSettings::self()->setOverrideCharacterEncoding( QString::null );
+ GlobalSettings::self()->setOverrideCharacterEncoding( TQString::null );
}
}
@@ -2432,7 +2432,7 @@ void AppearancePage::ReaderTab::save() {
KGlobal::charsets()->encodingForName( mCharsetCombo->currentText() ) );
GlobalSettings::self()->setOverrideCharacterEncoding(
mOverrideCharsetCombo->currentItem() == 0 ?
- QString() :
+ TQString() :
KGlobal::charsets()->encodingForName( mOverrideCharsetCombo->currentText() ) );
}
@@ -2447,36 +2447,36 @@ void AppearancePage::ReaderTab::installProfile( KConfig * /* profile */ ) {
}
-QString AppearancePage::SystemTrayTab::helpAnchor() const {
- return QString::fromLatin1("configure-appearance-systemtray");
+TQString AppearancePage::SystemTrayTab::helpAnchor() const {
+ return TQString::fromLatin1("configure-appearance-systemtray");
}
-AppearancePageSystemTrayTab::AppearancePageSystemTrayTab( QWidget * parent,
+AppearancePageSystemTrayTab::AppearancePageSystemTrayTab( TQWidget * parent,
const char * name )
: ConfigModuleTab( parent, name )
{
- QVBoxLayout * vlay = new QVBoxLayout( this, KDialog::marginHint(),
+ TQVBoxLayout * vlay = new TQVBoxLayout( this, KDialog::marginHint(),
KDialog::spacingHint() );
// "Enable system tray applet" check box
- mSystemTrayCheck = new QCheckBox( i18n("Enable system tray icon"), this );
+ mSystemTrayCheck = new TQCheckBox( i18n("Enable system tray icon"), this );
vlay->addWidget( mSystemTrayCheck );
- connect( mSystemTrayCheck, SIGNAL( stateChanged( int ) ),
- this, SLOT( slotEmitChanged( void ) ) );
+ connect( mSystemTrayCheck, TQT_SIGNAL( stateChanged( int ) ),
+ this, TQT_SLOT( slotEmitChanged( void ) ) );
// System tray modes
- mSystemTrayGroup = new QVButtonGroup( i18n("System Tray Mode"), this );
+ mSystemTrayGroup = new TQVButtonGroup( i18n("System Tray Mode"), this );
mSystemTrayGroup->layout()->setSpacing( KDialog::spacingHint() );
vlay->addWidget( mSystemTrayGroup );
- connect( mSystemTrayGroup, SIGNAL( clicked( int ) ),
- this, SLOT( slotEmitChanged( void ) ) );
- connect( mSystemTrayCheck, SIGNAL( toggled( bool ) ),
- mSystemTrayGroup, SLOT( setEnabled( bool ) ) );
+ connect( mSystemTrayGroup, TQT_SIGNAL( clicked( int ) ),
+ this, TQT_SLOT( slotEmitChanged( void ) ) );
+ connect( mSystemTrayCheck, TQT_SIGNAL( toggled( bool ) ),
+ mSystemTrayGroup, TQT_SLOT( setEnabled( bool ) ) );
- mSystemTrayGroup->insert( new QRadioButton( i18n("Always show KMail in system tray"), mSystemTrayGroup ),
+ mSystemTrayGroup->insert( new TQRadioButton( i18n("Always show KMail in system tray"), mSystemTrayGroup ),
GlobalSettings::EnumSystemTrayPolicy::ShowAlways );
- mSystemTrayGroup->insert( new QRadioButton( i18n("Only show KMail in system tray if there are unread messages"), mSystemTrayGroup ),
+ mSystemTrayGroup->insert( new TQRadioButton( i18n("Only show KMail in system tray if there are unread messages"), mSystemTrayGroup ),
GlobalSettings::EnumSystemTrayPolicy::ShowOnUnread );
vlay->addStretch( 10 ); // spacer
@@ -2512,11 +2512,11 @@ void AppearancePage::SystemTrayTab::save() {
// * *
// *************************************************************
-QString ComposerPage::helpAnchor() const {
- return QString::fromLatin1("configure-composer");
+TQString ComposerPage::helpAnchor() const {
+ return TQString::fromLatin1("configure-composer");
}
-ComposerPage::ComposerPage( QWidget * parent, const char * name )
+ComposerPage::ComposerPage( TQWidget * parent, const char * name )
: ConfigModuleWithTabs( parent, name )
{
//
@@ -2571,125 +2571,125 @@ ComposerPage::ComposerPage( QWidget * parent, const char * name )
load();
}
-QString ComposerPage::GeneralTab::helpAnchor() const {
- return QString::fromLatin1("configure-composer-general");
+TQString ComposerPage::GeneralTab::helpAnchor() const {
+ return TQString::fromLatin1("configure-composer-general");
}
-ComposerPageGeneralTab::ComposerPageGeneralTab( QWidget * parent, const char * name )
+ComposerPageGeneralTab::ComposerPageGeneralTab( TQWidget * parent, const char * name )
: ConfigModuleTab( parent, name )
{
// tmp. vars:
- QVBoxLayout *vlay;
- QHBoxLayout *hlay;
- QGroupBox *group;
- QLabel *label;
- QHBox *hbox;
- QString msg;
+ TQVBoxLayout *vlay;
+ TQHBoxLayout *hlay;
+ TQGroupBox *group;
+ TQLabel *label;
+ TQHBox *hbox;
+ TQString msg;
- vlay = new QVBoxLayout( this, KDialog::marginHint(), KDialog::spacingHint() );
+ vlay = new TQVBoxLayout( this, KDialog::marginHint(), KDialog::spacingHint() );
// some check buttons...
- mAutoAppSignFileCheck = new QCheckBox(
+ mAutoAppSignFileCheck = new TQCheckBox(
GlobalSettings::self()->autoTextSignatureItem()->label(),
this );
vlay->addWidget( mAutoAppSignFileCheck );
- connect( mAutoAppSignFileCheck, SIGNAL( stateChanged(int) ),
- this, SLOT( slotEmitChanged( void ) ) );
+ connect( mAutoAppSignFileCheck, TQT_SIGNAL( stateChanged(int) ),
+ this, TQT_SLOT( slotEmitChanged( void ) ) );
mTopQuoteCheck =
- new QCheckBox( GlobalSettings::self()->prependSignatureItem()->label(), this );
+ new TQCheckBox( GlobalSettings::self()->prependSignatureItem()->label(), this );
vlay->addWidget( mTopQuoteCheck);
- connect( mTopQuoteCheck, SIGNAL( stateChanged(int) ),
- this, SLOT( slotEmitChanged( void ) ) );
+ connect( mTopQuoteCheck, TQT_SIGNAL( stateChanged(int) ),
+ this, TQT_SLOT( slotEmitChanged( void ) ) );
- mSmartQuoteCheck = new QCheckBox(
+ mSmartQuoteCheck = new TQCheckBox(
GlobalSettings::self()->smartQuoteItem()->label(),
this, "kcfg_SmartQuote" );
vlay->addWidget( mSmartQuoteCheck );
- connect( mSmartQuoteCheck, SIGNAL( stateChanged(int) ),
- this, SLOT( slotEmitChanged( void ) ) );
+ connect( mSmartQuoteCheck, TQT_SIGNAL( stateChanged(int) ),
+ this, TQT_SLOT( slotEmitChanged( void ) ) );
- mAutoRequestMDNCheck = new QCheckBox(
+ mAutoRequestMDNCheck = new TQCheckBox(
GlobalSettings::self()->requestMDNItem()->label(),
this, "kcfg_RequestMDN" );
vlay->addWidget( mAutoRequestMDNCheck );
- connect( mAutoRequestMDNCheck, SIGNAL( stateChanged(int) ),
- this, SLOT( slotEmitChanged( void ) ) );
+ connect( mAutoRequestMDNCheck, TQT_SIGNAL( stateChanged(int) ),
+ this, TQT_SLOT( slotEmitChanged( void ) ) );
- mShowRecentAddressesInComposer = new QCheckBox(
+ mShowRecentAddressesInComposer = new TQCheckBox(
GlobalSettings::self()->showRecentAddressesInComposerItem()->label(),
this, "kcfg_ShowRecentAddressesInComposer" );
vlay->addWidget( mShowRecentAddressesInComposer );
- connect( mShowRecentAddressesInComposer, SIGNAL( stateChanged(int) ),
- this, SLOT( slotEmitChanged( void ) ) );
+ connect( mShowRecentAddressesInComposer, TQT_SIGNAL( stateChanged(int) ),
+ this, TQT_SLOT( slotEmitChanged( void ) ) );
// a checkbox for "word wrap" and a spinbox for the column in
// which to wrap:
- hlay = new QHBoxLayout( vlay ); // inherits spacing
- mWordWrapCheck = new QCheckBox(
+ hlay = new TQHBoxLayout( vlay ); // inherits spacing
+ mWordWrapCheck = new TQCheckBox(
GlobalSettings::self()->wordWrapItem()->label(),
this, "kcfg_WordWrap" );
hlay->addWidget( mWordWrapCheck );
- connect( mWordWrapCheck, SIGNAL( stateChanged(int) ),
- this, SLOT( slotEmitChanged( void ) ) );
+ connect( mWordWrapCheck, TQT_SIGNAL( stateChanged(int) ),
+ this, TQT_SLOT( slotEmitChanged( void ) ) );
mWrapColumnSpin = new KIntSpinBox( 30/*min*/, 78/*max*/, 1/*step*/,
78/*init*/, 10 /*base*/, this, "kcfg_LineWrapWidth" );
mWrapColumnSpin->setEnabled( false ); // since !mWordWrapCheck->isChecked()
- connect( mWrapColumnSpin, SIGNAL( valueChanged(int) ),
- this, SLOT( slotEmitChanged( void ) ) );
+ connect( mWrapColumnSpin, TQT_SIGNAL( valueChanged(int) ),
+ this, TQT_SLOT( slotEmitChanged( void ) ) );
hlay->addWidget( mWrapColumnSpin );
hlay->addStretch( 1 );
// only enable the spinbox if the checkbox is checked:
- connect( mWordWrapCheck, SIGNAL(toggled(bool)),
- mWrapColumnSpin, SLOT(setEnabled(bool)) );
+ connect( mWordWrapCheck, TQT_SIGNAL(toggled(bool)),
+ mWrapColumnSpin, TQT_SLOT(setEnabled(bool)) );
- hlay = new QHBoxLayout( vlay ); // inherits spacing
+ hlay = new TQHBoxLayout( vlay ); // inherits spacing
mAutoSave = new KIntSpinBox( 0, 60, 1, 1, 10, this, "kcfg_AutosaveInterval" );
- label = new QLabel( mAutoSave,
+ label = new TQLabel( mAutoSave,
GlobalSettings::self()->autosaveIntervalItem()->label(), this );
hlay->addWidget( label );
hlay->addWidget( mAutoSave );
mAutoSave->setSpecialValueText( i18n("No autosave") );
mAutoSave->setSuffix( i18n(" min") );
hlay->addStretch( 1 );
- connect( mAutoSave, SIGNAL( valueChanged(int) ),
- this, SLOT( slotEmitChanged( void ) ) );
+ connect( mAutoSave, TQT_SIGNAL( valueChanged(int) ),
+ this, TQT_SLOT( slotEmitChanged( void ) ) );
- hlay = new QHBoxLayout( vlay ); // inherits spacing
- QPushButton *completionOrderBtn = new QPushButton( i18n( "Configure Completion Order" ), this );
- connect( completionOrderBtn, SIGNAL( clicked() ),
- this, SLOT( slotConfigureCompletionOrder() ) );
+ hlay = new TQHBoxLayout( vlay ); // inherits spacing
+ TQPushButton *completionOrderBtn = new TQPushButton( i18n( "Configure Completion Order" ), this );
+ connect( completionOrderBtn, TQT_SIGNAL( clicked() ),
+ this, TQT_SLOT( slotConfigureCompletionOrder() ) );
hlay->addWidget( completionOrderBtn );
- hlay->addItem( new QSpacerItem(0, 0) );
+ hlay->addItem( new TQSpacerItem(0, 0) );
// recent addresses
- hlay = new QHBoxLayout( vlay ); // inherits spacing
- QPushButton *recentAddressesBtn = new QPushButton( i18n( "Edit Recent Addresses..." ), this );
- connect( recentAddressesBtn, SIGNAL( clicked() ),
- this, SLOT( slotConfigureRecentAddresses() ) );
+ hlay = new TQHBoxLayout( vlay ); // inherits spacing
+ TQPushButton *recentAddressesBtn = new TQPushButton( i18n( "Edit Recent Addresses..." ), this );
+ connect( recentAddressesBtn, TQT_SIGNAL( clicked() ),
+ this, TQT_SLOT( slotConfigureRecentAddresses() ) );
hlay->addWidget( recentAddressesBtn );
- hlay->addItem( new QSpacerItem(0, 0) );
+ hlay->addItem( new TQSpacerItem(0, 0) );
// The "external editor" group:
- group = new QVGroupBox( i18n("External Editor"), this );
+ group = new TQVGroupBox( i18n("External Editor"), this );
group->layout()->setSpacing( KDialog::spacingHint() );
- mExternalEditorCheck = new QCheckBox(
+ mExternalEditorCheck = new TQCheckBox(
GlobalSettings::self()->useExternalEditorItem()->label(),
group, "kcfg_UseExternalEditor" );
- connect( mExternalEditorCheck, SIGNAL( toggled( bool ) ),
- this, SLOT( slotEmitChanged( void ) ) );
+ connect( mExternalEditorCheck, TQT_SIGNAL( toggled( bool ) ),
+ this, TQT_SLOT( slotEmitChanged( void ) ) );
- hbox = new QHBox( group );
- label = new QLabel( GlobalSettings::self()->externalEditorItem()->label(),
+ hbox = new TQHBox( group );
+ label = new TQLabel( GlobalSettings::self()->externalEditorItem()->label(),
hbox );
mEditorRequester = new KURLRequester( hbox, "kcfg_ExternalEditor" );
- connect( mEditorRequester, SIGNAL( urlSelected(const QString&) ),
- this, SLOT( slotEmitChanged( void ) ) );
- connect( mEditorRequester, SIGNAL( textChanged(const QString&) ),
- this, SLOT( slotEmitChanged( void ) ) );
+ connect( mEditorRequester, TQT_SIGNAL( urlSelected(const TQString&) ),
+ this, TQT_SLOT( slotEmitChanged( void ) ) );
+ connect( mEditorRequester, TQT_SIGNAL( textChanged(const TQString&) ),
+ this, TQT_SLOT( slotEmitChanged( void ) ) );
hbox->setStretchFactor( mEditorRequester, 1 );
label->setBuddy( mEditorRequester );
@@ -2699,16 +2699,16 @@ ComposerPageGeneralTab::ComposerPageGeneralTab( QWidget * parent, const char * n
"application/x-shellscript "
"application/x-desktop" );
mEditorRequester->setEnabled( false ); // !mExternalEditorCheck->isChecked()
- connect( mExternalEditorCheck, SIGNAL(toggled(bool)),
- label, SLOT(setEnabled(bool)) );
- connect( mExternalEditorCheck, SIGNAL(toggled(bool)),
- mEditorRequester, SLOT(setEnabled(bool)) );
+ connect( mExternalEditorCheck, TQT_SIGNAL(toggled(bool)),
+ label, TQT_SLOT(setEnabled(bool)) );
+ connect( mExternalEditorCheck, TQT_SIGNAL(toggled(bool)),
+ mEditorRequester, TQT_SLOT(setEnabled(bool)) );
- label = new QLabel( i18n("<b>%f</b> will be replaced with the "
+ label = new TQLabel( i18n("<b>%f</b> will be replaced with the "
"filename to edit."), group );
label->setEnabled( false ); // see above
- connect( mExternalEditorCheck, SIGNAL(toggled(bool)),
- label, SLOT(setEnabled(bool)) );
+ connect( mExternalEditorCheck, TQT_SIGNAL(toggled(bool)),
+ label, TQT_SLOT(setEnabled(bool)) );
vlay->addWidget( group );
vlay->addStretch( 100 );
@@ -2782,8 +2782,8 @@ void ComposerPage::GeneralTab::slotConfigureRecentAddresses( )
dlg.setAddresses( RecentAddresses::self( KMKernel::config() )->addresses() );
if ( dlg.exec() ) {
RecentAddresses::self( KMKernel::config() )->clear();
- const QStringList &addrList = dlg.addresses();
- QStringList::ConstIterator it;
+ const TQStringList &addrList = dlg.addresses();
+ TQStringList::ConstIterator it;
for ( it = addrList.constBegin(); it != addrList.constEnd(); ++it )
RecentAddresses::self( KMKernel::config() )->add( *it );
}
@@ -2796,25 +2796,25 @@ void ComposerPage::GeneralTab::slotConfigureCompletionOrder( )
editor.exec();
}
-QString ComposerPage::PhrasesTab::helpAnchor() const {
- return QString::fromLatin1("configure-composer-phrases");
+TQString ComposerPage::PhrasesTab::helpAnchor() const {
+ return TQString::fromLatin1("configure-composer-phrases");
}
-ComposerPagePhrasesTab::ComposerPagePhrasesTab( QWidget * parent, const char * name )
+ComposerPagePhrasesTab::ComposerPagePhrasesTab( TQWidget * parent, const char * name )
: ConfigModuleTab( parent, name )
{
// tmp. vars:
- QGridLayout *glay;
- QPushButton *button;
+ TQGridLayout *glay;
+ TQPushButton *button;
- glay = new QGridLayout( this, 7, 3, KDialog::spacingHint() );
+ glay = new TQGridLayout( this, 7, 3, KDialog::spacingHint() );
glay->setMargin( KDialog::marginHint() );
glay->setColStretch( 1, 1 );
glay->setColStretch( 2, 1 );
glay->setRowStretch( 7, 1 );
// row 0: help text
- glay->addMultiCellWidget( new QLabel( i18n("<qt>The following placeholders are "
+ glay->addMultiCellWidget( new TQLabel( i18n("<qt>The following placeholders are "
"supported in the reply phrases:<br>"
"<b>%D</b>: date, <b>%S</b>: subject,<br>"
"<b>%e</b>: sender's address, <b>%F</b>: sender's name, <b>%f</b>: sender's initials,<br>"
@@ -2826,54 +2826,54 @@ ComposerPagePhrasesTab::ComposerPagePhrasesTab( QWidget * parent, const char * n
// row 1: label and language combo box:
mPhraseLanguageCombo = new LanguageComboBox( false, this );
- glay->addWidget( new QLabel( mPhraseLanguageCombo,
+ glay->addWidget( new TQLabel( mPhraseLanguageCombo,
i18n("Lang&uage:"), this ), 1, 0 );
glay->addMultiCellWidget( mPhraseLanguageCombo, 1, 1, 1, 2 );
- connect( mPhraseLanguageCombo, SIGNAL(activated(const QString&)),
- this, SLOT(slotLanguageChanged(const QString&)) );
+ connect( mPhraseLanguageCombo, TQT_SIGNAL(activated(const TQString&)),
+ this, TQT_SLOT(slotLanguageChanged(const TQString&)) );
// row 2: "add..." and "remove" push buttons:
- button = new QPushButton( i18n("A&dd..."), this );
+ button = new TQPushButton( i18n("A&dd..."), this );
button->setAutoDefault( false );
glay->addWidget( button, 2, 1 );
- mRemoveButton = new QPushButton( i18n("Re&move"), this );
+ mRemoveButton = new TQPushButton( i18n("Re&move"), this );
mRemoveButton->setAutoDefault( false );
mRemoveButton->setEnabled( false ); // combo doesn't contain anything...
glay->addWidget( mRemoveButton, 2, 2 );
- connect( button, SIGNAL(clicked()),
- this, SLOT(slotNewLanguage()) );
- connect( mRemoveButton, SIGNAL(clicked()),
- this, SLOT(slotRemoveLanguage()) );
+ connect( button, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotNewLanguage()) );
+ connect( mRemoveButton, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotRemoveLanguage()) );
// row 3: "reply to sender" line edit and label:
mPhraseReplyEdit = new KLineEdit( this );
- connect( mPhraseReplyEdit, SIGNAL( textChanged( const QString& ) ),
- this, SLOT( slotEmitChanged( void ) ) );
- glay->addWidget( new QLabel( mPhraseReplyEdit,
+ connect( mPhraseReplyEdit, TQT_SIGNAL( textChanged( const TQString& ) ),
+ this, TQT_SLOT( slotEmitChanged( void ) ) );
+ glay->addWidget( new TQLabel( mPhraseReplyEdit,
i18n("Reply to se&nder:"), this ), 3, 0 );
glay->addMultiCellWidget( mPhraseReplyEdit, 3, 3, 1, 2 ); // cols 1..2
// row 4: "reply to all" line edit and label:
mPhraseReplyAllEdit = new KLineEdit( this );
- connect( mPhraseReplyAllEdit, SIGNAL( textChanged( const QString& ) ),
- this, SLOT( slotEmitChanged( void ) ) );
- glay->addWidget( new QLabel( mPhraseReplyAllEdit,
+ connect( mPhraseReplyAllEdit, TQT_SIGNAL( textChanged( const TQString& ) ),
+ this, TQT_SLOT( slotEmitChanged( void ) ) );
+ glay->addWidget( new TQLabel( mPhraseReplyAllEdit,
i18n("Repl&y to all:"), this ), 4, 0 );
glay->addMultiCellWidget( mPhraseReplyAllEdit, 4, 4, 1, 2 ); // cols 1..2
// row 5: "forward" line edit and label:
mPhraseForwardEdit = new KLineEdit( this );
- connect( mPhraseForwardEdit, SIGNAL( textChanged( const QString& ) ),
- this, SLOT( slotEmitChanged( void ) ) );
- glay->addWidget( new QLabel( mPhraseForwardEdit,
+ connect( mPhraseForwardEdit, TQT_SIGNAL( textChanged( const TQString& ) ),
+ this, TQT_SLOT( slotEmitChanged( void ) ) );
+ glay->addWidget( new TQLabel( mPhraseForwardEdit,
i18n("&Forward:"), this ), 5, 0 );
glay->addMultiCellWidget( mPhraseForwardEdit, 5, 5, 1, 2 ); // cols 1..2
// row 6: "quote indicator" line edit and label:
mPhraseIndentPrefixEdit = new KLineEdit( this );
- connect( mPhraseIndentPrefixEdit, SIGNAL( textChanged( const QString& ) ),
- this, SLOT( slotEmitChanged( void ) ) );
- glay->addWidget( new QLabel( mPhraseIndentPrefixEdit,
+ connect( mPhraseIndentPrefixEdit, TQT_SIGNAL( textChanged( const TQString& ) ),
+ this, TQT_SLOT( slotEmitChanged( void ) ) );
+ glay->addWidget( new TQLabel( mPhraseIndentPrefixEdit,
i18n("&Quote indicator:"), this ), 6, 0 );
glay->addMultiCellWidget( mPhraseIndentPrefixEdit, 6, 6, 1, 2 );
@@ -2908,10 +2908,10 @@ void ComposerPage::PhrasesTab::saveActiveLanguageItem() {
void ComposerPage::PhrasesTab::slotNewLanguage()
{
NewLanguageDialog dialog( mLanguageList, parentWidget(), "New", true );
- if ( dialog.exec() == QDialog::Accepted ) slotAddNewLanguage( dialog.language() );
+ if ( dialog.exec() == TQDialog::Accepted ) slotAddNewLanguage( dialog.language() );
}
-void ComposerPage::PhrasesTab::slotAddNewLanguage( const QString& lang )
+void ComposerPage::PhrasesTab::slotAddNewLanguage( const TQString& lang )
{
mPhraseLanguageCombo->setCurrentItem(
mPhraseLanguageCombo->insertLanguage( lang ) );
@@ -2924,7 +2924,7 @@ void ComposerPage::PhrasesTab::slotAddNewLanguage( const QString& lang )
locale.translate("Forwarded Message"),
locale.translate(">%_") ) );
mRemoveButton->setEnabled( true );
- slotLanguageChanged( QString::null );
+ slotLanguageChanged( TQString::null );
}
void ComposerPage::PhrasesTab::slotRemoveLanguage()
@@ -2945,7 +2945,7 @@ void ComposerPage::PhrasesTab::slotRemoveLanguage()
emit changed( true );
}
-void ComposerPage::PhrasesTab::slotLanguageChanged( const QString& )
+void ComposerPage::PhrasesTab::slotLanguageChanged( const TQString& )
{
int index = mPhraseLanguageCombo->currentItem();
assert( index < (int)mLanguageList.count() );
@@ -2966,9 +2966,9 @@ void ComposerPage::PhrasesTab::doLoadFromGlobalSettings() {
// build mLanguageList and mPhraseLanguageCombo:
for ( int i = 0 ; i < numLang ; i++ ) {
- ReplyPhrases replyPhrases( QString::number(i) );
+ ReplyPhrases replyPhrases( TQString::number(i) );
replyPhrases.readConfig();
- QString lang = replyPhrases.language();
+ TQString lang = replyPhrases.language();
mLanguageList.append(
LanguageItem( lang,
replyPhrases.phraseReplySender(),
@@ -2998,7 +2998,7 @@ void ComposerPage::PhrasesTab::save() {
saveActiveLanguageItem();
LanguageItemList::Iterator it = mLanguageList.begin();
for ( int i = 0 ; it != mLanguageList.end() ; ++it, ++i ) {
- ReplyPhrases replyPhrases( QString::number(i) );
+ ReplyPhrases replyPhrases( TQString::number(i) );
replyPhrases.setLanguage( (*it).mLanguage );
replyPhrases.setPhraseReplySender( (*it).mReply );
replyPhrases.setPhraseReplyAll( (*it).mReplyAll );
@@ -3008,20 +3008,20 @@ void ComposerPage::PhrasesTab::save() {
}
}
-QString ComposerPage::TemplatesTab::helpAnchor() const {
- return QString::fromLatin1("configure-composer-templates");
+TQString ComposerPage::TemplatesTab::helpAnchor() const {
+ return TQString::fromLatin1("configure-composer-templates");
}
-ComposerPageTemplatesTab::ComposerPageTemplatesTab( QWidget * parent, const char * name )
+ComposerPageTemplatesTab::ComposerPageTemplatesTab( TQWidget * parent, const char * name )
: ConfigModuleTab ( parent, name )
{
- QVBoxLayout* vlay = new QVBoxLayout( this, 0, KDialog::spacingHint() );
+ TQVBoxLayout* vlay = new TQVBoxLayout( this, 0, KDialog::spacingHint() );
mWidget = new TemplatesConfiguration( this );
vlay->addWidget( mWidget );
- connect( mWidget, SIGNAL( changed() ),
- this, SLOT( slotEmitChanged( void ) ) );
+ connect( mWidget, TQT_SIGNAL( changed() ),
+ this, TQT_SLOT( slotEmitChanged( void ) ) );
}
void ComposerPage::TemplatesTab::doLoadFromGlobalSettings() {
@@ -3032,20 +3032,20 @@ void ComposerPage::TemplatesTab::save() {
mWidget->saveToGlobal();
}
-QString ComposerPage::CustomTemplatesTab::helpAnchor() const {
- return QString::fromLatin1("configure-composer-custom-templates");
+TQString ComposerPage::CustomTemplatesTab::helpAnchor() const {
+ return TQString::fromLatin1("configure-composer-custom-templates");
}
-ComposerPageCustomTemplatesTab::ComposerPageCustomTemplatesTab( QWidget * parent, const char * name )
+ComposerPageCustomTemplatesTab::ComposerPageCustomTemplatesTab( TQWidget * parent, const char * name )
: ConfigModuleTab ( parent, name )
{
- QVBoxLayout* vlay = new QVBoxLayout( this, 0, KDialog::spacingHint() );
+ TQVBoxLayout* vlay = new TQVBoxLayout( this, 0, KDialog::spacingHint() );
mWidget = new CustomTemplates( this );
vlay->addWidget( mWidget );
- connect( mWidget, SIGNAL( changed() ),
- this, SLOT( slotEmitChanged( void ) ) );
+ connect( mWidget, TQT_SIGNAL( changed() ),
+ this, TQT_SLOT( slotEmitChanged( void ) ) );
}
void ComposerPage::CustomTemplatesTab::doLoadFromGlobalSettings() {
@@ -3056,26 +3056,26 @@ void ComposerPage::CustomTemplatesTab::save() {
mWidget->save();
}
-QString ComposerPage::SubjectTab::helpAnchor() const {
- return QString::fromLatin1("configure-composer-subject");
+TQString ComposerPage::SubjectTab::helpAnchor() const {
+ return TQString::fromLatin1("configure-composer-subject");
}
-ComposerPageSubjectTab::ComposerPageSubjectTab( QWidget * parent, const char * name )
+ComposerPageSubjectTab::ComposerPageSubjectTab( TQWidget * parent, const char * name )
: ConfigModuleTab( parent, name )
{
// tmp. vars:
- QVBoxLayout *vlay;
- QGroupBox *group;
- QLabel *label;
+ TQVBoxLayout *vlay;
+ TQGroupBox *group;
+ TQLabel *label;
- vlay = new QVBoxLayout( this, KDialog::marginHint(), KDialog::spacingHint() );
+ vlay = new TQVBoxLayout( this, KDialog::marginHint(), KDialog::spacingHint() );
- group = new QVGroupBox( i18n("Repl&y Subject Prefixes"), this );
+ group = new TQVGroupBox( i18n("Repl&y Subject Prefixes"), this );
group->layout()->setSpacing( KDialog::spacingHint() );
// row 0: help text:
- label = new QLabel( i18n("Recognize any sequence of the following prefixes\n"
+ label = new TQLabel( i18n("Recognize any sequence of the following prefixes\n"
"(entries are case-insensitive regular expressions):"), group );
label->setAlignment( AlignLeft|WordBreak );
@@ -3087,24 +3087,24 @@ ComposerPageSubjectTab::ComposerPageSubjectTab( QWidget * parent, const char * n
i18n("A&dd..."), i18n("Re&move"),
i18n("Mod&ify..."),
i18n("Enter new reply prefix:") );
- connect( mReplyListEditor, SIGNAL( changed( void ) ),
- this, SLOT( slotEmitChanged( void ) ) );
+ connect( mReplyListEditor, TQT_SIGNAL( changed( void ) ),
+ this, TQT_SLOT( slotEmitChanged( void ) ) );
// row 2: "replace [...]" check box:
- mReplaceReplyPrefixCheck = new QCheckBox(
+ mReplaceReplyPrefixCheck = new TQCheckBox(
GlobalSettings::self()->replaceReplyPrefixItem()->label(),
group, "kcfg_ReplaceReplyPrefix" );
- connect( mReplaceReplyPrefixCheck, SIGNAL( stateChanged( int ) ),
- this, SLOT( slotEmitChanged( void ) ) );
+ connect( mReplaceReplyPrefixCheck, TQT_SIGNAL( stateChanged( int ) ),
+ this, TQT_SLOT( slotEmitChanged( void ) ) );
vlay->addWidget( group );
- group = new QVGroupBox( i18n("For&ward Subject Prefixes"), this );
+ group = new TQVGroupBox( i18n("For&ward Subject Prefixes"), this );
group->layout()->setSpacing( KDialog::marginHint() );
// row 0: help text:
- label= new QLabel( i18n("Recognize any sequence of the following prefixes\n"
+ label= new TQLabel( i18n("Recognize any sequence of the following prefixes\n"
"(entries are case-insensitive regular expressions):"), group );
label->setAlignment( AlignLeft|WordBreak );
@@ -3115,15 +3115,15 @@ ComposerPageSubjectTab::ComposerPageSubjectTab( QWidget * parent, const char * n
i18n("Remo&ve"),
i18n("Modify..."),
i18n("Enter new forward prefix:") );
- connect( mForwardListEditor, SIGNAL( changed( void ) ),
- this, SLOT( slotEmitChanged( void ) ) );
+ connect( mForwardListEditor, TQT_SIGNAL( changed( void ) ),
+ this, TQT_SLOT( slotEmitChanged( void ) ) );
// row 3: "replace [...]" check box:
- mReplaceForwardPrefixCheck = new QCheckBox(
+ mReplaceForwardPrefixCheck = new TQCheckBox(
GlobalSettings::self()->replaceForwardPrefixItem()->label(),
group, "kcfg_ReplaceForwardPrefix" );
- connect( mReplaceForwardPrefixCheck, SIGNAL( stateChanged( int ) ),
- this, SLOT( slotEmitChanged( void ) ) );
+ connect( mReplaceForwardPrefixCheck, TQT_SIGNAL( stateChanged( int ) ),
+ this, TQT_SLOT( slotEmitChanged( void ) ) );
vlay->addWidget( group );
}
@@ -3140,20 +3140,20 @@ void ComposerPage::SubjectTab::save() {
GlobalSettings::self()->setForwardPrefixes( mForwardListEditor->stringList() );
}
-QString ComposerPage::CharsetTab::helpAnchor() const {
- return QString::fromLatin1("configure-composer-charset");
+TQString ComposerPage::CharsetTab::helpAnchor() const {
+ return TQString::fromLatin1("configure-composer-charset");
}
-ComposerPageCharsetTab::ComposerPageCharsetTab( QWidget * parent, const char * name )
+ComposerPageCharsetTab::ComposerPageCharsetTab( TQWidget * parent, const char * name )
: ConfigModuleTab( parent, name )
{
// tmp. vars:
- QVBoxLayout *vlay;
- QLabel *label;
+ TQVBoxLayout *vlay;
+ TQLabel *label;
- vlay = new QVBoxLayout( this, KDialog::marginHint(), KDialog::spacingHint() );
+ vlay = new TQVBoxLayout( this, KDialog::marginHint(), KDialog::spacingHint() );
- label = new QLabel( i18n("This list is checked for every outgoing message "
+ label = new TQLabel( i18n("This list is checked for every outgoing message "
"from the top to the bottom for a charset that "
"contains all required characters."), this );
label->setAlignment( WordBreak);
@@ -3163,59 +3163,59 @@ ComposerPageCharsetTab::ComposerPageCharsetTab( QWidget * parent, const char * n
new SimpleStringListEditor( this, 0, SimpleStringListEditor::All,
i18n("A&dd..."), i18n("Remo&ve"),
i18n("&Modify..."), i18n("Enter charset:") );
- connect( mCharsetListEditor, SIGNAL( changed( void ) ),
- this, SLOT( slotEmitChanged( void ) ) );
+ connect( mCharsetListEditor, TQT_SIGNAL( changed( void ) ),
+ this, TQT_SLOT( slotEmitChanged( void ) ) );
vlay->addWidget( mCharsetListEditor, 1 );
- mKeepReplyCharsetCheck = new QCheckBox( i18n("&Keep original charset when "
+ mKeepReplyCharsetCheck = new TQCheckBox( i18n("&Keep original charset when "
"replying or forwarding (if "
"possible)"), this );
- connect( mKeepReplyCharsetCheck, SIGNAL ( stateChanged( int ) ),
- this, SLOT( slotEmitChanged( void ) ) );
+ connect( mKeepReplyCharsetCheck, TQT_SIGNAL ( stateChanged( int ) ),
+ this, TQT_SLOT( slotEmitChanged( void ) ) );
vlay->addWidget( mKeepReplyCharsetCheck );
- connect( mCharsetListEditor, SIGNAL(aboutToAdd(QString&)),
- this, SLOT(slotVerifyCharset(QString&)) );
+ connect( mCharsetListEditor, TQT_SIGNAL(aboutToAdd(TQString&)),
+ this, TQT_SLOT(slotVerifyCharset(TQString&)) );
}
-void ComposerPage::CharsetTab::slotVerifyCharset( QString & charset ) {
+void ComposerPage::CharsetTab::slotVerifyCharset( TQString & charset ) {
if ( charset.isEmpty() ) return;
// KCharsets::codecForName("us-ascii") returns "iso-8859-1" (cf. Bug #49812)
// therefore we have to treat this case specially
- if ( charset.lower() == QString::fromLatin1("us-ascii") ) {
- charset = QString::fromLatin1("us-ascii");
+ if ( charset.lower() == TQString::fromLatin1("us-ascii") ) {
+ charset = TQString::fromLatin1("us-ascii");
return;
}
- if ( charset.lower() == QString::fromLatin1("locale") ) {
- charset = QString::fromLatin1("%1 (locale)")
- .arg( QCString( kmkernel->networkCodec()->mimeName() ).lower() );
+ if ( charset.lower() == TQString::fromLatin1("locale") ) {
+ charset = TQString::fromLatin1("%1 (locale)")
+ .arg( TQCString( kmkernel->networkCodec()->mimeName() ).lower() );
return;
}
bool ok = false;
- QTextCodec *codec = KGlobal::charsets()->codecForName( charset, ok );
+ TQTextCodec *codec = KGlobal::charsets()->codecForName( charset, ok );
if ( ok && codec ) {
- charset = QString::fromLatin1( codec->mimeName() ).lower();
+ charset = TQString::fromLatin1( codec->mimeName() ).lower();
return;
}
KMessageBox::sorry( this, i18n("This charset is not supported.") );
- charset = QString::null;
+ charset = TQString::null;
}
void ComposerPage::CharsetTab::doLoadOther() {
KConfigGroup composer( KMKernel::config(), "Composer" );
- QStringList charsets = composer.readListEntry( "pref-charsets" );
- for ( QStringList::Iterator it = charsets.begin() ;
+ TQStringList charsets = composer.readListEntry( "pref-charsets" );
+ for ( TQStringList::Iterator it = charsets.begin() ;
it != charsets.end() ; ++it )
- if ( (*it) == QString::fromLatin1("locale") ) {
- QCString cset = kmkernel->networkCodec()->mimeName();
+ if ( (*it) == TQString::fromLatin1("locale") ) {
+ TQCString cset = kmkernel->networkCodec()->mimeName();
KPIM::kAsciiToLower( cset.data() );
- (*it) = QString("%1 (locale)").arg( cset );
+ (*it) = TQString("%1 (locale)").arg( cset );
}
mCharsetListEditor->setStringList( charsets );
@@ -3225,8 +3225,8 @@ void ComposerPage::CharsetTab::doLoadOther() {
void ComposerPage::CharsetTab::save() {
KConfigGroup composer( KMKernel::config(), "Composer" );
- QStringList charsetList = mCharsetListEditor->stringList();
- QStringList::Iterator it = charsetList.begin();
+ TQStringList charsetList = mCharsetListEditor->stringList();
+ TQStringList::Iterator it = charsetList.begin();
for ( ; it != charsetList.end() ; ++it )
if ( (*it).endsWith("(locale)") )
(*it) = "locale";
@@ -3235,55 +3235,55 @@ void ComposerPage::CharsetTab::save() {
!mKeepReplyCharsetCheck->isChecked() );
}
-QString ComposerPage::HeadersTab::helpAnchor() const {
- return QString::fromLatin1("configure-composer-headers");
+TQString ComposerPage::HeadersTab::helpAnchor() const {
+ return TQString::fromLatin1("configure-composer-headers");
}
-ComposerPageHeadersTab::ComposerPageHeadersTab( QWidget * parent, const char * name )
+ComposerPageHeadersTab::ComposerPageHeadersTab( TQWidget * parent, const char * name )
: ConfigModuleTab( parent, name )
{
// tmp. vars:
- QVBoxLayout *vlay;
- QHBoxLayout *hlay;
- QGridLayout *glay;
- QLabel *label;
- QPushButton *button;
+ TQVBoxLayout *vlay;
+ TQHBoxLayout *hlay;
+ TQGridLayout *glay;
+ TQLabel *label;
+ TQPushButton *button;
- vlay = new QVBoxLayout( this, KDialog::marginHint(), KDialog::spacingHint() );
+ vlay = new TQVBoxLayout( this, KDialog::marginHint(), KDialog::spacingHint() );
// "Use custom Message-Id suffix" checkbox:
mCreateOwnMessageIdCheck =
- new QCheckBox( i18n("&Use custom message-id suffix"), this );
- connect( mCreateOwnMessageIdCheck, SIGNAL ( stateChanged( int ) ),
- this, SLOT( slotEmitChanged( void ) ) );
+ new TQCheckBox( i18n("&Use custom message-id suffix"), this );
+ connect( mCreateOwnMessageIdCheck, TQT_SIGNAL ( stateChanged( int ) ),
+ this, TQT_SLOT( slotEmitChanged( void ) ) );
vlay->addWidget( mCreateOwnMessageIdCheck );
// "Message-Id suffix" line edit and label:
- hlay = new QHBoxLayout( vlay ); // inherits spacing
+ hlay = new TQHBoxLayout( vlay ); // inherits spacing
mMessageIdSuffixEdit = new KLineEdit( this );
// only ASCII letters, digits, plus, minus and dots are allowed
mMessageIdSuffixValidator =
- new QRegExpValidator( QRegExp( "[a-zA-Z0-9+-]+(?:\\.[a-zA-Z0-9+-]+)*" ), this );
+ new TQRegExpValidator( TQRegExp( "[a-zA-Z0-9+-]+(?:\\.[a-zA-Z0-9+-]+)*" ), this );
mMessageIdSuffixEdit->setValidator( mMessageIdSuffixValidator );
- label = new QLabel( mMessageIdSuffixEdit,
+ label = new TQLabel( mMessageIdSuffixEdit,
i18n("Custom message-&id suffix:"), this );
label->setEnabled( false ); // since !mCreateOwnMessageIdCheck->isChecked()
mMessageIdSuffixEdit->setEnabled( false );
hlay->addWidget( label );
hlay->addWidget( mMessageIdSuffixEdit, 1 );
- connect( mCreateOwnMessageIdCheck, SIGNAL(toggled(bool) ),
- label, SLOT(setEnabled(bool)) );
- connect( mCreateOwnMessageIdCheck, SIGNAL(toggled(bool) ),
- mMessageIdSuffixEdit, SLOT(setEnabled(bool)) );
- connect( mMessageIdSuffixEdit, SIGNAL( textChanged( const QString& ) ),
- this, SLOT( slotEmitChanged( void ) ) );
+ connect( mCreateOwnMessageIdCheck, TQT_SIGNAL(toggled(bool) ),
+ label, TQT_SLOT(setEnabled(bool)) );
+ connect( mCreateOwnMessageIdCheck, TQT_SIGNAL(toggled(bool) ),
+ mMessageIdSuffixEdit, TQT_SLOT(setEnabled(bool)) );
+ connect( mMessageIdSuffixEdit, TQT_SIGNAL( textChanged( const TQString& ) ),
+ this, TQT_SLOT( slotEmitChanged( void ) ) );
// horizontal rule and "custom header fields" label:
vlay->addWidget( new KSeparator( KSeparator::HLine, this ) );
- vlay->addWidget( new QLabel( i18n("Define custom mime header fields:"), this) );
+ vlay->addWidget( new TQLabel( i18n("Define custom mime header fields:"), this) );
// "custom header fields" listbox:
- glay = new QGridLayout( vlay, 5, 3 ); // inherits spacing
+ glay = new TQGridLayout( vlay, 5, 3 ); // inherits spacing
glay->setRowStretch( 2, 1 );
glay->setColStretch( 1, 1 );
mTagList = new ListView( this, "tagList" );
@@ -3291,44 +3291,44 @@ ComposerPageHeadersTab::ComposerPageHeadersTab( QWidget * parent, const char * n
mTagList->addColumn( i18n("Value") );
mTagList->setAllColumnsShowFocus( true );
mTagList->setSorting( -1 );
- connect( mTagList, SIGNAL(selectionChanged()),
- this, SLOT(slotMimeHeaderSelectionChanged()) );
+ connect( mTagList, TQT_SIGNAL(selectionChanged()),
+ this, TQT_SLOT(slotMimeHeaderSelectionChanged()) );
glay->addMultiCellWidget( mTagList, 0, 2, 0, 1 );
// "new" and "remove" buttons:
- button = new QPushButton( i18n("Ne&w"), this );
- connect( button, SIGNAL(clicked()), this, SLOT(slotNewMimeHeader()) );
+ button = new TQPushButton( i18n("Ne&w"), this );
+ connect( button, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotNewMimeHeader()) );
button->setAutoDefault( false );
glay->addWidget( button, 0, 2 );
- mRemoveHeaderButton = new QPushButton( i18n("Re&move"), this );
- connect( mRemoveHeaderButton, SIGNAL(clicked()),
- this, SLOT(slotRemoveMimeHeader()) );
+ mRemoveHeaderButton = new TQPushButton( i18n("Re&move"), this );
+ connect( mRemoveHeaderButton, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotRemoveMimeHeader()) );
button->setAutoDefault( false );
glay->addWidget( mRemoveHeaderButton, 1, 2 );
// "name" and "value" line edits and labels:
mTagNameEdit = new KLineEdit( this );
mTagNameEdit->setEnabled( false );
- mTagNameLabel = new QLabel( mTagNameEdit, i18n("&Name:"), this );
+ mTagNameLabel = new TQLabel( mTagNameEdit, i18n("&Name:"), this );
mTagNameLabel->setEnabled( false );
glay->addWidget( mTagNameLabel, 3, 0 );
glay->addWidget( mTagNameEdit, 3, 1 );
- connect( mTagNameEdit, SIGNAL(textChanged(const QString&)),
- this, SLOT(slotMimeHeaderNameChanged(const QString&)) );
+ connect( mTagNameEdit, TQT_SIGNAL(textChanged(const TQString&)),
+ this, TQT_SLOT(slotMimeHeaderNameChanged(const TQString&)) );
mTagValueEdit = new KLineEdit( this );
mTagValueEdit->setEnabled( false );
- mTagValueLabel = new QLabel( mTagValueEdit, i18n("&Value:"), this );
+ mTagValueLabel = new TQLabel( mTagValueEdit, i18n("&Value:"), this );
mTagValueLabel->setEnabled( false );
glay->addWidget( mTagValueLabel, 4, 0 );
glay->addWidget( mTagValueEdit, 4, 1 );
- connect( mTagValueEdit, SIGNAL(textChanged(const QString&)),
- this, SLOT(slotMimeHeaderValueChanged(const QString&)) );
+ connect( mTagValueEdit, TQT_SIGNAL(textChanged(const TQString&)),
+ this, TQT_SLOT(slotMimeHeaderValueChanged(const TQString&)) );
}
void ComposerPage::HeadersTab::slotMimeHeaderSelectionChanged()
{
- QListViewItem * item = mTagList->selectedItem();
+ TQListViewItem * item = mTagList->selectedItem();
if ( item ) {
mTagNameEdit->setText( item->text( 0 ) );
@@ -3345,20 +3345,20 @@ void ComposerPage::HeadersTab::slotMimeHeaderSelectionChanged()
}
-void ComposerPage::HeadersTab::slotMimeHeaderNameChanged( const QString & text ) {
+void ComposerPage::HeadersTab::slotMimeHeaderNameChanged( const TQString & text ) {
// is called on ::setup(), when clearing the line edits. So be
// prepared to not find a selection:
- QListViewItem * item = mTagList->selectedItem();
+ TQListViewItem * item = mTagList->selectedItem();
if ( item )
item->setText( 0, text );
emit changed( true );
}
-void ComposerPage::HeadersTab::slotMimeHeaderValueChanged( const QString & text ) {
+void ComposerPage::HeadersTab::slotMimeHeaderValueChanged( const TQString & text ) {
// is called on ::setup(), when clearing the line edits. So be
// prepared to not find a selection:
- QListViewItem * item = mTagList->selectedItem();
+ TQListViewItem * item = mTagList->selectedItem();
if ( item )
item->setText( 1, text );
emit changed( true );
@@ -3367,7 +3367,7 @@ void ComposerPage::HeadersTab::slotMimeHeaderValueChanged( const QString & text
void ComposerPage::HeadersTab::slotNewMimeHeader()
{
- QListViewItem *listItem = new QListViewItem( mTagList );
+ TQListViewItem *listItem = new TQListViewItem( mTagList );
mTagList->setCurrentItem( listItem );
mTagList->setSelected( listItem, true );
emit changed( true );
@@ -3377,7 +3377,7 @@ void ComposerPage::HeadersTab::slotNewMimeHeader()
void ComposerPage::HeadersTab::slotRemoveMimeHeader()
{
// calling this w/o selection is a programming error:
- QListViewItem * item = mTagList->selectedItem();
+ TQListViewItem * item = mTagList->selectedItem();
if ( !item ) {
kdDebug(5006) << "==================================================\n"
<< "Error: Remove button was pressed although no custom header was selected\n"
@@ -3385,7 +3385,7 @@ void ComposerPage::HeadersTab::slotRemoveMimeHeader()
return;
}
- QListViewItem * below = item->nextSibling();
+ TQListViewItem * below = item->nextSibling();
delete item;
if ( below )
@@ -3398,7 +3398,7 @@ void ComposerPage::HeadersTab::slotRemoveMimeHeader()
void ComposerPage::HeadersTab::doLoadOther() {
KConfigGroup general( KMKernel::config(), "General" );
- QString suffix = general.readEntry( "myMessageIdSuffix" );
+ TQString suffix = general.readEntry( "myMessageIdSuffix" );
mMessageIdSuffixEdit->setText( suffix );
bool state = ( !suffix.isEmpty() &&
general.readBoolEntry( "useCustomMessageIdSuffix", false ) );
@@ -3408,16 +3408,16 @@ void ComposerPage::HeadersTab::doLoadOther() {
mTagNameEdit->clear();
mTagValueEdit->clear();
- QListViewItem * item = 0;
+ TQListViewItem * item = 0;
int count = general.readNumEntry( "mime-header-count", 0 );
for( int i = 0 ; i < count ; i++ ) {
KConfigGroup config( KMKernel::config(),
- QCString("Mime #") + QCString().setNum(i) );
- QString name = config.readEntry( "name" );
- QString value = config.readEntry( "value" );
+ TQCString("Mime #") + TQCString().setNum(i) );
+ TQString name = config.readEntry( "name" );
+ TQString value = config.readEntry( "value" );
if( !name.isEmpty() )
- item = new QListViewItem( mTagList, item, name, value );
+ item = new TQListViewItem( mTagList, item, name, value );
}
if ( mTagList->childCount() ) {
mTagList->setCurrentItem( mTagList->firstChild() );
@@ -3438,11 +3438,11 @@ void ComposerPage::HeadersTab::save() {
mMessageIdSuffixEdit->text() );
int numValidEntries = 0;
- QListViewItem * item = mTagList->firstChild();
+ TQListViewItem * item = mTagList->firstChild();
for ( ; item ; item = item->itemBelow() )
if( !item->text(0).isEmpty() ) {
- KConfigGroup config( KMKernel::config(), QCString("Mime #")
- + QCString().setNum( numValidEntries ) );
+ KConfigGroup config( KMKernel::config(), TQCString("Mime #")
+ + TQCString().setNum( numValidEntries ) );
config.writeEntry( "name", item->text( 0 ) );
config.writeEntry( "value", item->text( 1 ) );
numValidEntries++;
@@ -3450,43 +3450,43 @@ void ComposerPage::HeadersTab::save() {
general.writeEntry( "mime-header-count", numValidEntries );
}
-QString ComposerPage::AttachmentsTab::helpAnchor() const {
- return QString::fromLatin1("configure-composer-attachments");
+TQString ComposerPage::AttachmentsTab::helpAnchor() const {
+ return TQString::fromLatin1("configure-composer-attachments");
}
-ComposerPageAttachmentsTab::ComposerPageAttachmentsTab( QWidget * parent,
+ComposerPageAttachmentsTab::ComposerPageAttachmentsTab( TQWidget * parent,
const char * name )
: ConfigModuleTab( parent, name ) {
// tmp. vars:
- QVBoxLayout *vlay;
- QLabel *label;
+ TQVBoxLayout *vlay;
+ TQLabel *label;
- vlay = new QVBoxLayout( this, KDialog::marginHint(), KDialog::spacingHint() );
+ vlay = new TQVBoxLayout( this, KDialog::marginHint(), KDialog::spacingHint() );
// "Outlook compatible attachment naming" check box
mOutlookCompatibleCheck =
- new QCheckBox( i18n( "Outlook-compatible attachment naming" ), this );
+ new TQCheckBox( i18n( "Outlook-compatible attachment naming" ), this );
mOutlookCompatibleCheck->setChecked( false );
- QToolTip::add( mOutlookCompatibleCheck, i18n(
+ TQToolTip::add( mOutlookCompatibleCheck, i18n(
"Turn this option on to make Outlook(tm) understand attachment names "
"containing non-English characters" ) );
- connect( mOutlookCompatibleCheck, SIGNAL( stateChanged( int ) ),
- this, SLOT( slotEmitChanged( void ) ) );
- connect( mOutlookCompatibleCheck, SIGNAL( clicked() ),
- this, SLOT( slotOutlookCompatibleClicked() ) );
+ connect( mOutlookCompatibleCheck, TQT_SIGNAL( stateChanged( int ) ),
+ this, TQT_SLOT( slotEmitChanged( void ) ) );
+ connect( mOutlookCompatibleCheck, TQT_SIGNAL( clicked() ),
+ this, TQT_SLOT( slotOutlookCompatibleClicked() ) );
vlay->addWidget( mOutlookCompatibleCheck );
vlay->addSpacing( 5 );
// "Enable detection of missing attachments" check box
mMissingAttachmentDetectionCheck =
- new QCheckBox( i18n("E&nable detection of missing attachments"), this );
+ new TQCheckBox( i18n("E&nable detection of missing attachments"), this );
mMissingAttachmentDetectionCheck->setChecked( true );
- connect( mMissingAttachmentDetectionCheck, SIGNAL( stateChanged( int ) ),
- this, SLOT( slotEmitChanged( void ) ) );
+ connect( mMissingAttachmentDetectionCheck, TQT_SIGNAL( stateChanged( int ) ),
+ this, TQT_SLOT( slotEmitChanged( void ) ) );
vlay->addWidget( mMissingAttachmentDetectionCheck );
// "Attachment key words" label and string list editor
- label = new QLabel( i18n("Recognize any of the following key words as "
+ label = new TQLabel( i18n("Recognize any of the following key words as "
"intention to attach a file:"), this );
label->setAlignment( AlignLeft|WordBreak );
vlay->addWidget( label );
@@ -3498,14 +3498,14 @@ ComposerPageAttachmentsTab::ComposerPageAttachmentsTab( QWidget * parent,
i18n("A&dd..."), i18n("Re&move"),
i18n("Mod&ify..."),
i18n("Enter new key word:") );
- connect( mAttachWordsListEditor, SIGNAL( changed( void ) ),
- this, SLOT( slotEmitChanged( void ) ) );
+ connect( mAttachWordsListEditor, TQT_SIGNAL( changed( void ) ),
+ this, TQT_SLOT( slotEmitChanged( void ) ) );
vlay->addWidget( mAttachWordsListEditor );
- connect( mMissingAttachmentDetectionCheck, SIGNAL(toggled(bool) ),
- label, SLOT(setEnabled(bool)) );
- connect( mMissingAttachmentDetectionCheck, SIGNAL(toggled(bool) ),
- mAttachWordsListEditor, SLOT(setEnabled(bool)) );
+ connect( mMissingAttachmentDetectionCheck, TQT_SIGNAL(toggled(bool) ),
+ label, TQT_SLOT(setEnabled(bool)) );
+ connect( mMissingAttachmentDetectionCheck, TQT_SIGNAL(toggled(bool) ),
+ mAttachWordsListEditor, TQT_SLOT(setEnabled(bool)) );
}
void ComposerPage::AttachmentsTab::doLoadFromGlobalSettings() {
@@ -3513,14 +3513,14 @@ void ComposerPage::AttachmentsTab::doLoadFromGlobalSettings() {
GlobalSettings::self()->outlookCompatibleAttachments() );
mMissingAttachmentDetectionCheck->setChecked(
GlobalSettings::self()->showForgottenAttachmentWarning() );
- QStringList attachWordsList = GlobalSettings::self()->attachmentKeywords();
+ TQStringList attachWordsList = GlobalSettings::self()->attachmentKeywords();
if ( attachWordsList.isEmpty() ) {
// default value
- attachWordsList << QString::fromLatin1("attachment")
- << QString::fromLatin1("attached");
- if ( QString::fromLatin1("attachment") != i18n("attachment") )
+ attachWordsList << TQString::fromLatin1("attachment")
+ << TQString::fromLatin1("attached");
+ if ( TQString::fromLatin1("attachment") != i18n("attachment") )
attachWordsList << i18n("attachment");
- if ( QString::fromLatin1("attached") != i18n("attached") )
+ if ( TQString::fromLatin1("attached") != i18n("attached") )
attachWordsList << i18n("attached");
}
@@ -3555,11 +3555,11 @@ void ComposerPageAttachmentsTab::slotOutlookCompatibleClicked()
// * SecurityPage *
// * *
// *************************************************************
-QString SecurityPage::helpAnchor() const {
- return QString::fromLatin1("configure-security");
+TQString SecurityPage::helpAnchor() const {
+ return TQString::fromLatin1("configure-security");
}
-SecurityPage::SecurityPage( QWidget * parent, const char * name )
+SecurityPage::SecurityPage( TQWidget * parent, const char * name )
: ConfigModuleWithTabs( parent, name )
{
//
@@ -3602,26 +3602,26 @@ void SecurityPage::installProfile( KConfig * profile ) {
mSMimeTab->installProfile( profile );
}
-QString SecurityPage::GeneralTab::helpAnchor() const {
- return QString::fromLatin1("configure-security-reading");
+TQString SecurityPage::GeneralTab::helpAnchor() const {
+ return TQString::fromLatin1("configure-security-reading");
}
-SecurityPageGeneralTab::SecurityPageGeneralTab( QWidget * parent, const char * name )
+SecurityPageGeneralTab::SecurityPageGeneralTab( TQWidget * parent, const char * name )
: ConfigModuleTab ( parent, name )
{
// tmp. vars:
- QVBoxLayout *vlay;
- QHBox *hbox;
- QGroupBox *group;
- QRadioButton *radio;
+ TQVBoxLayout *vlay;
+ TQHBox *hbox;
+ TQGroupBox *group;
+ TQRadioButton *radio;
KActiveLabel *label;
- QWidget *w;
- QString msg;
+ TQWidget *w;
+ TQString msg;
- vlay = new QVBoxLayout( this, KDialog::marginHint(), KDialog::spacingHint() );
+ vlay = new TQVBoxLayout( this, KDialog::marginHint(), KDialog::spacingHint() );
// QWhat'sThis texts
- QString htmlWhatsThis = i18n( "<qt><p>Messages sometimes come in both formats. "
+ TQString htmlWhatsThis = i18n( "<qt><p>Messages sometimes come in both formats. "
"This option controls whether you want the HTML part or the plain "
"text part to be displayed.</p>"
"<p>Displaying the HTML part makes the message look better, "
@@ -3638,7 +3638,7 @@ SecurityPageGeneralTab::SecurityPageGeneralTab( QWidget * parent, const char * n
"<p><b>Note:</b> You can set this option on a per-folder basis "
"from the <i>Folder</i> menu of KMail's main window.</p></qt>" );
- QString externalWhatsThis = i18n( "<qt><p>Some mail advertisements are in HTML "
+ TQString externalWhatsThis = i18n( "<qt><p>Some mail advertisements are in HTML "
"and contain references to, for example, images that the advertisers"
" employ to find out that you have read their message "
"(&quot;web bugs&quot;).</p>"
@@ -3651,7 +3651,7 @@ SecurityPageGeneralTab::SecurityPageGeneralTab( QWidget * parent, const char * n
"messages that were not attached to it, you can enable this "
"option, but you should be aware of the possible problem.</p></qt>" );
- QString receiptWhatsThis = i18n( "<qt><h3>Message Disposition "
+ TQString receiptWhatsThis = i18n( "<qt><h3>Message Disposition "
"Notification Policy</h3>"
"<p>MDNs are a generalization of what is commonly called <b>read "
"receipt</b>. The message author requests a disposition "
@@ -3684,18 +3684,18 @@ SecurityPageGeneralTab::SecurityPageGeneralTab( QWidget * parent, const char * n
// "HTML Messages" group box:
- group = new QVGroupBox( i18n( "HTML Messages" ), this );
+ group = new TQVGroupBox( i18n( "HTML Messages" ), this );
group->layout()->setSpacing( KDialog::spacingHint() );
- mHtmlMailCheck = new QCheckBox( i18n("Prefer H&TML to plain text"), group );
- QWhatsThis::add( mHtmlMailCheck, htmlWhatsThis );
- connect( mHtmlMailCheck, SIGNAL( stateChanged( int ) ),
- this, SLOT( slotEmitChanged( void ) ) );
- mExternalReferences = new QCheckBox( i18n("Allow messages to load e&xternal "
+ mHtmlMailCheck = new TQCheckBox( i18n("Prefer H&TML to plain text"), group );
+ TQWhatsThis::add( mHtmlMailCheck, htmlWhatsThis );
+ connect( mHtmlMailCheck, TQT_SIGNAL( stateChanged( int ) ),
+ this, TQT_SLOT( slotEmitChanged( void ) ) );
+ mExternalReferences = new TQCheckBox( i18n("Allow messages to load e&xternal "
"references from the Internet" ), group );
- QWhatsThis::add( mExternalReferences, externalWhatsThis );
- connect( mExternalReferences, SIGNAL( stateChanged( int ) ),
- this, SLOT( slotEmitChanged( void ) ) );
+ TQWhatsThis::add( mExternalReferences, externalWhatsThis );
+ connect( mExternalReferences, TQT_SIGNAL( stateChanged( int ) ),
+ this, TQT_SLOT( slotEmitChanged( void ) ) );
label = new KActiveLabel( i18n("<b>WARNING:</b> Allowing HTML in email may "
"increase the risk that your system will be "
"compromised by present and anticipated security "
@@ -3708,70 +3708,70 @@ SecurityPageGeneralTab::SecurityPageGeneralTab( QWidget * parent, const char * n
vlay->addWidget( group );
// encrypted messages group
- group = new QVGroupBox( i18n("Encrypted Messages"), this );
+ group = new TQVGroupBox( i18n("Encrypted Messages"), this );
group->layout()->setSpacing( KDialog::spacingHint() );
- mAlwaysDecrypt = new QCheckBox( i18n( "Attempt decryption of encrypted messages when viewing" ), group );
- connect( mAlwaysDecrypt, SIGNAL(stateChanged(int)), this, SLOT(slotEmitChanged()) );
+ mAlwaysDecrypt = new TQCheckBox( i18n( "Attempt decryption of encrypted messages when viewing" ), group );
+ connect( mAlwaysDecrypt, TQT_SIGNAL(stateChanged(int)), this, TQT_SLOT(slotEmitChanged()) );
vlay->addWidget( group );
// "Message Disposition Notification" groupbox:
- group = new QVGroupBox( i18n("Message Disposition Notifications"), this );
+ group = new TQVGroupBox( i18n("Message Disposition Notifications"), this );
group->layout()->setSpacing( KDialog::spacingHint() );
// "ignore", "ask", "deny", "always send" radiobutton line:
- mMDNGroup = new QButtonGroup( group );
+ mMDNGroup = new TQButtonGroup( group );
mMDNGroup->hide();
- connect( mMDNGroup, SIGNAL( clicked( int ) ),
- this, SLOT( slotEmitChanged( void ) ) );
- hbox = new QHBox( group );
+ connect( mMDNGroup, TQT_SIGNAL( clicked( int ) ),
+ this, TQT_SLOT( slotEmitChanged( void ) ) );
+ hbox = new TQHBox( group );
hbox->setSpacing( KDialog::spacingHint() );
- (void)new QLabel( i18n("Send policy:"), hbox );
+ (void)new TQLabel( i18n("Send policy:"), hbox );
- radio = new QRadioButton( i18n("&Ignore"), hbox );
+ radio = new TQRadioButton( i18n("&Ignore"), hbox );
mMDNGroup->insert( radio );
- radio = new QRadioButton( i18n("As&k"), hbox );
+ radio = new TQRadioButton( i18n("As&k"), hbox );
mMDNGroup->insert( radio );
- radio = new QRadioButton( i18n("&Deny"), hbox );
+ radio = new TQRadioButton( i18n("&Deny"), hbox );
mMDNGroup->insert( radio );
- radio = new QRadioButton( i18n("Al&ways send"), hbox );
+ radio = new TQRadioButton( i18n("Al&ways send"), hbox );
mMDNGroup->insert( radio );
for ( int i = 0 ; i < mMDNGroup->count() ; ++i )
- QWhatsThis::add( mMDNGroup->find( i ), receiptWhatsThis );
+ TQWhatsThis::add( mMDNGroup->find( i ), receiptWhatsThis );
- w = new QWidget( hbox ); // spacer
+ w = new TQWidget( hbox ); // spacer
hbox->setStretchFactor( w, 1 );
// "Original Message quote" radiobutton line:
- mOrigQuoteGroup = new QButtonGroup( group );
+ mOrigQuoteGroup = new TQButtonGroup( group );
mOrigQuoteGroup->hide();
- connect( mOrigQuoteGroup, SIGNAL( clicked( int ) ),
- this, SLOT( slotEmitChanged( void ) ) );
+ connect( mOrigQuoteGroup, TQT_SIGNAL( clicked( int ) ),
+ this, TQT_SLOT( slotEmitChanged( void ) ) );
- hbox = new QHBox( group );
+ hbox = new TQHBox( group );
hbox->setSpacing( KDialog::spacingHint() );
- (void)new QLabel( i18n("Quote original message:"), hbox );
+ (void)new TQLabel( i18n("Quote original message:"), hbox );
- radio = new QRadioButton( i18n("Nothin&g"), hbox );
+ radio = new TQRadioButton( i18n("Nothin&g"), hbox );
mOrigQuoteGroup->insert( radio );
- radio = new QRadioButton( i18n("&Full message"), hbox );
+ radio = new TQRadioButton( i18n("&Full message"), hbox );
mOrigQuoteGroup->insert( radio );
- radio = new QRadioButton( i18n("Onl&y headers"), hbox );
+ radio = new TQRadioButton( i18n("Onl&y headers"), hbox );
mOrigQuoteGroup->insert( radio );
- w = new QWidget( hbox );
+ w = new TQWidget( hbox );
hbox->setStretchFactor( w, 1 );
- mNoMDNsWhenEncryptedCheck = new QCheckBox( i18n("Do not send MDNs in response to encrypted messages"), group );
- connect( mNoMDNsWhenEncryptedCheck, SIGNAL(toggled(bool)), SLOT(slotEmitChanged()) );
+ mNoMDNsWhenEncryptedCheck = new TQCheckBox( i18n("Do not send MDNs in response to encrypted messages"), group );
+ connect( mNoMDNsWhenEncryptedCheck, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotEmitChanged()) );
// Warning label:
label = new KActiveLabel( i18n("<b>WARNING:</b> Unconditionally returning "
@@ -3783,11 +3783,11 @@ SecurityPageGeneralTab::SecurityPageGeneralTab( QWidget * parent, const char * n
vlay->addWidget( group );
// "Attached keys" group box:
- group = new QVGroupBox( i18n( "Certificate && Key Bundle Attachments" ), this );
+ group = new TQVGroupBox( i18n( "Certificate && Key Bundle Attachments" ), this );
group->layout()->setSpacing( KDialog::spacingHint() );
- mAutomaticallyImportAttachedKeysCheck = new QCheckBox( i18n("Automatically import keys and certificates"), group );
- connect( mAutomaticallyImportAttachedKeysCheck, SIGNAL(toggled(bool)), SLOT(slotEmitChanged()) );
+ mAutomaticallyImportAttachedKeysCheck = new TQCheckBox( i18n("Automatically import keys and certificates"), group );
+ connect( mAutomaticallyImportAttachedKeysCheck, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotEmitChanged()) );
vlay->addWidget( group );
@@ -3848,17 +3848,17 @@ void SecurityPage::GeneralTab::save() {
if (reader.readBoolEntry( "htmlMail", false ) != mHtmlMailCheck->isChecked())
{
if (KMessageBox::warningContinueCancel(this, i18n("Changing the global "
- "HTML setting will override all folder specific values."), QString::null,
+ "HTML setting will override all folder specific values."), TQString::null,
KStdGuiItem::cont(), "htmlMailOverride") == KMessageBox::Continue)
{
reader.writeEntry( "htmlMail", mHtmlMailCheck->isChecked() );
- QStringList names;
- QValueList<QGuardedPtr<KMFolder> > folders;
+ TQStringList names;
+ TQValueList<TQGuardedPtr<KMFolder> > folders;
kmkernel->folderMgr()->createFolderList(&names, &folders);
kmkernel->imapFolderMgr()->createFolderList(&names, &folders);
kmkernel->dimapFolderMgr()->createFolderList(&names, &folders);
kmkernel->searchFolderMgr()->createFolderList(&names, &folders);
- for (QValueList<QGuardedPtr<KMFolder> >::iterator it = folders.begin();
+ for (TQValueList<TQGuardedPtr<KMFolder> >::iterator it = folders.begin();
it != folders.end(); ++it)
{
if (*it)
@@ -3879,24 +3879,24 @@ void SecurityPage::GeneralTab::save() {
}
-QString SecurityPage::ComposerCryptoTab::helpAnchor() const {
- return QString::fromLatin1("configure-security-composing");
+TQString SecurityPage::ComposerCryptoTab::helpAnchor() const {
+ return TQString::fromLatin1("configure-security-composing");
}
-SecurityPageComposerCryptoTab::SecurityPageComposerCryptoTab( QWidget * parent, const char * name )
+SecurityPageComposerCryptoTab::SecurityPageComposerCryptoTab( TQWidget * parent, const char * name )
: ConfigModuleTab ( parent, name )
{
// the margins are inside mWidget itself
- QVBoxLayout* vlay = new QVBoxLayout( this, 0, 0 );
+ TQVBoxLayout* vlay = new TQVBoxLayout( this, 0, 0 );
mWidget = new ComposerCryptoConfiguration( this );
- connect( mWidget->mAutoSignature, SIGNAL( toggled(bool) ), this, SLOT( slotEmitChanged() ) );
- connect( mWidget->mEncToSelf, SIGNAL( toggled(bool) ), this, SLOT( slotEmitChanged() ) );
- connect( mWidget->mShowEncryptionResult, SIGNAL( toggled(bool) ), this, SLOT( slotEmitChanged() ) );
- connect( mWidget->mShowKeyApprovalDlg, SIGNAL( toggled(bool) ), this, SLOT( slotEmitChanged() ) );
- connect( mWidget->mAutoEncrypt, SIGNAL( toggled(bool) ), this, SLOT( slotEmitChanged() ) );
- connect( mWidget->mNeverEncryptWhenSavingInDrafts, SIGNAL( toggled(bool) ), this, SLOT( slotEmitChanged() ) );
- connect( mWidget->mStoreEncrypted, SIGNAL( toggled(bool) ), this, SLOT( slotEmitChanged() ) );
+ connect( mWidget->mAutoSignature, TQT_SIGNAL( toggled(bool) ), this, TQT_SLOT( slotEmitChanged() ) );
+ connect( mWidget->mEncToSelf, TQT_SIGNAL( toggled(bool) ), this, TQT_SLOT( slotEmitChanged() ) );
+ connect( mWidget->mShowEncryptionResult, TQT_SIGNAL( toggled(bool) ), this, TQT_SLOT( slotEmitChanged() ) );
+ connect( mWidget->mShowKeyApprovalDlg, TQT_SIGNAL( toggled(bool) ), this, TQT_SLOT( slotEmitChanged() ) );
+ connect( mWidget->mAutoEncrypt, TQT_SIGNAL( toggled(bool) ), this, TQT_SLOT( slotEmitChanged() ) );
+ connect( mWidget->mNeverEncryptWhenSavingInDrafts, TQT_SIGNAL( toggled(bool) ), this, TQT_SLOT( slotEmitChanged() ) );
+ connect( mWidget->mStoreEncrypted, TQT_SIGNAL( toggled(bool) ), this, TQT_SLOT( slotEmitChanged() ) );
vlay->addWidget( mWidget );
}
@@ -3954,33 +3954,33 @@ void SecurityPage::ComposerCryptoTab::save() {
composer.writeEntry( "crypto-store-encrypted", mWidget->mStoreEncrypted->isChecked() );
}
-QString SecurityPage::WarningTab::helpAnchor() const {
- return QString::fromLatin1("configure-security-warnings");
+TQString SecurityPage::WarningTab::helpAnchor() const {
+ return TQString::fromLatin1("configure-security-warnings");
}
-SecurityPageWarningTab::SecurityPageWarningTab( QWidget * parent, const char * name )
+SecurityPageWarningTab::SecurityPageWarningTab( TQWidget * parent, const char * name )
: ConfigModuleTab( parent, name )
{
// the margins are inside mWidget itself
- QVBoxLayout* vlay = new QVBoxLayout( this, 0, 0 );
+ TQVBoxLayout* vlay = new TQVBoxLayout( this, 0, 0 );
mWidget = new WarningConfiguration( this );
vlay->addWidget( mWidget );
- connect( mWidget->warnGroupBox, SIGNAL(toggled(bool)), SLOT(slotEmitChanged()) );
- connect( mWidget->mWarnUnsigned, SIGNAL(toggled(bool)), SLOT(slotEmitChanged()) );
- connect( mWidget->warnUnencryptedCB, SIGNAL(toggled(bool)), SLOT(slotEmitChanged()) );
- connect( mWidget->warnReceiverNotInCertificateCB, SIGNAL(toggled(bool)), SLOT(slotEmitChanged()) );
- connect( mWidget->mWarnSignKeyExpiresSB, SIGNAL( valueChanged( int ) ), SLOT( slotEmitChanged() ) );
- connect( mWidget->mWarnSignChainCertExpiresSB, SIGNAL( valueChanged( int ) ), SLOT( slotEmitChanged() ) );
- connect( mWidget->mWarnSignRootCertExpiresSB, SIGNAL( valueChanged( int ) ), SLOT( slotEmitChanged() ) );
+ connect( mWidget->warnGroupBox, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotEmitChanged()) );
+ connect( mWidget->mWarnUnsigned, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotEmitChanged()) );
+ connect( mWidget->warnUnencryptedCB, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotEmitChanged()) );
+ connect( mWidget->warnReceiverNotInCertificateCB, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotEmitChanged()) );
+ connect( mWidget->mWarnSignKeyExpiresSB, TQT_SIGNAL( valueChanged( int ) ), TQT_SLOT( slotEmitChanged() ) );
+ connect( mWidget->mWarnSignChainCertExpiresSB, TQT_SIGNAL( valueChanged( int ) ), TQT_SLOT( slotEmitChanged() ) );
+ connect( mWidget->mWarnSignRootCertExpiresSB, TQT_SIGNAL( valueChanged( int ) ), TQT_SLOT( slotEmitChanged() ) );
- connect( mWidget->mWarnEncrKeyExpiresSB, SIGNAL( valueChanged( int ) ), SLOT( slotEmitChanged() ) );
- connect( mWidget->mWarnEncrChainCertExpiresSB, SIGNAL( valueChanged( int ) ), SLOT( slotEmitChanged() ) );
- connect( mWidget->mWarnEncrRootCertExpiresSB, SIGNAL( valueChanged( int ) ), SLOT( slotEmitChanged() ) );
+ connect( mWidget->mWarnEncrKeyExpiresSB, TQT_SIGNAL( valueChanged( int ) ), TQT_SLOT( slotEmitChanged() ) );
+ connect( mWidget->mWarnEncrChainCertExpiresSB, TQT_SIGNAL( valueChanged( int ) ), TQT_SLOT( slotEmitChanged() ) );
+ connect( mWidget->mWarnEncrRootCertExpiresSB, TQT_SIGNAL( valueChanged( int ) ), TQT_SLOT( slotEmitChanged() ) );
- connect( mWidget->enableAllWarningsPB, SIGNAL(clicked()),
- SLOT(slotReenableAllWarningsClicked()) );
+ connect( mWidget->enableAllWarningsPB, TQT_SIGNAL(clicked()),
+ TQT_SLOT(slotReenableAllWarningsClicked()) );
}
void SecurityPage::WarningTab::doLoadOther() {
@@ -4063,21 +4063,21 @@ void SecurityPage::WarningTab::slotReenableAllWarningsClicked() {
////
-QString SecurityPage::SMimeTab::helpAnchor() const {
- return QString::fromLatin1("configure-security-smime-validation");
+TQString SecurityPage::SMimeTab::helpAnchor() const {
+ return TQString::fromLatin1("configure-security-smime-validation");
}
-SecurityPageSMimeTab::SecurityPageSMimeTab( QWidget * parent, const char * name )
+SecurityPageSMimeTab::SecurityPageSMimeTab( TQWidget * parent, const char * name )
: ConfigModuleTab( parent, name )
{
// the margins are inside mWidget itself
- QVBoxLayout* vlay = new QVBoxLayout( this, 0, 0 );
+ TQVBoxLayout* vlay = new TQVBoxLayout( this, 0, 0 );
mWidget = new SMimeConfiguration( this );
vlay->addWidget( mWidget );
// Button-group for exclusive radiobuttons
- QButtonGroup* bg = new QButtonGroup( mWidget );
+ TQButtonGroup* bg = new TQButtonGroup( mWidget );
bg->hide();
bg->insert( mWidget->CRLRB );
bg->insert( mWidget->OCSPRB );
@@ -4093,31 +4093,31 @@ SecurityPageSMimeTab::SecurityPageSMimeTab( QWidget * parent, const char * name
mConfig = Kleo::CryptoBackendFactory::instance()->config();
- connect( mWidget->CRLRB, SIGNAL( toggled( bool ) ), this, SLOT( slotEmitChanged() ) );
- connect( mWidget->OCSPRB, SIGNAL( toggled( bool ) ), this, SLOT( slotEmitChanged() ) );
- connect( mWidget->OCSPResponderURL, SIGNAL( textChanged( const QString& ) ), this, SLOT( slotEmitChanged() ) );
- connect( mWidget->OCSPResponderSignature, SIGNAL( changed() ), this, SLOT( slotEmitChanged() ) );
- connect( mWidget->doNotCheckCertPolicyCB, SIGNAL( toggled( bool ) ), this, SLOT( slotEmitChanged() ) );
- connect( mWidget->neverConsultCB, SIGNAL( toggled( bool ) ), this, SLOT( slotEmitChanged() ) );
- connect( mWidget->fetchMissingCB, SIGNAL( toggled( bool ) ), this, SLOT( slotEmitChanged() ) );
-
- connect( mWidget->ignoreServiceURLCB, SIGNAL( toggled( bool ) ), this, SLOT( slotEmitChanged() ) );
- connect( mWidget->ignoreHTTPDPCB, SIGNAL( toggled( bool ) ), this, SLOT( slotEmitChanged() ) );
- connect( mWidget->disableHTTPCB, SIGNAL( toggled( bool ) ), this, SLOT( slotEmitChanged() ) );
- connect( mWidget->honorHTTPProxyRB, SIGNAL( toggled( bool ) ), this, SLOT( slotEmitChanged() ) );
- connect( mWidget->useCustomHTTPProxyRB, SIGNAL( toggled( bool ) ), this, SLOT( slotEmitChanged() ) );
- connect( mWidget->customHTTPProxy, SIGNAL( textChanged( const QString& ) ), this, SLOT( slotEmitChanged() ) );
- connect( mWidget->ignoreLDAPDPCB, SIGNAL( toggled( bool ) ), this, SLOT( slotEmitChanged() ) );
- connect( mWidget->disableLDAPCB, SIGNAL( toggled( bool ) ), this, SLOT( slotEmitChanged() ) );
- connect( mWidget->customLDAPProxy, SIGNAL( textChanged( const QString& ) ), this, SLOT( slotEmitChanged() ) );
-
- connect( mWidget->disableHTTPCB, SIGNAL( toggled( bool ) ),
- this, SLOT( slotUpdateHTTPActions() ) );
- connect( mWidget->ignoreHTTPDPCB, SIGNAL( toggled( bool ) ),
- this, SLOT( slotUpdateHTTPActions() ) );
+ connect( mWidget->CRLRB, TQT_SIGNAL( toggled( bool ) ), this, TQT_SLOT( slotEmitChanged() ) );
+ connect( mWidget->OCSPRB, TQT_SIGNAL( toggled( bool ) ), this, TQT_SLOT( slotEmitChanged() ) );
+ connect( mWidget->OCSPResponderURL, TQT_SIGNAL( textChanged( const TQString& ) ), this, TQT_SLOT( slotEmitChanged() ) );
+ connect( mWidget->OCSPResponderSignature, TQT_SIGNAL( changed() ), this, TQT_SLOT( slotEmitChanged() ) );
+ connect( mWidget->doNotCheckCertPolicyCB, TQT_SIGNAL( toggled( bool ) ), this, TQT_SLOT( slotEmitChanged() ) );
+ connect( mWidget->neverConsultCB, TQT_SIGNAL( toggled( bool ) ), this, TQT_SLOT( slotEmitChanged() ) );
+ connect( mWidget->fetchMissingCB, TQT_SIGNAL( toggled( bool ) ), this, TQT_SLOT( slotEmitChanged() ) );
+
+ connect( mWidget->ignoreServiceURLCB, TQT_SIGNAL( toggled( bool ) ), this, TQT_SLOT( slotEmitChanged() ) );
+ connect( mWidget->ignoreHTTPDPCB, TQT_SIGNAL( toggled( bool ) ), this, TQT_SLOT( slotEmitChanged() ) );
+ connect( mWidget->disableHTTPCB, TQT_SIGNAL( toggled( bool ) ), this, TQT_SLOT( slotEmitChanged() ) );
+ connect( mWidget->honorHTTPProxyRB, TQT_SIGNAL( toggled( bool ) ), this, TQT_SLOT( slotEmitChanged() ) );
+ connect( mWidget->useCustomHTTPProxyRB, TQT_SIGNAL( toggled( bool ) ), this, TQT_SLOT( slotEmitChanged() ) );
+ connect( mWidget->customHTTPProxy, TQT_SIGNAL( textChanged( const TQString& ) ), this, TQT_SLOT( slotEmitChanged() ) );
+ connect( mWidget->ignoreLDAPDPCB, TQT_SIGNAL( toggled( bool ) ), this, TQT_SLOT( slotEmitChanged() ) );
+ connect( mWidget->disableLDAPCB, TQT_SIGNAL( toggled( bool ) ), this, TQT_SLOT( slotEmitChanged() ) );
+ connect( mWidget->customLDAPProxy, TQT_SIGNAL( textChanged( const TQString& ) ), this, TQT_SLOT( slotEmitChanged() ) );
+
+ connect( mWidget->disableHTTPCB, TQT_SIGNAL( toggled( bool ) ),
+ this, TQT_SLOT( slotUpdateHTTPActions() ) );
+ connect( mWidget->ignoreHTTPDPCB, TQT_SIGNAL( toggled( bool ) ),
+ this, TQT_SLOT( slotUpdateHTTPActions() ) );
// Button-group for exclusive radiobuttons
- QButtonGroup* bgHTTPProxy = new QButtonGroup( mWidget );
+ TQButtonGroup* bgHTTPProxy = new TQButtonGroup( mWidget );
bgHTTPProxy->hide();
bgHTTPProxy->insert( mWidget->honorHTTPProxyRB );
bgHTTPProxy->insert( mWidget->useCustomHTTPProxyRB );
@@ -4132,13 +4132,13 @@ SecurityPageSMimeTab::~SecurityPageSMimeTab()
{
}
-static void disableDirmngrWidget( QWidget* w ) {
+static void disableDirmngrWidget( TQWidget* w ) {
w->setEnabled( false );
- QWhatsThis::remove( w );
- QWhatsThis::add( w, i18n( "This option requires dirmngr >= 0.9.0" ) );
+ TQWhatsThis::remove( w );
+ TQWhatsThis::add( w, i18n( "This option requires dirmngr >= 0.9.0" ) );
}
-static void initializeDirmngrCheckbox( QCheckBox* cb, Kleo::CryptoConfigEntry* entry ) {
+static void initializeDirmngrCheckbox( TQCheckBox* cb, Kleo::CryptoConfigEntry* entry ) {
if ( entry )
cb->setChecked( entry->boolValue() );
else
@@ -4242,7 +4242,7 @@ void SecurityPage::SMimeTab::doLoadOther() {
initializeDirmngrCheckbox( mWidget->ignoreLDAPDPCB, e.mIgnoreLDAPDPEntry );
initializeDirmngrCheckbox( mWidget->disableLDAPCB, e.mDisableLDAPEntry );
if ( e.mCustomHTTPProxy ) {
- QString systemProxy = QString::fromLocal8Bit( getenv( "http_proxy" ) );
+ TQString systemProxy = TQString::fromLocal8Bit( getenv( "http_proxy" ) );
if ( systemProxy.isEmpty() )
systemProxy = i18n( "no proxy" );
mWidget->systemHTTPProxy->setText( i18n( "(Current system setting: %1)" ).arg( systemProxy ) );
@@ -4280,7 +4280,7 @@ void SecurityPage::SMimeTab::slotUpdateHTTPActions() {
void SecurityPage::SMimeTab::installProfile( KConfig * ) {
}
-static void saveCheckBoxToKleoEntry( QCheckBox* cb, Kleo::CryptoConfigEntry* entry ) {
+static void saveCheckBoxToKleoEntry( TQCheckBox* cb, Kleo::CryptoConfigEntry* entry ) {
const bool b = cb->isChecked();
if ( entry && entry->boolValue() != b )
entry->setBoolValue( b );
@@ -4306,7 +4306,7 @@ void SecurityPage::SMimeTab::save() {
saveCheckBoxToKleoEntry( mWidget->neverConsultCB, e.mNeverConsultConfigEntry );
saveCheckBoxToKleoEntry( mWidget->fetchMissingCB, e.mFetchMissingConfigEntry );
- QString txt = mWidget->OCSPResponderURL->text();
+ TQString txt = mWidget->OCSPResponderURL->text();
if ( e.mOCSPResponderURLConfigEntry && e.mOCSPResponderURLConfigEntry->stringValue() != txt )
e.mOCSPResponderURLConfigEntry->setStringValue( txt );
@@ -4326,7 +4326,7 @@ void SecurityPage::SMimeTab::save() {
if ( e.mHonorHTTPProxy && e.mHonorHTTPProxy->boolValue() != honor )
e.mHonorHTTPProxy->setBoolValue( honor );
- QString chosenProxy = mWidget->customHTTPProxy->text();
+ TQString chosenProxy = mWidget->customHTTPProxy->text();
if ( chosenProxy != e.mCustomHTTPProxy->stringValue() )
e.mCustomHTTPProxy->setStringValue( chosenProxy );
}
@@ -4337,7 +4337,7 @@ void SecurityPage::SMimeTab::save() {
mConfig->sync( true );
}
-bool SecurityPageSMimeTab::process(const QCString &fun, const QByteArray &data, QCString& replyType, QByteArray &replyData)
+bool SecurityPageSMimeTab::process(const TQCString &fun, const TQByteArray &data, TQCString& replyType, TQByteArray &replyData)
{
if ( fun == "load()" ) {
replyType = "void";
@@ -4369,11 +4369,11 @@ Kleo::CryptoConfigEntry* SMIMECryptoConfigEntries::configEntry( const char* comp
{
Kleo::CryptoConfigEntry* entry = mConfig->entry( componentName, groupName, entryName );
if ( !entry ) {
- kdWarning(5006) << QString( "Backend error: gpgconf doesn't seem to know the entry for %1/%2/%3" ).arg( componentName, groupName, entryName ) << endl;
+ kdWarning(5006) << TQString( "Backend error: gpgconf doesn't seem to know the entry for %1/%2/%3" ).arg( componentName, groupName, entryName ) << endl;
return 0;
}
if( entry->argType() != argType || entry->isList() != isList ) {
- kdWarning(5006) << QString( "Backend error: gpgconf has wrong type for %1/%2/%3: %4 %5" ).arg( componentName, groupName, entryName ).arg( entry->argType() ).arg( entry->isList() ) << endl;
+ kdWarning(5006) << TQString( "Backend error: gpgconf has wrong type for %1/%2/%3: %4 %5" ).arg( componentName, groupName, entryName ).arg( entry->argType() ).arg( entry->isList() ) << endl;
return 0;
}
return entry;
@@ -4381,17 +4381,17 @@ Kleo::CryptoConfigEntry* SMIMECryptoConfigEntries::configEntry( const char* comp
////
-QString SecurityPage::CryptPlugTab::helpAnchor() const {
- return QString::fromLatin1("configure-security-crypto-backends");
+TQString SecurityPage::CryptPlugTab::helpAnchor() const {
+ return TQString::fromLatin1("configure-security-crypto-backends");
}
-SecurityPageCryptPlugTab::SecurityPageCryptPlugTab( QWidget * parent, const char * name )
+SecurityPageCryptPlugTab::SecurityPageCryptPlugTab( TQWidget * parent, const char * name )
: ConfigModuleTab( parent, name )
{
- QVBoxLayout * vlay = new QVBoxLayout( this, KDialog::marginHint(), KDialog::spacingHint() );
+ TQVBoxLayout * vlay = new TQVBoxLayout( this, KDialog::marginHint(), KDialog::spacingHint() );
mBackendConfig = Kleo::CryptoBackendFactory::instance()->configWidget( this, "mBackendConfig" );
- connect( mBackendConfig, SIGNAL( changed( bool ) ), this, SIGNAL( changed( bool ) ) );
+ connect( mBackendConfig, TQT_SIGNAL( changed( bool ) ), this, TQT_SIGNAL( changed( bool ) ) );
vlay->addWidget( mBackendConfig );
}
@@ -4414,11 +4414,11 @@ void SecurityPage::CryptPlugTab::save() {
// * MiscPage *
// * *
// *************************************************************
-QString MiscPage::helpAnchor() const {
- return QString::fromLatin1("configure-misc");
+TQString MiscPage::helpAnchor() const {
+ return TQString::fromLatin1("configure-misc");
}
-MiscPage::MiscPage( QWidget * parent, const char * name )
+MiscPage::MiscPage( TQWidget * parent, const char * name )
: ConfigModuleWithTabs( parent, name )
{
mFolderTab = new FolderTab();
@@ -4429,43 +4429,43 @@ MiscPage::MiscPage( QWidget * parent, const char * name )
load();
}
-QString MiscPage::FolderTab::helpAnchor() const {
- return QString::fromLatin1("configure-misc-folders");
+TQString MiscPage::FolderTab::helpAnchor() const {
+ return TQString::fromLatin1("configure-misc-folders");
}
-MiscPageFolderTab::MiscPageFolderTab( QWidget * parent, const char * name )
+MiscPageFolderTab::MiscPageFolderTab( TQWidget * parent, const char * name )
: ConfigModuleTab( parent, name )
{
// temp. vars:
- QVBoxLayout *vlay;
- QHBoxLayout *hlay;
- QLabel *label;
+ TQVBoxLayout *vlay;
+ TQHBoxLayout *hlay;
+ TQLabel *label;
- vlay = new QVBoxLayout( this, KDialog::marginHint(), KDialog::spacingHint() );
+ vlay = new TQVBoxLayout( this, KDialog::marginHint(), KDialog::spacingHint() );
// "confirm before emptying folder" check box: stretch 0
mEmptyFolderConfirmCheck =
- new QCheckBox( i18n("Corresponds to Folder->Move All Messages to Trash",
+ new TQCheckBox( i18n("Corresponds to Folder->Move All Messages to Trash",
"Ask for co&nfirmation before moving all messages to "
"trash"),
this );
vlay->addWidget( mEmptyFolderConfirmCheck );
- connect( mEmptyFolderConfirmCheck, SIGNAL( stateChanged( int ) ),
- this, SLOT( slotEmitChanged( void ) ) );
+ connect( mEmptyFolderConfirmCheck, TQT_SIGNAL( stateChanged( int ) ),
+ this, TQT_SLOT( slotEmitChanged( void ) ) );
mExcludeImportantFromExpiry =
- new QCheckBox( i18n("E&xclude important messages from expiry"), this );
+ new TQCheckBox( i18n("E&xclude important messages from expiry"), this );
vlay->addWidget( mExcludeImportantFromExpiry );
- connect( mExcludeImportantFromExpiry, SIGNAL( stateChanged( int ) ),
- this, SLOT( slotEmitChanged( void ) ) );
+ connect( mExcludeImportantFromExpiry, TQT_SIGNAL( stateChanged( int ) ),
+ this, TQT_SLOT( slotEmitChanged( void ) ) );
// "when trying to find unread messages" combo + label: stretch 0
- hlay = new QHBoxLayout( vlay ); // inherits spacing
- mLoopOnGotoUnread = new QComboBox( false, this );
- label = new QLabel( mLoopOnGotoUnread,
+ hlay = new TQHBoxLayout( vlay ); // inherits spacing
+ mLoopOnGotoUnread = new TQComboBox( false, this );
+ label = new TQLabel( mLoopOnGotoUnread,
i18n("to be continued with \"do not loop\", \"loop in current folder\", "
"and \"loop in all folders\".",
"When trying to find unread messages:"), this );
- mLoopOnGotoUnread->insertStringList( QStringList()
+ mLoopOnGotoUnread->insertStringList( TQStringList()
<< i18n("continuation of \"When trying to find unread messages:\"",
"Do not Loop")
<< i18n("continuation of \"When trying to find unread messages:\"",
@@ -4474,18 +4474,18 @@ MiscPageFolderTab::MiscPageFolderTab( QWidget * parent, const char * name )
"Loop in All Folders"));
hlay->addWidget( label );
hlay->addWidget( mLoopOnGotoUnread, 1 );
- connect( mLoopOnGotoUnread, SIGNAL( activated( int ) ),
- this, SLOT( slotEmitChanged( void ) ) );
+ connect( mLoopOnGotoUnread, TQT_SIGNAL( activated( int ) ),
+ this, TQT_SLOT( slotEmitChanged( void ) ) );
// when entering a folder
- hlay = new QHBoxLayout( vlay ); // inherits spacing
- mActionEnterFolder = new QComboBox( false, this );
- label = new QLabel( mActionEnterFolder,
+ hlay = new TQHBoxLayout( vlay ); // inherits spacing
+ mActionEnterFolder = new TQComboBox( false, this );
+ label = new TQLabel( mActionEnterFolder,
i18n("to be continued with \"jump to first new message\", "
"\"jump to first unread or new message\","
"and \"jump to last selected message\".",
"When entering a folder:"), this );
- mActionEnterFolder->insertStringList( QStringList()
+ mActionEnterFolder->insertStringList( TQStringList()
<< i18n("continuation of \"When entering a folder:\"",
"Jump to First New Message")
<< i18n("continuation of \"When entering a folder:\"",
@@ -4494,11 +4494,11 @@ MiscPageFolderTab::MiscPageFolderTab( QWidget * parent, const char * name )
"Jump to Last Selected Message"));
hlay->addWidget( label );
hlay->addWidget( mActionEnterFolder, 1 );
- connect( mActionEnterFolder, SIGNAL( activated( int ) ),
- this, SLOT( slotEmitChanged( void ) ) );
+ connect( mActionEnterFolder, TQT_SIGNAL( activated( int ) ),
+ this, TQT_SLOT( slotEmitChanged( void ) ) );
- hlay = new QHBoxLayout( vlay ); // inherits spacing
- mDelayedMarkAsRead = new QCheckBox( i18n("Mar&k selected message as read after"), this );
+ hlay = new TQHBoxLayout( vlay ); // inherits spacing
+ mDelayedMarkAsRead = new TQCheckBox( i18n("Mar&k selected message as read after"), this );
hlay->addWidget( mDelayedMarkAsRead );
mDelayedMarkTime = new KIntSpinBox( 0 /*min*/, 60 /*max*/, 1/*step*/,
0 /*init*/, 10 /*base*/, this);
@@ -4506,34 +4506,34 @@ MiscPageFolderTab::MiscPageFolderTab( QWidget * parent, const char * name )
mDelayedMarkTime->setEnabled( false ); // since mDelayedMarkAsREad is off
hlay->addWidget( mDelayedMarkTime );
hlay->addStretch( 1 );
- connect( mDelayedMarkTime, SIGNAL( valueChanged( int ) ),
- this, SLOT( slotEmitChanged( void ) ) );
- connect( mDelayedMarkAsRead, SIGNAL(toggled(bool)),
- mDelayedMarkTime, SLOT(setEnabled(bool)));
- connect( mDelayedMarkAsRead, SIGNAL(toggled(bool)),
- this , SLOT(slotEmitChanged( void )));
+ connect( mDelayedMarkTime, TQT_SIGNAL( valueChanged( int ) ),
+ this, TQT_SLOT( slotEmitChanged( void ) ) );
+ connect( mDelayedMarkAsRead, TQT_SIGNAL(toggled(bool)),
+ mDelayedMarkTime, TQT_SLOT(setEnabled(bool)));
+ connect( mDelayedMarkAsRead, TQT_SIGNAL(toggled(bool)),
+ this , TQT_SLOT(slotEmitChanged( void )));
// "show popup after Drag'n'Drop" checkbox: stretch 0
mShowPopupAfterDnD =
- new QCheckBox( i18n("Ask for action after &dragging messages to another folder"), this );
+ new TQCheckBox( i18n("Ask for action after &dragging messages to another folder"), this );
vlay->addWidget( mShowPopupAfterDnD );
- connect( mShowPopupAfterDnD, SIGNAL( stateChanged( int ) ),
- this, SLOT( slotEmitChanged( void ) ) );
+ connect( mShowPopupAfterDnD, TQT_SIGNAL( stateChanged( int ) ),
+ this, TQT_SLOT( slotEmitChanged( void ) ) );
// "default mailbox format" combo + label: stretch 0
- hlay = new QHBoxLayout( vlay ); // inherits spacing
- mMailboxPrefCombo = new QComboBox( false, this );
- label = new QLabel( mMailboxPrefCombo,
+ hlay = new TQHBoxLayout( vlay ); // inherits spacing
+ mMailboxPrefCombo = new TQComboBox( false, this );
+ label = new TQLabel( mMailboxPrefCombo,
i18n("to be continued with \"flat files\" and "
"\"directories\", resp.",
"By default, &message folders on disk are:"), this );
- mMailboxPrefCombo->insertStringList( QStringList()
+ mMailboxPrefCombo->insertStringList( TQStringList()
<< i18n("continuation of \"By default, &message folders on disk are\"",
"Flat Files (\"mbox\" format)")
<< i18n("continuation of \"By default, &message folders on disk are\"",
"Directories (\"maildir\" format)") );
- // and now: add QWhatsThis:
- QString msg = i18n( "what's this help",
+ // and now: add TQWhatsThis:
+ TQString msg = i18n( "what's this help",
"<qt><p>This selects which mailbox format will be "
"the default for local folders:</p>"
"<p><b>mbox:</b> KMail's mail "
@@ -4547,52 +4547,52 @@ MiscPageFolderTab::MiscPageFolderTab( QWidget * parent, const char * name )
"are separate files. This may waste a bit of space on "
"disk, but should be more robust, e.g. when moving "
"messages between folders.</p></qt>");
- QWhatsThis::add( mMailboxPrefCombo, msg );
- QWhatsThis::add( label, msg );
+ TQWhatsThis::add( mMailboxPrefCombo, msg );
+ TQWhatsThis::add( label, msg );
hlay->addWidget( label );
hlay->addWidget( mMailboxPrefCombo, 1 );
- connect( mMailboxPrefCombo, SIGNAL( activated( int ) ),
- this, SLOT( slotEmitChanged( void ) ) );
+ connect( mMailboxPrefCombo, TQT_SIGNAL( activated( int ) ),
+ this, TQT_SLOT( slotEmitChanged( void ) ) );
// "On startup..." option:
- hlay = new QHBoxLayout( vlay ); // inherits spacing
+ hlay = new TQHBoxLayout( vlay ); // inherits spacing
mOnStartupOpenFolder = new FolderRequester( this,
kmkernel->getKMMainWidget()->folderTree() );
- label = new QLabel( mOnStartupOpenFolder,
+ label = new TQLabel( mOnStartupOpenFolder,
i18n("Open this folder on startup:"), this );
hlay->addWidget( label );
hlay->addWidget( mOnStartupOpenFolder, 1 );
- connect( mOnStartupOpenFolder, SIGNAL( folderChanged( KMFolder* ) ),
- this, SLOT( slotEmitChanged( void ) ) );
+ connect( mOnStartupOpenFolder, TQT_SIGNAL( folderChanged( KMFolder* ) ),
+ this, TQT_SLOT( slotEmitChanged( void ) ) );
// "Empty &trash on program exit" option:
- hlay = new QHBoxLayout( vlay ); // inherits spacing
- mEmptyTrashCheck = new QCheckBox( i18n("Empty local &trash folder on program exit"),
+ hlay = new TQHBoxLayout( vlay ); // inherits spacing
+ mEmptyTrashCheck = new TQCheckBox( i18n("Empty local &trash folder on program exit"),
this );
hlay->addWidget( mEmptyTrashCheck );
- connect( mEmptyTrashCheck, SIGNAL( stateChanged( int ) ),
- this, SLOT( slotEmitChanged( void ) ) );
+ connect( mEmptyTrashCheck, TQT_SIGNAL( stateChanged( int ) ),
+ this, TQT_SLOT( slotEmitChanged( void ) ) );
#ifdef HAVE_INDEXLIB
// indexing enabled option:
- mIndexingEnabled = new QCheckBox( i18n("Enable full text &indexing"), this );
+ mIndexingEnabled = new TQCheckBox( i18n("Enable full text &indexing"), this );
vlay->addWidget( mIndexingEnabled );
- connect( mIndexingEnabled, SIGNAL( stateChanged( int ) ),
- this, SLOT( slotEmitChanged( void ) ) );
+ connect( mIndexingEnabled, TQT_SIGNAL( stateChanged( int ) ),
+ this, TQT_SLOT( slotEmitChanged( void ) ) );
#endif
// "Quota Units"
- hlay = new QHBoxLayout( vlay ); // inherits spacing
- mQuotaCmbBox = new QComboBox( false, this );
- label = new QLabel( mQuotaCmbBox,
+ hlay = new TQHBoxLayout( vlay ); // inherits spacing
+ mQuotaCmbBox = new TQComboBox( false, this );
+ label = new TQLabel( mQuotaCmbBox,
i18n("Quota units: "), this );
- mQuotaCmbBox->insertStringList( QStringList()
+ mQuotaCmbBox->insertStringList( TQStringList()
<< i18n("KB")
<< i18n("MB")
<< i18n("GB") );
hlay->addWidget( label );
hlay->addWidget( mQuotaCmbBox, 1 );
- connect( mQuotaCmbBox, SIGNAL( activated( int ) ), this, SLOT( slotEmitChanged( void ) ) );
+ connect( mQuotaCmbBox, TQT_SIGNAL( activated( int ) ), this, TQT_SLOT( slotEmitChanged( void ) ) );
vlay->addStretch( 1 );
@@ -4610,7 +4610,7 @@ MiscPageFolderTab::MiscPageFolderTab( QWidget * parent, const char * name )
"<p>Similarly, when searching for the previous unread message, "
"the search will start from the bottom of the message list and continue to "
"the previous folder depending on which option is selected.</p></qt>" );
- QWhatsThis::add( mLoopOnGotoUnread, msg );
+ TQWhatsThis::add( mLoopOnGotoUnread, msg );
#ifdef HAVE_INDEXLIB
// this is probably overly pessimistic
@@ -4625,7 +4625,7 @@ MiscPageFolderTab::MiscPageFolderTab( QWidget * parent, const char * name )
"</qt>"
);
- QWhatsThis::add( mIndexingEnabled, msg );
+ TQWhatsThis::add( mIndexingEnabled, msg );
#endif
}
@@ -4664,7 +4664,7 @@ void MiscPage::FolderTab::save() {
general.writeEntry( "confirm-before-empty", mEmptyFolderConfirmCheck->isChecked() );
general.writeEntry( "default-mailbox-format", mMailboxPrefCombo->currentItem() );
general.writeEntry( "startupFolder", mOnStartupOpenFolder->folder() ?
- mOnStartupOpenFolder->folder()->idString() : QString::null );
+ mOnStartupOpenFolder->folder()->idString() : TQString::null );
GlobalSettings::self()->setDelayedMarkAsRead( mDelayedMarkAsRead->isChecked() );
GlobalSettings::self()->setDelayedMarkTime( mDelayedMarkTime->value() );
@@ -4679,83 +4679,83 @@ void MiscPage::FolderTab::save() {
#endif
}
-QString MiscPage::GroupwareTab::helpAnchor() const {
- return QString::fromLatin1("configure-misc-groupware");
+TQString MiscPage::GroupwareTab::helpAnchor() const {
+ return TQString::fromLatin1("configure-misc-groupware");
}
-MiscPageGroupwareTab::MiscPageGroupwareTab( QWidget* parent, const char* name )
+MiscPageGroupwareTab::MiscPageGroupwareTab( TQWidget* parent, const char* name )
: ConfigModuleTab( parent, name )
{
- QBoxLayout* vlay = new QVBoxLayout( this, KDialog::marginHint(),
+ TQBoxLayout* vlay = new TQVBoxLayout( this, KDialog::marginHint(),
KDialog::spacingHint() );
vlay->setAutoAdd( true );
// IMAP resource setup
- QVGroupBox* b1 = new QVGroupBox( i18n("&IMAP Resource Folder Options"),
+ TQVGroupBox* b1 = new TQVGroupBox( i18n("&IMAP Resource Folder Options"),
this );
mEnableImapResCB =
- new QCheckBox( i18n("&Enable IMAP resource functionality"), b1 );
- QToolTip::add( mEnableImapResCB, i18n( "This enables the IMAP storage for "
+ new TQCheckBox( i18n("&Enable IMAP resource functionality"), b1 );
+ TQToolTip::add( mEnableImapResCB, i18n( "This enables the IMAP storage for "
"the Kontact applications" ) );
- QWhatsThis::add( mEnableImapResCB,
+ TQWhatsThis::add( mEnableImapResCB,
i18n( GlobalSettings::self()->theIMAPResourceEnabledItem()->whatsThis().utf8() ) );
- connect( mEnableImapResCB, SIGNAL( stateChanged( int ) ),
- this, SLOT( slotEmitChanged( void ) ) );
+ connect( mEnableImapResCB, TQT_SIGNAL( stateChanged( int ) ),
+ this, TQT_SLOT( slotEmitChanged( void ) ) );
- mBox = new QWidget( b1 );
- QGridLayout* grid = new QGridLayout( mBox, 5, 2, 0, KDialog::spacingHint() );
+ mBox = new TQWidget( b1 );
+ TQGridLayout* grid = new TQGridLayout( mBox, 5, 2, 0, KDialog::spacingHint() );
grid->setColStretch( 1, 1 );
- connect( mEnableImapResCB, SIGNAL( toggled(bool) ),
- mBox, SLOT( setEnabled(bool) ) );
+ connect( mEnableImapResCB, TQT_SIGNAL( toggled(bool) ),
+ mBox, TQT_SLOT( setEnabled(bool) ) );
- QLabel* storageFormatLA = new QLabel( i18n("&Format used for the groupware folders:"),
+ TQLabel* storageFormatLA = new TQLabel( i18n("&Format used for the groupware folders:"),
mBox );
- QString toolTip = i18n( "Choose the format to use to store the contents of the groupware folders." );
- QString whatsThis = i18n( GlobalSettings::self()
+ TQString toolTip = i18n( "Choose the format to use to store the contents of the groupware folders." );
+ TQString whatsThis = i18n( GlobalSettings::self()
->theIMAPResourceStorageFormatItem()->whatsThis().utf8() );
grid->addWidget( storageFormatLA, 0, 0 );
- QToolTip::add( storageFormatLA, toolTip );
- QWhatsThis::add( storageFormatLA, whatsThis );
- mStorageFormatCombo = new QComboBox( false, mBox );
+ TQToolTip::add( storageFormatLA, toolTip );
+ TQWhatsThis::add( storageFormatLA, whatsThis );
+ mStorageFormatCombo = new TQComboBox( false, mBox );
storageFormatLA->setBuddy( mStorageFormatCombo );
- QStringList formatLst;
+ TQStringList formatLst;
formatLst << i18n("Standard (Ical / Vcard)") << i18n("Kolab (XML)");
mStorageFormatCombo->insertStringList( formatLst );
grid->addWidget( mStorageFormatCombo, 0, 1 );
- QToolTip::add( mStorageFormatCombo, toolTip );
- QWhatsThis::add( mStorageFormatCombo, whatsThis );
- connect( mStorageFormatCombo, SIGNAL( activated( int ) ),
- this, SLOT( slotStorageFormatChanged( int ) ) );
+ TQToolTip::add( mStorageFormatCombo, toolTip );
+ TQWhatsThis::add( mStorageFormatCombo, whatsThis );
+ connect( mStorageFormatCombo, TQT_SIGNAL( activated( int ) ),
+ this, TQT_SLOT( slotStorageFormatChanged( int ) ) );
- QLabel* languageLA = new QLabel( i18n("&Language of the groupware folders:"),
+ TQLabel* languageLA = new TQLabel( i18n("&Language of the groupware folders:"),
mBox );
toolTip = i18n( "Set the language of the folder names" );
whatsThis = i18n( GlobalSettings::self()
->theIMAPResourceFolderLanguageItem()->whatsThis().utf8() );
grid->addWidget( languageLA, 1, 0 );
- QToolTip::add( languageLA, toolTip );
- QWhatsThis::add( languageLA, whatsThis );
- mLanguageCombo = new QComboBox( false, mBox );
+ TQToolTip::add( languageLA, toolTip );
+ TQWhatsThis::add( languageLA, whatsThis );
+ mLanguageCombo = new TQComboBox( false, mBox );
languageLA->setBuddy( mLanguageCombo );
- QStringList lst;
+ TQStringList lst;
lst << i18n("English") << i18n("German") << i18n("French") << i18n("Dutch");
mLanguageCombo->insertStringList( lst );
grid->addWidget( mLanguageCombo, 1, 1 );
- QToolTip::add( mLanguageCombo, toolTip );
- QWhatsThis::add( mLanguageCombo, whatsThis );
- connect( mLanguageCombo, SIGNAL( activated( int ) ),
- this, SLOT( slotEmitChanged( void ) ) );
+ TQToolTip::add( mLanguageCombo, toolTip );
+ TQWhatsThis::add( mLanguageCombo, whatsThis );
+ connect( mLanguageCombo, TQT_SIGNAL( activated( int ) ),
+ this, TQT_SLOT( slotEmitChanged( void ) ) );
- mFolderComboLabel = new QLabel( mBox ); // text depends on storage format
+ mFolderComboLabel = new TQLabel( mBox ); // text depends on storage format
toolTip = i18n( "Set the parent of the resource folders" );
whatsThis = i18n( GlobalSettings::self()->theIMAPResourceFolderParentItem()->whatsThis().utf8() );
- QToolTip::add( mFolderComboLabel, toolTip );
- QWhatsThis::add( mFolderComboLabel, whatsThis );
+ TQToolTip::add( mFolderComboLabel, toolTip );
+ TQWhatsThis::add( mFolderComboLabel, whatsThis );
grid->addWidget( mFolderComboLabel, 2, 0 );
- mFolderComboStack = new QWidgetStack( mBox );
+ mFolderComboStack = new TQWidgetStack( mBox );
grid->addWidget( mFolderComboStack, 2, 1 );
// First possibility in the widgetstack: a combo showing the list of all folders
@@ -4763,108 +4763,108 @@ MiscPageGroupwareTab::MiscPageGroupwareTab( QWidget* parent, const char* name )
mFolderCombo = new FolderRequester( mBox,
kmkernel->getKMMainWidget()->folderTree() );
mFolderComboStack->addWidget( mFolderCombo, 0 );
- QToolTip::add( mFolderCombo, toolTip );
- QWhatsThis::add( mFolderCombo, whatsThis );
- connect( mFolderCombo, SIGNAL( folderChanged( KMFolder* ) ),
- this, SLOT( slotEmitChanged() ) );
+ TQToolTip::add( mFolderCombo, toolTip );
+ TQWhatsThis::add( mFolderCombo, whatsThis );
+ connect( mFolderCombo, TQT_SIGNAL( folderChanged( KMFolder* ) ),
+ this, TQT_SLOT( slotEmitChanged() ) );
// Second possibility in the widgetstack: a combo showing the list of accounts
// This is used with the kolab xml storage since the groupware folders
// are always under the inbox.
mAccountCombo = new KMail::AccountComboBox( mBox );
mFolderComboStack->addWidget( mAccountCombo, 1 );
- QToolTip::add( mAccountCombo, toolTip );
- QWhatsThis::add( mAccountCombo, whatsThis );
- connect( mAccountCombo, SIGNAL( activated( int ) ),
- this, SLOT( slotEmitChanged() ) );
+ TQToolTip::add( mAccountCombo, toolTip );
+ TQWhatsThis::add( mAccountCombo, whatsThis );
+ connect( mAccountCombo, TQT_SIGNAL( activated( int ) ),
+ this, TQT_SLOT( slotEmitChanged() ) );
- mHideGroupwareFolders = new QCheckBox( i18n( "&Hide groupware folders" ),
+ mHideGroupwareFolders = new TQCheckBox( i18n( "&Hide groupware folders" ),
mBox, "HideGroupwareFoldersBox" );
grid->addMultiCellWidget( mHideGroupwareFolders, 3, 3, 0, 0 );
- QToolTip::add( mHideGroupwareFolders,
+ TQToolTip::add( mHideGroupwareFolders,
i18n( "When this is checked, you will not see the IMAP "
"resource folders in the folder tree." ) );
- QWhatsThis::add( mHideGroupwareFolders, i18n( GlobalSettings::self()
+ TQWhatsThis::add( mHideGroupwareFolders, i18n( GlobalSettings::self()
->hideGroupwareFoldersItem()->whatsThis().utf8() ) );
- connect( mHideGroupwareFolders, SIGNAL( toggled( bool ) ),
- this, SLOT( slotEmitChanged() ) );
+ connect( mHideGroupwareFolders, TQT_SIGNAL( toggled( bool ) ),
+ this, TQT_SLOT( slotEmitChanged() ) );
- mOnlyShowGroupwareFolders = new QCheckBox( i18n( "&Only show groupware folders for this account" ),
+ mOnlyShowGroupwareFolders = new TQCheckBox( i18n( "&Only show groupware folders for this account" ),
mBox, "OnlyGroupwareFoldersBox" );
grid->addMultiCellWidget( mOnlyShowGroupwareFolders, 3, 3, 1, 1 );
- QToolTip::add( mOnlyShowGroupwareFolders,
+ TQToolTip::add( mOnlyShowGroupwareFolders,
i18n( "When this is checked, you will not see normal "
"mail folders in the folder tree for the account "
"configured for groupware." ) );
- QWhatsThis::add( mOnlyShowGroupwareFolders, i18n( GlobalSettings::self()
+ TQWhatsThis::add( mOnlyShowGroupwareFolders, i18n( GlobalSettings::self()
->showOnlyGroupwareFoldersForGroupwareAccountItem()->whatsThis().utf8() ) );
- connect( mOnlyShowGroupwareFolders, SIGNAL( toggled( bool ) ),
- this, SLOT( slotEmitChanged() ) );
+ connect( mOnlyShowGroupwareFolders, TQT_SIGNAL( toggled( bool ) ),
+ this, TQT_SLOT( slotEmitChanged() ) );
- mSyncImmediately = new QCheckBox( i18n( "Synchronize groupware changes immediately" ), mBox );
- QToolTip::add( mSyncImmediately,
+ mSyncImmediately = new TQCheckBox( i18n( "Synchronize groupware changes immediately" ), mBox );
+ TQToolTip::add( mSyncImmediately,
i18n( "Synchronize groupware changes in disconnected IMAP folders immediately when being online." ) );
- connect( mSyncImmediately, SIGNAL(toggled(bool)), SLOT(slotEmitChanged()) );
+ connect( mSyncImmediately, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotEmitChanged()) );
grid->addMultiCellWidget( mSyncImmediately, 4, 4, 0, 1 );
- mDeleteInvitations = new QCheckBox(
+ mDeleteInvitations = new TQCheckBox(
i18n( GlobalSettings::self()->deleteInvitationEmailsAfterSendingReplyItem()->label().utf8() ), mBox );
- QWhatsThis::add( mDeleteInvitations, i18n( GlobalSettings::self()
+ TQWhatsThis::add( mDeleteInvitations, i18n( GlobalSettings::self()
->deleteInvitationEmailsAfterSendingReplyItem()->whatsThis().utf8() ) );
- connect( mDeleteInvitations, SIGNAL(toggled(bool)), SLOT(slotEmitChanged()) );
+ connect( mDeleteInvitations, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotEmitChanged()) );
grid->addMultiCellWidget( mDeleteInvitations, 5, 5, 0, 1 );
// Groupware functionality compatibility setup
- b1 = new QVGroupBox( i18n("Groupware Compatibility && Legacy Options"), this );
+ b1 = new TQVGroupBox( i18n("Groupware Compatibility && Legacy Options"), this );
- gBox = new QVBox( b1 );
+ gBox = new TQVBox( b1 );
#if 0
// Currently believed to be disused.
- mEnableGwCB = new QCheckBox( i18n("&Enable groupware functionality"), b1 );
+ mEnableGwCB = new TQCheckBox( i18n("&Enable groupware functionality"), b1 );
gBox->setSpacing( KDialog::spacingHint() );
- connect( mEnableGwCB, SIGNAL( toggled(bool) ),
- gBox, SLOT( setEnabled(bool) ) );
- connect( mEnableGwCB, SIGNAL( stateChanged( int ) ),
- this, SLOT( slotEmitChanged( void ) ) );
+ connect( mEnableGwCB, TQT_SIGNAL( toggled(bool) ),
+ gBox, TQT_SLOT( setEnabled(bool) ) );
+ connect( mEnableGwCB, TQT_SIGNAL( stateChanged( int ) ),
+ this, TQT_SLOT( slotEmitChanged( void ) ) );
#endif
mEnableGwCB = 0;
- mLegacyMangleFromTo = new QCheckBox( i18n( "Mangle From:/To: headers in replies to invitations" ), gBox );
- QToolTip::add( mLegacyMangleFromTo, i18n( "Turn this option on in order to make Outlook(tm) understand your answers to invitation replies" ) );
- QWhatsThis::add( mLegacyMangleFromTo, i18n( GlobalSettings::self()->
+ mLegacyMangleFromTo = new TQCheckBox( i18n( "Mangle From:/To: headers in replies to invitations" ), gBox );
+ TQToolTip::add( mLegacyMangleFromTo, i18n( "Turn this option on in order to make Outlook(tm) understand your answers to invitation replies" ) );
+ TQWhatsThis::add( mLegacyMangleFromTo, i18n( GlobalSettings::self()->
legacyMangleFromToHeadersItem()->whatsThis().utf8() ) );
- connect( mLegacyMangleFromTo, SIGNAL( stateChanged( int ) ),
- this, SLOT( slotEmitChanged( void ) ) );
- mLegacyBodyInvites = new QCheckBox( i18n( "Send invitations in the mail body" ), gBox );
- QToolTip::add( mLegacyBodyInvites, i18n( "Turn this option on in order to make Outlook(tm) understand your answers to invitations" ) );
- QWhatsThis::add( mLegacyMangleFromTo, i18n( GlobalSettings::self()->
+ connect( mLegacyMangleFromTo, TQT_SIGNAL( stateChanged( int ) ),
+ this, TQT_SLOT( slotEmitChanged( void ) ) );
+ mLegacyBodyInvites = new TQCheckBox( i18n( "Send invitations in the mail body" ), gBox );
+ TQToolTip::add( mLegacyBodyInvites, i18n( "Turn this option on in order to make Outlook(tm) understand your answers to invitations" ) );
+ TQWhatsThis::add( mLegacyMangleFromTo, i18n( GlobalSettings::self()->
legacyBodyInvitesItem()->whatsThis().utf8() ) );
- connect( mLegacyBodyInvites, SIGNAL( toggled( bool ) ),
- this, SLOT( slotLegacyBodyInvitesToggled( bool ) ) );
- connect( mLegacyBodyInvites, SIGNAL( stateChanged( int ) ),
- this, SLOT( slotEmitChanged( void ) ) );
-
- mExchangeCompatibleInvitations = new QCheckBox( i18n( "Exchange compatible invitation naming" ), gBox );
- QToolTip::add( mExchangeCompatibleInvitations, i18n( "Microsoft Outlook, when used in combination with a Microsoft Exchange server, has a problem understanding standards-compliant groupware e-mail. Turn this option on to send groupware invitations in a way that Microsoft Exchange understands." ) );
- QWhatsThis::add( mExchangeCompatibleInvitations, i18n( GlobalSettings::self()->
+ connect( mLegacyBodyInvites, TQT_SIGNAL( toggled( bool ) ),
+ this, TQT_SLOT( slotLegacyBodyInvitesToggled( bool ) ) );
+ connect( mLegacyBodyInvites, TQT_SIGNAL( stateChanged( int ) ),
+ this, TQT_SLOT( slotEmitChanged( void ) ) );
+
+ mExchangeCompatibleInvitations = new TQCheckBox( i18n( "Exchange compatible invitation naming" ), gBox );
+ TQToolTip::add( mExchangeCompatibleInvitations, i18n( "Microsoft Outlook, when used in combination with a Microsoft Exchange server, has a problem understanding standards-compliant groupware e-mail. Turn this option on to send groupware invitations in a way that Microsoft Exchange understands." ) );
+ TQWhatsThis::add( mExchangeCompatibleInvitations, i18n( GlobalSettings::self()->
exchangeCompatibleInvitationsItem()->whatsThis().utf8() ) );
- connect( mExchangeCompatibleInvitations, SIGNAL( stateChanged( int ) ),
- this, SLOT( slotEmitChanged( void ) ) );
+ connect( mExchangeCompatibleInvitations, TQT_SIGNAL( stateChanged( int ) ),
+ this, TQT_SLOT( slotEmitChanged( void ) ) );
- mAutomaticSending = new QCheckBox( i18n( "Automatic invitation sending" ), gBox );
- QToolTip::add( mAutomaticSending, i18n( "When this is on, the user will not see the mail composer window. Invitation mails are sent automatically" ) );
- QWhatsThis::add( mAutomaticSending, i18n( GlobalSettings::self()->
+ mAutomaticSending = new TQCheckBox( i18n( "Automatic invitation sending" ), gBox );
+ TQToolTip::add( mAutomaticSending, i18n( "When this is on, the user will not see the mail composer window. Invitation mails are sent automatically" ) );
+ TQWhatsThis::add( mAutomaticSending, i18n( GlobalSettings::self()->
automaticSendingItem()->whatsThis().utf8() ) );
- connect( mAutomaticSending, SIGNAL( stateChanged( int ) ),
- this, SLOT( slotEmitChanged( void ) ) );
+ connect( mAutomaticSending, TQT_SIGNAL( stateChanged( int ) ),
+ this, TQT_SLOT( slotEmitChanged( void ) ) );
// Open space padding at the end
- new QLabel( this );
+ new TQLabel( this );
}
void MiscPageGroupwareTab::slotLegacyBodyInvitesToggled( bool on )
{
if ( on ) {
- QString txt = i18n( "<qt>Invitations are normally sent as attachments to "
+ TQString txt = i18n( "<qt>Invitations are normally sent as attachments to "
"a mail. This switch changes the invitation mails to "
"be sent in the text of the mail instead; this is "
"necessary to send invitations and replies to "
@@ -4875,7 +4875,7 @@ void MiscPageGroupwareTab::slotLegacyBodyInvitesToggled( bool on )
"resulting messages look very odd.<br>People that have email "
"programs that do understand invitations will still "
"be able to work with this.</qt>" );
- KMessageBox::information( this, txt, QString::null,
+ KMessageBox::information( this, txt, TQString::null,
"LegacyBodyInvitesWarning" );
}
// Invitations in the body are autosent in any case (no point in editing raw ICAL)
@@ -4914,7 +4914,7 @@ void MiscPage::GroupwareTab::doLoadFromGlobalSettings() {
mSyncImmediately->setChecked( GlobalSettings::self()->immediatlySyncDIMAPOnGroupwareChanges() );
mDeleteInvitations->setChecked( GlobalSettings::self()->deleteInvitationEmailsAfterSendingReply() );
- QString folderId( GlobalSettings::self()->theIMAPResourceFolderParent() );
+ TQString folderId( GlobalSettings::self()->theIMAPResourceFolderParent() );
if( !folderId.isNull() && kmkernel->findFolderById( folderId ) ) {
mFolderCombo->setFolder( folderId );
} else {
@@ -4980,7 +4980,7 @@ void MiscPage::GroupwareTab::save() {
// If there is a leftover folder in the foldercombo, getFolder can
// return 0. In that case we really don't have it enabled
- QString folderId;
+ TQString folderId;
if ( format == 0 ) {
KMFolder* folder = mFolderCombo->folder();
if ( folder )
@@ -5007,7 +5007,7 @@ void MiscPage::GroupwareTab::save() {
// Inbox folder of the selected account
KMAccount* acct = mAccountCombo->currentAccount();
if ( acct ) {
- folderId = QString( ".%1.directory/INBOX" ).arg( acct->id() );
+ folderId = TQString( ".%1.directory/INBOX" ).arg( acct->id() );
GlobalSettings::self()->setTheIMAPResourceAccount( acct->id() );
}
}
@@ -5039,15 +5039,15 @@ void MiscPage::GroupwareTab::slotStorageFormatChanged( int format )
// * *
// *************************************************************
AccountUpdater::AccountUpdater(ImapAccountBase *account)
- : QObject()
+ : TQObject()
{
mAccount = account;
}
void AccountUpdater::update()
{
- connect( mAccount, SIGNAL( connectionResult(int, const QString&) ),
- this, SLOT( namespacesFetched() ) );
+ connect( mAccount, TQT_SIGNAL( connectionResult(int, const TQString&) ),
+ this, TQT_SLOT( namespacesFetched() ) );
mAccount->makeConnection();
}
diff --git a/kmail/configuredialog.h b/kmail/configuredialog.h
index 408a9d3f0..f9c32731c 100644
--- a/kmail/configuredialog.h
+++ b/kmail/configuredialog.h
@@ -22,7 +22,7 @@
#ifndef _CONFIGURE_DIALOG_H_
#define _CONFIGURE_DIALOG_H_
-#include <qguardedptr.h>
+#include <tqguardedptr.h>
#include <kcmultidialog.h>
class KConfig;
@@ -36,7 +36,7 @@ class ConfigureDialog : public KCMultiDialog
Q_OBJECT
public:
- ConfigureDialog( QWidget *parent=0, const char *name=0, bool modal=true );
+ ConfigureDialog( TQWidget *parent=0, const char *name=0, bool modal=true );
~ConfigureDialog();
signals:
@@ -49,7 +49,7 @@ signals:
*/
void installProfile( KConfig *profile );
protected:
- void hideEvent( QHideEvent *i );
+ void hideEvent( TQHideEvent *i );
protected slots:
/** @reimplemented
* Saves the GlobalSettings stuff before passing on to KCMultiDialog.
@@ -67,7 +67,7 @@ protected slots:
void slotUser2();
private:
- QGuardedPtr<ProfileDialog> mProfileDialog;
+ TQGuardedPtr<ProfileDialog> mProfileDialog;
};
/**
@@ -75,7 +75,7 @@ private:
* This has to be done a-synchronically due to the nature of the account, so this object
* takes care of that.
*/
-class AccountUpdater : public QObject {
+class AccountUpdater : public TQObject {
Q_OBJECT
public:
AccountUpdater(KMail::ImapAccountBase *account);
diff --git a/kmail/configuredialog_p.cpp b/kmail/configuredialog_p.cpp
index 2b716b2d8..5cc86ccc2 100644
--- a/kmail/configuredialog_p.cpp
+++ b/kmail/configuredialog_p.cpp
@@ -26,61 +26,61 @@
#include <kdebug.h>
// Qt headers:
-#include <qheader.h>
-#include <qtabwidget.h>
-#include <qradiobutton.h>
-#include <qbuttongroup.h>
-#include <qlabel.h>
-#include <qlayout.h>
+#include <tqheader.h>
+#include <tqtabwidget.h>
+#include <tqradiobutton.h>
+#include <tqbuttongroup.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
// Other headers:
#include <assert.h>
-NewIdentityDialog::NewIdentityDialog( const QStringList & identities,
- QWidget *parent, const char *name,
+NewIdentityDialog::NewIdentityDialog( const TQStringList & identities,
+ TQWidget *parent, const char *name,
bool modal )
: KDialogBase( parent, name, modal, i18n("New Identity"),
Ok|Cancel|Help, Ok, true )
{
- setHelp( QString::fromLatin1("configure-identity-newidentitydialog") );
- QWidget * page = makeMainWidget();
- QVBoxLayout * vlay = new QVBoxLayout( page, 0, spacingHint() );
+ setHelp( TQString::fromLatin1("configure-identity-newidentitydialog") );
+ TQWidget * page = makeMainWidget();
+ TQVBoxLayout * vlay = new TQVBoxLayout( page, 0, spacingHint() );
// row 0: line edit with label
- QHBoxLayout * hlay = new QHBoxLayout( vlay ); // inherits spacing
+ TQHBoxLayout * hlay = new TQHBoxLayout( vlay ); // inherits spacing
mLineEdit = new KLineEdit( page );
mLineEdit->setFocus();
- hlay->addWidget( new QLabel( mLineEdit, i18n("&New identity:"), page ) );
+ hlay->addWidget( new TQLabel( mLineEdit, i18n("&New identity:"), page ) );
hlay->addWidget( mLineEdit, 1 );
- connect( mLineEdit, SIGNAL(textChanged(const QString&)),
- this, SLOT(slotEnableOK(const QString&)) );
+ connect( mLineEdit, TQT_SIGNAL(textChanged(const TQString&)),
+ this, TQT_SLOT(slotEnableOK(const TQString&)) );
- mButtonGroup = new QButtonGroup( page );
+ mButtonGroup = new TQButtonGroup( page );
mButtonGroup->hide();
// row 1: radio button
- QRadioButton *radio = new QRadioButton( i18n("&With empty fields"), page );
+ TQRadioButton *radio = new TQRadioButton( i18n("&With empty fields"), page );
radio->setChecked( true );
mButtonGroup->insert( radio, Empty );
vlay->addWidget( radio );
// row 2: radio button
- radio = new QRadioButton( i18n("&Use Control Center settings"), page );
+ radio = new TQRadioButton( i18n("&Use Control Center settings"), page );
mButtonGroup->insert( radio, ControlCenter );
vlay->addWidget( radio );
// row 3: radio button
- radio = new QRadioButton( i18n("&Duplicate existing identity"), page );
+ radio = new TQRadioButton( i18n("&Duplicate existing identity"), page );
mButtonGroup->insert( radio, ExistingEntry );
vlay->addWidget( radio );
// row 4: combobox with existing identities and label
- hlay = new QHBoxLayout( vlay ); // inherits spacing
- mComboBox = new QComboBox( false, page );
+ hlay = new TQHBoxLayout( vlay ); // inherits spacing
+ mComboBox = new TQComboBox( false, page );
mComboBox->insertStringList( identities );
mComboBox->setEnabled( false );
- QLabel *label = new QLabel( mComboBox, i18n("&Existing identities:"), page );
+ TQLabel *label = new TQLabel( mComboBox, i18n("&Existing identities:"), page );
label->setEnabled( false );
hlay->addWidget( label );
hlay->addWidget( mComboBox, 1 );
@@ -89,10 +89,10 @@ NewIdentityDialog::NewIdentityDialog( const QStringList & identities,
// enable/disable combobox and label depending on the third radio
// button's state:
- connect( radio, SIGNAL(toggled(bool)),
- label, SLOT(setEnabled(bool)) );
- connect( radio, SIGNAL(toggled(bool)),
- mComboBox, SLOT(setEnabled(bool)) );
+ connect( radio, TQT_SIGNAL(toggled(bool)),
+ label, TQT_SLOT(setEnabled(bool)) );
+ connect( radio, TQT_SIGNAL(toggled(bool)),
+ mComboBox, TQT_SLOT(setEnabled(bool)) );
enableButtonOK( false ); // since line edit is empty
}
@@ -105,9 +105,9 @@ NewIdentityDialog::DuplicateMode NewIdentityDialog::duplicateMode() const {
return static_cast<DuplicateMode>( id );
}
-void NewIdentityDialog::slotEnableOK( const QString & proposedIdentityName ) {
+void NewIdentityDialog::slotEnableOK( const TQString & proposedIdentityName ) {
// OK button is disabled if
- QString name = proposedIdentityName.stripWhiteSpace();
+ TQString name = proposedIdentityName.stripWhiteSpace();
// name isn't empty
if ( name.isEmpty() ) {
enableButtonOK( false );
@@ -122,7 +122,7 @@ void NewIdentityDialog::slotEnableOK( const QString & proposedIdentityName ) {
enableButtonOK( true );
}
-ListView::ListView( QWidget *parent, const char *name,
+ListView::ListView( TQWidget *parent, const char *name,
int visibleItem )
: KListView( parent, name )
{
@@ -130,14 +130,14 @@ ListView::ListView( QWidget *parent, const char *name,
}
-void ListView::resizeEvent( QResizeEvent *e )
+void ListView::resizeEvent( TQResizeEvent *e )
{
KListView::resizeEvent(e);
resizeColums();
}
-void ListView::showEvent( QShowEvent *e )
+void ListView::showEvent( TQShowEvent *e )
{
KListView::showEvent(e);
resizeColums();
@@ -169,16 +169,16 @@ void ListView::setVisibleItem( int visibleItem, bool updateSize )
mVisibleItem = QMAX( 1, visibleItem );
if( updateSize == true )
{
- QSize s = sizeHint();
+ TQSize s = sizeHint();
setMinimumSize( s.width() + verticalScrollBar()->sizeHint().width() +
lineWidth() * 2, s.height() );
}
}
-QSize ListView::sizeHint() const
+TQSize ListView::sizeHint() const
{
- QSize s = QListView::sizeHint();
+ TQSize s = TQListView::sizeHint();
int h = fontMetrics().height() + 2*itemMargin();
if( h % 2 > 0 ) { h++; }
@@ -188,45 +188,45 @@ QSize ListView::sizeHint() const
}
-static QString flagPng = QString::fromLatin1("/flag.png");
+static TQString flagPng = TQString::fromLatin1("/flag.png");
NewLanguageDialog::NewLanguageDialog( LanguageItemList & suppressedLangs,
- QWidget *parent, const char *name,
+ TQWidget *parent, const char *name,
bool modal )
: KDialogBase( parent, name, modal, i18n("New Language"), Ok|Cancel, Ok, true )
{
// layout the page (a combobox with label):
- QWidget *page = makeMainWidget();
- QHBoxLayout *hlay = new QHBoxLayout( page, 0, spacingHint() );
- mComboBox = new QComboBox( false, page );
- hlay->addWidget( new QLabel( mComboBox, i18n("Choose &language:"), page ) );
+ TQWidget *page = makeMainWidget();
+ TQHBoxLayout *hlay = new TQHBoxLayout( page, 0, spacingHint() );
+ mComboBox = new TQComboBox( false, page );
+ hlay->addWidget( new TQLabel( mComboBox, i18n("Choose &language:"), page ) );
hlay->addWidget( mComboBox, 1 );
- QStringList pathList = KGlobal::dirs()->findAllResources( "locale",
- QString::fromLatin1("*/entry.desktop") );
+ TQStringList pathList = KGlobal::dirs()->findAllResources( "locale",
+ TQString::fromLatin1("*/entry.desktop") );
// extract a list of language tags that should not be included:
- QStringList suppressedAcronyms;
+ TQStringList suppressedAcronyms;
for ( LanguageItemList::Iterator lit = suppressedLangs.begin();
lit != suppressedLangs.end(); ++lit )
suppressedAcronyms << (*lit).mLanguage;
// populate the combo box:
- for ( QStringList::ConstIterator it = pathList.begin();
+ for ( TQStringList::ConstIterator it = pathList.begin();
it != pathList.end(); ++it )
{
KSimpleConfig entry( *it );
entry.setGroup( "KCM Locale" );
// full name:
- QString name = entry.readEntry( "Name" );
+ TQString name = entry.readEntry( "Name" );
// {2,3}-letter abbreviation:
// we extract it from the path: "/prefix/de/entry.desktop" -> "de"
- QString acronym = (*it).section( '/', -2, -2 );
+ TQString acronym = (*it).section( '/', -2, -2 );
if ( suppressedAcronyms.find( acronym ) == suppressedAcronyms.end() ) {
// not found:
- QString displayname = QString::fromLatin1("%1 (%2)")
+ TQString displayname = TQString::fromLatin1("%1 (%2)")
.arg( name ).arg( acronym );
- QPixmap flag( locate("locale", acronym + flagPng ) );
+ TQPixmap flag( locate("locale", acronym + flagPng ) );
mComboBox->insertItem( flag, displayname );
}
}
@@ -236,40 +236,40 @@ NewLanguageDialog::NewLanguageDialog( LanguageItemList & suppressedLangs,
} else mComboBox->listBox()->sort();
}
-QString NewLanguageDialog::language() const
+TQString NewLanguageDialog::language() const
{
- QString s = mComboBox->currentText();
+ TQString s = mComboBox->currentText();
int i = s.findRev( '(' );
return s.mid( i + 1, s.length() - i - 2 );
}
-LanguageComboBox::LanguageComboBox( bool rw, QWidget *parent, const char *name )
- : QComboBox( rw, parent, name )
+LanguageComboBox::LanguageComboBox( bool rw, TQWidget *parent, const char *name )
+ : TQComboBox( rw, parent, name )
{
}
-int LanguageComboBox::insertLanguage( const QString & language )
+int LanguageComboBox::insertLanguage( const TQString & language )
{
- static QString entryDesktop = QString::fromLatin1("/entry.desktop");
+ static TQString entryDesktop = TQString::fromLatin1("/entry.desktop");
KSimpleConfig entry( locate("locale", language + entryDesktop) );
entry.setGroup( "KCM Locale" );
- QString name = entry.readEntry( "Name" );
- QString output = QString::fromLatin1("%1 (%2)").arg( name ).arg( language );
- insertItem( QPixmap( locate("locale", language + flagPng ) ), output );
+ TQString name = entry.readEntry( "Name" );
+ TQString output = TQString::fromLatin1("%1 (%2)").arg( name ).arg( language );
+ insertItem( TQPixmap( locate("locale", language + flagPng ) ), output );
return listBox()->index( listBox()->findItem(output) );
}
-QString LanguageComboBox::language() const
+TQString LanguageComboBox::language() const
{
- QString s = currentText();
+ TQString s = currentText();
int i = s.findRev( '(' );
return s.mid( i + 1, s.length() - i - 2 );
}
-void LanguageComboBox::setLanguage( const QString & language )
+void LanguageComboBox::setLanguage( const TQString & language )
{
- QString parenthizedLanguage = QString::fromLatin1("(%1)").arg( language );
+ TQString parenthizedLanguage = TQString::fromLatin1("(%1)").arg( language );
for (int i = 0; i < count(); i++)
// ### FIXME: use .endWith():
if ( text(i).find( parenthizedLanguage ) >= 0 ) {
@@ -284,12 +284,12 @@ void LanguageComboBox::setLanguage( const QString & language )
//
//
-ProfileDialog::ProfileDialog( QWidget * parent, const char * name, bool modal )
+ProfileDialog::ProfileDialog( TQWidget * parent, const char * name, bool modal )
: KDialogBase( parent, name, modal, i18n("Load Profile"), Ok|Cancel, Ok, true )
{
// tmp. vars:
- QWidget * page = makeMainWidget();
- QVBoxLayout * vlay = new QVBoxLayout( page, 0, spacingHint() );
+ TQWidget * page = makeMainWidget();
+ TQVBoxLayout * vlay = new TQVBoxLayout( page, 0, spacingHint() );
mListView = new KListView( page, "mListView" );
mListView->addColumn( i18n("Available Profiles") );
@@ -298,19 +298,19 @@ ProfileDialog::ProfileDialog( QWidget * parent, const char * name, bool modal )
mListView->setAllColumnsShowFocus( true );
mListView->setSorting( -1 );
- vlay->addWidget( new QLabel( mListView,
+ vlay->addWidget( new TQLabel( mListView,
i18n("&Select a profile and click 'OK' to "
"load its settings:"), page ) );
vlay->addWidget( mListView, 1 );
setup();
- connect( mListView, SIGNAL(selectionChanged()),
- SLOT(slotSelectionChanged()) );
- connect( mListView, SIGNAL(doubleClicked ( QListViewItem *, const QPoint &, int ) ),
- SLOT(slotOk()) );
+ connect( mListView, TQT_SIGNAL(selectionChanged()),
+ TQT_SLOT(slotSelectionChanged()) );
+ connect( mListView, TQT_SIGNAL(doubleClicked ( TQListViewItem *, const TQPoint &, int ) ),
+ TQT_SLOT(slotOk()) );
- connect( this, SIGNAL(finished()), SLOT(delayedDestruct()) );
+ connect( this, TQT_SIGNAL(finished()), TQT_SLOT(delayedDestruct()) );
enableButtonOK( false );
}
@@ -323,31 +323,31 @@ void ProfileDialog::slotSelectionChanged()
void ProfileDialog::setup() {
mListView->clear();
// find all profiles (config files named "profile-xyz-rc"):
- const QString profileFilenameFilter = QString::fromLatin1("kmail/profile-*-rc");
+ const TQString profileFilenameFilter = TQString::fromLatin1("kmail/profile-*-rc");
mProfileList = KGlobal::dirs()->findAllResources( "data", profileFilenameFilter );
kdDebug(5006) << "Profile manager: found " << mProfileList.count()
<< " profiles:" << endl;
// build the list and populate the list view:
- QListViewItem * listItem = 0;
- for ( QStringList::const_iterator it = mProfileList.begin() ;
+ TQListViewItem * listItem = 0;
+ for ( TQStringList::const_iterator it = mProfileList.begin() ;
it != mProfileList.end() ; ++it ) {
KConfig profile( *it, true /* read-only */, false /* no KDE global */ );
profile.setGroup("KMail Profile");
- QString name = profile.readEntry( "Name" );
+ TQString name = profile.readEntry( "Name" );
if ( name.isEmpty() ) {
kdWarning(5006) << "File \"" << (*it)
<< "\" doesn't provide a profile name!" << endl;
name = i18n("Missing profile name placeholder","Unnamed");
}
- QString desc = profile.readEntry( "Comment" );
+ TQString desc = profile.readEntry( "Comment" );
if ( desc.isEmpty() ) {
kdWarning(5006) << "File \"" << (*it)
<< "\" doesn't provide a description!" << endl;
desc = i18n("Missing profile description placeholder","Not available");
}
- listItem = new QListViewItem( mListView, listItem, name, desc );
+ listItem = new TQListViewItem( mListView, listItem, name, desc );
}
}
@@ -364,19 +364,19 @@ void ProfileDialog::slotOk() {
}
-ConfigModuleWithTabs::ConfigModuleWithTabs( QWidget * parent,
+ConfigModuleWithTabs::ConfigModuleWithTabs( TQWidget * parent,
const char * name )
: ConfigModule( parent, name )
{
- QVBoxLayout *vlay = new QVBoxLayout( this, 0, KDialog::spacingHint() );
- mTabWidget = new QTabWidget( this );
+ TQVBoxLayout *vlay = new TQVBoxLayout( this, 0, KDialog::spacingHint() );
+ mTabWidget = new TQTabWidget( this );
vlay->addWidget( mTabWidget );
}
-void ConfigModuleWithTabs::addTab( ConfigModuleTab* tab, const QString & title ) {
+void ConfigModuleWithTabs::addTab( ConfigModuleTab* tab, const TQString & title ) {
mTabWidget->addTab( tab, title );
- connect( tab, SIGNAL(changed( bool )),
- this, SIGNAL(changed( bool )) );
+ connect( tab, TQT_SIGNAL(changed( bool )),
+ this, TQT_SIGNAL(changed( bool )) );
}
void ConfigModuleWithTabs::load() {
diff --git a/kmail/configuredialog_p.h b/kmail/configuredialog_p.h
index 79c2a885b..4a3321094 100644
--- a/kmail/configuredialog_p.h
+++ b/kmail/configuredialog_p.h
@@ -6,12 +6,12 @@
#define _CONFIGURE_DIALOG_PRIVATE_H_
#include <klineedit.h>
-#include <qcombobox.h>
-#include <qguardedptr.h>
-#include <qptrlist.h>
-#include <qstring.h>
-#include <qvaluelist.h>
-#include <qstringlist.h>
+#include <tqcombobox.h>
+#include <tqguardedptr.h>
+#include <tqptrlist.h>
+#include <tqstring.h>
+#include <tqvaluelist.h>
+#include <tqstringlist.h>
#include <dcopobject.h>
#include <kdialogbase.h>
@@ -49,7 +49,7 @@ class TemplatesConfiguration;
class CustomTemplates;
class QGroupBox;
class QVGroupBox;
-#include <qdict.h>
+#include <tqdict.h>
class QLineEdit;
class KMMsgTagDesc;
class KListBox;
@@ -81,20 +81,20 @@ class NewIdentityDialog : public KDialogBase
public:
enum DuplicateMode { Empty, ControlCenter, ExistingEntry };
- NewIdentityDialog( const QStringList & identities,
- QWidget *parent=0, const char *name=0, bool modal=true );
+ NewIdentityDialog( const TQStringList & identities,
+ TQWidget *parent=0, const char *name=0, bool modal=true );
- QString identityName() const { return mLineEdit->text(); }
- QString duplicateIdentity() const { return mComboBox->currentText(); }
+ TQString identityName() const { return mLineEdit->text(); }
+ TQString duplicateIdentity() const { return mComboBox->currentText(); }
DuplicateMode duplicateMode() const;
protected slots:
- virtual void slotEnableOK( const QString & );
+ virtual void slotEnableOK( const TQString & );
private:
- QLineEdit *mLineEdit;
- QComboBox *mComboBox;
- QButtonGroup *mButtonGroup;
+ TQLineEdit *mLineEdit;
+ TQComboBox *mComboBox;
+ TQButtonGroup *mButtonGroup;
};
@@ -107,29 +107,29 @@ private:
struct LanguageItem
{
LanguageItem() {}
- LanguageItem( const QString & language, const QString & reply=QString::null,
- const QString & replyAll=QString::null,
- const QString & forward=QString::null,
- const QString & indentPrefix=QString::null ) :
+ LanguageItem( const TQString & language, const TQString & reply=TQString::null,
+ const TQString & replyAll=TQString::null,
+ const TQString & forward=TQString::null,
+ const TQString & indentPrefix=TQString::null ) :
mLanguage( language ), mReply( reply ), mReplyAll( replyAll ),
mForward( forward ), mIndentPrefix( indentPrefix ) {}
- QString mLanguage, mReply, mReplyAll, mForward, mIndentPrefix;
+ TQString mLanguage, mReply, mReplyAll, mForward, mIndentPrefix;
};
-typedef QValueList<LanguageItem> LanguageItemList;
+typedef TQValueList<LanguageItem> LanguageItemList;
class NewLanguageDialog : public KDialogBase
{
Q_OBJECT
public:
- NewLanguageDialog( LanguageItemList & suppressedLangs, QWidget *parent=0,
+ NewLanguageDialog( LanguageItemList & suppressedLangs, TQWidget *parent=0,
const char *name=0, bool modal=true );
- QString language() const;
+ TQString language() const;
private:
- QComboBox *mComboBox;
+ TQComboBox *mComboBox;
};
@@ -138,10 +138,10 @@ class LanguageComboBox : public QComboBox
Q_OBJECT
public:
- LanguageComboBox( bool rw, QWidget *parent=0, const char *name=0 );
- int insertLanguage( const QString & language );
- QString language() const;
- void setLanguage( const QString & language );
+ LanguageComboBox( bool rw, TQWidget *parent=0, const char *name=0 );
+ int insertLanguage( const TQString & language );
+ TQString language() const;
+ void setLanguage( const TQString & language );
};
//
@@ -153,7 +153,7 @@ class LanguageComboBox : public QComboBox
class ProfileDialog : public KDialogBase {
Q_OBJECT
public:
- ProfileDialog( QWidget * parent=0, const char * name=0, bool modal=false );
+ ProfileDialog( TQWidget * parent=0, const char * name=0, bool modal=false );
signals:
void profileSelected( KConfig * profile );
@@ -167,14 +167,14 @@ private:
private:
KListView *mListView;
- QStringList mProfileList;
+ TQStringList mProfileList;
};
#include <kdialog.h>
class ConfigModule : public KCModule {
Q_OBJECT
public:
- ConfigModule( QWidget * parent=0, const char * name=0 )
+ ConfigModule( TQWidget * parent=0, const char * name=0 )
: KCModule ( parent, name )
{}
~ConfigModule() {}
@@ -184,7 +184,7 @@ public:
virtual void defaults() {}
/** Should return the help anchor for this page or tab */
- virtual QString helpAnchor() const = 0;
+ virtual TQString helpAnchor() const = 0;
signals:
/** Emitted when the installation of a profile is
@@ -198,11 +198,11 @@ signals:
// Individual tab of a ConfigModuleWithTabs
-class ConfigModuleTab : public QWidget {
+class ConfigModuleTab : public TQWidget {
Q_OBJECT
public:
- ConfigModuleTab( QWidget *parent=0, const char* name=0 )
- :QWidget( parent, name )
+ ConfigModuleTab( TQWidget *parent=0, const char* name=0 )
+ :TQWidget( parent, name )
{}
~ConfigModuleTab() {}
void load();
@@ -235,7 +235,7 @@ private:
class ConfigModuleWithTabs : public ConfigModule {
Q_OBJECT
public:
- ConfigModuleWithTabs( QWidget * parent=0, const char * name=0 );
+ ConfigModuleWithTabs( TQWidget * parent=0, const char * name=0 );
~ConfigModuleWithTabs() {}
// don't reimplement any of those methods
@@ -245,10 +245,10 @@ public:
virtual void installProfile( KConfig * profile );
protected:
- void addTab( ConfigModuleTab* tab, const QString & title );
+ void addTab( ConfigModuleTab* tab, const TQString & title );
private:
- QTabWidget *mTabWidget;
+ TQTabWidget *mTabWidget;
};
@@ -262,16 +262,16 @@ private:
class KDE_EXPORT IdentityPage : public ConfigModule {
Q_OBJECT
public:
- IdentityPage( QWidget * parent=0, const char * name=0 );
+ IdentityPage( TQWidget * parent=0, const char * name=0 );
~IdentityPage() {}
- QString helpAnchor() const;
+ TQString helpAnchor() const;
void load();
void save();
public slots:
- void slotUpdateTransportCombo( const QStringList & );
+ void slotUpdateTransportCombo( const TQStringList & );
private slots:
void slotNewIdentity();
@@ -282,8 +282,8 @@ private slots:
void slotRenameIdentity();
/** connected to @p mIdentityList's renamed() signal. Validates the
new name and sets it in the KPIM::IdentityManager */
- void slotRenameIdentity( QListViewItem *, const QString &, int );
- void slotContextMenu( KListView*, QListViewItem *, const QPoint & );
+ void slotRenameIdentity( TQListViewItem *, const TQString &, int );
+ void slotContextMenu( KListView*, TQListViewItem *, const TQPoint & );
void slotSetAsDefault();
void slotIdentitySelectionChanged();
@@ -295,10 +295,10 @@ private: // data members
int mOldNumberOfIdentities;
KMail::IdentityListView * mIdentityList;
- QPushButton * mModifyButton;
- QPushButton * mRenameButton;
- QPushButton * mRemoveButton;
- QPushButton * mSetAsDefaultButton;
+ TQPushButton * mModifyButton;
+ TQPushButton * mRenameButton;
+ TQPushButton * mRemoveButton;
+ TQPushButton * mSetAsDefaultButton;
};
@@ -312,12 +312,12 @@ private: // data members
class AccountsPageSendingTab : public ConfigModuleTab {
Q_OBJECT
public:
- AccountsPageSendingTab( QWidget * parent=0, const char * name=0 );
- QString helpAnchor() const;
+ AccountsPageSendingTab( TQWidget * parent=0, const char * name=0 );
+ TQString helpAnchor() const;
void save();
signals:
- void transportListChanged( const QStringList & );
+ void transportListChanged( const TQStringList & );
private slots:
void slotTransportSelected();
@@ -333,29 +333,29 @@ private:
private:
ListView *mTransportList;
- QPushButton *mModifyTransportButton;
- QPushButton *mRemoveTransportButton;
- QPushButton *mSetDefaultTransportButton;
- QCheckBox *mConfirmSendCheck;
- QComboBox *mSendOnCheckCombo;
- QComboBox *mSendMethodCombo;
- QComboBox *mMessagePropertyCombo;
- QLineEdit *mDefaultDomainEdit;
-
- QPtrList< KMTransportInfo > mTransportInfoList;
+ TQPushButton *mModifyTransportButton;
+ TQPushButton *mRemoveTransportButton;
+ TQPushButton *mSetDefaultTransportButton;
+ TQCheckBox *mConfirmSendCheck;
+ TQComboBox *mSendOnCheckCombo;
+ TQComboBox *mSendMethodCombo;
+ TQComboBox *mMessagePropertyCombo;
+ TQLineEdit *mDefaultDomainEdit;
+
+ TQPtrList< KMTransportInfo > mTransportInfoList;
};
class AccountsPageReceivingTab : public ConfigModuleTab {
Q_OBJECT
public:
- AccountsPageReceivingTab( QWidget * parent=0, const char * name=0 );
+ AccountsPageReceivingTab( TQWidget * parent=0, const char * name=0 );
~AccountsPageReceivingTab();
- QString helpAnchor() const;
+ TQString helpAnchor() const;
void save();
signals:
- void accountListChanged( const QStringList & );
+ void accountListChanged( const TQStringList & );
private slots:
void slotAccountSelected();
@@ -369,32 +369,32 @@ private:
virtual void doLoadFromGlobalSettings();
virtual void doLoadOther();
//FIXME virtual void doResetToDefaultsOther();
- QStringList occupiedNames();
+ TQStringList occupiedNames();
private:
ListView *mAccountList;
- QPushButton *mModifyAccountButton;
- QPushButton *mRemoveAccountButton;
- QCheckBox *mBeepNewMailCheck;
- QCheckBox *mVerboseNotificationCheck;
- QCheckBox *mCheckmailStartupCheck;
- QPushButton *mOtherNewMailActionsButton;
-
- QValueList< QGuardedPtr<KMAccount> > mAccountsToDelete;
- QValueList< QGuardedPtr<KMAccount> > mNewAccounts;
+ TQPushButton *mModifyAccountButton;
+ TQPushButton *mRemoveAccountButton;
+ TQCheckBox *mBeepNewMailCheck;
+ TQCheckBox *mVerboseNotificationCheck;
+ TQCheckBox *mCheckmailStartupCheck;
+ TQPushButton *mOtherNewMailActionsButton;
+
+ TQValueList< TQGuardedPtr<KMAccount> > mAccountsToDelete;
+ TQValueList< TQGuardedPtr<KMAccount> > mNewAccounts;
struct ModifiedAccountsType {
- QGuardedPtr< KMAccount > oldAccount;
- QGuardedPtr< KMAccount > newAccount;
+ TQGuardedPtr< KMAccount > oldAccount;
+ TQGuardedPtr< KMAccount > newAccount;
};
// ### make this value-based:
- QValueList< ModifiedAccountsType* > mModifiedAccounts;
+ TQValueList< ModifiedAccountsType* > mModifiedAccounts;
};
class KDE_EXPORT AccountsPage : public ConfigModuleWithTabs {
Q_OBJECT
public:
- AccountsPage( QWidget * parent=0, const char * name=0 );
- QString helpAnchor() const;
+ AccountsPage( TQWidget * parent=0, const char * name=0 );
+ TQString helpAnchor() const;
// hrmpf. moc doesn't like nested classes with slots/signals...:
@@ -402,8 +402,8 @@ public:
typedef AccountsPageReceivingTab ReceivingTab;
signals:
- void transportListChanged( const QStringList & );
- void accountListChanged( const QStringList & );
+ void transportListChanged( const TQStringList & );
+ void accountListChanged( const TQStringList & );
private:
SendingTab *mSendingTab;
@@ -420,8 +420,8 @@ private:
class AppearancePageFontsTab : public ConfigModuleTab {
Q_OBJECT
public:
- AppearancePageFontsTab( QWidget * parent=0, const char * name=0 );
- QString helpAnchor() const;
+ AppearancePageFontsTab( TQWidget * parent=0, const char * name=0 );
+ TQString helpAnchor() const;
void save();
void installProfile( KConfig * profile );
@@ -436,19 +436,19 @@ private:
void updateFontSelector();
private:
- QCheckBox *mCustomFontCheck;
- QComboBox *mFontLocationCombo;
+ TQCheckBox *mCustomFontCheck;
+ TQComboBox *mFontLocationCombo;
KFontChooser *mFontChooser;
int mActiveFontIndex;
- QFont mFont[14];
+ TQFont mFont[14];
};
class AppearancePageColorsTab : public ConfigModuleTab {
Q_OBJECT
public:
- AppearancePageColorsTab( QWidget * parent=0, const char * name=0 );
- QString helpAnchor() const;
+ AppearancePageColorsTab( TQWidget * parent=0, const char * name=0 );
+ TQString helpAnchor() const;
void save();
void installProfile( KConfig * profile );
@@ -459,17 +459,17 @@ private:
//FIXME virtual void doResetToDefaultsOther();
private:
- QCheckBox *mCustomColorCheck;
+ TQCheckBox *mCustomColorCheck;
ColorListBox *mColorList;
- QCheckBox *mRecycleColorCheck;
- QSpinBox *mCloseToQuotaThreshold;
+ TQCheckBox *mRecycleColorCheck;
+ TQSpinBox *mCloseToQuotaThreshold;
};
class AppearancePageLayoutTab : public ConfigModuleTab {
Q_OBJECT
public:
- AppearancePageLayoutTab( QWidget * parent=0, const char * name=0 );
- QString helpAnchor() const;
+ AppearancePageLayoutTab( TQWidget * parent=0, const char * name=0 );
+ TQString helpAnchor() const;
void save();
void installProfile( KConfig * profile );
@@ -480,20 +480,20 @@ private:
//FIXME virtual void doResetToDefaultsOther();
private: // data
- QButtonGroup *mFolderListGroup;
- QButtonGroup *mMIMETreeLocationGroup;
- QButtonGroup *mMIMETreeModeGroup;
- QButtonGroup *mReaderWindowModeGroup;
- QCheckBox *mFavoriteFolderViewCB;
- QCheckBox *mFolderQuickSearchCB;
+ TQButtonGroup *mFolderListGroup;
+ TQButtonGroup *mMIMETreeLocationGroup;
+ TQButtonGroup *mMIMETreeModeGroup;
+ TQButtonGroup *mReaderWindowModeGroup;
+ TQCheckBox *mFavoriteFolderViewCB;
+ TQCheckBox *mFolderQuickSearchCB;
};
class AppearancePageHeadersTab : public ConfigModuleTab {
Q_OBJECT
public:
- AppearancePageHeadersTab( QWidget * parent=0, const char * name=0 );
+ AppearancePageHeadersTab( TQWidget * parent=0, const char * name=0 );
- QString helpAnchor() const;
+ TQString helpAnchor() const;
void save();
void installProfile( KConfig * profile );
@@ -502,25 +502,25 @@ private: // methods
//virtual void doLoadFromGlobalSettings();
virtual void doLoadOther();
//FIXME virtual void doResetToDefaultsOther();
- void setDateDisplay( int id, const QString & format );
+ void setDateDisplay( int id, const TQString & format );
private: // data
- QCheckBox *mShowQuickSearch;
- QCheckBox *mMessageSizeCheck;
- QCheckBox *mAttachmentCheck;
- QCheckBox *mNestedMessagesCheck;
- QCheckBox *mCryptoIconsCheck;
- QButtonGroup *mNestingPolicy;
- QButtonGroup *mDateDisplay;
- QLineEdit *mCustomDateFormatEdit;
+ TQCheckBox *mShowQuickSearch;
+ TQCheckBox *mMessageSizeCheck;
+ TQCheckBox *mAttachmentCheck;
+ TQCheckBox *mNestedMessagesCheck;
+ TQCheckBox *mCryptoIconsCheck;
+ TQButtonGroup *mNestingPolicy;
+ TQButtonGroup *mDateDisplay;
+ TQLineEdit *mCustomDateFormatEdit;
};
class AppearancePageReaderTab : public ConfigModuleTab {
Q_OBJECT
public:
- AppearancePageReaderTab( QWidget * parent=0, const char * name=0 );
+ AppearancePageReaderTab( TQWidget * parent=0, const char * name=0 );
- QString helpAnchor() const;
+ TQString helpAnchor() const;
void save();
void installProfile( KConfig * profile );
@@ -533,23 +533,23 @@ private:
void readCurrentOverrideCodec();
private: // data
- QCheckBox *mShowColorbarCheck;
- QCheckBox *mShowSpamStatusCheck;
- QCheckBox *mShowEmoticonsCheck;
- QCheckBox *mShowExpandQuotesMark;
+ TQCheckBox *mShowColorbarCheck;
+ TQCheckBox *mShowSpamStatusCheck;
+ TQCheckBox *mShowEmoticonsCheck;
+ TQCheckBox *mShowExpandQuotesMark;
KIntSpinBox *mCollapseQuoteLevelSpin;
- QCheckBox *mShrinkQuotesCheck;
- QComboBox *mCharsetCombo;
- QComboBox *mOverrideCharsetCombo;
+ TQCheckBox *mShrinkQuotesCheck;
+ TQComboBox *mCharsetCombo;
+ TQComboBox *mOverrideCharsetCombo;
};
class AppearancePageSystemTrayTab : public ConfigModuleTab {
Q_OBJECT
public:
- AppearancePageSystemTrayTab( QWidget * parent=0, const char * name=0 );
+ AppearancePageSystemTrayTab( TQWidget * parent=0, const char * name=0 );
- QString helpAnchor() const;
+ TQString helpAnchor() const;
void save();
void installProfile( KConfig * profile );
@@ -558,16 +558,16 @@ private:
virtual void doLoadFromGlobalSettings();
private: // data
- QCheckBox *mSystemTrayCheck;
- QButtonGroup *mSystemTrayGroup;
+ TQCheckBox *mSystemTrayCheck;
+ TQButtonGroup *mSystemTrayGroup;
};
class KDE_EXPORT AppearancePage : public ConfigModuleWithTabs {
Q_OBJECT
public:
- AppearancePage( QWidget * parent=0, const char * name=0 );
+ AppearancePage( TQWidget * parent=0, const char * name=0 );
- QString helpAnchor() const;
+ TQString helpAnchor() const;
// hrmpf. moc doesn't like nested classes with slots/signals...:
typedef AppearancePageFontsTab FontsTab;
@@ -595,8 +595,8 @@ private:
class ComposerPageGeneralTab : public ConfigModuleTab {
Q_OBJECT
public:
- ComposerPageGeneralTab( QWidget * parent=0, const char * name=0 );
- QString helpAnchor() const;
+ ComposerPageGeneralTab( TQWidget * parent=0, const char * name=0 );
+ TQString helpAnchor() const;
void save();
void installProfile( KConfig * profile );
@@ -608,31 +608,31 @@ private:
virtual void doLoadFromGlobalSettings();
private:
- QCheckBox *mAutoAppSignFileCheck;
- QCheckBox *mTopQuoteCheck;
- QCheckBox *mSmartQuoteCheck;
- QCheckBox *mAutoRequestMDNCheck;
+ TQCheckBox *mAutoAppSignFileCheck;
+ TQCheckBox *mTopQuoteCheck;
+ TQCheckBox *mSmartQuoteCheck;
+ TQCheckBox *mAutoRequestMDNCheck;
QCheckBox *mShowRecentAddressesInComposer;
- QCheckBox *mWordWrapCheck;
+ TQCheckBox *mWordWrapCheck;
KIntSpinBox *mWrapColumnSpin;
KIntSpinBox *mAutoSave;
- QCheckBox *mExternalEditorCheck;
+ TQCheckBox *mExternalEditorCheck;
KURLRequester *mEditorRequester;
};
class ComposerPagePhrasesTab : public ConfigModuleTab {
Q_OBJECT
public:
- ComposerPagePhrasesTab( QWidget * parent=0, const char * name=0 );
- QString helpAnchor() const;
+ ComposerPagePhrasesTab( TQWidget * parent=0, const char * name=0 );
+ TQString helpAnchor() const;
void save();
private slots:
void slotNewLanguage();
void slotRemoveLanguage();
- void slotLanguageChanged( const QString& );
- void slotAddNewLanguage( const QString& );
+ void slotLanguageChanged( const TQString& );
+ void slotAddNewLanguage( const TQString& );
private:
virtual void doLoadFromGlobalSettings();
@@ -641,11 +641,11 @@ private:
private:
LanguageComboBox *mPhraseLanguageCombo;
- QPushButton *mRemoveButton;
- QLineEdit *mPhraseReplyEdit;
- QLineEdit *mPhraseReplyAllEdit;
- QLineEdit *mPhraseForwardEdit;
- QLineEdit *mPhraseIndentPrefixEdit;
+ TQPushButton *mRemoveButton;
+ TQLineEdit *mPhraseReplyEdit;
+ TQLineEdit *mPhraseReplyAllEdit;
+ TQLineEdit *mPhraseForwardEdit;
+ TQLineEdit *mPhraseIndentPrefixEdit;
int mActiveLanguageItem;
LanguageItemList mLanguageList;
@@ -654,8 +654,8 @@ private:
class ComposerPageTemplatesTab : public ConfigModuleTab {
Q_OBJECT
public:
- ComposerPageTemplatesTab( QWidget * parent=0, const char * name=0 );
- QString helpAnchor() const;
+ ComposerPageTemplatesTab( TQWidget * parent=0, const char * name=0 );
+ TQString helpAnchor() const;
void save();
@@ -671,8 +671,8 @@ private:
class ComposerPageCustomTemplatesTab : public ConfigModuleTab {
Q_OBJECT
public:
- ComposerPageCustomTemplatesTab( QWidget * parent=0, const char * name=0 );
- QString helpAnchor() const;
+ ComposerPageCustomTemplatesTab( TQWidget * parent=0, const char * name=0 );
+ TQString helpAnchor() const;
void save();
@@ -688,8 +688,8 @@ private:
class ComposerPageSubjectTab : public ConfigModuleTab {
Q_OBJECT
public:
- ComposerPageSubjectTab( QWidget * parent=0, const char * name=0 );
- QString helpAnchor() const;
+ ComposerPageSubjectTab( TQWidget * parent=0, const char * name=0 );
+ TQString helpAnchor() const;
void save();
@@ -698,21 +698,21 @@ private:
private:
SimpleStringListEditor *mReplyListEditor;
- QCheckBox *mReplaceReplyPrefixCheck;
+ TQCheckBox *mReplaceReplyPrefixCheck;
SimpleStringListEditor *mForwardListEditor;
- QCheckBox *mReplaceForwardPrefixCheck;
+ TQCheckBox *mReplaceForwardPrefixCheck;
};
class ComposerPageCharsetTab : public ConfigModuleTab {
Q_OBJECT
public:
- ComposerPageCharsetTab( QWidget * parent=0, const char * name=0 );
- QString helpAnchor() const;
+ ComposerPageCharsetTab( TQWidget * parent=0, const char * name=0 );
+ TQString helpAnchor() const;
void save();
private slots:
- void slotVerifyCharset(QString&);
+ void slotVerifyCharset(TQString&);
private:
//virtual void doLoadFromGlobalSettings();
@@ -721,21 +721,21 @@ private:
private:
SimpleStringListEditor *mCharsetListEditor;
- QCheckBox *mKeepReplyCharsetCheck;
+ TQCheckBox *mKeepReplyCharsetCheck;
};
class ComposerPageHeadersTab : public ConfigModuleTab {
Q_OBJECT
public:
- ComposerPageHeadersTab( QWidget * parent=0, const char * name=0 );
- QString helpAnchor() const;
+ ComposerPageHeadersTab( TQWidget * parent=0, const char * name=0 );
+ TQString helpAnchor() const;
void save();
private slots:
void slotMimeHeaderSelectionChanged();
- void slotMimeHeaderNameChanged( const QString & );
- void slotMimeHeaderValueChanged( const QString & );
+ void slotMimeHeaderNameChanged( const TQString & );
+ void slotMimeHeaderValueChanged( const TQString & );
void slotNewMimeHeader();
void slotRemoveMimeHeader();
@@ -745,22 +745,22 @@ private:
//FIXME virtual void doResetToDefaultsOther();
private:
- QCheckBox *mCreateOwnMessageIdCheck;
- QLineEdit *mMessageIdSuffixEdit;
- QRegExpValidator *mMessageIdSuffixValidator;
- QListView *mTagList;
- QPushButton *mRemoveHeaderButton;
- QLineEdit *mTagNameEdit;
- QLineEdit *mTagValueEdit;
- QLabel *mTagNameLabel;
- QLabel *mTagValueLabel;
+ TQCheckBox *mCreateOwnMessageIdCheck;
+ TQLineEdit *mMessageIdSuffixEdit;
+ TQRegExpValidator *mMessageIdSuffixValidator;
+ TQListView *mTagList;
+ TQPushButton *mRemoveHeaderButton;
+ TQLineEdit *mTagNameEdit;
+ TQLineEdit *mTagValueEdit;
+ TQLabel *mTagNameLabel;
+ TQLabel *mTagValueLabel;
};
class ComposerPageAttachmentsTab : public ConfigModuleTab {
Q_OBJECT
public:
- ComposerPageAttachmentsTab( QWidget * parent=0, const char * name=0 );
- QString helpAnchor() const;
+ ComposerPageAttachmentsTab( TQWidget * parent=0, const char * name=0 );
+ TQString helpAnchor() const;
void save();
@@ -772,17 +772,17 @@ private:
//FIXME virtual void doResetToDefaultsOther();
private:
- QCheckBox *mOutlookCompatibleCheck;
- QCheckBox *mMissingAttachmentDetectionCheck;
+ TQCheckBox *mOutlookCompatibleCheck;
+ TQCheckBox *mMissingAttachmentDetectionCheck;
SimpleStringListEditor *mAttachWordsListEditor;
};
class KDE_EXPORT ComposerPage : public ConfigModuleWithTabs {
Q_OBJECT
public:
- ComposerPage( QWidget * parent=0, const char * name=0 );
+ ComposerPage( TQWidget * parent=0, const char * name=0 );
- QString helpAnchor() const;
+ TQString helpAnchor() const;
// hrmpf. moc doesn't like nested classes with slots/signals...:
typedef ComposerPageGeneralTab GeneralTab;
@@ -814,8 +814,8 @@ private:
class SecurityPageGeneralTab : public ConfigModuleTab {
Q_OBJECT
public:
- SecurityPageGeneralTab( QWidget * parent=0, const char * name=0 );
- QString helpAnchor() const;
+ SecurityPageGeneralTab( TQWidget * parent=0, const char * name=0 );
+ TQString helpAnchor() const;
void save();
void installProfile( KConfig * profile );
@@ -826,22 +826,22 @@ private:
//FIXME virtual void doResetToDefaultsOther();
private:
- QCheckBox *mExternalReferences;
- QCheckBox *mHtmlMailCheck;
- QCheckBox *mNoMDNsWhenEncryptedCheck;
- QButtonGroup *mMDNGroup;
- QButtonGroup *mOrigQuoteGroup;
- QCheckBox *mAutomaticallyImportAttachedKeysCheck;
- QCheckBox *mAlwaysDecrypt;
+ TQCheckBox *mExternalReferences;
+ TQCheckBox *mHtmlMailCheck;
+ TQCheckBox *mNoMDNsWhenEncryptedCheck;
+ TQButtonGroup *mMDNGroup;
+ TQButtonGroup *mOrigQuoteGroup;
+ TQCheckBox *mAutomaticallyImportAttachedKeysCheck;
+ TQCheckBox *mAlwaysDecrypt;
};
class SecurityPageComposerCryptoTab : public ConfigModuleTab {
Q_OBJECT
public:
- SecurityPageComposerCryptoTab( QWidget * parent=0, const char * name=0 );
+ SecurityPageComposerCryptoTab( TQWidget * parent=0, const char * name=0 );
- QString helpAnchor() const;
+ TQString helpAnchor() const;
void save();
void installProfile( KConfig * profile );
@@ -858,9 +858,9 @@ private:
class SecurityPageWarningTab : public ConfigModuleTab {
Q_OBJECT
public:
- SecurityPageWarningTab( QWidget * parent=0, const char * name=0 );
+ SecurityPageWarningTab( TQWidget * parent=0, const char * name=0 );
- QString helpAnchor() const;
+ TQString helpAnchor() const;
void save();
void installProfile( KConfig * profile );
@@ -881,10 +881,10 @@ class SecurityPageSMimeTab : public ConfigModuleTab, public DCOPObject {
Q_OBJECT
K_DCOP
public:
- SecurityPageSMimeTab( QWidget * parent=0, const char * name=0 );
+ SecurityPageSMimeTab( TQWidget * parent=0, const char * name=0 );
~SecurityPageSMimeTab();
- QString helpAnchor() const;
+ TQString helpAnchor() const;
// Can't use k_dcop here. dcopidl can't parse this file, dcopidlng has a namespace bug.
void save();
@@ -907,10 +907,10 @@ class SecurityPageCryptPlugTab : public ConfigModuleTab
{
Q_OBJECT
public:
- SecurityPageCryptPlugTab( QWidget * parent = 0, const char* name = 0 );
+ SecurityPageCryptPlugTab( TQWidget * parent = 0, const char* name = 0 );
~SecurityPageCryptPlugTab();
- QString helpAnchor() const;
+ TQString helpAnchor() const;
void save();
@@ -925,9 +925,9 @@ private:
class KDE_EXPORT SecurityPage : public ConfigModuleWithTabs {
Q_OBJECT
public:
- SecurityPage( QWidget * parent=0, const char * name=0 );
+ SecurityPage( TQWidget * parent=0, const char * name=0 );
- QString helpAnchor() const;
+ TQString helpAnchor() const;
// OpenPGP tab is special:
void installProfile( KConfig * profile );
@@ -956,10 +956,10 @@ private:
class MiscPageFolderTab : public ConfigModuleTab {
Q_OBJECT
public:
- MiscPageFolderTab( QWidget * parent=0, const char * name=0 );
+ MiscPageFolderTab( TQWidget * parent=0, const char * name=0 );
void save();
- QString helpAnchor() const;
+ TQString helpAnchor() const;
private:
virtual void doLoadFromGlobalSettings();
@@ -967,28 +967,28 @@ private:
//FIXME virtual void doResetToDefaultsOther();
private:
- QCheckBox *mEmptyFolderConfirmCheck;
- QCheckBox *mExcludeImportantFromExpiry;
- QComboBox *mLoopOnGotoUnread;
- QComboBox *mMailboxPrefCombo;
- QComboBox *mActionEnterFolder;
- QCheckBox *mEmptyTrashCheck;
+ TQCheckBox *mEmptyFolderConfirmCheck;
+ TQCheckBox *mExcludeImportantFromExpiry;
+ TQComboBox *mLoopOnGotoUnread;
+ TQComboBox *mMailboxPrefCombo;
+ TQComboBox *mActionEnterFolder;
+ TQCheckBox *mEmptyTrashCheck;
#ifdef HAVE_INDEXLIB
- QCheckBox *mIndexingEnabled;
+ TQCheckBox *mIndexingEnabled;
#endif
- QCheckBox *mDelayedMarkAsRead;
+ TQCheckBox *mDelayedMarkAsRead;
KIntSpinBox *mDelayedMarkTime;
- QCheckBox *mShowPopupAfterDnD;
+ TQCheckBox *mShowPopupAfterDnD;
KMail::FolderRequester *mOnStartupOpenFolder;
- QComboBox *mQuotaCmbBox;
+ TQComboBox *mQuotaCmbBox;
};
class MiscPageGroupwareTab : public ConfigModuleTab {
Q_OBJECT
public:
- MiscPageGroupwareTab( QWidget * parent=0, const char * name=0 );
+ MiscPageGroupwareTab( TQWidget * parent=0, const char * name=0 );
void save();
- QString helpAnchor() const;
+ TQString helpAnchor() const;
private slots:
void slotStorageFormatChanged( int );
@@ -998,36 +998,36 @@ private:
virtual void doLoadFromGlobalSettings();
private:
- QCheckBox* mEnableGwCB;
- QCheckBox* mEnableImapResCB;
+ TQCheckBox* mEnableGwCB;
+ TQCheckBox* mEnableImapResCB;
- QWidget* mBox;
- QVBox* gBox;
+ TQWidget* mBox;
+ TQVBox* gBox;
- QComboBox* mStorageFormatCombo;
- QComboBox* mLanguageCombo;
+ TQComboBox* mStorageFormatCombo;
+ TQComboBox* mLanguageCombo;
- QLabel* mFolderComboLabel;
- QWidgetStack* mFolderComboStack;
+ TQLabel* mFolderComboLabel;
+ TQWidgetStack* mFolderComboStack;
KMail::FolderRequester* mFolderCombo; // in the widgetstack
KMail::AccountComboBox* mAccountCombo; // in the widgetstack
- QCheckBox* mHideGroupwareFolders;
- QCheckBox* mOnlyShowGroupwareFolders;
- QCheckBox* mSyncImmediately;
- QCheckBox* mDeleteInvitations;
+ TQCheckBox* mHideGroupwareFolders;
+ TQCheckBox* mOnlyShowGroupwareFolders;
+ TQCheckBox* mSyncImmediately;
+ TQCheckBox* mDeleteInvitations;
- QCheckBox* mLegacyMangleFromTo;
- QCheckBox* mLegacyBodyInvites;
- QCheckBox* mExchangeCompatibleInvitations;
- QCheckBox* mAutomaticSending;
+ TQCheckBox* mLegacyMangleFromTo;
+ TQCheckBox* mLegacyBodyInvites;
+ TQCheckBox* mExchangeCompatibleInvitations;
+ TQCheckBox* mAutomaticSending;
};
class KDE_EXPORT MiscPage : public ConfigModuleWithTabs {
Q_OBJECT
public:
- MiscPage( QWidget * parent=0, const char * name=0 );
- QString helpAnchor() const;
+ MiscPage( TQWidget * parent=0, const char * name=0 );
+ TQString helpAnchor() const;
typedef MiscPageFolderTab FolderTab;
typedef MiscPageGroupwareTab GroupwareTab;
@@ -1046,15 +1046,15 @@ private:
class ListView : public KListView {
Q_OBJECT
public:
- ListView( QWidget *parent=0, const char *name=0, int visibleItem=10 );
+ ListView( TQWidget *parent=0, const char *name=0, int visibleItem=10 );
void resizeColums();
void setVisibleItem( int visibleItem, bool updateSize=true );
- virtual QSize sizeHint() const;
+ virtual TQSize sizeHint() const;
protected:
- virtual void resizeEvent( QResizeEvent *e );
- virtual void showEvent( QShowEvent *e );
+ virtual void resizeEvent( TQResizeEvent *e );
+ virtual void showEvent( TQShowEvent *e );
private:
int mVisibleItem;
diff --git a/kmail/copyfolderjob.cpp b/kmail/copyfolderjob.cpp
index 0328e3df5..ddfa6d251 100644
--- a/kmail/copyfolderjob.cpp
+++ b/kmail/copyfolderjob.cpp
@@ -81,7 +81,7 @@ void CopyFolderJob::copyMessagesToTargetDir()
// Hmmmm. Tasty hack. Can I have fries with that?
mStorage->blockSignals( true );
// move all messages to the new folder
- QPtrList<KMMsgBase> msgList;
+ TQPtrList<KMMsgBase> msgList;
for ( int i = 0; i < mStorage->count(); i++ )
{
const KMMsgBase* msgBase = mStorage->getMsgBase( i );
@@ -95,8 +95,8 @@ void CopyFolderJob::copyMessagesToTargetDir()
slotCopyNextChild(); // no contents, check subfolders
} else {
KMCommand *command = new KMCopyCommand( mNewFolder, msgList );
- connect( command, SIGNAL( completed( KMCommand * ) ),
- this, SLOT( slotCopyCompleted( KMCommand * ) ) );
+ connect( command, TQT_SIGNAL( completed( KMCommand * ) ),
+ this, TQT_SLOT( slotCopyCompleted( KMCommand * ) ) );
command->start();
}
}
@@ -104,8 +104,8 @@ void CopyFolderJob::copyMessagesToTargetDir()
void CopyFolderJob::slotCopyCompleted( KMCommand* command )
{
kdDebug(5006) << k_funcinfo << (command?command->result():0) << endl;
- disconnect( command, SIGNAL( completed( KMCommand * ) ),
- this, SLOT( slotCopyCompleted( KMCommand * ) ) );
+ disconnect( command, TQT_SIGNAL( completed( KMCommand * ) ),
+ this, TQT_SLOT( slotCopyCompleted( KMCommand * ) ) );
mStorage->blockSignals( false );
@@ -160,8 +160,8 @@ void CopyFolderJob::slotCopyNextChild( bool success )
// let it do its thing and report back when we are ready to do the next sibling
mNextChildFolder->open( "copyfolder" ); // refcount
FolderJob* job = new CopyFolderJob( mNextChildFolder->storage(), dir);
- connect( job, SIGNAL( folderCopyComplete( bool ) ),
- this, SLOT( slotCopyNextChild( bool ) ) );
+ connect( job, TQT_SIGNAL( folderCopyComplete( bool ) ),
+ this, TQT_SLOT( slotCopyNextChild( bool ) ) );
job->start();
}
@@ -191,13 +191,13 @@ bool CopyFolderJob::createTargetDir()
if (anAccount->makeConnection() == ImapAccountBase::Connected) {
mNewFolder = kmkernel->imapFolderMgr()->createFolder( mStorage->folder()->name(), false, typenew, mNewParent );
if ( mNewFolder ) {
- QString imapPath;
+ TQString imapPath;
imapPath = anAccount->createImapPath( selectedStorage->imapPath(), mStorage->folder()->name() );
KMFolderImap* newStorage = static_cast<KMFolderImap*>( mNewFolder->storage() );
- connect( selectedStorage, SIGNAL(folderCreationResult(const QString&, bool)),
- this, SLOT(folderCreationDone(const QString&, bool)) );
- selectedStorage->createFolder(mStorage->folder()->name(), QString::null); // create it on the server
- newStorage->initializeFrom( selectedStorage, imapPath, QString::null );
+ connect( selectedStorage, TQT_SIGNAL(folderCreationResult(const TQString&, bool)),
+ this, TQT_SLOT(folderCreationDone(const TQString&, bool)) );
+ selectedStorage->createFolder(mStorage->folder()->name(), TQString::null); // create it on the server
+ newStorage->initializeFrom( selectedStorage, imapPath, TQString::null );
static_cast<KMFolderImap*>(mNewParent->owner()->storage())->setAccount( selectedStorage->account() );
waitForFolderCreation = true;
success = true;
@@ -268,7 +268,7 @@ void CopyFolderJob::rollback()
deleteLater();
}
-void CopyFolderJob::folderCreationDone(const QString & name, bool success)
+void CopyFolderJob::folderCreationDone(const TQString & name, bool success)
{
if ( mStorage->folder()->name() != name )
return; // not our business
diff --git a/kmail/copyfolderjob.h b/kmail/copyfolderjob.h
index b02be98a5..73311a49b 100644
--- a/kmail/copyfolderjob.h
+++ b/kmail/copyfolderjob.h
@@ -30,7 +30,7 @@
#include "folderjob.h"
-#include <qguardedptr.h>
+#include <tqguardedptr.h>
class FolderStorage;
class KMFolderDir;
@@ -91,17 +91,17 @@ protected slots:
/**
Called when the online IMAP folder creation finished.
*/
- void folderCreationDone( const QString &name, bool success );
+ void folderCreationDone( const TQString &name, bool success );
signals:
/** Emitted when the job is done, check the success bool */
void folderCopyComplete( bool success );
protected:
- QGuardedPtr<FolderStorage> const mStorage;
+ TQGuardedPtr<FolderStorage> const mStorage;
KMFolderDir* const mNewParent;
- QGuardedPtr<KMFolder> mNewFolder;
- QPtrListIterator<KMFolderNode> mChildFolderNodeIterator;
+ TQGuardedPtr<KMFolder> mNewFolder;
+ TQPtrListIterator<KMFolderNode> mChildFolderNodeIterator;
KMFolder* mNextChildFolder;
};
diff --git a/kmail/csshelper.cpp b/kmail/csshelper.cpp
index 4fa2588cc..fc411be7b 100644
--- a/kmail/csshelper.cpp
+++ b/kmail/csshelper.cpp
@@ -36,12 +36,12 @@
#include <kconfig.h>
-#include <qcolor.h>
-#include <qfont.h>
+#include <tqcolor.h>
+#include <tqfont.h>
namespace KMail {
- CSSHelper::CSSHelper( const QPaintDeviceMetrics &pdm ) :
+ CSSHelper::CSSHelper( const TQPaintDeviceMetrics &pdm ) :
KPIM::CSSHelper( pdm )
{
KConfig * config = KMKernel::config();
@@ -64,7 +64,7 @@ namespace KMail {
cPgpErrH = reader.readColorEntry( "PGPMessageErr", &cPgpErrH );
cHtmlWarning = reader.readColorEntry( "HTMLWarningColor", &cHtmlWarning );
for ( int i = 0 ; i < 3 ; ++i ) {
- const QString key = "QuotedText" + QString::number( i+1 );
+ const TQString key = "QuotedText" + TQString::number( i+1 );
mQuoteColor[i] = reader.readColorEntry( key, &mQuoteColor[i] );
}
}
@@ -74,10 +74,10 @@ namespace KMail {
mPrintFont = fonts.readFontEntry( "print-font", &mPrintFont);
mFixedFont = fonts.readFontEntry( "fixed-font", &mFixedFont);
mFixedPrintFont = mFixedFont; // FIXME when we have a separate fixed print font
- QFont defaultFont = mBodyFont;
+ TQFont defaultFont = mBodyFont;
defaultFont.setItalic( true );
for ( int i = 0 ; i < 3 ; ++i ) {
- const QString key = QString( "quote%1-font" ).arg( i+1 );
+ const TQString key = TQString( "quote%1-font" ).arg( i+1 );
mQuoteFont[i] = fonts.readFontEntry( key, &defaultFont );
}
}
diff --git a/kmail/csshelper.h b/kmail/csshelper.h
index eaa823918..7015cec5e 100644
--- a/kmail/csshelper.h
+++ b/kmail/csshelper.h
@@ -38,7 +38,7 @@ namespace KMail {
class CSSHelper : public KPIM::CSSHelper {
public:
- CSSHelper( const QPaintDeviceMetrics &pdm );
+ CSSHelper( const TQPaintDeviceMetrics &pdm );
};
} // namespace KMail
diff --git a/kmail/customtemplates.cpp b/kmail/customtemplates.cpp
index 4030862c8..93b24e8f7 100644
--- a/kmail/customtemplates.cpp
+++ b/kmail/customtemplates.cpp
@@ -22,18 +22,18 @@
#include <klocale.h>
#include <kglobal.h>
-#include <qpopupmenu.h>
-#include <qpushbutton.h>
-#include <qtextedit.h>
-#include <qlineedit.h>
-#include <qtoolbox.h>
+#include <tqpopupmenu.h>
+#include <tqpushbutton.h>
+#include <tqtextedit.h>
+#include <tqlineedit.h>
+#include <tqtoolbox.h>
#include <kdebug.h>
-#include <qfont.h>
+#include <tqfont.h>
#include <kiconloader.h>
#include <kpushbutton.h>
#include <klistview.h>
#include <klineedit.h>
-#include <qcombobox.h>
+#include <tqcombobox.h>
#include <kshortcut.h>
#include <kmessagebox.h>
#include <kkeybutton.h>
@@ -47,10 +47,10 @@
#include "customtemplates.h"
-CustomTemplates::CustomTemplates( QWidget *parent, const char *name )
+CustomTemplates::CustomTemplates( TQWidget *parent, const char *name )
:CustomTemplatesBase( parent, name ), mCurrentItem( 0 )
{
- QFont f = KGlobalSettings::fixedFont();
+ TQFont f = KGlobalSettings::fixedFont();
mEdit->setFont( f );
mAdd->setIconSet( BarIconSet( "add", KIcon::SizeSmall ) );
@@ -61,35 +61,35 @@ CustomTemplates::CustomTemplates( QWidget *parent, const char *name )
mEditFrame->setEnabled( false );
- connect( mEdit, SIGNAL( textChanged() ),
- this, SLOT( slotTextChanged( void ) ) );
+ connect( mEdit, TQT_SIGNAL( textChanged() ),
+ this, TQT_SLOT( slotTextChanged( void ) ) );
- connect( mInsertCommand, SIGNAL( insertCommand(QString, int) ),
- this, SLOT( slotInsertCommand(QString, int) ) );
+ connect( mInsertCommand, TQT_SIGNAL( insertCommand(TQString, int) ),
+ this, TQT_SLOT( slotInsertCommand(TQString, int) ) );
- connect( mAdd, SIGNAL( clicked() ),
- this, SLOT( slotAddClicked() ) );
- connect( mRemove, SIGNAL( clicked() ),
- this, SLOT( slotRemoveClicked() ) );
- connect( mList, SIGNAL( selectionChanged() ),
- this, SLOT( slotListSelectionChanged() ) );
- connect( mType, SIGNAL( activated( int ) ),
- this, SLOT( slotTypeActivated( int ) ) );
+ connect( mAdd, TQT_SIGNAL( clicked() ),
+ this, TQT_SLOT( slotAddClicked() ) );
+ connect( mRemove, TQT_SIGNAL( clicked() ),
+ this, TQT_SLOT( slotRemoveClicked() ) );
+ connect( mList, TQT_SIGNAL( selectionChanged() ),
+ this, TQT_SLOT( slotListSelectionChanged() ) );
+ connect( mType, TQT_SIGNAL( activated( int ) ),
+ this, TQT_SLOT( slotTypeActivated( int ) ) );
- connect( mKeyButton, SIGNAL( capturedShortcut( const KShortcut& ) ),
- this, SLOT( slotShortcutCaptured( const KShortcut& ) ) );
+ connect( mKeyButton, TQT_SIGNAL( capturedShortcut( const KShortcut& ) ),
+ this, TQT_SLOT( slotShortcutCaptured( const KShortcut& ) ) );
mReplyPix = KIconLoader().loadIcon( "mail_reply", KIcon::Small );
mReplyAllPix = KIconLoader().loadIcon( "mail_replyall", KIcon::Small );
mForwardPix = KIconLoader().loadIcon( "mail_forward", KIcon::Small );
mType->clear();
- mType->insertItem( QPixmap(), i18n( "Message->", "Universal" ), TUniversal );
+ mType->insertItem( TQPixmap(), i18n( "Message->", "Universal" ), TUniversal );
mType->insertItem( mReplyPix, i18n( "Message->", "Reply" ), TReply );
mType->insertItem( mReplyAllPix, i18n( "Message->", "Reply to All" ), TReplyAll );
mType->insertItem( mForwardPix, i18n( "Message->", "Forward" ), TForward );
- QString help =
+ TQString help =
i18n( "<qt>"
"<p>Here you can add, edit, and delete custom message "
"templates to use when you compose a reply or forwarding message. "
@@ -109,7 +109,7 @@ CustomTemplates::CustomTemplates( QWidget *parent, const char *name )
CustomTemplates::~CustomTemplates()
{
- QDictIterator<CustomTemplateItem> it(mItemList);
+ TQDictIterator<CustomTemplateItem> it(mItemList);
for ( ; it.current() ; ++it ) {
CustomTemplateItem *vitem = mItemList.take( it.currentKey() );
if ( vitem ) {
@@ -118,9 +118,9 @@ CustomTemplates::~CustomTemplates()
}
}
-QString CustomTemplates::indexToType( int index )
+TQString CustomTemplates::indexToType( int index )
{
- QString typeStr;
+ TQString typeStr;
switch ( index ) {
case TUniversal:
// typeStr = i18n( "Any" ); break;
@@ -146,18 +146,18 @@ void CustomTemplates::slotTextChanged()
void CustomTemplates::load()
{
- QStringList list = GlobalSettings::self()->customTemplates();
- for ( QStringList::iterator it = list.begin(); it != list.end(); ++it ) {
+ TQStringList list = GlobalSettings::self()->customTemplates();
+ for ( TQStringList::iterator it = list.begin(); it != list.end(); ++it ) {
CTemplates t(*it);
- // QString typeStr = indexToType( t.type() );
- QString typeStr;
+ // TQString typeStr = indexToType( t.type() );
+ TQString typeStr;
KShortcut shortcut( t.shortcut() );
CustomTemplateItem *vitem =
new CustomTemplateItem( *it, t.content(),
shortcut,
static_cast<Type>( t.type() ) );
mItemList.insert( *it, vitem );
- QListViewItem *item = new QListViewItem( mList, typeStr, *it, t.content() );
+ TQListViewItem *item = new TQListViewItem( mList, typeStr, *it, t.content() );
switch ( t.type() ) {
case TReply:
item->setPixmap( 0, mReplyPix );
@@ -169,7 +169,7 @@ void CustomTemplates::load()
item->setPixmap( 0, mForwardPix );
break;
default:
- item->setPixmap( 0, QPixmap() );
+ item->setPixmap( 0, TQPixmap() );
item->setText( 0, indexToType( t.type() ) );
break;
};
@@ -185,17 +185,17 @@ void CustomTemplates::save()
vitem->mShortcut = mKeyButton->shortcut();
}
}
- QStringList list;
- QListViewItemIterator lit( mList );
+ TQStringList list;
+ TQListViewItemIterator lit( mList );
while ( lit.current() ) {
list.append( (*lit)->text( 1 ) );
++lit;
}
- QDictIterator<CustomTemplateItem> it( mItemList );
+ TQDictIterator<CustomTemplateItem> it( mItemList );
for ( ; it.current() ; ++it ) {
// list.append( (*it)->mName );
CTemplates t( (*it)->mName );
- QString &content = (*it)->mContent;
+ TQString &content = (*it)->mContent;
if ( content.stripWhiteSpace().isEmpty() ) {
content = "%BLANK";
}
@@ -212,7 +212,7 @@ void CustomTemplates::save()
kmkernel->getKMMainWidget()->updateCustomTemplateMenus();
}
-void CustomTemplates::slotInsertCommand( QString cmd, int adjustCursor )
+void CustomTemplates::slotInsertCommand( TQString cmd, int adjustCursor )
{
int para, index;
mEdit->getCursorPosition( &para, &index );
@@ -225,14 +225,14 @@ void CustomTemplates::slotInsertCommand( QString cmd, int adjustCursor )
void CustomTemplates::slotAddClicked()
{
- QString str = mName->text();
+ TQString str = mName->text();
if ( !str.isEmpty() ) {
CustomTemplateItem *vitem = mItemList[ str ];
if ( !vitem ) {
vitem = new CustomTemplateItem( str, "", KShortcut::null(), TUniversal );
mItemList.insert( str, vitem );
- QListViewItem *item =
- new QListViewItem( mList, indexToType( TUniversal ), str, "" );
+ TQListViewItem *item =
+ new TQListViewItem( mList, indexToType( TUniversal ), str, "" );
mList->setSelected( item, true );
mKeyButton->setEnabled( false );
emit changed();
@@ -262,22 +262,22 @@ void CustomTemplates::slotListSelectionChanged()
vitem->mShortcut = mKeyButton->shortcut();
}
}
- QListViewItem *item = mList->selectedItem();
+ TQListViewItem *item = mList->selectedItem();
if ( item ) {
mEditFrame->setEnabled( true );
mCurrentItem = item;
CustomTemplateItem *vitem = mItemList[ mCurrentItem->text( 1 ) ];
if ( vitem ) {
// avoid emit changed()
- disconnect( mEdit, SIGNAL( textChanged() ),
- this, SLOT( slotTextChanged( void ) ) );
+ disconnect( mEdit, TQT_SIGNAL( textChanged() ),
+ this, TQT_SLOT( slotTextChanged( void ) ) );
mEdit->setText( vitem->mContent );
mKeyButton->setShortcut( vitem->mShortcut, false );
mType->setCurrentItem( vitem->mType );
- connect( mEdit, SIGNAL( textChanged() ),
- this, SLOT( slotTextChanged( void ) ) );
+ connect( mEdit, TQT_SIGNAL( textChanged() ),
+ this, TQT_SLOT( slotTextChanged( void ) ) );
if ( vitem->mType == TUniversal )
{
@@ -315,7 +315,7 @@ void CustomTemplates::slotTypeActivated( int index )
mCurrentItem->setPixmap( 0, mForwardPix );
break;
default:
- mCurrentItem->setPixmap( 0, QPixmap() );
+ mCurrentItem->setPixmap( 0, TQPixmap() );
break;
};
if ( index == TUniversal )
@@ -338,14 +338,14 @@ void CustomTemplates::slotShortcutCaptured( const KShortcut &shortcut )
bool assign = true;
bool customused = false;
// check if shortcut is already used for custom templates
- QDictIterator<CustomTemplateItem> it(mItemList);
+ TQDictIterator<CustomTemplateItem> it(mItemList);
for ( ; it.current() ; ++it ) {
if ( !mCurrentItem || (*it)->mName != mCurrentItem->text( 1 ) )
{
if ( (*it)->mShortcut == sc )
{
- QString title( I18N_NOOP("Key Conflict") );
- QString msg( I18N_NOOP("The selected shortcut is already used "
+ TQString title( I18N_NOOP("Key Conflict") );
+ TQString msg( I18N_NOOP("The selected shortcut is already used "
"for another custom template, "
"would you still like to continue with the assignment?" ) );
assign = ( KMessageBox::warningYesNo( this, msg, title )
@@ -361,8 +361,8 @@ void CustomTemplates::slotShortcutCaptured( const KShortcut &shortcut )
// check if shortcut is used somewhere else
if ( !customused && !sc.isNull() &&
!( kmkernel->getKMMainWidget()->shortcutIsValid( sc ) ) ) {
- QString title( I18N_NOOP("Key Conflict") );
- QString msg( I18N_NOOP("The selected shortcut is already used, "
+ TQString title( I18N_NOOP("Key Conflict") );
+ TQString msg( I18N_NOOP("The selected shortcut is already used, "
"would you still like to continue with the assignment?" ) );
assign = ( KMessageBox::warningYesNo( this, msg, title )
== KMessageBox::Yes );
diff --git a/kmail/customtemplates.h b/kmail/customtemplates.h
index a2b276780..dc454bf6c 100644
--- a/kmail/customtemplates.h
+++ b/kmail/customtemplates.h
@@ -27,7 +27,7 @@
#include "templatesinsertcommand.h"
struct CustomTemplateItem;
-typedef QDict<CustomTemplateItem> CustomTemplateItemList;
+typedef TQDict<CustomTemplateItem> CustomTemplateItemList;
class KShortcut;
class CustomTemplates : public CustomTemplatesBase
@@ -40,17 +40,17 @@ class CustomTemplates : public CustomTemplatesBase
public:
- CustomTemplates( QWidget *parent = 0, const char *name = 0 );
+ CustomTemplates( TQWidget *parent = 0, const char *name = 0 );
~CustomTemplates();
void load();
void save();
- QString indexToType( int index );
+ TQString indexToType( int index );
public slots:
- void slotInsertCommand( QString cmd, int adjustCursor = 0 );
+ void slotInsertCommand( TQString cmd, int adjustCursor = 0 );
void slotTextChanged();
@@ -66,25 +66,25 @@ class CustomTemplates : public CustomTemplatesBase
protected:
- QListViewItem *mCurrentItem;
+ TQListViewItem *mCurrentItem;
CustomTemplateItemList mItemList;
- QPixmap mReplyPix;
- QPixmap mReplyAllPix;
- QPixmap mForwardPix;
+ TQPixmap mReplyPix;
+ TQPixmap mReplyAllPix;
+ TQPixmap mForwardPix;
};
struct CustomTemplateItem
{
CustomTemplateItem() {}
- CustomTemplateItem( const QString &name,
- const QString &content,
+ CustomTemplateItem( const TQString &name,
+ const TQString &content,
KShortcut &shortcut,
CustomTemplates::Type type ) :
mName( name ), mContent( content ), mShortcut(shortcut), mType( type ) {}
- QString mName, mContent;
+ TQString mName, mContent;
KShortcut mShortcut;
CustomTemplates::Type mType;
};
diff --git a/kmail/dcoptest.cpp b/kmail/dcoptest.cpp
index ecf512075..9887dc985 100644
--- a/kmail/dcoptest.cpp
+++ b/kmail/dcoptest.cpp
@@ -29,7 +29,7 @@ int main(int argc,char **argv)
DCOPRef ref = kmailStub.openComposer("to 2","","","Second test",
"DCOP ref call",0);
MailComposerIface_stub composerStub(ref.app(),ref.object());
- QCString data = "BEGIN:VCALENDAR\nEND:VCALENDAR";
+ TQCString data = "BEGIN:VCALENDAR\nEND:VCALENDAR";
composerStub.addAttachment("test.ics","7bit",data,"text","calendar","method",
"publish","attachement;");
composerStub.send(2);
diff --git a/kmail/dictionarycombobox.cpp b/kmail/dictionarycombobox.cpp
index 59e0affd5..88b776231 100644
--- a/kmail/dictionarycombobox.cpp
+++ b/kmail/dictionarycombobox.cpp
@@ -38,20 +38,20 @@
#include <ksconfig.h>
#include <kdebug.h>
-#include <qstringlist.h>
+#include <tqstringlist.h>
namespace KMail {
- DictionaryComboBox::DictionaryComboBox( QWidget * parent, const char * name )
- : QComboBox( false, parent, name ),
+ DictionaryComboBox::DictionaryComboBox( TQWidget * parent, const char * name )
+ : TQComboBox( false, parent, name ),
mSpellConfig( 0 ),
mDefaultDictionary( 0 )
{
reloadCombo();
- connect( this, SIGNAL( activated( int ) ),
- this, SLOT( slotDictionaryChanged( int ) ) );
- connect( this, SIGNAL( dictionaryChanged( int ) ),
- mSpellConfig, SLOT( sSetDictionary( int ) ) );
+ connect( this, TQT_SIGNAL( activated( int ) ),
+ this, TQT_SLOT( slotDictionaryChanged( int ) ) );
+ connect( this, TQT_SIGNAL( dictionaryChanged( int ) ),
+ mSpellConfig, TQT_SLOT( sSetDictionary( int ) ) );
}
DictionaryComboBox::~DictionaryComboBox()
@@ -60,21 +60,21 @@ namespace KMail {
mSpellConfig = 0;
}
- QString DictionaryComboBox::currentDictionaryName() const
+ TQString DictionaryComboBox::currentDictionaryName() const
{
return currentText();
}
- QString DictionaryComboBox::currentDictionary() const
+ TQString DictionaryComboBox::currentDictionary() const
{
- QString dict = mDictionaries[ currentItem() ];
+ TQString dict = mDictionaries[ currentItem() ];
if ( dict.isEmpty() )
return "<default>";
else
return dict;
}
- void DictionaryComboBox::setCurrentByDictionaryName( const QString & name )
+ void DictionaryComboBox::setCurrentByDictionaryName( const TQString & name )
{
if ( name.isEmpty() )
return;
@@ -90,7 +90,7 @@ namespace KMail {
}
}
- void DictionaryComboBox::setCurrentByDictionary( const QString & dictionary )
+ void DictionaryComboBox::setCurrentByDictionary( const TQString & dictionary )
{
if ( !dictionary.isEmpty() ) {
// first handle the special case of the default dictionary
@@ -103,7 +103,7 @@ namespace KMail {
}
int i = 0;
- for ( QStringList::ConstIterator it = mDictionaries.begin();
+ for ( TQStringList::ConstIterator it = mDictionaries.begin();
it != mDictionaries.end();
++it, ++i ) {
if ( *it == dictionary ) {
diff --git a/kmail/dictionarycombobox.h b/kmail/dictionarycombobox.h
index 0e7a3e193..0fcbdceb2 100644
--- a/kmail/dictionarycombobox.h
+++ b/kmail/dictionarycombobox.h
@@ -32,7 +32,7 @@
#ifndef _KMAIL_DICTIONARYCOMBOBOX_H_
#define _KMAIL_DICTIONARYCOMBOBOX_H_
-#include <qcombobox.h>
+#include <tqcombobox.h>
class KSpellConfig;
class QStringList;
@@ -45,16 +45,16 @@ namespace KMail {
* @author Ingo Kloecker <kloecker@kde.org>
**/
- class DictionaryComboBox : public QComboBox {
+ class DictionaryComboBox : public TQComboBox {
Q_OBJECT
public:
- DictionaryComboBox( QWidget * parent=0, const char * name=0 );
+ DictionaryComboBox( TQWidget * parent=0, const char * name=0 );
~DictionaryComboBox();
- QString currentDictionaryName() const;
- QString currentDictionary() const;
- void setCurrentByDictionaryName( const QString & dictionaryName );
- void setCurrentByDictionary( const QString & dictionary );
+ TQString currentDictionaryName() const;
+ TQString currentDictionary() const;
+ void setCurrentByDictionaryName( const TQString & dictionaryName );
+ void setCurrentByDictionary( const TQString & dictionary );
KSpellConfig* spellConfig() const;
@@ -63,7 +63,7 @@ namespace KMail {
* by user intervention or on setCurrentByDictionaryName() or on
* setCurrentByDictionary().
**/
- void dictionaryChanged( const QString & dictionary );
+ void dictionaryChanged( const TQString & dictionary );
void dictionaryChanged( int );
protected slots:
@@ -73,7 +73,7 @@ namespace KMail {
void reloadCombo();
protected:
- QStringList mDictionaries;
+ TQStringList mDictionaries;
KSpellConfig* mSpellConfig;
int mDefaultDictionary;
};
diff --git a/kmail/distributionlistdialog.cpp b/kmail/distributionlistdialog.cpp
index 9c8d6fd2b..b591afd71 100644
--- a/kmail/distributionlistdialog.cpp
+++ b/kmail/distributionlistdialog.cpp
@@ -38,31 +38,31 @@
#include <kmessagebox.h>
#include <kinputdialog.h>
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qlineedit.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqlineedit.h>
class DistributionListItem : public QCheckListItem
{
public:
- DistributionListItem( QListView *list )
- : QCheckListItem( list, QString::null, CheckBox )
+ DistributionListItem( TQListView *list )
+ : TQCheckListItem( list, TQString::null, CheckBox )
{
}
- void setAddressee( const KABC::Addressee &a, const QString &email )
+ void setAddressee( const KABC::Addressee &a, const TQString &email )
{
mIsTransient = false;
init( a, email );
}
- void setTransientAddressee( const KABC::Addressee &a, const QString &email )
+ void setTransientAddressee( const KABC::Addressee &a, const TQString &email )
{
mIsTransient = true;
init( a, email );
}
- void init( const KABC::Addressee &a, const QString &email )
+ void init( const KABC::Addressee &a, const TQString &email )
{
mAddressee = a;
mEmail = email;
@@ -75,7 +75,7 @@ class DistributionListItem : public QCheckListItem
return mAddressee;
}
- QString email() const
+ TQString email() const
{
return mEmail;
}
@@ -87,31 +87,31 @@ class DistributionListItem : public QCheckListItem
private:
KABC::Addressee mAddressee;
- QString mEmail;
+ TQString mEmail;
bool mIsTransient;
};
-DistributionListDialog::DistributionListDialog( QWidget *parent )
+DistributionListDialog::DistributionListDialog( TQWidget *parent )
: KDialogBase( Plain, i18n("Save Distribution List"), User1 | Cancel,
User1, parent, 0, false, false, i18n("Save List") )
{
- QFrame *topFrame = plainPage();
+ TQFrame *topFrame = plainPage();
- QBoxLayout *topLayout = new QVBoxLayout( topFrame );
+ TQBoxLayout *topLayout = new TQVBoxLayout( topFrame );
topLayout->setSpacing( spacingHint() );
- QBoxLayout *titleLayout = new QHBoxLayout( topLayout );
+ TQBoxLayout *titleLayout = new TQHBoxLayout( topLayout );
- QLabel *label = new QLabel( i18n("Name:"), topFrame );
+ TQLabel *label = new TQLabel( i18n("Name:"), topFrame );
titleLayout->addWidget( label );
- mTitleEdit = new QLineEdit( topFrame );
+ mTitleEdit = new TQLineEdit( topFrame );
titleLayout->addWidget( mTitleEdit );
mTitleEdit->setFocus();
mRecipientsList = new KListView( topFrame );
- mRecipientsList->addColumn( QString::null );
+ mRecipientsList->addColumn( TQString::null );
mRecipientsList->addColumn( i18n("Name") );
mRecipientsList->addColumn( i18n("Email") );
topLayout->addWidget( mRecipientsList );
@@ -121,11 +121,11 @@ void DistributionListDialog::setRecipients( const Recipient::List &recipients )
{
Recipient::List::ConstIterator it;
for( it = recipients.begin(); it != recipients.end(); ++it ) {
- QStringList emails = KPIM::splitEmailAddrList( (*it).email() );
- QStringList::ConstIterator it2;
+ TQStringList emails = KPIM::splitEmailAddrList( (*it).email() );
+ TQStringList::ConstIterator it2;
for( it2 = emails.begin(); it2 != emails.end(); ++it2 ) {
- QString name;
- QString email;
+ TQString name;
+ TQString email;
KABC::Addressee::parseEmailAddress( *it2, name, email );
if ( !email.isEmpty() ) {
DistributionListItem *item = new DistributionListItem( mRecipientsList );
@@ -155,7 +155,7 @@ void DistributionListDialog::slotUser1()
KABC::AddressBook *ab = KABC::StdAddressBook::self( true );
- QListViewItem *i = mRecipientsList->firstChild();
+ TQListViewItem *i = mRecipientsList->firstChild();
while( i ) {
DistributionListItem *item = static_cast<DistributionListItem *>( i );
if ( item->isOn() ) {
@@ -178,12 +178,12 @@ void DistributionListDialog::slotUser1()
manager.load();
#endif
- QString name = mTitleEdit->text();
+ TQString name = mTitleEdit->text();
if ( name.isEmpty() ) {
bool ok = false;
name = KInputDialog::getText( i18n("New Distribution List"),
- i18n("Please enter name:"), QString::null, &ok, this );
+ i18n("Please enter name:"), TQString::null, &ok, this );
if ( !ok || name.isEmpty() )
return;
}
diff --git a/kmail/distributionlistdialog.h b/kmail/distributionlistdialog.h
index 092cf84c3..84c96d5f2 100644
--- a/kmail/distributionlistdialog.h
+++ b/kmail/distributionlistdialog.h
@@ -31,7 +31,7 @@ class KListView;
class DistributionListDialog : public KDialogBase
{
public:
- DistributionListDialog( QWidget *parent );
+ DistributionListDialog( TQWidget *parent );
void setRecipients( const Recipient::List & );
@@ -39,7 +39,7 @@ class DistributionListDialog : public KDialogBase
void slotUser1();
private:
- QLineEdit *mTitleEdit;
+ TQLineEdit *mTitleEdit;
KListView *mRecipientsList;
};
diff --git a/kmail/editorwatcher.cpp b/kmail/editorwatcher.cpp
index e9fec6608..273c5997f 100644
--- a/kmail/editorwatcher.cpp
+++ b/kmail/editorwatcher.cpp
@@ -27,7 +27,7 @@
#include <kprocess.h>
#include <kuserprofile.h>
-#include <qsocketnotifier.h>
+#include <tqsocketnotifier.h>
#include <cassert>
@@ -48,8 +48,8 @@
using namespace KMail;
-EditorWatcher::EditorWatcher(const KURL & url, const QString &mimeType, bool openWith, QObject * parent) :
- QObject( parent ),
+EditorWatcher::EditorWatcher(const KURL & url, const TQString &mimeType, bool openWith, TQObject * parent) :
+ TQObject( parent ),
mUrl( url ),
mMimeType( mimeType ),
mOpenWith( openWith ),
@@ -61,7 +61,7 @@ EditorWatcher::EditorWatcher(const KURL & url, const QString &mimeType, bool ope
mDone( false )
{
assert( mUrl.isLocalFile() );
- connect( &mTimer, SIGNAL(timeout()), SLOT(checkEditDone()) );
+ connect( &mTimer, TQT_SIGNAL(timeout()), TQT_SLOT(checkEditDone()) );
}
bool EditorWatcher::start()
@@ -71,7 +71,7 @@ bool EditorWatcher::start()
list.append( mUrl );
KService::Ptr offer = KServiceTypeProfile::preferredService( mMimeType, "Application" );
if ( mOpenWith || !offer ) {
- KOpenWithDlg dlg( list, i18n("Edit with:"), QString::null, 0 );
+ KOpenWithDlg dlg( list, i18n("Edit with:"), TQString::null, 0 );
if ( !dlg.exec() )
return false;
offer = dlg.service();
@@ -85,8 +85,8 @@ bool EditorWatcher::start()
if ( mInotifyFd > 0 ) {
mInotifyWatch = inotify_add_watch( mInotifyFd, mUrl.path().latin1(), IN_CLOSE | IN_OPEN | IN_MODIFY );
if ( mInotifyWatch >= 0 ) {
- QSocketNotifier *sn = new QSocketNotifier( mInotifyFd, QSocketNotifier::Read, this );
- connect( sn, SIGNAL(activated(int)), SLOT(inotifyEvent()) );
+ TQSocketNotifier *sn = new TQSocketNotifier( mInotifyFd, TQSocketNotifier::Read, this );
+ connect( sn, TQT_SIGNAL(activated(int)), TQT_SLOT(inotifyEvent()) );
mHaveInotify = true;
mFileModified = false;
}
@@ -96,10 +96,10 @@ bool EditorWatcher::start()
#endif
// start the editor
- QStringList params = KRun::processDesktopExec( *offer, list, false );
+ TQStringList params = KRun::processDesktopExec( *offer, list, false );
mEditor = new KProcess( this );
*mEditor << params;
- connect( mEditor, SIGNAL(processExited(KProcess*)), SLOT(editorExited()) );
+ connect( mEditor, TQT_SIGNAL(processExited(KProcess*)), TQT_SLOT(editorExited()) );
if ( !mEditor->start() )
return false;
mEditorRunning = true;
diff --git a/kmail/editorwatcher.h b/kmail/editorwatcher.h
index d7fc9e3e3..e0d609051 100644
--- a/kmail/editorwatcher.h
+++ b/kmail/editorwatcher.h
@@ -21,9 +21,9 @@
#include <kurl.h>
-#include <qdatetime.h>
-#include <qobject.h>
-#include <qtimer.h>
+#include <tqdatetime.h>
+#include <tqobject.h>
+#include <tqtimer.h>
class KProcess;
@@ -39,7 +39,7 @@ class EditorWatcher : public QObject
{
Q_OBJECT
public:
- EditorWatcher( const KURL &url, const QString &mimeType, bool openWith, QObject *parent = 0 );
+ EditorWatcher( const KURL &url, const TQString &mimeType, bool openWith, TQObject *parent = 0 );
bool start();
bool fileChanged() const { return mFileModified; }
signals:
@@ -52,7 +52,7 @@ class EditorWatcher : public QObject
private:
KURL mUrl;
- QString mMimeType;
+ TQString mMimeType;
bool mOpenWith;
KProcess *mEditor;
@@ -65,8 +65,8 @@ class EditorWatcher : public QObject
bool mFileModified;
- QTimer mTimer;
- QTime mEditTime;
+ TQTimer mTimer;
+ TQTime mEditTime;
bool mError;
bool mDone;
diff --git a/kmail/encodingdetector.cpp b/kmail/encodingdetector.cpp
index e5881d6f7..60913c9fc 100644
--- a/kmail/encodingdetector.cpp
+++ b/kmail/encodingdetector.cpp
@@ -37,8 +37,8 @@
#include "encodingdetector_ja_p.h"
-#include <qregexp.h>
-#include <qtextcodec.h>
+#include <tqregexp.h>
+#include <tqtextcodec.h>
#include <kglobal.h>
#include <kcharsets.h>
@@ -320,7 +320,7 @@ enum MIB
MibUtf16LE = 1014
};
-static bool is16Bit(QTextCodec* codec)
+static bool is16Bit(TQTextCodec* codec)
{
switch (codec->mibEnum())
{
@@ -337,10 +337,10 @@ static bool is16Bit(QTextCodec* codec)
class EncodingDetectorPrivate
{
public:
- QTextCodec *m_codec;
- QTextDecoder *m_decoder; // utf16
- QTextCodec *m_defaultCodec;
- QCString m_storeDecoderName;
+ TQTextCodec *m_codec;
+ TQTextDecoder *m_decoder; // utf16
+ TQTextCodec *m_defaultCodec;
+ TQCString m_storeDecoderName;
EncodingDetector::EncodingChoiceSource m_source;
EncodingDetector::AutoDetectScript m_autoDetectLanguage;
@@ -351,10 +351,10 @@ public:
bool m_analyzeCalled : 1; //for decode()
int m_multiByte;
- QCString m_bufferForDefferedEncDetection;
+ TQCString m_bufferForDefferedEncDetection;
EncodingDetectorPrivate()
- : m_codec(QTextCodec::codecForMib(MibLatin1))
+ : m_codec(TQTextCodec::codecForMib(MibLatin1))
, m_decoder(m_codec->makeDecoder())
, m_defaultCodec(m_codec)
, m_source(EncodingDetector::DefaultEncoding)
@@ -367,7 +367,7 @@ public:
{
}
- EncodingDetectorPrivate(QTextCodec* codec,EncodingDetector::EncodingChoiceSource source, EncodingDetector::AutoDetectScript script)
+ EncodingDetectorPrivate(TQTextCodec* codec,EncodingDetector::EncodingChoiceSource source, EncodingDetector::AutoDetectScript script)
: m_codec(codec)
, m_decoder(m_codec->makeDecoder())
, m_defaultCodec(m_codec)
@@ -388,7 +388,7 @@ public:
};
-static QCString automaticDetectionForArabic( const unsigned char* ptr, int size )
+static TQCString 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
@@ -402,7 +402,7 @@ static QCString automaticDetectionForArabic( const unsigned char* ptr, int size
return "iso-8859-6";
}
-static QCString automaticDetectionForBaltic( const unsigned char* ptr, int size )
+static TQCString automaticDetectionForBaltic( const unsigned char* ptr, int size )
{
for ( int i = 0; i < size; ++i ) {
if ( ( ptr[ i ] >= 0x80 && ptr[ i ] <= 0x9E ) )
@@ -415,9 +415,9 @@ static QCString automaticDetectionForBaltic( const unsigned char* ptr, int size
return "iso-8859-13";
}
-static QCString automaticDetectionForCentralEuropean(const unsigned char* ptr, int size )
+static TQCString automaticDetectionForCentralEuropean(const unsigned char* ptr, int size )
{
- QCString charset;
+ TQCString charset;
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 )
@@ -447,7 +447,7 @@ static QCString automaticDetectionForCentralEuropean(const unsigned char* ptr, i
return charset.data();
}
-static QCString automaticDetectionForCyrillic( const unsigned char* ptr, int size)
+static TQCString automaticDetectionForCyrillic( const unsigned char* ptr, int size)
{
#ifdef DECODE_DEBUG
kWarning() << "EncodingDetector: Cyr heuristics";
@@ -565,8 +565,8 @@ static QCString automaticDetectionForCyrillic( const unsigned char* ptr, int siz
if (ibm866_small_range>cp1251_small_range+koi_small_range)
return "ibm866";
-// 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)
koi_score+=10;
@@ -643,7 +643,7 @@ static QCString automaticDetectionForCyrillic( const unsigned char* ptr, int siz
}
-static QCString automaticDetectionForGreek( const unsigned char* ptr, int size )
+static TQCString 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
@@ -656,7 +656,7 @@ static QCString automaticDetectionForGreek( const unsigned char* ptr, int size )
return "iso-8859-7";
}
-static QCString automaticDetectionForHebrew( const unsigned char* ptr, int size )
+static TQCString 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
@@ -672,7 +672,7 @@ static QCString automaticDetectionForHebrew( const unsigned char* ptr, int size
return "iso-8859-8-i";
}
-static QCString automaticDetectionForJapanese( const unsigned char* ptr, int size )
+static TQCString automaticDetectionForJapanese( const unsigned char* ptr, int size )
{
JapaneseCode kc;
@@ -692,7 +692,7 @@ static QCString automaticDetectionForJapanese( const unsigned char* ptr, int siz
return "";
}
-static QCString automaticDetectionForTurkish( const unsigned char* ptr, int size )
+static TQCString 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 ) {
@@ -703,7 +703,7 @@ static QCString automaticDetectionForTurkish( const unsigned char* ptr, int size
return "iso-8859-9";
}
-static QCString automaticDetectionForWesternEuropean( const unsigned char* ptr, int size )
+static TQCString automaticDetectionForWesternEuropean( const unsigned char* ptr, int size )
{
uint nonansi_count=0;
for (int i=0; i<size; ++i)
@@ -765,7 +765,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();
int pos = str.find("encoding");
@@ -878,7 +878,7 @@ EncodingDetector::EncodingDetector() : d(new EncodingDetectorPrivate)
{
}
-EncodingDetector::EncodingDetector(QTextCodec* codec, EncodingChoiceSource source, AutoDetectScript script) :
+EncodingDetector::EncodingDetector(TQTextCodec* codec, EncodingChoiceSource source, AutoDetectScript script) :
d(new EncodingDetectorPrivate(codec,source,script))
{
}
@@ -913,20 +913,20 @@ bool EncodingDetector::visuallyOrdered() const
return d->m_visualRTL;
}
-// const QTextCodec* EncodingDetector::codec() const
+// const TQTextCodec* EncodingDetector::codec() const
// {
// return d->m_codec;
// }
-QTextDecoder* EncodingDetector::decoder()
+TQTextDecoder* EncodingDetector::decoder()
{
return d->m_decoder;
}
bool EncodingDetector::setEncoding(const char *_encoding, EncodingChoiceSource type)
{
- QTextCodec *codec;
- QCString enc(_encoding);
+ TQTextCodec *codec;
+ TQCString enc(_encoding);
if(/*enc.isNull() || */enc.isEmpty())
{
if (type==DefaultEncoding)
@@ -960,8 +960,8 @@ bool EncodingDetector::setEncoding(const char *_encoding, EncodingChoiceSource t
if (codec->mibEnum() == Mib8859_8)
{
- //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"||enc=="csiso88598i"||enc=="logical"))
@@ -978,7 +978,7 @@ bool EncodingDetector::setEncoding(const char *_encoding, EncodingChoiceSource t
return true;
}
-bool EncodingDetector::analyze(const QByteArray &data)
+bool EncodingDetector::analyze(const TQByteArray &data)
{
return analyze( data.data(), data.size() );
}
@@ -1032,7 +1032,7 @@ bool EncodingDetector::analyze(const char *data, int len)
if (autoDetectedEncoding != 0)
{
d->m_source = BOM;
- d->m_codec = QTextCodec::codecForName(autoDetectedEncoding);
+ d->m_codec = TQTextCodec::codecForName(autoDetectedEncoding);
assert(d->m_codec);
//enc = d->m_codec->name();
delete d->m_decoder;
@@ -1094,7 +1094,7 @@ bool EncodingDetector::analyze(const char *data, int len)
end++;
if (*end == '\0' || end == pEnd)
break;
- QCString str(ptr, end - ptr + 1);
+ TQCString str(ptr, end - ptr + 1);
int length;
int pos = findXMLEncoding(str, length);
// also handles the case when specified encoding aint correct
@@ -1136,7 +1136,7 @@ bool EncodingDetector::analyze(const char *data, int len)
while(*end != '>' && *end != '\0' && end<pEnd)
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;
@@ -1243,7 +1243,7 @@ bool EncodingDetector::analyze(const char *data, int len)
}
-EncodingDetector::AutoDetectScript EncodingDetector::scriptForName(const QString& lang)
+EncodingDetector::AutoDetectScript EncodingDetector::scriptForName(const TQString& lang)
{
if (lang.isEmpty())
return EncodingDetector::None;
@@ -1305,7 +1305,7 @@ bool EncodingDetector::hasAutoDetectionForScript(EncodingDetector::AutoDetectScr
}
}
-QString EncodingDetector::nameForScript(EncodingDetector::AutoDetectScript script)
+TQString EncodingDetector::nameForScript(EncodingDetector::AutoDetectScript script)
{
switch (script)
{
@@ -1353,12 +1353,12 @@ QString EncodingDetector::nameForScript(EncodingDetector::AutoDetectScript scrip
break;
//case EncodingDetector::SemiautomaticDetection:
default:
- return QString();
+ return TQString();
}
}
-EncodingDetector::AutoDetectScript EncodingDetector::scriptForLanguageCode(const QString &lc)
+EncodingDetector::AutoDetectScript EncodingDetector::scriptForLanguageCode(const TQString &lc)
{
// It might make sense to do something special if the locale ends with
// ".UTF-8" or "@utf8"
@@ -1367,7 +1367,7 @@ EncodingDetector::AutoDetectScript EncodingDetector::scriptForLanguageCode(const
for ( int i = 0; langStr; i++ ) {
langStr = pango_script_for_lang[i].lang;
// startsWith() works for empty strings: every string "starts with" an empty string.
- if ( lc.startsWith( QString::fromAscii( langStr ) ) )
+ if ( lc.startsWith( TQString::fromAscii( langStr ) ) )
return pango_script_for_lang[i].scripts[0];
}
return None;
diff --git a/kmail/encodingdetector.h b/kmail/encodingdetector.h
index 51ccb4695..0d1c000ab 100644
--- a/kmail/encodingdetector.h
+++ b/kmail/encodingdetector.h
@@ -23,7 +23,7 @@
#ifndef ENCODINGDETECTOR_H
#define ENCODINGDETECTOR_H
-#include <qstring.h>
+#include <tqstring.h>
class QTextCodec;
class QTextDecoder;
@@ -41,11 +41,11 @@ class EncodingDetectorPrivate;
*
* Typical use:
* \code
- * QByteArray data;
+ * TQByteArray data;
* ...
* EncodingDetector detector;
* detector.setAutoDetectLanguage(EncodingDetector::Cyrillic);
- * QString out=detector.decode(data);
+ * TQString out=detector.decode(data);
* \endcode
*
*
@@ -98,10 +98,10 @@ public:
/**
* Allows to set Default codec, EncodingChoiceSource, AutoDetectScript
*/
- EncodingDetector(QTextCodec* codec, EncodingChoiceSource source, AutoDetectScript script=None);
+ EncodingDetector(TQTextCodec* codec, EncodingChoiceSource source, AutoDetectScript script=None);
~EncodingDetector();
- //const QTextCodec* codec() const;
+ //const TQTextCodec* codec() const;
/**
* @returns true if specified encoding was recognized
@@ -116,8 +116,8 @@ public:
bool visuallyOrdered() const;
-// void setAutoDetectLanguage( const QString& );
-// const QString& autoDetectLanguage() const;
+// void setAutoDetectLanguage( const TQString& );
+// const TQString& autoDetectLanguage() const;
void setAutoDetectLanguage( AutoDetectScript );
AutoDetectScript autoDetectLanguage() const;
@@ -134,14 +134,14 @@ public:
* Analyze text data.
* @returns true if there was enough data for accurate detection
*/
- bool analyze( const QByteArray &data );
+ bool analyze( const TQByteArray &data );
/**
* Takes lang name _after_ it were i18n()'ed
*/
- static AutoDetectScript scriptForName(const QString& lang);
- static QString nameForScript(AutoDetectScript);
- static AutoDetectScript scriptForLanguageCode(const QString &lang);
+ static AutoDetectScript scriptForName(const TQString& lang);
+ static TQString nameForScript(AutoDetectScript);
+ static AutoDetectScript scriptForLanguageCode(const TQString &lang);
static bool hasAutoDetectionForScript(AutoDetectScript);
protected:
@@ -155,9 +155,9 @@ protected:
bool errorsIfUtf8 (const char* data, int length);
/**
- * @returns QTextDecoder for detected encoding
+ * @returns TQTextDecoder for detected encoding
*/
- QTextDecoder* decoder();
+ TQTextDecoder* decoder();
private:
EncodingDetectorPrivate* const d;
diff --git a/kmail/encodingdetector_ja.cpp b/kmail/encodingdetector_ja.cpp
index 0c42f7e47..d5eeb1e0e 100644
--- a/kmail/encodingdetector_ja.cpp
+++ b/kmail/encodingdetector_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 "encodingdetector_ja_p.h"
diff --git a/kmail/encodingdetector_ja_p.h b/kmail/encodingdetector_ja_p.h
index c23de8354..27cd067be 100644
--- a/kmail/encodingdetector_ja_p.h
+++ b/kmail/encodingdetector_ja_p.h
@@ -38,7 +38,7 @@
#ifndef GUESS_JA_H
#define GUESS_JA_H
-#include <qglobal.h>
+#include <tqglobal.h>
#ifdef Q_WS_WIN
#undef UNICODE
#endif
diff --git a/kmail/expirejob.cpp b/kmail/expirejob.cpp
index e7e853b0a..a97c08429 100644
--- a/kmail/expirejob.cpp
+++ b/kmail/expirejob.cpp
@@ -107,7 +107,7 @@ void ExpireJob::execute()
mFolderOpen = true;
mCurrentIndex = storage->count()-1;
kdDebug(5006) << "ExpireJob: starting to expire in folder " << mSrcFolder->location() << endl;
- connect( &mTimer, SIGNAL( timeout() ), SLOT( slotDoWork() ) );
+ connect( &mTimer, TQT_SIGNAL( timeout() ), TQT_SLOT( slotDoWork() ) );
mTimer.start( EXPIREJOB_TIMERINTERVAL );
slotDoWork();
// do nothing here, we might be deleted!
@@ -143,7 +143,7 @@ void ExpireJob::done()
{
mTimer.stop();
- QString str;
+ TQString str;
bool moving = false;
if ( !mRemovedMsgs.isEmpty() ) {
@@ -156,8 +156,8 @@ void ExpireJob::done()
<< mSrcFolder->location()
<< " " << count << " messages to remove." << endl;
KMMoveCommand* cmd = new KMMoveCommand( 0, mRemovedMsgs );
- connect( cmd, SIGNAL( completed( KMCommand * ) ),
- this, SLOT( slotMessagesMoved( KMCommand * ) ) );
+ connect( cmd, TQT_SIGNAL( completed( KMCommand * ) ),
+ this, TQT_SLOT( slotMessagesMoved( KMCommand * ) ) );
cmd->start();
moving = true;
str = i18n( "Removing 1 old message from folder %1...",
@@ -178,8 +178,8 @@ void ExpireJob::done()
<< mRemovedMsgs.count() << " messages to move to "
<< mMoveToFolder->label() << endl;
KMMoveCommand* cmd = new KMMoveCommand( mMoveToFolder, mRemovedMsgs );
- connect( cmd, SIGNAL( completed( KMCommand * ) ),
- this, SLOT( slotMessagesMoved( KMCommand * ) ) );
+ connect( cmd, TQT_SIGNAL( completed( KMCommand * ) ),
+ this, TQT_SLOT( slotMessagesMoved( KMCommand * ) ) );
cmd->start();
moving = true;
str = i18n( "Moving 1 old message from folder %1 to folder %2...",
@@ -206,7 +206,7 @@ void ExpireJob::slotMessagesMoved( KMCommand *command )
{
mSrcFolder->storage()->close( "expirejob" );
mFolderOpen = false;
- QString msg;
+ TQString msg;
switch ( command->result() ) {
case KMCommand::OK:
if ( mSrcFolder->expireAction() == KMFolder::ExpireDelete ) {
diff --git a/kmail/expirejob.h b/kmail/expirejob.h
index 71bfc65ea..16e4c7bd8 100644
--- a/kmail/expirejob.h
+++ b/kmail/expirejob.h
@@ -51,8 +51,8 @@ private:
void done();
private:
- QTimer mTimer;
- QPtrList<KMMsgBase> mRemovedMsgs;
+ TQTimer mTimer;
+ TQPtrList<KMMsgBase> mRemovedMsgs;
int mCurrentIndex;
int mMaxUnreadTime;
int mMaxReadTime;
diff --git a/kmail/expirypropertiesdialog.cpp b/kmail/expirypropertiesdialog.cpp
index 62d9047fa..a313cc88d 100644
--- a/kmail/expirypropertiesdialog.cpp
+++ b/kmail/expirypropertiesdialog.cpp
@@ -4,18 +4,18 @@
#include "kmfolder.h"
#include "kmfoldertree.h"
-#include <qvariant.h>
-#include <qpushbutton.h>
-#include <qgroupbox.h>
-#include <qcheckbox.h>
-#include <qspinbox.h>
-#include <qlabel.h>
-#include <qradiobutton.h>
-#include <qbuttongroup.h>
-#include <qcombobox.h>
-#include <qlayout.h>
-#include <qtooltip.h>
-#include <qwhatsthis.h>
+#include <tqvariant.h>
+#include <tqpushbutton.h>
+#include <tqgroupbox.h>
+#include <tqcheckbox.h>
+#include <tqspinbox.h>
+#include <tqlabel.h>
+#include <tqradiobutton.h>
+#include <tqbuttongroup.h>
+#include <tqcombobox.h>
+#include <tqlayout.h>
+#include <tqtooltip.h>
+#include <tqwhatsthis.h>
#include <klocale.h>
#include <kmessagebox.h>
@@ -34,66 +34,66 @@ ExpiryPropertiesDialog::ExpiryPropertiesDialog( KMFolderTree* tree, KMFolder* fo
mFolder( folder )
{
setWFlags( getWFlags() | WDestructiveClose );
- QWidget* privateLayoutWidget = new QWidget( this, "globalVBox" );
+ TQWidget* privateLayoutWidget = new TQWidget( this, "globalVBox" );
setMainWidget( privateLayoutWidget );
- privateLayoutWidget->setGeometry( QRect( 10, 20, 270, 138 ) );
- globalVBox = new QVBoxLayout( privateLayoutWidget, 11, 6, "globalVBox");
+ privateLayoutWidget->setGeometry( TQRect( 10, 20, 270, 138 ) );
+ globalVBox = new TQVBoxLayout( privateLayoutWidget, 11, 6, "globalVBox");
globalVBox->setSpacing( 20 );
- readHBox = new QHBoxLayout( 0, 0, 6, "readHBox");
+ readHBox = new TQHBoxLayout( 0, 0, 6, "readHBox");
- expireReadMailCB = new QCheckBox( privateLayoutWidget, "expireReadMailCB" );
+ expireReadMailCB = new TQCheckBox( privateLayoutWidget, "expireReadMailCB" );
expireReadMailCB->setText( i18n( "Expire read mails after" ) );
- connect( expireReadMailCB, SIGNAL( toggled( bool )),
- this, SLOT( slotUpdateControls() ) );
+ connect( expireReadMailCB, TQT_SIGNAL( toggled( bool )),
+ this, TQT_SLOT( slotUpdateControls() ) );
readHBox->addWidget( expireReadMailCB );
- expireReadMailSB = new QSpinBox( privateLayoutWidget, "expireReadMailSB" );
+ expireReadMailSB = new TQSpinBox( privateLayoutWidget, "expireReadMailSB" );
expireReadMailSB->setMaxValue( 999999 );
expireReadMailSB->setValue( 30 );
readHBox->addWidget( expireReadMailSB );
- labelDays = new QLabel( privateLayoutWidget, "labelDays" );
+ labelDays = new TQLabel( privateLayoutWidget, "labelDays" );
labelDays->setText( i18n( "days" ) );
readHBox->addWidget( labelDays );
globalVBox->addLayout( readHBox );
- unreadHBox = new QHBoxLayout( 0, 0, 6, "unreadHBox");
+ unreadHBox = new TQHBoxLayout( 0, 0, 6, "unreadHBox");
- expireUnreadMailCB = new QCheckBox( privateLayoutWidget, "expireUnreadMailCB" );
+ expireUnreadMailCB = new TQCheckBox( privateLayoutWidget, "expireUnreadMailCB" );
expireUnreadMailCB->setText( i18n( "Expire unread mails after" ) );
- connect( expireUnreadMailCB, SIGNAL( toggled( bool )),
- this, SLOT( slotUpdateControls() ) );
+ connect( expireUnreadMailCB, TQT_SIGNAL( toggled( bool )),
+ this, TQT_SLOT( slotUpdateControls() ) );
unreadHBox->addWidget( expireUnreadMailCB );
- expireUnreadMailSB = new QSpinBox( privateLayoutWidget, "expireUnreadMailSB" );
+ expireUnreadMailSB = new TQSpinBox( privateLayoutWidget, "expireUnreadMailSB" );
expireUnreadMailSB->setMaxValue( 99999 );
expireUnreadMailSB->setValue( 30 );
unreadHBox->addWidget( expireUnreadMailSB );
- labelDays2 = new QLabel( privateLayoutWidget, "labelDays2" );
+ labelDays2 = new TQLabel( privateLayoutWidget, "labelDays2" );
labelDays2->setText( i18n( "days" ) );
- labelDays2->setAlignment( int( QLabel::AlignTop ) );
+ labelDays2->setAlignment( int( TQLabel::AlignTop ) );
unreadHBox->addWidget( labelDays2 );
globalVBox->addLayout( unreadHBox );
- expiryActionHBox = new QHBoxLayout( 0, 0, 6, "expiryActionHBox");
+ expiryActionHBox = new TQHBoxLayout( 0, 0, 6, "expiryActionHBox");
- expiryActionLabel = new QLabel( privateLayoutWidget, "expiryActionLabel" );
+ expiryActionLabel = new TQLabel( privateLayoutWidget, "expiryActionLabel" );
expiryActionLabel->setText( i18n( "Expiry action:" ) );
- expiryActionLabel->setAlignment( int( QLabel::AlignVCenter ) );
+ expiryActionLabel->setAlignment( int( TQLabel::AlignVCenter ) );
expiryActionHBox->addWidget( expiryActionLabel );
- actionsHBox = new QVBoxLayout( 0, 0, 6, "actionsHBox");
- actionsGroup = new QButtonGroup( this );
+ actionsHBox = new TQVBoxLayout( 0, 0, 6, "actionsHBox");
+ actionsGroup = new TQButtonGroup( this );
actionsGroup->hide(); // for mutual exclusion of the radio buttons
- moveToHBox = new QHBoxLayout( 0, 0, 6, "moveToHBox");
+ moveToHBox = new TQHBoxLayout( 0, 0, 6, "moveToHBox");
- moveToRB = new QRadioButton( privateLayoutWidget, "moveToRB" );
+ moveToRB = new TQRadioButton( privateLayoutWidget, "moveToRB" );
actionsGroup->insert( moveToRB );
- connect( moveToRB, SIGNAL( toggled( bool ) ),
- this, SLOT( slotUpdateControls() ) );
+ connect( moveToRB, TQT_SIGNAL( toggled( bool ) ),
+ this, TQT_SLOT( slotUpdateControls() ) );
moveToRB->setText( i18n( "Move to:" ) );
moveToHBox->addWidget( moveToRB );
@@ -102,16 +102,16 @@ ExpiryPropertiesDialog::ExpiryPropertiesDialog( KMFolderTree* tree, KMFolder* fo
moveToHBox->addWidget( folderSelector );
actionsHBox->addLayout( moveToHBox );
- deletePermanentlyRB = new QRadioButton( privateLayoutWidget, "deletePermanentlyRB" );
+ deletePermanentlyRB = new TQRadioButton( privateLayoutWidget, "deletePermanentlyRB" );
actionsGroup->insert( deletePermanentlyRB );
deletePermanentlyRB->setText( i18n( "Delete permanently" ) );
actionsHBox->addWidget( deletePermanentlyRB );
expiryActionHBox->addLayout( actionsHBox );
globalVBox->addLayout( expiryActionHBox );
- note = new QLabel( privateLayoutWidget, "note" );
+ note = new TQLabel( privateLayoutWidget, "note" );
note->setText( i18n( "Note: Expiry action will be applied immediately after confirming settings." ) );
- note->setAlignment( int( QLabel::WordBreak | QLabel::AlignVCenter ) );
+ note->setAlignment( int( TQLabel::WordBreak | TQLabel::AlignVCenter ) );
globalVBox->addWidget( note );
// Load the values from the folder
@@ -137,14 +137,14 @@ ExpiryPropertiesDialog::ExpiryPropertiesDialog( KMFolderTree* tree, KMFolder* fo
else
moveToRB->setChecked( true );
- QString destFolderID = mFolder->expireToFolderId();
+ TQString destFolderID = mFolder->expireToFolderId();
if ( !destFolderID.isEmpty() ) {
KMFolder* destFolder = kmkernel->findFolderById( destFolderID );
if ( destFolder )
folderSelector->setFolder( destFolder );
}
slotUpdateControls();
- resize( QSize(295, 204).expandedTo(minimumSizeHint()) );
+ resize( TQSize(295, 204).expandedTo(minimumSizeHint()) );
clearWState( WState_Polished );
}
diff --git a/kmail/expirypropertiesdialog.h b/kmail/expirypropertiesdialog.h
index 9ac32500e..d23bab2a0 100644
--- a/kmail/expirypropertiesdialog.h
+++ b/kmail/expirypropertiesdialog.h
@@ -10,7 +10,7 @@
#ifndef EXPIRYPROPERTIESDIALOG_H
#define EXPIRYPROPERTIESDIALOG_H
-#include <qvariant.h>
+#include <tqvariant.h>
#include <kdialogbase.h>
class QVBoxLayout;
@@ -38,30 +38,30 @@ public:
ExpiryPropertiesDialog( KMFolderTree* tree, KMFolder* folder );
~ExpiryPropertiesDialog();
- QCheckBox* expireReadMailCB;
- QSpinBox* expireReadMailSB;
- QLabel* labelDays;
- QCheckBox* expireUnreadMailCB;
- QSpinBox* expireUnreadMailSB;
- QLabel* labelDays2;
- QLabel* expiryActionLabel;
- QRadioButton* moveToRB;
+ TQCheckBox* expireReadMailCB;
+ TQSpinBox* expireReadMailSB;
+ TQLabel* labelDays;
+ TQCheckBox* expireUnreadMailCB;
+ TQSpinBox* expireUnreadMailSB;
+ TQLabel* labelDays2;
+ TQLabel* expiryActionLabel;
+ TQRadioButton* moveToRB;
FolderRequester *folderSelector;
- QRadioButton* deletePermanentlyRB;
- QLabel* note;
- QButtonGroup* actionsGroup;
+ TQRadioButton* deletePermanentlyRB;
+ TQLabel* note;
+ TQButtonGroup* actionsGroup;
protected slots:
void slotOk();
void slotUpdateControls();
protected:
- QVBoxLayout* globalVBox;
- QHBoxLayout* readHBox;
- QHBoxLayout* unreadHBox;
- QHBoxLayout* expiryActionHBox;
- QVBoxLayout* actionsHBox;
- QHBoxLayout* moveToHBox;
+ TQVBoxLayout* globalVBox;
+ TQHBoxLayout* readHBox;
+ TQHBoxLayout* unreadHBox;
+ TQHBoxLayout* expiryActionHBox;
+ TQVBoxLayout* actionsHBox;
+ TQHBoxLayout* moveToHBox;
KMFolder* mFolder;
};
} // namespace
diff --git a/kmail/favoritefolderview.cpp b/kmail/favoritefolderview.cpp
index abe223d8d..35b2e3ee4 100644
--- a/kmail/favoritefolderview.cpp
+++ b/kmail/favoritefolderview.cpp
@@ -42,28 +42,28 @@
#include <kpopupmenu.h>
#include <kio/global.h>
-#include <qheader.h>
-#include <qtimer.h>
+#include <tqheader.h>
+#include <tqtimer.h>
#include <cassert>
using namespace KMail;
-FavoriteFolderViewItem::FavoriteFolderViewItem(FavoriteFolderView * parent, const QString & name, KMFolder * folder)
+FavoriteFolderViewItem::FavoriteFolderViewItem(FavoriteFolderView * parent, const TQString & name, KMFolder * folder)
: KMFolderTreeItem( parent, name, folder ),
mOldName( folder->label() )
{
// same stuff as in KMFolderTreeItem again, this time even with virtual methods working
init();
- connect( folder, SIGNAL(nameChanged()), SLOT(nameChanged()) );
- connect( folder, SIGNAL(iconsChanged()), SLOT(slotIconsChanged()) );
+ connect( folder, TQT_SIGNAL(nameChanged()), TQT_SLOT(nameChanged()) );
+ connect( folder, TQT_SIGNAL(iconsChanged()), TQT_SLOT(slotIconsChanged()) );
- connect( folder, SIGNAL(msgAdded(KMFolder*,Q_UINT32)), SLOT(updateCount()) );
- connect( folder, SIGNAL(numUnreadMsgsChanged(KMFolder*)), SLOT(updateCount()) );
- connect( folder, SIGNAL(msgRemoved(KMFolder*)), SLOT(updateCount()) );
- connect( folder, SIGNAL(folderSizeChanged( KMFolder* )), SLOT(updateCount()) );
+ connect( folder, TQT_SIGNAL(msgAdded(KMFolder*,Q_UINT32)), TQT_SLOT(updateCount()) );
+ connect( folder, TQT_SIGNAL(numUnreadMsgsChanged(KMFolder*)), TQT_SLOT(updateCount()) );
+ connect( folder, TQT_SIGNAL(msgRemoved(KMFolder*)), TQT_SLOT(updateCount()) );
+ connect( folder, TQT_SIGNAL(folderSizeChanged( KMFolder* )), TQT_SLOT(updateCount()) );
- QTimer::singleShot( 0, this, SLOT(updateCount()) );
+ TQTimer::singleShot( 0, this, TQT_SLOT(updateCount()) );
if ( unreadCount() > 0 )
setPixmap( 0, unreadIcon( iconSize() ) );
@@ -73,15 +73,15 @@ FavoriteFolderViewItem::FavoriteFolderViewItem(FavoriteFolderView * parent, cons
void FavoriteFolderViewItem::nameChanged()
{
- QString txt = text( 0 );
+ TQString txt = text( 0 );
txt.replace( mOldName, folder()->label() );
setText( 0, txt );
mOldName = folder()->label();
}
-QValueList<FavoriteFolderView*> FavoriteFolderView::mInstances;
+TQValueList<FavoriteFolderView*> FavoriteFolderView::mInstances;
-FavoriteFolderView::FavoriteFolderView( KMMainWidget *mainWidget, QWidget * parent) :
+FavoriteFolderView::FavoriteFolderView( KMMainWidget *mainWidget, TQWidget * parent) :
FolderTreeBase( mainWidget, parent ),
mContextMenuItem( 0 ),
mReadingConfig( false )
@@ -97,25 +97,25 @@ FavoriteFolderView::FavoriteFolderView( KMMainWidget *mainWidget, QWidget * pare
setSorting( -1 );
setShowSortIndicator( false );
- connect( this, SIGNAL(selectionChanged()), SLOT(selectionChanged()) );
- connect( this, SIGNAL(clicked(QListViewItem*)), SLOT(itemClicked(QListViewItem*)) );
- connect( this, SIGNAL(dropped(QDropEvent*,QListViewItem*)), SLOT(dropped(QDropEvent*,QListViewItem*)) );
- connect( this, SIGNAL(contextMenuRequested(QListViewItem*, const QPoint &, int)),
- SLOT(contextMenu(QListViewItem*,const QPoint&)) );
- connect( this, SIGNAL(moved()), SLOT(notifyInstancesOnChange()) );
- connect( this, SIGNAL(triggerRefresh()), SLOT(refresh()) );
-
- connect( kmkernel->folderMgr(), SIGNAL(changed()), SLOT(initializeFavorites()) );
- connect( kmkernel->dimapFolderMgr(), SIGNAL(changed()), SLOT(initializeFavorites()) );
- connect( kmkernel->imapFolderMgr(), SIGNAL(changed()), SLOT(initializeFavorites()) );
- connect( kmkernel->searchFolderMgr(), SIGNAL(changed()), SLOT(initializeFavorites()) );
-
- connect( kmkernel->folderMgr(), SIGNAL(folderRemoved(KMFolder*)), SLOT(folderRemoved(KMFolder*)) );
- connect( kmkernel->dimapFolderMgr(), SIGNAL(folderRemoved(KMFolder*)), SLOT(folderRemoved(KMFolder*)) );
- connect( kmkernel->imapFolderMgr(), SIGNAL(folderRemoved(KMFolder*)), SLOT(folderRemoved(KMFolder*)) );
- connect( kmkernel->searchFolderMgr(), SIGNAL(folderRemoved(KMFolder*)), SLOT(folderRemoved(KMFolder*)) );
-
- QFont f = font();
+ connect( this, TQT_SIGNAL(selectionChanged()), TQT_SLOT(selectionChanged()) );
+ connect( this, TQT_SIGNAL(clicked(TQListViewItem*)), TQT_SLOT(itemClicked(TQListViewItem*)) );
+ connect( this, TQT_SIGNAL(dropped(TQDropEvent*,TQListViewItem*)), TQT_SLOT(dropped(TQDropEvent*,TQListViewItem*)) );
+ connect( this, TQT_SIGNAL(contextMenuRequested(TQListViewItem*, const TQPoint &, int)),
+ TQT_SLOT(contextMenu(TQListViewItem*,const TQPoint&)) );
+ connect( this, TQT_SIGNAL(moved()), TQT_SLOT(notifyInstancesOnChange()) );
+ connect( this, TQT_SIGNAL(triggerRefresh()), TQT_SLOT(refresh()) );
+
+ connect( kmkernel->folderMgr(), TQT_SIGNAL(changed()), TQT_SLOT(initializeFavorites()) );
+ connect( kmkernel->dimapFolderMgr(), TQT_SIGNAL(changed()), TQT_SLOT(initializeFavorites()) );
+ connect( kmkernel->imapFolderMgr(), TQT_SIGNAL(changed()), TQT_SLOT(initializeFavorites()) );
+ connect( kmkernel->searchFolderMgr(), TQT_SIGNAL(changed()), TQT_SLOT(initializeFavorites()) );
+
+ connect( kmkernel->folderMgr(), TQT_SIGNAL(folderRemoved(KMFolder*)), TQT_SLOT(folderRemoved(KMFolder*)) );
+ connect( kmkernel->dimapFolderMgr(), TQT_SIGNAL(folderRemoved(KMFolder*)), TQT_SLOT(folderRemoved(KMFolder*)) );
+ connect( kmkernel->imapFolderMgr(), TQT_SIGNAL(folderRemoved(KMFolder*)), TQT_SLOT(folderRemoved(KMFolder*)) );
+ connect( kmkernel->searchFolderMgr(), TQT_SIGNAL(folderRemoved(KMFolder*)), TQT_SLOT(folderRemoved(KMFolder*)) );
+
+ TQFont f = font();
f.setItalic( true );
setFont( f );
@@ -133,9 +133,9 @@ void FavoriteFolderView::readConfig()
{
mReadingConfig = true;
clear();
- QValueList<int> folderIds = GlobalSettings::self()->favoriteFolderIds();
- QStringList folderNames = GlobalSettings::self()->favoriteFolderNames();
- QListViewItem *afterItem = 0;
+ TQValueList<int> folderIds = GlobalSettings::self()->favoriteFolderIds();
+ TQStringList folderNames = GlobalSettings::self()->favoriteFolderNames();
+ TQListViewItem *afterItem = 0;
for ( uint i = 0; i < folderIds.count(); ++i ) {
KMFolder *folder = kmkernel->folderMgr()->findById( folderIds[i] );
if ( !folder )
@@ -144,7 +144,7 @@ void FavoriteFolderView::readConfig()
folder = kmkernel->dimapFolderMgr()->findById( folderIds[i] );
if ( !folder )
folder = kmkernel->searchFolderMgr()->findById( folderIds[i] );
- QString name;
+ TQString name;
if ( folderNames.count() > i )
name = folderNames[i];
afterItem = addFolder( folder, name, afterItem );
@@ -153,7 +153,7 @@ void FavoriteFolderView::readConfig()
ensureItemVisible( firstChild() );
// folder tree is not yet populated at this point
- QTimer::singleShot( 0, this, SLOT(initializeFavorites()) );
+ TQTimer::singleShot( 0, this, TQT_SLOT(initializeFavorites()) );
readColorConfig();
mReadingConfig = false;
@@ -161,9 +161,9 @@ void FavoriteFolderView::readConfig()
void FavoriteFolderView::writeConfig()
{
- QValueList<int> folderIds;
- QStringList folderNames;
- for ( QListViewItemIterator it( this ); it.current(); ++it ) {
+ TQValueList<int> folderIds;
+ TQStringList folderNames;
+ for ( TQListViewItemIterator it( this ); it.current(); ++it ) {
KMFolderTreeItem *fti = static_cast<KMFolderTreeItem*>( it.current() );
folderIds << fti->folder()->id();
folderNames << fti->text( 0 );
@@ -172,7 +172,7 @@ void FavoriteFolderView::writeConfig()
GlobalSettings::self()->setFavoriteFolderNames( folderNames );
}
-bool FavoriteFolderView::acceptDrag(QDropEvent * e) const
+bool FavoriteFolderView::acceptDrag(TQDropEvent * e) const
{
KMFolderTree *ft = mainWidget()->folderTree();
assert( ft );
@@ -182,7 +182,7 @@ bool FavoriteFolderView::acceptDrag(QDropEvent * e) const
return FolderTreeBase::acceptDrag( e );
}
-KMFolderTreeItem* FavoriteFolderView::addFolder(KMFolder * folder, const QString &name, QListViewItem *after)
+KMFolderTreeItem* FavoriteFolderView::addFolder(KMFolder * folder, const TQString &name, TQListViewItem *after)
{
if ( !folder )
return 0;
@@ -219,10 +219,10 @@ void FavoriteFolderView::handleGroupwareFolder( KMFolderTreeItem *fti )
break;
case KMail::ContentsTypeNote:
{
- QByteArray arg;
- QDataStream s( arg, IO_WriteOnly );
- s << QString( "kontact_knotesplugin" );
- kapp->dcopClient()->send( "kontact", "KontactIface", "selectPlugin(QString)", arg );
+ TQByteArray arg;
+ TQDataStream s( arg, IO_WriteOnly );
+ s << TQString( "kontact_knotesplugin" );
+ kapp->dcopClient()->send( "kontact", "KontactIface", "selectPlugin(TQString)", arg );
break;
}
case KMail::ContentsTypeCalendar:
@@ -230,25 +230,25 @@ void FavoriteFolderView::handleGroupwareFolder( KMFolderTreeItem *fti )
case KMail::ContentsTypeJournal:
{
KMail::KorgHelper::ensureRunning();
- QByteArray arg;
- QDataStream s( arg, IO_WriteOnly );
+ TQByteArray arg;
+ TQDataStream s( arg, IO_WriteOnly );
switch ( fti->folder()->storage()->contentsType() ) {
case KMail::ContentsTypeCalendar:
- s << QString( "kontact_korganizerplugin" ); break;
+ s << TQString( "kontact_korganizerplugin" ); break;
case KMail::ContentsTypeTask:
- s << QString( "kontact_todoplugin" ); break;
+ s << TQString( "kontact_todoplugin" ); break;
case KMail::ContentsTypeJournal:
- s << QString( "kontact_journalplugin" ); break;
+ s << TQString( "kontact_journalplugin" ); break;
default: assert( false );
}
- kapp->dcopClient()->send( "kontact", "KontactIface", "selectPlugin(QString)", arg );
+ kapp->dcopClient()->send( "kontact", "KontactIface", "selectPlugin(TQString)", arg );
break;
}
default: break;
}
}
-void FavoriteFolderView::itemClicked(QListViewItem * item)
+void FavoriteFolderView::itemClicked(TQListViewItem * item)
{
if ( !item ) return;
if ( !item->isSelected() )
@@ -261,7 +261,7 @@ void FavoriteFolderView::folderTreeSelectionChanged(KMFolder * folder)
{
blockSignals( true );
bool found = false;
- for ( QListViewItemIterator it( this ); it.current(); ++it ) {
+ for ( TQListViewItemIterator it( this ); it.current(); ++it ) {
KMFolderTreeItem *fti = static_cast<KMFolderTreeItem*>( it.current() );
if ( fti->folder() == folder && !fti->isSelected() ) {
fti->setSelected( true );
@@ -284,8 +284,8 @@ void FavoriteFolderView::folderTreeSelectionChanged(KMFolder * folder)
void FavoriteFolderView::folderRemoved(KMFolder * folder)
{
- QValueList<KMFolderTreeItem*> delItems;
- for ( QListViewItemIterator it( this ); it.current(); ++it ) {
+ TQValueList<KMFolderTreeItem*> delItems;
+ for ( TQListViewItemIterator it( this ); it.current(); ++it ) {
KMFolderTreeItem *fti = static_cast<KMFolderTreeItem*>( it.current() );
if ( fti->folder() == folder )
delItems << fti;
@@ -297,13 +297,13 @@ void FavoriteFolderView::folderRemoved(KMFolder * folder)
removeFromFolderToItemMap(folder);
}
-void FavoriteFolderView::dropped(QDropEvent * e, QListViewItem * after)
+void FavoriteFolderView::dropped(TQDropEvent * e, TQListViewItem * after)
{
- QListViewItem* afterItem = after;
+ TQListViewItem* afterItem = after;
KMFolderTree *ft = mainWidget()->folderTree();
assert( ft );
if ( e->source() == ft->viewport() && e->provides( "application/x-qlistviewitem" ) ) {
- for ( QListViewItemIterator it( ft ); it.current(); ++it ) {
+ for ( TQListViewItemIterator it( ft ); it.current(); ++it ) {
if ( !it.current()->isSelected() )
continue;
KMFolderTreeItem *fti = static_cast<KMFolderTreeItem*>( it.current() );
@@ -315,7 +315,7 @@ void FavoriteFolderView::dropped(QDropEvent * e, QListViewItem * after)
}
}
-void FavoriteFolderView::contextMenu(QListViewItem * item, const QPoint & point)
+void FavoriteFolderView::contextMenu(TQListViewItem * item, const TQPoint & point)
{
KMFolderTree *ft = mainWidget()->folderTree();
assert( ft );
@@ -324,8 +324,8 @@ void FavoriteFolderView::contextMenu(QListViewItem * item, const QPoint & point)
KPopupMenu contextMenu;
if ( fti && fti->folder() ) {
contextMenu.insertItem( SmallIconSet("editdelete"), i18n("Remove From Favorites"),
- this, SLOT(removeFolder()) );
- contextMenu.insertItem( SmallIconSet("edit"), i18n("Rename Favorite"), this, SLOT(renameFolder()) );
+ this, TQT_SLOT(removeFolder()) );
+ contextMenu.insertItem( SmallIconSet("edit"), i18n("Rename Favorite"), this, TQT_SLOT(renameFolder()) );
contextMenu.insertSeparator();
mainWidget()->action("mark_all_as_read")->plug( &contextMenu );
@@ -334,12 +334,12 @@ void FavoriteFolderView::contextMenu(QListViewItem * item, const QPoint & point)
if ( fti->folder()->isMailingListEnabled() )
mainWidget()->action("post_message")->plug( &contextMenu );
- contextMenu.insertItem( SmallIconSet("configure_shortcuts"), i18n("&Assign Shortcut..."), fti, SLOT(assignShortcut()) );
- contextMenu.insertItem( i18n("Expire..."), fti, SLOT(slotShowExpiryProperties()) );
+ contextMenu.insertItem( SmallIconSet("configure_shortcuts"), i18n("&Assign Shortcut..."), fti, TQT_SLOT(assignShortcut()) );
+ contextMenu.insertItem( i18n("Expire..."), fti, TQT_SLOT(slotShowExpiryProperties()) );
mainWidget()->action("modify")->plug( &contextMenu );
} else {
contextMenu.insertItem( SmallIconSet("bookmark_add"), i18n("Add Favorite Folder..."),
- this, SLOT(addFolder()) );
+ this, TQT_SLOT(addFolder()) );
}
contextMenu.exec( point, 0 );
}
@@ -353,10 +353,10 @@ void FavoriteFolderView::removeFolder()
void FavoriteFolderView::initializeFavorites()
{
- QValueList<int> seenInboxes = GlobalSettings::self()->favoriteFolderViewSeenInboxes();
+ TQValueList<int> seenInboxes = GlobalSettings::self()->favoriteFolderViewSeenInboxes();
KMFolderTree *ft = mainWidget()->folderTree();
assert( ft );
- for ( QListViewItemIterator it( ft ); it.current(); ++it ) {
+ for ( TQListViewItemIterator it( ft ); it.current(); ++it ) {
KMFolderTreeItem *fti = static_cast<KMFolderTreeItem*>( it.current() );
if ( fti->type() == KFolderTreeItem::Inbox && fti->folder() && !seenInboxes.contains( fti->folder()->id() ) ) {
seenInboxes.append( fti->folder()->id() );
@@ -375,19 +375,19 @@ void FavoriteFolderView::renameFolder()
if ( !mContextMenuItem )
return;
bool ok;
- QString name = KInputDialog::getText( i18n("Rename Favorite"), i18n("Name"), mContextMenuItem->text( 0 ), &ok, this );
+ TQString name = KInputDialog::getText( i18n("Rename Favorite"), i18n("Name"), mContextMenuItem->text( 0 ), &ok, this );
if ( !ok )
return;
mContextMenuItem->setText( 0, name );
notifyInstancesOnChange();
}
-QString FavoriteFolderView::prettyName(KMFolderTreeItem * fti)
+TQString FavoriteFolderView::prettyName(KMFolderTreeItem * fti)
{
assert( fti );
assert( fti->folder() );
- QString name = fti->folder()->label();
- QListViewItem *accountFti = fti;
+ TQString name = fti->folder()->label();
+ TQListViewItem *accountFti = fti;
while ( accountFti->parent() )
accountFti = accountFti->parent();
if ( fti->type() == KFolderTreeItem::Inbox ) {
@@ -406,7 +406,7 @@ QString FavoriteFolderView::prettyName(KMFolderTreeItem * fti)
return name;
}
-void FavoriteFolderView::contentsDragEnterEvent(QDragEnterEvent * e)
+void FavoriteFolderView::contentsDragEnterEvent(TQDragEnterEvent * e)
{
if ( e->provides( "application/x-qlistviewitem" ) ) {
setDropVisualizer( true );
@@ -427,21 +427,21 @@ void FavoriteFolderView::readColorConfig()
KConfig* conf = KMKernel::config();
// Custom/System color support
KConfigGroupSaver saver(conf, "Reader");
- QColor c = KGlobalSettings::alternateBackgroundColor();
+ TQColor c = KGlobalSettings::alternateBackgroundColor();
if ( !conf->readBoolEntry("defaultColors", true) )
mPaintInfo.colBack = conf->readColorEntry( "AltBackgroundColor",&c );
else
mPaintInfo.colBack = c;
- QPalette newPal = palette();
- newPal.setColor( QColorGroup::Base, mPaintInfo.colBack );
+ TQPalette newPal = palette();
+ newPal.setColor( TQColorGroup::Base, mPaintInfo.colBack );
setPalette( newPal );
}
void FavoriteFolderView::addFolder()
{
KMFolderSelDlg dlg( mainWidget(), i18n("Add Favorite Folder"), false );
- if ( dlg.exec() != QDialog::Accepted )
+ if ( dlg.exec() != TQDialog::Accepted )
return;
KMFolder *folder = dlg.folder();
if ( !folder )
@@ -462,7 +462,7 @@ KMFolderTreeItem * FavoriteFolderView::findFolderTreeItem(KMFolder * folder) con
assert( folder );
KMFolderTree *ft = mainWidget()->folderTree();
assert( ft );
- for ( QListViewItemIterator it( ft ); it.current(); ++it ) {
+ for ( TQListViewItemIterator it( ft ); it.current(); ++it ) {
KMFolderTreeItem *fti = static_cast<KMFolderTreeItem*>( it.current() );
if ( fti->folder() == folder )
return fti;
@@ -473,7 +473,7 @@ KMFolderTreeItem * FavoriteFolderView::findFolderTreeItem(KMFolder * folder) con
void FavoriteFolderView::checkMail()
{
bool found = false;
- for ( QListViewItemIterator it( this ); it.current(); ++it ) {
+ for ( TQListViewItemIterator it( this ); it.current(); ++it ) {
KMFolderTreeItem *fti = static_cast<KMFolderTreeItem*>( it.current() );
if ( fti->folder()->folderType() == KMFolderTypeImap || fti->folder()->folderType() == KMFolderTypeCachedImap ) {
if ( !found )
@@ -496,7 +496,7 @@ void FavoriteFolderView::notifyInstancesOnChange()
if ( mReadingConfig )
return;
writeConfig();
- for ( QValueList<FavoriteFolderView*>::ConstIterator it = mInstances.begin(); it != mInstances.end(); ++it ) {
+ for ( TQValueList<FavoriteFolderView*>::ConstIterator it = mInstances.begin(); it != mInstances.end(); ++it ) {
if ( (*it) == this || (*it)->mReadingConfig )
continue;
(*it)->readConfig();
@@ -505,7 +505,7 @@ void FavoriteFolderView::notifyInstancesOnChange()
void FavoriteFolderView::refresh()
{
- for ( QListViewItemIterator it( this ) ; it.current() ; ++it ) {
+ for ( TQListViewItemIterator it( this ) ; it.current() ; ++it ) {
KMFolderTreeItem* fti = static_cast<KMFolderTreeItem*>(it.current());
if (!fti || !fti->folder())
continue;
diff --git a/kmail/favoritefolderview.h b/kmail/favoritefolderview.h
index 6958a732a..f19dd5d79 100644
--- a/kmail/favoritefolderview.h
+++ b/kmail/favoritefolderview.h
@@ -29,7 +29,7 @@ class FavoriteFolderViewItem : public KMFolderTreeItem
{
Q_OBJECT
public:
- FavoriteFolderViewItem( FavoriteFolderView *parent, const QString & name, KMFolder* folder );
+ FavoriteFolderViewItem( FavoriteFolderView *parent, const TQString & name, KMFolder* folder );
protected:
bool useTopLevelIcon() const { return false; }
@@ -39,7 +39,7 @@ class FavoriteFolderViewItem : public KMFolderTreeItem
void nameChanged();
private:
- QString mOldName;
+ TQString mOldName;
};
class FavoriteFolderView : public FolderTreeBase
@@ -47,14 +47,14 @@ class FavoriteFolderView : public FolderTreeBase
Q_OBJECT
public:
- FavoriteFolderView( KMMainWidget *mainWidget, QWidget *parent = 0 );
+ FavoriteFolderView( KMMainWidget *mainWidget, TQWidget *parent = 0 );
~FavoriteFolderView();
void readConfig();
void writeConfig();
- KMFolderTreeItem* addFolder( KMFolder *folder, const QString &name = QString::null,
- QListViewItem *after = 0 );
+ KMFolderTreeItem* addFolder( KMFolder *folder, const TQString &name = TQString::null,
+ TQListViewItem *after = 0 );
void addFolder( KMFolderTreeItem *fti );
public slots:
@@ -62,21 +62,21 @@ class FavoriteFolderView : public FolderTreeBase
void checkMail();
protected:
- bool acceptDrag(QDropEvent* e) const;
- void contentsDragEnterEvent( QDragEnterEvent *e );
+ bool acceptDrag(TQDropEvent* e) const;
+ void contentsDragEnterEvent( TQDragEnterEvent *e );
void readColorConfig();
private:
- static QString prettyName( KMFolderTreeItem* fti );
+ static TQString prettyName( KMFolderTreeItem* fti );
KMFolderTreeItem* findFolderTreeItem( KMFolder* folder ) const;
void handleGroupwareFolder( KMFolderTreeItem *fti );
private slots:
void selectionChanged();
- void itemClicked( QListViewItem *item );
+ void itemClicked( TQListViewItem *item );
void folderRemoved( KMFolder *folder );
- void dropped( QDropEvent *e, QListViewItem *after );
- void contextMenu( QListViewItem *item, const QPoint &point );
+ void dropped( TQDropEvent *e, TQListViewItem *after );
+ void contextMenu( TQListViewItem *item, const TQPoint &point );
void removeFolder();
void initializeFavorites();
void renameFolder();
@@ -86,7 +86,7 @@ class FavoriteFolderView : public FolderTreeBase
private:
KMFolderTreeItem* mContextMenuItem;
- static QValueList<FavoriteFolderView*> mInstances;
+ static TQValueList<FavoriteFolderView*> mInstances;
bool mReadingConfig;
};
diff --git a/kmail/filehtmlwriter.cpp b/kmail/filehtmlwriter.cpp
index 28e1b758a..7e937c462 100644
--- a/kmail/filehtmlwriter.cpp
+++ b/kmail/filehtmlwriter.cpp
@@ -40,11 +40,11 @@
namespace KMail {
- FileHtmlWriter::FileHtmlWriter( const QString & filename )
+ FileHtmlWriter::FileHtmlWriter( const TQString & filename )
: HtmlWriter(),
- mFile( filename.isEmpty() ? QString( "filehtmlwriter.out" ) : filename )
+ mFile( filename.isEmpty() ? TQString( "filehtmlwriter.out" ) : filename )
{
- mStream.setEncoding( QTextStream::UnicodeUTF8 );
+ mStream.setEncoding( TQTextStream::UnicodeUTF8 );
}
FileHtmlWriter::~FileHtmlWriter() {
@@ -55,7 +55,7 @@ namespace KMail {
}
}
- void FileHtmlWriter::begin( const QString & css ) {
+ void FileHtmlWriter::begin( const TQString & css ) {
openOrWarn();
if ( !css.isEmpty() )
write( "<!-- CSS Definitions \n" + css + "-->\n" );
@@ -74,12 +74,12 @@ namespace KMail {
}
}
- void FileHtmlWriter::write( const QString & str ) {
+ void FileHtmlWriter::write( const TQString & str ) {
mStream << str;
flush();
}
- void FileHtmlWriter::queue( const QString & str ) {
+ void FileHtmlWriter::queue( const TQString & str ) {
write( str );
}
@@ -99,7 +99,7 @@ namespace KMail {
mStream.setDevice( &mFile );
}
- void FileHtmlWriter::embedPart( const QCString & contentId, const QString & url ) {
+ void FileHtmlWriter::embedPart( const TQCString & contentId, const TQString & url ) {
mStream << "<!-- embedPart(contentID=" << contentId << ", url=" << url << ") -->" << endl;
flush();
}
diff --git a/kmail/filehtmlwriter.h b/kmail/filehtmlwriter.h
index f0b81e5a4..9897bc5e4 100644
--- a/kmail/filehtmlwriter.h
+++ b/kmail/filehtmlwriter.h
@@ -34,8 +34,8 @@
#include "interfaces/htmlwriter.h"
-#include <qfile.h>
-#include <qtextstream.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
class QString;
@@ -43,23 +43,23 @@ namespace KMail {
class FileHtmlWriter : public KMail::HtmlWriter {
public:
- FileHtmlWriter( const QString & filename );
+ FileHtmlWriter( const TQString & filename );
virtual ~FileHtmlWriter();
- void begin( const QString & cssDefs );
+ void begin( const TQString & cssDefs );
void end();
void reset();
- void write( const QString & str );
- void queue( const QString & str );
+ void write( const TQString & str );
+ void queue( const TQString & str );
void flush();
- void embedPart( const QCString & contentId, const QString & url );
+ void embedPart( const TQCString & contentId, const TQString & url );
private:
void openOrWarn();
private:
- QFile mFile;
- QTextStream mStream;
+ TQFile mFile;
+ TQTextStream mStream;
};
} // namespace KMail
diff --git a/kmail/filterimporterexporter.cpp b/kmail/filterimporterexporter.cpp
index af77541d1..bfe40170c 100644
--- a/kmail/filterimporterexporter.cpp
+++ b/kmail/filterimporterexporter.cpp
@@ -39,7 +39,7 @@
#include <kdialogbase.h>
#include <klistview.h>
-#include <qregexp.h>
+#include <tqregexp.h>
using namespace KMail;
@@ -47,14 +47,14 @@ using namespace KMail;
class FilterSelectionDialog : public KDialogBase
{
public:
- FilterSelectionDialog( QWidget * parent = 0 )
+ FilterSelectionDialog( TQWidget * parent = 0 )
:KDialogBase( parent, "filterselection", true, i18n("Select Filters"), Ok|Cancel, Ok, true ),
wasCancelled( false )
{
filtersListView = new KListView( this );
setMainWidget(filtersListView);
filtersListView->setSorting( -1 );
- filtersListView->setSelectionMode( QListView::NoSelection );
+ filtersListView->setSelectionMode( TQListView::NoSelection );
filtersListView->addColumn( i18n("Filters"), 300 );
filtersListView->setFullWidth( true );
resize( 300, 350 );
@@ -75,26 +75,26 @@ public:
return wasCancelled;
}
- void setFilters( const QValueList<KMFilter*>& filters )
+ void setFilters( const TQValueList<KMFilter*>& filters )
{
originalFilters = filters;
filtersListView->clear();
- QValueListConstIterator<KMFilter*> it = filters.constEnd();
+ TQValueListConstIterator<KMFilter*> it = filters.constEnd();
while ( it != filters.constBegin() ) {
--it;
KMFilter* filter = *it;
- QCheckListItem* item = new QCheckListItem( filtersListView, filter->name(), QCheckListItem::CheckBox );
+ TQCheckListItem* item = new TQCheckListItem( filtersListView, filter->name(), TQCheckListItem::CheckBox );
item->setOn( true );
}
}
- QValueList<KMFilter*> selectedFilters() const
+ TQValueList<KMFilter*> selectedFilters() const
{
- QValueList<KMFilter*> filters;
- QListViewItemIterator it( filtersListView );
+ TQValueList<KMFilter*> filters;
+ TQListViewItemIterator it( filtersListView );
int i = 0;
while( it.current() ) {
- QCheckListItem* item = static_cast<QCheckListItem*>( it.current() );
+ TQCheckListItem* item = static_cast<TQCheckListItem*>( it.current() );
if ( item->isOn() )
filters << originalFilters[i];
++i; ++it;
@@ -103,12 +103,12 @@ public:
}
private:
KListView *filtersListView;
- QValueList<KMFilter*> originalFilters;
+ TQValueList<KMFilter*> originalFilters;
bool wasCancelled;
};
/* static */
-QValueList<KMFilter*> FilterImporterExporter::readFiltersFromConfig( KConfig* config, bool bPopFilter )
+TQValueList<KMFilter*> FilterImporterExporter::readFiltersFromConfig( KConfig* config, bool bPopFilter )
{
KConfigGroupSaver saver(config, "General");
int numFilters = 0;
@@ -117,9 +117,9 @@ QValueList<KMFilter*> FilterImporterExporter::readFiltersFromConfig( KConfig* co
else
numFilters = config->readNumEntry("filters",0);
- QValueList<KMFilter*> filters;
+ TQValueList<KMFilter*> filters;
for ( int i=0 ; i < numFilters ; ++i ) {
- QString grpName;
+ TQString grpName;
grpName.sprintf("%s #%d", (bPopFilter ? "PopFilter" : "Filter") , i);
KConfigGroupSaver saver(config, grpName);
KMFilter * filter = new KMFilter(config, bPopFilter);
@@ -137,20 +137,20 @@ QValueList<KMFilter*> FilterImporterExporter::readFiltersFromConfig( KConfig* co
}
/* static */
-void FilterImporterExporter::writeFiltersToConfig( const QValueList<KMFilter*>& filters, KConfig* config, bool bPopFilter )
+void FilterImporterExporter::writeFiltersToConfig( const TQValueList<KMFilter*>& filters, KConfig* config, bool bPopFilter )
{
// first, delete all groups:
- QStringList filterGroups =
- config->groupList().grep( QRegExp( bPopFilter ? "PopFilter #\\d+" : "Filter #\\d+" ) );
- for ( QStringList::Iterator it = filterGroups.begin() ;
+ TQStringList filterGroups =
+ config->groupList().grep( TQRegExp( bPopFilter ? "PopFilter #\\d+" : "Filter #\\d+" ) );
+ for ( TQStringList::Iterator it = filterGroups.begin() ;
it != filterGroups.end() ; ++it )
config->deleteGroup( *it );
int i = 0;
- for ( QValueListConstIterator<KMFilter*> it = filters.constBegin() ;
+ for ( TQValueListConstIterator<KMFilter*> it = filters.constBegin() ;
it != filters.constEnd() ; ++it ) {
if ( !(*it)->isEmpty() ) {
- QString grpName;
+ TQString grpName;
if ( bPopFilter )
grpName.sprintf("PopFilter #%d", i);
else
@@ -168,7 +168,7 @@ void FilterImporterExporter::writeFiltersToConfig( const QValueList<KMFilter*>&
}
-FilterImporterExporter::FilterImporterExporter( QWidget* parent, bool popFilter )
+FilterImporterExporter::FilterImporterExporter( TQWidget* parent, bool popFilter )
:mParent( parent), mPopFilter( popFilter )
{
}
@@ -177,31 +177,31 @@ FilterImporterExporter::~FilterImporterExporter()
{
}
-QValueList<KMFilter*> FilterImporterExporter::importFilters()
+TQValueList<KMFilter*> FilterImporterExporter::importFilters()
{
- QString fileName = KFileDialog::getOpenFileName( QDir::homeDirPath(), QString::null, mParent, i18n("Import Filters") );
+ TQString fileName = KFileDialog::getOpenFileName( TQDir::homeDirPath(), TQString::null, mParent, i18n("Import Filters") );
if ( fileName.isEmpty() )
- return QValueList<KMFilter*>(); // cancel
+ return TQValueList<KMFilter*>(); // cancel
{ // scoping
- QFile f( fileName );
+ TQFile f( fileName );
if ( !f.open( IO_ReadOnly ) ) {
KMessageBox::error( mParent, i18n("The selected file is not readable. Your file access permissions might be insufficient.") );
- return QValueList<KMFilter*>();
+ return TQValueList<KMFilter*>();
}
}
KConfig config( fileName );
- QValueList<KMFilter*> imported = readFiltersFromConfig( &config, mPopFilter );
+ TQValueList<KMFilter*> imported = readFiltersFromConfig( &config, mPopFilter );
FilterSelectionDialog dlg( mParent );
dlg.setFilters( imported );
dlg.exec();
- return dlg.cancelled() ? QValueList<KMFilter*>() : dlg.selectedFilters();
+ return dlg.cancelled() ? TQValueList<KMFilter*>() : dlg.selectedFilters();
}
-void FilterImporterExporter::exportFilters(const QValueList<KMFilter*> & filters )
+void FilterImporterExporter::exportFilters(const TQValueList<KMFilter*> & filters )
{
- KURL saveUrl = KFileDialog::getSaveURL( QDir::homeDirPath(), QString::null, mParent, i18n("Export Filters") );
+ KURL saveUrl = KFileDialog::getSaveURL( TQDir::homeDirPath(), TQString::null, mParent, i18n("Export Filters") );
if ( saveUrl.isEmpty() || !Util::checkOverwrite( saveUrl, mParent ) )
return;
diff --git a/kmail/filterimporterexporter.h b/kmail/filterimporterexporter.h
index 72d29e978..c6386b42f 100644
--- a/kmail/filterimporterexporter.h
+++ b/kmail/filterimporterexporter.h
@@ -30,7 +30,7 @@
#ifndef __FILTERIMPORTEREXPORTER_H__
#define __FILTERIMPORTEREXPORTER_H__
-#include <qvaluelist.h>
+#include <tqvaluelist.h>
class KMFilter;
class KConfig;
@@ -46,22 +46,22 @@ namespace KMail
class FilterImporterExporter
{
public:
- FilterImporterExporter( QWidget* parent, bool popFilter = false );
+ FilterImporterExporter( TQWidget* parent, bool popFilter = false );
virtual ~FilterImporterExporter();
/** Export the given filter rules to a file which
* is asked from the user. The list to export is also
* presented for confirmation/selection. */
- void exportFilters( const QValueList<KMFilter*> & );
+ void exportFilters( const TQValueList<KMFilter*> & );
/** Import filters. Ask the user where to import them from
* and which filters to import. */
- QValueList<KMFilter*> importFilters();
+ TQValueList<KMFilter*> importFilters();
- static void writeFiltersToConfig( const QValueList<KMFilter*>& filters, KConfig* config, bool bPopFilter );
- static QValueList<KMFilter*> readFiltersFromConfig( KConfig* config, bool bPopFilter );
+ static void writeFiltersToConfig( const TQValueList<KMFilter*>& filters, KConfig* config, bool bPopFilter );
+ static TQValueList<KMFilter*> readFiltersFromConfig( KConfig* config, bool bPopFilter );
private:
- QWidget* mParent;
+ TQWidget* mParent;
bool mPopFilter;
};
diff --git a/kmail/filterlog.cpp b/kmail/filterlog.cpp
index 23848dfb1..7415c10d0 100644
--- a/kmail/filterlog.cpp
+++ b/kmail/filterlog.cpp
@@ -31,8 +31,8 @@
#include <kdebug.h>
-#include <qdatetime.h>
-#include <qfile.h>
+#include <tqdatetime.h>
+#include <tqfile.h>
#include <sys/stat.h>
@@ -68,11 +68,11 @@ FilterLog * FilterLog::instance()
}
-void FilterLog::add( QString logEntry, ContentType contentType )
+void FilterLog::add( TQString logEntry, ContentType contentType )
{
if ( isLogging() && ( mAllowedTypes & contentType ) )
{
- QString timedLog = "[" + QTime::currentTime().toString() + "] ";
+ TQString timedLog = "[" + TQTime::currentTime().toString() + "] ";
if ( contentType & ~meta )
timedLog += logEntry;
else
@@ -102,7 +102,7 @@ void FilterLog::dump()
{
#ifndef NDEBUG
kdDebug(5006) << "----- starting filter log -----" << endl;
- for ( QStringList::Iterator it = mLogEntries.begin();
+ for ( TQStringList::Iterator it = mLogEntries.begin();
it != mLogEntries.end(); ++it )
{
kdDebug(5006) << *it << endl;
@@ -117,17 +117,17 @@ void FilterLog::checkLogSize()
if ( mCurrentLogSize > mMaxLogSize && mMaxLogSize > -1 )
{
kdDebug(5006) << "Filter log: memory limit reached, starting to discard old items, size = "
- << QString::number( mCurrentLogSize ) << endl;
+ << TQString::number( mCurrentLogSize ) << endl;
// avoid some kind of hysteresis, shrink the log to 90% of its maximum
while ( mCurrentLogSize > ( mMaxLogSize * 0.9 ) )
{
- QValueListIterator<QString> it = mLogEntries.begin();
+ TQValueListIterator<TQString> it = mLogEntries.begin();
if ( it != mLogEntries.end())
{
mCurrentLogSize -= (*it).length();
mLogEntries.remove( it );
kdDebug(5006) << "Filter log: new size = "
- << QString::number( mCurrentLogSize ) << endl;
+ << TQString::number( mCurrentLogSize ) << endl;
}
else
{
@@ -140,18 +140,18 @@ void FilterLog::checkLogSize()
}
-bool FilterLog::saveToFile( QString fileName )
+bool FilterLog::saveToFile( TQString fileName )
{
- QFile file( fileName );
+ TQFile file( fileName );
if( file.open( IO_WriteOnly ) ) {
fchmod( file.handle(), S_IRUSR | S_IWUSR );
{
- QDataStream ds( &file );
- for ( QStringList::Iterator it = mLogEntries.begin();
+ TQDataStream ds( &file );
+ for ( TQStringList::Iterator it = mLogEntries.begin();
it != mLogEntries.end(); ++it )
{
- QString tmpString = *it + '\n';
- QCString cstr( tmpString.local8Bit() );
+ TQString tmpString = *it + '\n';
+ TQCString cstr( tmpString.local8Bit() );
ds.writeRawBytes( cstr, cstr.size() );
}
}
diff --git a/kmail/filterlog.h b/kmail/filterlog.h
index 814556790..d49efb22c 100644
--- a/kmail/filterlog.h
+++ b/kmail/filterlog.h
@@ -29,9 +29,9 @@
#ifndef KMAIL_FILTERLOG_H
#define KMAIL_FILTERLOG_H
-#include <qobject.h>
-#include <qstringlist.h>
-#include <qstylesheet.h>
+#include <tqobject.h>
+#include <tqstringlist.h>
+#include <tqstylesheet.h>
namespace KMail {
@@ -102,7 +102,7 @@ namespace KMail {
/** add a log entry */
- void add( QString logEntry, ContentType contentType );
+ void add( TQString logEntry, ContentType contentType );
/** add a separating line in the log */
void addSeparator() { add( "------------------------------", meta ); };
/** discard collected log data */
@@ -115,19 +115,19 @@ namespace KMail {
/** get access to the log entries */
- const QStringList & getLogEntries() { return mLogEntries; };
+ const TQStringList & getLogEntries() { return mLogEntries; };
/** dump the log - for testing purposes */
void dump();
/** save the log to a file - returns true if okay */
- bool saveToFile( QString fileName );
+ bool saveToFile( TQString fileName );
/** destructor */
virtual ~FilterLog();
- static QString recode( const QString & plain ) { return QStyleSheet::escape(plain); };
+ static TQString recode( const TQString & plain ) { return TQStyleSheet::escape(plain); };
signals:
- void logEntryAdded( QString );
+ void logEntryAdded( TQString );
void logShrinked();
void logStateChanged();
@@ -136,7 +136,7 @@ namespace KMail {
FilterLog();
/** The list contains the single log pieces */
- QStringList mLogEntries;
+ TQStringList mLogEntries;
/** the log status */
bool mLogging;
diff --git a/kmail/filterlogdlg.cpp b/kmail/filterlogdlg.cpp
index a10a056ec..90eb59263 100644
--- a/kmail/filterlogdlg.cpp
+++ b/kmail/filterlogdlg.cpp
@@ -36,14 +36,14 @@
#include <klocale.h>
#include <kmessagebox.h>
-#include <qcheckbox.h>
-#include <qlabel.h>
-#include <qspinbox.h>
-#include <qstringlist.h>
-#include <qtextedit.h>
-#include <qvbox.h>
-#include <qwhatsthis.h>
-#include <qvgroupbox.h>
+#include <tqcheckbox.h>
+#include <tqlabel.h>
+#include <tqspinbox.h>
+#include <tqstringlist.h>
+#include <tqtextedit.h>
+#include <tqvbox.h>
+#include <tqwhatsthis.h>
+#include <tqvgroupbox.h>
#include <errno.h>
#include <X11/Xlib.h>
@@ -52,56 +52,56 @@
using namespace KMail;
-FilterLogDialog::FilterLogDialog( QWidget * parent )
+FilterLogDialog::FilterLogDialog( TQWidget * parent )
: KDialogBase( parent, "FilterLogDlg", false, i18n( "Filter Log Viewer" ),
User1|User2|Close, Close, true, KStdGuiItem::clear(), KStdGuiItem::saveAs() )
{
setWFlags( WDestructiveClose );
- QVBox *page = makeVBoxMainWidget();
+ TQVBox *page = makeVBoxMainWidget();
- mTextEdit = new QTextEdit( page );
+ mTextEdit = new TQTextEdit( page );
mTextEdit->setReadOnly( true );
- mTextEdit->setWordWrap( QTextEdit::NoWrap );
- mTextEdit->setTextFormat( QTextEdit::LogText );
+ mTextEdit->setWordWrap( TQTextEdit::NoWrap );
+ mTextEdit->setTextFormat( TQTextEdit::LogText );
- QStringList logEntries = FilterLog::instance()->getLogEntries();
- for ( QStringList::Iterator it = logEntries.begin();
+ TQStringList logEntries = FilterLog::instance()->getLogEntries();
+ for ( TQStringList::Iterator it = logEntries.begin();
it != logEntries.end(); ++it )
{
mTextEdit->append( *it );
}
- mLogActiveBox = new QCheckBox( i18n("&Log filter activities"), page );
+ mLogActiveBox = new TQCheckBox( i18n("&Log filter activities"), page );
mLogActiveBox->setChecked( FilterLog::instance()->isLogging() );
- connect( mLogActiveBox, SIGNAL(clicked()),
- this, SLOT(slotSwitchLogState(void)) );
- QWhatsThis::add( mLogActiveBox,
+ connect( mLogActiveBox, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotSwitchLogState(void)) );
+ TQWhatsThis::add( mLogActiveBox,
i18n( "You can turn logging of filter activities on and off here. "
"Of course, log data is collected and shown only when logging "
"is turned on. " ) );
- mLogDetailsBox = new QVGroupBox( i18n( "Logging Details" ), page );
+ mLogDetailsBox = new TQVGroupBox( i18n( "Logging Details" ), page );
mLogDetailsBox->setEnabled( mLogActiveBox->isChecked() );
- connect( mLogActiveBox, SIGNAL( toggled( bool ) ),
- mLogDetailsBox, SLOT( setEnabled( bool ) ) );
+ connect( mLogActiveBox, TQT_SIGNAL( toggled( bool ) ),
+ mLogDetailsBox, TQT_SLOT( setEnabled( bool ) ) );
- mLogPatternDescBox = new QCheckBox( i18n("Log pattern description"),
+ mLogPatternDescBox = new TQCheckBox( i18n("Log pattern description"),
mLogDetailsBox );
mLogPatternDescBox->setChecked(
FilterLog::instance()->isContentTypeEnabled( FilterLog::patternDesc ) );
- connect( mLogPatternDescBox, SIGNAL(clicked()),
- this, SLOT(slotChangeLogDetail(void)) );
+ connect( mLogPatternDescBox, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotChangeLogDetail(void)) );
// TODO
- //QWhatsThis::add( mLogPatternDescBox,
+ //TQWhatsThis::add( mLogPatternDescBox,
// i18n( "" ) );
- mLogRuleEvaluationBox = new QCheckBox( i18n("Log filter &rule evaluation"),
+ mLogRuleEvaluationBox = new TQCheckBox( i18n("Log filter &rule evaluation"),
mLogDetailsBox );
mLogRuleEvaluationBox->setChecked(
FilterLog::instance()->isContentTypeEnabled( FilterLog::ruleResult ) );
- connect( mLogRuleEvaluationBox, SIGNAL(clicked()),
- this, SLOT(slotChangeLogDetail(void)) );
- QWhatsThis::add( mLogRuleEvaluationBox,
+ connect( mLogRuleEvaluationBox, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotChangeLogDetail(void)) );
+ TQWhatsThis::add( mLogRuleEvaluationBox,
i18n( "You can control the feedback in the log concerning the "
"evaluation of the filter rules of applied filters: "
"having this option checked will give detailed feedback "
@@ -109,52 +109,52 @@ FilterLogDialog::FilterLogDialog( QWidget * parent )
"feedback about the result of the evaluation of all rules "
"of a single filter will be given." ) );
- mLogPatternResultBox = new QCheckBox( i18n("Log filter pattern evaluation"),
+ mLogPatternResultBox = new TQCheckBox( i18n("Log filter pattern evaluation"),
mLogDetailsBox );
mLogPatternResultBox->setChecked(
FilterLog::instance()->isContentTypeEnabled( FilterLog::patternResult ) );
- connect( mLogPatternResultBox, SIGNAL(clicked()),
- this, SLOT(slotChangeLogDetail(void)) );
+ connect( mLogPatternResultBox, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotChangeLogDetail(void)) );
// TODO
- //QWhatsThis::add( mLogPatternResultBox,
+ //TQWhatsThis::add( mLogPatternResultBox,
// i18n( "" ) );
- mLogFilterActionBox = new QCheckBox( i18n("Log filter actions"),
+ mLogFilterActionBox = new TQCheckBox( i18n("Log filter actions"),
mLogDetailsBox );
mLogFilterActionBox->setChecked(
FilterLog::instance()->isContentTypeEnabled( FilterLog::appliedAction ) );
- connect( mLogFilterActionBox, SIGNAL(clicked()),
- this, SLOT(slotChangeLogDetail(void)) );
+ connect( mLogFilterActionBox, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotChangeLogDetail(void)) );
// TODO
- //QWhatsThis::add( mLogFilterActionBox,
+ //TQWhatsThis::add( mLogFilterActionBox,
// i18n( "" ) );
- QHBox * hbox = new QHBox( page );
- new QLabel( i18n("Log size limit:"), hbox );
- mLogMemLimitSpin = new QSpinBox( hbox );
+ TQHBox * hbox = new TQHBox( page );
+ new TQLabel( i18n("Log size limit:"), hbox );
+ mLogMemLimitSpin = new TQSpinBox( hbox );
mLogMemLimitSpin->setMinValue( 1 );
mLogMemLimitSpin->setMaxValue( 1024 * 256 ); // 256 MB
- // value in the QSpinBox is in KB while it's in Byte in the FilterLog
+ // value in the TQSpinBox is in KB while it's in Byte in the FilterLog
mLogMemLimitSpin->setValue( FilterLog::instance()->getMaxLogSize() / 1024 );
mLogMemLimitSpin->setSuffix( " KB" );
mLogMemLimitSpin->setSpecialValueText( i18n("unlimited") );
- connect( mLogMemLimitSpin, SIGNAL(valueChanged(int)),
- this, SLOT(slotChangeLogMemLimit(int)) );
- QWhatsThis::add( mLogMemLimitSpin,
+ connect( mLogMemLimitSpin, TQT_SIGNAL(valueChanged(int)),
+ this, TQT_SLOT(slotChangeLogMemLimit(int)) );
+ TQWhatsThis::add( mLogMemLimitSpin,
i18n( "Collecting log data uses memory to temporarily store the "
"log data; here you can limit the maximum amount of memory "
"to be used: if the size of the collected log data exceeds "
"this limit then the oldest data will be discarded until "
"the limit is no longer exceeded. " ) );
- connect(FilterLog::instance(), SIGNAL(logEntryAdded(QString)),
- this, SLOT(slotLogEntryAdded(QString)));
- connect(FilterLog::instance(), SIGNAL(logShrinked(void)),
- this, SLOT(slotLogShrinked(void)));
- connect(FilterLog::instance(), SIGNAL(logStateChanged(void)),
- this, SLOT(slotLogStateChanged(void)));
+ connect(FilterLog::instance(), TQT_SIGNAL(logEntryAdded(TQString)),
+ this, TQT_SLOT(slotLogEntryAdded(TQString)));
+ connect(FilterLog::instance(), TQT_SIGNAL(logShrinked(void)),
+ this, TQT_SLOT(slotLogShrinked(void)));
+ connect(FilterLog::instance(), TQT_SIGNAL(logStateChanged(void)),
+ this, TQT_SLOT(slotLogStateChanged(void)));
- setInitialSize( QSize( 500, 500 ) );
+ setInitialSize( TQSize( 500, 500 ) );
#if !KDE_IS_VERSION( 3, 2, 91 )
// HACK - KWin keeps all dialogs on top of their mainwindows, but that's probably
// wrong (#76026), and should be done only for modals. CVS HEAD should get
@@ -164,7 +164,7 @@ FilterLogDialog::FilterLogDialog( QWidget * parent )
}
-void FilterLogDialog::slotLogEntryAdded( QString logEntry )
+void FilterLogDialog::slotLogEntryAdded( TQString logEntry )
{
mTextEdit->append( logEntry );
}
@@ -191,7 +191,7 @@ void FilterLogDialog::slotLogStateChanged()
mLogFilterActionBox->setChecked(
FilterLog::instance()->isContentTypeEnabled( FilterLog::appliedAction ) );
- // value in the QSpinBox is in KB while it's in Byte in the FilterLog
+ // value in the TQSpinBox is in KB while it's in Byte in the FilterLog
int newLogSize = FilterLog::instance()->getMaxLogSize() / 1024;
if ( mLogMemLimitSpin->value() != newLogSize )
mLogMemLimitSpin->setValue( newLogSize );
@@ -243,8 +243,8 @@ void FilterLogDialog::slotUser1()
void FilterLogDialog::slotUser2()
{
- QString fileName;
- KFileDialog fdlg( QString::null, QString::null, this, 0, true );
+ TQString fileName;
+ KFileDialog fdlg( TQString::null, TQString::null, this, 0, true );
fdlg.setMode( KFile::File );
fdlg.setSelection( "kmail-filter.log" );
@@ -258,7 +258,7 @@ void FilterLogDialog::slotUser2()
i18n( "Could not write the file %1:\n"
"\"%2\" is the detailed error description." )
.arg( fileName,
- QString::fromLocal8Bit( strerror( errno ) ) ),
+ TQString::fromLocal8Bit( strerror( errno ) ) ),
i18n( "KMail Error" ) );
}
}
diff --git a/kmail/filterlogdlg.h b/kmail/filterlogdlg.h
index 9f05298d8..5b8cd6af6 100644
--- a/kmail/filterlogdlg.h
+++ b/kmail/filterlogdlg.h
@@ -51,10 +51,10 @@ namespace KMail {
public:
/** constructor */
- FilterLogDialog( QWidget * parent );
+ FilterLogDialog( TQWidget * parent );
protected slots:
- void slotLogEntryAdded( QString logEntry );
+ void slotLogEntryAdded( TQString logEntry );
void slotLogShrinked();
void slotLogStateChanged();
void slotChangeLogDetail();
@@ -65,14 +65,14 @@ namespace KMail {
virtual void slotUser1();
virtual void slotUser2();
- QTextEdit * mTextEdit;
- QCheckBox * mLogActiveBox;
- QGroupBox * mLogDetailsBox;
- QCheckBox * mLogPatternDescBox;
- QCheckBox * mLogRuleEvaluationBox;
- QCheckBox * mLogPatternResultBox;
- QCheckBox * mLogFilterActionBox;
- QSpinBox * mLogMemLimitSpin;
+ TQTextEdit * mTextEdit;
+ TQCheckBox * mLogActiveBox;
+ TQGroupBox * mLogDetailsBox;
+ TQCheckBox * mLogPatternDescBox;
+ TQCheckBox * mLogRuleEvaluationBox;
+ TQCheckBox * mLogPatternResultBox;
+ TQCheckBox * mLogFilterActionBox;
+ TQSpinBox * mLogMemLimitSpin;
};
} // namespace KMail
diff --git a/kmail/folderIface.cpp b/kmail/folderIface.cpp
index 3a6bc6f06..54df51677 100644
--- a/kmail/folderIface.cpp
+++ b/kmail/folderIface.cpp
@@ -45,7 +45,7 @@
namespace KMail {
-FolderIface::FolderIface( const QString& vpath )
+FolderIface::FolderIface( const TQString& vpath )
: DCOPObject( "FolderIface" ), mPath( vpath )
{
//kdDebug(5006)<<"FolderIface folder = "<< mPath <<endl;
@@ -116,10 +116,10 @@ FolderIface::unreadRecursiveMessages()
//the message as soon as we get it (after we switch folders,
//it's being unget. We need a reference count on message to make it work
/*
-QValueList<DCOPRef>
+TQValueList<DCOPRef>
FolderIface::messageRefs()
{
- QValueList<DCOPRef> refList;
+ TQValueList<DCOPRef> refList;
KMMsgList messageCache;
KMFolderIndex *indexFolder = static_cast<KMFolderIndex*>( mFolder);
diff --git a/kmail/folderIface.h b/kmail/folderIface.h
index 4c8b41362..d43adedbe 100644
--- a/kmail/folderIface.h
+++ b/kmail/folderIface.h
@@ -31,7 +31,7 @@
#ifndef FOLDERIFACE_H
#define FOLDERIFACE_H
-#include <qobject.h>
+#include <tqobject.h>
#include <dcopobject.h>
class KMFolder;
@@ -39,31 +39,31 @@ class KMMainWidget;
namespace KMail {
- class FolderIface : public QObject,
+ class FolderIface : public TQObject,
public DCOPObject
{
Q_OBJECT
K_DCOP
public:
- FolderIface( const QString& vpath );
+ FolderIface( const TQString& vpath );
k_dcop:
- virtual QString path() const;
- virtual QString displayName() const;
- virtual QString displayPath() const;
+ virtual TQString path() const;
+ virtual TQString displayName() const;
+ virtual TQString displayPath() const;
virtual bool usesCustomIcons() const;
- virtual QString normalIconPath() const;
- virtual QString unreadIconPath() const;
+ virtual TQString normalIconPath() const;
+ virtual TQString unreadIconPath() const;
virtual int messages();
virtual int unreadMessages();
virtual int unreadRecursiveMessages();
//not yet
- //virtual QValueList<DCOPRef> messageRefs();
+ //virtual TQValueList<DCOPRef> messageRefs();
protected:
KMFolder* mFolder;
- QString mPath;
+ TQString mPath;
};
}
diff --git a/kmail/folderdiaacltab.cpp b/kmail/folderdiaacltab.cpp
index 4b4a5b6b7..d1f02a57c 100644
--- a/kmail/folderdiaacltab.cpp
+++ b/kmail/folderdiaacltab.cpp
@@ -52,13 +52,13 @@
#include <kdebug.h>
#include <klocale.h>
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qvbox.h>
-#include <qvbuttongroup.h>
-#include <qwidgetstack.h>
-#include <qradiobutton.h>
-#include <qwhatsthis.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqvbox.h>
+#include <tqvbuttongroup.h>
+#include <tqwidgetstack.h>
+#include <tqradiobutton.h>
+#include <tqwhatsthis.h>
#include <assert.h>
#include <kmessagebox.h>
@@ -83,46 +83,46 @@ static const struct {
};
-KMail::ACLEntryDialog::ACLEntryDialog( IMAPUserIdFormat userIdFormat, const QString& caption, QWidget* parent, const char* name )
+KMail::ACLEntryDialog::ACLEntryDialog( IMAPUserIdFormat userIdFormat, const TQString& caption, TQWidget* parent, const char* name )
: KDialogBase( parent, name, true /*modal*/, caption,
KDialogBase::Ok|KDialogBase::Cancel, KDialogBase::Ok, true /*sep*/ )
, mUserIdFormat( userIdFormat )
{
- QWidget *page = new QWidget( this );
+ TQWidget *page = new TQWidget( this );
setMainWidget(page);
- QGridLayout *topLayout = new QGridLayout( page, 3 /*rows*/, 3 /*cols*/, 0, spacingHint() );
+ TQGridLayout *topLayout = new TQGridLayout( page, 3 /*rows*/, 3 /*cols*/, 0, spacingHint() );
- QLabel *label = new QLabel( i18n( "&User identifier:" ), page );
+ TQLabel *label = new TQLabel( i18n( "&User identifier:" ), page );
topLayout->addWidget( label, 0, 0 );
mUserIdLineEdit = new KLineEdit( page );
topLayout->addWidget( mUserIdLineEdit, 0, 1 );
label->setBuddy( mUserIdLineEdit );
- QWhatsThis::add( mUserIdLineEdit, i18n( "The User Identifier is the login of the user on the IMAP server. This can be a simple user name or the full email address of the user; the login for your own account on the server will tell you which one it is." ) );
+ TQWhatsThis::add( mUserIdLineEdit, i18n( "The User Identifier is the login of the user on the IMAP server. This can be a simple user name or the full email address of the user; the login for your own account on the server will tell you which one it is." ) );
- QPushButton* kabBtn = new QPushButton( "...", page );
+ TQPushButton* kabBtn = new TQPushButton( "...", page );
topLayout->addWidget( kabBtn, 0, 2 );
- mButtonGroup = new QVButtonGroup( i18n( "Permissions" ), page );
+ mButtonGroup = new TQVButtonGroup( i18n( "Permissions" ), page );
topLayout->addMultiCellWidget( mButtonGroup, 1, 1, 0, 2 );
for ( unsigned int i = 0;
i < sizeof( standardPermissions ) / sizeof( *standardPermissions );
++i ) {
- QRadioButton* cb = new QRadioButton( i18n( "Permissions", standardPermissions[i].userString ), mButtonGroup );
+ TQRadioButton* cb = new TQRadioButton( i18n( "Permissions", standardPermissions[i].userString ), mButtonGroup );
// We store the permission value (bitfield) as the id of the radiobutton in the group
mButtonGroup->insert( cb, standardPermissions[i].permissions );
}
topLayout->setRowStretch(2, 10);
- connect( mUserIdLineEdit, SIGNAL( textChanged( const QString& ) ), SLOT( slotChanged() ) );
- connect( kabBtn, SIGNAL( clicked() ), SLOT( slotSelectAddresses() ) );
- connect( mButtonGroup, SIGNAL( clicked( int ) ), SLOT( slotChanged() ) );
+ connect( mUserIdLineEdit, TQT_SIGNAL( textChanged( const TQString& ) ), TQT_SLOT( slotChanged() ) );
+ connect( kabBtn, TQT_SIGNAL( clicked() ), TQT_SLOT( slotSelectAddresses() ) );
+ connect( mButtonGroup, TQT_SIGNAL( clicked( int ) ), TQT_SLOT( slotChanged() ) );
enableButtonOK( false );
mUserIdLineEdit->setFocus();
// Ensure the lineedit is rather wide so that email addresses can be read in it
- incInitialSize( QSize( 200, 0 ) );
+ incInitialSize( TQSize( 200, 0 ) );
}
void KMail::ACLEntryDialog::slotChanged()
@@ -130,9 +130,9 @@ void KMail::ACLEntryDialog::slotChanged()
enableButtonOK( !mUserIdLineEdit->text().isEmpty() && mButtonGroup->selected() != 0 );
}
-static QString addresseeToUserId( const KABC::Addressee& addr, IMAPUserIdFormat userIdFormat )
+static TQString addresseeToUserId( const KABC::Addressee& addr, IMAPUserIdFormat userIdFormat )
{
- QString email = addr.preferredEmail();
+ TQString email = addr.preferredEmail();
if ( userIdFormat == FullEmail )
return email;
else { // mUserIdFormat == UserName
@@ -148,14 +148,14 @@ void KMail::ACLEntryDialog::slotSelectAddresses()
dlg.setShowBCC( false );
if ( mUserIdFormat == FullEmail ) // otherwise we have no way to go back from userid to email
dlg.setSelectedTo( userIds() );
- if ( dlg.exec() != QDialog::Accepted )
+ if ( dlg.exec() != TQDialog::Accepted )
return;
- const QStringList distrLists = dlg.toDistributionLists();
- QString txt = distrLists.join( ", " );
+ const TQStringList distrLists = dlg.toDistributionLists();
+ TQString txt = distrLists.join( ", " );
const KABC::Addressee::List lst = dlg.toAddresses();
if ( !lst.isEmpty() ) {
- for( QValueList<KABC::Addressee>::ConstIterator it = lst.begin(); it != lst.end(); ++it ) {
+ for( TQValueList<KABC::Addressee>::ConstIterator it = lst.begin(); it != lst.end(); ++it ) {
if ( !txt.isEmpty() )
txt += ", ";
txt += addresseeToUserId( *it, mUserIdFormat );
@@ -164,22 +164,22 @@ void KMail::ACLEntryDialog::slotSelectAddresses()
mUserIdLineEdit->setText( txt );
}
-void KMail::ACLEntryDialog::setValues( const QString& userId, unsigned int permissions )
+void KMail::ACLEntryDialog::setValues( const TQString& userId, unsigned int permissions )
{
mUserIdLineEdit->setText( userId );
mButtonGroup->setButton( permissions );
enableButtonOK( !userId.isEmpty() );
}
-QString KMail::ACLEntryDialog::userId() const
+TQString KMail::ACLEntryDialog::userId() const
{
return mUserIdLineEdit->text();
}
-QStringList KMail::ACLEntryDialog::userIds() const
+TQStringList KMail::ACLEntryDialog::userIds() const
{
- QStringList lst = QStringList::split( ",", mUserIdLineEdit->text() );
- for( QStringList::Iterator it = lst.begin(); it != lst.end(); ++it ) {
+ TQStringList lst = TQStringList::split( ",", mUserIdLineEdit->text() );
+ for( TQStringList::Iterator it = lst.begin(); it != lst.end(); ++it ) {
// Strip white space (in particular, due to ", ")
*it = (*it).stripWhiteSpace();
}
@@ -194,13 +194,13 @@ unsigned int KMail::ACLEntryDialog::permissions() const
// class KMail::FolderDiaACLTab::ListView : public KListView
// {
// public:
-// ListView( QWidget* parent, const char* name = 0 ) : KListView( parent, name ) {}
+// ListView( TQWidget* parent, const char* name = 0 ) : KListView( parent, name ) {}
// };
class KMail::FolderDiaACLTab::ListViewItem : public KListViewItem
{
public:
- ListViewItem( QListView* listview )
+ ListViewItem( TQListView* listview )
: KListViewItem( listview, listview->lastItem() ),
mModified( false ), mNew( false ) {}
@@ -213,8 +213,8 @@ public:
#endif
IMAPUserIdFormat userIdFormat );
- QString userId() const { return text( 0 ); }
- void setUserId( const QString& userId ) { setText( 0, userId ); }
+ TQString userId() const { return text( 0 ); }
+ void setUserId( const TQString& userId ) { setText( 0, userId ); }
unsigned int permissions() const { return mPermissions; }
void setPermissions( unsigned int permissions );
@@ -229,13 +229,13 @@ public:
private:
unsigned int mPermissions;
- QString mInternalRightsList; ///< protocol-dependent string (e.g. IMAP rights list)
+ TQString mInternalRightsList; ///< protocol-dependent string (e.g. IMAP rights list)
bool mModified;
bool mNew;
};
// internalRightsList is only used if permissions doesn't match the standard set
-static QString permissionsToUserString( unsigned int permissions, const QString& internalRightsList )
+static TQString permissionsToUserString( unsigned int permissions, const TQString& internalRightsList )
{
for ( unsigned int i = 0;
i < sizeof( standardPermissions ) / sizeof( *standardPermissions );
@@ -252,7 +252,7 @@ static QString permissionsToUserString( unsigned int permissions, const QString&
void KMail::FolderDiaACLTab::ListViewItem::setPermissions( unsigned int permissions )
{
mPermissions = permissions;
- setText( 1, permissionsToUserString( permissions, QString::null ) );
+ setText( 1, permissionsToUserString( permissions, TQString::null ) );
}
void KMail::FolderDiaACLTab::ListViewItem::load( const ACLListEntry& entry )
@@ -296,17 +296,17 @@ void KMail::FolderDiaACLTab::ListViewItem::save( ACLList& aclList,
KABC::DistributionList::Entry::List::ConstIterator it; // nice number of "::"!
#endif
for( it = entryList.begin(); it != entryList.end(); ++it ) {
- QString email = (*it).email;
+ TQString email = (*it).email;
if ( email.isEmpty() )
email = addresseeToUserId( (*it).addressee, userIdFormat );
- ACLListEntry entry( email, QString::null, mPermissions );
+ ACLListEntry entry( email, TQString::null, mPermissions );
entry.changed = true;
aclList.append( entry );
}
} else { // it wasn't a distribution list
ACLListEntry entry( userId(), mInternalRightsList, mPermissions );
if ( mModified ) {
- entry.internalRightsList = QString::null;
+ entry.internalRightsList = TQString::null;
entry.changed = true;
}
aclList.append( entry );
@@ -315,24 +315,24 @@ void KMail::FolderDiaACLTab::ListViewItem::save( ACLList& aclList,
////
-KMail::FolderDiaACLTab::FolderDiaACLTab( KMFolderDialog* dlg, QWidget* parent, const char* name )
+KMail::FolderDiaACLTab::FolderDiaACLTab( KMFolderDialog* dlg, TQWidget* parent, const char* name )
: FolderDiaTab( parent, name ),
mImapAccount( 0 ),
mUserRights( 0 ),
mDlg( dlg ),
mChanged( false ), mAccepting( false ), mSaving( false )
{
- QVBoxLayout* topLayout = new QVBoxLayout( this );
+ TQVBoxLayout* topLayout = new TQVBoxLayout( this );
// We need a widget stack to show either a label ("no acl support", "please wait"...)
// or a listview.
- mStack = new QWidgetStack( this );
+ mStack = new TQWidgetStack( this );
topLayout->addWidget( mStack );
- mLabel = new QLabel( mStack );
+ mLabel = new TQLabel( mStack );
mLabel->setAlignment( AlignHCenter | AlignVCenter | WordBreak );
mStack->addWidget( mLabel );
- mACLWidget = new QHBox( mStack );
+ mACLWidget = new TQHBox( mStack );
mACLWidget->setSpacing( KDialog::spacingHint() );
mListView = new KListView( mACLWidget );
mListView->setAllColumnsShowFocus( true );
@@ -340,28 +340,28 @@ KMail::FolderDiaACLTab::FolderDiaACLTab( KMFolderDialog* dlg, QWidget* parent, c
mListView->addColumn( i18n( "User Id" ) );
mListView->addColumn( i18n( "Permissions" ) );
- connect( mListView, SIGNAL(doubleClicked(QListViewItem*,const QPoint&,int)),
- SLOT(slotEditACL(QListViewItem*)) );
- connect( mListView, SIGNAL(returnPressed(QListViewItem*)),
- SLOT(slotEditACL(QListViewItem*)) );
- connect( mListView, SIGNAL(selectionChanged(QListViewItem*)),
- SLOT(slotSelectionChanged(QListViewItem*)) );
+ connect( mListView, TQT_SIGNAL(doubleClicked(TQListViewItem*,const TQPoint&,int)),
+ TQT_SLOT(slotEditACL(TQListViewItem*)) );
+ connect( mListView, TQT_SIGNAL(returnPressed(TQListViewItem*)),
+ TQT_SLOT(slotEditACL(TQListViewItem*)) );
+ connect( mListView, TQT_SIGNAL(selectionChanged(TQListViewItem*)),
+ TQT_SLOT(slotSelectionChanged(TQListViewItem*)) );
- QVBox* buttonBox = new QVBox( mACLWidget );
+ TQVBox* buttonBox = new TQVBox( mACLWidget );
buttonBox->setSpacing( KDialog::spacingHint() );
mAddACL = new KPushButton( i18n( "Add Entry..." ), buttonBox );
mEditACL = new KPushButton( i18n( "Modify Entry..." ), buttonBox );
mRemoveACL = new KPushButton( i18n( "Remove Entry" ), buttonBox );
- QWidget *spacer = new QWidget( buttonBox );
- spacer->setSizePolicy( QSizePolicy::Minimum, QSizePolicy::Expanding );
+ TQWidget *spacer = new TQWidget( buttonBox );
+ spacer->setSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Expanding );
- connect( mAddACL, SIGNAL( clicked() ), SLOT( slotAddACL() ) );
- connect( mEditACL, SIGNAL( clicked() ), SLOT( slotEditACL() ) );
- connect( mRemoveACL, SIGNAL( clicked() ), SLOT( slotRemoveACL() ) );
+ connect( mAddACL, TQT_SIGNAL( clicked() ), TQT_SLOT( slotAddACL() ) );
+ connect( mEditACL, TQT_SIGNAL( clicked() ), TQT_SLOT( slotEditACL() ) );
+ connect( mRemoveACL, TQT_SIGNAL( clicked() ), TQT_SLOT( slotRemoveACL() ) );
mEditACL->setEnabled( false );
mRemoveACL->setEnabled( false );
- connect( this, SIGNAL( changed(bool) ), SLOT( slotChanged(bool) ) );
+ connect( this, TQT_SIGNAL( changed(bool) ), TQT_SLOT( slotChanged(bool) ) );
}
// Warning before save() this will return the url of the _parent_ folder, when creating a new one
@@ -409,12 +409,12 @@ void KMail::FolderDiaACLTab::load()
// or just the username part of it.
// To know which one it is, we currently have a hidden config option,
// but the default value is determined from the current user's own id.
- QString defaultFormat = "fullemail";
+ TQString defaultFormat = "fullemail";
// warning mImapAccount can be 0 if creating a subsubsubfolder with dimap... (bug?)
if ( mImapAccount && mImapAccount->login().find('@') == -1 )
defaultFormat = "username"; // no @ found, so we assume it's just the username
KConfigGroup configGroup( kmkernel->config(), "IMAP" );
- QString str = configGroup.readEntry( "UserIdFormat", defaultFormat );
+ TQString str = configGroup.readEntry( "UserIdFormat", defaultFormat );
mUserIdFormat = FullEmail;
if ( str == "username" )
mUserIdFormat = UserName;
@@ -452,19 +452,19 @@ void KMail::FolderDiaACLTab::load()
mLabel->setText( i18n( "Connecting to server %1, please wait..." ).arg( mImapAccount->host() ) );
ImapAccountBase::ConnectionState state = mImapAccount->makeConnection();
if ( state == ImapAccountBase::Error ) { // Cancelled by user, or slave can't start
- slotConnectionResult( -1, QString::null );
+ slotConnectionResult( -1, TQString::null );
} else if ( state == ImapAccountBase::Connecting ) {
- connect( mImapAccount, SIGNAL( connectionResult(int, const QString&) ),
- this, SLOT( slotConnectionResult(int, const QString&) ) );
+ connect( mImapAccount, TQT_SIGNAL( connectionResult(int, const TQString&) ),
+ this, TQT_SLOT( slotConnectionResult(int, const TQString&) ) );
} else { // Connected
- slotConnectionResult( 0, QString::null );
+ slotConnectionResult( 0, TQString::null );
}
}
-void KMail::FolderDiaACLTab::slotConnectionResult( int errorCode, const QString& errorMsg )
+void KMail::FolderDiaACLTab::slotConnectionResult( int errorCode, const TQString& errorMsg )
{
- disconnect( mImapAccount, SIGNAL( connectionResult(int, const QString&) ),
- this, SLOT( slotConnectionResult(int, const QString&) ) );
+ disconnect( mImapAccount, TQT_SIGNAL( connectionResult(int, const TQString&) ),
+ this, TQT_SLOT( slotConnectionResult(int, const TQString&) ) );
if ( errorCode ) {
if ( errorCode == -1 ) // unspecified error
mLabel->setText( i18n( "Error connecting to server %1" ).arg( mImapAccount->host() ) );
@@ -475,8 +475,8 @@ void KMail::FolderDiaACLTab::slotConnectionResult( int errorCode, const QString&
}
if ( mUserRights == 0 ) {
- connect( mImapAccount, SIGNAL( receivedUserRights( KMFolder* ) ),
- this, SLOT( slotReceivedUserRights( KMFolder* ) ) );
+ connect( mImapAccount, TQT_SIGNAL( receivedUserRights( KMFolder* ) ),
+ this, TQT_SLOT( slotReceivedUserRights( KMFolder* ) ) );
KMFolder* folder = mDlg->folder() ? mDlg->folder() : mDlg->parentFolder();
mImapAccount->getUserRights( folder, mImapPath );
}
@@ -502,15 +502,15 @@ void KMail::FolderDiaACLTab::startListing()
{
// List ACLs of folder - or its parent, if creating a new folder
mImapAccount->getACL( mDlg->folder() ? mDlg->folder() : mDlg->parentFolder(), mImapPath );
- connect( mImapAccount, SIGNAL(receivedACL( KMFolder*, KIO::Job*, const KMail::ACLList& )),
- this, SLOT(slotReceivedACL( KMFolder*, KIO::Job*, const KMail::ACLList& )) );
+ connect( mImapAccount, TQT_SIGNAL(receivedACL( KMFolder*, KIO::Job*, const KMail::ACLList& )),
+ this, TQT_SLOT(slotReceivedACL( KMFolder*, KIO::Job*, const KMail::ACLList& )) );
}
void KMail::FolderDiaACLTab::slotReceivedACL( KMFolder* folder, KIO::Job* job, const KMail::ACLList& aclList )
{
if ( folder == ( mDlg->folder() ? mDlg->folder() : mDlg->parentFolder() ) ) {
- disconnect( mImapAccount, SIGNAL(receivedACL( KMFolder*, KIO::Job*, const KMail::ACLList& )),
- this, SLOT(slotReceivedACL( KMFolder*, KIO::Job*, const KMail::ACLList& )) );
+ disconnect( mImapAccount, TQT_SIGNAL(receivedACL( KMFolder*, KIO::Job*, const KMail::ACLList& )),
+ this, TQT_SLOT(slotReceivedACL( KMFolder*, KIO::Job*, const KMail::ACLList& )) );
if ( job && job->error() ) {
if ( job->error() == KIO::ERR_UNSUPPORTED_ACTION )
@@ -547,7 +547,7 @@ void KMail::FolderDiaACLTab::loadFinished( const ACLList& aclList )
slotSelectionChanged( mListView->selectedItem() );
}
-void KMail::FolderDiaACLTab::slotEditACL(QListViewItem* item)
+void KMail::FolderDiaACLTab::slotEditACL(TQListViewItem* item)
{
if ( !item ) return;
bool canAdmin = ( mUserRights & ACLJobs::Administer );
@@ -563,8 +563,8 @@ void KMail::FolderDiaACLTab::slotEditACL(QListViewItem* item)
ListViewItem* ACLitem = static_cast<ListViewItem *>( mListView->currentItem() );
ACLEntryDialog dlg( mUserIdFormat, i18n( "Modify Permissions" ), this );
dlg.setValues( ACLitem->userId(), ACLitem->permissions() );
- if ( dlg.exec() == QDialog::Accepted ) {
- QStringList userIds = dlg.userIds();
+ if ( dlg.exec() == TQDialog::Accepted ) {
+ TQStringList userIds = dlg.userIds();
Q_ASSERT( !userIds.isEmpty() ); // impossible, the OK button is disabled in that case
ACLitem->setUserId( dlg.userIds().front() );
ACLitem->setPermissions( dlg.permissions() );
@@ -582,9 +582,9 @@ void KMail::FolderDiaACLTab::slotEditACL()
slotEditACL( mListView->currentItem() );
}
-void KMail::FolderDiaACLTab::addACLs( const QStringList& userIds, unsigned int permissions )
+void KMail::FolderDiaACLTab::addACLs( const TQStringList& userIds, unsigned int permissions )
{
- for( QStringList::const_iterator it = userIds.begin(); it != userIds.end(); ++it ) {
+ for( TQStringList::const_iterator it = userIds.begin(); it != userIds.end(); ++it ) {
ListViewItem* ACLitem = new ListViewItem( mListView );
ACLitem->setUserId( *it );
ACLitem->setPermissions( permissions );
@@ -596,14 +596,14 @@ void KMail::FolderDiaACLTab::addACLs( const QStringList& userIds, unsigned int p
void KMail::FolderDiaACLTab::slotAddACL()
{
ACLEntryDialog dlg( mUserIdFormat, i18n( "Add Permissions" ), this );
- if ( dlg.exec() == QDialog::Accepted ) {
- const QStringList userIds = dlg.userIds();
+ if ( dlg.exec() == TQDialog::Accepted ) {
+ const TQStringList userIds = dlg.userIds();
addACLs( dlg.userIds(), dlg.permissions() );
emit changed(true);
}
}
-void KMail::FolderDiaACLTab::slotSelectionChanged(QListViewItem* item)
+void KMail::FolderDiaACLTab::slotSelectionChanged(TQListViewItem* item)
{
bool canAdmin = ( mUserRights & ACLJobs::Administer );
bool canAdminThisItem = canAdmin;
@@ -675,7 +675,7 @@ bool KMail::FolderDiaACLTab::save()
manager.load();
#endif
ACLList aclList;
- for ( QListViewItem* item = mListView->firstChild(); item; item = item->nextSibling() ) {
+ for ( TQListViewItem* item = mListView->firstChild(); item; item = item->nextSibling() ) {
ListViewItem* ACLitem = static_cast<ListViewItem *>( item );
ACLitem->save( aclList,
#ifdef KDEPIM_NEW_DISTRLISTS
@@ -691,17 +691,17 @@ bool KMail::FolderDiaACLTab::save()
// we have to add the old userid to the "to be deleted" list.
for( ACLList::ConstIterator init = mInitialACLList.begin(); init != mInitialACLList.end(); ++init ) {
bool isInNewList = false;
- QString uid = (*init).userId;
+ TQString uid = (*init).userId;
for( ACLList::ConstIterator it = aclList.begin(); it != aclList.end() && !isInNewList; ++it )
isInNewList = uid == (*it).userId;
if ( !isInNewList && !mRemovedACLs.contains(uid) )
mRemovedACLs.append( uid );
}
- for ( QStringList::ConstIterator rit = mRemovedACLs.begin(); rit != mRemovedACLs.end(); ++rit ) {
+ for ( TQStringList::ConstIterator rit = mRemovedACLs.begin(); rit != mRemovedACLs.end(); ++rit ) {
// We use permissions == -1 to signify deleting. At least on cyrus, setacl(0) or deleteacl are the same,
// but I'm not sure if that's true for all servers.
- ACLListEntry entry( *rit, QString::null, -1 );
+ ACLListEntry entry( *rit, TQString::null, -1 );
entry.changed = true;
aclList.append( entry );
}
@@ -723,8 +723,8 @@ bool KMail::FolderDiaACLTab::save()
if ( mDlg->isNewFolder() ) {
// The folder isn't created yet, wait for it
// It's a two-step process (mkdir+listDir) so we wait for the dir listing to be complete
- connect( parentImap, SIGNAL( directoryListingFinished(KMFolderImap*) ),
- this, SLOT( slotDirectoryListingFinished(KMFolderImap*) ) );
+ connect( parentImap, TQT_SIGNAL( directoryListingFinished(KMFolderImap*) ),
+ this, TQT_SLOT( slotDirectoryListingFinished(KMFolderImap*) ) );
} else {
slotDirectoryListingFinished( parentImap );
}
@@ -752,10 +752,10 @@ void KMail::FolderDiaACLTab::slotDirectoryListingFinished(KMFolderImap* f)
jd.total = 1; jd.done = 0; jd.parent = 0;
mImapAccount->insertJob(job, jd);
- connect(job, SIGNAL(result(KIO::Job *)),
- SLOT(slotMultiSetACLResult(KIO::Job *)));
- connect(job, SIGNAL(aclChanged( const QString&, int )),
- SLOT(slotACLChanged( const QString&, int )) );
+ connect(job, TQT_SIGNAL(result(KIO::Job *)),
+ TQT_SLOT(slotMultiSetACLResult(KIO::Job *)));
+ connect(job, TQT_SIGNAL(aclChanged( const TQString&, int )),
+ TQT_SLOT(slotACLChanged( const TQString&, int )) );
}
void KMail::FolderDiaACLTab::slotMultiSetACLResult(KIO::Job* job)
@@ -776,13 +776,13 @@ void KMail::FolderDiaACLTab::slotMultiSetACLResult(KIO::Job* job)
}
}
-void KMail::FolderDiaACLTab::slotACLChanged( const QString& userId, int permissions )
+void KMail::FolderDiaACLTab::slotACLChanged( const TQString& userId, int permissions )
{
// The job indicates success in changing the permissions for this user
// -> we note that it's been done.
bool ok = false;
if ( permissions > -1 ) {
- for ( QListViewItem* item = mListView->firstChild(); item; item = item->nextSibling() ) {
+ for ( TQListViewItem* item = mListView->firstChild(); item; item = item->nextSibling() ) {
ListViewItem* ACLitem = static_cast<ListViewItem *>( item );
if ( ACLitem->userId() == userId ) {
ACLitem->setModified( false );
diff --git a/kmail/folderdiaacltab.h b/kmail/folderdiaacltab.h
index a800af9b7..466ec2d62 100644
--- a/kmail/folderdiaacltab.h
+++ b/kmail/folderdiaacltab.h
@@ -48,7 +48,7 @@ namespace KMail {
enum IMAPUserIdFormat { FullEmail, UserName };
struct ACLListEntry;
-typedef QValueVector<KMail::ACLListEntry> ACLList;
+typedef TQValueVector<KMail::ACLListEntry> ACLList;
class ImapAccountBase;
@@ -60,12 +60,12 @@ class ACLEntryDialog :public KDialogBase {
Q_OBJECT
public:
- ACLEntryDialog( IMAPUserIdFormat userIdFormat, const QString& caption, QWidget* parent, const char* name = 0 );
+ ACLEntryDialog( IMAPUserIdFormat userIdFormat, const TQString& caption, TQWidget* parent, const char* name = 0 );
- void setValues( const QString& userId, unsigned int permissions );
+ void setValues( const TQString& userId, unsigned int permissions );
- QString userId() const;
- QStringList userIds() const;
+ TQString userId() const;
+ TQStringList userIds() const;
unsigned int permissions() const;
private slots:
@@ -73,7 +73,7 @@ private slots:
void slotChanged();
private:
- QVButtonGroup* mButtonGroup;
+ TQVButtonGroup* mButtonGroup;
KLineEdit* mUserIdLineEdit;
IMAPUserIdFormat mUserIdFormat;
};
@@ -87,7 +87,7 @@ class FolderDiaACLTab : public FolderDiaTab
Q_OBJECT
public:
- FolderDiaACLTab( KMFolderDialog* dlg, QWidget* parent, const char* name = 0 );
+ FolderDiaACLTab( KMFolderDialog* dlg, TQWidget* parent, const char* name = 0 );
virtual void load();
virtual bool save();
@@ -97,16 +97,16 @@ public:
private slots:
// Network (KIO) slots
- void slotConnectionResult( int, const QString& );
+ void slotConnectionResult( int, const TQString& );
void slotReceivedACL( KMFolder*, KIO::Job*, const KMail::ACLList& );
void slotMultiSetACLResult(KIO::Job *);
- void slotACLChanged( const QString&, int );
+ void slotACLChanged( const TQString&, int );
void slotReceivedUserRights( KMFolder* folder );
void slotDirectoryListingFinished(KMFolderImap*);
// User (KListView) slots
- void slotEditACL(QListViewItem*);
- void slotSelectionChanged(QListViewItem*);
+ void slotEditACL(TQListViewItem*);
+ void slotSelectionChanged(TQListViewItem*);
// User (pushbuttons) slots
void slotAddACL();
@@ -121,11 +121,11 @@ private:
void startListing();
void loadListView( const KMail::ACLList& aclList );
void loadFinished( const KMail::ACLList& aclList );
- void addACLs( const QStringList& userIds, unsigned int permissions );
+ void addACLs( const TQStringList& userIds, unsigned int permissions );
private:
// The widget containing the ACL widgets (listview and buttons)
- QHBox* mACLWidget;
+ TQHBox* mACLWidget;
//class ListView;
class ListViewItem;
KListView* mListView;
@@ -133,8 +133,8 @@ private:
KPushButton* mEditACL;
KPushButton* mRemoveACL;
- QStringList mRemovedACLs;
- QString mImapPath;
+ TQStringList mRemovedACLs;
+ TQString mImapPath;
ImapAccountBase* mImapAccount;
int mUserRights;
KMFolderType mFolderType;
@@ -142,8 +142,8 @@ private:
ACLList mACLList; // to be set
IMAPUserIdFormat mUserIdFormat;
- QLabel* mLabel;
- QWidgetStack* mStack;
+ TQLabel* mLabel;
+ TQWidgetStack* mStack;
KMFolderDialog* mDlg;
bool mChanged;
diff --git a/kmail/folderdiaquotatab.cpp b/kmail/folderdiaquotatab.cpp
index 537e69b6f..01cb8dbb5 100644
--- a/kmail/folderdiaquotatab.cpp
+++ b/kmail/folderdiaquotatab.cpp
@@ -38,11 +38,11 @@
#include "kmacctcachedimap.h"
#include "imapaccountbase.h"
-#include <qwidgetstack.h>
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qprogressbar.h>
-#include <qwhatsthis.h>
+#include <tqwidgetstack.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqprogressbar.h>
+#include <tqwhatsthis.h>
#include "folderdiaquotatab_p.h"
@@ -50,18 +50,18 @@
using namespace KMail;
-KMail::FolderDiaQuotaTab::FolderDiaQuotaTab( KMFolderDialog* dlg, QWidget* parent, const char* name )
+KMail::FolderDiaQuotaTab::FolderDiaQuotaTab( KMFolderDialog* dlg, TQWidget* parent, const char* name )
: FolderDiaTab( parent, name ),
mImapAccount( 0 ),
mDlg( dlg )
{
- QVBoxLayout* topLayout = new QVBoxLayout( this );
+ TQVBoxLayout* topLayout = new TQVBoxLayout( this );
// We need a widget stack to show either a label ("no qutoa support", "please wait"...)
// or quota info
- mStack = new QWidgetStack( this );
+ mStack = new TQWidgetStack( this );
topLayout->addWidget( mStack );
- mLabel = new QLabel( mStack );
+ mLabel = new TQLabel( mStack );
mLabel->setAlignment( AlignHCenter | AlignVCenter | WordBreak );
mStack->addWidget( mLabel );
@@ -120,20 +120,20 @@ void KMail::FolderDiaQuotaTab::load()
mLabel->setText( i18n( "Connecting to server %1, please wait..." ).arg( mImapAccount->host() ) );
ImapAccountBase::ConnectionState state = mImapAccount->makeConnection();
if ( state == ImapAccountBase::Error ) { // Cancelled by user, or slave can't start
- slotConnectionResult( -1, QString::null );
+ slotConnectionResult( -1, TQString::null );
} else if ( state == ImapAccountBase::Connecting ) {
- connect( mImapAccount, SIGNAL( connectionResult(int, const QString&) ),
- this, SLOT( slotConnectionResult(int, const QString&) ) );
+ connect( mImapAccount, TQT_SIGNAL( connectionResult(int, const TQString&) ),
+ this, TQT_SLOT( slotConnectionResult(int, const TQString&) ) );
} else { // Connected
- slotConnectionResult( 0, QString::null );
+ slotConnectionResult( 0, TQString::null );
}
}
-void KMail::FolderDiaQuotaTab::slotConnectionResult( int errorCode, const QString& errorMsg )
+void KMail::FolderDiaQuotaTab::slotConnectionResult( int errorCode, const TQString& errorMsg )
{
- disconnect( mImapAccount, SIGNAL( connectionResult(int, const QString&) ),
- this, SLOT( slotConnectionResult(int, const QString&) ) );
+ disconnect( mImapAccount, TQT_SIGNAL( connectionResult(int, const TQString&) ),
+ this, TQT_SLOT( slotConnectionResult(int, const TQString&) ) );
if ( errorCode ) {
if ( errorCode == -1 ) // unspecified error
mLabel->setText( i18n( "Error connecting to server %1" ).arg( mImapAccount->host() ) );
@@ -142,8 +142,8 @@ void KMail::FolderDiaQuotaTab::slotConnectionResult( int errorCode, const QStrin
mLabel->setText( KIO::buildErrorString( errorCode, errorMsg ) );
return;
}
- connect( mImapAccount, SIGNAL( receivedStorageQuotaInfo( KMFolder*, KIO::Job*, const KMail::QuotaInfo& ) ),
- this, SLOT( slotReceivedQuotaInfo( KMFolder*, KIO::Job*, const KMail::QuotaInfo& ) ) );
+ connect( mImapAccount, TQT_SIGNAL( receivedStorageQuotaInfo( KMFolder*, KIO::Job*, const KMail::QuotaInfo& ) ),
+ this, TQT_SLOT( slotReceivedQuotaInfo( KMFolder*, KIO::Job*, const KMail::QuotaInfo& ) ) );
KMFolder* folder = mDlg->folder() ? mDlg->folder() : mDlg->parentFolder();
mImapAccount->getStorageQuotaInfo( folder, mImapPath );
}
@@ -155,8 +155,8 @@ void KMail::FolderDiaQuotaTab::slotReceivedQuotaInfo( KMFolder* folder,
if ( folder == mDlg->folder() ? mDlg->folder() : mDlg->parentFolder() ) {
//KMFolderImap* folderImap = static_cast<KMFolderImap*>( folder->storage() );
- disconnect( mImapAccount, SIGNAL(receivedStorageQuotaInfo( KMFolder*, KIO::Job*, const KMail::QuotaInfo& )),
- this, SLOT(slotReceivedQuotaInfo( KMFolder*, KIO::Job*, const KMail::QuotaInfo& )) );
+ disconnect( mImapAccount, TQT_SIGNAL(receivedStorageQuotaInfo( KMFolder*, KIO::Job*, const KMail::QuotaInfo& )),
+ this, TQT_SLOT(slotReceivedQuotaInfo( KMFolder*, KIO::Job*, const KMail::QuotaInfo& )) );
if ( job && job->error() ) {
if ( job->error() == KIO::ERR_UNSUPPORTED_ACTION )
diff --git a/kmail/folderdiaquotatab.h b/kmail/folderdiaquotatab.h
index a8df44927..79032d524 100644
--- a/kmail/folderdiaquotatab.h
+++ b/kmail/folderdiaquotatab.h
@@ -55,7 +55,7 @@ class FolderDiaQuotaTab : public FolderDiaTab
Q_OBJECT
public:
- FolderDiaQuotaTab( KMFolderDialog* dlg, QWidget* parent, const char* name = 0 );
+ FolderDiaQuotaTab( KMFolderDialog* dlg, TQWidget* parent, const char* name = 0 );
virtual void load();
virtual bool save();
@@ -68,17 +68,17 @@ private:
void showQuotaWidget();
private slots:
// Network (KIO) slots
- void slotConnectionResult( int, const QString& );
+ void slotConnectionResult( int, const TQString& );
void slotReceivedQuotaInfo( KMFolder*, KIO::Job*, const KMail::QuotaInfo& );
private:
- QLabel* mLabel;
+ TQLabel* mLabel;
KMail::QuotaWidget* mQuotaWidget;
- QWidgetStack* mStack;
+ TQWidgetStack* mStack;
ImapAccountBase* mImapAccount;
- QString mImapPath;
+ TQString mImapPath;
KMFolderDialog* mDlg;
QuotaInfo mQuotaInfo;
diff --git a/kmail/folderdiaquotatab_p.cpp b/kmail/folderdiaquotatab_p.cpp
index 35cfb02b1..be623fe30 100644
--- a/kmail/folderdiaquotatab_p.cpp
+++ b/kmail/folderdiaquotatab_p.cpp
@@ -31,11 +31,11 @@
#include "folderdiaquotatab_p.h"
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qprogressbar.h>
-#include <qwhatsthis.h>
-#include <qcombobox.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqprogressbar.h>
+#include <tqwhatsthis.h>
+#include <tqcombobox.h>
#include <math.h>
@@ -51,22 +51,22 @@ using namespace KMail;
struct QuotaInfo;
-QuotaWidget::QuotaWidget( QWidget* parent, const char* name )
- :QWidget( parent, name )
+QuotaWidget::QuotaWidget( TQWidget* parent, const char* name )
+ :TQWidget( parent, name )
{
- QVBoxLayout *box = new QVBoxLayout(this);
- QWidget *stuff = new QWidget( this );
- QGridLayout* layout =
- new QGridLayout( stuff, 3, 3,
+ TQVBoxLayout *box = new TQVBoxLayout(this);
+ TQWidget *stuff = new TQWidget( this );
+ TQGridLayout* layout =
+ new TQGridLayout( stuff, 3, 3,
KDialog::marginHint(),
KDialog::spacingHint() );
- mInfoLabel = new QLabel("", stuff );
- mRootLabel = new QLabel("", stuff );
- mProgressBar = new QProgressBar( stuff );
- layout->addWidget( new QLabel( i18n("Root:" ), stuff ), 0, 0 );
+ mInfoLabel = new TQLabel("", stuff );
+ mRootLabel = new TQLabel("", stuff );
+ mProgressBar = new TQProgressBar( stuff );
+ layout->addWidget( new TQLabel( i18n("Root:" ), stuff ), 0, 0 );
layout->addWidget( mRootLabel, 0, 1 );
- layout->addWidget( new QLabel( i18n("Usage:"), stuff ), 1, 0 );
- //layout->addWidget( new QLabel( i18n("Status:"), stuff ), 2, 0 );
+ layout->addWidget( new TQLabel( i18n("Usage:"), stuff ), 1, 0 );
+ //layout->addWidget( new TQLabel( i18n("Status:"), stuff ), 2, 0 );
layout->addWidget( mInfoLabel, 1, 1 );
layout->addWidget( mProgressBar, 2, 1 );
box->addWidget( stuff );
diff --git a/kmail/folderdiaquotatab_p.h b/kmail/folderdiaquotatab_p.h
index 53a4948a4..68b5c19fe 100644
--- a/kmail/folderdiaquotatab_p.h
+++ b/kmail/folderdiaquotatab_p.h
@@ -34,27 +34,27 @@
#define FOLDERDIAQUOTA_P_H
-#include <qlabel.h>
-#include <qprogressbar.h>
-#include <qwhatsthis.h>
+#include <tqlabel.h>
+#include <tqprogressbar.h>
+#include <tqwhatsthis.h>
#include "quotajobs.h"
namespace KMail {
-class QuotaWidget : public QWidget {
+class QuotaWidget : public TQWidget {
Q_OBJECT
public:
- QuotaWidget( QWidget* parent, const char* name = 0 );
+ QuotaWidget( TQWidget* parent, const char* name = 0 );
virtual ~QuotaWidget() { }
void setQuotaInfo( const KMail::QuotaInfo& info );
private:
- QLabel* mInfoLabel;
- QLabel* mRootLabel;
- QProgressBar* mProgressBar;
- QString mUnits;
+ TQLabel* mInfoLabel;
+ TQLabel* mRootLabel;
+ TQProgressBar* mProgressBar;
+ TQString mUnits;
int mFactor;
};
diff --git a/kmail/folderjob.cpp b/kmail/folderjob.cpp
index e689e36ac..69a1557a5 100644
--- a/kmail/folderjob.cpp
+++ b/kmail/folderjob.cpp
@@ -44,7 +44,7 @@ namespace KMail {
//----------------------------------------------------------------------------
FolderJob::FolderJob( KMMessage *msg, JobType jt, KMFolder* folder,
- QString partSpecifier )
+ TQString partSpecifier )
: mType( jt ), mSrcFolder( 0 ), mDestFolder( folder ), mPartSpecifier( partSpecifier ),
mErrorCode( 0 ),
mPassiveDestructor( false ), mStarted( false )
@@ -57,7 +57,7 @@ FolderJob::FolderJob( KMMessage *msg, JobType jt, KMFolder* folder,
}
//----------------------------------------------------------------------------
-FolderJob::FolderJob( const QPtrList<KMMessage>& msgList, const QString& sets,
+FolderJob::FolderJob( const TQPtrList<KMMessage>& msgList, const TQString& sets,
JobType jt, KMFolder *folder )
: mMsgList( msgList ),mType( jt ),
mSets( sets ), mSrcFolder( 0 ), mDestFolder( folder ),
@@ -119,7 +119,7 @@ void FolderJob::kill()
}
//----------------------------------------------------------------------------
-QPtrList<KMMessage>
+TQPtrList<KMMessage>
FolderJob::msgList() const
{
return mMsgList;
diff --git a/kmail/folderjob.h b/kmail/folderjob.h
index 84e285864..b1f712512 100644
--- a/kmail/folderjob.h
+++ b/kmail/folderjob.h
@@ -33,9 +33,9 @@
#include "kmmessage.h"
-#include <qobject.h>
-#include <qptrlist.h>
-#include <qstring.h>
+#include <tqobject.h>
+#include <tqptrlist.h>
+#include <tqstring.h>
class KMFolder;
@@ -55,14 +55,14 @@ public:
* @p jt and with a parent folder @p folder.
*/
FolderJob( KMMessage *msg, JobType jt = tGetMessage, KMFolder *folder = 0,
- QString partSpecifier = QString::null );
+ TQString partSpecifier = TQString::null );
/**
* Constructs a new job, operating on a message list @p msgList,
* set @sets, JobType @p jt and with the parent folder @p folder.
*
*/
- FolderJob( const QPtrList<KMMessage>& msgList, const QString& sets,
+ FolderJob( const TQPtrList<KMMessage>& msgList, const TQString& sets,
JobType jt = tGetMessage, KMFolder *folder = 0 );
/**
* This one should ONLY be used in derived folders, when a job
@@ -72,7 +72,7 @@ public:
FolderJob( JobType jt );
virtual ~FolderJob();
- QPtrList<KMMessage> msgList() const;
+ TQPtrList<KMMessage> msgList() const;
/**
* Start the job
*/
@@ -117,7 +117,7 @@ signals:
/**
* Emitted whenever a KMMessage was updated
*/
- void messageUpdated( KMMessage *, QString );
+ void messageUpdated( KMMessage *, TQString );
/**
* Emitted whenever a message has been stored in
@@ -127,10 +127,10 @@ signals:
/**
* Emitted when a list of messages has been
- * copied to the specified location. QPtrList contains
+ * copied to the specified location. TQPtrList contains
* the list of the copied messages.
*/
- void messageCopied( QPtrList<KMMessage> );
+ void messageCopied( TQPtrList<KMMessage> );
/**
* Overloaded signal to the one above. A lot of copying
@@ -169,12 +169,12 @@ protected:
*/
virtual void execute()=0;
- QPtrList<KMMessage> mMsgList;
+ TQPtrList<KMMessage> mMsgList;
JobType mType;
- QString mSets;
+ TQString mSets;
KMFolder* mSrcFolder;
KMFolder* mDestFolder;
- QString mPartSpecifier;
+ TQString mPartSpecifier;
int mErrorCode;
//finished() won't be emitted when this is set
diff --git a/kmail/folderpropertiesdialog.ui.h b/kmail/folderpropertiesdialog.ui.h
index ef1bcf953..c72511246 100644
--- a/kmail/folderpropertiesdialog.ui.h
+++ b/kmail/folderpropertiesdialog.ui.h
@@ -7,7 +7,7 @@
** place of a destructor.
*****************************************************************************/
-void KMFolderDialogUI::slotChangeIcon( QString /* icon */ )
+void KMFolderDialogUI::slotChangeIcon( TQString /* icon */ )
{
//FIXME
//if ( mFolder && !mFolder->unreadIcon() )
diff --git a/kmail/folderrequester.cpp b/kmail/folderrequester.cpp
index e03ddba74..553fc5a02 100644
--- a/kmail/folderrequester.cpp
+++ b/kmail/folderrequester.cpp
@@ -36,28 +36,28 @@
#include <kiconloader.h>
#include <kdialog.h>
-#include <qlayout.h>
-#include <qtoolbutton.h>
+#include <tqlayout.h>
+#include <tqtoolbutton.h>
namespace KMail {
-FolderRequester::FolderRequester( QWidget *parent, KMFolderTree *tree )
- : QWidget( parent ), mFolder( 0 ), mFolderTree( tree ),
+FolderRequester::FolderRequester( TQWidget *parent, KMFolderTree *tree )
+ : TQWidget( parent ), mFolder( 0 ), mFolderTree( tree ),
mMustBeReadWrite( true ), mShowOutbox( true ), mShowImapFolders( true )
{
- QHBoxLayout * hlay = new QHBoxLayout( this, 0, KDialog::spacingHint() );
+ TQHBoxLayout * hlay = new TQHBoxLayout( this, 0, KDialog::spacingHint() );
hlay->setAutoAdd( true );
edit = new KLineEdit( this );
edit->setReadOnly( true );
- QToolButton* button = new QToolButton( this );
+ TQToolButton* button = new TQToolButton( this );
button->setIconSet( KGlobal::iconLoader()->loadIconSet( "folder", KIcon::Small, 0 ) );
- connect( button, SIGNAL(clicked()), this, SLOT(slotOpenDialog()) );
+ connect( button, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotOpenDialog()) );
- setSizePolicy( QSizePolicy( QSizePolicy::MinimumExpanding,
- QSizePolicy::Fixed ) );
- setFocusPolicy( QWidget::StrongFocus );
+ setSizePolicy( TQSizePolicy( TQSizePolicy::MinimumExpanding,
+ TQSizePolicy::Fixed ) );
+ setFocusPolicy( TQWidget::StrongFocus );
}
//-----------------------------------------------------------------------------
@@ -97,7 +97,7 @@ void FolderRequester::setFolder( KMFolder *folder )
}
//-----------------------------------------------------------------------------
-void FolderRequester::setFolder( const QString &idString )
+void FolderRequester::setFolder( const TQString &idString )
{
KMFolder *folder = kmkernel->findFolderById( idString );
if ( folder ) {
@@ -114,7 +114,7 @@ void FolderRequester::setFolder( const QString &idString )
}
//-----------------------------------------------------------------------------
-void FolderRequester::keyPressEvent( QKeyEvent * e )
+void FolderRequester::keyPressEvent( TQKeyEvent * e )
{
if ( e->key() == Qt::Key_Space )
slotOpenDialog();
diff --git a/kmail/folderrequester.h b/kmail/folderrequester.h
index e404456c7..30e39c637 100644
--- a/kmail/folderrequester.h
+++ b/kmail/folderrequester.h
@@ -29,7 +29,7 @@
#ifndef folderrequester_h
#define folderrequester_h
-#include <qwidget.h>
+#include <tqwidget.h>
#include <klineedit.h>
class KMFolder;
@@ -53,21 +53,21 @@ namespace KMail {
* @param parent the parent widget
* @param tree the KMFolderTree to get the folders
*/
- FolderRequester( QWidget *parent, KMFolderTree* tree );
+ FolderRequester( TQWidget *parent, KMFolderTree* tree );
virtual ~FolderRequester();
/** Returns selected folder */
KMFolder* folder( void ) const;
/** Returns the folder id */
- QString folderId() const { return mFolderId; }
+ TQString folderId() const { return mFolderId; }
/** Returns current text */
- QString text() const { return edit->originalText(); }
+ TQString text() const { return edit->originalText(); }
/** Preset the folder */
void setFolder( KMFolder* );
- void setFolder( const QString& idString );
+ void setFolder( const TQString& idString );
/**
* Set if readonly folders should be disabled
@@ -95,13 +95,13 @@ namespace KMail {
protected:
/** Capture space key to open the dialog */
- virtual void keyPressEvent( QKeyEvent * e );
+ virtual void keyPressEvent( TQKeyEvent * e );
protected:
KLineEdit* edit;
KMFolder* mFolder;
KMFolderTree* mFolderTree;
- QString mFolderId;
+ TQString mFolderId;
bool mMustBeReadWrite;
bool mShowOutbox;
bool mShowImapFolders;
diff --git a/kmail/foldershortcutdialog.cpp b/kmail/foldershortcutdialog.cpp
index f6b1cf923..80e1b28f3 100644
--- a/kmail/foldershortcutdialog.cpp
+++ b/kmail/foldershortcutdialog.cpp
@@ -36,10 +36,10 @@
**
*******************************************************************************/
-#include <qlabel.h>
-#include <qvbox.h>
-#include <qvgroupbox.h>
-#include <qwhatsthis.h>
+#include <tqlabel.h>
+#include <tqvbox.h>
+#include <tqvgroupbox.h>
+#include <tqwhatsthis.h>
#include <kkeybutton.h>
#include <klocale.h>
@@ -53,26 +53,26 @@ using namespace KMail;
FolderShortcutDialog::FolderShortcutDialog( KMFolder *folder,
KMMainWidget *mainwidget,
- QWidget *parent,
+ TQWidget *parent,
const char *name )
: KDialogBase( parent, name, true,
i18n( "Shortcut for Folder %1" ).arg( folder->label() ),
KDialogBase::Ok | KDialogBase::Cancel ),
mFolder( folder ), mMainWidget( mainwidget )
{
- QVBox *box = makeVBoxMainWidget();
- QVGroupBox *gb = new QVGroupBox( i18n("Select Shortcut for Folder"), box );
- QWhatsThis::add( gb, i18n( "<qt>To choose a key or a combination "
+ TQVBox *box = makeVBoxMainWidget();
+ TQVGroupBox *gb = new TQVGroupBox( i18n("Select Shortcut for Folder"), box );
+ TQWhatsThis::add( gb, i18n( "<qt>To choose a key or a combination "
"of keys which select the current folder, "
"click the button below and then press the key(s) "
"you wish to associate with this folder.</qt>" ) );
- QHBox *hb = new QHBox( gb );
- new QWidget(hb);
+ TQHBox *hb = new TQHBox( gb );
+ new TQWidget(hb);
mKeyButton = new KKeyButton( hb, "FolderShortcutSelector" );
- new QWidget(hb);
+ new TQWidget(hb);
- connect( mKeyButton, SIGNAL( capturedShortcut( const KShortcut& ) ),
- this, SLOT( slotCapturedShortcut( const KShortcut& ) ) );
+ connect( mKeyButton, TQT_SIGNAL( capturedShortcut( const KShortcut& ) ),
+ this, TQT_SLOT( slotCapturedShortcut( const KShortcut& ) ) );
mKeyButton->setShortcut( folder->shortcut(), false );
}
@@ -88,7 +88,7 @@ void FolderShortcutDialog::slotCapturedShortcut( const KShortcut& sc )
mKeyButton->setShortcut( KShortcut::null(), false );
} else {
if( !mMainWidget->shortcutIsValid( sc ) ) {
- QString msg( i18n( "The selected shortcut is already used, "
+ TQString msg( i18n( "The selected shortcut is already used, "
"please select a different one." ) );
KMessageBox::sorry( mMainWidget, msg );
} else {
diff --git a/kmail/foldershortcutdialog.h b/kmail/foldershortcutdialog.h
index bf9596990..1934ad23c 100644
--- a/kmail/foldershortcutdialog.h
+++ b/kmail/foldershortcutdialog.h
@@ -53,7 +53,7 @@ class FolderShortcutDialog : public KDialogBase
Q_OBJECT
public:
FolderShortcutDialog( KMFolder *folder, KMMainWidget *mw,
- QWidget *parent=0, const char *name=0 );
+ TQWidget *parent=0, const char *name=0 );
~FolderShortcutDialog();
diff --git a/kmail/folderstorage.cpp b/kmail/folderstorage.cpp
index 89fc20db9..c1d447a67 100644
--- a/kmail/folderstorage.cpp
+++ b/kmail/folderstorage.cpp
@@ -52,8 +52,8 @@ using KMail::ListJob;
#include <kconfig.h>
#include <kdebug.h>
-#include <qfile.h>
-#include <qregexp.h>
+#include <tqfile.h>
+#include <tqregexp.h>
#include <mimelib/mimepp.h>
#include <errno.h>
@@ -61,7 +61,7 @@ using KMail::ListJob;
//-----------------------------------------------------------------------------
FolderStorage::FolderStorage( KMFolder* folder, const char* aName )
- : QObject( folder, aName ), mFolder( folder ), mEmitChangedTimer( 0L )
+ : TQObject( folder, aName ), mFolder( folder ), mEmitChangedTimer( 0L )
{
mOpenCount = 0;
mQuiet = 0;
@@ -79,21 +79,21 @@ FolderStorage::FolderStorage( KMFolder* folder, const char* aName )
mNoContent = false;
mNoChildren = false;
mRDict = 0;
- mDirtyTimer = new QTimer(this, "mDirtyTimer");
- connect(mDirtyTimer, SIGNAL(timeout()),
- this, SLOT(updateIndex()));
+ mDirtyTimer = new TQTimer(this, "mDirtyTimer");
+ connect(mDirtyTimer, TQT_SIGNAL(timeout()),
+ this, TQT_SLOT(updateIndex()));
mHasChildren = HasNoChildren;
mContentsType = KMail::ContentsTypeMail;
- connect(this, SIGNAL(closed(KMFolder*)), mFolder, SIGNAL(closed()));
+ connect(this, TQT_SIGNAL(closed(KMFolder*)), mFolder, TQT_SIGNAL(closed()));
}
//-----------------------------------------------------------------------------
FolderStorage::~FolderStorage()
{
mJobList.setAutoDelete( true );
- QObject::disconnect( SIGNAL(destroyed(QObject*)), this, 0 );
+ TQObject::disconnect( TQT_SIGNAL(destroyed(TQObject*)), this, 0 );
mJobList.clear();
KMMsgDict::deleteRentry(mRDict);
}
@@ -110,29 +110,29 @@ void FolderStorage::close( const char* owner, bool aForced )
}
//-----------------------------------------------------------------------------
-QString FolderStorage::dotEscape(const QString& aStr)
+TQString FolderStorage::dotEscape(const TQString& aStr)
{
if (aStr[0] != '.') return aStr;
- return aStr.left(aStr.find(QRegExp("[^\\.]"))) + aStr;
+ return aStr.left(aStr.find(TQRegExp("[^\\.]"))) + aStr;
}
void FolderStorage::addJob( FolderJob* job ) const
{
- QObject::connect( job, SIGNAL(destroyed(QObject*)),
- SLOT(removeJob(QObject*)) );
+ TQObject::connect( job, TQT_SIGNAL(destroyed(TQObject*)),
+ TQT_SLOT(removeJob(TQObject*)) );
mJobList.append( job );
}
-void FolderStorage::removeJob( QObject* job )
+void FolderStorage::removeJob( TQObject* job )
{
mJobList.remove( static_cast<FolderJob*>( job ) );
}
//-----------------------------------------------------------------------------
-QString FolderStorage::location() const
+TQString FolderStorage::location() const
{
- QString sLocation(const_cast<FolderStorage*>(this)->folder()->path());
+ TQString sLocation(const_cast<FolderStorage*>(this)->folder()->path());
if (!sLocation.isEmpty()) sLocation += '/';
sLocation += dotEscape(fileName());
@@ -140,7 +140,7 @@ QString FolderStorage::location() const
return sLocation;
}
-QString FolderStorage::fileName() const
+TQString FolderStorage::fileName() const
{
return mFolder->name();
}
@@ -211,9 +211,9 @@ void FolderStorage::quiet(bool beQuiet)
* a timer is created when a folder is checked
*/
if ( !mEmitChangedTimer) {
- mEmitChangedTimer= new QTimer( this, "mEmitChangedTimer" );
- connect( mEmitChangedTimer, SIGNAL( timeout() ),
- this, SLOT( slotEmitChangedTimer() ) );
+ mEmitChangedTimer= new TQTimer( this, "mEmitChangedTimer" );
+ connect( mEmitChangedTimer, TQT_SIGNAL( timeout() ),
+ this, TQT_SLOT( slotEmitChangedTimer() ) );
}
mQuiet++;
} else {
@@ -256,7 +256,7 @@ int FolderStorage::expungeOldMsg(int days)
int i, msgnb=0;
time_t msgTime, maxTime;
const KMMsgBase* mb;
- QValueList<int> rmvMsgList;
+ TQValueList<int> rmvMsgList;
maxTime = time(0) - days * 3600 * 24;
@@ -309,8 +309,8 @@ bool FolderStorage::canAddMsgNow(KMMessage* aMsg, int* aIndex_ret)
if (!aMsg->isComplete() && msgParent && msgParent->folderType() == KMFolderTypeImap)
{
FolderJob *job = msgParent->createJob(aMsg);
- connect(job, SIGNAL(messageRetrieved(KMMessage*)),
- SLOT(reallyAddMsg(KMMessage*)));
+ connect(job, TQT_SIGNAL(messageRetrieved(KMMessage*)),
+ TQT_SLOT(reallyAddMsg(KMMessage*)));
job->start();
aMsg->setTransferInProgress( true );
return false;
@@ -355,9 +355,9 @@ int FolderStorage::find( const KMMessage * msg ) const {
}
//-----------------------------------------------------------------------------
-void FolderStorage::removeMsg(const QPtrList<KMMsgBase>& msgList, bool imapQuiet)
+void FolderStorage::removeMsg(const TQPtrList<KMMsgBase>& msgList, bool imapQuiet)
{
- for( QPtrListIterator<KMMsgBase> it( msgList ); *it; ++it )
+ for( TQPtrListIterator<KMMsgBase> it( msgList ); *it; ++it )
{
int idx = find(it.current());
assert( idx != -1);
@@ -366,9 +366,9 @@ void FolderStorage::removeMsg(const QPtrList<KMMsgBase>& msgList, bool imapQuiet
}
//-----------------------------------------------------------------------------
-void FolderStorage::removeMsg(const QPtrList<KMMessage>& msgList, bool imapQuiet)
+void FolderStorage::removeMsg(const TQPtrList<KMMessage>& msgList, bool imapQuiet)
{
- for( QPtrListIterator<KMMessage> it( msgList ); *it; ++it )
+ for( TQPtrListIterator<KMMessage> it( msgList ); *it; ++it )
{
int idx = find(it.current());
assert( idx != -1);
@@ -413,7 +413,7 @@ void FolderStorage::removeMsg(int idx, bool)
--mTotalMsgs;
mSize = -1;
- QString msgIdMD5 = mb->msgIdMD5();
+ TQString msgIdMD5 = mb->msgIdMD5();
emit msgRemoved( idx, msgIdMD5 );
emit msgRemoved( folder() );
}
@@ -452,14 +452,14 @@ KMMessage* FolderStorage::take(int idx)
setDirty( true );
mSize = -1;
needsCompact=true; // message is taken from here - needs to be compacted
- QString msgIdMD5 = msg->msgIdMD5();
+ TQString msgIdMD5 = msg->msgIdMD5();
emit msgRemoved( idx, msgIdMD5 );
emit msgRemoved( folder() );
return msg;
}
-void FolderStorage::take(QPtrList<KMMessage> msgList)
+void FolderStorage::take(TQPtrList<KMMessage> msgList)
{
for ( KMMessage* msg = msgList.first(); msg; msg = msgList.next() )
{
@@ -496,7 +496,7 @@ KMMessage* FolderStorage::getMsg(int idx)
if (mb->isMessage()) {
msg = ((KMMessage*)mb);
} else {
- QString mbSubject = mb->subject();
+ TQString mbSubject = mb->subject();
msg = readMsg(idx);
// sanity check
if (mCompactable && (!msg || (msg->subject().isEmpty() != mbSubject.isEmpty()))) {
@@ -585,7 +585,7 @@ bool FolderStorage::isMessage(int idx)
//-----------------------------------------------------------------------------
FolderJob* FolderStorage::createJob( KMMessage *msg, FolderJob::JobType jt,
- KMFolder *folder, QString partSpecifier,
+ KMFolder *folder, TQString partSpecifier,
const AttachmentStrategy *as ) const
{
FolderJob * job = doCreateJob( msg, jt, folder, partSpecifier, as );
@@ -595,7 +595,7 @@ FolderJob* FolderStorage::createJob( KMMessage *msg, FolderJob::JobType jt,
}
//-----------------------------------------------------------------------------
-FolderJob* FolderStorage::createJob( QPtrList<KMMessage>& msgList, const QString& sets,
+FolderJob* FolderStorage::createJob( TQPtrList<KMMessage>& msgList, const TQString& sets,
FolderJob::JobType jt, KMFolder *folder ) const
{
FolderJob * job = doCreateJob( msgList, sets, jt, folder );
@@ -624,7 +624,7 @@ int FolderStorage::moveMsg(KMMessage* aMsg, int* aIndex_ret)
}
//-----------------------------------------------------------------------------
-int FolderStorage::moveMsg(QPtrList<KMMessage> msglist, int* aIndex_ret)
+int FolderStorage::moveMsg(TQPtrList<KMMessage> msglist, int* aIndex_ret)
{
KMMessage* aMsg = msglist.first();
assert(aMsg != 0);
@@ -633,11 +633,11 @@ int FolderStorage::moveMsg(QPtrList<KMMessage> msglist, int* aIndex_ret)
if (msgParent)
msgParent->open("foldermovemsg");
- QValueList<int> index;
+ TQValueList<int> index;
open("moveMsg");
int rc = addMsg(msglist, index);
close("moveMsg");
- // FIXME: we want to have a QValueList to pass it back, so change this method
+ // FIXME: we want to have a TQValueList to pass it back, so change this method
if ( !index.isEmpty() )
aIndex_ret = &index.first();
@@ -649,11 +649,11 @@ int FolderStorage::moveMsg(QPtrList<KMMessage> msglist, int* aIndex_ret)
//-----------------------------------------------------------------------------
-int FolderStorage::rename(const QString& newName, KMFolderDir *newParent)
+int FolderStorage::rename(const TQString& newName, KMFolderDir *newParent)
{
- QString oldLoc, oldIndexLoc, oldIdsLoc, newLoc, newIndexLoc, newIdsLoc;
- QString oldSubDirLoc, newSubDirLoc;
- QString oldName;
+ TQString oldLoc, oldIndexLoc, oldIdsLoc, newLoc, newIndexLoc, newIdsLoc;
+ TQString oldSubDirLoc, newSubDirLoc;
+ TQString oldName;
int rc=0;
KMFolderDir *oldParent;
@@ -663,7 +663,7 @@ int FolderStorage::rename(const QString& newName, KMFolderDir *newParent)
oldIndexLoc = indexLocation();
oldSubDirLoc = folder()->subdirLocation();
oldIdsLoc = KMMsgDict::instance()->getFolderIdsLocation( *this );
- QString oldConfigString = "Folder-" + folder()->idString();
+ TQString oldConfigString = "Folder-" + folder()->idString();
close("rename", true);
@@ -678,7 +678,7 @@ int FolderStorage::rename(const QString& newName, KMFolderDir *newParent)
newSubDirLoc = folder()->subdirLocation();
newIdsLoc = KMMsgDict::instance()->getFolderIdsLocation( *this );
- if (::rename(QFile::encodeName(oldLoc), QFile::encodeName(newLoc))) {
+ if (::rename(TQFile::encodeName(oldLoc), TQFile::encodeName(newLoc))) {
folder()->setName(oldName);
folder()->setParent(oldParent);
rc = errno;
@@ -686,26 +686,26 @@ int FolderStorage::rename(const QString& newName, KMFolderDir *newParent)
else {
// rename/move index file and index.sorted file
if (!oldIndexLoc.isEmpty()) {
- ::rename(QFile::encodeName(oldIndexLoc), QFile::encodeName(newIndexLoc));
- ::rename(QFile::encodeName(oldIndexLoc) + ".sorted",
- QFile::encodeName(newIndexLoc) + ".sorted");
+ ::rename(TQFile::encodeName(oldIndexLoc), TQFile::encodeName(newIndexLoc));
+ ::rename(TQFile::encodeName(oldIndexLoc) + ".sorted",
+ TQFile::encodeName(newIndexLoc) + ".sorted");
}
// rename/move serial number file
if (!oldIdsLoc.isEmpty())
- ::rename(QFile::encodeName(oldIdsLoc), QFile::encodeName(newIdsLoc));
+ ::rename(TQFile::encodeName(oldIdsLoc), TQFile::encodeName(newIdsLoc));
// rename/move the subfolder directory
KMFolderDir* child = 0;
if( folder() )
child = folder()->child();
- if (!::rename(QFile::encodeName(oldSubDirLoc), QFile::encodeName(newSubDirLoc) )) {
+ if (!::rename(TQFile::encodeName(oldSubDirLoc), TQFile::encodeName(newSubDirLoc) )) {
// now that the subfolder directory has been renamed and/or moved also
// change the name that is stored in the corresponding KMFolderNode
// (provide that the name actually changed)
if( child && ( oldName != newName ) ) {
- child->setName( "." + QFile::encodeName(newName) + ".directory" );
+ child->setName( "." + TQFile::encodeName(newName) + ".directory" );
}
}
@@ -750,8 +750,8 @@ void FolderStorage::remove()
KMMsgDict::mutableInstance()->removeFolderIds( *this );
mExportsSernums = false; // do not writeFolderIds after removal
}
- unlink(QFile::encodeName(indexLocation()) + ".sorted");
- unlink(QFile::encodeName(indexLocation()));
+ unlink(TQFile::encodeName(indexLocation()) + ".sorted");
+ unlink(TQFile::encodeName(indexLocation()));
int rc = removeContents();
@@ -778,7 +778,7 @@ int FolderStorage::expunge()
KMMsgDict::mutableInstance()->removeFolderIds( *this );
if ( mAutoCreateIndex )
truncateIndex();
- else unlink(QFile::encodeName(indexLocation()));
+ else unlink(TQFile::encodeName(indexLocation()));
int rc = expungeContents();
if (rc) return rc;
@@ -799,7 +799,7 @@ int FolderStorage::expunge()
}
//-----------------------------------------------------------------------------
-QString FolderStorage::label() const
+TQString FolderStorage::label() const
{
return folder()->label();
}
@@ -974,8 +974,8 @@ void FolderStorage::readFolderIdsFile()
void FolderStorage::invalidateFolder()
{
if ( !mExportsSernums ) return;
- unlink(QFile::encodeName( indexLocation()) + ".sorted");
- unlink(QFile::encodeName( indexLocation()) + ".ids");
+ unlink(TQFile::encodeName( indexLocation()) + ".sorted");
+ unlink(TQFile::encodeName( indexLocation()) + ".ids");
fillMessageDict();
KMMsgDict::mutableInstance()->writeFolderIds( *this );
emit invalidated( folder() );
@@ -1040,9 +1040,9 @@ void FolderStorage::setStatus(int idx, KMMsgStatus status, bool toggle)
//-----------------------------------------------------------------------------
-void FolderStorage::setStatus(QValueList<int>& ids, KMMsgStatus status, bool toggle)
+void FolderStorage::setStatus(TQValueList<int>& ids, KMMsgStatus status, bool toggle)
{
- for ( QValueList<int>::Iterator it = ids.begin(); it != ids.end(); ++it )
+ for ( TQValueList<int>::Iterator it = ids.begin(); it != ids.end(); ++it )
{
FolderStorage::setStatus(*it, status, toggle);
}
@@ -1053,7 +1053,7 @@ void FolderStorage::ignoreJobsForMessage( KMMessage *msg )
if ( !msg || msg->transferInProgress() )
return;
- QPtrListIterator<FolderJob> it( mJobList );
+ TQPtrListIterator<FolderJob> it( mJobList );
while ( it.current() )
{
//FIXME: the questions is : should we iterate through all
@@ -1122,7 +1122,7 @@ void FolderStorage::slotProcessNextSearchBatch()
{
if ( !mSearchPattern )
return;
- QValueList<Q_UINT32> matchingSerNums;
+ TQValueList<Q_UINT32> matchingSerNums;
const int end = QMIN( mCurrentSearchedMsg + 15, count() );
for ( int i = mCurrentSearchedMsg; i < end; ++i )
{
@@ -1134,7 +1134,7 @@ void FolderStorage::slotProcessNextSearchBatch()
bool complete = ( end >= count() );
emit searchResult( folder(), matchingSerNums, mSearchPattern, complete );
if ( !complete )
- QTimer::singleShot( 0, this, SLOT(slotProcessNextSearchBatch()) );
+ TQTimer::singleShot( 0, this, TQT_SLOT(slotProcessNextSearchBatch()) );
}
//-----------------------------------------------------------------------------
@@ -1146,11 +1146,11 @@ void FolderStorage::search( const KMSearchPattern* pattern, Q_UINT32 serNum )
}
//-----------------------------------------------------------------------------
-int FolderStorage::addMsg( QPtrList<KMMessage>& msgList, QValueList<int>& index_ret )
+int FolderStorage::addMsg( TQPtrList<KMMessage>& msgList, TQValueList<int>& index_ret )
{
int ret = 0;
int index;
- for ( QPtrListIterator<KMMessage> it( msgList ); *it; ++it )
+ for ( TQPtrListIterator<KMMessage> it( msgList ); *it; ++it )
{
int aret = addMsg( *it, &index );
index_ret << index;
diff --git a/kmail/folderstorage.h b/kmail/folderstorage.h
index 9b71f28af..8c4c648f1 100644
--- a/kmail/folderstorage.h
+++ b/kmail/folderstorage.h
@@ -63,7 +63,7 @@ namespace KMail {
}
using KMail::AttachmentStrategy;
-typedef QValueList<Q_UINT32> SerNumList;
+typedef TQValueList<Q_UINT32> SerNumList;
/**
* @short The FolderStorage class is the bass class for the storage related
@@ -95,12 +95,12 @@ public:
virtual KMFolderType folderType() const { return KMFolderTypeUnknown; }
/** Returns the filename of the folder (reimplemented in KMFolderImap) */
- virtual QString fileName() const;
+ virtual TQString fileName() const;
/** Returns full path to folder file */
- QString location() const;
+ TQString location() const;
/** Returns full path to index file */
- virtual QString indexLocation() const = 0;
+ virtual TQString indexLocation() const = 0;
/** Returns, if the folder can't contain mails, but only subfolder */
virtual bool noContent() const { return mNoContent; }
@@ -159,9 +159,9 @@ public:
* for each derived KMFolder).
*/
virtual FolderJob* createJob( KMMessage *msg, FolderJob::JobType jt = FolderJob::tGetMessage,
- KMFolder *folder = 0, QString partSpecifier = QString::null,
+ KMFolder *folder = 0, TQString partSpecifier = TQString::null,
const AttachmentStrategy *as = 0 ) const;
- virtual FolderJob* createJob( QPtrList<KMMessage>& msgList, const QString& sets,
+ virtual FolderJob* createJob( TQPtrList<KMMessage>& msgList, const TQString& sets,
FolderJob::JobType jt = FolderJob::tGetMessage,
KMFolder *folder = 0 ) const;
@@ -181,7 +181,7 @@ public:
/** Detach message from this folder. Usable to call addMsg() afterwards.
Loads the message if it is not loaded up to now. */
virtual KMMessage* take(int idx);
- virtual void take(QPtrList<KMMessage> msgList);
+ virtual void take(TQPtrList<KMMessage> msgList);
/** Add the given message to the folder. Usually the message
is added at the end of the folder. Returns zero on success and
@@ -202,7 +202,7 @@ public:
* Adds the given messages to the folder. Behaviour is identical
* to addMsg(msg)
*/
- virtual int addMsg( QPtrList<KMMessage>&, QValueList<int>& index_return );
+ virtual int addMsg( TQPtrList<KMMessage>&, TQValueList<int>& index_return );
/** Called by derived classes implementation of addMsg.
Emits msgAdded signals */
@@ -214,8 +214,8 @@ public:
/** Remove (first occurrence of) given message from the folder. */
virtual void removeMsg(int i, bool imapQuiet = false);
- virtual void removeMsg(const QPtrList<KMMsgBase>& msgList, bool imapQuiet = false);
- virtual void removeMsg(const QPtrList<KMMessage>& msgList, bool imapQuiet = false);
+ virtual void removeMsg(const TQPtrList<KMMsgBase>& msgList, bool imapQuiet = false);
+ virtual void removeMsg(const TQPtrList<KMMessage>& msgList, bool imapQuiet = false);
/** Delete messages in the folder that are older than days. Return the
* number of deleted messages. */
@@ -226,7 +226,7 @@ public:
code on failure. The index of the new message is stored in index_return
if given. */
virtual int moveMsg(KMMessage* msg, int* index_return = 0);
- virtual int moveMsg(QPtrList<KMMessage>, int* index_return = 0);
+ virtual int moveMsg(TQPtrList<KMMessage>, int* index_return = 0);
/** Returns the index of the given message or -1 if not found. */
virtual int find(const KMMsgBase* msg) const = 0;
@@ -308,7 +308,7 @@ public:
/** Physically rename the folder. Returns zero on success and an errno
on failure. */
- virtual int rename(const QString& newName, KMFolderDir *aParent = 0);
+ virtual int rename(const TQString& newName, KMFolderDir *aParent = 0);
/** Returns TRUE if a table of contents file is automatically created. */
bool autoCreateIndex() const { return mAutoCreateIndex; }
@@ -343,7 +343,7 @@ public:
virtual bool isReadOnly() const = 0;
/** Returns the label of the folder for visualization. */
- QString label() const;
+ TQString label() const;
/** A cludge to help make sure the count of unread messges is kept in sync */
virtual void correctUnreadMsgsCount();
@@ -363,13 +363,13 @@ public:
/** Set the status of the message at index @p idx to @p status. */
virtual void setStatus(int idx, KMMsgStatus status, bool toggle=false);
- /** Set the status of the message(s) in the QValueList @p ids to @p status. */
- virtual void setStatus(QValueList<int>& ids, KMMsgStatus status, bool toggle=false);
+ /** Set the status of the message(s) in the TQValueList @p ids to @p status. */
+ virtual void setStatus(TQValueList<int>& ids, KMMsgStatus status, bool toggle=false);
void removeJobs();
/** Escape a leading dot */
- static QString dotEscape(const QString&);
+ static TQString dotEscape(const TQString&);
/** Read the config file */
virtual void readConfig();
@@ -442,7 +442,7 @@ signals:
/** Emitted when the location on disk of the folder changes. This
* is used by all code which uses the locatio on disk of the folder storage
* ( or the cache storage ) as an identifier for the folder. */
- void locationChanged( const QString &, const QString & );
+ void locationChanged( const TQString &, const TQString & );
/** Emitted when the contents type (calendar, mail, tasks, ..) of the
* folderstorage changes. */
@@ -455,7 +455,7 @@ signals:
void msgRemoved(KMFolder*, Q_UINT32 sernum);
/** Emitted after a message is removed from the folder. */
- void msgRemoved( int idx, QString msgIdMD5 );
+ void msgRemoved( int idx, TQString msgIdMD5 );
void msgRemoved( KMFolder* );
/** Emitted when a message is added from the folder. */
@@ -469,7 +469,7 @@ signals:
void msgHeaderChanged(KMFolder*, int);
/** Emmited to display a message somewhere in a status line. */
- void statusMsg(const QString&);
+ void statusMsg(const TQString&);
/** Emitted when number of unread messages has changed. */
void numUnreadMsgsChanged( KMFolder* );
@@ -482,7 +482,7 @@ signals:
* The matching serial numbers are included
* If @p complete is true the search is done
*/
- void searchResult( KMFolder*, QValueList<Q_UINT32>,
+ void searchResult( KMFolder*, TQValueList<Q_UINT32>,
const KMSearchPattern*, bool complete );
/**
@@ -511,7 +511,7 @@ public slots:
void slotEmitChangedTimer();
protected slots:
- virtual void removeJob( QObject* );
+ virtual void removeJob( TQObject* );
/** Process the next search batch */
void slotProcessNextSearchBatch();
@@ -524,8 +524,8 @@ protected:
* @see createJob
*/
virtual FolderJob* doCreateJob( KMMessage *msg, FolderJob::JobType jt, KMFolder *folder,
- QString partSpecifier, const AttachmentStrategy *as ) const = 0;
- virtual FolderJob* doCreateJob( QPtrList<KMMessage>& msgList, const QString& sets,
+ TQString partSpecifier, const AttachmentStrategy *as ) const = 0;
+ virtual FolderJob* doCreateJob( TQPtrList<KMMessage>& msgList, const TQString& sets,
FolderJob::JobType jt, KMFolder *folder ) const = 0;
/** Tell the folder that a header field that is usually used for
@@ -624,9 +624,9 @@ friend class KMMsgDict;
/** Points at the reverse dictionary for this folder. */
mutable KMMsgDictREntry *mRDict;
/** List of jobs created by this folder. */
- mutable QPtrList<FolderJob> mJobList;
+ mutable TQPtrList<FolderJob> mJobList;
- QTimer *mDirtyTimer;
+ TQTimer *mDirtyTimer;
enum { mDirtyTimerInterval = 600000 }; // 10 minutes
ChildrenState mHasChildren;
@@ -636,7 +636,7 @@ friend class KMMsgDict;
KMFolder* mFolder;
- QTimer * mEmitChangedTimer;
+ TQTimer * mEmitChangedTimer;
int mCurrentSearchedMsg;
const KMSearchPattern* mSearchPattern;
diff --git a/kmail/foldertreebase.cpp b/kmail/foldertreebase.cpp
index 8f3b8c85a..3ca61845e 100644
--- a/kmail/foldertreebase.cpp
+++ b/kmail/foldertreebase.cpp
@@ -35,20 +35,20 @@ using KPIM::MailListDrag;
#include <kiconloader.h>
#include <kpopupmenu.h>
-#include <qcursor.h>
+#include <tqcursor.h>
using namespace KMail;
-FolderTreeBase::FolderTreeBase(KMMainWidget *mainWidget, QWidget * parent, const char * name) :
+FolderTreeBase::FolderTreeBase(KMMainWidget *mainWidget, TQWidget * parent, const char * name) :
KFolderTree( parent, name ),
mMainWidget( mainWidget )
{
addAcceptableDropMimetype(MailListDrag::format(), false);
}
-void FolderTreeBase::contentsDropEvent(QDropEvent * e)
+void FolderTreeBase::contentsDropEvent(TQDropEvent * e)
{
- QListViewItem *item = itemAt( contentsToViewport(e->pos()) );
+ TQListViewItem *item = itemAt( contentsToViewport(e->pos()) );
KMFolderTreeItem *fti = static_cast<KMFolderTreeItem*>(item);
if ( fti && fti->folder() && e->provides( MailListDrag::format() ) ) {
if ( e->source() == mMainWidget->headers()->viewport() ) {
@@ -86,7 +86,7 @@ int FolderTreeBase::dndMode(bool alwaysAsk)
menu->insertItem( SmallIcon("editcopy"), i18n("&Copy Here"), DRAG_COPY, 1 );
menu->insertSeparator();
menu->insertItem( SmallIcon("cancel"), i18n("C&ancel"), DRAG_CANCEL, 3 );
- action = menu->exec( QCursor::pos(), 0 );
+ action = menu->exec( TQCursor::pos(), 0 );
}
else
action = DRAG_MOVE;
@@ -94,9 +94,9 @@ int FolderTreeBase::dndMode(bool alwaysAsk)
return action;
}
-bool FolderTreeBase::event(QEvent * e)
+bool FolderTreeBase::event(TQEvent * e)
{
- if (e->type() == QEvent::ApplicationPaletteChange) {
+ if (e->type() == TQEvent::ApplicationPaletteChange) {
readColorConfig();
return true;
}
@@ -108,10 +108,10 @@ void FolderTreeBase::readColorConfig()
KConfig* conf = KMKernel::config();
// Custom/System color support
KConfigGroupSaver saver(conf, "Reader");
- QColor c1=QColor(kapp->palette().active().text());
- QColor c2=QColor("blue");
- QColor c4=QColor(kapp->palette().active().base());
- QColor c5=QColor("red");
+ TQColor c1=TQColor(kapp->palette().active().text());
+ TQColor c2=TQColor("blue");
+ TQColor c4=TQColor(kapp->palette().active().base());
+ TQColor c5=TQColor("red");
if (!conf->readBoolEntry("defaultColors",true)) {
mPaintInfo.colFore = conf->readColorEntry("ForegroundColor",&c1);
@@ -125,9 +125,9 @@ void FolderTreeBase::readColorConfig()
mPaintInfo.colBack = c4;
mPaintInfo.colCloseToQuota = c5;
}
- QPalette newPal = kapp->palette();
- newPal.setColor( QColorGroup::Base, mPaintInfo.colBack );
- newPal.setColor( QColorGroup::Text, mPaintInfo.colFore );
+ TQPalette newPal = kapp->palette();
+ newPal.setColor( TQColorGroup::Base, mPaintInfo.colBack );
+ newPal.setColor( TQColorGroup::Text, mPaintInfo.colFore );
setPalette( newPal );
}
@@ -157,7 +157,7 @@ bool FolderTreeBase::hideLocalInbox() const
void FolderTreeBase::slotUpdateCounts(KMFolder * folder, bool force /* = false*/)
{
// kdDebug(5006) << "KMFolderTree::slotUpdateCounts()" << endl;
- QListViewItem * current;
+ TQListViewItem * current;
if (folder)
current = indexOfFolder(folder);
else
@@ -222,13 +222,13 @@ void FolderTreeBase::slotUpdateCounts(KMFolder * folder, bool force /* = false*/
kmkernel->messageCountChanged();
}
-void FolderTreeBase::handleMailListDrop(QDropEvent * event, KMFolder *destination )
+void FolderTreeBase::handleMailListDrop(TQDropEvent * event, KMFolder *destination )
{
MailList list;
if ( !MailListDrag::decode( event, list ) ) {
kdWarning() << k_funcinfo << "Could not decode drag data!" << endl;
} else {
- QValueList<Q_UINT32> serNums = MessageCopyHelper::serNumListFromMailList( list );
+ TQValueList<Q_UINT32> serNums = MessageCopyHelper::serNumListFromMailList( list );
int action;
if ( MessageCopyHelper::inReadOnlyFolder( serNums ) )
action = DRAG_COPY;
diff --git a/kmail/foldertreebase.h b/kmail/foldertreebase.h
index 4e14a5a22..bc2ad0ccc 100644
--- a/kmail/foldertreebase.h
+++ b/kmail/foldertreebase.h
@@ -30,13 +30,13 @@ class FolderTreeBase : public KFolderTree
{
Q_OBJECT
public:
- FolderTreeBase( KMMainWidget *mainWidget, QWidget *parent = 0, const char *name = 0 );
+ FolderTreeBase( KMMainWidget *mainWidget, TQWidget *parent = 0, const char *name = 0 );
/** Returns the main widget that this widget is a child of. */
KMMainWidget* mainWidget() const { return mMainWidget; }
/** Find index of given folder. Returns 0 if not found */
- virtual QListViewItem* indexOfFolder( const KMFolder* folder ) const
+ virtual TQListViewItem* indexOfFolder( const KMFolder* folder ) const
{
if ( mFolderToItem.contains( folder ) )
return mFolderToItem[ folder ];
@@ -44,7 +44,7 @@ class FolderTreeBase : public KFolderTree
return 0;
}
- void insertIntoFolderToItemMap( const KMFolder *folder, QListViewItem* item )
+ void insertIntoFolderToItemMap( const KMFolder *folder, TQListViewItem* item )
{
mFolderToItem.insert( folder, item );
}
@@ -74,10 +74,10 @@ class FolderTreeBase : public KFolderTree
DRAG_CANCEL = 2
};
int dndMode( bool alwaysAsk = false );
- void contentsDropEvent( QDropEvent *e );
+ void contentsDropEvent( TQDropEvent *e );
/** Catch palette changes */
- virtual bool event(QEvent *e);
+ virtual bool event(TQEvent *e);
/** Read color options and set palette. */
virtual void readColorConfig();
@@ -86,11 +86,11 @@ class FolderTreeBase : public KFolderTree
bool hideLocalInbox() const;
/** Handle drop of a MailList object. */
- void handleMailListDrop( QDropEvent *event, KMFolder *destination );
+ void handleMailListDrop( TQDropEvent *event, KMFolder *destination );
protected:
KMMainWidget *mMainWidget;
- QMap<const KMFolder*, QListViewItem*> mFolderToItem;
+ TQMap<const KMFolder*, TQListViewItem*> mFolderToItem;
};
}
diff --git a/kmail/folderviewtooltip.h b/kmail/folderviewtooltip.h
index 55afa1a0e..24f9fbbec 100644
--- a/kmail/folderviewtooltip.h
+++ b/kmail/folderviewtooltip.h
@@ -3,27 +3,27 @@
#include <kmfoldercachedimap.h>
-#include <qtooltip.h>
+#include <tqtooltip.h>
namespace KMail {
class FolderViewToolTip : public QToolTip
{
public:
- FolderViewToolTip( QListView* parent ) :
- QToolTip( parent->viewport() ),
+ FolderViewToolTip( TQListView* parent ) :
+ TQToolTip( parent->viewport() ),
mListView( parent ) {}
protected:
- void maybeTip( const QPoint &point )
+ void maybeTip( const TQPoint &point )
{
KMFolderTreeItem *item = dynamic_cast<KMFolderTreeItem*>( mListView->itemAt( point ) );
if ( !item )
return;
- const QRect itemRect = mListView->itemRect( item );
+ const TQRect itemRect = mListView->itemRect( item );
if ( !itemRect.isValid() )
return;
- const QRect headerRect = mListView->header()->sectionRect( 0 );
+ const TQRect headerRect = mListView->header()->sectionRect( 0 );
if ( !headerRect.isValid() )
return;
@@ -31,10 +31,10 @@ class FolderViewToolTip : public QToolTip
return;
item->updateCount();
- QString tipText = i18n("<qt><b>%1</b><br>Total: %2<br>Unread: %3<br>Size: %4" )
+ TQString tipText = i18n("<qt><b>%1</b><br>Total: %2<br>Unread: %3<br>Size: %4" )
.arg( item->folder()->prettyURL().replace( " ", "&nbsp;" ) )
- .arg( item->totalCount() < 0 ? "-" : QString::number( item->totalCount() ) )
- .arg( item->unreadCount() < 0 ? "-" : QString::number( item->unreadCount() ) )
+ .arg( item->totalCount() < 0 ? "-" : TQString::number( item->totalCount() ) )
+ .arg( item->unreadCount() < 0 ? "-" : TQString::number( item->unreadCount() ) )
.arg( KIO::convertSize( item->folderSize() ) );
if ( KMFolderCachedImap* imap = dynamic_cast<KMFolderCachedImap*>( item->folder()->storage() ) ) {
@@ -43,11 +43,11 @@ class FolderViewToolTip : public QToolTip
tipText += i18n("<br>Quota: %1").arg( info.toString() );
}
- tip( QRect( headerRect.left(), itemRect.top(), headerRect.width(), itemRect.height() ), tipText );
+ tip( TQRect( headerRect.left(), itemRect.top(), headerRect.width(), itemRect.height() ), tipText );
}
private:
- QListView *mListView;
+ TQListView *mListView;
};
}
diff --git a/kmail/globalsettings.cpp b/kmail/globalsettings.cpp
index 1386338c4..b74309491 100644
--- a/kmail/globalsettings.cpp
+++ b/kmail/globalsettings.cpp
@@ -23,7 +23,7 @@
#include "globalsettings.h"
#include <kstaticdeleter.h>
-#include <qtimer.h>
+#include <tqtimer.h>
GlobalSettings *GlobalSettings::mSelf = 0;
static KStaticDeleter<GlobalSettings> staticGlobalSettingsDeleter;
@@ -40,8 +40,8 @@ GlobalSettings *GlobalSettings::self()
GlobalSettings::GlobalSettings()
{
- mConfigSyncTimer = new QTimer( this, "mConfigSyncTimer" );
- connect( mConfigSyncTimer, SIGNAL( timeout() ), this, SLOT( slotSyncNow() ) );
+ mConfigSyncTimer = new TQTimer( this, "mConfigSyncTimer" );
+ connect( mConfigSyncTimer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( slotSyncNow() ) );
}
void GlobalSettings::requestSync()
diff --git a/kmail/globalsettings.h b/kmail/globalsettings.h
index 68789415a..665d919cc 100644
--- a/kmail/globalsettings.h
+++ b/kmail/globalsettings.h
@@ -28,7 +28,7 @@
class QTimer;
-class GlobalSettings : public QObject, public GlobalSettingsBase
+class GlobalSettings : public TQObject, public GlobalSettingsBase
{
Q_OBJECT
public:
@@ -50,7 +50,7 @@ private:
GlobalSettings();
static GlobalSettings *mSelf;
- QTimer *mConfigSyncTimer;
+ TQTimer *mConfigSyncTimer;
};
diff --git a/kmail/headeritem.cpp b/kmail/headeritem.cpp
index ab9b8329f..f950d35c7 100644
--- a/kmail/headeritem.cpp
+++ b/kmail/headeritem.cpp
@@ -27,10 +27,10 @@
**
*******************************************************************************/
#include <klocale.h>
-#include <qapplication.h>
-#include <qregexp.h>
-#include <qbitmap.h>
-#include <qpainter.h>
+#include <tqapplication.h>
+#include <tqregexp.h>
+#include <tqbitmap.h>
+#include <tqpainter.h>
#include <kio/netaccess.h>
@@ -42,7 +42,7 @@
using namespace KMail;
// Constuction a new list view item with the given colors and pixmap
-HeaderItem::HeaderItem( QListView* parent, int msgId, const QString& key )
+HeaderItem::HeaderItem( TQListView* parent, int msgId, const TQString& key )
: KListViewItem( parent ),
mMsgId( msgId ),
mKey( key ),
@@ -53,7 +53,7 @@ HeaderItem::HeaderItem( QListView* parent, int msgId, const QString& key )
}
// Constuction a new list view item with the given parent, colors, & pixmap
-HeaderItem::HeaderItem( QListViewItem* parent, int msgId, const QString& key )
+HeaderItem::HeaderItem( TQListViewItem* parent, int msgId, const TQString& key )
: KListViewItem( parent ),
mMsgId( msgId ),
mKey( key ),
@@ -76,14 +76,14 @@ void HeaderItem::setMsgId( int aMsgId )
// Profiling note: About 30% of the time taken to initialize the
// listview is spent in this function. About 60% is spent in operator
-// new and QListViewItem::QListViewItem.
+// new and TQListViewItem::TQListViewItem.
void HeaderItem::irefresh()
{
KMHeaders *headers = static_cast<KMHeaders*>(listView());
NestingPolicy threadingPolicy = headers->getNestingPolicy();
if ((threadingPolicy == AlwaysOpen) ||
(threadingPolicy == DefaultOpen)) {
- //Avoid opening items as QListView is currently slow to do so.
+ //Avoid opening items as TQListView is currently slow to do so.
setOpen(true);
return;
@@ -127,7 +127,7 @@ Q_UINT32 HeaderItem::msgSerNum() const
void HeaderItem::setOpenRecursive( bool open )
{
if (open){
- QListViewItem * lvchild;
+ TQListViewItem * lvchild;
lvchild = firstChild();
while (lvchild){
((HeaderItem*)lvchild)->setOpenRecursive( true );
@@ -139,14 +139,14 @@ void HeaderItem::setOpenRecursive( bool open )
}
}
-QString HeaderItem::text( int col) const
+TQString HeaderItem::text( int col) const
{
KMHeaders *headers = static_cast<KMHeaders*>(listView());
KMMsgBase *mMsgBase = headers->folder()->getMsgBase( mMsgId );
- QString tmp;
+ TQString tmp;
if ( !mMsgBase )
- return QString();
+ return TQString();
if ( col == headers->paintInfo()->senderCol ) {
if ( (headers->folder()->whoField().lower() == "to") && !headers->paintInfo()->showReceiver )
@@ -170,7 +170,7 @@ QString HeaderItem::text( int col) const
if (tmp.isEmpty())
tmp = i18n("No Subject");
else
- tmp.remove(QRegExp("[\r\n]"));
+ tmp.remove(TQRegExp("[\r\n]"));
} else if(col == headers->paintInfo()->dateCol) {
tmp = headers->mDate.dateString( mMsgBase->date() );
@@ -189,17 +189,17 @@ void HeaderItem::setup()
{
widthChanged();
const int ph = KMHeaders::pixNew->height();
- QListView *v = listView();
+ TQListView *v = listView();
int h = QMAX( v->fontMetrics().height(), ph ) + 2*v->itemMargin();
- h = QMAX( h, QApplication::globalStrut().height());
+ h = QMAX( h, TQApplication::globalStrut().height());
if ( h % 2 > 0 )
h++;
setHeight( h );
}
-typedef QValueList<QPixmap> PixmapList;
+typedef TQValueList<TQPixmap> PixmapList;
-QPixmap HeaderItem::pixmapMerge( PixmapList pixmaps ) const
+TQPixmap HeaderItem::pixmapMerge( PixmapList pixmaps ) const
{
int width = 0;
int height = 0;
@@ -209,8 +209,8 @@ QPixmap HeaderItem::pixmapMerge( PixmapList pixmaps ) const
height = QMAX( height, (*it).height() );
}
- QPixmap res( width, height );
- QBitmap mask( width, height, true );
+ TQPixmap res( width, height );
+ TQBitmap mask( width, height, true );
int x = 0;
for ( PixmapList::ConstIterator it = pixmaps.begin();
@@ -224,7 +224,7 @@ QPixmap HeaderItem::pixmapMerge( PixmapList pixmaps ) const
return res;
}
-const QPixmap *HeaderItem::cryptoIcon(KMMsgBase *msgBase) const
+const TQPixmap *HeaderItem::cryptoIcon(KMMsgBase *msgBase) const
{
switch ( msgBase->encryptionState() )
{
@@ -236,7 +236,7 @@ const QPixmap *HeaderItem::cryptoIcon(KMMsgBase *msgBase) const
}
}
-const QPixmap *HeaderItem::signatureIcon(KMMsgBase *msgBase) const
+const TQPixmap *HeaderItem::signatureIcon(KMMsgBase *msgBase) const
{
switch ( msgBase->signatureState() )
{
@@ -248,7 +248,7 @@ const QPixmap *HeaderItem::signatureIcon(KMMsgBase *msgBase) const
}
}
-const QPixmap *HeaderItem::statusIcon(KMMsgBase *msgBase) const
+const TQPixmap *HeaderItem::statusIcon(KMMsgBase *msgBase) const
{
// forwarded, replied have precedence over the other states
if ( msgBase->isForwarded() && !msgBase->isReplied() ) return KMHeaders::pixReadFwd;
@@ -267,7 +267,7 @@ const QPixmap *HeaderItem::statusIcon(KMMsgBase *msgBase) const
return 0;
}
-const QPixmap *HeaderItem::pixmap(int col) const
+const TQPixmap *HeaderItem::pixmap(int col) const
{
KMHeaders *headers = static_cast<KMHeaders*>(listView());
KMMsgBase *msgBase = headers->folder()->getMsgBase( mMsgId );
@@ -288,7 +288,7 @@ const QPixmap *HeaderItem::pixmap(int col) const
}
if ( !headers->mPaintInfo.showStatus ) {
- const QPixmap *pix = statusIcon(msgBase);
+ const TQPixmap *pix = statusIcon(msgBase);
if ( pix ) pixmaps << *pix;
}
@@ -300,7 +300,7 @@ const QPixmap *HeaderItem::pixmap(int col) const
// Only merge the crypto icons in if that is configured.
if ( headers->paintInfo()->showCryptoIcons ) {
- const QPixmap *pix;
+ const TQPixmap *pix;
if ( !headers->paintInfo()->showCrypto )
if ( (pix = cryptoIcon(msgBase)) ) pixmaps << *pix;
@@ -315,7 +315,7 @@ const QPixmap *HeaderItem::pixmap(int col) const
if ( !headers->mPaintInfo.showTodo )
if ( msgBase->isTodo() ) pixmaps << *KMHeaders::pixTodo;
- static QPixmap mergedpix;
+ static TQPixmap mergedpix;
mergedpix = pixmapMerge( pixmaps );
return &mergedpix;
}
@@ -351,7 +351,7 @@ const QPixmap *HeaderItem::pixmap(int col) const
return 0;
}
-void HeaderItem::paintCell( QPainter * p, const QColorGroup & cg,
+void HeaderItem::paintCell( TQPainter * p, const TQColorGroup & cg,
int column, int width, int align )
{
KMHeaders *headers = static_cast<KMHeaders*>(listView());
@@ -360,32 +360,32 @@ void HeaderItem::paintCell( QPainter * p, const QColorGroup & cg,
KMMsgBase *mMsgBase = headers->folder()->getMsgBase( mMsgId );
if (!mMsgBase) return;
- QColorGroup _cg( cg );
- QColor c = _cg.text();
- QColor *color = const_cast<QColor *>( &headers->paintInfo()->colFore );
- QFont font = p->font();
+ TQColorGroup _cg( cg );
+ TQColor c = _cg.text();
+ TQColor *color = const_cast<TQColor *>( &headers->paintInfo()->colFore );
+ TQFont font = p->font();
int weight = font.weight();
// for color and font family "important" overrides "new" overrides "unread"
// overrides "todo" for the weight we use the maximal weight
if ( mMsgBase->isTodo() ) {
- color = const_cast<QColor*>( &headers->paintInfo()->colTodo );
+ color = const_cast<TQColor*>( &headers->paintInfo()->colTodo );
font = headers->todoFont();
weight = QMAX( weight, font.weight() );
}
if ( mMsgBase->isUnread() ) {
- color = const_cast<QColor*>( &headers->paintInfo()->colUnread );
+ color = const_cast<TQColor*>( &headers->paintInfo()->colUnread );
font = headers->unreadFont();
weight = QMAX( weight, font.weight() );
}
if ( mMsgBase->isNew() ) {
- color = const_cast<QColor*>( &headers->paintInfo()->colNew );
+ color = const_cast<TQColor*>( &headers->paintInfo()->colNew );
font = headers->newFont();
weight = QMAX( weight, font.weight() );
}
if ( mMsgBase->isImportant() ) {
- color = const_cast<QColor*>( &headers->paintInfo()->colFlag );
+ color = const_cast<TQColor*>( &headers->paintInfo()->colFlag );
font = headers->importantFont();
weight = QMAX( weight, font.weight() );
}
@@ -393,14 +393,14 @@ void HeaderItem::paintCell( QPainter * p, const QColorGroup & cg,
font = headers->dateFont();
}
- QColor cdisabled = KGlobalSettings::inactiveTextColor();
+ TQColor cdisabled = KGlobalSettings::inactiveTextColor();
if ( headers->isMessageCut( msgSerNum() ) ) {
font.setItalic( true );
color = &cdisabled;
}
// set color and font
- _cg.setColor( QColorGroup::Text, *color );
+ _cg.setColor( TQColorGroup::Text, *color );
font.setWeight( weight );
p->setFont( font );
@@ -412,44 +412,44 @@ void HeaderItem::paintCell( QPainter * p, const QColorGroup & cg,
}
// reset color
- _cg.setColor( QColorGroup::Text, c );
+ _cg.setColor( TQColorGroup::Text, c );
}
-QString HeaderItem::generate_key( KMHeaders *headers,
+TQString HeaderItem::generate_key( KMHeaders *headers,
KMMsgBase *msg,
const KPaintInfo *paintInfo,
int sortOrder )
{
- // It appears, that QListView in Qt-3.0 asks for the key
- // in QListView::clear(), which is called from
+ // It appears, that TQListView in Qt-3.0 asks for the key
+ // in TQListView::clear(), which is called from
// readSortOrder()
- if (!msg) return QString::null;
+ if (!msg) return TQString::null;
int column = sortOrder & ((1 << 5) - 1);
- QString ret = QChar( (char)sortOrder );
- QString sortArrival = QString( "%1" ).arg( msg->getMsgSerNum(), 0, 36 );
+ TQString ret = TQChar( (char)sortOrder );
+ TQString sortArrival = TQString( "%1" ).arg( msg->getMsgSerNum(), 0, 36 );
while (sortArrival.length() < 7) sortArrival = '0' + sortArrival;
if (column == paintInfo->dateCol) {
if (paintInfo->orderOfArrival)
return ret + sortArrival;
else {
- QString d = QString::number(msg->date());
+ TQString d = TQString::number(msg->date());
while (d.length() <= 10) d = '0' + d;
return ret + d + sortArrival;
}
} else if (column == paintInfo->senderCol) {
- QString tmp;
+ TQString tmp;
if ( (headers->folder()->whoField().lower() == "to") && !headers->paintInfo()->showReceiver )
tmp = msg->toStrip();
else
tmp = msg->fromStrip();
return ret + tmp.lower() + ' ' + sortArrival;
} else if (column == paintInfo->receiverCol) {
- QString tmp = msg->toStrip();
+ TQString tmp = msg->toStrip();
return ret + tmp.lower() + ' ' + sortArrival;
} else if (column == paintInfo->subCol) {
- QString tmp;
+ TQString tmp;
tmp = ret;
if (paintInfo->status) {
tmp += msg->statusToSortRank() + ' ';
@@ -458,18 +458,18 @@ QString HeaderItem::generate_key( KMHeaders *headers,
return tmp;
}
else if (column == paintInfo->sizeCol) {
- QString len;
+ TQString len;
if ( msg->parent()->folderType() == KMFolderTypeImap )
{
- len = QString::number( msg->msgSizeServer() );
+ len = TQString::number( msg->msgSizeServer() );
} else {
- len = QString::number( msg->msgSize() );
+ len = TQString::number( msg->msgSize() );
}
while (len.length() < 9) len = '0' + len;
return ret + len + sortArrival;
}
else if (column == paintInfo->statusCol) {
- QString s;
+ TQString s;
if ( msg->isNew() ) s = "1";
else if ( msg->isUnread() ) s = "2";
else if (!msg->isForwarded() && msg->isReplied() ) s = "3";
@@ -482,27 +482,27 @@ QString HeaderItem::generate_key( KMHeaders *headers,
return ret + s + sortArrival;
}
else if (column == paintInfo->attachmentCol) {
- QString s(msg->attachmentState() == KMMsgHasAttachment ? "1" : "0");
+ TQString s(msg->attachmentState() == KMMsgHasAttachment ? "1" : "0");
return ret + s + sortArrival;
}
else if (column == paintInfo->importantCol) {
- QString s(msg->isImportant() ? "1" : "0");
+ TQString s(msg->isImportant() ? "1" : "0");
return ret + s + sortArrival;
}
else if ( column == paintInfo->todoCol ) {
- QString s( msg->isTodo() ? "1": "0" );
+ TQString s( msg->isTodo() ? "1": "0" );
return ret + s + sortArrival;
}
else if (column == paintInfo->spamHamCol) {
- QString s((msg->isSpam() || msg->isHam()) ? "1" : "0");
+ TQString s((msg->isSpam() || msg->isHam()) ? "1" : "0");
return ret + s + sortArrival;
}
else if (column == paintInfo->watchedIgnoredCol) {
- QString s((msg->isWatched() || msg->isIgnored()) ? "1" : "0");
+ TQString s((msg->isWatched() || msg->isIgnored()) ? "1" : "0");
return ret + s + sortArrival;
}
else if (column == paintInfo->signedCol) {
- QString s;
+ TQString s;
switch ( msg->signatureState() )
{
case KMMsgFullySigned : s = "1"; break;
@@ -514,7 +514,7 @@ QString HeaderItem::generate_key( KMHeaders *headers,
return ret + s + sortArrival;
}
else if (column == paintInfo->cryptoCol) {
- QString s;
+ TQString s;
switch ( msg->encryptionState() )
{
case KMMsgFullyEncrypted : s = "1"; break;
@@ -528,7 +528,7 @@ QString HeaderItem::generate_key( KMHeaders *headers,
return ret + "missing key"; //you forgot something!!
}
-QString HeaderItem::key( int column, bool /*ascending*/ ) const
+TQString HeaderItem::key( int column, bool /*ascending*/ ) const
{
KMHeaders *headers = static_cast<KMHeaders*>(listView());
int sortOrder = column;
@@ -547,11 +547,11 @@ QString HeaderItem::key( int column, bool /*ascending*/ ) const
return mKey;
}
-void HeaderItem::setTempKey( QString key ) {
+void HeaderItem::setTempKey( TQString key ) {
mKey = key;
}
-int HeaderItem::compare( QListViewItem *i, int col, bool ascending ) const
+int HeaderItem::compare( TQListViewItem *i, int col, bool ascending ) const
{
int res = 0;
KMHeaders *headers = static_cast<KMHeaders*>(listView());
@@ -577,9 +577,9 @@ int HeaderItem::compare( QListViewItem *i, int col, bool ascending ) const
return res;
}
-QListViewItem* HeaderItem::firstChildNonConst() /* Non const! */
+TQListViewItem* HeaderItem::firstChildNonConst() /* Non const! */
{
- enforceSortOrder(); // Try not to rely on QListView implementation details
+ enforceSortOrder(); // Try not to rely on TQListView implementation details
return firstChild();
}
diff --git a/kmail/headeritem.h b/kmail/headeritem.h
index 66b75cc23..961c99b70 100644
--- a/kmail/headeritem.h
+++ b/kmail/headeritem.h
@@ -57,7 +57,7 @@ public:
SortCacheItem() : mItem(0), mParent(0), mId(-1), mSortOffset(-1),
mUnsortedCount(0), mUnsortedSize(0), mUnsortedChildren(0),
mImperfectlyThreaded (true), mSubjThreadingList(0) { }
- SortCacheItem(int i, QString k, int o=-1)
+ SortCacheItem(int i, TQString k, int o=-1)
: mItem(0), mParent(0), mId(i), mSortOffset(o), mKey(k),
mUnsortedCount(0), mUnsortedSize(0), mUnsortedChildren(0),
mImperfectlyThreaded (true), mSubjThreadingList(0) { }
@@ -82,7 +82,7 @@ public:
{ return mSortedChildren.count() || mUnsortedCount; }
/** The sorted children are an array of sortcache items we know are below the
* current one and are already properly sorted (as read from the cache ) */
- const QPtrList<SortCacheItem> *sortedChildren() const
+ const TQPtrList<SortCacheItem> *sortedChildren() const
{ return &mSortedChildren; }
/** The unsorted children are an array of sortcache items we know are below the
* current one, but are yet to be threaded and sorted properly. */
@@ -118,9 +118,9 @@ public:
void setItem(HeaderItem *i) { Q_ASSERT(!mItem); mItem = i; }
/** sort key as used by the listview */
- const QString &key() const { return mKey; }
+ const TQString &key() const { return mKey; }
/** Set the sort key used by the list view. */
- void setKey(const QString &key) { mKey = key; }
+ void setKey(const TQString &key) { mKey = key; }
int id() const { return mId; }
void setId(int id) { mId = id; }
@@ -135,23 +135,23 @@ public:
/** Set the list of mails with a certain subject that this item is on.
* Used to remove the item from that list on deletion. */
- void setSubjectThreadingList( QPtrList<SortCacheItem> *list ) { mSubjThreadingList = list; }
+ void setSubjectThreadingList( TQPtrList<SortCacheItem> *list ) { mSubjThreadingList = list; }
/** The list of mails with a certain subject that this item is on. */
- QPtrList<SortCacheItem>* subjectThreadingList() const { return mSubjThreadingList; }
+ TQPtrList<SortCacheItem>* subjectThreadingList() const { return mSubjThreadingList; }
private:
HeaderItem *mItem;
SortCacheItem *mParent;
int mId, mSortOffset;
- QString mKey;
+ TQString mKey;
- QPtrList<SortCacheItem> mSortedChildren;
+ TQPtrList<SortCacheItem> mSortedChildren;
int mUnsortedCount, mUnsortedSize;
SortCacheItem **mUnsortedChildren;
bool mImperfectlyThreaded;
// pointer to the list it might be on so it can be remove from it
// when the item goes away.
- QPtrList<SortCacheItem>* mSubjThreadingList;
+ TQPtrList<SortCacheItem>* mSubjThreadingList;
};
@@ -163,8 +163,8 @@ private:
class HeaderItem : public KListViewItem
{
public:
- HeaderItem( QListView* parent, int msgId, const QString& key = QString::null );
- HeaderItem( QListViewItem* parent, int msgId, const QString& key = QString::null );
+ HeaderItem( TQListView* parent, int msgId, const TQString& key = TQString::null );
+ HeaderItem( TQListViewItem* parent, int msgId, const TQString& key = TQString::null );
~HeaderItem ();
/** Set the message id of this item, which is the offset/index in the folder
@@ -173,7 +173,7 @@ public:
// Profiling note: About 30% of the time taken to initialize the
// listview is spent in this function. About 60% is spent in operator
- // new and QListViewItem::QListViewItem.
+ // new and TQListViewItem::TQListViewItem.
void irefresh();
/** Return the msgId of the message associated with this item. */
@@ -186,32 +186,32 @@ public:
void setOpenRecursive( bool open );
/** Returns the text of the list view item. */
- QString text( int col) const;
+ TQString text( int col) const;
void setup();
- typedef QValueList<QPixmap> PixmapList;
+ typedef TQValueList<TQPixmap> PixmapList;
- QPixmap pixmapMerge( PixmapList pixmaps ) const;
+ TQPixmap pixmapMerge( PixmapList pixmaps ) const;
- const QPixmap *cryptoIcon(KMMsgBase *msgBase) const;
- const QPixmap *signatureIcon(KMMsgBase *msgBase) const;
- const QPixmap *statusIcon(KMMsgBase *msgBase) const;
+ const TQPixmap *cryptoIcon(KMMsgBase *msgBase) const;
+ const TQPixmap *signatureIcon(KMMsgBase *msgBase) const;
+ const TQPixmap *statusIcon(KMMsgBase *msgBase) const;
- const QPixmap *pixmap(int col) const;
+ const TQPixmap *pixmap(int col) const;
- void paintCell( QPainter * p, const QColorGroup & cg,
+ void paintCell( TQPainter * p, const TQColorGroup & cg,
int column, int width, int align );
- static QString generate_key( KMHeaders *headers, KMMsgBase *msg, const KPaintInfo *paintInfo, int sortOrder );
+ static TQString generate_key( KMHeaders *headers, KMMsgBase *msg, const KPaintInfo *paintInfo, int sortOrder );
- virtual QString key( int column, bool /*ascending*/ ) const;
+ virtual TQString key( int column, bool /*ascending*/ ) const;
- void setTempKey( QString key );
+ void setTempKey( TQString key );
- int compare( QListViewItem *i, int col, bool ascending ) const;
+ int compare( TQListViewItem *i, int col, bool ascending ) const;
- QListViewItem* firstChildNonConst(); /* Non const! */
+ TQListViewItem* firstChildNonConst(); /* Non const! */
/** Returns whether the item is about to be removed from the list view as a
* result of some user action. Such items are not selectable and painted with
@@ -230,7 +230,7 @@ public:
private:
int mMsgId;
Q_UINT32 mSerNum;
- QString mKey;
+ TQString mKey;
bool mAboutToBeDeleted;
SortCacheItem *mSortCacheItem;
}; // End of class HeaderItem
diff --git a/kmail/headerlistquicksearch.cpp b/kmail/headerlistquicksearch.cpp
index d735386d1..9f20b7e80 100644
--- a/kmail/headerlistquicksearch.cpp
+++ b/kmail/headerlistquicksearch.cpp
@@ -29,11 +29,11 @@
*/
#include "headerlistquicksearch.h"
-#include <qapplication.h>
-#include <qlabel.h>
-#include <qcombobox.h>
-#include <qvaluevector.h>
-#include <qtimer.h>
+#include <tqapplication.h>
+#include <tqlabel.h>
+#include <tqcombobox.h>
+#include <tqvaluevector.h>
+#include <tqtimer.h>
#include <kaction.h>
#include <kiconloader.h>
@@ -47,18 +47,18 @@
namespace KMail {
-HeaderListQuickSearch::HeaderListQuickSearch( QWidget *parent,
+HeaderListQuickSearch::HeaderListQuickSearch( TQWidget *parent,
KListView *listView,
KActionCollection *actionCollection,
const char *name )
: KListViewSearchLine(parent, listView, name), mStatusCombo(0), mStatus(0), statusList()
{
KAction *resetQuickSearch = new KAction( i18n( "Reset Quick Search" ),
- QApplication::reverseLayout()
+ TQApplication::reverseLayout()
? "clear_left"
: "locationbar_erase",
0, this,
- SLOT( reset() ),
+ TQT_SLOT( reset() ),
actionCollection,
"reset_quicksearch" );
resetQuickSearch->plug( parent );
@@ -66,9 +66,9 @@ HeaderListQuickSearch::HeaderListQuickSearch( QWidget *parent,
"Resets the quick search so that "
"all messages are shown again." ) );
- QLabel *label = new QLabel( i18n("Stat&us:"), parent, "kde toolbar widget" );
+ TQLabel *label = new TQLabel( i18n("Stat&us:"), parent, "kde toolbar widget" );
- mStatusCombo = new QComboBox( parent, "quick search status combo box" );
+ mStatusCombo = new TQComboBox( parent, "quick search status combo box" );
mStatusCombo->insertItem( SmallIcon( "run" ), i18n("Any Status") );
insertStatus( StatusUnread );
@@ -82,24 +82,24 @@ HeaderListQuickSearch::HeaderListQuickSearch( QWidget *parent,
insertStatus( StatusIgnored );
mStatusCombo->setCurrentItem( 0 );
mStatusCombo->installEventFilter( this );
- connect( mStatusCombo, SIGNAL ( activated( int ) ),
- this, SLOT( slotStatusChanged( int ) ) );
+ connect( mStatusCombo, TQT_SIGNAL ( activated( int ) ),
+ this, TQT_SLOT( slotStatusChanged( int ) ) );
label->setBuddy( mStatusCombo );
KToolBarButton * btn = new KToolBarButton( "mail_find", 0, parent,
0, i18n( "Open Full Search" ) );
- connect( btn, SIGNAL( clicked() ), SIGNAL( requestFullSearch() ) );
+ connect( btn, TQT_SIGNAL( clicked() ), TQT_SIGNAL( requestFullSearch() ) );
/* Disable the signal connected by KListViewSearchLine since it will call
* itemAdded during KMHeaders::readSortOrder() which will in turn result
* in getMsgBaseForItem( item ) wanting to access items which are no longer
* there. Rather rely on KMHeaders::msgAdded and its signal. */
- disconnect(listView, SIGNAL(itemAdded(QListViewItem *)),
- this, SLOT(itemAdded(QListViewItem *)));
+ disconnect(listView, TQT_SIGNAL(itemAdded(TQListViewItem *)),
+ this, TQT_SLOT(itemAdded(TQListViewItem *)));
KMHeaders *headers = static_cast<KMHeaders*>( listView );
- connect( headers, SIGNAL( msgAddedToListView( QListViewItem* ) ),
- this, SLOT( itemAdded( QListViewItem* ) ) );
+ connect( headers, TQT_SIGNAL( msgAddedToListView( TQListViewItem* ) ),
+ this, TQT_SLOT( itemAdded( TQListViewItem* ) ) );
}
@@ -108,13 +108,13 @@ HeaderListQuickSearch::~HeaderListQuickSearch()
}
-bool HeaderListQuickSearch::eventFilter( QObject *watched, QEvent *event )
+bool HeaderListQuickSearch::eventFilter( TQObject *watched, TQEvent *event )
{
if ( watched == mStatusCombo ) {
KMMainWidget *mainWidget = 0;
// Travel up the parents list until we find the main widget
- for ( QWidget *curWidget = parentWidget(); curWidget; curWidget = curWidget->parentWidget() ) {
+ for ( TQWidget *curWidget = parentWidget(); curWidget; curWidget = curWidget->parentWidget() ) {
mainWidget = ::qt_cast<KMMainWidget *>( curWidget );
if ( mainWidget )
break;
@@ -122,10 +122,10 @@ bool HeaderListQuickSearch::eventFilter( QObject *watched, QEvent *event )
if ( mainWidget ) {
switch ( event->type() ) {
- case QEvent::FocusIn:
+ case TQEvent::FocusIn:
mainWidget->setAccelsEnabled( false );
break;
- case QEvent::FocusOut:
+ case TQEvent::FocusOut:
mainWidget->setAccelsEnabled( true );
break;
default:
@@ -140,7 +140,7 @@ bool HeaderListQuickSearch::eventFilter( QObject *watched, QEvent *event )
}
-bool HeaderListQuickSearch::itemMatches(const QListViewItem *item, const QString &s) const
+bool HeaderListQuickSearch::itemMatches(const TQListViewItem *item, const TQString &s) const
{
mCurrentSearchTerm = s; // bit of a hack, but works
if ( mStatus != 0 ) {
@@ -177,7 +177,7 @@ void HeaderListQuickSearch::insertStatus(KMail::StatusValueTypes which)
}
-QString HeaderListQuickSearch::currentSearchTerm() const
+TQString HeaderListQuickSearch::currentSearchTerm() const
{
return mCurrentSearchTerm;
}
diff --git a/kmail/headerlistquicksearch.h b/kmail/headerlistquicksearch.h
index cc2e728a8..a0f7bb14b 100644
--- a/kmail/headerlistquicksearch.h
+++ b/kmail/headerlistquicksearch.h
@@ -28,13 +28,13 @@
your version.
*/
-#ifndef KMAILHEADERLISTQUICKSEARCH_H
-#define KMAILHEADERLISTQUICKSEARCH_H
+#ifndef KMAILHEADERLISQUICKSEARCH_H
+#define KMAILHEADERLISQUICKSEARCH_H
#include "kmmsgbase.h" // for KMMsgStatus
#include "kmsearchpattern.h"
#include <klistviewsearchline.h>
-#include <qvaluevector.h>
+#include <tqvaluevector.h>
class QComboBox;
class QLabel;
class KListView;
@@ -46,7 +46,7 @@ class HeaderListQuickSearch : public KListViewSearchLine
{
Q_OBJECT
public:
- HeaderListQuickSearch( QWidget *parent,
+ HeaderListQuickSearch( TQWidget *parent,
KListView *listView,
KActionCollection *actionCollection,
const char *name = 0 );
@@ -56,12 +56,12 @@ public:
* Used to disable the main window's accelerators when the search widget's
* combo has focus
*/
- bool eventFilter( QObject *watched, QEvent *event );
+ bool eventFilter( TQObject *watched, TQEvent *event );
/**
* Returns the currently entered search text.
*/
- QString currentSearchTerm() const;
+ TQString currentSearchTerm() const;
/**
* Returns the currently selected status filter.
@@ -79,7 +79,7 @@ protected:
* checks whether @param item contains the search string and has the status
* currently in mStatus
*/
- virtual bool itemMatches(const QListViewItem *item, const QString &s) const;
+ virtual bool itemMatches(const TQListViewItem *item, const TQString &s) const;
private slots:
/**
@@ -91,10 +91,10 @@ private slots:
private:
/** Helper method for the filling of the status combo. */
void insertStatus(KMail::StatusValueTypes which);
- QComboBox *mStatusCombo;
+ TQComboBox *mStatusCombo;
KMMsgStatus mStatus;
- QValueVector<QString> statusList;
- mutable QString mCurrentSearchTerm;
+ TQValueVector<TQString> statusList;
+ mutable TQString mCurrentSearchTerm;
};
}
diff --git a/kmail/headerstrategy.cpp b/kmail/headerstrategy.cpp
index 1c73532c7..bfe9845be 100644
--- a/kmail/headerstrategy.cpp
+++ b/kmail/headerstrategy.cpp
@@ -69,8 +69,8 @@ namespace KMail {
// Convenience function
//
- static QStringList stringList( const char * headers[], int numHeaders ) {
- QStringList sl;
+ static TQStringList stringList( const char * headers[], int numHeaders ) {
+ TQStringList sl;
for ( int i = 0 ; i < numHeaders ; ++i )
sl.push_back( headers[i] );
return sl;
@@ -94,7 +94,7 @@ namespace KMail {
DefaultPolicy defaultPolicy() const { return Display; }
- bool showHeader( const QString & ) const {
+ bool showHeader( const TQString & ) const {
return true; // more efficient than default impl
}
};
@@ -117,11 +117,11 @@ namespace KMail {
const HeaderStrategy * next() const { return standard(); }
const HeaderStrategy * prev() const { return all(); }
- QStringList headersToDisplay() const { return mHeadersToDisplay; }
+ TQStringList headersToDisplay() const { return mHeadersToDisplay; }
DefaultPolicy defaultPolicy() const { return Hide; }
private:
- const QStringList mHeadersToDisplay;
+ const TQStringList mHeadersToDisplay;
};
//
@@ -142,11 +142,11 @@ namespace KMail {
const HeaderStrategy * next() const { return brief(); }
const HeaderStrategy * prev() const { return rich(); }
- QStringList headersToDisplay() const { return mHeadersToDisplay; }
+ TQStringList headersToDisplay() const { return mHeadersToDisplay; }
DefaultPolicy defaultPolicy() const { return Hide; }
private:
- const QStringList mHeadersToDisplay;
+ const TQStringList mHeadersToDisplay;
};
//
@@ -167,11 +167,11 @@ namespace KMail {
const HeaderStrategy * next() const { return custom(); }
const HeaderStrategy * prev() const { return standard(); }
- QStringList headersToDisplay() const { return mHeadersToDisplay; }
+ TQStringList headersToDisplay() const { return mHeadersToDisplay; }
DefaultPolicy defaultPolicy() const { return Hide; }
private:
- const QStringList mHeadersToDisplay;
+ const TQStringList mHeadersToDisplay;
};
@@ -191,13 +191,13 @@ namespace KMail {
const HeaderStrategy * next() const { return all(); }
const HeaderStrategy * prev() const { return brief(); }
- QStringList headersToDisplay() const { return mHeadersToDisplay; }
- QStringList headersToHide() const { return mHeadersToHide; }
+ TQStringList headersToDisplay() const { return mHeadersToDisplay; }
+ TQStringList headersToHide() const { return mHeadersToHide; }
DefaultPolicy defaultPolicy() const { return mDefaultPolicy; }
private:
- QStringList mHeadersToDisplay;
- QStringList mHeadersToHide;
+ TQStringList mHeadersToDisplay;
+ TQStringList mHeadersToHide;
DefaultPolicy mDefaultPolicy;
};
@@ -208,14 +208,14 @@ namespace KMail {
KConfigGroup customHeader( KMKernel::config(), "Custom Headers" );
if ( customHeader.hasKey( "headers to display" ) ) {
mHeadersToDisplay = customHeader.readListEntry( "headers to display" );
- for ( QStringList::iterator it = mHeadersToDisplay.begin() ; it != mHeadersToDisplay.end() ; ++ it )
+ for ( TQStringList::iterator it = mHeadersToDisplay.begin() ; it != mHeadersToDisplay.end() ; ++ it )
*it = (*it).lower();
} else
mHeadersToDisplay = stringList( standardHeaders, numStandardHeaders );
if ( customHeader.hasKey( "headers to hide" ) ) {
mHeadersToHide = customHeader.readListEntry( "headers to hide" );
- for ( QStringList::iterator it = mHeadersToHide.begin() ; it != mHeadersToHide.end() ; ++ it )
+ for ( TQStringList::iterator it = mHeadersToHide.begin() ; it != mHeadersToHide.end() ; ++ it )
*it = (*it).lower();
}
@@ -234,15 +234,15 @@ namespace KMail {
}
- QStringList HeaderStrategy::headersToDisplay() const {
- return QStringList();
+ TQStringList HeaderStrategy::headersToDisplay() const {
+ return TQStringList();
}
- QStringList HeaderStrategy::headersToHide() const {
- return QStringList();
+ TQStringList HeaderStrategy::headersToHide() const {
+ return TQStringList();
}
- bool HeaderStrategy::showHeader( const QString & header ) const {
+ bool HeaderStrategy::showHeader( const TQString & header ) const {
if ( headersToDisplay().contains( header.lower() ) ) return true;
if ( headersToHide().contains( header.lower() ) ) return false;
return defaultPolicy() == Display;
@@ -261,8 +261,8 @@ namespace KMail {
return 0; // make compiler happy
}
- const HeaderStrategy * HeaderStrategy::create( const QString & type ) {
- QString lowerType = type.lower();
+ const HeaderStrategy * HeaderStrategy::create( const TQString & type ) {
+ TQString lowerType = type.lower();
if ( lowerType == "all" ) return all();
if ( lowerType == "rich" ) return HeaderStrategy::rich();
//if ( lowerType == "standard" ) return standard(); // not needed, see below
diff --git a/kmail/headerstrategy.h b/kmail/headerstrategy.h
index b5bdce35e..421117db6 100644
--- a/kmail/headerstrategy.h
+++ b/kmail/headerstrategy.h
@@ -49,7 +49,7 @@ namespace KMail {
enum Type { All, Rich, Standard, Brief, Custom };
static const HeaderStrategy * create( Type type );
- static const HeaderStrategy * create( const QString & type );
+ static const HeaderStrategy * create( const TQString & type );
static const HeaderStrategy * all();
static const HeaderStrategy * rich();
@@ -69,10 +69,10 @@ namespace KMail {
//
enum DefaultPolicy { Display, Hide };
- virtual QStringList headersToDisplay() const;
- virtual QStringList headersToHide() const;
+ virtual TQStringList headersToDisplay() const;
+ virtual TQStringList headersToHide() const;
virtual DefaultPolicy defaultPolicy() const = 0;
- virtual bool showHeader( const QString & header ) const;
+ virtual bool showHeader( const TQString & header ) const;
};
} // namespace KMail
diff --git a/kmail/headerstyle.cpp b/kmail/headerstyle.cpp
index 26e615d90..9e6e63156 100644
--- a/kmail/headerstyle.cpp
+++ b/kmail/headerstyle.cpp
@@ -57,12 +57,12 @@ using namespace KPIM;
#include <kabc/stdaddressbook.h>
#include <kabc/addresseelist.h>
#include <kmdcodec.h>
-#include <qdatetime.h>
-#include <qbuffer.h>
-#include <qbitmap.h>
-#include <qimage.h>
-#include <qapplication.h>
-#include <qregexp.h>
+#include <tqdatetime.h>
+#include <tqbuffer.h>
+#include <tqbitmap.h>
+#include <tqimage.h>
+#include <tqapplication.h>
+#include <tqregexp.h>
#include <kstandarddirs.h>
@@ -71,7 +71,7 @@ namespace KMail {
//
// Convenience functions:
//
- static inline QString directionOf( const QString & str ) {
+ static inline TQString directionOf( const TQString & str ) {
return str.isRightToLeft() ? "rtl" : "ltr" ;
}
@@ -79,9 +79,9 @@ namespace KMail {
// Converts to html. Changes URLs into href's, escapes HTML special
// chars and inserts the result into an <div> or <span> tag with
// "dir" set to "rtl" or "ltr" depending on the direction of @p str.
- static QString convertToHtmlBlock( const QString & str, bool useSpan=false ) {
- QString dir = directionOf( str );
- QString format = "<%1 dir=\"%3\">%4</%2>";
+ static TQString convertToHtmlBlock( const TQString & str, bool useSpan=false ) {
+ TQString dir = directionOf( str );
+ TQString format = "<%1 dir=\"%3\">%4</%2>";
return format.arg( useSpan ? "span" : "div" )
.arg( useSpan ? "span" : "div" )
.arg( dir )
@@ -90,7 +90,7 @@ namespace KMail {
#endif
// ### tmp wrapper to make kmreaderwin code working:
- static QString strToHtml( const QString & str,
+ static TQString strToHtml( const TQString & str,
int flags = LinkLocator::PreserveSpaces ) {
return LinkLocator::convertToHtml( str, flags );
}
@@ -111,21 +111,21 @@ namespace KMail {
const HeaderStyle * next() const { return plain(); }
const HeaderStyle * prev() const { return fancy(); }
- QString format( const KMMessage * message, const HeaderStrategy * strategy,
- const QString & vCardName, bool printing, bool topLevel ) const;
+ TQString format( const KMMessage * message, const HeaderStrategy * strategy,
+ const TQString & vCardName, bool printing, bool topLevel ) const;
};
- QString BriefHeaderStyle::format( const KMMessage * message,
+ TQString BriefHeaderStyle::format( const KMMessage * message,
const HeaderStrategy * strategy,
- const QString & vCardName, bool printing, bool topLevel ) const {
- if ( !message ) return QString::null;
+ const TQString & vCardName, bool printing, bool topLevel ) const {
+ if ( !message ) return TQString::null;
if ( !strategy )
strategy = HeaderStrategy::brief();
// The direction of the header is determined according to the direction
// of the application layout.
- QString dir = QApplication::reverseLayout() ? "rtl" : "ltr" ;
+ TQString dir = TQApplication::reverseLayout() ? "rtl" : "ltr" ;
// However, the direction of the message subject within the header is
// determined according to the contents of the subject itself. Since
@@ -133,16 +133,16 @@ namespace KMail {
// considered left-to-right, they are ignored when determining its
// direction.
- QString subjectDir;
+ TQString subjectDir;
if (!message->subject().isEmpty())
subjectDir = directionOf( message->cleanSubject() );
else
subjectDir = directionOf( i18n("No Subject") );
// Prepare the date string (when printing always use the localized date)
- QString dateString;
+ TQString dateString;
if( printing ) {
- QDateTime dateTime;
+ TQDateTime dateTime;
KLocale * locale = KGlobal::locale();
dateTime.setTime_t( message->date() );
dateString = locale->formatDateTime( dateTime );
@@ -150,7 +150,7 @@ namespace KMail {
dateString = message->dateStr();
}
- QString headerStr = "<div class=\"header\" dir=\"" + dir + "\">\n";
+ TQString headerStr = "<div class=\"header\" dir=\"" + dir + "\">\n";
if ( strategy->showHeader( "subject" ) )
headerStr += "<div dir=\"" + subjectDir + "\">\n"
@@ -158,13 +158,13 @@ namespace KMail {
strToHtml( message->subject() ) +
"</b></div>\n";
- QStringList headerParts;
+ TQStringList headerParts;
if ( strategy->showHeader( "from" ) ) {
- QString fromStr = message->from();
+ TQString fromStr = message->from();
if ( fromStr.isEmpty() ) // no valid email in from, maybe just a name
fromStr = message->fromStrip(); // let's use that
- QString fromPart = KMMessage::emailAddrAsAnchor( fromStr, true );
+ TQString fromPart = KMMessage::emailAddrAsAnchor( fromStr, true );
if ( !vCardName.isEmpty() )
fromPart += "&nbsp;&nbsp;<a href=\"" + vCardName + "\">" + i18n("[vCard]") + "</a>";
headerParts << fromPart;
@@ -180,7 +180,7 @@ namespace KMail {
headerParts << strToHtml(message->dateShortStr());
// remove all empty (modulo whitespace) entries and joins them via ", \n"
- headerStr += " (" + headerParts.grep( QRegExp( "\\S" ) ).join( ",\n" ) + ')';
+ headerStr += " (" + headerParts.grep( TQRegExp( "\\S" ) ).join( ",\n" ) + ')';
headerStr += "</div>\n";
@@ -206,24 +206,24 @@ namespace KMail {
const HeaderStyle * next() const { return fancy(); }
const HeaderStyle * prev() const { return brief(); }
- QString format( const KMMessage * message, const HeaderStrategy * strategy,
- const QString & vCardName, bool printing, bool topLevel ) const;
+ TQString format( const KMMessage * message, const HeaderStrategy * strategy,
+ const TQString & vCardName, bool printing, bool topLevel ) const;
private:
- QString formatAllMessageHeaders( const KMMessage * message ) const;
+ TQString formatAllMessageHeaders( const KMMessage * message ) const;
};
- QString PlainHeaderStyle::format( const KMMessage * message,
+ TQString PlainHeaderStyle::format( const KMMessage * message,
const HeaderStrategy * strategy,
- const QString & vCardName, bool printing, bool topLevel ) const {
- if ( !message ) return QString::null;
+ const TQString & vCardName, bool printing, bool topLevel ) const {
+ if ( !message ) return TQString::null;
if ( !strategy )
strategy = HeaderStrategy::rich();
// The direction of the header is determined according to the direction
// of the application layout.
- QString dir = ( QApplication::reverseLayout() ? "rtl" : "ltr" );
+ TQString dir = ( TQApplication::reverseLayout() ? "rtl" : "ltr" );
// However, the direction of the message subject within the header is
// determined according to the contents of the subject itself. Since
@@ -231,16 +231,16 @@ namespace KMail {
// considered left-to-right, they are ignored when determining its
// direction.
- QString subjectDir;
+ TQString subjectDir;
if (!message->subject().isEmpty())
subjectDir = directionOf( message->cleanSubject() );
else
subjectDir = directionOf( i18n("No Subject") );
// Prepare the date string (when printing always use the localized date)
- QString dateString;
+ TQString dateString;
if( printing ) {
- QDateTime dateTime;
+ TQDateTime dateTime;
KLocale* locale = KGlobal::locale();
dateTime.setTime_t( message->date() );
dateString = locale->formatDateTime( dateTime );
@@ -249,22 +249,22 @@ namespace KMail {
dateString = message->dateStr();
}
- QString headerStr;
+ TQString headerStr;
if ( strategy->headersToDisplay().isEmpty()
&& strategy->defaultPolicy() == HeaderStrategy::Display ) {
// crude way to emulate "all" headers - Note: no strings have
// i18n(), so direction should always be ltr.
- headerStr= QString("<div class=\"header\" dir=\"ltr\">");
+ headerStr= TQString("<div class=\"header\" dir=\"ltr\">");
headerStr += formatAllMessageHeaders( message );
return headerStr + "</div>";
}
- headerStr = QString("<div class=\"header\" dir=\"%1\">").arg(dir);
+ headerStr = TQString("<div class=\"header\" dir=\"%1\">").arg(dir);
//case HdrLong:
if ( strategy->showHeader( "subject" ) )
- headerStr += QString("<div dir=\"%1\"><b style=\"font-size:130%\">" +
+ headerStr += TQString("<div dir=\"%1\"><b style=\"font-size:130%\">" +
strToHtml(message->subject()) + "</b></div>\n")
.arg(subjectDir);
@@ -273,8 +273,8 @@ namespace KMail {
#if 0
// Get Instant Messaging presence
- QString presence;
- QString kabcUid;
+ TQString presence;
+ TQString kabcUid;
if ( strategy->showHeader( "status" ) )
{
KABC::AddressBook *addressBook = KABC::StdAddressBook::self( true );
@@ -286,7 +286,7 @@ namespace KMail {
#endif
if ( strategy->showHeader( "from" ) ) {
- QString fromStr = message->from();
+ TQString fromStr = message->from();
if ( fromStr.isEmpty() ) // no valid email in from, maybe just a name
fromStr = message->fromStrip(); // let's use that
headerStr.append(i18n("From: ") +
@@ -327,9 +327,9 @@ namespace KMail {
return headerStr;
}
- QString PlainHeaderStyle::formatAllMessageHeaders( const KMMessage * message ) const {
+ TQString PlainHeaderStyle::formatAllMessageHeaders( const KMMessage * message ) const {
const DwHeaders & headers = message->headers();
- QString result;
+ TQString result;
for ( const DwField * field = headers.FirstField() ; field ; field = field->Next() ) {
result += ( field->FieldNameStr() + ": " ).c_str();
@@ -356,20 +356,20 @@ namespace KMail {
const HeaderStyle * next() const { return enterprise(); }
const HeaderStyle * prev() const { return plain(); }
- QString format( const KMMessage * message, const HeaderStrategy * strategy,
- const QString & vCardName, bool printing, bool topLevel ) const;
- static QString imgToDataUrl( const QImage & image,
+ TQString format( const KMMessage * message, const HeaderStrategy * strategy,
+ const TQString & vCardName, bool printing, bool topLevel ) const;
+ static TQString imgToDataUrl( const TQImage & image,
const char *fmt = "PNG" );
private:
- static QString drawSpamMeter( double percent, const QString & filterHeader );
+ static TQString drawSpamMeter( double percent, const TQString & filterHeader );
};
- QString FancyHeaderStyle::drawSpamMeter( double percent,
- const QString & filterHeader )
+ TQString FancyHeaderStyle::drawSpamMeter( double percent,
+ const TQString & filterHeader )
{
- QImage meterBar( 20, 1, 8, 24 );
+ TQImage meterBar( 20, 1, 8, 24 );
const unsigned short gradient[20][3] = {
{ 0, 255, 0 },
{ 27, 254, 0 },
@@ -405,18 +405,18 @@ namespace KMail {
meterBar.setPixel( i, 0, i+1 );
}
}
- QString titleText = i18n("%1% probability of being spam.\n\nFull report:\n%2")
- .arg( QString::number( percent ), filterHeader );
- return QString("<img src=\"%1\" width=\"%2\" height=\"%3\" style=\"border: 1px solid black;\" title=\"%4\"> &nbsp;")
- .arg( imgToDataUrl( meterBar, "PPM" ), QString::number( 20 ),
- QString::number( 5 ), titleText );
+ TQString titleText = i18n("%1% probability of being spam.\n\nFull report:\n%2")
+ .arg( TQString::number( percent ), filterHeader );
+ return TQString("<img src=\"%1\" width=\"%2\" height=\"%3\" style=\"border: 1px solid black;\" title=\"%4\"> &nbsp;")
+ .arg( imgToDataUrl( meterBar, "PPM" ), TQString::number( 20 ),
+ TQString::number( 5 ), titleText );
}
- QString FancyHeaderStyle::format( const KMMessage * message,
+ TQString FancyHeaderStyle::format( const KMMessage * message,
const HeaderStrategy * strategy,
- const QString & vCardName, bool printing, bool topLevel ) const {
- if ( !message ) return QString::null;
+ const TQString & vCardName, bool printing, bool topLevel ) const {
+ if ( !message ) return TQString::null;
if ( !strategy )
strategy = HeaderStrategy::rich();
@@ -426,8 +426,8 @@ namespace KMail {
// The direction of the header is determined according to the direction
// of the application layout.
- QString dir = ( QApplication::reverseLayout() ? "rtl" : "ltr" );
- QString headerStr = QString("<div class=\"fancy header\" dir=\"%1\">\n").arg(dir);
+ TQString dir = ( TQApplication::reverseLayout() ? "rtl" : "ltr" );
+ TQString headerStr = TQString("<div class=\"fancy header\" dir=\"%1\">\n").arg(dir);
// However, the direction of the message subject within the header is
// determined according to the contents of the subject itself. Since
@@ -435,16 +435,16 @@ namespace KMail {
// considered left-to-right, they are ignored when determining its
// direction.
- QString subjectDir;
+ TQString subjectDir;
if ( !message->subject().isEmpty() )
subjectDir = directionOf( message->cleanSubject() );
else
subjectDir = directionOf( i18n("No Subject") );
// Prepare the date string (when printing always use the localized date)
- QString dateString;
+ TQString dateString;
if( printing ) {
- QDateTime dateTime;
+ TQDateTime dateTime;
KLocale* locale = KGlobal::locale();
dateTime.setTime_t( message->date() );
dateString = locale->formatDateTime( dateTime );
@@ -458,7 +458,7 @@ namespace KMail {
// from a few spam filters and try to create visually meaningful graphics
// out of the spam scores.
- QString spamHTML;
+ TQString spamHTML;
if ( configReader.readBoolEntry( "showSpamStatus", true ) ) {
SpamScores scores = SpamHeaderAnalyzer::getSpamScores( message );
@@ -467,17 +467,17 @@ namespace KMail {
drawSpamMeter( (*it).score(), (*it).spamHeader() );
}
- QString userHTML;
- QString presence;
+ TQString userHTML;
+ TQString presence;
// IM presence and kabc photo
::KIMProxy *imProxy = KMKernel::self()->imProxy();
- QString kabcUid;
+ TQString kabcUid;
KABC::AddressBook *addressBook = KABC::StdAddressBook::self( true );
KABC::AddresseeList addresses = addressBook->findByEmail( KPIM::getFirstEmailAddress( message->from() ) );
- QString photoURL;
+ TQString photoURL;
int photoWidth = 60;
int photoHeight = 60;
if( addresses.count() == 1 )
@@ -490,7 +490,7 @@ namespace KMail {
presence = imProxy->presenceString( kabcUid );
if ( !presence.isEmpty() )
{
- QString presenceIcon = QString::fromLatin1( " <img src=\"%1\"/>" )
+ TQString presenceIcon = TQString::fromLatin1( " <img src=\"%1\"/>" )
.arg( imgToDataUrl( imProxy->presenceIcon( kabcUid ).convertToImage() ) );
presence += presenceIcon;
}
@@ -500,7 +500,7 @@ namespace KMail {
{
// get photo data and convert to data: url
//kdDebug( 5006 ) << "INTERNAL photo found" << endl;
- QImage photo = addresses[0].photo().data();
+ TQImage photo = addresses[0].photo().data();
if ( !photo.isNull() )
{
photoWidth = photo.width();
@@ -531,20 +531,20 @@ namespace KMail {
if( photoURL.isEmpty() ) {
// no photo, look for a Face header
- QString faceheader = message->headerField( "Face" );
+ TQString faceheader = message->headerField( "Face" );
if ( !faceheader.isEmpty() ) {
- QImage faceimage;
+ TQImage faceimage;
kdDebug( 5006 ) << "Found Face: header" << endl;
- QCString facestring = faceheader.utf8();
+ TQCString facestring = faceheader.utf8();
// Spec says header should be less than 998 bytes
// Face: is 5 characters
if ( facestring.length() < 993 ) {
- QByteArray facearray;
+ TQByteArray facearray;
KCodecs::base64Decode(facestring, facearray);
- QImage faceimage;
+ TQImage faceimage;
if ( faceimage.loadFromData( facearray, "png" ) ) {
// Spec says image must be 48x48 pixels
if ( (48 == faceimage.width()) && (48 == faceimage.height()) ) {
@@ -566,8 +566,8 @@ namespace KMail {
if( photoURL.isEmpty() )
{
// no photo, look for a X-Face header
- QString xfaceURL;
- QString xfhead = message->headerField( "X-Face" );
+ TQString xfaceURL;
+ TQString xfhead = message->headerField( "X-Face" );
if ( !xfhead.isEmpty() )
{
KXFace xf;
@@ -581,12 +581,12 @@ namespace KMail {
if( !photoURL.isEmpty() )
{
//kdDebug( 5006 ) << "Got a photo: " << photoURL << endl;
- userHTML = QString("<img src=\"%1\" width=\"%2\" height=\"%3\">")
+ userHTML = TQString("<img src=\"%1\" width=\"%2\" height=\"%3\">")
.arg( photoURL ).arg( photoWidth ).arg( photoHeight );
if ( presence.isEmpty() ) {
- userHTML = QString("<div class=\"senderpic\">") + userHTML + "</div>";
+ userHTML = TQString("<div class=\"senderpic\">") + userHTML + "</div>";
} else {
- userHTML = QString( "<div class=\"senderpic\">"
+ userHTML = TQString( "<div class=\"senderpic\">"
"<a href=\"im:%1\">%2<div class=\"senderstatus\">"
"<span name=\"presence-%3\">%4</span></div></a>"
"</div>" ).arg( kabcUid )
@@ -597,7 +597,7 @@ namespace KMail {
} else {
// we don't have a photo, just show presence, if we have it
if ( !presence.isEmpty() )
- userHTML = QString( "<a href=\"im:%1\"><div class=\"senderstatus\">"
+ userHTML = TQString( "<a href=\"im:%1\"><div class=\"senderstatus\">"
"<span name=\"presence-%2\">%3</span></div></a>" )
.arg( kabcUid )
.arg( kabcUid )
@@ -619,7 +619,7 @@ namespace KMail {
const int flags = LinkLocator::PreserveSpaces |
( GlobalSettings::self()->showEmoticons() ?
LinkLocator::ReplaceSmileys : 0 );
- headerStr += QString("<div dir=\"%1\">%2</div>\n")
+ headerStr += TQString("<div dir=\"%1\">%2</div>\n")
.arg(subjectDir)
.arg(message->subject().isEmpty()?
i18n("No Subject") :
@@ -629,12 +629,12 @@ namespace KMail {
//headerStr += "<table>\n";
// from line
// the mailto: URLs can contain %3 etc., therefore usage of multiple
- // QString::arg is not possible
+ // TQString::arg is not possible
if ( strategy->showHeader( "from" ) ) {
- QString fromStr = message->from();
+ TQString fromStr = message->from();
if ( fromStr.isEmpty() ) // no valid email in from, maybe just a name
fromStr = message->fromStrip(); // let's use that
- headerStr += QString("<tr><th>%1</th>\n"
+ headerStr += TQString("<tr><th>%1</th>\n"
"<td>")
.arg(i18n("From: "))
+ KMMessage::emailAddrAsAnchor( fromStr, false )
@@ -642,17 +642,17 @@ namespace KMail {
+ i18n("(resent from %1)")
.arg( KMMessage::emailAddrAsAnchor(
message->headerField( "Resent-From" ),false) )
- : QString("") )
+ : TQString("") )
+ ( !vCardName.isEmpty() ? "&nbsp;&nbsp;<a href=\"" + vCardName + "\">"
+ i18n("[vCard]") + "</a>"
- : QString("") )
+ : TQString("") )
#if 0
+ ( ( !presence.isEmpty() )
? "&nbsp;&nbsp;(<span name=\"presence-" + kabcUid + "\">" + presence + "</span>)"
- : QString("") )
+ : TQString("") )
#endif
+ ( message->headerField("Organization").isEmpty()
- ? QString("")
+ ? TQString("")
: "&nbsp;&nbsp;("
+ strToHtml(message->headerField("Organization"))
+ ")")
@@ -660,27 +660,27 @@ namespace KMail {
}
// to line
if ( strategy->showHeader( "to" ) )
- headerStr.append(QString("<tr><th>%1</th>\n"
+ headerStr.append(TQString("<tr><th>%1</th>\n"
"<td>%2</td></tr>\n")
.arg(i18n("To: "))
.arg(KMMessage::emailAddrAsAnchor(message->to(),false)));
// cc line, if any
if ( strategy->showHeader( "cc" ) && !message->cc().isEmpty())
- headerStr.append(QString("<tr><th>%1</th>\n"
+ headerStr.append(TQString("<tr><th>%1</th>\n"
"<td>%2</td></tr>\n")
.arg(i18n("CC: "))
.arg(KMMessage::emailAddrAsAnchor(message->cc(),false)));
// Bcc line, if any
if ( strategy->showHeader( "bcc" ) && !message->bcc().isEmpty())
- headerStr.append(QString("<tr><th>%1</th>\n"
+ headerStr.append(TQString("<tr><th>%1</th>\n"
"<td>%2</td></tr>\n")
.arg(i18n("BCC: "))
.arg(KMMessage::emailAddrAsAnchor(message->bcc(),false)));
if ( strategy->showHeader( "date" ) )
- headerStr.append(QString("<tr><th>%1</th>\n"
+ headerStr.append(TQString("<tr><th>%1</th>\n"
"<td dir=\"%2\">%3</td></tr>\n")
.arg(i18n("Date: "))
.arg( directionOf( message->dateStr() ) )
@@ -689,7 +689,7 @@ namespace KMail {
if ( GlobalSettings::self()->showUserAgent() ) {
if ( strategy->showHeader( "user-agent" ) ) {
if ( !message->headerField("User-Agent").isEmpty() ) {
- headerStr.append(QString("<tr><th>%1</th>\n"
+ headerStr.append(TQString("<tr><th>%1</th>\n"
"<td>%2</td></tr>\n")
.arg(i18n("User-Agent: "))
.arg( strToHtml( message->headerField("User-Agent") ) ) );
@@ -698,7 +698,7 @@ namespace KMail {
if ( strategy->showHeader( "x-mailer" ) ) {
if ( !message->headerField("X-Mailer").isEmpty() ) {
- headerStr.append(QString("<tr><th>%1</th>\n"
+ headerStr.append(TQString("<tr><th>%1</th>\n"
"<td>%2</td></tr>\n")
.arg(i18n("X-Mailer: "))
.arg( strToHtml( message->headerField("X-Mailer") ) ) );
@@ -708,31 +708,31 @@ namespace KMail {
// FIXME: Show status in synthetic header style field. Decide whether this or current in brackets style is best and remove one.
/* if( strategy->showHeader( "status" ) )
- headerStr.append( QString( "<tr><th>%1</th>\n"
+ headerStr.append( TQString( "<tr><th>%1</th>\n"
"<td dir=\"%2\">%3</td></tr>\n")
.arg(i18n("Sender status: "))
.arg( directionOf( onlineStatus ) )
.arg(onlineStatus));
*/
- headerStr.append( QString("<tr><td colspan=\"2\"><div id=\"attachmentInjectionPoint\"></div></td></tr>" ) );
+ headerStr.append( TQString("<tr><td colspan=\"2\"><div id=\"attachmentInjectionPoint\"></div></td></tr>" ) );
headerStr.append(
- QString( "</table></td><td align=\"center\">%1</td></tr></table>\n" ).arg(userHTML) );
+ TQString( "</table></td><td align=\"center\">%1</td></tr></table>\n" ).arg(userHTML) );
if ( !spamHTML.isEmpty() )
- headerStr.append( QString( "<div class=\"spamheader\" dir=\"%1\"><b>%2</b>&nbsp;<span style=\"padding-left: 20px;\">%3</span></div>\n")
+ headerStr.append( TQString( "<div class=\"spamheader\" dir=\"%1\"><b>%2</b>&nbsp;<span style=\"padding-left: 20px;\">%3</span></div>\n")
.arg( subjectDir, i18n("Spam Status:"), spamHTML ) );
headerStr += "</div>\n\n";
return headerStr;
}
- QString FancyHeaderStyle::imgToDataUrl( const QImage &image, const char* fmt )
+ TQString FancyHeaderStyle::imgToDataUrl( const TQImage &image, const char* fmt )
{
- QByteArray ba;
- QBuffer buffer( ba );
+ TQByteArray ba;
+ TQBuffer buffer( ba );
buffer.open( IO_WriteOnly );
image.save( &buffer, fmt );
- return QString::fromLatin1("data:image/%1;base64,%2")
+ return TQString::fromLatin1("data:image/%1;base64,%2")
.arg( fmt, KCodecs::base64Encode( ba ) );
}
@@ -749,21 +749,21 @@ namespace KMail {
const HeaderStyle * next() const { return brief(); }
const HeaderStyle * prev() const { return fancy(); }
- QString format( const KMMessage * message, const HeaderStrategy * strategy,
- const QString & vCardName, bool printing, bool topLevel ) const;
+ TQString format( const KMMessage * message, const HeaderStrategy * strategy,
+ const TQString & vCardName, bool printing, bool topLevel ) const;
};
- QString EnterpriseHeaderStyle::format( const KMMessage * message,
+ TQString EnterpriseHeaderStyle::format( const KMMessage * message,
const HeaderStrategy * strategy,
- const QString & vCardName, bool printing, bool topLevel ) const {
- if ( !message ) return QString::null;
+ const TQString & vCardName, bool printing, bool topLevel ) const {
+ if ( !message ) return TQString::null;
if ( !strategy )
strategy = HeaderStrategy::brief();
// The direction of the header is determined according to the direction
// of the application layout.
- QString dir = QApplication::reverseLayout() ? "rtl" : "ltr" ;
+ TQString dir = TQApplication::reverseLayout() ? "rtl" : "ltr" ;
// However, the direction of the message subject within the header is
// determined according to the contents of the subject itself. Since
@@ -771,17 +771,17 @@ namespace KMail {
// considered left-to-right, they are ignored when determining its
// direction.
- QString subjectDir;
+ TQString subjectDir;
if (!message->subject().isEmpty())
subjectDir = directionOf( message->cleanSubject() );
else
subjectDir = directionOf( i18n("No Subject") );
// colors depend on if its encapsulated or not
- QColor fontColor(Qt::white);
- QString linkColor = "class =\"white\"";
- const QColor activeColor = qApp->palette().active().highlight();
- QColor activeColorDark = activeColor.dark(130);
+ TQColor fontColor(Qt::white);
+ TQString linkColor = "class =\"white\"";
+ const TQColor activeColor = qApp->palette().active().highlight();
+ TQColor activeColorDark = activeColor.dark(130);
// reverse colors for encapsulated
if( !topLevel ){
activeColorDark = activeColor.dark(50);
@@ -789,7 +789,7 @@ namespace KMail {
linkColor = "";
}
- QStringList headerParts;
+ TQStringList headerParts;
if( strategy->showHeader( "to" ) )
headerParts << KMMessage::emailAddrAsAnchor( message->to(), false, linkColor );
@@ -800,12 +800,12 @@ namespace KMail {
headerParts << i18n("BCC: ") + KMMessage::emailAddrAsAnchor( message->bcc(), true, linkColor );
// remove all empty (modulo whitespace) entries and joins them via ", \n"
- QString headerPart = " " + headerParts.grep( QRegExp( "\\S" ) ).join( ", " );
+ TQString headerPart = " " + headerParts.grep( TQRegExp( "\\S" ) ).join( ", " );
// Prepare the date string (when printing always use the localized date)
- QString dateString;
+ TQString dateString;
if( printing ) {
- QDateTime dateTime;
+ TQDateTime dateTime;
KLocale * locale = KGlobal::locale();
dateTime.setTime_t( message->date() );
dateString = locale->formatDateTime( dateTime );
@@ -813,10 +813,10 @@ namespace KMail {
dateString = message->dateStr();
}
- QString imgpath(locate("data","kmail/pics/"));
+ TQString imgpath(locate("data","kmail/pics/"));
imgpath.append("enterprise_");
- const QString borderSettings(" padding-top: 0px; padding-bottom: 0px; border-width: 0px ");
- QString headerStr ("");
+ const TQString borderSettings(" padding-top: 0px; padding-bottom: 0px; border-width: 0px ");
+ TQString headerStr ("");
// 3D borders
if(topLevel)
@@ -851,11 +851,11 @@ namespace KMail {
// from
if ( strategy->showHeader( "from" ) ){
- QString fromStr = message->from();
+ TQString fromStr = message->from();
if ( fromStr.isEmpty() ) // no valid email in from, maybe just a name
fromStr = message->fromStrip(); // let's use that
// TODO vcard
- QString fromPart = KMMessage::emailAddrAsAnchor( fromStr, true, linkColor );
+ TQString fromPart = KMMessage::emailAddrAsAnchor( fromStr, true, linkColor );
if ( !vCardName.isEmpty() )
fromPart += "&nbsp;&nbsp;<a href=\"" + vCardName + "\" "+linkColor+">" + i18n("[vCard]") + "</a>";
//TDDO strategy date
@@ -940,8 +940,8 @@ namespace KMail {
return 0; // make compiler happy
}
- const HeaderStyle * HeaderStyle::create( const QString & type ) {
- QString lowerType = type.lower();
+ const HeaderStyle * HeaderStyle::create( const TQString & type ) {
+ TQString lowerType = type.lower();
if ( lowerType == "brief" ) return brief();
if ( lowerType == "plain" ) return plain();
if ( lowerType == "enterprise" ) return enterprise();
diff --git a/kmail/headerstyle.h b/kmail/headerstyle.h
index 8329f3fd3..f3f89ff8b 100644
--- a/kmail/headerstyle.h
+++ b/kmail/headerstyle.h
@@ -60,7 +60,7 @@ namespace KMail {
enum Type { Brief, Plain, Fancy, Enterprise };
static const HeaderStyle * create( Type type );
- static const HeaderStyle * create( const QString & type );
+ static const HeaderStyle * create( const TQString & type );
static const HeaderStyle * brief();
static const HeaderStyle * plain();
@@ -77,9 +77,9 @@ namespace KMail {
//
// HeaderStyle interface:
//
- virtual QString format( const KMMessage * message,
+ virtual TQString format( const KMMessage * message,
const KMail::HeaderStrategy * strategy,
- const QString & vCardName,
+ const TQString & vCardName,
bool printing=false, bool topLevel = false ) const = 0;
};
diff --git a/kmail/htmlstatusbar.cpp b/kmail/htmlstatusbar.cpp
index 831b36651..2c6e6faff 100644
--- a/kmail/htmlstatusbar.cpp
+++ b/kmail/htmlstatusbar.cpp
@@ -45,16 +45,16 @@
#include <klocale.h>
#include <kconfig.h>
-#include <qcolor.h>
-#include <qstring.h>
+#include <tqcolor.h>
+#include <tqstring.h>
-KMail::HtmlStatusBar::HtmlStatusBar( QWidget * parent, const char * name, WFlags f )
- : QLabel( parent, name, f ),
+KMail::HtmlStatusBar::HtmlStatusBar( TQWidget * parent, const char * name, WFlags f )
+ : TQLabel( parent, name, f ),
mMode( Normal )
{
setAlignment( AlignHCenter|AlignTop );
// Don't force a minimum height to the reader widget
- setSizePolicy( QSizePolicy( QSizePolicy::Preferred, QSizePolicy::Ignored ) );
+ setSizePolicy( TQSizePolicy( TQSizePolicy::Preferred, TQSizePolicy::Ignored ) );
upd();
}
@@ -85,7 +85,7 @@ void KMail::HtmlStatusBar::setMode( Mode m ) {
upd();
}
-QString KMail::HtmlStatusBar::message() const {
+TQString KMail::HtmlStatusBar::message() const {
switch ( mode() ) {
case Html: // bold: "HTML Message"
return i18n( "<qt><b><br>H<br>T<br>M<br>L<br> "
@@ -96,7 +96,7 @@ QString KMail::HtmlStatusBar::message() const {
"<br>M<br>e<br>s<br>s<br>a<br>g<br>e</qt>" );
default:
case Neutral:
- return QString::null;
+ return TQString::null;
}
}
@@ -110,7 +110,7 @@ namespace {
}
}
-QColor KMail::HtmlStatusBar::fgColor() const {
+TQColor KMail::HtmlStatusBar::fgColor() const {
KConfigGroup conf( config(), "Reader" );
switch ( mode() ) {
case Html:
@@ -123,7 +123,7 @@ QColor KMail::HtmlStatusBar::fgColor() const {
}
}
-QColor KMail::HtmlStatusBar::bgColor() const {
+TQColor KMail::HtmlStatusBar::bgColor() const {
KConfigGroup conf( config(), "Reader" );
switch ( mode() ) {
diff --git a/kmail/htmlstatusbar.h b/kmail/htmlstatusbar.h
index 103f053a1..7c5e7655a 100644
--- a/kmail/htmlstatusbar.h
+++ b/kmail/htmlstatusbar.h
@@ -32,7 +32,7 @@
#ifndef _KMAIL_HTMLSTATUSBAR_H_
#define _KMAIL_HTMLSTATUSBAR_H_
-#include <qlabel.h>
+#include <tqlabel.h>
class QString;
class QColor;
@@ -58,10 +58,10 @@ namespace KMail {
*
* @author Ingo Kloecker <kloecker@kde.org>, Marc Mutz <mutz@kde.org>
**/
- class HtmlStatusBar : public QLabel {
+ class HtmlStatusBar : public TQLabel {
Q_OBJECT
public:
- HtmlStatusBar( QWidget * parent=0, const char * name=0, WFlags f=0 );
+ HtmlStatusBar( TQWidget * parent=0, const char * name=0, WFlags f=0 );
virtual ~HtmlStatusBar();
enum Mode {
@@ -88,9 +88,9 @@ namespace KMail {
private:
void upd();
- QString message() const;
- QColor bgColor() const;
- QColor fgColor() const;
+ TQString message() const;
+ TQColor bgColor() const;
+ TQColor fgColor() const;
Mode mMode;
};
diff --git a/kmail/identitydialog.cpp b/kmail/identitydialog.cpp
index 1283047e2..c0a1952d7 100644
--- a/kmail/identitydialog.cpp
+++ b/kmail/identitydialog.cpp
@@ -69,13 +69,13 @@ using KMail::FolderRequester;
#include <kpushbutton.h>
// Qt headers:
-#include <qtabwidget.h>
-#include <qlabel.h>
-#include <qwhatsthis.h>
-#include <qlayout.h>
-#include <qpushbutton.h>
-#include <qcheckbox.h>
-#include <qcombobox.h>
+#include <tqtabwidget.h>
+#include <tqlabel.h>
+#include <tqwhatsthis.h>
+#include <tqlayout.h>
+#include <tqpushbutton.h>
+#include <tqcheckbox.h>
+#include <tqcombobox.h>
// other headers:
#include <gpgmepp/key.h>
@@ -86,28 +86,28 @@ using namespace KPIM;
namespace KMail {
- IdentityDialog::IdentityDialog( QWidget * parent, const char * name )
+ IdentityDialog::IdentityDialog( TQWidget * parent, const char * name )
: KDialogBase( Plain, i18n("Edit Identity"), Ok|Cancel|Help, Ok,
parent, name )
{
// tmp. vars:
- QWidget * tab;
- QLabel * label;
+ TQWidget * tab;
+ TQLabel * label;
int row;
- QGridLayout * glay;
- QString msg;
+ TQGridLayout * glay;
+ TQString msg;
//
// Tab Widget: General
//
row = -1;
- QVBoxLayout * vlay = new QVBoxLayout( plainPage(), 0, spacingHint() );
- QTabWidget *tabWidget = new QTabWidget( plainPage(), "config-identity-tab" );
+ TQVBoxLayout * vlay = new TQVBoxLayout( plainPage(), 0, spacingHint() );
+ TQTabWidget *tabWidget = new TQTabWidget( plainPage(), "config-identity-tab" );
vlay->addWidget( tabWidget );
- tab = new QWidget( tabWidget );
+ tab = new TQWidget( tabWidget );
tabWidget->addTab( tab, i18n("&General") );
- glay = new QGridLayout( tab, 4, 2, marginHint(), spacingHint() );
+ glay = new TQGridLayout( tab, 4, 2, marginHint(), spacingHint() );
glay->setRowStretch( 3, 1 );
glay->setColStretch( 1, 1 );
@@ -115,51 +115,51 @@ namespace KMail {
++row;
mNameEdit = new KLineEdit( tab );
glay->addWidget( mNameEdit, row, 1 );
- label = new QLabel( mNameEdit, i18n("&Your name:"), tab );
+ label = new TQLabel( mNameEdit, i18n("&Your name:"), tab );
glay->addWidget( label, row, 0 );
msg = i18n("<qt><h3>Your name</h3>"
"<p>This field should contain your name as you would like "
"it to appear in the email header that is sent out;</p>"
"<p>if you leave this blank your real name will not "
"appear, only the email address.</p></qt>");
- QWhatsThis::add( label, msg );
- QWhatsThis::add( mNameEdit, msg );
+ TQWhatsThis::add( label, msg );
+ TQWhatsThis::add( mNameEdit, msg );
// "Organization" line edit and label:
++row;
mOrganizationEdit = new KLineEdit( tab );
glay->addWidget( mOrganizationEdit, row, 1 );
- label = new QLabel( mOrganizationEdit, i18n("Organi&zation:"), tab );
+ label = new TQLabel( mOrganizationEdit, i18n("Organi&zation:"), tab );
glay->addWidget( label, row, 0 );
msg = i18n("<qt><h3>Organization</h3>"
"<p>This field should have the name of your organization "
"if you'd like it to be shown in the email header that "
"is sent out.</p>"
"<p>It is safe (and normal) to leave this blank.</p></qt>");
- QWhatsThis::add( label, msg );
- QWhatsThis::add( mOrganizationEdit, msg );
+ TQWhatsThis::add( label, msg );
+ TQWhatsThis::add( mOrganizationEdit, msg );
// "Email Address" line edit and label:
// (row 3: spacer)
++row;
mEmailEdit = new KLineEdit( tab );
glay->addWidget( mEmailEdit, row, 1 );
- label = new QLabel( mEmailEdit, i18n("&Email address:"), tab );
+ label = new TQLabel( mEmailEdit, i18n("&Email address:"), tab );
glay->addWidget( label, row, 0 );
msg = i18n("<qt><h3>Email address</h3>"
"<p>This field should have your full email address.</p>"
"<p>If you leave this blank, or get it wrong, people "
"will have trouble replying to you.</p></qt>");
- QWhatsThis::add( label, msg );
- QWhatsThis::add( mEmailEdit, msg );
+ TQWhatsThis::add( label, msg );
+ TQWhatsThis::add( mEmailEdit, msg );
//
// Tab Widget: Cryptography
//
row = -1;
- mCryptographyTab = tab = new QWidget( tabWidget );
+ mCryptographyTab = tab = new TQWidget( tabWidget );
tabWidget->addTab( tab, i18n("Cryptograph&y") );
- glay = new QGridLayout( tab, 6, 2, marginHint(), spacingHint() );
+ glay = new TQGridLayout( tab, 6, 2, marginHint(), spacingHint() );
glay->setColStretch( 1, 1 );
// "OpenPGP Signature Key" requester and label:
@@ -178,9 +178,9 @@ namespace KMail {
"normal mail functions will not be affected.</p>"
"<p>You can find out more about keys at <a>http://www.gnupg.org</a></p></qt>");
- label = new QLabel( mPGPSigningKeyRequester, i18n("OpenPGP signing key:"), tab );
- QWhatsThis::add( mPGPSigningKeyRequester, msg );
- QWhatsThis::add( label, msg );
+ label = new TQLabel( mPGPSigningKeyRequester, i18n("OpenPGP signing key:"), tab );
+ TQWhatsThis::add( mPGPSigningKeyRequester, msg );
+ TQWhatsThis::add( label, msg );
glay->addWidget( label, row, 0 );
glay->addWidget( mPGPSigningKeyRequester, row, 1 );
@@ -203,9 +203,9 @@ namespace KMail {
"to encrypt copies of outgoing messages to you using OpenPGP; "
"normal mail functions will not be affected.</p>"
"<p>You can find out more about keys at <a>http://www.gnupg.org</a></qt>");
- label = new QLabel( mPGPEncryptionKeyRequester, i18n("OpenPGP encryption key:"), tab );
- QWhatsThis::add( mPGPEncryptionKeyRequester, msg );
- QWhatsThis::add( label, msg );
+ label = new TQLabel( mPGPEncryptionKeyRequester, i18n("OpenPGP encryption key:"), tab );
+ TQWhatsThis::add( mPGPEncryptionKeyRequester, msg );
+ TQWhatsThis::add( label, msg );
glay->addWidget( label, row, 0 );
glay->addWidget( mPGPEncryptionKeyRequester, row, 1 );
@@ -225,9 +225,9 @@ namespace KMail {
"<p>You can leave this blank, but KMail will not be able "
"to digitally sign emails using S/MIME; "
"normal mail functions will not be affected.</p></qt>");
- label = new QLabel( mSMIMESigningKeyRequester, i18n("S/MIME signing certificate:"), tab );
- QWhatsThis::add( mSMIMESigningKeyRequester, msg );
- QWhatsThis::add( label, msg );
+ label = new TQLabel( mSMIMESigningKeyRequester, i18n("S/MIME signing certificate:"), tab );
+ TQWhatsThis::add( mSMIMESigningKeyRequester, msg );
+ TQWhatsThis::add( label, msg );
glay->addWidget( label, row, 0 );
glay->addWidget( mSMIMESigningKeyRequester, row, 1 );
@@ -253,9 +253,9 @@ namespace KMail {
"<p>You can leave this blank, but KMail will not be able "
"to encrypt copies of outgoing messages to you using S/MIME; "
"normal mail functions will not be affected.</p></qt>");
- label = new QLabel( mSMIMEEncryptionKeyRequester, i18n("S/MIME encryption certificate:"), tab );
- QWhatsThis::add( mSMIMEEncryptionKeyRequester, msg );
- QWhatsThis::add( label, msg );
+ label = new TQLabel( mSMIMEEncryptionKeyRequester, i18n("S/MIME encryption certificate:"), tab );
+ TQWhatsThis::add( mSMIMEEncryptionKeyRequester, msg );
+ TQWhatsThis::add( label, msg );
glay->addWidget( label, row, 0 );
glay->addWidget( mSMIMEEncryptionKeyRequester, row, 1 );
@@ -265,15 +265,15 @@ namespace KMail {
// "Preferred Crypto Message Format" combobox and label:
++row;
- mPreferredCryptoMessageFormat = new QComboBox( false, tab );
- QStringList l;
+ mPreferredCryptoMessageFormat = new TQComboBox( false, tab );
+ TQStringList l;
l << Kleo::cryptoMessageFormatToLabel( Kleo::AutoFormat )
<< Kleo::cryptoMessageFormatToLabel( Kleo::InlineOpenPGPFormat )
<< Kleo::cryptoMessageFormatToLabel( Kleo::OpenPGPMIMEFormat )
<< Kleo::cryptoMessageFormatToLabel( Kleo::SMIMEFormat )
<< Kleo::cryptoMessageFormatToLabel( Kleo::SMIMEOpaqueFormat );
mPreferredCryptoMessageFormat->insertStringList( l );
- label = new QLabel( mPreferredCryptoMessageFormat,
+ label = new TQLabel( mPreferredCryptoMessageFormat,
i18n("Preferred crypto message format:"), tab );
glay->addWidget( label, row, 0 );
@@ -286,9 +286,9 @@ namespace KMail {
// Tab Widget: Advanced
//
row = -1;
- tab = new QWidget( tabWidget );
+ tab = new TQWidget( tabWidget );
tabWidget->addTab( tab, i18n("&Advanced") );
- glay = new QGridLayout( tab, 8, 2, marginHint(), spacingHint() );
+ glay = new TQGridLayout( tab, 8, 2, marginHint(), spacingHint() );
// the last (empty) row takes all the remaining space
glay->setRowStretch( 8-1, 1 );
glay->setColStretch( 1, 1 );
@@ -297,7 +297,7 @@ namespace KMail {
++row;
mReplyToEdit = new KPIM::AddresseeLineEdit( tab, true, "mReplyToEdit" );
glay->addWidget( mReplyToEdit, row, 1 );
- label = new QLabel ( mReplyToEdit, i18n("&Reply-To address:"), tab);
+ label = new TQLabel ( mReplyToEdit, i18n("&Reply-To address:"), tab);
glay->addWidget( label , row, 0 );
msg = i18n("<qt><h3>Reply-To addresses</h3>"
"<p>This sets the <tt>Reply-to:</tt> header to contain a "
@@ -309,14 +309,14 @@ namespace KMail {
"<tt>From:</tt> field, but any responses to go to "
"a group address.</p>"
"<p>If in doubt, leave this field blank.</p></qt>");
- QWhatsThis::add( label, msg );
- QWhatsThis::add( mReplyToEdit, msg );
+ TQWhatsThis::add( label, msg );
+ TQWhatsThis::add( mReplyToEdit, msg );
// "BCC addresses" line edit and label:
++row;
mBccEdit = new KPIM::AddresseeLineEdit( tab, true, "mBccEdit" );
glay->addWidget( mBccEdit, row, 1 );
- label = new QLabel( mBccEdit, i18n("&BCC addresses:"), tab );
+ label = new TQLabel( mBccEdit, i18n("&BCC addresses:"), tab );
glay->addWidget( label, row, 0 );
msg = i18n("<qt><h3>BCC (Blind Carbon Copy) addresses</h3>"
"<p>The addresses that you enter here will be added to each "
@@ -327,14 +327,14 @@ namespace KMail {
"<p>To specify more than one address, use commas to separate "
"the list of BCC recipients.</p>"
"<p>If in doubt, leave this field blank.</p></qt>");
- QWhatsThis::add( label, msg );
- QWhatsThis::add( mBccEdit, msg );
+ TQWhatsThis::add( label, msg );
+ TQWhatsThis::add( mBccEdit, msg );
// "Dictionary" combo box and label:
++row;
mDictionaryCombo = new DictionaryComboBox( tab );
glay->addWidget( mDictionaryCombo, row, 1 );
- glay->addWidget( new QLabel( mDictionaryCombo, i18n("D&ictionary:"), tab ),
+ glay->addWidget( new TQLabel( mDictionaryCombo, i18n("D&ictionary:"), tab ),
row, 0 );
// "Sent-mail Folder" combo box and label:
@@ -343,7 +343,7 @@ namespace KMail {
kmkernel->getKMMainWidget()->folderTree() );
mFccCombo->setShowOutbox( false );
glay->addWidget( mFccCombo, row, 1 );
- glay->addWidget( new QLabel( mFccCombo, i18n("Sent-mail &folder:"), tab ),
+ glay->addWidget( new TQLabel( mFccCombo, i18n("Sent-mail &folder:"), tab ),
row, 0 );
// "Drafts Folder" combo box and label:
@@ -352,7 +352,7 @@ namespace KMail {
kmkernel->getKMMainWidget()->folderTree() );
mDraftsCombo->setShowOutbox( false );
glay->addWidget( mDraftsCombo, row, 1 );
- glay->addWidget( new QLabel( mDraftsCombo, i18n("&Drafts folder:"), tab ),
+ glay->addWidget( new TQLabel( mDraftsCombo, i18n("&Drafts folder:"), tab ),
row, 0 );
// "Templates Folder" combo box and label:
@@ -361,43 +361,43 @@ namespace KMail {
kmkernel->getKMMainWidget()->folderTree() );
mTemplatesCombo->setShowOutbox( false );
glay->addWidget( mTemplatesCombo, row, 1 );
- glay->addWidget( new QLabel( mTemplatesCombo, i18n("&Templates folder:"), tab ),
+ glay->addWidget( new TQLabel( mTemplatesCombo, i18n("&Templates folder:"), tab ),
row, 0 );
// "Special transport" combobox and label:
++row;
- mTransportCheck = new QCheckBox( i18n("Special &transport:"), tab );
+ mTransportCheck = new TQCheckBox( i18n("Special &transport:"), tab );
glay->addWidget( mTransportCheck, row, 0 );
- mTransportCombo = new QComboBox( true, tab );
+ mTransportCombo = new TQComboBox( true, tab );
mTransportCombo->setEnabled( false ); // since !mTransportCheck->isChecked()
mTransportCombo->insertStringList( KMail::TransportManager::transportNames() );
glay->addWidget( mTransportCombo, row, 1 );
- connect( mTransportCheck, SIGNAL(toggled(bool)),
- mTransportCombo, SLOT(setEnabled(bool)) );
+ connect( mTransportCheck, TQT_SIGNAL(toggled(bool)),
+ mTransportCombo, TQT_SLOT(setEnabled(bool)) );
// the last row is a spacer
//
// Tab Widget: Templates
//
- tab = new QWidget( tabWidget );
+ tab = new TQWidget( tabWidget );
tabWidget->addTab( tab, i18n("&Templates") );
- vlay = new QVBoxLayout( tab, marginHint(), spacingHint() );
- mCustom = new QCheckBox( i18n("&Use custom message templates"), tab );
+ vlay = new TQVBoxLayout( tab, marginHint(), spacingHint() );
+ mCustom = new TQCheckBox( i18n("&Use custom message templates"), tab );
vlay->addWidget( mCustom );
mWidget = new TemplatesConfiguration( tab , "identity-templates" );
mWidget->setEnabled( false );
vlay->addWidget( mWidget );
- QHBoxLayout *btns = new QHBoxLayout( vlay, spacingHint() );
+ TQHBoxLayout *btns = new TQHBoxLayout( vlay, spacingHint() );
mCopyGlobal = new KPushButton( i18n("&Copy global templates"), tab );
mCopyGlobal->setEnabled( false );
btns->addWidget( mCopyGlobal );
- connect( mCustom, SIGNAL( toggled( bool ) ),
- mWidget, SLOT( setEnabled( bool ) ) );
- connect( mCustom, SIGNAL( toggled( bool ) ),
- mCopyGlobal, SLOT( setEnabled( bool ) ) );
- connect( mCopyGlobal, SIGNAL(clicked()),
- this, SLOT(slotCopyGlobal()) );
+ connect( mCustom, TQT_SIGNAL( toggled( bool ) ),
+ mWidget, TQT_SLOT( setEnabled( bool ) ) );
+ connect( mCustom, TQT_SIGNAL( toggled( bool ) ),
+ mCopyGlobal, TQT_SLOT( setEnabled( bool ) ) );
+ connect( mCopyGlobal, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotCopyGlobal()) );
//
// Tab Widget: Signature
@@ -415,8 +415,8 @@ namespace KMail {
resize( geometry.readSizeEntry( "Identity Dialog size" ) );
mNameEdit->setFocus();
- connect( tabWidget, SIGNAL(currentChanged(QWidget*)),
- SLOT(slotAboutToShow(QWidget*)) );
+ connect( tabWidget, TQT_SIGNAL(currentChanged(TQWidget*)),
+ TQT_SLOT(slotAboutToShow(TQWidget*)) );
}
IdentityDialog::~IdentityDialog() {
@@ -424,11 +424,11 @@ namespace KMail {
geometry.writeEntry( "Identity Dialog size", size() );
}
- void IdentityDialog::slotAboutToShow( QWidget * w ) {
+ void IdentityDialog::slotAboutToShow( TQWidget * w ) {
if ( w == mCryptographyTab ) {
// set the configured email address as inital query of the key
// requesters:
- const QString email = mEmailEdit->text().stripWhiteSpace();
+ const TQString email = mEmailEdit->text().stripWhiteSpace();
mPGPEncryptionKeyRequester->setInitialQuery( email );
mPGPSigningKeyRequester->setInitialQuery( email );
mSMIMEEncryptionKeyRequester->setInitialQuery( email );
@@ -442,13 +442,13 @@ namespace KMail {
namespace {
struct DoesntMatchEMailAddress {
- explicit DoesntMatchEMailAddress( const QString & s )
+ explicit DoesntMatchEMailAddress( const TQString & s )
: email( s.stripWhiteSpace().lower() ) {}
bool operator()( const GpgME::Key & key ) const;
private:
bool checkForEmail( const char * email ) const;
- static QString extractEmail( const char * email );
- const QString email;
+ static TQString extractEmail( const char * email );
+ const TQString email;
};
bool DoesntMatchEMailAddress::operator()( const GpgME::Key & key ) const {
@@ -460,14 +460,14 @@ namespace KMail {
}
bool DoesntMatchEMailAddress::checkForEmail( const char * e ) const {
- const QString em = extractEmail( e );
+ const TQString em = extractEmail( e );
return !em.isEmpty() && email == em;
}
- QString DoesntMatchEMailAddress::extractEmail( const char * e ) {
+ TQString DoesntMatchEMailAddress::extractEmail( const char * e ) {
if ( !e || !*e )
- return QString::null;
- const QString em = QString::fromUtf8( e );
+ return TQString::null;
+ const TQString em = TQString::fromUtf8( e );
if ( e[0] == '<' )
return em.mid( 1, em.length() - 2 );
else
@@ -475,12 +475,12 @@ namespace KMail {
}
}
-bool IdentityDialog::validateAddresses( const QString & addresses )
+bool IdentityDialog::validateAddresses( const TQString & addresses )
{
- QString brokenAddress;
+ TQString brokenAddress;
KPIM::EmailParseResult errorCode = KMMessage::isValidEmailAddressList( KMMessage::expandAliases( addresses ), brokenAddress );
if ( !( errorCode == KPIM::AddressOk || errorCode == KPIM::AddressEmpty ) ) {
- QString errorMsg( "<qt><p><b>" + brokenAddress +
+ TQString errorMsg( "<qt><p><b>" + brokenAddress +
"</b></p><p>" + KPIM::emailParseResultToString( errorCode ) +
"</p></qt>" );
KMessageBox::sorry( this, errorMsg, i18n("Invalid Email Address") );
@@ -490,11 +490,11 @@ bool IdentityDialog::validateAddresses( const QString & addresses )
}
void IdentityDialog::slotOk() {
- const QString email = mEmailEdit->text().stripWhiteSpace();
+ const TQString email = mEmailEdit->text().stripWhiteSpace();
// Validate email addresses
if ( !isValidSimpleEmailAddress( email )) {
- QString errorMsg( simpleEmailAddressErrorMsg());
+ TQString errorMsg( simpleEmailAddressErrorMsg());
KMessageBox::sorry( this, errorMsg, i18n("Invalid Email Address") );
return;
}
@@ -511,7 +511,7 @@ void IdentityDialog::slotOk() {
const std::vector<GpgME::Key> & pgpEncryptionKeys = mPGPEncryptionKeyRequester->keys();
const std::vector<GpgME::Key> & smimeSigningKeys = mSMIMESigningKeyRequester->keys();
const std::vector<GpgME::Key> & smimeEncryptionKeys = mSMIMEEncryptionKeyRequester->keys();
- QString msg;
+ TQString msg;
bool err = false;
if ( std::find_if( pgpSigningKeys.begin(), pgpSigningKeys.end(),
DoesntMatchEMailAddress( email ) ) != pgpSigningKeys.end() ) {
@@ -567,8 +567,8 @@ void IdentityDialog::slotOk() {
return KDialogBase::slotOk();
}
- bool IdentityDialog::checkFolderExists( const QString & folderID,
- const QString & msg ) {
+ bool IdentityDialog::checkFolderExists( const TQString & folderID,
+ const TQString & msg ) {
KMFolder * folder = kmkernel->findFolderById( folderID );
if ( !folder ) {
KMessageBox::sorry( this, msg );
@@ -636,7 +636,7 @@ void IdentityDialog::slotOk() {
// "Templates" tab:
uint identity = ident.uoid();
- QString iid = QString("IDENTITY_%1").arg( identity );
+ TQString iid = TQString("IDENTITY_%1").arg( identity );
Templates t( iid );
mCustom->setChecked(t.useCustomTemplates());
mWidget->loadFromIdentity( identity );
@@ -651,7 +651,7 @@ void IdentityDialog::slotOk() {
// "General" tab:
ident.setFullName( mNameEdit->text() );
ident.setOrganization( mOrganizationEdit->text() );
- QString email = mEmailEdit->text();
+ TQString email = mEmailEdit->text();
ident.setEmailAddr( email );
// "Cryptography" tab:
ident.setPGPSigningKey( mPGPSigningKeyRequester->fingerprint().latin1() );
@@ -663,17 +663,17 @@ void IdentityDialog::slotOk() {
ident.setReplyToAddr( mReplyToEdit->text() );
ident.setBcc( mBccEdit->text() );
ident.setTransport( ( mTransportCheck->isChecked() ) ?
- mTransportCombo->currentText() : QString::null );
+ mTransportCombo->currentText() : TQString::null );
ident.setDictionary( mDictionaryCombo->currentDictionary() );
ident.setFcc( mFccCombo->folder() ?
- mFccCombo->folder()->idString() : QString::null );
+ mFccCombo->folder()->idString() : TQString::null );
ident.setDrafts( mDraftsCombo->folder() ?
- mDraftsCombo->folder()->idString() : QString::null );
+ mDraftsCombo->folder()->idString() : TQString::null );
ident.setTemplates( mTemplatesCombo->folder() ?
- mTemplatesCombo->folder()->idString() : QString::null );
+ mTemplatesCombo->folder()->idString() : TQString::null );
// "Templates" tab:
uint identity = ident.uoid();
- QString iid = QString("IDENTITY_%1").arg( identity );
+ TQString iid = TQString("IDENTITY_%1").arg( identity );
Templates t( iid );
kdDebug() << "use custom templates for identity " << identity << ": " << mCustom->isChecked() << endl;
t.setUseCustomTemplates(mCustom->isChecked());
@@ -685,9 +685,9 @@ void IdentityDialog::slotOk() {
ident.setXFaceEnabled( mXFaceConfigurator->isXFaceEnabled() );
}
- void IdentityDialog::slotUpdateTransportCombo( const QStringList & sl ) {
+ void IdentityDialog::slotUpdateTransportCombo( const TQStringList & sl ) {
// save old setting:
- QString content = mTransportCombo->currentText();
+ TQString content = mTransportCombo->currentText();
// update combo box:
mTransportCombo->clear();
mTransportCombo->insertStringList( sl );
diff --git a/kmail/identitydialog.h b/kmail/identitydialog.h
index b43f3ebe0..c90747fd7 100644
--- a/kmail/identitydialog.h
+++ b/kmail/identitydialog.h
@@ -61,7 +61,7 @@ namespace KMail {
class IdentityDialog : public KDialogBase {
Q_OBJECT
public:
- IdentityDialog( QWidget * parent=0, const char * name = 0 );
+ IdentityDialog( TQWidget * parent=0, const char * name = 0 );
virtual ~IdentityDialog();
void setIdentity( /*_not_ const*/ KPIM::Identity & ident );
@@ -69,43 +69,43 @@ namespace KMail {
void updateIdentity( KPIM::Identity & ident );
public slots:
- void slotUpdateTransportCombo( const QStringList & sl );
+ void slotUpdateTransportCombo( const TQStringList & sl );
protected slots:
- void slotAboutToShow( QWidget * w );
+ void slotAboutToShow( TQWidget * w );
/*! \reimp */
void slotOk();
// copy default templates to identity templates
void slotCopyGlobal();
private:
- bool checkFolderExists( const QString & folder, const QString & msg );
- bool validateAddresses( const QString & addresses );
+ bool checkFolderExists( const TQString & folder, const TQString & msg );
+ bool validateAddresses( const TQString & addresses );
protected:
// "general" tab:
- QLineEdit *mNameEdit;
- QLineEdit *mOrganizationEdit;
- QLineEdit *mEmailEdit;
+ TQLineEdit *mNameEdit;
+ TQLineEdit *mOrganizationEdit;
+ TQLineEdit *mEmailEdit;
// "cryptography" tab:
- QWidget *mCryptographyTab;
+ TQWidget *mCryptographyTab;
Kleo::SigningKeyRequester *mPGPSigningKeyRequester;
Kleo::EncryptionKeyRequester *mPGPEncryptionKeyRequester;
Kleo::SigningKeyRequester *mSMIMESigningKeyRequester;
Kleo::EncryptionKeyRequester *mSMIMEEncryptionKeyRequester;
- QComboBox *mPreferredCryptoMessageFormat;
+ TQComboBox *mPreferredCryptoMessageFormat;
// "advanced" tab:
- QLineEdit *mReplyToEdit;
- QLineEdit *mBccEdit;
+ TQLineEdit *mReplyToEdit;
+ TQLineEdit *mBccEdit;
KMail::DictionaryComboBox *mDictionaryCombo;
FolderRequester *mFccCombo;
FolderRequester *mDraftsCombo;
FolderRequester *mTemplatesCombo;
- QCheckBox *mTransportCheck;
- QComboBox *mTransportCombo; // should be a KMTransportCombo...
+ TQCheckBox *mTransportCheck;
+ TQComboBox *mTransportCombo; // should be a KMTransportCombo...
// "templates" tab:
TemplatesConfiguration *mWidget;
- QCheckBox *mCustom;
+ TQCheckBox *mCustom;
KPushButton *mCopyGlobal;
// "signature" tab:
KMail::SignatureConfigurator *mSignatureConfigurator;
diff --git a/kmail/identitydrag.cpp b/kmail/identitydrag.cpp
index 5116dd445..e8ba4a07e 100644
--- a/kmail/identitydrag.cpp
+++ b/kmail/identitydrag.cpp
@@ -41,8 +41,8 @@ namespace KMail {
static const char kmailIdentityMimeType[] = "application/x-kmail-identity-drag";
IdentityDrag::IdentityDrag( const KPIM::Identity & ident,
- QWidget * dragSource, const char * name )
- : QDragObject( dragSource, name ), mIdent( ident )
+ TQWidget * dragSource, const char * name )
+ : TQDragObject( dragSource, name ), mIdent( ident )
{
}
@@ -54,26 +54,26 @@ namespace KMail {
return 0;
}
- QByteArray IdentityDrag::encodedData( const char * mimetype ) const {
- QByteArray a;
+ TQByteArray IdentityDrag::encodedData( const char * mimetype ) const {
+ TQByteArray a;
if ( !qstrcmp( mimetype, kmailIdentityMimeType ) ) {
- QDataStream s( a, IO_WriteOnly );
+ TQDataStream s( a, IO_WriteOnly );
s << mIdent;
}
return a;
}
- bool IdentityDrag::canDecode( const QMimeSource * e ) {
+ bool IdentityDrag::canDecode( const TQMimeSource * e ) {
// ### feel free to add vCard and other stuff here and in decode...
return e->provides( kmailIdentityMimeType );
}
- bool IdentityDrag::decode( const QMimeSource * e, KPIM::Identity & i ) {
+ bool IdentityDrag::decode( const TQMimeSource * e, KPIM::Identity & i ) {
if ( e->provides( kmailIdentityMimeType ) ) {
- QDataStream s( e->encodedData( kmailIdentityMimeType ), IO_ReadOnly );
+ TQDataStream s( e->encodedData( kmailIdentityMimeType ), IO_ReadOnly );
s >> i;
return true;
}
diff --git a/kmail/identitydrag.h b/kmail/identitydrag.h
index b9b8b8314..82d6d0262 100644
--- a/kmail/identitydrag.h
+++ b/kmail/identitydrag.h
@@ -34,27 +34,27 @@
#include <libkpimidentities/identity.h>
-#include <qdragobject.h> // is a qobject and a qmimesource
+#include <tqdragobject.h> // is a qobject and a qmimesource
namespace KMail {
- /** @short A QDragObject for KPIM::Identity
+ /** @short A TQDragObject for KPIM::Identity
@author Marc Mutz <mutz@kde.org>
**/
- class IdentityDrag : public QDragObject {
+ class IdentityDrag : public TQDragObject {
Q_OBJECT
public:
IdentityDrag( const KPIM::Identity & ident,
- QWidget * dragSource=0, const char * name=0 );
+ TQWidget * dragSource=0, const char * name=0 );
public:
virtual ~IdentityDrag() {}
const char * format( int i ) const; // reimp. QMimeSource
- QByteArray encodedData( const char * mimetype ) const; // dto.
+ TQByteArray encodedData( const char * mimetype ) const; // dto.
- static bool canDecode( const QMimeSource * e );
- static bool decode( const QMimeSource * e, KPIM::Identity & ident );
+ static bool canDecode( const TQMimeSource * e );
+ static bool decode( const TQMimeSource * e, KPIM::Identity & ident );
protected:
KPIM::Identity mIdent;
diff --git a/kmail/identitylistview.cpp b/kmail/identitylistview.cpp
index 9666a38d8..d40673800 100644
--- a/kmail/identitylistview.cpp
+++ b/kmail/identitylistview.cpp
@@ -57,7 +57,7 @@ namespace KMail {
init( ident );
}
- IdentityListViewItem::IdentityListViewItem( IdentityListView * parent, QListViewItem * after, const KPIM::Identity & ident )
+ IdentityListViewItem::IdentityListViewItem( IdentityListView * parent, TQListViewItem * after, const KPIM::Identity & ident )
: KListViewItem( parent, after ), mUOID( ident.uoid() ) {
init( ident );
}
@@ -95,7 +95,7 @@ namespace KMail {
//
//
- IdentityListView::IdentityListView( QWidget * parent, const char * name )
+ IdentityListView::IdentityListView( TQWidget * parent, const char * name )
: KListView( parent, name )
{
setFullWidth( true );
@@ -114,7 +114,7 @@ namespace KMail {
setSelectionModeExt( Single ); // ### Extended would be nicer...
}
- void IdentityListView::rename( QListViewItem * i, int col ) {
+ void IdentityListView::rename( TQListViewItem * i, int col ) {
if ( col == 0 && isRenameable( col ) ) {
IdentityListViewItem * item = dynamic_cast<IdentityListViewItem*>( i );
if ( item ) {
@@ -126,12 +126,12 @@ namespace KMail {
KListView::rename( i, col );
}
- bool IdentityListView::acceptDrag( QDropEvent * e ) const {
+ bool IdentityListView::acceptDrag( TQDropEvent * e ) const {
// disallow moving:
return e->source() != viewport() && IdentityDrag::canDecode( e );
}
- QDragObject * IdentityListView::dragObject() {
+ TQDragObject * IdentityListView::dragObject() {
IdentityListViewItem * item = dynamic_cast<IdentityListViewItem*>( currentItem() );
if ( !item ) return 0;
diff --git a/kmail/identitylistview.h b/kmail/identitylistview.h
index 7269237ec..6b8e36e24 100644
--- a/kmail/identitylistview.h
+++ b/kmail/identitylistview.h
@@ -42,14 +42,14 @@ namespace KMail {
class IdentityListView;
- /** @short A QListViewItem for use in IdentityListView
+ /** @short A TQListViewItem for use in IdentityListView
@author Marc Mutz <mutz@kde.org>
**/
class IdentityListViewItem : public KListViewItem {
public:
IdentityListViewItem( IdentityListView * parent,
const KPIM::Identity & ident );
- IdentityListViewItem( IdentityListView * parent, QListViewItem * after,
+ IdentityListViewItem( IdentityListView * parent, TQListViewItem * after,
const KPIM::Identity & ident );
uint uoid() const { return mUOID; }
@@ -69,15 +69,15 @@ namespace KMail {
class IdentityListView : public KListView {
Q_OBJECT
public:
- IdentityListView( QWidget * parent=0, const char * name=0 );
+ IdentityListView( TQWidget * parent=0, const char * name=0 );
virtual ~IdentityListView() {}
public slots:
- void rename( QListViewItem *, int );
+ void rename( TQListViewItem *, int );
protected:
- bool acceptDrag( QDropEvent * ) const;
- QDragObject * dragObject();
+ bool acceptDrag( TQDropEvent * ) const;
+ TQDragObject * dragObject();
};
diff --git a/kmail/imapaccountbase.cpp b/kmail/imapaccountbase.cpp
index 9a04c3fd6..778403988 100644
--- a/kmail/imapaccountbase.cpp
+++ b/kmail/imapaccountbase.cpp
@@ -66,8 +66,8 @@ using KIO::PasswordDialog;
#include <mimelib/message.h>
//using KIO::Scheduler; // use FQN below
-#include <qregexp.h>
-#include <qstylesheet.h>
+#include <tqregexp.h>
+#include <tqstylesheet.h>
namespace KMail {
@@ -79,7 +79,7 @@ namespace KMail {
//
//
- ImapAccountBase::ImapAccountBase( AccountManager * parent, const QString & name, uint id )
+ ImapAccountBase::ImapAccountBase( AccountManager * parent, const TQString & name, uint id )
: NetworkAccount( parent, name, id ),
mIdleTimer( 0, "mIdleTimer" ),
mNoopTimer( 0, "mNoopTimer" ),
@@ -105,12 +105,12 @@ namespace KMail {
{
mPort = imapDefaultPort;
mBodyPartList.setAutoDelete(true);
- KIO::Scheduler::connect(SIGNAL(slaveError(KIO::Slave *, int, const QString &)),
- this, SLOT(slotSchedulerSlaveError(KIO::Slave *, int, const QString &)));
- KIO::Scheduler::connect(SIGNAL(slaveConnected(KIO::Slave *)),
- this, SLOT(slotSchedulerSlaveConnected(KIO::Slave *)));
- connect(&mNoopTimer, SIGNAL(timeout()), SLOT(slotNoopTimeout()));
- connect(&mIdleTimer, SIGNAL(timeout()), SLOT(slotIdleTimeout()));
+ KIO::Scheduler::connect(TQT_SIGNAL(slaveError(KIO::Slave *, int, const TQString &)),
+ this, TQT_SLOT(slotSchedulerSlaveError(KIO::Slave *, int, const TQString &)));
+ KIO::Scheduler::connect(TQT_SIGNAL(slaveConnected(KIO::Slave *)),
+ this, TQT_SLOT(slotSchedulerSlaveConnected(KIO::Slave *)));
+ connect(&mNoopTimer, TQT_SIGNAL(timeout()), TQT_SLOT(slotNoopTimeout()));
+ connect(&mIdleTimer, TQT_SIGNAL(timeout()), TQT_SLOT(slotIdleTimeout()));
}
ImapAccountBase::~ImapAccountBase() {
@@ -149,7 +149,7 @@ namespace KMail {
return imapDefaultPort;
}
- QString ImapAccountBase::protocol() const {
+ TQString ImapAccountBase::protocol() const {
return useSSL() ? IMAP_SSL_PROTOCOL : IMAP_PROTOCOL;
}
@@ -200,13 +200,13 @@ namespace KMail {
setListOnlyOpenFolders( config.readBoolEntry( "listOnlyOpenFolders", false ) );
// read namespaces
nsMap map;
- QStringList list = config.readListEntry( QString::number( PersonalNS ) );
+ TQStringList list = config.readListEntry( TQString::number( PersonalNS ) );
if ( !list.isEmpty() )
map[PersonalNS] = list.gres( "\"", "" );
- list = config.readListEntry( QString::number( OtherUsersNS ) );
+ list = config.readListEntry( TQString::number( OtherUsersNS ) );
if ( !list.isEmpty() )
map[OtherUsersNS] = list.gres( "\"", "" );
- list = config.readListEntry( QString::number( SharedNS ) );
+ list = config.readListEntry( TQString::number( SharedNS ) );
if ( !list.isEmpty() )
map[SharedNS] = list.gres( "\"", "" );
setNamespaces( map );
@@ -216,7 +216,7 @@ namespace KMail {
for ( namespaceDelim::ConstIterator it = entries.begin();
it != entries.end(); ++it ) {
if ( it.key().startsWith( "Namespace:" ) ) {
- QString key = it.key().right( it.key().length() - 10 );
+ TQString key = it.key().right( it.key().length() - 10 );
namespaceToDelimiter[key] = it.data();
}
}
@@ -237,14 +237,14 @@ namespace KMail {
config.writeEntry( "locally-subscribed-folders", onlyLocallySubscribedFolders() );
config.writeEntry( "loadondemand", loadOnDemand() );
config.writeEntry( "listOnlyOpenFolders", listOnlyOpenFolders() );
- QString data;
+ TQString data;
for ( nsMap::Iterator it = mNamespaces.begin(); it != mNamespaces.end(); ++it ) {
if ( !it.data().isEmpty() ) {
data = "\"" + it.data().join("\",\"") + "\"";
- config.writeEntry( QString::number( it.key() ), data );
+ config.writeEntry( TQString::number( it.key() ), data );
}
}
- QString key;
+ TQString key;
for ( namespaceDelim::ConstIterator it = mNamespaceToDelimiter.begin();
it != mNamespaceToDelimiter.end(); ++it ) {
key = "Namespace:" + it.key();
@@ -280,15 +280,15 @@ namespace KMail {
auth() != "GSSAPI" ) ) {
Q_ASSERT( !mSlave ); // disconnected on 'wrong login' error already, or first try
- QString log = login();
- QString pass = passwd();
+ TQString log = login();
+ TQString pass = passwd();
// We init "store" to true to indicate that we want to have the
// "keep password" checkbox. Then, we set [Passwords]Keep to
// storePasswd(), so that the checkbox in the dialog will be
// init'ed correctly:
KConfigGroup passwords( KGlobal::config(), "Passwords" );
passwords.writeEntry( "Keep", storePasswd() );
- QString msg = i18n("You need to supply a username and a password to "
+ TQString msg = i18n("You need to supply a username and a password to "
"access this mailbox.");
mPasswordDialogIsActive = true;
@@ -296,10 +296,10 @@ namespace KMail {
dlg.setPlainCaption( i18n("Authorization Dialog") );
dlg.addCommentLine( i18n("Account:"), name() );
int ret = dlg.exec();
- if (ret != QDialog::Accepted ) {
+ if (ret != TQDialog::Accepted ) {
mPasswordDialogIsActive = false;
mAskAgain = false;
- emit connectionResult( KIO::ERR_USER_CANCELED, QString::null );
+ emit connectionResult( KIO::ERR_USER_CANCELED, TQString::null );
return Error;
}
mPasswordDialogIsActive = false;
@@ -327,7 +327,7 @@ namespace KMail {
return Connecting;
}
- bool ImapAccountBase::handleJobError( KIO::Job *job, const QString& context, bool abortSync )
+ bool ImapAccountBase::handleJobError( KIO::Job *job, const TQString& context, bool abortSync )
{
JobIterator it = findJob( job );
if ( it != jobsEnd() && (*it).progressItem )
@@ -357,14 +357,14 @@ namespace KMail {
}
//-----------------------------------------------------------------------------
- void ImapAccountBase::changeSubscription( bool subscribe, const QString& imapPath )
+ void ImapAccountBase::changeSubscription( bool subscribe, const TQString& imapPath )
{
// change the subscription of the folder
KURL url = getUrl();
url.setPath(imapPath);
- QByteArray packedArgs;
- QDataStream stream( packedArgs, IO_WriteOnly);
+ TQByteArray packedArgs;
+ TQDataStream stream( packedArgs, IO_WriteOnly);
if (subscribe)
stream << (int) 'u' << url;
@@ -382,8 +382,8 @@ namespace KMail {
else jd.onlySubscribed = false;
insertJob(job, jd);
- connect(job, SIGNAL(result(KIO::Job *)),
- SLOT(slotSubscriptionResult(KIO::Job *)));
+ connect(job, TQT_SIGNAL(result(KIO::Job *)),
+ TQT_SLOT(slotSubscriptionResult(KIO::Job *)));
}
//-----------------------------------------------------------------------------
@@ -393,7 +393,7 @@ namespace KMail {
JobIterator it = findJob( job );
if ( it == jobsEnd() ) return;
bool onlySubscribed = (*it).onlySubscribed;
- QString path = static_cast<KIO::SimpleJob*>(job)->url().path();
+ TQString path = static_cast<KIO::SimpleJob*>(job)->url().path();
if (job->error())
{
handleJobError( job, i18n( "Error while trying to subscribe to %1:" ).arg( path ) + '\n' );
@@ -408,7 +408,7 @@ namespace KMail {
//-----------------------------------------------------------------------------
// TODO imapPath can be removed once parent can be a KMFolderImapBase or whatever
- void ImapAccountBase::getUserRights( KMFolder* parent, const QString& imapPath )
+ void ImapAccountBase::getUserRights( KMFolder* parent, const TQString& imapPath )
{
// There isn't much point in asking the server about a user's rights on his own inbox,
// it might not be the effective permissions (at least with Cyrus, one can admin his own inbox,
@@ -432,8 +432,8 @@ namespace KMail {
jd.cancellable = true;
insertJob(job, jd);
- connect(job, SIGNAL(result(KIO::Job *)),
- SLOT(slotGetUserRightsResult(KIO::Job *)));
+ connect(job, TQT_SIGNAL(result(KIO::Job *)),
+ TQT_SLOT(slotGetUserRightsResult(KIO::Job *)));
}
void ImapAccountBase::slotGetUserRightsResult( KIO::Job* _job )
@@ -463,7 +463,7 @@ namespace KMail {
}
//-----------------------------------------------------------------------------
- void ImapAccountBase::getACL( KMFolder* parent, const QString& imapPath )
+ void ImapAccountBase::getACL( KMFolder* parent, const TQString& imapPath )
{
KURL url = getUrl();
url.setPath(imapPath);
@@ -473,8 +473,8 @@ namespace KMail {
jd.cancellable = true;
insertJob(job, jd);
- connect(job, SIGNAL(result(KIO::Job *)),
- SLOT(slotGetACLResult(KIO::Job *)));
+ connect(job, TQT_SIGNAL(result(KIO::Job *)),
+ TQT_SLOT(slotGetACLResult(KIO::Job *)));
}
void ImapAccountBase::slotGetACLResult( KIO::Job* _job )
@@ -490,7 +490,7 @@ namespace KMail {
//-----------------------------------------------------------------------------
// Do not remove imapPath, FolderDiaQuotaTab needs to call this with parent==0.
- void ImapAccountBase::getStorageQuotaInfo( KMFolder* parent, const QString& imapPath )
+ void ImapAccountBase::getStorageQuotaInfo( KMFolder* parent, const TQString& imapPath )
{
if ( !mSlave ) return;
KURL url = getUrl();
@@ -501,8 +501,8 @@ namespace KMail {
jd.cancellable = true;
insertJob(job, jd);
- connect(job, SIGNAL(result(KIO::Job *)),
- SLOT(slotGetStorageQuotaInfoResult(KIO::Job *)));
+ connect(job, TQT_SIGNAL(result(KIO::Job *)),
+ TQT_SLOT(slotGetStorageQuotaInfoResult(KIO::Job *)));
}
void ImapAccountBase::slotGetStorageQuotaInfoResult( KIO::Job* _job )
@@ -521,15 +521,15 @@ namespace KMail {
void ImapAccountBase::slotNoopTimeout()
{
if ( mSlave ) {
- QByteArray packedArgs;
- QDataStream stream( packedArgs, IO_WriteOnly );
+ TQByteArray packedArgs;
+ TQDataStream stream( packedArgs, IO_WriteOnly );
stream << ( int ) 'N';
KIO::SimpleJob *job = KIO::special( getUrl(), packedArgs, false );
KIO::Scheduler::assignJobToSlave(mSlave, job);
- connect( job, SIGNAL(result( KIO::Job * ) ),
- this, SLOT( slotSimpleResult( KIO::Job * ) ) );
+ connect( job, TQT_SIGNAL(result( KIO::Job * ) ),
+ this, TQT_SLOT( slotSimpleResult( KIO::Job * ) ) );
} else {
/* Stop the timer, we have disconnected. We have to make sure it is
started again when a new slave appears. */
@@ -559,10 +559,10 @@ namespace KMail {
//-----------------------------------------------------------------------------
void ImapAccountBase::slotSchedulerSlaveError(KIO::Slave *aSlave, int errorCode,
- const QString &errorMsg)
+ const TQString &errorMsg)
{
if (aSlave != mSlave) return;
- handleError( errorCode, errorMsg, 0, QString::null, true );
+ handleError( errorCode, errorMsg, 0, TQString::null, true );
if ( mAskAgain )
if ( makeConnection() != ImapAccountBase::Error )
return;
@@ -585,81 +585,81 @@ namespace KMail {
if (aSlave != mSlave) return;
mSlaveConnected = true;
mNoopTimer.start( 60000 ); // make sure we start sending noops
- emit connectionResult( 0, QString::null ); // success
+ emit connectionResult( 0, TQString::null ); // success
if ( mNamespaces.isEmpty() || mNamespaceToDelimiter.isEmpty() ) {
- connect( this, SIGNAL( namespacesFetched( const ImapAccountBase::nsDelimMap& ) ),
- this, SLOT( slotSaveNamespaces( const ImapAccountBase::nsDelimMap& ) ) );
+ connect( this, TQT_SIGNAL( namespacesFetched( const ImapAccountBase::nsDelimMap& ) ),
+ this, TQT_SLOT( slotSaveNamespaces( const ImapAccountBase::nsDelimMap& ) ) );
getNamespaces();
}
// get capabilities
- QByteArray packedArgs;
- QDataStream stream( packedArgs, IO_WriteOnly);
+ TQByteArray packedArgs;
+ TQDataStream stream( packedArgs, IO_WriteOnly);
stream << (int) 'c';
KIO::SimpleJob *job = KIO::special( getUrl(), packedArgs, false );
KIO::Scheduler::assignJobToSlave( mSlave, job );
- connect( job, SIGNAL(infoMessage(KIO::Job*, const QString&)),
- SLOT(slotCapabilitiesResult(KIO::Job*, const QString&)) );
+ connect( job, TQT_SIGNAL(infoMessage(KIO::Job*, const TQString&)),
+ TQT_SLOT(slotCapabilitiesResult(KIO::Job*, const TQString&)) );
}
//-----------------------------------------------------------------------------
- void ImapAccountBase::slotCapabilitiesResult( KIO::Job*, const QString& result )
+ void ImapAccountBase::slotCapabilitiesResult( KIO::Job*, const TQString& result )
{
- mCapabilities = QStringList::split(' ', result.lower() );
+ mCapabilities = TQStringList::split(' ', result.lower() );
kdDebug(5006) << "capabilities:" << mCapabilities << endl;
}
//-----------------------------------------------------------------------------
void ImapAccountBase::getNamespaces()
{
- disconnect( this, SIGNAL( connectionResult(int, const QString&) ),
- this, SLOT( getNamespaces() ) );
+ disconnect( this, TQT_SIGNAL( connectionResult(int, const TQString&) ),
+ this, TQT_SLOT( getNamespaces() ) );
if ( makeConnection() != Connected || !mSlave ) {
kdDebug(5006) << "getNamespaces - wait for connection" << endl;
if ( mNamespaces.isEmpty() || mNamespaceToDelimiter.isEmpty() ) {
// when the connection is established slotSchedulerSlaveConnected notifies us
} else {
// getNamespaces was called by someone else
- connect( this, SIGNAL( connectionResult(int, const QString&) ),
- this, SLOT( getNamespaces() ) );
+ connect( this, TQT_SIGNAL( connectionResult(int, const TQString&) ),
+ this, TQT_SLOT( getNamespaces() ) );
}
return;
}
- QByteArray packedArgs;
- QDataStream stream( packedArgs, IO_WriteOnly);
+ TQByteArray packedArgs;
+ TQDataStream stream( packedArgs, IO_WriteOnly);
stream << (int) 'n';
jobData jd;
jd.total = 1; jd.done = 0; jd.cancellable = true;
jd.progressItem = ProgressManager::createProgressItem(
ProgressManager::getUniqueID(),
i18n("Retrieving Namespaces"),
- QString::null, true, useSSL() || useTLS() );
+ TQString::null, true, useSSL() || useTLS() );
jd.progressItem->setTotalItems( 1 );
connect ( jd.progressItem,
- SIGNAL( progressItemCanceled( KPIM::ProgressItem* ) ),
+ TQT_SIGNAL( progressItemCanceled( KPIM::ProgressItem* ) ),
this,
- SLOT( slotAbortRequested( KPIM::ProgressItem* ) ) );
+ TQT_SLOT( slotAbortRequested( KPIM::ProgressItem* ) ) );
KIO::SimpleJob *job = KIO::special( getUrl(), packedArgs, false );
KIO::Scheduler::assignJobToSlave( mSlave, job );
insertJob( job, jd );
- connect( job, SIGNAL( infoMessage(KIO::Job*, const QString&) ),
- SLOT( slotNamespaceResult(KIO::Job*, const QString&) ) );
+ connect( job, TQT_SIGNAL( infoMessage(KIO::Job*, const TQString&) ),
+ TQT_SLOT( slotNamespaceResult(KIO::Job*, const TQString&) ) );
}
//-----------------------------------------------------------------------------
- void ImapAccountBase::slotNamespaceResult( KIO::Job* job, const QString& str )
+ void ImapAccountBase::slotNamespaceResult( KIO::Job* job, const TQString& str )
{
JobIterator it = findJob( job );
if ( it == jobsEnd() ) return;
nsDelimMap map;
namespaceDelim nsDelim;
- QStringList ns = QStringList::split( ",", str );
- for ( QStringList::Iterator it = ns.begin(); it != ns.end(); ++it ) {
+ TQStringList ns = TQStringList::split( ",", str );
+ for ( TQStringList::Iterator it = ns.begin(); it != ns.end(); ++it ) {
// split, allow empty parts as we can get empty namespaces
- QStringList parts = QStringList::split( "=", *it, true );
+ TQStringList parts = TQStringList::split( "=", *it, true );
imapNamespace section = imapNamespace( parts[0].toInt() );
if ( map.contains( section ) ) {
nsDelim = map[section];
@@ -687,7 +687,7 @@ namespace KMail {
imapNamespace section = imapNamespace( i );
namespaceDelim ns = map[ section ];
namespaceDelim::ConstIterator it;
- QStringList list;
+ TQStringList list;
for ( it = ns.begin(); it != ns.end(); ++it ) {
list += it.key();
mNamespaceToDelimiter[ it.key() ] = it.data();
@@ -714,9 +714,9 @@ namespace KMail {
if ( mOldPrefix.endsWith("/") ) {
mOldPrefix = mOldPrefix.left( mOldPrefix.length()-1 );
}
- QStringList list = mNamespaces[PersonalNS];
+ TQStringList list = mNamespaces[PersonalNS];
bool done = false;
- for ( QStringList::Iterator it = list.begin(); it != list.end(); ++it ) {
+ for ( TQStringList::Iterator it = list.begin(); it != list.end(); ++it ) {
if ( (*it).startsWith( mOldPrefix ) ) {
// should be ok
done = true;
@@ -725,7 +725,7 @@ namespace KMail {
}
}
if ( !done ) {
- QString msg = i18n("KMail has detected a prefix entry in the "
+ TQString msg = i18n("KMail has detected a prefix entry in the "
"configuration of the account \"%1\" which is obsolete with the "
"support of IMAP namespaces.").arg( name() );
if ( list.contains( "" ) ) {
@@ -734,7 +734,7 @@ namespace KMail {
list += mOldPrefix;
mNamespaces[PersonalNS] = list;
if ( mNamespaceToDelimiter.contains( "" ) ) {
- QString delim = mNamespaceToDelimiter[""];
+ TQString delim = mNamespaceToDelimiter[""];
mNamespaceToDelimiter.remove( "" );
mNamespaceToDelimiter[mOldPrefix] = delim;
}
@@ -743,12 +743,12 @@ namespace KMail {
"your account configuration.");
} else if ( list.count() == 1 ) {
// only one entry in the personal namespace so replace it
- QString old = list.first();
+ TQString old = list.first();
list.clear();
list += mOldPrefix;
mNamespaces[PersonalNS] = list;
if ( mNamespaceToDelimiter.contains( old ) ) {
- QString delim = mNamespaceToDelimiter[old];
+ TQString delim = mNamespaceToDelimiter[old];
mNamespaceToDelimiter.remove( old );
mNamespaceToDelimiter[mOldPrefix] = delim;
}
@@ -770,9 +770,9 @@ namespace KMail {
}
//-----------------------------------------------------------------------------
- QString ImapAccountBase::namespaceForFolder( FolderStorage* storage )
+ TQString ImapAccountBase::namespaceForFolder( FolderStorage* storage )
{
- QString path;
+ TQString path;
if ( storage->folderType() == KMFolderTypeImap ) {
path = static_cast<KMFolderImap*>( storage )->imapPath();
} else if ( storage->folderType() == KMFolderTypeCachedImap ) {
@@ -782,10 +782,10 @@ namespace KMail {
nsMap::Iterator it;
for ( it = mNamespaces.begin(); it != mNamespaces.end(); ++it )
{
- QStringList::Iterator strit;
+ TQStringList::Iterator strit;
for ( strit = it.data().begin(); strit != it.data().end(); ++strit )
{
- QString ns = *strit;
+ TQString ns = *strit;
if ( ns.endsWith("/") || ns.endsWith(".") ) {
// strip delimiter for the comparison
ns = ns.left( ns.length()-1 );
@@ -796,11 +796,11 @@ namespace KMail {
}
}
}
- return QString::null;
+ return TQString::null;
}
//-----------------------------------------------------------------------------
- QString ImapAccountBase::delimiterForNamespace( const QString& prefix )
+ TQString ImapAccountBase::delimiterForNamespace( const TQString& prefix )
{
kdDebug(5006) << "delimiterForNamespace " << prefix << endl;
// try to match exactly
@@ -814,7 +814,7 @@ namespace KMail {
it != mNamespaceToDelimiter.end(); ++it ) {
// the namespace definition sometimes contains the delimiter
// make sure we also match this version
- QString stripped = it.key().left( it.key().length() - 1 );
+ TQString stripped = it.key().left( it.key().length() - 1 );
if ( !it.key().isEmpty() &&
( prefix.contains( it.key() ) || prefix.contains( stripped ) ) ) {
return it.data();
@@ -827,14 +827,14 @@ namespace KMail {
}
// well, we tried
kdDebug(5006) << "delimiterForNamespace - not found" << endl;
- return QString::null;
+ return TQString::null;
}
//-----------------------------------------------------------------------------
- QString ImapAccountBase::delimiterForFolder( FolderStorage* storage )
+ TQString ImapAccountBase::delimiterForFolder( FolderStorage* storage )
{
- QString prefix = namespaceForFolder( storage );
- QString delim = delimiterForNamespace( prefix );
+ TQString prefix = namespaceForFolder( storage );
+ TQString delim = delimiterForNamespace( prefix );
return delim;
}
@@ -850,7 +850,7 @@ namespace KMail {
}
if (job->error()) {
if (!quiet)
- handleJobError(job, QString::null );
+ handleJobError(job, TQString::null );
else {
if ( job->error() == KIO::ERR_CONNECTION_BROKEN && slave() ) {
// make sure ERR_CONNECTION_BROKEN is properly handled and the slave
@@ -871,25 +871,25 @@ namespace KMail {
KMMessage* msg = jd.msgList.first();
// Use double-quotes around the subject to keep the sentence readable,
// but don't use double quotes around the sender since from() might return a double-quoted name already
- const QString subject = msg->subject().isEmpty() ? i18n( "<unknown>" ) : QString("\"%1\"").arg( msg->subject() );
- const QString from = msg->from().isEmpty() ? i18n( "<unknown>" ) : msg->from();
- QString myError = "<p><b>" + i18n("Error while uploading message")
+ const TQString subject = msg->subject().isEmpty() ? i18n( "<unknown>" ) : TQString("\"%1\"").arg( msg->subject() );
+ const TQString from = msg->from().isEmpty() ? i18n( "<unknown>" ) : msg->from();
+ TQString myError = "<p><b>" + i18n("Error while uploading message")
+ "</b></p><p>"
- + i18n("Could not upload the message dated %1 from <i>%2</i> with subject <i>%3</i> to the server.").arg( msg->dateStr(), QStyleSheet::escape( from ), QStyleSheet::escape( subject ) )
+ + i18n("Could not upload the message dated %1 from <i>%2</i> with subject <i>%3</i> to the server.").arg( msg->dateStr(), TQStyleSheet::escape( from ), TQStyleSheet::escape( subject ) )
+ "</p><p>"
- + i18n("The destination folder was: <b>%1</b>.").arg( QStyleSheet::escape( folder->prettyURL() ) )
+ + i18n("The destination folder was: <b>%1</b>.").arg( TQStyleSheet::escape( folder->prettyURL() ) )
+ "</p><p>"
+ i18n("The server reported:") + "</p>";
return handleJobError( job, myError );
}
- QString ImapAccountBase::prettifyQuotaError( const QString& _error, KIO::Job * job )
+ TQString ImapAccountBase::prettifyQuotaError( const TQString& _error, KIO::Job * job )
{
- QString error = _error;
+ TQString error = _error;
if ( error.find( "quota", 0, false ) == -1 ) return error;
// this is a quota error, prettify it a bit
JobIterator it = findJob( job );
- QString quotaAsString( i18n("No detailed quota information available.") );
+ TQString quotaAsString( i18n("No detailed quota information available.") );
bool readOnly = false;
if (it != mapJobData.end()) {
const KMFolder * const folder = (*it).parent;
@@ -909,10 +909,10 @@ namespace KMail {
}
//-----------------------------------------------------------------------------
- bool ImapAccountBase::handleError( int errorCode, const QString &errorMsg, KIO::Job* job, const QString& context, bool abortSync )
+ bool ImapAccountBase::handleError( int errorCode, const TQString &errorMsg, KIO::Job* job, const TQString& context, bool abortSync )
{
// Copy job's data before a possible killAllJobs
- QStringList errors;
+ TQStringList errors;
if ( job && job->error() != KIO::ERR_SLAVE_DEFINED /*workaround for kdelibs-3.2*/)
errors = job->detailedErrorStrings();
@@ -943,8 +943,8 @@ namespace KMail {
// check if we still display an error
if ( !mErrorDialogIsActive && errorCode != KIO::ERR_USER_CANCELED ) {
mErrorDialogIsActive = true;
- QString msg = context + '\n' + prettifyQuotaError( KIO::buildErrorString( errorCode, errorMsg ), job );
- QString caption = i18n("Error");
+ TQString msg = context + '\n' + prettifyQuotaError( KIO::buildErrorString( errorCode, errorMsg ), job );
+ TQString caption = i18n("Error");
if ( jobsKilled || errorCode == KIO::ERR_COULD_NOT_LOGIN ) {
if ( errorCode == KIO::ERR_SERVER_TIMEOUT || errorCode == KIO::ERR_CONNECTION_BROKEN ) {
@@ -966,8 +966,8 @@ namespace KMail {
}
} else { // i.e. we have a chance to continue, ask the user about it
if ( errors.count() >= 3 ) { // there is no detailedWarningContinueCancel... (#86517)
- QString error = prettifyQuotaError( errors[1], job );
- msg = QString( "<qt>") + context + error + '\n' + errors[2];
+ TQString error = prettifyQuotaError( errors[1], job );
+ msg = TQString( "<qt>") + context + error + '\n' + errors[2];
caption = errors[0];
}
int ret = KMessageBox::warningContinueCancel( kapp->activeWindow(), msg, caption );
@@ -989,12 +989,12 @@ namespace KMail {
//-----------------------------------------------------------------------------
void ImapAccountBase::cancelMailCheck()
{
- QMap<KIO::Job*, jobData>::Iterator it = mapJobData.begin();
+ TQMap<KIO::Job*, jobData>::Iterator it = mapJobData.begin();
while ( it != mapJobData.end() ) {
kdDebug(5006) << "cancelMailCheck: job is cancellable: " << (*it).cancellable << endl;
if ( (*it).cancellable ) {
it.key()->kill();
- QMap<KIO::Job*, jobData>::Iterator rmit = it;
+ TQMap<KIO::Job*, jobData>::Iterator rmit = it;
++it;
mapJobData.remove( rmit );
// We killed a job -> this kills the slave
@@ -1003,7 +1003,7 @@ namespace KMail {
++it;
}
- for( QPtrListIterator<FolderJob> it( mJobList ); it.current(); ++it ) {
+ for( TQPtrListIterator<FolderJob> it( mJobList ); it.current(); ++it ) {
if ( it.current()->isCancellable() ) {
FolderJob* job = it.current();
job->setPassiveDestructor( true );
@@ -1023,10 +1023,10 @@ namespace KMail {
mCheckingSingleFolder = true;
if ( checkingMail() )
{
- disconnect( this, SIGNAL( finishedCheck( bool, CheckStatus ) ),
- this, SLOT( slotCheckQueuedFolders() ) );
- connect( this, SIGNAL( finishedCheck( bool, CheckStatus ) ),
- this, SLOT( slotCheckQueuedFolders() ) );
+ disconnect( this, TQT_SIGNAL( finishedCheck( bool, CheckStatus ) ),
+ this, TQT_SLOT( slotCheckQueuedFolders() ) );
+ connect( this, TQT_SIGNAL( finishedCheck( bool, CheckStatus ) ),
+ this, TQT_SLOT( slotCheckQueuedFolders() ) );
} else {
slotCheckQueuedFolders();
}
@@ -1035,10 +1035,10 @@ namespace KMail {
//-----------------------------------------------------------------------------
void ImapAccountBase::slotCheckQueuedFolders()
{
- disconnect( this, SIGNAL( finishedCheck( bool, CheckStatus ) ),
- this, SLOT( slotCheckQueuedFolders() ) );
+ disconnect( this, TQT_SIGNAL( finishedCheck( bool, CheckStatus ) ),
+ this, TQT_SLOT( slotCheckQueuedFolders() ) );
- QValueList<QGuardedPtr<KMFolder> > mSaveList = mMailCheckFolders;
+ TQValueList<TQGuardedPtr<KMFolder> > mSaveList = mMailCheckFolders;
mMailCheckFolders = mFoldersQueuedForChecking;
if ( kmkernel->acctMgr() )
kmkernel->acctMgr()->singleCheckMail(this, true);
@@ -1055,7 +1055,7 @@ namespace KMail {
}
//-----------------------------------------------------------------------------
- void ImapAccountBase::handleBodyStructure( QDataStream & stream, KMMessage * msg,
+ void ImapAccountBase::handleBodyStructure( TQDataStream & stream, KMMessage * msg,
const AttachmentStrategy *as )
{
mBodyPartList.clear();
@@ -1076,9 +1076,9 @@ namespace KMail {
// see what parts have to loaded according to attachmentstrategy
BodyVisitor *visitor = BodyVisitorFactory::getVisitor( as );
visitor->visit( mBodyPartList );
- QPtrList<KMMessagePart> parts = visitor->partsToLoad();
+ TQPtrList<KMMessagePart> parts = visitor->partsToLoad();
delete visitor;
- QPtrListIterator<KMMessagePart> it( parts );
+ TQPtrListIterator<KMMessagePart> it( parts );
KMMessagePart *part;
int partsToLoad = 0;
// check how many parts we have to load
@@ -1130,7 +1130,7 @@ namespace KMail {
}
//-----------------------------------------------------------------------------
- void ImapAccountBase::constructParts( QDataStream & stream, int count, KMMessagePart* parentKMPart,
+ void ImapAccountBase::constructParts( TQDataStream & stream, int count, KMMessagePart* parentKMPart,
DwBodyPart * parent, const DwMessage * dwmsg )
{
int children;
@@ -1186,15 +1186,15 @@ namespace KMail {
}
//-----------------------------------------------------------------------------
- void ImapAccountBase::setImapStatus( KMFolder* folder, const QString& path, const QCString& flags )
+ void ImapAccountBase::setImapStatus( KMFolder* folder, const TQString& path, const TQCString& flags )
{
// set the status on the server, the uids are integrated in the path
kdDebug(5006) << "setImapStatus path=" << path << " to: " << flags << endl;
KURL url = getUrl();
url.setPath(path);
- QByteArray packedArgs;
- QDataStream stream( packedArgs, IO_WriteOnly);
+ TQByteArray packedArgs;
+ TQDataStream stream( packedArgs, IO_WriteOnly);
stream << (int) 'S' << url << flags;
@@ -1206,17 +1206,17 @@ namespace KMail {
ImapAccountBase::jobData jd( url.url(), folder );
jd.path = path;
insertJob(job, jd);
- connect(job, SIGNAL(result(KIO::Job *)),
- SLOT(slotSetStatusResult(KIO::Job *)));
+ connect(job, TQT_SIGNAL(result(KIO::Job *)),
+ TQT_SLOT(slotSetStatusResult(KIO::Job *)));
}
- void ImapAccountBase::setImapSeenStatus(KMFolder * folder, const QString & path, bool seen)
+ void ImapAccountBase::setImapSeenStatus(KMFolder * folder, const TQString & path, bool seen)
{
KURL url = getUrl();
url.setPath(path);
- QByteArray packedArgs;
- QDataStream stream( packedArgs, IO_WriteOnly);
+ TQByteArray packedArgs;
+ TQDataStream stream( packedArgs, IO_WriteOnly);
stream << (int) 's' << url << seen;
@@ -1228,8 +1228,8 @@ namespace KMail {
ImapAccountBase::jobData jd( url.url(), folder );
jd.path = path;
insertJob(job, jd);
- connect(job, SIGNAL(result(KIO::Job *)),
- SLOT(slotSetStatusResult(KIO::Job *)));
+ connect(job, TQT_SIGNAL(result(KIO::Job *)),
+ TQT_SLOT(slotSetStatusResult(KIO::Job *)));
}
//-----------------------------------------------------------------------------
@@ -1239,7 +1239,7 @@ namespace KMail {
if ( it == jobsEnd() ) return;
int errorCode = job->error();
KMFolder * const parent = (*it).parent;
- const QString path = (*it).path;
+ const TQString path = (*it).path;
if (errorCode && errorCode != KIO::ERR_CANNOT_OPEN_FOR_WRITING)
{
bool cont = handleJobError( job, i18n( "Error while uploading status of messages to server: " ) + '\n' );
@@ -1286,14 +1286,14 @@ namespace KMail {
{
mListDirProgressItem = ProgressManager::createProgressItem(
"ListDir" + name(),
- QStyleSheet::escape( name() ),
+ TQStyleSheet::escape( name() ),
i18n("retrieving folders"),
true,
useSSL() || useTLS() );
connect ( mListDirProgressItem,
- SIGNAL( progressItemCanceled( KPIM::ProgressItem* ) ),
+ TQT_SIGNAL( progressItemCanceled( KPIM::ProgressItem* ) ),
this,
- SLOT( slotAbortRequested( KPIM::ProgressItem* ) ) );
+ TQT_SLOT( slotAbortRequested( KPIM::ProgressItem* ) ) );
// Start with a guessed value of the old folder count plus 5%. As long
// as the list of folders doesn't constantly change, that should be good
// enough.
@@ -1312,9 +1312,9 @@ namespace KMail {
}
//------------------------------------------------------------------------------
- QString ImapAccountBase::addPathToNamespace( const QString& prefix )
+ TQString ImapAccountBase::addPathToNamespace( const TQString& prefix )
{
- QString myPrefix = prefix;
+ TQString myPrefix = prefix;
if ( !myPrefix.startsWith( "/" ) ) {
myPrefix = "/" + myPrefix;
}
@@ -1326,13 +1326,13 @@ namespace KMail {
}
//------------------------------------------------------------------------------
- bool ImapAccountBase::isNamespaceFolder( QString& name )
+ bool ImapAccountBase::isNamespaceFolder( TQString& name )
{
- QStringList ns = mNamespaces[OtherUsersNS];
+ TQStringList ns = mNamespaces[OtherUsersNS];
ns += mNamespaces[SharedNS];
ns += mNamespaces[PersonalNS];
- QString nameWithDelimiter;
- for ( QStringList::Iterator it = ns.begin(); it != ns.end(); ++it )
+ TQString nameWithDelimiter;
+ for ( TQStringList::Iterator it = ns.begin(); it != ns.end(); ++it )
{
nameWithDelimiter = name + delimiterForNamespace( *it );
if ( *it == name || *it == nameWithDelimiter )
@@ -1349,9 +1349,9 @@ namespace KMail {
for ( uint i = 0; i < 3; ++i )
{
imapNamespace section = imapNamespace( i );
- QStringList namespaces = mNamespaces[section];
+ TQStringList namespaces = mNamespaces[section];
namespaceDelim nsDelim;
- QStringList::Iterator lit;
+ TQStringList::Iterator lit;
for ( lit = namespaces.begin(); lit != namespaces.end(); ++lit )
{
nsDelim[*lit] = delimiterForNamespace( *lit );
@@ -1362,17 +1362,17 @@ namespace KMail {
}
//------------------------------------------------------------------------------
- QString ImapAccountBase::createImapPath( const QString& parent,
- const QString& folderName )
+ TQString ImapAccountBase::createImapPath( const TQString& parent,
+ const TQString& folderName )
{
kdDebug(5006) << "createImapPath parent="<<parent<<", folderName="<<folderName<<endl;
- QString newName = parent;
+ TQString newName = parent;
// strip / at the end
if ( newName.endsWith("/") ) {
newName = newName.left( newName.length() - 1 );
}
// add correct delimiter
- QString delim = delimiterForNamespace( newName );
+ TQString delim = delimiterForNamespace( newName );
// should not happen...
if ( delim.isEmpty() ) {
delim = "/";
@@ -1391,10 +1391,10 @@ namespace KMail {
}
//------------------------------------------------------------------------------
- QString ImapAccountBase::createImapPath( FolderStorage* parent,
- const QString& folderName )
+ TQString ImapAccountBase::createImapPath( FolderStorage* parent,
+ const TQString& folderName )
{
- QString path;
+ TQString path;
if ( parent->folderType() == KMFolderTypeImap ) {
path = static_cast<KMFolderImap*>( parent )->imapPath();
} else if ( parent->folderType() == KMFolderTypeCachedImap ) {
@@ -1408,12 +1408,12 @@ namespace KMail {
}
- bool ImapAccountBase::locallySubscribedTo( const QString& imapPath )
+ bool ImapAccountBase::locallySubscribedTo( const TQString& imapPath )
{
return mLocalSubscriptionBlackList.find( imapPath ) == mLocalSubscriptionBlackList.end();
}
- void ImapAccountBase::changeLocalSubscription( const QString& imapPath, bool subscribe )
+ void ImapAccountBase::changeLocalSubscription( const TQString& imapPath, bool subscribe )
{
if ( subscribe ) {
// find in blacklist and remove from it
@@ -1425,19 +1425,19 @@ namespace KMail {
}
- QStringList ImapAccountBase::locallyBlacklistedFolders() const
+ TQStringList ImapAccountBase::locallyBlacklistedFolders() const
{
- QStringList list;
- std::set<QString>::const_iterator it = mLocalSubscriptionBlackList.begin();
- std::set<QString>::const_iterator end = mLocalSubscriptionBlackList.end();
+ TQStringList list;
+ std::set<TQString>::const_iterator it = mLocalSubscriptionBlackList.begin();
+ std::set<TQString>::const_iterator end = mLocalSubscriptionBlackList.end();
for ( ; it != end ; ++it )
list.append( *it );
return list;
}
- void ImapAccountBase::localBlacklistFromStringList( const QStringList &list )
+ void ImapAccountBase::localBlacklistFromStringList( const TQStringList &list )
{
- for( QStringList::ConstIterator it = list.constBegin( ); it != list.constEnd( ); ++it )
+ for( TQStringList::ConstIterator it = list.constBegin( ); it != list.constEnd( ); ++it )
mLocalSubscriptionBlackList.insert( *it );
}
diff --git a/kmail/imapaccountbase.h b/kmail/imapaccountbase.h
index 57147330f..46fd577c5 100644
--- a/kmail/imapaccountbase.h
+++ b/kmail/imapaccountbase.h
@@ -28,8 +28,8 @@
#include "networkaccount.h"
-#include <qtimer.h>
-#include <qguardedptr.h>
+#include <tqtimer.h>
+#include <tqguardedptr.h>
#include <kio/global.h>
class AccountManager;
@@ -52,14 +52,14 @@ namespace KPIM {
namespace KMail {
struct ACLListEntry;
struct QuotaInfo;
- typedef QValueVector<KMail::ACLListEntry> ACLList;
+ typedef TQValueVector<KMail::ACLListEntry> ACLList;
class AttachmentStrategy;
class ImapAccountBase : public KMail::NetworkAccount {
Q_OBJECT
protected:
- ImapAccountBase( AccountManager * parent, const QString & name, uint id );
+ ImapAccountBase( AccountManager * parent, const TQString & name, uint id );
public:
virtual ~ImapAccountBase();
@@ -127,43 +127,43 @@ namespace KMail {
enum imapNamespace { PersonalNS=0, OtherUsersNS=1, SharedNS=2 };
// map a namespace type to a list of namespaces
- typedef QMap<imapNamespace, QStringList> nsMap;
+ typedef TQMap<imapNamespace, TQStringList> nsMap;
// map a namespace to a delimiter
- typedef QMap<QString, QString> namespaceDelim;
+ typedef TQMap<TQString, TQString> namespaceDelim;
// map a namespace type to a map with the namespace and the delimiter
- typedef QMap<imapNamespace, namespaceDelim> nsDelimMap;
+ typedef TQMap<imapNamespace, namespaceDelim> nsDelimMap;
/**
* Info Data for the Job
*/
struct jobData
{
- // Needed by QMap, don't use
- jobData() : url(QString::null), parent(0), current(0), total(1), done(0), offset(0), progressItem(0),
+ // Needed by TQMap, don't use
+ jobData() : url(TQString::null), parent(0), current(0), total(1), done(0), offset(0), progressItem(0),
onlySubscribed(false), quiet(false), cancellable(false) {}
// Real constructor
- jobData( const QString& _url, KMFolder *_parent = 0,
+ jobData( const TQString& _url, KMFolder *_parent = 0,
int _total = 1, int _done = 0, bool _quiet = false,
bool _cancelable = false )
: url(_url), parent(_parent), current(0), total(_total), done(_done), offset(0),
progressItem(0), quiet(_quiet), cancellable(_cancelable) {}
- QString path;
- QString url;
- QString curNamespace;
- QByteArray data;
- QCString cdata;
- QStringList items;
+ TQString path;
+ TQString url;
+ TQString curNamespace;
+ TQByteArray data;
+ TQCString cdata;
+ TQStringList items;
KMFolder *parent, *current;
- QPtrList<KMMessage> msgList;
+ TQPtrList<KMMessage> msgList;
int total, done, offset;
KPIM::ProgressItem *progressItem;
bool onlySubscribed, quiet, cancellable;
};
- typedef QMap<KIO::Job *, jobData>::Iterator JobIterator;
+ typedef TQMap<KIO::Job *, jobData>::Iterator JobIterator;
/**
* Call this when starting a new job
*/
@@ -188,19 +188,19 @@ namespace KMail {
* identified by @p imapPath.
* Emits subscriptionChanged signal on success.
*/
- void changeSubscription(bool subscribe, const QString& imapPath);
+ void changeSubscription(bool subscribe, const TQString& imapPath);
/**
* Returns whether the account is locally subscribed to the
* folder @param imapPath. No relation to server side subscription above.
*/
- bool locallySubscribedTo( const QString& imapPath );
+ bool locallySubscribedTo( const TQString& imapPath );
/**
* Locally subscribe (@p subscribe = TRUE) / Unsubscribe the folder
* identified by @p imapPath.
*/
- void changeLocalSubscription( const QString& imapPath, bool subscribe );
+ void changeLocalSubscription( const TQString& imapPath, bool subscribe );
/**
@@ -208,33 +208,33 @@ namespace KMail {
* identified by @p folder and @p imapPath.
* Emits receivedUserRights signal on success/error.
*/
- void getUserRights( KMFolder* folder, const QString& imapPath );
+ void getUserRights( KMFolder* folder, const TQString& imapPath );
/**
* Retrieve the complete list of ACLs on the folder
* identified by @p imapPath.
* Emits receivedACL signal on success/error.
*/
- void getACL( KMFolder* folder, const QString& imapPath );
+ void getACL( KMFolder* folder, const TQString& imapPath );
/**
* Retrieve the the quota inforamiton on the folder
* identified by @p imapPath.
* Emits receivedQuotaInfo signal on success/error.
*/
- void getStorageQuotaInfo( KMFolder* folder, const QString& imapPath );
+ void getStorageQuotaInfo( KMFolder* folder, const TQString& imapPath );
/**
* Set the status on the server
* Emits imapStatusChanged signal on success/error.
*/
- void setImapStatus( KMFolder* folder, const QString& path, const QCString& flags );
+ void setImapStatus( KMFolder* folder, const TQString& path, const TQCString& flags );
/**
* Set seen status on the server.
* Emits imapStatusChanged signal on success/error.
*/
- void setImapSeenStatus( KMFolder* folder, const QString& path, bool seen );
+ void setImapSeenStatus( KMFolder* folder, const TQString& path, bool seen );
/**
* The KIO-Slave died
@@ -278,7 +278,7 @@ namespace KMail {
/**
* Handles the result from a BODYSTRUCTURE fetch
*/
- void handleBodyStructure( QDataStream & stream, KMMessage * msg,
+ void handleBodyStructure( TQDataStream & stream, KMMessage * msg,
const AttachmentStrategy *as );
/**
@@ -318,7 +318,7 @@ namespace KMail {
* React to an error from the job. Uses job->error and job->errorString and calls
* the protected virtual handleJobError with them. See handleError below for details.
*/
- bool handleJobError( KIO::Job* job, const QString& context, bool abortSync = false );
+ bool handleJobError( KIO::Job* job, const TQString& context, bool abortSync = false );
/**
* Returns the root folder of this account
@@ -356,22 +356,22 @@ namespace KMail {
/**
* @return the namespace for the @p folder
*/
- QString namespaceForFolder( FolderStorage* );
+ TQString namespaceForFolder( FolderStorage* );
/**
* Adds "/" as needed to the given namespace
*/
- QString addPathToNamespace( const QString& ns );
+ TQString addPathToNamespace( const TQString& ns );
/**
* @return the delimiter for the @p namespace
*/
- QString delimiterForNamespace( const QString& prefix );
+ TQString delimiterForNamespace( const TQString& prefix );
/**
* @return the delimiter for the @p folderstorage
*/
- QString delimiterForFolder( FolderStorage* );
+ TQString delimiterForFolder( FolderStorage* );
/**
* @return the namespace - delimiter map
@@ -388,12 +388,12 @@ namespace KMail {
/**
* Returns true if the given string is a namespace
*/
- bool isNamespaceFolder( QString& name );
+ bool isNamespaceFolder( TQString& name );
/**
* Returns true if the account has the given capability
*/
- bool hasCapability( const QString& capa ) {
+ bool hasCapability( const TQString& capa ) {
return mCapabilities.contains( capa ); }
/**
@@ -401,12 +401,12 @@ namespace KMail {
* Parent and folder are separated with the delimiter of the account
* The path starts and ends with '/'
*/
- QString createImapPath( FolderStorage* parent, const QString& folderName );
+ TQString createImapPath( FolderStorage* parent, const TQString& folderName );
/**
* Create an IMAP path for a parent imapPath and a folderName
*/
- QString createImapPath( const QString& parent, const QString& folderName );
+ TQString createImapPath( const TQString& parent, const TQString& folderName );
public slots:
@@ -429,7 +429,7 @@ namespace KMail {
/// Handle a message coming from the KIO scheduler saying that the slave is now connected
void slotSchedulerSlaveConnected(KIO::Slave *aSlave);
/// Handle an error coming from the KIO scheduler
- void slotSchedulerSlaveError(KIO::Slave *aSlave, int, const QString &errorMsg);
+ void slotSchedulerSlaveError(KIO::Slave *aSlave, int, const TQString &errorMsg);
/**
* Only delete information about the job and ignore write errors
@@ -465,7 +465,7 @@ namespace KMail {
void slotSimpleResult(KIO::Job * job);
/** Gets and parses the namespaces */
- void slotNamespaceResult( KIO::Job*, const QString& str );
+ void slotNamespaceResult( KIO::Job*, const TQString& str );
/**
* Saves the fetched namespaces
@@ -475,7 +475,7 @@ namespace KMail {
/**
* Saves the capabilities list
*/
- void slotCapabilitiesResult( KIO::Job*, const QString& result );
+ void slotCapabilitiesResult( KIO::Job*, const TQString& result );
protected:
@@ -495,39 +495,39 @@ namespace KMail {
* @param abortSync if true, abort sync in all cases (see above). If false, ask the user (when possible).
* @return false when aborting, true when continuing
*/
- virtual bool handleError( int error, const QString &errorMsg, KIO::Job* job, const QString& context, bool abortSync = false );
+ virtual bool handleError( int error, const TQString &errorMsg, KIO::Job* job, const TQString& context, bool abortSync = false );
/** Handle an error during KIO::put - helper method */
bool handlePutError( KIO::Job* job, jobData& jd, KMFolder* folder );
- virtual QString protocol() const;
+ virtual TQString protocol() const;
virtual unsigned short int defaultPort() const;
/**
* Build KMMessageParts and DwBodyParts from the bodystructure-stream
*/
- void constructParts( QDataStream & stream, int count, KMMessagePart* parentKMPart,
+ void constructParts( TQDataStream & stream, int count, KMMessagePart* parentKMPart,
DwBodyPart * parent, const DwMessage * dwmsg );
/** Migrate the prefix */
void migratePrefix();
// used for writing the blacklist out to the config file
- QStringList locallyBlacklistedFolders() const;
- void localBlacklistFromStringList( const QStringList & );
- QString prettifyQuotaError( const QString& _error, KIO::Job * job );
+ TQStringList locallyBlacklistedFolders() const;
+ void localBlacklistFromStringList( const TQStringList & );
+ TQString prettifyQuotaError( const TQString& _error, KIO::Job * job );
protected:
- QPtrList<QGuardedPtr<KMFolder> > mOpenFolders;
- QStringList mSubfolderNames, mSubfolderPaths,
+ TQPtrList<TQGuardedPtr<KMFolder> > mOpenFolders;
+ TQStringList mSubfolderNames, mSubfolderPaths,
mSubfolderMimeTypes, mSubfolderAttributes;
- QMap<KIO::Job *, jobData> mapJobData;
+ TQMap<KIO::Job *, jobData> mapJobData;
/** used to detect when the slave has not been used for a while */
- QTimer mIdleTimer;
+ TQTimer mIdleTimer;
/** used to send a noop to the slave in regular intervals to keep it from disonnecting */
- QTimer mNoopTimer;
+ TQTimer mNoopTimer;
int mTotal, mCountUnread, mCountLastUnread;
- QMap<QString, int> mUnreadBeforeCheck;
+ TQMap<TQString, int> mUnreadBeforeCheck;
bool mAutoExpunge : 1;
bool mHiddenFolders : 1;
bool mOnlySubscribedFolders : 1;
@@ -546,15 +546,15 @@ namespace KMail {
bool mCheckingSingleFolder : 1;
// folders that should be checked for new mails
- QValueList<QGuardedPtr<KMFolder> > mMailCheckFolders;
+ TQValueList<TQGuardedPtr<KMFolder> > mMailCheckFolders;
// folders that should be checked after the current check is done
- QValueList<QGuardedPtr<KMFolder> > mFoldersQueuedForChecking;
+ TQValueList<TQGuardedPtr<KMFolder> > mFoldersQueuedForChecking;
// holds messageparts from the bodystructure
- QPtrList<KMMessagePart> mBodyPartList;
+ TQPtrList<KMMessagePart> mBodyPartList;
// the current message for the bodystructure
KMMessage* mCurrentMsg;
- QGuardedPtr<KPIM::ProgressItem> mListDirProgressItem;
+ TQGuardedPtr<KPIM::ProgressItem> mListDirProgressItem;
// our namespaces in the form section=namespaceList
nsMap mNamespaces;
@@ -563,12 +563,12 @@ namespace KMail {
namespaceDelim mNamespaceToDelimiter;
// old prefix for migration
- QString mOldPrefix;
+ TQString mOldPrefix;
// capabilities
- QStringList mCapabilities;
+ TQStringList mCapabilities;
- std::set<QString> mLocalSubscriptionBlackList;
+ std::set<TQString> mLocalSubscriptionBlackList;
signals:
/**
@@ -577,20 +577,20 @@ namespace KMail {
* @param errorCode 0 for success, != 0 in case of error
* @param errorMsg if errorCode is != 0, this goes with errorCode to call KIO::buildErrorString
*/
- void connectionResult( int errorCode, const QString& errorMsg );
+ void connectionResult( int errorCode, const TQString& errorMsg );
/**
* Emitted when the subscription has changed,
* as a result of a changeSubscription call.
*/
- void subscriptionChanged(const QString& imapPath, bool subscribed);
+ void subscriptionChanged(const TQString& imapPath, bool subscribed);
/**
* Emitted upon completion of the job for setting the status for a group of UIDs,
* as a result of a setImapStatus call.
* On error, if the user chooses abort (not continue), cont is set to false.
*/
- void imapStatusChanged( KMFolder*, const QString& imapPath, bool cont );
+ void imapStatusChanged( KMFolder*, const TQString& imapPath, bool cont );
/**
* Emitted when the get-user-rights job is done,
diff --git a/kmail/imapjob.cpp b/kmail/imapjob.cpp
index 13d4baa84..50db423cb 100644
--- a/kmail/imapjob.cpp
+++ b/kmail/imapjob.cpp
@@ -41,7 +41,7 @@
using KPIM::ProgressManager;
#include "util.h"
-#include <qstylesheet.h>
+#include <tqstylesheet.h>
#include <kio/scheduler.h>
#include <kdebug.h>
#include <klocale.h>
@@ -54,22 +54,22 @@ namespace KMail {
//-----------------------------------------------------------------------------
ImapJob::ImapJob( KMMessage *msg, JobType jt, KMFolderImap* folder,
- QString partSpecifier, const AttachmentStrategy *as )
+ TQString partSpecifier, const AttachmentStrategy *as )
: FolderJob( msg, jt, folder? folder->folder() : 0, partSpecifier ),
mAttachmentStrategy( as ), mParentProgressItem(0)
{
}
//-----------------------------------------------------------------------------
-ImapJob::ImapJob( QPtrList<KMMessage>& msgList, QString sets, JobType jt,
+ImapJob::ImapJob( TQPtrList<KMMessage>& msgList, TQString sets, JobType jt,
KMFolderImap* folder )
: FolderJob( msgList, sets, jt, folder? folder->folder() : 0 ),
mAttachmentStrategy ( 0 ), mParentProgressItem(0)
{
}
-void ImapJob::init( JobType jt, QString sets, KMFolderImap* folder,
- QPtrList<KMMessage>& msgList )
+void ImapJob::init( JobType jt, TQString sets, KMFolderImap* folder,
+ TQPtrList<KMMessage>& msgList )
{
mJob = 0;
@@ -111,7 +111,7 @@ void ImapJob::init( JobType jt, QString sets, KMFolderImap* folder,
if ( jt == tPutMessage )
{
// transfers the complete message to the server
- QPtrListIterator<KMMessage> it( msgList );
+ TQPtrListIterator<KMMessage> it( msgList );
KMMessage* curMsg;
while ( ( curMsg = it.current() ) != 0 )
{
@@ -122,14 +122,14 @@ void ImapJob::init( JobType jt, QString sets, KMFolderImap* folder,
curMsg = mSrcFolder->getMsg( idx );
}
KURL url = account->getUrl();
- QString flags = KMFolderImap::statusToFlags( curMsg->status(), folder->permanentFlags() );
+ TQString flags = KMFolderImap::statusToFlags( curMsg->status(), folder->permanentFlags() );
url.setPath( folder->imapPath() + ";SECTION=" + flags );
ImapAccountBase::jobData jd;
jd.parent = 0; jd.offset = 0; jd.done = 0;
jd.total = ( curMsg->msgSizeServer() > 0 ) ?
curMsg->msgSizeServer() : curMsg->msgSize();
jd.msgList.append( curMsg );
- QCString cstr( curMsg->asString() );
+ TQCString cstr( curMsg->asString() );
int a = cstr.find("\nX-UID: ");
int b = cstr.find('\n', a);
if (a != -1 && b != -1 && cstr.find("\n\n") > a) cstr.remove(a, b-a);
@@ -151,23 +151,23 @@ void ImapJob::init( JobType jt, QString sets, KMFolderImap* folder,
mParentProgressItem,
"ImapJobUploading"+ProgressManager::getUniqueID(),
i18n("Uploading message data"),
- QStyleSheet::escape( curMsg->subject() ),
+ TQStyleSheet::escape( curMsg->subject() ),
true,
account->useSSL() || account->useTLS() );
jd.progressItem->setTotalItems( jd.total );
- connect ( jd.progressItem, SIGNAL( progressItemCanceled( KPIM::ProgressItem*)),
- account, SLOT( slotAbortRequested( KPIM::ProgressItem* ) ) );
+ connect ( jd.progressItem, TQT_SIGNAL( progressItemCanceled( KPIM::ProgressItem*)),
+ account, TQT_SLOT( slotAbortRequested( KPIM::ProgressItem* ) ) );
KIO::SimpleJob *job = KIO::put( url, 0, false, false, false );
KIO::Scheduler::assignJobToSlave( account->slave(), job );
account->insertJob( job, jd );
- connect( job, SIGNAL(result(KIO::Job *)),
- SLOT(slotPutMessageResult(KIO::Job *)) );
- connect( job, SIGNAL(dataReq(KIO::Job *, QByteArray &)),
- SLOT(slotPutMessageDataReq(KIO::Job *, QByteArray &)) );
- connect( job, SIGNAL(infoMessage(KIO::Job *, const QString &)),
- SLOT(slotPutMessageInfoData(KIO::Job *, const QString &)) );
- connect( job, SIGNAL(processedSize(KIO::Job *, KIO::filesize_t)),
- SLOT(slotProcessedSize(KIO::Job *, KIO::filesize_t)));
+ connect( job, TQT_SIGNAL(result(KIO::Job *)),
+ TQT_SLOT(slotPutMessageResult(KIO::Job *)) );
+ connect( job, TQT_SIGNAL(dataReq(KIO::Job *, TQByteArray &)),
+ TQT_SLOT(slotPutMessageDataReq(KIO::Job *, TQByteArray &)) );
+ connect( job, TQT_SIGNAL(infoMessage(KIO::Job *, const TQString &)),
+ TQT_SLOT(slotPutMessageInfoData(KIO::Job *, const TQString &)) );
+ connect( job, TQT_SIGNAL(processedSize(KIO::Job *, KIO::filesize_t)),
+ TQT_SLOT(slotProcessedSize(KIO::Job *, KIO::filesize_t)));
}
}
else if ( jt == tCopyMessage || jt == tMoveMessage )
@@ -182,8 +182,8 @@ void ImapJob::init( JobType jt, QString sets, KMFolderImap* folder,
jd.total = 1; jd.done = 0;
jd.msgList = msgList;
- QByteArray packedArgs;
- QDataStream stream( packedArgs, IO_WriteOnly );
+ TQByteArray packedArgs;
+ TQDataStream stream( packedArgs, IO_WriteOnly );
stream << (int) 'C' << url << destUrl;
jd.progressItem = ProgressManager::createProgressItem(
@@ -191,23 +191,23 @@ void ImapJob::init( JobType jt, QString sets, KMFolderImap* folder,
"ImapJobCopyMove"+ProgressManager::getUniqueID(),
i18n("Server operation"),
i18n("Source folder: %1 - Destination folder: %2")
- .arg( QStyleSheet::escape( msg_parent->prettyURL() ),
- QStyleSheet::escape( mDestFolder->prettyURL() ) ),
+ .arg( TQStyleSheet::escape( msg_parent->prettyURL() ),
+ TQStyleSheet::escape( mDestFolder->prettyURL() ) ),
true,
account->useSSL() || account->useTLS() );
jd.progressItem->setTotalItems( jd.total );
- connect ( jd.progressItem, SIGNAL(progressItemCanceled(KPIM::ProgressItem*)),
- account, SLOT( slotAbortRequested(KPIM::ProgressItem* ) ) );
+ connect ( jd.progressItem, TQT_SIGNAL(progressItemCanceled(KPIM::ProgressItem*)),
+ account, TQT_SLOT( slotAbortRequested(KPIM::ProgressItem* ) ) );
KIO::SimpleJob *simpleJob = KIO::special( url, packedArgs, false );
KIO::Scheduler::assignJobToSlave( account->slave(), simpleJob );
mJob = simpleJob;
account->insertJob( mJob, jd );
- connect( mJob, SIGNAL(result(KIO::Job *)),
- SLOT(slotCopyMessageResult(KIO::Job *)) );
+ connect( mJob, TQT_SIGNAL(result(KIO::Job *)),
+ TQT_SLOT(slotCopyMessageResult(KIO::Job *)) );
if ( jt == tMoveMessage )
{
- connect( mJob, SIGNAL(infoMessage(KIO::Job *, const QString &)),
- SLOT(slotCopyMessageInfoData(KIO::Job *, const QString &)) );
+ connect( mJob, TQT_SIGNAL(infoMessage(KIO::Job *, const TQString &)),
+ TQT_SLOT(slotCopyMessageInfoData(KIO::Job *, const TQString &)) );
}
}
else {
@@ -231,7 +231,7 @@ ImapJob::~ImapJob()
(*it).progressItem = 0;
}
if ( !(*it).msgList.isEmpty() ) {
- for ( QPtrListIterator<KMMessage> mit( (*it).msgList ); mit.current(); ++mit )
+ for ( TQPtrListIterator<KMMessage> mit( (*it).msgList ); mit.current(); ++mit )
mit.current()->setTransferInProgress( false );
}
}
@@ -255,7 +255,7 @@ ImapJob::~ImapJob()
(*it).progressItem = 0;
}
if ( !(*it).msgList.isEmpty() ) {
- for ( QPtrListIterator<KMMessage> mit( (*it).msgList ); mit.current(); ++mit )
+ for ( TQPtrListIterator<KMMessage> mit( (*it).msgList ); mit.current(); ++mit )
mit.current()->setTransferInProgress( false );
}
}
@@ -283,7 +283,7 @@ void ImapJob::slotGetNextMessage()
}
KMAcctImap *account = msgParent->account();
KURL url = account->getUrl();
- QString path = msgParent->imapPath() + ";UID=" + QString::number(msg->UID());
+ TQString path = msgParent->imapPath() + ";UID=" + TQString::number(msg->UID());
ImapAccountBase::jobData jd;
jd.parent = 0; jd.offset = 0;
jd.total = 1; jd.done = 0;
@@ -314,11 +314,11 @@ void ImapJob::slotGetNextMessage()
"ImapJobDownloading"+ProgressManager::getUniqueID(),
i18n("Downloading message data"),
i18n("Message with subject: ") +
- QStyleSheet::escape( msg->subject() ),
+ TQStyleSheet::escape( msg->subject() ),
true,
account->useSSL() || account->useTLS() );
- connect ( jd.progressItem, SIGNAL( progressItemCanceled( KPIM::ProgressItem*)),
- account, SLOT( slotAbortRequested( KPIM::ProgressItem* ) ) );
+ connect ( jd.progressItem, TQT_SIGNAL( progressItemCanceled( KPIM::ProgressItem*)),
+ account, TQT_SLOT( slotAbortRequested( KPIM::ProgressItem* ) ) );
jd.progressItem->setTotalItems( jd.total );
KIO::SimpleJob *simpleJob = KIO::get( url, false, false );
@@ -327,18 +327,18 @@ void ImapJob::slotGetNextMessage()
account->insertJob( mJob, jd );
if ( mPartSpecifier.find( "STRUCTURE", 0, false ) != -1 )
{
- connect( mJob, SIGNAL(result(KIO::Job *)),
- this, SLOT(slotGetBodyStructureResult(KIO::Job *)) );
+ connect( mJob, TQT_SIGNAL(result(KIO::Job *)),
+ this, TQT_SLOT(slotGetBodyStructureResult(KIO::Job *)) );
} else {
- connect( mJob, SIGNAL(result(KIO::Job *)),
- this, SLOT(slotGetMessageResult(KIO::Job *)) );
+ connect( mJob, TQT_SIGNAL(result(KIO::Job *)),
+ this, TQT_SLOT(slotGetMessageResult(KIO::Job *)) );
}
- connect( mJob, SIGNAL(data(KIO::Job *, const QByteArray &)),
- msgParent, SLOT(slotSimpleData(KIO::Job *, const QByteArray &)) );
+ connect( mJob, TQT_SIGNAL(data(KIO::Job *, const TQByteArray &)),
+ msgParent, TQT_SLOT(slotSimpleData(KIO::Job *, const TQByteArray &)) );
if ( jd.total > 1 )
{
- connect(mJob, SIGNAL(processedSize(KIO::Job *, KIO::filesize_t)),
- this, SLOT(slotProcessedSize(KIO::Job *, KIO::filesize_t)));
+ connect(mJob, TQT_SIGNAL(processedSize(KIO::Job *, KIO::filesize_t)),
+ this, TQT_SLOT(slotProcessedSize(KIO::Job *, KIO::filesize_t)));
}
}
@@ -367,7 +367,7 @@ void ImapJob::slotGetMessageResult( KIO::Job * job )
bool gotData = true;
if (job->error())
{
- QString errorStr = i18n( "Error while retrieving messages from the server." );
+ TQString errorStr = i18n( "Error while retrieving messages from the server." );
if ( (*it).progressItem )
(*it).progressItem->setStatus( errorStr );
account->handleJobError( job, errorStr );
@@ -485,7 +485,7 @@ void ImapJob::slotGetBodyStructureResult( KIO::Job * job )
} else {
if ((*it).data.size() > 0)
{
- QDataStream stream( (*it).data, IO_ReadOnly );
+ TQDataStream stream( (*it).data, IO_ReadOnly );
account->handleBodyStructure(stream, msg, mAttachmentStrategy);
}
}
@@ -497,7 +497,7 @@ void ImapJob::slotGetBodyStructureResult( KIO::Job * job )
}
//-----------------------------------------------------------------------------
-void ImapJob::slotPutMessageDataReq( KIO::Job *job, QByteArray &data )
+void ImapJob::slotPutMessageDataReq( KIO::Job *job, TQByteArray &data )
{
KMAcctImap *account = static_cast<KMFolderImap*>(mDestFolder->storage())->account();
if ( !account )
@@ -568,7 +568,7 @@ void ImapJob::slotPutMessageResult( KIO::Job *job )
}
//-----------------------------------------------------------------------------
-void ImapJob::slotCopyMessageInfoData(KIO::Job * job, const QString & data)
+void ImapJob::slotCopyMessageInfoData(KIO::Job * job, const TQString & data)
{
KMFolderImap * imapFolder = static_cast<KMFolderImap*>(mDestFolder->storage());
KMAcctImap *account = imapFolder->account();
@@ -584,12 +584,12 @@ void ImapJob::slotCopyMessageInfoData(KIO::Job * job, const QString & data)
if (data.find("UID") != -1)
{
// split
- QString oldUid = data.section(' ', 1, 1);
- QString newUid = data.section(' ', 2, 2);
+ TQString oldUid = data.section(' ', 1, 1);
+ TQString newUid = data.section(' ', 2, 2);
// get lists of uids
- QValueList<ulong> olduids = KMFolderImap::splitSets(oldUid);
- QValueList<ulong> newuids = KMFolderImap::splitSets(newUid);
+ TQValueList<ulong> olduids = KMFolderImap::splitSets(oldUid);
+ TQValueList<ulong> newuids = KMFolderImap::splitSets(newUid);
int index = -1;
KMMessage * msg;
@@ -607,7 +607,7 @@ void ImapJob::slotCopyMessageInfoData(KIO::Job * job, const QString & data)
}
//----------------------------------------------------------------------------
-void ImapJob::slotPutMessageInfoData(KIO::Job *job, const QString &data)
+void ImapJob::slotPutMessageInfoData(KIO::Job *job, const TQString &data)
{
KMFolderImap * imapFolder = static_cast<KMFolderImap*>(mDestFolder->storage());
KMAcctImap *account = imapFolder->account();
@@ -647,7 +647,7 @@ void ImapJob::slotCopyMessageResult( KIO::Job *job )
if (job->error())
{
mErrorCode = job->error();
- QString errStr = i18n("Error while copying messages.");
+ TQString errStr = i18n("Error while copying messages.");
if ( (*it).progressItem )
(*it).progressItem->setStatus( errStr );
if ( account->handleJobError( job, errStr ) )
diff --git a/kmail/imapjob.h b/kmail/imapjob.h
index d12ac0f7f..94be48d14 100644
--- a/kmail/imapjob.h
+++ b/kmail/imapjob.h
@@ -37,7 +37,7 @@
#include "folderjob.h"
-#include <qcstring.h>
+#include <tqcstring.h>
class KMAcctImap;
class KMMessage;
@@ -58,8 +58,8 @@ class ImapJob : public FolderJob
public:
ImapJob( KMMessage *msg, JobType jt = tGetMessage, KMFolderImap *folder = 0,
- QString partSpecifier = QString::null, const AttachmentStrategy *as = 0 );
- ImapJob( QPtrList<KMMessage>& msgList, QString sets,
+ TQString partSpecifier = TQString::null, const AttachmentStrategy *as = 0 );
+ ImapJob( TQPtrList<KMMessage>& msgList, TQString sets,
JobType jt = tGetMessage, KMFolderImap *folder = 0 );
virtual ~ImapJob();
@@ -72,20 +72,20 @@ private slots:
void slotGetBodyStructureResult( KIO::Job * job );
void slotGetNextMessage();
/** Feeds the message in pieces to the server */
- void slotPutMessageDataReq( KIO::Job *job, QByteArray &data );
+ void slotPutMessageDataReq( KIO::Job *job, TQByteArray &data );
void slotPutMessageResult( KIO::Job *job );
- void slotPutMessageInfoData(KIO::Job *, const QString &data);
+ void slotPutMessageInfoData(KIO::Job *, const TQString &data);
/** result of a copy-operation */
void slotCopyMessageResult( KIO::Job *job );
- void slotCopyMessageInfoData( KIO::Job *, const QString &data );
+ void slotCopyMessageInfoData( KIO::Job *, const TQString &data );
void slotProcessedSize( KIO::Job *, KIO::filesize_t processed );
private:
void execute();
- void init( JobType jt, QString sets, KMFolderImap *folder,
- QPtrList<KMMessage>& msgList );
+ void init( JobType jt, TQString sets, KMFolderImap *folder,
+ TQPtrList<KMMessage>& msgList );
KIO::Job *mJob;
- QByteArray mData;
+ TQByteArray mData;
const AttachmentStrategy *mAttachmentStrategy;
KMFolderImap *mParentFolder;
KPIM::ProgressItem *mParentProgressItem;
diff --git a/kmail/index.cpp b/kmail/index.cpp
index 5b156a999..ef1ba7de3 100644
--- a/kmail/index.cpp
+++ b/kmail/index.cpp
@@ -37,11 +37,11 @@
#include <kdebug.h>
#include <kapplication.h>
-#include <qfile.h>
-#include <qtimer.h>
-#include <qvaluestack.h>
-#include <qptrlist.h>
-#include <qfileinfo.h>
+#include <tqfile.h>
+#include <tqtimer.h>
+#include <tqvaluestack.h>
+#include <tqptrlist.h>
+#include <tqfileinfo.h>
#ifdef HAVE_INDEXLIB
#include <indexlib/create.h>
#endif
@@ -60,44 +60,44 @@ const char* const folderIndexDisabledKey = "fulltextIndexDisabled";
#ifdef HAVE_INDEXLIB
static
-QValueList<int> vectorToQValueList( const std::vector<Q_UINT32>& input ) {
- QValueList<int> res;
+TQValueList<int> vectorToQValueList( const std::vector<Q_UINT32>& input ) {
+ TQValueList<int> res;
std::copy( input.begin(), input.end(), std::back_inserter( res ) );
return res;
}
static
-std::vector<Q_UINT32> QValueListToVector( const QValueList<int>& input ) {
+std::vector<Q_UINT32> QValueListToVector( const TQValueList<int>& input ) {
std::vector<Q_UINT32> res;
// res.assign( input.begin(), input.end() ) doesn't work for some reason
- for ( QValueList<int>::const_iterator first = input.begin(), past = input.end(); first != past; ++first ) {
+ for ( TQValueList<int>::const_iterator first = input.begin(), past = input.end(); first != past; ++first ) {
res.push_back( *first );
}
return res;
}
#endif
-KMMsgIndex::KMMsgIndex( QObject* parent ):
- QObject( parent, "index" ),
+KMMsgIndex::KMMsgIndex( TQObject* parent ):
+ TQObject( parent, "index" ),
mState( s_idle ),
#ifdef HAVE_INDEXLIB
- mLockFile( std::string( static_cast<const char*>( QFile::encodeName( defaultPath() ) + "/lock" ) ) ),
+ mLockFile( std::string( static_cast<const char*>( TQFile::encodeName( defaultPath() ) + "/lock" ) ) ),
mIndex( 0 ),
#endif
- mIndexPath( QFile::encodeName( defaultPath() ) ),
- mTimer( new QTimer( this, "mTimer" ) ),
+ mIndexPath( TQFile::encodeName( defaultPath() ) ),
+ mTimer( new TQTimer( this, "mTimer" ) ),
//mSyncState( ss_none ),
- //mSyncTimer( new QTimer( this ) ),
+ //mSyncTimer( new TQTimer( this ) ),
mSlowDown( false ) {
kdDebug( 5006 ) << "KMMsgIndex::KMMsgIndex()" << endl;
- connect( kmkernel->folderMgr(), SIGNAL( msgRemoved( KMFolder*, Q_UINT32 ) ), SLOT( slotRemoveMessage( Q_UINT32 ) ) );
- connect( kmkernel->folderMgr(), SIGNAL( msgAdded( KMFolder*, Q_UINT32 ) ), SLOT( slotAddMessage( Q_UINT32 ) ) );
- connect( kmkernel->dimapFolderMgr(), SIGNAL( msgRemoved( KMFolder*, Q_UINT32 ) ), SLOT( slotRemoveMessage( Q_UINT32 ) ) );
- connect( kmkernel->dimapFolderMgr(), SIGNAL( msgAdded( KMFolder*, Q_UINT32 ) ), SLOT( slotAddMessage( Q_UINT32 ) ) );
+ connect( kmkernel->folderMgr(), TQT_SIGNAL( msgRemoved( KMFolder*, Q_UINT32 ) ), TQT_SLOT( slotRemoveMessage( Q_UINT32 ) ) );
+ connect( kmkernel->folderMgr(), TQT_SIGNAL( msgAdded( KMFolder*, Q_UINT32 ) ), TQT_SLOT( slotAddMessage( Q_UINT32 ) ) );
+ connect( kmkernel->dimapFolderMgr(), TQT_SIGNAL( msgRemoved( KMFolder*, Q_UINT32 ) ), TQT_SLOT( slotRemoveMessage( Q_UINT32 ) ) );
+ connect( kmkernel->dimapFolderMgr(), TQT_SIGNAL( msgAdded( KMFolder*, Q_UINT32 ) ), TQT_SLOT( slotAddMessage( Q_UINT32 ) ) );
- connect( mTimer, SIGNAL( timeout() ), SLOT( act() ) );
- //connect( mSyncTimer, SIGNAL( timeout() ), SLOT( syncIndex() ) );
+ connect( mTimer, TQT_SIGNAL( timeout() ), TQT_SLOT( act() ) );
+ //connect( mSyncTimer, TQT_SIGNAL( timeout() ), TQT_SLOT( syncIndex() ) );
#ifdef HAVE_INDEXLIB
KConfigGroup cfg( KMKernel::config(), "text-index" );
@@ -116,11 +116,11 @@ KMMsgIndex::KMMsgIndex( QObject* parent ):
mIndex = indexlib::open( mIndexPath, indexlib::open_flags::fail_if_nonexistant ).release();
}
if ( !mIndex ) {
- QTimer::singleShot( 8000, this, SLOT( create() ) );
+ TQTimer::singleShot( 8000, this, TQT_SLOT( create() ) );
mState = s_willcreate;
} else {
if ( cfg.readBoolEntry( "creating" ) ) {
- QTimer::singleShot( 8000, this, SLOT( continueCreation() ) );
+ TQTimer::singleShot( 8000, this, TQT_SLOT( continueCreation() ) );
mState = s_creating;
} else {
mPendingMsgs = QValueListToVector( cfg.readIntListEntry( "pending" ) );
@@ -140,7 +140,7 @@ KMMsgIndex::~KMMsgIndex() {
#ifdef HAVE_INDEXLIB
KConfigGroup cfg( KMKernel::config(), "text-index" );
cfg.writeEntry( "creating", mState == s_creating );
- QValueList<int> pendingMsg;
+ TQValueList<int> pendingMsg;
if ( mState == s_processing ) {
Q_ASSERT( mAddedMsgs.empty() );
pendingMsg = vectorToQValueList( mPendingMsgs );
@@ -182,7 +182,7 @@ void KMMsgIndex::setEnabled( bool e ) {
// nothing can be done, probably
return;
case s_disabled:
- QTimer::singleShot( 8000, this, SLOT( create() ) );
+ TQTimer::singleShot( 8000, this, TQT_SLOT( create() ) );
mState = s_willcreate;
}
} else {
@@ -265,7 +265,7 @@ void KMMsgIndex::clear() {
void KMMsgIndex::maintenance() {
#ifdef HAVE_INDEXLIB
if ( mState != s_idle || kapp->hasPendingEvents() ) {
- QTimer::singleShot( 8000, this, SLOT( maintenance() ) );
+ TQTimer::singleShot( 8000, this, TQT_SLOT( maintenance() ) );
return;
}
mIndex->maintenance();
@@ -292,9 +292,9 @@ int KMMsgIndex::addMessage( Q_UINT32 serNum ) {
* Setting to false which makes more sense.
* We keep signature to get the person's name
*/
- QString body = msg->asPlainText( false, false );
+ TQString body = msg->asPlainText( false, false );
if ( !body.isEmpty() && static_cast<const char*>( body.latin1() ) ) {
- mIndex->add( body.latin1(), QString::number( serNum ).latin1() );
+ mIndex->add( body.latin1(), TQString::number( serNum ).latin1() );
} else {
kdDebug( 5006 ) << "Funny, no body" << endl;
}
@@ -370,7 +370,7 @@ void KMMsgIndex::create() {
kdDebug( 5006 ) << "KMMsgIndex::create()" << endl;
#ifdef HAVE_INDEXLIB
- if ( !QFileInfo( mIndexPath ).exists() ) {
+ if ( !TQFileInfo( mIndexPath ).exists() ) {
::mkdir( mIndexPath, S_IRWXU );
}
mState = s_creating;
@@ -380,7 +380,7 @@ void KMMsgIndex::create() {
mState = s_error;
return;
}
- QValueStack<KMFolderDir*> folders;
+ TQValueStack<KMFolderDir*> folders;
folders.push(&(kmkernel->folderMgr()->dir()));
folders.push(&(kmkernel->dimapFolderMgr()->dir()));
while ( !folders.empty() ) {
@@ -404,10 +404,10 @@ bool KMMsgIndex::startQuery( KMSearch* s ) {
kdDebug( 5006 ) << "KMMsgIndex::startQuery( . ) starting query" << endl;
Search* search = new Search( s );
- connect( search, SIGNAL( finished( bool ) ), s, SIGNAL( finished( bool ) ) );
- connect( search, SIGNAL( finished( bool ) ), s, SLOT( indexFinished() ) );
- connect( search, SIGNAL( destroyed( QObject* ) ), SLOT( removeSearch( QObject* ) ) );
- connect( search, SIGNAL( found( Q_UINT32 ) ), s, SIGNAL( found( Q_UINT32 ) ) );
+ connect( search, TQT_SIGNAL( finished( bool ) ), s, TQT_SIGNAL( finished( bool ) ) );
+ connect( search, TQT_SIGNAL( finished( bool ) ), s, TQT_SLOT( indexFinished() ) );
+ connect( search, TQT_SIGNAL( destroyed( TQObject* ) ), TQT_SLOT( removeSearch( TQObject* ) ) );
+ connect( search, TQT_SIGNAL( found( Q_UINT32 ) ), s, TQT_SIGNAL( found( Q_UINT32 ) ) );
mSearches.push_back( search );
return true;
}
@@ -432,7 +432,7 @@ bool KMMsgIndex::startQuery( KMSearch* s ) {
//
//}
-void KMMsgIndex::removeSearch( QObject* destroyed ) {
+void KMMsgIndex::removeSearch( TQObject* destroyed ) {
mSearches.erase( std::find( mSearches.begin(), mSearches.end(), destroyed ) );
}
@@ -449,7 +449,7 @@ bool KMMsgIndex::stopQuery( KMSearch* s ) {
return false;
}
-std::vector<Q_UINT32> KMMsgIndex::simpleSearch( QString s, bool* ok ) const {
+std::vector<Q_UINT32> KMMsgIndex::simpleSearch( TQString s, bool* ok ) const {
kdDebug( 5006 ) << "KMMsgIndex::simpleSearch( -" << s.latin1() << "- )" << endl;
if ( mState == s_error || mState == s_disabled ) {
if ( ok ) *ok = false;
@@ -471,7 +471,7 @@ std::vector<Q_UINT32> KMMsgIndex::simpleSearch( QString s, bool* ok ) const {
bool KMMsgIndex::canHandleQuery( const KMSearchPattern* pat ) const {
kdDebug( 5006 ) << "KMMsgIndex::canHandleQuery( . )" << endl;
if ( !pat ) return false;
- QPtrListIterator<KMSearchRule> it( *pat );
+ TQPtrListIterator<KMSearchRule> it( *pat );
KMSearchRule* rule;
while ( (rule = it.current()) != 0 ) {
++it;
@@ -514,15 +514,15 @@ void KMMsgIndex::removeMessage( Q_UINT32 serNum ) {
if ( mState == s_error || mState == s_disabled ) return;
#ifdef HAVE_INDEXLIB
- mIndex->remove_doc( QString::number( serNum ).latin1() );
+ mIndex->remove_doc( TQString::number( serNum ).latin1() );
++mMaintenanceCount;
if ( mMaintenanceCount > MaintenanceLimit && mRemovedMsgs.empty() ) {
- QTimer::singleShot( 100, this, SLOT( maintenance() ) );
+ TQTimer::singleShot( 100, this, TQT_SLOT( maintenance() ) );
}
#endif
}
-QString KMMsgIndex::defaultPath() {
+TQString KMMsgIndex::defaultPath() {
return KMKernel::localDataPath() + "text-index";
}
@@ -532,10 +532,10 @@ bool KMMsgIndex::creating() const {
KMMsgIndex::Search::Search( KMSearch* s ):
mSearch( s ),
- mTimer( new QTimer( this, "mTimer" ) ),
+ mTimer( new TQTimer( this, "mTimer" ) ),
mResidual( new KMSearchPattern ),
mState( s_starting ) {
- connect( mTimer, SIGNAL( timeout() ), SLOT( act() ) );
+ connect( mTimer, TQT_SIGNAL( timeout() ), TQT_SLOT( act() ) );
mTimer->start( 0 );
}
@@ -547,10 +547,10 @@ void KMMsgIndex::Search::act() {
switch ( mState ) {
case s_starting: {
KMSearchPattern* pat = mSearch->searchPattern();
- QString terms;
+ TQString terms;
for ( KMSearchRule* rule = pat->first(); rule; rule = pat->next() ) {
Q_ASSERT( rule->function() == KMSearchRule::FuncContains );
- terms += QString::fromLatin1( " %1 " ).arg( rule->contents() );
+ terms += TQString::fromLatin1( " %1 " ).arg( rule->contents() );
}
mValues = kmkernel->msgIndex()->simpleSearch( terms, 0 );
diff --git a/kmail/index.h b/kmail/index.h
index 731f407f6..91c69f2d7 100644
--- a/kmail/index.h
+++ b/kmail/index.h
@@ -31,10 +31,10 @@
*/
-#include <qobject.h>
-#include <qcstring.h>
-#include <qvaluelist.h>
-#include <qtimer.h>
+#include <tqobject.h>
+#include <tqcstring.h>
+#include <tqvaluelist.h>
+#include <tqtimer.h>
#include <config.h>
#ifdef HAVE_INDEXLIB
#include <indexlib/index.h>
@@ -49,10 +49,10 @@ class KMSearch;
class KMSearchRule;
class KMSearchPattern;
-class KMMsgIndex : public QObject {
+class KMMsgIndex : public TQObject {
Q_OBJECT
public:
- explicit KMMsgIndex( QObject* parent );
+ explicit KMMsgIndex( TQObject* parent );
~KMMsgIndex();
public:
@@ -74,7 +74,7 @@ class KMMsgIndex : public QObject {
/**
* Just return all the uids where the pattern exists
*/
- std::vector<Q_UINT32> simpleSearch( QString, bool* ) const;
+ std::vector<Q_UINT32> simpleSearch( TQString, bool* ) const;
/**
* Returns whether the folder is indexable. Only local and dimap
@@ -129,14 +129,14 @@ class KMMsgIndex : public QObject {
void maintenance();
void act();
- void removeSearch( QObject* );
+ void removeSearch( TQObject* );
void continueCreation();
void slotAddMessage( Q_UINT32 message );
void slotRemoveMessage( Q_UINT32 message );
private:
- static QString defaultPath();
+ static TQString defaultPath();
bool canHandleQuery( const KMSearchPattern* ) const;
int addMessage( Q_UINT32 );
@@ -180,19 +180,19 @@ class KMMsgIndex : public QObject {
*/
indexlib::detail::lockfile mLockFile;
//enum e_syncState { ss_none, ss_started, ss_synced } mSyncState;
- //QTimer* mSyncTimer;
+ //TQTimer* mSyncTimer;
indexlib::index* mIndex;
#endif
std::set<KMFolder*> mOpenedFolders;
std::vector<Search*> mSearches;
- QCString mIndexPath;
- QTimer* mTimer;
+ TQCString mIndexPath;
+ TQTimer* mTimer;
bool mSlowDown;
};
-class KMMsgIndex::Search : public QObject {
+class KMMsgIndex::Search : public TQObject {
Q_OBJECT
public:
explicit Search( KMSearch* s );
@@ -205,7 +205,7 @@ class KMMsgIndex::Search : public QObject {
void act();
private:
KMSearch* mSearch;
- QTimer* mTimer;
+ TQTimer* mTimer;
/**
* mResidual is the part of the pattern which is not
* handled by the index
diff --git a/kmail/interfaces/bodypart.h b/kmail/interfaces/bodypart.h
index 0a69dd0c5..e38296a56 100644
--- a/kmail/interfaces/bodypart.h
+++ b/kmail/interfaces/bodypart.h
@@ -35,7 +35,7 @@
#define __KMAIL_INTERFACES_BODYPART_H__
template <typename T> class QMemArray;
-typedef QMemArray<char> QByteArray;
+typedef TQMemArray<char> QByteArray;
class QString;
namespace KMail {
@@ -79,24 +79,24 @@ namespace KMail {
@return a string respresentation of an URL that can be used
to invoke a BodyPartURLHandler for this body part.
*/
- virtual QString makeLink( const QString & path ) const = 0;
+ virtual TQString makeLink( const TQString & path ) const = 0;
/**
@return the decoded (CTE, canonicalisation, and charset
encoding undone) text contained in the body part, or
- QString::null, it the body part is not of type "text".
+ TQString::null, it the body part is not of type "text".
*/
- virtual QString asText() const = 0;
+ virtual TQString asText() const = 0;
/**
@return the decoded (CTE undone) content of the body part, or
a null array if this body part instance is of type text.
*/
- virtual QByteArray asBinary() const = 0;
+ virtual TQByteArray asBinary() const = 0;
/**
@return the value of the content-type header field parameter
- with name \a parameter, or QString::null, if that that
+ with name \a parameter, or TQString::null, if that that
parameter is not present in the body's content-type header
field. RFC 2231 encoding is removed first.
@@ -110,26 +110,26 @@ namespace KMail {
parameter), you need to make sure you do the casemap yourself
before comparing to a reference value.
*/
- virtual QString contentTypeParameter( const char * parameter ) const = 0;
+ virtual TQString contentTypeParameter( const char * parameter ) const = 0;
/**
@return the content of the content-description header field,
- or QString::null if that header is not present in this body
+ or TQString::null if that header is not present in this body
part. RFC 2047 encoding is decoded first.
*/
- virtual QString contentDescription() const = 0;
+ virtual TQString contentDescription() const = 0;
//virtual int contentDisposition() const = 0;
/**
@return the value of the content-disposition header field
- parameter with name \a parameter, or QString::null if that
+ parameter with name \a parameter, or TQString::null if that
parameter is not present in the body's content-disposition
header field. RFC 2231 encoding is removed first.
The notes made for contentTypeParameter() above apply here as
well.
*/
- virtual QString contentDispositionParameter( const char * parameter ) const = 0;
+ virtual TQString contentDispositionParameter( const char * parameter ) const = 0;
/**
@return whether this part already has it's complete body
diff --git a/kmail/interfaces/bodyparturlhandler.h b/kmail/interfaces/bodyparturlhandler.h
index 1fd8b16d9..5dff819e8 100644
--- a/kmail/interfaces/bodyparturlhandler.h
+++ b/kmail/interfaces/bodyparturlhandler.h
@@ -57,7 +57,7 @@ namespace KMail {
* URLHandler.
*
* You can create a link whose handling is passed to this handler
- * by using BodyPart::makeLink( const QString & path ). \a path is
+ * by using BodyPart::makeLink( const TQString & path ). \a path is
* what * is passed back to the methods of this interface.
*
* Note that the BodyPart interface does not provide a means of
@@ -77,7 +77,7 @@ namespace KMail {
@return true if the click was handled by this handler, false
otherwise.
*/
- virtual bool handleClick( BodyPart * part, const QString & path, Callback& c ) const = 0;
+ virtual bool handleClick( BodyPart * part, const TQString & path, Callback& c ) const = 0;
/** Called when RMB-clicking on a link in the reader. Should
show a context menu at the specified point with the
@@ -86,15 +86,15 @@ namespace KMail {
@return true if the right-click was handled by this handler,
false otherwise.
*/
- virtual bool handleContextMenuRequest( BodyPart * part, const QString & path, const QPoint & p ) const = 0;
+ virtual bool handleContextMenuRequest( BodyPart * part, const TQString & path, const TQPoint & p ) const = 0;
/** Called when hovering over a link.
@return a string to be shown in the status bar while
- hovering over this link or QString::null if the link was not
+ hovering over this link or TQString::null if the link was not
handled by this handler.
*/
- virtual QString statusBarMessage( BodyPart * part, const QString & path ) const = 0;
+ virtual TQString statusBarMessage( BodyPart * part, const TQString & path ) const = 0;
};
} // namespace Interface
diff --git a/kmail/interfaces/htmlwriter.h b/kmail/interfaces/htmlwriter.h
index 3621038b0..b95526b3c 100644
--- a/kmail/interfaces/htmlwriter.h
+++ b/kmail/interfaces/htmlwriter.h
@@ -49,9 +49,9 @@ namespace KMail {
virtual ~HtmlWriter() {}
/** Signal the begin of stuff to write, and give the CSS definitions */
- virtual void begin( const QString & cssDefinitions ) = 0;
+ virtual void begin( const TQString & cssDefinitions ) = 0;
/** Write out a chunk of text. No HTML escaping is performed. */
- virtual void write( const QString & html ) = 0;
+ virtual void write( const TQString & html ) = 0;
/** Signal the end of stuff to write. */
virtual void end() = 0;
};
@@ -104,14 +104,14 @@ namespace KMail {
call #begin() again. */
virtual void reset() = 0;
- virtual void queue( const QString & str ) = 0;
+ virtual void queue( const TQString & str ) = 0;
/** (Start) flushing internal buffers, if any. */
virtual void flush() = 0;
/**
* Embed a part with Content-ID @p contentId, using url @p url.
*/
- virtual void embedPart( const QCString & contentId, const QString & url ) = 0;
+ virtual void embedPart( const TQCString & contentId, const TQString & url ) = 0;
};
} // namespace KMail
diff --git a/kmail/interfaces/rulewidgethandler.h b/kmail/interfaces/rulewidgethandler.h
index e8fdd802d..36b09110b 100644
--- a/kmail/interfaces/rulewidgethandler.h
+++ b/kmail/interfaces/rulewidgethandler.h
@@ -49,29 +49,29 @@ namespace KMail {
public:
virtual ~RuleWidgetHandler() {}
- virtual QWidget * createFunctionWidget( int number,
- QWidgetStack *functionStack,
- const QObject *receiver ) const = 0;
- virtual QWidget * createValueWidget( int number,
- QWidgetStack *valueStack,
- const QObject *receiver ) const = 0;
- virtual KMSearchRule::Function function( const QCString & field,
- const QWidgetStack *functionStack ) const = 0;
- virtual QString value( const QCString & field,
- const QWidgetStack *functionStack,
- const QWidgetStack *valueStack ) const = 0;
- virtual QString prettyValue( const QCString & field,
- const QWidgetStack *functionStack,
- const QWidgetStack *valueStack ) const = 0;
- virtual bool handlesField( const QCString & field ) const = 0;
- virtual void reset( QWidgetStack *functionStack,
- QWidgetStack *valueStack ) const = 0;
- virtual bool setRule( QWidgetStack *functionStack,
- QWidgetStack *valueStack,
+ virtual TQWidget * createFunctionWidget( int number,
+ TQWidgetStack *functionStack,
+ const TQObject *receiver ) const = 0;
+ virtual TQWidget * createValueWidget( int number,
+ TQWidgetStack *valueStack,
+ const TQObject *receiver ) const = 0;
+ virtual KMSearchRule::Function function( const TQCString & field,
+ const TQWidgetStack *functionStack ) const = 0;
+ virtual TQString value( const TQCString & field,
+ const TQWidgetStack *functionStack,
+ const TQWidgetStack *valueStack ) const = 0;
+ virtual TQString prettyValue( const TQCString & field,
+ const TQWidgetStack *functionStack,
+ const TQWidgetStack *valueStack ) const = 0;
+ virtual bool handlesField( const TQCString & field ) const = 0;
+ virtual void reset( TQWidgetStack *functionStack,
+ TQWidgetStack *valueStack ) const = 0;
+ virtual bool setRule( TQWidgetStack *functionStack,
+ TQWidgetStack *valueStack,
const KMSearchRule *rule ) const = 0;
- virtual bool update( const QCString & field,
- QWidgetStack *functionStack,
- QWidgetStack *valueStack ) const = 0;
+ virtual bool update( const TQCString & field,
+ TQWidgetStack *functionStack,
+ TQWidgetStack *valueStack ) const = 0;
};
diff --git a/kmail/interfaces/urlhandler.h b/kmail/interfaces/urlhandler.h
index 808f3196f..b19b7e199 100644
--- a/kmail/interfaces/urlhandler.h
+++ b/kmail/interfaces/urlhandler.h
@@ -64,13 +64,13 @@ namespace KMail {
@return true if the right-click was handled by this
URLHandler, false otherwise.
*/
- virtual bool handleContextMenuRequest( const KURL & url, const QPoint & p, KMReaderWin * w ) const = 0;
+ virtual bool handleContextMenuRequest( const KURL & url, const TQPoint & p, KMReaderWin * w ) const = 0;
/** Called when hovering over a link.
@return a string to be shown in the status bar while hovering
over this link.
*/
- virtual QString statusBarMessage( const KURL & url, KMReaderWin * w ) const = 0;
+ virtual TQString statusBarMessage( const KURL & url, KMReaderWin * w ) const = 0;
};
} // namespace KMail
diff --git a/kmail/isubject.cpp b/kmail/isubject.cpp
index 13f8e8903..7219dc0e9 100644
--- a/kmail/isubject.cpp
+++ b/kmail/isubject.cpp
@@ -5,7 +5,7 @@
#include "isubject.h"
#include "interfaces/observer.h"
-#include <qtl.h>
+#include <tqtl.h>
#include <kdebug.h>
@@ -23,7 +23,7 @@ namespace KMail {
}
void ISubject::detach( Interface::Observer * pObserver ) {
- QValueVector<Interface::Observer*>::iterator it = qFind( mObserverList.begin(), mObserverList.end(), pObserver );
+ TQValueVector<Interface::Observer*>::iterator it = qFind( mObserverList.begin(), mObserverList.end(), pObserver );
if ( it != mObserverList.end() )
mObserverList.erase( it );
}
@@ -31,7 +31,7 @@ namespace KMail {
void ISubject::notify()
{
kdDebug(5006) << "ISubject::notify " << mObserverList.size() << endl;
- for ( QValueVector<Interface::Observer*>::iterator it = mObserverList.begin() ; it != mObserverList.end() ; ++it )
+ for ( TQValueVector<Interface::Observer*>::iterator it = mObserverList.begin() ; it != mObserverList.end() ; ++it )
(*it)->update( this );
}
diff --git a/kmail/isubject.h b/kmail/isubject.h
index eeb03bb41..93a84a29b 100644
--- a/kmail/isubject.h
+++ b/kmail/isubject.h
@@ -33,7 +33,7 @@
#include "interfaces/observable.h"
-#include <qvaluevector.h>
+#include <tqvaluevector.h>
namespace KMail {
@@ -55,7 +55,7 @@ namespace KMail {
void notify();
private:
- QValueVector<Interface::Observer*> mObserverList;
+ TQValueVector<Interface::Observer*> mObserverList;
};
} // namespace KMail
diff --git a/kmail/jobscheduler.cpp b/kmail/jobscheduler.cpp
index cedb530be..89cabec9e 100644
--- a/kmail/jobscheduler.cpp
+++ b/kmail/jobscheduler.cpp
@@ -34,19 +34,19 @@
using namespace KMail;
-JobScheduler::JobScheduler( QObject* parent, const char* name )
- : QObject( parent, name ), mTimer( this, "mTimer" ),
+JobScheduler::JobScheduler( TQObject* parent, const char* name )
+ : TQObject( parent, name ), mTimer( this, "mTimer" ),
mPendingImmediateTasks( 0 ),
mCurrentTask( 0 ), mCurrentJob( 0 )
{
- connect( &mTimer, SIGNAL( timeout() ), SLOT( slotRunNextJob() ) );
+ connect( &mTimer, TQT_SIGNAL( timeout() ), TQT_SLOT( slotRunNextJob() ) );
// No need to start the internal timer yet, we wait for a task to be scheduled
}
JobScheduler::~JobScheduler()
{
- // delete tasks in tasklist (no autodelete for QValueList)
+ // delete tasks in tasklist (no autodelete for TQValueList)
for( TaskList::Iterator it = mTaskList.begin(); it != mTaskList.end(); ++it ) {
delete (*it);
}
@@ -212,7 +212,7 @@ void JobScheduler::runTaskNow( ScheduledTask* task )
}
// Register the job in the folder. This makes it autodeleted if the folder is deleted.
mCurrentTask->folder()->storage()->addJob( mCurrentJob );
- connect( mCurrentJob, SIGNAL( finished() ), this, SLOT( slotJobFinished() ) );
+ connect( mCurrentJob, TQT_SIGNAL( finished() ), this, TQT_SLOT( slotJobFinished() ) );
mCurrentJob->start();
}
diff --git a/kmail/jobscheduler.h b/kmail/jobscheduler.h
index 531e51a52..2dd04d4ac 100644
--- a/kmail/jobscheduler.h
+++ b/kmail/jobscheduler.h
@@ -29,10 +29,10 @@
#ifndef KMAIL_JOBSCHEDULER_H
#define KMAIL_JOBSCHEDULER_H
-#include <qobject.h>
-#include <qvaluelist.h>
-#include <qguardedptr.h>
-#include <qtimer.h>
+#include <tqobject.h>
+#include <tqvaluelist.h>
+#include <tqguardedptr.h>
+#include <tqtimer.h>
#include "folderjob.h"
@@ -69,7 +69,7 @@ public:
/// If for some reason (e.g. folder deleted) nothing should be done, return 0.
virtual ScheduledJob* run() = 0;
- /// An identifier for the type of task (a bit like QListViewItem::rtti)
+ /// An identifier for the type of task (a bit like TQListViewItem::rtti)
/// This allows to automatically prevent two identical tasks from being scheduled
/// for the same folder. To circumvent this feature and make every task
/// unique, return 0 here.
@@ -81,7 +81,7 @@ public:
bool isImmediate() const { return mImmediate; }
private:
- QGuardedPtr<KMFolder> mCurrentFolder;
+ TQGuardedPtr<KMFolder> mCurrentFolder;
bool mImmediate;
};
@@ -97,7 +97,7 @@ class JobScheduler : public QObject
{
Q_OBJECT
public:
- JobScheduler( QObject* parent, const char* name = 0 );
+ JobScheduler( TQObject* parent, const char* name = 0 );
~JobScheduler();
/// Register a task to be done for a given folder
@@ -123,12 +123,12 @@ private:
void restartTimer();
void interruptCurrentTask();
void runTaskNow( ScheduledTask* task );
- typedef QValueList<ScheduledTask *> TaskList;
+ typedef TQValueList<ScheduledTask *> TaskList;
void removeTask( TaskList::Iterator& it );
private:
TaskList mTaskList; // FIFO of tasks to be run
- QTimer mTimer;
+ TQTimer mTimer;
int mPendingImmediateTasks;
/// Information about the currently running job, if any
diff --git a/kmail/kcm_kmail.cpp b/kmail/kcm_kmail.cpp
index 985acf6d6..3ba43637d 100644
--- a/kmail/kcm_kmail.cpp
+++ b/kmail/kcm_kmail.cpp
@@ -31,7 +31,7 @@
//----------------------------
extern "C"
{
- KDE_EXPORT KCModule *create_kmail_config_misc( QWidget *parent, const char * )
+ KDE_EXPORT KCModule *create_kmail_config_misc( TQWidget *parent, const char * )
{
MiscPage *page = new MiscPage( parent, "kcmkmail_config_misc" );
return page;
@@ -40,7 +40,7 @@ extern "C"
extern "C"
{
- KDE_EXPORT KCModule *create_kmail_config_appearance( QWidget *parent, const char * )
+ KDE_EXPORT KCModule *create_kmail_config_appearance( TQWidget *parent, const char * )
{
AppearancePage *page =
new AppearancePage( parent, "kcmkmail_config_appearance" );
@@ -50,7 +50,7 @@ extern "C"
extern "C"
{
- KDE_EXPORT KCModule *create_kmail_config_composer( QWidget *parent, const char * )
+ KDE_EXPORT KCModule *create_kmail_config_composer( TQWidget *parent, const char * )
{
ComposerPage *page = new ComposerPage( parent, "kcmkmail_config_composer" );
return page;
@@ -59,7 +59,7 @@ extern "C"
extern "C"
{
- KDE_EXPORT KCModule *create_kmail_config_identity( QWidget *parent, const char * )
+ KDE_EXPORT KCModule *create_kmail_config_identity( TQWidget *parent, const char * )
{
IdentityPage *page = new IdentityPage( parent, "kcmkmail_config_identity" );
return page;
@@ -68,7 +68,7 @@ extern "C"
extern "C"
{
- KDE_EXPORT KCModule *create_kmail_config_accounts( QWidget *parent, const char * )
+ KDE_EXPORT KCModule *create_kmail_config_accounts( TQWidget *parent, const char * )
{
AccountsPage *page = new AccountsPage( parent, "kcmkmail_config_accounts" );
return page;
@@ -77,7 +77,7 @@ extern "C"
extern "C"
{
- KDE_EXPORT KCModule *create_kmail_config_security( QWidget *parent, const char * )
+ KDE_EXPORT KCModule *create_kmail_config_security( TQWidget *parent, const char * )
{
SecurityPage *page = new SecurityPage( parent, "kcmkmail_config_security" );
return page;
diff --git a/kmail/kcursorsaver.h b/kmail/kcursorsaver.h
index 930cab6f0..c18b42971 100644
--- a/kmail/kcursorsaver.h
+++ b/kmail/kcursorsaver.h
@@ -1,8 +1,8 @@
#ifndef kcursorsaver_h
#define kcursorsaver_h
-#include <qcursor.h>
-#include <qapplication.h>
+#include <tqcursor.h>
+#include <tqapplication.h>
/**
* @short sets a cursor and makes sure it's restored on destruction
@@ -13,9 +13,9 @@
class KCursorSaver : public Qt
{
public:
- /// constructor taking QCursor shapes
+ /// constructor taking TQCursor shapes
KCursorSaver(Qt::CursorShape shape) {
- QApplication::setOverrideCursor( QCursor(shape) );
+ TQApplication::setOverrideCursor( TQCursor(shape) );
inited = true;
}
@@ -27,12 +27,12 @@ public:
/// restore the cursor
~KCursorSaver() {
if (inited)
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
}
/// call this to explitly restore the cursor
inline void restoreCursor(void) {
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
inited = false;
}
@@ -51,10 +51,10 @@ private:
*/
namespace KBusyPtr {
inline KCursorSaver idle() {
- return KCursorSaver(QCursor::ArrowCursor);
+ return KCursorSaver(TQCursor::ArrowCursor);
}
inline KCursorSaver busy() {
- return KCursorSaver(QCursor::WaitCursor);
+ return KCursorSaver(TQCursor::WaitCursor);
}
}
diff --git a/kmail/keyresolver.cpp b/kmail/keyresolver.cpp
index 2161031fb..e35a7f5f9 100644
--- a/kmail/keyresolver.cpp
+++ b/kmail/keyresolver.cpp
@@ -58,8 +58,8 @@
#include <kinputdialog.h>
#include <kmessagebox.h>
-#include <qstringlist.h>
-#include <qtl.h>
+#include <tqstringlist.h>
+#include <tqtl.h>
#include <time.h>
@@ -81,7 +81,7 @@ static inline bool EmptyKeyList( const Kleo::KeyApprovalDialog::Item & item ) {
return item.keys.empty();
}
-static inline QString ItemDotAddress( const Kleo::KeyResolver::Item & item ) {
+static inline TQString ItemDotAddress( const Kleo::KeyResolver::Item & item ) {
return item.address;
}
@@ -191,15 +191,15 @@ static inline bool NotValidSMIMESigningKey( const GpgME::Key & key ) {
return !ValidSMIMESigningKey( key );
}
-static QStringList keysAsStrings( const std::vector<GpgME::Key>& keys ) {
- QStringList strings;
+static TQStringList keysAsStrings( const std::vector<GpgME::Key>& keys ) {
+ TQStringList strings;
for ( std::vector<GpgME::Key>::const_iterator it = keys.begin() ; it != keys.end() ; ++it ) {
assert( !(*it).userID(0).isNull() );
- QString keyLabel = QString::fromUtf8( (*it).userID(0).email() );
+ TQString keyLabel = TQString::fromUtf8( (*it).userID(0).email() );
if ( keyLabel.isEmpty() )
- keyLabel = QString::fromUtf8( (*it).userID(0).name() );
+ keyLabel = TQString::fromUtf8( (*it).userID(0).name() );
if ( keyLabel.isEmpty() )
- keyLabel = QString::fromUtf8( (*it).userID(0).id() );
+ keyLabel = TQString::fromUtf8( (*it).userID(0).id() );
strings.append( keyLabel );
}
return strings;
@@ -231,7 +231,7 @@ static inline std::vector<GpgME::Key> TrustedOrConfirmed( const std::vector<GpgM
return keys;
// if some keys are not fully trusted, let the user confirm their use
- QString msg = i18n("One or more of your configured OpenPGP encryption "
+ TQString msg = i18n("One or more of your configured OpenPGP encryption "
"keys or S/MIME certificates is not fully trusted "
"for encryption.");
@@ -451,8 +451,8 @@ namespace {
} // anon namespace
-static QString canonicalAddress( const QString & _address ) {
- const QString address = KPIM::getEmailAddress( _address );
+static TQString canonicalAddress( const TQString & _address ) {
+ const TQString address = KPIM::getEmailAddress( _address );
if ( address.find('@') == -1 ) {
// local address
//char hostname[1024];
@@ -471,7 +471,7 @@ struct FormatInfo {
};
struct Kleo::KeyResolver::Private {
- std::set<QCString> alreadyWarnedFingerprints;
+ std::set<TQCString> alreadyWarnedFingerprints;
std::vector<GpgME::Key> mOpenPGPSigningKeys; // signing
std::vector<GpgME::Key> mSMIMESigningKeys; // signing
@@ -485,7 +485,7 @@ struct Kleo::KeyResolver::Private {
std::map<CryptoMessageFormat,FormatInfo> mFormatInfoMap;
// key=email address, value=crypto preferences for this contact (from kabc)
- typedef std::map<QString, ContactPreferences> ContactPreferencesMap;
+ typedef std::map<TQString, ContactPreferences> ContactPreferencesMap;
ContactPreferencesMap mContactPreferencesMap;
};
@@ -545,7 +545,7 @@ Kpgp::Result Kleo::KeyResolver::checkKeyNearExpiry( const GpgME::Key & key, cons
? signingKeyNearExpiryWarningThresholdInDays()
: encryptKeyNearExpiryWarningThresholdInDays() );
if ( threshold > -1 && daysTillExpiry <= threshold ) {
- const QString msg =
+ const TQString msg =
key.protocol() == GpgME::Context::OpenPGP
? ( mine ? sign
? i18n("<p>Your OpenPGP signing key</p><p align=center><b>%1</b> (KeyID 0x%2)</p>"
@@ -562,7 +562,7 @@ Kpgp::Result Kleo::KeyResolver::checkKeyNearExpiry( const GpgME::Key & key, cons
"<p>expires in less than a day.</p>",
"<p>The OpenPGP key for</p><p align=center><b>%1</b> (KeyID 0x%2)</p>"
"<p>expires in less than %n days.</p>",
- daysTillExpiry ) ).arg( QString::fromUtf8( key.userID(0).id() ),
+ daysTillExpiry ) ).arg( TQString::fromUtf8( key.userID(0).id() ),
key.shortKeyID() )
: ( ca
? ( key.isRoot()
@@ -650,7 +650,7 @@ Kpgp::Result Kleo::KeyResolver::checkKeyNearExpiry( const GpgME::Key & key, cons
return Kpgp::Ok;
}
-Kpgp::Result Kleo::KeyResolver::setEncryptToSelfKeys( const QStringList & fingerprints ) {
+Kpgp::Result Kleo::KeyResolver::setEncryptToSelfKeys( const TQStringList & fingerprints ) {
if ( !encryptToSelf() )
return Kpgp::Ok;
@@ -665,7 +665,7 @@ Kpgp::Result Kleo::KeyResolver::setEncryptToSelfKeys( const QStringList & finger
if ( d->mOpenPGPEncryptToSelfKeys.size() + d->mSMIMEEncryptToSelfKeys.size()
< keys.size() ) {
// too few keys remain...
- const QString msg = i18n("One or more of your configured OpenPGP encryption "
+ const TQString msg = i18n("One or more of your configured OpenPGP encryption "
"keys or S/MIME certificates is not usable for "
"encryption. Please reconfigure your encryption keys "
"and certificates for this identity in the identity "
@@ -698,7 +698,7 @@ Kpgp::Result Kleo::KeyResolver::setEncryptToSelfKeys( const QStringList & finger
return Kpgp::Ok;
}
-Kpgp::Result Kleo::KeyResolver::setSigningKeys( const QStringList & fingerprints ) {
+Kpgp::Result Kleo::KeyResolver::setSigningKeys( const TQStringList & fingerprints ) {
std::vector<GpgME::Key> keys = lookup( fingerprints, true ); // secret keys
std::remove_copy_if( keys.begin(), keys.end(),
std::back_inserter( d->mOpenPGPSigningKeys ),
@@ -709,7 +709,7 @@ Kpgp::Result Kleo::KeyResolver::setSigningKeys( const QStringList & fingerprints
if ( d->mOpenPGPSigningKeys.size() + d->mSMIMESigningKeys.size() < keys.size() ) {
// too few keys remain...
- const QString msg = i18n("One or more of your configured OpenPGP signing keys "
+ const TQString msg = i18n("One or more of your configured OpenPGP signing keys "
"or S/MIME signing certificates is not usable for "
"signing. Please reconfigure your signing keys "
"and certificates for this identity in the identity "
@@ -742,19 +742,19 @@ Kpgp::Result Kleo::KeyResolver::setSigningKeys( const QStringList & fingerprints
return Kpgp::Ok;
}
-void Kleo::KeyResolver::setPrimaryRecipients( const QStringList & addresses ) {
+void Kleo::KeyResolver::setPrimaryRecipients( const TQStringList & addresses ) {
d->mPrimaryEncryptionKeys = getEncryptionItems( addresses );
}
-void Kleo::KeyResolver::setSecondaryRecipients( const QStringList & addresses ) {
+void Kleo::KeyResolver::setSecondaryRecipients( const TQStringList & addresses ) {
d->mSecondaryEncryptionKeys = getEncryptionItems( addresses );
}
-std::vector<Kleo::KeyResolver::Item> Kleo::KeyResolver::getEncryptionItems( const QStringList & addresses ) {
+std::vector<Kleo::KeyResolver::Item> Kleo::KeyResolver::getEncryptionItems( const TQStringList & addresses ) {
std::vector<Item> items;
items.reserve( addresses.size() );
- for ( QStringList::const_iterator it = addresses.begin() ; it != addresses.end() ; ++it ) {
- QString addr = canonicalAddress( *it ).lower();
+ for ( TQStringList::const_iterator it = addresses.begin() ; it != addresses.end() ; ++it ) {
+ TQString addr = canonicalAddress( *it ).lower();
const ContactPreferences pref = lookupContactPreferences( addr );
items.push_back( Item( *it, /*getEncryptionKeys( *it, true ),*/
@@ -883,7 +883,7 @@ Kpgp::Result Kleo::KeyResolver::resolveEncryptionKeys( bool signingRequested ) {
it->keys = getEncryptionKeys( it->address, false );
if ( it->keys.empty() )
return Kpgp::Canceled;
- QString addr = canonicalAddress( it->address ).lower();
+ TQString addr = canonicalAddress( it->address ).lower();
const ContactPreferences pref = lookupContactPreferences( addr );
it->pref = pref.encryptionPreference;
it->signPref = pref.signingPreference;
@@ -896,7 +896,7 @@ Kpgp::Result Kleo::KeyResolver::resolveEncryptionKeys( bool signingRequested ) {
it->keys = getEncryptionKeys( it->address, false );
if ( it->keys.empty() )
return Kpgp::Canceled;
- QString addr = canonicalAddress( it->address ).lower();
+ TQString addr = canonicalAddress( it->address ).lower();
const ContactPreferences pref = lookupContactPreferences( addr );
it->pref = pref.encryptionPreference;
it->signPref = pref.signingPreference;
@@ -977,7 +977,7 @@ Kpgp::Result Kleo::KeyResolver::resolveEncryptionKeys( bool signingRequested ) {
!encryptionItems( OpenPGPMIMEFormat ).empty() ) {
// need them
if ( d->mOpenPGPEncryptToSelfKeys.empty() ) {
- const QString msg = i18n("Examination of recipient's encryption preferences "
+ const TQString msg = i18n("Examination of recipient's encryption preferences "
"yielded that the message should be encrypted using "
"OpenPGP, at least for some recipients;\n"
"however, you have not configured valid trusted "
@@ -1004,7 +1004,7 @@ Kpgp::Result Kleo::KeyResolver::resolveEncryptionKeys( bool signingRequested ) {
// need them
if ( d->mSMIMEEncryptToSelfKeys.empty() ) {
// don't have one
- const QString msg = i18n("Examination of recipient's encryption preferences "
+ const TQString msg = i18n("Examination of recipient's encryption preferences "
"yielded that the message should be encrypted using "
"S/MIME, at least for some recipients;\n"
"however, you have not configured valid "
@@ -1034,7 +1034,7 @@ Kpgp::Result Kleo::KeyResolver::resolveSigningKeysForEncryption() {
if ( ( !encryptionItems( InlineOpenPGPFormat ).empty() ||
!encryptionItems( OpenPGPMIMEFormat ).empty() )
&& d->mOpenPGPSigningKeys.empty() ) {
- const QString msg = i18n("Examination of recipient's signing preferences "
+ const TQString msg = i18n("Examination of recipient's signing preferences "
"yielded that the message should be signed using "
"OpenPGP, at least for some recipients;\n"
"however, you have not configured valid "
@@ -1050,7 +1050,7 @@ Kpgp::Result Kleo::KeyResolver::resolveSigningKeysForEncryption() {
if ( ( !encryptionItems( SMIMEFormat ).empty() ||
!encryptionItems( SMIMEOpaqueFormat ).empty() )
&& d->mSMIMESigningKeys.empty() ) {
- const QString msg = i18n("Examination of recipient's signing preferences "
+ const TQString msg = i18n("Examination of recipient's signing preferences "
"yielded that the message should be signed using "
"S/MIME, at least for some recipients;\n"
"however, you have not configured valid "
@@ -1113,7 +1113,7 @@ Kpgp::Result Kleo::KeyResolver::resolveSigningKeysForSigningOnly() {
return Kpgp::Ok;
}
- const QString msg = i18n("Examination of recipient's signing preferences "
+ const TQString msg = i18n("Examination of recipient's signing preferences "
"showed no common type of signature matching your "
"available signing keys.\n"
"Send message without signing?" );
@@ -1142,8 +1142,8 @@ std::vector<GpgME::Key> Kleo::KeyResolver::encryptToSelfKeysFor( CryptoMessageFo
return std::vector<GpgME::Key>();
}
-QStringList Kleo::KeyResolver::allRecipients() const {
- QStringList result;
+TQStringList Kleo::KeyResolver::allRecipients() const {
+ TQStringList result;
std::transform( d->mPrimaryEncryptionKeys.begin(), d->mPrimaryEncryptionKeys.end(),
std::back_inserter( result ), ItemDotAddress );
std::transform( d->mSecondaryEncryptionKeys.begin(), d->mSecondaryEncryptionKeys.end(),
@@ -1243,7 +1243,7 @@ Kpgp::Result Kleo::KeyResolver::showKeyApprovalDialog() {
Kleo::KeyApprovalDialog dlg( items, senderKeys );
- if ( dlg.exec() == QDialog::Rejected )
+ if ( dlg.exec() == TQDialog::Rejected )
return Kpgp::Canceled;
items = dlg.items();
@@ -1272,7 +1272,7 @@ Kpgp::Result Kleo::KeyResolver::showKeyApprovalDialog() {
// show a warning if the user didn't select an encryption key for
// herself:
if ( encryptToSelf() && senderKeys.empty() ) {
- const QString msg = i18n("You did not select an encryption key for yourself "
+ const TQString msg = i18n("You did not select an encryption key for yourself "
"(encrypt to self). You will not be able to decrypt "
"your own message if you encrypt it.");
if ( KMessageBox::warningContinueCancel( 0, msg,
@@ -1291,7 +1291,7 @@ Kpgp::Result Kleo::KeyResolver::showKeyApprovalDialog() {
// show a warning if the user didn't select an encryption key for
// some of the recipients
if ( items.size() == emptyListCount ) {
- const QString msg = ( d->mPrimaryEncryptionKeys.size() +
+ const TQString msg = ( d->mPrimaryEncryptionKeys.size() +
d->mSecondaryEncryptionKeys.size() == 1 )
? i18n("You did not select an encryption key for the "
"recipient of this message; therefore, the message "
@@ -1305,7 +1305,7 @@ Kpgp::Result Kleo::KeyResolver::showKeyApprovalDialog() {
== KMessageBox::Cancel )
return Kpgp::Canceled;
} else if ( emptyListCount > 0 ) {
- const QString msg = ( emptyListCount == 1 )
+ const TQString msg = ( emptyListCount == 1 )
? i18n("You did not select an encryption key for one of "
"the recipients: this person will not be able to "
"decrypt the message if you encrypt it.")
@@ -1363,13 +1363,13 @@ std::vector<GpgME::Key> Kleo::KeyResolver::signingKeys( CryptoMessageFormat f )
//
-std::vector<GpgME::Key> Kleo::KeyResolver::selectKeys( const QString & person, const QString & msg, const std::vector<GpgME::Key> & selectedKeys ) const {
+std::vector<GpgME::Key> Kleo::KeyResolver::selectKeys( const TQString & person, const TQString & msg, const std::vector<GpgME::Key> & selectedKeys ) const {
Kleo::KeySelectionDialog dlg( i18n("Encryption Key Selection"),
msg, selectedKeys,
Kleo::KeySelectionDialog::ValidEncryptionKeys,
true, true ); // multi-selection and "remember choice" box
- if ( dlg.exec() != QDialog::Accepted )
+ if ( dlg.exec() != TQDialog::Accepted )
return std::vector<GpgME::Key>();
std::vector<GpgME::Key> keys = dlg.selectedKeys();
keys.erase( std::remove_if( keys.begin(), keys.end(),
@@ -1381,12 +1381,12 @@ std::vector<GpgME::Key> Kleo::KeyResolver::selectKeys( const QString & person, c
}
-std::vector<GpgME::Key> Kleo::KeyResolver::getEncryptionKeys( const QString & person, bool quiet ) const {
+std::vector<GpgME::Key> Kleo::KeyResolver::getEncryptionKeys( const TQString & person, bool quiet ) const {
- const QString address = canonicalAddress( person ).lower();
+ const TQString address = canonicalAddress( person ).lower();
// First look for this person's address in the address->key dictionary
- const QStringList fingerprints = keysForAddress( address );
+ const TQStringList fingerprints = keysForAddress( address );
if ( !fingerprints.empty() ) {
kdDebug() << "Using encryption keys 0x"
@@ -1463,7 +1463,7 @@ std::vector<GpgME::Key> Kleo::KeyResolver::getEncryptionKeys( const QString & pe
}
-std::vector<GpgME::Key> Kleo::KeyResolver::lookup( const QStringList & patterns, bool secret ) const {
+std::vector<GpgME::Key> Kleo::KeyResolver::lookup( const TQStringList & patterns, bool secret ) const {
if ( patterns.empty() )
return std::vector<GpgME::Key>();
kdDebug() << "Kleo::KeyResolver::lookup( \"" << patterns.join( "\", \"" )
@@ -1529,7 +1529,7 @@ void Kleo::KeyResolver::addKeys( const std::vector<Item> & items ) {
dump();
}
-Kleo::KeyResolver::ContactPreferences Kleo::KeyResolver::lookupContactPreferences( const QString& address ) const
+Kleo::KeyResolver::ContactPreferences Kleo::KeyResolver::lookupContactPreferences( const TQString& address ) const
{
const Private::ContactPreferencesMap::iterator it =
d->mContactPreferencesMap.find( address );
@@ -1541,21 +1541,21 @@ Kleo::KeyResolver::ContactPreferences Kleo::KeyResolver::lookupContactPreference
ContactPreferences pref;
if ( !res.isEmpty() ) {
KABC::Addressee addr = res.first();
- QString encryptPref = addr.custom( "KADDRESSBOOK", "CRYPTOENCRYPTPREF" );
+ TQString encryptPref = addr.custom( "KADDRESSBOOK", "CRYPTOENCRYPTPREF" );
pref.encryptionPreference = Kleo::stringToEncryptionPreference( encryptPref );
- QString signPref = addr.custom( "KADDRESSBOOK", "CRYPTOSIGNPREF" );
+ TQString signPref = addr.custom( "KADDRESSBOOK", "CRYPTOSIGNPREF" );
pref.signingPreference = Kleo::stringToSigningPreference( signPref );
- QString cryptoFormats = addr.custom( "KADDRESSBOOK", "CRYPTOPROTOPREF" );
+ TQString cryptoFormats = addr.custom( "KADDRESSBOOK", "CRYPTOPROTOPREF" );
pref.cryptoMessageFormat = Kleo::stringToCryptoMessageFormat( cryptoFormats );
- pref.pgpKeyFingerprints = QStringList::split( ',', addr.custom( "KADDRESSBOOK", "OPENPGPFP" ) );
- pref.smimeCertFingerprints = QStringList::split( ',', addr.custom( "KADDRESSBOOK", "SMIMEFP" ) );
+ pref.pgpKeyFingerprints = TQStringList::split( ',', addr.custom( "KADDRESSBOOK", "OPENPGPFP" ) );
+ pref.smimeCertFingerprints = TQStringList::split( ',', addr.custom( "KADDRESSBOOK", "SMIMEFP" ) );
}
// insert into map and grab resulting iterator
d->mContactPreferencesMap.insert( std::make_pair( address, pref ) );
return pref;
}
-void Kleo::KeyResolver::saveContactPreference( const QString& email, const ContactPreferences& pref ) const
+void Kleo::KeyResolver::saveContactPreference( const TQString& email, const ContactPreferences& pref ) const
{
d->mContactPreferencesMap.insert( std::make_pair( email, pref ) );
KABC::AddressBook *ab = KABC::StdAddressBook::self( true );
@@ -1564,7 +1564,7 @@ void Kleo::KeyResolver::saveContactPreference( const QString& email, const Conta
KABC::Addressee addr;
if ( res.isEmpty() ) {
bool ok = true;
- QString fullName = KInputDialog::getText( i18n( "Name Selection" ), i18n( "Which name shall the contact '%1' have in your addressbook?" ).arg( email ), QString::null, &ok );
+ TQString fullName = KInputDialog::getText( i18n( "Name Selection" ), i18n( "Which name shall the contact '%1' have in your addressbook?" ).arg( email ), TQString::null, &ok );
if ( ok ) {
addr.setNameFromString( fullName );
addr.insertEmail( email, true );
@@ -1594,20 +1594,20 @@ Kleo::KeyResolver::ContactPreferences::ContactPreferences()
{
}
-QStringList Kleo::KeyResolver::keysForAddress( const QString & address ) const {
+TQStringList Kleo::KeyResolver::keysForAddress( const TQString & address ) const {
if( address.isEmpty() ) {
- return QStringList();
+ return TQStringList();
}
- QString addr = canonicalAddress( address ).lower();
+ TQString addr = canonicalAddress( address ).lower();
const ContactPreferences pref = lookupContactPreferences( addr );
return pref.pgpKeyFingerprints + pref.smimeCertFingerprints;
}
-void Kleo::KeyResolver::setKeysForAddress( const QString& address, const QStringList& pgpKeyFingerprints, const QStringList& smimeCertFingerprints ) const {
+void Kleo::KeyResolver::setKeysForAddress( const TQString& address, const TQStringList& pgpKeyFingerprints, const TQStringList& smimeCertFingerprints ) const {
if( address.isEmpty() ) {
return;
}
- QString addr = canonicalAddress( address ).lower();
+ TQString addr = canonicalAddress( address ).lower();
ContactPreferences pref = lookupContactPreferences( addr );
pref.pgpKeyFingerprints = pgpKeyFingerprints;
pref.smimeCertFingerprints = smimeCertFingerprints;
diff --git a/kmail/keyresolver.h b/kmail/keyresolver.h
index 8cb7ebbb1..1232d560c 100644
--- a/kmail/keyresolver.h
+++ b/kmail/keyresolver.h
@@ -143,12 +143,12 @@ namespace Kleo {
signPref( UnknownSigningPreference ),
format( AutoFormat ),
needKeys( true ) {}
- Item( const QString & a,
+ Item( const TQString & a,
EncryptionPreference e, SigningPreference s,
CryptoMessageFormat f )
: KeyApprovalDialog::Item( a, std::vector<GpgME::Key>(), e ),
signPref( s ), format( f ), needKeys( true ) {}
- Item( const QString & a, const std::vector<GpgME::Key> & k,
+ Item( const TQString & a, const std::vector<GpgME::Key> & k,
EncryptionPreference e, SigningPreference s,
CryptoMessageFormat f )
: KeyApprovalDialog::Item( a, k, e ),
@@ -165,22 +165,22 @@ namespace Kleo {
self. Also looks them up and complains if they're not usable or
found.
*/
- Kpgp::Result setEncryptToSelfKeys( const QStringList & fingerprints );
+ Kpgp::Result setEncryptToSelfKeys( const TQStringList & fingerprints );
/**
Set the fingerprints of keys to be used for signing. Also
looks them up and complains if they're not usable or found.
*/
- Kpgp::Result setSigningKeys( const QStringList & fingerprints );
+ Kpgp::Result setSigningKeys( const TQStringList & fingerprints );
/**
Set the list of primary (To/CC) recipient addresses. Also looks
up possible keys, but doesn't interact with the user.
*/
- void setPrimaryRecipients( const QStringList & addresses );
+ void setPrimaryRecipients( const TQStringList & addresses );
/**
Set the list of secondary (BCC) recipient addresses. Also looks
up possible keys, but doesn't interact with the user.
*/
- void setSecondaryRecipients( const QStringList & addresses );
+ void setSecondaryRecipients( const TQStringList & addresses );
/**
@@ -210,10 +210,10 @@ namespace Kleo {
struct SplitInfo {
SplitInfo() {}
- SplitInfo( const QStringList & r ) : recipients( r ) {}
- SplitInfo( const QStringList & r, const std::vector<GpgME::Key> & k )
+ SplitInfo( const TQStringList & r ) : recipients( r ) {}
+ SplitInfo( const TQStringList & r, const std::vector<GpgME::Key> & k )
: recipients( r ), keys( k ) {}
- QStringList recipients;
+ TQStringList recipients;
std::vector<GpgME::Key> keys;
};
/** @return the found distinct sets of items for format \a f. The
@@ -224,8 +224,8 @@ namespace Kleo {
private:
void dump() const;
- std::vector<Item> getEncryptionItems( const QStringList & recipients );
- std::vector<GpgME::Key> getEncryptionKeys( const QString & recipient, bool quiet ) const;
+ std::vector<Item> getEncryptionItems( const TQStringList & recipients );
+ std::vector<GpgME::Key> getEncryptionKeys( const TQString & recipient, bool quiet ) const;
Kpgp::Result showKeyApprovalDialog();
@@ -242,19 +242,19 @@ namespace Kleo {
void addToAllSplitInfos( const std::vector<GpgME::Key> & keys, unsigned int formats );
void addKeys( const std::vector<Item> & items, CryptoMessageFormat f );
void addKeys( const std::vector<Item> & items );
- QStringList allRecipients() const;
+ TQStringList allRecipients() const;
std::vector<GpgME::Key> signingKeysFor( CryptoMessageFormat f ) const;
std::vector<GpgME::Key> encryptToSelfKeysFor( CryptoMessageFormat f ) const;
- std::vector<GpgME::Key> lookup( const QStringList & patterns, bool secret=false ) const;
+ std::vector<GpgME::Key> lookup( const TQStringList & patterns, bool secret=false ) const;
- bool haveTrustedEncryptionKey( const QString & person ) const;
+ bool haveTrustedEncryptionKey( const TQString & person ) const;
- std::vector<GpgME::Key> selectKeys( const QString & person, const QString & msg,
+ std::vector<GpgME::Key> selectKeys( const TQString & person, const TQString & msg,
const std::vector<GpgME::Key> & selectedKeys=std::vector<GpgME::Key>() ) const;
- QStringList keysForAddress( const QString & address ) const;
- void setKeysForAddress( const QString & address, const QStringList& pgpKeyFingerprints, const QStringList& smimeCertFingerprints ) const;
+ TQStringList keysForAddress( const TQString & address ) const;
+ void setKeysForAddress( const TQString & address, const TQStringList& pgpKeyFingerprints, const TQStringList& smimeCertFingerprints ) const;
bool encryptToSelf() const { return mEncryptToSelf; }
bool showApprovalDialog() const { return mShowApprovalDialog; }
@@ -285,12 +285,12 @@ namespace Kleo {
Kleo::EncryptionPreference encryptionPreference;
Kleo::SigningPreference signingPreference;
Kleo::CryptoMessageFormat cryptoMessageFormat;
- QStringList pgpKeyFingerprints;
- QStringList smimeCertFingerprints;
+ TQStringList pgpKeyFingerprints;
+ TQStringList smimeCertFingerprints;
};
- ContactPreferences lookupContactPreferences( const QString& address ) const;
- void saveContactPreference( const QString& email, const ContactPreferences& pref ) const;
+ ContactPreferences lookupContactPreferences( const TQString& address ) const;
+ void saveContactPreference( const TQString& email, const ContactPreferences& pref ) const;
private:
class EncryptionPreferenceCounter;
diff --git a/kmail/khtmlparthtmlwriter.cpp b/kmail/khtmlparthtmlwriter.cpp
index 643d743c2..dfc9fd358 100644
--- a/kmail/khtmlparthtmlwriter.cpp
+++ b/kmail/khtmlparthtmlwriter.cpp
@@ -47,19 +47,19 @@
namespace KMail {
KHtmlPartHtmlWriter::KHtmlPartHtmlWriter( KHTMLPart * part,
- QObject * parent, const char * name )
- : QObject( parent, name ), HtmlWriter(),
+ TQObject * parent, const char * name )
+ : TQObject( parent, name ), HtmlWriter(),
mHtmlPart( part ), mState( Ended ), mHtmlTimer( 0, "mHtmlTimer" )
{
assert( part );
- connect( &mHtmlTimer, SIGNAL(timeout()), SLOT(slotWriteNextHtmlChunk()) );
+ connect( &mHtmlTimer, TQT_SIGNAL(timeout()), TQT_SLOT(slotWriteNextHtmlChunk()) );
}
KHtmlPartHtmlWriter::~KHtmlPartHtmlWriter() {
}
- void KHtmlPartHtmlWriter::begin( const QString & css ) {
+ void KHtmlPartHtmlWriter::begin( const TQString & css ) {
if ( mState != Ended ) {
kdWarning( 5006 ) << "KHtmlPartHtmlWriter: begin() called on non-ended session!" << endl;
reset();
@@ -70,7 +70,7 @@ namespace KMail {
// clear the widget:
mHtmlPart->view()->setUpdatesEnabled( false );
mHtmlPart->view()->viewport()->setUpdatesEnabled( false );
- static_cast<QScrollView *>(mHtmlPart->widget())->ensureVisible( 0, 0 );
+ static_cast<TQScrollView *>(mHtmlPart->widget())->ensureVisible( 0, 0 );
mHtmlPart->begin( KURL( "file:/" ) );
if ( !css.isEmpty() )
@@ -100,12 +100,12 @@ namespace KMail {
mState = Ended;
}
- void KHtmlPartHtmlWriter::write( const QString & str ) {
+ void KHtmlPartHtmlWriter::write( const TQString & str ) {
kdWarning( mState != Begun, 5006 ) << "KHtmlPartHtmlWriter: write() called in Ended or Queued state!" << endl;
mHtmlPart->write( str );
}
- void KHtmlPartHtmlWriter::queue( const QString & str ) {
+ void KHtmlPartHtmlWriter::queue( const TQString & str ) {
static const uint chunksize = 16384;
for ( uint pos = 0 ; pos < str.length() ; pos += chunksize )
mHtmlQueue.push_back( str.mid( pos, chunksize ) );
@@ -127,9 +127,9 @@ namespace KMail {
}
}
- void KHtmlPartHtmlWriter::embedPart( const QCString & contentId,
- const QString & contentURL ) {
- mEmbeddedPartMap[QString(contentId)] = contentURL;
+ void KHtmlPartHtmlWriter::embedPart( const TQCString & contentId,
+ const TQString & contentURL ) {
+ mEmbeddedPartMap[TQString(contentId)] = contentURL;
}
void KHtmlPartHtmlWriter::resolveCidUrls()
diff --git a/kmail/khtmlparthtmlwriter.h b/kmail/khtmlparthtmlwriter.h
index 92eb15a91..82679d1e6 100644
--- a/kmail/khtmlparthtmlwriter.h
+++ b/kmail/khtmlparthtmlwriter.h
@@ -33,32 +33,32 @@
#define __KMAIL_KHTMLPARTHTMLWRITER_H__
#include "interfaces/htmlwriter.h"
-#include <qobject.h>
+#include <tqobject.h>
-#include <qstringlist.h>
-#include <qtimer.h>
+#include <tqstringlist.h>
+#include <tqtimer.h>
class QString;
class KHTMLPart;
namespace KMail {
- class KHtmlPartHtmlWriter : public QObject, public HtmlWriter {
+ class KHtmlPartHtmlWriter : public TQObject, public HtmlWriter {
Q_OBJECT
public:
// Key is Content-Id, value is URL
- typedef QMap<QString, QString> EmbeddedPartMap;
+ typedef TQMap<TQString, TQString> EmbeddedPartMap;
KHtmlPartHtmlWriter( KHTMLPart * part,
- QObject * parent=0, const char * name = 0 );
+ TQObject * parent=0, const char * name = 0 );
virtual ~KHtmlPartHtmlWriter();
- void begin( const QString & cssDefs );
+ void begin( const TQString & cssDefs );
void end();
void reset();
- void write( const QString & str );
- void queue( const QString & str );
+ void write( const TQString & str );
+ void queue( const TQString & str );
void flush();
- void embedPart( const QCString & contentId, const QString & url );
+ void embedPart( const TQCString & contentId, const TQString & url );
private slots:
void slotWriteNextHtmlChunk();
@@ -68,8 +68,8 @@ namespace KMail {
private:
KHTMLPart * mHtmlPart;
- QStringList mHtmlQueue;
- QTimer mHtmlTimer;
+ TQStringList mHtmlQueue;
+ TQTimer mHtmlTimer;
enum State {
Begun,
Queued,
diff --git a/kmail/klistboxdialog.cpp b/kmail/klistboxdialog.cpp
index 030ca3b0a..4249d3bf1 100644
--- a/kmail/klistboxdialog.cpp
+++ b/kmail/klistboxdialog.cpp
@@ -5,13 +5,13 @@
#include "klistboxdialog.h"
-#include <qlabel.h>
-#include <qlayout.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
-KListBoxDialog::KListBoxDialog( QString& _selectedString,
- const QString& caption,
- const QString& labelText,
- QWidget* parent,
+KListBoxDialog::KListBoxDialog( TQString& _selectedString,
+ const TQString& caption,
+ const TQString& labelText,
+ TQWidget* parent,
const char* name,
bool modal )
: KDialogBase( parent, name, modal, caption, Ok|Cancel, Ok, true ),
@@ -22,27 +22,27 @@ KListBoxDialog::KListBoxDialog( QString& _selectedString,
setName( "KListBoxDialog" );
resize( 400, 180 );
- QFrame *page = makeMainWidget();
- QVBoxLayout *topLayout = new QVBoxLayout( page, 0, spacingHint() );
- labelAboveLA = new QLabel( page, "labelAboveLA" );
+ TQFrame *page = makeMainWidget();
+ TQVBoxLayout *topLayout = new TQVBoxLayout( page, 0, spacingHint() );
+ labelAboveLA = new TQLabel( page, "labelAboveLA" );
labelAboveLA->setText( labelText );
topLayout->addWidget( labelAboveLA );
- entriesLB = new QListBox( page, "entriesLB" );
+ entriesLB = new TQListBox( page, "entriesLB" );
topLayout->addWidget( entriesLB );
- commentBelowLA = new QLabel( page, "commentBelowLA" );
+ commentBelowLA = new TQLabel( page, "commentBelowLA" );
commentBelowLA->setText( "" );
topLayout->addWidget( commentBelowLA );
commentBelowLA->hide();
// signals and slots connections
- connect( entriesLB, SIGNAL( highlighted( const QString& ) ),
- this, SLOT( highlighted( const QString& ) ) );
- connect( entriesLB, SIGNAL( selected(int) ),
- SLOT( slotOk() ) );
+ connect( entriesLB, TQT_SIGNAL( highlighted( const TQString& ) ),
+ this, TQT_SLOT( highlighted( const TQString& ) ) );
+ connect( entriesLB, TQT_SIGNAL( selected(int) ),
+ TQT_SLOT( slotOk() ) );
// buddies
labelAboveLA->setBuddy( entriesLB );
}
@@ -55,7 +55,7 @@ KListBoxDialog::~KListBoxDialog()
// no need to delete child widgets, Qt does it all for us
}
-void KListBoxDialog::setLabelAbove(const QString& label)
+void KListBoxDialog::setLabelAbove(const TQString& label)
{
labelAboveLA->setText( label );
if( label.isEmpty() )
@@ -64,7 +64,7 @@ void KListBoxDialog::setLabelAbove(const QString& label)
labelAboveLA->show();
}
-void KListBoxDialog::setCommentBelow(const QString& comment)
+void KListBoxDialog::setCommentBelow(const TQString& comment)
{
commentBelowLA->setText( comment );
if( comment.isEmpty() )
@@ -75,7 +75,7 @@ void KListBoxDialog::setCommentBelow(const QString& comment)
-void KListBoxDialog::highlighted( const QString& txt )
+void KListBoxDialog::highlighted( const TQString& txt )
{
selectedString = txt;
}
diff --git a/kmail/klistboxdialog.h b/kmail/klistboxdialog.h
index 106562332..d0f98ebb6 100644
--- a/kmail/klistboxdialog.h
+++ b/kmail/klistboxdialog.h
@@ -11,26 +11,26 @@ class KListBoxDialog : public KDialogBase
Q_OBJECT
public:
- KListBoxDialog( QString& _selectedString,
- const QString& caption,
- const QString& labelText,
- QWidget* parent = 0,
+ KListBoxDialog( TQString& _selectedString,
+ const TQString& caption,
+ const TQString& labelText,
+ TQWidget* parent = 0,
const char* name = 0,
bool modal = true );
~KListBoxDialog();
- void setLabelAbove( const QString& label );
- void setCommentBelow(const QString& comment);
+ void setLabelAbove( const TQString& label );
+ void setCommentBelow(const TQString& comment);
- QListBox* entriesLB;
+ TQListBox* entriesLB;
private slots:
- void highlighted( const QString& );
+ void highlighted( const TQString& );
protected:
- QString& selectedString;
- QLabel* labelAboveLA;
- QLabel* commentBelowLA;
+ TQString& selectedString;
+ TQLabel* labelAboveLA;
+ TQLabel* commentBelowLA;
};
#endif
diff --git a/kmail/klistviewindexedsearchline.cpp b/kmail/klistviewindexedsearchline.cpp
index 781d23329..78a20dc5b 100644
--- a/kmail/klistviewindexedsearchline.cpp
+++ b/kmail/klistviewindexedsearchline.cpp
@@ -38,7 +38,7 @@
using KMail::HeaderListQuickSearch;
-KListViewIndexedSearchLine::KListViewIndexedSearchLine( QWidget* parent, KListView* listView, KActionCollection* actionCollection, const char* name ):
+KListViewIndexedSearchLine::KListViewIndexedSearchLine( TQWidget* parent, KListView* listView, KActionCollection* actionCollection, const char* name ):
HeaderListQuickSearch( parent, listView, actionCollection, name ),
mFiltering( false )
{
@@ -48,7 +48,7 @@ KListViewIndexedSearchLine::~KListViewIndexedSearchLine() {
}
-void KListViewIndexedSearchLine::updateSearch( const QString& s ) {
+void KListViewIndexedSearchLine::updateSearch( const TQString& s ) {
kdDebug( 5006 ) << "updateSearch( -" << s << "- )" << endl;
mFiltering = false;
if ( !s.isNull() && !s.isEmpty() ) {
@@ -63,7 +63,7 @@ void KListViewIndexedSearchLine::updateSearch( const QString& s ) {
KListViewSearchLine::updateSearch( s );
}
-bool KListViewIndexedSearchLine::itemMatches( const QListViewItem* item, const QString& s ) const {
+bool KListViewIndexedSearchLine::itemMatches( const TQListViewItem* item, const TQString& s ) const {
if ( mFiltering &&
std::binary_search( mResults.begin(), mResults.end(), static_cast<const KMail::HeaderItem*>( item )->msgSerNum() ) )
return true;
diff --git a/kmail/klistviewindexedsearchline.h b/kmail/klistviewindexedsearchline.h
index f067c1cac..17b991d43 100644
--- a/kmail/klistviewindexedsearchline.h
+++ b/kmail/klistviewindexedsearchline.h
@@ -33,7 +33,7 @@
#include <klineedit.h>
#include <klistviewsearchline.h>
#include "headerlistquicksearch.h"
-#include <qhbox.h>
+#include <tqhbox.h>
#include <vector>
@@ -52,7 +52,7 @@ class KDEUI_EXPORT KListViewIndexedSearchLine: public KMail::HeaderListQuickSear
public:
- explicit KListViewIndexedSearchLine(QWidget *parent, KListView *listView, KActionCollection* action, const char *name = 0);
+ explicit KListViewIndexedSearchLine(TQWidget *parent, KListView *listView, KActionCollection* action, const char *name = 0);
~KListViewIndexedSearchLine();
public slots:
@@ -60,10 +60,10 @@ 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);
protected:
- virtual bool itemMatches(const QListViewItem *item, const QString &s) const;
+ virtual bool itemMatches(const TQListViewItem *item, const TQString &s) const;
private:
std::vector<unsigned> mResults;
diff --git a/kmail/kmaccount.cpp b/kmail/kmaccount.cpp
index 65222dd4b..ad0f55b30 100644
--- a/kmail/kmaccount.cpp
+++ b/kmail/kmaccount.cpp
@@ -30,7 +30,7 @@ using KMail::FolderJob;
#include <kdebug.h>
#include <kconfig.h>
-#include <qeventloop.h>
+#include <tqeventloop.h>
#include <stdlib.h>
#include <unistd.h>
@@ -42,8 +42,8 @@ using KMail::FolderJob;
#include "kmaccount.moc"
//-----------------------------------------------------------------------------
-KMPrecommand::KMPrecommand(const QString &precommand, QObject *parent)
- : QObject(parent), mPrecommand(precommand)
+KMPrecommand::KMPrecommand(const TQString &precommand, TQObject *parent)
+ : TQObject(parent), mPrecommand(precommand)
{
BroadcastStatus::instance()->setStatusMsg(
i18n("Executing precommand %1").arg(precommand ));
@@ -51,8 +51,8 @@ KMPrecommand::KMPrecommand(const QString &precommand, QObject *parent)
mPrecommandProcess.setUseShell(true);
mPrecommandProcess << precommand;
- connect(&mPrecommandProcess, SIGNAL(processExited(KProcess *)),
- SLOT(precommandExited(KProcess *)));
+ connect(&mPrecommandProcess, TQT_SIGNAL(processExited(KProcess *)),
+ TQT_SLOT(precommandExited(KProcess *)));
}
//-----------------------------------------------------------------------------
@@ -83,7 +83,7 @@ void KMPrecommand::precommandExited(KProcess *p)
//-----------------------------------------------------------------------------
-KMAccount::KMAccount(AccountManager* aOwner, const QString& aName, uint id)
+KMAccount::KMAccount(AccountManager* aOwner, const TQString& aName, uint id)
: KAccount( id, aName ),
mTrash(KMKernel::self()->trashFolder()->idString()),
mOwner(aOwner),
@@ -116,7 +116,7 @@ KMAccount::~KMAccount()
//-----------------------------------------------------------------------------
-void KMAccount::setName(const QString& aName)
+void KMAccount::setName(const TQString& aName)
{
mName = aName;
}
@@ -144,7 +144,7 @@ void KMAccount::setFolder(KMFolder* aFolder, bool addAccount)
//-----------------------------------------------------------------------------
void KMAccount::readConfig(KConfig& config)
{
- QString folderName;
+ TQString folderName;
mFolder = 0;
folderName = config.readEntry("Folder");
setCheckInterval(config.readNumEntry("check-interval", 0));
@@ -181,7 +181,7 @@ void KMAccount::writeConfig(KConfig& config)
KAccount::writeConfig(config);
config.writeEntry("Type", type());
- config.writeEntry("Folder", mFolder ? mFolder->idString() : QString::null);
+ config.writeEntry("Folder", mFolder ? mFolder->idString() : TQString::null);
config.writeEntry("check-interval", mInterval);
config.writeEntry("check-exclude", mExclude);
config.writePathEntry("precommand", mPrecommand);
@@ -207,7 +207,7 @@ void KMAccount::sendReceipt(KMMessage* aMsg)
KMMessage *newMsg = aMsg->createDeliveryReceipt();
if (newMsg) {
mReceipts.append(newMsg);
- QTimer::singleShot( 0, this, SLOT( sendReceipts() ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( sendReceipts() ) );
}
}
@@ -239,9 +239,9 @@ bool KMAccount::processNewMsg(KMMessage* aMsg)
aMsg->setStatus(KMMsgStatusNew);
}
/*
-QFile fileD0( "testdat_xx-kmaccount-0" );
+TQFile fileD0( "testdat_xx-kmaccount-0" );
if( fileD0.open( IO_WriteOnly ) ) {
- QDataStream ds( &fileD0 );
+ TQDataStream ds( &fileD0 );
ds.writeRawBytes( aMsg->asString(), aMsg->asString().length() );
fileD0.close(); // If data is 0 we just create a zero length file.
}
@@ -252,7 +252,7 @@ if( fileD0.open( IO_WriteOnly ) ) {
if (processResult == 2) {
perror("Critical error: Unable to collect mail (out of space?)");
KMessageBox::information(0,(i18n("Critical error: "
- "Unable to collect mail: ")) + QString::fromLocal8Bit(strerror(errno)));
+ "Unable to collect mail: ")) + TQString::fromLocal8Bit(strerror(errno)));
return false;
}
else if (processResult == 1)
@@ -265,9 +265,9 @@ if( fileD0.open( IO_WriteOnly ) ) {
kmkernel->filterMgr()->tempOpenFolder(mFolder);
rc = mFolder->addMsg(aMsg);
/*
-QFile fileD0( "testdat_xx-kmaccount-1" );
+TQFile fileD0( "testdat_xx-kmaccount-1" );
if( fileD0.open( IO_WriteOnly ) ) {
- QDataStream ds( &fileD0 );
+ TQDataStream ds( &fileD0 );
ds.writeRawBytes( aMsg->asString(), aMsg->asString().length() );
fileD0.close(); // If data is 0 we just create a zero length file.
}
@@ -275,7 +275,7 @@ if( fileD0.open( IO_WriteOnly ) ) {
if (rc) {
perror("failed to add message");
KMessageBox::information(0, i18n("Failed to add message:\n") +
- QString(strerror(rc)));
+ TQString(strerror(rc)));
return false;
}
int count = mFolder->count();
@@ -285,7 +285,7 @@ if( fileD0.open( IO_WriteOnly ) ) {
}
// Count number of new messages for each folder
- QString folderId;
+ TQString folderId;
if ( processResult == 1 ) {
folderId = ( type() == "cachedimap" ) ? parent->folder()->idString()
: mFolder->idString();
@@ -327,7 +327,7 @@ void KMAccount::deleteFolderJobs()
void KMAccount::ignoreJobsForMessage( KMMessage* msg )
{
//FIXME: remove, make folders handle those
- for( QPtrListIterator<FolderJob> it(mJobList); it.current(); ++it ) {
+ for( TQPtrListIterator<FolderJob> it(mJobList); it.current(); ++it ) {
if ( it.current()->msgList().first() == msg) {
FolderJob *job = it.current();
mJobList.remove( job );
@@ -350,8 +350,8 @@ void KMAccount::installTimer()
if (mInterval <= 0) return;
if(!mTimer)
{
- mTimer = new QTimer(0, "mTimer");
- connect(mTimer,SIGNAL(timeout()),SLOT(mailCheck()));
+ mTimer = new TQTimer(0, "mTimer");
+ connect(mTimer,TQT_SIGNAL(timeout()),TQT_SLOT(mailCheck()));
}
else
{
@@ -369,7 +369,7 @@ void KMAccount::deinstallTimer()
}
//-----------------------------------------------------------------------------
-bool KMAccount::runPrecommand(const QString &precommand)
+bool KMAccount::runPrecommand(const TQString &precommand)
{
// Run the pre command if there is one
if ( precommand.isEmpty() )
@@ -380,8 +380,8 @@ bool KMAccount::runPrecommand(const QString &precommand)
BroadcastStatus::instance()->setStatusMsg(
i18n("Executing precommand %1").arg(precommand ));
- connect(&precommandProcess, SIGNAL(finished(bool)),
- SLOT(precommandExited(bool)));
+ connect(&precommandProcess, TQT_SIGNAL(finished(bool)),
+ TQT_SLOT(precommandExited(bool)));
kdDebug(5006) << "Running precommand " << precommand << endl;
if (!precommandProcess.start()) return false;
@@ -414,30 +414,30 @@ void KMAccount::mailCheck()
//-----------------------------------------------------------------------------
void KMAccount::sendReceipts()
{
- QValueList<KMMessage*>::Iterator it;
+ TQValueList<KMMessage*>::Iterator it;
for(it = mReceipts.begin(); it != mReceipts.end(); ++it)
kmkernel->msgSender()->send(*it); //might process events
mReceipts.clear();
}
//-----------------------------------------------------------------------------
-QString KMAccount::encryptStr(const QString &aStr)
+TQString KMAccount::encryptStr(const TQString &aStr)
{
- QString result;
+ TQString result;
for (uint i = 0; i < aStr.length(); i++)
/* yes, no typo. can't encode ' ' or '!' because
they're the unicode BOM. stupid scrambling. stupid. */
result += (aStr[i].unicode() <= 0x21 ) ? aStr[i] :
- QChar(0x1001F - aStr[i].unicode());
+ TQChar(0x1001F - aStr[i].unicode());
return result;
}
//-----------------------------------------------------------------------------
-QString KMAccount::importPassword(const QString &aStr)
+TQString KMAccount::importPassword(const TQString &aStr)
{
unsigned int i, val;
unsigned int len = aStr.length();
- QCString result;
+ TQCString result;
result.resize(len+1);
for (i=0; i<len; i++)
@@ -491,7 +491,7 @@ void KMAccount::checkDone( bool newmail, CheckStatus status )
}
//-----------------------------------------------------------------------------
-void KMAccount::addToNewInFolder( QString folderId, int num )
+void KMAccount::addToNewInFolder( TQString folderId, int num )
{
if ( mNewInFolder.find( folderId ) == mNewInFolder.end() )
mNewInFolder[folderId] = num;
diff --git a/kmail/kmaccount.h b/kmail/kmaccount.h
index 9a896e198..c54611cbd 100644
--- a/kmail/kmaccount.h
+++ b/kmail/kmaccount.h
@@ -23,10 +23,10 @@
#include <kprocess.h>
#include <kaccount.h>
-#include <qstring.h>
-#include <qguardedptr.h>
-#include <qvaluelist.h>
-#include <qmap.h>
+#include <tqstring.h>
+#include <tqguardedptr.h>
+#include <tqvaluelist.h>
+#include <tqmap.h>
#include "kmmessage.h"
class QTimer;
@@ -47,14 +47,14 @@ using KMail::FolderJob;
using KPIM::ProgressItem;
class KMAccount;
-typedef QValueList< ::KMAccount* > AccountList;
+typedef TQValueList< ::KMAccount* > AccountList;
class KMPrecommand : public QObject
{
Q_OBJECT
public:
- KMPrecommand(const QString &precommand, QObject *parent = 0);
+ KMPrecommand(const TQString &precommand, TQObject *parent = 0);
virtual ~KMPrecommand();
bool start();
@@ -66,11 +66,11 @@ signals:
protected:
KProcess mPrecommandProcess;
- QString mPrecommand;
+ TQString mPrecommand;
};
-class KMAccount: public QObject, public KAccount
+class KMAccount: public TQObject, public KAccount
{
Q_OBJECT
friend class KMail::AccountManager;
@@ -90,17 +90,17 @@ public:
/**
* Returns type of the account
*/
- virtual QString type() const { return QString::null; }
+ virtual TQString type() const { return TQString::null; }
/**
* Reimplemented, set account name
*/
- virtual void setName(const QString&);
+ virtual void setName(const TQString&);
/**
- * Account name (reimpl because of ambiguous QObject::name())
+ * Account name (reimpl because of ambiguous TQObject::name())
*/
- virtual QString name() const { return KAccount::name(); }
+ virtual TQString name() const { return KAccount::name(); }
/**
* Set password to "" (empty string)
@@ -126,8 +126,8 @@ public:
/**
* the id of the trash folder (if any) for this account
*/
- QString trash() const { return mTrash; }
- virtual void setTrash(const QString& aTrash) { mTrash = aTrash; }
+ TQString trash() const { return mTrash; }
+ virtual void setTrash(const TQString& aTrash) { mTrash = aTrash; }
/**
* Process new mail for this account if one arrived. Returns TRUE if new
@@ -181,8 +181,8 @@ public:
/**
* Pre command
*/
- const QString& precommand(void) const { return mPrecommand; }
- virtual void setPrecommand(const QString &cmd) { mPrecommand = cmd; }
+ const TQString& precommand(void) const { return mPrecommand; }
+ virtual void setPrecommand(const TQString &cmd) { mPrecommand = cmd; }
/**
* Runs the precommand. If the precommand is empty, the method
@@ -190,16 +190,16 @@ public:
*
* @return True if successful, false otherwise
*/
- bool runPrecommand(const QString &precommand);
+ bool runPrecommand(const TQString &precommand);
/**
* Very primitive en/de-cryption so that the password is not
* readable in the config file. But still very easy breakable.
*/
- static QString encryptStr(const QString& inStr);
- static QString decryptStr(const QString& inStr) { return encryptStr(inStr); }
+ static TQString encryptStr(const TQString& inStr);
+ static TQString decryptStr(const TQString& inStr) { return encryptStr(inStr); }
- static QString importPassword(const QString &);
+ static TQString importPassword(const TQString &);
/** @return whether this account has an inbox */
bool hasInbox() const { return mHasInbox; }
@@ -264,7 +264,7 @@ signals:
* Emitted after the mail check is finished.
* @param newInFolder number of new messages for each folder
**/
- virtual void newMailsProcessed( const QMap<QString, int> & newInFolder );
+ virtual void newMailsProcessed( const TQMap<TQString, int> & newInFolder );
protected slots:
virtual void mailCheck();
@@ -272,7 +272,7 @@ protected slots:
virtual void precommandExited(bool);
protected:
- KMAccount( AccountManager* owner, const QString& accountName, uint id);
+ KMAccount( AccountManager* owner, const TQString& accountName, uint id);
/**
* Does filtering and storing in a folder for the given message.
@@ -301,14 +301,14 @@ protected:
* @param folderId the id of the folder
* @param num the number of new message in this folder
*/
- void addToNewInFolder( QString folderId, int num );
+ void addToNewInFolder( TQString folderId, int num );
protected:
- QString mPrecommand;
- QString mTrash;
+ TQString mPrecommand;
+ TQString mTrash;
AccountManager* mOwner;
- QGuardedPtr<KMAcctFolder> mFolder;
- QTimer *mTimer;
+ TQGuardedPtr<KMAcctFolder> mFolder;
+ TQTimer *mTimer;
int mInterval; // this is a switch and a scalar at the same time. If it is 0,
// interval mail checking is turned off and the interval spinbox proposes a
// default value. If it is non-null, it is the count of minutes between two
@@ -317,20 +317,20 @@ protected:
bool mExclude;
bool mCheckingMail : 1;
bool mPrecommandSuccess;
- QValueList<KMMessage*> mReceipts;
- QPtrList<FolderJob> mJobList;
+ TQValueList<KMMessage*> mReceipts;
+ TQPtrList<FolderJob> mJobList;
bool mHasInbox : 1;
- QGuardedPtr<ProgressItem> mMailCheckProgressItem;
+ TQGuardedPtr<ProgressItem> mMailCheckProgressItem;
uint mIdentityId;
private:
/**
* avoid compiler warning about hidden virtual
*/
- virtual void setName( const char *name ) { QObject::setName( name ); }
+ virtual void setName( const char *name ) { TQObject::setName( name ); }
private:
// for detailed (per folder) new mail notification
- QMap<QString, int> mNewInFolder;
+ TQMap<TQString, int> mNewInFolder;
};
#endif /*kmaccount_h*/
diff --git a/kmail/kmacctcachedimap.cpp b/kmail/kmacctcachedimap.cpp
index fbdc79252..2305b0809 100644
--- a/kmail/kmacctcachedimap.cpp
+++ b/kmail/kmacctcachedimap.cpp
@@ -53,10 +53,10 @@ using KMail::AccountManager;
#include <kapplication.h>
#include <kconfig.h>
-#include <qstylesheet.h>
+#include <tqstylesheet.h>
KMAcctCachedImap::KMAcctCachedImap( AccountManager* aOwner,
- const QString& aAccountName, uint id )
+ const TQString& aAccountName, uint id )
: KMail::ImapAccountBase( aOwner, aAccountName, id ), mFolder( 0 ),
mAnnotationCheckPassed(false),
mGroupwareType( GroupwareKolab ),
@@ -75,7 +75,7 @@ KMAcctCachedImap::~KMAcctCachedImap()
//-----------------------------------------------------------------------------
-QString KMAcctCachedImap::type() const
+TQString KMAcctCachedImap::type() const
{
return "cachedimap";
}
@@ -115,8 +115,8 @@ void KMAcctCachedImap::setAutoExpunge( bool /*aAutoExpunge*/ )
void KMAcctCachedImap::killAllJobs( bool disconnectSlave )
{
//kdDebug(5006) << "killAllJobs: disconnectSlave=" << disconnectSlave << " " << mapJobData.count() << " jobs in map." << endl;
- QValueList<KMFolderCachedImap*> folderList = killAllJobsInternal( disconnectSlave );
- for( QValueList<KMFolderCachedImap*>::Iterator it = folderList.begin(); it != folderList.end(); ++it ) {
+ TQValueList<KMFolderCachedImap*> folderList = killAllJobsInternal( disconnectSlave );
+ for( TQValueList<KMFolderCachedImap*>::Iterator it = folderList.begin(); it != folderList.end(); ++it ) {
KMFolderCachedImap *fld = *it;
fld->resetSyncState();
fld->setContentState(KMFolderCachedImap::imapNoInformation);
@@ -127,12 +127,12 @@ void KMAcctCachedImap::killAllJobs( bool disconnectSlave )
//-----------------------------------------------------------------------------
// Common between killAllJobs and the destructor - which shouldn't call sendFolderComplete
-QValueList<KMFolderCachedImap*> KMAcctCachedImap::killAllJobsInternal( bool disconnectSlave )
+TQValueList<KMFolderCachedImap*> KMAcctCachedImap::killAllJobsInternal( bool disconnectSlave )
{
// Make list of folders to reset. This must be done last, since folderComplete
// can trigger the next queued mail check already.
- QValueList<KMFolderCachedImap*> folderList;
- QMap<KIO::Job*, jobData>::Iterator it = mapJobData.begin();
+ TQValueList<KMFolderCachedImap*> folderList;
+ TQMap<KIO::Job*, jobData>::Iterator it = mapJobData.begin();
for (; it != mapJobData.end(); ++it) {
if ((*it).parent)
folderList << static_cast<KMFolderCachedImap*>((*it).parent->storage());
@@ -145,7 +145,7 @@ QValueList<KMFolderCachedImap*> KMAcctCachedImap::killAllJobsInternal( bool disc
mapJobData.clear();
// Clear the joblist. Make SURE to stop the job emitting "finished"
- for( QPtrListIterator<CachedImapJob> it( mJobList ); it.current(); ++it )
+ for( TQPtrListIterator<CachedImapJob> it( mJobList ); it.current(); ++it )
it.current()->setPassiveDestructor( true );
KMAccount::deleteFolderJobs();
@@ -160,8 +160,8 @@ QValueList<KMFolderCachedImap*> KMAcctCachedImap::killAllJobsInternal( bool disc
void KMAcctCachedImap::cancelMailCheck()
{
// Make list of folders to reset, like in killAllJobs
- QValueList<KMFolderCachedImap*> folderList;
- QMap<KIO::Job*, jobData>::Iterator it = mapJobData.begin();
+ TQValueList<KMFolderCachedImap*> folderList;
+ TQMap<KIO::Job*, jobData>::Iterator it = mapJobData.begin();
for (; it != mapJobData.end(); ++it) {
if ( (*it).cancellable && (*it).parent )
folderList << static_cast<KMFolderCachedImap*>((*it).parent->storage());
@@ -170,7 +170,7 @@ void KMAcctCachedImap::cancelMailCheck()
ImapAccountBase::cancelMailCheck();
// Reset sync states and emit folderComplete, this is important for
// KMAccount::checkingMail() to be reset, in case we restart checking mail later.
- for( QValueList<KMFolderCachedImap*>::Iterator it = folderList.begin(); it != folderList.end(); ++it ) {
+ for( TQValueList<KMFolderCachedImap*>::Iterator it = folderList.begin(); it != folderList.end(); ++it ) {
KMFolderCachedImap *fld = *it;
fld->resetSyncState();
fld->setContentState(KMFolderCachedImap::imapNoInformation);
@@ -182,7 +182,7 @@ void KMAcctCachedImap::cancelMailCheck()
//-----------------------------------------------------------------------------
void KMAcctCachedImap::killJobsForItem(KMFolderTreeItem * fti)
{
- QMap<KIO::Job *, jobData>::Iterator it = mapJobData.begin();
+ TQMap<KIO::Job *, jobData>::Iterator it = mapJobData.begin();
while (it != mapJobData.end())
{
if (it.data().parent == fti->folder())
@@ -201,8 +201,8 @@ void KMAcctCachedImap::slotCheckQueuedFolders()
mMailCheckFolders.append( mFoldersQueuedForChecking.front() );
mFoldersQueuedForChecking.pop_front();
if ( mFoldersQueuedForChecking.isEmpty() )
- disconnect( this, SIGNAL( finishedCheck( bool, CheckStatus ) ),
- this, SLOT( slotCheckQueuedFolders() ) );
+ disconnect( this, TQT_SIGNAL( finishedCheck( bool, CheckStatus ) ),
+ this, TQT_SLOT( slotCheckQueuedFolders() ) );
kmkernel->acctMgr()->singleCheckMail(this, true);
mMailCheckFolders.clear();
@@ -235,10 +235,10 @@ void KMAcctCachedImap::processNewMail( KMFolderCachedImap* folder,
// reset namespace todo
if ( folder == mFolder ) {
- QStringList nsToList = namespaces()[PersonalNS];
- QStringList otherNSToCheck = namespaces()[OtherUsersNS];
+ TQStringList nsToList = namespaces()[PersonalNS];
+ TQStringList otherNSToCheck = namespaces()[OtherUsersNS];
otherNSToCheck += namespaces()[SharedNS];
- for ( QStringList::Iterator it = otherNSToCheck.begin();
+ for ( TQStringList::Iterator it = otherNSToCheck.begin();
it != otherNSToCheck.end(); ++it ) {
if ( (*it).isEmpty() ) {
// empty namespaces are included in the "normal" listing
@@ -251,25 +251,25 @@ void KMAcctCachedImap::processNewMail( KMFolderCachedImap* folder,
Q_ASSERT( !mMailCheckProgressItem );
mMailCheckProgressItem = KPIM::ProgressManager::createProgressItem(
- "MailCheck" + QString::number( id() ),
- QStyleSheet::escape( folder->label() ), // will be changed immediately in serverSync anyway
- QString::null,
+ "MailCheck" + TQString::number( id() ),
+ TQStyleSheet::escape( folder->label() ), // will be changed immediately in serverSync anyway
+ TQString::null,
true, // can be cancelled
useSSL() || useTLS() );
- connect( mMailCheckProgressItem, SIGNAL( progressItemCanceled( KPIM::ProgressItem* ) ),
- this, SLOT( slotProgressItemCanceled( KPIM::ProgressItem* ) ) );
+ connect( mMailCheckProgressItem, TQT_SIGNAL( progressItemCanceled( KPIM::ProgressItem* ) ),
+ this, TQT_SLOT( slotProgressItemCanceled( KPIM::ProgressItem* ) ) );
folder->setAccount(this);
- connect(folder, SIGNAL(folderComplete(KMFolderCachedImap*, bool)),
- this, SLOT(postProcessNewMail(KMFolderCachedImap*, bool)));
+ connect(folder, TQT_SIGNAL(folderComplete(KMFolderCachedImap*, bool)),
+ this, TQT_SLOT(postProcessNewMail(KMFolderCachedImap*, bool)));
folder->serverSync( recurse );
}
void KMAcctCachedImap::postProcessNewMail( KMFolderCachedImap* folder, bool )
{
mNoopTimer.start( 60000 ); // send a noop every minute to avoid "connection broken" errors
- disconnect(folder, SIGNAL(folderComplete(KMFolderCachedImap*, bool)),
- this, SLOT(postProcessNewMail(KMFolderCachedImap*, bool)));
+ disconnect(folder, TQT_SIGNAL(folderComplete(KMFolderCachedImap*, bool)),
+ this, TQT_SLOT(postProcessNewMail(KMFolderCachedImap*, bool)));
mMailCheckProgressItem->setComplete();
mMailCheckProgressItem = 0;
@@ -295,7 +295,7 @@ void KMAcctCachedImap::addUnreadMsgCount( const KMFolderCachedImap *folder,
if ( folder->imapPath() != "/INBOX/" ) {
// new mail in INBOX is processed with KMAccount::processNewMsg() and
// therefore doesn't need to be counted here
- const QString folderId = folder->folder()->idString();
+ const TQString folderId = folder->folder()->idString();
int newInFolder = countUnread;
if ( mUnreadBeforeCheck.find( folderId ) != mUnreadBeforeCheck.end() )
newInFolder -= mUnreadBeforeCheck[folderId];
@@ -323,12 +323,12 @@ void KMAcctCachedImap::readConfig( /*const*/ KConfig/*Base*/ & config ) {
// Apparently this method is only ever called once (from KMKernel::init) so this is ok
mPreviouslyDeletedFolders = config.readListEntry( "deleted-folders" );
mDeletedFolders.clear(); // but just in case...
- const QStringList oldPaths = config.readListEntry( "renamed-folders-paths" );
- const QStringList newNames = config.readListEntry( "renamed-folders-names" );
- QStringList::const_iterator it = oldPaths.begin();
- QStringList::const_iterator nameit = newNames.begin();
+ const TQStringList oldPaths = config.readListEntry( "renamed-folders-paths" );
+ const TQStringList newNames = config.readListEntry( "renamed-folders-names" );
+ TQStringList::const_iterator it = oldPaths.begin();
+ TQStringList::const_iterator nameit = newNames.begin();
for( ; it != oldPaths.end() && nameit != newNames.end(); ++it, ++nameit ) {
- addRenamedFolder( *it, QString::null, *nameit );
+ addRenamedFolder( *it, TQString::null, *nameit );
}
mGroupwareType = (GroupwareType)config.readNumEntry( "groupwareType", GroupwareKolab );
}
@@ -337,9 +337,9 @@ void KMAcctCachedImap::writeConfig( KConfig/*Base*/ & config ) /*const*/ {
ImapAccountBase::writeConfig( config );
config.writeEntry( "deleted-folders", mDeletedFolders + mPreviouslyDeletedFolders );
config.writeEntry( "renamed-folders-paths", mRenamedFolders.keys() );
- const QValueList<RenamedFolder> values = mRenamedFolders.values();
- QStringList lstNames;
- QValueList<RenamedFolder>::const_iterator it = values.begin();
+ const TQValueList<RenamedFolder> values = mRenamedFolders.values();
+ TQStringList lstNames;
+ TQValueList<RenamedFolder>::const_iterator it = values.begin();
for ( ; it != values.end() ; ++it )
lstNames.append( (*it).mNewName );
config.writeEntry( "renamed-folders-names", lstNames );
@@ -358,12 +358,12 @@ void KMAcctCachedImap::invalidateIMAPFolders( KMFolderCachedImap* folder )
folder->setAccount(this);
- QStringList strList;
- QValueList<QGuardedPtr<KMFolder> > folderList;
+ TQStringList strList;
+ TQValueList<TQGuardedPtr<KMFolder> > folderList;
kmkernel->dimapFolderMgr()->createFolderList( &strList, &folderList,
- folder->folder()->child(), QString::null,
+ folder->folder()->child(), TQString::null,
false );
- QValueList<QGuardedPtr<KMFolder> >::Iterator it;
+ TQValueList<TQGuardedPtr<KMFolder> >::Iterator it;
mCountLastUnread = 0;
mUnreadBeforeCheck.clear();
@@ -404,20 +404,20 @@ void KMAcctCachedImap::addDeletedFolder( KMFolder* folder )
}
}
-void KMAcctCachedImap::addDeletedFolder( const QString& imapPath )
+void KMAcctCachedImap::addDeletedFolder( const TQString& imapPath )
{
mDeletedFolders << imapPath;
}
-QStringList KMAcctCachedImap::deletedFolderPaths( const QString& subFolderPath ) const
+TQStringList KMAcctCachedImap::deletedFolderPaths( const TQString& subFolderPath ) const
{
- QStringList lst;
- for ( QStringList::const_iterator it = mDeletedFolders.begin(); it != mDeletedFolders.end(); ++it ) {
+ TQStringList lst;
+ for ( TQStringList::const_iterator it = mDeletedFolders.begin(); it != mDeletedFolders.end(); ++it ) {
if ( (*it).startsWith( subFolderPath ) )
// We must reverse the order, so that sub sub sub folders are deleted first
lst.prepend( *it );
}
- for ( QStringList::const_iterator it = mPreviouslyDeletedFolders.begin(); it != mPreviouslyDeletedFolders.end(); ++it ) {
+ for ( TQStringList::const_iterator it = mPreviouslyDeletedFolders.begin(); it != mPreviouslyDeletedFolders.end(); ++it ) {
if ( (*it).startsWith( subFolderPath ) )
lst.prepend( *it );
}
@@ -426,28 +426,28 @@ QStringList KMAcctCachedImap::deletedFolderPaths( const QString& subFolderPath )
return lst;
}
-bool KMAcctCachedImap::isDeletedFolder( const QString& subFolderPath ) const
+bool KMAcctCachedImap::isDeletedFolder( const TQString& subFolderPath ) const
{
return mDeletedFolders.find( subFolderPath ) != mDeletedFolders.end();
}
-bool KMAcctCachedImap::isPreviouslyDeletedFolder( const QString& subFolderPath ) const
+bool KMAcctCachedImap::isPreviouslyDeletedFolder( const TQString& subFolderPath ) const
{
return mPreviouslyDeletedFolders.find( subFolderPath ) != mPreviouslyDeletedFolders.end();
}
-void KMAcctCachedImap::removeDeletedFolder( const QString& subFolderPath )
+void KMAcctCachedImap::removeDeletedFolder( const TQString& subFolderPath )
{
mDeletedFolders.remove( subFolderPath );
mPreviouslyDeletedFolders.remove( subFolderPath );
}
-void KMAcctCachedImap::addRenamedFolder( const QString& subFolderPath, const QString& oldLabel, const QString& newName )
+void KMAcctCachedImap::addRenamedFolder( const TQString& subFolderPath, const TQString& oldLabel, const TQString& newName )
{
mRenamedFolders.insert( subFolderPath, RenamedFolder( oldLabel, newName ) );
}
-void KMAcctCachedImap::removeRenamedFolder( const QString& subFolderPath )
+void KMAcctCachedImap::removeRenamedFolder( const TQString& subFolderPath )
{
mRenamedFolders.remove( subFolderPath );
}
@@ -458,7 +458,7 @@ void KMAcctCachedImap::slotProgressItemCanceled( ProgressItem* )
killAllJobs( abortConnection );
if ( abortConnection ) {
// If we were trying to connect, tell kmfoldercachedimap so that it moves on
- emit connectionResult( KIO::ERR_USER_CANCELED, QString::null );
+ emit connectionResult( KIO::ERR_USER_CANCELED, TQString::null );
}
}
@@ -468,12 +468,12 @@ FolderStorage* const KMAcctCachedImap::rootFolder() const
}
-QString KMAcctCachedImap::renamedFolder( const QString& imapPath ) const
+TQString KMAcctCachedImap::renamedFolder( const TQString& imapPath ) const
{
- QMap<QString, RenamedFolder>::ConstIterator renit = mRenamedFolders.find( imapPath );
+ TQMap<TQString, RenamedFolder>::ConstIterator renit = mRenamedFolders.find( imapPath );
if ( renit != mRenamedFolders.end() )
return (*renit).mNewName;
- return QString::null;
+ return TQString::null;
}
#include "kmacctcachedimap.moc"
diff --git a/kmail/kmacctcachedimap.h b/kmail/kmacctcachedimap.h
index 6f10bfe56..e8e428204 100644
--- a/kmail/kmacctcachedimap.h
+++ b/kmail/kmacctcachedimap.h
@@ -34,7 +34,7 @@
#include "imapaccountbase.h"
-#include <qguardedptr.h>
+#include <tqguardedptr.h>
class KMFolderCachedImap;
class KMFolderTreeItem;
@@ -72,7 +72,7 @@ public:
/**
* Inherited methods.
*/
- virtual QString type() const;
+ virtual TQString type() const;
virtual void processNewMail( bool interactive );
/**
@@ -114,56 +114,56 @@ public:
* Remember that a folder got explicitely deleted - NOT including all child folders
* This is used when renaming a folder.
*/
- void addDeletedFolder( const QString& imapPath );
+ void addDeletedFolder( const TQString& imapPath );
/**
* Ask if a folder was explicitely deleted in this session
*/
- bool isDeletedFolder( const QString& subFolderPath ) const;
+ bool isDeletedFolder( const TQString& subFolderPath ) const;
/**
* Ask if a folder was explicitely deleted in a previous session
*/
- bool isPreviouslyDeletedFolder( const QString& subFolderPath ) const;
+ bool isPreviouslyDeletedFolder( const TQString& subFolderPath ) const;
/**
* return the imap path to the deleted folder, as well as the paths for any child folders
*/
- QStringList deletedFolderPaths( const QString& subFolderPath ) const;
+ TQStringList deletedFolderPaths( const TQString& subFolderPath ) const;
/**
* Remove folder from the "deleted folders" list
*/
- void removeDeletedFolder( const QString& subFolderPath );
+ void removeDeletedFolder( const TQString& subFolderPath );
/**
* Remember that a folder was renamed
*/
- void addRenamedFolder( const QString& subFolderPath,
- const QString& oldLabel, const QString& newName );
+ void addRenamedFolder( const TQString& subFolderPath,
+ const TQString& oldLabel, const TQString& newName );
/**
* Remove folder from "renamed folders" list
* Warning: @p subFolderPath is the OLD path
*/
- void removeRenamedFolder( const QString& subFolderPath );
+ void removeRenamedFolder( const TQString& subFolderPath );
struct RenamedFolder {
RenamedFolder() {} // for QMap
- RenamedFolder( const QString& oldLabel, const QString& newName )
+ RenamedFolder( const TQString& oldLabel, const TQString& newName )
: mOldLabel( oldLabel ), mNewName( newName ) {}
- QString mOldLabel;
- QString mNewName;
+ TQString mOldLabel;
+ TQString mNewName;
};
/**
* Returns new name for folder if it was renamed
*/
- QString renamedFolder( const QString& imapPath ) const;
+ TQString renamedFolder( const TQString& imapPath ) const;
/**
* Returns the list of folders that were renamed
*/
- const QMap<QString, RenamedFolder>& renamedFolders() const { return mRenamedFolders; }
+ const TQMap<TQString, RenamedFolder>& renamedFolders() const { return mRenamedFolders; }
/**
* Add a folder's unread count to the new "unread messages count", done during a sync after getting new mail
@@ -201,7 +201,7 @@ public:
protected:
friend class ::AccountManager;
- KMAcctCachedImap(AccountManager* owner, const QString& accountName, uint id);
+ KMAcctCachedImap(AccountManager* owner, const TQString& accountName, uint id);
protected slots:
/** new-mail-notification for the current folder (is called via folderComplete) */
@@ -212,15 +212,15 @@ protected slots:
virtual void slotCheckQueuedFolders();
private:
- QValueList<KMFolderCachedImap*> killAllJobsInternal( bool disconnectSlave );
+ TQValueList<KMFolderCachedImap*> killAllJobsInternal( bool disconnectSlave );
void processNewMail( KMFolderCachedImap* folder, bool recurse );
private:
- QPtrList<CachedImapJob> mJobList;
+ TQPtrList<CachedImapJob> mJobList;
KMFolderCachedImap *mFolder;
- QStringList mDeletedFolders; // folders deleted in this session
- QStringList mPreviouslyDeletedFolders; // folders deleted in a previous session
- QMap<QString, RenamedFolder> mRenamedFolders;
+ TQStringList mDeletedFolders; // folders deleted in this session
+ TQStringList mPreviouslyDeletedFolders; // folders deleted in a previous session
+ TQMap<TQString, RenamedFolder> mRenamedFolders;
bool mAnnotationCheckPassed;
GroupwareType mGroupwareType;
diff --git a/kmail/kmacctfolder.h b/kmail/kmacctfolder.h
index e622ebd36..97dca0d75 100644
--- a/kmail/kmacctfolder.h
+++ b/kmail/kmacctfolder.h
@@ -48,7 +48,7 @@ public:
void clearAccountList();
private:
- KMAcctFolder( KMFolderDir* parent, const QString& name,
+ KMAcctFolder( KMFolderDir* parent, const TQString& name,
KMFolderType aFolderType );
};
diff --git a/kmail/kmacctimap.cpp b/kmail/kmacctimap.cpp
index 9e83d243d..bf96c79a1 100644
--- a/kmail/kmacctimap.cpp
+++ b/kmail/kmacctimap.cpp
@@ -50,12 +50,12 @@ using KPIM::ProgressManager;
#include <kmessagebox.h>
#include <kdebug.h>
-#include <qstylesheet.h>
+#include <tqstylesheet.h>
#include <errno.h>
//-----------------------------------------------------------------------------
-KMAcctImap::KMAcctImap(AccountManager* aOwner, const QString& aAccountName, uint id):
+KMAcctImap::KMAcctImap(AccountManager* aOwner, const TQString& aAccountName, uint id):
KMail::ImapAccountBase(aOwner, aAccountName, id),
mCountRemainChecks( 0 ),
mErrorTimer( 0, "mErrorTimer" )
@@ -64,17 +64,17 @@ KMAcctImap::KMAcctImap(AccountManager* aOwner, const QString& aAccountName, uint
mScheduler = 0;
mNoopTimer.start( 60000 ); // // send a noop every minute
mOpenFolders.setAutoDelete(true);
- connect(kmkernel->imapFolderMgr(), SIGNAL(changed()),
- this, SLOT(slotUpdateFolderList()));
- connect(&mErrorTimer, SIGNAL(timeout()), SLOT(slotResetConnectionError()));
+ connect(kmkernel->imapFolderMgr(), TQT_SIGNAL(changed()),
+ this, TQT_SLOT(slotUpdateFolderList()));
+ connect(&mErrorTimer, TQT_SIGNAL(timeout()), TQT_SLOT(slotResetConnectionError()));
- QString serNumUri = locateLocal( "data", "kmail/unfiltered." +
- QString("%1").arg(KAccount::id()) );
+ TQString serNumUri = locateLocal( "data", "kmail/unfiltered." +
+ TQString("%1").arg(KAccount::id()) );
KConfig config( serNumUri );
- QStringList serNums = config.readListEntry( "unfiltered" );
+ TQStringList serNums = config.readListEntry( "unfiltered" );
mFilterSerNumsToSave.setAutoDelete( false );
- for ( QStringList::ConstIterator it = serNums.begin();
+ for ( TQStringList::ConstIterator it = serNums.begin();
it != serNums.end(); ++it ) {
mFilterSerNums.append( (*it).toUInt() );
mFilterSerNumsToSave.insert( *it, (const int *)1 );
@@ -87,11 +87,11 @@ KMAcctImap::~KMAcctImap()
{
killAllJobs( true );
- QString serNumUri = locateLocal( "data", "kmail/unfiltered." +
- QString("%1").arg(KAccount::id()) );
+ TQString serNumUri = locateLocal( "data", "kmail/unfiltered." +
+ TQString("%1").arg(KAccount::id()) );
KConfig config( serNumUri );
- QStringList serNums;
- QDictIterator<int> it( mFilterSerNumsToSave );
+ TQStringList serNums;
+ TQDictIterator<int> it( mFilterSerNumsToSave );
for( ; it.current(); ++it )
serNums.append( it.currentKey() );
config.writeEntry( "unfiltered", serNums );
@@ -99,7 +99,7 @@ KMAcctImap::~KMAcctImap()
//-----------------------------------------------------------------------------
-QString KMAcctImap::type() const
+TQString KMAcctImap::type() const
{
return "imap";
}
@@ -125,7 +125,7 @@ void KMAcctImap::setImapFolder(KMFolderImap *aFolder)
//-----------------------------------------------------------------------------
-bool KMAcctImap::handleError( int errorCode, const QString &errorMsg, KIO::Job* job, const QString& context, bool abortSync )
+bool KMAcctImap::handleError( int errorCode, const TQString &errorMsg, KIO::Job* job, const TQString& context, bool abortSync )
{
/* TODO check where to handle this one better. */
if ( errorCode == KIO::ERR_DOES_NOT_EXIST ) {
@@ -141,11 +141,11 @@ bool KMAcctImap::handleError( int errorCode, const QString &errorMsg, KIO::Job*
//-----------------------------------------------------------------------------
void KMAcctImap::killAllJobs( bool disconnectSlave )
{
- QMap<KIO::Job*, jobData>::Iterator it = mapJobData.begin();
+ TQMap<KIO::Job*, jobData>::Iterator it = mapJobData.begin();
for ( ; it != mapJobData.end(); ++it)
{
- QPtrList<KMMessage> msgList = (*it).msgList;
- QPtrList<KMMessage>::Iterator it2 = msgList.begin();
+ TQPtrList<KMMessage> msgList = (*it).msgList;
+ TQPtrList<KMMessage>::Iterator it2 = msgList.begin();
for ( ; it2 != msgList.end(); ++it2 ) {
KMMessage *msg = *it2;
if ( msg->transferInProgress() ) {
@@ -179,7 +179,7 @@ void KMAcctImap::killAllJobs( bool disconnectSlave )
// KMAccount::deleteFolderJobs(); doesn't work here always, it deletes jobs from
// its own mJobList instead of our mJobList...
KMAccount::deleteFolderJobs();
- QPtrListIterator<ImapJob> it2( mJobList );
+ TQPtrListIterator<ImapJob> it2( mJobList );
while ( it2.current() ) {
ImapJob *job = it2.current();
++it2;
@@ -202,7 +202,7 @@ void KMAcctImap::killAllJobs( bool disconnectSlave )
void KMAcctImap::ignoreJobsForMessage( KMMessage* msg )
{
if (!msg) return;
- QPtrListIterator<ImapJob> it( mJobList );
+ TQPtrListIterator<ImapJob> it( mJobList );
while ( it.current() )
{
ImapJob *job = it.current();
@@ -217,7 +217,7 @@ void KMAcctImap::ignoreJobsForMessage( KMMessage* msg )
//-----------------------------------------------------------------------------
void KMAcctImap::ignoreJobsForFolder( KMFolder* folder )
{
- QPtrListIterator<ImapJob> it( mJobList );
+ TQPtrListIterator<ImapJob> it( mJobList );
while ( it.current() )
{
ImapJob *job = it.current();
@@ -233,9 +233,9 @@ void KMAcctImap::ignoreJobsForFolder( KMFolder* folder )
void KMAcctImap::removeSlaveJobsForFolder( KMFolder* folder )
{
// Make sure the folder is not referenced in any kio slave jobs
- QMap<KIO::Job*, jobData>::Iterator it = mapJobData.begin();
+ TQMap<KIO::Job*, jobData>::Iterator it = mapJobData.begin();
while ( it != mapJobData.end() ) {
- QMap<KIO::Job*, jobData>::Iterator i = it;
+ TQMap<KIO::Job*, jobData>::Iterator i = it;
it++;
if ( (*i).parent ) {
if ( (*i).parent == folder ) {
@@ -249,8 +249,8 @@ void KMAcctImap::removeSlaveJobsForFolder( KMFolder* folder )
void KMAcctImap::cancelMailCheck()
{
// Make list of folders to reset, like in killAllJobs
- QValueList<KMFolderImap*> folderList;
- QMap<KIO::Job*, jobData>::Iterator it = mapJobData.begin();
+ TQValueList<KMFolderImap*> folderList;
+ TQMap<KIO::Job*, jobData>::Iterator it = mapJobData.begin();
for (; it != mapJobData.end(); ++it) {
if ( (*it).cancellable && (*it).parent ) {
folderList << static_cast<KMFolderImap*>((*it).parent->storage());
@@ -262,7 +262,7 @@ void KMAcctImap::cancelMailCheck()
killAllJobs( true );
// emit folderComplete, this is important for
// KMAccount::checkingMail() to be reset, in case we restart checking mail later.
- for( QValueList<KMFolderImap*>::Iterator it = folderList.begin(); it != folderList.end(); ++it ) {
+ for( TQValueList<KMFolderImap*>::Iterator it = folderList.begin(); it != folderList.end(); ++it ) {
KMFolderImap *fld = *it;
fld->sendFolderComplete(FALSE);
}
@@ -297,18 +297,18 @@ void KMAcctImap::processNewMail(bool interactive)
mMailCheckProgressItem =
ProgressManager::createProgressItem(
"MailCheckAccount" + name(),
- i18n("Checking account: %1" ).arg( QStyleSheet::escape( name() ) ),
- QString::null, // status
+ i18n("Checking account: %1" ).arg( TQStyleSheet::escape( name() ) ),
+ TQString::null, // status
true, // can be canceled
useSSL() || useTLS() );
mMailCheckProgressItem->setTotalItems( mMailCheckFolders.count() );
connect ( mMailCheckProgressItem,
- SIGNAL( progressItemCanceled( KPIM::ProgressItem*) ),
+ TQT_SIGNAL( progressItemCanceled( KPIM::ProgressItem*) ),
this,
- SLOT( slotMailCheckCanceled() ) );
+ TQT_SLOT( slotMailCheckCanceled() ) );
- QValueList<QGuardedPtr<KMFolder> >::Iterator it;
+ TQValueList<TQGuardedPtr<KMFolder> >::Iterator it;
// first get the current count of unread-messages
mCountRemainChecks = 0;
mCountUnread = 0;
@@ -336,8 +336,8 @@ void KMAcctImap::processNewMail(bool interactive)
mCountRemainChecks++;
if (imapFolder->isSelected()) {
- connect(imapFolder, SIGNAL(folderComplete(KMFolderImap*, bool)),
- this, SLOT(postProcessNewMail(KMFolderImap*, bool)));
+ connect(imapFolder, TQT_SIGNAL(folderComplete(KMFolderImap*, bool)),
+ this, TQT_SLOT(postProcessNewMail(KMFolderImap*, bool)));
imapFolder->getFolder();
} else if ( kmkernel->filterMgr()->atLeastOneIncomingFilterAppliesTo( id() ) &&
imapFolder->folder()->isSystemFolder() &&
@@ -345,13 +345,13 @@ void KMAcctImap::processNewMail(bool interactive)
imapFolder->open("acctimap"); // will be closed in the folderSelected slot
// first get new headers before we select the folder
imapFolder->setSelected( true );
- connect( imapFolder, SIGNAL( folderComplete( KMFolderImap*, bool ) ),
- this, SLOT( slotFolderSelected( KMFolderImap*, bool) ) );
+ connect( imapFolder, TQT_SIGNAL( folderComplete( KMFolderImap*, bool ) ),
+ this, TQT_SLOT( slotFolderSelected( KMFolderImap*, bool) ) );
imapFolder->getFolder();
}
else {
- connect(imapFolder, SIGNAL(numUnreadMsgsChanged(KMFolder*)),
- this, SLOT(postProcessNewMail(KMFolder*)));
+ connect(imapFolder, TQT_SIGNAL(numUnreadMsgsChanged(KMFolder*)),
+ this, TQT_SLOT(postProcessNewMail(KMFolder*)));
bool ok = imapFolder->processNewMail(interactive);
if (!ok)
{
@@ -382,15 +382,15 @@ void KMAcctImap::processNewMail(bool interactive)
//-----------------------------------------------------------------------------
void KMAcctImap::postProcessNewMail(KMFolderImap* folder, bool)
{
- disconnect(folder, SIGNAL(folderComplete(KMFolderImap*, bool)),
- this, SLOT(postProcessNewMail(KMFolderImap*, bool)));
+ disconnect(folder, TQT_SIGNAL(folderComplete(KMFolderImap*, bool)),
+ this, TQT_SLOT(postProcessNewMail(KMFolderImap*, bool)));
postProcessNewMail(static_cast<KMFolder*>(folder->folder()));
}
void KMAcctImap::postProcessNewMail( KMFolder * folder )
{
- disconnect( folder->storage(), SIGNAL(numUnreadMsgsChanged(KMFolder*)),
- this, SLOT(postProcessNewMail(KMFolder*)) );
+ disconnect( folder->storage(), TQT_SIGNAL(numUnreadMsgsChanged(KMFolder*)),
+ this, TQT_SLOT(postProcessNewMail(KMFolder*)) );
if ( mMailCheckProgressItem ) {
mMailCheckProgressItem->incCompletedItems();
@@ -400,7 +400,7 @@ void KMAcctImap::postProcessNewMail( KMFolder * folder )
mCountRemainChecks--;
// count the unread messages
- const QString folderId = folder->idString();
+ const TQString folderId = folder->idString();
int newInFolder = folder->countUnread();
if ( mUnreadBeforeCheck.find( folderId ) != mUnreadBeforeCheck.end() )
newInFolder -= mUnreadBeforeCheck[folderId];
@@ -410,17 +410,17 @@ void KMAcctImap::postProcessNewMail( KMFolder * folder )
}
// Filter messages
- QValueListIterator<Q_UINT32> filterIt = mFilterSerNums.begin();
- QValueList<Q_UINT32> inTransit;
+ TQValueListIterator<Q_UINT32> filterIt = mFilterSerNums.begin();
+ TQValueList<Q_UINT32> inTransit;
if (ActionScheduler::isEnabled() ||
kmkernel->filterMgr()->atLeastOneOnlineImapFolderTarget()) {
KMFilterMgr::FilterSet set = KMFilterMgr::Inbound;
- QValueList<KMFilter*> filters = kmkernel->filterMgr()->filters();
+ TQValueList<KMFilter*> filters = kmkernel->filterMgr()->filters();
if (!mScheduler) {
mScheduler = new KMail::ActionScheduler( set, filters );
mScheduler->setAccountId( id() );
- connect( mScheduler, SIGNAL(filtered(Q_UINT32)), this, SLOT(slotFiltered(Q_UINT32)) );
+ connect( mScheduler, TQT_SIGNAL(filtered(Q_UINT32)), this, TQT_SLOT(slotFiltered(Q_UINT32)) );
} else {
mScheduler->setFilterList( filters );
}
@@ -434,7 +434,7 @@ void KMAcctImap::postProcessNewMail( KMFolder * folder )
// It's possible that the message has been deleted or moved into a
// different folder, or that the serNum is stale
if ( !folder ) {
- mFilterSerNumsToSave.remove( QString( "%1" ).arg( *filterIt ) );
+ mFilterSerNumsToSave.remove( TQString( "%1" ).arg( *filterIt ) );
++filterIt;
continue;
}
@@ -443,7 +443,7 @@ void KMAcctImap::postProcessNewMail( KMFolder * folder )
if (!imapFolder ||
!imapFolder->folder()->isSystemFolder() ||
!(imapFolder->imapPath() == "/INBOX/") ) { // sanity checking
- mFilterSerNumsToSave.remove( QString( "%1" ).arg( *filterIt ) );
+ mFilterSerNumsToSave.remove( TQString( "%1" ).arg( *filterIt ) );
++filterIt;
continue;
}
@@ -452,7 +452,7 @@ void KMAcctImap::postProcessNewMail( KMFolder * folder )
msg = folder->getMsg( idx );
if (!msg) { // sanity checking
- mFilterSerNumsToSave.remove( QString( "%1" ).arg( *filterIt ) );
+ mFilterSerNumsToSave.remove( TQString( "%1" ).arg( *filterIt ) );
++filterIt;
continue;
}
@@ -469,11 +469,11 @@ void KMAcctImap::postProcessNewMail( KMFolder * folder )
msg->setTransferInProgress(true);
if ( !msg->isComplete() ) {
FolderJob *job = folder->createJob(msg);
- connect(job, SIGNAL(messageRetrieved(KMMessage*)),
- SLOT(slotFilterMsg(KMMessage*)));
+ connect(job, TQT_SIGNAL(messageRetrieved(KMMessage*)),
+ TQT_SLOT(slotFilterMsg(KMMessage*)));
job->start();
} else {
- mFilterSerNumsToSave.remove( QString( "%1" ).arg( *filterIt ) );
+ mFilterSerNumsToSave.remove( TQString( "%1" ).arg( *filterIt ) );
if (slotFilterMsg(msg) == 2) break;
}
}
@@ -498,7 +498,7 @@ void KMAcctImap::postProcessNewMail( KMFolder * folder )
//-----------------------------------------------------------------------------
void KMAcctImap::slotFiltered(Q_UINT32 serNum)
{
- mFilterSerNumsToSave.remove( QString( "%1" ).arg( serNum ) );
+ mFilterSerNumsToSave.remove( TQString( "%1" ).arg( serNum ) );
}
//-----------------------------------------------------------------------------
@@ -509,14 +509,14 @@ void KMAcctImap::slotUpdateFolderList()
kdWarning(5006) << "KMAcctImap::slotUpdateFolderList return" << endl;
return;
}
- QStringList strList;
+ TQStringList strList;
mMailCheckFolders.clear();
kmkernel->imapFolderMgr()->createFolderList(&strList, &mMailCheckFolders,
- mFolder->folder()->child(), QString::null, false);
+ mFolder->folder()->child(), TQString::null, false);
// the new list
- QValueList<QGuardedPtr<KMFolder> > includedFolders;
+ TQValueList<TQGuardedPtr<KMFolder> > includedFolders;
// check for excluded folders
- QValueList<QGuardedPtr<KMFolder> >::Iterator it;
+ TQValueList<TQGuardedPtr<KMFolder> >::Iterator it;
for (it = mMailCheckFolders.begin(); it != mMailCheckFolders.end(); ++it)
{
KMFolderImap* folder = static_cast<KMFolderImap*>(((KMFolder*)(*it))->storage());
@@ -571,8 +571,8 @@ void KMAcctImap::slotResetConnectionError()
void KMAcctImap::slotFolderSelected( KMFolderImap* folder, bool )
{
folder->setSelected( false );
- disconnect( folder, SIGNAL( folderComplete( KMFolderImap*, bool ) ),
- this, SLOT( slotFolderSelected( KMFolderImap*, bool) ) );
+ disconnect( folder, TQT_SIGNAL( folderComplete( KMFolderImap*, bool ) ),
+ this, TQT_SLOT( slotFolderSelected( KMFolderImap*, bool) ) );
postProcessNewMail( static_cast<KMFolder*>(folder->folder()) );
folder->close( "acctimap" );
}
@@ -580,11 +580,11 @@ void KMAcctImap::slotFolderSelected( KMFolderImap* folder, bool )
void KMAcctImap::execFilters(Q_UINT32 serNum)
{
if ( !kmkernel->filterMgr()->atLeastOneFilterAppliesTo( id() ) ) return;
- QValueListIterator<Q_UINT32> findIt = mFilterSerNums.find( serNum );
+ TQValueListIterator<Q_UINT32> findIt = mFilterSerNums.find( serNum );
if ( findIt != mFilterSerNums.end() )
return;
mFilterSerNums.append( serNum );
- mFilterSerNumsToSave.insert( QString( "%1" ).arg( serNum ), (const int *)1 );
+ mFilterSerNumsToSave.insert( TQString( "%1" ).arg( serNum ), (const int *)1 );
}
int KMAcctImap::slotFilterMsg( KMMessage *msg )
@@ -596,7 +596,7 @@ int KMAcctImap::slotFilterMsg( KMMessage *msg )
msg->setTransferInProgress(false);
Q_UINT32 serNum = msg->getMsgSerNum();
if ( serNum )
- mFilterSerNumsToSave.remove( QString( "%1" ).arg( serNum ) );
+ mFilterSerNumsToSave.remove( TQString( "%1" ).arg( serNum ) );
int filterResult = kmkernel->filterMgr()->process(msg,
KMFilterMgr::Inbound,
@@ -604,7 +604,7 @@ int KMAcctImap::slotFilterMsg( KMMessage *msg )
id() );
if (filterResult == 2) {
// something went horribly wrong (out of space?)
- kmkernel->emergencyExit( i18n("Unable to process messages: " ) + QString::fromLocal8Bit(strerror(errno)));
+ kmkernel->emergencyExit( i18n("Unable to process messages: " ) + TQString::fromLocal8Bit(strerror(errno)));
return 2;
}
if (msg->parent()) { // unGet this msg
diff --git a/kmail/kmacctimap.h b/kmail/kmacctimap.h
index 03aa0aa92..c69bca899 100644
--- a/kmail/kmacctimap.h
+++ b/kmail/kmacctimap.h
@@ -23,7 +23,7 @@
#define KMAcctImap_h
#include "imapaccountbase.h"
-#include <qdict.h>
+#include <tqdict.h>
class KMFolderImap;
class KMFolderTreeItem;
@@ -51,7 +51,7 @@ public:
/**
* Inherited methods.
*/
- virtual QString type(void) const;
+ virtual TQString type(void) const;
virtual void processNewMail(bool);
ConnectionState makeConnection();
@@ -103,16 +103,16 @@ public slots:
protected:
friend class ::AccountManager;
- KMAcctImap(AccountManager* owner, const QString& accountName, uint id);
+ KMAcctImap(AccountManager* owner, const TQString& accountName, uint id);
/**
* Handle an error coming from a KIO job
* See ImapAccountBase::handleJobError for details.
*/
- virtual bool handleError( int error, const QString &errorMsg, KIO::Job* job, const QString& context, bool abortSync = false );
+ virtual bool handleError( int error, const TQString &errorMsg, KIO::Job* job, const TQString& context, bool abortSync = false );
virtual void cancelMailCheck();
- QPtrList<KMail::ImapJob> mJobList;
- QGuardedPtr<KMFolderImap> mFolder;
+ TQPtrList<KMail::ImapJob> mJobList;
+ TQGuardedPtr<KMFolderImap> mFolder;
protected slots:
/** new-mail-notification for the current folder (is called via folderComplete) */
@@ -143,9 +143,9 @@ protected slots:
private:
int mCountRemainChecks;
/** used to reset connection errors */
- QTimer mErrorTimer;
- QValueList<Q_UINT32> mFilterSerNums;
- QDict<int> mFilterSerNumsToSave;
+ TQTimer mErrorTimer;
+ TQValueList<Q_UINT32> mFilterSerNums;
+ TQDict<int> mFilterSerNumsToSave;
KMail::ActionScheduler *mScheduler;
};
diff --git a/kmail/kmacctlocal.cpp b/kmail/kmacctlocal.cpp
index dfc8a1877..b486b5378 100644
--- a/kmail/kmacctlocal.cpp
+++ b/kmail/kmacctlocal.cpp
@@ -20,8 +20,8 @@ using KPIM::ProgressManager;
#include <kdebug.h>
#include <kconfig.h>
-#include <qfileinfo.h>
-#include <qstylesheet.h>
+#include <tqfileinfo.h>
+#include <tqstylesheet.h>
#include <stdlib.h>
#include <stdio.h>
@@ -29,7 +29,7 @@ using KPIM::ProgressManager;
#include <assert.h>
//-----------------------------------------------------------------------------
-KMAcctLocal::KMAcctLocal(AccountManager* aOwner, const QString& aAccountName, uint id):
+KMAcctLocal::KMAcctLocal(AccountManager* aOwner, const TQString& aAccountName, uint id):
KMAccount(aOwner, aAccountName, id), mHasNewMail( false ),
mAddedOk( true ), mNumMsgs( 0 ),
mMsgsFetched( 0 ), mMailFolder( 0 )
@@ -45,7 +45,7 @@ KMAcctLocal::~KMAcctLocal()
//-----------------------------------------------------------------------------
-QString KMAcctLocal::type(void) const
+TQString KMAcctLocal::type(void) const
{
return "local";
}
@@ -79,7 +79,7 @@ void KMAcctLocal::processNewMail(bool)
return;
}
- QTime t;
+ TQTime t;
t.start();
for ( mMsgsFetched = 0; mMsgsFetched < mNumMsgs; ++mMsgsFetched )
@@ -101,7 +101,7 @@ void KMAcctLocal::processNewMail(bool)
bool KMAcctLocal::preProcess()
{
if ( precommand().isEmpty() ) {
- QFileInfo fi( location() );
+ TQFileInfo fi( location() );
if ( fi.size() == 0 ) {
BroadcastStatus::instance()->setStatusMsgTransmissionCompleted( mName, 0 );
checkDone( mHasNewMail, CheckOK );
@@ -129,7 +129,7 @@ bool KMAcctLocal::preProcess()
Q_ASSERT( !mMailCheckProgressItem );
- QString escapedName = QStyleSheet::escape( mName );
+ TQString escapedName = TQStyleSheet::escape( mName );
mMailCheckProgressItem = KPIM::ProgressManager::createProgressItem(
"MailCheck" + mName,
escapedName,
@@ -148,7 +148,7 @@ bool KMAcctLocal::preProcess()
const int rc = mMailFolder->open("acctlocalMail");
if ( rc != 0 ) {
- QString aStr;
+ TQString aStr;
aStr = i18n("Cannot open file:");
aStr += mMailFolder->path()+"/"+mMailFolder->name();
KMessageBox::sorry(0, aStr);
@@ -163,7 +163,7 @@ bool KMAcctLocal::preProcess()
kdDebug(5006) << "mailFolder could not be locked" << endl;
mMailFolder->close("acctlocalMail");
checkDone( mHasNewMail, CheckError );
- QString errMsg = i18n( "Transmission failed: Could not lock %1." )
+ TQString errMsg = i18n( "Transmission failed: Could not lock %1." )
.arg( mMailFolder->location() );
BroadcastStatus::instance()->setStatusMsg( errMsg );
return false;
@@ -192,7 +192,7 @@ bool KMAcctLocal::fetchMsg()
/* This causes mail eating
if (kmkernel->mailCheckAborted()) break; */
- const QString statusMsg = mStatusMsgStub.arg( mMsgsFetched );
+ const TQString statusMsg = mStatusMsgStub.arg( mMsgsFetched );
//BroadcastStatus::instance()->setStatusMsg( statusMsg );
mMailCheckProgressItem->incCompletedItems();
mMailCheckProgressItem->updateProgress();
@@ -203,12 +203,12 @@ bool KMAcctLocal::fetchMsg()
{
#if 0
// debug code, don't remove
- QFile fileD0( "testdat_xx-0-0" );
+ TQFile fileD0( "testdat_xx-0-0" );
if( fileD0.open( IO_WriteOnly ) ) {
- QCString s = msg->asString();
+ TQCString s = msg->asString();
uint l = s.length();
if ( l > 0 ) {
- QDataStream ds( &fileD0 );
+ TQDataStream ds( &fileD0 );
ds.writeRawBytes( s.data(), l );
}
fileD0.close(); // If data is 0 we just create a zero length file.
@@ -273,7 +273,7 @@ void KMAcctLocal::readConfig(KConfig& config)
{
KMAccount::readConfig(config);
mLocation = config.readPathEntry("Location", mLocation);
- QString locktype = config.readEntry("LockType", "procmail_lockfile" );
+ TQString locktype = config.readEntry("LockType", "procmail_lockfile" );
if( locktype == "procmail_lockfile" ) {
mLock = procmail_lockfile;
@@ -296,7 +296,7 @@ void KMAcctLocal::writeConfig(KConfig& config)
config.writePathEntry("Location", mLocation);
- QString st = "fcntl";
+ TQString st = "fcntl";
if (mLock == procmail_lockfile) st = "procmail_lockfile";
else if (mLock == mutt_dotlock) st = "mutt_dotlock";
else if (mLock == mutt_dotlock_privileged) st = "mutt_dotlock_privileged";
@@ -311,12 +311,12 @@ void KMAcctLocal::writeConfig(KConfig& config)
//-----------------------------------------------------------------------------
-void KMAcctLocal::setLocation(const QString& aLocation)
+void KMAcctLocal::setLocation(const TQString& aLocation)
{
mLocation = aLocation;
}
-void KMAcctLocal::setProcmailLockFileName(const QString& s)
+void KMAcctLocal::setProcmailLockFileName(const TQString& s)
{
mProcmailLockFileName = s;
}
diff --git a/kmail/kmacctlocal.h b/kmail/kmacctlocal.h
index 12c14c107..2abe34f5b 100644
--- a/kmail/kmacctlocal.h
+++ b/kmail/kmacctlocal.h
@@ -12,7 +12,7 @@ class KMAcctLocal: public KMAccount
protected:
friend class ::AccountManager;
- KMAcctLocal(AccountManager* owner, const QString& accountName, uint id);
+ KMAcctLocal(AccountManager* owner, const TQString& accountName, uint id);
public:
virtual ~KMAcctLocal();
@@ -22,17 +22,17 @@ public:
/** Access to location of local mail file (usually something like
"/var/spool/mail/joe"). */
- QString location(void) const { return mLocation; }
- virtual void setLocation(const QString&);
+ TQString location(void) const { return mLocation; }
+ virtual void setLocation(const TQString&);
/** Acceso to Locking method */
LockType lockType(void) const { return mLock; }
void setLockType(LockType lt) { mLock = lt; }
- QString procmailLockFileName(void) const { return mProcmailLockFileName; }
- void setProcmailLockFileName(const QString& s);
+ TQString procmailLockFileName(void) const { return mProcmailLockFileName; }
+ void setProcmailLockFileName(const TQString& s);
- virtual QString type(void) const;
+ virtual TQString type(void) const;
virtual void processNewMail(bool);
virtual void readConfig(KConfig&);
virtual void writeConfig(KConfig&);
@@ -43,15 +43,15 @@ private:
void postProcess();
private:
- QString mLocation;
- QString mProcmailLockFileName;
+ TQString mLocation;
+ TQString mProcmailLockFileName;
bool mHasNewMail;
bool mAddedOk;
LockType mLock;
int mNumMsgs;
int mMsgsFetched;
KMFolder *mMailFolder;
- QString mStatusMsgStub;
+ TQString mStatusMsgStub;
};
#endif /*kmacctlocal_h*/
diff --git a/kmail/kmacctmaildir.cpp b/kmail/kmacctmaildir.cpp
index 0b62c6cb3..b3c5d31c7 100644
--- a/kmail/kmacctmaildir.cpp
+++ b/kmail/kmacctmaildir.cpp
@@ -4,7 +4,7 @@
#include <config.h>
#endif
-#include <qfileinfo.h>
+#include <tqfileinfo.h>
#include "kmacctmaildir.h"
#include "kmfoldermaildir.h"
#include "kmacctfolder.h"
@@ -19,7 +19,7 @@ using KPIM::ProgressManager;
#include <kdebug.h>
#include <kconfig.h>
-#include <qstylesheet.h>
+#include <tqstylesheet.h>
#include <stdlib.h>
#include <stdio.h>
@@ -33,7 +33,7 @@ using KPIM::ProgressManager;
#undef None
//-----------------------------------------------------------------------------
-KMAcctMaildir::KMAcctMaildir(AccountManager* aOwner, const QString& aAccountName, uint id):
+KMAcctMaildir::KMAcctMaildir(AccountManager* aOwner, const TQString& aAccountName, uint id):
KMAccount(aOwner, aAccountName, id)
{
}
@@ -47,7 +47,7 @@ KMAcctMaildir::~KMAcctMaildir()
//-----------------------------------------------------------------------------
-QString KMAcctMaildir::type(void) const
+TQString KMAcctMaildir::type(void) const
{
return "maildir";
}
@@ -79,11 +79,11 @@ void KMAcctMaildir::pseudoAssign( const KMAccount * a )
//-----------------------------------------------------------------------------
void KMAcctMaildir::processNewMail(bool)
{
- QTime t;
+ TQTime t;
hasNewMail = false;
if ( precommand().isEmpty() ) {
- QFileInfo fi( location() );
+ TQFileInfo fi( location() );
if ( !fi.exists() ) {
checkDone( hasNewMail, CheckOK );
BroadcastStatus::instance()->setStatusMsgTransmissionCompleted( mName, 0 );
@@ -110,7 +110,7 @@ void KMAcctMaildir::processNewMail(bool)
i18n("Preparing transmission from \"%1\"...").arg(mName));
Q_ASSERT( !mMailCheckProgressItem );
- QString escapedName = QStyleSheet::escape( mName );
+ TQString escapedName = TQStyleSheet::escape( mName );
mMailCheckProgressItem = KPIM::ProgressManager::createProgressItem(
"MailCheck" + mName,
escapedName,
@@ -130,7 +130,7 @@ void KMAcctMaildir::processNewMail(bool)
rc = mailFolder.open("acctmaildirMail");
if (rc)
{
- QString aStr = i18n("<qt>Cannot open folder <b>%1</b>.</qt>").arg( mailFolder.location() );
+ TQString aStr = i18n("<qt>Cannot open folder <b>%1</b>.</qt>").arg( mailFolder.location() );
KMessageBox::sorry(0, aStr);
kdDebug(5006) << "cannot open folder " << mailFolder.location() << endl;
checkDone( hasNewMail, CheckError );
@@ -147,7 +147,7 @@ void KMAcctMaildir::processNewMail(bool)
t.start();
// prepare the static parts of the status message:
- QString statusMsgStub = i18n("Moving message %3 of %2 from %1.")
+ TQString statusMsgStub = i18n("Moving message %3 of %2 from %1.")
.arg(mailFolder.location()).arg(num);
mMailCheckProgressItem->setTotalItems( num );
@@ -162,7 +162,7 @@ void KMAcctMaildir::processNewMail(bool)
}
if (!addedOk) break;
- QString statusMsg = statusMsgStub.arg(i);
+ TQString statusMsg = statusMsgStub.arg(i);
mMailCheckProgressItem->incCompletedItems();
mMailCheckProgressItem->updateProgress();
mMailCheckProgressItem->setStatus( statusMsg );
@@ -228,7 +228,7 @@ void KMAcctMaildir::writeConfig(KConfig& config)
}
//-----------------------------------------------------------------------------
-void KMAcctMaildir::setLocation(const QString& aLocation)
+void KMAcctMaildir::setLocation(const TQString& aLocation)
{
mLocation = aLocation;
}
diff --git a/kmail/kmacctmaildir.h b/kmail/kmacctmaildir.h
index 05b90833c..1c655861a 100644
--- a/kmail/kmacctmaildir.h
+++ b/kmail/kmacctmaildir.h
@@ -12,7 +12,7 @@ class KMAcctMaildir: public KMAccount
protected:
friend class ::AccountManager;
- KMAcctMaildir(AccountManager* owner, const QString& accountName, uint id);
+ KMAcctMaildir(AccountManager* owner, const TQString& accountName, uint id);
public:
virtual ~KMAcctMaildir();
@@ -21,16 +21,16 @@ public:
/** Access to location of maildir mail file (usually something like
"/home/joe/Maildir"). */
- const QString& location(void) const { return mLocation; }
- virtual void setLocation(const QString&);
+ const TQString& location(void) const { return mLocation; }
+ virtual void setLocation(const TQString&);
- virtual QString type(void) const;
+ virtual TQString type(void) const;
virtual void processNewMail(bool);
virtual void readConfig(KConfig&);
virtual void writeConfig(KConfig&);
protected:
- QString mLocation;
+ TQString mLocation;
bool hasNewMail;
};
diff --git a/kmail/kmacctseldlg.cpp b/kmail/kmacctseldlg.cpp
index e381b6300..44df37c61 100644
--- a/kmail/kmacctseldlg.cpp
+++ b/kmail/kmacctseldlg.cpp
@@ -24,36 +24,36 @@
#include <config.h>
#endif
-#include <qbuttongroup.h>
-#include <qlayout.h>
-#include <qradiobutton.h>
+#include <tqbuttongroup.h>
+#include <tqlayout.h>
+#include <tqradiobutton.h>
#include <klocale.h>
#include "kmacctseldlg.moc"
-KMAcctSelDlg::KMAcctSelDlg( QWidget *parent, const char *name, bool modal )
+KMAcctSelDlg::KMAcctSelDlg( TQWidget *parent, const char *name, bool modal )
: KDialogBase( parent, name, modal, i18n("Add Account"), Ok|Cancel, Ok )
{
- QFrame *page = makeMainWidget();
- QVBoxLayout *topLayout = new QVBoxLayout( page, 0, spacingHint() );
+ TQFrame *page = makeMainWidget();
+ TQVBoxLayout *topLayout = new TQVBoxLayout( page, 0, spacingHint() );
- QButtonGroup *group = new QButtonGroup( i18n("Account Type"), page );
- connect(group, SIGNAL(clicked(int)), SLOT(buttonClicked(int)) );
+ TQButtonGroup *group = new TQButtonGroup( i18n("Account Type"), page );
+ connect(group, TQT_SIGNAL(clicked(int)), TQT_SLOT(buttonClicked(int)) );
topLayout->addWidget( group, 10 );
- QVBoxLayout *vlay = new QVBoxLayout( group, spacingHint()*2, spacingHint() );
+ TQVBoxLayout *vlay = new TQVBoxLayout( group, spacingHint()*2, spacingHint() );
vlay->addSpacing( fontMetrics().lineSpacing() );
- QRadioButton *radioButton1 = new QRadioButton( i18n("&Local mailbox"), group );
+ TQRadioButton *radioButton1 = new TQRadioButton( i18n("&Local mailbox"), group );
vlay->addWidget( radioButton1 );
- QRadioButton *radioButton2 = new QRadioButton( i18n("&POP3"), group );
+ TQRadioButton *radioButton2 = new TQRadioButton( i18n("&POP3"), group );
vlay->addWidget( radioButton2 );
- QRadioButton *radioButton3 = new QRadioButton( i18n("&IMAP"), group );
+ TQRadioButton *radioButton3 = new TQRadioButton( i18n("&IMAP"), group );
vlay->addWidget( radioButton3 );
- QRadioButton *radioButton4 = new QRadioButton( i18n("&Disconnected IMAP"), group );
+ TQRadioButton *radioButton4 = new TQRadioButton( i18n("&Disconnected IMAP"), group );
vlay->addWidget( radioButton4 );
- QRadioButton *radioButton5 = new QRadioButton( i18n("&Maildir mailbox"), group );
+ TQRadioButton *radioButton5 = new TQRadioButton( i18n("&Maildir mailbox"), group );
vlay->addWidget( radioButton5 );
vlay->addStretch( 10 );
diff --git a/kmail/kmacctseldlg.h b/kmail/kmacctseldlg.h
index 00f1fec90..3aad59b15 100644
--- a/kmail/kmacctseldlg.h
+++ b/kmail/kmacctseldlg.h
@@ -32,7 +32,7 @@ class KMAcctSelDlg: public KDialogBase
Q_OBJECT
public:
- KMAcctSelDlg( QWidget *parent=0, const char *name=0, bool modal=true );
+ KMAcctSelDlg( TQWidget *parent=0, const char *name=0, bool modal=true );
/**
* Returns selected button from the account selection group:
diff --git a/kmail/kmaddrbook.cpp b/kmail/kmaddrbook.cpp
index 288784db4..b115f54e2 100644
--- a/kmail/kmaddrbook.cpp
+++ b/kmail/kmaddrbook.cpp
@@ -32,33 +32,33 @@
#include <kabc/vcardconverter.h>
#include <dcopref.h>
-#include <qregexp.h>
+#include <tqregexp.h>
-void KabcBridge::addresses(QStringList& result) // includes lists
+void KabcBridge::addresses(TQStringList& result) // includes lists
{
KCursorSaver busy(KBusyPtr::busy()); // loading might take a while
KABC::AddressBook *addressBook = KABC::StdAddressBook::self( true );
KABC::AddressBook::ConstIterator it;
for( it = addressBook->begin(); it != addressBook->end(); ++it ) {
- const QStringList emails = (*it).emails();
- QString n = (*it).prefix() + " " +
+ const TQStringList emails = (*it).emails();
+ TQString n = (*it).prefix() + " " +
(*it).givenName() + " " +
(*it).additionalName() + " " +
(*it).familyName() + " " +
(*it).suffix();
n = n.simplifyWhiteSpace();
- QRegExp needQuotes("[^ 0-9A-Za-z\\x0080-\\xFFFF]");
- QString endQuote = "\" ";
- QStringList::ConstIterator mit;
- QString addr, email;
+ TQRegExp needQuotes("[^ 0-9A-Za-z\\x0080-\\xFFFF]");
+ TQString endQuote = "\" ";
+ TQStringList::ConstIterator mit;
+ TQString addr, email;
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;
@@ -84,9 +84,9 @@ void KabcBridge::addresses(QStringList& result) // includes lists
result.sort();
}
-QStringList KabcBridge::addresses()
+TQStringList KabcBridge::addresses()
{
- QStringList entries;
+ TQStringList entries;
KABC::AddressBook::ConstIterator it;
const KABC::AddressBook *addressBook = KABC::StdAddressBook::self( true );
@@ -97,34 +97,34 @@ QStringList KabcBridge::addresses()
}
//-----------------------------------------------------------------------------
-QString KabcBridge::expandNickName( const QString& nickName )
+TQString KabcBridge::expandNickName( const TQString& nickName )
{
if ( nickName.isEmpty() )
- return QString::null;
+ return TQString::null;
- const QString lowerNickName = nickName.lower();
+ const TQString lowerNickName = nickName.lower();
const KABC::AddressBook *addressBook = KABC::StdAddressBook::self( true );
for( KABC::AddressBook::ConstIterator it = addressBook->begin();
it != addressBook->end(); ++it ) {
if ( (*it).nickName().lower() == lowerNickName )
return (*it).fullEmail();
}
- return QString::null;
+ return TQString::null;
}
//-----------------------------------------------------------------------------
-QStringList KabcBridge::categories()
+TQStringList KabcBridge::categories()
{
KABC::AddressBook *addressBook = KABC::StdAddressBook::self( true );
KABC::Addressee::List addresses = addressBook->allAddressees();
- QStringList allcategories, aux;
+ TQStringList allcategories, aux;
for ( KABC::Addressee::List::Iterator it = addresses.begin();
it != addresses.end(); ++it ) {
aux = ( *it ).categories();
- for ( QStringList::ConstIterator itAux = aux.begin();
+ for ( TQStringList::ConstIterator itAux = aux.begin();
itAux != aux.end(); ++itAux ) {
// don't have duplicates in allcategories
if ( allcategories.find( *itAux ) == allcategories.end() )
diff --git a/kmail/kmaddrbook.h b/kmail/kmaddrbook.h
index bc4205a20..119943f0f 100644
--- a/kmail/kmaddrbook.h
+++ b/kmail/kmaddrbook.h
@@ -20,7 +20,7 @@
#ifndef KMAddrBook_h
#define KMAddrBook_h
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include <kdeversion.h>
#include <kabc/addressee.h>
@@ -29,14 +29,14 @@ class QWidget;
class KabcBridge {
public:
- static QStringList addresses();
- static void addresses(QStringList& result);
- static QString expandNickName( const QString& nickName );
+ static TQStringList addresses();
+ static void addresses(TQStringList& result);
+ static TQString expandNickName( const TQString& nickName );
/**
Returns all categories found in the addressbook.
@return A list of the categories
*/
- static QStringList categories();
+ static TQStringList categories();
};
diff --git a/kmail/kmailIface.h b/kmail/kmailIface.h
index 1a4a04f23..fd47f0485 100644
--- a/kmail/kmailIface.h
+++ b/kmail/kmailIface.h
@@ -5,7 +5,7 @@
#include <dcopobject.h>
#include <dcopref.h>
#include <kurl.h>
-#include <qstringlist.h>
+#include <tqstringlist.h>
/** checkMail wont show reader but will check mail. use openReader to
show if you give a filename to openReader it will show mbox or
@@ -20,53 +20,53 @@ class KMailIface : virtual public DCOPObject
k_dcop:
virtual void checkMail() = 0;
- virtual QStringList accounts() = 0;
- virtual void checkAccount(const QString &account) = 0;
+ virtual TQStringList accounts() = 0;
+ virtual void checkAccount(const TQString &account) = 0;
virtual void openReader() = 0;
- virtual int openComposer(const QString &to, const QString &cc,
- const QString &bcc, const QString &subject,
- const QString &body, int hidden,
+ virtual int openComposer(const TQString &to, const TQString &cc,
+ const TQString &bcc, const TQString &subject,
+ const TQString &body, int hidden,
const KURL &messageFile) = 0;
- virtual int openComposer(const QString &to, const QString &cc,
- const QString &bcc, const QString &subject,
- const QString &body, int hidden,
+ virtual int openComposer(const TQString &to, const TQString &cc,
+ const TQString &bcc, const TQString &subject,
+ const TQString &body, int hidden,
const KURL &messageFile,
const KURL &attachURL) = 0;
- virtual int openComposer(const QString &to, const QString &cc,
- const QString &bcc, const QString &subject,
- const QString &body, int hidden,
+ virtual int openComposer(const TQString &to, const TQString &cc,
+ const TQString &bcc, const TQString &subject,
+ const TQString &body, int hidden,
const KURL &messageFile,
const KURL::List &attachURLs) = 0;
- virtual int openComposer (const QString &to, const QString &cc,
- const QString &bcc, const QString &subject,
- const QString &body, int hidden,
- const QString &attachName,
- const QCString &attachCte,
- const QCString &attachData,
- const QCString &attachType,
- const QCString &attachSubType,
- const QCString &attachParamAttr,
- const QString &attachParamValue,
- const QCString &attachContDisp) = 0;
- virtual int openComposer (const QString &to, const QString &cc,
- const QString &bcc, const QString &subject,
- const QString &body, int hidden,
- const QString &attachName,
- const QCString &attachCte,
- const QCString &attachData,
- const QCString &attachType,
- const QCString &attachSubType,
- const QCString &attachParamAttr,
- const QString &attachParamValue,
- const QCString &attachContDisp,
- const QCString &attachCharset) = 0;
+ virtual int openComposer (const TQString &to, const TQString &cc,
+ const TQString &bcc, const TQString &subject,
+ const TQString &body, int hidden,
+ const TQString &attachName,
+ const TQCString &attachCte,
+ const TQCString &attachData,
+ const TQCString &attachType,
+ const TQCString &attachSubType,
+ const TQCString &attachParamAttr,
+ const TQString &attachParamValue,
+ const TQCString &attachContDisp) = 0;
+ virtual int openComposer (const TQString &to, const TQString &cc,
+ const TQString &bcc, const TQString &subject,
+ const TQString &body, int hidden,
+ const TQString &attachName,
+ const TQCString &attachCte,
+ const TQCString &attachData,
+ const TQCString &attachType,
+ const TQCString &attachSubType,
+ const TQCString &attachParamAttr,
+ const TQString &attachParamValue,
+ const TQCString &attachContDisp,
+ const TQCString &attachCharset) = 0;
/** Open composer and return reference to DCOP interface of composer window.
If hidden is true, the window will not be shown. If you use that option,
it's your responsibility to call the send() function of the composer in
order to actually send the mail. */
- virtual DCOPRef openComposer(const QString &to, const QString &cc,
- const QString &bcc, const QString &subject,
- const QString &body, bool hidden) = 0;
+ virtual DCOPRef openComposer(const TQString &to, const TQString &cc,
+ const TQString &bcc, const TQString &subject,
+ const TQString &body, bool hidden) = 0;
/**
Send a certificate request to the CA specified in \a to. The
@@ -75,8 +75,8 @@ k_dcop:
This method will set content type encoding, mime types, etc. as
per the MailTT specification.
*/
- virtual int sendCertificate( const QString& to,
- const QByteArray& certData ) = 0;
+ virtual int sendCertificate( const TQString& to,
+ const TQByteArray& certData ) = 0;
virtual void compactAllFolders() = 0;
@@ -96,16 +96,16 @@ k_dcop:
=-3, Can't allocate memory.
=-4, Message already exists in folder.
*/
- virtual int dcopAddMessage(const QString & foldername,
- const QString & messagefile,
- const QString & MsgStatusFlags = QString()) = 0;
- virtual int dcopAddMessage(const QString & foldername,
+ virtual int dcopAddMessage(const TQString & foldername,
+ const TQString & messagefile,
+ const TQString & MsgStatusFlags = TQString()) = 0;
+ virtual int dcopAddMessage(const TQString & foldername,
const KURL & messagefile,
- const QString & MsgStatusFlags = QString()) = 0;
+ const TQString & MsgStatusFlags = TQString()) = 0;
- virtual QStringList folderList() const =0;
- virtual DCOPRef getFolder( const QString& vpath ) =0;
- virtual void selectFolder( QString folder ) =0;
+ virtual TQStringList folderList() const =0;
+ virtual DCOPRef getFolder( const TQString& vpath ) =0;
+ virtual void selectFolder( TQString folder ) =0;
virtual bool canQueryClose() =0;
/**
@@ -113,7 +113,7 @@ k_dcop:
* @param transport the name of the transport as defined in the sending
accounts configuration.
*/
- virtual void setDefaultTransport( const QString & transport ) =0;
+ virtual void setDefaultTransport( const TQString & transport ) =0;
virtual int timeOfLastMessageCountChange() const =0;
@@ -141,7 +141,7 @@ k_dcop:
k_dcop_signals:
void unreadCountChanged();
- void unreadCountChanged( const QString& folderURL, int numUnread );
+ void unreadCountChanged( const TQString& folderURL, int numUnread );
k_dcop_hidden:
/** DCOP call which is used by the Kontact plugin to create a new message.
@@ -149,9 +149,9 @@ k_dcop_hidden:
* @TODO Rename to newMessageInternal()
* @TODO Merge this and the various openComposer methods for better code reuse
*/
- virtual DCOPRef newMessage(const QString &to,
- const QString &cc,
- const QString& bcc,
+ virtual DCOPRef newMessage(const TQString &to,
+ const TQString &cc,
+ const TQString& bcc,
bool hidden,
bool useFolderId,
const KURL &messageFile,
@@ -162,7 +162,7 @@ k_dcop_hidden:
@param messageId this parameter is ignored.
*/
/* @TODO Get rid of the messageId parameter. */
- virtual bool showMail( Q_UINT32 serialNumber, QString messageId ) = 0;
+ virtual bool showMail( Q_UINT32 serialNumber, TQString messageId ) = 0;
/**
* DCOP-enabled for KMailUniqueAppHandler in the kontact plugin
@@ -179,9 +179,9 @@ k_dcop_hidden:
*
* DCOP-enabled for use in kaddressbook drop
*/
- virtual QString getFrom( Q_UINT32 serialNumber ) = 0;
- virtual QString debugScheduler() = 0;
- virtual QString debugSernum( Q_UINT32 serialNumber ) = 0;
+ virtual TQString getFrom( Q_UINT32 serialNumber ) = 0;
+ virtual TQString debugScheduler() = 0;
+ virtual TQString debugSernum( Q_UINT32 serialNumber ) = 0;
/** Does essentially the same as dcopAddMessage except that it doesn't reject
duplicate messages.
@@ -201,19 +201,19 @@ k_dcop_hidden:
=-3, Can't allocate memory.
=-4, Message already exists in folder.
*/
- virtual int dcopAddMessage_fastImport(const QString & foldername,
- const QString & messagefile,
- const QString & MsgStatusFlags = QString()) = 0;
- virtual int dcopAddMessage_fastImport(const QString & foldername,
+ virtual int dcopAddMessage_fastImport(const TQString & foldername,
+ const TQString & messagefile,
+ const TQString & MsgStatusFlags = TQString()) = 0;
+ virtual int dcopAddMessage_fastImport(const TQString & foldername,
const KURL & messagefile,
- const QString & MsgStatusFlags = QString()) = 0;
+ const TQString & MsgStatusFlags = TQString()) = 0;
/** Clears the list of added message ids which is used to filter out
duplicates. */
virtual void dcopResetAddMessage() = 0;
- virtual void loadProfile( const QString& path ) = 0;
- virtual void saveToProfile( const QString& path ) const = 0;
+ virtual void loadProfile( const TQString& path ) = 0;
+ virtual void saveToProfile( const TQString& path ) const = 0;
};
#endif
diff --git a/kmail/kmail_part.cpp b/kmail/kmail_part.cpp
index e9722c253..22d48f1ee 100644
--- a/kmail/kmail_part.cpp
+++ b/kmail/kmail_part.cpp
@@ -54,14 +54,14 @@ using KRecentAddress::RecentAddresses;
#include <ksettings/dispatcher.h>
-#include <qlayout.h>
+#include <tqlayout.h>
typedef KParts::GenericFactory< KMailPart > KMailFactory;
K_EXPORT_COMPONENT_FACTORY( libkmailpart, KMailFactory )
-KMailPart::KMailPart(QWidget *parentWidget, const char *widgetName,
- QObject *parent, const char *name, const QStringList &) :
+KMailPart::KMailPart(TQWidget *parentWidget, const char *widgetName,
+ TQObject *parent, const char *name, const TQStringList &) :
DCOPObject("KMailIface"), KParts::ReadOnlyPart(parent, name),
mParentWidget( parentWidget )
{
@@ -99,22 +99,22 @@ KMailPart::KMailPart(QWidget *parentWidget, const char *widgetName,
kapp->dcopClient()->resume(); // Ok. We are ready for DCOP requests.
// create a canvas to insert our widget
- QWidget *canvas = new QWidget(parentWidget, widgetName);
- canvas->setFocusPolicy(QWidget::ClickFocus);
+ TQWidget *canvas = new TQWidget(parentWidget, widgetName);
+ canvas->setFocusPolicy(TQWidget::ClickFocus);
setWidget(canvas);
KGlobal::iconLoader()->addAppDir("kmail");
#if 0
//It's also possible to make a part out of a readerWin
KMReaderWin *mReaderWin = new KMReaderWin( canvas, canvas, actionCollection() );
- connect(mReaderWin, SIGNAL(urlClicked(const KURL&,int)),
- mReaderWin, SLOT(slotUrlClicked()));
- QVBoxLayout *topLayout = new QVBoxLayout(canvas);
+ connect(mReaderWin, TQT_SIGNAL(urlClicked(const KURL&,int)),
+ mReaderWin, TQT_SLOT(slotUrlClicked()));
+ TQVBoxLayout *topLayout = new TQVBoxLayout(canvas);
topLayout->addWidget(mReaderWin);
mReaderWin->setAutoDelete( true );
kmkernel->inboxFolder()->open();
KMMessage *msg = kmkernel->inboxFolder()->getMsg(0);
mReaderWin->setMsg( msg, true );
- mReaderWin->setFocusPolicy(QWidget::ClickFocus);
+ mReaderWin->setFocusPolicy(TQWidget::ClickFocus);
mStatusBar = new KMailStatusBarExtension(this);
//new KParts::SideBarExtension( kmkernel->mainWin()-mainKMWidget()->leftFrame(), this );
KGlobal::iconLoader()->addAppDir("kmail");
@@ -123,9 +123,9 @@ KMailPart::KMailPart(QWidget *parentWidget, const char *widgetName,
#else
mainWidget = new KMMainWidget( canvas, "mainWidget", this, actionCollection(),
kapp->config());
- QVBoxLayout *topLayout = new QVBoxLayout(canvas);
+ TQVBoxLayout *topLayout = new TQVBoxLayout(canvas);
topLayout->addWidget(mainWidget);
- mainWidget->setFocusPolicy(QWidget::ClickFocus);
+ mainWidget->setFocusPolicy(TQWidget::ClickFocus);
mStatusBar = new KMailStatusBarExtension(this);
mStatusBar->addStatusBarItem( mainWidget->vacationScriptIndicator(), 2, false );
@@ -135,20 +135,20 @@ KMailPart::KMailPart(QWidget *parentWidget, const char *widgetName,
// Get to know when the user clicked on a folder in the KMail part and update the headerWidget of Kontact
KParts::InfoExtension *ie = new KParts::InfoExtension( this, "KMailInfo" );
- connect( mainWidget->folderTree(), SIGNAL(folderSelected(KMFolder*)), this, SLOT(exportFolder(KMFolder*)) );
- connect( mainWidget->folderTree(), SIGNAL(iconChanged(KMFolderTreeItem*)),
- this, SLOT(slotIconChanged(KMFolderTreeItem*)) );
- connect( mainWidget->folderTree(), SIGNAL(nameChanged(KMFolderTreeItem*)),
- this, SLOT(slotNameChanged(KMFolderTreeItem*)) );
- connect( this, SIGNAL(textChanged(const QString&)), ie, SIGNAL(textChanged(const QString&)) );
- connect( this, SIGNAL(iconChanged(const QPixmap&)), ie, SIGNAL(iconChanged(const QPixmap&)) );
+ connect( mainWidget->folderTree(), TQT_SIGNAL(folderSelected(KMFolder*)), this, TQT_SLOT(exportFolder(KMFolder*)) );
+ connect( mainWidget->folderTree(), TQT_SIGNAL(iconChanged(KMFolderTreeItem*)),
+ this, TQT_SLOT(slotIconChanged(KMFolderTreeItem*)) );
+ connect( mainWidget->folderTree(), TQT_SIGNAL(nameChanged(KMFolderTreeItem*)),
+ this, TQT_SLOT(slotNameChanged(KMFolderTreeItem*)) );
+ connect( this, TQT_SIGNAL(textChanged(const TQString&)), ie, TQT_SIGNAL(textChanged(const TQString&)) );
+ connect( this, TQT_SIGNAL(iconChanged(const TQPixmap&)), ie, TQT_SIGNAL(iconChanged(const TQPixmap&)) );
KGlobal::iconLoader()->addAppDir( "kmail" );
setXMLFile( "kmail_part.rc" );
#endif
KSettings::Dispatcher::self()->registerInstance( KMailFactory::instance(), mKMailKernel,
- SLOT( slotConfigChanged() ) );
+ TQT_SLOT( slotConfigChanged() ) );
}
KMailPart::~KMailPart()
@@ -231,7 +231,7 @@ void KMailPart::exit()
delete this;
}
-QWidget* KMailPart::parentWidget() const
+TQWidget* KMailPart::parentWidget() const
{
return mParentWidget;
}
diff --git a/kmail/kmail_part.h b/kmail/kmail_part.h
index 7a4ed9b78..97a667518 100644
--- a/kmail/kmail_part.h
+++ b/kmail/kmail_part.h
@@ -34,7 +34,7 @@
#include <kparts/event.h>
#include <kparts/part.h>
-#include <qwidget.h>
+#include <tqwidget.h>
#include <kdepimmacros.h>
class KInstance;
@@ -53,11 +53,11 @@ class KDE_EXPORT KMailPart: public KParts::ReadOnlyPart, virtual public KMailPar
{
Q_OBJECT
public:
- KMailPart(QWidget *parentWidget, const char *widgetName,
- QObject *parent, const char *name, const QStringList &);
+ KMailPart(TQWidget *parentWidget, const char *widgetName,
+ TQObject *parent, const char *name, const TQStringList &);
virtual ~KMailPart();
- QWidget* parentWidget() const;
+ TQWidget* parentWidget() const;
static KAboutData *createAboutData();
@@ -70,8 +70,8 @@ class KDE_EXPORT KMailPart: public KParts::ReadOnlyPart, virtual public KMailPar
void slotNameChanged( KMFolderTreeItem *fti );
signals:
- void textChanged( const QString& );
- void iconChanged( const QPixmap& );
+ void textChanged( const TQString& );
+ void iconChanged( const TQPixmap& );
protected:
virtual bool openFile();
@@ -82,7 +82,7 @@ class KDE_EXPORT KMailPart: public KParts::ReadOnlyPart, virtual public KMailPar
KMMainWidget *mainWidget;
ActionManager *mActionManager;
KMailStatusBarExtension *mStatusBar;
- QWidget *mParentWidget;
+ TQWidget *mParentWidget;
};
class KMailStatusBarExtension : public KParts::StatusBarExtension
diff --git a/kmail/kmailicalIface.h b/kmail/kmailicalIface.h
index 81948fdfa..d57611035 100644
--- a/kmail/kmailicalIface.h
+++ b/kmail/kmailicalIface.h
@@ -33,7 +33,7 @@
#define KMAILICALIFACE_H
#include <dcopobject.h>
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include <kurl.h>
// yes, this is this very header - but it tells dcopidl to include it
@@ -51,10 +51,10 @@ k_dcop:
struct SubResource {
//dcopidl barfs on those constructors, but dcopidlng works
SubResource() {} // for QValueList
- SubResource( const QString& loc, const QString& lab, bool rw, bool ar )
+ SubResource( const TQString& loc, const TQString& lab, bool rw, bool ar )
: location( loc ), label( lab ), writable( rw ), alarmRelevant( ar ) {}
- QString location; // unique
- QString label; // shown to the user
+ TQString location; // unique
+ TQString label; // shown to the user
bool writable;
bool alarmRelevant;
};
@@ -69,101 +69,101 @@ k_dcop:
/// This bitfield indicates which changes have been made in a folder, at syncing time.
enum FolderChanges { NoChange = 0, Contents = 1, ACL = 2 };
- virtual bool isWritableFolder( const QString& type,
- const QString& resource ) = 0;
+ virtual bool isWritableFolder( const TQString& type,
+ const TQString& resource ) = 0;
- virtual KMailICalIface::StorageFormat storageFormat( const QString& resource ) = 0;
+ virtual KMailICalIface::StorageFormat storageFormat( const TQString& resource ) = 0;
- virtual KURL getAttachment( const QString& resource,
+ virtual KURL getAttachment( const TQString& resource,
Q_UINT32 sernum,
- const QString& filename ) = 0;
- virtual QString attachmentMimetype( const QString &resource,
+ const TQString& filename ) = 0;
+ virtual TQString attachmentMimetype( const TQString &resource,
Q_UINT32 sernum,
- const QString &filename ) = 0;
+ const TQString &filename ) = 0;
- virtual QStringList listAttachments( const QString &resource, Q_UINT32 sernum ) = 0;
+ virtual TQStringList listAttachments( const TQString &resource, Q_UINT32 sernum ) = 0;
/// Update a kolab storage entry. Returns the new mail serial number,
/// or 0 if something went wrong. Can be used for adding as well.
- virtual Q_UINT32 update( const QString& resource,
+ virtual Q_UINT32 update( const TQString& resource,
Q_UINT32 sernum,
- const QString& subject,
- const QString& plainTextBody,
- const QMap<QCString, QString>& customHeaders,
- const QStringList& attachmentURLs,
- const QStringList& attachmentMimetypes,
- const QStringList& attachmentNames,
- const QStringList& deletedAttachments ) = 0;
-
- virtual bool deleteIncidenceKolab( const QString& resource,
+ const TQString& subject,
+ const TQString& plainTextBody,
+ const TQMap<TQCString, TQString>& customHeaders,
+ const TQStringList& attachmentURLs,
+ const TQStringList& attachmentMimetypes,
+ const TQStringList& attachmentNames,
+ const TQStringList& deletedAttachments ) = 0;
+
+ virtual bool deleteIncidenceKolab( const TQString& resource,
Q_UINT32 sernum ) = 0;
/// Return the number of mails that need to be looked at by incidencesKolab.
/// This allows to call incidencesKolab in chunks.
- virtual int incidencesKolabCount( const QString& mimetype /*ignored*/,
- const QString& resource ) = 0;
+ virtual int incidencesKolabCount( const TQString& mimetype /*ignored*/,
+ const TQString& resource ) = 0;
- virtual QMap<Q_UINT32, QString> incidencesKolab( const QString& mimetype,
- const QString& resource,
+ virtual TQMap<Q_UINT32, TQString> incidencesKolab( const TQString& mimetype,
+ const TQString& resource,
int startIndex,
int nbMessages ) = 0;
/**
* Return list of subresources. @p contentsType is
* Mail, Calendar, Contact, Note, Task or Journal
*/
- virtual QValueList<KMailICalIface::SubResource> subresourcesKolab( const QString& contentsType ) = 0;
+ virtual TQValueList<KMailICalIface::SubResource> subresourcesKolab( const TQString& contentsType ) = 0;
/**
* Trigger the creation of a new resource folder with name @param resource
* under parent @param.
* @return success or failure
*/
- virtual bool addSubresource( const QString& resource,
- const QString& parent,
- const QString& contentsType ) = 0;
+ virtual bool addSubresource( const TQString& resource,
+ const TQString& parent,
+ const TQString& contentsType ) = 0;
/**
* Trigger the deletion of a new resource folder with id @param resource.
* @return success or failure
*/
- virtual bool removeSubresource( const QString& resource ) = 0;
+ virtual bool removeSubresource( const TQString& resource ) = 0;
/**
* Causes all resource folders of the given type to be synced with the server.
*/
- virtual bool triggerSync( const QString & ) = 0;
+ virtual bool triggerSync( const TQString & ) = 0;
k_dcop_signals:
- void incidenceAdded( const QString& type, const QString& folder,
- Q_UINT32 sernum, int format, const QString& entry );
- void asyncLoadResult( const QMap<Q_UINT32, QString>, const QString& type,
- const QString& folder );
- void incidenceDeleted( const QString& type, const QString& folder,
- const QString& uid );
- void signalRefresh( const QString& type, const QString& folder );
- void subresourceAdded( const QString& type, const QString& resource,
- const QString& label, bool writable, bool alarmRelevant );
- void subresourceDeleted( const QString& type, const QString& resource );
+ void incidenceAdded( const TQString& type, const TQString& folder,
+ Q_UINT32 sernum, int format, const TQString& entry );
+ void asyncLoadResult( const TQMap<Q_UINT32, TQString>, const TQString& type,
+ const TQString& folder );
+ void incidenceDeleted( const TQString& type, const TQString& folder,
+ const TQString& uid );
+ void signalRefresh( const TQString& type, const TQString& folder );
+ void subresourceAdded( const TQString& type, const TQString& resource,
+ const TQString& label, bool writable, bool alarmRelevant );
+ void subresourceDeleted( const TQString& type, const TQString& resource );
};
-inline QDataStream& operator<<( QDataStream& str, const KMailICalIface::SubResource& subResource )
+inline TQDataStream& operator<<( TQDataStream& str, const KMailICalIface::SubResource& subResource )
{
str << subResource.location << subResource.label << subResource.writable << subResource.alarmRelevant;
return str;
}
-inline QDataStream& operator>>( QDataStream& str, KMailICalIface::SubResource& subResource )
+inline TQDataStream& operator>>( TQDataStream& str, KMailICalIface::SubResource& subResource )
{
str >> subResource.location >> subResource.label >> subResource.writable >> subResource.alarmRelevant;
return str;
}
-inline QDataStream& operator<<( QDataStream& str, const KMailICalIface::StorageFormat& format )
+inline TQDataStream& operator<<( TQDataStream& str, const KMailICalIface::StorageFormat& format )
{
Q_UINT32 foo = format;
str << foo;
return str;
}
-inline QDataStream& operator>>( QDataStream& str, KMailICalIface::StorageFormat& format )
+inline TQDataStream& operator>>( TQDataStream& str, KMailICalIface::StorageFormat& format )
{
Q_UINT32 foo;
str >> foo;
diff --git a/kmail/kmailicalifaceimpl.cpp b/kmail/kmailicalifaceimpl.cpp
index 38eb426f4..c1f626f85 100644
--- a/kmail/kmailicalifaceimpl.cpp
+++ b/kmail/kmailicalifaceimpl.cpp
@@ -61,9 +61,9 @@ using KMail::AccountManager;
#include <mimelib/body.h>
#include <mimelib/mimepp.h>
-#include <qfile.h>
-#include <qmap.h>
-#include <qtextcodec.h>
+#include <tqfile.h>
+#include <tqmap.h>
+#include <tqtextcodec.h>
#include <kdebug.h>
#include <kiconloader.h>
@@ -76,7 +76,7 @@ using KMail::AccountManager;
using namespace KMail;
// Local helper methods
-static void vPartMicroParser( const QString& str, QString& s );
+static void vPartMicroParser( const TQString& str, TQString& s );
static void reloadFolderTree();
// The index in this array is the KMail::FolderContentsType enum
@@ -95,12 +95,12 @@ static const struct {
{ "Journal", "application/x-vnd.kolab.journal", KFolderTreeItem::Journals, "journal", I18N_NOOP( "Journal" ) }
};
-static QString folderContentsType( KMail::FolderContentsType type )
+static TQString folderContentsType( KMail::FolderContentsType type )
{
return s_folderContentsType[type].contentsTypeStr;
}
-static QString folderKolabMimeType( KMail::FolderContentsType type )
+static TQString folderKolabMimeType( KMail::FolderContentsType type )
{
return s_folderContentsType[type].mimetype;
}
@@ -110,7 +110,7 @@ KMailICalIfaceImpl::StorageFormat KMailICalIfaceImpl::globalStorageFormat() cons
== GlobalSettings::EnumTheIMAPResourceStorageFormat::XML ? StorageXML : StorageIcalVcard;
}
-static KMail::FolderContentsType folderContentsType( const QString& type )
+static KMail::FolderContentsType folderContentsType( const TQString& type )
{
for ( uint i = 0 ; i < sizeof s_folderContentsType / sizeof *s_folderContentsType; ++i )
if ( type == s_folderContentsType[i].contentsTypeStr )
@@ -118,7 +118,7 @@ static KMail::FolderContentsType folderContentsType( const QString& type )
return KMail::ContentsTypeMail;
}
-static QString localizedDefaultFolderName( KMail::FolderContentsType type )
+static TQString localizedDefaultFolderName( KMail::FolderContentsType type )
{
return i18n( s_folderContentsType[type].translatedName );
}
@@ -152,15 +152,15 @@ ExtraFolder::~ExtraFolder()
*/
KMailICalIfaceImpl::KMailICalIfaceImpl()
- : DCOPObject( "KMailICalIface" ), QObject( 0, "KMailICalIfaceImpl" ),
+ : DCOPObject( "KMailICalIface" ), TQObject( 0, "KMailICalIfaceImpl" ),
mContacts( 0 ), mCalendar( 0 ), mNotes( 0 ), mTasks( 0 ), mJournals( 0 ),
mFolderLanguage( 0 ), mFolderParentDir( 0 ), mFolderType( KMFolderTypeUnknown ),
mUseResourceIMAP( false ), mResourceQuiet( false ), mHideFolders( true )
{
// Listen to config changes
- connect( kmkernel, SIGNAL( configChanged() ), this, SLOT( readConfig() ) );
- connect( kmkernel, SIGNAL( folderRemoved( KMFolder* ) ),
- this, SLOT( slotFolderRemoved( KMFolder* ) ) );
+ connect( kmkernel, TQT_SIGNAL( configChanged() ), this, TQT_SLOT( readConfig() ) );
+ connect( kmkernel, TQT_SIGNAL( folderRemoved( KMFolder* ) ),
+ this, TQT_SLOT( slotFolderRemoved( KMFolder* ) ) );
mExtraFolders.setAutoDelete( true );
mAccumulators.setAutoDelete( true );
@@ -184,7 +184,7 @@ static DwBodyPart* findBodyPartByMimeType( const KMMessage& msg, const char* sTy
DwMediaType& contentType = part->Headers().ContentType();
if ( startsWith ) {
if ( contentType.TypeStr() == sType
- && QString( contentType.SubtypeStr().c_str() ).startsWith( sSubtype ) )
+ && TQString( contentType.SubtypeStr().c_str() ).startsWith( sSubtype ) )
return part;
}
else
@@ -198,7 +198,7 @@ static DwBodyPart* findBodyPartByMimeType( const KMMessage& msg, const char* sTy
}
// Helper function to find an attachment with a given filename
-static DwBodyPart* findBodyPart( const KMMessage& msg, const QString& attachmentName )
+static DwBodyPart* findBodyPart( const KMMessage& msg, const TQString& attachmentName )
{
// quickly searching for our message part: since Kolab parts are
// top-level parts we do *not* have to travel into embedded multiparts
@@ -236,9 +236,9 @@ inline static void debugBodyParts( const char*, const KMMessage& ) {}
// If lookupByName if false the attachment to replace is looked up by mimetype.
// return value: wrong if attachment could not be added/updated
bool KMailICalIfaceImpl::updateAttachment( KMMessage& msg,
- const QString& attachmentURL,
- const QString& attachmentName,
- const QString& attachmentMimetype,
+ const TQString& attachmentURL,
+ const TQString& attachmentName,
+ const TQString& attachmentMimetype,
bool lookupByName )
{
kdDebug(5006) << "KMailICalIfaceImpl::updateAttachment( " << attachmentURL << " )" << endl;
@@ -247,10 +247,10 @@ bool KMailICalIfaceImpl::updateAttachment( KMMessage& msg,
KURL url( attachmentURL );
if ( url.isValid() && url.isLocalFile() ) {
- const QString fileName( url.path() );
- QFile file( fileName );
+ const TQString fileName( url.path() );
+ TQFile file( fileName );
if( file.open( IO_ReadOnly ) ) {
- QByteArray rawData = file.readAll();
+ TQByteArray rawData = file.readAll();
file.close();
// create the new message part with data read from temp file
@@ -258,15 +258,15 @@ bool KMailICalIfaceImpl::updateAttachment( KMMessage& msg,
msgPart.setName( attachmentName );
const int iSlash = attachmentMimetype.find('/');
- const QCString sType = attachmentMimetype.left( iSlash ).latin1();
- const QCString sSubtype = attachmentMimetype.mid( iSlash+1 ).latin1();
+ const TQCString sType = attachmentMimetype.left( iSlash ).latin1();
+ const TQCString sSubtype = attachmentMimetype.mid( iSlash+1 ).latin1();
msgPart.setTypeStr( sType );
msgPart.setSubtypeStr( sSubtype );
- QCString ctd("attachment;\n filename=\"");
+ TQCString ctd("attachment;\n filename=\"");
ctd.append( attachmentName.latin1() );
ctd.append("\"");
msgPart.setContentDisposition( ctd );
- QValueList<int> dummy;
+ TQValueList<int> dummy;
msgPart.setBodyAndGuessCte( rawData, dummy );
msgPart.setPartSpecifier( fileName );
@@ -304,16 +304,16 @@ bool KMailICalIfaceImpl::updateAttachment( KMMessage& msg,
}
// Look for the attachment with the right mimetype
-bool KMailICalIfaceImpl::kolabXMLFoundAndDecoded( const KMMessage& msg, const QString& mimetype, QString& s )
+bool KMailICalIfaceImpl::kolabXMLFoundAndDecoded( const KMMessage& msg, const TQString& mimetype, TQString& s )
{
const int iSlash = mimetype.find('/');
- const QCString sType = mimetype.left( iSlash ).latin1();
- const QCString sSubtype = mimetype.mid( iSlash+1 ).latin1();
+ const TQCString sType = mimetype.left( iSlash ).latin1();
+ const TQCString sSubtype = mimetype.mid( iSlash+1 ).latin1();
DwBodyPart* part = findBodyPartByMimeType( msg, sType, sSubtype, true /* starts with sSubtype, to accept application/x-vnd.kolab.contact.distlist */ );
if ( part ) {
KMMessagePart msgPart;
KMMessage::bodyPart(part, &msgPart);
- s = msgPart.bodyToUnicode( QTextCodec::codecForName( "utf8" ) );
+ s = msgPart.bodyToUnicode( TQTextCodec::codecForName( "utf8" ) );
return true;
}
return false;
@@ -326,7 +326,7 @@ bool KMailICalIfaceImpl::kolabXMLFoundAndDecoded( const KMMessage& msg, const QS
// the attachment by an empty dummy attachment since Mimelib
// does not provide an option for deleting attachments yet.
bool KMailICalIfaceImpl::deleteAttachment( KMMessage& msg,
- const QString& attachmentName )
+ const TQString& attachmentName )
{
kdDebug(5006) << "KMailICalIfaceImpl::deleteAttachment( " << attachmentName << " )" << endl;
@@ -381,7 +381,7 @@ static void setIcalVcardContentTypeHeader( KMMessage *msg, KMail::FolderContents
}
}
-static void setXMLContentTypeHeader( KMMessage *msg, const QString plainTextBody )
+static void setXMLContentTypeHeader( KMMessage *msg, const TQString plainTextBody )
{
// add a first body part to be displayed by all mailer
// than can NOT display Kolab data: no matter if these
@@ -400,12 +400,12 @@ static void setXMLContentTypeHeader( KMMessage *msg, const QString plainTextBody
// Store a new entry that was received from the resource
Q_UINT32 KMailICalIfaceImpl::addIncidenceKolab( KMFolder& folder,
- const QString& subject,
- const QString& plainTextBody,
- const QMap<QCString, QString>& customHeaders,
- const QStringList& attachmentURLs,
- const QStringList& attachmentNames,
- const QStringList& attachmentMimetypes )
+ const TQString& subject,
+ const TQString& plainTextBody,
+ const TQMap<TQCString, TQString>& customHeaders,
+ const TQStringList& attachmentURLs,
+ const TQStringList& attachmentNames,
+ const TQStringList& attachmentMimetypes )
{
kdDebug(5006) << "KMailICalIfaceImpl::addIncidenceKolab( " << attachmentNames << " )" << endl;
@@ -418,8 +418,8 @@ Q_UINT32 KMailICalIfaceImpl::addIncidenceKolab( KMFolder& folder,
msg->setSubject( subject );
msg->setAutomaticFields( true );
- QMap<QCString, QString>::ConstIterator ith = customHeaders.begin();
- const QMap<QCString, QString>::ConstIterator ithEnd = customHeaders.end();
+ TQMap<TQCString, TQString>::ConstIterator ith = customHeaders.begin();
+ const TQMap<TQCString, TQString>::ConstIterator ithEnd = customHeaders.end();
for ( ; ith != ithEnd ; ++ith ) {
msg->setHeaderField( ith.key(), ith.data() );
}
@@ -438,9 +438,9 @@ Q_UINT32 KMailICalIfaceImpl::addIncidenceKolab( KMFolder& folder,
Q_ASSERT( attachmentMimetypes.count() == attachmentURLs.count() );
Q_ASSERT( attachmentNames.count() == attachmentURLs.count() );
// Add all attachments by reading them from their temp. files
- QStringList::ConstIterator itmime = attachmentMimetypes.begin();
- QStringList::ConstIterator iturl = attachmentURLs.begin();
- for( QStringList::ConstIterator itname = attachmentNames.begin();
+ TQStringList::ConstIterator itmime = attachmentMimetypes.begin();
+ TQStringList::ConstIterator iturl = attachmentURLs.begin();
+ for( TQStringList::ConstIterator itname = attachmentNames.begin();
itname != attachmentNames.end()
&& itmime != attachmentMimetypes.end()
&& iturl != attachmentURLs.end();
@@ -473,7 +473,7 @@ Q_UINT32 KMailICalIfaceImpl::addIncidenceKolab( KMFolder& folder,
return sernum;
}
-bool KMailICalIfaceImpl::deleteIncidenceKolab( const QString& resource,
+bool KMailICalIfaceImpl::deleteIncidenceKolab( const TQString& resource,
Q_UINT32 sernum )
{
// Find the message from the serial number and delete it.
@@ -505,8 +505,8 @@ bool KMailICalIfaceImpl::deleteIncidenceKolab( const QString& resource,
}
-int KMailICalIfaceImpl::incidencesKolabCount( const QString& mimetype,
- const QString& resource )
+int KMailICalIfaceImpl::incidencesKolabCount( const TQString& mimetype,
+ const TQString& resource )
{
Q_UNUSED( mimetype ); // honouring that would be too slow...
@@ -527,16 +527,16 @@ int KMailICalIfaceImpl::incidencesKolabCount( const QString& mimetype,
return n;
}
-QMap<Q_UINT32, QString> KMailICalIfaceImpl::incidencesKolab( const QString& mimetype,
- const QString& resource,
+TQMap<Q_UINT32, TQString> KMailICalIfaceImpl::incidencesKolab( const TQString& mimetype,
+ const TQString& resource,
int startIndex,
int nbMessages )
{
/// Get the mimetype attachments from this folder. Returns a
- /// QMap with serialNumber/attachment pairs.
+ /// TQMap with serialNumber/attachment pairs.
/// (serial numbers of the mail are provided for easier later update)
- QMap<Q_UINT32, QString> aMap;
+ TQMap<Q_UINT32, TQString> aMap;
if( !mUseResourceIMAP )
return aMap;
@@ -562,8 +562,8 @@ QMap<Q_UINT32, QString> KMailICalIfaceImpl::incidencesKolab( const QString& mime
#endif
if ( msg ) {
const int iSlash = mimetype.find('/');
- const QCString sType = mimetype.left( iSlash ).latin1();
- const QCString sSubtype = mimetype.mid( iSlash+1 ).latin1();
+ const TQCString sType = mimetype.left( iSlash ).latin1();
+ const TQCString sSubtype = mimetype.mid( iSlash+1 ).latin1();
if ( sType.isEmpty() || sSubtype.isEmpty() ) {
kdError(5006) << mimetype << " not an type/subtype combination" << endl;
} else {
@@ -571,13 +571,13 @@ QMap<Q_UINT32, QString> KMailICalIfaceImpl::incidencesKolab( const QString& mime
if ( dwPart ) {
KMMessagePart msgPart;
KMMessage::bodyPart(dwPart, &msgPart);
- aMap.insert(msg->getMsgSerNum(), msgPart.bodyToUnicode( QTextCodec::codecForName( "utf8" ) ));
+ aMap.insert(msg->getMsgSerNum(), msgPart.bodyToUnicode( TQTextCodec::codecForName( "utf8" ) ));
} else {
// Check if the whole message has the right types. This is what
// happens in the case of ical storage, where the whole mail is
// the data
- const QCString type( msg->typeStr() );
- const QCString subtype( msg->subtypeStr() );
+ const TQCString type( msg->typeStr() );
+ const TQCString subtype( msg->subtypeStr() );
if (type.lower() == sType && subtype.lower() == sSubtype ) {
aMap.insert( msg->getMsgSerNum(), msg->bodyToUnicode() );
}
@@ -611,9 +611,9 @@ void KMailICalIfaceImpl::slotMessageRetrieved( KMMessage* msg )
// do we have an accumulator for this folder?
Accumulator *ac = mAccumulators.find( parent->location() );
if( ac ) {
- QString s;
+ TQString s;
if ( !vPartFoundAndDecoded( msg, s ) ) return;
- QString uid( "UID" );
+ TQString uid( "UID" );
vPartMicroParser( s, uid );
const Q_UINT32 sernum = msg->getMsgSerNum();
mUIDToSerNum.insert( uid, sernum );
@@ -652,21 +652,21 @@ static int dimapAccountCount()
return count;
}
-static QString subresourceLabelForPresentation( const KMFolder * folder )
+static TQString subresourceLabelForPresentation( const KMFolder * folder )
{
- QString label = folder->prettyURL();
- QStringList parts = QStringList::split( QString::fromLatin1("/"), label );
+ TQString label = folder->prettyURL();
+ TQStringList parts = TQStringList::split( TQString::fromLatin1("/"), label );
// In the common special case of some other user's folder shared with us
// the url looks like "Server Name/user/$USERNAME/Folder/Name". Make
// those a bit nicer.
- if ( parts[1] == QString::fromLatin1("user") ) {
- QStringList remainder(parts);
+ if ( parts[1] == TQString::fromLatin1("user") ) {
+ TQStringList remainder(parts);
remainder.pop_front();
remainder.pop_front();
remainder.pop_front();
label = i18n("%1's %2")
.arg( parts[2] )
- .arg( remainder.join( QString::fromLatin1("/") ) );
+ .arg( remainder.join( TQString::fromLatin1("/") ) );
}
// Another special case is our own folders, under the imap INBOX, make
// those prettier too
@@ -674,16 +674,16 @@ static QString subresourceLabelForPresentation( const KMFolder * folder )
while ( parent->parent() && parent->parent()->owner() ) {
parent = parent->parent()->owner();
if ( parent->isSystemFolder() ) {
- QStringList remainder(parts);
+ TQStringList remainder(parts);
remainder.pop_front();
remainder.pop_front();
if ( dimapAccountCount() > 1 ) {
label = i18n( "My %1 (%2)")
- .arg( remainder.join( QString::fromLatin1("/") ),
+ .arg( remainder.join( TQString::fromLatin1("/") ),
static_cast<const KMFolderCachedImap*>( folder->storage() )->account()->name() );
} else {
label = i18n("My %1")
- .arg( remainder.join( QString::fromLatin1("/") ) );
+ .arg( remainder.join( TQString::fromLatin1("/") ) );
}
break;
}
@@ -692,12 +692,12 @@ static QString subresourceLabelForPresentation( const KMFolder * folder )
}
/* list all available subresources */
-QValueList<KMailICalIfaceImpl::SubResource> KMailICalIfaceImpl::subresourcesKolab( const QString& contentsType )
+TQValueList<KMailICalIfaceImpl::SubResource> KMailICalIfaceImpl::subresourcesKolab( const TQString& contentsType )
{
- QValueList<SubResource> subResources;
+ TQValueList<SubResource> subResources;
// Add the default one
- KMFolder* f = folderFromType( contentsType, QString::null );
+ KMFolder* f = folderFromType( contentsType, TQString::null );
if ( f ) {
subResources.append( SubResource( f->location(), subresourceLabelForPresentation( f ),
!f->isReadOnly(), folderIsAlarmRelevant( f ) ) );
@@ -707,7 +707,7 @@ QValueList<KMailICalIfaceImpl::SubResource> KMailICalIfaceImpl::subresourcesKola
// get the extra ones
const KMail::FolderContentsType t = folderContentsType( contentsType );
- QDictIterator<ExtraFolder> it( mExtraFolders );
+ TQDictIterator<ExtraFolder> it( mExtraFolders );
for ( ; it.current(); ++it ){
f = it.current()->folder;
if ( f && f->storage()->contentsType() == t ) {
@@ -723,11 +723,11 @@ QValueList<KMailICalIfaceImpl::SubResource> KMailICalIfaceImpl::subresourcesKola
return subResources;
}
-bool KMailICalIfaceImpl::triggerSync( const QString& contentsType )
+bool KMailICalIfaceImpl::triggerSync( const TQString& contentsType )
{
kdDebug(5006) << k_funcinfo << endl;
- QValueList<KMailICalIfaceImpl::SubResource> folderList = subresourcesKolab( contentsType );
- for ( QValueList<KMailICalIfaceImpl::SubResource>::const_iterator it( folderList.begin() ),
+ TQValueList<KMailICalIfaceImpl::SubResource> folderList = subresourcesKolab( contentsType );
+ for ( TQValueList<KMailICalIfaceImpl::SubResource>::const_iterator it( folderList.begin() ),
end( folderList.end() );
it != end ; ++it ) {
KMFolder * const f = findResourceFolder( (*it).location );
@@ -750,8 +750,8 @@ bool KMailICalIfaceImpl::triggerSync( const QString& contentsType )
}
/* Used by the resource to query whether folders are writable. */
-bool KMailICalIfaceImpl::isWritableFolder( const QString& type,
- const QString& resource )
+bool KMailICalIfaceImpl::isWritableFolder( const TQString& type,
+ const TQString& resource )
{
KMFolder* f = folderFromType( type, resource );
if ( !f )
@@ -762,7 +762,7 @@ bool KMailICalIfaceImpl::isWritableFolder( const QString& type,
}
/* Used by the resource to query the storage format of the folder. */
-KMailICalIfaceImpl::StorageFormat KMailICalIfaceImpl::storageFormat( const QString& resource )
+KMailICalIfaceImpl::StorageFormat KMailICalIfaceImpl::storageFormat( const TQString& resource )
{
StorageFormat format;
KMFolder* f = findResourceFolder( resource );
@@ -787,15 +787,15 @@ KMailICalIfaceImpl::StorageFormat KMailICalIfaceImpl::storageFormat( const QStri
// number, and the mail is just added instead. In this case
// the deletedAttachments can be forgotten.
*/
-Q_UINT32 KMailICalIfaceImpl::update( const QString& resource,
+Q_UINT32 KMailICalIfaceImpl::update( const TQString& resource,
Q_UINT32 sernum,
- const QString& subject,
- const QString& plainTextBody,
- const QMap<QCString, QString>& customHeaders,
- const QStringList& attachmentURLs,
- const QStringList& attachmentMimetypes,
- const QStringList& attachmentNames,
- const QStringList& deletedAttachments )
+ const TQString& subject,
+ const TQString& plainTextBody,
+ const TQMap<TQCString, TQString>& customHeaders,
+ const TQStringList& attachmentURLs,
+ const TQStringList& attachmentMimetypes,
+ const TQStringList& attachmentNames,
+ const TQStringList& deletedAttachments )
{
Q_UINT32 rc = 0;
@@ -826,15 +826,15 @@ Q_UINT32 KMailICalIfaceImpl::update( const QString& resource,
// Message found - make a copy and update it:
KMMessage* newMsg = new KMMessage( *msg );
newMsg->setSubject( subject );
- QMap<QCString, QString>::ConstIterator ith = customHeaders.begin();
- const QMap<QCString, QString>::ConstIterator ithEnd = customHeaders.begin();
+ TQMap<TQCString, TQString>::ConstIterator ith = customHeaders.begin();
+ const TQMap<TQCString, TQString>::ConstIterator ithEnd = customHeaders.begin();
for ( ; ith != ithEnd ; ++ith )
newMsg->setHeaderField( ith.key(), ith.data() );
newMsg->setParent( 0 ); // workaround strange line in KMMsgBase::assign. newMsg is not in any folder yet.
// Note that plainTextBody isn't used in this branch. We assume it's still valid from when the mail was created.
// Delete some attachments according to list
- for( QStringList::ConstIterator it = deletedAttachments.begin();
+ for( TQStringList::ConstIterator it = deletedAttachments.begin();
it != deletedAttachments.end();
++it ){
if( !deleteAttachment( *newMsg, *it ) ){
@@ -843,8 +843,8 @@ Q_UINT32 KMailICalIfaceImpl::update( const QString& resource,
}
const KMail::FolderContentsType t = f->storage()->contentsType();
- const QCString type = msg->typeStr();
- const QCString subtype = msg->subtypeStr();
+ const TQCString type = msg->typeStr();
+ const TQCString subtype = msg->subtypeStr();
const bool messageWasIcalVcardFormat = ( type.lower() == "text" &&
( subtype.lower() == "calendar" || subtype.lower() == "x-vcard" ) );
@@ -862,9 +862,9 @@ Q_UINT32 KMailICalIfaceImpl::update( const QString& resource,
}
//kdDebug(5006) << k_funcinfo << " StorageFormatXML " << endl;
// Add all attachments by reading them from their temp. files
- QStringList::ConstIterator iturl = attachmentURLs.begin();
- QStringList::ConstIterator itmime = attachmentMimetypes.begin();
- QStringList::ConstIterator itname = attachmentNames.begin();
+ TQStringList::ConstIterator iturl = attachmentURLs.begin();
+ TQStringList::ConstIterator itmime = attachmentMimetypes.begin();
+ TQStringList::ConstIterator itname = attachmentNames.begin();
for( ;
iturl != attachmentURLs.end()
&& itmime != attachmentMimetypes.end()
@@ -905,9 +905,9 @@ Q_UINT32 KMailICalIfaceImpl::update( const QString& resource,
return rc;
}
-KURL KMailICalIfaceImpl::getAttachment( const QString& resource,
+KURL KMailICalIfaceImpl::getAttachment( const TQString& resource,
Q_UINT32 sernum,
- const QString& filename )
+ const TQString& filename )
{
// This finds the attachment with the filename, saves it to a
// temp file and returns a URL to it. It's up to the resource
@@ -944,7 +944,7 @@ KURL KMailICalIfaceImpl::getAttachment( const QString& resource,
// Save the contents of the attachment.
KMMessagePart aPart;
msg->bodyPart( part, &aPart );
- QByteArray rawData( aPart.bodyDecodedBinary() );
+ TQByteArray rawData( aPart.bodyDecodedBinary() );
KTempFile file;
file.file()->writeBlock( rawData.data(), rawData.size() );
@@ -965,16 +965,16 @@ KURL KMailICalIfaceImpl::getAttachment( const QString& resource,
return url;
}
-QString KMailICalIfaceImpl::attachmentMimetype( const QString & resource,
+TQString KMailICalIfaceImpl::attachmentMimetype( const TQString & resource,
Q_UINT32 sernum,
- const QString & filename )
+ const TQString & filename )
{
if( !mUseResourceIMAP )
- return QString();
+ return TQString();
KMFolder* f = findResourceFolder( resource );
if( !f || storageFormat( f ) != StorageXML ) {
kdError(5006) << "attachmentMimetype(" << resource << ") : Wrong folder" << endl;
- return QString();
+ return TQString();
}
KMMessage* msg = findMessageBySerNum( sernum, f );
@@ -984,7 +984,7 @@ QString KMailICalIfaceImpl::attachmentMimetype( const QString & resource,
if ( part ) {
KMMessagePart kmPart;
msg->bodyPart( part, &kmPart );
- return QString( kmPart.typeStr() ) + "/" + QString( kmPart.subtypeStr() );
+ return TQString( kmPart.typeStr() ) + "/" + TQString( kmPart.subtypeStr() );
} else {
kdDebug(5006) << "Attachment " << filename << " not found." << endl;
}
@@ -992,12 +992,12 @@ QString KMailICalIfaceImpl::attachmentMimetype( const QString & resource,
kdDebug(5006) << "Message not found." << endl;
}
- return QString();
+ return TQString();
}
-QStringList KMailICalIfaceImpl::listAttachments(const QString & resource, Q_UINT32 sernum)
+TQStringList KMailICalIfaceImpl::listAttachments(const TQString & resource, Q_UINT32 sernum)
{
- QStringList rv;
+ TQStringList rv;
if( !mUseResourceIMAP )
return rv;
@@ -1016,10 +1016,10 @@ QStringList KMailICalIfaceImpl::listAttachments(const QString & resource, Q_UINT
if( msg ) {
for ( DwBodyPart* part = msg->getFirstDwBodyPart(); part; part = part->Next() ) {
if ( part->hasHeaders() ) {
- QString name;
+ TQString name;
DwMediaType& contentType = part->Headers().ContentType();
- if ( QString( contentType.SubtypeStr().c_str() ).startsWith( "x-vnd.kolab." )
- || QString( contentType.SubtypeStr().c_str() ).contains( "tnef" ) )
+ if ( TQString( contentType.SubtypeStr().c_str() ).startsWith( "x-vnd.kolab." )
+ || TQString( contentType.SubtypeStr().c_str() ).contains( "tnef" ) )
continue;
if ( !part->Headers().ContentDisposition().Filename().empty() )
name = part->Headers().ContentDisposition().Filename().c_str();
@@ -1061,7 +1061,7 @@ void KMailICalIfaceImpl::slotIncidenceAdded( KMFolder* folder,
return;
// kdDebug(5006) << "KMailICalIfaceImpl::slotIncidenceAdded" << endl;
- QString type = folderContentsType( folder->storage()->contentsType() );
+ TQString type = folderContentsType( folder->storage()->contentsType() );
if( type.isEmpty() ) {
kdError(5006) << "Not an IMAP resource folder" << endl;
return;
@@ -1073,8 +1073,8 @@ void KMailICalIfaceImpl::slotIncidenceAdded( KMFolder* folder,
assert( folder == aFolder );
bool unget = !folder->isMessage( i );
- QString s;
- QString uid( "UID" );
+ TQString s;
+ TQString uid( "UID" );
KMMessage *msg = folder->getMsg( i );
if( !msg ) return;
if( msg->isComplete() ) {
@@ -1115,8 +1115,8 @@ void KMailICalIfaceImpl::slotIncidenceAdded( KMFolder* folder,
// TODO: Till, port me
if ( unget ) mTheUnGetMes.insert( msg->getMsgSerNum(), true );
FolderJob *job = msg->parent()->createJob( msg );
- connect( job, SIGNAL( messageRetrieved( KMMessage* ) ),
- this, SLOT( slotMessageRetrieved( KMMessage* ) ) );
+ connect( job, TQT_SIGNAL( messageRetrieved( KMMessage* ) ),
+ this, TQT_SLOT( slotMessageRetrieved( KMMessage* ) ) );
job->start();
return;
}
@@ -1130,7 +1130,7 @@ void KMailICalIfaceImpl::slotIncidenceDeleted( KMFolder* folder,
if( mResourceQuiet || !mUseResourceIMAP )
return;
- QString type = folderContentsType( folder->storage()->contentsType() );
+ TQString type = folderContentsType( folder->storage()->contentsType() );
//kdDebug(5006) << folder << " " << type << " " << sernum << endl;
if( !type.isEmpty() ) {
// Get the index of the mail
@@ -1141,10 +1141,10 @@ void KMailICalIfaceImpl::slotIncidenceDeleted( KMFolder* folder,
// Read the iCal or vCard
bool unget = !folder->isMessage( i );
- QString s;
+ TQString s;
bool ok = false;
KMMessage* msg = folder->getMsg( i );
- QString uid( "UID" );
+ TQString uid( "UID" );
switch( storageFormat( folder ) ) {
case StorageIcalVcard:
if( vPartFoundAndDecoded( msg, s ) ) {
@@ -1171,10 +1171,10 @@ void KMailICalIfaceImpl::slotIncidenceDeleted( KMFolder* folder,
}
// KMail orders a refresh
-void KMailICalIfaceImpl::slotRefresh( const QString& type )
+void KMailICalIfaceImpl::slotRefresh( const TQString& type )
{
if( mUseResourceIMAP ) {
- signalRefresh( type, QString::null /* PENDING(bo) folder->location() */ );
+ signalRefresh( type, TQString::null /* PENDING(bo) folder->location() */ );
kdDebug(5006) << "Emitting DCOP signal signalRefresh( " << type << " )" << endl;
}
}
@@ -1200,8 +1200,8 @@ void KMailICalIfaceImpl::slotRefreshFolder( KMFolder* folder)
* The folder and message stuff code
*/
-KMFolder* KMailICalIfaceImpl::folderFromType( const QString& type,
- const QString& folder )
+KMFolder* KMailICalIfaceImpl::folderFromType( const TQString& type,
+ const TQString& folder )
{
if( mUseResourceIMAP ) {
KMFolder* f = 0;
@@ -1272,8 +1272,8 @@ KFolderTreeItem::Type KMailICalIfaceImpl::folderType( KMFolder* folder ) const
// Global tables of foldernames is different languages
// For now: 0->English, 1->German, 2->French, 3->Dutch
-static QMap<KFolderTreeItem::Type,QString> folderNames[4];
-QString KMailICalIfaceImpl::folderName( KFolderTreeItem::Type type, int language ) const
+static TQMap<KFolderTreeItem::Type,TQString> folderNames[4];
+TQString KMailICalIfaceImpl::folderName( KFolderTreeItem::Type type, int language ) const
{
// With the XML storage, folders are always (internally) named in English
if ( GlobalSettings::self()->theIMAPResourceStorageFormat() == GlobalSettings::EnumTheIMAPResourceStorageFormat::XML )
@@ -1286,33 +1286,33 @@ QString KMailICalIfaceImpl::folderName( KFolderTreeItem::Type type, int language
GroupwarePage in configuredialog.cpp */
// English
- folderNames[0][KFolderTreeItem::Calendar] = QString::fromLatin1("Calendar");
- folderNames[0][KFolderTreeItem::Tasks] = QString::fromLatin1("Tasks");
- folderNames[0][KFolderTreeItem::Journals] = QString::fromLatin1("Journal");
- folderNames[0][KFolderTreeItem::Contacts] = QString::fromLatin1("Contacts");
- folderNames[0][KFolderTreeItem::Notes] = QString::fromLatin1("Notes");
+ folderNames[0][KFolderTreeItem::Calendar] = TQString::fromLatin1("Calendar");
+ folderNames[0][KFolderTreeItem::Tasks] = TQString::fromLatin1("Tasks");
+ folderNames[0][KFolderTreeItem::Journals] = TQString::fromLatin1("Journal");
+ folderNames[0][KFolderTreeItem::Contacts] = TQString::fromLatin1("Contacts");
+ folderNames[0][KFolderTreeItem::Notes] = TQString::fromLatin1("Notes");
// German
- folderNames[1][KFolderTreeItem::Calendar] = QString::fromLatin1("Kalender");
- folderNames[1][KFolderTreeItem::Tasks] = QString::fromLatin1("Aufgaben");
- folderNames[1][KFolderTreeItem::Journals] = QString::fromLatin1("Journal");
- folderNames[1][KFolderTreeItem::Contacts] = QString::fromLatin1("Kontakte");
- folderNames[1][KFolderTreeItem::Notes] = QString::fromLatin1("Notizen");
+ folderNames[1][KFolderTreeItem::Calendar] = TQString::fromLatin1("Kalender");
+ folderNames[1][KFolderTreeItem::Tasks] = TQString::fromLatin1("Aufgaben");
+ folderNames[1][KFolderTreeItem::Journals] = TQString::fromLatin1("Journal");
+ folderNames[1][KFolderTreeItem::Contacts] = TQString::fromLatin1("Kontakte");
+ folderNames[1][KFolderTreeItem::Notes] = TQString::fromLatin1("Notizen");
// French
- folderNames[2][KFolderTreeItem::Calendar] = QString::fromLatin1("Calendrier");
+ folderNames[2][KFolderTreeItem::Calendar] = TQString::fromLatin1("Calendrier");
// Tasks = Tâches (â == 0xE2 in latin1)
- folderNames[2][KFolderTreeItem::Tasks] = QString::fromLatin1("T\342ches");
- folderNames[2][KFolderTreeItem::Journals] = QString::fromLatin1("Journal");
- folderNames[2][KFolderTreeItem::Contacts] = QString::fromLatin1("Contacts");
- folderNames[2][KFolderTreeItem::Notes] = QString::fromLatin1("Notes");
+ folderNames[2][KFolderTreeItem::Tasks] = TQString::fromLatin1("T\342ches");
+ folderNames[2][KFolderTreeItem::Journals] = TQString::fromLatin1("Journal");
+ folderNames[2][KFolderTreeItem::Contacts] = TQString::fromLatin1("Contacts");
+ folderNames[2][KFolderTreeItem::Notes] = TQString::fromLatin1("Notes");
// Dutch
- folderNames[3][KFolderTreeItem::Calendar] = QString::fromLatin1("Agenda");
- folderNames[3][KFolderTreeItem::Tasks] = QString::fromLatin1("Taken");
- folderNames[3][KFolderTreeItem::Journals] = QString::fromLatin1("Logboek");
- folderNames[3][KFolderTreeItem::Contacts] = QString::fromLatin1("Contactpersonen");
- folderNames[3][KFolderTreeItem::Notes] = QString::fromLatin1("Notities");
+ folderNames[3][KFolderTreeItem::Calendar] = TQString::fromLatin1("Agenda");
+ folderNames[3][KFolderTreeItem::Tasks] = TQString::fromLatin1("Taken");
+ folderNames[3][KFolderTreeItem::Journals] = TQString::fromLatin1("Logboek");
+ folderNames[3][KFolderTreeItem::Contacts] = TQString::fromLatin1("Contactpersonen");
+ folderNames[3][KFolderTreeItem::Notes] = TQString::fromLatin1("Notities");
}
if( language < 0 || language > 3 ) {
@@ -1325,7 +1325,7 @@ QString KMailICalIfaceImpl::folderName( KFolderTreeItem::Type type, int language
// Find message matching a given UID
-KMMessage *KMailICalIfaceImpl::findMessageByUID( const QString& uid, KMFolder* folder )
+KMMessage *KMailICalIfaceImpl::findMessageByUID( const TQString& uid, KMFolder* folder )
{
if( !folder || !mUIDToSerNum.contains( uid ) ) return 0;
int i;
@@ -1389,7 +1389,7 @@ void KMailICalIfaceImpl::folderContentsTypeChanged( KMFolder* folder,
return;
// Check if already know that 'extra folder'
- const QString location = folder->location();
+ const TQString location = folder->location();
ExtraFolder* ef = mExtraFolders.find( location );
if ( ef && ef->folder ) {
// Notify that the old folder resource is no longer available
@@ -1422,9 +1422,9 @@ void KMailICalIfaceImpl::folderContentsTypeChanged( KMFolder* folder,
// coworker appears as /user/hirohito/Kalender, although Hirohito sees his folder
// in Japanese. On the server the folders are always in English.
if ( folder->folderType() == KMFolderTypeCachedImap ) {
- QString annotation = static_cast<KMFolderCachedImap*>( folder->storage() )->annotationFolderType();
+ TQString annotation = static_cast<KMFolderCachedImap*>( folder->storage() )->annotationFolderType();
kdDebug(5006) << "folderContentsTypeChanged: " << folder->name() << " has annotation " << annotation << endl;
- if ( annotation == QString( s_folderContentsType[contentsType].annotation ) + ".default" )
+ if ( annotation == TQString( s_folderContentsType[contentsType].annotation ) + ".default" )
folder->setLabel( localizedDefaultFolderName( contentsType ) );
}
@@ -1435,8 +1435,8 @@ void KMailICalIfaceImpl::folderContentsTypeChanged( KMFolder* folder,
!folder->isReadOnly(), folderIsAlarmRelevant( folder ) );
}
-KMFolder* KMailICalIfaceImpl::extraFolder( const QString& type,
- const QString& folder )
+KMFolder* KMailICalIfaceImpl::extraFolder( const TQString& type,
+ const TQString& folder )
{
// If an extra folder exists that matches the type and folder location,
// use that
@@ -1488,7 +1488,7 @@ void KMailICalIfaceImpl::addFolderChange( KMFolder* folder, FolderChanges change
KMailICalIfaceImpl::FolderInfo KMailICalIfaceImpl::readFolderInfo( const KMFolder * const folder ) const
{
KConfigGroup configGroup( kmkernel->config(), "GroupwareFolderInfo" );
- QString str = configGroup.readEntry( folder->idString() + "-storageFormat", "unset" );
+ TQString str = configGroup.readEntry( folder->idString() + "-storageFormat", "unset" );
FolderInfo info;
if ( str == "unset" ) {
info.mStorageFormat = globalStorageFormat();
@@ -1542,7 +1542,7 @@ void KMailICalIfaceImpl::triggerKolabFreeBusy( const KURL& folderURL )
httpURL.setPort( 0 ); // remove imap port
// IMAP path is either /INBOX/<path> or /user/someone/<path>
- QString path = folderURL.path( -1 );
+ TQString path = folderURL.path( -1 );
Q_ASSERT( path.startsWith( "/" ) );
int secondSlash = path.find( '/', 1 );
if ( secondSlash == -1 ) {
@@ -1560,7 +1560,7 @@ void KMailICalIfaceImpl::triggerKolabFreeBusy( const KURL& folderURL )
}
httpURL.setPath( "/freebusy/trigger/" + path + ".pfb" );
- httpURL.setQuery( QString::null );
+ httpURL.setQuery( TQString::null );
// Ensure that we encode everything with UTF8
httpURL = KURL( httpURL.url(0,106), 106 );
kdDebug() << "Triggering PFB update for " << folderURL << " : getting " << httpURL << endl;
@@ -1572,8 +1572,8 @@ void KMailICalIfaceImpl::triggerKolabFreeBusy( const KURL& folderURL )
void KMailICalIfaceImpl::slotFolderPropertiesChanged( KMFolder* folder )
{
if ( isResourceFolder( folder ) ) {
- const QString location = folder->location();
- const QString contentsTypeStr = folderContentsType( folder->storage()->contentsType() );
+ const TQString location = folder->location();
+ const TQString contentsTypeStr = folderContentsType( folder->storage()->contentsType() );
subresourceDeleted( contentsTypeStr, location );
subresourceAdded( contentsTypeStr, location, subresourceLabelForPresentation( folder ),
@@ -1589,8 +1589,8 @@ void KMailICalIfaceImpl::slotFolderRenamed()
slotFolderPropertiesChanged( const_cast<KMFolder*>( folder ) );
}
-void KMailICalIfaceImpl::slotFolderLocationChanged( const QString &oldLocation,
- const QString &newLocation )
+void KMailICalIfaceImpl::slotFolderLocationChanged( const TQString &oldLocation,
+ const TQString &newLocation )
{
KMFolder *folder = findResourceFolder( oldLocation );
ExtraFolder* ef = mExtraFolders.find( oldLocation );
@@ -1606,7 +1606,7 @@ void KMailICalIfaceImpl::slotFolderLocationChanged( const QString &oldLocation,
}
-KMFolder* KMailICalIfaceImpl::findResourceFolder( const QString& resource )
+KMFolder* KMailICalIfaceImpl::findResourceFolder( const TQString& resource )
{
// Try the standard folders
if( mCalendar && mCalendar->location() == resource )
@@ -1651,7 +1651,7 @@ void KMailICalIfaceImpl::readConfig()
// Read remaining options
const bool hideFolders = GlobalSettings::self()->hideGroupwareFolders();
- QString parentName = GlobalSettings::self()->theIMAPResourceFolderParent();
+ TQString parentName = GlobalSettings::self()->theIMAPResourceFolderParent();
// Find the folder parent
KMFolderDir* folderParentDir;
@@ -1666,10 +1666,10 @@ void KMailICalIfaceImpl::readConfig()
Q_ASSERT( account );
if ( account ) {
// just in case we were connected already
- disconnect( account, SIGNAL( finishedCheck( bool, CheckStatus ) ),
- this, SLOT( slotCheckDone() ) );
- connect( account, SIGNAL( finishedCheck( bool, CheckStatus ) ),
- this, SLOT( slotCheckDone() ) );
+ disconnect( account, TQT_SIGNAL( finishedCheck( bool, CheckStatus ) ),
+ this, TQT_SLOT( slotCheckDone() ) );
+ connect( account, TQT_SIGNAL( finishedCheck( bool, CheckStatus ) ),
+ this, TQT_SLOT( slotCheckDone() ) );
}
mUseResourceIMAP = false;
// We can't really call cleanup(), if those folders were completely deleted.
@@ -1691,7 +1691,7 @@ void KMailICalIfaceImpl::readConfig()
// Globally there are 3 cases: nothing found, some stuff found by type/name heuristics, or everything found OK
bool noneFound = true;
bool mustFix = false; // true when at least one was found by heuristics
- QValueVector<StandardFolderSearchResult> results( KMail::ContentsTypeLast + 1 );
+ TQValueVector<StandardFolderSearchResult> results( KMail::ContentsTypeLast + 1 );
for ( int i = 0; i < KMail::ContentsTypeLast+1; ++i ) {
if ( i != KMail::ContentsTypeMail ) {
results[i] = findStandardResourceFolder( folderParentDir, static_cast<KMail::FolderContentsType>(i) );
@@ -1719,8 +1719,8 @@ void KMailICalIfaceImpl::readConfig()
}
if( noneFound || mustFix ) {
- QString msg;
- QString parentFolderName = folderParent != 0 ? folderParent->name() : folderParentDir->name();
+ TQString msg;
+ TQString parentFolderName = folderParent != 0 ? folderParent->name() : folderParentDir->name();
if ( noneFound ) {
// No subfolder was found, so ask if we can make them
msg = i18n("KMail will now create the required groupware folders"
@@ -1728,10 +1728,10 @@ void KMailICalIfaceImpl::readConfig()
" and the IMAP resource will be disabled").arg(parentFolderName);
} else {
// Some subfolders were found, be more precise
- QString operations = "<ul>";
+ TQString operations = "<ul>";
for ( int i = 0; i < KMail::ContentsTypeLast+1; ++i ) {
if ( i != KMail::ContentsTypeMail ) {
- QString typeName = localizedDefaultFolderName( static_cast<KMail::FolderContentsType>( i ) );
+ TQString typeName = localizedDefaultFolderName( static_cast<KMail::FolderContentsType>( i ) );
if ( results[i].found == StandardFolderSearchResult::NotFound )
operations += "<li>" + i18n( "%1: no folder found. It will be created." ).arg( typeName ) + "</li>";
else if ( results[i].found == StandardFolderSearchResult::FoundByType || results[i].found == StandardFolderSearchResult::FoundByName )
@@ -1798,10 +1798,10 @@ void KMailICalIfaceImpl::readConfig()
kdDebug(5006) << k_funcinfo << "mNotes=" << mNotes << " " << mNotes->location() << endl;
// Find all extra folders
- QStringList folderNames;
- QValueList<QGuardedPtr<KMFolder> > folderList;
+ TQStringList folderNames;
+ TQValueList<TQGuardedPtr<KMFolder> > folderList;
kmkernel->dimapFolderMgr()->createFolderList(&folderNames, &folderList);
- for(QValueList<QGuardedPtr<KMFolder> >::iterator it = folderList.begin();
+ for(TQValueList<TQGuardedPtr<KMFolder> >::iterator it = folderList.begin();
it != folderList.end(); ++it)
{
FolderStorage* storage = (*it)->storage();
@@ -1861,10 +1861,10 @@ void KMailICalIfaceImpl::readConfig()
kdDebug(5006) << k_funcinfo << "mNotes=" << mNotes << " " << mNotes->location() << endl;
// Find all extra folders
- QStringList folderNames;
- QValueList<QGuardedPtr<KMFolder> > folderList;
+ TQStringList folderNames;
+ TQValueList<TQGuardedPtr<KMFolder> > folderList;
kmkernel->dimapFolderMgr()->createFolderList(&folderNames, &folderList);
- QValueList<QGuardedPtr<KMFolder> >::iterator it;
+ TQValueList<TQGuardedPtr<KMFolder> >::iterator it;
for(it = folderList.begin(); it != folderList.end(); ++it)
{
FolderStorage *storage = (*it)->storage();
@@ -1872,7 +1872,7 @@ void KMailICalIfaceImpl::readConfig()
if ( (*it)->folderType() == KMFolderTypeCachedImap ) {
KMFolderCachedImap *imapFolder = static_cast<KMFolderCachedImap*>( storage );
- const QString attributes = imapFolder->folderAttributes();
+ const TQString attributes = imapFolder->folderAttributes();
if ( attributes.contains( "X-FolderClass" ) ) {
if ( !attributes.contains( "X-SpecialFolder" ) || (*it)->location().contains( "@" ) ) {
const Scalix::FolderAttributeParser parser( attributes );
@@ -1906,15 +1906,15 @@ void KMailICalIfaceImpl::readConfig()
void KMailICalIfaceImpl::slotCheckDone()
{
- QString parentName = GlobalSettings::self()->theIMAPResourceFolderParent();
+ TQString parentName = GlobalSettings::self()->theIMAPResourceFolderParent();
KMFolder* folderParent = kmkernel->findFolderById( parentName );
//kdDebug(5006) << k_funcinfo << " folderParent=" << folderParent << endl;
if ( folderParent ) // cool it exists now
{
KMAccount* account = kmkernel->acctMgr()->find( GlobalSettings::self()->theIMAPResourceAccount() );
if ( account )
- disconnect( account, SIGNAL( finishedCheck( bool, CheckStatus ) ),
- this, SLOT( slotCheckDone() ) );
+ disconnect( account, TQT_SIGNAL( finishedCheck( bool, CheckStatus ) ),
+ this, TQT_SLOT( slotCheckDone() ) );
readConfig();
}
}
@@ -1971,12 +1971,12 @@ KMFolder* KMailICalIfaceImpl::initScalixFolder( KMail::FolderContentsType conten
KMFolder* folder = 0;
// Find all extra folders
- QStringList folderNames;
- QValueList<QGuardedPtr<KMFolder> > folderList;
+ TQStringList folderNames;
+ TQValueList<TQGuardedPtr<KMFolder> > folderList;
Q_ASSERT( kmkernel );
Q_ASSERT( kmkernel->dimapFolderMgr() );
kmkernel->dimapFolderMgr()->createFolderList(&folderNames, &folderList);
- QValueList<QGuardedPtr<KMFolder> >::iterator it = folderList.begin();
+ TQValueList<TQGuardedPtr<KMFolder> >::iterator it = folderList.begin();
for(; it != folderList.end(); ++it)
{
FolderStorage *storage = (*it)->storage();
@@ -1984,7 +1984,7 @@ KMFolder* KMailICalIfaceImpl::initScalixFolder( KMail::FolderContentsType conten
if ( (*it)->folderType() == KMFolderTypeCachedImap ) {
KMFolderCachedImap *imapFolder = static_cast<KMFolderCachedImap*>( storage );
- const QString attributes = imapFolder->folderAttributes();
+ const TQString attributes = imapFolder->folderAttributes();
if ( attributes.contains( "X-SpecialFolder" ) ) {
const Scalix::FolderAttributeParser parser( attributes );
if ( contentsType == Scalix::Utils::scalixIdToContentsType( parser.folderClass() ) ) {
@@ -2018,32 +2018,32 @@ KMFolder* KMailICalIfaceImpl::initScalixFolder( KMail::FolderContentsType conten
void KMailICalIfaceImpl::connectFolder( KMFolder* folder )
{
// avoid multiple connections
- disconnect( folder, SIGNAL( msgAdded( KMFolder*, Q_UINT32 ) ),
- this, SLOT( slotIncidenceAdded( KMFolder*, Q_UINT32 ) ) );
- disconnect( folder, SIGNAL( msgRemoved( KMFolder*, Q_UINT32 ) ),
- this, SLOT( slotIncidenceDeleted( KMFolder*, Q_UINT32 ) ) );
- disconnect( folder, SIGNAL( expunged( KMFolder* ) ),
- this, SLOT( slotRefreshFolder( KMFolder* ) ) );
- disconnect( folder->storage(), SIGNAL( readOnlyChanged( KMFolder* ) ),
- this, SLOT( slotFolderPropertiesChanged( KMFolder* ) ) );
- disconnect( folder, SIGNAL( nameChanged() ),
- this, SLOT( slotFolderRenamed() ) );
- disconnect( folder->storage(), SIGNAL( locationChanged( const QString&, const QString&) ),
- this, SLOT( slotFolderLocationChanged( const QString&, const QString&) ) );
+ disconnect( folder, TQT_SIGNAL( msgAdded( KMFolder*, Q_UINT32 ) ),
+ this, TQT_SLOT( slotIncidenceAdded( KMFolder*, Q_UINT32 ) ) );
+ disconnect( folder, TQT_SIGNAL( msgRemoved( KMFolder*, Q_UINT32 ) ),
+ this, TQT_SLOT( slotIncidenceDeleted( KMFolder*, Q_UINT32 ) ) );
+ disconnect( folder, TQT_SIGNAL( expunged( KMFolder* ) ),
+ this, TQT_SLOT( slotRefreshFolder( KMFolder* ) ) );
+ disconnect( folder->storage(), TQT_SIGNAL( readOnlyChanged( KMFolder* ) ),
+ this, TQT_SLOT( slotFolderPropertiesChanged( KMFolder* ) ) );
+ disconnect( folder, TQT_SIGNAL( nameChanged() ),
+ this, TQT_SLOT( slotFolderRenamed() ) );
+ disconnect( folder->storage(), TQT_SIGNAL( locationChanged( const TQString&, const TQString&) ),
+ this, TQT_SLOT( slotFolderLocationChanged( const TQString&, const TQString&) ) );
// Setup the signals to listen for changes
- connect( folder, SIGNAL( msgAdded( KMFolder*, Q_UINT32 ) ),
- this, SLOT( slotIncidenceAdded( KMFolder*, Q_UINT32 ) ) );
- connect( folder, SIGNAL( msgRemoved( KMFolder*, Q_UINT32 ) ),
- this, SLOT( slotIncidenceDeleted( KMFolder*, Q_UINT32 ) ) );
- connect( folder, SIGNAL( expunged( KMFolder* ) ),
- this, SLOT( slotRefreshFolder( KMFolder* ) ) );
- connect( folder->storage(), SIGNAL( readOnlyChanged( KMFolder* ) ),
- this, SLOT( slotFolderPropertiesChanged( KMFolder* ) ) );
- connect( folder, SIGNAL( nameChanged() ),
- this, SLOT( slotFolderRenamed() ) );
- connect( folder->storage(), SIGNAL( locationChanged( const QString&, const QString&) ),
- this, SLOT( slotFolderLocationChanged( const QString&, const QString&) ) );
+ connect( folder, TQT_SIGNAL( msgAdded( KMFolder*, Q_UINT32 ) ),
+ this, TQT_SLOT( slotIncidenceAdded( KMFolder*, Q_UINT32 ) ) );
+ connect( folder, TQT_SIGNAL( msgRemoved( KMFolder*, Q_UINT32 ) ),
+ this, TQT_SLOT( slotIncidenceDeleted( KMFolder*, Q_UINT32 ) ) );
+ connect( folder, TQT_SIGNAL( expunged( KMFolder* ) ),
+ this, TQT_SLOT( slotRefreshFolder( KMFolder* ) ) );
+ connect( folder->storage(), TQT_SIGNAL( readOnlyChanged( KMFolder* ) ),
+ this, TQT_SLOT( slotFolderPropertiesChanged( KMFolder* ) ) );
+ connect( folder, TQT_SIGNAL( nameChanged() ),
+ this, TQT_SLOT( slotFolderRenamed() ) );
+ connect( folder->storage(), TQT_SIGNAL( locationChanged( const TQString&, const TQString&) ),
+ this, TQT_SLOT( slotFolderLocationChanged( const TQString&, const TQString&) ) );
}
@@ -2067,23 +2067,23 @@ void KMailICalIfaceImpl::cleanup()
mContacts = mCalendar = mNotes = mTasks = mJournals = 0;
}
-QString KMailICalIfaceImpl::folderPixmap( KFolderTreeItem::Type type ) const
+TQString KMailICalIfaceImpl::folderPixmap( KFolderTreeItem::Type type ) const
{
if( !mUseResourceIMAP )
- return QString::null;
+ return TQString::null;
if( type == KFolderTreeItem::Contacts )
- return QString::fromLatin1( "kmgroupware_folder_contacts" );
+ return TQString::fromLatin1( "kmgroupware_folder_contacts" );
else if( type == KFolderTreeItem::Calendar )
- return QString::fromLatin1( "kmgroupware_folder_calendar" );
+ return TQString::fromLatin1( "kmgroupware_folder_calendar" );
else if( type == KFolderTreeItem::Notes )
- return QString::fromLatin1( "kmgroupware_folder_notes" );
+ return TQString::fromLatin1( "kmgroupware_folder_notes" );
else if( type == KFolderTreeItem::Tasks )
- return QString::fromLatin1( "kmgroupware_folder_tasks" );
+ return TQString::fromLatin1( "kmgroupware_folder_tasks" );
else if( type == KFolderTreeItem::Journals )
- return QString::fromLatin1( "kmgroupware_folder_journals" );
+ return TQString::fromLatin1( "kmgroupware_folder_journals" );
- return QString::null;
+ return TQString::null;
}
static void reloadFolderTree()
@@ -2095,9 +2095,9 @@ static void reloadFolderTree()
// This is a very light-weight and fast 'parser' to retrieve
// a data entry from a vCal taking continuation lines
// into account
-static void vPartMicroParser( const QString& str, QString& s )
+static void vPartMicroParser( const TQString& str, TQString& s )
{
- QString line;
+ TQString line;
uint len = str.length();
for( uint i=0; i<len; ++i){
@@ -2125,14 +2125,14 @@ static void vPartMicroParser( const QString& str, QString& s )
}
// Returns the first child folder having the given annotation
-static KMFolder* findFolderByAnnotation( KMFolderDir* folderParentDir, const QString& annotation )
+static KMFolder* findFolderByAnnotation( KMFolderDir* folderParentDir, const TQString& annotation )
{
- QPtrListIterator<KMFolderNode> it( *folderParentDir );
+ TQPtrListIterator<KMFolderNode> it( *folderParentDir );
for ( ; it.current(); ++it ) {
if ( !it.current()->isDir() ) {
KMFolder* folder = static_cast<KMFolder *>( it.current() );
if ( folder->folderType() == KMFolderTypeCachedImap ) {
- QString folderAnnotation = static_cast<KMFolderCachedImap*>( folder->storage() )->annotationFolderType();
+ TQString folderAnnotation = static_cast<KMFolderCachedImap*>( folder->storage() )->annotationFolderType();
//kdDebug(5006) << "findStandardResourceFolder: " << folder->name() << " has annotation " << folderAnnotation << endl;
if ( folderAnnotation == annotation )
return folder;
@@ -2147,12 +2147,12 @@ KMailICalIfaceImpl::StandardFolderSearchResult KMailICalIfaceImpl::findStandardR
if ( GlobalSettings::self()->theIMAPResourceStorageFormat() == GlobalSettings::EnumTheIMAPResourceStorageFormat::XML )
{
// Look for a folder with an annotation like "event.default"
- KMFolder* folder = findFolderByAnnotation( folderParentDir, QString( s_folderContentsType[contentsType].annotation ) + ".default" );
+ KMFolder* folder = findFolderByAnnotation( folderParentDir, TQString( s_folderContentsType[contentsType].annotation ) + ".default" );
if ( folder )
return StandardFolderSearchResult( folder, StandardFolderSearchResult::FoundAndStandard );
// Fallback: look for a folder with an annotation like "event"
- folder = findFolderByAnnotation( folderParentDir, QString( s_folderContentsType[contentsType].annotation ) );
+ folder = findFolderByAnnotation( folderParentDir, TQString( s_folderContentsType[contentsType].annotation ) );
if ( folder )
return StandardFolderSearchResult( folder, StandardFolderSearchResult::FoundByType );
@@ -2217,9 +2217,9 @@ bool KMailICalIfaceImpl::isResourceQuiet() const
}
-bool KMailICalIfaceImpl::addSubresource( const QString& resource,
- const QString& parent,
- const QString& contentsType )
+bool KMailICalIfaceImpl::addSubresource( const TQString& resource,
+ const TQString& parent,
+ const TQString& contentsType )
{
kdDebug(5006) << "Adding subresource to parent: " << parent << " with name: " << resource << endl;
kdDebug(5006) << "contents type: " << contentsType << endl;
@@ -2246,7 +2246,7 @@ bool KMailICalIfaceImpl::addSubresource( const QString& resource,
return true;
}
-bool KMailICalIfaceImpl::removeSubresource( const QString& location )
+bool KMailICalIfaceImpl::removeSubresource( const TQString& location )
{
kdDebug(5006) << k_funcinfo << endl;
diff --git a/kmail/kmailicalifaceimpl.h b/kmail/kmailicalifaceimpl.h
index 261774860..5a92ffe92 100644
--- a/kmail/kmailicalifaceimpl.h
+++ b/kmail/kmailicalifaceimpl.h
@@ -42,9 +42,9 @@
#include "kmfoldertype.h"
#include <kfoldertree.h>
-#include <qdict.h>
-#include <qguardedptr.h>
-#include <qmap.h>
+#include <tqdict.h>
+#include <tqguardedptr.h>
+#include <tqmap.h>
class KMFolder;
class KMMessage;
@@ -58,84 +58,84 @@ class ExtraFolder {
public:
ExtraFolder( KMFolder* f );
~ExtraFolder();
- QGuardedPtr<KMFolder> folder;
+ TQGuardedPtr<KMFolder> folder;
};
class Accumulator {
public:
- Accumulator( const QString& t, const QString& f, int c )
+ Accumulator( const TQString& t, const TQString& f, int c )
:type( t ), folder( f ), count( c ) {}
- void add( const QString& incidence ) {
+ void add( const TQString& incidence ) {
incidences << incidence;
count--;
}
bool isFull() { return count == 0; }
- const QString type;
- const QString folder;
- QStringList incidences;
+ const TQString type;
+ const TQString folder;
+ TQStringList incidences;
int count;
};
}
/** The implementation of the interface. */
-class KMailICalIfaceImpl : public QObject, virtual public KMailICalIface {
+class KMailICalIfaceImpl : public TQObject, virtual public KMailICalIface {
Q_OBJECT
public:
KMailICalIfaceImpl();
- bool isWritableFolder( const QString& type, const QString& resource );
+ bool isWritableFolder( const TQString& type, const TQString& resource );
- StorageFormat storageFormat( const QString &resource );
+ StorageFormat storageFormat( const TQString &resource );
/// Update a kolab storage entry.
/// If message is not there, it is added and
/// given the subject as Subject: header.
/// Returns the new mail serial number,
/// or 0 if something went wrong,
- Q_UINT32 update( const QString& resource,
+ Q_UINT32 update( const TQString& resource,
Q_UINT32 sernum,
- const QString& subject,
- const QString& plainTextBody,
- const QMap<QCString, QString>& customHeaders,
- const QStringList& attachmentURLs,
- const QStringList& attachmentMimetypes,
- const QStringList& attachmentNames,
- const QStringList& deletedAttachments );
-
- bool deleteIncidenceKolab( const QString& resource,
+ const TQString& subject,
+ const TQString& plainTextBody,
+ const TQMap<TQCString, TQString>& customHeaders,
+ const TQStringList& attachmentURLs,
+ const TQStringList& attachmentMimetypes,
+ const TQStringList& attachmentNames,
+ const TQStringList& deletedAttachments );
+
+ bool deleteIncidenceKolab( const TQString& resource,
Q_UINT32 sernum );
- int incidencesKolabCount( const QString& mimetype,
- const QString& resource );
- QMap<Q_UINT32, QString> incidencesKolab( const QString& mimetype,
- const QString& resource,
+ int incidencesKolabCount( const TQString& mimetype,
+ const TQString& resource );
+ TQMap<Q_UINT32, TQString> incidencesKolab( const TQString& mimetype,
+ const TQString& resource,
int startIndex,
int nbMessages );
- QValueList<SubResource> subresourcesKolab( const QString& contentsType );
+ TQValueList<SubResource> subresourcesKolab( const TQString& contentsType );
- bool triggerSync( const QString& contentsType );
+ bool triggerSync( const TQString& contentsType );
// "Get" an attachment. This actually saves the attachment in a file
// and returns a URL to it
- KURL getAttachment( const QString& resource,
+ KURL getAttachment( const TQString& resource,
Q_UINT32 sernum,
- const QString& filename );
+ const TQString& filename );
- QString attachmentMimetype( const QString &resource,
+ TQString attachmentMimetype( const TQString &resource,
Q_UINT32 sernum,
- const QString &filename );
+ const TQString &filename );
- QStringList listAttachments( const QString &resource, Q_UINT32 sernum );
+ TQStringList listAttachments( const TQString &resource, Q_UINT32 sernum );
- bool removeSubresource( const QString& );
+ bool removeSubresource( const TQString& );
- bool addSubresource( const QString& resource,
- const QString& parent,
- const QString& contentsType );
+ bool addSubresource( const TQString& resource,
+ const TQString& parent,
+ const TQString& contentsType );
// tell KOrganizer about messages to be deleted
void msgRemoved( KMFolder*, KMMessage* );
@@ -177,22 +177,22 @@ public:
/**
* Returns the name of the standard icon for a folder of given type or
- * QString::null if the type is no groupware type.
+ * TQString::null if the type is no groupware type.
*/
- QString folderPixmap( KFolderTreeItem::Type type ) const;
+ TQString folderPixmap( KFolderTreeItem::Type type ) const;
/** Returns the localized name of a folder of given type.
*/
- QString folderName( KFolderTreeItem::Type type, int language = -1 ) const;
+ TQString folderName( KFolderTreeItem::Type type, int language = -1 ) const;
/** Get the folder that holds *type* entries */
- KMFolder* folderFromType( const QString& type, const QString& folder );
+ KMFolder* folderFromType( const TQString& type, const TQString& folder );
/** Return the ical type of a folder */
- QString icalFolderType( KMFolder* folder ) const;
+ TQString icalFolderType( KMFolder* folder ) const;
/** Find message matching a given UID. */
- KMMessage* findMessageByUID( const QString& uid, KMFolder* folder );
+ KMMessage* findMessageByUID( const TQString& uid, KMFolder* folder );
/** Find message matching a given serial number. */
static KMMessage* findMessageBySerNum( Q_UINT32 serNum, KMFolder* folder );
@@ -230,7 +230,7 @@ public slots:
void slotIncidenceAdded( KMFolder* folder, Q_UINT32 sernum );
void slotIncidenceDeleted( KMFolder* folder, Q_UINT32 sernum );
- void slotRefresh( const QString& type);
+ void slotRefresh( const TQString& type);
// Called when a folder is made readonly or readwrite, or renamed,
// or any other similar change that affects the resources
@@ -239,7 +239,7 @@ public slots:
private slots:
void slotRefreshFolder( KMFolder* );
void slotCheckDone();
- void slotFolderLocationChanged( const QString&, const QString& );
+ void slotFolderLocationChanged( const TQString&, const TQString& );
void slotFolderRenamed();
void slotMessageRetrieved( KMMessage* );
@@ -250,7 +250,7 @@ private:
void connectFolder( KMFolder* folder );
- KMFolder* extraFolder( const QString& type, const QString& folder );
+ KMFolder* extraFolder( const TQString& type, const TQString& folder );
void syncFolder( KMFolder* folder ) const;
@@ -264,24 +264,24 @@ private:
};
StandardFolderSearchResult findStandardResourceFolder( KMFolderDir* folderParentDir, KMail::FolderContentsType contentsType );
- KMFolder* findResourceFolder( const QString& resource );
+ KMFolder* findResourceFolder( const TQString& resource );
bool updateAttachment( KMMessage& msg,
- const QString& attachmentURL,
- const QString& attachmentName,
- const QString& attachmentMimetype,
+ const TQString& attachmentURL,
+ const TQString& attachmentName,
+ const TQString& attachmentMimetype,
bool lookupByName );
bool deleteAttachment( KMMessage& msg,
- const QString& attachmentURL );
+ const TQString& attachmentURL );
Q_UINT32 addIncidenceKolab( KMFolder& folder,
- const QString& subject,
- const QString& plainTextBody,
- const QMap<QCString, QString>& customHeaders,
- const QStringList& attachmentURLs,
- const QStringList& attachmentNames,
- const QStringList& attachmentMimetypes );
- static bool kolabXMLFoundAndDecoded( const KMMessage& msg, const QString& mimetype, QString& s );
+ const TQString& subject,
+ const TQString& plainTextBody,
+ const TQMap<TQCString, TQString>& customHeaders,
+ const TQStringList& attachmentURLs,
+ const TQStringList& attachmentNames,
+ const TQStringList& attachmentMimetypes );
+ static bool kolabXMLFoundAndDecoded( const KMMessage& msg, const TQString& mimetype, TQString& s );
void handleFolderSynced( KMFolder* folder,
const KURL& folderURL,
@@ -293,17 +293,17 @@ private:
static bool folderIsAlarmRelevant( const KMFolder * );
private:
- QGuardedPtr<KMFolder> mContacts;
- QGuardedPtr<KMFolder> mCalendar;
- QGuardedPtr<KMFolder> mNotes;
- QGuardedPtr<KMFolder> mTasks;
- QGuardedPtr<KMFolder> mJournals;
+ TQGuardedPtr<KMFolder> mContacts;
+ TQGuardedPtr<KMFolder> mCalendar;
+ TQGuardedPtr<KMFolder> mNotes;
+ TQGuardedPtr<KMFolder> mTasks;
+ TQGuardedPtr<KMFolder> mJournals;
// The extra IMAP resource folders
// Key: folder location. Data: folder.
- QDict<KMail::ExtraFolder> mExtraFolders;
+ TQDict<KMail::ExtraFolder> mExtraFolders;
// used for collecting incidences during async loading
- QDict<KMail::Accumulator> mAccumulators;
+ TQDict<KMail::Accumulator> mAccumulators;
// More info for each folder we care about (mContacts etc. as well as the extra folders)
// The reason for storing it here is that it can be shared between
// kmfoldercachedimap and kmfolderimap, and that it's groupware data anyway.
@@ -315,7 +315,7 @@ private:
FolderChanges mChanges;
};
// The storage format used for each folder that we care about
- typedef QMap<KMFolder*, FolderInfo> FolderInfoMap;
+ typedef TQMap<KMFolder*, FolderInfo> FolderInfoMap;
// helper for reading the FolderInfo from the config file
FolderInfo readFolderInfo( const KMFolder * const folder ) const;
@@ -337,10 +337,10 @@ private:
* Since these are transient attributes of only a small but changing number
* of incidences they are not encapsulated in a struct or somesuch.
*/
- QMap<QString, Q_UINT32> mUIDToSerNum;
- QMap<Q_UINT32, bool> mTheUnGetMes;
- QMap<QString, QString> mPendingUpdates;
- QMap<QString, bool> mInTransit;
+ TQMap<TQString, Q_UINT32> mUIDToSerNum;
+ TQMap<Q_UINT32, bool> mTheUnGetMes;
+ TQMap<TQString, TQString> mPendingUpdates;
+ TQMap<TQString, bool> mInTransit;
};
diff --git a/kmail/kmatmlistview.cpp b/kmail/kmatmlistview.cpp
index aca518e65..a30fe30c8 100644
--- a/kmail/kmatmlistview.cpp
+++ b/kmail/kmatmlistview.cpp
@@ -6,25 +6,25 @@
#include <config.h>
#include "kmatmlistview.h"
-#include <qcheckbox.h>
-#include <qheader.h>
+#include <tqcheckbox.h>
+#include <tqheader.h>
-KMAtmListViewItem::KMAtmListViewItem( QListView *parent )
- : QObject(),
- QListViewItem( parent )
+KMAtmListViewItem::KMAtmListViewItem( TQListView *parent )
+ : TQObject(),
+ TQListViewItem( parent )
{
- mCBCompress = new QCheckBox( listView()->viewport() );
- mCBEncrypt = new QCheckBox( listView()->viewport() );
- mCBSign = new QCheckBox( listView()->viewport() );
+ mCBCompress = new TQCheckBox( listView()->viewport() );
+ mCBEncrypt = new TQCheckBox( listView()->viewport() );
+ mCBSign = new TQCheckBox( listView()->viewport() );
mCBCompress->setShown( true );
updateAllCheckBoxes();
- connect( mCBCompress, SIGNAL( clicked() ), this, SLOT( slotCompress() ) );
- connect( listView()->header(), SIGNAL( sizeChange(int, int, int) ),
- SLOT( slotHeaderChange( int, int, int ) ) );
- connect( listView()->header(), SIGNAL( indexChange(int, int, int) ),
- SLOT( slotHeaderChange( int, int, int ) ) );
- connect( listView()->header(), SIGNAL( clicked( int ) ), SLOT( slotHeaderClick( int ) ) );
+ connect( mCBCompress, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotCompress() ) );
+ connect( listView()->header(), TQT_SIGNAL( sizeChange(int, int, int) ),
+ TQT_SLOT( slotHeaderChange( int, int, int ) ) );
+ connect( listView()->header(), TQT_SIGNAL( indexChange(int, int, int) ),
+ TQT_SLOT( slotHeaderChange( int, int, int ) ) );
+ connect( listView()->header(), TQT_SIGNAL( clicked( int ) ), TQT_SLOT( slotHeaderClick( int ) ) );
}
KMAtmListViewItem::~KMAtmListViewItem()
@@ -37,7 +37,7 @@ KMAtmListViewItem::~KMAtmListViewItem()
mCBCompress = 0;
}
-void KMAtmListViewItem::updateCheckBox( int headerSection, QCheckBox *cb )
+void KMAtmListViewItem::updateCheckBox( int headerSection, TQCheckBox *cb )
{
//Calculate some values to determine the x-position where the checkbox
//will be drawn
@@ -50,7 +50,7 @@ void KMAtmListViewItem::updateCheckBox( int headerSection, QCheckBox *cb )
listView()->moveChild( cb, sectionPos + sectionOffset, itemPos() + 1 );
//Set the correct background color
- QColor bg;
+ TQColor bg;
if ( isSelected() ) {
bg = listView()->colorGroup().highlight();
} else {
@@ -77,7 +77,7 @@ void KMAtmListViewItem::updateAllCheckBoxes()
// the cause of bug 113458. Therefore, both the signals connected in the
// constructor and this function are necessary to keep the checkboxes'
// positions in sync, and hopefully is enough.
-void KMAtmListViewItem::paintCell ( QPainter * p, const QColorGroup &cg,
+void KMAtmListViewItem::paintCell ( TQPainter * p, const TQColorGroup &cg,
int column, int width, int align )
{
switch ( column ) {
@@ -86,13 +86,13 @@ void KMAtmListViewItem::paintCell ( QPainter * p, const QColorGroup &cg,
case 6: updateCheckBox( 6, mCBSign ); break;
}
- QListViewItem::paintCell( p, cg, column, width, align );
+ TQListViewItem::paintCell( p, cg, column, width, align );
}
-int KMAtmListViewItem::compare( QListViewItem *i, int col, bool ascending ) const
+int KMAtmListViewItem::compare( TQListViewItem *i, int col, bool ascending ) const
{
if ( col != 1 ) {
- return QListViewItem::compare( i, col, ascending );
+ return TQListViewItem::compare( i, col, ascending );
}
return mAttachmentSize -
diff --git a/kmail/kmatmlistview.h b/kmail/kmatmlistview.h
index f50d4e398..e42f2628e 100644
--- a/kmail/kmatmlistview.h
+++ b/kmail/kmatmlistview.h
@@ -5,38 +5,38 @@
#ifndef __KMAIL_KMATMLISTVIEW_H__
#define __KMAIL_KMATMLISTVIEW_H__
-#include <qlistview.h>
-#include <qcstring.h>
+#include <tqlistview.h>
+#include <tqcstring.h>
class KMComposeWin;
class MessageComposer;
class QCheckBox;
-class KMAtmListViewItem : public QObject, public QListViewItem
+class KMAtmListViewItem : public TQObject, public QListViewItem
{
Q_OBJECT
public:
- KMAtmListViewItem( QListView *parent );
+ KMAtmListViewItem( TQListView *parent );
virtual ~KMAtmListViewItem();
//A custom compare function is needed because the size column is
//human-readable and therefore doesn't sort correctly.
- virtual int compare( QListViewItem *i, int col, bool ascending ) const;
+ virtual int compare( TQListViewItem *i, int col, bool ascending ) const;
- virtual void paintCell ( QPainter * p, const QColorGroup & cg, int column, int width, int align );
+ virtual void paintCell ( TQPainter * p, const TQColorGroup & cg, int column, int width, int align );
- void setUncompressedMimeType( const QCString & type, const QCString & subtype ) {
+ void setUncompressedMimeType( const TQCString & type, const TQCString & subtype ) {
mType = type; mSubtype = subtype;
}
void setAttachmentSize( int numBytes ) {
mAttachmentSize = numBytes;
}
- void uncompressedMimeType( QCString & type, QCString & subtype ) const {
+ void uncompressedMimeType( TQCString & type, TQCString & subtype ) const {
type = mType; subtype = mSubtype;
}
- void setUncompressedCodec( const QCString &codec ) { mCodec = codec; }
- QCString uncompressedCodec() const { return mCodec; }
+ void setUncompressedCodec( const TQCString &codec ) { mCodec = codec; }
+ TQCString uncompressedCodec() const { return mCodec; }
void enableCryptoCBs( bool on );
void setEncrypt( bool on );
@@ -57,14 +57,14 @@ private slots:
protected:
- void updateCheckBox( int headerSection, QCheckBox *cb );
+ void updateCheckBox( int headerSection, TQCheckBox *cb );
void updateAllCheckBoxes();
private:
- QCheckBox *mCBEncrypt;
- QCheckBox *mCBSign;
- QCheckBox *mCBCompress;
- QCString mType, mSubtype, mCodec;
+ TQCheckBox *mCBEncrypt;
+ TQCheckBox *mCBSign;
+ TQCheckBox *mCBCompress;
+ TQCString mType, mSubtype, mCodec;
int mAttachmentSize;
};
diff --git a/kmail/kmcommands.cpp b/kmail/kmcommands.cpp
index 3119bb4ba..e0b911df7 100644
--- a/kmail/kmcommands.cpp
+++ b/kmail/kmcommands.cpp
@@ -54,9 +54,9 @@
#include <kapplication.h>
#include <dcopclient.h>
-#include <qtextcodec.h>
-#include <qpopupmenu.h>
-#include <qeventloop.h>
+#include <tqtextcodec.h>
+#include <tqpopupmenu.h>
+#include <tqeventloop.h>
#include <libemailfunctions/email.h>
#include <kdcopservicestarter.h>
@@ -132,7 +132,7 @@ using namespace KMime;
#include <kleo/cryptobackend.h>
#include <kleo/cryptobackendfactory.h>
-#include <qclipboard.h>
+#include <tqclipboard.h>
#include <memory>
@@ -155,26 +155,26 @@ private:
};
-KMCommand::KMCommand( QWidget *parent )
+KMCommand::KMCommand( TQWidget *parent )
: mProgressDialog( 0 ), mResult( Undefined ), mDeletesItself( false ),
mEmitsCompletedItself( false ), mParent( parent )
{
}
-KMCommand::KMCommand( QWidget *parent, const QPtrList<KMMsgBase> &msgList )
+KMCommand::KMCommand( TQWidget *parent, const TQPtrList<KMMsgBase> &msgList )
: mProgressDialog( 0 ), mResult( Undefined ), mDeletesItself( false ),
mEmitsCompletedItself( false ), mParent( parent ), mMsgList( msgList )
{
}
-KMCommand::KMCommand( QWidget *parent, KMMsgBase *msgBase )
+KMCommand::KMCommand( TQWidget *parent, KMMsgBase *msgBase )
: mProgressDialog( 0 ), mResult( Undefined ), mDeletesItself( false ),
mEmitsCompletedItself( false ), mParent( parent )
{
mMsgList.append( msgBase );
}
-KMCommand::KMCommand( QWidget *parent, KMMessage *msg )
+KMCommand::KMCommand( TQWidget *parent, KMMessage *msg )
: mProgressDialog( 0 ), mResult( Undefined ), mDeletesItself( false ),
mEmitsCompletedItself( false ), mParent( parent )
{
@@ -184,7 +184,7 @@ KMCommand::KMCommand( QWidget *parent, KMMessage *msg )
KMCommand::~KMCommand()
{
- QValueListIterator<QGuardedPtr<KMFolder> > fit;
+ TQValueListIterator<TQGuardedPtr<KMFolder> > fit;
for ( fit = mFolders.begin(); fit != mFolders.end(); ++fit ) {
if (!(*fit))
continue;
@@ -201,11 +201,11 @@ KMCommand::Result KMCommand::result()
void KMCommand::start()
{
- QTimer::singleShot( 0, this, SLOT( slotStart() ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( slotStart() ) );
}
-const QPtrList<KMMessage> KMCommand::retrievedMsgs() const
+const TQPtrList<KMMessage> KMCommand::retrievedMsgs() const
{
return mRetrievedMsgs;
}
@@ -215,7 +215,7 @@ KMMessage *KMCommand::retrievedMessage() const
return mRetrievedMsgs.getFirst();
}
-QWidget *KMCommand::parentWidget() const
+TQWidget *KMCommand::parentWidget() const
{
return mParent;
}
@@ -224,8 +224,8 @@ int KMCommand::mCountJobs = 0;
void KMCommand::slotStart()
{
- connect( this, SIGNAL( messagesTransfered( KMCommand::Result ) ),
- this, SLOT( slotPostTransfer( KMCommand::Result ) ) );
+ connect( this, TQT_SIGNAL( messagesTransfered( KMCommand::Result ) ),
+ this, TQT_SLOT( slotPostTransfer( KMCommand::Result ) ) );
kmkernel->filterMgr()->ref();
if (mMsgList.find(0) != -1) {
@@ -257,12 +257,12 @@ void KMCommand::slotStart()
void KMCommand::slotPostTransfer( KMCommand::Result result )
{
- disconnect( this, SIGNAL( messagesTransfered( KMCommand::Result ) ),
- this, SLOT( slotPostTransfer( KMCommand::Result ) ) );
+ disconnect( this, TQT_SIGNAL( messagesTransfered( KMCommand::Result ) ),
+ this, TQT_SLOT( slotPostTransfer( KMCommand::Result ) ) );
if ( result == OK )
result = execute();
mResult = result;
- QPtrListIterator<KMMessage> it( mRetrievedMsgs );
+ TQPtrListIterator<KMMessage> it( mRetrievedMsgs );
KMMessage* msg;
while ( (msg = it.current()) != 0 )
{
@@ -335,13 +335,13 @@ void KMCommand::transferSelectedMsgs()
job->setCancellable( false );
totalSize += thisMsg->msgSizeServer();
// emitted when the message was transferred successfully
- connect(job, SIGNAL(messageRetrieved(KMMessage*)),
- this, SLOT(slotMsgTransfered(KMMessage*)));
+ connect(job, TQT_SIGNAL(messageRetrieved(KMMessage*)),
+ this, TQT_SLOT(slotMsgTransfered(KMMessage*)));
// emitted when the job is destroyed
- connect(job, SIGNAL(finished()),
- this, SLOT(slotJobFinished()));
- connect(job, SIGNAL(progress(unsigned long, unsigned long)),
- this, SLOT(slotProgress(unsigned long, unsigned long)));
+ connect(job, TQT_SIGNAL(finished()),
+ this, TQT_SLOT(slotJobFinished()));
+ connect(job, TQT_SIGNAL(progress(unsigned long, unsigned long)),
+ this, TQT_SLOT(slotProgress(unsigned long, unsigned long)));
// msg musn't be deleted
thisMsg->setTransferInProgress(true);
job->start();
@@ -359,8 +359,8 @@ void KMCommand::transferSelectedMsgs()
} else {
// wait for the transfer and tell the progressBar the necessary steps
if ( mProgressDialog ) {
- connect(mProgressDialog, SIGNAL(cancelClicked()),
- this, SLOT(slotTransferCancelled()));
+ connect(mProgressDialog, TQT_SIGNAL(cancelClicked()),
+ this, TQT_SLOT(slotTransferCancelled()));
mProgressDialog->progressBar()->setTotalSteps(totalSize);
}
}
@@ -414,7 +414,7 @@ void KMCommand::slotJobFinished()
void KMCommand::slotTransferCancelled()
{
// kill the pending jobs
- QValueListIterator<QGuardedPtr<KMFolder> > fit;
+ TQValueListIterator<TQGuardedPtr<KMFolder> > fit;
for ( fit = mFolders.begin(); fit != mFolders.end(); ++fit ) {
if (!(*fit))
continue;
@@ -428,7 +428,7 @@ void KMCommand::slotTransferCancelled()
KMCommand::mCountJobs = 0;
mCountMsgs = 0;
// unget the transfered messages
- QPtrListIterator<KMMessage> it( mRetrievedMsgs );
+ TQPtrListIterator<KMMessage> it( mRetrievedMsgs );
KMMessage* msg;
while ( (msg = it.current()) != 0 )
{
@@ -477,8 +477,8 @@ KMCommand::Result KMMailtoComposeCommand::execute()
}
-KMMailtoReplyCommand::KMMailtoReplyCommand( QWidget *parent,
- const KURL &url, KMMessage *msg, const QString &selection )
+KMMailtoReplyCommand::KMMailtoReplyCommand( TQWidget *parent,
+ const KURL &url, KMMessage *msg, const TQString &selection )
:KMCommand( parent, msg ), mUrl( url ), mSelection( selection )
{
}
@@ -502,7 +502,7 @@ KMCommand::Result KMMailtoReplyCommand::execute()
}
-KMMailtoForwardCommand::KMMailtoForwardCommand( QWidget *parent,
+KMMailtoForwardCommand::KMMailtoForwardCommand( TQWidget *parent,
const KURL &url, KMMessage *msg )
:KMCommand( parent, msg ), mUrl( url )
{
@@ -526,14 +526,14 @@ KMCommand::Result KMMailtoForwardCommand::execute()
}
-KMAddBookmarksCommand::KMAddBookmarksCommand( const KURL &url, QWidget *parent )
+KMAddBookmarksCommand::KMAddBookmarksCommand( const KURL &url, TQWidget *parent )
: KMCommand( parent ), mUrl( url )
{
}
KMCommand::Result KMAddBookmarksCommand::execute()
{
- QString filename = locateLocal( "data", QString::fromLatin1("konqueror/bookmarks.xml") );
+ TQString filename = locateLocal( "data", TQString::fromLatin1("konqueror/bookmarks.xml") );
KBookmarkManager *bookManager = KBookmarkManager::managerForFile( filename,
false );
KBookmarkGroup group = bookManager->root();
@@ -546,7 +546,7 @@ KMCommand::Result KMAddBookmarksCommand::execute()
}
KMMailtoAddAddrBookCommand::KMMailtoAddAddrBookCommand( const KURL &url,
- QWidget *parent )
+ TQWidget *parent )
: KMCommand( parent ), mUrl( url )
{
}
@@ -561,7 +561,7 @@ KMCommand::Result KMMailtoAddAddrBookCommand::execute()
KMMailtoOpenAddrBookCommand::KMMailtoOpenAddrBookCommand( const KURL &url,
- QWidget *parent )
+ TQWidget *parent )
: KMCommand( parent ), mUrl( url )
{
}
@@ -582,11 +582,11 @@ KMUrlCopyCommand::KMUrlCopyCommand( const KURL &url, KMMainWidget *mainWidget )
KMCommand::Result KMUrlCopyCommand::execute()
{
- QClipboard* clip = QApplication::clipboard();
+ QClipboard* clip = TQApplication::clipboard();
if (mUrl.protocol() == "mailto") {
// put the url into the mouse selection and the clipboard
- QString address = KMMessage::decodeMailtoUrl( mUrl.path() );
+ TQString address = KMMessage::decodeMailtoUrl( mUrl.path() );
clip->setSelectionMode( true );
clip->setText( address );
clip->setSelectionMode( false );
@@ -619,7 +619,7 @@ KMCommand::Result KMUrlOpenCommand::execute()
}
-KMUrlSaveCommand::KMUrlSaveCommand( const KURL &url, QWidget *parent )
+KMUrlSaveCommand::KMUrlSaveCommand( const KURL &url, TQWidget *parent )
: KMCommand( parent ), mUrl( url )
{
}
@@ -628,7 +628,7 @@ KMCommand::Result KMUrlSaveCommand::execute()
{
if ( mUrl.isEmpty() )
return OK;
- KURL saveUrl = KFileDialog::getSaveURL(mUrl.fileName(), QString::null,
+ KURL saveUrl = KFileDialog::getSaveURL(mUrl.fileName(), TQString::null,
parentWidget() );
if ( saveUrl.isEmpty() )
return Canceled;
@@ -641,7 +641,7 @@ KMCommand::Result KMUrlSaveCommand::execute()
return Canceled;
}
KIO::Job *job = KIO::file_copy(mUrl, saveUrl, -1, true);
- connect(job, SIGNAL(result(KIO::Job*)), SLOT(slotUrlSaveResult(KIO::Job*)));
+ connect(job, TQT_SIGNAL(result(KIO::Job*)), TQT_SLOT(slotUrlSaveResult(KIO::Job*)));
setEmitsCompletedItself( true );
return OK;
}
@@ -660,7 +660,7 @@ void KMUrlSaveCommand::slotUrlSaveResult( KIO::Job *job )
}
-KMEditMsgCommand::KMEditMsgCommand( QWidget *parent, KMMessage *msg )
+KMEditMsgCommand::KMEditMsgCommand( TQWidget *parent, KMMessage *msg )
:KMCommand( parent, msg )
{
}
@@ -689,7 +689,7 @@ KMCommand::Result KMEditMsgCommand::execute()
return OK;
}
-KMUseTemplateCommand::KMUseTemplateCommand( QWidget *parent, KMMessage *msg )
+KMUseTemplateCommand::KMUseTemplateCommand( TQWidget *parent, KMMessage *msg )
:KMCommand( parent, msg )
{
}
@@ -717,7 +717,7 @@ KMCommand::Result KMUseTemplateCommand::execute()
return OK;
}
-KMShowMsgSrcCommand::KMShowMsgSrcCommand( QWidget *parent,
+KMShowMsgSrcCommand::KMShowMsgSrcCommand( TQWidget *parent,
KMMessage *msg, bool fixedFont )
:KMCommand( parent, msg ), mFixedFont( fixedFont )
{
@@ -733,7 +733,7 @@ KMCommand::Result KMShowMsgSrcCommand::execute()
}
if ( msg->isComplete() && !mMsgWasComplete )
msg->notify(); // notify observers as msg was transfered
- QString str = msg->codec()->toUnicode( msg->asString() );
+ TQString str = msg->codec()->toUnicode( msg->asString() );
MailSourceViewer *viewer = new MailSourceViewer(); // deletes itself upon close
viewer->setCaption( i18n("Message as Plain Text") );
@@ -741,29 +741,29 @@ KMCommand::Result KMShowMsgSrcCommand::execute()
if( mFixedFont )
viewer->setFont(KGlobalSettings::fixedFont());
- // Well, there is no widget to be seen here, so we have to use QCursor::pos()
+ // Well, there is no widget to be seen here, so we have to use TQCursor::pos()
// Update: (GS) I'm not going to make this code behave according to Xinerama
// configuration because this is quite the hack.
- if (QApplication::desktop()->isVirtualDesktop()) {
- int scnum = QApplication::desktop()->screenNumber(QCursor::pos());
- viewer->resize(QApplication::desktop()->screenGeometry(scnum).width()/2,
- 2*QApplication::desktop()->screenGeometry(scnum).height()/3);
+ if (TQApplication::desktop()->isVirtualDesktop()) {
+ int scnum = TQApplication::desktop()->screenNumber(TQCursor::pos());
+ viewer->resize(TQApplication::desktop()->screenGeometry(scnum).width()/2,
+ 2*TQApplication::desktop()->screenGeometry(scnum).height()/3);
} else {
- viewer->resize(QApplication::desktop()->geometry().width()/2,
- 2*QApplication::desktop()->geometry().height()/3);
+ viewer->resize(TQApplication::desktop()->geometry().width()/2,
+ 2*TQApplication::desktop()->geometry().height()/3);
}
viewer->show();
return OK;
}
-static KURL subjectToUrl( const QString & subject ) {
+static KURL subjectToUrl( const TQString & subject ) {
return KFileDialog::getSaveURL( subject.stripWhiteSpace()
- .replace( QDir::separator(), '_' ),
+ .replace( TQDir::separator(), '_' ),
"*.mbox" );
}
-KMSaveMsgCommand::KMSaveMsgCommand( QWidget *parent, KMMessage * msg )
+KMSaveMsgCommand::KMSaveMsgCommand( TQWidget *parent, KMMessage * msg )
: KMCommand( parent ),
mMsgListIndex( 0 ),
mStandAloneMessage( 0 ),
@@ -787,8 +787,8 @@ KMSaveMsgCommand::KMSaveMsgCommand( QWidget *parent, KMMessage * msg )
mUrl = subjectToUrl( msg->cleanSubject() );
}
-KMSaveMsgCommand::KMSaveMsgCommand( QWidget *parent,
- const QPtrList<KMMsgBase> &msgList )
+KMSaveMsgCommand::KMSaveMsgCommand( TQWidget *parent,
+ const TQPtrList<KMMsgBase> &msgList )
: KMCommand( parent ),
mMsgListIndex( 0 ),
mStandAloneMessage( 0 ),
@@ -803,7 +803,7 @@ KMSaveMsgCommand::KMSaveMsgCommand( QWidget *parent,
// We operate on serNums and not the KMMsgBase pointers, as those can
// change, or become invalid when changing the current message, switching
// folders, etc.
- QPtrListIterator<KMMsgBase> it(msgList);
+ TQPtrListIterator<KMMsgBase> it(msgList);
while ( it.current() ) {
mMsgList.append( (*it)->getMsgSerNum() );
mTotalSize += (*it)->msgSize();
@@ -826,10 +826,10 @@ KMCommand::Result KMSaveMsgCommand::execute()
mJob->slotTotalSize( mTotalSize );
mJob->setAsyncDataEnabled( true );
mJob->setReportDataSent( true );
- connect(mJob, SIGNAL(dataReq(KIO::Job*, QByteArray &)),
- SLOT(slotSaveDataReq()));
- connect(mJob, SIGNAL(result(KIO::Job*)),
- SLOT(slotSaveResult(KIO::Job*)));
+ connect(mJob, TQT_SIGNAL(dataReq(KIO::Job*, TQByteArray &)),
+ TQT_SLOT(slotSaveDataReq()));
+ connect(mJob, TQT_SIGNAL(result(KIO::Job*)),
+ TQT_SLOT(slotSaveResult(KIO::Job*)));
setEmitsCompletedItself( true );
return OK;
}
@@ -842,7 +842,7 @@ void KMSaveMsgCommand::slotSaveDataReq()
if ( remainingBytes > MAX_CHUNK_SIZE )
remainingBytes = MAX_CHUNK_SIZE;
- QByteArray data;
+ TQByteArray data;
data.duplicate( mData.data() + mOffset, remainingBytes );
mJob->sendAsyncData( data );
mOffset += remainingBytes;
@@ -861,7 +861,7 @@ void KMSaveMsgCommand::slotSaveDataReq()
if ( msg ) {
if ( msg->transferInProgress() ) {
- QByteArray data = QByteArray();
+ TQByteArray data = TQByteArray();
mJob->sendAsyncData( data );
}
msg->setTransferInProgress( true );
@@ -872,8 +872,8 @@ void KMSaveMsgCommand::slotSaveDataReq()
if ( msg->parent() && !msg->isComplete() ) {
FolderJob *job = msg->parent()->createJob( msg );
job->setCancellable( false );
- connect(job, SIGNAL( messageRetrieved( KMMessage* ) ),
- this, SLOT( slotMessageRetrievedForSaving( KMMessage* ) ) );
+ connect(job, TQT_SIGNAL( messageRetrieved( KMMessage* ) ),
+ this, TQT_SLOT( slotMessageRetrievedForSaving( KMMessage* ) ) );
job->start();
}
}
@@ -889,7 +889,7 @@ void KMSaveMsgCommand::slotSaveDataReq()
mStandAloneMessage = 0;
} else {
// No more messages. Tell the putjob we are done.
- QByteArray data = QByteArray();
+ TQByteArray data = TQByteArray();
mJob->sendAsyncData( data );
}
}
@@ -904,7 +904,7 @@ void KMSaveMsgCommand::slotMessageRetrievedForSaving(KMMessage *msg)
msg->setTransferInProgress(false);
mOffset = 0;
- QByteArray data;
+ TQByteArray data;
int size;
// Unless it is great than 64 k send the whole message. kio buffers for us.
if( mData.size() > (unsigned int) MAX_CHUNK_SIZE )
@@ -944,10 +944,10 @@ void KMSaveMsgCommand::slotSaveResult(KIO::Job *job)
mJob->slotTotalSize( mTotalSize );
mJob->setAsyncDataEnabled( true );
mJob->setReportDataSent( true );
- connect(mJob, SIGNAL(dataReq(KIO::Job*, QByteArray &)),
- SLOT(slotSaveDataReq()));
- connect(mJob, SIGNAL(result(KIO::Job*)),
- SLOT(slotSaveResult(KIO::Job*)));
+ connect(mJob, TQT_SIGNAL(dataReq(KIO::Job*, TQByteArray &)),
+ TQT_SLOT(slotSaveDataReq()));
+ connect(mJob, TQT_SIGNAL(result(KIO::Job*)),
+ TQT_SLOT(slotSaveResult(KIO::Job*)));
}
}
else
@@ -966,8 +966,8 @@ void KMSaveMsgCommand::slotSaveResult(KIO::Job *job)
//-----------------------------------------------------------------------------
-KMOpenMsgCommand::KMOpenMsgCommand( QWidget *parent, const KURL & url,
- const QString & encoding )
+KMOpenMsgCommand::KMOpenMsgCommand( TQWidget *parent, const KURL & url,
+ const TQString & encoding )
: KMCommand( parent ),
mUrl( url ),
mEncoding( encoding )
@@ -987,15 +987,15 @@ KMCommand::Result KMOpenMsgCommand::execute()
}
mJob = KIO::get( mUrl, false, false );
mJob->setReportDataSent( true );
- connect( mJob, SIGNAL( data( KIO::Job *, const QByteArray & ) ),
- this, SLOT( slotDataArrived( KIO::Job*, const QByteArray & ) ) );
- connect( mJob, SIGNAL( result( KIO::Job * ) ),
- SLOT( slotResult( KIO::Job * ) ) );
+ connect( mJob, TQT_SIGNAL( data( KIO::Job *, const TQByteArray & ) ),
+ this, TQT_SLOT( slotDataArrived( KIO::Job*, const TQByteArray & ) ) );
+ connect( mJob, TQT_SIGNAL( result( KIO::Job * ) ),
+ TQT_SLOT( slotResult( KIO::Job * ) ) );
setEmitsCompletedItself( true );
return OK;
}
-void KMOpenMsgCommand::slotDataArrived( KIO::Job *, const QByteArray & data )
+void KMOpenMsgCommand::slotDataArrived( KIO::Job *, const TQByteArray & data )
{
if ( data.isEmpty() )
return;
@@ -1075,8 +1075,8 @@ void KMOpenMsgCommand::slotResult( KIO::Job *job )
//TODO: ReplyTo, NoQuoteReplyTo, ReplyList, ReplyToAll, ReplyAuthor
// are all similar and should be factored
-KMReplyToCommand::KMReplyToCommand( QWidget *parent, KMMessage *msg,
- const QString &selection )
+KMReplyToCommand::KMReplyToCommand( TQWidget *parent, KMMessage *msg,
+ const TQString &selection )
: KMCommand( parent, msg ), mSelection( selection )
{
}
@@ -1098,7 +1098,7 @@ KMCommand::Result KMReplyToCommand::execute()
}
-KMNoQuoteReplyToCommand::KMNoQuoteReplyToCommand( QWidget *parent,
+KMNoQuoteReplyToCommand::KMNoQuoteReplyToCommand( TQWidget *parent,
KMMessage *msg )
: KMCommand( parent, msg )
{
@@ -1121,8 +1121,8 @@ KMCommand::Result KMNoQuoteReplyToCommand::execute()
}
-KMReplyListCommand::KMReplyListCommand( QWidget *parent,
- KMMessage *msg, const QString &selection )
+KMReplyListCommand::KMReplyListCommand( TQWidget *parent,
+ KMMessage *msg, const TQString &selection )
: KMCommand( parent, msg ), mSelection( selection )
{
}
@@ -1144,8 +1144,8 @@ KMCommand::Result KMReplyListCommand::execute()
}
-KMReplyToAllCommand::KMReplyToAllCommand( QWidget *parent,
- KMMessage *msg, const QString &selection )
+KMReplyToAllCommand::KMReplyToAllCommand( TQWidget *parent,
+ KMMessage *msg, const TQString &selection )
:KMCommand( parent, msg ), mSelection( selection )
{
}
@@ -1167,8 +1167,8 @@ KMCommand::Result KMReplyToAllCommand::execute()
}
-KMReplyAuthorCommand::KMReplyAuthorCommand( QWidget *parent, KMMessage *msg,
- const QString &selection )
+KMReplyAuthorCommand::KMReplyAuthorCommand( TQWidget *parent, KMMessage *msg,
+ const TQString &selection )
: KMCommand( parent, msg ), mSelection( selection )
{
}
@@ -1190,14 +1190,14 @@ KMCommand::Result KMReplyAuthorCommand::execute()
}
-KMForwardInlineCommand::KMForwardInlineCommand( QWidget *parent,
- const QPtrList<KMMsgBase> &msgList, uint identity )
+KMForwardInlineCommand::KMForwardInlineCommand( TQWidget *parent,
+ const TQPtrList<KMMsgBase> &msgList, uint identity )
: KMCommand( parent, msgList ),
mIdentity( identity )
{
}
-KMForwardInlineCommand::KMForwardInlineCommand( QWidget *parent,
+KMForwardInlineCommand::KMForwardInlineCommand( TQWidget *parent,
KMMessage *msg, uint identity )
: KMCommand( parent, msg ),
mIdentity( identity )
@@ -1206,12 +1206,12 @@ KMForwardInlineCommand::KMForwardInlineCommand( QWidget *parent,
KMCommand::Result KMForwardInlineCommand::execute()
{
- QPtrList<KMMessage> msgList = retrievedMsgs();
+ TQPtrList<KMMessage> msgList = retrievedMsgs();
if (msgList.count() >= 2) { // Multiple forward
uint id = 0;
- QPtrList<KMMessage> linklist;
+ TQPtrList<KMMessage> linklist;
for ( KMMessage *msg = msgList.first(); msg; msg = msgList.next() ) {
// set the identity
if (id == 0)
@@ -1264,23 +1264,23 @@ KMCommand::Result KMForwardInlineCommand::execute()
}
-KMForwardAttachedCommand::KMForwardAttachedCommand( QWidget *parent,
- const QPtrList<KMMsgBase> &msgList, uint identity, KMail::Composer *win )
+KMForwardAttachedCommand::KMForwardAttachedCommand( TQWidget *parent,
+ const TQPtrList<KMMsgBase> &msgList, uint identity, KMail::Composer *win )
: KMCommand( parent, msgList ), mIdentity( identity ),
- mWin( QGuardedPtr<KMail::Composer>( win ))
+ mWin( TQGuardedPtr<KMail::Composer>( win ))
{
}
-KMForwardAttachedCommand::KMForwardAttachedCommand( QWidget *parent,
+KMForwardAttachedCommand::KMForwardAttachedCommand( TQWidget *parent,
KMMessage * msg, uint identity, KMail::Composer *win )
: KMCommand( parent, msg ), mIdentity( identity ),
- mWin( QGuardedPtr< KMail::Composer >( win ))
+ mWin( TQGuardedPtr< KMail::Composer >( win ))
{
}
KMCommand::Result KMForwardAttachedCommand::execute()
{
- QPtrList<KMMessage> msgList = retrievedMsgs();
+ TQPtrList<KMMessage> msgList = retrievedMsgs();
KMMessage *fwdMsg = new KMMessage;
if (msgList.count() >= 2) {
@@ -1327,23 +1327,23 @@ KMCommand::Result KMForwardAttachedCommand::execute()
}
-KMForwardDigestCommand::KMForwardDigestCommand( QWidget *parent,
- const QPtrList<KMMsgBase> &msgList, uint identity, KMail::Composer *win )
+KMForwardDigestCommand::KMForwardDigestCommand( TQWidget *parent,
+ const TQPtrList<KMMsgBase> &msgList, uint identity, KMail::Composer *win )
: KMCommand( parent, msgList ), mIdentity( identity ),
- mWin( QGuardedPtr<KMail::Composer>( win ))
+ mWin( TQGuardedPtr<KMail::Composer>( win ))
{
}
-KMForwardDigestCommand::KMForwardDigestCommand( QWidget *parent,
+KMForwardDigestCommand::KMForwardDigestCommand( TQWidget *parent,
KMMessage * msg, uint identity, KMail::Composer *win )
: KMCommand( parent, msg ), mIdentity( identity ),
- mWin( QGuardedPtr< KMail::Composer >( win ))
+ mWin( TQGuardedPtr< KMail::Composer >( win ))
{
}
KMCommand::Result KMForwardDigestCommand::execute()
{
- QPtrList<KMMessage> msgList = retrievedMsgs();
+ TQPtrList<KMMessage> msgList = retrievedMsgs();
if ( msgList.count() < 2 )
return Undefined; // must have more than 1 for a digest
@@ -1351,7 +1351,7 @@ KMCommand::Result KMForwardDigestCommand::execute()
uint id = 0;
KMMessage *fwdMsg = new KMMessage;
KMMessagePart *msgPart = new KMMessagePart;
- QString msgPartText;
+ TQString msgPartText;
int msgCnt = 0; // incase there are some we can't forward for some reason
// dummy header initialization; initialization with the correct identity
@@ -1359,7 +1359,7 @@ KMCommand::Result KMForwardDigestCommand::execute()
fwdMsg->initHeader( id );
fwdMsg->setAutomaticFields( true );
fwdMsg->mMsg->Headers().ContentType().CreateBoundary( 1 );
- QCString boundary( fwdMsg->mMsg->Headers().ContentType().Boundary().c_str() );
+ TQCString boundary( fwdMsg->mMsg->Headers().ContentType().Boundary().c_str() );
msgPartText = i18n("\nThis is a MIME digest forward. The content of the"
" message is contained in the attachment(s).\n\n\n");
// iterate through all the messages to be forwarded
@@ -1369,14 +1369,14 @@ KMCommand::Result KMForwardDigestCommand::execute()
id = msg->headerField( "X-KMail-Identity" ).stripWhiteSpace().toUInt();
// set the part header
msgPartText += "--";
- msgPartText += QString::fromLatin1( boundary );
+ msgPartText += TQString::fromLatin1( boundary );
msgPartText += "\nContent-Type: MESSAGE/RFC822";
- msgPartText += QString( "; CHARSET=%1" ).arg( msg->charset() );
+ msgPartText += TQString( "; CHARSET=%1" ).arg( msg->charset() );
msgPartText += '\n';
DwHeaders dwh;
dwh.MessageId().CreateDefault();
- msgPartText += QString( "Content-ID: %1\n" ).arg( dwh.MessageId().AsString().c_str() );
- msgPartText += QString( "Content-Description: %1" ).arg( msg->subject() );
+ msgPartText += TQString( "Content-ID: %1\n" ).arg( dwh.MessageId().AsString().c_str() );
+ msgPartText += TQString( "Content-Description: %1" ).arg( msg->subject() );
if ( !msg->subject().contains( "(fwd)" ) )
msgPartText += " (fwd)";
msgPartText += "\n\n";
@@ -1396,17 +1396,17 @@ KMCommand::Result KMForwardDigestCommand::execute()
id = mIdentity; // use folder identity if no message had an id set
fwdMsg->initHeader( id );
msgPartText += "--";
- msgPartText += QString::fromLatin1( boundary );
+ msgPartText += TQString::fromLatin1( boundary );
msgPartText += "--\n";
- QCString tmp;
+ TQCString tmp;
msgPart->setTypeStr( "MULTIPART" );
tmp.sprintf( "Digest; boundary=\"%s\"", boundary.data() );
msgPart->setSubtypeStr( tmp );
msgPart->setName( "unnamed" );
msgPart->setCte( DwMime::kCte7bit ); // does it have to be 7bit?
- msgPart->setContentDescription( QString( "Digest of %1 messages." ).arg( msgCnt ) );
+ msgPart->setContentDescription( TQString( "Digest of %1 messages." ).arg( msgCnt ) );
// THIS HAS TO BE AFTER setCte()!!!!
- msgPart->setBodyEncoded( QCString( msgPartText.ascii() ) );
+ msgPart->setBodyEncoded( TQCString( msgPartText.ascii() ) );
KCursorSaver busy( KBusyPtr::busy() );
KMail::Composer * win = KMail::makeComposer( fwdMsg, id );
win->addAttach( msgPart );
@@ -1414,7 +1414,7 @@ KMCommand::Result KMForwardDigestCommand::execute()
return OK;
}
-KMRedirectCommand::KMRedirectCommand( QWidget *parent,
+KMRedirectCommand::KMRedirectCommand( TQWidget *parent,
KMMessage *msg )
: KMCommand( parent, msg )
{
@@ -1428,7 +1428,7 @@ KMCommand::Result KMRedirectCommand::execute()
RedirectDialog dlg( parentWidget(), "redirect", true,
kmkernel->msgSender()->sendImmediate() );
- if (dlg.exec()==QDialog::Rejected) return Failed;
+ if (dlg.exec()==TQDialog::Rejected) return Failed;
KMMessage *newMsg = msg->createRedirect( dlg.to() );
KMFilterAction::sendMDN( msg, KMime::MDN::Dispatched );
@@ -1444,9 +1444,9 @@ KMCommand::Result KMRedirectCommand::execute()
}
-KMCustomReplyToCommand::KMCustomReplyToCommand( QWidget *parent, KMMessage *msg,
- const QString &selection,
- const QString &tmpl )
+KMCustomReplyToCommand::KMCustomReplyToCommand( TQWidget *parent, KMMessage *msg,
+ const TQString &selection,
+ const TQString &tmpl )
: KMCommand( parent, msg ), mSelection( selection ), mTemplate( tmpl )
{
}
@@ -1469,9 +1469,9 @@ KMCommand::Result KMCustomReplyToCommand::execute()
}
-KMCustomReplyAllToCommand::KMCustomReplyAllToCommand( QWidget *parent, KMMessage *msg,
- const QString &selection,
- const QString &tmpl )
+KMCustomReplyAllToCommand::KMCustomReplyAllToCommand( TQWidget *parent, KMMessage *msg,
+ const TQString &selection,
+ const TQString &tmpl )
: KMCommand( parent, msg ), mSelection( selection ), mTemplate( tmpl )
{
}
@@ -1494,15 +1494,15 @@ KMCommand::Result KMCustomReplyAllToCommand::execute()
}
-KMCustomForwardCommand::KMCustomForwardCommand( QWidget *parent,
- const QPtrList<KMMsgBase> &msgList, uint identity, const QString &tmpl )
+KMCustomForwardCommand::KMCustomForwardCommand( TQWidget *parent,
+ const TQPtrList<KMMsgBase> &msgList, uint identity, const TQString &tmpl )
: KMCommand( parent, msgList ),
mIdentity( identity ), mTemplate( tmpl )
{
}
-KMCustomForwardCommand::KMCustomForwardCommand( QWidget *parent,
- KMMessage *msg, uint identity, const QString &tmpl )
+KMCustomForwardCommand::KMCustomForwardCommand( TQWidget *parent,
+ KMMessage *msg, uint identity, const TQString &tmpl )
: KMCommand( parent, msg ),
mIdentity( identity ), mTemplate( tmpl )
{
@@ -1510,12 +1510,12 @@ KMCustomForwardCommand::KMCustomForwardCommand( QWidget *parent,
KMCommand::Result KMCustomForwardCommand::execute()
{
- QPtrList<KMMessage> msgList = retrievedMsgs();
+ TQPtrList<KMMessage> msgList = retrievedMsgs();
if (msgList.count() >= 2) { // Multiple forward
uint id = 0;
- QPtrList<KMMessage> linklist;
+ TQPtrList<KMMessage> linklist;
for ( KMMessage *msg = msgList.first(); msg; msg = msgList.next() ) {
// set the identity
if (id == 0)
@@ -1567,9 +1567,9 @@ KMCommand::Result KMCustomForwardCommand::execute()
}
-KMPrintCommand::KMPrintCommand( QWidget *parent,
+KMPrintCommand::KMPrintCommand( TQWidget *parent,
KMMessage *msg, bool htmlOverride, bool htmlLoadExtOverride,
- bool useFixedFont, const QString & encoding )
+ bool useFixedFont, const TQString & encoding )
: KMCommand( parent, msg ), mHtmlOverride( htmlOverride ),
mHtmlLoadExtOverride( htmlLoadExtOverride ),
mUseFixedFont( useFixedFont ), mEncoding( encoding )
@@ -1578,7 +1578,7 @@ KMPrintCommand::KMPrintCommand( QWidget *parent,
}
-void KMPrintCommand::setOverrideFont( const QFont& font )
+void KMPrintCommand::setOverrideFont( const TQFont& font )
{
mOverrideFont = font;
}
@@ -1602,14 +1602,14 @@ KMCommand::Result KMPrintCommand::execute()
KMSetStatusCommand::KMSetStatusCommand( KMMsgStatus status,
- const QValueList<Q_UINT32> &serNums, bool toggle )
+ const TQValueList<Q_UINT32> &serNums, bool toggle )
: mStatus( status ), mSerNums( serNums ), mToggle( toggle )
{
}
KMCommand::Result KMSetStatusCommand::execute()
{
- QValueListIterator<Q_UINT32> it;
+ TQValueListIterator<Q_UINT32> it;
int idx = -1;
KMFolder *folder = 0;
bool parentStatus = false;
@@ -1627,7 +1627,7 @@ KMCommand::Result KMSetStatusCommand::execute()
parentStatus = false;
}
}
- QMap< KMFolder*, QValueList<int> > folderMap;
+ TQMap< KMFolder*, TQValueList<int> > folderMap;
for ( it = mSerNums.begin(); it != mSerNums.end(); ++it ) {
KMMsgDict::instance()->getLocation( *it, &folder, &idx );
if (folder) {
@@ -1649,19 +1649,19 @@ KMCommand::Result KMSetStatusCommand::execute()
folderMap[folder].append(idx);
}
}
- QMapIterator< KMFolder*, QValueList<int> > it2 = folderMap.begin();
+ TQMapIterator< KMFolder*, TQValueList<int> > it2 = folderMap.begin();
while ( it2 != folderMap.end() ) {
KMFolder *f = it2.key();
f->setStatus( (*it2), mStatus, mToggle );
++it2;
}
- //kapp->dcopClient()->emitDCOPSignal( "unreadCountChanged()", QByteArray() );
+ //kapp->dcopClient()->emitDCOPSignal( "unreadCountChanged()", TQByteArray() );
return OK;
}
-KMFilterCommand::KMFilterCommand( const QCString &field, const QString &value )
+KMFilterCommand::KMFilterCommand( const TQCString &field, const TQString &value )
: mField( field ), mValue( value )
{
}
@@ -1674,12 +1674,12 @@ KMCommand::Result KMFilterCommand::execute()
}
-KMFilterActionCommand::KMFilterActionCommand( QWidget *parent,
- const QPtrList<KMMsgBase> &msgList,
+KMFilterActionCommand::KMFilterActionCommand( TQWidget *parent,
+ const TQPtrList<KMMsgBase> &msgList,
KMFilter *filter )
: KMCommand( parent, msgList ), mFilter( filter )
{
- QPtrListIterator<KMMsgBase> it(msgList);
+ TQPtrListIterator<KMMsgBase> it(msgList);
while ( it.current() ) {
serNumList.append( (*it)->getMsgSerNum() );
++it;
@@ -1696,16 +1696,16 @@ KMCommand::Result KMFilterActionCommand::execute()
ProgressManager::createProgressItem ( "filter"+ProgressManager::getUniqueID(),
i18n( "Filtering messages" ) );
progressItem->setTotalItems( msgCountToFilter );
- QValueList<Q_UINT32>::const_iterator it;
+ TQValueList<Q_UINT32>::const_iterator it;
for ( it = serNumList.begin(); it != serNumList.end(); it++ ) {
Q_UINT32 serNum = *it;
int diff = msgCountToFilter - ++msgCount;
if ( diff < 10 || !( msgCount % 20 ) || msgCount <= 10 ) {
progressItem->updateProgress();
- QString statusMsg = i18n("Filtering message %1 of %2");
+ TQString statusMsg = i18n("Filtering message %1 of %2");
statusMsg = statusMsg.arg( msgCount ).arg( msgCountToFilter );
KPIM::BroadcastStatus::instance()->setStatusMsg( statusMsg );
- KApplication::kApplication()->eventLoop()->processEvents( QEventLoop::ExcludeUserInput, 50 );
+ KApplication::kApplication()->eventLoop()->processEvents( TQEventLoop::ExcludeUserInput, 50 );
}
int filterResult = kmkernel->filterMgr()->process( serNum, mFilter );
@@ -1726,7 +1726,7 @@ KMCommand::Result KMFilterActionCommand::execute()
KMMetaFilterActionCommand::KMMetaFilterActionCommand( KMFilter *filter,
KMHeaders *headers,
KMMainWidget *main )
- : QObject( main ),
+ : TQObject( main ),
mFilter( filter ), mHeaders( headers ), mMainWidget( main )
{
}
@@ -1736,7 +1736,7 @@ void KMMetaFilterActionCommand::start()
if (ActionScheduler::isEnabled() ) {
// use action scheduler
KMFilterMgr::FilterSet set = KMFilterMgr::All;
- QValueList<KMFilter*> filters;
+ TQValueList<KMFilter*> filters;
filters.append( mFilter );
ActionScheduler *scheduler = new ActionScheduler( set, filters, mHeaders );
scheduler->setAlwaysMatch( true );
@@ -1744,7 +1744,7 @@ void KMMetaFilterActionCommand::start()
int contentX, contentY;
HeaderItem *nextItem = mHeaders->prepareMove( &contentX, &contentY );
- QPtrList<KMMsgBase> msgList = *mHeaders->selectedMsgs(true);
+ TQPtrList<KMMsgBase> msgList = *mHeaders->selectedMsgs(true);
mHeaders->finalizeMove( nextItem, contentX, contentY );
for (KMMsgBase *msg = msgList.first(); msg; msg = msgList.next())
@@ -1783,7 +1783,7 @@ void FolderShortcutCommand::setAction( KAction* action )
mAction = action;
}
-KMMailingListFilterCommand::KMMailingListFilterCommand( QWidget *parent,
+KMMailingListFilterCommand::KMMailingListFilterCommand( TQWidget *parent,
KMMessage *msg )
: KMCommand( parent, msg )
{
@@ -1791,8 +1791,8 @@ KMMailingListFilterCommand::KMMailingListFilterCommand( QWidget *parent,
KMCommand::Result KMMailingListFilterCommand::execute()
{
- QCString name;
- QString value;
+ TQCString name;
+ TQString value;
KMMessage *msg = retrievedMessage();
if (!msg)
return Failed;
@@ -1807,11 +1807,11 @@ KMCommand::Result KMMailingListFilterCommand::execute()
void KMMenuCommand::folderToPopupMenu(bool move,
- QObject *receiver, KMMenuToFolder *aMenuToFolder, QPopupMenu *menu )
+ TQObject *receiver, KMMenuToFolder *aMenuToFolder, TQPopupMenu *menu )
{
while ( menu->count() )
{
- QPopupMenu *popup = menu->findItem( menu->idAt( 0 ) )->popup();
+ TQPopupMenu *popup = menu->findItem( menu->idAt( 0 ) )->popup();
if (popup)
delete popup;
else
@@ -1825,7 +1825,7 @@ void KMMenuCommand::folderToPopupMenu(bool move,
receiver, aMenuToFolder, menu );
} else {
// operate on top-level items
- QPopupMenu* subMenu = new QPopupMenu(menu);
+ TQPopupMenu* subMenu = new TQPopupMenu(menu);
makeFolderMenu( &kmkernel->folderMgr()->dir(),
move, receiver, aMenuToFolder, subMenu );
menu->insertItem( i18n( "Local Folders" ), subMenu );
@@ -1833,7 +1833,7 @@ void KMMenuCommand::folderToPopupMenu(bool move,
for (KMFolderNode *node = fdir->first(); node; node = fdir->next()) {
if (node->isDir())
continue;
- subMenu = new QPopupMenu(menu);
+ subMenu = new TQPopupMenu(menu);
makeFolderMenu( node, move, receiver, aMenuToFolder, subMenu );
menu->insertItem( node->label(), subMenu );
}
@@ -1841,7 +1841,7 @@ void KMMenuCommand::folderToPopupMenu(bool move,
for (KMFolderNode *node = fdir->first(); node; node = fdir->next()) {
if (node->isDir())
continue;
- subMenu = new QPopupMenu(menu);
+ subMenu = new TQPopupMenu(menu);
makeFolderMenu( node, move, receiver, aMenuToFolder, subMenu );
menu->insertItem( node->label(), subMenu );
}
@@ -1849,20 +1849,20 @@ void KMMenuCommand::folderToPopupMenu(bool move,
}
void KMMenuCommand::makeFolderMenu(KMFolderNode* node, bool move,
- QObject *receiver, KMMenuToFolder *aMenuToFolder, QPopupMenu *menu )
+ TQObject *receiver, KMMenuToFolder *aMenuToFolder, TQPopupMenu *menu )
{
// connect the signals
if (move)
{
- disconnect(menu, SIGNAL(activated(int)), receiver,
- SLOT(moveSelectedToFolder(int)));
- connect(menu, SIGNAL(activated(int)), receiver,
- SLOT(moveSelectedToFolder(int)));
+ disconnect(menu, TQT_SIGNAL(activated(int)), receiver,
+ TQT_SLOT(moveSelectedToFolder(int)));
+ connect(menu, TQT_SIGNAL(activated(int)), receiver,
+ TQT_SLOT(moveSelectedToFolder(int)));
} else {
- disconnect(menu, SIGNAL(activated(int)), receiver,
- SLOT(copySelectedToFolder(int)));
- connect(menu, SIGNAL(activated(int)), receiver,
- SLOT(copySelectedToFolder(int)));
+ disconnect(menu, TQT_SIGNAL(activated(int)), receiver,
+ TQT_SLOT(copySelectedToFolder(int)));
+ connect(menu, TQT_SIGNAL(activated(int)), receiver,
+ TQT_SLOT(copySelectedToFolder(int)));
}
KMFolder *folder = 0;
@@ -1893,11 +1893,11 @@ void KMMenuCommand::makeFolderMenu(KMFolderNode* node, bool move,
if (it->isDir())
continue;
KMFolder *child = static_cast<KMFolder*>(it);
- QString label = child->label();
+ TQString label = child->label();
label.replace("&","&&");
if (child->child() && child->child()->first()) {
// descend
- QPopupMenu *subMenu = new QPopupMenu(menu, "subMenu");
+ TQPopupMenu *subMenu = new TQPopupMenu(menu, "subMenu");
makeFolderMenu( child, move, receiver,
aMenuToFolder, subMenu );
menu->insertItem( label, subMenu );
@@ -1913,7 +1913,7 @@ void KMMenuCommand::makeFolderMenu(KMFolderNode* node, bool move,
KMCopyCommand::KMCopyCommand( KMFolder* destFolder,
- const QPtrList<KMMsgBase> &msgList )
+ const TQPtrList<KMMsgBase> &msgList )
:mDestFolder( destFolder ), mMsgList( msgList )
{
setDeletesItself( true );
@@ -1932,8 +1932,8 @@ KMCommand::Result KMCopyCommand::execute()
KMMessage *msg, *newMsg;
int idx = -1;
bool isMessage;
- QPtrList<KMMessage> list;
- QPtrList<KMMessage> localList;
+ TQPtrList<KMMessage> list;
+ TQPtrList<KMMessage> localList;
if (mDestFolder && mDestFolder->open("kmcommand") != 0)
{
@@ -1986,10 +1986,10 @@ KMCommand::Result KMCopyCommand::execute()
FolderJob *job = srcFolder->createJob(newMsg);
job->setCancellable( false );
mPendingJobs << job;
- connect(job, SIGNAL(messageRetrieved(KMMessage*)),
- mDestFolder, SLOT(reallyAddCopyOfMsg(KMMessage*)));
- connect( job, SIGNAL(result(KMail::FolderJob*)),
- this, SLOT(slotJobFinished(KMail::FolderJob*)) );
+ connect(job, TQT_SIGNAL(messageRetrieved(KMMessage*)),
+ mDestFolder, TQT_SLOT(reallyAddCopyOfMsg(KMMessage*)));
+ connect( job, TQT_SIGNAL(result(KMail::FolderJob*)),
+ this, TQT_SLOT(slotJobFinished(KMail::FolderJob*)) );
job->start();
} else {
// local => others
@@ -2008,17 +2008,17 @@ KMCommand::Result KMCopyCommand::execute()
bool deleteNow = false;
if (!localList.isEmpty())
{
- QValueList<int> index;
+ TQValueList<int> index;
mDestFolder->addMsg( localList, index );
- for ( QValueListIterator<int> it = index.begin(); it != index.end(); ++it ) {
+ for ( TQValueListIterator<int> it = index.begin(); it != index.end(); ++it ) {
mDestFolder->unGetMsg( *it );
}
if ( mDestFolder->folderType() == KMFolderTypeImap ) {
if ( mPendingJobs.isEmpty() ) {
// wait for the end of the copy before closing the folder
KMFolderImap *imapDestFolder = static_cast<KMFolderImap*>(mDestFolder->storage());
- connect( imapDestFolder, SIGNAL( folderComplete( KMFolderImap*, bool ) ),
- this, SLOT( slotFolderComplete( KMFolderImap*, bool ) ) );
+ connect( imapDestFolder, TQT_SIGNAL( folderComplete( KMFolderImap*, bool ) ),
+ this, TQT_SLOT( slotFolderComplete( KMFolderImap*, bool ) ) );
}
} else {
deleteNow = list.isEmpty() && mPendingJobs.isEmpty(); // we're done if there are no other mails we need to fetch
@@ -2031,8 +2031,8 @@ KMCommand::Result KMCopyCommand::execute()
{
// copy the message(s); note: the list is empty afterwards!
KMFolderImap *imapDestFolder = static_cast<KMFolderImap*>(mDestFolder->storage());
- connect( imapDestFolder, SIGNAL( folderComplete( KMFolderImap*, bool ) ),
- this, SLOT( slotFolderComplete( KMFolderImap*, bool ) ) );
+ connect( imapDestFolder, TQT_SIGNAL( folderComplete( KMFolderImap*, bool ) ),
+ this, TQT_SLOT( slotFolderComplete( KMFolderImap*, bool ) ) );
imapDestFolder->copyMsg(list);
imapDestFolder->getFolder();
}
@@ -2056,9 +2056,9 @@ void KMCopyCommand::slotJobFinished(KMail::FolderJob * job)
if ( job->error() ) {
kdDebug(5006) << k_funcinfo << "folder job failed: " << job->error() << endl;
// kill all pending jobs
- for ( QValueList<KMail::FolderJob*>::Iterator it = mPendingJobs.begin(); it != mPendingJobs.end(); ++it ) {
- disconnect( (*it), SIGNAL(result(KMail::FolderJob*)),
- this, SLOT(slotJobFinished(KMail::FolderJob*)) );
+ for ( TQValueList<KMail::FolderJob*>::Iterator it = mPendingJobs.begin(); it != mPendingJobs.end(); ++it ) {
+ disconnect( (*it), TQT_SIGNAL(result(KMail::FolderJob*)),
+ this, TQT_SLOT(slotJobFinished(KMail::FolderJob*)) );
(*it)->kill();
}
mPendingJobs.clear();
@@ -2085,10 +2085,10 @@ void KMCopyCommand::slotFolderComplete( KMFolderImap*, bool success )
KMMoveCommand::KMMoveCommand( KMFolder* destFolder,
- const QPtrList<KMMsgBase> &msgList)
+ const TQPtrList<KMMsgBase> &msgList)
: mDestFolder( destFolder ), mProgressItem( 0 )
{
- QPtrList<KMMsgBase> tmp = msgList;
+ TQPtrList<KMMsgBase> tmp = msgList;
for ( KMMsgBase *msgBase = tmp.first(); msgBase; msgBase = tmp.next() )
mSerNumList.append( msgBase->getMsgSerNum() );
}
@@ -2116,7 +2116,7 @@ KMCommand::Result KMMoveCommand::execute()
{
setEmitsCompletedItself( true );
setDeletesItself( true );
- typedef QMap< KMFolder*, QPtrList<KMMessage>* > FolderToMessageListMap;
+ typedef TQMap< KMFolder*, TQPtrList<KMMessage>* > FolderToMessageListMap;
FolderToMessageListMap folderDeleteList;
if (mDestFolder && mDestFolder->open("kmcommand") != 0) {
@@ -2131,24 +2131,24 @@ KMCommand::Result KMMoveCommand::execute()
ProgressManager::createProgressItem (
"move"+ProgressManager::getUniqueID(),
mDestFolder ? i18n( "Moving messages" ) : i18n( "Deleting messages" ) );
- connect( mProgressItem, SIGNAL( progressItemCanceled( KPIM::ProgressItem* ) ),
- this, SLOT( slotMoveCanceled() ) );
+ connect( mProgressItem, TQT_SIGNAL( progressItemCanceled( KPIM::ProgressItem* ) ),
+ this, TQT_SLOT( slotMoveCanceled() ) );
KMMessage *msg;
int rc = 0;
int index;
- QPtrList<KMMessage> list;
+ TQPtrList<KMMessage> list;
int undoId = -1;
mCompleteWithAddedMsg = false;
if (mDestFolder) {
- connect (mDestFolder, SIGNAL(msgAdded(KMFolder*, Q_UINT32)),
- this, SLOT(slotMsgAddedToDestFolder(KMFolder*, Q_UINT32)));
+ connect (mDestFolder, TQT_SIGNAL(msgAdded(KMFolder*, Q_UINT32)),
+ this, TQT_SLOT(slotMsgAddedToDestFolder(KMFolder*, Q_UINT32)));
mLostBoys = mSerNumList;
}
mProgressItem->setTotalItems( mSerNumList.count() );
- for ( QValueList<Q_UINT32>::ConstIterator it = mSerNumList.constBegin(); it != mSerNumList.constEnd(); ++it ) {
+ for ( TQValueList<Q_UINT32>::ConstIterator it = mSerNumList.constBegin(); it != mSerNumList.constEnd(); ++it ) {
KMFolder *srcFolder;
int idx = -1;
KMMsgDict::instance()->getLocation( *it, &srcFolder, &idx );
@@ -2178,11 +2178,11 @@ KMCommand::Result KMMoveCommand::execute()
* signal so we notice when all the mails should have showed up in it
* but haven't for some reason. */
KMFolderImap *imapFolder = static_cast<KMFolderImap*> ( mDestFolder->storage() );
- disconnect (imapFolder, SIGNAL(folderComplete( KMFolderImap*, bool )),
- this, SLOT(slotImapFolderCompleted( KMFolderImap*, bool )));
+ disconnect (imapFolder, TQT_SIGNAL(folderComplete( KMFolderImap*, bool )),
+ this, TQT_SLOT(slotImapFolderCompleted( KMFolderImap*, bool )));
- connect (imapFolder, SIGNAL(folderComplete( KMFolderImap*, bool )),
- this, SLOT(slotImapFolderCompleted( KMFolderImap*, bool )));
+ connect (imapFolder, TQT_SIGNAL(folderComplete( KMFolderImap*, bool )),
+ this, TQT_SLOT(slotImapFolderCompleted( KMFolderImap*, bool )));
list.append(msg);
} else {
// We are moving to a local folder.
@@ -2212,7 +2212,7 @@ KMCommand::Result KMMoveCommand::execute()
// we are really, really deleting, not just moving to trash
if (srcFolder->folderType() == KMFolderTypeImap) {
if (!folderDeleteList[srcFolder])
- folderDeleteList[srcFolder] = new QPtrList<KMMessage>;
+ folderDeleteList[srcFolder] = new TQPtrList<KMMessage>;
folderDeleteList[srcFolder]->append( msg );
} else {
srcFolder->removeMsg(idx);
@@ -2240,8 +2240,8 @@ KMCommand::Result KMMoveCommand::execute()
void KMMoveCommand::slotImapFolderCompleted(KMFolderImap* imapFolder, bool success)
{
- disconnect (imapFolder, SIGNAL(folderComplete( KMFolderImap*, bool )),
- this, SLOT(slotImapFolderCompleted( KMFolderImap*, bool )));
+ disconnect (imapFolder, TQT_SIGNAL(folderComplete( KMFolderImap*, bool )),
+ this, TQT_SLOT(slotImapFolderCompleted( KMFolderImap*, bool )));
if ( success ) {
// the folder was checked successfully but we were still called, so check
// if we are still waiting for messages to show up. If so, uidValidity
@@ -2270,8 +2270,8 @@ void KMMoveCommand::slotMsgAddedToDestFolder(KMFolder *folder, Q_UINT32 serNum)
mLostBoys.remove(serNum);
if ( mLostBoys.isEmpty() ) {
// we are done. All messages transferred to the host succesfully
- disconnect (mDestFolder, SIGNAL(msgAdded(KMFolder*, Q_UINT32)),
- this, SLOT(slotMsgAddedToDestFolder(KMFolder*, Q_UINT32)));
+ disconnect (mDestFolder, TQT_SIGNAL(msgAdded(KMFolder*, Q_UINT32)),
+ this, TQT_SLOT(slotMsgAddedToDestFolder(KMFolder*, Q_UINT32)));
if (mDestFolder && mDestFolder->folderType() != KMFolderTypeImap) {
mDestFolder->sync();
}
@@ -2311,7 +2311,7 @@ void KMMoveCommand::slotMoveCanceled()
// srcFolder doesn't make much sense for searchFolders
KMDeleteMsgCommand::KMDeleteMsgCommand( KMFolder* srcFolder,
- const QPtrList<KMMsgBase> &msgList )
+ const TQPtrList<KMMsgBase> &msgList )
:KMMoveCommand( findTrashFolder( srcFolder ), msgList)
{
srcFolder->open("kmcommand");
@@ -2368,9 +2368,9 @@ KMCommand::Result KMUrlClickedCommand::execute()
msg->initHeader(mIdentity);
msg->setCharset("utf-8");
msg->setTo( KMMessage::decodeMailtoUrl( mUrl.path() ) );
- QString query=mUrl.query();
+ TQString query=mUrl.query();
while (!query.isEmpty()) {
- QString queryPart;
+ TQString queryPart;
int secondQuery = query.find('?',1);
if (secondQuery != -1)
queryPart = query.left(secondQuery);
@@ -2411,7 +2411,7 @@ KMCommand::Result KMUrlClickedCommand::execute()
mime->name() == "application/x-shellscript" )
{
if (KMessageBox::warningYesNo( 0, i18n( "<qt>Do you really want to execute <b>%1</b>?</qt>" )
- .arg( mUrl.prettyURL() ), QString::null, i18n("Execute"), KStdGuiItem::cancel() ) != KMessageBox::Yes)
+ .arg( mUrl.prettyURL() ), TQString::null, i18n("Execute"), KStdGuiItem::cancel() ) != KMessageBox::Yes)
return Canceled;
}
KRun * runner = new KRun( mUrl );
@@ -2423,21 +2423,21 @@ KMCommand::Result KMUrlClickedCommand::execute()
return OK;
}
-KMSaveAttachmentsCommand::KMSaveAttachmentsCommand( QWidget *parent, KMMessage *msg )
+KMSaveAttachmentsCommand::KMSaveAttachmentsCommand( TQWidget *parent, KMMessage *msg )
: KMCommand( parent, msg ), mImplicitAttachments( true ), mEncoded( false )
{
}
-KMSaveAttachmentsCommand::KMSaveAttachmentsCommand( QWidget *parent, const QPtrList<KMMsgBase>& msgs )
+KMSaveAttachmentsCommand::KMSaveAttachmentsCommand( TQWidget *parent, const TQPtrList<KMMsgBase>& msgs )
: KMCommand( parent, msgs ), mImplicitAttachments( true ), mEncoded( false )
{
}
-KMSaveAttachmentsCommand::KMSaveAttachmentsCommand( QWidget *parent, QPtrList<partNode>& attachments,
+KMSaveAttachmentsCommand::KMSaveAttachmentsCommand( TQWidget *parent, TQPtrList<partNode>& attachments,
KMMessage *msg, bool encoded )
: KMCommand( parent ), mImplicitAttachments( false ), mEncoded( encoded )
{
- for ( QPtrListIterator<partNode> it( attachments ); it.current(); ++it ) {
+ for ( TQPtrListIterator<partNode> it( attachments ); it.current(); ++it ) {
mAttachmentMap.insert( it.current(), msg );
}
}
@@ -2446,9 +2446,9 @@ KMCommand::Result KMSaveAttachmentsCommand::execute()
{
setEmitsCompletedItself( true );
if ( mImplicitAttachments ) {
- QPtrList<KMMessage> msgList = retrievedMsgs();
+ TQPtrList<KMMessage> msgList = retrievedMsgs();
KMMessage *msg;
- for ( QPtrListIterator<KMMessage> itr( msgList );
+ for ( TQPtrListIterator<KMMessage> itr( msgList );
( msg = itr.current() );
++itr ) {
partNode *rootNode = partNode::fromMessage( msg );
@@ -2464,8 +2464,8 @@ KMCommand::Result KMSaveAttachmentsCommand::execute()
setDeletesItself( true );
// load all parts
KMLoadPartsCommand *command = new KMLoadPartsCommand( mAttachmentMap );
- connect( command, SIGNAL( partsRetrieved() ),
- this, SLOT( slotSaveAll() ) );
+ connect( command, TQT_SIGNAL( partsRetrieved() ),
+ this, TQT_SLOT( slotSaveAll() ) );
command->start();
return OK;
@@ -2504,7 +2504,7 @@ void KMSaveAttachmentsCommand::slotSaveAll()
KURL url, dirUrl;
if ( mAttachmentMap.count() > 1 ) {
// get the dir
- dirUrl = KDirSelectDialog::selectDirectory( QString::null, false,
+ dirUrl = KDirSelectDialog::selectDirectory( TQString::null, false,
parentWidget(),
i18n("Save Attachments To") );
if ( !dirUrl.isValid() ) {
@@ -2521,14 +2521,14 @@ void KMSaveAttachmentsCommand::slotSaveAll()
// only one item, get the desired filename
partNode *node = mAttachmentMap.begin().key();
// replace all ':' with '_' because ':' isn't allowed on FAT volumes
- QString s =
+ TQString s =
node->msgPart().fileName().stripWhiteSpace().replace( ':', '_' );
if ( s.isEmpty() )
s = node->msgPart().name().stripWhiteSpace().replace( ':', '_' );
if ( s.isEmpty() )
s = i18n("filename for an unnamed attachment", "attachment.1");
- url = KFileDialog::getSaveURL( s, QString::null, parentWidget(),
- QString::null );
+ url = KFileDialog::getSaveURL( s, TQString::null, parentWidget(),
+ TQString::null );
if ( url.isEmpty() ) {
setResult( Canceled );
emit completed( this );
@@ -2537,7 +2537,7 @@ void KMSaveAttachmentsCommand::slotSaveAll()
}
}
- QMap< QString, int > renameNumbering;
+ TQMap< TQString, int > renameNumbering;
Result globalResult = OK;
int unnamedAtmCount = 0;
@@ -2547,7 +2547,7 @@ void KMSaveAttachmentsCommand::slotSaveAll()
KURL curUrl;
if ( !dirUrl.isEmpty() ) {
curUrl = dirUrl;
- QString s =
+ TQString s =
it.key()->msgPart().fileName().stripWhiteSpace().replace( ':', '_' );
if ( s.isEmpty() )
s = it.key()->msgPart().name().stripWhiteSpace().replace( ':', '_' );
@@ -2566,14 +2566,14 @@ void KMSaveAttachmentsCommand::slotSaveAll()
// Rename the file if we have already saved one with the same name:
// try appending a number before extension (e.g. "pic.jpg" => "pic_2.jpg")
- QString origFile = curUrl.fileName();
- QString file = origFile;
+ TQString origFile = curUrl.fileName();
+ TQString file = origFile;
while ( renameNumbering.contains(file) ) {
file = origFile;
int num = renameNumbering[file] + 1;
int dotIdx = file.findRev('.');
- file = file.insert( (dotIdx>=0) ? dotIdx : file.length(), QString("_") + QString::number(num) );
+ file = file.insert( (dotIdx>=0) ? dotIdx : file.length(), TQString("_") + TQString::number(num) );
}
curUrl.setFileName(file);
@@ -2632,7 +2632,7 @@ KMCommand::Result KMSaveAttachmentsCommand::saveItem( partNode *node,
KMessageBox::Yes )
bSaveWithSig = false;
- QByteArray data;
+ TQByteArray data;
if ( mEncoded )
{
// This does not decode the Message Content-Transfer-Encoding
@@ -2643,7 +2643,7 @@ KMCommand::Result KMSaveAttachmentsCommand::saveItem( partNode *node,
{
if( bSaveEncrypted || !bEncryptedParts) {
partNode *dataNode = node;
- QCString rawReplyString;
+ TQCString rawReplyString;
bool gotRawReplyString = false;
if( !bSaveWithSig ) {
if( DwMime::kTypeMultipart == node->type() &&
@@ -2677,7 +2677,7 @@ KMCommand::Result KMSaveAttachmentsCommand::saveItem( partNode *node,
gotRawReplyString = true;
}
}
- QByteArray cstr = gotRawReplyString
+ TQByteArray cstr = gotRawReplyString
? rawReplyString
: dataNode->msgPart().bodyDecodedBinary();
data = cstr;
@@ -2689,8 +2689,8 @@ KMCommand::Result KMSaveAttachmentsCommand::saveItem( partNode *node,
data.resize( size );
}
}
- QDataStream ds;
- QFile file;
+ TQDataStream ds;
+ TQFile file;
KTempFile tf;
tf.setAutoDelete( true );
if ( url.isLocalFile() )
@@ -2703,7 +2703,7 @@ KMCommand::Result KMSaveAttachmentsCommand::saveItem( partNode *node,
i18n( "%2 is detailed error description",
"Could not write the file %1:\n%2" )
.arg( file.name() )
- .arg( QString::fromLocal8Bit( strerror( errno ) ) ),
+ .arg( TQString::fromLocal8Bit( strerror( errno ) ) ),
i18n( "KMail Error" ) );
return Failed;
}
@@ -2736,10 +2736,10 @@ KMCommand::Result KMSaveAttachmentsCommand::saveItem( partNode *node,
return OK;
}
-KMLoadPartsCommand::KMLoadPartsCommand( QPtrList<partNode>& parts, KMMessage *msg )
+KMLoadPartsCommand::KMLoadPartsCommand( TQPtrList<partNode>& parts, KMMessage *msg )
: mNeedsRetrieval( 0 )
{
- for ( QPtrListIterator<partNode> it( parts ); it.current(); ++it ) {
+ for ( TQPtrListIterator<partNode> it( parts ); it.current(); ++it ) {
mPartMap.insert( it.current(), msg );
}
}
@@ -2770,8 +2770,8 @@ void KMLoadPartsCommand::slotStart()
curFolder->createJob( it.data(), FolderJob::tGetMessage,
0, it.key()->msgPart().partSpecifier() );
job->setCancellable( false );
- connect( job, SIGNAL(messageUpdated(KMMessage*, QString)),
- this, SLOT(slotPartRetrieved(KMMessage*, QString)) );
+ connect( job, TQT_SIGNAL(messageUpdated(KMMessage*, TQString)),
+ this, TQT_SLOT(slotPartRetrieved(KMMessage*, TQString)) );
job->start();
} else
kdWarning(5006) << "KMLoadPartsCommand - msg has no parent" << endl;
@@ -2782,7 +2782,7 @@ void KMLoadPartsCommand::slotStart()
}
void KMLoadPartsCommand::slotPartRetrieved( KMMessage *msg,
- QString partSpecifier )
+ TQString partSpecifier )
{
DwBodyPart *part =
msg->findDwBodyPart( msg->getFirstDwBodyPart(), partSpecifier );
@@ -2810,7 +2810,7 @@ KMCommand::Result KMLoadPartsCommand::execute()
return OK;
}
-KMResendMessageCommand::KMResendMessageCommand( QWidget *parent,
+KMResendMessageCommand::KMResendMessageCommand( TQWidget *parent,
KMMessage *msg )
:KMCommand( parent, msg )
{
@@ -2824,7 +2824,7 @@ KMCommand::Result KMResendMessageCommand::execute()
}
KMMessage *newMsg = new KMMessage(*msg);
- QStringList whiteList;
+ TQStringList whiteList;
whiteList << "To" << "Cc" << "Bcc" << "Subject";
newMsg->sanitizeHeaders( whiteList );
@@ -2832,7 +2832,7 @@ KMCommand::Result KMResendMessageCommand::execute()
newMsg->setParent( 0 );
// make sure we have an identity set, default, if necessary
- newMsg->setHeaderField("X-KMail-Identity", QString::number( newMsg->identityUoid() ));
+ newMsg->setHeaderField("X-KMail-Identity", TQString::number( newMsg->identityUoid() ));
newMsg->applyIdentity( newMsg->identityUoid() );
KMail::Composer * win = KMail::makeComposer();
@@ -2842,7 +2842,7 @@ KMCommand::Result KMResendMessageCommand::execute()
return OK;
}
-KMMailingListCommand::KMMailingListCommand( QWidget *parent, KMFolder *folder )
+KMMailingListCommand::KMMailingListCommand( TQWidget *parent, KMFolder *folder )
: KMCommand( parent ), mFolder( folder )
{
}
@@ -2850,7 +2850,7 @@ KMMailingListCommand::KMMailingListCommand( QWidget *parent, KMFolder *folder )
KMCommand::Result KMMailingListCommand::execute()
{
KURL::List lst = urls();
- QString handler = ( mFolder->mailingList().handler() == MailingList::KMail )
+ TQString handler = ( mFolder->mailingList().handler() == MailingList::KMail )
? "mailto" : "https";
KMCommand *command = 0;
@@ -2864,8 +2864,8 @@ KMCommand::Result KMMailingListCommand::execute()
new KMUrlClickedCommand( lst.first(), mFolder->identity(), 0, false );
}
if ( command ) {
- connect( command, SIGNAL( completed( KMCommand * ) ),
- this, SLOT( commandCompleted( KMCommand * ) ) );
+ connect( command, TQT_SIGNAL( completed( KMCommand * ) ),
+ this, TQT_SLOT( commandCompleted( KMCommand * ) ) );
setDeletesItself( true );
setEmitsCompletedItself( true );
command->start();
@@ -2881,7 +2881,7 @@ void KMMailingListCommand::commandCompleted( KMCommand *command )
deleteLater();
}
-KMMailingListPostCommand::KMMailingListPostCommand( QWidget *parent, KMFolder *folder )
+KMMailingListPostCommand::KMMailingListPostCommand( TQWidget *parent, KMFolder *folder )
: KMMailingListCommand( parent, folder )
{
}
@@ -2890,7 +2890,7 @@ KURL::List KMMailingListPostCommand::urls() const
return mFolder->mailingList().postURLS();
}
-KMMailingListSubscribeCommand::KMMailingListSubscribeCommand( QWidget *parent, KMFolder *folder )
+KMMailingListSubscribeCommand::KMMailingListSubscribeCommand( TQWidget *parent, KMFolder *folder )
: KMMailingListCommand( parent, folder )
{
}
@@ -2899,7 +2899,7 @@ KURL::List KMMailingListSubscribeCommand::urls() const
return mFolder->mailingList().subscribeURLS();
}
-KMMailingListUnsubscribeCommand::KMMailingListUnsubscribeCommand( QWidget *parent, KMFolder *folder )
+KMMailingListUnsubscribeCommand::KMMailingListUnsubscribeCommand( TQWidget *parent, KMFolder *folder )
: KMMailingListCommand( parent, folder )
{
}
@@ -2908,7 +2908,7 @@ KURL::List KMMailingListUnsubscribeCommand::urls() const
return mFolder->mailingList().unsubscribeURLS();
}
-KMMailingListArchivesCommand::KMMailingListArchivesCommand( QWidget *parent, KMFolder *folder )
+KMMailingListArchivesCommand::KMMailingListArchivesCommand( TQWidget *parent, KMFolder *folder )
: KMMailingListCommand( parent, folder )
{
}
@@ -2917,7 +2917,7 @@ KURL::List KMMailingListArchivesCommand::urls() const
return mFolder->mailingList().archiveURLS();
}
-KMMailingListHelpCommand::KMMailingListHelpCommand( QWidget *parent, KMFolder *folder )
+KMMailingListHelpCommand::KMMailingListHelpCommand( TQWidget *parent, KMFolder *folder )
: KMMailingListCommand( parent, folder )
{
}
@@ -2934,7 +2934,7 @@ KMIMChatCommand::KMIMChatCommand( const KURL &url, KMMessage *msg )
KMCommand::Result KMIMChatCommand::execute()
{
kdDebug( 5006 ) << k_funcinfo << " URL is: " << mUrl << endl;
- QString addr = KMMessage::decodeMailtoUrl( mUrl.path() );
+ TQString addr = KMMessage::decodeMailtoUrl( mUrl.path() );
// find UID for mail address
KABC::AddressBook *addressBook = KABC::StdAddressBook::self( true );
KABC::AddresseeList addressees = addressBook->findByEmail( KPIM::getEmailAddress( addr ) ) ;
@@ -2948,20 +2948,20 @@ KMCommand::Result KMIMChatCommand::execute()
{
kdDebug( 5006 ) << "Didn't find exactly one addressee, couldn't tell who to chat to for that email address. Count = " << addressees.count() << endl;
- QString apology;
+ TQString apology;
if ( addressees.isEmpty() )
apology = i18n( "There is no Address Book entry for this email address. Add them to the Address Book and then add instant messaging addresses using your preferred messaging client." );
else
{
apology = i18n( "More than one Address Book entry uses this email address:\n %1\n it is not possible to determine who to chat with." );
- QStringList nameList;
+ TQStringList nameList;
KABC::AddresseeList::const_iterator it = addressees.begin();
KABC::AddresseeList::const_iterator end = addressees.end();
for ( ; it != end; ++it )
{
nameList.append( (*it).realName() );
}
- QString names = nameList.join( QString::fromLatin1( ",\n" ) );
+ TQString names = nameList.join( TQString::fromLatin1( ",\n" ) );
apology = apology.arg( names );
}
@@ -2971,8 +2971,8 @@ KMCommand::Result KMIMChatCommand::execute()
}
KMHandleAttachmentCommand::KMHandleAttachmentCommand( partNode* node,
- KMMessage* msg, int atmId, const QString& atmName,
- AttachmentAction action, KService::Ptr offer, QWidget* parent )
+ KMMessage* msg, int atmId, const TQString& atmName,
+ AttachmentAction action, KService::Ptr offer, TQWidget* parent )
: KMCommand( parent ), mNode( node ), mMsg( msg ), mAtmId( atmId ), mAtmName( atmName ),
mAction( action ), mOffer( offer ), mJob( 0 )
{
@@ -2985,8 +2985,8 @@ void KMHandleAttachmentCommand::slotStart()
// load the part
kdDebug(5006) << "load part" << endl;
KMLoadPartsCommand *command = new KMLoadPartsCommand( mNode, mMsg );
- connect( command, SIGNAL( partsRetrieved() ),
- this, SLOT( slotPartComplete() ) );
+ connect( command, TQT_SIGNAL( partsRetrieved() ),
+ this, TQT_SLOT( slotPartComplete() ) );
command->start();
} else
{
@@ -3032,15 +3032,15 @@ KMCommand::Result KMHandleAttachmentCommand::execute()
return OK;
}
-QString KMHandleAttachmentCommand::createAtmFileLink() const
+TQString KMHandleAttachmentCommand::createAtmFileLink() const
{
- QFileInfo atmFileInfo( mAtmName );
+ TQFileInfo atmFileInfo( mAtmName );
if ( atmFileInfo.size() == 0 )
{
kdDebug(5006) << k_funcinfo << "rewriting attachment" << endl;
// there is something wrong so write the file again
- QByteArray data = mNode->msgPart().bodyDecodedBinary();
+ TQByteArray data = mNode->msgPart().bodyDecodedBinary();
size_t size = data.size();
if ( mNode->msgPart().type() == DwMime::kTypeText && size) {
// convert CRLF to LF before writing text attachments to disk
@@ -3053,19 +3053,19 @@ QString KMHandleAttachmentCommand::createAtmFileLink() const
"]."+ atmFileInfo.extension() );
linkFile->setAutoDelete(true);
- QString linkName = linkFile->name();
+ TQString linkName = linkFile->name();
delete linkFile;
- if ( ::link(QFile::encodeName( mAtmName ), QFile::encodeName( linkName )) == 0 ) {
+ if ( ::link(TQFile::encodeName( mAtmName ), TQFile::encodeName( linkName )) == 0 ) {
return linkName; // success
}
- return QString::null;
+ return TQString::null;
}
KService::Ptr KMHandleAttachmentCommand::getServiceOffer()
{
KMMessagePart& msgPart = mNode->msgPart();
- const QString contentTypeStr =
+ const TQString contentTypeStr =
( msgPart.typeStr() + '/' + msgPart.subtypeStr() ).lower();
if ( contentTypeStr == "text/x-vcard" ) {
@@ -3101,7 +3101,7 @@ void KMHandleAttachmentCommand::atmOpen()
KURL::List lst;
KURL url;
bool autoDelete = true;
- QString fname = createAtmFileLink();
+ TQString fname = createAtmFileLink();
if ( fname.isNull() ) {
autoDelete = false;
@@ -3111,7 +3111,7 @@ void KMHandleAttachmentCommand::atmOpen()
url.setPath( fname );
lst.append( url );
if ( (KRun::run( *mOffer, lst, autoDelete ) <= 0) && autoDelete ) {
- QFile::remove(url.path());
+ TQFile::remove(url.path());
}
}
@@ -3120,7 +3120,7 @@ void KMHandleAttachmentCommand::atmOpenWith()
KURL::List lst;
KURL url;
bool autoDelete = true;
- QString fname = createAtmFileLink();
+ TQString fname = createAtmFileLink();
if ( fname.isNull() ) {
autoDelete = false;
@@ -3130,7 +3130,7 @@ void KMHandleAttachmentCommand::atmOpenWith()
url.setPath( fname );
lst.append( url );
if ( (! KRun::displayOpenWithDialog(lst, autoDelete)) && autoDelete ) {
- QFile::remove( url.path() );
+ TQFile::remove( url.path() );
}
}
@@ -3142,7 +3142,7 @@ void KMHandleAttachmentCommand::atmView()
void KMHandleAttachmentCommand::atmSave()
{
- QPtrList<partNode> parts;
+ TQPtrList<partNode> parts;
parts.append( mNode );
// save, do not leave encoded
KMSaveAttachmentsCommand *command =
@@ -3175,9 +3175,9 @@ void KMHandleAttachmentCommand::atmEncryptWithChiasmus()
if ( !chiasmus )
return;
- const STD_NAMESPACE_PREFIX auto_ptr<Kleo::SpecialJob> listjob( chiasmus->specialJob( "x-obtain-keys", QMap<QString,QVariant>() ) );
+ const STD_NAMESPACE_PREFIX auto_ptr<Kleo::SpecialJob> listjob( chiasmus->specialJob( "x-obtain-keys", TQMap<TQString,TQVariant>() ) );
if ( !listjob.get() ) {
- const QString msg = i18n( "Chiasmus backend does not offer the "
+ const TQString msg = i18n( "Chiasmus backend does not offer the "
"\"x-obtain-keys\" function. Please report this bug." );
KMessageBox::error( parentWidget(), msg, i18n( "Chiasmus Backend Error" ) );
return;
@@ -3188,18 +3188,18 @@ void KMHandleAttachmentCommand::atmEncryptWithChiasmus()
return;
}
- const QVariant result = listjob->property( "result" );
- if ( result.type() != QVariant::StringList ) {
- const QString msg = i18n( "Unexpected return value from Chiasmus backend: "
+ const TQVariant result = listjob->property( "result" );
+ if ( result.type() != TQVariant::StringList ) {
+ const TQString msg = i18n( "Unexpected return value from Chiasmus backend: "
"The \"x-obtain-keys\" function did not return a "
"string list. Please report this bug." );
KMessageBox::error( parentWidget(), msg, i18n( "Chiasmus Backend Error" ) );
return;
}
- const QStringList keys = result.toStringList();
+ const TQStringList keys = result.toStringList();
if ( keys.empty() ) {
- const QString msg = i18n( "No keys have been found. Please check that a "
+ const TQString msg = i18n( "No keys have been found. Please check that a "
"valid key path has been set in the Chiasmus "
"configuration." );
KMessageBox::error( parentWidget(), msg, i18n( "Chiasmus Backend Error" ) );
@@ -3209,27 +3209,27 @@ void KMHandleAttachmentCommand::atmEncryptWithChiasmus()
ChiasmusKeySelector selectorDlg( parentWidget(), i18n( "Chiasmus Decryption Key Selection" ),
keys, GlobalSettings::chiasmusDecryptionKey(),
GlobalSettings::chiasmusDecryptionOptions() );
- if ( selectorDlg.exec() != QDialog::Accepted )
+ if ( selectorDlg.exec() != TQDialog::Accepted )
return;
GlobalSettings::setChiasmusDecryptionOptions( selectorDlg.options() );
GlobalSettings::setChiasmusDecryptionKey( selectorDlg.key() );
assert( !GlobalSettings::chiasmusDecryptionKey().isEmpty() );
- Kleo::SpecialJob * job = chiasmus->specialJob( "x-decrypt", QMap<QString,QVariant>() );
+ Kleo::SpecialJob * job = chiasmus->specialJob( "x-decrypt", TQMap<TQString,TQVariant>() );
if ( !job ) {
- const QString msg = i18n( "Chiasmus backend does not offer the "
+ const TQString msg = i18n( "Chiasmus backend does not offer the "
"\"x-decrypt\" function. Please report this bug." );
KMessageBox::error( parentWidget(), msg, i18n( "Chiasmus Backend Error" ) );
return;
}
- const QByteArray input = node->msgPart().bodyDecodedBinary();
+ const TQByteArray input = node->msgPart().bodyDecodedBinary();
if ( !job->setProperty( "key", GlobalSettings::chiasmusDecryptionKey() ) ||
!job->setProperty( "options", GlobalSettings::chiasmusDecryptionOptions() ) ||
!job->setProperty( "input", input ) ) {
- const QString msg = i18n( "The \"x-decrypt\" function does not accept "
+ const TQString msg = i18n( "The \"x-decrypt\" function does not accept "
"the expected parameters. Please report this bug." );
KMessageBox::error( parentWidget(), msg, i18n( "Chiasmus Backend Error" ) );
return;
@@ -3242,15 +3242,15 @@ void KMHandleAttachmentCommand::atmEncryptWithChiasmus()
}
mJob = job;
- connect( job, SIGNAL(result(const GpgME::Error&,const QVariant&)),
- this, SLOT(slotAtmDecryptWithChiasmusResult(const GpgME::Error&,const QVariant&)) );
+ connect( job, TQT_SIGNAL(result(const GpgME::Error&,const TQVariant&)),
+ this, TQT_SLOT(slotAtmDecryptWithChiasmusResult(const GpgME::Error&,const TQVariant&)) );
}
-static const QString chomp( const QString & base, const QString & suffix, bool cs ) {
+static const TQString chomp( const TQString & base, const TQString & suffix, bool cs ) {
return base.endsWith( suffix, cs ) ? base.left( base.length() - suffix.length() ) : base ;
}
-void KMHandleAttachmentCommand::slotAtmDecryptWithChiasmusResult( const GpgME::Error & err, const QVariant & result )
+void KMHandleAttachmentCommand::slotAtmDecryptWithChiasmusResult( const GpgME::Error & err, const TQVariant & result )
{
LaterDeleterWithCommandCompletion d( this );
if ( !mJob )
@@ -3267,15 +3267,15 @@ void KMHandleAttachmentCommand::slotAtmDecryptWithChiasmusResult( const GpgME::E
return;
}
- if ( result.type() != QVariant::ByteArray ) {
- const QString msg = i18n( "Unexpected return value from Chiasmus backend: "
+ if ( result.type() != TQVariant::ByteArray ) {
+ const TQString msg = i18n( "Unexpected return value from Chiasmus backend: "
"The \"x-decrypt\" function did not return a "
"byte array. Please report this bug." );
KMessageBox::error( parentWidget(), msg, i18n( "Chiasmus Backend Error" ) );
return;
}
- const KURL url = KFileDialog::getSaveURL( chomp( mAtmName, ".xia", false ), QString::null, parentWidget() );
+ const KURL url = KFileDialog::getSaveURL( chomp( mAtmName, ".xia", false ), TQString::null, parentWidget() );
if ( url.isEmpty() )
return;
@@ -3286,8 +3286,8 @@ void KMHandleAttachmentCommand::slotAtmDecryptWithChiasmusResult( const GpgME::E
d.setDisabled( true ); // we got this far, don't delete yet
KIO::Job * uploadJob = KIO::storedPut( result.toByteArray(), url, -1, overwrite, false /*resume*/ );
uploadJob->setWindow( parentWidget() );
- connect( uploadJob, SIGNAL(result(KIO::Job*)),
- this, SLOT(slotAtmDecryptWithChiasmusUploadResult(KIO::Job*)) );
+ connect( uploadJob, TQT_SIGNAL(result(KIO::Job*)),
+ this, TQT_SLOT(slotAtmDecryptWithChiasmusUploadResult(KIO::Job*)) );
}
void KMHandleAttachmentCommand::slotAtmDecryptWithChiasmusUploadResult( KIO::Job * job )
@@ -3299,7 +3299,7 @@ void KMHandleAttachmentCommand::slotAtmDecryptWithChiasmusUploadResult( KIO::Job
}
-AttachmentModifyCommand::AttachmentModifyCommand(partNode * node, KMMessage * msg, QWidget * parent) :
+AttachmentModifyCommand::AttachmentModifyCommand(partNode * node, KMMessage * msg, TQWidget * parent) :
KMCommand( parent, msg ),
mPartIndex( node->nodeId() ),
mSernum( 0 )
@@ -3341,8 +3341,8 @@ void AttachmentModifyCommand::storeChangedMessage(KMMessage * msg)
int res = mFolder->addMsg( msg ) != 0;
if ( mFolder->folderType() == KMFolderTypeImap ) {
KMFolderImap *f = static_cast<KMFolderImap*>( mFolder->storage() );
- connect( f, SIGNAL(folderComplete(KMFolderImap*,bool)),
- SLOT(messageStoreResult(KMFolderImap*,bool)) );
+ connect( f, TQT_SIGNAL(folderComplete(KMFolderImap*,bool)),
+ TQT_SLOT(messageStoreResult(KMFolderImap*,bool)) );
} else {
messageStoreResult( 0, res == 0 );
}
@@ -3353,7 +3353,7 @@ void AttachmentModifyCommand::messageStoreResult(KMFolderImap* folder, bool succ
Q_UNUSED( folder );
if ( success ) {
KMCommand *delCmd = new KMDeleteMsgCommand( mSernum );
- connect( delCmd, SIGNAL(completed(KMCommand*)), SLOT(messageDeleteResult(KMCommand*)) );
+ connect( delCmd, TQT_SIGNAL(completed(KMCommand*)), TQT_SLOT(messageDeleteResult(KMCommand*)) );
delCmd->start();
return;
}
@@ -3393,7 +3393,7 @@ DwBodyPart * AttachmentModifyCommand::findPartInternal(DwEntity * root, int inde
}
-KMDeleteAttachmentCommand::KMDeleteAttachmentCommand(partNode * node, KMMessage * msg, QWidget * parent) :
+KMDeleteAttachmentCommand::KMDeleteAttachmentCommand(partNode * node, KMMessage * msg, TQWidget * parent) :
AttachmentModifyCommand( node, msg, parent )
{
kdDebug(5006) << k_funcinfo << endl;
@@ -3423,12 +3423,12 @@ KMCommand::Result KMDeleteAttachmentCommand::doAttachmentModify()
// add dummy part to show that a attachment has been deleted
KMMessagePart dummyPart;
dummyPart.duplicate( part );
- QString comment = i18n("This attachment has been deleted.");
+ TQString comment = i18n("This attachment has been deleted.");
if ( !part.fileName().isEmpty() )
comment = i18n( "The attachment '%1' has been deleted." ).arg( part.fileName() );
dummyPart.setContentDescription( comment );
- dummyPart.setBodyEncodedBinary( QByteArray() );
- QCString cd = dummyPart.contentDisposition();
+ dummyPart.setBodyEncodedBinary( TQByteArray() );
+ TQCString cd = dummyPart.contentDisposition();
if ( cd.find( "inline", 0, false ) == 0 ) {
cd.replace( 0, 10, "attachment" );
dummyPart.setContentDisposition( cd );
@@ -3448,7 +3448,7 @@ KMCommand::Result KMDeleteAttachmentCommand::doAttachmentModify()
}
-KMEditAttachmentCommand::KMEditAttachmentCommand(partNode * node, KMMessage * msg, QWidget * parent) :
+KMEditAttachmentCommand::KMEditAttachmentCommand(partNode * node, KMMessage * msg, TQWidget * parent) :
AttachmentModifyCommand( node, msg, parent )
{
kdDebug(5006) << k_funcinfo << endl;
@@ -3477,7 +3477,7 @@ KMCommand::Result KMEditAttachmentCommand::doAttachmentModify()
mTempFile.file()->flush();
KMail::EditorWatcher *watcher = new KMail::EditorWatcher( KURL(mTempFile.file()->name()), part.typeStr() + "/" + part.subtypeStr(), false, this );
- connect( watcher, SIGNAL(editDone(KMail::EditorWatcher*)), SLOT(editDone(KMail::EditorWatcher*)) );
+ connect( watcher, TQT_SIGNAL(editDone(KMail::EditorWatcher*)), TQT_SLOT(editDone(KMail::EditorWatcher*)) );
if ( !watcher->start() )
return Failed;
setEmitsCompletedItself( true );
@@ -3497,7 +3497,7 @@ void KMEditAttachmentCommand::editDone(KMail::EditorWatcher * watcher)
}
mTempFile.file()->reset();
- QByteArray data = mTempFile.file()->readAll();
+ TQByteArray data = mTempFile.file()->readAll();
// build the new message
KMMessage *msg = retrievedMessage();
@@ -3525,7 +3525,7 @@ void KMEditAttachmentCommand::editDone(KMail::EditorWatcher * watcher)
}
-CreateTodoCommand::CreateTodoCommand(QWidget * parent, KMMessage * msg)
+CreateTodoCommand::CreateTodoCommand(TQWidget * parent, KMMessage * msg)
: KMCommand( parent, msg )
{
}
@@ -3539,18 +3539,18 @@ KMCommand::Result CreateTodoCommand::execute()
KMail::KorgHelper::ensureRunning();
- QString txt = i18n("From: %1\nTo: %2\nSubject: %3").arg( msg->from() )
+ TQString txt = i18n("From: %1\nTo: %2\nSubject: %3").arg( msg->from() )
.arg( msg->to() ).arg( msg->subject() );
KTempFile tf;
tf.setAutoDelete( true );
- QString uri = "kmail:" + QString::number( msg->getMsgSerNum() ) + "/" + msg->msgId();
+ TQString uri = "kmail:" + TQString::number( msg->getMsgSerNum() ) + "/" + msg->msgId();
tf.file()->writeBlock( msg->asDwString().c_str(), msg->asDwString().length() );
tf.close();
KCalendarIface_stub *iface = new KCalendarIface_stub( kapp->dcopClient(), "korganizer", "CalendarIface" );
iface->openTodoEditor( i18n("Mail: %1").arg( msg->subject() ), txt,
- uri, tf.name(), QStringList(), "message/rfc822" );
+ uri, tf.name(), TQStringList(), "message/rfc822" );
delete iface;
return OK;
diff --git a/kmail/kmcommands.h b/kmail/kmcommands.h
index 02a48c4a0..d9c0e8392 100644
--- a/kmail/kmcommands.h
+++ b/kmail/kmcommands.h
@@ -3,13 +3,13 @@
#ifndef KMCommands_h
#define KMCommands_h
-#include <qdatetime.h>
-#include <qguardedptr.h>
-#include <qptrlist.h>
-#include <qvaluelist.h>
-#include <qvaluevector.h>
-#include <qtimer.h>
-#include <qfont.h>
+#include <tqdatetime.h>
+#include <tqguardedptr.h>
+#include <tqptrlist.h>
+#include <tqvaluelist.h>
+#include <tqvaluevector.h>
+#include <tqtimer.h>
+#include <tqfont.h>
#include <kio/job.h>
#include "kmmsgbase.h" // for KMMsgStatus
#include <mimelib/string.h>
@@ -43,8 +43,8 @@ namespace KMail {
namespace GpgME { class Error; }
namespace Kleo { class SpecialJob; }
-typedef QMap<int,KMFolder*> KMMenuToFolder;
-typedef QMap<partNode*, KMMessage*> PartNodeMessageMap;
+typedef TQMap<int,KMFolder*> KMMenuToFolder;
+typedef TQMap<partNode*, KMMessage*> PartNodeMessageMap;
class KDE_EXPORT KMCommand : public QObject
{
@@ -55,13 +55,13 @@ public:
enum Result { Undefined, OK, Canceled, Failed };
// Trival constructor, don't retrieve any messages
- KMCommand( QWidget *parent = 0 );
+ KMCommand( TQWidget *parent = 0 );
// Retrieve all messages in msgList when start is called.
- KMCommand( QWidget *parent, const QPtrList<KMMsgBase> &msgList );
+ KMCommand( TQWidget *parent, const TQPtrList<KMMsgBase> &msgList );
// Retrieve the single message msgBase when start is called.
- KMCommand( QWidget *parent, KMMsgBase *msgBase );
+ KMCommand( TQWidget *parent, KMMsgBase *msgBase );
// Retrieve the single message msgBase when start is called.
- KMCommand( QWidget *parent, KMMessage *message );
+ KMCommand( TQWidget *parent, KMMessage *message );
virtual ~KMCommand();
/** These folders will be closed by the dtor, handy, if you need to keep
@@ -90,11 +90,11 @@ signals:
protected:
// Returns list of messages retrieved
- const QPtrList<KMMessage> retrievedMsgs() const;
+ const TQPtrList<KMMessage> retrievedMsgs() const;
// Returns the single message retrieved
KMMessage *retrievedMessage() const;
// Returns the parent widget
- QWidget *parentWidget() const;
+ TQWidget *parentWidget() const;
bool deletesItself() { return mDeletesItself; }
/** Specify whether the subclass takes care of the deletion of the object.
@@ -151,10 +151,10 @@ private:
bool mDeletesItself : 1;
bool mEmitsCompletedItself : 1;
- QWidget *mParent;
- QPtrList<KMMessage> mRetrievedMsgs;
- QPtrList<KMMsgBase> mMsgList;
- QValueList<QGuardedPtr<KMFolder> > mFolders;
+ TQWidget *mParent;
+ TQPtrList<KMMessage> mRetrievedMsgs;
+ TQPtrList<KMMsgBase> mMsgList;
+ TQValueList<TQGuardedPtr<KMFolder> > mFolders;
};
class KDE_EXPORT KMMailtoComposeCommand : public KMCommand
@@ -176,14 +176,14 @@ class KDE_EXPORT KMMailtoReplyCommand : public KMCommand
Q_OBJECT
public:
- KMMailtoReplyCommand( QWidget *parent, const KURL &url,
- KMMessage *msg, const QString &selection );
+ KMMailtoReplyCommand( TQWidget *parent, const KURL &url,
+ KMMessage *msg, const TQString &selection );
private:
virtual Result execute();
KURL mUrl;
- QString mSelection;
+ TQString mSelection;
};
class KDE_EXPORT KMMailtoForwardCommand : public KMCommand
@@ -191,7 +191,7 @@ class KDE_EXPORT KMMailtoForwardCommand : public KMCommand
Q_OBJECT
public:
- KMMailtoForwardCommand( QWidget *parent, const KURL &url,
+ KMMailtoForwardCommand( TQWidget *parent, const KURL &url,
KMMessage *msg );
private:
@@ -205,7 +205,7 @@ class KDE_EXPORT KMMailtoAddAddrBookCommand : public KMCommand
Q_OBJECT
public:
- KMMailtoAddAddrBookCommand( const KURL &url, QWidget *parent );
+ KMMailtoAddAddrBookCommand( const KURL &url, TQWidget *parent );
private:
virtual Result execute();
@@ -218,7 +218,7 @@ class KDE_EXPORT KMAddBookmarksCommand : public KMCommand
Q_OBJECT
public:
- KMAddBookmarksCommand( const KURL &url, QWidget *parent );
+ KMAddBookmarksCommand( const KURL &url, TQWidget *parent );
private:
virtual Result execute();
@@ -232,7 +232,7 @@ class KDE_EXPORT KMMailtoOpenAddrBookCommand : public KMCommand
Q_OBJECT
public:
- KMMailtoOpenAddrBookCommand( const KURL &url, QWidget *parent );
+ KMMailtoOpenAddrBookCommand( const KURL &url, TQWidget *parent );
private:
virtual Result execute();
@@ -273,7 +273,7 @@ class KDE_EXPORT KMUrlSaveCommand : public KMCommand
Q_OBJECT
public:
- KMUrlSaveCommand( const KURL &url, QWidget *parent );
+ KMUrlSaveCommand( const KURL &url, TQWidget *parent );
private slots:
void slotUrlSaveResult( KIO::Job *job );
@@ -289,7 +289,7 @@ class KDE_EXPORT KMEditMsgCommand : public KMCommand
Q_OBJECT
public:
- KMEditMsgCommand( QWidget *parent, KMMessage *msg );
+ KMEditMsgCommand( TQWidget *parent, KMMessage *msg );
private:
virtual Result execute();
@@ -300,7 +300,7 @@ class KDE_EXPORT KMUseTemplateCommand : public KMCommand
Q_OBJECT
public:
- KMUseTemplateCommand( QWidget *parent, KMMessage *msg );
+ KMUseTemplateCommand( TQWidget *parent, KMMessage *msg );
private:
virtual Result execute();
@@ -311,7 +311,7 @@ class KDE_EXPORT KMShowMsgSrcCommand : public KMCommand
Q_OBJECT
public:
- KMShowMsgSrcCommand( QWidget *parent, KMMessage *msg,
+ KMShowMsgSrcCommand( TQWidget *parent, KMMessage *msg,
bool fixedFont );
virtual Result execute();
@@ -325,8 +325,8 @@ class KDE_EXPORT KMSaveMsgCommand : public KMCommand
Q_OBJECT
public:
- KMSaveMsgCommand( QWidget *parent, const QPtrList<KMMsgBase> &msgList );
- KMSaveMsgCommand( QWidget *parent, KMMessage * msg );
+ KMSaveMsgCommand( TQWidget *parent, const TQPtrList<KMMsgBase> &msgList );
+ KMSaveMsgCommand( TQWidget *parent, KMMessage * msg );
KURL url();
private:
@@ -341,10 +341,10 @@ private slots:
private:
static const int MAX_CHUNK_SIZE = 64*1024;
KURL mUrl;
- QValueList<unsigned long> mMsgList;
+ TQValueList<unsigned long> mMsgList;
unsigned int mMsgListIndex;
KMMessage *mStandAloneMessage;
- QByteArray mData;
+ TQByteArray mData;
int mOffset;
size_t mTotalSize;
KIO::TransferJob *mJob;
@@ -355,14 +355,14 @@ class KDE_EXPORT KMOpenMsgCommand : public KMCommand
Q_OBJECT
public:
- KMOpenMsgCommand( QWidget *parent, const KURL & url = KURL(),
- const QString & encoding = QString() );
+ KMOpenMsgCommand( TQWidget *parent, const KURL & url = KURL(),
+ const TQString & encoding = TQString() );
private:
virtual Result execute();
private slots:
- void slotDataArrived( KIO::Job *job, const QByteArray & data );
+ void slotDataArrived( KIO::Job *job, const TQByteArray & data );
void slotResult( KIO::Job *job );
private:
@@ -370,7 +370,7 @@ private:
KURL mUrl;
DwString mMsgString;
KIO::TransferJob *mJob;
- const QString mEncoding;
+ const TQString mEncoding;
};
class KDE_EXPORT KMSaveAttachmentsCommand : public KMCommand
@@ -381,12 +381,12 @@ public:
@param parent The parent widget of the command used for message boxes.
@param msg The message of which the attachments should be saved.
*/
- KMSaveAttachmentsCommand( QWidget *parent, KMMessage *msg );
+ KMSaveAttachmentsCommand( TQWidget *parent, KMMessage *msg );
/** Use this to save all attachments of the given messages.
@param parent The parent widget of the command used for message boxes.
@param msgs The messages of which the attachments should be saved.
*/
- KMSaveAttachmentsCommand( QWidget *parent, const QPtrList<KMMsgBase>& msgs );
+ KMSaveAttachmentsCommand( TQWidget *parent, const TQPtrList<KMMsgBase>& msgs );
/** Use this to save the specified attachments of the given message.
@param parent The parent widget of the command used for message
boxes.
@@ -395,7 +395,7 @@ public:
@param encoded True if the transport encoding should not be removed
when the attachment is saved.
*/
- KMSaveAttachmentsCommand( QWidget *parent, QPtrList<partNode> &attachments,
+ KMSaveAttachmentsCommand( TQWidget *parent, TQPtrList<partNode> &attachments,
KMMessage *msg, bool encoded = false );
private slots:
@@ -416,14 +416,14 @@ class KDE_EXPORT KMReplyToCommand : public KMCommand
Q_OBJECT
public:
- KMReplyToCommand( QWidget *parent, KMMessage *msg,
- const QString &selection = QString::null );
+ KMReplyToCommand( TQWidget *parent, KMMessage *msg,
+ const TQString &selection = TQString::null );
private:
virtual Result execute();
private:
- QString mSelection;
+ TQString mSelection;
};
class KDE_EXPORT KMNoQuoteReplyToCommand : public KMCommand
@@ -431,7 +431,7 @@ class KDE_EXPORT KMNoQuoteReplyToCommand : public KMCommand
Q_OBJECT
public:
- KMNoQuoteReplyToCommand( QWidget *parent, KMMessage *msg );
+ KMNoQuoteReplyToCommand( TQWidget *parent, KMMessage *msg );
private:
virtual Result execute();
@@ -442,14 +442,14 @@ class KMReplyListCommand : public KMCommand
Q_OBJECT
public:
- KMReplyListCommand( QWidget *parent, KMMessage *msg,
- const QString &selection = QString::null );
+ KMReplyListCommand( TQWidget *parent, KMMessage *msg,
+ const TQString &selection = TQString::null );
private:
virtual Result execute();
private:
- QString mSelection;
+ TQString mSelection;
};
class KDE_EXPORT KMReplyToAllCommand : public KMCommand
@@ -457,14 +457,14 @@ class KDE_EXPORT KMReplyToAllCommand : public KMCommand
Q_OBJECT
public:
- KMReplyToAllCommand( QWidget *parent, KMMessage *msg,
- const QString &selection = QString::null );
+ KMReplyToAllCommand( TQWidget *parent, KMMessage *msg,
+ const TQString &selection = TQString::null );
private:
virtual Result execute();
private:
- QString mSelection;
+ TQString mSelection;
};
class KDE_EXPORT KMReplyAuthorCommand : public KMCommand
@@ -472,14 +472,14 @@ class KDE_EXPORT KMReplyAuthorCommand : public KMCommand
Q_OBJECT
public:
- KMReplyAuthorCommand( QWidget *parent, KMMessage *msg,
- const QString &selection = QString::null );
+ KMReplyAuthorCommand( TQWidget *parent, KMMessage *msg,
+ const TQString &selection = TQString::null );
private:
virtual Result execute();
private:
- QString mSelection;
+ TQString mSelection;
};
class KDE_EXPORT KMForwardInlineCommand : public KMCommand
@@ -487,9 +487,9 @@ class KDE_EXPORT KMForwardInlineCommand : public KMCommand
Q_OBJECT
public:
- KMForwardInlineCommand( QWidget *parent, const QPtrList<KMMsgBase> &msgList,
+ KMForwardInlineCommand( TQWidget *parent, const TQPtrList<KMMsgBase> &msgList,
uint identity = 0 );
- KMForwardInlineCommand( QWidget *parent, KMMessage * msg,
+ KMForwardInlineCommand( TQWidget *parent, KMMessage * msg,
uint identity = 0 );
private:
@@ -504,16 +504,16 @@ class KDE_EXPORT KMForwardAttachedCommand : public KMCommand
Q_OBJECT
public:
- KMForwardAttachedCommand( QWidget *parent, const QPtrList<KMMsgBase> &msgList,
+ KMForwardAttachedCommand( TQWidget *parent, const TQPtrList<KMMsgBase> &msgList,
uint identity = 0, KMail::Composer *win = 0 );
- KMForwardAttachedCommand( QWidget *parent, KMMessage * msg,
+ KMForwardAttachedCommand( TQWidget *parent, KMMessage * msg,
uint identity = 0, KMail::Composer *win = 0 );
private:
virtual Result execute();
uint mIdentity;
- QGuardedPtr<KMail::Composer> mWin;
+ TQGuardedPtr<KMail::Composer> mWin;
};
class KDE_EXPORT KMForwardDigestCommand : public KMCommand
@@ -521,16 +521,16 @@ class KDE_EXPORT KMForwardDigestCommand : public KMCommand
Q_OBJECT
public:
- KMForwardDigestCommand( QWidget *parent, const QPtrList<KMMsgBase> &msgList,
+ KMForwardDigestCommand( TQWidget *parent, const TQPtrList<KMMsgBase> &msgList,
uint identity = 0, KMail::Composer *win = 0 );
- KMForwardDigestCommand( QWidget *parent, KMMessage * msg,
+ KMForwardDigestCommand( TQWidget *parent, KMMessage * msg,
uint identity = 0, KMail::Composer *win = 0 );
private:
virtual Result execute();
uint mIdentity;
- QGuardedPtr<KMail::Composer> mWin;
+ TQGuardedPtr<KMail::Composer> mWin;
};
class KDE_EXPORT KMRedirectCommand : public KMCommand
@@ -538,7 +538,7 @@ class KDE_EXPORT KMRedirectCommand : public KMCommand
Q_OBJECT
public:
- KMRedirectCommand( QWidget *parent, KMMessage *msg );
+ KMRedirectCommand( TQWidget *parent, KMMessage *msg );
private:
virtual Result execute();
@@ -549,16 +549,16 @@ class KDE_EXPORT KMCustomReplyToCommand : public KMCommand
Q_OBJECT
public:
- KMCustomReplyToCommand( QWidget *parent, KMMessage *msg,
- const QString &selection,
- const QString &tmpl );
+ KMCustomReplyToCommand( TQWidget *parent, KMMessage *msg,
+ const TQString &selection,
+ const TQString &tmpl );
private:
virtual Result execute();
private:
- QString mSelection;
- QString mTemplate;
+ TQString mSelection;
+ TQString mTemplate;
};
class KDE_EXPORT KMCustomReplyAllToCommand : public KMCommand
@@ -566,16 +566,16 @@ class KDE_EXPORT KMCustomReplyAllToCommand : public KMCommand
Q_OBJECT
public:
- KMCustomReplyAllToCommand( QWidget *parent, KMMessage *msg,
- const QString &selection,
- const QString &tmpl );
+ KMCustomReplyAllToCommand( TQWidget *parent, KMMessage *msg,
+ const TQString &selection,
+ const TQString &tmpl );
private:
virtual Result execute();
private:
- QString mSelection;
- QString mTemplate;
+ TQString mSelection;
+ TQString mTemplate;
};
class KDE_EXPORT KMCustomForwardCommand : public KMCommand
@@ -583,16 +583,16 @@ class KDE_EXPORT KMCustomForwardCommand : public KMCommand
Q_OBJECT
public:
- KMCustomForwardCommand( QWidget *parent, const QPtrList<KMMsgBase> &msgList,
- uint identity, const QString &tmpl );
- KMCustomForwardCommand( QWidget *parent, KMMessage * msg,
- uint identity, const QString &tmpl );
+ KMCustomForwardCommand( TQWidget *parent, const TQPtrList<KMMsgBase> &msgList,
+ uint identity, const TQString &tmpl );
+ KMCustomForwardCommand( TQWidget *parent, KMMessage * msg,
+ uint identity, const TQString &tmpl );
private:
virtual Result execute();
uint mIdentity;
- QString mTemplate;
+ TQString mTemplate;
};
class KDE_EXPORT KMPrintCommand : public KMCommand
@@ -600,13 +600,13 @@ class KDE_EXPORT KMPrintCommand : public KMCommand
Q_OBJECT
public:
- KMPrintCommand( QWidget *parent, KMMessage *msg,
+ KMPrintCommand( TQWidget *parent, KMMessage *msg,
bool htmlOverride=false,
bool htmlLoadExtOverride=false,
bool useFixedFont = false,
- const QString & encoding = QString() );
+ const TQString & encoding = TQString() );
- void setOverrideFont( const QFont& );
+ void setOverrideFont( const TQFont& );
private:
virtual Result execute();
@@ -614,8 +614,8 @@ private:
bool mHtmlOverride;
bool mHtmlLoadExtOverride;
bool mUseFixedFont;
- QFont mOverrideFont;
- QString mEncoding;
+ TQFont mOverrideFont;
+ TQString mEncoding;
};
class KDE_EXPORT KMSetStatusCommand : public KMCommand
@@ -624,15 +624,15 @@ class KDE_EXPORT KMSetStatusCommand : public KMCommand
public:
// Serial numbers
- KMSetStatusCommand( KMMsgStatus status, const QValueList<Q_UINT32> &,
+ KMSetStatusCommand( KMMsgStatus status, const TQValueList<Q_UINT32> &,
bool toggle=false );
private:
virtual Result execute();
KMMsgStatus mStatus;
- QValueList<Q_UINT32> mSerNums;
- QValueList<int> mIds;
+ TQValueList<Q_UINT32> mSerNums;
+ TQValueList<int> mIds;
bool mToggle;
};
@@ -641,13 +641,13 @@ class KDE_EXPORT KMFilterCommand : public KMCommand
Q_OBJECT
public:
- KMFilterCommand( const QCString &field, const QString &value );
+ KMFilterCommand( const TQCString &field, const TQString &value );
private:
virtual Result execute();
- QCString mField;
- QString mValue;
+ TQCString mField;
+ TQString mValue;
};
@@ -656,13 +656,13 @@ class KDE_EXPORT KMFilterActionCommand : public KMCommand
Q_OBJECT
public:
- KMFilterActionCommand( QWidget *parent,
- const QPtrList<KMMsgBase> &msgList,
+ KMFilterActionCommand( TQWidget *parent,
+ const TQPtrList<KMMsgBase> &msgList,
KMFilter *filter );
private:
virtual Result execute();
- QValueList<Q_UINT32> serNumList;
+ TQValueList<Q_UINT32> serNumList;
KMFilter *mFilter;
};
@@ -711,7 +711,7 @@ class KDE_EXPORT KMMailingListFilterCommand : public KMCommand
Q_OBJECT
public:
- KMMailingListFilterCommand( QWidget *parent, KMMessage *msg );
+ KMMailingListFilterCommand( TQWidget *parent, KMMessage *msg );
private:
virtual Result execute();
@@ -730,11 +730,11 @@ class KDE_EXPORT KMMenuCommand : public KMCommand
Q_OBJECT
public:
- static void folderToPopupMenu(bool move, QObject *receiver,
- KMMenuToFolder *aMenuToFolder, QPopupMenu *menu );
+ static void folderToPopupMenu(bool move, TQObject *receiver,
+ KMMenuToFolder *aMenuToFolder, TQPopupMenu *menu );
static void makeFolderMenu(KMFolderNode* item, bool move,
- QObject *receiver, KMMenuToFolder *aMenuToFolder, QPopupMenu *menu );
+ TQObject *receiver, KMMenuToFolder *aMenuToFolder, TQPopupMenu *menu );
};
class KDE_EXPORT KMCopyCommand : public KMMenuCommand
@@ -743,7 +743,7 @@ class KDE_EXPORT KMCopyCommand : public KMMenuCommand
public:
KMCopyCommand( KMFolder* destFolder,
- const QPtrList<KMMsgBase> &msgList );
+ const TQPtrList<KMMsgBase> &msgList );
KMCopyCommand( KMFolder* destFolder, KMMessage *msg );
protected slots:
@@ -755,8 +755,8 @@ private:
virtual Result execute();
KMFolder *mDestFolder;
- QPtrList<KMMsgBase> mMsgList;
- QValueList<KMail::FolderJob*> mPendingJobs;
+ TQPtrList<KMMsgBase> mMsgList;
+ TQValueList<KMail::FolderJob*> mPendingJobs;
};
namespace KPIM {
@@ -767,7 +767,7 @@ class KDE_EXPORT KMMoveCommand : public KMMenuCommand
Q_OBJECT
public:
- KMMoveCommand( KMFolder* destFolder, const QPtrList<KMMsgBase> &msgList );
+ KMMoveCommand( KMFolder* destFolder, const TQPtrList<KMMsgBase> &msgList );
KMMoveCommand( KMFolder* destFolder, KMMessage * msg );
KMMoveCommand( KMFolder* destFolder, KMMsgBase * msgBase );
KMFolder* destFolder() const { return mDestFolder; }
@@ -782,17 +782,17 @@ protected:
KMMoveCommand( Q_UINT32 sernum );
void setDestFolder( KMFolder* folder ) { mDestFolder = folder; }
void addMsg( KMMsgBase *msg ) { mSerNumList.append( msg->getMsgSerNum() ); }
- QValueVector<KMFolder*> mOpenedFolders;
+ TQValueVector<KMFolder*> mOpenedFolders;
private:
virtual Result execute();
void completeMove( Result result );
KMFolder *mDestFolder;
- QValueList<Q_UINT32> mSerNumList;
+ TQValueList<Q_UINT32> mSerNumList;
// List of serial numbers that have to be transferred to a host.
// Ticked off as they come in via msgAdded signals.
- QValueList<Q_UINT32> mLostBoys;
+ TQValueList<Q_UINT32> mLostBoys;
KPIM::ProgressItem *mProgressItem;
bool mCompleteWithAddedMsg;
};
@@ -802,7 +802,7 @@ class KDE_EXPORT KMDeleteMsgCommand : public KMMoveCommand
Q_OBJECT
public:
- KMDeleteMsgCommand( KMFolder* srcFolder, const QPtrList<KMMsgBase> &msgList );
+ KMDeleteMsgCommand( KMFolder* srcFolder, const TQPtrList<KMMsgBase> &msgList );
KMDeleteMsgCommand( KMFolder* srcFolder, KMMessage * msg );
KMDeleteMsgCommand( Q_UINT32 sernum );
@@ -834,12 +834,12 @@ class KDE_EXPORT KMLoadPartsCommand : public KMCommand
Q_OBJECT
public:
- KMLoadPartsCommand( QPtrList<partNode>& parts, KMMessage* msg );
+ KMLoadPartsCommand( TQPtrList<partNode>& parts, KMMessage* msg );
KMLoadPartsCommand( partNode* node, KMMessage* msg );
KMLoadPartsCommand( PartNodeMessageMap& partMap );
public slots:
- void slotPartRetrieved( KMMessage* msg, QString partSpecifier );
+ void slotPartRetrieved( KMMessage* msg, TQString partSpecifier );
signals:
void partsRetrieved();
@@ -859,7 +859,7 @@ class KDE_EXPORT KMResendMessageCommand : public KMCommand
Q_OBJECT
public:
- KMResendMessageCommand( QWidget *parent, KMMessage *msg=0 );
+ KMResendMessageCommand( TQWidget *parent, KMMessage *msg=0 );
private:
virtual Result execute();
@@ -869,7 +869,7 @@ class KDE_EXPORT KMMailingListCommand : public KMCommand
{
Q_OBJECT
public:
- KMMailingListCommand( QWidget *parent, KMFolder *folder );
+ KMMailingListCommand( TQWidget *parent, KMFolder *folder );
private:
virtual Result execute();
private slots:
@@ -884,7 +884,7 @@ class KDE_EXPORT KMMailingListPostCommand : public KMMailingListCommand
{
Q_OBJECT
public:
- KMMailingListPostCommand( QWidget *parent, KMFolder *folder );
+ KMMailingListPostCommand( TQWidget *parent, KMFolder *folder );
protected:
virtual KURL::List urls() const;
};
@@ -893,7 +893,7 @@ class KDE_EXPORT KMMailingListSubscribeCommand : public KMMailingListCommand
{
Q_OBJECT
public:
- KMMailingListSubscribeCommand( QWidget *parent, KMFolder *folder );
+ KMMailingListSubscribeCommand( TQWidget *parent, KMFolder *folder );
protected:
virtual KURL::List urls() const;
};
@@ -902,7 +902,7 @@ class KDE_EXPORT KMMailingListUnsubscribeCommand : public KMMailingListCommand
{
Q_OBJECT
public:
- KMMailingListUnsubscribeCommand( QWidget *parent, KMFolder *folder );
+ KMMailingListUnsubscribeCommand( TQWidget *parent, KMFolder *folder );
protected:
virtual KURL::List urls() const;
};
@@ -911,7 +911,7 @@ class KDE_EXPORT KMMailingListArchivesCommand : public KMMailingListCommand
{
Q_OBJECT
public:
- KMMailingListArchivesCommand( QWidget *parent, KMFolder *folder );
+ KMMailingListArchivesCommand( TQWidget *parent, KMFolder *folder );
protected:
virtual KURL::List urls() const;
};
@@ -920,7 +920,7 @@ class KDE_EXPORT KMMailingListHelpCommand : public KMMailingListCommand
{
Q_OBJECT
public:
- KMMailingListHelpCommand( QWidget *parent, KMFolder *folder );
+ KMMailingListHelpCommand( TQWidget *parent, KMFolder *folder );
protected:
virtual KURL::List urls() const;
};
@@ -970,16 +970,16 @@ public:
* @param offer specify a KService that should handle the "open" action, 0 otherwise
*/
KMHandleAttachmentCommand( partNode* node, KMMessage* msg, int atmId,
- const QString& atmName, AttachmentAction action, KService::Ptr offer, QWidget* parent );
+ const TQString& atmName, AttachmentAction action, KService::Ptr offer, TQWidget* parent );
signals:
- void showAttachment( int id, const QString& name );
+ void showAttachment( int id, const TQString& name );
private:
virtual Result execute();
- QString createAtmFileLink() const;
+ TQString createAtmFileLink() const;
/** Get a KService if it was not specified */
KService::Ptr getServiceOffer();
@@ -1015,14 +1015,14 @@ private slots:
*/
void slotPartComplete();
- void slotAtmDecryptWithChiasmusResult( const GpgME::Error &, const QVariant & );
+ void slotAtmDecryptWithChiasmusResult( const GpgME::Error &, const TQVariant & );
void slotAtmDecryptWithChiasmusUploadResult( KIO::Job * );
private:
partNode* mNode;
KMMessage* mMsg;
int mAtmId;
- QString mAtmName;
+ TQString mAtmName;
AttachmentAction mAction;
KService::Ptr mOffer;
Kleo::SpecialJob *mJob;
@@ -1035,7 +1035,7 @@ class KDE_EXPORT AttachmentModifyCommand : public KMCommand
{
Q_OBJECT
public:
- AttachmentModifyCommand( partNode *node, KMMessage *msg, QWidget *parent );
+ AttachmentModifyCommand( partNode *node, KMMessage *msg, TQWidget *parent );
~AttachmentModifyCommand();
protected:
@@ -1056,14 +1056,14 @@ class KDE_EXPORT AttachmentModifyCommand : public KMCommand
void messageDeleteResult( KMCommand *cmd );
private:
- QGuardedPtr<KMFolder> mFolder;
+ TQGuardedPtr<KMFolder> mFolder;
};
class KDE_EXPORT KMDeleteAttachmentCommand : public AttachmentModifyCommand
{
Q_OBJECT
public:
- KMDeleteAttachmentCommand( partNode *node, KMMessage *msg, QWidget *parent );
+ KMDeleteAttachmentCommand( partNode *node, KMMessage *msg, TQWidget *parent );
~KMDeleteAttachmentCommand();
protected:
@@ -1075,7 +1075,7 @@ class KDE_EXPORT KMEditAttachmentCommand : public AttachmentModifyCommand
{
Q_OBJECT
public:
- KMEditAttachmentCommand( partNode *node, KMMessage *msg, QWidget *parent );
+ KMEditAttachmentCommand( partNode *node, KMMessage *msg, TQWidget *parent );
~KMEditAttachmentCommand();
protected:
@@ -1092,7 +1092,7 @@ class KDE_EXPORT CreateTodoCommand : public KMCommand
{
Q_OBJECT
public:
- CreateTodoCommand( QWidget *parent, KMMessage *msg );
+ CreateTodoCommand( TQWidget *parent, KMMessage *msg );
private:
Result execute();
diff --git a/kmail/kmcomposewin.cpp b/kmail/kmcomposewin.cpp
index ba5587dcd..592248a0a 100644
--- a/kmail/kmcomposewin.cpp
+++ b/kmail/kmcomposewin.cpp
@@ -119,14 +119,14 @@ using KRecentAddress::RecentAddresses;
#include <kzip.h>
#include <ksavefile.h>
-#include <qtabdialog.h>
-#include <qregexp.h>
-#include <qbuffer.h>
-#include <qtooltip.h>
-#include <qtextcodec.h>
-#include <qheader.h>
-#include <qwhatsthis.h>
-#include <qfontdatabase.h>
+#include <tqtabdialog.h>
+#include <tqregexp.h>
+#include <tqbuffer.h>
+#include <tqtooltip.h>
+#include <tqtextcodec.h>
+#include <tqheader.h>
+#include <tqwhatsthis.h>
+#include <tqfontdatabase.h>
#include <mimelib/mimepp.h>
@@ -191,28 +191,28 @@ KMComposeWin::KMComposeWin( KMMessage *aMsg, uint id )
mSubjectTextWasSpellChecked = false;
if (kmkernel->xmlGuiInstance())
setInstance( kmkernel->xmlGuiInstance() );
- mMainWidget = new QWidget(this);
+ mMainWidget = new TQWidget(this);
// splitter between the headers area and the actual editor
- mHeadersToEditorSplitter = new QSplitter( Qt::Vertical, mMainWidget, "mHeadersToEditorSplitter" );
+ mHeadersToEditorSplitter = new TQSplitter( Qt::Vertical, mMainWidget, "mHeadersToEditorSplitter" );
mHeadersToEditorSplitter->setChildrenCollapsible( false );
- mHeadersArea = new QWidget( mHeadersToEditorSplitter );
- mHeadersArea->setSizePolicy( mHeadersToEditorSplitter->sizePolicy().horData(), QSizePolicy::Maximum );
- QVBoxLayout *v = new QVBoxLayout( mMainWidget );
+ mHeadersArea = new TQWidget( mHeadersToEditorSplitter );
+ mHeadersArea->setSizePolicy( mHeadersToEditorSplitter->sizePolicy().horData(), TQSizePolicy::Maximum );
+ TQVBoxLayout *v = new TQVBoxLayout( mMainWidget );
v->addWidget( mHeadersToEditorSplitter );
mIdentity = new KPIM::IdentityCombo(kmkernel->identityManager(), mHeadersArea);
mDictionaryCombo = new DictionaryComboBox( mHeadersArea );
mFcc = new KMFolderComboBox(mHeadersArea);
mFcc->showOutboxFolder( false );
- mTransport = new QComboBox(true, mHeadersArea);
+ mTransport = new TQComboBox(true, mHeadersArea);
mEdtFrom = new KMLineEdit(false,mHeadersArea, "fromLine");
mEdtReplyTo = new KMLineEdit(true,mHeadersArea, "replyToLine");
- mLblReplyTo = new QLabel(mHeadersArea);
- mBtnReplyTo = new QPushButton("...",mHeadersArea);
- mBtnReplyTo->setFocusPolicy(QWidget::NoFocus);
- connect(mBtnReplyTo,SIGNAL(clicked()),SLOT(slotAddrBookReplyTo()));
- connect(mEdtReplyTo,SIGNAL(completionModeChanged(KGlobalSettings::Completion)),
- SLOT(slotCompletionModeChanged(KGlobalSettings::Completion)));
+ mLblReplyTo = new TQLabel(mHeadersArea);
+ mBtnReplyTo = new TQPushButton("...",mHeadersArea);
+ mBtnReplyTo->setFocusPolicy(TQWidget::NoFocus);
+ connect(mBtnReplyTo,TQT_SIGNAL(clicked()),TQT_SLOT(slotAddrBookReplyTo()));
+ connect(mEdtReplyTo,TQT_SIGNAL(completionModeChanged(KGlobalSettings::Completion)),
+ TQT_SLOT(slotCompletionModeChanged(KGlobalSettings::Completion)));
if ( mClassicalRecipients ) {
mRecipientsEditor = 0;
@@ -221,37 +221,37 @@ KMComposeWin::KMComposeWin( KMMessage *aMsg, uint id )
mEdtCc = new KMLineEdit(true,mHeadersArea, "ccLine");
mEdtBcc = new KMLineEdit(true,mHeadersArea, "bccLine");
- mLblTo = new QLabel(mHeadersArea);
- mLblCc = new QLabel(mHeadersArea);
- mLblBcc = new QLabel(mHeadersArea);
-
- mBtnTo = new QPushButton("...",mHeadersArea);
- mBtnCc = new QPushButton("...",mHeadersArea);
- mBtnBcc = new QPushButton("...",mHeadersArea);
- //mBtnFrom = new QPushButton("...",mHeadersArea);
-
- QString tip = i18n("Select email address(es)");
- QToolTip::add( mBtnTo, tip );
- QToolTip::add( mBtnCc, tip );
- QToolTip::add( mBtnBcc, tip );
- QToolTip::add( mBtnReplyTo, tip );
-
- mBtnTo->setFocusPolicy(QWidget::NoFocus);
- mBtnCc->setFocusPolicy(QWidget::NoFocus);
- mBtnBcc->setFocusPolicy(QWidget::NoFocus);
- //mBtnFrom->setFocusPolicy(QWidget::NoFocus);
-
- connect(mBtnTo,SIGNAL(clicked()),SLOT(slotAddrBookTo()));
- connect(mBtnCc,SIGNAL(clicked()),SLOT(slotAddrBookTo()));
- connect(mBtnBcc,SIGNAL(clicked()),SLOT(slotAddrBookTo()));
- //connect(mBtnFrom,SIGNAL(clicked()),SLOT(slotAddrBookFrom()));
-
- connect(mEdtTo,SIGNAL(completionModeChanged(KGlobalSettings::Completion)),
- SLOT(slotCompletionModeChanged(KGlobalSettings::Completion)));
- connect(mEdtCc,SIGNAL(completionModeChanged(KGlobalSettings::Completion)),
- SLOT(slotCompletionModeChanged(KGlobalSettings::Completion)));
- connect(mEdtBcc,SIGNAL(completionModeChanged(KGlobalSettings::Completion)),
- SLOT(slotCompletionModeChanged(KGlobalSettings::Completion)));
+ mLblTo = new TQLabel(mHeadersArea);
+ mLblCc = new TQLabel(mHeadersArea);
+ mLblBcc = new TQLabel(mHeadersArea);
+
+ mBtnTo = new TQPushButton("...",mHeadersArea);
+ mBtnCc = new TQPushButton("...",mHeadersArea);
+ mBtnBcc = new TQPushButton("...",mHeadersArea);
+ //mBtnFrom = new TQPushButton("...",mHeadersArea);
+
+ TQString tip = i18n("Select email address(es)");
+ TQToolTip::add( mBtnTo, tip );
+ TQToolTip::add( mBtnCc, tip );
+ TQToolTip::add( mBtnBcc, tip );
+ TQToolTip::add( mBtnReplyTo, tip );
+
+ mBtnTo->setFocusPolicy(TQWidget::NoFocus);
+ mBtnCc->setFocusPolicy(TQWidget::NoFocus);
+ mBtnBcc->setFocusPolicy(TQWidget::NoFocus);
+ //mBtnFrom->setFocusPolicy(TQWidget::NoFocus);
+
+ connect(mBtnTo,TQT_SIGNAL(clicked()),TQT_SLOT(slotAddrBookTo()));
+ connect(mBtnCc,TQT_SIGNAL(clicked()),TQT_SLOT(slotAddrBookTo()));
+ connect(mBtnBcc,TQT_SIGNAL(clicked()),TQT_SLOT(slotAddrBookTo()));
+ //connect(mBtnFrom,TQT_SIGNAL(clicked()),TQT_SLOT(slotAddrBookFrom()));
+
+ connect(mEdtTo,TQT_SIGNAL(completionModeChanged(KGlobalSettings::Completion)),
+ TQT_SLOT(slotCompletionModeChanged(KGlobalSettings::Completion)));
+ connect(mEdtCc,TQT_SIGNAL(completionModeChanged(KGlobalSettings::Completion)),
+ TQT_SLOT(slotCompletionModeChanged(KGlobalSettings::Completion)));
+ connect(mEdtBcc,TQT_SIGNAL(completionModeChanged(KGlobalSettings::Completion)),
+ TQT_SLOT(slotCompletionModeChanged(KGlobalSettings::Completion)));
mEdtTo->setFocus();
} else {
@@ -270,23 +270,23 @@ KMComposeWin::KMComposeWin( KMMessage *aMsg, uint id )
mRecipientsEditor = new RecipientsEditor( mHeadersArea );
connect( mRecipientsEditor,
- SIGNAL( completionModeChanged( KGlobalSettings::Completion ) ),
- SLOT( slotCompletionModeChanged( KGlobalSettings::Completion ) ) );
- connect( mRecipientsEditor, SIGNAL(sizeHintChanged()), SLOT(recipientEditorSizeHintChanged()) );
+ TQT_SIGNAL( completionModeChanged( KGlobalSettings::Completion ) ),
+ TQT_SLOT( slotCompletionModeChanged( KGlobalSettings::Completion ) ) );
+ connect( mRecipientsEditor, TQT_SIGNAL(sizeHintChanged()), TQT_SLOT(recipientEditorSizeHintChanged()) );
mRecipientsEditor->setFocus();
}
mEdtSubject = new KMLineEditSpell(false,mHeadersArea, "subjectLine");
- mLblIdentity = new QLabel(mHeadersArea);
- mDictionaryLabel = new QLabel( mHeadersArea );
- mLblFcc = new QLabel(mHeadersArea);
- mLblTransport = new QLabel(mHeadersArea);
- mLblFrom = new QLabel(mHeadersArea);
- mLblSubject = new QLabel(mHeadersArea);
- QString sticky = i18n("Sticky");
- mBtnIdentity = new QCheckBox(sticky,mHeadersArea);
- mBtnFcc = new QCheckBox(sticky,mHeadersArea);
- mBtnTransport = new QCheckBox(sticky,mHeadersArea);
+ mLblIdentity = new TQLabel(mHeadersArea);
+ mDictionaryLabel = new TQLabel( mHeadersArea );
+ mLblFcc = new TQLabel(mHeadersArea);
+ mLblTransport = new TQLabel(mHeadersArea);
+ mLblFrom = new TQLabel(mHeadersArea);
+ mLblSubject = new TQLabel(mHeadersArea);
+ TQString sticky = i18n("Sticky");
+ mBtnIdentity = new TQCheckBox(sticky,mHeadersArea);
+ mBtnFcc = new TQCheckBox(sticky,mHeadersArea);
+ mBtnTransport = new TQCheckBox(sticky,mHeadersArea);
//setWFlags( WType_TopLevel | WStyle_Dialog );
mHtmlMarkup = GlobalSettings::self()->useHtmlMarkup();
@@ -303,31 +303,31 @@ KMComposeWin::KMComposeWin( KMMessage *aMsg, uint id )
mFixedFontAction = 0;
mTempDir = 0;
// the attachment view is separated from the editor by a splitter
- mSplitter = new QSplitter( Qt::Vertical, mHeadersToEditorSplitter, "mSplitter" );
+ mSplitter = new TQSplitter( Qt::Vertical, mHeadersToEditorSplitter, "mSplitter" );
mSplitter->setChildrenCollapsible( false );
- mSnippetSplitter = new QSplitter( Qt::Horizontal, mSplitter, "mSnippetSplitter");
+ mSnippetSplitter = new TQSplitter( Qt::Horizontal, mSplitter, "mSnippetSplitter");
mSnippetSplitter->setChildrenCollapsible( false );
- QWidget *editorAndCryptoStateIndicators = new QWidget( mSnippetSplitter );
- QVBoxLayout *vbox = new QVBoxLayout( editorAndCryptoStateIndicators );
- QHBoxLayout *hbox = new QHBoxLayout( vbox );
+ TQWidget *editorAndCryptoStateIndicators = new TQWidget( mSnippetSplitter );
+ TQVBoxLayout *vbox = new TQVBoxLayout( editorAndCryptoStateIndicators );
+ TQHBoxLayout *hbox = new TQHBoxLayout( vbox );
{
- mSignatureStateIndicator = new QLabel( editorAndCryptoStateIndicators );
+ mSignatureStateIndicator = new TQLabel( editorAndCryptoStateIndicators );
mSignatureStateIndicator->setAlignment( Qt::AlignHCenter );
hbox->addWidget( mSignatureStateIndicator );
KConfigGroup reader( KMKernel::config(), "Reader" );
- QPalette p( mSignatureStateIndicator->palette() );
+ TQPalette p( mSignatureStateIndicator->palette() );
- QColor defaultSignedColor( 0x40, 0xFF, 0x40 ); // light green // pgp ok, trusted key
- QColor defaultEncryptedColor( 0x00, 0x80, 0xFF ); // light blue // pgp encrypted
- p.setColor( QColorGroup::Background, reader.readColorEntry( "PGPMessageOkKeyOk", &defaultSignedColor ) );
+ TQColor defaultSignedColor( 0x40, 0xFF, 0x40 ); // light green // pgp ok, trusted key
+ TQColor defaultEncryptedColor( 0x00, 0x80, 0xFF ); // light blue // pgp encrypted
+ p.setColor( TQColorGroup::Background, reader.readColorEntry( "PGPMessageOkKeyOk", &defaultSignedColor ) );
mSignatureStateIndicator->setPalette( p );
- mEncryptionStateIndicator = new QLabel( editorAndCryptoStateIndicators );
+ mEncryptionStateIndicator = new TQLabel( editorAndCryptoStateIndicators );
mEncryptionStateIndicator->setAlignment( Qt::AlignHCenter );
hbox->addWidget( mEncryptionStateIndicator );
- p.setColor( QColorGroup::Background, reader.readColorEntry( "PGPMessageEncr" , &defaultEncryptedColor ) );
+ p.setColor( TQColorGroup::Background, reader.readColorEntry( "PGPMessageEncr" , &defaultEncryptedColor ) );
mEncryptionStateIndicator->setPalette( p );
}
@@ -344,11 +344,11 @@ KMComposeWin::KMComposeWin( KMMessage *aMsg, uint id )
mEditor->setTextFormat(Qt::PlainText);
mEditor->setAcceptDrops( true );
- QWhatsThis::add( mBtnIdentity,
+ TQWhatsThis::add( mBtnIdentity,
GlobalSettings::self()->stickyIdentityItem()->whatsThis() );
- QWhatsThis::add( mBtnFcc,
+ TQWhatsThis::add( mBtnFcc,
GlobalSettings::self()->stickyFccItem()->whatsThis() );
- QWhatsThis::add( mBtnTransport,
+ TQWhatsThis::add( mBtnTransport,
GlobalSettings::self()->stickyTransportItem()->whatsThis() );
mSpellCheckInProgress=false;
@@ -356,13 +356,13 @@ KMComposeWin::KMComposeWin( KMMessage *aMsg, uint id )
setCaption( i18n("Composer") );
setMinimumSize(200,200);
- mBtnIdentity->setFocusPolicy(QWidget::NoFocus);
- mBtnFcc->setFocusPolicy(QWidget::NoFocus);
- mBtnTransport->setFocusPolicy(QWidget::NoFocus);
+ mBtnIdentity->setFocusPolicy(TQWidget::NoFocus);
+ mBtnFcc->setFocusPolicy(TQWidget::NoFocus);
+ mBtnTransport->setFocusPolicy(TQWidget::NoFocus);
mAtmListView = new AttachmentListView( this, mSplitter,
"attachment list view" );
- mAtmListView->setSelectionMode( QListView::Extended );
+ mAtmListView->setSelectionMode( TQListView::Extended );
mAtmListView->addColumn( i18n("Name"), 200 );
mAtmListView->addColumn( i18n("Size"), 80 );
mAtmListView->addColumn( i18n("Encoding"), 120 );
@@ -383,20 +383,20 @@ KMComposeWin::KMComposeWin( KMMessage *aMsg, uint id )
mAtmListView->setAllColumnsShowFocus( true );
connect( mAtmListView,
- SIGNAL( doubleClicked( QListViewItem* ) ),
- SLOT( slotAttachEdit() ) );
+ TQT_SIGNAL( doubleClicked( TQListViewItem* ) ),
+ TQT_SLOT( slotAttachEdit() ) );
connect( mAtmListView,
- SIGNAL( rightButtonPressed( QListViewItem*, const QPoint&, int ) ),
- SLOT( slotAttachPopupMenu( QListViewItem*, const QPoint&, int ) ) );
+ TQT_SIGNAL( rightButtonPressed( TQListViewItem*, const TQPoint&, int ) ),
+ TQT_SLOT( slotAttachPopupMenu( TQListViewItem*, const TQPoint&, int ) ) );
connect( mAtmListView,
- SIGNAL( selectionChanged() ),
- SLOT( slotUpdateAttachActions() ) );
+ TQT_SIGNAL( selectionChanged() ),
+ TQT_SLOT( slotUpdateAttachActions() ) );
connect( mAtmListView,
- SIGNAL( attachmentDeleted() ),
- SLOT( slotAttachRemove() ) );
+ TQT_SIGNAL( attachmentDeleted() ),
+ TQT_SLOT( slotAttachRemove() ) );
connect( mAtmListView,
- SIGNAL( dragStarted() ),
- SLOT( slotAttachmentDragStarted() ) );
+ TQT_SIGNAL( dragStarted() ),
+ TQT_SLOT( slotAttachmentDragStarted() ) );
mAttachMenu = 0;
readConfig();
@@ -407,32 +407,32 @@ KMComposeWin::KMComposeWin( KMMessage *aMsg, uint id )
applyMainWindowSettings(KMKernel::config(), "Composer");
- connect( mEdtSubject, SIGNAL( subjectTextSpellChecked() ),
- SLOT( slotSubjectTextSpellChecked() ) );
- connect(mEdtSubject,SIGNAL(textChanged(const QString&)),
- SLOT(slotUpdWinTitle(const QString&)));
- connect(mIdentity,SIGNAL(identityChanged(uint)),
- SLOT(slotIdentityChanged(uint)));
- connect( kmkernel->identityManager(), SIGNAL(changed(uint)),
- SLOT(slotIdentityChanged(uint)));
-
- connect(mEdtFrom,SIGNAL(completionModeChanged(KGlobalSettings::Completion)),
- SLOT(slotCompletionModeChanged(KGlobalSettings::Completion)));
- connect(kmkernel->folderMgr(),SIGNAL(folderRemoved(KMFolder*)),
- SLOT(slotFolderRemoved(KMFolder*)));
- connect(kmkernel->imapFolderMgr(),SIGNAL(folderRemoved(KMFolder*)),
- SLOT(slotFolderRemoved(KMFolder*)));
- connect(kmkernel->dimapFolderMgr(),SIGNAL(folderRemoved(KMFolder*)),
- SLOT(slotFolderRemoved(KMFolder*)));
- connect( kmkernel, SIGNAL( configChanged() ),
- this, SLOT( slotConfigChanged() ) );
-
- connect (mEditor, SIGNAL (spellcheck_done(int)),
- this, SLOT (slotSpellcheckDone (int)));
- connect (mEditor, SIGNAL( attachPNGImageData(const QByteArray &) ),
- this, SLOT ( slotAttachPNGImageData(const QByteArray &) ) );
- connect (mEditor, SIGNAL( focusChanged(bool) ),
- this, SLOT (editorFocusChanged(bool)) );
+ connect( mEdtSubject, TQT_SIGNAL( subjectTextSpellChecked() ),
+ TQT_SLOT( slotSubjectTextSpellChecked() ) );
+ connect(mEdtSubject,TQT_SIGNAL(textChanged(const TQString&)),
+ TQT_SLOT(slotUpdWinTitle(const TQString&)));
+ connect(mIdentity,TQT_SIGNAL(identityChanged(uint)),
+ TQT_SLOT(slotIdentityChanged(uint)));
+ connect( kmkernel->identityManager(), TQT_SIGNAL(changed(uint)),
+ TQT_SLOT(slotIdentityChanged(uint)));
+
+ connect(mEdtFrom,TQT_SIGNAL(completionModeChanged(KGlobalSettings::Completion)),
+ TQT_SLOT(slotCompletionModeChanged(KGlobalSettings::Completion)));
+ connect(kmkernel->folderMgr(),TQT_SIGNAL(folderRemoved(KMFolder*)),
+ TQT_SLOT(slotFolderRemoved(KMFolder*)));
+ connect(kmkernel->imapFolderMgr(),TQT_SIGNAL(folderRemoved(KMFolder*)),
+ TQT_SLOT(slotFolderRemoved(KMFolder*)));
+ connect(kmkernel->dimapFolderMgr(),TQT_SIGNAL(folderRemoved(KMFolder*)),
+ TQT_SLOT(slotFolderRemoved(KMFolder*)));
+ connect( kmkernel, TQT_SIGNAL( configChanged() ),
+ this, TQT_SLOT( slotConfigChanged() ) );
+
+ connect (mEditor, TQT_SIGNAL (spellcheck_done(int)),
+ this, TQT_SLOT (slotSpellcheckDone (int)));
+ connect (mEditor, TQT_SIGNAL( attachPNGImageData(const TQByteArray &) ),
+ this, TQT_SLOT ( slotAttachPNGImageData(const TQByteArray &) ) );
+ connect (mEditor, TQT_SIGNAL( focusChanged(bool) ),
+ this, TQT_SLOT (editorFocusChanged(bool)) );
mMainWidget->resize(480,510);
setCentralWidget(mMainWidget);
@@ -474,7 +474,7 @@ KMComposeWin::~KMComposeWin()
delete mMsg;
mMsg = 0;
}
- QMap<KIO::Job*, atmLoadData>::Iterator it = mMapAtmLoadData.begin();
+ TQMap<KIO::Job*, atmLoadData>::Iterator it = mMapAtmLoadData.begin();
while ( it != mMapAtmLoadData.end() )
{
KIO::Job *job = it.key();
@@ -514,7 +514,7 @@ void KMComposeWin::send(int how)
}
//-----------------------------------------------------------------------------
-void KMComposeWin::addAttachmentsAndSend(const KURL::List &urls, const QString &/*comment*/, int how)
+void KMComposeWin::addAttachmentsAndSend(const KURL::List &urls, const TQString &/*comment*/, int how)
{
if (urls.isEmpty())
{
@@ -523,7 +523,7 @@ void KMComposeWin::addAttachmentsAndSend(const KURL::List &urls, const QString &
}
mAttachFilesSend = how;
mAttachFilesPending = urls;
- connect(this, SIGNAL(attachmentAdded(const KURL&, bool)), SLOT(slotAttachedFile(const KURL&)));
+ connect(this, TQT_SIGNAL(attachmentAdded(const KURL&, bool)), TQT_SLOT(slotAttachedFile(const KURL&)));
for( KURL::List::ConstIterator itr = urls.begin(); itr != urls.end(); ++itr ) {
if (!addAttach( *itr ))
mAttachFilesPending.remove(mAttachFilesPending.find(*itr)); // only remove one copy of the url
@@ -549,20 +549,20 @@ void KMComposeWin::slotAttachedFile(const KURL &url)
}
//-----------------------------------------------------------------------------
-void KMComposeWin::addAttachment(KURL url,QString /*comment*/)
+void KMComposeWin::addAttachment(KURL url,TQString /*comment*/)
{
addAttach(url);
}
//-----------------------------------------------------------------------------
-void KMComposeWin::addAttachment(const QString &name,
- const QCString &/*cte*/,
- const QByteArray &data,
- const QCString &type,
- const QCString &subType,
- const QCString &paramAttr,
- const QString &paramValue,
- const QCString &contDisp)
+void KMComposeWin::addAttachment(const TQString &name,
+ const TQCString &/*cte*/,
+ const TQByteArray &data,
+ const TQCString &type,
+ const TQCString &subType,
+ const TQCString &paramAttr,
+ const TQString &paramValue,
+ const TQCString &contDisp)
{
if (!data.isEmpty()) {
KMMessagePart *msgPart = new KMMessagePart;
@@ -570,7 +570,7 @@ void KMComposeWin::addAttachment(const QString &name,
if( type == "message" && subType == "rfc822" ) {
msgPart->setMessageBody( data );
} else {
- QValueList<int> dummy;
+ TQValueList<int> dummy;
msgPart->setBodyAndGuessCte(data, dummy,
kmkernel->msgSender()->sendQuotedPrintable());
}
@@ -583,29 +583,29 @@ void KMComposeWin::addAttachment(const QString &name,
}
//-----------------------------------------------------------------------------
-void KMComposeWin::slotAttachPNGImageData(const QByteArray &image)
+void KMComposeWin::slotAttachPNGImageData(const TQByteArray &image)
{
bool ok;
- QString attName = KInputDialog::getText( "KMail", i18n("Name of the attachment:"), QString::null, &ok, this );
+ TQString attName = KInputDialog::getText( "KMail", i18n("Name of the attachment:"), TQString::null, &ok, this );
if ( !ok )
return;
if ( !attName.lower().endsWith(".png") ) attName += ".png";
- addAttachment( attName, "base64", image, "image", "png", QCString(), QString(), QCString() );
+ addAttachment( attName, "base64", image, "image", "png", TQCString(), TQString(), TQCString() );
}
//-----------------------------------------------------------------------------
-void KMComposeWin::setBody(QString body)
+void KMComposeWin::setBody(TQString body)
{
mEditor->setText(body);
}
//-----------------------------------------------------------------------------
-bool KMComposeWin::event(QEvent *e)
+bool KMComposeWin::event(TQEvent *e)
{
- if (e->type() == QEvent::ApplicationPaletteChange)
+ if (e->type() == TQEvent::ApplicationPaletteChange)
{
readColorConfig();
}
@@ -617,8 +617,8 @@ bool KMComposeWin::event(QEvent *e)
void KMComposeWin::readColorConfig(void)
{
if ( GlobalSettings::self()->useDefaultColors() ) {
- mForeColor = QColor(kapp->palette().active().text());
- mBackColor = QColor(kapp->palette().active().base());
+ mForeColor = TQColor(kapp->palette().active().text());
+ mBackColor = TQColor(kapp->palette().active().base());
} else {
mForeColor = GlobalSettings::self()->foregroundColor();
mBackColor = GlobalSettings::self()->backgroundColor();
@@ -626,9 +626,9 @@ void KMComposeWin::readColorConfig(void)
// Color setup
mPalette = kapp->palette();
- QColorGroup cgrp = mPalette.active();
- cgrp.setColor( QColorGroup::Base, mBackColor);
- cgrp.setColor( QColorGroup::Text, mForeColor);
+ TQColorGroup cgrp = mPalette.active();
+ cgrp.setColor( TQColorGroup::Base, mBackColor);
+ cgrp.setColor( TQColorGroup::Text, mForeColor);
mPalette.setDisabled(cgrp);
mPalette.setActive(cgrp);
mPalette.setInactive(cgrp);
@@ -657,8 +657,8 @@ void KMComposeWin::readConfig( bool reload /* = false */ )
}
mBtnFcc->setChecked( GlobalSettings::self()->stickyFcc() );
mBtnTransport->setChecked( GlobalSettings::self()->stickyTransport() );
- QStringList transportHistory = GlobalSettings::self()->transportHistory();
- QString currentTransport = GlobalSettings::self()->currentTransport();
+ TQStringList transportHistory = GlobalSettings::self()->transportHistory();
+ TQString currentTransport = GlobalSettings::self()->currentTransport();
mEdtFrom->setCompletionMode( (KGlobalSettings::Completion)GlobalSettings::self()->completionMode() );
mEdtReplyTo->setCompletionMode( (KGlobalSettings::Completion)GlobalSettings::self()->completionMode() );
@@ -691,7 +691,7 @@ void KMComposeWin::readConfig( bool reload /* = false */ )
mEdtSubject->setFont(mBodyFont);
if ( !reload ) {
- QSize siz = GlobalSettings::self()->composerSize();
+ TQSize siz = GlobalSettings::self()->composerSize();
if (siz.width() < 200) siz.setWidth(200);
if (siz.height() < 200) siz.setHeight(200);
resize(siz);
@@ -699,7 +699,7 @@ void KMComposeWin::readConfig( bool reload /* = false */ )
if ( !GlobalSettings::self()->snippetSplitterPosition().isEmpty() ) {
mSnippetSplitter->setSizes( GlobalSettings::self()->snippetSplitterPosition() );
} else {
- QValueList<int> defaults;
+ TQValueList<int> defaults;
defaults << (int)(width() * 0.8) << (int)(width() * 0.2);
mSnippetSplitter->setSizes( defaults );
}
@@ -723,7 +723,7 @@ void KMComposeWin::readConfig( bool reload /* = false */ )
setTransport( currentTransport );
}
- QString fccName = "";
+ TQString fccName = "";
if ( mBtnFcc->isChecked() ) {
fccName = GlobalSettings::self()->previousFcc();
} else if ( !ident.fcc().isEmpty() ) {
@@ -745,7 +745,7 @@ void KMComposeWin::writeConfig(void)
GlobalSettings::self()->setPreviousFcc( mFcc->getFolder()->idString() );
GlobalSettings::self()->setAutoSpellChecking(
mAutoSpellCheckingAction->isChecked() );
- QStringList transportHistory = GlobalSettings::self()->transportHistory();
+ TQStringList transportHistory = GlobalSettings::self()->transportHistory();
transportHistory.remove(mTransport->currentText());
if (KMTransportInfo::availableTransports().findIndex(mTransport
->currentText()) == -1) {
@@ -776,8 +776,8 @@ void KMComposeWin::autoSaveMessage()
if ( mAutoSaveTimer )
mAutoSaveTimer->stop();
- connect( this, SIGNAL( applyChangesDone( bool ) ),
- this, SLOT( slotContinueAutoSave() ) );
+ connect( this, TQT_SIGNAL( applyChangesDone( bool ) ),
+ this, TQT_SLOT( slotContinueAutoSave() ) );
// This method is called when KMail crashed, so don't try signing/encryption
// and don't disable controls because it is also called from a timer and
// then the disabling is distracting.
@@ -788,8 +788,8 @@ void KMComposeWin::autoSaveMessage()
void KMComposeWin::slotContinueAutoSave()
{
- disconnect( this, SIGNAL( applyChangesDone( bool ) ),
- this, SLOT( slotContinueAutoSave() ) );
+ disconnect( this, TQT_SIGNAL( applyChangesDone( bool ) ),
+ this, TQT_SLOT( slotContinueAutoSave() ) );
// Ok, it's done now - continue dead letter saving
if ( mComposedMessages.isEmpty() ) {
@@ -802,7 +802,7 @@ void KMComposeWin::slotContinueAutoSave()
kdDebug(5006) << k_funcinfo << "opening autoSaveFile " << mAutoSaveFilename
<< endl;
- const QString filename =
+ const TQString filename =
KMKernel::localDataPath() + "autosave/cur/" + mAutoSaveFilename;
KSaveFile autoSaveFile( filename, 0600 );
int status = autoSaveFile.status();
@@ -904,7 +904,7 @@ int KMComposeWin::calcColumnWidth(int which, long allShowing, int width)
if ( (allShowing & which) == 0 )
return width;
- QLabel *w;
+ TQLabel *w;
if ( which == HDR_IDENTITY )
w = mLblIdentity;
else if ( which == HDR_DICTIONARY )
@@ -946,7 +946,7 @@ void KMComposeWin::rethinkFields(bool fromSlot)
delete mGrid;
- mGrid = new QGridLayout( mHeadersArea, numRows, 3, KDialogBase::marginHint()/2, KDialogBase::spacingHint());
+ mGrid = new TQGridLayout( mHeadersArea, numRows, 3, KDialogBase::marginHint()/2, KDialogBase::spacingHint());
mGrid->setColStretch(0, 1);
mGrid->setColStretch(1, 100);
mGrid->setColStretch(2, 1);
@@ -986,7 +986,7 @@ void KMComposeWin::rethinkFields(bool fromSlot)
rethinkHeaderLine(showHeaders,HDR_FROM, row, i18n("sender address field", "&From:"),
mLblFrom, mEdtFrom /*, mBtnFrom */ );
- QWidget *prevFocus = mEdtFrom;
+ TQWidget *prevFocus = mEdtFrom;
if (!fromSlot) mReplyToAction->setChecked(abs(mShowHeaders)&HDR_REPLY_TO);
rethinkHeaderLine(showHeaders,HDR_REPLY_TO,row,i18n("&Reply to:"),
@@ -1037,22 +1037,22 @@ void KMComposeWin::rethinkFields(bool fromSlot)
++row;
if ( showHeaders & HDR_REPLY_TO ) {
- connect( mEdtReplyTo, SIGNAL( focusDown() ), mRecipientsEditor,
- SLOT( setFocusTop() ) );
+ connect( mEdtReplyTo, TQT_SIGNAL( focusDown() ), mRecipientsEditor,
+ TQT_SLOT( setFocusTop() ) );
} else {
- connect( mEdtFrom, SIGNAL( focusDown() ), mRecipientsEditor,
- SLOT( setFocusTop() ) );
+ connect( mEdtFrom, TQT_SIGNAL( focusDown() ), mRecipientsEditor,
+ TQT_SLOT( setFocusTop() ) );
}
if ( showHeaders & HDR_REPLY_TO ) {
- connect( mRecipientsEditor, SIGNAL( focusUp() ), mEdtReplyTo, SLOT( setFocus() ) );
+ connect( mRecipientsEditor, TQT_SIGNAL( focusUp() ), mEdtReplyTo, TQT_SLOT( setFocus() ) );
} else {
- connect( mRecipientsEditor, SIGNAL( focusUp() ), mEdtFrom, SLOT( setFocus() ) );
+ connect( mRecipientsEditor, TQT_SIGNAL( focusUp() ), mEdtFrom, TQT_SLOT( setFocus() ) );
}
- connect( mRecipientsEditor, SIGNAL( focusDown() ), mEdtSubject,
- SLOT( setFocus() ) );
- connect( mEdtSubject, SIGNAL( focusUp() ), mRecipientsEditor,
- SLOT( setFocusBottom() ) );
+ connect( mRecipientsEditor, TQT_SIGNAL( focusDown() ), mEdtSubject,
+ TQT_SLOT( setFocus() ) );
+ connect( mEdtSubject, TQT_SIGNAL( focusUp() ), mRecipientsEditor,
+ TQT_SLOT( setFocusBottom() ) );
prevFocus = mRecipientsEditor;
}
@@ -1090,27 +1090,27 @@ void KMComposeWin::rethinkFields(bool fromSlot)
mRecipientsEditor->setFirstColumnWidth( mLabelWidth );
}
-QWidget *KMComposeWin::connectFocusMoving( QWidget *prev, QWidget *next )
+TQWidget *KMComposeWin::connectFocusMoving( TQWidget *prev, TQWidget *next )
{
- connect( prev, SIGNAL( focusDown() ), next, SLOT( setFocus() ) );
- connect( next, SIGNAL( focusUp() ), prev, SLOT( setFocus() ) );
+ connect( prev, TQT_SIGNAL( focusDown() ), next, TQT_SLOT( setFocus() ) );
+ connect( next, TQT_SIGNAL( focusUp() ), prev, TQT_SLOT( setFocus() ) );
return next;
}
//-----------------------------------------------------------------------------
void KMComposeWin::rethinkHeaderLine(int aValue, int aMask, int& aRow,
- const QString &aLabelStr, QLabel* aLbl,
- QLineEdit* aEdt, QPushButton* aBtn,
- const QString &toolTip, const QString &whatsThis )
+ const TQString &aLabelStr, TQLabel* aLbl,
+ TQLineEdit* aEdt, TQPushButton* aBtn,
+ const TQString &toolTip, const TQString &whatsThis )
{
if (aValue & aMask)
{
aLbl->setText(aLabelStr);
if ( !toolTip.isEmpty() )
- QToolTip::add( aLbl, toolTip );
+ TQToolTip::add( aLbl, toolTip );
if ( !whatsThis.isEmpty() )
- QWhatsThis::add( aLbl, whatsThis );
+ TQWhatsThis::add( aLbl, whatsThis );
aLbl->setFixedWidth( mLabelWidth );
aLbl->setBuddy(aEdt);
mGrid->addWidget(aLbl, aRow, 0);
@@ -1137,8 +1137,8 @@ void KMComposeWin::rethinkHeaderLine(int aValue, int aMask, int& aRow,
//-----------------------------------------------------------------------------
void KMComposeWin::rethinkHeaderLine(int aValue, int aMask, int& aRow,
- const QString &aLabelStr, QLabel* aLbl,
- QComboBox* aCbx, QCheckBox* aChk)
+ const TQString &aLabelStr, TQLabel* aLbl,
+ TQComboBox* aCbx, TQCheckBox* aChk)
{
if (aValue & aMask)
{
@@ -1172,12 +1172,12 @@ void KMComposeWin::rethinkHeaderLine(int aValue, int aMask, int& aRow,
//-----------------------------------------------------------------------------
void KMComposeWin::getTransportMenu()
{
- QStringList availTransports;
+ TQStringList availTransports;
mActNowMenu->clear();
mActLaterMenu->clear();
availTransports = KMail::TransportManager::transportNames();
- QStringList::Iterator it;
+ TQStringList::Iterator it;
int id = 0;
for(it = availTransports.begin(); it != availTransports.end() ; ++it, id++)
{
@@ -1196,14 +1196,14 @@ void KMComposeWin::setupActions(void)
{
//default = send now, alternative = queue
( void ) new KAction( i18n("&Send Mail"), "mail_send", CTRL+Key_Return,
- this, SLOT(slotSendNow()), actionCollection(),"send_default");
+ this, TQT_SLOT(slotSendNow()), actionCollection(),"send_default");
// FIXME: change to mail_send_via icon when this exits.
actActionNowMenu = new KActionMenu (i18n("&Send Mail Via"), "mail_send",
actionCollection(), "send_default_via" );
(void) new KAction (i18n("Send &Later"), "queue", 0, this,
- SLOT(slotSendLater()), actionCollection(),"send_alternative");
+ TQT_SLOT(slotSendLater()), actionCollection(),"send_alternative");
actActionLaterMenu = new KActionMenu (i18n("Send &Later Via"), "queue",
actionCollection(), "send_alternative_via" );
@@ -1213,12 +1213,12 @@ void KMComposeWin::setupActions(void)
//default = queue, alternative = send now
(void) new KAction (i18n("Send &Later"), "queue",
CTRL+Key_Return,
- this, SLOT(slotSendLater()), actionCollection(),"send_default");
+ this, TQT_SLOT(slotSendLater()), actionCollection(),"send_default");
actActionLaterMenu = new KActionMenu (i18n("Send &Later Via"), "queue",
actionCollection(), "send_default_via" );
( void ) new KAction( i18n("&Send Mail"), "mail_send", 0,
- this, SLOT(slotSendNow()), actionCollection(),"send_alternative");
+ this, TQT_SLOT(slotSendNow()), actionCollection(),"send_alternative");
// FIXME: change to mail_send_via icon when this exits.
actActionNowMenu = new KActionMenu (i18n("&Send Mail Via"), "mail_send",
@@ -1230,98 +1230,98 @@ void KMComposeWin::setupActions(void)
actActionNowMenu->setDelayed(true);
actActionLaterMenu->setDelayed(true);
- connect( actActionNowMenu, SIGNAL( activated() ), this,
- SLOT( slotSendNow() ) );
- connect( actActionLaterMenu, SIGNAL( activated() ), this,
- SLOT( slotSendLater() ) );
+ connect( actActionNowMenu, TQT_SIGNAL( activated() ), this,
+ TQT_SLOT( slotSendNow() ) );
+ connect( actActionLaterMenu, TQT_SIGNAL( activated() ), this,
+ TQT_SLOT( slotSendLater() ) );
mActNowMenu = actActionNowMenu->popupMenu();
mActLaterMenu = actActionLaterMenu->popupMenu();
- connect( mActNowMenu, SIGNAL( activated( int ) ), this,
- SLOT( slotSendNowVia( int ) ) );
- connect( mActNowMenu, SIGNAL( aboutToShow() ), this,
- SLOT( getTransportMenu() ) );
+ connect( mActNowMenu, TQT_SIGNAL( activated( int ) ), this,
+ TQT_SLOT( slotSendNowVia( int ) ) );
+ connect( mActNowMenu, TQT_SIGNAL( aboutToShow() ), this,
+ TQT_SLOT( getTransportMenu() ) );
- connect( mActLaterMenu, SIGNAL( activated( int ) ), this,
- SLOT( slotSendLaterVia( int ) ) );
- connect( mActLaterMenu, SIGNAL( aboutToShow() ), this,
- SLOT( getTransportMenu() ) );
+ connect( mActLaterMenu, TQT_SIGNAL( activated( int ) ), this,
+ TQT_SLOT( slotSendLaterVia( int ) ) );
+ connect( mActLaterMenu, TQT_SIGNAL( aboutToShow() ), this,
+ TQT_SLOT( getTransportMenu() ) );
(void) new KAction (i18n("Save as &Draft"), "filesave", 0,
- this, SLOT(slotSaveDraft()),
+ this, TQT_SLOT(slotSaveDraft()),
actionCollection(), "save_in_drafts");
(void) new KAction (i18n("Save as &Template"), "filesave", 0,
- this, SLOT(slotSaveTemplate()),
+ this, TQT_SLOT(slotSaveTemplate()),
actionCollection(), "save_in_templates");
(void) new KAction (i18n("&Insert File..."), "fileopen", 0,
- this, SLOT(slotInsertFile()),
+ this, TQT_SLOT(slotInsertFile()),
actionCollection(), "insert_file");
mRecentAction = new KRecentFilesAction (i18n("&Insert File Recent"),
"fileopen", 0,
- this, SLOT(slotInsertRecentFile(const KURL&)),
+ this, TQT_SLOT(slotInsertRecentFile(const KURL&)),
actionCollection(), "insert_file_recent");
mRecentAction->loadEntries( KMKernel::config() );
(void) new KAction (i18n("&Address Book"), "contents",0,
- this, SLOT(slotAddrBook()),
+ this, TQT_SLOT(slotAddrBook()),
actionCollection(), "addressbook");
(void) new KAction (i18n("&New Composer"), "mail_new",
KStdAccel::shortcut(KStdAccel::New),
- this, SLOT(slotNewComposer()),
+ this, TQT_SLOT(slotNewComposer()),
actionCollection(), "new_composer");
(void) new KAction (i18n("New Main &Window"), "window_new", 0,
- this, SLOT(slotNewMailReader()),
+ this, TQT_SLOT(slotNewMailReader()),
actionCollection(), "open_mailreader");
if ( !mClassicalRecipients ) {
new KAction( i18n("Select &Recipients..."), CTRL + Key_L, mRecipientsEditor,
- SLOT( selectRecipients() ), actionCollection(), "select_recipients" );
+ TQT_SLOT( selectRecipients() ), actionCollection(), "select_recipients" );
new KAction( i18n("Save &Distribution List..."), 0, mRecipientsEditor,
- SLOT( saveDistributionList() ), actionCollection(),
+ TQT_SLOT( saveDistributionList() ), actionCollection(),
"save_distribution_list" );
}
- //KStdAction::save(this, SLOT(), actionCollection(), "save_message");
- KStdAction::print (this, SLOT(slotPrint()), actionCollection());
- KStdAction::close (this, SLOT(slotClose()), actionCollection());
+ //KStdAction::save(this, TQT_SLOT(), actionCollection(), "save_message");
+ KStdAction::print (this, TQT_SLOT(slotPrint()), actionCollection());
+ KStdAction::close (this, TQT_SLOT(slotClose()), actionCollection());
- KStdAction::undo (this, SLOT(slotUndo()), actionCollection());
- KStdAction::redo (this, SLOT(slotRedo()), actionCollection());
- KStdAction::cut (this, SLOT(slotCut()), actionCollection());
- KStdAction::copy (this, SLOT(slotCopy()), actionCollection());
- KStdAction::pasteText (this, SLOT(slotPasteClipboard()), actionCollection());
- KStdAction::selectAll (this, SLOT(slotMarkAll()), actionCollection());
+ KStdAction::undo (this, TQT_SLOT(slotUndo()), actionCollection());
+ KStdAction::redo (this, TQT_SLOT(slotRedo()), actionCollection());
+ KStdAction::cut (this, TQT_SLOT(slotCut()), actionCollection());
+ KStdAction::copy (this, TQT_SLOT(slotCopy()), actionCollection());
+ KStdAction::pasteText (this, TQT_SLOT(slotPasteClipboard()), actionCollection());
+ KStdAction::selectAll (this, TQT_SLOT(slotMarkAll()), actionCollection());
- KStdAction::find (this, SLOT(slotFind()), actionCollection());
- KStdAction::findNext(this, SLOT(slotSearchAgain()), actionCollection());
+ KStdAction::find (this, TQT_SLOT(slotFind()), actionCollection());
+ KStdAction::findNext(this, TQT_SLOT(slotSearchAgain()), actionCollection());
- KStdAction::replace (this, SLOT(slotReplace()), actionCollection());
- KStdAction::spelling (this, SLOT(slotSpellcheck()), actionCollection(), "spellcheck");
+ KStdAction::replace (this, TQT_SLOT(slotReplace()), actionCollection());
+ KStdAction::spelling (this, TQT_SLOT(slotSpellcheck()), actionCollection(), "spellcheck");
- mPasteQuotation = new KAction (i18n("Pa&ste as Quotation"),0,this,SLOT( slotPasteClipboardAsQuotation()),
+ mPasteQuotation = new KAction (i18n("Pa&ste as Quotation"),0,this,TQT_SLOT( slotPasteClipboardAsQuotation()),
actionCollection(), "paste_quoted");
- (void) new KAction (i18n("Paste as Attac&hment"),0,this,SLOT( slotPasteClipboardAsAttachment()),
+ (void) new KAction (i18n("Paste as Attac&hment"),0,this,TQT_SLOT( slotPasteClipboardAsAttachment()),
actionCollection(), "paste_att");
mAddQuoteChars = new KAction(i18n("Add &Quote Characters"), 0, this,
- SLOT(slotAddQuotes()), actionCollection(), "tools_quote");
+ TQT_SLOT(slotAddQuotes()), actionCollection(), "tools_quote");
mRemQuoteChars = new KAction(i18n("Re&move Quote Characters"), 0, this,
- SLOT(slotRemoveQuotes()), actionCollection(), "tools_unquote");
+ TQT_SLOT(slotRemoveQuotes()), actionCollection(), "tools_unquote");
- (void) new KAction (i18n("Cl&ean Spaces"), 0, this, SLOT(slotCleanSpace()),
+ (void) new KAction (i18n("Cl&ean Spaces"), 0, this, TQT_SLOT(slotCleanSpace()),
actionCollection(), "clean_spaces");
mFixedFontAction = new KToggleAction( i18n("Use Fi&xed Font"), 0, this,
- SLOT(slotUpdateFont()), actionCollection(), "toggle_fixedfont" );
+ TQT_SLOT(slotUpdateFont()), actionCollection(), "toggle_fixedfont" );
mFixedFontAction->setChecked( GlobalSettings::self()->useFixedFont() );
//these are checkable!!!
@@ -1334,16 +1334,16 @@ void KMComposeWin::setupActions(void)
mRequestMDNAction->setChecked(GlobalSettings::self()->requestMDN());
//----- Message-Encoding Submenu
mEncodingAction = new KSelectAction( i18n( "Se&t Encoding" ), "charset",
- 0, this, SLOT(slotSetCharset() ),
+ 0, this, TQT_SLOT(slotSetCharset() ),
actionCollection(), "charsets" );
mWordWrapAction = new KToggleAction (i18n("&Wordwrap"), 0,
actionCollection(), "wordwrap");
mWordWrapAction->setChecked(GlobalSettings::self()->wordWrap());
- connect(mWordWrapAction, SIGNAL(toggled(bool)), SLOT(slotWordWrapToggled(bool)));
+ connect(mWordWrapAction, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotWordWrapToggled(bool)));
mSnippetAction = new KToggleAction ( i18n("&Snippets"), 0,
actionCollection(), "snippets");
- connect(mSnippetAction, SIGNAL(toggled(bool)), mSnippetWidget, SLOT(setShown(bool)) );
+ connect(mSnippetAction, TQT_SIGNAL(toggled(bool)), mSnippetWidget, TQT_SLOT(setShown(bool)) );
mSnippetAction->setChecked( GlobalSettings::self()->showSnippetManager() );
mAutoSpellCheckingAction =
@@ -1353,93 +1353,93 @@ void KMComposeWin::setupActions(void)
mAutoSpellCheckingAction->setEnabled( !GlobalSettings::self()->useExternalEditor() );
mAutoSpellCheckingAction->setChecked( !GlobalSettings::self()->useExternalEditor() && spellChecking );
slotAutoSpellCheckingToggled( !GlobalSettings::self()->useExternalEditor() && spellChecking );
- connect( mAutoSpellCheckingAction, SIGNAL( toggled( bool ) ),
- this, SLOT( slotAutoSpellCheckingToggled( bool ) ) );
+ connect( mAutoSpellCheckingAction, TQT_SIGNAL( toggled( bool ) ),
+ this, TQT_SLOT( slotAutoSpellCheckingToggled( bool ) ) );
- QStringList encodings = KMMsgBase::supportedEncodings(true);
+ TQStringList encodings = KMMsgBase::supportedEncodings(true);
encodings.prepend( i18n("Auto-Detect"));
mEncodingAction->setItems( encodings );
mEncodingAction->setCurrentItem( -1 );
//these are checkable!!!
markupAction = new KToggleAction (i18n("Formatting (HTML)"), 0, this,
- SLOT(slotToggleMarkup()),
+ TQT_SLOT(slotToggleMarkup()),
actionCollection(), "html");
mAllFieldsAction = new KToggleAction (i18n("&All Fields"), 0, this,
- SLOT(slotView()),
+ TQT_SLOT(slotView()),
actionCollection(), "show_all_fields");
mIdentityAction = new KToggleAction (i18n("&Identity"), 0, this,
- SLOT(slotView()),
+ TQT_SLOT(slotView()),
actionCollection(), "show_identity");
mDictionaryAction = new KToggleAction (i18n("&Dictionary"), 0, this,
- SLOT(slotView()),
+ TQT_SLOT(slotView()),
actionCollection(), "show_dictionary");
mFccAction = new KToggleAction (i18n("&Sent-Mail Folder"), 0, this,
- SLOT(slotView()),
+ TQT_SLOT(slotView()),
actionCollection(), "show_fcc");
mTransportAction = new KToggleAction (i18n("&Mail Transport"), 0, this,
- SLOT(slotView()),
+ TQT_SLOT(slotView()),
actionCollection(), "show_transport");
mFromAction = new KToggleAction (i18n("&From"), 0, this,
- SLOT(slotView()),
+ TQT_SLOT(slotView()),
actionCollection(), "show_from");
mReplyToAction = new KToggleAction (i18n("&Reply To"), 0, this,
- SLOT(slotView()),
+ TQT_SLOT(slotView()),
actionCollection(), "show_reply_to");
if ( mClassicalRecipients ) {
mToAction = new KToggleAction (i18n("&To"), 0, this,
- SLOT(slotView()),
+ TQT_SLOT(slotView()),
actionCollection(), "show_to");
mCcAction = new KToggleAction (i18n("&CC"), 0, this,
- SLOT(slotView()),
+ TQT_SLOT(slotView()),
actionCollection(), "show_cc");
mBccAction = new KToggleAction (i18n("&BCC"), 0, this,
- SLOT(slotView()),
+ TQT_SLOT(slotView()),
actionCollection(), "show_bcc");
}
mSubjectAction = new KToggleAction (i18n("S&ubject"), 0, this,
- SLOT(slotView()),
+ TQT_SLOT(slotView()),
actionCollection(), "show_subject");
//end of checkable
mAppendSignatureAction = new KAction (i18n("Append S&ignature"), 0, this,
- SLOT(slotAppendSignature()),
+ TQT_SLOT(slotAppendSignature()),
actionCollection(), "append_signature");
mPrependSignatureAction = new KAction (i18n("Prepend S&ignature"), 0, this,
- SLOT(slotPrependSignature()),
+ TQT_SLOT(slotPrependSignature()),
actionCollection(), "prepend_signature");
mInsertSignatureAction = new KAction (i18n("Insert Signature At C&ursor Position"), "edit", 0, this,
- SLOT(slotInsertSignatureAtCursor()),
+ TQT_SLOT(slotInsertSignatureAtCursor()),
actionCollection(), "insert_signature_at_cursor_position");
mAttachPK = new KAction (i18n("Attach &Public Key..."), 0, this,
- SLOT(slotInsertPublicKey()),
+ TQT_SLOT(slotInsertPublicKey()),
actionCollection(), "attach_public_key");
mAttachMPK = new KAction (i18n("Attach &My Public Key"), 0, this,
- SLOT(slotInsertMyPublicKey()),
+ TQT_SLOT(slotInsertMyPublicKey()),
actionCollection(), "attach_my_public_key");
(void) new KAction (i18n("&Attach File..."), "attach",
- 0, this, SLOT(slotAttachFile()),
+ 0, this, TQT_SLOT(slotAttachFile()),
actionCollection(), "attach");
mAttachRemoveAction = new KAction (i18n("&Remove Attachment"), 0, this,
- SLOT(slotAttachRemove()),
+ TQT_SLOT(slotAttachRemove()),
actionCollection(), "remove");
mAttachSaveAction = new KAction (i18n("&Save Attachment As..."), "filesave",0,
- this, SLOT(slotAttachSave()),
+ this, TQT_SLOT(slotAttachSave()),
actionCollection(), "attach_save");
mAttachPropertiesAction = new KAction (i18n("Attachment Pr&operties"), 0, this,
- SLOT(slotAttachProperties()),
+ TQT_SLOT(slotAttachProperties()),
actionCollection(), "attach_properties");
setStandardToolBarMenuEnabled(true);
- KStdAction::keyBindings(this, SLOT(slotEditKeys()), actionCollection());
- KStdAction::configureToolbars(this, SLOT(slotEditToolbars()), actionCollection());
- KStdAction::preferences(kmkernel, SLOT(slotShowConfigurationDialog()), actionCollection());
+ KStdAction::keyBindings(this, TQT_SLOT(slotEditKeys()), actionCollection());
+ KStdAction::configureToolbars(this, TQT_SLOT(slotEditToolbars()), actionCollection());
+ KStdAction::preferences(kmkernel, TQT_SLOT(slotShowConfigurationDialog()), actionCollection());
- (void) new KAction (i18n("&Spellchecker..."), 0, this, SLOT(slotSpellcheckConfig()),
+ (void) new KAction (i18n("&Spellchecker..."), 0, this, TQT_SLOT(slotSpellcheckConfig()),
actionCollection(), "setup_spellchecker");
if ( Kleo::CryptoBackendFactory::instance()->protocol( "Chiasmus" ) ) {
@@ -1448,8 +1448,8 @@ void KMComposeWin::setupActions(void)
"encrypt_message_chiasmus" );
a->setCheckedState( KGuiItem( i18n( "Encrypt Message with Chiasmus..." ), "chiencrypted" ) );
mEncryptChiasmusAction = a;
- connect( mEncryptChiasmusAction, SIGNAL(toggled(bool)),
- this, SLOT(slotEncryptChiasmusToggled(bool)) );
+ connect( mEncryptChiasmusAction, TQT_SIGNAL(toggled(bool)),
+ this, TQT_SLOT(slotEncryptChiasmusToggled(bool)) );
} else {
mEncryptChiasmusAction = 0;
}
@@ -1495,23 +1495,23 @@ void KMComposeWin::setupActions(void)
setSigning( ( canOpenPGPSign || canSMIMESign ) && GlobalSettings::self()->pgpAutoSign() );
}
- connect(mEncryptAction, SIGNAL(toggled(bool)),
- SLOT(slotEncryptToggled( bool )));
- connect(mSignAction, SIGNAL(toggled(bool)),
- SLOT(slotSignToggled( bool )));
+ connect(mEncryptAction, TQT_SIGNAL(toggled(bool)),
+ TQT_SLOT(slotEncryptToggled( bool )));
+ connect(mSignAction, TQT_SIGNAL(toggled(bool)),
+ TQT_SLOT(slotSignToggled( bool )));
- QStringList l;
+ TQStringList l;
for ( int i = 0 ; i < numCryptoMessageFormats ; ++i )
l.push_back( Kleo::cryptoMessageFormatToLabel( cryptoMessageFormats[i] ) );
mCryptoModuleAction = new KSelectAction( i18n( "&Cryptographic Message Format" ), 0,
- this, SLOT(slotSelectCryptoModule()),
+ this, TQT_SLOT(slotSelectCryptoModule()),
actionCollection(), "options_select_crypto" );
mCryptoModuleAction->setItems( l );
mCryptoModuleAction->setCurrentItem( format2cb( ident.preferredCryptoMessageFormat() ) );
slotSelectCryptoModule( true /* initialize */ );
- QStringList styleItems;
+ TQStringList styleItems;
styleItems << i18n( "Standard" );
styleItems << i18n( "Bulleted List (Disc)" );
styleItems << i18n( "Bulleted List (Circle)" );
@@ -1523,48 +1523,48 @@ void KMComposeWin::setupActions(void)
listAction = new KSelectAction( i18n( "Select Style" ), 0, actionCollection(),
"text_list" );
listAction->setItems( styleItems );
- connect( listAction, SIGNAL( activated( const QString& ) ),
- SLOT( slotListAction( const QString& ) ) );
+ connect( listAction, TQT_SIGNAL( activated( const TQString& ) ),
+ TQT_SLOT( slotListAction( const TQString& ) ) );
fontAction = new KFontAction( "Select Font", 0, actionCollection(),
"text_font" );
- connect( fontAction, SIGNAL( activated( const QString& ) ),
- SLOT( slotFontAction( const QString& ) ) );
+ connect( fontAction, TQT_SIGNAL( activated( const TQString& ) ),
+ TQT_SLOT( slotFontAction( const TQString& ) ) );
fontSizeAction = new KFontSizeAction( "Select Size", 0, actionCollection(),
"text_size" );
- connect( fontSizeAction, SIGNAL( fontSizeChanged( int ) ),
- SLOT( slotSizeAction( int ) ) );
+ connect( fontSizeAction, TQT_SIGNAL( fontSizeChanged( int ) ),
+ TQT_SLOT( slotSizeAction( int ) ) );
alignLeftAction = new KToggleAction (i18n("Align Left"), "text_left", 0,
- this, SLOT(slotAlignLeft()), actionCollection(),
+ this, TQT_SLOT(slotAlignLeft()), actionCollection(),
"align_left");
alignLeftAction->setChecked( true );
alignRightAction = new KToggleAction (i18n("Align Right"), "text_right", 0,
- this, SLOT(slotAlignRight()), actionCollection(),
+ this, TQT_SLOT(slotAlignRight()), actionCollection(),
"align_right");
alignCenterAction = new KToggleAction (i18n("Align Center"), "text_center", 0,
- this, SLOT(slotAlignCenter()), actionCollection(),
+ this, TQT_SLOT(slotAlignCenter()), actionCollection(),
"align_center");
textBoldAction = new KToggleAction( i18n("&Bold"), "text_bold", CTRL+Key_B,
- this, SLOT(slotTextBold()),
+ this, TQT_SLOT(slotTextBold()),
actionCollection(), "text_bold");
textItalicAction = new KToggleAction( i18n("&Italic"), "text_italic", CTRL+Key_I,
- this, SLOT(slotTextItalic()),
+ this, TQT_SLOT(slotTextItalic()),
actionCollection(), "text_italic");
textUnderAction = new KToggleAction( i18n("&Underline"), "text_under", CTRL+Key_U,
- this, SLOT(slotTextUnder()),
+ this, TQT_SLOT(slotTextUnder()),
actionCollection(), "text_under");
actionFormatReset = new KAction( i18n( "Reset Font Settings" ), "eraser", 0,
- this, SLOT( slotFormatReset() ),
+ this, TQT_SLOT( slotFormatReset() ),
actionCollection(), "format_reset");
actionFormatColor = new KAction( i18n( "Text Color..." ), "colorize", 0,
- this, SLOT( slotTextColor() ),
+ this, TQT_SLOT( slotTextColor() ),
actionCollection(), "format_color");
// editorFocusChanged(false);
createGUI("kmcomposerui.rc");
- connect( toolBar("htmlToolBar"), SIGNAL( visibilityChanged(bool) ),
- this, SLOT( htmlToolBarVisibilityChanged(bool) ) );
+ connect( toolBar("htmlToolBar"), TQT_SIGNAL( visibilityChanged(bool) ),
+ this, TQT_SLOT( htmlToolBarVisibilityChanged(bool) ) );
// In Kontact, this entry would read "Configure Kontact", but bring
// up KMail's config dialog. That's sensible, though, so fix the label.
@@ -1589,7 +1589,7 @@ void KMComposeWin::setupStatusBar(void)
void KMComposeWin::updateCursorPosition()
{
int col,line;
- QString temp;
+ TQString temp;
line = mEditor->currentLine();
col = mEditor->currentColumn();
temp = i18n(" Line: %1 ").arg(line+1);
@@ -1602,11 +1602,11 @@ void KMComposeWin::updateCursorPosition()
//-----------------------------------------------------------------------------
void KMComposeWin::setupEditor(void)
{
- //QPopupMenu* menu;
+ //TQPopupMenu* menu;
mEditor->setModified(false);
- QFontMetrics fm(mBodyFont);
- mEditor->setTabStopWidth(fm.width(QChar(' ')) * 8);
- //mEditor->setFocusPolicy(QWidget::ClickFocus);
+ TQFontMetrics fm(mBodyFont);
+ mEditor->setTabStopWidth(fm.width(TQChar(' ')) * 8);
+ //mEditor->setFocusPolicy(TQWidget::ClickFocus);
slotWordWrapToggled( GlobalSettings::self()->wordWrap() );
@@ -1615,110 +1615,110 @@ void KMComposeWin::setupEditor(void)
/* installRBPopup() is broken in kdelibs, we should wait for
the new klibtextedit (dnaber, 2002-01-01)
- menu = new QPopupMenu(this);
+ menu = new TQPopupMenu(this);
//#ifdef BROKEN
menu->insertItem(i18n("Undo"),mEditor,
- SLOT(undo()), KStdAccel::shortcut(KStdAccel::Undo));
+ TQT_SLOT(undo()), KStdAccel::shortcut(KStdAccel::Undo));
menu->insertItem(i18n("Redo"),mEditor,
- SLOT(redo()), KStdAccel::shortcut(KStdAccel::Redo));
+ TQT_SLOT(redo()), KStdAccel::shortcut(KStdAccel::Redo));
menu->insertSeparator();
//#endif //BROKEN
- menu->insertItem(i18n("Cut"), this, SLOT(slotCut()));
- menu->insertItem(i18n("Copy"), this, SLOT(slotCopy()));
- menu->insertItem(i18n("Paste"), this, SLOT(slotPasteClipboard()));
- menu->insertItem(i18n("Mark All"),this, SLOT(slotMarkAll()));
+ menu->insertItem(i18n("Cut"), this, TQT_SLOT(slotCut()));
+ menu->insertItem(i18n("Copy"), this, TQT_SLOT(slotCopy()));
+ menu->insertItem(i18n("Paste"), this, TQT_SLOT(slotPasteClipboard()));
+ menu->insertItem(i18n("Mark All"),this, TQT_SLOT(slotMarkAll()));
menu->insertSeparator();
- menu->insertItem(i18n("Find..."), this, SLOT(slotFind()));
- menu->insertItem(i18n("Replace..."), this, SLOT(slotReplace()));
+ menu->insertItem(i18n("Find..."), this, TQT_SLOT(slotFind()));
+ menu->insertItem(i18n("Replace..."), this, TQT_SLOT(slotReplace()));
menu->insertSeparator();
- menu->insertItem(i18n("Fixed Font Widths"), this, SLOT(slotUpdateFont()));
+ menu->insertItem(i18n("Fixed Font Widths"), this, TQT_SLOT(slotUpdateFont()));
mEditor->installRBPopup(menu);
*/
updateCursorPosition();
- connect(mEditor,SIGNAL(CursorPositionChanged()),SLOT(updateCursorPosition()));
- connect( mEditor, SIGNAL( currentFontChanged( const QFont & ) ),
- this, SLOT( fontChanged( const QFont & ) ) );
- connect( mEditor, SIGNAL( currentAlignmentChanged( int ) ),
- this, SLOT( alignmentChanged( int ) ) );
+ connect(mEditor,TQT_SIGNAL(CursorPositionChanged()),TQT_SLOT(updateCursorPosition()));
+ connect( mEditor, TQT_SIGNAL( currentFontChanged( const TQFont & ) ),
+ this, TQT_SLOT( fontChanged( const TQFont & ) ) );
+ connect( mEditor, TQT_SIGNAL( currentAlignmentChanged( int ) ),
+ this, TQT_SLOT( alignmentChanged( int ) ) );
}
//-----------------------------------------------------------------------------
-static QString cleanedUpHeaderString( const QString & s )
+static TQString cleanedUpHeaderString( const TQString & s )
{
// remove invalid characters from the header strings
- QString res( s );
+ TQString res( s );
res.replace( '\r', "" );
res.replace( '\n', " " );
return res.stripWhiteSpace();
}
//-----------------------------------------------------------------------------
-QString KMComposeWin::subject() const
+TQString KMComposeWin::subject() const
{
return cleanedUpHeaderString( mEdtSubject->text() );
}
//-----------------------------------------------------------------------------
-QString KMComposeWin::to() const
+TQString KMComposeWin::to() const
{
if ( mEdtTo ) {
return cleanedUpHeaderString( mEdtTo->text() );
} else if ( mRecipientsEditor ) {
return mRecipientsEditor->recipientString( Recipient::To );
} else {
- return QString::null;
+ return TQString::null;
}
}
//-----------------------------------------------------------------------------
-QString KMComposeWin::cc() const
+TQString KMComposeWin::cc() const
{
if ( mEdtCc && !mEdtCc->isHidden() ) {
return cleanedUpHeaderString( mEdtCc->text() );
} else if ( mRecipientsEditor ) {
return mRecipientsEditor->recipientString( Recipient::Cc );
} else {
- return QString::null;
+ return TQString::null;
}
}
//-----------------------------------------------------------------------------
-QString KMComposeWin::bcc() const
+TQString KMComposeWin::bcc() const
{
if ( mEdtBcc && !mEdtBcc->isHidden() ) {
return cleanedUpHeaderString( mEdtBcc->text() );
} else if ( mRecipientsEditor ) {
return mRecipientsEditor->recipientString( Recipient::Bcc );
} else {
- return QString::null;
+ return TQString::null;
}
}
//-----------------------------------------------------------------------------
-QString KMComposeWin::from() const
+TQString KMComposeWin::from() const
{
return cleanedUpHeaderString( mEdtFrom->text() );
}
//-----------------------------------------------------------------------------
-QString KMComposeWin::replyTo() const
+TQString KMComposeWin::replyTo() const
{
if ( mEdtReplyTo ) {
return cleanedUpHeaderString( mEdtReplyTo->text() );
} else {
- return QString::null;
+ return TQString::null;
}
}
//-----------------------------------------------------------------------------
-void KMComposeWin::verifyWordWrapLengthIsAdequate(const QString &body)
+void KMComposeWin::verifyWordWrapLengthIsAdequate(const TQString &body)
{
int maxLineLength = 0;
int curPos;
int oldPos = 0;
- if (mEditor->QTextEdit::wordWrap() == QTextEdit::FixedColumnWidth) {
+ if (mEditor->TQTextEdit::wordWrap() == TQTextEdit::FixedColumnWidth) {
for (curPos = 0; curPos < (int)body.length(); ++curPos)
if (body[curPos] == '\n') {
if ((curPos - oldPos) > maxLineLength)
@@ -1733,10 +1733,10 @@ void KMComposeWin::verifyWordWrapLengthIsAdequate(const QString &body)
}
//-----------------------------------------------------------------------------
-void KMComposeWin::decryptOrStripOffCleartextSignature( QCString& body )
+void KMComposeWin::decryptOrStripOffCleartextSignature( TQCString& body )
{
- QPtrList<Kpgp::Block> pgpBlocks;
- QStrList nonPgpBlocks;
+ TQPtrList<Kpgp::Block> pgpBlocks;
+ TQStrList nonPgpBlocks;
if( Kpgp::Module::prepareMessageForDecryption( body,
pgpBlocks, nonPgpBlocks ) )
{
@@ -1764,7 +1764,7 @@ void KMComposeWin::decryptOrStripOffCleartextSignature( QCString& body )
}
//-----------------------------------------------------------------------------
-void KMComposeWin::setTransport( const QString & transport )
+void KMComposeWin::setTransport( const TQString & transport )
{
kdDebug(5006) << "KMComposeWin::setTransport( \"" << transport << "\" )" << endl;
// Don't change the transport combobox if transport is empty
@@ -1829,15 +1829,15 @@ void KMComposeWin::setMsg(KMMessage* newMsg, bool mayAutoSign,
// don't overwrite the header values with identity specific values
// unless the identity is sticky
if ( !stickyIdentity ) {
- disconnect(mIdentity,SIGNAL(identityChanged(uint)),
- this, SLOT(slotIdentityChanged(uint)));
+ disconnect(mIdentity,TQT_SIGNAL(identityChanged(uint)),
+ this, TQT_SLOT(slotIdentityChanged(uint)));
}
// load the mId into the gui, sticky or not, without emitting
mIdentity->setCurrentIdentity( mId );
const uint idToApply = mId;
if ( !stickyIdentity ) {
- connect(mIdentity,SIGNAL(identityChanged(uint)),
- this, SLOT(slotIdentityChanged(uint)));
+ connect(mIdentity,TQT_SIGNAL(identityChanged(uint)),
+ this, TQT_SLOT(slotIdentityChanged(uint)));
} else {
// load the message's state into the mId, without applying it to the gui
// that's so we can detect that the id changed (because a sticky was set)
@@ -1856,7 +1856,7 @@ void KMComposeWin::setMsg(KMMessage* newMsg, bool mayAutoSign,
// check for the presence of a DNT header, indicating that MDN's were
// requested
- QString mdnAddr = newMsg->headerField("Disposition-Notification-To");
+ TQString mdnAddr = newMsg->headerField("Disposition-Notification-To");
mRequestMDNAction->setChecked( ( !mdnAddr.isEmpty() &&
im->thatIsMe( mdnAddr ) ) ||
GlobalSettings::self()->requestMDN() );
@@ -1868,7 +1868,7 @@ void KMComposeWin::setMsg(KMMessage* newMsg, bool mayAutoSign,
mMsg->removeHeaderField("X-Face");
else
{
- QString xface = ident.xface();
+ TQString xface = ident.xface();
if (!xface.isEmpty())
{
int numNL = ( xface.length() - 1 ) / 70;
@@ -1932,7 +1932,7 @@ void KMComposeWin::setMsg(KMMessage* newMsg, bool mayAutoSign,
mAttachMPK->setEnabled( Kleo::CryptoBackendFactory::instance()->openpgp() &&
!ident.pgpEncryptionKey().isEmpty() );
- QString transport = newMsg->headerField("X-KMail-Transport");
+ TQString transport = newMsg->headerField("X-KMail-Transport");
if (!mBtnTransport->isChecked() && !transport.isEmpty())
setTransport( transport );
@@ -1972,14 +1972,14 @@ void KMComposeWin::setMsg(KMMessage* newMsg, bool mayAutoSign,
// get cte decoded body part
mCharset = n->msgPart().charset();
- QCString bodyDecoded = n->msgPart().bodyDecoded();
+ TQCString bodyDecoded = n->msgPart().bodyDecoded();
// respect html part charset
- const QTextCodec *codec = KMMsgBase::codecForName( mCharset );
+ const TQTextCodec *codec = KMMsgBase::codecForName( mCharset );
if ( codec ) {
mEditor->setText( codec->toUnicode( bodyDecoded ) );
} else {
- mEditor->setText( QString::fromLocal8Bit( bodyDecoded ) );
+ mEditor->setText( TQString::fromLocal8Bit( bodyDecoded ) );
}
}
@@ -1995,16 +1995,16 @@ void KMComposeWin::setMsg(KMMessage* newMsg, bool mayAutoSign,
if ( mCharset.isEmpty() || mCharset == "default" )
mCharset = mDefCharset;
- QCString bodyDecoded = mMsg->bodyDecoded();
+ TQCString bodyDecoded = mMsg->bodyDecoded();
if( allowDecryption )
decryptOrStripOffCleartextSignature( bodyDecoded );
- const QTextCodec *codec = KMMsgBase::codecForName(mCharset);
+ const TQTextCodec *codec = KMMsgBase::codecForName(mCharset);
if (codec) {
mEditor->setText(codec->toUnicode(bodyDecoded));
} else
- mEditor->setText(QString::fromLocal8Bit(bodyDecoded));
+ mEditor->setText(TQString::fromLocal8Bit(bodyDecoded));
}
#ifdef BROKEN_FOR_OPAQUE_SIGNED_OR_ENCRYPTED_MAILS
const int num = mMsg->numBodyParts();
@@ -2048,7 +2048,7 @@ void KMComposeWin::setMsg(KMMessage* newMsg, bool mayAutoSign,
if ( mCharset.isEmpty() || mCharset == "default" )
mCharset = mDefCharset;
- QCString bodyDecoded = bodyPart.bodyDecoded();
+ TQCString bodyDecoded = bodyPart.bodyDecoded();
if( allowDecryption )
decryptOrStripOffCleartextSignature( bodyDecoded );
@@ -2059,18 +2059,18 @@ void KMComposeWin::setMsg(KMMessage* newMsg, bool mayAutoSign,
// out. Ingo, 2002-04-21
//verifyWordWrapLengthIsAdequate(bodyDecoded);
- const QTextCodec *codec = KMMsgBase::codecForName(mCharset);
+ const TQTextCodec *codec = KMMsgBase::codecForName(mCharset);
if (codec)
mEditor->setText(codec->toUnicode(bodyDecoded));
else
- mEditor->setText(QString::fromLocal8Bit(bodyDecoded));
+ mEditor->setText(TQString::fromLocal8Bit(bodyDecoded));
//mEditor->insertLine("\n", -1); <-- why ?
} else mEditor->setText("");
for( int i = firstAttachment; i < num; ++i )
{
KMMessagePart *msgPart = new KMMessagePart;
mMsg->bodyPart(i, msgPart);
- QCString mimeType = msgPart->typeStr().lower() + '/'
+ TQCString mimeType = msgPart->typeStr().lower() + '/'
+ msgPart->subtypeStr().lower();
// don't add the detached signature as attachment when editting a
// PGP/MIME signed message
@@ -2083,16 +2083,16 @@ void KMComposeWin::setMsg(KMMessage* newMsg, bool mayAutoSign,
if ( mCharset.isEmpty() || mCharset == "default" )
mCharset = mDefCharset;
- QCString bodyDecoded = mMsg->bodyDecoded();
+ TQCString bodyDecoded = mMsg->bodyDecoded();
if( allowDecryption )
decryptOrStripOffCleartextSignature( bodyDecoded );
- const QTextCodec *codec = KMMsgBase::codecForName(mCharset);
+ const TQTextCodec *codec = KMMsgBase::codecForName(mCharset);
if (codec) {
mEditor->setText(codec->toUnicode(bodyDecoded));
} else
- mEditor->setText(QString::fromLocal8Bit(bodyDecoded));
+ mEditor->setText(TQString::fromLocal8Bit(bodyDecoded));
}
setCharset(mCharset);
@@ -2105,11 +2105,11 @@ void KMComposeWin::setMsg(KMMessage* newMsg, bool mayAutoSign,
// Not user friendy if this modal fileseletor opens before the
// composer.
//
- //QTimer::singleShot( 200, this, SLOT(slotAppendSignature()) );
+ //TQTimer::singleShot( 200, this, TQT_SLOT(slotAppendSignature()) );
if ( GlobalSettings::self()->prependSignature() ) {
- QTimer::singleShot( 0, this, SLOT(slotPrependSignature()) );
+ TQTimer::singleShot( 0, this, TQT_SLOT(slotPrependSignature()) );
} else {
- QTimer::singleShot( 0, this, SLOT(slotAppendSignature()) );
+ TQTimer::singleShot( 0, this, TQT_SLOT(slotAppendSignature()) );
}
}
@@ -2126,7 +2126,7 @@ void KMComposeWin::setMsg(KMMessage* newMsg, bool mayAutoSign,
//-----------------------------------------------------------------------------
-void KMComposeWin::setFcc( const QString &idString )
+void KMComposeWin::setFcc( const TQString &idString )
{
// check if the sent-mail folder still exists
if ( ! idString.isEmpty() && kmkernel->findFolderById( idString ) ) {
@@ -2179,15 +2179,15 @@ bool KMComposeWin::queryClose ()
return false;
if ( kmkernel->shuttingDown() || kapp->sessionSaving() )
return true;
- if ( mComposer && mComposer->isPerformingSignOperation() ) // since the non-gpg-agent gpg plugin gets a passphrase using QDialog::exec()
+ if ( mComposer && mComposer->isPerformingSignOperation() ) // since the non-gpg-agent gpg plugin gets a passphrase using TQDialog::exec()
return false; // the user can try to close the window, which destroys mComposer mid-call.
if ( isModified() ) {
bool istemplate = ( mFolder!=0 && mFolder->isTemplates() );
- const QString savebut = ( istemplate ?
+ const TQString savebut = ( istemplate ?
i18n("Re&save as Template") :
i18n("&Save as Draft") );
- const QString savetext = ( istemplate ?
+ const TQString savetext = ( istemplate ?
i18n("Resave this message in the Templates folder. "
"It can then be used at a later time.") :
i18n("Save this message in the Drafts folder. "
@@ -2196,7 +2196,7 @@ bool KMComposeWin::queryClose ()
const int rc = KMessageBox::warningYesNoCancel( this,
i18n("Do you want to save the message for later or discard it?"),
i18n("Close Composer"),
- KGuiItem(savebut, "filesave", QString::null, savetext),
+ KGuiItem(savebut, "filesave", TQString::null, savetext),
KStdGuiItem::discard() );
if ( rc == KMessageBox::Cancel )
return false;
@@ -2223,37 +2223,37 @@ bool KMComposeWin::userForgotAttachment()
return false;
- QStringList attachWordsList = GlobalSettings::self()->attachmentKeywords();
+ TQStringList attachWordsList = GlobalSettings::self()->attachmentKeywords();
if ( attachWordsList.isEmpty() ) {
// default value (FIXME: this is duplicated in configuredialog.cpp)
- attachWordsList << QString::fromLatin1("attachment")
- << QString::fromLatin1("attached");
- if ( QString::fromLatin1("attachment") != i18n("attachment") )
+ attachWordsList << TQString::fromLatin1("attachment")
+ << TQString::fromLatin1("attached");
+ if ( TQString::fromLatin1("attachment") != i18n("attachment") )
attachWordsList << i18n("attachment");
- if ( QString::fromLatin1("attached") != i18n("attached") )
+ if ( TQString::fromLatin1("attached") != i18n("attached") )
attachWordsList << i18n("attached");
}
- QRegExp rx ( QString::fromLatin1("\\b") +
+ TQRegExp rx ( TQString::fromLatin1("\\b") +
attachWordsList.join("\\b|\\b") +
- QString::fromLatin1("\\b") );
+ TQString::fromLatin1("\\b") );
rx.setCaseSensitive( false );
bool gotMatch = false;
// check whether the subject contains one of the attachment key words
// unless the message is a reply or a forwarded message
- QString subj = subject();
+ TQString subj = subject();
gotMatch = ( KMMessage::stripOffPrefixes( subj ) == subj )
&& ( rx.search( subj ) >= 0 );
if ( !gotMatch ) {
// check whether the non-quoted text contains one of the attachment key
// words
- QRegExp quotationRx ("^([ \\t]*([|>:}#]|[A-Za-z]+>))+");
+ TQRegExp quotationRx ("^([ \\t]*([|>:}#]|[A-Za-z]+>))+");
for ( int i = 0; i < mEditor->numLines(); ++i ) {
- QString line = mEditor->textLine( i );
+ TQString line = mEditor->textLine( i );
gotMatch = ( quotationRx.search( line ) < 0 )
&& ( rx.search( line ) >= 0 );
if ( gotMatch )
@@ -2294,8 +2294,8 @@ void KMComposeWin::applyChanges( bool dontSignNorEncrypt, bool dontDisable )
// Make new job and execute it
mComposer = new MessageComposer( this );
- connect( mComposer, SIGNAL( done( bool ) ),
- this, SLOT( slotComposerDone( bool ) ) );
+ connect( mComposer, TQT_SIGNAL( done( bool ) ),
+ this, TQT_SLOT( slotComposerDone( bool ) ) );
// TODO: Add a cancel button for the following operations?
// Disable any input to the window, so that we have a snapshot of the
@@ -2355,7 +2355,7 @@ bool KMComposeWin::addAttach(const KURL aUrl)
const int maxAttachmentSize = GlobalSettings::maximumAttachmentSize();
const uint maximumAttachmentSizeInByte = maxAttachmentSize*1024*1024;
- if ( aUrl.isLocalFile() && QFileInfo( aUrl.pathOrURL() ).size() > maximumAttachmentSizeInByte ) {
+ if ( aUrl.isLocalFile() && TQFileInfo( aUrl.pathOrURL() ).size() > maximumAttachmentSizeInByte ) {
KMessageBox::sorry( this, i18n( "<qt><p>Your administrator has disallowed attaching files bigger than %1 MB.</p>" ).arg( maxAttachmentSize ) );
return false;
}
@@ -2364,17 +2364,17 @@ bool KMComposeWin::addAttach(const KURL aUrl)
KIO::Scheduler::scheduleJob( job );
atmLoadData ld;
ld.url = aUrl;
- ld.data = QByteArray();
+ ld.data = TQByteArray();
ld.insert = false;
if( !aUrl.fileEncoding().isEmpty() )
ld.encoding = aUrl.fileEncoding().latin1();
mMapAtmLoadData.insert(job, ld);
mAttachJobs[job] = aUrl;
- connect(job, SIGNAL(result(KIO::Job *)),
- this, SLOT(slotAttachFileResult(KIO::Job *)));
- connect(job, SIGNAL(data(KIO::Job *, const QByteArray &)),
- this, SLOT(slotAttachFileData(KIO::Job *, const QByteArray &)));
+ connect(job, TQT_SIGNAL(result(KIO::Job *)),
+ this, TQT_SLOT(slotAttachFileResult(KIO::Job *)));
+ connect(job, TQT_SIGNAL(data(KIO::Job *, const TQByteArray &)),
+ this, TQT_SLOT(slotAttachFileData(KIO::Job *, const TQByteArray &)));
return true;
}
@@ -2403,10 +2403,10 @@ void KMComposeWin::addAttach(const KMMessagePart* msgPart)
mTempDir = 0;
}
- connect( lvi, SIGNAL( compress( int ) ),
- this, SLOT( compressAttach( int ) ) );
- connect( lvi, SIGNAL( uncompress( int ) ),
- this, SLOT( uncompressAttach( int ) ) );
+ connect( lvi, TQT_SIGNAL( compress( int ) ),
+ this, TQT_SLOT( compressAttach( int ) ) );
+ connect( lvi, TQT_SIGNAL( uncompress( int ) ),
+ this, TQT_SLOT( uncompressAttach( int ) ) );
slotUpdateAttachActions();
}
@@ -2416,7 +2416,7 @@ void KMComposeWin::addAttach(const KMMessagePart* msgPart)
void KMComposeWin::slotUpdateAttachActions()
{
int selectedCount = 0;
- for ( QPtrListIterator<QListViewItem> it(mAtmItemList); *it; ++it ) {
+ for ( TQPtrListIterator<TQListViewItem> it(mAtmItemList); *it; ++it ) {
if ( (*it)->isSelected() ) {
++selectedCount;
}
@@ -2430,9 +2430,9 @@ void KMComposeWin::slotUpdateAttachActions()
//-----------------------------------------------------------------------------
-QString KMComposeWin::prettyMimeType( const QString& type )
+TQString KMComposeWin::prettyMimeType( const TQString& type )
{
- QString t = type.lower();
+ TQString t = type.lower();
KServiceType::Ptr st = KServiceType::serviceType( t );
return st ? st->comment() : t;
}
@@ -2464,7 +2464,7 @@ void KMComposeWin::msgPartToItem(const KMMessagePart* msgPart,
//-----------------------------------------------------------------------------
-void KMComposeWin::removeAttach(const QString &aUrl)
+void KMComposeWin::removeAttach(const TQString &aUrl)
{
int idx;
KMMessagePart* msgPart;
@@ -2530,8 +2530,8 @@ void KMComposeWin::addrBookSelInto()
void KMComposeWin::addrBookSelIntoOld()
{
AddressesDialog dlg( this );
- QString txt;
- QStringList lst;
+ TQString txt;
+ TQStringList lst;
txt = to();
if ( !txt.isEmpty() ) {
@@ -2553,7 +2553,7 @@ void KMComposeWin::addrBookSelIntoOld()
dlg.setRecentAddresses( RecentAddresses::self( KMKernel::config() )->kabcAddresses() );
- if (dlg.exec()==QDialog::Rejected) return;
+ if (dlg.exec()==TQDialog::Rejected) return;
mEdtTo->setText( dlg.to().join(", ") );
mEdtTo->setEdited( true );
@@ -2577,8 +2577,8 @@ void KMComposeWin::addrBookSelIntoNew()
AddresseeSelectorDialog dlg( &selection );
- QString txt;
- QStringList lst;
+ TQString txt;
+ TQStringList lst;
txt = to();
if ( !txt.isEmpty() ) {
@@ -2598,9 +2598,9 @@ void KMComposeWin::addrBookSelIntoNew()
selection.setSelectedBCC( lst );
}
- if (dlg.exec()==QDialog::Rejected) return;
+ if (dlg.exec()==TQDialog::Rejected) return;
- QStringList list = selection.to() + selection.toDistributionLists();
+ TQStringList list = selection.to() + selection.toDistributionLists();
mEdtTo->setText( list.join(", ") );
mEdtTo->setEdited( true );
@@ -2621,7 +2621,7 @@ void KMComposeWin::addrBookSelIntoNew()
//-----------------------------------------------------------------------------
-void KMComposeWin::setCharset(const QCString& aCharset, bool forceDefault)
+void KMComposeWin::setCharset(const TQCString& aCharset, bool forceDefault)
{
if ((forceDefault && GlobalSettings::self()->forceReplyCharset()) || aCharset.isEmpty())
mCharset = mDefCharset;
@@ -2637,10 +2637,10 @@ void KMComposeWin::setCharset(const QCString& aCharset, bool forceDefault)
return;
}
- QStringList encodings = mEncodingAction->items();
+ TQStringList encodings = mEncodingAction->items();
int i = 0;
bool charsetFound = false;
- for ( QStringList::Iterator it = encodings.begin(); it != encodings.end();
+ for ( TQStringList::Iterator it = encodings.begin(); it != encodings.end();
++it, i++ )
{
if (i > 0 && ((mCharset == "us-ascii" && i == 1) ||
@@ -2692,7 +2692,7 @@ void KMComposeWin::slotAttachFile()
// We will not care about any permissions, existence or whatsoever in
// this function.
- KFileDialog fdlg(QString::null, QString::null, this, 0, true);
+ KFileDialog fdlg(TQString::null, TQString::null, this, 0, true);
fdlg.setOperationMode( KFileDialog::Other );
fdlg.setCaption(i18n("Attach File"));
fdlg.okButton()->setGuiItem(KGuiItem(i18n("&Attach"),"fileopen"));
@@ -2706,11 +2706,11 @@ void KMComposeWin::slotAttachFile()
//-----------------------------------------------------------------------------
-void KMComposeWin::slotAttachFileData(KIO::Job *job, const QByteArray &data)
+void KMComposeWin::slotAttachFileData(KIO::Job *job, const TQByteArray &data)
{
- QMap<KIO::Job*, atmLoadData>::Iterator it = mMapAtmLoadData.find(job);
+ TQMap<KIO::Job*, atmLoadData>::Iterator it = mMapAtmLoadData.find(job);
assert(it != mMapAtmLoadData.end());
- QBuffer buff((*it).data);
+ TQBuffer buff((*it).data);
buff.open(IO_WriteOnly | IO_Append);
buff.writeBlock(data.data(), data.size());
buff.close();
@@ -2720,10 +2720,10 @@ void KMComposeWin::slotAttachFileData(KIO::Job *job, const QByteArray &data)
//-----------------------------------------------------------------------------
void KMComposeWin::slotAttachFileResult(KIO::Job *job)
{
- QMap<KIO::Job*, atmLoadData>::Iterator it = mMapAtmLoadData.find(job);
+ TQMap<KIO::Job*, atmLoadData>::Iterator it = mMapAtmLoadData.find(job);
assert(it != mMapAtmLoadData.end());
KURL attachURL;
- QMap<KIO::Job*, KURL>::iterator jit = mAttachJobs.find(job);
+ TQMap<KIO::Job*, KURL>::iterator jit = mAttachJobs.find(job);
bool attachURLfound = (jit != mAttachJobs.end());
if (attachURLfound)
{
@@ -2742,18 +2742,18 @@ void KMComposeWin::slotAttachFileResult(KIO::Job *job)
{
(*it).data.resize((*it).data.size() + 1);
(*it).data[(*it).data.size() - 1] = '\0';
- if ( const QTextCodec * codec = KGlobal::charsets()->codecForName((*it).encoding) )
+ if ( const TQTextCodec * codec = KGlobal::charsets()->codecForName((*it).encoding) )
mEditor->insert( codec->toUnicode( (*it).data ) );
else
- mEditor->insert( QString::fromLocal8Bit( (*it).data ) );
+ mEditor->insert( TQString::fromLocal8Bit( (*it).data ) );
mMapAtmLoadData.remove(it);
if (attachURLfound)
emit attachmentAdded(attachURL, true);
return;
}
- QCString partCharset;
+ TQCString partCharset;
if ( !( *it ).url.fileEncoding().isEmpty() ) {
- partCharset = QCString( ( *it ).url.fileEncoding().latin1() );
+ partCharset = TQCString( ( *it ).url.fileEncoding().latin1() );
} else {
EncodingDetector ed;
KLocale *loc = KGlobal::locale();
@@ -2767,9 +2767,9 @@ void KMComposeWin::slotAttachFileResult(KIO::Job *job)
KMMessagePart* msgPart;
KCursorSaver busy(KBusyPtr::busy());
- QString name( (*it).url.fileName() );
+ TQString name( (*it).url.fileName() );
// ask the job for the mime type of the file
- QString mimeType = static_cast<KIO::MimetypeJob*>(job)->mimetype();
+ TQString mimeType = static_cast<KIO::MimetypeJob*>(job)->mimetype();
if ( name.isEmpty() ) {
// URL ends with '/' (e.g. http://www.kde.org/)
@@ -2778,8 +2778,8 @@ void KMComposeWin::slotAttachFileResult(KIO::Job *job)
name = "index.html";
else {
// try to determine a reasonable extension
- QStringList patterns( KMimeType::mimeType( mimeType )->patterns() );
- QString ext;
+ TQStringList patterns( KMimeType::mimeType( mimeType )->patterns() );
+ TQString ext;
if( !patterns.isEmpty() ) {
ext = patterns[0];
int i = ext.findRev( '.' );
@@ -2788,30 +2788,30 @@ void KMComposeWin::slotAttachFileResult(KIO::Job *job)
else if( i > 0 )
ext = ext.mid( i );
}
- name = QString("unknown") += ext;
+ name = TQString("unknown") += ext;
}
}
name.truncate( 256 ); // is this needed?
- QCString encoding = KMMsgBase::autoDetectCharset(partCharset,
+ TQCString encoding = KMMsgBase::autoDetectCharset(partCharset,
KMMessage::preferredCharsets(), name);
if ( encoding.isEmpty() )
encoding = "utf-8";
- QCString encName;
+ TQCString encName;
if ( GlobalSettings::self()->outlookCompatibleAttachments() )
encName = KMMsgBase::encodeRFC2047String( name, encoding );
else
encName = KMMsgBase::encodeRFC2231String( name, encoding );
bool RFC2231encoded = false;
if ( !GlobalSettings::self()->outlookCompatibleAttachments() )
- RFC2231encoded = name != QString( encName );
+ RFC2231encoded = name != TQString( encName );
// create message part
msgPart = new KMMessagePart;
msgPart->setName(name);
- QValueList<int> allowedCTEs;
+ TQValueList<int> allowedCTEs;
if ( mimeType == "message/rfc822" ) {
msgPart->setMessageBody( (*it).data );
allowedCTEs << DwMime::kCte7bit;
@@ -2826,7 +2826,7 @@ void KMComposeWin::slotAttachFileResult(KIO::Job *job)
slash = mimeType.length();
msgPart->setTypeStr( mimeType.left( slash ).latin1() );
msgPart->setSubtypeStr( mimeType.mid( slash + 1 ).latin1() );
- msgPart->setContentDisposition(QCString("attachment;\n\tfilename")
+ msgPart->setContentDisposition(TQCString("attachment;\n\tfilename")
+ ( RFC2231encoded ? "*=" + encName : "=\"" + encName + '"' ) );
mMapAtmLoadData.remove(it);
@@ -2836,10 +2836,10 @@ void KMComposeWin::slotAttachFileResult(KIO::Job *job)
// show message part dialog, if not configured away (default):
KConfigGroup composer(KMKernel::config(), "Composer");
if ( GlobalSettings::self()->showMessagePartDialogOnAttach() ) {
- const KCursorSaver saver( QCursor::ArrowCursor );
+ const KCursorSaver saver( TQCursor::ArrowCursor );
KMMsgPartDialogCompat dlg(mMainWidget);
int encodings = 0;
- for ( QValueListConstIterator<int> it = allowedCTEs.begin() ;
+ for ( TQValueListConstIterator<int> it = allowedCTEs.begin() ;
it != allowedCTEs.end() ; ++it )
switch ( *it ) {
case DwMime::kCteBase64: encodings |= KMMsgPartDialog::Base64; break;
@@ -2859,7 +2859,7 @@ void KMComposeWin::slotAttachFileResult(KIO::Job *job)
}
}
mAtmModified = true;
- if (msgPart->typeStr().lower() != "text") msgPart->setCharset(QCString());
+ if (msgPart->typeStr().lower() != "text") msgPart->setCharset(TQCString());
// add the new attachment to the list
addAttach(msgPart);
@@ -2872,7 +2872,7 @@ void KMComposeWin::slotAttachFileResult(KIO::Job *job)
//-----------------------------------------------------------------------------
void KMComposeWin::slotInsertFile()
{
- KFileDialog fdlg(QString::null, QString::null, this, 0, true);
+ KFileDialog fdlg(TQString::null, TQString::null, this, 0, true);
fdlg.setOperationMode( KFileDialog::Opening );
fdlg.okButton()->setText(i18n("&Insert"));
fdlg.setCaption(i18n("Insert File"));
@@ -2882,7 +2882,7 @@ void KMComposeWin::slotInsertFile()
for (int i = 0; i < combo->count(); i++)
if (KGlobal::charsets()->codecForName(KGlobal::charsets()->
encodingForName(combo->text(i)))
- == QTextCodec::codecForLocale()) combo->setCurrentItem(i);
+ == TQTextCodec::codecForLocale()) combo->setCurrentItem(i);
if (!fdlg.exec()) return;
KURL u = fdlg.selectedURL();
@@ -2891,9 +2891,9 @@ void KMComposeWin::slotInsertFile()
{
KConfig *config = KMKernel::config();
KConfigGroupSaver saver( config, "Composer" );
- QString encoding = KGlobal::charsets()->encodingForName(combo->currentText()).latin1();
- QStringList urls = config->readListEntry( "recent-urls" );
- QStringList encodings = config->readListEntry( "recent-encodings" );
+ TQString encoding = KGlobal::charsets()->encodingForName(combo->currentText()).latin1();
+ TQStringList urls = config->readListEntry( "recent-urls" );
+ TQStringList encodings = config->readListEntry( "recent-encodings" );
// Prevent config file from growing without bound
// Would be nicer to get this constant from KRecentFilesAction
uint mMaxRecentFiles = 30;
@@ -2924,25 +2924,25 @@ void KMComposeWin::slotInsertRecentFile(const KURL& u)
KIO::Job *job = KIO::get(u);
atmLoadData ld;
ld.url = u;
- ld.data = QByteArray();
+ ld.data = TQByteArray();
ld.insert = true;
// Get the encoding previously used when inserting this file
{
KConfig *config = KMKernel::config();
KConfigGroupSaver saver( config, "Composer" );
- QStringList urls = config->readListEntry( "recent-urls" );
- QStringList encodings = config->readListEntry( "recent-encodings" );
+ TQStringList urls = config->readListEntry( "recent-urls" );
+ TQStringList encodings = config->readListEntry( "recent-encodings" );
int index = urls.findIndex( u.prettyURL() );
if (index != -1) {
- QString encoding = encodings[ index ];
+ TQString encoding = encodings[ index ];
ld.encoding = encoding.latin1();
}
}
mMapAtmLoadData.insert(job, ld);
- connect(job, SIGNAL(result(KIO::Job *)),
- this, SLOT(slotAttachFileResult(KIO::Job *)));
- connect(job, SIGNAL(data(KIO::Job *, const QByteArray &)),
- this, SLOT(slotAttachFileData(KIO::Job *, const QByteArray &)));
+ connect(job, TQT_SIGNAL(result(KIO::Job *)),
+ this, TQT_SLOT(slotAttachFileResult(KIO::Job *)));
+ connect(job, TQT_SIGNAL(data(KIO::Job *, const TQByteArray &)),
+ this, TQT_SLOT(slotAttachFileData(KIO::Job *, const TQByteArray &)));
}
@@ -3043,12 +3043,12 @@ void KMComposeWin::slotSelectCryptoModule( bool init )
}
}
-static void showExportError( QWidget * w, const GpgME::Error & err ) {
+static void showExportError( TQWidget * w, const GpgME::Error & err ) {
assert( err );
- const QString msg = i18n("<qt><p>An error occurred while trying to export "
+ const TQString msg = i18n("<qt><p>An error occurred while trying to export "
"the key from the backend:</p>"
"<p><b>%1</b></p></qt>")
- .arg( QString::fromLocal8Bit( err.asString() ) );
+ .arg( TQString::fromLocal8Bit( err.asString() ) );
KMessageBox::error( w, msg, i18n("Key Export Failed") );
}
@@ -3069,8 +3069,8 @@ void KMComposeWin::startPublicKeyExport() {
Kleo::ExportJob * job = Kleo::CryptoBackendFactory::instance()->openpgp()->publicKeyExportJob( true );
assert( job );
- connect( job, SIGNAL(result(const GpgME::Error&,const QByteArray&)),
- this, SLOT(slotPublicKeyExportResult(const GpgME::Error&,const QByteArray&)) );
+ connect( job, TQT_SIGNAL(result(const GpgME::Error&,const TQByteArray&)),
+ this, TQT_SLOT(slotPublicKeyExportResult(const GpgME::Error&,const TQByteArray&)) );
const GpgME::Error err = job->start( mFingerprint );
if ( err )
@@ -3079,7 +3079,7 @@ void KMComposeWin::startPublicKeyExport() {
(void)new Kleo::ProgressDialog( job, i18n("Exporting key..."), this );
}
-void KMComposeWin::slotPublicKeyExportResult( const GpgME::Error & err, const QByteArray & keydata ) {
+void KMComposeWin::slotPublicKeyExportResult( const GpgME::Error & err, const TQByteArray & keydata ) {
if ( err ) {
showExportError( this, err );
return;
@@ -3090,9 +3090,9 @@ void KMComposeWin::slotPublicKeyExportResult( const GpgME::Error & err, const QB
msgPart->setName( i18n("OpenPGP key 0x%1").arg( mFingerprint ) );
msgPart->setTypeStr("application");
msgPart->setSubtypeStr("pgp-keys");
- QValueList<int> dummy;
+ TQValueList<int> dummy;
msgPart->setBodyAndGuessCte(keydata, dummy, false);
- msgPart->setContentDisposition( "attachment;\n\tfilename=0x" + QCString( mFingerprint.latin1() ) + ".asc" );
+ msgPart->setContentDisposition( "attachment;\n\tfilename=0x" + TQCString( mFingerprint.latin1() ) + ".asc" );
// add the new attachment to the list
addAttach(msgPart);
@@ -3110,7 +3110,7 @@ void KMComposeWin::slotInsertPublicKey()
false /* no multi selection */,
false /* no remember choice box */,
this, "attach public key selection dialog" );
- if ( dlg.exec() != QDialog::Accepted )
+ if ( dlg.exec() != TQDialog::Accepted )
return;
mFingerprint = dlg.fingerprint();
@@ -3119,32 +3119,32 @@ void KMComposeWin::slotInsertPublicKey()
//-----------------------------------------------------------------------------
-void KMComposeWin::slotAttachPopupMenu(QListViewItem *, const QPoint &, int)
+void KMComposeWin::slotAttachPopupMenu(TQListViewItem *, const TQPoint &, int)
{
if (!mAttachMenu)
{
- mAttachMenu = new QPopupMenu(this);
+ mAttachMenu = new TQPopupMenu(this);
mOpenId = mAttachMenu->insertItem(i18n("to open", "Open"), this,
- SLOT(slotAttachOpen()));
+ TQT_SLOT(slotAttachOpen()));
mOpenWithId = mAttachMenu->insertItem(i18n("Open With..."), this,
- SLOT(slotAttachOpenWith()));
+ TQT_SLOT(slotAttachOpenWith()));
mViewId = mAttachMenu->insertItem(i18n("to view", "View"), this,
- SLOT(slotAttachView()));
- mEditId = mAttachMenu->insertItem( i18n("Edit"), this, SLOT(slotAttachEdit()) );
+ TQT_SLOT(slotAttachView()));
+ mEditId = mAttachMenu->insertItem( i18n("Edit"), this, TQT_SLOT(slotAttachEdit()) );
mEditWithId = mAttachMenu->insertItem( i18n("Edit With..."), this,
- SLOT(slotAttachEditWith()) );
- mRemoveId = mAttachMenu->insertItem(i18n("Remove"), this, SLOT(slotAttachRemove()));
+ TQT_SLOT(slotAttachEditWith()) );
+ mRemoveId = mAttachMenu->insertItem(i18n("Remove"), this, TQT_SLOT(slotAttachRemove()));
mSaveAsId = mAttachMenu->insertItem( SmallIconSet("filesaveas"), i18n("Save As..."), this,
- SLOT( slotAttachSave() ) );
+ TQT_SLOT( slotAttachSave() ) );
mPropertiesId = mAttachMenu->insertItem( i18n("Properties"), this,
- SLOT( slotAttachProperties() ) );
+ TQT_SLOT( slotAttachProperties() ) );
mAttachMenu->insertSeparator();
- mAttachMenu->insertItem(i18n("Add Attachment..."), this, SLOT(slotAttachFile()));
+ mAttachMenu->insertItem(i18n("Add Attachment..."), this, TQT_SLOT(slotAttachFile()));
}
int selectedCount = 0;
- for ( QPtrListIterator<QListViewItem> it(mAtmItemList); *it; ++it ) {
+ for ( TQPtrListIterator<TQListViewItem> it(mAtmItemList); *it; ++it ) {
if ( (*it)->isSelected() ) {
++selectedCount;
}
@@ -3159,14 +3159,14 @@ void KMComposeWin::slotAttachPopupMenu(QListViewItem *, const QPoint &, int)
mAttachMenu->setItemEnabled( mSaveAsId, selectedCount == 1 );
mAttachMenu->setItemEnabled( mPropertiesId, selectedCount == 1 );
- mAttachMenu->popup(QCursor::pos());
+ mAttachMenu->popup(TQCursor::pos());
}
//-----------------------------------------------------------------------------
int KMComposeWin::currentAttachmentNum()
{
int i = 0;
- for ( QPtrListIterator<QListViewItem> it(mAtmItemList); *it; ++it, ++i )
+ for ( TQPtrListIterator<TQListViewItem> it(mAtmItemList); *it; ++it, ++i )
if ( *it == mAtmListView->currentItem() )
return i;
return -1;
@@ -3206,7 +3206,7 @@ void KMComposeWin::slotAttachProperties()
}
}
}
- if (msgPart->typeStr().lower() != "text") msgPart->setCharset(QCString());
+ if (msgPart->typeStr().lower() != "text") msgPart->setCharset(TQCString());
}
//-----------------------------------------------------------------------------
@@ -3224,10 +3224,10 @@ void KMComposeWin::compressAttach( int idx )
KMMessagePart* msgPart;
msgPart = mAtmList.at( i );
- QByteArray array;
- QBuffer dev( array );
+ TQByteArray array;
+ TQBuffer dev( array );
KZip zip( &dev );
- QByteArray decoded = msgPart->bodyDecodedBinary();
+ TQByteArray decoded = msgPart->bodyDecodedBinary();
if ( ! zip.open( IO_WriteOnly ) ) {
KMessageBox::sorry(0, i18n("KMail could not compress the file.") );
static_cast<KMAtmListViewItem*>( mAtmItemList.at( i ) )->setCompress( false );
@@ -3244,7 +3244,7 @@ void KMComposeWin::compressAttach( int idx )
zip.close();
if ( array.size() >= decoded.size() ) {
if ( KMessageBox::questionYesNo( this, i18n("The compressed file is larger "
- "than the original. Do you want to keep the original one?" ), QString::null, i18n("Keep"), i18n("Compress") )
+ "than the original. Do you want to keep the original one?" ), TQString::null, i18n("Keep"), i18n("Compress") )
== KMessageBox::Yes ) {
static_cast<KMAtmListViewItem*>( mAtmItemList.at( i ) )->setCompress( false );
return;
@@ -3255,24 +3255,24 @@ void KMComposeWin::compressAttach( int idx )
msgPart->setCteStr( "base64" );
msgPart->setBodyEncodedBinary( array );
- QString name = msgPart->name() + ".zip";
+ TQString name = msgPart->name() + ".zip";
msgPart->setName( name );
- QCString cDisp = "attachment;";
- QCString encoding = KMMsgBase::autoDetectCharset( msgPart->charset(),
+ TQCString cDisp = "attachment;";
+ TQCString encoding = KMMsgBase::autoDetectCharset( msgPart->charset(),
KMMessage::preferredCharsets(), name );
kdDebug(5006) << "encoding: " << encoding << endl;
if ( encoding.isEmpty() ) encoding = "utf-8";
kdDebug(5006) << "encoding after: " << encoding << endl;
- QCString encName;
+ TQCString encName;
if ( GlobalSettings::self()->outlookCompatibleAttachments() )
encName = KMMsgBase::encodeRFC2047String( name, encoding );
else
encName = KMMsgBase::encodeRFC2231String( name, encoding );
cDisp += "\n\tfilename";
- if ( name != QString( encName ) )
+ if ( name != TQString( encName ) )
cDisp += "*=" + encName;
else
cDisp += "=\"" + encName + '"';
@@ -3304,9 +3304,9 @@ void KMComposeWin::uncompressAttach( int idx )
KMMessagePart* msgPart;
msgPart = mAtmList.at( i );
- QBuffer dev( msgPart->bodyDecodedBinary() );
+ TQBuffer dev( msgPart->bodyDecodedBinary() );
KZip zip( &dev );
- QByteArray decoded;
+ TQByteArray decoded;
decoded = msgPart->bodyDecodedBinary();
if ( ! zip.open( IO_ReadOnly ) ) {
@@ -3328,30 +3328,30 @@ void KMComposeWin::uncompressAttach( int idx )
static_cast<KMAtmListViewItem*>( mAtmItemList.at(i) )->uncompressedCodec() );
msgPart->setBodyEncodedBinary( entry->data() );
- QString name = entry->name();
+ TQString name = entry->name();
msgPart->setName( name );
zip.close();
- QCString cDisp = "attachment;";
- QCString encoding = KMMsgBase::autoDetectCharset( msgPart->charset(),
+ TQCString cDisp = "attachment;";
+ TQCString encoding = KMMsgBase::autoDetectCharset( msgPart->charset(),
KMMessage::preferredCharsets(), name );
if ( encoding.isEmpty() ) encoding = "utf-8";
- QCString encName;
+ TQCString encName;
if ( GlobalSettings::self()->outlookCompatibleAttachments() )
encName = KMMsgBase::encodeRFC2047String( name, encoding );
else
encName = KMMsgBase::encodeRFC2231String( name, encoding );
cDisp += "\n\tfilename";
- if ( name != QString( encName ) )
+ if ( name != TQString( encName ) )
cDisp += "*=" + encName;
else
cDisp += "=\"" + encName + '"';
msgPart->setContentDisposition( cDisp );
- QCString type, subtype;
+ TQCString type, subtype;
static_cast<KMAtmListViewItem*>( mAtmItemList.at( i ) )->uncompressedMimeType( type,
subtype );
@@ -3367,7 +3367,7 @@ void KMComposeWin::uncompressAttach( int idx )
void KMComposeWin::slotAttachView()
{
int i = 0;
- for ( QPtrListIterator<QListViewItem> it(mAtmItemList); *it; ++it, ++i ) {
+ for ( TQPtrListIterator<TQListViewItem> it(mAtmItemList); *it; ++it, ++i ) {
if ( (*it)->isSelected() ) {
viewAttach( i );
}
@@ -3377,7 +3377,7 @@ void KMComposeWin::slotAttachView()
void KMComposeWin::slotAttachOpen()
{
int i = 0;
- for ( QPtrListIterator<QListViewItem> it(mAtmItemList); *it; ++it, ++i ) {
+ for ( TQPtrListIterator<TQListViewItem> it(mAtmItemList); *it; ++it, ++i ) {
if ( (*it)->isSelected() ) {
openAttach( i, false );
}
@@ -3388,7 +3388,7 @@ void KMComposeWin::slotAttachOpen()
void KMComposeWin::slotAttachOpenWith()
{
int i = 0;
- for ( QPtrListIterator<QListViewItem> it(mAtmItemList); *it; ++it, ++i ) {
+ for ( TQPtrListIterator<TQListViewItem> it(mAtmItemList); *it; ++it, ++i ) {
if ( (*it)->isSelected() ) {
openAttach( i, true );
}
@@ -3398,7 +3398,7 @@ void KMComposeWin::slotAttachOpenWith()
void KMComposeWin::slotAttachEdit()
{
int i = 0;
- for ( QPtrListIterator<QListViewItem> it(mAtmItemList); *it; ++it, ++i ) {
+ for ( TQPtrListIterator<TQListViewItem> it(mAtmItemList); *it; ++it, ++i ) {
if ( (*it)->isSelected() ) {
editAttach( i, false );
}
@@ -3408,7 +3408,7 @@ void KMComposeWin::slotAttachEdit()
void KMComposeWin::slotAttachEditWith()
{
int i = 0;
- for ( QPtrListIterator<QListViewItem> it(mAtmItemList); *it; ++it, ++i ) {
+ for ( TQPtrListIterator<TQListViewItem> it(mAtmItemList); *it; ++it, ++i ) {
if ( (*it)->isSelected() ) {
editAttach( i, true );
}
@@ -3425,7 +3425,7 @@ bool KMComposeWin::inlineSigningEncryptionSelected() {
//-----------------------------------------------------------------------------
void KMComposeWin::viewAttach( int index )
{
- QString pname;
+ TQString pname;
KMMessagePart* msgPart;
msgPart = mAtmList.at(index);
pname = msgPart->name().stripWhiteSpace();
@@ -3446,7 +3446,7 @@ void KMComposeWin::viewAttach( int index )
void KMComposeWin::openAttach( int index, bool with )
{
KMMessagePart* msgPart = mAtmList.at(index);
- const QString contentTypeStr =
+ const TQString contentTypeStr =
( msgPart->typeStr() + '/' + msgPart->subtypeStr() ).lower();
KMimeType::Ptr mimetype;
@@ -3462,8 +3462,8 @@ void KMComposeWin::openAttach( int index, bool with )
KPIM::kByteArrayToFile( msgPart->bodyDecodedBinary(), atmTempFile->name(), false, false,
false );
- if ( ::chmod( QFile::encodeName( atmTempFile->name() ), S_IRUSR ) != 0) {
- QFile::remove(url.path());
+ if ( ::chmod( TQFile::encodeName( atmTempFile->name() ), S_IRUSR ) != 0) {
+ TQFile::remove(url.path());
return;
}
@@ -3472,12 +3472,12 @@ void KMComposeWin::openAttach( int index, bool with )
if ( with || !offer || mimetype->name() == "application/octet-stream" ) {
if ( ( !KRun::displayOpenWithDialog( url, autoDelete ) ) && autoDelete ) {
- QFile::remove(url.path());
+ TQFile::remove(url.path());
}
}
else {
if ( ( !KRun::run( *offer, url, autoDelete ) ) && autoDelete ) {
- QFile::remove( url.path() );
+ TQFile::remove( url.path() );
}
}
}
@@ -3485,7 +3485,7 @@ void KMComposeWin::openAttach( int index, bool with )
void KMComposeWin::editAttach(int index, bool openWith)
{
KMMessagePart* msgPart = mAtmList.at(index);
- const QString contentTypeStr =
+ const TQString contentTypeStr =
( msgPart->typeStr() + '/' + msgPart->subtypeStr() ).lower();
KTempFile* atmTempFile = new KTempFile();
@@ -3496,7 +3496,7 @@ void KMComposeWin::editAttach(int index, bool openWith)
KMail::EditorWatcher *watcher = new KMail::EditorWatcher( KURL( atmTempFile->name() ), contentTypeStr, openWith, this );
- connect( watcher, SIGNAL(editDone(KMail::EditorWatcher*)), SLOT(slotEditDone(KMail::EditorWatcher*)) );
+ connect( watcher, TQT_SIGNAL(editDone(KMail::EditorWatcher*)), TQT_SLOT(slotEditDone(KMail::EditorWatcher*)) );
if ( watcher->start() ) {
mEditorMap.insert( watcher, msgPart );
mEditorTempFiles.insert( watcher, atmTempFile );
@@ -3507,7 +3507,7 @@ void KMComposeWin::editAttach(int index, bool openWith)
void KMComposeWin::slotAttachSave()
{
KMMessagePart* msgPart;
- QString fileName, pname;
+ TQString fileName, pname;
int idx = currentAttachmentNum();
if (idx < 0) return;
@@ -3516,7 +3516,7 @@ void KMComposeWin::slotAttachSave()
pname = msgPart->name();
if (pname.isEmpty()) pname="unnamed";
- KURL url = KFileDialog::getSaveURL(QString::null, QString::null, 0, i18n("Save Attachment As"));
+ KURL url = KFileDialog::getSaveURL(TQString::null, TQString::null, 0, i18n("Save Attachment As"));
if( url.isEmpty() )
return;
@@ -3530,7 +3530,7 @@ void KMComposeWin::slotAttachRemove()
{
bool attachmentRemoved = false;
int i = 0;
- for ( QPtrListIterator<QListViewItem> it(mAtmItemList); *it; ) {
+ for ( TQPtrListIterator<TQListViewItem> it(mAtmItemList); *it; ) {
if ( (*it)->isSelected() ) {
removeAttach( i );
attachmentRemoved = true;
@@ -3574,15 +3574,15 @@ void KMComposeWin::slotUpdateFont()
mEditor->setFont( mFixedFontAction->isChecked() ? mFixedFont : mBodyFont );
}
-QString KMComposeWin::quotePrefixName() const
+TQString KMComposeWin::quotePrefixName() const
{
if ( !msg() )
- return QString::null;
+ return TQString::null;
int languageNr = GlobalSettings::self()->replyCurrentLanguage();
- ReplyPhrases replyPhrases( QString::number(languageNr) );
+ ReplyPhrases replyPhrases( TQString::number(languageNr) );
replyPhrases.readConfig();
- QString quotePrefix = msg()->formatString(
+ TQString quotePrefix = msg()->formatString(
replyPhrases.indentPrefix() );
quotePrefix = msg()->formatString(quotePrefix);
@@ -3593,7 +3593,7 @@ void KMComposeWin::slotPasteClipboardAsQuotation()
{
if( mEditor->hasFocus() && msg() )
{
- QString s = QApplication::clipboard()->text();
+ TQString s = TQApplication::clipboard()->text();
if (!s.isEmpty())
mEditor->insert(addQuotesToText(s));
}
@@ -3601,25 +3601,25 @@ void KMComposeWin::slotPasteClipboardAsQuotation()
void KMComposeWin::slotPasteClipboardAsAttachment()
{
- KURL url( QApplication::clipboard()->text( QClipboard::Clipboard ) );
+ KURL url( TQApplication::clipboard()->text( QClipboard::Clipboard ) );
if ( url.isValid() ) {
- addAttach(QApplication::clipboard()->text( QClipboard::Clipboard ) );
+ addAttach(TQApplication::clipboard()->text( QClipboard::Clipboard ) );
return;
}
- QMimeSource *mimeSource = QApplication::clipboard()->data();
- if ( QImageDrag::canDecode(mimeSource) ) {
+ TQMimeSource *mimeSource = TQApplication::clipboard()->data();
+ if ( TQImageDrag::canDecode(mimeSource) ) {
slotAttachPNGImageData(mimeSource->encodedData("image/png"));
}
else {
bool ok;
- QString attName = KInputDialog::getText( "KMail", i18n("Name of the attachment:"), QString::null, &ok, this );
+ TQString attName = KInputDialog::getText( "KMail", i18n("Name of the attachment:"), TQString::null, &ok, this );
if ( !ok )
return;
KMMessagePart *msgPart = new KMMessagePart;
msgPart->setName(attName);
- QValueList<int> dummy;
- msgPart->setBodyAndGuessCte(QCString(QApplication::clipboard()->text().latin1()), dummy,
+ TQValueList<int> dummy;
+ msgPart->setBodyAndGuessCte(TQCString(TQApplication::clipboard()->text().latin1()), dummy,
kmkernel->msgSender()->sendQuotedPrintable());
addAttach(msgPart);
}
@@ -3634,13 +3634,13 @@ void KMComposeWin::slotAddQuotes()
// else add quotes only on the lines that are marked.
if ( mEditor->hasMarkedText() ) {
- QString s = mEditor->markedText();
+ TQString s = mEditor->markedText();
if(!s.isEmpty())
mEditor->insert(addQuotesToText(s));
} else {
int l = mEditor->currentLine();
int c = mEditor->currentColumn();
- QString s = mEditor->textLine(l);
+ TQString s = mEditor->textLine(l);
s.prepend(quotePrefixName());
mEditor->insertLine(s,l);
mEditor->removeLine(l+1);
@@ -3649,23 +3649,23 @@ void KMComposeWin::slotAddQuotes()
}
}
-QString KMComposeWin::addQuotesToText(const QString &inputText)
+TQString KMComposeWin::addQuotesToText(const TQString &inputText)
{
- QString answer = QString( inputText );
- QString indentStr = quotePrefixName();
+ TQString answer = TQString( inputText );
+ TQString indentStr = quotePrefixName();
answer.replace( '\n', '\n' + indentStr);
answer.prepend( indentStr );
answer += '\n';
return KMMessage::smartQuote( answer, GlobalSettings::self()->lineWrapWidth() );
}
-QString KMComposeWin::removeQuotesFromText(const QString &inputText)
+TQString KMComposeWin::removeQuotesFromText(const TQString &inputText)
{
- QString s = inputText;
+ TQString s = inputText;
// remove first leading quote
- QString quotePrefix = '^' + quotePrefixName();
- QRegExp rx(quotePrefix);
+ TQString quotePrefix = '^' + quotePrefixName();
+ TQRegExp rx(quotePrefix);
s.remove(rx);
// now remove all remaining leading quotes
@@ -3685,12 +3685,12 @@ void KMComposeWin::slotRemoveQuotes()
// else remove quotes only on the lines that are marked.
if ( mEditor->hasMarkedText() ) {
- QString s = mEditor->markedText();
+ TQString s = mEditor->markedText();
mEditor->insert(removeQuotesFromText(s));
} else {
int l = mEditor->currentLine();
int c = mEditor->currentColumn();
- QString s = mEditor->textLine(l);
+ TQString s = mEditor->textLine(l);
mEditor->insertLine(removeQuotesFromText(s),l);
mEditor->removeLine(l+1);
mEditor->setCursorPosition(l,c-2);
@@ -3701,50 +3701,50 @@ void KMComposeWin::slotRemoveQuotes()
//-----------------------------------------------------------------------------
void KMComposeWin::slotUndo()
{
- QWidget* fw = focusWidget();
+ TQWidget* fw = focusWidget();
if (!fw) return;
if ( ::qt_cast<KEdit*>(fw) )
- static_cast<QTextEdit*>(fw)->undo();
- else if (::qt_cast<QLineEdit*>(fw))
- static_cast<QLineEdit*>(fw)->undo();
+ static_cast<TQTextEdit*>(fw)->undo();
+ else if (::qt_cast<TQLineEdit*>(fw))
+ static_cast<TQLineEdit*>(fw)->undo();
}
void KMComposeWin::slotRedo()
{
- QWidget* fw = focusWidget();
+ TQWidget* fw = focusWidget();
if (!fw) return;
if (::qt_cast<KEdit*>(fw))
static_cast<KEdit*>(fw)->redo();
- else if (::qt_cast<QLineEdit*>(fw))
- static_cast<QLineEdit*>(fw)->redo();
+ else if (::qt_cast<TQLineEdit*>(fw))
+ static_cast<TQLineEdit*>(fw)->redo();
}
//-----------------------------------------------------------------------------
void KMComposeWin::slotCut()
{
- QWidget* fw = focusWidget();
+ TQWidget* fw = focusWidget();
if (!fw) return;
if (::qt_cast<KEdit*>(fw))
static_cast<KEdit*>(fw)->cut();
- else if (::qt_cast<QLineEdit*>(fw))
- static_cast<QLineEdit*>(fw)->cut();
+ else if (::qt_cast<TQLineEdit*>(fw))
+ static_cast<TQLineEdit*>(fw)->cut();
}
//-----------------------------------------------------------------------------
void KMComposeWin::slotCopy()
{
- QWidget* fw = focusWidget();
+ TQWidget* fw = focusWidget();
if (!fw) return;
#ifdef KeyPress
#undef KeyPress
#endif
- QKeyEvent k(QEvent::KeyPress, Key_C, 0, ControlButton);
+ TQKeyEvent k(TQEvent::KeyPress, Key_C, 0, ControlButton);
kapp->notify(fw, &k);
}
@@ -3757,20 +3757,20 @@ void KMComposeWin::slotPasteClipboard()
void KMComposeWin::paste( QClipboard::Mode mode )
{
- QWidget* fw = focusWidget();
+ TQWidget* fw = focusWidget();
if (!fw) return;
- QMimeSource *mimeSource = QApplication::clipboard()->data( mode );
+ TQMimeSource *mimeSource = TQApplication::clipboard()->data( mode );
if ( mimeSource->provides("image/png") ) {
slotAttachPNGImageData(mimeSource->encodedData("image/png"));
} else if ( KURLDrag::canDecode( mimeSource ) ) {
KURL::List urlList;
if( KURLDrag::decode( mimeSource, urlList ) ) {
- const QString asText = i18n("Add as Text");
- const QString asAttachment = i18n("Add as Attachment");
- const QString text = i18n("Please select whether you want to insert the content as text into the editor, "
+ const TQString asText = i18n("Add as Text");
+ const TQString asAttachment = i18n("Add as Attachment");
+ const TQString text = i18n("Please select whether you want to insert the content as text into the editor, "
"or append the referenced file as an attachment.");
- const QString caption = i18n("Paste as text or attachment?");
+ const TQString caption = i18n("Paste as text or attachment?");
int id = KMessageBox::questionYesNoCancel( this, text, caption,
KGuiItem( asText ), KGuiItem( asAttachment) );
@@ -3789,9 +3789,9 @@ void KMComposeWin::paste( QClipboard::Mode mode )
break;
}
}
- } else if ( QTextDrag::canDecode( mimeSource ) ) {
- QString s;
- if ( QTextDrag::decode( mimeSource, s ) )
+ } else if ( TQTextDrag::canDecode( mimeSource ) ) {
+ TQString s;
+ if ( TQTextDrag::decode( mimeSource, s ) )
mEditor->insert( s );
}
}
@@ -3800,11 +3800,11 @@ void KMComposeWin::paste( QClipboard::Mode mode )
//-----------------------------------------------------------------------------
void KMComposeWin::slotMarkAll()
{
- QWidget* fw = focusWidget();
+ TQWidget* fw = focusWidget();
if (!fw) return;
- if (::qt_cast<QLineEdit*>(fw))
- static_cast<QLineEdit*>(fw)->selectAll();
+ if (::qt_cast<TQLineEdit*>(fw))
+ static_cast<TQLineEdit*>(fw)->selectAll();
else if (::qt_cast<KEdit*>(fw))
static_cast<KEdit*>(fw)->selectAll();
}
@@ -3839,14 +3839,14 @@ void KMComposeWin::slotNewMailReader()
//-----------------------------------------------------------------------------
-void KMComposeWin::slotUpdWinTitle(const QString& text)
+void KMComposeWin::slotUpdWinTitle(const TQString& text)
{
- QString s( text );
+ TQString s( text );
// Remove characters that show badly in most window decorations:
// newlines tend to become boxes.
if (text.isEmpty())
setCaption("("+i18n("unnamed")+")");
- else setCaption( s.replace( QChar('\n'), ' ' ) );
+ else setCaption( s.replace( TQChar('\n'), ' ' ) );
}
@@ -3951,19 +3951,19 @@ void KMComposeWin::slotWordWrapToggled(bool on)
{
if (on)
{
- mEditor->setWordWrap( QTextEdit::FixedColumnWidth );
+ mEditor->setWordWrap( TQTextEdit::FixedColumnWidth );
mEditor->setWrapColumnOrWidth( GlobalSettings::self()->lineWrapWidth() );
}
else
{
- mEditor->setWordWrap( QTextEdit::WidgetWidth );
+ mEditor->setWordWrap( TQTextEdit::WidgetWidth );
}
}
void KMComposeWin::disableWordWrap()
{
- mEditor->setWordWrap( QTextEdit::NoWrap );
+ mEditor->setWordWrap( TQTextEdit::NoWrap );
}
@@ -3971,15 +3971,15 @@ void KMComposeWin::disableWordWrap()
void KMComposeWin::slotPrint()
{
mMessageWasModified = isModified();
- connect( this, SIGNAL( applyChangesDone( bool ) ),
- this, SLOT( slotContinuePrint( bool ) ) );
+ connect( this, TQT_SIGNAL( applyChangesDone( bool ) ),
+ this, TQT_SLOT( slotContinuePrint( bool ) ) );
applyChanges( true );
}
void KMComposeWin::slotContinuePrint( bool rc )
{
- disconnect( this, SIGNAL( applyChangesDone( bool ) ),
- this, SLOT( slotContinuePrint( bool ) ) );
+ disconnect( this, TQT_SIGNAL( applyChangesDone( bool ) ),
+ this, TQT_SLOT( slotContinuePrint( bool ) ) );
if( rc ) {
if ( mComposedMessages.isEmpty() ) {
@@ -3993,12 +3993,12 @@ void KMComposeWin::slotContinuePrint( bool rc )
}
//----------------------------------------------------------------------------
-bool KMComposeWin::validateAddresses( QWidget * parent, const QString & addresses )
+bool KMComposeWin::validateAddresses( TQWidget * parent, const TQString & addresses )
{
- QString brokenAddress;
+ TQString brokenAddress;
KPIM::EmailParseResult errorCode = KMMessage::isValidEmailAddressList( KMMessage::expandAliases( addresses ), brokenAddress );
if ( !( errorCode == KPIM::AddressOk || errorCode == KPIM::AddressEmpty ) ) {
- QString errorMsg( "<qt><p><b>" + brokenAddress +
+ TQString errorMsg( "<qt><p><b>" + brokenAddress +
"</b></p><p>" + KPIM::emailParseResultToString( errorCode ) +
"</p></qt>" );
KMessageBox::sorry( parent, errorMsg, i18n("Invalid Email Address") );
@@ -4100,7 +4100,7 @@ void KMComposeWin::doSend( KMail::MessageSender::SendMethod method,
// rectify the problem by editing their outgoing preferences and
// resending.
// Hence this following conditional
- QString hf = mMsg->headerField("X-KMail-Transport");
+ TQString hf = mMsg->headerField("X-KMail-Transport");
if ((mTransport->currentText() != mTransport->text(0)) ||
(!hf.isEmpty() && (hf != mTransport->text(0))))
mMsg->setHeaderField("X-KMail-Transport", mTransport->currentText());
@@ -4109,19 +4109,19 @@ void KMComposeWin::doSend( KMail::MessageSender::SendMethod method,
const bool neverEncrypt = ( mDisableBreaking && GlobalSettings::self()->neverEncryptDrafts() )
|| mSigningAndEncryptionExplicitlyDisabled;
- connect( this, SIGNAL( applyChangesDone( bool ) ),
- SLOT( slotContinueDoSend( bool ) ) );
+ connect( this, TQT_SIGNAL( applyChangesDone( bool ) ),
+ TQT_SLOT( slotContinueDoSend( bool ) ) );
if ( mEditor->textFormat() == Qt::RichText )
mMsg->setHeaderField( "X-KMail-Markup", "true" );
else
mMsg->removeHeaderField( "X-KMail-Markup" );
if ( mEditor->textFormat() == Qt::RichText && inlineSigningEncryptionSelected() ) {
- QString keepBtnText = mEncryptAction->isChecked() ?
+ TQString keepBtnText = mEncryptAction->isChecked() ?
mSignAction->isChecked() ? i18n( "&Keep markup, do not sign/encrypt" )
: i18n( "&Keep markup, do not encrypt" )
: i18n( "&Keep markup, do not sign" );
- QString yesBtnText = mEncryptAction->isChecked() ?
+ TQString yesBtnText = mEncryptAction->isChecked() ?
mSignAction->isChecked() ? i18n("Sign/Encrypt (delete markup)")
: i18n( "Encrypt (delete markup)" )
: i18n( "Sign (delete markup)" );
@@ -4147,7 +4147,7 @@ void KMComposeWin::doSend( KMail::MessageSender::SendMethod method,
// signing and encryption state, so let's add a header instead
mMsg->setHeaderField( "X-KMail-SignatureActionEnabled", mSignAction->isChecked()? "true":"false" );
mMsg->setHeaderField( "X-KMail-EncryptActionEnabled", mEncryptAction->isChecked()? "true":"false" );
- mMsg->setHeaderField( "X-KMail-CryptoMessageFormat", QString::number( cryptoMessageFormat() ) );
+ mMsg->setHeaderField( "X-KMail-CryptoMessageFormat", TQString::number( cryptoMessageFormat() ) );
} else {
mMsg->removeHeaderField( "X-KMail-SignatureActionEnabled" );
mMsg->removeHeaderField( "X-KMail-EncryptActionEnabled" );
@@ -4160,7 +4160,7 @@ void KMComposeWin::doSend( KMail::MessageSender::SendMethod method,
applyChanges( neverEncrypt );
}
-bool KMComposeWin::saveDraftOrTemplate( const QString &folderName,
+bool KMComposeWin::saveDraftOrTemplate( const TQString &folderName,
KMMessage *msg )
{
KMFolder *theFolder = 0, *imapTheFolder = 0;
@@ -4222,15 +4222,15 @@ void KMComposeWin::slotContinueDoSend( bool sentOk )
{
kdDebug(5006) << "KMComposeWin::slotContinueDoSend( " << sentOk << " )"
<< endl;
- disconnect( this, SIGNAL( applyChangesDone( bool ) ),
- this, SLOT( slotContinueDoSend( bool ) ) );
+ disconnect( this, TQT_SIGNAL( applyChangesDone( bool ) ),
+ this, TQT_SLOT( slotContinueDoSend( bool ) ) );
if ( !sentOk ) {
mDisableBreaking = false;
return;
}
- for ( QValueVector<KMMessage*>::iterator it = mComposedMessages.begin() ; it != mComposedMessages.end() ; ++it ) {
+ for ( TQValueVector<KMMessage*>::iterator it = mComposedMessages.begin() ; it != mComposedMessages.end() ; ++it ) {
// remove fields that contain no data (e.g. an empty Cc: or Bcc:)
(*it)->cleanupHeader();
@@ -4247,7 +4247,7 @@ void KMComposeWin::slotContinueDoSend( bool sentOk )
(*it)->setCc( KMMessage::expandAliases( cc() ));
if( !mComposer->originalBCC().isEmpty() )
(*it)->setBcc( KMMessage::expandAliases( mComposer->originalBCC() ));
- QString recips = (*it)->headerField( "X-KMail-Recipients" );
+ TQString recips = (*it)->headerField( "X-KMail-Recipients" );
if( !recips.isEmpty() ) {
(*it)->setHeaderField( "X-KMail-Recipients", KMMessage::expandAliases( recips ), KMMessage::Address );
}
@@ -4300,8 +4300,8 @@ void KMComposeWin::slotSaveTemplate() {
//----------------------------------------------------------------------------
void KMComposeWin::slotSendNowVia( int item )
{
- QStringList availTransports= KMail::TransportManager::transportNames();
- QString customTransport = availTransports[ item ];
+ TQStringList availTransports= KMail::TransportManager::transportNames();
+ TQString customTransport = availTransports[ item ];
mTransport->setCurrentText( customTransport );
slotSendNow();
@@ -4310,8 +4310,8 @@ void KMComposeWin::slotSendNowVia( int item )
//----------------------------------------------------------------------------
void KMComposeWin::slotSendLaterVia( int item )
{
- QStringList availTransports= KMail::TransportManager::transportNames();
- QString customTransport = availTransports[ item ];
+ TQStringList availTransports= KMail::TransportManager::transportNames();
+ TQString customTransport = availTransports[ item ];
mTransport->setCurrentText( customTransport );
slotSendLater();
@@ -4415,7 +4415,7 @@ void KMComposeWin::slotCleanSpace()
// Yes, extra space in a quote string is squeezed.
// Signatures are respected (i.e. not cleaned).
- QString s;
+ TQString s;
if ( mEditor->hasMarkedText() ) {
s = mEditor->markedText();
if( s.isEmpty() )
@@ -4425,7 +4425,7 @@ void KMComposeWin::slotCleanSpace()
}
// Remove the signature for now.
- QString sig;
+ TQString sig;
bool restore = false;
const KPIM::Identity & ident =
kmkernel->identityManager()->identityForUoid( mId );
@@ -4440,16 +4440,16 @@ void KMComposeWin::slotCleanSpace()
}
// Squeeze tabs and spaces
- QRegExp squeeze( "[\t ]+" );
- s.replace( squeeze, QChar( ' ' ) );
+ TQRegExp squeeze( "[\t ]+" );
+ s.replace( squeeze, TQChar( ' ' ) );
// Remove trailing whitespace
- QRegExp trailing( "\\s+$" );
- s.replace( trailing, QChar( '\n' ) );
+ TQRegExp trailing( "\\s+$" );
+ s.replace( trailing, TQChar( '\n' ) );
// Single space lines
- QRegExp singleSpace( "[\n]{2,}" );
- s.replace( singleSpace, QChar( '\n' ) );
+ TQRegExp singleSpace( "[\n]{2,}" );
+ s.replace( singleSpace, TQChar( '\n' ) );
// Restore the signature
if ( restore )
@@ -4497,7 +4497,7 @@ void KMComposeWin::toggleMarkup(bool markup)
// save the buttonstates because setColor calls fontChanged
bool _bold = textBoldAction->isChecked();
bool _italic = textItalicAction->isChecked();
- mEditor->setColor(QColor(0,0,0));
+ mEditor->setColor(TQColor(0,0,0));
textBoldAction->setChecked(_bold);
textItalicAction->setChecked(_italic);
mEditor->setSelection ( paraFrom, indexFrom, paraTo, indexTo);
@@ -4517,7 +4517,7 @@ void KMComposeWin::toggleMarkup(bool markup)
if ( mUseHTMLEditor ) { // it was turned on
mUseHTMLEditor = false;
mEditor->setTextFormat(Qt::PlainText);
- QString text = mEditor->text();
+ TQString text = mEditor->text();
mEditor->setText(text); // otherwise the text still looks formatted
mEditor->setModified(true);
slotAutoSpellCheckingToggled(true);
@@ -4546,7 +4546,7 @@ void KMComposeWin::slotAutoSpellCheckingToggled( bool on )
mAutoSpellCheckingAction->setChecked(false); // set it to false again
}
- QString temp;
+ TQString temp;
if ( on )
temp = i18n( "Spellcheck: on" );
else
@@ -4560,8 +4560,8 @@ void KMComposeWin::slotSpellcheck()
mSubjectTextWasSpellChecked = false;
mSpellCheckInProgress=true;
/*
- connect (mEditor, SIGNAL (spellcheck_progress (unsigned)),
- this, SLOT (spell_progress (unsigned)));
+ connect (mEditor, TQT_SIGNAL (spellcheck_progress (unsigned)),
+ this, TQT_SLOT (spell_progress (unsigned)));
*/
mEditor->spellcheck();
@@ -4573,7 +4573,7 @@ void KMComposeWin::slotUpdateSignatureActions()
//edit menu accordingly.
const KPIM::Identity & ident =
kmkernel->identityManager()->identityForUoidOrDefault( mIdentity->currentIdentity() );
- QString sig = ident.signatureText();
+ TQString sig = ident.signatureText();
if ( sig.isEmpty() ) {
mAppendSignatureAction->setEnabled( false );
@@ -4616,7 +4616,7 @@ void KMComposeWin::slotSpellcheckDone(int result)
statusBar()->changeItem(i18n(" Spell check complete."),0);
break;
}
- QTimer::singleShot( 2000, this, SLOT(slotSpellcheckDoneClearStatus()) );
+ TQTimer::singleShot( 2000, this, TQT_SLOT(slotSpellcheckDoneClearStatus()) );
}
void KMComposeWin::slotSpellcheckDoneClearStatus()
@@ -4665,7 +4665,7 @@ void KMComposeWin::slotIdentityChanged( uint uoid )
// of the identity, we assume that since the user typed it
// they want to keep it
if ( mEdtBcc->text() != ident.bcc() && !mEdtBcc->text().isEmpty() ) {
- QString temp_string( mEdtBcc->text() + QString::fromLatin1(",") + ident.bcc() );
+ TQString temp_string( mEdtBcc->text() + TQString::fromLatin1(",") + ident.bcc() );
mEdtBcc->setText( temp_string );
} else {
// if the user typed the same address as the preset BCC
@@ -4679,7 +4679,7 @@ void KMComposeWin::slotIdentityChanged( uint uoid )
// allowing the user to keep all addresses
if( mEdtBcc && mEdtBcc->edited() && !ident.bcc().isEmpty() ) {
if( !mEdtBcc->text().isEmpty() ) {
- QString temp_string ( mEdtBcc->text() + QString::fromLatin1(",") + ident.bcc() );
+ TQString temp_string ( mEdtBcc->text() + TQString::fromLatin1(",") + ident.bcc() );
mEdtBcc->setText( temp_string );
} else {
mEdtBcc->setText( ident.bcc() );
@@ -4705,7 +4705,7 @@ void KMComposeWin::slotIdentityChanged( uint uoid )
mMsg->removeHeaderField("X-Face");
else
{
- QString xface = ident.xface();
+ TQString xface = ident.xface();
if (!xface.isEmpty())
{
int numNL = ( xface.length() - 1 ) / 70;
@@ -4716,7 +4716,7 @@ void KMComposeWin::slotIdentityChanged( uint uoid )
}
if ( !mBtnTransport->isChecked() ) {
- QString transp = ident.transport();
+ TQString transp = ident.transport();
if ( transp.isEmpty() )
{
mMsg->removeHeaderField("X-KMail-Transport");
@@ -4733,7 +4733,7 @@ void KMComposeWin::slotIdentityChanged( uint uoid )
setFcc( ident.fcc() );
}
- QString edtText = mEditor->text();
+ TQString edtText = mEditor->text();
if ( mOldSigText.isEmpty() ) {
const KPIM::Identity &id =
@@ -4801,7 +4801,7 @@ void KMComposeWin::slotSpellcheckConfig()
KDialogBase::Ok|KDialogBase::Cancel, KDialogBase::Ok,
this, 0, true, true );
KWin kwin;
- QTabDialog qtd (this, "tabdialog", true);
+ TQTabDialog qtd (this, "tabdialog", true);
KSpellConfig mKSpellConfig (&qtd);
mKSpellConfig.layout()->setMargin( KDialog::marginHint() );
@@ -4817,7 +4817,7 @@ void KMComposeWin::slotSpellcheckConfig()
}
//-----------------------------------------------------------------------------
-void KMComposeWin::slotStatusMessage(const QString &message)
+void KMComposeWin::slotStatusMessage(const TQString &message)
{
statusBar()->changeItem( message, 0 );
}
@@ -4827,8 +4827,8 @@ void KMComposeWin::slotEditToolbars()
saveMainWindowSettings(KMKernel::config(), "Composer");
KEditToolbar dlg(guiFactory(), this);
- connect( &dlg, SIGNAL(newToolbarConfig()),
- SLOT(slotUpdateToolbars()) );
+ connect( &dlg, TQT_SIGNAL(newToolbarConfig()),
+ TQT_SLOT(slotUpdateToolbars()) );
dlg.exec();
}
@@ -4887,15 +4887,15 @@ void KMComposeWin::updateAutoSave()
}
else {
if ( !mAutoSaveTimer ) {
- mAutoSaveTimer = new QTimer( this, "mAutoSaveTimer" );
- connect( mAutoSaveTimer, SIGNAL( timeout() ),
- this, SLOT( autoSaveMessage() ) );
+ mAutoSaveTimer = new TQTimer( this, "mAutoSaveTimer" );
+ connect( mAutoSaveTimer, TQT_SIGNAL( timeout() ),
+ this, TQT_SLOT( autoSaveMessage() ) );
}
mAutoSaveTimer->start( autoSaveInterval() );
}
}
-void KMComposeWin::setAutoSaveFilename( const QString & filename )
+void KMComposeWin::setAutoSaveFilename( const TQString & filename )
{
if ( !mAutoSaveFilename.isEmpty() )
KMFolderMaildir::removeFile( KMKernel::localDataPath() + "autosave",
@@ -4911,7 +4911,7 @@ void KMComposeWin::cleanupAutoSave()
<< mAutoSaveFilename << endl;
KMFolderMaildir::removeFile( KMKernel::localDataPath() + "autosave",
mAutoSaveFilename );
- mAutoSaveFilename = QString();
+ mAutoSaveFilename = TQString();
}
}
@@ -4966,30 +4966,30 @@ void KMComposeWin::slotSetAlwaysSend( bool bAlways )
mAlwaysSend = bAlways;
}
-void KMComposeWin::slotListAction( const QString& style )
+void KMComposeWin::slotListAction( const TQString& style )
{
toggleMarkup(true);
if ( style == i18n( "Standard" ) )
- mEditor->setParagType( QStyleSheetItem::DisplayBlock, QStyleSheetItem::ListDisc );
+ mEditor->setParagType( TQStyleSheetItem::DisplayBlock, TQStyleSheetItem::ListDisc );
else if ( style == i18n( "Bulleted List (Disc)" ) )
- mEditor->setParagType( QStyleSheetItem::DisplayListItem, QStyleSheetItem::ListDisc );
+ mEditor->setParagType( TQStyleSheetItem::DisplayListItem, TQStyleSheetItem::ListDisc );
else if ( style == i18n( "Bulleted List (Circle)" ) )
- mEditor->setParagType( QStyleSheetItem::DisplayListItem, QStyleSheetItem::ListCircle );
+ mEditor->setParagType( TQStyleSheetItem::DisplayListItem, TQStyleSheetItem::ListCircle );
else if ( style == i18n( "Bulleted List (Square)" ) )
- mEditor->setParagType( QStyleSheetItem::DisplayListItem, QStyleSheetItem::ListSquare );
+ mEditor->setParagType( TQStyleSheetItem::DisplayListItem, TQStyleSheetItem::ListSquare );
else if ( style == i18n( "Ordered List (Decimal)" ))
- mEditor->setParagType( QStyleSheetItem::DisplayListItem, QStyleSheetItem::ListDecimal );
+ mEditor->setParagType( TQStyleSheetItem::DisplayListItem, TQStyleSheetItem::ListDecimal );
else if ( style == i18n( "Ordered List (Alpha lower)" ) )
- mEditor->setParagType( QStyleSheetItem::DisplayListItem, QStyleSheetItem::ListLowerAlpha );
+ mEditor->setParagType( TQStyleSheetItem::DisplayListItem, TQStyleSheetItem::ListLowerAlpha );
else if ( style == i18n( "Ordered List (Alpha upper)" ) )
- mEditor->setParagType( QStyleSheetItem::DisplayListItem, QStyleSheetItem::ListUpperAlpha );
+ mEditor->setParagType( TQStyleSheetItem::DisplayListItem, TQStyleSheetItem::ListUpperAlpha );
mEditor->viewport()->setFocus();
}
-void KMComposeWin::slotFontAction( const QString& font)
+void KMComposeWin::slotFontAction( const TQString& font)
{
toggleMarkup(true);
- mEditor->QTextEdit::setFamily( font );
+ mEditor->TQTextEdit::setFamily( font );
mEditor->viewport()->setFocus();
}
@@ -5003,37 +5003,37 @@ void KMComposeWin::slotSizeAction( int size )
void KMComposeWin::slotAlignLeft()
{
toggleMarkup(true);
- mEditor->QTextEdit::setAlignment( AlignLeft );
+ mEditor->TQTextEdit::setAlignment( AlignLeft );
}
void KMComposeWin::slotAlignCenter()
{
toggleMarkup(true);
- mEditor->QTextEdit::setAlignment( AlignHCenter );
+ mEditor->TQTextEdit::setAlignment( AlignHCenter );
}
void KMComposeWin::slotAlignRight()
{
toggleMarkup(true);
- mEditor->QTextEdit::setAlignment( AlignRight );
+ mEditor->TQTextEdit::setAlignment( AlignRight );
}
void KMComposeWin::slotTextBold()
{
toggleMarkup(true);
- mEditor->QTextEdit::setBold( textBoldAction->isChecked() );
+ mEditor->TQTextEdit::setBold( textBoldAction->isChecked() );
}
void KMComposeWin::slotTextItalic()
{
toggleMarkup(true);
- mEditor->QTextEdit::setItalic( textItalicAction->isChecked() );
+ mEditor->TQTextEdit::setItalic( textItalicAction->isChecked() );
}
void KMComposeWin::slotTextUnder()
{
toggleMarkup(true);
- mEditor->QTextEdit::setUnderline( textUnderAction->isChecked() );
+ mEditor->TQTextEdit::setUnderline( textUnderAction->isChecked() );
}
void KMComposeWin::slotFormatReset()
@@ -5043,7 +5043,7 @@ void KMComposeWin::slotFormatReset()
}
void KMComposeWin::slotTextColor()
{
- QColor color = mEditor->color();
+ TQColor color = mEditor->color();
if ( KColorDialog::getColor( color, this ) ) {
toggleMarkup(true);
@@ -5051,12 +5051,12 @@ void KMComposeWin::slotTextColor()
}
}
-void KMComposeWin::fontChanged( const QFont &f )
+void KMComposeWin::fontChanged( const TQFont &f )
{
- QFont fontTemp = f;
+ TQFont fontTemp = f;
fontTemp.setBold( true );
fontTemp.setItalic( true );
- QFontInfo fontInfo( fontTemp );
+ TQFontInfo fontInfo( fontTemp );
if ( fontInfo.bold() ) {
textBoldAction->setChecked( f.bold() );
@@ -5113,7 +5113,7 @@ void KMComposeWin::slotEncryptChiasmusToggled( bool on ) {
Kleo::CryptoBackendFactory::instance()->protocol( "Chiasmus" );
if ( !chiasmus ) {
- const QString msg = Kleo::CryptoBackendFactory::instance()->knowsAboutProtocol( "Chiasmus" )
+ const TQString msg = Kleo::CryptoBackendFactory::instance()->knowsAboutProtocol( "Chiasmus" )
? i18n( "Please configure a Crypto Backend to use for "
"Chiasmus encryption first.\n"
"You can do this in the Crypto Backends tab of "
@@ -5125,9 +5125,9 @@ void KMComposeWin::slotEncryptChiasmusToggled( bool on ) {
return;
}
- STD_NAMESPACE_PREFIX auto_ptr<Kleo::SpecialJob> job( chiasmus->specialJob( "x-obtain-keys", QMap<QString,QVariant>() ) );
+ STD_NAMESPACE_PREFIX auto_ptr<Kleo::SpecialJob> job( chiasmus->specialJob( "x-obtain-keys", TQMap<TQString,TQVariant>() ) );
if ( !job.get() ) {
- const QString msg = i18n( "Chiasmus backend does not offer the "
+ const TQString msg = i18n( "Chiasmus backend does not offer the "
"\"x-obtain-keys\" function. Please report this bug." );
KMessageBox::error( this, msg, i18n( "Chiasmus Backend Error" ) );
return;
@@ -5138,18 +5138,18 @@ void KMComposeWin::slotEncryptChiasmusToggled( bool on ) {
return;
}
- const QVariant result = job->property( "result" );
- if ( result.type() != QVariant::StringList ) {
- const QString msg = i18n( "Unexpected return value from Chiasmus backend: "
+ const TQVariant result = job->property( "result" );
+ if ( result.type() != TQVariant::StringList ) {
+ const TQString msg = i18n( "Unexpected return value from Chiasmus backend: "
"The \"x-obtain-keys\" function did not return a "
"string list. Please report this bug." );
KMessageBox::error( this, msg, i18n( "Chiasmus Backend Error" ) );
return;
}
- const QStringList keys = result.toStringList();
+ const TQStringList keys = result.toStringList();
if ( keys.empty() ) {
- const QString msg = i18n( "No keys have been found. Please check that a "
+ const TQString msg = i18n( "No keys have been found. Please check that a "
"valid key path has been set in the Chiasmus "
"configuration." );
KMessageBox::information( this, msg, i18n( "No Chiasmus Keys Found" ) );
@@ -5159,7 +5159,7 @@ void KMComposeWin::slotEncryptChiasmusToggled( bool on ) {
ChiasmusKeySelector selectorDlg( this, i18n( "Chiasmus Encryption Key Selection" ),
keys, GlobalSettings::chiasmusKey(),
GlobalSettings::chiasmusOptions() );
- if ( selectorDlg.exec() != QDialog::Accepted )
+ if ( selectorDlg.exec() != TQDialog::Accepted )
return;
GlobalSettings::setChiasmusOptions( selectorDlg.options() );
@@ -5180,7 +5180,7 @@ void KMComposeWin::slotEditDone(KMail::EditorWatcher * watcher)
return;
tf->file()->reset();
- QByteArray data = tf->file()->readAll();
+ TQByteArray data = tf->file()->readAll();
part->setBodyEncodedBinary( data );
}
@@ -5200,14 +5200,14 @@ void KMComposeWin::slotAttachmentDragStarted()
{
kdDebug(5006) << k_funcinfo << endl;
int idx = 0;
- QStringList filenames;
- for ( QPtrListIterator<QListViewItem> it(mAtmItemList); *it; ++it, ++idx ) {
+ TQStringList filenames;
+ for ( TQPtrListIterator<TQListViewItem> it(mAtmItemList); *it; ++it, ++idx ) {
if ( (*it)->isSelected() ) {
KMMessagePart* msgPart = mAtmList.at(idx);
KTempDir * tempDir = new KTempDir(); // will be deleted on composer close
tempDir->setAutoDelete( true );
mTempDirs.insert( tempDir );
- const QString fileName = tempDir->name() + "/" + msgPart->name();
+ const TQString fileName = tempDir->name() + "/" + msgPart->name();
KPIM::kByteArrayToFile(msgPart->bodyDecodedBinary(),
fileName,
false, false, false);
@@ -5218,14 +5218,14 @@ void KMComposeWin::slotAttachmentDragStarted()
}
if ( filenames.isEmpty() ) return;
- QUriDrag *drag = new QUriDrag( mAtmListView );
+ TQUriDrag *drag = new TQUriDrag( mAtmListView );
drag->setFileNames( filenames );
drag->dragCopy();
}
void KMComposeWin::recipientEditorSizeHintChanged()
{
- QTimer::singleShot( 1, this, SLOT(setMaximumHeaderSize()) );
+ TQTimer::singleShot( 1, this, TQT_SLOT(setMaximumHeaderSize()) );
}
void KMComposeWin::setMaximumHeaderSize()
diff --git a/kmail/kmcomposewin.h b/kmail/kmcomposewin.h
index 873d4fccc..ba4c94f3b 100644
--- a/kmail/kmcomposewin.h
+++ b/kmail/kmcomposewin.h
@@ -16,17 +16,17 @@
#include <set>
-#include <qlabel.h>
-#include <qlistview.h>
-
-#include <qcheckbox.h>
-#include <qpushbutton.h>
-#include <qclipboard.h>
-#include <qpalette.h>
-#include <qfont.h>
-#include <qptrlist.h>
-#include <qvaluevector.h>
-#include <qsplitter.h>
+#include <tqlabel.h>
+#include <tqlistview.h>
+
+#include <tqcheckbox.h>
+#include <tqpushbutton.h>
+#include <tqclipboard.h>
+#include <tqpalette.h>
+#include <tqfont.h>
+#include <tqptrlist.h>
+#include <tqvaluevector.h>
+#include <tqsplitter.h>
#include <kio/job.h>
#include <kglobalsettings.h>
@@ -116,24 +116,24 @@ public: // mailserviceimpl
* From MailComposerIface
*/
void send(int how);
- void addAttachmentsAndSend(const KURL::List &urls, const QString &comment, int how);
- void addAttachment(KURL url,QString comment);
- void addAttachment(const QString &name,
- const QCString &cte,
- const QByteArray &data,
- const QCString &type,
- const QCString &subType,
- const QCString &paramAttr,
- const QString &paramValue,
- const QCString &contDisp);
+ void addAttachmentsAndSend(const KURL::List &urls, const TQString &comment, int how);
+ void addAttachment(KURL url,TQString comment);
+ void addAttachment(const TQString &name,
+ const TQCString &cte,
+ const TQByteArray &data,
+ const TQCString &type,
+ const TQCString &subType,
+ const TQCString &paramAttr,
+ const TQString &paramValue,
+ const TQCString &contDisp);
public: // kmcommand
- void setBody (QString body);
+ void setBody (TQString body);
private:
/**
* To catch palette changes
*/
- virtual bool event(QEvent *e);
+ virtual bool event(TQEvent *e);
/**
* update colors
@@ -149,7 +149,7 @@ private:
* If necessary increases the word wrap of the editor so that it will
* not wrap the body string
*/
- void verifyWordWrapLengthIsAdequate(const QString&);
+ void verifyWordWrapLengthIsAdequate(const TQString&);
public: // kmkernel, kmcommands, callback
/**
@@ -172,7 +172,7 @@ public: // kmkernel
/**
* Set the filename which is used for autosaving.
*/
- void setAutoSaveFilename( const QString & filename );
+ void setAutoSaveFilename( const TQString & filename );
private:
/**
@@ -208,7 +208,7 @@ public: // kmkernel, kmcommand, mailserviceimpl
/**
* Recode to the specified charset
*/
- void setCharset(const QCString& aCharset, bool forceDefault = FALSE);
+ void setCharset(const TQCString& aCharset, bool forceDefault = FALSE);
public: // kmcommand
/**
@@ -235,8 +235,8 @@ private:
* If found, returns its localized description, otherwise the @p type
* in lowercase.
*/
- static QString prettyMimeType( const QString& type );
- QString quotePrefixName() const;
+ static TQString prettyMimeType( const TQString& type );
+ TQString quotePrefixName() const;
private: // kmedit:
KMLineEditSpell *sujectLineWidget() const { return mEdtSubject;}
@@ -294,7 +294,7 @@ private slots:
void slotPasteClipboardAsAttachment();
void slotAddQuotes();
void slotRemoveQuotes();
- void slotAttachPNGImageData(const QByteArray &image);
+ void slotAttachPNGImageData(const TQByteArray &image);
void slotMarkAll();
@@ -342,7 +342,7 @@ private slots:
/**
* XML-GUI stuff
*/
- void slotStatusMessage(const QString &message);
+ void slotStatusMessage(const TQString &message);
void slotEditToolbars();
void slotUpdateToolbars();
void slotEditKeys();
@@ -353,7 +353,7 @@ private slots:
/**
* Change window title to given string.
*/
- void slotUpdWinTitle(const QString& );
+ void slotUpdWinTitle(const TQString& );
/**
* Switch the icon to lock or unlock respectivly.
@@ -406,7 +406,7 @@ private slots:
/**
* Open a popup-menu in the attachments-listbox.
*/
- void slotAttachPopupMenu(QListViewItem *, const QPoint &, int);
+ void slotAttachPopupMenu(TQListViewItem *, const TQPoint &, int);
/**
* Returns the number of the current attachment in the listbox,
@@ -461,11 +461,11 @@ private slots:
/**
* KIO slots for attachment insertion
*/
- void slotAttachFileData(KIO::Job *, const QByteArray &);
+ void slotAttachFileData(KIO::Job *, const TQByteArray &);
void slotAttachFileResult(KIO::Job *);
- void slotListAction(const QString &);
- void slotFontAction(const QString &);
+ void slotListAction(const TQString &);
+ void slotFontAction(const TQString &);
void slotSizeAction(int);
void slotAlignLeft();
void slotAlignCenter();
@@ -475,7 +475,7 @@ private slots:
void slotTextUnder();
void slotFormatReset();
void slotTextColor();
- void fontChanged( const QFont & );
+ void fontChanged( const TQFont & );
void alignmentChanged( int );
public: // kmkernel, attachmentlistview
@@ -517,21 +517,21 @@ private:
/**
Connect signals for moving focus by arrow keys. Returns next edit.
*/
- QWidget *connectFocusMoving( QWidget *prev, QWidget *next );
+ TQWidget *connectFocusMoving( TQWidget *prev, TQWidget *next );
/**
* Show or hide header lines
*/
void rethinkHeaderLine( int aValue, int aMask, int& aRow,
- const QString &aLabelStr, QLabel* aLbl,
- QLineEdit* aEdt, QPushButton* aBtn = 0,
- const QString &toolTip = QString::null,
- const QString &whatsThis = QString::null );
+ const TQString &aLabelStr, TQLabel* aLbl,
+ TQLineEdit* aEdt, TQPushButton* aBtn = 0,
+ const TQString &toolTip = TQString::null,
+ const TQString &whatsThis = TQString::null );
void rethinkHeaderLine( int value, int mask, int& row,
- const QString& labelStr, QLabel* lbl,
- QComboBox* cbx, QCheckBox *chk );
+ const TQString& labelStr, TQLabel* lbl,
+ TQComboBox* cbx, TQCheckBox *chk );
/**
* Initialization methods
@@ -544,19 +544,19 @@ private:
/**
* Header fields.
*/
- QString subject() const;
- QString to() const;
- QString cc() const;
- QString bcc() const;
- QString from() const;
- QString replyTo() const;
+ TQString subject() const;
+ TQString to() const;
+ TQString cc() const;
+ TQString bcc() const;
+ TQString from() const;
+ TQString replyTo() const;
/**
* Use the given folder as sent-mail folder if the given folder exists.
* Else show an error message and use the default sent-mail folder as
* sent-mail folder.
*/
- void setFcc( const QString &idString );
+ void setFcc( const TQString &idString );
/**
* Ask for confirmation if the message was changed before close.
@@ -585,11 +585,11 @@ private:
/**
* Remove an attachment from the list.
*/
- void removeAttach(const QString &url);
+ void removeAttach(const TQString &url);
void removeAttach(int idx);
/**
- * Updates an item in the QListView to represnet a given message part
+ * Updates an item in the TQListView to represnet a given message part
*/
void msgPartToItem(const KMMessagePart* msgPart, KMAtmListViewItem *lvi,
bool loadDefaults = true );
@@ -641,12 +641,12 @@ private:
* This function is for example used to restore the unencrypted/unsigned
* message text for editting.
*/
- static void decryptOrStripOffCleartextSignature( QCString& );
+ static void decryptOrStripOffCleartextSignature( TQCString& );
/**
* Save the message into the Drafts or Templates folder.
*/
- bool saveDraftOrTemplate( const QString &folderName, KMMessage *msg );
+ bool saveDraftOrTemplate( const TQString &folderName, KMMessage *msg );
/**
* Send the message. Returns true if the message was sent successfully.
@@ -656,7 +656,7 @@ private:
KMComposeWin::SaveIn saveIn = KMComposeWin::None );
/**
- * Returns the autosave interval in milliseconds (as needed for QTimer).
+ * Returns the autosave interval in milliseconds (as needed for TQTimer).
*/
int autoSaveInterval() const;
@@ -681,7 +681,7 @@ private:
* @return true if all addresses are valid.
* @return false if one or several addresses are invalid.
*/
- static bool validateAddresses( QWidget * parent, const QString & addresses );
+ static bool validateAddresses( TQWidget * parent, const TQString & addresses );
/**
* Sets the transport combobox to @p transport. If @p transport is empty
@@ -689,7 +689,7 @@ private:
* nor a custom transport then the combobox is set to the default transport.
* @param transport the transport the combobox should be set to
*/
- void setTransport( const QString & transport );
+ void setTransport( const TQString & transport );
/**
* Helper to insert the signature of the current identy at the
@@ -707,26 +707,26 @@ private slots:
void setMaximumHeaderSize();
private:
- QWidget *mMainWidget;
- QComboBox *mTransport;
+ TQWidget *mMainWidget;
+ TQComboBox *mTransport;
KMail::DictionaryComboBox *mDictionaryCombo;
KPIM::IdentityCombo *mIdentity;
KMFolderComboBox *mFcc;
KMLineEdit *mEdtFrom, *mEdtReplyTo, *mEdtTo, *mEdtCc, *mEdtBcc;
KMLineEditSpell *mEdtSubject;
- QLabel *mLblIdentity, *mLblTransport, *mLblFcc;
- QLabel *mLblFrom, *mLblReplyTo, *mLblTo, *mLblCc, *mLblBcc, *mLblSubject;
- QLabel *mDictionaryLabel;
- QCheckBox *mBtnIdentity, *mBtnTransport, *mBtnFcc;
- QPushButton *mBtnTo, *mBtnCc, *mBtnBcc, /* *mBtnFrom, */ *mBtnReplyTo;
+ TQLabel *mLblIdentity, *mLblTransport, *mLblFcc;
+ TQLabel *mLblFrom, *mLblReplyTo, *mLblTo, *mLblCc, *mLblBcc, *mLblSubject;
+ TQLabel *mDictionaryLabel;
+ TQCheckBox *mBtnIdentity, *mBtnTransport, *mBtnFcc;
+ TQPushButton *mBtnTo, *mBtnCc, *mBtnBcc, /* *mBtnFrom, */ *mBtnReplyTo;
bool mSpellCheckInProgress;
bool mDone;
bool mAtmModified;
KMEdit* mEditor;
- QGridLayout* mGrid;
+ TQGridLayout* mGrid;
KMMessage *mMsg;
- QValueVector<KMMessage*> mComposedMessages;
+ TQValueVector<KMMessage*> mComposedMessages;
KMail::AttachmentListView* mAtmListView;
int mAtmColEncrypt;
int mAtmColSign;
@@ -734,9 +734,9 @@ private:
int mAtmEncryptColWidth;
int mAtmSignColWidth;
int mAtmCompressColWidth;
- QPtrList<QListViewItem> mAtmItemList;
- QPtrList<KMMessagePart> mAtmList;
- QPopupMenu *mAttachMenu;
+ TQPtrList<TQListViewItem> mAtmItemList;
+ TQPtrList<KMMessagePart> mAtmList;
+ TQPopupMenu *mAttachMenu;
int mOpenId, mOpenWithId, mViewId, mRemoveId, mSaveAsId, mPropertiesId, mEditId, mEditWithId;
bool mAutoDeleteMsg;
bool mSigningAndEncryptionExplicitlyDisabled;
@@ -749,11 +749,11 @@ private:
int mNumHeaders;
bool mUseHTMLEditor;
bool mHtmlMarkup;
- QFont mBodyFont, mFixedFont;
- QPtrList<KTempFile> mAtmTempList;
- QPalette mPalette;
+ TQFont mBodyFont, mFixedFont;
+ TQPtrList<KTempFile> mAtmTempList;
+ TQPalette mPalette;
uint mId;
- QString mOldSigText;
+ TQString mOldSigText;
KAction *mAttachPK, *mAttachMPK,
*mAttachRemoveAction, *mAttachSaveAction, *mAttachPropertiesAction,
@@ -782,16 +782,16 @@ private:
KSelectAction *mEncodingAction;
KSelectAction *mCryptoModuleAction;
- QCString mCharset;
- QCString mDefCharset;
- QStringList mCharsets;
+ TQCString mCharset;
+ TQCString mDefCharset;
+ TQStringList mCharsets;
bool mAutoCharset;
bool mAlwaysSend;
- QStringList mFolderNames;
- QValueList<QGuardedPtr<KMFolder> > mFolderList;
- QMap<KIO::Job*, KURL> mAttachJobs;
+ TQStringList mFolderNames;
+ TQValueList<TQGuardedPtr<KMFolder> > mFolderList;
+ TQMap<KIO::Job*, KURL> mAttachJobs;
KURL::List mAttachFilesPending;
int mAttachFilesSend;
@@ -804,8 +804,8 @@ private:
bool mSubjectTextWasSpellChecked;
- QString addQuotesToText( const QString &inputText );
- QString removeQuotesFromText( const QString &inputText );
+ TQString addQuotesToText( const TQString &inputText );
+ TQString removeQuotesFromText( const TQString &inputText );
// helper method for rethinkFields
int calcColumnWidth(int which, long allShowing, int width);
@@ -825,7 +825,7 @@ private slots:
* Helper method (you could call is a bottom-half :) for
* startPublicKeyExport()
*/
- void slotPublicKeyExportResult( const GpgME::Error & err, const QByteArray & keydata );
+ void slotPublicKeyExportResult( const GpgME::Error & err, const TQByteArray & keydata );
/**
* toggle automatic spellchecking
@@ -842,20 +842,20 @@ private slots:
*/
void slotUpdateSignatureAndEncrypionStateIndicators();
private:
- QColor mForeColor,mBackColor;
- QFont mSaveFont;
- QSplitter *mHeadersToEditorSplitter;
- QWidget* mHeadersArea;
- QSplitter *mSplitter;
- QSplitter *mSnippetSplitter;
+ TQColor mForeColor,mBackColor;
+ TQFont mSaveFont;
+ TQSplitter *mHeadersToEditorSplitter;
+ TQWidget* mHeadersArea;
+ TQSplitter *mSplitter;
+ TQSplitter *mSnippetSplitter;
struct atmLoadData
{
KURL url;
- QByteArray data;
+ TQByteArray data;
bool insert;
- QCString encoding;
+ TQCString encoding;
};
- QMap<KIO::Job *, atmLoadData> mMapAtmLoadData;
+ TQMap<KIO::Job *, atmLoadData> mMapAtmLoadData;
// These are for passing on methods over the applyChanges calls
KMail::MessageSender::SendMethod mSendMethod;
@@ -872,7 +872,7 @@ private:
bool mMessageWasModified;
// Temp var for slotInsert(My)PublicKey():
- QString mFingerprint;
+ TQString mFingerprint;
// Temp ptr for saving image from clipboard
KTempDir *mTempDir;
@@ -882,18 +882,18 @@ private:
RecipientsEditor *mRecipientsEditor;
int mLabelWidth;
- QTimer *mAutoSaveTimer;
- QString mAutoSaveFilename;
+ TQTimer *mAutoSaveTimer;
+ TQString mAutoSaveFilename;
int mLastAutoSaveErrno; // holds the errno of the last try to autosave
- QPopupMenu *mActNowMenu;
- QPopupMenu *mActLaterMenu;
+ TQPopupMenu *mActNowMenu;
+ TQPopupMenu *mActLaterMenu;
- QMap<KMail::EditorWatcher*, KMMessagePart*> mEditorMap;
- QMap<KMail::EditorWatcher*, KTempFile*> mEditorTempFiles;
+ TQMap<KMail::EditorWatcher*, KMMessagePart*> mEditorMap;
+ TQMap<KMail::EditorWatcher*, KTempFile*> mEditorTempFiles;
- QLabel *mSignatureStateIndicator;
- QLabel *mEncryptionStateIndicator;
+ TQLabel *mSignatureStateIndicator;
+ TQLabel *mEncryptionStateIndicator;
SnippetWidget *mSnippetWidget;
std::set<KTempDir*> mTempDirs;
diff --git a/kmail/kmdebug.h b/kmail/kmdebug.h
index e36621cff..46262aeb4 100644
--- a/kmail/kmdebug.h
+++ b/kmail/kmdebug.h
@@ -32,10 +32,10 @@ static inline kdbgstream kmFatal( bool cond ) { return kdFatal( cond, kmail_debu
// timing utilities
#if !defined( NDEBUG ) && defined( DEBUG_TIMING )
-#include <qdatetime.h>
-#define CREATE_TIMER(x) int x=0, x ## _tmp=0; QTime x ## _tmp2
-#define START_TIMER(x) x ## _tmp2 = QTime::currentTime()
-#define GRAB_TIMER(x) x ## _tmp2.msecsTo(QTime::currentTime())
+#include <tqdatetime.h>
+#define CREATE_TIMER(x) int x=0, x ## _tmp=0; TQTime x ## _tmp2
+#define START_TIMER(x) x ## _tmp2 = TQTime::currentTime()
+#define GRAB_TIMER(x) x ## _tmp2.msecsTo(TQTime::currentTime())
#define END_TIMER(x) x += GRAB_TIMER(x); x ## _tmp++
#define SHOW_TIMER(x) kdDebug(5006) << #x " == " << x << "(" << x ## _tmp << ")\n"
#else
diff --git a/kmail/kmdict.cpp b/kmail/kmdict.cpp
index 3386f16ad..0ad9367be 100644
--- a/kmail/kmdict.cpp
+++ b/kmail/kmdict.cpp
@@ -1,4 +1,4 @@
-/* simple hash table for kmail. inspired by QDict */
+/* simple hash table for kmail. inspired by TQDict */
/* Author: Ronen Tzur <rtzur@shani.net> */
#ifdef HAVE_CONFIG_H
diff --git a/kmail/kmedit.cpp b/kmail/kmedit.cpp
index b20570f47..bb1bb88f6 100644
--- a/kmail/kmedit.cpp
+++ b/kmail/kmedit.cpp
@@ -43,9 +43,9 @@ using KPIM::MailListDrag;
#include <spellingfilter.h>
#include <ksyntaxhighlighter.h>
-#include <qregexp.h>
-#include <qbuffer.h>
-#include <qevent.h>
+#include <tqregexp.h>
+#include <tqbuffer.h>
+#include <tqevent.h>
#include <sys/stat.h>
#include <sys/types.h>
@@ -56,7 +56,7 @@ using KPIM::MailListDrag;
#include <assert.h>
-void KMEdit::contentsDragEnterEvent(QDragEnterEvent *e)
+void KMEdit::contentsDragEnterEvent(TQDragEnterEvent *e)
{
if (e->provides(MailListDrag::format()))
e->accept(true);
@@ -66,7 +66,7 @@ void KMEdit::contentsDragEnterEvent(QDragEnterEvent *e)
return KEdit::contentsDragEnterEvent(e);
}
-void KMEdit::contentsDragMoveEvent(QDragMoveEvent *e)
+void KMEdit::contentsDragMoveEvent(TQDragMoveEvent *e)
{
if (e->provides(MailListDrag::format()))
e->accept();
@@ -76,12 +76,12 @@ void KMEdit::contentsDragMoveEvent(QDragMoveEvent *e)
return KEdit::contentsDragMoveEvent(e);
}
-void KMEdit::keyPressEvent( QKeyEvent* e )
+void KMEdit::keyPressEvent( TQKeyEvent* e )
{
if( e->key() == Key_Return ) {
int line, col;
getCursorPosition( &line, &col );
- QString lineText = text( line );
+ TQString lineText = text( line );
// returns line with additional trailing space (bug in Qt?), cut it off
lineText.truncate( lineText.length() - 1 );
// special treatment of quoted lines only if the cursor is neither at
@@ -114,7 +114,7 @@ void KMEdit::keyPressEvent( QKeyEvent* e )
// The cursor position might have changed unpredictably if there was selected
// text which got replaced by a new line, so we query it again:
getCursorPosition( &line, &col );
- QString newLine = text( line );
+ TQString newLine = text( line );
// remove leading white space from the new line and instead
// add the quote indicators of the previous line
unsigned int leadingWhiteSpaceCount = 0;
@@ -139,19 +139,19 @@ void KMEdit::keyPressEvent( QKeyEvent* e )
KEdit::keyPressEvent( e );
}
-void KMEdit::contentsDropEvent(QDropEvent *e)
+void KMEdit::contentsDropEvent(TQDropEvent *e)
{
if (e->provides(MailListDrag::format())) {
// Decode the list of serial numbers stored as the drag data
- QByteArray serNums;
+ TQByteArray serNums;
MailListDrag::decode( e, serNums );
- QBuffer serNumBuffer(serNums);
+ TQBuffer serNumBuffer(serNums);
serNumBuffer.open(IO_ReadOnly);
- QDataStream serNumStream(&serNumBuffer);
+ TQDataStream serNumStream(&serNumBuffer);
Q_UINT32 serNum;
KMFolder *folder = 0;
int idx;
- QPtrList<KMMsgBase> messageList;
+ TQPtrList<KMMsgBase> messageList;
while (!serNumStream.atEnd()) {
KMMsgBase *msgBase = 0;
serNumStream >> serNum;
@@ -193,9 +193,9 @@ void KMEdit::contentsDropEvent(QDropEvent *e)
break;
}
}
- else if ( QTextDrag::canDecode( e ) ) {
- QString s;
- if ( QTextDrag::decode( e, s ) )
+ else if ( TQTextDrag::canDecode( e ) ) {
+ TQString s;
+ if ( TQTextDrag::decode( e, s ) )
insert( s );
}
else
@@ -209,7 +209,7 @@ void KMEdit::contentsDropEvent(QDropEvent *e)
}
}
-KMEdit::KMEdit(QWidget *parent, KMComposeWin* composer,
+KMEdit::KMEdit(TQWidget *parent, KMComposeWin* composer,
KSpellConfig* autoSpellConfig,
const char *name)
: KEdit( parent, name ),
@@ -236,22 +236,22 @@ void KMEdit::initializeAutoSpellChecking()
{
if ( mSpellChecker )
return; // already initialized
- QColor defaultColor1( 0x00, 0x80, 0x00 ); // defaults from kmreaderwin.cpp
- QColor defaultColor2( 0x00, 0x70, 0x00 );
- QColor defaultColor3( 0x00, 0x60, 0x00 );
- QColor defaultForeground( kapp->palette().active().text() );
+ TQColor defaultColor1( 0x00, 0x80, 0x00 ); // defaults from kmreaderwin.cpp
+ TQColor defaultColor2( 0x00, 0x70, 0x00 );
+ TQColor defaultColor3( 0x00, 0x60, 0x00 );
+ TQColor defaultForeground( kapp->palette().active().text() );
- QColor c = Qt::red;
+ TQColor c = Qt::red;
KConfigGroup readerConfig( KMKernel::config(), "Reader" );
- QColor col1;
+ TQColor col1;
if ( !readerConfig.readBoolEntry( "defaultColors", true ) )
col1 = readerConfig.readColorEntry( "ForegroundColor", &defaultForeground );
else
col1 = defaultForeground;
- QColor col2 = readerConfig.readColorEntry( "QuotedText3", &defaultColor3 );
- QColor col3 = readerConfig.readColorEntry( "QuotedText2", &defaultColor2 );
- QColor col4 = readerConfig.readColorEntry( "QuotedText1", &defaultColor1 );
- QColor misspelled = readerConfig.readColorEntry( "MisspelledColor", &c );
+ TQColor col2 = readerConfig.readColorEntry( "QuotedText3", &defaultColor3 );
+ TQColor col3 = readerConfig.readColorEntry( "QuotedText2", &defaultColor2 );
+ TQColor col4 = readerConfig.readColorEntry( "QuotedText1", &defaultColor1 );
+ TQColor misspelled = readerConfig.readColorEntry( "MisspelledColor", &c );
mSpellChecker = new KDictSpellingHighlighter( this, /*active*/ true,
/*autoEnabled*/ false,
/*spellColor*/ misspelled,
@@ -259,17 +259,17 @@ void KMEdit::initializeAutoSpellChecking()
col1, col2, col3, col4,
mSpellConfig );
- connect( mSpellChecker, SIGNAL(newSuggestions(const QString&, const QStringList&, unsigned int)),
- this, SLOT(addSuggestion(const QString&, const QStringList&, unsigned int)) );
+ connect( mSpellChecker, TQT_SIGNAL(newSuggestions(const TQString&, const TQStringList&, unsigned int)),
+ this, TQT_SLOT(addSuggestion(const TQString&, const TQStringList&, unsigned int)) );
}
-QPopupMenu *KMEdit::createPopupMenu( const QPoint& pos )
+TQPopupMenu *KMEdit::createPopupMenu( const TQPoint& pos )
{
enum { IdUndo, IdRedo, IdSep1, IdCut, IdCopy, IdPaste, IdClear, IdSep2, IdSelectAll };
- QPopupMenu *menu = KEdit::createPopupMenu( pos );
- if ( !QApplication::clipboard()->image().isNull() ) {
+ TQPopupMenu *menu = KEdit::createPopupMenu( pos );
+ if ( !TQApplication::clipboard()->image().isNull() ) {
int id = menu->idAt(0);
menu->setItemEnabled( id - IdPaste, true);
}
@@ -283,7 +283,7 @@ void KMEdit::deleteAutoSpellChecking()
mSpellChecker =0;
}
-void KMEdit::addSuggestion(const QString& text, const QStringList& lst, unsigned int )
+void KMEdit::addSuggestion(const TQString& text, const TQStringList& lst, unsigned int )
{
mReplacements[text] = lst;
}
@@ -308,9 +308,9 @@ KMEdit::~KMEdit()
-QString KMEdit::brokenText()
+TQString KMEdit::brokenText()
{
- QString temp, line;
+ TQString temp, line;
int num_lines = numLines();
for (int i = 0; i < num_lines; ++i)
@@ -344,14 +344,14 @@ unsigned int KMEdit::lineBreakColumn() const
}
-bool KMEdit::eventFilter(QObject*o, QEvent* e)
+bool KMEdit::eventFilter(TQObject*o, TQEvent* e)
{
if (o == this)
KCursor::autoHideEventFilter(o, e);
- if (e->type() == QEvent::KeyPress)
+ if (e->type() == TQEvent::KeyPress)
{
- QKeyEvent *k = (QKeyEvent*)e;
+ TQKeyEvent *k = (TQKeyEvent*)e;
if (mUseExtEditor) {
if (k->key() == Key_Up)
@@ -365,7 +365,7 @@ bool KMEdit::eventFilter(QObject*o, QEvent* e)
(k->key() == Key_Meta) || (k->key() == Key_Alt) )
return true;
if (mExtEditorTempFile) return true;
- QString sysLine = mExtEditor;
+ TQString sysLine = mExtEditor;
mExtEditorTempFile = new KTempFile();
mExtEditorTempFile->setAutoDelete(true);
@@ -383,8 +383,8 @@ bool KMEdit::eventFilter(QObject*o, QEvent* e)
*mExtEditorProcess << sysLine.left(sysLine.find(" ")).local8Bit();
sysLine.remove(0, sysLine.find(" ") + 1);
}
- connect(mExtEditorProcess, SIGNAL(processExited(KProcess*)),
- SLOT(slotExternalEditorDone(KProcess*)));
+ connect(mExtEditorProcess, TQT_SIGNAL(processExited(KProcess*)),
+ TQT_SLOT(slotExternalEditorDone(KProcess*)));
if (!mExtEditorProcess->start())
{
KMessageBox::error( topLevelWidget(),
@@ -392,8 +392,8 @@ bool KMEdit::eventFilter(QObject*o, QEvent* e)
killExternalEditor();
} else {
mExtEditorTempFileWatcher = new KDirWatch( this, "mExtEditorTempFileWatcher" );
- connect( mExtEditorTempFileWatcher, SIGNAL(dirty(const QString&)),
- SLOT(slotExternalEditorTempFileChanged(const QString&)) );
+ connect( mExtEditorTempFileWatcher, TQT_SIGNAL(dirty(const TQString&)),
+ TQT_SLOT(slotExternalEditorTempFileChanged(const TQString&)) );
mExtEditorTempFileWatcher->addFile( mExtEditorTempFile->name() );
}
return true;
@@ -417,24 +417,24 @@ bool KMEdit::eventFilter(QObject*o, QEvent* e)
}
}
- } else if ( e->type() == QEvent::ContextMenu ) {
- QContextMenuEvent *event = (QContextMenuEvent*) e;
+ } else if ( e->type() == TQEvent::ContextMenu ) {
+ TQContextMenuEvent *event = (TQContextMenuEvent*) e;
int para = 1, charPos, firstSpace, lastSpace;
//Get the character at the position of the click
charPos = charAt( viewportToContents(event->pos()), &para );
- QString paraText = text( para );
+ TQString paraText = text( para );
if( !paraText.at(charPos).isSpace() )
{
//Get word right clicked on
- const QRegExp wordBoundary( "[\\s\\W]" );
+ const TQRegExp wordBoundary( "[\\s\\W]" );
firstSpace = paraText.findRev( wordBoundary, charPos ) + 1;
lastSpace = paraText.find( wordBoundary, charPos );
if( lastSpace == -1 )
lastSpace = paraText.length();
- QString word = paraText.mid( firstSpace, lastSpace - firstSpace );
+ TQString word = paraText.mid( firstSpace, lastSpace - firstSpace );
//Continue if this word was misspelled
if( !word.isEmpty() && mReplacements.contains( word ) )
{
@@ -442,18 +442,18 @@ bool KMEdit::eventFilter(QObject*o, QEvent* e)
p.insertTitle( i18n("Suggestions") );
//Add the suggestions to the popup menu
- QStringList reps = mReplacements[word];
+ TQStringList reps = mReplacements[word];
if( reps.count() > 0 )
{
int listPos = 0;
- for ( QStringList::Iterator it = reps.begin(); it != reps.end(); ++it ) {
+ for ( TQStringList::Iterator it = reps.begin(); it != reps.end(); ++it ) {
p.insertItem( *it, listPos );
listPos++;
}
}
else
{
- p.insertItem( QString::fromLatin1("No Suggestions"), -2 );
+ p.insertItem( TQString::fromLatin1("No Suggestions"), -2 );
}
//Execute the popup inline
@@ -476,9 +476,9 @@ bool KMEdit::eventFilter(QObject*o, QEvent* e)
return true;
}
}
- } else if ( e->type() == QEvent::FocusIn || e->type() == QEvent::FocusOut ) {
- QFocusEvent *fe = static_cast<QFocusEvent*>(e);
- if(! (fe->reason() == QFocusEvent::ActiveWindow || fe->reason() == QFocusEvent::Popup) )
+ } else if ( e->type() == TQEvent::FocusIn || e->type() == TQEvent::FocusOut ) {
+ TQFocusEvent *fe = static_cast<TQFocusEvent*>(e);
+ if(! (fe->reason() == TQFocusEvent::ActiveWindow || fe->reason() == TQFocusEvent::Popup) )
emit focusChanged( fe->gotFocus() );
}
@@ -503,7 +503,7 @@ int KMEdit::autoSpellChecking( bool on )
}
-void KMEdit::slotExternalEditorTempFileChanged( const QString & fileName ) {
+void KMEdit::slotExternalEditorTempFileChanged( const TQString & fileName ) {
if ( !mExtEditorTempFile )
return;
if ( fileName != mExtEditorTempFile->name() )
@@ -512,7 +512,7 @@ void KMEdit::slotExternalEditorTempFileChanged( const QString & fileName ) {
setAutoUpdate(false);
clear();
- insertLine(QString::fromLocal8Bit(KPIM::kFileToString( fileName, true, false )), -1);
+ insertLine(TQString::fromLocal8Bit(KPIM::kFileToString( fileName, true, false )), -1);
setAutoUpdate(true);
repaint();
}
@@ -559,25 +559,25 @@ void KMEdit::spellcheck()
// if (textFormat() == Qt::RichText ) {
// kdDebug(5006) << "KMEdit::spellcheck, spellchecking for RichText" << endl;
// mKSpell = new KSpell(this, i18n("Spellcheck - KMail"), this,
-// SLOT(slotSpellcheck2(KSpell*)),0,true,false,KSpell::HTML);
+// TQT_SLOT(slotSpellcheck2(KSpell*)),0,true,false,KSpell::HTML);
// }
// else {
mKSpell = new KSpell(this, i18n("Spellcheck - KMail"), this,
- SLOT(slotSpellcheck2(KSpell*)));
+ TQT_SLOT(slotSpellcheck2(KSpell*)));
// }
- QStringList l = KSpellingHighlighter::personalWords();
- for ( QStringList::Iterator it = l.begin(); it != l.end(); ++it ) {
+ TQStringList l = KSpellingHighlighter::personalWords();
+ for ( TQStringList::Iterator it = l.begin(); it != l.end(); ++it ) {
mKSpell->addPersonal( *it );
}
- connect (mKSpell, SIGNAL( death()),
- this, SLOT (slotSpellDone()));
- connect (mKSpell, SIGNAL (misspelling (const QString &, const QStringList &, unsigned int)),
- this, SLOT (slotMisspelling (const QString &, const QStringList &, unsigned int)));
- connect (mKSpell, SIGNAL (corrected (const QString &, const QString &, unsigned int)),
- this, SLOT (slotCorrected (const QString &, const QString &, unsigned int)));
- connect (mKSpell, SIGNAL (done(const QString &)),
- this, SLOT (slotSpellResult (const QString&)));
+ connect (mKSpell, TQT_SIGNAL( death()),
+ this, TQT_SLOT (slotSpellDone()));
+ connect (mKSpell, TQT_SIGNAL (misspelling (const TQString &, const TQStringList &, unsigned int)),
+ this, TQT_SLOT (slotMisspelling (const TQString &, const TQStringList &, unsigned int)));
+ connect (mKSpell, TQT_SIGNAL (corrected (const TQString &, const TQString &, unsigned int)),
+ this, TQT_SLOT (slotCorrected (const TQString &, const TQString &, unsigned int)));
+ connect (mKSpell, TQT_SIGNAL (done(const TQString &)),
+ this, TQT_SLOT (slotSpellResult (const TQString&)));
}
void KMEdit::cut()
@@ -606,12 +606,12 @@ void KMEdit::paste()
mComposer->paste( mPasteMode );
}
-// KMEdit indirectly inherits from QTextEdit, which has virtual paste() method,
+// KMEdit indirectly inherits from TQTextEdit, which has virtual paste() method,
// but it controls whether it pastes clipboard or selection by an internal
// flag that is not accessible in any way, so paste() being virtual is actually
// useless, because reimplementations can't known where to paste from anyway.
// Roll our own internal flag.
-void KMEdit::contentsMouseReleaseEvent( QMouseEvent * e )
+void KMEdit::contentsMouseReleaseEvent( TQMouseEvent * e )
{
if( e->button() != Qt::MidButton )
return KEdit::contentsMouseReleaseEvent( e );
@@ -620,26 +620,26 @@ void KMEdit::contentsMouseReleaseEvent( QMouseEvent * e )
mPasteMode = QClipboard::Clipboard;
}
-void KMEdit::slotMisspelling(const QString &text, const QStringList &lst, unsigned int pos)
+void KMEdit::slotMisspelling(const TQString &text, const TQStringList &lst, unsigned int pos)
{
- kdDebug(5006)<<"void KMEdit::slotMisspelling(const QString &text, const QStringList &lst, unsigned int pos) : "<<text <<endl;
+ kdDebug(5006)<<"void KMEdit::slotMisspelling(const TQString &text, const TQStringList &lst, unsigned int pos) : "<<text <<endl;
if( mSpellLineEdit )
mComposer->sujectLineWidget()->spellCheckerMisspelling( text, lst, pos);
else
misspelling(text, lst, pos);
}
-void KMEdit::slotCorrected (const QString &oldWord, const QString &newWord, unsigned int pos)
+void KMEdit::slotCorrected (const TQString &oldWord, const TQString &newWord, unsigned int pos)
{
- kdDebug(5006)<<"slotCorrected (const QString &oldWord, const QString &newWord, unsigned int pos) : "<<oldWord<<endl;
+ kdDebug(5006)<<"slotCorrected (const TQString &oldWord, const TQString &newWord, unsigned int pos) : "<<oldWord<<endl;
if( mSpellLineEdit )
mComposer->sujectLineWidget()->spellCheckerCorrected( oldWord, newWord, pos);
else {
unsigned int l = 0;
unsigned int cnt = 0;
bool _bold,_underline,_italic;
- QColor _color;
- QFont _font;
+ TQColor _color;
+ TQFont _font;
posToRowCol (pos, l, cnt);
setCursorPosition(l, cnt+1); // the new word will get the same markup now as the first character of the word
_bold = bold();
@@ -664,11 +664,11 @@ void KMEdit::slotSpellcheck2(KSpell*)
{
spellcheck_start();
- QString quotePrefix;
+ TQString quotePrefix;
if(mComposer && mComposer->msg())
{
int languageNr = GlobalSettings::self()->replyCurrentLanguage();
- ReplyPhrases replyPhrases( QString::number(languageNr) );
+ ReplyPhrases replyPhrases( TQString::number(languageNr) );
replyPhrases.readConfig();
quotePrefix = mComposer->msg()->formatString(
@@ -676,7 +676,7 @@ void KMEdit::slotSpellcheck2(KSpell*)
}
kdDebug(5006) << "spelling: new SpellingFilter with prefix=\"" << quotePrefix << "\"" << endl;
- QTextEdit plaintext;
+ TQTextEdit plaintext;
plaintext.setText(text());
plaintext.setTextFormat(Qt::PlainText);
mSpellingFilter = new SpellingFilter(plaintext.text(), quotePrefix, SpellingFilter::FilterUrls,
@@ -688,7 +688,7 @@ void KMEdit::slotSpellcheck2(KSpell*)
mKSpell->check( mComposer->sujectLineWidget()->text());
}
-void KMEdit::slotSpellResult(const QString &s)
+void KMEdit::slotSpellResult(const TQString &s)
{
if( !mSpellLineEdit)
spellcheck_stop();
@@ -700,7 +700,7 @@ void KMEdit::slotSpellResult(const QString &s)
{
//stop spell check
mSpellLineEdit = false;
- QString tmpText( s );
+ TQString tmpText( s );
tmpText = tmpText.remove('\n');
if( tmpText != mComposer->sujectLineWidget()->text() )
diff --git a/kmail/kmedit.h b/kmail/kmedit.h
index 384b36f3d..a44642baa 100644
--- a/kmail/kmedit.h
+++ b/kmail/kmedit.h
@@ -7,9 +7,9 @@
#include <kdeversion.h>
#include <keditcl.h>
-#include <qmap.h>
-#include <qstringlist.h>
-#include <qclipboard.h>
+#include <tqmap.h>
+#include <tqstringlist.h>
+#include <tqclipboard.h>
class KMComposeWin;
class KSpellConfig;
@@ -25,7 +25,7 @@ class QPopupMenu;
class KMEdit : public KEdit {
Q_OBJECT
public:
- KMEdit(QWidget *parent=0,KMComposeWin* composer=0,
+ KMEdit(TQWidget *parent=0,KMComposeWin* composer=0,
KSpellConfig* spellConfig = 0,
const char *name=0);
~KMEdit();
@@ -38,7 +38,7 @@ public:
/**
* Text with lines breaks inserted after every row
*/
- QString brokenText();
+ TQString brokenText();
/**
* Toggle automatic spellchecking
@@ -49,7 +49,7 @@ public:
* For the external editor
*/
void setUseExternalEditor( bool use ) { mUseExtEditor = use; }
- void setExternalEditorPath( const QString & path ) { mExtEditor = path; }
+ void setExternalEditorPath( const TQString & path ) { mExtEditor = path; }
/**
* Check that the external editor has finished and output a warning
@@ -59,13 +59,13 @@ public:
*/
bool checkExternalEditorFinished();
- QPopupMenu* createPopupMenu(const QPoint&);
+ TQPopupMenu* createPopupMenu(const TQPoint&);
void setSpellCheckingActive(bool spellCheckingActive);
/** Drag and drop methods */
- void contentsDragEnterEvent(QDragEnterEvent *e);
- void contentsDragMoveEvent(QDragMoveEvent *e);
- void contentsDropEvent(QDropEvent *e);
+ void contentsDragEnterEvent(TQDragEnterEvent *e);
+ void contentsDragMoveEvent(TQDragMoveEvent *e);
+ void contentsDropEvent(TQDropEvent *e);
void deleteAutoSpellChecking();
@@ -76,7 +76,7 @@ public:
signals:
void spellcheck_done(int result);
- void attachPNGImageData(const QByteArray &image);
+ void attachPNGImageData(const TQByteArray &image);
void pasteImage();
void focusUp();
void focusChanged( bool );
@@ -84,12 +84,12 @@ signals:
public slots:
void initializeAutoSpellChecking();
void slotSpellcheck2(KSpell*);
- void slotSpellResult(const QString&);
+ void slotSpellResult(const TQString&);
void slotSpellDone();
void slotExternalEditorDone(KProcess*);
- void slotMisspelling(const QString &, const QStringList &, unsigned int);
- void slotCorrected (const QString &, const QString &, unsigned int);
- void addSuggestion(const QString& text, const QStringList& lst, unsigned int );
+ void slotMisspelling(const TQString &, const TQStringList &, unsigned int);
+ void slotCorrected (const TQString &, const TQString &, unsigned int);
+ void addSuggestion(const TQString& text, const TQStringList& lst, unsigned int );
void cut();
void clear();
void del();
@@ -98,13 +98,13 @@ protected:
/**
* Event filter that does Tab-key handling.
*/
- bool eventFilter(QObject*, QEvent*);
- void keyPressEvent( QKeyEvent* );
+ bool eventFilter(TQObject*, TQEvent*);
+ void keyPressEvent( TQKeyEvent* );
- void contentsMouseReleaseEvent( QMouseEvent * e );
+ void contentsMouseReleaseEvent( TQMouseEvent * e );
private slots:
- void slotExternalEditorTempFileChanged( const QString & fileName );
+ void slotExternalEditorTempFileChanged( const TQString & fileName );
private:
void killExternalEditor();
@@ -114,13 +114,13 @@ private:
KSpell *mKSpell;
KSpellConfig *mSpellConfig;
- QMap<QString,QStringList> mReplacements;
+ TQMap<TQString,TQStringList> mReplacements;
SpellingFilter* mSpellingFilter;
KTempFile *mExtEditorTempFile;
KDirWatch *mExtEditorTempFileWatcher;
KProcess *mExtEditorProcess;
bool mUseExtEditor;
- QString mExtEditor;
+ TQString mExtEditor;
bool mWasModifiedBeforeSpellCheck;
KDictSpellingHighlighter *mSpellChecker;
bool mSpellLineEdit;
diff --git a/kmail/kmfawidgets.cpp b/kmail/kmfawidgets.cpp
index 558fbe0db..f5426f255 100644
--- a/kmail/kmfawidgets.cpp
+++ b/kmail/kmfawidgets.cpp
@@ -16,7 +16,7 @@
#include <kfiledialog.h>
#include <kstandarddirs.h>
-#include <qlayout.h>
+#include <tqlayout.h>
//=============================================================================
//
@@ -24,20 +24,20 @@
//
//=============================================================================
-KMFilterActionWithAddressWidget::KMFilterActionWithAddressWidget( QWidget* parent, const char* name )
- : QWidget( parent, name )
+KMFilterActionWithAddressWidget::KMFilterActionWithAddressWidget( TQWidget* parent, const char* name )
+ : TQWidget( parent, name )
{
- QHBoxLayout *hbl = new QHBoxLayout(this);
+ TQHBoxLayout *hbl = new TQHBoxLayout(this);
hbl->setSpacing(4);
mLineEdit = new KLineEdit(this);
hbl->addWidget( mLineEdit, 1 /*stretch*/ );
- mBtn = new QPushButton( QString::null ,this );
+ mBtn = new TQPushButton( TQString::null ,this );
mBtn->setPixmap( BarIcon( "contents", KIcon::SizeSmall ) );
mBtn->setFixedHeight( mLineEdit->sizeHint().height() );
hbl->addWidget( mBtn );
- connect( mBtn, SIGNAL(clicked()),
- this, SLOT(slotAddrBook()) );
+ connect( mBtn, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotAddrBook()) );
}
void KMFilterActionWithAddressWidget::slotAddrBook()
@@ -47,12 +47,12 @@ void KMFilterActionWithAddressWidget::slotAddrBook()
if ( lst.empty() )
return;
- QStringList addrList;
+ TQStringList addrList;
for( KABC::Addressee::List::const_iterator it = lst.begin(); it != lst.end(); ++it )
addrList << (*it).fullEmail();
- QString txt = mLineEdit->text().stripWhiteSpace();
+ TQString txt = mLineEdit->text().stripWhiteSpace();
if ( !txt.isEmpty() ) {
if ( !txt.endsWith( "," ) )
@@ -64,20 +64,20 @@ void KMFilterActionWithAddressWidget::slotAddrBook()
mLineEdit->setText( txt + addrList.join(",") );
}
-KMSoundTestWidget::KMSoundTestWidget(QWidget *parent, const char *name)
- : QWidget( parent, name)
+KMSoundTestWidget::KMSoundTestWidget(TQWidget *parent, const char *name)
+ : TQWidget( parent, name)
{
- QHBoxLayout *lay1 = new QHBoxLayout( this );
- m_playButton = new QPushButton( this, "m_playButton" );
+ TQHBoxLayout *lay1 = new TQHBoxLayout( this );
+ m_playButton = new TQPushButton( this, "m_playButton" );
m_playButton->setPixmap( SmallIcon( "1rightarrow" ) );
- connect( m_playButton, SIGNAL( clicked() ), SLOT( playSound() ));
+ connect( m_playButton, TQT_SIGNAL( clicked() ), TQT_SLOT( playSound() ));
lay1->addWidget( m_playButton );
m_urlRequester = new KURLRequester( this );
lay1->addWidget( m_urlRequester );
- connect( m_urlRequester, SIGNAL( openFileDialog( KURLRequester * )),
- SLOT( openSoundDialog( KURLRequester * )));
- connect( m_urlRequester->lineEdit(), SIGNAL( textChanged ( const QString & )), SLOT( slotUrlChanged(const QString & )));
+ connect( m_urlRequester, TQT_SIGNAL( openFileDialog( KURLRequester * )),
+ TQT_SLOT( openSoundDialog( KURLRequester * )));
+ connect( m_urlRequester->lineEdit(), TQT_SIGNAL( textChanged ( const TQString & )), TQT_SLOT( slotUrlChanged(const TQString & )));
slotUrlChanged(m_urlRequester->lineEdit()->text() );
}
@@ -85,7 +85,7 @@ KMSoundTestWidget::~KMSoundTestWidget()
{
}
-void KMSoundTestWidget::slotUrlChanged(const QString &_text )
+void KMSoundTestWidget::slotUrlChanged(const TQString &_text )
{
m_playButton->setEnabled( !_text.isEmpty());
}
@@ -100,18 +100,18 @@ void KMSoundTestWidget::openSoundDialog( KURLRequester * )
KFileDialog *fileDialog = m_urlRequester->fileDialog();
fileDialog->setCaption( i18n("Select Sound File") );
- QStringList filters;
+ TQStringList filters;
filters << "audio/x-wav" << "audio/x-mp3" << "application/x-ogg"
<< "audio/x-adpcm";
fileDialog->setMimeFilter( filters );
- QStringList soundDirs = KGlobal::dirs()->resourceDirs( "sound" );
+ TQStringList 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 ) {
@@ -127,23 +127,23 @@ void KMSoundTestWidget::openSoundDialog( KURLRequester * )
void KMSoundTestWidget::playSound()
{
- QString parameter= m_urlRequester->lineEdit()->text();
+ TQString parameter= m_urlRequester->lineEdit()->text();
if ( parameter.isEmpty() )
return ;
- QString play = parameter;
- QString file = QString::fromLatin1("file:");
+ TQString play = parameter;
+ TQString file = TQString::fromLatin1("file:");
if (parameter.startsWith(file))
play = parameter.mid(file.length());
- KAudioPlayer::play(QFile::encodeName(play));
+ KAudioPlayer::play(TQFile::encodeName(play));
}
-QString KMSoundTestWidget::url() const
+TQString KMSoundTestWidget::url() const
{
return m_urlRequester->lineEdit()->text();
}
-void KMSoundTestWidget::setUrl(const QString & url)
+void KMSoundTestWidget::setUrl(const TQString & url)
{
m_urlRequester->lineEdit()->setText(url);
}
diff --git a/kmail/kmfawidgets.h b/kmail/kmfawidgets.h
index 9b2a05b97..05b763df2 100644
--- a/kmail/kmfawidgets.h
+++ b/kmail/kmfawidgets.h
@@ -6,7 +6,7 @@
#define _kmfawidgets_h_
#include <klineedit.h>
-#include <qstring.h>
+#include <tqstring.h>
/** The param widget for KMFilterActionWithAddress..
@author Marc Mutz <mutz@kde.org>
@@ -19,39 +19,39 @@ class KMFilterActionWithAddressWidget : public QWidget
{
Q_OBJECT
public:
- KMFilterActionWithAddressWidget( QWidget* parent=0, const char* name=0 );
+ KMFilterActionWithAddressWidget( TQWidget* parent=0, const char* name=0 );
void clear() { mLineEdit->clear(); }
- QString text() const { return mLineEdit->text(); }
- void setText( const QString & aString ) { mLineEdit->setText( aString ); }
+ TQString text() const { return mLineEdit->text(); }
+ void setText( const TQString & aString ) { mLineEdit->setText( aString ); }
protected slots:
void slotAddrBook();
private:
- QPushButton* mBtn;
- QLineEdit* mLineEdit;
+ TQPushButton* mBtn;
+ TQLineEdit* mLineEdit;
};
class KMSoundTestWidget : public QWidget
{
Q_OBJECT
public:
- KMSoundTestWidget( QWidget * parent, const char * name=0 );
+ KMSoundTestWidget( TQWidget * parent, const char * name=0 );
~KMSoundTestWidget();
- QString url() const;
- void setUrl( const QString & url );
+ TQString url() const;
+ void setUrl( const TQString & url );
void clear();
signals:
void testPressed();
protected slots:
void playSound();
void openSoundDialog( KURLRequester * );
- void slotUrlChanged( const QString & );
+ void slotUrlChanged( const TQString & );
private:
KURLRequester *m_urlRequester;
- QPushButton *m_playButton;
+ TQPushButton *m_playButton;
};
#endif /*_kmfawidget_h_*/
diff --git a/kmail/kmfilter.cpp b/kmail/kmfilter.cpp
index d44562345..28a64633d 100644
--- a/kmail/kmfilter.cpp
+++ b/kmail/kmfilter.cpp
@@ -84,7 +84,7 @@ KMFilter::KMFilter( const KMFilter & aFilter )
mIcon = aFilter.icon();
mShortcut = aFilter.shortcut();
- QPtrListIterator<KMFilterAction> it( aFilter.mActions );
+ TQPtrListIterator<KMFilterAction> it( aFilter.mActions );
for ( it.toFirst() ; it.current() ; ++it ) {
KMFilterActionDesc *desc = (*kmkernel->filterActionDict())[ (*it)->name() ];
if ( desc ) {
@@ -97,7 +97,7 @@ KMFilter::KMFilter( const KMFilter & aFilter )
}
mAccounts.clear();
- QValueListConstIterator<int> it2;
+ TQValueListConstIterator<int> it2;
for ( it2 = aFilter.mAccounts.begin() ; it2 != aFilter.mAccounts.end() ; ++it2 )
mAccounts.append( *it2 );
}
@@ -108,11 +108,11 @@ KMFilter::ReturnCode KMFilter::execActions( KMMessage* msg, bool& stopIt ) const
{
ReturnCode status = NoResult;
- QPtrListIterator<KMFilterAction> it( mActions );
+ TQPtrListIterator<KMFilterAction> it( mActions );
for ( it.toFirst() ; it.current() ; ++it ) {
if ( FilterLog::instance()->isLogging() ) {
- QString logText( i18n( "<b>Applying filter action:</b> %1" )
+ TQString logText( i18n( "<b>Applying filter action:</b> %1" )
.arg( (*it)->displayString() ) );
FilterLog::instance()->add( logText, FilterLog::appliedAction );
}
@@ -122,7 +122,7 @@ KMFilter::ReturnCode KMFilter::execActions( KMMessage* msg, bool& stopIt ) const
switch ( result ) {
case KMFilterAction::CriticalError:
if ( FilterLog::instance()->isLogging() ) {
- QString logText = QString( "<font color=#FF0000>%1</font>" )
+ TQString logText = TQString( "<font color=#FF0000>%1</font>" )
.arg( i18n( "A critical error occurred. Processing stops here." ) );
FilterLog::instance()->add( logText, FilterLog::appliedAction );
}
@@ -130,7 +130,7 @@ KMFilter::ReturnCode KMFilter::execActions( KMMessage* msg, bool& stopIt ) const
return CriticalError;
case KMFilterAction::ErrorButGoOn:
if ( FilterLog::instance()->isLogging() ) {
- QString logText = QString( "<font color=#FF0000>%1</font>" )
+ TQString logText = TQString( "<font color=#FF0000>%1</font>" )
.arg( i18n( "A problem was found while applying this action." ) );
FilterLog::instance()->add( logText, FilterLog::appliedAction );
}
@@ -151,7 +151,7 @@ bool KMFilter::requiresBody( KMMsgBase* msg )
{
if (pattern() && pattern()->requiresBody())
return true; // no pattern means always matches?
- QPtrListIterator<KMFilterAction> it( *actions() );
+ TQPtrListIterator<KMFilterAction> it( *actions() );
for ( it.toFirst() ; it.current() ; ++it )
if ((*it)->requiresBody( msg ))
return true;
@@ -176,7 +176,7 @@ bool KMFilter::folderRemoved( KMFolder* aFolder, KMFolder* aNewFolder )
{
bool rem = false;
- QPtrListIterator<KMFilterAction> it( mActions );
+ TQPtrListIterator<KMFilterAction> it( mActions );
for ( it.toFirst() ; it.current() ; ++it )
if ( (*it)->folderRemoved( aFolder, aNewFolder ) )
rem = true;
@@ -218,7 +218,7 @@ void KMFilter::readConfig(KConfig* config)
if (bPopFilter) {
// get the action description...
- QString action = config->readEntry( "action" );
+ TQString action = config->readEntry( "action" );
if ( action == "down" )
mAction = Down;
else if ( action == "later" )
@@ -229,7 +229,7 @@ void KMFilter::readConfig(KConfig* config)
mAction = NoAction;
}
else {
- QStringList sets = config->readListEntry("apply-on");
+ TQStringList sets = config->readListEntry("apply-on");
if ( sets.isEmpty() && !config->hasKey("apply-on") ) {
bApplyOnOutbound = false;
bApplyOnInbound = true;
@@ -244,7 +244,7 @@ void KMFilter::readConfig(KConfig* config)
bStopProcessingHere = config->readBoolEntry("StopProcessingHere", true);
bConfigureShortcut = config->readBoolEntry("ConfigureShortcut", false);
- QString shortcut( config->readEntry( "Shortcut" ) );
+ TQString shortcut( config->readEntry( "Shortcut" ) );
if ( !shortcut.isEmpty() ) {
KShortcut sc( shortcut );
setShortcut( sc );
@@ -255,7 +255,7 @@ void KMFilter::readConfig(KConfig* config)
bAutoNaming = config->readBoolEntry("AutomaticName", false);
int i, numActions;
- QString actName, argsName;
+ TQString actName, argsName;
mActions.clear();
@@ -314,7 +314,7 @@ void KMFilter::writeConfig(KConfig* config) const
config->writeEntry( "action", "" );
}
} else {
- QStringList sets;
+ TQStringList sets;
if ( bApplyOnInbound )
sets.append( "check-mail" );
if ( bApplyOnOutbound )
@@ -332,10 +332,10 @@ void KMFilter::writeConfig(KConfig* config) const
config->writeEntry( "AutomaticName", bAutoNaming );
config->writeEntry( "Applicability", mApplicability );
- QString key;
+ TQString key;
int i;
- QPtrListIterator<KMFilterAction> it( mActions );
+ TQPtrListIterator<KMFilterAction> it( mActions );
for ( i=0, it.toFirst() ; it.current() ; ++it, ++i ) {
config->writeEntry( key.sprintf("action-name-%d", i),
(*it)->name() );
@@ -352,7 +352,7 @@ void KMFilter::purify()
mPattern.purify();
if (!bPopFilter) {
- QPtrListIterator<KMFilterAction> it( mActions );
+ TQPtrListIterator<KMFilterAction> it( mActions );
it.toLast();
while ( it.current() )
if ( (*it)->isEmpty() )
@@ -361,7 +361,7 @@ void KMFilter::purify()
--it;
// Remove invalid accounts from mAccounts - just to be tidy
- QValueListIterator<int> it2 = mAccounts.begin();
+ TQValueListIterator<int> it2 = mAccounts.begin();
while ( it2 != mAccounts.end() ) {
if ( !kmkernel->acctMgr()->find( *it2 ) )
it2 = mAccounts.remove( it2 );
@@ -380,9 +380,9 @@ bool KMFilter::isEmpty() const
}
#ifndef NDEBUG
-const QString KMFilter::asString() const
+const TQString KMFilter::asString() const
{
- QString result;
+ TQString result;
result += mPattern.asString();
@@ -392,7 +392,7 @@ const QString KMFilter::asString() const
result += "\n";
}
else {
- QPtrListIterator<KMFilterAction> it( mActions );
+ TQPtrListIterator<KMFilterAction> it( mActions );
for ( it.toFirst() ; it.current() ; ++it ) {
result += " action: ";
result += (*it)->label();
@@ -413,7 +413,7 @@ const QString KMFilter::asString() const
} else if ( bApplyOnInbound && mApplicability == ButImap ) {
result += "This filter applies to all but online IMAP accounts.\n";
} else if ( bApplyOnInbound ) {
- QValueListConstIterator<int> it2;
+ TQValueListConstIterator<int> it2;
result += "This filter applies to the following accounts:";
if ( mAccounts.isEmpty() )
result += " None";
diff --git a/kmail/kmfilter.h b/kmail/kmfilter.h
index 767343ecd..87820777d 100644
--- a/kmail/kmfilter.h
+++ b/kmail/kmfilter.h
@@ -25,7 +25,7 @@
#include <kshortcut.h>
-#include <qptrlist.h>
+#include <tqptrlist.h>
class QString;
class KConfig;
@@ -76,7 +76,7 @@ public:
~KMFilter() {}
/** Equivalent to @pattern()->name(). @return name of the filter */
- QString name() const {
+ TQString name() const {
return mPattern.name();
}
@@ -124,10 +124,10 @@ public:
/** Provides a reference to the internal action list. If your used
the @p setAction() and @p action() functions before, please
convert to using myFilter->actions()->at() and friends now. */
- QPtrList<KMFilterAction>* actions() { return &mActions; }
+ TQPtrList<KMFilterAction>* actions() { return &mActions; }
/** Provides a reference to the internal action list. Const version. */
- const QPtrList<KMFilterAction>* actions() const { return &mActions; }
+ const TQPtrList<KMFilterAction>* actions() const { return &mActions; }
/** Provides a reference to the internal pattern. If you used the
@p matches() function before, please convert to using
@@ -251,12 +251,12 @@ public:
or toolbar. Default is the gear icon.
@see setConfigureShortcut setConfigureToolbar
*/
- void setIcon( QString icon ) { mIcon = icon; }
+ void setIcon( TQString icon ) { mIcon = icon; }
/** @return The name of the icon to be used.
@see setIcon
*/
- QString icon() const { return mIcon; }
+ TQString icon() const { return mIcon; }
/**
* Called from the filter manager when a folder is moved.
@@ -271,7 +271,7 @@ public:
debugging but not much else. Don't use, as it may well go away
in the future... */
#ifndef NDEBUG
- const QString asString() const;
+ const TQString asString() const;
#endif
/** No descriptions */
@@ -293,10 +293,10 @@ public:
private:
KMSearchPattern mPattern;
- QPtrList<KMFilterAction> mActions;
- QValueList<int> mAccounts;
+ TQPtrList<KMFilterAction> mActions;
+ TQValueList<int> mAccounts;
KMPopFilterAction mAction;
- QString mIcon;
+ TQString mIcon;
KShortcut mShortcut;
bool bPopFilter : 1;
bool bApplyOnInbound : 1;
diff --git a/kmail/kmfilteraction.cpp b/kmail/kmfilteraction.cpp
index ea77e14b4..9fce0565b 100644
--- a/kmail/kmfilteraction.cpp
+++ b/kmail/kmfilteraction.cpp
@@ -42,12 +42,12 @@ using KMail::RegExpLineEdit;
#include <kaudioplayer.h>
#include <kurlrequester.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qtextcodec.h>
-#include <qtimer.h>
-#include <qobject.h>
-#include <qstylesheet.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqtextcodec.h>
+#include <tqtimer.h>
+#include <tqobject.h>
+#include <tqstylesheet.h>
#include <assert.h>
@@ -57,7 +57,7 @@ using KMail::RegExpLineEdit;
//
//=============================================================================
-KMFilterAction::KMFilterAction( const char* aName, const QString aLabel )
+KMFilterAction::KMFilterAction( const char* aName, const TQString aLabel )
{
mName = aName;
mLabel = aLabel;
@@ -85,20 +85,20 @@ KMFilterAction* KMFilterAction::newAction()
return 0;
}
-QWidget* KMFilterAction::createParamWidget(QWidget* parent) const
+TQWidget* KMFilterAction::createParamWidget(TQWidget* parent) const
{
- return new QWidget(parent);
+ return new TQWidget(parent);
}
-void KMFilterAction::applyParamWidgetValue(QWidget*)
+void KMFilterAction::applyParamWidgetValue(TQWidget*)
{
}
-void KMFilterAction::setParamWidgetValue( QWidget * ) const
+void KMFilterAction::setParamWidgetValue( TQWidget * ) const
{
}
-void KMFilterAction::clearParamWidget( QWidget * ) const
+void KMFilterAction::clearParamWidget( TQWidget * ) const
{
}
@@ -113,15 +113,15 @@ int KMFilterAction::tempOpenFolder(KMFolder* aFolder)
}
void KMFilterAction::sendMDN( KMMessage * msg, KMime::MDN::DispositionType d,
- const QValueList<KMime::MDN::DispositionModifier> & m ) {
+ const TQValueList<KMime::MDN::DispositionModifier> & m ) {
if ( !msg ) return;
/* createMDN requires Return-Path and Disposition-Notification-To
* if it is not set in the message we assume that the notification should go to the
* sender
*/
- const QString returnPath = msg->headerField( "Return-Path" );
- const QString dispNoteTo = msg->headerField( "Disposition-Notification-To" );
+ const TQString returnPath = msg->headerField( "Return-Path" );
+ const TQString dispNoteTo = msg->headerField( "Disposition-Notification-To" );
if ( returnPath.isEmpty() )
msg->setHeaderField( "Return-Path", msg->from() );
if ( dispNoteTo.isEmpty() )
@@ -147,12 +147,12 @@ void KMFilterAction::sendMDN( KMMessage * msg, KMime::MDN::DispositionType d,
//
//=============================================================================
-KMFilterActionWithNone::KMFilterActionWithNone( const char* aName, const QString aLabel )
+KMFilterActionWithNone::KMFilterActionWithNone( const char* aName, const TQString aLabel )
: KMFilterAction( aName, aLabel )
{
}
-const QString KMFilterActionWithNone::displayString() const
+const TQString KMFilterActionWithNone::displayString() const
{
return label();
}
@@ -164,26 +164,26 @@ const QString KMFilterActionWithNone::displayString() const
//
//=============================================================================
-KMFilterActionWithUOID::KMFilterActionWithUOID( const char* aName, const QString aLabel )
+KMFilterActionWithUOID::KMFilterActionWithUOID( const char* aName, const TQString aLabel )
: KMFilterAction( aName, aLabel ), mParameter( 0 )
{
}
-void KMFilterActionWithUOID::argsFromString( const QString argsStr )
+void KMFilterActionWithUOID::argsFromString( const TQString argsStr )
{
mParameter = argsStr.stripWhiteSpace().toUInt();
}
-const QString KMFilterActionWithUOID::argsAsString() const
+const TQString KMFilterActionWithUOID::argsAsString() const
{
- return QString::number( mParameter );
+ return TQString::number( mParameter );
}
-const QString KMFilterActionWithUOID::displayString() const
+const TQString KMFilterActionWithUOID::displayString() const
{
// FIXME after string freeze:
// return i18n("").arg( );
- return label() + " \"" + QStyleSheet::escape( argsAsString() ) + "\"";
+ return label() + " \"" + TQStyleSheet::escape( argsAsString() ) + "\"";
}
@@ -193,48 +193,48 @@ const QString KMFilterActionWithUOID::displayString() const
//
//=============================================================================
-KMFilterActionWithString::KMFilterActionWithString( const char* aName, const QString aLabel )
+KMFilterActionWithString::KMFilterActionWithString( const char* aName, const TQString aLabel )
: KMFilterAction( aName, aLabel )
{
}
-QWidget* KMFilterActionWithString::createParamWidget( QWidget* parent ) const
+TQWidget* KMFilterActionWithString::createParamWidget( TQWidget* parent ) const
{
- QLineEdit *le = new KLineEdit(parent);
+ TQLineEdit *le = new KLineEdit(parent);
le->setText( mParameter );
return le;
}
-void KMFilterActionWithString::applyParamWidgetValue( QWidget* paramWidget )
+void KMFilterActionWithString::applyParamWidgetValue( TQWidget* paramWidget )
{
- mParameter = ((QLineEdit*)paramWidget)->text();
+ mParameter = ((TQLineEdit*)paramWidget)->text();
}
-void KMFilterActionWithString::setParamWidgetValue( QWidget* paramWidget ) const
+void KMFilterActionWithString::setParamWidgetValue( TQWidget* paramWidget ) const
{
- ((QLineEdit*)paramWidget)->setText( mParameter );
+ ((TQLineEdit*)paramWidget)->setText( mParameter );
}
-void KMFilterActionWithString::clearParamWidget( QWidget* paramWidget ) const
+void KMFilterActionWithString::clearParamWidget( TQWidget* paramWidget ) const
{
- ((QLineEdit*)paramWidget)->clear();
+ ((TQLineEdit*)paramWidget)->clear();
}
-void KMFilterActionWithString::argsFromString( const QString argsStr )
+void KMFilterActionWithString::argsFromString( const TQString argsStr )
{
mParameter = argsStr;
}
-const QString KMFilterActionWithString::argsAsString() const
+const TQString KMFilterActionWithString::argsAsString() const
{
return mParameter;
}
-const QString KMFilterActionWithString::displayString() const
+const TQString KMFilterActionWithString::displayString() const
{
// FIXME after string freeze:
// return i18n("").arg( );
- return label() + " \"" + QStyleSheet::escape( argsAsString() ) + "\"";
+ return label() + " \"" + TQStyleSheet::escape( argsAsString() ) + "\"";
}
//=============================================================================
@@ -243,36 +243,36 @@ const QString KMFilterActionWithString::displayString() const
//
//=============================================================================
-KMFilterActionWithStringList::KMFilterActionWithStringList( const char* aName, const QString aLabel )
+KMFilterActionWithStringList::KMFilterActionWithStringList( const char* aName, const TQString aLabel )
: KMFilterActionWithString( aName, aLabel )
{
}
-QWidget* KMFilterActionWithStringList::createParamWidget( QWidget* parent ) const
+TQWidget* KMFilterActionWithStringList::createParamWidget( TQWidget* parent ) const
{
- QComboBox *cb = new QComboBox( false, parent );
+ TQComboBox *cb = new TQComboBox( false, parent );
cb->insertStringList( mParameterList );
setParamWidgetValue( cb );
return cb;
}
-void KMFilterActionWithStringList::applyParamWidgetValue( QWidget* paramWidget )
+void KMFilterActionWithStringList::applyParamWidgetValue( TQWidget* paramWidget )
{
- mParameter = ((QComboBox*)paramWidget)->currentText();
+ mParameter = ((TQComboBox*)paramWidget)->currentText();
}
-void KMFilterActionWithStringList::setParamWidgetValue( QWidget* paramWidget ) const
+void KMFilterActionWithStringList::setParamWidgetValue( TQWidget* paramWidget ) const
{
int idx = mParameterList.findIndex( mParameter );
- ((QComboBox*)paramWidget)->setCurrentItem( idx >= 0 ? idx : 0 );
+ ((TQComboBox*)paramWidget)->setCurrentItem( idx >= 0 ? idx : 0 );
}
-void KMFilterActionWithStringList::clearParamWidget( QWidget* paramWidget ) const
+void KMFilterActionWithStringList::clearParamWidget( TQWidget* paramWidget ) const
{
- ((QComboBox*)paramWidget)->setCurrentItem(0);
+ ((TQComboBox*)paramWidget)->setCurrentItem(0);
}
-void KMFilterActionWithStringList::argsFromString( const QString argsStr )
+void KMFilterActionWithStringList::argsFromString( const TQString argsStr )
{
int idx = mParameterList.findIndex( argsStr );
if ( idx < 0 ) {
@@ -289,13 +289,13 @@ void KMFilterActionWithStringList::argsFromString( const QString argsStr )
//
//=============================================================================
-KMFilterActionWithFolder::KMFilterActionWithFolder( const char* aName, const QString aLabel )
+KMFilterActionWithFolder::KMFilterActionWithFolder( const char* aName, const TQString aLabel )
: KMFilterAction( aName, aLabel )
{
mFolder = 0;
}
-QWidget* KMFilterActionWithFolder::createParamWidget( QWidget* parent ) const
+TQWidget* KMFilterActionWithFolder::createParamWidget( TQWidget* parent ) const
{
FolderRequester *req = new FolderRequester( parent,
kmkernel->getKMMainWidget()->folderTree() );
@@ -303,13 +303,13 @@ QWidget* KMFilterActionWithFolder::createParamWidget( QWidget* parent ) const
return req;
}
-void KMFilterActionWithFolder::applyParamWidgetValue( QWidget* paramWidget )
+void KMFilterActionWithFolder::applyParamWidgetValue( TQWidget* paramWidget )
{
mFolder = ((FolderRequester *)paramWidget)->folder();
mFolderName = ((FolderRequester *)paramWidget)->folderId();
}
-void KMFilterActionWithFolder::setParamWidgetValue( QWidget* paramWidget ) const
+void KMFilterActionWithFolder::setParamWidgetValue( TQWidget* paramWidget ) const
{
if ( mFolder )
((FolderRequester *)paramWidget)->setFolder( mFolder );
@@ -317,12 +317,12 @@ void KMFilterActionWithFolder::setParamWidgetValue( QWidget* paramWidget ) const
((FolderRequester *)paramWidget)->setFolder( mFolderName );
}
-void KMFilterActionWithFolder::clearParamWidget( QWidget* paramWidget ) const
+void KMFilterActionWithFolder::clearParamWidget( TQWidget* paramWidget ) const
{
((FolderRequester *)paramWidget)->setFolder( kmkernel->draftsFolder() );
}
-void KMFilterActionWithFolder::argsFromString( const QString argsStr )
+void KMFilterActionWithFolder::argsFromString( const TQString argsStr )
{
mFolder = kmkernel->folderMgr()->findIdString( argsStr );
if (!mFolder)
@@ -335,9 +335,9 @@ void KMFilterActionWithFolder::argsFromString( const QString argsStr )
mFolderName = argsStr;
}
-const QString KMFilterActionWithFolder::argsAsString() const
+const TQString KMFilterActionWithFolder::argsAsString() const
{
- QString result;
+ TQString result;
if ( mFolder )
result = mFolder->idString();
else
@@ -345,14 +345,14 @@ const QString KMFilterActionWithFolder::argsAsString() const
return result;
}
-const QString KMFilterActionWithFolder::displayString() const
+const TQString KMFilterActionWithFolder::displayString() const
{
- QString result;
+ TQString result;
if ( mFolder )
result = mFolder->prettyURL();
else
result = mFolderName;
- return label() + " \"" + QStyleSheet::escape( result ) + "\"";
+ return label() + " \"" + TQStyleSheet::escape( result ) + "\"";
}
bool KMFilterActionWithFolder::folderRemoved( KMFolder* aFolder, KMFolder* aNewFolder )
@@ -372,29 +372,29 @@ bool KMFilterActionWithFolder::folderRemoved( KMFolder* aFolder, KMFolder* aNewF
//
//=============================================================================
-KMFilterActionWithAddress::KMFilterActionWithAddress( const char* aName, const QString aLabel )
+KMFilterActionWithAddress::KMFilterActionWithAddress( const char* aName, const TQString aLabel )
: KMFilterActionWithString( aName, aLabel )
{
}
-QWidget* KMFilterActionWithAddress::createParamWidget( QWidget* parent ) const
+TQWidget* KMFilterActionWithAddress::createParamWidget( TQWidget* parent ) const
{
KMFilterActionWithAddressWidget *w = new KMFilterActionWithAddressWidget(parent);
w->setText( mParameter );
return w;
}
-void KMFilterActionWithAddress::applyParamWidgetValue( QWidget* paramWidget )
+void KMFilterActionWithAddress::applyParamWidgetValue( TQWidget* paramWidget )
{
mParameter = ((KMFilterActionWithAddressWidget*)paramWidget)->text();
}
-void KMFilterActionWithAddress::setParamWidgetValue( QWidget* paramWidget ) const
+void KMFilterActionWithAddress::setParamWidgetValue( TQWidget* paramWidget ) const
{
((KMFilterActionWithAddressWidget*)paramWidget)->setText( mParameter );
}
-void KMFilterActionWithAddress::clearParamWidget( QWidget* paramWidget ) const
+void KMFilterActionWithAddress::clearParamWidget( TQWidget* paramWidget ) const
{
((KMFilterActionWithAddressWidget*)paramWidget)->clear();
}
@@ -405,36 +405,36 @@ void KMFilterActionWithAddress::clearParamWidget( QWidget* paramWidget ) const
//
//=============================================================================
-KMFilterActionWithCommand::KMFilterActionWithCommand( const char* aName, const QString aLabel )
+KMFilterActionWithCommand::KMFilterActionWithCommand( const char* aName, const TQString aLabel )
: KMFilterActionWithUrl( aName, aLabel )
{
}
-QWidget* KMFilterActionWithCommand::createParamWidget( QWidget* parent ) const
+TQWidget* KMFilterActionWithCommand::createParamWidget( TQWidget* parent ) const
{
return KMFilterActionWithUrl::createParamWidget( parent );
}
-void KMFilterActionWithCommand::applyParamWidgetValue( QWidget* paramWidget )
+void KMFilterActionWithCommand::applyParamWidgetValue( TQWidget* paramWidget )
{
KMFilterActionWithUrl::applyParamWidgetValue( paramWidget );
}
-void KMFilterActionWithCommand::setParamWidgetValue( QWidget* paramWidget ) const
+void KMFilterActionWithCommand::setParamWidgetValue( TQWidget* paramWidget ) const
{
KMFilterActionWithUrl::setParamWidgetValue( paramWidget );
}
-void KMFilterActionWithCommand::clearParamWidget( QWidget* paramWidget ) const
+void KMFilterActionWithCommand::clearParamWidget( TQWidget* paramWidget ) const
{
KMFilterActionWithUrl::clearParamWidget( paramWidget );
}
-QString KMFilterActionWithCommand::substituteCommandLineArgsFor( KMMessage *aMsg, QPtrList<KTempFile> & aTempFileList ) const
+TQString KMFilterActionWithCommand::substituteCommandLineArgsFor( KMMessage *aMsg, TQPtrList<KTempFile> & aTempFileList ) const
{
- QString result = mParameter;
- QValueList<int> argList;
- QRegExp r( "%[0-9-]+" );
+ TQString result = mParameter;
+ TQValueList<int> argList;
+ TQRegExp r( "%[0-9-]+" );
// search for '%n'
int start = -1;
@@ -450,10 +450,10 @@ QString KMFilterActionWithCommand::substituteCommandLineArgsFor( KMMessage *aMsg
// sort the list of n's
qHeapSort( argList );
- // and use QString::arg to substitute filenames for the %n's.
+ // and use TQString::arg to substitute filenames for the %n's.
int lastSeen = -2;
- QString tempFileName;
- for ( QValueList<int>::Iterator it = argList.begin() ; it != argList.end() ; ++it ) {
+ TQString tempFileName;
+ for ( TQValueList<int>::Iterator it = argList.begin() ; it != argList.end() ; ++it ) {
// setup temp files with check for duplicate %n's
if ( (*it) != lastSeen ) {
KTempFile *tf = new KTempFile();
@@ -461,7 +461,7 @@ QString KMFilterActionWithCommand::substituteCommandLineArgsFor( KMMessage *aMsg
tf->close();
delete tf;
kdDebug(5006) << "KMFilterActionWithCommand: Could not create temp file!" << endl;
- return QString::null;
+ return TQString::null;
}
tf->setAutoDelete(true);
aTempFileList.append( tf );
@@ -480,7 +480,7 @@ QString KMFilterActionWithCommand::substituteCommandLineArgsFor( KMMessage *aMsg
}
tf->close();
}
- // QString( "%0 and %1 and %1" ).arg( 0 ).arg( 1 )
+ // TQString( "%0 and %1 and %1" ).arg( 0 ).arg( 1 )
// returns "0 and 1 and %1", so we must call .arg as
// many times as there are %n's, regardless of their multiplicity.
if ((*it) == -1) result.replace( "%-1", tempFileName );
@@ -489,10 +489,10 @@ QString KMFilterActionWithCommand::substituteCommandLineArgsFor( KMMessage *aMsg
// And finally, replace the %{foo} with the content of the foo
// header field:
- QRegExp header_rx( "%\\{([a-z0-9-]+)\\}", false );
+ TQRegExp header_rx( "%\\{([a-z0-9-]+)\\}", false );
int idx = 0;
while ( ( idx = header_rx.search( result, idx ) ) != -1 ) {
- QString replacement = KProcess::quote( aMsg->headerField( header_rx.cap(1).latin1() ) );
+ TQString replacement = KProcess::quote( aMsg->headerField( header_rx.cap(1).latin1() ) );
result.replace( idx, header_rx.matchedLength(), replacement );
idx += replacement.length();
}
@@ -508,16 +508,16 @@ KMFilterAction::ReturnCode KMFilterActionWithCommand::genericProcess(KMMessage*
if ( mParameter.isEmpty() )
return ErrorButGoOn;
- // KProcess doesn't support a QProcess::launch() equivalent, so
+ // KProcess doesn't support a TQProcess::launch() equivalent, so
// we must use a temp file :-(
KTempFile * inFile = new KTempFile;
inFile->setAutoDelete(true);
- QPtrList<KTempFile> atmList;
+ TQPtrList<KTempFile> atmList;
atmList.setAutoDelete(true);
atmList.append( inFile );
- QString commandLine = substituteCommandLineArgsFor( aMsg , atmList );
+ TQString commandLine = substituteCommandLineArgsFor( aMsg , atmList );
if ( commandLine.isEmpty() )
return ErrorButGoOn;
@@ -531,7 +531,7 @@ KMFilterAction::ReturnCode KMFilterActionWithCommand::genericProcess(KMMessage*
commandLine = "(" + commandLine + ") <" + inFile->name();
// write message to file
- QString tempFileName = inFile->name();
+ TQString tempFileName = inFile->name();
KPIM::kCStringToFile( aMsg->asString(), tempFileName, //###
false, false, false );
inFile->close();
@@ -552,7 +552,7 @@ KMFilterAction::ReturnCode KMFilterActionWithCommand::genericProcess(KMMessage*
if ( withOutput ) {
// read altered message:
- QByteArray msgText = shProc.collectedStdout();
+ TQByteArray msgText = shProc.collectedStdout();
if ( !msgText.isEmpty() ) {
/* If the pipe through alters the message, it could very well
@@ -560,7 +560,7 @@ KMFilterAction::ReturnCode KMFilterActionWithCommand::genericProcess(KMMessage*
unfortunate, as we need to removed the original from the folder
using that, and look it up in the message. When the (new) message
is uploaded, the header is stripped anyhow. */
- QString uid = aMsg->headerField("X-UID");
+ TQString uid = aMsg->headerField("X-UID");
aMsg->fromByteArray( msgText );
aMsg->setHeaderField("X-UID",uid);
}
@@ -686,10 +686,10 @@ public:
virtual ReturnCode process(KMMessage* msg) const;
static KMFilterAction* newAction();
- QWidget * createParamWidget( QWidget * parent ) const;
- void applyParamWidgetValue( QWidget * parent );
- void setParamWidgetValue( QWidget * parent ) const;
- void clearParamWidget( QWidget * param ) const;
+ TQWidget * createParamWidget( TQWidget * parent ) const;
+ void applyParamWidgetValue( TQWidget * parent );
+ void setParamWidgetValue( TQWidget * parent ) const;
+ void clearParamWidget( TQWidget * param ) const;
};
KMFilterAction* KMFilterActionIdentity::newAction()
@@ -705,25 +705,25 @@ KMFilterActionIdentity::KMFilterActionIdentity()
KMFilterAction::ReturnCode KMFilterActionIdentity::process(KMMessage* msg) const
{
- msg->setHeaderField( "X-KMail-Identity", QString::number( mParameter ) );
+ msg->setHeaderField( "X-KMail-Identity", TQString::number( mParameter ) );
return GoOn;
}
-QWidget * KMFilterActionIdentity::createParamWidget( QWidget * parent ) const
+TQWidget * KMFilterActionIdentity::createParamWidget( TQWidget * parent ) const
{
KPIM::IdentityCombo * ic = new KPIM::IdentityCombo( kmkernel->identityManager(), parent );
ic->setCurrentIdentity( mParameter );
return ic;
}
-void KMFilterActionIdentity::applyParamWidgetValue( QWidget * paramWidget )
+void KMFilterActionIdentity::applyParamWidgetValue( TQWidget * paramWidget )
{
KPIM::IdentityCombo * ic = dynamic_cast<KPIM::IdentityCombo*>( paramWidget );
assert( ic );
mParameter = ic->currentIdentity();
}
-void KMFilterActionIdentity::clearParamWidget( QWidget * paramWidget ) const
+void KMFilterActionIdentity::clearParamWidget( TQWidget * paramWidget ) const
{
KPIM::IdentityCombo * ic = dynamic_cast<KPIM::IdentityCombo*>( paramWidget );
assert( ic );
@@ -731,7 +731,7 @@ void KMFilterActionIdentity::clearParamWidget( QWidget * paramWidget ) const
//ic->setCurrentIdentity( kmkernel->identityManager()->defaultIdentity() );
}
-void KMFilterActionIdentity::setParamWidgetValue( QWidget * paramWidget ) const
+void KMFilterActionIdentity::setParamWidgetValue( TQWidget * paramWidget ) const
{
KPIM::IdentityCombo * ic = dynamic_cast<KPIM::IdentityCombo*>( paramWidget );
assert( ic );
@@ -753,9 +753,9 @@ public:
virtual bool isEmpty() const { return false; }
- virtual void argsFromString( const QString argsStr );
- virtual const QString argsAsString() const;
- virtual const QString displayString() const;
+ virtual void argsFromString( const TQString argsStr );
+ virtual const TQString argsAsString() const;
+ virtual const TQString displayString() const;
};
@@ -816,7 +816,7 @@ bool KMFilterActionSetStatus::requiresBody(KMMsgBase*) const
return false;
}
-void KMFilterActionSetStatus::argsFromString( const QString argsStr )
+void KMFilterActionSetStatus::argsFromString( const TQString argsStr )
{
if ( argsStr.length() == 1 ) {
for ( int i = 0 ; i < StatiCount ; i++ )
@@ -828,20 +828,20 @@ void KMFilterActionSetStatus::argsFromString( const QString argsStr )
mParameter = *mParameterList.at(0);
}
-const QString KMFilterActionSetStatus::argsAsString() const
+const TQString KMFilterActionSetStatus::argsAsString() const
{
int idx = mParameterList.findIndex( mParameter );
- if ( idx < 1 ) return QString::null;
+ if ( idx < 1 ) return TQString::null;
KMMsgStatus status = stati[idx-1];
return KMMsgBase::statusToStr(status);
}
-const QString KMFilterActionSetStatus::displayString() const
+const TQString KMFilterActionSetStatus::displayString() const
{
// FIXME after string freeze:
// return i18n("").arg( );
- return label() + " \"" + QStyleSheet::escape( argsAsString() ) + "\"";
+ return label() + " \"" + TQStyleSheet::escape( argsAsString() ) + "\"";
}
//=============================================================================
@@ -859,9 +859,9 @@ public:
virtual bool isEmpty() const { return false; }
- virtual void argsFromString( const QString argsStr );
- virtual const QString argsAsString() const;
- virtual const QString displayString() const;
+ virtual void argsFromString( const TQString argsStr );
+ virtual const TQString argsAsString() const;
+ virtual const TQString displayString() const;
};
@@ -908,7 +908,7 @@ KMFilterAction::ReturnCode KMFilterActionFakeDisposition::process(KMMessage* msg
return GoOn;
}
-void KMFilterActionFakeDisposition::argsFromString( const QString argsStr )
+void KMFilterActionFakeDisposition::argsFromString( const TQString argsStr )
{
if ( argsStr.length() == 1 ) {
if ( argsStr[0] == 'I' ) { // ignore
@@ -924,19 +924,19 @@ void KMFilterActionFakeDisposition::argsFromString( const QString argsStr )
mParameter = *mParameterList.at(0);
}
-const QString KMFilterActionFakeDisposition::argsAsString() const
+const TQString KMFilterActionFakeDisposition::argsAsString() const
{
int idx = mParameterList.findIndex( mParameter );
- if ( idx < 1 ) return QString::null;
+ if ( idx < 1 ) return TQString::null;
- return QString( QChar( idx < 2 ? 'I' : char(mdns[idx-2]) ) );
+ return TQString( TQChar( idx < 2 ? 'I' : char(mdns[idx-2]) ) );
}
-const QString KMFilterActionFakeDisposition::displayString() const
+const TQString KMFilterActionFakeDisposition::displayString() const
{
// FIXME after string freeze:
// return i18n("").arg( );
- return label() + " \"" + QStyleSheet::escape( argsAsString() ) + "\"";
+ return label() + " \"" + TQStyleSheet::escape( argsAsString() ) + "\"";
}
//=============================================================================
@@ -948,8 +948,8 @@ class KMFilterActionRemoveHeader: public KMFilterActionWithStringList
public:
KMFilterActionRemoveHeader();
virtual ReturnCode process(KMMessage* msg) const;
- virtual QWidget* createParamWidget( QWidget* parent ) const;
- virtual void setParamWidgetValue( QWidget* paramWidget ) const;
+ virtual TQWidget* createParamWidget( TQWidget* parent ) const;
+ virtual void setParamWidgetValue( TQWidget* paramWidget ) const;
static KMFilterAction* newAction();
};
@@ -971,10 +971,10 @@ KMFilterActionRemoveHeader::KMFilterActionRemoveHeader()
mParameter = *mParameterList.at(0);
}
-QWidget* KMFilterActionRemoveHeader::createParamWidget( QWidget* parent ) const
+TQWidget* KMFilterActionRemoveHeader::createParamWidget( TQWidget* parent ) const
{
- QComboBox *cb = new QComboBox( true/*editable*/, parent );
- cb->setInsertionPolicy( QComboBox::AtBottom );
+ TQComboBox *cb = new TQComboBox( true/*editable*/, parent );
+ cb->setInsertionPolicy( TQComboBox::AtBottom );
setParamWidgetValue( cb );
return cb;
}
@@ -988,9 +988,9 @@ KMFilterAction::ReturnCode KMFilterActionRemoveHeader::process(KMMessage* msg) c
return GoOn;
}
-void KMFilterActionRemoveHeader::setParamWidgetValue( QWidget* paramWidget ) const
+void KMFilterActionRemoveHeader::setParamWidgetValue( TQWidget* paramWidget ) const
{
- QComboBox * cb = dynamic_cast<QComboBox*>(paramWidget);
+ TQComboBox * cb = dynamic_cast<TQComboBox*>(paramWidget);
Q_ASSERT( cb );
int idx = mParameterList.findIndex( mParameter );
@@ -1014,22 +1014,22 @@ class KMFilterActionAddHeader: public KMFilterActionWithStringList
public:
KMFilterActionAddHeader();
virtual ReturnCode process(KMMessage* msg) const;
- virtual QWidget* createParamWidget( QWidget* parent ) const;
- virtual void setParamWidgetValue( QWidget* paramWidget ) const;
- virtual void applyParamWidgetValue( QWidget* paramWidget );
- virtual void clearParamWidget( QWidget* paramWidget ) const;
+ virtual TQWidget* createParamWidget( TQWidget* parent ) const;
+ virtual void setParamWidgetValue( TQWidget* paramWidget ) const;
+ virtual void applyParamWidgetValue( TQWidget* paramWidget );
+ virtual void clearParamWidget( TQWidget* paramWidget ) const;
- virtual const QString argsAsString() const;
- virtual void argsFromString( const QString argsStr );
+ virtual const TQString argsAsString() const;
+ virtual void argsFromString( const TQString argsStr );
- virtual const QString displayString() const;
+ virtual const TQString displayString() const;
static KMFilterAction* newAction()
{
return (new KMFilterActionAddHeader);
}
private:
- QString mValue;
+ TQString mValue;
};
KMFilterActionAddHeader::KMFilterActionAddHeader()
@@ -1052,27 +1052,27 @@ KMFilterAction::ReturnCode KMFilterActionAddHeader::process(KMMessage* msg) cons
return GoOn;
}
-QWidget* KMFilterActionAddHeader::createParamWidget( QWidget* parent ) const
+TQWidget* KMFilterActionAddHeader::createParamWidget( TQWidget* parent ) const
{
- QWidget *w = new QWidget( parent );
- QHBoxLayout *hbl = new QHBoxLayout( w );
+ TQWidget *w = new TQWidget( parent );
+ TQHBoxLayout *hbl = new TQHBoxLayout( w );
hbl->setSpacing( 4 );
- QComboBox *cb = new QComboBox( true, w, "combo" );
- cb->setInsertionPolicy( QComboBox::AtBottom );
+ TQComboBox *cb = new TQComboBox( true, w, "combo" );
+ cb->setInsertionPolicy( TQComboBox::AtBottom );
hbl->addWidget( cb, 0 /* stretch */ );
- QLabel *l = new QLabel( i18n("With value:"), w );
+ TQLabel *l = new TQLabel( i18n("With value:"), w );
l->setFixedWidth( l->sizeHint().width() );
hbl->addWidget( l, 0 );
- QLineEdit *le = new KLineEdit( w, "ledit" );
+ TQLineEdit *le = new KLineEdit( w, "ledit" );
hbl->addWidget( le, 1 );
setParamWidgetValue( w );
return w;
}
-void KMFilterActionAddHeader::setParamWidgetValue( QWidget* paramWidget ) const
+void KMFilterActionAddHeader::setParamWidgetValue( TQWidget* paramWidget ) const
{
int idx = mParameterList.findIndex( mParameter );
- QComboBox *cb = (QComboBox*)paramWidget->child("combo");
+ TQComboBox *cb = (TQComboBox*)paramWidget->child("combo");
Q_ASSERT( cb );
cb->clear();
cb->insertStringList( mParameterList );
@@ -1082,52 +1082,52 @@ void KMFilterActionAddHeader::setParamWidgetValue( QWidget* paramWidget ) const
} else {
cb->setCurrentItem( idx );
}
- QLineEdit *le = (QLineEdit*)paramWidget->child("ledit");
+ TQLineEdit *le = (TQLineEdit*)paramWidget->child("ledit");
Q_ASSERT( le );
le->setText( mValue );
}
-void KMFilterActionAddHeader::applyParamWidgetValue( QWidget* paramWidget )
+void KMFilterActionAddHeader::applyParamWidgetValue( TQWidget* paramWidget )
{
- QComboBox *cb = (QComboBox*)paramWidget->child("combo");
+ TQComboBox *cb = (TQComboBox*)paramWidget->child("combo");
Q_ASSERT( cb );
mParameter = cb->currentText();
- QLineEdit *le = (QLineEdit*)paramWidget->child("ledit");
+ TQLineEdit *le = (TQLineEdit*)paramWidget->child("ledit");
Q_ASSERT( le );
mValue = le->text();
}
-void KMFilterActionAddHeader::clearParamWidget( QWidget* paramWidget ) const
+void KMFilterActionAddHeader::clearParamWidget( TQWidget* paramWidget ) const
{
- QComboBox *cb = (QComboBox*)paramWidget->child("combo");
+ TQComboBox *cb = (TQComboBox*)paramWidget->child("combo");
Q_ASSERT( cb );
cb->setCurrentItem(0);
- QLineEdit *le = (QLineEdit*)paramWidget->child("ledit");
+ TQLineEdit *le = (TQLineEdit*)paramWidget->child("ledit");
Q_ASSERT( le );
le->clear();
}
-const QString KMFilterActionAddHeader::argsAsString() const
+const TQString KMFilterActionAddHeader::argsAsString() const
{
- QString result = mParameter;
+ TQString result = mParameter;
result += '\t';
result += mValue;
return result;
}
-const QString KMFilterActionAddHeader::displayString() const
+const TQString KMFilterActionAddHeader::displayString() const
{
// FIXME after string freeze:
// return i18n("").arg( );
- return label() + " \"" + QStyleSheet::escape( argsAsString() ) + "\"";
+ return label() + " \"" + TQStyleSheet::escape( argsAsString() ) + "\"";
}
-void KMFilterActionAddHeader::argsFromString( const QString argsStr )
+void KMFilterActionAddHeader::argsFromString( const TQString argsStr )
{
- QStringList l = QStringList::split( '\t', argsStr, true /*allow empty entries*/ );
- QString s;
+ TQStringList l = TQStringList::split( '\t', argsStr, true /*allow empty entries*/ );
+ TQString s;
if ( l.count() < 2 ) {
s = l[0];
mValue = "";
@@ -1154,15 +1154,15 @@ class KMFilterActionRewriteHeader: public KMFilterActionWithStringList
public:
KMFilterActionRewriteHeader();
virtual ReturnCode process(KMMessage* msg) const;
- virtual QWidget* createParamWidget( QWidget* parent ) const;
- virtual void setParamWidgetValue( QWidget* paramWidget ) const;
- virtual void applyParamWidgetValue( QWidget* paramWidget );
- virtual void clearParamWidget( QWidget* paramWidget ) const;
+ virtual TQWidget* createParamWidget( TQWidget* parent ) const;
+ virtual void setParamWidgetValue( TQWidget* paramWidget ) const;
+ virtual void applyParamWidgetValue( TQWidget* paramWidget );
+ virtual void clearParamWidget( TQWidget* paramWidget ) const;
- virtual const QString argsAsString() const;
- virtual void argsFromString( const QString argsStr );
+ virtual const TQString argsAsString() const;
+ virtual void argsFromString( const TQString argsStr );
- virtual const QString displayString() const;
+ virtual const TQString displayString() const;
static KMFilterAction* newAction()
{
@@ -1170,7 +1170,7 @@ public:
}
private:
KRegExp3 mRegExp;
- QString mReplacementString;
+ TQString mReplacementString;
};
KMFilterActionRewriteHeader::KMFilterActionRewriteHeader()
@@ -1193,45 +1193,45 @@ KMFilterAction::ReturnCode KMFilterActionRewriteHeader::process(KMMessage* msg)
KRegExp3 rx = mRegExp; // KRegExp3::replace is not const.
- QString newValue = rx.replace( msg->headerField( mParameter.latin1() ),
+ TQString newValue = rx.replace( msg->headerField( mParameter.latin1() ),
mReplacementString );
msg->setHeaderField( mParameter.latin1(), newValue );
return GoOn;
}
-QWidget* KMFilterActionRewriteHeader::createParamWidget( QWidget* parent ) const
+TQWidget* KMFilterActionRewriteHeader::createParamWidget( TQWidget* parent ) const
{
- QWidget *w = new QWidget( parent );
- QHBoxLayout *hbl = new QHBoxLayout( w );
+ TQWidget *w = new TQWidget( parent );
+ TQHBoxLayout *hbl = new TQHBoxLayout( w );
hbl->setSpacing( 4 );
- QComboBox *cb = new QComboBox( true, w, "combo" );
- cb->setInsertionPolicy( QComboBox::AtBottom );
+ TQComboBox *cb = new TQComboBox( true, w, "combo" );
+ cb->setInsertionPolicy( TQComboBox::AtBottom );
hbl->addWidget( cb, 0 /* stretch */ );
- QLabel *l = new QLabel( i18n("Replace:"), w );
+ TQLabel *l = new TQLabel( i18n("Replace:"), w );
l->setFixedWidth( l->sizeHint().width() );
hbl->addWidget( l, 0 );
RegExpLineEdit *rele = new RegExpLineEdit( w, "search" );
hbl->addWidget( rele, 1 );
- l = new QLabel( i18n("With:"), w );
+ l = new TQLabel( i18n("With:"), w );
l->setFixedWidth( l->sizeHint().width() );
hbl->addWidget( l, 0 );
- QLineEdit *le = new KLineEdit( w, "replace" );
+ TQLineEdit *le = new KLineEdit( w, "replace" );
hbl->addWidget( le, 1 );
setParamWidgetValue( w );
return w;
}
-void KMFilterActionRewriteHeader::setParamWidgetValue( QWidget* paramWidget ) const
+void KMFilterActionRewriteHeader::setParamWidgetValue( TQWidget* paramWidget ) const
{
int idx = mParameterList.findIndex( mParameter );
- QComboBox *cb = (QComboBox*)paramWidget->child("combo");
+ TQComboBox *cb = (TQComboBox*)paramWidget->child("combo");
Q_ASSERT( cb );
cb->clear();
@@ -1247,14 +1247,14 @@ void KMFilterActionRewriteHeader::setParamWidgetValue( QWidget* paramWidget ) co
Q_ASSERT( rele );
rele->setText( mRegExp.pattern() );
- QLineEdit *le = (QLineEdit*)paramWidget->child("replace");
+ TQLineEdit *le = (TQLineEdit*)paramWidget->child("replace");
Q_ASSERT( le );
le->setText( mReplacementString );
}
-void KMFilterActionRewriteHeader::applyParamWidgetValue( QWidget* paramWidget )
+void KMFilterActionRewriteHeader::applyParamWidgetValue( TQWidget* paramWidget )
{
- QComboBox *cb = (QComboBox*)paramWidget->child("combo");
+ TQComboBox *cb = (TQComboBox*)paramWidget->child("combo");
Q_ASSERT( cb );
mParameter = cb->currentText();
@@ -1262,14 +1262,14 @@ void KMFilterActionRewriteHeader::applyParamWidgetValue( QWidget* paramWidget )
Q_ASSERT( rele );
mRegExp.setPattern( rele->text() );
- QLineEdit *le = (QLineEdit*)paramWidget->child("replace");
+ TQLineEdit *le = (TQLineEdit*)paramWidget->child("replace");
Q_ASSERT( le );
mReplacementString = le->text();
}
-void KMFilterActionRewriteHeader::clearParamWidget( QWidget* paramWidget ) const
+void KMFilterActionRewriteHeader::clearParamWidget( TQWidget* paramWidget ) const
{
- QComboBox *cb = (QComboBox*)paramWidget->child("combo");
+ TQComboBox *cb = (TQComboBox*)paramWidget->child("combo");
Q_ASSERT( cb );
cb->setCurrentItem(0);
@@ -1277,14 +1277,14 @@ void KMFilterActionRewriteHeader::clearParamWidget( QWidget* paramWidget ) const
Q_ASSERT( rele );
rele->clear();
- QLineEdit *le = (QLineEdit*)paramWidget->child("replace");
+ TQLineEdit *le = (TQLineEdit*)paramWidget->child("replace");
Q_ASSERT( le );
le->clear();
}
-const QString KMFilterActionRewriteHeader::argsAsString() const
+const TQString KMFilterActionRewriteHeader::argsAsString() const
{
- QString result = mParameter;
+ TQString result = mParameter;
result += '\t';
result += mRegExp.pattern();
result += '\t';
@@ -1293,17 +1293,17 @@ const QString KMFilterActionRewriteHeader::argsAsString() const
return result;
}
-const QString KMFilterActionRewriteHeader::displayString() const
+const TQString KMFilterActionRewriteHeader::displayString() const
{
// FIXME after string freeze:
// return i18n("").arg( );
- return label() + " \"" + QStyleSheet::escape( argsAsString() ) + "\"";
+ return label() + " \"" + TQStyleSheet::escape( argsAsString() ) + "\"";
}
-void KMFilterActionRewriteHeader::argsFromString( const QString argsStr )
+void KMFilterActionRewriteHeader::argsFromString( const TQString argsStr )
{
- QStringList l = QStringList::split( '\t', argsStr, true /*allow empty entries*/ );
- QString s;
+ TQStringList l = TQStringList::split( '\t', argsStr, true /*allow empty entries*/ );
+ TQString s;
s = l[0];
mRegExp.setPattern( l[1] );
@@ -1420,8 +1420,8 @@ void KMFilterActionCopy::processAsync(KMMessage* msg) const
ActionScheduler *handler = MessageProperty::filterHandler( msg );
KMCommand *cmd = new KMCopyCommand( mFolder, msg );
- QObject::connect( cmd, SIGNAL( completed( KMCommand * ) ),
- handler, SLOT( copyMessageFinished( KMCommand * ) ) );
+ TQObject::connect( cmd, TQT_SIGNAL( completed( KMCommand * ) ),
+ handler, TQT_SLOT( copyMessageFinished( KMCommand * ) ) );
cmd->start();
}
@@ -1473,7 +1473,7 @@ KMFilterAction::ReturnCode KMFilterActionForward::process(KMMessage* aMsg) const
msg->initFromMessage( aMsg );
- // QString st = QString::fromUtf8( aMsg->createForwardBody() );
+ // TQString st = TQString::fromUtf8( aMsg->createForwardBody() );
TemplateParser parser( msg, TemplateParser::Forward,
aMsg->body(), false, false, false, false);
@@ -1485,7 +1485,7 @@ KMFilterAction::ReturnCode KMFilterActionForward::process(KMMessage* aMsg) const
msg->body() );
if( encoding.isEmpty() )
encoding = "utf-8";
- QCString str = KMMsgBase::codecForName( encoding )->fromUnicode( msg->body() );
+ TQCString str = KMMsgBase::codecForName( encoding )->fromUnicode( msg->body() );
msg->setCharset( encoding );
msg->setTo( mParameter );
@@ -1498,7 +1498,7 @@ KMFilterAction::ReturnCode KMFilterActionForward::process(KMMessage* aMsg) const
msg->setAutomaticFields( true );
msg->setHeaderField( "Content-Type", "text/plain" );
// msg->setCteStr( isQP ? "quoted-printable": "8bit" );
- QValueList<int> dummy;
+ TQValueList<int> dummy;
msg->setBodyAndGuessCte(str, dummy, !isQP);
msg->setCharset( encoding );
if( isQP )
@@ -1518,7 +1518,7 @@ KMFilterAction::ReturnCode KMFilterActionForward::process(KMMessage* aMsg) const
bodyPart.setTypeStr( "text" );
bodyPart.setSubtypeStr( "plain" );
// bodyPart.setCteStr( isQP ? "quoted-printable": "8bit" );
- QValueList<int> dummy;
+ TQValueList<int> dummy;
bodyPart.setBodyAndGuessCte(str, dummy, !isQP);
bodyPart.setCharset( encoding );
bodyPart.setBodyEncoded( str );
@@ -1621,7 +1621,7 @@ KMFilterAction::ReturnCode KMFilterActionExec::process(KMMessage *aMsg) const
class PipeJob : public KPIM::ThreadWeaver::Job
{
public:
- PipeJob(QObject* parent = 0 , const char* name = 0, KMMessage* aMsg = 0, QString cmd = 0, QString tempFileName = 0 )
+ PipeJob(TQObject* parent = 0 , const char* name = 0, KMMessage* aMsg = 0, TQString cmd = 0, TQString tempFileName = 0 )
: Job (parent, name),
mTempFileName(tempFileName),
mCmd(cmd),
@@ -1641,12 +1641,12 @@ class PipeJob : public KPIM::ThreadWeaver::Job
{
KPIM::ThreadWeaver::debug (1, "PipeJob::run: doing it .\n");
FILE *p;
- QByteArray ba;
+ TQByteArray ba;
// backup the serial number in case the header gets lost
- QString origSerNum = mMsg->headerField( "X-KMail-Filtered" );
+ TQString origSerNum = mMsg->headerField( "X-KMail-Filtered" );
- p = popen(QFile::encodeName(mCmd), "r");
+ p = popen(TQFile::encodeName(mCmd), "r");
int len =100;
char buffer[100];
// append data to ba:
@@ -1658,7 +1658,7 @@ class PipeJob : public KPIM::ThreadWeaver::Job
}
pclose(p);
if ( !ba.isEmpty() ) {
- KPIM::ThreadWeaver::debug (1, "PipeJob::run: %s", QString(ba).latin1() );
+ KPIM::ThreadWeaver::debug (1, "PipeJob::run: %s", TQString(ba).latin1() );
KMFolder *filterFolder = mMsg->parent();
ActionScheduler *handler = MessageProperty::filterHandler( mMsg->getMsgSerNum() );
@@ -1677,10 +1677,10 @@ class PipeJob : public KPIM::ThreadWeaver::Job
KPIM::ThreadWeaver::debug (1, "PipeJob::run: done.\n" );
// unlink the tempFile
- QFile::remove(mTempFileName);
+ TQFile::remove(mTempFileName);
}
- QString mTempFileName;
- QString mCmd;
+ TQString mTempFileName;
+ TQString mCmd;
KMMessage *mMsg;
};
@@ -1714,11 +1714,11 @@ void KMFilterActionExtFilter::processAsync(KMMessage* aMsg) const
KTempFile * inFile = new KTempFile;
inFile->setAutoDelete(false);
- QPtrList<KTempFile> atmList;
+ TQPtrList<KTempFile> atmList;
atmList.setAutoDelete(true);
atmList.append( inFile );
- QString commandLine = substituteCommandLineArgsFor( aMsg , atmList );
+ TQString commandLine = substituteCommandLineArgsFor( aMsg , atmList );
if ( commandLine.isEmpty() )
handler->actionMessage( ErrorButGoOn );
@@ -1732,13 +1732,13 @@ void KMFilterActionExtFilter::processAsync(KMMessage* aMsg) const
commandLine = "(" + commandLine + ") <" + inFile->name();
// write message to file
- QString tempFileName = inFile->name();
+ TQString tempFileName = inFile->name();
KPIM::kCStringToFile( aMsg->asString(), tempFileName, //###
false, false, false );
inFile->close();
PipeJob *job = new PipeJob(0, 0, aMsg, commandLine, tempFileName);
- QObject::connect ( job, SIGNAL( done() ), handler, SLOT( actionMessage() ) );
+ TQObject::connect ( job, TQT_SIGNAL( done() ), handler, TQT_SLOT( actionMessage() ) );
kmkernel->weaver()->enqueue(job);
}
@@ -1755,7 +1755,7 @@ public:
static KMFilterAction* newAction(void);
};
-KMFilterActionWithTest::KMFilterActionWithTest( const char* aName, const QString aLabel )
+KMFilterActionWithTest::KMFilterActionWithTest( const char* aName, const TQString aLabel )
: KMFilterAction( aName, aLabel )
{
}
@@ -1764,7 +1764,7 @@ KMFilterActionWithTest::~KMFilterActionWithTest()
{
}
-QWidget* KMFilterActionWithTest::createParamWidget( QWidget* parent ) const
+TQWidget* KMFilterActionWithTest::createParamWidget( TQWidget* parent ) const
{
KMSoundTestWidget *le = new KMSoundTestWidget(parent);
le->setUrl( mParameter );
@@ -1772,36 +1772,36 @@ QWidget* KMFilterActionWithTest::createParamWidget( QWidget* parent ) const
}
-void KMFilterActionWithTest::applyParamWidgetValue( QWidget* paramWidget )
+void KMFilterActionWithTest::applyParamWidgetValue( TQWidget* paramWidget )
{
mParameter = ((KMSoundTestWidget*)paramWidget)->url();
}
-void KMFilterActionWithTest::setParamWidgetValue( QWidget* paramWidget ) const
+void KMFilterActionWithTest::setParamWidgetValue( TQWidget* paramWidget ) const
{
((KMSoundTestWidget*)paramWidget)->setUrl( mParameter );
}
-void KMFilterActionWithTest::clearParamWidget( QWidget* paramWidget ) const
+void KMFilterActionWithTest::clearParamWidget( TQWidget* paramWidget ) const
{
((KMSoundTestWidget*)paramWidget)->clear();
}
-void KMFilterActionWithTest::argsFromString( const QString argsStr )
+void KMFilterActionWithTest::argsFromString( const TQString argsStr )
{
mParameter = argsStr;
}
-const QString KMFilterActionWithTest::argsAsString() const
+const TQString KMFilterActionWithTest::argsAsString() const
{
return mParameter;
}
-const QString KMFilterActionWithTest::displayString() const
+const TQString KMFilterActionWithTest::displayString() const
{
// FIXME after string freeze:
// return i18n("").arg( );
- return label() + " \"" + QStyleSheet::escape( argsAsString() ) + "\"";
+ return label() + " \"" + TQStyleSheet::escape( argsAsString() ) + "\"";
}
@@ -1819,11 +1819,11 @@ KMFilterAction::ReturnCode KMFilterActionExecSound::process(KMMessage*) const
{
if ( mParameter.isEmpty() )
return ErrorButGoOn;
- QString play = mParameter;
- QString file = QString::fromLatin1("file:");
+ TQString play = mParameter;
+ TQString file = TQString::fromLatin1("file:");
if (mParameter.startsWith(file))
play = mParameter.mid(file.length());
- KAudioPlayer::play(QFile::encodeName(play));
+ KAudioPlayer::play(TQFile::encodeName(play));
return GoOn;
}
@@ -1832,7 +1832,7 @@ bool KMFilterActionExecSound::requiresBody(KMMsgBase*) const
return false;
}
-KMFilterActionWithUrl::KMFilterActionWithUrl( const char* aName, const QString aLabel )
+KMFilterActionWithUrl::KMFilterActionWithUrl( const char* aName, const TQString aLabel )
: KMFilterAction( aName, aLabel )
{
}
@@ -1841,7 +1841,7 @@ KMFilterActionWithUrl::~KMFilterActionWithUrl()
{
}
-QWidget* KMFilterActionWithUrl::createParamWidget( QWidget* parent ) const
+TQWidget* KMFilterActionWithUrl::createParamWidget( TQWidget* parent ) const
{
KURLRequester *le = new KURLRequester(parent);
le->setURL( mParameter );
@@ -1849,36 +1849,36 @@ QWidget* KMFilterActionWithUrl::createParamWidget( QWidget* parent ) const
}
-void KMFilterActionWithUrl::applyParamWidgetValue( QWidget* paramWidget )
+void KMFilterActionWithUrl::applyParamWidgetValue( TQWidget* paramWidget )
{
mParameter = ((KURLRequester*)paramWidget)->url();
}
-void KMFilterActionWithUrl::setParamWidgetValue( QWidget* paramWidget ) const
+void KMFilterActionWithUrl::setParamWidgetValue( TQWidget* paramWidget ) const
{
((KURLRequester*)paramWidget)->setURL( mParameter );
}
-void KMFilterActionWithUrl::clearParamWidget( QWidget* paramWidget ) const
+void KMFilterActionWithUrl::clearParamWidget( TQWidget* paramWidget ) const
{
((KURLRequester*)paramWidget)->clear();
}
-void KMFilterActionWithUrl::argsFromString( const QString argsStr )
+void KMFilterActionWithUrl::argsFromString( const TQString argsStr )
{
mParameter = argsStr;
}
-const QString KMFilterActionWithUrl::argsAsString() const
+const TQString KMFilterActionWithUrl::argsAsString() const
{
return mParameter;
}
-const QString KMFilterActionWithUrl::displayString() const
+const TQString KMFilterActionWithUrl::displayString() const
{
// FIXME after string freeze:
// return i18n("").arg( );
- return label() + " \"" + QStyleSheet::escape( argsAsString() ) + "\"";
+ return label() + " \"" + TQStyleSheet::escape( argsAsString() ) + "\"";
}
@@ -1907,10 +1907,10 @@ void KMFilterActionDict::init(void)
insert( KMFilterActionExecSound::newAction );
// Register custom filter actions below this line.
}
-// The int in the QDict constructor (41) must be a prime
+// The int in the TQDict constructor (41) must be a prime
// and should be greater than the double number of KMFilterAction types
KMFilterActionDict::KMFilterActionDict()
- : QDict<KMFilterActionDesc>(41)
+ : TQDict<KMFilterActionDesc>(41)
{
mList.setAutoDelete(true);
init();
@@ -1923,8 +1923,8 @@ void KMFilterActionDict::insert( KMFilterActionNewFunc aNewFunc )
desc->name = action->name();
desc->label = action->label();
desc->create = aNewFunc;
- QDict<KMFilterActionDesc>::insert( desc->name, desc );
- QDict<KMFilterActionDesc>::insert( desc->label, desc );
+ TQDict<KMFilterActionDesc>::insert( desc->name, desc );
+ TQDict<KMFilterActionDesc>::insert( desc->label, desc );
mList.append( desc );
delete action;
}
diff --git a/kmail/kmfilteraction.h b/kmail/kmfilteraction.h
index abd42719e..c47a4a6d5 100644
--- a/kmail/kmfilteraction.h
+++ b/kmail/kmfilteraction.h
@@ -22,13 +22,13 @@
#include <kmime_mdn.h>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qdict.h>
-#include <qptrlist.h>
-#include <qvaluelist.h>
-#include <qguardedptr.h>
-#include <qwidget.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqdict.h>
+#include <tqptrlist.h>
+#include <tqvaluelist.h>
+#include <tqguardedptr.h>
+#include <tqwidget.h>
class KMMsgBase;
class KMMessage;
@@ -74,16 +74,16 @@ public:
CriticalError = 0x8 };
/** Initialize filter action with (english) name @p aName and
(internationalized) label @p aLabel. */
- KMFilterAction(const char* aName, const QString aLabel);
+ KMFilterAction(const char* aName, const TQString aLabel);
virtual ~KMFilterAction();
/** Returns nationalized label, ie. the one which is presented in
the filter dialog. */
- const QString label() const { return mLabel; }
+ const TQString label() const { return mLabel; }
/** Returns english name, ie. the one under which it is known in the
config. */
- const QString name() const { return mName; }
+ const TQString name() const { return mName; }
/** Execute action on given message. Returns @p CriticalError if a
critical error has occurred (eg. disk full), @p ErrorButGoOn if
@@ -111,30 +111,30 @@ public:
/** Creates a widget for setting the filter action parameter. Also
sets the value of the widget. */
- virtual QWidget* createParamWidget(QWidget* parent) const;
+ virtual TQWidget* createParamWidget(TQWidget* parent) const;
/** The filter action shall set it's parameter from the widget's
contents. It is allowed that the value is read by the action
before this function is called. */
- virtual void applyParamWidgetValue(QWidget* paramWidget);
+ virtual void applyParamWidgetValue(TQWidget* paramWidget);
/** The filter action shall set it's widget's contents from it's
parameter. */
- virtual void setParamWidgetValue(QWidget* paramWidget) const;
+ virtual void setParamWidgetValue(TQWidget* paramWidget) const;
/** The filter action shall clear it's parameter widget's
contents. */
- virtual void clearParamWidget(QWidget* paramWidget) const;
+ virtual void clearParamWidget(TQWidget* paramWidget) const;
/** Read extra arguments from given string. */
- virtual void argsFromString(const QString argsStr) = 0;
+ virtual void argsFromString(const TQString argsStr) = 0;
/** Return extra arguments as string. Must not contain newlines. */
- virtual const QString argsAsString() const = 0;
+ virtual const TQString argsAsString() const = 0;
/** Returns a translated string describing this filter for visualization
purposes, e.g. in the filter log. */
- virtual const QString displayString() const = 0;
+ virtual const TQString displayString() const = 0;
/** Called from the filter when a folder is removed. Tests if the
folder @p aFolder is used and changes to @p aNewFolder in this
@@ -150,12 +150,12 @@ public:
/** Automates the sending of MDNs from filter actions. */
static void sendMDN( KMMessage * msg, KMime::MDN::DispositionType d,
- const QValueList<KMime::MDN::DispositionModifier> & m
- =QValueList<KMime::MDN::DispositionModifier>() );
+ const TQValueList<KMime::MDN::DispositionModifier> & m
+ =TQValueList<KMime::MDN::DispositionModifier>() );
private:
- QString mName;
- QString mLabel;
+ TQString mName;
+ TQString mLabel;
};
//=========================================================
@@ -166,7 +166,7 @@ private:
/** Abstract base class for KMail's filter actions that need no
- parameter, e.g. "Confirm Delivery". Creates an (empty) QWidget as
+ parameter, e.g. "Confirm Delivery". Creates an (empty) TQWidget as
parameter widget. A subclass of this must provide at least
implementations for the following methods:
@@ -183,19 +183,19 @@ class KMFilterActionWithNone : public KMFilterAction
public:
/** Initialize filter action with (english) name @p aName. This is
the name under which this action is known in the config file. */
- KMFilterActionWithNone(const char* aName, const QString aLabel);
+ KMFilterActionWithNone(const char* aName, const TQString aLabel);
/** Read extra arguments from given string. This type of filter
action has no parameters, so this is a no-op. */
- virtual void argsFromString(const QString) {};
+ virtual void argsFromString(const TQString) {};
/** Return extra arguments as string. Must not contain newlines. We
- return QString::null, because we have no parameter. */
- virtual const QString argsAsString() const { return QString::null; }
+ return TQString::null, because we have no parameter. */
+ virtual const TQString argsAsString() const { return TQString::null; }
/** Returns a translated string describing this filter for visualization
purposes, e.g. in the filter log. */
- virtual const QString displayString() const;
+ virtual const TQString displayString() const;
};
@@ -208,7 +208,7 @@ public:
/** Abstract base class for KMail's filter actions that need a
free-form parameter, e.g. 'set transport' or 'set reply to'. Can
- create a QLineEdit as parameter widget. A subclass of this
+ create a TQLineEdit as parameter widget. A subclass of this
must provide at least implementations for the following methods:
@li virtual KMFilterAction::ReturnCodes KMFilterAction::process
@@ -224,7 +224,7 @@ class KMFilterActionWithString : public KMFilterAction
public:
/** Initialize filter action with (english) name @p aName. This is
the name under which this action is known in the config file. */
- KMFilterActionWithString(const char* aName, const QString aLabel);
+ KMFilterActionWithString(const char* aName, const TQString aLabel);
/** Determines whether this action is valid. But this is just a
quick test. Eg., actions that have a mail address as parameter
@@ -234,33 +234,33 @@ public:
/** Creates a widget for setting the filter action parameter. Also
sets the value of the widget. */
- virtual QWidget* createParamWidget(QWidget* parent) const;
+ virtual TQWidget* createParamWidget(TQWidget* parent) const;
/** The filter action shall set it's parameter from the widget's
contents. It is allowed that the value is read by the action
before this function is called. */
- virtual void applyParamWidgetValue(QWidget* paramWidget);
+ virtual void applyParamWidgetValue(TQWidget* paramWidget);
/** The filter action shall set it's widget's contents from it's
parameter. */
- virtual void setParamWidgetValue(QWidget* paramWidget) const;
+ virtual void setParamWidgetValue(TQWidget* paramWidget) const;
/** The filter action shall clear it's parameter widget's
contents. */
- virtual void clearParamWidget(QWidget* paramWidget) const;
+ virtual void clearParamWidget(TQWidget* paramWidget) const;
/** Read extra arguments from given string. */
- virtual void argsFromString(const QString argsStr);
+ virtual void argsFromString(const TQString argsStr);
/** Return extra arguments as string. Must not contain newlines. */
- virtual const QString argsAsString() const;
+ virtual const TQString argsAsString() const;
/** Returns a translated string describing this filter for visualization
purposes, e.g. in the filter log. */
- virtual const QString displayString() const;
+ virtual const TQString displayString() const;
protected:
- QString mParameter;
+ TQString mParameter;
};
//=========================================================
@@ -288,7 +288,7 @@ class KMFilterActionWithUOID : public KMFilterAction
public:
/** Initialize filter action with (english) name @p aName. This is
the name under which this action is known in the config file. */
- KMFilterActionWithUOID(const char* aName, const QString aLabel);
+ KMFilterActionWithUOID(const char* aName, const TQString aLabel);
/** Determines whether this action is valid. But this is just a
quick test. Eg., actions that have a mail address as parameter
@@ -297,14 +297,14 @@ public:
virtual bool isEmpty() const { return mParameter == 0; }
/** Read extra arguments from given string. */
- virtual void argsFromString(const QString argsStr);
+ virtual void argsFromString(const TQString argsStr);
/** Return extra arguments as string. Must not contain newlines. */
- virtual const QString argsAsString() const;
+ virtual const TQString argsAsString() const;
/** Returns a translated string describing this filter for visualization
purposes, e.g. in the filter log. */
- virtual const QString displayString() const;
+ virtual const TQString displayString() const;
protected:
uint mParameter;
@@ -319,7 +319,7 @@ protected:
/** Abstract base class for KMail's filter actions that need a
parameter which can be chosen from a fixed set, e.g. 'set
- identity'. Can create a QComboBox as parameter widget. A
+ identity'. Can create a TQComboBox as parameter widget. A
subclass of this must provide at least implementations for the
following methods:
@@ -327,7 +327,7 @@ protected:
@li static KMFilterAction::newAction
Additionally, it's constructor should populate the
- QStringList @p mParameterList with the valid parameter
+ TQStringList @p mParameterList with the valid parameter
strings. The combobox will then contain be populated automatically
with those strings. The default string will be the first one.
@@ -341,30 +341,30 @@ class KMFilterActionWithStringList : public KMFilterActionWithString
public:
/** Initialize filter action with (english) name @p aName. This is
the name under which this action is known in the config file. */
- KMFilterActionWithStringList(const char* aName, const QString aLabel);
+ KMFilterActionWithStringList(const char* aName, const TQString aLabel);
/** Creates a widget for setting the filter action parameter. Also
sets the value of the widget. */
- virtual QWidget* createParamWidget(QWidget* parent) const;
+ virtual TQWidget* createParamWidget(TQWidget* parent) const;
/** The filter action shall set it's parameter from the widget's
contents. It is allowed that the value is read by the action
before this function is called. */
- virtual void applyParamWidgetValue(QWidget* paramWidget);
+ virtual void applyParamWidgetValue(TQWidget* paramWidget);
/** The filter action shall set it's widget's contents from it's
parameter. */
- virtual void setParamWidgetValue(QWidget* paramWidget) const;
+ virtual void setParamWidgetValue(TQWidget* paramWidget) const;
/** The filter action shall clear it's parameter widget's
contents. */
- virtual void clearParamWidget(QWidget* paramWidget) const;
+ virtual void clearParamWidget(TQWidget* paramWidget) const;
/** Read extra arguments from given string. */
- virtual void argsFromString(const QString argsStr);
+ virtual void argsFromString(const TQString argsStr);
protected:
- QStringList mParameterList;
+ TQStringList mParameterList;
};
@@ -377,7 +377,7 @@ protected:
/** Abstract base class for KMail's filter actions that need a
mail folder as parameter, e.g. 'move into folder'. Can
- create a QComboBox as parameter widget. A subclass of this
+ create a TQComboBox as parameter widget. A subclass of this
must provide at least implementations for the following methods:
@li virtual KMFilterAction::ReturnCodes KMFilterAction::process
@@ -394,7 +394,7 @@ class KMFilterActionWithFolder : public KMFilterAction
public:
/** Initialize filter action with (english) name @p aName. This is
the name under which this action is known in the config file. */
- KMFilterActionWithFolder(const char* aName, const QString aLabel);
+ KMFilterActionWithFolder(const char* aName, const TQString aLabel);
/** Determines whether this action is valid. But this is just a
quick test. Eg., actions that have a mail address as parameter
@@ -404,30 +404,30 @@ public:
/** Creates a widget for setting the filter action parameter. Also
sets the value of the widget. */
- virtual QWidget* createParamWidget(QWidget* parent) const;
+ virtual TQWidget* createParamWidget(TQWidget* parent) const;
/** The filter action shall set it's parameter from the widget's
contents. It is allowed that the value is read by the action
before this function is called. */
- virtual void applyParamWidgetValue(QWidget* paramWidget);
+ virtual void applyParamWidgetValue(TQWidget* paramWidget);
/** The filter action shall set it's widget's contents from it's
parameter. */
- virtual void setParamWidgetValue(QWidget* paramWidget) const;
+ virtual void setParamWidgetValue(TQWidget* paramWidget) const;
/** The filter action shall clear it's parameter widget's
contents. */
- virtual void clearParamWidget(QWidget* paramWidget) const;
+ virtual void clearParamWidget(TQWidget* paramWidget) const;
/** Read extra arguments from given string. */
- virtual void argsFromString(const QString argsStr);
+ virtual void argsFromString(const TQString argsStr);
/** Return extra arguments as string. Must not contain newlines. */
- virtual const QString argsAsString() const;
+ virtual const TQString argsAsString() const;
/** Returns a translated string describing this filter for visualization
purposes, e.g. in the filter log. */
- virtual const QString displayString() const;
+ virtual const TQString displayString() const;
/** Called from the filter when a folder is removed. Tests if the
folder @p aFolder is used and changes to @p aNewFolder in this
@@ -435,8 +435,8 @@ public:
virtual bool folderRemoved(KMFolder* aFolder, KMFolder* aNewFolder);
protected:
- QGuardedPtr<KMFolder> mFolder;
- QString mFolderName;
+ TQGuardedPtr<KMFolder> mFolder;
+ TQString mFolderName;
};
//=========================================================
@@ -448,7 +448,7 @@ protected:
/** Abstract base class for KMail's filter actions that need a mail
address as parameter, e.g. 'forward to'. Can create a
- QComboBox (capable of completion from the address book) as
+ TQComboBox (capable of completion from the address book) as
parameter widget. A subclass of this must provide at least
implementations for the following methods:
@@ -465,24 +465,24 @@ class KMFilterActionWithAddress : public KMFilterActionWithString
public:
/** Initialize filter action with (english) name @p aName. This is
the name under which this action is known in the config file. */
- KMFilterActionWithAddress(const char* aName, const QString aLabel);
+ KMFilterActionWithAddress(const char* aName, const TQString aLabel);
/** Creates a widget for setting the filter action parameter. Also
sets the value of the widget. */
- virtual QWidget* createParamWidget(QWidget* parent) const;
+ virtual TQWidget* createParamWidget(TQWidget* parent) const;
/** The filter action shall set it's parameter from the widget's
contents. It is allowed that the value is read by the action
before this function is called. */
- virtual void applyParamWidgetValue(QWidget* paramWidget);
+ virtual void applyParamWidgetValue(TQWidget* paramWidget);
/** The filter action shall set it's widget's contents from it's
parameter. */
- virtual void setParamWidgetValue(QWidget* paramWidget) const;
+ virtual void setParamWidgetValue(TQWidget* paramWidget) const;
/** The filter action shall clear it's parameter widget's
contents. */
- virtual void clearParamWidget(QWidget* paramWidget) const;
+ virtual void clearParamWidget(TQWidget* paramWidget) const;
};
//=========================================================
@@ -516,7 +516,7 @@ class KMFilterActionWithUrl : public KMFilterAction
public:
/** Initialize filter action with (english) name @p aName. This is
the name under which this action is known in the config file. */
- KMFilterActionWithUrl(const char* aName, const QString aLabel);
+ KMFilterActionWithUrl(const char* aName, const TQString aLabel);
~KMFilterActionWithUrl();
/** Determines whether this action is valid. But this is just a
quick test. Eg., actions that have a mail address as parameter
@@ -526,33 +526,33 @@ public:
/** Creates a widget for setting the filter action parameter. Also
sets the value of the widget. */
- virtual QWidget* createParamWidget(QWidget* parent) const;
+ virtual TQWidget* createParamWidget(TQWidget* parent) const;
/** The filter action shall set it's parameter from the widget's
contents. It is allowed that the value is read by the action
before this function is called. */
- virtual void applyParamWidgetValue(QWidget* paramWidget);
+ virtual void applyParamWidgetValue(TQWidget* paramWidget);
/** The filter action shall set it's widget's contents from it's
parameter. */
- virtual void setParamWidgetValue(QWidget* paramWidget) const;
+ virtual void setParamWidgetValue(TQWidget* paramWidget) const;
/** The filter action shall clear it's parameter widget's
contents. */
- virtual void clearParamWidget(QWidget* paramWidget) const;
+ virtual void clearParamWidget(TQWidget* paramWidget) const;
/** Read extra arguments from given string. */
- virtual void argsFromString(const QString argsStr);
+ virtual void argsFromString(const TQString argsStr);
/** Return extra arguments as string. Must not contain newlines. */
- virtual const QString argsAsString() const;
+ virtual const TQString argsAsString() const;
/** Returns a translated string describing this filter for visualization
purposes, e.g. in the filter log. */
- virtual const QString displayString() const;
+ virtual const TQString displayString() const;
protected:
- QString mParameter;
+ TQString mParameter;
};
@@ -561,31 +561,31 @@ class KMFilterActionWithCommand : public KMFilterActionWithUrl
public:
/** Initialize filter action with (english) name @p aName. This is
the name under which this action is known in the config file. */
- KMFilterActionWithCommand(const char* aName, const QString aLabel);
+ KMFilterActionWithCommand(const char* aName, const TQString aLabel);
/** Creates a widget for setting the filter action parameter. Also
sets the value of the widget. */
- virtual QWidget* createParamWidget(QWidget* parent) const;
+ virtual TQWidget* createParamWidget(TQWidget* parent) const;
/** The filter action shall set it's parameter from the widget's
contents. It is allowed that the value is read by the action
before this function is called. */
- virtual void applyParamWidgetValue(QWidget* paramWidget);
+ virtual void applyParamWidgetValue(TQWidget* paramWidget);
/** The filter action shall set it's widget's contents from it's
parameter. */
- virtual void setParamWidgetValue(QWidget* paramWidget) const;
+ virtual void setParamWidgetValue(TQWidget* paramWidget) const;
/** The filter action shall clear it's parameter widget's
contents. */
- virtual void clearParamWidget(QWidget* paramWidget) const;
+ virtual void clearParamWidget(TQWidget* paramWidget) const;
/** Substitutes various placeholders for data from the message
resp. for filenames containing that data. Currently, only %n is
supported, where n in an integer >= 0. %n gets substituted for
the name of a tempfile holding the n'th message part, with n=0
meaning the body of the message. */
- virtual QString substituteCommandLineArgsFor( KMMessage *aMsg, QPtrList<KTempFile> & aTempFileList ) const;
+ virtual TQString substituteCommandLineArgsFor( KMMessage *aMsg, TQPtrList<KTempFile> & aTempFileList ) const;
virtual ReturnCode genericProcess( KMMessage * aMsg, bool filtering ) const;
};
@@ -597,7 +597,7 @@ class KMFilterActionWithTest : public KMFilterAction
public:
/** Initialize filter action with (english) name @p aName. This is
the name under which this action is known in the config file. */
- KMFilterActionWithTest(const char* aName, const QString aLabel);
+ KMFilterActionWithTest(const char* aName, const TQString aLabel);
~KMFilterActionWithTest();
/** Determines whether this action is valid. But this is just a
quick test. Eg., actions that have a mail address as parameter
@@ -607,33 +607,33 @@ public:
/** Creates a widget for setting the filter action parameter. Also
sets the value of the widget. */
- virtual QWidget* createParamWidget(QWidget* parent) const;
+ virtual TQWidget* createParamWidget(TQWidget* parent) const;
/** The filter action shall set it's parameter from the widget's
contents. It is allowed that the value is read by the action
before this function is called. */
- virtual void applyParamWidgetValue(QWidget* paramWidget);
+ virtual void applyParamWidgetValue(TQWidget* paramWidget);
/** The filter action shall set it's widget's contents from it's
parameter. */
- virtual void setParamWidgetValue(QWidget* paramWidget) const;
+ virtual void setParamWidgetValue(TQWidget* paramWidget) const;
/** The filter action shall clear it's parameter widget's
contents. */
- virtual void clearParamWidget(QWidget* paramWidget) const;
+ virtual void clearParamWidget(TQWidget* paramWidget) const;
/** Read extra arguments from given string. */
- virtual void argsFromString(const QString argsStr);
+ virtual void argsFromString(const TQString argsStr);
/** Return extra arguments as string. Must not contain newlines. */
- virtual const QString argsAsString() const;
+ virtual const TQString argsAsString() const;
/** Returns a translated string describing this filter for visualization
purposes, e.g. in the filter log. */
- virtual const QString displayString() const;
+ virtual const TQString displayString() const;
protected:
- QString mParameter;
+ TQString mParameter;
};
@@ -644,7 +644,7 @@ typedef KMFilterAction* (*KMFilterActionNewFunc)(void);
/** Auxiliary struct to KMFilterActionDict. */
struct KMFilterActionDesc
{
- QString label, name;
+ TQString label, name;
KMFilterActionNewFunc create;
};
@@ -670,23 +670,23 @@ struct KMFilterActionDesc
@see KMFilterAction KMFilterActionDesc KMFilter
*/
-class KMFilterActionDict: public QDict<KMFilterActionDesc>
+class KMFilterActionDict: public TQDict<KMFilterActionDesc>
{
public:
KMFilterActionDict();
/** Overloaded member function, provided for convenience. Thin
- wrapper around QDict::insert and QPtrList::insert.
+ wrapper around TQDict::insert and TQPtrList::insert.
Inserts the resulting KMFilterActionDesc
thrice: First with the name, then with the label as key into the
- QDict, then into the QPtrList. For that, it creates an
+ TQDict, then into the TQPtrList. For that, it creates an
instance of the action internally and deletes it again after
querying it for name and label. */
void insert(KMFilterActionNewFunc aNewFunc);
/** Provides read-only access to a list of all known filter
actions. */
- const QPtrList<KMFilterActionDesc>& list() const { return mList; }
+ const TQPtrList<KMFilterActionDesc>& list() const { return mList; }
protected:
/** Populate the dictionary with all known KMFilterAction
@@ -694,7 +694,7 @@ protected:
virtual void init(void);
private:
- QPtrList<KMFilterActionDesc> mList;
+ TQPtrList<KMFilterActionDesc> mList;
};
#endif /*kmfilteraction_h*/
diff --git a/kmail/kmfilterdlg.cpp b/kmail/kmfilterdlg.cpp
index 29bbe037a..c5589c943 100644
--- a/kmail/kmfilterdlg.cpp
+++ b/kmail/kmfilterdlg.cpp
@@ -31,16 +31,16 @@ using KMail::FilterImporterExporter;
#include <kpushbutton.h>
// other Qt headers:
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qcombobox.h>
-#include <qwidgetstack.h>
-#include <qtooltip.h>
-#include <qwhatsthis.h>
-#include <qcheckbox.h>
-#include <qhbox.h>
-#include <qvalidator.h>
-#include <qtabwidget.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqcombobox.h>
+#include <tqwidgetstack.h>
+#include <tqtooltip.h>
+#include <tqwhatsthis.h>
+#include <tqcheckbox.h>
+#include <tqhbox.h>
+#include <tqvalidator.h>
+#include <tqtabwidget.h>
// other headers:
#include <assert.h>
@@ -124,7 +124,7 @@ const char * KMPopFilterDlgHelpAnchor = "popfilters-id" ;
//
//=============================================================================
-KMFilterDlg::KMFilterDlg(QWidget* parent, const char* name, bool popFilter, bool createDummyFilter )
+KMFilterDlg::KMFilterDlg(TQWidget* parent, const char* name, bool popFilter, bool createDummyFilter )
: KDialogBase( parent, name, false /* modality */,
(popFilter)? i18n("POP3 Filter Rules"): i18n("Filter Rules") /* caption*/,
Help|Ok|Apply|Cancel|User1|User2 /* button mask */,
@@ -135,37 +135,37 @@ KMFilterDlg::KMFilterDlg(QWidget* parent, const char* name, bool popFilter, bool
setHelp( (bPopFilter)? KMPopFilterDlgHelpAnchor: KMFilterDlgHelpAnchor );
setButtonText( User1, i18n("Import") );
setButtonText( User2, i18n("Export") );
- connect( this, SIGNAL(user1Clicked()),
- this, SLOT( slotImportFilters()) );
- connect( this, SIGNAL(user2Clicked()),
- this, SLOT( slotExportFilters()) );
+ connect( this, TQT_SIGNAL(user1Clicked()),
+ this, TQT_SLOT( slotImportFilters()) );
+ connect( this, TQT_SIGNAL(user2Clicked()),
+ this, TQT_SLOT( slotExportFilters()) );
- QWidget *w = new QWidget( this );
+ TQWidget *w = new TQWidget( this );
setMainWidget( w );
- QHBoxLayout *topLayout = new QHBoxLayout( w, 0, spacingHint(), "topLayout" );
- QHBoxLayout *hbl = topLayout;
- QVBoxLayout *vbl2 = 0;
- QWidget *page1 = 0;
- QWidget *page2 = 0;
+ TQHBoxLayout *topLayout = new TQHBoxLayout( w, 0, spacingHint(), "topLayout" );
+ TQHBoxLayout *hbl = topLayout;
+ TQVBoxLayout *vbl2 = 0;
+ TQWidget *page1 = 0;
+ TQWidget *page2 = 0;
mFilterList = new KMFilterListBox( i18n("Available Filters"), w, 0, bPopFilter);
topLayout->addWidget( mFilterList, 1 /*stretch*/ );
if(!bPopFilter) {
- QTabWidget *tabWidget = new QTabWidget( w, "kmfd_tab" );
+ TQTabWidget *tabWidget = new TQTabWidget( w, "kmfd_tab" );
tabWidget->setMargin( KDialog::marginHint() );
topLayout->addWidget( tabWidget );
- page1 = new QWidget( tabWidget );
+ page1 = new TQWidget( tabWidget );
tabWidget->addTab( page1, i18n("&General") );
- hbl = new QHBoxLayout( page1, 0, spacingHint(), "kmfd_hbl" );
+ hbl = new TQHBoxLayout( page1, 0, spacingHint(), "kmfd_hbl" );
- page2 = new QWidget( tabWidget );
+ page2 = new TQWidget( tabWidget );
tabWidget->addTab( page2, i18n("A&dvanced") );
- vbl2 = new QVBoxLayout( page2, 0, spacingHint(), "kmfd_vbl2" );
+ vbl2 = new TQVBoxLayout( page2, 0, spacingHint(), "kmfd_vbl2" );
}
- QVBoxLayout *vbl = new QVBoxLayout( hbl, spacingHint(), "kmfd_vbl" );
+ TQVBoxLayout *vbl = new TQVBoxLayout( hbl, spacingHint(), "kmfd_vbl" );
hbl->setStretchFactor( vbl, 2 );
mPatternEdit = new KMSearchPatternEdit( i18n("Filter Criteria"), bPopFilter ? w : page1 , "spe", bPopFilter);
@@ -175,36 +175,36 @@ KMFilterDlg::KMFilterDlg(QWidget* parent, const char* name, bool popFilter, bool
mActionGroup = new KMPopFilterActionWidget( i18n("Filter Action"), w );
vbl->addWidget( mActionGroup, 0, Qt::AlignTop );
- mGlobalsBox = new QVGroupBox(i18n("Global Options"), w);
- mShowLaterBtn = new QCheckBox(i18n("Always &show matched 'Download Later' messages in confirmation dialog"), mGlobalsBox);
- QWhatsThis::add( mShowLaterBtn, i18n(_wt_filterdlg_showLater) );
+ mGlobalsBox = new TQVGroupBox(i18n("Global Options"), w);
+ mShowLaterBtn = new TQCheckBox(i18n("Always &show matched 'Download Later' messages in confirmation dialog"), mGlobalsBox);
+ TQWhatsThis::add( mShowLaterBtn, i18n(_wt_filterdlg_showLater) );
vbl->addWidget( mGlobalsBox, 0, Qt::AlignTop );
}
else {
- QGroupBox *agb = new QGroupBox( 1 /*column*/, Vertical, i18n("Filter Actions"), page1 );
+ TQGroupBox *agb = new TQGroupBox( 1 /*column*/, Vertical, i18n("Filter Actions"), page1 );
mActionLister = new KMFilterActionWidgetLister( agb );
vbl->addWidget( agb, 0, Qt::AlignTop );
- mAdvOptsGroup = new QGroupBox ( 1 /*columns*/, Vertical,
+ mAdvOptsGroup = new TQGroupBox ( 1 /*columns*/, Vertical,
i18n("Advanced Options"), page2);
{
- QWidget *adv_w = new QWidget( mAdvOptsGroup );
- QGridLayout *gl = new QGridLayout( adv_w, 8 /*rows*/, 3 /*cols*/,
+ TQWidget *adv_w = new TQWidget( mAdvOptsGroup );
+ TQGridLayout *gl = new TQGridLayout( adv_w, 8 /*rows*/, 3 /*cols*/,
0 /*border*/, spacingHint() );
- QVBoxLayout *vbl3 = new QVBoxLayout( gl, spacingHint(), "vbl3" );
+ TQVBoxLayout *vbl3 = new TQVBoxLayout( gl, spacingHint(), "vbl3" );
vbl3->addStretch( 1 );
- mApplyOnIn = new QCheckBox( i18n("Apply this filter to incoming messages:"), adv_w );
+ mApplyOnIn = new TQCheckBox( i18n("Apply this filter to incoming messages:"), adv_w );
vbl3->addWidget( mApplyOnIn );
- QButtonGroup *bg = new QButtonGroup( 0, "bg" );
+ TQButtonGroup *bg = new TQButtonGroup( 0, "bg" );
bg->setExclusive( true );
- mApplyOnForAll = new QRadioButton( i18n("from all accounts"), adv_w );
+ mApplyOnForAll = new TQRadioButton( i18n("from all accounts"), adv_w );
bg->insert( mApplyOnForAll );
vbl3->addWidget( mApplyOnForAll );
- mApplyOnForTraditional = new QRadioButton( i18n("from all but online IMAP accounts"), adv_w );
+ mApplyOnForTraditional = new TQRadioButton( i18n("from all but online IMAP accounts"), adv_w );
bg->insert( mApplyOnForTraditional );
vbl3->addWidget( mApplyOnForTraditional );
- mApplyOnForChecked = new QRadioButton( i18n("from checked accounts only"), adv_w );
+ mApplyOnForChecked = new TQRadioButton( i18n("from checked accounts only"), adv_w );
bg->insert( mApplyOnForChecked );
vbl3->addWidget( mApplyOnForChecked );
vbl3->addStretch( 2 );
@@ -213,34 +213,34 @@ KMFilterDlg::KMFilterDlg(QWidget* parent, const char* name, bool popFilter, bool
mAccountList->addColumn( i18n("Account Name") );
mAccountList->addColumn( i18n("Type") );
mAccountList->setAllColumnsShowFocus( true );
- mAccountList->setFrameStyle( QFrame::WinPanel + QFrame::Sunken );
+ mAccountList->setFrameStyle( TQFrame::WinPanel + TQFrame::Sunken );
mAccountList->setSorting( -1 );
gl->addMultiCellWidget( mAccountList, 0, 3, 1, 3 );
- mApplyOnOut = new QCheckBox( i18n("Apply this filter to &sent messages"), adv_w );
+ mApplyOnOut = new TQCheckBox( i18n("Apply this filter to &sent messages"), adv_w );
gl->addMultiCellWidget( mApplyOnOut, 4, 4, 0, 3 );
- mApplyOnCtrlJ = new QCheckBox( i18n("Apply this filter on manual &filtering"), adv_w );
+ mApplyOnCtrlJ = new TQCheckBox( i18n("Apply this filter on manual &filtering"), adv_w );
gl->addMultiCellWidget( mApplyOnCtrlJ, 5, 5, 0, 3 );
- mStopProcessingHere = new QCheckBox( i18n("If this filter &matches, stop processing here"), adv_w );
+ mStopProcessingHere = new TQCheckBox( i18n("If this filter &matches, stop processing here"), adv_w );
gl->addMultiCellWidget( mStopProcessingHere,
6, 6, /*from to row*/
0, 3 /*from to col*/ );
- mConfigureShortcut = new QCheckBox( i18n("Add this filter to the Apply Filter menu"), adv_w );
+ mConfigureShortcut = new TQCheckBox( i18n("Add this filter to the Apply Filter menu"), adv_w );
gl->addMultiCellWidget( mConfigureShortcut, 7, 7, 0, 1 );
- QLabel *keyButtonLabel = new QLabel( i18n( "Shortcut:" ), adv_w );
+ TQLabel *keyButtonLabel = new TQLabel( i18n( "Shortcut:" ), adv_w );
keyButtonLabel->setAlignment( AlignVCenter | AlignRight );
gl->addMultiCellWidget( keyButtonLabel, 7, 7, 2, 2 );
mKeyButton = new KKeyButton( adv_w, "FilterShortcutSelector" );
gl->addMultiCellWidget( mKeyButton, 7, 7, 3, 3 );
mKeyButton->setEnabled( false );
- mConfigureToolbar = new QCheckBox( i18n("Additionally add this filter to the toolbar"), adv_w );
+ mConfigureToolbar = new TQCheckBox( i18n("Additionally add this filter to the toolbar"), adv_w );
gl->addMultiCellWidget( mConfigureToolbar, 8, 8, 0, 3 );
mConfigureToolbar->setEnabled( false );
- QHBox *hbox = new QHBox( adv_w );
- mFilterActionLabel = new QLabel( i18n( "Icon for this filter:" ),
+ TQHBox *hbox = new TQHBox( adv_w );
+ mFilterActionLabel = new TQLabel( i18n( "Icon for this filter:" ),
hbox );
mFilterActionLabel->setEnabled( false );
@@ -259,81 +259,81 @@ KMFilterDlg::KMFilterDlg(QWidget* parent, const char* name, bool popFilter, bool
vbl->addStretch( 1 );
// load the filter parts into the edit widgets
- connect( mFilterList, SIGNAL(filterSelected(KMFilter*)),
- this, SLOT(slotFilterSelected(KMFilter*)) );
+ connect( mFilterList, TQT_SIGNAL(filterSelected(KMFilter*)),
+ this, TQT_SLOT(slotFilterSelected(KMFilter*)) );
if (bPopFilter){
// set the state of the global setting 'show later msgs'
- connect( mShowLaterBtn, SIGNAL(toggled(bool)),
- mFilterList, SLOT(slotShowLaterToggled(bool)));
+ connect( mShowLaterBtn, TQT_SIGNAL(toggled(bool)),
+ mFilterList, TQT_SLOT(slotShowLaterToggled(bool)));
// set the action in the filter when changed
- connect( mActionGroup, SIGNAL(actionChanged(const KMPopFilterAction)),
- this, SLOT(slotActionChanged(const KMPopFilterAction)) );
+ connect( mActionGroup, TQT_SIGNAL(actionChanged(const KMPopFilterAction)),
+ this, TQT_SLOT(slotActionChanged(const KMPopFilterAction)) );
} else {
// transfer changes from the 'Apply this filter on...'
// combo box to the filter
- connect( mApplyOnIn, SIGNAL(clicked()),
- this, SLOT(slotApplicabilityChanged()) );
- connect( mApplyOnForAll, SIGNAL(clicked()),
- this, SLOT(slotApplicabilityChanged()) );
- connect( mApplyOnForTraditional, SIGNAL(clicked()),
- this, SLOT(slotApplicabilityChanged()) );
- connect( mApplyOnForChecked, SIGNAL(clicked()),
- this, SLOT(slotApplicabilityChanged()) );
- connect( mApplyOnOut, SIGNAL(clicked()),
- this, SLOT(slotApplicabilityChanged()) );
- connect( mApplyOnCtrlJ, SIGNAL(clicked()),
- this, SLOT(slotApplicabilityChanged()) );
- connect( mAccountList, SIGNAL(clicked(QListViewItem*)),
- this, SLOT(slotApplicableAccountsChanged()) );
- connect( mAccountList, SIGNAL(spacePressed(QListViewItem*)),
- this, SLOT(slotApplicableAccountsChanged()) );
+ connect( mApplyOnIn, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotApplicabilityChanged()) );
+ connect( mApplyOnForAll, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotApplicabilityChanged()) );
+ connect( mApplyOnForTraditional, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotApplicabilityChanged()) );
+ connect( mApplyOnForChecked, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotApplicabilityChanged()) );
+ connect( mApplyOnOut, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotApplicabilityChanged()) );
+ connect( mApplyOnCtrlJ, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotApplicabilityChanged()) );
+ connect( mAccountList, TQT_SIGNAL(clicked(TQListViewItem*)),
+ this, TQT_SLOT(slotApplicableAccountsChanged()) );
+ connect( mAccountList, TQT_SIGNAL(spacePressed(TQListViewItem*)),
+ this, TQT_SLOT(slotApplicableAccountsChanged()) );
// transfer changes from the 'stop processing here'
// check box to the filter
- connect( mStopProcessingHere, SIGNAL(toggled(bool)),
- this, SLOT(slotStopProcessingButtonToggled(bool)) );
+ connect( mStopProcessingHere, TQT_SIGNAL(toggled(bool)),
+ this, TQT_SLOT(slotStopProcessingButtonToggled(bool)) );
- connect( mConfigureShortcut, SIGNAL(toggled(bool)),
- this, SLOT(slotConfigureShortcutButtonToggled(bool)) );
+ connect( mConfigureShortcut, TQT_SIGNAL(toggled(bool)),
+ this, TQT_SLOT(slotConfigureShortcutButtonToggled(bool)) );
- connect( mKeyButton, SIGNAL( capturedShortcut( const KShortcut& ) ),
- this, SLOT( slotCapturedShortcutChanged( const KShortcut& ) ) );
+ connect( mKeyButton, TQT_SIGNAL( capturedShortcut( const KShortcut& ) ),
+ this, TQT_SLOT( slotCapturedShortcutChanged( const KShortcut& ) ) );
- connect( mConfigureToolbar, SIGNAL(toggled(bool)),
- this, SLOT(slotConfigureToolbarButtonToggled(bool)) );
+ connect( mConfigureToolbar, TQT_SIGNAL(toggled(bool)),
+ this, TQT_SLOT(slotConfigureToolbarButtonToggled(bool)) );
- connect( mFilterActionIconButton, SIGNAL( iconChanged( QString ) ),
- this, SLOT( slotFilterActionIconChanged( QString ) ) );
+ connect( mFilterActionIconButton, TQT_SIGNAL( iconChanged( TQString ) ),
+ this, TQT_SLOT( slotFilterActionIconChanged( TQString ) ) );
}
// reset all widgets here
- connect( mFilterList, SIGNAL(resetWidgets()),
- this, SLOT(slotReset()) );
+ connect( mFilterList, TQT_SIGNAL(resetWidgets()),
+ this, TQT_SLOT(slotReset()) );
- connect( mFilterList, SIGNAL( applyWidgets() ),
- this, SLOT( slotUpdateFilter() ) );
+ connect( mFilterList, TQT_SIGNAL( applyWidgets() ),
+ this, TQT_SLOT( slotUpdateFilter() ) );
// support auto-naming the filter
- connect( mPatternEdit, SIGNAL(maybeNameChanged()),
- mFilterList, SLOT(slotUpdateFilterName()) );
+ connect( mPatternEdit, TQT_SIGNAL(maybeNameChanged()),
+ mFilterList, TQT_SLOT(slotUpdateFilterName()) );
// apply changes on 'Apply'
- connect( this, SIGNAL(applyClicked()),
- mFilterList, SLOT(slotApplyFilterChanges()) );
+ connect( this, TQT_SIGNAL(applyClicked()),
+ mFilterList, TQT_SLOT(slotApplyFilterChanges()) );
// apply changes on 'OK'
- connect( this, SIGNAL(okClicked()),
- mFilterList, SLOT(slotApplyFilterChanges()) );
+ connect( this, TQT_SIGNAL(okClicked()),
+ mFilterList, TQT_SLOT(slotApplyFilterChanges()) );
// save dialog size on 'OK'
- connect( this, SIGNAL(okClicked()),
- this, SLOT(slotSaveSize()) );
+ connect( this, TQT_SIGNAL(okClicked()),
+ this, TQT_SLOT(slotSaveSize()) );
// destruct the dialog on OK, close and Cancel
- connect( this, SIGNAL(finished()),
- this, SLOT(slotFinished()) );
+ connect( this, TQT_SIGNAL(finished()),
+ this, TQT_SLOT(slotFinished()) );
KConfigGroup geometry( KMKernel::config(), "Geometry");
const char * configKey
@@ -398,7 +398,7 @@ void KMFilterDlg::slotFilterSelected( KMFilter* aFilter )
const bool stopHere = aFilter->stopProcessingHere();
const bool configureShortcut = aFilter->configureShortcut();
const bool configureToolbar = aFilter->configureToolbar();
- const QString icon = aFilter->icon();
+ const TQString icon = aFilter->icon();
const KShortcut shortcut( aFilter->shortcut() );
mApplyOnIn->setChecked( applyOnIn );
@@ -462,9 +462,9 @@ void KMFilterDlg::slotApplicabilityChanged()
mAccountList->setEnabled( mApplyOnForChecked->isEnabled() && mApplyOnForChecked->isChecked() );
// Advanced tab functionality - Update list of accounts this filter applies to
- QListViewItemIterator it( mAccountList );
+ TQListViewItemIterator it( mAccountList );
while ( it.current() ) {
- QCheckListItem *item = dynamic_cast<QCheckListItem*>( it.current() );
+ TQCheckListItem *item = dynamic_cast<TQCheckListItem*>( it.current() );
if (item) {
int id = item->text( 2 ).toInt();
item->setOn( mFilter->applyOnAccount( id ) );
@@ -484,9 +484,9 @@ void KMFilterDlg::slotApplicableAccountsChanged()
{
if ( mFilter && mApplyOnForChecked->isEnabled() && mApplyOnForChecked->isChecked() ) {
// Advanced tab functionality - Update list of accounts this filter applies to
- QListViewItemIterator it( mAccountList );
+ TQListViewItemIterator it( mAccountList );
while ( it.current() ) {
- QCheckListItem *item = dynamic_cast<QCheckListItem*>( it.current() );
+ TQCheckListItem *item = dynamic_cast<TQCheckListItem*>( it.current() );
if (item) {
int id = item->text( 2 ).toInt();
mFilter->setApplyOnAccount( id, item->isOn() );
@@ -523,7 +523,7 @@ void KMFilterDlg::slotCapturedShortcutChanged( const KShortcut& sc )
if ( mySc.isNull() || mySc.toString().isEmpty() )
mySc.clear();
if ( !mySc.isNull() && !( kmkernel->getKMMainWidget()->shortcutIsValid( mySc ) ) ) {
- QString msg( i18n( "The selected shortcut is already used, "
+ TQString msg( i18n( "The selected shortcut is already used, "
"please select a different one." ) );
KMessageBox::sorry( this, msg );
} else {
@@ -539,7 +539,7 @@ void KMFilterDlg::slotConfigureToolbarButtonToggled( bool aChecked )
mFilter->setConfigureToolbar( aChecked );
}
-void KMFilterDlg::slotFilterActionIconChanged( QString icon )
+void KMFilterDlg::slotFilterActionIconChanged( TQString icon )
{
if ( mFilter )
mFilter->setIcon( icon );
@@ -548,19 +548,19 @@ void KMFilterDlg::slotFilterActionIconChanged( QString icon )
void KMFilterDlg::slotUpdateAccountList()
{
mAccountList->clear();
- QListViewItem *top = 0;
+ TQListViewItem *top = 0;
for( KMAccount *a = kmkernel->acctMgr()->first(); a!=0;
a = kmkernel->acctMgr()->next() ) {
- QCheckListItem *listItem =
- new QCheckListItem( mAccountList, top, a->name(), QCheckListItem::CheckBox );
+ TQCheckListItem *listItem =
+ new TQCheckListItem( mAccountList, top, a->name(), TQCheckListItem::CheckBox );
listItem->setText( 1, a->type() );
- listItem->setText( 2, QString( "%1" ).arg( a->id() ) );
+ listItem->setText( 2, TQString( "%1" ).arg( a->id() ) );
if ( mFilter )
listItem->setOn( mFilter->applyOnAccount( a->id() ) );
top = listItem;
}
- QListViewItem *listItem = mAccountList->firstChild();
+ TQListViewItem *listItem = mAccountList->firstChild();
if ( listItem ) {
mAccountList->setCurrentItem( listItem );
mAccountList->setSelected( listItem, true );
@@ -573,89 +573,89 @@ void KMFilterDlg::slotUpdateAccountList()
//
//=============================================================================
-KMFilterListBox::KMFilterListBox( const QString & title, QWidget *parent, const char* name, bool popFilter )
- : QGroupBox( 1, Horizontal, title, parent, name ),
+KMFilterListBox::KMFilterListBox( const TQString & title, TQWidget *parent, const char* name, bool popFilter )
+ : TQGroupBox( 1, Horizontal, title, parent, name ),
bPopFilter(popFilter)
{
mFilterList.setAutoDelete( true );
mIdxSelItem = -1;
//----------- the list box
- mListBox = new QListBox(this);
+ mListBox = new TQListBox(this);
mListBox->setMinimumWidth(150);
- QWhatsThis::add( mListBox, i18n(_wt_filterlist) );
+ TQWhatsThis::add( mListBox, i18n(_wt_filterlist) );
//----------- the first row of buttons
- QHBox *hb = new QHBox(this);
+ TQHBox *hb = new TQHBox(this);
hb->setSpacing(4);
- mBtnTop = new KPushButton( QString::null, hb );
+ mBtnTop = new KPushButton( TQString::null, hb );
mBtnTop->setAutoRepeat( true );
mBtnTop->setIconSet( BarIconSet( "top", KIcon::SizeSmall ) );
mBtnTop->setMinimumSize( mBtnTop->sizeHint() * 1.2 );
- mBtnUp = new KPushButton( QString::null, hb );
+ mBtnUp = new KPushButton( TQString::null, hb );
mBtnUp->setAutoRepeat( true );
mBtnUp->setIconSet( BarIconSet( "up", KIcon::SizeSmall ) );
mBtnUp->setMinimumSize( mBtnUp->sizeHint() * 1.2 );
- mBtnDown = new KPushButton( QString::null, hb );
+ mBtnDown = new KPushButton( TQString::null, hb );
mBtnDown->setAutoRepeat( true );
mBtnDown->setIconSet( BarIconSet( "down", KIcon::SizeSmall ) );
mBtnDown->setMinimumSize( mBtnDown->sizeHint() * 1.2 );
- mBtnBot = new KPushButton( QString::null, hb );
+ mBtnBot = new KPushButton( TQString::null, hb );
mBtnBot->setAutoRepeat( true );
mBtnBot->setIconSet( BarIconSet( "bottom", KIcon::SizeSmall ) );
mBtnBot->setMinimumSize( mBtnBot->sizeHint() * 1.2 );
- QToolTip::add( mBtnTop, i18n("Top") );
- QToolTip::add( mBtnUp, i18n("Up") );
- QToolTip::add( mBtnDown, i18n("Down") );
- QToolTip::add( mBtnBot, i18n("Bottom") );
- QWhatsThis::add( mBtnTop, i18n(_wt_filterlist_top) );
- QWhatsThis::add( mBtnUp, i18n(_wt_filterlist_up) );
- QWhatsThis::add( mBtnDown, i18n(_wt_filterlist_down) );
- QWhatsThis::add( mBtnBot, i18n(_wt_filterlist_bot) );
+ TQToolTip::add( mBtnTop, i18n("Top") );
+ TQToolTip::add( mBtnUp, i18n("Up") );
+ TQToolTip::add( mBtnDown, i18n("Down") );
+ TQToolTip::add( mBtnBot, i18n("Bottom") );
+ TQWhatsThis::add( mBtnTop, i18n(_wt_filterlist_top) );
+ TQWhatsThis::add( mBtnUp, i18n(_wt_filterlist_up) );
+ TQWhatsThis::add( mBtnDown, i18n(_wt_filterlist_down) );
+ TQWhatsThis::add( mBtnBot, i18n(_wt_filterlist_bot) );
//----------- the second row of buttons
- hb = new QHBox(this);
+ hb = new TQHBox(this);
hb->setSpacing(4);
- mBtnNew = new QPushButton( QString::null, hb );
+ mBtnNew = new TQPushButton( TQString::null, hb );
mBtnNew->setPixmap( BarIcon( "filenew", KIcon::SizeSmall ) );
mBtnNew->setMinimumSize( mBtnNew->sizeHint() * 1.2 );
- mBtnCopy = new QPushButton( QString::null, hb );
+ mBtnCopy = new TQPushButton( TQString::null, hb );
mBtnCopy->setIconSet( BarIconSet( "editcopy", KIcon::SizeSmall ) );
mBtnCopy->setMinimumSize( mBtnCopy->sizeHint() * 1.2 );
- mBtnDelete = new QPushButton( QString::null, hb );
+ mBtnDelete = new TQPushButton( TQString::null, hb );
mBtnDelete->setIconSet( BarIconSet( "editdelete", KIcon::SizeSmall ) );
mBtnDelete->setMinimumSize( mBtnDelete->sizeHint() * 1.2 );
- mBtnRename = new QPushButton( i18n("Rename..."), hb );
- QToolTip::add( mBtnNew, i18n("New") );
- QToolTip::add( mBtnCopy, i18n("Copy") );
- QToolTip::add( mBtnDelete, i18n("Delete"));
- QWhatsThis::add( mBtnNew, i18n(_wt_filterlist_new) );
- QWhatsThis::add( mBtnCopy, i18n(_wt_filterlist_copy) );
- QWhatsThis::add( mBtnDelete, i18n(_wt_filterlist_delete) );
- QWhatsThis::add( mBtnRename, i18n(_wt_filterlist_rename) );
+ mBtnRename = new TQPushButton( i18n("Rename..."), hb );
+ TQToolTip::add( mBtnNew, i18n("New") );
+ TQToolTip::add( mBtnCopy, i18n("Copy") );
+ TQToolTip::add( mBtnDelete, i18n("Delete"));
+ TQWhatsThis::add( mBtnNew, i18n(_wt_filterlist_new) );
+ TQWhatsThis::add( mBtnCopy, i18n(_wt_filterlist_copy) );
+ TQWhatsThis::add( mBtnDelete, i18n(_wt_filterlist_delete) );
+ TQWhatsThis::add( mBtnRename, i18n(_wt_filterlist_rename) );
//----------- now connect everything
- connect( mListBox, SIGNAL(highlighted(int)),
- this, SLOT(slotSelected(int)) );
- connect( mListBox, SIGNAL( doubleClicked ( QListBoxItem * )),
- this, SLOT( slotRename()) );
- connect( mBtnTop, SIGNAL(clicked()),
- this, SLOT(slotTop()) );
- connect( mBtnUp, SIGNAL(clicked()),
- this, SLOT(slotUp()) );
- connect( mBtnDown, SIGNAL(clicked()),
- this, SLOT(slotDown()) );
- connect( mBtnBot, SIGNAL(clicked()),
- this, SLOT(slotBottom()) );
- connect( mBtnNew, SIGNAL(clicked()),
- this, SLOT(slotNew()) );
- connect( mBtnCopy, SIGNAL(clicked()),
- this, SLOT(slotCopy()) );
- connect( mBtnDelete, SIGNAL(clicked()),
- this, SLOT(slotDelete()) );
- connect( mBtnRename, SIGNAL(clicked()),
- this, SLOT(slotRename()) );
+ connect( mListBox, TQT_SIGNAL(highlighted(int)),
+ this, TQT_SLOT(slotSelected(int)) );
+ connect( mListBox, TQT_SIGNAL( doubleClicked ( TQListBoxItem * )),
+ this, TQT_SLOT( slotRename()) );
+ connect( mBtnTop, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotTop()) );
+ connect( mBtnUp, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotUp()) );
+ connect( mBtnDown, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotDown()) );
+ connect( mBtnBot, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotBottom()) );
+ connect( mBtnNew, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotNew()) );
+ connect( mBtnCopy, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotCopy()) );
+ connect( mBtnDelete, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotDelete()) );
+ connect( mBtnRename, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotRename()) );
// the dialog should call loadFilterList()
// when all signals are connected.
@@ -663,14 +663,14 @@ KMFilterListBox::KMFilterListBox( const QString & title, QWidget *parent, const
}
-void KMFilterListBox::createFilter( const QCString & field,
- const QString & value )
+void KMFilterListBox::createFilter( const TQCString & field,
+ const TQString & value )
{
KMSearchRule *newRule = KMSearchRule::createInstance( field, KMSearchRule::FuncContains, value );
KMFilter *newFilter = new KMFilter(0, bPopFilter);
newFilter->pattern()->append( newRule );
- newFilter->pattern()->setName( QString("<%1>:%2").arg( field ).arg( value) );
+ newFilter->pattern()->setName( TQString("<%1>:%2").arg( field ).arg( value) );
KMFilterActionDesc *desc = (*kmkernel->filterActionDict())["transfer"];
if ( desc )
@@ -690,8 +690,8 @@ void KMFilterListBox::slotUpdateFilterName()
KMSearchPattern *p = mFilterList.at(mIdxSelItem)->pattern();
if ( !p ) return;
- QString shouldBeName = p->name();
- QString displayedName = mListBox->text( mIdxSelItem );
+ TQString shouldBeName = p->name();
+ TQString displayedName = mListBox->text( mIdxSelItem );
if ( shouldBeName.stripWhiteSpace().isEmpty() ) {
mFilterList.at(mIdxSelItem)->setAutoNaming( true );
@@ -700,7 +700,7 @@ void KMFilterListBox::slotUpdateFilterName()
if ( mFilterList.at(mIdxSelItem)->isAutoNaming() ) {
// auto-naming of patterns
if ( p->first() && !p->first()->field().stripWhiteSpace().isEmpty() )
- shouldBeName = QString( "<%1>: %2" ).arg( p->first()->field() ).arg( p->first()->contents() );
+ shouldBeName = TQString( "<%1>: %2" ).arg( p->first()->field() ).arg( p->first()->contents() );
else
shouldBeName = "<" + i18n("unnamed") + ">";
p->setName( shouldBeName );
@@ -734,28 +734,28 @@ void KMFilterListBox::slotApplyFilterChanges()
else
fm = kmkernel->filterMgr();
- QValueList<KMFilter*> newFilters = filtersForSaving();
+ TQValueList<KMFilter*> newFilters = filtersForSaving();
if (bPopFilter)
fm->setShowLaterMsgs(mShowLater);
fm->setFilters( newFilters );
if (fm->atLeastOneOnlineImapFolderTarget()) {
- QString str = i18n("At least one filter targets a folder on an online "
+ TQString str = i18n("At least one filter targets a folder on an online "
"IMAP account. Such filters will only be applied "
"when manually filtering and when filtering "
"incoming online IMAP mail.");
- KMessageBox::information( this, str, QString::null,
+ KMessageBox::information( this, str, TQString::null,
"filterDlgOnlineImapCheck" );
}
}
-QValueList<KMFilter*> KMFilterListBox::filtersForSaving() const
+TQValueList<KMFilter*> KMFilterListBox::filtersForSaving() const
{
const_cast<KMFilterListBox*>( this )->applyWidgets(); // signals aren't const
- QValueList<KMFilter*> filters;
- QStringList emptyFilters;
- QPtrListIterator<KMFilter> it( mFilterList );
+ TQValueList<KMFilter*> filters;
+ TQStringList emptyFilters;
+ TQPtrListIterator<KMFilter> it( mFilterList );
for ( it.toFirst() ; it.current() ; ++it ) {
KMFilter *f = new KMFilter( **it ); // deep copy
f->purify();
@@ -771,10 +771,10 @@ QValueList<KMFilter*> KMFilterListBox::filtersForSaving() const
// report on invalid filters:
if ( !emptyFilters.empty() ) {
- QString msg = i18n("The following filters have not been saved because they "
+ TQString msg = i18n("The following filters have not been saved because they "
"were invalid (e.g. containing no actions or no search "
"rules).");
- KMessageBox::informationList( 0, msg, emptyFilters, QString::null,
+ KMessageBox::informationList( 0, msg, emptyFilters, TQString::null,
"ShowInvalidFilterWarning" );
}
return filters;
@@ -783,7 +783,7 @@ QValueList<KMFilter*> KMFilterListBox::filtersForSaving() const
void KMFilterListBox::slotSelected( int aIdx )
{
mIdxSelItem = aIdx;
- // QPtrList::at(i) will return 0 if i is out of range.
+ // TQPtrList::at(i) will return 0 if i is out of range.
KMFilter *f = mFilterList.at(aIdx);
if ( f )
emit filterSelected( f );
@@ -929,8 +929,8 @@ void KMFilterListBox::slotRename()
assert( filter );
// allow empty names - those will turn auto-naming on again
- QValidator *validator = new QRegExpValidator( QRegExp( ".*" ), 0 );
- QString newName = KInputDialog::getText
+ TQValidator *validator = new TQRegExpValidator( TQRegExp( ".*" ), 0 );
+ TQString newName = KInputDialog::getText
(
i18n("Rename Filter"),
i18n("Rename filter \"%1\" to:\n(leave the field empty for automatic naming)")
@@ -998,7 +998,7 @@ void KMFilterListBox::loadFilterList( bool createDummyFilter )
}
Q_ASSERT( manager );
- QValueListConstIterator<KMFilter*> it;
+ TQValueListConstIterator<KMFilter*> it;
for ( it = manager->filters().constBegin() ; it != manager->filters().constEnd() ; ++it ) {
mFilterList.append( new KMFilter( **it ) ); // deep copy
mListBox->insertItem( (*it)->pattern()->name() );
@@ -1024,7 +1024,7 @@ void KMFilterListBox::insertFilter( KMFilter* aFilter )
// must be really a filter...
assert( aFilter );
- // if mIdxSelItem < 0, QListBox::insertItem will append.
+ // if mIdxSelItem < 0, TQListBox::insertItem will append.
mListBox->insertItem( aFilter->pattern()->name(), mIdxSelItem );
if ( mIdxSelItem < 0 ) {
// none selected -> append
@@ -1053,7 +1053,7 @@ void KMFilterListBox::swapNeighbouringFilters( int untouchedOne, int movedOne )
// untouchedOne is at idx. to move it down(up),
// remove item at idx+(-)1 w/o deleting it.
- QListBoxItem *item = mListBox->item( movedOne );
+ TQListBoxItem *item = mListBox->item( movedOne );
mListBox->takeItem( item );
// now selected item is at idx(idx-1), so
// insert the other item at idx, ie. above(below).
@@ -1067,7 +1067,7 @@ void KMFilterListBox::swapNeighbouringFilters( int untouchedOne, int movedOne )
void KMFilterListBox::swapFilters( int from, int to )
{
- QListBoxItem *item = mListBox->item( from );
+ TQListBoxItem *item = mListBox->item( from );
mListBox->takeItem( item );
mListBox->insertItem( item, to );
@@ -1085,20 +1085,20 @@ void KMFilterListBox::swapFilters( int from, int to )
//
//=============================================================================
-KMFilterActionWidget::KMFilterActionWidget( QWidget *parent, const char* name )
- : QHBox( parent, name )
+KMFilterActionWidget::KMFilterActionWidget( TQWidget *parent, const char* name )
+ : TQHBox( parent, name )
{
int i;
mActionList.setAutoDelete( true );
- mComboBox = new QComboBox( false , this );
+ mComboBox = new TQComboBox( false , this );
assert( mComboBox );
- mWidgetStack = new QWidgetStack(this);
+ mWidgetStack = new TQWidgetStack(this);
assert( mWidgetStack );
setSpacing( 4 );
- QPtrListIterator<KMFilterActionDesc> it ( kmkernel->filterActionDict()->list() );
+ TQPtrListIterator<KMFilterActionDesc> it ( kmkernel->filterActionDict()->list() );
for ( i=0, it.toFirst() ; it.current() ; ++it, ++i ) {
//create an instance:
KMFilterAction *a = (*it)->create();
@@ -1110,7 +1110,7 @@ KMFilterActionWidget::KMFilterActionWidget( QWidget *parent, const char* name )
mComboBox->insertItem( (*it)->label );
}
// widget for the case where no action is selected.
- mWidgetStack->addWidget( new QLabel( i18n("Please select an action."), mWidgetStack ), i );
+ mWidgetStack->addWidget( new TQLabel( i18n("Please select an action."), mWidgetStack ), i );
mWidgetStack->raiseWidget(i);
mComboBox->insertItem( " " );
mComboBox->setCurrentItem(i);
@@ -1122,16 +1122,16 @@ KMFilterActionWidget::KMFilterActionWidget( QWidget *parent, const char* name )
// the parameter widget should grow instead.
// o the whole widget takes all space horizontally, but is fixed vertically.
mComboBox->adjustSize();
- mComboBox->setSizePolicy( QSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed ) );
- setSizePolicy( QSizePolicy( QSizePolicy::Preferred, QSizePolicy::Fixed ) );
+ mComboBox->setSizePolicy( TQSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Fixed ) );
+ setSizePolicy( TQSizePolicy( TQSizePolicy::Preferred, TQSizePolicy::Fixed ) );
updateGeometry();
// redirect focus to the filter action combo box
setFocusProxy( mComboBox );
// now connect the combo box and the widget stack
- connect( mComboBox, SIGNAL(activated(int)),
- mWidgetStack, SLOT(raiseWidget(int)) );
+ connect( mComboBox, TQT_SIGNAL(activated(int)),
+ mWidgetStack, TQT_SLOT(raiseWidget(int)) );
}
void KMFilterActionWidget::setAction( const KMFilterAction* aAction )
@@ -1139,7 +1139,7 @@ void KMFilterActionWidget::setAction( const KMFilterAction* aAction )
int i=0;
bool found = false ;
int count = mComboBox->count() - 1 ; // last entry is the empty one
- QString label = ( aAction ) ? aAction->label() : QString::null ;
+ TQString label = ( aAction ) ? aAction->label() : TQString::null ;
// find the index of typeOf(aAction) in mComboBox
// and clear the other widgets on the way.
@@ -1165,7 +1165,7 @@ void KMFilterActionWidget::setAction( const KMFilterAction* aAction )
KMFilterAction * KMFilterActionWidget::action()
{
// look up the action description via the label
- // returned by QComboBox::currentText()...
+ // returned by TQComboBox::currentText()...
KMFilterActionDesc *desc = (*kmkernel->filterActionDict())[ mComboBox->currentText() ];
if ( desc ) {
// ...create an instance...
@@ -1186,7 +1186,7 @@ KMFilterAction * KMFilterActionWidget::action()
//
//=============================================================================
-KMFilterActionWidgetLister::KMFilterActionWidgetLister( QWidget *parent, const char* name )
+KMFilterActionWidgetLister::KMFilterActionWidgetLister( TQWidget *parent, const char* name )
: KWidgetLister( 1, FILTER_MAX_ACTIONS, parent, name )
{
mActionList = 0;
@@ -1196,7 +1196,7 @@ KMFilterActionWidgetLister::~KMFilterActionWidgetLister()
{
}
-void KMFilterActionWidgetLister::setActionList( QPtrList<KMFilterAction> *aList )
+void KMFilterActionWidgetLister::setActionList( TQPtrList<KMFilterAction> *aList )
{
assert ( aList );
@@ -1205,7 +1205,7 @@ void KMFilterActionWidgetLister::setActionList( QPtrList<KMFilterAction> *aList
mActionList = aList;
- ((QWidget*)parent())->setEnabled( true );
+ ((TQWidget*)parent())->setEnabled( true );
if ( aList->count() == 0 ) {
slotClear();
@@ -1225,8 +1225,8 @@ void KMFilterActionWidgetLister::setActionList( QPtrList<KMFilterAction> *aList
setNumberOfShownWidgetsTo( mActionList->count() );
// load the actions into the widgets
- QPtrListIterator<KMFilterAction> aIt( *mActionList );
- QPtrListIterator<QWidget> wIt( mWidgetList );
+ TQPtrListIterator<KMFilterAction> aIt( *mActionList );
+ TQPtrListIterator<TQWidget> wIt( mWidgetList );
for ( aIt.toFirst(), wIt.toFirst() ;
aIt.current() && wIt.current() ; ++aIt, ++wIt )
((KMFilterActionWidget*)(*wIt))->setAction( (*aIt) );
@@ -1239,15 +1239,15 @@ void KMFilterActionWidgetLister::reset()
mActionList = 0;
slotClear();
- ((QWidget*)parent())->setEnabled( false );
+ ((TQWidget*)parent())->setEnabled( false );
}
-QWidget* KMFilterActionWidgetLister::createWidget( QWidget *parent )
+TQWidget* KMFilterActionWidgetLister::createWidget( TQWidget *parent )
{
return new KMFilterActionWidget(parent);
}
-void KMFilterActionWidgetLister::clearWidget( QWidget *aWidget )
+void KMFilterActionWidgetLister::clearWidget( TQWidget *aWidget )
{
if ( aWidget )
((KMFilterActionWidget*)aWidget)->setAction(0);
@@ -1259,7 +1259,7 @@ void KMFilterActionWidgetLister::regenerateActionListFromWidgets()
mActionList->clear();
- QPtrListIterator<QWidget> it( mWidgetList );
+ TQPtrListIterator<TQWidget> it( mWidgetList );
for ( it.toFirst() ; it.current() ; ++it ) {
KMFilterAction *a = ((KMFilterActionWidget*)(*it))->action();
if ( a )
@@ -1274,18 +1274,18 @@ void KMFilterActionWidgetLister::regenerateActionListFromWidgets()
//
//=============================================================================
-KMPopFilterActionWidget::KMPopFilterActionWidget( const QString& title, QWidget *parent, const char* name )
- : QVButtonGroup( title, parent, name )
+KMPopFilterActionWidget::KMPopFilterActionWidget( const TQString& title, TQWidget *parent, const char* name )
+ : TQVButtonGroup( title, parent, name )
{
- mActionMap[Down] = new QRadioButton( i18n("&Download mail"), this );
- mActionMap[Later] = new QRadioButton( i18n("Download mail la&ter"), this );
- mActionMap[Delete] = new QRadioButton( i18n("D&elete mail from server"), this );
+ mActionMap[Down] = new TQRadioButton( i18n("&Download mail"), this );
+ mActionMap[Later] = new TQRadioButton( i18n("Download mail la&ter"), this );
+ mActionMap[Delete] = new TQRadioButton( i18n("D&elete mail from server"), this );
mIdMap[id(mActionMap[Later])] = Later;
mIdMap[id(mActionMap[Down])] = Down;
mIdMap[id(mActionMap[Delete])] = Delete;
- connect( this, SIGNAL(clicked(int)),
- this, SLOT( slotActionClicked(int)) );
+ connect( this, TQT_SIGNAL(clicked(int)),
+ this, TQT_SLOT( slotActionClicked(int)) );
}
void KMPopFilterActionWidget::setAction( KMPopFilterAction aAction )
@@ -1330,11 +1330,11 @@ void KMPopFilterActionWidget::reset()
void KMFilterDlg::slotImportFilters()
{
FilterImporterExporter importer( this, bPopFilter );
- QValueList<KMFilter*> filters = importer.importFilters();
+ TQValueList<KMFilter*> filters = importer.importFilters();
// FIXME message box how many were imported?
if (filters.isEmpty()) return;
- QValueListConstIterator<KMFilter*> it;
+ TQValueListConstIterator<KMFilter*> it;
for ( it = filters.constBegin() ; it != filters.constEnd() ; ++it ) {
mFilterList->appendFilter( *it ); // no need to deep copy, ownership passes to the list
@@ -1344,9 +1344,9 @@ void KMFilterDlg::slotImportFilters()
void KMFilterDlg::slotExportFilters()
{
FilterImporterExporter exporter( this, bPopFilter );
- QValueList<KMFilter*> filters = mFilterList->filtersForSaving();
+ TQValueList<KMFilter*> filters = mFilterList->filtersForSaving();
exporter.exportFilters( filters );
- QValueList<KMFilter*>::iterator it;
+ TQValueList<KMFilter*>::iterator it;
for ( it = filters.begin(); it != filters.end(); ++it )
delete *it;
}
diff --git a/kmail/kmfilterdlg.h b/kmail/kmfilterdlg.h
index 9a12b6be4..ab71bc5f5 100644
--- a/kmail/kmfilterdlg.h
+++ b/kmail/kmfilterdlg.h
@@ -13,14 +13,14 @@
#include <kdialogbase.h>
-#include <qvgroupbox.h>
-#include <qgroupbox.h>
-#include <qhbox.h>
-#include <qstring.h>
-#include <qptrlist.h>
-#include <qradiobutton.h>
-#include <qvbuttongroup.h>
-#include <qmap.h>
+#include <tqvgroupbox.h>
+#include <tqgroupbox.h>
+#include <tqhbox.h>
+#include <tqstring.h>
+#include <tqptrlist.h>
+#include <tqradiobutton.h>
+#include <tqvbuttongroup.h>
+#include <tqmap.h>
class KMSearchPatternEdit;
class QListBox;
@@ -35,7 +35,7 @@ class KListView;
/** This is a complex widget that is used to manipulate KMail's filter
list. It consists of an internal list of filters, which is a deep
- copy of the list KMFilterMgr manages, a QListBox displaying that list,
+ copy of the list KMFilterMgr manages, a TQListBox displaying that list,
and a few buttons used to create new filters, delete them, rename them
and change the order of filters.
@@ -62,7 +62,7 @@ class KMFilterListBox : public QGroupBox
Q_OBJECT
public:
/** Constuctor. */
- KMFilterListBox( const QString & title, QWidget* parent=0, const char* name=0, bool popFilter = false);
+ KMFilterListBox( const TQString & title, TQWidget* parent=0, const char* name=0, bool popFilter = false);
/** Called from KMFilterDlg. Creates a new filter and presets
the first rule with "field equals value". It's there mainly to
@@ -70,7 +70,7 @@ public:
instead call KMFilterMgr::createFilter.
@see KMFilterMgr::createFilter KMFilterDlg::createFilter
*/
- void createFilter( const QCString & field, const QString & value );
+ void createFilter( const TQCString & field, const TQString & value );
/** Loads the filter list and selects the first filter. Should be
called when all signals are connected properly. If createDummyFilter
@@ -88,7 +88,7 @@ public:
/** Returns a list of _copies_ of the current list of filters.
* The list owns the contents and thus the caller needs to clean them
* up. */
- QValueList<KMFilter*> filtersForSaving() const;
+ TQValueList<KMFilter*> filtersForSaving() const;
signals:
/** Emitted when a new filter has been selected by the user or if
@@ -151,12 +151,12 @@ protected slots:
protected:
/** The deep copy of the filter list. */
- QPtrList<KMFilter> mFilterList;
+ TQPtrList<KMFilter> mFilterList;
/** The listbox displaying the filter list. */
- QListBox *mListBox;
+ TQListBox *mListBox;
/** The various action buttons. */
- QPushButton *mBtnNew, *mBtnCopy, *mBtnDelete, *mBtnRename;
- QPushButton *mBtnTop, *mBtnUp, *mBtnDown, *mBtnBot;
+ TQPushButton *mBtnNew, *mBtnCopy, *mBtnDelete, *mBtnRename;
+ TQPushButton *mBtnTop, *mBtnUp, *mBtnDown, *mBtnBot;
/** The index of the currently selected item. */
int mIdxSelItem;
bool mShowLater;
@@ -173,7 +173,7 @@ private:
any derived class that is registered in
KMFilterActionDict). It consists of a combo box which allows to
select the type of actions this widget should act upon and a
- QWidgetStack, which holds the parameter widgets for the different
+ TQWidgetStack, which holds the parameter widgets for the different
rule types.
You can load a KMFilterAction into this widget with setAction,
@@ -196,7 +196,7 @@ class KMFilterActionWidget : public QHBox
public:
/** Constructor. Creates a filter action widget with no type
selected. */
- KMFilterActionWidget( QWidget* parent=0, const char* name=0 );
+ KMFilterActionWidget( TQWidget* parent=0, const char* name=0 );
/** Set an action. The action's type is determined and the
corresponding widget it loaded with @p aAction's parameters and
@@ -213,21 +213,21 @@ private:
subclass. The only reason that these 'slave' actions exist is
that they are 'forced' to create parameter widgets for the
widget stack and to clear them on setAction. */
- QPtrList<KMFilterAction> mActionList;
+ TQPtrList<KMFilterAction> mActionList;
/** The combo box that contains the labels of all KMFilterActions.
It's @p activated(int) signal is internally
connected to the @p raiseWidget(int) slot of @p mWidgetStack. */
- QComboBox *mComboBox;
+ TQComboBox *mComboBox;
/** The widget stack that holds all the parameter widgets for the
filter actions. */
- QWidgetStack *mWidgetStack;
+ TQWidgetStack *mWidgetStack;
};
class KMPopFilterActionWidget : public QVButtonGroup
{
Q_OBJECT
public:
- KMPopFilterActionWidget( const QString &title, QWidget* parent=0, const char* name=0 );
+ KMPopFilterActionWidget( const TQString &title, TQWidget* parent=0, const char* name=0 );
void setAction( KMPopFilterAction aAction );
KMPopFilterAction action();
@@ -240,8 +240,8 @@ private slots:
private:
KMPopFilterAction mAction;
KMFilter mFilter;
- QMap<KMPopFilterAction, QRadioButton*> mActionMap;
- QMap<int, KMPopFilterAction> mIdMap;
+ TQMap<KMPopFilterAction, TQRadioButton*> mActionMap;
+ TQMap<int, KMPopFilterAction> mIdMap;
signals: // Signals
void actionChanged(const KMPopFilterAction aAction);
@@ -251,11 +251,11 @@ class KMFilterActionWidgetLister : public KWidgetLister
{
Q_OBJECT
public:
- KMFilterActionWidgetLister( QWidget *parent=0, const char* name=0 );
+ KMFilterActionWidgetLister( TQWidget *parent=0, const char* name=0 );
virtual ~KMFilterActionWidgetLister();
- void setActionList( QPtrList<KMFilterAction> * aList );
+ void setActionList( TQPtrList<KMFilterAction> * aList );
/** Updates the action list according to the current widget values */
void updateActionList() { regenerateActionListFromWidgets(); }
@@ -264,12 +264,12 @@ public slots:
void reset();
protected:
- virtual void clearWidget( QWidget *aWidget );
- virtual QWidget* createWidget( QWidget *parent );
+ virtual void clearWidget( TQWidget *aWidget );
+ virtual TQWidget* createWidget( TQWidget *parent );
private:
void regenerateActionListFromWidgets();
- QPtrList<KMFilterAction> *mActionList;
+ TQPtrList<KMFilterAction> *mActionList;
};
@@ -321,7 +321,7 @@ private:
turn delivers it to the KMFilterListBox.
If you change the (DocBook) anchor for the filter dialog help,
- make sure to change @p const @p QString @p KMFilterDlgHelpAnchor
+ make sure to change @p const @p TQString @p KMFilterDlgHelpAnchor
in kmfilterdlg.cpp accordingly.
@short The filter dialog.
@@ -337,14 +337,14 @@ public:
/** Create the filter dialog. The only class which should be able to
do this is KMFilterMgr. This ensures that there is only a
single filter dialog */
- KMFilterDlg( QWidget* parent=0, const char* name=0, bool popFilter=false,
+ KMFilterDlg( TQWidget* parent=0, const char* name=0, bool popFilter=false,
bool createDummyFilter=true );
/** Called from KMFilterMgr. Creates a new filter and presets
the first rule with "field equals value". Internally forwarded
to KMFilterListBox::createFilter. You should instead call
KMFilterMgr::createFilter. */
- void createFilter( const QCString & field, const QString & value )
+ void createFilter( const TQCString & field, const TQString & value )
{ mFilterList->createFilter( field, value ); }
public slots:
@@ -363,7 +363,7 @@ protected slots:
void slotConfigureShortcutButtonToggled( bool aChecked );
void slotCapturedShortcutChanged( const KShortcut& );
void slotConfigureToolbarButtonToggled( bool aChecked );
- void slotFilterActionIconChanged( QString icon );
+ void slotFilterActionIconChanged( TQString icon );
void slotReset();
void slotUpdateFilter();
void slotSaveSize();
@@ -396,22 +396,22 @@ protected:
KMPopFilterActionWidget *mActionGroup;
/** Lets the user select whether to apply this filter on
inbound/outbound messages, both, or only on explicit CTRL-J. */
- QCheckBox *mApplyOnIn, *mApplyOnOut, *mApplyOnCtrlJ;
+ TQCheckBox *mApplyOnIn, *mApplyOnOut, *mApplyOnCtrlJ;
/** For a filter applied to inbound messages selects whether to apply
this filter to all accounts or to selected accounts only. */
- QRadioButton *mApplyOnForAll, *mApplyOnForTraditional, *mApplyOnForChecked;
+ TQRadioButton *mApplyOnForAll, *mApplyOnForTraditional, *mApplyOnForChecked;
/** ListView that shows the accounts in the advanced tab */
KListView *mAccountList;
- QCheckBox *mStopProcessingHere;
- QCheckBox *mConfigureShortcut;
- QCheckBox *mConfigureToolbar;
- QLabel *mFilterActionLabel;
+ TQCheckBox *mStopProcessingHere;
+ TQCheckBox *mConfigureShortcut;
+ TQCheckBox *mConfigureToolbar;
+ TQLabel *mFilterActionLabel;
KIconButton *mFilterActionIconButton;
KKeyButton *mKeyButton;
- QGroupBox *mAdvOptsGroup;
- QVGroupBox *mGlobalsBox;
- QCheckBox *mShowLaterBtn;
+ TQGroupBox *mAdvOptsGroup;
+ TQVGroupBox *mGlobalsBox;
+ TQCheckBox *mShowLaterBtn;
KMFilter *mFilter;
bool bPopFilter;
diff --git a/kmail/kmfiltermgr.cpp b/kmail/kmfiltermgr.cpp
index c75404f8f..13e5e0f1e 100644
--- a/kmail/kmfiltermgr.cpp
+++ b/kmail/kmfiltermgr.cpp
@@ -26,8 +26,8 @@ using KMail::MessageProperty;
#include <kconfig.h>
// other Qt headers
-#include <qregexp.h>
-#include <qvaluevector.h>
+#include <tqregexp.h>
+#include <tqvaluevector.h>
// other headers
#include <assert.h>
@@ -44,8 +44,8 @@ KMFilterMgr::KMFilterMgr( bool popFilter )
{
if (bPopFilter)
kdDebug(5006) << "pPopFilter set" << endl;
- connect( kmkernel, SIGNAL( folderRemoved( KMFolder* ) ),
- this, SLOT( slotFolderRemoved( KMFolder* ) ) );
+ connect( kmkernel, TQT_SIGNAL( folderRemoved( KMFolder* ) ),
+ this, TQT_SLOT( slotFolderRemoved( KMFolder* ) ) );
}
@@ -60,7 +60,7 @@ KMFilterMgr::~KMFilterMgr()
void KMFilterMgr::clear()
{
mDirtyBufferedFolderTarget = true;
- for ( QValueListIterator<KMFilter*> it = mFilters.begin() ;
+ for ( TQValueListIterator<KMFilter*> it = mFilters.begin() ;
it != mFilters.end() ; ++it ) {
delete *it;
}
@@ -94,7 +94,7 @@ void KMFilterMgr::writeConfig(bool withSync)
}
int KMFilterMgr::processPop( KMMessage * msg ) const {
- for ( QValueListConstIterator<KMFilter*> it = mFilters.constBegin();
+ for ( TQValueListConstIterator<KMFilter*> it = mFilters.constBegin();
it != mFilters.constEnd() ; ++it )
if ( (*it)->pattern()->matches( msg ) )
return (*it)->action();
@@ -149,7 +149,7 @@ int KMFilterMgr::process( KMMessage * msg, const KMFilter * filter ) {
int result = 1;
if ( FilterLog::instance()->isLogging() ) {
- QString logText( i18n( "<b>Evaluating filter rules:</b> " ) );
+ TQString logText( i18n( "<b>Evaluating filter rules:</b> " ) );
logText.append( filter->pattern()->asString() );
FilterLog::instance()->add( logText, FilterLog::patternDesc );
}
@@ -241,7 +241,7 @@ int KMFilterMgr::process( KMMessage * msg, FilterSet set,
if (!beginFiltering( msg ))
return 1;
- for ( QValueListConstIterator<KMFilter*> it = mFilters.constBegin();
+ for ( TQValueListConstIterator<KMFilter*> it = mFilters.constBegin();
!stopIt && it != mFilters.constEnd() ; ++it ) {
if ( ( ( (set&Inbound) && (*it)->applyOnInbound() ) &&
@@ -252,7 +252,7 @@ int KMFilterMgr::process( KMMessage * msg, FilterSet set,
// filter is applicable
if ( FilterLog::instance()->isLogging() ) {
- QString logText( i18n( "<b>Evaluating filter rules:</b> " ) );
+ TQString logText( i18n( "<b>Evaluating filter rules:</b> " ) );
logText.append( (*it)->pattern()->asString() );
FilterLog::instance()->add( logText, FilterLog::patternDesc );
}
@@ -290,7 +290,7 @@ bool KMFilterMgr::isMatching( Q_UINT32 serNum, const KMFilter *filter )
{
bool result = false;
if ( FilterLog::instance()->isLogging() ) {
- QString logText( i18n( "<b>Evaluating filter rules:</b> " ) );
+ TQString logText( i18n( "<b>Evaluating filter rules:</b> " ) );
logText.append( filter->pattern()->asString() );
FilterLog::instance()->add( logText, FilterLog::patternDesc );
}
@@ -306,7 +306,7 @@ bool KMFilterMgr::isMatching( Q_UINT32 serNum, const KMFilter *filter )
bool KMFilterMgr::atLeastOneFilterAppliesTo( unsigned int accountID ) const
{
- QValueListConstIterator<KMFilter*> it = mFilters.constBegin();
+ TQValueListConstIterator<KMFilter*> it = mFilters.constBegin();
for ( ; it != mFilters.constEnd() ; ++it ) {
if ( (*it)->applyOnAccount( accountID ) ) {
return true;
@@ -317,7 +317,7 @@ bool KMFilterMgr::atLeastOneFilterAppliesTo( unsigned int accountID ) const
bool KMFilterMgr::atLeastOneIncomingFilterAppliesTo( unsigned int accountID ) const
{
- QValueListConstIterator<KMFilter*> it = mFilters.constBegin();
+ TQValueListConstIterator<KMFilter*> it = mFilters.constBegin();
for ( ; it != mFilters.constEnd() ; ++it ) {
if ( (*it)->applyOnInbound() && (*it)->applyOnAccount( accountID ) ) {
return true;
@@ -333,15 +333,15 @@ bool KMFilterMgr::atLeastOneOnlineImapFolderTarget()
mDirtyBufferedFolderTarget = false;
- QValueListConstIterator<KMFilter*> it = mFilters.constBegin();
+ TQValueListConstIterator<KMFilter*> it = mFilters.constBegin();
for ( ; it != mFilters.constEnd() ; ++it ) {
KMFilter *filter = *it;
- QPtrListIterator<KMFilterAction> jt( *filter->actions() );
+ TQPtrListIterator<KMFilterAction> jt( *filter->actions() );
for ( jt.toFirst() ; jt.current() ; ++jt ) {
KMFilterActionWithFolder *f = dynamic_cast<KMFilterActionWithFolder*>(*jt);
if (!f)
continue;
- QString name = f->argsAsString();
+ TQString name = f->argsAsString();
KMFolder *folder = kmkernel->imapFolderMgr()->findIdString( name );
if (folder) {
mBufferedFolderTarget = true;
@@ -368,7 +368,7 @@ void KMFilterMgr::deref(bool force)
mRefCount = 0;
if (mRefCount && !force)
return;
- QValueVector< KMFolder *>::const_iterator it;
+ TQValueVector< KMFolder *>::const_iterator it;
for ( it = mOpenFolders.constBegin(); it != mOpenFolders.constEnd(); ++it )
(*it)->close("filtermgr");
mOpenFolders.clear();
@@ -389,7 +389,7 @@ int KMFilterMgr::tempOpenFolder(KMFolder* aFolder)
//-----------------------------------------------------------------------------
-void KMFilterMgr::openDialog( QWidget *, bool checkForEmptyFilterList )
+void KMFilterMgr::openDialog( TQWidget *, bool checkForEmptyFilterList )
{
if( !mEditDialog )
{
@@ -405,7 +405,7 @@ void KMFilterMgr::openDialog( QWidget *, bool checkForEmptyFilterList )
//-----------------------------------------------------------------------------
-void KMFilterMgr::createFilter( const QCString & field, const QString & value )
+void KMFilterMgr::createFilter( const TQCString & field, const TQString & value )
{
openDialog( 0, false );
mEditDialog->createFilter( field, value );
@@ -413,22 +413,22 @@ void KMFilterMgr::createFilter( const QCString & field, const QString & value )
//-----------------------------------------------------------------------------
-const QString KMFilterMgr::createUniqueName( const QString & name )
+const TQString KMFilterMgr::createUniqueName( const TQString & name )
{
- QString uniqueName = name;
+ TQString uniqueName = name;
int counter = 0;
bool found = true;
while ( found ) {
found = false;
- for ( QValueListConstIterator<KMFilter*> it = mFilters.constBegin();
+ for ( TQValueListConstIterator<KMFilter*> it = mFilters.constBegin();
it != mFilters.constEnd(); ++it ) {
if ( !( (*it)->name().compare( uniqueName ) ) ) {
found = true;
++counter;
uniqueName = name;
- uniqueName += QString( " (" ) + QString::number( counter )
- + QString( ")" );
+ uniqueName += TQString( " (" ) + TQString::number( counter )
+ + TQString( ")" );
break;
}
}
@@ -438,15 +438,15 @@ const QString KMFilterMgr::createUniqueName( const QString & name )
//-----------------------------------------------------------------------------
-void KMFilterMgr::appendFilters( const QValueList<KMFilter*> &filters,
+void KMFilterMgr::appendFilters( const TQValueList<KMFilter*> &filters,
bool replaceIfNameExists )
{
mDirtyBufferedFolderTarget = true;
beginUpdate();
if ( replaceIfNameExists ) {
- QValueListConstIterator<KMFilter*> it1 = filters.constBegin();
+ TQValueListConstIterator<KMFilter*> it1 = filters.constBegin();
for ( ; it1 != filters.constEnd() ; ++it1 ) {
- QValueListConstIterator<KMFilter*> it2 = mFilters.constBegin();
+ TQValueListConstIterator<KMFilter*> it2 = mFilters.constBegin();
for ( ; it2 != mFilters.constEnd() ; ++it2 ) {
if ( (*it1)->name() == (*it2)->name() ) {
mFilters.remove( (*it2) );
@@ -460,7 +460,7 @@ void KMFilterMgr::appendFilters( const QValueList<KMFilter*> &filters,
endUpdate();
}
-void KMFilterMgr::setFilters( const QValueList<KMFilter*> &filters )
+void KMFilterMgr::setFilters( const TQValueList<KMFilter*> &filters )
{
beginUpdate();
clear();
@@ -479,7 +479,7 @@ bool KMFilterMgr::folderRemoved(KMFolder* aFolder, KMFolder* aNewFolder)
{
mDirtyBufferedFolderTarget = true;
bool rem = false;
- QValueListConstIterator<KMFilter*> it = mFilters.constBegin();
+ TQValueListConstIterator<KMFilter*> it = mFilters.constBegin();
for ( ; it != mFilters.constEnd() ; ++it )
if ( (*it)->folderRemoved(aFolder, aNewFolder) )
rem = true;
@@ -493,7 +493,7 @@ bool KMFilterMgr::folderRemoved(KMFolder* aFolder, KMFolder* aNewFolder)
void KMFilterMgr::dump(void) const
{
- QValueListConstIterator<KMFilter*> it = mFilters.constBegin();
+ TQValueListConstIterator<KMFilter*> it = mFilters.constBegin();
for ( ; it != mFilters.constEnd() ; ++it ) {
kdDebug(5006) << (*it)->asString() << endl;
}
diff --git a/kmail/kmfiltermgr.h b/kmail/kmfiltermgr.h
index 0c38b4a88..9822c96d3 100644
--- a/kmail/kmfiltermgr.h
+++ b/kmail/kmfiltermgr.h
@@ -23,8 +23,8 @@
#include "kmfilteraction.h" // for KMFilterAction::ReturnCode
#include "kmfolder.h"
-#include <qguardedptr.h>
-#include <qobject.h>
+#include <tqguardedptr.h>
+#include <tqobject.h>
class KMFilter;
class KMFilterDlg;
@@ -54,11 +54,11 @@ public:
/** Open an edit dialog. If checkForEmptyFilterList is true, an empty filter
is created to improve the visibility of the dialog in case no filter
has been defined so far. */
- void openDialog( QWidget *parent, bool checkForEmptyFilterList = true );
+ void openDialog( TQWidget *parent, bool checkForEmptyFilterList = true );
/** Open an edit dialog, create a new filter and preset the first
rule with "field equals value" */
- void createFilter( const QCString & field, const QString & value );
+ void createFilter( const TQCString & field, const TQString & value );
bool beginFiltering(KMMsgBase *msgBase) const;
int moveMessage(KMMessage *msg) const;
@@ -83,20 +83,20 @@ public:
/** Check for existing filters with the &p name and extend the
"name" to "name (i)" until no match is found for i=1..n */
- const QString createUniqueName( const QString & name );
+ const TQString createUniqueName( const TQString & name );
/** Append the list of filters to the current list of filters and
write everything back into the configuration. The filter manager
takes ownership of the filters in the list. */
- void appendFilters( const QValueList<KMFilter*> &filters,
+ void appendFilters( const TQValueList<KMFilter*> &filters,
bool replaceIfNameExists = false );
/** Replace the list of filters under control of the filter manager.
* The manager takes ownershipt of the filters. */
- void setFilters( const QValueList<KMFilter*> &filters );
+ void setFilters( const TQValueList<KMFilter*> &filters );
/** @return the list of filters managed by this object */
- const QValueList<KMFilter*> & filters() const { return mFilters; }
+ const TQValueList<KMFilter*> & filters() const { return mFilters; }
/** Process given message by applying the filter rules one by
one. You can select which set of filters (incoming or outgoing)
@@ -184,9 +184,9 @@ private:
/** Find out if a message matches the filter criteria */
bool isMatching( Q_UINT32 serNum, const KMFilter *filter );
- QGuardedPtr<KMFilterDlg> mEditDialog;
- QValueVector<KMFolder *> mOpenFolders;
- QValueList<KMFilter *> mFilters;
+ TQGuardedPtr<KMFilterDlg> mEditDialog;
+ TQValueVector<KMFolder *> mOpenFolders;
+ TQValueList<KMFilter *> mFilters;
bool bPopFilter;
bool mShowLater;
bool mDirtyBufferedFolderTarget;
diff --git a/kmail/kmfolder.cpp b/kmail/kmfolder.cpp
index 71b9cfc89..cae870710 100644
--- a/kmail/kmfolder.cpp
+++ b/kmail/kmfolder.cpp
@@ -41,11 +41,11 @@
#include <klocale.h>
#include <kshortcut.h>
#include <kmessagebox.h>
-#include <qfile.h>
-#include <qfileinfo.h>
+#include <tqfile.h>
+#include <tqfileinfo.h>
-KMFolder::KMFolder( KMFolderDir* aParent, const QString& aFolderName,
+KMFolder::KMFolder( KMFolderDir* aParent, const TQString& aFolderName,
KMFolderType aFolderType, bool withIndex, bool exportedSernums )
: KMFolderNode( aParent, aFolderName ), mStorage(0),
mChild( 0 ),
@@ -76,60 +76,60 @@ KMFolder::KMFolder( KMFolderDir* aParent, const QString& aFolderName,
assert( mStorage );
- QFileInfo dirinfo;
+ TQFileInfo dirinfo;
dirinfo.setFile( mStorage->location() );
if ( !dirinfo.exists() ) {
int rc = mStorage->create();
- QString msg = i18n("<qt>Error while creating file <b>%1</b>:<br>%2</qt>").arg(aFolderName).arg(strerror(rc));
+ TQString msg = i18n("<qt>Error while creating file <b>%1</b>:<br>%2</qt>").arg(aFolderName).arg(strerror(rc));
if ( rc ) {
KMessageBox::information(0, msg);
}
}
if ( aParent ) {
- connect( mStorage, SIGNAL( msgAdded( KMFolder*, Q_UINT32 ) ),
- aParent->manager(), SIGNAL( msgAdded( KMFolder*, Q_UINT32 ) ) );
- connect( mStorage, SIGNAL( msgRemoved( KMFolder*, Q_UINT32 ) ),
- parent()->manager(), SIGNAL( msgRemoved( KMFolder*, Q_UINT32 ) ) );
- connect( this, SIGNAL( msgChanged( KMFolder*, Q_UINT32, int ) ),
- parent()->manager(), SIGNAL( msgChanged( KMFolder*, Q_UINT32, int ) ) );
- connect( this, SIGNAL( msgHeaderChanged( KMFolder*, int ) ),
- parent()->manager(), SIGNAL( msgHeaderChanged( KMFolder*, int ) ) );
- connect( mStorage, SIGNAL( invalidated( KMFolder* ) ),
- parent()->manager(), SIGNAL( folderInvalidated( KMFolder* ) ) );
+ connect( mStorage, TQT_SIGNAL( msgAdded( KMFolder*, Q_UINT32 ) ),
+ aParent->manager(), TQT_SIGNAL( msgAdded( KMFolder*, Q_UINT32 ) ) );
+ connect( mStorage, TQT_SIGNAL( msgRemoved( KMFolder*, Q_UINT32 ) ),
+ parent()->manager(), TQT_SIGNAL( msgRemoved( KMFolder*, Q_UINT32 ) ) );
+ connect( this, TQT_SIGNAL( msgChanged( KMFolder*, Q_UINT32, int ) ),
+ parent()->manager(), TQT_SIGNAL( msgChanged( KMFolder*, Q_UINT32, int ) ) );
+ connect( this, TQT_SIGNAL( msgHeaderChanged( KMFolder*, int ) ),
+ parent()->manager(), TQT_SIGNAL( msgHeaderChanged( KMFolder*, int ) ) );
+ connect( mStorage, TQT_SIGNAL( invalidated( KMFolder* ) ),
+ parent()->manager(), TQT_SIGNAL( folderInvalidated( KMFolder* ) ) );
}
// Resend all mStorage signals
- connect( mStorage, SIGNAL( changed() ), SIGNAL( changed() ) );
- connect( mStorage, SIGNAL( cleared() ), SIGNAL( cleared() ) );
- connect( mStorage, SIGNAL( expunged( KMFolder* ) ),
- SIGNAL( expunged( KMFolder* ) ) );
- connect( mStorage, SIGNAL( nameChanged() ), SIGNAL( nameChanged() ) );
- connect( mStorage, SIGNAL( msgRemoved( KMFolder*, Q_UINT32 ) ),
- SIGNAL( msgRemoved( KMFolder*, Q_UINT32 ) ) );
- connect( mStorage, SIGNAL( msgRemoved( int, QString ) ),
- SIGNAL( msgRemoved( int, QString ) ) );
- connect( mStorage, SIGNAL( msgRemoved( KMFolder* ) ),
- SIGNAL( msgRemoved( KMFolder* ) ) );
- connect( mStorage, SIGNAL( msgAdded( int ) ), SIGNAL( msgAdded( int ) ) );
- connect( mStorage, SIGNAL( msgAdded( KMFolder*, Q_UINT32 ) ),
- SIGNAL( msgAdded( KMFolder*, Q_UINT32 ) ) );
- connect( mStorage, SIGNAL( msgChanged( KMFolder*, Q_UINT32 , int ) ),
- SIGNAL( msgChanged( KMFolder*, Q_UINT32 , int ) ) );
- connect( mStorage, SIGNAL( msgHeaderChanged( KMFolder*, int ) ),
- SIGNAL( msgHeaderChanged( KMFolder*, int ) ) );
- connect( mStorage, SIGNAL( statusMsg( const QString& ) ),
- SIGNAL( statusMsg( const QString& ) ) );
- connect( mStorage, SIGNAL( numUnreadMsgsChanged( KMFolder* ) ),
- SIGNAL( numUnreadMsgsChanged( KMFolder* ) ) );
- connect( mStorage, SIGNAL( removed( KMFolder*, bool ) ),
- SIGNAL( removed( KMFolder*, bool ) ) );
-
- connect( mStorage, SIGNAL( contentsTypeChanged( KMail::FolderContentsType ) ),
- this, SLOT( slotContentsTypeChanged( KMail::FolderContentsType ) ) );
-
- connect( mStorage, SIGNAL( folderSizeChanged() ),
- this, SLOT( slotFolderSizeChanged() ) );
+ connect( mStorage, TQT_SIGNAL( changed() ), TQT_SIGNAL( changed() ) );
+ connect( mStorage, TQT_SIGNAL( cleared() ), TQT_SIGNAL( cleared() ) );
+ connect( mStorage, TQT_SIGNAL( expunged( KMFolder* ) ),
+ TQT_SIGNAL( expunged( KMFolder* ) ) );
+ connect( mStorage, TQT_SIGNAL( nameChanged() ), TQT_SIGNAL( nameChanged() ) );
+ connect( mStorage, TQT_SIGNAL( msgRemoved( KMFolder*, Q_UINT32 ) ),
+ TQT_SIGNAL( msgRemoved( KMFolder*, Q_UINT32 ) ) );
+ connect( mStorage, TQT_SIGNAL( msgRemoved( int, TQString ) ),
+ TQT_SIGNAL( msgRemoved( int, TQString ) ) );
+ connect( mStorage, TQT_SIGNAL( msgRemoved( KMFolder* ) ),
+ TQT_SIGNAL( msgRemoved( KMFolder* ) ) );
+ connect( mStorage, TQT_SIGNAL( msgAdded( int ) ), TQT_SIGNAL( msgAdded( int ) ) );
+ connect( mStorage, TQT_SIGNAL( msgAdded( KMFolder*, Q_UINT32 ) ),
+ TQT_SIGNAL( msgAdded( KMFolder*, Q_UINT32 ) ) );
+ connect( mStorage, TQT_SIGNAL( msgChanged( KMFolder*, Q_UINT32 , int ) ),
+ TQT_SIGNAL( msgChanged( KMFolder*, Q_UINT32 , int ) ) );
+ connect( mStorage, TQT_SIGNAL( msgHeaderChanged( KMFolder*, int ) ),
+ TQT_SIGNAL( msgHeaderChanged( KMFolder*, int ) ) );
+ connect( mStorage, TQT_SIGNAL( statusMsg( const TQString& ) ),
+ TQT_SIGNAL( statusMsg( const TQString& ) ) );
+ connect( mStorage, TQT_SIGNAL( numUnreadMsgsChanged( KMFolder* ) ),
+ TQT_SIGNAL( numUnreadMsgsChanged( KMFolder* ) ) );
+ connect( mStorage, TQT_SIGNAL( removed( KMFolder*, bool ) ),
+ TQT_SIGNAL( removed( KMFolder*, bool ) ) );
+
+ connect( mStorage, TQT_SIGNAL( contentsTypeChanged( KMail::FolderContentsType ) ),
+ this, TQT_SLOT( slotContentsTypeChanged( KMail::FolderContentsType ) ) );
+
+ connect( mStorage, TQT_SIGNAL( folderSizeChanged() ),
+ this, TQT_SLOT( slotFolderSizeChanged() ) );
//FIXME: Centralize all the readConfig calls somehow - Zack
// Meanwhile, readConfig must be done before registerWithMessageDict, since
@@ -186,7 +186,7 @@ void KMFolder::readConfig( KConfig* config )
if ( mUseCustomIcons )
emit iconsChanged();
- QString shortcut( config->readEntry( "Shortcut" ) );
+ TQString shortcut( config->readEntry( "Shortcut" ) );
if ( !shortcut.isEmpty() ) {
KShortcut sc( shortcut );
setShortcut( sc );
@@ -231,24 +231,24 @@ KMFolderType KMFolder::folderType() const
return mStorage ? mStorage->folderType() : KMFolderTypeUnknown;
}
-QString KMFolder::fileName() const
+TQString KMFolder::fileName() const
{
- return mStorage ? mStorage->fileName() : QString::null;
+ return mStorage ? mStorage->fileName() : TQString::null;
}
-QString KMFolder::location() const
+TQString KMFolder::location() const
{
- return mStorage ? mStorage->location() : QString::null;
+ return mStorage ? mStorage->location() : TQString::null;
}
-QString KMFolder::indexLocation() const
+TQString KMFolder::indexLocation() const
{
- return mStorage ? mStorage->indexLocation() : QString::null;
+ return mStorage ? mStorage->indexLocation() : TQString::null;
}
-QString KMFolder::subdirLocation() const
+TQString KMFolder::subdirLocation() const
{
- QString sLocation( path() );
+ TQString sLocation( path() );
if( !sLocation.isEmpty() )
sLocation += '/';
@@ -262,13 +262,13 @@ KMFolderDir* KMFolder::createChildFolder()
if( mChild )
return mChild;
- QString childName = "." + fileName() + ".directory";
- QString childDir = path() + "/" + childName;
- if (access(QFile::encodeName(childDir), W_OK) != 0) // Not there or not writable
+ TQString childName = "." + fileName() + ".directory";
+ TQString childDir = path() + "/" + childName;
+ if (access(TQFile::encodeName(childDir), W_OK) != 0) // Not there or not writable
{
- if (mkdir(QFile::encodeName(childDir), S_IRWXU) != 0
- && chmod(QFile::encodeName(childDir), S_IRWXU) != 0) {
- QString wmsg = QString(" '%1': %2").arg(childDir).arg(strerror(errno));
+ if (mkdir(TQFile::encodeName(childDir), S_IRWXU) != 0
+ && chmod(TQFile::encodeName(childDir), S_IRWXU) != 0) {
+ TQString wmsg = TQString(" '%1': %2").arg(childDir).arg(strerror(errno));
KMessageBox::information(0,i18n("Failed to create folder") + wmsg);
return 0;
}
@@ -340,14 +340,14 @@ void KMFolder::ignoreJobsForMessage( KMMessage* m )
}
FolderJob* KMFolder::createJob( KMMessage *msg, FolderJob::JobType jt,
- KMFolder *folder, QString partSpecifier,
+ KMFolder *folder, TQString partSpecifier,
const AttachmentStrategy *as ) const
{
return mStorage->createJob( msg, jt, folder, partSpecifier, as );
}
-FolderJob* KMFolder::createJob( QPtrList<KMMessage>& msgList,
- const QString& sets,
+FolderJob* KMFolder::createJob( TQPtrList<KMMessage>& msgList,
+ const TQString& sets,
FolderJob::JobType jt, KMFolder *folder ) const
{
return mStorage->createJob( msgList, sets, jt, folder );
@@ -378,7 +378,7 @@ KMMessage* KMFolder::take( int idx )
return mStorage->take( idx );
}
-void KMFolder::take( QPtrList<KMMessage> msgList ) // TODO const ref
+void KMFolder::take( TQPtrList<KMMessage> msgList ) // TODO const ref
{
mStorage->take( msgList );
}
@@ -393,7 +393,7 @@ int KMFolder::addMsgKeepUID( KMMessage* msg, int* index_return )
return mStorage->addMsgKeepUID( msg, index_return );
}
-int KMFolder::addMsg( QPtrList<KMMessage>& list, QValueList<int>& index_return )
+int KMFolder::addMsg( TQPtrList<KMMessage>& list, TQValueList<int>& index_return )
{
return mStorage->addMsg( list, index_return );
}
@@ -408,7 +408,7 @@ void KMFolder::removeMsg( int i, bool imapQuiet )
mStorage->removeMsg( i, imapQuiet );
}
-void KMFolder::removeMsg( QPtrList<KMMessage> msgList, bool imapQuiet ) // TODO const ref
+void KMFolder::removeMsg( TQPtrList<KMMessage> msgList, bool imapQuiet ) // TODO const ref
{
mStorage->removeMsg( msgList, imapQuiet );
}
@@ -423,7 +423,7 @@ int KMFolder::moveMsg( KMMessage* msg, int* index_return )
return mStorage->moveMsg( msg, index_return );
}
-int KMFolder::moveMsg(QPtrList<KMMessage> q, int* index_return )
+int KMFolder::moveMsg(TQPtrList<KMMessage> q, int* index_return )
{
return mStorage->moveMsg( q, index_return );
}
@@ -456,7 +456,7 @@ int KMFolder::countUnreadRecursive()
if (!dir)
return count;
- QPtrListIterator<KMFolderNode> it(*dir);
+ TQPtrListIterator<KMFolderNode> it(*dir);
for ( ; it.current(); ++it )
if (!it.current()->isDir()) {
folder = static_cast<KMFolder*>(it.current());
@@ -524,7 +524,7 @@ int KMFolder::expunge()
return mStorage->expunge();
}
-int KMFolder::rename( const QString& newName, KMFolderDir *aParent )
+int KMFolder::rename( const TQString& newName, KMFolderDir *aParent )
{
return mStorage->rename( newName, aParent );
}
@@ -559,7 +559,7 @@ bool KMFolder::isReadOnly() const
return mStorage->isReadOnly();
}
-QString KMFolder::label() const
+TQString KMFolder::label() const
{
if ( !mSystemLabel.isEmpty() )
return mSystemLabel;
@@ -571,9 +571,9 @@ QString KMFolder::label() const
}
//-----------------------------------------------------------------------------
-QString KMFolder::prettyURL() const
+TQString KMFolder::prettyURL() const
{
- QString parentUrl;
+ TQString parentUrl;
if ( parent() )
parentUrl = parent()->prettyURL();
if ( !parentUrl.isEmpty() )
@@ -583,7 +583,7 @@ QString KMFolder::prettyURL() const
}
//--------------------------------------------------------------------------
-QString KMFolder::mailingListPostAddress() const
+TQString KMFolder::mailingListPostAddress() const
{
if ( mMailingList.features() & MailingList::Post ) {
KURL::List::const_iterator it;
@@ -595,7 +595,7 @@ QString KMFolder::mailingListPostAddress() const
return (*it).path();
}
}
- return QString::null;
+ return TQString::null;
}
void KMFolder::setMailingListEnabled( bool enabled )
@@ -626,7 +626,7 @@ uint KMFolder::identity() const
return mIdentity;
}
-void KMFolder::setWhoField(const QString& aWhoField )
+void KMFolder::setWhoField(const TQString& aWhoField )
{
mWhoField = aWhoField;
#if 0
@@ -635,7 +635,7 @@ void KMFolder::setWhoField(const QString& aWhoField )
#endif
}
-void KMFolder::setUserWhoField( const QString& whoField, bool writeConfig )
+void KMFolder::setUserWhoField( const TQString& whoField, bool writeConfig )
{
if ( mUserWhoField == whoField )
return;
@@ -683,19 +683,19 @@ void KMFolder::correctUnreadMsgsCount()
mStorage->correctUnreadMsgsCount();
}
-QString KMFolder::idString() const
+TQString KMFolder::idString() const
{
KMFolderNode* folderNode = parent();
if (!folderNode)
return "";
while ( folderNode->parent() )
folderNode = folderNode->parent();
- QString myPath = path();
+ TQString myPath = path();
int pathLen = myPath.length() - folderNode->path().length();
- QString relativePath = myPath.right( pathLen );
+ TQString relativePath = myPath.right( pathLen );
if (!relativePath.isEmpty())
relativePath = relativePath.right( relativePath.length() - 1 ) + "/";
- QString escapedName = name();
+ TQString escapedName = name();
/* Escape [ and ] as they are disallowed for kconfig sections and that is
what the idString is primarily used for. */
escapedName.replace( "[", "%(" );
@@ -750,7 +750,7 @@ void KMFolder::setExpireAction( ExpireAction a )
}
}
-void KMFolder::setExpireToFolderId( const QString& id )
+void KMFolder::setExpireToFolderId( const TQString& id )
{
if ( id != mExpireToFolderId ) {
mExpireToFolderId = id;
@@ -814,14 +814,14 @@ void KMFolder::setStatus( int idx, KMMsgStatus status, bool toggle )
mStorage->setStatus( idx, status, toggle );
}
-void KMFolder::setStatus( QValueList<int>& ids, KMMsgStatus status,
+void KMFolder::setStatus( TQValueList<int>& ids, KMMsgStatus status,
bool toggle )
{
mStorage->setStatus( ids, status, toggle);
}
-void KMFolder::setIconPaths( const QString &normalPath,
- const QString &unreadPath )
+void KMFolder::setIconPaths( const TQString &normalPath,
+ const TQString &unreadPath )
{
mNormalIconPath = normalPath;
mUnreadIconPath = unreadPath;
diff --git a/kmail/kmfolder.h b/kmail/kmfolder.h
index db13ae8c3..4c7a2133b 100644
--- a/kmail/kmfolder.h
+++ b/kmail/kmfolder.h
@@ -36,7 +36,7 @@ using KMail::MailingList;
#include "mimelib/string.h"
-#include <qptrvector.h>
+#include <tqptrvector.h>
#include <sys/types.h>
#include <stdio.h>
#include <kshortcut.h>
@@ -53,7 +53,7 @@ namespace KMail {
}
using KMail::AttachmentStrategy;
-typedef QValueList<Q_UINT32> SerNumList;
+typedef TQValueList<Q_UINT32> SerNumList;
/** Mail folder.
* (description will be here).
@@ -86,7 +86,7 @@ public:
* the global MsgDict for lookup.
* @return A new folder instance.
*/
- KMFolder( KMFolderDir* parent, const QString& name,
+ KMFolder( KMFolderDir* parent, const TQString& name,
KMFolderType aFolderType, bool withIndex = true,
bool exportedSernums = true );
~KMFolder();
@@ -140,16 +140,16 @@ public:
KMFolderType folderType() const;
/** Returns the filename of the folder (reimplemented in KMFolderImap) */
- QString fileName() const;
+ TQString fileName() const;
/** Returns full path to folder file */
- QString location() const;
+ TQString location() const;
/** Returns full path to index file */
- QString indexLocation() const;
+ TQString indexLocation() const;
/** Returns full path to sub directory file */
- QString subdirLocation() const;
+ TQString subdirLocation() const;
/** Returns the folder directory associated with this node or
0 if no such directory exists */
@@ -196,9 +196,9 @@ public:
* for each derived KMFolder).
*/
FolderJob* createJob( KMMessage *msg, FolderJob::JobType jt = FolderJob::tGetMessage,
- KMFolder *folder = 0, QString partSpecifier = QString::null,
+ KMFolder *folder = 0, TQString partSpecifier = TQString::null,
const AttachmentStrategy *as = 0 ) const;
- FolderJob* createJob( QPtrList<KMMessage>& msgList, const QString& sets,
+ FolderJob* createJob( TQPtrList<KMMessage>& msgList, const TQString& sets,
FolderJob::JobType jt = FolderJob::tGetMessage,
KMFolder *folder = 0 ) const;
@@ -218,7 +218,7 @@ public:
/** Detach message from this folder. Usable to call addMsg() afterwards.
Loads the message if it is not loaded up to now. */
KMMessage* take(int idx);
- void take(QPtrList<KMMessage> msgList);
+ void take(TQPtrList<KMMessage> msgList);
/** Add the given message to the folder. Usually the message
is added at the end of the folder. Returns zero on success and
@@ -237,7 +237,7 @@ public:
* Adds the given messages to the folder. Behaviour is identical
* to addMsg(msg)
*/
- int addMsg(QPtrList<KMMessage>&, QValueList<int>& index_return);
+ int addMsg(TQPtrList<KMMessage>&, TQValueList<int>& index_return);
/** Called by derived classes implementation of addMsg.
Emits msgAdded signals */
@@ -245,7 +245,7 @@ public:
/** Remove (first occurrence of) given message from the folder. */
void removeMsg(int i, bool imapQuiet = false);
- void removeMsg(QPtrList<KMMessage> msgList, bool imapQuiet = false);
+ void removeMsg(TQPtrList<KMMessage> msgList, bool imapQuiet = false);
/** Delete messages in the folder that are older than days. Return the
* number of deleted messages. */
@@ -256,7 +256,7 @@ public:
code on failure. The index of the new message is stored in index_return
if given. */
int moveMsg(KMMessage* msg, int* index_return = 0);
- int moveMsg(QPtrList<KMMessage>, int* index_return = 0);
+ int moveMsg(TQPtrList<KMMessage>, int* index_return = 0);
/** Returns the index of the given message or -1 if not found. */
int find(const KMMsgBase* msg) const;
@@ -327,7 +327,7 @@ public:
/** Physically rename the folder. Returns zero on success and an errno
on failure. */
- int rename(const QString& newName, KMFolderDir *aParent = 0);
+ int rename(const TQString& newName, KMFolderDir *aParent = 0);
/** Returns true if the table of contents is dirty. This happens when
a message is deleted from the folder. The toc will then be re-created
@@ -362,15 +362,15 @@ public:
void setSystemFolder(bool itIs) { mIsSystemFolder=itIs; }
/** Returns the label of the folder for visualization. */
- virtual QString label() const;
- void setLabel( const QString& l ) { mLabel = l; }
+ virtual TQString label() const;
+ void setLabel( const TQString& l ) { mLabel = l; }
/** Set the label that is used as a system default */
- virtual QString systemLabel() const { return mSystemLabel; }
- void setSystemLabel( const QString& l ) { mSystemLabel = l; }
+ virtual TQString systemLabel() const { return mSystemLabel; }
+ void setSystemLabel( const TQString& l ) { mSystemLabel = l; }
/** URL of the node for visualization purposes. */
- virtual QString prettyURL() const;
+ virtual TQString prettyURL() const;
/** Returns true if this folder is associated with a mailing-list. */
void setMailingListEnabled( bool enabled );
@@ -379,24 +379,24 @@ public:
void setMailingList( const MailingList& mlist );
MailingList mailingList() const
{ return mMailingList; }
- QString mailingListPostAddress() const;
+ TQString mailingListPostAddress() const;
void setIdentity(uint identity);
uint identity() const;
/** Get / set the name of the field that is used for the Sender/Receiver column in the headers (From/To) */
- QString whoField() const { return mWhoField; }
- void setWhoField(const QString& aWhoField);
+ TQString whoField() const { return mWhoField; }
+ void setWhoField(const TQString& aWhoField);
/** Get / set the user-settings for the WhoField (From/To/Empty) */
- QString userWhoField(void) { return mUserWhoField; }
- void setUserWhoField(const QString &whoField,bool writeConfig=true);
+ TQString userWhoField(void) { return mUserWhoField; }
+ void setUserWhoField(const TQString &whoField,bool writeConfig=true);
/** A cludge to help make sure the count of unread messges is kept in sync */
void correctUnreadMsgsCount();
/** Returns a string that can be used to identify this folder */
- QString idString() const;
+ TQString idString() const;
/**
* Set whether this folder automatically expires messages.
@@ -468,8 +468,8 @@ public:
/**
* If expiry should move to folder, return the ID of that folder
*/
- QString expireToFolderId() const { return mExpireToFolderId; }
- void setExpireToFolderId( const QString& id );
+ TQString expireToFolderId() const { return mExpireToFolderId; }
+ void setExpireToFolderId( const TQString& id );
/**
* Expire old messages in this folder.
@@ -484,15 +484,15 @@ public:
/** Set the status of the message at index @p idx to @p status. */
void setStatus(int idx, KMMsgStatus status, bool toggle=false);
- /** Set the status of the message(s) in the QValueList @p ids to @p status. */
- void setStatus(QValueList<int>& ids, KMMsgStatus status, bool toggle=false);
+ /** Set the status of the message(s) in the TQValueList @p ids to @p status. */
+ void setStatus(TQValueList<int>& ids, KMMsgStatus status, bool toggle=false);
/** Icon related methods */
bool useCustomIcons() const { return mUseCustomIcons; }
void setUseCustomIcons(bool useCustomIcons) { mUseCustomIcons = useCustomIcons; }
- QString normalIconPath() const { return mNormalIconPath; }
- QString unreadIconPath() const { return mUnreadIconPath; }
- void setIconPaths(const QString &normalPath, const QString &unreadPath);
+ TQString normalIconPath() const { return mNormalIconPath; }
+ TQString unreadIconPath() const { return mUnreadIconPath; }
+ void setIconPaths(const TQString &normalPath, const TQString &unreadPath);
void removeJobs();
@@ -562,7 +562,7 @@ signals:
void msgRemoved(KMFolder*, Q_UINT32 sernum);
/** Emitted after a message is removed from the folder. */
- void msgRemoved( int idx, QString msgIdMD5 );
+ void msgRemoved( int idx, TQString msgIdMD5 );
void msgRemoved(KMFolder*);
/** Emitted when a message is added from the folder. */
@@ -576,7 +576,7 @@ signals:
void msgHeaderChanged(KMFolder*, int);
/** Emmited to display a message somewhere in a status line. */
- void statusMsg(const QString&);
+ void statusMsg(const TQString&);
/** Emitted when number of unread messages has changed. */
void numUnreadMsgsChanged( KMFolder* );
@@ -616,9 +616,9 @@ private:
bool mExportsSernums :1;
bool mMoveInProgress :1;
- /** nationalized label or QString::null (then name() should be used) */
- QString mLabel;
- QString mSystemLabel;
+ /** nationalized label or TQString::null (then name() should be used) */
+ TQString mLabel;
+ TQString mSystemLabel;
/** Support for automatic expiry of old messages */
bool mExpireMessages; // true if old messages are expired
@@ -627,12 +627,12 @@ private:
ExpireUnits mUnreadExpireUnits;
ExpireUnits mReadExpireUnits;
ExpireAction mExpireAction;
- QString mExpireToFolderId;
+ TQString mExpireToFolderId;
/** Icon related variables */
bool mUseCustomIcons;
- QString mNormalIconPath;
- QString mUnreadIconPath;
+ TQString mNormalIconPath;
+ TQString mUnreadIconPath;
/** Mailing list attributes */
bool mMailingListEnabled;
@@ -643,7 +643,7 @@ private:
uint mIdentity;
/** name of the field that is used for "From" in listbox */
- QString mWhoField, mUserWhoField;
+ TQString mWhoField, mUserWhoField;
/** Should replies to messages in this folder be put in here? */
bool mPutRepliesInSameFolder;
diff --git a/kmail/kmfoldercachedimap.cpp b/kmail/kmfoldercachedimap.cpp
index 405176c4e..05f01b778 100644
--- a/kmail/kmfoldercachedimap.cpp
+++ b/kmail/kmfoldercachedimap.cpp
@@ -35,7 +35,7 @@
#include <errno.h>
-#include <qvaluevector.h>
+#include <tqvaluevector.h>
#include "kmkernel.h"
#include "kmfoldercachedimap.h"
@@ -69,15 +69,15 @@ using KMail::ListJob;
#include <kconfig.h>
#include <kio/global.h>
#include <kio/scheduler.h>
-#include <qbuffer.h>
-#include <qbuttongroup.h>
-#include <qcombobox.h>
-#include <qfile.h>
-#include <qhbox.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qradiobutton.h>
-#include <qvaluelist.h>
+#include <tqbuffer.h>
+#include <tqbuttongroup.h>
+#include <tqcombobox.h>
+#include <tqfile.h>
+#include <tqhbox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqradiobutton.h>
+#include <tqvaluelist.h>
#include "annotationjobs.h"
#include "quotajobs.h"
using namespace KMail;
@@ -86,32 +86,32 @@ using namespace KMail;
#define UIDCACHE_VERSION 1
#define MAIL_LOSS_DEBUGGING 0
-static QString incidencesForToString( KMFolderCachedImap::IncidencesFor r ) {
+static TQString incidencesForToString( KMFolderCachedImap::IncidencesFor r ) {
switch (r) {
case KMFolderCachedImap::IncForNobody: return "nobody";
case KMFolderCachedImap::IncForAdmins: return "admins";
case KMFolderCachedImap::IncForReaders: return "readers";
}
- return QString::null; // can't happen
+ return TQString::null; // can't happen
}
-static KMFolderCachedImap::IncidencesFor incidencesForFromString( const QString& str ) {
+static KMFolderCachedImap::IncidencesFor incidencesForFromString( const TQString& str ) {
if ( str == "nobody" ) return KMFolderCachedImap::IncForNobody;
if ( str == "admins" ) return KMFolderCachedImap::IncForAdmins;
if ( str == "readers" ) return KMFolderCachedImap::IncForReaders;
return KMFolderCachedImap::IncForAdmins; // by default
}
-DImapTroubleShootDialog::DImapTroubleShootDialog( QWidget* parent,
+DImapTroubleShootDialog::DImapTroubleShootDialog( TQWidget* parent,
const char* name )
: KDialogBase( Plain, i18n( "Troubleshooting IMAP Cache" ),
Ok | Cancel, Cancel, parent, name, true ),
rc( None )
{
- QFrame* page = plainPage();
- QVBoxLayout *topLayout = new QVBoxLayout( page, 0 );
+ TQFrame* page = plainPage();
+ TQVBoxLayout *topLayout = new TQVBoxLayout( page, 0 );
// spell "lose" correctly. but don't cause a fuzzy.
- QString txt = i18n( "<p><b>Troubleshooting the IMAP cache.</b></p>"
+ TQString txt = i18n( "<p><b>Troubleshooting the IMAP cache.</b></p>"
"<p>If you have problems with synchronizing an IMAP "
"folder, you should first try rebuilding the index "
"file. This will take some time to rebuild, but will "
@@ -127,36 +127,36 @@ DImapTroubleShootDialog::DImapTroubleShootDialog( QWidget* parent,
"you can try refreshing the IMAP cache. If you do this, "
"you will lose all your local changes for this folder "
"and all its subfolders.</p>" );
- topLayout->addWidget( new QLabel( txt, page ) );
+ topLayout->addWidget( new TQLabel( txt, page ) );
- QButtonGroup *group = new QButtonGroup( 0 );
+ TQButtonGroup *group = new TQButtonGroup( 0 );
- mIndexButton = new QRadioButton( page );
+ mIndexButton = new TQRadioButton( page );
mIndexButton->setText( i18n( "Rebuild &Index" ) );
group->insert( mIndexButton );
topLayout->addWidget( mIndexButton );
- QHBox *hbox = new QHBox( page );
- QLabel *scopeLabel = new QLabel( i18n( "Scope:" ), hbox );
+ TQHBox *hbox = new TQHBox( page );
+ TQLabel *scopeLabel = new TQLabel( i18n( "Scope:" ), hbox );
scopeLabel->setEnabled( false );
- mIndexScope = new QComboBox( hbox );
+ mIndexScope = new TQComboBox( hbox );
mIndexScope->insertItem( i18n( "Only current folder" ) );
mIndexScope->insertItem( i18n( "Current folder and all subfolders" ) );
mIndexScope->insertItem( i18n( "All folders of this account" ) );
mIndexScope->setEnabled( false );
topLayout->addWidget( hbox );
- mCacheButton = new QRadioButton( page );
+ mCacheButton = new TQRadioButton( page );
mCacheButton->setText( i18n( "Refresh &Cache" ) );
group->insert( mCacheButton );
topLayout->addWidget( mCacheButton );
enableButtonSeparator( true );
- connect ( mIndexButton, SIGNAL(toggled(bool)), mIndexScope, SLOT(setEnabled(bool)) );
- connect ( mIndexButton, SIGNAL(toggled(bool)), scopeLabel, SLOT(setEnabled(bool)) );
+ connect ( mIndexButton, TQT_SIGNAL(toggled(bool)), mIndexScope, TQT_SLOT(setEnabled(bool)) );
+ connect ( mIndexButton, TQT_SIGNAL(toggled(bool)), scopeLabel, TQT_SLOT(setEnabled(bool)) );
- connect( this, SIGNAL( okClicked () ), this, SLOT( slotDone() ) );
+ connect( this, TQT_SIGNAL( okClicked () ), this, TQT_SLOT( slotDone() ) );
}
int DImapTroubleShootDialog::run()
@@ -198,14 +198,14 @@ KMFolderCachedImap::KMFolderCachedImap( KMFolder* folder, const char* aName )
setUidValidity("");
// if we fail to read a uid file but there is one, nuke it
if ( readUidCache() == -1 ) {
- if ( QFile::exists( uidCacheLocation() ) ) {
+ if ( TQFile::exists( uidCacheLocation() ) ) {
KMessageBox::error( 0,
i18n( "The UID cache file for folder %1 could not be read. There "
"could be a problem with file system permission, or it is corrupted."
).arg( folder->prettyURL() ) );
// try to unlink it, in case it was corruped. If it couldn't be read
// because of permissions, this will fail, which is fine
- unlink( QFile::encodeName( uidCacheLocation() ) );
+ unlink( TQFile::encodeName( uidCacheLocation() ) );
}
}
@@ -239,7 +239,7 @@ void KMFolderCachedImap::readConfig()
KConfig* config = KMKernel::config();
KConfigGroupSaver saver( config, "Folder-" + folder()->idString() );
if( mImapPath.isEmpty() ) mImapPath = config->readEntry( "ImapPath" );
- if( QString( name() ).upper() == "INBOX" && mImapPath == "/INBOX/" )
+ if( TQString( name() ).upper() == "INBOX" && mImapPath == "/INBOX/" )
{
folder()->setLabel( i18n( "inbox" ) );
// for the icon
@@ -268,7 +268,7 @@ void KMFolderCachedImap::readConfig()
int storageQuotaUsage = config->readNumEntry( "StorageQuotaUsage", -1 );
int storageQuotaLimit = config->readNumEntry( "StorageQuotaLimit", -1 );
- QString storageQuotaRoot = config->readEntry( "StorageQuotaRoot", QString::null );
+ TQString storageQuotaRoot = config->readEntry( "StorageQuotaRoot", TQString::null );
if ( !storageQuotaRoot.isNull() ) { // isEmpty() means we know there is no quota set
mQuotaInfo.setName( "STORAGE" );
mQuotaInfo.setRoot( storageQuotaRoot );
@@ -290,11 +290,11 @@ void KMFolderCachedImap::readConfig()
mImapPathCreation = config->readEntry("ImapPathCreation");
}
- QStringList uids = config->readListEntry( "UIDSDeletedSinceLastSync" );
+ TQStringList uids = config->readListEntry( "UIDSDeletedSinceLastSync" );
#if MAIL_LOSS_DEBUGGING
kdDebug( 5006 ) << "READING IN UIDSDeletedSinceLastSync: " << folder()->prettyURL() << endl << uids << endl;
#endif
- for ( QStringList::iterator it = uids.begin(); it != uids.end(); it++ ) {
+ for ( TQStringList::iterator it = uids.begin(); it != uids.end(); it++ ) {
mDeletedUIDsSinceLastSync.insert( (*it).toULong(), 0);
}
}
@@ -320,10 +320,10 @@ void KMFolderCachedImap::writeConfig()
}
}
if ( !mDeletedUIDsSinceLastSync.isEmpty() ) {
- QValueList<ulong> uids = mDeletedUIDsSinceLastSync.keys();
- QStringList uidstrings;
- for( QValueList<ulong>::iterator it = uids.begin(); it != uids.end(); it++ ) {
- uidstrings.append( QString::number( (*it) ) );
+ TQValueList<ulong> uids = mDeletedUIDsSinceLastSync.keys();
+ TQStringList uidstrings;
+ for( TQValueList<ulong>::iterator it = uids.begin(); it != uids.end(); it++ ) {
+ uidstrings.append( TQString::number( (*it) ) );
}
configGroup.writeEntry( "UIDSDeletedSinceLastSync", uidstrings );
#if MAIL_LOSS_DEBUGGING
@@ -377,26 +377,26 @@ void KMFolderCachedImap::remove()
{
mFolderRemoved = true;
- QString part1 = folder()->path() + "/." + dotEscape(name());
- QString uidCacheFile = part1 + ".uidcache";
+ TQString part1 = folder()->path() + "/." + dotEscape(name());
+ TQString uidCacheFile = part1 + ".uidcache";
// This is the account folder of an account that was just removed
// When this happens, be sure to delete all traces of the cache
- if( QFile::exists(uidCacheFile) )
- unlink( QFile::encodeName( uidCacheFile ) );
+ if( TQFile::exists(uidCacheFile) )
+ unlink( TQFile::encodeName( uidCacheFile ) );
FolderStorage::remove();
}
-QString KMFolderCachedImap::uidCacheLocation() const
+TQString KMFolderCachedImap::uidCacheLocation() const
{
- QString sLocation(folder()->path());
+ TQString sLocation(folder()->path());
if (!sLocation.isEmpty()) sLocation += '/';
return sLocation + '.' + dotEscape(fileName()) + ".uidcache";
}
int KMFolderCachedImap::readUidCache()
{
- QFile uidcache( uidCacheLocation() );
+ TQFile uidcache( uidCacheLocation() );
if( uidcache.open( IO_ReadOnly ) ) {
char buf[1024];
int len = uidcache.readLine( buf, sizeof(buf) );
@@ -406,14 +406,14 @@ int KMFolderCachedImap::readUidCache()
if( cacheVersion == UIDCACHE_VERSION ) {
len = uidcache.readLine( buf, sizeof(buf) );
if( len > 0 ) {
- setUidValidity( QString::fromLocal8Bit(buf).stripWhiteSpace() );
+ setUidValidity( TQString::fromLocal8Bit(buf).stripWhiteSpace() );
len = uidcache.readLine( buf, sizeof(buf) );
if( len > 0 ) {
#if MAIL_LOSS_DEBUGGING
- kdDebug(5006) << "Reading in last uid from cache: " << QString::fromLocal8Bit(buf).stripWhiteSpace() << " in " << folder()->prettyURL() << endl;
+ kdDebug(5006) << "Reading in last uid from cache: " << TQString::fromLocal8Bit(buf).stripWhiteSpace() << " in " << folder()->prettyURL() << endl;
#endif
// load the last known highest uid from the on disk cache
- setLastUid( QString::fromLocal8Bit(buf).stripWhiteSpace().toULong() );
+ setLastUid( TQString::fromLocal8Bit(buf).stripWhiteSpace().toULong() );
return 0;
}
}
@@ -427,16 +427,16 @@ int KMFolderCachedImap::writeUidCache()
{
if( uidValidity().isEmpty() || uidValidity() == "INVALID" ) {
// No info from the server yet, remove the file.
- if( QFile::exists( uidCacheLocation() ) )
- return unlink( QFile::encodeName( uidCacheLocation() ) );
+ if( TQFile::exists( uidCacheLocation() ) )
+ return unlink( TQFile::encodeName( uidCacheLocation() ) );
return 0;
}
#if MAIL_LOSS_DEBUGGING
kdDebug(5006) << "Writing out UID cache lastuid: " << lastUid() << " in: " << folder()->prettyURL() << endl;
#endif
- QFile uidcache( uidCacheLocation() );
+ TQFile uidcache( uidCacheLocation() );
if( uidcache.open( IO_WriteOnly ) ) {
- QTextStream str( &uidcache );
+ TQTextStream str( &uidcache );
str << "# KMail-UidCache V" << UIDCACHE_VERSION << endl;
str << uidValidity() << endl;
str << lastUid() << endl;
@@ -553,17 +553,17 @@ bool KMFolderCachedImap::canRemoveFolder() const {
}
/* Reimplemented from KMFolderDir */
-int KMFolderCachedImap::rename( const QString& aName,
+int KMFolderCachedImap::rename( const TQString& aName,
KMFolderDir* /*aParent*/ )
{
- QString oldName = mAccount->renamedFolder( imapPath() );
+ TQString oldName = mAccount->renamedFolder( imapPath() );
if ( oldName.isEmpty() ) oldName = name();
if ( aName == oldName )
// Stupid user trying to rename it to it's old name :)
return 0;
if( account() == 0 || imapPath().isEmpty() ) { // I don't think any of this can happen anymore
- QString err = i18n("You must synchronize with the server before renaming IMAP folders.");
+ TQString err = i18n("You must synchronize with the server before renaming IMAP folders.");
KMessageBox::error( 0, err );
return -1;
}
@@ -586,7 +586,7 @@ int KMFolderCachedImap::rename( const QString& aName,
KMFolder* KMFolderCachedImap::trashFolder() const
{
- QString trashStr = account()->trash();
+ TQString trashStr = account()->trash();
return kmkernel->dimapFolderMgr()->findIdString( trashStr );
}
@@ -601,12 +601,12 @@ void KMFolderCachedImap::setLastUid( ulong uid )
uidWriteTimer = startTimer( 60000 );
}
-void KMFolderCachedImap::timerEvent( QTimerEvent* )
+void KMFolderCachedImap::timerEvent( TQTimerEvent* )
{
killTimer( uidWriteTimer );
uidWriteTimer = -1;
if ( writeUidCache() == -1 )
- unlink( QFile::encodeName( uidCacheLocation() ) );
+ unlink( TQFile::encodeName( uidCacheLocation() ) );
}
ulong KMFolderCachedImap::lastUid()
@@ -622,7 +622,7 @@ KMMsgBase* KMFolderCachedImap::findByUID( ulong uid )
mapReloaded = true;
}
- QMap<ulong,int>::Iterator it = uidMap.find( uid );
+ TQMap<ulong,int>::Iterator it = uidMap.find( uid );
if( it != uidMap.end() ) {
KMMsgBase *msg = getMsgBase( *it );
#if MAIL_LOSS_DEBUGGING
@@ -684,12 +684,12 @@ void KMFolderCachedImap::slotTroubleshoot()
"Please try running a sync before this.") );
return;
}
- QString str = i18n("Are you sure you want to refresh the IMAP cache of "
+ TQString str = i18n("Are you sure you want to refresh the IMAP cache of "
"the folder %1 and all its subfolders?\nThis will "
"remove all changes you have done locally to your "
"folders.").arg( label() );
- QString s1 = i18n("Refresh IMAP Cache");
- QString s2 = i18n("&Refresh");
+ TQString s1 = i18n("Refresh IMAP Cache");
+ TQString s2 = i18n("&Refresh");
if( KMessageBox::warningContinueCancel( 0, str, s1, s2 ) ==
KMessageBox::Continue )
account()->invalidateIMAPFolders( this );
@@ -722,7 +722,7 @@ void KMFolderCachedImap::slotTroubleshoot()
void KMFolderCachedImap::serverSync( bool recurse )
{
if( mSyncState != SYNC_STATE_INITIAL ) {
- if( KMessageBox::warningYesNo( 0, i18n("Folder %1 is not in initial sync state (state was %2). Do you want to reset it to initial sync state and sync anyway?" ).arg( imapPath() ).arg( mSyncState ), QString::null, i18n("Reset && Sync"), KStdGuiItem::cancel() ) == KMessageBox::Yes ) {
+ if( KMessageBox::warningYesNo( 0, i18n("Folder %1 is not in initial sync state (state was %2). Do you want to reset it to initial sync state and sync anyway?" ).arg( imapPath() ).arg( mSyncState ), TQString::null, i18n("Reset && Sync"), KStdGuiItem::cancel() ) == KMessageBox::Yes ) {
mSyncState = SYNC_STATE_INITIAL;
} else return;
}
@@ -753,7 +753,7 @@ void KMFolderCachedImap::serverSync( bool recurse )
serverSyncInternal();
}
-QString KMFolderCachedImap::state2String( int state ) const
+TQString KMFolderCachedImap::state2String( int state ) const
{
switch( state ) {
case SYNC_STATE_INITIAL: return "SYNC_STATE_INITIAL";
@@ -853,8 +853,8 @@ void KMFolderCachedImap::serverSyncInternal()
// kdDebug(5006) << "makeConnection said Connecting, waiting for signal." << endl;
newState( mProgress, i18n("Connecting to %1").arg( mAccount->host() ) );
// We'll wait for the connectionResult signal from the account.
- connect( mAccount, SIGNAL( connectionResult(int, const QString&) ),
- this, SLOT( slotConnectionResult(int, const QString&) ) );
+ connect( mAccount, TQT_SIGNAL( connectionResult(int, const TQString&) ),
+ this, TQT_SLOT( slotConnectionResult(int, const TQString&) ) );
break;
} else {
// Connected
@@ -874,8 +874,8 @@ void KMFolderCachedImap::serverSyncInternal()
// Check the user's own rights. We do this every time in case they changed.
mOldUserRights = mUserRights;
newState( mProgress, i18n("Checking permissions"));
- connect( mAccount, SIGNAL( receivedUserRights( KMFolder* ) ),
- this, SLOT( slotReceivedUserRights( KMFolder* ) ) );
+ connect( mAccount, TQT_SIGNAL( receivedUserRights( KMFolder* ) ),
+ this, TQT_SLOT( slotReceivedUserRights( KMFolder* ) ) );
mAccount->getUserRights( folder(), imapPath() ); // after connecting, due to the INBOX case
break;
}
@@ -885,12 +885,12 @@ void KMFolderCachedImap::serverSyncInternal()
mSyncState = SYNC_STATE_CHECK_UIDVALIDITY;
// Returns the new name if the folder was renamed, empty otherwise.
bool isResourceFolder = kmkernel->iCalIface().isStandardResourceFolder( folder() );
- QString newName = mAccount->renamedFolder( imapPath() );
+ TQString newName = mAccount->renamedFolder( imapPath() );
if ( !newName.isEmpty() && !folder()->isSystemFolder() && !isResourceFolder ) {
newState( mProgress, i18n("Renaming folder") );
CachedImapJob *job = new CachedImapJob( newName, CachedImapJob::tRenameFolder, this );
- connect( job, SIGNAL( result(KMail::FolderJob *) ), this, SLOT( slotIncreaseProgress() ) );
- connect( job, SIGNAL( finished() ), this, SLOT( serverSyncInternal() ) );
+ connect( job, TQT_SIGNAL( result(KMail::FolderJob *) ), this, TQT_SLOT( slotIncreaseProgress() ) );
+ connect( job, TQT_SIGNAL( finished() ), this, TQT_SLOT( serverSyncInternal() ) );
job->start();
break;
}
@@ -970,8 +970,8 @@ void KMFolderCachedImap::serverSyncInternal()
newState( mProgress, i18n("Deleting folders from server"));
CachedImapJob* job = new CachedImapJob( foldersForDeletionOnServer,
CachedImapJob::tDeleteFolders, this );
- connect( job, SIGNAL( result(KMail::FolderJob *) ), this, SLOT( slotIncreaseProgress() ) );
- connect( job, SIGNAL( finished() ), this, SLOT( slotFolderDeletionOnServerFinished() ) );
+ connect( job, TQT_SIGNAL( result(KMail::FolderJob *) ), this, TQT_SLOT( slotIncreaseProgress() ) );
+ connect( job, TQT_SIGNAL( finished() ), this, TQT_SLOT( slotFolderDeletionOnServerFinished() ) );
job->start();
break;
}
@@ -1007,10 +1007,10 @@ void KMFolderCachedImap::serverSyncInternal()
mSyncState = SYNC_STATE_GET_MESSAGES;
if( !noContent() ) {
newState( mProgress, i18n("Expunging deleted messages"));
- CachedImapJob *job = new CachedImapJob( QString::null,
+ CachedImapJob *job = new CachedImapJob( TQString::null,
CachedImapJob::tExpungeFolder, this );
- connect( job, SIGNAL( result(KMail::FolderJob *) ), this, SLOT( slotIncreaseProgress() ) );
- connect( job, SIGNAL( finished() ), this, SLOT( serverSyncInternal() ) );
+ connect( job, TQT_SIGNAL( result(KMail::FolderJob *) ), this, TQT_SLOT( slotIncreaseProgress() ) );
+ connect( job, TQT_SIGNAL( finished() ), this, TQT_SLOT( serverSyncInternal() ) );
job->start();
break;
}
@@ -1024,10 +1024,10 @@ void KMFolderCachedImap::serverSyncInternal()
CachedImapJob *job = new CachedImapJob( mMsgsForDownload,
CachedImapJob::tGetMessage,
this );
- connect( job, SIGNAL( progress(unsigned long, unsigned long) ),
- this, SLOT( slotProgress(unsigned long, unsigned long) ) );
- connect( job, SIGNAL( finished() ), this, SLOT( slotUpdateLastUid() ) );
- connect( job, SIGNAL( finished() ), this, SLOT( serverSyncInternal() ) );
+ connect( job, TQT_SIGNAL( progress(unsigned long, unsigned long) ),
+ this, TQT_SLOT( slotProgress(unsigned long, unsigned long) ) );
+ connect( job, TQT_SIGNAL( finished() ), this, TQT_SLOT( slotUpdateLastUid() ) );
+ connect( job, TQT_SIGNAL( finished() ), this, TQT_SLOT( serverSyncInternal() ) );
job->start();
mMsgsForDownload.clear();
break;
@@ -1080,8 +1080,8 @@ void KMFolderCachedImap::serverSyncInternal()
ImapAccountBase::jobData jd( url.url(), folder() );
jd.cancellable = true; // we can always do so later
mAccount->insertJob(job, jd);
- connect(job, SIGNAL(result(KIO::Job *)),
- SLOT(slotTestAnnotationResult(KIO::Job *)));
+ connect(job, TQT_SIGNAL(result(KIO::Job *)),
+ TQT_SLOT(slotTestAnnotationResult(KIO::Job *)));
break;
}
@@ -1096,7 +1096,7 @@ void KMFolderCachedImap::serverSyncInternal()
// for a folder we didn't create ourselves: get annotation from server
if ( mAnnotationFolderType == "FROMSERVER" ) {
needToGetInitialAnnotations = true;
- mAnnotationFolderType = QString::null;
+ mAnnotationFolderType = TQString::null;
} else {
updateAnnotationFolderType();
}
@@ -1106,7 +1106,7 @@ void KMFolderCachedImap::serverSyncInternal()
// On the other hand, if the user changed the contentstype, there's no need to get first.
if ( !noContent() && mAccount->hasAnnotationSupport() &&
( kmkernel->iCalIface().isEnabled() || needToGetInitialAnnotations ) ) {
- QStringList annotations; // list of annotations to be fetched
+ TQStringList annotations; // list of annotations to be fetched
if ( !mAnnotationFolderTypeChanged || mAnnotationFolderType.isEmpty() )
annotations << KOLAB_FOLDERTYPE;
if ( !mIncidencesForChanged )
@@ -1121,10 +1121,10 @@ void KMFolderCachedImap::serverSyncInternal()
jd.cancellable = true;
mAccount->insertJob(job, jd);
- connect( job, SIGNAL(annotationResult(const QString&, const QString&, bool)),
- SLOT(slotAnnotationResult(const QString&, const QString&, bool)) );
- connect( job, SIGNAL(result(KIO::Job *)),
- SLOT(slotGetAnnotationResult(KIO::Job *)) );
+ connect( job, TQT_SIGNAL(annotationResult(const TQString&, const TQString&, bool)),
+ TQT_SLOT(slotAnnotationResult(const TQString&, const TQString&, bool)) );
+ connect( job, TQT_SIGNAL(result(KIO::Job *)),
+ TQT_SLOT(slotGetAnnotationResult(KIO::Job *)) );
break;
}
}
@@ -1144,7 +1144,7 @@ void KMFolderCachedImap::serverSyncInternal()
kdDebug(5006) << "Setting folder-type annotation for " << label() << " to " << mAnnotationFolderType << endl;
}
if ( mIncidencesForChanged ) {
- const QString val = incidencesForToString( mIncidencesFor );
+ const TQString val = incidencesForToString( mIncidencesFor );
KMail::AnnotationAttribute attr( KOLAB_INCIDENCESFOR, "value.shared", val );
annotations.append( attr );
kdDebug(5006) << "Setting incidences-for annotation for " << label() << " to " << val << endl;
@@ -1156,10 +1156,10 @@ void KMFolderCachedImap::serverSyncInternal()
jd.cancellable = true; // we can always do so later
mAccount->insertJob(job, jd);
- connect(job, SIGNAL(annotationChanged( const QString&, const QString&, const QString& ) ),
- SLOT( slotAnnotationChanged( const QString&, const QString&, const QString& ) ));
- connect(job, SIGNAL(result(KIO::Job *)),
- SLOT(slotSetAnnotationResult(KIO::Job *)));
+ connect(job, TQT_SIGNAL(annotationChanged( const TQString&, const TQString&, const TQString& ) ),
+ TQT_SLOT( slotAnnotationChanged( const TQString&, const TQString&, const TQString& ) ));
+ connect(job, TQT_SIGNAL(result(KIO::Job *)),
+ TQT_SLOT(slotSetAnnotationResult(KIO::Job *)));
break;
}
}
@@ -1182,10 +1182,10 @@ void KMFolderCachedImap::serverSyncInternal()
ImapAccountBase::jobData jd( url.url(), folder() );
mAccount->insertJob(job, jd);
- connect(job, SIGNAL(result(KIO::Job *)),
- SLOT(slotMultiSetACLResult(KIO::Job *)));
- connect(job, SIGNAL(aclChanged( const QString&, int )),
- SLOT(slotACLChanged( const QString&, int )) );
+ connect(job, TQT_SIGNAL(result(KIO::Job *)),
+ TQT_SLOT(slotMultiSetACLResult(KIO::Job *)));
+ connect(job, TQT_SIGNAL(aclChanged( const TQString&, int )),
+ TQT_SLOT(slotACLChanged( const TQString&, int )) );
break;
}
}
@@ -1196,8 +1196,8 @@ void KMFolderCachedImap::serverSyncInternal()
if( !noContent() && mAccount->hasACLSupport() ) {
newState( mProgress, i18n( "Retrieving permissions" ) );
mAccount->getACL( folder(), mImapPath );
- connect( mAccount, SIGNAL(receivedACL( KMFolder*, KIO::Job*, const KMail::ACLList& )),
- this, SLOT(slotReceivedACL( KMFolder*, KIO::Job*, const KMail::ACLList& )) );
+ connect( mAccount, TQT_SIGNAL(receivedACL( KMFolder*, KIO::Job*, const KMail::ACLList& )),
+ this, TQT_SLOT(slotReceivedACL( KMFolder*, KIO::Job*, const KMail::ACLList& )) );
break;
}
case SYNC_STATE_GET_QUOTA:
@@ -1210,10 +1210,10 @@ void KMFolderCachedImap::serverSyncInternal()
KIO::Job* job = KMail::QuotaJobs::getStorageQuota( mAccount->slave(), url );
ImapAccountBase::jobData jd( url.url(), folder() );
mAccount->insertJob(job, jd);
- connect( job, SIGNAL( storageQuotaResult( const QuotaInfo& ) ),
- SLOT( slotStorageQuotaResult( const QuotaInfo& ) ) );
- connect( job, SIGNAL(result(KIO::Job *)),
- SLOT(slotQuotaResult(KIO::Job *)) );
+ connect( job, TQT_SIGNAL( storageQuotaResult( const QuotaInfo& ) ),
+ TQT_SLOT( slotStorageQuotaResult( const QuotaInfo& ) ) );
+ connect( job, TQT_SIGNAL(result(KIO::Job *)),
+ TQT_SLOT(slotQuotaResult(KIO::Job *)) );
break;
}
case SYNC_STATE_FIND_SUBFOLDERS:
@@ -1258,8 +1258,8 @@ void KMFolderCachedImap::serverSyncInternal()
case SYNC_STATE_SYNC_SUBFOLDERS:
{
if( mCurrentSubfolder ) {
- disconnect( mCurrentSubfolder, SIGNAL( folderComplete(KMFolderCachedImap*, bool) ),
- this, SLOT( slotSubFolderComplete(KMFolderCachedImap*, bool) ) );
+ disconnect( mCurrentSubfolder, TQT_SIGNAL( folderComplete(KMFolderCachedImap*, bool) ),
+ this, TQT_SLOT( slotSubFolderComplete(KMFolderCachedImap*, bool) ) );
mCurrentSubfolder = 0;
}
@@ -1271,8 +1271,8 @@ void KMFolderCachedImap::serverSyncInternal()
} else {
mCurrentSubfolder = mSubfoldersForSync.front();
mSubfoldersForSync.pop_front();
- connect( mCurrentSubfolder, SIGNAL( folderComplete(KMFolderCachedImap*, bool) ),
- this, SLOT( slotSubFolderComplete(KMFolderCachedImap*, bool) ) );
+ connect( mCurrentSubfolder, TQT_SIGNAL( folderComplete(KMFolderCachedImap*, bool) ),
+ this, TQT_SLOT( slotSubFolderComplete(KMFolderCachedImap*, bool) ) );
//kdDebug(5006) << "Sync'ing subfolder " << mCurrentSubfolder->imapPath() << endl;
assert( !mCurrentSubfolder->imapPath().isEmpty() );
@@ -1292,10 +1292,10 @@ void KMFolderCachedImap::serverSyncInternal()
/* Connected to the imap account's connectionResult signal.
Emitted when the slave connected or failed to connect.
*/
-void KMFolderCachedImap::slotConnectionResult( int errorCode, const QString& errorMsg )
+void KMFolderCachedImap::slotConnectionResult( int errorCode, const TQString& errorMsg )
{
- disconnect( mAccount, SIGNAL( connectionResult(int, const QString&) ),
- this, SLOT( slotConnectionResult(int, const QString&) ) );
+ disconnect( mAccount, TQT_SIGNAL( connectionResult(int, const TQString&) ),
+ this, TQT_SLOT( slotConnectionResult(int, const TQString&) ) );
if ( !errorCode ) {
// Success
mSyncState = SYNC_STATE_GET_USERRIGHTS;
@@ -1309,9 +1309,9 @@ void KMFolderCachedImap::slotConnectionResult( int errorCode, const QString& err
}
/* find new messages (messages without a UID) */
-QValueList<unsigned long> KMFolderCachedImap::findNewMessages()
+TQValueList<unsigned long> KMFolderCachedImap::findNewMessages()
{
- QValueList<unsigned long> result;
+ TQValueList<unsigned long> result;
for( int i = 0; i < count(); ++i ) {
KMMsgBase *msg = getMsgBase( i );
if( !msg ) continue; /* what goes on if getMsg() returns 0? */
@@ -1324,20 +1324,20 @@ QValueList<unsigned long> KMFolderCachedImap::findNewMessages()
/* Upload new messages to server */
void KMFolderCachedImap::uploadNewMessages()
{
- QValueList<unsigned long> newMsgs = findNewMessages();
+ TQValueList<unsigned long> newMsgs = findNewMessages();
if( !newMsgs.isEmpty() ) {
if ( mUserRights <= 0 || ( mUserRights & ( KMail::ACLJobs::Insert ) ) ) {
newState( mProgress, i18n("Uploading messages to server"));
CachedImapJob *job = new CachedImapJob( newMsgs, CachedImapJob::tPutMessage, this );
- connect( job, SIGNAL( progress( unsigned long, unsigned long) ),
- this, SLOT( slotPutProgress(unsigned long, unsigned long) ) );
- connect( job, SIGNAL( finished() ), this, SLOT( serverSyncInternal() ) );
+ connect( job, TQT_SIGNAL( progress( unsigned long, unsigned long) ),
+ this, TQT_SLOT( slotPutProgress(unsigned long, unsigned long) ) );
+ connect( job, TQT_SIGNAL( finished() ), this, TQT_SLOT( serverSyncInternal() ) );
job->start();
return;
} else {
KMCommand *command = rescueUnsyncedMessages();
- connect( command, SIGNAL( completed( KMCommand * ) ),
- this, SLOT( serverSyncInternal() ) );
+ connect( command, TQT_SIGNAL( completed( KMCommand * ) ),
+ this, TQT_SLOT( serverSyncInternal() ) );
}
} else { // nothing to upload
if ( mUserRights != mOldUserRights && (mOldUserRights & KMail::ACLJobs::Insert)
@@ -1357,7 +1357,7 @@ void KMFolderCachedImap::slotPutProgress( unsigned long done, unsigned long tota
{
// (going from mProgress to mProgress+10)
int progressSpan = 10;
- newState( mProgress + (progressSpan * done) / total, QString::null );
+ newState( mProgress + (progressSpan * done) / total, TQString::null );
if ( done == total ) // we're done
mProgress += progressSpan;
}
@@ -1370,7 +1370,7 @@ void KMFolderCachedImap::uploadFlags()
newState( mProgress, i18n("Uploading status of messages to server"));
// FIXME DUPLICATED FROM KMFOLDERIMAP
- QMap< QString, QStringList > groups;
+ TQMap< TQString, TQStringList > groups;
//open(); //already done
for( int i = 0; i < count(); ++i ) {
KMMsgBase* msg = getMsgBase( i );
@@ -1378,28 +1378,28 @@ void KMFolderCachedImap::uploadFlags()
// Either not a valid message or not one that is on the server yet
continue;
- QString flags = KMFolderImap::statusToFlags(msg->status(), mPermanentFlags);
+ TQString flags = KMFolderImap::statusToFlags(msg->status(), mPermanentFlags);
// Collect uids for each typem of flags.
- QString uid;
+ TQString uid;
uid.setNum( msg->UID() );
groups[flags].append(uid);
}
- QMapIterator< QString, QStringList > dit;
+ TQMapIterator< TQString, TQStringList > dit;
for( dit = groups.begin(); dit != groups.end(); ++dit ) {
- QCString flags = dit.key().latin1();
- QStringList sets = KMFolderImap::makeSets( (*dit), true );
+ TQCString flags = dit.key().latin1();
+ TQStringList sets = KMFolderImap::makeSets( (*dit), true );
mStatusFlagsJobs += sets.count(); // ### that's not in kmfolderimap....
// Send off a status setting job for each set.
- for( QStringList::Iterator slit = sets.begin(); slit != sets.end(); ++slit ) {
- QString imappath = imapPath() + ";UID=" + ( *slit );
+ for( TQStringList::Iterator slit = sets.begin(); slit != sets.end(); ++slit ) {
+ TQString imappath = imapPath() + ";UID=" + ( *slit );
mAccount->setImapStatus(folder(), imappath, flags);
}
}
// FIXME END DUPLICATED FROM KMFOLDERIMAP
if ( mStatusFlagsJobs ) {
- connect( mAccount, SIGNAL( imapStatusChanged(KMFolder*, const QString&, bool) ),
- this, SLOT( slotImapStatusChanged(KMFolder*, const QString&, bool) ) );
+ connect( mAccount, TQT_SIGNAL( imapStatusChanged(KMFolder*, const TQString&, bool) ),
+ this, TQT_SLOT( slotImapStatusChanged(KMFolder*, const TQString&, bool) ) );
return;
}
}
@@ -1413,7 +1413,7 @@ void KMFolderCachedImap::uploadSeenFlags()
mStatusFlagsJobs = 0;
newState( mProgress, i18n("Uploading status of messages to server"));
- QValueList<ulong> seenUids, unseenUids;
+ TQValueList<ulong> seenUids, unseenUids;
for( int i = 0; i < count(); ++i ) {
KMMsgBase* msg = getMsgBase( i );
if( !msg || msg->UID() == 0 )
@@ -1426,25 +1426,25 @@ void KMFolderCachedImap::uploadSeenFlags()
unseenUids.append( msg->UID() );
}
if ( !seenUids.isEmpty() ) {
- QStringList sets = KMFolderImap::makeSets( seenUids, true );
+ TQStringList sets = KMFolderImap::makeSets( seenUids, true );
mStatusFlagsJobs += sets.count();
- for( QStringList::Iterator it = sets.begin(); it != sets.end(); ++it ) {
- QString imappath = imapPath() + ";UID=" + ( *it );
+ for( TQStringList::Iterator it = sets.begin(); it != sets.end(); ++it ) {
+ TQString imappath = imapPath() + ";UID=" + ( *it );
mAccount->setImapSeenStatus( folder(), imappath, true );
}
}
if ( !unseenUids.isEmpty() ) {
- QStringList sets = KMFolderImap::makeSets( unseenUids, true );
+ TQStringList sets = KMFolderImap::makeSets( unseenUids, true );
mStatusFlagsJobs += sets.count();
- for( QStringList::Iterator it = sets.begin(); it != sets.end(); ++it ) {
- QString imappath = imapPath() + ";UID=" + ( *it );
+ for( TQStringList::Iterator it = sets.begin(); it != sets.end(); ++it ) {
+ TQString imappath = imapPath() + ";UID=" + ( *it );
mAccount->setImapSeenStatus( folder(), imappath, false );
}
}
if ( mStatusFlagsJobs ) {
- connect( mAccount, SIGNAL( imapStatusChanged(KMFolder*, const QString&, bool) ),
- this, SLOT( slotImapStatusChanged(KMFolder*, const QString&, bool) ) );
+ connect( mAccount, TQT_SIGNAL( imapStatusChanged(KMFolder*, const TQString&, bool) ),
+ this, TQT_SLOT( slotImapStatusChanged(KMFolder*, const TQString&, bool) ) );
return;
}
}
@@ -1452,7 +1452,7 @@ void KMFolderCachedImap::uploadSeenFlags()
serverSyncInternal();
}
-void KMFolderCachedImap::slotImapStatusChanged(KMFolder* folder, const QString&, bool cont)
+void KMFolderCachedImap::slotImapStatusChanged(KMFolder* folder, const TQString&, bool cont)
{
if ( mSyncState == SYNC_STATE_INITIAL ){
//kdDebug(5006) << "IMAP status changed but reset " << endl;
@@ -1462,8 +1462,8 @@ void KMFolderCachedImap::slotImapStatusChanged(KMFolder* folder, const QString&,
if ( folder->storage() == this ) {
--mStatusFlagsJobs;
if ( mStatusFlagsJobs == 0 || !cont ) // done or aborting
- disconnect( mAccount, SIGNAL( imapStatusChanged(KMFolder*, const QString&, bool) ),
- this, SLOT( slotImapStatusChanged(KMFolder*, const QString&, bool) ) );
+ disconnect( mAccount, TQT_SIGNAL( imapStatusChanged(KMFolder*, const TQString&, bool) ),
+ this, TQT_SLOT( slotImapStatusChanged(KMFolder*, const TQString&, bool) ) );
if ( mStatusFlagsJobs == 0 && cont ) {
mProgress += 5;
serverSyncInternal();
@@ -1479,7 +1479,7 @@ void KMFolderCachedImap::setStatus( int idx, KMMsgStatus status, bool toggle)
mStatusChangedLocally = true;
}
-void KMFolderCachedImap::setStatus(QValueList<int>& ids, KMMsgStatus status, bool toggle)
+void KMFolderCachedImap::setStatus(TQValueList<int>& ids, KMMsgStatus status, bool toggle)
{
KMFolderMaildir::setStatus(ids, status, toggle);
mStatusChangedLocally = true;
@@ -1488,22 +1488,22 @@ void KMFolderCachedImap::setStatus(QValueList<int>& ids, KMMsgStatus status, boo
/* Upload new folders to server */
void KMFolderCachedImap::createNewFolders()
{
- QValueList<KMFolderCachedImap*> newFolders = findNewFolders();
+ TQValueList<KMFolderCachedImap*> newFolders = findNewFolders();
//kdDebug(5006) << label() << " createNewFolders:" << newFolders.count() << " new folders." << endl;
if( !newFolders.isEmpty() ) {
newState( mProgress, i18n("Creating subfolders on server"));
CachedImapJob *job = new CachedImapJob( newFolders, CachedImapJob::tAddSubfolders, this );
- connect( job, SIGNAL( result(KMail::FolderJob *) ), this, SLOT( slotIncreaseProgress() ) );
- connect( job, SIGNAL( finished() ), this, SLOT( serverSyncInternal() ) );
+ connect( job, TQT_SIGNAL( result(KMail::FolderJob *) ), this, TQT_SLOT( slotIncreaseProgress() ) );
+ connect( job, TQT_SIGNAL( finished() ), this, TQT_SLOT( serverSyncInternal() ) );
job->start();
} else {
serverSyncInternal();
}
}
-QValueList<KMFolderCachedImap*> KMFolderCachedImap::findNewFolders()
+TQValueList<KMFolderCachedImap*> KMFolderCachedImap::findNewFolders()
{
- QValueList<KMFolderCachedImap*> newFolders;
+ TQValueList<KMFolderCachedImap*> newFolders;
if( folder() && folder()->child() ) {
KMFolderNode *node = folder()->child()->first();
while( node ) {
@@ -1528,18 +1528,18 @@ QValueList<KMFolderCachedImap*> KMFolderCachedImap::findNewFolders()
bool KMFolderCachedImap::deleteMessages()
{
/* Delete messages from cache that are gone from the server */
- QPtrList<KMMessage> msgsForDeletion;
+ TQPtrList<KMMessage> msgsForDeletion;
// It is not possible to just go over all indices and remove
// them one by one because the index list can get resized under
// us. So use msg pointers instead
- QStringList uids;
- QMap<ulong,int>::const_iterator it = uidMap.constBegin();
+ TQStringList uids;
+ TQMap<ulong,int>::const_iterator it = uidMap.constBegin();
for( ; it != uidMap.end(); it++ ) {
ulong uid ( it.key() );
if( uid!=0 && !uidsOnServer.find( uid ) ) {
- uids << QString::number( uid );
+ uids << TQString::number( uid );
msgsForDeletion.append( getMsg( *it ) );
}
}
@@ -1560,12 +1560,12 @@ bool KMFolderCachedImap::deleteMessages()
/* Delete messages from the server that we dont have anymore */
if( !uidsForDeletionOnServer.isEmpty() ) {
newState( mProgress, i18n("Deleting removed messages from server"));
- QStringList sets = KMFolderImap::makeSets( uidsForDeletionOnServer, true );
+ TQStringList sets = KMFolderImap::makeSets( uidsForDeletionOnServer, true );
uidsForDeletionOnServer.clear();
kdDebug(5006) << "Deleting " << sets.count() << " sets of messages from server folder " << imapPath() << endl;
CachedImapJob *job = new CachedImapJob( sets, CachedImapJob::tDeleteMessage, this );
- connect( job, SIGNAL( result(KMail::FolderJob *) ),
- this, SLOT( slotDeleteMessagesResult(KMail::FolderJob *) ) );
+ connect( job, TQT_SIGNAL( result(KMail::FolderJob *) ),
+ this, TQT_SLOT( slotDeleteMessagesResult(KMail::FolderJob *) ) );
job->start();
return true;
} else {
@@ -1600,9 +1600,9 @@ void KMFolderCachedImap::checkUidValidity() {
else {
newState( mProgress, i18n("Checking folder validity"));
CachedImapJob *job = new CachedImapJob( FolderJob::tCheckUidValidity, this );
- connect( job, SIGNAL(permanentFlags(int)), SLOT(slotPermanentFlags(int)) );
- connect( job, SIGNAL( result( KMail::FolderJob* ) ),
- this, SLOT( slotCheckUidValidityResult( KMail::FolderJob* ) ) );
+ connect( job, TQT_SIGNAL(permanentFlags(int)), TQT_SLOT(slotPermanentFlags(int)) );
+ connect( job, TQT_SIGNAL( result( KMail::FolderJob* ) ),
+ this, TQT_SLOT( slotCheckUidValidityResult( KMail::FolderJob* ) ) );
job->start();
}
}
@@ -1651,8 +1651,8 @@ void KMFolderCachedImap::listMessages() {
mFoundAnIMAPDigest = false;
CachedImapJob* job = new CachedImapJob( FolderJob::tListMessages, this );
- connect( job, SIGNAL( result(KMail::FolderJob *) ),
- this, SLOT( slotGetLastMessagesResult(KMail::FolderJob *) ) );
+ connect( job, TQT_SIGNAL( result(KMail::FolderJob *) ),
+ this, TQT_SLOT( slotGetLastMessagesResult(KMail::FolderJob *) ) );
job->start();
}
@@ -1662,7 +1662,7 @@ void KMFolderCachedImap::slotGetLastMessagesResult(KMail::FolderJob *job)
}
// Connected to the listMessages job in CachedImapJob
-void KMFolderCachedImap::slotGetMessagesData(KIO::Job * job, const QByteArray & data)
+void KMFolderCachedImap::slotGetMessagesData(KIO::Job * job, const TQByteArray & data)
{
KMAcctCachedImap::JobIterator it = mAccount->findJob(job);
if ( it == mAccount->jobsEnd() ) { // Shouldn't happen
@@ -1674,7 +1674,7 @@ void KMFolderCachedImap::slotGetMessagesData(KIO::Job * job, const QByteArray &
serverSyncInternal(); /* HACK^W Fix: we should at least try to keep going */
return;
}
- (*it).cdata += QCString(data, data.size() + 1);
+ (*it).cdata += TQCString(data, data.size() + 1);
int pos = (*it).cdata.find("\r\n--IMAPDIGEST");
if (pos > 0) {
int a = (*it).cdata.find("\r\nX-uidValidity:");
@@ -1690,7 +1690,7 @@ void KMFolderCachedImap::slotGetMessagesData(KIO::Job * job, const QByteArray &
// sources for the readonly setting, in any case.
if (a != -1 && mUserRights == -1 ) {
int b = (*it).cdata.find("\r\n", a + 12);
- const QString access = (*it).cdata.mid(a + 12, b - a - 12);
+ const TQString access = (*it).cdata.mid(a + 12, b - a - 12);
setReadOnly( access == "Read only" );
}
(*it).cdata.remove(0, pos);
@@ -1711,7 +1711,7 @@ void KMFolderCachedImap::slotGetMessagesData(KIO::Job * job, const QByteArray &
*/
// The below is optimized for speed, not prettiness. The commented out chunk
// above was the solution copied from kmfolderimap, and it's 15-20% slower.
- const QCString& entry( (*it).cdata );
+ const TQCString& entry( (*it).cdata );
const int indexOfUID = entry.find("X-UID", 16);
const int startOfUIDValue = indexOfUID + 7;
const int indexOfLength = entry.find("X-Length", startOfUIDValue ); // we know length comes after UID
@@ -1833,7 +1833,7 @@ void KMFolderCachedImap::slotProgress(unsigned long done, unsigned long total)
//kdDebug(5006) << "KMFolderCachedImap::slotProgress done=" << done << " total=" << total << "=> mProgress=" << mProgress + ( progressSpan * done ) / total << endl;
// Progress info while retrieving new emails
// (going from mProgress to mProgress+progressSpan)
- newState( mProgress + (progressSpan * done) / total, QString::null );
+ newState( mProgress + (progressSpan * done) / total, TQString::null );
}
void KMFolderCachedImap::setAccount(KMAcctCachedImap *aAccount)
@@ -1843,7 +1843,7 @@ void KMFolderCachedImap::setAccount(KMAcctCachedImap *aAccount)
if( imapPath()=="/" ) aAccount->setFolder( folder() );
// Folder was renamed in a previous session, and the user didn't sync yet
- QString newName = mAccount->renamedFolder( imapPath() );
+ TQString newName = mAccount->renamedFolder( imapPath() );
if ( !newName.isEmpty() )
folder()->setLabel( newName );
@@ -1865,10 +1865,10 @@ void KMFolderCachedImap::listNamespaces()
mSyncState = SYNC_STATE_DELETE_SUBFOLDERS;
mPersonalNamespacesCheckDone = true;
- QStringList ns = mAccount->namespaces()[ImapAccountBase::OtherUsersNS];
+ TQStringList ns = mAccount->namespaces()[ImapAccountBase::OtherUsersNS];
ns += mAccount->namespaces()[ImapAccountBase::SharedNS];
mNamespacesToCheck = ns.count();
- for ( QStringList::Iterator it = ns.begin(); it != ns.end(); ++it )
+ for ( TQStringList::Iterator it = ns.begin(); it != ns.end(); ++it )
{
if ( (*it).isEmpty() ) {
// ignore empty listings as they have been listed before
@@ -1877,10 +1877,10 @@ void KMFolderCachedImap::listNamespaces()
}
KMail::ListJob* job = new KMail::ListJob( mAccount, type, this, mAccount->addPathToNamespace( *it ) );
job->setHonorLocalSubscription( true );
- connect( job, SIGNAL(receivedFolders(const QStringList&, const QStringList&,
- const QStringList&, const QStringList&, const ImapAccountBase::jobData&)),
- this, SLOT(slotCheckNamespace(const QStringList&, const QStringList&,
- const QStringList&, const QStringList&, const ImapAccountBase::jobData&)));
+ connect( job, TQT_SIGNAL(receivedFolders(const TQStringList&, const TQStringList&,
+ const TQStringList&, const TQStringList&, const ImapAccountBase::jobData&)),
+ this, TQT_SLOT(slotCheckNamespace(const TQStringList&, const TQStringList&,
+ const TQStringList&, const TQStringList&, const ImapAccountBase::jobData&)));
job->start();
}
if ( mNamespacesToCheck == 0 ) {
@@ -1890,7 +1890,7 @@ void KMFolderCachedImap::listNamespaces()
}
mPersonalNamespacesCheckDone = false;
- QString ns = mNamespacesToList.front();
+ TQString ns = mNamespacesToList.front();
mNamespacesToList.pop_front();
mSyncState = SYNC_STATE_LIST_SUBFOLDERS2;
@@ -1899,17 +1899,17 @@ void KMFolderCachedImap::listNamespaces()
mAccount->addPathToNamespace( ns ) );
job->setNamespace( ns );
job->setHonorLocalSubscription( true );
- connect( job, SIGNAL(receivedFolders(const QStringList&, const QStringList&,
- const QStringList&, const QStringList&, const ImapAccountBase::jobData&)),
- this, SLOT(slotListResult(const QStringList&, const QStringList&,
- const QStringList&, const QStringList&, const ImapAccountBase::jobData&)));
+ connect( job, TQT_SIGNAL(receivedFolders(const TQStringList&, const TQStringList&,
+ const TQStringList&, const TQStringList&, const ImapAccountBase::jobData&)),
+ this, TQT_SLOT(slotListResult(const TQStringList&, const TQStringList&,
+ const TQStringList&, const TQStringList&, const ImapAccountBase::jobData&)));
job->start();
}
-void KMFolderCachedImap::slotCheckNamespace( const QStringList& subfolderNames,
- const QStringList& subfolderPaths,
- const QStringList& subfolderMimeTypes,
- const QStringList& subfolderAttributes,
+void KMFolderCachedImap::slotCheckNamespace( const TQStringList& subfolderNames,
+ const TQStringList& subfolderPaths,
+ const TQStringList& subfolderMimeTypes,
+ const TQStringList& subfolderAttributes,
const ImapAccountBase::jobData& jobData )
{
Q_UNUSED( subfolderPaths );
@@ -1921,7 +1921,7 @@ void KMFolderCachedImap::slotCheckNamespace( const QStringList& subfolderNames,
// get a correct foldername:
// strip / and make sure it does not contain the delimiter
- QString name = jobData.path.mid( 1, jobData.path.length()-2 );
+ TQString name = jobData.path.mid( 1, jobData.path.length()-2 );
name.remove( mAccount->delimiterForNamespace( name ) );
if ( name.isEmpty() ) {
// should not happen
@@ -1987,19 +1987,19 @@ bool KMFolderCachedImap::listDirectory()
type = ImapAccountBase::ListSubscribed;
KMail::ListJob* job = new KMail::ListJob( mAccount, type, this );
job->setHonorLocalSubscription( true );
- connect( job, SIGNAL(receivedFolders(const QStringList&, const QStringList&,
- const QStringList&, const QStringList&, const ImapAccountBase::jobData&)),
- this, SLOT(slotListResult(const QStringList&, const QStringList&,
- const QStringList&, const QStringList&, const ImapAccountBase::jobData&)));
+ connect( job, TQT_SIGNAL(receivedFolders(const TQStringList&, const TQStringList&,
+ const TQStringList&, const TQStringList&, const ImapAccountBase::jobData&)),
+ this, TQT_SLOT(slotListResult(const TQStringList&, const TQStringList&,
+ const TQStringList&, const TQStringList&, const ImapAccountBase::jobData&)));
job->start();
return true;
}
-void KMFolderCachedImap::slotListResult( const QStringList& folderNames,
- const QStringList& folderPaths,
- const QStringList& folderMimeTypes,
- const QStringList& folderAttributes,
+void KMFolderCachedImap::slotListResult( const TQStringList& folderNames,
+ const TQStringList& folderPaths,
+ const TQStringList& folderMimeTypes,
+ const TQStringList& folderAttributes,
const ImapAccountBase::jobData& jobData )
{
Q_UNUSED( jobData );
@@ -2016,7 +2016,7 @@ void KMFolderCachedImap::slotListResult( const QStringList& folderNames,
KMFolderNode *node = folder()->child()->first();
bool root = ( this == mAccount->rootFolder() );
- QPtrList<KMFolder> toRemove;
+ TQPtrList<KMFolder> toRemove;
bool emptyList = ( root && mSubfolderNames.empty() );
if ( !emptyList ) {
while (node) {
@@ -2024,7 +2024,7 @@ void KMFolderCachedImap::slotListResult( const QStringList& folderNames,
KMFolderCachedImap *f = static_cast<KMFolderCachedImap*>(static_cast<KMFolder*>(node)->storage());
if ( mSubfolderNames.findIndex(node->name()) == -1 ) {
- QString name = node->name();
+ TQString name = node->name();
// as more than one namespace can be listed in the root folder we need to make sure
// that the folder is within the current namespace
bool isInNamespace = ( jobData.curNamespace.isEmpty() ||
@@ -2069,7 +2069,7 @@ void KMFolderCachedImap::slotListResult( const QStringList& folderNames,
// This synchronizes the local folders as needed (creation/deletion). No network communication here.
void KMFolderCachedImap::listDirectory2()
{
- QString path = folder()->path();
+ TQString path = folder()->path();
kmkernel->dimapFolderMgr()->quiet(true);
bool root = ( this == mAccount->rootFolder() );
@@ -2113,7 +2113,7 @@ void KMFolderCachedImap::listDirectory2()
}
// Find all subfolders present on server but not on disk
- QValueVector<int> foldersNewOnServer;
+ TQValueVector<int> foldersNewOnServer;
for (uint i = 0; i < mSubfolderNames.count(); i++) {
// Find the subdir, if already present
@@ -2126,7 +2126,7 @@ void KMFolderCachedImap::listDirectory2()
if (!node) {
// This folder is not present here
// Either it's new on the server, or we just deleted it.
- QString subfolderPath = mSubfolderPaths[i];
+ TQString subfolderPath = mSubfolderPaths[i];
// The code used to look at the uidcache to know if it was "just deleted".
// But this breaks with noContent folders and with shared folders.
// So instead we keep a list in the account.
@@ -2136,7 +2136,7 @@ void KMFolderCachedImap::listDirectory2()
// (could be that the folder was deleted & recreated meanwhile from another client...)
if ( !locallyDeleted && mAccount->isPreviouslyDeletedFolder( subfolderPath ) ) {
locallyDeleted = KMessageBox::warningYesNo(
- 0, i18n( "<qt><p>It seems that the folder <b>%1</b> was deleted. Do you want to delete it from the server?</p></qt>" ).arg( mSubfolderNames[i] ), QString::null, KStdGuiItem::del(), KStdGuiItem::cancel() ) == KMessageBox::Yes;
+ 0, i18n( "<qt><p>It seems that the folder <b>%1</b> was deleted. Do you want to delete it from the server?</p></qt>" ).arg( mSubfolderNames[i] ), TQString::null, KStdGuiItem::del(), KStdGuiItem::cancel() ) == KMessageBox::Yes;
}
if ( locallyDeleted ) {
@@ -2177,24 +2177,24 @@ void KMFolderCachedImap::listDirectory2()
&& GlobalSettings::self()->theIMAPResourceEnabled()
&& !foldersNewOnServer.isEmpty() ) {
- QStringList paths;
+ TQStringList paths;
for ( uint i = 0; i < foldersNewOnServer.count(); ++i )
paths << mSubfolderPaths[ foldersNewOnServer[i] ];
AnnotationJobs::MultiUrlGetAnnotationJob* job =
AnnotationJobs::multiUrlGetAnnotation( mAccount->slave(), mAccount->getUrl(), paths, KOLAB_FOLDERTYPE );
- ImapAccountBase::jobData jd( QString::null, folder() );
+ ImapAccountBase::jobData jd( TQString::null, folder() );
jd.cancellable = true;
mAccount->insertJob(job, jd);
- connect( job, SIGNAL(result(KIO::Job *)),
- SLOT(slotMultiUrlGetAnnotationResult(KIO::Job *)) );
+ connect( job, TQT_SIGNAL(result(KIO::Job *)),
+ TQT_SLOT(slotMultiUrlGetAnnotationResult(KIO::Job *)) );
} else {
createFoldersNewOnServerAndFinishListing( foldersNewOnServer );
}
}
-void KMFolderCachedImap::createFoldersNewOnServerAndFinishListing( const QValueVector<int> foldersNewOnServer )
+void KMFolderCachedImap::createFoldersNewOnServerAndFinishListing( const TQValueVector<int> foldersNewOnServer )
{
for ( uint i = 0; i < foldersNewOnServer.count(); ++i ) {
int idx = foldersNewOnServer[i];
@@ -2227,10 +2227,10 @@ void KMFolderCachedImap::createFoldersNewOnServerAndFinishListing( const QValueV
}
//-----------------------------------------------------------------------------
-KMFolderCachedImap* KMFolderCachedImap::findParent( const QString& path,
- const QString& name )
+KMFolderCachedImap* KMFolderCachedImap::findParent( const TQString& path,
+ const TQString& name )
{
- QString parent = path.left( path.length() - name.length() - 2 );
+ TQString parent = path.left( path.length() - name.length() - 2 );
if ( parent.length() > 1 )
{
// extract name of the parent
@@ -2267,8 +2267,8 @@ void KMFolderCachedImap::slotSubFolderComplete(KMFolderCachedImap* sub, bool suc
// success == false means the sync was aborted.
if ( mCurrentSubfolder ) {
Q_ASSERT( sub == mCurrentSubfolder );
- disconnect( mCurrentSubfolder, SIGNAL( folderComplete(KMFolderCachedImap*, bool) ),
- this, SLOT( slotSubFolderComplete(KMFolderCachedImap*, bool) ) );
+ disconnect( mCurrentSubfolder, TQT_SIGNAL( folderComplete(KMFolderCachedImap*, bool) ),
+ this, TQT_SLOT( slotSubFolderComplete(KMFolderCachedImap*, bool) ) );
mCurrentSubfolder = 0;
}
@@ -2279,11 +2279,11 @@ void KMFolderCachedImap::slotSubFolderComplete(KMFolderCachedImap* sub, bool suc
}
}
-void KMFolderCachedImap::slotSimpleData(KIO::Job * job, const QByteArray & data)
+void KMFolderCachedImap::slotSimpleData(KIO::Job * job, const TQByteArray & data)
{
KMAcctCachedImap::JobIterator it = mAccount->findJob(job);
if (it == mAccount->jobsEnd()) return;
- QBuffer buff((*it).data);
+ TQBuffer buff((*it).data);
buff.open(IO_WriteOnly | IO_Append);
buff.writeBlock(data.data(), data.size());
buff.close();
@@ -2291,9 +2291,9 @@ void KMFolderCachedImap::slotSimpleData(KIO::Job * job, const QByteArray & data)
FolderJob*
KMFolderCachedImap::doCreateJob( KMMessage *msg, FolderJob::JobType jt, KMFolder *folder,
- QString, const AttachmentStrategy* ) const
+ TQString, const AttachmentStrategy* ) const
{
- QPtrList<KMMessage> msgList;
+ TQPtrList<KMMessage> msgList;
msgList.append( msg );
CachedImapJob *job = new CachedImapJob( msgList, jt, folder? static_cast<KMFolderCachedImap*>( folder->storage() ):0 );
job->setParentFolder( this );
@@ -2301,7 +2301,7 @@ KMFolderCachedImap::doCreateJob( KMMessage *msg, FolderJob::JobType jt, KMFolder
}
FolderJob*
-KMFolderCachedImap::doCreateJob( QPtrList<KMMessage>& msgList, const QString& sets,
+KMFolderCachedImap::doCreateJob( TQPtrList<KMMessage>& msgList, const TQString& sets,
FolderJob::JobType jt, KMFolder *folder ) const
{
//FIXME: how to handle sets here?
@@ -2322,8 +2322,8 @@ void
KMFolderCachedImap::slotReceivedUserRights( KMFolder* folder )
{
if ( folder->storage() == this ) {
- disconnect( mAccount, SIGNAL( receivedUserRights( KMFolder* ) ),
- this, SLOT( slotReceivedUserRights( KMFolder* ) ) );
+ disconnect( mAccount, TQT_SIGNAL( receivedUserRights( KMFolder* ) ),
+ this, TQT_SLOT( slotReceivedUserRights( KMFolder* ) ) );
if ( mUserRights == 0 ) // didn't work
mUserRights = -1; // error code (used in folderdia)
else
@@ -2346,8 +2346,8 @@ void
KMFolderCachedImap::slotReceivedACL( KMFolder* folder, KIO::Job*, const KMail::ACLList& aclList )
{
if ( folder->storage() == this ) {
- disconnect( mAccount, SIGNAL(receivedACL( KMFolder*, KIO::Job*, const KMail::ACLList& )),
- this, SLOT(slotReceivedACL( KMFolder*, KIO::Job*, const KMail::ACLList& )) );
+ disconnect( mAccount, TQT_SIGNAL(receivedACL( KMFolder*, KIO::Job*, const KMail::ACLList& )),
+ this, TQT_SLOT(slotReceivedACL( KMFolder*, KIO::Job*, const KMail::ACLList& )) );
mACLList = aclList;
serverSyncInternal();
}
@@ -2393,7 +2393,7 @@ KMFolderCachedImap::slotMultiSetACLResult(KIO::Job *job)
}
void
-KMFolderCachedImap::slotACLChanged( const QString& userId, int permissions )
+KMFolderCachedImap::slotACLChanged( const TQString& userId, int permissions )
{
// The job indicates success in changing the permissions for this user
// -> we note that it's been done.
@@ -2417,7 +2417,7 @@ void KMFolderCachedImap::resetSyncState()
close("cachedimap");
// Don't use newState here, it would revert to mProgress (which is < current value when listing messages)
KPIM::ProgressItem *progressItem = mAccount->mailCheckProgressItem();
- QString str = i18n("Aborted");
+ TQString str = i18n("Aborted");
if (progressItem)
progressItem->setStatus( str );
emit statusMsg( str );
@@ -2428,19 +2428,19 @@ void KMFolderCachedImap::slotIncreaseProgress()
mProgress += 5;
}
-void KMFolderCachedImap::newState( int progress, const QString& syncStatus )
+void KMFolderCachedImap::newState( int progress, const TQString& syncStatus )
{
//kdDebug() << k_funcinfo << folder() << " " << mProgress << " " << syncStatus << endl;
KPIM::ProgressItem *progressItem = mAccount->mailCheckProgressItem();
if( progressItem )
progressItem->setCompletedItems( progress );
if ( !syncStatus.isEmpty() ) {
- QString str;
+ TQString str;
// For a subfolder, show the label. But for the main folder, it's already shown.
if ( mAccount->imapFolder() == this )
str = syncStatus;
else
- str = QString( "%1: %2" ).arg( label() ).arg( syncStatus );
+ str = TQString( "%1: %2" ).arg( label() ).arg( syncStatus );
if( progressItem )
progressItem->setStatus( str );
emit statusMsg( str );
@@ -2456,7 +2456,7 @@ void KMFolderCachedImap::setSubfolderState( imapState state )
{
// pass through to childs
KMFolderNode* node;
- QPtrListIterator<KMFolderNode> it( *folder()->child() );
+ TQPtrListIterator<KMFolderNode> it( *folder()->child() );
for ( ; (node = it.current()); )
{
++it;
@@ -2467,7 +2467,7 @@ void KMFolderCachedImap::setSubfolderState( imapState state )
}
}
-void KMFolderCachedImap::setImapPath(const QString &path)
+void KMFolderCachedImap::setImapPath(const TQString &path)
{
mImapPath = path;
}
@@ -2479,15 +2479,15 @@ void KMFolderCachedImap::setImapPath(const QString &path)
// on startup, it's too early there to know if this is a standard resource folder.
void KMFolderCachedImap::updateAnnotationFolderType()
{
- QString oldType = mAnnotationFolderType;
- QString oldSubType;
+ TQString oldType = mAnnotationFolderType;
+ TQString oldSubType;
int dot = oldType.find( '.' );
if ( dot != -1 ) {
oldType.truncate( dot );
oldSubType = mAnnotationFolderType.mid( dot + 1 );
}
- QString newType, newSubType;
+ TQString newType, newSubType;
// We want to store an annotation on the folder only if using the kolab storage.
if ( kmkernel->iCalIface().storageFormat( folder() ) == KMailICalIfaceImpl::StorageXML ) {
newType = KMailICalIfaceImpl::annotationForContentsType( mContentsType );
@@ -2499,7 +2499,7 @@ void KMFolderCachedImap::updateAnnotationFolderType()
//kdDebug(5006) << mImapPath << ": updateAnnotationFolderType: " << newType << " " << newSubType << endl;
if ( newType != oldType || newSubType != oldSubType ) {
- mAnnotationFolderType = newType + ( newSubType.isEmpty() ? QString::null : "."+newSubType );
+ mAnnotationFolderType = newType + ( newSubType.isEmpty() ? TQString::null : "."+newSubType );
mAnnotationFolderTypeChanged = true; // force a "set annotation" on next sync
kdDebug(5006) << mImapPath << ": updateAnnotationFolderType: '" << mAnnotationFolderType << "', was (" << oldType << " " << oldSubType << ") => mAnnotationFolderTypeChanged set to TRUE" << endl;
}
@@ -2515,7 +2515,7 @@ void KMFolderCachedImap::setIncidencesFor( IncidencesFor incfor )
}
}
-void KMFolderCachedImap::slotAnnotationResult(const QString& entry, const QString& value, bool found)
+void KMFolderCachedImap::slotAnnotationResult(const TQString& entry, const TQString& value, bool found)
{
if ( entry == KOLAB_FOLDERTYPE ) {
// There are four cases.
@@ -2524,8 +2524,8 @@ void KMFolderCachedImap::slotAnnotationResult(const QString& entry, const QStrin
// 3) different (known) content-type on server, no local change -> get it
// 4) different unknown content-type on server, probably some older version -> set it
if ( found ) {
- QString type = value;
- QString subtype;
+ TQString type = value;
+ TQString subtype;
int dot = value.find( '.' );
if ( dot != -1 ) {
type.truncate( dot );
@@ -2618,7 +2618,7 @@ void KMFolderCachedImap::slotMultiUrlGetAnnotationResult( KIO::Job* job )
Q_ASSERT( (*it).parent == folder() );
if ( (*it).parent != folder() ) return; // Shouldn't happen
- QValueVector<int> folders;
+ TQValueVector<int> folders;
AnnotationJobs::MultiUrlGetAnnotationJob* annjob
= static_cast<AnnotationJobs::MultiUrlGetAnnotationJob *>( job );
if ( annjob->error() ) {
@@ -2633,14 +2633,14 @@ void KMFolderCachedImap::slotMultiUrlGetAnnotationResult( KIO::Job* job )
kdWarning(5006) << "slotGetMultiUrlAnnotationResult: " << job->errorString() << endl;
} else {
// we got the annotation allright, let's filter out the ones with the wrong type
- QMap<QString, QString> annotations = annjob->annotations();
- QMap<QString, QString>::Iterator it = annotations.begin();
+ TQMap<TQString, TQString> annotations = annjob->annotations();
+ TQMap<TQString, TQString>::Iterator it = annotations.begin();
for ( ; it != annotations.end(); ++it ) {
- const QString folderPath = it.key();
- const QString annotation = it.data();
+ const TQString folderPath = it.key();
+ const TQString annotation = it.data();
kdDebug(5006) << k_funcinfo << "Folder: " << folderPath << " has type: " << annotation << endl;
// we're only interested in the main type
- QString type(annotation);
+ TQString type(annotation);
int dot = annotation.find( '.' );
if ( dot != -1 ) type.truncate( dot );
type = type.simplifyWhiteSpace();
@@ -2688,7 +2688,7 @@ void KMFolderCachedImap::slotQuotaResult( KIO::Job* job )
}
void
-KMFolderCachedImap::slotAnnotationChanged( const QString& entry, const QString& attribute, const QString& value )
+KMFolderCachedImap::slotAnnotationChanged( const TQString& entry, const TQString& attribute, const TQString& value )
{
Q_UNUSED( attribute );
Q_UNUSED( value );
@@ -2790,7 +2790,7 @@ bool KMFolderCachedImap::isMoveable() const
void KMFolderCachedImap::slotFolderDeletionOnServerFinished()
{
- for ( QStringList::const_iterator it = foldersForDeletionOnServer.constBegin();
+ for ( TQStringList::const_iterator it = foldersForDeletionOnServer.constBegin();
it != foldersForDeletionOnServer.constEnd(); ++it ) {
KURL url( mAccount->getUrl() );
url.setPath( *it );
@@ -2805,7 +2805,7 @@ int KMFolderCachedImap::createIndexFromContentsRecursive()
return 0;
KMFolderNode *node = 0;
- for( QPtrListIterator<KMFolderNode> it( *folder()->child() ); (node = it.current()); ++it ) {
+ for( TQPtrListIterator<KMFolderNode> it( *folder()->child() ); (node = it.current()); ++it ) {
if( !node->isDir() ) {
KMFolderCachedImap* storage = static_cast<KMFolderCachedImap*>(static_cast<KMFolder*>(node)->storage());
kdDebug() << k_funcinfo << "Re-indexing: " << storage->folder()->label() << endl;
@@ -2842,7 +2842,7 @@ bool KMFolderCachedImap::isCloseToQuota() const
KMCommand* KMFolderCachedImap::rescueUnsyncedMessages()
{
- QValueList<unsigned long> newMsgs = findNewMessages();
+ TQValueList<unsigned long> newMsgs = findNewMessages();
kdDebug() << k_funcinfo << newMsgs << " of " << count() << endl;
if ( newMsgs.isEmpty() )
return 0;
@@ -2850,7 +2850,7 @@ KMCommand* KMFolderCachedImap::rescueUnsyncedMessages()
bool manualMove = true;
while ( GlobalSettings::autoLostFoundMove() ) {
// find the inbox of this account
- KMFolder *inboxFolder = kmkernel->findFolderById( QString(".%1.directory/INBOX").arg( account()->id() ) );
+ KMFolder *inboxFolder = kmkernel->findFolderById( TQString(".%1.directory/INBOX").arg( account()->id() ) );
if ( !inboxFolder ) {
kdWarning(5006) << k_funcinfo << "inbox not found!" << endl;
break;
@@ -2882,15 +2882,15 @@ KMCommand* KMFolderCachedImap::rescueUnsyncedMessages()
break;
// create subfolder for this incident
- QDate today = QDate::currentDate();
- QString baseName = folder()->label() + "-" + QString::number( today.year() )
- + (today.month() < 10 ? "0" : "" ) + QString::number( today.month() )
- + (today.day() < 10 ? "0" : "" ) + QString::number( today.day() );
- QString name = baseName;
+ TQDate today = TQDate::currentDate();
+ TQString baseName = folder()->label() + "-" + TQString::number( today.year() )
+ + (today.month() < 10 ? "0" : "" ) + TQString::number( today.month() )
+ + (today.day() < 10 ? "0" : "" ) + TQString::number( today.day() );
+ TQString name = baseName;
int suffix = 0;
while ( (node = lfFolder->child()->hasNamedFolder( name )) ) {
++suffix;
- name = baseName + '-' + QString::number( suffix );
+ name = baseName + '-' + TQString::number( suffix );
}
kdDebug(5006) << k_funcinfo << "creating lost+found folder " << name << endl;
dest = kmkernel->dimapFolderMgr()->createFolder( name, false, KMFolderTypeCachedImap, lfFolder->child() );
@@ -2913,14 +2913,14 @@ KMCommand* KMFolderCachedImap::rescueUnsyncedMessages()
}
if ( manualMove ) {
- const QString msg ( i18n( "<p>There are new messages in this folder (%1), which "
+ const TQString msg ( i18n( "<p>There are new messages in this folder (%1), which "
"have not been uploaded to the server yet, but the folder has been deleted "
"on the server or you do not "
"have sufficient access rights on the folder now to upload them. "
"Please contact your administrator to allow upload of new messages "
"to you, or move them out of this folder.</p> "
"<p>Do you want to move these messages to another folder now?</p>").arg( folder()->prettyURL() ) );
- if ( KMessageBox::warningYesNo( 0, msg, QString::null, i18n("Move"), i18n("Do Not Move") ) == KMessageBox::Yes ) {
+ if ( KMessageBox::warningYesNo( 0, msg, TQString::null, i18n("Move"), i18n("Do Not Move") ) == KMessageBox::Yes ) {
KMail::KMFolderSelDlg dlg( kmkernel->getKMMainWidget(),
i18n("Move Messages to Folder"), true );
if ( dlg.exec() ) {
@@ -2929,7 +2929,7 @@ KMCommand* KMFolderCachedImap::rescueUnsyncedMessages()
}
}
if ( dest ) {
- QPtrList<KMMsgBase> msgs;
+ TQPtrList<KMMsgBase> msgs;
for( int i = 0; i < count(); ++i ) {
KMMsgBase *msg = getMsgBase( i );
if( !msg ) continue; /* what goes on if getMsg() returns 0? */
@@ -2953,8 +2953,8 @@ void KMFolderCachedImap::rescueUnsyncedMessagesAndDeleteFolder( KMFolder *folder
if ( storage ) {
KMCommand *command = storage->rescueUnsyncedMessages();
if ( command ) {
- connect( command, SIGNAL(completed(KMCommand*)),
- SLOT(slotRescueDone(KMCommand*)) );
+ connect( command, TQT_SIGNAL(completed(KMCommand*)),
+ TQT_SLOT(slotRescueDone(KMCommand*)) );
++mRescueCommandCount;
} else {
// nothing to rescue, close folder
@@ -2981,7 +2981,7 @@ void KMFolderCachedImap::slotRescueDone(KMCommand * command)
--mRescueCommandCount;
if ( mRescueCommandCount > 0 )
return;
- for ( QValueList<KMFolder*>::ConstIterator it = mToBeDeletedAfterRescue.constBegin();
+ for ( TQValueList<KMFolder*>::ConstIterator it = mToBeDeletedAfterRescue.constBegin();
it != mToBeDeletedAfterRescue.constEnd(); ++it ) {
kmkernel->dimapFolderMgr()->remove( *it );
}
diff --git a/kmail/kmfoldercachedimap.h b/kmail/kmfoldercachedimap.h
index 1ef82a3aa..726a7e06d 100644
--- a/kmail/kmfoldercachedimap.h
+++ b/kmail/kmfoldercachedimap.h
@@ -34,10 +34,10 @@
#include <kdialogbase.h>
#include <kstandarddirs.h>
-#include <qvaluelist.h>
-#include <qvaluevector.h>
-#include <qptrlist.h>
-#include <qdialog.h>
+#include <tqvaluelist.h>
+#include <tqvaluevector.h>
+#include <tqptrlist.h>
+#include <tqdialog.h>
#include "kmfoldermaildir.h"
#include "kmfolderimap.h"
@@ -73,7 +73,7 @@ public:
RefreshCache
};
- DImapTroubleShootDialog( QWidget* parent=0, const char* name=0 );
+ DImapTroubleShootDialog( TQWidget* parent=0, const char* name=0 );
static int run();
@@ -81,8 +81,8 @@ private slots:
void slotDone();
private:
- QRadioButton *mIndexButton, *mCacheButton;
- QComboBox *mIndexScope;
+ TQRadioButton *mIndexButton, *mCacheButton;
+ TQComboBox *mIndexScope;
int rc;
};
@@ -91,7 +91,7 @@ class KMFolderCachedImap : public KMFolderMaildir
Q_OBJECT
public:
- static QString cacheLocation() {
+ static TQString cacheLocation() {
return locateLocal("data", "kmail/dimap" );
}
@@ -145,8 +145,8 @@ public:
virtual void setSubfolderState(imapState state);
/** The path to the imap folder on the server */
- void setImapPath(const QString &path);
- QString imapPath() const { return mImapPath; }
+ void setImapPath(const TQString &path);
+ TQString imapPath() const { return mImapPath; }
/** The highest UID in the folder */
void setLastUid( ulong uid );
@@ -156,8 +156,8 @@ public:
KMMsgBase* findByUID( ulong uid );
/** The uidvalidity of the last update */
- void setUidValidity(const QString &validity) { mUidValidity = validity; }
- QString uidValidity() const { return mUidValidity; }
+ void setUidValidity(const TQString &validity) { mUidValidity = validity; }
+ TQString uidValidity() const { return mUidValidity; }
/** Forget which mails are considered locally present. Needed when uidvalidity
* changes. */
@@ -168,7 +168,7 @@ public:
KMAcctCachedImap* account() const;
/** Returns the filename of the uidcache file */
- QString uidCacheLocation() const;
+ TQString uidCacheLocation() const;
/** Read the uidValitidy and lastUid values from disk */
int readUidCache();
@@ -180,7 +180,7 @@ public:
int progress() const { return mProgress; }
/* Reimplemented from KMFolder. Moving is not supported, so aParent must be 0 */
- virtual int rename(const QString& aName, KMFolderDir *aParent=0);
+ virtual int rename(const TQString& aName, KMFolderDir *aParent=0);
/**
* Reimplemented from KMFolderMaildir
@@ -206,7 +206,7 @@ public:
/* Reimplemented from KMFolderMaildir */
virtual void removeMsg(int i, bool imapQuiet = false);
- virtual void removeMsg(QPtrList<KMMessage> msgList, bool imapQuiet = false)
+ virtual void removeMsg(TQPtrList<KMMessage> msgList, bool imapQuiet = false)
{ FolderStorage::removeMsg(msgList, imapQuiet); }
/// Is the folder readonly?
@@ -269,7 +269,7 @@ public:
void setQuotaInfo( const QuotaInfo & );
/// Return the list of ACL for this folder
- typedef QValueVector<KMail::ACLListEntry> ACLList;
+ typedef TQValueVector<KMail::ACLListEntry> ACLList;
const ACLList& aclList() const { return mACLList; }
/// Set the list of ACL for this folder (for FolderDiaACLTab)
@@ -277,9 +277,9 @@ public:
// Reimplemented so the mStatusChangedLocally bool can be set
virtual void setStatus( int id, KMMsgStatus status, bool toggle );
- virtual void setStatus( QValueList<int>& ids, KMMsgStatus status, bool toggle );
+ virtual void setStatus( TQValueList<int>& ids, KMMsgStatus status, bool toggle );
- QString annotationFolderType() const { return mAnnotationFolderType; }
+ TQString annotationFolderType() const { return mAnnotationFolderType; }
// For kmailicalifaceimpl only
void updateAnnotationFolderType();
@@ -305,15 +305,15 @@ public:
* List of namespaces that need to be queried
* Is set by the account for the root folder when the listing starts
*/
- QStringList namespacesToList() { return mNamespacesToList; }
- void setNamespacesToList( QStringList list ) { mNamespacesToList = list; }
+ TQStringList namespacesToList() { return mNamespacesToList; }
+ void setNamespacesToList( TQStringList list ) { mNamespacesToList = list; }
/**
* Specify an imap path that is used to create the folder on the server
* Otherwise the parent folder is used to construct the path
*/
- const QString& imapPathForCreation() { return mImapPathCreation; }
- void setImapPathForCreation( const QString& path ) { mImapPathCreation = path; }
+ const TQString& imapPathForCreation() { return mImapPathCreation; }
+ void setImapPathForCreation( const TQString& path ) { mImapPathCreation = path; }
/** \reimp */
bool isCloseToQuota() const;
@@ -322,10 +322,10 @@ public:
int permanentFlags() const { return mPermanentFlags; }
- QString folderAttributes() const { return mFolderAttributes; }
+ TQString folderAttributes() const { return mFolderAttributes; }
protected slots:
- void slotGetMessagesData(KIO::Job * job, const QByteArray & data);
+ void slotGetMessagesData(KIO::Job * job, const TQByteArray & data);
void getMessagesResult(KMail::FolderJob *, bool lastSet);
void slotGetLastMessagesResult(KMail::FolderJob *);
void slotProgress(unsigned long done, unsigned long total);
@@ -335,7 +335,7 @@ protected slots:
void slotSubFolderComplete(KMFolderCachedImap*, bool);
// Connected to the imap account
- void slotConnectionResult( int errorCode, const QString& errorMsg );
+ void slotConnectionResult( int errorCode, const TQString& errorMsg );
void slotCheckUidValidityResult( KMail::FolderJob* job );
void slotPermanentFlags( int flags );
@@ -347,11 +347,11 @@ protected slots:
void slotReceivedACL( KMFolder*, KIO::Job*, const KMail::ACLList& );
void slotMultiSetACLResult(KIO::Job *);
- void slotACLChanged( const QString&, int );
- void slotAnnotationResult(const QString& entry, const QString& value, bool found);
- void slotAnnotationChanged( const QString& entry, const QString& attribute, const QString& value );
+ void slotACLChanged( const TQString&, int );
+ void slotAnnotationResult(const TQString& entry, const TQString& value, bool found);
+ void slotAnnotationChanged( const TQString& entry, const TQString& attribute, const TQString& value );
void slotDeleteMessagesResult(KMail::FolderJob *);
- void slotImapStatusChanged(KMFolder* folder, const QString&, bool);
+ void slotImapStatusChanged(KMFolder* folder, const TQString&, bool);
void slotStorageQuotaResult( const QuotaInfo& );
void slotQuotaResult( KIO::Job* job );
@@ -366,32 +366,32 @@ protected:
void createNewFolders();
void listDirectory2();
- void createFoldersNewOnServerAndFinishListing( const QValueVector<int> foldersNewOnServer );
+ void createFoldersNewOnServerAndFinishListing( const TQValueVector<int> foldersNewOnServer );
/** Utility methods for syncing. Finds new messages
in the local cache that must be uploaded */
- virtual QValueList<unsigned long> findNewMessages();
+ virtual TQValueList<unsigned long> findNewMessages();
/** Utility methods for syncing. Finds new subfolders
in the local cache that must be created in the server */
- virtual QValueList<KMFolderCachedImap*> findNewFolders();
+ virtual TQValueList<KMFolderCachedImap*> findNewFolders();
/** This returns false if we have subfolders. Otherwise it returns ::canRemoveFolder() */
virtual bool canRemoveFolder() const;
/** Reimplemented from KMFolder */
virtual FolderJob* doCreateJob( KMMessage *msg, FolderJob::JobType jt, KMFolder *folder,
- QString partSpecifier, const AttachmentStrategy *as ) const;
- virtual FolderJob* doCreateJob( QPtrList<KMMessage>& msgList, const QString& sets,
+ TQString partSpecifier, const AttachmentStrategy *as ) const;
+ virtual FolderJob* doCreateJob( TQPtrList<KMMessage>& msgList, const TQString& sets,
FolderJob::JobType jt, KMFolder *folder ) const;
- virtual void timerEvent( QTimerEvent* );
+ virtual void timerEvent( TQTimerEvent* );
/* update progress status */
- void newState( int progress, const QString& syncStatus );
+ void newState( int progress, const TQString& syncStatus );
/** See if there is a better parent then this folder */
- KMFolderCachedImap* findParent( const QString& path, const QString& name );
+ KMFolderCachedImap* findParent( const TQString& path, const TQString& name );
@@ -399,7 +399,7 @@ public slots:
/**
* Add the data a KIO::Job retrieves to the buffer
*/
- void slotSimpleData(KIO::Job * job, const QByteArray & data);
+ void slotSimpleData(KIO::Job * job, const TQByteArray & data);
/**
* Troubleshoot the IMAP cache
@@ -410,15 +410,15 @@ public slots:
* Connected to ListJob::receivedFolders
* creates/removes folders
*/
- void slotListResult( const QStringList&, const QStringList&,
- const QStringList&, const QStringList&, const ImapAccountBase::jobData& );
+ void slotListResult( const TQStringList&, const TQStringList&,
+ const TQStringList&, const TQStringList&, const ImapAccountBase::jobData& );
/**
* Connected to ListJob::receivedFolders
* creates namespace folders
*/
- void slotCheckNamespace( const QStringList&, const QStringList&,
- const QStringList&, const QStringList&, const ImapAccountBase::jobData& );
+ void slotCheckNamespace( const TQStringList&, const TQStringList&,
+ const TQStringList&, const TQStringList&, const ImapAccountBase::jobData& );
private slots:
void serverSyncInternal();
@@ -438,7 +438,7 @@ signals:
private:
void setReadOnly( bool readOnly );
- QString state2String( int state ) const;
+ TQString state2String( int state ) const;
void rememberDeletion( int );
/** Rescue not yet synced messages to a lost+found folder in case
syncing is not possible because the folder has been deleted on the
@@ -479,34 +479,34 @@ private:
int mProgress;
int mStatusFlagsJobs;
- QString mUidValidity;
- QString mImapPath;
+ TQString mUidValidity;
+ TQString mImapPath;
imapState mContentState, mSubfolderState;
- QStringList mSubfolderNames, mSubfolderPaths,
+ TQStringList mSubfolderNames, mSubfolderPaths,
mSubfolderMimeTypes, mSubfolderAttributes;
- QString mFolderAttributes;
- QString mAnnotationFolderType;
+ TQString mFolderAttributes;
+ TQString mAnnotationFolderType;
IncidencesFor mIncidencesFor;
bool mHasInbox;
bool mIsSelected;
bool mCheckFlags;
bool mReadOnly;
- mutable QGuardedPtr<KMAcctCachedImap> mAccount;
+ mutable TQGuardedPtr<KMAcctCachedImap> mAccount;
- QIntDict<int> uidsOnServer;
- QValueList<ulong> uidsForDeletionOnServer;
- QValueList<KMail::CachedImapJob::MsgForDownload> mMsgsForDownload;
- QValueList<ulong> mUidsForDownload;
- QStringList foldersForDeletionOnServer;
+ TQIntDict<int> uidsOnServer;
+ TQValueList<ulong> uidsForDeletionOnServer;
+ TQValueList<KMail::CachedImapJob::MsgForDownload> mMsgsForDownload;
+ TQValueList<ulong> mUidsForDownload;
+ TQStringList foldersForDeletionOnServer;
- QValueList<KMFolderCachedImap*> mSubfoldersForSync;
+ TQValueList<KMFolderCachedImap*> mSubfoldersForSync;
KMFolderCachedImap* mCurrentSubfolder;
/** Mapping uid -> index
Keep updated in addMsg, take and removeMsg. This is used to lookup
whether a mail is present locally or not. */
- QMap<ulong,int> uidMap;
+ TQMap<ulong,int> uidMap;
bool uidMapDirty;
void reloadUidMap();
int uidWriteTimer;
@@ -549,16 +549,16 @@ private:
/// Set to true when the "incidences-for" annotation needs to be set on the next sync
bool mIncidencesForChanged;
- QStringList mNamespacesToList;
+ TQStringList mNamespacesToList;
int mNamespacesToCheck;
bool mPersonalNamespacesCheckDone;
- QString mImapPathCreation;
+ TQString mImapPathCreation;
QuotaInfo mQuotaInfo;
- QMap<ulong,void*> mDeletedUIDsSinceLastSync;
+ TQMap<ulong,void*> mDeletedUIDsSinceLastSync;
bool mAlarmsBlocked;
- QValueList<KMFolder*> mToBeDeletedAfterRescue;
+ TQValueList<KMFolder*> mToBeDeletedAfterRescue;
int mRescueCommandCount;
int mPermanentFlags;
diff --git a/kmail/kmfoldercombobox.cpp b/kmail/kmfoldercombobox.cpp
index 49e14b573..499d444f1 100644
--- a/kmail/kmfoldercombobox.cpp
+++ b/kmail/kmfoldercombobox.cpp
@@ -8,8 +8,8 @@
//-----------------------------------------------------------------------------
-KMFolderComboBox::KMFolderComboBox( QWidget *parent, char *name )
- : QComboBox( parent, name )
+KMFolderComboBox::KMFolderComboBox( TQWidget *parent, char *name )
+ : TQComboBox( parent, name )
{
init();
}
@@ -17,8 +17,8 @@ KMFolderComboBox::KMFolderComboBox( QWidget *parent, char *name )
//-----------------------------------------------------------------------------
-KMFolderComboBox::KMFolderComboBox( bool rw, QWidget *parent, char *name )
- : QComboBox( rw, parent, name )
+KMFolderComboBox::KMFolderComboBox( bool rw, TQWidget *parent, char *name )
+ : TQComboBox( rw, parent, name )
{
init();
}
@@ -32,15 +32,15 @@ void KMFolderComboBox::init()
mOutboxShown = true;
mImapShown = true;
refreshFolders();
- connect( this, SIGNAL( activated(int) ),
- this, SLOT( slotActivated(int) ) );
- connect( kmkernel->folderMgr(), SIGNAL(changed()),
- this, SLOT(refreshFolders()) );
- connect( kmkernel->dimapFolderMgr(), SIGNAL(changed()),
- this, SLOT(refreshFolders()) );
+ connect( this, TQT_SIGNAL( activated(int) ),
+ this, TQT_SLOT( slotActivated(int) ) );
+ connect( kmkernel->folderMgr(), TQT_SIGNAL(changed()),
+ this, TQT_SLOT(refreshFolders()) );
+ connect( kmkernel->dimapFolderMgr(), TQT_SIGNAL(changed()),
+ this, TQT_SLOT(refreshFolders()) );
if (mImapShown)
- connect( kmkernel->imapFolderMgr(), SIGNAL(changed()),
- this, SLOT(refreshFolders()) );
+ connect( kmkernel->imapFolderMgr(), TQT_SIGNAL(changed()),
+ this, TQT_SLOT(refreshFolders()) );
}
@@ -59,22 +59,22 @@ void KMFolderComboBox::showImapFolders(bool shown)
mImapShown = shown;
refreshFolders();
if (shown)
- connect( kmkernel->imapFolderMgr(), SIGNAL(changed()),
- this, SLOT(refreshFolders()) );
+ connect( kmkernel->imapFolderMgr(), TQT_SIGNAL(changed()),
+ this, TQT_SLOT(refreshFolders()) );
else
- disconnect( kmkernel->imapFolderMgr(), SIGNAL(changed()),
- this, SLOT(refreshFolders()) );
+ disconnect( kmkernel->imapFolderMgr(), TQT_SIGNAL(changed()),
+ this, TQT_SLOT(refreshFolders()) );
}
//-----------------------------------------------------------------------------
-void KMFolderComboBox::createFolderList(QStringList *names,
- QValueList<QGuardedPtr<KMFolder> > *folders)
+void KMFolderComboBox::createFolderList(TQStringList *names,
+ TQValueList<TQGuardedPtr<KMFolder> > *folders)
{
kmkernel->folderMgr()->createI18nFolderList( names, folders );
if ( !mOutboxShown ) {
- QValueList< QGuardedPtr<KMFolder> >::iterator folderIt = folders->begin();
- QStringList::iterator namesIt = names->begin();
+ TQValueList< TQGuardedPtr<KMFolder> >::iterator folderIt = folders->begin();
+ TQStringList::iterator namesIt = names->begin();
for ( ; folderIt != folders->end(); ++folderIt, ++namesIt ) {
KMFolder *folder = *folderIt;
if ( folder == kmkernel->outboxFolder() )
@@ -96,8 +96,8 @@ void KMFolderComboBox::createFolderList(QStringList *names,
void KMFolderComboBox::refreshFolders()
{
- QStringList names;
- QValueList<QGuardedPtr<KMFolder> > folders;
+ TQStringList names;
+ TQValueList<TQGuardedPtr<KMFolder> > folders;
createFolderList( &names, &folders );
KMFolder *folder = getFolder();
@@ -110,8 +110,8 @@ void KMFolderComboBox::refreshFolders()
void KMFolderComboBox::setFolder( KMFolder *aFolder )
{
- QStringList names;
- QValueList<QGuardedPtr<KMFolder> > folders;
+ TQStringList names;
+ TQValueList<TQGuardedPtr<KMFolder> > folders;
createFolderList( &names, &folders );
int idx = folders.findIndex( aFolder );
@@ -122,7 +122,7 @@ void KMFolderComboBox::setFolder( KMFolder *aFolder )
mFolder = aFolder;
}
-void KMFolderComboBox::setFolder( const QString &idString )
+void KMFolderComboBox::setFolder( const TQString &idString )
{
KMFolder * folder = kmkernel->findFolderById( idString );
if (!folder && !idString.isEmpty())
@@ -146,16 +146,16 @@ KMFolder *KMFolderComboBox::getFolder()
if (mFolder)
return mFolder;
- QStringList names;
- QValueList<QGuardedPtr<KMFolder> > folders;
+ TQStringList names;
+ TQValueList<TQGuardedPtr<KMFolder> > folders;
createFolderList( &names, &folders );
if (currentItem() == mSpecialIdx)
return 0;
- QString text = currentText();
+ TQString text = currentText();
int idx = 0;
- QStringList::Iterator it;
+ TQStringList::Iterator it;
for ( it = names.begin(); it != names.end(); ++it ) {
if ( ! (*it).compare( text ) )
return *folders.at( idx );
@@ -169,8 +169,8 @@ KMFolder *KMFolderComboBox::getFolder()
void KMFolderComboBox::slotActivated(int index)
{
- QStringList names;
- QValueList<QGuardedPtr<KMFolder> > folders;
+ TQStringList names;
+ TQValueList<TQGuardedPtr<KMFolder> > folders;
createFolderList( &names, &folders );
if (index == mSpecialIdx)
diff --git a/kmail/kmfoldercombobox.h b/kmail/kmfoldercombobox.h
index 1b46c104f..38268e752 100644
--- a/kmail/kmfoldercombobox.h
+++ b/kmail/kmfoldercombobox.h
@@ -1,5 +1,5 @@
/* kmail folder-list combo-box
- * A specialized QComboBox widget that refreshes its contents when
+ * A specialized TQComboBox widget that refreshes its contents when
* the folder list changes.
*/
@@ -8,16 +8,16 @@
#include "kmfolder.h"
-#include <qcombobox.h>
-#include <qguardedptr.h>
+#include <tqcombobox.h>
+#include <tqguardedptr.h>
class KMFolderComboBox : public QComboBox
{
Q_OBJECT
public:
- KMFolderComboBox( QWidget *parent = 0, char *name = 0 );
- KMFolderComboBox( bool rw, QWidget *parent = 0, char *name = 0 );
+ KMFolderComboBox( TQWidget *parent = 0, char *name = 0 );
+ KMFolderComboBox( bool rw, TQWidget *parent = 0, char *name = 0 );
/** Select whether the outbox folder is shown. Default is yes. */
void showOutboxFolder(bool shown);
@@ -26,7 +26,7 @@ public:
void showImapFolders(bool shown);
void setFolder( KMFolder *aFolder );
- void setFolder( const QString &idString );
+ void setFolder( const TQString &idString );
KMFolder *getFolder();
public slots:
@@ -38,11 +38,11 @@ private slots:
private:
/** Create folder list using the folder manager. */
- void createFolderList(QStringList *names,
- QValueList<QGuardedPtr<KMFolder> > *folders);
+ void createFolderList(TQStringList *names,
+ TQValueList<TQGuardedPtr<KMFolder> > *folders);
void init();
- QGuardedPtr<KMFolder> mFolder;
+ TQGuardedPtr<KMFolder> mFolder;
bool mOutboxShown;
bool mImapShown;
int mSpecialIdx;
diff --git a/kmail/kmfolderdia.cpp b/kmail/kmfolderdia.cpp
index 2e4044ab0..cf02fcddf 100644
--- a/kmail/kmfolderdia.cpp
+++ b/kmail/kmfolderdia.cpp
@@ -59,19 +59,19 @@
#include <klistview.h>
#include <kpushbutton.h>
-#include <qcheckbox.h>
-#include <qlayout.h>
-#include <qgroupbox.h>
-#include <qregexp.h>
-#include <qlabel.h>
-#include <qvbox.h>
-#include <qtooltip.h>
-#include <qwhatsthis.h>
+#include <tqcheckbox.h>
+#include <tqlayout.h>
+#include <tqgroupbox.h>
+#include <tqregexp.h>
+#include <tqlabel.h>
+#include <tqvbox.h>
+#include <tqtooltip.h>
+#include <tqwhatsthis.h>
#include <assert.h>
-#include <qhbuttongroup.h>
-#include <qradiobutton.h>
-#include <qtextedit.h>
+#include <tqhbuttongroup.h>
+#include <tqradiobutton.h>
+#include <tqtextedit.h>
#include "templatesconfiguration.h"
#include "templatesconfiguration_kfg.h"
@@ -80,12 +80,12 @@
using namespace KMail;
-static QString inCaseWeDecideToRenameTheTab( I18N_NOOP( "Permissions (ACL)" ) );
+static TQString inCaseWeDecideToRenameTheTab( I18N_NOOP( "Permissions (ACL)" ) );
//-----------------------------------------------------------------------------
KMFolderDialog::KMFolderDialog(KMFolder *aFolder, KMFolderDir *aFolderDir,
- KMFolderTree* aParent, const QString& aCap,
- const QString& aName):
+ KMFolderTree* aParent, const TQString& aCap,
+ const TQString& aName):
KDialogBase( KDialogBase::Tabbed,
aCap, KDialogBase::Ok|KDialogBase::Cancel,
KDialogBase::Ok, aParent, "KMFolderDialog", TRUE ),
@@ -97,8 +97,8 @@ KMFolderDialog::KMFolderDialog(KMFolder *aFolder, KMFolderDir *aFolderDir,
{
kdDebug(5006)<<"KMFolderDialog::KMFolderDialog()" << endl;
- QStringList folderNames;
- QValueList<QGuardedPtr<KMFolder> > folders;
+ TQStringList folderNames;
+ TQValueList<TQGuardedPtr<KMFolder> > folders;
// get all folders but search and folders that can not have children
aParent->createFolderList(&folderNames, &folders, true, true,
true, false, true, false);
@@ -116,7 +116,7 @@ KMFolderDialog::KMFolderDialog(KMFolder *aFolder, KMFolderDir *aFolderDir,
}
FolderDiaTab* tab;
- QVBox* box;
+ TQVBox* box;
box = addVBoxPage( i18n("General") );
tab = new FolderDiaGeneralTab( this, aName, box );
@@ -149,12 +149,12 @@ KMFolderDialog::KMFolderDialog(KMFolder *aFolder, KMFolderDir *aFolderDir,
void KMFolderDialog::addTab( FolderDiaTab* tab )
{
- connect( tab, SIGNAL( readyForAccept() ),
- this, SLOT( slotReadyForAccept() ) );
- connect( tab, SIGNAL( cancelAccept() ),
- this, SLOT( slotCancelAccept() ) );
- //connect( tab, SIGNAL(changed( bool )),
- // this, SLOT(slotChanged( bool )) );
+ connect( tab, TQT_SIGNAL( readyForAccept() ),
+ this, TQT_SLOT( slotReadyForAccept() ) );
+ connect( tab, TQT_SIGNAL( cancelAccept() ),
+ this, TQT_SLOT( slotCancelAccept() ) );
+ //connect( tab, TQT_SIGNAL(changed( bool )),
+ // this, TQT_SLOT(slotChanged( bool )) );
mTabs.append( tab );
}
@@ -233,20 +233,20 @@ void KMFolderDialog::setFolder( KMFolder* folder )
mFolder = folder;
}
-static void addLine( QWidget *parent, QVBoxLayout* layout )
+static void addLine( TQWidget *parent, TQVBoxLayout* layout )
{
- QFrame *line = new QFrame( parent, "line" );
- line->setGeometry( QRect( 80, 150, 250, 20 ) );
- line->setFrameShape( QFrame::HLine );
- line->setFrameShadow( QFrame::Sunken );
- line->setFrameShape( QFrame::HLine );
+ TQFrame *line = new TQFrame( parent, "line" );
+ line->setGeometry( TQRect( 80, 150, 250, 20 ) );
+ line->setFrameShape( TQFrame::HLine );
+ line->setFrameShadow( TQFrame::Sunken );
+ line->setFrameShape( TQFrame::HLine );
layout->addWidget( line );
}
//----------------------------------------------------------------------------
KMail::FolderDiaGeneralTab::FolderDiaGeneralTab( KMFolderDialog* dlg,
- const QString& aName,
- QWidget* parent, const char* name )
+ const TQString& aName,
+ TQWidget* parent, const char* name )
: FolderDiaTab( parent, name ), mDlg( dlg )
{
@@ -255,17 +255,17 @@ KMail::FolderDiaGeneralTab::FolderDiaGeneralTab( KMFolderDialog* dlg,
mDlg->folder()->folderType() != KMFolderTypeImap &&
mDlg->folder()->folderType() != KMFolderTypeCachedImap;
- QLabel *label;
+ TQLabel *label;
- QVBoxLayout *topLayout = new QVBoxLayout( this, 0, KDialog::spacingHint() );
+ TQVBoxLayout *topLayout = new TQVBoxLayout( this, 0, KDialog::spacingHint() );
// Musn't be able to edit details for a system folder.
if ( !mIsLocalSystemFolder ) {
- QHBoxLayout *hl = new QHBoxLayout( topLayout );
+ TQHBoxLayout *hl = new TQHBoxLayout( topLayout );
hl->setSpacing( KDialog::spacingHint() );
- label = new QLabel( i18n("&Name:"), this );
+ label = new TQLabel( i18n("&Name:"), this );
hl->addWidget( label );
mNameEdit = new KLineEdit( this );
@@ -277,7 +277,7 @@ KMail::FolderDiaGeneralTab::FolderDiaGeneralTab( KMFolderDialog* dlg,
mNameEdit->setMinimumSize(mNameEdit->sizeHint());
// prevent renaming of IMAP inbox
if ( mDlg->folder() && mDlg->folder()->isSystemFolder() ) {
- QString imapPath;
+ TQString imapPath;
if ( mDlg->folder()->folderType() == KMFolderTypeImap )
imapPath = static_cast<KMFolderImap*>( mDlg->folder()->storage() )->imapPath();
if ( mDlg->folder()->folderType() == KMFolderTypeCachedImap )
@@ -287,21 +287,21 @@ KMail::FolderDiaGeneralTab::FolderDiaGeneralTab( KMFolderDialog* dlg,
}
label->setBuddy( mNameEdit );
hl->addWidget( mNameEdit );
- connect( mNameEdit, SIGNAL( textChanged( const QString & ) ),
- this, SLOT( slotFolderNameChanged( const QString & ) ) );
+ connect( mNameEdit, TQT_SIGNAL( textChanged( const TQString & ) ),
+ this, TQT_SLOT( slotFolderNameChanged( const TQString & ) ) );
//start icons group
- QVBoxLayout *ivl = new QVBoxLayout( topLayout );
+ TQVBoxLayout *ivl = new TQVBoxLayout( topLayout );
ivl->setSpacing( KDialog::spacingHint() );
- QHBoxLayout *ihl = new QHBoxLayout( ivl );
- mIconsCheckBox = new QCheckBox( i18n("Use custom &icons"), this );
+ TQHBoxLayout *ihl = new TQHBoxLayout( ivl );
+ mIconsCheckBox = new TQCheckBox( i18n("Use custom &icons"), this );
mIconsCheckBox->setChecked( false );
ihl->addWidget( mIconsCheckBox );
ihl->addStretch( 2 );
- mNormalIconLabel = new QLabel( i18n("&Normal:"), this );
+ mNormalIconLabel = new TQLabel( i18n("&Normal:"), this );
mNormalIconLabel->setEnabled( false );
ihl->addWidget( mNormalIconLabel );
@@ -316,7 +316,7 @@ KMail::FolderDiaGeneralTab::FolderDiaGeneralTab( KMFolderDialog* dlg,
mNormalIconButton->setEnabled( false );
ihl->addWidget( mNormalIconButton );
- mUnreadIconLabel = new QLabel( i18n("&Unread:"), this );
+ mUnreadIconLabel = new TQLabel( i18n("&Unread:"), this );
mUnreadIconLabel->setEnabled( false );
ihl->addWidget( mUnreadIconLabel );
@@ -332,17 +332,17 @@ KMail::FolderDiaGeneralTab::FolderDiaGeneralTab( KMFolderDialog* dlg,
ihl->addWidget( mUnreadIconButton );
ihl->addStretch( 1 );
- connect( mIconsCheckBox, SIGNAL(toggled(bool)),
- mNormalIconButton, SLOT(setEnabled(bool)) );
- connect( mIconsCheckBox, SIGNAL(toggled(bool)),
- mUnreadIconButton, SLOT(setEnabled(bool)) );
- connect( mIconsCheckBox, SIGNAL(toggled(bool)),
- mNormalIconLabel, SLOT(setEnabled(bool)) );
- connect( mIconsCheckBox, SIGNAL(toggled(bool)),
- mUnreadIconLabel, SLOT(setEnabled(bool)) );
+ connect( mIconsCheckBox, TQT_SIGNAL(toggled(bool)),
+ mNormalIconButton, TQT_SLOT(setEnabled(bool)) );
+ connect( mIconsCheckBox, TQT_SIGNAL(toggled(bool)),
+ mUnreadIconButton, TQT_SLOT(setEnabled(bool)) );
+ connect( mIconsCheckBox, TQT_SIGNAL(toggled(bool)),
+ mNormalIconLabel, TQT_SLOT(setEnabled(bool)) );
+ connect( mIconsCheckBox, TQT_SIGNAL(toggled(bool)),
+ mUnreadIconLabel, TQT_SLOT(setEnabled(bool)) );
- connect( mNormalIconButton, SIGNAL(iconChanged(QString)),
- this, SLOT(slotChangeIcon(QString)) );
+ connect( mNormalIconButton, TQT_SIGNAL(iconChanged(TQString)),
+ this, TQT_SLOT(slotChangeIcon(TQString)) );
//end icons group
addLine( this, topLayout);
@@ -350,11 +350,11 @@ KMail::FolderDiaGeneralTab::FolderDiaGeneralTab( KMFolderDialog* dlg,
// should new mail in this folder be ignored?
- QHBoxLayout *hbl = new QHBoxLayout( topLayout );
+ TQHBoxLayout *hbl = new TQHBoxLayout( topLayout );
hbl->setSpacing( KDialog::spacingHint() );
mNotifyOnNewMailCheckBox =
- new QCheckBox( i18n("Act on new/unread mail in this folder" ), this );
- QWhatsThis::add( mNotifyOnNewMailCheckBox,
+ new TQCheckBox( i18n("Act on new/unread mail in this folder" ), this );
+ TQWhatsThis::add( mNotifyOnNewMailCheckBox,
i18n( "<qt><p>If this option is enabled then you will be notified about "
"new/unread mail in this folder. Moreover, going to the "
"next/previous folder with unread messages will stop at this "
@@ -369,9 +369,9 @@ KMail::FolderDiaGeneralTab::FolderDiaGeneralTab( KMFolderDialog* dlg,
if ( mDlg->folder()->folderType() == KMFolderTypeImap ) {
// should this folder be included in new-mail-checks?
- QHBoxLayout *nml = new QHBoxLayout( topLayout );
+ TQHBoxLayout *nml = new TQHBoxLayout( topLayout );
nml->setSpacing( KDialog::spacingHint() );
- mNewMailCheckBox = new QCheckBox( i18n("Include this folder in mail checks"), this );
+ mNewMailCheckBox = new TQCheckBox( i18n("Include this folder in mail checks"), this );
// default is on
mNewMailCheckBox->setChecked(true);
nml->addWidget( mNewMailCheckBox );
@@ -379,11 +379,11 @@ KMail::FolderDiaGeneralTab::FolderDiaGeneralTab( KMFolderDialog* dlg,
}
// should replies to mails in this folder be kept in this same folder?
- hbl = new QHBoxLayout( topLayout );
+ hbl = new TQHBoxLayout( topLayout );
hbl->setSpacing( KDialog::spacingHint() );
mKeepRepliesInSameFolderCheckBox =
- new QCheckBox( i18n("Keep replies in this folder" ), this );
- QWhatsThis::add( mKeepRepliesInSameFolderCheckBox,
+ new TQCheckBox( i18n("Keep replies in this folder" ), this );
+ TQWhatsThis::add( mKeepRepliesInSameFolderCheckBox,
i18n( "Check this option if you want replies you write "
"to mails in this folder to be put in this same folder "
"after sending, instead of in the configured sent-mail folder." ) );
@@ -393,25 +393,25 @@ KMail::FolderDiaGeneralTab::FolderDiaGeneralTab( KMFolderDialog* dlg,
addLine( this, topLayout );
// use grid layout for the following combobox settings
- QGridLayout *gl = new QGridLayout( topLayout, 3, 2, KDialog::spacingHint() );
+ TQGridLayout *gl = new TQGridLayout( topLayout, 3, 2, KDialog::spacingHint() );
gl->setColStretch( 1, 100 ); // make the second column use all available space
int row = -1;
// sender or receiver column?
++row;
- QString tip = i18n("Show Sender/Receiver Column in List of Messages");
+ TQString tip = i18n("Show Sender/Receiver Column in List of Messages");
- QLabel *sender_label = new QLabel( i18n("Sho&w column:" ), this );
+ TQLabel *sender_label = new TQLabel( i18n("Sho&w column:" ), this );
gl->addWidget( sender_label, row, 0 );
- mShowSenderReceiverComboBox = new QComboBox( this );
- QToolTip::add( mShowSenderReceiverComboBox, tip );
+ mShowSenderReceiverComboBox = new TQComboBox( this );
+ TQToolTip::add( mShowSenderReceiverComboBox, tip );
sender_label->setBuddy(mShowSenderReceiverComboBox);
gl->addWidget( mShowSenderReceiverComboBox, row, 1 );
mShowSenderReceiverComboBox->insertItem(i18n("Default"), 0);
mShowSenderReceiverComboBox->insertItem(i18n("Sender"), 1);
mShowSenderReceiverComboBox->insertItem(i18n("Receiver"), 2);
- QString whoField;
+ TQString whoField;
if (mDlg->folder()) whoField = mDlg->folder()->userWhoField();
if (whoField.isEmpty()) mShowSenderReceiverComboBox->setCurrentItem(0);
else if (whoField == "From") mShowSenderReceiverComboBox->setCurrentItem(1);
@@ -420,12 +420,12 @@ KMail::FolderDiaGeneralTab::FolderDiaGeneralTab( KMFolderDialog* dlg,
// sender identity
++row;
- label = new QLabel( i18n("&Sender identity:"), this );
+ label = new TQLabel( i18n("&Sender identity:"), this );
gl->addWidget( label, row, 0 );
mIdentityComboBox = new KPIM::IdentityCombo( kmkernel->identityManager(), this );
label->setBuddy( mIdentityComboBox );
gl->addWidget( mIdentityComboBox, row, 1 );
- QWhatsThis::add( mIdentityComboBox,
+ TQWhatsThis::add( mIdentityComboBox,
i18n( "Select the sender identity to be used when writing new mail "
"or replying to mail in this folder. This means that if you are in "
"one of your work folders, you can make KMail use the corresponding "
@@ -439,9 +439,9 @@ KMail::FolderDiaGeneralTab::FolderDiaGeneralTab( KMFolderDialog* dlg,
// Only do make this settable, if the IMAP resource is enabled
// and it's not the personal folders (those must not be changed)
++row;
- label = new QLabel( i18n("&Folder contents:"), this );
+ label = new TQLabel( i18n("&Folder contents:"), this );
gl->addWidget( label, row, 0 );
- mContentsComboBox = new QComboBox( this );
+ mContentsComboBox = new TQComboBox( this );
label->setBuddy( mContentsComboBox );
gl->addWidget( mContentsComboBox, row, 1 );
@@ -453,8 +453,8 @@ KMail::FolderDiaGeneralTab::FolderDiaGeneralTab( KMFolderDialog* dlg,
mContentsComboBox->insertItem( i18n( "Journal" ) );
if ( mDlg->folder() )
mContentsComboBox->setCurrentItem( mDlg->folder()->storage()->contentsType() );
- connect ( mContentsComboBox, SIGNAL ( activated( int ) ),
- this, SLOT( slotFolderContentsSelectionChanged( int ) ) );
+ connect ( mContentsComboBox, TQT_SIGNAL ( activated( int ) ),
+ this, TQT_SLOT( slotFolderContentsSelectionChanged( int ) ) );
if ( mDlg->folder()->isReadOnly() )
mContentsComboBox->setEnabled( false );
} else {
@@ -472,13 +472,13 @@ KMail::FolderDiaGeneralTab::FolderDiaGeneralTab( KMFolderDialog* dlg,
mContentsComboBox ) {
++row;
- QLabel* label = new QLabel( i18n( "Generate free/&busy and activate alarms for:" ), this );
+ TQLabel* label = new TQLabel( i18n( "Generate free/&busy and activate alarms for:" ), this );
gl->addWidget( label, row, 0 );
- mIncidencesForComboBox = new QComboBox( this );
+ mIncidencesForComboBox = new TQComboBox( this );
label->setBuddy( mIncidencesForComboBox );
gl->addWidget( mIncidencesForComboBox, row, 1 );
- const QString whatsThisForMyOwnFolders =
+ const TQString whatsThisForMyOwnFolders =
i18n( "This setting defines which users sharing "
"this folder should get \"busy\" periods in their freebusy lists "
"and should see the alarms for the events or tasks in this folder. "
@@ -493,20 +493,20 @@ KMail::FolderDiaGeneralTab::FolderDiaGeneralTab( KMFolderDialog* dlg,
"A company-wide folder with optional events in it would use \"Nobody\" "
"since it is not known who will go to those events." );
- QWhatsThis::add( mIncidencesForComboBox, whatsThisForMyOwnFolders );
+ TQWhatsThis::add( mIncidencesForComboBox, whatsThisForMyOwnFolders );
mIncidencesForComboBox->insertItem( i18n( "Nobody" ) );
mIncidencesForComboBox->insertItem( i18n( "Admins of This Folder" ) );
mIncidencesForComboBox->insertItem( i18n( "All Readers of This Folder" ) );
++row;
- const QString whatsThisForReadOnlyFolders =
+ const TQString whatsThisForReadOnlyFolders =
i18n( "This setting allows you to disable alarms for folders shared by "
"others. ");
- mAlarmsBlockedCheckBox = new QCheckBox( this );
+ mAlarmsBlockedCheckBox = new TQCheckBox( this );
gl->addWidget( mAlarmsBlockedCheckBox, row, 0 );
- label = new QLabel( i18n( "Block free/&busy and alarms locally" ), this );
+ label = new TQLabel( i18n( "Block free/&busy and alarms locally" ), this );
gl->addWidget( label, row, 1 );
label->setBuddy( mAlarmsBlockedCheckBox );
- QWhatsThis::add( mAlarmsBlockedCheckBox, whatsThisForReadOnlyFolders );
+ TQWhatsThis::add( mAlarmsBlockedCheckBox, whatsThisForReadOnlyFolders );
if ( mDlg->folder()->storage()->contentsType() != KMail::ContentsTypeCalendar
&& mDlg->folder()->storage()->contentsType() != KMail::ContentsTypeTask ) {
@@ -535,7 +535,7 @@ void FolderDiaGeneralTab::initializeWithValuesFromFolder( KMFolder* folder ) {
mNormalIconButton->setEnabled( folder->useCustomIcons() );
mUnreadIconLabel->setEnabled( folder->useCustomIcons() );
mUnreadIconButton->setEnabled( folder->useCustomIcons() );
- QString iconPath = folder->normalIconPath();
+ TQString iconPath = folder->normalIconPath();
if ( !iconPath.isEmpty() )
mNormalIconButton->setIcon( iconPath );
iconPath = folder->unreadIconPath();
@@ -571,7 +571,7 @@ void FolderDiaGeneralTab::initializeWithValuesFromFolder( KMFolder* folder ) {
}
//-----------------------------------------------------------------------------
-void FolderDiaGeneralTab::slotFolderNameChanged( const QString& str )
+void FolderDiaGeneralTab::slotFolderNameChanged( const TQString& str )
{
mDlg->enableButtonOK( !str.isEmpty() );
}
@@ -582,7 +582,7 @@ void FolderDiaGeneralTab::slotFolderContentsSelectionChanged( int )
KMail::FolderContentsType type =
static_cast<KMail::FolderContentsType>( mContentsComboBox->currentItem() );
if( type != KMail::ContentsTypeMail && GlobalSettings::self()->hideGroupwareFolders() ) {
- QString message = i18n("You have configured this folder to contain groupware information "
+ TQString message = i18n("You have configured this folder to contain groupware information "
"and the general configuration option to hide groupware folders is "
"set. That means that this folder will disappear once the configuration "
"dialog is closed. If you want to remove the folder again, you will need "
@@ -613,10 +613,10 @@ bool FolderDiaGeneralTab::save()
folder->setIgnoreNewMail( !mNotifyOnNewMailCheckBox->isChecked() );
folder->setPutRepliesInSameFolder( mKeepRepliesInSameFolderCheckBox->isChecked() );
- QString fldName, oldFldName;
+ TQString fldName, oldFldName;
if ( !mIsLocalSystemFolder )
{
- QString acctName;
+ TQString acctName;
oldFldName = mDlg->folder()->name();
if (!mNameEdit->text().isEmpty())
@@ -628,7 +628,7 @@ bool FolderDiaGeneralTab::save()
mDlg->parentFolder()->folderType() != KMFolderTypeImap &&
mDlg->parentFolder()->folderType() != KMFolderTypeCachedImap )
fldName.remove('/');
- fldName.remove(QRegExp("^\\.*"));
+ fldName.remove(TQRegExp("^\\.*"));
if (fldName.isEmpty()) fldName = i18n("unnamed");
@@ -697,14 +697,14 @@ bool FolderDiaGeneralTab::save()
return true;
}
-void FolderDiaGeneralTab::slotChangeIcon( QString icon ) // can't use a const-ref here, due to KIconButton's signal
+void FolderDiaGeneralTab::slotChangeIcon( TQString icon ) // can't use a const-ref here, due to KIconButton's signal
{
mUnreadIconButton->setIcon( icon );
}
//----------------------------------------------------------------------------
KMail::FolderDiaTemplatesTab::FolderDiaTemplatesTab( KMFolderDialog* dlg,
- QWidget* parent )
+ TQWidget* parent )
: FolderDiaTab( parent, 0 ), mDlg( dlg )
{
@@ -712,32 +712,32 @@ KMail::FolderDiaTemplatesTab::FolderDiaTemplatesTab( KMFolderDialog* dlg,
mDlg->folder()->folderType() != KMFolderTypeImap &&
mDlg->folder()->folderType() != KMFolderTypeCachedImap;
- QVBoxLayout *topLayout = new QVBoxLayout( this, 0, KDialog::spacingHint() );
+ TQVBoxLayout *topLayout = new TQVBoxLayout( this, 0, KDialog::spacingHint() );
- mCustom = new QCheckBox( i18n("&Use custom message templates"), this );
+ mCustom = new TQCheckBox( i18n("&Use custom message templates"), this );
topLayout->addWidget( mCustom );
mWidget = new TemplatesConfiguration( this , "folder-templates" );
mWidget->setEnabled( false );
topLayout->addWidget( mWidget );
- QHBoxLayout *btns = new QHBoxLayout( topLayout, KDialog::spacingHint() );
+ TQHBoxLayout *btns = new TQHBoxLayout( topLayout, KDialog::spacingHint() );
mCopyGlobal = new KPushButton( i18n("&Copy global templates"), this );
mCopyGlobal->setEnabled( false );
btns->addWidget( mCopyGlobal );
- connect( mCustom, SIGNAL(toggled(bool)),
- mWidget, SLOT(setEnabled(bool)) );
- connect( mCustom, SIGNAL(toggled(bool)),
- mCopyGlobal, SLOT(setEnabled(bool)) );
+ connect( mCustom, TQT_SIGNAL(toggled(bool)),
+ mWidget, TQT_SLOT(setEnabled(bool)) );
+ connect( mCustom, TQT_SIGNAL(toggled(bool)),
+ mCopyGlobal, TQT_SLOT(setEnabled(bool)) );
- connect( mCopyGlobal, SIGNAL(clicked()),
- this, SLOT(slotCopyGlobal()) );
+ connect( mCopyGlobal, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotCopyGlobal()) );
initializeWithValuesFromFolder( mDlg->folder() );
- connect( mWidget, SIGNAL( changed() ),
- this, SLOT( slotEmitChanged( void ) ) );
+ connect( mWidget, TQT_SIGNAL( changed() ),
+ this, TQT_SLOT( slotEmitChanged( void ) ) );
}
void FolderDiaTemplatesTab::load()
@@ -751,7 +751,7 @@ void FolderDiaTemplatesTab::initializeWithValuesFromFolder( KMFolder* folder ) {
mFolder = folder;
- QString fid = folder->idString();
+ TQString fid = folder->idString();
Templates t( fid );
@@ -767,7 +767,7 @@ bool FolderDiaTemplatesTab::save()
{
KMFolder* folder = mDlg->folder();
- QString fid = folder->idString();
+ TQString fid = folder->idString();
Templates t(fid);
kdDebug() << "use custom templates for folder " << fid << ": " << mCustom->isChecked() << endl;
diff --git a/kmail/kmfolderdia.h b/kmail/kmfolderdia.h
index c1df2b546..f516e8bac 100644
--- a/kmail/kmfolderdia.h
+++ b/kmail/kmfolderdia.h
@@ -34,7 +34,7 @@
#include <kdialogbase.h>
#include "configuredialog_p.h"
-#include <qvaluevector.h>
+#include <tqvaluevector.h>
class QCheckBox;
class QPushButton;
@@ -71,8 +71,8 @@ class FolderDiaTab : public QWidget
{
Q_OBJECT
public:
- FolderDiaTab( QWidget *parent=0, const char* name=0 )
- : QWidget( parent, name ) {}
+ FolderDiaTab( TQWidget *parent=0, const char* name=0 )
+ : TQWidget( parent, name ) {}
virtual void load() = 0;
@@ -114,37 +114,37 @@ class FolderDiaGeneralTab : public FolderDiaTab
public:
FolderDiaGeneralTab( KMFolderDialog* dlg,
- const QString& aName,
- QWidget* parent, const char* name = 0 );
+ const TQString& aName,
+ TQWidget* parent, const char* name = 0 );
virtual void load();
virtual bool save();
private slots:
- void slotChangeIcon( QString icon );
+ void slotChangeIcon( TQString icon );
/*
* is called if the folder dropdown changes
* then we update the other items to reflect the capabilities
*/
- void slotFolderNameChanged( const QString& );
+ void slotFolderNameChanged( const TQString& );
void slotFolderContentsSelectionChanged( int );
private:
void initializeWithValuesFromFolder( KMFolder* folder );
private:
- QComboBox *mShowSenderReceiverComboBox;
- QComboBox *mContentsComboBox;
- QComboBox *mIncidencesForComboBox;
- QCheckBox *mAlarmsBlockedCheckBox;
- QLabel *mNormalIconLabel;
+ TQComboBox *mShowSenderReceiverComboBox;
+ TQComboBox *mContentsComboBox;
+ TQComboBox *mIncidencesForComboBox;
+ TQCheckBox *mAlarmsBlockedCheckBox;
+ TQLabel *mNormalIconLabel;
KIconButton *mNormalIconButton;
- QLabel *mUnreadIconLabel;
+ TQLabel *mUnreadIconLabel;
KIconButton *mUnreadIconButton;
- QCheckBox *mIconsCheckBox;
- QCheckBox *mNewMailCheckBox;
- QCheckBox *mNotifyOnNewMailCheckBox;
- QCheckBox *mKeepRepliesInSameFolderCheckBox;
+ TQCheckBox *mIconsCheckBox;
+ TQCheckBox *mNewMailCheckBox;
+ TQCheckBox *mNotifyOnNewMailCheckBox;
+ TQCheckBox *mKeepRepliesInSameFolderCheckBox;
KLineEdit *mNameEdit;
KPIM::IdentityCombo *mIdentityComboBox;
@@ -162,7 +162,7 @@ class FolderDiaTemplatesTab : public FolderDiaTab
Q_OBJECT
public:
- FolderDiaTemplatesTab( KMFolderDialog *dlg, QWidget *parent );
+ FolderDiaTemplatesTab( KMFolderDialog *dlg, TQWidget *parent );
virtual void load();
virtual bool save();
@@ -176,7 +176,7 @@ private:
void initializeWithValuesFromFolder( KMFolder* folder );
private:
- QCheckBox* mCustom;
+ TQCheckBox* mCustom;
TemplatesConfiguration* mWidget;
KPushButton* mCopyGlobal;
KMFolder* mFolder;
@@ -197,8 +197,8 @@ class KMFolderDialog : public KDialogBase
public:
KMFolderDialog( KMFolder *folder, KMFolderDir *aFolderDir,
- KMFolderTree* parent, const QString& caption,
- const QString& name = QString::null );
+ KMFolderTree* parent, const TQString& caption,
+ const TQString& name = TQString::null );
KMFolder* folder() const { return mFolder; }
void setFolder( KMFolder* folder );
@@ -207,7 +207,7 @@ public:
bool isNewFolder() const { return mIsNewFolder; }
KMFolderDir* folderDir() const { return mFolderDir; }
- typedef QValueList<QGuardedPtr<KMFolder> > FolderList;
+ typedef TQValueList<TQGuardedPtr<KMFolder> > FolderList;
KMFolder* parentFolder() const { return mParentFolder; }
@@ -226,13 +226,13 @@ private:
private:
// Can be 0 initially when creating a folder, but will be set by save() in the first tab.
- QGuardedPtr<KMFolder> mFolder;
- QGuardedPtr<KMFolderDir> mFolderDir;
- QGuardedPtr<KMFolder> mParentFolder;
+ TQGuardedPtr<KMFolder> mFolder;
+ TQGuardedPtr<KMFolderDir> mFolderDir;
+ TQGuardedPtr<KMFolder> mParentFolder;
bool mIsNewFolder; // if true, save() did set mFolder.
- QValueVector<KMail::FolderDiaTab*> mTabs;
+ TQValueVector<KMail::FolderDiaTab*> mTabs;
int mDelayedSavingTabs; // this should go into a base class one day
KMFolderTree* mFolderTree;
};
diff --git a/kmail/kmfolderdir.cpp b/kmail/kmfolderdir.cpp
index 1092e41cd..46aba345c 100644
--- a/kmail/kmfolderdir.cpp
+++ b/kmail/kmfolderdir.cpp
@@ -1,7 +1,7 @@
// kmfolderdir.cpp
#include <config.h>
-#include <qdir.h>
+#include <tqdir.h>
#include "kmfolderdir.h"
#include "kmfoldersearch.h"
@@ -18,7 +18,7 @@
//=============================================================================
//=============================================================================
-KMFolderRootDir::KMFolderRootDir(KMFolderMgr* manager, const QString& path,
+KMFolderRootDir::KMFolderRootDir(KMFolderMgr* manager, const TQString& path,
KMFolderDirType dirType)
: KMFolderDir( 0, 0, path, dirType ),
mPath( path ),
@@ -36,31 +36,31 @@ KMFolderRootDir::~KMFolderRootDir()
}
//-----------------------------------------------------------------------------
-void KMFolderRootDir::setPath(const QString& aPath)
+void KMFolderRootDir::setPath(const TQString& aPath)
{
mPath = aPath;
}
//-----------------------------------------------------------------------------
-QString KMFolderRootDir::path() const
+TQString KMFolderRootDir::path() const
{
return mPath;
}
//-----------------------------------------------------------------------------
-QString KMFolderRootDir::prettyURL() const
+TQString KMFolderRootDir::prettyURL() const
{
if ( !mBaseURL.isEmpty() )
return i18n( mBaseURL.data() );
else
- return QString::null;
+ return TQString::null;
}
//-----------------------------------------------------------------------------
-void KMFolderRootDir::setBaseURL( const QCString &baseURL )
+void KMFolderRootDir::setBaseURL( const TQCString &baseURL )
{
mBaseURL = baseURL;
}
@@ -76,7 +76,7 @@ KMFolderMgr* KMFolderRootDir::manager() const
//=============================================================================
//=============================================================================
KMFolderDir::KMFolderDir( KMFolder * owner, KMFolderDir* parent,
- const QString& name, KMFolderDirType dirType )
+ const TQString& name, KMFolderDirType dirType )
: KMFolderNode( parent, name ), KMFolderNodeList(),
mOwner( owner ), mDirType( dirType )
{
@@ -92,7 +92,7 @@ KMFolderDir::~KMFolderDir()
//-----------------------------------------------------------------------------
-KMFolder* KMFolderDir::createFolder(const QString& aFolderName, bool aSysFldr, KMFolderType aFolderType)
+KMFolder* KMFolderDir::createFolder(const TQString& aFolderName, bool aSysFldr, KMFolderType aFolderType)
{
KMFolder* fld;
@@ -125,9 +125,9 @@ KMFolder* KMFolderDir::createFolder(const QString& aFolderName, bool aSysFldr, K
//----------------------------------------------------------------------------
-QString KMFolderDir::path() const
+TQString KMFolderDir::path() const
{
- static QString p;
+ static TQString p;
if (parent())
{
@@ -142,19 +142,19 @@ QString KMFolderDir::path() const
//----------------------------------------------------------------------------
-QString KMFolderDir::label() const
+TQString KMFolderDir::label() const
{
if ( mOwner )
return mOwner->label();
else
- return QString::null;
+ return TQString::null;
}
//-----------------------------------------------------------------------------
-QString KMFolderDir::prettyURL() const
+TQString KMFolderDir::prettyURL() const
{
- QString parentUrl;
+ TQString parentUrl;
if ( parent() )
parentUrl = parent()->prettyURL();
if ( !parentUrl.isEmpty() )
@@ -167,21 +167,21 @@ QString KMFolderDir::prettyURL() const
//-----------------------------------------------------------------------------
bool KMFolderDir::reload(void)
{
- QDir dir;
+ TQDir dir;
KMFolder* folder;
- QFileInfo* fileInfo;
- QStringList diList;
- QPtrList<KMFolder> folderList;
+ TQFileInfo* fileInfo;
+ TQStringList diList;
+ TQPtrList<KMFolder> folderList;
clear();
- const QString fldPath = path();
- dir.setFilter(QDir::Files | QDir::Dirs | QDir::Hidden);
+ const TQString fldPath = path();
+ dir.setFilter(TQDir::Files | TQDir::Dirs | TQDir::Hidden);
dir.setNameFilter("*");
if (!dir.cd(fldPath, TRUE))
{
- QString msg = i18n("<qt>Cannot enter folder <b>%1</b>.</qt>").arg(fldPath);
+ TQString msg = i18n("<qt>Cannot enter folder <b>%1</b>.</qt>").arg(fldPath);
KMessageBox::information(0, msg);
return FALSE;
}
@@ -189,14 +189,14 @@ bool KMFolderDir::reload(void)
QFileInfoList* fiList=(QFileInfoList*)dir.entryInfoList();
if (!fiList)
{
- QString msg = i18n("<qt>Folder <b>%1</b> is unreadable.</qt>").arg(fldPath);
+ TQString msg = i18n("<qt>Folder <b>%1</b> is unreadable.</qt>").arg(fldPath);
KMessageBox::information(0, msg);
return FALSE;
}
for (fileInfo=fiList->first(); fileInfo; fileInfo=fiList->next())
{
- const QString fname = fileInfo->fileName();
+ const TQString fname = fileInfo->fileName();
if( ( fname[0] == '.' ) && !fname.endsWith( ".directory" ) ) {
// ignore all hidden files except our subfolder containers
continue;
@@ -232,8 +232,8 @@ bool KMFolderDir::reload(void)
{
// For this to be a cached IMAP folder, it must be in the KMail dimap
// subdir and must be have a uidcache file or be a maildir folder
- QString maildir(fname + "/new");
- QString imapcachefile = QString::fromLatin1(".%1.uidcache").arg(fname);
+ TQString maildir(fname + "/new");
+ TQString imapcachefile = TQString::fromLatin1(".%1.uidcache").arg(fname);
if ( dir.exists( imapcachefile) || dir.exists( maildir ) )
{
folder = new KMFolder( this, fname, KMFolderTypeCachedImap );
@@ -274,7 +274,7 @@ bool KMFolderDir::reload(void)
for (folder=folderList.first(); folder; folder=folderList.next())
{
- for(QStringList::Iterator it = diList.begin();
+ for(TQStringList::Iterator it = diList.begin();
it != diList.end();
++it)
if (*it == "." + folder->fileName() + ".directory")
@@ -291,7 +291,7 @@ bool KMFolderDir::reload(void)
//-----------------------------------------------------------------------------
-KMFolderNode* KMFolderDir::hasNamedFolder(const QString& aName)
+KMFolderNode* KMFolderDir::hasNamedFolder(const TQString& aName)
{
KMFolderNode* fNode;
for (fNode=first(); fNode; fNode=next()) {
diff --git a/kmail/kmfolderdir.h b/kmail/kmfolderdir.h
index 5fa30b86e..72f4c4326 100644
--- a/kmail/kmfolderdir.h
+++ b/kmail/kmfolderdir.h
@@ -1,7 +1,7 @@
#ifndef kmfolderdir_h
#define kmfolderdir_h
-#include <qstring.h>
+#include <tqstring.h>
#include "kmfoldernode.h"
#include "kmfoldertype.h"
@@ -18,7 +18,7 @@ class KMFolderDir: public KMFolderNode, public KMFolderNodeList
public:
KMFolderDir( KMFolder * owner, KMFolderDir * parent = 0,
- const QString& path = QString::null,
+ const TQString& path = TQString::null,
KMFolderDirType = KMStandardDir );
virtual ~KMFolderDir();
@@ -28,23 +28,23 @@ public:
virtual bool reload();
/** Return full pathname of this directory. */
- virtual QString path() const;
+ virtual TQString path() const;
/** Returns the label of the folder for visualization. */
- QString label() const;
+ TQString label() const;
/** URL of the node for visualization purposes. */
- virtual QString prettyURL() const;
+ virtual TQString prettyURL() const;
/** Create a mail folder in this directory with given name. If sysFldr==TRUE
the folder is marked as a (KMail) system folder.
Returns Folder on success. */
- virtual KMFolder* createFolder(const QString& folderName,
+ virtual KMFolder* createFolder(const TQString& folderName,
bool sysFldr=false,
KMFolderType folderType=KMFolderTypeMbox);
/** Returns folder with given name or zero if it does not exist */
- virtual KMFolderNode* hasNamedFolder(const QString& name);
+ virtual KMFolderNode* hasNamedFolder(const TQString& name);
/** Returns the folder manager that manages this folder */
virtual KMFolderMgr* manager() const;
@@ -68,24 +68,24 @@ class KMFolderRootDir: public KMFolderDir
public:
KMFolderRootDir(KMFolderMgr* manager,
- const QString& path=QString::null,
+ const TQString& path=TQString::null,
KMFolderDirType dirType = KMStandardDir);
virtual ~KMFolderRootDir();
- virtual QString path() const;
+ virtual TQString path() const;
/** set the absolute path */
- virtual void setPath(const QString&);
+ virtual void setPath(const TQString&);
- virtual QString prettyURL() const;
+ virtual TQString prettyURL() const;
- void setBaseURL( const QCString& baseURL );
+ void setBaseURL( const TQCString& baseURL );
virtual KMFolderMgr* manager() const;
protected:
- QString mPath;
+ TQString mPath;
KMFolderMgr *mManager;
- QCString mBaseURL;
+ TQCString mBaseURL;
};
#endif /*kmfolderdir_h*/
diff --git a/kmail/kmfolderimap.cpp b/kmail/kmfolderimap.cpp
index f30e11b67..f32162f8a 100644
--- a/kmail/kmfolderimap.cpp
+++ b/kmail/kmfolderimap.cpp
@@ -54,9 +54,9 @@ using KMail::RenameJob;
#include <kio/scheduler.h>
#include <kconfig.h>
-#include <qbuffer.h>
-#include <qtextcodec.h>
-#include <qstylesheet.h>
+#include <tqbuffer.h>
+#include <tqtextcodec.h>
+#include <tqstylesheet.h>
#include <assert.h>
@@ -80,8 +80,8 @@ KMFolderImap::KMFolderImap(KMFolder* folder, const char* aName)
mAddMessageProgressItem = 0;
mReadOnly = false;
- connect (this, SIGNAL( folderComplete( KMFolderImap*, bool ) ),
- this, SLOT( slotCompleteMailCheckProgress()) );
+ connect (this, TQT_SIGNAL( folderComplete( KMFolderImap*, bool ) ),
+ this, TQT_SLOT( slotCompleteMailCheckProgress()) );
}
KMFolderImap::~KMFolderImap()
@@ -130,7 +130,7 @@ void KMFolderImap::reallyDoClose(const char* owner)
KMFolder* KMFolderImap::trashFolder() const
{
- QString trashStr = account()->trash();
+ TQString trashStr = account()->trash();
return kmkernel->imapFolderMgr()->findIdString( trashStr );
}
@@ -198,7 +198,7 @@ void KMFolderImap::readConfig()
if ( mImapPath.isEmpty() ) {
setImapPath( config->readEntry("ImapPath") );
}
- if (QString(name()).upper() == "INBOX" && mImapPath == "/INBOX/")
+ if (TQString(name()).upper() == "INBOX" && mImapPath == "/INBOX/")
{
folder()->setSystemFolder( true );
folder()->setLabel( i18n("inbox") );
@@ -249,12 +249,12 @@ void KMFolderImap::remove()
jd.progressItem = ProgressManager::createProgressItem(
"ImapFolderRemove" + ProgressManager::getUniqueID(),
i18n("Removing folder"),
- i18n( "URL: %1" ).arg( QStyleSheet::escape( folder()->prettyURL() ) ),
+ i18n( "URL: %1" ).arg( TQStyleSheet::escape( folder()->prettyURL() ) ),
false,
account()->useSSL() || account()->useTLS() );
account()->insertJob(job, jd);
- connect(job, SIGNAL(result(KIO::Job *)),
- this, SLOT(slotRemoveFolderResult(KIO::Job *)));
+ connect(job, TQT_SIGNAL(result(KIO::Job *)),
+ this, TQT_SLOT(slotRemoveFolderResult(KIO::Job *)));
}
//-----------------------------------------------------------------------------
@@ -289,7 +289,7 @@ void KMFolderImap::removeMsg(int idx, bool quiet)
KMFolderMbox::removeMsg(idx);
}
-void KMFolderImap::removeMsg( const QPtrList<KMMessage>& msgList, bool quiet )
+void KMFolderImap::removeMsg( const TQPtrList<KMMessage>& msgList, bool quiet )
{
if ( msgList.isEmpty() ) return;
if (!quiet)
@@ -298,11 +298,11 @@ void KMFolderImap::removeMsg( const QPtrList<KMMessage>& msgList, bool quiet )
mLastUid = 0;
/* Remove the messages from the local store as well.
- We don't call KMFolderInherited::removeMsg(QPtrList<KMMessage>) but
+ We don't call KMFolderInherited::removeMsg(TQPtrList<KMMessage>) but
iterate ourselves, as that would call KMFolderImap::removeMsg(int)
and not the one from the store we want to be used. */
- QPtrListIterator<KMMessage> it( msgList );
+ TQPtrListIterator<KMMessage> it( msgList );
KMMessage *msg;
while ( (msg = it.current()) != 0 ) {
++it;
@@ -314,7 +314,7 @@ void KMFolderImap::removeMsg( const QPtrList<KMMessage>& msgList, bool quiet )
}
//-----------------------------------------------------------------------------
-int KMFolderImap::rename( const QString& newName, KMFolderDir *aParent )
+int KMFolderImap::rename( const TQString& newName, KMFolderDir *aParent )
{
if ( !aParent )
KMFolderMbox::rename( newName );
@@ -350,7 +350,7 @@ void KMFolderImap::addMsgQuiet(KMMessage* aMsg)
}
//-----------------------------------------------------------------------------
-void KMFolderImap::addMsgQuiet(QPtrList<KMMessage> msgList)
+void KMFolderImap::addMsgQuiet(TQPtrList<KMMessage> msgList)
{
if ( mAddMessageProgressItem )
{
@@ -387,15 +387,15 @@ void KMFolderImap::addMsgQuiet(QPtrList<KMMessage> msgList)
//-----------------------------------------------------------------------------
int KMFolderImap::addMsg(KMMessage* aMsg, int* aIndex_ret)
{
- QPtrList<KMMessage> list;
+ TQPtrList<KMMessage> list;
list.append(aMsg);
- QValueList<int> index;
+ TQValueList<int> index;
int ret = addMsg(list, index);
aIndex_ret = &index.first();
return ret;
}
-int KMFolderImap::addMsg(QPtrList<KMMessage>& msgList, QValueList<int>& aIndex_ret)
+int KMFolderImap::addMsg(TQPtrList<KMMessage>& msgList, TQValueList<int>& aIndex_ret)
{
KMMessage *aMsg = msgList.getFirst();
KMFolder *msgParent = aMsg->parent();
@@ -423,32 +423,32 @@ int KMFolderImap::addMsg(QPtrList<KMMessage>& msgList, QValueList<int>& aIndex_r
msg = msgParent->getMsg(idx);
}
imapJob = new ImapJob(msg, ImapJob::tPutMessage, this);
- connect(imapJob, SIGNAL(messageStored(KMMessage*)),
- SLOT(addMsgQuiet(KMMessage*)));
- connect(imapJob, SIGNAL(result(KMail::FolderJob*)),
- SLOT(slotCopyMsgResult(KMail::FolderJob*)));
+ connect(imapJob, TQT_SIGNAL(messageStored(KMMessage*)),
+ TQT_SLOT(addMsgQuiet(KMMessage*)));
+ connect(imapJob, TQT_SIGNAL(result(KMail::FolderJob*)),
+ TQT_SLOT(slotCopyMsgResult(KMail::FolderJob*)));
imapJob->start();
}
} else {
// get the messages and the uids
- QValueList<ulong> uids;
+ TQValueList<ulong> uids;
getUids(msgList, uids);
// get the sets (do not sort the uids)
- QStringList sets = makeSets(uids, false);
+ TQStringList sets = makeSets(uids, false);
- for ( QStringList::Iterator it = sets.begin(); it != sets.end(); ++it )
+ for ( TQStringList::Iterator it = sets.begin(); it != sets.end(); ++it )
{
// we need the messages that belong to the current set to pass them to the ImapJob
- QPtrList<KMMessage> temp_msgs = splitMessageList(*it, msgList);
+ TQPtrList<KMMessage> temp_msgs = splitMessageList(*it, msgList);
if ( temp_msgs.isEmpty() ) kdDebug(5006) << "Wow! KMFolderImap::splitMessageList() returned an empty list!" << endl;
imapJob = new ImapJob(temp_msgs, *it, ImapJob::tMoveMessage, this);
- connect(imapJob, SIGNAL(messageCopied(QPtrList<KMMessage>)),
- SLOT(addMsgQuiet(QPtrList<KMMessage>)));
- connect(imapJob, SIGNAL(result(KMail::FolderJob*)),
- SLOT(slotCopyMsgResult(KMail::FolderJob*)));
+ connect(imapJob, TQT_SIGNAL(messageCopied(TQPtrList<KMMessage>)),
+ TQT_SLOT(addMsgQuiet(TQPtrList<KMMessage>)));
+ connect(imapJob, TQT_SIGNAL(result(KMail::FolderJob*)),
+ TQT_SLOT(slotCopyMsgResult(KMail::FolderJob*)));
imapJob->start();
}
}
@@ -457,7 +457,7 @@ int KMFolderImap::addMsg(QPtrList<KMMessage>& msgList, QValueList<int>& aIndex_r
else
{
// different account, check if messages can be added
- QPtrListIterator<KMMessage> it( msgList );
+ TQPtrListIterator<KMMessage> it( msgList );
KMMessage *msg;
while ( (msg = it.current()) != 0 )
{
@@ -478,7 +478,7 @@ int KMFolderImap::addMsg(QPtrList<KMMessage>& msgList, QValueList<int>& aIndex_r
if ( !msgList.isEmpty() )
{
// transfer from local folders or other accounts
- QPtrListIterator<KMMessage> it( msgList );
+ TQPtrListIterator<KMMessage> it( msgList );
KMMessage* msg;
while ( ( msg = it.current() ) != 0 )
{
@@ -486,7 +486,7 @@ int KMFolderImap::addMsg(QPtrList<KMMessage>& msgList, QValueList<int>& aIndex_r
if ( !msg->transferInProgress() )
msg->setTransferInProgress( true );
}
- imapJob = new ImapJob( msgList, QString::null, ImapJob::tPutMessage, this );
+ imapJob = new ImapJob( msgList, TQString::null, ImapJob::tPutMessage, this );
if ( !mAddMessageProgressItem && msgList.count() > 1 )
{
// use a parent progress if we have more than 1 message
@@ -494,18 +494,18 @@ int KMFolderImap::addMsg(QPtrList<KMMessage>& msgList, QValueList<int>& aIndex_r
mAddMessageProgressItem = ProgressManager::createProgressItem(
"Uploading"+ProgressManager::getUniqueID(),
i18n("Uploading message data"),
- i18n("Destination folder: %1").arg( QStyleSheet::escape( folder()->prettyURL() ) ),
+ i18n("Destination folder: %1").arg( TQStyleSheet::escape( folder()->prettyURL() ) ),
true,
account()->useSSL() || account()->useTLS() );
mAddMessageProgressItem->setTotalItems( msgList.count() );
- connect ( mAddMessageProgressItem, SIGNAL( progressItemCanceled( KPIM::ProgressItem*)),
- account(), SLOT( slotAbortRequested( KPIM::ProgressItem* ) ) );
+ connect ( mAddMessageProgressItem, TQT_SIGNAL( progressItemCanceled( KPIM::ProgressItem*)),
+ account(), TQT_SLOT( slotAbortRequested( KPIM::ProgressItem* ) ) );
imapJob->setParentProgressItem( mAddMessageProgressItem );
}
- connect( imapJob, SIGNAL( messageCopied(QPtrList<KMMessage>) ),
- SLOT( addMsgQuiet(QPtrList<KMMessage>) ) );
- connect( imapJob, SIGNAL(result(KMail::FolderJob*)),
- SLOT(slotCopyMsgResult(KMail::FolderJob*)) );
+ connect( imapJob, TQT_SIGNAL( messageCopied(TQPtrList<KMMessage>) ),
+ TQT_SLOT( addMsgQuiet(TQPtrList<KMMessage>) ) );
+ connect( imapJob, TQT_SIGNAL(result(KMail::FolderJob*)),
+ TQT_SLOT(slotCopyMsgResult(KMail::FolderJob*)) );
imapJob->start();
}
@@ -521,7 +521,7 @@ void KMFolderImap::slotCopyMsgResult( KMail::FolderJob* job )
}
//-----------------------------------------------------------------------------
-void KMFolderImap::copyMsg(QPtrList<KMMessage>& msgList)
+void KMFolderImap::copyMsg(TQPtrList<KMMessage>& msgList)
{
if ( !account()->hasCapability("uidplus") ) {
for ( KMMessage *msg = msgList.first(); msg; msg = msgList.next() ) {
@@ -531,24 +531,24 @@ void KMFolderImap::copyMsg(QPtrList<KMMessage>& msgList)
}
}
- QValueList<ulong> uids;
+ TQValueList<ulong> uids;
getUids(msgList, uids);
- QStringList sets = makeSets(uids, false);
- for ( QStringList::Iterator it = sets.begin(); it != sets.end(); ++it )
+ TQStringList sets = makeSets(uids, false);
+ for ( TQStringList::Iterator it = sets.begin(); it != sets.end(); ++it )
{
// we need the messages that belong to the current set to pass them to the ImapJob
- QPtrList<KMMessage> temp_msgs = splitMessageList(*it, msgList);
+ TQPtrList<KMMessage> temp_msgs = splitMessageList(*it, msgList);
ImapJob *job = new ImapJob(temp_msgs, *it, ImapJob::tCopyMessage, this);
- connect(job, SIGNAL(result(KMail::FolderJob*)),
- SLOT(slotCopyMsgResult(KMail::FolderJob*)));
+ connect(job, TQT_SIGNAL(result(KMail::FolderJob*)),
+ TQT_SLOT(slotCopyMsgResult(KMail::FolderJob*)));
job->start();
}
}
//-----------------------------------------------------------------------------
-QPtrList<KMMessage> KMFolderImap::splitMessageList(const QString& set,
- QPtrList<KMMessage>& msgList)
+TQPtrList<KMMessage> KMFolderImap::splitMessageList(const TQString& set,
+ TQPtrList<KMMessage>& msgList)
{
int lastcomma = set.findRev(",");
int lastdub = set.findRev(":");
@@ -558,12 +558,12 @@ QPtrList<KMMessage> KMFolderImap::splitMessageList(const QString& set,
last++;
if (last < 0) last = set.length();
// the last uid of the current set
- const QString last_uid = set.right(set.length() - last);
- QPtrList<KMMessage> temp_msgs;
- QString uid;
+ const TQString last_uid = set.right(set.length() - last);
+ TQPtrList<KMMessage> temp_msgs;
+ TQString uid;
if (!last_uid.isEmpty())
{
- QPtrListIterator<KMMessage> it( msgList );
+ TQPtrListIterator<KMMessage> it( msgList );
KMMessage* msg = 0;
while ( (msg = it.current()) != 0 )
{
@@ -598,7 +598,7 @@ KMMessage* KMFolderImap::take(int idx)
return KMFolderMbox::take(idx);
}
-void KMFolderImap::take(QPtrList<KMMessage> msgList)
+void KMFolderImap::take(TQPtrList<KMMessage> msgList)
{
deleteMessage(msgList);
@@ -609,8 +609,8 @@ void KMFolderImap::take(QPtrList<KMMessage> msgList)
//-----------------------------------------------------------------------------
void KMFolderImap::slotListNamespaces()
{
- disconnect( account(), SIGNAL( connectionResult(int, const QString&) ),
- this, SLOT( slotListNamespaces() ) );
+ disconnect( account(), TQT_SIGNAL( connectionResult(int, const TQString&) ),
+ this, TQT_SLOT( slotListNamespaces() ) );
if ( account()->makeConnection() == ImapAccountBase::Error )
{
kdWarning(5006) << "slotListNamespaces - got no connection" << endl;
@@ -619,8 +619,8 @@ void KMFolderImap::slotListNamespaces()
{
// wait for the connectionResult
kdDebug(5006) << "slotListNamespaces - waiting for connection" << endl;
- connect( account(), SIGNAL( connectionResult(int, const QString&) ),
- this, SLOT( slotListNamespaces() ) );
+ connect( account(), TQT_SIGNAL( connectionResult(int, const TQString&) ),
+ this, TQT_SLOT( slotListNamespaces() ) );
return;
}
kdDebug(5006) << "slotListNamespaces" << endl;
@@ -634,48 +634,48 @@ void KMFolderImap::slotListNamespaces()
type = ImapAccountBase::ListSubscribed;
ImapAccountBase::nsMap map = account()->namespaces();
- QStringList personal = map[ImapAccountBase::PersonalNS];
+ TQStringList personal = map[ImapAccountBase::PersonalNS];
// start personal namespace listing and send it directly to slotListResult
- for ( QStringList::Iterator it = personal.begin(); it != personal.end(); ++it )
+ for ( TQStringList::Iterator it = personal.begin(); it != personal.end(); ++it )
{
KMail::ListJob* job = new KMail::ListJob( account(), type, this,
account()->addPathToNamespace( *it ) );
job->setNamespace( *it );
job->setHonorLocalSubscription( true );
- connect( job, SIGNAL(receivedFolders(const QStringList&, const QStringList&,
- const QStringList&, const QStringList&, const ImapAccountBase::jobData&)),
- this, SLOT(slotListResult(const QStringList&, const QStringList&,
- const QStringList&, const QStringList&, const ImapAccountBase::jobData&)));
+ connect( job, TQT_SIGNAL(receivedFolders(const TQStringList&, const TQStringList&,
+ const TQStringList&, const TQStringList&, const ImapAccountBase::jobData&)),
+ this, TQT_SLOT(slotListResult(const TQStringList&, const TQStringList&,
+ const TQStringList&, const TQStringList&, const ImapAccountBase::jobData&)));
job->start();
}
// and now we list all other namespaces and check them ourself
- QStringList ns = map[ImapAccountBase::OtherUsersNS];
+ TQStringList ns = map[ImapAccountBase::OtherUsersNS];
ns += map[ImapAccountBase::SharedNS];
- for ( QStringList::Iterator it = ns.begin(); it != ns.end(); ++it )
+ for ( TQStringList::Iterator it = ns.begin(); it != ns.end(); ++it )
{
KMail::ListJob* job = new KMail::ListJob( account(), type, this, account()->addPathToNamespace( *it ) );
job->setHonorLocalSubscription( true );
- connect( job, SIGNAL(receivedFolders(const QStringList&, const QStringList&,
- const QStringList&, const QStringList&, const ImapAccountBase::jobData&)),
- this, SLOT(slotCheckNamespace(const QStringList&, const QStringList&,
- const QStringList&, const QStringList&, const ImapAccountBase::jobData&)));
+ connect( job, TQT_SIGNAL(receivedFolders(const TQStringList&, const TQStringList&,
+ const TQStringList&, const TQStringList&, const ImapAccountBase::jobData&)),
+ this, TQT_SLOT(slotCheckNamespace(const TQStringList&, const TQStringList&,
+ const TQStringList&, const TQStringList&, const ImapAccountBase::jobData&)));
job->start();
}
}
//-----------------------------------------------------------------------------
-void KMFolderImap::slotCheckNamespace( const QStringList& subfolderNames,
- const QStringList& subfolderPaths,
- const QStringList& subfolderMimeTypes,
- const QStringList& subfolderAttributes,
+void KMFolderImap::slotCheckNamespace( const TQStringList& subfolderNames,
+ const TQStringList& subfolderPaths,
+ const TQStringList& subfolderMimeTypes,
+ const TQStringList& subfolderAttributes,
const ImapAccountBase::jobData& jobData )
{
kdDebug(5006) << "slotCheckNamespace - " << subfolderNames.join(",") << endl;
// get a correct foldername:
// strip / and make sure it does not contain the delimiter
- QString name = jobData.path.mid( 1, jobData.path.length()-2 );
+ TQString name = jobData.path.mid( 1, jobData.path.length()-2 );
name.remove( account()->delimiterForNamespace( name ) );
if ( name.isEmpty() ) {
// happens when an empty namespace is defined
@@ -760,10 +760,10 @@ bool KMFolderImap::listDirectory()
KMail::ListJob* job = new KMail::ListJob( account(), type, this );
job->setParentProgressItem( account()->listDirProgressItem() );
job->setHonorLocalSubscription( true );
- connect( job, SIGNAL(receivedFolders(const QStringList&, const QStringList&,
- const QStringList&, const QStringList&, const ImapAccountBase::jobData&)),
- this, SLOT(slotListResult(const QStringList&, const QStringList&,
- const QStringList&, const QStringList&, const ImapAccountBase::jobData&)));
+ connect( job, TQT_SIGNAL(receivedFolders(const TQStringList&, const TQStringList&,
+ const TQStringList&, const TQStringList&, const ImapAccountBase::jobData&)),
+ this, TQT_SLOT(slotListResult(const TQStringList&, const TQStringList&,
+ const TQStringList&, const TQStringList&, const ImapAccountBase::jobData&)));
job->start();
return true;
@@ -771,10 +771,10 @@ bool KMFolderImap::listDirectory()
//-----------------------------------------------------------------------------
-void KMFolderImap::slotListResult( const QStringList& subfolderNames,
- const QStringList& subfolderPaths,
- const QStringList& subfolderMimeTypes,
- const QStringList& subfolderAttributes,
+void KMFolderImap::slotListResult( const TQStringList& subfolderNames,
+ const TQStringList& subfolderPaths,
+ const TQStringList& subfolderMimeTypes,
+ const TQStringList& subfolderAttributes,
const ImapAccountBase::jobData& jobData )
{
mSubfolderState = imapFinished;
@@ -805,7 +805,7 @@ void KMFolderImap::slotListResult( const QStringList& subfolderNames,
parent->slotListResult( subfolderNames, subfolderPaths,
subfolderMimeTypes, subfolderAttributes, jobData );
// cleanup
- QStringList list;
+ TQStringList list;
checkFolders( list, jobData.curNamespace );
// finish
emit directoryListingFinished( this );
@@ -911,16 +911,16 @@ void KMFolderImap::initInbox()
}
if ( f ) {
f->initializeFrom( this, "/INBOX/", "message/directory" );
- f->setChildrenState( QString::null );
+ f->setChildrenState( TQString::null );
}
// so we have an INBOX
account()->setHasInbox( true );
}
//-----------------------------------------------------------------------------
-KMFolderImap* KMFolderImap::findParent( const QString& path, const QString& name )
+KMFolderImap* KMFolderImap::findParent( const TQString& path, const TQString& name )
{
- QString parent = path.left( path.length() - name.length() - 2 );
+ TQString parent = path.left( path.length() - name.length() - 2 );
if ( parent.length() > 1 )
{
// extract name of the parent
@@ -945,10 +945,10 @@ KMFolderImap* KMFolderImap::findParent( const QString& path, const QString& name
}
//-----------------------------------------------------------------------------
-void KMFolderImap::checkFolders( const QStringList& subfolderNames,
- const QString& myNamespace )
+void KMFolderImap::checkFolders( const TQStringList& subfolderNames,
+ const TQString& myNamespace )
{
- QPtrList<KMFolder> toRemove;
+ TQPtrList<KMFolder> toRemove;
KMFolderNode *node = folder()->child()->first();
while ( node )
{
@@ -963,7 +963,7 @@ void KMFolderImap::checkFolders( const QStringList& subfolderNames,
kdDebug(5006) << node->name() << " in namespace " << myNamespace << ":" <<
isInNamespace << endl;
// ignore some cases
- QString name = node->name();
+ TQString name = node->name();
bool ignore = ( ( this == account()->rootFolder() ) &&
( imapFld->imapPath() == "/INBOX/" ||
account()->isNamespaceFolder( name ) ||
@@ -990,8 +990,8 @@ void KMFolderImap::checkFolders( const QStringList& subfolderNames,
}
//-----------------------------------------------------------------------------
-void KMFolderImap::initializeFrom( KMFolderImap* parent, QString folderPath,
- QString mimeType )
+void KMFolderImap::initializeFrom( KMFolderImap* parent, TQString folderPath,
+ TQString mimeType )
{
setAccount( parent->account() );
setImapPath( folderPath );
@@ -1000,7 +1000,7 @@ void KMFolderImap::initializeFrom( KMFolderImap* parent, QString folderPath,
}
//-----------------------------------------------------------------------------
-void KMFolderImap::setChildrenState( QString attributes )
+void KMFolderImap::setChildrenState( TQString attributes )
{
// update children state
if ( attributes.find( "haschildren", 0, false ) != -1 )
@@ -1033,8 +1033,8 @@ void KMFolderImap::checkValidity()
kdDebug(5006) << "KMFolderImap::checkValidity of: " << imapPath() << endl;
// Start with a clean slate
- disconnect( account(), SIGNAL( connectionResult(int, const QString&) ),
- this, SLOT( checkValidity() ) );
+ disconnect( account(), TQT_SIGNAL( connectionResult(int, const TQString&) ),
+ this, TQT_SLOT( checkValidity() ) );
KMAcctImap::ConnectionState connectionState = account()->makeConnection();
if ( connectionState == ImapAccountBase::Error ) {
@@ -1047,8 +1047,8 @@ void KMFolderImap::checkValidity()
// We'll wait for the connectionResult signal from the account. If it
// errors, the above will catch it.
kdDebug(5006) << "CheckValidity - waiting for connection" << endl;
- connect( account(), SIGNAL( connectionResult(int, const QString&) ),
- this, SLOT( checkValidity() ) );
+ connect( account(), TQT_SIGNAL( connectionResult(int, const TQString&) ),
+ this, TQT_SLOT( checkValidity() ) );
return;
}
// Only check once at a time.
@@ -1064,7 +1064,7 @@ void KMFolderImap::checkValidity()
mMailCheckProgressItem = ProgressManager::createProgressItem(
parent,
"MailCheck" + folder()->prettyURL(),
- QStyleSheet::escape( folder()->prettyURL() ),
+ TQStyleSheet::escape( folder()->prettyURL() ),
i18n("checking"),
false,
account()->useSSL() || account()->useTLS() );
@@ -1078,10 +1078,10 @@ void KMFolderImap::checkValidity()
KIO::SimpleJob *job = KIO::get(url, false, false);
KIO::Scheduler::assignJobToSlave(account()->slave(), job);
account()->insertJob(job, jd);
- connect(job, SIGNAL(result(KIO::Job *)),
- SLOT(slotCheckValidityResult(KIO::Job *)));
- connect(job, SIGNAL(data(KIO::Job *, const QByteArray &)),
- SLOT(slotSimpleData(KIO::Job *, const QByteArray &)));
+ connect(job, TQT_SIGNAL(result(KIO::Job *)),
+ TQT_SLOT(slotCheckValidityResult(KIO::Job *)));
+ connect(job, TQT_SIGNAL(data(KIO::Job *, const TQByteArray &)),
+ TQT_SLOT(slotSimpleData(KIO::Job *, const TQByteArray &)));
// Only check once at a time.
mCheckingValidity = true;
}
@@ -1121,15 +1121,15 @@ void KMFolderImap::slotCheckValidityResult(KIO::Job * job)
emit folderComplete(this, false);
close("checkvalidity");
} else {
- QCString cstr((*it).data.data(), (*it).data.size() + 1);
+ TQCString cstr((*it).data.data(), (*it).data.size() + 1);
int a = cstr.find("X-uidValidity: ");
int b = cstr.find("\r\n", a);
- QString uidv;
+ TQString uidv;
if ( (b - a - 15) >= 0 )
uidv = cstr.mid(a + 15, b - a - 15);
a = cstr.find("X-Access: ");
b = cstr.find("\r\n", a);
- QString access;
+ TQString access;
if ( (b - a - 10) >= 0 )
access = cstr.mid(a + 10, b - a - 10);
mReadOnly = access == "Read only";
@@ -1145,7 +1145,7 @@ void KMFolderImap::slotCheckValidityResult(KIO::Job * job)
if ( a >= 0 && (b - a - 18) >= 0 )
mPermanentFlags = cstr.mid( a + 18, b - a - 18 ).toInt(&ok);
if ( !ok ) mPermanentFlags = 0;
- QString startUid;
+ TQString startUid;
if (uidValidity() != uidv)
{
// uidValidity changed
@@ -1161,7 +1161,7 @@ void KMFolderImap::slotCheckValidityResult(KIO::Job * job)
writeConfig();
} else {
if (!mCheckFlags)
- startUid = QString::number(lastUid() + 1);
+ startUid = TQString::number(lastUid() + 1);
}
account()->removeJob(it);
if ( mMailCheckProgressItem )
@@ -1216,7 +1216,7 @@ void KMFolderImap::getFolder(bool force)
//-----------------------------------------------------------------------------
-void KMFolderImap::reallyGetFolder(const QString &startUid)
+void KMFolderImap::reallyGetFolder(const TQString &startUid)
{
KURL url = account()->getUrl();
if ( account()->makeConnection() != ImapAccountBase::Connected )
@@ -1237,10 +1237,10 @@ void KMFolderImap::reallyGetFolder(const QString &startUid)
ImapAccountBase::jobData jd( url.url(), folder() );
jd.cancellable = true;
account()->insertJob(job, jd);
- connect(job, SIGNAL(result(KIO::Job *)),
- this, SLOT(slotListFolderResult(KIO::Job *)));
- connect(job, SIGNAL(entries(KIO::Job *, const KIO::UDSEntryList &)),
- this, SLOT(slotListFolderEntries(KIO::Job *,
+ connect(job, TQT_SIGNAL(result(KIO::Job *)),
+ this, TQT_SLOT(slotListFolderResult(KIO::Job *)));
+ connect(job, TQT_SIGNAL(entries(KIO::Job *, const KIO::UDSEntryList &)),
+ this, TQT_SLOT(slotListFolderEntries(KIO::Job *,
const KIO::UDSEntryList &)));
} else {
mContentState = imapDownloadInProgress;
@@ -1253,10 +1253,10 @@ void KMFolderImap::reallyGetFolder(const QString &startUid)
ImapAccountBase::jobData jd( url.url(), folder() );
jd.cancellable = true;
account()->insertJob(newJob, jd);
- connect(newJob, SIGNAL(result(KIO::Job *)),
- this, SLOT(slotGetLastMessagesResult(KIO::Job *)));
- connect(newJob, SIGNAL(data(KIO::Job *, const QByteArray &)),
- this, SLOT(slotGetMessagesData(KIO::Job *, const QByteArray &)));
+ connect(newJob, TQT_SIGNAL(result(KIO::Job *)),
+ this, TQT_SLOT(slotGetLastMessagesResult(KIO::Job *)));
+ connect(newJob, TQT_SIGNAL(data(KIO::Job *, const TQByteArray &)),
+ this, TQT_SLOT(slotGetMessagesData(KIO::Job *, const TQByteArray &)));
}
}
@@ -1266,7 +1266,7 @@ void KMFolderImap::slotListFolderResult(KIO::Job * job)
{
ImapAccountBase::JobIterator it = account()->findJob(job);
if ( it == account()->jobsEnd() ) return;
- QString uids;
+ TQString uids;
if (job->error())
{
account()->handleJobError( job,
@@ -1276,7 +1276,7 @@ void KMFolderImap::slotListFolderResult(KIO::Job * job)
return;
}
mCheckFlags = false;
- QStringList::Iterator uid;
+ TQStringList::Iterator uid;
/*
The code below does the following:
- for each mail in the local store and each entry we got from the server,
@@ -1326,7 +1326,7 @@ void KMFolderImap::slotListFolderResult(KIO::Job * job)
// strip the flags from the list of uids, so it can be reused
for (uid = (*it).items.begin(); uid != (*it).items.end(); ++uid)
(*uid).truncate((*uid).find(","));
- ImapAccountBase::jobData jd( QString::null, (*it).parent );
+ ImapAccountBase::jobData jd( TQString::null, (*it).parent );
jd.total = (*it).items.count();
if (jd.total == 0)
{
@@ -1343,14 +1343,14 @@ void KMFolderImap::slotListFolderResult(KIO::Job * job)
mMailCheckProgressItem->setStatus( i18n("Retrieving messages") );
}
- QStringList sets;
+ TQStringList sets;
uid = (*it).items.begin();
if (jd.total == 1) sets.append(*uid + ":" + *uid);
else sets = makeSets( (*it).items );
account()->removeJob(it); // don't use *it below
// Now kick off the getting of envelopes for the new mails in the folder
- for (QStringList::Iterator i = sets.begin(); i != sets.end(); ++i)
+ for (TQStringList::Iterator i = sets.begin(); i != sets.end(); ++i)
{
mContentState = imapDownloadInProgress;
KURL url = account()->getUrl();
@@ -1359,12 +1359,12 @@ void KMFolderImap::slotListFolderResult(KIO::Job * job)
jd.url = url.url();
KIO::Scheduler::assignJobToSlave(account()->slave(), newJob);
account()->insertJob(newJob, jd);
- connect(newJob, SIGNAL(result(KIO::Job *)),
+ connect(newJob, TQT_SIGNAL(result(KIO::Job *)),
this, (i == sets.at(sets.count() - 1))
- ? SLOT(slotGetLastMessagesResult(KIO::Job *))
- : SLOT(slotGetMessagesResult(KIO::Job *)));
- connect(newJob, SIGNAL(data(KIO::Job *, const QByteArray &)),
- this, SLOT(slotGetMessagesData(KIO::Job *, const QByteArray &)));
+ ? TQT_SLOT(slotGetLastMessagesResult(KIO::Job *))
+ : TQT_SLOT(slotGetMessagesResult(KIO::Job *)));
+ connect(newJob, TQT_SIGNAL(data(KIO::Job *, const TQByteArray &)),
+ this, TQT_SLOT(slotGetMessagesData(KIO::Job *, const TQByteArray &)));
}
}
@@ -1375,7 +1375,7 @@ void KMFolderImap::slotListFolderEntries(KIO::Job * job,
{
ImapAccountBase::JobIterator it = account()->findJob(job);
if ( it == account()->jobsEnd() ) return;
- QString mimeType, name;
+ TQString mimeType, name;
long int flags = 0;
for (KIO::UDSEntryList::ConstIterator udsIt = uds.begin();
udsIt != uds.end(); udsIt++)
@@ -1392,7 +1392,7 @@ void KMFolderImap::slotListFolderEntries(KIO::Job * job,
}
if ((mimeType == "message/rfc822-imap" || mimeType == "message/rfc822") &&
!(flags & 8)) {
- (*it).items.append(name + "," + QString::number(flags));
+ (*it).items.append(name + "," + TQString::number(flags));
if ( mMailCheckProgressItem ) {
mMailCheckProgressItem->incCompletedItems();
mMailCheckProgressItem->updateProgress();
@@ -1403,9 +1403,9 @@ void KMFolderImap::slotListFolderEntries(KIO::Job * job,
// debugging helper
-//X static QString flagsToString( int flags )
+//X static TQString flagsToString( int flags )
//X {
-//X QString str("(");
+//X TQString str("(");
//X if ( flags & 4 ) {
//X str += "\\Flagged ";
//X }
@@ -1477,9 +1477,9 @@ void KMFolderImap::seenFlagToStatus(KMMsgBase * msg, int flags, bool newMsg)
//-----------------------------------------------------------------------------
-QString KMFolderImap::statusToFlags(KMMsgStatus status, int supportedFlags)
+TQString KMFolderImap::statusToFlags(KMMsgStatus status, int supportedFlags)
{
- QString flags;
+ TQString flags;
if (status & KMMsgStatusDeleted)
flags = "\\DELETED";
else {
@@ -1518,12 +1518,12 @@ KMFolderImap::ignoreJobsForMessage( KMMessage* msg )
}
//-----------------------------------------------------------------------------
-void KMFolderImap::slotGetMessagesData(KIO::Job * job, const QByteArray & data)
+void KMFolderImap::slotGetMessagesData(KIO::Job * job, const TQByteArray & data)
{
if ( data.isEmpty() ) return; // optimization
ImapAccountBase::JobIterator it = account()->findJob(job);
if ( it == account()->jobsEnd() ) return;
- (*it).cdata += QCString(data, data.size() + 1);
+ (*it).cdata += TQCString(data, data.size() + 1);
int pos = (*it).cdata.find("\r\n--IMAPDIGEST");
if ( pos == -1 ) {
// if we do not find the pattern in the complete string we will not find
@@ -1545,7 +1545,7 @@ void KMFolderImap::slotGetMessagesData(KIO::Job * job, const QByteArray & data)
kdDebug(5006) << "KMFolderImap::slotGetMessagesData - server has less messages (" <<
exists << ") then folder (" << count() << "), so reload" << endl;
open("getMessage");
- reallyGetFolder( QString::null );
+ reallyGetFolder( TQString::null );
(*it).cdata.remove(0, pos);
return;
} else if ( ok ) {
@@ -1599,7 +1599,7 @@ void KMFolderImap::slotGetMessagesData(KIO::Job * job, const QByteArray & data)
} else if ( !account()->hasCapability("uidplus") ) {
// see if we have cached the msgIdMD5 and get the status +
// serial number from there
- QString id = msg->msgIdMD5();
+ TQString id = msg->msgIdMD5();
if ( mMetaDataMap.find( id ) ) {
md = mMetaDataMap[id];
msg->setStatus( md->status() );
@@ -1643,7 +1643,7 @@ void KMFolderImap::slotGetMessagesData(KIO::Job * job, const QByteArray & data)
//-------------------------------------------------------------
FolderJob*
KMFolderImap::doCreateJob( KMMessage *msg, FolderJob::JobType jt,
- KMFolder *folder, QString partSpecifier,
+ KMFolder *folder, TQString partSpecifier,
const AttachmentStrategy *as ) const
{
KMFolderImap* kmfi = folder? dynamic_cast<KMFolderImap*>(folder->storage()) : 0;
@@ -1666,7 +1666,7 @@ KMFolderImap::doCreateJob( KMMessage *msg, FolderJob::JobType jt,
} else {
// download complete message or part (attachment)
if ( partSpecifier == "STRUCTURE" ) // hide from outside
- partSpecifier = QString::null;
+ partSpecifier = TQString::null;
ImapJob *job = new ImapJob( msg, jt, kmfi, partSpecifier );
job->setParentFolder( this );
@@ -1676,7 +1676,7 @@ KMFolderImap::doCreateJob( KMMessage *msg, FolderJob::JobType jt,
//-------------------------------------------------------------
FolderJob*
-KMFolderImap::doCreateJob( QPtrList<KMMessage>& msgList, const QString& sets,
+KMFolderImap::doCreateJob( TQPtrList<KMMessage>& msgList, const TQString& sets,
FolderJob::JobType jt, KMFolder *folder ) const
{
KMFolderImap* kmfi = dynamic_cast<KMFolderImap*>(folder->storage());
@@ -1717,7 +1717,7 @@ void KMFolderImap::slotGetMessagesResult(KIO::Job * job)
//-----------------------------------------------------------------------------
-void KMFolderImap::createFolder(const QString &name, const QString& parentPath,
+void KMFolderImap::createFolder(const TQString &name, const TQString& parentPath,
bool askUser)
{
kdDebug(5006) << "KMFolderImap::createFolder - name=" << name << ",parent=" <<
@@ -1727,8 +1727,8 @@ void KMFolderImap::createFolder(const QString &name, const QString& parentPath,
return;
}
KURL url = account()->getUrl();
- QString parent = ( parentPath.isEmpty() ? imapPath() : parentPath );
- QString path = account()->createImapPath( parent, name );
+ TQString parent = ( parentPath.isEmpty() ? imapPath() : parentPath );
+ TQString path = account()->createImapPath( parent, name );
if ( askUser ) {
path += "/;INFO=ASKUSER";
}
@@ -1739,8 +1739,8 @@ void KMFolderImap::createFolder(const QString &name, const QString& parentPath,
ImapAccountBase::jobData jd( url.url(), folder() );
jd.items = name;
account()->insertJob(job, jd);
- connect(job, SIGNAL(result(KIO::Job *)),
- this, SLOT(slotCreateFolderResult(KIO::Job *)));
+ connect(job, TQT_SIGNAL(result(KIO::Job *)),
+ this, TQT_SLOT(slotCreateFolderResult(KIO::Job *)));
}
@@ -1750,7 +1750,7 @@ void KMFolderImap::slotCreateFolderResult(KIO::Job * job)
ImapAccountBase::JobIterator it = account()->findJob(job);
if ( it == account()->jobsEnd() ) return;
- QString name;
+ TQString name;
if ( it.data().items.count() > 0 )
name = it.data().items.first();
@@ -1771,27 +1771,27 @@ void KMFolderImap::slotCreateFolderResult(KIO::Job * job)
//-----------------------------------------------------------------------------
-static QTextCodec *sUtf7Codec = 0;
+static TQTextCodec *sUtf7Codec = 0;
-QTextCodec * KMFolderImap::utf7Codec()
+TQTextCodec * KMFolderImap::utf7Codec()
{
- if (!sUtf7Codec) sUtf7Codec = QTextCodec::codecForName("utf-7");
+ if (!sUtf7Codec) sUtf7Codec = TQTextCodec::codecForName("utf-7");
return sUtf7Codec;
}
//-----------------------------------------------------------------------------
-QString KMFolderImap::encodeFileName(const QString &name)
+TQString KMFolderImap::encodeFileName(const TQString &name)
{
- QString result = utf7Codec()->fromUnicode(name);
+ TQString result = utf7Codec()->fromUnicode(name);
return KURL::encode_string_no_slash(result);
}
//-----------------------------------------------------------------------------
-QString KMFolderImap::decodeFileName(const QString &name)
+TQString KMFolderImap::decodeFileName(const TQString &name)
{
- QString result = KURL::decode_string(name);
+ TQString result = KURL::decode_string(name);
return utf7Codec()->toUnicode(result.latin1());
}
@@ -1806,12 +1806,12 @@ bool KMFolderImap::autoExpunge()
//-----------------------------------------------------------------------------
-void KMFolderImap::slotSimpleData(KIO::Job * job, const QByteArray & data)
+void KMFolderImap::slotSimpleData(KIO::Job * job, const TQByteArray & data)
{
if ( data.isEmpty() ) return; // optimization
ImapAccountBase::JobIterator it = account()->findJob(job);
if ( it == account()->jobsEnd() ) return;
- QBuffer buff((*it).data);
+ TQBuffer buff((*it).data);
buff.open(IO_WriteOnly | IO_Append);
buff.writeBlock(data.data(), data.size());
buff.close();
@@ -1833,20 +1833,20 @@ void KMFolderImap::deleteMessage(KMMessage * msg)
"an empty UID. Aborting." << endl;
return;
}
- url.setPath(msg_parent->imapPath() + ";UID=" + QString::number(uid) );
+ url.setPath(msg_parent->imapPath() + ";UID=" + TQString::number(uid) );
if ( account()->makeConnection() != ImapAccountBase::Connected )
return;
KIO::SimpleJob *job = KIO::file_delete(url, false);
KIO::Scheduler::assignJobToSlave(account()->slave(), job);
ImapAccountBase::jobData jd( url.url(), 0 );
account()->insertJob(job, jd);
- connect(job, SIGNAL(result(KIO::Job *)),
- account(), SLOT(slotSimpleResult(KIO::Job *)));
+ connect(job, TQT_SIGNAL(result(KIO::Job *)),
+ account(), TQT_SLOT(slotSimpleResult(KIO::Job *)));
}
-void KMFolderImap::deleteMessage(const QPtrList<KMMessage>& msgList)
+void KMFolderImap::deleteMessage(const TQPtrList<KMMessage>& msgList)
{
- QPtrListIterator<KMMessage> it( msgList );
+ TQPtrListIterator<KMMessage> it( msgList );
KMMessage *msg;
while ( (msg = it.current()) != 0 ) {
++it;
@@ -1854,15 +1854,15 @@ void KMFolderImap::deleteMessage(const QPtrList<KMMessage>& msgList)
mMetaDataMap.remove( msg->msgIdMD5() );
}
- QValueList<ulong> uids;
+ TQValueList<ulong> uids;
getUids(msgList, uids);
- QStringList sets = makeSets(uids);
+ TQStringList sets = makeSets(uids);
KURL url = account()->getUrl();
KMFolderImap *msg_parent = static_cast<KMFolderImap*>(msgList.getFirst()->storage());
- for ( QStringList::Iterator it = sets.begin(); it != sets.end(); ++it )
+ for ( TQStringList::Iterator it = sets.begin(); it != sets.end(); ++it )
{
- QString uid = *it;
+ TQString uid = *it;
// Don't delete with no uid, that nukes the folder. Should not happen, but
// better safe than sorry.
if ( uid.isEmpty() ) continue;
@@ -1873,22 +1873,22 @@ void KMFolderImap::deleteMessage(const QPtrList<KMMessage>& msgList)
KIO::Scheduler::assignJobToSlave(account()->slave(), job);
ImapAccountBase::jobData jd( url.url(), 0 );
account()->insertJob(job, jd);
- connect(job, SIGNAL(result(KIO::Job *)),
- account(), SLOT(slotSimpleResult(KIO::Job *)));
+ connect(job, TQT_SIGNAL(result(KIO::Job *)),
+ account(), TQT_SLOT(slotSimpleResult(KIO::Job *)));
}
}
//-----------------------------------------------------------------------------
void KMFolderImap::setStatus(int idx, KMMsgStatus status, bool toggle)
{
- QValueList<int> ids; ids.append(idx);
+ TQValueList<int> ids; ids.append(idx);
setStatus(ids, status, toggle);
}
-void KMFolderImap::setStatus(QValueList<int>& _ids, KMMsgStatus status, bool toggle)
+void KMFolderImap::setStatus(TQValueList<int>& _ids, KMMsgStatus status, bool toggle)
{
FolderStorage::setStatus(_ids, status, toggle);
- QValueList<int> ids;
+ TQValueList<int> ids;
if ( mUploadAllFlags ) {
kdDebug(5006) << k_funcinfo << "Migrating all flags to the server" << endl;
ids.clear();
@@ -1912,8 +1912,8 @@ void KMFolderImap::setStatus(QValueList<int>& _ids, KMMsgStatus status, bool tog
if ( mReadOnly ) { // mUserRights is not available here
// FIXME duplicated code in KMFolderCachedImap
- QValueList<ulong> seenUids, unseenUids;
- for ( QValueList<int>::ConstIterator it = ids.constBegin(); it != ids.constEnd(); ++it ) {
+ TQValueList<ulong> seenUids, unseenUids;
+ for ( TQValueList<int>::ConstIterator it = ids.constBegin(); it != ids.constEnd(); ++it ) {
KMMessage *msg = 0;
bool unget = !isMessage(*it);
msg = getMsg(*it);
@@ -1925,40 +1925,40 @@ void KMFolderImap::setStatus(QValueList<int>& _ids, KMMsgStatus status, bool tog
if (unget) unGetMsg(*it);
}
if ( !seenUids.isEmpty() ) {
- QStringList sets = KMFolderImap::makeSets( seenUids, true );
- for( QStringList::Iterator it = sets.begin(); it != sets.end(); ++it ) {
- QString imappath = imapPath() + ";UID=" + ( *it );
+ TQStringList sets = KMFolderImap::makeSets( seenUids, true );
+ for( TQStringList::Iterator it = sets.begin(); it != sets.end(); ++it ) {
+ TQString imappath = imapPath() + ";UID=" + ( *it );
account()->setImapSeenStatus( folder(), imappath, true );
}
}
if ( !unseenUids.isEmpty() ) {
- QStringList sets = KMFolderImap::makeSets( unseenUids, true );
- for( QStringList::Iterator it = sets.begin(); it != sets.end(); ++it ) {
- QString imappath = imapPath() + ";UID=" + ( *it );
+ TQStringList sets = KMFolderImap::makeSets( unseenUids, true );
+ for( TQStringList::Iterator it = sets.begin(); it != sets.end(); ++it ) {
+ TQString imappath = imapPath() + ";UID=" + ( *it );
account()->setImapSeenStatus( folder(), imappath, false );
}
}
return;
}
- QMap< QString, QStringList > groups;
- for ( QValueList<int>::Iterator it = ids.begin(); it != ids.end(); ++it ) {
+ TQMap< TQString, TQStringList > groups;
+ for ( TQValueList<int>::Iterator it = ids.begin(); it != ids.end(); ++it ) {
KMMessage *msg = 0;
bool unget = !isMessage(*it);
msg = getMsg(*it);
if (!msg) continue;
- QString flags = statusToFlags(msg->status(), mPermanentFlags);
+ TQString flags = statusToFlags(msg->status(), mPermanentFlags);
// Collect uids for each type of flags.
- groups[flags].append(QString::number(msg->UID()));
+ groups[flags].append(TQString::number(msg->UID()));
if (unget) unGetMsg(*it);
}
- QMapIterator< QString, QStringList > dit;
+ TQMapIterator< TQString, TQStringList > dit;
for ( dit = groups.begin(); dit != groups.end(); ++dit ) {
- QCString flags = dit.key().latin1();
- QStringList sets = makeSets( (*dit), true );
+ TQCString flags = dit.key().latin1();
+ TQStringList sets = makeSets( (*dit), true );
// Send off a status setting job for each set.
- for ( QStringList::Iterator slit = sets.begin(); slit != sets.end(); ++slit ) {
- QString imappath = imapPath() + ";UID=" + ( *slit );
+ for ( TQStringList::Iterator slit = sets.begin(); slit != sets.end(); ++slit ) {
+ TQString imappath = imapPath() + ";UID=" + ( *slit );
account()->setImapStatus(folder(), imappath, flags);
}
}
@@ -1967,29 +1967,29 @@ void KMFolderImap::setStatus(QValueList<int>& _ids, KMMsgStatus status, bool tog
// to make sure that we get the latest flags abort the current listing and
// create a new one
kdDebug(5006) << "Set status during folder listing, restarting listing." << endl;
- disconnect(this, SLOT(slotListFolderResult(KIO::Job *)));
+ disconnect(this, TQT_SLOT(slotListFolderResult(KIO::Job *)));
quiet( false );
- reallyGetFolder( QString::null );
+ reallyGetFolder( TQString::null );
}
}
//-----------------------------------------------------------------------------
-QStringList KMFolderImap::makeSets(const QStringList& uids, bool sort)
+TQStringList KMFolderImap::makeSets(const TQStringList& uids, bool sort)
{
- QValueList<ulong> tmp;
- for ( QStringList::ConstIterator it = uids.begin(); it != uids.end(); ++it )
+ TQValueList<ulong> tmp;
+ for ( TQStringList::ConstIterator it = uids.begin(); it != uids.end(); ++it )
tmp.append( (*it).toInt() );
return makeSets(tmp, sort);
}
-QStringList KMFolderImap::makeSets( QValueList<ulong>& uids, bool sort )
+TQStringList KMFolderImap::makeSets( TQValueList<ulong>& uids, bool sort )
{
- QStringList sets;
- QString set;
+ TQStringList sets;
+ TQString set;
if (uids.size() == 1)
{
- sets.append(QString::number(uids.first()));
+ sets.append(TQString::number(uids.first()));
return sets;
}
@@ -1999,10 +1999,10 @@ QStringList KMFolderImap::makeSets( QValueList<ulong>& uids, bool sort )
// needed to make a uid like 124 instead of 124:124
bool inserted = false;
/* iterate over uids and build sets like 120:122,124,126:150 */
- for ( QValueList<ulong>::Iterator it = uids.begin(); it != uids.end(); ++it )
+ for ( TQValueList<ulong>::Iterator it = uids.begin(); it != uids.end(); ++it )
{
if (it == uids.begin() || set.isEmpty()) {
- set = QString::number(*it);
+ set = TQString::number(*it);
inserted = true;
} else
{
@@ -2010,9 +2010,9 @@ QStringList KMFolderImap::makeSets( QValueList<ulong>& uids, bool sort )
{
// end this range
if (inserted)
- set += ',' + QString::number(*it);
+ set += ',' + TQString::number(*it);
else
- set += ':' + QString::number(last) + ',' + QString::number(*it);
+ set += ':' + TQString::number(last) + ',' + TQString::number(*it);
inserted = true;
if (set.length() > 100)
{
@@ -2028,7 +2028,7 @@ QStringList KMFolderImap::makeSets( QValueList<ulong>& uids, bool sort )
}
// last element
if (!inserted)
- set += ':' + QString::number(uids.last());
+ set += ':' + TQString::number(uids.last());
if (!set.isEmpty()) sets.append(set);
@@ -2036,11 +2036,11 @@ QStringList KMFolderImap::makeSets( QValueList<ulong>& uids, bool sort )
}
//-----------------------------------------------------------------------------
-void KMFolderImap::getUids(QValueList<int>& ids, QValueList<ulong>& uids)
+void KMFolderImap::getUids(TQValueList<int>& ids, TQValueList<ulong>& uids)
{
KMMsgBase *msg = 0;
// get the uids
- for ( QValueList<int>::Iterator it = ids.begin(); it != ids.end(); ++it )
+ for ( TQValueList<int>::Iterator it = ids.begin(); it != ids.end(); ++it )
{
msg = getMsgBase(*it);
if (!msg) continue;
@@ -2048,11 +2048,11 @@ void KMFolderImap::getUids(QValueList<int>& ids, QValueList<ulong>& uids)
}
}
-void KMFolderImap::getUids(const QPtrList<KMMessage>& msgList, QValueList<ulong>& uids)
+void KMFolderImap::getUids(const TQPtrList<KMMessage>& msgList, TQValueList<ulong>& uids)
{
KMMessage *msg = 0;
- QPtrListIterator<KMMessage> it( msgList );
+ TQPtrListIterator<KMMessage> it( msgList );
while ( (msg = it.current()) != 0 ) {
++it;
if ( msg->UID() > 0 ) {
@@ -2074,16 +2074,16 @@ void KMFolderImap::expungeFolder(KMFolderImap * aFolder, bool quiet)
ImapAccountBase::jobData jd( url.url(), 0 );
jd.quiet = quiet;
account()->insertJob(job, jd);
- connect(job, SIGNAL(result(KIO::Job *)),
- account(), SLOT(slotSimpleResult(KIO::Job *)));
+ connect(job, TQT_SIGNAL(result(KIO::Job *)),
+ account(), TQT_SLOT(slotSimpleResult(KIO::Job *)));
}
//-----------------------------------------------------------------------------
-void KMFolderImap::slotProcessNewMail( int errorCode, const QString &errorMsg )
+void KMFolderImap::slotProcessNewMail( int errorCode, const TQString &errorMsg )
{
Q_UNUSED( errorMsg );
- disconnect( account(), SIGNAL( connectionResult(int, const QString&) ),
- this, SLOT( slotProcessNewMail(int, const QString&) ) );
+ disconnect( account(), TQT_SIGNAL( connectionResult(int, const TQString&) ),
+ this, TQT_SLOT( slotProcessNewMail(int, const TQString&) ) );
if ( !errorCode )
processNewMail( false );
else
@@ -2113,8 +2113,8 @@ bool KMFolderImap::processNewMail(bool)
{
// wait
kdDebug(5006) << "KMFolderImap::processNewMail - waiting for connection: " << label() << endl;
- connect( account(), SIGNAL( connectionResult(int, const QString&) ),
- this, SLOT( slotProcessNewMail(int, const QString&) ) );
+ connect( account(), TQT_SIGNAL( connectionResult(int, const TQString&) ),
+ this, TQT_SLOT( slotProcessNewMail(int, const TQString&) ) );
return true;
}
KURL url = account()->getUrl();
@@ -2126,7 +2126,7 @@ bool KMFolderImap::processNewMail(bool)
mMailCheckProgressItem = ProgressManager::createProgressItem(
"MailCheckAccount" + account()->name(),
"MailCheck" + folder()->prettyURL(),
- QStyleSheet::escape( folder()->prettyURL() ),
+ TQStyleSheet::escape( folder()->prettyURL() ),
i18n("updating message counts"),
false,
account()->useSSL() || account()->useTLS() );
@@ -2136,8 +2136,8 @@ bool KMFolderImap::processNewMail(bool)
ImapAccountBase::jobData jd(url.url(), folder() );
jd.cancellable = true;
account()->insertJob(job, jd);
- connect(job, SIGNAL(result(KIO::Job *)),
- SLOT(slotStatResult(KIO::Job *)));
+ connect(job, TQT_SIGNAL(result(KIO::Job *)),
+ TQT_SLOT(slotStatResult(KIO::Job *)));
return true;
}
@@ -2179,17 +2179,17 @@ int KMFolderImap::create()
return KMFolderMbox::create();
}
-QValueList<ulong> KMFolderImap::splitSets(const QString uids)
+TQValueList<ulong> KMFolderImap::splitSets(const TQString uids)
{
- QValueList<ulong> uidlist;
+ TQValueList<ulong> uidlist;
// ex: 1205,1204,1203,1202,1236:1238
- QString buffer = QString::null;
+ TQString buffer = TQString::null;
int setstart = -1;
// iterate over the uids
for (uint i = 0; i < uids.length(); i++)
{
- QChar chr = uids[i];
+ TQChar chr = uids[i];
if (chr == ',')
{
if (setstart > -1)
@@ -2209,7 +2209,7 @@ QValueList<ulong> KMFolderImap::splitSets(const QString uids)
// remember the start of the range
setstart = buffer.toInt();
buffer = "";
- } else if (chr.category() == QChar::Number_DecimalDigit) {
+ } else if (chr.category() == TQChar::Number_DecimalDigit) {
// digit
buffer += chr;
} else {
@@ -2246,8 +2246,8 @@ int KMFolderImap::expungeContents()
ImapAccountBase::jobData jd( url.url(), 0 );
jd.quiet = true;
account()->insertJob(job, jd);
- connect(job, SIGNAL(result(KIO::Job *)),
- account(), SLOT(slotSimpleResult(KIO::Job *)));
+ connect(job, TQT_SIGNAL(result(KIO::Job *)),
+ account(), TQT_SLOT(slotSimpleResult(KIO::Job *)));
}
/* Is the below correct? If we are expunging (in the folder sense, not the imap sense),
why delete but not (imap-)expunge? Since the folder is not active there is no concept
@@ -2285,7 +2285,7 @@ void KMFolderImap::setSubfolderState( imapState state )
{
// pass through to children
KMFolderNode* node;
- QPtrListIterator<KMFolderNode> it( *folder()->child() );
+ TQPtrListIterator<KMFolderNode> it( *folder()->child() );
for ( ; (node = it.current()); )
{
++it;
@@ -2313,7 +2313,7 @@ void KMFolderImap::setAlreadyRemoved( bool removed )
{
// pass through to childs
KMFolderNode* node;
- QPtrListIterator<KMFolderNode> it( *folder()->child() );
+ TQPtrListIterator<KMFolderNode> it( *folder()->child() );
for ( ; (node = it.current()); )
{
++it;
@@ -2324,13 +2324,13 @@ void KMFolderImap::setAlreadyRemoved( bool removed )
}
}
-void KMFolderImap::slotCreatePendingFolders( int errorCode, const QString& errorMsg )
+void KMFolderImap::slotCreatePendingFolders( int errorCode, const TQString& errorMsg )
{
Q_UNUSED( errorMsg );
- disconnect( account(), SIGNAL( connectionResult( int, const QString& ) ),
- this, SLOT( slotCreatePendingFolders( int, const QString& ) ) );
+ disconnect( account(), TQT_SIGNAL( connectionResult( int, const TQString& ) ),
+ this, TQT_SLOT( slotCreatePendingFolders( int, const TQString& ) ) );
if ( !errorCode ) {
- QStringList::Iterator it = mFoldersPendingCreation.begin();
+ TQStringList::Iterator it = mFoldersPendingCreation.begin();
for ( ; it != mFoldersPendingCreation.end(); ++it ) {
createFolder( *it );
}
@@ -2344,18 +2344,18 @@ void KMFolderImap::search( const KMSearchPattern* pattern )
if ( !pattern || pattern->isEmpty() )
{
// not much to do here
- QValueList<Q_UINT32> serNums;
+ TQValueList<Q_UINT32> serNums;
emit searchResult( folder(), serNums, pattern, true );
return;
}
SearchJob* job = new SearchJob( this, account(), pattern );
- connect( job, SIGNAL( searchDone( QValueList<Q_UINT32>, const KMSearchPattern*, bool ) ),
- this, SLOT( slotSearchDone( QValueList<Q_UINT32>, const KMSearchPattern*, bool ) ) );
+ connect( job, TQT_SIGNAL( searchDone( TQValueList<Q_UINT32>, const KMSearchPattern*, bool ) ),
+ this, TQT_SLOT( slotSearchDone( TQValueList<Q_UINT32>, const KMSearchPattern*, bool ) ) );
job->start();
}
//-----------------------------------------------------------------------------
-void KMFolderImap::slotSearchDone( QValueList<Q_UINT32> serNums,
+void KMFolderImap::slotSearchDone( TQValueList<Q_UINT32> serNums,
const KMSearchPattern* pattern,
bool complete )
{
@@ -2372,8 +2372,8 @@ void KMFolderImap::search( const KMSearchPattern* pattern, Q_UINT32 serNum )
return;
}
SearchJob* job = new SearchJob( this, account(), pattern, serNum );
- connect( job, SIGNAL( searchDone( Q_UINT32, const KMSearchPattern*, bool ) ),
- this, SLOT( slotSearchDone( Q_UINT32, const KMSearchPattern*, bool ) ) );
+ connect( job, TQT_SIGNAL( searchDone( Q_UINT32, const KMSearchPattern*, bool ) ),
+ this, TQT_SLOT( slotSearchDone( Q_UINT32, const KMSearchPattern*, bool ) ) );
job->start();
}
@@ -2414,7 +2414,7 @@ void KMFolderImap::saveMsgMetaData( KMMessage* msg, ulong uid )
}
//-----------------------------------------------------------------------------
-void KMFolderImap::setImapPath( const QString& path )
+void KMFolderImap::setImapPath( const TQString& path )
{
if ( path.isEmpty() ) {
kdWarning(5006) << k_funcinfo << "ignoring empty path" << endl;
diff --git a/kmail/kmfolderimap.h b/kmail/kmfolderimap.h
index f7c027e0e..da026728c 100644
--- a/kmail/kmfolderimap.h
+++ b/kmail/kmfolderimap.h
@@ -33,8 +33,8 @@
#include <kstandarddirs.h>
-#include <qintdict.h>
-#include <qdict.h>
+#include <tqintdict.h>
+#include <tqdict.h>
template< typename T> class QPtrList;
template< typename T> class QValueList;
@@ -80,7 +80,7 @@ class KMFolderImap : public KMFolderMbox
friend class ::KMail::ImapJob;
public:
- static QString cacheLocation() {
+ static TQString cacheLocation() {
return locateLocal("data", "kmail/imap" );
}
@@ -108,15 +108,15 @@ public:
virtual KMMessage* getMsg(int idx);
/** The path to the imap folder on the server */
- void setImapPath( const QString &path );
- QString imapPath() const { return mImapPath; }
+ void setImapPath( const TQString &path );
+ TQString imapPath() const { return mImapPath; }
/** The highest UID in the folder */
ulong lastUid();
/** The uidvalidity of the last update */
- void setUidValidity(const QString &validity) { mUidValidity = validity; }
- QString uidValidity() { return mUidValidity; }
+ void setUidValidity(const TQString &validity) { mUidValidity = validity; }
+ TQString uidValidity() { return mUidValidity; }
/** The imap account associated with this folder */
void setAccount(KMAcctImap *acct);
@@ -124,9 +124,9 @@ public:
/** Remove (first occurrence of) given message from the folder. */
virtual void removeMsg(int i, bool quiet = FALSE);
- virtual void removeMsg(const QPtrList<KMMessage>& msgList, bool quiet = FALSE);
+ virtual void removeMsg(const TQPtrList<KMMessage>& msgList, bool quiet = FALSE);
- virtual int rename( const QString& newName, KMFolderDir *aParent = 0 );
+ virtual int rename( const TQString& newName, KMFolderDir *aParent = 0 );
/** Remove the IMAP folder on the server and if successful also locally */
virtual void remove();
@@ -169,14 +169,14 @@ public:
* that contain messages _or_ folders the new folder is set to "contains messages"
* by default
*/
- void createFolder(const QString &name,
- const QString& imapPath = QString::null, bool askUser = true);
+ void createFolder(const TQString &name,
+ const TQString& imapPath = TQString::null, bool askUser = true);
/**
* Delete a message
*/
void deleteMessage(KMMessage * msg);
- void deleteMessage(const QPtrList<KMMessage>& msgList);
+ void deleteMessage(const TQPtrList<KMMessage>& msgList);
/**
* Change the status of the message indicated by @p index
@@ -187,21 +187,21 @@ public:
/**
* Change the status of several messages indicated by @p ids
*/
- virtual void setStatus(QValueList<int>& _ids, KMMsgStatus status, bool toggle);
+ virtual void setStatus(TQValueList<int>& _ids, KMMsgStatus status, bool toggle);
/** generates sets of uids */
- static QStringList makeSets( QValueList<ulong>&, bool sort = true);
- static QStringList makeSets(const QStringList&, bool sort = true);
+ static TQStringList makeSets( TQValueList<ulong>&, bool sort = true);
+ static TQStringList makeSets(const TQStringList&, bool sort = true);
/** splits the message list according to sets. Modifies the @msgList. */
- static QPtrList<KMMessage> splitMessageList(const QString& set,
- QPtrList<KMMessage>& msgList);
+ static TQPtrList<KMMessage> splitMessageList(const TQString& set,
+ TQPtrList<KMMessage>& msgList);
/** gets the uids of the given ids */
- void getUids(QValueList<int>& ids, QValueList<ulong>& uids);
+ void getUids(TQValueList<int>& ids, TQValueList<ulong>& uids);
/** same as above but accepts a Message-List */
- void getUids(const QPtrList<KMMessage>& msgList, QValueList<ulong>& uids);
+ void getUids(const TQPtrList<KMMessage>& msgList, TQValueList<ulong>& uids);
/**
* Expunge deleted messages from the folder
@@ -232,19 +232,19 @@ public:
/**
* Encode the given string in a filename save 7 bit string
*/
- static QString encodeFileName(const QString &);
- static QString decodeFileName(const QString &);
- static QTextCodec * utf7Codec();
+ static TQString encodeFileName(const TQString &);
+ static TQString decodeFileName(const TQString &);
+ static TQTextCodec * utf7Codec();
/**
* Convert message status to a list of IMAP flags
*/
- static QString statusToFlags(KMMsgStatus status, int supportedFalgs);
+ static TQString statusToFlags(KMMsgStatus status, int supportedFalgs);
/**
* Return the filename of the folder (reimplemented from KFolder)
*/
- virtual QString fileName() const {
+ virtual TQString fileName() const {
return encodeFileName( KMFolderMbox::fileName() ); }
/**
@@ -261,7 +261,7 @@ public:
/**
* Splits a uid-set into single uids
*/
- static QValueList<ulong> splitSets(const QString);
+ static TQValueList<ulong> splitSets(const TQString);
virtual void ignoreJobsForMessage( KMMessage* );
@@ -316,7 +316,7 @@ public:
virtual bool isMoveable() const;
/** Initialize this storage from another one. Used when creating a child folder */
- void initializeFrom( KMFolderImap* parent, QString path, QString mimeType );
+ void initializeFrom( KMFolderImap* parent, TQString path, TQString mimeType );
/** Returns the IMAP flags that can be stored on the server. */
int permanentFlags() const { return mPermanentFlags; }
@@ -339,12 +339,12 @@ signals:
* @param name The name of the folder that should have been created.
* @param success True if the folder was created, false otherwise.
*/
- void folderCreationResult( const QString &name, bool success );
+ void folderCreationResult( const TQString &name, bool success );
public slots:
/** Add a message to a folder after is has been added on an IMAP server */
virtual void addMsgQuiet(KMMessage *);
- virtual void addMsgQuiet(QPtrList<KMMessage>);
+ virtual void addMsgQuiet(TQPtrList<KMMessage>);
/** Add the given message to the folder. Usually the message
is added at the end of the folder. Returns zero on success and
@@ -353,21 +353,21 @@ public slots:
Please note that the message is added as is to the folder and the folder
takes ownership of the message (deleting it in the destructor).*/
virtual int addMsg(KMMessage* msg, int* index_return = 0);
- virtual int addMsg(QPtrList<KMMessage>&, QValueList<int>& index_return);
+ virtual int addMsg(TQPtrList<KMMessage>&, TQValueList<int>& index_return);
/** Copy the messages to this folder */
- void copyMsg(QPtrList<KMMessage>& msgList/*, KMFolder* parent*/);
+ void copyMsg(TQPtrList<KMMessage>& msgList/*, KMFolder* parent*/);
/** Detach message from this folder. Usable to call addMsg() afterwards.
Loads the message if it is not loaded up to now. */
virtual KMMessage* take(int idx);
- virtual void take(QPtrList<KMMessage>);
+ virtual void take(TQPtrList<KMMessage>);
/**
* Add the data a KIO::Job retrieves to the buffer
*/
- void slotSimpleData(KIO::Job * job, const QByteArray & data);
+ void slotSimpleData(KIO::Job * job, const TQByteArray & data);
/**
* Convert IMAP flags to a message status
@@ -389,7 +389,7 @@ public slots:
/**
* Called from the SearchJob when the folder is done or messages where found
*/
- void slotSearchDone( QValueList<Q_UINT32> serNums,
+ void slotSearchDone( TQValueList<Q_UINT32> serNums,
const KMSearchPattern* pattern,
bool complete );
@@ -402,21 +402,21 @@ public slots:
* Connected to ListJob::receivedFolders
* creates/removes folders
*/
- void slotListResult( const QStringList&, const QStringList&,
- const QStringList&, const QStringList&, const ImapAccountBase::jobData& );
+ void slotListResult( const TQStringList&, const TQStringList&,
+ const TQStringList&, const TQStringList&, const ImapAccountBase::jobData& );
/**
* Connected to slotListNamespaces
* creates/removes namespace folders
*/
- void slotCheckNamespace( const QStringList&, const QStringList&,
- const QStringList&, const QStringList&, const ImapAccountBase::jobData& );
+ void slotCheckNamespace( const TQStringList&, const TQStringList&,
+ const TQStringList&, const TQStringList&, const ImapAccountBase::jobData& );
protected:
virtual FolderJob* doCreateJob( KMMessage *msg, FolderJob::JobType jt,
- KMFolder *folder, QString partSpecifier,
+ KMFolder *folder, TQString partSpecifier,
const AttachmentStrategy *as ) const;
- virtual FolderJob* doCreateJob( QPtrList<KMMessage>& msgList, const QString& sets,
+ virtual FolderJob* doCreateJob( TQPtrList<KMMessage>& msgList, const TQString& sets,
FolderJob::JobType jt, KMFolder *folder ) const;
void getMessagesResult(KIO::Job * job, bool lastSet);
@@ -426,16 +426,16 @@ protected:
the various index files deleted. Returns 0 on success. */
virtual int expungeContents();
- void setChildrenState( QString attributes );
+ void setChildrenState( TQString attributes );
/** Create or find the INBOX and initialize it */
void initInbox();
/** See if there is a better parent then this folder */
- KMFolderImap* findParent( const QString& path, const QString& name );
+ KMFolderImap* findParent( const TQString& path, const TQString& name );
/** See if all folders are still present on server, otherwise delete them */
- void checkFolders( const QStringList& folderNames, const QString& ns );
+ void checkFolders( const TQStringList& folderNames, const TQString& ns );
void finishMailCheck( const char *func, imapState state );
@@ -450,7 +450,7 @@ protected slots:
/**
* Get the folder now (internal)
*/
- void reallyGetFolder(const QString &startUid = QString::null);
+ void reallyGetFolder(const TQString &startUid = TQString::null);
/**
* For listing the contents of a folder
@@ -463,7 +463,7 @@ protected slots:
*/
void slotGetMessagesResult(KIO::Job * job);
void slotGetLastMessagesResult(KIO::Job * job);
- void slotGetMessagesData(KIO::Job * job, const QByteArray & data);
+ void slotGetMessagesData(KIO::Job * job, const TQByteArray & data);
/**
* For creating a new subfolder
@@ -489,14 +489,14 @@ protected slots:
/**
* Is called when the slave is connected and triggers a newmail check
*/
- void slotProcessNewMail( int errorCode, const QString& errorMsg );
+ void slotProcessNewMail( int errorCode, const TQString& errorMsg );
/**
* Is connected when there are folders to be created on startup and the
* account is still connecting. Once the account emits the connected
* signal this slot is called and the folders created.
*/
- void slotCreatePendingFolders( int errorCode, const QString& errorMsg );
+ void slotCreatePendingFolders( int errorCode, const TQString& errorMsg );
/**
* Starts a namespace listing
@@ -504,35 +504,35 @@ protected slots:
void slotListNamespaces();
protected:
- QString mImapPath;
+ TQString mImapPath;
ulong mLastUid;
imapState mContentState, mSubfolderState;
bool mIsSelected;
bool mCheckFlags;
bool mReadOnly;
bool mCheckMail;
- mutable QGuardedPtr<KMAcctImap> mAccount;
+ mutable TQGuardedPtr<KMAcctImap> mAccount;
// the current uidvalidity
- QString mUidValidity;
+ TQString mUidValidity;
unsigned int mUserRights;
private:
// if we're checking validity currently
bool mCheckingValidity;
// uid - metadata cache
- QIntDict<KMMsgMetaData> mUidMetaDataMap;
+ TQIntDict<KMMsgMetaData> mUidMetaDataMap;
// msgidMD5 - status map
- QDict<KMMsgMetaData> mMetaDataMap;
+ TQDict<KMMsgMetaData> mMetaDataMap;
// if the folder should be deleted without server roundtrip
bool mAlreadyRemoved;
// the progress for mailchecks
- QGuardedPtr<ProgressItem> mMailCheckProgressItem;
+ TQGuardedPtr<ProgressItem> mMailCheckProgressItem;
// the progress for listings
ProgressItem *mListDirProgressItem;
// the progress for addMsg
ProgressItem *mAddMessageProgressItem;
// to-be-added folders
- QStringList mFoldersPendingCreation;
+ TQStringList mFoldersPendingCreation;
// push all flags to the server instead of just the changed once
// when doing a flag change the next time
diff --git a/kmail/kmfolderindex.cpp b/kmail/kmfolderindex.cpp
index a76b74f53..6a3781570 100644
--- a/kmail/kmfolderindex.cpp
+++ b/kmail/kmfolderindex.cpp
@@ -19,8 +19,8 @@
#include "kmfolderindex.h"
#include "kmfolder.h"
#include <config.h>
-#include <qfileinfo.h>
-#include <qtimer.h>
+#include <tqfileinfo.h>
+#include <tqtimer.h>
#include <kdebug.h>
@@ -90,9 +90,9 @@ KMFolderIndex::~KMFolderIndex()
}
-QString KMFolderIndex::indexLocation() const
+TQString KMFolderIndex::indexLocation() const
{
- QString sLocation(folder()->path());
+ TQString sLocation(folder()->path());
if ( !sLocation.isEmpty() ) {
sLocation += '/';
@@ -122,22 +122,22 @@ int KMFolderIndex::updateIndex()
int KMFolderIndex::writeIndex( bool createEmptyIndex )
{
- QString tempName;
- QString indexName;
+ TQString tempName;
+ TQString indexName;
mode_t old_umask;
int len;
const uchar *buffer = 0;
indexName = indexLocation();
tempName = indexName + ".temp";
- unlink(QFile::encodeName(tempName));
+ unlink(TQFile::encodeName(tempName));
// We touch the folder, otherwise the index is regenerated, if KMail is
// running, while the clock switches from daylight savings time to normal time
- utime(QFile::encodeName(location()), 0);
+ utime(TQFile::encodeName(location()), 0);
old_umask = umask(077);
- FILE *tmpIndexStream = fopen(QFile::encodeName(tempName), "w");
+ FILE *tmpIndexStream = fopen(TQFile::encodeName(tempName), "w");
umask(old_umask);
if (!tmpIndexStream)
return errno;
@@ -189,7 +189,7 @@ int KMFolderIndex::writeIndex( bool createEmptyIndex )
if( fclose( tmpIndexStream ) != 0 )
return errno;
- ::rename(QFile::encodeName(tempName), QFile::encodeName(indexName));
+ ::rename(TQFile::encodeName(tempName), TQFile::encodeName(indexName));
mHeaderOffset = nho;
if (mIndexStream)
fclose(mIndexStream);
@@ -197,7 +197,7 @@ int KMFolderIndex::writeIndex( bool createEmptyIndex )
if ( createEmptyIndex )
return 0;
- mIndexStream = fopen(QFile::encodeName(indexName), "r+"); // index file
+ mIndexStream = fopen(TQFile::encodeName(indexName), "r+"); // index file
assert( mIndexStream );
fcntl(fileno(mIndexStream), F_SETFD, FD_CLOEXEC);
@@ -247,7 +247,7 @@ bool KMFolderIndex::readIndex()
}
else
{
- QCString line(MAX_LINE);
+ TQCString line(MAX_LINE);
fgets(line.data(), MAX_LINE, mIndexStream);
if (feof(mIndexStream)) break;
if (*line.data() == '\0') {
@@ -334,7 +334,7 @@ bool KMFolderIndex::readIndexHeader(int *gv)
"The mail index for '%1' is from an unknown version of KMail (%2).\n"
"This index can be regenerated from your mail folder, but some "
"information, including status flags, may be lost. Do you wish "
- "to downgrade your index file?") .arg(name()) .arg(indexVersion), QString::null, i18n("Downgrade"), i18n("Do Not Downgrade") );
+ "to downgrade your index file?") .arg(name()) .arg(indexVersion), TQString::null, i18n("Downgrade"), i18n("Do Not Downgrade") );
kapp->restoreOverrideCursor();
if (r == KMessageBox::Yes)
createIndexFromContents();
@@ -394,9 +394,9 @@ bool KMFolderIndex::updateIndexStreamPtr(bool)
{
// We touch the folder, otherwise the index is regenerated, if KMail is
// running, while the clock switches from daylight savings time to normal time
- utime(QFile::encodeName(location()), 0);
- utime(QFile::encodeName(indexLocation()), 0);
- utime(QFile::encodeName( KMMsgDict::getFolderIdsLocation( *this ) ), 0);
+ utime(TQFile::encodeName(location()), 0);
+ utime(TQFile::encodeName(indexLocation()), 0);
+ utime(TQFile::encodeName( KMMsgDict::getFolderIdsLocation( *this ) ), 0);
mIndexSwapByteOrder = false;
#ifdef HAVE_MMAP
@@ -434,8 +434,8 @@ bool KMFolderIndex::updateIndexStreamPtr(bool)
KMFolderIndex::IndexStatus KMFolderIndex::indexStatus()
{
- QFileInfo contInfo(location());
- QFileInfo indInfo(indexLocation());
+ TQFileInfo contInfo(location());
+ TQFileInfo indInfo(indexLocation());
if (!contInfo.exists()) return KMFolderIndex::IndexOk;
if (!indInfo.exists()) return KMFolderIndex::IndexMissing;
@@ -454,7 +454,7 @@ void KMFolderIndex::clearIndex(bool autoDelete, bool syncDict)
void KMFolderIndex::truncateIndex()
{
if ( mHeaderOffset )
- truncate(QFile::encodeName(indexLocation()), mHeaderOffset);
+ truncate(TQFile::encodeName(indexLocation()), mHeaderOffset);
else
// The index file wasn't opened, so we don't know the header offset.
// So let's just create a new empty index.
diff --git a/kmail/kmfolderindex.h b/kmail/kmfolderindex.h
index bb294b233..05453bb68 100644
--- a/kmail/kmfolderindex.h
+++ b/kmail/kmfolderindex.h
@@ -77,7 +77,7 @@ public:
bool indexSwapByteOrder() { return mIndexSwapByteOrder; }
int indexSizeOfLong() { return mIndexSizeOfLong; }
- virtual QString indexLocation() const;
+ virtual TQString indexLocation() const;
virtual int writeIndex( bool createEmptyIndex = false );
void recreateIndex();
diff --git a/kmail/kmfoldermaildir.cpp b/kmail/kmfoldermaildir.cpp
index f13bb6761..bfb606f7e 100644
--- a/kmail/kmfoldermaildir.cpp
+++ b/kmail/kmfoldermaildir.cpp
@@ -6,8 +6,8 @@
#include <config.h>
#endif
-#include <qdir.h>
-#include <qregexp.h>
+#include <tqdir.h>
+#include <tqregexp.h>
#include <libkdepim/kfileio.h>
#include "kmfoldermaildir.h"
@@ -48,7 +48,7 @@ using KMail::MaildirJob;
#endif
// define the static member
-QValueList<KMFolderMaildir::DirSizeJobQueueEntry> KMFolderMaildir::s_DirSizeJobQueue;
+TQValueList<KMFolderMaildir::DirSizeJobQueueEntry> KMFolderMaildir::s_DirSizeJobQueue;
//-----------------------------------------------------------------------------
KMFolderMaildir::KMFolderMaildir(KMFolder* folder, const char* name)
@@ -71,19 +71,19 @@ int KMFolderMaildir::canAccess()
assert(!folder()->name().isEmpty());
- QString sBadFolderName;
- if (access(QFile::encodeName(location()), R_OK | W_OK | X_OK) != 0) {
+ TQString sBadFolderName;
+ if (access(TQFile::encodeName(location()), R_OK | W_OK | X_OK) != 0) {
sBadFolderName = location();
- } else if (access(QFile::encodeName(location() + "/new"), R_OK | W_OK | X_OK) != 0) {
+ } else if (access(TQFile::encodeName(location() + "/new"), R_OK | W_OK | X_OK) != 0) {
sBadFolderName = location() + "/new";
- } else if (access(QFile::encodeName(location() + "/cur"), R_OK | W_OK | X_OK) != 0) {
+ } else if (access(TQFile::encodeName(location() + "/cur"), R_OK | W_OK | X_OK) != 0) {
sBadFolderName = location() + "/cur";
- } else if (access(QFile::encodeName(location() + "/tmp"), R_OK | W_OK | X_OK) != 0) {
+ } else if (access(TQFile::encodeName(location() + "/tmp"), R_OK | W_OK | X_OK) != 0) {
sBadFolderName = location() + "/tmp";
}
if ( !sBadFolderName.isEmpty() ) {
- int nRetVal = QFile::exists(sBadFolderName) ? EPERM : ENOENT;
+ int nRetVal = TQFile::exists(sBadFolderName) ? EPERM : ENOENT;
KCursorSaver idle(KBusyPtr::idle());
if ( nRetVal == ENOENT )
KMessageBox::sorry(0, i18n("Error opening %1; this folder is missing.")
@@ -119,13 +119,13 @@ int KMFolderMaildir::open(const char *)
{
if (KMFolderIndex::IndexOk != indexStatus()) // test if contents file has changed
{
- QString str;
+ TQString str;
mIndexStream = 0;
str = i18n("Folder `%1' changed; recreating index.")
.arg(name());
emit statusMsg(str);
} else {
- mIndexStream = fopen(QFile::encodeName(indexLocation()), "r+"); // index file
+ mIndexStream = fopen(TQFile::encodeName(indexLocation()), "r+"); // index file
if ( mIndexStream ) {
fcntl(fileno(mIndexStream), F_SETFD, FD_CLOEXEC);
updateIndexStreamPtr();
@@ -152,10 +152,10 @@ int KMFolderMaildir::open(const char *)
//-----------------------------------------------------------------------------
-int KMFolderMaildir::createMaildirFolders( const QString & folderPath )
+int KMFolderMaildir::createMaildirFolders( const TQString & folderPath )
{
// Make sure that neither a new, cur or tmp subfolder exists already.
- QFileInfo dirinfo;
+ TQFileInfo dirinfo;
dirinfo.setFile( folderPath + "/new" );
if ( dirinfo.exists() ) return EEXIST;
dirinfo.setFile( folderPath + "/cur" );
@@ -164,19 +164,19 @@ int KMFolderMaildir::createMaildirFolders( const QString & folderPath )
if ( dirinfo.exists() ) return EEXIST;
// create the maildir directory structure
- if ( ::mkdir( QFile::encodeName( folderPath ), S_IRWXU ) > 0 ) {
+ if ( ::mkdir( TQFile::encodeName( folderPath ), S_IRWXU ) > 0 ) {
kdDebug(5006) << "Could not create folder " << folderPath << endl;
return errno;
}
- if ( ::mkdir( QFile::encodeName( folderPath + "/new" ), S_IRWXU ) > 0 ) {
+ if ( ::mkdir( TQFile::encodeName( folderPath + "/new" ), S_IRWXU ) > 0 ) {
kdDebug(5006) << "Could not create folder " << folderPath << "/new" << endl;
return errno;
}
- if ( ::mkdir( QFile::encodeName( folderPath + "/cur" ), S_IRWXU ) > 0 ) {
+ if ( ::mkdir( TQFile::encodeName( folderPath + "/cur" ), S_IRWXU ) > 0 ) {
kdDebug(5006) << "Could not create folder " << folderPath << "/cur" << endl;
return errno;
}
- if ( ::mkdir( QFile::encodeName( folderPath + "/tmp" ), S_IRWXU ) > 0 ) {
+ if ( ::mkdir( TQFile::encodeName( folderPath + "/tmp" ), S_IRWXU ) > 0 ) {
kdDebug(5006) << "Could not create folder " << folderPath << "/tmp" << endl;
return errno;
}
@@ -201,7 +201,7 @@ int KMFolderMaildir::create()
if (!folder()->path().isEmpty())
{
old_umask = umask(077);
- mIndexStream = fopen(QFile::encodeName(indexLocation()), "w+"); //sven; open RW
+ mIndexStream = fopen(TQFile::encodeName(indexLocation()), "w+"); //sven; open RW
updateIndexStreamPtr(true);
umask(old_umask);
@@ -257,25 +257,25 @@ void KMFolderMaildir::sync()
int KMFolderMaildir::expungeContents()
{
// nuke all messages in this folder now
- QDir d(location() + "/new");
- // d.setFilter(QDir::Files); coolo: QFile::remove returns false for non-files
- QStringList files(d.entryList());
- QStringList::ConstIterator it(files.begin());
+ TQDir d(location() + "/new");
+ // d.setFilter(TQDir::Files); coolo: TQFile::remove returns false for non-files
+ TQStringList files(d.entryList());
+ TQStringList::ConstIterator it(files.begin());
for ( ; it != files.end(); ++it)
- QFile::remove(d.filePath(*it));
+ TQFile::remove(d.filePath(*it));
d.setPath(location() + "/cur");
files = d.entryList();
for (it = files.begin(); it != files.end(); ++it)
- QFile::remove(d.filePath(*it));
+ TQFile::remove(d.filePath(*it));
return 0;
}
-int KMFolderMaildir::compact( unsigned int startIndex, int nbMessages, const QStringList& entryList, bool& done )
+int KMFolderMaildir::compact( unsigned int startIndex, int nbMessages, const TQStringList& entryList, bool& done )
{
- QString subdirNew(location() + "/new/");
- QString subdirCur(location() + "/cur/");
+ TQString subdirNew(location() + "/new/");
+ TQString subdirCur(location() + "/cur/");
unsigned int stopIndex = nbMessages == -1 ? mMsgList.count() :
QMIN( mMsgList.count(), startIndex + nbMessages );
@@ -285,7 +285,7 @@ int KMFolderMaildir::compact( unsigned int startIndex, int nbMessages, const QSt
if (!mi)
continue;
- QString filename(mi->fileName());
+ TQString filename(mi->fileName());
if (filename.isEmpty())
continue;
@@ -330,7 +330,7 @@ int KMFolderMaildir::compact( bool silent )
//-------------------------------------------------------------
FolderJob*
KMFolderMaildir::doCreateJob( KMMessage *msg, FolderJob::JobType jt,
- KMFolder *folder, QString, const AttachmentStrategy* ) const
+ KMFolder *folder, TQString, const AttachmentStrategy* ) const
{
MaildirJob *job = new MaildirJob( msg, jt, folder );
job->setParentFolder( this );
@@ -339,7 +339,7 @@ KMFolderMaildir::doCreateJob( KMMessage *msg, FolderJob::JobType jt,
//-------------------------------------------------------------
FolderJob*
-KMFolderMaildir::doCreateJob( QPtrList<KMMessage>& msgList, const QString& sets,
+KMFolderMaildir::doCreateJob( TQPtrList<KMMessage>& msgList, const TQString& sets,
FolderJob::JobType jt, KMFolder *folder ) const
{
MaildirJob *job = new MaildirJob( msgList, sets, jt, folder );
@@ -359,9 +359,9 @@ int KMFolderMaildir::addMsgInternal( KMMessage* aMsg, int* index_return,
bool stripUid )
{
/*
-QFile fileD0( "testdat_xx-kmfoldermaildir-0" );
+TQFile fileD0( "testdat_xx-kmfoldermaildir-0" );
if( fileD0.open( IO_WriteOnly ) ) {
- QDataStream ds( &fileD0 );
+ TQDataStream ds( &fileD0 );
ds.writeRawBytes( aMsg->asString(), aMsg->asString().length() );
fileD0.close(); // If data is 0 we just create a zero length file.
}
@@ -369,7 +369,7 @@ if( fileD0.open( IO_WriteOnly ) ) {
long len;
unsigned long size;
KMFolder* msgParent;
- QCString msgText;
+ TQCString msgText;
int idx(-1);
int rc;
@@ -389,7 +389,7 @@ if( fileD0.open( IO_WriteOnly ) ) {
aMsg->removeHeaderField("Content-Type"); // the line above
- const QString uidHeader = aMsg->headerField( "X-UID" );
+ const TQString uidHeader = aMsg->headerField( "X-UID" );
if ( !uidHeader.isEmpty() && stripUid )
aMsg->removeHeaderField( "X-UID" );
@@ -408,15 +408,15 @@ if( fileD0.open( IO_WriteOnly ) ) {
}
// make sure the filename has the correct extension
- QString filename = constructValidFileName( aMsg->fileName(), aMsg->status() );
+ TQString filename = constructValidFileName( aMsg->fileName(), aMsg->status() );
- QString tmp_file(location() + "/tmp/");
+ TQString tmp_file(location() + "/tmp/");
tmp_file += filename;
if (!KPIM::kCStringToFile(msgText, tmp_file, false, false, false))
kmkernel->emergencyExit( i18n("Message could not be added to the folder, possibly disk space is low.") );
- QFile file(tmp_file);
+ TQFile file(tmp_file);
size = msgText.length();
KMFolderOpener openThis(folder(), "maildir");
@@ -428,7 +428,7 @@ if( fileD0.open( IO_WriteOnly ) ) {
}
// now move the file to the correct location
- QString new_loc(location() + "/cur/");
+ TQString new_loc(location() + "/cur/");
new_loc += filename;
if (moveInternal(tmp_file, new_loc, filename, aMsg->status()).isNull())
{
@@ -505,7 +505,7 @@ if( fileD0.open( IO_WriteOnly ) ) {
kdDebug(5006) << "Error: Could not add message to folder (No space left on device?)" << endl;
if (ftell(mIndexStream) > revert) {
kdDebug(5006) << "Undoing changes" << endl;
- truncate( QFile::encodeName(indexLocation()), revert );
+ truncate( TQFile::encodeName(indexLocation()), revert );
}
kmkernel->emergencyExit(i18n("KMFolderMaildir::addMsg: abnormally terminating to prevent data loss."));
// exit(1); // don't ever use exit(), use the above!
@@ -530,9 +530,9 @@ if( fileD0.open( IO_WriteOnly ) ) {
needsCompact = true;
/*
-QFile fileD1( "testdat_xx-kmfoldermaildir-1" );
+TQFile fileD1( "testdat_xx-kmfoldermaildir-1" );
if( fileD1.open( IO_WriteOnly ) ) {
- QDataStream ds( &fileD1 );
+ TQDataStream ds( &fileD1 );
ds.writeRawBytes( aMsg->asString(), aMsg->asString().length() );
fileD1.close(); // If data is 0 we just create a zero length file.
}
@@ -554,13 +554,13 @@ KMMessage* KMFolderMaildir::readMsg(int idx)
DwString KMFolderMaildir::getDwString(int idx)
{
KMMsgInfo* mi = (KMMsgInfo*)mMsgList[idx];
- QString abs_file(location() + "/cur/");
+ TQString abs_file(location() + "/cur/");
abs_file += mi->fileName();
- QFileInfo fi( abs_file );
+ TQFileInfo fi( abs_file );
if (fi.exists() && fi.isFile() && fi.isWritable() && fi.size() > 0)
{
- FILE* stream = fopen(QFile::encodeName(abs_file), "r+");
+ FILE* stream = fopen(TQFile::encodeName(abs_file), "r+");
if (stream) {
size_t msgSize = fi.size();
char* msgText = new char[ msgSize + 1 ];
@@ -579,14 +579,14 @@ DwString KMFolderMaildir::getDwString(int idx)
}
-void KMFolderMaildir::readFileHeaderIntern(const QString& dir, const QString& file, KMMsgStatus status)
+void KMFolderMaildir::readFileHeaderIntern(const TQString& dir, const TQString& file, KMMsgStatus status)
{
// we keep our current directory to restore it later
char path_buffer[PATH_MAX];
if(!::getcwd(path_buffer, PATH_MAX - 1))
return;
- ::chdir(QFile::encodeName(dir));
+ ::chdir(TQFile::encodeName(dir));
// messages in the 'cur' directory are Read by default.. but may
// actually be some other state (but not New)
@@ -599,9 +599,9 @@ void KMFolderMaildir::readFileHeaderIntern(const QString& dir, const QString& fi
}
// open the file and get a pointer to it
- QFile f(file);
+ TQFile f(file);
if ( f.open( IO_ReadOnly ) == false ) {
- kdWarning(5006) << "The file '" << QFile::encodeName(dir) << "/" << file
+ kdWarning(5006) << "The file '" << TQFile::encodeName(dir) << "/" << file
<< "' could not be opened for reading the message. "
"Please check ownership and permissions."
<< endl;
@@ -611,12 +611,12 @@ void KMFolderMaildir::readFileHeaderIntern(const QString& dir, const QString& fi
char line[MAX_LINE];
bool atEof = false;
bool inHeader = true;
- QCString *lastStr = 0;
+ TQCString *lastStr = 0;
- QCString dateStr, fromStr, toStr, subjStr;
- QCString xmarkStr, replyToIdStr, msgIdStr, referencesStr;
- QCString statusStr, replyToAuxIdStr, uidStr;
- QCString contentTypeStr, charset;
+ TQCString dateStr, fromStr, toStr, subjStr;
+ TQCString xmarkStr, replyToIdStr, msgIdStr, referencesStr;
+ TQCString statusStr, replyToAuxIdStr, uidStr;
+ TQCString contentTypeStr, charset;
// iterate through this file until done
while (!atEof)
@@ -734,8 +734,8 @@ void KMFolderMaildir::readFileHeaderIntern(const QString& dir, const QString& fi
// if this is a New file and is in 'new', we move it to 'cur'
if (status & KMMsgStatusNew)
{
- QString newDir(location() + "/new/");
- QString curDir(location() + "/cur/");
+ TQString newDir(location() + "/new/");
+ TQString curDir(location() + "/cur/");
moveInternal(newDir + file, curDir + file, mi);
}
@@ -764,55 +764,55 @@ void KMFolderMaildir::readFileHeaderIntern(const QString& dir, const QString& fi
if (strncasecmp(line, "Date:", 5) == 0)
{
- dateStr = QCString(line+5);
+ dateStr = TQCString(line+5);
lastStr = &dateStr;
}
else if (strncasecmp(line, "From:", 5) == 0)
{
- fromStr = QCString(line+5);
+ fromStr = TQCString(line+5);
lastStr = &fromStr;
}
else if (strncasecmp(line, "To:", 3) == 0)
{
- toStr = QCString(line+3);
+ toStr = TQCString(line+3);
lastStr = &toStr;
}
else if (strncasecmp(line, "Subject:", 8) == 0)
{
- subjStr = QCString(line+8);
+ subjStr = TQCString(line+8);
lastStr = &subjStr;
}
else if (strncasecmp(line, "References:", 11) == 0)
{
- referencesStr = QCString(line+11);
+ referencesStr = TQCString(line+11);
lastStr = &referencesStr;
}
else if (strncasecmp(line, "Message-Id:", 11) == 0)
{
- msgIdStr = QCString(line+11);
+ msgIdStr = TQCString(line+11);
lastStr = &msgIdStr;
}
else if (strncasecmp(line, "X-KMail-Mark:", 13) == 0)
{
- xmarkStr = QCString(line+13);
+ xmarkStr = TQCString(line+13);
}
else if (strncasecmp(line, "X-Status:", 9) == 0)
{
- statusStr = QCString(line+9);
+ statusStr = TQCString(line+9);
}
else if (strncasecmp(line, "In-Reply-To:", 12) == 0)
{
- replyToIdStr = QCString(line+12);
+ replyToIdStr = TQCString(line+12);
lastStr = &replyToIdStr;
}
else if (strncasecmp(line, "X-UID:", 6) == 0)
{
- uidStr = QCString(line+6);
+ uidStr = TQCString(line+6);
lastStr = &uidStr;
}
else if (strncasecmp(line, "Content-Type:", 13) == 0)
{
- contentTypeStr = QCString(line+13);
+ contentTypeStr = TQCString(line+13);
lastStr = &contentTypeStr;
}
@@ -839,7 +839,7 @@ int KMFolderMaildir::createIndexFromContents()
// first, we make sure that all the directories are here as they
// should be
- QFileInfo dirinfo;
+ TQFileInfo dirinfo;
dirinfo.setFile(location() + "/new");
if (!dirinfo.exists() || !dirinfo.isDir())
@@ -847,8 +847,8 @@ int KMFolderMaildir::createIndexFromContents()
kdDebug(5006) << "Directory " << location() << "/new doesn't exist or is a file"<< endl;
return 1;
}
- QDir newDir(location() + "/new");
- newDir.setFilter(QDir::Files);
+ TQDir newDir(location() + "/new");
+ newDir.setFilter(TQDir::Files);
dirinfo.setFile(location() + "/cur");
if (!dirinfo.exists() || !dirinfo.isDir())
@@ -856,13 +856,13 @@ int KMFolderMaildir::createIndexFromContents()
kdDebug(5006) << "Directory " << location() << "/cur doesn't exist or is a file"<< endl;
return 1;
}
- QDir curDir(location() + "/cur");
- curDir.setFilter(QDir::Files);
+ TQDir curDir(location() + "/cur");
+ curDir.setFilter(TQDir::Files);
// then, we look for all the 'cur' files
const QFileInfoList *list = curDir.entryInfoList();
QFileInfoListIterator it(*list);
- QFileInfo *fi;
+ TQFileInfo *fi;
while ((fi = it.current()))
{
@@ -901,9 +901,9 @@ int KMFolderMaildir::createIndexFromContents()
KMFolderIndex::IndexStatus KMFolderMaildir::indexStatus()
{
- QFileInfo new_info(location() + "/new");
- QFileInfo cur_info(location() + "/cur");
- QFileInfo index_info(indexLocation());
+ TQFileInfo new_info(location() + "/new");
+ TQFileInfo cur_info(location() + "/cur");
+ TQFileInfo index_info(indexLocation());
if (!index_info.exists())
return KMFolderIndex::IndexMissing;
@@ -946,19 +946,19 @@ KMMessage* KMFolderMaildir::take(int idx)
}
// static
-bool KMFolderMaildir::removeFile( const QString & folderPath,
- const QString & filename )
+bool KMFolderMaildir::removeFile( const TQString & folderPath,
+ const TQString & filename )
{
// we need to look in both 'new' and 'cur' since it's possible to
// delete a message before the folder is compacted. Since the file
// naming and moving is done in ::compact, we can't assume any
// location at this point.
- QCString abs_file( QFile::encodeName( folderPath + "/cur/" + filename ) );
+ TQCString abs_file( TQFile::encodeName( folderPath + "/cur/" + filename ) );
if ( ::unlink( abs_file ) == 0 )
return true;
if ( errno == ENOENT ) { // doesn't exist
- abs_file = QFile::encodeName( folderPath + "/new/" + filename );
+ abs_file = TQFile::encodeName( folderPath + "/new/" + filename );
if ( ::unlink( abs_file ) == 0 )
return true;
}
@@ -967,24 +967,24 @@ bool KMFolderMaildir::removeFile( const QString & folderPath,
return false;
}
-bool KMFolderMaildir::removeFile( const QString & filename )
+bool KMFolderMaildir::removeFile( const TQString & filename )
{
return removeFile( location(), filename );
}
#include <sys/types.h>
#include <dirent.h>
-static bool removeDirAndContentsRecursively( const QString & path )
+static bool removeDirAndContentsRecursively( const TQString & path )
{
bool success = true;
- QDir d;
+ TQDir d;
d.setPath( path );
- d.setFilter( QDir::Files | QDir::Dirs | QDir::Hidden | QDir::NoSymLinks );
+ d.setFilter( TQDir::Files | TQDir::Dirs | TQDir::Hidden | TQDir::NoSymLinks );
const QFileInfoList *list = d.entryInfoList();
QFileInfoListIterator it( *list );
- QFileInfo *fi;
+ TQFileInfo *fi;
while ( (fi = it.current()) != 0 ) {
if( fi->isDir() ) {
@@ -1013,22 +1013,22 @@ int KMFolderMaildir::removeContents()
/* The subdirs are removed now. Check if there is anything else in the dir
* and only if not delete the dir itself. The user could have data stored
* that would otherwise be deleted. */
- QDir dir(location());
+ TQDir dir(location());
if ( dir.count() == 2 ) { // only . and ..
if ( !removeDirAndContentsRecursively( location() ), 0 ) return 1;
}
return 0;
}
-static QRegExp *suffix_regex = 0;
-static KStaticDeleter<QRegExp> suffix_regex_sd;
+static TQRegExp *suffix_regex = 0;
+static KStaticDeleter<TQRegExp> suffix_regex_sd;
//-----------------------------------------------------------------------------
// static
-QString KMFolderMaildir::constructValidFileName( const QString & filename,
+TQString KMFolderMaildir::constructValidFileName( const TQString & filename,
KMMsgStatus status )
{
- QString aFileName( filename );
+ TQString aFileName( filename );
if (aFileName.isEmpty())
{
@@ -1037,14 +1037,14 @@ QString KMFolderMaildir::constructValidFileName( const QString & filename,
}
if (!suffix_regex)
- suffix_regex_sd.setObject(suffix_regex, new QRegExp(":2,?R?S?$"));
+ suffix_regex_sd.setObject(suffix_regex, new TQRegExp(":2,?R?S?$"));
aFileName.truncate(aFileName.findRev(*suffix_regex));
// only add status suffix if the message is neither new nor unread
if (! ((status & KMMsgStatusNew) || (status & KMMsgStatusUnread)) )
{
- QString suffix( ":2," );
+ TQString suffix( ":2," );
if (status & KMMsgStatusReplied)
suffix += "RS";
else
@@ -1056,10 +1056,10 @@ QString KMFolderMaildir::constructValidFileName( const QString & filename,
}
//-----------------------------------------------------------------------------
-QString KMFolderMaildir::moveInternal(const QString& oldLoc, const QString& newLoc, KMMsgInfo *mi)
+TQString KMFolderMaildir::moveInternal(const TQString& oldLoc, const TQString& newLoc, KMMsgInfo *mi)
{
- QString filename(mi->fileName());
- QString ret(moveInternal(oldLoc, newLoc, filename, mi->status()));
+ TQString filename(mi->fileName());
+ TQString ret(moveInternal(oldLoc, newLoc, filename, mi->status()));
if (filename != mi->fileName())
mi->setFileName(filename);
@@ -1068,22 +1068,22 @@ QString KMFolderMaildir::moveInternal(const QString& oldLoc, const QString& newL
}
//-----------------------------------------------------------------------------
-QString KMFolderMaildir::moveInternal(const QString& oldLoc, const QString& newLoc, QString& aFileName, KMMsgStatus status)
+TQString KMFolderMaildir::moveInternal(const TQString& oldLoc, const TQString& newLoc, TQString& aFileName, KMMsgStatus status)
{
- QString dest(newLoc);
+ TQString dest(newLoc);
// make sure that our destination filename doesn't already exist
- while (QFile::exists(dest))
+ while (TQFile::exists(dest))
{
- aFileName = constructValidFileName( QString(), status );
+ aFileName = constructValidFileName( TQString(), status );
- QFileInfo fi(dest);
+ TQFileInfo fi(dest);
dest = fi.dirPath(true) + "/" + aFileName;
setDirty( true );
}
- QDir d;
+ TQDir d;
if (d.rename(oldLoc, dest) == false)
- return QString::null;
+ return TQString::null;
else
return dest;
}
@@ -1116,7 +1116,7 @@ Q_INT64 KMFolderMaildir::doFolderSize() const
item = new KFileItem( S_IFDIR, -1, location() + "/tmp" );
list.append( item );
s_DirSizeJobQueue.append(
- qMakePair( QGuardedPtr<const KMFolderMaildir>( this ), list ) );
+ qMakePair( TQGuardedPtr<const KMFolderMaildir>( this ), list ) );
// if there's only one entry in the queue then we can start
// a dirSizeJob right away
@@ -1125,8 +1125,8 @@ Q_INT64 KMFolderMaildir::doFolderSize() const
//kdDebug(5006) << k_funcinfo << "Starting dirSizeJob for folder "
// << location() << endl;
KDirSize* job = KDirSize::dirSizeJob( list );
- connect( job, SIGNAL( result( KIO::Job* ) ),
- this, SLOT( slotDirSizeJobResult( KIO::Job* ) ) );
+ connect( job, TQT_SIGNAL( result( KIO::Job* ) ),
+ this, TQT_SLOT( slotDirSizeJobResult( KIO::Job* ) ) );
}
return -1;
@@ -1157,8 +1157,8 @@ void KMFolderMaildir::slotDirSizeJobResult( KIO::Job* job )
//kdDebug(5006) << k_funcinfo << "Starting dirSizeJob for folder "
// << entry.first->location() << endl;
KDirSize* job = KDirSize::dirSizeJob( entry.second );
- connect( job, SIGNAL( result( KIO::Job* ) ),
- entry.first, SLOT( slotDirSizeJobResult( KIO::Job* ) ) );
+ connect( job, TQT_SIGNAL( result( KIO::Job* ) ),
+ entry.first, TQT_SLOT( slotDirSizeJobResult( KIO::Job* ) ) );
break;
}
else
diff --git a/kmail/kmfoldermaildir.h b/kmail/kmfoldermaildir.h
index 8e09a6f3f..12f24942c 100644
--- a/kmail/kmfoldermaildir.h
+++ b/kmail/kmfoldermaildir.h
@@ -5,7 +5,7 @@
#include <kfileitem.h>
-#include <qguardedptr.h>
+#include <tqguardedptr.h>
class KMFolderMaildir;
namespace KMail {
@@ -52,7 +52,7 @@ public:
/** Remove (first occurrence of) given message from the folder. */
virtual void removeMsg(int i, bool imapQuiet = FALSE);
- virtual void removeMsg(QPtrList<KMMessage> msgList, bool imapQuiet = FALSE)
+ virtual void removeMsg(TQPtrList<KMMessage> msgList, bool imapQuiet = FALSE)
{ return KMFolderIndex::removeMsg(msgList, imapQuiet); }
// Called by KMMsgBase::setStatus when status of a message has changed
@@ -83,20 +83,20 @@ public:
@param folderPath the full path of the folder as returned by location()
@return 0 on success and an error code (cf. man 3 errno) otherwise
*/
- static int createMaildirFolders( const QString & folderPath );
+ static int createMaildirFolders( const TQString & folderPath );
- static QString constructValidFileName( const QString & filename = QString(),
+ static TQString constructValidFileName( const TQString & filename = TQString(),
KMMsgStatus status = KMMsgStatusNew );
- static bool removeFile( const QString & folderPath,
- const QString & filename );
+ static bool removeFile( const TQString & folderPath,
+ const TQString & filename );
/** @reimpl */
virtual int create();
/** Remove some deleted messages from the folder. Returns zero on success
and an errno on failure. This is only for use from MaildirCompactionJob. */
- int compact( unsigned int startIndex, int nbMessages, const QStringList& entryList, bool& done );
+ int compact( unsigned int startIndex, int nbMessages, const TQStringList& entryList, bool& done );
/** Remove deleted messages from the folder. Returns zero on success
and an errno on failure. */
@@ -110,8 +110,8 @@ public:
protected:
virtual FolderJob* doCreateJob( KMMessage *msg, FolderJob::JobType jt, KMFolder *folder,
- QString partSpecifier, const AttachmentStrategy *as ) const;
- virtual FolderJob* doCreateJob( QPtrList<KMMessage>& msgList, const QString& sets,
+ TQString partSpecifier, const AttachmentStrategy *as ) const;
+ virtual FolderJob* doCreateJob( TQPtrList<KMMessage>& msgList, const TQString& sets,
FolderJob::JobType jt, KMFolder *folder ) const;
/** Load message from file and store it at given index. Returns 0
on failure. */
@@ -147,10 +147,10 @@ private slots:
void slotDirSizeJobResult( KIO::Job* job );
private:
- void readFileHeaderIntern(const QString& dir, const QString& file, KMMsgStatus status);
- QString moveInternal(const QString& oldLoc, const QString& newLoc, KMMsgInfo* mi);
- QString moveInternal(const QString& oldLoc, const QString& newLoc, QString& aFileName, KMMsgStatus status);
- bool removeFile(const QString& filename);
+ void readFileHeaderIntern(const TQString& dir, const TQString& file, KMMsgStatus status);
+ TQString moveInternal(const TQString& oldLoc, const TQString& newLoc, KMMsgInfo* mi);
+ TQString moveInternal(const TQString& oldLoc, const TQString& newLoc, TQString& aFileName, KMMsgStatus status);
+ bool removeFile(const TQString& filename);
/** Tests whether the contents of this folder is newer than the index.
Returns IndexTooOld if the index is older than the contents.
@@ -159,10 +159,10 @@ private:
*/
virtual IndexStatus indexStatus();
- typedef QPair<QGuardedPtr<const KMFolderMaildir>,KFileItemList> DirSizeJobQueueEntry;
- static QValueList<DirSizeJobQueueEntry> s_DirSizeJobQueue;
+ typedef QPair<TQGuardedPtr<const KMFolderMaildir>,KFileItemList> DirSizeJobQueueEntry;
+ static TQValueList<DirSizeJobQueueEntry> s_DirSizeJobQueue;
- QStrList mIdxToFileList;
+ TQStrList mIdxToFileList;
int mIdxCount;
mutable bool mCurrentlyCheckingFolderSize;
};
diff --git a/kmail/kmfoldermbox.cpp b/kmail/kmfoldermbox.cpp
index 92f466a7c..dc35328db 100644
--- a/kmail/kmfoldermbox.cpp
+++ b/kmail/kmfoldermbox.cpp
@@ -18,8 +18,8 @@
*
*/
#include <config.h>
-#include <qfileinfo.h>
-#include <qregexp.h>
+#include <tqfileinfo.h>
+#include <tqregexp.h>
#include "kmfoldermbox.h"
#include "folderstorage.h"
@@ -104,7 +104,7 @@ int KMFolderMbox::open(const char *owner)
assert(!folder()->name().isEmpty());
mFilesLocked = false;
- mStream = fopen(QFile::encodeName(location()), "r+"); // messages file
+ mStream = fopen(TQFile::encodeName(location()), "r+"); // messages file
if (!mStream)
{
KNotifyClient::event( 0, "warning",
@@ -125,7 +125,7 @@ int KMFolderMbox::open(const char *owner)
// only show a warning if the index file exists, otherwise it can be
// silently regenerated
if (KMFolderIndex::IndexTooOld == index_status) {
- QString msg = i18n("<qt><p>The index of folder '%2' seems "
+ TQString msg = i18n("<qt><p>The index of folder '%2' seems "
"to be out of date. To prevent message "
"corruption the index will be "
"regenerated. As a result deleted "
@@ -160,13 +160,13 @@ int KMFolderMbox::open(const char *owner)
KMessageBox::AllowLink );
}
}
- QString str;
+ TQString str;
mIndexStream = 0;
str = i18n("Folder `%1' changed. Recreating index.")
.arg(name());
emit statusMsg(str);
} else {
- mIndexStream = fopen(QFile::encodeName(indexLocation()), "r+"); // index file
+ mIndexStream = fopen(TQFile::encodeName(indexLocation()), "r+"); // index file
if ( mIndexStream ) {
fcntl(fileno(mIndexStream), F_SETFD, FD_CLOEXEC);
updateIndexStreamPtr();
@@ -199,7 +199,7 @@ int KMFolderMbox::canAccess()
{
assert(!folder()->name().isEmpty());
- if (access(QFile::encodeName(location()), R_OK | W_OK) != 0) {
+ if (access(TQFile::encodeName(location()), R_OK | W_OK) != 0) {
kdDebug(5006) << "KMFolderMbox::access call to access function failed" << endl;
return 1;
}
@@ -216,7 +216,7 @@ int KMFolderMbox::create()
assert(mOpenCount == 0);
kdDebug(5006) << "Creating folder " << name() << endl;
- if (access(QFile::encodeName(location()), F_OK) == 0) {
+ if (access(TQFile::encodeName(location()), F_OK) == 0) {
kdDebug(5006) << "KMFolderMbox::create call to access function failed." << endl;
kdDebug(5006) << "File:: " << endl;
kdDebug(5006) << "Error " << endl;
@@ -224,7 +224,7 @@ int KMFolderMbox::create()
}
old_umask = umask(077);
- mStream = fopen(QFile::encodeName(location()), "w+"); //sven; open RW
+ mStream = fopen(TQFile::encodeName(location()), "w+"); //sven; open RW
umask(old_umask);
if (!mStream) return errno;
@@ -234,7 +234,7 @@ int KMFolderMbox::create()
if (!folder()->path().isEmpty())
{
old_umask = umask(077);
- mIndexStream = fopen(QFile::encodeName(indexLocation()), "w+"); //sven; open RW
+ mIndexStream = fopen(TQFile::encodeName(indexLocation()), "w+"); //sven; open RW
updateIndexStreamPtr(true);
umask(old_umask);
@@ -295,7 +295,7 @@ void KMFolderMbox::sync()
if (mOpenCount > 0)
if (!mStream || fsync(fileno(mStream)) ||
!mIndexStream || fsync(fileno(mIndexStream))) {
- kmkernel->emergencyExit( i18n("Could not sync index file <b>%1</b>: %2").arg( indexLocation() ).arg(errno ? QString::fromLocal8Bit(strerror(errno)) : i18n("Internal error. Please copy down the details and report a bug.")));
+ kmkernel->emergencyExit( i18n("Could not sync index file <b>%1</b>: %2").arg( indexLocation() ).arg(errno ? TQString::fromLocal8Bit(strerror(errno)) : i18n("Internal error. Please copy down the details and report a bug.")));
}
}
@@ -309,7 +309,7 @@ int KMFolderMbox::lock()
fl.l_start=0;
fl.l_len=0;
fl.l_pid=-1;
- QCString cmd_str;
+ TQCString cmd_str;
assert(mStream != 0);
mFilesLocked = false;
mReadOnly = false;
@@ -347,9 +347,9 @@ int KMFolderMbox::lock()
case procmail_lockfile:
cmd_str = "lockfile -l20 -r5 ";
if (!mProcmailLockFileName.isEmpty())
- cmd_str += QFile::encodeName(KProcess::quote(mProcmailLockFileName));
+ cmd_str += TQFile::encodeName(KProcess::quote(mProcmailLockFileName));
else
- cmd_str += QFile::encodeName(KProcess::quote(location() + ".lock"));
+ cmd_str += TQFile::encodeName(KProcess::quote(location() + ".lock"));
rc = system( cmd_str.data() );
if( rc != 0 )
@@ -361,7 +361,7 @@ int KMFolderMbox::lock()
}
if( mIndexStream )
{
- cmd_str = "lockfile -l20 -r5 " + QFile::encodeName(KProcess::quote(indexLocation() + ".lock"));
+ cmd_str = "lockfile -l20 -r5 " + TQFile::encodeName(KProcess::quote(indexLocation() + ".lock"));
rc = system( cmd_str.data() );
if( rc != 0 )
{
@@ -374,7 +374,7 @@ int KMFolderMbox::lock()
break;
case mutt_dotlock:
- cmd_str = "mutt_dotlock " + QFile::encodeName(KProcess::quote(location()));
+ cmd_str = "mutt_dotlock " + TQFile::encodeName(KProcess::quote(location()));
rc = system( cmd_str.data() );
if( rc != 0 )
{
@@ -385,7 +385,7 @@ int KMFolderMbox::lock()
}
if( mIndexStream )
{
- cmd_str = "mutt_dotlock " + QFile::encodeName(KProcess::quote(indexLocation()));
+ cmd_str = "mutt_dotlock " + TQFile::encodeName(KProcess::quote(indexLocation()));
rc = system( cmd_str.data() );
if( rc != 0 )
{
@@ -398,7 +398,7 @@ int KMFolderMbox::lock()
break;
case mutt_dotlock_privileged:
- cmd_str = "mutt_dotlock -p " + QFile::encodeName(KProcess::quote(location()));
+ cmd_str = "mutt_dotlock -p " + TQFile::encodeName(KProcess::quote(location()));
rc = system( cmd_str.data() );
if( rc != 0 )
{
@@ -409,7 +409,7 @@ int KMFolderMbox::lock()
}
if( mIndexStream )
{
- cmd_str = "mutt_dotlock -p " + QFile::encodeName(KProcess::quote(indexLocation()));
+ cmd_str = "mutt_dotlock -p " + TQFile::encodeName(KProcess::quote(indexLocation()));
rc = system( cmd_str.data() );
if( rc != 0 )
{
@@ -434,7 +434,7 @@ int KMFolderMbox::lock()
//-------------------------------------------------------------
FolderJob*
KMFolderMbox::doCreateJob( KMMessage *msg, FolderJob::JobType jt,
- KMFolder *folder, QString, const AttachmentStrategy* ) const
+ KMFolder *folder, TQString, const AttachmentStrategy* ) const
{
MboxJob *job = new MboxJob( msg, jt, folder );
job->setParent( this );
@@ -443,7 +443,7 @@ KMFolderMbox::doCreateJob( KMMessage *msg, FolderJob::JobType jt,
//-------------------------------------------------------------
FolderJob*
-KMFolderMbox::doCreateJob( QPtrList<KMMessage>& msgList, const QString& sets,
+KMFolderMbox::doCreateJob( TQPtrList<KMMessage>& msgList, const TQString& sets,
FolderJob::JobType jt, KMFolder *folder ) const
{
MboxJob *job = new MboxJob( msgList, sets, jt, folder );
@@ -460,7 +460,7 @@ int KMFolderMbox::unlock()
fl.l_whence=0;
fl.l_start=0;
fl.l_len=0;
- QCString cmd_str;
+ TQCString cmd_str;
assert(mStream != 0);
mFilesLocked = false;
@@ -476,34 +476,34 @@ int KMFolderMbox::unlock()
case procmail_lockfile:
cmd_str = "rm -f ";
if (!mProcmailLockFileName.isEmpty())
- cmd_str += QFile::encodeName(KProcess::quote(mProcmailLockFileName));
+ cmd_str += TQFile::encodeName(KProcess::quote(mProcmailLockFileName));
else
- cmd_str += QFile::encodeName(KProcess::quote(location() + ".lock"));
+ cmd_str += TQFile::encodeName(KProcess::quote(location() + ".lock"));
rc = system( cmd_str.data() );
if( mIndexStream )
{
- cmd_str = "rm -f " + QFile::encodeName(KProcess::quote(indexLocation() + ".lock"));
+ cmd_str = "rm -f " + TQFile::encodeName(KProcess::quote(indexLocation() + ".lock"));
rc = system( cmd_str.data() );
}
break;
case mutt_dotlock:
- cmd_str = "mutt_dotlock -u " + QFile::encodeName(KProcess::quote(location()));
+ cmd_str = "mutt_dotlock -u " + TQFile::encodeName(KProcess::quote(location()));
rc = system( cmd_str.data() );
if( mIndexStream )
{
- cmd_str = "mutt_dotlock -u " + QFile::encodeName(KProcess::quote(indexLocation()));
+ cmd_str = "mutt_dotlock -u " + TQFile::encodeName(KProcess::quote(indexLocation()));
rc = system( cmd_str.data() );
}
break;
case mutt_dotlock_privileged:
- cmd_str = "mutt_dotlock -p -u " + QFile::encodeName(KProcess::quote(location()));
+ cmd_str = "mutt_dotlock -p -u " + TQFile::encodeName(KProcess::quote(location()));
rc = system( cmd_str.data() );
if( mIndexStream )
{
- cmd_str = "mutt_dotlock -p -u " + QFile::encodeName(KProcess::quote(indexLocation()));
+ cmd_str = "mutt_dotlock -p -u " + TQFile::encodeName(KProcess::quote(indexLocation()));
rc = system( cmd_str.data() );
}
break;
@@ -521,8 +521,8 @@ int KMFolderMbox::unlock()
//-----------------------------------------------------------------------------
KMFolderIndex::IndexStatus KMFolderMbox::indexStatus()
{
- QFileInfo contInfo(location());
- QFileInfo indInfo(indexLocation());
+ TQFileInfo contInfo(location());
+ TQFileInfo indInfo(indexLocation());
if (!contInfo.exists()) return KMFolderIndex::IndexOk;
if (!indInfo.exists()) return KMFolderIndex::IndexMissing;
@@ -541,15 +541,15 @@ int KMFolderMbox::createIndexFromContents()
{
char line[MAX_LINE];
char status[8], xstatus[8];
- QCString subjStr, dateStr, fromStr, toStr, xmarkStr, *lastStr=0;
- QCString replyToIdStr, replyToAuxIdStr, referencesStr, msgIdStr;
- QCString sizeServerStr, uidStr;
- QCString contentTypeStr, charset;
+ TQCString subjStr, dateStr, fromStr, toStr, xmarkStr, *lastStr=0;
+ TQCString replyToIdStr, replyToAuxIdStr, referencesStr, msgIdStr;
+ TQCString sizeServerStr, uidStr;
+ TQCString contentTypeStr, charset;
bool atEof = false;
bool inHeader = true;
KMMsgInfo* mi;
- QString msgStr;
- QRegExp regexp(MSG_SEPERATOR_REGEX);
+ TQString msgStr;
+ TQRegExp regexp(MSG_SEPERATOR_REGEX);
int i, num, numStatus;
short needStatus;
@@ -737,54 +737,54 @@ int KMFolderMbox::createIndexFromContents()
needStatus &= ~2;
}
else if (strncasecmp(line,"X-KMail-Mark:",13)==0)
- xmarkStr = QCString(line+13);
+ xmarkStr = TQCString(line+13);
else if (strncasecmp(line,"In-Reply-To:",12)==0) {
- replyToIdStr = QCString(line+12);
+ replyToIdStr = TQCString(line+12);
lastStr = &replyToIdStr;
}
else if (strncasecmp(line,"References:",11)==0) {
- referencesStr = QCString(line+11);
+ referencesStr = TQCString(line+11);
lastStr = &referencesStr;
}
else if (strncasecmp(line,"Message-Id:",11)==0) {
- msgIdStr = QCString(line+11);
+ msgIdStr = TQCString(line+11);
lastStr = &msgIdStr;
}
else if (strncasecmp(line,"Date:",5)==0)
{
- dateStr = QCString(line+5);
+ dateStr = TQCString(line+5);
lastStr = &dateStr;
}
else if (strncasecmp(line,"From:", 5)==0)
{
- fromStr = QCString(line+5);
+ fromStr = TQCString(line+5);
lastStr = &fromStr;
}
else if (strncasecmp(line,"To:", 3)==0)
{
- toStr = QCString(line+3);
+ toStr = TQCString(line+3);
lastStr = &toStr;
}
else if (strncasecmp(line,"Subject:",8)==0)
{
- subjStr = QCString(line+8);
+ subjStr = TQCString(line+8);
lastStr = &subjStr;
}
else if (strncasecmp(line,"X-Length:",9)==0)
{
- sizeServerStr = QCString(line+9);
+ sizeServerStr = TQCString(line+9);
sizeServer = sizeServerStr.toULong();
lastStr = &sizeServerStr;
}
else if (strncasecmp(line,"X-UID:",6)==0)
{
- uidStr = QCString(line+6);
+ uidStr = TQCString(line+6);
uid = uidStr.toULong();
lastStr = &uidStr;
}
else if (strncasecmp(line, "Content-Type:", 13) == 0)
{
- contentTypeStr = QCString(line+13);
+ contentTypeStr = TQCString(line+13);
lastStr = &contentTypeStr;
}
}
@@ -862,12 +862,12 @@ static size_t unescapeFrom( char* str, size_t strLen ) {
}
//static
-QByteArray KMFolderMbox::escapeFrom( const DwString & str ) {
+TQByteArray KMFolderMbox::escapeFrom( const DwString & str ) {
const unsigned int strLen = str.length();
if ( strLen <= STRDIM("From ") )
return KMail::Util::ByteArray( str );
// worst case: \nFrom_\nFrom_\nFrom_... => grows to 7/6
- QByteArray result( int( strLen + 5 ) / 6 * 7 + 1 );
+ TQByteArray result( int( strLen + 5 ) / 6 * 7 + 1 );
const char * s = str.data();
const char * const e = s + strLen - STRDIM("From ");
@@ -929,7 +929,7 @@ DwString KMFolderMbox::getDwString(int idx)
int KMFolderMbox::addMsg( KMMessage* aMsg, int* aIndex_ret )
{
if (!canAddMsgNow(aMsg, aIndex_ret)) return 0;
- QByteArray msgText;
+ TQByteArray msgText;
char endStr[3];
int idx = -1, rc;
KMFolder* msgParent;
@@ -967,18 +967,18 @@ int KMFolderMbox::addMsg( KMMessage* aMsg, int* aIndex_ret )
if (folderType() != KMFolderTypeImap)
{
/*
-QFile fileD0( "testdat_xx-kmfoldermbox-0" );
+TQFile fileD0( "testdat_xx-kmfoldermbox-0" );
if( fileD0.open( IO_WriteOnly ) ) {
- QDataStream ds( &fileD0 );
+ TQDataStream ds( &fileD0 );
ds.writeRawBytes( aMsg->asString(), aMsg->asString().length() );
fileD0.close(); // If data is 0 we just create a zero length file.
}
*/
aMsg->setStatusFields();
/*
-QFile fileD1( "testdat_xx-kmfoldermbox-1" );
+TQFile fileD1( "testdat_xx-kmfoldermbox-1" );
if( fileD1.open( IO_WriteOnly ) ) {
- QDataStream ds( &fileD1 );
+ TQDataStream ds( &fileD1 );
ds.writeRawBytes( aMsg->asString(), aMsg->asString().length() );
fileD1.close(); // If data is 0 we just create a zero length file.
}
@@ -1020,7 +1020,7 @@ if( fileD1.open( IO_WriteOnly ) ) {
if (error)
return error;
- QCString messageSeparator( aMsg->mboxMessageSeparator() );
+ TQCString messageSeparator( aMsg->mboxMessageSeparator() );
fwrite( messageSeparator.data(), messageSeparator.length(), 1, mStream );
off_t offs = ftell(mStream);
fwrite(msgText.data(), len, 1, mStream);
@@ -1033,9 +1033,9 @@ if( fileD1.open( IO_WriteOnly ) ) {
kdDebug(5006) << "Error: Could not add message to folder: " << strerror(errno) << endl;
if (ftell(mStream) > revert) {
kdDebug(5006) << "Undoing changes" << endl;
- truncate( QFile::encodeName(location()), revert );
+ truncate( TQFile::encodeName(location()), revert );
}
- kmkernel->emergencyExit( i18n("Could not add message to folder: ") + QString::fromLocal8Bit(strerror(errno)));
+ kmkernel->emergencyExit( i18n("Could not add message to folder: ") + TQString::fromLocal8Bit(strerror(errno)));
/* This code is not 100% reliable
bool busy = kmkernel->kbp()->isBusy();
@@ -1113,10 +1113,10 @@ if( fileD1.open( IO_WriteOnly ) ) {
kdWarning(5006) << "Error: Could not add message to folder (No space left on device?)" << endl;
if (ftell(mIndexStream) > revert) {
kdWarning(5006) << "Undoing changes" << endl;
- truncate( QFile::encodeName(indexLocation()), revert );
+ truncate( TQFile::encodeName(indexLocation()), revert );
}
if ( errno )
- kmkernel->emergencyExit( i18n("Could not add message to folder:") + QString::fromLocal8Bit(strerror(errno)));
+ kmkernel->emergencyExit( i18n("Could not add message to folder:") + TQString::fromLocal8Bit(strerror(errno)));
else
kmkernel->emergencyExit( i18n("Could not add message to folder (No space left on device?)") );
@@ -1145,7 +1145,7 @@ if( fileD1.open( IO_WriteOnly ) ) {
int KMFolderMbox::compact( unsigned int startIndex, int nbMessages, FILE* tmpfile, off_t& offs, bool& done )
{
int rc = 0;
- QCString mtext;
+ TQCString mtext;
unsigned int stopIndex = nbMessages == -1 ? mMsgList.count() :
QMIN( mMsgList.count(), startIndex + nbMessages );
//kdDebug(5006) << "KMFolderMbox: compacting from " << startIndex << " to " << stopIndex << endl;
@@ -1230,7 +1230,7 @@ int KMFolderMbox::compact( bool silent )
// If this is the current folder, the changed signal will ultimately call
// KMHeaders::setFolderInfoStatus which will override the message, so save/restore it
- QString statusMsg = BroadcastStatus::instance()->statusMsg();
+ TQString statusMsg = BroadcastStatus::instance()->statusMsg();
emit changed();
BroadcastStatus::instance()->setStatusMsg( statusMsg );
return rc;
@@ -1244,7 +1244,7 @@ void KMFolderMbox::setLockType( LockType ltype )
}
//-----------------------------------------------------------------------------
-void KMFolderMbox::setProcmailLockFileName( const QString &fname )
+void KMFolderMbox::setProcmailLockFileName( const TQString &fname )
{
mProcmailLockFileName = fname;
}
@@ -1253,7 +1253,7 @@ void KMFolderMbox::setProcmailLockFileName( const QString &fname )
int KMFolderMbox::removeContents()
{
int rc = 0;
- rc = unlink(QFile::encodeName(location()));
+ rc = unlink(TQFile::encodeName(location()));
return rc;
}
@@ -1261,7 +1261,7 @@ int KMFolderMbox::removeContents()
int KMFolderMbox::expungeContents()
{
int rc = 0;
- if (truncate(QFile::encodeName(location()), 0))
+ if (truncate(TQFile::encodeName(location()), 0))
rc = errno;
return rc;
}
@@ -1270,7 +1270,7 @@ int KMFolderMbox::expungeContents()
/*virtual*/
Q_INT64 KMFolderMbox::doFolderSize() const
{
- QFileInfo info( location() );
+ TQFileInfo info( location() );
return (Q_INT64)(info.size());
}
diff --git a/kmail/kmfoldermbox.h b/kmail/kmfoldermbox.h
index bcbe5980c..15159b98c 100644
--- a/kmail/kmfoldermbox.h
+++ b/kmail/kmfoldermbox.h
@@ -105,9 +105,9 @@ public:
void setLockType( LockType ltype=FCNTL );
- void setProcmailLockFileName( const QString& );
+ void setProcmailLockFileName( const TQString& );
- static QByteArray escapeFrom( const DwString & str );
+ static TQByteArray escapeFrom( const DwString & str );
virtual IndexStatus indexStatus();
@@ -116,8 +116,8 @@ public:
protected:
virtual FolderJob* doCreateJob( KMMessage *msg, FolderJob::JobType jt, KMFolder *folder,
- QString partSpecifier, const AttachmentStrategy *as ) const;
- virtual FolderJob* doCreateJob( QPtrList<KMMessage>& msgList, const QString& sets,
+ TQString partSpecifier, const AttachmentStrategy *as ) const;
+ virtual FolderJob* doCreateJob( TQPtrList<KMMessage>& msgList, const TQString& sets,
FolderJob::JobType jt, KMFolder *folder ) const;
/** Load message from file and store it at given index. Returns 0
on failure. */
@@ -151,7 +151,7 @@ private:
bool mFilesLocked; // TRUE if the files of the folder are locked (writable)
bool mReadOnly; // true if locking failed
LockType mLockType;
- QString mProcmailLockFileName;
+ TQString mProcmailLockFileName;
};
#endif // kmfoldermbox_h
diff --git a/kmail/kmfoldermgr.cpp b/kmail/kmfoldermgr.cpp
index ece90c239..81b6ca973 100644
--- a/kmail/kmfoldermgr.cpp
+++ b/kmail/kmfoldermgr.cpp
@@ -16,7 +16,7 @@
#include <unistd.h>
#include <time.h>
-#include <qdir.h>
+#include <tqdir.h>
#include <klocale.h>
#include <kmessagebox.h>
@@ -38,8 +38,8 @@ using KMail::RenameJob;
using KMail::CopyFolderJob;
//-----------------------------------------------------------------------------
-KMFolderMgr::KMFolderMgr(const QString& aBasePath, KMFolderDirType dirType):
- QObject(), mDir(this, QString::null, dirType)
+KMFolderMgr::KMFolderMgr(const TQString& aBasePath, KMFolderDirType dirType):
+ TQObject(), mDir(this, TQString::null, dirType)
{
if ( dirType == KMStandardDir )
mDir.setBaseURL( I18N_NOOP("Local Folders") );
@@ -53,7 +53,7 @@ KMFolderMgr::KMFolderMgr(const QString& aBasePath, KMFolderDirType dirType):
//-----------------------------------------------------------------------------
KMFolderMgr::~KMFolderMgr()
{
- mBasePath = QString::null;
+ mBasePath = TQString::null;
}
@@ -77,7 +77,7 @@ void KMFolderMgr::expireAll() {
#define DO_FOR_ALL(function, folder_code) \
KMFolderNode* node; \
- QPtrListIterator<KMFolderNode> it(*dir); \
+ TQPtrListIterator<KMFolderNode> it(*dir); \
for ( ; (node = it.current()); ) { \
++it; \
if (node->isDir()) continue; \
@@ -125,20 +125,20 @@ void KMFolderMgr::compactAllFolders(bool immediate, KMFolderDir* dir)
//-----------------------------------------------------------------------------
-void KMFolderMgr::setBasePath(const QString& aBasePath)
+void KMFolderMgr::setBasePath(const TQString& aBasePath)
{
assert(!aBasePath.isNull());
if (aBasePath[0] == '~')
{
- mBasePath = QDir::homeDirPath();
+ mBasePath = TQDir::homeDirPath();
mBasePath.append("/");
mBasePath.append(aBasePath.mid(1));
}
else
mBasePath = aBasePath;
- QFileInfo info( mBasePath );
+ TQFileInfo info( mBasePath );
// FIXME We should ask for an alternative dir, rather than bailing out,
// I guess - till
@@ -159,11 +159,11 @@ void KMFolderMgr::setBasePath(const QString& aBasePath)
}
} else {
// ~/Mail (or whatever the user specified) doesn't exist, create it
- if ( ::mkdir( QFile::encodeName( mBasePath ) , S_IRWXU ) == -1 ) {
+ if ( ::mkdir( TQFile::encodeName( mBasePath ) , S_IRWXU ) == -1 ) {
KMessageBox::sorry(0, i18n("KMail could not create folder '%1';\n"
"please make sure that you can view and "
"modify the content of the folder '%2'.")
- .arg( mBasePath ).arg( QDir::homeDirPath() ) );
+ .arg( mBasePath ).arg( TQDir::homeDirPath() ) );
::exit(-1);
}
}
@@ -174,7 +174,7 @@ void KMFolderMgr::setBasePath(const QString& aBasePath)
//-----------------------------------------------------------------------------
-KMFolder* KMFolderMgr::createFolder(const QString& fName, bool sysFldr,
+KMFolder* KMFolderMgr::createFolder(const TQString& fName, bool sysFldr,
KMFolderType aFolderType,
KMFolderDir *aFolderDir)
{
@@ -190,7 +190,7 @@ KMFolder* KMFolderMgr::createFolder(const QString& fName, bool sysFldr,
KMFolderCachedImap *storage = static_cast<KMFolderCachedImap*>( fldDir->owner()->storage() );
KMAcctCachedImap *account = storage->account();
// guess imap path
- QString imapPath = storage->imapPath();
+ TQString imapPath = storage->imapPath();
if ( !imapPath.endsWith( "/" ) )
imapPath += "/";
imapPath += fName;
@@ -219,7 +219,7 @@ KMFolder* KMFolderMgr::createFolder(const QString& fName, bool sysFldr,
//-----------------------------------------------------------------------------
-KMFolder* KMFolderMgr::find(const QString& folderName, bool foldersOnly)
+KMFolder* KMFolderMgr::find(const TQString& folderName, bool foldersOnly)
{
KMFolderNode* node;
@@ -234,11 +234,11 @@ KMFolder* KMFolderMgr::find(const QString& folderName, bool foldersOnly)
//-----------------------------------------------------------------------------
KMFolder* KMFolderMgr::findById(const uint id)
{
- return findIdString( QString::null, id );
+ return findIdString( TQString::null, id );
}
//-----------------------------------------------------------------------------
-KMFolder* KMFolderMgr::findIdString( const QString& folderId,
+KMFolder* KMFolderMgr::findIdString( const TQString& folderId,
const uint id,
KMFolderDir *dir )
{
@@ -261,7 +261,7 @@ KMFolder* KMFolderMgr::findIdString( const QString& folderId,
return 0;
}
-void KMFolderMgr::getFolderURLS( QStringList& flist, const QString& prefix,
+void KMFolderMgr::getFolderURLS( TQStringList& flist, const TQString& prefix,
KMFolderDir *adir )
{
KMFolderDir* dir = adir ? adir : &mDir;
@@ -276,20 +276,20 @@ void KMFolderMgr::getFolderURLS( QStringList& flist, const QString& prefix,
)
}
-KMFolder* KMFolderMgr::getFolderByURL( const QString& vpath,
- const QString& prefix,
+KMFolder* KMFolderMgr::getFolderByURL( const TQString& vpath,
+ const TQString& prefix,
KMFolderDir *adir )
{
KMFolderDir* dir = adir ? adir : &mDir;
DO_FOR_ALL(
{
- QString a = prefix + "/" + folder->name();
+ TQString a = prefix + "/" + folder->name();
KMFolder * mfolder = getFolderByURL( vpath, a,child );
if ( mfolder )
return mfolder;
},
{
- QString comp = prefix + "/" + folder->name();
+ TQString comp = prefix + "/" + folder->name();
if ( comp == vpath )
return folder;
}
@@ -298,7 +298,7 @@ KMFolder* KMFolderMgr::getFolderByURL( const QString& vpath,
}
//-----------------------------------------------------------------------------
-KMFolder* KMFolderMgr::findOrCreate(const QString& aFolderName, bool sysFldr,
+KMFolder* KMFolderMgr::findOrCreate(const TQString& aFolderName, bool sysFldr,
const uint id)
{
KMFolder* folder = 0;
@@ -346,7 +346,7 @@ void KMFolderMgr::remove(KMFolder* aFolder)
{
// call remove for every child
KMFolderNode* node;
- QPtrListIterator<KMFolderNode> it(*aFolder->child());
+ TQPtrListIterator<KMFolderNode> it(*aFolder->child());
for ( ; (node = it.current()); )
{
++it;
@@ -361,8 +361,8 @@ void KMFolderMgr::remove(KMFolder* aFolder)
void KMFolderMgr::removeFolder(KMFolder* aFolder)
{
- connect(aFolder, SIGNAL(removed(KMFolder*, bool)),
- this, SLOT(removeFolderAux(KMFolder*, bool)));
+ connect(aFolder, TQT_SIGNAL(removed(KMFolder*, bool)),
+ this, TQT_SLOT(removeFolderAux(KMFolder*, bool)));
aFolder->remove();
}
@@ -370,7 +370,7 @@ KMFolder* KMFolderMgr::parentFolder( KMFolder* folder )
{
// find the parent folder by stripping "." and ".directory" from the name
KMFolderDir* fdir = folder->parent();
- QString parentName = fdir->name();
+ TQString parentName = fdir->name();
parentName = parentName.mid( 1, parentName.length()-11 );
KMFolderNode* parent = fdir->hasNamedFolder( parentName );
if ( !parent && fdir->parent() ) // dimap obviously has a different structure
@@ -422,8 +422,8 @@ void KMFolderMgr::removeFolderAux(KMFolder* aFolder, bool success)
void KMFolderMgr::removeDirAux(KMFolderDir* aFolderDir)
{
- QDir dir;
- QString folderDirLocation = aFolderDir->path();
+ TQDir dir;
+ TQString folderDirLocation = aFolderDir->path();
aFolderDir->clear();
aFolderDir->parent()->remove(aFolderDir);
dir.rmdir(folderDirLocation);
@@ -450,24 +450,24 @@ void KMFolderMgr::reload(void)
}
//-----------------------------------------------------------------------------
-void KMFolderMgr::createFolderList(QStringList *str,
- QValueList<QGuardedPtr<KMFolder> > *folders)
+void KMFolderMgr::createFolderList(TQStringList *str,
+ TQValueList<TQGuardedPtr<KMFolder> > *folders)
{
createFolderList( str, folders, 0, "" );
}
//-----------------------------------------------------------------------------
-void KMFolderMgr::createI18nFolderList(QStringList *str,
- QValueList<QGuardedPtr<KMFolder> > *folders)
+void KMFolderMgr::createI18nFolderList(TQStringList *str,
+ TQValueList<TQGuardedPtr<KMFolder> > *folders)
{
- createFolderList( str, folders, 0, QString::null, true );
+ createFolderList( str, folders, 0, TQString::null, true );
}
//-----------------------------------------------------------------------------
-void KMFolderMgr::createFolderList(QStringList *str,
- QValueList<QGuardedPtr<KMFolder> > *folders,
+void KMFolderMgr::createFolderList(TQStringList *str,
+ TQValueList<TQGuardedPtr<KMFolder> > *folders,
KMFolderDir *adir,
- const QString& prefix,
+ const TQString& prefix,
bool i18nized)
{
KMFolderDir* dir = adir ? adir : &mDir;
@@ -574,14 +574,14 @@ void KMFolderMgr::moveFolder( KMFolder* folder, KMFolderDir *newParent )
}
//-----------------------------------------------------------------------------
-void KMFolderMgr::renameFolder( KMFolder* folder, const QString& newName,
+void KMFolderMgr::renameFolder( KMFolder* folder, const TQString& newName,
KMFolderDir *newParent )
{
RenameJob* job = new RenameJob( folder->storage(), newName, newParent );
- connect( job, SIGNAL( renameDone( QString, bool ) ),
- this, SLOT( slotRenameDone( QString, bool ) ) );
- connect( job, SIGNAL( renameDone( QString, bool ) ),
- this, SIGNAL( folderMoveOrCopyOperationFinished() ) );
+ connect( job, TQT_SIGNAL( renameDone( TQString, bool ) ),
+ this, TQT_SLOT( slotRenameDone( TQString, bool ) ) );
+ connect( job, TQT_SIGNAL( renameDone( TQString, bool ) ),
+ this, TQT_SIGNAL( folderMoveOrCopyOperationFinished() ) );
job->start();
}
@@ -590,13 +590,13 @@ void KMFolderMgr::copyFolder( KMFolder* folder, KMFolderDir *newParent )
{
kdDebug(5006) << "Copy folder: " << folder->prettyURL() << endl;
CopyFolderJob* job = new CopyFolderJob( folder->storage(), newParent );
- connect( job, SIGNAL( folderCopyComplete( bool ) ),
- this, SIGNAL( folderMoveOrCopyOperationFinished() ) );
+ connect( job, TQT_SIGNAL( folderCopyComplete( bool ) ),
+ this, TQT_SIGNAL( folderMoveOrCopyOperationFinished() ) );
job->start();
}
//-----------------------------------------------------------------------------
-void KMFolderMgr::slotRenameDone( QString, bool success )
+void KMFolderMgr::slotRenameDone( TQString, bool success )
{
kdDebug(5006) << k_funcinfo << success << endl;
}
diff --git a/kmail/kmfoldermgr.h b/kmail/kmfoldermgr.h
index 290769428..d4ec786e0 100644
--- a/kmail/kmfoldermgr.h
+++ b/kmail/kmfoldermgr.h
@@ -4,10 +4,10 @@
#ifndef kmfoldermgr_h
#define kmfoldermgr_h
-#include <qstring.h>
-#include <qvaluelist.h>
-#include <qobject.h>
-#include <qguardedptr.h>
+#include <tqstring.h>
+#include <tqvaluelist.h>
+#include <tqobject.h>
+#include <tqguardedptr.h>
#include "kmfolderdir.h"
@@ -18,47 +18,47 @@ class KMFolderMgr: public QObject
Q_OBJECT
public:
- KMFolderMgr(const QString& basePath, KMFolderDirType dirType = KMStandardDir);
+ KMFolderMgr(const TQString& basePath, KMFolderDirType dirType = KMStandardDir);
virtual ~KMFolderMgr();
/** Returns path to directory where all the folders live. */
- QString basePath() const { return mBasePath; }
+ TQString basePath() const { return mBasePath; }
/** Set base path. Also calls reload() on the base directory. */
- virtual void setBasePath(const QString&);
+ virtual void setBasePath(const TQString&);
/** Provides access to base directory */
KMFolderRootDir& dir();
/** Searches folder and returns it. Skips directories
(objects of type KMFolderDir) if foldersOnly is TRUE. */
- virtual KMFolder* find(const QString& folderName, bool foldersOnly=TRUE);
+ virtual KMFolder* find(const TQString& folderName, bool foldersOnly=TRUE);
/** Searches for a folder with the given id, recurses into directories */
- virtual KMFolder* findIdString(const QString& folderId,
+ virtual KMFolder* findIdString(const TQString& folderId,
const uint id = 0, KMFolderDir *dir = 0);
/** Uses find() to find given folder. If not found the folder is
* created. Directories are skipped.
* If an id is passed this searches for it
*/
- virtual KMFolder* findOrCreate(const QString& folderName, bool sysFldr=TRUE,
+ virtual KMFolder* findOrCreate(const TQString& folderName, bool sysFldr=TRUE,
const uint id = 0);
/** Searches folder by id and returns it. Skips directories
(objects of type KMFolderDir) */
virtual KMFolder* findById(const uint id);
- virtual void getFolderURLS( QStringList& flist,
- const QString& prefix=QString::null,
+ virtual void getFolderURLS( TQStringList& flist,
+ const TQString& prefix=TQString::null,
KMFolderDir *adir=0 );
- virtual KMFolder* getFolderByURL( const QString& vpath,
- const QString& prefix=QString::null,
+ virtual KMFolder* getFolderByURL( const TQString& vpath,
+ const TQString& prefix=TQString::null,
KMFolderDir *adir=0 );
/** Create a mail folder in the root folder directory dir()
with given name. Returns Folder on success. */
- virtual KMFolder* createFolder(const QString& fName, bool sysFldr=FALSE,
+ virtual KMFolder* createFolder(const TQString& fName, bool sysFldr=FALSE,
KMFolderType aFolderType=KMFolderTypeMbox,
KMFolderDir *aFolderDir = 0);
@@ -73,21 +73,21 @@ public:
/** Create a list of formatted formatted folder labels and corresponding
folders*/
- virtual void createFolderList( QStringList *str,
- QValueList<QGuardedPtr<KMFolder> > *folders );
+ virtual void createFolderList( TQStringList *str,
+ TQValueList<TQGuardedPtr<KMFolder> > *folders );
/** Auxillary function to facilitate creating a list of formatted
- folder names, suitable for showing in QComboBox */
- virtual void createFolderList( QStringList *str,
- QValueList<QGuardedPtr<KMFolder> > *folders,
+ folder names, suitable for showing in TQComboBox */
+ virtual void createFolderList( TQStringList *str,
+ TQValueList<TQGuardedPtr<KMFolder> > *folders,
KMFolderDir *adir,
- const QString& prefix,
+ const TQString& prefix,
bool i18nized=FALSE );
/** Create a list of formatted formatted folder labels and corresponding
folders. The system folder names are translated */
- virtual void createI18nFolderList( QStringList *str,
- QValueList<QGuardedPtr<KMFolder> > *folders );
+ virtual void createI18nFolderList( TQStringList *str,
+ TQValueList<TQGuardedPtr<KMFolder> > *folders );
/** fsync all open folders to disk */
void syncAllFolders( KMFolderDir *adir = 0 );
@@ -115,7 +115,7 @@ public:
void moveFolder( KMFolder* folder, KMFolderDir* newParent );
/** Rename or move a folder */
- void renameFolder( KMFolder* folder, const QString& newName,
+ void renameFolder( KMFolder* folder, const TQString& newName,
KMFolderDir* newParent = 0 );
/** Copy a folder */
@@ -135,7 +135,7 @@ public slots:
void removeFolderAux(KMFolder* obsoleteFolder, bool success);
/** Called when the renaming of a folder is done */
- void slotRenameDone( QString newName, bool success );
+ void slotRenameDone( TQString newName, bool success );
signals:
/** Emitted when the list of folders has changed. This signal is a hook
@@ -176,7 +176,7 @@ protected:
/** Auxillary function to facilitate removal of a folder directory */
void removeDirAux(KMFolderDir* aFolderDir);
- QString mBasePath;
+ TQString mBasePath;
KMFolderRootDir mDir;
int mQuiet;
bool mChanged;
diff --git a/kmail/kmfoldernode.cpp b/kmail/kmfoldernode.cpp
index 49698dafd..e27a88f81 100644
--- a/kmail/kmfoldernode.cpp
+++ b/kmail/kmfoldernode.cpp
@@ -7,7 +7,7 @@
#include "kmfolderdir.h"
//-----------------------------------------------------------------------------
-KMFolderNode::KMFolderNode( KMFolderDir * parent, const QString & name )
+KMFolderNode::KMFolderNode( KMFolderDir * parent, const TQString & name )
: mName( name ),
mParent( parent ),
mDir( false ),
@@ -29,14 +29,14 @@ bool KMFolderNode::isDir(void) const
//-----------------------------------------------------------------------------
-QString KMFolderNode::path() const
+TQString KMFolderNode::path() const
{
if (parent()) return parent()->path();
- return QString::null;
+ return TQString::null;
}
//-----------------------------------------------------------------------------
-QString KMFolderNode::label(void) const
+TQString KMFolderNode::label(void) const
{
return name();
}
diff --git a/kmail/kmfoldernode.h b/kmail/kmfoldernode.h
index 56f22140a..3d0dbaddc 100644
--- a/kmail/kmfoldernode.h
+++ b/kmail/kmfoldernode.h
@@ -20,9 +20,9 @@
#ifndef kmfoldernode_h
#define kmfoldernode_h
-#include <qobject.h>
-#include <qstring.h>
-#include <qptrlist.h>
+#include <tqobject.h>
+#include <tqstring.h>
+#include <tqptrlist.h>
class KMFolderDir;
@@ -31,7 +31,7 @@ class KMFolderNode: public QObject
Q_OBJECT
public:
- KMFolderNode( KMFolderDir * parent, const QString & name );
+ KMFolderNode( KMFolderDir * parent, const TQString & name );
virtual ~KMFolderNode();
/** Is it a directory where mail folders are stored or is it a folder that
@@ -51,31 +51,31 @@ public:
if the node has no parent. Example: if this object represents a folder
~joe/Mail/inbox then path() returns "/home/joe/Mail" and name() returns
"inbox". */
- virtual QString path() const;
+ virtual TQString path() const;
/** Name of the node. Also used as file name. */
- QString name() const { return mName; }
- void setName(const QString& aName) { mName = aName; }
+ TQString name() const { return mName; }
+ void setName(const TQString& aName) { mName = aName; }
/** Label of the node for visualzation purposes. Default the same as
the name. */
- virtual QString label() const;
+ virtual TQString label() const;
/** URL of the node for visualization purposes. */
- virtual QString prettyURL() const = 0;
+ virtual TQString prettyURL() const = 0;
/** ID of the node */
uint id() const;
void setId( uint id ) { mId = id; }
protected:
- QString mName;
+ TQString mName;
KMFolderDir *mParent;
bool mDir;
uint mId;
};
-typedef QPtrList<KMFolderNode> KMFolderNodeList;
+typedef TQPtrList<KMFolderNode> KMFolderNodeList;
#endif /*kmfoldernode_h*/
diff --git a/kmail/kmfoldersearch.cpp b/kmail/kmfoldersearch.cpp
index 896383b42..85ba2040f 100644
--- a/kmail/kmfoldersearch.cpp
+++ b/kmail/kmfoldersearch.cpp
@@ -42,7 +42,7 @@
#include <sys/file.h>
#include <utime.h>
-#include <qfile.h>
+#include <tqfile.h>
#ifdef HAVE_BYTESWAP_H
#include <byteswap.h>
@@ -69,8 +69,8 @@
#define IDS_SEARCH_HEADER_LEN 30
-KMSearch::KMSearch(QObject * parent, const char * name)
- :QObject(parent, name)
+KMSearch::KMSearch(TQObject * parent, const char * name)
+ :TQObject(parent, name)
{
mRemainingFolders = -1;
mRecursive = true;
@@ -80,8 +80,8 @@ KMSearch::KMSearch(QObject * parent, const char * name)
mFoundCount = 0;
mSearchCount = 0;
- mProcessNextBatchTimer = new QTimer(0, "mProcessNextBatchTimer");
- connect(mProcessNextBatchTimer, SIGNAL(timeout()), this, SLOT(slotProcessNextBatch()));
+ mProcessNextBatchTimer = new TQTimer(0, "mProcessNextBatchTimer");
+ connect(mProcessNextBatchTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotProcessNextBatch()));
}
KMSearch::~KMSearch()
@@ -90,7 +90,7 @@ KMSearch::~KMSearch()
delete mSearchPattern;
}
-bool KMSearch::write(QString location) const
+bool KMSearch::write(TQString location) const
{
KConfig config(location);
config.setGroup("Search Folder");
@@ -104,14 +104,14 @@ bool KMSearch::write(QString location) const
return true;
}
-bool KMSearch::read(QString location)
+bool KMSearch::read(TQString location)
{
KConfig config( location );
config.setGroup( "Search Folder" );
if ( !mSearchPattern )
mSearchPattern = new KMSearchPattern();
mSearchPattern->readConfig( &config );
- QString rootString = config.readEntry( "Base" );
+ TQString rootString = config.readEntry( "Base" );
mRoot = kmkernel->findFolderById( rootString );
mRecursive = config.readBoolEntry( "Recursive" );
return true;
@@ -147,7 +147,7 @@ bool KMSearch::inScope(KMFolder* folder) const
void KMSearch::start()
{
//close all referenced folders
- QValueListIterator<QGuardedPtr<KMFolder> > fit;
+ TQValueListIterator<TQGuardedPtr<KMFolder> > fit;
for (fit = mOpenedFolders.begin(); fit != mOpenedFolders.end(); ++fit) {
if (!(*fit))
continue;
@@ -180,7 +180,7 @@ void KMSearch::start()
//Append all descendants to folders
KMFolderNode* node;
KMFolder* folder;
- QValueListConstIterator<QGuardedPtr<KMFolder> > it;
+ TQValueListConstIterator<TQGuardedPtr<KMFolder> > it;
for ( it = mFolders.begin(); it != mFolders.end(); ++it )
{
folder = *it;
@@ -191,7 +191,7 @@ void KMSearch::start()
dir = &kmkernel->folderMgr()->dir();
if ( !dir )
continue;
- QPtrListIterator<KMFolderNode> it(*dir);
+ TQPtrListIterator<KMFolderNode> it(*dir);
while ( (node = it.current()) ) {
++it;
if ( !node->isDir() ) {
@@ -204,7 +204,7 @@ void KMSearch::start()
}
mRemainingFolders = mFolders.count();
- mLastFolder = QString::null;
+ mLastFolder = TQString::null;
mProcessNextBatchTimer->start( 0, true );
}
@@ -217,7 +217,7 @@ void KMSearch::stop()
kmkernel->msgIndex()->stopQuery( this );
} else {
mIncompleteFolders.clear();
- QValueListConstIterator<QGuardedPtr<KMFolder> > jt;
+ TQValueListConstIterator<TQGuardedPtr<KMFolder> > jt;
for ( jt = mOpenedFolders.begin(); jt != mOpenedFolders.end(); ++jt ) {
KMFolder *folder = *jt;
if ( !folder )
@@ -237,7 +237,7 @@ void KMSearch::stop()
mRemainingFolders = -1;
mOpenedFolders.clear();
mFolders.clear();
- mLastFolder = QString::null;
+ mLastFolder = TQString::null;
mRunByIndex = mRunning = false;
emit finished(false);
}
@@ -262,9 +262,9 @@ void KMSearch::slotProcessNextBatch()
folder->open("kmsearch");
mOpenedFolders.append( folder );
connect( folder->storage(),
- SIGNAL( searchResult( KMFolder*, QValueList<Q_UINT32>, const KMSearchPattern*, bool ) ),
+ TQT_SIGNAL( searchResult( KMFolder*, TQValueList<Q_UINT32>, const KMSearchPattern*, bool ) ),
this,
- SLOT( slotSearchFolderResult( KMFolder*, QValueList<Q_UINT32>, const KMSearchPattern*, bool ) ) );
+ TQT_SLOT( slotSearchFolderResult( KMFolder*, TQValueList<Q_UINT32>, const KMSearchPattern*, bool ) ) );
folder->storage()->search( mSearchPattern );
} else
--mRemainingFolders;
@@ -274,7 +274,7 @@ void KMSearch::slotProcessNextBatch()
}
void KMSearch::slotSearchFolderResult( KMFolder* folder,
- QValueList<Q_UINT32> serNums,
+ TQValueList<Q_UINT32> serNums,
const KMSearchPattern* pattern,
bool complete )
{
@@ -282,7 +282,7 @@ void KMSearch::slotSearchFolderResult( KMFolder* folder,
return;
kdDebug(5006) << k_funcinfo << folder->label() << " found " << serNums.count() << endl;
mLastFolder = folder->label();
- QValueListIterator<Q_UINT32> it;
+ TQValueListIterator<Q_UINT32> it;
for ( it = serNums.begin(); it != serNums.end(); ++it )
{
emit found( *it );
@@ -291,10 +291,10 @@ void KMSearch::slotSearchFolderResult( KMFolder* folder,
if ( complete )
{
disconnect( folder->storage(),
- SIGNAL( searchResult( KMFolder*, QValueList<Q_UINT32>,
+ TQT_SIGNAL( searchResult( KMFolder*, TQValueList<Q_UINT32>,
const KMSearchPattern*, bool ) ),
this,
- SLOT( slotSearchFolderResult( KMFolder*, QValueList<Q_UINT32>,
+ TQT_SLOT( slotSearchFolderResult( KMFolder*, TQValueList<Q_UINT32>,
const KMSearchPattern*, bool ) ) );
--mRemainingFolders;
mSearchCount += folder->count();
@@ -304,7 +304,7 @@ void KMSearch::slotSearchFolderResult( KMFolder* folder,
{
mRemainingFolders = 0;
mRunning = false;
- mLastFolder = QString::null;
+ mLastFolder = TQString::null;
mRemainingFolders = -1;
mFolders.clear();
emit finished( true );
@@ -325,54 +325,54 @@ KMFolderSearch::KMFolderSearch(KMFolder* folder, const char* name)
//Hook up some slots for live updating of search folders
//TODO: Optimize folderInvalidated, folderAdded, folderRemoved
- connect(kmkernel->folderMgr(), SIGNAL(msgAdded(KMFolder*, Q_UINT32)),
- this, SLOT(examineAddedMessage(KMFolder*, Q_UINT32)));
- connect(kmkernel->folderMgr(), SIGNAL(msgRemoved(KMFolder*, Q_UINT32)),
- this, SLOT(examineRemovedMessage(KMFolder*, Q_UINT32)));
- connect(kmkernel->folderMgr(), SIGNAL(msgChanged(KMFolder*, Q_UINT32, int)),
- this, SLOT(examineChangedMessage(KMFolder*, Q_UINT32, int)));
- connect(kmkernel->folderMgr(), SIGNAL(folderInvalidated(KMFolder*)),
- this, SLOT(examineInvalidatedFolder(KMFolder*)));
- connect(kmkernel->folderMgr(), SIGNAL(folderAdded(KMFolder*)),
- this, SLOT(examineInvalidatedFolder(KMFolder*)));
- connect(kmkernel->folderMgr(), SIGNAL(folderRemoved(KMFolder*)),
- this, SLOT(examineRemovedFolder(KMFolder*)));
- connect(kmkernel->folderMgr(), SIGNAL(msgHeaderChanged(KMFolder*,int)),
- this, SLOT(propagateHeaderChanged(KMFolder*,int)));
-
- connect(kmkernel->imapFolderMgr(), SIGNAL(msgAdded(KMFolder*, Q_UINT32)),
- this, SLOT(examineAddedMessage(KMFolder*, Q_UINT32)));
- connect(kmkernel->imapFolderMgr(), SIGNAL(msgRemoved(KMFolder*, Q_UINT32)),
- this, SLOT(examineRemovedMessage(KMFolder*, Q_UINT32)));
- connect(kmkernel->imapFolderMgr(), SIGNAL(msgChanged(KMFolder*, Q_UINT32, int)),
- this, SLOT(examineChangedMessage(KMFolder*, Q_UINT32, int)));
- connect(kmkernel->imapFolderMgr(), SIGNAL(folderInvalidated(KMFolder*)),
- this, SLOT(examineInvalidatedFolder(KMFolder*)));
- connect(kmkernel->imapFolderMgr(), SIGNAL(folderAdded(KMFolder*)),
- this, SLOT(examineInvalidatedFolder(KMFolder*)));
- connect(kmkernel->imapFolderMgr(), SIGNAL(folderRemoved(KMFolder*)),
- this, SLOT(examineRemovedFolder(KMFolder*)));
- connect(kmkernel->imapFolderMgr(), SIGNAL(msgHeaderChanged(KMFolder*,int)),
- this, SLOT(propagateHeaderChanged(KMFolder*,int)));
-
- connect(kmkernel->dimapFolderMgr(), SIGNAL(msgAdded(KMFolder*, Q_UINT32)),
- this, SLOT(examineAddedMessage(KMFolder*, Q_UINT32)));
- connect(kmkernel->dimapFolderMgr(), SIGNAL(msgRemoved(KMFolder*, Q_UINT32)),
- this, SLOT(examineRemovedMessage(KMFolder*, Q_UINT32)));
- connect(kmkernel->dimapFolderMgr(), SIGNAL(msgChanged(KMFolder*, Q_UINT32, int)),
- this, SLOT(examineChangedMessage(KMFolder*, Q_UINT32, int)));
- connect(kmkernel->dimapFolderMgr(), SIGNAL(folderInvalidated(KMFolder*)),
- this, SLOT(examineInvalidatedFolder(KMFolder*)));
- connect(kmkernel->dimapFolderMgr(), SIGNAL(folderAdded(KMFolder*)),
- this, SLOT(examineInvalidatedFolder(KMFolder*)));
- connect(kmkernel->dimapFolderMgr(), SIGNAL(folderRemoved(KMFolder*)),
- this, SLOT(examineRemovedFolder(KMFolder*)));
- connect(kmkernel->dimapFolderMgr(), SIGNAL(msgHeaderChanged(KMFolder*,int)),
- this, SLOT(propagateHeaderChanged(KMFolder*,int)));
-
- mExecuteSearchTimer = new QTimer(0, "mExecuteSearchTimer");
- connect(mExecuteSearchTimer, SIGNAL(timeout()),
- this, SLOT(executeSearch()));
+ connect(kmkernel->folderMgr(), TQT_SIGNAL(msgAdded(KMFolder*, Q_UINT32)),
+ this, TQT_SLOT(examineAddedMessage(KMFolder*, Q_UINT32)));
+ connect(kmkernel->folderMgr(), TQT_SIGNAL(msgRemoved(KMFolder*, Q_UINT32)),
+ this, TQT_SLOT(examineRemovedMessage(KMFolder*, Q_UINT32)));
+ connect(kmkernel->folderMgr(), TQT_SIGNAL(msgChanged(KMFolder*, Q_UINT32, int)),
+ this, TQT_SLOT(examineChangedMessage(KMFolder*, Q_UINT32, int)));
+ connect(kmkernel->folderMgr(), TQT_SIGNAL(folderInvalidated(KMFolder*)),
+ this, TQT_SLOT(examineInvalidatedFolder(KMFolder*)));
+ connect(kmkernel->folderMgr(), TQT_SIGNAL(folderAdded(KMFolder*)),
+ this, TQT_SLOT(examineInvalidatedFolder(KMFolder*)));
+ connect(kmkernel->folderMgr(), TQT_SIGNAL(folderRemoved(KMFolder*)),
+ this, TQT_SLOT(examineRemovedFolder(KMFolder*)));
+ connect(kmkernel->folderMgr(), TQT_SIGNAL(msgHeaderChanged(KMFolder*,int)),
+ this, TQT_SLOT(propagateHeaderChanged(KMFolder*,int)));
+
+ connect(kmkernel->imapFolderMgr(), TQT_SIGNAL(msgAdded(KMFolder*, Q_UINT32)),
+ this, TQT_SLOT(examineAddedMessage(KMFolder*, Q_UINT32)));
+ connect(kmkernel->imapFolderMgr(), TQT_SIGNAL(msgRemoved(KMFolder*, Q_UINT32)),
+ this, TQT_SLOT(examineRemovedMessage(KMFolder*, Q_UINT32)));
+ connect(kmkernel->imapFolderMgr(), TQT_SIGNAL(msgChanged(KMFolder*, Q_UINT32, int)),
+ this, TQT_SLOT(examineChangedMessage(KMFolder*, Q_UINT32, int)));
+ connect(kmkernel->imapFolderMgr(), TQT_SIGNAL(folderInvalidated(KMFolder*)),
+ this, TQT_SLOT(examineInvalidatedFolder(KMFolder*)));
+ connect(kmkernel->imapFolderMgr(), TQT_SIGNAL(folderAdded(KMFolder*)),
+ this, TQT_SLOT(examineInvalidatedFolder(KMFolder*)));
+ connect(kmkernel->imapFolderMgr(), TQT_SIGNAL(folderRemoved(KMFolder*)),
+ this, TQT_SLOT(examineRemovedFolder(KMFolder*)));
+ connect(kmkernel->imapFolderMgr(), TQT_SIGNAL(msgHeaderChanged(KMFolder*,int)),
+ this, TQT_SLOT(propagateHeaderChanged(KMFolder*,int)));
+
+ connect(kmkernel->dimapFolderMgr(), TQT_SIGNAL(msgAdded(KMFolder*, Q_UINT32)),
+ this, TQT_SLOT(examineAddedMessage(KMFolder*, Q_UINT32)));
+ connect(kmkernel->dimapFolderMgr(), TQT_SIGNAL(msgRemoved(KMFolder*, Q_UINT32)),
+ this, TQT_SLOT(examineRemovedMessage(KMFolder*, Q_UINT32)));
+ connect(kmkernel->dimapFolderMgr(), TQT_SIGNAL(msgChanged(KMFolder*, Q_UINT32, int)),
+ this, TQT_SLOT(examineChangedMessage(KMFolder*, Q_UINT32, int)));
+ connect(kmkernel->dimapFolderMgr(), TQT_SIGNAL(folderInvalidated(KMFolder*)),
+ this, TQT_SLOT(examineInvalidatedFolder(KMFolder*)));
+ connect(kmkernel->dimapFolderMgr(), TQT_SIGNAL(folderAdded(KMFolder*)),
+ this, TQT_SLOT(examineInvalidatedFolder(KMFolder*)));
+ connect(kmkernel->dimapFolderMgr(), TQT_SIGNAL(folderRemoved(KMFolder*)),
+ this, TQT_SLOT(examineRemovedFolder(KMFolder*)));
+ connect(kmkernel->dimapFolderMgr(), TQT_SIGNAL(msgHeaderChanged(KMFolder*,int)),
+ this, TQT_SLOT(propagateHeaderChanged(KMFolder*,int)));
+
+ mExecuteSearchTimer = new TQTimer(0, "mExecuteSearchTimer");
+ connect(mExecuteSearchTimer, TQT_SIGNAL(timeout()),
+ this, TQT_SLOT(executeSearch()));
}
KMFolderSearch::~KMFolderSearch()
@@ -391,7 +391,7 @@ void KMFolderSearch::setSearch(KMSearch *search)
mInvalid = false;
setDirty( true ); //have to write the index
if (!mUnlinked) {
- unlink(QFile::encodeName(indexLocation()));
+ unlink(TQFile::encodeName(indexLocation()));
mUnlinked = true;
}
if (mSearch != search) {
@@ -399,10 +399,10 @@ void KMFolderSearch::setSearch(KMSearch *search)
delete mSearch;
mSearch = search; // take ownership
if (mSearch) {
- QObject::connect(search, SIGNAL(found(Q_UINT32)),
- SLOT(addSerNum(Q_UINT32)));
- QObject::connect(search, SIGNAL(finished(bool)),
- SLOT(searchFinished(bool)));
+ TQObject::connect(search, TQT_SIGNAL(found(Q_UINT32)),
+ TQT_SLOT(addSerNum(Q_UINT32)));
+ TQObject::connect(search, TQT_SIGNAL(finished(bool)),
+ TQT_SLOT(searchFinished(bool)));
}
}
if (mSearch)
@@ -458,7 +458,7 @@ void KMFolderSearch::addSerNum(Q_UINT32 serNum)
}
setDirty( true ); //TODO append a single entry to .ids file and sync.
if (!mUnlinked) {
- unlink(QFile::encodeName(indexLocation()));
+ unlink(TQFile::encodeName(indexLocation()));
mUnlinked = true;
}
mSerNums.append(serNum);
@@ -474,7 +474,7 @@ void KMFolderSearch::addSerNum(Q_UINT32 serNum)
void KMFolderSearch::removeSerNum(Q_UINT32 serNum)
{
- QValueVector<Q_UINT32>::const_iterator it;
+ TQValueVector<Q_UINT32>::const_iterator it;
int i = 0;
for(it = mSerNums.begin(); it != mSerNums.end(); ++it, ++i)
if ((*it) == serNum) {
@@ -487,7 +487,7 @@ void KMFolderSearch::removeSerNum(Q_UINT32 serNum)
return;
}
if (!mUnlinked) {
- unlink(QFile::encodeName(indexLocation()));
+ unlink(TQFile::encodeName(indexLocation()));
mUnlinked = true;
}
}
@@ -502,8 +502,8 @@ int KMFolderSearch::addMsg(KMMessage*, int* index_return)
bool KMFolderSearch::readSearch()
{
mSearch = new KMSearch;
- QObject::connect(mSearch, SIGNAL(found(Q_UINT32)), SLOT(addSerNum(Q_UINT32)));
- QObject::connect(mSearch, SIGNAL(finished(bool)), SLOT(searchFinished(bool)));
+ TQObject::connect(mSearch, TQT_SIGNAL(found(Q_UINT32)), TQT_SLOT(addSerNum(Q_UINT32)));
+ TQObject::connect(mSearch, TQT_SIGNAL(finished(bool)), TQT_SLOT(searchFinished(bool)));
return mSearch->read(location());
}
@@ -531,7 +531,7 @@ int KMFolderSearch::canAccess()
{
assert(!folder()->name().isEmpty());
- if (access(QFile::encodeName(location()), R_OK | W_OK | X_OK) != 0)
+ if (access(TQFile::encodeName(location()), R_OK | W_OK | X_OK) != 0)
return 1;
return 0;
}
@@ -557,7 +557,7 @@ void KMFolderSearch::reallyDoClose(const char* owner)
}
//close all referenced folders
- QValueListIterator<QGuardedPtr<KMFolder> > fit;
+ TQValueListIterator<TQGuardedPtr<KMFolder> > fit;
for (fit = mFolders.begin(); fit != mFolders.end(); ++fit) {
if (!(*fit))
continue;
@@ -578,7 +578,7 @@ void KMFolderSearch::reallyDoClose(const char* owner)
int KMFolderSearch::create()
{
int old_umask;
- int rc = unlink(QFile::encodeName(location()));
+ int rc = unlink(TQFile::encodeName(location()));
if (!rc)
return rc;
rc = 0;
@@ -587,14 +587,14 @@ int KMFolderSearch::create()
assert(mOpenCount == 0);
kdDebug(5006) << "Creating folder " << location() << endl;
- if (access(QFile::encodeName(location()), F_OK) == 0) {
+ if (access(TQFile::encodeName(location()), F_OK) == 0) {
kdDebug(5006) << "KMFolderSearch::create call to access function failed."
<< endl;
return EEXIST;
}
old_umask = umask(077);
- FILE *mStream = fopen(QFile::encodeName(location()), "w+");
+ FILE *mStream = fopen(TQFile::encodeName(location()), "w+");
umask(old_umask);
if (!mStream) return errno;
fclose(mStream);
@@ -602,8 +602,8 @@ int KMFolderSearch::create()
clearIndex();
if (!mSearch) {
mSearch = new KMSearch();
- QObject::connect(mSearch, SIGNAL(found(Q_UINT32)), SLOT(addSerNum(Q_UINT32)));
- QObject::connect(mSearch, SIGNAL(finished(bool)), SLOT(searchFinished(bool)));
+ TQObject::connect(mSearch, TQT_SIGNAL(found(Q_UINT32)), TQT_SLOT(addSerNum(Q_UINT32)));
+ TQObject::connect(mSearch, TQT_SIGNAL(finished(bool)), TQT_SLOT(searchFinished(bool)));
}
mSearch->write(location());
mOpenCount++;
@@ -625,14 +625,14 @@ bool KMFolderSearch::isReadOnly() const
}
FolderJob* KMFolderSearch::doCreateJob(KMMessage*, FolderJob::JobType,
- KMFolder*, QString, const AttachmentStrategy* ) const
+ KMFolder*, TQString, const AttachmentStrategy* ) const
{
// Should never be called
assert(0);
return 0;
}
-FolderJob* KMFolderSearch::doCreateJob(QPtrList<KMMessage>&, const QString&,
+FolderJob* KMFolderSearch::doCreateJob(TQPtrList<KMMessage>&, const TQString&,
FolderJob::JobType, KMFolder*) const
{
// Should never be called
@@ -701,7 +701,7 @@ int KMFolderSearch::find(const KMMsgBase* msg) const
{
int pos = 0;
Q_UINT32 serNum = msg->getMsgSerNum();
- QValueVector<Q_UINT32>::const_iterator it;
+ TQValueVector<Q_UINT32>::const_iterator it;
for(it = mSerNums.begin(); it != mSerNums.end(); ++it) {
if ((*it) == serNum)
return pos;
@@ -710,9 +710,9 @@ int KMFolderSearch::find(const KMMsgBase* msg) const
return -1;
}
-QString KMFolderSearch::indexLocation() const
+TQString KMFolderSearch::indexLocation() const
{
- QString sLocation(folder()->path());
+ TQString sLocation(folder()->path());
if (!sLocation.isEmpty()) sLocation += '/';
sLocation += '.';
@@ -726,7 +726,7 @@ QString KMFolderSearch::indexLocation() const
int KMFolderSearch::updateIndex()
{
if (mSearch && search()->running())
- unlink(QFile::encodeName(indexLocation()));
+ unlink(TQFile::encodeName(indexLocation()));
else
if (dirty())
return writeIndex();
@@ -737,22 +737,22 @@ int KMFolderSearch::writeIndex( bool )
{
// TODO:If we fail to write the index we should panic the kernel
// TODO:and the same for other folder types too, and the msgDict.
- QString filename = indexLocation();
+ TQString filename = indexLocation();
int old_umask = umask(077);
- QString tempName = filename + ".temp";
- unlink(QFile::encodeName(tempName));
+ TQString tempName = filename + ".temp";
+ unlink(TQFile::encodeName(tempName));
// We touch the folder, otherwise the index is regenerated, if KMail is
// running, while the clock switches from daylight savings time to normal time
- utime(QFile::encodeName(location()), 0);
+ utime(TQFile::encodeName(location()), 0);
- FILE *tmpIndexStream = fopen(QFile::encodeName(tempName), "w");
+ FILE *tmpIndexStream = fopen(TQFile::encodeName(tempName), "w");
umask(old_umask);
if (!tmpIndexStream) {
kdDebug(5006) << "Cannot write '" << filename
<< strerror(errno) << " (" << errno << ")" << endl;
- truncate(QFile::encodeName(filename), 0);
+ truncate(TQFile::encodeName(filename), 0);
return -1;
}
fprintf(tmpIndexStream, IDS_SEARCH_HEADER, IDS_SEARCH_VERSION);
@@ -762,11 +762,11 @@ int KMFolderSearch::writeIndex( bool )
Q_UINT32 count = mSerNums.count();
if (!fwrite(&count, sizeof(count), 1, tmpIndexStream)) {
fclose(tmpIndexStream);
- truncate(QFile::encodeName(filename), 0);
+ truncate(TQFile::encodeName(filename), 0);
return -1;
}
- QValueVector<Q_UINT32>::iterator it;
+ TQValueVector<Q_UINT32>::iterator it;
for(it = mSerNums.begin(); it != mSerNums.end(); ++it) {
Q_UINT32 serNum = *it;
if (!fwrite(&serNum, sizeof(serNum), 1, tmpIndexStream))
@@ -777,7 +777,7 @@ int KMFolderSearch::writeIndex( bool )
if (fsync(fileno(tmpIndexStream)) != 0) return errno;
if (fclose(tmpIndexStream) != 0) return errno;
- ::rename(QFile::encodeName(tempName), QFile::encodeName(indexLocation()));
+ ::rename(TQFile::encodeName(tempName), TQFile::encodeName(indexLocation()));
mDirty = FALSE;
mUnlinked = FALSE;
@@ -801,8 +801,8 @@ KMMessage* KMFolderSearch::readMsg(int idx)
bool KMFolderSearch::readIndex()
{
clearIndex();
- QString filename = indexLocation();
- mIdsStream = fopen(QFile::encodeName(filename), "r+");
+ TQString filename = indexLocation();
+ mIdsStream = fopen(TQFile::encodeName(filename), "r+");
if (!mIdsStream)
return false;
@@ -878,8 +878,8 @@ bool KMFolderSearch::readIndex()
int KMFolderSearch::removeContents()
{
- unlink(QFile::encodeName(location()));
- unlink(QFile::encodeName(indexLocation()));
+ unlink(TQFile::encodeName(location()));
+ unlink(TQFile::encodeName(indexLocation()));
mUnlinked = true;
return 0;
}
@@ -900,7 +900,7 @@ KMMsgBase* KMFolderSearch::takeIndexEntry(int idx)
{
assert(idx >= 0 && idx < (int)mSerNums.count());
KMMsgBase *msgBase = getMsgBase(idx);
- QValueVector<Q_UINT32>::iterator it = mSerNums.begin();
+ TQValueVector<Q_UINT32>::iterator it = mSerNums.begin();
mSerNums.erase(&it[idx]);
return msgBase;
}
@@ -915,7 +915,7 @@ KMMsgInfo* KMFolderSearch::setIndexEntry(int idx, KMMessage *msg)
void KMFolderSearch::clearIndex(bool, bool)
{
//close all referenced folders
- QValueListIterator<QGuardedPtr<KMFolder> > fit;
+ TQValueListIterator<TQGuardedPtr<KMFolder> > fit;
for (fit = mFolders.begin(); fit != mFolders.end(); ++fit) {
if (!(*fit))
continue;
@@ -928,7 +928,7 @@ void KMFolderSearch::clearIndex(bool, bool)
void KMFolderSearch::truncateIndex()
{
- truncate(QFile::encodeName(indexLocation()), IDS_SEARCH_HEADER_LEN);
+ truncate(TQFile::encodeName(indexLocation()), IDS_SEARCH_HEADER_LEN);
}
void KMFolderSearch::examineAddedMessage(KMFolder *aFolder, Q_UINT32 serNum)
@@ -958,9 +958,9 @@ void KMFolderSearch::examineAddedMessage(KMFolder *aFolder, Q_UINT32 serNum)
mFoldersCurrentlyBeingSearched.replace( folder, count+1 );
} else {
connect( folder->storage(),
- SIGNAL( searchDone( KMFolder*, Q_UINT32, const KMSearchPattern*, bool ) ),
+ TQT_SIGNAL( searchDone( KMFolder*, Q_UINT32, const KMSearchPattern*, bool ) ),
this,
- SLOT( slotSearchExamineMsgDone( KMFolder*, Q_UINT32,
+ TQT_SLOT( slotSearchExamineMsgDone( KMFolder*, Q_UINT32,
const KMSearchPattern*, bool ) ) );
mFoldersCurrentlyBeingSearched.insert( folder, 1 );
}
@@ -982,10 +982,10 @@ void KMFolderSearch::slotSearchExamineMsgDone( KMFolder* folder,
unsigned int count = mFoldersCurrentlyBeingSearched[folder];
if ( count == 1 ) {
disconnect( folder->storage(),
- SIGNAL( searchDone( KMFolder*, Q_UINT32,
+ TQT_SIGNAL( searchDone( KMFolder*, Q_UINT32,
const KMSearchPattern*, bool ) ),
this,
- SLOT( slotSearchExamineMsgDone( KMFolder*, Q_UINT32,
+ TQT_SLOT( slotSearchExamineMsgDone( KMFolder*, Q_UINT32,
const KMSearchPattern*, bool ) ) );
mFoldersCurrentlyBeingSearched.remove( folder );
} else {
@@ -993,7 +993,7 @@ void KMFolderSearch::slotSearchExamineMsgDone( KMFolder* folder,
}
if ( !matches ) {
- QValueVector<Q_UINT32>::const_iterator it;
+ TQValueVector<Q_UINT32>::const_iterator it;
it = qFind( mSerNums.begin(), mSerNums.end(), serNum );
if (it != mSerNums.end()) {
removeSerNum( serNum );
@@ -1005,7 +1005,7 @@ void KMFolderSearch::slotSearchExamineMsgDone( KMFolder* folder,
// mSearch->stop();
// mExecuteSearchTimer->start( 0, true );
// } else {
- QValueVector<Q_UINT32>::const_iterator it;
+ TQValueVector<Q_UINT32>::const_iterator it;
it = qFind( mSerNums.begin(), mSerNums.end(), serNum );
if (it == mSerNums.end()) {
addSerNum( serNum );
@@ -1041,7 +1041,7 @@ void KMFolderSearch::examineChangedMessage(KMFolder *aFolder, Q_UINT32 serNum, i
open("foldersearch");
mTempOpened = true;
}
- QValueVector<Q_UINT32>::const_iterator it;
+ TQValueVector<Q_UINT32>::const_iterator it;
it = qFind( mSerNums.begin(), mSerNums.end(), serNum );
if (it != mSerNums.end()) {
mUnreadMsgs += delta;
@@ -1066,7 +1066,7 @@ void KMFolderSearch::examineInvalidatedFolder(KMFolder *folder)
mSearch->stop();
if (!mUnlinked) {
- unlink(QFile::encodeName(indexLocation()));
+ unlink(TQFile::encodeName(indexLocation()));
mUnlinked = true;
}
@@ -1102,7 +1102,7 @@ void KMFolderSearch::propagateHeaderChanged(KMFolder *aFolder, int idx)
}
Q_UINT32 serNum = KMMsgDict::instance()->getMsgSerNum(aFolder, idx);
- QValueVector<Q_UINT32>::const_iterator it;
+ TQValueVector<Q_UINT32>::const_iterator it;
for(it = mSerNums.begin(); it != mSerNums.end(); ++it) {
if ((*it) == serNum) {
emit msgHeaderChanged(folder(), pos);
@@ -1119,9 +1119,9 @@ void KMFolderSearch::propagateHeaderChanged(KMFolder *aFolder, int idx)
mFoldersCurrentlyBeingSearched.replace( aFolder, count+1 );
} else {
connect( aFolder->storage(),
- SIGNAL( searchDone( KMFolder*, Q_UINT32, const KMSearchPattern*, bool ) ),
+ TQT_SIGNAL( searchDone( KMFolder*, Q_UINT32, const KMSearchPattern*, bool ) ),
this,
- SLOT( slotSearchExamineMsgDone( KMFolder*, Q_UINT32,
+ TQT_SLOT( slotSearchExamineMsgDone( KMFolder*, Q_UINT32,
const KMSearchPattern*, bool ) ) );
mFoldersCurrentlyBeingSearched.insert( aFolder, 1 );
}
diff --git a/kmail/kmfoldersearch.h b/kmail/kmfoldersearch.h
index 9acb80724..ef3c87d0f 100644
--- a/kmail/kmfoldersearch.h
+++ b/kmail/kmfoldersearch.h
@@ -20,11 +20,11 @@
#ifndef kmfoldersearch_h
#define kmfoldersearch_h
-#include <qguardedptr.h>
-#include <qvaluelist.h>
-#include <qvaluevector.h>
-#include <qvaluestack.h>
-#include <qmap.h>
+#include <tqguardedptr.h>
+#include <tqvaluelist.h>
+#include <tqvaluevector.h>
+#include <tqvaluestack.h>
+#include <tqmap.h>
#include "kmfolder.h"
#include "folderstorage.h"
@@ -37,7 +37,7 @@
numbers of all messages that currently match the search.
**/
-typedef QValueList<Q_UINT32> SerNumList;
+typedef TQValueList<Q_UINT32> SerNumList;
class KMSearchPattern;
class KMFolderImap;
class KMFolderSearchJob;
@@ -54,11 +54,11 @@ class KMSearch: public QObject
Q_OBJECT
public:
- KMSearch(QObject * parent = 0, const char * name = 0);
+ KMSearch(TQObject * parent = 0, const char * name = 0);
~KMSearch();
- bool write(QString location) const;
- bool read(QString location);
+ bool write(TQString location) const;
+ bool read(TQString location);
bool recursive() const { return mRecursive; }
void setRecursive(bool recursive) { if (running()) stop(); mRecursive = recursive; }
KMFolder* root() const { return mRoot; }
@@ -72,7 +72,7 @@ public:
void stop();
int foundCount() const { return mFoundCount; }
int searchCount() const { return mSearchCount; }
- QString currentFolder() const { return mLastFolder; }
+ TQString currentFolder() const { return mLastFolder; }
public slots:
void indexFinished();
@@ -83,27 +83,27 @@ signals:
protected slots:
void slotProcessNextBatch();
- void slotSearchFolderResult( KMFolder*, QValueList<Q_UINT32>,
+ void slotSearchFolderResult( KMFolder*, TQValueList<Q_UINT32>,
const KMSearchPattern*, bool );
protected:
friend class ::KMIndexSearchTarget;
void setRunning(bool b) { mRunning = b; }
void setFoundCount(int f) { mFoundCount = f; }
- void setCurrentFolder(const QString &f) { mLastFolder = f; }
+ void setCurrentFolder(const TQString &f) { mLastFolder = f; }
private:
int mRemainingFolders;
bool mRecursive, mRunning, mIdle, mRunByIndex;
- QGuardedPtr<KMFolder> mRoot;
+ TQGuardedPtr<KMFolder> mRoot;
KMSearchPattern* mSearchPattern;
- QValueList<QGuardedPtr<KMFolder> > mFolders, mOpenedFolders;
- QValueList<QGuardedPtr<KMFolderImap> > mIncompleteFolders;
+ TQValueList<TQGuardedPtr<KMFolder> > mFolders, mOpenedFolders;
+ TQValueList<TQGuardedPtr<KMFolderImap> > mIncompleteFolders;
SerNumList mSerNums;
- QString mLastFolder;
+ TQString mLastFolder;
int mFoundCount;
int mSearchCount;
- QTimer *mProcessNextBatchTimer;
+ TQTimer *mProcessNextBatchTimer;
};
class KMFolderSearch: public FolderStorage
@@ -180,16 +180,16 @@ public:
virtual const KMMsgBase* getMsgBase(int idx) const;
virtual KMMsgBase* getMsgBase(int idx);
virtual int find(const KMMsgBase* msg) const;
- virtual QString indexLocation() const;
+ virtual TQString indexLocation() const;
virtual int writeIndex( bool createEmptyIndex = false );
DwString getDwString(int idx);
Q_UINT32 serNum(int idx) { return mSerNums[idx]; }
protected:
virtual FolderJob* doCreateJob(KMMessage *msg, FolderJob::JobType jt,
- KMFolder *folder, QString partSpecifier,
+ KMFolder *folder, TQString partSpecifier,
const AttachmentStrategy *as ) const;
- virtual FolderJob* doCreateJob(QPtrList<KMMessage>& msgList, const QString& sets,
+ virtual FolderJob* doCreateJob(TQPtrList<KMMessage>& msgList, const TQString& sets,
FolderJob::JobType jt, KMFolder *folder) const;
virtual KMMessage* readMsg(int idx);
virtual bool readIndex();
@@ -202,15 +202,15 @@ protected:
virtual void truncateIndex();
private:
- QValueVector<Q_UINT32> mSerNums;
- QValueList<QGuardedPtr<KMFolder> > mFolders;
- QValueStack<Q_UINT32> mUnexaminedMessages;
+ TQValueVector<Q_UINT32> mSerNums;
+ TQValueList<TQGuardedPtr<KMFolder> > mFolders;
+ TQValueStack<Q_UINT32> mUnexaminedMessages;
FILE *mIdsStream;
KMSearch *mSearch;
bool mInvalid, mUnlinked;
bool mTempOpened;
- QTimer *mExecuteSearchTimer;
- QMap<const KMFolder*, unsigned int>mFoldersCurrentlyBeingSearched;
+ TQTimer *mExecuteSearchTimer;
+ TQMap<const KMFolder*, unsigned int>mFoldersCurrentlyBeingSearched;
};
#endif /*kmfoldersearch_h*/
diff --git a/kmail/kmfolderseldlg.cpp b/kmail/kmfolderseldlg.cpp
index 21fc53231..607b42435 100644
--- a/kmail/kmfolderseldlg.cpp
+++ b/kmail/kmfolderseldlg.cpp
@@ -12,8 +12,8 @@
#include <kpopupmenu.h>
#include <kiconloader.h>
-#include <qlayout.h>
-#include <qtoolbutton.h>
+#include <tqlayout.h>
+#include <tqtoolbutton.h>
namespace KMail {
@@ -41,29 +41,29 @@ class FolderItem : public KFolderTreeItem
// Must overload paintCell because neither KListViewItem::isAlternate()
// or KListViewItem::backgroundColor() are virtual!
- virtual void paintCell( QPainter *p, const QColorGroup &cg,
+ virtual void paintCell( TQPainter *p, const TQColorGroup &cg,
int column, int width, int alignment )
{
KListView* view = static_cast< KListView* >( listView() );
// Set alternate background to invalid
- QColor nocolor;
- QColor alt = view->alternateBackground();
+ TQColor nocolor;
+ TQColor alt = view->alternateBackground();
view->setAlternateBackground( nocolor );
// Set the base and text to the appropriate colors
- QColorGroup *cgroup = (QColorGroup *)&view->viewport()->colorGroup();
- QColor base = cgroup->base();
- QColor text = cgroup->text();
- cgroup->setColor( QColorGroup::Base, isAlternate() ? alt : base );
- cgroup->setColor( QColorGroup::Text, isEnabled() ? text : Qt::lightGray );
+ TQColorGroup *cgroup = (TQColorGroup *)&view->viewport()->colorGroup();
+ TQColor base = cgroup->base();
+ TQColor text = cgroup->text();
+ cgroup->setColor( TQColorGroup::Base, isAlternate() ? alt : base );
+ cgroup->setColor( TQColorGroup::Text, isEnabled() ? text : Qt::lightGray );
// Call the parent paint routine
KListViewItem::paintCell( p, cg, column, width, alignment );
// Restore the base and alternate background
- cgroup->setColor( QColorGroup::Base, base );
- cgroup->setColor( QColorGroup::Text, text );
+ cgroup->setColor( TQColorGroup::Base, base );
+ cgroup->setColor( TQColorGroup::Text, text );
view->setAlternateBackground( alt );
}
@@ -85,9 +85,9 @@ FolderItem::FolderItem( KFolderTreeItem * listViewItem )
{}
//-----------------------------------------------------------------------------
-SimpleFolderTree::SimpleFolderTree( QWidget * parent,
+SimpleFolderTree::SimpleFolderTree( TQWidget * parent,
KMFolderTree * folderTree,
- const QString & preSelection,
+ const TQString & preSelection,
bool mustBeReadWrite )
: KFolderTree( parent ), mFolderTree( folderTree )
{
@@ -95,23 +95,23 @@ SimpleFolderTree::SimpleFolderTree( QWidget * parent,
mFolderColumn = addColumn( i18n( "Folder" ), 0 );
mPathColumn = addColumn( i18n( "Path" ), 0 );
setAllColumnsShowFocus( true );
- setAlternateBackground( QColor( 0xf0, 0xf0, 0xf0 ) );
+ setAlternateBackground( TQColor( 0xf0, 0xf0, 0xf0 ) );
reload( mustBeReadWrite, true, true, preSelection );
readColorConfig();
applyFilter( "" );
- connect(this, SIGNAL(collapsed(QListViewItem*)), SLOT(recolorRows()));
- connect(this, SIGNAL(expanded(QListViewItem*)), SLOT(recolorRows()));
+ connect(this, TQT_SIGNAL(collapsed(TQListViewItem*)), TQT_SLOT(recolorRows()));
+ connect(this, TQT_SIGNAL(expanded(TQListViewItem*)), TQT_SLOT(recolorRows()));
- connect( this, SIGNAL( contextMenuRequested( QListViewItem*, const QPoint &, int ) ),
- this, SLOT( slotContextMenuRequested( QListViewItem*, const QPoint & ) ) );
+ connect( this, TQT_SIGNAL( contextMenuRequested( TQListViewItem*, const TQPoint &, int ) ),
+ this, TQT_SLOT( slotContextMenuRequested( TQListViewItem*, const TQPoint & ) ) );
}
//-----------------------------------------------------------------------------
void SimpleFolderTree::reload( bool mustBeReadWrite, bool showOutbox,
- bool showImapFolders, const QString& preSelection )
+ bool showImapFolders, const TQString& preSelection )
{
mLastMustBeReadWrite = mustBeReadWrite;
mLastShowOutbox = showOutbox;
@@ -123,14 +123,14 @@ void SimpleFolderTree::reload( bool mustBeReadWrite, bool showOutbox,
FolderItem * selectedItem = 0;
int lastDepth = 0;
- QString selected = preSelection;
+ TQString selected = preSelection;
if ( selected.isEmpty() && folder() )
selected = folder()->idString();
mFilter = "";
- QString path;
+ TQString path;
- for ( QListViewItemIterator it( mFolderTree ) ; it.current() ; ++it )
+ for ( TQListViewItemIterator it( mFolderTree ) ; it.current() ; ++it )
{
KMFolderTreeItem * fti = static_cast<KMFolderTreeItem *>( it.current() );
@@ -224,7 +224,7 @@ void SimpleFolderTree::reload( bool mustBeReadWrite, bool showOutbox,
//-----------------------------------------------------------------------------
const KMFolder * SimpleFolderTree::folder() const
{
- QListViewItem * item = currentItem();
+ TQListViewItem * item = currentItem();
if ( item ) {
const KMFolder * folder = static_cast<FolderItem *>( item )->folder();
if( folder ) return folder;
@@ -235,7 +235,7 @@ const KMFolder * SimpleFolderTree::folder() const
//-----------------------------------------------------------------------------
void SimpleFolderTree::setFolder( KMFolder *folder )
{
- for ( QListViewItemIterator it( this ) ; it.current() ; ++it )
+ for ( TQListViewItemIterator it( this ) ; it.current() ; ++it )
{
const KMFolder *fld = static_cast<FolderItem *>( it.current() )->folder();
if ( fld == folder )
@@ -247,7 +247,7 @@ void SimpleFolderTree::setFolder( KMFolder *folder )
}
//-----------------------------------------------------------------------------
-void SimpleFolderTree::setFolder( const QString& idString )
+void SimpleFolderTree::setFolder( const TQString& idString )
{
setFolder( kmkernel->findFolderById( idString ) );
}
@@ -264,8 +264,8 @@ void SimpleFolderTree::addChildFolder()
}
//-----------------------------------------------------------------------------
-void SimpleFolderTree::slotContextMenuRequested( QListViewItem *lvi,
- const QPoint &p )
+void SimpleFolderTree::slotContextMenuRequested( TQListViewItem *lvi,
+ const TQPoint &p )
{
if (!lvi)
return;
@@ -281,7 +281,7 @@ void SimpleFolderTree::slotContextMenuRequested( QListViewItem *lvi,
folderMenu->insertSeparator();
folderMenu->insertItem(SmallIconSet("folder_new"),
i18n("&New Subfolder..."), this,
- SLOT(addChildFolder()));
+ TQT_SLOT(addChildFolder()));
kmkernel->setContextMenuShown( true );
folderMenu->exec (p, 0);
kmkernel->setContextMenuShown( false );
@@ -292,26 +292,26 @@ void SimpleFolderTree::slotContextMenuRequested( QListViewItem *lvi,
//-----------------------------------------------------------------------------
void SimpleFolderTree::readColorConfig (void)
{
- QColor c1=QColor(kapp->palette().active().text());
- QColor c2=QColor(kapp->palette().active().base());
+ TQColor c1=TQColor(kapp->palette().active().text());
+ TQColor c2=TQColor(kapp->palette().active().base());
mPaintInfo.colFore = c1;
mPaintInfo.colBack = c2;
- QPalette newPal = kapp->palette();
- newPal.setColor( QColorGroup::Base, mPaintInfo.colBack );
- newPal.setColor( QColorGroup::Text, mPaintInfo.colFore );
+ TQPalette newPal = kapp->palette();
+ newPal.setColor( TQColorGroup::Base, mPaintInfo.colBack );
+ newPal.setColor( TQColorGroup::Text, mPaintInfo.colFore );
setPalette( newPal );
}
//-----------------------------------------------------------------------------
-static int recurseFilter( QListViewItem * item, const QString& filter, int column )
+static int recurseFilter( TQListViewItem * item, const TQString& filter, int column )
{
if ( item == 0 )
return 0;
- QListViewItem * child;
+ TQListViewItem * child;
child = item->firstChild();
int enabled = 0;
@@ -337,13 +337,13 @@ void SimpleFolderTree::recolorRows()
{
// Iterate through the list to set the alternate row flags.
int alt = 0;
- QListViewItemIterator it ( this );
+ TQListViewItemIterator it ( this );
while ( it.current() ) {
FolderItem * item = static_cast< FolderItem* >( it.current() );
if ( item->isVisible() ) {
bool visible = true;
- QListViewItem * parent = item->parent();
+ TQListViewItem * parent = item->parent();
while ( parent ) {
if (!parent->isOpen()) {
visible = false;
@@ -362,12 +362,12 @@ void SimpleFolderTree::recolorRows()
}
}
-void SimpleFolderTree::applyFilter( const QString& filter )
+void SimpleFolderTree::applyFilter( const TQString& filter )
{
// Reset all items to visible, enabled, and open
- QListViewItemIterator clean( this );
+ TQListViewItemIterator clean( this );
while ( clean.current() ) {
- QListViewItem * item = clean.current();
+ TQListViewItem * item = clean.current();
item->setEnabled( true );
item->setVisible( true );
item->setOpen( true );
@@ -384,9 +384,9 @@ void SimpleFolderTree::applyFilter( const QString& filter )
// Set the visibility and enabled status of each list item.
// The recursive algorithm is necessary because visiblity
// changes are automatically applied to child nodes by Qt.
- QListViewItemIterator it( this );
+ TQListViewItemIterator it( this );
while ( it.current() ) {
- QListViewItem * item = it.current();
+ TQListViewItem * item = it.current();
if ( item->depth() <= 0 )
recurseFilter( item, filter, mPathColumn );
++it;
@@ -396,7 +396,7 @@ void SimpleFolderTree::applyFilter( const QString& filter )
recolorRows();
// Iterate through the list to find the first selectable item
- QListViewItemIterator first ( this );
+ TQListViewItemIterator first ( this );
while ( first.current() ) {
FolderItem * item = static_cast< FolderItem* >( first.current() );
@@ -419,7 +419,7 @@ void SimpleFolderTree::applyFilter( const QString& filter )
}
//-----------------------------------------------------------------------------
-void SimpleFolderTree::keyPressEvent( QKeyEvent *e ) {
+void SimpleFolderTree::keyPressEvent( TQKeyEvent *e ) {
int ch = e->ascii();
if ( ch >= 32 && ch <= 126 )
@@ -438,7 +438,7 @@ void SimpleFolderTree::keyPressEvent( QKeyEvent *e ) {
//-----------------------------------------------------------------------------
-KMFolderSelDlg::KMFolderSelDlg( KMMainWidget * parent, const QString& caption,
+KMFolderSelDlg::KMFolderSelDlg( KMMainWidget * parent, const TQString& caption,
bool mustBeReadWrite, bool useGlobalSettings )
: KDialogBase( parent, "folder dialog", true, caption,
Ok|Cancel|User1, Ok, true,
@@ -450,16 +450,16 @@ KMFolderSelDlg::KMFolderSelDlg( KMMainWidget * parent, const QString& caption,
KMFolderTree * ft = parent->folderTree();
assert( ft );
- QString preSelection = mUseGlobalSettings ?
- GlobalSettings::self()->lastSelectedFolder() : QString::null;
+ TQString preSelection = mUseGlobalSettings ?
+ GlobalSettings::self()->lastSelectedFolder() : TQString::null;
mTreeView = new KMail::SimpleFolderTree( makeVBoxMainWidget(), ft,
preSelection, mustBeReadWrite );
init();
}
//----------------------------------------------------------------------------
-KMFolderSelDlg::KMFolderSelDlg( QWidget * parent, KMFolderTree * tree,
- const QString& caption, bool mustBeReadWrite, bool useGlobalSettings )
+KMFolderSelDlg::KMFolderSelDlg( TQWidget * parent, KMFolderTree * tree,
+ const TQString& caption, bool mustBeReadWrite, bool useGlobalSettings )
: KDialogBase( parent, "folder dialog", true, caption,
Ok|Cancel|User1, Ok, true,
KGuiItem(i18n("&New Subfolder..."), "folder_new",
@@ -467,8 +467,8 @@ KMFolderSelDlg::KMFolderSelDlg( QWidget * parent, KMFolderTree * tree,
), // mainwin as parent, modal
mUseGlobalSettings( useGlobalSettings )
{
- QString preSelection = mUseGlobalSettings ?
- GlobalSettings::self()->lastSelectedFolder() : QString::null;
+ TQString preSelection = mUseGlobalSettings ?
+ GlobalSettings::self()->lastSelectedFolder() : TQString::null;
mTreeView = new KMail::SimpleFolderTree( makeVBoxMainWidget(), tree,
preSelection, mustBeReadWrite );
init();
@@ -478,10 +478,10 @@ KMFolderSelDlg::KMFolderSelDlg( QWidget * parent, KMFolderTree * tree,
void KMFolderSelDlg::init()
{
mTreeView->setFocus();
- connect( mTreeView, SIGNAL( doubleClicked( QListViewItem*, const QPoint&, int ) ),
- this, SLOT( slotSelect() ) );
- connect( mTreeView, SIGNAL( selectionChanged() ),
- this, SLOT( slotUpdateBtnStatus() ) );
+ connect( mTreeView, TQT_SIGNAL( doubleClicked( TQListViewItem*, const TQPoint&, int ) ),
+ this, TQT_SLOT( slotSelect() ) );
+ connect( mTreeView, TQT_SIGNAL( selectionChanged() ),
+ this, TQT_SLOT( slotUpdateBtnStatus() ) );
readConfig();
}
@@ -541,11 +541,11 @@ void KMFolderSelDlg::readConfig()
KConfig *config = KGlobal::config();
config->setGroup( "FolderSelectionDialog" );
- QSize size = config->readSizeEntry( "Size" );
+ TQSize size = config->readSizeEntry( "Size" );
if ( !size.isEmpty() ) resize( size );
else resize( 500, 300 );
- QValueList<int> widths = config->readIntListEntry( "ColumnWidths" );
+ TQValueList<int> widths = config->readIntListEntry( "ColumnWidths" );
if ( !widths.isEmpty() ) {
mTreeView->setColumnWidth(mTreeView->mFolderColumn, widths[0]);
mTreeView->setColumnWidth(mTreeView->mPathColumn, widths[1]);
@@ -563,7 +563,7 @@ void KMFolderSelDlg::writeConfig()
config->setGroup( "FolderSelectionDialog" );
config->writeEntry( "Size", size() );
- QValueList<int> widths;
+ TQValueList<int> widths;
widths.push_back(mTreeView->columnWidth(mTreeView->mFolderColumn));
widths.push_back(mTreeView->columnWidth(mTreeView->mPathColumn));
config->writeEntry( "ColumnWidths", widths );
diff --git a/kmail/kmfolderseldlg.h b/kmail/kmfolderseldlg.h
index 3adef4159..119ceff78 100644
--- a/kmail/kmfolderseldlg.h
+++ b/kmail/kmfolderseldlg.h
@@ -20,34 +20,34 @@ namespace KMail {
Q_OBJECT
public:
- SimpleFolderTree( QWidget * parent, KMFolderTree * folderTree,
- const QString & preSelection, bool mustBeReadWrite );
+ SimpleFolderTree( TQWidget * parent, KMFolderTree * folderTree,
+ const TQString & preSelection, bool mustBeReadWrite );
/** Reload the tree and select what folders to show and what not */
void reload( bool mustBeReadWrite, bool showOutbox, bool showImapFolders,
- const QString& preSelection = QString::null );
+ const TQString& preSelection = TQString::null );
/** Return the current folder */
const KMFolder * folder() const;
/** Set the current folder */
void setFolder( KMFolder* );
- void setFolder( const QString& idString );
+ void setFolder( const TQString& idString );
/** Apply the given filter. */
- void applyFilter( const QString& filter );
+ void applyFilter( const TQString& filter );
public slots:
void addChildFolder();
protected slots:
- void slotContextMenuRequested( QListViewItem *, const QPoint & );
+ void slotContextMenuRequested( TQListViewItem *, const TQPoint & );
virtual void recolorRows();
protected:
/** Read color options and set palette. */
virtual void readColorConfig(void);
- virtual void keyPressEvent( QKeyEvent *e );
+ virtual void keyPressEvent( TQKeyEvent *e );
/** Folder and path column IDs. */
friend class KMFolderSelDlg;
@@ -56,7 +56,7 @@ namespace KMail {
private:
KMFolderTree* mFolderTree;
- QString mFilter;
+ TQString mFilter;
bool mLastMustBeReadWrite;
bool mLastShowOutbox;
bool mLastShowImapFolders;
@@ -76,7 +76,7 @@ namespace KMail {
* @param useGlobalSettings if true, the current folder is read and
* written to GlobalSettings
*/
- KMFolderSelDlg( KMMainWidget * parent, const QString& caption,
+ KMFolderSelDlg( KMMainWidget * parent, const TQString& caption,
bool mustBeReadWrite, bool useGlobalSettings = true );
/**
* Constructor with separate KMFolderTree
@@ -84,8 +84,8 @@ namespace KMail {
* @param useGlobalSettings if true, the current folder is read and
* written to GlobalSettings
*/
- KMFolderSelDlg( QWidget * parent, KMFolderTree * tree,
- const QString& caption, bool mustBeReadWrite,
+ KMFolderSelDlg( TQWidget * parent, KMFolderTree * tree,
+ const TQString& caption, bool mustBeReadWrite,
bool useGlobalSettings = true );
virtual ~KMFolderSelDlg();
diff --git a/kmail/kmfoldertree.cpp b/kmail/kmfoldertree.cpp
index 6e67399c6..e99e7058b 100644
--- a/kmail/kmfoldertree.cpp
+++ b/kmail/kmfoldertree.cpp
@@ -38,10 +38,10 @@ using namespace KPIM;
#include <kpopupmenu.h>
#include <kdebug.h>
-#include <qpainter.h>
-#include <qcursor.h>
-#include <qregexp.h>
-#include <qpopupmenu.h>
+#include <tqpainter.h>
+#include <tqcursor.h>
+#include <tqregexp.h>
+#include <tqpopupmenu.h>
#include <unistd.h>
#include <assert.h>
@@ -51,9 +51,9 @@ using namespace KPIM;
//=============================================================================
-KMFolderTreeItem::KMFolderTreeItem( KFolderTree *parent, const QString & name,
+KMFolderTreeItem::KMFolderTreeItem( KFolderTree *parent, const TQString & name,
KFolderTreeItem::Protocol protocol )
- : QObject( parent, name.latin1() ),
+ : TQObject( parent, name.latin1() ),
KFolderTreeItem( parent, name, protocol, Root ),
mFolder( 0 ), mNeedsRepaint( true )
{
@@ -62,9 +62,9 @@ KMFolderTreeItem::KMFolderTreeItem( KFolderTree *parent, const QString & name,
}
//-----------------------------------------------------------------------------
-KMFolderTreeItem::KMFolderTreeItem( KFolderTree *parent, const QString & name,
+KMFolderTreeItem::KMFolderTreeItem( KFolderTree *parent, const TQString & name,
KMFolder* folder )
- : QObject( parent, name.latin1() ),
+ : TQObject( parent, name.latin1() ),
KFolderTreeItem( parent, name ),
mFolder( folder ), mNeedsRepaint( true )
{
@@ -73,9 +73,9 @@ KMFolderTreeItem::KMFolderTreeItem( KFolderTree *parent, const QString & name,
}
//-----------------------------------------------------------------------------
-KMFolderTreeItem::KMFolderTreeItem( KFolderTreeItem *parent, const QString & name,
+KMFolderTreeItem::KMFolderTreeItem( KFolderTreeItem *parent, const TQString & name,
KMFolder* folder )
- : QObject( 0, name.latin1() ),
+ : TQObject( 0, name.latin1() ),
KFolderTreeItem( parent, name ),
mFolder( folder ), mNeedsRepaint( true )
{
@@ -103,9 +103,9 @@ static KFolderTreeItem::Protocol protocolFor( KMFolderType t ) {
}
}
-QPixmap KMFolderTreeItem::normalIcon(int size) const
+TQPixmap KMFolderTreeItem::normalIcon(int size) const
{
- QString icon;
+ TQString icon;
if ( (!mFolder && type() == Root) || useTopLevelIcon() ) {
switch ( protocol() ) {
case KFolderTreeItem::Imap:
@@ -144,7 +144,7 @@ QPixmap KMFolderTreeItem::normalIcon(int size) const
icon = mFolder->normalIconPath();
}
KIconLoader * il = KGlobal::instance()->iconLoader();
- QPixmap pm = il->loadIcon( icon, KIcon::Small, size,
+ TQPixmap pm = il->loadIcon( icon, KIcon::Small, size,
KIcon::DefaultState, 0, true );
if ( mFolder && pm.isNull() ) {
pm = il->loadIcon( mFolder->normalIconPath(), KIcon::Small, size,
@@ -154,9 +154,9 @@ QPixmap KMFolderTreeItem::normalIcon(int size) const
return pm;
}
-QPixmap KMFolderTreeItem::unreadIcon(int size) const
+TQPixmap KMFolderTreeItem::unreadIcon(int size) const
{
- QPixmap pm;
+ TQPixmap pm;
if ( !mFolder || useTopLevelIcon() || mFolder->isSystemFolder() ||
kmkernel->folderIsTrash( mFolder ) ||
@@ -265,7 +265,7 @@ void KMFolderTreeItem::slotNameChanged()
//-----------------------------------------------------------------------------
-bool KMFolderTreeItem::acceptDrag(QDropEvent* e) const
+bool KMFolderTreeItem::acceptDrag(TQDropEvent* e) const
{
// Do not allow drags from the favorite folder view, as they don't really
// make sense and do not work.
@@ -353,7 +353,7 @@ void KMFolderTreeItem::updateCount()
//=============================================================================
-KMFolderTree::KMFolderTree( KMMainWidget *mainWidget, QWidget *parent,
+KMFolderTree::KMFolderTree( KMMainWidget *mainWidget, TQWidget *parent,
const char *name )
: KMail::FolderTreeBase( mainWidget, parent, name )
, mUpdateTimer( 0, "mUpdateTimer" )
@@ -366,7 +366,7 @@ KMFolderTree::KMFolderTree( KMMainWidget *mainWidget, QWidget *parent,
mReloading = false;
mCutFolder = false;
- mUpdateCountTimer= new QTimer( this, "mUpdateCountTimer" );
+ mUpdateCountTimer= new TQTimer( this, "mUpdateCountTimer" );
setDragEnabled( true );
addAcceptableDropMimetype( "application/x-qlistviewitem", false );
@@ -385,12 +385,12 @@ KMFolderTree::KMFolderTree( KMMainWidget *mainWidget, QWidget *parent,
mPopup = new KPopupMenu(this);
mPopup->insertTitle(i18n("View Columns"));
mPopup->setCheckable(true);
- mUnreadPop = mPopup->insertItem(i18n("Unread Column"), this, SLOT(slotToggleUnreadColumn()));
- mTotalPop = mPopup->insertItem(i18n("Total Column"), this, SLOT(slotToggleTotalColumn()));
- mSizePop = mPopup->insertItem(i18n("Size Column"), this, SLOT(slotToggleSizeColumn()));
+ mUnreadPop = mPopup->insertItem(i18n("Unread Column"), this, TQT_SLOT(slotToggleUnreadColumn()));
+ mTotalPop = mPopup->insertItem(i18n("Total Column"), this, TQT_SLOT(slotToggleTotalColumn()));
+ mSizePop = mPopup->insertItem(i18n("Size Column"), this, TQT_SLOT(slotToggleSizeColumn()));
- connect( this, SIGNAL( triggerRefresh() ),
- this, SLOT( refresh() ) );
+ connect( this, TQT_SIGNAL( triggerRefresh() ),
+ this, TQT_SLOT( refresh() ) );
new FolderViewToolTip( this );
}
@@ -399,61 +399,61 @@ KMFolderTree::KMFolderTree( KMMainWidget *mainWidget, QWidget *parent,
// connects all needed signals to their slots
void KMFolderTree::connectSignals()
{
- connect( mUpdateCountTimer, SIGNAL(timeout()),
- this, SLOT(slotUpdateCountTimeout()) );
+ connect( mUpdateCountTimer, TQT_SIGNAL(timeout()),
+ this, TQT_SLOT(slotUpdateCountTimeout()) );
- connect(&mUpdateTimer, SIGNAL(timeout()),
- this, SLOT(delayedUpdate()));
+ connect(&mUpdateTimer, TQT_SIGNAL(timeout()),
+ this, TQT_SLOT(delayedUpdate()));
- connect(kmkernel->folderMgr(), SIGNAL(changed()),
- this, SLOT(doFolderListChanged()));
+ connect(kmkernel->folderMgr(), TQT_SIGNAL(changed()),
+ this, TQT_SLOT(doFolderListChanged()));
- connect(kmkernel->folderMgr(), SIGNAL(folderRemoved(KMFolder*)),
- this, SLOT(slotFolderRemoved(KMFolder*)));
+ connect(kmkernel->folderMgr(), TQT_SIGNAL(folderRemoved(KMFolder*)),
+ this, TQT_SLOT(slotFolderRemoved(KMFolder*)));
- connect(kmkernel->folderMgr(), SIGNAL(folderMoveOrCopyOperationFinished()),
- this, SLOT(slotFolderMoveOrCopyOperationFinished()));
+ connect(kmkernel->folderMgr(), TQT_SIGNAL(folderMoveOrCopyOperationFinished()),
+ this, TQT_SLOT(slotFolderMoveOrCopyOperationFinished()));
- connect(kmkernel->imapFolderMgr(), SIGNAL(changed()),
- this, SLOT(doFolderListChanged()));
+ connect(kmkernel->imapFolderMgr(), TQT_SIGNAL(changed()),
+ this, TQT_SLOT(doFolderListChanged()));
- connect(kmkernel->imapFolderMgr(), SIGNAL(folderRemoved(KMFolder*)),
- this, SLOT(slotFolderRemoved(KMFolder*)));
+ connect(kmkernel->imapFolderMgr(), TQT_SIGNAL(folderRemoved(KMFolder*)),
+ this, TQT_SLOT(slotFolderRemoved(KMFolder*)));
- connect(kmkernel->dimapFolderMgr(), SIGNAL(changed()),
- this, SLOT(doFolderListChanged()));
+ connect(kmkernel->dimapFolderMgr(), TQT_SIGNAL(changed()),
+ this, TQT_SLOT(doFolderListChanged()));
- connect(kmkernel->dimapFolderMgr(), SIGNAL(folderRemoved(KMFolder*)),
- this, SLOT(slotFolderRemoved(KMFolder*)));
+ connect(kmkernel->dimapFolderMgr(), TQT_SIGNAL(folderRemoved(KMFolder*)),
+ this, TQT_SLOT(slotFolderRemoved(KMFolder*)));
- connect(kmkernel->searchFolderMgr(), SIGNAL(changed()),
- this, SLOT(doFolderListChanged()));
+ connect(kmkernel->searchFolderMgr(), TQT_SIGNAL(changed()),
+ this, TQT_SLOT(doFolderListChanged()));
- connect(kmkernel->acctMgr(), SIGNAL(accountRemoved(KMAccount*)),
- this, SLOT(slotAccountRemoved(KMAccount*)));
+ connect(kmkernel->acctMgr(), TQT_SIGNAL(accountRemoved(KMAccount*)),
+ this, TQT_SLOT(slotAccountRemoved(KMAccount*)));
- connect(kmkernel->acctMgr(), SIGNAL(accountAdded(KMAccount*)),
- this, SLOT(slotUnhideLocalInbox()));
+ connect(kmkernel->acctMgr(), TQT_SIGNAL(accountAdded(KMAccount*)),
+ this, TQT_SLOT(slotUnhideLocalInbox()));
- connect(kmkernel->searchFolderMgr(), SIGNAL(folderRemoved(KMFolder*)),
- this, SLOT(slotFolderRemoved(KMFolder*)));
+ connect(kmkernel->searchFolderMgr(), TQT_SIGNAL(folderRemoved(KMFolder*)),
+ this, TQT_SLOT(slotFolderRemoved(KMFolder*)));
- connect( &autoopen_timer, SIGNAL( timeout() ),
- this, SLOT( openFolder() ) );
+ connect( &autoopen_timer, TQT_SIGNAL( timeout() ),
+ this, TQT_SLOT( openFolder() ) );
- connect( this, SIGNAL( contextMenuRequested( QListViewItem*, const QPoint &, int ) ),
- this, SLOT( slotContextMenuRequested( QListViewItem*, const QPoint & ) ) );
+ connect( this, TQT_SIGNAL( contextMenuRequested( TQListViewItem*, const TQPoint &, int ) ),
+ this, TQT_SLOT( slotContextMenuRequested( TQListViewItem*, const TQPoint & ) ) );
- connect( this, SIGNAL( expanded( QListViewItem* ) ),
- this, SLOT( slotFolderExpanded( QListViewItem* ) ) );
+ connect( this, TQT_SIGNAL( expanded( TQListViewItem* ) ),
+ this, TQT_SLOT( slotFolderExpanded( TQListViewItem* ) ) );
- connect( this, SIGNAL( collapsed( QListViewItem* ) ),
- this, SLOT( slotFolderCollapsed( QListViewItem* ) ) );
+ connect( this, TQT_SIGNAL( collapsed( TQListViewItem* ) ),
+ this, TQT_SLOT( slotFolderCollapsed( TQListViewItem* ) ) );
- connect( this, SIGNAL( itemRenamed( QListViewItem*, int, const QString &)),
- this, SLOT( slotRenameFolder( QListViewItem*, int, const QString &)));
+ connect( this, TQT_SIGNAL( itemRenamed( TQListViewItem*, int, const TQString &)),
+ this, TQT_SLOT( slotRenameFolder( TQListViewItem*, int, const TQString &)));
- connect( this, SIGNAL(folderSelected(KMFolder*)), SLOT(updateCopyActions()) );
+ connect( this, TQT_SIGNAL(folderSelected(KMFolder*)), TQT_SLOT(updateCopyActions()) );
}
//-----------------------------------------------------------------------------
@@ -467,7 +467,7 @@ void KMFolderTree::readConfig (void)
{
KConfigGroupSaver saver(conf, "Fonts");
if (!conf->readBoolEntry("defaultFonts",true)) {
- QFont folderFont( KGlobalSettings::generalFont() );
+ TQFont folderFont( KGlobalSettings::generalFont() );
setFont(conf->readFontEntry("folder-font", &folderFont));
}
else
@@ -483,7 +483,7 @@ void KMFolderTree::readConfig (void)
void KMFolderTree::writeConfig()
{
// save the current state of the folders
- for ( QListViewItemIterator it( this ) ; it.current() ; ++it ) {
+ for ( TQListViewItemIterator it( this ) ; it.current() ; ++it ) {
KMFolderTreeItem* fti = static_cast<KMFolderTreeItem*>(it.current());
if (fti)
writeIsListViewItemOpen(fti);
@@ -542,7 +542,7 @@ void KMFolderTree::reload(bool openFolders)
KMFolder* selected = 0;
KMFolder* oldCurrentFolder =
( oldCurrent ? static_cast<KMFolderTreeItem*>(oldCurrent)->folder(): 0 );
- for ( QListViewItemIterator it( this ) ; it.current() ; ++it ) {
+ for ( TQListViewItemIterator it( this ) ; it.current() ; ++it ) {
KMFolderTreeItem * fti = static_cast<KMFolderTreeItem*>(it.current());
writeIsListViewItemOpen( fti );
if ( fti->isSelected() )
@@ -576,52 +576,52 @@ void KMFolderTree::reload(bool openFolders)
if (openFolders)
{
// we open all folders to update the count
- mUpdateIterator = QListViewItemIterator (this);
- QTimer::singleShot( 0, this, SLOT(slotUpdateOneCount()) );
+ mUpdateIterator = TQListViewItemIterator (this);
+ TQTimer::singleShot( 0, this, TQT_SLOT(slotUpdateOneCount()) );
}
- for ( QListViewItemIterator it( this ) ; it.current() ; ++it ) {
+ for ( TQListViewItemIterator it( this ) ; it.current() ; ++it ) {
KMFolderTreeItem * fti = static_cast<KMFolderTreeItem*>(it.current());
if ( !fti || !fti->folder() )
continue;
- disconnect(fti->folder(),SIGNAL(iconsChanged()),
- fti,SLOT(slotIconsChanged()));
- connect(fti->folder(),SIGNAL(iconsChanged()),
- fti,SLOT(slotIconsChanged()));
+ disconnect(fti->folder(),TQT_SIGNAL(iconsChanged()),
+ fti,TQT_SLOT(slotIconsChanged()));
+ connect(fti->folder(),TQT_SIGNAL(iconsChanged()),
+ fti,TQT_SLOT(slotIconsChanged()));
- disconnect(fti->folder(),SIGNAL(nameChanged()),
- fti,SLOT(slotNameChanged()));
- connect(fti->folder(),SIGNAL(nameChanged()),
- fti,SLOT(slotNameChanged()));
+ disconnect(fti->folder(),TQT_SIGNAL(nameChanged()),
+ fti,TQT_SLOT(slotNameChanged()));
+ connect(fti->folder(),TQT_SIGNAL(nameChanged()),
+ fti,TQT_SLOT(slotNameChanged()));
// we want to be noticed of changes to update the unread/total columns
- disconnect(fti->folder(), SIGNAL(msgAdded(KMFolder*,Q_UINT32)),
- this,SLOT(slotUpdateCountsDelayed(KMFolder*)));
- connect(fti->folder(), SIGNAL(msgAdded(KMFolder*,Q_UINT32)),
- this,SLOT(slotUpdateCountsDelayed(KMFolder*)));
+ disconnect(fti->folder(), TQT_SIGNAL(msgAdded(KMFolder*,Q_UINT32)),
+ this,TQT_SLOT(slotUpdateCountsDelayed(KMFolder*)));
+ connect(fti->folder(), TQT_SIGNAL(msgAdded(KMFolder*,Q_UINT32)),
+ this,TQT_SLOT(slotUpdateCountsDelayed(KMFolder*)));
//}
- disconnect(fti->folder(), SIGNAL(numUnreadMsgsChanged(KMFolder*)),
- this,SLOT(slotUpdateCountsDelayed(KMFolder*)));
- connect(fti->folder(), SIGNAL(numUnreadMsgsChanged(KMFolder*)),
- this,SLOT(slotUpdateCountsDelayed(KMFolder*)));
- disconnect(fti->folder(), SIGNAL(msgRemoved(KMFolder*)),
- this,SLOT(slotUpdateCountsDelayed(KMFolder*)));
- connect(fti->folder(), SIGNAL(msgRemoved(KMFolder*)),
- this,SLOT(slotUpdateCountsDelayed(KMFolder*)));
+ disconnect(fti->folder(), TQT_SIGNAL(numUnreadMsgsChanged(KMFolder*)),
+ this,TQT_SLOT(slotUpdateCountsDelayed(KMFolder*)));
+ connect(fti->folder(), TQT_SIGNAL(numUnreadMsgsChanged(KMFolder*)),
+ this,TQT_SLOT(slotUpdateCountsDelayed(KMFolder*)));
+ disconnect(fti->folder(), TQT_SIGNAL(msgRemoved(KMFolder*)),
+ this,TQT_SLOT(slotUpdateCountsDelayed(KMFolder*)));
+ connect(fti->folder(), TQT_SIGNAL(msgRemoved(KMFolder*)),
+ this,TQT_SLOT(slotUpdateCountsDelayed(KMFolder*)));
- disconnect(fti->folder(), SIGNAL(folderSizeChanged( KMFolder* )),
- this,SLOT(slotUpdateCountsDelayed(KMFolder*)));
- connect(fti->folder(), SIGNAL(folderSizeChanged( KMFolder* )),
- this,SLOT(slotUpdateCountsDelayed(KMFolder*)));
+ disconnect(fti->folder(), TQT_SIGNAL(folderSizeChanged( KMFolder* )),
+ this,TQT_SLOT(slotUpdateCountsDelayed(KMFolder*)));
+ connect(fti->folder(), TQT_SIGNAL(folderSizeChanged( KMFolder* )),
+ this,TQT_SLOT(slotUpdateCountsDelayed(KMFolder*)));
- disconnect(fti->folder(), SIGNAL(shortcutChanged(KMFolder*)),
- mMainWidget, SLOT( slotShortcutChanged(KMFolder*)));
- connect(fti->folder(), SIGNAL(shortcutChanged(KMFolder*)),
- mMainWidget, SLOT( slotShortcutChanged(KMFolder*)));
+ disconnect(fti->folder(), TQT_SIGNAL(shortcutChanged(KMFolder*)),
+ mMainWidget, TQT_SLOT( slotShortcutChanged(KMFolder*)));
+ connect(fti->folder(), TQT_SIGNAL(shortcutChanged(KMFolder*)),
+ mMainWidget, TQT_SLOT( slotShortcutChanged(KMFolder*)));
if (!openFolders)
@@ -634,7 +634,7 @@ void KMFolderTree::reload(bool openFolders)
}
ensureVisible(0, top + visibleHeight(), 0, 0);
// if current and selected folder did not change set it again
- for ( QListViewItemIterator it( this ) ; it.current() ; ++it )
+ for ( TQListViewItemIterator it( this ) ; it.current() ; ++it )
{
if ( last &&
static_cast<KMFolderTreeItem*>( it.current() )->folder() == last )
@@ -665,7 +665,7 @@ void KMFolderTree::slotUpdateOneCount()
++mUpdateIterator;
if ( !fti->folder() ) {
// next one please
- QTimer::singleShot( 0, this, SLOT(slotUpdateOneCount()) );
+ TQTimer::singleShot( 0, this, TQT_SLOT(slotUpdateOneCount()) );
return;
}
@@ -676,7 +676,7 @@ void KMFolderTree::slotUpdateOneCount()
// restore previous state
if (!open) fti->folder()->close("updatecount");
- QTimer::singleShot( 0, this, SLOT(slotUpdateOneCount()) );
+ TQTimer::singleShot( 0, this, TQT_SLOT(slotUpdateOneCount()) );
}
//-----------------------------------------------------------------------------
@@ -706,7 +706,7 @@ void KMFolderTree::addDirectory( KMFolderDir *fdir, KMFolderTreeItem* parent )
} else {
// hide local inbox if unused
if ( kmkernel->inboxFolder() == folder && hideLocalInbox() ) {
- connect( kmkernel->inboxFolder(), SIGNAL(msgAdded(KMFolder*,Q_UINT32)), SLOT(slotUnhideLocalInbox()) );
+ connect( kmkernel->inboxFolder(), TQT_SIGNAL(msgAdded(KMFolder*,Q_UINT32)), TQT_SLOT(slotUnhideLocalInbox()) );
continue;
}
@@ -736,10 +736,10 @@ void KMFolderTree::addDirectory( KMFolderDir *fdir, KMFolderTreeItem* parent )
continue;
}
- connect (fti, SIGNAL(iconChanged(KMFolderTreeItem*)),
- this, SIGNAL(iconChanged(KMFolderTreeItem*)));
- connect (fti, SIGNAL(nameChanged(KMFolderTreeItem*)),
- this, SIGNAL(nameChanged(KMFolderTreeItem*)));
+ connect (fti, TQT_SIGNAL(iconChanged(KMFolderTreeItem*)),
+ this, TQT_SIGNAL(iconChanged(KMFolderTreeItem*)));
+ connect (fti, TQT_SIGNAL(nameChanged(KMFolderTreeItem*)),
+ this, TQT_SIGNAL(nameChanged(KMFolderTreeItem*)));
}
// restore last open-state
fti->setOpen( readIsListViewItemOpen(fti) );
@@ -761,7 +761,7 @@ void KMFolderTree::delayedUpdate()
if ( upd ) {
setUpdatesEnabled(false);
- for ( QListViewItemIterator it( this ) ; it.current() ; ++it ) {
+ for ( TQListViewItemIterator it( this ) ; it.current() ; ++it ) {
KMFolderTreeItem* fti = static_cast<KMFolderTreeItem*>(it.current());
if (!fti || !fti->folder())
continue;
@@ -797,7 +797,7 @@ void KMFolderTree::slotFolderMoveOrCopyOperationFinished()
//-----------------------------------------------------------------------------
void KMFolderTree::slotFolderRemoved(KMFolder *aFolder)
{
- QListViewItem *item = indexOfFolder(aFolder);
+ TQListViewItem *item = indexOfFolder(aFolder);
if (!item) return;
KMFolderTreeItem *fti = static_cast<KMFolderTreeItem*> ( item );
if ( oldCurrent == fti )
@@ -807,7 +807,7 @@ void KMFolderTree::slotFolderRemoved(KMFolder *aFolder)
if (!fti || !fti->folder()) return;
if (fti == currentItem())
{
- QListViewItem *qlvi = fti->itemAbove();
+ TQListViewItem *qlvi = fti->itemAbove();
if (!qlvi) qlvi = fti->itemBelow();
doFolderSelected( qlvi );
}
@@ -825,7 +825,7 @@ void KMFolderTree::slotFolderRemoved(KMFolder *aFolder)
// Methods for navigating folders with the keyboard
void KMFolderTree::prepareItem( KMFolderTreeItem* fti )
{
- for ( QListViewItem * parent = fti->parent() ; parent ; parent = parent->parent() )
+ for ( TQListViewItem * parent = fti->parent() ; parent ; parent = parent->parent() )
parent->setOpen( true );
ensureItemVisible( fti );
}
@@ -839,7 +839,7 @@ void KMFolderTree::nextUnreadFolder()
//-----------------------------------------------------------------------------
void KMFolderTree::nextUnreadFolder(bool confirm)
{
- QListViewItemIterator it( currentItem() ? currentItem() : firstChild() );
+ TQListViewItemIterator it( currentItem() ? currentItem() : firstChild() );
if ( currentItem() )
++it; // don't find current item
for ( ; it.current() ; ++it ) {
@@ -905,7 +905,7 @@ bool KMFolderTree::checkUnreadFolder (KMFolderTreeItem* fti, bool confirm)
//-----------------------------------------------------------------------------
void KMFolderTree::prevUnreadFolder()
{
- QListViewItemIterator it( currentItem() ? currentItem() : lastItem() );
+ TQListViewItemIterator it( currentItem() ? currentItem() : lastItem() );
if ( currentItem() )
--it; // don't find current item
for ( ; it.current() ; --it ) {
@@ -917,7 +917,7 @@ void KMFolderTree::prevUnreadFolder()
//-----------------------------------------------------------------------------
void KMFolderTree::incCurrentFolder()
{
- QListViewItemIterator it( currentItem() );
+ TQListViewItemIterator it( currentItem() );
++it;
KMFolderTreeItem* fti = static_cast<KMFolderTreeItem*>(it.current());
if (fti) {
@@ -930,7 +930,7 @@ void KMFolderTree::incCurrentFolder()
//-----------------------------------------------------------------------------
void KMFolderTree::decCurrentFolder()
{
- QListViewItemIterator it( currentItem() );
+ TQListViewItemIterator it( currentItem() );
--it;
KMFolderTreeItem* fti = static_cast<KMFolderTreeItem*>(it.current());
if (fti) {
@@ -960,10 +960,10 @@ KMFolder *KMFolderTree::currentFolder() const
return 0;
}
-QValueList<QGuardedPtr<KMFolder> > KMFolderTree::selectedFolders()
+TQValueList<TQGuardedPtr<KMFolder> > KMFolderTree::selectedFolders()
{
- QValueList<QGuardedPtr<KMFolder> > rv;
- for ( QListViewItemIterator it( this ); it.current(); ++it ) {
+ TQValueList<TQGuardedPtr<KMFolder> > rv;
+ for ( TQListViewItemIterator it( this ); it.current(); ++it ) {
if ( it.current()->isSelected() ) {
KMFolderTreeItem *fti = static_cast<KMFolderTreeItem*>( it.current() );
rv.append( fti->folder() );
@@ -976,7 +976,7 @@ QValueList<QGuardedPtr<KMFolder> > KMFolderTree::selectedFolders()
// When not dragging and dropping a change in the selected item
// indicates the user has changed the active folder emit a signal
// so that the header list and reader window can be udpated.
-void KMFolderTree::doFolderSelected( QListViewItem* qlvi, bool keepSelection )
+void KMFolderTree::doFolderSelected( TQListViewItem* qlvi, bool keepSelection )
{
if (!qlvi) return;
if ( mLastItem && mLastItem == qlvi && (keepSelection || selectedFolders().count() == 1) )
@@ -1011,7 +1011,7 @@ void KMFolderTree::doFolderSelected( QListViewItem* qlvi, bool keepSelection )
}
//-----------------------------------------------------------------------------
-void KMFolderTree::resizeEvent(QResizeEvent* e)
+void KMFolderTree::resizeEvent(TQResizeEvent* e)
{
KConfig* conf = KMKernel::config();
@@ -1023,8 +1023,8 @@ void KMFolderTree::resizeEvent(QResizeEvent* e)
//-----------------------------------------------------------------------------
// show context menu
-void KMFolderTree::slotContextMenuRequested( QListViewItem *lvi,
- const QPoint &p )
+void KMFolderTree::slotContextMenuRequested( TQListViewItem *lvi,
+ const TQPoint &p )
{
if (!lvi)
return;
@@ -1056,13 +1056,13 @@ void KMFolderTree::slotContextMenuRequested( QListViewItem *lvi,
if ((!fti->folder() || (fti->folder()->noContent()
&& !fti->parent())))
{
- QString createChild = i18n("&New Subfolder...");
+ TQString createChild = i18n("&New Subfolder...");
if (!fti->folder()) createChild = i18n("&New Folder...");
if (fti->folder() || (fti->text(0) != i18n("Searches")) && !multiFolder)
folderMenu->insertItem(SmallIconSet("folder_new"),
createChild, this,
- SLOT(addChildFolder()));
+ TQT_SLOT(addChildFolder()));
if (!fti->folder()) {
mMainWidget->action("compact_all_folders")->plug(folderMenu);
@@ -1070,7 +1070,7 @@ void KMFolderTree::slotContextMenuRequested( QListViewItem *lvi,
} else if (fti->folder()->folderType() == KMFolderTypeImap) {
folderMenu->insertItem(SmallIconSet("mail_get"), i18n("Check &Mail"),
this,
- SLOT(slotCheckMail()));
+ TQT_SLOT(slotCheckMail()));
}
} else { // regular folders
@@ -1078,17 +1078,17 @@ void KMFolderTree::slotContextMenuRequested( QListViewItem *lvi,
if ( !fti->folder()->noChildren() && !multiFolder ) {
folderMenu->insertItem(SmallIconSet("folder_new"),
i18n("&New Subfolder..."), this,
- SLOT(addChildFolder()));
+ TQT_SLOT(addChildFolder()));
}
// copy folder
- QPopupMenu *copyMenu = new QPopupMenu( folderMenu );
+ TQPopupMenu *copyMenu = new TQPopupMenu( folderMenu );
folderToPopupMenu( CopyFolder, this, &mMenuToFolder, copyMenu );
folderMenu->insertItem( i18n("&Copy Folder To"), copyMenu );
if ( fti->folder()->isMoveable() )
{
- QPopupMenu *moveMenu = new QPopupMenu( folderMenu );
+ TQPopupMenu *moveMenu = new TQPopupMenu( folderMenu );
folderToPopupMenu( MoveFolder, this, &mMenuToFolder, moveMenu );
folderMenu->insertItem( i18n("&Move Folder To"), moveMenu );
}
@@ -1105,7 +1105,7 @@ void KMFolderTree::slotContextMenuRequested( QListViewItem *lvi,
if ( GlobalSettings::self()->enableFavoriteFolderView() ) {
folderMenu->insertItem( SmallIconSet("bookmark_add"), i18n("Add to Favorite Folders"),
- this, SLOT(slotAddToFavorites()) );
+ this, TQT_SLOT(slotAddToFavorites()) );
}
folderMenu->insertSeparator();
@@ -1124,24 +1124,24 @@ void KMFolderTree::slotContextMenuRequested( QListViewItem *lvi,
{
folderMenu->insertItem(SmallIconSet("bookmark_folder"),
i18n("Subscription..."), mMainWidget,
- SLOT(slotSubscriptionDialog()));
+ TQT_SLOT(slotSubscriptionDialog()));
folderMenu->insertItem(SmallIcon("bookmark_folder"),
i18n("Local Subscription..."), mMainWidget,
- SLOT(slotLocalSubscriptionDialog()));
+ TQT_SLOT(slotLocalSubscriptionDialog()));
if (!fti->folder()->noContent())
{
mMainWidget->action("refresh_folder")->plug(folderMenu);
if ( fti->folder()->folderType() == KMFolderTypeImap && !multiFolder ) {
folderMenu->insertItem(SmallIconSet("reload"), i18n("Refresh Folder List"), this,
- SLOT(slotResetFolderList()));
+ TQT_SLOT(slotResetFolderList()));
}
}
if ( fti->folder()->folderType() == KMFolderTypeCachedImap && !multiFolder ) {
KMFolderCachedImap * folder = static_cast<KMFolderCachedImap*>( fti->folder()->storage() );
folderMenu->insertItem( SmallIconSet("wizard"),
i18n("&Troubleshoot IMAP Cache..."),
- folder, SLOT(slotTroubleshoot()) );
+ folder, TQT_SLOT(slotTroubleshoot()) );
}
folderMenu->insertSeparator();
}
@@ -1155,11 +1155,11 @@ void KMFolderTree::slotContextMenuRequested( QListViewItem *lvi,
folderMenu->insertItem(SmallIconSet("configure_shortcuts"),
i18n("&Assign Shortcut..."),
fti,
- SLOT(assignShortcut()));
+ TQT_SLOT(assignShortcut()));
if ( !fti->folder()->noContent() ) {
folderMenu->insertItem( i18n("Expire..."), fti,
- SLOT( slotShowExpiryProperties() ) );
+ TQT_SLOT( slotShowExpiryProperties() ) );
}
mMainWidget->action("modify")->plug(folderMenu);
}
@@ -1174,16 +1174,16 @@ void KMFolderTree::slotContextMenuRequested( QListViewItem *lvi,
}
//-----------------------------------------------------------------------------
-void KMFolderTree::contentsMousePressEvent(QMouseEvent * e)
+void KMFolderTree::contentsMousePressEvent(TQMouseEvent * e)
{
// KFolderTree messes around with the selection mode
KListView::contentsMousePressEvent( e );
}
// If middle button and folder holds mailing-list, create a message to that list
-void KMFolderTree::contentsMouseReleaseEvent(QMouseEvent* me)
+void KMFolderTree::contentsMouseReleaseEvent(TQMouseEvent* me)
{
- QListViewItem *lvi = currentItem(); // Needed for when branches are clicked on
+ TQListViewItem *lvi = currentItem(); // Needed for when branches are clicked on
ButtonState btn = me->button();
doFolderSelected(lvi, true);
@@ -1228,7 +1228,7 @@ static bool folderHasCreateRights( const KMFolder *folder )
//-----------------------------------------------------------------------------
// Create a subfolder.
// Requires creating the appropriate subdirectory and show a dialog
-void KMFolderTree::addChildFolder( KMFolder *folder, QWidget * parent )
+void KMFolderTree::addChildFolder( KMFolder *folder, TQWidget * parent )
{
KMFolder *aFolder = folder;
if ( !aFolder ) {
@@ -1242,7 +1242,7 @@ void KMFolderTree::addChildFolder( KMFolder *folder, QWidget * parent )
return;
if ( !folderHasCreateRights( aFolder ) ) {
// FIXME: change this message to "Cannot create folder under ..." or similar
- const QString message = i18n( "<qt>Cannot create folder <b>%1</b> because of insufficient "
+ const TQString message = i18n( "<qt>Cannot create folder <b>%1</b> because of insufficient "
"permissions on the server. If you think you should be able to create "
"subfolders here, ask your administrator to grant you rights to do so."
"</qt> " ).arg(aFolder->label());
@@ -1265,7 +1265,7 @@ void KMFolderTree::addChildFolder( KMFolder *folder, QWidget * parent )
new KMFolderDialog(0, dir, this, i18n("Create Subfolder") );
if (d->exec()) { // fti may be deleted here
- QListViewItem *qlvi = indexOfFolder( aFolder );
+ TQListViewItem *qlvi = indexOfFolder( aFolder );
if (qlvi) {
qlvi->setOpen(true);
blockSignals( true );
@@ -1288,7 +1288,7 @@ bool KMFolderTree::readIsListViewItemOpen(KMFolderTreeItem *fti)
{
KConfig* config = KMKernel::config();
KMFolder *folder = fti->folder();
- QString name;
+ TQString name;
if (folder)
{
name = "Folder-" + folder->idString();
@@ -1314,7 +1314,7 @@ void KMFolderTree::writeIsListViewItemOpen(KMFolderTreeItem *fti)
{
KConfig* config = KMKernel::config();
KMFolder *folder = fti->folder();
- QString name;
+ TQString name;
if (folder && !folder->idString().isEmpty())
{
name = "Folder-" + folder->idString();
@@ -1340,19 +1340,19 @@ void KMFolderTree::cleanupConfigFile()
if ( childCount() == 0 )
return; // just in case reload wasn't called before
KConfig* config = KMKernel::config();
- QStringList existingFolders;
- QListViewItemIterator fldIt(this);
- QMap<QString,bool> folderMap;
+ TQStringList existingFolders;
+ TQListViewItemIterator fldIt(this);
+ TQMap<TQString,bool> folderMap;
KMFolderTreeItem *fti;
- for (QListViewItemIterator fldIt(this); fldIt.current(); fldIt++)
+ for (TQListViewItemIterator fldIt(this); fldIt.current(); fldIt++)
{
fti = static_cast<KMFolderTreeItem*>(fldIt.current());
if (fti && fti->folder())
folderMap.insert(fti->folder()->idString(), true);
}
- QStringList groupList = config->groupList();
- QString name;
- for (QStringList::Iterator grpIt = groupList.begin();
+ TQStringList groupList = config->groupList();
+ TQString name;
+ for (TQStringList::Iterator grpIt = groupList.begin();
grpIt != groupList.end(); grpIt++)
{
if ((*grpIt).left(7) != "Folder-") continue;
@@ -1391,19 +1391,19 @@ void KMFolderTree::openFolder()
static const int autoopenTime = 750;
//-----------------------------------------------------------------------------
-void KMFolderTree::contentsDragEnterEvent( QDragEnterEvent *e )
+void KMFolderTree::contentsDragEnterEvent( TQDragEnterEvent *e )
{
oldCurrent = 0;
oldSelected = 0;
oldCurrent = currentItem();
- for ( QListViewItemIterator it( this ) ; it.current() ; ++it )
+ for ( TQListViewItemIterator it( this ) ; it.current() ; ++it )
if ( it.current()->isSelected() )
oldSelected = it.current();
setFocus();
- QListViewItem *i = itemAt( contentsToViewport(e->pos()) );
+ TQListViewItem *i = itemAt( contentsToViewport(e->pos()) );
if ( i ) {
dropItem = i;
autoopen_timer.start( autoopenTime );
@@ -1415,10 +1415,10 @@ void KMFolderTree::contentsDragEnterEvent( QDragEnterEvent *e )
}
//-----------------------------------------------------------------------------
-void KMFolderTree::contentsDragMoveEvent( QDragMoveEvent *e )
+void KMFolderTree::contentsDragMoveEvent( TQDragMoveEvent *e )
{
- QPoint vp = contentsToViewport(e->pos());
- QListViewItem *i = itemAt( vp );
+ TQPoint vp = contentsToViewport(e->pos());
+ TQListViewItem *i = itemAt( vp );
if ( i ) {
bool dragAccepted = acceptDrag( e );
if ( dragAccepted ) {
@@ -1435,12 +1435,12 @@ void KMFolderTree::contentsDragMoveEvent( QDragMoveEvent *e )
e->accept( itemRect(i) );
switch ( e->action() ) {
- case QDropEvent::Copy:
+ case TQDropEvent::Copy:
break;
- case QDropEvent::Move:
+ case TQDropEvent::Move:
e->acceptAction();
break;
- case QDropEvent::Link:
+ case TQDropEvent::Link:
e->acceptAction();
break;
default:
@@ -1457,7 +1457,7 @@ void KMFolderTree::contentsDragMoveEvent( QDragMoveEvent *e )
}
//-----------------------------------------------------------------------------
-void KMFolderTree::contentsDragLeaveEvent( QDragLeaveEvent * )
+void KMFolderTree::contentsDragLeaveEvent( TQDragLeaveEvent * )
{
if (!oldCurrent) return;
@@ -1470,14 +1470,14 @@ void KMFolderTree::contentsDragLeaveEvent( QDragLeaveEvent * )
}
//-----------------------------------------------------------------------------
-void KMFolderTree::contentsDropEvent( QDropEvent *e )
+void KMFolderTree::contentsDropEvent( TQDropEvent *e )
{
autoopen_timer.stop();
- QListViewItem *item = itemAt( contentsToViewport(e->pos()) );
+ TQListViewItem *item = itemAt( contentsToViewport(e->pos()) );
KMFolderTreeItem *fti = static_cast<KMFolderTreeItem*>(item);
// Check that each pointer is not null
- for ( QValueList<QGuardedPtr<KMFolder> >::ConstIterator it = mCopySourceFolders.constBegin();
+ for ( TQValueList<TQGuardedPtr<KMFolder> >::ConstIterator it = mCopySourceFolders.constBegin();
it != mCopySourceFolders.constEnd(); ++it ) {
if ( ! (*it) ) {
fti = 0;
@@ -1495,7 +1495,7 @@ void KMFolderTree::contentsDropEvent( QDropEvent *e )
if ( e->provides("application/x-qlistviewitem") ) {
int action = dndMode( true /* always ask */ );
if ( (action == DRAG_COPY || action == DRAG_MOVE) && !mCopySourceFolders.isEmpty() ) {
- for ( QValueList<QGuardedPtr<KMFolder> >::ConstIterator it = mCopySourceFolders.constBegin();
+ for ( TQValueList<TQGuardedPtr<KMFolder> >::ConstIterator it = mCopySourceFolders.constBegin();
it != mCopySourceFolders.constEnd(); ++it ) {
if ( ! (*it)->isMoveable() )
action = DRAG_COPY;
@@ -1536,7 +1536,7 @@ void KMFolderTree::contentsDropEvent( QDropEvent *e )
}
//-----------------------------------------------------------------------------
-void KMFolderTree::slotFolderExpanded( QListViewItem * item )
+void KMFolderTree::slotFolderExpanded( TQListViewItem * item )
{
KMFolderTreeItem *fti = static_cast<KMFolderTreeItem*>(item);
if ( !fti || !fti->folder() || !fti->folder()->storage() ) return;
@@ -1553,7 +1553,7 @@ void KMFolderTree::slotFolderExpanded( QListViewItem * item )
if ( folder->getSubfolderState() == KMFolderImap::imapNoInformation )
{
// check if all parents are expanded
- QListViewItem *parent = item->parent();
+ TQListViewItem *parent = item->parent();
while ( parent )
{
if ( !parent->isOpen() )
@@ -1571,7 +1571,7 @@ void KMFolderTree::slotFolderExpanded( QListViewItem * item )
//-----------------------------------------------------------------------------
-void KMFolderTree::slotFolderCollapsed( QListViewItem * item )
+void KMFolderTree::slotFolderCollapsed( TQListViewItem * item )
{
slotResetFolderList( item, false );
KMFolderTreeItem *fti = static_cast<KMFolderTreeItem*>(item);
@@ -1581,8 +1581,8 @@ void KMFolderTree::slotFolderCollapsed( QListViewItem * item )
}
//-----------------------------------------------------------------------------
-void KMFolderTree::slotRenameFolder(QListViewItem *item, int col,
- const QString &text)
+void KMFolderTree::slotRenameFolder(TQListViewItem *item, int col,
+ const TQString &text)
{
KMFolderTreeItem *fti = static_cast<KMFolderTreeItem*>(item);
@@ -1590,7 +1590,7 @@ void KMFolderTree::slotRenameFolder(QListViewItem *item, int col,
if ((!fti) || (fti && fti->folder() && col != 0 && !currentFolder()->child()))
return;
- QString fldName, oldFldName;
+ TQString fldName, oldFldName;
oldFldName = fti->name(0);
@@ -1600,7 +1600,7 @@ void KMFolderTree::slotRenameFolder(QListViewItem *item, int col,
fldName = oldFldName;
fldName.replace("/", "");
- fldName.replace(QRegExp("^\\."), "");
+ fldName.replace(TQRegExp("^\\."), "");
if (fldName.isEmpty())
fldName = i18n("unnamed");
@@ -1627,7 +1627,7 @@ void KMFolderTree::slotUpdateCountTimeout()
{
// kdDebug(5006) << "KMFolderTree::slotUpdateCountTimeout()" << endl;
- QMap<QString,KMFolder*>::iterator it;
+ TQMap<TQString,KMFolder*>::iterator it;
for ( it= mFolderToUpdateCount.begin();
it!=mFolderToUpdateCount.end();
++it )
@@ -1715,13 +1715,13 @@ void KMFolderTree::slotToggleSizeColumn()
//-----------------------------------------------------------------------------
-bool KMFolderTree::eventFilter( QObject *o, QEvent *e )
+bool KMFolderTree::eventFilter( TQObject *o, TQEvent *e )
{
- if ( e->type() == QEvent::MouseButtonPress &&
- static_cast<QMouseEvent*>(e)->button() == RightButton &&
- o->isA("QHeader") )
+ if ( e->type() == TQEvent::MouseButtonPress &&
+ static_cast<TQMouseEvent*>(e)->button() == RightButton &&
+ o->isA("TQHeader") )
{
- mPopup->popup( static_cast<QMouseEvent*>(e)->globalPos() );
+ mPopup->popup( static_cast<TQMouseEvent*>(e)->globalPos() );
return true;
}
return KFolderTree::eventFilter(o, e);
@@ -1752,8 +1752,8 @@ void KMFolderTree::slotNewMessageToMailingList()
}
//-----------------------------------------------------------------------------
-void KMFolderTree::createFolderList( QStringList *str,
- QValueList<QGuardedPtr<KMFolder> > *folders,
+void KMFolderTree::createFolderList( TQStringList *str,
+ TQValueList<TQGuardedPtr<KMFolder> > *folders,
bool localFolders,
bool imapFolders,
bool dimapFolders,
@@ -1761,7 +1761,7 @@ void KMFolderTree::createFolderList( QStringList *str,
bool includeNoContent,
bool includeNoChildren )
{
- for ( QListViewItemIterator it( this ) ; it.current() ; ++it )
+ for ( TQListViewItemIterator it( this ) ; it.current() ; ++it )
{
KMFolderTreeItem * fti = static_cast<KMFolderTreeItem*>(it.current());
if (!fti || !fti->folder()) continue;
@@ -1774,7 +1774,7 @@ void KMFolderTree::createFolderList( QStringList *str,
if (!searchFolders && folder->folderType() == KMFolderTypeSearch) continue;
if (!includeNoContent && folder->noContent()) continue;
if (!includeNoChildren && folder->noChildren()) continue;
- QString prefix;
+ TQString prefix;
prefix.fill( ' ', 2 * fti->depth() );
str->append(prefix + fti->text(0));
folders->append(fti->folder());
@@ -1782,7 +1782,7 @@ void KMFolderTree::createFolderList( QStringList *str,
}
//-----------------------------------------------------------------------------
-void KMFolderTree::slotResetFolderList( QListViewItem* item, bool startList )
+void KMFolderTree::slotResetFolderList( TQListViewItem* item, bool startList )
{
if ( !item )
item = currentItem();
@@ -1802,7 +1802,7 @@ void KMFolderTree::slotResetFolderList( QListViewItem* item, bool startList )
void KMFolderTree::showFolder( KMFolder* folder )
{
if ( !folder ) return;
- QListViewItem* item = indexOfFolder( folder );
+ TQListViewItem* item = indexOfFolder( folder );
if ( item )
{
doFolderSelected( item );
@@ -1811,12 +1811,12 @@ void KMFolderTree::showFolder( KMFolder* folder )
}
//-----------------------------------------------------------------------------
-void KMFolderTree::folderToPopupMenu( MenuAction action, QObject *receiver,
- KMMenuToFolder *aMenuToFolder, QPopupMenu *menu, QListViewItem *item )
+void KMFolderTree::folderToPopupMenu( MenuAction action, TQObject *receiver,
+ KMMenuToFolder *aMenuToFolder, TQPopupMenu *menu, TQListViewItem *item )
{
while ( menu->count() )
{
- QPopupMenu *popup = menu->findItem( menu->idAt( 0 ) )->popup();
+ TQPopupMenu *popup = menu->findItem( menu->idAt( 0 ) )->popup();
if ( popup )
delete popup;
else
@@ -1825,15 +1825,15 @@ void KMFolderTree::folderToPopupMenu( MenuAction action, QObject *receiver,
// connect the signals
if ( action == MoveMessage || action == MoveFolder )
{
- disconnect( menu, SIGNAL(activated(int)), receiver,
- SLOT(moveSelectedToFolder(int)) );
- connect( menu, SIGNAL(activated(int)), receiver,
- SLOT(moveSelectedToFolder(int)) );
+ disconnect( menu, TQT_SIGNAL(activated(int)), receiver,
+ TQT_SLOT(moveSelectedToFolder(int)) );
+ connect( menu, TQT_SIGNAL(activated(int)), receiver,
+ TQT_SLOT(moveSelectedToFolder(int)) );
} else {
- disconnect( menu, SIGNAL(activated(int)), receiver,
- SLOT(copySelectedToFolder(int)) );
- connect( menu, SIGNAL(activated(int)), receiver,
- SLOT(copySelectedToFolder(int)) );
+ disconnect( menu, TQT_SIGNAL(activated(int)), receiver,
+ TQT_SLOT(copySelectedToFolder(int)) );
+ connect( menu, TQT_SIGNAL(activated(int)), receiver,
+ TQT_SLOT(copySelectedToFolder(int)) );
}
if ( !item ) {
item = firstChild();
@@ -1861,12 +1861,12 @@ void KMFolderTree::folderToPopupMenu( MenuAction action, QObject *receiver,
item = item->nextSibling();
continue;
}
- QString label = fti->text( 0 );
+ TQString label = fti->text( 0 );
label.replace( "&","&&" );
if ( fti->firstChild() )
{
// new level
- QPopupMenu* popup = new QPopupMenu( menu, "subMenu" );
+ TQPopupMenu* popup = new TQPopupMenu( menu, "subMenu" );
folderToPopupMenu( action, receiver, aMenuToFolder, popup, fti->firstChild() );
bool subMenu = false;
if ( ( action == MoveMessage || action == CopyMessage ) &&
@@ -1876,7 +1876,7 @@ void KMFolderTree::folderToPopupMenu( MenuAction action, QObject *receiver,
&& ( !fti->folder() || ( fti->folder() && !fti->folder()->noChildren() ) ) )
subMenu = true;
- QString sourceFolderName;
+ TQString sourceFolderName;
KMFolderTreeItem* srcItem = dynamic_cast<KMFolderTreeItem*>( currentItem() );
if ( srcItem )
sourceFolderName = srcItem->text( 0 );
@@ -1928,7 +1928,7 @@ void KMFolderTree::copySelectedToFolder( int menuId )
}
//-----------------------------------------------------------------------------
-void KMFolderTree::moveOrCopyFolder( QValueList<QGuardedPtr<KMFolder> > sources, KMFolder* destination, bool move )
+void KMFolderTree::moveOrCopyFolder( TQValueList<TQGuardedPtr<KMFolder> > sources, KMFolder* destination, bool move )
{
kdDebug(5006) << k_funcinfo << "source: " << sources << " destination: " << destination << " move: " << move << endl;
@@ -1939,14 +1939,14 @@ void KMFolderTree::moveOrCopyFolder( QValueList<QGuardedPtr<KMFolder> > sources,
if ( destination )
parent = destination->createChildFolder();
- QStringList sourceFolderNames;
+ TQStringList sourceFolderNames;
// check if move/copy is possible at all
- for ( QValueList<QGuardedPtr<KMFolder> >::ConstIterator it = sources.constBegin(); it != sources.constEnd(); ++it ) {
+ for ( TQValueList<TQGuardedPtr<KMFolder> >::ConstIterator it = sources.constBegin(); it != sources.constEnd(); ++it ) {
KMFolder* source = *it;
// check if folder with same name already exits
- QString sourceFolderName;
+ TQString sourceFolderName;
if ( source )
sourceFolderName = source->label();
@@ -1969,7 +1969,7 @@ void KMFolderTree::moveOrCopyFolder( QValueList<QGuardedPtr<KMFolder> > sources,
f = f->parent()->owner();
}
- QString message =
+ TQString message =
i18n( "<qt>Cannot move or copy folder <b>%1</b> into a subfolder below itself.</qt>" ).
arg( sourceFolderName );
KMFolderDir* folderDir = parent;
@@ -2002,11 +2002,11 @@ void KMFolderTree::moveOrCopyFolder( QValueList<QGuardedPtr<KMFolder> > sources,
}
// check if the source folders are independent of each other
- for ( QValueList<QGuardedPtr<KMFolder> >::ConstIterator it = sources.constBegin(); move && it != sources.constEnd(); ++it ) {
+ for ( TQValueList<TQGuardedPtr<KMFolder> >::ConstIterator it = sources.constBegin(); move && it != sources.constEnd(); ++it ) {
KMFolderDir *parentDir = (*it)->child();
if ( !parentDir )
continue;
- for ( QValueList<QGuardedPtr<KMFolder> >::ConstIterator it2 = sources.constBegin(); it2 != sources.constEnd(); ++it2 ) {
+ for ( TQValueList<TQGuardedPtr<KMFolder> >::ConstIterator it2 = sources.constBegin(); it2 != sources.constEnd(); ++it2 ) {
if ( *it == *it2 )
continue;
KMFolderDir *childDir = (*it2)->parent();
@@ -2028,7 +2028,7 @@ void KMFolderTree::moveOrCopyFolder( QValueList<QGuardedPtr<KMFolder> > sources,
}
// do the actual move/copy
- for ( QValueList<QGuardedPtr<KMFolder> >::ConstIterator it = sources.constBegin(); it != sources.constEnd(); ++it ) {
+ for ( TQValueList<TQGuardedPtr<KMFolder> >::ConstIterator it = sources.constBegin(); it != sources.constEnd(); ++it ) {
KMFolder* source = *it;
if ( move ) {
kdDebug(5006) << "move folder " << (source ? source->label(): "Unknown") << " to "
@@ -2040,15 +2040,15 @@ void KMFolderTree::moveOrCopyFolder( QValueList<QGuardedPtr<KMFolder> > sources,
}
}
-QDragObject * KMFolderTree::dragObject()
+TQDragObject * KMFolderTree::dragObject()
{
KMFolderTreeItem *item = static_cast<KMFolderTreeItem*>
- (itemAt(viewport()->mapFromGlobal(QCursor::pos())));
+ (itemAt(viewport()->mapFromGlobal(TQCursor::pos())));
if ( !item || !item->parent() || !item->folder() ) // top-level items or something invalid
return 0;
mCopySourceFolders = selectedFolders();
- QDragObject *drag = KFolderTree::dragObject();
+ TQDragObject *drag = KFolderTree::dragObject();
if ( drag )
drag->setPixmap( SmallIcon("folder") );
return drag;
@@ -2110,7 +2110,7 @@ void KMFolderTree::slotAddToFavorites()
{
KMail::FavoriteFolderView *favView = mMainWidget->favoriteFolderView();
assert( favView );
- for ( QListViewItemIterator it( this ); it.current(); ++it ) {
+ for ( TQListViewItemIterator it( this ); it.current(); ++it ) {
if ( it.current()->isSelected() )
favView->addFolder( static_cast<KMFolderTreeItem*>( it.current() ) );
}
@@ -2118,8 +2118,8 @@ void KMFolderTree::slotAddToFavorites()
void KMFolderTree::slotUnhideLocalInbox()
{
- disconnect( kmkernel->inboxFolder(), SIGNAL(msgAdded(KMFolder*,Q_UINT32)),
- this, SLOT(slotUnhideLocalInbox()) );
+ disconnect( kmkernel->inboxFolder(), TQT_SIGNAL(msgAdded(KMFolder*,Q_UINT32)),
+ this, TQT_SLOT(slotUnhideLocalInbox()) );
reload();
}
diff --git a/kmail/kmfoldertree.h b/kmail/kmfoldertree.h
index e24f939b3..3db70d3bf 100644
--- a/kmail/kmfoldertree.h
+++ b/kmail/kmfoldertree.h
@@ -23,10 +23,10 @@
#include <klocale.h>
#include <kdepimmacros.h>
-#include <qguardedptr.h>
-#include <qwidget.h>
-#include <qtimer.h>
-#include <qheader.h>
+#include <tqguardedptr.h>
+#include <tqwidget.h>
+#include <tqtimer.h>
+#include <tqheader.h>
class QDropEvent;
class QPixmap;
@@ -39,42 +39,42 @@ class KMFolderImap;
class KMFolderTree;
class KMAccount;
// duplication from kmcommands.h, to avoid the include
-typedef QMap<int,KMFolder*> KMMenuToFolder;
+typedef TQMap<int,KMFolder*> KMMenuToFolder;
template <typename T> class QGuardedPtr;
-class KDE_EXPORT KMFolderTreeItem : public QObject, public KFolderTreeItem
+class KDE_EXPORT KMFolderTreeItem : public TQObject, public KFolderTreeItem
{
Q_OBJECT
public:
/** Construct a root item _without_ folder */
- KMFolderTreeItem( KFolderTree *parent, const QString & name,
+ KMFolderTreeItem( KFolderTree *parent, const TQString & name,
KFolderTreeItem::Protocol protocol=KFolderTreeItem::NONE );
/** Construct a root item _with_ folder */
- KMFolderTreeItem( KFolderTree *parent, const QString & name,
+ KMFolderTreeItem( KFolderTree *parent, const TQString & name,
KMFolder* folder );
/** Construct a child item */
- KMFolderTreeItem( KFolderTreeItem* parent, const QString & name,
+ KMFolderTreeItem( KFolderTreeItem* parent, const TQString & name,
KMFolder* folder );
virtual ~KMFolderTreeItem();
- QPixmap normalIcon( int size ) const;
- QPixmap unreadIcon( int size ) const;
+ TQPixmap normalIcon( int size ) const;
+ TQPixmap unreadIcon( int size ) const;
void setNeedsRepaint( bool value ) { mNeedsRepaint = value; }
bool needsRepaint() const { return mNeedsRepaint; }
/** associated folder */
KMFolder* folder() const { return mFolder; }
- QListViewItem* parent() const { return KFolderTreeItem::parent(); }
+ TQListViewItem* parent() const { return KFolderTreeItem::parent(); }
/** Adjust the unread count from the folder and update the
* pixmaps accordingly. */
void adjustUnreadCount( int newUnreadCount );
/** dnd */
- virtual bool acceptDrag(QDropEvent* e) const;
+ virtual bool acceptDrag(TQDropEvent* e) const;
signals:
/** Our icon changed */
@@ -109,7 +109,7 @@ class KMFolderTree : public KMail::FolderTreeBase
Q_OBJECT
public:
- KMFolderTree( KMMainWidget *mainWidget, QWidget *parent=0,
+ KMFolderTree( KMMainWidget *mainWidget, TQWidget *parent=0,
const char *name=0 );
/** Save config options */
@@ -122,8 +122,8 @@ public:
virtual void addDirectory( KMFolderDir *fdir, KMFolderTreeItem* parent );
/** create a folderlist */
- void createFolderList( QStringList *str,
- QValueList<QGuardedPtr<KMFolder> > *folders,
+ void createFolderList( TQStringList *str,
+ TQValueList<TQGuardedPtr<KMFolder> > *folders,
bool localFolders=true,
bool imapFolders=true,
bool dimapFolders=true,
@@ -145,7 +145,7 @@ public:
KMFolder *currentFolder() const;
- QValueList<QGuardedPtr<KMFolder> > selectedFolders();
+ TQValueList<TQGuardedPtr<KMFolder> > selectedFolders();
enum ColumnMode {unread=15, total=16, foldersize=17};
@@ -168,8 +168,8 @@ public:
};
/** Generate a popup menu that contains all folders that can have content */
- void folderToPopupMenu( MenuAction action, QObject *receiver, KMMenuToFolder *,
- QPopupMenu *menu, QListViewItem *start = 0 );
+ void folderToPopupMenu( MenuAction action, TQObject *receiver, KMMenuToFolder *,
+ TQPopupMenu *menu, TQListViewItem *start = 0 );
signals:
/** The selected folder has changed */
@@ -210,17 +210,17 @@ public slots:
void slotAccountRemoved(KMAccount*);
/** Select the item and switch to the folder */
- void doFolderSelected(QListViewItem *qlvi, bool keepSelection = false);
+ void doFolderSelected(TQListViewItem *qlvi, bool keepSelection = false);
/**
* Reset current folder and all childs
* If no item is given we take the current one
* If startListing is true a folder listing is started
*/
- void slotResetFolderList( QListViewItem* item = 0, bool startList = true );
+ void slotResetFolderList( TQListViewItem* item = 0, bool startList = true );
/** Create a child folder */
- void addChildFolder( KMFolder *folder = 0, QWidget * parent = 0 );
+ void addChildFolder( KMFolder *folder = 0, TQWidget * parent = 0 );
/** Copies the currently selected folder. */
void copyFolder();
@@ -249,13 +249,13 @@ protected slots:
void openFolder();
/** Expand an IMAP folder */
- void slotFolderExpanded( QListViewItem * item );
+ void slotFolderExpanded( TQListViewItem * item );
/** Tell the folder to refresh the contents on the next expansion */
- void slotFolderCollapsed( QListViewItem * item );
+ void slotFolderCollapsed( TQListViewItem * item );
/** Check if the new name is valid and confirm the new name */
- void slotRenameFolder( QListViewItem * item, int col, const QString& text);
+ void slotRenameFolder( TQListViewItem * item, int col, const TQString& text);
/** Update the total and unread columns but delayed */
void slotUpdateCountsDelayed(KMFolder * folder);
@@ -267,7 +267,7 @@ protected slots:
void slotToggleTotalColumn();
void slotToggleSizeColumn();
- void slotContextMenuRequested( QListViewItem *, const QPoint & );
+ void slotContextMenuRequested( TQListViewItem *, const TQPoint & );
/** Fires a new-mail-check of the account that is accociated with currentItem */
void slotCheckMail();
@@ -283,35 +283,35 @@ protected slots:
void updateCopyActions();
protected:
- virtual void contentsMousePressEvent( QMouseEvent *e );
- virtual void contentsMouseReleaseEvent(QMouseEvent* me);
+ virtual void contentsMousePressEvent( TQMouseEvent *e );
+ virtual void contentsMouseReleaseEvent(TQMouseEvent* me);
/** Updates the number of unread messages for all folders */
virtual void updateUnreadAll( );
- virtual void resizeEvent(QResizeEvent*);
+ virtual void resizeEvent(TQResizeEvent*);
/** Read/Save open/close state indicator for an item in folderTree list view */
bool readIsListViewItemOpen(KMFolderTreeItem *fti);
void writeIsListViewItemOpen(KMFolderTreeItem *fti);
- QTimer mUpdateTimer;
+ TQTimer mUpdateTimer;
/** Drag and drop methods */
- void contentsDragEnterEvent( QDragEnterEvent *e );
- void contentsDragMoveEvent( QDragMoveEvent *e );
- void contentsDragLeaveEvent( QDragLeaveEvent *e );
- void contentsDropEvent( QDropEvent *e );
- virtual QDragObject* dragObject();
+ void contentsDragEnterEvent( TQDragEnterEvent *e );
+ void contentsDragMoveEvent( TQDragMoveEvent *e );
+ void contentsDragLeaveEvent( TQDragLeaveEvent *e );
+ void contentsDropEvent( TQDropEvent *e );
+ virtual TQDragObject* dragObject();
/** Drag and drop variables */
- QListViewItem *oldCurrent, *oldSelected;
- QListViewItem *dropItem;
+ TQListViewItem *oldCurrent, *oldSelected;
+ TQListViewItem *dropItem;
KMFolderTreeItem *mLastItem;
- QTimer autoopen_timer;
+ TQTimer autoopen_timer;
// filter some rmb-events
- bool eventFilter(QObject*, QEvent*);
+ bool eventFilter(TQObject*, TQEvent*);
/** open ancestors and ensure item is visible */
void prepareItem( KMFolderTreeItem* );
@@ -320,7 +320,7 @@ protected:
void connectSignals();
/** Move or copy the folder @p source to @p destination. */
- void moveOrCopyFolder( QValueList<QGuardedPtr<KMFolder> > sources, KMFolder* destination, bool move=false );
+ void moveOrCopyFolder( TQValueList<TQGuardedPtr<KMFolder> > sources, KMFolder* destination, bool move=false );
private slots:
void slotAddToFavorites();
@@ -328,7 +328,7 @@ private slots:
private:
/** total column */
- QListViewItemIterator mUpdateIterator;
+ TQListViewItemIterator mUpdateIterator;
/** popup for unread/total */
KPopupMenu* mPopup;
@@ -337,11 +337,11 @@ private:
int mSizePop;
bool mReloading;
- QValueList<QGuardedPtr<KMFolder> > mCopySourceFolders;
+ TQValueList<TQGuardedPtr<KMFolder> > mCopySourceFolders;
bool mCutFolder;
- QTimer *mUpdateCountTimer;
- QMap<QString,KMFolder*> mFolderToUpdateCount;
+ TQTimer *mUpdateCountTimer;
+ TQMap<TQString,KMFolder*> mFolderToUpdateCount;
/** Map menu id into a folder */
KMMenuToFolder mMenuToFolder;
diff --git a/kmail/kmgroupware.cpp b/kmail/kmgroupware.cpp
index ecc960eef..08afc3316 100644
--- a/kmail/kmgroupware.cpp
+++ b/kmail/kmgroupware.cpp
@@ -43,7 +43,7 @@
#include <assert.h>
-bool vPartFoundAndDecoded( KMMessage* msg, QString& s )
+bool vPartFoundAndDecoded( KMMessage* msg, TQString& s )
{
assert( msg );
@@ -52,7 +52,7 @@ bool vPartFoundAndDecoded( KMMessage* msg, QString& s )
( DwMime::kTypeApplication == msg->type() &&
DwMime::kSubtypeOctetStream == msg->subtype() ) )
{
- s = QString::fromUtf8( msg->bodyDecoded() );
+ s = TQString::fromUtf8( msg->bodyDecoded() );
return true;
} else if( DwMime::kTypeMultipart == msg->type() &&
(DwMime::kSubtypeMixed == msg->subtype() ) ||
diff --git a/kmail/kmgroupware.h b/kmail/kmgroupware.h
index 7296d4b3e..0c815b4c3 100644
--- a/kmail/kmgroupware.h
+++ b/kmail/kmgroupware.h
@@ -37,10 +37,10 @@
#ifndef KMGROUPWARE_H
#define KMGROUPWARE_H
-#include <qstring.h>
+#include <tqstring.h>
class KMMessage;
-bool vPartFoundAndDecoded( KMMessage* msg, QString& s );
+bool vPartFoundAndDecoded( KMMessage* msg, TQString& s );
#endif /* KMGROUPWARE_H */
diff --git a/kmail/kmheaders.cpp b/kmail/kmheaders.cpp
index e2dd439d3..c0e5c4225 100644
--- a/kmail/kmheaders.cpp
+++ b/kmail/kmheaders.cpp
@@ -42,16 +42,16 @@ using namespace KPIM;
#include <klocale.h>
#include <kdebug.h>
-#include <qbuffer.h>
-#include <qeventloop.h>
-#include <qfile.h>
-#include <qheader.h>
-#include <qptrstack.h>
-#include <qptrqueue.h>
-#include <qpainter.h>
-#include <qtextcodec.h>
-#include <qstyle.h>
-#include <qlistview.h>
+#include <tqbuffer.h>
+#include <tqeventloop.h>
+#include <tqfile.h>
+#include <tqheader.h>
+#include <tqptrstack.h>
+#include <tqptrqueue.h>
+#include <tqpainter.h>
+#include <tqtextcodec.h>
+#include <tqstyle.h>
+#include <tqlistview.h>
#include <mimelib/enum.h>
#include <mimelib/field.h>
@@ -62,36 +62,36 @@ using namespace KPIM;
#include "textsource.h"
-QPixmap* KMHeaders::pixNew = 0;
-QPixmap* KMHeaders::pixUns = 0;
-QPixmap* KMHeaders::pixDel = 0;
-QPixmap* KMHeaders::pixRead = 0;
-QPixmap* KMHeaders::pixRep = 0;
-QPixmap* KMHeaders::pixQueued = 0;
-QPixmap* KMHeaders::pixTodo = 0;
-QPixmap* KMHeaders::pixSent = 0;
-QPixmap* KMHeaders::pixFwd = 0;
-QPixmap* KMHeaders::pixFlag = 0;
-QPixmap* KMHeaders::pixWatched = 0;
-QPixmap* KMHeaders::pixIgnored = 0;
-QPixmap* KMHeaders::pixSpam = 0;
-QPixmap* KMHeaders::pixHam = 0;
-QPixmap* KMHeaders::pixFullySigned = 0;
-QPixmap* KMHeaders::pixPartiallySigned = 0;
-QPixmap* KMHeaders::pixUndefinedSigned = 0;
-QPixmap* KMHeaders::pixFullyEncrypted = 0;
-QPixmap* KMHeaders::pixPartiallyEncrypted = 0;
-QPixmap* KMHeaders::pixUndefinedEncrypted = 0;
-QPixmap* KMHeaders::pixEncryptionProblematic = 0;
-QPixmap* KMHeaders::pixSignatureProblematic = 0;
-QPixmap* KMHeaders::pixAttachment = 0;
-QPixmap* KMHeaders::pixReadFwd = 0;
-QPixmap* KMHeaders::pixReadReplied = 0;
-QPixmap* KMHeaders::pixReadFwdReplied = 0;
-
-
-//-----------------------------------------------------------------------------
-KMHeaders::KMHeaders(KMMainWidget *aOwner, QWidget *parent,
+TQPixmap* KMHeaders::pixNew = 0;
+TQPixmap* KMHeaders::pixUns = 0;
+TQPixmap* KMHeaders::pixDel = 0;
+TQPixmap* KMHeaders::pixRead = 0;
+TQPixmap* KMHeaders::pixRep = 0;
+TQPixmap* KMHeaders::pixQueued = 0;
+TQPixmap* KMHeaders::pixTodo = 0;
+TQPixmap* KMHeaders::pixSent = 0;
+TQPixmap* KMHeaders::pixFwd = 0;
+TQPixmap* KMHeaders::pixFlag = 0;
+TQPixmap* KMHeaders::pixWatched = 0;
+TQPixmap* KMHeaders::pixIgnored = 0;
+TQPixmap* KMHeaders::pixSpam = 0;
+TQPixmap* KMHeaders::pixHam = 0;
+TQPixmap* KMHeaders::pixFullySigned = 0;
+TQPixmap* KMHeaders::pixPartiallySigned = 0;
+TQPixmap* KMHeaders::pixUndefinedSigned = 0;
+TQPixmap* KMHeaders::pixFullyEncrypted = 0;
+TQPixmap* KMHeaders::pixPartiallyEncrypted = 0;
+TQPixmap* KMHeaders::pixUndefinedEncrypted = 0;
+TQPixmap* KMHeaders::pixEncryptionProblematic = 0;
+TQPixmap* KMHeaders::pixSignatureProblematic = 0;
+TQPixmap* KMHeaders::pixAttachment = 0;
+TQPixmap* KMHeaders::pixReadFwd = 0;
+TQPixmap* KMHeaders::pixReadReplied = 0;
+TQPixmap* KMHeaders::pixReadFwdReplied = 0;
+
+
+//-----------------------------------------------------------------------------
+KMHeaders::KMHeaders(KMMainWidget *aOwner, TQWidget *parent,
const char *name) :
KListView(parent, name)
{
@@ -103,7 +103,7 @@ KMHeaders::KMHeaders(KMMainWidget *aOwner, QWidget *parent,
noRepaint = false;
getMsgIndex = -1;
mTopItem = 0;
- setSelectionMode( QListView::Extended );
+ setSelectionMode( TQListView::Extended );
setAllColumnsShowFocus( true );
mNested = false;
nestingPolicy = OpenUnread;
@@ -138,7 +138,7 @@ KMHeaders::KMHeaders(KMMainWidget *aOwner, QWidget *parent,
mPopup->insertItem(i18n("Size"), KPaintInfo::COL_SIZE);
mPopup->insertItem(i18n("Receiver"), KPaintInfo::COL_RECEIVER);
- connect(mPopup, SIGNAL(activated(int)), this, SLOT(slotToggleColumn(int)));
+ connect(mPopup, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotToggleColumn(int)));
setShowSortIndicator(true);
setFocusPolicy( WheelFocus );
@@ -146,32 +146,32 @@ KMHeaders::KMHeaders(KMMainWidget *aOwner, QWidget *parent,
if (!pixmapsLoaded)
{
pixmapsLoaded = true;
- pixNew = new QPixmap( UserIcon( "kmmsgnew" ) );
- pixUns = new QPixmap( UserIcon( "kmmsgunseen" ) );
- pixDel = new QPixmap( UserIcon( "kmmsgdel" ) );
- pixRead = new QPixmap( UserIcon( "kmmsgread" ) );
- pixRep = new QPixmap( UserIcon( "kmmsgreplied" ) );
- pixQueued = new QPixmap( UserIcon( "kmmsgqueued" ) );
- pixTodo = new QPixmap( UserIcon( "kmmsgtodo" ) );
- pixSent = new QPixmap( UserIcon( "kmmsgsent" ) );
- pixFwd = new QPixmap( UserIcon( "kmmsgforwarded" ) );
- pixFlag = new QPixmap( UserIcon( "kmmsgflag" ) );
- pixWatched = new QPixmap( UserIcon( "kmmsgwatched" ) );
- pixIgnored = new QPixmap( UserIcon( "kmmsgignored" ) );
- pixSpam = new QPixmap( UserIcon( "kmmsgspam" ) );
- pixHam = new QPixmap( UserIcon( "kmmsgham" ) );
- pixFullySigned = new QPixmap( UserIcon( "kmmsgfullysigned" ) );
- pixPartiallySigned = new QPixmap( UserIcon( "kmmsgpartiallysigned" ) );
- pixUndefinedSigned = new QPixmap( UserIcon( "kmmsgundefinedsigned" ) );
- pixFullyEncrypted = new QPixmap( UserIcon( "kmmsgfullyencrypted" ) );
- pixPartiallyEncrypted = new QPixmap( UserIcon( "kmmsgpartiallyencrypted" ) );
- pixUndefinedEncrypted = new QPixmap( UserIcon( "kmmsgundefinedencrypted" ) );
- pixEncryptionProblematic = new QPixmap( UserIcon( "kmmsgencryptionproblematic" ) );
- pixSignatureProblematic = new QPixmap( UserIcon( "kmmsgsignatureproblematic" ) );
- pixAttachment = new QPixmap( UserIcon( "kmmsgattachment" ) );
- pixReadFwd = new QPixmap( UserIcon( "kmmsgread_fwd" ) );
- pixReadReplied = new QPixmap( UserIcon( "kmmsgread_replied" ) );
- pixReadFwdReplied = new QPixmap( UserIcon( "kmmsgread_fwd_replied" ) );
+ pixNew = new TQPixmap( UserIcon( "kmmsgnew" ) );
+ pixUns = new TQPixmap( UserIcon( "kmmsgunseen" ) );
+ pixDel = new TQPixmap( UserIcon( "kmmsgdel" ) );
+ pixRead = new TQPixmap( UserIcon( "kmmsgread" ) );
+ pixRep = new TQPixmap( UserIcon( "kmmsgreplied" ) );
+ pixQueued = new TQPixmap( UserIcon( "kmmsgqueued" ) );
+ pixTodo = new TQPixmap( UserIcon( "kmmsgtodo" ) );
+ pixSent = new TQPixmap( UserIcon( "kmmsgsent" ) );
+ pixFwd = new TQPixmap( UserIcon( "kmmsgforwarded" ) );
+ pixFlag = new TQPixmap( UserIcon( "kmmsgflag" ) );
+ pixWatched = new TQPixmap( UserIcon( "kmmsgwatched" ) );
+ pixIgnored = new TQPixmap( UserIcon( "kmmsgignored" ) );
+ pixSpam = new TQPixmap( UserIcon( "kmmsgspam" ) );
+ pixHam = new TQPixmap( UserIcon( "kmmsgham" ) );
+ pixFullySigned = new TQPixmap( UserIcon( "kmmsgfullysigned" ) );
+ pixPartiallySigned = new TQPixmap( UserIcon( "kmmsgpartiallysigned" ) );
+ pixUndefinedSigned = new TQPixmap( UserIcon( "kmmsgundefinedsigned" ) );
+ pixFullyEncrypted = new TQPixmap( UserIcon( "kmmsgfullyencrypted" ) );
+ pixPartiallyEncrypted = new TQPixmap( UserIcon( "kmmsgpartiallyencrypted" ) );
+ pixUndefinedEncrypted = new TQPixmap( UserIcon( "kmmsgundefinedencrypted" ) );
+ pixEncryptionProblematic = new TQPixmap( UserIcon( "kmmsgencryptionproblematic" ) );
+ pixSignatureProblematic = new TQPixmap( UserIcon( "kmmsgsignatureproblematic" ) );
+ pixAttachment = new TQPixmap( UserIcon( "kmmsgattachment" ) );
+ pixReadFwd = new TQPixmap( UserIcon( "kmmsgread_fwd" ) );
+ pixReadReplied = new TQPixmap( UserIcon( "kmmsgread_replied" ) );
+ pixReadFwdReplied = new TQPixmap( UserIcon( "kmmsgread_fwd_replied" ) );
}
header()->setStretchEnabled( false );
@@ -192,25 +192,25 @@ KMHeaders::KMHeaders(KMMainWidget *aOwner, QWidget *parent,
mPaintInfo.signedCol = addColumn( *pixFullySigned , "", 0 );
mPaintInfo.cryptoCol = addColumn( *pixFullyEncrypted, "", 0 );
- setResizeMode( QListView::NoColumn );
+ setResizeMode( TQListView::NoColumn );
// only the non-optional columns shall be resizeable
header()->setResizeEnabled( true, mPaintInfo.subCol );
header()->setResizeEnabled( true, mPaintInfo.senderCol );
header()->setResizeEnabled( true, mPaintInfo.dateCol );
- connect( this, SIGNAL( contextMenuRequested( QListViewItem*, const QPoint &, int )),
- this, SLOT( rightButtonPressed( QListViewItem*, const QPoint &, int )));
- connect(this, SIGNAL(doubleClicked(QListViewItem*)),
- this,SLOT(selectMessage(QListViewItem*)));
- connect(this,SIGNAL(currentChanged(QListViewItem*)),
- this,SLOT(highlightMessage(QListViewItem*)));
+ connect( this, TQT_SIGNAL( contextMenuRequested( TQListViewItem*, const TQPoint &, int )),
+ this, TQT_SLOT( rightButtonPressed( TQListViewItem*, const TQPoint &, int )));
+ connect(this, TQT_SIGNAL(doubleClicked(TQListViewItem*)),
+ this,TQT_SLOT(selectMessage(TQListViewItem*)));
+ connect(this,TQT_SIGNAL(currentChanged(TQListViewItem*)),
+ this,TQT_SLOT(highlightMessage(TQListViewItem*)));
resetCurrentTime();
mSubjectLists.setAutoDelete( true );
mMoveMessages = false;
- connect( this, SIGNAL(selectionChanged()), SLOT(updateActions()) );
+ connect( this, TQT_SIGNAL(selectionChanged()), TQT_SLOT(updateActions()) );
}
@@ -228,11 +228,11 @@ KMHeaders::~KMHeaders ()
}
//-----------------------------------------------------------------------------
-bool KMHeaders::eventFilter ( QObject *o, QEvent *e )
+bool KMHeaders::eventFilter ( TQObject *o, TQEvent *e )
{
- if ( e->type() == QEvent::MouseButtonPress &&
- static_cast<QMouseEvent*>(e)->button() == RightButton &&
- o->isA("QHeader") )
+ if ( e->type() == TQEvent::MouseButtonPress &&
+ static_cast<TQMouseEvent*>(e)->button() == RightButton &&
+ o->isA("TQHeader") )
{
// if we currently only show one of either sender/receiver column
// modify the popup text in the way, that it displays the text of the other of the two
@@ -244,7 +244,7 @@ bool KMHeaders::eventFilter ( QObject *o, QEvent *e )
else
mPopup->changeItem(KPaintInfo::COL_RECEIVER, i18n("Receiver"));
- mPopup->popup( static_cast<QMouseEvent*>(e)->globalPos() );
+ mPopup->popup( static_cast<TQMouseEvent*>(e)->globalPos() );
return true;
}
return KListView::eventFilter(o, e);
@@ -375,7 +375,7 @@ void KMHeaders::slotToggleColumn(int id, int mode)
// if we change the visibility of the receiver column,
// the sender column has to show either the sender or the receiver
if ( static_cast<KPaintInfo::ColumnIds>(id) == KPaintInfo::COL_RECEIVER ) {
- QString colText = i18n( "Sender" );
+ TQString colText = i18n( "Sender" );
if ( mFolder && (mFolder->whoField().lower() == "to") && !mPaintInfo.showReceiver)
colText = i18n( "Receiver" );
setColumnText( mPaintInfo.senderCol, colText );
@@ -387,7 +387,7 @@ void KMHeaders::slotToggleColumn(int id, int mode)
//-----------------------------------------------------------------------------
// Support for backing pixmap
-void KMHeaders::paintEmptyArea( QPainter * p, const QRect & rect )
+void KMHeaders::paintEmptyArea( TQPainter * p, const TQRect & rect )
{
if (mPaintInfo.pixmapOn)
p->drawTiledPixmap( rect.left(), rect.top(), rect.width(), rect.height(),
@@ -398,10 +398,10 @@ void KMHeaders::paintEmptyArea( QPainter * p, const QRect & rect )
p->fillRect( rect, colorGroup().base() );
}
-bool KMHeaders::event(QEvent *e)
+bool KMHeaders::event(TQEvent *e)
{
bool result = KListView::event(e);
- if (e->type() == QEvent::ApplicationPaletteChange)
+ if (e->type() == TQEvent::ApplicationPaletteChange)
{
readColorConfig();
}
@@ -415,20 +415,20 @@ void KMHeaders::readColorConfig (void)
KConfig* config = KMKernel::config();
// Custom/System colors
KConfigGroupSaver saver(config, "Reader");
- QColor c1=QColor(kapp->palette().active().text());
- QColor c2=QColor("red");
- QColor c3=QColor("blue");
- QColor c4=QColor(kapp->palette().active().base());
- QColor c5=QColor(0,0x7F,0);
- QColor c6=QColor(0,0x98,0);
- QColor c7=KGlobalSettings::alternateBackgroundColor();
+ TQColor c1=TQColor(kapp->palette().active().text());
+ TQColor c2=TQColor("red");
+ TQColor c3=TQColor("blue");
+ TQColor c4=TQColor(kapp->palette().active().base());
+ TQColor c5=TQColor(0,0x7F,0);
+ TQColor c6=TQColor(0,0x98,0);
+ TQColor c7=KGlobalSettings::alternateBackgroundColor();
if (!config->readBoolEntry("defaultColors",true)) {
mPaintInfo.colFore = config->readColorEntry("ForegroundColor",&c1);
mPaintInfo.colBack = config->readColorEntry("BackgroundColor",&c4);
- QPalette newPal = kapp->palette();
- newPal.setColor( QColorGroup::Base, mPaintInfo.colBack );
- newPal.setColor( QColorGroup::Text, mPaintInfo.colFore );
+ TQPalette newPal = kapp->palette();
+ newPal.setColor( TQColorGroup::Base, mPaintInfo.colBack );
+ newPal.setColor( TQColorGroup::Text, mPaintInfo.colFore );
setPalette( newPal );
mPaintInfo.colNew = config->readColorEntry("NewMessage",&c2);
mPaintInfo.colUnread = config->readColorEntry("UnreadMessage",&c3);
@@ -439,9 +439,9 @@ void KMHeaders::readColorConfig (void)
else {
mPaintInfo.colFore = c1;
mPaintInfo.colBack = c4;
- QPalette newPal = kapp->palette();
- newPal.setColor( QColorGroup::Base, c4 );
- newPal.setColor( QColorGroup::Text, c1 );
+ TQPalette newPal = kapp->palette();
+ newPal.setColor( TQColorGroup::Base, c4 );
+ newPal.setColor( TQColorGroup::Text, c1 );
setPalette( newPal );
mPaintInfo.colNew = c2;
mPaintInfo.colUnread = c3;
@@ -459,11 +459,11 @@ void KMHeaders::readConfig (void)
// Backing pixmap support
{ // area for config group "Pixmaps"
KConfigGroupSaver saver(config, "Pixmaps");
- QString pixmapFile = config->readEntry("Headers");
+ TQString pixmapFile = config->readEntry("Headers");
mPaintInfo.pixmapOn = false;
if (!pixmapFile.isEmpty()) {
mPaintInfo.pixmapOn = true;
- mPaintInfo.pixmap = QPixmap( pixmapFile );
+ mPaintInfo.pixmap = TQPixmap( pixmapFile );
}
}
@@ -515,7 +515,7 @@ void KMHeaders::readConfig (void)
KConfigGroupSaver saver(config, "Fonts");
if (!(config->readBoolEntry("defaultFonts",true)))
{
- QFont listFont( KGlobalSettings::generalFont() );
+ TQFont listFont( KGlobalSettings::generalFont() );
listFont = config->readFontEntry( "list-font", &listFont );
setFont( listFont );
mNewFont = config->readFontEntry( "list-new-font", &listFont );
@@ -546,7 +546,7 @@ void KMHeaders::reset()
int id = currentItemIndex();
noRepaint = true;
clear();
- QString colText = i18n( "Sender" );
+ TQString colText = i18n( "Sender" );
if ( mFolder && (mFolder->whoField().lower() == "to") && !mPaintInfo.showReceiver)
colText = i18n( "Receiver" );
setColumnText( mPaintInfo.senderCol, colText );
@@ -653,7 +653,7 @@ void KMHeaders::setFolder( KMFolder *aFolder, bool forceJumpToUnread )
START_TIMER(set_folder);
int id;
- QString str;
+ TQString str;
mSortInfo.fakeSort = 0;
if ( mFolder && static_cast<KMFolder*>(mFolder) == aFolder ) {
@@ -670,28 +670,28 @@ void KMHeaders::setFolder( KMFolder *aFolder, bool forceJumpToUnread )
// from this folder, since it's msg's are about to be deleted.
highlightMessage(0, false);
- disconnect(mFolder, SIGNAL(numUnreadMsgsChanged(KMFolder*)),
- this, SLOT(setFolderInfoStatus()));
+ disconnect(mFolder, TQT_SIGNAL(numUnreadMsgsChanged(KMFolder*)),
+ this, TQT_SLOT(setFolderInfoStatus()));
mFolder->markNewAsUnread();
writeFolderConfig();
- disconnect(mFolder, SIGNAL(msgHeaderChanged(KMFolder*,int)),
- this, SLOT(msgHeaderChanged(KMFolder*,int)));
- disconnect(mFolder, SIGNAL(msgAdded(int)),
- this, SLOT(msgAdded(int)));
- disconnect(mFolder, SIGNAL( msgRemoved( int, QString ) ),
- this, SLOT( msgRemoved( int, QString ) ) );
- disconnect(mFolder, SIGNAL(changed()),
- this, SLOT(msgChanged()));
- disconnect(mFolder, SIGNAL(cleared()),
- this, SLOT(folderCleared()));
- disconnect(mFolder, SIGNAL(expunged( KMFolder* )),
- this, SLOT(folderCleared()));
- disconnect(mFolder, SIGNAL(closed()),
- this, SLOT(folderClosed()));
- disconnect( mFolder, SIGNAL( statusMsg( const QString& ) ),
- BroadcastStatus::instance(), SLOT( setStatusMsg( const QString& ) ) );
- disconnect(mFolder, SIGNAL(viewConfigChanged()), this, SLOT(reset()));
+ disconnect(mFolder, TQT_SIGNAL(msgHeaderChanged(KMFolder*,int)),
+ this, TQT_SLOT(msgHeaderChanged(KMFolder*,int)));
+ disconnect(mFolder, TQT_SIGNAL(msgAdded(int)),
+ this, TQT_SLOT(msgAdded(int)));
+ disconnect(mFolder, TQT_SIGNAL( msgRemoved( int, TQString ) ),
+ this, TQT_SLOT( msgRemoved( int, TQString ) ) );
+ disconnect(mFolder, TQT_SIGNAL(changed()),
+ this, TQT_SLOT(msgChanged()));
+ disconnect(mFolder, TQT_SIGNAL(cleared()),
+ this, TQT_SLOT(folderCleared()));
+ disconnect(mFolder, TQT_SIGNAL(expunged( KMFolder* )),
+ this, TQT_SLOT(folderCleared()));
+ disconnect(mFolder, TQT_SIGNAL(closed()),
+ this, TQT_SLOT(folderClosed()));
+ disconnect( mFolder, TQT_SIGNAL( statusMsg( const TQString& ) ),
+ BroadcastStatus::instance(), TQT_SLOT( setStatusMsg( const TQString& ) ) );
+ disconnect(mFolder, TQT_SIGNAL(viewConfigChanged()), this, TQT_SLOT(reset()));
writeSortOrder();
mFolder->close("kmheaders");
// System folders remain open but we also should write the index from
@@ -708,25 +708,25 @@ void KMHeaders::setFolder( KMFolder *aFolder, bool forceJumpToUnread )
mOwner->messageActions()->replyListAction()->setEnabled( mFolder ?
mFolder->isMailingListEnabled() : false );
if ( mFolder ) {
- connect(mFolder, SIGNAL(msgHeaderChanged(KMFolder*,int)),
- this, SLOT(msgHeaderChanged(KMFolder*,int)));
- connect(mFolder, SIGNAL(msgAdded(int)),
- this, SLOT(msgAdded(int)));
- connect(mFolder, SIGNAL(msgRemoved(int,QString)),
- this, SLOT(msgRemoved(int,QString)));
- connect(mFolder, SIGNAL(changed()),
- this, SLOT(msgChanged()));
- connect(mFolder, SIGNAL(cleared()),
- this, SLOT(folderCleared()));
- connect(mFolder, SIGNAL(expunged( KMFolder* )),
- this, SLOT(folderCleared()));
- connect(mFolder, SIGNAL(closed()),
- this, SLOT(folderClosed()));
- connect(mFolder, SIGNAL(statusMsg(const QString&)),
- BroadcastStatus::instance(), SLOT( setStatusMsg( const QString& ) ) );
- connect(mFolder, SIGNAL(numUnreadMsgsChanged(KMFolder*)),
- this, SLOT(setFolderInfoStatus()));
- connect(mFolder, SIGNAL(viewConfigChanged()), this, SLOT(reset()));
+ connect(mFolder, TQT_SIGNAL(msgHeaderChanged(KMFolder*,int)),
+ this, TQT_SLOT(msgHeaderChanged(KMFolder*,int)));
+ connect(mFolder, TQT_SIGNAL(msgAdded(int)),
+ this, TQT_SLOT(msgAdded(int)));
+ connect(mFolder, TQT_SIGNAL(msgRemoved(int,TQString)),
+ this, TQT_SLOT(msgRemoved(int,TQString)));
+ connect(mFolder, TQT_SIGNAL(changed()),
+ this, TQT_SLOT(msgChanged()));
+ connect(mFolder, TQT_SIGNAL(cleared()),
+ this, TQT_SLOT(folderCleared()));
+ connect(mFolder, TQT_SIGNAL(expunged( KMFolder* )),
+ this, TQT_SLOT(folderCleared()));
+ connect(mFolder, TQT_SIGNAL(closed()),
+ this, TQT_SLOT(folderClosed()));
+ connect(mFolder, TQT_SIGNAL(statusMsg(const TQString&)),
+ BroadcastStatus::instance(), TQT_SLOT( setStatusMsg( const TQString& ) ) );
+ connect(mFolder, TQT_SIGNAL(numUnreadMsgsChanged(KMFolder*)),
+ this, TQT_SLOT(setFolderInfoStatus()));
+ connect(mFolder, TQT_SIGNAL(viewConfigChanged()), this, TQT_SLOT(reset()));
// Not very nice, but if we go from nested to non-nested
// in the folderConfig below then we need to do this otherwise
@@ -762,7 +762,7 @@ void KMHeaders::setFolder( KMFolder *aFolder, bool forceJumpToUnread )
makeHeaderVisible();
setFolderInfoStatus();
- QString colText = i18n( "Sender" );
+ TQString colText = i18n( "Sender" );
if (mFolder && (mFolder->whoField().lower() == "to") && !mPaintInfo.showReceiver)
colText = i18n("Receiver");
setColumnText( mPaintInfo.senderCol, colText);
@@ -795,8 +795,8 @@ void KMHeaders::msgChanged()
int i = topItemIndex();
int cur = currentItemIndex();
if (!isUpdatesEnabled()) return;
- QString msgIdMD5;
- QListViewItem *item = currentItem();
+ TQString msgIdMD5;
+ TQListViewItem *item = currentItem();
HeaderItem *hi = dynamic_cast<HeaderItem*>(item);
if (item && hi) {
// get the msgIdMD5 to compare it later
@@ -806,15 +806,15 @@ void KMHeaders::msgChanged()
}
// if (!isUpdatesEnabled()) return;
// prevent IMAP messages from scrolling to top
- disconnect(this,SIGNAL(currentChanged(QListViewItem*)),
- this,SLOT(highlightMessage(QListViewItem*)));
+ disconnect(this,TQT_SIGNAL(currentChanged(TQListViewItem*)),
+ this,TQT_SLOT(highlightMessage(TQListViewItem*)));
// remember all selected messages
- QValueList<int> curItems = selectedItems();
+ TQValueList<int> curItems = selectedItems();
updateMessageList(); // do not change the selection
// restore the old state, but move up when there are unread message just out of view
HeaderItem *topOfList = mItems[i];
item = firstChild();
- QListViewItem *unreadItem = 0;
+ TQListViewItem *unreadItem = 0;
while(item && item != topOfList) {
KMMsgBase *msg = mFolder->getMsgBase( static_cast<HeaderItem*>(item)->msgId() );
if ( msg->isUnread() || msg->isNew() ) {
@@ -829,8 +829,8 @@ void KMHeaders::msgChanged()
setContentsPos( 0, itemPos( unreadItem ));
setCurrentMsg( cur );
setSelectedByIndex( curItems, true );
- connect(this,SIGNAL(currentChanged(QListViewItem*)),
- this,SLOT(highlightMessage(QListViewItem*)));
+ connect(this,TQT_SIGNAL(currentChanged(TQListViewItem*)),
+ this,TQT_SLOT(highlightMessage(TQListViewItem*)));
// if the current message has changed then emit
// the selected signal to force an update
@@ -877,10 +877,10 @@ void KMHeaders::msgAdded(int id)
mSortCacheItems.resize(mFolder->count()*2);
mSubjectLists.resize(mFolder->count()*2);
}
- QString msgId = mFolder->getMsgBase(id)->msgIdMD5();
+ TQString msgId = mFolder->getMsgBase(id)->msgIdMD5();
if (msgId.isNull())
msgId = "";
- QString replyToId = mFolder->getMsgBase(id)->replyToIdMD5();
+ TQString replyToId = mFolder->getMsgBase(id)->replyToIdMD5();
SortCacheItem *parent = findParent( sci );
if (!parent && mSubjThreading) {
@@ -918,17 +918,17 @@ void KMHeaders::msgAdded(int id)
/* Add to the list of potential parents for subject threading. But only if
* we are top level. */
if (mSubjThreading && parent) {
- QString subjMD5 = mFolder->getMsgBase(id)->strippedSubjectMD5();
+ TQString subjMD5 = mFolder->getMsgBase(id)->strippedSubjectMD5();
if (subjMD5.isEmpty()) {
mFolder->getMsgBase(id)->initStrippedSubjectMD5();
subjMD5 = mFolder->getMsgBase(id)->strippedSubjectMD5();
}
if( !subjMD5.isEmpty()) {
if ( !mSubjectLists.find(subjMD5) )
- mSubjectLists.insert(subjMD5, new QPtrList<SortCacheItem>());
+ mSubjectLists.insert(subjMD5, new TQPtrList<SortCacheItem>());
// insertion sort by date. See buildThreadTrees for details.
int p=0;
- for (QPtrListIterator<SortCacheItem> it(*mSubjectLists[subjMD5]);
+ for (TQPtrListIterator<SortCacheItem> it(*mSubjectLists[subjMD5]);
it.current(); ++it) {
KMMsgBase *mb = mFolder->getMsgBase((*it)->id());
if ( mb->date() < mFolder->getMsgBase(id)->date())
@@ -945,11 +945,11 @@ void KMHeaders::msgAdded(int id)
/* In case the current item is taken during reparenting, prevent qlistview
* from selecting some unrelated item as a result of take() emitting
* currentChanged. */
- disconnect( this, SIGNAL(currentChanged(QListViewItem*)),
- this, SLOT(highlightMessage(QListViewItem*)));
+ disconnect( this, TQT_SIGNAL(currentChanged(TQListViewItem*)),
+ this, TQT_SLOT(highlightMessage(TQListViewItem*)));
if ( !msgId.isEmpty() ) {
- QPtrListIterator<HeaderItem> it(mImperfectlyThreadedList);
+ TQPtrListIterator<HeaderItem> it(mImperfectlyThreadedList);
HeaderItem *cur;
while ( (cur = it.current()) ) {
++it;
@@ -963,7 +963,7 @@ void KMHeaders::msgAdded(int id)
kdDebug(5006) << "otherMsg is NULL !!! tryMe: " << tryMe << endl;
continue;
}
- QString otherId = otherMsg->replyToIdMD5();
+ TQString otherId = otherMsg->replyToIdMD5();
if (msgId != otherId) {
if (msgId != otherMsg->replyToAuxIdMD5())
continue;
@@ -976,8 +976,8 @@ void KMHeaders::msgAdded(int id)
perfectParent = false;
}
}
- QListViewItem *newParent = mItems[id];
- QListViewItem *msg = mItems[tryMe];
+ TQListViewItem *newParent = mItems[id];
+ TQListViewItem *msg = mItems[tryMe];
if (msg->parent())
msg->parent()->takeItem(msg);
@@ -993,8 +993,8 @@ void KMHeaders::msgAdded(int id)
mImperfectlyThreadedList.removeRef (mItems[tryMe]);
// The item was imperfectly thread before, now it's parent
// is there. Update the .sorted file accordingly.
- QString sortFile = KMAIL_SORT_FILE(mFolder);
- FILE *sortStream = fopen(QFile::encodeName(sortFile), "r+");
+ TQString sortFile = KMAIL_SORT_FILE(mFolder);
+ FILE *sortStream = fopen(TQFile::encodeName(sortFile), "r+");
if (sortStream) {
mItems[tryMe]->sortCacheItem()->updateSortFile( sortStream, mFolder );
fclose (sortStream);
@@ -1015,7 +1015,7 @@ void KMHeaders::msgAdded(int id)
sci->setItem(hi);
}
if (mSortInfo.fakeSort) {
- QObject::disconnect(header(), SIGNAL(clicked(int)), this, SLOT(dirtySortOrder(int)));
+ TQObject::disconnect(header(), TQT_SIGNAL(clicked(int)), this, TQT_SLOT(dirtySortOrder(int)));
KListView::setSorting(mSortCol, !mSortDescending );
mSortInfo.fakeSort = 0;
}
@@ -1031,8 +1031,8 @@ void KMHeaders::msgAdded(int id)
}
/* restore signal */
- connect( this, SIGNAL(currentChanged(QListViewItem*)),
- this, SLOT(highlightMessage(QListViewItem*)));
+ connect( this, TQT_SIGNAL(currentChanged(TQListViewItem*)),
+ this, TQT_SLOT(highlightMessage(TQListViewItem*)));
emit msgAddedToListView( hi );
END_TIMER(msgAdded);
@@ -1041,7 +1041,7 @@ void KMHeaders::msgAdded(int id)
//-----------------------------------------------------------------------------
-void KMHeaders::msgRemoved(int id, QString msgId )
+void KMHeaders::msgRemoved(int id, TQString msgId )
{
if (!isUpdatesEnabled()) return;
@@ -1052,8 +1052,8 @@ void KMHeaders::msgRemoved(int id, QString msgId )
* item once this one is removed. Sine we have already selected
* something in prepare/finalizeMove that's counter productive
*/
- disconnect( this, SIGNAL(currentChanged(QListViewItem*)),
- this, SLOT(highlightMessage(QListViewItem*)));
+ disconnect( this, TQT_SIGNAL(currentChanged(TQListViewItem*)),
+ this, TQT_SLOT(highlightMessage(TQListViewItem*)));
HeaderItem *removedItem = mItems[id];
if (!removedItem) return;
@@ -1078,14 +1078,14 @@ void KMHeaders::msgRemoved(int id, QString msgId )
removedItem->sortCacheItem()->subjectThreadingList()->removeRef( removedItem->sortCacheItem() );
// Reparent children of item.
- QListViewItem *myParent = removedItem;
- QListViewItem *myChild = myParent->firstChild();
- QListViewItem *threadRoot = myParent;
+ TQListViewItem *myParent = removedItem;
+ TQListViewItem *myChild = myParent->firstChild();
+ TQListViewItem *threadRoot = myParent;
while (threadRoot->parent())
threadRoot = threadRoot->parent();
- QString key = static_cast<HeaderItem*>(threadRoot)->key(mSortCol, !mSortDescending);
+ TQString key = static_cast<HeaderItem*>(threadRoot)->key(mSortCol, !mSortDescending);
- QPtrList<QListViewItem> childList;
+ TQPtrList<TQListViewItem> childList;
while (myChild) {
HeaderItem *item = static_cast<HeaderItem*>(myChild);
// Just keep the item at top level, if it will be deleted anyhow
@@ -1100,14 +1100,14 @@ void KMHeaders::msgRemoved(int id, QString msgId )
}
item->setTempKey( key + item->key( mSortCol, !mSortDescending ));
if (mSortInfo.fakeSort) {
- QObject::disconnect(header(), SIGNAL(clicked(int)), this, SLOT(dirtySortOrder(int)));
+ TQObject::disconnect(header(), TQT_SIGNAL(clicked(int)), this, TQT_SLOT(dirtySortOrder(int)));
KListView::setSorting(mSortCol, !mSortDescending );
mSortInfo.fakeSort = 0;
}
}
- for (QPtrListIterator<QListViewItem> it(childList); it.current() ; ++it ) {
- QListViewItem *lvi = *it;
+ for (TQPtrListIterator<TQListViewItem> it(childList); it.current() ; ++it ) {
+ TQListViewItem *lvi = *it;
HeaderItem *item = static_cast<HeaderItem*>(lvi);
SortCacheItem *sci = item->sortCacheItem();
SortCacheItem *parent = findParent( sci );
@@ -1164,8 +1164,8 @@ void KMHeaders::msgRemoved(int id, QString msgId )
}
}
/* restore signal */
- connect( this, SIGNAL(currentChanged(QListViewItem*)),
- this, SLOT(highlightMessage(QListViewItem*)));
+ connect( this, TQT_SIGNAL(currentChanged(TQListViewItem*)),
+ this, TQT_SLOT(highlightMessage(TQListViewItem*)));
}
@@ -1194,23 +1194,23 @@ void KMHeaders::setMsgStatus (KMMsgStatus status, bool toggle)
}
-QPtrList<QListViewItem> KMHeaders::currentThread() const
+TQPtrList<TQListViewItem> KMHeaders::currentThread() const
{
- if (!mFolder) return QPtrList<QListViewItem>();
+ if (!mFolder) return TQPtrList<TQListViewItem>();
// starting with the current item...
- QListViewItem *curItem = currentItem();
- if (!curItem) return QPtrList<QListViewItem>();
+ TQListViewItem *curItem = currentItem();
+ if (!curItem) return TQPtrList<TQListViewItem>();
// ...find the top-level item:
- QListViewItem *topOfThread = curItem;
+ TQListViewItem *topOfThread = curItem;
while ( topOfThread->parent() )
topOfThread = topOfThread->parent();
// collect the items in this thread:
- QPtrList<QListViewItem> list;
- QListViewItem *topOfNextThread = topOfThread->nextSibling();
- for ( QListViewItemIterator it( topOfThread ) ;
+ TQPtrList<TQListViewItem> list;
+ TQListViewItem *topOfNextThread = topOfThread->nextSibling();
+ for ( TQListViewItemIterator it( topOfThread ) ;
it.current() && it.current() != topOfNextThread ; ++it )
list.append( it.current() );
return list;
@@ -1218,16 +1218,16 @@ QPtrList<QListViewItem> KMHeaders::currentThread() const
void KMHeaders::setThreadStatus(KMMsgStatus status, bool toggle)
{
- QPtrList<QListViewItem> curThread;
+ TQPtrList<TQListViewItem> curThread;
if (mFolder) {
- QPtrList<QListViewItem> topOfThreads;
+ TQPtrList<TQListViewItem> topOfThreads;
// for each selected item...
- for (QListViewItem *item = firstChild(); item; item = item->itemBelow())
+ for (TQListViewItem *item = firstChild(); item; item = item->itemBelow())
if (item->isSelected() ) {
// ...find the top-level item:
- QListViewItem *top = item;
+ TQListViewItem *top = item;
while ( top->parent() )
top = top->parent();
if (!topOfThreads.contains(top)) {
@@ -1236,19 +1236,19 @@ void KMHeaders::setThreadStatus(KMMsgStatus status, bool toggle)
}
// for each thread found...
- for ( QPtrListIterator<QListViewItem> it( topOfThreads ) ;
+ for ( TQPtrListIterator<TQListViewItem> it( topOfThreads ) ;
it.current() ; ++ it ) {
- QListViewItem *top = *it;
+ TQListViewItem *top = *it;
// collect the items in this thread:
- QListViewItem *topOfNextThread = top->nextSibling();
- for ( QListViewItemIterator it( top ) ;
+ TQListViewItem *topOfNextThread = top->nextSibling();
+ for ( TQListViewItemIterator it( top ) ;
it.current() && it.current() != topOfNextThread ; ++it )
curThread.append( it.current() );
}
}
- QPtrListIterator<QListViewItem> it( curThread );
+ TQPtrListIterator<TQListViewItem> it( curThread );
SerNumList serNums;
for ( it.toFirst() ; it.current() ; ++it ) {
@@ -1272,7 +1272,7 @@ int KMHeaders::slotFilterMsg(KMMessage *msg)
int filterResult = kmkernel->filterMgr()->process(msg,KMFilterMgr::Explicit);
if (filterResult == 2) {
// something went horribly wrong (out of space?)
- kmkernel->emergencyExit( i18n("Unable to process messages: " ) + QString::fromLocal8Bit(strerror(errno)));
+ kmkernel->emergencyExit( i18n("Unable to process messages: " ) + TQString::fromLocal8Bit(strerror(errno)));
return 2;
}
if (msg->parent()) { // unGet this msg
@@ -1291,7 +1291,7 @@ void KMHeaders::slotExpandOrCollapseThread( bool expand )
{
if ( !isThreaded() ) return;
// find top-level parent of currentItem().
- QListViewItem *item = currentItem();
+ TQListViewItem *item = currentItem();
if ( !item ) return;
clearSelection();
item->setSelected( true );
@@ -1308,17 +1308,17 @@ void KMHeaders::slotExpandOrCollapseAllThreads( bool expand )
{
if ( !isThreaded() ) return;
- QListViewItem * item = currentItem();
+ TQListViewItem * item = currentItem();
if( item ) {
clearSelection();
item->setSelected( true );
}
- for ( QListViewItem *item = firstChild() ;
+ for ( TQListViewItem *item = firstChild() ;
item ; item = item->nextSibling() )
static_cast<HeaderItem*>(item)->setOpenRecursive( expand );
if ( !expand ) { // collapse can hide the current item:
- QListViewItem * item = currentItem();
+ TQListViewItem * item = currentItem();
if( item ) {
while ( item->parent() )
item = item->parent();
@@ -1334,9 +1334,9 @@ void KMHeaders::setStyleDependantFrameWidth()
// set the width of the frame to a reasonable value for the current GUI style
int frameWidth;
if( style().isA("KeramikStyle") )
- frameWidth = style().pixelMetric( QStyle::PM_DefaultFrameWidth ) - 1;
+ frameWidth = style().pixelMetric( TQStyle::PM_DefaultFrameWidth ) - 1;
else
- frameWidth = style().pixelMetric( QStyle::PM_DefaultFrameWidth );
+ frameWidth = style().pixelMetric( TQStyle::PM_DefaultFrameWidth );
if ( frameWidth < 0 )
frameWidth = 0;
if ( frameWidth != lineWidth() )
@@ -1344,7 +1344,7 @@ void KMHeaders::setStyleDependantFrameWidth()
}
//-----------------------------------------------------------------------------
-void KMHeaders::styleChange( QStyle& oldStyle )
+void KMHeaders::styleChange( TQStyle& oldStyle )
{
setStyleDependantFrameWidth();
KListView::styleChange( oldStyle );
@@ -1354,7 +1354,7 @@ void KMHeaders::styleChange( QStyle& oldStyle )
void KMHeaders::setFolderInfoStatus ()
{
if ( !mFolder ) return;
- QString str;
+ TQString str;
const int unread = mFolder->countUnread();
if ( static_cast<KMFolder*>(mFolder) == kmkernel->outboxFolder() )
str = unread ? i18n( "1 unsent", "%n unsent", unread ) : i18n( "0 unsent" );
@@ -1375,13 +1375,13 @@ void KMHeaders::applyFiltersOnMsg()
kmkernel->filterMgr()->atLeastOneOnlineImapFolderTarget()) {
// uses action scheduler
KMFilterMgr::FilterSet set = KMFilterMgr::Explicit;
- QValueList<KMFilter*> filters = kmkernel->filterMgr()->filters();
+ TQValueList<KMFilter*> filters = kmkernel->filterMgr()->filters();
ActionScheduler *scheduler = new ActionScheduler( set, filters, this );
scheduler->setAutoDestruct( true );
int contentX, contentY;
HeaderItem *nextItem = prepareMove( &contentX, &contentY );
- QPtrList<KMMsgBase> msgList = *selectedMsgs(true);
+ TQPtrList<KMMsgBase> msgList = *selectedMsgs(true);
finalizeMove( nextItem, contentX, contentY );
for (KMMsgBase *msg = msgList.first(); msg; msg = msgList.next())
@@ -1391,7 +1391,7 @@ void KMHeaders::applyFiltersOnMsg()
HeaderItem *nextItem = prepareMove( &contentX, &contentY );
//prevent issues with stale message pointers by using serial numbers instead
- QValueList<unsigned long> serNums = KMMsgDict::serNumList( *selectedMsgs() );
+ TQValueList<unsigned long> serNums = KMMsgDict::serNumList( *selectedMsgs() );
if ( serNums.isEmpty() )
return;
@@ -1407,15 +1407,15 @@ void KMHeaders::applyFiltersOnMsg()
i18n( "Filtering messages" ) );
progressItem->setTotalItems( msgCountToFilter );
- for ( QValueList<unsigned long>::ConstIterator it = serNums.constBegin();
+ for ( TQValueList<unsigned long>::ConstIterator it = serNums.constBegin();
it != serNums.constEnd(); ++it ) {
msgCount++;
if ( msgCountToFilter - msgCount < 10 || !( msgCount % 20 ) || msgCount <= 10 ) {
progressItem->updateProgress();
- QString statusMsg = i18n("Filtering message %1 of %2");
+ TQString statusMsg = i18n("Filtering message %1 of %2");
statusMsg = statusMsg.arg( msgCount ).arg( msgCountToFilter );
KPIM::BroadcastStatus::instance()->setStatusMsg( statusMsg );
- KApplication::kApplication()->eventLoop()->processEvents( QEventLoop::ExcludeUserInput, 50 );
+ KApplication::kApplication()->eventLoop()->processEvents( TQEventLoop::ExcludeUserInput, 50 );
}
KMFolder *folder = 0;
@@ -1430,8 +1430,8 @@ void KMHeaders::applyFiltersOnMsg()
msg->setTransferInProgress(true);
if (!msg->isComplete()) {
FolderJob *job = mFolder->createJob(msg);
- connect(job, SIGNAL(messageRetrieved(KMMessage*)),
- this, SLOT(slotFilterMsg(KMMessage*)));
+ connect(job, TQT_SIGNAL(messageRetrieved(KMMessage*)),
+ this, TQT_SLOT(slotFilterMsg(KMMessage*)));
job->start();
} else {
if (slotFilterMsg(msg) == 2)
@@ -1481,8 +1481,8 @@ void KMHeaders::deleteMsg ()
finalizeMove( nextItem, contentX, contentY );
KMCommand *command = new KMDeleteMsgCommand( mFolder, msgList );
- connect( command, SIGNAL( completed( KMCommand * ) ),
- this, SLOT( slotMoveCompleted( KMCommand * ) ) );
+ connect( command, TQT_SIGNAL( completed( KMCommand * ) ),
+ this, TQT_SLOT( slotMoveCompleted( KMCommand * ) ) );
command->start();
BroadcastStatus::instance()->setStatusMsg("");
@@ -1503,10 +1503,10 @@ HeaderItem* KMHeaders::prepareMove( int *contentX, int *contentY )
HeaderItem *ret = 0;
emit maybeDeleting();
- disconnect( this, SIGNAL(currentChanged(QListViewItem*)),
- this, SLOT(highlightMessage(QListViewItem*)));
+ disconnect( this, TQT_SIGNAL(currentChanged(TQListViewItem*)),
+ this, TQT_SLOT(highlightMessage(TQListViewItem*)));
- QListViewItem *curItem;
+ TQListViewItem *curItem;
HeaderItem *item;
curItem = currentItem();
while (curItem && curItem->isSelected() && curItem->itemBelow())
@@ -1540,8 +1540,8 @@ void KMHeaders::finalizeMove( HeaderItem *item, int contentX, int contentY )
setContentsPos( contentX, contentY );
makeHeaderVisible();
- connect( this, SIGNAL(currentChanged(QListViewItem*)),
- this, SLOT(highlightMessage(QListViewItem*)));
+ connect( this, TQT_SIGNAL(currentChanged(TQListViewItem*)),
+ this, TQT_SLOT(highlightMessage(TQListViewItem*)));
}
@@ -1570,8 +1570,8 @@ void KMHeaders::moveMsgToFolder ( KMFolder* destFolder, bool askForConfirmation
finalizeMove( nextItem, contentX, contentY );
KMCommand *command = new KMMoveCommand( destFolder, msgList );
- connect( command, SIGNAL( completed( KMCommand * ) ),
- this, SLOT( slotMoveCompleted( KMCommand * ) ) );
+ connect( command, TQT_SIGNAL( completed( KMCommand * ) ),
+ this, TQT_SLOT( slotMoveCompleted( KMCommand * ) ) );
command->start();
}
@@ -1591,7 +1591,7 @@ void KMHeaders::slotMoveCompleted( KMCommand *command )
* Note: This potentially resets too many items if there is more than one
* move going on. Oh well, I suppose no animals will be harmed.
* */
- for (QListViewItemIterator it(this); it.current(); it++) {
+ for (TQListViewItemIterator it(this); it.current(); it++) {
HeaderItem *item = static_cast<HeaderItem*>(it.current());
if ( item->aboutToBeDeleted() ) {
item->setAboutToBeDeleted ( false );
@@ -1667,7 +1667,7 @@ void KMHeaders::setCurrentMsg(int cur)
}
//-----------------------------------------------------------------------------
-void KMHeaders::setSelected( QListViewItem *item, bool selected )
+void KMHeaders::setSelected( TQListViewItem *item, bool selected )
{
if ( !item )
return;
@@ -1678,8 +1678,8 @@ void KMHeaders::setSelected( QListViewItem *item, bool selected )
// If the item is the parent of a closed thread recursively select
// children .
if ( isThreaded() && !item->isOpen() && item->firstChild() ) {
- QListViewItem *nextRoot = item->itemBelow();
- QListViewItemIterator it( item->firstChild() );
+ TQListViewItem *nextRoot = item->itemBelow();
+ TQListViewItemIterator it( item->firstChild() );
for( ; (*it) != nextRoot; ++it ) {
if ( (*it)->isVisible() )
(*it)->setSelected( selected );
@@ -1687,9 +1687,9 @@ void KMHeaders::setSelected( QListViewItem *item, bool selected )
}
}
-void KMHeaders::setSelectedByIndex( QValueList<int> items, bool selected )
+void KMHeaders::setSelectedByIndex( TQValueList<int> items, bool selected )
{
- for ( QValueList<int>::Iterator it = items.begin(); it != items.end(); ++it )
+ for ( TQValueList<int>::Iterator it = items.begin(); it != items.end(); ++it )
{
if ( ((*it) >= 0) && ((*it) < (int)mItems.size()) )
{
@@ -1701,7 +1701,7 @@ void KMHeaders::setSelectedByIndex( QValueList<int> items, bool selected )
void KMHeaders::clearSelectableAndAboutToBeDeleted( Q_UINT32 serNum )
{
// fugly, but I see no way around it
- for (QListViewItemIterator it(this); it.current(); it++) {
+ for (TQListViewItemIterator it(this); it.current(); it++) {
HeaderItem *item = static_cast<HeaderItem*>(it.current());
if ( item->aboutToBeDeleted() ) {
KMMsgBase *msgBase = mFolder->getMsgBase( item->msgId() );
@@ -1718,7 +1718,7 @@ void KMHeaders::clearSelectableAndAboutToBeDeleted( Q_UINT32 serNum )
KMMessageList* KMHeaders::selectedMsgs(bool toBeDeleted)
{
mSelMsgBaseList.clear();
- for (QListViewItemIterator it(this); it.current(); it++) {
+ for (TQListViewItemIterator it(this); it.current(); it++) {
if ( it.current()->isSelected() && it.current()->isVisible() ) {
HeaderItem *item = static_cast<HeaderItem*>(it.current());
if ( !item->aboutToBeDeleted() ) { // we are already working on this one
@@ -1736,10 +1736,10 @@ KMMessageList* KMHeaders::selectedMsgs(bool toBeDeleted)
}
//-----------------------------------------------------------------------------
-QValueList<int> KMHeaders::selectedItems()
+TQValueList<int> KMHeaders::selectedItems()
{
- QValueList<int> items;
- for ( QListViewItemIterator it(this); it.current(); it++ )
+ TQValueList<int> items;
+ for ( TQListViewItemIterator it(this); it.current(); it++ )
{
if ( it.current()->isSelected() && it.current()->isVisible() )
{
@@ -1754,7 +1754,7 @@ QValueList<int> KMHeaders::selectedItems()
int KMHeaders::firstSelectedMsg() const
{
int selectedMsg = -1;
- QListViewItem *item;
+ TQListViewItem *item;
for (item = firstChild(); item; item = item->itemBelow())
if (item->isSelected()) {
selectedMsg = (static_cast<HeaderItem*>(item))->msgId();
@@ -1766,7 +1766,7 @@ int KMHeaders::firstSelectedMsg() const
//-----------------------------------------------------------------------------
void KMHeaders::nextMessage()
{
- QListViewItem *lvi = currentItem();
+ TQListViewItem *lvi = currentItem();
if (lvi && lvi->itemBelow()) {
clearSelection();
setSelected( lvi, false );
@@ -1781,10 +1781,10 @@ void KMHeaders::selectNextMessage()
KMMessage *cm = currentMsg();
if ( cm && cm->isBeingParsed() )
return;
- QListViewItem *lvi = currentItem();
+ TQListViewItem *lvi = currentItem();
if( lvi ) {
- QListViewItem *below = lvi->itemBelow();
- QListViewItem *temp = lvi;
+ TQListViewItem *below = lvi->itemBelow();
+ TQListViewItem *temp = lvi;
if (lvi && below ) {
while (temp) {
temp->firstChild();
@@ -1803,7 +1803,7 @@ void KMHeaders::selectNextMessage()
//-----------------------------------------------------------------------------
void KMHeaders::prevMessage()
{
- QListViewItem *lvi = currentItem();
+ TQListViewItem *lvi = currentItem();
if (lvi && lvi->itemAbove()) {
clearSelection();
setSelected( lvi, false );
@@ -1818,10 +1818,10 @@ void KMHeaders::selectPrevMessage()
KMMessage *cm = currentMsg();
if ( cm && cm->isBeingParsed() )
return;
- QListViewItem *lvi = currentItem();
+ TQListViewItem *lvi = currentItem();
if( lvi ) {
- QListViewItem *above = lvi->itemAbove();
- QListViewItem *temp = lvi;
+ TQListViewItem *above = lvi->itemAbove();
+ TQListViewItem *temp = lvi;
if (lvi && above) {
while (temp) {
@@ -1844,16 +1844,16 @@ void KMHeaders::incCurrentMessage()
KMMessage *cm = currentMsg();
if ( cm && cm->isBeingParsed() )
return;
- QListViewItem *lvi = currentItem();
+ TQListViewItem *lvi = currentItem();
if ( lvi && lvi->itemBelow() ) {
- disconnect(this,SIGNAL(currentChanged(QListViewItem*)),
- this,SLOT(highlightMessage(QListViewItem*)));
+ disconnect(this,TQT_SIGNAL(currentChanged(TQListViewItem*)),
+ this,TQT_SLOT(highlightMessage(TQListViewItem*)));
setCurrentItem( lvi->itemBelow() );
ensureCurrentItemVisible();
setFocus();
- connect(this,SIGNAL(currentChanged(QListViewItem*)),
- this,SLOT(highlightMessage(QListViewItem*)));
+ connect(this,TQT_SIGNAL(currentChanged(TQListViewItem*)),
+ this,TQT_SLOT(highlightMessage(TQListViewItem*)));
}
}
@@ -1862,15 +1862,15 @@ void KMHeaders::decCurrentMessage()
KMMessage *cm = currentMsg();
if ( cm && cm->isBeingParsed() )
return;
- QListViewItem *lvi = currentItem();
+ TQListViewItem *lvi = currentItem();
if ( lvi && lvi->itemAbove() ) {
- disconnect(this,SIGNAL(currentChanged(QListViewItem*)),
- this,SLOT(highlightMessage(QListViewItem*)));
+ disconnect(this,TQT_SIGNAL(currentChanged(TQListViewItem*)),
+ this,TQT_SLOT(highlightMessage(TQListViewItem*)));
setCurrentItem( lvi->itemAbove() );
ensureCurrentItemVisible();
setFocus();
- connect(this,SIGNAL(currentChanged(QListViewItem*)),
- this,SLOT(highlightMessage(QListViewItem*)));
+ connect(this,TQT_SIGNAL(currentChanged(TQListViewItem*)),
+ this,TQT_SLOT(highlightMessage(TQListViewItem*)));
}
}
@@ -1958,7 +1958,7 @@ int KMHeaders::findUnread(bool aDirNext, int aStartAt, bool onlyNew, bool accept
// Find the ancestor of the unread item closest to the
// root and recursively sort all of that ancestors children.
if (item) {
- QListViewItem *next = item;
+ TQListViewItem *next = item;
while (next->parent())
next = next->parent();
next = static_cast<HeaderItem*>(next)->firstChildNonConst();
@@ -2062,7 +2062,7 @@ void KMHeaders::makeHeaderVisible()
}
//-----------------------------------------------------------------------------
-void KMHeaders::highlightMessage(QListViewItem* lvi, bool markitread)
+void KMHeaders::highlightMessage(TQListViewItem* lvi, bool markitread)
{
// shouldnt happen but will crash if it does
if (lvi && !lvi->isSelectable()) return;
@@ -2104,11 +2104,11 @@ void KMHeaders::highlightMessage(QListViewItem* lvi, bool markitread)
void KMHeaders::highlightCurrentThread()
{
- QPtrList<QListViewItem> curThread = currentThread();
- QPtrListIterator<QListViewItem> it( curThread );
+ TQPtrList<TQListViewItem> curThread = currentThread();
+ TQPtrListIterator<TQListViewItem> it( curThread );
for ( it.toFirst() ; it.current() ; ++it ) {
- QListViewItem *lvi = *it;
+ TQListViewItem *lvi = *it;
lvi->setSelected( true );
lvi->repaint();
}
@@ -2118,12 +2118,12 @@ void KMHeaders::resetCurrentTime()
{
mDate.reset();
// only reset exactly during minute switch
- QTimer::singleShot( ( 60-QTime::currentTime().second() ) * 1000,
- this, SLOT( resetCurrentTime() ) );
+ TQTimer::singleShot( ( 60-TQTime::currentTime().second() ) * 1000,
+ this, TQT_SLOT( resetCurrentTime() ) );
}
//-----------------------------------------------------------------------------
-void KMHeaders::selectMessage(QListViewItem* lvi)
+void KMHeaders::selectMessage(TQListViewItem* lvi)
{
HeaderItem *item = static_cast<HeaderItem*>(lvi);
if (!item)
@@ -2175,11 +2175,11 @@ void KMHeaders::updateMessageList( bool set_selection, bool forceJumpToUnread )
//
// Exception: When shift selecting either with mouse or key press the reader
// window is updated regardless of whether of not the selection has changed.
-void KMHeaders::keyPressEvent( QKeyEvent * e )
+void KMHeaders::keyPressEvent( TQKeyEvent * e )
{
bool cntrl = (e->state() & ControlButton );
bool shft = (e->state() & ShiftButton );
- QListViewItem *cur = currentItem();
+ TQListViewItem *cur = currentItem();
if (!e || !firstChild())
return;
@@ -2200,8 +2200,8 @@ void KMHeaders::keyPressEvent( QKeyEvent * e )
if (cntrl) {
if (!shft)
- disconnect(this,SIGNAL(currentChanged(QListViewItem*)),
- this,SLOT(highlightMessage(QListViewItem*)));
+ disconnect(this,TQT_SIGNAL(currentChanged(TQListViewItem*)),
+ this,TQT_SLOT(highlightMessage(TQListViewItem*)));
switch (e->key()) {
case Key_Down:
case Key_Up:
@@ -2213,14 +2213,14 @@ void KMHeaders::keyPressEvent( QKeyEvent * e )
KListView::keyPressEvent( e );
}
if (!shft)
- connect(this,SIGNAL(currentChanged(QListViewItem*)),
- this,SLOT(highlightMessage(QListViewItem*)));
+ connect(this,TQT_SIGNAL(currentChanged(TQListViewItem*)),
+ this,TQT_SLOT(highlightMessage(TQListViewItem*)));
}
}
//-----------------------------------------------------------------------------
// Handle RMB press, show pop up menu
-void KMHeaders::rightButtonPressed( QListViewItem *lvi, const QPoint &, int )
+void KMHeaders::rightButtonPressed( TQListViewItem *lvi, const TQPoint &, int )
{
if (!lvi)
return;
@@ -2233,10 +2233,10 @@ void KMHeaders::rightButtonPressed( QListViewItem *lvi, const QPoint &, int )
}
//-----------------------------------------------------------------------------
-void KMHeaders::contentsMousePressEvent(QMouseEvent* e)
+void KMHeaders::contentsMousePressEvent(TQMouseEvent* e)
{
mPressPos = e->pos();
- QListViewItem *lvi = itemAt( contentsToViewport( e->pos() ));
+ TQListViewItem *lvi = itemAt( contentsToViewport( e->pos() ));
bool wasSelected = false;
bool rootDecoClicked = false;
if (lvi) {
@@ -2252,8 +2252,8 @@ void KMHeaders::contentsMousePressEvent(QMouseEvent* e)
// the thread. In that case, deselect all children, so opening the thread
// doesn't cause a flicker.
if ( !lvi->isOpen() && lvi->firstChild() ) {
- QListViewItem *nextRoot = lvi->itemBelow();
- QListViewItemIterator it( lvi->firstChild() );
+ TQListViewItem *nextRoot = lvi->itemBelow();
+ TQListViewItemIterator it( lvi->firstChild() );
for( ; (*it) != nextRoot; ++it )
(*it)->setSelected( false );
}
@@ -2266,7 +2266,7 @@ void KMHeaders::contentsMousePressEvent(QMouseEvent* e)
fixed, we have to deselect hidden items here manually, so the quick
search doesn't mess things up. */
if ( e->state() & ShiftButton ) {
- QListViewItemIterator it( this, QListViewItemIterator::Invisible );
+ TQListViewItemIterator it( this, TQListViewItemIterator::Invisible );
while ( it.current() ) {
it.current()->setSelected( false );
++it;
@@ -2323,7 +2323,7 @@ void KMHeaders::contentsMousePressEvent(QMouseEvent* e)
}
//-----------------------------------------------------------------------------
-void KMHeaders::contentsMouseReleaseEvent(QMouseEvent* e)
+void KMHeaders::contentsMouseReleaseEvent(TQMouseEvent* e)
{
if (e->button() != RightButton)
KListView::contentsMouseReleaseEvent(e);
@@ -2332,16 +2332,16 @@ void KMHeaders::contentsMouseReleaseEvent(QMouseEvent* e)
}
//-----------------------------------------------------------------------------
-void KMHeaders::contentsMouseMoveEvent( QMouseEvent* e )
+void KMHeaders::contentsMouseMoveEvent( TQMouseEvent* e )
{
if (mMousePressed &&
(e->pos() - mPressPos).manhattanLength() > KGlobalSettings::dndEventDelay()) {
mMousePressed = false;
- QListViewItem *item = itemAt( contentsToViewport(mPressPos) );
+ TQListViewItem *item = itemAt( contentsToViewport(mPressPos) );
if ( item ) {
MailList mailList;
unsigned int count = 0;
- for( QListViewItemIterator it(this); it.current(); it++ )
+ for( TQListViewItemIterator it(this); it.current(); it++ )
if( it.current()->isSelected() ) {
HeaderItem *item = static_cast<HeaderItem*>(it.current());
KMMsgBase *msg = mFolder->getMsgBase(item->msgId());
@@ -2356,15 +2356,15 @@ void KMHeaders::contentsMouseMoveEvent( QMouseEvent* e )
MailListDrag *d = new MailListDrag( mailList, viewport(), new KMTextSource );
// Set pixmap
- QPixmap pixmap;
+ TQPixmap pixmap;
if( count == 1 )
- pixmap = QPixmap( DesktopIcon("message", KIcon::SizeSmall) );
+ pixmap = TQPixmap( DesktopIcon("message", KIcon::SizeSmall) );
else
- pixmap = QPixmap( DesktopIcon("kmultiple", KIcon::SizeSmall) );
+ pixmap = TQPixmap( DesktopIcon("kmultiple", KIcon::SizeSmall) );
// Calculate hotspot (as in Konqueror)
if( !pixmap.isNull() ) {
- QPoint hotspot( pixmap.width() / 2, pixmap.height() / 2 );
+ TQPoint hotspot( pixmap.width() / 2, pixmap.height() / 2 );
d->setPixmap( pixmap, hotspot );
}
if ( mFolder->isReadOnly() )
@@ -2375,7 +2375,7 @@ void KMHeaders::contentsMouseMoveEvent( QMouseEvent* e )
}
}
-void KMHeaders::highlightMessage(QListViewItem* i)
+void KMHeaders::highlightMessage(TQListViewItem* i)
{
highlightMessage( i, false );
}
@@ -2387,21 +2387,21 @@ void KMHeaders::slotRMB()
mOwner->updateMessageActions();
// check if the user clicked into a status column and only show the respective menues
- QListViewItem *item = itemAt( viewport()->mapFromGlobal( QCursor::pos() ) );
+ TQListViewItem *item = itemAt( viewport()->mapFromGlobal( TQCursor::pos() ) );
if ( item ) {
- int section = header()->sectionAt( viewportToContents( viewport()->mapFromGlobal( QCursor::pos() ) ).x() );
+ int section = header()->sectionAt( viewportToContents( viewport()->mapFromGlobal( TQCursor::pos() ) ).x() );
if ( section == mPaintInfo.flagCol || section == mPaintInfo.importantCol
|| section == mPaintInfo.todoCol || section == mPaintInfo.statusCol ) {
- mOwner->statusMenu()->popup( QCursor::pos() );
+ mOwner->statusMenu()->popup( TQCursor::pos() );
return;
}
if ( section == mPaintInfo.watchedIgnoredCol ) {
- mOwner->threadStatusMenu()->popup( QCursor::pos() );
+ mOwner->threadStatusMenu()->popup( TQCursor::pos() );
return;
}
}
- QPopupMenu *menu = new QPopupMenu(this);
+ TQPopupMenu *menu = new TQPopupMenu(this);
mMenuToFolder.clear();
@@ -2425,7 +2425,7 @@ void KMHeaders::slotRMB()
}
menu->insertSeparator();
- QPopupMenu *msgCopyMenu = new QPopupMenu(menu);
+ TQPopupMenu *msgCopyMenu = new TQPopupMenu(menu);
mOwner->folderTree()->folderToPopupMenu( KMFolderTree::CopyMessage, this,
&mMenuToFolder, msgCopyMenu );
menu->insertItem(i18n("&Copy To"), msgCopyMenu);
@@ -2434,7 +2434,7 @@ void KMHeaders::slotRMB()
int id = menu->insertItem( i18n("&Move To") );
menu->setItemEnabled( id, false );
} else {
- QPopupMenu *msgMoveMenu = new QPopupMenu(menu);
+ TQPopupMenu *msgMoveMenu = new TQPopupMenu(menu);
mOwner->folderTree()->folderToPopupMenu( KMFolderTree::MoveMessage, this,
&mMenuToFolder, msgMoveMenu );
menu->insertItem(i18n("&Move To"), msgMoveMenu);
@@ -2470,7 +2470,7 @@ void KMHeaders::slotRMB()
KAcceleratorManager::manage(menu);
kmkernel->setContextMenuShown( true );
- menu->exec(QCursor::pos(), 0);
+ menu->exec(TQCursor::pos(), 0);
kmkernel->setContextMenuShown( false );
delete menu;
}
@@ -2521,7 +2521,7 @@ void KMHeaders::setCurrentItemByIndex(int msgIdx)
//-----------------------------------------------------------------------------
int KMHeaders::topItemIndex()
{
- HeaderItem *item = static_cast<HeaderItem*>( itemAt( QPoint( 1, 1 ) ) );
+ HeaderItem *item = static_cast<HeaderItem*>( itemAt( TQPoint( 1, 1 ) ) );
if ( item )
return item->msgId();
else
@@ -2533,7 +2533,7 @@ void KMHeaders::setTopItemByIndex( int aMsgIdx)
{
if ( aMsgIdx < 0 || static_cast<unsigned int>( aMsgIdx ) >= mItems.size() )
return;
- const QListViewItem * const item = mItems[aMsgIdx];
+ const TQListViewItem * const item = mItems[aMsgIdx];
if ( item )
setContentsPos( 0, itemPos( item ) );
}
@@ -2545,8 +2545,8 @@ void KMHeaders::setNestedOverride( bool override )
mNestedOverride = override;
setRootIsDecorated( nestingPolicy != AlwaysOpen
&& isThreaded() );
- QString sortFile = mFolder->indexLocation() + ".sorted";
- unlink(QFile::encodeName(sortFile));
+ TQString sortFile = mFolder->indexLocation() + ".sorted";
+ unlink(TQFile::encodeName(sortFile));
reset();
}
@@ -2555,20 +2555,20 @@ void KMHeaders::setSubjectThreading( bool aSubjThreading )
{
mSortInfo.dirty = true;
mSubjThreading = aSubjThreading;
- QString sortFile = mFolder->indexLocation() + ".sorted";
- unlink(QFile::encodeName(sortFile));
+ TQString sortFile = mFolder->indexLocation() + ".sorted";
+ unlink(TQFile::encodeName(sortFile));
reset();
}
//-----------------------------------------------------------------------------
-void KMHeaders::setOpen( QListViewItem *item, bool open )
+void KMHeaders::setOpen( TQListViewItem *item, bool open )
{
if ((nestingPolicy != AlwaysOpen)|| open)
((HeaderItem*)item)->setOpenRecursive( open );
}
//-----------------------------------------------------------------------------
-const KMMsgBase* KMHeaders::getMsgBaseForItem( const QListViewItem *item ) const
+const KMMsgBase* KMHeaders::getMsgBaseForItem( const TQListViewItem *item ) const
{
const HeaderItem *hi = static_cast<const HeaderItem *> ( item );
return mFolder->getMsgBase( hi->msgId() );
@@ -2580,9 +2580,9 @@ void KMHeaders::setSorting( int column, bool ascending )
if (column != -1) {
// carsten: really needed?
// if (column != mSortCol)
-// setColumnText( mSortCol, QIconSet( QPixmap()), columnText( mSortCol ));
+// setColumnText( mSortCol, TQIconSet( TQPixmap()), columnText( mSortCol ));
if(mSortInfo.dirty || column != mSortInfo.column || ascending != mSortInfo.ascending) { //dirtied
- QObject::disconnect(header(), SIGNAL(clicked(int)), this, SLOT(dirtySortOrder(int)));
+ TQObject::disconnect(header(), TQT_SIGNAL(clicked(int)), this, TQT_SLOT(dirtySortOrder(int)));
mSortInfo.dirty = true;
}
@@ -2596,7 +2596,7 @@ void KMHeaders::setSorting( int column, bool ascending )
if (!ascending && (column == mPaintInfo.subCol))
mPaintInfo.status = !mPaintInfo.status;
- QString colText = i18n( "Date" );
+ TQString colText = i18n( "Date" );
if (mPaintInfo.orderOfArrival)
colText = i18n( "Order of Arrival" );
setColumnText( mPaintInfo.dateCol, colText);
@@ -2618,7 +2618,7 @@ void KMHeaders::setSorting( int column, bool ascending )
//Flatten the list and write it to disk
static void internalWriteItem(FILE *sortStream, KMFolder *folder, int msgid,
- int parent_id, QString key,
+ int parent_id, TQString key,
bool update_discover=true)
{
unsigned long msgSerNum;
@@ -2631,7 +2631,7 @@ static void internalWriteItem(FILE *sortStream, KMFolder *folder, int msgid,
fwrite(&msgSerNum, sizeof(msgSerNum), 1, sortStream);
fwrite(&parentSerNum, sizeof(parentSerNum), 1, sortStream);
- Q_INT32 len = key.length() * sizeof(QChar);
+ Q_INT32 len = key.length() * sizeof(TQChar);
fwrite(&len, sizeof(len), 1, sortStream);
if (len)
fwrite(key.unicode(), QMIN(len, KMAIL_MAX_KEY_LEN), 1, sortStream);
@@ -2665,23 +2665,23 @@ void KMHeaders::folderClosed()
bool KMHeaders::writeSortOrder()
{
- QString sortFile = KMAIL_SORT_FILE(mFolder);
+ TQString sortFile = KMAIL_SORT_FILE(mFolder);
if (!mSortInfo.dirty) {
struct stat stat_tmp;
- if(stat(QFile::encodeName(sortFile), &stat_tmp) == -1) {
+ if(stat(TQFile::encodeName(sortFile), &stat_tmp) == -1) {
mSortInfo.dirty = true;
}
}
if (mSortInfo.dirty) {
if (!mFolder->count()) {
// Folder is empty now, remove the sort file.
- unlink(QFile::encodeName(sortFile));
+ unlink(TQFile::encodeName(sortFile));
return true;
}
- QString tempName = sortFile + ".temp";
- unlink(QFile::encodeName(tempName));
- FILE *sortStream = fopen(QFile::encodeName(tempName), "w");
+ TQString tempName = sortFile + ".temp";
+ unlink(TQFile::encodeName(tempName));
+ FILE *sortStream = fopen(TQFile::encodeName(tempName), "w");
if (!sortStream)
return false;
@@ -2705,10 +2705,10 @@ bool KMHeaders::writeSortOrder()
fwrite(&discovered_count, sizeof(discovered_count), 1, sortStream);
fwrite(&sorted_count, sizeof(sorted_count), 1, sortStream);
- QPtrStack<HeaderItem> items;
+ TQPtrStack<HeaderItem> items;
{
- QPtrStack<QListViewItem> s;
- for (QListViewItem * i = firstChild(); i; ) {
+ TQPtrStack<TQListViewItem> s;
+ for (TQListViewItem * i = firstChild(); i; ) {
items.push((HeaderItem *)i);
if ( i->firstChild() ) {
s.push( i );
@@ -2730,8 +2730,8 @@ bool KMHeaders::writeSortOrder()
assert(kmb); // I have seen 0L come out of this, called from
// KMHeaders::setFolder(0xgoodpointer, false);
// I see this crash too. after rebuilding a broken index on a dimap folder. always
- QString replymd5 = kmb->replyToIdMD5();
- QString replyToAuxId = kmb->replyToAuxIdMD5();
+ TQString replymd5 = kmb->replyToIdMD5();
+ TQString replyToAuxId = kmb->replyToAuxIdMD5();
SortCacheItem *p = NULL;
if(!replymd5.isEmpty())
p = mSortCacheItems[replymd5];
@@ -2768,13 +2768,13 @@ bool KMHeaders::writeSortOrder()
fwrite(&sorted_count, sizeof(sorted_count), 1, sortStream);
if (sortStream && ferror(sortStream)) {
fclose(sortStream);
- unlink(QFile::encodeName(sortFile));
+ unlink(TQFile::encodeName(sortFile));
kdWarning(5006) << "Error: Failure modifying " << sortFile << " (No space left on device?)" << endl;
kdWarning(5006) << __FILE__ << ":" << __LINE__ << endl;
kmkernel->emergencyExit( i18n("Failure modifying %1\n(No space left on device?)").arg( sortFile ));
}
fclose(sortStream);
- ::rename(QFile::encodeName(tempName), QFile::encodeName(sortFile));
+ ::rename(TQFile::encodeName(tempName), TQFile::encodeName(sortFile));
}
return true;
@@ -2782,8 +2782,8 @@ bool KMHeaders::writeSortOrder()
void KMHeaders::appendItemToSortFile(HeaderItem *khi)
{
- QString sortFile = KMAIL_SORT_FILE(mFolder);
- if(FILE *sortStream = fopen(QFile::encodeName(sortFile), "r+")) {
+ TQString sortFile = KMAIL_SORT_FILE(mFolder);
+ if(FILE *sortStream = fopen(TQFile::encodeName(sortFile), "r+")) {
int parent_id = -1; //no parent, top level
if (isThreaded()) {
@@ -2808,7 +2808,7 @@ void KMHeaders::appendItemToSortFile(HeaderItem *khi)
if (sortStream && ferror(sortStream)) {
fclose(sortStream);
- unlink(QFile::encodeName(sortFile));
+ unlink(TQFile::encodeName(sortFile));
kdWarning(5006) << "Error: Failure modifying " << sortFile << " (No space left on device?)" << endl;
kdWarning(5006) << __FILE__ << ":" << __LINE__ << endl;
kmkernel->emergencyExit( i18n("Failure modifying %1\n(No space left on device?)").arg( sortFile ));
@@ -2822,7 +2822,7 @@ void KMHeaders::appendItemToSortFile(HeaderItem *khi)
void KMHeaders::dirtySortOrder(int column)
{
mSortInfo.dirty = true;
- QObject::disconnect(header(), SIGNAL(clicked(int)), this, SLOT(dirtySortOrder(int)));
+ TQObject::disconnect(header(), TQT_SIGNAL(clicked(int)), this, TQT_SLOT(dirtySortOrder(int)));
setSorting(column, mSortInfo.column == column ? !mSortInfo.ascending : true);
}
@@ -2862,11 +2862,11 @@ static int compare_SortCacheItem(const void *s1, const void *s2)
// Debugging helpers
void KMHeaders::printSubjectThreadingTree()
{
- QDictIterator< QPtrList< SortCacheItem > > it ( mSubjectLists );
+ TQDictIterator< TQPtrList< SortCacheItem > > it ( mSubjectLists );
kdDebug(5006) << "SubjectThreading tree: " << endl;
for( ; it.current(); ++it ) {
- QPtrList<SortCacheItem> list = *( it.current() );
- QPtrListIterator<SortCacheItem> it2( list ) ;
+ TQPtrList<SortCacheItem> list = *( it.current() );
+ TQPtrListIterator<SortCacheItem> it2( list ) ;
kdDebug(5006) << "Subject MD5: " << it.currentKey() << " list: " << endl;
for( ; it2.current(); ++it2 ) {
SortCacheItem *sci = it2.current();
@@ -2879,7 +2879,7 @@ void KMHeaders::printSubjectThreadingTree()
void KMHeaders::printThreadingTree()
{
kdDebug(5006) << "Threading tree: " << endl;
- QDictIterator<SortCacheItem> it( mSortCacheItems );
+ TQDictIterator<SortCacheItem> it( mSortCacheItems );
kdDebug(5006) << endl;
for( ; it.current(); ++it ) {
SortCacheItem *sci = it.current();
@@ -2896,7 +2896,7 @@ void KMHeaders::printThreadingTree()
// -------------------------------------
-void KMHeaders::buildThreadingTree( QMemArray<SortCacheItem *> sortCache )
+void KMHeaders::buildThreadingTree( TQMemArray<SortCacheItem *> sortCache )
{
mSortCacheItems.clear();
mSortCacheItems.resize( mFolder->count() * 2 );
@@ -2904,14 +2904,14 @@ void KMHeaders::buildThreadingTree( QMemArray<SortCacheItem *> sortCache )
// build a dict of all message id's
for(int x = 0; x < mFolder->count(); x++) {
KMMsgBase *mi = mFolder->getMsgBase(x);
- QString md5 = mi->msgIdMD5();
+ TQString md5 = mi->msgIdMD5();
if(!md5.isEmpty())
mSortCacheItems.replace(md5, sortCache[x]);
}
}
-void KMHeaders::buildSubjectThreadingTree( QMemArray<SortCacheItem *> sortCache )
+void KMHeaders::buildSubjectThreadingTree( TQMemArray<SortCacheItem *> sortCache )
{
mSubjectLists.clear(); // autoDelete is true
mSubjectLists.resize( mFolder->count() * 2 );
@@ -2921,7 +2921,7 @@ void KMHeaders::buildSubjectThreadingTree( QMemArray<SortCacheItem *> sortCache
if ( sortCache[x]->parent()
&& sortCache[x]->parent()->id() != -666 ) continue;
KMMsgBase *mi = mFolder->getMsgBase(x);
- QString subjMD5 = mi->strippedSubjectMD5();
+ TQString subjMD5 = mi->strippedSubjectMD5();
if (subjMD5.isEmpty()) {
mFolder->getMsgBase(x)->initStrippedSubjectMD5();
subjMD5 = mFolder->getMsgBase(x)->strippedSubjectMD5();
@@ -2931,13 +2931,13 @@ void KMHeaders::buildSubjectThreadingTree( QMemArray<SortCacheItem *> sortCache
/* For each subject, keep a list of items with that subject
* (stripped of prefixes) sorted by date. */
if (!mSubjectLists.find(subjMD5))
- mSubjectLists.insert(subjMD5, new QPtrList<SortCacheItem>());
+ mSubjectLists.insert(subjMD5, new TQPtrList<SortCacheItem>());
/* Insertion sort by date. These lists are expected to be very small.
* Also, since the messages are roughly ordered by date in the store,
* they should mostly be prepended at the very start, so insertion is
* cheap. */
int p=0;
- for (QPtrListIterator<SortCacheItem> it(*mSubjectLists[subjMD5]);
+ for (TQPtrListIterator<SortCacheItem> it(*mSubjectLists[subjMD5]);
it.current(); ++it) {
KMMsgBase *mb = mFolder->getMsgBase((*it)->id());
if ( mb->date() < mi->date())
@@ -2955,7 +2955,7 @@ SortCacheItem* KMHeaders::findParent(SortCacheItem *item)
SortCacheItem *parent = NULL;
if (!item) return parent;
KMMsgBase *msg = mFolder->getMsgBase(item->id());
- QString replyToIdMD5 = msg->replyToIdMD5();
+ TQString replyToIdMD5 = msg->replyToIdMD5();
item->setImperfectlyThreaded(true);
/* First, try if the message our Reply-To header points to
* is available to thread below. */
@@ -2971,7 +2971,7 @@ SortCacheItem* KMHeaders::findParent(SortCacheItem *item)
// example, try the list of references, because the second
// to last will likely be in this folder. replyToAuxIdMD5
// contains the second to last one.
- QString ref = msg->replyToAuxIdMD5();
+ TQString ref = msg->replyToAuxIdMD5();
if (!ref.isEmpty())
parent = mSortCacheItems[ref];
}
@@ -2991,12 +2991,12 @@ SortCacheItem* KMHeaders::findParentBySubject(SortCacheItem *item)
if (!msg->subjectIsPrefixed())
return parent;
- QString replyToIdMD5 = msg->replyToIdMD5();
- QString subjMD5 = msg->strippedSubjectMD5();
+ TQString replyToIdMD5 = msg->replyToIdMD5();
+ TQString subjMD5 = msg->strippedSubjectMD5();
if (!subjMD5.isEmpty() && mSubjectLists[subjMD5]) {
/* Iterate over the list of potential parents with the same
* subject, and take the closest one by date. */
- for (QPtrListIterator<SortCacheItem> it2(*mSubjectLists[subjMD5]);
+ for (TQPtrListIterator<SortCacheItem> it2(*mSubjectLists[subjMD5]);
it2.current(); ++it2) {
KMMsgBase *mb = mFolder->getMsgBase((*it2)->id());
if ( !mb ) return parent;
@@ -3027,11 +3027,11 @@ bool KMHeaders::readSortOrder( bool set_selection, bool forceJumpToUnread )
bool jumpToUnread = (GlobalSettings::self()->actionEnterFolder() ==
GlobalSettings::EnumActionEnterFolder::SelectFirstUnreadNew) ||
forceJumpToUnread;
- QMemArray<SortCacheItem *> sortCache(mFolder->count());
+ TQMemArray<SortCacheItem *> sortCache(mFolder->count());
bool error = false;
//threaded cases
- QPtrList<SortCacheItem> unparented;
+ TQPtrList<SortCacheItem> unparented;
mImperfectlyThreadedList.clear();
//cleanup
@@ -3040,8 +3040,8 @@ bool KMHeaders::readSortOrder( bool set_selection, bool forceJumpToUnread )
mRoot->clearChildren();
- QString sortFile = KMAIL_SORT_FILE(mFolder);
- FILE *sortStream = fopen(QFile::encodeName(sortFile), "r+");
+ TQString sortFile = KMAIL_SORT_FILE(mFolder);
+ FILE *sortStream = fopen(TQFile::encodeName(sortFile), "r+");
mSortInfo.fakeSort = 0;
if(sortStream) {
@@ -3064,7 +3064,7 @@ bool KMHeaders::readSortOrder( bool set_selection, bool forceJumpToUnread )
//Hackyness to work around qlistview problems
KListView::setSorting(-1);
header()->setSortIndicator(column, ascending);
- QObject::connect(header(), SIGNAL(clicked(int)), this, SLOT(dirtySortOrder(int)));
+ TQObject::connect(header(), TQT_SIGNAL(clicked(int)), this, TQT_SLOT(dirtySortOrder(int)));
//setup mSortInfo here now, as above may change it
mSortInfo.dirty = false;
mSortInfo.column = (short)column;
@@ -3073,10 +3073,10 @@ bool KMHeaders::readSortOrder( bool set_selection, bool forceJumpToUnread )
SortCacheItem *item;
unsigned long serNum, parentSerNum;
int id, len, parent, x;
- QChar *tmp_qchar = 0;
+ TQChar *tmp_qchar = 0;
int tmp_qchar_len = 0;
const int mFolderCount = mFolder->count();
- QString key;
+ TQString key;
CREATE_TIMER(parse);
START_TIMER(parse);
@@ -3096,14 +3096,14 @@ bool KMHeaders::readSortOrder( bool set_selection, bool forceJumpToUnread )
}
if(len) {
if(len > tmp_qchar_len) {
- tmp_qchar = (QChar *)realloc(tmp_qchar, len);
+ tmp_qchar = (TQChar *)realloc(tmp_qchar, len);
tmp_qchar_len = len;
}
if(!fread(tmp_qchar, len, 1, sortStream))
break;
- key = QString(tmp_qchar, len / 2);
+ key = TQString(tmp_qchar, len / 2);
} else {
- key = QString(""); //yuck
+ key = TQString(""); //yuck
}
KMMsgDict::instance()->getLocation(serNum, &folder, &id);
@@ -3215,13 +3215,13 @@ bool KMHeaders::readSortOrder( bool set_selection, bool forceJumpToUnread )
// Make sure we've placed everything in parent/child relationship. All
// messages with a parent id of -1 in the sort file are reevaluated here.
if (threaded) buildThreadingTree( sortCache );
- QPtrList<SortCacheItem> toBeSubjThreaded;
+ TQPtrList<SortCacheItem> toBeSubjThreaded;
if (threaded && !unparented.isEmpty()) {
CREATE_TIMER(reparent);
START_TIMER(reparent);
- for(QPtrListIterator<SortCacheItem> it(unparented); it.current(); ++it) {
+ for(TQPtrListIterator<SortCacheItem> it(unparented); it.current(); ++it) {
SortCacheItem *item = (*it);
SortCacheItem *parent = findParent( item );
// If we have a parent, make sure it's not ourselves
@@ -3241,7 +3241,7 @@ bool KMHeaders::readSortOrder( bool set_selection, bool forceJumpToUnread )
if (mSubjThreading) {
buildSubjectThreadingTree( sortCache );
- for(QPtrListIterator<SortCacheItem> it(toBeSubjThreaded); it.current(); ++it) {
+ for(TQPtrListIterator<SortCacheItem> it(toBeSubjThreaded); it.current(); ++it) {
SortCacheItem *item = (*it);
SortCacheItem *parent = findParentBySubject( item );
@@ -3263,12 +3263,12 @@ bool KMHeaders::readSortOrder( bool set_selection, bool forceJumpToUnread )
START_TIMER(header_creation);
HeaderItem *khi;
SortCacheItem *i, *new_kci;
- QPtrQueue<SortCacheItem> s;
+ TQPtrQueue<SortCacheItem> s;
s.enqueue(mRoot);
compare_toplevel = true;
do {
i = s.dequeue();
- const QPtrList<SortCacheItem> *sorted = i->sortedChildren();
+ const TQPtrList<SortCacheItem> *sorted = i->sortedChildren();
int unsorted_count, unsorted_off=0;
SortCacheItem **unsorted = i->unsortedChildren(unsorted_count);
if(unsorted)
@@ -3279,7 +3279,7 @@ bool KMHeaders::readSortOrder( bool set_selection, bool forceJumpToUnread )
* the (aptly named) unsorted array contains all as of yet unsorted
* ones. It has just been qsorted, so it is in itself sorted. These two
* sorted lists are now merged into one. */
- for(QPtrListIterator<SortCacheItem> it(*sorted);
+ for(TQPtrListIterator<SortCacheItem> it(*sorted);
(unsorted && unsorted_off < unsorted_count) || it.current(); ) {
/* As long as we have something in the sorted list and there is
nothing unsorted left, use the item from the sorted list. Also
@@ -3426,7 +3426,7 @@ bool KMHeaders::readSortOrder( bool set_selection, bool forceJumpToUnread )
if (error || (sortStream && ferror(sortStream))) {
if ( sortStream )
fclose(sortStream);
- unlink(QFile::encodeName(sortFile));
+ unlink(TQFile::encodeName(sortFile));
kdWarning(5006) << "Error: Failure modifying " << sortFile << " (No space left on device?)" << endl;
kdWarning(5006) << __FILE__ << ":" << __LINE__ << endl;
@@ -3515,7 +3515,7 @@ void KMHeaders::updateActions()
paste->setEnabled( true );
}
-void KMHeaders::setCopiedMessages(const QValueList< Q_UINT32 > & msgs, bool move)
+void KMHeaders::setCopiedMessages(const TQValueList< Q_UINT32 > & msgs, bool move)
{
mCopiedMessages = msgs;
mMoveMessages = move;
@@ -3527,10 +3527,10 @@ bool KMHeaders::isMessageCut(Q_UINT32 serNum) const
return mMoveMessages && mCopiedMessages.contains( serNum );
}
-QValueList< Q_UINT32 > KMHeaders::selectedSernums()
+TQValueList< Q_UINT32 > KMHeaders::selectedSernums()
{
- QValueList<Q_UINT32> list;
- for ( QListViewItemIterator it(this); it.current(); it++ ) {
+ TQValueList<Q_UINT32> list;
+ for ( TQListViewItemIterator it(this); it.current(); it++ ) {
if ( it.current()->isSelected() && it.current()->isVisible() ) {
HeaderItem* item = static_cast<HeaderItem*>( it.current() );
KMMsgBase *msgBase = mFolder->getMsgBase( item->msgId() );
@@ -3540,20 +3540,20 @@ QValueList< Q_UINT32 > KMHeaders::selectedSernums()
return list;
}
-QValueList< Q_UINT32 > KMHeaders::selectedVisibleSernums()
+TQValueList< Q_UINT32 > KMHeaders::selectedVisibleSernums()
{
- QValueList<Q_UINT32> list;
- QListViewItemIterator it(this, QListViewItemIterator::Selected|QListViewItemIterator::Visible);
+ TQValueList<Q_UINT32> list;
+ TQListViewItemIterator it(this, TQListViewItemIterator::Selected|TQListViewItemIterator::Visible);
while( it.current() ) {
if ( it.current()->isSelected() && it.current()->isVisible() ) {
if ( it.current()->parent() && ( !it.current()->parent()->isOpen() ) ) {
// the item's parent is closed, don't traverse any more of this subtree
- QListViewItem * lastAncestorWithSiblings = it.current()->parent();
+ TQListViewItem * lastAncestorWithSiblings = it.current()->parent();
// travel towards the root until we find an ancestor with siblings
while ( ( lastAncestorWithSiblings->depth() > 0 ) && !lastAncestorWithSiblings->nextSibling() )
lastAncestorWithSiblings = lastAncestorWithSiblings->parent();
// move the iterator to that ancestor's next sibling
- it = QListViewItemIterator( lastAncestorWithSiblings->nextSibling() );
+ it = TQListViewItemIterator( lastAncestorWithSiblings->nextSibling() );
continue;
}
HeaderItem *item = static_cast<HeaderItem*>(it.current());
diff --git a/kmail/kmheaders.h b/kmail/kmheaders.h
index 40487f8d9..bb49a1440 100644
--- a/kmail/kmheaders.h
+++ b/kmail/kmheaders.h
@@ -12,13 +12,13 @@ using KMail::HeaderItem;
#include <kfoldertree.h> // for KPaintInfo
#include <kmmsgbase.h> // for KMMsgStatus
-#include <qwidget.h>
-#include <qstrlist.h>
-#include <qmemarray.h>
-#include <qmap.h>
-#include <qdragobject.h>
-#include <qdict.h>
-#include <qguardedptr.h>
+#include <tqwidget.h>
+#include <tqstrlist.h>
+#include <tqmemarray.h>
+#include <tqmap.h>
+#include <tqdragobject.h>
+#include <tqdict.h>
+#include <tqguardedptr.h>
class KMFolder;
class KMMessage;
@@ -31,9 +31,9 @@ class QPixmap;
class QIconSet;
class QDateTime;
-typedef QPtrList<KMMsgBase> KMMessageList;
-typedef QValueList<Q_UINT32> SerNumList;
-typedef QMap<int,KMFolder*> KMMenuToFolder;
+typedef TQPtrList<KMMsgBase> KMMessageList;
+typedef TQValueList<Q_UINT32> SerNumList;
+typedef TQMap<int,KMFolder*> KMMenuToFolder;
enum NestingPolicy { AlwaysOpen = 0, DefaultOpen, DefaultClosed, OpenUnread };
@@ -52,7 +52,7 @@ class KMHeaders : public KListView
friend class ::KMail::HeaderItem; // For easy access to the pixmaps
public:
- KMHeaders(KMMainWidget *owner, QWidget *parent=0, const char *name=0);
+ KMHeaders(KMMainWidget *owner, TQWidget *parent=0, const char *name=0);
virtual ~KMHeaders();
/** A new folder has been selected update the list of headers shown
@@ -72,7 +72,7 @@ public:
virtual void setCurrentMsg(int msgId);
/** Get a list of all items in the current thread */
- QPtrList<QListViewItem> currentThread() const;
+ TQPtrList<TQListViewItem> currentThread() const;
/** Set all messages in the current thread to status @p status
or toggle it, if specified. */
@@ -108,15 +108,15 @@ public:
virtual KMMessageList* selectedMsgs(bool toBeDeleted = false);
/** Returns the index values of currently selected items */
- QValueList<int> selectedItems();
+ TQValueList<int> selectedItems();
/** Returns the sernums of all selected items. */
- QValueList<Q_UINT32> selectedSernums();
+ TQValueList<Q_UINT32> selectedSernums();
/** Returns the sernums of all visible (ie. items with expanded parent, not hidden by
eg. the quick search) selected items.
*/
- QValueList<Q_UINT32> selectedVisibleSernums();
+ TQValueList<Q_UINT32> selectedVisibleSernums();
/** Returns index of message returned by last getMsg() call */
int indexOfGetMsg (void) const { return getMsgIndex; }
@@ -151,7 +151,7 @@ public:
virtual void setNestedOverride( bool override );
virtual void setSubjectThreading( bool subjThreading );
/** Double force items to always be open */
- virtual void setOpen ( QListViewItem *, bool );
+ virtual void setOpen ( TQListViewItem *, bool );
NestingPolicy getNestingPolicy() const { return nestingPolicy; }
/** Returns true if the current header list is threaded. */
@@ -163,33 +163,33 @@ public:
is unset. */
virtual int findUnread(bool findNext, int startAt=-1, bool onlyNew = false, bool acceptCurrent = false);
- void highlightMessage(QListViewItem*, bool markitread);
+ void highlightMessage(TQListViewItem*, bool markitread);
void highlightCurrentThread();
/** return a string relativ to the current time */
- static QString fancyDate( time_t otime );
+ static TQString fancyDate( time_t otime );
bool noRepaint;
// filter events for popup
- bool eventFilter ( QObject *o, QEvent *e );
+ bool eventFilter ( TQObject *o, TQEvent *e );
/** gets the message represented by the item as a KMMsgBase. */
- const KMMsgBase * getMsgBaseForItem( const QListViewItem *item ) const;
+ const KMMsgBase * getMsgBaseForItem( const TQListViewItem *item ) const;
// accessors
- QFont newFont() const { return mNewFont; }
- QFont unreadFont() const { return mUnreadFont; }
- QFont importantFont() const { return mImportantFont; }
- QFont todoFont() const { return mTodoFont; }
- QFont dateFont() const { return mDateFont; }
+ TQFont newFont() const { return mNewFont; }
+ TQFont unreadFont() const { return mUnreadFont; }
+ TQFont importantFont() const { return mImportantFont; }
+ TQFont todoFont() const { return mTodoFont; }
+ TQFont dateFont() const { return mDateFont; }
/**
Sets the list of copied/cutted messages.
@param msgs A list of serial numbers.
@param move if true, the messages were cutted
*/
- void setCopiedMessages( const QValueList<Q_UINT32> &msgs, bool move );
+ void setCopiedMessages( const TQValueList<Q_UINT32> &msgs, bool move );
/**
Returns true if the message with the given serial number has been cut.
@@ -214,13 +214,13 @@ signals:
* from the ctor of the item, at which point the building of the item
* is not yet far enough along to update the quick search, which is
* what is connected to this signal. */
- void msgAddedToListView( QListViewItem* );
+ void msgAddedToListView( TQListViewItem* );
public slots:
/** For when a list view item has been double clicked */
- void selectMessage(QListViewItem*);
+ void selectMessage(TQListViewItem*);
/** For when a list view item has been selected */
- void highlightMessage(QListViewItem*);
+ void highlightMessage(TQListViewItem*);
/** For when righ mouse button is pressed */
void slotRMB();
/** Refresh list view item corresponding to the messae with the given id */
@@ -234,7 +234,7 @@ public slots:
/** For when the message with the given message id has been added to a folder */
void msgAdded(int);
/** For when the message with the given id has been removed for a folder */
- void msgRemoved( int, QString );
+ void msgRemoved( int, TQString );
/** Make the next header visible scrolling if necessary */
void nextMessage();
/** Same as nextMessage() but don't clear the current selection */
@@ -274,12 +274,12 @@ public slots:
/** Select an item and if it is the parent of a closed thread, also
recursively select its children. */
- virtual void setSelected(QListViewItem *item, bool selected);
+ virtual void setSelected(TQListViewItem *item, bool selected);
/** Select several items by message index
* and if they are the parent of a closed thread, also
* recursively select their children. */
- void setSelectedByIndex(QValueList<int> items, bool selected);
+ void setSelectedByIndex(TQValueList<int> items, bool selected);
/** switch a column with the given id (see KPaintInfo enum)
1 for activate, 0 for deactivate, -1 for toggle*/
@@ -289,7 +289,7 @@ public slots:
void setFolderInfoStatus();
protected:
- static QPixmap *pixNew, *pixUns, *pixDel, *pixRead, *pixRep, *pixSent,
+ static TQPixmap *pixNew, *pixUns, *pixDel, *pixRead, *pixRep, *pixSent,
*pixQueued, *pixFwd, *pixFlag, *pixWatched, *pixIgnored, *pixSpam, *pixHam,
*pixFullySigned, *pixPartiallySigned, *pixUndefinedSigned,
*pixFullyEncrypted, *pixPartiallyEncrypted, *pixUndefinedEncrypted,
@@ -298,10 +298,10 @@ protected:
*pixReadFwd, *pixReadReplied, *pixReadFwdReplied,*pixTodo;
/** Look for color changes */
- virtual bool event(QEvent *e);
+ virtual bool event(TQEvent *e);
/** Overridden to support backing pixmap */
- virtual void paintEmptyArea( QPainter * p, const QRect & rect );
+ virtual void paintEmptyArea( TQPainter * p, const TQRect & rect );
/** Ensure the current item is visible */
void makeHeaderVisible();
@@ -325,19 +325,19 @@ protected:
virtual void writeConfig(void);
/** Handle shift and control selection */
- virtual void contentsMousePressEvent(QMouseEvent*);
- virtual void contentsMouseReleaseEvent(QMouseEvent* e);
- virtual void keyPressEvent( QKeyEvent * e );
+ virtual void contentsMousePressEvent(TQMouseEvent*);
+ virtual void contentsMouseReleaseEvent(TQMouseEvent* e);
+ virtual void keyPressEvent( TQKeyEvent * e );
/** Called when a header is clicked */
virtual void setSorting( int column, bool ascending = true);
/** To initiate a drag operation */
- void contentsMouseMoveEvent( QMouseEvent *e );
+ void contentsMouseMoveEvent( TQMouseEvent *e );
/** reimplemented in order to update the frame width in case of a changed
GUI style */
- void styleChange( QStyle& oldStyle );
+ void styleChange( TQStyle& oldStyle );
/** Set the width of the frame to a reasonable value for the current GUI
style */
@@ -354,7 +354,7 @@ protected slots:
/** dirties the sort order */
void dirtySortOrder(int);
/** show context menu */
- void rightButtonPressed( QListViewItem *, const QPoint &, int );
+ void rightButtonPressed( TQListViewItem *, const TQPoint &, int );
private slots:
void slotMoveCompleted( KMCommand * );
@@ -372,7 +372,7 @@ private:
bool forceJumpToUnread = false );
/** Currently associated folder */
- QGuardedPtr<KMFolder> mFolder;
+ TQGuardedPtr<KMFolder> mFolder;
/** The KMMainWin for status bar updates */
KMMainWidget* mOwner;
/** Top most visible item */
@@ -382,7 +382,7 @@ private:
/** Serial number of the current item */
unsigned long mCurrentItemSerNum;
/** Map messages ids into HeaderItems */
- QMemArray<HeaderItem*> mItems;
+ TQMemArray<HeaderItem*> mItems;
// ===== threading and sorting ==========
bool mNested, mNestedOverride, mSubjThreading;
@@ -400,19 +400,19 @@ private:
/** */
- QDict< SortCacheItem > mSortCacheItems;
+ TQDict< SortCacheItem > mSortCacheItems;
/** */
- QDict< QPtrList< SortCacheItem > > mSubjectLists;
+ TQDict< TQPtrList< SortCacheItem > > mSubjectLists;
/** */
- QPtrList<HeaderItem> mImperfectlyThreadedList;
+ TQPtrList<HeaderItem> mImperfectlyThreadedList;
/** Debugging helpers for outputting the threading data structures. */
void printSubjectThreadingTree( );
void printThreadingTree( );
/** Initializes the mSortCacheItems tree with the contents of the folder */
- void buildThreadingTree( QMemArray<SortCacheItem *> sortCache );
+ void buildThreadingTree( TQMemArray<SortCacheItem *> sortCache );
/** Initializes the mSubjectLists tree with the contents of the folder */
- void buildSubjectThreadingTree( QMemArray<SortCacheItem *> sortCache );
+ void buildSubjectThreadingTree( TQMemArray<SortCacheItem *> sortCache );
/** Find a msg to thread item below */
SortCacheItem* findParent(SortCacheItem *item);
/** Find a msg to thread item below by subject */
@@ -440,17 +440,17 @@ private:
/** Current colours and backing pixmap */
KPaintInfo mPaintInfo;
- QFont mNewFont, mUnreadFont, mImportantFont, mDateFont,mTodoFont;
+ TQFont mNewFont, mUnreadFont, mImportantFont, mDateFont,mTodoFont;
/** Icons shown in header */
- static QIconSet *up, *down;
+ static TQIconSet *up, *down;
/** Map menu id into a folder */
KMMenuToFolder mMenuToFolder;
/** Drag and drop support */
bool mMousePressed;
/** ditto */
- QPoint mPressPos;
+ TQPoint mPressPos;
KMime::DateFormatter mDate;
bool mReaderWindowActive;
@@ -459,7 +459,7 @@ private:
KPopupMenu* mPopup;
// copied messages
- QValueList<Q_UINT32> mCopiedMessages;
+ TQValueList<Q_UINT32> mCopiedMessages;
bool mMoveMessages;
}; // class
#endif
diff --git a/kmail/kmkernel.cpp b/kmail/kmkernel.cpp
index a686cffd6..9bff9a72c 100644
--- a/kmail/kmkernel.cpp
+++ b/kmail/kmkernel.cpp
@@ -72,10 +72,10 @@ using KWallet::Wallet;
#include "actionscheduler.h"
#include <qutf7codec.h>
-#include <qvbox.h>
-#include <qdir.h>
-#include <qwidgetlist.h>
-#include <qobjectlist.h>
+#include <tqvbox.h>
+#include <tqdir.h>
+#include <tqwidgetlist.h>
+#include <tqobjectlist.h>
#include <sys/types.h>
#include <dirent.h>
@@ -95,8 +95,8 @@ KMKernel *KMKernel::mySelf = 0;
/********************************************************************/
/* Constructor and destructor */
/********************************************************************/
-KMKernel::KMKernel (QObject *parent, const char *name) :
- DCOPObject("KMailIface"), QObject(parent, name),
+KMKernel::KMKernel (TQObject *parent, const char *name) :
+ DCOPObject("KMailIface"), TQObject(parent, name),
mIdentityManager(0), mConfigureDialog(0),
mContextMenuShown( false ), mWallet( 0 )
{
@@ -145,7 +145,7 @@ KMKernel::KMKernel (QObject *parent, const char *name) :
// register our own (libkdenetwork) utf-7 codec as long as Qt
// doesn't have it's own:
- if ( !QTextCodec::codecForName("utf-7") ) {
+ if ( !TQTextCodec::codecForName("utf-7") ) {
kdDebug(5006) << "No Qt-native utf-7 codec found; registering QUtf7Codec from libkdenetwork" << endl;
(void) new QUtf7Codec();
}
@@ -153,24 +153,24 @@ KMKernel::KMKernel (QObject *parent, const char *name) :
// In the case of Japan. Japanese locale name is "eucjp" but
// The Japanese mail systems normally used "iso-2022-jp" of locale name.
// We want to change locale name from eucjp to iso-2022-jp at KMail only.
- if ( QCString(QTextCodec::codecForLocale()->name()).lower() == "eucjp" )
+ if ( TQCString(TQTextCodec::codecForLocale()->name()).lower() == "eucjp" )
{
- netCodec = QTextCodec::codecForName("jis7");
- // QTextCodec *cdc = QTextCodec::codecForName("jis7");
- // QTextCodec::setCodecForLocale(cdc);
+ netCodec = TQTextCodec::codecForName("jis7");
+ // TQTextCodec *cdc = TQTextCodec::codecForName("jis7");
+ // TQTextCodec::setCodecForLocale(cdc);
// KGlobal::locale()->setEncoding(cdc->mibEnum());
} else {
- netCodec = QTextCodec::codecForLocale();
+ netCodec = TQTextCodec::codecForLocale();
}
mMailService = new MailServiceImpl();
- connectDCOPSignal( 0, 0, "kmailSelectFolder(QString)",
- "selectFolder(QString)", false );
+ connectDCOPSignal( 0, 0, "kmailSelectFolder(TQString)",
+ "selectFolder(TQString)", false );
}
KMKernel::~KMKernel ()
{
- QMap<KIO::Job*, putData>::Iterator it = mPutJobs.begin();
+ TQMap<KIO::Job*, putData>::Iterator it = mPutJobs.begin();
while ( it != mPutJobs.end() )
{
KIO::Job *job = it.key();
@@ -193,7 +193,7 @@ KMKernel::~KMKernel ()
bool KMKernel::handleCommandLine( bool noArgsOpensReader )
{
- QString to, cc, bcc, subj, body;
+ TQString to, cc, bcc, subj, body;
QCStringList customHeaders;
KURL messageFile;
KURL::List attachURLs;
@@ -206,7 +206,7 @@ bool KMKernel::handleCommandLine( bool noArgsOpensReader )
KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
if (args->getOption("subject"))
{
- subj = QString::fromLocal8Bit(args->getOption("subject"));
+ subj = TQString::fromLocal8Bit(args->getOption("subject"));
// if kmail is called with 'kmail -session abc' then this doesn't mean
// that the user wants to send a message with subject "ession" but
// (most likely) that the user clicked on KMail's system tray applet
@@ -215,7 +215,7 @@ bool KMKernel::handleCommandLine( bool noArgsOpensReader )
// command line arguments and those include "-session ..." if
// kmail/kontact was restored by session management
if ( subj == "ession" ) {
- subj = QString::null;
+ subj = TQString::null;
calledWithSession = true;
}
else
@@ -225,25 +225,25 @@ bool KMKernel::handleCommandLine( bool noArgsOpensReader )
if (args->getOption("cc"))
{
mailto = true;
- cc = QString::fromLocal8Bit(args->getOption("cc"));
+ cc = TQString::fromLocal8Bit(args->getOption("cc"));
}
if (args->getOption("bcc"))
{
mailto = true;
- bcc = QString::fromLocal8Bit(args->getOption("bcc"));
+ bcc = TQString::fromLocal8Bit(args->getOption("bcc"));
}
if (args->getOption("msg"))
{
mailto = true;
- messageFile.setPath( QString::fromLocal8Bit(args->getOption("msg")) );
+ messageFile.setPath( TQString::fromLocal8Bit(args->getOption("msg")) );
}
if (args->getOption("body"))
{
mailto = true;
- body = QString::fromLocal8Bit(args->getOption("body"));
+ body = TQString::fromLocal8Bit(args->getOption("body"));
}
QCStringList attachList = args->getOptionList("attach");
@@ -252,7 +252,7 @@ bool KMKernel::handleCommandLine( bool noArgsOpensReader )
mailto = true;
for ( QCStringList::Iterator it = attachList.begin() ; it != attachList.end() ; ++it )
if ( !(*it).isEmpty() )
- attachURLs += KURL( QString::fromLocal8Bit( *it ) );
+ attachURLs += KURL( TQString::fromLocal8Bit( *it ) );
}
customHeaders = args->getOptionList("header");
@@ -265,8 +265,8 @@ bool KMKernel::handleCommandLine( bool noArgsOpensReader )
if ( args->getOption( "view" ) ) {
viewOnly = true;
- const QString filename =
- QString::fromLocal8Bit( args->getOption( "view" ) );
+ const TQString filename =
+ TQString::fromLocal8Bit( args->getOption( "view" ) );
messageFile = KURL::fromPathOrURL( filename );
if ( !messageFile.isValid() ) {
messageFile = KURL();
@@ -282,7 +282,7 @@ bool KMKernel::handleCommandLine( bool noArgsOpensReader )
if (strncasecmp(args->arg(i),"mailto:",7)==0)
to += args->url(i).path() + ", ";
else {
- QString tmpArg = QString::fromLocal8Bit( args->arg(i) );
+ TQString tmpArg = TQString::fromLocal8Bit( args->arg(i) );
KURL url( tmpArg );
if ( url.isValid() )
attachURLs += url;
@@ -319,12 +319,12 @@ void KMKernel::checkMail () //might create a new reader but won't show!!
kmkernel->acctMgr()->checkMail(false);
}
-QStringList KMKernel::accounts()
+TQStringList KMKernel::accounts()
{
return kmkernel->acctMgr()->getAccounts();
}
-void KMKernel::checkAccount (const QString &account) //might create a new reader but won't show!!
+void KMKernel::checkAccount (const TQString &account) //might create a new reader but won't show!!
{
kdDebug(5006) << "KMKernel::checkMail called" << endl;
@@ -333,11 +333,11 @@ void KMKernel::checkAccount (const QString &account) //might create a new reader
kmkernel->acctMgr()->singleCheckMail(acct, false);
}
-void KMKernel::loadProfile( const QString& )
+void KMKernel::loadProfile( const TQString& )
{
}
-void KMKernel::saveToProfile( const QString& ) const
+void KMKernel::saveToProfile( const TQString& ) const
{
}
@@ -374,9 +374,9 @@ void KMKernel::openReader( bool onlyCheck )
}
}
-int KMKernel::openComposer (const QString &to, const QString &cc,
- const QString &bcc, const QString &subject,
- const QString &body, int hidden,
+int KMKernel::openComposer (const TQString &to, const TQString &cc,
+ const TQString &bcc, const TQString &subject,
+ const TQString &body, int hidden,
const KURL &messageFile,
const KURL::List &attachURLs,
const QCStringList &customHeaders)
@@ -395,9 +395,9 @@ int KMKernel::openComposer (const QString &to, const QString &cc,
msg->setBcc( KMMsgBase::decodeRFC2047String( bcc.latin1() ) );
if (!subject.isEmpty()) msg->setSubject(subject);
if (!messageFile.isEmpty() && messageFile.isLocalFile()) {
- QCString str = KPIM::kFileToString( messageFile.path(), true, false );
+ TQCString str = KPIM::kFileToString( messageFile.path(), true, false );
if( !str.isEmpty() ) {
- msg->setBody( QString::fromLocal8Bit( str ).utf8() );
+ msg->setBody( TQString::fromLocal8Bit( str ).utf8() );
} else {
TemplateParser parser( msg, TemplateParser::NewMessage,
"", false, false, false, false );
@@ -423,7 +423,7 @@ int KMKernel::openComposer (const QString &to, const QString &cc,
const int pos = (*it).find( ':' );
if ( pos > 0 )
{
- QCString header, value;
+ TQCString header, value;
header = (*it).left( pos ).stripWhiteSpace();
value = (*it).mid( pos+1 ).stripWhiteSpace();
if ( !header.isEmpty() && !value.isEmpty() )
@@ -448,38 +448,38 @@ int KMKernel::openComposer (const QString &to, const QString &cc,
}
-int KMKernel::openComposer (const QString &to, const QString &cc,
- const QString &bcc, const QString &subject,
- const QString &body, int hidden,
- const QString &attachName,
- const QCString &attachCte,
- const QCString &attachData,
- const QCString &attachType,
- const QCString &attachSubType,
- const QCString &attachParamAttr,
- const QString &attachParamValue,
- const QCString &attachContDisp )
+int KMKernel::openComposer (const TQString &to, const TQString &cc,
+ const TQString &bcc, const TQString &subject,
+ const TQString &body, int hidden,
+ const TQString &attachName,
+ const TQCString &attachCte,
+ const TQCString &attachData,
+ const TQCString &attachType,
+ const TQCString &attachSubType,
+ const TQCString &attachParamAttr,
+ const TQString &attachParamValue,
+ const TQCString &attachContDisp )
{
kdDebug(5006) << "KMKernel::openComposer called (deprecated version)" << endl;
return openComposer ( to, cc, bcc, subject, body, hidden,
attachName, attachCte, attachData,
attachType, attachSubType, attachParamAttr,
- attachParamValue, attachContDisp, QCString() );
-}
-
-int KMKernel::openComposer (const QString &to, const QString &cc,
- const QString &bcc, const QString &subject,
- const QString &body, int hidden,
- const QString &attachName,
- const QCString &attachCte,
- const QCString &attachData,
- const QCString &attachType,
- const QCString &attachSubType,
- const QCString &attachParamAttr,
- const QString &attachParamValue,
- const QCString &attachContDisp,
- const QCString &attachCharset )
+ attachParamValue, attachContDisp, TQCString() );
+}
+
+int KMKernel::openComposer (const TQString &to, const TQString &cc,
+ const TQString &bcc, const TQString &subject,
+ const TQString &body, int hidden,
+ const TQString &attachName,
+ const TQCString &attachCte,
+ const TQCString &attachData,
+ const TQCString &attachType,
+ const TQCString &attachSubType,
+ const TQCString &attachParamAttr,
+ const TQString &attachParamValue,
+ const TQCString &attachContDisp,
+ const TQCString &attachCharset )
{
kdDebug(5006) << "KMKernel::openComposer()" << endl;
@@ -516,7 +516,7 @@ int KMKernel::openComposer (const QString &to, const QString &cc,
// KOrganizer invitation caught and to be sent as body instead
msg->setBody( attachData );
msg->setHeaderField( "Content-Type",
- QString( "text/calendar; method=%1; "
+ TQString( "text/calendar; method=%1; "
"charset=\"utf-8\"" ).
arg( attachParamValue ) );
@@ -572,10 +572,10 @@ int KMKernel::openComposer (const QString &to, const QString &cc,
return 1;
}
-void KMKernel::setDefaultTransport( const QString & transport )
+void KMKernel::setDefaultTransport( const TQString & transport )
{
- QStringList availTransports = KMail::TransportManager::transportNames();
- QStringList::const_iterator it = availTransports.find( transport );
+ TQStringList availTransports = KMail::TransportManager::transportNames();
+ TQStringList::const_iterator it = availTransports.find( transport );
if ( it == availTransports.end() ) {
kdWarning() << "The transport you entered is not available" << endl;
return;
@@ -583,9 +583,9 @@ void KMKernel::setDefaultTransport( const QString & transport )
GlobalSettings::self()->setDefaultTransport( transport );
}
-DCOPRef KMKernel::openComposer(const QString &to, const QString &cc,
- const QString &bcc, const QString &subject,
- const QString &body,bool hidden)
+DCOPRef KMKernel::openComposer(const TQString &to, const TQString &cc,
+ const TQString &bcc, const TQString &subject,
+ const TQString &body,bool hidden)
{
KMMessage *msg = new KMMessage;
msg->initHeader();
@@ -616,9 +616,9 @@ DCOPRef KMKernel::openComposer(const QString &to, const QString &cc,
return DCOPRef( cWin->asMailComposerIFace() );
}
-DCOPRef KMKernel::newMessage(const QString &to,
- const QString &cc,
- const QString &bcc,
+DCOPRef KMKernel::newMessage(const TQString &to,
+ const TQString &cc,
+ const TQString &bcc,
bool hidden,
bool useFolderId,
const KURL & /*messageFile*/,
@@ -676,7 +676,7 @@ int KMKernel::viewMessage( const KURL & messageFile )
return 1;
}
-int KMKernel::sendCertificate( const QString& to, const QByteArray& certData )
+int KMKernel::sendCertificate( const TQString& to, const TQByteArray& certData )
{
KMMessage *msg = new KMMessage;
msg->initHeader();
@@ -704,7 +704,7 @@ int KMKernel::sendCertificate( const QString& to, const QByteArray& certData )
return 1;
}
-KMMsgStatus KMKernel::strToStatus(const QString &flags)
+KMMsgStatus KMKernel::strToStatus(const TQString &flags)
{
KMMsgStatus status = 0;
if (!flags.isEmpty()) {
@@ -769,14 +769,14 @@ KMMsgStatus KMKernel::strToStatus(const QString &flags)
return status;
}
-int KMKernel::dcopAddMessage( const QString & foldername, const QString & msgUrlString,
- const QString & MsgStatusFlags)
+int KMKernel::dcopAddMessage( const TQString & foldername, const TQString & msgUrlString,
+ const TQString & MsgStatusFlags)
{
return dcopAddMessage(foldername, KURL(msgUrlString), MsgStatusFlags);
}
-int KMKernel::dcopAddMessage( const QString & foldername,const KURL & msgUrl,
- const QString & MsgStatusFlags)
+int KMKernel::dcopAddMessage( const TQString & foldername,const KURL & msgUrl,
+ const TQString & MsgStatusFlags)
{
kdDebug(5006) << "KMKernel::dcopAddMessage called" << endl;
@@ -785,7 +785,7 @@ int KMKernel::dcopAddMessage( const QString & foldername,const KURL & msgUrl,
int retval;
bool readFolderMsgIds = false;
- QString _foldername = foldername.stripWhiteSpace();
+ TQString _foldername = foldername.stripWhiteSpace();
_foldername = _foldername.replace('\\',""); //try to prevent ESCAPE Sequences
if ( foldername != mAddMessageLastFolder ) {
@@ -799,11 +799,11 @@ int KMKernel::dcopAddMessage( const QString & foldername,const KURL & msgUrl,
// This is a proposed change by Daniel Andor.
// He proposed to change from the fopen(blah)
// to a KPIM::kFileToString(blah).
- // Although it assigns a QString to a QString,
+ // Although it assigns a TQString to a TQString,
// because of the implicit sharing this poses
// no memory or performance penalty.
- const QCString messageText =
+ const TQCString messageText =
KPIM::kFileToString( msgUrl.path(), true, false );
if ( messageText.isEmpty() )
return -2;
@@ -813,15 +813,15 @@ int KMKernel::dcopAddMessage( const QString & foldername,const KURL & msgUrl,
if (readFolderMsgIds) {
if ( foldername.contains("/")) {
- QString tmp_fname = "";
+ TQString tmp_fname = "";
KMFolder *folder = NULL;
KMFolderDir *subfolder;
bool root = true;
- QStringList subFList = QStringList::split("/",_foldername,false);
+ TQStringList subFList = TQStringList::split("/",_foldername,false);
- for ( QStringList::Iterator it = subFList.begin(); it != subFList.end(); ++it ) {
- QString _newFolder = *it;
+ for ( TQStringList::Iterator it = subFList.begin(); it != subFList.end(); ++it ) {
+ TQString _newFolder = *it;
if(_newFolder.startsWith(".")) return -1;
if(root) {
@@ -866,7 +866,7 @@ int KMKernel::dcopAddMessage( const QString & foldername,const KURL & msgUrl,
// subject line + the date is only unique if the following
// return a correct unique value:
// time_t DT = mb->date();
- // QString dt = ctime(&DT);
+ // TQString dt = ctime(&DT);
// But if the datestring in the Header isn't RFC conform
// subject line + the date isn't unique.
//
@@ -879,7 +879,7 @@ int KMKernel::dcopAddMessage( const QString & foldername,const KURL & msgUrl,
mAddMsgCurrentFolder->open("dcopadd");
for( i=0; i<mAddMsgCurrentFolder->count(); i++) {
KMMsgBase *mb = mAddMsgCurrentFolder->getMsgBase(i);
- QString id = mb->msgIdMD5();
+ TQString id = mb->msgIdMD5();
if ( id.isEmpty() ) {
id = mb->subject();
if ( id.isEmpty() )
@@ -898,7 +898,7 @@ int KMKernel::dcopAddMessage( const QString & foldername,const KURL & msgUrl,
mAddMsgCurrentFolder->close("dcopadd");
}
- QString msgId = msg->msgIdMD5();
+ TQString msgId = msg->msgIdMD5();
if ( msgId.isEmpty()) {
msgId = msg->subject();
if ( msgId.isEmpty() )
@@ -947,19 +947,19 @@ int KMKernel::dcopAddMessage( const QString & foldername,const KURL & msgUrl,
void KMKernel::dcopResetAddMessage()
{
mAddMessageMsgIds.clear();
- mAddMessageLastFolder = QString();
+ mAddMessageLastFolder = TQString();
}
-int KMKernel::dcopAddMessage_fastImport( const QString & foldername,
- const QString & msgUrlString,
- const QString & MsgStatusFlags)
+int KMKernel::dcopAddMessage_fastImport( const TQString & foldername,
+ const TQString & msgUrlString,
+ const TQString & MsgStatusFlags)
{
return dcopAddMessage_fastImport(foldername, KURL(msgUrlString), MsgStatusFlags);
}
-int KMKernel::dcopAddMessage_fastImport( const QString & foldername,
+int KMKernel::dcopAddMessage_fastImport( const TQString & foldername,
const KURL & msgUrl,
- const QString & MsgStatusFlags)
+ const TQString & MsgStatusFlags)
{
// Use this function to import messages without
// search for already existing emails.
@@ -971,7 +971,7 @@ int KMKernel::dcopAddMessage_fastImport( const QString & foldername,
int retval;
bool createNewFolder = false;
- QString _foldername = foldername.stripWhiteSpace();
+ TQString _foldername = foldername.stripWhiteSpace();
_foldername = _foldername.replace('\\',""); //try to prevent ESCAPE Sequences
if ( foldername != mAddMessageLastFolder ) {
@@ -981,7 +981,7 @@ int KMKernel::dcopAddMessage_fastImport( const QString & foldername,
if ( !msgUrl.isEmpty() && msgUrl.isLocalFile() ) {
- const QCString messageText =
+ const TQCString messageText =
KPIM::kFileToString( msgUrl.path(), true, false );
if ( messageText.isEmpty() )
return -2;
@@ -991,15 +991,15 @@ int KMKernel::dcopAddMessage_fastImport( const QString & foldername,
if (createNewFolder) {
if ( foldername.contains("/")) {
- QString tmp_fname = "";
+ TQString tmp_fname = "";
KMFolder *folder = NULL;
KMFolderDir *subfolder;
bool root = true;
- QStringList subFList = QStringList::split("/",_foldername,false);
+ TQStringList subFList = TQStringList::split("/",_foldername,false);
- for ( QStringList::Iterator it = subFList.begin(); it != subFList.end(); ++it ) {
- QString _newFolder = *it;
+ for ( TQStringList::Iterator it = subFList.begin(); it != subFList.end(); ++it ) {
+ TQString _newFolder = *it;
if(_newFolder.startsWith(".")) return -1;
if(root) {
@@ -1053,10 +1053,10 @@ int KMKernel::dcopAddMessage_fastImport( const QString & foldername,
return retval;
}
-QStringList KMKernel::folderList() const
+TQStringList KMKernel::folderList() const
{
- QStringList folders;
- const QString localPrefix = "/Local";
+ TQStringList folders;
+ const TQString localPrefix = "/Local";
folders << localPrefix;
the_folderMgr->getFolderURLS( folders, localPrefix );
the_imapFolderMgr->getFolderURLS( folders );
@@ -1064,9 +1064,9 @@ QStringList KMKernel::folderList() const
return folders;
}
-DCOPRef KMKernel::getFolder( const QString& vpath )
+DCOPRef KMKernel::getFolder( const TQString& vpath )
{
- const QString localPrefix = "/Local";
+ const TQString localPrefix = "/Local";
if ( the_folderMgr->getFolderByURL( vpath ) )
return DCOPRef( new FolderIface( vpath ) );
else if ( vpath.startsWith( localPrefix ) &&
@@ -1085,12 +1085,12 @@ void KMKernel::raise()
kmail.call( "newInstance" );
}
-bool KMKernel::showMail( Q_UINT32 serialNumber, QString /* messageId */ )
+bool KMKernel::showMail( Q_UINT32 serialNumber, TQString /* messageId */ )
{
KMMainWidget *mainWidget = 0;
if (KMainWindow::memberList) {
KMainWindow *win = 0;
- QObjectList *l;
+ TQObjectList *l;
// First look for a KMainWindow.
for (win = KMainWindow::memberList->first(); win;
@@ -1134,34 +1134,34 @@ bool KMKernel::showMail( Q_UINT32 serialNumber, QString /* messageId */ )
return false;
}
-QString KMKernel::getFrom( Q_UINT32 serialNumber )
+TQString KMKernel::getFrom( Q_UINT32 serialNumber )
{
int idx = -1;
KMFolder *folder = 0;
KMMsgDict::instance()->getLocation(serialNumber, &folder, &idx);
if (!folder || (idx == -1))
- return QString::null;
+ return TQString::null;
KMFolderOpener openFolder(folder, "getFrom");
KMMsgBase *msgBase = folder->getMsgBase(idx);
if (!msgBase)
- return QString::null;
+ return TQString::null;
bool unGet = !msgBase->isMessage();
KMMessage *msg = folder->getMsg(idx);
- QString result = msg->from();
+ TQString result = msg->from();
if (unGet)
folder->unGetMsg(idx);
return result;
}
-QString KMKernel::debugScheduler()
+TQString KMKernel::debugScheduler()
{
- QString res = KMail::ActionScheduler::debug();
+ TQString res = KMail::ActionScheduler::debug();
return res;
}
-QString KMKernel::debugSernum( Q_UINT32 serialNumber )
+TQString KMKernel::debugSernum( Q_UINT32 serialNumber )
{
- QString res;
+ TQString res;
if (serialNumber != 0) {
int idx = -1;
KMFolder *folder = 0;
@@ -1174,15 +1174,15 @@ QString KMKernel::debugSernum( Q_UINT32 serialNumber )
KMFolderOpener openFolder(folder, "debugser");
msg = folder->getMsgBase( idx );
if (msg) {
- res.append( QString( " subject %s,\n sender %s,\n date %s.\n" )
+ res.append( TQString( " subject %s,\n sender %s,\n date %s.\n" )
.arg( msg->subject() )
.arg( msg->fromStrip() )
.arg( msg->dateStr() ) );
} else {
- res.append( QString( "Invalid serial number." ) );
+ res.append( TQString( "Invalid serial number." ) );
}
} else {
- res.append( QString( "Invalid serial number." ) );
+ res.append( TQString( "Invalid serial number." ) );
}
}
return res;
@@ -1265,7 +1265,7 @@ void KMKernel::quit()
/* TODO later:
Asuming that:
- msgsender is nonblocking
- (our own, QSocketNotifier based. Pops up errors and sends signal
+ (our own, TQSocketNotifier based. Pops up errors and sends signal
senderFinished when done)
o If we are getting mail, stop it (but dont lose something!)
@@ -1310,14 +1310,14 @@ void KMKernel::slotSenderFinished()
/********************************************************************/
void KMKernel::testDir(const char *_name)
{
- QString foldersPath = QDir::homeDirPath() + QString( _name );
- QFileInfo info( foldersPath );
+ TQString foldersPath = TQDir::homeDirPath() + TQString( _name );
+ TQFileInfo info( foldersPath );
if ( !info.exists() ) {
- if ( ::mkdir( QFile::encodeName( foldersPath ) , S_IRWXU ) == -1 ) {
+ if ( ::mkdir( TQFile::encodeName( foldersPath ) , S_IRWXU ) == -1 ) {
KMessageBox::sorry(0, i18n("KMail could not create folder '%1';\n"
"please make sure that you can view and "
"modify the content of the folder '%2'.")
- .arg( foldersPath ).arg( QDir::homeDirPath() ) );
+ .arg( foldersPath ).arg( TQDir::homeDirPath() ) );
::exit(-1);
}
}
@@ -1336,8 +1336,8 @@ void KMKernel::testDir(const char *_name)
// Open a composer for each message found in the dead.letter folder
void KMKernel::recoverDeadLetters()
{
- const QString pathName = localDataPath();
- QDir dir( pathName );
+ const TQString pathName = localDataPath();
+ TQDir dir( pathName );
if ( !dir.exists( "autosave" ) )
return;
@@ -1363,7 +1363,7 @@ void KMKernel::recoverDeadLetters()
//-----------------------------------------------------------------------------
void KMKernel::initFolders(KConfig* cfg)
{
- QString name;
+ TQString name;
name = cfg->readEntry("inboxFolder");
@@ -1381,7 +1381,7 @@ void KMKernel::initFolders(KConfig* cfg)
the_inboxFolder->setSystemFolder(true);
if ( the_inboxFolder->userWhoField().isEmpty() )
- the_inboxFolder->setUserWhoField( QString::null );
+ the_inboxFolder->setUserWhoField( TQString::null );
// inboxFolder->open();
the_outboxFolder = the_folderMgr->findOrCreate(cfg->readEntry("outboxFolder", I18N_NOOP("outbox")));
@@ -1392,7 +1392,7 @@ void KMKernel::initFolders(KConfig* cfg)
the_outboxFolder->setSystemFolder(true);
if ( the_outboxFolder->userWhoField().isEmpty() )
- the_outboxFolder->setUserWhoField( QString::null );
+ the_outboxFolder->setUserWhoField( TQString::null );
/* Nuke the oubox's index file, to make sure that no ghost messages are in
* it from a previous crash. Ghost messages happen in the outbox because it
* the only folder where messages enter and leave within 5 seconds, which is
@@ -1400,7 +1400,7 @@ void KMKernel::initFolders(KConfig* cfg)
* this folder is expected to be very small, we can live with regenerating
* the index on each start to be on the save side. */
//if ( the_outboxFolder->folderType() == KMFolderTypeMaildir )
- // unlink( QFile::encodeName( the_outboxFolder->indexLocation() ) );
+ // unlink( TQFile::encodeName( the_outboxFolder->indexLocation() ) );
the_outboxFolder->open("kmkernel");
the_sentFolder = the_folderMgr->findOrCreate(cfg->readEntry("sentFolder", I18N_NOOP("sent-mail")));
@@ -1409,7 +1409,7 @@ void KMKernel::initFolders(KConfig* cfg)
}
the_sentFolder->setSystemFolder(true);
if ( the_sentFolder->userWhoField().isEmpty() )
- the_sentFolder->setUserWhoField( QString::null );
+ the_sentFolder->setUserWhoField( TQString::null );
// the_sentFolder->open();
the_trashFolder = the_folderMgr->findOrCreate(cfg->readEntry("trashFolder", I18N_NOOP("trash")));
@@ -1418,7 +1418,7 @@ void KMKernel::initFolders(KConfig* cfg)
}
the_trashFolder->setSystemFolder( true );
if ( the_trashFolder->userWhoField().isEmpty() )
- the_trashFolder->setUserWhoField( QString::null );
+ the_trashFolder->setUserWhoField( TQString::null );
// the_trashFolder->open();
the_draftsFolder = the_folderMgr->findOrCreate(cfg->readEntry("draftsFolder", I18N_NOOP("drafts")));
@@ -1427,7 +1427,7 @@ void KMKernel::initFolders(KConfig* cfg)
}
the_draftsFolder->setSystemFolder( true );
if ( the_draftsFolder->userWhoField().isEmpty() )
- the_draftsFolder->setUserWhoField( QString::null );
+ the_draftsFolder->setUserWhoField( TQString::null );
the_draftsFolder->open("kmkernel");
the_templatesFolder =
@@ -1438,7 +1438,7 @@ void KMKernel::initFolders(KConfig* cfg)
}
the_templatesFolder->setSystemFolder( true );
if ( the_templatesFolder->userWhoField().isEmpty() )
- the_templatesFolder->setUserWhoField( QString::null );
+ the_templatesFolder->setUserWhoField( TQString::null );
the_templatesFolder->open("kmkernel");
}
@@ -1450,14 +1450,14 @@ void KMKernel::init()
KConfig* cfg = KMKernel::config();
- QDir dir;
+ TQDir dir;
KConfigGroupSaver saver(cfg, "General");
the_firstStart = cfg->readBoolEntry("first-start", true);
cfg->writeEntry("first-start", false);
the_previousVersion = cfg->readEntry("previous-version");
cfg->writeEntry("previous-version", KMAIL_VERSION);
- QString foldersPath = cfg->readPathEntry( "folders" );
+ TQString foldersPath = cfg->readPathEntry( "folders" );
kdDebug(5006) << k_funcinfo << "foldersPath (from config): '" << foldersPath << "'" << endl;
if ( foldersPath.isEmpty() ) {
@@ -1517,17 +1517,17 @@ void KMKernel::init()
the_weaverLogger->attach (the_weaver);
//#endif
- connect( the_folderMgr, SIGNAL( folderRemoved(KMFolder*) ),
- this, SIGNAL( folderRemoved(KMFolder*) ) );
- connect( the_dimapFolderMgr, SIGNAL( folderRemoved(KMFolder*) ),
- this, SIGNAL( folderRemoved(KMFolder*) ) );
- connect( the_imapFolderMgr, SIGNAL( folderRemoved(KMFolder*) ),
- this, SIGNAL( folderRemoved(KMFolder*) ) );
- connect( the_searchFolderMgr, SIGNAL( folderRemoved(KMFolder*) ),
- this, SIGNAL( folderRemoved(KMFolder*) ) );
-
- mBackgroundTasksTimer = new QTimer( this, "mBackgroundTasksTimer" );
- connect( mBackgroundTasksTimer, SIGNAL( timeout() ), this, SLOT( slotRunBackgroundTasks() ) );
+ connect( the_folderMgr, TQT_SIGNAL( folderRemoved(KMFolder*) ),
+ this, TQT_SIGNAL( folderRemoved(KMFolder*) ) );
+ connect( the_dimapFolderMgr, TQT_SIGNAL( folderRemoved(KMFolder*) ),
+ this, TQT_SIGNAL( folderRemoved(KMFolder*) ) );
+ connect( the_imapFolderMgr, TQT_SIGNAL( folderRemoved(KMFolder*) ),
+ this, TQT_SIGNAL( folderRemoved(KMFolder*) ) );
+ connect( the_searchFolderMgr, TQT_SIGNAL( folderRemoved(KMFolder*) ),
+ this, TQT_SIGNAL( folderRemoved(KMFolder*) ) );
+
+ mBackgroundTasksTimer = new TQTimer( this, "mBackgroundTasksTimer" );
+ connect( mBackgroundTasksTimer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( slotRunBackgroundTasks() ) );
#ifdef DEBUG_SCHEDULER // for debugging, see jobscheduler.h
mBackgroundTasksTimer->start( 10000, true ); // 10s, singleshot
#else
@@ -1582,7 +1582,7 @@ void KMKernel::cleanupImapFolders()
if (acct->type() != "imap") continue;
fld = static_cast<KMFolderImap*>(the_imapFolderMgr
- ->findOrCreate(QString::number(acct->id()), false, acct->id())->storage());
+ ->findOrCreate(TQString::number(acct->id()), false, acct->id())->storage());
fld->setNoContent(true);
fld->folder()->setLabel(acct->name());
imapAcct = static_cast<KMAcctImap*>(acct);
@@ -1600,12 +1600,12 @@ void KMKernel::cleanupImapFolders()
if (acct->type() != "cachedimap" ) continue;
- KMFolder* fld = the_dimapFolderMgr->find(QString::number(acct->id()));
+ KMFolder* fld = the_dimapFolderMgr->find(TQString::number(acct->id()));
if( fld )
cfld = static_cast<KMFolderCachedImap*>( fld->storage() );
if (cfld == 0) {
// Folder doesn't exist yet
- cfld = static_cast<KMFolderCachedImap*>(the_dimapFolderMgr->createFolder(QString::number(acct->id()),
+ cfld = static_cast<KMFolderCachedImap*>(the_dimapFolderMgr->createFolder(TQString::number(acct->id()),
false, KMFolderTypeCachedImap)->storage());
if (!cfld) {
KMessageBox::error(0,(i18n("Cannot create file `%1' in %2.\nKMail cannot start without it.").arg(acct->name()).arg(the_dimapFolderMgr->basePath())));
@@ -1644,7 +1644,7 @@ bool KMKernel::doSessionManagement()
void KMKernel::closeAllKMailWindows()
{
if (!KMainWindow::memberList) return;
- QPtrListIterator<KMainWindow> it(*KMainWindow::memberList);
+ TQPtrListIterator<KMainWindow> it(*KMainWindow::memberList);
KMainWindow *window = 0;
while ((window = it.current()) != 0) {
++it;
@@ -1694,8 +1694,8 @@ void KMKernel::cleanup(void)
mICalIface->cleanup();
- QValueList<QGuardedPtr<KMFolder> > folders;
- QStringList strList;
+ TQValueList<TQGuardedPtr<KMFolder> > folders;
+ TQStringList strList;
KMFolder *folder;
the_folderMgr->createFolderList(&strList, &folders);
for (int i = 0; folders.at(i) != folders.end(); i++)
@@ -1735,14 +1735,14 @@ void KMKernel::cleanup(void)
config->sync();
}
-bool KMKernel::transferMail( QString & destinationDir )
+bool KMKernel::transferMail( TQString & destinationDir )
{
- QString dir;
+ TQString dir;
// check whether the user has a ~/KMail folder
- QFileInfo fi( QDir::home(), "KMail" );
+ TQFileInfo fi( TQDir::home(), "KMail" );
if ( fi.exists() && fi.isDir() ) {
- dir = QDir::homeDirPath() + "/KMail";
+ dir = TQDir::homeDirPath() + "/KMail";
// the following two lines can be removed once moving mail is reactivated
destinationDir = dir;
return true;
@@ -1750,12 +1750,12 @@ bool KMKernel::transferMail( QString & destinationDir )
if ( dir.isEmpty() ) {
// check whether the user has a ~/Mail folder
- fi.setFile( QDir::home(), "Mail" );
+ fi.setFile( TQDir::home(), "Mail" );
if ( fi.exists() && fi.isDir() &&
- QFile::exists( QDir::homeDirPath() + "/Mail/.inbox.index" ) ) {
+ TQFile::exists( TQDir::homeDirPath() + "/Mail/.inbox.index" ) ) {
// there's a ~/Mail folder which seems to be used by KMail (because of the
// index file)
- dir = QDir::homeDirPath() + "/Mail";
+ dir = TQDir::homeDirPath() + "/Mail";
// the following two lines can be removed once moving mail is reactivated
destinationDir = dir;
return true;
@@ -1768,8 +1768,8 @@ bool KMKernel::transferMail( QString & destinationDir )
#if 0
// disabled for now since moving fails in certain cases (e.g. if symbolic links are involved)
- const QString kmailName = kapp->aboutData()->programName();
- QString msg;
+ const TQString kmailName = kapp->aboutData()->programName();
+ TQString msg;
if ( KIO::NetAccess::exists( destinationDir, true, 0 ) ) {
// if destinationDir exists, we need to warn about possible
// overwriting of files. otherwise, we don't have to
@@ -1795,8 +1795,8 @@ bool KMKernel::transferMail( QString & destinationDir )
.arg( kmailName, kmailName, kmailName )
.arg( dir, destinationDir, dir );
}
- QString title = i18n( "Migrate Mail Files?" );
- QString buttonText = i18n( "Move" );
+ TQString title = i18n( "Migrate Mail Files?" );
+ TQString buttonText = i18n( "Move" );
if ( KMessageBox::questionYesNo( 0, msg, title, buttonText, i18n("Do Not Move") ) ==
KMessageBox::No ) {
@@ -1820,7 +1820,7 @@ bool KMKernel::transferMail( QString & destinationDir )
void KMKernel::ungrabPtrKb(void)
{
if(!KMainWindow::memberList) return;
- QWidget* widg = KMainWindow::memberList->first();
+ TQWidget* widg = KMainWindow::memberList->first();
Display* dpy;
if (!widg) return;
@@ -1865,16 +1865,16 @@ void KMKernel::dumpDeadLetters()
if ( !KMainWindow::memberList )
return;
- for ( QPtrListIterator<KMainWindow> it(*KMainWindow::memberList) ; it.current() != 0; ++it )
+ for ( TQPtrListIterator<KMainWindow> it(*KMainWindow::memberList) ; it.current() != 0; ++it )
if ( KMail::Composer * win = ::qt_cast<KMail::Composer*>( it.current() ) )
win->autoSaveMessage();
}
-void KMKernel::action(bool mailto, bool check, const QString &to,
- const QString &cc, const QString &bcc,
- const QString &subj, const QString &body,
+void KMKernel::action(bool mailto, bool check, const TQString &to,
+ const TQString &cc, const TQString &bcc,
+ const TQString &subj, const TQString &body,
const KURL &messageFile,
const KURL::List &attachURLs,
const QCStringList &customHeaders)
@@ -1889,24 +1889,24 @@ void KMKernel::action(bool mailto, bool check, const QString &to,
//Anything else?
}
-void KMKernel::byteArrayToRemoteFile(const QByteArray &aData, const KURL &aURL,
+void KMKernel::byteArrayToRemoteFile(const TQByteArray &aData, const KURL &aURL,
bool overwrite)
{
// ## when KDE 3.3 is out: use KIO::storedPut to remove slotDataReq altogether
KIO::Job *job = KIO::put(aURL, -1, overwrite, false);
putData pd; pd.url = aURL; pd.data = aData; pd.offset = 0;
mPutJobs.insert(job, pd);
- connect(job, SIGNAL(dataReq(KIO::Job*,QByteArray&)),
- SLOT(slotDataReq(KIO::Job*,QByteArray&)));
- connect(job, SIGNAL(result(KIO::Job*)),
- SLOT(slotResult(KIO::Job*)));
+ connect(job, TQT_SIGNAL(dataReq(KIO::Job*,TQByteArray&)),
+ TQT_SLOT(slotDataReq(KIO::Job*,TQByteArray&)));
+ connect(job, TQT_SIGNAL(result(KIO::Job*)),
+ TQT_SLOT(slotResult(KIO::Job*)));
}
-void KMKernel::slotDataReq(KIO::Job *job, QByteArray &data)
+void KMKernel::slotDataReq(KIO::Job *job, TQByteArray &data)
{
// send the data in 64 KB chunks
const int MAX_CHUNK_SIZE = 64*1024;
- QMap<KIO::Job*, putData>::Iterator it = mPutJobs.find(job);
+ TQMap<KIO::Job*, putData>::Iterator it = mPutJobs.find(job);
assert(it != mPutJobs.end());
int remainingBytes = (*it).data.size() - (*it).offset;
if( remainingBytes > MAX_CHUNK_SIZE )
@@ -1921,7 +1921,7 @@ void KMKernel::slotDataReq(KIO::Job *job, QByteArray &data)
{
// send the remaining bytes to the receiver (deep copy)
data.duplicate( (*it).data.data() + (*it).offset, remainingBytes );
- (*it).data = QByteArray();
+ (*it).data = TQByteArray();
(*it).offset = 0;
//kdDebug( 5006 ) << "Sending " << remainingBytes << " bytes\n";
}
@@ -1929,7 +1929,7 @@ void KMKernel::slotDataReq(KIO::Job *job, QByteArray &data)
void KMKernel::slotResult(KIO::Job *job)
{
- QMap<KIO::Job*, putData>::Iterator it = mPutJobs.find(job);
+ TQMap<KIO::Job*, putData>::Iterator it = mPutJobs.find(job);
assert(it != mPutJobs.end());
if (job->error())
{
@@ -1955,8 +1955,8 @@ void KMKernel::slotShowConfigurationDialog()
{
if( !mConfigureDialog ) {
mConfigureDialog = new ConfigureDialog( 0, "configure", false );
- connect( mConfigureDialog, SIGNAL( configCommitted() ),
- this, SLOT( slotConfigChanged() ) );
+ connect( mConfigureDialog, TQT_SIGNAL( configCommitted() ),
+ this, TQT_SLOT( slotConfigChanged() ) );
}
if( KMKernel::getKMMainWidget() == 0 )
@@ -1982,7 +1982,7 @@ void KMKernel::slotConfigChanged()
//-------------------------------------------------------------------------------
//static
-QString KMKernel::localDataPath()
+TQString KMKernel::localDataPath()
{
return locateLocal( "data", "kmail/" );
}
@@ -2006,7 +2006,7 @@ bool KMKernel::registerSystemTrayApplet( const KSystemTray* applet )
bool KMKernel::unregisterSystemTrayApplet( const KSystemTray* applet )
{
- QValueList<const KSystemTray*>::iterator it =
+ TQValueList<const KSystemTray*>::iterator it =
systemTrayApplets.find( applet );
if ( it != systemTrayApplets.end() ) {
systemTrayApplets.remove( it );
@@ -2016,9 +2016,9 @@ bool KMKernel::unregisterSystemTrayApplet( const KSystemTray* applet )
return false;
}
-void KMKernel::emergencyExit( const QString& reason )
+void KMKernel::emergencyExit( const TQString& reason )
{
- QString mesg;
+ TQString mesg;
if ( reason.length() == 0 ) {
mesg = i18n("KMail encountered a fatal error and will terminate now");
} else {
@@ -2049,7 +2049,7 @@ bool KMKernel::folderIsDrafts(const KMFolder * folder)
if ( folder == the_draftsFolder )
return true;
- QString idString = folder->idString();
+ TQString idString = folder->idString();
if ( idString.isEmpty() )
return false;
@@ -2067,7 +2067,7 @@ bool KMKernel::folderIsTemplates( const KMFolder *folder )
if ( folder == the_templatesFolder )
return true;
- QString idString = folder->idString();
+ TQString idString = folder->idString();
if ( idString.isEmpty() )
return false;
@@ -2083,8 +2083,8 @@ bool KMKernel::folderIsTrash(KMFolder * folder)
{
assert(folder);
if (folder == the_trashFolder) return true;
- QStringList actList = acctMgr()->getAccounts();
- QStringList::Iterator it( actList.begin() );
+ TQStringList actList = acctMgr()->getAccounts();
+ TQStringList::Iterator it( actList.begin() );
for( ; it != actList.end() ; ++it ) {
KMAccount* act = acctMgr()->findByName( *it );
if ( act && ( act->trash() == folder->idString() ) )
@@ -2099,7 +2099,7 @@ bool KMKernel::folderIsSentMailFolder( const KMFolder * folder )
if ( folder == the_sentFolder )
return true;
- QString idString = folder->idString();
+ TQString idString = folder->idString();
if ( idString.isEmpty() ) return false;
// search the identities if the folder matches the sent-folder
@@ -2155,8 +2155,8 @@ KMainWindow* KMKernel::mainWin()
*/
void KMKernel::slotEmptyTrash()
{
- QString title = i18n("Empty Trash");
- QString text = i18n("Are you sure you want to empty the trash folders of all accounts?");
+ TQString title = i18n("Empty Trash");
+ TQString text = i18n("Are you sure you want to empty the trash folders of all accounts?");
if (KMessageBox::warningContinueCancel(0, text, title,
KStdGuiItem::cont(), "confirm_empty_trash")
!= KMessageBox::Continue)
@@ -2192,10 +2192,10 @@ KMailICalIfaceImpl& KMKernel::iCalIface()
return *mICalIface;
}
-void KMKernel::selectFolder( QString folderPath )
+void KMKernel::selectFolder( TQString folderPath )
{
kdDebug(5006)<<"Selecting a folder "<<folderPath<<endl;
- const QString localPrefix = "/Local";
+ const TQString localPrefix = "/Local";
KMFolder *folder = kmkernel->folderMgr()->getFolderByURL( folderPath );
if ( !folder && folderPath.startsWith( localPrefix ) )
folder = the_folderMgr->getFolderByURL( folderPath.mid( localPrefix.length() ) );
@@ -2218,13 +2218,13 @@ void KMKernel::selectFolder( QString folderPath )
KMMainWidget *KMKernel::getKMMainWidget()
{
//This could definitely use a speadup
- QWidgetList *l = kapp->topLevelWidgets();
- QWidgetListIt it( *l );
- QWidget *wid;
+ TQWidgetList *l = kapp->topLevelWidgets();
+ TQWidgetListIt it( *l );
+ TQWidget *wid;
while ( ( wid = it.current() ) != 0 ) {
++it;
- QObjectList *l2 = wid->topLevelWidget()->queryList( "KMMainWidget" );
+ TQObjectList *l2 = wid->topLevelWidget()->queryList( "KMMainWidget" );
if (l2 && l2->first()) {
KMMainWidget* kmmw = dynamic_cast<KMMainWidget *>( l2->first() );
Q_ASSERT( kmmw );
@@ -2280,7 +2280,7 @@ void KMKernel::compactAllFolders() // called by the GUI
the_dimapFolderMgr->compactAllFolders( true /*immediate*/ );
}
-KMFolder* KMKernel::findFolderById( const QString& idString )
+KMFolder* KMKernel::findFolderById( const TQString& idString )
{
KMFolder * folder = the_folderMgr->findIdString( idString );
if ( !folder )
@@ -2373,10 +2373,10 @@ Wallet *KMKernel::wallet() {
return mWallet;
}
-QValueList< QGuardedPtr<KMFolder> > KMKernel::allFolders()
+TQValueList< TQGuardedPtr<KMFolder> > KMKernel::allFolders()
{
- QStringList names;
- QValueList<QGuardedPtr<KMFolder> > folders;
+ TQStringList names;
+ TQValueList<TQGuardedPtr<KMFolder> > folders;
folderMgr()->createFolderList(&names, &folders);
imapFolderMgr()->createFolderList(&names, &folders);
dimapFolderMgr()->createFolderList(&names, &folders);
diff --git a/kmail/kmkernel.h b/kmail/kmkernel.h
index cd30a6e26..cd536e825 100644
--- a/kmail/kmkernel.h
+++ b/kmail/kmkernel.h
@@ -3,9 +3,9 @@
#ifndef _KMCONTROL
#define _KMCONTROL
-#include <qobject.h>
-#include <qstring.h>
-#include <qguardedptr.h>
+#include <tqobject.h>
+#include <tqstring.h>
+#include <tqguardedptr.h>
#include <weaver.h>
#include <weaverlogger.h>
@@ -80,42 +80,42 @@ class ConfigureDialog;
* (singleton) objects such as the UndoStack, the folder managers and filter
* manager, etc.
*/
-class KDE_EXPORT KMKernel : public QObject, virtual public KMailIface
+class KDE_EXPORT KMKernel : public TQObject, virtual public KMailIface
{
Q_OBJECT
public:
- KMKernel (QObject *parent=0, const char *name=0);
+ KMKernel (TQObject *parent=0, const char *name=0);
~KMKernel ();
/** dcop callable stuff */
void checkMail ();
- QStringList accounts();
- void checkAccount (const QString &account);
+ TQStringList accounts();
+ void checkAccount (const TQString &account);
/** returns id of composer if more are opened */
- int openComposer (const QString &to, const QString &cc, const QString &bcc,
- const QString &subject, const QString &body, int hidden,
+ int openComposer (const TQString &to, const TQString &cc, const TQString &bcc,
+ const TQString &subject, const TQString &body, int hidden,
const KURL &messageFile, const KURL::List &attachURLs,
const QCStringList &customHeaders);
/** For backward compatibility */
- int openComposer (const QString &to, const QString &cc, const QString &bcc,
- const QString &subject, const QString &body, int hidden,
+ int openComposer (const TQString &to, const TQString &cc, const TQString &bcc,
+ const TQString &subject, const TQString &body, int hidden,
const KURL &messageFile, const KURL::List &attachURLs)
{
QCStringList noCustomHeaders;
return openComposer(to, cc, bcc, subject, body, hidden, messageFile, attachURLs, noCustomHeaders);
}
/** For backward compatibility */
- int openComposer (const QString &to, const QString &cc, const QString &bcc,
- const QString &subject, const QString &body, int hidden,
+ int openComposer (const TQString &to, const TQString &cc, const TQString &bcc,
+ const TQString &subject, const TQString &body, int hidden,
const KURL &messageFile, const KURL& attachURL)
{
return openComposer(to, cc, bcc, subject, body, hidden, messageFile, KURL::List(attachURL));
}
/** For backward compatibility */
- int openComposer (const QString &to, const QString &cc, const QString &bcc,
- const QString &subject, const QString &body, int hidden,
+ int openComposer (const TQString &to, const TQString &cc, const TQString &bcc,
+ const TQString &subject, const TQString &body, int hidden,
const KURL &messageFile)
{
return openComposer(to, cc, bcc, subject, body, hidden, messageFile, KURL::List());
@@ -123,71 +123,71 @@ public:
/** For backward compatibility
* @deprecated
*/
- int openComposer (const QString &to, const QString &cc,
- const QString &bcc, const QString &subject,
- const QString &body, int hidden,
- const QString &attachName,
- const QCString &attachCte,
- const QCString &attachData,
- const QCString &attachType,
- const QCString &attachSubType,
- const QCString &attachParamAttr,
- const QString &attachParamValue,
- const QCString &attachContDisp);
-
- int openComposer (const QString &to, const QString &cc,
- const QString &bcc, const QString &subject,
- const QString &body, int hidden,
- const QString &attachName,
- const QCString &attachCte,
- const QCString &attachData,
- const QCString &attachType,
- const QCString &attachSubType,
- const QCString &attachParamAttr,
- const QString &attachParamValue,
- const QCString &attachContDisp,
- const QCString &attachCharset);
-
- DCOPRef openComposer(const QString &to, const QString &cc,
- const QString &bcc, const QString &subject,
- const QString &body,bool hidden);
+ int openComposer (const TQString &to, const TQString &cc,
+ const TQString &bcc, const TQString &subject,
+ const TQString &body, int hidden,
+ const TQString &attachName,
+ const TQCString &attachCte,
+ const TQCString &attachData,
+ const TQCString &attachType,
+ const TQCString &attachSubType,
+ const TQCString &attachParamAttr,
+ const TQString &attachParamValue,
+ const TQCString &attachContDisp);
+
+ int openComposer (const TQString &to, const TQString &cc,
+ const TQString &bcc, const TQString &subject,
+ const TQString &body, int hidden,
+ const TQString &attachName,
+ const TQCString &attachCte,
+ const TQCString &attachData,
+ const TQCString &attachType,
+ const TQCString &attachSubType,
+ const TQCString &attachParamAttr,
+ const TQString &attachParamValue,
+ const TQCString &attachContDisp,
+ const TQCString &attachCharset);
+
+ DCOPRef openComposer(const TQString &to, const TQString &cc,
+ const TQString &bcc, const TQString &subject,
+ const TQString &body,bool hidden);
/** DCOP call used to set the default transport. */
- void setDefaultTransport( const QString & transport );
+ void setDefaultTransport( const TQString & transport );
/** DCOP call used by the Kontact plugin to create a new message. */
- DCOPRef newMessage(const QString &to,
- const QString &cc,
- const QString &bcc,
+ DCOPRef newMessage(const TQString &to,
+ const TQString &cc,
+ const TQString &bcc,
bool hidden,
bool useFolderId,
const KURL &messageFile,
const KURL &attachURL);
- int sendCertificate( const QString& to, const QByteArray& certData );
+ int sendCertificate( const TQString& to, const TQByteArray& certData );
void openReader() { openReader( false ); }
- int dcopAddMessage(const QString & foldername, const QString & messagefile,
- const QString & MsgStatusFlags = QString());
- int dcopAddMessage(const QString & foldername, const KURL & messagefile,
- const QString & MsgStatusFlags = QString());
+ int dcopAddMessage(const TQString & foldername, const TQString & messagefile,
+ const TQString & MsgStatusFlags = TQString());
+ int dcopAddMessage(const TQString & foldername, const KURL & messagefile,
+ const TQString & MsgStatusFlags = TQString());
void dcopResetAddMessage();
/** add messages without rejecting duplicates */
- int dcopAddMessage_fastImport(const QString & foldername, const QString & messagefile,
- const QString & MsgStatusFlags = QString());
- int dcopAddMessage_fastImport(const QString & foldername, const KURL & messagefile,
- const QString & MsgStatusFlags = QString());
-
- QStringList folderList() const;
- DCOPRef getFolder( const QString& vpath );
- void selectFolder( QString folder );
+ int dcopAddMessage_fastImport(const TQString & foldername, const TQString & messagefile,
+ const TQString & MsgStatusFlags = TQString());
+ int dcopAddMessage_fastImport(const TQString & foldername, const KURL & messagefile,
+ const TQString & MsgStatusFlags = TQString());
+
+ TQStringList folderList() const;
+ DCOPRef getFolder( const TQString& vpath );
+ void selectFolder( TQString folder );
int timeOfLastMessageCountChange() const;
- virtual bool showMail( Q_UINT32 serialNumber, QString messageId );
- virtual QString getFrom( Q_UINT32 serialNumber );
- virtual QString debugScheduler();
- virtual QString debugSernum( Q_UINT32 serialNumber );
+ virtual bool showMail( Q_UINT32 serialNumber, TQString messageId );
+ virtual TQString getFrom( Q_UINT32 serialNumber );
+ virtual TQString debugScheduler();
+ virtual TQString debugSernum( Q_UINT32 serialNumber );
int viewMessage( const KURL & messageFile );
/**
@@ -246,17 +246,17 @@ public:
* destinationDir contains the path to the current mail storage when the
* method returns.
*/
- bool transferMail( QString & destinationDir );
+ bool transferMail( TQString & destinationDir );
void ungrabPtrKb(void);
void kmailMsgHandler(QtMsgType aType, const char* aMsg);
bool doSessionManagement();
bool firstInstance() { return the_firstInstance; }
void setFirstInstance(bool value) { the_firstInstance = value; }
- void action (bool mailto, bool check, const QString &to, const QString &cc,
- const QString &bcc, const QString &subj, const QString &body,
+ void action (bool mailto, bool check, const TQString &to, const TQString &cc,
+ const TQString &bcc, const TQString &subj, const TQString &body,
const KURL &messageFile, const KURL::List &attach,
const QCStringList &customHeaders);
- void byteArrayToRemoteFile(const QByteArray&, const KURL&,
+ void byteArrayToRemoteFile(const TQByteArray&, const KURL&,
bool overwrite = FALSE);
bool folderIsDraftOrOutbox( const KMFolder * );
bool folderIsDrafts( const KMFolder * );
@@ -269,7 +269,7 @@ public:
/**
* Find a folder by ID string in all folder managers
*/
- KMFolder* findFolderById( const QString& idString );
+ KMFolder* findFolderById( const TQString& idString );
KInstance *xmlGuiInstance() { return mXmlGuiInstance; }
void setXmlGuiInstance( KInstance *instance ) { mXmlGuiInstance = instance; }
@@ -307,7 +307,7 @@ public:
KMailICalIfaceImpl& iCalIface();
bool firstStart() { return the_firstStart; }
- QString previousVersion() { return the_previousVersion; }
+ TQString previousVersion() { return the_previousVersion; }
bool startingUp() { return the_startingUp; }
void setStartingUp (bool flag) { the_startingUp = flag; }
bool shuttingDown() { return the_shuttingDown; }
@@ -317,7 +317,7 @@ public:
/** Returns the full path of the user's local data directory for KMail.
The path ends with '/'.
*/
- static QString localDataPath();
+ static TQString localDataPath();
/** Returns true if we have a system tray applet. This is needed in order
* to know whether the application should be allowed to exit in case the
@@ -330,11 +330,11 @@ public:
/// Reimplemented from KMailIface
bool handleCommandLine( bool noArgsOpensReader );
- void emergencyExit( const QString& reason );
+ void emergencyExit( const TQString& reason );
/** Returns a message serial number that hasn't been used yet. */
unsigned long getNextMsgSerNum();
- QTextCodec *networkCodec() { return netCodec; }
+ TQTextCodec *networkCodec() { return netCodec; }
/** returns a reference to the first Mainwin or a temporary Mainwin */
KMainWindow* mainWin();
@@ -382,13 +382,13 @@ public:
KMMainWidget *getKMMainWidget();
/** @return a list of all folders from all folder managers. */
- QValueList< QGuardedPtr<KMFolder> > allFolders();
+ TQValueList< TQGuardedPtr<KMFolder> > allFolders();
void raise();
- void loadProfile( const QString& path );
+ void loadProfile( const TQString& path );
- void saveToProfile( const QString& path ) const;
+ void saveToProfile( const TQString& path ) const;
public slots:
/// Save contents of all open composer widnows to ~/dead.letter
@@ -410,7 +410,7 @@ public slots:
void slotConfigChanged();
protected slots:
- void slotDataReq(KIO::Job*,QByteArray&);
+ void slotDataReq(KIO::Job*,TQByteArray&);
void slotResult(KIO::Job*);
signals:
@@ -420,7 +420,7 @@ signals:
private:
void openReader( bool onlyCheck );
- KMMsgStatus strToStatus(const QString &flags);
+ KMMsgStatus strToStatus(const TQString &flags);
KMFolder *currentFolder();
KMFolder *the_inboxFolder;
@@ -445,13 +445,13 @@ private:
struct putData
{
KURL url;
- QByteArray data;
+ TQByteArray data;
int offset;
};
- QMap<KIO::Job *, putData> mPutJobs;
+ TQMap<KIO::Job *, putData> mPutJobs;
/** previous KMail version. If different from current,
the user has just updated. read from config */
- QString the_previousVersion;
+ TQString the_previousVersion;
/** is this the first start? read from config */
bool the_firstStart;
/** are we starting up? set in main.cpp directly before kapp->exec() */
@@ -466,11 +466,11 @@ private:
bool mMailCheckAborted;
static KMKernel *mySelf;
KSharedConfig::Ptr mConfig;
- QTextCodec *netCodec;
+ TQTextCodec *netCodec;
KInstance* mXmlGuiInstance;
ConfigureDialog *mConfigureDialog;
- QTimer *mBackgroundTasksTimer;
+ TQTimer *mBackgroundTasksTimer;
KMailICalIfaceImpl* mICalIface;
JobScheduler* mJobScheduler;
// temporary mainwin
@@ -487,7 +487,7 @@ private:
// context menus and the pinentry program
bool mContextMenuShown;
- QValueList<const KSystemTray*> systemTrayApplets;
+ TQValueList<const KSystemTray*> systemTrayApplets;
/* Weaver */
KPIM::ThreadWeaver::Weaver *the_weaver;
@@ -496,8 +496,8 @@ private:
KWallet::Wallet *mWallet;
// variables used by dcopAddMessage()
- QStringList mAddMessageMsgIds;
- QString mAddMessageLastFolder;
+ TQStringList mAddMessageMsgIds;
+ TQString mAddMessageLastFolder;
KMFolder *mAddMsgCurrentFolder;
};
diff --git a/kmail/kmlineeditspell.cpp b/kmail/kmlineeditspell.cpp
index ca315dea1..835421873 100644
--- a/kmail/kmlineeditspell.cpp
+++ b/kmail/kmlineeditspell.cpp
@@ -22,14 +22,14 @@
#include <kcompletionbox.h>
#include <klocale.h>
-#include <qevent.h>
-#include <qfile.h>
-#include <qcstring.h>
-#include <qcursor.h>
+#include <tqevent.h>
+#include <tqfile.h>
+#include <tqcstring.h>
+#include <tqcursor.h>
KMLineEdit::KMLineEdit(bool useCompletion,
- QWidget *parent, const char *name)
+ TQWidget *parent, const char *name)
: KPIM::AddresseeLineEdit(parent,useCompletion,name)
{
allowSemiColonAsSeparator( GlobalSettings::allowSemicolonAsAddressSeparator() );
@@ -37,7 +37,7 @@ KMLineEdit::KMLineEdit(bool useCompletion,
//-----------------------------------------------------------------------------
-void KMLineEdit::keyPressEvent(QKeyEvent *e)
+void KMLineEdit::keyPressEvent(TQKeyEvent *e)
{
if ((e->key() == Key_Enter || e->key() == Key_Return) &&
!completionBox()->isVisible())
@@ -60,12 +60,12 @@ void KMLineEdit::keyPressEvent(QKeyEvent *e)
}
-void KMLineEdit::insertEmails( const QStringList & emails )
+void KMLineEdit::insertEmails( const TQStringList & emails )
{
if ( emails.empty() )
return;
- QString contents = text();
+ TQString contents = text();
if ( !contents.isEmpty() )
contents += ',';
// only one address, don't need kpopup to choose
@@ -75,17 +75,17 @@ void KMLineEdit::insertEmails( const QStringList & emails )
}
//multiple emails, let the user choose one
KPopupMenu menu( this, "Addresschooser" );
- for ( QStringList::const_iterator it = emails.begin(), end = emails.end() ; it != end; ++it )
+ for ( TQStringList::const_iterator it = emails.begin(), end = emails.end() ; it != end; ++it )
menu.insertItem( *it );
- const int result = menu.exec( QCursor::pos() );
+ const int result = menu.exec( TQCursor::pos() );
if ( result < 0 )
return;
setText( contents + menu.text( result ) );
}
-void KMLineEdit::dropEvent(QDropEvent *event)
+void KMLineEdit::dropEvent(TQDropEvent *event)
{
- QString vcards;
+ TQString vcards;
KVCardDrag::decode( event, vcards );
if ( !vcards.isEmpty() ) {
KABC::VCardConverter converter;
@@ -101,19 +101,19 @@ void KMLineEdit::dropEvent(QDropEvent *event)
KURL::List::Iterator it = urls.begin();
KABC::VCardConverter converter;
KABC::Addressee::List list;
- QString fileName;
- QString caption( i18n( "vCard Import Failed" ) );
+ TQString fileName;
+ TQString caption( i18n( "vCard Import Failed" ) );
for ( it = urls.begin(); it != urls.end(); ++it ) {
if ( KIO::NetAccess::download( *it, fileName, parentWidget() ) ) {
- QFile file( fileName );
+ TQFile file( fileName );
file.open( IO_ReadOnly );
- QByteArray rawData = file.readAll();
+ TQByteArray rawData = file.readAll();
file.close();
- QString data = QString::fromUtf8( rawData.data(), rawData.size() + 1 );
+ TQString data = TQString::fromUtf8( rawData.data(), rawData.size() + 1 );
list += converter.parseVCards( data );
KIO::NetAccess::removeTempFile( fileName );
} else {
- QString text = i18n( "<qt>Unable to access <b>%1</b>.</qt>" );
+ TQString text = i18n( "<qt>Unable to access <b>%1</b>.</qt>" );
KMessageBox::error( parentWidget(), text.arg( (*it).url() ), caption );
}
KABC::Addressee::List::Iterator ait;
@@ -126,15 +126,15 @@ void KMLineEdit::dropEvent(QDropEvent *event)
}
}
-QPopupMenu *KMLineEdit::createPopupMenu()
+TQPopupMenu *KMLineEdit::createPopupMenu()
{
- QPopupMenu *menu = KPIM::AddresseeLineEdit::createPopupMenu();
+ TQPopupMenu *menu = KPIM::AddresseeLineEdit::createPopupMenu();
if ( !menu )
return 0;
menu->insertSeparator();
menu->insertItem( i18n( "Edit Recent Addresses..." ),
- this, SLOT( editRecentAddresses() ) );
+ this, TQT_SLOT( editRecentAddresses() ) );
return menu;
}
@@ -146,8 +146,8 @@ void KMLineEdit::editRecentAddresses()
if ( !dlg.exec() )
return;
KRecentAddress::RecentAddresses::self( KMKernel::config() )->clear();
- const QStringList addrList = dlg.addresses();
- for ( QStringList::const_iterator it = addrList.begin(), end = addrList.end() ; it != end ; ++it )
+ const TQStringList addrList = dlg.addresses();
+ for ( TQStringList::const_iterator it = addrList.begin(), end = addrList.end() ; it != end ; ++it )
KRecentAddress::RecentAddresses::self( KMKernel::config() )->add( *it );
loadContacts();
}
@@ -161,10 +161,10 @@ void KMLineEdit::loadContacts()
if ( GlobalSettings::self()->showRecentAddressesInComposer() ){
if ( KMKernel::self() ) {
- QStringList recent =
+ TQStringList recent =
KRecentAddress::RecentAddresses::self( KMKernel::config() )->addresses();
- QStringList::Iterator it = recent.begin();
- QString name, email;
+ TQStringList::Iterator it = recent.begin();
+ TQString name, email;
int idx = addCompletionSource( i18n( "Recent Addresses" ) );
for ( ; it != recent.end(); ++it ) {
KABC::Addressee addr;
@@ -179,7 +179,7 @@ void KMLineEdit::loadContacts()
KMLineEditSpell::KMLineEditSpell(bool useCompletion,
- QWidget *parent, const char *name)
+ TQWidget *parent, const char *name)
: KMLineEdit(useCompletion,parent,name)
{
}
@@ -190,18 +190,18 @@ void KMLineEditSpell::highLightWord( unsigned int length, unsigned int pos )
setSelection ( pos, length );
}
-void KMLineEditSpell::spellCheckDone( const QString &s )
+void KMLineEditSpell::spellCheckDone( const TQString &s )
{
if( s != text() )
setText( s );
}
-void KMLineEditSpell::spellCheckerMisspelling( const QString &_text, const QStringList&, unsigned int pos)
+void KMLineEditSpell::spellCheckerMisspelling( const TQString &_text, const TQStringList&, unsigned int pos)
{
highLightWord( _text.length(),pos );
}
-void KMLineEditSpell::spellCheckerCorrected( const QString &old, const QString &corr, unsigned int pos)
+void KMLineEditSpell::spellCheckerCorrected( const TQString &old, const TQString &corr, unsigned int pos)
{
if( old!= corr )
{
diff --git a/kmail/kmlineeditspell.h b/kmail/kmlineeditspell.h
index 85b4c1c9d..1355cd0ec 100644
--- a/kmail/kmlineeditspell.h
+++ b/kmail/kmlineeditspell.h
@@ -13,7 +13,7 @@ class KMLineEdit : public KPIM::AddresseeLineEdit
{
Q_OBJECT
public:
- KMLineEdit(bool useCompletion, QWidget *parent = 0,
+ KMLineEdit(bool useCompletion, TQWidget *parent = 0,
const char *name = 0);
signals:
@@ -24,16 +24,16 @@ protected:
// Inherited. Always called by the parent when this widget is created.
virtual void loadContacts();
- virtual void keyPressEvent(QKeyEvent*);
+ virtual void keyPressEvent(TQKeyEvent*);
- virtual QPopupMenu *createPopupMenu();
+ virtual TQPopupMenu *createPopupMenu();
private slots:
void editRecentAddresses();
private:
- void dropEvent( QDropEvent *event );
- void insertEmails( const QStringList & emails );
+ void dropEvent( TQDropEvent *event );
+ void insertEmails( const TQStringList & emails );
};
@@ -41,12 +41,12 @@ class KMLineEditSpell : public KMLineEdit
{
Q_OBJECT
public:
- KMLineEditSpell(bool useCompletion, QWidget *parent = 0,
+ KMLineEditSpell(bool useCompletion, TQWidget *parent = 0,
const char *name = 0);
void highLightWord( unsigned int length, unsigned int pos );
- void spellCheckDone( const QString &s );
- void spellCheckerMisspelling( const QString &text, const QStringList &, unsigned int pos);
- void spellCheckerCorrected( const QString &old, const QString &corr, unsigned int pos);
+ void spellCheckDone( const TQString &s );
+ void spellCheckerMisspelling( const TQString &text, const TQStringList &, unsigned int pos);
+ void spellCheckerCorrected( const TQString &old, const TQString &corr, unsigned int pos);
signals:
void subjectTextSpellChecked();
diff --git a/kmail/kmmainwidget.cpp b/kmail/kmmainwidget.cpp
index 2876e3b03..0b847ba64 100644
--- a/kmail/kmmainwidget.cpp
+++ b/kmail/kmmainwidget.cpp
@@ -13,13 +13,13 @@
#endif
#undef Unsorted // X headers...
-#include <qaccel.h>
-#include <qlayout.h>
-#include <qhbox.h>
-#include <qvbox.h>
-#include <qpopupmenu.h>
-#include <qpushbutton.h>
-#include <qptrlist.h>
+#include <tqaccel.h>
+#include <tqlayout.h>
+#include <tqhbox.h>
+#include <tqvbox.h>
+#include <tqpopupmenu.h>
+#include <tqpushbutton.h>
+#include <tqptrlist.h>
#include <kopenwith.h>
@@ -45,7 +45,7 @@
#include <kaccel.h>
#include <kstringhandler.h>
-#include <qvaluevector.h>
+#include <tqvaluevector.h>
#include "globalsettings.h"
#include "kcursorsaver.h"
@@ -81,7 +81,7 @@ using KMail::ImapAccountBase;
using KMail::Vacation;
#include "favoritefolderview.h"
-#include <qsignalmapper.h>
+#include <tqsignalmapper.h>
#include "subscriptiondialog.h"
using KMail::SubscriptionDialog;
@@ -129,21 +129,21 @@ using KMime::Types::AddrSpecList;
using KPIM::ProgressManager;
#include "managesievescriptsdialog.h"
-#include <qstylesheet.h>
+#include <tqstylesheet.h>
#include "customtemplates.h"
#include "customtemplates_kfg.h"
#include "kmmainwidget.moc"
-QValueList<KMMainWidget*>* KMMainWidget::s_mainWidgetList = 0;
-static KStaticDeleter<QValueList<KMMainWidget*> > mwlsd;
+TQValueList<KMMainWidget*>* KMMainWidget::s_mainWidgetList = 0;
+static KStaticDeleter<TQValueList<KMMainWidget*> > mwlsd;
//-----------------------------------------------------------------------------
-KMMainWidget::KMMainWidget(QWidget *parent, const char *name,
+KMMainWidget::KMMainWidget(TQWidget *parent, const char *name,
KXMLGUIClient *aGUIClient,
KActionCollection *actionCollection, KConfig* config ) :
- QWidget(parent, name),
+ TQWidget(parent, name),
mFavoritesCheckMailAction( 0 ),
mFavoriteFolderView( 0 ),
mFolderView( 0 ),
@@ -170,7 +170,7 @@ KMMainWidget::KMMainWidget(QWidget *parent, const char *name,
mSystemTray = 0;
mDestructed = false;
mActionCollection = actionCollection;
- mTopLayout = new QVBoxLayout(this);
+ mTopLayout = new TQVBoxLayout(this);
mFilterMenuActions.setAutoDelete(true);
mFilterTBarActions.setAutoDelete(false);
mFilterCommands.setAutoDelete(true);
@@ -191,7 +191,7 @@ KMMainWidget::KMMainWidget(QWidget *parent, const char *name,
mToolbarActionSeparator = new KActionSeparator( actionCollection );
if( !s_mainWidgetList )
- mwlsd.setObject( s_mainWidgetList, new QValueList<KMMainWidget*>() );
+ mwlsd.setObject( s_mainWidgetList, new TQValueList<KMMainWidget*>() );
s_mainWidgetList->append( this );
mPanner1Sep << 1 << 1;
@@ -208,39 +208,39 @@ KMMainWidget::KMMainWidget(QWidget *parent, const char *name,
activatePanners();
- QTimer::singleShot( 0, this, SLOT( slotShowStartupFolder() ));
+ TQTimer::singleShot( 0, this, TQT_SLOT( slotShowStartupFolder() ));
- connect( kmkernel->acctMgr(), SIGNAL( checkedMail( bool, bool, const QMap<QString, int> & ) ),
- this, SLOT( slotMailChecked( bool, bool, const QMap<QString, int> & ) ) );
+ connect( kmkernel->acctMgr(), TQT_SIGNAL( checkedMail( bool, bool, const TQMap<TQString, int> & ) ),
+ this, TQT_SLOT( slotMailChecked( bool, bool, const TQMap<TQString, int> & ) ) );
- connect( kmkernel->acctMgr(), SIGNAL( accountAdded( KMAccount* ) ),
- this, SLOT( initializeIMAPActions() ) );
- connect( kmkernel->acctMgr(), SIGNAL( accountRemoved( KMAccount* ) ),
- this, SLOT( initializeIMAPActions() ) );
+ connect( kmkernel->acctMgr(), TQT_SIGNAL( accountAdded( KMAccount* ) ),
+ this, TQT_SLOT( initializeIMAPActions() ) );
+ connect( kmkernel->acctMgr(), TQT_SIGNAL( accountRemoved( KMAccount* ) ),
+ this, TQT_SLOT( initializeIMAPActions() ) );
- connect(kmkernel, SIGNAL( configChanged() ),
- this, SLOT( slotConfigChanged() ));
+ connect(kmkernel, TQT_SIGNAL( configChanged() ),
+ this, TQT_SLOT( slotConfigChanged() ));
// display the full path to the folder in the caption
- connect(mFolderTree, SIGNAL(currentChanged(QListViewItem*)),
- this, SLOT(slotChangeCaption(QListViewItem*)));
- connect(mFolderTree, SIGNAL(selectionChanged()),
- SLOT(updateFolderMenu()) );
+ connect(mFolderTree, TQT_SIGNAL(currentChanged(TQListViewItem*)),
+ this, TQT_SLOT(slotChangeCaption(TQListViewItem*)));
+ connect(mFolderTree, TQT_SIGNAL(selectionChanged()),
+ TQT_SLOT(updateFolderMenu()) );
- connect(kmkernel->folderMgr(), SIGNAL(folderRemoved(KMFolder*)),
- this, SLOT(slotFolderRemoved(KMFolder*)));
+ connect(kmkernel->folderMgr(), TQT_SIGNAL(folderRemoved(KMFolder*)),
+ this, TQT_SLOT(slotFolderRemoved(KMFolder*)));
- connect(kmkernel->imapFolderMgr(), SIGNAL(folderRemoved(KMFolder*)),
- this, SLOT(slotFolderRemoved(KMFolder*)));
+ connect(kmkernel->imapFolderMgr(), TQT_SIGNAL(folderRemoved(KMFolder*)),
+ this, TQT_SLOT(slotFolderRemoved(KMFolder*)));
- connect(kmkernel->dimapFolderMgr(), SIGNAL(folderRemoved(KMFolder*)),
- this, SLOT(slotFolderRemoved(KMFolder*)));
+ connect(kmkernel->dimapFolderMgr(), TQT_SIGNAL(folderRemoved(KMFolder*)),
+ this, TQT_SLOT(slotFolderRemoved(KMFolder*)));
- connect(kmkernel->searchFolderMgr(), SIGNAL(folderRemoved(KMFolder*)),
- this, SLOT(slotFolderRemoved(KMFolder*)));
+ connect(kmkernel->searchFolderMgr(), TQT_SIGNAL(folderRemoved(KMFolder*)),
+ this, TQT_SLOT(slotFolderRemoved(KMFolder*)));
- connect( kmkernel, SIGNAL( onlineStatusChanged( GlobalSettings::EnumNetworkState::type ) ),
- this, SLOT( slotUpdateOnlineStatus( GlobalSettings::EnumNetworkState::type ) ) );
+ connect( kmkernel, TQT_SIGNAL( onlineStatusChanged( GlobalSettings::EnumNetworkState::type ) ),
+ this, TQT_SLOT( slotUpdateOnlineStatus( GlobalSettings::EnumNetworkState::type ) ) );
toggleSystemTray();
@@ -250,11 +250,11 @@ KMMainWidget::KMMainWidget(QWidget *parent, const char *name,
KMainWindow *mainWin = dynamic_cast<KMainWindow*>(topLevelWidget());
KStatusBar *sb = mainWin ? mainWin->statusBar() : 0;
- mVacationScriptIndicator = new KStatusBarLabel( QString(), 0, sb );
+ mVacationScriptIndicator = new KStatusBarLabel( TQString(), 0, sb );
mVacationScriptIndicator->hide();
- connect( mVacationScriptIndicator, SIGNAL(itemReleased(int)), SLOT(slotEditVacation()) );
+ connect( mVacationScriptIndicator, TQT_SIGNAL(itemReleased(int)), TQT_SLOT(slotEditVacation()) );
if ( GlobalSettings::checkOutOfOfficeOnStartup() )
- QTimer::singleShot( 0, this, SLOT(slotCheckVacation()) );
+ TQTimer::singleShot( 0, this, TQT_SLOT(slotCheckVacation()) );
}
@@ -347,8 +347,8 @@ void KMMainWidget::readConfig(void)
bool oldFolderQuickSearch = mEnableFolderQuickSearch;
bool oldQuickSearch = mEnableQuickSearch;
- QString str;
- QSize siz;
+ TQString str;
+ TQSize siz;
if (mStartupDone)
{
@@ -377,7 +377,7 @@ void KMMainWidget::readConfig(void)
{ // area for config group "Geometry"
KConfigGroupSaver saver(config, "Geometry");
// size of the mainwin
- QSize defaultSize(750,560);
+ TQSize defaultSize(750,560);
siz = config->readSizeEntry("MainWin", &defaultSize);
if (!siz.isEmpty())
resize(siz);
@@ -391,8 +391,8 @@ void KMMainWidget::readConfig(void)
mPanner1Sep.clear();
mPanner2Sep.clear();
- QValueList<int> & widths = mLongFolderList ? mPanner1Sep : mPanner2Sep ;
- QValueList<int> & heights = mLongFolderList ? mPanner2Sep : mPanner1Sep ;
+ TQValueList<int> & widths = mLongFolderList ? mPanner1Sep : mPanner2Sep ;
+ TQValueList<int> & heights = mLongFolderList ? mPanner2Sep : mPanner1Sep ;
widths << folderW << headerW;
heights << headerH << readerH;
@@ -455,7 +455,7 @@ void KMMainWidget::readConfig(void)
if ( mFolderViewSplitter && !GlobalSettings::self()->folderViewSplitterPosition().isEmpty() ) {
mFolderViewSplitter->setSizes( GlobalSettings::self()->folderViewSplitterPosition() );
} else {
- QValueList<int> defaults;
+ TQValueList<int> defaults;
defaults << (int)(height() * 0.2) << (int)(height() * 0.8);
mFolderViewSplitter->setSizes( defaults );
}
@@ -477,7 +477,7 @@ void KMMainWidget::readConfig(void)
bool check = config->readBoolEntry("checkmail-startup", false);
if (check)
// do it after building the kmmainwin, so that the progressdialog is available
- QTimer::singleShot( 0, this, SLOT( slotCheckMail() ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( slotCheckMail() ) );
}
}
@@ -524,7 +524,7 @@ void KMMainWidget::readConfig(void)
//-----------------------------------------------------------------------------
void KMMainWidget::writeConfig(void)
{
- QString s;
+ TQString s;
KConfig *config = KMKernel::config();
KConfigGroup geometry( config, "Geometry" );
@@ -539,8 +539,8 @@ void KMMainWidget::writeConfig(void)
geometry.writeEntry( "MainWin", this->geometry().size() );
- const QValueList<int> widths = ( mLongFolderList ? mPanner1 : mPanner2 )->sizes();
- const QValueList<int> heights = ( mLongFolderList ? mPanner2 : mPanner1 )->sizes();
+ const TQValueList<int> widths = ( mLongFolderList ? mPanner1 : mPanner2 )->sizes();
+ const TQValueList<int> heights = ( mLongFolderList ? mPanner2 : mPanner1 )->sizes();
geometry.writeEntry( "FolderPaneWidth", widths[0] );
geometry.writeEntry( "HeaderPaneWidth", widths[1] );
@@ -562,17 +562,17 @@ void KMMainWidget::writeConfig(void)
void KMMainWidget::createWidgets(void)
{
// Create the splitters according to the layout settings
- QWidget *headerParent = 0,
+ TQWidget *headerParent = 0,
*mimeParent = 0, *messageParent = 0;
const bool opaqueResize = KGlobalSettings::opaqueResize();
if ( mLongFolderList ) {
// superior splitter: folder tree vs. rest
// inferior splitter: headers vs. message vs. mime tree
- mPanner1 = new QSplitter( Qt::Horizontal, this, "panner 1" );
+ mPanner1 = new TQSplitter( Qt::Horizontal, this, "panner 1" );
mPanner1->setOpaqueResize( opaqueResize );
Qt::Orientation orientation = mReaderWindowBelow ? Qt::Vertical : Qt::Horizontal;
- mPanner2 = new QSplitter( orientation, mPanner1, "panner 2" );
+ mPanner2 = new TQSplitter( orientation, mPanner1, "panner 2" );
mPanner2->setOpaqueResize( opaqueResize );
mPanner2->setChildrenCollapsible( false );
mFolderViewParent = mPanner1;
@@ -580,10 +580,10 @@ void KMMainWidget::createWidgets(void)
} else /* !mLongFolderList */ {
// superior splitter: ( folder tree + headers ) vs. message vs. mime
// inferior splitter: folder tree vs. headers
- mPanner1 = new QSplitter( Qt::Vertical, this, "panner 1" );
+ mPanner1 = new TQSplitter( Qt::Vertical, this, "panner 1" );
mPanner1->setOpaqueResize( opaqueResize );
mPanner1->setChildrenCollapsible( false );
- mPanner2 = new QSplitter( Qt::Horizontal, mPanner1, "panner 2" );
+ mPanner2 = new TQSplitter( Qt::Horizontal, mPanner1, "panner 2" );
mPanner2->setOpaqueResize( opaqueResize );
headerParent = mFolderViewParent = mPanner2;
mimeParent = messageParent = mPanner1;
@@ -604,11 +604,11 @@ void KMMainWidget::createWidgets(void)
#ifndef NDEBUG
headerParent->dumpObjectTree();
#endif
- mSearchAndHeaders = new QVBox( headerParent );
+ mSearchAndHeaders = new TQVBox( headerParent );
mSearchToolBar = new KToolBar( mSearchAndHeaders, "search toolbar");
mSearchToolBar->setMovingEnabled(false);
mSearchToolBar->boxLayout()->setSpacing( KDialog::spacingHint() );
- QLabel *label = new QLabel( i18n("S&earch:"), mSearchToolBar, "kde toolbar widget" );
+ TQLabel *label = new TQLabel( i18n("S&earch:"), mSearchToolBar, "kde toolbar widget" );
mHeaders = new KMHeaders(this, mSearchAndHeaders, "headers");
@@ -620,26 +620,26 @@ void KMMainWidget::createWidgets(void)
actionCollection(), "headers quick search line" );
#endif
label->setBuddy( mQuickSearchLine );
- connect( mQuickSearchLine, SIGNAL( requestFullSearch() ),
- this, SLOT( slotRequestFullSearchFromQuickSearch() ) );
+ connect( mQuickSearchLine, TQT_SIGNAL( requestFullSearch() ),
+ this, TQT_SLOT( slotRequestFullSearchFromQuickSearch() ) );
mSearchToolBar->setStretchableWidget( mQuickSearchLine );
- connect( mHeaders, SIGNAL( messageListUpdated() ),
- mQuickSearchLine, SLOT( updateSearch() ) );
+ connect( mHeaders, TQT_SIGNAL( messageListUpdated() ),
+ mQuickSearchLine, TQT_SLOT( updateSearch() ) );
if ( !GlobalSettings::self()->quickSearchActive() ) mSearchToolBar->hide();
if (mReaderWindowActive) {
- connect(mHeaders, SIGNAL(selected(KMMessage*)),
- this, SLOT(slotMsgSelected(KMMessage*)));
- }
- connect(mHeaders, SIGNAL(activated(KMMessage*)),
- this, SLOT(slotMsgActivated(KMMessage*)));
- connect( mHeaders, SIGNAL( selectionChanged() ),
- SLOT( startUpdateMessageActionsTimer() ) );
- QAccel *accel = actionCollection()->kaccel();
+ connect(mHeaders, TQT_SIGNAL(selected(KMMessage*)),
+ this, TQT_SLOT(slotMsgSelected(KMMessage*)));
+ }
+ connect(mHeaders, TQT_SIGNAL(activated(KMMessage*)),
+ this, TQT_SLOT(slotMsgActivated(KMMessage*)));
+ connect( mHeaders, TQT_SIGNAL( selectionChanged() ),
+ TQT_SLOT( startUpdateMessageActionsTimer() ) );
+ TQAccel *accel = actionCollection()->kaccel();
accel->connectItem(accel->insertItem(SHIFT+Key_Left),
- mHeaders, SLOT(selectPrevMessage()));
+ mHeaders, TQT_SLOT(selectPrevMessage()));
accel->connectItem(accel->insertItem(SHIFT+Key_Right),
- mHeaders, SLOT(selectNextMessage()));
+ mHeaders, TQT_SLOT(selectNextMessage()));
if (mReaderWindowActive) {
mMsgView = new KMReaderWin(messageParent, this, actionCollection(), 0 );
@@ -647,24 +647,24 @@ void KMMainWidget::createWidgets(void)
mMsgActions->setMessageView( mMsgView );
}
- connect(mMsgView, SIGNAL(replaceMsgByUnencryptedVersion()),
- this, SLOT(slotReplaceMsgByUnencryptedVersion()));
- connect(mMsgView, SIGNAL(popupMenu(KMMessage&,const KURL&,const QPoint&)),
- this, SLOT(slotMsgPopup(KMMessage&,const KURL&,const QPoint&)));
- connect(mMsgView, SIGNAL(urlClicked(const KURL&,int)),
- mMsgView, SLOT(slotUrlClicked()));
- connect(mHeaders, SIGNAL(maybeDeleting()),
- mMsgView, SLOT(clearCache()));
- connect(mMsgView, SIGNAL(noDrag()),
- mHeaders, SLOT(slotNoDrag()));
+ connect(mMsgView, TQT_SIGNAL(replaceMsgByUnencryptedVersion()),
+ this, TQT_SLOT(slotReplaceMsgByUnencryptedVersion()));
+ connect(mMsgView, TQT_SIGNAL(popupMenu(KMMessage&,const KURL&,const TQPoint&)),
+ this, TQT_SLOT(slotMsgPopup(KMMessage&,const KURL&,const TQPoint&)));
+ connect(mMsgView, TQT_SIGNAL(urlClicked(const KURL&,int)),
+ mMsgView, TQT_SLOT(slotUrlClicked()));
+ connect(mHeaders, TQT_SIGNAL(maybeDeleting()),
+ mMsgView, TQT_SLOT(clearCache()));
+ connect(mMsgView, TQT_SIGNAL(noDrag()),
+ mHeaders, TQT_SLOT(slotNoDrag()));
accel->connectItem(accel->insertItem(Key_Up),
- mMsgView, SLOT(slotScrollUp()));
+ mMsgView, TQT_SLOT(slotScrollUp()));
accel->connectItem(accel->insertItem(Key_Down),
- mMsgView, SLOT(slotScrollDown()));
+ mMsgView, TQT_SLOT(slotScrollDown()));
accel->connectItem(accel->insertItem(Key_Prior),
- mMsgView, SLOT(slotScrollPrior()));
+ mMsgView, TQT_SLOT(slotScrollPrior()));
accel->connectItem(accel->insertItem(Key_Next),
- mMsgView, SLOT(slotScrollNext()));
+ mMsgView, TQT_SLOT(slotScrollNext()));
} else {
mMsgView = NULL;
}
@@ -672,43 +672,43 @@ void KMMainWidget::createWidgets(void)
KAction *action;
action = new KAction( i18n("Move Message to Folder"), Key_M, this,
- SLOT(slotMoveMsg()), actionCollection(),
+ TQT_SLOT(slotMoveMsg()), actionCollection(),
"move_message_to_folder" );
action->plugAccel( actionCollection()->kaccel() );
action = new KAction( i18n("Copy Message to Folder"), Key_C, this,
- SLOT(slotCopyMsg()), actionCollection(),
+ TQT_SLOT(slotCopyMsg()), actionCollection(),
"copy_message_to_folder" );
action->plugAccel( actionCollection()->kaccel() );
action = new KAction( i18n("Jump to Folder"), Key_J, this,
- SLOT(slotJumpToFolder()), actionCollection(),
+ TQT_SLOT(slotJumpToFolder()), actionCollection(),
"jump_to_folder" );
action->plugAccel( actionCollection()->kaccel() );
// create list of folders
- mFolderViewSplitter = new QSplitter( Qt::Vertical, mFolderViewParent );
+ mFolderViewSplitter = new TQSplitter( Qt::Vertical, mFolderViewParent );
mFolderViewSplitter->setOpaqueResize( KGlobalSettings::opaqueResize() );
mFavoriteFolderView = new KMail::FavoriteFolderView( this, mFolderViewSplitter );
if ( mFavoritesCheckMailAction )
- connect( mFavoritesCheckMailAction, SIGNAL(activated()), mFavoriteFolderView, SLOT(checkMail()) );
- QWidget *folderTreeParent = mFolderViewParent;
+ connect( mFavoritesCheckMailAction, TQT_SIGNAL(activated()), mFavoriteFolderView, TQT_SLOT(checkMail()) );
+ TQWidget *folderTreeParent = mFolderViewParent;
if ( GlobalSettings::enableFavoriteFolderView() ) {
folderTreeParent = mFolderViewSplitter;
mFolderView = mFolderViewSplitter;
}
// the "folder tree" consists of a quicksearch input field and the tree itself
- mSearchAndTree = new QVBox(folderTreeParent);
- mFolderQuickSearch = new QHBox(mSearchAndTree);
- QPushButton *clear = new QPushButton(QApplication::reverseLayout()
+ mSearchAndTree = new TQVBox(folderTreeParent);
+ mFolderQuickSearch = new TQHBox(mSearchAndTree);
+ TQPushButton *clear = new TQPushButton(TQApplication::reverseLayout()
? SmallIcon("clear_left")
: SmallIcon("locationbar_erase"), "", mFolderQuickSearch);
clear->setFlat(true);
KListViewSearchLine *search = new KListViewSearchLine(mFolderQuickSearch);
mFolderTree = new KMFolderTree(this, mSearchAndTree, "folderTree");
search->setListView(mFolderTree);
- connect(clear, SIGNAL(clicked()), search, SLOT(clear()));
+ connect(clear, TQT_SIGNAL(clicked()), search, TQT_SLOT(clear()));
if ( !GlobalSettings::enableFolderQuickSearch() ) {
mFolderQuickSearch->hide();
@@ -717,72 +717,72 @@ void KMMainWidget::createWidgets(void)
if ( !GlobalSettings::enableFavoriteFolderView() ) {
mFolderView = mSearchAndTree;
}
- connect( mFolderTree, SIGNAL(folderSelected(KMFolder*)),
- mFavoriteFolderView, SLOT(folderTreeSelectionChanged(KMFolder*)) );
-
- connect(mFolderTree, SIGNAL(folderSelected(KMFolder*)),
- this, SLOT(folderSelected(KMFolder*)));
- connect( mFolderTree, SIGNAL( folderSelected( KMFolder* ) ),
- mQuickSearchLine, SLOT( reset() ) );
- connect(mFolderTree, SIGNAL(folderSelectedUnread(KMFolder*)),
- this, SLOT(folderSelectedUnread(KMFolder*)));
- connect(mFolderTree, SIGNAL(folderDrop(KMFolder*)),
- this, SLOT(slotMoveMsgToFolder(KMFolder*)));
- connect(mFolderTree, SIGNAL(folderDropCopy(KMFolder*)),
- this, SLOT(slotCopyMsgToFolder(KMFolder*)));
- connect(mFolderTree, SIGNAL(columnsChanged()),
- this, SLOT(slotFolderTreeColumnsChanged()));
+ connect( mFolderTree, TQT_SIGNAL(folderSelected(KMFolder*)),
+ mFavoriteFolderView, TQT_SLOT(folderTreeSelectionChanged(KMFolder*)) );
+
+ connect(mFolderTree, TQT_SIGNAL(folderSelected(KMFolder*)),
+ this, TQT_SLOT(folderSelected(KMFolder*)));
+ connect( mFolderTree, TQT_SIGNAL( folderSelected( KMFolder* ) ),
+ mQuickSearchLine, TQT_SLOT( reset() ) );
+ connect(mFolderTree, TQT_SIGNAL(folderSelectedUnread(KMFolder*)),
+ this, TQT_SLOT(folderSelectedUnread(KMFolder*)));
+ connect(mFolderTree, TQT_SIGNAL(folderDrop(KMFolder*)),
+ this, TQT_SLOT(slotMoveMsgToFolder(KMFolder*)));
+ connect(mFolderTree, TQT_SIGNAL(folderDropCopy(KMFolder*)),
+ this, TQT_SLOT(slotCopyMsgToFolder(KMFolder*)));
+ connect(mFolderTree, TQT_SIGNAL(columnsChanged()),
+ this, TQT_SLOT(slotFolderTreeColumnsChanged()));
if ( mFavoriteFolderView ) {
- connect( mFavoriteFolderView, SIGNAL(folderDrop(KMFolder*)), SLOT(slotMoveMsgToFolder(KMFolder*)) );
- connect( mFavoriteFolderView, SIGNAL(folderDropCopy(KMFolder*)), SLOT(slotCopyMsgToFolder(KMFolder*)) );
+ connect( mFavoriteFolderView, TQT_SIGNAL(folderDrop(KMFolder*)), TQT_SLOT(slotMoveMsgToFolder(KMFolder*)) );
+ connect( mFavoriteFolderView, TQT_SIGNAL(folderDropCopy(KMFolder*)), TQT_SLOT(slotCopyMsgToFolder(KMFolder*)) );
}
//Commands not worthy of menu items, but that deserve configurable keybindings
mRemoveDuplicatesAction = new KAction(
i18n("Remove Duplicate Messages"), CTRL+Key_Asterisk, this,
- SLOT(removeDuplicates()), actionCollection(), "remove_duplicate_messages");
+ TQT_SLOT(removeDuplicates()), actionCollection(), "remove_duplicate_messages");
action->plugAccel( actionCollection()->kaccel() );
action = new KAction(
i18n("Abort Current Operation"), Key_Escape, ProgressManager::instance(),
- SLOT(slotAbortAll()), actionCollection(), "cancel" );
+ TQT_SLOT(slotAbortAll()), actionCollection(), "cancel" );
action->plugAccel( actionCollection()->kaccel() );
action = new KAction(
i18n("Focus on Next Folder"), CTRL+Key_Right, mFolderTree,
- SLOT(incCurrentFolder()), actionCollection(), "inc_current_folder");
+ TQT_SLOT(incCurrentFolder()), actionCollection(), "inc_current_folder");
action->plugAccel( actionCollection()->kaccel() );
action = new KAction(
i18n("Focus on Previous Folder"), CTRL+Key_Left, mFolderTree,
- SLOT(decCurrentFolder()), actionCollection(), "dec_current_folder");
+ TQT_SLOT(decCurrentFolder()), actionCollection(), "dec_current_folder");
action->plugAccel( actionCollection()->kaccel() );
action = new KAction(
i18n("Select Folder with Focus"), CTRL+Key_Space, mFolderTree,
- SLOT(selectCurrentFolder()), actionCollection(), "select_current_folder");
+ TQT_SLOT(selectCurrentFolder()), actionCollection(), "select_current_folder");
action->plugAccel( actionCollection()->kaccel() );
action = new KAction(
i18n("Focus on Next Message"), ALT+Key_Right, mHeaders,
- SLOT(incCurrentMessage()), actionCollection(), "inc_current_message");
+ TQT_SLOT(incCurrentMessage()), actionCollection(), "inc_current_message");
action->plugAccel( actionCollection()->kaccel() );
action = new KAction(
i18n("Focus on Previous Message"), ALT+Key_Left, mHeaders,
- SLOT(decCurrentMessage()), actionCollection(), "dec_current_message");
+ TQT_SLOT(decCurrentMessage()), actionCollection(), "dec_current_message");
action->plugAccel( actionCollection()->kaccel() );
action = new KAction(
i18n("Select Message with Focus"), ALT+Key_Space, mHeaders,
- SLOT( selectCurrentMessage() ), actionCollection(), "select_current_message");
+ TQT_SLOT( selectCurrentMessage() ), actionCollection(), "select_current_message");
action->plugAccel( actionCollection()->kaccel() );
- connect( kmkernel->outboxFolder(), SIGNAL( msgRemoved(int, QString) ),
- SLOT( startUpdateMessageActionsTimer() ) );
- connect( kmkernel->outboxFolder(), SIGNAL( msgAdded(int) ),
- SLOT( startUpdateMessageActionsTimer() ) );
+ connect( kmkernel->outboxFolder(), TQT_SIGNAL( msgRemoved(int, TQString) ),
+ TQT_SLOT( startUpdateMessageActionsTimer() ) );
+ connect( kmkernel->outboxFolder(), TQT_SIGNAL( msgAdded(int) ),
+ TQT_SLOT( startUpdateMessageActionsTimer() ) );
}
@@ -790,45 +790,45 @@ void KMMainWidget::createWidgets(void)
void KMMainWidget::activatePanners(void)
{
if (mMsgView) {
- QObject::disconnect( mMsgView->copyAction(),
- SIGNAL( activated() ),
- mMsgView, SLOT( slotCopySelectedText() ));
+ TQObject::disconnect( mMsgView->copyAction(),
+ TQT_SIGNAL( activated() ),
+ mMsgView, TQT_SLOT( slotCopySelectedText() ));
}
setupFolderView();
if ( mLongFolderList ) {
- mSearchAndHeaders->reparent( mPanner2, 0, QPoint( 0, 0 ) );
+ mSearchAndHeaders->reparent( mPanner2, 0, TQPoint( 0, 0 ) );
if (mMsgView) {
- mMsgView->reparent( mPanner2, 0, QPoint( 0, 0 ) );
+ mMsgView->reparent( mPanner2, 0, TQPoint( 0, 0 ) );
mPanner2->moveToLast( mMsgView );
}
mFolderViewParent = mPanner1;
- mFolderView->reparent( mFolderViewParent, 0, QPoint( 0, 0 ) );
+ mFolderView->reparent( mFolderViewParent, 0, TQPoint( 0, 0 ) );
mPanner1->moveToLast( mPanner2 );
mPanner1->setSizes( mPanner1Sep );
- mPanner1->setResizeMode( mFolderView, QSplitter::KeepSize );
+ mPanner1->setResizeMode( mFolderView, TQSplitter::KeepSize );
mPanner2->setSizes( mPanner2Sep );
- mPanner2->setResizeMode( mSearchAndHeaders, QSplitter::KeepSize );
+ mPanner2->setResizeMode( mSearchAndHeaders, TQSplitter::KeepSize );
} else /* !mLongFolderList */ {
mFolderViewParent = mPanner2;
- mFolderView->reparent( mFolderViewParent, 0, QPoint( 0, 0 ) );
- mSearchAndHeaders->reparent( mPanner2, 0, QPoint( 0, 0 ) );
+ mFolderView->reparent( mFolderViewParent, 0, TQPoint( 0, 0 ) );
+ mSearchAndHeaders->reparent( mPanner2, 0, TQPoint( 0, 0 ) );
mPanner2->moveToLast( mSearchAndHeaders );
mPanner1->moveToFirst( mPanner2 );
if (mMsgView) {
- mMsgView->reparent( mPanner1, 0, QPoint( 0, 0 ) );
+ mMsgView->reparent( mPanner1, 0, TQPoint( 0, 0 ) );
mPanner1->moveToLast( mMsgView );
}
mPanner1->setSizes( mPanner1Sep );
mPanner2->setSizes( mPanner2Sep );
- mPanner1->setResizeMode( mPanner2, QSplitter::KeepSize );
- mPanner2->setResizeMode( mFolderView, QSplitter::KeepSize );
+ mPanner1->setResizeMode( mPanner2, TQSplitter::KeepSize );
+ mPanner2->setResizeMode( mFolderView, TQSplitter::KeepSize );
}
if (mMsgView) {
- QObject::connect( mMsgView->copyAction(),
- SIGNAL( activated() ),
- mMsgView, SLOT( slotCopySelectedText() ));
+ TQObject::connect( mMsgView->copyAction(),
+ TQT_SIGNAL( activated() ),
+ mMsgView, TQT_SLOT( slotCopySelectedText() ));
}
}
@@ -836,14 +836,14 @@ void KMMainWidget::activatePanners(void)
//-----------------------------------------------------------------------------
void KMMainWidget::hide()
{
- QWidget::hide();
+ TQWidget::hide();
}
//-----------------------------------------------------------------------------
void KMMainWidget::show()
{
- QWidget::show();
+ TQWidget::show();
}
//-------------------------------------------------------------------------
@@ -852,8 +852,8 @@ void KMMainWidget::slotSearch()
if(!mSearchWin)
{
mSearchWin = new SearchWindow(this, "Search", mFolder, false);
- connect(mSearchWin, SIGNAL(destroyed()),
- this, SLOT(slotSearchClosed()));
+ connect(mSearchWin, TQT_SIGNAL(destroyed()),
+ this, TQT_SLOT(slotSearchClosed()));
}
else
{
@@ -943,7 +943,7 @@ void KMMainWidget::slotCheckOneAccount(int item)
//-----------------------------------------------------------------------------
void KMMainWidget::slotMailChecked( bool newMail, bool sendOnCheck,
- const QMap<QString, int> & newInFolder )
+ const TQMap<TQString, int> & newInFolder )
{
const bool sendOnAll =
GlobalSettings::self()->sendOnCheck() == GlobalSettings::EnumSendOnCheck::SendOnAllChecks;
@@ -955,14 +955,14 @@ void KMMainWidget::slotMailChecked( bool newMail, bool sendOnCheck,
if ( !newMail || newInFolder.isEmpty() )
return;
- kapp->dcopClient()->emitDCOPSignal( "unreadCountChanged()", QByteArray() );
+ kapp->dcopClient()->emitDCOPSignal( "unreadCountChanged()", TQByteArray() );
// build summary for new mail message
bool showNotification = false;
- QString summary;
- QStringList keys( newInFolder.keys() );
+ TQString summary;
+ TQStringList keys( newInFolder.keys() );
keys.sort();
- for ( QStringList::const_iterator it = keys.begin();
+ for ( TQStringList::const_iterator it = keys.begin();
it != keys.end();
++it ) {
kdDebug(5006) << newInFolder.find( *it ).data() << " new message(s) in "
@@ -1053,7 +1053,7 @@ void KMMainWidget::slotShowNewFromTemplate()
for ( int idx = 0; idx<mTemplateFolder->count(); ++idx ) {
KMMsgBase *mb = mTemplateFolder->getMsgBase( idx );
- QString subj = mb->subject();
+ TQString subj = mb->subject();
if ( subj.isEmpty() ) subj = i18n("No Subject");
mTemplateMenu->popupMenu()->insertItem(
KStringHandler::rsqueeze( subj.replace( "&", "&&" ) ), idx );
@@ -1133,7 +1133,7 @@ void KMMainWidget::modifyFolder( KMFolderTreeItem* folderItem )
//-----------------------------------------------------------------------------
void KMMainWidget::slotExpireFolder()
{
- QString str;
+ TQString str;
bool canBeExpired = true;
if (!mFolder) return;
@@ -1154,7 +1154,7 @@ void KMMainWidget::slotExpireFolder()
KConfigGroupSaver saver(config, "General");
if (config->readBoolEntry("warn-before-expire", true)) {
- str = i18n("<qt>Are you sure you want to expire the folder <b>%1</b>?</qt>").arg(QStyleSheet::escape( mFolder->label() ));
+ str = i18n("<qt>Are you sure you want to expire the folder <b>%1</b>?</qt>").arg(TQStyleSheet::escape( mFolder->label() ));
if (KMessageBox::warningContinueCancel(this, str, i18n("Expire Folder"),
i18n("&Expire"))
!= KMessageBox::Continue) return;
@@ -1166,18 +1166,18 @@ void KMMainWidget::slotExpireFolder()
//-----------------------------------------------------------------------------
void KMMainWidget::slotEmptyFolder()
{
- QString str;
+ TQString str;
if (!mFolder) return;
bool isTrash = kmkernel->folderIsTrash(mFolder);
if (mConfirmEmpty)
{
- QString title = (isTrash) ? i18n("Empty Trash") : i18n("Move to Trash");
- QString text = (isTrash) ?
+ TQString title = (isTrash) ? i18n("Empty Trash") : i18n("Move to Trash");
+ TQString text = (isTrash) ?
i18n("Are you sure you want to empty the trash folder?") :
i18n("<qt>Are you sure you want to move all messages from "
- "folder <b>%1</b> to the trash?</qt>").arg( QStyleSheet::escape( mFolder->label() ) );
+ "folder <b>%1</b> to the trash?</qt>").arg( TQStyleSheet::escape( mFolder->label() ) );
if (KMessageBox::warningContinueCancel(this, text, title, KGuiItem( title, "edittrash"))
!= KMessageBox::Continue) return;
@@ -1208,26 +1208,26 @@ void KMMainWidget::slotEmptyFolder()
//-----------------------------------------------------------------------------
void KMMainWidget::slotRemoveFolder()
{
- QString str;
- QDir dir;
+ TQString str;
+ TQDir dir;
if ( !mFolder ) return;
if ( mFolder->isSystemFolder() ) return;
if ( mFolder->isReadOnly() ) return;
- QString title;
+ TQString title;
if ( mFolder->folderType() == KMFolderTypeSearch ) {
title = i18n("Delete Search");
str = i18n("<qt>Are you sure you want to delete the search <b>%1</b>?<br>"
"Any messages it shows will still be available in their original folder.</qt>")
- .arg( QStyleSheet::escape( mFolder->label() ) );
+ .arg( TQStyleSheet::escape( mFolder->label() ) );
} else {
title = i18n("Delete Folder");
if ( mFolder->count() == 0 ) {
if ( !mFolder->child() || mFolder->child()->isEmpty() ) {
str = i18n("<qt>Are you sure you want to delete the empty folder "
"<b>%1</b>?</qt>")
- .arg( QStyleSheet::escape( mFolder->label() ) );
+ .arg( TQStyleSheet::escape( mFolder->label() ) );
}
else {
str = i18n("<qt>Are you sure you want to delete the empty folder "
@@ -1235,7 +1235,7 @@ void KMMainWidget::slotRemoveFolder()
"not be empty and their contents will be discarded as well. "
"<p><b>Beware</b> that discarded messages are not saved "
"into your Trash folder and are permanently deleted.</qt>")
- .arg( QStyleSheet::escape( mFolder->label() ) );
+ .arg( TQStyleSheet::escape( mFolder->label() ) );
}
} else {
if ( !mFolder->child() || mFolder->child()->isEmpty() ) {
@@ -1243,14 +1243,14 @@ void KMMainWidget::slotRemoveFolder()
"<b>%1</b>, discarding its contents? "
"<p><b>Beware</b> that discarded messages are not saved "
"into your Trash folder and are permanently deleted.</qt>")
- .arg( QStyleSheet::escape( mFolder->label() ) );
+ .arg( TQStyleSheet::escape( mFolder->label() ) );
}
else {
str = i18n("<qt>Are you sure you want to delete the folder <b>%1</b> "
"and all its subfolders, discarding their contents? "
"<p><b>Beware</b> that discarded messages are not saved "
"into your Trash folder and are permanently deleted.</qt>")
- .arg( QStyleSheet::escape( mFolder->label() ) );
+ .arg( TQStyleSheet::escape( mFolder->label() ) );
}
}
}
@@ -1304,7 +1304,7 @@ void KMMainWidget::slotCompactFolder()
KCursorSaver busy(KBusyPtr::busy());
mFolder->compact( KMFolder::CompactNow );
// setCurrentItemByIndex will override the statusbar message, so save/restore it
- QString statusMsg = BroadcastStatus::instance()->statusMsg();
+ TQString statusMsg = BroadcastStatus::instance()->statusMsg();
mHeaders->setCurrentItemByIndex(idx);
BroadcastStatus::instance()->setStatusMsg( statusMsg );
}
@@ -1549,8 +1549,8 @@ void KMMainWidget::slotRedirectMsg()
//-----------------------------------------------------------------------------
void KMMainWidget::slotCustomReplyToMsg( int tid )
{
- QString text = mMsgView? mMsgView->copyText() : "";
- QString tmpl = mCustomTemplates[ tid ];
+ TQString text = mMsgView? mMsgView->copyText() : "";
+ TQString tmpl = mCustomTemplates[ tid ];
kdDebug() << "Reply with template: " << tmpl << " (" << tid << ")" << endl;
KMCommand *command = new KMCustomReplyToCommand( this,
mHeaders->currentMsg(),
@@ -1563,8 +1563,8 @@ void KMMainWidget::slotCustomReplyToMsg( int tid )
//-----------------------------------------------------------------------------
void KMMainWidget::slotCustomReplyAllToMsg( int tid )
{
- QString text = mMsgView? mMsgView->copyText() : "";
- QString tmpl = mCustomTemplates[ tid ];
+ TQString text = mMsgView? mMsgView->copyText() : "";
+ TQString tmpl = mCustomTemplates[ tid ];
kdDebug() << "Reply to All with template: " << tmpl << " (" << tid << ")" << endl;
KMCommand *command = new KMCustomReplyAllToCommand( this,
mHeaders->currentMsg(),
@@ -1577,7 +1577,7 @@ void KMMainWidget::slotCustomReplyAllToMsg( int tid )
//-----------------------------------------------------------------------------
void KMMainWidget::slotCustomForwardMsg( int tid )
{
- QString tmpl = mCustomTemplates[ tid ];
+ TQString tmpl = mCustomTemplates[ tid ];
kdDebug() << "Forward with template: " << tmpl << " (" << tid << ")" << endl;
KMMessageList* selected = mHeaders->selectedMsgs();
KMCommand *command = 0L;
@@ -1652,9 +1652,9 @@ void KMMainWidget::slotToFilter()
void KMMainWidget::updateListFilterAction()
{
//Proxy the mListFilterAction to update the action text
- QCString name;
- QString value;
- QString lname = MailingList::name( mHeaders->currentMsg(), name, value );
+ TQCString name;
+ TQString value;
+ TQString lname = MailingList::name( mHeaders->currentMsg(), name, value );
mListFilterAction->setText( i18n("Filter on Mailing-List...") );
if ( lname.isNull() )
mListFilterAction->setEnabled( false );
@@ -1741,7 +1741,7 @@ void KMMainWidget::slotCheckVacation()
return;
Vacation *vac = new Vacation( this, true /* check only */ );
- connect( vac, SIGNAL(scriptActive(bool)), SLOT(updateVactionScriptStatus(bool)) );
+ connect( vac, TQT_SIGNAL(scriptActive(bool)), TQT_SLOT(updateVactionScriptStatus(bool)) );
}
void KMMainWidget::slotEditVacation()
@@ -1754,18 +1754,18 @@ void KMMainWidget::slotEditVacation()
return;
mVacation = new Vacation( this );
- connect( mVacation, SIGNAL(scriptActive(bool)), SLOT(updateVactionScriptStatus(bool)) );
+ connect( mVacation, TQT_SIGNAL(scriptActive(bool)), TQT_SLOT(updateVactionScriptStatus(bool)) );
if ( mVacation->isUsable() ) {
- connect( mVacation, SIGNAL(result(bool)), mVacation, SLOT(deleteLater()) );
+ connect( mVacation, TQT_SIGNAL(result(bool)), mVacation, TQT_SLOT(deleteLater()) );
} else {
- QString msg = i18n("KMail's Out of Office Reply functionality relies on "
+ TQString msg = i18n("KMail's Out of Office Reply functionality relies on "
"server-side filtering. You have not yet configured an "
"IMAP server for this.\n"
"You can do this on the \"Filtering\" tab of the IMAP "
"account configuration.");
KMessageBox::sorry( this, msg, i18n("No Server-Side Filtering Configured") );
- delete mVacation; // QGuardedPtr sets itself to 0!
+ delete mVacation; // TQGuardedPtr sets itself to 0!
}
}
@@ -1917,8 +1917,8 @@ void KMMainWidget::slotSendQueuedVia( int item )
return;
}
- QStringList availTransports= KMail::TransportManager::transportNames();
- QString customTransport = availTransports[ item ];
+ TQStringList availTransports= KMail::TransportManager::transportNames();
+ TQString customTransport = availTransports[ item ];
kmkernel->msgSender()->sendQueued( customTransport );
}
@@ -2001,14 +2001,14 @@ void KMMainWidget::folderSelected( KMFolder* aFolder, bool forceJumpToUnread )
if ( newFolder )
writeFolderConfig();
if ( mFolder ) {
- disconnect( mFolder, SIGNAL( changed() ),
- this, SLOT( updateMarkAsReadAction() ) );
- disconnect( mFolder, SIGNAL( msgHeaderChanged( KMFolder*, int ) ),
- this, SLOT( updateMarkAsReadAction() ) );
- disconnect( mFolder, SIGNAL( msgAdded( int ) ),
- this, SLOT( updateMarkAsReadAction() ) );
- disconnect( mFolder, SIGNAL( msgRemoved( KMFolder * ) ),
- this, SLOT( updateMarkAsReadAction() ) );
+ disconnect( mFolder, TQT_SIGNAL( changed() ),
+ this, TQT_SLOT( updateMarkAsReadAction() ) );
+ disconnect( mFolder, TQT_SIGNAL( msgHeaderChanged( KMFolder*, int ) ),
+ this, TQT_SLOT( updateMarkAsReadAction() ) );
+ disconnect( mFolder, TQT_SIGNAL( msgAdded( int ) ),
+ this, TQT_SLOT( updateMarkAsReadAction() ) );
+ disconnect( mFolder, TQT_SIGNAL( msgRemoved( KMFolder * ) ),
+ this, TQT_SLOT( updateMarkAsReadAction() ) );
}
mFolder = aFolder;
@@ -2025,8 +2025,8 @@ void KMMainWidget::folderSelected( KMFolder* aFolder, bool forceJumpToUnread )
imap->open("mainwidget"); // will be closed in the folderSelected slot
// first get new headers before we select the folder
imap->setSelected( true );
- connect( imap, SIGNAL( folderComplete( KMFolderImap*, bool ) ),
- this, SLOT( folderSelected() ) );
+ connect( imap, TQT_SIGNAL( folderComplete( KMFolderImap*, bool ) ),
+ this, TQT_SLOT( folderSelected() ) );
imap->getAndCheckFolder();
mHeaders->setFolder( 0 );
updateFolderMenu();
@@ -2034,27 +2034,27 @@ void KMMainWidget::folderSelected( KMFolder* aFolder, bool forceJumpToUnread )
// Set a timer to show a splash screen if fetching folder contents
// takes more than the amount of seconds configured in the kmailrc (default 1000 msec)
- mShowBusySplashTimer = new QTimer( this );
- connect( mShowBusySplashTimer, SIGNAL( timeout() ), this, SLOT( slotShowBusySplash() ) );
+ mShowBusySplashTimer = new TQTimer( this );
+ connect( mShowBusySplashTimer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( slotShowBusySplash() ) );
mShowBusySplashTimer->start( GlobalSettings::self()->folderLoadingTimeout(), true );
return;
} else {
// the folder is complete now - so go ahead
- disconnect( imap, SIGNAL( folderComplete( KMFolderImap*, bool ) ),
- this, SLOT( folderSelected() ) );
+ disconnect( imap, TQT_SIGNAL( folderComplete( KMFolderImap*, bool ) ),
+ this, TQT_SLOT( folderSelected() ) );
forceJumpToUnread = mForceJumpToUnread;
}
}
if ( mFolder ) { // == 0 -> pointing to toplevel ("Welcome to KMail") folder
- connect( mFolder, SIGNAL( changed() ),
- this, SLOT( updateMarkAsReadAction() ) );
- connect( mFolder, SIGNAL( msgHeaderChanged( KMFolder*, int ) ),
- this, SLOT( updateMarkAsReadAction() ) );
- connect( mFolder, SIGNAL( msgAdded( int ) ),
- this, SLOT( updateMarkAsReadAction() ) );
- connect( mFolder, SIGNAL( msgRemoved(KMFolder *) ),
- this, SLOT( updateMarkAsReadAction() ) );
+ connect( mFolder, TQT_SIGNAL( changed() ),
+ this, TQT_SLOT( updateMarkAsReadAction() ) );
+ connect( mFolder, TQT_SIGNAL( msgHeaderChanged( KMFolder*, int ) ),
+ this, TQT_SLOT( updateMarkAsReadAction() ) );
+ connect( mFolder, TQT_SIGNAL( msgAdded( int ) ),
+ this, TQT_SLOT( updateMarkAsReadAction() ) );
+ connect( mFolder, TQT_SIGNAL( msgRemoved(KMFolder *) ),
+ this, TQT_SLOT( updateMarkAsReadAction() ) );
}
readFolderConfig();
if (mMsgView)
@@ -2108,8 +2108,8 @@ void KMMainWidget::slotMsgSelected(KMMessage *msg)
}
mJob = msg->parent()->createJob( msg, FolderJob::tGetMessage, 0,
"STRUCTURE", mMsgView->attachmentStrategy() );
- connect(mJob, SIGNAL(messageRetrieved(KMMessage*)),
- mMsgView, SLOT(slotMessageArrived(KMMessage*)));
+ connect(mJob, TQT_SIGNAL(messageRetrieved(KMMessage*)),
+ mMsgView, TQT_SLOT(slotMessageArrived(KMMessage*)));
mJob->start();
} else {
mMsgView->setMsg(msg);
@@ -2130,7 +2130,7 @@ void KMMainWidget::slotMsgChanged()
//-----------------------------------------------------------------------------
void KMMainWidget::slotSelectFolder(KMFolder* folder)
{
- QListViewItem* item = mFolderTree->indexOfFolder(folder);
+ TQListViewItem* item = mFolderTree->indexOfFolder(folder);
if ( item ) {
mFolderTree->ensureItemVisible( item );
mFolderTree->doFolderSelected( item );
@@ -2162,8 +2162,8 @@ void KMMainWidget::slotReplaceMsgByUnencryptedVersion()
KMMessage* newMsg = oldMsg->unencryptedMsg();
// adjust the message id
{
- QString msgId( oldMsg->msgId() );
- QString prefix("DecryptedMsg.");
+ TQString msgId( oldMsg->msgId() );
+ TQString prefix("DecryptedMsg.");
int oldIdx = msgId.find(prefix, 0, false);
if( -1 == oldIdx ) {
int leftAngle = msgId.findRev( '<' );
@@ -2172,7 +2172,7 @@ void KMMainWidget::slotReplaceMsgByUnencryptedVersion()
else {
// toggle between "DecryptedMsg." and "DeCryptedMsg."
// to avoid same message id
- QCharRef c = msgId[ oldIdx+2 ];
+ TQCharRef c = msgId[ oldIdx+2 ];
if( 'C' == c )
c = 'c';
else
@@ -2293,8 +2293,8 @@ void KMMainWidget::slotMsgActivated(KMMessage *msg)
if ( !msg ) return;
if ( msg->parent() && !msg->isComplete() ) {
FolderJob *job = msg->parent()->createJob( msg );
- connect( job, SIGNAL( messageRetrieved( KMMessage* ) ),
- SLOT( slotMsgActivated( KMMessage* ) ) );
+ connect( job, TQT_SIGNAL( messageRetrieved( KMMessage* ) ),
+ TQT_SLOT( slotMsgActivated( KMMessage* ) ) );
job->start();
return;
}
@@ -2329,7 +2329,7 @@ void KMMainWidget::slotMarkAll()
}
//-----------------------------------------------------------------------------
-void KMMainWidget::slotMsgPopup(KMMessage&, const KURL &aUrl, const QPoint& aPoint)
+void KMMainWidget::slotMsgPopup(KMMessage&, const KURL &aUrl, const TQPoint& aPoint)
{
KPopupMenu * menu = new KPopupMenu;
updateMessageMenu();
@@ -2438,11 +2438,11 @@ void KMMainWidget::slotMsgPopup(KMMessage&, const KURL &aUrl, const QPoint& aPoi
//-----------------------------------------------------------------------------
void KMMainWidget::getAccountMenu()
{
- QStringList actList;
+ TQStringList actList;
mActMenu->clear();
actList = kmkernel->acctMgr()->getAccounts();
- QStringList::Iterator it;
+ TQStringList::Iterator it;
int id = 0;
for(it = actList.begin(); it != actList.end() ; ++it, id++)
mActMenu->insertItem((*it).replace("&", "&&"), id);
@@ -2451,11 +2451,11 @@ void KMMainWidget::getAccountMenu()
//-----------------------------------------------------------------------------
void KMMainWidget::getTransportMenu()
{
- QStringList availTransports;
+ TQStringList availTransports;
mSendMenu->clear();
availTransports = KMail::TransportManager::transportNames();
- QStringList::Iterator it;
+ TQStringList::Iterator it;
int id = 0;
for(it = availTransports.begin(); it != availTransports.end() ; ++it, id++)
mSendMenu->insertItem((*it).replace("&", "&&"), id);
@@ -2465,7 +2465,7 @@ void KMMainWidget::getTransportMenu()
void KMMainWidget::updateCustomTemplateMenus()
{
if ( !mCustomTemplateActions.isEmpty() ) {
- QPtrList<KAction>::iterator ait = mCustomTemplateActions.begin();
+ TQPtrList<KAction>::iterator ait = mCustomTemplateActions.begin();
for ( ; ait != mCustomTemplateActions.end() ; ++ait ) {
(*ait)->unplugAll();
delete (*ait);
@@ -2485,32 +2485,32 @@ void KMMainWidget::updateCustomTemplateMenus()
new KActionMenu( i18n("Forward With Custom Template"),
"mail_custom_forward",
actionCollection(), "custom_forward" );
- QSignalMapper *mCustomForwardMapper = new QSignalMapper( this );
- connect( mCustomForwardMapper, SIGNAL( mapped( int ) ),
- this, SLOT( slotCustomForwardMsg( int ) ) );
+ TQSignalMapper *mCustomForwardMapper = new TQSignalMapper( this );
+ connect( mCustomForwardMapper, TQT_SIGNAL( mapped( int ) ),
+ this, TQT_SLOT( slotCustomForwardMsg( int ) ) );
mForwardActionMenu->insert( mCustomForwardActionMenu );
mCustomReplyActionMenu =
new KActionMenu( i18n("Reply With Custom Template"), "mail_custom_reply",
actionCollection(), "custom_reply" );
- QSignalMapper *mCustomReplyMapper = new QSignalMapper( this );
- connect( mCustomReplyMapper, SIGNAL( mapped( int ) ),
- this, SLOT( slotCustomReplyToMsg( int ) ) );
+ TQSignalMapper *mCustomReplyMapper = new TQSignalMapper( this );
+ connect( mCustomReplyMapper, TQT_SIGNAL( mapped( int ) ),
+ this, TQT_SLOT( slotCustomReplyToMsg( int ) ) );
mMsgActions->replyMenu()->insert( mCustomReplyActionMenu );
mCustomReplyAllActionMenu =
new KActionMenu( i18n("Reply to All With Custom Template"),
"mail_custom_reply_all",
actionCollection(), "custom_reply_all" );
- QSignalMapper *mCustomReplyAllMapper = new QSignalMapper( this );
- connect( mCustomReplyAllMapper, SIGNAL( mapped( int ) ),
- this, SLOT( slotCustomReplyAllToMsg( int ) ) );
+ TQSignalMapper *mCustomReplyAllMapper = new TQSignalMapper( this );
+ connect( mCustomReplyAllMapper, TQT_SIGNAL( mapped( int ) ),
+ this, TQT_SLOT( slotCustomReplyAllToMsg( int ) ) );
mMsgActions->replyMenu()->insert( mCustomReplyAllActionMenu );
mCustomTemplates.clear();
- QStringList list = GlobalSettingsBase::self()->customTemplates();
- QStringList::iterator it = list.begin();
+ TQStringList list = GlobalSettingsBase::self()->customTemplates();
+ TQStringList::iterator it = list.begin();
int idx = 0;
int replyc = 0;
int replyallc = 0;
@@ -2525,7 +2525,7 @@ void KMMainWidget::updateCustomTemplateMenus()
action = new KAction( (*it).replace( "&", "&&" ),
KShortcut( t.shortcut() ),
mCustomReplyMapper,
- SLOT( map() ),
+ TQT_SLOT( map() ),
actionCollection(),
(*it).utf8() );
mCustomReplyMapper->setMapping( action, idx );
@@ -2537,7 +2537,7 @@ void KMMainWidget::updateCustomTemplateMenus()
action = new KAction( (*it).replace( "&", "&&" ),
KShortcut( t.shortcut() ),
mCustomReplyAllMapper,
- SLOT( map() ),
+ TQT_SLOT( map() ),
actionCollection(),
(*it).utf8() );
mCustomReplyAllMapper->setMapping( action, idx );
@@ -2549,7 +2549,7 @@ void KMMainWidget::updateCustomTemplateMenus()
action = new KAction( (*it).replace( "&", "&&" ),
KShortcut( t.shortcut() ),
mCustomForwardMapper,
- SLOT( map() ),
+ TQT_SLOT( map() ),
actionCollection(),
(*it).utf8() );
mCustomForwardMapper->setMapping( action, idx );
@@ -2561,7 +2561,7 @@ void KMMainWidget::updateCustomTemplateMenus()
action = new KAction( (*it).replace( "&", "&&" ),
KShortcut::null(),
mCustomReplyMapper,
- SLOT( map() ),
+ TQT_SLOT( map() ),
actionCollection(),
(*it).utf8() );
mCustomReplyMapper->setMapping( action, idx );
@@ -2571,7 +2571,7 @@ void KMMainWidget::updateCustomTemplateMenus()
action = new KAction( (*it).replace( "&", "&&" ),
KShortcut::null(),
mCustomReplyAllMapper,
- SLOT( map() ),
+ TQT_SLOT( map() ),
actionCollection(),
(*it).utf8() );
mCustomReplyAllMapper->setMapping( action, idx );
@@ -2581,7 +2581,7 @@ void KMMainWidget::updateCustomTemplateMenus()
action = new KAction( (*it).replace( "&", "&&" ),
KShortcut::null(),
mCustomForwardMapper,
- SLOT( map() ),
+ TQT_SLOT( map() ),
actionCollection(),
(*it).utf8() );
mCustomForwardMapper->setMapping( action, idx );
@@ -2621,53 +2621,53 @@ void KMMainWidget::setupActions()
//----- File Menu
mSaveAsAction = new KAction( i18n("Save &As..."), "filesave",
KStdAccel::shortcut(KStdAccel::Save),
- this, SLOT(slotSaveMsg()), actionCollection(), "file_save_as" );
+ this, TQT_SLOT(slotSaveMsg()), actionCollection(), "file_save_as" );
- mOpenAction = KStdAction::open( this, SLOT( slotOpenMsg() ),
+ mOpenAction = KStdAction::open( this, TQT_SLOT( slotOpenMsg() ),
actionCollection() );
(void) new KAction( i18n("&Compact All Folders"), 0,
- this, SLOT(slotCompactAll()),
+ this, TQT_SLOT(slotCompactAll()),
actionCollection(), "compact_all_folders" );
(void) new KAction( i18n("&Expire All Folders"), 0,
- this, SLOT(slotExpireAll()),
+ this, TQT_SLOT(slotExpireAll()),
actionCollection(), "expire_all_folders" );
(void) new KAction( i18n("&Refresh Local IMAP Cache"), "refresh",
- this, SLOT(slotInvalidateIMAPFolders()),
+ this, TQT_SLOT(slotInvalidateIMAPFolders()),
actionCollection(), "file_invalidate_imap_cache" );
(void) new KAction( i18n("Empty All &Trash Folders"), 0,
- KMKernel::self(), SLOT(slotEmptyTrash()),
+ KMKernel::self(), TQT_SLOT(slotEmptyTrash()),
actionCollection(), "empty_trash" );
(void) new KAction( i18n("Check &Mail"), "mail_get", CTRL+Key_L,
- this, SLOT(slotCheckMail()),
+ this, TQT_SLOT(slotCheckMail()),
actionCollection(), "check_mail" );
mFavoritesCheckMailAction = new KAction( i18n("Check Mail in Favorite Folders"),
"mail_get", CTRL+SHIFT+Key_L, 0, 0,
actionCollection(), "favorite_check_mail" );
if ( mFavoriteFolderView )
- connect( mFavoritesCheckMailAction, SIGNAL(activated()), mFavoriteFolderView, SLOT(checkMail()) );
+ connect( mFavoritesCheckMailAction, TQT_SIGNAL(activated()), mFavoriteFolderView, TQT_SLOT(checkMail()) );
KActionMenu *actActionMenu = new
KActionMenu( i18n("Check Mail &In"), "mail_get", actionCollection(),
"check_mail_in" );
actActionMenu->setDelayed(true); //needed for checking "all accounts"
- connect(actActionMenu,SIGNAL(activated()),this,SLOT(slotCheckMail()));
+ connect(actActionMenu,TQT_SIGNAL(activated()),this,TQT_SLOT(slotCheckMail()));
mActMenu = actActionMenu->popupMenu();
- connect(mActMenu,SIGNAL(activated(int)),this,SLOT(slotCheckOneAccount(int)));
- connect(mActMenu,SIGNAL(aboutToShow()),this,SLOT(getAccountMenu()));
+ connect(mActMenu,TQT_SIGNAL(activated(int)),this,TQT_SLOT(slotCheckOneAccount(int)));
+ connect(mActMenu,TQT_SIGNAL(aboutToShow()),this,TQT_SLOT(getAccountMenu()));
(void) new KAction( i18n("&Send Queued Messages"), "mail_send", 0, this,
- SLOT(slotSendQueued()), actionCollection(), "send_queued");
+ TQT_SLOT(slotSendQueued()), actionCollection(), "send_queued");
(void) new KAction( i18n("Online Status (unknown)"), "online_status", 0, this,
- SLOT(slotOnlineStatus()), actionCollection(), "online_status");
+ TQT_SLOT(slotOnlineStatus()), actionCollection(), "online_status");
KActionMenu *sendActionMenu = new
KActionMenu( i18n("Send Queued Messages Via"), "mail_send_via", actionCollection(),
@@ -2675,56 +2675,56 @@ void KMMainWidget::setupActions()
sendActionMenu->setDelayed(true);
mSendMenu = sendActionMenu->popupMenu();
- connect(mSendMenu,SIGNAL(activated(int)), this, SLOT(slotSendQueuedVia(int)));
- connect(mSendMenu,SIGNAL(aboutToShow()),this,SLOT(getTransportMenu()));
+ connect(mSendMenu,TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotSendQueuedVia(int)));
+ connect(mSendMenu,TQT_SIGNAL(aboutToShow()),this,TQT_SLOT(getTransportMenu()));
KAction *act;
//----- Tools menu
if (parent()->inherits("KMMainWin")) {
act = new KAction( i18n("&Address Book..."), "contents", 0, this,
- SLOT(slotAddrBook()), actionCollection(), "addressbook" );
+ TQT_SLOT(slotAddrBook()), actionCollection(), "addressbook" );
if (KStandardDirs::findExe("kaddressbook").isEmpty()) act->setEnabled(false);
}
act = new KAction( i18n("Certificate Manager..."), "pgp-keys", 0, this,
- SLOT(slotStartCertManager()), actionCollection(), "tools_start_certman");
+ TQT_SLOT(slotStartCertManager()), actionCollection(), "tools_start_certman");
// disable action if no certman binary is around
if (KStandardDirs::findExe("kleopatra").isEmpty()) act->setEnabled(false);
act = new KAction( i18n("GnuPG Log Viewer..."), "pgp-keys", 0, this,
- SLOT(slotStartWatchGnuPG()), actionCollection(), "tools_start_kwatchgnupg");
+ TQT_SLOT(slotStartWatchGnuPG()), actionCollection(), "tools_start_kwatchgnupg");
// disable action if no kwatchgnupg binary is around
if (KStandardDirs::findExe("kwatchgnupg").isEmpty()) act->setEnabled(false);
act = new KAction( i18n("&Import Messages..."), "fileopen", 0, this,
- SLOT(slotImport()), actionCollection(), "import" );
+ TQT_SLOT(slotImport()), actionCollection(), "import" );
if (KStandardDirs::findExe("kmailcvt").isEmpty()) act->setEnabled(false);
#if !defined(NDEBUG)
(void) new KAction( i18n("&Debug Sieve..."),
- "idea", 0, this, SLOT(slotDebugSieve()),
+ "idea", 0, this, TQT_SLOT(slotDebugSieve()),
actionCollection(), "tools_debug_sieve" );
#endif
if ( GlobalSettings::allowOutOfOfficeSettings() ) {
(void) new KAction( i18n("Edit \"Out of Office\" Replies..."),
- "configure", 0, this, SLOT(slotEditVacation()),
+ "configure", 0, this, TQT_SLOT(slotEditVacation()),
actionCollection(), "tools_edit_vacation" );
}
(void) new KAction( i18n("Filter &Log Viewer..."), 0, this,
- SLOT(slotFilterLogViewer()), actionCollection(), "filter_log_viewer" );
+ TQT_SLOT(slotFilterLogViewer()), actionCollection(), "filter_log_viewer" );
(void) new KAction( i18n("&Anti-Spam Wizard..."), 0, this,
- SLOT(slotAntiSpamWizard()), actionCollection(), "antiSpamWizard" );
+ TQT_SLOT(slotAntiSpamWizard()), actionCollection(), "antiSpamWizard" );
(void) new KAction( i18n("&Anti-Virus Wizard..."), 0, this,
- SLOT(slotAntiVirusWizard()), actionCollection(), "antiVirusWizard" );
+ TQT_SLOT(slotAntiVirusWizard()), actionCollection(), "antiVirusWizard" );
//----- Edit Menu
mTrashAction = new KAction( KGuiItem( i18n("&Move to Trash"), "edittrash",
i18n("Move message to trashcan") ),
- Key_Delete, this, SLOT(slotTrashMsg()),
+ Key_Delete, this, TQT_SLOT(slotTrashMsg()),
actionCollection(), "move_to_trash" );
/* The delete action is nowhere in the gui, by default, so we need to make
@@ -2732,105 +2732,105 @@ void KMMainWidget::setupActions()
* XMLGui construction or manual ->plug(). This is only a problem when run
* as a part, though. */
mDeleteAction = new KAction( i18n("&Delete"), "editdelete", SHIFT+Key_Delete, this,
- SLOT(slotDeleteMsg()), actionCollection(), "delete" );
+ TQT_SLOT(slotDeleteMsg()), actionCollection(), "delete" );
mDeleteAction->plugAccel( actionCollection()->kaccel() );
mTrashThreadAction = new KAction( KGuiItem( i18n("M&ove Thread to Trash"), "edittrash",
i18n("Move thread to trashcan") ),
- CTRL+Key_Delete, this, SLOT(slotTrashThread()),
+ CTRL+Key_Delete, this, TQT_SLOT(slotTrashThread()),
actionCollection(), "move_thread_to_trash" );
mDeleteThreadAction = new KAction( i18n("Delete T&hread"), "editdelete", CTRL+SHIFT+Key_Delete, this,
- SLOT(slotDeleteThread()), actionCollection(), "delete_thread" );
+ TQT_SLOT(slotDeleteThread()), actionCollection(), "delete_thread" );
(void) new KAction( i18n("&Find Messages..."), "mail_find", Key_S, this,
- SLOT(slotRequestFullSearchFromQuickSearch()), actionCollection(), "search_messages" );
+ TQT_SLOT(slotRequestFullSearchFromQuickSearch()), actionCollection(), "search_messages" );
mFindInMessageAction = new KAction( i18n("&Find in Message..."), "find", KStdAccel::shortcut(KStdAccel::Find), this,
- SLOT(slotFind()), actionCollection(), "find_in_messages" );
+ TQT_SLOT(slotFind()), actionCollection(), "find_in_messages" );
(void) new KAction( i18n("Select &All Messages"), KStdAccel::selectAll(), this,
- SLOT(slotMarkAll()), actionCollection(), "mark_all_messages" );
+ TQT_SLOT(slotMarkAll()), actionCollection(), "mark_all_messages" );
//----- Folder Menu
mNewFolderAction = new KAction( i18n("&New Folder..."), "folder_new", 0, mFolderTree,
- SLOT(addChildFolder()), actionCollection(), "new_folder" );
+ TQT_SLOT(addChildFolder()), actionCollection(), "new_folder" );
mModifyFolderAction = new KAction( i18n("&Properties"), "configure", 0, this,
- SLOT(slotModifyFolder()), actionCollection(), "modify" );
+ TQT_SLOT(slotModifyFolder()), actionCollection(), "modify" );
mFolderMailingListPropertiesAction = new KAction( i18n("&Mailing List Management..."),
- /*"folder_mailinglist_properties",*/ 0, this, SLOT( slotFolderMailingListProperties() ),
+ /*"folder_mailinglist_properties",*/ 0, this, TQT_SLOT( slotFolderMailingListProperties() ),
actionCollection(), "folder_mailinglist_properties" );
mFolderShortCutCommandAction = new KAction( i18n("&Assign Shortcut..."), "configure_shortcuts",
- 0, this, SLOT( slotFolderShortcutCommand() ), actionCollection(),
+ 0, this, TQT_SLOT( slotFolderShortcutCommand() ), actionCollection(),
"folder_shortcut_command" );
mMarkAllAsReadAction = new KAction( i18n("Mark All Messages as &Read"), "goto", 0, this,
- SLOT(slotMarkAllAsRead()), actionCollection(), "mark_all_as_read" );
+ TQT_SLOT(slotMarkAllAsRead()), actionCollection(), "mark_all_as_read" );
- mExpireFolderAction = new KAction(i18n("&Expiration Settings"), 0, this, SLOT(slotExpireFolder()),
+ mExpireFolderAction = new KAction(i18n("&Expiration Settings"), 0, this, TQT_SLOT(slotExpireFolder()),
actionCollection(), "expire");
mCompactFolderAction = new KAction( i18n("&Compact Folder"), 0, this,
- SLOT(slotCompactFolder()), actionCollection(), "compact" );
+ TQT_SLOT(slotCompactFolder()), actionCollection(), "compact" );
mRefreshFolderAction = new KAction( i18n("Check Mail &in This Folder"), "reload",
KStdAccel::shortcut( KStdAccel::Reload ), this,
- SLOT(slotRefreshFolder()),
+ TQT_SLOT(slotRefreshFolder()),
actionCollection(), "refresh_folder" );
mTroubleshootFolderAction = 0; // set in initializeIMAPActions
mEmptyFolderAction = new KAction( "foo" /*set in updateFolderMenu*/, "edittrash", 0, this,
- SLOT(slotEmptyFolder()), actionCollection(), "empty" );
+ TQT_SLOT(slotEmptyFolder()), actionCollection(), "empty" );
mRemoveFolderAction = new KAction( "foo" /*set in updateFolderMenu*/, "editdelete", 0, this,
- SLOT(slotRemoveFolder()), actionCollection(), "delete_folder" );
+ TQT_SLOT(slotRemoveFolder()), actionCollection(), "delete_folder" );
mPreferHtmlAction = new KToggleAction( i18n("Prefer &HTML to Plain Text"), 0, this,
- SLOT(slotOverrideHtml()), actionCollection(), "prefer_html" );
+ TQT_SLOT(slotOverrideHtml()), actionCollection(), "prefer_html" );
mPreferHtmlLoadExtAction = new KToggleAction( i18n("Load E&xternal References"), 0, this,
- SLOT(slotOverrideHtmlLoadExt()), actionCollection(), "prefer_html_external_refs" );
+ TQT_SLOT(slotOverrideHtmlLoadExt()), actionCollection(), "prefer_html_external_refs" );
mThreadMessagesAction = new KToggleAction( i18n("&Thread Messages"), 0, this,
- SLOT(slotOverrideThread()), actionCollection(), "thread_messages" );
+ TQT_SLOT(slotOverrideThread()), actionCollection(), "thread_messages" );
mThreadBySubjectAction = new KToggleAction( i18n("Thread Messages also by &Subject"), 0, this,
- SLOT(slotToggleSubjectThreading()), actionCollection(), "thread_messages_by_subject" );
+ TQT_SLOT(slotToggleSubjectThreading()), actionCollection(), "thread_messages_by_subject" );
new KAction( i18n("Copy Folder"), "editcopy", SHIFT+CTRL+Key_C, folderTree(),
- SLOT(copyFolder()), actionCollection(), "copy_folder" );
+ TQT_SLOT(copyFolder()), actionCollection(), "copy_folder" );
new KAction( i18n("Cut Folder"), "editcut", SHIFT+CTRL+Key_X, folderTree(),
- SLOT(cutFolder()), actionCollection(), "cut_folder" );
+ TQT_SLOT(cutFolder()), actionCollection(), "cut_folder" );
new KAction( i18n("Paste Folder"), "editpaste", SHIFT+CTRL+Key_V, folderTree(),
- SLOT(pasteFolder()), actionCollection(), "paste_folder" );
+ TQT_SLOT(pasteFolder()), actionCollection(), "paste_folder" );
new KAction( i18n("Copy Messages"), "editcopy", ALT+CTRL+Key_C, headers(),
- SLOT(copyMessages()), actionCollection(), "copy_messages" );
+ TQT_SLOT(copyMessages()), actionCollection(), "copy_messages" );
new KAction( i18n("Cut Messages"), "editcut", ALT+CTRL+Key_X, headers(),
- SLOT(cutMessages()), actionCollection(), "cut_messages" );
+ TQT_SLOT(cutMessages()), actionCollection(), "cut_messages" );
new KAction( i18n("Paste Messages"), "editpaste", ALT+CTRL+Key_V, headers(),
- SLOT(pasteMessages()), actionCollection(), "paste_messages" );
+ TQT_SLOT(pasteMessages()), actionCollection(), "paste_messages" );
//----- Message Menu
(void) new KAction( i18n("&New Message..."), "mail_new", KStdAccel::shortcut(KStdAccel::New), this,
- SLOT(slotCompose()), actionCollection(), "new_message" );
+ TQT_SLOT(slotCompose()), actionCollection(), "new_message" );
mTemplateMenu =
new KActionMenu( i18n("New Message From &Template"), "filenew",
actionCollection(), "new_from_template" );
mTemplateMenu->setDelayed( true );
- connect( mTemplateMenu->popupMenu(), SIGNAL( aboutToShow() ), this,
- SLOT( slotShowNewFromTemplate() ) );
- connect( mTemplateMenu->popupMenu(), SIGNAL( activated(int) ), this,
- SLOT( slotNewFromTemplate(int) ) );
+ connect( mTemplateMenu->popupMenu(), TQT_SIGNAL( aboutToShow() ), this,
+ TQT_SLOT( slotShowNewFromTemplate() ) );
+ connect( mTemplateMenu->popupMenu(), TQT_SIGNAL( activated(int) ), this,
+ TQT_SLOT( slotNewFromTemplate(int) ) );
KAction* newToML = new KAction( i18n("New Message t&o Mailing-List..."), "mail_post_to",
CTRL+SHIFT+Key_N, this,
- SLOT(slotPostToML()), actionCollection(), "post_message" );
+ TQT_SLOT(slotPostToML()), actionCollection(), "post_message" );
newToML->plugAccel( actionCollection()->kaccel() );
mForwardActionMenu = new KActionMenu( i18n("Message->","&Forward"),
@@ -2839,25 +2839,25 @@ void KMMainWidget::setupActions()
mForwardInlineAction = new KAction( i18n("&Inline..."),
"mail_forward", 0, this,
- SLOT(slotForwardInlineMsg()),
+ TQT_SLOT(slotForwardInlineMsg()),
actionCollection(),
"message_forward_inline" );
mForwardAttachedAction = new KAction( i18n("Message->Forward->","As &Attachment..."),
"mail_forward", 0, this,
- SLOT(slotForwardAttachedMsg()),
+ TQT_SLOT(slotForwardAttachedMsg()),
actionCollection(),
"message_forward_as_attachment" );
mForwardDigestAction = new KAction( i18n("Message->Forward->","As Di&gest..."),
"mail_forward", 0, this,
- SLOT(slotForwardDigestMsg()),
+ TQT_SLOT(slotForwardDigestMsg()),
actionCollection(),
"message_forward_as_digest" );
mRedirectAction = new KAction( i18n("Message->Forward->","&Redirect..."),
"mail_forward", Key_E, this,
- SLOT(slotRedirectMsg()),
+ TQT_SLOT(slotRedirectMsg()),
actionCollection(),
"message_forward_redirect" );
@@ -2867,53 +2867,53 @@ void KMMainWidget::setupActions()
mForwardActionMenu->insert( mForwardAttachedAction );
mForwardInlineAction->setShortcut( Key_F );
mForwardAttachedAction->setShortcut( SHIFT+Key_F );
- connect( mForwardActionMenu, SIGNAL(activated()), this,
- SLOT(slotForwardInlineMsg()) );
+ connect( mForwardActionMenu, TQT_SIGNAL(activated()), this,
+ TQT_SLOT(slotForwardInlineMsg()) );
} else {
mForwardActionMenu->insert( mForwardAttachedAction );
mForwardActionMenu->insert( mForwardInlineAction );
mForwardInlineAction->setShortcut( SHIFT+Key_F );
mForwardAttachedAction->setShortcut( Key_F );
- connect( mForwardActionMenu, SIGNAL(activated()), this,
- SLOT(slotForwardAttachedMsg()) );
+ connect( mForwardActionMenu, TQT_SIGNAL(activated()), this,
+ TQT_SLOT(slotForwardAttachedMsg()) );
}
mForwardActionMenu->insert( mForwardDigestAction );
mForwardActionMenu->insert( mRedirectAction );
mSendAgainAction = new KAction( i18n("Send A&gain..."), 0, this,
- SLOT(slotResendMsg()), actionCollection(), "send_again" );
+ TQT_SLOT(slotResendMsg()), actionCollection(), "send_again" );
//----- Create filter actions
mFilterMenu = new KActionMenu( i18n("&Create Filter"), "filter", actionCollection(), "create_filter" );
- connect( mFilterMenu, SIGNAL(activated()), this,
- SLOT(slotFilter()) );
+ connect( mFilterMenu, TQT_SIGNAL(activated()), this,
+ TQT_SLOT(slotFilter()) );
mSubjectFilterAction = new KAction( i18n("Filter on &Subject..."), 0, this,
- SLOT(slotSubjectFilter()),
+ TQT_SLOT(slotSubjectFilter()),
actionCollection(), "subject_filter");
mFilterMenu->insert( mSubjectFilterAction );
mFromFilterAction = new KAction( i18n("Filter on &From..."), 0, this,
- SLOT(slotFromFilter()),
+ TQT_SLOT(slotFromFilter()),
actionCollection(), "from_filter");
mFilterMenu->insert( mFromFilterAction );
mToFilterAction = new KAction( i18n("Filter on &To..."), 0, this,
- SLOT(slotToFilter()),
+ TQT_SLOT(slotToFilter()),
actionCollection(), "to_filter");
mFilterMenu->insert( mToFilterAction );
mListFilterAction = new KAction( i18n("Filter on Mailing-&List..."), 0, this,
- SLOT(slotMailingListFilter()), actionCollection(),
+ TQT_SLOT(slotMailingListFilter()), actionCollection(),
"mlist_filter");
mFilterMenu->insert( mListFilterAction );
- mPrintAction = KStdAction::print (this, SLOT(slotPrintMsg()), actionCollection());
+ mPrintAction = KStdAction::print (this, TQT_SLOT(slotPrintMsg()), actionCollection());
mUseAction = new KAction( i18n("New Message From &Template"), "filenew",
- Key_N, this, SLOT( slotUseTemplate() ),
+ Key_N, this, TQT_SLOT( slotUseTemplate() ),
actionCollection(), "use_template" );
mUseAction->plugAccel( actionCollection()->kaccel() );
@@ -2923,19 +2923,19 @@ void KMMainWidget::setupActions()
mMarkThreadAsReadAction = new KAction(KGuiItem(i18n("Mark Thread as &Read"), "kmmsgread",
i18n("Mark all messages in the selected thread as read")),
- 0, this, SLOT(slotSetThreadStatusRead()),
+ 0, this, TQT_SLOT(slotSetThreadStatusRead()),
actionCollection(), "thread_read");
mThreadStatusMenu->insert( mMarkThreadAsReadAction );
mMarkThreadAsNewAction = new KAction(KGuiItem(i18n("Mark Thread as &New"), "kmmsgnew",
i18n("Mark all messages in the selected thread as new")),
- 0, this, SLOT(slotSetThreadStatusNew()),
+ 0, this, TQT_SLOT(slotSetThreadStatusNew()),
actionCollection(), "thread_new");
mThreadStatusMenu->insert( mMarkThreadAsNewAction );
mMarkThreadAsUnreadAction = new KAction(KGuiItem(i18n("Mark Thread as &Unread"), "kmmsgunseen",
i18n("Mark all messages in the selected thread as unread")),
- 0, this, SLOT(slotSetThreadStatusUnread()),
+ 0, this, TQT_SLOT(slotSetThreadStatusUnread()),
actionCollection(), "thread_unread");
mThreadStatusMenu->insert( mMarkThreadAsUnreadAction );
@@ -2943,24 +2943,24 @@ void KMMainWidget::setupActions()
//----- "Mark Thread" toggle actions
mToggleThreadFlagAction = new KToggleAction(i18n("Mark Thread as &Important"), "mail_flag",
- 0, this, SLOT(slotSetThreadStatusFlag()),
+ 0, this, TQT_SLOT(slotSetThreadStatusFlag()),
actionCollection(), "thread_flag");
mToggleThreadFlagAction->setCheckedState( i18n("Remove &Important Thread Mark") );
mThreadStatusMenu->insert( mToggleThreadFlagAction );
mToggleThreadTodoAction = new KToggleAction(i18n("Mark Thread as &Action Item"), "mail_todo",
- 0, this, SLOT(slotSetThreadStatusTodo()),
+ 0, this, TQT_SLOT(slotSetThreadStatusTodo()),
actionCollection(), "thread_todo");
mToggleThreadTodoAction->setCheckedState( i18n("Remove &Action Item Thread Mark") );
mThreadStatusMenu->insert( mToggleThreadTodoAction );
//------- "Watch and ignore thread" actions
mWatchThreadAction = new KToggleAction(i18n("&Watch Thread"), "kmmsgwatched",
- 0, this, SLOT(slotSetThreadStatusWatched()),
+ 0, this, TQT_SLOT(slotSetThreadStatusWatched()),
actionCollection(), "thread_watched");
mIgnoreThreadAction = new KToggleAction(i18n("&Ignore Thread"), "mail_ignore",
- 0, this, SLOT(slotSetThreadStatusIgnored()),
+ 0, this, TQT_SLOT(slotSetThreadStatusIgnored()),
actionCollection(), "thread_ignored");
mThreadStatusMenu->insert( new KActionSeparator( this ) );
@@ -2968,7 +2968,7 @@ void KMMainWidget::setupActions()
mThreadStatusMenu->insert( mIgnoreThreadAction );
mSaveAttachmentsAction = new KAction( i18n("Save A&ttachments..."), "attach",
- 0, this, SLOT(slotSaveAttachments()),
+ 0, this, TQT_SLOT(slotSaveAttachments()),
actionCollection(), "file_save_attachments" );
mMoveActionMenu = new KActionMenu( i18n("&Move To" ),
@@ -2979,7 +2979,7 @@ void KMMainWidget::setupActions()
mApplyAllFiltersAction = new KAction( i18n("Appl&y All Filters"), "filter",
CTRL+Key_J, this,
- SLOT(slotApplyFilters()),
+ TQT_SLOT(slotApplyFilters()),
actionCollection(), "apply_filters" );
mApplyFilterActionsMenu = new KActionMenu( i18n("A&pply Filter" ),
@@ -2994,158 +2994,158 @@ void KMMainWidget::setupActions()
unreadMenu->setToolTip( i18n("Choose how to display the count of unread messages") );
mUnreadColumnToggle = new KRadioAction( i18n("View->Unread Count", "View in &Separate Column"), 0, this,
- SLOT(slotToggleUnread()),
+ TQT_SLOT(slotToggleUnread()),
actionCollection(), "view_unread_column" );
mUnreadColumnToggle->setExclusiveGroup( "view_unread_group" );
unreadMenu->insert( mUnreadColumnToggle );
mUnreadTextToggle = new KRadioAction( i18n("View->Unread Count", "View After &Folder Name"), 0, this,
- SLOT(slotToggleUnread()),
+ TQT_SLOT(slotToggleUnread()),
actionCollection(), "view_unread_text" );
mUnreadTextToggle->setExclusiveGroup( "view_unread_group" );
unreadMenu->insert( mUnreadTextToggle );
// toggle for total column
mTotalColumnToggle = new KToggleAction( i18n("View->", "&Total Column"), 0, this,
- SLOT(slotToggleTotalColumn()),
+ TQT_SLOT(slotToggleTotalColumn()),
actionCollection(), "view_columns_total" );
mTotalColumnToggle->setToolTip( i18n("Toggle display of column showing the "
"total number of messages in folders.") );
mSizeColumnToggle = new KToggleAction( i18n("View->", "&Size Column"), 0, this,
- SLOT(slotToggleSizeColumn()),
+ TQT_SLOT(slotToggleSizeColumn()),
actionCollection(), "view_columns_size" );
mSizeColumnToggle->setToolTip( i18n("Toggle display of column showing the "
"total size of messages in folders.") );
- (void)new KAction( KGuiItem( i18n("View->","&Expand Thread"), QString::null,
+ (void)new KAction( KGuiItem( i18n("View->","&Expand Thread"), TQString::null,
i18n("Expand the current thread") ),
Key_Period, this,
- SLOT(slotExpandThread()),
+ TQT_SLOT(slotExpandThread()),
actionCollection(), "expand_thread" );
- (void)new KAction( KGuiItem( i18n("View->","&Collapse Thread"), QString::null,
+ (void)new KAction( KGuiItem( i18n("View->","&Collapse Thread"), TQString::null,
i18n("Collapse the current thread") ),
Key_Comma, this,
- SLOT(slotCollapseThread()),
+ TQT_SLOT(slotCollapseThread()),
actionCollection(), "collapse_thread" );
- (void)new KAction( KGuiItem( i18n("View->","Ex&pand All Threads"), QString::null,
+ (void)new KAction( KGuiItem( i18n("View->","Ex&pand All Threads"), TQString::null,
i18n("Expand all threads in the current folder") ),
CTRL+Key_Period, this,
- SLOT(slotExpandAllThreads()),
+ TQT_SLOT(slotExpandAllThreads()),
actionCollection(), "expand_all_threads" );
- (void)new KAction( KGuiItem( i18n("View->","C&ollapse All Threads"), QString::null,
+ (void)new KAction( KGuiItem( i18n("View->","C&ollapse All Threads"), TQString::null,
i18n("Collapse all threads in the current folder") ),
CTRL+Key_Comma, this,
- SLOT(slotCollapseAllThreads()),
+ TQT_SLOT(slotCollapseAllThreads()),
actionCollection(), "collapse_all_threads" );
mViewSourceAction = new KAction( i18n("&View Source"), Key_V, this,
- SLOT(slotShowMsgSrc()), actionCollection(),
+ TQT_SLOT(slotShowMsgSrc()), actionCollection(),
"view_source" );
KAction* dukeOfMonmoth = new KAction( i18n("&Display Message"), Key_Return, this,
- SLOT( slotDisplayCurrentMessage() ), actionCollection(),
+ TQT_SLOT( slotDisplayCurrentMessage() ), actionCollection(),
"display_message" );
dukeOfMonmoth->plugAccel( actionCollection()->kaccel() );
//----- Go Menu
- new KAction( KGuiItem( i18n("&Next Message"), QString::null,
+ new KAction( KGuiItem( i18n("&Next Message"), TQString::null,
i18n("Go to the next message") ),
- "N;Right", this, SLOT(slotNextMessage()),
+ "N;Right", this, TQT_SLOT(slotNextMessage()),
actionCollection(), "go_next_message" );
new KAction( KGuiItem( i18n("Next &Unread Message"),
- QApplication::reverseLayout() ? "previous" : "next",
+ TQApplication::reverseLayout() ? "previous" : "next",
i18n("Go to the next unread message") ),
- Key_Plus, this, SLOT(slotNextUnreadMessage()),
+ Key_Plus, this, TQT_SLOT(slotNextUnreadMessage()),
actionCollection(), "go_next_unread_message" );
/* ### needs better support from folders:
- new KAction( KGuiItem( i18n("Next &Important Message"), QString::null,
+ new KAction( KGuiItem( i18n("Next &Important Message"), TQString::null,
i18n("Go to the next important message") ),
- 0, this, SLOT(slotNextImportantMessage()),
+ 0, this, TQT_SLOT(slotNextImportantMessage()),
actionCollection(), "go_next_important_message" );
*/
- new KAction( KGuiItem( i18n("&Previous Message"), QString::null,
+ new KAction( KGuiItem( i18n("&Previous Message"), TQString::null,
i18n("Go to the previous message") ),
- "P;Left", this, SLOT(slotPrevMessage()),
+ "P;Left", this, TQT_SLOT(slotPrevMessage()),
actionCollection(), "go_prev_message" );
new KAction( KGuiItem( i18n("Previous Unread &Message"),
- QApplication::reverseLayout() ? "next" : "previous",
+ TQApplication::reverseLayout() ? "next" : "previous",
i18n("Go to the previous unread message") ),
- Key_Minus, this, SLOT(slotPrevUnreadMessage()),
+ Key_Minus, this, TQT_SLOT(slotPrevUnreadMessage()),
actionCollection(), "go_prev_unread_message" );
/* needs better support from folders:
- new KAction( KGuiItem( i18n("Previous I&mportant Message"), QString::null,
+ new KAction( KGuiItem( i18n("Previous I&mportant Message"), TQString::null,
i18n("Go to the previous important message") ),
- 0, this, SLOT(slotPrevImportantMessage()),
+ 0, this, TQT_SLOT(slotPrevImportantMessage()),
actionCollection(), "go_prev_important_message" );
*/
KAction *action =
- new KAction( KGuiItem( i18n("Next Unread &Folder"), QString::null,
+ new KAction( KGuiItem( i18n("Next Unread &Folder"), TQString::null,
i18n("Go to the next folder with unread messages") ),
- ALT+Key_Plus, this, SLOT(slotNextUnreadFolder()),
+ ALT+Key_Plus, this, TQT_SLOT(slotNextUnreadFolder()),
actionCollection(), "go_next_unread_folder" );
KShortcut shortcut = action->shortcut();
shortcut.append( KKey( CTRL+Key_Plus ) );
action->setShortcut( shortcut );
action =
- new KAction( KGuiItem( i18n("Previous Unread F&older"), QString::null,
+ new KAction( KGuiItem( i18n("Previous Unread F&older"), TQString::null,
i18n("Go to the previous folder with unread messages") ),
- ALT+Key_Minus, this, SLOT(slotPrevUnreadFolder()),
+ ALT+Key_Minus, this, TQT_SLOT(slotPrevUnreadFolder()),
actionCollection(), "go_prev_unread_folder" );
shortcut = action->shortcut();
shortcut.append( KKey( CTRL+Key_Minus ) );
action->setShortcut( shortcut );
- new KAction( KGuiItem( i18n("Go->","Next Unread &Text"), QString::null,
+ new KAction( KGuiItem( i18n("Go->","Next Unread &Text"), TQString::null,
i18n("Go to the next unread text"),
i18n("Scroll down current message. "
"If at end of current message, "
"go to next unread message.") ),
- Key_Space, this, SLOT(slotReadOn()),
+ Key_Space, this, TQT_SLOT(slotReadOn()),
actionCollection(), "go_next_unread_text" );
//----- Settings Menu
(void) new KAction( i18n("Configure &Filters..."), 0, this,
- SLOT(slotFilter()), actionCollection(), "filter" );
+ TQT_SLOT(slotFilter()), actionCollection(), "filter" );
(void) new KAction( i18n("Configure &POP Filters..."), 0, this,
- SLOT(slotPopFilter()), actionCollection(), "popFilter" );
+ TQT_SLOT(slotPopFilter()), actionCollection(), "popFilter" );
(void) new KAction( i18n("Manage &Sieve Scripts..."), 0, this,
- SLOT(slotManageSieveScripts()), actionCollection(), "sieveFilters" );
+ TQT_SLOT(slotManageSieveScripts()), actionCollection(), "sieveFilters" );
(void) new KAction( KGuiItem( i18n("KMail &Introduction"), 0,
i18n("Display KMail's Welcome Page") ),
- 0, this, SLOT(slotIntro()),
+ 0, this, TQT_SLOT(slotIntro()),
actionCollection(), "help_kmail_welcomepage" );
// ----- Standard Actions
-// KStdAction::configureNotifications(this, SLOT(slotEditNotifications()), actionCollection());
+// KStdAction::configureNotifications(this, TQT_SLOT(slotEditNotifications()), actionCollection());
(void) new KAction( i18n("Configure &Notifications..."),
"knotify", 0, this,
- SLOT(slotEditNotifications()), actionCollection(),
+ TQT_SLOT(slotEditNotifications()), actionCollection(),
"kmail_configure_notifications" );
-// KStdAction::preferences(this, SLOT(slotSettings()), actionCollection());
+// KStdAction::preferences(this, TQT_SLOT(slotSettings()), actionCollection());
(void) new KAction( i18n("&Configure KMail..."),
"configure", 0, kmkernel,
- SLOT(slotShowConfigurationDialog()), actionCollection(),
+ TQT_SLOT(slotShowConfigurationDialog()), actionCollection(),
"kmail_configure_kmail" );
- KStdAction::undo(this, SLOT(slotUndo()), actionCollection(), "kmail_undo");
+ KStdAction::undo(this, TQT_SLOT(slotUndo()), actionCollection(), "kmail_undo");
- KStdAction::tipOfDay( this, SLOT( slotShowTip() ), actionCollection() );
+ KStdAction::tipOfDay( this, TQT_SLOT( slotShowTip() ), actionCollection() );
- menutimer = new QTimer( this, "menutimer" );
- connect( menutimer, SIGNAL( timeout() ), SLOT( updateMessageActions() ) );
+ menutimer = new TQTimer( this, "menutimer" );
+ connect( menutimer, TQT_SIGNAL( timeout() ), TQT_SLOT( updateMessageActions() ) );
connect( kmkernel->undoStack(),
- SIGNAL( undoStackChanged() ), this, SLOT( slotUpdateUndo() ));
+ TQT_SIGNAL( undoStackChanged() ), this, TQT_SLOT( slotUpdateUndo() ));
initializeIMAPActions( false ); // don't set state, config not read yet
updateMessageActions();
@@ -3155,7 +3155,7 @@ void KMMainWidget::setupActions()
void KMMainWidget::setupForwardingActionsList()
{
- QPtrList<KAction> mForwardActionList;
+ TQPtrList<KAction> mForwardActionList;
if ( GlobalSettings::self()->forwardingInlineByDefault() ) {
mGUIClient->unplugActionList( "forward_action_list" );
mForwardActionList.append( mForwardInlineAction );
@@ -3284,10 +3284,10 @@ void KMMainWidget::startUpdateMessageActionsTimer()
void KMMainWidget::updateMessageActions()
{
int count = 0;
- QPtrList<QListViewItem> selectedItems;
+ TQPtrList<TQListViewItem> selectedItems;
if ( mFolder ) {
- for (QListViewItem *item = mHeaders->firstChild(); item; item = item->itemBelow())
+ for (TQListViewItem *item = mHeaders->firstChild(); item; item = item->itemBelow())
if (item->isSelected() )
selectedItems.append(item);
if ( selectedItems.isEmpty() && mFolder->count() ) // there will always be one in mMsgView
@@ -3306,9 +3306,9 @@ void KMMainWidget::updateMessageActions()
bool allSelectedInCommonThread = false;
if ( mHeaders->isThreaded() && count > 1 ) {
allSelectedInCommonThread = true;
- for ( QPtrListIterator<QListViewItem> it( selectedItems ) ;
+ for ( TQPtrListIterator<TQListViewItem> it( selectedItems ) ;
it.current() ; ++ it ) {
- QListViewItem * item = *it;
+ TQListViewItem * item = *it;
if ( item->parent()==0 && item->childCount()==0 ) {
allSelectedInCommonThread = false;
break;
@@ -3319,7 +3319,7 @@ void KMMainWidget::updateMessageActions()
allSelectedInCommonThread = true;
}
- QListViewItem *curItemParent = mHeaders->currentItem();
+ TQListViewItem *curItemParent = mHeaders->currentItem();
bool parent_thread = 0;
if ( curItemParent && curItemParent->firstChild() != 0 ) parent_thread = 1;
@@ -3454,7 +3454,7 @@ void KMMainWidget::updateFolderMenu()
#ifdef MALLOC_DEBUG
-static QString fmt(long n) {
+static TQString fmt(long n) {
char buf[32];
if(n > 1024*1024*1024)
@@ -3465,7 +3465,7 @@ static QString fmt(long n) {
sprintf(buf, "%0.2f KB", ((double)n)/1024.0);
else
sprintf(buf, "%ld Byte", n);
- return QString(buf);
+ return TQString(buf);
}
#endif
@@ -3474,7 +3474,7 @@ void KMMainWidget::slotMemInfo() {
struct mallinfo mi;
mi = mallinfo();
- QString s = QString("\nMALLOC - Info\n\n"
+ TQString s = TQString("\nMALLOC - Info\n\n"
"Number of mmapped regions : %1\n"
"Memory allocated in use : %2\n"
"Memory allocated, not used: %3\n"
@@ -3512,8 +3512,8 @@ void KMMainWidget::slotShowStartupFolder()
mFolderTree->cleanupConfigFile();
}
- connect( kmkernel->filterMgr(), SIGNAL( filterListUpdated() ),
- this, SLOT( initializeFilterActions() ));
+ connect( kmkernel->filterMgr(), TQT_SIGNAL( filterListUpdated() ),
+ this, TQT_SLOT( initializeFilterActions() ));
// plug shortcut filter actions now
initializeFilterActions();
@@ -3521,7 +3521,7 @@ void KMMainWidget::slotShowStartupFolder()
// plug folder shortcut actions
initializeFolderShortcutActions();
- QString newFeaturesMD5 = KMReaderWin::newFeaturesMD5();
+ TQString newFeaturesMD5 = KMReaderWin::newFeaturesMD5();
if ( kmkernel->firstStart() ||
GlobalSettings::self()->previousNewFeaturesMD5() != newFeaturesMD5 ) {
GlobalSettings::self()->setPreviousNewFeaturesMD5( newFeaturesMD5 );
@@ -3544,16 +3544,16 @@ void KMMainWidget::slotShowStartupFolder()
void KMMainWidget::slotShowTip()
{
- KTipDialog::showTip( this, QString::null, true );
+ KTipDialog::showTip( this, TQString::null, true );
}
//-----------------------------------------------------------------------------
-void KMMainWidget::slotChangeCaption(QListViewItem * i)
+void KMMainWidget::slotChangeCaption(TQListViewItem * i)
{
if ( !i ) return;
// set the caption to the current full path
- QStringList names;
- for ( QListViewItem * item = i ; item ; item = item->parent() )
+ TQStringList names;
+ for ( TQListViewItem * item = i ; item ; item = item->parent() )
names.prepend( item->text(0) );
emit captionChangeRequest( names.join( "/" ) );
}
@@ -3565,29 +3565,29 @@ void KMMainWidget::removeDuplicates()
return;
KMFolder *oFolder = mFolder;
mHeaders->setFolder(0);
- QMap< QString, QValueList<int> > idMD5s;
- QValueList<int> redundantIds;
- QValueList<int>::Iterator kt;
+ TQMap< TQString, TQValueList<int> > idMD5s;
+ TQValueList<int> redundantIds;
+ TQValueList<int>::Iterator kt;
mFolder->open("removedups");
for (int i = mFolder->count() - 1; i >= 0; --i) {
- QString id = (*mFolder)[i]->msgIdMD5();
+ TQString id = (*mFolder)[i]->msgIdMD5();
if ( !id.isEmpty() ) {
- QString subjMD5 = (*mFolder)[i]->strippedSubjectMD5();
+ TQString subjMD5 = (*mFolder)[i]->strippedSubjectMD5();
int other = -1;
if ( idMD5s.contains(id) )
other = idMD5s[id].first();
else
idMD5s[id].append( i );
if ( other != -1 ) {
- QString otherSubjMD5 = (*mFolder)[other]->strippedSubjectMD5();
+ TQString otherSubjMD5 = (*mFolder)[other]->strippedSubjectMD5();
if (otherSubjMD5 == subjMD5)
idMD5s[id].append( i );
}
}
}
- QMap< QString, QValueList<int> >::Iterator it;
+ TQMap< TQString, TQValueList<int> >::Iterator it;
for ( it = idMD5s.begin(); it != idMD5s.end() ; ++it ) {
- QValueList<int>::Iterator jt;
+ TQValueList<int>::Iterator jt;
bool finished = false;
for ( jt = (*it).begin(); jt != (*it).end() && !finished; ++jt )
if (!((*mFolder)[*jt]->isUnread())) {
@@ -3609,7 +3609,7 @@ void KMMainWidget::removeDuplicates()
mFolder->close("removedups");
mHeaders->setFolder(oFolder);
- QString msg;
+ TQString msg;
if ( numDuplicates )
msg = i18n("Removed %n duplicate message.",
"Removed %n duplicate messages.", numDuplicates );
@@ -3654,8 +3654,8 @@ void KMMainWidget::initializeFolderShortcutActions()
bool old = actionCollection()->isAutoConnectShortcuts();
actionCollection()->setAutoConnectShortcuts( true );
- QValueList< QGuardedPtr< KMFolder > > folders = kmkernel->allFolders();
- QValueList< QGuardedPtr< KMFolder > >::Iterator it = folders.begin();
+ TQValueList< TQGuardedPtr< KMFolder > > folders = kmkernel->allFolders();
+ TQValueList< TQGuardedPtr< KMFolder > >::Iterator it = folders.begin();
while ( it != folders.end() ) {
KMFolder *folder = (*it);
++it;
@@ -3668,28 +3668,28 @@ void KMMainWidget::initializeFolderShortcutActions()
//-----------------------------------------------------------------------------
void KMMainWidget::initializeFilterActions()
{
- QString filterName, normalizedName;
+ TQString filterName, normalizedName;
KMMetaFilterActionCommand *filterCommand;
KAction *filterAction = 0;
clearFilterActions();
mApplyAllFiltersAction->plug(mApplyFilterActionsMenu->popupMenu());
bool addedSeparator = false;
- QValueListConstIterator<KMFilter*> it = kmkernel->filterMgr()->filters().constBegin();
+ TQValueListConstIterator<KMFilter*> it = kmkernel->filterMgr()->filters().constBegin();
for ( ;it != kmkernel->filterMgr()->filters().constEnd(); ++it ) {
if (!(*it)->isEmpty() && (*it)->configureShortcut()) {
- filterName = QString("Filter %1").arg((*it)->name());
+ filterName = TQString("Filter %1").arg((*it)->name());
normalizedName = filterName.replace(" ", "_");
if (action(normalizedName.utf8()))
continue;
filterCommand = new KMMetaFilterActionCommand(*it, mHeaders, this);
mFilterCommands.append(filterCommand);
- QString as = i18n("Filter %1").arg((*it)->name());
- QString icon = (*it)->icon();
+ TQString as = i18n("Filter %1").arg((*it)->name());
+ TQString icon = (*it)->icon();
if ( icon.isEmpty() )
icon = "gear";
filterAction = new KAction(as, icon, (*it)->shortcut(), filterCommand,
- SLOT(start()), actionCollection(),
+ TQT_SLOT(start()), actionCollection(),
normalizedName.local8Bit());
if(!addedSeparator) {
mApplyFilterActionsMenu->popupMenu()->insertSeparator();
@@ -3735,7 +3735,7 @@ void KMMainWidget::initializeIMAPActions( bool setState /* false the first time,
if ( !mTroubleshootFolderAction ) {
mTroubleshootFolderAction = new KAction( i18n("&Troubleshoot IMAP Cache..."), "wizard", 0,
- this, SLOT(slotTroubleshootFolder()), actionCollection(), "troubleshoot_folder" );
+ this, TQT_SLOT(slotTroubleshootFolder()), actionCollection(), "troubleshoot_folder" );
if ( setState )
updateFolderMenu(); // set initial state of the action
} else {
@@ -3767,20 +3767,20 @@ void KMMainWidget::slotShortcutChanged( KMFolder *folder )
FolderShortcutCommand *c = new FolderShortcutCommand( this, folder );
mFolderShortcutCommands.insert( folder->idString(), c );
- QString actionlabel = QString( "FolderShortcut %1").arg( folder->prettyURL() );
- QString actionname = QString( "FolderShortcut %1").arg( folder->idString() );
- QString normalizedName = actionname.replace(" ", "_");
+ TQString actionlabel = TQString( "FolderShortcut %1").arg( folder->prettyURL() );
+ TQString actionname = TQString( "FolderShortcut %1").arg( folder->idString() );
+ TQString normalizedName = actionname.replace(" ", "_");
KAction* action =
- new KAction(actionlabel, folder->shortcut(), c, SLOT(start()),
+ new KAction(actionlabel, folder->shortcut(), c, TQT_SLOT(start()),
actionCollection(), normalizedName.local8Bit());
action->setIcon( folder->unreadIconPath() );
c->setAction( action ); // will be deleted along with the command
}
//-----------------------------------------------------------------------------
-QString KMMainWidget::findCurrentImapPath()
+TQString KMMainWidget::findCurrentImapPath()
{
- QString startPath;
+ TQString startPath;
if (!mFolder) return startPath;
if (mFolder->folderType() == KMFolderTypeImap)
{
@@ -3814,7 +3814,7 @@ void KMMainWidget::slotSubscriptionDialog()
return;
ImapAccountBase* account = findCurrentImapAccountBase();
if ( !account ) return;
- const QString startPath = findCurrentImapPath();
+ const TQString startPath = findCurrentImapPath();
// KSubscription sets "DestruciveClose"
SubscriptionDialog * dialog =
@@ -3832,7 +3832,7 @@ void KMMainWidget::slotLocalSubscriptionDialog()
ImapAccountBase* account = findCurrentImapAccountBase();
if ( !account ) return;
- const QString startPath = findCurrentImapPath();
+ const TQString startPath = findCurrentImapPath();
// KSubscription sets "DestruciveClose"
LocalSubscriptionDialog *dialog =
new LocalSubscriptionDialog(this, i18n("Local Subscription"), account, startPath);
@@ -3892,7 +3892,7 @@ void KMMainWidget::slotFilterLogViewer()
//-----------------------------------------------------------------------------
void KMMainWidget::updateFileMenu()
{
- QStringList actList = kmkernel->acctMgr()->getAccounts();
+ TQStringList actList = kmkernel->acctMgr()->getAccounts();
actionCollection()->action("check_mail")->setEnabled( actList.size() > 0 );
actionCollection()->action("check_mail_in")->setEnabled( actList.size() > 0 );
@@ -3913,7 +3913,7 @@ KMSystemTray *KMMainWidget::systray() const
}
//-----------------------------------------------------------------------------
-QString KMMainWidget::overrideEncoding() const
+TQString KMMainWidget::overrideEncoding() const
{
if ( mMsgView )
return mMsgView->overrideEncoding();
@@ -3934,7 +3934,7 @@ void KMMainWidget::setupFolderView()
{
if ( GlobalSettings::self()->enableFavoriteFolderView() ) {
mFolderView = mFolderViewSplitter;
- mSearchAndTree->reparent( mFolderViewSplitter, 0, QPoint( 0, 0 ) );
+ mSearchAndTree->reparent( mFolderViewSplitter, 0, TQPoint( 0, 0 ) );
mFolderViewSplitter->show();
mFavoriteFolderView->show();
} else {
@@ -3942,7 +3942,7 @@ void KMMainWidget::setupFolderView()
mFolderViewSplitter->hide();
mFavoriteFolderView->hide();
}
- mFolderView->reparent( mFolderViewParent, 0, QPoint( 0, 0 ) );
+ mFolderView->reparent( mFolderViewParent, 0, TQPoint( 0, 0 ) );
mFolderViewParent->moveToFirst( mFolderView );
mSearchAndTree->show();
}
@@ -3970,7 +3970,7 @@ void KMMainWidget::updateVactionScriptStatus(bool active)
if ( active ) {
mVacationScriptIndicator->setText( i18n("Out of office reply active") );
mVacationScriptIndicator->setPaletteBackgroundColor( Qt::yellow );
- mVacationScriptIndicator->setCursor( QCursor( Qt::PointingHandCursor ) );
+ mVacationScriptIndicator->setCursor( TQCursor( Qt::PointingHandCursor ) );
mVacationScriptIndicator->show();
} else {
mVacationScriptIndicator->hide();
diff --git a/kmail/kmmainwidget.h b/kmail/kmmainwidget.h
index c56cf813d..dd32fd7e3 100644
--- a/kmail/kmmainwidget.h
+++ b/kmail/kmmainwidget.h
@@ -23,10 +23,10 @@
#include <kurl.h>
#include <kxmlguiclient.h>
-#include <qguardedptr.h>
-#include <qlistview.h>
-#include <qvbox.h>
-#include <qvaluevector.h>
+#include <tqguardedptr.h>
+#include <tqlistview.h>
+#include <tqvbox.h>
+#include <tqvaluevector.h>
#include "kmreaderwin.h" //for inline actions
#include "kmkernel.h" // for access to config
@@ -76,7 +76,7 @@ namespace KMail {
class FavoriteFolderView;
}
-typedef QMap<int,KMFolder*> KMMenuToFolder;
+typedef TQMap<int,KMFolder*> KMMenuToFolder;
class KDE_EXPORT KMMainWidget : public QWidget
@@ -84,7 +84,7 @@ class KDE_EXPORT KMMainWidget : public QWidget
Q_OBJECT
public:
- KMMainWidget(QWidget *parent, const char *name,
+ KMMainWidget(TQWidget *parent, const char *name,
KXMLGUIClient *aGUIClient,
KActionCollection *actionCollection,
KConfig*config = KMKernel::config() );
@@ -155,7 +155,7 @@ public:
/** Returns a list of all KMMainWidgets. Warning, the list itself can be 0.
* @return the list of all main widgets, or 0 if it is not yet initialized */
- static const QValueList<KMMainWidget*>* mainWidgetList() { return s_mainWidgetList; }
+ static const TQValueList<KMMainWidget*>* mainWidgetList() { return s_mainWidgetList; }
KMSystemTray *systray() const;
@@ -244,7 +244,7 @@ public slots:
signals:
void messagesTransfered( bool );
- void captionChangeRequest( const QString & caption );
+ void captionChangeRequest( const TQString & caption );
protected:
void setupActions();
@@ -264,7 +264,7 @@ protected:
protected slots:
void slotCheckOneAccount(int);
void slotMailChecked( bool newMail, bool sendOnCheck,
- const QMap<QString, int> & newInFolder );
+ const TQMap<TQString, int> & newInFolder );
void getAccountMenu();
void getTransportMenu();
void slotHelp();
@@ -334,7 +334,7 @@ protected slots:
void slotSendQueuedVia( int item );
void slotOnlineStatus();
void slotUpdateOnlineStatus( GlobalSettings::EnumNetworkState::type );
- void slotMsgPopup(KMMessage &msg, const KURL &aUrl, const QPoint&);
+ void slotMsgPopup(KMMessage &msg, const KURL &aUrl, const TQPoint&);
void slotMarkAll();
void slotMemInfo();
void slotSearch();
@@ -383,7 +383,7 @@ protected slots:
void slotEditKeys();
/** changes the caption and displays the foldername */
- void slotChangeCaption(QListViewItem*);
+ void slotChangeCaption(TQListViewItem*);
void removeDuplicates();
void slotCustomReplyToMsg( int tid );
@@ -413,7 +413,7 @@ protected slots:
private:
/** Get override character encoding. */
- QString overrideEncoding() const;
+ TQString overrideEncoding() const;
void initializeIMAPActions( bool setState );
@@ -425,7 +425,7 @@ private:
/** Helper which finds the associated IMAP path if there is a current
* folder and it is an imap or disconnected imap one.
*/
- QString findCurrentImapPath();
+ TQString findCurrentImapPath();
void setupFolderView();
@@ -456,7 +456,7 @@ private:
*mCustomReplyAllActionMenu,
*mCustomForwardActionMenu;
// Signal mappers for custom template actions
- QSignalMapper *mCustomReplyMapper,
+ TQSignalMapper *mCustomReplyMapper,
*mCustomReplyAllMapper,
*mCustomForwardMapper;
@@ -476,32 +476,32 @@ private:
KToggleAction* mTotalColumnToggle;
KToggleAction* mSizeColumnToggle;
- QVBox *mSearchAndTree;
- QHBox *mFolderQuickSearch;
+ TQVBox *mSearchAndTree;
+ TQHBox *mFolderQuickSearch;
KMFolderTree *mFolderTree;
KMail::FavoriteFolderView *mFavoriteFolderView;
- QWidget *mFolderView;
- QSplitter *mFolderViewParent;
+ TQWidget *mFolderView;
+ TQSplitter *mFolderViewParent;
KMReaderWin *mMsgView;
- QSplitter *mPanner1, *mPanner2;
- QSplitter *mFolderViewSplitter;
+ TQSplitter *mPanner1, *mPanner2;
+ TQSplitter *mFolderViewSplitter;
KMHeaders *mHeaders;
- QVBox *mSearchAndHeaders;
+ TQVBox *mSearchAndHeaders;
KToolBar *mSearchToolBar;
KMail::HeaderListQuickSearch *mQuickSearchLine;
- QGuardedPtr<KMFolder> mFolder;
+ TQGuardedPtr<KMFolder> mFolder;
KMFolder *mTemplateFolder;
- QPopupMenu *mViewMenu, *mBodyPartsMenu;
+ TQPopupMenu *mViewMenu, *mBodyPartsMenu;
KAction *mlistFilterAction;
bool mIntegrated;
bool mBeepOnNew;
bool mConfirmEmpty;
- QString mStartupFolder;
+ TQString mStartupFolder;
int mMessageStatusId;
- QValueList<int> mPanner1Sep, mPanner2Sep;
+ TQValueList<int> mPanner1Sep, mPanner2Sep;
KURL mUrlCurrent;
QPopupMenu *mActMenu;
- QPopupMenu *mSendMenu;
+ TQPopupMenu *mSendMenu;
QPopupMenu *mFileMenu;
bool mLongFolderList;
@@ -516,7 +516,7 @@ private:
bool mEnableFolderQuickSearch;
bool mEnableQuickSearch;
-// QPopupMenu *mMessageMenu;
+// TQPopupMenu *mMessageMenu;
KMail::SearchWindow *mSearchWin;
KAction *mNewFolderAction, *mModifyFolderAction, *mRemoveFolderAction, *mExpireFolderAction,
@@ -528,25 +528,25 @@ private:
KToggleAction *mThreadBySubjectAction;
KToggleAction *mFolderAction, *mHeaderAction, *mMimeAction;
- QTimer *menutimer;
- QTimer *mShowBusySplashTimer;
+ TQTimer *menutimer;
+ TQTimer *mShowBusySplashTimer;
- QGuardedPtr<KMail::Vacation> mVacation;
+ TQGuardedPtr<KMail::Vacation> mVacation;
#if !defined(NDEBUG)
- QGuardedPtr<KMail::SieveDebugDialog> mSieveDebugDialog;
+ TQGuardedPtr<KMail::SieveDebugDialog> mSieveDebugDialog;
#endif
KActionCollection *mActionCollection;
KActionSeparator *mToolbarActionSeparator;
- QVBoxLayout *mTopLayout;
+ TQVBoxLayout *mTopLayout;
bool mDestructed, mForceJumpToUnread, mShowingOfflineScreen;
- QPtrList<KAction> mFilterMenuActions;
- QPtrList<KAction> mFilterTBarActions;
- QPtrList<KMMetaFilterActionCommand> mFilterCommands;
- QDict<FolderShortcutCommand> mFolderShortcutCommands;
- QGuardedPtr <KMail::FolderJob> mJob;
+ TQPtrList<KAction> mFilterMenuActions;
+ TQPtrList<KAction> mFilterTBarActions;
+ TQPtrList<KMMetaFilterActionCommand> mFilterCommands;
+ TQDict<FolderShortcutCommand> mFolderShortcutCommands;
+ TQGuardedPtr <KMail::FolderJob> mJob;
- QValueVector<QString> mCustomTemplates;
- QPtrList<KAction> mCustomTemplateActions;
+ TQValueVector<TQString> mCustomTemplates;
+ TQPtrList<KAction> mCustomTemplateActions;
KMSystemTray *mSystemTray;
KConfig *mConfig;
@@ -554,7 +554,7 @@ private:
KMail::MessageActions *mMsgActions;
- static QValueList<KMMainWidget*>* s_mainWidgetList;
+ static TQValueList<KMMainWidget*>* s_mainWidgetList;
KStatusBarLabel *mVacationScriptIndicator;
bool mVacationIndicatorActive;
diff --git a/kmail/kmmainwin.cpp b/kmail/kmmainwin.cpp
index ce0c64607..7d69e2ee2 100644
--- a/kmail/kmmainwin.cpp
+++ b/kmail/kmmainwin.cpp
@@ -25,7 +25,7 @@
#include "kmmainwin.moc"
-KMMainWin::KMMainWin(QWidget *)
+KMMainWin::KMMainWin(TQWidget *)
: KMainWindow( 0, "kmail-mainwindow#" ),
mReallyClose( false )
{
@@ -36,7 +36,7 @@ KMMainWin::KMMainWin(QWidget *)
kapp->ref();
(void) new KAction( i18n("New &Window"), "window_new", 0,
- this, SLOT(slotNewMailReader()),
+ this, TQT_SLOT(slotNewMailReader()),
actionCollection(), "new_mail_client" );
mKMMainWidget = new KMMainWidget( this, "KMMainWidget", this, actionCollection() );
@@ -47,17 +47,17 @@ KMMainWin::KMMainWin(QWidget *)
setInstance( kmkernel->xmlGuiInstance() );
if ( kmkernel->firstInstance() )
- QTimer::singleShot( 200, this, SLOT(slotShowTipOnStart()) );
+ TQTimer::singleShot( 200, this, TQT_SLOT(slotShowTipOnStart()) );
setStandardToolBarMenuEnabled(true);
- KStdAction::configureToolbars(this, SLOT(slotEditToolbars()),
+ KStdAction::configureToolbars(this, TQT_SLOT(slotEditToolbars()),
actionCollection());
- KStdAction::keyBindings(mKMMainWidget, SLOT(slotEditKeys()),
+ KStdAction::keyBindings(mKMMainWidget, TQT_SLOT(slotEditKeys()),
actionCollection());
- KStdAction::quit( this, SLOT(slotQuit()), actionCollection());
+ KStdAction::quit( this, TQT_SLOT(slotQuit()), actionCollection());
createGUI( "kmmainwin.rc", false );
// Don't use conserveMemory() because this renders dynamic plugging
// of actions unusable!
@@ -66,14 +66,14 @@ KMMainWin::KMMainWin(QWidget *)
applyMainWindowSettings(KMKernel::config(), "Main Window");
- connect( KPIM::BroadcastStatus::instance(), SIGNAL( statusMsg( const QString& ) ),
- this, SLOT( displayStatusMsg(const QString&) ) );
+ connect( KPIM::BroadcastStatus::instance(), TQT_SIGNAL( statusMsg( const TQString& ) ),
+ this, TQT_SLOT( displayStatusMsg(const TQString&) ) );
- connect(kmkernel, SIGNAL(configChanged()),
- this, SLOT(slotConfigChanged()));
+ connect(kmkernel, TQT_SIGNAL(configChanged()),
+ this, TQT_SLOT(slotConfigChanged()));
- connect(mKMMainWidget, SIGNAL(captionChangeRequest(const QString&)),
- SLOT(setCaption(const QString&)) );
+ connect(mKMMainWidget, TQT_SIGNAL(captionChangeRequest(const TQString&)),
+ TQT_SLOT(setCaption(const TQString&)) );
// Enable mail checks again (see destructor)
kmkernel->enableMailCheck();
@@ -91,7 +91,7 @@ KMMainWin::~KMMainWin()
if ( !kmkernel->haveSystemTrayApplet() ) {
// Check if this was the last KMMainWin
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() &&
@@ -111,12 +111,12 @@ KMMainWin::~KMMainWin()
}
}
-void KMMainWin::displayStatusMsg(const QString& aText)
+void KMMainWin::displayStatusMsg(const TQString& aText)
{
if ( !statusBar() || !mLittleProgress) return;
int statusWidth = statusBar()->width() - mLittleProgress->width()
- fontMetrics().maxWidth();
- QString text = KStringHandler::rPixelSqueeze( " " + aText, fontMetrics(),
+ TQString text = KStringHandler::rPixelSqueeze( " " + aText, fontMetrics(),
statusWidth );
// ### FIXME: We should disable richtext/HTML (to avoid possible denial of service attacks),
@@ -145,8 +145,8 @@ void KMMainWin::slotEditToolbars()
saveMainWindowSettings(KMKernel::config(), "Main Window");
KEditToolbar dlg(actionCollection(), "kmmainwin.rc");
- connect( &dlg, SIGNAL(newToolbarConfig()),
- SLOT(slotUpdateToolbars()) );
+ connect( &dlg, TQT_SIGNAL(newToolbarConfig()),
+ TQT_SLOT(slotUpdateToolbars()) );
dlg.exec();
}
diff --git a/kmail/kmmainwin.h b/kmail/kmmainwin.h
index eb5382670..201c3824b 100644
--- a/kmail/kmmainwin.h
+++ b/kmail/kmmainwin.h
@@ -22,7 +22,7 @@
#include <kmainwindow.h>
#include "kdeversion.h"
-#include "qstring.h"
+#include "tqstring.h"
class KMMainWidget;
namespace KPIM {
@@ -39,7 +39,7 @@ class KMMainWin : public KMainWindow
public:
// the main window needs to have a name since else restoring the window
// settings by kwin doesn't work
- KMMainWin(QWidget *parent = 0);
+ KMMainWin(TQWidget *parent = 0);
virtual ~KMMainWin();
KMMainWidget *mainKMWidget() const { return mKMMainWidget; };
StatusbarProgressWidget* progressWidget() const { return mLittleProgress; }
@@ -53,7 +53,7 @@ public:
virtual void writeConfig(void);
public slots:
- void displayStatusMsg(const QString&);
+ void displayStatusMsg(const TQString&);
void slotEditToolbars();
void slotUpdateToolbars();
void setupStatusBar();
diff --git a/kmail/kmmessage.cpp b/kmail/kmmessage.cpp
index 9c006b685..5a70afdb1 100644
--- a/kmail/kmmessage.cpp
+++ b/kmail/kmmessage.cpp
@@ -43,9 +43,9 @@ using KMail::HeaderStrategy;
#include <kidna.h>
#include <kasciistricmp.h>
-#include <qcursor.h>
-#include <qtextcodec.h>
-#include <qmessagebox.h>
+#include <tqcursor.h>
+#include <tqtextcodec.h>
+#include <tqmessagebox.h>
#include <kmime_util.h>
#include <kmime_charfreq.h>
@@ -74,18 +74,18 @@ using namespace KMime;
static DwString emptyString("");
// Values that are set from the config file with KMMessage::readConfig()
-static QString sReplyLanguage, sReplyStr, sReplyAllStr, sIndentPrefixStr;
+static TQString sReplyLanguage, sReplyStr, sReplyAllStr, sIndentPrefixStr;
static bool sSmartQuote,
sWordWrap;
static int sWrapCol;
-static QStringList sPrefCharsets;
+static TQStringList sPrefCharsets;
-QString KMMessage::sForwardStr;
+TQString KMMessage::sForwardStr;
const HeaderStrategy * KMMessage::sHeaderStrategy = HeaderStrategy::rich();
//helper
static void applyHeadersToMessagePart( DwHeaders& headers, KMMessagePart* aPart );
-QValueList<KMMessage*> KMMessage::sPendingDeletes;
+TQValueList<KMMessage*> KMMessage::sPendingDeletes;
//-----------------------------------------------------------------------------
KMMessage::KMMessage(DwMessage* aMsg)
@@ -199,7 +199,7 @@ KMMessage::~KMMessage()
//-----------------------------------------------------------------------------
-void KMMessage::setReferences(const QCString& aStr)
+void KMMessage::setReferences(const TQCString& aStr)
{
if (!aStr) return;
mMsg->Headers().References().FromString(aStr);
@@ -208,7 +208,7 @@ void KMMessage::setReferences(const QCString& aStr)
//-----------------------------------------------------------------------------
-QCString KMMessage::id() const
+TQCString KMMessage::id() const
{
DwHeaders& header = mMsg->Headers();
if (header.HasMessageId())
@@ -273,15 +273,15 @@ void KMMessage::setUnencryptedMsg( KMMessage* unencrypted )
//-----------------------------------------------------------------------------
//FIXME: move to libemailfunctions
-KPIM::EmailParseResult KMMessage::isValidEmailAddressList( const QString& aStr,
- QString& brokenAddress )
+KPIM::EmailParseResult KMMessage::isValidEmailAddressList( const TQString& aStr,
+ TQString& brokenAddress )
{
if ( aStr.isEmpty() ) {
return KPIM::AddressEmpty;
}
- QStringList list = KPIM::splitEmailAddrList( aStr );
- for( QStringList::const_iterator it = list.begin(); it != list.end(); ++it ) {
+ TQStringList list = KPIM::splitEmailAddrList( aStr );
+ for( TQStringList::const_iterator it = list.begin(); it != list.end(); ++it ) {
KPIM::EmailParseResult errorCode = KPIM::isValidEmailAddress( *it );
if ( errorCode != KPIM::AddressOk ) {
brokenAddress = ( *it );
@@ -314,12 +314,12 @@ const DwMessage* KMMessage::asDwMessage()
}
//-----------------------------------------------------------------------------
-QCString KMMessage::asString() const {
+TQCString KMMessage::asString() const {
return KMail::Util::CString( asDwString() );
}
-QByteArray KMMessage::asSendableString() const
+TQByteArray KMMessage::asSendableString() const
{
KMMessage msg( new DwMessage( *this->mMsg ) );
msg.removePrivateHeaderFields();
@@ -327,7 +327,7 @@ QByteArray KMMessage::asSendableString() const
return KMail::Util::ByteArray( msg.asDwString() ); // and another copy again!
}
-QCString KMMessage::headerAsSendableString() const
+TQCString KMMessage::headerAsSendableString() const
{
KMMessage msg( new DwMessage( *this->mMsg ) );
msg.removePrivateHeaderFields();
@@ -378,13 +378,13 @@ void KMMessage::setStatusFields()
//----------------------------------------------------------------------------
-QString KMMessage::headerAsString() const
+TQString KMMessage::headerAsString() const
{
DwHeaders& header = mMsg->Headers();
header.Assemble();
if ( header.AsString().empty() )
- return QString::null;
- return QString::fromLatin1( header.AsString().c_str() );
+ return TQString::null;
+ return TQString::fromLatin1( header.AsString().c_str() );
}
@@ -394,11 +394,11 @@ DwMediaType& KMMessage::dwContentType()
return mMsg->Headers().ContentType();
}
-void KMMessage::fromByteArray( const QByteArray & ba, bool setStatus ) {
+void KMMessage::fromByteArray( const TQByteArray & ba, bool setStatus ) {
return fromDwString( DwString( ba.data(), ba.size() ), setStatus );
}
-void KMMessage::fromString( const QCString & str, bool aSetStatus ) {
+void KMMessage::fromString( const TQCString & str, bool aSetStatus ) {
return fromDwString( KMail::Util::dwString( str ), aSetStatus );
}
@@ -424,10 +424,10 @@ void KMMessage::fromDwString(const DwString& str, bool aSetStatus)
//-----------------------------------------------------------------------------
-QString KMMessage::formatString(const QString& aStr) const
+TQString KMMessage::formatString(const TQString& aStr) const
{
- QString result, str;
- QChar ch;
+ TQString result, str;
+ TQChar ch;
uint j;
if (aStr.isEmpty())
@@ -505,7 +505,7 @@ QString KMMessage::formatString(const QString& aStr) const
return result;
}
-static void removeTrailingSpace( QString &line )
+static void removeTrailingSpace( TQString &line )
{
int i = line.length()-1;
while( (i >= 0) && ((line[i] == ' ') || (line[i] == '\t')))
@@ -513,7 +513,7 @@ static void removeTrailingSpace( QString &line )
line.truncate( i+1);
}
-static QString splitLine( QString &line)
+static TQString splitLine( TQString &line)
{
removeTrailingSpace( line );
int i = 0;
@@ -524,7 +524,7 @@ static QString splitLine( QString &line)
while(i < l)
{
- QChar c = line[i];
+ TQChar c = line[i];
if ((c == '>') || (c == ':') || (c == '|'))
j = i+1;
else if ((c != ' ') && (c != '\t'))
@@ -538,24 +538,24 @@ static QString splitLine( QString &line)
}
if ( i == l )
{
- QString result = line.left(j);
- line = QString::null;
+ TQString result = line.left(j);
+ line = TQString::null;
return result;
}
- QString result = line.left(j);
+ TQString result = line.left(j);
line = line.mid(j);
return result;
}
-static QString flowText(QString &text, const QString& indent, int maxLength)
+static TQString flowText(TQString &text, const TQString& indent, int maxLength)
{
maxLength--;
if (text.isEmpty())
{
return indent+"<NULL>\n";
}
- QString result;
+ TQString result;
while (1)
{
int i;
@@ -577,11 +577,11 @@ static QString flowText(QString &text, const QString& indent, int maxLength)
i = text.length();
}
- QString line = text.left(i);
+ TQString line = text.left(i);
if (i < (int) text.length())
text = text.mid(i);
else
- text = QString::null;
+ text = TQString::null;
result += indent + line + '\n';
@@ -590,8 +590,8 @@ static QString flowText(QString &text, const QString& indent, int maxLength)
}
}
-static bool flushPart(QString &msg, QStringList &part,
- const QString &indent, int maxLength)
+static bool flushPart(TQString &msg, TQStringList &part,
+ const TQString &indent, int maxLength)
{
maxLength -= indent.length();
if (maxLength < 20) maxLength = 20;
@@ -602,12 +602,12 @@ static bool flushPart(QString &msg, QStringList &part,
part.remove(part.fromLast());
}
- QString text;
- for(QStringList::Iterator it2 = part.begin();
+ TQString text;
+ for(TQStringList::Iterator it2 = part.begin();
it2 != part.end();
it2++)
{
- QString line = (*it2);
+ TQString line = (*it2);
if (line.isEmpty())
{
@@ -637,35 +637,35 @@ static bool flushPart(QString &msg, QStringList &part,
return appendEmptyLine;
}
-static QString stripSignature( const QString & msg, bool clearSigned ) {
+static TQString stripSignature( const TQString & msg, bool clearSigned ) {
if ( clearSigned )
- return msg.left( msg.findRev( QRegExp( "\n--\\s?\n" ) ) );
+ return msg.left( msg.findRev( TQRegExp( "\n--\\s?\n" ) ) );
else
return msg.left( msg.findRev( "\n-- \n" ) );
}
-QString KMMessage::smartQuote( const QString & msg, int maxLineLength )
+TQString KMMessage::smartQuote( const TQString & msg, int maxLineLength )
{
- QStringList part;
- QString oldIndent;
+ TQStringList part;
+ TQString oldIndent;
bool firstPart = true;
- const QStringList lines = QStringList::split('\n', msg, true);
+ const TQStringList lines = TQStringList::split('\n', msg, true);
- QString result;
- for(QStringList::const_iterator it = lines.begin();
+ TQString result;
+ for(TQStringList::const_iterator it = lines.begin();
it != lines.end();
++it)
{
- QString line = *it;
+ TQString line = *it;
- const QString indent = splitLine( line );
+ const TQString indent = splitLine( line );
if ( line.isEmpty())
{
if (!firstPart)
- part.append(QString::null);
+ part.append(TQString::null);
continue;
};
@@ -677,11 +677,11 @@ QString KMMessage::smartQuote( const QString & msg, int maxLineLength )
if (oldIndent != indent)
{
- QString fromLine;
+ TQString fromLine;
// Search if the last non-blank line could be "From" line
if (part.count() && (oldIndent.length() < indent.length()))
{
- QStringList::Iterator it2 = part.fromLast();
+ TQStringList::Iterator it2 = part.fromLast();
while( (it2 != part.end()) && (*it2).isEmpty())
--it2;
@@ -713,8 +713,8 @@ QString KMMessage::smartQuote( const QString & msg, int maxLineLength )
//-----------------------------------------------------------------------------
void KMMessage::parseTextStringFromDwPart( partNode * root,
- QCString& parsedString,
- const QTextCodec*& codec,
+ TQCString& parsedString,
+ const TQTextCodec*& codec,
bool& isHTML ) const
{
if ( !root ) return;
@@ -743,13 +743,13 @@ void KMMessage::parseTextStringFromDwPart( partNode * root,
//-----------------------------------------------------------------------------
-QString KMMessage::asPlainText( bool aStripSignature, bool allowDecryption ) const {
- QCString parsedString;
+TQString KMMessage::asPlainText( bool aStripSignature, bool allowDecryption ) const {
+ TQCString parsedString;
bool isHTML = false;
- const QTextCodec * codec = 0;
+ const TQTextCodec * codec = 0;
partNode * root = partNode::fromMessage( this );
- if ( !root ) return QString::null;
+ if ( !root ) return TQString::null;
parseTextStringFromDwPart( root, parsedString, codec, isHTML );
delete root;
@@ -757,15 +757,15 @@ QString KMMessage::asPlainText( bool aStripSignature, bool allowDecryption ) con
codec = this->codec();
if ( parsedString.isEmpty() )
- return QString::null;
+ return TQString::null;
bool clearSigned = false;
- QString result;
+ TQString result;
// decrypt
if ( allowDecryption ) {
- QPtrList<Kpgp::Block> pgpBlocks;
- QStrList nonPgpBlocks;
+ TQPtrList<Kpgp::Block> pgpBlocks;
+ TQStrList nonPgpBlocks;
if ( Kpgp::Module::prepareMessageForDecryption( parsedString,
pgpBlocks,
nonPgpBlocks ) ) {
@@ -820,28 +820,28 @@ QString KMMessage::asPlainText( bool aStripSignature, bool allowDecryption ) con
return result;
}
-QString KMMessage::asQuotedString( const QString& aHeaderStr,
- const QString& aIndentStr,
- const QString& selection /* = QString::null */,
+TQString KMMessage::asQuotedString( const TQString& aHeaderStr,
+ const TQString& aIndentStr,
+ const TQString& selection /* = TQString::null */,
bool aStripSignature /* = true */,
bool allowDecryption /* = true */) const
{
- QString content = selection.isEmpty() ?
+ TQString content = selection.isEmpty() ?
asPlainText( aStripSignature, allowDecryption ) : selection ;
// Remove blank lines at the beginning:
- const int firstNonWS = content.find( QRegExp( "\\S" ) );
+ const int firstNonWS = content.find( TQRegExp( "\\S" ) );
const int lineStart = content.findRev( '\n', firstNonWS );
if ( lineStart >= 0 )
content.remove( 0, static_cast<unsigned int>( lineStart ) );
- const QString indentStr = formatString( aIndentStr );
+ const TQString indentStr = formatString( aIndentStr );
content.replace( '\n', '\n' + indentStr );
content.prepend( indentStr );
content += '\n';
- const QString headerStr = formatString( aHeaderStr );
+ const TQString headerStr = formatString( aHeaderStr );
if ( sSmartQuote && sWordWrap )
return headerStr + smartQuote( content, sWrapCol );
return headerStr + content;
@@ -849,16 +849,16 @@ QString KMMessage::asQuotedString( const QString& aHeaderStr,
//-----------------------------------------------------------------------------
KMMessage* KMMessage::createReply( KMail::ReplyStrategy replyStrategy,
- QString selection /* = QString::null */,
+ TQString selection /* = TQString::null */,
bool noQuote /* = false */,
bool allowDecryption /* = true */,
bool selectionIsBody /* = false */,
- const QString &tmpl /* = QString::null */ )
+ const TQString &tmpl /* = TQString::null */ )
{
KMMessage* msg = new KMMessage;
- QString str, replyStr, mailingListStr, replyToStr, toStr;
- QStringList mailingListAddresses;
- QCString refStr, headerName;
+ TQString str, replyStr, mailingListStr, replyToStr, toStr;
+ TQStringList mailingListAddresses;
+ TQCString refStr, headerName;
bool replyAll = true;
msg->initFromMessage(this);
@@ -874,8 +874,8 @@ KMMessage* KMMessage::createReply( KMail::ReplyStrategy replyStrategy,
mailingListAddresses << parent()->mailingListPostAddress();
}
if ( headerField("List-Post").find( "mailto:", 0, false ) != -1 ) {
- QString listPost = headerField("List-Post");
- QRegExp rx( "<mailto:([^@>]+)@([^>]+)>", false );
+ TQString listPost = headerField("List-Post");
+ TQRegExp rx( "<mailto:([^@>]+)@([^>]+)>", false );
if ( rx.search( listPost, 0 ) != -1 ) // matched
mailingListAddresses << rx.cap(1) + '@' + rx.cap(2);
}
@@ -902,7 +902,7 @@ KMMessage* KMMessage::createReply( KMail::ReplyStrategy replyStrategy,
replyAll = false;
}
// strip all my addresses from the list of recipients
- QStringList recipients = KPIM::splitEmailAddrList( toStr );
+ TQStringList recipients = KPIM::splitEmailAddrList( toStr );
toStr = stripMyAddressesFromAddressList( recipients ).join(", ");
// ... unless the list contains only my addresses (reply to self)
if ( toStr.isEmpty() && !recipients.isEmpty() )
@@ -922,21 +922,21 @@ KMMessage* KMMessage::createReply( KMail::ReplyStrategy replyStrategy,
toStr = replyToStr;
}
// strip all my addresses from the list of recipients
- QStringList recipients = KPIM::splitEmailAddrList( toStr );
+ TQStringList recipients = KPIM::splitEmailAddrList( toStr );
toStr = stripMyAddressesFromAddressList( recipients ).join(", ");
break;
}
case KMail::ReplyAll : {
- QStringList recipients;
- QStringList ccRecipients;
+ TQStringList recipients;
+ TQStringList ccRecipients;
// add addresses from the Reply-To header to the list of recipients
if( !replyToStr.isEmpty() ) {
recipients += KPIM::splitEmailAddrList( replyToStr );
// strip all possible mailing list addresses from the list of Reply-To
// addresses
- for ( QStringList::const_iterator it = mailingListAddresses.begin();
+ for ( TQStringList::const_iterator it = mailingListAddresses.begin();
it != mailingListAddresses.end();
++it ) {
recipients = stripAddressFromAddressList( *it, recipients );
@@ -971,12 +971,12 @@ KMMessage* KMMessage::createReply( KMail::ReplyStrategy replyStrategy,
// merge To header and CC header into a list of CC recipients
if( !cc().isEmpty() || !to().isEmpty() ) {
- QStringList list;
+ TQStringList list;
if (!to().isEmpty())
list += KPIM::splitEmailAddrList(to());
if (!cc().isEmpty())
list += KPIM::splitEmailAddrList(cc());
- for( QStringList::Iterator it = list.begin(); it != list.end(); ++it ) {
+ for( TQStringList::Iterator it = list.begin(); it != list.end(); ++it ) {
if( !addressIsInAddressList( *it, recipients )
&& !addressIsInAddressList( *it, ccRecipients ) ) {
ccRecipients += *it;
@@ -1008,10 +1008,10 @@ KMMessage* KMMessage::createReply( KMail::ReplyStrategy replyStrategy,
}
case KMail::ReplyAuthor : {
if ( !replyToStr.isEmpty() ) {
- QStringList recipients = KPIM::splitEmailAddrList( replyToStr );
+ TQStringList recipients = KPIM::splitEmailAddrList( replyToStr );
// strip the mailing list post address from the list of Reply-To
// addresses since we want to reply in private
- for ( QStringList::const_iterator it = mailingListAddresses.begin();
+ for ( TQStringList::const_iterator it = mailingListAddresses.begin();
it != mailingListAddresses.end();
++it ) {
recipients = stripAddressFromAddressList( *it, recipients );
@@ -1047,7 +1047,7 @@ KMMessage* KMMessage::createReply( KMail::ReplyStrategy replyStrategy,
// if (!noQuote) {
// if( selectionIsBody ){
-// QCString cStr = selection.latin1();
+// TQCString cStr = selection.latin1();
// msg->setBody( cStr );
// }else{
// msg->setBody(asQuotedString(replyStr + "\n", sIndentPrefixStr, selection,
@@ -1082,9 +1082,9 @@ KMMessage* KMMessage::createReply( KMail::ReplyStrategy replyStrategy,
//-----------------------------------------------------------------------------
-QCString KMMessage::getRefStr() const
+TQCString KMMessage::getRefStr() const
{
- QCString firstRef, lastRef, refStr, retRefStr;
+ TQCString firstRef, lastRef, refStr, retRefStr;
int i, j;
refStr = headerField("References").stripWhiteSpace().latin1();
@@ -1110,34 +1110,34 @@ QCString KMMessage::getRefStr() const
}
-KMMessage* KMMessage::createRedirect( const QString &toStr )
+KMMessage* KMMessage::createRedirect( const TQString &toStr )
{
// copy the message 1:1
KMMessage* msg = new KMMessage( new DwMessage( *this->mMsg ) );
KMMessagePart msgPart;
uint id = 0;
- QString strId = msg->headerField( "X-KMail-Identity" ).stripWhiteSpace();
+ TQString strId = msg->headerField( "X-KMail-Identity" ).stripWhiteSpace();
if ( !strId.isEmpty())
id = strId.toUInt();
const KPIM::Identity & ident =
kmkernel->identityManager()->identityForUoidOrDefault( id );
// X-KMail-Redirect-From: content
- QString strByWayOf = QString("%1 (by way of %2 <%3>)")
+ TQString strByWayOf = TQString("%1 (by way of %2 <%3>)")
.arg( from() )
.arg( ident.fullName() )
.arg( ident.emailAddr() );
// Resent-From: content
- QString strFrom = QString("%1 <%2>")
+ TQString strFrom = TQString("%1 <%2>")
.arg( ident.fullName() )
.arg( ident.emailAddr() );
// format the current date to be used in Resent-Date:
- QString origDate = msg->headerField( "Date" );
+ TQString origDate = msg->headerField( "Date" );
msg->setDateToday();
- QString newDate = msg->headerField( "Date" );
+ TQString newDate = msg->headerField( "Date" );
// make sure the Date: header is valid
if ( origDate.isEmpty() )
msg->removeHeaderField( "Date" );
@@ -1161,15 +1161,15 @@ KMMessage* KMMessage::createRedirect( const QString &toStr )
//-----------------------------------------------------------------------------
-QCString KMMessage::createForwardBody()
+TQCString KMMessage::createForwardBody()
{
- QString s;
- QCString str;
+ TQString s;
+ TQCString str;
if (sHeaderStrategy == HeaderStrategy::all()) {
s = "\n\n---------- " + sForwardStr + " ----------\n\n";
s += headerAsString();
- str = asQuotedString(s, "", QString::null, false, false).utf8();
+ str = asQuotedString(s, "", TQString::null, false, false).utf8();
str += "\n-------------------------------------------------------\n";
} else {
s = "\n\n---------- " + sForwardStr + " ----------\n\n";
@@ -1182,14 +1182,14 @@ QCString KMMessage::createForwardBody()
s += "To: " + to() + "\n";
if (!cc().isEmpty()) s += "Cc: " + cc() + "\n";
s += "\n";
- str = asQuotedString(s, "", QString::null, false, false).utf8();
+ str = asQuotedString(s, "", TQString::null, false, false).utf8();
str += "\n-------------------------------------------------------\n";
}
return str;
}
-void KMMessage::sanitizeHeaders( const QStringList& whiteList )
+void KMMessage::sanitizeHeaders( const TQStringList& whiteList )
{
// Strip out all headers apart from the content description and other
// whitelisted ones, because we don't want to inherit them.
@@ -1200,7 +1200,7 @@ void KMMessage::sanitizeHeaders( const QStringList& whiteList )
{
nextField = field->Next();
if ( field->FieldNameStr().find( "ontent" ) == DwString::npos
- && !whiteList.contains( QString::fromLatin1( field->FieldNameStr().c_str() ) ) )
+ && !whiteList.contains( TQString::fromLatin1( field->FieldNameStr().c_str() ) ) )
header.RemoveField(field);
field = nextField;
}
@@ -1208,10 +1208,10 @@ void KMMessage::sanitizeHeaders( const QStringList& whiteList )
}
//-----------------------------------------------------------------------------
-KMMessage* KMMessage::createForward( const QString &tmpl /* = QString::null */ )
+KMMessage* KMMessage::createForward( const TQString &tmpl /* = TQString::null */ )
{
KMMessage* msg = new KMMessage();
- QString id;
+ TQString id;
// If this is a multipart mail or if the main part is only the text part,
// Make an identical copy of the mail, minus headers, so attachments are
@@ -1228,12 +1228,12 @@ KMMessage* KMMessage::createForward( const QString &tmpl /* = QString::null */ )
msg->sanitizeHeaders();
// strip blacklisted parts
- QStringList blacklist = GlobalSettings::self()->mimetypesToStripWhenInlineForwarding();
- for ( QStringList::Iterator it = blacklist.begin(); it != blacklist.end(); ++it ) {
- QString entry = (*it);
+ TQStringList blacklist = GlobalSettings::self()->mimetypesToStripWhenInlineForwarding();
+ for ( TQStringList::Iterator it = blacklist.begin(); it != blacklist.end(); ++it ) {
+ TQString entry = (*it);
int sep = entry.find( '/' );
- QCString type = entry.left( sep ).latin1();
- QCString subtype = entry.mid( sep+1 ).latin1();
+ TQCString type = entry.left( sep ).latin1();
+ TQCString subtype = entry.mid( sep+1 ).latin1();
kdDebug( 5006 ) << "Looking for blacklisted type: " << type << "/" << subtype << endl;
while ( DwBodyPart * part = msg->findDwBodyPart( type, subtype ) ) {
msg->mMsg->Body().RemoveBodyPart( part );
@@ -1283,7 +1283,7 @@ KMMessage* KMMessage::createForward( const QString &tmpl /* = QString::null */ )
msg->mNeedsAssembly = true;
msg->cleanupHeader();
}
- // QString st = QString::fromUtf8(createForwardBody());
+ // TQString st = TQString::fromUtf8(createForwardBody());
msg->setSubject( forwardSubject() );
@@ -1296,7 +1296,7 @@ KMMessage* KMMessage::createForward( const QString &tmpl /* = QString::null */ )
parser.process( this );
}
- // QCString encoding = autoDetectCharset(charset(), sPrefCharsets, msg->body());
+ // TQCString encoding = autoDetectCharset(charset(), sPrefCharsets, msg->body());
// if (encoding.isEmpty()) encoding = "utf-8";
// msg->setCharset(encoding);
@@ -1354,15 +1354,15 @@ static int requestAdviceOnMDN( const char * what ) {
for ( int i = 0 ; i < numMdnMessageBoxes ; ++i )
if ( !qstrcmp( what, mdnMessageBoxes[i].dontAskAgainID ) )
if ( mdnMessageBoxes[i].canDeny ) {
- const KCursorSaver saver( QCursor::ArrowCursor );
- int answer = QMessageBox::information( 0,
+ const KCursorSaver saver( TQCursor::ArrowCursor );
+ int answer = TQMessageBox::information( 0,
i18n("Message Disposition Notification Request"),
i18n( mdnMessageBoxes[i].text ),
i18n("&Ignore"), i18n("Send \"&denied\""), i18n("&Send") );
return answer ? answer + 1 : 0 ; // map to "mode" in createMDN
} else {
- const KCursorSaver saver( QCursor::ArrowCursor );
- int answer = QMessageBox::information( 0,
+ const KCursorSaver saver( TQCursor::ArrowCursor );
+ int answer = TQMessageBox::information( 0,
i18n("Message Disposition Notification Request"),
i18n( mdnMessageBoxes[i].text ),
i18n("&Ignore"), i18n("&Send") );
@@ -1376,7 +1376,7 @@ static int requestAdviceOnMDN( const char * what ) {
KMMessage* KMMessage::createMDN( MDN::ActionMode a,
MDN::DispositionType d,
bool allowGUI,
- QValueList<MDN::DispositionModifier> m )
+ TQValueList<MDN::DispositionModifier> m )
{
// RFC 2298: At most one MDN may be issued on behalf of each
// particular recipient by their user agent. That is, once an MDN
@@ -1401,13 +1401,13 @@ KMMessage* KMMessage::createMDN( MDN::ActionMode a,
}
// extract where to send to:
- QString receiptTo = headerField("Disposition-Notification-To");
+ TQString receiptTo = headerField("Disposition-Notification-To");
if ( receiptTo.stripWhiteSpace().isEmpty() ) return 0;
receiptTo.remove( '\n' );
MDN::SendingMode s = MDN::SentAutomatically; // set to manual if asked user
- QString special; // fill in case of error, warning or failure
+ TQString special; // fill in case of error, warning or failure
KConfigGroup mdnConfig( KMKernel::config(), "MDN" );
// default:
@@ -1424,7 +1424,7 @@ KMMessage* KMMessage::createMDN( MDN::ActionMode a,
// not understand the meaning of the parameter, it MUST NOT generate
// an MDN with any disposition type other than "failed" in response
// to the request.
- QString notificationOptions = headerField("Disposition-Notification-Options");
+ TQString notificationOptions = headerField("Disposition-Notification-Options");
if ( notificationOptions.contains( "required", false ) ) {
// ### hacky; should parse...
// There is a required option that we don't understand. We need to
@@ -1456,7 +1456,7 @@ KMMessage* KMMessage::createMDN( MDN::ActionMode a,
// SHOULD be obtained (or no MDN sent) if there is no Return-Path
// header in the message [...]
AddrSpecList returnPathList = extractAddrSpecs("Return-Path");
- QString returnPath = returnPathList.isEmpty() ? QString::null
+ TQString returnPath = returnPathList.isEmpty() ? TQString::null
: returnPathList.front().localPart + '@' + returnPathList.front().domain ;
kdDebug(5006) << "clean return path: " << returnPath << endl;
if ( returnPath.isEmpty() || !receiptTo.contains( returnPath, false ) ) {
@@ -1495,7 +1495,7 @@ KMMessage* KMMessage::createMDN( MDN::ActionMode a,
// extract where to send from:
- QString finalRecipient = kmkernel->identityManager()
+ TQString finalRecipient = kmkernel->identityManager()
->identityForUoidOrDefault( identityUoid() ).fullEmailAddr();
//
@@ -1516,7 +1516,7 @@ KMMessage* KMMessage::createMDN( MDN::ActionMode a,
receipt->mNeedsAssembly = true;
receipt->setContentTypeParam( "report-type", "disposition-notification" );
- QString description = replaceHeadersInString( MDN::descriptionFor( d, m ) );
+ TQString description = replaceHeadersInString( MDN::descriptionFor( d, m ) );
// text/plain part:
KMMessagePart firstMsgPart;
@@ -1588,15 +1588,15 @@ KMMessage* KMMessage::createMDN( MDN::ActionMode a,
return receipt;
}
-QString KMMessage::replaceHeadersInString( const QString & s ) const {
- QString result = s;
- QRegExp rx( "\\$\\{([a-z0-9-]+)\\}", false );
+TQString KMMessage::replaceHeadersInString( const TQString & s ) const {
+ TQString result = s;
+ TQRegExp rx( "\\$\\{([a-z0-9-]+)\\}", false );
Q_ASSERT( rx.isValid() );
- QRegExp rxDate( "\\$\\{date\\}" );
+ TQRegExp rxDate( "\\$\\{date\\}" );
Q_ASSERT( rxDate.isValid() );
- QString sDate = KMime::DateFormatter::formatDate(
+ TQString sDate = KMime::DateFormatter::formatDate(
KMime::DateFormatter::Localized, date() );
int idx = 0;
@@ -1606,7 +1606,7 @@ QString KMMessage::replaceHeadersInString( const QString & s ) const {
idx = 0;
while ( ( idx = rx.search( result, idx ) ) != -1 ) {
- QString replacement = headerField( rx.cap(1).latin1() );
+ TQString replacement = headerField( rx.cap(1).latin1() );
result.replace( idx, rx.matchedLength(), replacement );
idx += replacement.length();
}
@@ -1615,7 +1615,7 @@ QString KMMessage::replaceHeadersInString( const QString & s ) const {
KMMessage* KMMessage::createDeliveryReceipt() const
{
- QString str, receiptTo;
+ TQString str, receiptTo;
KMMessage *receipt;
receiptTo = headerField("Disposition-Notification-To");
@@ -1668,7 +1668,7 @@ void KMMessage::applyIdentity( uint id )
if (ident.isDefault())
removeHeaderField("X-KMail-Identity");
else
- setHeaderField("X-KMail-Identity", QString::number( ident.uoid() ));
+ setHeaderField("X-KMail-Identity", TQString::number( ident.uoid() ));
if ( ident.transport().isEmpty() )
removeHeaderField( "X-KMail-Transport" );
@@ -1676,17 +1676,17 @@ void KMMessage::applyIdentity( uint id )
setHeaderField( "X-KMail-Transport", ident.transport() );
if ( ident.fcc().isEmpty() )
- setFcc( QString::null );
+ setFcc( TQString::null );
else
setFcc( ident.fcc() );
if ( ident.drafts().isEmpty() )
- setDrafts( QString::null );
+ setDrafts( TQString::null );
else
setDrafts( ident.drafts() );
if ( ident.templates().isEmpty() )
- setTemplates( QString::null );
+ setTemplates( TQString::null );
else
setTemplates( ident.templates() );
@@ -1706,7 +1706,7 @@ void KMMessage::initHeader( uint id )
}
uint KMMessage::identityUoid() const {
- QString idString = headerField("X-KMail-Identity").stripWhiteSpace();
+ TQString idString = headerField("X-KMail-Identity").stripWhiteSpace();
bool ok = false;
int id = idString.toUInt( &ok );
@@ -1725,7 +1725,7 @@ void KMMessage::initFromMessage(const KMMessage *msg, bool idHeaders)
uint id = msg->identityUoid();
if ( idHeaders ) initHeader(id);
- else setHeaderField("X-KMail-Identity", QString::number(id));
+ else setHeaderField("X-KMail-Identity", TQString::number(id));
if (!msg->headerField("X-KMail-Transport").isEmpty())
setHeaderField("X-KMail-Transport", msg->headerField("X-KMail-Transport"));
}
@@ -1775,7 +1775,7 @@ void KMMessage::setAutomaticFields(bool aIsMulti)
//-----------------------------------------------------------------------------
-QString KMMessage::dateStr() const
+TQString KMMessage::dateStr() const
{
KConfigGroup general( KMKernel::config(), "General" );
DwHeaders& header = mMsg->Headers();
@@ -1793,7 +1793,7 @@ QString KMMessage::dateStr() const
//-----------------------------------------------------------------------------
-QCString KMMessage::dateShortStr() const
+TQCString KMMessage::dateShortStr() const
{
DwHeaders& header = mMsg->Headers();
time_t unixTime;
@@ -1801,7 +1801,7 @@ QCString KMMessage::dateShortStr() const
if (!header.HasDate()) return "";
unixTime = header.Date().AsUnixTime();
- QCString result = ctime(&unixTime);
+ TQCString result = ctime(&unixTime);
int len = result.length();
if (result[len-1]=='\n')
result.truncate(len-1);
@@ -1811,7 +1811,7 @@ QCString KMMessage::dateShortStr() const
//-----------------------------------------------------------------------------
-QString KMMessage::dateIsoStr() const
+TQString KMMessage::dateIsoStr() const
{
DwHeaders& header = mMsg->Headers();
time_t unixTime;
@@ -1821,7 +1821,7 @@ QString KMMessage::dateIsoStr() const
char cstr[64];
strftime(cstr, 63, "%Y-%m-%d %H:%M:%S", localtime(&unixTime));
- return QString(cstr);
+ return TQString(cstr);
}
@@ -1857,7 +1857,7 @@ void KMMessage::setDate(time_t aDate)
//-----------------------------------------------------------------------------
-void KMMessage::setDate(const QCString& aStr)
+void KMMessage::setDate(const TQCString& aStr)
{
DwHeaders& header = mMsg->Headers();
@@ -1872,12 +1872,12 @@ void KMMessage::setDate(const QCString& aStr)
//-----------------------------------------------------------------------------
-QString KMMessage::to() const
+TQString KMMessage::to() const
{
// handle To same as Cc below, bug 80747
- QValueList<QCString> rawHeaders = rawHeaderFields( "To" );
- QStringList headers;
- for ( QValueList<QCString>::Iterator it = rawHeaders.begin(); it != rawHeaders.end(); ++it ) {
+ TQValueList<TQCString> rawHeaders = rawHeaderFields( "To" );
+ TQStringList headers;
+ for ( TQValueList<TQCString>::Iterator it = rawHeaders.begin(); it != rawHeaders.end(); ++it ) {
headers << *it;
}
return KPIM::normalizeAddressesAndDecodeIDNs( headers.join( ", " ) );
@@ -1885,26 +1885,26 @@ QString KMMessage::to() const
//-----------------------------------------------------------------------------
-void KMMessage::setTo(const QString& aStr)
+void KMMessage::setTo(const TQString& aStr)
{
setHeaderField( "To", aStr, Address );
}
//-----------------------------------------------------------------------------
-QString KMMessage::toStrip() const
+TQString KMMessage::toStrip() const
{
return stripEmailAddr( to() );
}
//-----------------------------------------------------------------------------
-QString KMMessage::replyTo() const
+TQString KMMessage::replyTo() const
{
return KPIM::normalizeAddressesAndDecodeIDNs( rawHeaderField("Reply-To") );
}
//-----------------------------------------------------------------------------
-void KMMessage::setReplyTo(const QString& aStr)
+void KMMessage::setReplyTo(const TQString& aStr)
{
setHeaderField( "Reply-To", aStr, Address );
}
@@ -1918,13 +1918,13 @@ void KMMessage::setReplyTo(KMMessage* aMsg)
//-----------------------------------------------------------------------------
-QString KMMessage::cc() const
+TQString KMMessage::cc() const
{
// get the combined contents of all Cc headers (as workaround for invalid
// messages with multiple Cc headers)
- QValueList<QCString> rawHeaders = rawHeaderFields( "Cc" );
- QStringList headers;
- for ( QValueList<QCString>::Iterator it = rawHeaders.begin(); it != rawHeaders.end(); ++it ) {
+ TQValueList<TQCString> rawHeaders = rawHeaderFields( "Cc" );
+ TQStringList headers;
+ for ( TQValueList<TQCString>::Iterator it = rawHeaders.begin(); it != rawHeaders.end(); ++it ) {
headers << *it;
}
return KPIM::normalizeAddressesAndDecodeIDNs( headers.join( ", " ) );
@@ -1932,59 +1932,59 @@ QString KMMessage::cc() const
//-----------------------------------------------------------------------------
-void KMMessage::setCc(const QString& aStr)
+void KMMessage::setCc(const TQString& aStr)
{
setHeaderField( "Cc", aStr, Address );
}
//-----------------------------------------------------------------------------
-QString KMMessage::ccStrip() const
+TQString KMMessage::ccStrip() const
{
return stripEmailAddr( cc() );
}
//-----------------------------------------------------------------------------
-QString KMMessage::bcc() const
+TQString KMMessage::bcc() const
{
return KPIM::normalizeAddressesAndDecodeIDNs( rawHeaderField("Bcc") );
}
//-----------------------------------------------------------------------------
-void KMMessage::setBcc(const QString& aStr)
+void KMMessage::setBcc(const TQString& aStr)
{
setHeaderField( "Bcc", aStr, Address );
}
//-----------------------------------------------------------------------------
-QString KMMessage::fcc() const
+TQString KMMessage::fcc() const
{
return headerField( "X-KMail-Fcc" );
}
//-----------------------------------------------------------------------------
-void KMMessage::setFcc( const QString &aStr )
+void KMMessage::setFcc( const TQString &aStr )
{
setHeaderField( "X-KMail-Fcc", aStr );
}
//-----------------------------------------------------------------------------
-void KMMessage::setDrafts( const QString &aStr )
+void KMMessage::setDrafts( const TQString &aStr )
{
mDrafts = aStr;
}
//-----------------------------------------------------------------------------
-void KMMessage::setTemplates( const QString &aStr )
+void KMMessage::setTemplates( const TQString &aStr )
{
mTemplates = aStr;
}
//-----------------------------------------------------------------------------
-QString KMMessage::who() const
+TQString KMMessage::who() const
{
if (mParent)
return KPIM::normalizeAddressesAndDecodeIDNs( rawHeaderField(mParent->whoField().utf8()) );
@@ -1993,16 +1993,16 @@ QString KMMessage::who() const
//-----------------------------------------------------------------------------
-QString KMMessage::from() const
+TQString KMMessage::from() const
{
return KPIM::normalizeAddressesAndDecodeIDNs( rawHeaderField("From") );
}
//-----------------------------------------------------------------------------
-void KMMessage::setFrom(const QString& bStr)
+void KMMessage::setFrom(const TQString& bStr)
{
- QString aStr = bStr;
+ TQString aStr = bStr;
if (aStr.isNull())
aStr = "";
setHeaderField( "From", aStr, Address );
@@ -2011,30 +2011,30 @@ void KMMessage::setFrom(const QString& bStr)
//-----------------------------------------------------------------------------
-QString KMMessage::fromStrip() const
+TQString KMMessage::fromStrip() const
{
return stripEmailAddr( from() );
}
//-----------------------------------------------------------------------------
-QString KMMessage::sender() const {
+TQString KMMessage::sender() const {
AddrSpecList asl = extractAddrSpecs( "Sender" );
if ( asl.empty() )
asl = extractAddrSpecs( "From" );
if ( asl.empty() )
- return QString::null;
+ return TQString::null;
return asl.front().asString();
}
//-----------------------------------------------------------------------------
-QString KMMessage::subject() const
+TQString KMMessage::subject() const
{
return headerField("Subject");
}
//-----------------------------------------------------------------------------
-void KMMessage::setSubject(const QString& aStr)
+void KMMessage::setSubject(const TQString& aStr)
{
setHeaderField("Subject",aStr);
mDirty = true;
@@ -2042,14 +2042,14 @@ void KMMessage::setSubject(const QString& aStr)
//-----------------------------------------------------------------------------
-QString KMMessage::xmark() const
+TQString KMMessage::xmark() const
{
return headerField("X-KMail-Mark");
}
//-----------------------------------------------------------------------------
-void KMMessage::setXMark(const QString& aStr)
+void KMMessage::setXMark(const TQString& aStr)
{
setHeaderField("X-KMail-Mark", aStr);
mDirty = true;
@@ -2057,10 +2057,10 @@ void KMMessage::setXMark(const QString& aStr)
//-----------------------------------------------------------------------------
-QString KMMessage::replyToId() const
+TQString KMMessage::replyToId() const
{
int leftAngle, rightAngle;
- QString replyTo, references;
+ TQString replyTo, references;
replyTo = headerField("In-Reply-To");
// search the end of the (first) message id in the In-Reply-To header
@@ -2098,15 +2098,15 @@ QString KMMessage::replyToId() const
//-----------------------------------------------------------------------------
-QString KMMessage::replyToIdMD5() const {
+TQString KMMessage::replyToIdMD5() const {
return base64EncodedMD5( replyToId() );
}
//-----------------------------------------------------------------------------
-QString KMMessage::references() const
+TQString KMMessage::references() const
{
int leftAngle, rightAngle;
- QString references = headerField( "References" );
+ TQString references = headerField( "References" );
// keep the last two entries for threading
leftAngle = references.findRev( '<' );
@@ -2120,13 +2120,13 @@ QString KMMessage::references() const
if( !references.isEmpty() && references[0] == '<' )
return references;
else
- return QString::null;
+ return TQString::null;
}
//-----------------------------------------------------------------------------
-QString KMMessage::replyToAuxIdMD5() const
+TQString KMMessage::replyToAuxIdMD5() const
{
- QString result = references();
+ TQString result = references();
// references contains two items, use the first one
// (the second to last reference)
const int rightAngle = result.find( '>' );
@@ -2137,12 +2137,12 @@ QString KMMessage::replyToAuxIdMD5() const
}
//-----------------------------------------------------------------------------
-QString KMMessage::strippedSubjectMD5() const {
+TQString KMMessage::strippedSubjectMD5() const {
return base64EncodedMD5( stripOffPrefixes( subject() ), true /*utf8*/ );
}
//-----------------------------------------------------------------------------
-QString KMMessage::subjectMD5() const {
+TQString KMMessage::subjectMD5() const {
return base64EncodedMD5( subject(), true /*utf8*/ );
}
@@ -2152,7 +2152,7 @@ bool KMMessage::subjectIsPrefixed() const {
}
//-----------------------------------------------------------------------------
-void KMMessage::setReplyToId(const QString& aStr)
+void KMMessage::setReplyToId(const TQString& aStr)
{
setHeaderField("In-Reply-To", aStr);
mDirty = true;
@@ -2160,9 +2160,9 @@ void KMMessage::setReplyToId(const QString& aStr)
//-----------------------------------------------------------------------------
-QString KMMessage::msgId() const
+TQString KMMessage::msgId() const
{
- QString msgId = headerField("Message-Id");
+ TQString msgId = headerField("Message-Id");
// search the end of the message id
const int rightAngle = msgId.find( '>' );
@@ -2177,13 +2177,13 @@ QString KMMessage::msgId() const
//-----------------------------------------------------------------------------
-QString KMMessage::msgIdMD5() const {
+TQString KMMessage::msgIdMD5() const {
return base64EncodedMD5( msgId() );
}
//-----------------------------------------------------------------------------
-void KMMessage::setMsgId(const QString& aStr)
+void KMMessage::setMsgId(const TQString& aStr)
{
setHeaderField("Message-Id", aStr);
mDirty = true;
@@ -2198,7 +2198,7 @@ size_t KMMessage::msgSizeServer() const {
//-----------------------------------------------------------------------------
void KMMessage::setMsgSizeServer(size_t size)
{
- setHeaderField("X-Length", QCString().setNum(size));
+ setHeaderField("X-Length", TQCString().setNum(size));
mDirty = true;
}
@@ -2211,12 +2211,12 @@ ulong KMMessage::UID() const {
//-----------------------------------------------------------------------------
void KMMessage::setUID(ulong uid)
{
- setHeaderField("X-UID", QCString().setNum(uid));
+ setHeaderField("X-UID", TQCString().setNum(uid));
mDirty = true;
}
//-----------------------------------------------------------------------------
-AddressList KMMessage::splitAddrField( const QCString & str )
+AddressList KMMessage::splitAddrField( const TQCString & str )
{
AddressList result;
const char * scursor = str.begin();
@@ -2229,11 +2229,11 @@ AddressList KMMessage::splitAddrField( const QCString & str )
return result;
}
-AddressList KMMessage::headerAddrField( const QCString & aName ) const {
+AddressList KMMessage::headerAddrField( const TQCString & aName ) const {
return KMMessage::splitAddrField( rawHeaderField( aName ) );
}
-AddrSpecList KMMessage::extractAddrSpecs( const QCString & header ) const {
+AddrSpecList KMMessage::extractAddrSpecs( const TQCString & header ) const {
AddressList al = headerAddrField( header );
AddrSpecList result;
for ( AddressList::const_iterator ait = al.begin() ; ait != al.end() ; ++ait )
@@ -2242,24 +2242,24 @@ AddrSpecList KMMessage::extractAddrSpecs( const QCString & header ) const {
return result;
}
-QCString KMMessage::rawHeaderField( const QCString & name ) const {
- if ( name.isEmpty() ) return QCString();
+TQCString KMMessage::rawHeaderField( const TQCString & name ) const {
+ if ( name.isEmpty() ) return TQCString();
DwHeaders & header = mMsg->Headers();
DwField * field = header.FindField( name );
- if ( !field ) return QCString();
+ if ( !field ) return TQCString();
return header.FieldBody( name.data() ).AsString().c_str();
}
-QValueList<QCString> KMMessage::rawHeaderFields( const QCString& field ) const
+TQValueList<TQCString> KMMessage::rawHeaderFields( const TQCString& field ) const
{
if ( field.isEmpty() || !mMsg->Headers().FindField( field ) )
- return QValueList<QCString>();
+ return TQValueList<TQCString>();
std::vector<DwFieldBody*> v = mMsg->Headers().AllFieldBodies( field.data() );
- QValueList<QCString> headerFields;
+ TQValueList<TQCString> headerFields;
for ( uint i = 0; i < v.size(); ++i ) {
headerFields.append( v[i]->AsString().c_str() );
}
@@ -2267,26 +2267,26 @@ QValueList<QCString> KMMessage::rawHeaderFields( const QCString& field ) const
return headerFields;
}
-QString KMMessage::headerField(const QCString& aName) const
+TQString KMMessage::headerField(const TQCString& aName) const
{
if ( aName.isEmpty() )
- return QString::null;
+ return TQString::null;
if ( !mMsg->Headers().FindField( aName ) )
- return QString::null;
+ return TQString::null;
return decodeRFC2047String( mMsg->Headers().FieldBody( aName.data() ).AsString().c_str(),
charset() );
}
-QStringList KMMessage::headerFields( const QCString& field ) const
+TQStringList KMMessage::headerFields( const TQCString& field ) const
{
if ( field.isEmpty() || !mMsg->Headers().FindField( field ) )
- return QStringList();
+ return TQStringList();
std::vector<DwFieldBody*> v = mMsg->Headers().AllFieldBodies( field.data() );
- QStringList headerFields;
+ TQStringList headerFields;
for ( uint i = 0; i < v.size(); ++i ) {
headerFields.append( decodeRFC2047String( v[i]->AsString().c_str(), charset() ) );
}
@@ -2295,7 +2295,7 @@ QStringList KMMessage::headerFields( const QCString& field ) const
}
//-----------------------------------------------------------------------------
-void KMMessage::removeHeaderField(const QCString& aName)
+void KMMessage::removeHeaderField(const TQCString& aName)
{
DwHeaders & header = mMsg->Headers();
DwField * field = header.FindField(aName);
@@ -2306,7 +2306,7 @@ void KMMessage::removeHeaderField(const QCString& aName)
}
//-----------------------------------------------------------------------------
-void KMMessage::removeHeaderFields(const QCString& aName)
+void KMMessage::removeHeaderFields(const TQCString& aName)
{
DwHeaders & header = mMsg->Headers();
while ( DwField * field = header.FindField(aName) ) {
@@ -2317,7 +2317,7 @@ void KMMessage::removeHeaderFields(const QCString& aName)
//-----------------------------------------------------------------------------
-void KMMessage::setHeaderField( const QCString& aName, const QString& bValue,
+void KMMessage::setHeaderField( const TQCString& aName, const TQString& bValue,
HeaderFieldType type, bool prepend )
{
#if 0
@@ -2331,17 +2331,17 @@ void KMMessage::setHeaderField( const QCString& aName, const QString& bValue,
DwString str;
DwField* field;
- QCString aValue;
+ TQCString aValue;
if (!bValue.isEmpty())
{
- QString value = bValue;
+ TQString value = bValue;
if ( type == Address )
value = KPIM::normalizeAddressesAndEncodeIDNs( value );
#if 0
if ( type != Unstructured )
kdDebug(5006) << "value: \"" << value << "\"" << endl;
#endif
- QCString encoding = autoDetectCharset( charset(), sPrefCharsets, value );
+ TQCString encoding = autoDetectCharset( charset(), sPrefCharsets, value );
if (encoding.isEmpty())
encoding = "utf-8";
aValue = encodeRFC2047String( value, encoding );
@@ -2369,7 +2369,7 @@ void KMMessage::setHeaderField( const QCString& aName, const QString& bValue,
//-----------------------------------------------------------------------------
-QCString KMMessage::typeStr() const
+TQCString KMMessage::typeStr() const
{
DwHeaders& header = mMsg->Headers();
if (header.HasContentType()) return header.ContentType().TypeStr().c_str();
@@ -2387,7 +2387,7 @@ int KMMessage::type() const
//-----------------------------------------------------------------------------
-void KMMessage::setTypeStr(const QCString& aStr)
+void KMMessage::setTypeStr(const TQCString& aStr)
{
dwContentType().SetTypeStr(DwString(aStr));
dwContentType().Parse();
@@ -2406,7 +2406,7 @@ void KMMessage::setType(int aType)
//-----------------------------------------------------------------------------
-QCString KMMessage::subtypeStr() const
+TQCString KMMessage::subtypeStr() const
{
DwHeaders& header = mMsg->Headers();
if (header.HasContentType()) return header.ContentType().SubtypeStr().c_str();
@@ -2424,7 +2424,7 @@ int KMMessage::subtype() const
//-----------------------------------------------------------------------------
-void KMMessage::setSubtypeStr(const QCString& aStr)
+void KMMessage::setSubtypeStr(const TQCString& aStr)
{
dwContentType().SetSubtypeStr(DwString(aStr));
dwContentType().Parse();
@@ -2443,8 +2443,8 @@ void KMMessage::setSubtype(int aSubtype)
//-----------------------------------------------------------------------------
void KMMessage::setDwMediaTypeParam( DwMediaType &mType,
- const QCString& attr,
- const QCString& val )
+ const TQCString& attr,
+ const TQCString& val )
{
mType.Parse();
DwParameter *param = mType.FirstParameter();
@@ -2467,7 +2467,7 @@ void KMMessage::setDwMediaTypeParam( DwMediaType &mType,
//-----------------------------------------------------------------------------
-void KMMessage::setContentTypeParam(const QCString& attr, const QCString& val)
+void KMMessage::setContentTypeParam(const TQCString& attr, const TQCString& val)
{
if (mNeedsAssembly) mMsg->Assemble();
mNeedsAssembly = false;
@@ -2477,7 +2477,7 @@ void KMMessage::setContentTypeParam(const QCString& attr, const QCString& val)
//-----------------------------------------------------------------------------
-QCString KMMessage::contentTransferEncodingStr() const
+TQCString KMMessage::contentTransferEncodingStr() const
{
DwHeaders& header = mMsg->Headers();
if (header.HasContentTransferEncoding())
@@ -2497,7 +2497,7 @@ int KMMessage::contentTransferEncoding() const
//-----------------------------------------------------------------------------
-void KMMessage::setContentTransferEncodingStr(const QCString& aStr)
+void KMMessage::setContentTransferEncodingStr(const TQCString& aStr)
{
mMsg->Headers().ContentTransferEncoding().FromString(aStr);
mMsg->Headers().ContentTransferEncoding().Parse();
@@ -2528,10 +2528,10 @@ void KMMessage::setNeedsAssembly()
//-----------------------------------------------------------------------------
-QCString KMMessage::body() const
+TQCString KMMessage::body() const
{
const DwString& body = mMsg->Body().AsString();
- QCString str = KMail::Util::CString( body );
+ TQCString str = KMail::Util::CString( body );
// Calls length() -> slow
//kdWarning( str.length() != body.length(), 5006 )
// << "KMMessage::body(): body is binary but used as text!" << endl;
@@ -2540,7 +2540,7 @@ QCString KMMessage::body() const
//-----------------------------------------------------------------------------
-QByteArray KMMessage::bodyDecodedBinary() const
+TQByteArray KMMessage::bodyDecodedBinary() const
{
DwString dwstr;
const DwString& dwsrc = mMsg->Body().AsString();
@@ -2559,14 +2559,14 @@ QByteArray KMMessage::bodyDecodedBinary() const
}
int len = dwstr.size();
- QByteArray ba(len);
+ TQByteArray ba(len);
memcpy(ba.data(),dwstr.data(),len);
return ba;
}
//-----------------------------------------------------------------------------
-QCString KMMessage::bodyDecoded() const
+TQCString KMMessage::bodyDecoded() const
{
DwString dwstr;
DwString dwsrc = mMsg->Body().AsString();
@@ -2586,8 +2586,8 @@ QCString KMMessage::bodyDecoded() const
return KMail::Util::CString( dwstr );
- // Calling QCString::length() is slow
- //QCString result = KMail::Util::CString( dwstr );
+ // Calling TQCString::length() is slow
+ //TQCString result = KMail::Util::CString( dwstr );
//kdWarning(result.length() != len, 5006)
// << "KMMessage::bodyDecoded(): body is binary but used as text!" << endl;
//return result;
@@ -2595,11 +2595,11 @@ QCString KMMessage::bodyDecoded() const
//-----------------------------------------------------------------------------
-QValueList<int> KMMessage::determineAllowedCtes( const CharFreq& cf,
+TQValueList<int> KMMessage::determineAllowedCtes( const CharFreq& cf,
bool allow8Bit,
bool willBeSigned )
{
- QValueList<int> allowedCtes;
+ TQValueList<int> allowedCtes;
switch ( cf.type() ) {
case CharFreq::SevenBitText:
@@ -2643,8 +2643,8 @@ QValueList<int> KMMessage::determineAllowedCtes( const CharFreq& cf,
//-----------------------------------------------------------------------------
-void KMMessage::setBodyAndGuessCte( const QByteArray& aBuf,
- QValueList<int> & allowedCte,
+void KMMessage::setBodyAndGuessCte( const TQByteArray& aBuf,
+ TQValueList<int> & allowedCte,
bool allow8Bit,
bool willBeSigned )
{
@@ -2666,8 +2666,8 @@ void KMMessage::setBodyAndGuessCte( const QByteArray& aBuf,
//-----------------------------------------------------------------------------
-void KMMessage::setBodyAndGuessCte( const QCString& aBuf,
- QValueList<int> & allowedCte,
+void KMMessage::setBodyAndGuessCte( const TQCString& aBuf,
+ TQValueList<int> & allowedCte,
bool allow8Bit,
bool willBeSigned )
{
@@ -2689,7 +2689,7 @@ void KMMessage::setBodyAndGuessCte( const QCString& aBuf,
//-----------------------------------------------------------------------------
-void KMMessage::setBodyEncoded(const QCString& aStr)
+void KMMessage::setBodyEncoded(const TQCString& aStr)
{
DwString dwSrc(aStr.data(), aStr.size()-1 /* not the trailing NUL */);
DwString dwResult;
@@ -2712,7 +2712,7 @@ void KMMessage::setBodyEncoded(const QCString& aStr)
}
//-----------------------------------------------------------------------------
-void KMMessage::setBodyEncodedBinary(const QByteArray& aStr)
+void KMMessage::setBodyEncodedBinary(const TQByteArray& aStr)
{
DwString dwSrc(aStr.data(), aStr.size());
DwString dwResult;
@@ -2736,7 +2736,7 @@ void KMMessage::setBodyEncodedBinary(const QByteArray& aStr)
//-----------------------------------------------------------------------------
-void KMMessage::setBody(const QCString& aStr)
+void KMMessage::setBody(const TQCString& aStr)
{
mMsg->Body().FromString(KMail::Util::dwString(aStr));
mNeedsAssembly = true;
@@ -2752,7 +2752,7 @@ void KMMessage::setBody(const char* aStr)
mNeedsAssembly = true;
}
-void KMMessage::setMultiPartBody( const QCString & aStr ) {
+void KMMessage::setMultiPartBody( const TQCString & aStr ) {
setBody( aStr );
mMsg->Body().Parse();
mNeedsAssembly = true;
@@ -2771,7 +2771,7 @@ int KMMessage::numBodyParts() const
{
int count = 0;
DwBodyPart* part = getFirstDwBodyPart();
- QPtrList< DwBodyPart > parts;
+ TQPtrList< DwBodyPart > parts;
while (part)
{
@@ -2819,7 +2819,7 @@ DwBodyPart * KMMessage::getFirstDwBodyPart() const
int KMMessage::partNumber( DwBodyPart * aDwBodyPart ) const
{
DwBodyPart *curpart;
- QPtrList< DwBodyPart > parts;
+ TQPtrList< DwBodyPart > parts;
int curIdx = 0;
int idx = 0;
// Get the DwBodyPart for this index
@@ -2859,7 +2859,7 @@ int KMMessage::partNumber( DwBodyPart * aDwBodyPart ) const
DwBodyPart * KMMessage::dwBodyPart( int aIdx ) const
{
DwBodyPart *part, *curpart;
- QPtrList< DwBodyPart > parts;
+ TQPtrList< DwBodyPart > parts;
int curIdx = 0;
// Get the DwBodyPart for this index
@@ -2899,7 +2899,7 @@ DwBodyPart * KMMessage::dwBodyPart( int aIdx ) const
DwBodyPart * KMMessage::findDwBodyPart( int type, int subtype ) const
{
DwBodyPart *part, *curpart;
- QPtrList< DwBodyPart > parts;
+ TQPtrList< DwBodyPart > parts;
// Get the DwBodyPart for this index
curpart = getFirstDwBodyPart();
@@ -2945,10 +2945,10 @@ DwBodyPart * KMMessage::findDwBodyPart( int type, int subtype ) const
}
//-----------------------------------------------------------------------------
-DwBodyPart * KMMessage::findDwBodyPart( const QCString& type, const QCString& subtype ) const
+DwBodyPart * KMMessage::findDwBodyPart( const TQCString& type, const TQCString& subtype ) const
{
DwBodyPart *part, *curpart;
- QPtrList< DwBodyPart > parts;
+ TQPtrList< DwBodyPart > parts;
// Get the DwBodyPart for this index
curpart = getFirstDwBodyPart();
@@ -3006,7 +3006,7 @@ void applyHeadersToMessagePart( DwHeaders& headers, KMMessagePart* aPart )
// KMMsgPart::fileName; Name however is decoded here and stored as a
// decoded String in KMMsgPart...
// Content-type
- QCString additionalCTypeParams;
+ TQCString additionalCTypeParams;
if (headers.HasContentType())
{
DwMediaType& ct = headers.ContentType();
@@ -3017,7 +3017,7 @@ void applyHeadersToMessagePart( DwHeaders& headers, KMMessagePart* aPart )
while(param)
{
if (!qstricmp(param->Attribute().c_str(), "charset"))
- aPart->setCharset(QCString(param->Value().c_str()).lower());
+ aPart->setCharset(TQCString(param->Value().c_str()).lower());
else if (!qstrnicmp(param->Attribute().c_str(), "name*", 5))
aPart->setName(KMMsgBase::decodeRFC2231String(KMMsgBase::extractRFC2231HeaderField( param->Value().c_str(), "name" )));
else {
@@ -3078,7 +3078,7 @@ void KMMessage::bodyPart(DwBodyPart* aDwBodyPart, KMMessagePart* aPart,
// spurious empty Subject: line in some of the parts.
//aPart->setName(" ");
// partSpecifier
- QString partId( aDwBodyPart->partId() );
+ TQString partId( aDwBodyPart->partId() );
aPart->setPartSpecifier( partId );
DwHeaders& headers = aDwBodyPart->Headers();
@@ -3088,11 +3088,11 @@ void KMMessage::bodyPart(DwBodyPart* aDwBodyPart, KMMessagePart* aPart,
if (withBody)
aPart->setBody( aDwBodyPart->Body().AsString() );
else
- aPart->setBody( QCString("") );
+ aPart->setBody( TQCString("") );
// Content-id
if ( headers.HasContentId() ) {
- const QCString contentId = headers.ContentId().AsString().c_str();
+ const TQCString contentId = headers.ContentId().AsString().c_str();
// ignore leading '<' and trailing '>'
aPart->setContentId( contentId.mid( 1, contentId.length() - 2 ) );
}
@@ -3109,7 +3109,7 @@ void KMMessage::bodyPart(DwBodyPart* aDwBodyPart, KMMessagePart* aPart,
//aPart->setName(" ");
aPart->setContentDescription("");
aPart->setContentDisposition("");
- aPart->setBody(QCString(""));
+ aPart->setBody(TQCString(""));
aPart->setContentId("");
}
}
@@ -3144,17 +3144,17 @@ DwBodyPart* KMMessage::createDWBodyPart(const KMMessagePart* aPart)
if ( !aPart )
return part;
- QCString charset = aPart->charset();
- QCString type = aPart->typeStr();
- QCString subtype = aPart->subtypeStr();
- QCString cte = aPart->cteStr();
- QCString contDesc = aPart->contentDescriptionEncoded();
- QCString contDisp = aPart->contentDisposition();
- QCString encoding = autoDetectCharset(charset, sPrefCharsets, aPart->name());
+ TQCString charset = aPart->charset();
+ TQCString type = aPart->typeStr();
+ TQCString subtype = aPart->subtypeStr();
+ TQCString cte = aPart->cteStr();
+ TQCString contDesc = aPart->contentDescriptionEncoded();
+ TQCString contDisp = aPart->contentDisposition();
+ TQCString encoding = autoDetectCharset(charset, sPrefCharsets, aPart->name());
if (encoding.isEmpty()) encoding = "utf-8";
- QCString name = KMMsgBase::encodeRFC2231String(aPart->name(), encoding);
- bool RFC2231encoded = aPart->name() != QString(name);
- QCString paramAttr = aPart->parameterAttribute();
+ TQCString name = KMMsgBase::encodeRFC2231String(aPart->name(), encoding);
+ bool RFC2231encoded = aPart->name() != TQString(name);
+ TQCString paramAttr = aPart->parameterAttribute();
DwHeaders& headers = part->Headers();
@@ -3172,10 +3172,10 @@ DwBodyPart* KMMessage::createDWBodyPart(const KMMessagePart* aPart)
}
}
- QCString additionalParam = aPart->additionalCTypeParamStr();
+ TQCString additionalParam = aPart->additionalCTypeParamStr();
if( !additionalParam.isEmpty() )
{
- QCString parAV;
+ TQCString parAV;
DwString parA, parV;
int iL, i1, i2, iM;
iL = additionalParam.length();
@@ -3229,14 +3229,14 @@ DwBodyPart* KMMessage::createDWBodyPart(const KMMessagePart* aPart)
if (!paramAttr.isEmpty())
{
- QCString encoding = autoDetectCharset(charset, sPrefCharsets,
+ TQCString encoding = autoDetectCharset(charset, sPrefCharsets,
aPart->parameterValue());
if (encoding.isEmpty()) encoding = "utf-8";
- QCString paramValue;
+ TQCString paramValue;
paramValue = KMMsgBase::encodeRFC2231String(aPart->parameterValue(),
encoding);
DwParameter *param = new DwParameter;
- if (aPart->parameterValue() != QString(paramValue))
+ if (aPart->parameterValue() != TQString(paramValue))
{
param->SetAttribute((paramAttr + '*').data());
param->SetValue(paramValue.data(),true);
@@ -3289,14 +3289,14 @@ void KMMessage::addBodyPart(const KMMessagePart* aPart)
//-----------------------------------------------------------------------------
-QString KMMessage::generateMessageId( const QString& addr )
+TQString KMMessage::generateMessageId( const TQString& addr )
{
- QDateTime datetime = QDateTime::currentDateTime();
- QString msgIdStr;
+ TQDateTime datetime = TQDateTime::currentDateTime();
+ TQString msgIdStr;
msgIdStr = '<' + datetime.toString( "yyyyMMddhhmm.sszzz" );
- QString msgIdSuffix;
+ TQString msgIdSuffix;
KConfigGroup general( KMKernel::config(), "General" );
if( general.readBoolEntry( "useCustomMessageIdSuffix", false ) )
@@ -3314,12 +3314,12 @@ QString KMMessage::generateMessageId( const QString& addr )
//-----------------------------------------------------------------------------
-QCString KMMessage::html2source( const QCString & src )
+TQCString KMMessage::html2source( const TQCString & src )
{
- QCString result( 1 + 6*(src.size()-1) ); // maximal possible length
+ TQCString result( 1 + 6*(src.size()-1) ); // maximal possible length
- QCString::ConstIterator s = src.begin();
- QCString::Iterator d = result.begin();
+ TQCString::ConstIterator s = src.begin();
+ TQCString::Iterator d = result.begin();
while ( *s ) {
switch ( *s ) {
case '<': {
@@ -3387,10 +3387,10 @@ QCString KMMessage::html2source( const QCString & src )
}
//-----------------------------------------------------------------------------
-QString KMMessage::encodeMailtoUrl( const QString& str )
+TQString KMMessage::encodeMailtoUrl( const TQString& str )
{
- QString result;
- result = QString::fromLatin1( KMMsgBase::encodeRFC2047String( str,
+ TQString result;
+ result = TQString::fromLatin1( KMMsgBase::encodeRFC2047String( str,
"utf-8" ) );
result = KURL::encode_string( result );
return result;
@@ -3398,9 +3398,9 @@ QString KMMessage::encodeMailtoUrl( const QString& str )
//-----------------------------------------------------------------------------
-QString KMMessage::decodeMailtoUrl( const QString& url )
+TQString KMMessage::decodeMailtoUrl( const TQString& url )
{
- QString result;
+ TQString result;
result = KURL::decode_string( url );
result = KMMsgBase::decodeRFC2047String( result.latin1() );
return result;
@@ -3408,22 +3408,22 @@ QString KMMessage::decodeMailtoUrl( const QString& url )
//-----------------------------------------------------------------------------
-QCString KMMessage::stripEmailAddr( const QCString& aStr )
+TQCString KMMessage::stripEmailAddr( const TQCString& aStr )
{
//kdDebug(5006) << "KMMessage::stripEmailAddr( " << aStr << " )" << endl;
if ( aStr.isEmpty() )
- return QCString();
+ return TQCString();
- QCString result;
+ TQCString result;
// The following is a primitive parser for a mailbox-list (cf. RFC 2822).
// The purpose is to extract a displayable string from the mailboxes.
// Comments in the addr-spec are not handled. No error checking is done.
- QCString name;
- QCString comment;
- QCString angleAddress;
+ TQCString name;
+ TQCString comment;
+ TQCString angleAddress;
enum { TopLevel, InComment, InAngleAddress } context = TopLevel;
bool inQuotedString = false;
int commentLevel = 0;
@@ -3481,9 +3481,9 @@ QCString KMMessage::stripEmailAddr( const QCString& aStr )
else if ( !angleAddress.isEmpty() ) {
result += angleAddress;
}
- name = QCString();
- comment = QCString();
- angleAddress = QCString();
+ name = TQCString();
+ comment = TQCString();
+ angleAddress = TQCString();
}
else
name += *p;
@@ -3567,27 +3567,27 @@ QCString KMMessage::stripEmailAddr( const QCString& aStr )
}
//-----------------------------------------------------------------------------
-QString KMMessage::stripEmailAddr( const QString& aStr )
+TQString KMMessage::stripEmailAddr( const TQString& aStr )
{
//kdDebug(5006) << "KMMessage::stripEmailAddr( " << aStr << " )" << endl;
if ( aStr.isEmpty() )
- return QString::null;
+ return TQString::null;
- QString result;
+ TQString result;
// The following is a primitive parser for a mailbox-list (cf. RFC 2822).
// The purpose is to extract a displayable string from the mailboxes.
// Comments in the addr-spec are not handled. No error checking is done.
- QString name;
- QString comment;
- QString angleAddress;
+ TQString name;
+ TQString comment;
+ TQString angleAddress;
enum { TopLevel, InComment, InAngleAddress } context = TopLevel;
bool inQuotedString = false;
int commentLevel = 0;
- QChar ch;
+ TQChar ch;
unsigned int strLength(aStr.length());
for ( uint index = 0; index < strLength; ++index ) {
ch = aStr[index];
@@ -3643,9 +3643,9 @@ QString KMMessage::stripEmailAddr( const QString& aStr )
else if ( !angleAddress.isEmpty() ) {
result += angleAddress;
}
- name = QString::null;
- comment = QString::null;
- angleAddress = QString::null;
+ name = TQString::null;
+ comment = TQString::null;
+ angleAddress = TQString::null;
}
else
name += ch;
@@ -3729,9 +3729,9 @@ QString KMMessage::stripEmailAddr( const QString& aStr )
}
//-----------------------------------------------------------------------------
-QString KMMessage::quoteHtmlChars( const QString& str, bool removeLineBreaks )
+TQString KMMessage::quoteHtmlChars( const TQString& str, bool removeLineBreaks )
{
- QString result;
+ TQString result;
unsigned int strLength(str.length());
result.reserve( 6*strLength ); // maximal possible length
@@ -3765,20 +3765,20 @@ QString KMMessage::quoteHtmlChars( const QString& str, bool removeLineBreaks )
}
//-----------------------------------------------------------------------------
-QString KMMessage::emailAddrAsAnchor(const QString& aEmail, bool stripped, const QString& cssStyle, bool aLink)
+TQString KMMessage::emailAddrAsAnchor(const TQString& aEmail, bool stripped, const TQString& cssStyle, bool aLink)
{
if( aEmail.isEmpty() )
return aEmail;
- QStringList addressList = KPIM::splitEmailAddrList( aEmail );
+ TQStringList addressList = KPIM::splitEmailAddrList( aEmail );
- QString result;
+ TQString result;
- for( QStringList::ConstIterator it = addressList.begin();
+ for( TQStringList::ConstIterator it = addressList.begin();
( it != addressList.end() );
++it ) {
if( !(*it).isEmpty() ) {
- QString address = *it;
+ TQString address = *it;
if(aLink) {
result += "<a href=\"mailto:"
+ KMMessage::encodeMailtoUrl( address )
@@ -3803,12 +3803,12 @@ QString KMMessage::emailAddrAsAnchor(const QString& aEmail, bool stripped, const
//-----------------------------------------------------------------------------
//static
-QStringList KMMessage::stripAddressFromAddressList( const QString& address,
- const QStringList& list )
+TQStringList KMMessage::stripAddressFromAddressList( const TQString& address,
+ const TQStringList& list )
{
- QStringList addresses( list );
- QString addrSpec( KPIM::getEmailAddress( address ) );
- for ( QStringList::Iterator it = addresses.begin();
+ TQStringList addresses( list );
+ TQString addrSpec( KPIM::getEmailAddress( address ) );
+ for ( TQStringList::Iterator it = addresses.begin();
it != addresses.end(); ) {
if ( kasciistricmp( addrSpec.utf8().data(),
KPIM::getEmailAddress( *it ).utf8().data() ) == 0 ) {
@@ -3825,10 +3825,10 @@ QStringList KMMessage::stripAddressFromAddressList( const QString& address,
//-----------------------------------------------------------------------------
//static
-QStringList KMMessage::stripMyAddressesFromAddressList( const QStringList& list )
+TQStringList KMMessage::stripMyAddressesFromAddressList( const TQStringList& list )
{
- QStringList addresses = list;
- for( QStringList::Iterator it = addresses.begin();
+ TQStringList addresses = list;
+ for( TQStringList::Iterator it = addresses.begin();
it != addresses.end(); ) {
kdDebug(5006) << "Check whether " << *it << " is one of my addresses"
<< endl;
@@ -3846,11 +3846,11 @@ QStringList KMMessage::stripMyAddressesFromAddressList( const QStringList& list
//-----------------------------------------------------------------------------
//static
-bool KMMessage::addressIsInAddressList( const QString& address,
- const QStringList& addresses )
+bool KMMessage::addressIsInAddressList( const TQString& address,
+ const TQStringList& addresses )
{
- QString addrSpec = KPIM::getEmailAddress( address );
- for( QStringList::ConstIterator it = addresses.begin();
+ TQString addrSpec = KPIM::getEmailAddress( address );
+ for( TQStringList::ConstIterator it = addresses.begin();
it != addresses.end(); ++it ) {
if ( kasciistricmp( addrSpec.utf8().data(),
KPIM::getEmailAddress( *it ).utf8().data() ) == 0 )
@@ -3862,29 +3862,29 @@ bool KMMessage::addressIsInAddressList( const QString& address,
//-----------------------------------------------------------------------------
//static
-QString KMMessage::expandAliases( const QString& recipients )
+TQString KMMessage::expandAliases( const TQString& recipients )
{
if ( recipients.isEmpty() )
- return QString();
+ return TQString();
- QStringList recipientList = KPIM::splitEmailAddrList( recipients );
+ TQStringList recipientList = KPIM::splitEmailAddrList( recipients );
- QString expandedRecipients;
- for ( QStringList::Iterator it = recipientList.begin();
+ TQString expandedRecipients;
+ for ( TQStringList::Iterator it = recipientList.begin();
it != recipientList.end(); ++it ) {
if ( !expandedRecipients.isEmpty() )
expandedRecipients += ", ";
- QString receiver = (*it).stripWhiteSpace();
+ TQString receiver = (*it).stripWhiteSpace();
// try to expand distribution list
- QString expandedList = KAddrBookExternal::expandDistributionList( receiver );
+ TQString expandedList = KAddrBookExternal::expandDistributionList( receiver );
if ( !expandedList.isEmpty() ) {
expandedRecipients += expandedList;
continue;
}
// try to expand nick name
- QString expandedNickName = KabcBridge::expandNickName( receiver );
+ TQString expandedNickName = KabcBridge::expandNickName( receiver );
if ( !expandedNickName.isEmpty() ) {
expandedRecipients += expandedNickName;
continue;
@@ -3894,7 +3894,7 @@ QString KMMessage::expandAliases( const QString& recipients )
// FIXME: looking for '@' might be wrong
if ( receiver.find('@') == -1 ) {
KConfigGroup general( KMKernel::config(), "General" );
- QString defaultdomain = general.readEntry( "Default domain" );
+ TQString defaultdomain = general.readEntry( "Default domain" );
if( !defaultdomain.isEmpty() ) {
expandedRecipients += receiver + "@" + defaultdomain;
}
@@ -3912,10 +3912,10 @@ QString KMMessage::expandAliases( const QString& recipients )
//-----------------------------------------------------------------------------
//static
-QString KMMessage::guessEmailAddressFromLoginName( const QString& loginName )
+TQString KMMessage::guessEmailAddressFromLoginName( const TQString& loginName )
{
if ( loginName.isEmpty() )
- return QString();
+ return TQString();
char hostnameC[256];
// null terminate this C string
@@ -3923,15 +3923,15 @@ QString KMMessage::guessEmailAddressFromLoginName( const QString& loginName )
// set the string to 0 length if gethostname fails
if ( gethostname( hostnameC, 255 ) )
hostnameC[0] = '\0';
- QString address = loginName;
+ TQString address = loginName;
address += '@';
- address += QString::fromLocal8Bit( hostnameC );
+ address += TQString::fromLocal8Bit( hostnameC );
// try to determine the real name
const KUser user( loginName );
if ( user.isValid() ) {
- QString fullName = user.fullName();
- if ( fullName.find( QRegExp( "[^ 0-9A-Za-z\\x0080-\\xFFFF]" ) ) != -1 )
+ TQString fullName = user.fullName();
+ if ( fullName.find( TQRegExp( "[^ 0-9A-Za-z\\x0080-\\xFFFF]" ) ) != -1 )
address = '"' + fullName.replace( '\\', "\\" ).replace( '"', "\\" )
+ "\" <" + address + '>';
else
@@ -3954,7 +3954,7 @@ void KMMessage::readConfig()
int languageNr = config->readNumEntry("reply-current-language",0);
{ // area for config group "KMMessage #n"
- KConfigGroupSaver saver(config, QString("KMMessage #%1").arg(languageNr));
+ KConfigGroupSaver saver(config, TQString("KMMessage #%1").arg(languageNr));
sReplyLanguage = config->readEntry("language",KGlobal::locale()->language());
sReplyStr = config->readEntry("phrase-reply",
i18n("On %D, you wrote:"));
@@ -3984,15 +3984,15 @@ void KMMessage::readConfig()
}
}
-QCString KMMessage::defaultCharset()
+TQCString KMMessage::defaultCharset()
{
- QCString retval;
+ TQCString retval;
if (!sPrefCharsets.isEmpty())
retval = sPrefCharsets[0].latin1();
if (retval.isEmpty() || (retval == "locale")) {
- retval = QCString(kmkernel->networkCodec()->mimeName());
+ retval = TQCString(kmkernel->networkCodec()->mimeName());
KPIM::kAsciiToLower( retval.data() );
}
@@ -4001,13 +4001,13 @@ QCString KMMessage::defaultCharset()
return retval;
}
-const QStringList &KMMessage::preferredCharsets()
+const TQStringList &KMMessage::preferredCharsets()
{
return sPrefCharsets;
}
//-----------------------------------------------------------------------------
-QCString KMMessage::charset() const
+TQCString KMMessage::charset() const
{
if ( mMsg->Headers().HasContentType() ) {
DwMediaType &mType=mMsg->Headers().ContentType();
@@ -4023,7 +4023,7 @@ QCString KMMessage::charset() const
}
//-----------------------------------------------------------------------------
-void KMMessage::setCharset(const QCString& bStr)
+void KMMessage::setCharset(const TQCString& bStr)
{
kdWarning( type() != DwMime::kTypeText )
<< "KMMessage::setCharset(): trying to set a charset for a non-textual mimetype." << endl
@@ -4031,7 +4031,7 @@ void KMMessage::setCharset(const QCString& bStr)
<< "====================================================================" << endl
<< kdBacktrace( 5 ) << endl
<< "====================================================================" << endl;
- QCString aStr = bStr;
+ TQCString aStr = bStr;
KPIM::kAsciiToLower( aStr.data() );
DwMediaType &mType = dwContentType();
mType.Parse();
@@ -4095,14 +4095,14 @@ void KMMessage::link( const KMMessage *aMsg, KMMsgStatus aStatus )
|| aStatus == KMMsgStatusForwarded
|| aStatus == KMMsgStatusDeleted );
- QString message = headerField( "X-KMail-Link-Message" );
+ TQString message = headerField( "X-KMail-Link-Message" );
if ( !message.isEmpty() )
message += ',';
- QString type = headerField( "X-KMail-Link-Type" );
+ TQString type = headerField( "X-KMail-Link-Type" );
if ( !type.isEmpty() )
type += ',';
- message += QString::number( aMsg->getMsgSerNum() );
+ message += TQString::number( aMsg->getMsgSerNum() );
if ( aStatus == KMMsgStatusReplied )
type += "reply";
else if ( aStatus == KMMsgStatusForwarded )
@@ -4120,8 +4120,8 @@ void KMMessage::getLink(int n, ulong *retMsgSerNum, KMMsgStatus *retStatus) cons
*retMsgSerNum = 0;
*retStatus = KMMsgStatusUnknown;
- QString message = headerField("X-KMail-Link-Message");
- QString type = headerField("X-KMail-Link-Type");
+ TQString message = headerField("X-KMail-Link-Message");
+ TQString type = headerField("X-KMail-Link-Type");
message = message.section(',', n, n);
type = type.section(',', n, n);
@@ -4137,7 +4137,7 @@ void KMMessage::getLink(int n, ulong *retMsgSerNum, KMMsgStatus *retStatus) cons
}
//-----------------------------------------------------------------------------
-DwBodyPart* KMMessage::findDwBodyPart( DwBodyPart* part, const QString & partSpecifier )
+DwBodyPart* KMMessage::findDwBodyPart( DwBodyPart* part, const TQString & partSpecifier )
{
if ( !part ) return 0;
DwBodyPart* current;
@@ -4169,7 +4169,7 @@ DwBodyPart* KMMessage::findDwBodyPart( DwBodyPart* part, const QString & partSpe
}
//-----------------------------------------------------------------------------
-void KMMessage::updateBodyPart(const QString partSpecifier, const QByteArray & data)
+void KMMessage::updateBodyPart(const TQString partSpecifier, const TQByteArray & data)
{
if ( !data.data() || !data.size() )
return;
@@ -4179,7 +4179,7 @@ void KMMessage::updateBodyPart(const QString partSpecifier, const QByteArray & d
partSpecifier != "0" &&
partSpecifier != "TEXT" )
{
- QString specifier = partSpecifier;
+ TQString specifier = partSpecifier;
if ( partSpecifier.endsWith(".HEADER") ||
partSpecifier.endsWith(".MIME") ) {
// get the parent bodypart
@@ -4213,7 +4213,7 @@ void KMMessage::updateBodyPart(const QString partSpecifier, const QByteArray & d
} else {
// update body
mLastUpdated->Body().FromString( content );
- QString parentSpec = partSpecifier.section( '.', 0, -2 );
+ TQString parentSpec = partSpecifier.section( '.', 0, -2 );
if ( !parentSpec.isEmpty() )
{
DwBodyPart* parent = findDwBodyPart( getFirstDwBodyPart(), parentSpec );
@@ -4312,19 +4312,19 @@ void KMMessage::updateAttachmentState( DwBodyPart* part )
setStatus( KMMsgStatusHasNoAttach );
}
-void KMMessage::setBodyFromUnicode( const QString & str ) {
- QCString encoding = KMMsgBase::autoDetectCharset( charset(), KMMessage::preferredCharsets(), str );
+void KMMessage::setBodyFromUnicode( const TQString & str ) {
+ TQCString encoding = KMMsgBase::autoDetectCharset( charset(), KMMessage::preferredCharsets(), str );
if ( encoding.isEmpty() )
encoding = "utf-8";
- const QTextCodec * codec = KMMsgBase::codecForName( encoding );
+ const TQTextCodec * codec = KMMsgBase::codecForName( encoding );
assert( codec );
- QValueList<int> dummy;
+ TQValueList<int> dummy;
setCharset( encoding );
setBodyAndGuessCte( codec->fromUnicode( str ), dummy, false /* no 8bit */ );
}
-const QTextCodec * KMMessage::codec() const {
- const QTextCodec * c = mOverrideCodec;
+const TQTextCodec * KMMessage::codec() const {
+ const TQTextCodec * c = mOverrideCodec;
if ( !c )
// no override-codec set for this message, try the CT charset parameter:
c = KMMsgBase::codecForName( charset() );
@@ -4341,7 +4341,7 @@ const QTextCodec * KMMessage::codec() const {
return c;
}
-QString KMMessage::bodyToUnicode(const QTextCodec* codec) const {
+TQString KMMessage::bodyToUnicode(const TQTextCodec* codec) const {
if ( !codec )
// No codec was given, so try the charset in the mail
codec = this->codec();
@@ -4351,12 +4351,12 @@ QString KMMessage::bodyToUnicode(const QTextCodec* codec) const {
}
//-----------------------------------------------------------------------------
-QCString KMMessage::mboxMessageSeparator()
+TQCString KMMessage::mboxMessageSeparator()
{
- QCString str( KPIM::getFirstEmailAddress( rawHeaderField("From") ) );
+ TQCString str( KPIM::getFirstEmailAddress( rawHeaderField("From") ) );
if ( str.isEmpty() )
str = "unknown@unknown.invalid";
- QCString dateStr( dateShortStr() );
+ TQCString dateStr( dateShortStr() );
if ( dateStr.isEmpty() ) {
time_t t = ::time( 0 );
dateStr = ctime( &t );
diff --git a/kmail/kmmessage.h b/kmail/kmmessage.h
index a19c9d510..f4353b836 100644
--- a/kmail/kmmessage.h
+++ b/kmail/kmmessage.h
@@ -40,8 +40,8 @@ namespace KMime {
namespace Types {
class AddrSpec;
class Address;
- typedef QValueList<Address> AddressList;
- typedef QValueList<AddrSpec> AddrSpecList;
+ typedef TQValueList<Address> AddressList;
+ typedef TQValueList<AddrSpec> AddrSpecList;
}
}
@@ -161,9 +161,9 @@ public:
required header fields with the proper values. The returned message
is not stored in any folder. Marks this message as replied. */
KMMessage* createReply( KMail::ReplyStrategy replyStrategy = KMail::ReplySmart,
- QString selection=QString::null, bool noQuote=false,
+ TQString selection=TQString::null, bool noQuote=false,
bool allowDecryption=true, bool selectionIsBody=false,
- const QString &tmpl = QString::null );
+ const TQString &tmpl = TQString::null );
/** Create a new message that is a redirect to this message, filling all
required header fields with the proper values. The returned message
@@ -172,15 +172,15 @@ public:
user, mail is not changed and the reply-to field is set to
the email address of the original sender
*/
- KMMessage* createRedirect( const QString &toStr );
+ KMMessage* createRedirect( const TQString &toStr );
/** Create the forwarded body for the message. */
- QCString createForwardBody();
+ TQCString createForwardBody();
/** Create a new message that is a forward of this message, filling all
required header fields with the proper values. The returned message
is not stored in any folder. Marks this message as forwarded. */
- KMMessage* createForward( const QString &tmpl = QString::null );
+ KMMessage* createForward( const TQString &tmpl = TQString::null );
/** Create a new message that is a delivery receipt of this message,
filling required header fileds with the proper values. The
@@ -203,15 +203,15 @@ public:
KMMessage* createMDN( KMime::MDN::ActionMode a,
KMime::MDN::DispositionType d,
bool allowGUI=false,
- QValueList<KMime::MDN::DispositionModifier> m=QValueList<KMime::MDN::DispositionModifier>() );
+ TQValueList<KMime::MDN::DispositionModifier> m=TQValueList<KMime::MDN::DispositionModifier>() );
/** Remove all headers but the content description ones, and those in the white list. */
- void sanitizeHeaders( const QStringList& whiteList = QStringList() );
+ void sanitizeHeaders( const TQStringList& whiteList = TQStringList() );
/** Parse the string and create this message from it. */
void fromDwString(const DwString& str, bool setStatus=false);
- void fromString(const QCString& str, bool setStatus=false);
- void fromByteArray(const QByteArray & ba, bool setStatus=false);
+ void fromString(const TQCString& str, bool setStatus=false);
+ void fromByteArray(const TQByteArray & ba, bool setStatus=false);
/** Return the entire message contents in the DwString. This function
is *fast* even for large message since it does *not* involve a
@@ -227,19 +227,19 @@ public:
underlying mimelib, then you should use the asDwString function.
@see asDwString
*/
- QCString asString() const;
+ TQCString asString() const;
/**
* Return the message contents with the headers that should not be
* sent stripped off.
*/
- QByteArray asSendableString() const;
+ TQByteArray asSendableString() const;
/**
* Return the message header with the headers that should not be
* sent stripped off.
*/
- QCString headerAsSendableString() const;
+ TQCString headerAsSendableString() const;
/**
* Remove all private header fields: *Status: and X-KMail-*
@@ -250,15 +250,15 @@ public:
DwMediaType& dwContentType();
/** Return header as string. */
- QString headerAsString() const;
+ TQString headerAsString() const;
/** Returns a decoded body part string to be further processed
by function asQuotedString().
THIS FUNCTION WILL BE REPLACED ONCE KMime IS FULLY INTEGRATED
(khz, June 05 2002)*/
void parseTextStringFromDwPart( partNode * root,
- QCString& parsedString,
- const QTextCodec*& codec,
+ TQCString& parsedString,
+ const TQTextCodec*& codec,
bool& isHTML ) const;
/** Initialize header fields. Should be called on new messages
@@ -293,78 +293,78 @@ public:
void setAutomaticFields(bool isMultipart=false);
/** Get or set the 'Date' header field */
- QString dateStr() const;
+ TQString dateStr() const;
/** Returns the message date in asctime format or an empty string if the
message lacks a Date header. */
- QCString dateShortStr() const;
- QString dateIsoStr() const;
+ TQCString dateShortStr() const;
+ TQString dateIsoStr() const;
time_t date() const;
- void setDate(const QCString& str);
+ void setDate(const TQCString& str);
void setDate(time_t aUnixTime);
/** Set the 'Date' header field to the current date. */
void setDateToday();
/** Get or set the 'To' header field */
- QString to() const;
- void setTo(const QString& aStr);
- QString toStrip() const;
+ TQString to() const;
+ void setTo(const TQString& aStr);
+ TQString toStrip() const;
/** Get or set the 'ReplyTo' header field */
- QString replyTo() const;
- void setReplyTo( const QString &aStr );
+ TQString replyTo() const;
+ void setReplyTo( const TQString &aStr );
void setReplyTo(KMMessage*);
/** Get or set the 'Cc' header field */
- QString cc() const;
- void setCc( const QString &aStr );
- QString ccStrip() const;
+ TQString cc() const;
+ void setCc( const TQString &aStr );
+ TQString ccStrip() const;
/** Get or set the 'Bcc' header field */
- QString bcc() const;
- void setBcc( const QString &aStr );
+ TQString bcc() const;
+ void setBcc( const TQString &aStr );
/** Get or set the 'Fcc' header field */
- QString fcc() const;
- void setFcc( const QString &aStr );
+ TQString fcc() const;
+ void setFcc( const TQString &aStr );
/** Get or set the 'Drafts' folder */
- QString drafts() const { return mDrafts; }
- void setDrafts( const QString &aStr );
+ TQString drafts() const { return mDrafts; }
+ void setDrafts( const TQString &aStr );
/** Get or set the 'Templates' folder */
- QString templates() const { return mTemplates; }
- void setTemplates( const QString &aStr );
+ TQString templates() const { return mTemplates; }
+ void setTemplates( const TQString &aStr );
/** Get or set the 'From' header field */
- QString from() const;
- void setFrom(const QString& aStr);
- QString fromStrip() const;
+ TQString from() const;
+ void setFrom(const TQString& aStr);
+ TQString fromStrip() const;
/** @return The addr-spec of either the Sender: (if one is given) or
* the first addr-spec in From: */
- QString sender() const;
+ TQString sender() const;
/** Get or set the 'Who' header field. The actual field that is
returned depends on the contents of the owning folders whoField().
Usually this is 'From', but it can also contain 'To'. */
- QString who() const;
+ TQString who() const;
/** Get or set the 'Subject' header field */
- QString subject() const;
- void setSubject(const QString& aStr);
+ TQString subject() const;
+ void setSubject(const TQString& aStr);
/** Calculate strippedSubject */
void initStrippedSubjectMD5() {};
/** Get or set the 'X-Mark' header field */
- QString xmark() const;
- void setXMark(const QString& aStr);
+ TQString xmark() const;
+ void setXMark(const TQString& aStr);
/** Get or set the 'In-Reply-To' header field */
- QString replyToId() const;
- void setReplyToId(const QString& aStr);
- QString replyToIdMD5() const;
+ TQString replyToId() const;
+ void setReplyToId(const TQString& aStr);
+ TQString replyToIdMD5() const;
/** Get the second to last id from the References header
field. If outgoing messages are not kept in the same
@@ -380,13 +380,13 @@ public:
using replyToAuxIdMD5
*/
- QString replyToAuxIdMD5() const;
+ TQString replyToAuxIdMD5() const;
/**
Get a hash of the subject with all prefixes such as Re: removed.
Used for threading.
*/
- QString strippedSubjectMD5() const;
+ TQString strippedSubjectMD5() const;
/**
Validate a list of email addresses, and also allow
@@ -398,29 +398,29 @@ public:
requires moving expandAliases and all that
it brings
*/
- static KPIM::EmailParseResult isValidEmailAddressList( const QString& aStr,
- QString& brokenAddress );
+ static KPIM::EmailParseResult isValidEmailAddressList( const TQString& aStr,
+ TQString& brokenAddress );
/**
Get a hash of the subject.
Used for threading.
*/
- QString subjectMD5() const;
+ TQString subjectMD5() const;
/** Is the subject prefixed by Re: or similar? */
bool subjectIsPrefixed() const;
/** Get or set the 'Message-Id' header field */
- QString msgId() const;
- void setMsgId(const QString& aStr);
- QString msgIdMD5() const;
+ TQString msgId() const;
+ void setMsgId(const TQString& aStr);
+ TQString msgIdMD5() const;
/** Get or set the references for this message */
- QString references() const;
- void setReferences(const QCString& aStr);
+ TQString references() const;
+ void setReferences(const TQCString& aStr);
/** Returns the message ID, useful for followups */
- QCString id() const;
+ TQCString id() const;
/** Sets the message serial number. If defaulted to zero, the
serial number will be assigned using the dictionary. Note that
@@ -432,7 +432,7 @@ public:
header fields with the given name might exist then you should use
headerFields() instead.
*/
- QString headerField(const QCString& name) const;
+ TQString headerField(const TQCString& name) const;
enum HeaderFieldType { Unstructured, Structured, Address };
@@ -440,57 +440,57 @@ public:
If prepend is set to true, the header is inserted at the beginning
and does not overwrite an existing header field with the same name.
*/
- void setHeaderField( const QCString& name, const QString& value,
+ void setHeaderField( const TQCString& name, const TQString& value,
HeaderFieldType type = Unstructured,
bool prepend = false );
/** Returns a list of the values of all header fields with the given name. */
- QStringList headerFields( const QCString& name ) const;
+ TQStringList headerFields( const TQCString& name ) const;
/** Returns the raw value of a header field with the given name. If multiple
header fields with the given name might exist then you should use
rawHeaderFields() instead.
*/
- QCString rawHeaderField( const QCString & name ) const;
+ TQCString rawHeaderField( const TQCString & name ) const;
/** Returns a list of the raw values of all header fields with the given
name.
*/
- QValueList<QCString> rawHeaderFields( const QCString & field ) const;
+ TQValueList<TQCString> rawHeaderFields( const TQCString & field ) const;
/** Splits the given address list into separate addresses. */
- static KMime::Types::AddressList splitAddrField( const QCString & str );
+ static KMime::Types::AddressList splitAddrField( const TQCString & str );
/** Returns header address list as string list.
Valid for the following fields: To, Bcc, Cc, ReplyTo, ResentBcc,
ResentCc, ResentReplyTo, ResentTo */
- KMime::Types::AddressList headerAddrField(const QCString& name) const;
- KMime::Types::AddrSpecList extractAddrSpecs( const QCString & headerNames ) const;
+ KMime::Types::AddressList headerAddrField(const TQCString& name) const;
+ KMime::Types::AddrSpecList extractAddrSpecs( const TQCString & headerNames ) const;
/** Remove header field with given name */
- void removeHeaderField(const QCString& name);
+ void removeHeaderField(const TQCString& name);
/** Remove all header fields with given name */
- void removeHeaderFields(const QCString& name);
+ void removeHeaderFields(const TQCString& name);
/** Get or set the 'Content-Type' header field
The member functions that involve enumerated types (ints)
will work only for well-known types or subtypes. */
- QCString typeStr() const;
+ TQCString typeStr() const;
int type() const;
- void setTypeStr(const QCString& aStr);
+ void setTypeStr(const TQCString& aStr);
void setType(int aType);
/** Subtype */
- QCString subtypeStr() const;
+ TQCString subtypeStr() const;
int subtype() const;
- void setSubtypeStr(const QCString& aStr);
+ void setSubtypeStr(const TQCString& aStr);
void setSubtype(int aSubtype);
/** add or change a parameter of a DwMediaType field */
static void setDwMediaTypeParam( DwMediaType &mType,
- const QCString& attr,
- const QCString& val );
+ const TQCString& attr,
+ const TQCString& val );
/** add or change a parameter of the Content-Type field */
- void setContentTypeParam(const QCString& attr, const QCString& val);
+ void setContentTypeParam(const TQCString& attr, const TQCString& val);
/** get the DwHeaders
(make sure to call setNeedsAssembly() function after directly
@@ -506,48 +506,48 @@ public:
/** Get or set the 'Content-Transfer-Encoding' header field
The member functions that involve enumerated types (ints)
will work only for well-known encodings. */
- QCString contentTransferEncodingStr() const;
+ TQCString contentTransferEncodingStr() const;
int contentTransferEncoding() const;
- void setContentTransferEncodingStr(const QCString& aStr);
+ void setContentTransferEncodingStr(const TQCString& aStr);
void setContentTransferEncoding(int aCte);
/** Cte is short for ContentTransferEncoding.
These functions are an alternative to the ones with longer names. */
- QCString cteStr() const { return contentTransferEncodingStr(); }
+ TQCString cteStr() const { return contentTransferEncodingStr(); }
int cte() const { return contentTransferEncoding(); }
- void setCteStr(const QCString& aStr) { setContentTransferEncodingStr(aStr); }
+ void setCteStr(const TQCString& aStr) { setContentTransferEncodingStr(aStr); }
void setCte(int aCte) { setContentTransferEncoding(aCte); }
/** Sets this body part's content to @p str. @p str is subject to
automatic charset and CTE detection.
**/
- void setBodyFromUnicode( const QString & str );
+ void setBodyFromUnicode( const TQString & str );
/** Returns the body part decoded to unicode.
**/
- QString bodyToUnicode(const QTextCodec* codec=0) const;
+ TQString bodyToUnicode(const TQTextCodec* codec=0) const;
/** Get the message body. Does not decode the body. */
- QCString body() const;
+ TQCString body() const;
/** Set the message body. Does not encode the body. */
- void setBody(const QCString& aStr);
+ void setBody(const TQCString& aStr);
void setBody(const DwString& aStr);
void setBody(const char* aStr); // avoid ambiguous calls
/** Hack to enable structured body parts to be set as flat text... */
- void setMultiPartBody( const QCString & aStr );
+ void setMultiPartBody( const TQCString & aStr );
/** Set the message body, encoding it according to the current content
transfer encoding. The first method for null terminated strings,
the second for binary data */
- void setBodyEncoded(const QCString& aStr);
- void setBodyEncodedBinary(const QByteArray& aStr);
+ void setBodyEncoded(const TQCString& aStr);
+ void setBodyEncodedBinary(const TQByteArray& aStr);
/** Returns a list of content-transfer-encodings that can be used with
the given result of the character frequency analysis of a message or
message part under the given restrictions. */
- static QValueList<int> determineAllowedCtes( const KMime::CharFreq& cf,
+ static TQValueList<int> determineAllowedCtes( const KMime::CharFreq& cf,
bool allow8Bit,
bool willBeSigned );
@@ -560,20 +560,20 @@ public:
@param allow8Bit whether "8bit" is allowed as cte.
@param willBeSigned whether "7bit"/"8bit" is allowed as cte according to RFC 3156
*/
- void setBodyAndGuessCte( const QByteArray& aBuf,
- QValueList<int>& allowedCte,
+ void setBodyAndGuessCte( const TQByteArray& aBuf,
+ TQValueList<int>& allowedCte,
bool allow8Bit = false,
bool willBeSigned = false );
- void setBodyAndGuessCte( const QCString& aBuf,
- QValueList<int>& allowedCte,
+ void setBodyAndGuessCte( const TQCString& aBuf,
+ TQValueList<int>& allowedCte,
bool allow8Bit = false,
bool willBeSigned = false );
/** Returns a decoded version of the body from the current content transfer
encoding. The first method returns a null terminated string, the second
method is meant for binary data, not null is appended */
- QCString bodyDecoded() const;
- QByteArray bodyDecodedBinary() const;
+ TQCString bodyDecoded() const;
+ TQByteArray bodyDecodedBinary() const;
/** Number of body parts the message has. This is one for plain messages
without any attachment. */
@@ -585,11 +585,11 @@ public:
/** Return the first DwBodyPart matching a given Content-Type
or zero, if no found. */
- DwBodyPart * findDwBodyPart( const QCString& type, const QCString& subtype ) const;
+ DwBodyPart * findDwBodyPart( const TQCString& type, const TQCString& subtype ) const;
/** Return the first DwBodyPart matching a given partSpecifier
or zero, if no found. */
- DwBodyPart* findDwBodyPart( DwBodyPart* part, const QString & partSpecifier );
+ DwBodyPart* findDwBodyPart( DwBodyPart* part, const TQString & partSpecifier );
/** Get the DwBodyPart at position in aIdx. Indexing starts at 0.
If there is no body part at that index, return value will be zero. */
@@ -635,22 +635,22 @@ public:
* defined by the user or the given email address as suffix. The address
* must be given as addr-spec as defined in RFC 2822.
*/
- static QString generateMessageId( const QString& addr );
+ static TQString generateMessageId( const TQString& addr );
/** Convert '<' into "&lt;" resp. '>' into "&gt;" in order to
* prevent their interpretation by KHTML.
* Does *not* use the Qt replace function but runs a very fast C code
* the same way as lf2crlf() does.
*/
- static QCString html2source( const QCString & src );
+ static TQCString html2source( const TQCString & src );
/** Encodes an email address as mailto URL
*/
- static QString encodeMailtoUrl( const QString& str );
+ static TQString encodeMailtoUrl( const TQString& str );
/** Decodes a mailto URL
*/
- static QString decodeMailtoUrl( const QString& url );
+ static TQString decodeMailtoUrl( const TQString& url );
/** This function generates a displayable string from a list of email
addresses.
@@ -658,52 +658,52 @@ public:
Output: comma separated list of display name resp. comment resp.
address
*/
- static QCString stripEmailAddr(const QCString& emailAddr);
+ static TQCString stripEmailAddr(const TQCString& emailAddr);
/** Does the same as the above function. Shouldn't be used.
*/
- static QString stripEmailAddr(const QString& emailAddr);
+ static TQString stripEmailAddr(const TQString& emailAddr);
/** Quotes the following characters which have a special meaning in HTML:
* '<' '>' '&' '"'. Additionally '\\n' is converted to "<br />" if
* @p removeLineBreaks is false. If @p removeLineBreaks is true, then
* '\\n' is removed. Last but not least '\\r' is removed.
*/
- static QString quoteHtmlChars( const QString& str,
+ static TQString quoteHtmlChars( const TQString& str,
bool removeLineBreaks = false );
/** Converts the email address(es) to (a) nice HTML mailto: anchor(s).
* If stripped is TRUE then the visible part of the anchor contains
* only the name part and not the given emailAddr.
*/
- static QString emailAddrAsAnchor(const QString& emailAddr,
- bool stripped=true, const QString& cssStyle = QString::null, bool link = true);
+ static TQString emailAddrAsAnchor(const TQString& emailAddr,
+ bool stripped=true, const TQString& cssStyle = TQString::null, bool link = true);
/** Strips an address from an address list. This is for example used
when replying to all.
*/
- static QStringList stripAddressFromAddressList( const QString& address,
- const QStringList& addresses );
+ static TQStringList stripAddressFromAddressList( const TQString& address,
+ const TQStringList& addresses );
/** Strips all the user's addresses from an address list. This is used
when replying.
*/
- static QStringList stripMyAddressesFromAddressList( const QStringList& list );
+ static TQStringList stripMyAddressesFromAddressList( const TQStringList& list );
/** Returns true if the given address is contained in the given address list.
*/
- static bool addressIsInAddressList( const QString& address,
- const QStringList& addresses );
+ static bool addressIsInAddressList( const TQString& address,
+ const TQStringList& addresses );
/** Expands aliases (distribution lists and nick names) and appends a
domain part to all email addresses which are missing the domain part.
*/
- static QString expandAliases( const QString& recipients );
+ static TQString expandAliases( const TQString& recipients );
/** Uses the hostname as domain part and tries to determine the real name
from the entries in the password file.
*/
- static QString guessEmailAddressFromLoginName( const QString& userName );
+ static TQString guessEmailAddressFromLoginName( const TQString& userName );
/**
* Given argument msg add quoting characters and relayout for max width maxLength
@@ -711,28 +711,28 @@ public:
* @param maxLineLength reformat text to be this amount of columns at maximum, adding
* linefeeds at word boundaries to make it fit.
*/
- static QString smartQuote( const QString &msg, int maxLineLength );
+ static TQString smartQuote( const TQString &msg, int maxLineLength );
/** Get the default message charset.*/
- static QCString defaultCharset();
+ static TQCString defaultCharset();
/** Get a list of preferred message charsets.*/
- static const QStringList &preferredCharsets();
+ static const TQStringList &preferredCharsets();
/** Replaces every occurrence of "${foo}" in @p s with headerField("foo") */
- QString replaceHeadersInString( const QString & s ) const;
+ TQString replaceHeadersInString( const TQString & s ) const;
/** Get the message charset.*/
- QCString charset() const;
+ TQCString charset() const;
/** Set the message charset. */
- void setCharset(const QCString& aStr);
+ void setCharset(const TQCString& aStr);
- /** Get a QTextCodec suitable for this message part */
- const QTextCodec * codec() const;
+ /** Get a TQTextCodec suitable for this message part */
+ const TQTextCodec * codec() const;
/** Set the charset the user selected for the message to display */
- void setOverrideCodec( const QTextCodec* codec ) { mOverrideCodec = codec; }
+ void setOverrideCodec( const TQTextCodec* codec ) { mOverrideCodec = codec; }
/** Allow decoding of HTML for quoting */
void setDecodeHTML(bool aDecodeHTML)
@@ -745,15 +745,15 @@ public:
/** Creates reference string for reply to messages.
* reference = original first reference + original last reference + original msg-id
*/
- QCString getRefStr() const;
+ TQCString getRefStr() const;
/** Get/set offset in mail folder. */
off_t folderOffset() const { return mFolderOffset; }
void setFolderOffset(off_t offs) { if(mFolderOffset != offs) { mFolderOffset=offs; setDirty(true); } }
/** Get/set filename in mail folder. */
- QString fileName() const { return mFileName; }
- void setFileName(const QString& file) { if(mFileName != file) { mFileName=file; setDirty(true); } }
+ TQString fileName() const { return mFileName; }
+ void setFileName(const TQString& file) { if(mFileName != file) { mFileName=file; setDirty(true); } }
/** Get/set size of message in the folder including the whole header in
bytes. Can be 0, if the message is not in a folder.
@@ -804,10 +804,10 @@ public:
void getLink(int n, ulong *retMsgSerNum, KMMsgStatus *retStatus) const;
/** Convert wildcards into normal string */
- QString formatString(const QString&) const;
+ TQString formatString(const TQString&) const;
/** Sets the body of the specified part */
- void updateBodyPart(const QString partSpecifier, const QByteArray & data);
+ void updateBodyPart(const TQString partSpecifier, const TQByteArray & data);
/** Returns the last DwBodyPart that was updated */
DwBodyPart* lastUpdatedPart() { return mLastUpdated; }
@@ -833,7 +833,7 @@ public:
string of the form
"From local@domain.invalid Sat Jun 12 14:00:00 2004\n".
*/
- QCString mboxMessageSeparator();
+ TQCString mboxMessageSeparator();
/** Returns message body with quoting header and indented by the
given indentation string. This is suitable for including the message
@@ -850,15 +850,15 @@ public:
The signature is stripped if aStripSignature is true and
smart quoting is turned on. Signed or encrypted texts
get converted to plain text when allowDecryption is true. */
- QString asQuotedString( const QString & headerStr,
- const QString & indentStr,
- const QString & selection=QString::null,
+ TQString asQuotedString( const TQString & headerStr,
+ const TQString & indentStr,
+ const TQString & selection=TQString::null,
bool aStripSignature=true,
bool allowDecryption=true) const;
/** Return the textual content of the message as plain text,
converting HTML to plain text if necessary. */
- QString asPlainText( bool stripSignature, bool allowDecryption ) const;
+ TQString asPlainText( bool stripSignature, bool allowDecryption ) const;
/** Get stored cursor position */
int getCursorPos() { return mCursorPos; };
@@ -886,8 +886,8 @@ private:
/** Assign the values of @param other to this message. Used in the copy c'tor. */
void assign( const KMMessage& other );
- QString mDrafts;
- QString mTemplates;
+ TQString mDrafts;
+ TQString mTemplates;
mutable DwMessage* mMsg;
mutable bool mNeedsAssembly :1;
bool mDecodeHTML :1;
@@ -895,10 +895,10 @@ private:
bool mComplete :1;
bool mIsParsed : 1;
static const KMail::HeaderStrategy * sHeaderStrategy;
- static QString sForwardStr;
- const QTextCodec * mOverrideCodec;
+ static TQString sForwardStr;
+ const TQTextCodec * mOverrideCodec;
- QString mFileName;
+ TQString mFileName;
off_t mFolderOffset;
size_t mMsgSize, mMsgLength;
time_t mDate;
@@ -909,7 +909,7 @@ private:
DwBodyPart* mLastUpdated;
int mCursorPos;
KMMsgInfo* mMsgInfo; // used to remember the KMMsgInfo object this KMMessage replaced in the KMMsgList
- static QValueList<KMMessage*> sPendingDeletes;
+ static TQValueList<KMMessage*> sPendingDeletes;
};
diff --git a/kmail/kmmimeparttree.cpp b/kmail/kmmimeparttree.cpp
index 606b6891d..1d32a56e8 100644
--- a/kmail/kmmimeparttree.cpp
+++ b/kmail/kmmimeparttree.cpp
@@ -46,16 +46,16 @@
#include <kmessagebox.h>
#include <kiconloader.h>
-#include <qclipboard.h>
-#include <qheader.h>
-#include <qpopupmenu.h>
-#include <qstyle.h>
+#include <tqclipboard.h>
+#include <tqheader.h>
+#include <tqpopupmenu.h>
+#include <tqstyle.h>
#include <kurldrag.h>
#include <kurl.h>
KMMimePartTree::KMMimePartTree( KMReaderWin* readerWin,
- QWidget* parent,
+ TQWidget* parent,
const char* name )
: KListView( parent, name ),
mReaderWin( readerWin ), mSizeColumn(0)
@@ -68,12 +68,12 @@ KMMimePartTree::KMMimePartTree( KMReaderWin* readerWin,
setColumnAlignment( 3, Qt::AlignRight );
restoreLayoutIfPresent();
- connect( this, SIGNAL( clicked( QListViewItem* ) ),
- this, SLOT( itemClicked( QListViewItem* ) ) );
- connect( this, SIGNAL( contextMenuRequested( QListViewItem*,
- const QPoint&, int ) ),
- this, SLOT( itemRightClicked( QListViewItem*, const QPoint& ) ) );
- setSelectionMode( QListView::Extended );
+ connect( this, TQT_SIGNAL( clicked( TQListViewItem* ) ),
+ this, TQT_SLOT( itemClicked( TQListViewItem* ) ) );
+ connect( this, TQT_SIGNAL( contextMenuRequested( TQListViewItem*,
+ const TQPoint&, int ) ),
+ this, TQT_SLOT( itemRightClicked( TQListViewItem*, const TQPoint& ) ) );
+ setSelectionMode( TQListView::Extended );
setRootIsDecorated( false );
setAllColumnsShowFocus( true );
setShowToolTips( true );
@@ -108,7 +108,7 @@ void KMMimePartTree::restoreLayoutIfPresent() {
}
-void KMMimePartTree::itemClicked( QListViewItem* item )
+void KMMimePartTree::itemClicked( TQListViewItem* item )
{
if ( const KMMimePartTreeItem * i = dynamic_cast<KMMimePartTreeItem*>( item ) ) {
if( mReaderWin->mRootNode == i->node() )
@@ -120,8 +120,8 @@ void KMMimePartTree::itemClicked( QListViewItem* item )
}
-void KMMimePartTree::itemRightClicked( QListViewItem* item,
- const QPoint& point )
+void KMMimePartTree::itemRightClicked( TQListViewItem* item,
+ const TQPoint& point )
{
// TODO: remove this member var?
mCurrentContextMenuItem = dynamic_cast<KMMimePartTreeItem*>( item );
@@ -131,34 +131,34 @@ void KMMimePartTree::itemRightClicked( QListViewItem* item,
else {
kdDebug(5006) << "\n**\n** KMMimePartTree::itemRightClicked() **\n**" << endl;
- QPopupMenu* popup = new QPopupMenu;
+ TQPopupMenu* popup = new QPopupMenu;
if ( mCurrentContextMenuItem->node()->nodeId() > 2 &&
mCurrentContextMenuItem->node()->typeString() != "Multipart" ) {
- popup->insertItem( SmallIcon("fileopen"), i18n("to open", "Open"), this, SLOT(slotOpen()) );
- popup->insertItem( i18n("Open With..."), this, SLOT(slotOpenWith()) );
- popup->insertItem( i18n("to view something", "View"), this, SLOT(slotView()) );
+ popup->insertItem( SmallIcon("fileopen"), i18n("to open", "Open"), this, TQT_SLOT(slotOpen()) );
+ popup->insertItem( i18n("Open With..."), this, TQT_SLOT(slotOpenWith()) );
+ popup->insertItem( i18n("to view something", "View"), this, TQT_SLOT(slotView()) );
}
- popup->insertItem( SmallIcon("filesaveas"),i18n( "Save &As..." ), this, SLOT( slotSaveAs() ) );
+ popup->insertItem( SmallIcon("filesaveas"),i18n( "Save &As..." ), this, TQT_SLOT( slotSaveAs() ) );
/*
* FIXME mkae optional?
popup->insertItem( i18n( "Save as &Encoded..." ), this,
- SLOT( slotSaveAsEncoded() ) );
+ TQT_SLOT( slotSaveAsEncoded() ) );
*/
popup->insertItem( i18n( "Save All Attachments..." ), this,
- SLOT( slotSaveAll() ) );
+ TQT_SLOT( slotSaveAll() ) );
// edit + delete only for attachments
if ( mCurrentContextMenuItem->node()->nodeId() > 2 &&
mCurrentContextMenuItem->node()->typeString() != "Multipart" ) {
- popup->insertItem( SmallIcon("editcopy"), i18n("Copy"), this, SLOT(slotCopy()) );
+ popup->insertItem( SmallIcon("editcopy"), i18n("Copy"), this, TQT_SLOT(slotCopy()) );
if ( GlobalSettings::self()->allowAttachmentDeletion() )
popup->insertItem( SmallIcon("editdelete"), i18n( "Delete Attachment" ),
- this, SLOT( slotDelete() ) );
+ this, TQT_SLOT( slotDelete() ) );
if ( GlobalSettings::self()->allowAttachmentEditing() )
popup->insertItem( SmallIcon( "edit" ), i18n( "Edit Attachment" ),
- this, SLOT( slotEdit() ) );
+ this, TQT_SLOT( slotEdit() ) );
}
if ( mCurrentContextMenuItem->node()->nodeId() > 0 )
- popup->insertItem( i18n("Properties"), this, SLOT(slotProperties()) );
+ popup->insertItem( i18n("Properties"), this, TQT_SLOT(slotProperties()) );
popup->exec( point );
delete popup;
mCurrentContextMenuItem = 0;
@@ -180,14 +180,14 @@ void KMMimePartTree::slotSaveAsEncoded()
//-----------------------------------------------------------------------------
void KMMimePartTree::saveSelectedBodyParts( bool encoded )
{
- QPtrList<QListViewItem> selected = selectedItems();
+ TQPtrList<TQListViewItem> selected = selectedItems();
Q_ASSERT( !selected.isEmpty() );
if ( selected.isEmpty() )
return;
- QPtrListIterator<QListViewItem> it( selected );
- QPtrList<partNode> parts;
+ TQPtrListIterator<TQListViewItem> it( selected );
+ TQPtrList<partNode> parts;
while ( it.current() ) {
parts.append( static_cast<KMMimePartTreeItem *>(it.current())->node() );
++it;
@@ -216,9 +216,9 @@ void KMMimePartTree::setStyleDependantFrameWidth()
// set the width of the frame to a reasonable value for the current GUI style
int frameWidth;
if( style().isA("KeramikStyle") )
- frameWidth = style().pixelMetric( QStyle::PM_DefaultFrameWidth ) - 1;
+ frameWidth = style().pixelMetric( TQStyle::PM_DefaultFrameWidth ) - 1;
else
- frameWidth = style().pixelMetric( QStyle::PM_DefaultFrameWidth );
+ frameWidth = style().pixelMetric( TQStyle::PM_DefaultFrameWidth );
if ( frameWidth < 0 )
frameWidth = 0;
if ( frameWidth != lineWidth() )
@@ -227,19 +227,19 @@ void KMMimePartTree::setStyleDependantFrameWidth()
//-----------------------------------------------------------------------------
-void KMMimePartTree::styleChange( QStyle& oldStyle )
+void KMMimePartTree::styleChange( TQStyle& oldStyle )
{
setStyleDependantFrameWidth();
KListView::styleChange( oldStyle );
}
//-----------------------------------------------------------------------------
-void KMMimePartTree::correctSize( QListViewItem * item )
+void KMMimePartTree::correctSize( TQListViewItem * item )
{
if (!item) return;
KIO::filesize_t totalSize = 0;
- QListViewItem * myChild = item->firstChild();
+ TQListViewItem * myChild = item->firstChild();
while ( myChild )
{
totalSize += static_cast<KMMimePartTreeItem*>(myChild)->origSize();
@@ -253,7 +253,7 @@ void KMMimePartTree::correctSize( QListViewItem * item )
void KMMimePartTree::slotDelete()
{
- QPtrList<QListViewItem> selected = selectedItems();
+ TQPtrList<TQListViewItem> selected = selectedItems();
if ( selected.count() != 1 )
return;
mReaderWin->slotDeleteAttachment( static_cast<KMMimePartTreeItem*>( selected.first() )->node() );
@@ -261,7 +261,7 @@ void KMMimePartTree::slotDelete()
void KMMimePartTree::slotEdit()
{
- QPtrList<QListViewItem> selected = selectedItems();
+ TQPtrList<TQListViewItem> selected = selectedItems();
if ( selected.count() != 1 )
return;
mReaderWin->slotEditAttachment( static_cast<KMMimePartTreeItem*>( selected.first() )->node() );
@@ -289,16 +289,16 @@ void KMMimePartTree::slotProperties()
void KMMimePartTree::startHandleAttachmentCommand(int type)
{
- QPtrList<QListViewItem> selected = selectedItems();
+ TQPtrList<TQListViewItem> selected = selectedItems();
if ( selected.count() != 1 )
return;
partNode* node = static_cast<KMMimePartTreeItem*>( selected.first() )->node();
- QString name = mReaderWin->tempFileUrlFromPartNode( node ).path();
+ TQString name = mReaderWin->tempFileUrlFromPartNode( node ).path();
KMHandleAttachmentCommand* command = new KMHandleAttachmentCommand(
node, mReaderWin->message(), node->nodeId(), name,
KMHandleAttachmentCommand::AttachmentAction( type ), 0, this );
- connect( command, SIGNAL( showAttachment( int, const QString& ) ),
- mReaderWin, SLOT( slotAtmView( int, const QString& ) ) );
+ connect( command, TQT_SIGNAL( showAttachment( int, const TQString& ) ),
+ mReaderWin, TQT_SLOT( slotAtmView( int, const TQString& ) ) );
command->start();
}
@@ -311,18 +311,18 @@ void KMMimePartTree::slotCopy()
if ( !url.isValid() ) return;
urls.append( url );
KURLDrag* drag = new KURLDrag( urls, this );
- QApplication::clipboard()->setData( drag, QClipboard::Clipboard );
+ TQApplication::clipboard()->setData( drag, QClipboard::Clipboard );
}
//=============================================================================
KMMimePartTreeItem::KMMimePartTreeItem( KMMimePartTree * parent,
partNode* node,
- const QString & description,
- const QString & mimetype,
- const QString & encoding,
+ const TQString & description,
+ const TQString & mimetype,
+ const TQString & encoding,
KIO::filesize_t size )
- : QListViewItem( parent, description,
- QString::null, // set by setIconAndTextForType()
+ : TQListViewItem( parent, description,
+ TQString::null, // set by setIconAndTextForType()
encoding,
KIO::convertSize( size ) ),
mPartNode( node ), mOrigSize(size)
@@ -336,19 +336,19 @@ KMMimePartTreeItem::KMMimePartTreeItem( KMMimePartTree * parent,
KMMimePartTreeItem::KMMimePartTreeItem( KMMimePartTreeItem * parent,
partNode* node,
- const QString & description,
- const QString & mimetype,
- const QString & encoding,
+ const TQString & description,
+ const TQString & mimetype,
+ const TQString & encoding,
KIO::filesize_t size,
bool revertOrder )
- : QListViewItem( parent, description,
- QString::null, // set by setIconAndTextForType()
+ : TQListViewItem( parent, description,
+ TQString::null, // set by setIconAndTextForType()
encoding,
KIO::convertSize( size ) ),
mPartNode( node ), mOrigSize(size)
{
if( revertOrder && nextSibling() ){
- QListViewItem* sib = nextSibling();
+ TQListViewItem* sib = nextSibling();
while( sib->nextSibling() )
sib = sib->nextSibling();
moveItem( sib );
@@ -360,9 +360,9 @@ KMMimePartTreeItem::KMMimePartTreeItem( KMMimePartTreeItem * parent,
static_cast<KMMimePartTree*>(listView())->correctSize(this);
}
-void KMMimePartTreeItem::setIconAndTextForType( const QString & mime )
+void KMMimePartTreeItem::setIconAndTextForType( const TQString & mime )
{
- QString mimetype = mime.lower();
+ TQString mimetype = mime.lower();
if ( mimetype.startsWith( "multipart/" ) ) {
setText( 1, mimetype );
setPixmap( 0, SmallIcon("folder") );
diff --git a/kmail/kmmimeparttree.h b/kmail/kmmimeparttree.h
index fe33c1f63..a2e4370a6 100644
--- a/kmail/kmmimeparttree.h
+++ b/kmail/kmmimeparttree.h
@@ -38,7 +38,7 @@
#include <klistview.h>
#include <kio/global.h>
-#include <qstring.h>
+#include <tqstring.h>
class partNode;
class KMReaderWin;
@@ -51,15 +51,15 @@ class KMMimePartTree : public KListView
public:
KMMimePartTree( KMReaderWin* readerWin,
- QWidget* parent,
+ TQWidget* parent,
const char* name = 0 );
virtual ~KMMimePartTree();
- void correctSize( QListViewItem * item );
+ void correctSize( TQListViewItem * item );
protected slots:
- void itemClicked( QListViewItem* );
- void itemRightClicked( QListViewItem*, const QPoint& );
+ void itemClicked( TQListViewItem* );
+ void itemRightClicked( TQListViewItem*, const TQPoint& );
void slotSaveAs();
void slotSaveAsEncoded();
void slotSaveAll();
@@ -74,7 +74,7 @@ protected slots:
protected:
/** reimplemented in order to update the frame width in case of a changed
GUI style */
- void styleChange( QStyle& oldStyle );
+ void styleChange( TQStyle& oldStyle );
/** Set the width of the frame to a reasonable value for the current GUI
style */
@@ -99,15 +99,15 @@ class KMMimePartTreeItem :public QListViewItem
public:
KMMimePartTreeItem( KMMimePartTree * parent,
partNode* node,
- const QString & labelDescr,
- const QString & labelCntType = QString::null,
- const QString & labelEncoding = QString::null,
+ const TQString & labelDescr,
+ const TQString & labelCntType = TQString::null,
+ const TQString & labelEncoding = TQString::null,
KIO::filesize_t size=0 );
KMMimePartTreeItem( KMMimePartTreeItem * parent,
partNode* node,
- const QString & labelDescr,
- const QString & labelCntType = QString::null,
- const QString & labelEncoding = QString::null,
+ const TQString & labelDescr,
+ const TQString & labelCntType = TQString::null,
+ const TQString & labelEncoding = TQString::null,
KIO::filesize_t size=0,
bool revertOrder = false );
partNode* node() const { return mPartNode; }
@@ -116,7 +116,7 @@ public:
void setOrigSize( KIO::filesize_t size ) { mOrigSize = size; }
private:
- void setIconAndTextForType( const QString & mimetype );
+ void setIconAndTextForType( const TQString & mimetype );
partNode* mPartNode;
KIO::filesize_t mOrigSize;
diff --git a/kmail/kmmsgbase.cpp b/kmail/kmmsgbase.cpp
index 00c7e5761..df53e6e57 100644
--- a/kmail/kmmsgbase.cpp
+++ b/kmail/kmmsgbase.cpp
@@ -22,9 +22,9 @@ using KMail::MessageProperty;
#include <mimelib/mimepp.h>
#include <kmime_codecs.h>
-#include <qtextcodec.h>
-#include <qdeepcopy.h>
-#include <qregexp.h>
+#include <tqtextcodec.h>
+#include <tqdeepcopy.h>
+#include <tqregexp.h>
#include <ctype.h>
#include <stdlib.h>
@@ -305,7 +305,7 @@ void KMMsgBase::setEncryptionState( const KMMsgEncryptionState /*status*/, int i
storage()->headerOfMsgChanged(this, idx);
}
-void KMMsgBase::setEncryptionStateChar( QChar status, int idx )
+void KMMsgBase::setEncryptionStateChar( TQChar status, int idx )
{
//kdDebug(5006) << "***setEncryptionState2( " << (status.isNull() ? '?' : status.latin1()) << " )" << endl;
@@ -336,7 +336,7 @@ void KMMsgBase::setMDNSentState( KMMsgMDNSentState, int idx ) {
storage()->headerOfMsgChanged(this, idx);
}
-void KMMsgBase::setSignatureStateChar( QChar status, int idx )
+void KMMsgBase::setSignatureStateChar( TQChar status, int idx )
{
//kdDebug(5006) << "***setSignatureState2( " << (status.isNull() ? '?' : status.latin1()) << " )" << endl;
@@ -465,9 +465,9 @@ bool KMMsgBase::isHam(void) const
}
//-----------------------------------------------------------------------------
-QCString KMMsgBase::statusToStr(const KMMsgStatus status)
+TQCString KMMsgBase::statusToStr(const KMMsgStatus status)
{
- QCString sstr;
+ TQCString sstr;
if (status & KMMsgStatusNew) sstr += 'N';
if (status & KMMsgStatusUnread) sstr += 'U';
if (status & KMMsgStatusOld) sstr += 'O';
@@ -490,9 +490,9 @@ QCString KMMsgBase::statusToStr(const KMMsgStatus status)
}
//-----------------------------------------------------------------------------
-QString KMMsgBase::statusToSortRank()
+TQString KMMsgBase::statusToSortRank()
{
- QString sstr = "bcbbbbbbbb";
+ TQString sstr = "bcbbbbbbbb";
// put watched ones first, then normal ones, ignored ones last
if (status() & KMMsgStatusWatched) sstr[0] = 'a';
@@ -520,14 +520,14 @@ QString KMMsgBase::statusToSortRank()
//-----------------------------------------------------------------------------
-void KMMsgBase::setDate(const QCString& aDateStr)
+void KMMsgBase::setDate(const TQCString& aDateStr)
{
setDate( KRFCDate::parseDate( aDateStr ) );
}
//-----------------------------------------------------------------------------
-QString KMMsgBase::dateStr(void) const
+TQString KMMsgBase::dateStr(void) const
{
time_t d = date();
return KMime::DateFormatter::formatDate(KMime::DateFormatter::Fancy, d);
@@ -535,11 +535,11 @@ QString KMMsgBase::dateStr(void) const
//-----------------------------------------------------------------------------
-QString KMMsgBase::skipKeyword(const QString& aStr, QChar sepChar,
+TQString KMMsgBase::skipKeyword(const TQString& aStr, TQChar sepChar,
bool* hasKeyword)
{
unsigned int i = 0, maxChars = 3;
- QString str = aStr;
+ TQString str = aStr;
while (str[0] == ' ') str.remove(0,1);
if (hasKeyword) *hasKeyword=false;
@@ -563,20 +563,20 @@ QString KMMsgBase::skipKeyword(const QString& aStr, QChar sepChar,
//-----------------------------------------------------------------------------
-const QTextCodec* KMMsgBase::codecForName(const QCString& _str)
+const TQTextCodec* KMMsgBase::codecForName(const TQCString& _str)
{
if (_str.isEmpty()) return 0;
- QCString codec = _str;
+ TQCString codec = _str;
KPIM::kAsciiToLower(codec.data());
return KGlobal::charsets()->codecForName(codec);
}
//-----------------------------------------------------------------------------
-QCString KMMsgBase::toUsAscii(const QString& _str, bool *ok)
+TQCString KMMsgBase::toUsAscii(const TQString& _str, bool *ok)
{
bool all_ok =true;
- QString result = _str;
+ TQString result = _str;
int len = result.length();
for (int i = 0; i < len; i++)
if (result.at(i).unicode() >= 128) {
@@ -590,16 +590,16 @@ QCString KMMsgBase::toUsAscii(const QString& _str, bool *ok)
//-----------------------------------------------------------------------------
-QStringList KMMsgBase::supportedEncodings(bool usAscii)
+TQStringList KMMsgBase::supportedEncodings(bool usAscii)
{
- QStringList encodingNames = KGlobal::charsets()->availableEncodingNames();
- QStringList encodings;
- QMap<QString,bool> mimeNames;
- for (QStringList::Iterator it = encodingNames.begin();
+ TQStringList encodingNames = KGlobal::charsets()->availableEncodingNames();
+ TQStringList encodings;
+ TQMap<TQString,bool> mimeNames;
+ for (TQStringList::Iterator it = encodingNames.begin();
it != encodingNames.end(); it++)
{
- QTextCodec *codec = KGlobal::charsets()->codecForName(*it);
- QString mimeName = (codec) ? QString(codec->mimeName()).lower() : (*it);
+ TQTextCodec *codec = KGlobal::charsets()->codecForName(*it);
+ TQString mimeName = (codec) ? TQString(codec->mimeName()).lower() : (*it);
if (mimeNames.find(mimeName) == mimeNames.end())
{
encodings.append(KGlobal::charsets()->languageForEncoding(*it)
@@ -620,11 +620,11 @@ namespace {
// it's definition...
inline bool isBlank( char ch ) { return ch == ' ' || ch == '\t' ; }
- QCString unfold( const QCString & header ) {
+ TQCString unfold( const TQCString & header ) {
if ( header.isEmpty() )
- return QCString();
+ return TQCString();
- QCString result( header.size() ); // size() >= length()+1 and size() is O(1)
+ TQCString result( header.size() ); // size() >= length()+1 and size() is O(1)
char * d = result.data();
for ( const char * s = header.data() ; *s ; )
@@ -647,15 +647,15 @@ namespace {
//-----------------------------------------------------------------------------
-QString KMMsgBase::decodeRFC2047String(const QCString& aStr, QCString prefCharset)
+TQString KMMsgBase::decodeRFC2047String(const TQCString& aStr, TQCString prefCharset)
{
if ( aStr.isEmpty() )
- return QString::null;
+ return TQString::null;
- const QCString str = unfold( aStr );
+ const TQCString str = unfold( aStr );
if ( str.isEmpty() )
- return QString::null;
+ return TQString::null;
if ( str.find( "=?" ) < 0 ) {
if ( !prefCharset.isEmpty() ) {
@@ -671,8 +671,8 @@ QString KMMsgBase::decodeRFC2047String(const QCString& aStr, QCString prefCharse
}
}
- QString result;
- QCString LWSP_buffer;
+ TQString result;
+ TQCString LWSP_buffer;
bool lastWasEncodedWord = false;
for ( const char * pos = str.data() ; *pos ; ++pos ) {
@@ -694,7 +694,7 @@ QString KMMsgBase::decodeRFC2047String(const QCString& aStr, QCString prefCharse
const char * const beg = pos;
{
// parse charset name
- QCString charset;
+ TQCString charset;
int i = 2;
pos += 2;
for ( ; *pos != '?' && ( *pos==' ' || ispunct(*pos) || isalnum(*pos) );
@@ -723,11 +723,11 @@ QString KMMsgBase::decodeRFC2047String(const QCString& aStr, QCString prefCharse
const KMime::Codec * c = KMime::Codec::codecForName( encoding );
kdFatal( !c, 5006 ) << "No \"" << encoding << "\" codec!?" << endl;
- QByteArray in; in.setRawData( enc_start, pos - enc_start );
- const QByteArray enc = c->decode( in );
+ TQByteArray in; in.setRawData( enc_start, pos - enc_start );
+ const TQByteArray enc = c->decode( in );
in.resetRawData( enc_start, pos - enc_start );
- const QTextCodec * codec = codecForName(charset);
+ const TQTextCodec * codec = codecForName(charset);
if (!codec) codec = kmkernel->networkCodec();
result += codec->toUnicode(enc);
lastWasEncodedWord = true;
@@ -751,27 +751,27 @@ QString KMMsgBase::decodeRFC2047String(const QCString& aStr, QCString prefCharse
//-----------------------------------------------------------------------------
-static const QCString especials = "()<>@,;:\"/[]?.= \033";
+static const TQCString especials = "()<>@,;:\"/[]?.= \033";
-QCString KMMsgBase::encodeRFC2047Quoted( const QCString & s, bool base64 ) {
+TQCString KMMsgBase::encodeRFC2047Quoted( const TQCString & s, bool base64 ) {
const char * codecName = base64 ? "b" : "q" ;
const KMime::Codec * codec = KMime::Codec::codecForName( codecName );
kdFatal( !codec, 5006 ) << "No \"" << codecName << "\" found!?" << endl;
- QByteArray in; in.setRawData( s.data(), s.length() );
- const QByteArray result = codec->encode( in );
+ TQByteArray in; in.setRawData( s.data(), s.length() );
+ const TQByteArray result = codec->encode( in );
in.resetRawData( s.data(), s.length() );
- return QCString( result.data(), result.size() + 1 );
+ return TQCString( result.data(), result.size() + 1 );
}
-QCString KMMsgBase::encodeRFC2047String(const QString& _str,
- const QCString& charset)
+TQCString KMMsgBase::encodeRFC2047String(const TQString& _str,
+ const TQCString& charset)
{
- static const QString dontQuote = "\"()<>,@";
+ static const TQString dontQuote = "\"()<>,@";
- if (_str.isEmpty()) return QCString();
+ if (_str.isEmpty()) return TQCString();
if (charset == "us-ascii") return toUsAscii(_str);
- QCString cset;
+ TQCString cset;
if (charset.isEmpty())
{
cset = kmkernel->networkCodec()->mimeName();
@@ -779,7 +779,7 @@ QCString KMMsgBase::encodeRFC2047String(const QString& _str,
}
else cset = charset;
- const QTextCodec *codec = codecForName(cset);
+ const TQTextCodec *codec = codecForName(cset);
if (!codec) codec = kmkernel->networkCodec();
unsigned int nonAscii = 0;
@@ -789,7 +789,7 @@ QCString KMMsgBase::encodeRFC2047String(const QString& _str,
bool useBase64 = (nonAscii * 6 > strLength);
unsigned int start, stop, p, pos = 0, encLength;
- QCString result;
+ TQCString result;
bool breakLine = false;
const unsigned int maxLen = 75 - 7 - cset.length();
@@ -856,13 +856,13 @@ QCString KMMsgBase::encodeRFC2047String(const QString& _str,
//-----------------------------------------------------------------------------
-QCString KMMsgBase::encodeRFC2231String( const QString& _str,
- const QCString& charset )
+TQCString KMMsgBase::encodeRFC2231String( const TQString& _str,
+ const TQCString& charset )
{
if ( _str.isEmpty() )
- return QCString();
+ return TQCString();
- QCString cset;
+ TQCString cset;
if ( charset.isEmpty() )
{
cset = kmkernel->networkCodec()->mimeName();
@@ -870,8 +870,8 @@ QCString KMMsgBase::encodeRFC2231String( const QString& _str,
}
else
cset = charset;
- const QTextCodec *codec = codecForName( cset );
- QCString latin;
+ const TQTextCodec *codec = codecForName( cset );
+ TQCString latin;
if ( charset == "us-ascii" )
latin = toUsAscii( _str );
else if ( codec )
@@ -888,7 +888,7 @@ QCString KMMsgBase::encodeRFC2231String( const QString& _str,
if ( !*l )
return latin;
- QCString result = cset + "''";
+ TQCString result = cset + "''";
for ( l = latin.data(); *l; ++l ) {
bool needsQuoting = ( *l & 0x80 );
if( !needsQuoting ) {
@@ -919,14 +919,14 @@ QCString KMMsgBase::encodeRFC2231String( const QString& _str,
//-----------------------------------------------------------------------------
-QString KMMsgBase::decodeRFC2231String(const QCString& _str)
+TQString KMMsgBase::decodeRFC2231String(const TQCString& _str)
{
int p = _str.find('\'');
if (p < 0) return kmkernel->networkCodec()->toUnicode(_str);
- QCString charset = _str.left(p);
+ TQCString charset = _str.left(p);
- QCString st = _str.mid(_str.findRev('\'') + 1);
+ TQCString st = _str.mid(_str.findRev('\'') + 1);
char ch, ch2;
p = 0;
while (p < (int)st.length())
@@ -942,27 +942,27 @@ QString KMMsgBase::decodeRFC2231String(const QCString& _str)
}
p++;
}
- QString result;
- const QTextCodec * codec = codecForName( charset );
+ TQString result;
+ const TQTextCodec * codec = codecForName( charset );
if ( !codec )
codec = kmkernel->networkCodec();
return codec->toUnicode( st );
}
-QCString KMMsgBase::extractRFC2231HeaderField( const QCString &aStr, const QCString &field )
+TQCString KMMsgBase::extractRFC2231HeaderField( const TQCString &aStr, const TQCString &field )
{
int n=-1;
- QCString str;
+ TQCString str;
bool found = false;
while ( n<=0 || found ) {
- QString pattern( field );
+ TQString pattern( field );
pattern += "[*]"; // match a literal * after the fieldname, as defined by RFC 2231
if ( n>=0 ) { // If n<0, check for fieldname*=..., otherwise for fieldname*n=
- pattern += QString::number(n) + "[*]?";
+ pattern += TQString::number(n) + "[*]?";
}
pattern += "=";
- QRegExp fnamePart( pattern, false );
+ TQRegExp fnamePart( pattern, false );
int startPart = fnamePart.search( aStr );
int endPart;
found = ( startPart >= 0 );
@@ -985,20 +985,20 @@ QCString KMMsgBase::extractRFC2231HeaderField( const QCString &aStr, const QCStr
return str;
}
-QString KMMsgBase::base64EncodedMD5( const QString & s, bool utf8 ) {
+TQString KMMsgBase::base64EncodedMD5( const TQString & s, bool utf8 ) {
if (s.stripWhiteSpace().isEmpty()) return "";
if ( utf8 )
- return base64EncodedMD5( s.stripWhiteSpace().utf8() ); // QCString overload
+ return base64EncodedMD5( s.stripWhiteSpace().utf8() ); // TQCString overload
else
return base64EncodedMD5( s.stripWhiteSpace().latin1() ); // const char * overload
}
-QString KMMsgBase::base64EncodedMD5( const QCString & s ) {
+TQString KMMsgBase::base64EncodedMD5( const TQCString & s ) {
if (s.stripWhiteSpace().isEmpty()) return "";
return base64EncodedMD5( s.stripWhiteSpace().data() );
}
-QString KMMsgBase::base64EncodedMD5( const char * s, int len ) {
+TQString KMMsgBase::base64EncodedMD5( const char * s, int len ) {
if (!s || !len) return "";
static const int Base64EncodedMD5Len = 22;
KMD5 md5( s, len );
@@ -1007,20 +1007,20 @@ QString KMMsgBase::base64EncodedMD5( const char * s, int len ) {
//-----------------------------------------------------------------------------
-QCString KMMsgBase::autoDetectCharset(const QCString &_encoding, const QStringList &encodingList, const QString &text)
+TQCString KMMsgBase::autoDetectCharset(const TQCString &_encoding, const TQStringList &encodingList, const TQString &text)
{
- QStringList charsets = encodingList;
+ TQStringList charsets = encodingList;
if (!_encoding.isEmpty())
{
- QString currentCharset = QString::fromLatin1(_encoding);
+ TQString currentCharset = TQString::fromLatin1(_encoding);
charsets.remove(currentCharset);
charsets.prepend(currentCharset);
}
- QStringList::ConstIterator it = charsets.begin();
+ TQStringList::ConstIterator it = charsets.begin();
for (; it != charsets.end(); ++it)
{
- QCString encoding = (*it).latin1();
+ TQCString encoding = (*it).latin1();
if (encoding == "locale")
{
encoding = kmkernel->networkCodec()->mimeName();
@@ -1036,7 +1036,7 @@ QCString KMMsgBase::autoDetectCharset(const QCString &_encoding, const QStringLi
}
else
{
- const QTextCodec *codec = KMMsgBase::codecForName(encoding);
+ const TQTextCodec *codec = KMMsgBase::codecForName(encoding);
if (!codec) {
kdDebug(5006) << "Auto-Charset: Something is wrong and I can not get a codec. [" << encoding << "]" << endl;
} else {
@@ -1078,11 +1078,11 @@ KMMsgAttachmentState KMMsgBase::attachmentState() const
}
//-----------------------------------------------------------------------------
-static void swapEndian(QString &str)
+static void swapEndian(TQString &str)
{
uint len = str.length();
- str = QDeepCopy<QString>(str);
- QChar *unicode = const_cast<QChar*>( str.unicode() );
+ str = TQDeepCopy<TQString>(str);
+ TQChar *unicode = const_cast<TQChar*>( str.unicode() );
for (uint i = 0; i < len; i++)
unicode[i] = kmail_swap_16(unicode[i].unicode());
}
@@ -1108,10 +1108,10 @@ namespace {
}
//-----------------------------------------------------------------------------
-QString KMMsgBase::getStringPart(MsgPartType t) const
+TQString KMMsgBase::getStringPart(MsgPartType t) const
{
retry:
- QString ret;
+ TQString ret;
g_chunk_offset = 0;
bool using_mmap = false;
@@ -1155,10 +1155,10 @@ retry:
goto retry;
}
if(type == t) {
- // This works because the QString constructor does a memcpy.
+ // This works because the TQString constructor does a memcpy.
// Otherwise we would need to be concerned about the alignment.
if(l)
- ret = QString((QChar *)(g_chunk + g_chunk_offset), l/2);
+ ret = TQString((TQChar *)(g_chunk + g_chunk_offset), l/2);
break;
}
g_chunk_offset += l;
@@ -1330,7 +1330,7 @@ const uchar *KMMsgBase::asIndexString(int &length) const
length = 0;
unsigned long tmp;
- QString tmp_str;
+ TQString tmp_str;
//these is at the beginning because it is queried quite often
tmp_str = msgIdMD5().stripWhiteSpace();
@@ -1397,7 +1397,7 @@ bool KMMsgBase::syncIndexString() const
return false;
}
-static QStringList sReplySubjPrefixes, sForwardSubjPrefixes;
+static TQStringList sReplySubjPrefixes, sForwardSubjPrefixes;
static bool sReplaceSubjPrefix, sReplaceForwSubjPrefix;
//-----------------------------------------------------------------------------
@@ -1416,26 +1416,26 @@ void KMMsgBase::readConfig()
//-----------------------------------------------------------------------------
// static
-QString KMMsgBase::stripOffPrefixes( const QString& str )
+TQString KMMsgBase::stripOffPrefixes( const TQString& str )
{
return replacePrefixes( str, sReplySubjPrefixes + sForwardSubjPrefixes,
- true, QString::null ).stripWhiteSpace();
+ true, TQString::null ).stripWhiteSpace();
}
//-----------------------------------------------------------------------------
// static
-QString KMMsgBase::replacePrefixes( const QString& str,
- const QStringList& prefixRegExps,
+TQString KMMsgBase::replacePrefixes( const TQString& str,
+ const TQStringList& prefixRegExps,
bool replace,
- const QString& newPrefix )
+ const TQString& newPrefix )
{
bool recognized = false;
// construct a big regexp that
// 1. is anchored to the beginning of str (sans whitespace)
// 2. matches at least one of the part regexps in prefixRegExps
- QString bigRegExp = QString::fromLatin1("^(?:\\s+|(?:%1))+\\s*")
+ TQString bigRegExp = TQString::fromLatin1("^(?:\\s+|(?:%1))+\\s*")
.arg( prefixRegExps.join(")|(?:") );
- QRegExp rx( bigRegExp, false /*case insens.*/ );
+ TQRegExp rx( bigRegExp, false /*case insens.*/ );
if ( !rx.isValid() ) {
kdWarning(5006) << "KMMessage::replacePrefixes(): bigRegExp = \""
<< bigRegExp << "\"\n"
@@ -1443,7 +1443,7 @@ QString KMMsgBase::replacePrefixes( const QString& str,
// try good ole Re/Fwd:
recognized = str.startsWith( newPrefix );
} else { // valid rx
- QString tmp = str;
+ TQString tmp = str;
if ( rx.search( tmp ) == 0 ) {
recognized = true;
if ( replace )
@@ -1457,27 +1457,27 @@ QString KMMsgBase::replacePrefixes( const QString& str,
}
//-----------------------------------------------------------------------------
-QString KMMsgBase::cleanSubject() const
+TQString KMMsgBase::cleanSubject() const
{
return cleanSubject( sReplySubjPrefixes + sForwardSubjPrefixes,
- true, QString::null ).stripWhiteSpace();
+ true, TQString::null ).stripWhiteSpace();
}
//-----------------------------------------------------------------------------
-QString KMMsgBase::cleanSubject( const QStringList & prefixRegExps,
+TQString KMMsgBase::cleanSubject( const TQStringList & prefixRegExps,
bool replace,
- const QString & newPrefix ) const
+ const TQString & newPrefix ) const
{
return KMMsgBase::replacePrefixes( subject(), prefixRegExps, replace,
newPrefix );
}
//-----------------------------------------------------------------------------
-QString KMMsgBase::forwardSubject() const {
+TQString KMMsgBase::forwardSubject() const {
return cleanSubject( sForwardSubjPrefixes, sReplaceForwSubjPrefix, "Fwd:" );
}
//-----------------------------------------------------------------------------
-QString KMMsgBase::replySubject() const {
+TQString KMMsgBase::replySubject() const {
return cleanSubject( sReplySubjPrefixes, sReplaceSubjPrefix, "Re:" );
}
diff --git a/kmail/kmmsgbase.h b/kmail/kmmsgbase.h
index 355666823..9e7d70cb0 100644
--- a/kmail/kmmsgbase.h
+++ b/kmail/kmmsgbase.h
@@ -23,7 +23,7 @@
// for large file support flags
#include <config.h>
#include <sys/types.h>
-#include <qstring.h>
+#include <tqstring.h>
#include <time.h>
class QCString;
@@ -149,10 +149,10 @@ public:
void setParent(KMFolder* p) { mParent = p; }
/** Convert the given message status to a string. */
- static QCString statusToStr(const KMMsgStatus status);
+ static TQCString statusToStr(const KMMsgStatus status);
/** Convert the given message status to a string. */
- QString statusToSortRank();
+ TQString statusToSortRank();
/** Returns TRUE if object is a real message (not KMMsgInfo or KMMsgBase) */
virtual bool isMessage(void) const;
@@ -240,28 +240,28 @@ public:
/** Set encryption status of the message and mark dirty. Optional
* optimization: @p idx may specify the index of this message within
* the parent folder. */
- virtual void setEncryptionStateChar( QChar status, int idx = -1 );
+ virtual void setEncryptionStateChar( TQChar status, int idx = -1 );
/** Set signature status of the message and mark dirty. Optional
* optimization: @p idx may specify the index of this message within
* the parent folder. */
- virtual void setSignatureStateChar( QChar status, int idx = -1 );
+ virtual void setSignatureStateChar( TQChar status, int idx = -1 );
/** Important header fields of the message that are also kept in the index. */
- virtual QString subject(void) const = 0;
- virtual QString fromStrip(void) const = 0;
- virtual QString toStrip(void) const = 0;
- virtual QString replyToIdMD5(void) const = 0;
- virtual QString msgIdMD5(void) const = 0;
- virtual QString replyToAuxIdMD5() const = 0;
- virtual QString strippedSubjectMD5() const = 0;
+ virtual TQString subject(void) const = 0;
+ virtual TQString fromStrip(void) const = 0;
+ virtual TQString toStrip(void) const = 0;
+ virtual TQString replyToIdMD5(void) const = 0;
+ virtual TQString msgIdMD5(void) const = 0;
+ virtual TQString replyToAuxIdMD5() const = 0;
+ virtual TQString strippedSubjectMD5() const = 0;
virtual bool subjectIsPrefixed() const = 0;
virtual time_t date(void) const = 0;
- virtual QString dateStr(void) const;
- virtual QString xmark(void) const = 0;
+ virtual TQString dateStr(void) const;
+ virtual TQString xmark(void) const = 0;
/** Set date. */
- virtual void setDate(const QCString &aStrDate);
+ virtual void setDate(const TQCString &aStrDate);
virtual void setDate(time_t aUnixTime) = 0;
/** Returns TRUE if changed since last folder-sync. */
@@ -271,8 +271,8 @@ public:
void setDirty(bool b) { mDirty = b; }
/** Set subject/from/date and xmark. */
- virtual void setSubject(const QString&) = 0;
- virtual void setXMark(const QString&) = 0;
+ virtual void setSubject(const TQString&) = 0;
+ virtual void setXMark(const TQString&) = 0;
/** Calculate strippedSubject */
virtual void initStrippedSubjectMD5() = 0;
@@ -285,8 +285,8 @@ public:
virtual void setFolderOffset(off_t offs) = 0;
/** Get/set msg filename */
- virtual QString fileName(void) const = 0;
- virtual void setFileName(const QString& filename) = 0;
+ virtual TQString fileName(void) const = 0;
+ virtual void setFileName(const TQString& filename) = 0;
/** Get/set size of message including the whole header in bytes. */
virtual size_t msgSize(void) const = 0;
@@ -312,20 +312,20 @@ public:
* (e.g. ':' or ',') and skip the then following blanks (if any) too.
* If keywordFound is specified it will be TRUE if a keyword was skipped
* and FALSE otherwise. */
- static QString skipKeyword(const QString& str, QChar sepChar=':',
+ static TQString skipKeyword(const TQString& str, TQChar sepChar=':',
bool* keywordFound=0);
- /** Return a QTextCodec for the specified charset.
- * This function is a bit more tolerant, than QTextCodec::codecForName */
- static const QTextCodec* codecForName(const QCString& _str);
+ /** Return a TQTextCodec for the specified charset.
+ * This function is a bit more tolerant, than TQTextCodec::codecForName */
+ static const TQTextCodec* codecForName(const TQCString& _str);
/** Convert all non-ascii characters to question marks
* If ok is non-null, *ok will be set to true if all characters
* where ascii, *ok will be set to false otherwise */
- static QCString toUsAscii(const QString& _str, bool *ok=0);
+ static TQCString toUsAscii(const TQString& _str, bool *ok=0);
/** Return a list of the supported encodings */
- static QStringList supportedEncodings(bool usAscii);
+ static TQStringList supportedEncodings(bool usAscii);
/** Copy all values from other to this object. */
void assign(const KMMsgBase* other);
@@ -337,43 +337,43 @@ public:
KMMsgBase( const KMMsgBase& other );
/** Helper function for encodeRFC2047String */
- static QCString encodeRFC2047Quoted(const QCString& aStr, bool base64);
+ static TQCString encodeRFC2047Quoted(const TQCString& aStr, bool base64);
/** This function handles both encodings described in RFC2047:
Base64 ("=?iso-8859-1?b?...?=") and quoted-printable */
- static QString decodeRFC2047String(const QCString& aStr, const QCString prefCharset = "");
+ static TQString decodeRFC2047String(const TQCString& aStr, const TQCString prefCharset = "");
/** Encode given string as described in RFC2047:
using quoted-printable. */
- static QCString encodeRFC2047String(const QString& aStr,
- const QCString& charset);
+ static TQCString encodeRFC2047String(const TQString& aStr,
+ const TQCString& charset);
/** Encode given string as described in RFC2231
(parameters in MIME headers) */
- static QCString encodeRFC2231String(const QString& aStr,
- const QCString& charset);
+ static TQCString encodeRFC2231String(const TQString& aStr,
+ const TQCString& charset);
/** Decode given string as described in RFC2231 */
- static QString decodeRFC2231String(const QCString& aStr);
+ static TQString decodeRFC2231String(const TQCString& aStr);
/** Extract a given param from the RFC2231-encoded header field, in particular
concatenate possibly multiple entries, which are given as paramname*0=..;
paramname*1=..; ... or paramname*0*=..; paramname*1*=..; ... and return
their value as one string. That string will still be encoded */
- static QCString extractRFC2231HeaderField( const QCString &aStr, const QCString &field );
+ static TQCString extractRFC2231HeaderField( const TQCString &aStr, const TQCString &field );
/** Calculate the base64 encoded md5sum (sans the trailing equal
- signs). If @p utf8 is false, uses QString::latin1() to calculate
- the md5sum of, else uses QString::utf8() */
- static QString base64EncodedMD5( const QString & aStr, bool utf8=false );
- static QString base64EncodedMD5( const QCString & aStr );
- static QString base64EncodedMD5( const char * aStr, int len=-1 );
+ signs). If @p utf8 is false, uses TQString::latin1() to calculate
+ the md5sum of, else uses TQString::utf8() */
+ static TQString base64EncodedMD5( const TQString & aStr, bool utf8=false );
+ static TQString base64EncodedMD5( const TQCString & aStr );
+ static TQString base64EncodedMD5( const char * aStr, int len=-1 );
/**
* Find out preferred charset for 'text'.
* First @p encoding is tried and if that one is not suitable,
* the encodings in @p encodingList are tried.
*/
- static QCString autoDetectCharset(const QCString &encoding, const QStringList &encodingList, const QString &text);
+ static TQCString autoDetectCharset(const TQCString &encoding, const TQStringList &encodingList, const TQString &text);
/** Returns the message serial number for the message. */
virtual unsigned long getMsgSerNum() const;
@@ -391,14 +391,14 @@ public:
sequence of whitespace-delimited prefixes at the beginning of
@p str is replaced by @p newPrefix.
**/
- static QString replacePrefixes( const QString& str,
- const QStringList& prefixRegExps,
+ static TQString replacePrefixes( const TQString& str,
+ const TQStringList& prefixRegExps,
bool replace,
- const QString& newPrefix );
+ const TQString& newPrefix );
/** Returns @p str with all "forward" and "reply" prefixes stripped off.
**/
- static QString stripOffPrefixes( const QString& str );
+ static TQString stripOffPrefixes( const TQString& str );
/** Check for prefixes @p prefixRegExps in #subject(). If none
is found, @p newPrefix + ' ' is prepended to the subject and the
@@ -406,18 +406,18 @@ public:
sequence of whitespace-delimited prefixes at the beginning of
#subject() is replaced by @p newPrefix
**/
- QString cleanSubject(const QStringList& prefixRegExps, bool replace,
- const QString& newPrefix) const;
+ TQString cleanSubject(const TQStringList& prefixRegExps, bool replace,
+ const TQString& newPrefix) const;
/** Return this mails subject, with all "forward" and "reply"
prefixes removed */
- QString cleanSubject() const;
+ TQString cleanSubject() const;
/** Return this mails subject, formatted for "forward" mails */
- QString forwardSubject() const;
+ TQString forwardSubject() const;
/** Return this mails subject, formatted for "reply" mails */
- QString replySubject() const;
+ TQString replySubject() const;
/** Reads config settings from group "Composer" and sets all internal
* variables (e.g. indent-prefix, etc.) */
@@ -464,7 +464,7 @@ public:
/** access to long msgparts */
off_t getLongPart(MsgPartType) const;
/** access to string msgparts */
- QString getStringPart(MsgPartType) const;
+ TQString getStringPart(MsgPartType) const;
/** sync'ing just one KMMsgBase */
bool syncIndexString() const;
};
diff --git a/kmail/kmmsgdict.cpp b/kmail/kmmsgdict.cpp
index 6f834e02d..bedc3bb44 100644
--- a/kmail/kmmsgdict.cpp
+++ b/kmail/kmmsgdict.cpp
@@ -8,7 +8,7 @@
#include "globalsettings.h"
#include "folderstorage.h"
-#include <qfileinfo.h>
+#include <tqfileinfo.h>
#include <kdebug.h>
#include <kstaticdeleter.h>
@@ -133,7 +133,7 @@ public:
}
public:
- QMemArray<KMMsgDictEntry *> array;
+ TQMemArray<KMMsgDictEntry *> array;
FILE *fp;
bool swapByteOrder;
off_t baseOffset;
@@ -356,9 +356,9 @@ unsigned long KMMsgDict::getMsgSerNum(KMFolder *folder, int index) const
//-----------------------------------------------------------------------------
//static
-QValueList<unsigned long> KMMsgDict::serNumList(QPtrList<KMMsgBase> msgList)
+TQValueList<unsigned long> KMMsgDict::serNumList(TQPtrList<KMMsgBase> msgList)
{
- QValueList<unsigned long> ret;
+ TQValueList<unsigned long> ret;
for ( unsigned int i = 0; i < msgList.count(); i++ ) {
unsigned long serNum = msgList.at(i)->getMsgSerNum();
assert( serNum );
@@ -369,7 +369,7 @@ QValueList<unsigned long> KMMsgDict::serNumList(QPtrList<KMMsgBase> msgList)
//-----------------------------------------------------------------------------
-QString KMMsgDict::getFolderIdsLocation( const FolderStorage &storage )
+TQString KMMsgDict::getFolderIdsLocation( const FolderStorage &storage )
{
return storage.indexLocation() + ".ids";
}
@@ -380,8 +380,8 @@ bool KMMsgDict::isFolderIdsOutdated( const FolderStorage &storage )
{
bool outdated = false;
- QFileInfo indexInfo( storage.indexLocation() );
- QFileInfo idsInfo( getFolderIdsLocation( storage ) );
+ TQFileInfo indexInfo( storage.indexLocation() );
+ TQFileInfo idsInfo( getFolderIdsLocation( storage ) );
if (!indexInfo.exists() || !idsInfo.exists())
outdated = true;
@@ -398,8 +398,8 @@ int KMMsgDict::readFolderIds( FolderStorage& storage )
if ( isFolderIdsOutdated( storage ) )
return -1;
- QString filename = getFolderIdsLocation( storage );
- FILE *fp = fopen(QFile::encodeName(filename), "r+");
+ TQString filename = getFolderIdsLocation( storage );
+ FILE *fp = fopen(TQFile::encodeName(filename), "r+");
if (!fp)
return -1;
@@ -491,8 +491,8 @@ KMMsgDictREntry *KMMsgDict::openFolderIds( const FolderStorage& storage, bool tr
}
if (!rentry->fp) {
- QString filename = getFolderIdsLocation( storage );
- FILE *fp = truncate ? 0 : fopen(QFile::encodeName(filename), "r+");
+ TQString filename = getFolderIdsLocation( storage );
+ FILE *fp = truncate ? 0 : fopen(TQFile::encodeName(filename), "r+");
if (fp)
{
int version = 0;
@@ -512,7 +512,7 @@ KMMsgDictREntry *KMMsgDict::openFolderIds( const FolderStorage& storage, bool tr
if (!fp)
{
- fp = fopen(QFile::encodeName(filename), "w+");
+ fp = fopen(TQFile::encodeName(filename), "w+");
if (!fp)
{
kdDebug(5006) << "Dict '" << filename
@@ -561,8 +561,8 @@ int KMMsgDict::writeFolderIds( const FolderStorage &storage )
rentry->sync();
off_t eof = ftell(fp);
- QString filename = getFolderIdsLocation( storage );
- truncate(QFile::encodeName(filename), eof);
+ TQString filename = getFolderIdsLocation( storage );
+ truncate(TQFile::encodeName(filename), eof);
fclose(rentry->fp);
rentry->fp = 0;
@@ -646,6 +646,6 @@ bool KMMsgDict::hasFolderIds( const FolderStorage& storage )
bool KMMsgDict::removeFolderIds( FolderStorage& storage )
{
storage.setRDict( 0 );
- QString filename = getFolderIdsLocation( storage );
- return unlink( QFile::encodeName( filename) );
+ TQString filename = getFolderIdsLocation( storage );
+ return unlink( TQFile::encodeName( filename) );
}
diff --git a/kmail/kmmsgdict.h b/kmail/kmmsgdict.h
index 0a4978e56..99332dd20 100644
--- a/kmail/kmmsgdict.h
+++ b/kmail/kmmsgdict.h
@@ -20,8 +20,8 @@
#ifndef __KMMSGDICT
#define __KMMSGDICT
-#include <qvaluelist.h>
-#include <qptrlist.h>
+#include <tqvaluelist.h>
+#include <tqptrlist.h>
class KMFolder;
class KMMsgBase;
@@ -72,7 +72,7 @@ class KMMsgDict
unsigned long getMsgSerNum( KMFolder *folder, int index ) const;
/** Convert a list of KMMsgBase pointers to a list of serial numbers */
- static QValueList<unsigned long> serNumList(QPtrList<KMMsgBase> msgList);
+ static TQValueList<unsigned long> serNumList(TQPtrList<KMMsgBase> msgList);
private:
/* FIXME It would be better to do without these, they are the classes
@@ -113,7 +113,7 @@ private:
// ----- per folder serial number on-disk structure handling ("ids files")
/** Returns the name of the .folder.index.ids file. */
- static QString getFolderIdsLocation( const FolderStorage &folder );
+ static TQString getFolderIdsLocation( const FolderStorage &folder );
/** Returns TRUE if the .folder.index.ids file should not be read. */
bool isFolderIdsOutdated( const FolderStorage &folder );
diff --git a/kmail/kmmsginfo.cpp b/kmail/kmmsginfo.cpp
index 67c33588a..3b1112dc4 100644
--- a/kmail/kmmsginfo.cpp
+++ b/kmail/kmmsginfo.cpp
@@ -27,7 +27,7 @@ public:
ALL_SET = 0xFFFFFF, NONE_SET = 0x000000
};
uint modifiers;
- QString subject, from, to, replyToIdMD5, replyToAuxIdMD5,
+ TQString subject, from, to, replyToIdMD5, replyToAuxIdMD5,
strippedSubjectMD5, msgIdMD5, xmark, file;
off_t folderOffset;
size_t msgSize, msgSizeServer;
@@ -178,15 +178,15 @@ KMMsgInfo& KMMsgInfo::operator=(const KMMessage& msg)
}
//-----------------------------------------------------------------------------
-void KMMsgInfo::init(const QCString& aSubject, const QCString& aFrom,
- const QCString& aTo, time_t aDate,
- KMMsgStatus aStatus, const QCString& aXMark,
- const QCString& replyToId, const QCString& replyToAuxId,
- const QCString& msgId,
+void KMMsgInfo::init(const TQCString& aSubject, const TQCString& aFrom,
+ const TQCString& aTo, time_t aDate,
+ KMMsgStatus aStatus, const TQCString& aXMark,
+ const TQCString& replyToId, const TQCString& replyToAuxId,
+ const TQCString& msgId,
KMMsgEncryptionState encryptionState,
KMMsgSignatureState signatureState,
KMMsgMDNSentState mdnSentState,
- const QCString& prefCharset,
+ const TQCString& prefCharset,
off_t aFolderOffset, size_t aMsgSize,
size_t aMsgSizeServer, ulong aUID)
{
@@ -216,16 +216,16 @@ void KMMsgInfo::init(const QCString& aSubject, const QCString& aFrom,
mDirty = false;
}
-void KMMsgInfo::init(const QCString& aSubject, const QCString& aFrom,
- const QCString& aTo, time_t aDate,
- KMMsgStatus aStatus, const QCString& aXMark,
- const QCString& replyToId, const QCString& replyToAuxId,
- const QCString& msgId,
- const QCString& aFileName,
+void KMMsgInfo::init(const TQCString& aSubject, const TQCString& aFrom,
+ const TQCString& aTo, time_t aDate,
+ KMMsgStatus aStatus, const TQCString& aXMark,
+ const TQCString& replyToId, const TQCString& replyToAuxId,
+ const TQCString& msgId,
+ const TQCString& aFileName,
KMMsgEncryptionState encryptionState,
KMMsgSignatureState signatureState,
KMMsgMDNSentState mdnSentState,
- const QCString& prefCharset,
+ const TQCString& prefCharset,
size_t aMsgSize,
size_t aMsgSizeServer, ulong aUID)
{
@@ -238,7 +238,7 @@ void KMMsgInfo::init(const QCString& aSubject, const QCString& aFrom,
//-----------------------------------------------------------------------------
-QString KMMsgInfo::subject(void) const
+TQString KMMsgInfo::subject(void) const
{
if (kd && kd->modifiers & KMMsgInfoPrivate::SUBJECT_SET)
return kd->subject;
@@ -247,7 +247,7 @@ QString KMMsgInfo::subject(void) const
//-----------------------------------------------------------------------------
-QString KMMsgInfo::fromStrip(void) const
+TQString KMMsgInfo::fromStrip(void) const
{
if (kd && kd->modifiers & KMMsgInfoPrivate::FROM_SET)
return kd->from;
@@ -255,7 +255,7 @@ QString KMMsgInfo::fromStrip(void) const
}
//-----------------------------------------------------------------------------
-QString KMMsgInfo::fileName(void) const
+TQString KMMsgInfo::fileName(void) const
{
if (kd && kd->modifiers & KMMsgInfoPrivate::FILE_SET)
return kd->file;
@@ -264,7 +264,7 @@ QString KMMsgInfo::fileName(void) const
//-----------------------------------------------------------------------------
-QString KMMsgInfo::toStrip(void) const
+TQString KMMsgInfo::toStrip(void) const
{
if (kd && kd->modifiers & KMMsgInfoPrivate::TO_SET)
return kd->to;
@@ -272,7 +272,7 @@ QString KMMsgInfo::toStrip(void) const
}
//-----------------------------------------------------------------------------
-QString KMMsgInfo::xmark(void) const
+TQString KMMsgInfo::xmark(void) const
{
if (kd && kd->modifiers & KMMsgInfoPrivate::XMARK_SET)
return kd->xmark;
@@ -281,7 +281,7 @@ QString KMMsgInfo::xmark(void) const
//-----------------------------------------------------------------------------
-QString KMMsgInfo::replyToIdMD5(void) const
+TQString KMMsgInfo::replyToIdMD5(void) const
{
if (kd && kd->modifiers & KMMsgInfoPrivate::REPLYTO_SET)
return kd->replyToIdMD5;
@@ -289,7 +289,7 @@ QString KMMsgInfo::replyToIdMD5(void) const
}
//-----------------------------------------------------------------------------
-QString KMMsgInfo::replyToAuxIdMD5() const
+TQString KMMsgInfo::replyToAuxIdMD5() const
{
if( kd && kd->modifiers & KMMsgInfoPrivate::REPLYTOAUX_SET )
return kd->replyToAuxIdMD5;
@@ -297,7 +297,7 @@ QString KMMsgInfo::replyToAuxIdMD5() const
}
//-----------------------------------------------------------------------------
-QString KMMsgInfo::strippedSubjectMD5() const
+TQString KMMsgInfo::strippedSubjectMD5() const
{
if( kd && kd->modifiers & KMMsgInfoPrivate::STRIPPEDSUBJECT_SET )
return kd->strippedSubjectMD5;
@@ -312,7 +312,7 @@ bool KMMsgInfo::subjectIsPrefixed() const
}
//-----------------------------------------------------------------------------
-QString KMMsgInfo::msgIdMD5(void) const
+TQString KMMsgInfo::msgIdMD5(void) const
{
if (kd && kd->modifiers & KMMsgInfoPrivate::MSGID_SET)
return kd->msgIdMD5;
@@ -321,7 +321,7 @@ QString KMMsgInfo::msgIdMD5(void) const
//-----------------------------------------------------------------------------
-void KMMsgInfo::setSubject(const QString& aSubject)
+void KMMsgInfo::setSubject(const TQString& aSubject)
{
if(aSubject == subject())
return;
@@ -335,7 +335,7 @@ void KMMsgInfo::setSubject(const QString& aSubject)
//-----------------------------------------------------------------------------
-void KMMsgInfo::setXMark(const QString& aXMark)
+void KMMsgInfo::setXMark(const TQString& aXMark)
{
if (aXMark == xmark())
return;
@@ -349,7 +349,7 @@ void KMMsgInfo::setXMark(const QString& aXMark)
//-----------------------------------------------------------------------------
-void KMMsgInfo::setReplyToIdMD5(const QString& aReplyToIdMD5)
+void KMMsgInfo::setReplyToIdMD5(const TQString& aReplyToIdMD5)
{
if (aReplyToIdMD5 == replyToIdMD5())
return;
@@ -363,7 +363,7 @@ void KMMsgInfo::setReplyToIdMD5(const QString& aReplyToIdMD5)
//-----------------------------------------------------------------------------
-void KMMsgInfo::setReplyToAuxIdMD5( const QString& aReplyToAuxIdMD5 )
+void KMMsgInfo::setReplyToAuxIdMD5( const TQString& aReplyToAuxIdMD5 )
{
if( aReplyToAuxIdMD5 == replyToAuxIdMD5() )
return;
@@ -381,8 +381,8 @@ void KMMsgInfo::initStrippedSubjectMD5()
{
if( kd && kd->modifiers & KMMsgInfoPrivate::STRIPPEDSUBJECT_SET )
return;
- QString rawSubject = KMMessage::stripOffPrefixes( subject() );
- QString subjectMD5 = base64EncodedMD5( rawSubject, true /*utf8*/ );
+ TQString rawSubject = KMMessage::stripOffPrefixes( subject() );
+ TQString subjectMD5 = base64EncodedMD5( rawSubject, true /*utf8*/ );
if( !kd )
kd = new KMMsgInfoPrivate;
kd->modifiers |= KMMsgInfoPrivate::STRIPPEDSUBJECT_SET;
@@ -392,7 +392,7 @@ void KMMsgInfo::initStrippedSubjectMD5()
//-----------------------------------------------------------------------------
-void KMMsgInfo::setMsgIdMD5(const QString& aMsgIdMD5)
+void KMMsgInfo::setMsgIdMD5(const TQString& aMsgIdMD5)
{
if (aMsgIdMD5 == msgIdMD5())
return;
@@ -623,7 +623,7 @@ void KMMsgInfo::setFolderOffset(off_t offs)
}
//-----------------------------------------------------------------------------
-void KMMsgInfo::setFileName(const QString& file)
+void KMMsgInfo::setFileName(const TQString& file)
{
if (fileName() == file)
return;
@@ -657,7 +657,7 @@ void KMMsgInfo::setDate(time_t aUnixTime)
}
//--- For compatability with old index files
-void KMMsgInfo::compat_fromOldIndexString(const QCString& str, bool toUtf8)
+void KMMsgInfo::compat_fromOldIndexString(const TQCString& str, bool toUtf8)
{
char *start, *offset;
@@ -676,15 +676,15 @@ void KMMsgInfo::compat_fromOldIndexString(const QCString& str, bool toUtf8)
} else {
start = offset = str.data() + 37;
while (*start == ' ' && start - offset < 100) start++;
- kd->subject = QString::fromUtf8(str.mid(start - str.data(),
+ kd->subject = TQString::fromUtf8(str.mid(start - str.data(),
100 - (start - offset)), 100 - (start - offset));
start = offset = str.data() + 138;
while (*start == ' ' && start - offset < 50) start++;
- kd->from = QString::fromUtf8(str.mid(start - str.data(),
+ kd->from = TQString::fromUtf8(str.mid(start - str.data(),
50 - (start - offset)), 50 - (start - offset));
start = offset = str.data() + 189;
while (*start == ' ' && start - offset < 50) start++;
- kd->to = QString::fromUtf8(str.mid(start - str.data(),
+ kd->to = TQString::fromUtf8(str.mid(start - str.data(),
50 - (start - offset)), 50 - (start - offset));
}
kd->replyToIdMD5 = str.mid(240, 22).stripWhiteSpace();
diff --git a/kmail/kmmsginfo.h b/kmail/kmmsginfo.h
index e4db8d47d..043830200 100644
--- a/kmail/kmmsginfo.h
+++ b/kmail/kmmsginfo.h
@@ -33,49 +33,49 @@ public:
virtual ~KMMsgInfo();
/** left for old style index files */
- void compat_fromOldIndexString(const QCString& str, bool toUtf8);
+ void compat_fromOldIndexString(const TQCString& str, bool toUtf8);
/** Initialize with given values and set dirty flag to FALSE. */
- virtual void init(const QCString& subject, const QCString& from,
- const QCString& to, time_t date,
- KMMsgStatus status, const QCString& xmark,
- const QCString& replyToId,
- const QCString& replyToAuxId,
- const QCString& msgId,
+ virtual void init(const TQCString& subject, const TQCString& from,
+ const TQCString& to, time_t date,
+ KMMsgStatus status, const TQCString& xmark,
+ const TQCString& replyToId,
+ const TQCString& replyToAuxId,
+ const TQCString& msgId,
KMMsgEncryptionState encryptionState,
KMMsgSignatureState signatureState,
KMMsgMDNSentState mdnSentState,
- const QCString& prefCharset,
+ const TQCString& prefCharset,
off_t folderOffset=0, size_t msgSize=0,
size_t msgSizeServer = 0, ulong UID = 0);
/** Initialize with given values and set dirty flag to FALSE. */
- virtual void init(const QCString& subject, const QCString& from,
- const QCString& to, time_t date,
- KMMsgStatus status, const QCString& xmark,
- const QCString& replyToId,
- const QCString& replyToAuxId,
- const QCString& msgId,
- const QCString& fileName,
+ virtual void init(const TQCString& subject, const TQCString& from,
+ const TQCString& to, time_t date,
+ KMMsgStatus status, const TQCString& xmark,
+ const TQCString& replyToId,
+ const TQCString& replyToAuxId,
+ const TQCString& msgId,
+ const TQCString& fileName,
KMMsgEncryptionState encryptionState,
KMMsgSignatureState signatureState,
KMMsgMDNSentState mdnSentState,
- const QCString& prefCharset,
+ const TQCString& prefCharset,
size_t msgSize=0,
size_t msgSizeServer = 0, ulong UID = 0);
/** Inherited methods (see KMMsgBase for description): */
- virtual QString subject(void) const;
- virtual QString fromStrip(void) const;
- virtual QString toStrip(void) const;
- virtual QString xmark(void) const;
- virtual QString replyToIdMD5(void) const;
- virtual QString replyToAuxIdMD5() const;
- virtual QString strippedSubjectMD5() const;
+ virtual TQString subject(void) const;
+ virtual TQString fromStrip(void) const;
+ virtual TQString toStrip(void) const;
+ virtual TQString xmark(void) const;
+ virtual TQString replyToIdMD5(void) const;
+ virtual TQString replyToAuxIdMD5() const;
+ virtual TQString strippedSubjectMD5() const;
virtual bool subjectIsPrefixed() const;
- virtual QString msgIdMD5(void) const;
- virtual QString fileName(void) const;
+ virtual TQString msgIdMD5(void) const;
+ virtual TQString fileName(void) const;
virtual KMMsgStatus status(void) const;
virtual KMMsgEncryptionState encryptionState() const;
virtual KMMsgSignatureState signatureState() const;
@@ -88,15 +88,15 @@ public:
void setMsgSize(size_t sz);
void setMsgSizeServer(size_t sz);
void setFolderOffset(off_t offs);
- void setFileName(const QString& file);
+ void setFileName(const TQString& file);
virtual void setStatus(const KMMsgStatus status, int idx = -1);
virtual void setDate(time_t aUnixTime);
- virtual void setSubject(const QString&);
- virtual void setXMark(const QString&);
- virtual void setReplyToIdMD5(const QString&);
- virtual void setReplyToAuxIdMD5( const QString& );
+ virtual void setSubject(const TQString&);
+ virtual void setXMark(const TQString&);
+ virtual void setReplyToIdMD5(const TQString&);
+ virtual void setReplyToAuxIdMD5( const TQString& );
virtual void initStrippedSubjectMD5();
- virtual void setMsgIdMD5(const QString&);
+ virtual void setMsgIdMD5(const TQString&);
virtual void setEncryptionState( const KMMsgEncryptionState, int idx = -1 );
virtual void setSignatureState( const KMMsgSignatureState, int idx = -1 );
virtual void setMDNSentState( const KMMsgMDNSentState, int idx = -1 );
diff --git a/kmail/kmmsglist.cpp b/kmail/kmmsglist.cpp
index b5af84894..9689467b4 100644
--- a/kmail/kmmsglist.cpp
+++ b/kmail/kmmsglist.cpp
@@ -12,12 +12,12 @@
//-----------------------------------------------------------------------------
KMMsgList::KMMsgList(int initSize)
- : QMemArray<KMMsgBase*>(initSize),
+ : TQMemArray<KMMsgBase*>(initSize),
mHigh( 0 ), mCount( 0 )
{
if ( size() > 0 )
for (unsigned int i=size(); i>0; i--)
- QMemArray<KMMsgBase*>::at(i-1) = 0;
+ TQMemArray<KMMsgBase*>::at(i-1) = 0;
}
@@ -69,7 +69,7 @@ bool KMMsgList::resize(unsigned int aSize)
}
// do the resizing
- if (!QMemArray<KMMsgBase*>::resize(aSize)) return FALSE;
+ if (!TQMemArray<KMMsgBase*>::resize(aSize)) return FALSE;
// initialize new elements
for (i=oldSize; i<aSize; i++)
diff --git a/kmail/kmmsglist.h b/kmail/kmmsglist.h
index 1319fde40..83d9e8dbe 100644
--- a/kmail/kmmsglist.h
+++ b/kmail/kmmsglist.h
@@ -22,7 +22,7 @@
#include "kmmsgbase.h"
-#include <qmemarray.h>
+#include <tqmemarray.h>
/**
* @short An abstraction of an array of pointers to messages.
@@ -34,7 +34,7 @@
*
* @author Stefan Taferner <taferner@kde.org>
*/
-class KMMsgList: public QMemArray<KMMsgBase*>
+class KMMsgList: public TQMemArray<KMMsgBase*>
{
public:
diff --git a/kmail/kmmsgpart.cpp b/kmail/kmmsgpart.cpp
index 48dc55ca8..085e36c0f 100644
--- a/kmail/kmmsgpart.cpp
+++ b/kmail/kmmsgpart.cpp
@@ -20,7 +20,7 @@
#include <mimelib/string.h>
#include <kiconloader.h>
-#include <qtextcodec.h>
+#include <tqtextcodec.h>
#include <assert.h>
@@ -34,7 +34,7 @@ KMMessagePart::KMMessagePart()
}
//-----------------------------------------------------------------------------
-KMMessagePart::KMMessagePart( QDataStream & stream )
+KMMessagePart::KMMessagePart( TQDataStream & stream )
: mParent(0), mLoadHeaders(false), mLoadPart(false)
{
unsigned long size;
@@ -62,19 +62,19 @@ KMMessagePart::~KMMessagePart()
//-----------------------------------------------------------------------------
void KMMessagePart::clear()
{
- mOriginalContentTypeStr = QCString();
+ mOriginalContentTypeStr = TQCString();
mType = "text";
mSubtype = "plain";
mCte = "7bit";
- mContentDescription = QCString();
- mContentDisposition = QCString();
+ mContentDescription = TQCString();
+ mContentDisposition = TQCString();
mBody.truncate( 0 );
- mAdditionalCTypeParamStr = QCString();
- mName = QString::null;
- mParameterAttribute = QCString();
- mParameterValue = QString::null;
- mCharset = QCString();
- mPartSpecifier = QString::null;
+ mAdditionalCTypeParamStr = TQCString();
+ mName = TQString::null;
+ mParameterAttribute = TQCString();
+ mParameterValue = TQString::null;
+ mCharset = TQCString();
+ mPartSpecifier = TQString::null;
mBodyDecodedSize = 0;
mParent = 0;
mLoadHeaders = false;
@@ -101,7 +101,7 @@ int KMMessagePart::decodedSize(void) const
//-----------------------------------------------------------------------------
-void KMMessagePart::setBody(const QCString &aStr)
+void KMMessagePart::setBody(const TQCString &aStr)
{
KMail::Util::setFromQCString( mBody, aStr );
@@ -123,7 +123,7 @@ void KMMessagePart::setBody(const DwString &aStr)
mBodyDecodedSize = -1; // Can't know the decoded size
}
-void KMMessagePart::setBody(const QByteArray &aStr)
+void KMMessagePart::setBody(const TQByteArray &aStr)
{
mBody = aStr;
@@ -134,19 +134,19 @@ void KMMessagePart::setBody(const QByteArray &aStr)
mBodyDecodedSize = -1; // Can't know the decoded size
}
-void KMMessagePart::setBodyFromUnicode( const QString & str ) {
- QCString encoding = KMMsgBase::autoDetectCharset( charset(), KMMessage::preferredCharsets(), str );
+void KMMessagePart::setBodyFromUnicode( const TQString & str ) {
+ TQCString encoding = KMMsgBase::autoDetectCharset( charset(), KMMessage::preferredCharsets(), str );
if ( encoding.isEmpty() )
encoding = "utf-8";
- const QTextCodec * codec = KMMsgBase::codecForName( encoding );
+ const TQTextCodec * codec = KMMsgBase::codecForName( encoding );
assert( codec );
- QValueList<int> dummy;
+ TQValueList<int> dummy;
setCharset( encoding );
setBodyAndGuessCte( codec->fromUnicode( str ), dummy, false /* no 8bit */ );
}
-const QTextCodec * KMMessagePart::codec() const {
- const QTextCodec * c = KMMsgBase::codecForName( charset() );
+const TQTextCodec * KMMessagePart::codec() const {
+ const TQTextCodec * c = KMMsgBase::codecForName( charset() );
if ( !c ) {
// Ok, no override and nothing in the message, let's use the fallback
@@ -161,7 +161,7 @@ const QTextCodec * KMMessagePart::codec() const {
return c;
}
-QString KMMessagePart::bodyToUnicode(const QTextCodec* codec) const {
+TQString KMMessagePart::bodyToUnicode(const TQTextCodec* codec) const {
if ( !codec )
// No codec was given, so try the charset in the mail
codec = this->codec();
@@ -170,7 +170,7 @@ QString KMMessagePart::bodyToUnicode(const QTextCodec* codec) const {
return codec->toUnicode( bodyDecoded() );
}
-void KMMessagePart::setCharset( const QCString & c ) {
+void KMMessagePart::setCharset( const TQCString & c ) {
if ( type() != DwMime::kTypeText )
kdWarning()
<< "KMMessagePart::setCharset(): trying to set a charset for a non-textual mimetype." << endl
@@ -182,7 +182,7 @@ void KMMessagePart::setCharset( const QCString & c ) {
}
//-----------------------------------------------------------------------------
-void KMMessagePart::setBodyEncoded(const QCString& aStr)
+void KMMessagePart::setBodyEncoded(const TQCString& aStr)
{
mBodyDecodedSize = aStr.size() - 1; // same as aStr.length() but faster - assuming no embedded nuls
switch (cte())
@@ -193,12 +193,12 @@ void KMMessagePart::setBodyEncoded(const QCString& aStr)
Codec * codec = Codec::codecForName( cteStr() );
assert( codec );
// we can't use the convenience function here, since aStr is not
- // a QByteArray...:
+ // a TQByteArray...:
mBody.resize( codec->maxEncodedSizeFor( mBodyDecodedSize ) );
- QCString::ConstIterator iit = aStr.data();
- QCString::ConstIterator iend = aStr.data() + mBodyDecodedSize;
- QByteArray::Iterator oit = mBody.begin();
- QByteArray::ConstIterator oend = mBody.end();
+ TQCString::ConstIterator iit = aStr.data();
+ TQCString::ConstIterator iend = aStr.data() + mBodyDecodedSize;
+ TQByteArray::Iterator oit = mBody.begin();
+ TQByteArray::ConstIterator oend = mBody.end();
if ( !codec->encode( iit, iend, oit, oend ) )
kdWarning(5006) << codec->name()
<< " codec lies about it's maxEncodedSizeFor( "
@@ -219,8 +219,8 @@ void KMMessagePart::setBodyEncoded(const QCString& aStr)
}
}
-void KMMessagePart::setBodyAndGuessCte(const QByteArray& aBuf,
- QValueList<int> & allowedCte,
+void KMMessagePart::setBodyAndGuessCte(const TQByteArray& aBuf,
+ TQValueList<int> & allowedCte,
bool allow8Bit,
bool willBeSigned )
{
@@ -242,8 +242,8 @@ void KMMessagePart::setBodyAndGuessCte(const QByteArray& aBuf,
setBodyEncodedBinary( aBuf );
}
-void KMMessagePart::setBodyAndGuessCte(const QCString& aBuf,
- QValueList<int> & allowedCte,
+void KMMessagePart::setBodyAndGuessCte(const TQCString& aBuf,
+ TQValueList<int> & allowedCte,
bool allow8Bit,
bool willBeSigned )
{
@@ -266,7 +266,7 @@ void KMMessagePart::setBodyAndGuessCte(const QCString& aBuf,
}
//-----------------------------------------------------------------------------
-void KMMessagePart::setBodyEncodedBinary(const QByteArray& aStr)
+void KMMessagePart::setBodyEncodedBinary(const TQByteArray& aStr)
{
mBodyDecodedSize = aStr.size();
if (aStr.isEmpty())
@@ -300,7 +300,7 @@ void KMMessagePart::setBodyEncodedBinary(const QByteArray& aStr)
}
}
-void KMMessagePart::setMessageBody( const QByteArray& aBuf )
+void KMMessagePart::setMessageBody( const TQByteArray& aBuf )
{
CharFreq cf( aBuf ); // it's safe to pass null arrays
mBodyDecodedSize = aBuf.size();
@@ -325,10 +325,10 @@ void KMMessagePart::setMessageBody( const QByteArray& aBuf )
}
//-----------------------------------------------------------------------------
-QByteArray KMMessagePart::bodyDecodedBinary() const
+TQByteArray KMMessagePart::bodyDecodedBinary() const
{
- if (mBody.isEmpty()) return QByteArray();
- QByteArray result;
+ if (mBody.isEmpty()) return TQByteArray();
+ TQByteArray result;
switch (cte())
{
@@ -356,11 +356,11 @@ QByteArray KMMessagePart::bodyDecodedBinary() const
return result;
}
-QCString KMMessagePart::bodyDecoded(void) const
+TQCString KMMessagePart::bodyDecoded(void) const
{
- if (mBody.isEmpty()) return QCString("");
+ if (mBody.isEmpty()) return TQCString("");
bool decodeBinary = false;
- QCString result;
+ TQCString result;
int len;
switch (cte())
@@ -375,12 +375,12 @@ QCString KMMessagePart::bodyDecoded(void) const
default:
if ( const Codec * codec = Codec::codecForName( cteStr() ) ) {
// We can't use the codec convenience functions, since we must
- // return a QCString, not a QByteArray:
+ // return a TQCString, not a TQByteArray:
int bufSize = codec->maxDecodedSizeFor( mBody.size() ) + 1; // trailing NUL
result.resize( bufSize );
- QByteArray::ConstIterator iit = mBody.begin();
- QCString::Iterator oit = result.begin();
- QCString::ConstIterator oend = result.begin() + bufSize;
+ TQByteArray::ConstIterator iit = mBody.begin();
+ TQCString::Iterator oit = result.begin();
+ TQCString::ConstIterator oend = result.begin() + bufSize;
if ( !codec->decode( iit, mBody.end(), oit, oend ) )
kdWarning(5006) << codec->name()
<< " lies about it's maxDecodedSizeFor( "
@@ -418,10 +418,10 @@ void KMMessagePart::magicSetType(bool aAutoDecode)
{
KMimeMagic::self()->setFollowLinks( true ); // is it necessary ?
- const QByteArray body = ( aAutoDecode ) ? bodyDecodedBinary() : mBody ;
+ const TQByteArray body = ( aAutoDecode ) ? bodyDecodedBinary() : mBody ;
KMimeMagicResult * result = KMimeMagic::self()->findBufferType( body );
- QString mimetype = result->mimeType();
+ TQString mimetype = result->mimeType();
const int sep = mimetype.find('/');
mType = mimetype.left(sep).latin1();
mSubtype = mimetype.mid(sep+1).latin1();
@@ -429,20 +429,20 @@ void KMMessagePart::magicSetType(bool aAutoDecode)
//-----------------------------------------------------------------------------
-QString KMMessagePart::iconName( int size ) const
+TQString KMMessagePart::iconName( int size ) const
{
- QCString mimeType( mType + "/" + mSubtype );
+ TQCString mimeType( mType + "/" + mSubtype );
KPIM::kAsciiToLower( mimeType.data() );
- QString fileName =
- KMimeType::mimeType( mimeType )->icon( QString::null, false );
+ TQString fileName =
+ KMimeType::mimeType( mimeType )->icon( TQString::null, false );
if ( fileName.isEmpty() )
{
fileName = this->fileName();
if ( fileName.isEmpty() ) fileName = this->name();
if ( !fileName.isEmpty() )
{
- fileName = KMimeType::findByPath( "/tmp/"+fileName, 0, true )->icon( QString::null, true );
+ fileName = KMimeType::findByPath( "/tmp/"+fileName, 0, true )->icon( TQString::null, true );
}
}
@@ -481,27 +481,27 @@ void KMMessagePart::setSubtype(int aSubtype)
}
//-----------------------------------------------------------------------------
-QCString KMMessagePart::parameterAttribute(void) const
+TQCString KMMessagePart::parameterAttribute(void) const
{
return mParameterAttribute;
}
//-----------------------------------------------------------------------------
-QString KMMessagePart::parameterValue(void) const
+TQString KMMessagePart::parameterValue(void) const
{
return mParameterValue;
}
//-----------------------------------------------------------------------------
-void KMMessagePart::setParameter(const QCString &attribute,
- const QString &value)
+void KMMessagePart::setParameter(const TQCString &attribute,
+ const TQString &value)
{
mParameterAttribute = attribute;
mParameterValue = value;
}
//-----------------------------------------------------------------------------
-QCString KMMessagePart::contentTransferEncodingStr(void) const
+TQCString KMMessagePart::contentTransferEncodingStr(void) const
{
return mCte;
}
@@ -515,7 +515,7 @@ int KMMessagePart::contentTransferEncoding(void) const
//-----------------------------------------------------------------------------
-void KMMessagePart::setContentTransferEncodingStr(const QCString &aStr)
+void KMMessagePart::setContentTransferEncodingStr(const TQCString &aStr)
{
mCte = aStr;
}
@@ -532,16 +532,16 @@ void KMMessagePart::setContentTransferEncoding(int aCte)
//-----------------------------------------------------------------------------
-QString KMMessagePart::contentDescription(void) const
+TQString KMMessagePart::contentDescription(void) const
{
return KMMsgBase::decodeRFC2047String(mContentDescription, charset());
}
//-----------------------------------------------------------------------------
-void KMMessagePart::setContentDescription(const QString &aStr)
+void KMMessagePart::setContentDescription(const TQString &aStr)
{
- QCString encoding = KMMsgBase::autoDetectCharset(charset(),
+ TQCString encoding = KMMsgBase::autoDetectCharset(charset(),
KMMessage::preferredCharsets(), aStr);
if (encoding.isEmpty()) encoding = "utf-8";
mContentDescription = KMMsgBase::encodeRFC2047String(aStr, encoding);
@@ -549,9 +549,9 @@ void KMMessagePart::setContentDescription(const QString &aStr)
//-----------------------------------------------------------------------------
-QString KMMessagePart::fileName(void) const
+TQString KMMessagePart::fileName(void) const
{
- QCString str;
+ TQCString str;
// Allow for multiple filname*0, filename*1, ... params (defined by RFC 2231)
// in the Content-Disposision
@@ -567,7 +567,7 @@ QString KMMessagePart::fileName(void) const
// search the start of the filename
int startOfFilename = mContentDisposition.find("filename=", 0, false);
if (startOfFilename < 0)
- return QString::null;
+ return TQString::null;
startOfFilename += 9;
// search the end of the filename
@@ -582,18 +582,18 @@ QString KMMessagePart::fileName(void) const
if (endOfFilename < 0)
endOfFilename = 32767;
- const QCString str = mContentDisposition.mid(startOfFilename,
+ const TQCString str = mContentDisposition.mid(startOfFilename,
endOfFilename-startOfFilename+1)
.stripWhiteSpace();
return KMMsgBase::decodeRFC2047String(str, charset());
}
- return QString::null;
+ return TQString::null;
}
-QCString KMMessagePart::body() const
+TQCString KMMessagePart::body() const
{
- return QCString( mBody.data(), mBody.size() + 1 ); // space for trailing NUL
+ return TQCString( mBody.data(), mBody.size() + 1 ); // space for trailing NUL
}
DwString KMMessagePart::dwBody() const
diff --git a/kmail/kmmsgpart.h b/kmail/kmmsgpart.h
index a28238177..ce3245c89 100644
--- a/kmail/kmmsgpart.h
+++ b/kmail/kmmsgpart.h
@@ -22,9 +22,9 @@
#include <kiconloader.h>
-#include <qstring.h>
-#include <qcstring.h>
-#include <qdict.h>
+#include <tqstring.h>
+#include <tqcstring.h>
+#include <tqdict.h>
template <typename T>
class QValueList;
@@ -35,7 +35,7 @@ class KMMessagePart
{
public:
KMMessagePart();
- KMMessagePart( QDataStream & stream );
+ KMMessagePart( TQDataStream & stream );
virtual ~KMMessagePart();
/** Reset to text/plain with 7bit cte and clear all other properties. */
@@ -46,30 +46,30 @@ public:
void duplicate( const KMMessagePart & msgPart );
/** Get or set the message body */
- QCString body(void) const;
- void setBody(const QCString &aStr);
+ TQCString body(void) const;
+ void setBody(const TQCString &aStr);
DwString dwBody() const;
void setBody(const DwString &aStr);
// warning, doesn't detach from 'arr'
- void setBody(const QByteArray &arr);
+ void setBody(const TQByteArray &arr);
/** Sets this body part's content to @p str. @p str is subject to
automatic charset and CTE detection.
**/
- void setBodyFromUnicode( const QString & str );
+ void setBodyFromUnicode( const TQString & str );
/** Returns the body part decoded to unicode.
**/
- QString bodyToUnicode(const QTextCodec* codec=0) const;
+ TQString bodyToUnicode(const TQTextCodec* codec=0) const;
/** Returns body as decoded string. Assumes that content-transfer-encoding
contains the correct encoding. This routine is meant for binary data.
No trailing 0 is appended. */
- QByteArray bodyDecodedBinary(void) const;
+ TQByteArray bodyDecodedBinary(void) const;
/** Returns body as decoded string. Assumes that content-transfer-encoding
contains the correct encoding. This routine is meant for text strings! */
- QCString bodyDecoded(void) const;
+ TQCString bodyDecoded(void) const;
/** Sets body, encoded in the best fitting
content-transfer-encoding, which is determined by character
@@ -80,13 +80,13 @@ public:
@param allow8Bit whether "8bit" is allowed as cte.
@param willBeSigned whether "7bit"/"8bit" is allowed as cte according to RFC 3156
*/
- void setBodyAndGuessCte(const QByteArray& aBuf,
- QValueList<int>& allowedCte,
+ void setBodyAndGuessCte(const TQByteArray& aBuf,
+ TQValueList<int>& allowedCte,
bool allow8Bit = false,
bool willBeSigned = false);
/** Same for text */
- void setBodyAndGuessCte(const QCString& aBuf,
- QValueList<int>& allowedCte,
+ void setBodyAndGuessCte(const TQCString& aBuf,
+ TQValueList<int>& allowedCte,
bool allow8Bit = false,
bool willBeSigned = false);
@@ -94,22 +94,22 @@ public:
BEWARE: The entire aStr is used including trailing 0 of text strings!
This version is faster than setBodyEncoded, no duplication necessary.
*/
- void setBodyEncodedBinary(const QByteArray& aStr);
+ void setBodyEncodedBinary(const TQByteArray& aStr);
/** Sets body, encoded according to the content-transfer-encoding.
This one is for text strings, the trailing 0 is not used.
For speed reasons, prefer setBodyEncodedBinary.
- When possible (the QCString isn't used afterwards), change setBodyEncoded(myQCString) into:
+ When possible (the TQCString isn't used afterwards), change setBodyEncoded(myQCString) into:
setBodyEncodedBinary(byteArrayFromQCStringNoDetach(myQCString));
*/
- void setBodyEncoded(const QCString& aStr);
+ void setBodyEncoded(const TQCString& aStr);
/** Set a full message string as the body of the message part,
disallowing anything but 7bit or 8bit encoding.
(RFC 1521 section 7.3)
*/
- void setMessageBody( const QByteArray & aBuf );
+ void setMessageBody( const TQByteArray & aBuf );
/** Returns decoded length of body. */
int decodedSize(void) const;
@@ -117,24 +117,24 @@ public:
/** Get or set the 'Content-Type' header field
The member functions that involve enumerated types (ints)
will work only for well-known types or subtypes. */
- QCString originalContentTypeStr(void) const { return mOriginalContentTypeStr; }
- void setOriginalContentTypeStr( const QCString& txt )
+ TQCString originalContentTypeStr(void) const { return mOriginalContentTypeStr; }
+ void setOriginalContentTypeStr( const TQCString& txt )
{
mOriginalContentTypeStr = txt;
}
- QCString typeStr() const { return mType; }
- void setTypeStr( const QCString & aStr ) { mType = aStr; }
+ TQCString typeStr() const { return mType; }
+ void setTypeStr( const TQCString & aStr ) { mType = aStr; }
int type() const;
void setType(int aType);
/** Subtype */
- QCString subtypeStr() const { return mSubtype; }
- void setSubtypeStr( const QCString & aStr ) { mSubtype = aStr; }
+ TQCString subtypeStr() const { return mSubtype; }
+ void setSubtypeStr( const TQCString & aStr ) { mSubtype = aStr; }
int subtype() const;
void setSubtype(int aSubtype);
/** Content-Id */
- QCString contentId() const { return mContentId; }
- void setContentId( const QCString & aStr ) { mContentId = aStr; }
+ TQCString contentId() const { return mContentId; }
+ void setContentId( const TQCString & aStr ) { mContentId = aStr; }
/** Set the 'Content-Type' by mime-magic from the contents of the body.
If autoDecode is TRUE the decoded body will be used for mime type
@@ -143,15 +143,15 @@ public:
/** Get or set a custom content type parameter, consisting of an attribute
name and a corresponding value. */
- QCString parameterAttribute(void) const;
- QString parameterValue(void) const;
- void setParameter(const QCString &attribute, const QString &value);
+ TQCString parameterAttribute(void) const;
+ TQString parameterValue(void) const;
+ void setParameter(const TQCString &attribute, const TQString &value);
- QCString additionalCTypeParamStr(void) const
+ TQCString additionalCTypeParamStr(void) const
{
return mAdditionalCTypeParamStr;
}
- void setAdditionalCTypeParamStr( const QCString &param )
+ void setAdditionalCTypeParamStr( const TQCString &param )
{
mAdditionalCTypeParamStr = param;
}
@@ -159,55 +159,55 @@ public:
/** Tries to find a good icon for the 'Content-Type' by scanning
the installed mimelnk files. Returns the found icon. If no matching
icon is found, the one for application/octet-stream is returned. */
- QString iconName( int size = KIcon::Desktop ) const;
+ TQString iconName( int size = KIcon::Desktop ) const;
/** Get or set the 'Content-Transfer-Encoding' header field
The member functions that involve enumerated types (ints)
will work only for well-known encodings. */
- QCString contentTransferEncodingStr(void) const;
+ TQCString contentTransferEncodingStr(void) const;
int contentTransferEncoding(void) const;
- void setContentTransferEncodingStr(const QCString &aStr);
+ void setContentTransferEncodingStr(const TQCString &aStr);
void setContentTransferEncoding(int aCte);
/** Cte is short for ContentTransferEncoding.
These functions are an alternative to the ones with longer names. */
- QCString cteStr(void) const { return contentTransferEncodingStr(); }
+ TQCString cteStr(void) const { return contentTransferEncodingStr(); }
int cte(void) const { return contentTransferEncoding(); }
- void setCteStr(const QCString& aStr) { setContentTransferEncodingStr(aStr); }
+ void setCteStr(const TQCString& aStr) { setContentTransferEncodingStr(aStr); }
void setCte(int aCte) { setContentTransferEncoding(aCte); }
/** Get or set the 'Content-Description' header field */
- QString contentDescription() const;
- QCString contentDescriptionEncoded() const { return mContentDescription; }
- void setContentDescription(const QString &aStr);
+ TQString contentDescription() const;
+ TQCString contentDescriptionEncoded() const { return mContentDescription; }
+ void setContentDescription(const TQString &aStr);
/** Get or set the 'Content-Disposition' header field */
- QCString contentDisposition() const { return mContentDisposition; }
- void setContentDisposition( const QCString & cd ) { mContentDisposition = cd; }
+ TQCString contentDisposition() const { return mContentDisposition; }
+ void setContentDisposition( const TQCString & cd ) { mContentDisposition = cd; }
/** Get the message part charset.*/
- QCString charset() const { return mCharset; }
+ TQCString charset() const { return mCharset; }
/** Set the message part charset. */
- void setCharset( const QCString & c );
+ void setCharset( const TQCString & c );
- /** Get a QTextCodec suitable for this message part */
- const QTextCodec * codec() const;
+ /** Get a TQTextCodec suitable for this message part */
+ const TQTextCodec * codec() const;
/** Get or set name parameter */
- QString name() const { return mName; }
- void setName( const QString & name ) { mName = name; }
+ TQString name() const { return mName; }
+ void setName( const TQString & name ) { mName = name; }
/** Returns name of filename part of 'Content-Disposition' header field,
if present. */
- QString fileName(void) const;
+ TQString fileName(void) const;
/** Returns the part number */
- QString partSpecifier() const { return mPartSpecifier; }
+ TQString partSpecifier() const { return mPartSpecifier; }
/** Sets the part number */
- void setPartSpecifier( const QString & part ) { mPartSpecifier = part; }
+ void setPartSpecifier( const TQString & part ) { mPartSpecifier = part; }
/** If this part is complete (contains a body) */
bool isComplete() { return (!mBody.isNull()); }
@@ -231,20 +231,20 @@ public:
void setLoadPart( bool load ) { mLoadPart = load; }
protected:
- QCString mOriginalContentTypeStr;
- QCString mType;
- QCString mSubtype;
- QCString mCte;
- QCString mContentDescription;
- QCString mContentDisposition;
- QCString mContentId;
- QByteArray mBody;
- QCString mAdditionalCTypeParamStr;
- QString mName;
- QCString mParameterAttribute;
- QString mParameterValue;
- QCString mCharset;
- QString mPartSpecifier;
+ TQCString mOriginalContentTypeStr;
+ TQCString mType;
+ TQCString mSubtype;
+ TQCString mCte;
+ TQCString mContentDescription;
+ TQCString mContentDisposition;
+ TQCString mContentId;
+ TQByteArray mBody;
+ TQCString mAdditionalCTypeParamStr;
+ TQString mName;
+ TQCString mParameterAttribute;
+ TQString mParameterValue;
+ TQCString mCharset;
+ TQString mPartSpecifier;
mutable int mBodyDecodedSize;
KMMessagePart* mParent;
bool mLoadHeaders;
diff --git a/kmail/kmmsgpartdlg.cpp b/kmail/kmmsgpartdlg.cpp
index 63407aeeb..921c9d55b 100644
--- a/kmail/kmmsgpartdlg.cpp
+++ b/kmail/kmmsgpartdlg.cpp
@@ -22,11 +22,11 @@
#include <kdebug.h>
// other Qt includes:
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qwhatsthis.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqwhatsthis.h>
#include <klineedit.h>
-#include <qcheckbox.h>
+#include <tqcheckbox.h>
// other includes:
#include <assert.h>
@@ -43,46 +43,46 @@ static const struct {
static const int numEncodingTypes =
sizeof encodingTypes / sizeof *encodingTypes;
-KMMsgPartDialog::KMMsgPartDialog( const QString & caption,
- QWidget * parent, const char * name )
+KMMsgPartDialog::KMMsgPartDialog( const TQString & caption,
+ TQWidget * parent, const char * name )
: KDialogBase( Plain,
caption.isEmpty() ? i18n("Message Part Properties") : caption,
Ok|Cancel|Help, Ok, parent, name, true, true)
{
// tmp vars:
- QGridLayout * glay;
- QLabel * label;
- QString msg;
+ TQGridLayout * glay;
+ TQLabel * label;
+ TQString msg;
- setHelp( QString::fromLatin1("attachments") );
+ setHelp( TQString::fromLatin1("attachments") );
for ( int i = 0 ; i < numEncodingTypes ; ++i )
mI18nizedEncodings << i18n( encodingTypes[i].displayName );
- glay = new QGridLayout( plainPage(), 9 /*rows*/, 2 /*cols*/, spacingHint() );
+ glay = new TQGridLayout( plainPage(), 9 /*rows*/, 2 /*cols*/, spacingHint() );
glay->setColStretch( 1, 1 );
glay->setRowStretch( 8, 1 );
// mimetype icon:
- mIcon = new QLabel( plainPage() );
+ mIcon = new TQLabel( plainPage() );
mIcon->setPixmap( DesktopIcon("unknown") );
glay->addMultiCellWidget( mIcon, 0, 1, 0, 0 );
// row 0: Type combobox:
mMimeType = new KComboBox( true, plainPage() );
- mMimeType->setInsertionPolicy( QComboBox::NoInsertion );
+ mMimeType->setInsertionPolicy( TQComboBox::NoInsertion );
mMimeType->setValidator( new KMimeTypeValidator( mMimeType ) );
- mMimeType->insertStringList( QStringList()
- << QString::fromLatin1("text/html")
- << QString::fromLatin1("text/plain")
- << QString::fromLatin1("image/gif")
- << QString::fromLatin1("image/jpeg")
- << QString::fromLatin1("image/png")
- << QString::fromLatin1("application/octet-stream")
- << QString::fromLatin1("application/x-gunzip")
- << QString::fromLatin1("application/zip") );
- connect( mMimeType, SIGNAL(textChanged(const QString&)),
- this, SLOT(slotMimeTypeChanged(const QString&)) );
+ mMimeType->insertStringList( TQStringList()
+ << TQString::fromLatin1("text/html")
+ << TQString::fromLatin1("text/plain")
+ << TQString::fromLatin1("image/gif")
+ << TQString::fromLatin1("image/jpeg")
+ << TQString::fromLatin1("image/png")
+ << TQString::fromLatin1("application/octet-stream")
+ << TQString::fromLatin1("application/x-gunzip")
+ << TQString::fromLatin1("application/zip") );
+ connect( mMimeType, TQT_SIGNAL(textChanged(const TQString&)),
+ this, TQT_SLOT(slotMimeTypeChanged(const TQString&)) );
glay->addWidget( mMimeType, 0, 1 );
msg = i18n("<qt><p>The <em>MIME type</em> of the file:</p>"
@@ -90,10 +90,10 @@ KMMsgPartDialog::KMMsgPartDialog( const QString & caption,
"type of the file is automatically checked; but, sometimes, %1 "
"may not detect the type correctly -- here is where you can fix "
"that.</p></qt>").arg( kapp->aboutData()->programName() );
- QWhatsThis::add( mMimeType, msg );
+ TQWhatsThis::add( mMimeType, msg );
// row 1: Size label:
- mSize = new QLabel( plainPage() );
+ mSize = new TQLabel( plainPage() );
setSize( KIO::filesize_t(0) );
glay->addWidget( mSize, 1, 1 );
@@ -103,11 +103,11 @@ KMMsgPartDialog::KMMsgPartDialog( const QString & caption,
"when this is the case, it will be made visible by adding "
"\"(est.)\" to the size displayed.</p></qt>")
.arg( kapp->aboutData()->programName() );
- QWhatsThis::add( mSize, msg );
+ TQWhatsThis::add( mSize, msg );
// row 2: "Name" lineedit and label:
mFileName = new KLineEdit( plainPage() );
- label = new QLabel( mFileName, i18n("&Name:"), plainPage() );
+ label = new TQLabel( mFileName, i18n("&Name:"), plainPage() );
glay->addWidget( label, 2, 0 );
glay->addWidget( mFileName, 2, 1 );
@@ -116,12 +116,12 @@ KMMsgPartDialog::KMMsgPartDialog( const QString & caption,
"it does not specify the file to be attached; rather, it "
"suggests a file name to be used by the recipient's mail agent "
"when saving the part to disk.</p></qt>");
- QWhatsThis::add( label, msg );
- QWhatsThis::add( mFileName, msg );
+ TQWhatsThis::add( label, msg );
+ TQWhatsThis::add( mFileName, msg );
// row 3: "Description" lineedit and label:
mDescription = new KLineEdit( plainPage() );
- label = new QLabel( mDescription, i18n("&Description:"), plainPage() );
+ label = new TQLabel( mDescription, i18n("&Description:"), plainPage() );
glay->addWidget( label, 3, 0 );
glay->addWidget( mDescription, 3, 1 );
@@ -130,13 +130,13 @@ KMMsgPartDialog::KMMsgPartDialog( const QString & caption,
"much like the Subject is for the whole message; most "
"mail agents will show this information in their message "
"previews alongside the attachment's icon.</p></qt>");
- QWhatsThis::add( label, msg );
- QWhatsThis::add( mDescription, msg );
+ TQWhatsThis::add( label, msg );
+ TQWhatsThis::add( mDescription, msg );
// row 4: "Encoding" combobox and label:
- mEncoding = new QComboBox( false, plainPage() );
+ mEncoding = new TQComboBox( false, plainPage() );
mEncoding->insertStringList( mI18nizedEncodings );
- label = new QLabel( mEncoding, i18n("&Encoding:"), plainPage() );
+ label = new TQLabel( mEncoding, i18n("&Encoding:"), plainPage() );
glay->addWidget( label, 4, 0 );
glay->addWidget( mEncoding, 4, 1 );
@@ -149,11 +149,11 @@ KMMsgPartDialog::KMMsgPartDialog( const QString & caption,
"\"quoted-printable\" over the default \"base64\" will save up "
"to 25% in resulting message size.</p></qt>")
.arg( kapp->aboutData()->programName() );
- QWhatsThis::add( label, msg );
- QWhatsThis::add( mEncoding, msg );
+ TQWhatsThis::add( label, msg );
+ TQWhatsThis::add( mEncoding, msg );
// row 5: "Suggest automatic display..." checkbox:
- mInline = new QCheckBox( i18n("Suggest &automatic display"), plainPage() );
+ mInline = new TQCheckBox( i18n("Suggest &automatic display"), plainPage() );
glay->addMultiCellWidget( mInline, 5, 5, 0, 1 );
msg = i18n("<qt><p>Check this option if you want to suggest to the "
@@ -162,27 +162,27 @@ KMMsgPartDialog::KMMsgPartDialog( const QString & caption,
"<p>technically, this is carried out by setting this part's "
"<em>Content-Disposition</em> header field to \"inline\" "
"instead of the default \"attachment\".</p></qt>");
- QWhatsThis::add( mInline, msg );
+ TQWhatsThis::add( mInline, msg );
// row 6: "Sign" checkbox:
- mSigned = new QCheckBox( i18n("&Sign this part"), plainPage() );
+ mSigned = new TQCheckBox( i18n("&Sign this part"), plainPage() );
glay->addMultiCellWidget( mSigned, 6, 6, 0, 1 );
msg = i18n("<qt><p>Check this option if you want this message part to be "
"signed;</p>"
"<p>the signature will be made with the key that you associated "
"with the currently-selected identity.</p></qt>");
- QWhatsThis::add( mSigned, msg );
+ TQWhatsThis::add( mSigned, msg );
// row 7: "Encrypt" checkbox:
- mEncrypted = new QCheckBox( i18n("Encr&ypt this part"), plainPage() );
+ mEncrypted = new TQCheckBox( i18n("Encr&ypt this part"), plainPage() );
glay->addMultiCellWidget( mEncrypted, 7, 7, 0, 1 );
msg = i18n("<qt><p>Check this option if you want this message part to be "
"encrypted;</p>"
"<p>the part will be encrypted for the recipients of this "
"message</p></qt>");
- QWhatsThis::add( mEncrypted, msg );
+ TQWhatsThis::add( mEncrypted, msg );
// (row 8: spacer)
}
@@ -190,13 +190,13 @@ KMMsgPartDialog::KMMsgPartDialog( const QString & caption,
KMMsgPartDialog::~KMMsgPartDialog() {}
-QString KMMsgPartDialog::mimeType() const {
+TQString KMMsgPartDialog::mimeType() const {
return mMimeType->currentText();
}
-void KMMsgPartDialog::setMimeType( const QString & mimeType ) {
+void KMMsgPartDialog::setMimeType( const TQString & mimeType ) {
int dummy = 0;
- QString tmp = mimeType; // get rid of const'ness
+ TQString tmp = mimeType; // get rid of const'ness
if ( mMimeType->validator() && mMimeType->validator()->validate( tmp, dummy ) )
for ( int i = 0 ; i < mMimeType->count() ; ++i )
if ( mMimeType->text( i ) == mimeType ) {
@@ -208,41 +208,41 @@ void KMMsgPartDialog::setMimeType( const QString & mimeType ) {
slotMimeTypeChanged( mimeType );
}
-void KMMsgPartDialog::setMimeType( const QString & type,
- const QString & subtype ) {
- setMimeType( QString::fromLatin1("%1/%2").arg(type).arg(subtype) );
+void KMMsgPartDialog::setMimeType( const TQString & type,
+ const TQString & subtype ) {
+ setMimeType( TQString::fromLatin1("%1/%2").arg(type).arg(subtype) );
}
-void KMMsgPartDialog::setMimeTypeList( const QStringList & mimeTypes ) {
+void KMMsgPartDialog::setMimeTypeList( const TQStringList & mimeTypes ) {
mMimeType->insertStringList( mimeTypes );
}
void KMMsgPartDialog::setSize( KIO::filesize_t size, bool estimated ) {
- QString text = KIO::convertSize( size );
+ TQString text = KIO::convertSize( size );
if ( estimated )
text = i18n("%1: a filesize incl. unit (e.g. \"1.3 KB\")",
"%1 (est.)").arg( text );
mSize->setText( text );
}
-QString KMMsgPartDialog::fileName() const {
+TQString KMMsgPartDialog::fileName() const {
return mFileName->text();
}
-void KMMsgPartDialog::setFileName( const QString & fileName ) {
+void KMMsgPartDialog::setFileName( const TQString & fileName ) {
mFileName->setText( fileName );
}
-QString KMMsgPartDialog::description() const {
+TQString KMMsgPartDialog::description() const {
return mDescription->text();
}
-void KMMsgPartDialog::setDescription( const QString & description ) {
+void KMMsgPartDialog::setDescription( const TQString & description ) {
mDescription->setText( description );
}
KMMsgPartDialog::Encoding KMMsgPartDialog::encoding() const {
- QString s = mEncoding->currentText();
+ TQString s = mEncoding->currentText();
for ( unsigned int i = 0 ; i < mI18nizedEncodings.count() ; ++i )
if ( s == *mI18nizedEncodings.at(i) )
return encodingTypes[i].encoding;
@@ -254,7 +254,7 @@ KMMsgPartDialog::Encoding KMMsgPartDialog::encoding() const {
void KMMsgPartDialog::setEncoding( Encoding encoding ) {
for ( int i = 0 ; i < numEncodingTypes ; ++i )
if ( encodingTypes[i].encoding == encoding ) {
- QString text = *mI18nizedEncodings.at(i);
+ TQString text = *mI18nizedEncodings.at(i);
for ( int j = 0 ; j < mEncoding->count() ; ++j )
if ( mEncoding->text(j) == text ) {
mEncoding->setCurrentItem( j );
@@ -306,7 +306,7 @@ void KMMsgPartDialog::setCanSign( bool enable ) {
mSigned->setEnabled( enable );
}
-void KMMsgPartDialog::slotMimeTypeChanged( const QString & mimeType ) {
+void KMMsgPartDialog::slotMimeTypeChanged( const TQString & mimeType ) {
// message subparts MUST have 7bit or 8bit encoding...
#if 0
// ...but until KMail can recode 8bit messages on attach, so that
@@ -320,9 +320,9 @@ void KMMsgPartDialog::slotMimeTypeChanged( const QString & mimeType ) {
#endif
// find a mimetype icon:
int dummy = 0;
- QString tmp = mimeType; // get rid of const'ness
+ TQString tmp = mimeType; // get rid of const'ness
if ( mMimeType->validator() && mMimeType->validator()->validate( tmp, dummy )
- == QValidator::Acceptable )
+ == TQValidator::Acceptable )
mIcon->setPixmap( KMimeType::mimeType( mimeType )->pixmap( KIcon::Desktop ) );
else
mIcon->setPixmap( DesktopIcon("unknown") );
@@ -331,8 +331,8 @@ void KMMsgPartDialog::slotMimeTypeChanged( const QString & mimeType ) {
-KMMsgPartDialogCompat::KMMsgPartDialogCompat( QWidget * parent, const char *, bool readOnly)
- : KMMsgPartDialog(QString::null, parent ), mMsgPart( 0 )
+KMMsgPartDialogCompat::KMMsgPartDialogCompat( TQWidget * parent, const char *, bool readOnly)
+ : KMMsgPartDialog(TQString::null, parent ), mMsgPart( 0 )
{
setShownEncodings( SevenBit|EightBit|QuotedPrintable|Base64 );
if (readOnly)
@@ -355,7 +355,7 @@ void KMMsgPartDialogCompat::setMsgPart( KMMessagePart * aMsgPart )
mMsgPart = aMsgPart;
assert( mMsgPart );
- QCString enc = mMsgPart->cteStr();
+ TQCString enc = mMsgPart->cteStr();
if ( enc == "7bit" )
setEncoding( SevenBit );
else if ( enc == "8bit" )
@@ -370,7 +370,7 @@ void KMMsgPartDialogCompat::setMsgPart( KMMessagePart * aMsgPart )
setMimeType( mMsgPart->typeStr(), mMsgPart->subtypeStr() );
setSize( mMsgPart->decodedSize() );
setInline( mMsgPart->contentDisposition()
- .find( QRegExp("^\\s*inline", false) ) >= 0 );
+ .find( TQRegExp("^\\s*inline", false) ) >= 0 );
}
@@ -381,22 +381,22 @@ void KMMsgPartDialogCompat::applyChanges()
KCursorSaver busy(KBusyPtr::busy());
// apply Content-Disposition:
- QCString cDisp;
+ TQCString cDisp;
if ( isInline() )
cDisp = "inline;";
else
cDisp = "attachment;";
- QString name = fileName();
+ TQString name = fileName();
if ( !name.isEmpty() || !mMsgPart->name().isEmpty()) {
mMsgPart->setName( name );
- QCString encoding = KMMsgBase::autoDetectCharset( mMsgPart->charset(),
+ TQCString encoding = KMMsgBase::autoDetectCharset( mMsgPart->charset(),
KMMessage::preferredCharsets(), name );
if ( encoding.isEmpty() ) encoding = "utf-8";
- QCString encName = KMMsgBase::encodeRFC2231String( name, encoding );
+ TQCString encName = KMMsgBase::encodeRFC2231String( name, encoding );
cDisp += "\n\tfilename";
- if ( name != QString( encName ) )
+ if ( name != TQString( encName ) )
cDisp += "*=" + encName;
else
cDisp += "=\"" + encName.replace( '\\', "\\\\" ).replace( '"', "\\\"" ) + '"';
@@ -404,13 +404,13 @@ void KMMsgPartDialogCompat::applyChanges()
}
// apply Content-Description"
- QString desc = description();
+ TQString desc = description();
if ( !desc.isEmpty() || !mMsgPart->contentDescription().isEmpty() )
mMsgPart->setContentDescription( desc );
// apply Content-Type:
- QCString type = mimeType().latin1();
- QCString subtype;
+ TQCString type = mimeType().latin1();
+ TQCString subtype;
int idx = type.find('/');
if ( idx < 0 )
subtype = "";
@@ -422,7 +422,7 @@ void KMMsgPartDialogCompat::applyChanges()
mMsgPart->setSubtypeStr(subtype);
// apply Content-Transfer-Encoding:
- QCString cte;
+ TQCString cte;
if (subtype == "rfc822" && type == "message")
kdWarning( encoding() != SevenBit && encoding() != EightBit, 5006 )
<< "encoding on rfc822/message must be \"7bit\" or \"8bit\"" << endl;
@@ -433,7 +433,7 @@ void KMMsgPartDialogCompat::applyChanges()
case Base64: default: cte = "base64"; break;
}
if ( cte != mMsgPart->cteStr().lower() ) {
- QByteArray body = mMsgPart->bodyDecodedBinary();
+ TQByteArray body = mMsgPart->bodyDecodedBinary();
mMsgPart->setCteStr( cte );
mMsgPart->setBodyEncodedBinary( body );
}
diff --git a/kmail/kmmsgpartdlg.h b/kmail/kmmsgpartdlg.h
index c913799cf..601d2ca3b 100644
--- a/kmail/kmmsgpartdlg.h
+++ b/kmail/kmmsgpartdlg.h
@@ -41,23 +41,23 @@ class KMMsgPartDialog: public KDialogBase
Q_OBJECT
public:
- KMMsgPartDialog( const QString & caption=QString::null,
- QWidget * parent=0, const char * name=0 );
+ KMMsgPartDialog( const TQString & caption=TQString::null,
+ TQWidget * parent=0, const char * name=0 );
virtual ~KMMsgPartDialog();
/** Get the currently selected mimetype */
- QString mimeType() const;
+ TQString mimeType() const;
/** Sets the mime type to be displayed. */
- void setMimeType( const QString & type, const QString & subtype );
+ void setMimeType( const TQString & type, const TQString & subtype );
/** This is an overloaded member function, provided for
convenience. It behaves essentially like the above function.
Sets the mime type to be displayed, but only if @p mimeType
passes KMimeTypeValidator's test. */
- void setMimeType( const QString & mimeType );
+ void setMimeType( const TQString & mimeType );
/** Sets the initial list of mime types to be displayed in the
combobox. The items are @em not validated. */
- void setMimeTypeList( const QStringList & mimeTypes );
+ void setMimeTypeList( const TQStringList & mimeTypes );
/** Sets the size of the file to be attached in bytes. This is
strictly informational and thus can't be queried. If @p approx
@@ -67,18 +67,18 @@ public:
/** Returns the current file name of the attachment. Note that this
doesn't define which file is being attached. It only defines
what the attachment's filename parameter should contain. */
- QString fileName() const;
+ TQString fileName() const;
/** Sets the file name of the attachment. Note that this doesn't
define which file is being attached. It only defines what the
attachment's filename parameter should contain. */
- void setFileName( const QString & fileName );
+ void setFileName( const TQString & fileName );
/** Returns the content of the Content-Description header
field. This field is only informational. */
- QString description() const;
+ TQString description() const;
/** Sets the description of the attachment, ie. the content of the
Content-Description header field. */
- void setDescription( const QString & description );
+ void setDescription( const TQString & description );
/** The list of supported encodings */
enum Encoding {
@@ -119,19 +119,19 @@ public:
void setCanSign( bool enable );
protected slots:
- void slotMimeTypeChanged( const QString & mimeType );
+ void slotMimeTypeChanged( const TQString & mimeType );
protected:
KComboBox *mMimeType;
- QLabel *mIcon;
- QLabel *mSize;
- QLineEdit *mFileName;
- QLineEdit *mDescription;
- QComboBox *mEncoding;
- QCheckBox *mInline;
- QCheckBox *mEncrypted;
- QCheckBox *mSigned;
- QStringList mI18nizedEncodings;
+ TQLabel *mIcon;
+ TQLabel *mSize;
+ TQLineEdit *mFileName;
+ TQLineEdit *mDescription;
+ TQComboBox *mEncoding;
+ TQCheckBox *mInline;
+ TQCheckBox *mEncrypted;
+ TQCheckBox *mSigned;
+ TQStringList mI18nizedEncodings;
};
/** @short The attachment dialog with convenience backward compatible methods
@@ -140,7 +140,7 @@ protected:
class KMMsgPartDialogCompat : public KMMsgPartDialog {
Q_OBJECT
public:
- KMMsgPartDialogCompat( QWidget * parent=0, const char * caption=0, bool=FALSE );
+ KMMsgPartDialogCompat( TQWidget * parent=0, const char * caption=0, bool=FALSE );
virtual ~KMMsgPartDialogCompat();
/** Display information about this message part. */
diff --git a/kmail/kmpopfiltercnfrmdlg.cpp b/kmail/kmpopfiltercnfrmdlg.cpp
index a51333e21..2654f52ca 100644
--- a/kmail/kmpopfiltercnfrmdlg.cpp
+++ b/kmail/kmpopfiltercnfrmdlg.cpp
@@ -12,12 +12,12 @@
#include "kmpopfiltercnfrmdlg.h"
#include "kmheaders.h"
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qheader.h>
-#include <qcheckbox.h>
-#include <qvgroupbox.h>
-#include <qtimer.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqheader.h>
+#include <tqcheckbox.h>
+#include <tqvgroupbox.h>
+#include <tqtimer.h>
#include <klocale.h>
#include <kio/global.h>
@@ -26,15 +26,15 @@
////////////////////////////////////////
/// view
-KMPopHeadersView::KMPopHeadersView(QWidget *aParent, KMPopFilterCnfrmDlg *aDialog)
+KMPopHeadersView::KMPopHeadersView(TQWidget *aParent, KMPopFilterCnfrmDlg *aDialog)
: KListView(aParent)
{
mDialog=aDialog;
- int mDownIndex=addColumn(QIconSet(QPixmap(mDown)), QString::null, 24);
+ int mDownIndex=addColumn(TQIconSet(TQPixmap(mDown)), TQString::null, 24);
assert( mDownIndex == Down ); //This code relies on the fact that radiobuttons are the first three columns for easier Column-Action mapping
//it does not necessarily be true - you could redefine mapToColumn and mapToAction to eg. shift those numbers by 1
- addColumn(QIconSet(QPixmap(mLater)), QString::null, 24);
- addColumn(QIconSet(QPixmap(mDel)), QString::null, 24);
+ addColumn(TQIconSet(TQPixmap(mLater)), TQString::null, 24);
+ addColumn(TQIconSet(TQPixmap(mDel)), TQString::null, 24);
/*int subjCol =*/ addColumn(i18n("Subject"), 180);
/*int sendCol =*/ addColumn(i18n("Sender"), 150);
@@ -61,8 +61,8 @@ KMPopHeadersView::KMPopHeadersView(QWidget *aParent, KMPopFilterCnfrmDlg *aDialo
//we rely on fixed column order, so we forbid this
header()->setMovingEnabled(false);
- connect(this, SIGNAL(pressed(QListViewItem*, const QPoint&, int)),
- SLOT(slotPressed(QListViewItem*, const QPoint&, int)));
+ connect(this, TQT_SIGNAL(pressed(TQListViewItem*, const TQPoint&, int)),
+ TQT_SLOT(slotPressed(TQListViewItem*, const TQPoint&, int)));
}
KMPopHeadersView::~KMPopHeadersView()
@@ -70,7 +70,7 @@ KMPopHeadersView::~KMPopHeadersView()
}
//Handle keystrokes - Left and Right key select previous/next action correspondingly
-void KMPopHeadersView::keyPressEvent( QKeyEvent *e )
+void KMPopHeadersView::keyPressEvent( TQKeyEvent *e )
{
if (e->key() == Key_Left) {
KMPopHeadersViewItem *item = dynamic_cast<KMPopHeadersViewItem*>( selectedItem() );
@@ -89,11 +89,11 @@ void KMPopHeadersView::keyPressEvent( QKeyEvent *e )
}
}
} else {
- QListView::keyPressEvent( e );
+ TQListView::keyPressEvent( e );
}
}
-void KMPopHeadersView::slotPressed(QListViewItem* aItem, const QPoint&, int aColumn) {
+void KMPopHeadersView::slotPressed(TQListViewItem* aItem, const TQPoint&, int aColumn) {
if ( !( aItem && aColumn>=0 && aColumn<NoAction ) ) return;
KMPopHeadersViewItem *item = dynamic_cast<KMPopHeadersViewItem*>(aItem);
assert( item );
@@ -238,9 +238,9 @@ KMPopHeadersViewItem::KMPopHeadersViewItem(KMPopHeadersView *aParent, KMPopFilte
mParent = aParent;
mAction = NoAction;
- setPixmap(mParent->mapToColumn(Delete), QPixmap(KMPopHeadersView::mUnchecked));
- setPixmap(mParent->mapToColumn(Down), QPixmap(KMPopHeadersView::mUnchecked));
- setPixmap(mParent->mapToColumn(Later), QPixmap(KMPopHeadersView::mUnchecked));
+ setPixmap(mParent->mapToColumn(Delete), TQPixmap(KMPopHeadersView::mUnchecked));
+ setPixmap(mParent->mapToColumn(Down), TQPixmap(KMPopHeadersView::mUnchecked));
+ setPixmap(mParent->mapToColumn(Later), TQPixmap(KMPopHeadersView::mUnchecked));
setAction( aAction );
}
@@ -253,17 +253,17 @@ void KMPopHeadersViewItem::setAction(KMPopFilterAction aAction)
{
if(aAction != NoAction && aAction!=mAction)
{
- if ( mAction!=NoAction ) setPixmap(mParent->mapToColumn(mAction), QPixmap(KMPopHeadersView::mUnchecked));
- setPixmap(mParent->mapToColumn(aAction), QPixmap(KMPopHeadersView::mChecked));
+ if ( mAction!=NoAction ) setPixmap(mParent->mapToColumn(mAction), TQPixmap(KMPopHeadersView::mUnchecked));
+ setPixmap(mParent->mapToColumn(aAction), TQPixmap(KMPopHeadersView::mChecked));
mAction=aAction;
}
}
-void KMPopHeadersViewItem::paintFocus(QPainter *, const QColorGroup &, const QRect &)
+void KMPopHeadersViewItem::paintFocus(TQPainter *, const TQColorGroup &, const TQRect &)
{
}
-QString KMPopHeadersViewItem::key(int col, bool) const
+TQString KMPopHeadersViewItem::key(int col, bool) const
{
if (col == 3) return KMMsgBase::skipKeyword(text(col).lower());
if (col == 6) return text(8);
@@ -277,7 +277,7 @@ QString KMPopHeadersViewItem::key(int col, bool) const
/// dlg
/////////////////////////////////////////
/////////////////////////////////////////
-KMPopFilterCnfrmDlg::KMPopFilterCnfrmDlg(QPtrList<KMPopHeaders> *aHeaders, const QString &aAccount, bool aShowLaterMsgs, QWidget *aParent, const char *aName)
+KMPopFilterCnfrmDlg::KMPopFilterCnfrmDlg(TQPtrList<KMPopHeaders> *aHeaders, const TQString &aAccount, bool aShowLaterMsgs, TQWidget *aParent, const char *aName)
: KDialogBase(aParent, aName, true, i18n("POP Filter"), Ok | Help, Ok, false)
{
unsigned int rulesetCount = 0;
@@ -285,26 +285,26 @@ KMPopFilterCnfrmDlg::KMPopFilterCnfrmDlg(QPtrList<KMPopHeaders> *aHeaders, const
mShowLaterMsgs = aShowLaterMsgs;
mLowerBoxVisible = false;
- QWidget *w = new QWidget(this);
+ TQWidget *w = new TQWidget(this);
setMainWidget(w);
- QVBoxLayout *vbl = new QVBoxLayout(w, 0, spacingHint());
+ TQVBoxLayout *vbl = new TQVBoxLayout(w, 0, spacingHint());
- QLabel *l = new QLabel(i18n("Messages to filter found on POP Account: <b>%1</b><p>"
+ TQLabel *l = new TQLabel(i18n("Messages to filter found on POP Account: <b>%1</b><p>"
"The messages shown exceed the maximum size limit you defined for this account.<br>You can select "
"what you want to do with them by checking the appropriate button.").arg(aAccount), w);
vbl->addWidget(l);
- QVGroupBox *upperBox = new QVGroupBox(i18n("Messages Exceeding Size"), w);
+ TQVGroupBox *upperBox = new TQVGroupBox(i18n("Messages Exceeding Size"), w);
upperBox->hide();
KMPopHeadersView *lv = new KMPopHeadersView(upperBox, this);
vbl->addWidget(upperBox);
- QVGroupBox *lowerBox = new QVGroupBox(i18n("Ruleset Filtered Messages: none"), w);
- QString checkBoxText((aShowLaterMsgs)?
+ TQVGroupBox *lowerBox = new TQVGroupBox(i18n("Ruleset Filtered Messages: none"), w);
+ TQString checkBoxText((aShowLaterMsgs)?
i18n("Show messages matched by a ruleset and tagged 'Download' or 'Delete'"):
i18n("Show messages matched by a filter ruleset"));
- QCheckBox* cb = new QCheckBox(checkBoxText, lowerBox);
+ TQCheckBox* cb = new TQCheckBox(checkBoxText, lowerBox);
cb->setEnabled(false);
mFilteredHeaders = new KMPopHeadersView(lowerBox, this);
mFilteredHeaders->hide();
@@ -363,15 +363,15 @@ KMPopFilterCnfrmDlg::KMPopFilterCnfrmDlg(QPtrList<KMPopHeaders> *aHeaders, const
lowerBox->setTitle(i18n("Ruleset Filtered Messages: %1").arg(rulesetCount));
// connect signals and slots
- connect(lv, SIGNAL(pressed(QListViewItem*, const QPoint&, int)),
- this, SLOT(slotPressed(QListViewItem*, const QPoint&, int)));
- connect(mFilteredHeaders, SIGNAL(pressed(QListViewItem*, const QPoint&, int)),
- this, SLOT(slotPressed(QListViewItem*, const QPoint&, int)));
- connect(cb, SIGNAL(toggled(bool)),
- this, SLOT(slotToggled(bool)));
+ connect(lv, TQT_SIGNAL(pressed(TQListViewItem*, const TQPoint&, int)),
+ this, TQT_SLOT(slotPressed(TQListViewItem*, const TQPoint&, int)));
+ connect(mFilteredHeaders, TQT_SIGNAL(pressed(TQListViewItem*, const TQPoint&, int)),
+ this, TQT_SLOT(slotPressed(TQListViewItem*, const TQPoint&, int)));
+ connect(cb, TQT_SIGNAL(toggled(bool)),
+ this, TQT_SLOT(slotToggled(bool)));
adjustSize();
- QTimer::singleShot(0, this, SLOT(slotUpdateMinimumSize()));
+ TQTimer::singleShot(0, this, TQT_SLOT(slotUpdateMinimumSize()));
}
KMPopFilterCnfrmDlg::~KMPopFilterCnfrmDlg()
@@ -381,7 +381,7 @@ KMPopFilterCnfrmDlg::~KMPopFilterCnfrmDlg()
void KMPopFilterCnfrmDlg::setupLVI(KMPopHeadersViewItem *lvi, KMMessage *msg)
{
// set the subject
- QString tmp = msg->subject();
+ TQString tmp = msg->subject();
if(tmp.isEmpty())
tmp = i18n("no subject");
lvi->setText(3, tmp);
@@ -406,7 +406,7 @@ void KMPopFilterCnfrmDlg::setupLVI(KMPopHeadersViewItem *lvi, KMMessage *msg)
lvi->setText(8, msg->dateIsoStr());
}
-void KMPopFilterCnfrmDlg::setAction(QListViewItem *aItem, KMPopFilterAction aAction)
+void KMPopFilterCnfrmDlg::setAction(TQListViewItem *aItem, KMPopFilterAction aAction)
{
mItemMap[aItem]->setAction(aAction);
}
@@ -416,7 +416,7 @@ void KMPopFilterCnfrmDlg::setAction(QListViewItem *aItem, KMPopFilterAction aAct
click happened over a radio button column.
Of course the radio button state is changed as well if the above is true.
*/
-void KMPopFilterCnfrmDlg::slotPressed(QListViewItem *aItem, const QPoint &, int aColumn)
+void KMPopFilterCnfrmDlg::slotPressed(TQListViewItem *aItem, const TQPoint &, int aColumn)
{
if ( aColumn>=0 && aColumn<NoAction ) setAction(aItem,KMPopHeadersView::mapToAction(aColumn));
}
@@ -459,7 +459,7 @@ void KMPopFilterCnfrmDlg::slotToggled(bool aOn)
mFilteredHeaders->hide();
}
}
- QTimer::singleShot(0, this, SLOT(slotUpdateMinimumSize()));
+ TQTimer::singleShot(0, this, TQT_SLOT(slotUpdateMinimumSize()));
}
void KMPopFilterCnfrmDlg::slotUpdateMinimumSize()
diff --git a/kmail/kmpopfiltercnfrmdlg.h b/kmail/kmpopfiltercnfrmdlg.h
index 745fdcdd5..35548c27b 100644
--- a/kmail/kmpopfiltercnfrmdlg.h
+++ b/kmail/kmpopfiltercnfrmdlg.h
@@ -23,8 +23,8 @@
#include <kdialogbase.h>
#include <klistview.h>
-#include <qptrlist.h>
-#include <qmap.h>
+#include <tqptrlist.h>
+#include <tqmap.h>
class QWidget;
class QString;
@@ -38,7 +38,7 @@ class KMPopHeadersView : public KListView
Q_OBJECT
public:
- KMPopHeadersView(QWidget *aParent=0, KMPopFilterCnfrmDlg *aDialog=0);
+ KMPopHeadersView(TQWidget *aParent=0, KMPopFilterCnfrmDlg *aDialog=0);
~KMPopHeadersView();
static const KMPopFilterAction mapToAction(int aColumn) { return (KMPopFilterAction)aColumn;};
static const int mapToColumn(KMPopFilterAction aAction) { return (int)aAction;};
@@ -48,10 +48,10 @@ protected:
static const char *mLater[25];
static const char *mDown[20];
static const char *mDel[19];
- void keyPressEvent( QKeyEvent *k);
+ void keyPressEvent( TQKeyEvent *k);
protected slots: // Protected slots
- void slotPressed(QListViewItem* aItem, const QPoint& aPoint, int aColumn);
+ void slotPressed(TQListViewItem* aItem, const TQPoint& aPoint, int aColumn);
private:
KMPopFilterCnfrmDlg *mDialog;
@@ -66,8 +66,8 @@ public:
~KMPopHeadersViewItem();
void setAction(KMPopFilterAction aAction);
KMPopFilterAction action() { return mAction; };
- virtual void paintFocus(QPainter *, const QColorGroup & cg, const QRect &r);
- virtual QString key(int col, bool ascending) const;
+ virtual void paintFocus(TQPainter *, const TQColorGroup & cg, const TQRect &r);
+ virtual TQString key(int col, bool ascending) const;
protected:
KMPopHeadersView *mParent;
KMPopFilterAction mAction;
@@ -80,9 +80,9 @@ class KMPopFilterCnfrmDlg : public KDialogBase
Q_OBJECT
protected:
KMPopFilterCnfrmDlg() { };
- QMap<QListViewItem*, KMPopHeaders*> mItemMap;
- QPtrList<KMPopHeadersViewItem> mDelList;
- QPtrList<KMPopHeaders> mDDLList;
+ TQMap<TQListViewItem*, KMPopHeaders*> mItemMap;
+ TQPtrList<KMPopHeadersViewItem> mDelList;
+ TQPtrList<KMPopHeaders> mDDLList;
KMPopHeadersView *mFilteredHeaders;
bool mLowerBoxVisible;
bool mShowLaterMsgs;
@@ -90,11 +90,11 @@ protected:
public:
- KMPopFilterCnfrmDlg(QPtrList<KMPopHeaders> *aHeaders, const QString &aAccount, bool aShowLaterMsgs = false, QWidget *aParent=0, const char *aName=0);
+ KMPopFilterCnfrmDlg(TQPtrList<KMPopHeaders> *aHeaders, const TQString &aAccount, bool aShowLaterMsgs = false, TQWidget *aParent=0, const char *aName=0);
~KMPopFilterCnfrmDlg();
public:
- void setAction(QListViewItem *aItem, KMPopFilterAction aAction);
+ void setAction(TQListViewItem *aItem, KMPopFilterAction aAction);
protected slots: // Protected slots
/**
@@ -103,7 +103,7 @@ protected slots: // Protected slots
click happened over a radio button column.
Of course the radio button state is changed as well if the above is true.
*/
- void slotPressed(QListViewItem *aItem, const QPoint &aPnt, int aColumn);
+ void slotPressed(TQListViewItem *aItem, const TQPoint &aPnt, int aColumn);
void slotToggled(bool aOn);
void slotUpdateMinimumSize();
};
diff --git a/kmail/kmpopheaders.cpp b/kmail/kmpopheaders.cpp
index 8c5866007..85445abd2 100644
--- a/kmail/kmpopheaders.cpp
+++ b/kmail/kmpopheaders.cpp
@@ -27,7 +27,7 @@ KMPopHeaders::~KMPopHeaders(){
}
/** No descriptions */
-KMPopHeaders::KMPopHeaders(const QString& aId, const QString& aUid, KMPopFilterAction aAction)
+KMPopHeaders::KMPopHeaders(const TQString& aId, const TQString& aUid, KMPopFilterAction aAction)
: mAction(aAction),
mId(aId),
mUid(aUid),
@@ -37,12 +37,12 @@ KMPopHeaders::KMPopHeaders(const QString& aId, const QString& aUid, KMPopFilterA
}
/** No descriptions */
-QString KMPopHeaders::id() const{
+TQString KMPopHeaders::id() const{
return mId;
}
/** No descriptions */
-QString KMPopHeaders::uid() const{
+TQString KMPopHeaders::uid() const{
return mUid;
}
diff --git a/kmail/kmpopheaders.h b/kmail/kmpopheaders.h
index 0106319f4..bb7cc5b5a 100644
--- a/kmail/kmpopheaders.h
+++ b/kmail/kmpopheaders.h
@@ -11,7 +11,7 @@
#ifndef KMPopHeaders_H
#define KMPopHeaders_H
-#include <qstring.h>
+#include <tqstring.h>
#include "kmmessage.h"
@@ -24,13 +24,13 @@ public:
KMPopHeaders();
~KMPopHeaders();
/** constructor */
- KMPopHeaders(const QString& aId, const QString& aUid, KMPopFilterAction aAction);
+ KMPopHeaders(const TQString& aId, const TQString& aUid, KMPopFilterAction aAction);
/** returns the id of the message */
- QString id() const;
+ TQString id() const;
/** returns the uid of the message */
- QString uid() const;
+ TQString uid() const;
/** returns the header of the message */
KMMessage * header() const;
@@ -51,9 +51,9 @@ protected: // Protected attributes
/** */
KMPopFilterAction mAction;
/** */
- QString mId;
+ TQString mId;
/** */
- QString mUid;
+ TQString mUid;
/** */
bool mRuleMatched;
/** */
diff --git a/kmail/kmreadermainwin.cpp b/kmail/kmreadermainwin.cpp
index 655e09181..8e77ad9d7 100644
--- a/kmail/kmreadermainwin.cpp
+++ b/kmail/kmreadermainwin.cpp
@@ -26,7 +26,7 @@
#include <config.h>
#endif
-#include <qaccel.h>
+#include <tqaccel.h>
#include <kapplication.h>
#include <kedittoolbar.h>
#include <klocale.h>
@@ -79,8 +79,8 @@ KMReaderMainWin::KMReaderMainWin( char *name )
//-----------------------------------------------------------------------------
KMReaderMainWin::KMReaderMainWin(KMMessagePart* aMsgPart,
- bool aHTML, const QString& aFileName, const QString& pname,
- const QString & encoding, char *name )
+ bool aHTML, const TQString& aFileName, const TQString& pname,
+ const TQString & encoding, char *name )
: KMail::SecondaryWindow( name ? name : "readerwindow#" ),
mMsg( 0 )
{
@@ -103,13 +103,13 @@ void KMReaderMainWin::initKMReaderMainWin() {
toolBar( "mainToolBar" )->hide();
}
- connect( kmkernel, SIGNAL( configChanged() ),
- this, SLOT( slotConfigChanged() ) );
+ connect( kmkernel, TQT_SIGNAL( configChanged() ),
+ this, TQT_SLOT( slotConfigChanged() ) );
}
void KMReaderMainWin::setupForwardingActionsList()
{
- QPtrList<KAction> mForwardActionList;
+ TQPtrList<KAction> mForwardActionList;
if ( GlobalSettings::self()->forwardingInlineByDefault() ) {
unplugActionList( "forward_action_list" );
mForwardActionList.append( mForwardInlineAction );
@@ -140,7 +140,7 @@ void KMReaderMainWin::setUseFixedFont( bool useFixedFont )
}
//-----------------------------------------------------------------------------
-void KMReaderMainWin::showMsg( const QString & encoding, KMMessage *msg )
+void KMReaderMainWin::showMsg( const TQString & encoding, KMMessage *msg )
{
mReaderWin->setOverrideEncoding( encoding );
mReaderWin->setMsg( msg, true );
@@ -151,11 +151,11 @@ void KMReaderMainWin::showMsg( const QString & encoding, KMMessage *msg )
menuBar()->show();
toolBar( "mainToolBar" )->show();
- connect ( msg->parent(), SIGNAL( destroyed( QObject* ) ), this, SLOT( slotFolderRemoved( QObject* ) ) );
+ connect ( msg->parent(), TQT_SIGNAL( destroyed( TQObject* ) ), this, TQT_SLOT( slotFolderRemoved( TQObject* ) ) );
}
-void KMReaderMainWin::slotFolderRemoved( QObject* folderPtr )
+void KMReaderMainWin::slotFolderRemoved( TQObject* folderPtr )
{
assert(mMsg);
assert(folderPtr == mMsg->parent());
@@ -289,38 +289,38 @@ void KMReaderMainWin::setupAccel()
mMsgActions = new KMail::MessageActions( actionCollection(), this );
mMsgActions->setMessageView( mReaderWin );
//----- File Menu
- //mOpenAction = KStdAction::open( this, SLOT( slotOpenMsg() ),
+ //mOpenAction = KStdAction::open( this, TQT_SLOT( slotOpenMsg() ),
// actionCollection() );
//mSaveAsAction = new KAction( i18n("Save &As..."), "filesave",
// KStdAccel::shortcut( KStdAccel::Save ),
- // this, SLOT( slotSaveMsg() ),
+ // this, TQT_SLOT( slotSaveMsg() ),
// actionCollection(), "file_save_as" );
- mSaveAsAction = KStdAction::saveAs( mReaderWin, SLOT( slotSaveMsg() ),
+ mSaveAsAction = KStdAction::saveAs( mReaderWin, TQT_SLOT( slotSaveMsg() ),
actionCollection() );
mSaveAsAction->setShortcut( KStdAccel::shortcut( KStdAccel::Save ) );
- mPrintAction = KStdAction::print( this, SLOT( slotPrintMsg() ),
+ mPrintAction = KStdAction::print( this, TQT_SLOT( slotPrintMsg() ),
actionCollection() );
- 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);
//----- Edit Menu
- KStdAction::copy( this, SLOT( slotCopy() ), actionCollection() );
- KStdAction::selectAll( this, SLOT( slotMarkAll() ), actionCollection() );
- KStdAction::find( this, SLOT(slotFind()), actionCollection() );
- KStdAction::findNext( this, SLOT( slotFindNext() ), actionCollection() );
+ KStdAction::copy( this, TQT_SLOT( slotCopy() ), actionCollection() );
+ KStdAction::selectAll( this, TQT_SLOT( slotMarkAll() ), actionCollection() );
+ KStdAction::find( this, TQT_SLOT(slotFind()), actionCollection() );
+ KStdAction::findNext( this, TQT_SLOT( slotFindNext() ), actionCollection() );
mTrashAction = new KAction( KGuiItem( i18n( "&Move to Trash" ), "edittrash",
i18n( "Move message to trashcan" ) ),
- Key_Delete, this, SLOT( slotTrashMsg() ),
+ Key_Delete, this, TQT_SLOT( slotTrashMsg() ),
actionCollection(), "move_to_trash" );
//----- View Menu
mViewSourceAction = new KAction( i18n("&View Source"), Key_V, this,
- SLOT(slotShowMsgSrc()), actionCollection(),
+ TQT_SLOT(slotShowMsgSrc()), actionCollection(),
"view_source" );
@@ -329,25 +329,25 @@ void KMReaderMainWin::setupAccel()
"message_forward" );
mForwardInlineAction = new KAction( i18n("&Inline..."),
"mail_forward", SHIFT+Key_F, this,
- SLOT(slotForwardInlineMsg()),
+ TQT_SLOT(slotForwardInlineMsg()),
actionCollection(),
"message_forward_inline" );
mForwardAttachedAction = new KAction( i18n("Message->Forward->","As &Attachment..."),
"mail_forward", Key_F, this,
- SLOT(slotForwardAttachedMsg()),
+ TQT_SLOT(slotForwardAttachedMsg()),
actionCollection(),
"message_forward_as_attachment" );
mForwardDigestAction = new KAction( i18n("Message->Forward->","As Di&gest..."),
"mail_forward", 0, this,
- SLOT(slotForwardDigestMsg()),
+ TQT_SLOT(slotForwardDigestMsg()),
actionCollection(),
"message_forward_as_digest" );
mRedirectAction = new KAction( i18n("Message->Forward->","&Redirect..."),
"mail_forward", Key_E, this,
- SLOT(slotRedirectMsg()),
+ TQT_SLOT(slotRedirectMsg()),
actionCollection(),
"message_forward_redirect" );
@@ -356,15 +356,15 @@ void KMReaderMainWin::setupAccel()
mForwardActionMenu->insert( mForwardAttachedAction );
mForwardInlineAction->setShortcut( Key_F );
mForwardAttachedAction->setShortcut( SHIFT+Key_F );
- connect( mForwardActionMenu, SIGNAL(activated()), this,
- SLOT(slotForwardInlineMsg()) );
+ connect( mForwardActionMenu, TQT_SIGNAL(activated()), this,
+ TQT_SLOT(slotForwardInlineMsg()) );
} else {
mForwardActionMenu->insert( mForwardAttachedAction );
mForwardActionMenu->insert( mForwardInlineAction );
mForwardInlineAction->setShortcut( SHIFT+Key_F );
mForwardAttachedAction->setShortcut( Key_F );
- connect( mForwardActionMenu, SIGNAL(activated()), this,
- SLOT(slotForwardAttachedMsg()) );
+ connect( mForwardActionMenu, TQT_SIGNAL(activated()), this,
+ TQT_SLOT(slotForwardAttachedMsg()) );
}
mForwardActionMenu->insert( mForwardDigestAction );
@@ -373,36 +373,36 @@ void KMReaderMainWin::setupAccel()
fontAction = new KFontAction( "Select Font", 0, actionCollection(),
"text_font" );
fontAction->setFont( mReaderWin->cssHelper()->bodyFont().family() );
- connect( fontAction, SIGNAL( activated( const QString& ) ),
- SLOT( slotFontAction( const QString& ) ) );
+ connect( fontAction, TQT_SIGNAL( activated( const TQString& ) ),
+ TQT_SLOT( slotFontAction( const TQString& ) ) );
fontSizeAction = new KFontSizeAction( "Select Size", 0, actionCollection(),
"text_size" );
fontSizeAction->setFontSize( mReaderWin->cssHelper()->bodyFont().pointSize() );
- connect( fontSizeAction, SIGNAL( fontSizeChanged( int ) ),
- SLOT( slotSizeAction( int ) ) );
+ connect( fontSizeAction, TQT_SIGNAL( fontSizeChanged( int ) ),
+ TQT_SLOT( slotSizeAction( int ) ) );
- QAccel *accel = new QAccel(mReaderWin, "showMsg()");
+ TQAccel *accel = new TQAccel(mReaderWin, "showMsg()");
accel->connectItem(accel->insertItem(Key_Up),
- mReaderWin, SLOT(slotScrollUp()));
+ mReaderWin, TQT_SLOT(slotScrollUp()));
accel->connectItem(accel->insertItem(Key_Down),
- mReaderWin, SLOT(slotScrollDown()));
+ mReaderWin, TQT_SLOT(slotScrollDown()));
accel->connectItem(accel->insertItem(Key_Prior),
- mReaderWin, SLOT(slotScrollPrior()));
+ mReaderWin, TQT_SLOT(slotScrollPrior()));
accel->connectItem(accel->insertItem(Key_Next),
- mReaderWin, SLOT(slotScrollNext()));
+ mReaderWin, TQT_SLOT(slotScrollNext()));
accel->connectItem(accel->insertItem(KStdAccel::shortcut(KStdAccel::Copy)),
- mReaderWin, SLOT(slotCopySelectedText()));
- connect( mReaderWin, SIGNAL(popupMenu(KMMessage&,const KURL&,const QPoint&)),
- this, SLOT(slotMsgPopup(KMMessage&,const KURL&,const QPoint&)));
- connect(mReaderWin, SIGNAL(urlClicked(const KURL&,int)),
- mReaderWin, SLOT(slotUrlClicked()));
+ mReaderWin, TQT_SLOT(slotCopySelectedText()));
+ connect( mReaderWin, TQT_SIGNAL(popupMenu(KMMessage&,const KURL&,const TQPoint&)),
+ this, TQT_SLOT(slotMsgPopup(KMMessage&,const KURL&,const TQPoint&)));
+ connect(mReaderWin, TQT_SIGNAL(urlClicked(const KURL&,int)),
+ mReaderWin, TQT_SLOT(slotUrlClicked()));
setStandardToolBarMenuEnabled(true);
- KStdAction::configureToolbars(this, SLOT(slotEditToolbars()), actionCollection());
+ KStdAction::configureToolbars(this, TQT_SLOT(slotEditToolbars()), actionCollection());
}
-void KMReaderMainWin::slotMsgPopup(KMMessage &aMsg, const KURL &aUrl, const QPoint& aPoint)
+void KMReaderMainWin::slotMsgPopup(KMMessage &aMsg, const KURL &aUrl, const TQPoint& aPoint)
{
KPopupMenu * menu = new KPopupMenu;
mUrl = aUrl;
@@ -462,7 +462,7 @@ void KMReaderMainWin::slotMsgPopup(KMMessage &aMsg, const KURL &aUrl, const QPoi
menu->insertSeparator();
}
- QPopupMenu* copyMenu = new QPopupMenu(menu);
+ TQPopupMenu* copyMenu = new TQPopupMenu(menu);
KMMainWidget* mainwin = kmkernel->getKMMainWidget();
if ( mainwin )
mainwin->folderTree()->folderToPopupMenu( KMFolderTree::CopyMessage, this,
@@ -474,7 +474,7 @@ void KMReaderMainWin::slotMsgPopup(KMMessage &aMsg, const KURL &aUrl, const QPoi
menu->insertSeparator();
mPrintAction->plug( menu );
mSaveAsAction->plug( menu );
- menu->insertItem( i18n("Save Attachments..."), mReaderWin, SLOT(slotSaveAttachments()) );
+ menu->insertItem( i18n("Save Attachments..."), mReaderWin, TQT_SLOT(slotSaveAttachments()) );
mMsgActions->createTodoAction()->plug( menu );
}
menu->exec(aPoint, 0);
@@ -490,9 +490,9 @@ void KMReaderMainWin::copySelectedToFolder( int menuId )
command->start();
}
-void KMReaderMainWin::slotFontAction( const QString& font)
+void KMReaderMainWin::slotFontAction( const TQString& font)
{
- QFont f( mReaderWin->cssHelper()->bodyFont() );
+ TQFont f( mReaderWin->cssHelper()->bodyFont() );
f.setFamily( font );
mReaderWin->cssHelper()->setBodyFont( f );
mReaderWin->cssHelper()->setPrintFont( f );
@@ -502,7 +502,7 @@ void KMReaderMainWin::slotFontAction( const QString& font)
void KMReaderMainWin::slotSizeAction( int size )
{
- QFont f( mReaderWin->cssHelper()->bodyFont() );
+ TQFont f( mReaderWin->cssHelper()->bodyFont() );
f.setPointSize( size );
mReaderWin->cssHelper()->setBodyFont( f );
mReaderWin->cssHelper()->setPrintFont( f );
@@ -522,7 +522,7 @@ void KMReaderMainWin::slotEditToolbars()
{
saveMainWindowSettings( KMKernel::config(), "ReaderWindow" );
KEditToolbar dlg( guiFactory(), this );
- connect( &dlg, SIGNAL(newToolbarConfig()), SLOT(slotUpdateToolbars()) );
+ connect( &dlg, TQT_SIGNAL(newToolbarConfig()), TQT_SLOT(slotUpdateToolbars()) );
dlg.exec();
}
diff --git a/kmail/kmreadermainwin.h b/kmail/kmreadermainwin.h
index 1e62a4e79..2d19324b6 100644
--- a/kmail/kmreadermainwin.h
+++ b/kmail/kmreadermainwin.h
@@ -30,14 +30,14 @@ public:
KMReaderMainWin( bool htmlOverride, bool htmlLoadExtOverride, char *name = 0 );
KMReaderMainWin( char *name = 0 );
KMReaderMainWin(KMMessagePart* aMsgPart,
- bool aHTML, const QString& aFileName, const QString& pname,
- const QString & encoding, char *name = 0 );
+ bool aHTML, const TQString& aFileName, const TQString& pname,
+ const TQString & encoding, char *name = 0 );
virtual ~KMReaderMainWin();
void setUseFixedFont( bool useFixedFont );
// take ownership of and show @param msg
- void showMsg( const QString & encoding, KMMessage *msg );
+ void showMsg( const TQString & encoding, KMMessage *msg );
/**
* Sets up action list for forward menu.
@@ -45,7 +45,7 @@ public:
void setupForwardingActionsList();
private slots:
- void slotMsgPopup(KMMessage &aMsg, const KURL &aUrl, const QPoint& aPoint);
+ void slotMsgPopup(KMMessage &aMsg, const KURL &aUrl, const TQPoint& aPoint);
/** Copy selected messages to folder with corresponding to given menuid */
void copySelectedToFolder( int menuId );
@@ -60,7 +60,7 @@ private slots:
void slotCopy();
void slotFind();
void slotFindNext();
- void slotFontAction(const QString &);
+ void slotFontAction(const TQString &);
void slotSizeAction(int);
void slotCreateTodo();
void slotEditToolbars();
@@ -68,7 +68,7 @@ private slots:
void slotConfigChanged();
void slotUpdateToolbars();
- void slotFolderRemoved( QObject* folderPtr );
+ void slotFolderRemoved( TQObject* folderPtr );
private:
void initKMReaderMainWin();
@@ -77,7 +77,7 @@ private:
KMReaderWin *mReaderWin;
KMMessage *mMsg;
KURL mUrl;
- QMap<int,KMFolder*> mMenuToFolder;
+ TQMap<int,KMFolder*> mMenuToFolder;
// a few actions duplicated from kmmainwidget
KAction *mTrashAction, *mPrintAction, *mSaveAsAction, *mForwardInlineAction,
*mForwardAttachedAction, *mForwardDigestAction, *mRedirectAction,
diff --git a/kmail/kmreaderwin.cpp b/kmail/kmreaderwin.cpp
index c3030304c..b5ee41052 100644
--- a/kmail/kmreaderwin.cpp
+++ b/kmail/kmreaderwin.cpp
@@ -110,14 +110,14 @@ using KMail::TeeHtmlWriter;
#include <kasciistricmp.h>
#include <kurldrag.h>
-#include <qclipboard.h>
-#include <qhbox.h>
-#include <qtextcodec.h>
-#include <qpaintdevicemetrics.h>
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qsplitter.h>
-#include <qstyle.h>
+#include <tqclipboard.h>
+#include <tqhbox.h>
+#include <tqtextcodec.h>
+#include <tqpaintdevicemetrics.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqsplitter.h>
+#include <tqstyle.h>
// X headers...
#undef Never
@@ -140,16 +140,16 @@ class NewByteArray : public QByteArray
public:
NewByteArray &appendNULL();
NewByteArray &operator+=( const char * );
- NewByteArray &operator+=( const QByteArray & );
- NewByteArray &operator+=( const QCString & );
- QByteArray& qByteArray();
+ NewByteArray &operator+=( const TQByteArray & );
+ NewByteArray &operator+=( const TQCString & );
+ TQByteArray& qByteArray();
};
NewByteArray& NewByteArray::appendNULL()
{
- QByteArray::detach();
+ TQByteArray::detach();
uint len1 = size();
- if ( !QByteArray::resize( len1 + 1 ) )
+ if ( !TQByteArray::resize( len1 + 1 ) )
return *this;
*(data() + len1) = '\0';
return *this;
@@ -158,41 +158,41 @@ NewByteArray& NewByteArray::operator+=( const char * newData )
{
if ( !newData )
return *this;
- QByteArray::detach();
+ TQByteArray::detach();
uint len1 = size();
uint len2 = qstrlen( newData );
- if ( !QByteArray::resize( len1 + len2 ) )
+ if ( !TQByteArray::resize( len1 + len2 ) )
return *this;
memcpy( data() + len1, newData, len2 );
return *this;
}
-NewByteArray& NewByteArray::operator+=( const QByteArray & newData )
+NewByteArray& NewByteArray::operator+=( const TQByteArray & newData )
{
if ( newData.isNull() )
return *this;
- QByteArray::detach();
+ TQByteArray::detach();
uint len1 = size();
uint len2 = newData.size();
- if ( !QByteArray::resize( len1 + len2 ) )
+ if ( !TQByteArray::resize( len1 + len2 ) )
return *this;
memcpy( data() + len1, newData.data(), len2 );
return *this;
}
-NewByteArray& NewByteArray::operator+=( const QCString & newData )
+NewByteArray& NewByteArray::operator+=( const TQCString & newData )
{
if ( newData.isEmpty() )
return *this;
- QByteArray::detach();
+ TQByteArray::detach();
uint len1 = size();
uint len2 = newData.length(); // forget about the trailing 0x00 !
- if ( !QByteArray::resize( len1 + len2 ) )
+ if ( !TQByteArray::resize( len1 + len2 ) )
return *this;
memcpy( data() + len1, newData.data(), len2 );
return *this;
}
-QByteArray& NewByteArray::qByteArray()
+TQByteArray& NewByteArray::qByteArray()
{
- return *((QByteArray*)this);
+ return *((TQByteArray*)this);
}
// This function returns the complete data that were in this
@@ -205,8 +205,8 @@ void KMReaderWin::objectTreeToDecryptedMsg( partNode* node,
bool weAreReplacingTheRootNode,
int recCount )
{
- kdDebug(5006) << QString("-------------------------------------------------" ) << endl;
- kdDebug(5006) << QString("KMReaderWin::objectTreeToDecryptedMsg( %1 ) START").arg( recCount ) << endl;
+ kdDebug(5006) << TQString("-------------------------------------------------" ) << endl;
+ kdDebug(5006) << TQString("KMReaderWin::objectTreeToDecryptedMsg( %1 ) START").arg( recCount ) << endl;
if( node ) {
partNode* curNode = node;
partNode* dataNode = curNode;
@@ -392,15 +392,15 @@ kdDebug(5006) << " new Content-Type = " << headers->ContentType(
// B) Store the body of this part.
if( headers && bIsMultipart && dataNode->firstChild() ) {
kdDebug(5006) << "is valid Multipart, processing children:" << endl;
- QCString boundary = headers->ContentType().Boundary().c_str();
+ TQCString boundary = headers->ContentType().Boundary().c_str();
curNode = dataNode->firstChild();
// store children of multipart
while( curNode ) {
kdDebug(5006) << "--boundary" << endl;
if( resultingData.size() &&
( '\n' != resultingData.at( resultingData.size()-1 ) ) )
- resultingData += QCString( "\n" );
- resultingData += QCString( "\n" );
+ resultingData += TQCString( "\n" );
+ resultingData += TQCString( "\n" );
resultingData += "--";
resultingData += boundary;
resultingData += "\n";
@@ -441,7 +441,7 @@ kdDebug(5006) << " Root node will NOT be replaced." << endl
recCount + 1 );
}
}
- kdDebug(5006) << QString("\nKMReaderWin::objectTreeToDecryptedMsg( %1 ) END").arg( recCount ) << endl;
+ kdDebug(5006) << TQString("\nKMReaderWin::objectTreeToDecryptedMsg( %1 ) END").arg( recCount ) << endl;
}
@@ -466,28 +466,28 @@ kdDebug(5006) << " Root node will NOT be replaced." << endl
void KMReaderWin::createWidgets() {
- QVBoxLayout * vlay = new QVBoxLayout( this );
- mSplitter = new QSplitter( Qt::Vertical, this, "mSplitter" );
+ TQVBoxLayout * vlay = new TQVBoxLayout( this );
+ mSplitter = new TQSplitter( Qt::Vertical, this, "mSplitter" );
vlay->addWidget( mSplitter );
mMimePartTree = new KMMimePartTree( this, mSplitter, "mMimePartTree" );
- mBox = new QHBox( mSplitter, "mBox" );
+ mBox = new TQHBox( mSplitter, "mBox" );
setStyleDependantFrameWidth();
mBox->setFrameStyle( mMimePartTree->frameStyle() );
mColorBar = new HtmlStatusBar( mBox, "mColorBar" );
mViewer = new KHTMLPart( mBox, "mViewer" );
mSplitter->setOpaqueResize( KGlobalSettings::opaqueResize() );
- mSplitter->setResizeMode( mMimePartTree, QSplitter::KeepSize );
+ mSplitter->setResizeMode( mMimePartTree, TQSplitter::KeepSize );
}
const int KMReaderWin::delay = 150;
//-----------------------------------------------------------------------------
-KMReaderWin::KMReaderWin(QWidget *aParent,
- QWidget *mainWindow,
+KMReaderWin::KMReaderWin(TQWidget *aParent,
+ TQWidget *mainWindow,
KActionCollection* actionCollection,
const char *aName,
int aFlags )
- : QWidget(aParent, aName, aFlags | Qt::WDestructiveClose),
+ : TQWidget(aParent, aName, aFlags | Qt::WDestructiveClose),
mAttachmentStrategy( 0 ),
mHeaderStrategy( 0 ),
mHeaderStyle( 0 ),
@@ -542,12 +542,12 @@ KMReaderWin::KMReaderWin(QWidget *aParent,
mLevelQuote = GlobalSettings::self()->collapseQuoteLevelSpin() - 1;
- connect( &mUpdateReaderWinTimer, SIGNAL(timeout()),
- this, SLOT(updateReaderWin()) );
- connect( &mResizeTimer, SIGNAL(timeout()),
- this, SLOT(slotDelayedResize()) );
- connect( &mDelayedMarkTimer, SIGNAL(timeout()),
- this, SLOT(slotTouchMessage()) );
+ connect( &mUpdateReaderWinTimer, TQT_SIGNAL(timeout()),
+ this, TQT_SLOT(updateReaderWin()) );
+ connect( &mResizeTimer, TQT_SIGNAL(timeout()),
+ this, TQT_SLOT(slotDelayedResize()) );
+ connect( &mDelayedMarkTimer, TQT_SIGNAL(timeout()),
+ this, TQT_SLOT(slotTouchMessage()) );
}
@@ -562,46 +562,46 @@ void KMReaderWin::createActions( KActionCollection * ac ) {
new KActionMenu( i18n("View->", "&Headers"), ac, "view_headers" );
headerMenu->setToolTip( i18n("Choose display style of message headers") );
- connect( headerMenu, SIGNAL(activated()),
- this, SLOT(slotCycleHeaderStyles()) );
+ connect( headerMenu, TQT_SIGNAL(activated()),
+ this, TQT_SLOT(slotCycleHeaderStyles()) );
raction = new KRadioAction( i18n("View->headers->", "&Enterprise Headers"), 0,
- this, SLOT(slotEnterpriseHeaders()),
+ this, TQT_SLOT(slotEnterpriseHeaders()),
ac, "view_headers_enterprise" );
raction->setToolTip( i18n("Show the list of headers in Enterprise style") );
raction->setExclusiveGroup( "view_headers_group" );
headerMenu->insert(raction);
raction = new KRadioAction( i18n("View->headers->", "&Fancy Headers"), 0,
- this, SLOT(slotFancyHeaders()),
+ this, TQT_SLOT(slotFancyHeaders()),
ac, "view_headers_fancy" );
raction->setToolTip( i18n("Show the list of headers in a fancy format") );
raction->setExclusiveGroup( "view_headers_group" );
headerMenu->insert( raction );
raction = new KRadioAction( i18n("View->headers->", "&Brief Headers"), 0,
- this, SLOT(slotBriefHeaders()),
+ this, TQT_SLOT(slotBriefHeaders()),
ac, "view_headers_brief" );
raction->setToolTip( i18n("Show brief list of message headers") );
raction->setExclusiveGroup( "view_headers_group" );
headerMenu->insert( raction );
raction = new KRadioAction( i18n("View->headers->", "&Standard Headers"), 0,
- this, SLOT(slotStandardHeaders()),
+ this, TQT_SLOT(slotStandardHeaders()),
ac, "view_headers_standard" );
raction->setToolTip( i18n("Show standard list of message headers") );
raction->setExclusiveGroup( "view_headers_group" );
headerMenu->insert( raction );
raction = new KRadioAction( i18n("View->headers->", "&Long Headers"), 0,
- this, SLOT(slotLongHeaders()),
+ this, TQT_SLOT(slotLongHeaders()),
ac, "view_headers_long" );
raction->setToolTip( i18n("Show long list of message headers") );
raction->setExclusiveGroup( "view_headers_group" );
headerMenu->insert( raction );
raction = new KRadioAction( i18n("View->headers->", "&All Headers"), 0,
- this, SLOT(slotAllHeaders()),
+ this, TQT_SLOT(slotAllHeaders()),
ac, "view_headers_all" );
raction->setToolTip( i18n("Show all message headers") );
raction->setExclusiveGroup( "view_headers_group" );
@@ -611,32 +611,32 @@ void KMReaderWin::createActions( KActionCollection * ac ) {
KActionMenu *attachmentMenu =
new KActionMenu( i18n("View->", "&Attachments"), ac, "view_attachments" );
attachmentMenu->setToolTip( i18n("Choose display style of attachments") );
- connect( attachmentMenu, SIGNAL(activated()),
- this, SLOT(slotCycleAttachmentStrategy()) );
+ connect( attachmentMenu, TQT_SIGNAL(activated()),
+ this, TQT_SLOT(slotCycleAttachmentStrategy()) );
raction = new KRadioAction( i18n("View->attachments->", "&As Icons"), 0,
- this, SLOT(slotIconicAttachments()),
+ this, TQT_SLOT(slotIconicAttachments()),
ac, "view_attachments_as_icons" );
raction->setToolTip( i18n("Show all attachments as icons. Click to see them.") );
raction->setExclusiveGroup( "view_attachments_group" );
attachmentMenu->insert( raction );
raction = new KRadioAction( i18n("View->attachments->", "&Smart"), 0,
- this, SLOT(slotSmartAttachments()),
+ this, TQT_SLOT(slotSmartAttachments()),
ac, "view_attachments_smart" );
raction->setToolTip( i18n("Show attachments as suggested by sender.") );
raction->setExclusiveGroup( "view_attachments_group" );
attachmentMenu->insert( raction );
raction = new KRadioAction( i18n("View->attachments->", "&Inline"), 0,
- this, SLOT(slotInlineAttachments()),
+ this, TQT_SLOT(slotInlineAttachments()),
ac, "view_attachments_inline" );
raction->setToolTip( i18n("Show all attachments inline (if possible)") );
raction->setExclusiveGroup( "view_attachments_group" );
attachmentMenu->insert( raction );
raction = new KRadioAction( i18n("View->attachments->", "&Hide"), 0,
- this, SLOT(slotHideAttachments()),
+ this, TQT_SLOT(slotHideAttachments()),
ac, "view_attachments_hide" );
raction->setToolTip( i18n("Do not show attachments in the message viewer") );
raction->setExclusiveGroup( "view_attachments_group" );
@@ -644,48 +644,48 @@ void KMReaderWin::createActions( KActionCollection * ac ) {
// Set Encoding submenu
mSelectEncodingAction = new KSelectAction( i18n( "&Set Encoding" ), "charset", 0,
- this, SLOT( slotSetEncoding() ),
+ this, TQT_SLOT( slotSetEncoding() ),
ac, "encoding" );
- QStringList encodings = KMMsgBase::supportedEncodings( false );
+ TQStringList encodings = KMMsgBase::supportedEncodings( false );
encodings.prepend( i18n( "Auto" ) );
mSelectEncodingAction->setItems( encodings );
mSelectEncodingAction->setCurrentItem( 0 );
mMailToComposeAction = new KAction( i18n("New Message To..."), "mail_new",
- 0, this, SLOT(slotMailtoCompose()), ac,
+ 0, this, TQT_SLOT(slotMailtoCompose()), ac,
"mailto_compose" );
mMailToReplyAction = new KAction( i18n("Reply To..."), "mail_reply",
- 0, this, SLOT(slotMailtoReply()), ac,
+ 0, this, TQT_SLOT(slotMailtoReply()), ac,
"mailto_reply" );
mMailToForwardAction = new KAction( i18n("Forward To..."), "mail_forward",
- 0, this, SLOT(slotMailtoForward()), ac,
+ 0, this, TQT_SLOT(slotMailtoForward()), ac,
"mailto_forward" );
mAddAddrBookAction = new KAction( i18n("Add to Address Book"),
- 0, this, SLOT(slotMailtoAddAddrBook()),
+ 0, this, TQT_SLOT(slotMailtoAddAddrBook()),
ac, "add_addr_book" );
mOpenAddrBookAction = new KAction( i18n("Open in Address Book"),
- 0, this, SLOT(slotMailtoOpenAddrBook()),
+ 0, this, TQT_SLOT(slotMailtoOpenAddrBook()),
ac, "openin_addr_book" );
- mCopyAction = KStdAction::copy( this, SLOT(slotCopySelectedText()), ac, "kmail_copy");
+ mCopyAction = KStdAction::copy( this, TQT_SLOT(slotCopySelectedText()), ac, "kmail_copy");
mSelectAllAction = new KAction( i18n("Select All Text"), CTRL+SHIFT+Key_A, this,
- SLOT(selectAll()), ac, "mark_all_text" );
+ TQT_SLOT(selectAll()), ac, "mark_all_text" );
mCopyURLAction = new KAction( i18n("Copy Link Address"), 0, this,
- SLOT(slotUrlCopy()), ac, "copy_url" );
+ TQT_SLOT(slotUrlCopy()), ac, "copy_url" );
mUrlOpenAction = new KAction( i18n("Open URL"), 0, this,
- SLOT(slotUrlOpen()), ac, "open_url" );
+ TQT_SLOT(slotUrlOpen()), ac, "open_url" );
mAddBookmarksAction = new KAction( i18n("Bookmark This Link"),
"bookmark_add",
- 0, this, SLOT(slotAddBookmarks()),
+ 0, this, TQT_SLOT(slotAddBookmarks()),
ac, "add_bookmarks" );
mUrlSaveAsAction = new KAction( i18n("Save Link As..."), 0, this,
- SLOT(slotUrlSave()), ac, "saveas_url" );
+ TQT_SLOT(slotUrlSave()), ac, "saveas_url" );
mToggleFixFontAction = new KToggleAction( i18n("Use Fi&xed Font"),
- Key_X, this, SLOT(slotToggleFixedFont()),
+ Key_X, this, TQT_SLOT(slotToggleFixedFont()),
ac, "toggle_fixedfont" );
mStartIMChatAction = new KAction( i18n("Chat &With..."), 0, this,
- SLOT(slotIMChat()), ac, "start_im_chat" );
+ TQT_SLOT(slotIMChat()), ac, "start_im_chat" );
}
// little helper function
@@ -881,14 +881,14 @@ void KMReaderWin::update( KMail::Interface::Observable * observable )
// update the tmp file
// we have to set it writeable temporarily
- ::chmod( QFile::encodeName( mAtmCurrentName ), S_IRWXU );
- QByteArray data = node->msgPart().bodyDecodedBinary();
+ ::chmod( TQFile::encodeName( mAtmCurrentName ), S_IRWXU );
+ TQByteArray data = node->msgPart().bodyDecodedBinary();
size_t size = data.size();
if ( node->msgPart().type() == DwMime::kTypeText && size) {
size = KMail::Util::crlf2lf( data.data(), size );
}
KPIM::kBytesToFile( data.data(), size, mAtmCurrentName, false, false, false );
- ::chmod( QFile::encodeName( mAtmCurrentName ), S_IRUSR );
+ ::chmod( TQFile::encodeName( mAtmCurrentName ), S_IRUSR );
mAtmUpdate = false;
}
@@ -896,34 +896,34 @@ void KMReaderWin::update( KMail::Interface::Observable * observable )
//-----------------------------------------------------------------------------
void KMReaderWin::removeTempFiles()
{
- for (QStringList::Iterator it = mTempFiles.begin(); it != mTempFiles.end();
+ for (TQStringList::Iterator it = mTempFiles.begin(); it != mTempFiles.end();
it++)
{
- QFile::remove(*it);
+ TQFile::remove(*it);
}
mTempFiles.clear();
- for (QStringList::Iterator it = mTempDirs.begin(); it != mTempDirs.end();
+ for (TQStringList::Iterator it = mTempDirs.begin(); it != mTempDirs.end();
it++)
{
- QDir(*it).rmdir(*it);
+ TQDir(*it).rmdir(*it);
}
mTempDirs.clear();
}
//-----------------------------------------------------------------------------
-bool KMReaderWin::event(QEvent *e)
+bool KMReaderWin::event(TQEvent *e)
{
- if (e->type() == QEvent::ApplicationPaletteChange)
+ if (e->type() == TQEvent::ApplicationPaletteChange)
{
delete mCSSHelper;
- mCSSHelper = new KMail::CSSHelper( QPaintDeviceMetrics( mViewer->view() ) );
+ mCSSHelper = new KMail::CSSHelper( TQPaintDeviceMetrics( mViewer->view() ) );
if (message())
message()->readConfig();
update( true ); // Force update
return true;
}
- return QWidget::event(e);
+ return TQWidget::event(e);
}
@@ -934,7 +934,7 @@ void KMReaderWin::readConfig(void)
/*should be: const*/ KConfigGroup reader( KMKernel::config(), "Reader" );
delete mCSSHelper;
- mCSSHelper = new KMail::CSSHelper( QPaintDeviceMetrics( mViewer->view() ) );
+ mCSSHelper = new KMail::CSSHelper( TQPaintDeviceMetrics( mViewer->view() ) );
mNoMDNsWhenEncrypted = mdnGroup.readBoolEntry( "not-send-when-encrypted", true );
@@ -965,7 +965,7 @@ void KMReaderWin::readConfig(void)
reader.writeEntry( "showColorbar", mShowColorbar );
mMimeTreeAtBottom = reader.readEntry( "MimeTreeLocation", "bottom" ) != "top";
- const QString s = reader.readEntry( "MimeTreeMode", "smart" );
+ const TQString s = reader.readEntry( "MimeTreeMode", "smart" );
if ( s == "never" )
mMimeTreeMode = 0;
else if ( s == "always" )
@@ -1014,7 +1014,7 @@ void KMReaderWin::saveSplitterSizes( KConfigBase & c ) const {
if ( !mSplitter || !mMimePartTree )
return;
if ( mMimePartTree->isHidden() )
- return; // don't rely on QSplitter maintaining sizes for hidden widgets.
+ return; // don't rely on TQSplitter maintaining sizes for hidden widgets.
c.writeEntry( "MimePaneHeight", mSplitter->sizes()[ mMimeTreeAtBottom ? 1 : 0 ] );
c.writeEntry( "MessagePaneHeight", mSplitter->sizes()[ mMimeTreeAtBottom ? 0 : 1 ] );
@@ -1055,41 +1055,41 @@ void KMReaderWin::initHtmlWidget(void)
if ( !htmlWriter() )
#ifdef KMAIL_READER_HTML_DEBUG
- mHtmlWriter = new TeeHtmlWriter( new FileHtmlWriter( QString::null ),
+ mHtmlWriter = new TeeHtmlWriter( new FileHtmlWriter( TQString::null ),
new KHtmlPartHtmlWriter( mViewer, 0 ) );
#else
mHtmlWriter = new KHtmlPartHtmlWriter( mViewer, 0 );
#endif
connect(mViewer->browserExtension(),
- SIGNAL(openURLRequest(const KURL &, const KParts::URLArgs &)),this,
- SLOT(slotUrlOpen(const KURL &)));
+ TQT_SIGNAL(openURLRequest(const KURL &, const KParts::URLArgs &)),this,
+ TQT_SLOT(slotUrlOpen(const KURL &)));
connect(mViewer->browserExtension(),
- SIGNAL(createNewWindow(const KURL &, const KParts::URLArgs &)),this,
- SLOT(slotUrlOpen(const KURL &)));
- connect(mViewer,SIGNAL(onURL(const QString &)),this,
- SLOT(slotUrlOn(const QString &)));
- connect(mViewer,SIGNAL(popupMenu(const QString &, const QPoint &)),
- SLOT(slotUrlPopup(const QString &, const QPoint &)));
- connect( kmkernel->imProxy(), SIGNAL( sigContactPresenceChanged( const QString & ) ),
- this, SLOT( contactStatusChanged( const QString & ) ) );
- connect( kmkernel->imProxy(), SIGNAL( sigPresenceInfoExpired() ),
- this, SLOT( updateReaderWin() ) );
+ TQT_SIGNAL(createNewWindow(const KURL &, const KParts::URLArgs &)),this,
+ TQT_SLOT(slotUrlOpen(const KURL &)));
+ connect(mViewer,TQT_SIGNAL(onURL(const TQString &)),this,
+ TQT_SLOT(slotUrlOn(const TQString &)));
+ connect(mViewer,TQT_SIGNAL(popupMenu(const TQString &, const TQPoint &)),
+ TQT_SLOT(slotUrlPopup(const TQString &, const TQPoint &)));
+ connect( kmkernel->imProxy(), TQT_SIGNAL( sigContactPresenceChanged( const TQString & ) ),
+ this, TQT_SLOT( contactStatusChanged( const TQString & ) ) );
+ connect( kmkernel->imProxy(), TQT_SIGNAL( sigPresenceInfoExpired() ),
+ this, TQT_SLOT( updateReaderWin() ) );
}
-void KMReaderWin::contactStatusChanged( const QString &uid)
+void KMReaderWin::contactStatusChanged( const TQString &uid)
{
// kdDebug( 5006 ) << k_funcinfo << " got a presence change for " << uid << endl;
// get the list of nodes for this contact from the htmlView
DOM::NodeList presenceNodes = mViewer->htmlDocument()
- .getElementsByName( DOM::DOMString( QString::fromLatin1("presence-") + uid ) );
+ .getElementsByName( DOM::DOMString( TQString::fromLatin1("presence-") + uid ) );
for ( unsigned int i = 0; i < presenceNodes.length(); ++i ) {
DOM::Node n = presenceNodes.item( i );
kdDebug( 5006 ) << "name is " << n.nodeName().string() << endl;
kdDebug( 5006 ) << "value of content was " << n.firstChild().nodeValue().string() << endl;
- QString newPresence = kmkernel->imProxy()->presenceString( uid );
- if ( newPresence.isNull() ) // KHTML crashes if you setNodeValue( QString::null )
- newPresence = QString::fromLatin1( "ENOIMRUNNING" );
+ TQString newPresence = kmkernel->imProxy()->presenceString( uid );
+ if ( newPresence.isNull() ) // KHTML crashes if you setNodeValue( TQString::null )
+ newPresence = TQString::fromLatin1( "ENOIMRUNNING" );
n.firstChild().setNodeValue( newPresence );
// kdDebug( 5006 ) << "value of content is now " << n.firstChild().nodeValue().string() << endl;
}
@@ -1109,7 +1109,7 @@ void KMReaderWin::setHeaderStyleAndStrategy( const HeaderStyle * style,
}
//-----------------------------------------------------------------------------
-void KMReaderWin::setOverrideEncoding( const QString & encoding )
+void KMReaderWin::setOverrideEncoding( const TQString & encoding )
{
if ( encoding == mOverrideEncoding )
return;
@@ -1120,9 +1120,9 @@ void KMReaderWin::setOverrideEncoding( const QString & encoding )
mSelectEncodingAction->setCurrentItem( 0 );
}
else {
- QStringList encodings = mSelectEncodingAction->items();
+ TQStringList encodings = mSelectEncodingAction->items();
uint i = 0;
- for ( QStringList::const_iterator it = encodings.begin(), end = encodings.end(); it != end; ++it, ++i ) {
+ for ( TQStringList::const_iterator it = encodings.begin(), end = encodings.end(); it != end; ++it, ++i ) {
if ( KGlobal::charsets()->encodingForName( *it ) == encoding ) {
mSelectEncodingAction->setCurrentItem( i );
break;
@@ -1133,7 +1133,7 @@ void KMReaderWin::setOverrideEncoding( const QString & encoding )
kdWarning(5006) << "Unknown override character encoding \"" << encoding
<< "\". Using Auto instead." << endl;
mSelectEncodingAction->setCurrentItem( 0 );
- mOverrideEncoding = QString::null;
+ mOverrideEncoding = TQString::null;
}
}
}
@@ -1141,14 +1141,14 @@ void KMReaderWin::setOverrideEncoding( const QString & encoding )
}
-void KMReaderWin::setPrintFont( const QFont& font )
+void KMReaderWin::setPrintFont( const TQFont& font )
{
mCSSHelper->setPrintFont( font );
}
//-----------------------------------------------------------------------------
-const QTextCodec * KMReaderWin::overrideCodec() const
+const TQTextCodec * KMReaderWin::overrideCodec() const
{
kdDebug(5006) << k_funcinfo << " mOverrideEncoding == '" << mOverrideEncoding << "'" << endl;
if ( mOverrideEncoding.isEmpty() || mOverrideEncoding == "Auto" ) // Auto
@@ -1161,7 +1161,7 @@ const QTextCodec * KMReaderWin::overrideCodec() const
void KMReaderWin::slotSetEncoding()
{
if ( mSelectEncodingAction->currentItem() == 0 ) // Auto
- mOverrideEncoding = QString();
+ mOverrideEncoding = TQString();
else
mOverrideEncoding = KGlobal::charsets()->encodingForName( mSelectEncodingAction->currentText() );
update( true );
@@ -1305,9 +1305,9 @@ static const int numKMailNewFeatures =
//-----------------------------------------------------------------------------
//static
-QString KMReaderWin::newFeaturesMD5()
+TQString KMReaderWin::newFeaturesMD5()
{
- QCString str;
+ TQCString str;
for ( int i = 0 ; i < numKMailChanges ; ++i )
str += kmailChanges[i];
for ( int i = 0 ; i < numKMailNewFeatures ; ++i )
@@ -1317,13 +1317,13 @@ QString KMReaderWin::newFeaturesMD5()
}
//-----------------------------------------------------------------------------
-void KMReaderWin::displaySplashPage( const QString &info )
+void KMReaderWin::displaySplashPage( const TQString &info )
{
mMsgDisplay = false;
adjustLayout();
- QString location = locate("data", "kmail/about/main.html");
- QString content = KPIM::kFileToString(location);
+ TQString location = locate("data", "kmail/about/main.html");
+ TQString content = KPIM::kFileToString(location);
content = content.arg( locate( "data", "libkdepim/about/kde_infopage.css" ) );
if ( kapp->reverseLayout() )
content = content.arg( "@import \"%1\";" ).arg( locate( "data", "libkdepim/about/kde_infopage_rtl.css" ) );
@@ -1332,17 +1332,17 @@ void KMReaderWin::displaySplashPage( const QString &info )
mViewer->begin(KURL( location ));
- QString fontSize = QString::number( pointsToPixel( mCSSHelper->bodyFont().pointSize() ) );
- QString appTitle = i18n("KMail");
- QString catchPhrase = ""; //not enough space for a catch phrase at default window size i18n("Part of the Kontact Suite");
- QString quickDescription = i18n("The email client for the K Desktop Environment.");
+ TQString fontSize = TQString::number( pointsToPixel( mCSSHelper->bodyFont().pointSize() ) );
+ TQString appTitle = i18n("KMail");
+ TQString catchPhrase = ""; //not enough space for a catch phrase at default window size i18n("Part of the Kontact Suite");
+ TQString quickDescription = i18n("The email client for the K Desktop Environment.");
mViewer->write(content.arg(fontSize).arg(appTitle).arg(catchPhrase).arg(quickDescription).arg(info));
mViewer->end();
}
void KMReaderWin::displayBusyPage()
{
- QString info =
+ TQString info =
i18n( "<h2 style='margin-top: 0px;'>Retrieving Folder Contents</h2><p>Please wait . . .</p>&nbsp;" );
displaySplashPage( info );
@@ -1350,7 +1350,7 @@ void KMReaderWin::displayBusyPage()
void KMReaderWin::displayOfflinePage()
{
- QString info =
+ TQString info =
i18n( "<h2 style='margin-top: 0px;'>Offline</h2><p>KMail is currently in offline mode. "
"Click <a href=\"kmail:goOnline\">here</a> to go online . . .</p>&nbsp;" );
@@ -1361,7 +1361,7 @@ void KMReaderWin::displayOfflinePage()
//-----------------------------------------------------------------------------
void KMReaderWin::displayAboutPage()
{
- QString info =
+ TQString info =
i18n("%1: KMail version; %2: help:// URL; %3: homepage URL; "
"%4: prior KMail version; %5: prior KDE version; "
"%6: generated list of new features; "
@@ -1389,7 +1389,7 @@ void KMReaderWin::displayAboutPage()
.arg("http://kontact.kde.org/kmail/") // KMail homepage URL
.arg("1.8").arg("3.4"); // prior KMail and KDE version
- QString featureItems;
+ TQString featureItems;
for ( int i = 0 ; i < numKMailNewFeatures ; i++ )
featureItems += i18n("<li>%1</li>\n").arg( i18n( kmailNewFeatures[i] ) );
@@ -1403,11 +1403,11 @@ void KMReaderWin::displayAboutPage()
"an incoming as well as outgoing mail account."
"</p>\n") );
} else {
- info = info.arg( QString::null );
+ info = info.arg( TQString::null );
}
if ( ( numKMailChanges > 1 ) || ( numKMailChanges == 1 && strlen(kmailChanges[0]) > 0 ) ) {
- QString changesText =
+ TQString changesText =
i18n("<p><span style='font-size:125%; font-weight:bold;'>"
"Important changes</span> (compared to KMail %1):</p>\n")
.arg("1.8");
@@ -1460,7 +1460,7 @@ void KMReaderWin::updateReaderWin()
if (mSavedRelativePosition)
{
- QScrollView * scrollview = static_cast<QScrollView *>(mViewer->widget());
+ TQScrollView * scrollview = static_cast<TQScrollView *>(mViewer->widget());
scrollview->setContentsPos( 0,
qRound( scrollview->contentsHeight() * mSavedRelativePosition ) );
mSavedRelativePosition = 0;
@@ -1470,7 +1470,7 @@ void KMReaderWin::updateReaderWin()
//-----------------------------------------------------------------------------
int KMReaderWin::pointsToPixel(int pointSize) const
{
- const QPaintDeviceMetrics pdm(mViewer->view());
+ const TQPaintDeviceMetrics pdm(mViewer->view());
return (pointSize * pdm.logicalDpiY() + 36) / 72;
}
@@ -1481,7 +1481,7 @@ void KMReaderWin::showHideMimeTree( bool isPlainTextTopLevel ) {
( mMimeTreeMode == 1 && !isPlainTextTopLevel ) )
mMimePartTree->show();
else {
- // don't rely on QSplitter maintaining sizes for hidden widgets:
+ // don't rely on TQSplitter maintaining sizes for hidden widgets:
KConfigGroup reader( KMKernel::config(), "Reader" );
saveSplitterSizes( reader );
mMimePartTree->hide();
@@ -1519,7 +1519,7 @@ void KMReaderWin::displayMessage() {
htmlWriter()->queue("</body></html>");
htmlWriter()->flush();
- QTimer::singleShot( 1, this, SLOT(injectAttachments()) );
+ TQTimer::singleShot( 1, this, TQT_SLOT(injectAttachments()) );
}
@@ -1534,8 +1534,8 @@ void KMReaderWin::parseMsg(KMMessage* aMsg)
#endif
KMMessagePart msgPart;
- QCString subtype, contDisp;
- QByteArray str;
+ TQCString subtype, contDisp;
+ TQByteArray str;
assert(aMsg!=0);
@@ -1548,13 +1548,13 @@ void KMReaderWin::parseMsg(KMMessage* aMsg)
} else
delete mRootNode;
mRootNode = partNode::fromMessage( aMsg );
- const QCString mainCntTypeStr = mRootNode->typeString() + '/' + mRootNode->subTypeString();
+ const TQCString mainCntTypeStr = mRootNode->typeString() + '/' + mRootNode->subTypeString();
- QString cntDesc = aMsg->subject();
+ TQString cntDesc = aMsg->subject();
if( cntDesc.isEmpty() )
cntDesc = i18n("( body part )");
KIO::filesize_t cntSize = aMsg->msgSize();
- QString cntEnc;
+ TQString cntEnc;
if( aMsg->contentTransferEncodingStr().isEmpty() )
cntEnc = "7bit";
else
@@ -1573,7 +1573,7 @@ void KMReaderWin::parseMsg(KMMessage* aMsg)
if( vCardNode ) {
// ### FIXME: We should only do this if the vCard belongs to the sender,
// ### i.e. if the sender's email address is contained in the vCard.
- const QString vcard = vCardNode->msgPart().bodyToUnicode( overrideCodec() );
+ const TQString vcard = vCardNode->msgPart().bodyToUnicode( overrideCodec() );
KABC::VCardConverter t;
if ( !t.parseVCards( vcard ).empty() ) {
hasVCard = true;
@@ -1645,7 +1645,7 @@ kdDebug(5006) << "KMReaderWin - calling objectTreeToDecryptedMsg()" << endl;
objectTreeToDecryptedMsg( mRootNode, decryptedData, *aMsg );
// add a \0 to the data
decryptedData.appendNULL();
- QCString resultString( decryptedData.data() );
+ TQCString resultString( decryptedData.data() );
kdDebug(5006) << "KMReaderWin - resulting data:" << resultString << endl;
if( !resultString.isEmpty() ) {
@@ -1690,15 +1690,15 @@ kdDebug(5006) << "KMReaderWin - composing unencrypted message" << endl;
//-----------------------------------------------------------------------------
-QString KMReaderWin::writeMsgHeader(KMMessage* aMsg, bool hasVCard, bool topLevel)
+TQString KMReaderWin::writeMsgHeader(KMMessage* aMsg, bool hasVCard, bool topLevel)
{
kdFatal( !headerStyle(), 5006 )
<< "trying to writeMsgHeader() without a header style set!" << endl;
kdFatal( !headerStrategy(), 5006 )
<< "trying to writeMsgHeader() without a header strategy set!" << endl;
- QString href;
+ TQString href;
if (hasVCard)
- href = QString("file:") + KURL::encode_string( mTempFiles.last() );
+ href = TQString("file:") + KURL::encode_string( mTempFiles.last() );
return headerStyle()->format( aMsg, headerStrategy(), href, mPrinting, topLevel );
}
@@ -1706,17 +1706,17 @@ QString KMReaderWin::writeMsgHeader(KMMessage* aMsg, bool hasVCard, bool topLeve
//-----------------------------------------------------------------------------
-QString KMReaderWin::writeMessagePartToTempFile( KMMessagePart* aMsgPart,
+TQString KMReaderWin::writeMessagePartToTempFile( KMMessagePart* aMsgPart,
int aPartNum )
{
- QString fileName = aMsgPart->fileName();
+ TQString fileName = aMsgPart->fileName();
if( fileName.isEmpty() )
fileName = aMsgPart->name();
//--- Sven's save attachments to /tmp start ---
- QString fname = createTempDir( QString::number( aPartNum ) );
+ TQString fname = createTempDir( TQString::number( aPartNum ) );
if ( fname.isEmpty() )
- return QString();
+ return TQString();
// strip off a leading path
int slashPos = fileName.findRev( '/' );
@@ -1726,35 +1726,35 @@ QString KMReaderWin::writeMessagePartToTempFile( KMMessagePart* aMsgPart,
fileName = "unnamed";
fname += "/" + fileName;
- QByteArray data = aMsgPart->bodyDecodedBinary();
+ TQByteArray data = aMsgPart->bodyDecodedBinary();
size_t size = data.size();
if ( aMsgPart->type() == DwMime::kTypeText && size) {
// convert CRLF to LF before writing text attachments to disk
size = KMail::Util::crlf2lf( data.data(), size );
}
if( !KPIM::kBytesToFile( data.data(), size, fname, false, false, false ) )
- return QString::null;
+ return TQString::null;
mTempFiles.append( fname );
// make file read-only so that nobody gets the impression that he might
// edit attached files (cf. bug #52813)
- ::chmod( QFile::encodeName( fname ), S_IRUSR );
+ ::chmod( TQFile::encodeName( fname ), S_IRUSR );
return fname;
}
-QString KMReaderWin::createTempDir( const QString &param )
+TQString KMReaderWin::createTempDir( const TQString &param )
{
- KTempFile *tempFile = new KTempFile( QString::null, "." + param );
+ KTempFile *tempFile = new KTempFile( TQString::null, "." + param );
tempFile->setAutoDelete( true );
- QString fname = tempFile->name();
+ TQString fname = tempFile->name();
delete tempFile;
- if( ::access( QFile::encodeName( fname ), W_OK ) != 0 )
+ if( ::access( TQFile::encodeName( fname ), W_OK ) != 0 )
// Not there or not writable
- if( ::mkdir( QFile::encodeName( fname ), 0 ) != 0
- || ::chmod( QFile::encodeName( fname ), S_IRWXU ) != 0 )
- return QString::null; //failed create
+ if( ::mkdir( TQFile::encodeName( fname ), 0 ) != 0
+ || ::chmod( TQFile::encodeName( fname ), S_IRWXU ) != 0 )
+ return TQString::null; //failed create
assert( !fname.isNull() );
@@ -1764,7 +1764,7 @@ QString KMReaderWin::createTempDir( const QString &param )
//-----------------------------------------------------------------------------
void KMReaderWin::showVCard( KMMessagePart * msgPart ) {
- const QString vCard = msgPart->bodyToUnicode( overrideCodec() );
+ const TQString vCard = msgPart->bodyToUnicode( overrideCodec() );
VCardViewer *vcv = new VCardViewer(this, vCard, "vCardDialog");
vcv->show();
@@ -1791,7 +1791,7 @@ int KMReaderWin::msgPartFromUrl(const KURL &aUrl)
if (!aUrl.isLocalFile()) return -1;
- QString path = aUrl.path();
+ TQString path = aUrl.path();
uint right = path.findRev('/');
uint left = path.findRev('.', right);
@@ -1801,7 +1801,7 @@ int KMReaderWin::msgPartFromUrl(const KURL &aUrl)
//-----------------------------------------------------------------------------
-void KMReaderWin::resizeEvent(QResizeEvent *)
+void KMReaderWin::resizeEvent(TQResizeEvent *)
{
if( !mResizeTimer.isActive() )
{
@@ -1856,19 +1856,19 @@ void KMReaderWin::slotTouchMessage()
//-----------------------------------------------------------------------------
-void KMReaderWin::closeEvent(QCloseEvent *e)
+void KMReaderWin::closeEvent(TQCloseEvent *e)
{
- QWidget::closeEvent(e);
+ TQWidget::closeEvent(e);
writeConfig();
}
-bool foundSMIMEData( const QString aUrl,
- QString& displayName,
- QString& libName,
- QString& keyId )
+bool foundSMIMEData( const TQString aUrl,
+ TQString& displayName,
+ TQString& libName,
+ TQString& keyId )
{
- static QString showCertMan("showCertificate#");
+ static TQString showCertMan("showCertificate#");
displayName = "";
libName = "";
keyId = "";
@@ -1907,7 +1907,7 @@ bool foundSMIMEData( const QString aUrl,
//-----------------------------------------------------------------------------
-void KMReaderWin::slotUrlOn(const QString &aUrl)
+void KMReaderWin::slotUrlOn(const TQString &aUrl)
{
const KURL url(aUrl);
if ( url.protocol() == "kmail" || url.protocol() == "x-kmail"
@@ -1924,7 +1924,7 @@ void KMReaderWin::slotUrlOn(const QString &aUrl)
mUrlClicked = url;
- const QString msg = URLHandlerManager::instance()->statusBarMessage( url, this );
+ const TQString msg = URLHandlerManager::instance()->statusBarMessage( url, this );
kdWarning( msg.isEmpty(), 5006 ) << "KMReaderWin::slotUrlOn(): Unhandled URL hover!" << endl;
KPIM::BroadcastStatus::instance()->setTransientStatusMsg( msg );
@@ -1944,7 +1944,7 @@ void KMReaderWin::slotUrlOpen(const KURL &aUrl, const KParts::URLArgs &)
}
//-----------------------------------------------------------------------------
-void KMReaderWin::slotUrlPopup(const QString &aUrl, const QPoint& aPos)
+void KMReaderWin::slotUrlPopup(const TQString &aUrl, const TQPoint& aPos)
{
const KURL url( aUrl );
mUrlClicked = url;
@@ -1959,7 +1959,7 @@ void KMReaderWin::slotUrlPopup(const QString &aUrl, const QPoint& aPos)
}
//-----------------------------------------------------------------------------
-void KMReaderWin::showAttachmentPopup( int id, const QString & name, const QPoint & p )
+void KMReaderWin::showAttachmentPopup( int id, const TQString & name, const TQPoint & p )
{
mAtmCurrent = id;
mAtmCurrentName = name;
@@ -1977,7 +1977,7 @@ void KMReaderWin::showAttachmentPopup( int id, const QString & name, const QPoin
Kleo::CryptoBackendFactory::instance()->protocol( "Chiasmus" ) )
menu->insertItem( i18n( "Decrypt With Chiasmus..." ), 6 );
menu->insertItem(i18n("Properties"), 5);
- connect(menu, SIGNAL(activated(int)), this, SLOT(slotHandleAttachment(int)));
+ connect(menu, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotHandleAttachment(int)));
menu->exec( p ,0 );
delete menu;
}
@@ -1990,9 +1990,9 @@ void KMReaderWin::setStyleDependantFrameWidth()
// set the width of the frame to a reasonable value for the current GUI style
int frameWidth;
if( style().isA("KeramikStyle") )
- frameWidth = style().pixelMetric( QStyle::PM_DefaultFrameWidth ) - 1;
+ frameWidth = style().pixelMetric( TQStyle::PM_DefaultFrameWidth ) - 1;
else
- frameWidth = style().pixelMetric( QStyle::PM_DefaultFrameWidth );
+ frameWidth = style().pixelMetric( TQStyle::PM_DefaultFrameWidth );
if ( frameWidth < 0 )
frameWidth = 0;
if ( frameWidth != mBox->lineWidth() )
@@ -2000,10 +2000,10 @@ void KMReaderWin::setStyleDependantFrameWidth()
}
//-----------------------------------------------------------------------------
-void KMReaderWin::styleChange( QStyle& oldStyle )
+void KMReaderWin::styleChange( TQStyle& oldStyle )
{
setStyleDependantFrameWidth();
- QWidget::styleChange( oldStyle );
+ TQWidget::styleChange( oldStyle );
}
//-----------------------------------------------------------------------------
@@ -2017,8 +2017,8 @@ void KMReaderWin::slotHandleAttachment( int choice )
KMHandleAttachmentCommand* command = new KMHandleAttachmentCommand(
node, message(), mAtmCurrent, mAtmCurrentName,
KMHandleAttachmentCommand::AttachmentAction( choice ), 0, this );
- connect( command, SIGNAL( showAttachment( int, const QString& ) ),
- this, SLOT( slotAtmView( int, const QString& ) ) );
+ connect( command, TQT_SIGNAL( showAttachment( int, const TQString& ) ),
+ this, TQT_SLOT( slotAtmView( int, const TQString& ) ) );
command->start();
} else if ( choice == 7 ) {
slotDeleteAttachment( node );
@@ -2031,7 +2031,7 @@ void KMReaderWin::slotHandleAttachment( int choice )
if (!url.isValid() ) return;
urls.append( url );
KURLDrag* drag = new KURLDrag( urls, this );
- QApplication::clipboard()->setData( drag, QClipboard::Clipboard );
+ TQApplication::clipboard()->setData( drag, QClipboard::Clipboard );
}
}
@@ -2098,7 +2098,7 @@ void KMReaderWin::setMsgPart( partNode * node ) {
//-----------------------------------------------------------------------------
void KMReaderWin::setMsgPart( KMMessagePart* aMsgPart, bool aHTML,
- const QString& aFileName, const QString& pname )
+ const TQString& aFileName, const TQString& pname )
{
KCursorSaver busy(KBusyPtr::busy());
if (kasciistricmp(aMsgPart->typeStr(), "message")==0) {
@@ -2122,11 +2122,11 @@ void KMReaderWin::setMsgPart( KMMessagePart* aMsgPart, bool aHTML,
htmlWriter()->queue( aMsgPart->bodyToUnicode( overrideCodec() ) );
mColorBar->setHtmlMode();
} else { // plain text
- const QCString str = aMsgPart->bodyDecoded();
+ const TQCString str = aMsgPart->bodyDecoded();
ObjectTreeParser otp( this );
otp.writeBodyStr( str,
overrideCodec() ? overrideCodec() : aMsgPart->codec(),
- message() ? message()->from() : QString::null );
+ message() ? message()->from() : TQString::null );
}
htmlWriter()->queue("</body></html>");
htmlWriter()->flush();
@@ -2137,11 +2137,11 @@ void KMReaderWin::setMsgPart( KMMessagePart* aMsgPart, bool aHTML,
{
if (aFileName.isEmpty()) return; // prevent crash
// Open the window with a size so the image fits in (if possible):
- QImageIO *iio = new QImageIO();
+ TQImageIO *iio = new TQImageIO();
iio->setFileName(aFileName);
if( iio->read() ) {
- QImage img = iio->image();
- QRect desk = KGlobalSettings::desktopGeometry(mMainWindow);
+ TQImage img = iio->image();
+ TQRect desk = KGlobalSettings::desktopGeometry(mMainWindow);
// determine a reasonable window size
int width, height;
if( img.width() < 50 )
@@ -2173,15 +2173,15 @@ void KMReaderWin::setMsgPart( KMMessagePart* aMsgPart, bool aHTML,
htmlWriter()->queue( mCSSHelper->htmlHead( isFixedFont() ) );
htmlWriter()->queue( "<pre>" );
- QString str = aMsgPart->bodyDecoded();
- // A QString cannot handle binary data. So if it's shorter than the
+ TQString str = aMsgPart->bodyDecoded();
+ // A TQString cannot handle binary data. So if it's shorter than the
// attachment, we assume the attachment is binary:
if( str.length() < (unsigned) aMsgPart->decodedSize() ) {
str.prepend( i18n("[KMail: Attachment contains binary data. Trying to show first character.]",
"[KMail: Attachment contains binary data. Trying to show first %n characters.]",
- str.length()) + QChar('\n') );
+ str.length()) + TQChar('\n') );
}
- htmlWriter()->queue( QStyleSheet::escape( str ) );
+ htmlWriter()->queue( TQStyleSheet::escape( str ) );
htmlWriter()->queue( "</pre>" );
htmlWriter()->queue("</body></html>");
htmlWriter()->flush();
@@ -2192,7 +2192,7 @@ void KMReaderWin::setMsgPart( KMMessagePart* aMsgPart, bool aHTML,
//-----------------------------------------------------------------------------
-void KMReaderWin::slotAtmView( int id, const QString& name )
+void KMReaderWin::slotAtmView( int id, const TQString& name )
{
partNode* node = mRootNode ? mRootNode->findId( id ) : 0;
if( node ) {
@@ -2202,7 +2202,7 @@ void KMReaderWin::slotAtmView( int id, const QString& name )
mAtmCurrentName = tempFileUrlFromPartNode( node ).path();
KMMessagePart& msgPart = node->msgPart();
- QString pname = msgPart.fileName();
+ TQString pname = msgPart.fileName();
if (pname.isEmpty()) pname=msgPart.name();
if (pname.isEmpty()) pname=msgPart.contentDescription();
if (pname.isEmpty()) pname="unnamed";
@@ -2221,12 +2221,12 @@ void KMReaderWin::slotAtmView( int id, const QString& name )
}
//-----------------------------------------------------------------------------
-void KMReaderWin::openAttachment( int id, const QString & name )
+void KMReaderWin::openAttachment( int id, const TQString & name )
{
mAtmCurrentName = name;
mAtmCurrent = id;
- QString str, pname, cmd, fileName;
+ TQString str, pname, cmd, fileName;
partNode* node = mRootNode ? mRootNode->findId( id ) : 0;
if( !node ) {
@@ -2243,7 +2243,7 @@ void KMReaderWin::openAttachment( int id, const QString & name )
return;
}
- QCString contentTypeStr( msgPart.typeStr() + '/' + msgPart.subtypeStr() );
+ TQCString contentTypeStr( msgPart.typeStr() + '/' + msgPart.subtypeStr() );
KPIM::kAsciiToLower( contentTypeStr.data() );
if ( qstrcmp( contentTypeStr, "text/x-vcard" ) == 0 ) {
@@ -2254,7 +2254,7 @@ void KMReaderWin::openAttachment( int id, const QString & name )
// determine the MIME type of the attachment
KMimeType::Ptr mimetype;
// prefer the value of the Content-Type header
- mimetype = KMimeType::mimeType( QString::fromLatin1( contentTypeStr ) );
+ mimetype = KMimeType::mimeType( TQString::fromLatin1( contentTypeStr ) );
if ( mimetype->name() == "application/octet-stream" ) {
// consider the filename if Content-Type is application/octet-stream
mimetype = KMimeType::findByPath( name, 0, true /* no disk access */ );
@@ -2269,8 +2269,8 @@ void KMReaderWin::openAttachment( int id, const QString & name )
KService::Ptr offer =
KServiceTypeProfile::preferredService( mimetype->name(), "Application" );
- QString open_text;
- QString filenameText = msgPart.fileName();
+ TQString open_text;
+ TQString filenameText = msgPart.fileName();
if ( filenameText.isEmpty() )
filenameText = msgPart.name();
if ( offer ) {
@@ -2278,21 +2278,21 @@ void KMReaderWin::openAttachment( int id, const QString & name )
} else {
open_text = i18n("&Open With...");
}
- const QString text = i18n("Open attachment '%1'?\n"
+ const TQString text = i18n("Open attachment '%1'?\n"
"Note that opening an attachment may compromise "
"your system's security.")
.arg( filenameText );
const int choice = KMessageBox::questionYesNoCancel( this, text,
i18n("Open Attachment?"), KStdGuiItem::saveAs(), open_text,
- QString::fromLatin1("askSave") + mimetype->name() ); // dontAskAgainName
+ TQString::fromLatin1("askSave") + mimetype->name() ); // dontAskAgainName
if( choice == KMessageBox::Yes ) { // Save
mAtmUpdate = true;
KMHandleAttachmentCommand* command = new KMHandleAttachmentCommand( node,
message(), mAtmCurrent, mAtmCurrentName, KMHandleAttachmentCommand::Save,
offer, this );
- connect( command, SIGNAL( showAttachment( int, const QString& ) ),
- this, SLOT( slotAtmView( int, const QString& ) ) );
+ connect( command, TQT_SIGNAL( showAttachment( int, const TQString& ) ),
+ this, TQT_SLOT( slotAtmView( int, const TQString& ) ) );
command->start();
}
else if( choice == KMessageBox::No ) { // Open
@@ -2301,8 +2301,8 @@ void KMReaderWin::openAttachment( int id, const QString & name )
mAtmUpdate = true;
KMHandleAttachmentCommand* command = new KMHandleAttachmentCommand( node,
message(), mAtmCurrent, mAtmCurrentName, action, offer, this );
- connect( command, SIGNAL( showAttachment( int, const QString& ) ),
- this, SLOT( slotAtmView( int, const QString& ) ) );
+ connect( command, TQT_SIGNAL( showAttachment( int, const TQString& ) ),
+ this, TQT_SLOT( slotAtmView( int, const TQString& ) ) );
command->start();
} else { // Cancel
kdDebug(5006) << "Canceled opening attachment" << endl;
@@ -2312,26 +2312,26 @@ void KMReaderWin::openAttachment( int id, const QString & name )
//-----------------------------------------------------------------------------
void KMReaderWin::slotScrollUp()
{
- static_cast<QScrollView *>(mViewer->widget())->scrollBy(0, -10);
+ static_cast<TQScrollView *>(mViewer->widget())->scrollBy(0, -10);
}
//-----------------------------------------------------------------------------
void KMReaderWin::slotScrollDown()
{
- static_cast<QScrollView *>(mViewer->widget())->scrollBy(0, 10);
+ static_cast<TQScrollView *>(mViewer->widget())->scrollBy(0, 10);
}
bool KMReaderWin::atBottom() const
{
- const QScrollView *view = static_cast<const QScrollView *>(mViewer->widget());
+ const TQScrollView *view = static_cast<const TQScrollView *>(mViewer->widget());
return view->contentsY() + view->visibleHeight() >= view->contentsHeight();
}
//-----------------------------------------------------------------------------
void KMReaderWin::slotJumpDown()
{
- QScrollView *view = static_cast<QScrollView *>(mViewer->widget());
+ TQScrollView *view = static_cast<TQScrollView *>(mViewer->widget());
int offs = (view->clipper()->height() < 30) ? view->clipper()->height() : 30;
view->scrollBy( 0, view->clipper()->height() - offs );
}
@@ -2339,14 +2339,14 @@ void KMReaderWin::slotJumpDown()
//-----------------------------------------------------------------------------
void KMReaderWin::slotScrollPrior()
{
- static_cast<QScrollView *>(mViewer->widget())->scrollBy(0, -(int)(height()*0.8));
+ static_cast<TQScrollView *>(mViewer->widget())->scrollBy(0, -(int)(height()*0.8));
}
//-----------------------------------------------------------------------------
void KMReaderWin::slotScrollNext()
{
- static_cast<QScrollView *>(mViewer->widget())->scrollBy(0, (int)(height()*0.8));
+ static_cast<TQScrollView *>(mViewer->widget())->scrollBy(0, (int)(height()*0.8));
}
//-----------------------------------------------------------------------------
@@ -2359,7 +2359,7 @@ void KMReaderWin::slotDocumentChanged()
//-----------------------------------------------------------------------------
void KMReaderWin::slotTextSelected(bool)
{
- QString temp = mViewer->selectedText();
+ TQString temp = mViewer->selectedText();
kapp->clipboard()->setText(temp);
}
@@ -2370,9 +2370,9 @@ void KMReaderWin::selectAll()
}
//-----------------------------------------------------------------------------
-QString KMReaderWin::copyText()
+TQString KMReaderWin::copyText()
{
- QString temp = mViewer->selectedText();
+ TQString temp = mViewer->selectedText();
return temp;
}
@@ -2420,7 +2420,7 @@ bool KMReaderWin::htmlLoadExternal()
//-----------------------------------------------------------------------------
void KMReaderWin::saveRelativePosition()
{
- const QScrollView * scrollview = static_cast<QScrollView *>( mViewer->widget() );
+ const TQScrollView * scrollview = static_cast<TQScrollView *>( mViewer->widget() );
mSavedRelativePosition =
static_cast<float>( scrollview->contentsY() ) / scrollview->contentsHeight();
}
@@ -2558,11 +2558,11 @@ partNode * KMReaderWin::partNodeForId( int id ) {
KURL KMReaderWin::tempFileUrlFromPartNode( const partNode * node )
{
if (!node) return KURL();
- QStringList::const_iterator it = mTempFiles.begin();
- QStringList::const_iterator end = mTempFiles.end();
+ TQStringList::const_iterator it = mTempFiles.begin();
+ TQStringList::const_iterator end = mTempFiles.end();
while ( it != end ) {
- QString path = *it;
+ TQString path = *it;
it++;
uint right = path.findRev('/');
uint left = path.findRev('.', right);
@@ -2602,10 +2602,10 @@ void KMReaderWin::slotIMChat()
}
//-----------------------------------------------------------------------------
-bool KMReaderWin::eventFilter( QObject *, QEvent *e )
+bool KMReaderWin::eventFilter( TQObject *, TQEvent *e )
{
- if ( e->type() == QEvent::MouseButtonPress ) {
- QMouseEvent* me = static_cast<QMouseEvent*>(e);
+ if ( e->type() == TQEvent::MouseButtonPress ) {
+ TQMouseEvent* me = static_cast<TQMouseEvent*>(e);
if ( me->button() == LeftButton && ( me->state() & ShiftButton ) ) {
// special processing for shift+click
mAtmCurrent = msgPartFromUrl( mUrlClicked );
@@ -2664,10 +2664,10 @@ void KMReaderWin::injectAttachments()
if ( injectionPoint.isNull() )
return;
- QString imgpath( locate("data","kmail/pics/") );
- QString visibility;
- QString urlHandle;
- QString imgSrc;
+ TQString imgpath( locate("data","kmail/pics/") );
+ TQString visibility;
+ TQString urlHandle;
+ TQString imgSrc;
if( !showAttachmentQuicklist() )
{
urlHandle.append( "kmail:showAttachmentQuicklist" );
@@ -2677,15 +2677,15 @@ void KMReaderWin::injectAttachments()
imgSrc.append( "attachmentQuicklistOpened.png" );
}
- QString html = renderAttachments( mRootNode, QApplication::palette().active().background() );
+ TQString html = renderAttachments( mRootNode, TQApplication::palette().active().background() );
if ( html.isEmpty() )
return;
if ( headerStyle() == HeaderStyle::fancy() )
- html.prepend( QString::fromLatin1("<div style=\"float:left;\">%1&nbsp;</div>" ).arg(i18n("Attachments:")) );
+ html.prepend( TQString::fromLatin1("<div style=\"float:left;\">%1&nbsp;</div>" ).arg(i18n("Attachments:")) );
if ( headerStyle() == HeaderStyle::enterprise() ) {
- QString link("");
+ TQString link("");
link += "<div style=\"text-align: right;\"><a href=\""+urlHandle+"\"><img src=\""+imgpath+imgSrc+"\"/></a></div>";
html.prepend( link );
}
@@ -2694,41 +2694,41 @@ void KMReaderWin::injectAttachments()
static_cast<DOM::HTMLElement>( injectionPoint ).setInnerHTML( html );
}
-static QColor nextColor( const QColor & c )
+static TQColor nextColor( const TQColor & c )
{
int h, s, v;
c.hsv( &h, &s, &v );
- return QColor( (h + 50) % 360, QMAX(s, 64), v, QColor::Hsv );
+ return TQColor( (h + 50) % 360, QMAX(s, 64), v, TQColor::Hsv );
}
-QString KMReaderWin::renderAttachments(partNode * node, const QColor &bgColor )
+TQString KMReaderWin::renderAttachments(partNode * node, const TQColor &bgColor )
{
if ( !node )
- return QString();
+ return TQString();
- QString html;
+ TQString html;
if ( node->firstChild() ) {
- QString subHtml = renderAttachments( node->firstChild(), nextColor( bgColor ) );
+ TQString subHtml = renderAttachments( node->firstChild(), nextColor( bgColor ) );
if ( !subHtml.isEmpty() ) {
- QString visibility;
+ TQString visibility;
if( !showAttachmentQuicklist() )
{
visibility.append( "display:none;" );
}
- QString margin;
+ TQString margin;
if ( node != mRootNode || headerStyle() != HeaderStyle::enterprise() )
margin = "padding:2px; margin:2px; ";
if ( node->msgPart().typeStr() == "message" || node == mRootNode )
- html += QString::fromLatin1("<div style=\"background:%1; %2"
+ html += TQString::fromLatin1("<div style=\"background:%1; %2"
"vertical-align:middle; float:left; %3\">").arg( bgColor.name() ).arg( margin ).arg( visibility );
html += subHtml;
if ( node->msgPart().typeStr() == "message" || node == mRootNode )
html += "</div>";
}
} else {
- QString label, icon;
+ TQString label, icon;
icon = node->msgPart().iconName( KIcon::Small );
label = node->msgPart().contentDescription();
if( label.isEmpty() )
@@ -2745,12 +2745,12 @@ QString KMReaderWin::renderAttachments(partNode * node, const QColor &bgColor )
typeBlacklisted = typeBlacklisted || node == mRootNode;
if ( !label.isEmpty() && !icon.isEmpty() && !typeBlacklisted ) {
html += "<div style=\"float:left;\">";
- html += QString::fromLatin1( "<span style=\"white-space:nowrap; border-width: 0px; border-left-width: 5px; border-color: %1; 2px; border-left-style: solid;\">" ).arg( bgColor.name() );
- html += QString::fromLatin1( "<a href=\"#att%1\">" ).arg( node->nodeId() );
+ html += TQString::fromLatin1( "<span style=\"white-space:nowrap; border-width: 0px; border-left-width: 5px; border-color: %1; 2px; border-left-style: solid;\">" ).arg( bgColor.name() );
+ html += TQString::fromLatin1( "<a href=\"#att%1\">" ).arg( node->nodeId() );
html += "<img style=\"vertical-align:middle;\" src=\"" + icon + "\"/>&nbsp;";
if ( headerStyle() == HeaderStyle::enterprise() ) {
- QFont bodyFont = mCSSHelper->bodyFont( isFixedFont() );
- QFontMetrics fm( bodyFont );
+ TQFont bodyFont = mCSSHelper->bodyFont( isFixedFont() );
+ TQFontMetrics fm( bodyFont );
html += KStringHandler::rPixelSqueeze( label, fm, 140 );
} else
html += label;
diff --git a/kmail/kmreaderwin.h b/kmail/kmreaderwin.h
index 2942d77c5..40c4f3a82 100644
--- a/kmail/kmreaderwin.h
+++ b/kmail/kmreaderwin.h
@@ -5,9 +5,9 @@
#ifndef KMREADERWIN_H
#define KMREADERWIN_H
-#include <qwidget.h>
-#include <qtimer.h>
-#include <qstringlist.h>
+#include <tqwidget.h>
+#include <tqtimer.h>
+#include <tqstringlist.h>
#include <kurl.h>
#include <kservice.h>
#include "kmmsgbase.h"
@@ -59,7 +59,7 @@ namespace KMail {
class partNode; // might be removed when KMime is used instead of mimelib
// (khz, 29.11.2001)
-class NewByteArray; // providing operator+ on a QByteArray (khz, 21.06.2002)
+class NewByteArray; // providing operator+ on a TQByteArray (khz, 21.06.2002)
namespace KParts {
struct URLArgs;
@@ -70,11 +70,11 @@ namespace KParts {
used for reading or viewing messages.
*/
-class KMReaderWin: public QWidget, public KMail::Interface::Observer {
+class KMReaderWin: public TQWidget, public KMail::Interface::Observer {
Q_OBJECT
- friend void KMMimePartTree::itemClicked( QListViewItem* item );
- friend void KMMimePartTree::itemRightClicked( QListViewItem* item, const QPoint & );
+ friend void KMMimePartTree::itemClicked( TQListViewItem* item );
+ friend void KMMimePartTree::itemRightClicked( TQListViewItem* item, const TQPoint & );
friend void KMMimePartTree::slotSaveAs();
friend void KMMimePartTree::startDrag();
@@ -82,8 +82,8 @@ class KMReaderWin: public QWidget, public KMail::Interface::Observer {
friend class KMail::KHtmlPartHtmlWriter;
public:
- KMReaderWin( QWidget *parent,
- QWidget *mainWindow,
+ KMReaderWin( TQWidget *parent,
+ TQWidget *mainWindow,
KActionCollection *actionCollection,
const char *name=0,
int f=0 );
@@ -123,16 +123,16 @@ public:
/** Get selected override character encoding.
@return The encoding selected by the user or an empty string if auto-detection
is selected. */
- QString overrideEncoding() const { return mOverrideEncoding; }
+ TQString overrideEncoding() const { return mOverrideEncoding; }
/** Set the override character encoding. */
- void setOverrideEncoding( const QString & encoding );
+ void setOverrideEncoding( const TQString & encoding );
- void setPrintFont( const QFont& font );
+ void setPrintFont( const TQFont& font );
/** Get codec corresponding to the currently selected override character encoding.
@return The override codec or 0 if auto-detection is selected. */
- const QTextCodec * overrideCodec() const;
+ const TQTextCodec * overrideCodec() const;
/** Set printing mode */
virtual void setPrinting(bool enable) { mPrinting = enable; }
@@ -144,7 +144,7 @@ public:
/** Instead of settings a message to be shown sets a message part
to be shown */
void setMsgPart( KMMessagePart* aMsgPart, bool aHTML,
- const QString& aFileName, const QString& pname );
+ const TQString& aFileName, const TQString& pname );
void setMsgPart( partNode * node );
@@ -156,7 +156,7 @@ public:
normally no need to call this function directly,
since correct value is set automatically in
parseMsg(KMMessage* aMsg, bool onlyProcessHeaders). */
- void setIdOfLastViewedMessage( const QString & msgId )
+ void setIdOfLastViewedMessage( const TQString & msgId )
{ mIdOfLastViewedMessage = msgId; }
/** Clear the reader and discard the current message. */
@@ -173,7 +173,7 @@ public:
virtual void printMsg(void);
/** Return selected text */
- QString copyText();
+ TQString copyText();
/** Get/set auto-delete msg flag. */
bool autoDelete(void) const { return mAutoDelete; }
@@ -194,10 +194,10 @@ public:
bool htmlLoadExternal();
/** Returns the MD5 hash for the list of new features */
- static QString newFeaturesMD5();
+ static TQString newFeaturesMD5();
/** Display a generic HTML splash page instead of a message */
- void displaySplashPage( const QString &info );
+ void displaySplashPage( const TQString &info );
/** Display the about page instead of a message */
void displayAboutPage();
@@ -265,24 +265,24 @@ public:
/** Returns the current message or 0 if none. */
KMMessage* message(KMFolder** folder=0) const;
- void openAttachment( int id, const QString & name );
+ void openAttachment( int id, const TQString & name );
void emitUrlClicked( const KURL & url, int button ) {
emit urlClicked( url, button );
}
- void emitPopupMenu( const KURL & url, const QPoint & p ) {
+ void emitPopupMenu( const KURL & url, const TQPoint & p ) {
if ( message() )
emit popupMenu( *message(), url, p );
}
- void showAttachmentPopup( int id, const QString & name, const QPoint & p );
+ void showAttachmentPopup( int id, const TQString & name, const TQPoint & p );
/** Set the serial number of the message this reader window is currently
* waiting for. Used to discard updates for already deselected messages. */
void setWaitingForSerNum( unsigned long serNum ) { mWaitingForSerNum = serNum; }
- QWidget* mainWindow() { return mMainWindow; }
+ TQWidget* mainWindow() { return mMainWindow; }
/** Returns wether the message should be decryted. */
bool decryptMessage() const;
@@ -308,7 +308,7 @@ signals:
void replaceMsgByUnencryptedVersion();
/** The user presses the right mouse button. 'url' may be 0. */
- void popupMenu(KMMessage &msg, const KURL &url, const QPoint& mousePos);
+ void popupMenu(KMMessage &msg, const KURL &url, const TQPoint& mousePos);
/** The user has clicked onto an URL that is no attachment. */
void urlClicked(const KURL &url, int button);
@@ -341,10 +341,10 @@ public slots:
void slotUrlOpen(const KURL &url, const KParts::URLArgs &args);
/** The mouse has moved on or off an URL. */
- void slotUrlOn(const QString &url);
+ void slotUrlOn(const TQString &url);
/** The user presses the right mouse button on an URL. */
- void slotUrlPopup(const QString &, const QPoint& mousePos);
+ void slotUrlPopup(const TQString &, const TQPoint& mousePos);
/** The user selected "Find" from the menu. */
void slotFind();
@@ -378,7 +378,7 @@ public slots:
void slotMessageArrived( KMMessage *msg );
/** start IM Chat with addressee */
void slotIMChat();
- void contactStatusChanged( const QString &uid);
+ void contactStatusChanged( const TQString &uid);
void slotLevelQuote( int l );
void slotTouchMessage();
@@ -404,21 +404,21 @@ protected slots:
void slotHideAttachments();
/** Some attachment operations. */
- void slotAtmView( int id, const QString& name );
+ void slotAtmView( int id, const TQString& name );
void slotDelayedResize();
void slotHandleAttachment( int );
protected:
/** reimplemented in order to update the frame width in case of a changed
GUI style */
- void styleChange( QStyle& oldStyle );
+ void styleChange( TQStyle& oldStyle );
/** Set the width of the frame to a reasonable value for the current GUI
style */
void setStyleDependantFrameWidth();
/** Watch for palette changes */
- virtual bool event(QEvent *e);
+ virtual bool event(TQEvent *e);
/** Calculate the pixel size */
int pointsToPixel(int pointSize) const;
@@ -432,19 +432,19 @@ protected:
/** Creates a nice mail header depending on the current selected
header style. */
- QString writeMsgHeader(KMMessage* aMsg, bool hasVCard=false, bool topLevel=false);
+ TQString writeMsgHeader(KMMessage* aMsg, bool hasVCard=false, bool topLevel=false);
/** Writes the given message part to a temporary file and returns the
- name of this file or QString::null if writing failed.
+ name of this file or TQString::null if writing failed.
*/
- QString writeMessagePartToTempFile( KMMessagePart* msgPart, int partNumber );
+ TQString writeMessagePartToTempFile( KMMessagePart* msgPart, int partNumber );
/**
Creates a temporary dir for saving attachments, etc.
Will be automatically deleted when another message is viewed.
@param param Optional part of the directory name.
*/
- QString createTempDir( const QString &param = QString() );
+ TQString createTempDir( const TQString &param = TQString() );
/** show window containing infos about a vCard. */
void showVCard(KMMessagePart *msgPart);
@@ -453,14 +453,14 @@ protected:
virtual void initHtmlWidget(void);
/** Some necessary event handling. */
- virtual void closeEvent(QCloseEvent *);
- virtual void resizeEvent(QResizeEvent *);
+ virtual void closeEvent(TQCloseEvent *);
+ virtual void resizeEvent(TQResizeEvent *);
/** Cleanup the attachment temp files */
virtual void removeTempFiles();
/** Event filter */
- bool eventFilter( QObject *obj, QEvent *ev );
+ bool eventFilter( TQObject *obj, TQEvent *ev );
private slots:
void slotSetEncoding();
@@ -478,16 +478,16 @@ private:
/** Read override codec from configuration */
void readGlobalOverrideCodec();
- QString renderAttachments( partNode *node, const QColor &bgColor );
+ TQString renderAttachments( partNode *node, const TQColor &bgColor );
private:
bool mHtmlMail, mHtmlLoadExternal, mHtmlOverride, mHtmlLoadExtOverride;
int mAtmCurrent;
- QString mAtmCurrentName;
+ TQString mAtmCurrentName;
KMMessage *mMessage;
// widgets:
- QSplitter * mSplitter;
- QHBox *mBox;
+ TQSplitter * mSplitter;
+ TQHBox *mBox;
KMail::HtmlStatusBar *mColorBar;
KMMimePartTree* mMimePartTree;
KHTMLPart *mViewer;
@@ -497,13 +497,13 @@ private:
const KMail::HeaderStyle * mHeaderStyle;
bool mAutoDelete;
/** where did the user save the attachment last time */
- QString mSaveAttachDir;
+ TQString mSaveAttachDir;
static const int delay;
- QTimer mUpdateReaderWinTimer;
- QTimer mResizeTimer;
- QTimer mDelayedMarkTimer;
- QString mOverrideEncoding;
- QString mOldGlobalOverrideEncoding; // used to detect changes of the global override character encoding
+ TQTimer mUpdateReaderWinTimer;
+ TQTimer mResizeTimer;
+ TQTimer mDelayedMarkTimer;
+ TQString mOverrideEncoding;
+ TQString mOldGlobalOverrideEncoding; // used to detect changes of the global override character encoding
bool mMsgDisplay;
bool mNoMDNsWhenEncrypted;
unsigned long mLastSerNum;
@@ -514,14 +514,14 @@ private:
bool mPrinting;
bool mShowColorbar;
//bool mShowCompleteMessage;
- QStringList mTempFiles;
- QStringList mTempDirs;
+ TQStringList mTempFiles;
+ TQStringList mTempDirs;
int mMimeTreeMode;
bool mMimeTreeAtBottom;
- QValueList<int> mSplitterSizes;
+ TQValueList<int> mSplitterSizes;
partNode* mRootNode;
- QString mIdOfLastViewedMessage;
- QWidget *mMainWindow;
+ TQString mIdOfLastViewedMessage;
+ TQWidget *mMainWindow;
KActionCollection *mActionCollection;
KAction *mMailToComposeAction, *mMailToReplyAction, *mMailToForwardAction,
*mAddAddrBookAction, *mOpenAddrBookAction, *mCopyAction, *mCopyURLAction,
diff --git a/kmail/kmsearchpattern.cpp b/kmail/kmsearchpattern.cpp
index 1b9e36530..bec476ef6 100644
--- a/kmail/kmsearchpattern.cpp
+++ b/kmail/kmsearchpattern.cpp
@@ -23,7 +23,7 @@ using KMail::FilterLog;
#include <kabc/stdaddressbook.h>
-#include <qregexp.h>
+#include <tqregexp.h>
#include <mimelib/string.h>
#include <mimelib/boyermor.h>
@@ -70,7 +70,7 @@ static const int numStatusNames = sizeof statusNames / sizeof ( struct _statusNa
//
//==================================================
-KMSearchRule::KMSearchRule( const QCString & field, Function func, const QString & contents )
+KMSearchRule::KMSearchRule( const TQCString & field, Function func, const TQString & contents )
: mField( field ),
mFunction( func ),
mContents( contents )
@@ -95,9 +95,9 @@ const KMSearchRule & KMSearchRule::operator=( const KMSearchRule & other ) {
return *this;
}
-KMSearchRule * KMSearchRule::createInstance( const QCString & field,
+KMSearchRule * KMSearchRule::createInstance( const TQCString & field,
Function func,
- const QString & contents )
+ const TQString & contents )
{
KMSearchRule *ret = 0;
if (field == "<status>")
@@ -110,9 +110,9 @@ KMSearchRule * KMSearchRule::createInstance( const QCString & field,
return ret;
}
-KMSearchRule * KMSearchRule::createInstance( const QCString & field,
+KMSearchRule * KMSearchRule::createInstance( const TQCString & field,
const char *func,
- const QString & contents )
+ const TQString & contents )
{
return ( createInstance( field, configValueToFunc( func ), contents ) );
}
@@ -126,13 +126,13 @@ KMSearchRule * KMSearchRule::createInstanceFromConfig( const KConfig * config, i
{
const char cIdx = char( int('A') + aIdx );
- static const QString & field = KGlobal::staticQString( "field" );
- static const QString & func = KGlobal::staticQString( "func" );
- static const QString & contents = KGlobal::staticQString( "contents" );
+ static const TQString & field = KGlobal::staticQString( "field" );
+ static const TQString & func = KGlobal::staticQString( "func" );
+ static const TQString & contents = KGlobal::staticQString( "contents" );
- const QCString &field2 = config->readEntry( field + cIdx ).latin1();
+ const TQCString &field2 = config->readEntry( field + cIdx ).latin1();
Function func2 = configValueToFunc( config->readEntry( func + cIdx ).latin1() );
- const QString & contents2 = config->readEntry( contents + cIdx );
+ const TQString & contents2 = config->readEntry( contents + cIdx );
if ( field2 == "<To or Cc>" ) // backwards compat
return KMSearchRule::createInstance( "<recipients>", func2, contents2 );
@@ -150,7 +150,7 @@ KMSearchRule::Function KMSearchRule::configValueToFunc( const char * str ) {
return FuncNone;
}
-QString KMSearchRule::functionToString( Function function )
+TQString KMSearchRule::functionToString( Function function )
{
if ( function != FuncNone )
return funcConfigNames[int( function )];
@@ -160,11 +160,11 @@ QString KMSearchRule::functionToString( Function function )
void KMSearchRule::writeConfig( KConfig * config, int aIdx ) const {
const char cIdx = char('A' + aIdx);
- static const QString & field = KGlobal::staticQString( "field" );
- static const QString & func = KGlobal::staticQString( "func" );
- static const QString & contents = KGlobal::staticQString( "contents" );
+ static const TQString & field = KGlobal::staticQString( "field" );
+ static const TQString & func = KGlobal::staticQString( "func" );
+ static const TQString & contents = KGlobal::staticQString( "contents" );
- config->writeEntry( field + cIdx, QString(mField) );
+ config->writeEntry( field + cIdx, TQString(mField) );
config->writeEntry( func + cIdx, functionToString( mFunction ) );
config->writeEntry( contents + cIdx, mContents );
}
@@ -179,9 +179,9 @@ bool KMSearchRule::matches( const DwString & aStr, KMMessage & msg,
return matches( &msg );
}
-const QString KMSearchRule::asString() const
+const TQString KMSearchRule::asString() const
{
- QString result = "\"" + mField + "\" <";
+ TQString result = "\"" + mField + "\" <";
result += functionToString( mFunction );
result += "> \"" + mContents + "\"";
@@ -194,8 +194,8 @@ const QString KMSearchRule::asString() const
//
//==================================================
-KMSearchRuleString::KMSearchRuleString( const QCString & field,
- Function func, const QString & contents )
+KMSearchRuleString::KMSearchRuleString( const TQCString & field,
+ Function func, const TQString & contents )
: KMSearchRule(field, func, contents)
{
if ( field.isEmpty() || field[0] == '<' )
@@ -283,8 +283,8 @@ bool KMSearchRuleString::matches( const DwString & aStr, KMMessage & msg,
while ( stop != DwString::npos && ( ch = aStr.at( stop + 1 ) ) == ' ' || ch == '\t' )
stop = aStr.find( '\n', stop + 1 );
const int len = stop == DwString::npos ? aStr.length() - start : stop - start ;
- const QCString codedValue( aStr.data() + start, len + 1 );
- const QString msgContents = KMMsgBase::decodeRFC2047String( codedValue ).stripWhiteSpace(); // FIXME: This needs to be changed for IDN support.
+ const TQCString codedValue( aStr.data() + start, len + 1 );
+ const TQString msgContents = KMMsgBase::decodeRFC2047String( codedValue ).stripWhiteSpace(); // FIXME: This needs to be changed for IDN support.
rc = matchesInternal( msgContents );
}
} else if ( field() == "<recipients>" ) {
@@ -308,7 +308,7 @@ bool KMSearchRuleString::matches( const DwString & aStr, KMMessage & msg,
}
}
if ( FilterLog::instance()->isLogging() ) {
- QString msg = ( rc ? "<font color=#00FF00>1 = </font>"
+ TQString msg = ( rc ? "<font color=#00FF00>1 = </font>"
: "<font color=#FF0000>0 = </font>" );
msg += FilterLog::recode( asString() );
// only log headers bcause messages and bodies can be pretty large
@@ -327,7 +327,7 @@ bool KMSearchRuleString::matches( const KMMessage * msg ) const
if ( isEmpty() )
return false;
- QString msgContents;
+ TQString msgContents;
// Show the value used to compare the rules against in the log.
// Overwrite the value for complete messages and all headers!
bool logContents = true;
@@ -382,7 +382,7 @@ bool KMSearchRuleString::matches( const KMMessage * msg ) const
bool rc = matchesInternal( msgContents );
if ( FilterLog::instance()->isLogging() ) {
- QString msg = ( rc ? "<font color=#00FF00>1 = </font>"
+ TQString msg = ( rc ? "<font color=#00FF00>1 = </font>"
: "<font color=#FF0000>0 = </font>" );
msg += FilterLog::recode( asString() );
// only log headers bcause messages and bodies can be pretty large
@@ -394,14 +394,14 @@ bool KMSearchRuleString::matches( const KMMessage * msg ) const
}
// helper, does the actual comparing
-bool KMSearchRuleString::matchesInternal( const QString & msgContents ) const
+bool KMSearchRuleString::matchesInternal( const TQString & msgContents ) const
{
switch ( function() ) {
case KMSearchRule::FuncEquals:
- return ( QString::compare( msgContents.lower(), contents().lower() ) == 0 );
+ return ( TQString::compare( msgContents.lower(), contents().lower() ) == 0 );
case KMSearchRule::FuncNotEqual:
- return ( QString::compare( msgContents.lower(), contents().lower() ) != 0 );
+ return ( TQString::compare( msgContents.lower(), contents().lower() ) != 0 );
case KMSearchRule::FuncContains:
return ( msgContents.find( contents(), 0, false ) >= 0 );
@@ -411,33 +411,33 @@ bool KMSearchRuleString::matchesInternal( const QString & msgContents ) const
case KMSearchRule::FuncRegExp:
{
- QRegExp regexp( contents(), false );
+ TQRegExp regexp( contents(), false );
return ( regexp.search( msgContents ) >= 0 );
}
case KMSearchRule::FuncNotRegExp:
{
- QRegExp regexp( contents(), false );
+ TQRegExp regexp( contents(), false );
return ( regexp.search( msgContents ) < 0 );
}
case FuncIsGreater:
- return ( QString::compare( msgContents.lower(), contents().lower() ) > 0 );
+ return ( TQString::compare( msgContents.lower(), contents().lower() ) > 0 );
case FuncIsLessOrEqual:
- return ( QString::compare( msgContents.lower(), contents().lower() ) <= 0 );
+ return ( TQString::compare( msgContents.lower(), contents().lower() ) <= 0 );
case FuncIsLess:
- return ( QString::compare( msgContents.lower(), contents().lower() ) < 0 );
+ return ( TQString::compare( msgContents.lower(), contents().lower() ) < 0 );
case FuncIsGreaterOrEqual:
- return ( QString::compare( msgContents.lower(), contents().lower() ) >= 0 );
+ return ( TQString::compare( msgContents.lower(), contents().lower() ) >= 0 );
case FuncIsInAddressbook: {
KABC::AddressBook *stdAb = KABC::StdAddressBook::self( true );
- QStringList addressList =
+ TQStringList addressList =
KPIM::splitEmailAddrList( msgContents.lower() );
- for( QStringList::ConstIterator it = addressList.begin();
+ for( TQStringList::ConstIterator it = addressList.begin();
( it != addressList.end() );
++it ) {
if ( !stdAb->findByEmail( KPIM::getEmailAddress( *it ) ).isEmpty() )
@@ -448,9 +448,9 @@ bool KMSearchRuleString::matchesInternal( const QString & msgContents ) const
case FuncIsNotInAddressbook: {
KABC::AddressBook *stdAb = KABC::StdAddressBook::self( true );
- QStringList addressList =
+ TQStringList addressList =
KPIM::splitEmailAddrList( msgContents.lower() );
- for( QStringList::ConstIterator it = addressList.begin();
+ for( TQStringList::ConstIterator it = addressList.begin();
( it != addressList.end() );
++it ) {
if ( stdAb->findByEmail( KPIM::getEmailAddress( *it ) ).isEmpty() )
@@ -460,11 +460,11 @@ bool KMSearchRuleString::matchesInternal( const QString & msgContents ) const
}
case FuncIsInCategory: {
- QString category = contents();
- QStringList addressList = KPIM::splitEmailAddrList( msgContents.lower() );
+ TQString category = contents();
+ TQStringList addressList = KPIM::splitEmailAddrList( msgContents.lower() );
KABC::AddressBook *stdAb = KABC::StdAddressBook::self( true );
- for( QStringList::ConstIterator it = addressList.begin();
+ for( TQStringList::ConstIterator it = addressList.begin();
it != addressList.end(); ++it ) {
KABC::Addressee::List addresses = stdAb->findByEmail( KPIM::getEmailAddress( *it ) );
@@ -477,11 +477,11 @@ bool KMSearchRuleString::matchesInternal( const QString & msgContents ) const
}
case FuncIsNotInCategory: {
- QString category = contents();
- QStringList addressList = KPIM::splitEmailAddrList( msgContents.lower() );
+ TQString category = contents();
+ TQStringList addressList = KPIM::splitEmailAddrList( msgContents.lower() );
KABC::AddressBook *stdAb = KABC::StdAddressBook::self( true );
- for( QStringList::ConstIterator it = addressList.begin();
+ for( TQStringList::ConstIterator it = addressList.begin();
it != addressList.end(); ++it ) {
KABC::Addressee::List addresses = stdAb->findByEmail( KPIM::getEmailAddress( *it ) );
@@ -506,8 +506,8 @@ bool KMSearchRuleString::matchesInternal( const QString & msgContents ) const
//
//==================================================
-KMSearchRuleNumerical::KMSearchRuleNumerical( const QCString & field,
- Function func, const QString & contents )
+KMSearchRuleNumerical::KMSearchRuleNumerical( const TQCString & field,
+ Function func, const TQString & contents )
: KMSearchRule(field, func, contents)
{
}
@@ -524,7 +524,7 @@ bool KMSearchRuleNumerical::isEmpty() const
bool KMSearchRuleNumerical::matches( const KMMessage * msg ) const
{
- QString msgContents;
+ TQString msgContents;
int numericalMsgContents = 0;
int numericalValue = 0;
@@ -533,25 +533,25 @@ bool KMSearchRuleNumerical::matches( const KMMessage * msg ) const
numericalValue = contents().toInt();
msgContents.setNum( numericalMsgContents );
} else if ( field() == "<age in days>" ) {
- QDateTime msgDateTime;
+ TQDateTime msgDateTime;
msgDateTime.setTime_t( msg->date() );
- numericalMsgContents = msgDateTime.daysTo( QDateTime::currentDateTime() );
+ numericalMsgContents = msgDateTime.daysTo( TQDateTime::currentDateTime() );
numericalValue = contents().toInt();
msgContents.setNum( numericalMsgContents );
}
bool rc = matchesInternal( numericalValue, numericalMsgContents, msgContents );
if ( FilterLog::instance()->isLogging() ) {
- QString msg = ( rc ? "<font color=#00FF00>1 = </font>"
+ TQString msg = ( rc ? "<font color=#00FF00>1 = </font>"
: "<font color=#FF0000>0 = </font>" );
msg += FilterLog::recode( asString() );
- msg += " ( <i>" + QString::number( numericalMsgContents ) + "</i> )";
+ msg += " ( <i>" + TQString::number( numericalMsgContents ) + "</i> )";
FilterLog::instance()->add( msg, FilterLog::ruleResult );
}
return rc;
}
bool KMSearchRuleNumerical::matchesInternal( long numericalValue,
- long numericalMsgContents, const QString & msgContents ) const
+ long numericalMsgContents, const TQString & msgContents ) const
{
switch ( function() ) {
case KMSearchRule::FuncEquals:
@@ -568,13 +568,13 @@ bool KMSearchRuleNumerical::matchesInternal( long numericalValue,
case KMSearchRule::FuncRegExp:
{
- QRegExp regexp( contents(), false );
+ TQRegExp regexp( contents(), false );
return ( regexp.search( msgContents ) >= 0 );
}
case KMSearchRule::FuncNotRegExp:
{
- QRegExp regexp( contents(), false );
+ TQRegExp regexp( contents(), false );
return ( regexp.search( msgContents ) < 0 );
}
@@ -610,18 +610,18 @@ bool KMSearchRuleNumerical::matchesInternal( long numericalValue,
// class KMSearchRuleStatus
//
//==================================================
-QString englishNameForStatus( const KMMsgStatus& status )
+TQString englishNameForStatus( const KMMsgStatus& status )
{
for ( int i=0; i< numStatusNames; i++ ) {
if ( statusNames[i].status == status ) {
return statusNames[i].name;
}
}
- return QString::null;
+ return TQString::null;
}
-KMSearchRuleStatus::KMSearchRuleStatus( const QCString & field,
- Function func, const QString & aContents )
+KMSearchRuleStatus::KMSearchRuleStatus( const TQCString & field,
+ Function func, const TQString & aContents )
: KMSearchRule(field, func, aContents)
{
// the values are always in english, both from the conf file as well as
@@ -635,7 +635,7 @@ KMSearchRuleStatus::KMSearchRuleStatus( int status, Function func )
mStatus = status;
}
-KMMsgStatus KMSearchRuleStatus::statusFromEnglishName( const QString & aStatusString )
+KMMsgStatus KMSearchRuleStatus::statusFromEnglishName( const TQString & aStatusString )
{
for ( int i=0; i< numStatusNames; i++ ) {
if ( !aStatusString.compare( statusNames[i].name ) ) {
@@ -681,7 +681,7 @@ bool KMSearchRuleStatus::matches( const KMMessage * msg ) const
}
if ( FilterLog::instance()->isLogging() ) {
- QString msg = ( rc ? "<font color=#00FF00>1 = </font>"
+ TQString msg = ( rc ? "<font color=#00FF00>1 = </font>"
: "<font color=#FF0000>0 = </font>" );
msg += FilterLog::recode( asString() );
FilterLog::instance()->add( msg, FilterLog::ruleResult );
@@ -698,7 +698,7 @@ bool KMSearchRuleStatus::matches( const KMMessage * msg ) const
//==================================================
KMSearchPattern::KMSearchPattern( const KConfig * config )
- : QPtrList<KMSearchRule>()
+ : TQPtrList<KMSearchRule>()
{
setAutoDelete( true );
if ( config )
@@ -716,7 +716,7 @@ bool KMSearchPattern::matches( const KMMessage * msg, bool ignoreBody ) const
if ( isEmpty() )
return true;
- QPtrListIterator<KMSearchRule> it( *this );
+ TQPtrListIterator<KMSearchRule> it( *this );
switch ( mOperator ) {
case OpAnd: // all rules must match
for ( it.toFirst() ; it.current() ; ++it )
@@ -741,7 +741,7 @@ bool KMSearchPattern::matches( const DwString & aStr, bool ignoreBody ) const
return true;
KMMessage msg;
- QPtrListIterator<KMSearchRule> it( *this );
+ TQPtrListIterator<KMSearchRule> it( *this );
switch ( mOperator ) {
case OpAnd: // all rules must match
for ( it.toFirst() ; it.current() ; ++it )
@@ -791,7 +791,7 @@ bool KMSearchPattern::matches( Q_UINT32 serNum, bool ignoreBody ) const
}
bool KMSearchPattern::requiresBody() const {
- QPtrListIterator<KMSearchRule> it( *this );
+ TQPtrListIterator<KMSearchRule> it( *this );
for ( it.toFirst() ; it.current() ; ++it )
if ( (*it)->requiresBody() )
return true;
@@ -799,7 +799,7 @@ bool KMSearchPattern::requiresBody() const {
}
void KMSearchPattern::purify() {
- QPtrListIterator<KMSearchRule> it( *this );
+ TQPtrListIterator<KMSearchRule> it( *this );
it.toLast();
while ( it.current() )
if ( (*it)->isEmpty() ) {
@@ -847,7 +847,7 @@ void KMSearchPattern::importLegacyConfig( const KConfig * config ) {
}
append( rule );
- const QString sOperator = config->readEntry("operator");
+ const TQString sOperator = config->readEntry("operator");
if ( sOperator == "ignore" ) return;
rule = KMSearchRule::createInstance( config->readEntry("fieldB").latin1(),
@@ -883,7 +883,7 @@ void KMSearchPattern::writeConfig( KConfig * config ) const {
config->writeEntry("operator", (mOperator == KMSearchPattern::OpOr) ? "or" : "and" );
int i = 0;
- for ( QPtrListIterator<KMSearchRule> it( *this ) ; it.current() && i < FILTER_MAX_RULES ; ++i , ++it )
+ for ( TQPtrListIterator<KMSearchRule> it( *this ) ; it.current() && i < FILTER_MAX_RULES ; ++i , ++it )
// we could do this ourselves, but we want the rules to be extensible,
// so we give the rule it's number and let it do the rest.
(*it)->writeConfig( config, i );
@@ -898,14 +898,14 @@ void KMSearchPattern::init() {
mName = '<' + i18n("name used for a virgin filter","unknown") + '>';
}
-QString KMSearchPattern::asString() const {
- QString result;
+TQString KMSearchPattern::asString() const {
+ TQString result;
if ( mOperator == OpOr )
result = i18n("(match any of the following)");
else
result = i18n("(match all of the following)");
- for ( QPtrListIterator<KMSearchRule> it( *this ) ; it.current() ; ++it )
+ for ( TQPtrListIterator<KMSearchRule> it( *this ) ; it.current() ; ++it )
result += "\n\t" + FilterLog::recode( (*it)->asString() );
return result;
@@ -920,7 +920,7 @@ const KMSearchPattern & KMSearchPattern::operator=( const KMSearchPattern & othe
clear(); // ###
- for ( QPtrListIterator<KMSearchRule> it( other ) ; it.current() ; ++it ) {
+ for ( TQPtrListIterator<KMSearchRule> it( other ) ; it.current() ; ++it ) {
KMSearchRule * rule = KMSearchRule::createInstance( **it ); // deep copy
append( rule );
}
diff --git a/kmail/kmsearchpattern.h b/kmail/kmsearchpattern.h
index bb9a9600d..00a26c7b4 100644
--- a/kmail/kmsearchpattern.h
+++ b/kmail/kmsearchpattern.h
@@ -7,9 +7,9 @@
#define _kmsearchpattern_h_
#include <klocale.h>
-#include <qptrlist.h>
-#include <qstring.h>
-#include <qcstring.h>
+#include <tqptrlist.h>
+#include <tqstring.h>
+#include <tqcstring.h>
#include "kmmsgbase.h" // for KMMsgStatus
class KMMessage;
@@ -47,21 +47,21 @@ public:
FuncIsInAddressbook, FuncIsNotInAddressbook,
FuncIsInCategory, FuncIsNotInCategory,
FuncHasAttachment, FuncHasNoAttachment};
- KMSearchRule ( const QCString & field=0, Function=FuncContains,
- const QString &contents=QString::null );
+ KMSearchRule ( const TQCString & field=0, Function=FuncContains,
+ const TQString &contents=TQString::null );
KMSearchRule ( const KMSearchRule &other );
const KMSearchRule & operator=( const KMSearchRule & other );
/** Create a search rule of a certain type by instantiating the appro-
priate subclass depending on the @p field. */
- static KMSearchRule* createInstance( const QCString & field=0,
+ static KMSearchRule* createInstance( const TQCString & field=0,
Function function=FuncContains,
- const QString & contents=QString::null );
+ const TQString & contents=TQString::null );
- static KMSearchRule* createInstance( const QCString & field,
+ static KMSearchRule* createInstance( const TQCString & field,
const char * function,
- const QString & contents );
+ const TQString & contents );
static KMSearchRule * createInstance( const KMSearchRule & other );
@@ -123,28 +123,28 @@ public:
@li \<age in days\>: Try to match against age of message (numerical).
@li \<status\>: Try to match against status of message (status).
*/
- QCString field() const { return mField; }
+ TQCString field() const { return mField; }
/** Set message header field name (make sure there's no trailing
colon ':') */
- void setField( const QCString & field ) { mField = field; }
+ void setField( const TQCString & field ) { mField = field; }
/** Return the value. This can be either a substring to search for in
or a regexp pattern to match against the header. */
- QString contents() const { return mContents; }
+ TQString contents() const { return mContents; }
/** Set the value. */
- void setContents( const QString & aContents ) { mContents = aContents; }
+ void setContents( const TQString & aContents ) { mContents = aContents; }
/** Returns the rule as string. For debugging.*/
- const QString asString() const;
+ const TQString asString() const;
private:
static Function configValueToFunc( const char * str );
- static QString functionToString( Function function );
+ static TQString functionToString( Function function );
- QCString mField;
+ TQCString mField;
Function mFunction;
- QString mContents;
+ TQString mContents;
};
@@ -159,8 +159,8 @@ private:
class KMSearchRuleString : public KMSearchRule
{
public:
- KMSearchRuleString( const QCString & field=0, Function function=FuncContains,
- const QString & contents=QString::null );
+ KMSearchRuleString( const TQCString & field=0, Function function=FuncContains,
+ const TQString & contents=TQString::null );
KMSearchRuleString( const KMSearchRuleString & other );
const KMSearchRuleString & operator=( const KMSearchRuleString & other );
@@ -178,7 +178,7 @@ public:
int headerLen=-1 ) const;
/** Helper for the main matches() method. Does the actual comparing. */
- bool matchesInternal( const QString & msgContents ) const;
+ bool matchesInternal( const TQString & msgContents ) const;
private:
const DwBoyerMoore *mBmHeaderField;
@@ -194,15 +194,15 @@ private:
class KMSearchRuleNumerical : public KMSearchRule
{
public:
- KMSearchRuleNumerical( const QCString & field=0, Function function=FuncContains,
- const QString & contents=QString::null );
+ KMSearchRuleNumerical( const TQCString & field=0, Function function=FuncContains,
+ const TQString & contents=TQString::null );
virtual bool isEmpty() const ;
virtual bool matches( const KMMessage * msg ) const;
/** Helper for the main matches() method. Does the actual comparing. */
bool matchesInternal( long numericalValue, long numericalMsgContents,
- const QString & msgContents ) const;
+ const TQString & msgContents ) const;
};
@@ -268,8 +268,8 @@ namespace KMail {
class KMSearchRuleStatus : public KMSearchRule
{
public:
- KMSearchRuleStatus( const QCString & field=0, Function function=FuncContains,
- const QString & contents=QString::null );
+ KMSearchRuleStatus( const TQCString & field=0, Function function=FuncContains,
+ const TQString & contents=TQString::null );
KMSearchRuleStatus( int status, Function function=FuncContains );
virtual bool isEmpty() const ;
@@ -278,7 +278,7 @@ public:
virtual bool matches( const DwString &, KMMessage &,
const DwBoyerMoore *,
int ) const;
- static KMMsgStatus statusFromEnglishName(const QString&);
+ static KMMsgStatus statusFromEnglishName(const TQString&);
private:
KMMsgStatus mStatus;
};
@@ -291,19 +291,19 @@ public:
KConfig group and there is a constructor, mainly used by KMFilter
to initialize from a preset KConfig-Group.
- From a class hierarchy point of view, it is a QPtrList of
+ From a class hierarchy point of view, it is a TQPtrList of
KMSearchRule's that adds the boolean operators (see Operator)
'and' and 'or' that connect the rules logically, and has a name
under which it could be stored in the config file.
- As a QPtrList with autoDelete enabled, it assumes that it is the
+ As a TQPtrList with autoDelete enabled, it assumes that it is the
central repository for the rules it contains. So if you want to
reuse a rule in another pattern, make a deep copy of that rule.
@short An abstraction of a search over messages.
@author Marc Mutz <Marc@Mutz.com>
*/
-class KMSearchPattern : public QPtrList<KMSearchRule>
+class KMSearchPattern : public TQPtrList<KMSearchRule>
{
public:
@@ -319,7 +319,7 @@ public:
If config is 0, provides a pattern with minimal, but
sufficient initialization. Unmodified, such a pattern will fail
to match any KMMessage. You can query for such an empty
- rule by using isEmpty, which is inherited from QPtrList.
+ rule by using isEmpty, which is inherited from TQPtrList.
*/
KMSearchPattern( const KConfig * config=0 );
@@ -363,7 +363,7 @@ public:
*/
void readConfig( const KConfig * config );
/** Writes itself into @p config. The group has to be preset. Tries
- to delete old-style keys by overwriting them with QString::null.
+ to delete old-style keys by overwriting them with TQString::null.
Derived classes reimplementing writeConfig() should also call this
method, or else the rules will not be stored.
@@ -371,10 +371,10 @@ public:
void writeConfig( KConfig * config ) const;
/** Get the name of the search pattern. */
- QString name() const { return mName; }
+ TQString name() const { return mName; }
/** Set the name of the search pattern. KMFilter uses this to
store it's own name, too. */
- void setName( const QString & newName ) { mName = newName ; }
+ void setName( const TQString & newName ) { mName = newName ; }
/** Get the filter operator */
KMSearchPattern::Operator op() const { return mOperator; }
@@ -382,7 +382,7 @@ public:
void setOp( KMSearchPattern::Operator aOp ) { mOperator = aOp; }
/** Returns the pattern as string. For debugging.*/
- QString asString() const;
+ TQString asString() const;
/** Overloaded assignment operator. Makes a deep copy. */
const KMSearchPattern & operator=( const KMSearchPattern & aPattern );
@@ -400,7 +400,7 @@ private:
to "<i18n("unnamed")>", and the boolean operator to @p OpAnd. */
void init();
- QString mName;
+ TQString mName;
Operator mOperator;
};
diff --git a/kmail/kmsearchpatternedit.cpp b/kmail/kmsearchpatternedit.cpp
index df09bbd21..a928e57f3 100644
--- a/kmail/kmsearchpatternedit.cpp
+++ b/kmail/kmsearchpatternedit.cpp
@@ -14,11 +14,11 @@ using KMail::RuleWidgetHandlerManager;
#include <kdialog.h>
#include <kdebug.h>
-#include <qradiobutton.h>
-#include <qcombobox.h>
-#include <qbuttongroup.h>
-#include <qwidgetstack.h>
-#include <qlayout.h>
+#include <tqradiobutton.h>
+#include <tqcombobox.h>
+#include <tqbuttongroup.h>
+#include <tqwidgetstack.h>
+#include <tqlayout.h>
#include <assert.h>
@@ -48,10 +48,10 @@ static const int SpecialRuleFieldsCount =
//
//=============================================================================
-KMSearchRuleWidget::KMSearchRuleWidget( QWidget *parent, KMSearchRule *aRule,
+KMSearchRuleWidget::KMSearchRuleWidget( TQWidget *parent, KMSearchRule *aRule,
const char *name, bool headersOnly,
bool absoluteDates )
- : QWidget( parent, name ),
+ : TQWidget( parent, name ),
mRuleField( 0 ),
mFunctionStack( 0 ),
mValueStack( 0 ),
@@ -69,7 +69,7 @@ KMSearchRuleWidget::KMSearchRuleWidget( QWidget *parent, KMSearchRule *aRule,
void KMSearchRuleWidget::setHeadersOnly( bool headersOnly )
{
KMSearchRule* srule = rule();
- QCString currentText = srule->field();
+ TQCString currentText = srule->field();
delete srule;
initFieldList( headersOnly, mAbsoluteDates );
@@ -80,17 +80,17 @@ void KMSearchRuleWidget::setHeadersOnly( bool headersOnly )
if (( currentText != "<message>") &&
( currentText != "<body>"))
- mRuleField->changeItem( QString::fromAscii( currentText ), 0 );
+ mRuleField->changeItem( TQString::fromAscii( currentText ), 0 );
else
- mRuleField->changeItem( QString::null, 0 );
+ mRuleField->changeItem( TQString::null, 0 );
}
void KMSearchRuleWidget::initWidget()
{
- QHBoxLayout * hlay = new QHBoxLayout( this, 0, KDialog::spacingHint() );
+ TQHBoxLayout * hlay = new TQHBoxLayout( this, 0, KDialog::spacingHint() );
// initialize the header field combo box
- mRuleField = new QComboBox( true, this, "mRuleField" );
+ mRuleField = new TQComboBox( true, this, "mRuleField" );
mRuleField->insertStringList( mFilterFieldList );
// don't show sliders when popping up this menu
mRuleField->setSizeLimit( mRuleField->count() );
@@ -98,14 +98,14 @@ void KMSearchRuleWidget::initWidget()
hlay->addWidget( mRuleField );
// initialize the function/value widget stack
- mFunctionStack = new QWidgetStack( this, "mFunctionStack" );
+ mFunctionStack = new TQWidgetStack( this, "mFunctionStack" );
//Don't expand the widget in vertical direction
- mFunctionStack->setSizePolicy( QSizePolicy::Preferred,QSizePolicy::Fixed );
+ mFunctionStack->setSizePolicy( TQSizePolicy::Preferred,TQSizePolicy::Fixed );
hlay->addWidget( mFunctionStack );
- mValueStack = new QWidgetStack( this, "mValueStack" );
- mValueStack->setSizePolicy( QSizePolicy::Preferred,QSizePolicy::Fixed );
+ mValueStack = new TQWidgetStack( this, "mValueStack" );
+ mValueStack->setSizePolicy( TQSizePolicy::Preferred,TQSizePolicy::Fixed );
hlay->addWidget( mValueStack );
hlay->setStretchFactor( mValueStack, 10 );
@@ -116,12 +116,12 @@ void KMSearchRuleWidget::initWidget()
// redirect focus to the header field combo box
setFocusProxy( mRuleField );
- connect( mRuleField, SIGNAL( activated( const QString & ) ),
- this, SLOT( slotRuleFieldChanged( const QString & ) ) );
- connect( mRuleField, SIGNAL( textChanged( const QString & ) ),
- this, SLOT( slotRuleFieldChanged( const QString & ) ) );
- connect( mRuleField, SIGNAL( textChanged( const QString & ) ),
- this, SIGNAL( fieldChanged( const QString & ) ) );
+ connect( mRuleField, TQT_SIGNAL( activated( const TQString & ) ),
+ this, TQT_SLOT( slotRuleFieldChanged( const TQString & ) ) );
+ connect( mRuleField, TQT_SIGNAL( textChanged( const TQString & ) ),
+ this, TQT_SLOT( slotRuleFieldChanged( const TQString & ) ) );
+ connect( mRuleField, TQT_SIGNAL( textChanged( const TQString & ) ),
+ this, TQT_SIGNAL( fieldChanged( const TQString & ) ) );
}
void KMSearchRuleWidget::setRule( KMSearchRule *aRule )
@@ -137,10 +137,10 @@ void KMSearchRuleWidget::setRule( KMSearchRule *aRule )
mRuleField->blockSignals( true );
if ( i < 0 ) { // not found -> user defined field
- mRuleField->changeItem( QString::fromLatin1( aRule->field() ), 0 );
+ mRuleField->changeItem( TQString::fromLatin1( aRule->field() ), 0 );
i = 0;
} else { // found in the list of predefined fields
- mRuleField->changeItem( QString::null, 0 );
+ mRuleField->changeItem( TQString::null, 0 );
}
mRuleField->setCurrentItem( i );
@@ -151,11 +151,11 @@ void KMSearchRuleWidget::setRule( KMSearchRule *aRule )
}
KMSearchRule* KMSearchRuleWidget::rule() const {
- const QCString ruleField = ruleFieldToEnglish( mRuleField->currentText() );
+ const TQCString ruleField = ruleFieldToEnglish( mRuleField->currentText() );
const KMSearchRule::Function function =
RuleWidgetHandlerManager::instance()->function( ruleField,
mFunctionStack );
- const QString value =
+ const TQString value =
RuleWidgetHandlerManager::instance()->value( ruleField, mFunctionStack,
mValueStack );
@@ -174,7 +174,7 @@ void KMSearchRuleWidget::reset()
void KMSearchRuleWidget::slotFunctionChanged()
{
- const QCString ruleField = ruleFieldToEnglish( mRuleField->currentText() );
+ const TQCString ruleField = ruleFieldToEnglish( mRuleField->currentText() );
RuleWidgetHandlerManager::instance()->update( ruleField,
mFunctionStack,
mValueStack );
@@ -182,15 +182,15 @@ void KMSearchRuleWidget::slotFunctionChanged()
void KMSearchRuleWidget::slotValueChanged()
{
- const QCString ruleField = ruleFieldToEnglish( mRuleField->currentText() );
- const QString prettyValue =
+ const TQCString ruleField = ruleFieldToEnglish( mRuleField->currentText() );
+ const TQString prettyValue =
RuleWidgetHandlerManager::instance()->prettyValue( ruleField,
mFunctionStack,
mValueStack );
emit contentsChanged( prettyValue );
}
-QCString KMSearchRuleWidget::ruleFieldToEnglish( const QString & i18nVal )
+TQCString KMSearchRuleWidget::ruleFieldToEnglish( const TQString & i18nVal )
{
for ( int i = 0; i < SpecialRuleFieldsCount; ++i ) {
if ( i18nVal == i18n( SpecialRuleFields[i].displayName ) )
@@ -199,7 +199,7 @@ QCString KMSearchRuleWidget::ruleFieldToEnglish( const QString & i18nVal )
return i18nVal.latin1();
}
-int KMSearchRuleWidget::ruleFieldToId( const QString & i18nVal )
+int KMSearchRuleWidget::ruleFieldToId( const TQString & i18nVal )
{
for ( int i = 0; i < SpecialRuleFieldsCount; ++i ) {
if ( i18nVal == i18n( SpecialRuleFields[i].displayName ) )
@@ -208,7 +208,7 @@ int KMSearchRuleWidget::ruleFieldToId( const QString & i18nVal )
return -1; // no pseudo header
}
-static QString displayNameFromInternalName( const QString & internal )
+static TQString displayNameFromInternalName( const TQString & internal )
{
for ( int i = 0; i < SpecialRuleFieldsCount; ++i ) {
if ( internal == SpecialRuleFields[i].internalName )
@@ -219,12 +219,12 @@ static QString displayNameFromInternalName( const QString & internal )
-int KMSearchRuleWidget::indexOfRuleField( const QCString & aName ) const
+int KMSearchRuleWidget::indexOfRuleField( const TQCString & aName ) const
{
if ( aName.isEmpty() )
return -1;
- QString i18n_aName = displayNameFromInternalName( aName );
+ TQString i18n_aName = displayNameFromInternalName( aName );
for ( int i = 1; i < mRuleField->count(); ++i ) {
if ( mRuleField->text( i ) == i18n_aName )
@@ -263,7 +263,7 @@ void KMSearchRuleWidget::initFieldList( bool headersOnly, bool absoluteDates )
mFilterFieldList.append("X-Spam-Flag");
}
-void KMSearchRuleWidget::slotRuleFieldChanged( const QString & field )
+void KMSearchRuleWidget::slotRuleFieldChanged( const TQString & field )
{
RuleWidgetHandlerManager::instance()->update( ruleFieldToEnglish( field ),
mFunctionStack,
@@ -276,7 +276,7 @@ void KMSearchRuleWidget::slotRuleFieldChanged( const QString & field )
//
//=============================================================================
-KMSearchRuleWidgetLister::KMSearchRuleWidgetLister( QWidget *parent, const char* name, bool headersOnly, bool absoluteDates )
+KMSearchRuleWidgetLister::KMSearchRuleWidgetLister( TQWidget *parent, const char* name, bool headersOnly, bool absoluteDates )
: KWidgetLister( 2, FILTER_MAX_RULES, parent, name )
{
mRuleList = 0;
@@ -288,7 +288,7 @@ KMSearchRuleWidgetLister::~KMSearchRuleWidgetLister()
{
}
-void KMSearchRuleWidgetLister::setRuleList( QPtrList<KMSearchRule> *aList )
+void KMSearchRuleWidgetLister::setRuleList( TQPtrList<KMSearchRule> *aList )
{
assert ( aList );
@@ -321,8 +321,8 @@ void KMSearchRuleWidgetLister::setRuleList( QPtrList<KMSearchRule> *aList )
setNumberOfShownWidgetsTo( QMAX((int)mRuleList->count(),mMinWidgets) );
// load the actions into the widgets
- QPtrListIterator<KMSearchRule> rIt( *mRuleList );
- QPtrListIterator<QWidget> wIt( mWidgetList );
+ TQPtrListIterator<KMSearchRule> rIt( *mRuleList );
+ TQPtrListIterator<TQWidget> wIt( mWidgetList );
for ( rIt.toFirst(), wIt.toFirst() ;
rIt.current() && wIt.current() ; ++rIt, ++wIt ) {
static_cast<KMSearchRuleWidget*>(*wIt)->setRule( (*rIt) );
@@ -336,7 +336,7 @@ void KMSearchRuleWidgetLister::setRuleList( QPtrList<KMSearchRule> *aList )
void KMSearchRuleWidgetLister::setHeadersOnly( bool headersOnly )
{
- QPtrListIterator<QWidget> wIt( mWidgetList );
+ TQPtrListIterator<TQWidget> wIt( mWidgetList );
for ( wIt.toFirst() ; wIt.current() ; ++wIt ) {
(static_cast<KMSearchRuleWidget*>(*wIt))->setHeadersOnly( headersOnly );
}
@@ -351,12 +351,12 @@ void KMSearchRuleWidgetLister::reset()
slotClear();
}
-QWidget* KMSearchRuleWidgetLister::createWidget( QWidget *parent )
+TQWidget* KMSearchRuleWidgetLister::createWidget( TQWidget *parent )
{
return new KMSearchRuleWidget(parent, 0, 0, mHeadersOnly, mAbsoluteDates);
}
-void KMSearchRuleWidgetLister::clearWidget( QWidget *aWidget )
+void KMSearchRuleWidgetLister::clearWidget( TQWidget *aWidget )
{
if ( aWidget )
((KMSearchRuleWidget*)aWidget)->reset();
@@ -368,7 +368,7 @@ void KMSearchRuleWidgetLister::regenerateRuleListFromWidgets()
mRuleList->clear();
- QPtrListIterator<QWidget> it( mWidgetList );
+ TQPtrListIterator<TQWidget> it( mWidgetList );
for ( it.toFirst() ; it.current() ; ++it ) {
KMSearchRule *r = ((KMSearchRuleWidget*)(*it))->rule();
if ( r )
@@ -385,15 +385,15 @@ void KMSearchRuleWidgetLister::regenerateRuleListFromWidgets()
//
//=============================================================================
-KMSearchPatternEdit::KMSearchPatternEdit(QWidget *parent, const char *name, bool headersOnly, bool absoluteDates )
- : QGroupBox( 1/*columns*/, Horizontal, parent, name )
+KMSearchPatternEdit::KMSearchPatternEdit(TQWidget *parent, const char *name, bool headersOnly, bool absoluteDates )
+ : TQGroupBox( 1/*columns*/, Horizontal, parent, name )
{
setTitle( i18n("Search Criteria") );
initLayout( headersOnly, absoluteDates );
}
-KMSearchPatternEdit::KMSearchPatternEdit(const QString & title, QWidget *parent, const char *name, bool headersOnly, bool absoluteDates)
- : QGroupBox( 1/*column*/, Horizontal, title, parent, name )
+KMSearchPatternEdit::KMSearchPatternEdit(const TQString & title, TQWidget *parent, const char *name, bool headersOnly, bool absoluteDates)
+ : TQGroupBox( 1/*column*/, Horizontal, title, parent, name )
{
initLayout( headersOnly, absoluteDates );
}
@@ -405,13 +405,13 @@ KMSearchPatternEdit::~KMSearchPatternEdit()
void KMSearchPatternEdit::initLayout(bool headersOnly, bool absoluteDates)
{
//------------the radio buttons
- mAllRBtn = new QRadioButton( i18n("Match a&ll of the following"), this, "mAllRBtn" );
- mAnyRBtn = new QRadioButton( i18n("Match an&y of the following"), this, "mAnyRBtn" );
+ mAllRBtn = new TQRadioButton( i18n("Match a&ll of the following"), this, "mAllRBtn" );
+ mAnyRBtn = new TQRadioButton( i18n("Match an&y of the following"), this, "mAnyRBtn" );
mAllRBtn->setChecked(true);
mAnyRBtn->setChecked(false);
- QButtonGroup *bg = new QButtonGroup( this );
+ TQButtonGroup *bg = new TQButtonGroup( this );
bg->hide();
bg->insert( mAllRBtn, (int)KMSearchPattern::OpAnd );
bg->insert( mAnyRBtn, (int)KMSearchPattern::OpOr );
@@ -421,15 +421,15 @@ void KMSearchPatternEdit::initLayout(bool headersOnly, bool absoluteDates)
mRuleLister->slotClear();
//------------connect a few signals
- connect( bg, SIGNAL(clicked(int)),
- this, SLOT(slotRadioClicked(int)) );
+ connect( bg, TQT_SIGNAL(clicked(int)),
+ this, TQT_SLOT(slotRadioClicked(int)) );
KMSearchRuleWidget *srw = (KMSearchRuleWidget*)mRuleLister->mWidgetList.first();
if ( srw ) {
- connect( srw, SIGNAL(fieldChanged(const QString &)),
- this, SLOT(slotAutoNameHack()) );
- connect( srw, SIGNAL(contentsChanged(const QString &)),
- this, SLOT(slotAutoNameHack()) );
+ connect( srw, TQT_SIGNAL(fieldChanged(const TQString &)),
+ this, TQT_SLOT(slotAutoNameHack()) );
+ connect( srw, TQT_SIGNAL(contentsChanged(const TQString &)),
+ this, TQT_SLOT(slotAutoNameHack()) );
} else
kdDebug(5006) << "KMSearchPatternEdit: no first KMSearchRuleWidget, though slotClear() has been called!" << endl;
}
diff --git a/kmail/kmsearchpatternedit.h b/kmail/kmsearchpatternedit.h
index 7a3c3614e..c8ef9a2f5 100644
--- a/kmail/kmsearchpatternedit.h
+++ b/kmail/kmsearchpatternedit.h
@@ -8,8 +8,8 @@
#include "kwidgetlister.h"
-#include <qgroupbox.h>
-#include <qstringlist.h>
+#include <tqgroupbox.h>
+#include <tqstringlist.h>
class KMSearchRule;
class KMSearchPattern;
@@ -24,9 +24,9 @@ class QLabel;
class KMSearchPatternEdit;
/** A widget to edit a single KMSearchRule.
- It consists of an editable QComboBox for the field,
- a read-only QComboBox for the function and
- a QLineEdit for the content or the pattern (in case of regexps).
+ It consists of an editable TQComboBox for the field,
+ a read-only TQComboBox for the function and
+ a TQLineEdit for the content or the pattern (in case of regexps).
It manages the i18n itself, so field name should be in it's english form.
To use, you essentially give it the reference to a KMSearchRule and
@@ -43,7 +43,7 @@ class KMSearchRuleWidget : public QWidget
public:
/** Constructor. You can give a KMSearchRule as parameter, which will
be used to initialize the widget. */
- KMSearchRuleWidget( QWidget* parent=0, KMSearchRule* aRule=0, const char* name=0, bool headersOnly = false, bool absoluteDates = false );
+ KMSearchRuleWidget( TQWidget* parent=0, KMSearchRule* aRule=0, const char* name=0, bool headersOnly = false, bool absoluteDates = false );
enum { Message, Body, AnyHeader, Recipients, Size, AgeInDays, Status };
@@ -62,7 +62,7 @@ public:
/** Resets the rule currently worked on and updates the widget
accordingly. */
void reset();
- static int ruleFieldToId( const QString & i18nVal );
+ static int ruleFieldToId( const TQString & i18nVal );
public slots:
void slotFunctionChanged();
@@ -72,31 +72,31 @@ signals:
/** This signal is emitted whenever the user alters the field. The
pseudo-headers <...> are returned in their i18n form, but stored
in their english form in the rule. */
- void fieldChanged( const QString & );
+ void fieldChanged( const TQString & );
/** This signal is emitted whenever the user alters the
contents/value of the rule. */
- void contentsChanged( const QString & );
+ void contentsChanged( const TQString & );
protected:
/** Used internally to translate i18n-ized pseudo-headers back to
english. */
- static QCString ruleFieldToEnglish(const QString & i18nVal);
+ static TQCString ruleFieldToEnglish(const TQString & i18nVal);
/** Used internally to find the corresponding index into the field
ComboBox. Returns the index if found or -1 if the search failed, */
- int indexOfRuleField( const QCString & aName ) const;
+ int indexOfRuleField( const TQCString & aName ) const;
protected slots:
- void slotRuleFieldChanged( const QString & );
+ void slotRuleFieldChanged( const TQString & );
private:
void initWidget();
void initFieldList( bool headersOnly, bool absoluteDates );
- QStringList mFilterFieldList;
- QComboBox *mRuleField;
- QWidgetStack *mFunctionStack;
- QWidgetStack *mValueStack;
+ TQStringList mFilterFieldList;
+ TQComboBox *mRuleField;
+ TQWidgetStack *mFunctionStack;
+ TQWidgetStack *mValueStack;
bool mAbsoluteDates;
};
@@ -108,23 +108,23 @@ class KMSearchRuleWidgetLister : public KWidgetLister
friend class ::KMSearchPatternEdit;
public:
- KMSearchRuleWidgetLister( QWidget *parent=0, const char* name=0, bool headersOnly = false, bool absoluteDates = false );
+ KMSearchRuleWidgetLister( TQWidget *parent=0, const char* name=0, bool headersOnly = false, bool absoluteDates = false );
virtual ~KMSearchRuleWidgetLister();
- void setRuleList( QPtrList<KMSearchRule> * aList );
+ void setRuleList( TQPtrList<KMSearchRule> * aList );
void setHeadersOnly( bool headersOnly );
public slots:
void reset();
protected:
- virtual void clearWidget( QWidget *aWidget );
- virtual QWidget* createWidget( QWidget *parent );
+ virtual void clearWidget( TQWidget *aWidget );
+ virtual TQWidget* createWidget( TQWidget *parent );
private:
void regenerateRuleListFromWidgets();
- QPtrList<KMSearchRule> *mRuleList;
+ TQPtrList<KMSearchRule> *mRuleList;
bool mHeadersOnly;
bool mAbsoluteDates;
};
@@ -162,15 +162,15 @@ private:
@author Marc Mutz <Marc@Mutz.com>
*/
-class KMSearchPatternEdit : public QGroupBox {
+class KMSearchPatternEdit : public TQGroupBox {
Q_OBJECT
public:
/** Constructor. The parent and name parameters are passed to the underlying
- QGroupBox, as usual. */
- KMSearchPatternEdit(QWidget *parent=0, const char *name=0, bool headersOnly = false, bool absoluteDates = false);
+ TQGroupBox, as usual. */
+ KMSearchPatternEdit(TQWidget *parent=0, const char *name=0, bool headersOnly = false, bool absoluteDates = false);
/** Constructor. This one allows you to set a title different from
i18n("Search Criteria"). */
- KMSearchPatternEdit(const QString & title, QWidget *parent=0, const char *name=0, bool headersOnly = false, bool absoluteDates = false);
+ KMSearchPatternEdit(const TQString & title, TQWidget *parent=0, const char *name=0, bool headersOnly = false, bool absoluteDates = false);
~KMSearchPatternEdit();
/** Set the search pattern. Rules are inserted regardless of the
@@ -204,7 +204,7 @@ private:
void initLayout( bool headersOnly, bool absoluteDates );
KMSearchPattern *mPattern;
- QRadioButton *mAllRBtn, *mAnyRBtn;
+ TQRadioButton *mAllRBtn, *mAnyRBtn;
KMSearchRuleWidgetLister *mRuleLister;
};
diff --git a/kmail/kmsender.cpp b/kmail/kmsender.cpp
index fc2bfba1f..a79da268f 100644
--- a/kmail/kmsender.cpp
+++ b/kmail/kmsender.cpp
@@ -77,7 +77,7 @@ KMSender::~KMSender()
}
//-----------------------------------------------------------------------------
-void KMSender::setStatusMsg(const QString &msg)
+void KMSender::setStatusMsg(const TQString &msg)
{
if ( mProgressItem )
mProgressItem->setStatus(msg);
@@ -86,7 +86,7 @@ void KMSender::setStatusMsg(const QString &msg)
//-----------------------------------------------------------------------------
void KMSender::readConfig(void)
{
- QString str;
+ TQString str;
KConfigGroup config(KMKernel::config(), SENDER_GROUP);
mSendImmediate = config.readBoolEntry("Immediate", true);
@@ -118,8 +118,8 @@ bool KMSender::settingsOk() const
}
static void handleRedirections( KMMessage * m ) {
- const QString from = m->headerField("X-KMail-Redirect-From");
- const QString msgId = m->msgId();
+ const TQString from = m->headerField("X-KMail-Redirect-From");
+ const TQString msgId = m->msgId();
if( from.isEmpty() || msgId.isEmpty() )
m->setMsgId( KMMessage::generateMessageId( m->sender() ) );
}
@@ -208,7 +208,7 @@ void KMSender::outboxMsgAdded(int idx)
//-----------------------------------------------------------------------------
-bool KMSender::doSendQueued( const QString &customTransport )
+bool KMSender::doSendQueued( const TQString &customTransport )
{
if (!settingsOk()) return false;
@@ -231,8 +231,8 @@ bool KMSender::doSendQueued( const QString &customTransport )
for( int i = 0 ; i<mTotalMessages ; ++i )
mTotalBytes += mOutboxFolder->getMsgBase(i)->msgSize();
- connect( mOutboxFolder, SIGNAL(msgAdded(int)),
- this, SLOT(outboxMsgAdded(int)) );
+ connect( mOutboxFolder, TQT_SIGNAL(msgAdded(int)),
+ this, TQT_SLOT(outboxMsgAdded(int)) );
mCurrentMsg = 0;
mSentFolder = kmkernel->sentFolder();
@@ -300,7 +300,7 @@ void KMSender::doSendMsg()
KMMessage & newMsg( *mCurrentMsg->unencryptedMsg() );
mCurrentMsg->dwContentType() = newMsg.dwContentType();
mCurrentMsg->setContentTransferEncodingStr( newMsg.contentTransferEncodingStr() );
- QCString newDispo = newMsg.headerField("Content-Disposition").latin1();
+ TQCString newDispo = newMsg.headerField("Content-Disposition").latin1();
if( newDispo.isEmpty() )
mCurrentMsg->removeHeaderField( "Content-Disposition" );
else
@@ -471,18 +471,18 @@ void KMSender::doSendMsg()
i18n( "Sending messages" ),
i18n("Initiating sender process..."),
true );
- connect( mProgressItem, SIGNAL(progressItemCanceled(KPIM::ProgressItem*)),
- this, SLOT( slotAbortSend() ) );
+ connect( mProgressItem, TQT_SIGNAL(progressItemCanceled(KPIM::ProgressItem*)),
+ this, TQT_SLOT( slotAbortSend() ) );
kapp->ref();
mSendInProgress = true;
}
- QString msgTransport = mCustomTransport;
+ TQString msgTransport = mCustomTransport;
if ( msgTransport.isEmpty() ) {
msgTransport = mCurrentMsg->headerField("X-KMail-Transport");
}
if ( msgTransport.isEmpty() ) {
- const QStringList sl = KMTransportInfo::availableTransports();
+ const TQStringList sl = KMTransportInfo::availableTransports();
if (!sl.empty()) msgTransport = sl.front();
}
@@ -516,8 +516,8 @@ void KMSender::doSendMsg()
if (!mSendProc)
sendProcStarted(false);
else {
- connect(mSendProc, SIGNAL(idle()), SLOT(slotIdle()));
- connect(mSendProc, SIGNAL(started(bool)), SLOT(sendProcStarted(bool)));
+ connect(mSendProc, TQT_SIGNAL(idle()), TQT_SLOT(slotIdle()));
+ connect(mSendProc, TQT_SIGNAL(started(bool)), TQT_SLOT(sendProcStarted(bool)));
// Run the precommand if there is one
if ( !mTransportInfo->precommand.isEmpty() ) {
@@ -534,11 +534,11 @@ void KMSender::doSendMsg()
doSendMsgAux();
}
-bool KMSender::runPrecommand( const QString & cmd ) {
+bool KMSender::runPrecommand( const TQString & cmd ) {
setStatusMsg( i18n("Executing precommand %1").arg( cmd ) );
mPrecommand = new KMPrecommand( cmd );
- connect( mPrecommand, SIGNAL(finished(bool)),
- SLOT(slotPrecommandFinished(bool)) );
+ connect( mPrecommand, TQT_SIGNAL(finished(bool)),
+ TQT_SLOT(slotPrecommandFinished(bool)) );
if ( !mPrecommand->start() ) {
delete mPrecommand; mPrecommand = 0;
return false;
@@ -563,17 +563,17 @@ void KMSender::sendProcStarted(bool success)
}
-static QStringList addrSpecListToStringList( const AddrSpecList & l, bool allowEmpty=false ) {
- QStringList result;
+static TQStringList addrSpecListToStringList( const AddrSpecList & l, bool allowEmpty=false ) {
+ TQStringList result;
for ( AddrSpecList::const_iterator it = l.begin(), end = l.end() ; it != end ; ++it ) {
- const QString s = (*it).asString();
+ const TQString s = (*it).asString();
if ( allowEmpty || !s.isEmpty() )
result.push_back( s );
}
return result;
}
-static void extractSenderToCCAndBcc( KMMessage * aMsg, QString * sender, QStringList * to, QStringList * cc, QStringList * bcc ) {
+static void extractSenderToCCAndBcc( KMMessage * aMsg, TQString * sender, TQStringList * to, TQStringList * cc, TQStringList * bcc ) {
if ( sender ) *sender = aMsg->sender();
if( !aMsg->headerField("X-KMail-Recipients").isEmpty() ) {
// extended BCC handling to prevent TOs and CCs from seeing
@@ -597,15 +597,15 @@ void KMSender::doSendMsgAux()
setStatusMsg(i18n("%3: subject of message","Sending message %1 of %2: %3")
.arg(mSentMessages+mFailedMessages+1).arg(mTotalMessages)
.arg(mCurrentMsg->subject()));
- QStringList to, cc, bcc;
- QString sender;
+ TQStringList to, cc, bcc;
+ TQString sender;
extractSenderToCCAndBcc( mCurrentMsg, &sender, &to, &cc, &bcc );
// MDNs are required to have an empty envelope from as per RFC2298.
if ( messageIsDispositionNotificationReport( mCurrentMsg ) && GlobalSettings::self()->sendMDNsWithEmptySender() )
sender = "<>";
- const QByteArray message = mCurrentMsg->asSendableString();
+ const TQByteArray message = mCurrentMsg->asSendableString();
if ( sender.isEmpty() || !mSendProc->send( sender, to, cc, bcc, message ) ) {
if ( mCurrentMsg )
mCurrentMsg->setTransferInProgress( false );
@@ -640,8 +640,8 @@ void KMSender::cleanup(void)
mSentFolder = 0;
}
if ( mOutboxFolder ) {
- disconnect( mOutboxFolder, SIGNAL(msgAdded(int)),
- this, SLOT(outboxMsgAdded(int)) );
+ disconnect( mOutboxFolder, TQT_SIGNAL(msgAdded(int)),
+ this, TQT_SLOT(outboxMsgAdded(int)) );
mOutboxFolder->close("dosendoutbox");
if ( mOutboxFolder->count( true ) == 0 ) {
mOutboxFolder->expunge();
@@ -677,8 +677,8 @@ void KMSender::slotIdle()
{
assert(mSendProc != 0);
- QString msg;
- QString errString;
+ TQString msg;
+ TQString errString;
if (mSendProc)
errString = mSendProc->lastErrorMessage();
@@ -708,7 +708,7 @@ void KMSender::slotIdle()
mCurrentMsg = 0;
mFailedMessages++;
// reset cached password
- QMapIterator <QString,QString> pc;
+ TQMapIterator <TQString,TQString> pc;
if ( (pc = mPasswdCache.find( mMethodStr )) != mPasswdCache.end() ) {
mPasswdCache.erase(pc);
}
@@ -785,9 +785,9 @@ void KMSender::setSendQuotedPrintable(bool aSendQuotedPrintable)
//-----------------------------------------------------------------------------
-KMSendProc* KMSender::createSendProcFromString( const QString & transport )
+KMSendProc* KMSender::createSendProcFromString( const TQString & transport )
{
- mTransportInfo->type = QString::null;
+ mTransportInfo->type = TQString::null;
int nr = KMTransportInfo::findTransport(transport);
if (nr)
{
@@ -798,7 +798,7 @@ KMSendProc* KMSender::createSendProcFromString( const QString & transport )
mTransportInfo->type = "smtp";
mTransportInfo->auth = false;
mTransportInfo->encryption = "NONE";
- QString serverport = transport.mid(7);
+ TQString serverport = transport.mid(7);
int colon = serverport.find(':');
if (colon != -1) {
mTransportInfo->host = serverport.left(colon);
@@ -813,7 +813,7 @@ KMSendProc* KMSender::createSendProcFromString( const QString & transport )
mTransportInfo->type = "smtps";
mTransportInfo->auth = false;
mTransportInfo->encryption = "ssl";
- QString serverport = transport.mid(7);
+ TQString serverport = transport.mid(7);
int colon = serverport.find(':');
if (colon != -1) {
mTransportInfo->host = serverport.left(colon);
@@ -877,7 +877,7 @@ void KMSender::setStatusByLink(const KMMessage *aMsg)
//=============================================================================
//=============================================================================
KMSendProc::KMSendProc( KMSender * sender )
- : QObject( 0 ),
+ : TQObject( 0 ),
mSender( sender ),
mLastErrorMessage(),
mSendOk( false ),
@@ -890,11 +890,11 @@ void KMSendProc::reset()
{
mSending = false;
mSendOk = false;
- mLastErrorMessage = QString::null;
+ mLastErrorMessage = TQString::null;
}
//-----------------------------------------------------------------------------
-void KMSendProc::failed(const QString &aMsg)
+void KMSendProc::failed(const TQString &aMsg)
{
mSending = false;
mSendOk = false;
@@ -902,7 +902,7 @@ void KMSendProc::failed(const QString &aMsg)
}
//-----------------------------------------------------------------------------
-void KMSendProc::statusMsg(const QString& aMsg)
+void KMSendProc::statusMsg(const TQString& aMsg)
{
if (mSender) mSender->setStatusMsg(aMsg);
}
@@ -927,8 +927,8 @@ bool KMSendSendmail::doStart() {
if (mSender->transportInfo()->host.isEmpty())
{
- const QString str = i18n("Please specify a mailer program in the settings.");
- const QString msg = i18n("Sending failed:\n%1\n"
+ const TQString str = i18n("Please specify a mailer program in the settings.");
+ const TQString msg = i18n("Sending failed:\n%1\n"
"The message will stay in the 'outbox' folder and will be resent.\n"
"Please remove it from there if you do not want the message to "
"be resent.\n"
@@ -943,12 +943,12 @@ bool KMSendSendmail::doStart() {
{
mMailerProc = new KProcess;
assert(mMailerProc != 0);
- connect(mMailerProc,SIGNAL(processExited(KProcess*)),
- this, SLOT(sendmailExited(KProcess*)));
- connect(mMailerProc,SIGNAL(wroteStdin(KProcess*)),
- this, SLOT(wroteStdin(KProcess*)));
- connect(mMailerProc,SIGNAL(receivedStderr(KProcess*,char*,int)),
- this, SLOT(receivedStderr(KProcess*, char*, int)));
+ connect(mMailerProc,TQT_SIGNAL(processExited(KProcess*)),
+ this, TQT_SLOT(sendmailExited(KProcess*)));
+ connect(mMailerProc,TQT_SIGNAL(wroteStdin(KProcess*)),
+ this, TQT_SLOT(wroteStdin(KProcess*)));
+ connect(mMailerProc,TQT_SIGNAL(receivedStderr(KProcess*,char*,int)),
+ this, TQT_SLOT(receivedStderr(KProcess*, char*, int)));
}
return true;
}
@@ -967,7 +967,7 @@ void KMSendSendmail::abort()
idle();
}
-bool KMSendSendmail::doSend( const QString & sender, const QStringList & to, const QStringList & cc, const QStringList & bcc, const QByteArray & message ) {
+bool KMSendSendmail::doSend( const TQString & sender, const TQStringList & to, const TQStringList & cc, const TQStringList & bcc, const TQByteArray & message ) {
mMailerProc->clearArguments();
*mMailerProc << mSender->transportInfo()->host
<< "-i" << "-f" << sender
@@ -1042,9 +1042,9 @@ KMSendSMTP::KMSendSMTP(KMSender *sender)
mJob(0),
mSlave(0)
{
- KIO::Scheduler::connect(SIGNAL(slaveError(KIO::Slave *, int,
- const QString &)), this, SLOT(slaveError(KIO::Slave *, int,
- const QString &)));
+ KIO::Scheduler::connect(TQT_SIGNAL(slaveError(KIO::Slave *, int,
+ const TQString &)), this, TQT_SLOT(slaveError(KIO::Slave *, int,
+ const TQString &)));
}
KMSendSMTP::~KMSendSMTP()
@@ -1052,11 +1052,11 @@ KMSendSMTP::~KMSendSMTP()
if (mJob) mJob->kill();
}
-bool KMSendSMTP::doSend( const QString & sender, const QStringList & to, const QStringList & cc, const QStringList & bcc, const QByteArray & message ) {
- QString query = "headers=0&from=";
+bool KMSendSMTP::doSend( const TQString & sender, const TQStringList & to, const TQStringList & cc, const TQStringList & bcc, const TQByteArray & message ) {
+ TQString query = "headers=0&from=";
query += KURL::encode_string( sender );
- QStringList::ConstIterator it;
+ TQStringList::ConstIterator it;
for ( it = to.begin(); it != to.end(); ++it )
query += "&to=" + KURL::encode_string(*it);
@@ -1081,8 +1081,8 @@ bool KMSendSMTP::doSend( const QString & sender, const QStringList & to, const Q
if (ti->auth)
{
- QMapIterator<QString,QString> tpc = mSender->mPasswdCache.find( ti->name );
- QString tpwd = ( tpc != mSender->mPasswdCache.end() )?(*tpc):QString::null;
+ TQMapIterator<TQString,TQString> tpc = mSender->mPasswdCache.find( ti->name );
+ TQString tpwd = ( tpc != mSender->mPasswdCache.end() )?(*tpc):TQString::null;
if ( ti->passwd().isEmpty() )
ti->setPasswd( tpwd );
@@ -1094,12 +1094,12 @@ bool KMSendSMTP::doSend( const QString & sender, const QStringList & to, const Q
int result;
KCursorSaver idle(KBusyPtr::idle());
- QString passwd = ti->passwd();
+ TQString passwd = ti->passwd();
result = KIO::PasswordDialog::getNameAndPassword(ti->user, passwd,
&b, i18n("You need to supply a username and a password to use this "
- "SMTP server."), false, QString::null, ti->name, QString::null);
+ "SMTP server."), false, TQString::null, ti->name, TQString::null);
- if ( result != QDialog::Accepted )
+ if ( result != TQDialog::Accepted )
{
abort();
return false;
@@ -1138,7 +1138,7 @@ bool KMSendSMTP::doSend( const QString & sender, const QStringList & to, const Q
if ( mMessageLength )
// allow +5% for subsequent LF->CRLF and dotstuffing (an average
// over 2G-lines gives an average line length of 42-43):
- query += "&size=" + QString::number( qRound( mMessageLength * 1.05 ) );
+ query += "&size=" + TQString::number( qRound( mMessageLength * 1.05 ) );
destination.setPath("/send");
destination.setQuery( query );
@@ -1150,9 +1150,9 @@ bool KMSendSMTP::doSend( const QString & sender, const QStringList & to, const Q
}
mJob->addMetaData( "lf2crlf+dotstuff", "slave" );
KIO::Scheduler::assignJobToSlave(mSlave, mJob);
- connect(mJob, SIGNAL(result(KIO::Job *)), this, SLOT(result(KIO::Job *)));
- connect(mJob, SIGNAL(dataReq(KIO::Job *, QByteArray &)),
- this, SLOT(dataReq(KIO::Job *, QByteArray &)));
+ connect(mJob, TQT_SIGNAL(result(KIO::Job *)), this, TQT_SLOT(result(KIO::Job *)));
+ connect(mJob, TQT_SIGNAL(dataReq(KIO::Job *, TQByteArray &)),
+ this, TQT_SLOT(dataReq(KIO::Job *, TQByteArray &)));
mSendOk = true;
mInProcess = true;
return true;
@@ -1184,7 +1184,7 @@ void KMSendSMTP::doFinish() {
cleanup();
}
-void KMSendSMTP::dataReq(KIO::Job *, QByteArray &array)
+void KMSendSMTP::dataReq(KIO::Job *, TQByteArray &array)
{
// Send it by 32K chuncks
const int chunkSize = QMIN( mMessageLength - mMessageOffset, 32*1024 );
@@ -1215,7 +1215,7 @@ void KMSendSMTP::result(KIO::Job *_job)
}
}
-void KMSendSMTP::slaveError(KIO::Slave *aSlave, int error, const QString &errorMsg)
+void KMSendSMTP::slaveError(KIO::Slave *aSlave, int error, const TQString &errorMsg)
{
if (aSlave == mSlave)
{
diff --git a/kmail/kmsender.h b/kmail/kmsender.h
index bf9864621..f97edfe80 100644
--- a/kmail/kmsender.h
+++ b/kmail/kmsender.h
@@ -27,11 +27,11 @@
# endif
#endif
-#include <qcstring.h>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qmap.h>
-#include <qobject.h>
+#include <tqcstring.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqmap.h>
+#include <tqobject.h>
#include <kdeversion.h>
class KMMessage;
@@ -50,7 +50,7 @@ namespace KPIM {
class ProgressItem;
}
-class KMSender: public QObject, public KMail::MessageSender
+class KMSender: public TQObject, public KMail::MessageSender
{
Q_OBJECT
friend class ::KMSendProc;
@@ -74,7 +74,7 @@ protected:
/** Send queued messages, using the specified transport or the
* default, if none is given.
*/
- bool doSendQueued( const QString& transport );
+ bool doSendQueued( const TQString& transport );
private:
/** Returns TRUE if sending is in progress. */
@@ -104,7 +104,7 @@ public:
private:
/** sets a status msg and emits statusMsg() */
- void setStatusMsg(const QString&);
+ void setStatusMsg(const TQString&);
/** sets replied/forwarded status in the linked message for @p aMsg. */
void setStatusByLink(const KMMessage *aMsg);
@@ -144,9 +144,9 @@ private:
/** Parse protocol '://' (host port? | mailer) string and
set transport settings */
- KMSendProc* createSendProcFromString( const QString & transport );
+ KMSendProc* createSendProcFromString( const TQString & transport );
- bool runPrecommand( const QString & cmd );
+ bool runPrecommand( const TQString & cmd );
private:
bool mSendImmediate;
@@ -154,11 +154,11 @@ private:
KMTransportInfo *mTransportInfo;
KMPrecommand *mPrecommand;
- QString mCustomTransport;
+ TQString mCustomTransport;
bool mSentOk, mSendAborted;
- QString mErrorMsg;
+ TQString mErrorMsg;
KMSendProc *mSendProc;
- QString mMethodStr;
+ TQString mMethodStr;
bool mSendProcStarted;
bool mSendInProgress;
KMFolder *mOutboxFolder;
@@ -168,7 +168,7 @@ private:
int mSentMessages, mTotalMessages;
int mSentBytes, mTotalBytes;
int mFailedMessages;
- QMap<QString,QString> mPasswdCache;
+ TQMap<TQString,TQString> mPasswdCache;
};
#endif /*kmsender_h*/
diff --git a/kmail/kmsender_p.h b/kmail/kmsender_p.h
index e9517974b..a842027a1 100644
--- a/kmail/kmsender_p.h
+++ b/kmail/kmsender_p.h
@@ -6,9 +6,9 @@
#define __KMAIL_SENDER_P_H__
#include "kmsender.h"
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qobject.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqobject.h>
#include <kio/global.h>
#include <kdeversion.h>
@@ -32,7 +32,7 @@ public:
void start() { emit started( doStart() ); }
/** Send given message. May return before message is sent. */
- bool send( const QString & sender, const QStringList & to, const QStringList & cc, const QStringList & bcc, const QByteArray & message ) {
+ bool send( const TQString & sender, const TQStringList & to, const TQStringList & cc, const TQStringList & bcc, const TQByteArray & message ) {
reset(); return doSend( sender, to, cc, bcc, message );
}
@@ -47,7 +47,7 @@ public:
bool sendOk() const { return mSendOk; }
/** Returns error message of last call of failed(). */
- QString lastErrorMessage() const { return mLastErrorMessage; }
+ TQString lastErrorMessage() const { return mLastErrorMessage; }
signals:
/** Emitted when the current message is sent or an error occurred. */
@@ -61,22 +61,22 @@ protected:
/** Called to signal a transmission error. The sender then
calls finish() and terminates sending of messages.
Sets mSending to FALSE. */
- void failed(const QString &msg);
+ void failed(const TQString &msg);
/** Informs the user about what is going on. */
- void statusMsg(const QString&);
+ void statusMsg(const TQString&);
private:
void reset();
private:
virtual void doFinish() = 0;
- virtual bool doSend( const QString & sender, const QStringList & to, const QStringList & cc, const QStringList & bcc, const QByteArray & message ) = 0;
+ virtual bool doSend( const TQString & sender, const TQStringList & to, const TQStringList & cc, const TQStringList & bcc, const TQByteArray & message ) = 0;
virtual bool doStart() = 0;
protected:
KMSender* mSender;
- QString mLastErrorMessage;
+ TQString mLastErrorMessage;
bool mSendOk : 1;
bool mSending : 1;
};
@@ -101,12 +101,12 @@ private:
/** implemented from KMSendProc */
void doFinish();
/** implemented from KMSendProc */
- bool doSend( const QString & sender, const QStringList & to, const QStringList & cc, const QStringList & bcc, const QByteArray & message );
+ bool doSend( const TQString & sender, const TQStringList & to, const TQStringList & cc, const TQStringList & bcc, const TQByteArray & message );
/** implemented from KMSendProc */
bool doStart();
private:
- QByteArray mMsgStr;
+ TQByteArray mMsgStr;
char* mMsgPos;
int mMsgRest;
KProcess* mMailerProc;
@@ -123,22 +123,22 @@ public:
void abort();
private slots:
- void dataReq(KIO::Job *, QByteArray &);
+ void dataReq(KIO::Job *, TQByteArray &);
void result(KIO::Job *);
- void slaveError(KIO::Slave *, int, const QString &);
+ void slaveError(KIO::Slave *, int, const TQString &);
private:
/** implemented from KMSendProc */
void doFinish();
/** implemented from KMSendProc */
- bool doSend( const QString & sender, const QStringList & to, const QStringList & cc, const QStringList & bcc, const QByteArray & message );
+ bool doSend( const TQString & sender, const TQStringList & to, const TQStringList & cc, const TQStringList & bcc, const TQByteArray & message );
/** implemented from KMSendProc */
bool doStart() { return true; }
void cleanup();
private:
- QByteArray mMessage;
+ TQByteArray mMessage;
uint mMessageLength;
uint mMessageOffset;
diff --git a/kmail/kmservertest.cpp b/kmail/kmservertest.cpp
index 49fb0ad8b..c184e6dfc 100644
--- a/kmail/kmservertest.cpp
+++ b/kmail/kmservertest.cpp
@@ -45,14 +45,14 @@
#include <kio/global.h>
//-----------------------------------------------------------------------------
-KMServerTest::KMServerTest( const QString & protocol, const QString & host, int port )
- : QObject(),
+KMServerTest::KMServerTest( const TQString & protocol, const TQString & host, int port )
+ : TQObject(),
mProtocol( protocol ), mHost( host ),
mSSL( false ), mJob( 0 ), mSlave( 0 ), mConnectionErrorCount( 0 )
{
KIO::Scheduler::connect(
- SIGNAL(slaveError(KIO::Slave *, int, const QString &)),
- this, SLOT(slotSlaveResult(KIO::Slave *, int, const QString &)));
+ TQT_SIGNAL(slaveError(KIO::Slave *, int, const TQString &)),
+ this, TQT_SLOT(slotSlaveResult(KIO::Slave *, int, const TQString &)));
if ( port == 993 || port == 995 || port == 465 )
port = 0;
@@ -85,29 +85,29 @@ void KMServerTest::startOffSlave( int port ) {
slotSlaveResult( 0, 1 );
return;
}
- connect( mSlave, SIGNAL(metaData(const KIO::MetaData&)),
- SLOT(slotMetaData(const KIO::MetaData&)) );
+ connect( mSlave, TQT_SIGNAL(metaData(const KIO::MetaData&)),
+ TQT_SLOT(slotMetaData(const KIO::MetaData&)) );
- QByteArray packedArgs;
- QDataStream stream( packedArgs, IO_WriteOnly );
+ TQByteArray packedArgs;
+ TQDataStream stream( packedArgs, IO_WriteOnly );
stream << (int) 'c';
mJob = KIO::special( url, packedArgs, false );
KIO::Scheduler::assignJobToSlave( mSlave, mJob );
- connect( mJob, SIGNAL(result(KIO::Job*)), SLOT(slotResult(KIO::Job*)) );
- connect( mJob, SIGNAL(infoMessage(KIO::Job*,const QString&)),
- SLOT(slotData(KIO::Job*,const QString&)) );
+ connect( mJob, TQT_SIGNAL(result(KIO::Job*)), TQT_SLOT(slotResult(KIO::Job*)) );
+ connect( mJob, TQT_SIGNAL(infoMessage(KIO::Job*,const TQString&)),
+ TQT_SLOT(slotData(KIO::Job*,const TQString&)) );
}
//-----------------------------------------------------------------------------
-void KMServerTest::slotData(KIO::Job *, const QString &data)
+void KMServerTest::slotData(KIO::Job *, const TQString &data)
{
if ( mSSL )
- mListSSL = QStringList::split(' ', data);
+ mListSSL = TQStringList::split(' ', data);
else
- mListNormal = QStringList::split(' ', data);
+ mListNormal = TQStringList::split(' ', data);
}
@@ -137,7 +137,7 @@ void KMServerTest::slotResult(KIO::Job *job)
//-----------------------------------------------------------------------------
void KMServerTest::slotSlaveResult(KIO::Slave *aSlave, int error,
- const QString &errorText)
+ const TQString &errorText)
{
if (aSlave != mSlave) return;
if ( mSSL && error == 0 ) {
diff --git a/kmail/kmservertest.h b/kmail/kmservertest.h
index d6ce9c2df..6c19da1ce 100644
--- a/kmail/kmservertest.h
+++ b/kmail/kmservertest.h
@@ -33,9 +33,9 @@
#ifndef kmservertest_h
#define kmservertest_h
-#include <qobject.h>
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqobject.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
namespace KIO {
class Job;
@@ -49,37 +49,37 @@ class KMServerTest : public QObject
Q_OBJECT
public:
- KMServerTest( const QString & protocol, const QString & host, int port );
+ KMServerTest( const TQString & protocol, const TQString & host, int port );
virtual ~KMServerTest();
signals:
- void capabilities( const QStringList & capaNormal,
- const QStringList & capaSSL );
- void capabilities( const QStringList & capaNormal,
- const QStringList & capaSSL,
- const QString & authNone, const QString & authSSL,
- const QString & authTLS );
+ void capabilities( const TQStringList & capaNormal,
+ const TQStringList & capaSSL );
+ void capabilities( const TQStringList & capaNormal,
+ const TQStringList & capaSSL,
+ const TQString & authNone, const TQString & authSSL,
+ const TQString & authTLS );
protected slots:
- void slotData(KIO::Job *job, const QString &data);
+ void slotData(KIO::Job *job, const TQString &data);
void slotResult(KIO::Job *job);
void slotMetaData( const KIO::MetaData & );
void slotSlaveResult(KIO::Slave *aSlave, int error,
- const QString &errorText = QString::null);
+ const TQString &errorText = TQString::null);
protected:
KIO::MetaData slaveConfig() const;
void startOffSlave( int port=0 );
protected:
- const QString mProtocol;
- const QString mHost;
+ const TQString mProtocol;
+ const TQString mHost;
bool mSSL;
- QStringList mListNormal;
- QStringList mListSSL;
- QString mAuthNone;
- QString mAuthSSL;
- QString mAuthTLS;
+ TQStringList mListNormal;
+ TQStringList mListSSL;
+ TQString mAuthNone;
+ TQString mAuthSSL;
+ TQString mAuthTLS;
KIO::SimpleJob *mJob;
KIO::Slave *mSlave;
int mConnectionErrorCount;
diff --git a/kmail/kmstartup.cpp b/kmail/kmstartup.cpp
index 5daf4ed02..f0a560e5c 100644
--- a/kmail/kmstartup.cpp
+++ b/kmail/kmstartup.cpp
@@ -41,7 +41,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
-#include <qfile.h>
+#include <tqfile.h>
#undef Status // stupid X headers
@@ -81,14 +81,14 @@ void kmsetSignalHandler(void (*handler)(int))
//-----------------------------------------------------------------------------
namespace {
- QString getMyHostName() {
+ TQString getMyHostName() {
char hostNameC[256];
// null terminate this C string
hostNameC[255] = 0;
// set the string to 0 length if gethostname fails
if(gethostname(hostNameC, 255))
hostNameC[0] = 0;
- return QString::fromLocal8Bit(hostNameC);
+ return TQString::fromLocal8Bit(hostNameC);
}
} // anon namespace
@@ -137,24 +137,24 @@ void checkConfigUpdates() {
void lockOrDie() {
// Check and create a lock file to prevent concurrent access to kmail files
- QString appName = kapp->instanceName();
+ TQString appName = kapp->instanceName();
if ( appName.isEmpty() )
appName = "kmail";
- QString programName;
+ TQString programName;
const KAboutData *about = kapp->aboutData();
if ( about )
programName = about->programName();
if ( programName.isEmpty() )
programName = i18n("KMail");
- QString lockLocation = locateLocal("data", "kmail/lock");
+ TQString lockLocation = locateLocal("data", "kmail/lock");
KSimpleConfig config(lockLocation);
int oldPid = config.readNumEntry("pid", -1);
- const QString oldHostName = config.readEntry("hostname");
- const QString oldAppName = config.readEntry( "appName", appName );
- const QString oldProgramName = config.readEntry( "programName", programName );
- const QString hostName = getMyHostName();
+ const TQString oldHostName = config.readEntry("hostname");
+ const TQString oldAppName = config.readEntry( "appName", appName );
+ const TQString oldProgramName = config.readEntry( "programName", programName );
+ const TQString hostName = getMyHostName();
bool first_instance = false;
if ( oldPid == -1 )
first_instance = true;
@@ -165,16 +165,16 @@ void lockOrDie() {
// On linux with /proc we can even check that it's really kmail and not something else
char path_buffer[MAXPATHLEN + 1];
path_buffer[MAXPATHLEN] = 0;
- const QString procPath = QString("/proc/%1/exe").arg(oldPid);
+ const TQString procPath = TQString("/proc/%1/exe").arg(oldPid);
const int length = readlink (procPath.latin1(), path_buffer, MAXPATHLEN);
if ( length == -1 ) // not such pid
first_instance = true;
else {
path_buffer[length] = '\0';
- const QString path = QFile::decodeName(path_buffer);
+ const TQString path = TQFile::decodeName(path_buffer);
kdDebug() << k_funcinfo << path << endl;
const int pos = path.findRev('/');
- const QString fileName = path.mid(pos+1);
+ const TQString fileName = path.mid(pos+1);
kdDebug() << "Found process " << oldPid << " running. It's: " << fileName << endl;
first_instance = fileName != "kmail" && fileName != "kontact";
}
@@ -189,7 +189,7 @@ void lockOrDie() {
}
if ( !first_instance ) {
- QString msg;
+ TQString msg;
if ( oldHostName == hostName ) {
// this can only happen if the user is running this application on
// different displays on the same machine. All other cases will be
@@ -200,8 +200,8 @@ void lockOrDie() {
"can cause the loss of mail. You should not start %1 "
"unless you are sure that it is not already running.")
.arg( programName, programName );
- // QString::arg( st ) only replaces the first occurrence of %1
- // with st while QString::arg( s1, s2 ) replacess all occurrences
+ // TQString::arg( st ) only replaces the first occurrence of %1
+ // with st while TQString::arg( s1, s2 ) replacess all occurrences
// of %1 with s1 and all occurrences of %2 with s2. So don't
// even think about changing the above to .arg( programName ).
else
@@ -228,7 +228,7 @@ void lockOrDie() {
KCursorSaver idle( KBusyPtr::idle() );
if ( KMessageBox::No ==
- KMessageBox::warningYesNo( 0, msg, QString::null,
+ KMessageBox::warningYesNo( 0, msg, TQString::null,
i18n("Start %1").arg( programName ),
i18n("Exit") ) ) {
exit(1);
@@ -261,7 +261,7 @@ void insertLibraryCataloguesAndIcons() {
void cleanup()
{
- const QString lockLocation = locateLocal("data", "kmail/lock");
+ const TQString lockLocation = locateLocal("data", "kmail/lock");
KSimpleConfig config(lockLocation);
config.writeEntry("pid", -1);
config.sync();
diff --git a/kmail/kmsystemtray.cpp b/kmail/kmsystemtray.cpp
index c8595a88f..4e6463c15 100644
--- a/kmail/kmsystemtray.cpp
+++ b/kmail/kmsystemtray.cpp
@@ -37,11 +37,11 @@ using KMail::AccountManager;
#include <kdebug.h>
#include <kpopupmenu.h>
-#include <qpainter.h>
-#include <qbitmap.h>
-#include <qtooltip.h>
-#include <qwidgetlist.h>
-#include <qobjectlist.h>
+#include <tqpainter.h>
+#include <tqbitmap.h>
+#include <tqtooltip.h>
+#include <tqwidgetlist.h>
+#include <tqobjectlist.h>
#include <math.h>
#include <assert.h>
@@ -57,7 +57,7 @@ using KMail::AccountManager;
* with its count of unread messages, allowing the user to jump
* to the first unread message in each folder.
*/
-KMSystemTray::KMSystemTray(QWidget *parent, const char *name)
+KMSystemTray::KMSystemTray(TQWidget *parent, const char *name)
: KSystemTray( parent, name ),
mParentVisible( true ),
mPosOfMainWin( 0, 0 ),
@@ -71,8 +71,8 @@ KMSystemTray::KMSystemTray(QWidget *parent, const char *name)
kdDebug(5006) << "Initting systray" << endl;
mLastUpdate = time( 0 );
- mUpdateTimer = new QTimer( this, "systraytimer" );
- connect( mUpdateTimer, SIGNAL( timeout() ), SLOT( updateNewMessages() ) );
+ mUpdateTimer = new TQTimer( this, "systraytimer" );
+ connect( mUpdateTimer, TQT_SIGNAL( timeout() ), TQT_SLOT( updateNewMessages() ) );
mDefaultIcon = loadIcon( "kmail" );
mLightIconImage = loadIcon( "kmaillight" ).convertToImage();
@@ -81,7 +81,7 @@ KMSystemTray::KMSystemTray(QWidget *parent, const char *name)
KMMainWidget * mainWidget = kmkernel->getKMMainWidget();
if ( mainWidget ) {
- QWidget * mainWin = mainWidget->topLevelWidget();
+ TQWidget * mainWin = mainWidget->topLevelWidget();
if ( mainWin ) {
mDesktopOfMainWin = KWin::windowInfo( mainWin->winId(),
NET::WMDesktop ).desktop();
@@ -95,13 +95,13 @@ KMSystemTray::KMSystemTray(QWidget *parent, const char *name)
/** Initiate connections between folders and this object */
foldersChanged();
- connect( kmkernel->folderMgr(), SIGNAL(changed()), SLOT(foldersChanged()));
- connect( kmkernel->imapFolderMgr(), SIGNAL(changed()), SLOT(foldersChanged()));
- connect( kmkernel->dimapFolderMgr(), SIGNAL(changed()), SLOT(foldersChanged()));
- connect( kmkernel->searchFolderMgr(), SIGNAL(changed()), SLOT(foldersChanged()));
+ connect( kmkernel->folderMgr(), TQT_SIGNAL(changed()), TQT_SLOT(foldersChanged()));
+ connect( kmkernel->imapFolderMgr(), TQT_SIGNAL(changed()), TQT_SLOT(foldersChanged()));
+ connect( kmkernel->dimapFolderMgr(), TQT_SIGNAL(changed()), TQT_SLOT(foldersChanged()));
+ connect( kmkernel->searchFolderMgr(), TQT_SIGNAL(changed()), TQT_SLOT(foldersChanged()));
- connect( kmkernel->acctMgr(), SIGNAL( checkedMail( bool, bool, const QMap<QString, int> & ) ),
- SLOT( updateNewMessages() ) );
+ connect( kmkernel->acctMgr(), TQT_SIGNAL( checkedMail( bool, bool, const TQMap<TQString, int> & ) ),
+ TQT_SLOT( updateNewMessages() ) );
}
void KMSystemTray::buildPopupMenu()
@@ -187,14 +187,14 @@ void KMSystemTray::updateCount()
int oldPixmapWidth = pixmap()->size().width();
int oldPixmapHeight = pixmap()->size().height();
- QString countString = QString::number( mCount );
- QFont countFont = KGlobalSettings::generalFont();
+ TQString countString = TQString::number( mCount );
+ TQFont countFont = KGlobalSettings::generalFont();
countFont.setBold(true);
// decrease the size of the font for the number of unread messages if the
// number doesn't fit into the available space
float countFontSize = countFont.pointSizeFloat();
- QFontMetrics qfm( countFont );
+ TQFontMetrics qfm( countFont );
int width = qfm.width( countString );
if( width > oldPixmapWidth )
{
@@ -208,31 +208,31 @@ void KMSystemTray::updateCount()
// reason text that is drawn on a transparent pixmap is invisible
// (apparently the alpha channel isn't changed when the text is drawn).
// Therefore I have to draw the text on a solid background and then remove
- // the background by making it transparent with QPixmap::setMask. This
+ // the background by making it transparent with TQPixmap::setMask. This
// involves the slow createHeuristicMask() function (from the API docs:
- // "This function is slow because it involves transformation to a QImage,
- // non-trivial computations and a transformation back to a QBitmap."). Then
- // I have to convert the resulting QPixmap to a QImage in order to overlay
+ // "This function is slow because it involves transformation to a TQImage,
+ // non-trivial computations and a transformation back to a TQBitmap."). Then
+ // I have to convert the resulting TQPixmap to a TQImage in order to overlay
// the light KMail icon with the number (because KIconEffect::overlay only
- // works with QImage). Finally the resulting QImage has to be converted
- // back to a QPixmap.
+ // works with TQImage). Finally the resulting TQImage has to be converted
+ // back to a TQPixmap.
// That's a lot of work for overlaying the KMail icon with the number of
// unread messages, but every other approach I tried failed miserably.
// IK, 2003-09-22
- QPixmap numberPixmap( oldPixmapWidth, oldPixmapHeight );
+ TQPixmap numberPixmap( oldPixmapWidth, oldPixmapHeight );
numberPixmap.fill( Qt::white );
- QPainter p( &numberPixmap );
+ TQPainter p( &numberPixmap );
p.setFont( countFont );
p.setPen( Qt::blue );
p.drawText( numberPixmap.rect(), Qt::AlignCenter, countString );
numberPixmap.setMask( numberPixmap.createHeuristicMask() );
- QImage numberImage = numberPixmap.convertToImage();
+ TQImage numberImage = numberPixmap.convertToImage();
// Overlay the light KMail icon with the number image
- QImage iconWithNumberImage = mLightIconImage.copy();
+ TQImage iconWithNumberImage = mLightIconImage.copy();
KIconEffect::overlay( iconWithNumberImage, numberImage );
- QPixmap iconWithNumber;
+ TQPixmap iconWithNumber;
iconWithNumber.convertFromImage( iconWithNumberImage );
setPixmap( iconWithNumber );
} else
@@ -259,30 +259,30 @@ void KMSystemTray::foldersChanged()
}
/** Disconnect all previous connections */
- disconnect(this, SLOT(updateNewMessageNotification(KMFolder *)));
+ disconnect(this, TQT_SLOT(updateNewMessageNotification(KMFolder *)));
- QStringList folderNames;
- QValueList<QGuardedPtr<KMFolder> > folderList;
+ TQStringList folderNames;
+ TQValueList<TQGuardedPtr<KMFolder> > folderList;
kmkernel->folderMgr()->createFolderList(&folderNames, &folderList);
kmkernel->imapFolderMgr()->createFolderList(&folderNames, &folderList);
kmkernel->dimapFolderMgr()->createFolderList(&folderNames, &folderList);
kmkernel->searchFolderMgr()->createFolderList(&folderNames, &folderList);
- QStringList::iterator strIt = folderNames.begin();
+ TQStringList::iterator strIt = folderNames.begin();
- for(QValueList<QGuardedPtr<KMFolder> >::iterator it = folderList.begin();
+ for(TQValueList<TQGuardedPtr<KMFolder> >::iterator it = folderList.begin();
it != folderList.end() && strIt != folderNames.end(); ++it, ++strIt)
{
KMFolder * currentFolder = *it;
- QString currentName = *strIt;
+ TQString currentName = *strIt;
if ( ((!currentFolder->isSystemFolder() || (currentFolder->name().lower() == "inbox")) ||
(currentFolder->folderType() == KMFolderTypeImap)) &&
!currentFolder->ignoreNewMail() )
{
/** If this is a new folder, start listening for messages */
- connect(currentFolder, SIGNAL(numUnreadMsgsChanged(KMFolder *)),
- this, SLOT(updateNewMessageNotification(KMFolder *)));
+ connect(currentFolder, TQT_SIGNAL(numUnreadMsgsChanged(KMFolder *)),
+ this, TQT_SLOT(updateNewMessageNotification(KMFolder *)));
/** Check all new folders to see if we started with any new messages */
updateNewMessageNotification(currentFolder);
@@ -294,7 +294,7 @@ void KMSystemTray::foldersChanged()
* On left mouse click, switch focus to the first KMMainWidget. On right
* click, bring up a list of all folders with a count of unread messages.
*/
-void KMSystemTray::mousePressEvent(QMouseEvent *e)
+void KMSystemTray::mousePressEvent(TQMouseEvent *e)
{
// switch to kmail on left mouse button
if( e->button() == LeftButton )
@@ -324,13 +324,13 @@ void KMSystemTray::mousePressEvent(QMouseEvent *e)
{
KPopupMenu *newMessagesPopup = new KPopupMenu();
- QMap<QGuardedPtr<KMFolder>, int>::Iterator it = mFoldersWithUnread.begin();
+ TQMap<TQGuardedPtr<KMFolder>, int>::Iterator it = mFoldersWithUnread.begin();
for(uint i=0; it != mFoldersWithUnread.end(); ++i)
{
kdDebug(5006) << "Adding folder" << endl;
mPopupFolders.append( it.key() );
- QString item = prettyName(it.key()) + " (" + QString::number(it.data()) + ")";
- newMessagesPopup->insertItem(item, this, SLOT(selectedAccount(int)), 0, i);
+ TQString item = prettyName(it.key()) + " (" + TQString::number(it.data()) + ")";
+ newMessagesPopup->insertItem(item, this, TQT_SLOT(selectedAccount(int)), 0, i);
++it;
}
@@ -349,9 +349,9 @@ void KMSystemTray::mousePressEvent(QMouseEvent *e)
* Return the name of the folder in which the mail is deposited, prepended
* with the account name if the folder is IMAP.
*/
-QString KMSystemTray::prettyName(KMFolder * fldr)
+TQString KMSystemTray::prettyName(KMFolder * fldr)
{
- QString rvalue = fldr->label();
+ TQString rvalue = fldr->label();
if(fldr->folderType() == KMFolderTypeImap)
{
KMFolderImap * imap = dynamic_cast<KMFolderImap*> (fldr->storage());
@@ -377,7 +377,7 @@ bool KMSystemTray::mainWindowIsOnCurrentDesktop()
if ( !mainWidget )
return false;
- QWidget *mainWin = kmkernel->getKMMainWidget()->topLevelWidget();
+ TQWidget *mainWin = kmkernel->getKMMainWidget()->topLevelWidget();
if ( !mainWin )
return false;
@@ -393,7 +393,7 @@ void KMSystemTray::showKMail()
{
if (!kmkernel->getKMMainWidget())
return;
- QWidget *mainWin = kmkernel->getKMMainWidget()->topLevelWidget();
+ TQWidget *mainWin = kmkernel->getKMMainWidget()->topLevelWidget();
assert(mainWin);
if(mainWin)
{
@@ -421,7 +421,7 @@ void KMSystemTray::hideKMail()
{
if (!kmkernel->getKMMainWidget())
return;
- QWidget *mainWin = kmkernel->getKMMainWidget()->topLevelWidget();
+ TQWidget *mainWin = kmkernel->getKMMainWidget()->topLevelWidget();
assert(mainWin);
if(mainWin)
{
@@ -464,7 +464,7 @@ void KMSystemTray::updateNewMessageNotification(KMFolder * fldr)
void KMSystemTray::updateNewMessages()
{
- for ( QMap<QGuardedPtr<KMFolder>, bool>::Iterator it = mPendingUpdates.begin();
+ for ( TQMap<TQGuardedPtr<KMFolder>, bool>::Iterator it = mPendingUpdates.begin();
it != mPendingUpdates.end(); ++it)
{
KMFolder *fldr = it.key();
@@ -474,7 +474,7 @@ void KMSystemTray::updateNewMessages()
/** The number of unread messages in that folder */
int unread = fldr->countUnread();
- QMap<QGuardedPtr<KMFolder>, int>::Iterator it =
+ TQMap<TQGuardedPtr<KMFolder>, int>::Iterator it =
mFoldersWithUnread.find(fldr);
bool unmapped = (it == mFoldersWithUnread.end());
@@ -526,7 +526,7 @@ void KMSystemTray::updateNewMessages()
if(mFoldersWithUnread.count() == 0)
{
mPopupFolders.clear();
- disconnect(this, SLOT(selectedAccount(int)));
+ disconnect(this, TQT_SLOT(selectedAccount(int)));
mCount = 0;
@@ -542,8 +542,8 @@ void KMSystemTray::updateNewMessages()
updateCount();
/** Update tooltip to reflect count of unread messages */
- QToolTip::remove(this);
- QToolTip::add(this, mCount == 0 ?
+ TQToolTip::remove(this);
+ TQToolTip::add(this, mCount == 0 ?
i18n("There are no unread messages")
: i18n("There is 1 unread message.",
"There are %n unread messages.",
@@ -575,7 +575,7 @@ void KMSystemTray::selectedAccount(int id)
if(!fldr) return;
KMFolderTree * ft = mainWidget->folderTree();
if(!ft) return;
- QListViewItem * fldrIdx = ft->indexOfFolder(fldr);
+ TQListViewItem * fldrIdx = ft->indexOfFolder(fldr);
if(!fldrIdx) return;
ft->setCurrentItem(fldrIdx);
diff --git a/kmail/kmsystemtray.h b/kmail/kmsystemtray.h
index 2d2e2bf61..4314ccfe1 100644
--- a/kmail/kmsystemtray.h
+++ b/kmail/kmsystemtray.h
@@ -20,11 +20,11 @@
#include <ksystemtray.h>
-#include <qmap.h>
-#include <qguardedptr.h>
-#include <qvaluevector.h>
-#include <qpixmap.h>
-#include <qimage.h>
+#include <tqmap.h>
+#include <tqguardedptr.h>
+#include <tqvaluevector.h>
+#include <tqpixmap.h>
+#include <tqimage.h>
#include <time.h>
@@ -43,7 +43,7 @@ class KMSystemTray : public KSystemTray
Q_OBJECT
public:
/** construtor */
- KMSystemTray(QWidget* parent=0, const char *name=0);
+ KMSystemTray(TQWidget* parent=0, const char *name=0);
/** destructor */
~KMSystemTray();
@@ -59,18 +59,18 @@ private slots:
void updateNewMessages();
protected:
- void mousePressEvent(QMouseEvent *);
+ void mousePressEvent(TQMouseEvent *);
bool mainWindowIsOnCurrentDesktop();
void showKMail();
void buildPopupMenu();
void updateCount();
- QString prettyName(KMFolder *);
+ TQString prettyName(KMFolder *);
private:
bool mParentVisible;
- QPoint mPosOfMainWin;
+ TQPoint mPosOfMainWin;
int mDesktopOfMainWin;
int mMode;
@@ -78,13 +78,13 @@ private:
int mNewMessagePopupId;
KPopupMenu * mPopupMenu;
- QPixmap mDefaultIcon;
- QImage mLightIconImage;
+ TQPixmap mDefaultIcon;
+ TQImage mLightIconImage;
- QValueVector<KMFolder*> mPopupFolders;
- QMap<QGuardedPtr<KMFolder>, int> mFoldersWithUnread;
- QMap<QGuardedPtr<KMFolder>, bool> mPendingUpdates;
- QTimer *mUpdateTimer;
+ TQValueVector<KMFolder*> mPopupFolders;
+ TQMap<TQGuardedPtr<KMFolder>, int> mFoldersWithUnread;
+ TQMap<TQGuardedPtr<KMFolder>, bool> mPendingUpdates;
+ TQTimer *mUpdateTimer;
time_t mLastUpdate;
};
diff --git a/kmail/kmtransport.cpp b/kmail/kmtransport.cpp
index 60e56d190..690329715 100644
--- a/kmail/kmtransport.cpp
+++ b/kmail/kmtransport.cpp
@@ -22,16 +22,16 @@
#include "kmtransport.h"
-#include <qbuttongroup.h>
-#include <qcheckbox.h>
-#include <qlayout.h>
+#include <tqbuttongroup.h>
+#include <tqcheckbox.h>
+#include <tqlayout.h>
#include <klineedit.h>
-#include <qradiobutton.h>
-#include <qtabwidget.h>
-#include <qvalidator.h>
-#include <qlabel.h>
-#include <qpushbutton.h>
-#include <qwhatsthis.h>
+#include <tqradiobutton.h>
+#include <tqtabwidget.h>
+#include <tqvalidator.h>
+#include <tqlabel.h>
+#include <tqpushbutton.h>
+#include <tqwhatsthis.h>
#include <kfiledialog.h>
#include <klocale.h>
@@ -67,7 +67,7 @@ KMTransportInfo::~KMTransportInfo()
void KMTransportInfo::readConfig(int id)
{
KConfig *config = KMKernel::config();
- KConfigGroupSaver saver(config, "Transport " + QString::number(id));
+ KConfigGroupSaver saver(config, "Transport " + TQString::number(id));
mId = config->readUnsignedNumEntry( "id", 0 );
type = config->readEntry("type", "smtp");
name = config->readEntry("name", i18n("Unnamed"));
@@ -106,7 +106,7 @@ void KMTransportInfo::readConfig(int id)
void KMTransportInfo::writeConfig(int id)
{
KConfig *config = KMKernel::config();
- KConfigGroupSaver saver(config, "Transport " + QString::number(id));
+ KConfigGroupSaver saver(config, "Transport " + TQString::number(id));
if (!mId)
mId = TransportManager::createId();
config->writeEntry("id", mId);
@@ -128,7 +128,7 @@ void KMTransportInfo::writeConfig(int id)
bool passwdStored = false;
Wallet *wallet = kmkernel->wallet();
if ( mPasswdDirty ) {
- if ( wallet && wallet->writePassword( "transport-" + QString::number(mId), passwd() ) == 0 ) {
+ if ( wallet && wallet->writePassword( "transport-" + TQString::number(mId), passwd() ) == 0 ) {
passwdStored = true;
mPasswdDirty = false;
mStorePasswdInConfig = false;
@@ -158,46 +158,46 @@ void KMTransportInfo::writeConfig(int id)
// delete already stored password if password storage is disabled
if ( !storePasswd() ) {
if ( !Wallet::keyDoesNotExist(
- Wallet::NetworkWallet(), "kmail", "transport-" + QString::number(mId) ) ) {
+ Wallet::NetworkWallet(), "kmail", "transport-" + TQString::number(mId) ) ) {
Wallet *wallet = kmkernel->wallet();
if ( wallet )
- wallet->removeEntry( "transport-" + QString::number(mId) );
+ wallet->removeEntry( "transport-" + TQString::number(mId) );
}
config->deleteEntry( "pass" );
}
}
-int KMTransportInfo::findTransport(const QString &name)
+int KMTransportInfo::findTransport(const TQString &name)
{
KConfig *config = KMKernel::config();
KConfigGroupSaver saver(config, "General");
int numTransports = config->readNumEntry("transports", 0);
for (int i = 1; i <= numTransports; i++)
{
- KConfigGroupSaver saver(config, "Transport " + QString::number(i));
+ KConfigGroupSaver saver(config, "Transport " + TQString::number(i));
if (config->readEntry("name") == name) return i;
}
return 0;
}
-QStringList KMTransportInfo::availableTransports()
+TQStringList KMTransportInfo::availableTransports()
{
- QStringList result;
+ TQStringList result;
KConfig *config = KMKernel::config();
KConfigGroupSaver saver(config, "General");
int numTransports = config->readNumEntry("transports", 0);
for (int i = 1; i <= numTransports; i++)
{
- KConfigGroupSaver saver(config, "Transport " + QString::number(i));
+ KConfigGroupSaver saver(config, "Transport " + TQString::number(i));
result.append(config->readEntry("name"));
}
return result;
}
-QString KMTransportInfo::passwd() const
+TQString KMTransportInfo::passwd() const
{
if ( auth && storePasswd() && mPasswd.isEmpty() )
readPassword();
@@ -205,7 +205,7 @@ QString KMTransportInfo::passwd() const
}
-void KMTransportInfo::setPasswd( const QString &passwd )
+void KMTransportInfo::setPasswd( const TQString &passwd )
{
if ( passwd != mPasswd ) {
mPasswd = passwd;
@@ -231,35 +231,35 @@ void KMTransportInfo::readPassword() const
// results for new entries without closing and reopening the wallet
if ( Wallet::isOpen( Wallet::NetworkWallet() ) ) {
Wallet* wallet = kmkernel->wallet();
- if ( !wallet || !wallet->hasEntry( "transport-" + QString::number(mId) ) )
+ if ( !wallet || !wallet->hasEntry( "transport-" + TQString::number(mId) ) )
return;
} else {
- if ( Wallet::keyDoesNotExist( Wallet::NetworkWallet(), "kmail", "transport-" + QString::number(mId) ) )
+ if ( Wallet::keyDoesNotExist( Wallet::NetworkWallet(), "kmail", "transport-" + TQString::number(mId) ) )
return;
}
if ( kmkernel->wallet() )
- kmkernel->wallet()->readPassword( "transport-" + QString::number(mId), mPasswd );
+ kmkernel->wallet()->readPassword( "transport-" + TQString::number(mId), mPasswd );
}
-KMTransportSelDlg::KMTransportSelDlg( QWidget *parent, const char *name,
+KMTransportSelDlg::KMTransportSelDlg( TQWidget *parent, const char *name,
bool modal )
: KDialogBase( parent, name, modal, i18n("Add Transport"), Ok|Cancel, Ok )
{
- QFrame *page = makeMainWidget();
- QVBoxLayout *topLayout = new QVBoxLayout( page, 0, spacingHint() );
+ TQFrame *page = makeMainWidget();
+ TQVBoxLayout *topLayout = new TQVBoxLayout( page, 0, spacingHint() );
- QButtonGroup *group = new QButtonGroup( i18n("Transport"), page );
- connect(group, SIGNAL(clicked(int)), SLOT(buttonClicked(int)) );
+ TQButtonGroup *group = new TQButtonGroup( i18n("Transport"), page );
+ connect(group, TQT_SIGNAL(clicked(int)), TQT_SLOT(buttonClicked(int)) );
topLayout->addWidget( group, 10 );
- QVBoxLayout *vlay = new QVBoxLayout( group, spacingHint()*2, spacingHint() );
+ TQVBoxLayout *vlay = new TQVBoxLayout( group, spacingHint()*2, spacingHint() );
vlay->addSpacing( fontMetrics().lineSpacing() );
- QRadioButton *radioButton1 = new QRadioButton( i18n("SM&TP"), group );
+ TQRadioButton *radioButton1 = new TQRadioButton( i18n("SM&TP"), group );
vlay->addWidget( radioButton1 );
- QRadioButton *radioButton2 = new QRadioButton( i18n("&Sendmail"), group );
+ TQRadioButton *radioButton2 = new TQRadioButton( i18n("&Sendmail"), group );
vlay->addWidget( radioButton2 );
vlay->addStretch( 10 );
@@ -280,9 +280,9 @@ int KMTransportSelDlg::selected( void ) const
}
-KMTransportDialog::KMTransportDialog( const QString & caption,
+KMTransportDialog::KMTransportDialog( const TQString & caption,
KMTransportInfo *transportInfo,
- QWidget *parent, const char *name,
+ TQWidget *parent, const char *name,
bool modal )
: KDialogBase( parent, name, modal, caption, Ok|Cancel, Ok, true ),
mServerTest( 0 ),
@@ -291,7 +291,7 @@ KMTransportDialog::KMTransportDialog( const QString & caption,
{
assert(transportInfo != 0);
- if( transportInfo->type == QString::fromLatin1("sendmail") )
+ if( transportInfo->type == TQString::fromLatin1("sendmail") )
{
makeSendmailPage();
} else {
@@ -309,109 +309,109 @@ KMTransportDialog::~KMTransportDialog()
void KMTransportDialog::makeSendmailPage()
{
- QFrame *page = makeMainWidget();
- QVBoxLayout *topLayout = new QVBoxLayout( page, 0, spacingHint() );
+ TQFrame *page = makeMainWidget();
+ TQVBoxLayout *topLayout = new TQVBoxLayout( page, 0, spacingHint() );
- mSendmail.titleLabel = new QLabel( page );
+ mSendmail.titleLabel = new TQLabel( page );
mSendmail.titleLabel->setText( i18n("Transport: Sendmail") );
- QFont titleFont( mSendmail.titleLabel->font() );
+ TQFont titleFont( mSendmail.titleLabel->font() );
titleFont.setBold( true );
mSendmail.titleLabel->setFont( titleFont );
topLayout->addWidget( mSendmail.titleLabel );
KSeparator *hline = new KSeparator( KSeparator::HLine, page);
topLayout->addWidget( hline );
- QGridLayout *grid = new QGridLayout( topLayout, 3, 3, spacingHint() );
+ TQGridLayout *grid = new TQGridLayout( topLayout, 3, 3, spacingHint() );
grid->addColSpacing( 1, fontMetrics().maxWidth()*15 );
grid->setRowStretch( 2, 10 );
grid->setColStretch( 1, 10 );
- QLabel *label = new QLabel( i18n("&Name:"), page );
+ TQLabel *label = new TQLabel( i18n("&Name:"), page );
grid->addWidget( label, 0, 0 );
mSendmail.nameEdit = new KLineEdit( page );
label->setBuddy( mSendmail.nameEdit );
grid->addWidget( mSendmail.nameEdit, 0, 1 );
- label = new QLabel( i18n("&Location:"), page );
+ label = new TQLabel( i18n("&Location:"), page );
grid->addWidget( label, 1, 0 );
mSendmail.locationEdit = new KLineEdit( page );
label->setBuddy(mSendmail.locationEdit);
grid->addWidget( mSendmail.locationEdit, 1, 1 );
mSendmail.chooseButton =
- new QPushButton( i18n("Choos&e..."), page );
- connect( mSendmail.chooseButton, SIGNAL(clicked()),
- this, SLOT(slotSendmailChooser()) );
+ new TQPushButton( i18n("Choos&e..."), page );
+ connect( mSendmail.chooseButton, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotSendmailChooser()) );
- connect( mSendmail.locationEdit, SIGNAL(textChanged ( const QString & )),
- this, SLOT(slotSendmailEditPath(const QString &)) );
+ connect( mSendmail.locationEdit, TQT_SIGNAL(textChanged ( const TQString & )),
+ this, TQT_SLOT(slotSendmailEditPath(const TQString &)) );
mSendmail.chooseButton->setAutoDefault( false );
grid->addWidget( mSendmail.chooseButton, 1, 2 );
slotSendmailEditPath(mSendmail.locationEdit->text());
}
-void KMTransportDialog::slotSendmailEditPath(const QString & _text)
+void KMTransportDialog::slotSendmailEditPath(const TQString & _text)
{
enableButtonOK( !_text.isEmpty() );
}
void KMTransportDialog::makeSmtpPage()
{
- QFrame *page = makeMainWidget();
- QVBoxLayout *topLayout = new QVBoxLayout( page, 0, spacingHint() );
+ TQFrame *page = makeMainWidget();
+ TQVBoxLayout *topLayout = new TQVBoxLayout( page, 0, spacingHint() );
- mSmtp.titleLabel = new QLabel( page );
+ mSmtp.titleLabel = new TQLabel( page );
mSmtp.titleLabel->setText( i18n("Transport: SMTP") );
- QFont titleFont( mSmtp.titleLabel->font() );
+ TQFont titleFont( mSmtp.titleLabel->font() );
titleFont.setBold( true );
mSmtp.titleLabel->setFont( titleFont );
topLayout->addWidget( mSmtp.titleLabel );
KSeparator *hline = new KSeparator( KSeparator::HLine, page);
topLayout->addWidget( hline );
- QTabWidget *tabWidget = new QTabWidget(page);
+ TQTabWidget *tabWidget = new TQTabWidget(page);
topLayout->addWidget( tabWidget );
- QWidget *page1 = new QWidget( tabWidget );
+ TQWidget *page1 = new TQWidget( tabWidget );
tabWidget->addTab( page1, i18n("&General") );
- QGridLayout *grid = new QGridLayout( page1, 14, 2, spacingHint() );
+ TQGridLayout *grid = new TQGridLayout( page1, 14, 2, spacingHint() );
grid->addColSpacing( 1, fontMetrics().maxWidth()*15 );
grid->setRowStretch( 13, 10 );
grid->setColStretch( 1, 10 );
- QLabel *label = new QLabel( i18n("&Name:"), page1 );
+ TQLabel *label = new TQLabel( i18n("&Name:"), page1 );
grid->addWidget( label, 0, 0 );
mSmtp.nameEdit = new KLineEdit( page1 );
- QWhatsThis::add(mSmtp.nameEdit,
+ TQWhatsThis::add(mSmtp.nameEdit,
i18n("The name that KMail will use when "
"referring to this server."));
label->setBuddy( mSmtp.nameEdit );
grid->addWidget( mSmtp.nameEdit, 0, 1 );
- label = new QLabel( i18n("&Host:"), page1 );
+ label = new TQLabel( i18n("&Host:"), page1 );
grid->addWidget( label, 3, 0 );
mSmtp.hostEdit = new KLineEdit( page1 );
- QWhatsThis::add(mSmtp.hostEdit,
+ TQWhatsThis::add(mSmtp.hostEdit,
i18n("The domain name or numerical address "
"of the SMTP server."));
label->setBuddy( mSmtp.hostEdit );
grid->addWidget( mSmtp.hostEdit, 3, 1 );
- label = new QLabel( i18n("&Port:"), page1 );
+ label = new TQLabel( i18n("&Port:"), page1 );
grid->addWidget( label, 4, 0 );
mSmtp.portEdit = new KLineEdit( page1 );
- mSmtp.portEdit->setValidator( new QIntValidator(this) );
- QWhatsThis::add(mSmtp.portEdit,
+ mSmtp.portEdit->setValidator( new TQIntValidator(this) );
+ TQWhatsThis::add(mSmtp.portEdit,
i18n("The port number that the SMTP server "
"is listening on. The default port is 25."));
label->setBuddy( mSmtp.portEdit );
grid->addWidget( mSmtp.portEdit, 4, 1 );
- label = new QLabel( i18n("Preco&mmand:"), page1 );
+ label = new TQLabel( i18n("Preco&mmand:"), page1 );
grid->addWidget( label, 5, 0 );
mSmtp.precommand = new KLineEdit( page1 );
- QWhatsThis::add(mSmtp.precommand,
+ TQWhatsThis::add(mSmtp.precommand,
i18n("A command to run locally, prior "
"to sending email. This can be used "
"to set up ssh tunnels, for example. "
@@ -419,43 +419,43 @@ void KMTransportDialog::makeSmtpPage()
label->setBuddy(mSmtp.precommand);
grid->addWidget( mSmtp.precommand, 5, 1 );
- QFrame* line = new QFrame( page1 );
- line->setFrameStyle( QFrame::HLine | QFrame::Plain );
+ TQFrame* line = new TQFrame( page1 );
+ line->setFrameStyle( TQFrame::HLine | TQFrame::Plain );
grid->addMultiCellWidget( line, 6, 6, 0, 1 );
mSmtp.authCheck =
- new QCheckBox( i18n("Server &requires authentication"), page1 );
- QWhatsThis::add(mSmtp.authCheck,
+ new TQCheckBox( i18n("Server &requires authentication"), page1 );
+ TQWhatsThis::add(mSmtp.authCheck,
i18n("Check this option if your SMTP server "
"requires authentication before accepting "
"mail. This is known as "
"'Authenticated SMTP' or simply ASMTP."));
- connect(mSmtp.authCheck, SIGNAL(clicked()),
- SLOT(slotRequiresAuthClicked()));
+ connect(mSmtp.authCheck, TQT_SIGNAL(clicked()),
+ TQT_SLOT(slotRequiresAuthClicked()));
grid->addMultiCellWidget( mSmtp.authCheck, 7, 7, 0, 1 );
- mSmtp.loginLabel = new QLabel( i18n("&Login:"), page1 );
+ mSmtp.loginLabel = new TQLabel( i18n("&Login:"), page1 );
grid->addWidget( mSmtp.loginLabel, 8, 0 );
mSmtp.loginEdit = new KLineEdit( page1 );
mSmtp.loginLabel->setBuddy( mSmtp.loginEdit );
- QWhatsThis::add(mSmtp.loginEdit,
+ TQWhatsThis::add(mSmtp.loginEdit,
i18n("The user name to send to the server "
"for authorization"));
grid->addWidget( mSmtp.loginEdit, 8, 1 );
- mSmtp.passwordLabel = new QLabel( i18n("P&assword:"), page1 );
+ mSmtp.passwordLabel = new TQLabel( i18n("P&assword:"), page1 );
grid->addWidget( mSmtp.passwordLabel, 9, 0 );
mSmtp.passwordEdit = new KLineEdit( page1 );
- mSmtp.passwordEdit->setEchoMode( QLineEdit::Password );
+ mSmtp.passwordEdit->setEchoMode( TQLineEdit::Password );
mSmtp.passwordLabel->setBuddy( mSmtp.passwordEdit );
- QWhatsThis::add(mSmtp.passwordEdit,
+ TQWhatsThis::add(mSmtp.passwordEdit,
i18n("The password to send to the server "
"for authorization"));
grid->addWidget( mSmtp.passwordEdit, 9, 1 );
mSmtp.storePasswordCheck =
- new QCheckBox( i18n("&Store SMTP password"), page1 );
- QWhatsThis::add(mSmtp.storePasswordCheck,
+ new TQCheckBox( i18n("&Store SMTP password"), page1 );
+ TQWhatsThis::add(mSmtp.storePasswordCheck,
i18n("Check this option to have KMail store "
"the password.\nIf KWallet is available "
"the password will be stored there which is considered "
@@ -467,14 +467,14 @@ void KMTransportDialog::makeSmtpPage()
"if access to the configuration file is obtained."));
grid->addMultiCellWidget( mSmtp.storePasswordCheck, 10, 10, 0, 1 );
- line = new QFrame( page1 );
- line->setFrameStyle( QFrame::HLine | QFrame::Plain );
+ line = new TQFrame( page1 );
+ line->setFrameStyle( TQFrame::HLine | TQFrame::Plain );
grid->addMultiCellWidget( line, 11, 11, 0, 1 );
mSmtp.specifyHostnameCheck =
- new QCheckBox( i18n("Sen&d custom hostname to server"), page1 );
+ new TQCheckBox( i18n("Sen&d custom hostname to server"), page1 );
grid->addMultiCellWidget( mSmtp.specifyHostnameCheck, 12, 12, 0, 1 );
- QWhatsThis::add(mSmtp.specifyHostnameCheck,
+ TQWhatsThis::add(mSmtp.specifyHostnameCheck,
i18n("Check this option to have KMail use "
"a custom hostname when identifying itself "
"to the mail server."
@@ -482,46 +482,46 @@ void KMTransportDialog::makeSmtpPage()
"may not be set correctly or to mask your "
"system's true hostname."));
- mSmtp.localHostnameLabel = new QLabel( i18n("Hos&tname:"), page1 );
+ mSmtp.localHostnameLabel = new TQLabel( i18n("Hos&tname:"), page1 );
grid->addWidget( mSmtp.localHostnameLabel, 13, 0);
mSmtp.localHostnameEdit = new KLineEdit( page1 );
- QWhatsThis::add(mSmtp.localHostnameEdit,
+ TQWhatsThis::add(mSmtp.localHostnameEdit,
i18n("Enter the hostname KMail should use when "
"identifying itself to the server."));
mSmtp.localHostnameLabel->setBuddy( mSmtp.localHostnameEdit );
grid->addWidget( mSmtp.localHostnameEdit, 13, 1 );
- connect( mSmtp.specifyHostnameCheck, SIGNAL(toggled(bool)),
- mSmtp.localHostnameEdit, SLOT(setEnabled(bool)));
- connect( mSmtp.specifyHostnameCheck, SIGNAL(toggled(bool)),
- mSmtp.localHostnameLabel, SLOT(setEnabled(bool)));
+ connect( mSmtp.specifyHostnameCheck, TQT_SIGNAL(toggled(bool)),
+ mSmtp.localHostnameEdit, TQT_SLOT(setEnabled(bool)));
+ connect( mSmtp.specifyHostnameCheck, TQT_SIGNAL(toggled(bool)),
+ mSmtp.localHostnameLabel, TQT_SLOT(setEnabled(bool)));
- QWidget *page2 = new QWidget( tabWidget );
+ TQWidget *page2 = new TQWidget( tabWidget );
tabWidget->addTab( page2, i18n("S&ecurity") );
- QVBoxLayout *vlay = new QVBoxLayout( page2, spacingHint() );
- mSmtp.encryptionGroup = new QButtonGroup( 1, Qt::Horizontal,
+ TQVBoxLayout *vlay = new TQVBoxLayout( page2, spacingHint() );
+ mSmtp.encryptionGroup = new TQButtonGroup( 1, Qt::Horizontal,
i18n("Encryption"), page2 );
mSmtp.encryptionNone =
- new QRadioButton( i18n("&None"), mSmtp.encryptionGroup );
+ new TQRadioButton( i18n("&None"), mSmtp.encryptionGroup );
mSmtp.encryptionSSL =
- new QRadioButton( i18n("&SSL"), mSmtp.encryptionGroup );
+ new TQRadioButton( i18n("&SSL"), mSmtp.encryptionGroup );
mSmtp.encryptionTLS =
- new QRadioButton( i18n("&TLS"), mSmtp.encryptionGroup );
- connect(mSmtp.encryptionGroup, SIGNAL(clicked(int)),
- SLOT(slotSmtpEncryptionChanged(int)));
+ new TQRadioButton( i18n("&TLS"), mSmtp.encryptionGroup );
+ connect(mSmtp.encryptionGroup, TQT_SIGNAL(clicked(int)),
+ TQT_SLOT(slotSmtpEncryptionChanged(int)));
vlay->addWidget( mSmtp.encryptionGroup );
- mSmtp.authGroup = new QButtonGroup( 1, Qt::Horizontal,
+ mSmtp.authGroup = new TQButtonGroup( 1, Qt::Horizontal,
i18n("Authentication Method"), page2 );
- mSmtp.authLogin = new QRadioButton( i18n("Please translate this "
+ mSmtp.authLogin = new TQRadioButton( i18n("Please translate this "
"authentication method only if you have a good reason", "&LOGIN"),
mSmtp.authGroup );
- mSmtp.authPlain = new QRadioButton( i18n("Please translate this "
+ mSmtp.authPlain = new TQRadioButton( i18n("Please translate this "
"authentication method only if you have a good reason", "&PLAIN"),
mSmtp.authGroup );
- mSmtp.authCramMd5 = new QRadioButton( i18n("CRAM-MD&5"), mSmtp.authGroup );
- mSmtp.authDigestMd5 = new QRadioButton( i18n("&DIGEST-MD5"), mSmtp.authGroup );
- mSmtp.authNTLM = new QRadioButton( i18n("&NTLM"), mSmtp.authGroup );
- mSmtp.authGSSAPI = new QRadioButton( i18n("&GSSAPI"), mSmtp.authGroup );
+ mSmtp.authCramMd5 = new TQRadioButton( i18n("CRAM-MD&5"), mSmtp.authGroup );
+ mSmtp.authDigestMd5 = new TQRadioButton( i18n("&DIGEST-MD5"), mSmtp.authGroup );
+ mSmtp.authNTLM = new TQRadioButton( i18n("&NTLM"), mSmtp.authGroup );
+ mSmtp.authGSSAPI = new TQRadioButton( i18n("&GSSAPI"), mSmtp.authGroup );
if ( KProtocolInfo::capabilities("smtp").contains("SASL") == 0 ) {
mSmtp.authNTLM->hide();
mSmtp.authGSSAPI->hide();
@@ -530,11 +530,11 @@ void KMTransportDialog::makeSmtpPage()
vlay->addStretch();
- QHBoxLayout *buttonLay = new QHBoxLayout( vlay );
+ TQHBoxLayout *buttonLay = new TQHBoxLayout( vlay );
mSmtp.checkCapabilities =
- new QPushButton( i18n("Check &What the Server Supports"), page2 );
- connect(mSmtp.checkCapabilities, SIGNAL(clicked()),
- SLOT(slotCheckSmtpCapabilities()));
+ new TQPushButton( i18n("Check &What the Server Supports"), page2 );
+ connect(mSmtp.checkCapabilities, TQT_SIGNAL(clicked()),
+ TQT_SLOT(slotCheckSmtpCapabilities()));
buttonLay->addStretch();
buttonLay->addWidget( mSmtp.checkCapabilities );
}
@@ -615,10 +615,10 @@ void KMTransportDialog::saveSettings()
void KMTransportDialog::slotSendmailChooser()
{
- KFileDialog dialog("/", QString::null, this, 0, true );
+ KFileDialog dialog("/", TQString::null, this, 0, true );
dialog.setCaption(i18n("Choose sendmail Location") );
- if( dialog.exec() == QDialog::Accepted )
+ if( dialog.exec() == TQDialog::Accepted )
{
KURL url = dialog.selectedURL();
if( url.isEmpty() == true )
@@ -657,7 +657,7 @@ void KMTransportDialog::slotSmtpEncryptionChanged(int id)
mSmtp.portEdit->setText((id == SSL) ? "465" : "25");
// switch supported auth methods:
- QButton * old = mSmtp.authGroup->selected();
+ TQButton * old = mSmtp.authGroup->selected();
int authMethods = id == TLS ? mAuthTLS : id == SSL ? mAuthSSL : mAuthNone ;
enableAuthMethods( authMethods );
if ( !old->isEnabled() )
@@ -677,10 +677,10 @@ void KMTransportDialog::enableAuthMethods( unsigned int auth ) {
mSmtp.authGSSAPI->setEnabled( auth & GSSAPI );
}
-unsigned int KMTransportDialog::authMethodsFromString( const QString & s ) {
+unsigned int KMTransportDialog::authMethodsFromString( const TQString & s ) {
unsigned int result = 0;
- QStringList sl = QStringList::split( '\n', s.upper() );
- for ( QStringList::const_iterator it = sl.begin() ; it != sl.end() ; ++it )
+ TQStringList sl = TQStringList::split( '\n', s.upper() );
+ for ( TQStringList::const_iterator it = sl.begin() ; it != sl.end() ; ++it )
if ( *it == "SASL/LOGIN" )
result |= LOGIN;
else if ( *it == "SASL/PLAIN" )
@@ -696,9 +696,9 @@ unsigned int KMTransportDialog::authMethodsFromString( const QString & s ) {
return result;
}
-unsigned int KMTransportDialog::authMethodsFromStringList( const QStringList & sl ) {
+unsigned int KMTransportDialog::authMethodsFromStringList( const TQStringList & sl ) {
unsigned int result = 0;
- for ( QStringList::const_iterator it = sl.begin() ; it != sl.end() ; ++it )
+ for ( TQStringList::const_iterator it = sl.begin() ; it != sl.end() ; ++it )
if ( *it == "LOGIN" )
result |= LOGIN;
else if ( *it == "PLAIN" )
@@ -720,22 +720,22 @@ void KMTransportDialog::slotCheckSmtpCapabilities()
mServerTest = new KMServerTest(SMTP_PROTOCOL, mSmtp.hostEdit->text(),
mSmtp.portEdit->text().toInt());
connect( mServerTest,
- SIGNAL( capabilities( const QStringList &, const QStringList &,
- const QString &, const QString &,
- const QString & )),
+ TQT_SIGNAL( capabilities( const TQStringList &, const TQStringList &,
+ const TQString &, const TQString &,
+ const TQString & )),
this,
- SLOT( slotSmtpCapabilities( const QStringList &,
- const QStringList &, const QString &,
- const QString &, const QString & ) ) );
+ TQT_SLOT( slotSmtpCapabilities( const TQStringList &,
+ const TQStringList &, const TQString &,
+ const TQString &, const TQString & ) ) );
mSmtp.checkCapabilities->setEnabled(false);
}
-void KMTransportDialog::checkHighest(QButtonGroup *btnGroup)
+void KMTransportDialog::checkHighest(TQButtonGroup *btnGroup)
{
for ( int i = btnGroup->count() - 1; i >= 0 ; --i )
{
- QButton * btn = btnGroup->find(i);
+ TQButton * btn = btnGroup->find(i);
if (btn && btn->isEnabled())
{
btn->animateClick();
@@ -745,11 +745,11 @@ void KMTransportDialog::checkHighest(QButtonGroup *btnGroup)
}
-void KMTransportDialog::slotSmtpCapabilities( const QStringList & capaNormal,
- const QStringList & capaSSL,
- const QString & authNone,
- const QString & authSSL,
- const QString & authTLS )
+void KMTransportDialog::slotSmtpCapabilities( const TQStringList & capaNormal,
+ const TQStringList & capaSSL,
+ const TQString & authNone,
+ const TQString & authSSL,
+ const TQString & authTLS )
{
mSmtp.checkCapabilities->setEnabled( true );
kdDebug(5006) << "KMTransportDialog::slotSmtpCapabilities( ..., "
@@ -783,7 +783,7 @@ bool KMTransportDialog::sanityCheckSmtpInput()
// FIXME: add additional checks for all fields that needs it
// this is only the beginning
if ( mSmtp.hostEdit->text().isEmpty() ) {
- QString errorMsg = i18n("The Host field cannot be empty. Please "
+ TQString errorMsg = i18n("The Host field cannot be empty. Please "
"enter the name or the IP address of the SMTP server.");
KMessageBox::sorry( this, errorMsg, i18n("Invalid Hostname or Address") );
return false;
diff --git a/kmail/kmtransport.h b/kmail/kmtransport.h
index 3f4c57a37..a71541fe1 100644
--- a/kmail/kmtransport.h
+++ b/kmail/kmtransport.h
@@ -36,13 +36,13 @@ public:
virtual ~KMTransportInfo();
void readConfig(int id);
void writeConfig(int id);
- static int findTransport(const QString &name);
- static QStringList availableTransports();
+ static int findTransport(const TQString &name);
+ static TQStringList availableTransports();
uint id() const { return mId; }
/** Get/set password for this account */
- QString passwd() const;
- void setPasswd( const QString& passwd );
+ TQString passwd() const;
+ void setPasswd( const TQString& passwd );
/** Get/set password storage flag */
bool storePasswd() const { return mStorePasswd; }
@@ -51,12 +51,12 @@ public:
/** Read password from wallet */
void readPassword() const;
- QString type, name, host, port, user, precommand, encryption, authType;
- QString localHostname;
+ TQString type, name, host, port, user, precommand, encryption, authType;
+ TQString localHostname;
bool auth, specifyHostname;
private:
- mutable QString mPasswd;
+ mutable TQString mPasswd;
bool mPasswdDirty, mStorePasswd, mStorePasswdInConfig;
uint mId;
};
@@ -66,7 +66,7 @@ class KMTransportSelDlg : public KDialogBase
Q_OBJECT
public:
- KMTransportSelDlg( QWidget *parent=0, const char *name=0, bool modal=TRUE );
+ KMTransportSelDlg( TQWidget *parent=0, const char *name=0, bool modal=TRUE );
int selected() const;
private slots:
@@ -81,8 +81,8 @@ class KMTransportDialog : public KDialogBase
Q_OBJECT
public:
- KMTransportDialog( const QString & caption, KMTransportInfo *transportInfo,
- QWidget *parent=0, const char *name=0, bool modal=TRUE );
+ KMTransportDialog( const TQString & caption, KMTransportInfo *transportInfo,
+ TQWidget *parent=0, const char *name=0, bool modal=TRUE );
virtual ~KMTransportDialog();
private slots:
@@ -91,57 +91,57 @@ private slots:
void slotRequiresAuthClicked();
void slotSmtpEncryptionChanged(int);
void slotCheckSmtpCapabilities();
- void slotSmtpCapabilities( const QStringList &, const QStringList &,
- const QString &, const QString &,
- const QString & );
- void slotSendmailEditPath(const QString &);
+ void slotSmtpCapabilities( const TQStringList &, const TQStringList &,
+ const TQString &, const TQString &,
+ const TQString & );
+ void slotSendmailEditPath(const TQString &);
private:
struct SendmailWidgets
{
- QLabel *titleLabel;
- QLineEdit *nameEdit;
- QLineEdit *locationEdit;
- QPushButton *chooseButton;
+ TQLabel *titleLabel;
+ TQLineEdit *nameEdit;
+ TQLineEdit *locationEdit;
+ TQPushButton *chooseButton;
};
struct SmtpWidgets
{
- QLabel *titleLabel;
- QLineEdit *nameEdit;
- QLineEdit *hostEdit;
- QLineEdit *portEdit;
- QCheckBox *authCheck;
- QLabel *loginLabel;
- QLineEdit *loginEdit;
- QLabel *passwordLabel;
- QLineEdit *passwordEdit;
- QLineEdit *precommand;
- QButtonGroup *encryptionGroup;
- QRadioButton *encryptionNone;
- QRadioButton *encryptionSSL;
- QRadioButton *encryptionTLS;
- QButtonGroup *authGroup;
- QRadioButton *authPlain;
- QRadioButton *authLogin;
- QRadioButton *authCramMd5;
- QRadioButton *authDigestMd5;
- QRadioButton *authNTLM;
- QRadioButton *authGSSAPI;
- QPushButton *checkCapabilities;
- QCheckBox *storePasswordCheck;
- QCheckBox *specifyHostnameCheck;
- QLineEdit *localHostnameEdit;
- QLabel *localHostnameLabel;
+ TQLabel *titleLabel;
+ TQLineEdit *nameEdit;
+ TQLineEdit *hostEdit;
+ TQLineEdit *portEdit;
+ TQCheckBox *authCheck;
+ TQLabel *loginLabel;
+ TQLineEdit *loginEdit;
+ TQLabel *passwordLabel;
+ TQLineEdit *passwordEdit;
+ TQLineEdit *precommand;
+ TQButtonGroup *encryptionGroup;
+ TQRadioButton *encryptionNone;
+ TQRadioButton *encryptionSSL;
+ TQRadioButton *encryptionTLS;
+ TQButtonGroup *authGroup;
+ TQRadioButton *authPlain;
+ TQRadioButton *authLogin;
+ TQRadioButton *authCramMd5;
+ TQRadioButton *authDigestMd5;
+ TQRadioButton *authNTLM;
+ TQRadioButton *authGSSAPI;
+ TQPushButton *checkCapabilities;
+ TQCheckBox *storePasswordCheck;
+ TQCheckBox *specifyHostnameCheck;
+ TQLineEdit *localHostnameEdit;
+ TQLabel *localHostnameLabel;
};
void makeSendmailPage();
void makeSmtpPage();
void setupSettings();
void saveSettings();
- void checkHighest( QButtonGroup * );
+ void checkHighest( TQButtonGroup * );
void enableAuthMethods( unsigned int which );
bool sanityCheckSmtpInput();
- static unsigned int authMethodsFromString( const QString & s );
- static unsigned int authMethodsFromStringList( const QStringList & sl );
+ static unsigned int authMethodsFromString( const TQString & s );
+ static unsigned int authMethodsFromStringList( const TQStringList & sl );
KMServerTest *mServerTest;
SmtpWidgets mSmtp;
diff --git a/kmail/korghelper.cpp b/kmail/korghelper.cpp
index 57968bd93..789d85ea7 100644
--- a/kmail/korghelper.cpp
+++ b/kmail/korghelper.cpp
@@ -27,20 +27,20 @@
void KMail::KorgHelper::ensureRunning()
{
- QString error;
- QCString dcopService;
- int result = KDCOPServiceStarter::self()->findServiceFor( "DCOP/Organizer", QString::null, QString::null, &error, &dcopService );
+ TQString error;
+ TQCString dcopService;
+ int result = KDCOPServiceStarter::self()->findServiceFor( "DCOP/Organizer", TQString::null, TQString::null, &error, &dcopService );
if ( result == 0 ) {
// OK, so korganizer (or kontact) is running. Now ensure the object we want is available
// [that's not the case when kontact was already running, but korganizer not loaded into it...]
static const char* const dcopObjectId = "KOrganizerIface";
- QCString dummy;
- if ( !kapp->dcopClient()->findObject( dcopService, dcopObjectId, "", QByteArray(), dummy, dummy ) ) {
+ TQCString dummy;
+ if ( !kapp->dcopClient()->findObject( dcopService, dcopObjectId, "", TQByteArray(), dummy, dummy ) ) {
DCOPRef ref( dcopService, dcopService ); // talk to the KUniqueApplication or its kontact wrapper
DCOPReply reply = ref.call( "load()" );
if ( reply.isValid() && (bool)reply ) {
kdDebug() << "Loaded " << dcopService << " successfully" << endl;
- Q_ASSERT( kapp->dcopClient()->findObject( dcopService, dcopObjectId, "", QByteArray(), dummy, dummy ) );
+ Q_ASSERT( kapp->dcopClient()->findObject( dcopService, dcopObjectId, "", TQByteArray(), dummy, dummy ) );
} else
kdWarning() << "Error loading " << dcopService << endl;
}
diff --git a/kmail/kwindowpositioner.cpp b/kmail/kwindowpositioner.cpp
index c99ab7c0b..fefbdde2c 100644
--- a/kmail/kwindowpositioner.cpp
+++ b/kmail/kwindowpositioner.cpp
@@ -23,18 +23,18 @@
#include <kdebug.h>
-#include <qwidget.h>
+#include <tqwidget.h>
-KWindowPositioner::KWindowPositioner( QWidget *master, QWidget *slave,
+KWindowPositioner::KWindowPositioner( TQWidget *master, TQWidget *slave,
Mode mode )
- : QObject( master ), mMaster( master ), mSlave( slave ), mMode( mode )
+ : TQObject( master ), mMaster( master ), mSlave( slave ), mMode( mode )
{
master->topLevelWidget()->installEventFilter( this );
}
-bool KWindowPositioner::eventFilter( QObject *, QEvent *e )
+bool KWindowPositioner::eventFilter( TQObject *, TQEvent *e )
{
- if ( e->type() == QEvent::Move ) {
+ if ( e->type() == TQEvent::Move ) {
reposition();
}
@@ -43,16 +43,16 @@ bool KWindowPositioner::eventFilter( QObject *, QEvent *e )
void KWindowPositioner::reposition()
{
- QPoint relativePos;
+ TQPoint relativePos;
if ( mMode == Right ) {
- relativePos = QPoint( mMaster->width(), -100 );
+ relativePos = TQPoint( mMaster->width(), -100 );
} else if ( mMode == Bottom ) {
- relativePos = QPoint( 100 - mSlave->width() + mMaster->width(),
+ relativePos = TQPoint( 100 - mSlave->width() + mMaster->width(),
mMaster->height() );
} else {
kdError() << "KWindowPositioner: Illegal mode" << endl;
}
- QPoint pos = mMaster->mapToGlobal( relativePos );
+ TQPoint pos = mMaster->mapToGlobal( relativePos );
mSlave->move( pos );
mSlave->raise();
}
diff --git a/kmail/kwindowpositioner.h b/kmail/kwindowpositioner.h
index 1b5ad97de..d85f5ceec 100644
--- a/kmail/kwindowpositioner.h
+++ b/kmail/kwindowpositioner.h
@@ -21,7 +21,7 @@
#ifndef KWINDOWPOSITIONER_H
#define KWINDOWPOSITIONER_H
-#include <qobject.h>
+#include <tqobject.h>
class QWindow;
@@ -31,15 +31,15 @@ class KWindowPositioner : public QObject
public:
enum Mode { Right, Bottom };
- KWindowPositioner( QWidget *master, QWidget *slave, Mode mode = Bottom );
+ KWindowPositioner( TQWidget *master, TQWidget *slave, Mode mode = Bottom );
- bool eventFilter( QObject *watched, QEvent *e );
+ bool eventFilter( TQObject *watched, TQEvent *e );
void reposition();
private:
- QWidget *mMaster;
- QWidget *mSlave;
+ TQWidget *mMaster;
+ TQWidget *mSlave;
Mode mMode;
};
diff --git a/kmail/listjob.cpp b/kmail/listjob.cpp
index 341e934a5..f51a04eec 100644
--- a/kmail/listjob.cpp
+++ b/kmail/listjob.cpp
@@ -44,14 +44,14 @@ using KPIM::ProgressManager;
#include <kio/global.h>
#include <klocale.h>
-#include <qstylesheet.h>
+#include <tqstylesheet.h>
#include <stdlib.h>
using namespace KMail;
ListJob::ListJob( ImapAccountBase* account, ImapAccountBase::ListType type,
- FolderStorage* storage, const QString& path, bool complete,
+ FolderStorage* storage, const TQString& path, bool complete,
KPIM::ProgressItem* item )
: FolderJob( 0, tOther, (storage ? storage->folder() : 0) ),
mStorage( storage ), mAccount( account ), mType( type ),
@@ -76,8 +76,8 @@ void ListJob::execute()
{
// We'll wait for the connectionResult signal from the account.
kdDebug(5006) << "ListJob - waiting for connection" << endl;
- connect( mAccount, SIGNAL( connectionResult(int, const QString&) ),
- this, SLOT( slotConnectionResult(int, const QString&) ) );
+ connect( mAccount, TQT_SIGNAL( connectionResult(int, const TQString&) ),
+ this, TQT_SLOT( slotConnectionResult(int, const TQString&) ) );
return;
}
// this is needed until we have a common base class for d(imap)
@@ -109,8 +109,8 @@ void ListJob::execute()
jd.curNamespace = mNamespace;
if ( mParentProgressItem )
{
- QString escapedStatus = mDestFolder ? QStyleSheet::escape( mDestFolder->prettyURL() )
- : QString::null;
+ TQString escapedStatus = mDestFolder ? TQStyleSheet::escape( mDestFolder->prettyURL() )
+ : TQString::null;
jd.progressItem = ProgressManager::createProgressItem(
mParentProgressItem,
"ListDir" + ProgressManager::getUniqueID(),
@@ -122,14 +122,14 @@ void ListJob::execute()
}
// make the URL
- QString ltype = "LIST";
+ TQString ltype = "LIST";
if ( mType == ImapAccountBase::ListSubscribed ||
mType == ImapAccountBase::ListFolderOnlySubscribed )
ltype = "LSUB";
else if ( mType == ImapAccountBase::ListSubscribedNoCheck )
ltype = "LSUBNOCHECK";
- QString section;
+ TQString section;
if ( mComplete )
section = ";SECTION=COMPLETE";
else if ( mType == ImapAccountBase::ListFolderOnly ||
@@ -145,13 +145,13 @@ void ListJob::execute()
KIO::SimpleJob *job = KIO::listDir( url, false );
KIO::Scheduler::assignJobToSlave( mAccount->slave(), job );
mAccount->insertJob( job, jd );
- connect( job, SIGNAL(result(KIO::Job *)),
- this, SLOT(slotListResult(KIO::Job *)) );
- connect( job, SIGNAL(entries(KIO::Job *, const KIO::UDSEntryList &)),
- this, SLOT(slotListEntries(KIO::Job *, const KIO::UDSEntryList &)) );
+ connect( job, TQT_SIGNAL(result(KIO::Job *)),
+ this, TQT_SLOT(slotListResult(KIO::Job *)) );
+ connect( job, TQT_SIGNAL(entries(KIO::Job *, const KIO::UDSEntryList &)),
+ this, TQT_SLOT(slotListEntries(KIO::Job *, const KIO::UDSEntryList &)) );
}
-void ListJob::slotConnectionResult( int errorCode, const QString& errorMsg )
+void ListJob::slotConnectionResult( int errorCode, const TQString& errorMsg )
{
Q_UNUSED( errorMsg );
if ( !errorCode )
@@ -196,15 +196,15 @@ void ListJob::slotListEntries( KIO::Job* job, const KIO::UDSEntryList& uds )
}
if( (*it).progressItem )
(*it).progressItem->setProgress( 50 );
- QString name;
+ TQString name;
KURL url;
- QString mimeType;
- QString attributes;
+ TQString mimeType;
+ TQString attributes;
for ( KIO::UDSEntryList::ConstIterator udsIt = uds.begin();
udsIt != uds.end(); udsIt++ )
{
- mimeType = QString::null;
- attributes = QString::null;
+ mimeType = TQString::null;
+ attributes = TQString::null;
for ( KIO::UDSEntry::ConstIterator eIt = (*udsIt).begin();
eIt != (*udsIt).end(); eIt++ )
{
diff --git a/kmail/listjob.h b/kmail/listjob.h
index 75213f5ce..f1adcba61 100644
--- a/kmail/listjob.h
+++ b/kmail/listjob.h
@@ -66,7 +66,7 @@ public:
* @param item a parent ProgressItem
*/
ListJob( ImapAccountBase* account, ImapAccountBase::ListType type,
- FolderStorage* storage = 0, const QString& path = QString::null,
+ FolderStorage* storage = 0, const TQString& path = TQString::null,
bool complete = false, KPIM::ProgressItem* item = 0 );
virtual ~ListJob();
@@ -88,7 +88,7 @@ public:
virtual void execute();
/** Path */
- void setPath( const QString& path ) { mPath = path; }
+ void setPath( const TQString& path ) { mPath = path; }
/** Storage */
void setStorage( FolderStorage* st ) { mStorage = st; }
@@ -101,7 +101,7 @@ public:
mParentProgressItem = it; }
/** Set the namespace for this listing */
- void setNamespace( const QString& ns ) { mNamespace = ns; }
+ void setNamespace( const TQString& ns ) { mNamespace = ns; }
protected slots:
/**
@@ -118,14 +118,14 @@ protected slots:
/**
* Called from the account when a connection was established
*/
- void slotConnectionResult( int errorCode, const QString& errorMsg );
+ void slotConnectionResult( int errorCode, const TQString& errorMsg );
signals:
/**
* Emitted when new folders have been received
*/
- void receivedFolders( const QStringList&, const QStringList&,
- const QStringList&, const QStringList&, const ImapAccountBase::jobData& );
+ void receivedFolders( const TQStringList&, const TQStringList&,
+ const TQStringList&, const TQStringList&, const ImapAccountBase::jobData& );
protected:
FolderStorage* mStorage;
@@ -133,11 +133,11 @@ protected:
ImapAccountBase::ListType mType;
bool mComplete;
bool mHonorLocalSubscription;
- QString mPath;
- QStringList mSubfolderNames, mSubfolderPaths,
+ TQString mPath;
+ TQStringList mSubfolderNames, mSubfolderPaths,
mSubfolderMimeTypes, mSubfolderAttributes;
KPIM::ProgressItem* mParentProgressItem;
- QString mNamespace;
+ TQString mNamespace;
};
} // namespace
diff --git a/kmail/localsubscriptiondialog.cpp b/kmail/localsubscriptiondialog.cpp
index f5dfc2b62..0816ba40a 100644
--- a/kmail/localsubscriptiondialog.cpp
+++ b/kmail/localsubscriptiondialog.cpp
@@ -46,8 +46,8 @@
namespace KMail {
-LocalSubscriptionDialog::LocalSubscriptionDialog( QWidget *parent, const QString &caption,
- ImapAccountBase *acct, QString startPath )
+LocalSubscriptionDialog::LocalSubscriptionDialog( TQWidget *parent, const TQString &caption,
+ ImapAccountBase *acct, TQString startPath )
: SubscriptionDialog( parent, caption, acct, startPath ),
mAccount( acct )
{
@@ -76,7 +76,7 @@ void LocalSubscriptionDialog::processFolderListing()
if (done == 1000)
{
emit listChanged();
- QTimer::singleShot(0, this, SLOT(processItems()));
+ TQTimer::singleShot(0, this, TQT_SLOT(processItems()));
return;
}
++mCount;
@@ -94,10 +94,10 @@ void LocalSubscriptionDialog::setCheckedStateOfAllItems()
{
// iterate over all items and check them, unless they are
// in the account's local subscription blacklist
- QDictIterator<GroupItem> it( mItemDict );
+ TQDictIterator<GroupItem> it( mItemDict );
for ( ; it.current(); ++it ) {
GroupItem *item = it.current();
- QString path = it.currentKey();
+ TQString path = it.currentKey();
item->setOn( mAccount->locallySubscribedTo( path ) );
}
}
@@ -107,7 +107,7 @@ void LocalSubscriptionDialog::doSave()
{
bool somethingHappened = false;
// subscribe
- QListViewItemIterator it(subView);
+ TQListViewItemIterator it(subView);
for ( ; it.current(); ++it) {
static_cast<ImapAccountBase*>(account())->changeLocalSubscription(
static_cast<GroupItem*>(it.current())->info().path, true );
@@ -115,13 +115,13 @@ void LocalSubscriptionDialog::doSave()
}
// unsubscribe
- QListViewItemIterator it2(unsubView);
+ TQListViewItemIterator it2(unsubView);
if ( unsubView->childCount() > 0 ) {
- const QString message = i18n("Locally unsubscribing from folders will remove all "
+ const TQString message = i18n("Locally unsubscribing from folders will remove all "
"information that is present locally about those folders. The folders will "
"not be changed on the server. Press cancel now if you want to make sure "
"all local changes have been written to the server by checking mail first.");
- const QString caption = i18n("Local changes will be lost when unsubscribing");
+ const TQString caption = i18n("Local changes will be lost when unsubscribing");
if ( KMessageBox::warningContinueCancel( this, message, caption )
!= KMessageBox::Cancel ) {
somethingHappened = true;
diff --git a/kmail/localsubscriptiondialog.h b/kmail/localsubscriptiondialog.h
index 5a1428c8c..2061ab278 100644
--- a/kmail/localsubscriptiondialog.h
+++ b/kmail/localsubscriptiondialog.h
@@ -42,9 +42,9 @@ namespace KMail {
Q_OBJECT
public:
- LocalSubscriptionDialog( QWidget *parent, const QString &caption,
+ LocalSubscriptionDialog( TQWidget *parent, const TQString &caption,
ImapAccountBase* acct,
- QString startPath = QString::null );
+ TQString startPath = TQString::null );
virtual ~LocalSubscriptionDialog();
protected:
diff --git a/kmail/mailcomposerIface.h b/kmail/mailcomposerIface.h
index 285865787..130a99e1f 100644
--- a/kmail/mailcomposerIface.h
+++ b/kmail/mailcomposerIface.h
@@ -23,11 +23,11 @@ class MailComposerIface : virtual public DCOPObject
/**
Add url as attachment with a user-defined comment.
*/
- virtual void addAttachment(KURL url,QString comment) = 0;
+ virtual void addAttachment(KURL url,TQString comment) = 0;
/**
Set message body.
*/
- virtual void setBody (QString body) = 0;
+ virtual void setBody (TQString body) = 0;
/**
Add attachment.
@@ -40,14 +40,14 @@ class MailComposerIface : virtual public DCOPObject
@param paramValue Value of parameter of content type
@param contDisp Content disposition
*/
- virtual void addAttachment(const QString &name,
- const QCString &cte,
- const QByteArray &data,
- const QCString &type,
- const QCString &subType,
- const QCString &paramAttr,
- const QString &paramValue,
- const QCString &contDisp) = 0;
+ virtual void addAttachment(const TQString &name,
+ const TQCString &cte,
+ const TQByteArray &data,
+ const TQCString &type,
+ const TQCString &subType,
+ const TQCString &paramAttr,
+ const TQString &paramValue,
+ const TQCString &contDisp) = 0;
};
#endif
diff --git a/kmail/maildirjob.cpp b/kmail/maildirjob.cpp
index 424ea434a..5833cfe4e 100644
--- a/kmail/maildirjob.cpp
+++ b/kmail/maildirjob.cpp
@@ -39,8 +39,8 @@
#include <kapplication.h>
#include <kdebug.h>
-#include <qtimer.h>
-#include <qdatetime.h>
+#include <tqtimer.h>
+#include <tqdatetime.h>
namespace KMail {
@@ -52,7 +52,7 @@ MaildirJob::MaildirJob( KMMessage *msg, JobType jt , KMFolder *folder )
}
//-----------------------------------------------------------------------------
-MaildirJob::MaildirJob( QPtrList<KMMessage>& msgList, const QString& sets,
+MaildirJob::MaildirJob( TQPtrList<KMMessage>& msgList, const TQString& sets,
JobType jt , KMFolder *folder )
: FolderJob( msgList, sets, jt, folder ), mParentFolder( 0 )
{
@@ -74,7 +74,7 @@ void MaildirJob::setParentFolder( const KMFolderMaildir* parent )
//-----------------------------------------------------------------------------
void MaildirJob::execute()
{
- QTimer::singleShot( 0, this, SLOT(startJob()) );
+ TQTimer::singleShot( 0, this, TQT_SLOT(startJob()) );
}
//-----------------------------------------------------------------------------
diff --git a/kmail/maildirjob.h b/kmail/maildirjob.h
index e94558cba..a2209f087 100644
--- a/kmail/maildirjob.h
+++ b/kmail/maildirjob.h
@@ -43,7 +43,7 @@ class MaildirJob : public FolderJob
Q_OBJECT
public:
MaildirJob( KMMessage *msg, JobType jt = tGetMessage, KMFolder *folder = 0 );
- MaildirJob( QPtrList<KMMessage>& msgList, const QString& sets,
+ MaildirJob( TQPtrList<KMMessage>& msgList, const TQString& sets,
JobType jt = tGetMessage, KMFolder *folder = 0 );
virtual ~MaildirJob();
diff --git a/kmail/mailinglist-magic.cpp b/kmail/mailinglist-magic.cpp
index 25b2abd0c..4483323de 100644
--- a/kmail/mailinglist-magic.cpp
+++ b/kmail/mailinglist-magic.cpp
@@ -11,21 +11,21 @@
#include <kurl.h>
#include <kdebug.h>
-#include <qstringlist.h>
+#include <tqstringlist.h>
using namespace KMail;
-typedef QString (*MagicDetectorFunc) (const KMMessage *, QCString &, QString &);
+typedef TQString (*MagicDetectorFunc) (const KMMessage *, TQCString &, TQString &);
/* Sender: (owner-([^@]+)|([^@+]-owner)@ */
-static QString check_sender(const KMMessage *message,
- QCString &header_name,
- QString &header_value )
+static TQString check_sender(const KMMessage *message,
+ TQCString &header_name,
+ TQString &header_value )
{
- QString header = message->headerField( "Sender" );
+ TQString header = message->headerField( "Sender" );
if ( header.isEmpty() )
- return QString::null;
+ return TQString::null;
if ( header.left( 6 ) == "owner-" )
{
@@ -36,7 +36,7 @@ static QString check_sender(const KMMessage *message,
} else {
int index = header.find( "-owner@ " );
if ( index == -1 )
- return QString::null;
+ return TQString::null;
header.truncate( index );
header_name = "Sender";
@@ -47,13 +47,13 @@ static QString check_sender(const KMMessage *message,
}
/* X-BeenThere: ([^@]+) */
-static QString check_x_beenthere(const KMMessage *message,
- QCString &header_name,
- QString &header_value )
+static TQString check_x_beenthere(const KMMessage *message,
+ TQCString &header_name,
+ TQString &header_value )
{
- QString header = message->headerField( "X-BeenThere" );
+ TQString header = message->headerField( "X-BeenThere" );
if ( header.isNull() || header.find( '@' ) == -1 )
- return QString::null;
+ return TQString::null;
header_name = "X-BeenThere";
header_value = header;
@@ -62,14 +62,14 @@ static QString check_x_beenthere(const KMMessage *message,
}
/* Delivered-To:: <([^@]+) */
-static QString check_delivered_to(const KMMessage *message,
- QCString &header_name,
- QString &header_value )
+static TQString check_delivered_to(const KMMessage *message,
+ TQCString &header_name,
+ TQString &header_value )
{
- QString header = message->headerField( "Delivered-To" );
+ TQString header = message->headerField( "Delivered-To" );
if ( header.isNull() || header.left(13 ) != "mailing list"
|| header.find( '@' ) == -1 )
- return QString::null;
+ return TQString::null;
header_name = "Delivered-To";
header_value = header;
@@ -78,16 +78,16 @@ static QString check_delivered_to(const KMMessage *message,
}
/* X-Mailing-List: <?([^@]+) */
-static QString check_x_mailing_list(const KMMessage *message,
- QCString &header_name,
- QString &header_value )
+static TQString check_x_mailing_list(const KMMessage *message,
+ TQCString &header_name,
+ TQString &header_value )
{
- QString header = message->headerField( "X-Mailing-List");
+ TQString header = message->headerField( "X-Mailing-List");
if ( header.isEmpty() )
- return QString::null;
+ return TQString::null;
if ( header.find( '@' ) < 1 )
- return QString::null;
+ return TQString::null;
header_name = "X-Mailing-List";
header_value = header;
@@ -99,22 +99,22 @@ static QString check_x_mailing_list(const KMMessage *message,
}
/* List-Id: [^<]* <([^.]+) */
-static QString check_list_id(const KMMessage *message,
- QCString &header_name,
- QString &header_value )
+static TQString check_list_id(const KMMessage *message,
+ TQCString &header_name,
+ TQString &header_value )
{
int lAnglePos, firstDotPos;
- QString header = message->headerField( "List-Id" );
+ TQString header = message->headerField( "List-Id" );
if ( header.isEmpty() )
- return QString::null;
+ return TQString::null;
lAnglePos = header.find( '<' );
if ( lAnglePos < 0 )
- return QString::null;
+ return TQString::null;
firstDotPos = header.find( '.', lAnglePos );
if ( firstDotPos < 0 )
- return QString::null;
+ return TQString::null;
header_name = "List-Id";
header_value = header.mid( lAnglePos );
@@ -124,17 +124,17 @@ static QString check_list_id(const KMMessage *message,
/* List-Post: <mailto:[^< ]*>) */
-static QString check_list_post(const KMMessage *message,
- QCString &header_name,
- QString &header_value )
+static TQString check_list_post(const KMMessage *message,
+ TQCString &header_name,
+ TQString &header_value )
{
- QString header = message->headerField( "List-Post" );
+ TQString header = message->headerField( "List-Post" );
if ( header.isEmpty() )
- return QString::null;
+ return TQString::null;
int lAnglePos = header.find( "<mailto:" );
if ( lAnglePos < 0 )
- return QString::null;
+ return TQString::null;
header_name = "List-Post";
header_value = header;
@@ -144,16 +144,16 @@ static QString check_list_post(const KMMessage *message,
}
/* Mailing-List: list ([^@]+) */
-static QString check_mailing_list(const KMMessage *message,
- QCString &header_name,
- QString &header_value )
+static TQString check_mailing_list(const KMMessage *message,
+ TQCString &header_name,
+ TQString &header_value )
{
- QString header = message->headerField( "Mailing-List");
+ TQString header = message->headerField( "Mailing-List");
if ( header.isEmpty() )
- return QString::null;
+ return TQString::null;
if (header.left( 5 ) != "list " || header.find( '@' ) < 5 )
- return QString::null;
+ return TQString::null;
header_name = "Mailing-List";
header_value = header;
@@ -163,15 +163,15 @@ static QString check_mailing_list(const KMMessage *message,
/* X-Loop: ([^@]+) */
-static QString check_x_loop(const KMMessage *message,
- QCString &header_name,
- QString &header_value ){
- QString header = message->headerField( "X-Loop");
+static TQString check_x_loop(const KMMessage *message,
+ TQCString &header_name,
+ TQString &header_value ){
+ TQString header = message->headerField( "X-Loop");
if ( header.isEmpty() )
- return QString::null;
+ return TQString::null;
if (header.find( '@' ) < 2 )
- return QString::null;
+ return TQString::null;
header_name = "X-Loop";
header_value = header;
@@ -180,12 +180,12 @@ static QString check_x_loop(const KMMessage *message,
}
/* X-ML-Name: (.+) */
-static QString check_x_ml_name(const KMMessage *message,
- QCString &header_name,
- QString &header_value ){
- QString header = message->headerField( "X-ML-Name");
+static TQString check_x_ml_name(const KMMessage *message,
+ TQCString &header_name,
+ TQString &header_value ){
+ TQString header = message->headerField( "X-ML-Name");
if ( header.isEmpty() )
- return QString::null;
+ return TQString::null;
header_name = "X-ML-Name";
header_value = header;
@@ -209,9 +209,9 @@ MagicDetectorFunc magic_detector[] =
static const int num_detectors = sizeof (magic_detector) / sizeof (magic_detector[0]);
static QStringList
-headerToAddress( const QString& header )
+headerToAddress( const TQString& header )
{
- QStringList addr;
+ TQStringList addr;
int start = 0;
int end = 0;
@@ -250,15 +250,15 @@ MailingList::detect( const KMMessage *message )
}
QString
-MailingList::name( const KMMessage *message, QCString &header_name,
- QString &header_value )
+MailingList::name( const KMMessage *message, TQCString &header_name,
+ TQString &header_value )
{
- QString mlist;
- header_name = QCString();
- header_value = QString::null;
+ TQString mlist;
+ header_name = TQCString();
+ header_value = TQString::null;
if ( !message )
- return QString::null;
+ return TQString::null;
for (int i = 0; i < num_detectors; i++) {
mlist = magic_detector[i] (message, header_name, header_value);
@@ -266,7 +266,7 @@ MailingList::name( const KMMessage *message, QCString &header_name,
return mlist;
}
- return QString::null;
+ return TQString::null;
}
MailingList::MailingList()
@@ -370,7 +370,7 @@ MailingList::archiveURLS() const
}
void
-MailingList::setId( const QString& str )
+MailingList::setId( const TQString& str )
{
mFeatures |= Id;
if ( str.isEmpty() ) {
diff --git a/kmail/mailinglist-magic.h b/kmail/mailinglist-magic.h
index 8c30c20eb..bcccf66f5 100644
--- a/kmail/mailinglist-magic.h
+++ b/kmail/mailinglist-magic.h
@@ -3,7 +3,7 @@
#define MAILINGLIST_MAGIC_H
#include <kurl.h>
-#include <qstring.h>
+#include <tqstring.h>
class KMMessage;
class KConfig;
@@ -39,8 +39,8 @@ public:
};
public:
static MailingList detect( const KMMessage* msg );
- static QString name( const KMMessage *message, QCString &header_name,
- QString &header_value );
+ static TQString name( const KMMessage *message, TQCString &header_name,
+ TQString &header_value );
public:
MailingList();
@@ -64,8 +64,8 @@ public:
void setArchiveURLS( const KURL::List& );
KURL::List archiveURLS() const;
- void setId( const QString& );
- QString id() const;
+ void setId( const TQString& );
+ TQString id() const;
void writeConfig( KConfig* config ) const;
void readConfig( KConfig* config );
@@ -77,7 +77,7 @@ private:
KURL::List mUnsubscribeURLS;
KURL::List mHelpURLS;
KURL::List mArchiveURLS;
- QString mId;
+ TQString mId;
};
}
diff --git a/kmail/mailinglistpropertiesdialog.cpp b/kmail/mailinglistpropertiesdialog.cpp
index 3ea3beaa4..8a9487b06 100644
--- a/kmail/mailinglistpropertiesdialog.cpp
+++ b/kmail/mailinglistpropertiesdialog.cpp
@@ -25,12 +25,12 @@
** you do not wish to do so, delete this exception statement from
** your version.
*******************************************************************************/
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qcombobox.h>
-#include <qgroupbox.h>
-#include <qcheckbox.h>
-#include <qpushbutton.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqcombobox.h>
+#include <tqgroupbox.h>
+#include <tqcheckbox.h>
+#include <tqpushbutton.h>
#include <klocale.h>
#include <keditlistbox.h>
@@ -45,69 +45,69 @@
using namespace KMail;
-MailingListFolderPropertiesDialog::MailingListFolderPropertiesDialog( QWidget* parent, KMFolder *folder )
+MailingListFolderPropertiesDialog::MailingListFolderPropertiesDialog( TQWidget* parent, KMFolder *folder )
: KDialogBase( parent, "mailinglist_properties", false, i18n( "Mailinglist Folder Properties" ),
KDialogBase::Ok|KDialogBase::Cancel,
KDialogBase::Ok, true ),
mFolder( folder )
{
setWFlags( getWFlags() | WDestructiveClose );
- QLabel* label;
+ TQLabel* label;
mLastItem = 0;
- QVBoxLayout *topLayout = new QVBoxLayout( layout(), spacingHint(),
+ TQVBoxLayout *topLayout = new TQVBoxLayout( layout(), spacingHint(),
"topLayout" );
- QGroupBox *mlGroup = new QGroupBox( i18n("Associated Mailing List" ), this );
+ TQGroupBox *mlGroup = new TQGroupBox( i18n("Associated Mailing List" ), this );
mlGroup->setColumnLayout( 0, Qt::Vertical );
- QGridLayout *groupLayout = new QGridLayout( mlGroup->layout(), 6, 3, spacingHint() );
+ TQGridLayout *groupLayout = new TQGridLayout( mlGroup->layout(), 6, 3, spacingHint() );
topLayout->addWidget( mlGroup );
setMainWidget( mlGroup );
- mHoldsMailingList = new QCheckBox( i18n("&Folder holds a mailing list"), mlGroup );
- QObject::connect( mHoldsMailingList, SIGNAL(toggled(bool)),
- SLOT(slotHoldsML(bool)) );
+ mHoldsMailingList = new TQCheckBox( i18n("&Folder holds a mailing list"), mlGroup );
+ TQObject::connect( mHoldsMailingList, TQT_SIGNAL(toggled(bool)),
+ TQT_SLOT(slotHoldsML(bool)) );
groupLayout->addMultiCellWidget( mHoldsMailingList, 0, 0, 0, 2 );
- groupLayout->addItem( new QSpacerItem( 0, 10 ), 1, 0 );
+ groupLayout->addItem( new TQSpacerItem( 0, 10 ), 1, 0 );
- mDetectButton = new QPushButton( i18n("Detect Automatically"), mlGroup );
+ mDetectButton = new TQPushButton( i18n("Detect Automatically"), mlGroup );
mDetectButton->setEnabled( false );
- QObject::connect( mDetectButton, SIGNAL(pressed()), SLOT(slotDetectMailingList()) );
+ TQObject::connect( mDetectButton, TQT_SIGNAL(pressed()), TQT_SLOT(slotDetectMailingList()) );
groupLayout->addWidget( mDetectButton, 2, 1 );
- groupLayout->addItem( new QSpacerItem( 0, 10 ), 3, 0 );
+ groupLayout->addItem( new TQSpacerItem( 0, 10 ), 3, 0 );
- label = new QLabel( i18n("Mailing list description:"), mlGroup );
+ label = new TQLabel( i18n("Mailing list description:"), mlGroup );
label->setEnabled( false );
- QObject::connect( mHoldsMailingList, SIGNAL(toggled(bool)),
- label, SLOT(setEnabled(bool)) );
+ TQObject::connect( mHoldsMailingList, TQT_SIGNAL(toggled(bool)),
+ label, TQT_SLOT(setEnabled(bool)) );
groupLayout->addWidget( label, 4, 0 );
- mMLId = new QLabel( label, "", mlGroup );
+ mMLId = new TQLabel( label, "", mlGroup );
groupLayout->addMultiCellWidget( mMLId, 4, 4, 1, 2 );
mMLId->setEnabled( false );
//FIXME: add QWhatsThis
- label = new QLabel( i18n("Preferred handler:"), mlGroup );
+ label = new TQLabel( i18n("Preferred handler:"), mlGroup );
label->setEnabled(false);
- QObject::connect( mHoldsMailingList, SIGNAL(toggled(bool)),
- label, SLOT(setEnabled(bool)) );
+ TQObject::connect( mHoldsMailingList, TQT_SIGNAL(toggled(bool)),
+ label, TQT_SLOT(setEnabled(bool)) );
groupLayout->addWidget( label, 5, 0 );
- mMLHandlerCombo = new QComboBox( mlGroup );
+ mMLHandlerCombo = new TQComboBox( mlGroup );
mMLHandlerCombo->insertItem( i18n("KMail"), MailingList::KMail );
mMLHandlerCombo->insertItem( i18n("Browser"), MailingList::Browser );
mMLHandlerCombo->setEnabled( false );
groupLayout->addMultiCellWidget( mMLHandlerCombo, 5, 5, 1, 2 );
- QObject::connect( mMLHandlerCombo, SIGNAL(activated(int)),
- SLOT(slotMLHandling(int)) );
+ TQObject::connect( mMLHandlerCombo, TQT_SIGNAL(activated(int)),
+ TQT_SLOT(slotMLHandling(int)) );
label->setBuddy( mMLHandlerCombo );
- label = new QLabel( i18n("&Address type:"), mlGroup );
+ label = new TQLabel( i18n("&Address type:"), mlGroup );
label->setEnabled(false);
- QObject::connect( mHoldsMailingList, SIGNAL(toggled(bool)),
- label, SLOT(setEnabled(bool)) );
+ TQObject::connect( mHoldsMailingList, TQT_SIGNAL(toggled(bool)),
+ label, TQT_SLOT(setEnabled(bool)) );
groupLayout->addWidget( label, 6, 0 );
- mAddressCombo = new QComboBox( mlGroup );
+ mAddressCombo = new TQComboBox( mlGroup );
label->setBuddy( mAddressCombo );
groupLayout->addWidget( mAddressCombo, 6, 1 );
mAddressCombo->setEnabled( false );
@@ -115,14 +115,14 @@ MailingListFolderPropertiesDialog::MailingListFolderPropertiesDialog( QWidget* p
//FIXME: if the mailing list actions have either KAction's or toolbar buttons
// associated with them - remove this button since it's really silly
// here
- QPushButton *handleButton = new QPushButton( i18n( "Invoke Handler" ), mlGroup );
+ TQPushButton *handleButton = new TQPushButton( i18n( "Invoke Handler" ), mlGroup );
handleButton->setEnabled( false );
if( mFolder)
{
- QObject::connect( mHoldsMailingList, SIGNAL(toggled(bool)),
- handleButton, SLOT(setEnabled(bool)) );
- QObject::connect( handleButton, SIGNAL(clicked()),
- SLOT(slotInvokeHandler()) );
+ TQObject::connect( mHoldsMailingList, TQT_SIGNAL(toggled(bool)),
+ handleButton, TQT_SLOT(setEnabled(bool)) );
+ TQObject::connect( handleButton, TQT_SIGNAL(clicked()),
+ TQT_SLOT(slotInvokeHandler()) );
}
groupLayout->addWidget( handleButton, 6, 2 );
@@ -130,7 +130,7 @@ MailingListFolderPropertiesDialog::MailingListFolderPropertiesDialog( QWidget* p
mEditList->setEnabled( false );
groupLayout->addMultiCellWidget( mEditList, 7, 7, 0, 3 );
- QStringList el;
+ TQStringList el;
//Order is important because the activate handler and fillMLFromWidgets
//depend on it
@@ -140,11 +140,11 @@ MailingListFolderPropertiesDialog::MailingListFolderPropertiesDialog( QWidget* p
<< i18n( "List Archives" )
<< i18n( "List Help" );
mAddressCombo->insertStringList( el );
- QObject::connect( mAddressCombo, SIGNAL(activated(int)),
- SLOT(slotAddressChanged(int)) );
+ TQObject::connect( mAddressCombo, TQT_SIGNAL(activated(int)),
+ TQT_SLOT(slotAddressChanged(int)) );
load();
- resize( QSize(295, 204).expandedTo(minimumSizeHint()) );
+ resize( TQSize(295, 204).expandedTo(minimumSizeHint()) );
clearWState( WState_Polished );
}
@@ -252,9 +252,9 @@ void MailingListFolderPropertiesDialog::fillMLFromWidgets()
// make sure that email addresses are prepended by "mailto:"
bool changed = false;
- QStringList oldList = mEditList->items();
- QStringList newList; // the correct string list
- for ( QStringList::ConstIterator it = oldList.begin();
+ TQStringList oldList = mEditList->items();
+ TQStringList newList; // the correct string list
+ for ( TQStringList::ConstIterator it = oldList.begin();
it != oldList.end(); ++it ) {
if ( !(*it).startsWith("http:") && !(*it).startsWith("https:") &&
!(*it).startsWith("mailto:") && ( (*it).find('@') != -1 ) ) {
diff --git a/kmail/mailinglistpropertiesdialog.h b/kmail/mailinglistpropertiesdialog.h
index 5996d607d..71c049e11 100644
--- a/kmail/mailinglistpropertiesdialog.h
+++ b/kmail/mailinglistpropertiesdialog.h
@@ -46,7 +46,7 @@ class MailingListFolderPropertiesDialog : public KDialogBase
{
Q_OBJECT
public:
- MailingListFolderPropertiesDialog( QWidget *parent, KMFolder *folder );
+ MailingListFolderPropertiesDialog( TQWidget *parent, KMFolder *folder );
~MailingListFolderPropertiesDialog() {};
protected:
void load();
@@ -71,13 +71,13 @@ private:
void fillEditBox();
bool mMLInfoChanged;
- QCheckBox *mHoldsMailingList;
- QComboBox *mMLHandlerCombo;
- QPushButton *mDetectButton;
- QComboBox *mAddressCombo;
+ TQCheckBox *mHoldsMailingList;
+ TQComboBox *mMLHandlerCombo;
+ TQPushButton *mDetectButton;
+ TQComboBox *mAddressCombo;
int mLastItem;
KEditListBox *mEditList;
- QLabel *mMLId;
+ TQLabel *mMLId;
MailingList mMailingList;
}; // End of class MailingListFolderProperties
diff --git a/kmail/mailserviceimpl.cpp b/kmail/mailserviceimpl.cpp
index 6d82f5a45..e7337e810 100644
--- a/kmail/mailserviceimpl.cpp
+++ b/kmail/mailserviceimpl.cpp
@@ -42,7 +42,7 @@
#include <dcopobject.h>
#include <kurl.h>
#include <kdebug.h>
-#include <qstring.h>
+#include <tqstring.h>
namespace KMail {
@@ -52,9 +52,9 @@ MailServiceImpl::MailServiceImpl()
{
}
-bool MailServiceImpl::sendMessage( const QString& from, const QString& to,
- const QString& cc, const QString& bcc,
- const QString& subject, const QString& body,
+bool MailServiceImpl::sendMessage( const TQString& from, const TQString& to,
+ const TQString& cc, const TQString& bcc,
+ const TQString& subject, const TQString& body,
const KURL::List& attachments )
{
if ( to.isEmpty() && cc.isEmpty() && bcc.isEmpty() )
@@ -79,21 +79,21 @@ bool MailServiceImpl::sendMessage( const QString& from, const QString& to,
return true;
}
-bool MailServiceImpl::sendMessage( const QString& to,
- const QString& cc, const QString& bcc,
- const QString& subject, const QString& body,
+bool MailServiceImpl::sendMessage( const TQString& to,
+ const TQString& cc, const TQString& bcc,
+ const TQString& subject, const TQString& body,
const KURL::List& attachments )
{
- kdDebug(5006) << "DCOP call MailTransportServiceIface bool sendMessage(QString to,QString cc,QString bcc,QString subject,QString body,KURL::List attachments)" << endl;
- kdDebug(5006) << "This DCOP call is deprecated. Use the corresponding DCOP call with the additional parameter QString from instead." << endl;
- return sendMessage( QString::null, to, cc, bcc, subject, body, attachments );
+ kdDebug(5006) << "DCOP call MailTransportServiceIface bool sendMessage(TQString to,TQString cc,TQString bcc,TQString subject,TQString body,KURL::List attachments)" << endl;
+ kdDebug(5006) << "This DCOP call is deprecated. Use the corresponding DCOP call with the additional parameter TQString from instead." << endl;
+ return sendMessage( TQString::null, to, cc, bcc, subject, body, attachments );
}
-bool MailServiceImpl::sendMessage( const QString& from, const QString& to,
- const QString& cc, const QString& bcc,
- const QString& subject, const QString& body,
- const QByteArray& attachment )
+bool MailServiceImpl::sendMessage( const TQString& from, const TQString& to,
+ const TQString& cc, const TQString& bcc,
+ const TQString& subject, const TQString& body,
+ const TQByteArray& attachment )
{
if ( to.isEmpty() && cc.isEmpty() && bcc.isEmpty() )
return false;
@@ -121,14 +121,14 @@ bool MailServiceImpl::sendMessage( const QString& from, const QString& to,
}
-bool MailServiceImpl::sendMessage( const QString& to,
- const QString& cc, const QString& bcc,
- const QString& subject, const QString& body,
- const QByteArray& attachment )
+bool MailServiceImpl::sendMessage( const TQString& to,
+ const TQString& cc, const TQString& bcc,
+ const TQString& subject, const TQString& body,
+ const TQByteArray& attachment )
{
- kdDebug(5006) << "DCOP call MailTransportServiceIface bool sendMessage(QString to,QString cc,QString bcc,QString subject,QString body,QByteArray attachment)" << endl;
- kdDebug(5006) << "This DCOP call is deprecated. Use the corresponding DCOP call with the additional parameter QString from instead." << endl;
- return sendMessage( QString::null, to, cc, bcc, subject, body, attachment );
+ kdDebug(5006) << "DCOP call MailTransportServiceIface bool sendMessage(TQString to,TQString cc,TQString bcc,TQString subject,TQString body,TQByteArray attachment)" << endl;
+ kdDebug(5006) << "This DCOP call is deprecated. Use the corresponding DCOP call with the additional parameter TQString from instead." << endl;
+ return sendMessage( TQString::null, to, cc, bcc, subject, body, attachment );
}
}//end namespace KMail
diff --git a/kmail/mailserviceimpl.h b/kmail/mailserviceimpl.h
index 0bb925572..a31950663 100644
--- a/kmail/mailserviceimpl.h
+++ b/kmail/mailserviceimpl.h
@@ -35,7 +35,7 @@
class QString;
class KURL;
template <typename T> class QMemArray;
-typedef QMemArray<char> QByteArray;
+typedef TQMemArray<char> QByteArray;
namespace KMail {
@@ -44,29 +44,29 @@ namespace KMail {
{
public:
MailServiceImpl();
- bool sendMessage( const QString& from, const QString& to,
- const QString& cc, const QString& bcc,
- const QString& subject, const QString& body,
+ bool sendMessage( const TQString& from, const TQString& to,
+ const TQString& cc, const TQString& bcc,
+ const TQString& subject, const TQString& body,
const KURL::List& attachments );
// FIXME KDE 4.0: Remove this.
// (cf. libkdepim/interfaces/MailTransportServiceIface.h)
- bool sendMessage( const QString& to,
- const QString& cc, const QString& bcc,
- const QString& subject, const QString& body,
+ bool sendMessage( const TQString& to,
+ const TQString& cc, const TQString& bcc,
+ const TQString& subject, const TQString& body,
const KURL::List& attachments );
- bool sendMessage( const QString& from, const QString& to,
- const QString& cc, const QString& bcc,
- const QString& subject, const QString& body,
- const QByteArray& attachment );
+ bool sendMessage( const TQString& from, const TQString& to,
+ const TQString& cc, const TQString& bcc,
+ const TQString& subject, const TQString& body,
+ const TQByteArray& attachment );
// FIXME KDE 4.0: Remove this.
// (cf. libkdepim/interfaces/MailTransportServiceIface.h)
- bool sendMessage( const QString& to,
- const QString& cc, const QString& bcc,
- const QString& subject, const QString& body,
- const QByteArray& attachment );
+ bool sendMessage( const TQString& to,
+ const TQString& cc, const TQString& bcc,
+ const TQString& subject, const TQString& body,
+ const TQByteArray& attachment );
};
}
diff --git a/kmail/mailsourceviewer.cpp b/kmail/mailsourceviewer.cpp
index ac77b7dd4..0cfa11bb3 100644
--- a/kmail/mailsourceviewer.cpp
+++ b/kmail/mailsourceviewer.cpp
@@ -38,28 +38,28 @@
#include <kapplication.h>
#include <kwin.h>
-#include <qregexp.h>
-#include <qaccel.h>
+#include <tqregexp.h>
+#include <tqaccel.h>
namespace KMail {
-int MailSourceHighlighter::highlightParagraph( const QString& text, int ) {
- QRegExp regexp( "^([\\w-]+:\\s)" );
+int MailSourceHighlighter::highlightParagraph( const TQString& text, int ) {
+ TQRegExp regexp( "^([\\w-]+:\\s)" );
if( regexp.search( text ) != -1 ) {
- QFont font = textEdit()->currentFont();
+ TQFont font = textEdit()->currentFont();
font.setBold( true );
setFormat( 0, regexp.matchedLength(), font );
}
return 0;
}
-MailSourceViewer::MailSourceViewer( QWidget *parent, const char *name )
+MailSourceViewer::MailSourceViewer( TQWidget *parent, const char *name )
: KTextBrowser( parent, name ), mSourceHighLighter( 0 )
{
setWFlags( WDestructiveClose );
- QAccel *accel = new QAccel( this, "browser close-accel" );
- accel->connectItem( accel->insertItem( Qt::Key_Escape ), this , SLOT( close() ));
- accel->connectItem( accel->insertItem( Qt::Key_W+CTRL ), this , SLOT( close() ));
+ TQAccel *accel = new TQAccel( this, "browser close-accel" );
+ accel->connectItem( accel->insertItem( Qt::Key_Escape ), this , TQT_SLOT( close() ));
+ accel->connectItem( accel->insertItem( Qt::Key_W+CTRL ), this , TQT_SLOT( close() ));
setWordWrap( KTextBrowser::NoWrap );
KWin::setIcons(winId(), kapp->icon(), kapp->miniIcon());
}
@@ -69,7 +69,7 @@ MailSourceViewer::~MailSourceViewer()
delete mSourceHighLighter; mSourceHighLighter = 0;
}
-void MailSourceViewer::setText( const QString& text )
+void MailSourceViewer::setText( const TQString& text )
{
delete mSourceHighLighter; mSourceHighLighter = 0;
if ( text.length() > 500000 ) {
diff --git a/kmail/mailsourceviewer.h b/kmail/mailsourceviewer.h
index 0bed8b415..10d242584 100644
--- a/kmail/mailsourceviewer.h
+++ b/kmail/mailsourceviewer.h
@@ -33,7 +33,7 @@
#define MAILSOURCEVIEWER_H
#include <ktextbrowser.h>
-#include <qsyntaxhighlighter.h>
+#include <tqsyntaxhighlighter.h>
/**
@@ -49,19 +49,19 @@ namespace KMail {
class MailSourceHighlighter : public QSyntaxHighlighter
{
public:
- MailSourceHighlighter( QTextEdit* edit )
- : QSyntaxHighlighter( edit )
+ MailSourceHighlighter( TQTextEdit* edit )
+ : TQSyntaxHighlighter( edit )
{}
- int highlightParagraph( const QString& text, int );
+ int highlightParagraph( const TQString& text, int );
};
class MailSourceViewer : public KTextBrowser
{
public:
- MailSourceViewer( QWidget *parent = 0, const char *name = 0 );
+ MailSourceViewer( TQWidget *parent = 0, const char *name = 0 );
~MailSourceViewer();
- void setText( const QString& text );
+ void setText( const TQString& text );
private:
MailSourceHighlighter *mSourceHighLighter;
};
diff --git a/kmail/managesievescriptsdialog.cpp b/kmail/managesievescriptsdialog.cpp
index 594a467d0..a089c94a6 100644
--- a/kmail/managesievescriptsdialog.cpp
+++ b/kmail/managesievescriptsdialog.cpp
@@ -15,21 +15,21 @@
#include <kglobalsettings.h>
#include <kmessagebox.h>
-#include <qlayout.h>
-#include <qlistview.h>
-#include <qtextedit.h>
-#include <qpopupmenu.h>
+#include <tqlayout.h>
+#include <tqlistview.h>
+#include <tqtextedit.h>
+#include <tqpopupmenu.h>
#include <cassert>
-inline QCheckListItem * qcli_cast( QListViewItem * lvi ) {
- return lvi && lvi->rtti() == 1 ? static_cast<QCheckListItem*>( lvi ) : 0 ;
+inline TQCheckListItem * qcli_cast( TQListViewItem * lvi ) {
+ return lvi && lvi->rtti() == 1 ? static_cast<TQCheckListItem*>( lvi ) : 0 ;
}
-inline const QCheckListItem * qcli_cast( const QListViewItem * lvi ) {
- return lvi && lvi->rtti() == 1 ? static_cast<const QCheckListItem*>( lvi ) : 0 ;
+inline const TQCheckListItem * qcli_cast( const TQListViewItem * lvi ) {
+ return lvi && lvi->rtti() == 1 ? static_cast<const TQCheckListItem*>( lvi ) : 0 ;
}
-KMail::ManageSieveScriptsDialog::ManageSieveScriptsDialog( QWidget * parent, const char * name )
+KMail::ManageSieveScriptsDialog::ManageSieveScriptsDialog( TQWidget * parent, const char * name )
: KDialogBase( Plain, i18n( "Manage Sieve Scripts" ), Close, Close,
parent, name, false ),
mSieveEditor( 0 ),
@@ -39,19 +39,19 @@ KMail::ManageSieveScriptsDialog::ManageSieveScriptsDialog( QWidget * parent, con
setWFlags( WGroupLeader|WDestructiveClose );
KWin::setIcons( winId(), kapp->icon(), kapp->miniIcon() );
- QVBoxLayout * vlay = new QVBoxLayout( plainPage(), 0, 0 );
+ TQVBoxLayout * vlay = new TQVBoxLayout( plainPage(), 0, 0 );
- mListView = new QListView( plainPage() );
+ mListView = new TQListView( plainPage() );
mListView->addColumn( i18n( "Available Scripts" ) );
- mListView->setResizeMode( QListView::LastColumn );
+ mListView->setResizeMode( TQListView::LastColumn );
mListView->setRootIsDecorated( true );
- mListView->setSelectionMode( QListView::Single );
- connect( mListView, SIGNAL(contextMenuRequested(QListViewItem*,const QPoint&,int)),
- this, SLOT(slotContextMenuRequested(QListViewItem*, const QPoint&)) );
- connect( mListView, SIGNAL(doubleClicked(QListViewItem*,const QPoint&,int)),
- this, SLOT(slotDoubleClicked(QListViewItem*)) );
- connect( mListView, SIGNAL(selectionChanged(QListViewItem*)),
- this, SLOT(slotSelectionChanged(QListViewItem*)) );
+ mListView->setSelectionMode( TQListView::Single );
+ connect( mListView, TQT_SIGNAL(contextMenuRequested(TQListViewItem*,const TQPoint&,int)),
+ this, TQT_SLOT(slotContextMenuRequested(TQListViewItem*, const TQPoint&)) );
+ connect( mListView, TQT_SIGNAL(doubleClicked(TQListViewItem*,const TQPoint&,int)),
+ this, TQT_SLOT(slotDoubleClicked(TQListViewItem*)) );
+ connect( mListView, TQT_SIGNAL(selectionChanged(TQListViewItem*)),
+ this, TQT_SLOT(slotSelectionChanged(TQListViewItem*)) );
vlay->addWidget( mListView );
resize( 2 * sizeHint().width(), sizeHint().height() );
@@ -64,7 +64,7 @@ KMail::ManageSieveScriptsDialog::~ManageSieveScriptsDialog() {
}
void KMail::ManageSieveScriptsDialog::killAllJobs() {
- for ( QMap<SieveJob*,QCheckListItem*>::const_iterator it = mJobs.constBegin(), end = mJobs.constEnd() ; it != end ; ++it )
+ for ( TQMap<SieveJob*,TQCheckListItem*>::const_iterator it = mJobs.constBegin(), end = mJobs.constEnd() ; it != end ; ++it )
it.key()->kill();
mJobs.clear();
}
@@ -97,31 +97,31 @@ void KMail::ManageSieveScriptsDialog::slotRefresh() {
KMail::AccountManager * am = kmkernel->acctMgr();
assert( am );
- QCheckListItem * last = 0;
+ TQCheckListItem * last = 0;
for ( KMAccount * a = am->first() ; a ; a = am->next() ) {
- last = new QCheckListItem( mListView, last, a->name(), QCheckListItem::Controller );
+ last = new TQCheckListItem( mListView, last, a->name(), TQCheckListItem::Controller );
last->setPixmap( 0, SmallIcon( "server" ) );
if ( ImapAccountBase * iab = dynamic_cast<ImapAccountBase*>( a ) ) {
const KURL u = ::findUrlForAccount( iab );
if ( u.isEmpty() )
continue;
SieveJob * job = SieveJob::list( u );
- connect( job, SIGNAL(item(KMail::SieveJob*,const QString&,bool)),
- this, SLOT(slotItem(KMail::SieveJob*,const QString&,bool)) );
- connect( job, SIGNAL(result(KMail::SieveJob*,bool,const QString&,bool)),
- this, SLOT(slotResult(KMail::SieveJob*,bool,const QString&,bool)) );
+ connect( job, TQT_SIGNAL(item(KMail::SieveJob*,const TQString&,bool)),
+ this, TQT_SLOT(slotItem(KMail::SieveJob*,const TQString&,bool)) );
+ connect( job, TQT_SIGNAL(result(KMail::SieveJob*,bool,const TQString&,bool)),
+ this, TQT_SLOT(slotResult(KMail::SieveJob*,bool,const TQString&,bool)) );
mJobs.insert( job, last );
mUrls.insert( last, u );
} else {
- QListViewItem * item = new QListViewItem( last, i18n( "No Sieve URL configured" ) );
+ TQListViewItem * item = new TQListViewItem( last, i18n( "No Sieve URL configured" ) );
item->setEnabled( false );
last->setOpen( true );
}
}
}
-void KMail::ManageSieveScriptsDialog::slotResult( KMail::SieveJob * job, bool success, const QString &, bool ) {
- QCheckListItem * parent = mJobs[job];
+void KMail::ManageSieveScriptsDialog::slotResult( KMail::SieveJob * job, bool success, const TQString &, bool ) {
+ TQCheckListItem * parent = mJobs[job];
if ( !parent )
return;
@@ -132,46 +132,46 @@ void KMail::ManageSieveScriptsDialog::slotResult( KMail::SieveJob * job, bool su
if ( success )
return;
- QListViewItem * item = new QListViewItem( parent, i18n( "Failed to fetch the list of scripts" ) );
+ TQListViewItem * item = new TQListViewItem( parent, i18n( "Failed to fetch the list of scripts" ) );
item->setEnabled( false );
}
-void KMail::ManageSieveScriptsDialog::slotItem( KMail::SieveJob * job, const QString & filename, bool isActive ) {
- QCheckListItem * parent = mJobs[job];
+void KMail::ManageSieveScriptsDialog::slotItem( KMail::SieveJob * job, const TQString & filename, bool isActive ) {
+ TQCheckListItem * parent = mJobs[job];
if ( !parent )
return;
- QCheckListItem * item = new QCheckListItem( parent, filename, QCheckListItem::RadioButton );
+ TQCheckListItem * item = new TQCheckListItem( parent, filename, TQCheckListItem::RadioButton );
if ( isActive ) {
item->setOn( true );
mSelectedItems[parent] = item;
}
}
-void KMail::ManageSieveScriptsDialog::slotContextMenuRequested( QListViewItem * i, const QPoint & p ) {
- QCheckListItem * item = qcli_cast( i );
+void KMail::ManageSieveScriptsDialog::slotContextMenuRequested( TQListViewItem * i, const TQPoint & p ) {
+ TQCheckListItem * item = qcli_cast( i );
if ( !item )
return;
if ( !item->depth() && !mUrls.count( item ) )
return;
- QPopupMenu menu;
+ TQPopupMenu menu;
mContextMenuItem = item;
if ( item->depth() ) {
// script items:
- menu.insertItem( i18n( "Delete Script" ), this, SLOT(slotDeleteScript()) );
- menu.insertItem( i18n( "Edit Script..." ), this, SLOT(slotEditScript()) );
+ menu.insertItem( i18n( "Delete Script" ), this, TQT_SLOT(slotDeleteScript()) );
+ menu.insertItem( i18n( "Edit Script..." ), this, TQT_SLOT(slotEditScript()) );
} else {
// top-levels:
- menu.insertItem( i18n( "New Script..." ), this, SLOT(slotNewScript()) );
+ menu.insertItem( i18n( "New Script..." ), this, TQT_SLOT(slotNewScript()) );
}
menu.exec( p );
mContextMenuItem = 0;
}
-void KMail::ManageSieveScriptsDialog::slotSelectionChanged( QListViewItem * i ) {
- QCheckListItem * item = qcli_cast( i );
+void KMail::ManageSieveScriptsDialog::slotSelectionChanged( TQListViewItem * i ) {
+ TQCheckListItem * item = qcli_cast( i );
if ( !item )
return;
- QCheckListItem * parent = qcli_cast( item->parent() );
+ TQCheckListItem * parent = qcli_cast( item->parent() );
if ( !parent )
return;
if ( item->isOn() && mSelectedItems[parent] != item ) {
@@ -180,7 +180,7 @@ void KMail::ManageSieveScriptsDialog::slotSelectionChanged( QListViewItem * i )
}
}
-void KMail::ManageSieveScriptsDialog::changeActiveScript( QCheckListItem * item ) {
+void KMail::ManageSieveScriptsDialog::changeActiveScript( TQCheckListItem * item ) {
if ( !item )
return;
if ( !mUrls.count( item ) )
@@ -190,18 +190,18 @@ void KMail::ManageSieveScriptsDialog::changeActiveScript( QCheckListItem * item
KURL u = mUrls[item];
if ( u.isEmpty() )
return;
- QCheckListItem * selected = mSelectedItems[item];
+ TQCheckListItem * selected = mSelectedItems[item];
if ( !selected )
return;
u.setFileName( selected->text( 0 ) );
SieveJob * job = SieveJob::activate( u );
- connect( job, SIGNAL(result(KMail::SieveJob*,bool,const QString&,bool)),
- this, SLOT(slotRefresh()) );
+ connect( job, TQT_SIGNAL(result(KMail::SieveJob*,bool,const TQString&,bool)),
+ this, TQT_SLOT(slotRefresh()) );
}
-void KMail::ManageSieveScriptsDialog::slotDoubleClicked( QListViewItem * i ) {
- QCheckListItem * item = qcli_cast( i );
+void KMail::ManageSieveScriptsDialog::slotDoubleClicked( TQListViewItem * i ) {
+ TQCheckListItem * item = qcli_cast( i );
if ( !item )
return;
if ( !item->depth() )
@@ -217,7 +217,7 @@ void KMail::ManageSieveScriptsDialog::slotDeleteScript() {
if ( !mContextMenuItem->depth() )
return;
- QCheckListItem * parent = qcli_cast( mContextMenuItem->parent() );
+ TQCheckListItem * parent = qcli_cast( mContextMenuItem->parent() );
if ( !parent )
return;
@@ -237,8 +237,8 @@ void KMail::ManageSieveScriptsDialog::slotDeleteScript() {
return;
SieveJob * job = SieveJob::del( u );
- connect( job, SIGNAL(result(KMail::SieveJob*,bool,const QString&,bool)),
- this, SLOT(slotRefresh()) );
+ connect( job, TQT_SIGNAL(result(KMail::SieveJob*,bool,const TQString&,bool)),
+ this, TQT_SLOT(slotRefresh()) );
}
void KMail::ManageSieveScriptsDialog::slotEditScript() {
@@ -246,7 +246,7 @@ void KMail::ManageSieveScriptsDialog::slotEditScript() {
return;
if ( !mContextMenuItem->depth() )
return;
- QCheckListItem * parent = qcli_cast( mContextMenuItem->parent() );
+ TQCheckListItem * parent = qcli_cast( mContextMenuItem->parent() );
if ( !mUrls.count( parent ) )
return;
KURL url = mUrls[parent];
@@ -255,8 +255,8 @@ void KMail::ManageSieveScriptsDialog::slotEditScript() {
url.setFileName( mContextMenuItem->text( 0 ) );
mCurrentURL = url;
SieveJob * job = SieveJob::get( url );
- connect( job, SIGNAL(result(KMail::SieveJob*,bool,const QString&,bool)),
- this, SLOT(slotGetResult(KMail::SieveJob*,bool,const QString&,bool)) );
+ connect( job, TQT_SIGNAL(result(KMail::SieveJob*,bool,const TQString&,bool)),
+ this, TQT_SLOT(slotGetResult(KMail::SieveJob*,bool,const TQString&,bool)) );
}
void KMail::ManageSieveScriptsDialog::slotNewScript() {
@@ -275,7 +275,7 @@ void KMail::ManageSieveScriptsDialog::slotNewScript() {
return;
bool ok = false;
- const QString name = KInputDialog::getText( i18n( "New Sieve Script" ),
+ const TQString name = KInputDialog::getText( i18n( "New Sieve Script" ),
i18n( "Please enter a name for the new Sieve script:" ),
i18n( "unnamed" ), &ok, this );
if ( !ok || name.isEmpty() )
@@ -283,20 +283,20 @@ void KMail::ManageSieveScriptsDialog::slotNewScript() {
u.setFileName( name );
- (void) new QCheckListItem( mContextMenuItem, name, QCheckListItem::RadioButton );
+ (void) new TQCheckListItem( mContextMenuItem, name, TQCheckListItem::RadioButton );
mCurrentURL = u;
- slotGetResult( 0, true, QString::null, false );
+ slotGetResult( 0, true, TQString::null, false );
}
-KMail::SieveEditor::SieveEditor( QWidget * parent, const char * name )
+KMail::SieveEditor::SieveEditor( TQWidget * parent, const char * name )
: KDialogBase( Plain, i18n( "Edit Sieve Script" ), Ok|Cancel, Ok, parent, name )
{
- QVBoxLayout * vlay = new QVBoxLayout( plainPage(), 0, spacingHint() );
- mTextEdit = new QTextEdit( plainPage() );
+ TQVBoxLayout * vlay = new TQVBoxLayout( plainPage(), 0, spacingHint() );
+ mTextEdit = new TQTextEdit( plainPage() );
vlay->addWidget( mTextEdit );
- mTextEdit->setTextFormat( QTextEdit::PlainText );
- mTextEdit->setWordWrap( QTextEdit::NoWrap );
+ mTextEdit->setTextFormat( TQTextEdit::PlainText );
+ mTextEdit->setWordWrap( TQTextEdit::NoWrap );
mTextEdit->setFont( KGlobalSettings::fixedFont() );
resize( 3 * sizeHint() );
@@ -304,7 +304,7 @@ KMail::SieveEditor::SieveEditor( QWidget * parent, const char * name )
KMail::SieveEditor::~SieveEditor() {}
-void KMail::ManageSieveScriptsDialog::slotGetResult( KMail::SieveJob *, bool success, const QString & script, bool isActive ) {
+void KMail::ManageSieveScriptsDialog::slotGetResult( KMail::SieveJob *, bool success, const TQString & script, bool isActive ) {
if ( !success )
return;
@@ -313,8 +313,8 @@ void KMail::ManageSieveScriptsDialog::slotGetResult( KMail::SieveJob *, bool suc
mSieveEditor = new SieveEditor( this );
mSieveEditor->setScript( script );
- connect( mSieveEditor, SIGNAL(okClicked()), this, SLOT(slotSieveEditorOkClicked()) );
- connect( mSieveEditor, SIGNAL(cancelClicked()), this, SLOT(slotSieveEditorCancelClicked()) );
+ connect( mSieveEditor, TQT_SIGNAL(okClicked()), this, TQT_SLOT(slotSieveEditorOkClicked()) );
+ connect( mSieveEditor, TQT_SIGNAL(cancelClicked()), this, TQT_SLOT(slotSieveEditorCancelClicked()) );
mSieveEditor->show();
mWasActive = isActive;
}
@@ -323,8 +323,8 @@ void KMail::ManageSieveScriptsDialog::slotSieveEditorOkClicked() {
if ( !mSieveEditor )
return;
SieveJob * job = SieveJob::put( mCurrentURL,mSieveEditor->script(), mWasActive, mWasActive );
- connect( job, SIGNAL(result(KMail::SieveJob*,bool,const QString&,bool)),
- this, SLOT(slotPutResult(KMail::SieveJob*,bool)) );
+ connect( job, TQT_SIGNAL(result(KMail::SieveJob*,bool,const TQString&,bool)),
+ this, TQT_SLOT(slotPutResult(KMail::SieveJob*,bool)) );
}
void KMail::ManageSieveScriptsDialog::slotSieveEditorCancelClicked() {
diff --git a/kmail/managesievescriptsdialog.h b/kmail/managesievescriptsdialog.h
index f0b99ebc3..f4167a0d7 100644
--- a/kmail/managesievescriptsdialog.h
+++ b/kmail/managesievescriptsdialog.h
@@ -3,7 +3,7 @@
#include <kdialogbase.h>
#include <kurl.h>
-#include <qmap.h>
+#include <tqmap.h>
class QListView;
class QCheckListItem;
@@ -16,35 +16,35 @@ class SieveEditor;
class ManageSieveScriptsDialog : public KDialogBase {
Q_OBJECT
public:
- ManageSieveScriptsDialog( QWidget * parent=0, const char * name=0 );
+ ManageSieveScriptsDialog( TQWidget * parent=0, const char * name=0 );
~ManageSieveScriptsDialog();
private slots:
void slotRefresh();
- void slotItem( KMail::SieveJob *, const QString &, bool );
- void slotResult( KMail::SieveJob *, bool, const QString &, bool );
- void slotContextMenuRequested( QListViewItem *, const QPoint & );
- void slotDoubleClicked( QListViewItem * );
- void slotSelectionChanged( QListViewItem * );
+ void slotItem( KMail::SieveJob *, const TQString &, bool );
+ void slotResult( KMail::SieveJob *, bool, const TQString &, bool );
+ void slotContextMenuRequested( TQListViewItem *, const TQPoint & );
+ void slotDoubleClicked( TQListViewItem * );
+ void slotSelectionChanged( TQListViewItem * );
void slotNewScript();
void slotEditScript();
void slotDeleteScript();
- void slotGetResult( KMail::SieveJob *, bool, const QString &, bool );
+ void slotGetResult( KMail::SieveJob *, bool, const TQString &, bool );
void slotPutResult( KMail::SieveJob *, bool );
void slotSieveEditorOkClicked();
void slotSieveEditorCancelClicked();
private:
void killAllJobs();
- void changeActiveScript( QCheckListItem * );
+ void changeActiveScript( TQCheckListItem * );
private:
- QListView * mListView;
+ TQListView * mListView;
SieveEditor * mSieveEditor;
- QMap<KMail::SieveJob*,QCheckListItem*> mJobs;
- QMap<QCheckListItem*,KURL> mUrls;
- QMap<QCheckListItem*,QCheckListItem*> mSelectedItems;
- QCheckListItem * mContextMenuItem;
+ TQMap<KMail::SieveJob*,TQCheckListItem*> mJobs;
+ TQMap<TQCheckListItem*,KURL> mUrls;
+ TQMap<TQCheckListItem*,TQCheckListItem*> mSelectedItems;
+ TQCheckListItem * mContextMenuItem;
KURL mCurrentURL;
bool mWasActive : 1;
};
diff --git a/kmail/managesievescriptsdialog_p.h b/kmail/managesievescriptsdialog_p.h
index d46b2d11a..83fde06b0 100644
--- a/kmail/managesievescriptsdialog_p.h
+++ b/kmail/managesievescriptsdialog_p.h
@@ -3,22 +3,22 @@
#include <kdialogbase.h>
-#include <qtextedit.h>
+#include <tqtextedit.h>
namespace KMail {
class SieveEditor : public KDialogBase {
Q_OBJECT
- Q_PROPERTY( QString script READ script WRITE setScript )
+ Q_PROPERTY( TQString script READ script WRITE setScript )
public:
- SieveEditor( QWidget * parent=0, const char * name=0 );
+ SieveEditor( TQWidget * parent=0, const char * name=0 );
~SieveEditor();
- QString script() const { return mTextEdit->text(); }
- void setScript( const QString & script ) { mTextEdit->setText( script ); }
+ TQString script() const { return mTextEdit->text(); }
+ void setScript( const TQString & script ) { mTextEdit->setText( script ); }
private:
- QTextEdit * mTextEdit;
+ TQTextEdit * mTextEdit;
};
}
diff --git a/kmail/mboxjob.cpp b/kmail/mboxjob.cpp
index ee2cc7a39..1b6b32233 100644
--- a/kmail/mboxjob.cpp
+++ b/kmail/mboxjob.cpp
@@ -39,8 +39,8 @@
#include <kapplication.h>
#include <kdebug.h>
-#include <qtimer.h>
-#include <qdatetime.h>
+#include <tqtimer.h>
+#include <tqdatetime.h>
namespace KMail {
@@ -52,7 +52,7 @@ MboxJob::MboxJob( KMMessage *msg, JobType jt , KMFolder *folder )
}
//-----------------------------------------------------------------------------
-MboxJob::MboxJob( QPtrList<KMMessage>& msgList, const QString& sets,
+MboxJob::MboxJob( TQPtrList<KMMessage>& msgList, const TQString& sets,
JobType jt, KMFolder *folder )
: FolderJob( msgList, sets, jt, folder )
{
@@ -67,7 +67,7 @@ MboxJob::~MboxJob()
void
MboxJob::execute()
{
- QTimer::singleShot( 0, this, SLOT(startJob()) );
+ TQTimer::singleShot( 0, this, TQT_SLOT(startJob()) );
}
//-----------------------------------------------------------------------------
diff --git a/kmail/mboxjob.h b/kmail/mboxjob.h
index a9318a5e9..406edef7d 100644
--- a/kmail/mboxjob.h
+++ b/kmail/mboxjob.h
@@ -44,7 +44,7 @@ class MboxJob : public FolderJob
friend class ::KMFolderMbox;
public:
MboxJob( KMMessage *msg, JobType jt = tGetMessage, KMFolder *folder = 0 );
- MboxJob( QPtrList<KMMessage>& msgList, const QString& sets,
+ MboxJob( TQPtrList<KMMessage>& msgList, const TQString& sets,
JobType jt = tGetMessage, KMFolder *folder = 0 );
virtual ~MboxJob();
protected:
diff --git a/kmail/messageactions.cpp b/kmail/messageactions.cpp
index 5c655cc34..b900b7b59 100644
--- a/kmail/messageactions.cpp
+++ b/kmail/messageactions.cpp
@@ -28,12 +28,12 @@
#include <kdebug.h>
#include <klocale.h>
-#include <qwidget.h>
+#include <tqwidget.h>
using namespace KMail;
-MessageActions::MessageActions( KActionCollection *ac, QWidget * parent ) :
- QObject( parent ),
+MessageActions::MessageActions( KActionCollection *ac, TQWidget * parent ) :
+ TQObject( parent ),
mParent( parent ),
mActionCollection( ac ),
mCurrentMessage( 0 ),
@@ -42,36 +42,36 @@ MessageActions::MessageActions( KActionCollection *ac, QWidget * parent ) :
mReplyActionMenu = new KActionMenu( i18n("Message->","&Reply"),
"mail_reply", mActionCollection,
"message_reply_menu" );
- connect( mReplyActionMenu, SIGNAL(activated()), this,
- SLOT(slotReplyToMsg()) );
+ connect( mReplyActionMenu, TQT_SIGNAL(activated()), this,
+ TQT_SLOT(slotReplyToMsg()) );
mReplyAction = new KAction( i18n("&Reply..."), "mail_reply", Key_R, this,
- SLOT(slotReplyToMsg()), mActionCollection, "reply" );
+ TQT_SLOT(slotReplyToMsg()), mActionCollection, "reply" );
mReplyActionMenu->insert( mReplyAction );
mReplyAuthorAction = new KAction( i18n("Reply to A&uthor..."), "mail_reply",
SHIFT+Key_A, this,
- SLOT(slotReplyAuthorToMsg()),
+ TQT_SLOT(slotReplyAuthorToMsg()),
mActionCollection, "reply_author" );
mReplyActionMenu->insert( mReplyAuthorAction );
mReplyAllAction = new KAction( i18n("Reply to &All..."), "mail_replyall",
- Key_A, this, SLOT(slotReplyAllToMsg()),
+ Key_A, this, TQT_SLOT(slotReplyAllToMsg()),
mActionCollection, "reply_all" );
mReplyActionMenu->insert( mReplyAllAction );
mReplyListAction = new KAction( i18n("Reply to Mailing-&List..."),
"mail_replylist", Key_L, this,
- SLOT(slotReplyListToMsg()), mActionCollection,
+ TQT_SLOT(slotReplyListToMsg()), mActionCollection,
"reply_list" );
mReplyActionMenu->insert( mReplyListAction );
mNoQuoteReplyAction = new KAction( i18n("Reply Without &Quote..."), SHIFT+Key_R,
- this, SLOT(slotNoQuoteReplyToMsg()), mActionCollection, "noquotereply" );
+ this, TQT_SLOT(slotNoQuoteReplyToMsg()), mActionCollection, "noquotereply" );
mCreateTodoAction = new KAction( i18n("Create Task/Reminder..."), "mail_todo",
- 0, this, SLOT(slotCreateTodo()), mActionCollection,
+ 0, this, TQT_SLOT(slotCreateTodo()), mActionCollection,
"create_todo" );
@@ -80,35 +80,35 @@ MessageActions::MessageActions( KActionCollection *ac, QWidget * parent ) :
mStatusMenu->insert(new KAction(KGuiItem(i18n("Mark Message as &Read"), "kmmsgread",
i18n("Mark selected messages as read")),
- 0, this, SLOT(slotSetMsgStatusRead()),
+ 0, this, TQT_SLOT(slotSetMsgStatusRead()),
mActionCollection, "status_read"));
mStatusMenu->insert(new KAction(KGuiItem(i18n("Mark Message as &New"), "kmmsgnew",
i18n("Mark selected messages as new")),
- 0, this, SLOT(slotSetMsgStatusNew()),
+ 0, this, TQT_SLOT(slotSetMsgStatusNew()),
mActionCollection, "status_new" ));
mStatusMenu->insert(new KAction(KGuiItem(i18n("Mark Message as &Unread"), "kmmsgunseen",
i18n("Mark selected messages as unread")),
- 0, this, SLOT(slotSetMsgStatusUnread()),
+ 0, this, TQT_SLOT(slotSetMsgStatusUnread()),
mActionCollection, "status_unread"));
mStatusMenu->insert( new KActionSeparator( this ) );
mToggleFlagAction = new KToggleAction(i18n("Mark Message as &Important"), "mail_flag",
- 0, this, SLOT(slotSetMsgStatusFlag()),
+ 0, this, TQT_SLOT(slotSetMsgStatusFlag()),
mActionCollection, "status_flag");
mToggleFlagAction->setCheckedState( i18n("Remove &Important Message Mark") );
mStatusMenu->insert( mToggleFlagAction );
mToggleTodoAction = new KToggleAction(i18n("Mark Message as &Action Item"), "mail_todo",
- 0, this, SLOT(slotSetMsgStatusTodo()),
+ 0, this, TQT_SLOT(slotSetMsgStatusTodo()),
mActionCollection, "status_todo");
mToggleTodoAction->setCheckedState( i18n("Remove &Action Item Message Mark") );
mStatusMenu->insert( mToggleTodoAction );
mEditAction = new KAction( i18n("&Edit Message"), "edit", Key_T, this,
- SLOT(editCurrentMessage()), mActionCollection, "edit" );
+ TQT_SLOT(editCurrentMessage()), mActionCollection, "edit" );
mEditAction->plugAccel( mActionCollection->kaccel() );
updateActions();
@@ -124,13 +124,13 @@ void MessageActions::setCurrentMessage(KMMessage * msg)
updateActions();
}
-void MessageActions::setSelectedSernums(const QValueList< Q_UINT32 > & sernums)
+void MessageActions::setSelectedSernums(const TQValueList< Q_UINT32 > & sernums)
{
mSelectedSernums = sernums;
updateActions();
}
-void MessageActions::setSelectedVisibleSernums(const QValueList< Q_UINT32 > & sernums)
+void MessageActions::setSelectedVisibleSernums(const TQValueList< Q_UINT32 > & sernums)
{
mVisibleSernums = sernums;
updateActions();
@@ -232,7 +232,7 @@ void MessageActions::slotSetMsgStatusTodo()
void MessageActions::setMessageStatus( KMMsgStatus status, bool toggle )
{
- QValueList<Q_UINT32> serNums = mVisibleSernums;
+ TQValueList<Q_UINT32> serNums = mVisibleSernums;
if ( serNums.isEmpty() && mCurrentMessage )
serNums.append( mCurrentMessage->getMsgSerNum() );
if ( serNums.empty() )
diff --git a/kmail/messageactions.h b/kmail/messageactions.h
index 6761a0667..3307f15fb 100644
--- a/kmail/messageactions.h
+++ b/kmail/messageactions.h
@@ -22,8 +22,8 @@
#include "kmcommands.h"
#include "kmreaderwin.h"
-#include <qobject.h>
-#include <qvaluelist.h>
+#include <tqobject.h>
+#include <tqvaluelist.h>
class QWidget;
class KAction;
@@ -40,12 +40,12 @@ class MessageActions : public QObject
{
Q_OBJECT
public:
- MessageActions( KActionCollection* ac, QWidget *parent );
+ MessageActions( KActionCollection* ac, TQWidget *parent );
void setMessageView( KMReaderWin *msgView );
void setCurrentMessage( KMMessage *msg );
- void setSelectedSernums( const QValueList<Q_UINT32> &sernums );
- void setSelectedVisibleSernums( const QValueList<Q_UINT32> &sernums );
+ void setSelectedSernums( const TQValueList<Q_UINT32> &sernums );
+ void setSelectedVisibleSernums( const TQValueList<Q_UINT32> &sernums );
KActionMenu* replyMenu() const { return mReplyActionMenu; }
KAction* replyListAction() const { return mReplyListAction; }
@@ -64,7 +64,7 @@ class MessageActions : public QObject
{
if ( !mCurrentMessage )
return;
- const QString text = mMessageView ? mMessageView->copyText() : "";
+ const TQString text = mMessageView ? mMessageView->copyText() : "";
KMCommand *command = new T( mParent, mCurrentMessage, text );
command->start();
}
@@ -84,11 +84,11 @@ class MessageActions : public QObject
void slotSetMsgStatusFlag();
private:
- QWidget *mParent;
+ TQWidget *mParent;
KActionCollection *mActionCollection;
KMMessage* mCurrentMessage;
- QValueList<Q_UINT32> mSelectedSernums;
- QValueList<Q_UINT32> mVisibleSernums;
+ TQValueList<Q_UINT32> mSelectedSernums;
+ TQValueList<Q_UINT32> mVisibleSernums;
KMReaderWin *mMessageView;
KActionMenu *mReplyActionMenu;
diff --git a/kmail/messagecomposer.cpp b/kmail/messagecomposer.cpp
index 2cf5b8138..8d9950738 100644
--- a/kmail/messagecomposer.cpp
+++ b/kmail/messagecomposer.cpp
@@ -74,10 +74,10 @@
#include <kinputdialog.h>
#include <kdebug.h>
#include <kaction.h>
-#include <qfile.h>
-#include <qtextcodec.h>
-#include <qtextedit.h>
-#include <qtimer.h>
+#include <tqfile.h>
+#include <tqtextcodec.h>
+#include <tqtextedit.h>
+#include <tqtimer.h>
#include <gpgmepp/key.h>
#include <gpgmepp/keylistresult.h>
@@ -218,11 +218,11 @@ static inline int signingChainCertNearExpiryWarningThresholdInDays() {
"Encrypt whenever possible" (aka opportunistic encryption).
*/
-static QString mErrorProcessingStructuringInfo =
+static TQString mErrorProcessingStructuringInfo =
i18n("<qt><p>Structuring information returned by the Crypto plug-in "
"could not be processed correctly; the plug-in might be damaged.</p>"
"<p>Please contact your system administrator.</p></qt>");
-static QString mErrorNoCryptPlugAndNoBuildIn =
+static TQString mErrorNoCryptPlugAndNoBuildIn =
i18n("<p>No active Crypto Plug-In was found and the built-in OpenPGP code "
"did not run successfully.</p>"
"<p>You can do two things to change this:</p>"
@@ -287,7 +287,7 @@ public:
};
MessageComposer::MessageComposer( KMComposeWin* win, const char* name )
- : QObject( win, name ), mComposeWin( win ), mCurrentJob( 0 ),
+ : TQObject( win, name ), mComposeWin( win ), mCurrentJob( 0 ),
mReferenceMessage( 0 ), mKeyResolver( 0 ),
mUseOpportunisticEncryption( false ),
mSignBody( false ), mEncryptBody( false ),
@@ -319,7 +319,7 @@ void MessageComposer::applyChanges( bool disableCrypto )
{
// Do the initial setup
if( getenv("KMAIL_DEBUG_COMPOSER_CRYPTO") != 0 ) {
- QCString cE = getenv("KMAIL_DEBUG_COMPOSER_CRYPTO");
+ TQCString cE = getenv("KMAIL_DEBUG_COMPOSER_CRYPTO");
mDebugComposerCrypto = cE == "1" || cE.upper() == "ON" || cE.upper() == "TRUE";
kdDebug(5006) << "KMAIL_DEBUG_COMPOSER_CRYPTO = TRUE" << endl;
} else {
@@ -372,13 +372,13 @@ void MessageComposer::doNextJob()
}
// We have more jobs to do, but allow others to come first
- QTimer::singleShot( 0, this, SLOT( slotDoNextJob() ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( slotDoNextJob() ) );
}
void MessageComposer::emitDone( bool b )
{
// Save memory - before sending the mail
- mEncodedBody = QByteArray();
+ mEncodedBody = TQByteArray();
delete mNewBodyPart; mNewBodyPart = 0;
mOldBodyPart.clear();
emit done( b );
@@ -437,7 +437,7 @@ void MessageComposer::readFromComposeWin()
mAllowedCryptoMessageFormats = mComposeWin->cryptoMessageFormat();
if( mAutoCharset ) {
- QCString charset = KMMsgBase::autoDetectCharset( mCharset, KMMessage::preferredCharsets(), mComposeWin->mEditor->text() );
+ TQCString charset = KMMsgBase::autoDetectCharset( mCharset, KMMessage::preferredCharsets(), mComposeWin->mEditor->text() );
if( charset.isEmpty() )
{
KMessageBox::sorry( mComposeWin,
@@ -474,9 +474,9 @@ void MessageComposer::readFromComposeWin()
if (id.isDefault())
mReferenceMessage->removeHeaderField("X-KMail-Identity");
- else mReferenceMessage->setHeaderField("X-KMail-Identity", QString::number( id.uoid() ));
+ else mReferenceMessage->setHeaderField("X-KMail-Identity", TQString::number( id.uoid() ));
- QString replyAddr;
+ TQString replyAddr;
if (!mComposeWin->replyTo().isEmpty()) replyAddr = mComposeWin->replyTo();
else replyAddr = mComposeWin->from();
@@ -495,7 +495,7 @@ void MessageComposer::readFromComposeWin()
int num = GlobalSettings::self()->custHeaderCount();
for(int ix=0; ix<num; ix++) {
- CustomMimeHeader customMimeHeader( QString::number(ix) );
+ CustomMimeHeader customMimeHeader( TQString::number(ix) );
customMimeHeader.readConfig();
mReferenceMessage->setHeaderField(
KMMsgBase::toUsAscii( customMimeHeader.custHeaderName() ),
@@ -530,8 +530,8 @@ void MessageComposer::readFromComposeWin()
mLineBreakColumn = mComposeWin->mEditor->lineBreakColumn();
}
-static QCString escape_quoted_string( const QCString & str ) {
- QCString result;
+static TQCString escape_quoted_string( const TQCString & str ) {
+ TQCString result;
const unsigned int str_len = str.length();
result.resize( 2*str_len + 1 );
char * d = result.data();
@@ -548,12 +548,12 @@ static QCString escape_quoted_string( const QCString & str ) {
}
bool MessageComposer::encryptWithChiasmus( const Kleo::CryptoBackend::Protocol * chiasmus,
- const QByteArray& body,
- QByteArray& resultData )
+ const TQByteArray& body,
+ TQByteArray& resultData )
{
- std::auto_ptr<Kleo::SpecialJob> job( chiasmus->specialJob( "x-encrypt", QMap<QString,QVariant>() ) );
+ std::auto_ptr<Kleo::SpecialJob> job( chiasmus->specialJob( "x-encrypt", TQMap<TQString,TQVariant>() ) );
if ( !job.get() ) {
- const QString msg = i18n( "Chiasmus backend does not offer the "
+ const TQString msg = i18n( "Chiasmus backend does not offer the "
"\"x-encrypt\" function. Please report this bug." );
KMessageBox::error( mComposeWin, msg, i18n( "Chiasmus Backend Error" ) );
return false;
@@ -561,7 +561,7 @@ bool MessageComposer::encryptWithChiasmus( const Kleo::CryptoBackend::Protocol *
if ( !job->setProperty( "key", GlobalSettings::chiasmusKey() ) ||
!job->setProperty( "options", GlobalSettings::chiasmusOptions() ) ||
!job->setProperty( "input", body ) ) {
- const QString msg = i18n( "The \"x-encrypt\" function does not accept "
+ const TQString msg = i18n( "The \"x-encrypt\" function does not accept "
"the expected parameters. Please report this bug." );
KMessageBox::error( mComposeWin, msg, i18n( "Chiasmus Backend Error" ) );
return false;
@@ -572,9 +572,9 @@ bool MessageComposer::encryptWithChiasmus( const Kleo::CryptoBackend::Protocol *
job->showErrorDialog( mComposeWin, i18n( "Chiasmus Encryption Error" ) );
return false;
}
- const QVariant result = job->property( "result" );
- if ( result.type() != QVariant::ByteArray ) {
- const QString msg = i18n( "Unexpected return value from Chiasmus backend: "
+ const TQVariant result = job->property( "result" );
+ if ( result.type() != TQVariant::ByteArray ) {
+ const TQString msg = i18n( "Unexpected return value from Chiasmus backend: "
"The \"x-encrypt\" function did not return a "
"byte array. Please report this bug." );
KMessageBox::error( mComposeWin, msg, i18n( "Chiasmus Backend Error" ) );
@@ -595,30 +595,30 @@ void MessageComposer::chiasmusEncryptAllAttachments() {
assert( chiasmus ); // kmcomposewin code should have made sure
- for ( QValueVector<Attachment>::iterator it = mAttachments.begin(), end = mAttachments.end() ; it != end ; ++it ) {
+ for ( TQValueVector<Attachment>::iterator it = mAttachments.begin(), end = mAttachments.end() ; it != end ; ++it ) {
KMMessagePart * part = it->part;
- const QString filename = part->fileName();
+ const TQString filename = part->fileName();
if ( filename.endsWith( ".xia", false ) )
continue; // already encrypted
- const QByteArray body = part->bodyDecodedBinary();
- QByteArray resultData;
+ const TQByteArray body = part->bodyDecodedBinary();
+ TQByteArray resultData;
if ( !encryptWithChiasmus( chiasmus, body, resultData ) ) {
mRc = false;
return;
}
// everything ok, so let's fill in the part again:
- QValueList<int> dummy;
+ TQValueList<int> dummy;
part->setBodyAndGuessCte( resultData, dummy );
part->setTypeStr( "application" );
part->setSubtypeStr( "vnd.de.bund.bsi.chiasmus" );
part->setName( filename + ".xia" );
// this is taken from kmmsgpartdlg.cpp:
- QCString encoding = KMMsgBase::autoDetectCharset( part->charset(), KMMessage::preferredCharsets(), filename );
+ TQCString encoding = KMMsgBase::autoDetectCharset( part->charset(), KMMessage::preferredCharsets(), filename );
if ( encoding.isEmpty() )
encoding = "utf-8";
- const QCString enc_name = KMMsgBase::encodeRFC2231String( filename + ".xia", encoding );
- const QCString cDisp = "attachment;\n\tfilename"
- + ( QString( enc_name ) != filename + ".xia"
+ const TQCString enc_name = KMMsgBase::encodeRFC2231String( filename + ".xia", encoding );
+ const TQCString cDisp = "attachment;\n\tfilename"
+ + ( TQString( enc_name ) != filename + ".xia"
? "*=" + enc_name
: "=\"" + escape_quoted_string( enc_name ) + '\"' );
part->setContentDisposition( cDisp );
@@ -683,7 +683,7 @@ void MessageComposer::adjustCryptFlags()
const KPIM::Identity & id =
kmkernel->identityManager()->identityForUoidOrDefault( mIdentityUid );
- QStringList encryptToSelfKeys;
+ TQStringList encryptToSelfKeys;
if ( !id.pgpEncryptionKey().isEmpty() )
encryptToSelfKeys.push_back( id.pgpEncryptionKey() );
if ( !id.smimeEncryptionKey().isEmpty() )
@@ -693,7 +693,7 @@ void MessageComposer::adjustCryptFlags()
return;
}
- QStringList signKeys;
+ TQStringList signKeys;
if ( !id.pgpSigningKey().isEmpty() )
signKeys.push_back( mPGPSigningKey = id.pgpSigningKey() );
if ( !id.smimeSigningKey().isEmpty() )
@@ -757,7 +757,7 @@ bool MessageComposer::determineWhetherToSign( bool doSignCompletely ) {
{
// the user wants to be asked or has to be asked
const KCursorSaver idle( KBusyPtr::idle() );
- const QString msg = i18n("Examination of the recipient's signing preferences "
+ const TQString msg = i18n("Examination of the recipient's signing preferences "
"yielded that you be asked whether or not to sign "
"this message.\n"
"Sign this message?");
@@ -781,7 +781,7 @@ bool MessageComposer::determineWhetherToSign( bool doSignCompletely ) {
{
// warn the user that there are conflicting signing preferences
const KCursorSaver idle( KBusyPtr::idle() );
- const QString msg = i18n("There are conflicting signing preferences "
+ const TQString msg = i18n("There are conflicting signing preferences "
"for these recipients.\n"
"Sign this message?");
switch ( KMessageBox::warningYesNoCancel( mComposeWin, msg,
@@ -803,7 +803,7 @@ bool MessageComposer::determineWhetherToSign( bool doSignCompletely ) {
case Kleo::Impossible:
{
const KCursorSaver idle( KBusyPtr::idle() );
- const QString msg = i18n("You have requested to sign this message, "
+ const TQString msg = i18n("You have requested to sign this message, "
"but no valid signing keys have been configured "
"for this identity.");
if ( KMessageBox::warningContinueCancel( mComposeWin, msg,
@@ -822,14 +822,14 @@ bool MessageComposer::determineWhetherToSign( bool doSignCompletely ) {
if ( !sign || !doSignCompletely ) {
if ( warnSendUnsigned() ) {
const KCursorSaver idle( KBusyPtr::idle() );
- const QString msg = sign && !doSignCompletely
+ const TQString msg = sign && !doSignCompletely
? i18n("Some parts of this message will not be signed.\n"
"Sending only partially signed messages might violate site policy.\n"
"Sign all parts instead?") // oh, I hate this...
: i18n("This message will not be signed.\n"
"Sending unsigned message might violate site policy.\n"
"Sign message instead?") ; // oh, I hate this...
- const QString buttonText = sign && !doSignCompletely
+ const TQString buttonText = sign && !doSignCompletely
? i18n("&Sign All Parts") : i18n("&Sign") ;
switch ( KMessageBox::warningYesNoCancel( mComposeWin, msg,
i18n("Unsigned-Message Warning"),
@@ -871,7 +871,7 @@ bool MessageComposer::determineWhetherToEncrypt( bool doEncryptCompletely ) {
{
// the user wants to be asked or has to be asked
const KCursorSaver idle( KBusyPtr::idle() );
- const QString msg = opportunistic
+ const TQString msg = opportunistic
? i18n("Valid trusted encryption keys were found for all recipients.\n"
"Encrypt this message?")
: i18n("Examination of the recipient's encryption preferences "
@@ -902,7 +902,7 @@ bool MessageComposer::determineWhetherToEncrypt( bool doEncryptCompletely ) {
{
// warn the user that there are conflicting encryption preferences
const KCursorSaver idle( KBusyPtr::idle() );
- const QString msg = i18n("There are conflicting encryption preferences "
+ const TQString msg = i18n("There are conflicting encryption preferences "
"for these recipients.\n"
"Encrypt this message?");
switch ( KMessageBox::warningYesNoCancel( mComposeWin, msg,
@@ -924,7 +924,7 @@ bool MessageComposer::determineWhetherToEncrypt( bool doEncryptCompletely ) {
case Kleo::Impossible:
{
const KCursorSaver idle( KBusyPtr::idle() );
- const QString msg = i18n("You have requested to encrypt this message, "
+ const TQString msg = i18n("You have requested to encrypt this message, "
"and to encrypt a copy to yourself, "
"but no valid trusted encryption keys have been "
"configured for this identity.");
@@ -944,7 +944,7 @@ bool MessageComposer::determineWhetherToEncrypt( bool doEncryptCompletely ) {
if ( !encrypt || !doEncryptCompletely ) {
if ( warnSendUnencrypted() ) {
const KCursorSaver idle( KBusyPtr::idle() );
- const QString msg = !doEncryptCompletely
+ const TQString msg = !doEncryptCompletely
? i18n("Some parts of this message will not be encrypted.\n"
"Sending only partially encrypted messages might violate site policy "
"and/or leak sensitive information.\n"
@@ -953,7 +953,7 @@ bool MessageComposer::determineWhetherToEncrypt( bool doEncryptCompletely ) {
"Sending unencrypted messages might violate site policy and/or "
"leak sensitive information.\n"
"Encrypt messages instead?") ; // oh, I hate this...
- const QString buttonText = !doEncryptCompletely
+ const TQString buttonText = !doEncryptCompletely
? i18n("&Encrypt All Parts") : i18n("&Encrypt") ;
switch ( KMessageBox::warningYesNoCancel( mComposeWin, msg,
i18n("Unencrypted Message Warning"),
@@ -978,13 +978,13 @@ bool MessageComposer::determineWhetherToEncrypt( bool doEncryptCompletely ) {
void MessageComposer::markAllAttachmentsForSigning( bool sign ) {
mSignBody = sign;
- for ( QValueVector<Attachment>::iterator it = mAttachments.begin() ; it != mAttachments.end() ; ++it )
+ for ( TQValueVector<Attachment>::iterator it = mAttachments.begin() ; it != mAttachments.end() ; ++it )
it->sign = sign;
}
void MessageComposer::markAllAttachmentsForEncryption( bool enc ) {
mEncryptBody = enc;
- for ( QValueVector<Attachment>::iterator it = mAttachments.begin() ; it != mAttachments.end() ; ++it )
+ for ( TQValueVector<Attachment>::iterator it = mAttachments.begin() ; it != mAttachments.end() ; ++it )
it->encrypt = enc;
}
@@ -1145,7 +1145,7 @@ static inline GpgME::Context::SignatureMode signingMode( Kleo::CryptoMessageForm
class EncryptMessageJob : public MessageComposerJob {
public:
EncryptMessageJob( KMMessage* msg, const Kleo::KeyResolver::SplitInfo & si,
- bool doSign, bool doEncrypt, const QByteArray& encodedBody,
+ bool doSign, bool doEncrypt, const TQByteArray& encodedBody,
int boundaryLevel, /*const KMMessagePart& oldBodyPart,*/
KMMessagePart* newBodyPart, Kleo::CryptoMessageFormat format,
MessageComposer* composer )
@@ -1173,7 +1173,7 @@ private:
KMMessage* mMsg;
Kleo::KeyResolver::SplitInfo mSplitInfo;
bool mDoSign, mDoEncrypt;
- QByteArray mEncodedBody;
+ TQByteArray mEncodedBody;
int mBoundaryLevel;
//KMMessagePart mOldBodyPart;
KMMessagePart* mNewBodyPart;
@@ -1196,7 +1196,7 @@ void MessageComposer::composeInlineOpenPGPMessage( KMMessage& theMessage,
bool doSign, bool doEncrypt )
{
// preprocess the body text
- const QByteArray bodyData = mText;
+ const TQByteArray bodyData = mText;
if (bodyData.isNull()) {
mRc = false;
return;
@@ -1208,7 +1208,7 @@ void MessageComposer::composeInlineOpenPGPMessage( KMMessage& theMessage,
// set the main headers
theMessage.deleteBodyParts();
- QString oldContentType = theMessage.headerField( "Content-Type" );
+ TQString oldContentType = theMessage.headerField( "Content-Type" );
theMessage.removeHeaderField("Content-Type");
theMessage.removeHeaderField("Content-Transfer-Encoding");
@@ -1223,7 +1223,7 @@ void MessageComposer::composeInlineOpenPGPMessage( KMMessage& theMessage,
KMMessage* msg = new KMMessage( theMessage );
if ( doEncrypt ) {
Kpgp::Result result;
- QByteArray encryptedBody;
+ TQByteArray encryptedBody;
if ( doSign ) { // Sign and encrypt
const std::vector<GpgME::Key> signingKeys = mKeyResolver->signingKeys( Kleo::InlineOpenPGPFormat );
result = pgpSignedAndEncryptedMsg( encryptedBody, bodyData, signingKeys,
@@ -1278,7 +1278,7 @@ void MessageComposer::composeChiasmusMessage( KMMessage& theMessage, Kleo::Crypt
assert( chiasmus ); // kmcomposewin code should have made sure
// preprocess the body text
- const QByteArray bodyData = mText;
+ const TQByteArray bodyData = mText;
if (bodyData.isNull()) {
mRc = false;
return;
@@ -1290,7 +1290,7 @@ void MessageComposer::composeChiasmusMessage( KMMessage& theMessage, Kleo::Crypt
// set the main headers
theMessage.deleteBodyParts();
- QString oldContentType = theMessage.headerField( "Content-Type" );
+ TQString oldContentType = theMessage.headerField( "Content-Type" );
theMessage.removeHeaderField("Content-Type");
theMessage.removeHeaderField("Content-Transfer-Encoding");
@@ -1303,7 +1303,7 @@ void MessageComposer::composeChiasmusMessage( KMMessage& theMessage, Kleo::Crypt
{
const Kleo::KeyResolver::SplitInfo& splitInfo = *it;
KMMessage* msg = new KMMessage( theMessage );
- QByteArray encryptedBody;
+ TQByteArray encryptedBody;
if ( !encryptWithChiasmus( chiasmus, bodyData, encryptedBody ) ) {
mRc = false;
@@ -1314,7 +1314,7 @@ void MessageComposer::composeChiasmusMessage( KMMessage& theMessage, Kleo::Crypt
//mOldBodyPart.setBodyEncodedBinary( encryptedBody );
bool doSign = false;
- QValueList<int> allowedCTEs;
+ TQValueList<int> allowedCTEs;
mOldBodyPart.setBodyAndGuessCte( encryptedBody, allowedCTEs,
!kmkernel->msgSender()->sendQuotedPrintable() && !doSign,
doSign );
@@ -1326,7 +1326,7 @@ void MessageComposer::composeChiasmusMessage( KMMessage& theMessage, Kleo::Crypt
// Used in case of attachments
mOldBodyPart.setTypeStr( "application" );
mOldBodyPart.setSubtypeStr( "vnd.de.bund.bsi.chiasmus-text" );
- mOldBodyPart.setAdditionalCTypeParamStr( QCString( "chiasmus-charset=" + mCharset ) );
+ mOldBodyPart.setAdditionalCTypeParamStr( TQCString( "chiasmus-charset=" + mCharset ) );
addBodyAndAttachments( msg, splitInfo, false, false, mOldBodyPart, Kleo::InlineOpenPGPFormat );
mMessageList.push_back( msg );
@@ -1362,14 +1362,14 @@ void MessageComposer::composeMessage( KMMessage& theMessage,
theMessage.setBody( "This message is in MIME format." );
// preprocess the body text
- QByteArray bodyData = mText;
+ TQByteArray bodyData = mText;
if (bodyData.isNull()) {
mRc = false;
return;
}
// set the main headers
- QString oldContentType = theMessage.headerField( "Content-Type" );
+ TQString oldContentType = theMessage.headerField( "Content-Type" );
theMessage.deleteBodyParts();
theMessage.removeHeaderField("Content-Type");
theMessage.removeHeaderField("Content-Transfer-Encoding");
@@ -1394,7 +1394,7 @@ void MessageComposer::composeMessage( KMMessage& theMessage,
// test whether there ARE attachments that can be included into the body
if( mEarlyAddAttachments ) {
bool someOk = false;
- for ( QValueVector<Attachment>::const_iterator it = mAttachments.begin() ; it != mAttachments.end() ; ++it ) {
+ for ( TQValueVector<Attachment>::const_iterator it = mAttachments.begin() ; it != mAttachments.end() ; ++it ) {
if ( it->encrypt == doEncryptBody && it->sign == doSignBody )
someOk = true;
else
@@ -1427,18 +1427,18 @@ void MessageComposer::composeMessage( KMMessage& theMessage,
if ( mIsRichText ) { // create a multipart body
// calculate a boundary string
- QCString boundaryCStr; // storing boundary string data
- QCString newbody;
+ TQCString boundaryCStr; // storing boundary string data
+ TQCString newbody;
DwMediaType tmpCT;
tmpCT.CreateBoundary( ++mPreviousBoundaryLevel );
boundaryCStr = KMail::Util::CString( tmpCT.Boundary() );
- QValueList<int> allowedCTEs;
+ TQValueList<int> allowedCTEs;
KMMessagePart textBodyPart;
textBodyPart.setTypeStr("text");
textBodyPart.setSubtypeStr("plain");
- QCString textbody = plainTextFromMarkup( mText /* converted to QString */ );
+ TQCString textbody = plainTextFromMarkup( mText /* converted to TQString */ );
// the signed body must not be 8bit encoded
textBodyPart.setBodyAndGuessCte( textbody, allowedCTEs,
@@ -1458,7 +1458,7 @@ void MessageComposer::composeMessage( KMMessage& theMessage,
KMMessagePart htmlBodyPart;
htmlBodyPart.setTypeStr("text");
htmlBodyPart.setSubtypeStr("html");
- QByteArray htmlbody = mText;
+ TQByteArray htmlbody = mText;
// the signed body must not be 8bit encoded
htmlBodyPart.setBodyAndGuessCte( htmlbody, allowedCTEs,
!kmkernel->msgSender()->sendQuotedPrintable() && !doSign,
@@ -1484,7 +1484,7 @@ void MessageComposer::composeMessage( KMMessage& theMessage,
}
// Prepare attachments that will be signed/encrypted
- for ( QValueVector<Attachment>::const_iterator it = mAttachments.begin() ; it != mAttachments.end() ; ++it ) {
+ for ( TQValueVector<Attachment>::const_iterator it = mAttachments.begin() ; it != mAttachments.end() ; ++it ) {
// signed/encrypted body parts must be either QP or base64 encoded
// Why not 7 bit? Because the LF->CRLF canonicalization would render
// e.g. 7 bit encoded shell scripts unusable because of the CRs.
@@ -1493,12 +1493,12 @@ void MessageComposer::composeMessage( KMMessage& theMessage,
// respect the CRLF->LF de-canonicalisation. We should
// eventually get rid of this:
if( it->sign || it->encrypt ) {
- QCString cte = it->part->cteStr().lower();
+ TQCString cte = it->part->cteStr().lower();
if( ( "8bit" == cte && it->part->type() != DwMime::kTypeMessage )
|| ( ( it->part->type() == DwMime::kTypeText )
&& ( "7bit" == cte ) ) ) {
- const QByteArray body = it->part->bodyDecodedBinary();
- QValueList<int> dummy;
+ const TQByteArray body = it->part->bodyDecodedBinary();
+ TQValueList<int> dummy;
it->part->setBodyAndGuessCte(body, dummy, false, it->sign);
kdDebug(5006) << "Changed encoding of message part from "
<< cte << " to " << it->part->cteStr() << endl;
@@ -1517,7 +1517,7 @@ void MessageComposer::composeMessage( KMMessage& theMessage,
innerBodyPart.setOriginalContentTypeStr( oldContentType.utf8() );
}
innerBodyPart.setContentDisposition( "inline" );
- QValueList<int> allowedCTEs;
+ TQValueList<int> allowedCTEs;
// the signed body must not be 8bit encoded
innerBodyPart.setBodyAndGuessCte( bodyData, allowedCTEs,
!kmkernel->msgSender()->sendQuotedPrintable() && !doSign,
@@ -1527,11 +1527,11 @@ void MessageComposer::composeMessage( KMMessage& theMessage,
innerBodyPart.setBodyEncodedBinary( bodyData ); // do we need this, since setBodyAndGuessCte does this already?
DwBodyPart* innerDwPart = theMessage.createDWBodyPart( &innerBodyPart );
innerDwPart->Assemble();
- QByteArray tmpbody = KMail::Util::ByteArray( innerDwPart->AsString() );
+ TQByteArray tmpbody = KMail::Util::ByteArray( innerDwPart->AsString() );
if ( mIsRichText ) { // and add our mp/a boundary
int boundPos = tmpbody.find( '\n' );
if( -1 < boundPos ) {
- QCString bStr( ";\n boundary=\"" );
+ TQCString bStr( ";\n boundary=\"" );
bStr += mSaveBoundary.c_str();
bStr += "\"";
bodyData = tmpbody;
@@ -1547,19 +1547,19 @@ void MessageComposer::composeMessage( KMMessage& theMessage,
innerDwPart = 0;
// add all matching Attachments
// NOTE: This code will be changed when KMime is complete.
- for ( QValueVector<Attachment>::iterator it = mAttachments.begin() ; it != mAttachments.end() ; ++it ) {
+ for ( TQValueVector<Attachment>::iterator it = mAttachments.begin() ; it != mAttachments.end() ; ++it ) {
if ( it->encrypt == doEncryptBody && it->sign == doSignBody ) {
innerDwPart = theMessage.createDWBodyPart( it->part );
innerDwPart->Assemble();
- KMail::Util::append( bodyData, QCString( "\n--" + mMultipartMixedBoundary + "\n" ) );
+ KMail::Util::append( bodyData, TQCString( "\n--" + mMultipartMixedBoundary + "\n" ) );
KMail::Util::append( bodyData, innerDwPart->AsString().c_str() );
delete innerDwPart;
innerDwPart = 0;
}
}
- KMail::Util::append( bodyData, QCString( "\n--" + mMultipartMixedBoundary + "--\n" ) );
+ KMail::Util::append( bodyData, TQCString( "\n--" + mMultipartMixedBoundary + "--\n" ) );
} else { // !earlyAddAttachments
- QValueList<int> allowedCTEs;
+ TQValueList<int> allowedCTEs;
// the signed body must not be 8bit encoded
mOldBodyPart.setBodyAndGuessCte(bodyData, allowedCTEs, !kmkernel->msgSender()->sendQuotedPrintable() && !doSign,
doSign);
@@ -1595,7 +1595,7 @@ void MessageComposer::composeMessage( KMMessage& theMessage,
int boundPos = mEncodedBody.find( '\n' );
if( -1 < boundPos ) {
// insert new "boundary" parameter
- QCString bStr( ";\n boundary=\"" );
+ TQCString bStr( ";\n boundary=\"" );
bStr += mMultipartMixedBoundary;
bStr += "\"";
KMail::Util::insert( mEncodedBody, boundPos, bStr.data() );
@@ -1618,7 +1618,7 @@ void MessageComposer::composeMessage( KMMessage& theMessage,
mRc = false;
return;
}
- mRc = processStructuringInfo( QString::null,
+ mRc = processStructuringInfo( TQString::null,
mOldBodyPart.contentDescription(),
mOldBodyPart.typeStr(),
mOldBodyPart.subtypeStr(),
@@ -1689,7 +1689,7 @@ void MessageComposer::encryptMessage( KMMessage* msg,
const bool doSignBody = doSign && mSignBody;
if ( doEncryptBody ) {
- QByteArray innerContent;
+ TQByteArray innerContent;
if ( doSignBody ) {
// extract signed body from newBodyPart
DwBodyPart* dwPart = msg->createDWBodyPart( &newBodyPart );
@@ -1708,7 +1708,7 @@ void MessageComposer::encryptMessage( KMMessage* msg,
innerContent = KMail::Util::lf2crlf( innerContent );
//kdDebug(5006) << " done." << endl;
- QByteArray encryptedBody;
+ TQByteArray encryptedBody;
Kpgp::Result result = pgpEncryptedMsg( encryptedBody, innerContent,
splitInfo.keys, format );
if ( result != Kpgp::Ok ) {
@@ -1769,7 +1769,7 @@ void MessageComposer::addBodyAndAttachments( KMMessage* msg,
// add Attachments
// create additional bodyparts for the attachments (if any)
KMMessagePart newAttachPart;
- for ( QValueVector<Attachment>::iterator it = mAttachments.begin() ; it != mAttachments.end() ; ++it ) {
+ for ( TQValueVector<Attachment>::iterator it = mAttachments.begin() ; it != mAttachments.end() ; ++it ) {
const bool cryptFlagsDifferent = ( it->encrypt != doEncryptBody || it->sign != doSignBody ) ;
@@ -1790,7 +1790,7 @@ void MessageComposer::addBodyAndAttachments( KMMessage* msg,
DwBodyPart* innerDwPart = msg->createDWBodyPart( it->part );
innerDwPart->Assemble();
- QByteArray encodedAttachment = KMail::Util::ByteArray( innerDwPart->AsString() );
+ TQByteArray encodedAttachment = KMail::Util::ByteArray( innerDwPart->AsString() );
delete innerDwPart;
innerDwPart = 0;
@@ -1831,7 +1831,7 @@ void MessageComposer::addBodyAndAttachments( KMMessage* msg,
}
}
if( encryptThisNow ) {
- QByteArray encryptedBody;
+ TQByteArray encryptedBody;
Kpgp::Result result = pgpEncryptedMsg( encryptedBody,
encodedAttachment,
splitInfo.keys,
@@ -1862,11 +1862,11 @@ void MessageComposer::addBodyAndAttachments( KMMessage* msg,
msg->headers().ContentType().Parse();
kdDebug(5006) << "MessageComposer::addBodyAndAttachments() : set top level Content-Type from originalContentTypeStr()=" << ourFineBodyPart.originalContentTypeStr() << endl;
} else {
- QCString ct = ourFineBodyPart.typeStr() + "/" + ourFineBodyPart.subtypeStr();
+ TQCString ct = ourFineBodyPart.typeStr() + "/" + ourFineBodyPart.subtypeStr();
if ( ct == "multipart/mixed" )
ct += ";\n\tboundary=\"" + mMultipartMixedBoundary + '"';
else if ( ct == "multipart/alternative" )
- ct += ";\n\tboundary=\"" + QCString(mSaveBoundary.c_str()) + '"';
+ ct += ";\n\tboundary=\"" + TQCString(mSaveBoundary.c_str()) + '"';
msg->headers().ContentType().FromString( ct );
msg->headers().ContentType().Parse();
kdDebug(5006) << "MessageComposer::addBodyAndAttachments() : set top level Content-Type to " << ct << endl;
@@ -1900,23 +1900,23 @@ void MessageComposer::addBodyAndAttachments( KMMessage* msg,
//-----------------------------------------------------------------------------
// This method does not call any crypto ops, so it does not need to be async
-bool MessageComposer::processStructuringInfo( const QString bugURL,
- const QString contentDescClear,
- const QCString contentTypeClear,
- const QCString contentSubtypeClear,
- const QCString contentDispClear,
- const QCString contentTEncClear,
- const QByteArray& clearCStr,
- const QString /*contentDescCiph*/,
- const QByteArray& ciphertext,
+bool MessageComposer::processStructuringInfo( const TQString bugURL,
+ const TQString contentDescClear,
+ const TQCString contentTypeClear,
+ const TQCString contentSubtypeClear,
+ const TQCString contentDispClear,
+ const TQCString contentTEncClear,
+ const TQByteArray& clearCStr,
+ const TQString /*contentDescCiph*/,
+ const TQByteArray& ciphertext,
KMMessagePart& resultingPart,
bool signing, Kleo::CryptoMessageFormat format )
{
- assert( clearCStr.isEmpty() || clearCStr[clearCStr.size()-1] != '\0' ); // I was called with a QCString !?
+ assert( clearCStr.isEmpty() || clearCStr[clearCStr.size()-1] != '\0' ); // I was called with a TQCString !?
bool bOk = true;
if ( makeMimeObject( format, signing ) ) {
- QCString mainHeader = "Content-Type: ";
+ TQCString mainHeader = "Content-Type: ";
const char * toplevelCT = toplevelContentType( format, signing );
if ( toplevelCT )
mainHeader += toplevelCT;
@@ -1927,7 +1927,7 @@ bool MessageComposer::processStructuringInfo( const QString bugURL,
mainHeader += contentTypeClear + '/' + contentSubtypeClear;
}
- const QCString boundaryCStr = KMime::multiPartBoundary();
+ const TQCString boundaryCStr = KMime::multiPartBoundary();
// add "boundary" parameter
if ( makeMultiMime( format, signing ) )
mainHeader.replace( "%boundary", boundaryCStr );
@@ -1960,7 +1960,7 @@ bool MessageComposer::processStructuringInfo( const QString bugURL,
KMMessage::bodyPart( &mainDwPa, &resultingPart );
if( !makeMultiMime( format, signing ) ) {
if ( signing && includeCleartextWhenSigning( format ) ) {
- QByteArray bodyText( clearCStr );
+ TQByteArray bodyText( clearCStr );
KMail::Util::append( bodyText, "\n" );
KMail::Util::append( bodyText, ciphertext );
resultingPart.setBodyEncodedBinary( bodyText );
@@ -1972,7 +1972,7 @@ bool MessageComposer::processStructuringInfo( const QString bugURL,
// Build a MIME part holding the version information
// taking the body contents returned in
// structuring.data.bodyTextVersion.
- QCString versCStr, codeCStr;
+ TQCString versCStr, codeCStr;
if ( !signing && format == Kleo::OpenPGPMIMEFormat )
versCStr =
"Content-Type: application/pgp-encrypted\n"
@@ -1996,10 +1996,10 @@ bool MessageComposer::processStructuringInfo( const QString bugURL,
codeCStr += "Content-Transfer-Encoding: base64\n\n";
codeCStr += KMime::Codec::codecForName( "base64" )->encodeToQCString( ciphertext );
} else
- codeCStr += '\n' + QCString( ciphertext.data(), ciphertext.size() + 1 );
+ codeCStr += '\n' + TQCString( ciphertext.data(), ciphertext.size() + 1 );
- QByteArray mainStr;
+ TQByteArray mainStr;
KMail::Util::append( mainStr, "--" );
KMail::Util::append( mainStr, boundaryCStr );
if ( signing && includeCleartextWhenSigning( format ) &&
@@ -2026,7 +2026,7 @@ bool MessageComposer::processStructuringInfo( const QString bugURL,
resultingPart.setSubtypeStr( contentSubtypeClear );
resultingPart.setContentDisposition( contentDispClear );
resultingPart.setContentTransferEncodingStr( contentTEncClear );
- QByteArray resultingBody;
+ TQByteArray resultingBody;
if ( signing && includeCleartextWhenSigning( format ) ) {
if( !clearCStr.isEmpty() )
@@ -2050,18 +2050,18 @@ bool MessageComposer::processStructuringInfo( const QString bugURL,
}
//-----------------------------------------------------------------------------
-QCString MessageComposer::plainTextFromMarkup( const QString& markupText )
+TQCString MessageComposer::plainTextFromMarkup( const TQString& markupText )
{
- QTextEdit *hackConspiratorTextEdit = new QTextEdit( markupText );
+ TQTextEdit *hackConspiratorTextEdit = new TQTextEdit( markupText );
hackConspiratorTextEdit->setTextFormat(Qt::PlainText);
if ( !mDisableBreaking ) {
- hackConspiratorTextEdit->setWordWrap( QTextEdit::FixedColumnWidth );
+ hackConspiratorTextEdit->setWordWrap( TQTextEdit::FixedColumnWidth );
hackConspiratorTextEdit->setWrapColumnOrWidth( mLineBreakColumn );
}
- QString text = hackConspiratorTextEdit->text();
- QCString textbody;
+ TQString text = hackConspiratorTextEdit->text();
+ TQCString textbody;
- const QTextCodec *codec = KMMsgBase::codecForName( mCharset );
+ const TQTextCodec *codec = KMMsgBase::codecForName( mCharset );
if( mCharset == "us-ascii" ) {
textbody = KMMsgBase::toUsAscii( text );
} else if( codec == 0 ) {
@@ -2078,10 +2078,10 @@ QCString MessageComposer::plainTextFromMarkup( const QString& markupText )
}
//-----------------------------------------------------------------------------
-QByteArray MessageComposer::breakLinesAndApplyCodec()
+TQByteArray MessageComposer::breakLinesAndApplyCodec()
{
- QString text;
- QCString cText;
+ TQString text;
+ TQCString cText;
if( mDisableBreaking || mIsRichText || !GlobalSettings::self()->wordWrap() )
text = mComposeWin->mEditor->text();
@@ -2089,16 +2089,16 @@ QByteArray MessageComposer::breakLinesAndApplyCodec()
text = mComposeWin->mEditor->brokenText();
text.truncate( text.length() ); // to ensure text.size()==text.length()+1
- QString newText;
- const QTextCodec *codec = KMMsgBase::codecForName( mCharset );
+ TQString newText;
+ const TQTextCodec *codec = KMMsgBase::codecForName( mCharset );
if( mCharset == "us-ascii" ) {
cText = KMMsgBase::toUsAscii( text );
- newText = QString::fromLatin1( cText );
+ newText = TQString::fromLatin1( cText );
} else if( codec == 0 ) {
kdDebug(5006) << "Something is wrong and I can not get a codec." << endl;
cText = text.local8Bit();
- newText = QString::fromLocal8Bit( cText );
+ newText = TQString::fromLocal8Bit( cText );
} else {
cText = codec->fromUnicode( text );
newText = codec->toUnicode( cText );
@@ -2106,7 +2106,7 @@ QByteArray MessageComposer::breakLinesAndApplyCodec()
if (cText.isNull()) cText = "";
if( !text.isEmpty() && (newText != text) ) {
- QString oldText = mComposeWin->mEditor->text();
+ TQString oldText = mComposeWin->mEditor->text();
mComposeWin->mEditor->setText( newText );
KCursorSaver idle( KBusyPtr::idle() );
bool anyway = ( KMessageBox::warningYesNo( mComposeWin,
@@ -2116,7 +2116,7 @@ QByteArray MessageComposer::breakLinesAndApplyCodec()
i18n("Lose Characters"), i18n("Change Encoding") ) == KMessageBox::Yes );
if( !anyway ) {
mComposeWin->mEditor->setText(oldText);
- return QByteArray();
+ return TQByteArray();
}
}
@@ -2140,10 +2140,10 @@ QByteArray MessageComposer::breakLinesAndApplyCodec()
//-----------------------------------------------------------------------------
-void MessageComposer::pgpSignedMsg( const QByteArray& cText, Kleo::CryptoMessageFormat format ) {
+void MessageComposer::pgpSignedMsg( const TQByteArray& cText, Kleo::CryptoMessageFormat format ) {
- assert( cText.isEmpty() || cText[cText.size()-1] != '\0' ); // I was called with a QCString !?
- mSignature = QByteArray();
+ assert( cText.isEmpty() || cText[cText.size()-1] != '\0' ); // I was called with a TQCString !?
+ mSignature = TQByteArray();
const std::vector<GpgME::Key> signingKeys = mKeyResolver->signingKeys( format );
@@ -2168,7 +2168,7 @@ void MessageComposer::pgpSignedMsg( const QByteArray& cText, Kleo::CryptoMessage
return;
}
- QByteArray signature;
+ TQByteArray signature;
const GpgME::SigningResult res =
job->exec( signingKeys, cText, signingMode( format ), signature );
if ( res.error().isCanceled() ) {
@@ -2194,8 +2194,8 @@ void MessageComposer::pgpSignedMsg( const QByteArray& cText, Kleo::CryptoMessage
}
//-----------------------------------------------------------------------------
-Kpgp::Result MessageComposer::pgpEncryptedMsg( QByteArray & encryptedBody,
- const QByteArray& cText,
+Kpgp::Result MessageComposer::pgpEncryptedMsg( TQByteArray & encryptedBody,
+ const TQByteArray& cText,
const std::vector<GpgME::Key> & encryptionKeys,
Kleo::CryptoMessageFormat format )
{
@@ -2235,8 +2235,8 @@ Kpgp::Result MessageComposer::pgpEncryptedMsg( QByteArray & encryptedBody,
return Kpgp::Ok;
}
-Kpgp::Result MessageComposer::pgpSignedAndEncryptedMsg( QByteArray & encryptedBody,
- const QByteArray& cText,
+Kpgp::Result MessageComposer::pgpSignedAndEncryptedMsg( TQByteArray & encryptedBody,
+ const TQByteArray& cText,
const std::vector<GpgME::Key> & signingKeys,
const std::vector<GpgME::Key> & encryptionKeys,
Kleo::CryptoMessageFormat format )
diff --git a/kmail/messagecomposer.h b/kmail/messagecomposer.h
index 7d908bfac..2284b04a8 100644
--- a/kmail/messagecomposer.h
+++ b/kmail/messagecomposer.h
@@ -34,8 +34,8 @@
#include "kmmsgpart.h"
#include "keyresolver.h"
-#include <qobject.h>
-#include <qvaluevector.h>
+#include <tqobject.h>
+#include <tqvaluevector.h>
#include <mimelib/mediatyp.h>
#include <kleo/cryptobackend.h>
@@ -62,7 +62,7 @@ namespace KPIM {
class Identity;
}
-class MessageComposer : public QObject {
+class MessageComposer : public TQObject {
Q_OBJECT
friend class ::MessageComposerJob;
friend class ::EncryptMessageJob;
@@ -83,11 +83,11 @@ public:
*/
void applyChanges( bool disableCrypto );
- QString originalBCC() const { return mBcc; }
+ TQString originalBCC() const { return mBcc; }
void setDisableBreaking( bool b ) { mDisableBreaking = b; }
- const QValueVector<KMMessage*> & composedMessageList() const {
+ const TQValueVector<KMMessage*> & composedMessageList() const {
return mMessageList;
}
@@ -101,8 +101,8 @@ private:
void adjustCryptFlags();
bool encryptWithChiasmus( const Kleo::CryptoBackend::Protocol * chiasmus,
- const QByteArray& body,
- QByteArray& resultData );
+ const TQByteArray& body,
+ TQByteArray& resultData );
void chiasmusEncryptAllAttachments();
void composeChiasmusMessage( KMMessage& theMessage, Kleo::CryptoMessageFormat format );
@@ -135,25 +135,25 @@ private:
* Get message ready for sending or saving.
* This must be done _before_ signing and/or encrypting it.
*/
- QByteArray breakLinesAndApplyCodec();
+ TQByteArray breakLinesAndApplyCodec();
/**
* Create a plain text version of a marked up mail for use as the plain
* part in a multipart/alternative mail.
*/
- QCString plainTextFromMarkup( const QString& markupText );
+ TQCString plainTextFromMarkup( const TQString& markupText );
/**
* Get signature for a message (into mMessage).
* To build nice S/MIME objects signing and encoding must be separated.
*/
- void pgpSignedMsg( const QByteArray& cText, Kleo::CryptoMessageFormat f );
+ void pgpSignedMsg( const TQByteArray& cText, Kleo::CryptoMessageFormat f );
/**
* Get encrypted message.
* To build nice S/MIME objects signing and encrypting must be separate.
*/
- Kpgp::Result pgpEncryptedMsg( QByteArray& rEncryptedBody,
- const QByteArray& cText,
+ Kpgp::Result pgpEncryptedMsg( TQByteArray& rEncryptedBody,
+ const TQByteArray& cText,
const std::vector<GpgME::Key> & encryptionKeys,
Kleo::CryptoMessageFormat f );
@@ -161,8 +161,8 @@ private:
* Get signed & encrypted message.
* To build nice S/MIME objects signing and encrypting must be separate.
*/
- Kpgp::Result pgpSignedAndEncryptedMsg( QByteArray& rEncryptedBody,
- const QByteArray& cText,
+ Kpgp::Result pgpSignedAndEncryptedMsg( TQByteArray& rEncryptedBody,
+ const TQByteArray& cText,
const std::vector<GpgME::Key> & signingKeys,
const std::vector<GpgME::Key> & encryptionKeys,
Kleo::CryptoMessageFormat f );
@@ -170,8 +170,8 @@ private:
/**
* Check for expiry of various certificates.
*/
- bool checkForEncryptCertificateExpiry( const QString& recipient,
- const QCString& certFingerprint );
+ bool checkForEncryptCertificateExpiry( const TQString& recipient,
+ const TQCString& certFingerprint );
/**
* Build a MIME object (or a flat text resp.) based upon
@@ -184,15 +184,15 @@ private:
* This string *is* encoded according to contentTEncClear
* and thus should be ready for being sent via SMTP.
*/
- bool processStructuringInfo( const QString bugURL,
- const QString contentDescriptionClear,
- const QCString contentTypeClear,
- const QCString contentSubtypeClear,
- const QCString contentDispClear,
- const QCString contentTEncClear,
- const QByteArray& bodytext,
- const QString contentDescriptionCiph,
- const QByteArray& ciphertext,
+ bool processStructuringInfo( const TQString bugURL,
+ const TQString contentDescriptionClear,
+ const TQCString contentTypeClear,
+ const TQCString contentSubtypeClear,
+ const TQCString contentDispClear,
+ const TQCString contentTEncClear,
+ const TQByteArray& bodytext,
+ const TQString contentDescriptionCiph,
+ const TQByteArray& ciphertext,
KMMessagePart& resultingPart,
bool signing, Kleo::CryptoMessageFormat format );
@@ -213,7 +213,7 @@ private:
void doNextJob();
void emitDone( bool ok );
- int encryptionPossible( const QStringList & recipients, bool openPGP );
+ int encryptionPossible( const TQStringList & recipients, bool openPGP );
bool determineWhetherToSign( bool doSignCompletely );
bool determineWhetherToEncrypt( bool doEncryptCompletely );
void markAllAttachmentsForSigning( bool sign );
@@ -222,11 +222,11 @@ private:
KMComposeWin* mComposeWin;
MessageComposerJob * mCurrentJob;
KMMessage* mReferenceMessage;
- QValueVector<KMMessage*> mMessageList;
+ TQValueVector<KMMessage*> mMessageList;
Kleo::KeyResolver * mKeyResolver;
- QCString mSignCertFingerprint;
+ TQCString mSignCertFingerprint;
struct Attachment {
Attachment( KMMessagePart * p=0, bool s=false, bool e=false )
@@ -235,9 +235,9 @@ private:
bool sign;
bool encrypt;
};
- QValueVector<Attachment> mAttachments;
+ TQValueVector<Attachment> mAttachments;
- QString mPGPSigningKey, mSMIMESigningKey;
+ TQString mPGPSigningKey, mSMIMESigningKey;
bool mUseOpportunisticEncryption;
bool mSignBody, mEncryptBody;
bool mSigningRequested, mEncryptionRequested;
@@ -245,33 +245,33 @@ private:
unsigned int mAllowedCryptoMessageFormats;
bool mDisableCrypto;
bool mDisableBreaking;
- QString mBcc;
- QStringList mTo, mCc, mBccList;
+ TQString mBcc;
+ TQStringList mTo, mCc, mBccList;
bool mDebugComposerCrypto;
bool mAutoCharset;
- QCString mCharset;
+ TQCString mCharset;
bool mIsRichText;
uint mIdentityUid;
bool mRc; // Set this to false, if something fails during the processes
bool mHoldJobs; // Don't run the next job yet
- QByteArray mText; // textual representation of the message text, encoded
+ TQByteArray mText; // textual representation of the message text, encoded
unsigned int mLineBreakColumn; // used for line breaking
// These are the variables of the big composeMessage(X,Y,Z) message
KMMessagePart* mNewBodyPart;
- QByteArray mSignature;
+ TQByteArray mSignature;
- QByteArray mEncodedBody; // Only needed if signing and/or encrypting
+ TQByteArray mEncodedBody; // Only needed if signing and/or encrypting
bool mEarlyAddAttachments, mAllAttachmentsAreInBody;
KMMessagePart mOldBodyPart;
int mPreviousBoundaryLevel;
// The boundary is saved for later addition into mp/a body
DwString mSaveBoundary;
- QCString mMultipartMixedBoundary;
+ TQCString mMultipartMixedBoundary;
- QValueList<MessageComposerJob*> mJobs;
+ TQValueList<MessageComposerJob*> mJobs;
bool mEncryptWithChiasmus;
bool mPerformingSignOperation;
};
diff --git a/kmail/messagecopyhelper.cpp b/kmail/messagecopyhelper.cpp
index 2a36c53a7..e0a27fc35 100644
--- a/kmail/messagecopyhelper.cpp
+++ b/kmail/messagecopyhelper.cpp
@@ -26,18 +26,18 @@
using namespace KMail;
using namespace KPIM;
-MessageCopyHelper::MessageCopyHelper( const QValueList< Q_UINT32 > & msgs,
- KMFolder * dest, bool move, QObject * parent ) :
- QObject( parent )
+MessageCopyHelper::MessageCopyHelper( const TQValueList< Q_UINT32 > & msgs,
+ KMFolder * dest, bool move, TQObject * parent ) :
+ TQObject( parent )
{
if ( msgs.isEmpty() || !dest )
return;
KMFolder *f = 0;
int index;
- QPtrList<KMMsgBase> list;
+ TQPtrList<KMMsgBase> list;
- for ( QValueList<Q_UINT32>::ConstIterator it = msgs.constBegin(); it != msgs.constEnd(); ++it ) {
+ for ( TQValueList<Q_UINT32>::ConstIterator it = msgs.constBegin(); it != msgs.constEnd(); ++it ) {
KMMsgDict::instance()->getLocation( *it, &f, &index );
if ( !f ) // not found
continue;
@@ -62,7 +62,7 @@ MessageCopyHelper::MessageCopyHelper( const QValueList< Q_UINT32 > & msgs,
command = new KMCopyCommand( dest, list );
}
- connect( command, SIGNAL(completed(KMCommand*)), SLOT(copyCompleted(KMCommand*)) );
+ connect( command, TQT_SIGNAL(completed(KMCommand*)), TQT_SLOT(copyCompleted(KMCommand*)) );
command->start();
}
@@ -71,7 +71,7 @@ void MessageCopyHelper::copyCompleted(KMCommand * cmd)
Q_UNUSED( cmd );
// close all folders we opened
- for ( QMap<QGuardedPtr<KMFolder>, int>::ConstIterator it = mOpenFolders.constBegin();
+ for ( TQMap<TQGuardedPtr<KMFolder>, int>::ConstIterator it = mOpenFolders.constBegin();
it != mOpenFolders.constEnd(); ++it ) {
it.key()->close( "messagecopyhelper" );
}
@@ -79,17 +79,17 @@ void MessageCopyHelper::copyCompleted(KMCommand * cmd)
deleteLater();
}
-QValueList< Q_UINT32 > MessageCopyHelper::serNumListFromMailList(const KPIM::MailList & list)
+TQValueList< Q_UINT32 > MessageCopyHelper::serNumListFromMailList(const KPIM::MailList & list)
{
- QValueList<Q_UINT32> rv;
+ TQValueList<Q_UINT32> rv;
for ( MailList::ConstIterator it = list.constBegin(); it != list.constEnd(); ++it )
rv.append( (*it).serialNumber() );
return rv;
}
-QValueList< Q_UINT32 > MessageCopyHelper::serNumListFromMsgList(QPtrList< KMMsgBase > list)
+TQValueList< Q_UINT32 > MessageCopyHelper::serNumListFromMsgList(TQPtrList< KMMsgBase > list)
{
- QValueList<Q_UINT32> rv;
+ TQValueList<Q_UINT32> rv;
KMMsgBase* msg = list.first();
while( msg ) {
rv.append( msg->getMsgSerNum() );
@@ -98,11 +98,11 @@ QValueList< Q_UINT32 > MessageCopyHelper::serNumListFromMsgList(QPtrList< KMMsgB
return rv;
}
-bool MessageCopyHelper::inReadOnlyFolder(const QValueList< Q_UINT32 > & sernums)
+bool MessageCopyHelper::inReadOnlyFolder(const TQValueList< Q_UINT32 > & sernums)
{
KMFolder *f = 0;
int index;
- for ( QValueList<Q_UINT32>::ConstIterator it = sernums.begin(); it != sernums.end(); ++it ) {
+ for ( TQValueList<Q_UINT32>::ConstIterator it = sernums.begin(); it != sernums.end(); ++it ) {
KMMsgDict::instance()->getLocation( *it, &f, &index );
if ( !f ) // not found
continue;
diff --git a/kmail/messagecopyhelper.h b/kmail/messagecopyhelper.h
index 2291fce9d..22a718dc6 100644
--- a/kmail/messagecopyhelper.h
+++ b/kmail/messagecopyhelper.h
@@ -20,9 +20,9 @@
#ifndef KMAIL_MESSAGECOPYHELPER_H
#define KMAIL_MESSAGECOPYHELPER_H
-#include <qguardedptr.h>
-#include <qobject.h>
-#include <qptrlist.h>
+#include <tqguardedptr.h>
+#include <tqobject.h>
+#include <tqptrlist.h>
#include <maillistdrag.h>
@@ -49,29 +49,29 @@ class MessageCopyHelper : public QObject
@param move If set to true, messages will be moved instead of copied
@param parent The parent object.
*/
- MessageCopyHelper( const QValueList<Q_UINT32> &msgs, KMFolder *dest,
- bool move, QObject *parent = 0 );
+ MessageCopyHelper( const TQValueList<Q_UINT32> &msgs, KMFolder *dest,
+ bool move, TQObject *parent = 0 );
/**
Converts a MailList into a serial number list.
*/
- static QValueList<Q_UINT32> serNumListFromMailList( const KPIM::MailList &list );
+ static TQValueList<Q_UINT32> serNumListFromMailList( const KPIM::MailList &list );
/**
Converts a KMMsgsBase* list into a serial number list.
*/
- static QValueList<Q_UINT32> serNumListFromMsgList( QPtrList<KMMsgBase> list );
+ static TQValueList<Q_UINT32> serNumListFromMsgList( TQPtrList<KMMsgBase> list );
/**
Checks of any of the given messages comes from a read-only source.
*/
- static bool inReadOnlyFolder( const QValueList<Q_UINT32> &sernums );
+ static bool inReadOnlyFolder( const TQValueList<Q_UINT32> &sernums );
private slots:
void copyCompleted( KMCommand *cmd );
private:
- QMap<QGuardedPtr<KMFolder>, int> mOpenFolders;
+ TQMap<TQGuardedPtr<KMFolder>, int> mOpenFolders;
};
}
diff --git a/kmail/messageproperty.cpp b/kmail/messageproperty.cpp
index 66444ff87..7de13eb35 100644
--- a/kmail/messageproperty.cpp
+++ b/kmail/messageproperty.cpp
@@ -35,10 +35,10 @@
#include "messageproperty.h"
using namespace KMail;
-QMap<Q_UINT32, QGuardedPtr<KMFolder> > MessageProperty::sFolders;
-QMap<Q_UINT32, QGuardedPtr<ActionScheduler> > MessageProperty::sHandlers;
-QMap<Q_UINT32, int > MessageProperty::sTransfers;
-QMap<const KMMsgBase*, long > MessageProperty::sSerialCache;
+TQMap<Q_UINT32, TQGuardedPtr<KMFolder> > MessageProperty::sFolders;
+TQMap<Q_UINT32, TQGuardedPtr<ActionScheduler> > MessageProperty::sHandlers;
+TQMap<Q_UINT32, int > MessageProperty::sTransfers;
+TQMap<const KMMsgBase*, long > MessageProperty::sSerialCache;
bool MessageProperty::filtering( Q_UINT32 serNum )
{
@@ -49,7 +49,7 @@ void MessageProperty::setFiltering( Q_UINT32 serNum, bool filter )
{
assert(!filtering(serNum) || !filter);
if (filter && !filtering(serNum))
- sFolders.replace(serNum, QGuardedPtr<KMFolder>(0) );
+ sFolders.replace(serNum, TQGuardedPtr<KMFolder>(0) );
else if (!filter)
sFolders.remove(serNum);
}
@@ -73,7 +73,7 @@ KMFolder* MessageProperty::filterFolder( Q_UINT32 serNum )
void MessageProperty::setFilterFolder( Q_UINT32 serNum, KMFolder* folder )
{
- sFolders.replace(serNum, QGuardedPtr<KMFolder>(folder) );
+ sFolders.replace(serNum, TQGuardedPtr<KMFolder>(folder) );
}
KMFolder* MessageProperty::filterFolder( const KMMsgBase *msgBase )
@@ -96,7 +96,7 @@ ActionScheduler* MessageProperty::filterHandler( Q_UINT32 serNum )
void MessageProperty::setFilterHandler( Q_UINT32 serNum, ActionScheduler* handler )
{
if (handler)
- sHandlers.replace( serNum, QGuardedPtr<ActionScheduler>(handler) );
+ sHandlers.replace( serNum, TQGuardedPtr<ActionScheduler>(handler) );
else
sHandlers.remove( serNum );
}
diff --git a/kmail/messageproperty.h b/kmail/messageproperty.h
index 1ffbdcc7b..4809cd7ad 100644
--- a/kmail/messageproperty.h
+++ b/kmail/messageproperty.h
@@ -33,9 +33,9 @@
#include "kmfilteraction.h" // for KMFilterAction::ReturnCode
#include "kmfolder.h"
-#include <qptrlist.h>
-#include <qguardedptr.h>
-#include <qobject.h>
+#include <tqptrlist.h>
+#include <tqguardedptr.h>
+#include <tqobject.h>
class KMFilter;
class KMFilterDlg;
@@ -98,13 +98,13 @@ public:
private:
// The folder a message is to be moved into once filtering is finished if any
- static QMap<Q_UINT32, QGuardedPtr<KMFolder> > sFolders;
+ static TQMap<Q_UINT32, TQGuardedPtr<KMFolder> > sFolders;
// The action scheduler currently processing a message if any
- static QMap<Q_UINT32, QGuardedPtr<ActionScheduler> > sHandlers;
+ static TQMap<Q_UINT32, TQGuardedPtr<ActionScheduler> > sHandlers;
// The transferInProgres state of a message if any.
- static QMap<Q_UINT32, int > sTransfers;
+ static TQMap<Q_UINT32, int > sTransfers;
// The cached serial number of a message if any.
- static QMap<const KMMsgBase*, long > sSerialCache;
+ static TQMap<const KMMsgBase*, long > sSerialCache;
};
}
diff --git a/kmail/messagesender.h b/kmail/messagesender.h
index 4f25b378c..0c45923b9 100644
--- a/kmail/messagesender.h
+++ b/kmail/messagesender.h
@@ -32,7 +32,7 @@
#ifndef __KMAIL_MESSAGESENDER_H__
#define __KMAIL_MESSAGESENDER_H__
-#include <qstring.h>
+#include <tqstring.h>
class KMMessage;
@@ -74,7 +74,7 @@ public:
@return true on success.
*/
- bool sendQueued( const QString & transport=QString::null ) { return doSendQueued( transport ); }
+ bool sendQueued( const TQString & transport=TQString::null ) { return doSendQueued( transport ); }
virtual void readConfig() = 0;
virtual void writeConfig( bool withSync = true ) = 0;
@@ -86,7 +86,7 @@ public:
virtual void setSendQuotedPrintable( bool qp ) = 0;
protected:
virtual bool doSend( KMMessage * msg, short sendNow ) = 0;
- virtual bool doSendQueued( const QString& transport ) = 0;
+ virtual bool doSendQueued( const TQString& transport ) = 0;
};
inline MessageSender::~MessageSender() {}
diff --git a/kmail/networkaccount.cpp b/kmail/networkaccount.cpp
index 3639ab7b5..4721e1e12 100644
--- a/kmail/networkaccount.cpp
+++ b/kmail/networkaccount.cpp
@@ -47,9 +47,9 @@ namespace KMail {
// for restricting number of concurrent connections to the same server
- static QMap<QString, int> s_serverConnections;
+ static TQMap<TQString, int> s_serverConnections;
- NetworkAccount::NetworkAccount( AccountManager * parent, const QString & name, uint id )
+ NetworkAccount::NetworkAccount( AccountManager * parent, const TQString & name, uint id )
: KMAccount( parent, name, id ),
mSlave( 0 ),
mAuth( "*" ),
@@ -72,10 +72,10 @@ namespace KMail {
KMAccount::init();
mSieveConfig = SieveConfig();
- mLogin = QString::null;
- mPasswd = QString::null;
+ mLogin = TQString::null;
+ mPasswd = TQString::null;
mAuth = "*";
- mHost = QString::null;
+ mHost = TQString::null;
mPort = defaultPort();
mStorePasswd = false;
mUseSSL = false;
@@ -89,17 +89,17 @@ namespace KMail {
//
//
- void NetworkAccount::setLogin( const QString & login ) {
+ void NetworkAccount::setLogin( const TQString & login ) {
mLogin = login;
}
- QString NetworkAccount::passwd() const {
+ TQString NetworkAccount::passwd() const {
if ( storePasswd() && mPasswd.isEmpty() )
mOwner->readPasswords();
return decryptStr( mPasswd );
}
- void NetworkAccount::setPasswd( const QString & passwd, bool storeInConfig ) {
+ void NetworkAccount::setPasswd( const TQString & passwd, bool storeInConfig ) {
if ( mPasswd != encryptStr( passwd ) ) {
mPasswd = encryptStr( passwd );
mPasswdDirty = true;
@@ -111,7 +111,7 @@ namespace KMail {
setPasswd( "", false );
}
- void NetworkAccount::setAuth( const QString & auth ) {
+ void NetworkAccount::setAuth( const TQString & auth ) {
mAuth = auth;
}
@@ -121,7 +121,7 @@ namespace KMail {
mStorePasswd = store;
}
- void NetworkAccount::setHost( const QString & host ) {
+ void NetworkAccount::setHost( const TQString & host ) {
mHost = host;
}
@@ -154,7 +154,7 @@ namespace KMail {
if ( config.readNumEntry( "store-passwd", false ) ) { // ### s/Num/Bool/
mStorePasswd = true;
- QString encpasswd = config.readEntry( "pass" );
+ TQString encpasswd = config.readEntry( "pass" );
if ( encpasswd.isEmpty() ) {
encpasswd = config.readEntry( "passwd" );
if ( !encpasswd.isEmpty() ) encpasswd = importPassword( encpasswd );
@@ -206,7 +206,7 @@ namespace KMail {
bool passwdStored = false;
if ( mPasswdDirty ) {
Wallet *wallet = kmkernel->wallet();
- if ( wallet && wallet->writePassword( "account-" + QString::number(mId), passwd() ) == 0 ) {
+ if ( wallet && wallet->writePassword( "account-" + TQString::number(mId), passwd() ) == 0 ) {
passwdStored = true;
mPasswdDirty = false;
mStorePasswdInConfig = false;
@@ -236,10 +236,10 @@ namespace KMail {
// delete password from the wallet if password storage is disabled
if (!storePasswd() && !Wallet::keyDoesNotExist(
- Wallet::NetworkWallet(), "kmail", "account-" + QString::number(mId))) {
+ Wallet::NetworkWallet(), "kmail", "account-" + TQString::number(mId))) {
Wallet *wallet = kmkernel->wallet();
if (wallet)
- wallet->removeEntry( "account-" + QString::number(mId) );
+ wallet->removeEntry( "account-" + TQString::number(mId) );
}
config.writeEntry( "host", host() );
@@ -298,18 +298,18 @@ namespace KMail {
if ( Wallet::isOpen( Wallet::NetworkWallet() ) )
{
Wallet *wallet = kmkernel->wallet();
- if (!wallet || !wallet->hasEntry( "account-" + QString::number(mId) ) )
+ if (!wallet || !wallet->hasEntry( "account-" + TQString::number(mId) ) )
return;
}
else
{
- if (Wallet::keyDoesNotExist( Wallet::NetworkWallet(), "kmail", "account-" + QString::number(mId) ) )
+ if (Wallet::keyDoesNotExist( Wallet::NetworkWallet(), "kmail", "account-" + TQString::number(mId) ) )
return;
}
if ( kmkernel->wallet() ) {
- QString passwd;
- kmkernel->wallet()->readPassword( "account-" + QString::number(mId), passwd );
+ TQString passwd;
+ kmkernel->wallet()->readPassword( "account-" + TQString::number(mId), passwd );
setPasswd( passwd, true );
mPasswdDirty = false;
}
diff --git a/kmail/networkaccount.h b/kmail/networkaccount.h
index 616de6711..868e20553 100644
--- a/kmail/networkaccount.h
+++ b/kmail/networkaccount.h
@@ -25,13 +25,13 @@
#ifndef __KMAIL_NETWORKACCOUNT_H__
#define __KMAIL_NETWORKACCOUNT_H__
-#include <qguardedptr.h>
+#include <tqguardedptr.h>
#include "kmaccount.h"
#include "sieveconfig.h"
-#include <qstring.h>
+#include <tqstring.h>
class AccountManager;
class KConfig/*Base*/;
@@ -46,7 +46,7 @@ namespace KMail {
class NetworkAccount : public KMAccount {
Q_OBJECT
protected:
- NetworkAccount( AccountManager * parent, const QString & name, uint id );
+ NetworkAccount( AccountManager * parent, const TQString & name, uint id );
public:
virtual ~NetworkAccount();
@@ -57,12 +57,12 @@ namespace KMail {
virtual void pseudoAssign( const KMAccount * a );
/** User login name */
- QString login() const { return mLogin; }
- virtual void setLogin( const QString & login );
+ TQString login() const { return mLogin; }
+ virtual void setLogin( const TQString & login );
/** User password */
- QString passwd() const;
- virtual void setPasswd( const QString & passwd, bool storeInConfig=false );
+ TQString passwd() const;
+ virtual void setPasswd( const TQString & passwd, bool storeInConfig=false );
/**
* Set the password to "" (empty string)
@@ -70,16 +70,16 @@ namespace KMail {
virtual void clearPasswd();
/** authentication method */
- QString auth() const { return mAuth; }
- virtual void setAuth( const QString & auth );
+ TQString auth() const { return mAuth; }
+ virtual void setAuth( const TQString & auth );
/** @return whether to store the password in the config file */
bool storePasswd() const { return mStorePasswd; }
virtual void setStorePasswd( bool store );
/** Server hostname */
- QString host() const { return mHost; }
- virtual void setHost( const QString & host );
+ TQString host() const { return mHost; }
+ virtual void setHost( const TQString & host );
/** Server port number */
unsigned short int port() const { return mPort; }
@@ -122,13 +122,13 @@ namespace KMail {
/** Reset connection list for the account */
static void resetConnectionList( NetworkAccount* acct );
protected:
- virtual QString protocol() const = 0;
+ virtual TQString protocol() const = 0;
virtual unsigned short int defaultPort() const = 0;
protected:
KMail::SieveConfig mSieveConfig;
- QGuardedPtr<KIO::Slave> mSlave;
- QString mLogin, mPasswd, mAuth, mHost;
+ TQGuardedPtr<KIO::Slave> mSlave;
+ TQString mLogin, mPasswd, mAuth, mHost;
unsigned short int mPort;
bool mStorePasswd : 1;
bool mUseSSL : 1;
diff --git a/kmail/newfolderdialog.cpp b/kmail/newfolderdialog.cpp
index 35bb461b7..78294e5f9 100644
--- a/kmail/newfolderdialog.cpp
+++ b/kmail/newfolderdialog.cpp
@@ -26,15 +26,15 @@
** your version.
*******************************************************************************/
-#include <qvariant.h>
-#include <qpushbutton.h>
-#include <qlabel.h>
-#include <qlineedit.h>
-#include <qcombobox.h>
-#include <qlayout.h>
-#include <qtooltip.h>
-#include <qwhatsthis.h>
-#include <qregexp.h>
+#include <tqvariant.h>
+#include <tqpushbutton.h>
+#include <tqlabel.h>
+#include <tqlineedit.h>
+#include <tqcombobox.h>
+#include <tqlayout.h>
+#include <tqtooltip.h>
+#include <tqwhatsthis.h>
+#include <tqregexp.h>
#include <klocale.h>
#include <kdialogbase.h>
@@ -54,7 +54,7 @@
using namespace KMail;
-NewFolderDialog::NewFolderDialog( QWidget* parent, KMFolder *folder )
+NewFolderDialog::NewFolderDialog( TQWidget* parent, KMFolder *folder )
: KDialogBase( parent, "new_folder_dialog", false, i18n( "New Folder" ),
KDialogBase::Ok|KDialogBase::Cancel,
KDialogBase::Ok, true ),
@@ -64,37 +64,37 @@ NewFolderDialog::NewFolderDialog( QWidget* parent, KMFolder *folder )
if ( mFolder ) {
setCaption( i18n("New Subfolder of %1").arg( mFolder->prettyURL() ) );
}
- QWidget* privateLayoutWidget = new QWidget( this, "mTopLevelLayout" );
- privateLayoutWidget->setGeometry( QRect( 10, 10, 260, 80 ) );
+ TQWidget* privateLayoutWidget = new TQWidget( this, "mTopLevelLayout" );
+ privateLayoutWidget->setGeometry( TQRect( 10, 10, 260, 80 ) );
setMainWidget( privateLayoutWidget );
- mTopLevelLayout = new QVBoxLayout( privateLayoutWidget, 0, spacingHint(),
+ mTopLevelLayout = new TQVBoxLayout( privateLayoutWidget, 0, spacingHint(),
"mTopLevelLayout");
- mNameHBox = new QHBoxLayout( 0, 0, 6, "mNameHBox");
+ mNameHBox = new TQHBoxLayout( 0, 0, 6, "mNameHBox");
- mNameLabel = new QLabel( privateLayoutWidget, "mNameLabel" );
+ mNameLabel = new TQLabel( privateLayoutWidget, "mNameLabel" );
mNameLabel->setText( i18n( "&Name:" ) );
mNameHBox->addWidget( mNameLabel );
- mNameLineEdit = new QLineEdit( privateLayoutWidget, "mNameLineEdit" );
+ mNameLineEdit = new TQLineEdit( privateLayoutWidget, "mNameLineEdit" );
mNameLabel->setBuddy( mNameLineEdit );
- QWhatsThis::add( mNameLineEdit, i18n( "Enter a name for the new folder." ) );
+ TQWhatsThis::add( mNameLineEdit, i18n( "Enter a name for the new folder." ) );
mNameLineEdit->setFocus();
mNameHBox->addWidget( mNameLineEdit );
mTopLevelLayout->addLayout( mNameHBox );
- connect( mNameLineEdit, SIGNAL( textChanged ( const QString & ) ), this, SLOT( slotFolderNameChanged( const QString & ) ) );
+ connect( mNameLineEdit, TQT_SIGNAL( textChanged ( const TQString & ) ), this, TQT_SLOT( slotFolderNameChanged( const TQString & ) ) );
if ( !mFolder ||
( mFolder->folderType() != KMFolderTypeImap &&
mFolder->folderType() != KMFolderTypeCachedImap ) ) {
- mFormatHBox = new QHBoxLayout( 0, 0, 6, "mFormatHBox");
- mMailboxFormatLabel = new QLabel( privateLayoutWidget, "mMailboxFormatLabel" );
+ mFormatHBox = new TQHBoxLayout( 0, 0, 6, "mFormatHBox");
+ mMailboxFormatLabel = new TQLabel( privateLayoutWidget, "mMailboxFormatLabel" );
mMailboxFormatLabel->setText( i18n( "Mailbox &format:" ) );
mFormatHBox->addWidget( mMailboxFormatLabel );
- mFormatComboBox = new QComboBox( false, privateLayoutWidget, "mFormatComboBox" );
+ mFormatComboBox = new TQComboBox( false, privateLayoutWidget, "mFormatComboBox" );
mMailboxFormatLabel->setBuddy( mFormatComboBox );
- QWhatsThis::add( mFormatComboBox, i18n( "Select whether you want to store the messages in this folder as one file per message (maildir) or as one big file (mbox). KMail uses maildir by default and this only needs to be changed in rare circumstances. If you are unsure, leave this option as-is." ) );
+ TQWhatsThis::add( mFormatComboBox, i18n( "Select whether you want to store the messages in this folder as one file per message (maildir) or as one big file (mbox). KMail uses maildir by default and this only needs to be changed in rare circumstances. If you are unsure, leave this option as-is." ) );
mFormatComboBox->insertItem("mbox", 0);
mFormatComboBox->insertItem("maildir", 1);
@@ -113,15 +113,15 @@ NewFolderDialog::NewFolderDialog( QWidget* parent, KMFolder *folder )
// --- contents -----
if ( kmkernel->iCalIface().isEnabled() ) {
- mContentsHBox = new QHBoxLayout( 0, 0, 6, "mContentsHBox");
+ mContentsHBox = new TQHBoxLayout( 0, 0, 6, "mContentsHBox");
- mContentsLabel = new QLabel( privateLayoutWidget, "mContentsLabel" );
+ mContentsLabel = new TQLabel( privateLayoutWidget, "mContentsLabel" );
mContentsLabel->setText( i18n( "Folder &contains:" ) );
mContentsHBox->addWidget( mContentsLabel );
- mContentsComboBox = new QComboBox( false, privateLayoutWidget, "mContentsComboBox" );
+ mContentsComboBox = new TQComboBox( false, privateLayoutWidget, "mContentsComboBox" );
mContentsLabel->setBuddy( mContentsComboBox );
- QWhatsThis::add( mContentsComboBox, i18n( "Select whether you want the new folder to be used for mail storage of for storage of groupware items such as tasks or notes. The default is mail. If you are unsure, leave this option as-is." ) );
+ TQWhatsThis::add( mContentsComboBox, i18n( "Select whether you want the new folder to be used for mail storage of for storage of groupware items such as tasks or notes. The default is mail. If you are unsure, leave this option as-is." ) );
mContentsComboBox->insertItem( i18n( "Mail" ) );
mContentsComboBox->insertItem( i18n( "Calendar" ) );
mContentsComboBox->insertItem( i18n( "Contacts" ) );
@@ -138,7 +138,7 @@ NewFolderDialog::NewFolderDialog( QWidget* parent, KMFolder *folder )
( mFolder->folderType() == KMFolderTypeImap ||
mFolder->folderType() == KMFolderTypeCachedImap ) ) {
bool rootFolder = false;
- QStringList namespaces;
+ TQStringList namespaces;
if ( mFolder->folderType() == KMFolderTypeImap ) {
ImapAccountBase* ai = static_cast<KMFolderImap*>(mFolder->storage())->account();
if ( mFolder->storage() == ai->rootFolder() ) {
@@ -154,15 +154,15 @@ NewFolderDialog::NewFolderDialog( QWidget* parent, KMFolder *folder )
}
}
if ( rootFolder && namespaces.count() > 1 ) {
- mNamespacesHBox = new QHBoxLayout( 0, 0, 6, "mNamespaceHBox");
+ mNamespacesHBox = new TQHBoxLayout( 0, 0, 6, "mNamespaceHBox");
- mNamespacesLabel = new QLabel( privateLayoutWidget, "mNamespacesLabel" );
+ mNamespacesLabel = new TQLabel( privateLayoutWidget, "mNamespacesLabel" );
mNamespacesLabel->setText( i18n( "Namespace for &folder:" ) );
mNamespacesHBox->addWidget( mNamespacesLabel );
- mNamespacesComboBox = new QComboBox( false, privateLayoutWidget, "mNamespacesComboBox" );
+ mNamespacesComboBox = new TQComboBox( false, privateLayoutWidget, "mNamespacesComboBox" );
mNamespacesLabel->setBuddy( mNamespacesComboBox );
- QWhatsThis::add( mNamespacesComboBox, i18n( "Select the personal namespace the folder should be created in." ) );
+ TQWhatsThis::add( mNamespacesComboBox, i18n( "Select the personal namespace the folder should be created in." ) );
mNamespacesComboBox->insertStringList( namespaces );
mNamespacesHBox->addWidget( mNamespacesComboBox );
mTopLevelLayout->addLayout( mNamespacesHBox );
@@ -171,19 +171,19 @@ NewFolderDialog::NewFolderDialog( QWidget* parent, KMFolder *folder )
}
}
- resize( QSize(282, 108).expandedTo(minimumSizeHint()) );
+ resize( TQSize(282, 108).expandedTo(minimumSizeHint()) );
clearWState( WState_Polished );
slotFolderNameChanged( mNameLineEdit->text());
}
-void NewFolderDialog::slotFolderNameChanged( const QString & _text)
+void NewFolderDialog::slotFolderNameChanged( const TQString & _text)
{
enableButtonOK( !_text.isEmpty() );
}
void NewFolderDialog::slotOk()
{
- const QString fldName = mNameLineEdit->text();
+ const TQString fldName = mNameLineEdit->text();
if ( fldName.isEmpty() ) {
KMessageBox::error( this, i18n("Please specify a name for the new folder."),
i18n( "No Name Specified" ) );
@@ -209,7 +209,7 @@ void NewFolderDialog::slotOk()
if ( mFolder &&
( mFolder->folderType() == KMFolderTypeImap ||
mFolder->folderType() == KMFolderTypeCachedImap ) ) {
- QString delimiter;
+ TQString delimiter;
if ( mFolder->folderType() == KMFolderTypeImap ) {
KMAcctImap* ai = static_cast<KMFolderImap*>( mFolder->storage() )->account();
if ( ai )
@@ -237,13 +237,13 @@ void NewFolderDialog::slotOk()
&& ( selectedFolderDir == mFolder->parent() )
&& ( mFolder->storage()->name() == fldName ) ) ) )
{
- const QString message = i18n( "<qt>Failed to create folder <b>%1</b>, folder already exists.</qt>" ).arg(fldName);
+ const TQString message = i18n( "<qt>Failed to create folder <b>%1</b>, folder already exists.</qt>" ).arg(fldName);
KMessageBox::error( this, message );
return;
}
/* Ok, obvious errors caught, let's try creating it for real. */
- const QString message = i18n( "<qt>Failed to create folder <b>%1</b>."
+ const TQString message = i18n( "<qt>Failed to create folder <b>%1</b>."
"</qt> " ).arg(fldName);
bool success = false;
KMFolder *newFolder = 0;
@@ -255,7 +255,7 @@ void NewFolderDialog::slotOk()
if (anAccount->makeConnection() == ImapAccountBase::Connected) {
newFolder = kmkernel->imapFolderMgr()->createFolder( fldName, false, KMFolderTypeImap, selectedFolderDir );
if ( newFolder ) {
- QString imapPath, parent;
+ TQString imapPath, parent;
if ( mNamespacesComboBox ) {
// create folder with namespace
parent = anAccount->addPathToNamespace( mNamespacesComboBox->currentText() );
@@ -265,7 +265,7 @@ void NewFolderDialog::slotOk()
}
KMFolderImap* newStorage = static_cast<KMFolderImap*>( newFolder->storage() );
selectedStorage->createFolder(fldName, parent); // create it on the server
- newStorage->initializeFrom( selectedStorage, imapPath, QString::null );
+ newStorage->initializeFrom( selectedStorage, imapPath, TQString::null );
static_cast<KMFolderImap*>(mFolder->storage())->setAccount( selectedStorage->account() );
success = true;
}
@@ -278,7 +278,7 @@ void NewFolderDialog::slotOk()
newStorage->initializeFrom( selectedStorage );
if ( mNamespacesComboBox ) {
// create folder with namespace
- QString path = selectedStorage->account()->createImapPath(
+ TQString path = selectedStorage->account()->createImapPath(
mNamespacesComboBox->currentText(), fldName );
newStorage->setImapPathForCreation( path );
}
diff --git a/kmail/newfolderdialog.h b/kmail/newfolderdialog.h
index f5065bcd6..3f3c88265 100644
--- a/kmail/newfolderdialog.h
+++ b/kmail/newfolderdialog.h
@@ -29,8 +29,8 @@
#ifndef NEW_FOLDER_DIALOG_H
#define NEW_FOLDER_DIALOG_H
-#include <qvariant.h>
-#include <qdialog.h>
+#include <tqvariant.h>
+#include <tqdialog.h>
#include <kdialogbase.h>
class QVBoxLayout;
@@ -49,27 +49,27 @@ class NewFolderDialog : public KDialogBase
Q_OBJECT
public:
- NewFolderDialog( QWidget* parent = 0, KMFolder *folder = 0 );
+ NewFolderDialog( TQWidget* parent = 0, KMFolder *folder = 0 );
~NewFolderDialog() {};
- QLabel* mNameLabel;
- QLineEdit* mNameLineEdit;
- QLabel* mMailboxFormatLabel;
- QComboBox* mFormatComboBox;
- QLabel* mContentsLabel;
- QComboBox* mContentsComboBox;
- QLabel* mNamespacesLabel;
- QComboBox* mNamespacesComboBox;
+ TQLabel* mNameLabel;
+ TQLineEdit* mNameLineEdit;
+ TQLabel* mMailboxFormatLabel;
+ TQComboBox* mFormatComboBox;
+ TQLabel* mContentsLabel;
+ TQComboBox* mContentsComboBox;
+ TQLabel* mNamespacesLabel;
+ TQComboBox* mNamespacesComboBox;
protected:
- QVBoxLayout* mTopLevelLayout;
- QHBoxLayout* mNameHBox;
- QHBoxLayout* mFormatHBox;
- QHBoxLayout* mContentsHBox;
- QHBoxLayout* mNamespacesHBox;
+ TQVBoxLayout* mTopLevelLayout;
+ TQHBoxLayout* mNameHBox;
+ TQHBoxLayout* mFormatHBox;
+ TQHBoxLayout* mContentsHBox;
+ TQHBoxLayout* mNamespacesHBox;
protected slots:
void slotOk();
- void slotFolderNameChanged( const QString & _text);
+ void slotFolderNameChanged( const TQString & _text);
private:
KMFolder* mFolder;
diff --git a/kmail/objecttreeparser.cpp b/kmail/objecttreeparser.cpp
index 6f4bd4650..4c56a7bd4 100644
--- a/kmail/objecttreeparser.cpp
+++ b/kmail/objecttreeparser.cpp
@@ -96,15 +96,15 @@
#include <kmdcodec.h>
// other Qt headers
-#include <qtextcodec.h>
-#include <qdir.h>
-#include <qfile.h>
-#include <qapplication.h>
+#include <tqtextcodec.h>
+#include <tqdir.h>
+#include <tqfile.h>
+#include <tqapplication.h>
#include <kstyle.h>
-#include <qbuffer.h>
-#include <qpixmap.h>
-#include <qpainter.h>
-#include <qregexp.h>
+#include <tqbuffer.h>
+#include <tqpixmap.h>
+#include <tqpainter.h>
+#include <tqregexp.h>
// other headers
#include <memory>
@@ -214,7 +214,7 @@ namespace KMail {
if ( startNode.mimePartTreeItem() ) {
kdDebug(5006) << "\n -----> Inserting items into MimePartTree\n" << endl;
newNode->fillMimePartTree( startNode.mimePartTreeItem(), 0,
- QString::null, QString::null, QString::null, 0,
+ TQString::null, TQString::null, TQString::null, 0,
append );
kdDebug(5006) << "\n <----- Finished inserting items into MimePartTree\n" << endl;
} else {
@@ -261,7 +261,7 @@ namespace KMail {
ProcessResult processResult;
if ( mReader )
- htmlWriter()->queue( QString::fromLatin1("<a name=\"att%1\"/>").arg( node->nodeId() ) );
+ htmlWriter()->queue( TQString::fromLatin1("<a name=\"att%1\"/>").arg( node->nodeId() ) );
if ( const Interface::BodyPartFormatter * formatter
= BodyPartFormatterFactory::instance()->createFor( node->typeString(), node->subTypeString() ) ) {
PartNodeBodyPart part( *node, codecFor( node ) );
@@ -377,9 +377,9 @@ namespace KMail {
bool ObjectTreeParser::writeOpaqueOrMultipartSignedData( partNode* data,
partNode& sign,
- const QString& fromAddress,
+ const TQString& fromAddress,
bool doCheck,
- QCString* cleartextData,
+ TQCString* cleartextData,
std::vector<GpgME::Signature> paramSignatures,
bool hideErrors )
{
@@ -389,8 +389,8 @@ namespace KMail {
const Kleo::CryptoBackend::Protocol* cryptProto = cryptoProtocol();
- QString cryptPlugLibName;
- QString cryptPlugDisplayName;
+ TQString cryptPlugLibName;
+ TQString cryptPlugDisplayName;
if ( cryptProto ) {
cryptPlugLibName = cryptProto->name();
cryptPlugDisplayName = cryptProto->displayName();
@@ -411,8 +411,8 @@ namespace KMail {
<< cryptPlugLibName << endl;
}
- QCString cleartext;
- QByteArray signaturetext;
+ TQCString cleartext;
+ TQByteArray signaturetext;
if ( doCheck && cryptProto ) {
if ( data ) {
@@ -454,7 +454,7 @@ namespace KMail {
GpgME::VerificationResult result;
if ( data ) { // detached
if ( Kleo::VerifyDetachedJob * const job = cryptProto->verifyDetachedJob() ) {
- QByteArray plainData = cleartext;
+ TQByteArray plainData = cleartext;
plainData.resize( cleartext.size() - 1 );
result = job->exec( signaturetext, plainData );
messagePart.auditLog = job->auditLogAsHtml();
@@ -463,9 +463,9 @@ namespace KMail {
}
} else { // opaque
if ( Kleo::VerifyOpaqueJob * const job = cryptProto->verifyOpaqueJob() ) {
- QByteArray plainData;
+ TQByteArray plainData;
result = job->exec( signaturetext, plainData );
- cleartext = QCString( plainData.data(), plainData.size() + 1 );
+ cleartext = TQCString( plainData.data(), plainData.size() + 1 );
messagePart.auditLog = job->auditLogAsHtml();
} else {
cryptPlugError = CANT_VERIFY_SIGNATURES;
@@ -483,7 +483,7 @@ namespace KMail {
GpgME::Signature signature = signatures[0];
messagePart.status_code = signatureToStatus( signature );
- messagePart.status = QString::fromUtf8( signature.status().asString() );
+ messagePart.status = TQString::fromUtf8( signature.status().asString() );
for ( uint i = 1; i < signatures.size(); ++i ) {
if ( signatureToStatus( signatures[i] ) != messagePart.status_code ) {
messagePart.status_code = GPGME_SIG_STAT_DIFF;
@@ -496,7 +496,7 @@ namespace KMail {
// get key for this signature
Kleo::KeyListJob *job = cryptProto->keyListJob();
std::vector<GpgME::Key> keys;
- GpgME::KeyListResult keyListRes = job->exec( QString::fromLatin1( signature.fingerprint() ), false, keys );
+ GpgME::KeyListResult keyListRes = job->exec( TQString::fromLatin1( signature.fingerprint() ), false, keys );
GpgME::Key key;
if ( keys.size() == 1 )
key = keys[0];
@@ -518,7 +518,7 @@ namespace KMail {
// The following if /should/ always result in TRUE but we
// won't trust implicitely the plugin that gave us these data.
if ( key.userID( iMail ).email() ) {
- QString email = QString::fromUtf8( key.userID( iMail ).email() );
+ TQString email = TQString::fromUtf8( key.userID( iMail ).email() );
// ### work around gpgme 0.3.x / cryptplug bug where the
// ### email addresses are specified as angle-addr, not addr-spec:
if ( email.startsWith( "<" ) && email.endsWith( ">" ) )
@@ -531,7 +531,7 @@ namespace KMail {
if ( signature.creationTime() )
messagePart.creationTime.setTime_t( signature.creationTime() );
else
- messagePart.creationTime = QDateTime();
+ messagePart.creationTime = TQDateTime();
if ( messagePart.signer.isEmpty() ) {
if ( key.numUserIDs() > 0 && key.userID( 0 ).name() )
messagePart.signer = Kleo::DN( key.userID( 0 ).name() ).prettyDN();
@@ -548,7 +548,7 @@ namespace KMail {
<< "\n signer: " << messagePart.signer << endl;
} else {
- messagePart.creationTime = QDateTime();
+ messagePart.creationTime = TQDateTime();
}
if ( !doCheck || !data ){
@@ -568,7 +568,7 @@ namespace KMail {
}
else if ( !hideErrors ) {
- QString txt;
+ TQString txt;
txt = "<hr><b><h2>";
txt.append( i18n( "The crypto engine returned no cleartext data." ) );
txt.append( "</h2></b>" );
@@ -588,7 +588,7 @@ namespace KMail {
else {
if ( mReader ) {
if ( !cryptProto ) {
- QString errorMsg;
+ TQString errorMsg;
switch ( cryptPlugError ) {
case NOT_INITIALIZED:
errorMsg = i18n( "Crypto plug-in \"%1\" is not initialized." )
@@ -638,30 +638,30 @@ namespace KMail {
bool ObjectTreeParser::okDecryptMIME( partNode& data,
- QCString& decryptedData,
+ TQCString& decryptedData,
bool& signatureFound,
std::vector<GpgME::Signature> &signatures,
bool showWarning,
bool& passphraseError,
bool& actuallyEncrypted,
- QString& aErrorText,
- QString& auditLog )
+ TQString& aErrorText,
+ TQString& auditLog )
{
passphraseError = false;
- aErrorText = QString::null;
- auditLog = QString::null;
+ aErrorText = TQString::null;
+ auditLog = TQString::null;
bool bDecryptionOk = false;
enum { NO_PLUGIN, NOT_INITIALIZED, CANT_DECRYPT }
cryptPlugError = NO_PLUGIN;
const Kleo::CryptoBackend::Protocol* cryptProto = cryptoProtocol();
- QString cryptPlugLibName;
+ TQString cryptPlugLibName;
if ( cryptProto )
cryptPlugLibName = cryptProto->name();
if ( mReader && !mReader->decryptMessage() ) {
- QString iconName = KGlobal::instance()->iconLoader()->iconPath( "decrypted", KIcon::Small );
+ TQString iconName = KGlobal::instance()->iconLoader()->iconPath( "decrypted", KIcon::Small );
decryptedData = "<div style=\"font-size:large; text-align:center;"
"padding-top:20pt;\">"
+ i18n("This message is encrypted.").utf8()
@@ -675,16 +675,16 @@ bool ObjectTreeParser::okDecryptMIME( partNode& data,
}
if ( cryptProto && !kmkernel->contextMenuShown() ) {
- QByteArray ciphertext( data.msgPart().bodyDecodedBinary() );
+ TQByteArray ciphertext( data.msgPart().bodyDecodedBinary() );
#ifdef MARCS_DEBUG
- QCString cipherStr( ciphertext.data(), ciphertext.size() + 1 );
+ TQCString cipherStr( ciphertext.data(), ciphertext.size() + 1 );
bool cipherIsBinary = (-1 == cipherStr.find("BEGIN ENCRYPTED MESSAGE", 0, false) ) &&
(-1 == cipherStr.find("BEGIN PGP ENCRYPTED MESSAGE", 0, false) ) &&
(-1 == cipherStr.find("BEGIN PGP MESSAGE", 0, false) );
dumpToFile( "dat_04_reader.encrypted", ciphertext.data(), ciphertext.size() );
- QCString deb;
+ TQCString deb;
deb = "\n\nE N C R Y P T E D D A T A = ";
if ( cipherIsBinary )
deb += "[binary data]";
@@ -708,7 +708,7 @@ bool ObjectTreeParser::okDecryptMIME( partNode& data,
cryptPlugError = CANT_DECRYPT;
cryptProto = 0;
} else {
- QByteArray plainText;
+ TQByteArray plainText;
const std::pair<GpgME::DecryptionResult,GpgME::VerificationResult> res = job->exec( ciphertext, plainText );
const GpgME::DecryptionResult & decryptResult = res.first;
const GpgME::VerificationResult & verifyResult = res.second;
@@ -718,13 +718,13 @@ bool ObjectTreeParser::okDecryptMIME( partNode& data,
passphraseError = decryptResult.error().isCanceled()
|| decryptResult.error().code() == GPG_ERR_NO_SECKEY;
actuallyEncrypted = decryptResult.error().code() != GPG_ERR_NO_DATA;
- aErrorText = QString::fromLocal8Bit( decryptResult.error().asString() );
+ aErrorText = TQString::fromLocal8Bit( decryptResult.error().asString() );
auditLog = job->auditLogAsHtml();
kdDebug(5006) << "ObjectTreeParser::decryptMIME: returned from CRYPTPLUG"
<< endl;
if ( bDecryptionOk )
- decryptedData = QCString( plainText.data(), plainText.size() + 1 );
+ decryptedData = TQCString( plainText.data(), plainText.size() + 1 );
else if ( mReader && showWarning ) {
decryptedData = "<div style=\"font-size:x-large; text-align:center;"
"padding:20pt;\">"
@@ -759,8 +759,8 @@ bool ObjectTreeParser::okDecryptMIME( partNode& data,
} else if ( kmkernel->contextMenuShown() ) {
// ### Workaround for bug 56693 (kmail freeze with the complete desktop
// ### while pinentry-qt appears)
- QByteArray ciphertext( data.msgPart().bodyDecodedBinary() );
- QCString cipherStr( ciphertext.data(), ciphertext.size() + 1 );
+ TQByteArray ciphertext( data.msgPart().bodyDecodedBinary() );
+ TQCString cipherStr( ciphertext.data(), ciphertext.size() + 1 );
bool cipherIsBinary = (-1 == cipherStr.find("BEGIN ENCRYPTED MESSAGE", 0, false) ) &&
(-1 == cipherStr.find("BEGIN PGP ENCRYPTED MESSAGE", 0, false) ) &&
(-1 == cipherStr.find("BEGIN PGP MESSAGE", 0, false) );
@@ -781,9 +781,9 @@ bool ObjectTreeParser::okDecryptMIME( partNode& data,
}
//static
- bool ObjectTreeParser::containsExternalReferences( const QCString & str )
+ bool ObjectTreeParser::containsExternalReferences( const TQCString & str )
{
- QRegExp httpRegExp("(\\\"|\\\'|url\\s*\\(\\s*)http[s]?:");
+ TQRegExp httpRegExp("(\\\"|\\\'|url\\s*\\(\\s*)http[s]?:");
int httpPos = str.find( httpRegExp, 0 );
while ( httpPos >= 0 ) {
@@ -803,7 +803,7 @@ bool ObjectTreeParser::okDecryptMIME( partNode& data,
}
bool ObjectTreeParser::processTextHtmlSubtype( partNode * curNode, ProcessResult & ) {
- QCString cstr( curNode->msgPart().bodyDecoded() );
+ TQCString cstr( curNode->msgPart().bodyDecoded() );
mRawReplyString = cstr;
if ( curNode->isFirstTextPart() ) {
@@ -874,7 +874,7 @@ static bool isMailmanMessage( partNode * curNode ) {
if ( headers.HasField("X-Mailman-Version") )
return true;
if ( headers.HasField("X-Mailer") &&
- 0 == QCString( headers.FieldBody("X-Mailer").AsString().c_str() )
+ 0 == TQCString( headers.FieldBody("X-Mailer").AsString().c_str() )
.find("MAILMAN", 0, false) )
return true;
return false;
@@ -883,14 +883,14 @@ static bool isMailmanMessage( partNode * curNode ) {
namespace KMail {
bool ObjectTreeParser::processMailmanMessage( partNode * curNode ) {
- const QCString cstr = curNode->msgPart().bodyDecoded();
+ const TQCString cstr = curNode->msgPart().bodyDecoded();
//###
- const QCString delim1( "--__--__--\n\nMessage:");
- const QCString delim2( "--__--__--\r\n\r\nMessage:");
- const QCString delimZ2("--__--__--\n\n_____________");
- const QCString delimZ1("--__--__--\r\n\r\n_____________");
- QCString partStr, digestHeaderStr;
+ const TQCString delim1( "--__--__--\n\nMessage:");
+ const TQCString delim2( "--__--__--\r\n\r\nMessage:");
+ const TQCString delimZ2("--__--__--\n\n_____________");
+ const TQCString delimZ1("--__--__--\r\n\r\n_____________");
+ TQCString partStr, digestHeaderStr;
int thisDelim = cstr.find(delim1, 0, false);
if ( thisDelim == -1 )
thisDelim = cstr.find(delim2, 0, false);
@@ -943,8 +943,8 @@ namespace KMail {
partStr = "Content-Type=message/rfc822\nContent-Description=embedded message\n";
partStr += cstr.mid( thisDelim, nextDelim-thisDelim );
- QCString subject("embedded message");
- QCString subSearch("\nSubject:");
+ TQCString subject("embedded message");
+ TQCString subSearch("\nSubject:");
int subPos = partStr.find(subSearch, 0, false);
if ( -1 < subPos ){
subject = partStr.mid(subPos+subSearch.length());
@@ -1007,7 +1007,7 @@ namespace KMail {
mTextualContentCharset = curNode->msgPart().charset();
}
- QString label = curNode->msgPart().fileName().stripWhiteSpace();
+ TQString label = curNode->msgPart().fileName().stripWhiteSpace();
if ( label.isEmpty() )
label = curNode->msgPart().name().stripWhiteSpace();
@@ -1017,19 +1017,19 @@ namespace KMail {
if ( bDrawFrame ) {
label = KMMessage::quoteHtmlChars( label, true );
- const QString comment =
+ const TQString comment =
KMMessage::quoteHtmlChars( curNode->msgPart().contentDescription(), true );
- const QString fileName =
+ const TQString fileName =
mReader->writeMessagePartToTempFile( &curNode->msgPart(),
curNode->nodeId() );
- const QString dir = QApplication::reverseLayout() ? "rtl" : "ltr" ;
+ const TQString dir = TQApplication::reverseLayout() ? "rtl" : "ltr" ;
- QString htmlStr = "<table cellspacing=\"1\" class=\"textAtm\">"
+ TQString htmlStr = "<table cellspacing=\"1\" class=\"textAtm\">"
"<tr class=\"textAtmH\"><td dir=\"" + dir + "\">";
if ( !fileName.isEmpty() )
- htmlStr += "<a href=\"" + QString("file:")
+ htmlStr += "<a href=\"" + TQString("file:")
+ KURL::encode_string( fileName ) + "\">"
+ label + "</a>";
else
@@ -1138,7 +1138,7 @@ namespace KMail {
// mimetype of "signature" (not required by the RFC, but practised
// by all implementaions of security multiparts
- const QString contentType = node->contentTypeParameter( "protocol" ).lower();
+ const TQString contentType = node->contentTypeParameter( "protocol" ).lower();
const Kleo::CryptoBackend::Protocol *protocol = 0;
if ( contentType == "application/pkcs7-signature" || contentType == "application/x-pkcs7-signature" )
protocol = Kleo::CryptoBackendFactory::instance()->smime();
@@ -1166,7 +1166,7 @@ namespace KMail {
if ( keepEncryptions() ) {
node->setEncryptionState( KMMsgFullyEncrypted );
- const QCString cstr = node->msgPart().bodyDecoded();
+ const TQCString cstr = node->msgPart().bodyDecoded();
if ( mReader )
writeBodyString( cstr, node->trueFromAddress(),
codecFor( node ), result, false );
@@ -1212,7 +1212,7 @@ namespace KMail {
kdDebug(5006) << "\n-----> Initially processing encrypted data\n" << endl;
PartMetaData messagePart;
node->setEncryptionState( KMMsgFullyEncrypted );
- QCString decryptedData;
+ TQCString decryptedData;
bool signatureFound;
std::vector<GpgME::Signature> signatures;
bool passphraseError;
@@ -1269,7 +1269,7 @@ namespace KMail {
if ( mReader ) {
// print the error message that was returned in decryptedData
// (utf8-encoded)
- htmlWriter()->queue( QString::fromUtf8( decryptedData.data() ) );
+ htmlWriter()->queue( TQString::fromUtf8( decryptedData.data() ) );
}
}
@@ -1304,7 +1304,7 @@ namespace KMail {
messagePart.isEncrypted = false;
messagePart.isSigned = false;
messagePart.isEncapsulatedRfc822Message = true;
- QString filename =
+ TQString filename =
mReader->writeMessagePartToTempFile( &node->msgPart(),
node->nodeId() );
htmlWriter()->queue( writeSigstatHeader( messagePart,
@@ -1312,7 +1312,7 @@ namespace KMail {
node->trueFromAddress(),
filename ) );
}
- QCString rfc822messageStr( node->msgPart().bodyDecoded() );
+ TQCString rfc822messageStr( node->msgPart().bodyDecoded() );
// display the headers of the encapsulated message
DwMessage* rfc822DwMessage = new DwMessage(); // will be deleted by c'tor of rfc822headers
rfc822DwMessage->FromString( rfc822messageStr );
@@ -1353,7 +1353,7 @@ namespace KMail {
kdDebug(5006) << "\n-----> Initially processing encrypted data\n" << endl;
node->setEncryptionState( KMMsgFullyEncrypted );
if ( keepEncryptions() ) {
- const QCString cstr = node->msgPart().bodyDecoded();
+ const TQCString cstr = node->msgPart().bodyDecoded();
if ( mReader )
writeBodyString( cstr, node->trueFromAddress(),
codecFor( node ), result, false );
@@ -1364,7 +1364,7 @@ namespace KMail {
*/
PartMetaData messagePart;
setCryptoProtocol( Kleo::CryptoBackendFactory::instance()->openpgp() );
- QCString decryptedData;
+ TQCString decryptedData;
bool signatureFound;
std::vector<GpgME::Signature> signatures;
bool passphraseError;
@@ -1400,7 +1400,7 @@ namespace KMail {
if ( mReader ) {
// print the error message that was returned in decryptedData
// (utf8-encoded)
- htmlWriter()->queue( QString::fromUtf8( decryptedData.data() ) );
+ htmlWriter()->queue( TQString::fromUtf8( decryptedData.data() ) );
}
}
@@ -1432,7 +1432,7 @@ namespace KMail {
const Kleo::CryptoBackend::Protocol * smimeCrypto = Kleo::CryptoBackendFactory::instance()->smime();
- const QString smimeType = node->contentTypeParameter("smime-type").lower();
+ const TQString smimeType = node->contentTypeParameter("smime-type").lower();
if ( smimeType == "certs-only" ) {
result.setNeverDisplayInline( true );
@@ -1443,13 +1443,13 @@ namespace KMail {
if ( !reader.readBoolEntry( "AutoImportKeys", false ) )
return false;
- const QByteArray certData = node->msgPart().bodyDecodedBinary();
+ const TQByteArray certData = node->msgPart().bodyDecodedBinary();
Kleo::ImportJob *import = smimeCrypto->importJob();
const GpgME::ImportResult res = import->exec( certData );
if ( res.error() ) {
htmlWriter()->queue( i18n( "Sorry, certificate could not be imported.<br>"
- "Reason: %1").arg( QString::fromLocal8Bit( res.error().asString() ) ) );
+ "Reason: %1").arg( TQString::fromLocal8Bit( res.error().asString() ) ) );
return true;
}
@@ -1461,7 +1461,7 @@ namespace KMail {
htmlWriter()->queue( i18n( "Sorry, no certificates were found in this message." ) );
return true;
}
- QString comment = "<b>" + i18n( "Certificate import status:" ) + "</b><br>&nbsp;<br>";
+ TQString comment = "<b>" + i18n( "Certificate import status:" ) + "</b><br>&nbsp;<br>";
if ( nImp )
comment += i18n( "1 new certificate was imported.",
"%n new certificates were imported.", nImp ) + "<br>";
@@ -1490,7 +1490,7 @@ namespace KMail {
if ( (*it).error() )
htmlWriter()->queue( i18n( "Failed: %1 (%2)" )
.arg( (*it).fingerprint(),
- QString::fromLocal8Bit( (*it).error().asString() ) ) );
+ TQString::fromLocal8Bit( (*it).error().asString() ) ) );
else if ( (*it).status() & ~GpgME::Import::ContainedSecretKey )
if ( (*it).status() & GpgME::Import::ContainedSecretKey )
htmlWriter()->queue( i18n( "New or changed: %1 (secret key available)" ).arg( (*it).fingerprint() ) );
@@ -1524,7 +1524,7 @@ namespace KMail {
kdDebug(5006) << "pkcs7 mime == S/MIME TYPE: enveloped (encrypted) data" << endl;
else
kdDebug(5006) << "pkcs7 mime - type unknown - enveloped (encrypted) data ?" << endl;
- QCString decryptedData;
+ TQCString decryptedData;
PartMetaData messagePart;
messagePart.isEncrypted = true;
messagePart.isSigned = false;
@@ -1578,7 +1578,7 @@ namespace KMail {
if ( mReader->decryptMessage() )
writePartIcon( &node->msgPart(), node->nodeId() );
else
- htmlWriter()->queue( QString::fromUtf8( decryptedData ) );
+ htmlWriter()->queue( TQString::fromUtf8( decryptedData ) );
htmlWriter()->queue( writeSigstatFooter( messagePart ) );
}
} else {
@@ -1619,7 +1619,7 @@ namespace KMail {
return isSigned || isEncrypted;
}
-bool ObjectTreeParser::decryptChiasmus( const QByteArray& data, QByteArray& bodyDecoded, QString& errorText )
+bool ObjectTreeParser::decryptChiasmus( const TQByteArray& data, TQByteArray& bodyDecoded, TQString& errorText )
{
const Kleo::CryptoBackend::Protocol * chiasmus =
Kleo::CryptoBackendFactory::instance()->protocol( "Chiasmus" );
@@ -1627,7 +1627,7 @@ bool ObjectTreeParser::decryptChiasmus( const QByteArray& data, QByteArray& body
if ( !chiasmus )
return false;
- const STD_NAMESPACE_PREFIX auto_ptr<Kleo::SpecialJob> listjob( chiasmus->specialJob( "x-obtain-keys", QMap<QString,QVariant>() ) );
+ const STD_NAMESPACE_PREFIX auto_ptr<Kleo::SpecialJob> listjob( chiasmus->specialJob( "x-obtain-keys", TQMap<TQString,TQVariant>() ) );
if ( !listjob.get() ) {
errorText = i18n( "Chiasmus backend does not offer the "
"\"x-obtain-keys\" function. Please report this bug." );
@@ -1639,15 +1639,15 @@ bool ObjectTreeParser::decryptChiasmus( const QByteArray& data, QByteArray& body
return false;
}
- const QVariant result = listjob->property( "result" );
- if ( result.type() != QVariant::StringList ) {
+ const TQVariant result = listjob->property( "result" );
+ if ( result.type() != TQVariant::StringList ) {
errorText = i18n( "Unexpected return value from Chiasmus backend: "
"The \"x-obtain-keys\" function did not return a "
"string list. Please report this bug." );
return false;
}
- const QStringList keys = result.toStringList();
+ const TQStringList keys = result.toStringList();
if ( keys.empty() ) {
errorText = i18n( "No keys have been found. Please check that a "
"valid key path has been set in the Chiasmus "
@@ -1659,14 +1659,14 @@ bool ObjectTreeParser::decryptChiasmus( const QByteArray& data, QByteArray& body
ChiasmusKeySelector selectorDlg( mReader, i18n( "Chiasmus Decryption Key Selection" ),
keys, GlobalSettings::chiasmusDecryptionKey(),
GlobalSettings::chiasmusDecryptionOptions() );
- if ( selectorDlg.exec() != QDialog::Accepted )
+ if ( selectorDlg.exec() != TQDialog::Accepted )
return false;
GlobalSettings::setChiasmusDecryptionOptions( selectorDlg.options() );
GlobalSettings::setChiasmusDecryptionKey( selectorDlg.key() );
assert( !GlobalSettings::chiasmusDecryptionKey().isEmpty() );
- Kleo::SpecialJob * job = chiasmus->specialJob( "x-decrypt", QMap<QString,QVariant>() );
+ Kleo::SpecialJob * job = chiasmus->specialJob( "x-decrypt", TQMap<TQString,TQVariant>() );
if ( !job ) {
errorText = i18n( "Chiasmus backend does not offer the "
"\"x-decrypt\" function. Please report this bug." );
@@ -1686,8 +1686,8 @@ bool ObjectTreeParser::decryptChiasmus( const QByteArray& data, QByteArray& body
return false;
}
- const QVariant resultData = job->property( "result" );
- if ( resultData.type() != QVariant::ByteArray ) {
+ const TQVariant resultData = job->property( "result" );
+ if ( resultData.type() != TQVariant::ByteArray ) {
errorText = i18n( "Unexpected return value from Chiasmus backend: "
"The \"x-decrypt\" function did not return a "
"byte array. Please report this bug." );
@@ -1706,9 +1706,9 @@ bool ObjectTreeParser::processApplicationChiasmusTextSubtype( partNode * curNode
return true;
}
- QByteArray decryptedBody;
- QString errorText;
- const QByteArray data = curNode->msgPart().bodyDecodedBinary();
+ TQByteArray decryptedBody;
+ TQString errorText;
+ const TQByteArray data = curNode->msgPart().bodyDecodedBinary();
bool bOkDecrypt = decryptChiasmus( data, decryptedBody, errorText );
PartMetaData messagePart;
messagePart.isDecryptable = bOkDecrypt;
@@ -1719,9 +1719,9 @@ bool ObjectTreeParser::processApplicationChiasmusTextSubtype( partNode * curNode
htmlWriter()->queue( writeSigstatHeader( messagePart,
0, //cryptPlugWrapper(),
curNode->trueFromAddress() ) );
- const QByteArray body = bOkDecrypt ? decryptedBody : data;
- const QString chiasmusCharset = curNode->contentTypeParameter("chiasmus-charset");
- const QTextCodec* aCodec = chiasmusCharset.isEmpty()
+ const TQByteArray body = bOkDecrypt ? decryptedBody : data;
+ const TQString chiasmusCharset = curNode->contentTypeParameter("chiasmus-charset");
+ const TQTextCodec* aCodec = chiasmusCharset.isEmpty()
? codecFor( curNode )
: KMMsgBase::codecForName( chiasmusCharset.ascii() );
htmlWriter()->queue( quotedHTML( aCodec->toUnicode( body ), false /*decorate*/ ) );
@@ -1737,31 +1737,31 @@ bool ObjectTreeParser::processApplicationMsTnefSubtype( partNode *node, ProcessR
if ( !mReader )
return false;
- const QString fileName = mReader->writeMessagePartToTempFile( &node->msgPart(), node->nodeId() );
+ const TQString fileName = mReader->writeMessagePartToTempFile( &node->msgPart(), node->nodeId() );
KTNEFParser parser;
if ( !parser.openFile( fileName ) || !parser.message()) {
kdDebug() << k_funcinfo << "Could not parse " << fileName << endl;
return false;
}
- QPtrList<KTNEFAttach> tnefatts = parser.message()->attachmentList();
+ TQPtrList<KTNEFAttach> tnefatts = parser.message()->attachmentList();
if ( tnefatts.isEmpty() ) {
kdDebug() << k_funcinfo << "No attachments found in " << fileName << endl;
return false;
}
if ( !showOnlyOneMimePart() ) {
- QString label = node->msgPart().fileName().stripWhiteSpace();
+ TQString label = node->msgPart().fileName().stripWhiteSpace();
if ( label.isEmpty() )
label = node->msgPart().name().stripWhiteSpace();
label = KMMessage::quoteHtmlChars( label, true );
- const QString comment = KMMessage::quoteHtmlChars( node->msgPart().contentDescription(), true );
- const QString dir = QApplication::reverseLayout() ? "rtl" : "ltr" ;
+ const TQString comment = KMMessage::quoteHtmlChars( node->msgPart().contentDescription(), true );
+ const TQString dir = TQApplication::reverseLayout() ? "rtl" : "ltr" ;
- QString htmlStr = "<table cellspacing=\"1\" class=\"textAtm\">"
+ TQString htmlStr = "<table cellspacing=\"1\" class=\"textAtm\">"
"<tr class=\"textAtmH\"><td dir=\"" + dir + "\">";
if ( !fileName.isEmpty() )
- htmlStr += "<a href=\"" + QString("file:")
+ htmlStr += "<a href=\"" + TQString("file:")
+ KURL::encode_string( fileName ) + "\">"
+ label + "</a>";
else
@@ -1774,18 +1774,18 @@ bool ObjectTreeParser::processApplicationMsTnefSubtype( partNode *node, ProcessR
for ( uint i = 0; i < tnefatts.count(); ++i ) {
KTNEFAttach *att = tnefatts.at( i );
- QString label = att->displayName();
+ TQString label = att->displayName();
if( label.isEmpty() )
label = att->name();
label = KMMessage::quoteHtmlChars( label, true );
- QString dir = mReader->createTempDir( "ktnef-" + QString::number( i ) );
+ TQString dir = mReader->createTempDir( "ktnef-" + TQString::number( i ) );
parser.extractFileTo( att->name(), dir );
- mReader->mTempFiles.append( dir + QDir::separator() + att->name() );
- QString href = "file:" + KURL::encode_string( dir + QDir::separator() + att->name() );
+ mReader->mTempFiles.append( dir + TQDir::separator() + att->name() );
+ TQString href = "file:" + KURL::encode_string( dir + TQDir::separator() + att->name() );
KMimeType::Ptr mimeType = KMimeType::mimeType( att->mimeTag() );
- QString iconName = KGlobal::instance()->iconLoader()->iconPath( mimeType->icon( QString(), false ), KIcon::Desktop );
+ TQString iconName = KGlobal::instance()->iconLoader()->iconPath( mimeType->icon( TQString(), false ), KIcon::Desktop );
htmlWriter()->queue( "<div><a href=\"" + href + "\"><img src=\"" +
iconName + "\" border=\"0\" style=\"max-width: 100%\">" + label +
@@ -1798,9 +1798,9 @@ bool ObjectTreeParser::processApplicationMsTnefSubtype( partNode *node, ProcessR
return true;
}
- void ObjectTreeParser::writeBodyString( const QCString & bodyString,
- const QString & fromAddress,
- const QTextCodec * codec,
+ void ObjectTreeParser::writeBodyString( const TQCString & bodyString,
+ const TQString & fromAddress,
+ const TQTextCodec * codec,
ProcessResult & result,
bool decorate ) {
assert( mReader ); assert( codec );
@@ -1818,24 +1818,24 @@ bool ObjectTreeParser::processApplicationMsTnefSubtype( partNode *node, ProcessR
kdDebug(5006) << "writePartIcon: PartNum: " << partNum << endl;
- QString label = msgPart->fileName();
+ TQString label = msgPart->fileName();
if( label.isEmpty() )
label = msgPart->name();
if( label.isEmpty() )
label = "unnamed";
label = KMMessage::quoteHtmlChars( label, true );
- QString comment = msgPart->contentDescription();
+ TQString comment = msgPart->contentDescription();
comment = KMMessage::quoteHtmlChars( comment, true );
- if ( label == comment ) comment = QString::null;
+ if ( label == comment ) comment = TQString::null;
- QString fileName = mReader->writeMessagePartToTempFile( msgPart, partNum );
+ TQString fileName = mReader->writeMessagePartToTempFile( msgPart, partNum );
- QString href = fileName.isEmpty() ?
- "part://" + QString::number( partNum + 1 ) :
+ TQString href = fileName.isEmpty() ?
+ "part://" + TQString::number( partNum + 1 ) :
"file:" + KURL::encode_string( fileName ) ;
- QString iconName;
+ TQString iconName;
if( inlineImage )
iconName = href;
else {
@@ -1846,7 +1846,7 @@ bool ObjectTreeParser::processApplicationMsTnefSubtype( partNode *node, ProcessR
}
}
- QCString contentId = msgPart->contentId();
+ TQCString contentId = msgPart->contentId();
if ( !contentId.isEmpty() ) {
htmlWriter()->embedPart( contentId, href );
}
@@ -1871,7 +1871,7 @@ bool ObjectTreeParser::processApplicationMsTnefSubtype( partNode *node, ProcessR
#define SIG_FRAME_COL_RED -1
#define SIG_FRAME_COL_YELLOW 0
#define SIG_FRAME_COL_GREEN 1
-QString ObjectTreeParser::sigStatusToString( const Kleo::CryptoBackend::Protocol* cryptProto,
+TQString ObjectTreeParser::sigStatusToString( const Kleo::CryptoBackend::Protocol* cryptProto,
int status_code,
GpgME::Signature::Summary summary,
int& frameColor,
@@ -1881,7 +1881,7 @@ QString ObjectTreeParser::sigStatusToString( const Kleo::CryptoBackend::Protocol
// used for CMS only but not for PGP signatures
// pending(khz): Implement usage of these for PGP sigs as well.
showKeyInfos = true;
- QString result;
+ TQString result;
if( cryptProto ) {
if( cryptProto == Kleo::CryptoBackendFactory::instance()->openpgp() ) {
// process enum according to it's definition to be read in
@@ -1951,7 +1951,7 @@ QString ObjectTreeParser::sigStatusToString( const Kleo::CryptoBackend::Protocol
// we assume green, test for yellow or red (in this order!)
frameColor = SIG_FRAME_COL_GREEN;
- QString result2;
+ TQString result2;
if( summary & GpgME::Signature::KeyExpired ){
// still is green!
result2 += i18n("One key has expired.");
@@ -2040,9 +2040,9 @@ QString ObjectTreeParser::sigStatusToString( const Kleo::CryptoBackend::Protocol
}
-static QString writeSimpleSigstatHeader( const PartMetaData &block )
+static TQString writeSimpleSigstatHeader( const PartMetaData &block )
{
- QString html;
+ TQString html;
html += "<table cellspacing=\"0\" cellpadding=\"0\" width=\"100%\"><tr><td>";
if ( block.signClass == "signErr" ) {
@@ -2050,10 +2050,10 @@ static QString writeSimpleSigstatHeader( const PartMetaData &block )
} else if ( block.signClass == "signOkKeyBad" || block.signClass == "signWarn" ) {
html += i18n( "Not enough information to check signature validity." );
} else if ( block.signClass == "signOkKeyOk" ) {
- QString addr;
+ TQString addr;
if ( !block.signerMailAddresses.isEmpty() )
addr = block.signerMailAddresses.first();
- QString name = addr;
+ TQString name = addr;
if ( name.isEmpty() )
name = block.signer;
if ( addr.isEmpty() ) {
@@ -2072,12 +2072,12 @@ static QString writeSimpleSigstatHeader( const PartMetaData &block )
return html;
}
-static QString beginVerboseSigstatHeader()
+static TQString beginVerboseSigstatHeader()
{
return "<table cellspacing=\"0\" cellpadding=\"0\" width=\"100%\"><tr><td rowspan=\"2\">";
}
-static QString makeShowAuditLogLink( const QString & auditLog ) {
+static TQString makeShowAuditLogLink( const TQString & auditLog ) {
if ( auditLog.isEmpty() )
return i18n("No Audit Log available");
@@ -2089,9 +2089,9 @@ static QString makeShowAuditLogLink( const QString & auditLog ) {
return "<a href=\"" + url.htmlURL() + "\">" + i18n("The Audit Log is a detailed error log from the gnupg backend", "Show Audit Log") + "</a>";
}
-static QString endVerboseSigstatHeader( const PartMetaData & pmd )
+static TQString endVerboseSigstatHeader( const PartMetaData & pmd )
{
- QString html;
+ TQString html;
html += "</td><td align=\"right\" valign=\"top\" nowrap=\"nowrap\">";
html += "<a href=\"kmail:hideSignatureDetails\">";
html += i18n( "Hide Details" );
@@ -2102,24 +2102,24 @@ static QString endVerboseSigstatHeader( const PartMetaData & pmd )
return html;
}
-QString ObjectTreeParser::writeSigstatHeader( PartMetaData & block,
+TQString ObjectTreeParser::writeSigstatHeader( PartMetaData & block,
const Kleo::CryptoBackend::Protocol * cryptProto,
- const QString & fromAddress,
- const QString & filename )
+ const TQString & fromAddress,
+ const TQString & filename )
{
const bool isSMIME = cryptProto && ( cryptProto == Kleo::CryptoBackendFactory::instance()->smime() );
- QString signer = block.signer;
+ TQString signer = block.signer;
- QString htmlStr, simpleHtmlStr;
- QString dir = ( QApplication::reverseLayout() ? "rtl" : "ltr" );
- QString cellPadding("cellpadding=\"1\"");
+ TQString htmlStr, simpleHtmlStr;
+ TQString dir = ( TQApplication::reverseLayout() ? "rtl" : "ltr" );
+ TQString cellPadding("cellpadding=\"1\"");
if( block.isEncapsulatedRfc822Message )
{
htmlStr += "<table cellspacing=\"1\" "+cellPadding+" class=\"rfc822\">"
"<tr class=\"rfc822H\"><td dir=\"" + dir + "\">";
if( !filename.isEmpty() )
- htmlStr += "<a href=\"" + QString("file:")
+ htmlStr += "<a href=\"" + TQString("file:")
+ KURL::encode_string( filename ) + "\">"
+ i18n("Encapsulated message") + "</a>";
else
@@ -2143,7 +2143,7 @@ QString ObjectTreeParser::writeSigstatHeader( PartMetaData & block,
simpleHtmlStr = htmlStr;
if( block.isSigned ) {
- QStringList& blockAddrs( block.signerMailAddresses );
+ TQStringList& blockAddrs( block.signerMailAddresses );
// note: At the moment frameColor and showKeyInfos are
// used for CMS only but not for PGP signatures
// pending(khz): Implement usage of these for PGP sigs as well.
@@ -2151,7 +2151,7 @@ QString ObjectTreeParser::writeSigstatHeader( PartMetaData & block,
bool showKeyInfos;
bool onlyShowKeyURL = false;
bool cannotCheckSignature = true;
- QString statusStr = sigStatusToString( cryptProto,
+ TQString statusStr = sigStatusToString( cryptProto,
block.status_code,
block.sigSummary,
frameColor,
@@ -2180,26 +2180,26 @@ QString ObjectTreeParser::writeSigstatHeader( PartMetaData & block,
// note: Once we can start PGP key manager programs
// from within KMail we could change this and
// always show the URL. (khz, 2002/06/27)
- QString startKeyHREF;
+ TQString startKeyHREF;
if( isSMIME )
startKeyHREF =
- QString("<a href=\"kmail:showCertificate#%1 ### %2 ### %3\">")
+ TQString("<a href=\"kmail:showCertificate#%1 ### %2 ### %3\">")
.arg( cryptProto->displayName(),
cryptProto->name(),
block.keyId );
- QString keyWithWithoutURL
+ TQString keyWithWithoutURL
= isSMIME
- ? QString("%1%2</a>")
+ ? TQString("%1%2</a>")
.arg( startKeyHREF,
cannotCheckSignature ? i18n("[Details]") : ("0x" + block.keyId) )
- : "0x" + QString::fromUtf8( block.keyId );
+ : "0x" + TQString::fromUtf8( block.keyId );
// temporary hack: always show key infos!
showKeyInfos = true;
// Sorry for using 'black' as null color but .isValid()
- // checking with QColor default c'tor did not work for
+ // checking with TQColor default c'tor did not work for
// some reason.
if( isSMIME && (SIG_FRAME_COL_UNDEF != frameColor) ) {
@@ -2226,9 +2226,9 @@ QString ObjectTreeParser::writeSigstatHeader( PartMetaData & block,
block.signClass = "signOkKeyOk";//"signCMSGreen";
// extra hint for green case
// that email addresses in DN do not match fromAddress
- QString greenCaseWarning;
- QString msgFrom( KPIM::getEmailAddress(fromAddress) );
- QString certificate;
+ TQString greenCaseWarning;
+ TQString msgFrom( KPIM::getEmailAddress(fromAddress) );
+ TQString certificate;
if( block.keyId.isEmpty() )
certificate = i18n("certificate");
else
@@ -2253,7 +2253,7 @@ QString ObjectTreeParser::writeSigstatHeader( PartMetaData & block,
// extract the mail addresses (without '<''>')
// before including it into our string:
bool bStart = true;
- for(QStringList::ConstIterator it = blockAddrs.begin();
+ for(TQStringList::ConstIterator it = blockAddrs.begin();
it != blockAddrs.end(); ++it ){
if( !bStart )
greenCaseWarning.append(", <br />&nbsp; &nbsp;");
@@ -2278,7 +2278,7 @@ QString ObjectTreeParser::writeSigstatHeader( PartMetaData & block,
break;
}
- QString frame = "<table cellspacing=\"1\" "+cellPadding+" "
+ TQString frame = "<table cellspacing=\"1\" "+cellPadding+" "
"class=\"" + block.signClass + "\">"
"<tr class=\"" + block.signClass + "H\"><td dir=\"" + dir + "\">";
htmlStr += frame + beginVerboseSigstatHeader();
@@ -2299,7 +2299,7 @@ QString ObjectTreeParser::writeSigstatHeader( PartMetaData & block,
signer = "";
else {
if( !blockAddrs.empty() ){
- QString address = KMMessage::encodeMailtoUrl( blockAddrs.first() );
+ TQString address = KMMessage::encodeMailtoUrl( blockAddrs.first() );
signer = "<a href=\"mailto:" + address + "\">" + signer + "</a>";
}
}
@@ -2311,7 +2311,7 @@ QString ObjectTreeParser::writeSigstatHeader( PartMetaData & block,
htmlStr += i18n( "Message was signed by %1." )
.arg( signer );
} else {
- QDateTime created = block.creationTime;
+ TQDateTime created = block.creationTime;
if( created.isValid() ) {
if( signer.isEmpty() ) {
if( onlyShowKeyURL )
@@ -2363,7 +2363,7 @@ QString ObjectTreeParser::writeSigstatHeader( PartMetaData & block,
if( block.signer.isEmpty() || block.technicalProblem ) {
block.signClass = "signWarn";
- QString frame = "<table cellspacing=\"1\" "+cellPadding+" "
+ TQString frame = "<table cellspacing=\"1\" "+cellPadding+" "
"class=\"" + block.signClass + "\">"
"<tr class=\"" + block.signClass + "H\"><td dir=\"" + dir + "\">";
htmlStr += frame + beginVerboseSigstatHeader();
@@ -2374,7 +2374,7 @@ QString ObjectTreeParser::writeSigstatHeader( PartMetaData & block,
}
else {
if( !block.keyId.isEmpty() ) {
- QDateTime created = block.creationTime;
+ TQDateTime created = block.creationTime;
if ( created.isValid() )
htmlStr += i18n( "Message was signed on %1 with unknown key %2." )
.arg( KGlobal::locale()->formatDateTime( created ),
@@ -2411,7 +2411,7 @@ QString ObjectTreeParser::writeSigstatHeader( PartMetaData & block,
block.signClass = "signOkKeyBad";
else
block.signClass = "signOkKeyOk";
- QString frame = "<table cellspacing=\"1\" "+cellPadding+" "
+ TQString frame = "<table cellspacing=\"1\" "+cellPadding+" "
"class=\"" + block.signClass + "\">"
"<tr class=\"" + block.signClass + "H\"><td dir=\"" + dir + "\">";
htmlStr += frame + beginVerboseSigstatHeader();
@@ -2455,7 +2455,7 @@ QString ObjectTreeParser::writeSigstatHeader( PartMetaData & block,
else
{
block.signClass = "signErr";
- QString frame = "<table cellspacing=\"1\" "+cellPadding+" "
+ TQString frame = "<table cellspacing=\"1\" "+cellPadding+" "
"class=\"" + block.signClass + "\">"
"<tr class=\"" + block.signClass + "H\"><td dir=\"" + dir + "\">";
htmlStr += frame + beginVerboseSigstatHeader();
@@ -2483,11 +2483,11 @@ QString ObjectTreeParser::writeSigstatHeader( PartMetaData & block,
return simpleHtmlStr;
}
-QString ObjectTreeParser::writeSigstatFooter( PartMetaData& block )
+TQString ObjectTreeParser::writeSigstatFooter( PartMetaData& block )
{
- QString dir = ( QApplication::reverseLayout() ? "rtl" : "ltr" );
+ TQString dir = ( TQApplication::reverseLayout() ? "rtl" : "ltr" );
- QString htmlStr;
+ TQString htmlStr;
if (block.isSigned) {
htmlStr += "</td></tr><tr class=\"" + block.signClass + "H\">";
@@ -2513,8 +2513,8 @@ QString ObjectTreeParser::writeSigstatFooter( PartMetaData& block )
}
//-----------------------------------------------------------------------------
-void ObjectTreeParser::writeBodyStr( const QCString& aStr, const QTextCodec *aCodec,
- const QString& fromAddress )
+void ObjectTreeParser::writeBodyStr( const TQCString& aStr, const TQTextCodec *aCodec,
+ const TQString& fromAddress )
{
KMMsgSignatureState dummy1;
KMMsgEncryptionState dummy2;
@@ -2522,8 +2522,8 @@ void ObjectTreeParser::writeBodyStr( const QCString& aStr, const QTextCodec *aCo
}
//-----------------------------------------------------------------------------
-void ObjectTreeParser::writeBodyStr( const QCString& aStr, const QTextCodec *aCodec,
- const QString& fromAddress,
+void ObjectTreeParser::writeBodyStr( const TQCString& aStr, const TQTextCodec *aCodec,
+ const TQString& fromAddress,
KMMsgSignatureState& inlineSignatureState,
KMMsgEncryptionState& inlineEncryptionState,
bool decorate )
@@ -2533,33 +2533,33 @@ void ObjectTreeParser::writeBodyStr( const QCString& aStr, const QTextCodec *aCo
assert(pgp != 0);
bool isPgpMessage = false; // true if the message contains at least one
// PGP MESSAGE or one PGP SIGNED MESSAGE block
- QString dir = ( QApplication::reverseLayout() ? "rtl" : "ltr" );
- QString headerStr = QString("<div dir=\"%1\">").arg(dir);
+ TQString dir = ( TQApplication::reverseLayout() ? "rtl" : "ltr" );
+ TQString headerStr = TQString("<div dir=\"%1\">").arg(dir);
inlineSignatureState = KMMsgNotSigned;
inlineEncryptionState = KMMsgNotEncrypted;
- QPtrList<Kpgp::Block> pgpBlocks;
- QStrList nonPgpBlocks;
+ TQPtrList<Kpgp::Block> pgpBlocks;
+ TQStrList nonPgpBlocks;
if( Kpgp::Module::prepareMessageForDecryption( aStr, pgpBlocks, nonPgpBlocks ) )
{
bool isEncrypted = false, isSigned = false;
bool fullySignedOrEncrypted = true;
bool firstNonPgpBlock = true;
bool couldDecrypt = false;
- QString signer;
- QCString keyId;
- QString decryptionError;
+ TQString signer;
+ TQCString keyId;
+ TQString decryptionError;
Kpgp::Validity keyTrust = Kpgp::KPGP_VALIDITY_FULL;
- QPtrListIterator<Kpgp::Block> pbit( pgpBlocks );
+ TQPtrListIterator<Kpgp::Block> pbit( pgpBlocks );
- QStrListIterator npbit( nonPgpBlocks );
+ TQStrListIterator npbit( nonPgpBlocks );
- QString htmlStr;
+ TQString htmlStr;
for( ; *pbit != 0; ++pbit, ++npbit )
{
// insert the next Non-OpenPGP block
- QCString str( *npbit );
+ TQCString str( *npbit );
if( !str.isEmpty() ) {
htmlStr += quotedHTML( aCodec->toUnicode( str ), decorate );
kdDebug( 5006 ) << "Non-empty Non-OpenPGP block found: '" << str
@@ -2568,7 +2568,7 @@ void ObjectTreeParser::writeBodyStr( const QCString& aStr, const QTextCodec *aCo
// block as fully signed/encrypted
if( firstNonPgpBlock ) {
// check whether str only consists of \n
- for( QCString::ConstIterator c = str.begin(); *c; ++c ) {
+ for( TQCString::ConstIterator c = str.begin(); *c; ++c ) {
if( *c != '\n' ) {
fullySignedOrEncrypted = false;
break;
@@ -2660,7 +2660,7 @@ void ObjectTreeParser::writeBodyStr( const QCString& aStr, const QTextCodec *aCo
}
// add the last Non-OpenPGP block
- QCString str( nonPgpBlocks.last() );
+ TQCString str( nonPgpBlocks.last() );
if( !str.isEmpty() ) {
htmlStr += quotedHTML( aCodec->toUnicode( str ), decorate );
// Even if the trailing Non-OpenPGP block isn't empty we still
@@ -2682,7 +2682,7 @@ void ObjectTreeParser::writeBodyStr( const QCString& aStr, const QTextCodec *aCo
}
-QString ObjectTreeParser::quotedHTML( const QString& s, bool decorate )
+TQString ObjectTreeParser::quotedHTML( const TQString& s, bool decorate )
{
assert( mReader );
assert( cssHelper() );
@@ -2691,16 +2691,16 @@ QString ObjectTreeParser::quotedHTML( const QString& s, bool decorate )
if ( decorate && GlobalSettings::self()->showEmoticons() ) {
convertFlags |= LinkLocator::ReplaceSmileys;
}
- QString htmlStr;
- const QString normalStartTag = cssHelper()->nonQuotedFontTag();
- QString quoteFontTag[3];
- QString deepQuoteFontTag[3];
+ TQString htmlStr;
+ const TQString normalStartTag = cssHelper()->nonQuotedFontTag();
+ TQString quoteFontTag[3];
+ TQString deepQuoteFontTag[3];
for ( int i = 0 ; i < 3 ; ++i ) {
quoteFontTag[i] = cssHelper()->quoteFontTag( i );
deepQuoteFontTag[i] = cssHelper()->quoteFontTag( i+3 );
}
- const QString normalEndTag = "</div>";
- const QString quoteEnd = "</div>";
+ const TQString normalEndTag = "</div>";
+ const TQString quoteEnd = "</div>";
unsigned int pos, beg;
const unsigned int length = s.length();
@@ -2715,7 +2715,7 @@ QString ObjectTreeParser::quotedHTML( const QString& s, bool decorate )
while (beg<length)
{
- QString line;
+ TQString line;
/* search next occurrence of '\n' */
pos = s.find('\n', beg, FALSE);
@@ -2757,7 +2757,7 @@ QString ObjectTreeParser::quotedHTML( const QString& s, bool decorate )
} /* for() */
bool actHidden = false;
- QString textExpand;
+ TQString textExpand;
// This quoted line needs be hiden
if (GlobalSettings::self()->showExpandQuotesMark() && mReader->mLevelQuote >= 0
@@ -2785,7 +2785,7 @@ QString ObjectTreeParser::quotedHTML( const QString& s, bool decorate )
{
//Expand all quotes
htmlStr += "<div class=\"quotelevelmark\" >" ;
- htmlStr += QString( "<a href=\"kmail:levelquote?%1 \">"
+ htmlStr += TQString( "<a href=\"kmail:levelquote?%1 \">"
"<img src=\"%2\" alt=\"\" title=\"\"/></a>" )
.arg(-1)
.arg( mExpandIcon );
@@ -2794,7 +2794,7 @@ QString ObjectTreeParser::quotedHTML( const QString& s, bool decorate )
}
}else {
htmlStr += "<div class=\"quotelevelmark\" >" ;
- htmlStr += QString( "<a href=\"kmail:levelquote?%1 \">"
+ htmlStr += TQString( "<a href=\"kmail:levelquote?%1 \">"
"<img src=\"%2\" alt=\"\" title=\"\"/></a>" )
.arg(actQuoteLevel)
.arg( mCollapseIcon);
@@ -2821,9 +2821,9 @@ QString ObjectTreeParser::quotedHTML( const QString& s, bool decorate )
// ignore ^M DOS linebreaks
if( !line.replace('\015', "").isEmpty() )
{
- htmlStr +=QString( "<div dir=\"%1\">" ).arg( line.isRightToLeft() ? "rtl":"ltr" );
+ htmlStr +=TQString( "<div dir=\"%1\">" ).arg( line.isRightToLeft() ? "rtl":"ltr" );
htmlStr += LinkLocator::convertToHtml( line, convertFlags );
- htmlStr += QString( "</div>" );
+ htmlStr += TQString( "</div>" );
}
else
htmlStr += "<br>";
@@ -2845,7 +2845,7 @@ QString ObjectTreeParser::quotedHTML( const QString& s, bool decorate )
- const QTextCodec * ObjectTreeParser::codecFor( partNode * node ) const {
+ const TQTextCodec * ObjectTreeParser::codecFor( partNode * node ) const {
assert( node );
if ( mReader && mReader->overrideCodec() )
return mReader->overrideCodec();
@@ -2857,10 +2857,10 @@ QString ObjectTreeParser::quotedHTML( const QString& s, bool decorate )
size_t len ) {
assert( filename );
- QFile f( filename );
+ TQFile f( filename );
if ( f.open( IO_WriteOnly ) ) {
if ( start ) {
- QDataStream ds( &f );
+ TQDataStream ds( &f );
ds.writeRawBytes( start, len );
}
f.close(); // If data is 0 we just create a zero length file.
diff --git a/kmail/objecttreeparser.h b/kmail/objecttreeparser.h
index bcc137b0d..6a55462b6 100644
--- a/kmail/objecttreeparser.h
+++ b/kmail/objecttreeparser.h
@@ -35,7 +35,7 @@
#include "kmmsgbase.h"
-#include <qcstring.h>
+#include <tqcstring.h>
#include <kleo/cryptobackend.h>
#include <gpgmepp/verificationresult.h>
@@ -110,13 +110,13 @@ namespace KMail {
KMail::CSSHelper * cssHelper=0 );
virtual ~ObjectTreeParser();
- QCString rawReplyString() const { return mRawReplyString; }
+ TQCString rawReplyString() const { return mRawReplyString; }
/*! @return the text of the message, ie. what would appear in the
composer's text editor if this was edited. */
- QString textualContent() const { return mTextualContent; }
+ TQString textualContent() const { return mTextualContent; }
- QCString textualContentCharset() const { return mTextualContentCharset; }
+ TQCString textualContentCharset() const { return mTextualContentCharset; }
void setCryptoProtocol( const Kleo::CryptoBackend::Protocol * protocol ) {
mCryptoProtocol = protocol;
@@ -183,23 +183,23 @@ namespace KMail {
find out if opaque data is signed or not. */
bool writeOpaqueOrMultipartSignedData( partNode * data,
partNode & sign,
- const QString & fromAddress,
+ const TQString & fromAddress,
bool doCheck=true,
- QCString * cleartextData=0,
+ TQCString * cleartextData=0,
std::vector<GpgME::Signature> paramSignatures = std::vector<GpgME::Signature>(),
bool hideErrors=false );
/** Returns the contents of the given multipart/encrypted
object. Data is decypted. May contain body parts. */
bool okDecryptMIME( partNode& data,
- QCString& decryptedData,
+ TQCString& decryptedData,
bool& signatureFound,
std::vector<GpgME::Signature> &signatures,
bool showWarning,
bool& passphraseError,
bool& actuallyEncrypted,
- QString& aErrorText,
- QString& auditLog );
+ TQString& aErrorText,
+ TQString& auditLog );
bool processMailmanMessage( partNode * node );
@@ -207,7 +207,7 @@ namespace KMail {
we only check whether @p str contains 'xxx="http[s]:' where xxx is
not href. Obfuscated external references are ignored on purpose.
*/
- static bool containsExternalReferences( const QCString & str );
+ static bool containsExternalReferences( const TQCString & str );
public:// (during refactoring)
@@ -229,42 +229,42 @@ namespace KMail {
bool processApplicationMsTnefSubtype( partNode *node, ProcessResult &result );
private:
- bool decryptChiasmus( const QByteArray& data, QByteArray& bodyDecoded, QString& errorText );
- void writeBodyString( const QCString & bodyString,
- const QString & fromAddress,
- const QTextCodec * codec,
+ bool decryptChiasmus( const TQByteArray& data, TQByteArray& bodyDecoded, TQString& errorText );
+ void writeBodyString( const TQCString & bodyString,
+ const TQString & fromAddress,
+ const TQTextCodec * codec,
ProcessResult & result, bool decorate );
void writePartIcon( KMMessagePart * msgPart, int partNumber, bool inlineImage=false );
- QString sigStatusToString( const Kleo::CryptoBackend::Protocol * cryptProto,
+ TQString sigStatusToString( const Kleo::CryptoBackend::Protocol * cryptProto,
int status_code,
GpgME::Signature::Summary summary,
int & frameColor,
bool & showKeyInfos );
- QString writeSigstatHeader( KMail::PartMetaData & part,
+ TQString writeSigstatHeader( KMail::PartMetaData & part,
const Kleo::CryptoBackend::Protocol * cryptProto,
- const QString & fromAddress,
- const QString & filename = QString::null );
- QString writeSigstatFooter( KMail::PartMetaData & part );
+ const TQString & fromAddress,
+ const TQString & filename = TQString::null );
+ TQString writeSigstatFooter( KMail::PartMetaData & part );
- void writeBodyStr( const QCString & bodyString,
- const QTextCodec * aCodec,
- const QString & fromAddress,
+ void writeBodyStr( const TQCString & bodyString,
+ const TQTextCodec * aCodec,
+ const TQString & fromAddress,
KMMsgSignatureState & inlineSignatureState,
KMMsgEncryptionState & inlineEncryptionState,
bool decorate );
public: // KMReaderWin still needs this...
- void writeBodyStr( const QCString & bodyString,
- const QTextCodec * aCodec,
- const QString & fromAddress );
+ void writeBodyStr( const TQCString & bodyString,
+ const TQTextCodec * aCodec,
+ const TQString & fromAddress );
private:
/** Change the string to `quoted' html (meaning, that the quoted
part of the message get italized */
- QString quotedHTML(const QString& pos, bool decorate);
+ TQString quotedHTML(const TQString& pos, bool decorate);
- const QTextCodec * codecFor( partNode * node ) const;
+ const TQTextCodec * codecFor( partNode * node ) const;
#ifdef MARCS_DEBUG
void dumpToFile( const char * filename, const char * dataStart, size_t dataLen );
@@ -274,9 +274,9 @@ namespace KMail {
private:
KMReaderWin * mReader;
- QCString mRawReplyString;
- QCString mTextualContentCharset;
- QString mTextualContent;
+ TQCString mRawReplyString;
+ TQCString mTextualContentCharset;
+ TQString mTextualContent;
const Kleo::CryptoBackend::Protocol * mCryptoProtocol;
bool mShowOnlyOneMimePart;
bool mKeepEncryptions;
@@ -285,8 +285,8 @@ namespace KMail {
KMail::HtmlWriter * mHtmlWriter;
KMail::CSSHelper * mCSSHelper;
// DataUrl Icons cache
- QString mCollapseIcon;
- QString mExpandIcon;
+ TQString mCollapseIcon;
+ TQString mExpandIcon;
};
} // namespace KMail
diff --git a/kmail/partNode.cpp b/kmail/partNode.cpp
index 4fd51c857..80e0545bf 100644
--- a/kmail/partNode.cpp
+++ b/kmail/partNode.cpp
@@ -35,7 +35,7 @@
#include <kdebug.h>
#include "kmmimeparttree.h"
#include <mimelib/utility.h>
-#include <qregexp.h>
+#include <tqregexp.h>
#include <kasciistricmp.h>
#include "util.h"
@@ -164,7 +164,7 @@ partNode::~partNode() {
#ifndef NDEBUG
void partNode::dump( int chars ) const {
- kdDebug(5006) << QString().fill( ' ', chars ) << "+ "
+ kdDebug(5006) << TQString().fill( ' ', chars ) << "+ "
<< typeString() << '/' << subTypeString() << endl;
if ( mChild )
mChild->dump( chars + 1 );
@@ -175,7 +175,7 @@ void partNode::dump( int chars ) const {
void partNode::dump( int ) const {}
#endif
-const QCString & partNode::encodedBody() {
+const TQCString & partNode::encodedBody() {
if ( mEncodedOk )
return mEncodedBody;
@@ -218,13 +218,13 @@ void partNode::buildObjectTree( bool processSiblings )
}
}
-QCString partNode::typeString() const {
+TQCString partNode::typeString() const {
DwString s;
DwTypeEnumToStr( type(), s );
return s.c_str();
}
-QCString partNode::subTypeString() const {
+TQCString partNode::subTypeString() const {
DwString s;
DwSubtypeEnumToStr( subType(), s );
return s.c_str();
@@ -237,22 +237,22 @@ int partNode::childCount() const {
return count;
}
-QString partNode::contentTypeParameter( const char * name ) const {
+TQString partNode::contentTypeParameter( const char * name ) const {
if ( !mDwPart || !mDwPart->hasHeaders() )
- return QString::null;
+ return TQString::null;
DwHeaders & headers = mDwPart->Headers();
if ( !headers.HasContentType() )
- return QString::null;
+ return TQString::null;
DwString attr = name;
attr.ConvertToLowerCase();
for ( DwParameter * param = headers.ContentType().FirstParameter() ; param ; param = param->Next() ) {
DwString this_attr = param->Attribute();
this_attr.ConvertToLowerCase(); // what a braindead design!
if ( this_attr == attr )
- return QString::fromLatin1( param->Value().data(), param->Value().size() );
+ return TQString::fromLatin1( param->Value().data(), param->Value().size() );
// warning: misses rfc2231 handling!
}
- return QString::null;
+ return TQString::null;
}
KMMsgEncryptionState partNode::overallEncryptionState() const
@@ -441,9 +441,9 @@ partNode* partNode::findTypeNot( int type, int subType, bool deep, bool wide )
void partNode::fillMimePartTree( KMMimePartTreeItem* parentItem,
KMMimePartTree* mimePartTree,
- QString labelDescr,
- QString labelCntType,
- QString labelEncoding,
+ TQString labelDescr,
+ TQString labelCntType,
+ TQString labelEncoding,
KIO::filesize_t size,
bool revertOrder )
{
@@ -451,10 +451,10 @@ void partNode::fillMimePartTree( KMMimePartTreeItem* parentItem,
if( mNext )
mNext->fillMimePartTree( parentItem, mimePartTree,
- QString::null, QString::null, QString::null, 0,
+ TQString::null, TQString::null, TQString::null, 0,
revertOrder );
- QString cntDesc, cntType, cntEnc;
+ TQString cntDesc, cntType, cntEnc;
KIO::filesize_t cntSize = 0;
if( labelDescr.isEmpty() ) {
@@ -492,7 +492,7 @@ void partNode::fillMimePartTree( KMMimePartTreeItem* parentItem,
cntSize = size;
}
// remove linebreak+whitespace from folded Content-Description
- cntDesc.replace( QRegExp("\\n\\s*"), " " );
+ cntDesc.replace( TQRegExp("\\n\\s*"), " " );
kdDebug(5006) << " Inserting one item into MimePartTree" << endl;
kdDebug(5006) << " Content-Type: " << cntType << endl;
@@ -514,7 +514,7 @@ kdDebug(5006) << " Content-Type: " << cntType << endl;
mMimePartTreeItem->setOpen( true );
if( mChild )
mChild->fillMimePartTree( mMimePartTreeItem, 0,
- QString::null, QString::null, QString::null, 0,
+ TQString::null, TQString::null, TQString::null, 0,
revertOrder );
}
@@ -603,7 +603,7 @@ bool partNode::hasContentDispositionInline() const
return false;
}
-const QString& partNode::trueFromAddress() const
+const TQString& partNode::trueFromAddress() const
{
const partNode* node = this;
while( node->mFromAddress.isEmpty() && node->mRoot )
diff --git a/kmail/partNode.h b/kmail/partNode.h
index 9ca76ebf0..d53977035 100644
--- a/kmail/partNode.h
+++ b/kmail/partNode.h
@@ -101,7 +101,7 @@ public:
return mMsgPart;
}
- const QCString & encodedBody();
+ const TQCString & encodedBody();
void setType( int type ) {
mType = type;
@@ -115,13 +115,13 @@ public:
return mType;
}
- QCString typeString() const;
+ TQCString typeString() const;
int subType() const {
return mSubType;
}
- QCString subTypeString() const;
+ TQCString subTypeString() const;
bool hasType( int type ) {
return mType == type;
@@ -164,9 +164,9 @@ public:
void fillMimePartTree( KMMimePartTreeItem* parentItem,
KMMimePartTree* mimePartTree,
- QString labelDescr = QString::null,
- QString labelCntType = QString::null,
- QString labelEncoding = QString::null,
+ TQString labelDescr = TQString::null,
+ TQString labelCntType = TQString::null,
+ TQString labelEncoding = TQString::null,
KIO::filesize_t size=0,
bool revertOrder = false );
@@ -206,7 +206,7 @@ public:
return mMimePartTreeItem;
}
- void setFromAddress( const QString& address ) {
+ void setFromAddress( const TQString& address ) {
mFromAddress = address;
}
@@ -219,9 +219,9 @@ public:
bool hasContentDispositionInline() const;
- QString contentTypeParameter( const char * name ) const;
+ TQString contentTypeParameter( const char * name ) const;
- const QString& trueFromAddress() const;
+ const TQString& trueFromAddress() const;
partNode * parentNode() const { return mRoot; }
partNode * nextSibling() const { return mNext; }
@@ -243,8 +243,8 @@ private:
private:
DwBodyPart* mDwPart; // may be zero
mutable KMMessagePart mMsgPart; // is valid - even if mDwPart is zero
- QCString mEncodedBody;
- QString mFromAddress;
+ TQCString mEncodedBody;
+ TQString mFromAddress;
int mType;
int mSubType;
KMMsgEncryptionState mEncryptionState;
diff --git a/kmail/partmetadata.h b/kmail/partmetadata.h
index 84e7d1f15..1bc93d81e 100644
--- a/kmail/partmetadata.h
+++ b/kmail/partmetadata.h
@@ -20,9 +20,9 @@
#include <gpgmepp/verificationresult.h>
#include <kpgp.h>
-#include <qstring.h>
-#include <qcstring.h>
-#include <qdatetime.h>
+#include <tqstring.h>
+#include <tqcstring.h>
+#include <tqdatetime.h>
namespace KMail {
@@ -39,17 +39,17 @@ namespace KMail {
{
}
GpgME::Signature::Summary sigSummary;
- QString signClass;
- QString signer;
- QStringList signerMailAddresses;
- QCString keyId;
+ TQString signClass;
+ TQString signer;
+ TQStringList signerMailAddresses;
+ TQCString keyId;
Kpgp::Validity keyTrust;
- QString status; // to be used for unknown plug-ins
+ TQString status; // to be used for unknown plug-ins
int status_code; // to be used for i18n of OpenPGP and S/MIME CryptPlugs
- QString errorText;
- QDateTime creationTime;
- QString decryptionError;
- QString auditLog;
+ TQString errorText;
+ TQDateTime creationTime;
+ TQString decryptionError;
+ TQString auditLog;
bool isSigned : 1;
bool isGoodSignature : 1;
bool isEncrypted : 1;
diff --git a/kmail/partnodebodypart.cpp b/kmail/partnodebodypart.cpp
index 50ec3cda4..37e37353f 100644
--- a/kmail/partnodebodypart.cpp
+++ b/kmail/partnodebodypart.cpp
@@ -35,45 +35,45 @@
#include "partNode.h"
-#include <qstring.h>
-#include <qcstring.h>
+#include <tqstring.h>
+#include <tqcstring.h>
static int serial = 0;
-KMail::PartNodeBodyPart::PartNodeBodyPart( partNode & n, const QTextCodec * codec )
+KMail::PartNodeBodyPart::PartNodeBodyPart( partNode & n, const TQTextCodec * codec )
: KMail::Interface::BodyPart(), mPartNode( n ), mCodec( codec ),
mDefaultDisplay( KMail::Interface::BodyPart::None )
{}
-QString KMail::PartNodeBodyPart::makeLink( const QString & path ) const {
+TQString KMail::PartNodeBodyPart::makeLink( const TQString & path ) const {
static const int utf8 = 106;
// FIXME: use a PRNG for the first arg, instead of a serial number
- return QString( "x-kmail:/bodypart/%1/%2/%3" )
+ return TQString( "x-kmail:/bodypart/%1/%2/%3" )
.arg( serial++ ).arg( mPartNode.nodeId() )
.arg( KURL::encode_string_no_slash( path, utf8 ) );
}
-QString KMail::PartNodeBodyPart::asText() const {
+TQString KMail::PartNodeBodyPart::asText() const {
if ( mPartNode.type() != DwMime::kTypeText )
- return QString::null;
+ return TQString::null;
return mPartNode.msgPart().bodyToUnicode( mCodec );
}
-QByteArray KMail::PartNodeBodyPart::asBinary() const {
+TQByteArray KMail::PartNodeBodyPart::asBinary() const {
return mPartNode.msgPart().bodyDecodedBinary();
}
-QString KMail::PartNodeBodyPart::contentTypeParameter( const char * param ) const {
+TQString KMail::PartNodeBodyPart::contentTypeParameter( const char * param ) const {
return mPartNode.contentTypeParameter( param );
}
-QString KMail::PartNodeBodyPart::contentDescription() const {
+TQString KMail::PartNodeBodyPart::contentDescription() const {
return mPartNode.msgPart().contentDescription();
}
-QString KMail::PartNodeBodyPart::contentDispositionParameter( const char * ) const {
+TQString KMail::PartNodeBodyPart::contentDispositionParameter( const char * ) const {
kdWarning( 5006 ) << "Sorry, not yet implemented: PartNodeBodyPart::contentDispositionParameter()" << endl;
- return QString::null;
+ return TQString::null;
}
bool KMail::PartNodeBodyPart::hasCompleteBody() const {
diff --git a/kmail/partnodebodypart.h b/kmail/partnodebodypart.h
index 8421650ee..0694b3ca8 100644
--- a/kmail/partnodebodypart.h
+++ b/kmail/partnodebodypart.h
@@ -47,15 +47,15 @@ namespace KMail {
*/
class PartNodeBodyPart : public Interface::BodyPart {
public:
- PartNodeBodyPart( partNode & n, const QTextCodec * codec=0 );
+ PartNodeBodyPart( partNode & n, const TQTextCodec * codec=0 );
- QString makeLink( const QString & path ) const;
- QString asText() const;
- QByteArray asBinary() const;
- QString contentTypeParameter( const char * param ) const;
- QString contentDescription() const;
+ TQString makeLink( const TQString & path ) const;
+ TQString asText() const;
+ TQByteArray asBinary() const;
+ TQString contentTypeParameter( const char * param ) const;
+ TQString contentDescription() const;
//int contentDisposition() const;
- QString contentDispositionParameter( const char * param ) const;
+ TQString contentDispositionParameter( const char * param ) const;
bool hasCompleteBody() const;
Interface::BodyPartMemento * memento() const;
@@ -65,7 +65,7 @@ namespace KMail {
private:
partNode & mPartNode;
- const QTextCodec * mCodec;
+ const TQTextCodec * mCodec;
BodyPart::Display mDefaultDisplay;
};
diff --git a/kmail/popaccount.cpp b/kmail/popaccount.cpp
index ebe8bf48b..94dbf8a5e 100644
--- a/kmail/popaccount.cpp
+++ b/kmail/popaccount.cpp
@@ -47,13 +47,13 @@ using KPIM::BroadcastStatus;
#include <kconfig.h>
using KIO::MetaData;
-#include <qstylesheet.h>
+#include <tqstylesheet.h>
static const unsigned short int pop3DefaultPort = 110;
namespace KMail {
//-----------------------------------------------------------------------------
-PopAccount::PopAccount(AccountManager* aOwner, const QString& aAccountName, uint id)
+PopAccount::PopAccount(AccountManager* aOwner, const TQString& aAccountName, uint id)
: NetworkAccount(aOwner, aAccountName, id),
headerIt(headersOnServer),
processMsgsTimer( 0, "processMsgsTimer" )
@@ -72,10 +72,10 @@ PopAccount::PopAccount(AccountManager* aOwner, const QString& aAccountName, uint
mUidsOfNextSeenMsgsDict.setAutoDelete( false );
headersOnServer.setAutoDelete(true);
- connect(&processMsgsTimer,SIGNAL(timeout()),SLOT(slotProcessPendingMsgs()));
+ connect(&processMsgsTimer,TQT_SIGNAL(timeout()),TQT_SLOT(slotProcessPendingMsgs()));
KIO::Scheduler::connect(
- SIGNAL(slaveError(KIO::Slave *, int, const QString &)),
- this, SLOT(slotSlaveError(KIO::Slave *, int, const QString &)));
+ TQT_SIGNAL(slaveError(KIO::Slave *, int, const TQString &)),
+ this, TQT_SLOT(slotSlaveError(KIO::Slave *, int, const TQString &)));
mHeaderDeleteUids.clear();
mHeaderDownUids.clear();
@@ -96,12 +96,12 @@ PopAccount::~PopAccount()
//-----------------------------------------------------------------------------
-QString PopAccount::type(void) const
+TQString PopAccount::type(void) const
{
return "pop";
}
-QString PopAccount::protocol() const {
+TQString PopAccount::protocol() const {
return useSSL() ? POP_SSL_PROTOCOL : POP_PROTOCOL;
}
@@ -148,12 +148,12 @@ void PopAccount::processNewMail(bool _interactive)
if ( (mAskAgain || passwd().isEmpty() || mLogin.isEmpty()) &&
mAuth != "GSSAPI" ) {
- QString passwd = NetworkAccount::passwd();
+ TQString passwd = NetworkAccount::passwd();
bool b = storePasswd();
if (KIO::PasswordDialog::getNameAndPassword(mLogin, passwd, &b,
i18n("You need to supply a username and a password to access this "
- "mailbox."), false, QString::null, mName, i18n("Account:"))
- != QDialog::Accepted)
+ "mailbox."), false, TQString::null, mName, i18n("Account:"))
+ != TQDialog::Accepted)
{
checkDone( false, CheckAborted );
return;
@@ -166,15 +166,15 @@ void PopAccount::processNewMail(bool _interactive)
}
}
- QString seenUidList = locateLocal( "data", "kmail/" + mLogin + ":" + "@" +
- mHost + ":" + QString("%1").arg(mPort) );
+ TQString seenUidList = locateLocal( "data", "kmail/" + mLogin + ":" + "@" +
+ mHost + ":" + TQString("%1").arg(mPort) );
KConfig config( seenUidList );
- QStringList uidsOfSeenMsgs = config.readListEntry( "seenUidList" );
- QValueList<int> timeOfSeenMsgs = config.readIntListEntry( "seenUidTimeList" );
+ TQStringList uidsOfSeenMsgs = config.readListEntry( "seenUidList" );
+ TQValueList<int> timeOfSeenMsgs = config.readIntListEntry( "seenUidTimeList" );
mUidsOfSeenMsgsDict.clear();
mUidsOfSeenMsgsDict.resize( KMail::nextPrime( ( uidsOfSeenMsgs.count() * 11 ) / 10 ) );
int idx = 1;
- for ( QStringList::ConstIterator it = uidsOfSeenMsgs.begin();
+ for ( TQStringList::ConstIterator it = uidsOfSeenMsgs.begin();
it != uidsOfSeenMsgs.end(); ++it, idx++ ) {
// we use mUidsOfSeenMsgsDict to just provide fast random access to the
// keys, so we can store the index(+1) that corresponds to the index of
@@ -183,7 +183,7 @@ void PopAccount::processNewMail(bool _interactive)
}
mTimeOfSeenMsgsVector.clear();
mTimeOfSeenMsgsVector.reserve( timeOfSeenMsgs.size() );
- for ( QValueList<int>::ConstIterator it = timeOfSeenMsgs.begin();
+ for ( TQValueList<int>::ConstIterator it = timeOfSeenMsgs.begin();
it != timeOfSeenMsgs.end(); ++it) {
mTimeOfSeenMsgsVector.append( *it );
}
@@ -192,8 +192,8 @@ void PopAccount::processNewMail(bool _interactive)
// them all as newly seen by clearing the seen times vector
if ( mTimeOfSeenMsgsVector.count() != mUidsOfSeenMsgsDict.count() )
mTimeOfSeenMsgsVector.clear();
- QStringList downloadLater = config.readListEntry( "downloadLater" );
- for ( QStringList::Iterator it = downloadLater.begin(); it != downloadLater.end(); ++it ) {
+ TQStringList downloadLater = config.readListEntry( "downloadLater" );
+ for ( TQStringList::Iterator it = downloadLater.begin(); it != downloadLater.end(); ++it ) {
mHeaderLaterUids.insert( *it, true );
}
mUidsOfNextSeenMsgsDict.clear();
@@ -286,12 +286,12 @@ void PopAccount::setFilterOnServerCheckSize(unsigned int aSize)
//-----------------------------------------------------------------------------
void PopAccount::connectJob() {
KIO::Scheduler::assignJobToSlave(mSlave, job);
- connect(job, SIGNAL( data( KIO::Job*, const QByteArray &)),
- SLOT( slotData( KIO::Job*, const QByteArray &)));
- connect(job, SIGNAL( result( KIO::Job * ) ),
- SLOT( slotResult( KIO::Job * ) ) );
- connect(job, SIGNAL(infoMessage( KIO::Job*, const QString & )),
- SLOT( slotMsgRetrieved(KIO::Job*, const QString &)));
+ connect(job, TQT_SIGNAL( data( KIO::Job*, const TQByteArray &)),
+ TQT_SLOT( slotData( KIO::Job*, const TQByteArray &)));
+ connect(job, TQT_SIGNAL( result( KIO::Job * ) ),
+ TQT_SLOT( slotResult( KIO::Job * ) ) );
+ connect(job, TQT_SIGNAL(infoMessage( KIO::Job*, const TQString & )),
+ TQT_SLOT( slotMsgRetrieved(KIO::Job*, const TQString &)));
}
@@ -313,9 +313,9 @@ void PopAccount::slotProcessPendingMsgs()
mProcessing = true;
bool addedOk;
- QValueList<KMMessage*>::Iterator cur = msgsAwaitingProcessing.begin();
- QStringList::Iterator curId = msgIdsAwaitingProcessing.begin();
- QStringList::Iterator curUid = msgUidsAwaitingProcessing.begin();
+ TQValueList<KMMessage*>::Iterator cur = msgsAwaitingProcessing.begin();
+ TQStringList::Iterator curId = msgIdsAwaitingProcessing.begin();
+ TQStringList::Iterator curUid = msgUidsAwaitingProcessing.begin();
while (cur != msgsAwaitingProcessing.end()) {
// note we can actually end up processing events in processNewMsg
@@ -353,8 +353,8 @@ void PopAccount::slotAbortRequested()
{
if (stage == Idle) return;
if ( mMailCheckProgressItem )
- disconnect( mMailCheckProgressItem, SIGNAL( progressItemCanceled( KPIM::ProgressItem* ) ),
- this, SLOT( slotAbortRequested() ) );
+ disconnect( mMailCheckProgressItem, TQT_SIGNAL( progressItemCanceled( KPIM::ProgressItem* ) ),
+ this, TQT_SLOT( slotAbortRequested() ) );
stage = Quit;
if (job) job->kill();
job = 0;
@@ -397,15 +397,15 @@ void PopAccount::startJob()
indexOfCurrentMsg = -1;
Q_ASSERT( !mMailCheckProgressItem );
- QString escapedName = QStyleSheet::escape( mName );
+ TQString escapedName = TQStyleSheet::escape( mName );
mMailCheckProgressItem = KPIM::ProgressManager::createProgressItem(
"MailCheck" + mName,
escapedName,
i18n("Preparing transmission from \"%1\"...").arg( escapedName ),
true, // can be canceled
useSSL() || useTLS() );
- connect( mMailCheckProgressItem, SIGNAL( progressItemCanceled( KPIM::ProgressItem* ) ),
- this, SLOT( slotAbortRequested() ) );
+ connect( mMailCheckProgressItem, TQT_SIGNAL( progressItemCanceled( KPIM::ProgressItem* ) ),
+ this, TQT_SLOT( slotAbortRequested() ) );
numBytes = 0;
numBytesRead = 0;
@@ -416,7 +416,7 @@ void PopAccount::startJob()
slotSlaveError(0, KIO::ERR_CANNOT_LAUNCH_PROCESS, url.protocol());
return;
}
- url.setPath(QString("/index"));
+ url.setPath(TQString("/index"));
job = KIO::get( url, false, false );
connectJob();
}
@@ -441,7 +441,7 @@ MetaData PopAccount::slaveConfig() const {
//-----------------------------------------------------------------------------
// one message is finished
// add data to a KMMessage
-void PopAccount::slotMsgRetrieved(KIO::Job*, const QString & infoMsg)
+void PopAccount::slotMsgRetrieved(KIO::Job*, const TQString & infoMsg)
{
if (infoMsg != "message complete") return;
KMMessage *msg = new KMMessage;
@@ -474,14 +474,14 @@ void PopAccount::slotMsgRetrieved(KIO::Job*, const QString & infoMsg)
//-----------------------------------------------------------------------------
// finit state machine to cycle trow the stages
void PopAccount::slotJobFinished() {
- QStringList emptyList;
+ TQStringList emptyList;
if (stage == List) {
kdDebug(5006) << k_funcinfo << "stage == List" << endl;
// set the initial size of mUidsOfNextSeenMsgsDict to the number of
// messages on the server + 10%
mUidsOfNextSeenMsgsDict.resize( KMail::nextPrime( ( idsOfMsgs.count() * 11 ) / 10 ) );
KURL url = getUrl();
- url.setPath(QString("/uidl"));
+ url.setPath(TQString("/uidl"));
job = KIO::get( url, false, false );
connectJob();
stage = Uidl;
@@ -503,7 +503,7 @@ void PopAccount::slotJobFinished() {
//check if filter on server
if (mFilterOnServer == true) {
- QMap<QString, int>::Iterator hids;
+ TQMap<TQString, int>::Iterator hids;
for ( hids = mMsgsPendingDownload.begin();
hids != mMsgsPendingDownload.end(); hids++ ) {
kdDebug(5006) << "Length: " << hids.data() << endl;
@@ -535,7 +535,7 @@ void PopAccount::slotJobFinished() {
if ((headersOnServer.count() > 0) && (mFilterOnServer == true)) {
headerIt.toFirst();
KURL url = getUrl();
- QString headerIds;
+ TQString headerIds;
while (headerIt.current())
{
headerIds += headerIt.current()->id();
@@ -543,7 +543,7 @@ void PopAccount::slotJobFinished() {
++headerIt;
}
headerIt.toFirst();
- url.setPath(QString("/headers/") + headerIds);
+ url.setPath(TQString("/headers/") + headerIds);
job = KIO::get( url, false, false );
connectJob();
slotGetNextHdr();
@@ -553,11 +553,11 @@ void PopAccount::slotJobFinished() {
stage = Retr;
numMsgs = mMsgsPendingDownload.count();
numBytesToRead = 0;
- QMap<QString, int>::Iterator len;
+ TQMap<TQString, int>::Iterator len;
for ( len = mMsgsPendingDownload.begin();
len != mMsgsPendingDownload.end(); len++ )
numBytesToRead += len.data();
- idsOfMsgs = QStringList( mMsgsPendingDownload.keys() );
+ idsOfMsgs = TQStringList( mMsgsPendingDownload.keys() );
KURL url = getUrl();
url.setPath( "/download/" + idsOfMsgs.join(",") );
job = KIO::get( url, false, false );
@@ -649,11 +649,11 @@ void PopAccount::slotJobFinished() {
stage = Retr;
numMsgs = mMsgsPendingDownload.count();
numBytesToRead = 0;
- QMap<QString, int>::Iterator len;
+ TQMap<TQString, int>::Iterator len;
for (len = mMsgsPendingDownload.begin();
len != mMsgsPendingDownload.end(); len++)
numBytesToRead += len.data();
- idsOfMsgs = QStringList( mMsgsPendingDownload.keys() );
+ idsOfMsgs = TQStringList( mMsgsPendingDownload.keys() );
KURL url = getUrl();
url.setPath( "/download/" + idsOfMsgs.join(",") );
job = KIO::get( url, false, false );
@@ -673,7 +673,7 @@ void PopAccount::slotJobFinished() {
kmkernel->folderMgr()->syncAllFolders();
KURL url = getUrl();
- QMap< QPair<time_t, QString>, int > idsToSave;
+ TQMap< QPair<time_t, TQString>, int > idsToSave;
idsToSave.clear();
// Check if we want to keep any messages
if ( mLeaveOnServer && !idsOfMsgsToDelete.isEmpty() ) {
@@ -685,14 +685,14 @@ void PopAccount::slotJobFinished() {
else if ( mLeaveOnServerDays > 0 && !mTimeOfNextSeenMsgsMap.isEmpty() ) {
time_t timeLimit = time(0) - (86400 * mLeaveOnServerDays);
kdDebug() << "timeLimit is " << timeLimit << endl;
- QStringList::Iterator cur = idsOfMsgsToDelete.begin();
+ TQStringList::Iterator cur = idsOfMsgsToDelete.begin();
for ( ; cur != idsOfMsgsToDelete.end(); ++cur) {
time_t msgTime = mTimeOfNextSeenMsgsMap[mUidForIdMap[*cur]];
kdDebug() << "id: " << *cur << " msgTime: " << msgTime << endl;
if (msgTime >= timeLimit ||
!mTimeOfNextSeenMsgsMap[mUidForIdMap[*cur]]) {
kdDebug() << "Saving msg id " << *cur << endl;
- QPair<time_t, QString> msg(msgTime, *cur);
+ QPair<time_t, TQString> msg(msgTime, *cur);
idsToSave.insert( msg, 1 );
}
}
@@ -702,7 +702,7 @@ void PopAccount::slotJobFinished() {
int numToDelete = idsToSave.count() - mLeaveOnServerCount;
kdDebug() << "numToDelete is " << numToDelete << endl;
if ( numToDelete > 0 && (unsigned)numToDelete < idsToSave.count() ) {
- QMap< QPair<time_t, QString>, int >::Iterator cur = idsToSave.begin();
+ TQMap< QPair<time_t, TQString>, int >::Iterator cur = idsToSave.begin();
for ( int deleted = 0; deleted < numToDelete && cur != idsToSave.end()
; deleted++, cur++ ) {
kdDebug() << "deleting msg id " << cur.key().second << endl;
@@ -715,7 +715,7 @@ void PopAccount::slotJobFinished() {
// Delete more old messages until we're under mLeaveOnServerSize MBs
if ( mLeaveOnServerSize > 0 ) {
double sizeOnServer = 0;
- QMap< QPair<time_t, QString>, int >::Iterator cur = idsToSave.begin();
+ TQMap< QPair<time_t, TQString>, int >::Iterator cur = idsToSave.begin();
for ( ; cur != idsToSave.end(); cur++ ) {
sizeOnServer +=
*mSizeOfNextSeenMsgsDict[ mUidForIdMap[ cur.key().second ] ];
@@ -730,7 +730,7 @@ void PopAccount::slotJobFinished() {
}
}
// Save msgs from deletion
- QMap< QPair<time_t, QString>, int >::Iterator it = idsToSave.begin();
+ TQMap< QPair<time_t, TQString>, int >::Iterator it = idsToSave.begin();
kdDebug() << "Going to save " << idsToSave.count() << endl;
for ( ; it != idsToSave.end(); ++it ) {
kdDebug() << "saving msg id " << it.key().second << endl;
@@ -762,7 +762,7 @@ void PopAccount::slotJobFinished() {
"Fetched %n messages from %1. Terminating transmission...",
numMsgs )
.arg( mHost ) );
- url.setPath(QString("/commit"));
+ url.setPath(TQString("/commit"));
kdDebug(5006) << "url: " << url.prettyURL() << endl;
}
job = KIO::get( url, false, false );
@@ -771,7 +771,7 @@ void PopAccount::slotJobFinished() {
else if (stage == Dele) {
kdDebug(5006) << k_funcinfo << "stage == Dele" << endl;
// remove the uids of all messages which have been deleted
- for ( QStringList::ConstIterator it = idsOfMsgsToDelete.begin();
+ for ( TQStringList::ConstIterator it = idsOfMsgsToDelete.begin();
it != idsOfMsgsToDelete.end(); ++it ) {
mUidsOfNextSeenMsgsDict.remove( mUidForIdMap[*it] );
}
@@ -783,7 +783,7 @@ void PopAccount::slotJobFinished() {
numMsgs )
.arg( mHost ) );
KURL url = getUrl();
- url.setPath(QString("/commit"));
+ url.setPath(TQString("/commit"));
job = KIO::get( url, false, false );
stage = Quit;
connectJob();
@@ -833,19 +833,19 @@ void PopAccount::saveUidList()
// a new list from the server
if (!mUidlFinished) return;
- QStringList uidsOfNextSeenMsgs;
- QValueList<int> seenUidTimeList;
- QDictIterator<int> it( mUidsOfNextSeenMsgsDict );
+ TQStringList uidsOfNextSeenMsgs;
+ TQValueList<int> seenUidTimeList;
+ TQDictIterator<int> it( mUidsOfNextSeenMsgsDict );
for( ; it.current(); ++it ) {
uidsOfNextSeenMsgs.append( it.currentKey() );
seenUidTimeList.append( mTimeOfNextSeenMsgsMap[it.currentKey()] );
}
- QString seenUidList = locateLocal( "data", "kmail/" + mLogin + ":" + "@" +
- mHost + ":" + QString("%1").arg(mPort) );
+ TQString seenUidList = locateLocal( "data", "kmail/" + mLogin + ":" + "@" +
+ mHost + ":" + TQString("%1").arg(mPort) );
KConfig config( seenUidList );
config.writeEntry( "seenUidList", uidsOfNextSeenMsgs );
config.writeEntry( "seenUidTimeList", seenUidTimeList );
- config.writeEntry( "downloadLater", QStringList( mHeaderLaterUids.keys() ) );
+ config.writeEntry( "downloadLater", TQStringList( mHeaderLaterUids.keys() ) );
config.sync();
}
@@ -853,7 +853,7 @@ void PopAccount::saveUidList()
//-----------------------------------------------------------------------------
void PopAccount::slotGetNextMsg()
{
- QMap<QString, int>::Iterator next = mMsgsPendingDownload.begin();
+ TQMap<TQString, int>::Iterator next = mMsgsPendingDownload.begin();
curMsgData.resize(0);
numMsgBytesRead = 0;
@@ -864,17 +864,17 @@ void PopAccount::slotGetNextMsg()
if ( next != mMsgsPendingDownload.end() ) {
// get the next message
int nextLen = next.data();
- curMsgStrm = new QDataStream( curMsgData, IO_WriteOnly );
+ curMsgStrm = new TQDataStream( curMsgData, IO_WriteOnly );
curMsgLen = nextLen;
++indexOfCurrentMsg;
- kdDebug(5006) << QString("Length of message about to get %1").arg( nextLen ) << endl;
+ kdDebug(5006) << TQString("Length of message about to get %1").arg( nextLen ) << endl;
mMsgsPendingDownload.remove( next.key() );
}
}
//-----------------------------------------------------------------------------
-void PopAccount::slotData( KIO::Job* job, const QByteArray &data)
+void PopAccount::slotData( KIO::Job* job, const TQByteArray &data)
{
if (data.size() == 0) {
kdDebug(5006) << "Data: <End>" << endl;
@@ -899,7 +899,7 @@ void PopAccount::slotData( KIO::Job* job, const QByteArray &data)
( dataCounter % 5 == 0 ||
( indexOfCurrentMsg + 1 == numMsgs && numMsgBytesRead == curMsgLen ) ) )
{
- QString msg;
+ TQString msg;
if (numBytes != numBytesToRead && mLeaveOnServer)
{
msg = i18n("Fetching message %1 of %2 (%3 of %4 KB) for %5@%6 "
@@ -928,16 +928,16 @@ void PopAccount::slotData( KIO::Job* job, const QByteArray &data)
}
// otherwise stage is List Or Uidl
- QString qdata = data;
+ TQString qdata = data;
qdata = qdata.simplifyWhiteSpace(); // Workaround for Maillennium POP3/UNIBOX
int spc = qdata.find( ' ' );
if ( stage == List ) {
if ( spc > 0 ) {
- QString length = qdata.mid(spc+1);
+ TQString length = qdata.mid(spc+1);
if (length.find(' ') != -1) length.truncate(length.find(' '));
int len = length.toInt();
numBytes += len;
- QString id = qdata.left(spc);
+ TQString id = qdata.left(spc);
idsOfMsgs.append( id );
mMsgsPendingDownload.insert( id, len );
}
@@ -954,8 +954,8 @@ void PopAccount::slotData( KIO::Job* job, const QByteArray &data)
else { // stage == Uidl
Q_ASSERT ( stage == Uidl);
- QString id;
- QString uid;
+ TQString id;
+ TQString uid;
if ( spc <= 0 ) {
// an invalid uidl line. we might just need to skip it, but
@@ -972,11 +972,11 @@ void PopAccount::slotData( KIO::Job* job, const QByteArray &data)
}
id.setNum (testid, 10);
- QString datestring, serialstring;
+ TQString datestring, serialstring;
serialstring.setNum ( ++dataCounter, 10 );
datestring.setNum ( time(NULL),10 );
- uid = QString( "uidlgen" ) + datestring + QString( "." ) + serialstring;
+ uid = TQString( "uidlgen" ) + datestring + TQString( "." ) + serialstring;
kdDebug(5006) << "PopAccount::slotData message " << id.ascii()
<< "%d has bad UIDL, cannot keep a copy on server" << endl;
idsOfForcedDeletes.append( id );
@@ -1042,7 +1042,7 @@ void PopAccount::slotResult( KIO::Job* )
//-----------------------------------------------------------------------------
void PopAccount::slotSlaveError(KIO::Slave *aSlave, int error,
- const QString &errorMsg)
+ const TQString &errorMsg)
{
if (aSlave != mSlave) return;
if (error == KIO::ERR_SLAVE_DIED) mSlave = 0;
@@ -1064,7 +1064,7 @@ void PopAccount::slotSlaveError(KIO::Slave *aSlave, int error,
/* We need a timer, otherwise slotSlaveError of the next account is also
executed, if it reuses the slave, because the slave member variable
is changed too early */
- QTimer::singleShot(0, this, SLOT(slotCancel()));
+ TQTimer::singleShot(0, this, TQT_SLOT(slotCancel()));
}
//-----------------------------------------------------------------------------
@@ -1075,7 +1075,7 @@ void PopAccount::slotGetNextHdr(){
delete curMsgStrm;
curMsgStrm = 0;
- curMsgStrm = new QDataStream( curMsgData, IO_WriteOnly );
+ curMsgStrm = new TQDataStream( curMsgData, IO_WriteOnly );
}
void PopAccount::killAllJobs( bool ) {
diff --git a/kmail/popaccount.h b/kmail/popaccount.h
index 718ac3165..840629a47 100644
--- a/kmail/popaccount.h
+++ b/kmail/popaccount.h
@@ -4,11 +4,11 @@
#include "networkaccount.h"
-#include <qvaluelist.h>
-#include <qstringlist.h>
-#include <qvaluevector.h>
-#include <qtimer.h>
-#include <qdict.h>
+#include <tqvaluelist.h>
+#include <tqstringlist.h>
+#include <tqvaluevector.h>
+#include <tqtimer.h>
+#include <tqdict.h>
class KMPopHeaders;
class KMMessage;
@@ -37,7 +37,7 @@ public:
/** A weak assignment operator */
virtual void pseudoAssign( const KMAccount * a );
- virtual QString protocol() const;
+ virtual TQString protocol() const;
virtual unsigned short int defaultPort() const;
/**
@@ -88,7 +88,7 @@ public:
/**
* Inherited methods.
*/
- virtual QString type(void) const;
+ virtual TQString type(void) const;
virtual void readConfig(KConfig&);
virtual void writeConfig(KConfig&);
virtual void processNewMail(bool _interactive);
@@ -98,7 +98,7 @@ public:
protected:
enum Stage { Idle, List, Uidl, Head, Retr, Dele, Quit };
friend class ::AccountManager;
- PopAccount(AccountManager* owner, const QString& accountName, uint id);
+ PopAccount(AccountManager* owner, const TQString& accountName, uint id);
/**
* Start a KIO Job to get a list of messages on the pop server
@@ -131,38 +131,38 @@ protected:
KIO::SimpleJob *job;
//Map of ID's vs. sizes of messages which should be downloaded
- QMap<QString, int> mMsgsPendingDownload;
+ TQMap<TQString, int> mMsgsPendingDownload;
- QPtrList<KMPopHeaders> headersOnServer;
- QPtrListIterator<KMPopHeaders> headerIt;
+ TQPtrList<KMPopHeaders> headersOnServer;
+ TQPtrListIterator<KMPopHeaders> headerIt;
bool headers;
- QMap<QString, bool> mHeaderDeleteUids;
- QMap<QString, bool> mHeaderDownUids;
- QMap<QString, bool> mHeaderLaterUids;
-
- QStringList idsOfMsgs; //used for ids and for count
- QValueList<int> lensOfMsgs;
- QMap<QString, QString> mUidForIdMap; // maps message ID (i.e. index on the server) to UID
- QDict<int> mUidsOfSeenMsgsDict; // set of UIDs of previously seen messages (for fast lookup)
- QDict<int> mUidsOfNextSeenMsgsDict; // set of UIDs of seen messages (for the next check)
- QValueVector<int> mTimeOfSeenMsgsVector; // list of times of previously seen messages
- QMap<QString, int> mTimeOfNextSeenMsgsMap; // map of uid to times of seen messages
- QDict<int> mSizeOfNextSeenMsgsDict;
- QStringList idsOfMsgsToDelete;
- QStringList idsOfForcedDeletes;
+ TQMap<TQString, bool> mHeaderDeleteUids;
+ TQMap<TQString, bool> mHeaderDownUids;
+ TQMap<TQString, bool> mHeaderLaterUids;
+
+ TQStringList idsOfMsgs; //used for ids and for count
+ TQValueList<int> lensOfMsgs;
+ TQMap<TQString, TQString> mUidForIdMap; // maps message ID (i.e. index on the server) to UID
+ TQDict<int> mUidsOfSeenMsgsDict; // set of UIDs of previously seen messages (for fast lookup)
+ TQDict<int> mUidsOfNextSeenMsgsDict; // set of UIDs of seen messages (for the next check)
+ TQValueVector<int> mTimeOfSeenMsgsVector; // list of times of previously seen messages
+ TQMap<TQString, int> mTimeOfNextSeenMsgsMap; // map of uid to times of seen messages
+ TQDict<int> mSizeOfNextSeenMsgsDict;
+ TQStringList idsOfMsgsToDelete;
+ TQStringList idsOfForcedDeletes;
int indexOfCurrentMsg;
- QValueList<KMMessage*> msgsAwaitingProcessing;
- QStringList msgIdsAwaitingProcessing;
- QStringList msgUidsAwaitingProcessing;
+ TQValueList<KMMessage*> msgsAwaitingProcessing;
+ TQStringList msgIdsAwaitingProcessing;
+ TQStringList msgUidsAwaitingProcessing;
- QByteArray curMsgData;
- QDataStream *curMsgStrm;
+ TQByteArray curMsgData;
+ TQDataStream *curMsgStrm;
int curMsgLen;
Stage stage;
- QTimer processMsgsTimer;
+ TQTimer processMsgsTimer;
int processingDelay;
int numMsgs, numBytes, numBytesToRead, numBytesRead, numMsgBytesRead;
bool interactive;
@@ -193,12 +193,12 @@ protected slots:
* A messages has been retrieved successfully. The next data belongs to the
* next message.
*/
- void slotMsgRetrieved(KIO::Job*, const QString &);
+ void slotMsgRetrieved(KIO::Job*, const TQString &);
/**
* New data has arrived append it to the end of the current message
*/
- void slotData( KIO::Job*, const QByteArray &);
+ void slotData( KIO::Job*, const TQByteArray &);
/**
* Finished downloading the current kio job, either due to an error
@@ -226,7 +226,7 @@ protected slots:
/**
* Slave error handling
*/
- void slotSlaveError(KIO::Slave *, int, const QString &);
+ void slotSlaveError(KIO::Slave *, int, const TQString &);
/**
* If there are more headers to be downloaded then start a new kio job
diff --git a/kmail/quotajobs.cpp b/kmail/quotajobs.cpp
index 5a6948d41..334e87e50 100644
--- a/kmail/quotajobs.cpp
+++ b/kmail/quotajobs.cpp
@@ -37,8 +37,8 @@ using namespace KMail;
QuotaJobs::GetQuotarootJob* QuotaJobs::getQuotaroot(
KIO::Slave* slave, const KURL& url )
{
- QByteArray packedArgs;
- QDataStream stream( packedArgs, IO_WriteOnly );
+ TQByteArray packedArgs;
+ TQDataStream stream( packedArgs, IO_WriteOnly );
stream << (int)'Q' << (int)'R' << url;
GetQuotarootJob* job = new GetQuotarootJob( url, packedArgs, false );
@@ -47,36 +47,36 @@ QuotaJobs::GetQuotarootJob* QuotaJobs::getQuotaroot(
}
QuotaJobs::GetQuotarootJob::GetQuotarootJob( const KURL& url,
- const QByteArray &packedArgs,
+ const TQByteArray &packedArgs,
bool showProgressInfo )
: KIO::SimpleJob( url, KIO::CMD_SPECIAL, packedArgs, showProgressInfo )
{
- connect( this, SIGNAL(infoMessage(KIO::Job*,const QString&)),
- SLOT(slotInfoMessage(KIO::Job*,const QString&)) );
+ connect( this, TQT_SIGNAL(infoMessage(KIO::Job*,const TQString&)),
+ TQT_SLOT(slotInfoMessage(KIO::Job*,const TQString&)) );
}
-void QuotaJobs::GetQuotarootJob::slotInfoMessage( KIO::Job*, const QString& str )
+void QuotaJobs::GetQuotarootJob::slotInfoMessage( KIO::Job*, const TQString& str )
{
// Parse the result
- QStringList results = QStringList::split("\r", str);
- QStringList roots;
+ TQStringList results = TQStringList::split("\r", str);
+ TQStringList roots;
QuotaInfoList quotas;
if ( results.size() > 0 ) {
// the first line is the available roots
- roots = QStringList::split(" ", results.front() );
+ roots = TQStringList::split(" ", results.front() );
results.pop_front();
// the rest are pairs of root -> list of triplets
while ( results.size() > 0 ) {
- QString root = results.front(); results.pop_front();
+ TQString root = results.front(); results.pop_front();
// and the quotas
if ( results.size() > 0 ) {
- QStringList triplets = QStringList::split(" ", results.front() );
+ TQStringList triplets = TQStringList::split(" ", results.front() );
results.pop_front();
while ( triplets.size() > 0 ) {
// there's always three, the label, current and max values
- QString name = triplets.front(); triplets.pop_front();
- QString current = triplets.front(); triplets.pop_front();
- QString max = triplets.front(); triplets.pop_front();
+ TQString name = triplets.front(); triplets.pop_front();
+ TQString current = triplets.front(); triplets.pop_front();
+ TQString max = triplets.front(); triplets.pop_front();
QuotaInfo info( name, root, current, max );
quotas.append( info );
}
@@ -100,21 +100,21 @@ QuotaJobs::GetStorageQuotaJob* QuotaJobs::getStorageQuota(
QuotaJobs::GetStorageQuotaJob::GetStorageQuotaJob( KIO::Slave* slave, const KURL& url )
: KIO::Job( false )
{
- QByteArray packedArgs;
- QDataStream stream( packedArgs, IO_WriteOnly );
+ TQByteArray packedArgs;
+ TQDataStream stream( packedArgs, IO_WriteOnly );
stream << (int)'Q' << (int)'R' << url;
QuotaJobs::GetQuotarootJob *job =
new QuotaJobs::GetQuotarootJob( url, packedArgs, false );
- connect(job, SIGNAL(quotaInfoReceived(const QuotaInfoList&)),
- SLOT(slotQuotaInfoReceived(const QuotaInfoList&)));
- connect(job, SIGNAL(quotaRootResult(const QStringList&)),
- SLOT(slotQuotarootResult(const QStringList&)));
+ connect(job, TQT_SIGNAL(quotaInfoReceived(const QuotaInfoList&)),
+ TQT_SLOT(slotQuotaInfoReceived(const QuotaInfoList&)));
+ connect(job, TQT_SIGNAL(quotaRootResult(const TQStringList&)),
+ TQT_SLOT(slotQuotarootResult(const TQStringList&)));
KIO::Scheduler::assignJobToSlave( slave, job );
addSubjob( job );
}
-void QuotaJobs::GetStorageQuotaJob::slotQuotarootResult( const QStringList& roots )
+void QuotaJobs::GetStorageQuotaJob::slotQuotarootResult( const TQStringList& roots )
{
Q_UNUSED(roots); // we only support one for now
if ( !mStorageQuotaInfo.isValid() && !error() ) {
diff --git a/kmail/quotajobs.h b/kmail/quotajobs.h
index 01112d46d..a27e70f8c 100644
--- a/kmail/quotajobs.h
+++ b/kmail/quotajobs.h
@@ -32,11 +32,11 @@
#ifndef QUOTAJOBS_H
#define QUOTAJOBS_H
-#include <qvariant.h>
+#include <tqvariant.h>
#include <kio/job.h>
#include <klocale.h>
-#include <qvaluevector.h>
+#include <tqvaluevector.h>
#include <math.h>
@@ -49,7 +49,7 @@ namespace KMail {
class QuotaInfo {
public :
QuotaInfo() {} // for QValueVector
- QuotaInfo( const QString& _name, const QString& _root, const QVariant& _current, const QVariant& _max )
+ QuotaInfo( const TQString& _name, const TQString& _root, const TQVariant& _current, const TQVariant& _max )
: mName( _name ), mRoot( _root ), mCurrent( _current ),mMax( _max ) {}
bool operator==( const QuotaInfo & other ) const {
return mName == other.mName && mRoot == other.mRoot && mMax == other.mMax && mCurrent == other.mCurrent;
@@ -60,23 +60,23 @@ class QuotaInfo {
bool isValid() const { return !mName.isEmpty(); }
bool isEmpty() const { return mName.isEmpty() || ( mRoot.isEmpty() && !mCurrent.isValid() && !mMax.isValid() ); }
- QString name() const { return mName; }
- void setName( const QString& n ) { mName = n; }
- QString root() const { return mRoot; }
- void setRoot( const QString& r ) { mRoot = r; }
- QVariant max() const { return mMax; }
- void setMax( const QVariant& m ) { mMax = m; }
- QVariant current() const { return mCurrent; }
- void setCurrent( const QVariant& c ) { mCurrent = c; }
+ TQString name() const { return mName; }
+ void setName( const TQString& n ) { mName = n; }
+ TQString root() const { return mRoot; }
+ void setRoot( const TQString& r ) { mRoot = r; }
+ TQVariant max() const { return mMax; }
+ void setMax( const TQVariant& m ) { mMax = m; }
+ TQVariant current() const { return mCurrent; }
+ void setCurrent( const TQVariant& c ) { mCurrent = c; }
- QString toString() const {
+ TQString toString() const {
if ( isValid() && !isEmpty() ) {
readConfig();
int factor = static_cast<int> ( pow( 1000, mFactor ) );
return i18n("%1 of %2 %3 used").arg( mCurrent.toInt() / factor )
.arg( mMax.toInt() / factor ).arg( mUnits );
}
- return QString();
+ return TQString();
}
private:
@@ -98,15 +98,15 @@ class QuotaInfo {
}
}
- QString mName; // e.g. STORAGE
- QString mRoot; /// e.g. INBOX
- QVariant mCurrent;
- QVariant mMax;
- mutable QString mUnits; //used by readConfig (const) privately and is modified
+ TQString mName; // e.g. STORAGE
+ TQString mRoot; /// e.g. INBOX
+ TQVariant mCurrent;
+ TQVariant mMax;
+ mutable TQString mUnits; //used by readConfig (const) privately and is modified
mutable int mFactor;
};
-typedef QValueVector<QuotaInfo> QuotaInfoList;
+typedef TQValueVector<QuotaInfo> QuotaInfoList;
/**
* This namespace contains functions that return jobs for quota operations.
@@ -138,14 +138,14 @@ class GetQuotarootJob : public KIO::SimpleJob
{
Q_OBJECT
public:
- GetQuotarootJob( const KURL& url, const QByteArray &packedArgs, bool showProgressInfo );
+ GetQuotarootJob( const KURL& url, const TQByteArray &packedArgs, bool showProgressInfo );
signals:
/** Emitted when the server returns a (potentially empty) list of
* quota roots for the specified mailbox.
* @param roots List of quota roots for the mailbox
*/
- void quotaRootResult( const QStringList& roots );
+ void quotaRootResult( const TQStringList& roots );
/**
* Emitted when the server returns a list of quota infos for the specified
@@ -156,7 +156,7 @@ signals:
void quotaInfoReceived( const QuotaInfoList& info );
protected slots:
- void slotInfoMessage( KIO::Job*, const QString& );
+ void slotInfoMessage( KIO::Job*, const TQString& );
};
/// for getStorageQuota()
@@ -179,7 +179,7 @@ signals:
protected slots:
- void slotQuotarootResult( const QStringList& roots );
+ void slotQuotarootResult( const TQStringList& roots );
void slotQuotaInfoReceived( const QuotaInfoList& roots );
private:
QuotaInfo mStorageQuotaInfo;
diff --git a/kmail/recipientseditor.cpp b/kmail/recipientseditor.cpp
index 62e11b904..5ca2d7355 100644
--- a/kmail/recipientseditor.cpp
+++ b/kmail/recipientseditor.cpp
@@ -39,16 +39,16 @@
#include <kiconloader.h>
#include <kmessagebox.h>
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qscrollview.h>
-#include <qcombobox.h>
-#include <qhbox.h>
-#include <qtimer.h>
-#include <qpushbutton.h>
-#include <qstylesheet.h>
-
-Recipient::Recipient( const QString &email, Recipient::Type type )
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqscrollview.h>
+#include <tqcombobox.h>
+#include <tqhbox.h>
+#include <tqtimer.h>
+#include <tqpushbutton.h>
+#include <tqstylesheet.h>
+
+Recipient::Recipient( const TQString &email, Recipient::Type type )
: mEmail( email ), mType( type )
{
}
@@ -63,12 +63,12 @@ Recipient::Type Recipient::type() const
return mType;
}
-void Recipient::setEmail( const QString &email )
+void Recipient::setEmail( const TQString &email )
{
mEmail = email;
}
-QString Recipient::email() const
+TQString Recipient::email() const
{
return mEmail;
}
@@ -88,12 +88,12 @@ Recipient::Type Recipient::idToType( int id )
return static_cast<Type>( id );
}
-QString Recipient::typeLabel() const
+TQString Recipient::typeLabel() const
{
return typeLabel( mType );
}
-QString Recipient::typeLabel( Recipient::Type type )
+TQString Recipient::typeLabel( Recipient::Type type )
{
switch( type ) {
case To:
@@ -109,9 +109,9 @@ QString Recipient::typeLabel( Recipient::Type type )
return i18n("<Undefined RecipientType>");
}
-QStringList Recipient::allTypeLabels()
+TQStringList Recipient::allTypeLabels()
{
- QStringList types;
+ TQStringList types;
types.append( typeLabel( To ) );
types.append( typeLabel( Cc ) );
types.append( typeLabel( Bcc ) );
@@ -119,19 +119,19 @@ QStringList Recipient::allTypeLabels()
}
-RecipientComboBox::RecipientComboBox( QWidget *parent )
- : QComboBox( parent )
+RecipientComboBox::RecipientComboBox( TQWidget *parent )
+ : TQComboBox( parent )
{
}
-void RecipientComboBox::keyPressEvent( QKeyEvent *ev )
+void RecipientComboBox::keyPressEvent( TQKeyEvent *ev )
{
if ( ev->key() == Key_Right ) emit rightPressed();
- else QComboBox::keyPressEvent( ev );
+ else TQComboBox::keyPressEvent( ev );
}
-void RecipientLineEdit::keyPressEvent( QKeyEvent *ev )
+void RecipientLineEdit::keyPressEvent( TQKeyEvent *ev )
{
if ( ev->key() == Key_Backspace && text().isEmpty() ) {
ev->accept();
@@ -145,40 +145,40 @@ void RecipientLineEdit::keyPressEvent( QKeyEvent *ev )
}
}
-RecipientLine::RecipientLine( QWidget *parent )
- : QWidget( parent ), mRecipientsCount( 0 ), mModified( false )
+RecipientLine::RecipientLine( TQWidget *parent )
+ : TQWidget( parent ), mRecipientsCount( 0 ), mModified( false )
{
- QBoxLayout *topLayout = new QHBoxLayout( this );
+ TQBoxLayout *topLayout = new TQHBoxLayout( this );
topLayout->setSpacing( KDialog::spacingHint() );
- QStringList recipientTypes = Recipient::allTypeLabels();
+ TQStringList recipientTypes = Recipient::allTypeLabels();
mCombo = new RecipientComboBox( this );
mCombo->insertStringList( recipientTypes );
topLayout->addWidget( mCombo );
- QToolTip::add( mCombo, i18n("Select type of recipient") );
+ TQToolTip::add( mCombo, i18n("Select type of recipient") );
mEdit = new RecipientLineEdit( this );
topLayout->addWidget( mEdit );
- connect( mEdit, SIGNAL( returnPressed() ), SLOT( slotReturnPressed() ) );
- connect( mEdit, SIGNAL( deleteMe() ), SLOT( slotPropagateDeletion() ) );
- connect( mEdit, SIGNAL( textChanged( const QString & ) ),
- SLOT( analyzeLine( const QString & ) ) );
- connect( mEdit, SIGNAL( focusUp() ), SLOT( slotFocusUp() ) );
- connect( mEdit, SIGNAL( focusDown() ), SLOT( slotFocusDown() ) );
- connect( mEdit, SIGNAL( rightPressed() ), SIGNAL( rightPressed() ) );
+ connect( mEdit, TQT_SIGNAL( returnPressed() ), TQT_SLOT( slotReturnPressed() ) );
+ connect( mEdit, TQT_SIGNAL( deleteMe() ), TQT_SLOT( slotPropagateDeletion() ) );
+ connect( mEdit, TQT_SIGNAL( textChanged( const TQString & ) ),
+ TQT_SLOT( analyzeLine( const TQString & ) ) );
+ connect( mEdit, TQT_SIGNAL( focusUp() ), TQT_SLOT( slotFocusUp() ) );
+ connect( mEdit, TQT_SIGNAL( focusDown() ), TQT_SLOT( slotFocusDown() ) );
+ connect( mEdit, TQT_SIGNAL( rightPressed() ), TQT_SIGNAL( rightPressed() ) );
- connect( mEdit, SIGNAL( leftPressed() ), mCombo, SLOT( setFocus() ) );
- connect( mCombo, SIGNAL( rightPressed() ), mEdit, SLOT( setFocus() ) );
+ connect( mEdit, TQT_SIGNAL( leftPressed() ), mCombo, TQT_SLOT( setFocus() ) );
+ connect( mCombo, TQT_SIGNAL( rightPressed() ), mEdit, TQT_SLOT( setFocus() ) );
- connect( mCombo, SIGNAL( activated ( int ) ),
- this, SLOT( slotTypeModified() ) );
+ connect( mCombo, TQT_SIGNAL( activated ( int ) ),
+ this, TQT_SLOT( slotTypeModified() ) );
- mRemoveButton = new QPushButton( this );
+ mRemoveButton = new TQPushButton( this );
mRemoveButton->setIconSet( KApplication::reverseLayout() ? SmallIconSet("locationbar_erase") : SmallIconSet( "clear_left" ) );
topLayout->addWidget( mRemoveButton );
- connect( mRemoveButton, SIGNAL( clicked() ), SLOT( slotPropagateDeletion() ) );
- QToolTip::add( mRemoveButton, i18n("Remove recipient line") );
+ connect( mRemoveButton, TQT_SIGNAL( clicked() ), TQT_SLOT( slotPropagateDeletion() ) );
+ TQToolTip::add( mRemoveButton, i18n("Remove recipient line") );
}
void RecipientLine::slotFocusUp()
@@ -198,9 +198,9 @@ void RecipientLine::slotTypeModified()
emit typeModified( this );
}
-void RecipientLine::analyzeLine( const QString &text )
+void RecipientLine::analyzeLine( const TQString &text )
{
- QStringList r = KPIM::splitEmailAddrList( text );
+ TQStringList r = KPIM::splitEmailAddrList( text );
if ( int( r.count() ) != mRecipientsCount ) {
mRecipientsCount = r.count();
emit countChanged();
@@ -218,7 +218,7 @@ void RecipientLine::setRecipient( const Recipient &rec )
mCombo->setCurrentItem( Recipient::typeToId( rec.type() ) );
}
-void RecipientLine::setRecipient( const QString &email )
+void RecipientLine::setRecipient( const TQString &email )
{
setRecipient( Recipient( email ) );
}
@@ -275,7 +275,7 @@ void RecipientLine::slotPropagateDeletion()
emit deleteLine( this );
}
-void RecipientLine::keyPressEvent( QKeyEvent *ev )
+void RecipientLine::keyPressEvent( TQKeyEvent *ev )
{
if ( ev->key() == Key_Up ) {
emit upPressed( this );
@@ -293,14 +293,14 @@ int RecipientLine::setComboWidth( int w )
return w;
}
-void RecipientLine::fixTabOrder( QWidget *previous )
+void RecipientLine::fixTabOrder( TQWidget *previous )
{
setTabOrder( previous, mCombo );
setTabOrder( mCombo, mEdit );
setTabOrder( mEdit, mRemoveButton );
}
-QWidget *RecipientLine::tabOut() const
+TQWidget *RecipientLine::tabOut() const
{
return mRemoveButton;
}
@@ -318,8 +318,8 @@ void RecipientLine::setRemoveLineButtonEnabled( bool b )
// ------------ RecipientsView ---------------------
-RecipientsView::RecipientsView( QWidget *parent )
- : QScrollView( parent ), mCurDelLine( 0 ),
+RecipientsView::RecipientsView( TQWidget *parent )
+ : TQScrollView( parent ), mCurDelLine( 0 ),
mLineHeight( 0 ), mFirstColumnWidth( 0 ),
mModified( false )
{
@@ -328,8 +328,8 @@ RecipientsView::RecipientsView( QWidget *parent )
setLineWidth( 0 );
addLine();
- setResizePolicy( QScrollView::Manual );
- setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding );
+ setResizePolicy( TQScrollView::Manual );
+ setSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Expanding );
viewport()->setPaletteBackgroundColor( paletteBackgroundColor() );
}
@@ -355,20 +355,20 @@ RecipientLine *RecipientsView::addLine()
addChild( line, 0, mLines.count() * mLineHeight );
line->mEdit->setCompletionMode( mCompletionMode );
line->show();
- connect( line, SIGNAL( returnPressed( RecipientLine * ) ),
- SLOT( slotReturnPressed( RecipientLine * ) ) );
- connect( line, SIGNAL( upPressed( RecipientLine * ) ),
- SLOT( slotUpPressed( RecipientLine * ) ) );
- connect( line, SIGNAL( downPressed( RecipientLine * ) ),
- SLOT( slotDownPressed( RecipientLine * ) ) );
- connect( line, SIGNAL( rightPressed() ), SIGNAL( focusRight() ) );
- connect( line, SIGNAL( deleteLine( RecipientLine * ) ),
- SLOT( slotDecideLineDeletion( RecipientLine * ) ) );
- connect( line, SIGNAL( countChanged() ), SLOT( calculateTotal() ) );
- connect( line, SIGNAL( typeModified( RecipientLine * ) ),
- SLOT( slotTypeModified( RecipientLine * ) ) );
- connect( line->mEdit, SIGNAL( completionModeChanged( KGlobalSettings::Completion ) ),
- SLOT( setCompletionMode( KGlobalSettings::Completion ) ) );
+ connect( line, TQT_SIGNAL( returnPressed( RecipientLine * ) ),
+ TQT_SLOT( slotReturnPressed( RecipientLine * ) ) );
+ connect( line, TQT_SIGNAL( upPressed( RecipientLine * ) ),
+ TQT_SLOT( slotUpPressed( RecipientLine * ) ) );
+ connect( line, TQT_SIGNAL( downPressed( RecipientLine * ) ),
+ TQT_SLOT( slotDownPressed( RecipientLine * ) ) );
+ connect( line, TQT_SIGNAL( rightPressed() ), TQT_SIGNAL( focusRight() ) );
+ connect( line, TQT_SIGNAL( deleteLine( RecipientLine * ) ),
+ TQT_SLOT( slotDecideLineDeletion( RecipientLine * ) ) );
+ connect( line, TQT_SIGNAL( countChanged() ), TQT_SLOT( calculateTotal() ) );
+ connect( line, TQT_SIGNAL( typeModified( RecipientLine * ) ),
+ TQT_SLOT( slotTypeModified( RecipientLine * ) ) );
+ connect( line->mEdit, TQT_SIGNAL( completionModeChanged( KGlobalSettings::Completion ) ),
+ TQT_SLOT( setCompletionMode( KGlobalSettings::Completion ) ) );
if ( mLines.last() ) {
if ( mLines.count() == 1 ) {
@@ -480,7 +480,7 @@ void RecipientsView::slotDecideLineDeletion( RecipientLine *line )
line->clear();
} else {
mCurDelLine = line;
- QTimer::singleShot( 0, this, SLOT( slotDeleteLine( ) ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( slotDeleteLine( ) ) );
}
}
@@ -536,7 +536,7 @@ void RecipientsView::resizeView()
parentWidget()->layout()->activate();
emit sizeHintChanged();
- QTimer::singleShot( 0, this, SLOT(moveCompletionPopup()) );
+ TQTimer::singleShot( 0, this, TQT_SLOT(moveCompletionPopup()) );
}
void RecipientsView::activateLine( RecipientLine *line )
@@ -545,7 +545,7 @@ void RecipientsView::activateLine( RecipientLine *line )
ensureVisible( 0, childY( line ) );
}
-void RecipientsView::viewportResizeEvent ( QResizeEvent *ev )
+void RecipientsView::viewportResizeEvent ( TQResizeEvent *ev )
{
for( uint i = 0; i < mLines.count(); ++i ) {
mLines.at( i )->resize( ev->size().width(), mLineHeight );
@@ -553,25 +553,25 @@ void RecipientsView::viewportResizeEvent ( QResizeEvent *ev )
ensureVisible( 0, mLines.count() * mLineHeight );
}
-QSize RecipientsView::sizeHint() const
+TQSize RecipientsView::sizeHint() const
{
- return QSize( 200, mLineHeight * mLines.count() );
+ return TQSize( 200, mLineHeight * mLines.count() );
}
-QSize RecipientsView::minimumSizeHint() const
+TQSize RecipientsView::minimumSizeHint() const
{
int height;
uint numLines = 5;
if ( mLines.count() < numLines ) height = mLineHeight * mLines.count();
else height = mLineHeight * numLines;
- return QSize( 200, height );
+ return TQSize( 200, height );
}
Recipient::List RecipientsView::recipients() const
{
Recipient::List recipients;
- QPtrListIterator<RecipientLine> it( mLines );
+ TQPtrListIterator<RecipientLine> it( mLines );
RecipientLine *line;
while( ( line = it.current() ) ) {
if ( !line->recipient().isEmpty() ) {
@@ -590,7 +590,7 @@ void RecipientsView::setCompletionMode ( KGlobalSettings::Completion mode )
return;
mCompletionMode = mode;
- QPtrListIterator<RecipientLine> it( mLines );
+ TQPtrListIterator<RecipientLine> it( mLines );
RecipientLine *line;
while( ( line = it.current() ) ) {
line->mEdit->blockSignals( true );
@@ -601,11 +601,11 @@ void RecipientsView::setCompletionMode ( KGlobalSettings::Completion mode )
emit completionModeChanged( mode ); //report change to RecipientsEditor
}
-void RecipientsView::removeRecipient( const QString & recipient,
+void RecipientsView::removeRecipient( const TQString & recipient,
Recipient::Type type )
{
// search a line which matches recipient and type
- QPtrListIterator<RecipientLine> it( mLines );
+ TQPtrListIterator<RecipientLine> it( mLines );
RecipientLine *line;
while( ( line = it.current() ) ) {
if ( ( line->recipient().email() == recipient ) &&
@@ -623,7 +623,7 @@ bool RecipientsView::isModified()
if ( mModified )
return true;
- QPtrListIterator<RecipientLine> it( mLines );
+ TQPtrListIterator<RecipientLine> it( mLines );
RecipientLine *line;
while( ( line = it.current() ) ) {
if ( line->isModified() ) {
@@ -639,7 +639,7 @@ void RecipientsView::clearModified()
{
mModified = false;
- QPtrListIterator<RecipientLine> it( mLines );
+ TQPtrListIterator<RecipientLine> it( mLines );
RecipientLine *line;
while( ( line = it.current() ) ) {
line->clearModified();
@@ -671,7 +671,7 @@ int RecipientsView::setFirstColumnWidth( int w )
{
mFirstColumnWidth = w;
- QPtrListIterator<RecipientLine> it( mLines );
+ TQPtrListIterator<RecipientLine> it( mLines );
RecipientLine *line;
while( ( line = it.current() ) ) {
mFirstColumnWidth = line->setComboWidth( mFirstColumnWidth );
@@ -696,25 +696,25 @@ void RecipientsView::moveCompletionPopup()
}
-RecipientsToolTip::RecipientsToolTip( RecipientsView *view, QWidget *parent )
- : QToolTip( parent ), mView( view )
+RecipientsToolTip::RecipientsToolTip( RecipientsView *view, TQWidget *parent )
+ : TQToolTip( parent ), mView( view )
{
}
-QString RecipientsToolTip::line( const Recipient &r )
+TQString RecipientsToolTip::line( const Recipient &r )
{
- QString txt = r.email();
+ TQString txt = r.email();
- return "&nbsp;&nbsp;" + QStyleSheet::escape( txt ) + "<br/>";
+ return "&nbsp;&nbsp;" + TQStyleSheet::escape( txt ) + "<br/>";
}
-void RecipientsToolTip::maybeTip( const QPoint & p )
+void RecipientsToolTip::maybeTip( const TQPoint & p )
{
- QString text = "<qt>";
+ TQString text = "<qt>";
- QString to;
- QString cc;
- QString bcc;
+ TQString to;
+ TQString cc;
+ TQString bcc;
Recipient::List recipients = mView->recipients();
Recipient::List::ConstIterator it;
@@ -740,21 +740,21 @@ void RecipientsToolTip::maybeTip( const QPoint & p )
text.append( "</qt>" );
- QRect geometry( p + QPoint( 2, 2 ), QPoint( 400, 100 ) );
+ TQRect geometry( p + TQPoint( 2, 2 ), TQPoint( 400, 100 ) );
- tip( QRect( p.x() - 20, p.y() - 20, 40, 40 ), text, geometry );
+ tip( TQRect( p.x() - 20, p.y() - 20, 40, 40 ), text, geometry );
}
-SideWidget::SideWidget( RecipientsView *view, QWidget *parent )
- : QWidget( parent ), mView( view ), mRecipientPicker( 0 )
+SideWidget::SideWidget( RecipientsView *view, TQWidget *parent )
+ : TQWidget( parent ), mView( view ), mRecipientPicker( 0 )
{
- QBoxLayout *topLayout = new QVBoxLayout( this );
+ TQBoxLayout *topLayout = new TQVBoxLayout( this );
topLayout->setSpacing( KDialog::spacingHint() );
topLayout->addStretch( 1 );
- mTotalLabel = new QLabel( this );
+ mTotalLabel = new TQLabel( this );
mTotalLabel->setAlignment( AlignCenter );
topLayout->addWidget( mTotalLabel );
mTotalLabel->hide();
@@ -763,18 +763,18 @@ SideWidget::SideWidget( RecipientsView *view, QWidget *parent )
new RecipientsToolTip( view, mTotalLabel );
- mDistributionListButton = new QPushButton( i18n("Save List..."), this );
+ mDistributionListButton = new TQPushButton( i18n("Save List..."), this );
topLayout->addWidget( mDistributionListButton );
mDistributionListButton->hide();
- connect( mDistributionListButton, SIGNAL( clicked() ),
- SIGNAL( saveDistributionList() ) );
- QToolTip::add( mDistributionListButton,
+ connect( mDistributionListButton, TQT_SIGNAL( clicked() ),
+ TQT_SIGNAL( saveDistributionList() ) );
+ TQToolTip::add( mDistributionListButton,
i18n("Save recipients as distribution list") );
- mSelectButton = new QPushButton( i18n("Se&lect..."), this );
+ mSelectButton = new TQPushButton( i18n("Se&lect..."), this );
topLayout->addWidget( mSelectButton );
- connect( mSelectButton, SIGNAL( clicked() ), SLOT( pickRecipient() ) );
- QToolTip::add( mSelectButton, i18n("Select recipients from address book") );
+ connect( mSelectButton, TQT_SIGNAL( clicked() ), TQT_SLOT( pickRecipient() ) );
+ TQToolTip::add( mSelectButton, i18n("Select recipients from address book") );
}
SideWidget::~SideWidget()
@@ -787,8 +787,8 @@ RecipientsPicker* SideWidget::picker() const
// hacks to allow picker() to be const in the presence of lazy loading
SideWidget *non_const_this = const_cast<SideWidget*>( this );
mRecipientPicker = new RecipientsPicker( non_const_this );
- connect( mRecipientPicker, SIGNAL( pickedRecipient( const Recipient & ) ),
- non_const_this, SIGNAL( pickedRecipient( const Recipient & ) ) );
+ connect( mRecipientPicker, TQT_SIGNAL( pickedRecipient( const Recipient & ) ),
+ non_const_this, TQT_SIGNAL( pickedRecipient( const Recipient & ) ) );
mPickerPositioner = new KWindowPositioner( non_const_this, mRecipientPicker );
}
return mRecipientPicker;
@@ -806,7 +806,7 @@ void SideWidget::setTotal( int recipients, int lines )
" lines: " << lines << endl;
#endif
- QString labelText;
+ TQString labelText;
if ( recipients == 0 ) labelText = i18n("No recipients");
else labelText = i18n("1 recipient","%n recipients", recipients );
mTotalLabel->setText( labelText );
@@ -821,7 +821,7 @@ void SideWidget::setTotal( int recipients, int lines )
void SideWidget::pickRecipient()
{
#if 0
- QString rec = KInputDialog::getText( "Pick Recipient",
+ TQString rec = KInputDialog::getText( "Pick Recipient",
"Email address of recipient" );
if ( !rec.isEmpty() ) emit pickedRecipient( rec );
#else
@@ -835,33 +835,33 @@ void SideWidget::pickRecipient()
}
-RecipientsEditor::RecipientsEditor( QWidget *parent )
- : QWidget( parent ), mModified( false )
+RecipientsEditor::RecipientsEditor( TQWidget *parent )
+ : TQWidget( parent ), mModified( false )
{
- QBoxLayout *topLayout = new QHBoxLayout( this );
+ TQBoxLayout *topLayout = new TQHBoxLayout( this );
topLayout->setSpacing( KDialog::spacingHint() );
mRecipientsView = new RecipientsView( this );
topLayout->addWidget( mRecipientsView );
- connect( mRecipientsView, SIGNAL( focusUp() ), SIGNAL( focusUp() ) );
- connect( mRecipientsView, SIGNAL( focusDown() ), SIGNAL( focusDown() ) );
- connect( mRecipientsView, SIGNAL( completionModeChanged( KGlobalSettings::Completion ) ),
- SIGNAL( completionModeChanged( KGlobalSettings::Completion ) ) );
+ connect( mRecipientsView, TQT_SIGNAL( focusUp() ), TQT_SIGNAL( focusUp() ) );
+ connect( mRecipientsView, TQT_SIGNAL( focusDown() ), TQT_SIGNAL( focusDown() ) );
+ connect( mRecipientsView, TQT_SIGNAL( completionModeChanged( KGlobalSettings::Completion ) ),
+ TQT_SIGNAL( completionModeChanged( KGlobalSettings::Completion ) ) );
mSideWidget = new SideWidget( mRecipientsView, this );
topLayout->addWidget( mSideWidget );
- connect( mSideWidget, SIGNAL( pickedRecipient( const Recipient & ) ),
- SLOT( slotPickedRecipient( const Recipient & ) ) );
- connect( mSideWidget, SIGNAL( saveDistributionList() ),
- SLOT( saveDistributionList() ) );
+ connect( mSideWidget, TQT_SIGNAL( pickedRecipient( const Recipient & ) ),
+ TQT_SLOT( slotPickedRecipient( const Recipient & ) ) );
+ connect( mSideWidget, TQT_SIGNAL( saveDistributionList() ),
+ TQT_SLOT( saveDistributionList() ) );
- connect( mRecipientsView, SIGNAL( totalChanged( int, int ) ),
- mSideWidget, SLOT( setTotal( int, int ) ) );
- connect( mRecipientsView, SIGNAL( focusRight() ),
- mSideWidget, SLOT( setFocus() ) );
+ connect( mRecipientsView, TQT_SIGNAL( totalChanged( int, int ) ),
+ mSideWidget, TQT_SLOT( setTotal( int, int ) ) );
+ connect( mRecipientsView, TQT_SIGNAL( focusRight() ),
+ mSideWidget, TQT_SLOT( setFocus() ) );
- connect( mRecipientsView, SIGNAL(sizeHintChanged()),
- SIGNAL(sizeHintChanged()) );
+ connect( mRecipientsView, TQT_SIGNAL(sizeHintChanged()),
+ TQT_SIGNAL(sizeHintChanged()) );
}
RecipientsEditor::~RecipientsEditor()
@@ -899,15 +899,15 @@ Recipient::List RecipientsEditor::recipients() const
return mRecipientsView->recipients();
}
-void RecipientsEditor::setRecipientString( const QString &str,
+void RecipientsEditor::setRecipientString( const TQString &str,
Recipient::Type type )
{
clear();
int count = 1;
- QStringList r = KPIM::splitEmailAddrList( str );
- QStringList::ConstIterator it;
+ TQStringList r = KPIM::splitEmailAddrList( str );
+ TQStringList::ConstIterator it;
for( it = r.begin(); it != r.end(); ++it ) {
if ( count++ > GlobalSettings::self()->maximumRecipients() ) {
KMessageBox::sorry( this,
@@ -920,9 +920,9 @@ void RecipientsEditor::setRecipientString( const QString &str,
}
}
-QString RecipientsEditor::recipientString( Recipient::Type type )
+TQString RecipientsEditor::recipientString( Recipient::Type type )
{
- QString str;
+ TQString str;
Recipient::List recipients = mRecipientsView->recipients();
Recipient::List::ConstIterator it;
@@ -936,7 +936,7 @@ QString RecipientsEditor::recipientString( Recipient::Type type )
return str;
}
-void RecipientsEditor::addRecipient( const QString & recipient,
+void RecipientsEditor::addRecipient( const TQString & recipient,
Recipient::Type type )
{
RecipientLine *line = mRecipientsView->emptyLine();
@@ -944,7 +944,7 @@ void RecipientsEditor::addRecipient( const QString & recipient,
line->setRecipient( Recipient( recipient, type ) );
}
-void RecipientsEditor::removeRecipient( const QString & recipient,
+void RecipientsEditor::removeRecipient( const TQString & recipient,
Recipient::Type type )
{
mRecipientsView->removeRecipient( recipient, type );
diff --git a/kmail/recipientseditor.h b/kmail/recipientseditor.h
index 91adee7d0..92b5165f2 100644
--- a/kmail/recipientseditor.h
+++ b/kmail/recipientseditor.h
@@ -24,14 +24,14 @@
#ifndef RECIPIENTSEDITOR_H
#define RECIPIENTSEDITOR_H
-#include <qwidget.h>
-#include <qscrollview.h>
-#include <qguardedptr.h>
-#include <qlineedit.h>
-#include <qtooltip.h>
+#include <tqwidget.h>
+#include <tqscrollview.h>
+#include <tqguardedptr.h>
+#include <tqlineedit.h>
+#include <tqtooltip.h>
#include "kmlineeditspell.h"
-#include <qcombobox.h>
+#include <tqcombobox.h>
class RecipientsPicker;
@@ -44,28 +44,28 @@ class SideWidget;
class Recipient
{
public:
- typedef QValueList<Recipient> List;
+ typedef TQValueList<Recipient> List;
enum Type { To, Cc, Bcc, Undefined };
- Recipient( const QString &email = QString::null, Type type = To );
+ Recipient( const TQString &email = TQString::null, Type type = To );
void setType( Type );
Type type() const;
- void setEmail( const QString & );
- QString email() const;
+ void setEmail( const TQString & );
+ TQString email() const;
bool isEmpty() const;
static int typeToId( Type );
static Type idToType( int );
- QString typeLabel() const; static QString typeLabel( Type );
- static QStringList allTypeLabels();
+ TQString typeLabel() const; static TQString typeLabel( Type );
+ static TQStringList allTypeLabels();
private:
- QString mEmail;
+ TQString mEmail;
Type mType;
};
@@ -73,20 +73,20 @@ class RecipientComboBox : public QComboBox
{
Q_OBJECT
public:
- RecipientComboBox( QWidget *parent );
+ RecipientComboBox( TQWidget *parent );
signals:
void rightPressed();
protected:
- void keyPressEvent( QKeyEvent *ev );
+ void keyPressEvent( TQKeyEvent *ev );
};
class RecipientLineEdit : public KMLineEdit
{
Q_OBJECT
public:
- RecipientLineEdit( QWidget * parent ) :
+ RecipientLineEdit( TQWidget * parent ) :
KMLineEdit( true, parent ) {}
signals:
@@ -95,14 +95,14 @@ class RecipientLineEdit : public KMLineEdit
void rightPressed();
protected:
- void keyPressEvent( QKeyEvent *ev );
+ void keyPressEvent( TQKeyEvent *ev );
};
class RecipientLine : public QWidget
{
Q_OBJECT
public:
- RecipientLine( QWidget *parent );
+ RecipientLine( TQWidget *parent );
void setRecipient( const Recipient & );
Recipient recipient() const;
@@ -110,7 +110,7 @@ class RecipientLine : public QWidget
void setRecipientType( Recipient::Type );
Recipient::Type recipientType() const;
- void setRecipient( const QString & );
+ void setRecipient( const TQString & );
void activate();
bool isActive();
@@ -128,8 +128,8 @@ class RecipientLine : public QWidget
int setComboWidth( int w );
- void fixTabOrder( QWidget *previous );
- QWidget *tabOut() const;
+ void fixTabOrder( TQWidget *previous );
+ TQWidget *tabOut() const;
void clear();
@@ -147,12 +147,12 @@ class RecipientLine : public QWidget
void typeModified( RecipientLine * );
protected:
- void keyPressEvent( QKeyEvent * );
+ void keyPressEvent( TQKeyEvent * );
RecipientLineEdit* lineEdit() const { return mEdit; }
protected slots:
void slotReturnPressed();
- void analyzeLine( const QString & );
+ void analyzeLine( const TQString & );
void slotFocusUp();
void slotFocusDown();
void slotPropagateDeletion();
@@ -160,9 +160,9 @@ class RecipientLine : public QWidget
private:
friend class RecipientsView;
- QComboBox *mCombo;
+ TQComboBox *mCombo;
RecipientLineEdit *mEdit;
- QPushButton *mRemoveButton;
+ TQPushButton *mRemoveButton;
int mRecipientsCount;
bool mModified;
};
@@ -171,10 +171,10 @@ class RecipientsView : public QScrollView
{
Q_OBJECT
public:
- RecipientsView( QWidget *parent );
+ RecipientsView( TQWidget *parent );
- QSize minimumSizeHint() const;
- QSize sizeHint() const;
+ TQSize minimumSizeHint() const;
+ TQSize sizeHint() const;
RecipientLine *activeLine();
@@ -186,7 +186,7 @@ class RecipientsView : public QScrollView
@param recipient The recipient(s) you want to remove.
@param type The recipient type.
*/
- void removeRecipient( const QString & recipient, Recipient::Type type );
+ void removeRecipient( const TQString & recipient, Recipient::Type type );
/** Returns true if the user has made any modifications to the list of
recipients.
@@ -224,7 +224,7 @@ class RecipientsView : public QScrollView
void sizeHintChanged();
protected:
- void viewportResizeEvent( QResizeEvent * );
+ void viewportResizeEvent( TQResizeEvent * );
void resizeView();
protected slots:
@@ -238,8 +238,8 @@ class RecipientsView : public QScrollView
void moveCompletionPopup();
private:
- QPtrList<RecipientLine> mLines;
- QGuardedPtr<RecipientLine> mCurDelLine;
+ TQPtrList<RecipientLine> mLines;
+ TQGuardedPtr<RecipientLine> mCurDelLine;
int mLineHeight;
int mFirstColumnWidth;
bool mModified;
@@ -249,12 +249,12 @@ class RecipientsView : public QScrollView
class RecipientsToolTip : public QToolTip
{
public:
- RecipientsToolTip( RecipientsView *, QWidget *parent );
+ RecipientsToolTip( RecipientsView *, TQWidget *parent );
protected:
- void maybeTip( const QPoint & p );
+ void maybeTip( const TQPoint & p );
- QString line( const Recipient & );
+ TQString line( const Recipient & );
private:
RecipientsView *mView;
@@ -264,7 +264,7 @@ class SideWidget : public QWidget
{
Q_OBJECT
public:
- SideWidget( RecipientsView *view, QWidget *parent );
+ SideWidget( RecipientsView *view, TQWidget *parent );
~SideWidget();
RecipientsPicker* picker() const;
@@ -281,9 +281,9 @@ class SideWidget : public QWidget
private:
RecipientsView *mView;
- QLabel *mTotalLabel;
- QPushButton *mDistributionListButton;
- QPushButton *mSelectButton;
+ TQLabel *mTotalLabel;
+ TQPushButton *mDistributionListButton;
+ TQPushButton *mSelectButton;
/** The RecipientsPicker is lazy loaded, never access it directly,
only through picker() */
mutable RecipientsPicker *mRecipientPicker;
@@ -295,7 +295,7 @@ class RecipientsEditor : public QWidget
{
Q_OBJECT
public:
- RecipientsEditor( QWidget *parent );
+ RecipientsEditor( TQWidget *parent );
~RecipientsEditor();
void clear();
@@ -303,20 +303,20 @@ class RecipientsEditor : public QWidget
Recipient::List recipients() const;
RecipientsPicker* picker() const;
- void setRecipientString( const QString &, Recipient::Type );
- QString recipientString( Recipient::Type );
+ void setRecipientString( const TQString &, Recipient::Type );
+ TQString recipientString( Recipient::Type );
/** Adds a recipient (or multiple recipients) to one line of the editor.
@param recipient The recipient(s) you want to add.
@param type The recipient type.
*/
- void addRecipient( const QString & recipient, Recipient::Type type );
+ void addRecipient( const TQString & recipient, Recipient::Type type );
/** Removes the recipient provided it can be found and has the given type.
@param recipient The recipient(s) you want to remove.
@param type The recipient type.
*/
- void removeRecipient( const QString & recipient, Recipient::Type type );
+ void removeRecipient( const TQString & recipient, Recipient::Type type );
/** Returns true if the user has made any modifications to the list of
recipients.
diff --git a/kmail/recipientseditortest.cpp b/kmail/recipientseditortest.cpp
index 2455fdba0..44df528c9 100644
--- a/kmail/recipientseditortest.cpp
+++ b/kmail/recipientseditortest.cpp
@@ -33,22 +33,22 @@
#include <kmessagebox.h>
#include "aboutdata.h"
-#include <qpushbutton.h>
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qlineedit.h>
-#include <qtextedit.h>
-
-Composer::Composer( QWidget *parent )
- : QWidget( parent )
+#include <tqpushbutton.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqlineedit.h>
+#include <tqtextedit.h>
+
+Composer::Composer( TQWidget *parent )
+ : TQWidget( parent )
{
- QGridLayout *topLayout = new QGridLayout( this );
+ TQGridLayout *topLayout = new TQGridLayout( this );
topLayout->setMargin( 4 );
topLayout->setSpacing( 4 );
- QLabel *label = new QLabel( "From:", this );
+ TQLabel *label = new TQLabel( "From:", this );
topLayout->addWidget( label, 0, 0 );
- QLineEdit *edit = new QLineEdit( this );
+ TQLineEdit *edit = new TQLineEdit( this );
topLayout->addWidget( edit, 0, 1 );
mRecipients = new RecipientsEditor( this );
@@ -58,19 +58,19 @@ Composer::Composer( QWidget *parent )
// mRecipients->setFixedHeight( 10 );
- QTextEdit *editor = new QTextEdit( this );
+ TQTextEdit *editor = new TQTextEdit( this );
topLayout->addMultiCellWidget( editor, 2, 2, 0, 1 );
topLayout->setRowStretch( 2, 1 );
- QPushButton *button = new QPushButton( "&Close", this );
+ TQPushButton *button = new TQPushButton( "&Close", this );
topLayout->addMultiCellWidget( button, 3, 3, 0, 1 );
- connect( button, SIGNAL( clicked() ), SLOT( slotClose() ) );
+ connect( button, TQT_SIGNAL( clicked() ), TQT_SLOT( slotClose() ) );
}
void Composer::slotClose()
{
#if 0
- QString text;
+ TQString text;
text += "<qt>";
@@ -96,9 +96,9 @@ int main( int argc, char **argv )
KApplication app;
- QObject::connect( &app, SIGNAL( lastWindowClosed() ), &app, SLOT( quit() ) );
+ TQObject::connect( &app, TQT_SIGNAL( lastWindowClosed() ), &app, TQT_SLOT( quit() ) );
- QWidget *wid = new Composer( 0 );
+ TQWidget *wid = new Composer( 0 );
wid->show();
diff --git a/kmail/recipientseditortest.h b/kmail/recipientseditortest.h
index 5a24c4e66..be468e833 100644
--- a/kmail/recipientseditortest.h
+++ b/kmail/recipientseditortest.h
@@ -24,7 +24,7 @@
#ifndef RECIPIENTSEDITORTEST_H
#define RECIPIENTSEDITORTEST_H
-#include <qwidget.h>
+#include <tqwidget.h>
class RecipientsEditor;
@@ -32,7 +32,7 @@ class Composer : public QWidget
{
Q_OBJECT
public:
- Composer( QWidget *parent );
+ Composer( TQWidget *parent );
public slots:
void slotClose();
diff --git a/kmail/recipientspicker.cpp b/kmail/recipientspicker.cpp
index 7f0d8fa36..839898cbf 100644
--- a/kmail/recipientspicker.cpp
+++ b/kmail/recipientspicker.cpp
@@ -40,11 +40,11 @@
#include <kwin.h>
#include <kmessagebox.h>
-#include <qlayout.h>
-#include <qcombobox.h>
-#include <qpushbutton.h>
-#include <qtoolbutton.h>
-#include <qlabel.h>
+#include <tqlayout.h>
+#include <tqcombobox.h>
+#include <tqpushbutton.h>
+#include <tqtoolbutton.h>
+#include <tqlabel.h>
#ifdef KDEPIM_NEW_DISTRLISTS
RecipientItem::RecipientItem( KABC::AddressBook *ab )
@@ -95,15 +95,15 @@ void RecipientItem::setDistributionList( KABC::DistributionList *list )
#endif
void RecipientItem::setAddressee( const KABC::Addressee &a,
- const QString &email )
+ const TQString &email )
{
mAddressee = a;
mEmail = email;
mRecipient = mAddressee.fullEmail( mEmail );
- QImage img = a.photo().data();
+ TQImage img = a.photo().data();
if ( !img.isNull() )
- mIcon = img.smoothScale( 20, 20, QImage::ScaleMin );
+ mIcon = img.smoothScale( 20, 20, TQImage::ScaleMin );
else
mIcon = KGlobal::iconLoader()->loadIcon( "personal", KIcon::Small );
@@ -117,27 +117,27 @@ void RecipientItem::setAddressee( const KABC::Addressee &a,
mTooltip += "<b>" + mEmail + "</b>";
}
-QPixmap RecipientItem::icon() const
+TQPixmap RecipientItem::icon() const
{
return mIcon;
}
-QString RecipientItem::name() const
+TQString RecipientItem::name() const
{
return mName;
}
-QString RecipientItem::email() const
+TQString RecipientItem::email() const
{
return mEmail;
}
-QString RecipientItem::recipient() const
+TQString RecipientItem::recipient() const
{
return mRecipient;
}
-QString RecipientItem::tooltip() const
+TQString RecipientItem::tooltip() const
{
return mTooltip;
}
@@ -153,9 +153,9 @@ KABC::DistributionList * RecipientItem::distributionList() {
#endif
#ifdef KDEPIM_NEW_DISTRLISTS
-QString RecipientItem::createTooltip( KPIM::DistributionList &distributionList ) const
+TQString RecipientItem::createTooltip( KPIM::DistributionList &distributionList ) const
{
- QString txt = "<qt>";
+ TQString txt = "<qt>";
txt += "<b>" + i18n( "Distribution List %1" ).arg ( distributionList.name() ) + "</b>";
txt += "<ul>";
@@ -176,9 +176,9 @@ QString RecipientItem::createTooltip( KPIM::DistributionList &distributionList )
return txt;
}
#else
-QString RecipientItem::createTooltip( KABC::DistributionList *distributionList ) const
+TQString RecipientItem::createTooltip( KABC::DistributionList *distributionList ) const
{
- QString txt = "<qt>";
+ TQString txt = "<qt>";
txt += "<b>" + i18n("Distribution List %1" ).arg ( distributionList->name() ) + "</b>";
txt += "<ul>";
@@ -200,12 +200,12 @@ QString RecipientItem::createTooltip( KABC::DistributionList *distributionList )
}
#endif
-void RecipientItem::setRecipientType( const QString &type )
+void RecipientItem::setRecipientType( const TQString &type )
{
mType = type;
}
-QString RecipientItem::recipientType() const
+TQString RecipientItem::recipientType() const
{
return mType;
}
@@ -227,22 +227,22 @@ RecipientItem *RecipientViewItem::recipientItem() const
}
-RecipientsListToolTip::RecipientsListToolTip( QWidget *parent,
+RecipientsListToolTip::RecipientsListToolTip( TQWidget *parent,
KListView *listView )
- : QToolTip( parent )
+ : TQToolTip( parent )
{
mListView = listView;
}
-void RecipientsListToolTip::maybeTip( const QPoint & pos )
+void RecipientsListToolTip::maybeTip( const TQPoint & pos )
{
- QRect r;
- QListViewItem *item = mListView->itemAt( pos );
+ TQRect r;
+ TQListViewItem *item = mListView->itemAt( pos );
RecipientViewItem *i = static_cast<RecipientViewItem *>( item );
if( item ) {
r = mListView->itemRect( item );
- QString tipText( i->recipientItem()->tooltip() );
+ TQString tipText( i->recipientItem()->tooltip() );
if ( !tipText.isEmpty() ) {
tip( r, tipText );
}
@@ -250,7 +250,7 @@ void RecipientsListToolTip::maybeTip( const QPoint & pos )
}
-RecipientsCollection::RecipientsCollection( const QString &id )
+RecipientsCollection::RecipientsCollection( const TQString &id )
{
mId = id;
mTitle = id;
@@ -272,12 +272,12 @@ bool RecipientsCollection::isReferenceContainer() const
return mIsReferenceContainer;
}
-void RecipientsCollection::setTitle( const QString &title )
+void RecipientsCollection::setTitle( const TQString &title )
{
mTitle = title;
}
-QString RecipientsCollection::title() const
+TQString RecipientsCollection::title() const
{
return mTitle;
}
@@ -299,7 +299,7 @@ bool RecipientsCollection::hasEquivalentItem( RecipientItem *item ) const
RecipientItem * RecipientsCollection::getEquivalentItem( RecipientItem *item) const
{
- QMap<QString, RecipientItem *>::ConstIterator it;
+ TQMap<TQString, RecipientItem *>::ConstIterator it;
it = mKeyMap.find( item->key() );
if ( it == mKeyMap.end() )
return 0;
@@ -314,7 +314,7 @@ void RecipientsCollection::clear()
void RecipientsCollection::deleteAll()
{
if ( !isReferenceContainer() ) {
- QMap<QString, RecipientItem *>::ConstIterator it;
+ TQMap<TQString, RecipientItem *>::ConstIterator it;
for( it = mKeyMap.begin(); it != mKeyMap.end(); ++it ) {
delete *it;
}
@@ -322,17 +322,17 @@ void RecipientsCollection::deleteAll()
clear();
}
-QString RecipientsCollection::id() const
+TQString RecipientsCollection::id() const
{
return mId;
}
-SearchLine::SearchLine( QWidget *parent, KListView *listView )
+SearchLine::SearchLine( TQWidget *parent, KListView *listView )
: KListViewSearchLine( parent, listView )
{
}
-void SearchLine::keyPressEvent( QKeyEvent *ev )
+void SearchLine::keyPressEvent( TQKeyEvent *ev )
{
if ( ev->key() == Key_Down ) emit downPressed();
@@ -340,8 +340,8 @@ void SearchLine::keyPressEvent( QKeyEvent *ev )
}
-RecipientsPicker::RecipientsPicker( QWidget *parent )
- : QDialog( parent, "RecipientsPicker" )
+RecipientsPicker::RecipientsPicker( TQWidget *parent )
+ : TQDialog( parent, "RecipientsPicker" )
#ifndef KDEPIM_NEW_DISTRLISTS
, mDistributionListManager( 0 )
#endif
@@ -351,86 +351,86 @@ RecipientsPicker::RecipientsPicker( QWidget *parent )
setCaption( i18n("Select Recipient") );
- QBoxLayout *topLayout = new QVBoxLayout( this );
+ TQBoxLayout *topLayout = new TQVBoxLayout( this );
topLayout->setSpacing( KDialog::spacingHint() );
topLayout->setMargin( KDialog::marginHint() );
- QBoxLayout *resLayout = new QHBoxLayout( topLayout );
+ TQBoxLayout *resLayout = new TQHBoxLayout( topLayout );
- QLabel *label = new QLabel( i18n("Address book:"), this );
+ TQLabel *label = new TQLabel( i18n("Address book:"), this );
resLayout->addWidget( label );
- mCollectionCombo = new QComboBox( this );
+ mCollectionCombo = new TQComboBox( this );
resLayout->addWidget( mCollectionCombo );
- resLayout->addItem(new QSpacerItem(1, 1, QSizePolicy::Expanding));
+ resLayout->addItem(new TQSpacerItem(1, 1, TQSizePolicy::Expanding));
-// connect( mCollectionCombo, SIGNAL( highlighted( int ) ),
-// SLOT( updateList() ) );
- connect( mCollectionCombo, SIGNAL( activated( int ) ),
- SLOT( updateList() ) );
+// connect( mCollectionCombo, TQT_SIGNAL( highlighted( int ) ),
+// TQT_SLOT( updateList() ) );
+ connect( mCollectionCombo, TQT_SIGNAL( activated( int ) ),
+ TQT_SLOT( updateList() ) );
- QBoxLayout *searchLayout = new QHBoxLayout( topLayout );
+ TQBoxLayout *searchLayout = new TQHBoxLayout( topLayout );
- QToolButton *button = new QToolButton( this );
+ TQToolButton *button = new TQToolButton( this );
button->setIconSet( KGlobal::iconLoader()->loadIconSet(
KApplication::reverseLayout() ? "clear_left":"locationbar_erase", KIcon::Small, 0 ) );
searchLayout->addWidget( button );
- connect( button, SIGNAL( clicked() ), SLOT( resetSearch() ) );
+ connect( button, TQT_SIGNAL( clicked() ), TQT_SLOT( resetSearch() ) );
- label = new QLabel( i18n("&Search:"), this );
+ label = new TQLabel( i18n("&Search:"), this );
searchLayout->addWidget( label );
mRecipientList = new KListView( this );
- mRecipientList->setSelectionMode( QListView::Extended );
+ mRecipientList->setSelectionMode( TQListView::Extended );
mRecipientList->setAllColumnsShowFocus( true );
mRecipientList->setFullWidth( true );
topLayout->addWidget( mRecipientList );
mRecipientList->addColumn( i18n("->") );
mRecipientList->addColumn( i18n("Name") );
mRecipientList->addColumn( i18n("Email") );
- connect( mRecipientList, SIGNAL( doubleClicked( QListViewItem *,
- const QPoint &, int ) ), SLOT( slotPicked() ) );
- connect( mRecipientList, SIGNAL( returnPressed( QListViewItem * ) ),
- SLOT( slotPicked() ) );
+ connect( mRecipientList, TQT_SIGNAL( doubleClicked( TQListViewItem *,
+ const TQPoint &, int ) ), TQT_SLOT( slotPicked() ) );
+ connect( mRecipientList, TQT_SIGNAL( returnPressed( TQListViewItem * ) ),
+ TQT_SLOT( slotPicked() ) );
new RecipientsListToolTip( mRecipientList->viewport(), mRecipientList );
mSearchLine = new SearchLine( this, mRecipientList );
searchLayout->addWidget( mSearchLine );
label->setBuddy( label );
- connect( mSearchLine, SIGNAL( downPressed() ), SLOT( setFocusList() ) );
+ connect( mSearchLine, TQT_SIGNAL( downPressed() ), TQT_SLOT( setFocusList() ) );
- mSearchLDAPButton = new QPushButton( i18n("Search &Directory Service"), this );
+ mSearchLDAPButton = new TQPushButton( i18n("Search &Directory Service"), this );
searchLayout->addWidget( mSearchLDAPButton );
- connect( mSearchLDAPButton, SIGNAL( clicked() ), SLOT( slotSearchLDAP() ) );
+ connect( mSearchLDAPButton, TQT_SIGNAL( clicked() ), TQT_SLOT( slotSearchLDAP() ) );
- QBoxLayout *buttonLayout = new QHBoxLayout( topLayout );
+ TQBoxLayout *buttonLayout = new TQHBoxLayout( topLayout );
buttonLayout->addStretch( 1 );
- mToButton = new QPushButton( i18n("Add as To"), this );
+ mToButton = new TQPushButton( i18n("Add as To"), this );
buttonLayout->addWidget( mToButton );
- connect( mToButton, SIGNAL( clicked() ), SLOT( slotToClicked() ) );
+ connect( mToButton, TQT_SIGNAL( clicked() ), TQT_SLOT( slotToClicked() ) );
- mCcButton = new QPushButton( i18n("Add as CC"), this );
+ mCcButton = new TQPushButton( i18n("Add as CC"), this );
buttonLayout->addWidget( mCcButton );
- connect( mCcButton, SIGNAL( clicked() ), SLOT( slotCcClicked() ) );
+ connect( mCcButton, TQT_SIGNAL( clicked() ), TQT_SLOT( slotCcClicked() ) );
- mBccButton = new QPushButton( i18n("Add as BCC"), this );
+ mBccButton = new TQPushButton( i18n("Add as BCC"), this );
buttonLayout->addWidget( mBccButton );
- connect( mBccButton, SIGNAL( clicked() ), SLOT( slotBccClicked() ) );
+ connect( mBccButton, TQT_SIGNAL( clicked() ), TQT_SLOT( slotBccClicked() ) );
// BCC isn't commonly used, so hide it for now
//mBccButton->hide();
- QPushButton *closeButton = new QPushButton( i18n("&Cancel"), this );
+ TQPushButton *closeButton = new TQPushButton( i18n("&Cancel"), this );
buttonLayout->addWidget( closeButton );
- connect( closeButton, SIGNAL( clicked() ), SLOT( close() ) );
+ connect( closeButton, TQT_SIGNAL( clicked() ), TQT_SLOT( close() ) );
{
using namespace KABC;
mAddressBook = KABC::StdAddressBook::self( true );
- connect( mAddressBook, SIGNAL( addressBookChanged( AddressBook * ) ),
- this, SLOT( insertAddressBook( AddressBook * ) ) );
+ connect( mAddressBook, TQT_SIGNAL( addressBookChanged( AddressBook * ) ),
+ this, TQT_SLOT( insertAddressBook( AddressBook * ) ) );
}
initCollections();
@@ -456,7 +456,7 @@ RecipientsPicker::~RecipientsPicker()
delete mDistributionListManager;
#endif
- QMap<int,RecipientsCollection *>::ConstIterator it;
+ TQMap<int,RecipientsCollection *>::ConstIterator it;
for( it = mCollectionMap.begin(); it != mCollectionMap.end(); ++it ) {
delete *it;
}
@@ -480,9 +480,9 @@ void RecipientsPicker::initCollections()
void RecipientsPicker::insertAddressBook( KABC::AddressBook *addressbook )
{
- QMap<KABC::Resource *,RecipientsCollection *> collectionMap;
+ TQMap<KABC::Resource *,RecipientsCollection *> collectionMap;
- QPtrList<KABC::Resource> resources = addressbook->resources();
+ TQPtrList<KABC::Resource> resources = addressbook->resources();
KABC::Resource *res;
for( res = resources.first(); res; res = resources.next() ) {
RecipientsCollection *collection = new RecipientsCollection( res->identifier() );
@@ -490,12 +490,12 @@ void RecipientsPicker::insertAddressBook( KABC::AddressBook *addressbook )
collection->setTitle( res->resourceName() );
}
- QMap<QString,RecipientsCollection *> categoryMap;
+ TQMap<TQString,RecipientsCollection *> categoryMap;
KABC::AddressBook::Iterator it;
for( it = addressbook->begin(); it != addressbook->end(); ++it ) {
- QStringList emails = (*it).emails();
- QStringList::ConstIterator it3;
+ TQStringList emails = (*it).emails();
+ TQStringList::ConstIterator it3;
for( it3 = emails.begin(); it3 != emails.end(); ++it3 ) {
#ifdef KDEPIM_NEW_DISTRLISTS
RecipientItem *item = new RecipientItem( mAddressBook );
@@ -504,16 +504,16 @@ void RecipientsPicker::insertAddressBook( KABC::AddressBook *addressbook )
#endif
item->setAddressee( *it, *it3 );
- QMap<KABC::Resource *,RecipientsCollection *>::ConstIterator collIt;
+ TQMap<KABC::Resource *,RecipientsCollection *>::ConstIterator collIt;
collIt = collectionMap.find( it->resource() );
if ( collIt != collectionMap.end() ) {
(*collIt)->addItem( item );
}
- QStringList categories = (*it).categories();
- QStringList::ConstIterator catIt;
+ TQStringList categories = (*it).categories();
+ TQStringList::ConstIterator catIt;
for( catIt = categories.begin(); catIt != categories.end(); ++catIt ) {
- QMap<QString, RecipientsCollection *>::ConstIterator catMapIt;
+ TQMap<TQString, RecipientsCollection *>::ConstIterator catMapIt;
catMapIt = categoryMap.find( *catIt );
RecipientsCollection *collection;
if ( catMapIt == categoryMap.end() ) {
@@ -528,12 +528,12 @@ void RecipientsPicker::insertAddressBook( KABC::AddressBook *addressbook )
}
}
- QMap<KABC::Resource *,RecipientsCollection *>::ConstIterator it2;
+ TQMap<KABC::Resource *,RecipientsCollection *>::ConstIterator it2;
for( it2 = collectionMap.begin(); it2 != collectionMap.end(); ++it2 ) {
insertCollection( *it2 );
}
- QMap<QString, RecipientsCollection *>::ConstIterator it3;
+ TQMap<TQString, RecipientsCollection *>::ConstIterator it3;
for( it3 = categoryMap.begin(); it3 != categoryMap.end(); ++it3 ) {
insertCollection( *it3 );
}
@@ -548,7 +548,7 @@ void RecipientsPicker::insertDistributionLists()
mDistributionLists->deleteAll();
#ifdef KDEPIM_NEW_DISTRLISTS
- QValueList<KPIM::DistributionList> lists = KPIM::DistributionList::allDistributionLists( mAddressBook );
+ TQValueList<KPIM::DistributionList> lists = KPIM::DistributionList::allDistributionLists( mAddressBook );
for ( uint i = 0; i < lists.count(); ++i ) {
RecipientItem *item = new RecipientItem( mAddressBook );
item->setDistributionList( lists[ i ] );
@@ -561,9 +561,9 @@ void RecipientsPicker::insertDistributionLists()
mDistributionListManager->load();
- QStringList lists = mDistributionListManager->listNames();
+ TQStringList lists = mDistributionListManager->listNames();
- QStringList::Iterator listIt;
+ TQStringList::Iterator listIt;
for ( listIt = lists.begin(); listIt != lists.end(); ++listIt ) {
KABC::DistributionList *list = mDistributionListManager->list( *listIt );
RecipientItem *item = new RecipientItem;
@@ -598,7 +598,7 @@ void RecipientsPicker::insertRecentAddresses()
void RecipientsPicker::insertCollection( RecipientsCollection *coll )
{
int index = 0;
- QMap<int,RecipientsCollection *>::ConstIterator it;
+ TQMap<int,RecipientsCollection *>::ConstIterator it;
for ( it = mCollectionMap.begin(); it != mCollectionMap.end(); ++it ) {
if ( (*it)->id() == coll->id() ) {
delete *it;
@@ -655,8 +655,8 @@ void RecipientsPicker::setRecipients( const Recipient::List &recipients )
if ( !item ) {
KABC::Addressee a;
- QString name;
- QString email;
+ TQString name;
+ TQString email;
KABC::Addressee::parseEmailAddress( (*it).email(), name, email );
a.setNameFromString( name );
a.insertEmail( email );
@@ -676,7 +676,7 @@ void RecipientsPicker::setRecipients( const Recipient::List &recipients )
updateList();
}
-void RecipientsPicker::setDefaultButton( QPushButton *button )
+void RecipientsPicker::setDefaultButton( TQPushButton *button )
{
// button->setText( "<qt><b>" + button->text() + "</b></qt>" );
button->setDefault( true );
@@ -699,7 +699,7 @@ void RecipientsPicker::rebuildAllRecipientsList()
{
mAllRecipients->clear();
- QMap<int,RecipientsCollection *>::ConstIterator it;
+ TQMap<int,RecipientsCollection *>::ConstIterator it;
for( it = mCollectionMap.begin(); it != mCollectionMap.end(); ++it ) {
// skip self
if ( (*it) == mAllRecipients )
@@ -728,7 +728,7 @@ void RecipientsPicker::updateList()
if ( selItem ) {
(*it)->setRecipientType( selItem->recipientType() );
} else {
- (*it)->setRecipientType( QString() );
+ (*it)->setRecipientType( TQString() );
}
}
new RecipientViewItem( *it, mRecipientList );
@@ -752,7 +752,7 @@ void RecipientsPicker::slotBccClicked()
pick( Recipient::Bcc );
}
-void RecipientsPicker::slotPicked( QListViewItem *viewItem )
+void RecipientsPicker::slotPicked( TQListViewItem *viewItem )
{
RecipientViewItem *item = static_cast<RecipientViewItem *>( viewItem );
if ( item ) {
@@ -772,8 +772,8 @@ void RecipientsPicker::pick( Recipient::Type type )
kdDebug() << "RecipientsPicker::pick " << int( type ) << endl;
int count = 0;
- QListViewItemIterator it( mRecipientList ,
- QListViewItemIterator::Visible | QListViewItemIterator::Selected );
+ TQListViewItemIterator it( mRecipientList ,
+ TQListViewItemIterator::Visible | TQListViewItemIterator::Selected );
for ( ; it.current(); ++it )
++count;
@@ -787,8 +787,8 @@ void RecipientsPicker::pick( Recipient::Type type )
return;
}
- it = QListViewItemIterator( mRecipientList ,
- QListViewItemIterator::Visible | QListViewItemIterator::Selected );
+ it = TQListViewItemIterator( mRecipientList ,
+ TQListViewItemIterator::Visible | TQListViewItemIterator::Selected );
for ( ; it.current(); ++it ) {
RecipientViewItem *item = static_cast<RecipientViewItem *>( it.current() );
if ( item ) {
@@ -801,18 +801,18 @@ void RecipientsPicker::pick( Recipient::Type type )
close();
}
-void RecipientsPicker::keyPressEvent( QKeyEvent *ev )
+void RecipientsPicker::keyPressEvent( TQKeyEvent *ev )
{
if ( ev->key() == Key_Escape ) close();
- QWidget::keyPressEvent( ev );
+ TQWidget::keyPressEvent( ev );
}
void RecipientsPicker::readConfig()
{
KConfig *cfg = KGlobal::config();
cfg->setGroup( "RecipientsPicker" );
- QSize size = cfg->readSizeEntry( "Size" );
+ TQSize size = cfg->readSizeEntry( "Size" );
if ( !size.isEmpty() ) {
resize( size );
}
@@ -838,15 +838,15 @@ void RecipientsPicker::setFocusList()
void RecipientsPicker::resetSearch()
{
- mSearchLine->setText( QString::null );
+ mSearchLine->setText( TQString::null );
}
void RecipientsPicker::slotSearchLDAP()
{
if ( !mLdapSearchDialog ) {
mLdapSearchDialog = new KPIM::LDAPSearchDialog( this );
- connect( mLdapSearchDialog, SIGNAL( addresseesAdded() ),
- SLOT(ldapSearchResult() ) );
+ connect( mLdapSearchDialog, TQT_SIGNAL( addresseesAdded() ),
+ TQT_SLOT(ldapSearchResult() ) );
}
mLdapSearchDialog->setSearchText( mSearchLine->text() );
mLdapSearchDialog->show();
@@ -855,12 +855,12 @@ void RecipientsPicker::slotSearchLDAP()
void RecipientsPicker::ldapSearchResult()
{
- QStringList emails = QStringList::split(',', mLdapSearchDialog->selectedEMails() );
- QStringList::iterator it( emails.begin() );
- QStringList::iterator end( emails.end() );
+ TQStringList emails = TQStringList::split(',', mLdapSearchDialog->selectedEMails() );
+ TQStringList::iterator it( emails.begin() );
+ TQStringList::iterator end( emails.end() );
for ( ; it != end; ++it ){
- QString name;
- QString email;
+ TQString name;
+ TQString email;
KPIM::getNameAndMail( (*it), name, email );
KABC::Addressee ad;
ad.setNameFromString( name );
diff --git a/kmail/recipientspicker.h b/kmail/recipientspicker.h
index 4f8b82bb8..82e1d0bf7 100644
--- a/kmail/recipientspicker.h
+++ b/kmail/recipientspicker.h
@@ -30,9 +30,9 @@
#include <kabc/addressee.h>
#include <kabc/stdaddressbook.h>
-#include <qwidget.h>
-#include <qdialog.h>
-#include <qtooltip.h>
+#include <tqwidget.h>
+#include <tqdialog.h>
+#include <tqtooltip.h>
class QComboBox;
@@ -52,7 +52,7 @@ class LDAPSearchDialog;
class RecipientItem
{
public:
- typedef QValueList<RecipientItem *> List;
+ typedef TQValueList<RecipientItem *> List;
#ifdef KDEPIM_NEW_DISTRLISTS
RecipientItem( KABC::AddressBook *ab );
@@ -63,44 +63,44 @@ class RecipientItem
void setDistributionList( KABC::DistributionList * );
KABC::DistributionList * distributionList();
#endif
- void setAddressee( const KABC::Addressee &, const QString &email );
+ void setAddressee( const KABC::Addressee &, const TQString &email );
- void setRecipientType( const QString &type );
- QString recipientType() const;
+ void setRecipientType( const TQString &type );
+ TQString recipientType() const;
- QString recipient() const;
+ TQString recipient() const;
- QPixmap icon() const;
- QString name() const;
- QString email() const;
+ TQPixmap icon() const;
+ TQString name() const;
+ TQString email() const;
- QString key() const { return mKey; }
+ TQString key() const { return mKey; }
- QString tooltip() const;
+ TQString tooltip() const;
private:
#ifdef KDEPIM_NEW_DISTRLISTS
- QString createTooltip( KPIM::DistributionList & ) const;
+ TQString createTooltip( KPIM::DistributionList & ) const;
#else
- QString createTooltip( KABC::DistributionList * ) const;
+ TQString createTooltip( KABC::DistributionList * ) const;
#endif
KABC::Addressee mAddressee;
- QString mName;
- QString mEmail;
- QString mRecipient;
+ TQString mName;
+ TQString mEmail;
+ TQString mRecipient;
#ifdef KDEPIM_NEW_DISTRLISTS
KPIM::DistributionList mDistributionList;
KABC::AddressBook *mAddressBook;
#else
KABC::DistributionList *mDistributionList;
#endif
- QString mType;
- QString mTooltip;
+ TQString mType;
+ TQString mTooltip;
- QPixmap mIcon;
+ TQPixmap mIcon;
- QString mKey;
+ TQString mKey;
};
class RecipientViewItem : public KListViewItem
@@ -117,10 +117,10 @@ class RecipientViewItem : public KListViewItem
class RecipientsListToolTip : public QToolTip
{
public:
- RecipientsListToolTip( QWidget *parent, KListView * );
+ RecipientsListToolTip( TQWidget *parent, KListView * );
protected:
- void maybeTip( const QPoint &pos );
+ void maybeTip( const TQPoint &pos );
private:
KListView *mListView;
@@ -129,14 +129,14 @@ class RecipientsListToolTip : public QToolTip
class RecipientsCollection
{
public:
- RecipientsCollection( const QString & );
+ RecipientsCollection( const TQString & );
~RecipientsCollection();
void setReferenceContainer( bool );
bool isReferenceContainer() const;
- void setTitle( const QString & );
- QString title() const;
+ void setTitle( const TQString & );
+ TQString title() const;
void addItem( RecipientItem * );
@@ -149,28 +149,28 @@ class RecipientsCollection
void deleteAll();
- QString id() const;
+ TQString id() const;
private:
// flag to indicate if this collection contains just references
// or should manage memory (de)allocation as well.
bool mIsReferenceContainer;
- QString mId;
- QString mTitle;
- QMap<QString, RecipientItem *> mKeyMap;
+ TQString mId;
+ TQString mTitle;
+ TQMap<TQString, RecipientItem *> mKeyMap;
};
class SearchLine : public KListViewSearchLine
{
Q_OBJECT
public:
- SearchLine( QWidget *parent, KListView *listView );
+ SearchLine( TQWidget *parent, KListView *listView );
signals:
void downPressed();
protected:
- void keyPressEvent( QKeyEvent * );
+ void keyPressEvent( TQKeyEvent * );
};
using namespace KABC;
@@ -179,7 +179,7 @@ class RecipientsPicker : public QDialog
{
Q_OBJECT
public:
- RecipientsPicker( QWidget *parent );
+ RecipientsPicker( TQWidget *parent );
~RecipientsPicker();
void setRecipients( const Recipient::List & );
@@ -196,14 +196,14 @@ class RecipientsPicker : public QDialog
void insertRecentAddresses();
void insertCollection( RecipientsCollection *coll );
- void keyPressEvent( QKeyEvent *ev );
+ void keyPressEvent( TQKeyEvent *ev );
void readConfig();
void writeConfig();
void pick( Recipient::Type );
- void setDefaultButton( QPushButton *button );
+ void setDefaultButton( TQPushButton *button );
void rebuildAllRecipientsList();
@@ -212,7 +212,7 @@ class RecipientsPicker : public QDialog
void slotToClicked();
void slotCcClicked();
void slotBccClicked();
- void slotPicked( QListViewItem * );
+ void slotPicked( TQListViewItem * );
void slotPicked();
void setFocusList();
void resetSearch();
@@ -222,18 +222,18 @@ class RecipientsPicker : public QDialog
private:
KABC::StdAddressBook *mAddressBook;
- QComboBox *mCollectionCombo;
+ TQComboBox *mCollectionCombo;
KListView *mRecipientList;
KListViewSearchLine *mSearchLine;
- QPushButton *mToButton;
- QPushButton *mCcButton;
- QPushButton *mBccButton;
+ TQPushButton *mToButton;
+ TQPushButton *mCcButton;
+ TQPushButton *mBccButton;
- QPushButton *mSearchLDAPButton;
+ TQPushButton *mSearchLDAPButton;
KPIM::LDAPSearchDialog *mLdapSearchDialog;
- QMap<int,RecipientsCollection *> mCollectionMap;
+ TQMap<int,RecipientsCollection *> mCollectionMap;
RecipientsCollection *mAllRecipients;
RecipientsCollection *mDistributionLists;
RecipientsCollection *mSelectedRecipients;
diff --git a/kmail/redirectdialog.cpp b/kmail/redirectdialog.cpp
index b81a04827..150e6a5d5 100644
--- a/kmail/redirectdialog.cpp
+++ b/kmail/redirectdialog.cpp
@@ -42,39 +42,39 @@ using KRecentAddress::RecentAddresses;
#include <klocale.h>
#include <kmessagebox.h>
-#include <qvbox.h>
-#include <qhbox.h>
-#include <qtooltip.h>
-#include <qwhatsthis.h>
-#include <qlabel.h>
-#include <qpushbutton.h>
-#include <qstringlist.h>
+#include <tqvbox.h>
+#include <tqhbox.h>
+#include <tqtooltip.h>
+#include <tqwhatsthis.h>
+#include <tqlabel.h>
+#include <tqpushbutton.h>
+#include <tqstringlist.h>
using namespace KMail;
-RedirectDialog::RedirectDialog( QWidget *parent, const char *name,
+RedirectDialog::RedirectDialog( TQWidget *parent, const char *name,
bool modal, bool immediate )
: KDialogBase( parent, name, modal, i18n( "Redirect Message" ),
User1|User2|Cancel, ( immediate ? User1 : User2 ), false )
{
- QVBox *vbox = makeVBoxMainWidget();
- mLabelTo = new QLabel( i18n( "Select the recipient &addresses "
+ TQVBox *vbox = makeVBoxMainWidget();
+ mLabelTo = new TQLabel( i18n( "Select the recipient &addresses "
"to redirect to:" ), vbox );
- QHBox *hbox = new QHBox( vbox );
+ TQHBox *hbox = new TQHBox( vbox );
hbox->setSpacing(4);
mEditTo = new KMLineEdit( true, hbox, "toLine" );
mEditTo->setMinimumWidth( 300 );
- mBtnTo = new QPushButton( QString::null, hbox, "toBtn" );
+ mBtnTo = new TQPushButton( TQString::null, hbox, "toBtn" );
mBtnTo->setPixmap( BarIcon( "contents", KIcon::SizeSmall ) );
mBtnTo->setMinimumSize( mBtnTo->sizeHint() * 1.2 );
- QToolTip::add( mBtnTo, i18n("Use the Address-Selection Dialog") );
- QWhatsThis::add( mBtnTo, i18n("This button opens a separate dialog "
+ TQToolTip::add( mBtnTo, i18n("Use the Address-Selection Dialog") );
+ TQWhatsThis::add( mBtnTo, i18n("This button opens a separate dialog "
"where you can select recipients out "
"of all available addresses." ) );
- connect( mBtnTo, SIGNAL(clicked()), SLOT(slotAddrBook()) );
+ connect( mBtnTo, TQT_SIGNAL(clicked()), TQT_SLOT(slotAddrBook()) );
mLabelTo->setBuddy( mBtnTo );
mEditTo->setFocus();
@@ -118,7 +118,7 @@ void RedirectDialog::slotAddrBook()
mResentTo = mEditTo->text();
if ( !mResentTo.isEmpty() ) {
- QStringList lst = KPIM::splitEmailAddrList( mResentTo );
+ TQStringList lst = KPIM::splitEmailAddrList( mResentTo );
dlg.setSelectedTo( lst );
}
@@ -130,7 +130,7 @@ void RedirectDialog::slotAddrBook()
dlg.setShowCC( false );
dlg.setShowBCC( false );
- if (dlg.exec()==QDialog::Rejected) return;
+ if (dlg.exec()==TQDialog::Rejected) return;
mEditTo->setText( dlg.to().join(", ") );
mEditTo->setEdited( true );
diff --git a/kmail/redirectdialog.h b/kmail/redirectdialog.h
index de2472d4c..4b0b7b347 100644
--- a/kmail/redirectdialog.h
+++ b/kmail/redirectdialog.h
@@ -59,11 +59,11 @@ namespace KMail {
@param immediate True, if the Send Now button should be default
or false if the Queue button should be default
*/
- RedirectDialog( QWidget *parent=0, const char *name=0,
+ RedirectDialog( TQWidget *parent=0, const char *name=0,
bool modal=false, bool immediate=true );
/** Return the addresses for the redirection */
- QString to() { return mResentTo; };
+ TQString to() { return mResentTo; };
/** Returns the send mode */
bool sendImmediate() { return mImmediate; };
@@ -80,10 +80,10 @@ namespace KMail {
void slotUser2();
private:
- QLabel *mLabelTo;
+ TQLabel *mLabelTo;
KMLineEdit *mEditTo;
- QPushButton *mBtnTo;
- QString mResentTo;
+ TQPushButton *mBtnTo;
+ TQString mResentTo;
bool mImmediate;
};
diff --git a/kmail/regexplineedit.cpp b/kmail/regexplineedit.cpp
index d629d401a..81748c220 100644
--- a/kmail/regexplineedit.cpp
+++ b/kmail/regexplineedit.cpp
@@ -42,15 +42,15 @@
#include <kregexpeditorinterface.h>
#include <kdialog.h>
-#include <qlayout.h>
-#include <qstring.h>
-#include <qpushbutton.h>
-#include <qdialog.h>
+#include <tqlayout.h>
+#include <tqstring.h>
+#include <tqpushbutton.h>
+#include <tqdialog.h>
namespace KMail {
- RegExpLineEdit::RegExpLineEdit( QWidget *parent, const char *name )
- : QWidget( parent, name ),
+ RegExpLineEdit::RegExpLineEdit( TQWidget *parent, const char *name )
+ : TQWidget( parent, name ),
mLineEdit( 0 ),
mRegExpEditButton( 0 ),
mRegExpEditDialog( 0 )
@@ -58,9 +58,9 @@ namespace KMail {
initWidget();
}
- RegExpLineEdit::RegExpLineEdit( const QString &str, QWidget *parent,
+ RegExpLineEdit::RegExpLineEdit( const TQString &str, TQWidget *parent,
const char *name )
- : QWidget( parent, name ),
+ : TQWidget( parent, name ),
mLineEdit( 0 ),
mRegExpEditButton( 0 ),
mRegExpEditDialog( 0 )
@@ -68,26 +68,26 @@ namespace KMail {
initWidget( str );
}
- void RegExpLineEdit::initWidget( const QString &str )
+ void RegExpLineEdit::initWidget( const TQString &str )
{
- QHBoxLayout * hlay = new QHBoxLayout( this, 0, KDialog::spacingHint() );
+ TQHBoxLayout * hlay = new TQHBoxLayout( this, 0, KDialog::spacingHint() );
mLineEdit = new KLineEdit( str, this );
setFocusProxy( mLineEdit );
hlay->addWidget( mLineEdit );
- connect( mLineEdit, SIGNAL( textChanged( const QString & ) ),
- this, SIGNAL( textChanged( const QString & ) ) );
+ connect( mLineEdit, TQT_SIGNAL( textChanged( const TQString & ) ),
+ this, TQT_SIGNAL( textChanged( const TQString & ) ) );
if( !KTrader::self()->query("KRegExpEditor/KRegExpEditor").isEmpty() ) {
- mRegExpEditButton = new QPushButton( i18n("Edit..."), this,
+ mRegExpEditButton = new TQPushButton( i18n("Edit..."), this,
"mRegExpEditButton" );
- mRegExpEditButton->setSizePolicy( QSizePolicy::Minimum,
- QSizePolicy::Fixed );
+ mRegExpEditButton->setSizePolicy( TQSizePolicy::Minimum,
+ TQSizePolicy::Fixed );
hlay->addWidget( mRegExpEditButton );
- connect( mRegExpEditButton, SIGNAL( clicked() ),
- this, SLOT( slotEditRegExp() ) );
+ connect( mRegExpEditButton, TQT_SIGNAL( clicked() ),
+ this, TQT_SLOT( slotEditRegExp() ) );
}
}
@@ -96,12 +96,12 @@ namespace KMail {
mLineEdit->clear();
}
- QString RegExpLineEdit::text() const
+ TQString RegExpLineEdit::text() const
{
return mLineEdit->text();
}
- void RegExpLineEdit::setText( const QString & str )
+ void RegExpLineEdit::setText( const TQString & str )
{
mLineEdit->setText( str );
}
@@ -120,13 +120,13 @@ namespace KMail {
void RegExpLineEdit::slotEditRegExp()
{
if ( !mRegExpEditDialog )
- mRegExpEditDialog = KParts::ComponentFactory::createInstanceFromQuery<QDialog>( "KRegExpEditor/KRegExpEditor", QString::null, this );
+ mRegExpEditDialog = KParts::ComponentFactory::createInstanceFromQuery<TQDialog>( "KRegExpEditor/KRegExpEditor", TQString::null, this );
KRegExpEditorInterface *iface =
static_cast<KRegExpEditorInterface *>( mRegExpEditDialog->qt_cast( "KRegExpEditorInterface" ) );
if( iface ) {
iface->setRegExp( mLineEdit->text() );
- if( mRegExpEditDialog->exec() == QDialog::Accepted )
+ if( mRegExpEditDialog->exec() == TQDialog::Accepted )
mLineEdit->setText( iface->regExp() );
}
}
diff --git a/kmail/regexplineedit.h b/kmail/regexplineedit.h
index 23332fedc..0eeebb315 100644
--- a/kmail/regexplineedit.h
+++ b/kmail/regexplineedit.h
@@ -33,8 +33,8 @@
#ifndef __KMAIL_REGEXPLINEEDIT_H__
#define __KMAIL_REGEXPLINEEDIT_H__
-#include <qobject.h>
-#include <qwidget.h>
+#include <tqobject.h>
+#include <tqwidget.h>
class KLineEdit;
@@ -49,29 +49,29 @@ namespace KMail {
Q_OBJECT
public:
- RegExpLineEdit( const QString &str, QWidget *parent = 0,
+ RegExpLineEdit( const TQString &str, TQWidget *parent = 0,
const char *name = 0 );
- RegExpLineEdit( QWidget *parent = 0, const char *name = 0 );
+ RegExpLineEdit( TQWidget *parent = 0, const char *name = 0 );
- QString text() const;
+ TQString text() const;
public slots:
void clear();
- void setText( const QString & );
+ void setText( const TQString & );
void showEditButton( bool );
signals:
- void textChanged( const QString & );
+ void textChanged( const TQString & );
protected slots:
void slotEditRegExp();
private:
- void initWidget( const QString & = QString::null );
+ void initWidget( const TQString & = TQString::null );
KLineEdit * mLineEdit;
- QPushButton * mRegExpEditButton;
- QDialog * mRegExpEditDialog;
+ TQPushButton * mRegExpEditButton;
+ TQDialog * mRegExpEditDialog;
};
} // namespace KMail
diff --git a/kmail/renamejob.cpp b/kmail/renamejob.cpp
index 79b0793e1..09966cf9d 100644
--- a/kmail/renamejob.cpp
+++ b/kmail/renamejob.cpp
@@ -47,13 +47,13 @@
#include <klocale.h>
#include <config.h>
-#include <qmap.h>
+#include <tqmap.h>
using namespace KMail;
-template <typename T> static QStringList imapPaths( FolderStorage* storage )
+template <typename T> static TQStringList imapPaths( FolderStorage* storage )
{
- QStringList rv;
+ TQStringList rv;
rv.append( static_cast<T>( storage )->imapPath() );
KMFolderDir* dir = storage->folder()->child();
if ( dir ) {
@@ -68,7 +68,7 @@ template <typename T> static QStringList imapPaths( FolderStorage* storage )
return rv;
}
-RenameJob::RenameJob( FolderStorage* storage, const QString& newName,
+RenameJob::RenameJob( FolderStorage* storage, const TQString& newName,
KMFolderDir* newParent )
: FolderJob( 0, tOther, (storage ? storage->folder() : 0) ),
mStorage( storage ), mNewParent( newParent ),
@@ -110,7 +110,7 @@ void RenameJob::execute()
}
// copy to the new folder
mCopyFolderJob = new CopyFolderJob( mStorage, mNewParent );
- connect( mCopyFolderJob, SIGNAL(folderCopyComplete(bool)), SLOT(folderCopyComplete(bool)) );
+ connect( mCopyFolderJob, TQT_SIGNAL(folderCopyComplete(bool)), TQT_SLOT(folderCopyComplete(bool)) );
mCopyFolderJob->execute();
} else
@@ -149,8 +149,8 @@ void RenameJob::execute()
ImapAccountBase::jobData jd( src.url() );
account->insertJob( job, jd );
KIO::Scheduler::assignJobToSlave( account->slave(), job );
- connect( job, SIGNAL(result(KIO::Job*)),
- SLOT(slotRenameResult(KIO::Job*)) );
+ connect( job, TQT_SIGNAL(result(KIO::Job*)),
+ TQT_SLOT(slotRenameResult(KIO::Job*)) );
}
}
@@ -207,11 +207,11 @@ void RenameJob::folderCopyComplete(bool success)
kdDebug(5006) << "deleting old folder" << endl;
// move complete or not necessary
// save our settings
- QString oldconfig = "Folder-" + mStorage->folder()->idString();
+ TQString oldconfig = "Folder-" + mStorage->folder()->idString();
KConfig* config = KMKernel::config();
- QMap<QString, QString> entries = config->entryMap( oldconfig );
+ TQMap<TQString, TQString> entries = config->entryMap( oldconfig );
KConfigGroupSaver saver(config, "Folder-" + mNewFolder->idString());
- for ( QMap<QString, QString>::Iterator it = entries.begin();
+ for ( TQMap<TQString, TQString>::Iterator it = entries.begin();
it != entries.end(); ++it )
{
if ( it.key() == "Id" || it.key() == "ImapPath" ||
@@ -235,7 +235,7 @@ void RenameJob::folderCopyComplete(bool success)
// tell the account (see KMFolderCachedImap::listDirectory2)
KMAcctCachedImap* acct = static_cast<KMFolderCachedImap*>(mStorage)->account();
if ( acct ) {
- for ( QStringList::ConstIterator it = mOldImapPaths.constBegin(); it != mOldImapPaths.constEnd(); ++it )
+ for ( TQStringList::ConstIterator it = mOldImapPaths.constBegin(); it != mOldImapPaths.constEnd(); ++it )
acct->addDeletedFolder( *it );
}
kmkernel->dimapFolderMgr()->remove( mStorage->folder() );
diff --git a/kmail/renamejob.h b/kmail/renamejob.h
index 3c4c1543c..78102c3a6 100644
--- a/kmail/renamejob.h
+++ b/kmail/renamejob.h
@@ -58,7 +58,7 @@ public:
* @param newName the new name of the folder
* @param newParent the new parent if the folder should be moved, else 0
*/
- RenameJob( FolderStorage* storage, const QString& newName,
+ RenameJob( FolderStorage* storage, const TQString& newName,
KMFolderDir* newParent = 0 );
virtual ~RenameJob();
@@ -74,17 +74,17 @@ protected slots:
signals:
/** Emitted when the job is done, check the success bool */
- void renameDone( QString newName, bool success );
+ void renameDone( TQString newName, bool success );
protected:
FolderStorage* mStorage;
FolderStorage* mStorageTempOpened;
KMFolderDir* mNewParent;
- QString mNewName;
- QString mNewImapPath;
- QString mOldName;
- QString mOldImapPath;
- QStringList mOldImapPaths;
+ TQString mNewName;
+ TQString mNewImapPath;
+ TQString mOldName;
+ TQString mOldImapPath;
+ TQStringList mOldImapPaths;
KMFolder* mNewFolder;
CopyFolderJob *mCopyFolderJob;
};
diff --git a/kmail/rulewidgethandlermanager.cpp b/kmail/rulewidgethandlermanager.cpp
index c965db35b..016b8a577 100644
--- a/kmail/rulewidgethandlermanager.cpp
+++ b/kmail/rulewidgethandlermanager.cpp
@@ -42,11 +42,11 @@
#include <kdebug.h>
#include <kiconloader.h>
-#include <qwidgetstack.h>
-#include <qstring.h>
-#include <qcstring.h>
-#include <qobject.h>
-#include <qobjectlist.h>
+#include <tqwidgetstack.h>
+#include <tqstring.h>
+#include <tqcstring.h>
+#include <tqobject.h>
+#include <tqobjectlist.h>
#include <assert.h>
@@ -62,33 +62,33 @@ namespace {
TextRuleWidgetHandler() : KMail::RuleWidgetHandler() {}
~TextRuleWidgetHandler() {}
- QWidget * createFunctionWidget( int number,
- QWidgetStack *functionStack,
- const QObject *receiver ) const;
- QWidget * createValueWidget( int number,
- QWidgetStack *valueStack,
- const QObject *receiver ) const;
- KMSearchRule::Function function( const QCString & field,
- const QWidgetStack *functionStack ) const;
- QString value( const QCString & field,
- const QWidgetStack *functionStack,
- const QWidgetStack *valueStack ) const;
- QString prettyValue( const QCString & field,
- const QWidgetStack *functionStack,
- const QWidgetStack *valueStack ) const;
- bool handlesField( const QCString & field ) const;
- void reset( QWidgetStack *functionStack,
- QWidgetStack *valueStack ) const;
- bool setRule( QWidgetStack *functionStack,
- QWidgetStack *valueStack,
+ TQWidget * createFunctionWidget( int number,
+ TQWidgetStack *functionStack,
+ const TQObject *receiver ) const;
+ TQWidget * createValueWidget( int number,
+ TQWidgetStack *valueStack,
+ const TQObject *receiver ) const;
+ KMSearchRule::Function function( const TQCString & field,
+ const TQWidgetStack *functionStack ) const;
+ TQString value( const TQCString & field,
+ const TQWidgetStack *functionStack,
+ const TQWidgetStack *valueStack ) const;
+ TQString prettyValue( const TQCString & field,
+ const TQWidgetStack *functionStack,
+ const TQWidgetStack *valueStack ) const;
+ bool handlesField( const TQCString & field ) const;
+ void reset( TQWidgetStack *functionStack,
+ TQWidgetStack *valueStack ) const;
+ bool setRule( TQWidgetStack *functionStack,
+ TQWidgetStack *valueStack,
const KMSearchRule *rule ) const;
- bool update( const QCString & field,
- QWidgetStack *functionStack,
- QWidgetStack *valueStack ) const;
+ bool update( const TQCString & field,
+ TQWidgetStack *functionStack,
+ TQWidgetStack *valueStack ) const;
private:
- KMSearchRule::Function currentFunction( const QWidgetStack *functionStack ) const;
- QString currentValue( const QWidgetStack *valueStack,
+ KMSearchRule::Function currentFunction( const TQWidgetStack *functionStack ) const;
+ TQString currentValue( const TQWidgetStack *valueStack,
KMSearchRule::Function func ) const;
};
@@ -97,33 +97,33 @@ namespace {
MessageRuleWidgetHandler() : KMail::RuleWidgetHandler() {}
~MessageRuleWidgetHandler() {}
- QWidget * createFunctionWidget( int number,
- QWidgetStack *functionStack,
- const QObject *receiver ) const;
- QWidget * createValueWidget( int number,
- QWidgetStack *valueStack,
- const QObject *receiver ) const;
- KMSearchRule::Function function( const QCString & field,
- const QWidgetStack *functionStack ) const;
- QString value( const QCString & field,
- const QWidgetStack *functionStack,
- const QWidgetStack *valueStack ) const;
- QString prettyValue( const QCString & field,
- const QWidgetStack *functionStack,
- const QWidgetStack *valueStack ) const;
- bool handlesField( const QCString & field ) const;
- void reset( QWidgetStack *functionStack,
- QWidgetStack *valueStack ) const;
- bool setRule( QWidgetStack *functionStack,
- QWidgetStack *valueStack,
+ TQWidget * createFunctionWidget( int number,
+ TQWidgetStack *functionStack,
+ const TQObject *receiver ) const;
+ TQWidget * createValueWidget( int number,
+ TQWidgetStack *valueStack,
+ const TQObject *receiver ) const;
+ KMSearchRule::Function function( const TQCString & field,
+ const TQWidgetStack *functionStack ) const;
+ TQString value( const TQCString & field,
+ const TQWidgetStack *functionStack,
+ const TQWidgetStack *valueStack ) const;
+ TQString prettyValue( const TQCString & field,
+ const TQWidgetStack *functionStack,
+ const TQWidgetStack *valueStack ) const;
+ bool handlesField( const TQCString & field ) const;
+ void reset( TQWidgetStack *functionStack,
+ TQWidgetStack *valueStack ) const;
+ bool setRule( TQWidgetStack *functionStack,
+ TQWidgetStack *valueStack,
const KMSearchRule *rule ) const;
- bool update( const QCString & field,
- QWidgetStack *functionStack,
- QWidgetStack *valueStack ) const;
+ bool update( const TQCString & field,
+ TQWidgetStack *functionStack,
+ TQWidgetStack *valueStack ) const;
private:
- KMSearchRule::Function currentFunction( const QWidgetStack *functionStack ) const;
- QString currentValue( const QWidgetStack *valueStack,
+ KMSearchRule::Function currentFunction( const TQWidgetStack *functionStack ) const;
+ TQString currentValue( const TQWidgetStack *valueStack,
KMSearchRule::Function func ) const;
};
@@ -133,33 +133,33 @@ namespace {
StatusRuleWidgetHandler() : KMail::RuleWidgetHandler() {}
~StatusRuleWidgetHandler() {}
- QWidget * createFunctionWidget( int number,
- QWidgetStack *functionStack,
- const QObject *receiver ) const;
- QWidget * createValueWidget( int number,
- QWidgetStack *valueStack,
- const QObject *receiver ) const;
- KMSearchRule::Function function( const QCString & field,
- const QWidgetStack *functionStack ) const;
- QString value( const QCString & field,
- const QWidgetStack *functionStack,
- const QWidgetStack *valueStack ) const;
- QString prettyValue( const QCString & field,
- const QWidgetStack *functionStack,
- const QWidgetStack *valueStack ) const;
- bool handlesField( const QCString & field ) const;
- void reset( QWidgetStack *functionStack,
- QWidgetStack *valueStack ) const;
- bool setRule( QWidgetStack *functionStack,
- QWidgetStack *valueStack,
+ TQWidget * createFunctionWidget( int number,
+ TQWidgetStack *functionStack,
+ const TQObject *receiver ) const;
+ TQWidget * createValueWidget( int number,
+ TQWidgetStack *valueStack,
+ const TQObject *receiver ) const;
+ KMSearchRule::Function function( const TQCString & field,
+ const TQWidgetStack *functionStack ) const;
+ TQString value( const TQCString & field,
+ const TQWidgetStack *functionStack,
+ const TQWidgetStack *valueStack ) const;
+ TQString prettyValue( const TQCString & field,
+ const TQWidgetStack *functionStack,
+ const TQWidgetStack *valueStack ) const;
+ bool handlesField( const TQCString & field ) const;
+ void reset( TQWidgetStack *functionStack,
+ TQWidgetStack *valueStack ) const;
+ bool setRule( TQWidgetStack *functionStack,
+ TQWidgetStack *valueStack,
const KMSearchRule *rule ) const;
- bool update( const QCString & field,
- QWidgetStack *functionStack,
- QWidgetStack *valueStack ) const;
+ bool update( const TQCString & field,
+ TQWidgetStack *functionStack,
+ TQWidgetStack *valueStack ) const;
private:
- KMSearchRule::Function currentFunction( const QWidgetStack *functionStack ) const;
- int currentStatusValue( const QWidgetStack *valueStack ) const;
+ KMSearchRule::Function currentFunction( const TQWidgetStack *functionStack ) const;
+ int currentStatusValue( const TQWidgetStack *valueStack ) const;
};
class NumericRuleWidgetHandler : public KMail::RuleWidgetHandler {
@@ -167,33 +167,33 @@ namespace {
NumericRuleWidgetHandler() : KMail::RuleWidgetHandler() {}
~NumericRuleWidgetHandler() {}
- QWidget * createFunctionWidget( int number,
- QWidgetStack *functionStack,
- const QObject *receiver ) const;
- QWidget * createValueWidget( int number,
- QWidgetStack *valueStack,
- const QObject *receiver ) const;
- KMSearchRule::Function function( const QCString & field,
- const QWidgetStack *functionStack ) const;
- QString value( const QCString & field,
- const QWidgetStack *functionStack,
- const QWidgetStack *valueStack ) const;
- QString prettyValue( const QCString & field,
- const QWidgetStack *functionStack,
- const QWidgetStack *valueStack ) const;
- bool handlesField( const QCString & field ) const;
- void reset( QWidgetStack *functionStack,
- QWidgetStack *valueStack ) const;
- bool setRule( QWidgetStack *functionStack,
- QWidgetStack *valueStack,
+ TQWidget * createFunctionWidget( int number,
+ TQWidgetStack *functionStack,
+ const TQObject *receiver ) const;
+ TQWidget * createValueWidget( int number,
+ TQWidgetStack *valueStack,
+ const TQObject *receiver ) const;
+ KMSearchRule::Function function( const TQCString & field,
+ const TQWidgetStack *functionStack ) const;
+ TQString value( const TQCString & field,
+ const TQWidgetStack *functionStack,
+ const TQWidgetStack *valueStack ) const;
+ TQString prettyValue( const TQCString & field,
+ const TQWidgetStack *functionStack,
+ const TQWidgetStack *valueStack ) const;
+ bool handlesField( const TQCString & field ) const;
+ void reset( TQWidgetStack *functionStack,
+ TQWidgetStack *valueStack ) const;
+ bool setRule( TQWidgetStack *functionStack,
+ TQWidgetStack *valueStack,
const KMSearchRule *rule ) const;
- bool update( const QCString & field,
- QWidgetStack *functionStack,
- QWidgetStack *valueStack ) const;
+ bool update( const TQCString & field,
+ TQWidgetStack *functionStack,
+ TQWidgetStack *valueStack ) const;
private:
- KMSearchRule::Function currentFunction( const QWidgetStack *functionStack ) const;
- QString currentValue( const QWidgetStack *valueStack ) const;
+ KMSearchRule::Function currentFunction( const TQWidgetStack *functionStack ) const;
+ TQString currentValue( const TQWidgetStack *valueStack ) const;
};
}
@@ -231,9 +231,9 @@ namespace {
/** Returns the number of immediate children of parent with the given object
name. Used by RuleWidgetHandlerManager::createWidgets().
*/
- int childCount( const QObject *parent, const char *objName )
+ int childCount( const TQObject *parent, const char *objName )
{
- QObjectList *list = parent->queryList( 0, objName, false, false );
+ TQObjectList *list = parent->queryList( 0, objName, false, false );
if ( !list )
return 0;
const int count = list->count();
@@ -242,12 +242,12 @@ namespace {
}
}
-void KMail::RuleWidgetHandlerManager::createWidgets( QWidgetStack *functionStack,
- QWidgetStack *valueStack,
- const QObject *receiver ) const
+void KMail::RuleWidgetHandlerManager::createWidgets( TQWidgetStack *functionStack,
+ TQWidgetStack *valueStack,
+ const TQObject *receiver ) const
{
for ( const_iterator it = mHandlers.begin(); it != mHandlers.end(); ++it ) {
- QWidget *w = 0;
+ TQWidget *w = 0;
for ( int i = 0;
( w = (*it)->createFunctionWidget( i, functionStack, receiver ) );
++i ) {
@@ -281,8 +281,8 @@ void KMail::RuleWidgetHandlerManager::createWidgets( QWidgetStack *functionStack
}
}
-KMSearchRule::Function KMail::RuleWidgetHandlerManager::function( const QCString& field,
- const QWidgetStack *functionStack ) const
+KMSearchRule::Function KMail::RuleWidgetHandlerManager::function( const TQCString& field,
+ const TQWidgetStack *functionStack ) const
{
for ( const_iterator it = mHandlers.begin(); it != mHandlers.end(); ++it ) {
const KMSearchRule::Function func = (*it)->function( field,
@@ -293,32 +293,32 @@ KMSearchRule::Function KMail::RuleWidgetHandlerManager::function( const QCString
return KMSearchRule::FuncNone;
}
-QString KMail::RuleWidgetHandlerManager::value( const QCString& field,
- const QWidgetStack *functionStack,
- const QWidgetStack *valueStack ) const
+TQString KMail::RuleWidgetHandlerManager::value( const TQCString& field,
+ const TQWidgetStack *functionStack,
+ const TQWidgetStack *valueStack ) const
{
for ( const_iterator it = mHandlers.begin(); it != mHandlers.end(); ++it ) {
- const QString val = (*it)->value( field, functionStack, valueStack );
+ const TQString val = (*it)->value( field, functionStack, valueStack );
if ( !val.isEmpty() )
return val;
}
- return QString::null;
+ return TQString::null;
}
-QString KMail::RuleWidgetHandlerManager::prettyValue( const QCString& field,
- const QWidgetStack *functionStack,
- const QWidgetStack *valueStack ) const
+TQString KMail::RuleWidgetHandlerManager::prettyValue( const TQCString& field,
+ const TQWidgetStack *functionStack,
+ const TQWidgetStack *valueStack ) const
{
for ( const_iterator it = mHandlers.begin(); it != mHandlers.end(); ++it ) {
- const QString val = (*it)->prettyValue( field, functionStack, valueStack );
+ const TQString val = (*it)->prettyValue( field, functionStack, valueStack );
if ( !val.isEmpty() )
return val;
}
- return QString::null;
+ return TQString::null;
}
-void KMail::RuleWidgetHandlerManager::reset( QWidgetStack *functionStack,
- QWidgetStack *valueStack ) const
+void KMail::RuleWidgetHandlerManager::reset( TQWidgetStack *functionStack,
+ TQWidgetStack *valueStack ) const
{
for ( const_iterator it = mHandlers.begin(); it != mHandlers.end(); ++it ) {
(*it)->reset( functionStack, valueStack );
@@ -326,8 +326,8 @@ void KMail::RuleWidgetHandlerManager::reset( QWidgetStack *functionStack,
update( "", functionStack, valueStack );
}
-void KMail::RuleWidgetHandlerManager::setRule( QWidgetStack *functionStack,
- QWidgetStack *valueStack,
+void KMail::RuleWidgetHandlerManager::setRule( TQWidgetStack *functionStack,
+ TQWidgetStack *valueStack,
const KMSearchRule *rule ) const
{
assert( rule );
@@ -338,9 +338,9 @@ void KMail::RuleWidgetHandlerManager::setRule( QWidgetStack *functionStack,
}
}
-void KMail::RuleWidgetHandlerManager::update( const QCString &field,
- QWidgetStack *functionStack,
- QWidgetStack *valueStack ) const
+void KMail::RuleWidgetHandlerManager::update( const TQCString &field,
+ TQWidgetStack *functionStack,
+ TQWidgetStack *valueStack ) const
{
//kdDebug(5006) << "RuleWidgetHandlerManager::update( \"" << field
// << "\", ... )" << endl;
@@ -354,18 +354,18 @@ void KMail::RuleWidgetHandlerManager::update( const QCString &field,
namespace {
// FIXME (Qt >= 4.0):
- // This is a simplified and constified copy of QObject::child(). According
- // to a comment in qobject.h QObject::child() will be made const in Qt 4.0.
+ // This is a simplified and constified copy of TQObject::child(). According
+ // to a comment in tqobject.h TQObject::child() will be made const in Qt 4.0.
// So once we require Qt 4.0 this can be removed.
- QObject* QObject_child_const( const QObject *parent,
+ TQObject* QObject_child_const( const TQObject *parent,
const char *objName )
{
- const QObjectList *list = parent->children();
+ const TQObjectList *list = parent->children();
if ( !list )
return 0;
- QObjectListIterator it( *list );
- QObject *obj;
+ TQObjectListIterator it( *list );
+ TQObject *obj;
while ( ( obj = it.current() ) ) {
++it;
if ( !objName || qstrcmp( objName, obj->name() ) == 0 )
@@ -387,8 +387,8 @@ using KMail::RegExpLineEdit;
#include <klocale.h>
#include <knuminput.h>
-#include <qcombobox.h>
-#include <qlabel.h>
+#include <tqcombobox.h>
+#include <tqlabel.h>
//=============================================================================
//
@@ -419,48 +419,48 @@ namespace {
//---------------------------------------------------------------------------
- QWidget * TextRuleWidgetHandler::createFunctionWidget( int number,
- QWidgetStack *functionStack,
- const QObject *receiver ) const
+ TQWidget * TextRuleWidgetHandler::createFunctionWidget( int number,
+ TQWidgetStack *functionStack,
+ const TQObject *receiver ) const
{
if ( number != 0 )
return 0;
- QComboBox *funcCombo = new QComboBox( functionStack, "textRuleFuncCombo" );
+ TQComboBox *funcCombo = new TQComboBox( functionStack, "textRuleFuncCombo" );
for ( int i = 0; i < TextFunctionCount; ++i ) {
funcCombo->insertItem( i18n( TextFunctions[i].displayName ) );
}
funcCombo->adjustSize();
- QObject::connect( funcCombo, SIGNAL( activated( int ) ),
- receiver, SLOT( slotFunctionChanged() ) );
+ TQObject::connect( funcCombo, TQT_SIGNAL( activated( int ) ),
+ receiver, TQT_SLOT( slotFunctionChanged() ) );
return funcCombo;
}
//---------------------------------------------------------------------------
- QWidget * TextRuleWidgetHandler::createValueWidget( int number,
- QWidgetStack *valueStack,
- const QObject *receiver ) const
+ TQWidget * TextRuleWidgetHandler::createValueWidget( int number,
+ TQWidgetStack *valueStack,
+ const TQObject *receiver ) const
{
if ( number == 0 ) {
RegExpLineEdit *lineEdit =
new RegExpLineEdit( valueStack, "regExpLineEdit" );
- QObject::connect( lineEdit, SIGNAL( textChanged( const QString & ) ),
- receiver, SLOT( slotValueChanged() ) );
+ TQObject::connect( lineEdit, TQT_SIGNAL( textChanged( const TQString & ) ),
+ receiver, TQT_SLOT( slotValueChanged() ) );
return lineEdit;
}
- // blank QLabel to hide value widget for in-address-book rule
+ // blank TQLabel to hide value widget for in-address-book rule
if ( number == 1 ) {
- return new QLabel( valueStack, "textRuleValueHider" );
+ return new TQLabel( valueStack, "textRuleValueHider" );
}
if ( number == 2 ) {
- QComboBox *combo = new QComboBox( valueStack, "categoryCombo" );
- QStringList categories = KabcBridge::categories();
+ TQComboBox *combo = new TQComboBox( valueStack, "categoryCombo" );
+ TQStringList categories = KabcBridge::categories();
combo->insertStringList( categories );
- QObject::connect( combo, SIGNAL( activated( int ) ),
- receiver, SLOT( slotValueChanged() ) );
+ TQObject::connect( combo, TQT_SIGNAL( activated( int ) ),
+ receiver, TQT_SLOT( slotValueChanged() ) );
return combo;
}
@@ -469,13 +469,13 @@ namespace {
//---------------------------------------------------------------------------
- KMSearchRule::Function TextRuleWidgetHandler::currentFunction( const QWidgetStack *functionStack ) const
+ KMSearchRule::Function TextRuleWidgetHandler::currentFunction( const TQWidgetStack *functionStack ) const
{
- const QComboBox *funcCombo =
- dynamic_cast<QComboBox*>( QObject_child_const( functionStack,
+ const TQComboBox *funcCombo =
+ dynamic_cast<TQComboBox*>( QObject_child_const( functionStack,
"textRuleFuncCombo" ) );
- // FIXME (Qt >= 4.0): Use the following when QObject::child() is const.
- // dynamic_cast<QComboBox*>( functionStack->child( "textRuleFuncCombo",
+ // FIXME (Qt >= 4.0): Use the following when TQObject::child() is const.
+ // dynamic_cast<TQComboBox*>( functionStack->child( "textRuleFuncCombo",
// 0, false ) );
if ( funcCombo ) {
return TextFunctions[funcCombo->currentItem()].id;
@@ -488,25 +488,25 @@ namespace {
//---------------------------------------------------------------------------
- KMSearchRule::Function TextRuleWidgetHandler::function( const QCString &,
- const QWidgetStack *functionStack ) const
+ KMSearchRule::Function TextRuleWidgetHandler::function( const TQCString &,
+ const TQWidgetStack *functionStack ) const
{
return currentFunction( functionStack );
}
//---------------------------------------------------------------------------
- QString TextRuleWidgetHandler::currentValue( const QWidgetStack *valueStack,
+ TQString TextRuleWidgetHandler::currentValue( const TQWidgetStack *valueStack,
KMSearchRule::Function func ) const
{
// here we gotta check the combobox which contains the categories
if ( func == KMSearchRule::FuncIsInCategory ||
func == KMSearchRule::FuncIsNotInCategory ) {
- const QComboBox *combo=
- dynamic_cast<QComboBox*>( QObject_child_const( valueStack,
+ const TQComboBox *combo=
+ dynamic_cast<TQComboBox*>( QObject_child_const( valueStack,
"categoryCombo" ) );
- // FIXME (Qt >= 4.0): Use the following when QObject::child() is const.
- // dynamic_cast<QComboBox*>( valueStack->child( "categoryCombo",
+ // FIXME (Qt >= 4.0): Use the following when TQObject::child() is const.
+ // dynamic_cast<TQComboBox*>( valueStack->child( "categoryCombo",
// 0, false ) );
if ( combo ) {
return combo->currentText();
@@ -514,7 +514,7 @@ namespace {
else {
kdDebug(5006) << "TextRuleWidgetHandler::currentValue: "
"categoryCombo not found." << endl;
- return QString::null;
+ return TQString::null;
}
}
@@ -522,7 +522,7 @@ namespace {
const RegExpLineEdit *lineEdit =
dynamic_cast<RegExpLineEdit*>( QObject_child_const( valueStack,
"regExpLineEdit" ) );
- // FIXME (Qt >= 4.0): Use the following when QObject::child() is const.
+ // FIXME (Qt >= 4.0): Use the following when TQObject::child() is const.
// dynamic_cast<RegExpLineEdit*>( valueStack->child( "regExpLineEdit",
// 0, false ) );
if ( lineEdit ) {
@@ -533,14 +533,14 @@ namespace {
"regExpLineEdit not found." << endl;
// or anything else, like addressbook
- return QString::null;
+ return TQString::null;
}
//---------------------------------------------------------------------------
- QString TextRuleWidgetHandler::value( const QCString &,
- const QWidgetStack *functionStack,
- const QWidgetStack *valueStack ) const
+ TQString TextRuleWidgetHandler::value( const TQCString &,
+ const TQWidgetStack *functionStack,
+ const TQWidgetStack *valueStack ) const
{
KMSearchRule::Function func = currentFunction( functionStack );
if ( func == KMSearchRule::FuncIsInAddressbook )
@@ -553,9 +553,9 @@ namespace {
//---------------------------------------------------------------------------
- QString TextRuleWidgetHandler::prettyValue( const QCString &,
- const QWidgetStack *functionStack,
- const QWidgetStack *valueStack ) const
+ TQString TextRuleWidgetHandler::prettyValue( const TQCString &,
+ const TQWidgetStack *functionStack,
+ const TQWidgetStack *valueStack ) const
{
KMSearchRule::Function func = currentFunction( functionStack );
if ( func == KMSearchRule::FuncIsInAddressbook )
@@ -568,19 +568,19 @@ namespace {
//---------------------------------------------------------------------------
- bool TextRuleWidgetHandler::handlesField( const QCString & ) const
+ bool TextRuleWidgetHandler::handlesField( const TQCString & ) const
{
return true; // we handle all fields (as fallback)
}
//---------------------------------------------------------------------------
- void TextRuleWidgetHandler::reset( QWidgetStack *functionStack,
- QWidgetStack *valueStack ) const
+ void TextRuleWidgetHandler::reset( TQWidgetStack *functionStack,
+ TQWidgetStack *valueStack ) const
{
// reset the function combo box
- QComboBox *funcCombo =
- dynamic_cast<QComboBox*>( functionStack->child( "textRuleFuncCombo",
+ TQComboBox *funcCombo =
+ dynamic_cast<TQComboBox*>( functionStack->child( "textRuleFuncCombo",
0, false ) );
if ( funcCombo ) {
funcCombo->blockSignals( true );
@@ -600,8 +600,8 @@ namespace {
valueStack->raiseWidget( lineEdit );
}
- QComboBox *combo =
- dynamic_cast<QComboBox*>( valueStack->child( "categoryCombo",
+ TQComboBox *combo =
+ dynamic_cast<TQComboBox*>( valueStack->child( "categoryCombo",
0, false ) );
if (combo) {
combo->blockSignals( true );
@@ -612,8 +612,8 @@ namespace {
//---------------------------------------------------------------------------
- bool TextRuleWidgetHandler::setRule( QWidgetStack *functionStack,
- QWidgetStack *valueStack,
+ bool TextRuleWidgetHandler::setRule( TQWidgetStack *functionStack,
+ TQWidgetStack *valueStack,
const KMSearchRule *rule ) const
{
if ( !rule ) {
@@ -626,8 +626,8 @@ namespace {
for ( ; i < TextFunctionCount; ++i )
if ( func == TextFunctions[i].id )
break;
- QComboBox *funcCombo =
- dynamic_cast<QComboBox*>( functionStack->child( "textRuleFuncCombo",
+ TQComboBox *funcCombo =
+ dynamic_cast<TQComboBox*>( functionStack->child( "textRuleFuncCombo",
0, false ) );
if ( funcCombo ) {
funcCombo->blockSignals( true );
@@ -645,15 +645,15 @@ namespace {
if ( func == KMSearchRule::FuncIsInAddressbook ||
func == KMSearchRule::FuncIsNotInAddressbook ) {
- QWidget *w =
- static_cast<QWidget*>( valueStack->child( "textRuleValueHider",
+ TQWidget *w =
+ static_cast<TQWidget*>( valueStack->child( "textRuleValueHider",
0, false ) );
valueStack->raiseWidget( w );
}
else if ( func == KMSearchRule::FuncIsInCategory ||
func == KMSearchRule::FuncIsNotInCategory) {
- QComboBox *combo =
- static_cast<QComboBox*>( valueStack->child( "categoryCombo",
+ TQComboBox *combo =
+ static_cast<TQComboBox*>( valueStack->child( "categoryCombo",
0, false ) );
combo->blockSignals( true );
for ( i = 0; i < combo->count(); ++i )
@@ -686,13 +686,13 @@ namespace {
//---------------------------------------------------------------------------
- bool TextRuleWidgetHandler::update( const QCString &,
- QWidgetStack *functionStack,
- QWidgetStack *valueStack ) const
+ bool TextRuleWidgetHandler::update( const TQCString &,
+ TQWidgetStack *functionStack,
+ TQWidgetStack *valueStack ) const
{
// raise the correct function widget
functionStack->raiseWidget(
- static_cast<QWidget*>( functionStack->child( "textRuleFuncCombo",
+ static_cast<TQWidget*>( functionStack->child( "textRuleFuncCombo",
0, false ) ) );
// raise the correct value widget
@@ -700,13 +700,13 @@ namespace {
if ( func == KMSearchRule::FuncIsInAddressbook ||
func == KMSearchRule::FuncIsNotInAddressbook ) {
valueStack->raiseWidget(
- static_cast<QWidget*>( valueStack->child( "textRuleValueHider",
+ static_cast<TQWidget*>( valueStack->child( "textRuleValueHider",
0, false ) ) );
}
else if ( func == KMSearchRule::FuncIsInCategory ||
func == KMSearchRule::FuncIsNotInCategory) {
valueStack->raiseWidget(
- static_cast<QWidget*>( valueStack->child( "categoryCombo",
+ static_cast<TQWidget*>( valueStack->child( "categoryCombo",
0, false ) ) );
}
else {
@@ -750,40 +750,40 @@ namespace {
//---------------------------------------------------------------------------
- QWidget * MessageRuleWidgetHandler::createFunctionWidget( int number,
- QWidgetStack *functionStack,
- const QObject *receiver ) const
+ TQWidget * MessageRuleWidgetHandler::createFunctionWidget( int number,
+ TQWidgetStack *functionStack,
+ const TQObject *receiver ) const
{
if ( number != 0 )
return 0;
- QComboBox *funcCombo = new QComboBox( functionStack, "messageRuleFuncCombo" );
+ TQComboBox *funcCombo = new TQComboBox( functionStack, "messageRuleFuncCombo" );
for ( int i = 0; i < MessageFunctionCount; ++i ) {
funcCombo->insertItem( i18n( MessageFunctions[i].displayName ) );
}
funcCombo->adjustSize();
- QObject::connect( funcCombo, SIGNAL( activated( int ) ),
- receiver, SLOT( slotFunctionChanged() ) );
+ TQObject::connect( funcCombo, TQT_SIGNAL( activated( int ) ),
+ receiver, TQT_SLOT( slotFunctionChanged() ) );
return funcCombo;
}
//---------------------------------------------------------------------------
- QWidget * MessageRuleWidgetHandler::createValueWidget( int number,
- QWidgetStack *valueStack,
- const QObject *receiver ) const
+ TQWidget * MessageRuleWidgetHandler::createValueWidget( int number,
+ TQWidgetStack *valueStack,
+ const TQObject *receiver ) const
{
if ( number == 0 ) {
RegExpLineEdit *lineEdit =
new RegExpLineEdit( valueStack, "regExpLineEdit" );
- QObject::connect( lineEdit, SIGNAL( textChanged( const QString & ) ),
- receiver, SLOT( slotValueChanged() ) );
+ TQObject::connect( lineEdit, TQT_SIGNAL( textChanged( const TQString & ) ),
+ receiver, TQT_SLOT( slotValueChanged() ) );
return lineEdit;
}
- // blank QLabel to hide value widget for has-attachment rule
+ // blank TQLabel to hide value widget for has-attachment rule
if ( number == 1 ) {
- return new QLabel( valueStack, "textRuleValueHider" );
+ return new TQLabel( valueStack, "textRuleValueHider" );
}
return 0;
@@ -791,13 +791,13 @@ namespace {
//---------------------------------------------------------------------------
- KMSearchRule::Function MessageRuleWidgetHandler::currentFunction( const QWidgetStack *functionStack ) const
+ KMSearchRule::Function MessageRuleWidgetHandler::currentFunction( const TQWidgetStack *functionStack ) const
{
- const QComboBox *funcCombo =
- dynamic_cast<QComboBox*>( QObject_child_const( functionStack,
+ const TQComboBox *funcCombo =
+ dynamic_cast<TQComboBox*>( QObject_child_const( functionStack,
"messageRuleFuncCombo" ) );
- // FIXME (Qt >= 4.0): Use the following when QObject::child() is const.
- // dynamic_cast<QComboBox*>( functionStack->child( "messageRuleFuncCombo",
+ // FIXME (Qt >= 4.0): Use the following when TQObject::child() is const.
+ // dynamic_cast<TQComboBox*>( functionStack->child( "messageRuleFuncCombo",
// 0, false ) );
if ( funcCombo ) {
return MessageFunctions[funcCombo->currentItem()].id;
@@ -810,8 +810,8 @@ namespace {
//---------------------------------------------------------------------------
- KMSearchRule::Function MessageRuleWidgetHandler::function( const QCString & field,
- const QWidgetStack *functionStack ) const
+ KMSearchRule::Function MessageRuleWidgetHandler::function( const TQCString & field,
+ const TQWidgetStack *functionStack ) const
{
if ( !handlesField( field ) )
return KMSearchRule::FuncNone;
@@ -821,13 +821,13 @@ namespace {
//---------------------------------------------------------------------------
- QString MessageRuleWidgetHandler::currentValue( const QWidgetStack *valueStack,
+ TQString MessageRuleWidgetHandler::currentValue( const TQWidgetStack *valueStack,
KMSearchRule::Function ) const
{
const RegExpLineEdit *lineEdit =
dynamic_cast<RegExpLineEdit*>( QObject_child_const( valueStack,
"regExpLineEdit" ) );
- // FIXME (Qt >= 4.0): Use the following when QObject::child() is const.
+ // FIXME (Qt >= 4.0): Use the following when TQObject::child() is const.
// dynamic_cast<RegExpLineEdit*>( valueStack->child( "regExpLineEdit",
// 0, false ) );
if ( lineEdit ) {
@@ -837,17 +837,17 @@ namespace {
kdDebug(5006) << "MessageRuleWidgetHandler::currentValue: "
"regExpLineEdit not found." << endl;
- return QString::null;
+ return TQString::null;
}
//---------------------------------------------------------------------------
- QString MessageRuleWidgetHandler::value( const QCString & field,
- const QWidgetStack *functionStack,
- const QWidgetStack *valueStack ) const
+ TQString MessageRuleWidgetHandler::value( const TQCString & field,
+ const TQWidgetStack *functionStack,
+ const TQWidgetStack *valueStack ) const
{
if ( !handlesField( field ) )
- return QString::null;
+ return TQString::null;
KMSearchRule::Function func = currentFunction( functionStack );
if ( func == KMSearchRule::FuncHasAttachment )
@@ -860,12 +860,12 @@ namespace {
//---------------------------------------------------------------------------
- QString MessageRuleWidgetHandler::prettyValue( const QCString & field,
- const QWidgetStack *functionStack,
- const QWidgetStack *valueStack ) const
+ TQString MessageRuleWidgetHandler::prettyValue( const TQCString & field,
+ const TQWidgetStack *functionStack,
+ const TQWidgetStack *valueStack ) const
{
if ( !handlesField( field ) )
- return QString::null;
+ return TQString::null;
KMSearchRule::Function func = currentFunction( functionStack );
if ( func == KMSearchRule::FuncHasAttachment )
@@ -878,19 +878,19 @@ namespace {
//---------------------------------------------------------------------------
- bool MessageRuleWidgetHandler::handlesField( const QCString & field ) const
+ bool MessageRuleWidgetHandler::handlesField( const TQCString & field ) const
{
return ( field == "<message>" );
}
//---------------------------------------------------------------------------
- void MessageRuleWidgetHandler::reset( QWidgetStack *functionStack,
- QWidgetStack *valueStack ) const
+ void MessageRuleWidgetHandler::reset( TQWidgetStack *functionStack,
+ TQWidgetStack *valueStack ) const
{
// reset the function combo box
- QComboBox *funcCombo =
- dynamic_cast<QComboBox*>( functionStack->child( "messageRuleFuncCombo",
+ TQComboBox *funcCombo =
+ dynamic_cast<TQComboBox*>( functionStack->child( "messageRuleFuncCombo",
0, false ) );
if ( funcCombo ) {
funcCombo->blockSignals( true );
@@ -913,8 +913,8 @@ namespace {
//---------------------------------------------------------------------------
- bool MessageRuleWidgetHandler::setRule( QWidgetStack *functionStack,
- QWidgetStack *valueStack,
+ bool MessageRuleWidgetHandler::setRule( TQWidgetStack *functionStack,
+ TQWidgetStack *valueStack,
const KMSearchRule *rule ) const
{
if ( !rule || !handlesField( rule->field() ) ) {
@@ -927,8 +927,8 @@ namespace {
for ( ; i < MessageFunctionCount; ++i )
if ( func == MessageFunctions[i].id )
break;
- QComboBox *funcCombo =
- dynamic_cast<QComboBox*>( functionStack->child( "messageRuleFuncCombo",
+ TQComboBox *funcCombo =
+ dynamic_cast<TQComboBox*>( functionStack->child( "messageRuleFuncCombo",
0, false ) );
if ( funcCombo ) {
funcCombo->blockSignals( true );
@@ -946,8 +946,8 @@ namespace {
if ( func == KMSearchRule::FuncHasAttachment ||
func == KMSearchRule::FuncHasNoAttachment ) {
- QWidget *w =
- static_cast<QWidget*>( valueStack->child( "textRuleValueHider",
+ TQWidget *w =
+ static_cast<TQWidget*>( valueStack->child( "textRuleValueHider",
0, false ) );
valueStack->raiseWidget( w );
}
@@ -970,23 +970,23 @@ namespace {
//---------------------------------------------------------------------------
- bool MessageRuleWidgetHandler::update( const QCString & field,
- QWidgetStack *functionStack,
- QWidgetStack *valueStack ) const
+ bool MessageRuleWidgetHandler::update( const TQCString & field,
+ TQWidgetStack *functionStack,
+ TQWidgetStack *valueStack ) const
{
if ( !handlesField( field ) )
return false;
// raise the correct function widget
functionStack->raiseWidget(
- static_cast<QWidget*>( functionStack->child( "messageRuleFuncCombo",
+ static_cast<TQWidget*>( functionStack->child( "messageRuleFuncCombo",
0, false ) ) );
// raise the correct value widget
KMSearchRule::Function func = currentFunction( functionStack );
if ( func == KMSearchRule::FuncHasAttachment ||
func == KMSearchRule::FuncHasNoAttachment ) {
- QWidget *w =
- static_cast<QWidget*>( valueStack->child( "textRuleValueHider",
+ TQWidget *w =
+ static_cast<TQWidget*>( valueStack->child( "textRuleValueHider",
0, false ) );
valueStack->raiseWidget( w );
}
@@ -1025,53 +1025,53 @@ namespace {
//---------------------------------------------------------------------------
- QWidget * StatusRuleWidgetHandler::createFunctionWidget( int number,
- QWidgetStack *functionStack,
- const QObject *receiver ) const
+ TQWidget * StatusRuleWidgetHandler::createFunctionWidget( int number,
+ TQWidgetStack *functionStack,
+ const TQObject *receiver ) const
{
if ( number != 0 )
return 0;
- QComboBox *funcCombo = new QComboBox( functionStack,
+ TQComboBox *funcCombo = new TQComboBox( functionStack,
"statusRuleFuncCombo" );
for ( int i = 0; i < StatusFunctionCount; ++i ) {
funcCombo->insertItem( i18n( StatusFunctions[i].displayName ) );
}
funcCombo->adjustSize();
- QObject::connect( funcCombo, SIGNAL( activated( int ) ),
- receiver, SLOT( slotFunctionChanged() ) );
+ TQObject::connect( funcCombo, TQT_SIGNAL( activated( int ) ),
+ receiver, TQT_SLOT( slotFunctionChanged() ) );
return funcCombo;
}
//---------------------------------------------------------------------------
- QWidget * StatusRuleWidgetHandler::createValueWidget( int number,
- QWidgetStack *valueStack,
- const QObject *receiver ) const
+ TQWidget * StatusRuleWidgetHandler::createValueWidget( int number,
+ TQWidgetStack *valueStack,
+ const TQObject *receiver ) const
{
if ( number != 0 )
return 0;
- QComboBox *statusCombo = new QComboBox( valueStack,
+ TQComboBox *statusCombo = new TQComboBox( valueStack,
"statusRuleValueCombo" );
for ( int i = 0; i < KMail::StatusValueCountWithoutHidden; ++i ) {
statusCombo->insertItem( UserIcon( KMail::StatusValues[ i ].icon ), i18n( KMail::StatusValues[ i ].text ) );
}
statusCombo->adjustSize();
- QObject::connect( statusCombo, SIGNAL( activated( int ) ),
- receiver, SLOT( slotValueChanged() ) );
+ TQObject::connect( statusCombo, TQT_SIGNAL( activated( int ) ),
+ receiver, TQT_SLOT( slotValueChanged() ) );
return statusCombo;
}
//---------------------------------------------------------------------------
- KMSearchRule::Function StatusRuleWidgetHandler::currentFunction( const QWidgetStack *functionStack ) const
+ KMSearchRule::Function StatusRuleWidgetHandler::currentFunction( const TQWidgetStack *functionStack ) const
{
- const QComboBox *funcCombo =
- dynamic_cast<QComboBox*>( QObject_child_const( functionStack,
+ const TQComboBox *funcCombo =
+ dynamic_cast<TQComboBox*>( QObject_child_const( functionStack,
"statusRuleFuncCombo" ) );
- // FIXME (Qt >= 4.0): Use the following when QObject::child() is const.
- // dynamic_cast<QComboBox*>( functionStack->child( "statusRuleFuncCombo",
+ // FIXME (Qt >= 4.0): Use the following when TQObject::child() is const.
+ // dynamic_cast<TQComboBox*>( functionStack->child( "statusRuleFuncCombo",
// 0, false ) );
if ( funcCombo ) {
return StatusFunctions[funcCombo->currentItem()].id;
@@ -1084,8 +1084,8 @@ namespace {
//---------------------------------------------------------------------------
- KMSearchRule::Function StatusRuleWidgetHandler::function( const QCString & field,
- const QWidgetStack *functionStack ) const
+ KMSearchRule::Function StatusRuleWidgetHandler::function( const TQCString & field,
+ const TQWidgetStack *functionStack ) const
{
if ( !handlesField( field ) )
return KMSearchRule::FuncNone;
@@ -1095,13 +1095,13 @@ namespace {
//---------------------------------------------------------------------------
- int StatusRuleWidgetHandler::currentStatusValue( const QWidgetStack *valueStack ) const
+ int StatusRuleWidgetHandler::currentStatusValue( const TQWidgetStack *valueStack ) const
{
- const QComboBox *statusCombo =
- dynamic_cast<QComboBox*>( QObject_child_const( valueStack,
+ const TQComboBox *statusCombo =
+ dynamic_cast<TQComboBox*>( QObject_child_const( valueStack,
"statusRuleValueCombo" ) );
- // FIXME (Qt >= 4.0): Use the following when QObject::child() is const.
- // dynamic_cast<QComboBox*>( valueStack->child( "statusRuleValueCombo",
+ // FIXME (Qt >= 4.0): Use the following when TQObject::child() is const.
+ // dynamic_cast<TQComboBox*>( valueStack->child( "statusRuleValueCombo",
// 0, false ) );
if ( statusCombo ) {
return statusCombo->currentItem();
@@ -1114,51 +1114,51 @@ namespace {
//---------------------------------------------------------------------------
- QString StatusRuleWidgetHandler::value( const QCString & field,
- const QWidgetStack *,
- const QWidgetStack *valueStack ) const
+ TQString StatusRuleWidgetHandler::value( const TQCString & field,
+ const TQWidgetStack *,
+ const TQWidgetStack *valueStack ) const
{
if ( !handlesField( field ) )
- return QString::null;
+ return TQString::null;
const int status = currentStatusValue( valueStack );
if ( status != -1 )
- return QString::fromLatin1( KMail::StatusValues[ status ].text );
+ return TQString::fromLatin1( KMail::StatusValues[ status ].text );
else
- return QString::null;
+ return TQString::null;
}
//---------------------------------------------------------------------------
- QString StatusRuleWidgetHandler::prettyValue( const QCString & field,
- const QWidgetStack *,
- const QWidgetStack *valueStack ) const
+ TQString StatusRuleWidgetHandler::prettyValue( const TQCString & field,
+ const TQWidgetStack *,
+ const TQWidgetStack *valueStack ) const
{
if ( !handlesField( field ) )
- return QString::null;
+ return TQString::null;
const int status = currentStatusValue( valueStack );
if ( status != -1 )
return i18n( KMail::StatusValues[ status ].text );
else
- return QString::null;
+ return TQString::null;
}
//---------------------------------------------------------------------------
- bool StatusRuleWidgetHandler::handlesField( const QCString & field ) const
+ bool StatusRuleWidgetHandler::handlesField( const TQCString & field ) const
{
return ( field == "<status>" );
}
//---------------------------------------------------------------------------
- void StatusRuleWidgetHandler::reset( QWidgetStack *functionStack,
- QWidgetStack *valueStack ) const
+ void StatusRuleWidgetHandler::reset( TQWidgetStack *functionStack,
+ TQWidgetStack *valueStack ) const
{
// reset the function combo box
- QComboBox *funcCombo =
- dynamic_cast<QComboBox*>( functionStack->child( "statusRuleFuncCombo",
+ TQComboBox *funcCombo =
+ dynamic_cast<TQComboBox*>( functionStack->child( "statusRuleFuncCombo",
0, false ) );
if ( funcCombo ) {
funcCombo->blockSignals( true );
@@ -1167,8 +1167,8 @@ namespace {
}
// reset the status value combo box
- QComboBox *statusCombo =
- dynamic_cast<QComboBox*>( valueStack->child( "statusRuleValueCombo",
+ TQComboBox *statusCombo =
+ dynamic_cast<TQComboBox*>( valueStack->child( "statusRuleValueCombo",
0, false ) );
if ( statusCombo ) {
statusCombo->blockSignals( true );
@@ -1179,8 +1179,8 @@ namespace {
//---------------------------------------------------------------------------
- bool StatusRuleWidgetHandler::setRule( QWidgetStack *functionStack,
- QWidgetStack *valueStack,
+ bool StatusRuleWidgetHandler::setRule( TQWidgetStack *functionStack,
+ TQWidgetStack *valueStack,
const KMSearchRule *rule ) const
{
if ( !rule || !handlesField( rule->field() ) ) {
@@ -1194,8 +1194,8 @@ namespace {
for ( ; funcIndex < StatusFunctionCount; ++funcIndex )
if ( func == StatusFunctions[funcIndex].id )
break;
- QComboBox *funcCombo =
- dynamic_cast<QComboBox*>( functionStack->child( "statusRuleFuncCombo",
+ TQComboBox *funcCombo =
+ dynamic_cast<TQComboBox*>( functionStack->child( "statusRuleFuncCombo",
0, false ) );
if ( funcCombo ) {
funcCombo->blockSignals( true );
@@ -1212,14 +1212,14 @@ namespace {
}
// set the value
- const QString value = rule->contents();
+ const TQString value = rule->contents();
int valueIndex = 0;
for ( ; valueIndex < KMail::StatusValueCountWithoutHidden; ++valueIndex )
- if ( value == QString::fromLatin1(
+ if ( value == TQString::fromLatin1(
KMail::StatusValues[ valueIndex ].text ) )
break;
- QComboBox *statusCombo =
- dynamic_cast<QComboBox*>( valueStack->child( "statusRuleValueCombo",
+ TQComboBox *statusCombo =
+ dynamic_cast<TQComboBox*>( valueStack->child( "statusRuleValueCombo",
0, false ) );
if ( statusCombo ) {
statusCombo->blockSignals( true );
@@ -1240,21 +1240,21 @@ namespace {
//---------------------------------------------------------------------------
- bool StatusRuleWidgetHandler::update( const QCString &field,
- QWidgetStack *functionStack,
- QWidgetStack *valueStack ) const
+ bool StatusRuleWidgetHandler::update( const TQCString &field,
+ TQWidgetStack *functionStack,
+ TQWidgetStack *valueStack ) const
{
if ( !handlesField( field ) )
return false;
// raise the correct function widget
functionStack->raiseWidget(
- static_cast<QWidget*>( functionStack->child( "statusRuleFuncCombo",
+ static_cast<TQWidget*>( functionStack->child( "statusRuleFuncCombo",
0, false ) ) );
// raise the correct value widget
valueStack->raiseWidget(
- static_cast<QWidget*>( valueStack->child( "statusRuleValueCombo",
+ static_cast<TQWidget*>( valueStack->child( "statusRuleValueCombo",
0, false ) ) );
return true;
}
@@ -1285,48 +1285,48 @@ namespace {
//---------------------------------------------------------------------------
- QWidget * NumericRuleWidgetHandler::createFunctionWidget( int number,
- QWidgetStack *functionStack,
- const QObject *receiver ) const
+ TQWidget * NumericRuleWidgetHandler::createFunctionWidget( int number,
+ TQWidgetStack *functionStack,
+ const TQObject *receiver ) const
{
if ( number != 0 )
return 0;
- QComboBox *funcCombo = new QComboBox( functionStack,
+ TQComboBox *funcCombo = new TQComboBox( functionStack,
"numericRuleFuncCombo" );
for ( int i = 0; i < NumericFunctionCount; ++i ) {
funcCombo->insertItem( i18n( NumericFunctions[i].displayName ) );
}
funcCombo->adjustSize();
- QObject::connect( funcCombo, SIGNAL( activated( int ) ),
- receiver, SLOT( slotFunctionChanged() ) );
+ TQObject::connect( funcCombo, TQT_SIGNAL( activated( int ) ),
+ receiver, TQT_SLOT( slotFunctionChanged() ) );
return funcCombo;
}
//---------------------------------------------------------------------------
- QWidget * NumericRuleWidgetHandler::createValueWidget( int number,
- QWidgetStack *valueStack,
- const QObject *receiver ) const
+ TQWidget * NumericRuleWidgetHandler::createValueWidget( int number,
+ TQWidgetStack *valueStack,
+ const TQObject *receiver ) const
{
if ( number != 0 )
return 0;
KIntNumInput *numInput = new KIntNumInput( valueStack, "KIntNumInput" );
- QObject::connect( numInput, SIGNAL( valueChanged( int ) ),
- receiver, SLOT( slotValueChanged() ) );
+ TQObject::connect( numInput, TQT_SIGNAL( valueChanged( int ) ),
+ receiver, TQT_SLOT( slotValueChanged() ) );
return numInput;
}
//---------------------------------------------------------------------------
- KMSearchRule::Function NumericRuleWidgetHandler::currentFunction( const QWidgetStack *functionStack ) const
+ KMSearchRule::Function NumericRuleWidgetHandler::currentFunction( const TQWidgetStack *functionStack ) const
{
- const QComboBox *funcCombo =
- dynamic_cast<QComboBox*>( QObject_child_const( functionStack,
+ const TQComboBox *funcCombo =
+ dynamic_cast<TQComboBox*>( QObject_child_const( functionStack,
"numericRuleFuncCombo" ) );
- // FIXME (Qt >= 4.0): Use the following when QObject::child() is const.
- // dynamic_cast<QComboBox*>( functionStack->child( "numericRuleFuncCombo",
+ // FIXME (Qt >= 4.0): Use the following when TQObject::child() is const.
+ // dynamic_cast<TQComboBox*>( functionStack->child( "numericRuleFuncCombo",
// 0, false ) );
if ( funcCombo ) {
return NumericFunctions[funcCombo->currentItem()].id;
@@ -1339,8 +1339,8 @@ namespace {
//---------------------------------------------------------------------------
- KMSearchRule::Function NumericRuleWidgetHandler::function( const QCString & field,
- const QWidgetStack *functionStack ) const
+ KMSearchRule::Function NumericRuleWidgetHandler::function( const TQCString & field,
+ const TQWidgetStack *functionStack ) const
{
if ( !handlesField( field ) )
return KMSearchRule::FuncNone;
@@ -1350,62 +1350,62 @@ namespace {
//---------------------------------------------------------------------------
- QString NumericRuleWidgetHandler::currentValue( const QWidgetStack *valueStack ) const
+ TQString NumericRuleWidgetHandler::currentValue( const TQWidgetStack *valueStack ) const
{
const KIntNumInput *numInput =
dynamic_cast<KIntNumInput*>( QObject_child_const( valueStack,
"KIntNumInput" ) );
- // FIXME (Qt >= 4.0): Use the following when QObject::child() is const.
+ // FIXME (Qt >= 4.0): Use the following when TQObject::child() is const.
// dynamic_cast<KIntNumInput*>( valueStack->child( "KIntNumInput",
// 0, false ) );
if ( numInput ) {
- return QString::number( numInput->value() );
+ return TQString::number( numInput->value() );
}
else
kdDebug(5006) << "NumericRuleWidgetHandler::currentValue: "
"KIntNumInput not found." << endl;
- return QString::null;
+ return TQString::null;
}
//---------------------------------------------------------------------------
- QString NumericRuleWidgetHandler::value( const QCString & field,
- const QWidgetStack *,
- const QWidgetStack *valueStack ) const
+ TQString NumericRuleWidgetHandler::value( const TQCString & field,
+ const TQWidgetStack *,
+ const TQWidgetStack *valueStack ) const
{
if ( !handlesField( field ) )
- return QString::null;
+ return TQString::null;
return currentValue( valueStack );
}
//---------------------------------------------------------------------------
- QString NumericRuleWidgetHandler::prettyValue( const QCString & field,
- const QWidgetStack *,
- const QWidgetStack *valueStack ) const
+ TQString NumericRuleWidgetHandler::prettyValue( const TQCString & field,
+ const TQWidgetStack *,
+ const TQWidgetStack *valueStack ) const
{
if ( !handlesField( field ) )
- return QString::null;
+ return TQString::null;
return currentValue( valueStack );
}
//---------------------------------------------------------------------------
- bool NumericRuleWidgetHandler::handlesField( const QCString & field ) const
+ bool NumericRuleWidgetHandler::handlesField( const TQCString & field ) const
{
return ( field == "<size>" || field == "<age in days>" );
}
//---------------------------------------------------------------------------
- void NumericRuleWidgetHandler::reset( QWidgetStack *functionStack,
- QWidgetStack *valueStack ) const
+ void NumericRuleWidgetHandler::reset( TQWidgetStack *functionStack,
+ TQWidgetStack *valueStack ) const
{
// reset the function combo box
- QComboBox *funcCombo =
- dynamic_cast<QComboBox*>( functionStack->child( "numericRuleFuncCombo",
+ TQComboBox *funcCombo =
+ dynamic_cast<TQComboBox*>( functionStack->child( "numericRuleFuncCombo",
0, false ) );
if ( funcCombo ) {
funcCombo->blockSignals( true );
@@ -1426,7 +1426,7 @@ namespace {
//---------------------------------------------------------------------------
- void initNumInput( KIntNumInput *numInput, const QCString &field )
+ void initNumInput( KIntNumInput *numInput, const TQCString &field )
{
if ( field == "<size>" ) {
numInput->setMinValue( 0 );
@@ -1440,8 +1440,8 @@ namespace {
//---------------------------------------------------------------------------
- bool NumericRuleWidgetHandler::setRule( QWidgetStack *functionStack,
- QWidgetStack *valueStack,
+ bool NumericRuleWidgetHandler::setRule( TQWidgetStack *functionStack,
+ TQWidgetStack *valueStack,
const KMSearchRule *rule ) const
{
if ( !rule || !handlesField( rule->field() ) ) {
@@ -1455,8 +1455,8 @@ namespace {
for ( ; funcIndex < NumericFunctionCount; ++funcIndex )
if ( func == NumericFunctions[funcIndex].id )
break;
- QComboBox *funcCombo =
- dynamic_cast<QComboBox*>( functionStack->child( "numericRuleFuncCombo",
+ TQComboBox *funcCombo =
+ dynamic_cast<TQComboBox*>( functionStack->child( "numericRuleFuncCombo",
0, false ) );
if ( funcCombo ) {
funcCombo->blockSignals( true );
@@ -1493,16 +1493,16 @@ namespace {
//---------------------------------------------------------------------------
- bool NumericRuleWidgetHandler::update( const QCString &field,
- QWidgetStack *functionStack,
- QWidgetStack *valueStack ) const
+ bool NumericRuleWidgetHandler::update( const TQCString &field,
+ TQWidgetStack *functionStack,
+ TQWidgetStack *valueStack ) const
{
if ( !handlesField( field ) )
return false;
// raise the correct function widget
functionStack->raiseWidget(
- static_cast<QWidget*>( functionStack->child( "numericRuleFuncCombo",
+ static_cast<TQWidget*>( functionStack->child( "numericRuleFuncCombo",
0, false ) ) );
// raise the correct value widget
diff --git a/kmail/rulewidgethandlermanager.h b/kmail/rulewidgethandlermanager.h
index eee848c69..0e419411a 100644
--- a/kmail/rulewidgethandlermanager.h
+++ b/kmail/rulewidgethandlermanager.h
@@ -35,7 +35,7 @@
#include "kmsearchpattern.h"
-#include <qvaluevector.h>
+#include <tqvaluevector.h>
class QObject;
class QCString;
@@ -65,34 +65,34 @@ namespace KMail {
void registerHandler( const RuleWidgetHandler * handler );
void unregisterHandler( const RuleWidgetHandler * handler );
- void createWidgets( QWidgetStack *functionStack,
- QWidgetStack *valueStack,
- const QObject *receiver ) const;
- KMSearchRule::Function function( const QCString & field,
- const QWidgetStack *functionStack ) const;
- QString value( const QCString & field,
- const QWidgetStack *functionStack,
- const QWidgetStack *valueStack ) const;
- QString prettyValue( const QCString & field,
- const QWidgetStack *functionStack,
- const QWidgetStack *valueStack ) const;
- bool handlesField( const QCString & field,
- const QWidgetStack *functionStack,
- const QWidgetStack *valueStack ) const;
- void reset( QWidgetStack *functionStack,
- QWidgetStack *valueStack ) const;
- void setRule( QWidgetStack *functionStack,
- QWidgetStack *valueStack,
+ void createWidgets( TQWidgetStack *functionStack,
+ TQWidgetStack *valueStack,
+ const TQObject *receiver ) const;
+ KMSearchRule::Function function( const TQCString & field,
+ const TQWidgetStack *functionStack ) const;
+ TQString value( const TQCString & field,
+ const TQWidgetStack *functionStack,
+ const TQWidgetStack *valueStack ) const;
+ TQString prettyValue( const TQCString & field,
+ const TQWidgetStack *functionStack,
+ const TQWidgetStack *valueStack ) const;
+ bool handlesField( const TQCString & field,
+ const TQWidgetStack *functionStack,
+ const TQWidgetStack *valueStack ) const;
+ void reset( TQWidgetStack *functionStack,
+ TQWidgetStack *valueStack ) const;
+ void setRule( TQWidgetStack *functionStack,
+ TQWidgetStack *valueStack,
const KMSearchRule *rule ) const;
- void update( const QCString & field,
- QWidgetStack *functionStack,
- QWidgetStack *valueStack ) const;
+ void update( const TQCString & field,
+ TQWidgetStack *functionStack,
+ TQWidgetStack *valueStack ) const;
private:
- typedef QValueVector<const RuleWidgetHandler*>::const_iterator const_iterator;
- typedef QValueVector<const RuleWidgetHandler*>::iterator iterator;
+ typedef TQValueVector<const RuleWidgetHandler*>::const_iterator const_iterator;
+ typedef TQValueVector<const RuleWidgetHandler*>::iterator iterator;
- QValueVector<const RuleWidgetHandler*> mHandlers;
+ TQValueVector<const RuleWidgetHandler*> mHandlers;
};
} // namespace KMail
diff --git a/kmail/scalix.cpp b/kmail/scalix.cpp
index aef77ff8b..4910119d0 100644
--- a/kmail/scalix.cpp
+++ b/kmail/scalix.cpp
@@ -18,8 +18,8 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#include <qmap.h>
-#include <qstringlist.h>
+#include <tqmap.h>
+#include <tqstringlist.h>
#include "scalix.h"
@@ -28,9 +28,9 @@
using namespace Scalix;
-FolderAttributeParser::FolderAttributeParser( const QString &attribute )
+FolderAttributeParser::FolderAttributeParser( const TQString &attribute )
{
- QStringList parts = QStringList::split( ",", attribute, false );
+ TQStringList parts = TQStringList::split( ",", attribute, false );
for ( uint i = 0; i < parts.count(); ++i ) {
if ( parts[i].startsWith( "\\X-SpecialFolder=" ) )
@@ -40,21 +40,21 @@ FolderAttributeParser::FolderAttributeParser( const QString &attribute )
}
}
-QString FolderAttributeParser::folderClass() const
+TQString FolderAttributeParser::folderClass() const
{
return mFolderClass;
}
-QString FolderAttributeParser::folderName() const
+TQString FolderAttributeParser::folderName() const
{
return mFolderName;
}
KMFolder* Utils::findStandardResourceFolder( KMFolderDir* folderParentDir,
KMail::FolderContentsType contentsType,
- const QStringList &attributes )
+ const TQStringList &attributes )
{
- QMap<int, QString> typeMap;
+ TQMap<int, TQString> typeMap;
typeMap.insert( KMail::ContentsTypeCalendar, "IPF.Appointment" );
typeMap.insert( KMail::ContentsTypeContact, "IPF.Contact" );
typeMap.insert( KMail::ContentsTypeNote, "IPF.StickyNote" );
@@ -75,7 +75,7 @@ KMFolder* Utils::findStandardResourceFolder( KMFolderDir* folderParentDir,
return 0;
}
-KMail::FolderContentsType Utils::scalixIdToContentsType( const QString &name )
+KMail::FolderContentsType Utils::scalixIdToContentsType( const TQString &name )
{
if ( name == "IPF.Appointment" )
return KMail::ContentsTypeCalendar;
@@ -89,7 +89,7 @@ KMail::FolderContentsType Utils::scalixIdToContentsType( const QString &name )
return KMail::ContentsTypeMail;
}
-QString Utils::contentsTypeToScalixId( KMail::FolderContentsType type )
+TQString Utils::contentsTypeToScalixId( KMail::FolderContentsType type )
{
if ( type == KMail::ContentsTypeCalendar )
return "IPF.Appointment";
diff --git a/kmail/scalix.h b/kmail/scalix.h
index cb202cff1..ac07f504a 100644
--- a/kmail/scalix.h
+++ b/kmail/scalix.h
@@ -40,7 +40,7 @@
#ifndef SCALIX_H
#define SCALIX_H
-#include <qstring.h>
+#include <tqstring.h>
#include "kmfoldertype.h"
@@ -56,14 +56,14 @@ namespace Scalix {
class FolderAttributeParser
{
public:
- FolderAttributeParser( const QString &attribute );
+ FolderAttributeParser( const TQString &attribute );
- QString folderClass() const;
- QString folderName() const;
+ TQString folderClass() const;
+ TQString folderName() const;
private:
- QString mFolderClass;
- QString mFolderName;
+ TQString mFolderClass;
+ TQString mFolderName;
};
class Utils
@@ -71,11 +71,11 @@ class Utils
public:
static KMFolder* findStandardResourceFolder( KMFolderDir* folderParentDir,
KMail::FolderContentsType contentsType,
- const QStringList &attributes );
+ const TQStringList &attributes );
- static KMail::FolderContentsType scalixIdToContentsType( const QString &name );
+ static KMail::FolderContentsType scalixIdToContentsType( const TQString &name );
- static QString contentsTypeToScalixId( KMail::FolderContentsType type );
+ static TQString contentsTypeToScalixId( KMail::FolderContentsType type );
};
}
diff --git a/kmail/searchjob.cpp b/kmail/searchjob.cpp
index dde86495f..89dde8214 100644
--- a/kmail/searchjob.cpp
+++ b/kmail/searchjob.cpp
@@ -46,7 +46,7 @@ using KPIM::ProgressManager;
#include <klocale.h>
#include <kmessagebox.h>
-#include <qstylesheet.h>
+#include <tqstylesheet.h>
namespace KMail {
@@ -77,47 +77,47 @@ void SearchJob::execute()
void SearchJob::searchCompleteFolder()
{
// generate imap search command and save local search patterns
- QString searchString = searchStringFromPattern( mSearchPattern );
+ TQString searchString = searchStringFromPattern( mSearchPattern );
if ( searchString.isEmpty() ) // skip imap search and download the messages
- return slotSearchData( 0, QString::null );
+ return slotSearchData( 0, TQString::null );
// do the IMAP search
KURL url = mAccount->getUrl();
url.setPath( mFolder->imapPath() + ";SECTION=" + searchString );
- QByteArray packedArgs;
- QDataStream stream( packedArgs, IO_WriteOnly );
+ TQByteArray packedArgs;
+ TQDataStream stream( packedArgs, IO_WriteOnly );
stream << (int) 'E' << url;
KIO::SimpleJob *job = KIO::special( url, packedArgs, false );
- if ( mFolder->imapPath() != QString( "/" ) )
+ if ( mFolder->imapPath() != TQString( "/" ) )
{
KIO::Scheduler::assignJobToSlave( mAccount->slave(), job );
- connect( job, SIGNAL( infoMessage( KIO::Job*, const QString& ) ),
- SLOT( slotSearchData( KIO::Job*, const QString& ) ) );
- connect( job, SIGNAL( result( KIO::Job * ) ),
- SLOT( slotSearchResult( KIO::Job * ) ) );
+ connect( job, TQT_SIGNAL( infoMessage( KIO::Job*, const TQString& ) ),
+ TQT_SLOT( slotSearchData( KIO::Job*, const TQString& ) ) );
+ connect( job, TQT_SIGNAL( result( KIO::Job * ) ),
+ TQT_SLOT( slotSearchResult( KIO::Job * ) ) );
}
else
{ // for the "/ folder" of an imap account, searching blocks the kioslave
- slotSearchData( job, QString() );
+ slotSearchData( job, TQString() );
slotSearchResult( job );
}
}
//-----------------------------------------------------------------------------
-QString SearchJob::searchStringFromPattern( const KMSearchPattern* pattern )
+TQString SearchJob::searchStringFromPattern( const KMSearchPattern* pattern )
{
- QStringList parts;
+ TQStringList parts;
// this is for the search pattern that can only be done local
mLocalSearchPattern = new KMSearchPattern();
mLocalSearchPattern->setOp( pattern->op() );
- for ( QPtrListIterator<KMSearchRule> it( *pattern ) ; it.current() ; ++it )
+ for ( TQPtrListIterator<KMSearchRule> it( *pattern ) ; it.current() ; ++it )
{
// construct an imap search command
bool accept = true;
- QString result;
- QString field = (*it)->field();
+ TQString result;
+ TQString field = (*it)->field();
// check if the operation is supported
if ( (*it)->function() == KMSearchRule::FuncContainsNot ) {
result = "NOT ";
@@ -161,7 +161,7 @@ QString SearchJob::searchStringFromPattern( const KMSearchPattern* pattern )
}
}
- QString search;
+ TQString search;
if ( !parts.isEmpty() ) {
if ( pattern->op() == KMSearchPattern::OpOr && parts.size() > 1 ) {
search = "(OR " + parts.join(" ") + ")";
@@ -176,7 +176,7 @@ QString SearchJob::searchStringFromPattern( const KMSearchPattern* pattern )
}
//-----------------------------------------------------------------------------
-void SearchJob::slotSearchData( KIO::Job* job, const QString& data )
+void SearchJob::slotSearchData( KIO::Job* job, const TQString& data )
{
if ( job && job->error() ) {
// error is handled in slotSearchResult
@@ -186,12 +186,12 @@ void SearchJob::slotSearchData( KIO::Job* job, const QString& data )
if ( mLocalSearchPattern->isEmpty() && data.isEmpty() )
{
// no local search and the server found nothing
- QValueList<Q_UINT32> serNums;
+ TQValueList<Q_UINT32> serNums;
emit searchDone( serNums, mSearchPattern, true );
} else
{
// remember the uids the server found
- mImapSearchHits = QStringList::split( " ", data );
+ mImapSearchHits = TQStringList::split( " ", data );
if ( canMapAllUIDs() )
{
@@ -199,8 +199,8 @@ void SearchJob::slotSearchData( KIO::Job* job, const QString& data )
} else
{
// get the folder to make sure we have all messages
- connect ( mFolder, SIGNAL( folderComplete( KMFolderImap*, bool ) ),
- this, SLOT( slotSearchFolder()) );
+ connect ( mFolder, TQT_SIGNAL( folderComplete( KMFolderImap*, bool ) ),
+ this, TQT_SLOT( slotSearchFolder()) );
mFolder->getFolder();
}
}
@@ -209,7 +209,7 @@ void SearchJob::slotSearchData( KIO::Job* job, const QString& data )
//-----------------------------------------------------------------------------
bool SearchJob::canMapAllUIDs()
{
- for ( QStringList::Iterator it = mImapSearchHits.begin();
+ for ( TQStringList::Iterator it = mImapSearchHits.begin();
it != mImapSearchHits.end(); ++it )
{
if ( mFolder->serNumForUID( (*it).toULong() ) == 0 )
@@ -221,13 +221,13 @@ bool SearchJob::canMapAllUIDs()
//-----------------------------------------------------------------------------
void SearchJob::slotSearchFolder()
{
- disconnect ( mFolder, SIGNAL( folderComplete( KMFolderImap*, bool ) ),
- this, SLOT( slotSearchFolder()) );
+ disconnect ( mFolder, TQT_SIGNAL( folderComplete( KMFolderImap*, bool ) ),
+ this, TQT_SLOT( slotSearchFolder()) );
if ( mLocalSearchPattern->isEmpty() ) {
// pure imap search - now get the serial number for the UIDs
- QValueList<Q_UINT32> serNums;
- for ( QStringList::Iterator it = mImapSearchHits.begin();
+ TQValueList<Q_UINT32> serNums;
+ for ( TQStringList::Iterator it = mImapSearchHits.begin();
it != mImapSearchHits.end(); ++it )
{
ulong serNum = mFolder->serNumForUID( (*it).toULong() );
@@ -250,14 +250,14 @@ void SearchJob::slotSearchFolder()
bool needToDownload = needsDownload();
if ( needToDownload ) {
// so we need to download all messages and check
- QString question = i18n("To execute your search all messages of the folder %1 "
+ TQString question = i18n("To execute your search all messages of the folder %1 "
"have to be downloaded from the server. This may take some time. "
"Do you want to continue your search?").arg( mFolder->label() );
if ( KMessageBox::warningContinueCancel( 0, question,
i18n("Continue Search"), i18n("&Search"),
"continuedownloadingforsearch" ) != KMessageBox::Continue )
{
- QValueList<Q_UINT32> serNums;
+ TQValueList<Q_UINT32> serNums;
emit searchDone( serNums, mSearchPattern, true );
return;
}
@@ -267,12 +267,12 @@ void SearchJob::slotSearchFolder()
mProgress = ProgressManager::createProgressItem(
"ImapSearchDownload" + ProgressManager::getUniqueID(),
i18n("Downloading emails from IMAP server"),
- i18n( "URL: %1" ).arg( QStyleSheet::escape( mFolder->folder()->prettyURL() ) ),
+ i18n( "URL: %1" ).arg( TQStyleSheet::escape( mFolder->folder()->prettyURL() ) ),
true,
mAccount->useSSL() || mAccount->useTLS() );
mProgress->setTotalItems( numMsgs );
- connect ( mProgress, SIGNAL( progressItemCanceled( KPIM::ProgressItem*)),
- this, SLOT( slotAbortSearch( KPIM::ProgressItem* ) ) );
+ connect ( mProgress, TQT_SIGNAL( progressItemCanceled( KPIM::ProgressItem*)),
+ this, TQT_SLOT( slotAbortSearch( KPIM::ProgressItem* ) ) );
for ( unsigned int i = 0; i < numMsgs ; ++i ) {
KMMessage * msg = mFolder->getMsg( i );
@@ -280,8 +280,8 @@ void SearchJob::slotSearchFolder()
ImapJob *job = new ImapJob( msg );
job->setParentFolder( mFolder );
job->setParentProgressItem( mProgress );
- connect( job, SIGNAL(messageRetrieved(KMMessage*)),
- this, SLOT(slotSearchMessageArrived(KMMessage*)) );
+ connect( job, TQT_SIGNAL(messageRetrieved(KMMessage*)),
+ this, TQT_SLOT(slotSearchMessageArrived(KMMessage*)) );
job->start();
} else {
slotSearchMessageArrived( msg );
@@ -305,7 +305,7 @@ void SearchJob::slotSearchMessageArrived( KMMessage* msg )
// imap and local search have to match
if ( mLocalSearchPattern->matches( msg ) &&
( mImapSearchHits.isEmpty() ||
- mImapSearchHits.find( QString::number(msg->UID() ) ) != mImapSearchHits.end() ) ) {
+ mImapSearchHits.find( TQString::number(msg->UID() ) ) != mImapSearchHits.end() ) ) {
Q_UINT32 serNum = msg->getMsgSerNum();
mSearchSerNums.append( serNum );
matches = true;
@@ -313,7 +313,7 @@ void SearchJob::slotSearchMessageArrived( KMMessage* msg )
} else if ( mLocalSearchPattern->op() == KMSearchPattern::OpOr ) {
// imap or local search have to match
if ( mLocalSearchPattern->matches( msg ) ||
- mImapSearchHits.find( QString::number(msg->UID()) ) != mImapSearchHits.end() ) {
+ mImapSearchHits.find( TQString::number(msg->UID()) ) != mImapSearchHits.end() ) {
Q_UINT32 serNum = msg->getMsgSerNum();
mSearchSerNums.append( serNum );
matches = true;
@@ -352,7 +352,7 @@ void SearchJob::slotSearchResult( KIO::Job *job )
if ( mSerNum == 0 )
{
// folder
- QValueList<Q_UINT32> serNums;
+ TQValueList<Q_UINT32> serNums;
emit searchDone( serNums, mSearchPattern, true );
} else {
// message
@@ -364,11 +364,11 @@ void SearchJob::slotSearchResult( KIO::Job *job )
//-----------------------------------------------------------------------------
void SearchJob::searchSingleMessage()
{
- QString searchString = searchStringFromPattern( mSearchPattern );
+ TQString searchString = searchStringFromPattern( mSearchPattern );
if ( searchString.isEmpty() )
{
// no imap search
- slotSearchDataSingleMessage( 0, QString::null );
+ slotSearchDataSingleMessage( 0, TQString::null );
} else
{
// imap search
@@ -379,23 +379,23 @@ void SearchJob::searchSingleMessage()
KMMsgBase *mb = mFolder->getMsgBase( idx );
// only search for that UID
- searchString += " UID " + QString::number( mb->UID() );
+ searchString += " UID " + TQString::number( mb->UID() );
KURL url = mAccount->getUrl();
url.setPath( mFolder->imapPath() + ";SECTION=" + searchString );
- QByteArray packedArgs;
- QDataStream stream( packedArgs, IO_WriteOnly );
+ TQByteArray packedArgs;
+ TQDataStream stream( packedArgs, IO_WriteOnly );
stream << (int) 'E' << url;
KIO::SimpleJob *job = KIO::special( url, packedArgs, false );
KIO::Scheduler::assignJobToSlave(mAccount->slave(), job);
- connect( job, SIGNAL(infoMessage(KIO::Job*,const QString&)),
- SLOT(slotSearchDataSingleMessage(KIO::Job*,const QString&)) );
- connect( job, SIGNAL(result(KIO::Job *)),
- SLOT(slotSearchResult(KIO::Job *)) );
+ connect( job, TQT_SIGNAL(infoMessage(KIO::Job*,const TQString&)),
+ TQT_SLOT(slotSearchDataSingleMessage(KIO::Job*,const TQString&)) );
+ connect( job, TQT_SIGNAL(result(KIO::Job *)),
+ TQT_SLOT(slotSearchResult(KIO::Job *)) );
}
}
//-----------------------------------------------------------------------------
-void SearchJob::slotSearchDataSingleMessage( KIO::Job* job, const QString& data )
+void SearchJob::slotSearchDataSingleMessage( KIO::Job* job, const TQString& data )
{
if ( job && job->error() ) {
// error is handled in slotSearchResult
@@ -408,7 +408,7 @@ void SearchJob::slotSearchDataSingleMessage( KIO::Job* job, const QString& data
return;
}
// remember what the server found
- mImapSearchHits = QStringList::split( " ", data );
+ mImapSearchHits = TQStringList::split( " ", data );
// add the local search
int idx = -1;
@@ -420,8 +420,8 @@ void SearchJob::slotSearchDataSingleMessage( KIO::Job* job, const QString& data
if ( needsDownload() ) {
ImapJob *job = new ImapJob( msg );
job->setParentFolder( mFolder );
- connect( job, SIGNAL(messageRetrieved(KMMessage*)),
- this, SLOT(slotSearchMessageArrived(KMMessage*)) );
+ connect( job, TQT_SIGNAL(messageRetrieved(KMMessage*)),
+ this, TQT_SLOT(slotSearchMessageArrived(KMMessage*)) );
job->start();
} else {
slotSearchMessageArrived( msg );
@@ -434,14 +434,14 @@ void SearchJob::slotAbortSearch( KPIM::ProgressItem* item )
if ( item )
item->setComplete();
mAccount->killAllJobs();
- QValueList<Q_UINT32> serNums;
+ TQValueList<Q_UINT32> serNums;
emit searchDone( serNums, mSearchPattern, true );
}
//-----------------------------------------------------------------------------
bool SearchJob::needsDownload()
{
- for ( QPtrListIterator<KMSearchRule> it( *mLocalSearchPattern ) ; it.current() ; ++it ) {
+ for ( TQPtrListIterator<KMSearchRule> it( *mLocalSearchPattern ) ; it.current() ; ++it ) {
if ( (*it)->field() != "<status>" ) {
return true;
}
diff --git a/kmail/searchjob.h b/kmail/searchjob.h
index 5a655c62a..d48d96b6d 100644
--- a/kmail/searchjob.h
+++ b/kmail/searchjob.h
@@ -28,7 +28,7 @@
#ifndef SEARCHJOB_H
#define SEARCHJOB_H
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include "folderjob.h"
class KMFolderImap;
@@ -77,7 +77,7 @@ protected:
void searchSingleMessage();
// creates an imap search command
- QString searchStringFromPattern( const KMSearchPattern* );
+ TQString searchStringFromPattern( const KMSearchPattern* );
// returns true if all uids can be mapped to sernums
bool canMapAllUIDs();
@@ -91,7 +91,7 @@ protected slots:
void slotSearchFolder();
// processes the server answer
- void slotSearchData( KIO::Job* job, const QString& data );
+ void slotSearchData( KIO::Job* job, const TQString& data );
// message is downloaded and searched
void slotSearchMessageArrived( KMMessage* msg );
@@ -100,14 +100,14 @@ protected slots:
void slotSearchResult( KIO::Job *job );
// imap search result from a single message
- void slotSearchDataSingleMessage( KIO::Job* job, const QString& data );
+ void slotSearchDataSingleMessage( KIO::Job* job, const TQString& data );
// the user cancelled the search progress
void slotAbortSearch( KPIM::ProgressItem* item );
signals:
// emitted when a list of matching serial numbers was found
- void searchDone( QValueList<Q_UINT32>, const KMSearchPattern*, bool complete );
+ void searchDone( TQValueList<Q_UINT32>, const KMSearchPattern*, bool complete );
// emitted when a single message (identified by the serial number) was checked
void searchDone( Q_UINT32, const KMSearchPattern*, bool matches );
@@ -119,9 +119,9 @@ protected:
KMSearchPattern* mLocalSearchPattern;
Q_UINT32 mSerNum;
// saves the results of the imap search
- QStringList mImapSearchHits;
+ TQStringList mImapSearchHits;
// collects the serial numbers from imap and local search
- QValueList<Q_UINT32> mSearchSerNums;
+ TQValueList<Q_UINT32> mSearchSerNums;
// the remaining messages that have to be downloaded for local search
uint mRemainingMsgs;
// progress item for local searches
diff --git a/kmail/searchwindow.cpp b/kmail/searchwindow.cpp
index 7b9ef5588..81d64167f 100644
--- a/kmail/searchwindow.cpp
+++ b/kmail/searchwindow.cpp
@@ -43,16 +43,16 @@
#include <kstdaction.h>
#include <kiconloader.h>
-#include <qcheckbox.h>
-#include <qlayout.h>
+#include <tqcheckbox.h>
+#include <tqlayout.h>
#include <klineedit.h>
-#include <qpushbutton.h>
-#include <qradiobutton.h>
-#include <qbuttongroup.h>
-#include <qcombobox.h>
-#include <qobjectlist.h> //for mPatternEdit->queryList( 0, "mRuleField" )->first();
-#include <qcursor.h>
-#include <qpopupmenu.h>
+#include <tqpushbutton.h>
+#include <tqradiobutton.h>
+#include <tqbuttongroup.h>
+#include <tqcombobox.h>
+#include <tqobjectlist.h> //for mPatternEdit->queryList( 0, "mRuleField" )->first();
+#include <tqcursor.h>
+#include <tqpopupmenu.h>
#include <maillistdrag.h>
using namespace KPIM;
@@ -71,13 +71,13 @@ const int SearchWindow::MSGID_COLUMN = 4;
class MatchListView : public KListView
{
public:
- MatchListView( QWidget *parent, SearchWindow* sw, const char* name = 0 ) :
+ MatchListView( TQWidget *parent, SearchWindow* sw, const char* name = 0 ) :
KListView( parent, name ),
mSearchWindow( sw )
{}
protected:
- virtual QDragObject* dragObject()
+ virtual TQDragObject* dragObject()
{
KMMessageList list = mSearchWindow->selectedMessages();
MailList mailList;
@@ -91,11 +91,11 @@ class MatchListView : public KListView
}
MailListDrag *d = new MailListDrag( mailList, viewport(), new KMTextSource );
- QPixmap pixmap;
+ TQPixmap pixmap;
if( mailList.count() == 1 )
- pixmap = QPixmap( DesktopIcon("message", KIcon::SizeSmall) );
+ pixmap = TQPixmap( DesktopIcon("message", KIcon::SizeSmall) );
else
- pixmap = QPixmap( DesktopIcon("kmultiple", KIcon::SizeSmall) );
+ pixmap = TQPixmap( DesktopIcon("kmultiple", KIcon::SizeSmall) );
d->setPixmap( pixmap );
return d;
@@ -117,7 +117,7 @@ SearchWindow::SearchWindow(KMMainWidget* w, const char* name,
mSortColumn(0),
mSortOrder(Ascending),
mFolder(0),
- mTimer(new QTimer(this, "mTimer")),
+ mTimer(new TQTimer(this, "mTimer")),
mLastFocus(0),
mKMMainWidget(w)
{
@@ -132,18 +132,18 @@ SearchWindow::SearchWindow(KMMainWidget* w, const char* name,
KConfig* config = KMKernel::config();
config->setGroup("SearchDialog");
- QWidget* searchWidget = new QWidget(this);
- QVBoxLayout *vbl = new QVBoxLayout( searchWidget, 0, spacingHint(), "kmfs_vbl" );
+ TQWidget* searchWidget = new TQWidget(this);
+ TQVBoxLayout *vbl = new TQVBoxLayout( searchWidget, 0, spacingHint(), "kmfs_vbl" );
- QButtonGroup * radioGroup = new QButtonGroup( searchWidget );
+ TQButtonGroup * radioGroup = new TQButtonGroup( searchWidget );
radioGroup->hide();
- mChkbxAllFolders = new QRadioButton(i18n("Search in &all local folders"), searchWidget);
+ mChkbxAllFolders = new TQRadioButton(i18n("Search in &all local folders"), searchWidget);
vbl->addWidget( mChkbxAllFolders );
radioGroup->insert( mChkbxAllFolders );
- QHBoxLayout *hbl = new QHBoxLayout( vbl, spacingHint(), "kmfs_hbl" );
- mChkbxSpecificFolders = new QRadioButton(i18n("Search &only in:"), searchWidget);
+ TQHBoxLayout *hbl = new TQHBoxLayout( vbl, spacingHint(), "kmfs_hbl" );
+ mChkbxSpecificFolders = new TQRadioButton(i18n("Search &only in:"), searchWidget);
hbl->addWidget(mChkbxSpecificFolders);
mChkbxSpecificFolders->setChecked(true);
radioGroup->insert( mChkbxSpecificFolders );
@@ -154,16 +154,16 @@ SearchWindow::SearchWindow(KMMainWidget* w, const char* name,
mCbxFolders->setFolder(curFolder);
hbl->addWidget(mCbxFolders);
- mChkSubFolders = new QCheckBox(i18n("I&nclude sub-folders"), searchWidget);
+ mChkSubFolders = new TQCheckBox(i18n("I&nclude sub-folders"), searchWidget);
mChkSubFolders->setChecked(true);
hbl->addWidget(mChkSubFolders);
- QWidget *spacer = new QWidget( searchWidget, "spacer" );
+ TQWidget *spacer = new TQWidget( searchWidget, "spacer" );
spacer->setMinimumHeight( 2 );
vbl->addWidget( spacer );
mPatternEdit = new KMSearchPatternEdit( "", searchWidget , "spe", false, true );
- mPatternEdit->setFrameStyle( QFrame::NoFrame | QFrame::Plain );
+ mPatternEdit->setFrameStyle( TQFrame::NoFrame | TQFrame::Plain );
mPatternEdit->setInsideMargin( 0 );
mSearchPattern = new KMSearchPattern();
KMFolderSearch *searchFolder = 0;
@@ -184,23 +184,23 @@ SearchWindow::SearchWindow(KMMainWidget* w, const char* name,
mFolder = searchFolder;
}
mPatternEdit->setSearchPattern( mSearchPattern );
- QObjectList *list = mPatternEdit->queryList( 0, "mRuleField" );
- QObject *object = 0;
+ TQObjectList *list = mPatternEdit->queryList( 0, "mRuleField" );
+ TQObject *object = 0;
if ( list )
object = list->first();
delete list;
- if (!searchFolder && object && ::qt_cast<QComboBox*>(object))
- static_cast<QComboBox*>(object)->setCurrentText("Subject");
+ if (!searchFolder && object && ::qt_cast<TQComboBox*>(object))
+ static_cast<TQComboBox*>(object)->setCurrentText("Subject");
vbl->addWidget( mPatternEdit );
// enable/disable widgets depending on radio buttons:
- connect( mChkbxSpecificFolders, SIGNAL(toggled(bool)),
- mCbxFolders, SLOT(setEnabled(bool)) );
- connect( mChkbxSpecificFolders, SIGNAL(toggled(bool)),
- mChkSubFolders, SLOT(setEnabled(bool)) );
- connect( mChkbxAllFolders, SIGNAL(toggled(bool)),
- this, SLOT(setEnabledSearchButton(bool)) );
+ connect( mChkbxSpecificFolders, TQT_SIGNAL(toggled(bool)),
+ mCbxFolders, TQT_SLOT(setEnabled(bool)) );
+ connect( mChkbxSpecificFolders, TQT_SIGNAL(toggled(bool)),
+ mChkSubFolders, TQT_SLOT(setEnabled(bool)) );
+ connect( mChkbxAllFolders, TQT_SIGNAL(toggled(bool)),
+ this, TQT_SLOT(setEnabledSearchButton(bool)) );
mLbxMatches = new MatchListView(searchWidget, this, "Find Messages");
@@ -231,22 +231,22 @@ SearchWindow::SearchWindow(KMMainWidget* w, const char* name,
config->readNumEntry("FolderWidth", 100));
mLbxMatches->addColumn(""); // should be hidden
- mLbxMatches->setColumnWidthMode( MSGID_COLUMN, QListView::Manual );
+ mLbxMatches->setColumnWidthMode( MSGID_COLUMN, TQListView::Manual );
mLbxMatches->setColumnWidth(MSGID_COLUMN, 0);
mLbxMatches->header()->setResizeEnabled(false, MSGID_COLUMN);
mLbxMatches->setDragEnabled( true );
- connect(mLbxMatches, SIGNAL(doubleClicked(QListViewItem *)),
- this, SLOT(slotShowMsg(QListViewItem *)));
- connect(mLbxMatches, SIGNAL(currentChanged(QListViewItem *)),
- this, SLOT(slotCurrentChanged(QListViewItem *)));
- connect( mLbxMatches, SIGNAL( contextMenuRequested( QListViewItem*, const QPoint &, int )),
- this, SLOT( slotContextMenuRequested( QListViewItem*, const QPoint &, int )));
+ connect(mLbxMatches, TQT_SIGNAL(doubleClicked(TQListViewItem *)),
+ this, TQT_SLOT(slotShowMsg(TQListViewItem *)));
+ connect(mLbxMatches, TQT_SIGNAL(currentChanged(TQListViewItem *)),
+ this, TQT_SLOT(slotCurrentChanged(TQListViewItem *)));
+ connect( mLbxMatches, TQT_SIGNAL( contextMenuRequested( TQListViewItem*, const TQPoint &, int )),
+ this, TQT_SLOT( slotContextMenuRequested( TQListViewItem*, const TQPoint &, int )));
vbl->addWidget(mLbxMatches);
- QHBoxLayout *hbl2 = new QHBoxLayout( vbl, spacingHint(), "kmfs_hbl2" );
- mSearchFolderLbl = new QLabel(i18n("Search folder &name:"), searchWidget);
+ TQHBoxLayout *hbl2 = new TQHBoxLayout( vbl, spacingHint(), "kmfs_hbl2" );
+ mSearchFolderLbl = new TQLabel(i18n("Search folder &name:"), searchWidget);
hbl2->addWidget(mSearchFolderLbl);
mSearchFolderEdt = new KLineEdit(searchWidget);
if (searchFolder)
@@ -256,25 +256,25 @@ SearchWindow::SearchWindow(KMMainWidget* w, const char* name,
mSearchFolderLbl->setBuddy(mSearchFolderEdt);
hbl2->addWidget(mSearchFolderEdt);
- mSearchFolderOpenBtn = new QPushButton(i18n("Op&en Search Folder"), searchWidget);
+ mSearchFolderOpenBtn = new TQPushButton(i18n("Op&en Search Folder"), searchWidget);
mSearchFolderOpenBtn->setEnabled(false);
hbl2->addWidget(mSearchFolderOpenBtn);
- connect( mSearchFolderEdt, SIGNAL( textChanged( const QString &)),
- this, SLOT( scheduleRename( const QString & )));
- connect( &mRenameTimer, SIGNAL( timeout() ),
- this, SLOT( renameSearchFolder() ));
- connect( mSearchFolderOpenBtn, SIGNAL( clicked() ),
- this, SLOT( openSearchFolder() ));
- mSearchResultOpenBtn = new QPushButton(i18n("Open &Message"), searchWidget);
+ connect( mSearchFolderEdt, TQT_SIGNAL( textChanged( const TQString &)),
+ this, TQT_SLOT( scheduleRename( const TQString & )));
+ connect( &mRenameTimer, TQT_SIGNAL( timeout() ),
+ this, TQT_SLOT( renameSearchFolder() ));
+ connect( mSearchFolderOpenBtn, TQT_SIGNAL( clicked() ),
+ this, TQT_SLOT( openSearchFolder() ));
+ mSearchResultOpenBtn = new TQPushButton(i18n("Open &Message"), searchWidget);
mSearchResultOpenBtn->setEnabled(false);
hbl2->addWidget(mSearchResultOpenBtn);
- connect( mSearchResultOpenBtn, SIGNAL( clicked() ),
- this, SLOT( slotShowSelectedMsg() ));
+ connect( mSearchResultOpenBtn, TQT_SIGNAL( clicked() ),
+ this, TQT_SLOT( slotShowSelectedMsg() ));
mStatusBar = new KStatusBar(searchWidget);
mStatusBar->insertFixedItem(i18n("AMiddleLengthText..."), 0, true);
mStatusBar->changeItem(i18n("Ready."), 0);
mStatusBar->setItemAlignment(0, AlignLeft | AlignVCenter);
- mStatusBar->insertItem(QString::null, 1, 1, true);
+ mStatusBar->insertItem(TQString::null, 1, 1, true);
mStatusBar->setItemAlignment(1, AlignLeft | AlignVCenter);
vbl->addWidget(mStatusBar);
@@ -285,20 +285,20 @@ SearchWindow::SearchWindow(KMMainWidget* w, const char* name,
resize(mainWidth, mainHeight);
setMainWidget(searchWidget);
- setButtonBoxOrientation(QWidget::Vertical);
+ setButtonBoxOrientation(TQWidget::Vertical);
mBtnSearch = actionButton(KDialogBase::User1);
mBtnStop = actionButton(KDialogBase::User2);
mBtnStop->setEnabled(false);
- connect(this, SIGNAL(user1Clicked()), SLOT(slotSearch()));
- connect(this, SIGNAL(user2Clicked()), SLOT(slotStop()));
- connect(this, SIGNAL(finished()), this, SLOT(deleteLater()));
+ connect(this, TQT_SIGNAL(user1Clicked()), TQT_SLOT(slotSearch()));
+ connect(this, TQT_SIGNAL(user2Clicked()), TQT_SLOT(slotStop()));
+ connect(this, TQT_SIGNAL(finished()), this, TQT_SLOT(deleteLater()));
// give focus to the value field of the first search rule
object = mPatternEdit->child( "regExpLineEdit" );
if ( object && object->isWidgetType() ) {
- static_cast<QWidget*>(object)->setFocus();
+ static_cast<TQWidget*>(object)->setFocus();
//kdDebug(5006) << "SearchWindow: focus has been given to widget "
// << object->name() << endl;
}
@@ -309,26 +309,26 @@ SearchWindow::SearchWindow(KMMainWidget* w, const char* name,
KActionCollection *ac = actionCollection();
ac->setWidget( this );
mReplyAction = new KAction( i18n("&Reply..."), "mail_reply", 0, this,
- SLOT(slotReplyToMsg()), ac, "search_reply" );
+ TQT_SLOT(slotReplyToMsg()), ac, "search_reply" );
mReplyAllAction = new KAction( i18n("Reply to &All..."), "mail_replyall",
- 0, this, SLOT(slotReplyAllToMsg()),
+ 0, this, TQT_SLOT(slotReplyAllToMsg()),
ac, "search_reply_all" );
mReplyListAction = new KAction( i18n("Reply to Mailing-&List..."),
"mail_replylist", 0, this,
- SLOT(slotReplyListToMsg()), ac,
+ TQT_SLOT(slotReplyListToMsg()), ac,
"search_reply_list" );
mForwardActionMenu = new KActionMenu( i18n("Message->","&Forward"),
"mail_forward", ac,
"search_message_forward" );
- connect( mForwardActionMenu, SIGNAL(activated()), this,
- SLOT(slotForwardInlineMsg()) );
+ connect( mForwardActionMenu, TQT_SIGNAL(activated()), this,
+ TQT_SLOT(slotForwardInlineMsg()) );
mForwardAttachedAction = new KAction( i18n("Message->Forward->","As &Attachment..."),
"mail_forward", 0, this,
- SLOT(slotForwardAttachedMsg()), ac,
+ TQT_SLOT(slotForwardAttachedMsg()), ac,
"search_message_forward_as_attachment" );
mForwardInlineAction = new KAction( i18n("&Inline..."),
"mail_forward", 0, this,
- SLOT(slotForwardInlineMsg()), ac,
+ TQT_SLOT(slotForwardInlineMsg()), ac,
"search_message_forward_inline" );
if ( GlobalSettings::self()->forwardingInlineByDefault() ) {
mForwardActionMenu->insert( mForwardInlineAction );
@@ -340,38 +340,38 @@ SearchWindow::SearchWindow(KMMainWidget* w, const char* name,
mForwardDigestAction = new KAction( i18n("Message->Forward->","As Di&gest..."),
"mail_forward", 0, this,
- SLOT(slotForwardDigestMsg()), ac,
+ TQT_SLOT(slotForwardDigestMsg()), ac,
"search_message_forward_as_digest" );
mForwardActionMenu->insert( mForwardDigestAction );
mRedirectAction = new KAction( i18n("Message->Forward->","&Redirect..."),
"mail_forward", 0, this,
- SLOT(slotRedirectMsg()), ac,
+ TQT_SLOT(slotRedirectMsg()), ac,
"search_message_forward_redirect" );
mForwardActionMenu->insert( mRedirectAction );
- mSaveAsAction = KStdAction::saveAs( this, SLOT(slotSaveMsg()), ac, "search_file_save_as" );
+ mSaveAsAction = KStdAction::saveAs( this, TQT_SLOT(slotSaveMsg()), ac, "search_file_save_as" );
mSaveAtchAction = new KAction( i18n("Save Attachments..."), "attach", 0,
- this, SLOT(slotSaveAttachments()), ac, "search_save_attachments" );
+ this, TQT_SLOT(slotSaveAttachments()), ac, "search_save_attachments" );
- mPrintAction = KStdAction::print( this, SLOT(slotPrintMsg()), ac, "search_print" );
+ mPrintAction = KStdAction::print( this, TQT_SLOT(slotPrintMsg()), ac, "search_print" );
mClearAction = new KAction( i18n("Clear Selection"), 0, 0, this,
- SLOT(slotClearSelection()), ac, "search_clear_selection" );
+ TQT_SLOT(slotClearSelection()), ac, "search_clear_selection" );
- mCopyAction = KStdAction::copy( this, SLOT(slotCopyMsgs()), ac, "search_copy_messages" );
- mCutAction = KStdAction::cut( this, SLOT(slotCutMsgs()), ac, "search_cut_messages" );
+ mCopyAction = KStdAction::copy( this, TQT_SLOT(slotCopyMsgs()), ac, "search_copy_messages" );
+ mCutAction = KStdAction::cut( this, TQT_SLOT(slotCutMsgs()), ac, "search_cut_messages" );
- connect(mTimer, SIGNAL(timeout()), this, SLOT(updStatus()));
- connect(kmkernel->searchFolderMgr(), SIGNAL(folderInvalidated(KMFolder*)),
- this, SLOT(folderInvalidated(KMFolder*)));
+ connect(mTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(updStatus()));
+ connect(kmkernel->searchFolderMgr(), TQT_SIGNAL(folderInvalidated(KMFolder*)),
+ this, TQT_SLOT(folderInvalidated(KMFolder*)));
- connect(mCbxFolders, SIGNAL(folderChanged(KMFolder*)),
- this, SLOT(slotFolderActivated()));
+ connect(mCbxFolders, TQT_SIGNAL(folderChanged(KMFolder*)),
+ this, TQT_SLOT(slotFolderActivated()));
}
//-----------------------------------------------------------------------------
SearchWindow::~SearchWindow()
{
- QValueListIterator<QGuardedPtr<KMFolder> > fit;
+ TQValueListIterator<TQGuardedPtr<KMFolder> > fit;
for ( fit = mFolders.begin(); fit != mFolders.end(); ++fit ) {
if (!(*fit))
continue;
@@ -401,10 +401,10 @@ void SearchWindow::setEnabledSearchButton(bool)
//-----------------------------------------------------------------------------
void SearchWindow::updStatus(void)
{
- QString genMsg, detailMsg, procMsg;
+ TQString genMsg, detailMsg, procMsg;
int numMatches = 0, numProcessed = 0;
KMSearch const *search = (mFolder) ? (mFolder->search()) : 0;
- QString folderName;
+ TQString folderName;
if (search) {
numMatches = search->foundCount();
numProcessed = search->searchCount();
@@ -436,7 +436,7 @@ void SearchWindow::updStatus(void)
//-----------------------------------------------------------------------------
-void SearchWindow::keyPressEvent(QKeyEvent *evt)
+void SearchWindow::keyPressEvent(TQKeyEvent *evt)
{
KMSearch const *search = (mFolder) ? mFolder->search() : 0;
bool searching = (search) ? search->running() : false;
@@ -488,14 +488,14 @@ void SearchWindow::slotSearch()
KMFolderMgr *mgr = kmkernel->searchFolderMgr();
if (mSearchFolderEdt->text().isEmpty())
mSearchFolderEdt->setText(i18n("Last Search"));
- QString baseName = mSearchFolderEdt->text();
- QString fullName = baseName;
+ TQString baseName = mSearchFolderEdt->text();
+ TQString fullName = baseName;
int count = 0;
KMFolder *folder;
while ((folder = mgr->find(fullName))) {
if (folder->storage()->inherits("KMFolderSearch"))
break;
- fullName = QString("%1 %2").arg(baseName).arg(++count);
+ fullName = TQString("%1 %2").arg(baseName).arg(++count);
}
if (!folder)
@@ -505,18 +505,18 @@ void SearchWindow::slotSearch()
mFolder = dynamic_cast<KMFolderSearch*>( folder->storage() );
}
mFolder->stopSearch();
- disconnect(mFolder, SIGNAL(msgAdded(int)),
- this, SLOT(slotAddMsg(int)));
- disconnect(mFolder, SIGNAL(msgRemoved(KMFolder*, Q_UINT32)),
- this, SLOT(slotRemoveMsg(KMFolder*, Q_UINT32)));
- connect(mFolder, SIGNAL(msgAdded(int)),
- this, SLOT(slotAddMsg(int)));
- connect(mFolder, SIGNAL(msgRemoved(KMFolder*, Q_UINT32)),
- this, SLOT(slotRemoveMsg(KMFolder*, Q_UINT32)));
+ disconnect(mFolder, TQT_SIGNAL(msgAdded(int)),
+ this, TQT_SLOT(slotAddMsg(int)));
+ disconnect(mFolder, TQT_SIGNAL(msgRemoved(KMFolder*, Q_UINT32)),
+ this, TQT_SLOT(slotRemoveMsg(KMFolder*, Q_UINT32)));
+ connect(mFolder, TQT_SIGNAL(msgAdded(int)),
+ this, TQT_SLOT(slotAddMsg(int)));
+ connect(mFolder, TQT_SIGNAL(msgRemoved(KMFolder*, Q_UINT32)),
+ this, TQT_SLOT(slotRemoveMsg(KMFolder*, Q_UINT32)));
mSearchFolderEdt->setEnabled(false);
KMSearch *search = new KMSearch();
- connect(search, SIGNAL(finished(bool)),
- this, SLOT(searchDone()));
+ connect(search, TQT_SIGNAL(finished(bool)),
+ this, TQT_SLOT(searchDone()));
if (mChkbxAllFolders->isChecked()) {
search->setRecursive(true);
} else {
@@ -541,7 +541,7 @@ void SearchWindow::searchDone()
mTimer->stop();
updStatus();
- QTimer::singleShot(0, this, SLOT(enableGUI()));
+ TQTimer::singleShot(0, this, TQT_SLOT(enableGUI()));
if(mLastFocus)
mLastFocus->setFocus();
if (mCloseRequested)
@@ -559,7 +559,7 @@ void SearchWindow::slotAddMsg(int idx)
return;
bool unget = !mFolder->isMessage(idx);
KMMessage *msg = mFolder->getMsg(idx);
- QString from, fName;
+ TQString from, fName;
KMFolder *pFolder = msg->parent();
if (!mFolders.contains(pFolder)) {
mFolders.append(pFolder);
@@ -577,7 +577,7 @@ void SearchWindow::slotAddMsg(int idx)
(void)new KListViewItem(mLbxMatches, mLbxMatches->lastItem(),
msg->subject(), from, msg->dateIsoStr(),
fName,
- QString::number(mFolder->serNum(idx)));
+ TQString::number(mFolder->serNum(idx)));
if (unget)
mFolder->unGetMsg(idx);
}
@@ -586,9 +586,9 @@ void SearchWindow::slotRemoveMsg(KMFolder *, Q_UINT32 serNum)
{
if (!mFolder)
return;
- QListViewItemIterator it(mLbxMatches);
+ TQListViewItemIterator it(mLbxMatches);
while (it.current()) {
- QListViewItem *item = *it;
+ TQListViewItem *item = *it;
if (serNum == (*it)->text(MSGID_COLUMN).toUInt()) {
delete item;
return;
@@ -614,21 +614,21 @@ void SearchWindow::slotClose()
//-----------------------------------------------------------------------------
-void SearchWindow::closeEvent(QCloseEvent *e)
+void SearchWindow::closeEvent(TQCloseEvent *e)
{
if (mFolder && mFolder->search() && mFolder->search()->running()) {
mCloseRequested = true;
//Cancel search in progress by setting the search folder search to
//the null search
mFolder->setSearch(new KMSearch());
- QTimer::singleShot(0, this, SLOT(slotClose()));
+ TQTimer::singleShot(0, this, TQT_SLOT(slotClose()));
} else {
KDialogBase::closeEvent(e);
}
}
//-----------------------------------------------------------------------------
-void SearchWindow::scheduleRename( const QString &s)
+void SearchWindow::scheduleRename( const TQString &s)
{
if (!s.isEmpty() && s != i18n("Last Search")) {
mRenameTimer.start(250, true);
@@ -644,7 +644,7 @@ void SearchWindow::renameSearchFolder()
{
if (mFolder && (mFolder->folder()->name() != mSearchFolderEdt->text())) {
int i = 1;
- QString name = mSearchFolderEdt->text();
+ TQString name = mSearchFolderEdt->text();
while (i < 100) {
if (!kmkernel->searchFolderMgr()->find( name )) {
mFolder->rename( name );
@@ -672,15 +672,15 @@ void SearchWindow::folderInvalidated(KMFolder *folder)
if (folder->storage() == mFolder) {
mLbxMatches->clear();
if (mFolder->search())
- connect(mFolder->search(), SIGNAL(finished(bool)),
- this, SLOT(searchDone()));
+ connect(mFolder->search(), TQT_SIGNAL(finished(bool)),
+ this, TQT_SLOT(searchDone()));
mTimer->start(200);
enableGUI();
}
}
//-----------------------------------------------------------------------------
-bool SearchWindow::slotShowMsg(QListViewItem *item)
+bool SearchWindow::slotShowMsg(TQListViewItem *item)
{
if(!item)
return false;
@@ -709,7 +709,7 @@ void SearchWindow::slotShowSelectedMsg()
}
//-----------------------------------------------------------------------------
-void SearchWindow::slotCurrentChanged(QListViewItem *item)
+void SearchWindow::slotCurrentChanged(TQListViewItem *item)
{
mSearchResultOpenBtn->setEnabled(item!=0);
}
@@ -736,7 +736,7 @@ KMMessageList SearchWindow::selectedMessages()
KMMessageList msgList;
KMFolder* folder = 0;
int msgIndex = -1;
- for (QListViewItemIterator it(mLbxMatches); it.current(); it++)
+ for (TQListViewItemIterator it(mLbxMatches); it.current(); it++)
if (it.current()->isSelected()) {
KMMsgDict::instance()->getLocation((*it)->text(MSGID_COLUMN).toUInt(),
&folder, &msgIndex);
@@ -749,7 +749,7 @@ KMMessageList SearchWindow::selectedMessages()
//-----------------------------------------------------------------------------
KMMessage* SearchWindow::message()
{
- QListViewItem *item = mLbxMatches->currentItem();
+ TQListViewItem *item = mLbxMatches->currentItem();
KMFolder* folder = 0;
int msgIndex = -1;
if (!item)
@@ -802,7 +802,7 @@ void SearchWindow::updateContextMenuActions()
}
//-----------------------------------------------------------------------------
-void SearchWindow::slotContextMenuRequested( QListViewItem *lvi, const QPoint &, int )
+void SearchWindow::slotContextMenuRequested( TQListViewItem *lvi, const TQPoint &, int )
{
if (!lvi)
return;
@@ -811,14 +811,14 @@ void SearchWindow::slotContextMenuRequested( QListViewItem *lvi, const QPoint &,
// FIXME is this ever unGetMsg()'d?
if (!message())
return;
- QPopupMenu *menu = new QPopupMenu(this);
+ TQPopupMenu *menu = new TQPopupMenu(this);
updateContextMenuActions();
mMenuToFolder.clear();
- QPopupMenu *msgMoveMenu = new QPopupMenu(menu);
+ TQPopupMenu *msgMoveMenu = new TQPopupMenu(menu);
mKMMainWidget->folderTree()->folderToPopupMenu( KMFolderTree::MoveMessage,
this, &mMenuToFolder, msgMoveMenu );
- QPopupMenu *msgCopyMenu = new QPopupMenu(menu);
+ TQPopupMenu *msgCopyMenu = new TQPopupMenu(menu);
mKMMainWidget->folderTree()->folderToPopupMenu( KMFolderTree::CopyMessage,
this, &mMenuToFolder, msgCopyMenu );
@@ -838,7 +838,7 @@ void SearchWindow::slotContextMenuRequested( QListViewItem *lvi, const QPoint &,
mPrintAction->plug(menu);
menu->insertSeparator();
mClearAction->plug(menu);
- menu->exec (QCursor::pos(), 0);
+ menu->exec (TQCursor::pos(), 0);
delete menu;
}
@@ -925,13 +925,13 @@ void SearchWindow::slotPrintMsg()
void SearchWindow::slotCopyMsgs()
{
- QValueList<Q_UINT32> list = MessageCopyHelper::serNumListFromMsgList( selectedMessages() );
+ TQValueList<Q_UINT32> list = MessageCopyHelper::serNumListFromMsgList( selectedMessages() );
mKMMainWidget->headers()->setCopiedMessages( list, false );
}
void SearchWindow::slotCutMsgs()
{
- QValueList<Q_UINT32> list = MessageCopyHelper::serNumListFromMsgList( selectedMessages() );
+ TQValueList<Q_UINT32> list = MessageCopyHelper::serNumListFromMsgList( selectedMessages() );
mKMMainWidget->headers()->setCopiedMessages( list, true );
}
diff --git a/kmail/searchwindow.h b/kmail/searchwindow.h
index 62c6e6ce3..ac0b203c4 100644
--- a/kmail/searchwindow.h
+++ b/kmail/searchwindow.h
@@ -21,11 +21,11 @@
#ifndef searchwindow_h
#define searchwindow_h
-#include <qvaluelist.h>
-#include <qptrlist.h>
-#include <qstringlist.h>
-#include <qguardedptr.h>
-#include <qtimer.h>
+#include <tqvaluelist.h>
+#include <tqptrlist.h>
+#include <tqstringlist.h>
+#include <tqguardedptr.h>
+#include <tqtimer.h>
#include <kdialogbase.h>
#include <kxmlguiclient.h>
@@ -55,7 +55,7 @@ namespace KMail {
class FolderRequester;
}
-typedef QPtrList<KMMsgBase> KMMessageList;
+typedef TQPtrList<KMMsgBase> KMMessageList;
namespace KMail {
@@ -109,15 +109,15 @@ protected slots:
virtual void slotClose();
virtual void slotSearch();
virtual void slotStop();
- void scheduleRename( const QString &);
+ void scheduleRename( const TQString &);
void renameSearchFolder();
void openSearchFolder();
void folderInvalidated(KMFolder *);
- virtual bool slotShowMsg(QListViewItem *);
+ virtual bool slotShowMsg(TQListViewItem *);
void slotShowSelectedMsg();
- void slotCurrentChanged(QListViewItem *);
+ void slotCurrentChanged(TQListViewItem *);
virtual void updateContextMenuActions();
- virtual void slotContextMenuRequested( QListViewItem*, const QPoint &, int );
+ virtual void slotContextMenuRequested( TQListViewItem*, const TQPoint &, int );
virtual void copySelectedToFolder( int menuId );
virtual void moveSelectedToFolder( int menuId );
virtual void slotFolderActivated();
@@ -146,10 +146,10 @@ protected slots:
protected:
/** Reimplemented to react to Escape. */
- virtual void keyPressEvent(QKeyEvent*);
+ virtual void keyPressEvent(TQKeyEvent*);
/** Reimplemented to stop searching when the window is closed */
- virtual void closeEvent(QCloseEvent*);
+ virtual void closeEvent(TQCloseEvent*);
protected:
bool mStopped;
@@ -157,31 +157,31 @@ protected:
int mFetchingInProgress;
int mSortColumn;
SortOrder mSortOrder;
- QGuardedPtr<KMFolderSearch> mFolder;
- QTimer *mTimer;
+ TQGuardedPtr<KMFolderSearch> mFolder;
+ TQTimer *mTimer;
// GC'd by Qt
- QRadioButton *mChkbxAllFolders;
- QRadioButton *mChkbxSpecificFolders;
+ TQRadioButton *mChkbxAllFolders;
+ TQRadioButton *mChkbxSpecificFolders;
KMail::FolderRequester *mCbxFolders;
- QPushButton *mBtnSearch;
- QPushButton *mBtnStop;
- QCheckBox *mChkSubFolders;
+ TQPushButton *mBtnSearch;
+ TQPushButton *mBtnStop;
+ TQCheckBox *mChkSubFolders;
KListView* mLbxMatches;
- QLabel *mSearchFolderLbl;
- QLineEdit *mSearchFolderEdt;
- QPushButton *mSearchFolderOpenBtn;
- QPushButton *mSearchResultOpenBtn;
+ TQLabel *mSearchFolderLbl;
+ TQLineEdit *mSearchFolderEdt;
+ TQPushButton *mSearchFolderOpenBtn;
+ TQPushButton *mSearchResultOpenBtn;
KStatusBar* mStatusBar;
- QWidget* mLastFocus; // to remember the position of the focus
- QMap<int,KMFolder*> mMenuToFolder;
+ TQWidget* mLastFocus; // to remember the position of the focus
+ TQMap<int,KMFolder*> mMenuToFolder;
KAction *mReplyAction, *mReplyAllAction, *mReplyListAction, *mSaveAsAction,
*mForwardInlineAction, *mForwardAttachedAction, *mForwardDigestAction,
*mRedirectAction, *mPrintAction, *mClearAction, *mSaveAtchAction,
*mCopyAction, *mCutAction;
KActionMenu *mForwardActionMenu;
- QValueList<QGuardedPtr<KMFolder> > mFolders;
- QTimer mRenameTimer;
+ TQValueList<TQGuardedPtr<KMFolder> > mFolders;
+ TQTimer mRenameTimer;
// not owned by us
KMMainWidget* mKMMainWidget;
diff --git a/kmail/secondarywindow.cpp b/kmail/secondarywindow.cpp
index 396036e24..272be70cd 100644
--- a/kmail/secondarywindow.cpp
+++ b/kmail/secondarywindow.cpp
@@ -57,7 +57,7 @@ namespace KMail {
//---------------------------------------------------------------------------
- void SecondaryWindow::closeEvent( QCloseEvent * e )
+ void SecondaryWindow::closeEvent( TQCloseEvent * e )
{
// if there's a system tray applet then just do what needs to be done if a
// window is closed.
diff --git a/kmail/secondarywindow.h b/kmail/secondarywindow.h
index 3319c07aa..dbe787178 100644
--- a/kmail/secondarywindow.h
+++ b/kmail/secondarywindow.h
@@ -55,7 +55,7 @@ namespace KMail {
* last _visible_ secondary window is closed in case a system tray applet
* exists.
*/
- virtual void closeEvent( QCloseEvent * );
+ virtual void closeEvent( TQCloseEvent * );
};
} // namespace KMail
diff --git a/kmail/sieveconfig.cpp b/kmail/sieveconfig.cpp
index 872dee01d..2d320883a 100644
--- a/kmail/sieveconfig.cpp
+++ b/kmail/sieveconfig.cpp
@@ -23,9 +23,9 @@
#include <kdialog.h>
#include <kconfigbase.h>
-#include <qlayout.h>
-#include <qcheckbox.h>
-#include <qlabel.h>
+#include <tqlayout.h>
+#include <tqcheckbox.h>
+#include <tqlabel.h>
#include <klineedit.h>
@@ -53,39 +53,39 @@ namespace KMail {
config.writeEntry( "sieve-vacation-filename", mVacationFileName );
}
- SieveConfigEditor::SieveConfigEditor( QWidget * parent, const char * name )
- : QWidget( parent, name )
+ SieveConfigEditor::SieveConfigEditor( TQWidget * parent, const char * name )
+ : TQWidget( parent, name )
{
// tmp. vars:
int row = -1;
- QLabel * label;
+ TQLabel * label;
- QGridLayout * glay = new QGridLayout( this, 5, 2, 0, KDialog::spacingHint() );
+ TQGridLayout * glay = new TQGridLayout( this, 5, 2, 0, KDialog::spacingHint() );
glay->setRowStretch( 4, 1 );
glay->setColStretch( 1, 1 );
// "Server supports sieve" checkbox:
++row;
- mManagesieveCheck = new QCheckBox( i18n("&Server supports Sieve"), this );
+ mManagesieveCheck = new TQCheckBox( i18n("&Server supports Sieve"), this );
glay->addMultiCellWidget( mManagesieveCheck, row, row, 0, 1 );
- connect( mManagesieveCheck, SIGNAL(toggled(bool)), SLOT(slotEnableWidgets()) );
+ connect( mManagesieveCheck, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotEnableWidgets()) );
// "reuse host and login config" checkbox:
++row;
- mSameConfigCheck = new QCheckBox( i18n("&Reuse host and login configuration"), this );
+ mSameConfigCheck = new TQCheckBox( i18n("&Reuse host and login configuration"), this );
mSameConfigCheck->setChecked( true );
mSameConfigCheck->setEnabled( false );
glay->addMultiCellWidget( mSameConfigCheck, row, row, 0, 1 );
- connect( mSameConfigCheck, SIGNAL(toggled(bool)), SLOT(slotEnableWidgets()) );
+ connect( mSameConfigCheck, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotEnableWidgets()) );
// "Managesieve port" spinbox and label:
++row;
mPortSpin = new KIntSpinBox( 1, USHRT_MAX, 1, 2000, 10, this );
mPortSpin->setEnabled( false );
- label = new QLabel( mPortSpin, i18n("Managesieve &port:"), this );
+ label = new TQLabel( mPortSpin, i18n("Managesieve &port:"), this );
glay->addWidget( label, row, 0 );
glay->addWidget( mPortSpin, row, 1 );
@@ -93,7 +93,7 @@ namespace KMail {
++row;
mAlternateURLEdit = new KLineEdit( this );
mAlternateURLEdit->setEnabled( false );
- glay->addWidget( new QLabel( mAlternateURLEdit, i18n("&Alternate URL:"), this ), row, 0 );
+ glay->addWidget( new TQLabel( mAlternateURLEdit, i18n("&Alternate URL:"), this ), row, 0 );
glay->addWidget( mAlternateURLEdit, row, 1 );
// row 4 is spacer
@@ -139,7 +139,7 @@ namespace KMail {
return KURL();
if ( url.hasPass() )
- url.setPass( QString::null );
+ url.setPass( TQString::null );
return url;
}
@@ -149,11 +149,11 @@ namespace KMail {
}
- QString SieveConfigEditor::vacationFileName() const {
+ TQString SieveConfigEditor::vacationFileName() const {
return mVacationFileName;
}
- void SieveConfigEditor::setVacationFileName( const QString& name ) {
+ void SieveConfigEditor::setVacationFileName( const TQString& name ) {
mVacationFileName = name;
}
diff --git a/kmail/sieveconfig.h b/kmail/sieveconfig.h
index 55c63cc55..39bbe4ae7 100644
--- a/kmail/sieveconfig.h
+++ b/kmail/sieveconfig.h
@@ -15,7 +15,7 @@
#ifndef __KMAIL_SIEVECONFIG_H__
#define __KMAIL_SIEVECONFIG_H__
-#include <qwidget.h>
+#include <tqwidget.h>
#include <kurl.h>
@@ -30,7 +30,7 @@ namespace KMail {
public:
SieveConfig( bool managesieveSupported=false, bool reuseConfig=true,
unsigned int port=2000, const KURL & alternateURL=KURL(),
- const QString& vacationFileName = QString::null )
+ const TQString& vacationFileName = TQString::null )
: mManagesieveSupported( managesieveSupported ),
mReuseConfig( reuseConfig ),
mPort( port ),
@@ -72,7 +72,7 @@ namespace KMail {
mAlternateURL = url;
}
- QString vacationFileName() const { return mVacationFileName; }
+ TQString vacationFileName() const { return mVacationFileName; }
void readConfig( const KConfigBase & config );
void writeConfig( KConfigBase & config ) const;
@@ -82,13 +82,13 @@ namespace KMail {
bool mReuseConfig;
unsigned short mPort;
KURL mAlternateURL;
- QString mVacationFileName;
+ TQString mVacationFileName;
};
- class SieveConfigEditor : public QWidget {
+ class SieveConfigEditor : public TQWidget {
Q_OBJECT
public:
- SieveConfigEditor( QWidget * parent=0, const char * name=0 );
+ SieveConfigEditor( TQWidget * parent=0, const char * name=0 );
bool managesieveSupported() const;
virtual void setManagesieveSupported( bool enable );
@@ -102,8 +102,8 @@ namespace KMail {
KURL alternateURL() const;
virtual void setAlternateURL( const KURL & url );
- QString vacationFileName() const;
- virtual void setVacationFileName( const QString & url );
+ TQString vacationFileName() const;
+ virtual void setVacationFileName( const TQString & url );
SieveConfig config() const {
return SieveConfig( managesieveSupported(), reuseConfig(),
@@ -116,11 +116,11 @@ namespace KMail {
void slotEnableWidgets();
protected:
- QCheckBox * mManagesieveCheck;
- QCheckBox * mSameConfigCheck;
+ TQCheckBox * mManagesieveCheck;
+ TQCheckBox * mSameConfigCheck;
KIntSpinBox * mPortSpin;
- QLineEdit * mAlternateURLEdit;
- QString mVacationFileName;
+ TQLineEdit * mAlternateURLEdit;
+ TQString mVacationFileName;
};
} // namespace KMail
diff --git a/kmail/sievedebugdialog.cpp b/kmail/sievedebugdialog.cpp
index 30a34136a..5ab305e83 100644
--- a/kmail/sievedebugdialog.cpp
+++ b/kmail/sievedebugdialog.cpp
@@ -25,7 +25,7 @@
#include <cassert>
#include <limits.h>
-#include <qdatetime.h>
+#include <tqdatetime.h>
#include <kdebug.h>
#include <klocale.h>
@@ -43,7 +43,7 @@
using KMail::AccountManager;
#include "kmkernel.h"
#include "sievejob.h"
-#include <qtextedit.h>
+#include <tqtextedit.h>
using KMail::SieveJob;
using KMime::Types::AddrSpecList;
@@ -77,7 +77,7 @@ public:
}
private:
- void commandStart( const QString & identifier )
+ void commandStart( const TQString & identifier )
{
kdDebug( 5006 ) << k_funcinfo << "Identifier: '" << identifier << "'" << endl;
reset();
@@ -88,7 +88,7 @@ private:
kdDebug( 5006 ) << k_funcinfo << endl;
}
- void testStart( const QString & )
+ void testStart( const TQString & )
{
kdDebug( 5006 ) << k_funcinfo << endl;
}
@@ -118,12 +118,12 @@ private:
kdDebug( 5006 ) << k_funcinfo << endl;
}
- void hashComment( const QString & )
+ void hashComment( const TQString & )
{
kdDebug( 5006 ) << k_funcinfo << endl;
}
- void bracketComment( const QString & )
+ void bracketComment( const TQString & )
{
kdDebug( 5006 ) << k_funcinfo << endl;
}
@@ -144,12 +144,12 @@ private:
kdDebug( 5006 ) << k_funcinfo << endl;
}
- void taggedArgument( const QString & tag )
+ void taggedArgument( const TQString & tag )
{
kdDebug( 5006 ) << k_funcinfo << "Tag: '" << tag << "'" << endl;
}
- void stringArgument( const QString & string, bool, const QString & )
+ void stringArgument( const TQString & string, bool, const TQString & )
{
kdDebug( 5006 ) << k_funcinfo << "String: '" << string << "'" << endl;
}
@@ -164,7 +164,7 @@ private:
kdDebug( 5006 ) << k_funcinfo << endl;
}
- void stringListEntry( const QString & string, bool, const QString & )
+ void stringListEntry( const TQString & string, bool, const TQString & )
{
kdDebug( 5006 ) << k_funcinfo << "String: '" << string << "'" << endl;
}
@@ -186,7 +186,7 @@ private:
namespace KMail
{
-SieveDebugDialog::SieveDebugDialog( QWidget *parent, const char *name )
+SieveDebugDialog::SieveDebugDialog( TQWidget *parent, const char *name )
: KDialogBase( parent, name, true, i18n( "Sieve Diagnostics" ), KDialogBase::Ok,
KDialogBase::Ok, true ),
mSieveJob( 0 )
@@ -197,16 +197,16 @@ SieveDebugDialog::SieveDebugDialog( QWidget *parent, const char *name )
for ( KMAccount *a = am->first(); a; a = am->next() )
mAccountList.append( a );
- mEdit = new QTextEdit( this );
+ mEdit = new TQTextEdit( this );
mEdit->setReadOnly(true);
setMainWidget( mEdit );
mEdit->setText( i18n( "Collecting diagnostic information about Sieve support...\n\n" ) );
- setInitialSize( QSize( 640, 480 ) );
+ setInitialSize( TQSize( 640, 480 ) );
if ( !mAccountList.isEmpty() )
- QTimer::singleShot( 0, this, SLOT( slotDiagNextAccount() ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( slotDiagNextAccount() ) );
}
SieveDebugDialog::~SieveDebugDialog()
@@ -256,8 +256,8 @@ void SieveDebugDialog::slotDiagNextAccount()
mSieveJob = SieveJob::list( mUrl );
- connect( mSieveJob, SIGNAL( gotList( KMail::SieveJob *, bool, const QStringList &, const QString & ) ),
- SLOT( slotGetScriptList( KMail::SieveJob *, bool, const QStringList &, const QString & ) ) );
+ connect( mSieveJob, TQT_SIGNAL( gotList( KMail::SieveJob *, bool, const TQStringList &, const TQString & ) ),
+ TQT_SLOT( slotGetScriptList( KMail::SieveJob *, bool, const TQStringList &, const TQString & ) ) );
// Bypass the singleShot timer -- it's fired when we get our data
return;
@@ -267,7 +267,7 @@ void SieveDebugDialog::slotDiagNextAccount()
}
// Handle next account async
- QTimer::singleShot( 0, this, SLOT( slotDiagNextAccount() ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( slotDiagNextAccount() ) );
}
void SieveDebugDialog::slotDiagNextScript()
@@ -276,11 +276,11 @@ void SieveDebugDialog::slotDiagNextScript()
{
// Continue handling accounts instead
mScriptList.clear();
- QTimer::singleShot( 0, this, SLOT( slotDiagNextAccount() ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( slotDiagNextAccount() ) );
return;
}
- QString scriptFile = mScriptList.first();
+ TQString scriptFile = mScriptList.first();
mScriptList.pop_front();
mEdit->append( i18n( "Contents of script '%1':\n" ).arg( scriptFile ) );
@@ -303,12 +303,12 @@ void SieveDebugDialog::slotDiagNextScript()
mSieveJob = SieveJob::get( mUrl );
- connect( mSieveJob, SIGNAL( gotScript( KMail::SieveJob *, bool, const QString &, bool ) ),
- SLOT( slotGetScript( KMail::SieveJob *, bool, const QString &, bool ) ) );
+ connect( mSieveJob, TQT_SIGNAL( gotScript( KMail::SieveJob *, bool, const TQString &, bool ) ),
+ TQT_SLOT( slotGetScript( KMail::SieveJob *, bool, const TQString &, bool ) ) );
}
void SieveDebugDialog::slotGetScript( SieveJob * /* job */, bool success,
- const QString &script, bool active )
+ const TQString &script, bool active )
{
kdDebug( 5006 ) << "SieveDebugDialog::slotGetScript( ??, " << success
<< ", ?, " << active << " )" << endl
@@ -329,25 +329,25 @@ void SieveDebugDialog::slotGetScript( SieveJob * /* job */, bool success,
}
// Fetch next script
- QTimer::singleShot( 0, this, SLOT( slotDiagNextScript() ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( slotDiagNextScript() ) );
}
void SieveDebugDialog::slotGetScriptList( SieveJob *job, bool success,
- const QStringList &scriptList, const QString &activeScript )
+ const TQStringList &scriptList, const TQString &activeScript )
{
kdDebug( 5006 ) << k_funcinfo << "Success: " << success << ", List: " << scriptList.join( ", " ) <<
", active: " << activeScript << endl;
mSieveJob = 0; // job deletes itself after returning from this slot!
mEdit->append( i18n( "Sieve capabilities:\n" ) );
- QStringList caps = job->sieveCapabilities();
+ TQStringList caps = job->sieveCapabilities();
if ( caps.isEmpty() )
{
mEdit->append( i18n( "(No special capabilities available)" ) );
}
else
{
- for ( QStringList::const_iterator it = caps.begin(); it != caps.end(); ++it )
+ for ( TQStringList::const_iterator it = caps.begin(); it != caps.end(); ++it )
mEdit->append( "* " + *it + "\n" );
mEdit->append( "\n" );
}
@@ -361,14 +361,14 @@ void SieveDebugDialog::slotGetScriptList( SieveJob *job, bool success,
else
{
mScriptList = scriptList;
- for ( QStringList::const_iterator it = scriptList.begin(); it != scriptList.end(); ++it )
+ for ( TQStringList::const_iterator it = scriptList.begin(); it != scriptList.end(); ++it )
mEdit->append( "* " + *it + "\n" );
mEdit->append( "\n" );
mEdit->append( i18n( "Active script: %1\n\n" ).arg( activeScript ) );
}
// Handle next job: dump scripts for this server
- QTimer::singleShot( 0, this, SLOT( slotDiagNextScript() ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( slotDiagNextScript() ) );
}
void SieveDebugDialog::slotDialogOk()
diff --git a/kmail/sievedebugdialog.h b/kmail/sievedebugdialog.h
index ba51368a7..384c003d1 100644
--- a/kmail/sievedebugdialog.h
+++ b/kmail/sievedebugdialog.h
@@ -34,7 +34,7 @@ namespace KMime
namespace Types
{
struct AddrSpec;
- typedef QValueList<AddrSpec> AddrSpecList;
+ typedef TQValueList<AddrSpec> AddrSpecList;
}
}
@@ -52,7 +52,7 @@ class SieveDebugDialog : public KDialogBase
Q_OBJECT
public:
- SieveDebugDialog( QWidget *parent = 0, const char *name = 0 );
+ SieveDebugDialog( TQWidget *parent = 0, const char *name = 0 );
virtual ~SieveDebugDialog();
protected:
@@ -62,8 +62,8 @@ signals:
void result( bool success );
protected slots:
- void slotGetScript( KMail::SieveJob *job, bool success, const QString &script, bool active );
- void slotGetScriptList( KMail::SieveJob *job, bool success, const QStringList &scriptList, const QString &activeScript );
+ void slotGetScript( KMail::SieveJob *job, bool success, const TQString &script, bool active );
+ void slotGetScriptList( KMail::SieveJob *job, bool success, const TQStringList &scriptList, const TQString &activeScript );
void slotDialogOk();
void slotPutActiveResult( KMail::SieveJob*, bool );
@@ -75,14 +75,14 @@ protected:
KMail::SieveJob *mSieveJob;
KURL mUrl;
- QTextEdit *mEdit;
+ TQTextEdit *mEdit;
// Copied from AccountManager, because we have to do an async iteration
// WARNING: When copy/pasting this code, be aware that accounts may
// get removed inbetween! For debugging this is good enough
// though. - Martijn
- QValueList<KMAccount *> mAccountList;
- QStringList mScriptList;
+ TQValueList<KMAccount *> mAccountList;
+ TQStringList mScriptList;
KMail::ImapAccountBase *mAccountBase;
};
diff --git a/kmail/sievejob.cpp b/kmail/sievejob.cpp
index c876c4284..ade08b1da 100644
--- a/kmail/sievejob.cpp
+++ b/kmail/sievejob.cpp
@@ -26,16 +26,16 @@ using KIO::UDSEntryList;
using KIO::UDSEntry;
#include <kdebug.h>
-#include <qtextcodec.h>
+#include <tqtextcodec.h>
#include <cassert>
namespace KMail {
- SieveJob::SieveJob( const KURL & url, const QString & script,
- const QValueStack<Command> & commands,
- QObject * parent, const char * name )
- : QObject( parent, name ),
+ SieveJob::SieveJob( const KURL & url, const TQString & script,
+ const TQValueStack<Command> & commands,
+ TQObject * parent, const char * name )
+ : TQObject( parent, name ),
mUrl( url ), mJob( 0 ), mDec( 0 ),
mScript( script ), mFileExists( DontKnow ), mCommands( commands ),
mShowProgressInfo(true)
@@ -44,11 +44,11 @@ namespace KMail {
schedule( commands.top(), true );
}
- SieveJob::SieveJob( const KURL & url, const QString & script,
- const QValueStack<Command> & commands,
+ SieveJob::SieveJob( const KURL & url, const TQString & script,
+ const TQValueStack<Command> & commands,
bool showProgressInfo,
- QObject * parent, const char * name )
- : QObject( parent, name ),
+ TQObject * parent, const char * name )
+ : TQObject( parent, name ),
mUrl( url ), mJob( 0 ), mDec( 0 ),
mScript( script ), mFileExists( DontKnow ), mCommands( commands ),
mShowProgressInfo(showProgressInfo)
@@ -72,14 +72,14 @@ namespace KMail {
case Get:
kdDebug(5006) << "SieveJob::schedule: get( " << mUrl.prettyURL() << " )" << endl;
mJob = KIO::get( mUrl, false /*reload*/, showProgressInfo );
- connect( mJob, SIGNAL(data(KIO::Job*,const QByteArray&)),
- SLOT(slotData(KIO::Job*,const QByteArray&)) );
+ connect( mJob, TQT_SIGNAL(data(KIO::Job*,const TQByteArray&)),
+ TQT_SLOT(slotData(KIO::Job*,const TQByteArray&)) );
break;
case Put:
kdDebug(5006) << "SieveJob::schedule: put( " << mUrl.prettyURL() << " )" << endl;
mJob = KIO::put( mUrl, 0600, true /*overwrite*/, false /*resume*/, showProgressInfo );
- connect( mJob, SIGNAL(dataReq(KIO::Job*,QByteArray&)),
- SLOT(slotDataReq(KIO::Job*,QByteArray&)) );
+ connect( mJob, TQT_SIGNAL(dataReq(KIO::Job*,TQByteArray&)),
+ TQT_SLOT(slotDataReq(KIO::Job*,TQByteArray&)) );
break;
case Activate:
kdDebug(5006) << "SieveJob::schedule: chmod( " << mUrl.prettyURL() << ", 0700 )"
@@ -95,23 +95,23 @@ namespace KMail {
kdDebug(5006) << "SieveJob::schedule: listDir( " << mUrl.prettyURL() << " )" << endl;
{
KURL url = mUrl;
- QString query = url.query(); //save query part, because KURL::cd() erases it
+ TQString query = url.query(); //save query part, because KURL::cd() erases it
if ( !url.fileName().isEmpty() )
url.cd("..");
url.setQuery( query );
kdDebug(5006) << "SieveJob::schedule: listDir's real URL: " << url.prettyURL()
<< endl;
mJob = KIO::listDir( url, showProgressInfo );
- connect( mJob, SIGNAL(entries(KIO::Job*,const KIO::UDSEntryList&)),
- SLOT(slotEntries(KIO::Job*,const KIO::UDSEntryList&)) );
+ connect( mJob, TQT_SIGNAL(entries(KIO::Job*,const KIO::UDSEntryList&)),
+ TQT_SLOT(slotEntries(KIO::Job*,const KIO::UDSEntryList&)) );
break;
}
case List:
kdDebug(5006) << "SieveJob::schedule: listDir( " << mUrl.prettyURL() << " )" << endl;
{
mJob = KIO::listDir( mUrl, showProgressInfo );
- connect( mJob, SIGNAL( entries(KIO::Job *, const KIO::UDSEntryList & ) ),
- SLOT( slotEntries( KIO::Job *, const KIO::UDSEntryList & ) ) );
+ connect( mJob, TQT_SIGNAL( entries(KIO::Job *, const KIO::UDSEntryList & ) ),
+ TQT_SLOT( slotEntries( KIO::Job *, const KIO::UDSEntryList & ) ) );
break;
}
case Delete:
@@ -123,26 +123,26 @@ namespace KMail {
}
mJob->setInteractive(showProgressInfo);
// common to all jobs:
- connect( mJob, SIGNAL(result(KIO::Job*)), SLOT(slotResult(KIO::Job*)) );
+ connect( mJob, TQT_SIGNAL(result(KIO::Job*)), TQT_SLOT(slotResult(KIO::Job*)) );
}
- void SieveJob::slotData( Job *, const QByteArray & data ) {
+ void SieveJob::slotData( Job *, const TQByteArray & data ) {
// check for end-of-data marker:
if ( data.size() == 0 )
return;
// make sure we have a textdecoder;
if ( !mDec )
- mDec = QTextCodec::codecForMib( 106 /*utf8*/ )->makeDecoder();
+ mDec = TQTextCodec::codecForMib( 106 /*utf8*/ )->makeDecoder();
// decode utf8; add to mScript:
mScript += mDec->toUnicode( data.data(), data.size() );
}
- void SieveJob::slotDataReq( Job *, QByteArray & data ) {
+ void SieveJob::slotDataReq( Job *, TQByteArray & data ) {
// check whether we have already sent our data:
if ( mScript.isEmpty() ) {
- data = QByteArray(); // end-of-data marker
+ data = TQByteArray(); // end-of-data marker
return;
}
@@ -154,7 +154,7 @@ namespace KMail {
data.resize( data.size() - 1 );
// mark mScript sent:
- mScript = QString::null;
+ mScript = TQString::null;
}
void SieveJob::slotEntries( Job *, const UDSEntryList & l ) {
@@ -163,7 +163,7 @@ namespace KMail {
// Loop over all UDS atoms to find the UDS_ACCESS and UDS_NAME atoms;
// note if we find an exec'able file ( == active script )
// or the requested filename (mUrl.fileName()).
- QString filename;
+ TQString filename;
bool isActive = false;
for ( UDSEntry::const_iterator et = (*it).begin() ; et != (*it).end() ; ++ et ) {
if ( ( *et ).m_uds == KIO::UDS_NAME ) {
@@ -197,7 +197,7 @@ namespace KMail {
delete mDec; mDec = 0;
if ( mSieveCapabilities.empty() ) {
- mSieveCapabilities = QStringList::split( ' ', job->queryMetaData( "sieveExtensions" ) );
+ mSieveCapabilities = TQStringList::split( ' ', job->queryMetaData( "sieveExtensions" ) );
kdDebug(5006) << "Received Sieve extensions supported:" << endl
<< mSieveCapabilities.join("\n") << endl;
}
@@ -224,7 +224,7 @@ namespace KMail {
if ( !mCommands.empty() ) {
// Don't fail get'ting a non-existant script:
if ( mCommands.top() == Get && mFileExists == No ) {
- mScript = QString::null;
+ mScript = TQString::null;
mCommands.pop();
}
}
@@ -246,9 +246,9 @@ namespace KMail {
}
}
- SieveJob * SieveJob::put( const KURL & dest, const QString & script,
+ SieveJob * SieveJob::put( const KURL & dest, const TQString & script,
bool makeActive, bool wasActive ) {
- QValueStack<Command> commands;
+ TQValueStack<Command> commands;
if ( makeActive )
commands.push( Activate );
if ( wasActive )
@@ -258,27 +258,27 @@ namespace KMail {
}
SieveJob * SieveJob::get( const KURL & src, bool showProgressInfo ) {
- QValueStack<Command> commands;
+ TQValueStack<Command> commands;
commands.push( Get );
commands.push( SearchActive );
- return new SieveJob( src, QString::null, commands, showProgressInfo );
+ return new SieveJob( src, TQString::null, commands, showProgressInfo );
}
SieveJob * SieveJob::list( const KURL & src ) {
- QValueStack<Command> commands;
+ TQValueStack<Command> commands;
commands.push( List );
- return new SieveJob( src, QString::null, commands );
+ return new SieveJob( src, TQString::null, commands );
}
SieveJob * SieveJob::del( const KURL & url ) {
- QValueStack<Command> commands;
+ TQValueStack<Command> commands;
commands.push( Delete );
- return new SieveJob( url, QString::null, commands );
+ return new SieveJob( url, TQString::null, commands );
}
SieveJob * SieveJob::activate( const KURL & url ) {
- QValueStack<Command> commands;
+ TQValueStack<Command> commands;
commands.push( Activate );
- return new SieveJob( url, QString::null, commands );
+ return new SieveJob( url, TQString::null, commands );
}
} // namespace KMail
diff --git a/kmail/sievejob.h b/kmail/sievejob.h
index f7c353cf2..67f3d231e 100644
--- a/kmail/sievejob.h
+++ b/kmail/sievejob.h
@@ -15,11 +15,11 @@
#ifndef __KMAIL_SIEVE_JOB_H__
#define __KMAIL_SIEVE_JOB_H__
-#include <qobject.h>
-#include <qvaluestack.h>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qcstring.h>
+#include <tqobject.h>
+#include <tqvaluestack.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqcstring.h>
#include <kurl.h>
#include <kio/global.h>
@@ -31,17 +31,17 @@ namespace KIO {
namespace KMail {
- class SieveJob : public QObject {
+ class SieveJob : public TQObject {
Q_OBJECT
protected:
enum Command { Get, Put, Activate, Deactivate, SearchActive, List, Delete };
- SieveJob( const KURL & url, const QString & script,
- const QValueStack<Command> & commands,
- QObject * parent=0, const char * name=0 );
- SieveJob( const KURL & url, const QString & script,
- const QValueStack<Command> & commands,
+ SieveJob( const KURL & url, const TQString & script,
+ const TQValueStack<Command> & commands,
+ TQObject * parent=0, const char * name=0 );
+ SieveJob( const KURL & url, const TQString & script,
+ const TQValueStack<Command> & commands,
bool showProgressInfo,
- QObject * parent=0, const char * name=0 );
+ TQObject * parent=0, const char * name=0 );
virtual ~SieveJob();
public:
@@ -51,7 +51,7 @@ namespace KMail {
* Store a Sieve script. If @param makeActive is set, also mark the
* script active
*/
- static SieveJob * put( const KURL & dest, const QString & script,
+ static SieveJob * put( const KURL & dest, const TQString & script,
bool makeActive, bool wasActive );
/**
@@ -70,7 +70,7 @@ namespace KMail {
void kill( bool quiet=true );
- const QStringList & sieveCapabilities() const {
+ const TQStringList & sieveCapabilities() const {
return mSieveCapabilities;
}
@@ -80,7 +80,7 @@ namespace KMail {
signals:
void gotScript( KMail::SieveJob * job, bool success,
- const QString & script, bool active );
+ const TQString & script, bool active );
/**
* We got the list of available scripts
@@ -90,35 +90,35 @@ namespace KMail {
* empty string if no script is active.
*/
void gotList( KMail::SieveJob *job, bool success,
- const QStringList &scriptList, const QString &activeScript );
+ const TQStringList &scriptList, const TQString &activeScript );
void result( KMail::SieveJob * job, bool success,
- const QString & script, bool active );
+ const TQString & script, bool active );
- void item( KMail::SieveJob * job, const QString & filename, bool active );
+ void item( KMail::SieveJob * job, const TQString & filename, bool active );
protected:
void schedule( Command command, bool showProgressInfo );
protected slots:
- void slotData( KIO::Job *, const QByteArray & ); // for get
- void slotDataReq( KIO::Job *, QByteArray & ); // for put
+ void slotData( KIO::Job *, const TQByteArray & ); // for get
+ void slotDataReq( KIO::Job *, TQByteArray & ); // for put
void slotEntries( KIO::Job *, const KIO::UDSEntryList & ); // for listDir
void slotResult( KIO::Job * ); // for all commands
protected:
KURL mUrl;
KIO::Job * mJob;
- QTextDecoder * mDec;
- QString mScript;
- QString mActiveScriptName;
+ TQTextDecoder * mDec;
+ TQString mScript;
+ TQString mActiveScriptName;
Existence mFileExists;
- QStringList mSieveCapabilities;
- QValueStack<Command> mCommands;
+ TQStringList mSieveCapabilities;
+ TQValueStack<Command> mCommands;
bool mShowProgressInfo;
// List of Sieve scripts on the server, used by @ref list()
- QStringList mAvailableScripts;
+ TQStringList mAvailableScripts;
};
} // namespace KMail
diff --git a/kmail/signatureconfigurator.cpp b/kmail/signatureconfigurator.cpp
index 68bfd1949..606d460de 100644
--- a/kmail/signatureconfigurator.cpp
+++ b/kmail/signatureconfigurator.cpp
@@ -26,15 +26,15 @@
#include <kshellcompletion.h>
#include <krun.h>
-#include <qcheckbox.h>
-#include <qcombobox.h>
-#include <qdir.h>
-#include <qfileinfo.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qtextedit.h>
-#include <qwhatsthis.h>
-#include <qwidgetstack.h>
+#include <tqcheckbox.h>
+#include <tqcombobox.h>
+#include <tqdir.h>
+#include <tqfileinfo.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqtextedit.h>
+#include <tqwhatsthis.h>
+#include <tqwidgetstack.h>
#include <assert.h>
@@ -42,32 +42,32 @@ using namespace KMail;
namespace KMail {
- SignatureConfigurator::SignatureConfigurator( QWidget * parent, const char * name )
- : QWidget( parent, name )
+ SignatureConfigurator::SignatureConfigurator( TQWidget * parent, const char * name )
+ : TQWidget( parent, name )
{
// tmp. vars:
- QLabel * label;
- QWidget * page;
- QHBoxLayout * hlay;
- QVBoxLayout * vlay;
- QVBoxLayout * page_vlay;
+ TQLabel * label;
+ TQWidget * page;
+ TQHBoxLayout * hlay;
+ TQVBoxLayout * vlay;
+ TQVBoxLayout * page_vlay;
- vlay = new QVBoxLayout( this, 0, KDialog::spacingHint(), "main layout" );
+ vlay = new TQVBoxLayout( this, 0, KDialog::spacingHint(), "main layout" );
// "enable signatue" checkbox:
- mEnableCheck = new QCheckBox( i18n("&Enable signature"), this );
- QWhatsThis::add(mEnableCheck,
+ mEnableCheck = new TQCheckBox( i18n("&Enable signature"), this );
+ TQWhatsThis::add(mEnableCheck,
i18n("Check this box if you want KMail to append a signature to mails "
"written with this identity."));
vlay->addWidget( mEnableCheck );
// "obtain signature text from" combo and label:
- hlay = new QHBoxLayout( vlay ); // inherits spacing
- mSourceCombo = new QComboBox( false, this );
- QWhatsThis::add(mSourceCombo,
+ hlay = new TQHBoxLayout( vlay ); // inherits spacing
+ mSourceCombo = new TQComboBox( false, this );
+ TQWhatsThis::add(mSourceCombo,
i18n("Click on the widgets below to obtain help on the input methods."));
mSourceCombo->setEnabled( false ); // since !mEnableCheck->isChecked()
- mSourceCombo->insertStringList( QStringList()
+ mSourceCombo->insertStringList( TQStringList()
<< i18n("continuation of \"obtain signature text from\"",
"Input Field Below")
<< i18n("continuation of \"obtain signature text from\"",
@@ -75,62 +75,62 @@ namespace KMail {
<< i18n("continuation of \"obtain signature text from\"",
"Output of Command")
);
- label = new QLabel( mSourceCombo,
+ label = new TQLabel( mSourceCombo,
i18n("Obtain signature &text from:"), this );
label->setEnabled( false ); // since !mEnableCheck->isChecked()
hlay->addWidget( label );
hlay->addWidget( mSourceCombo, 1 );
// widget stack that is controlled by the source combo:
- QWidgetStack * widgetStack = new QWidgetStack( this );
+ TQWidgetStack * widgetStack = new TQWidgetStack( this );
widgetStack->setEnabled( false ); // since !mEnableCheck->isChecked()
vlay->addWidget( widgetStack, 1 );
- connect( mSourceCombo, SIGNAL(highlighted(int)),
- widgetStack, SLOT(raiseWidget(int)) );
+ connect( mSourceCombo, TQT_SIGNAL(highlighted(int)),
+ widgetStack, TQT_SLOT(raiseWidget(int)) );
// connects for the enabling of the widgets depending on
// signatureEnabled:
- connect( mEnableCheck, SIGNAL(toggled(bool)),
- mSourceCombo, SLOT(setEnabled(bool)) );
- connect( mEnableCheck, SIGNAL(toggled(bool)),
- widgetStack, SLOT(setEnabled(bool)) );
- connect( mEnableCheck, SIGNAL(toggled(bool)),
- label, SLOT(setEnabled(bool)) );
+ connect( mEnableCheck, TQT_SIGNAL(toggled(bool)),
+ mSourceCombo, TQT_SLOT(setEnabled(bool)) );
+ connect( mEnableCheck, TQT_SIGNAL(toggled(bool)),
+ widgetStack, TQT_SLOT(setEnabled(bool)) );
+ connect( mEnableCheck, TQT_SIGNAL(toggled(bool)),
+ label, TQT_SLOT(setEnabled(bool)) );
// The focus might be still in the widget that is disabled
- connect( mEnableCheck, SIGNAL(clicked()),
- mEnableCheck, SLOT(setFocus()) );
+ connect( mEnableCheck, TQT_SIGNAL(clicked()),
+ mEnableCheck, TQT_SLOT(setFocus()) );
int pageno = 0;
// page 0: input field for direct entering:
- mTextEdit = new QTextEdit( widgetStack );
- QWhatsThis::add(mTextEdit,
+ mTextEdit = new TQTextEdit( widgetStack );
+ TQWhatsThis::add(mTextEdit,
i18n("Use this field to enter an arbitrary static signature."));
widgetStack->addWidget( mTextEdit, pageno );
mTextEdit->setFont( KGlobalSettings::fixedFont() );
- mTextEdit->setWordWrap( QTextEdit::NoWrap );
+ mTextEdit->setWordWrap( TQTextEdit::NoWrap );
mTextEdit->setTextFormat( Qt::PlainText );
widgetStack->raiseWidget( 0 ); // since mSourceCombo->currentItem() == 0
// page 1: "signature file" requester, label, "edit file" button:
++pageno;
- page = new QWidget( widgetStack );
+ page = new TQWidget( widgetStack );
widgetStack->addWidget( page, pageno ); // force sequential numbers (play safe)
- page_vlay = new QVBoxLayout( page, 0, KDialog::spacingHint() );
- hlay = new QHBoxLayout( page_vlay ); // inherits spacing
+ page_vlay = new TQVBoxLayout( page, 0, KDialog::spacingHint() );
+ hlay = new TQHBoxLayout( page_vlay ); // inherits spacing
mFileRequester = new KURLRequester( page );
- QWhatsThis::add(mFileRequester,
+ TQWhatsThis::add(mFileRequester,
i18n("Use this requester to specify a text file that contains your "
"signature. It will be read every time you create a new mail or "
"append a new signature."));
- hlay->addWidget( new QLabel( mFileRequester,
+ hlay->addWidget( new TQLabel( mFileRequester,
i18n("S&pecify file:"), page ) );
hlay->addWidget( mFileRequester, 1 );
mFileRequester->button()->setAutoDefault( false );
- connect( mFileRequester, SIGNAL(textChanged(const QString &)),
- this, SLOT(slotEnableEditButton(const QString &)) );
- mEditButton = new QPushButton( i18n("Edit &File"), page );
- QWhatsThis::add(mEditButton, i18n("Opens the specified file in a text editor."));
- connect( mEditButton, SIGNAL(clicked()), SLOT(slotEdit()) );
+ connect( mFileRequester, TQT_SIGNAL(textChanged(const TQString &)),
+ this, TQT_SLOT(slotEnableEditButton(const TQString &)) );
+ mEditButton = new TQPushButton( i18n("Edit &File"), page );
+ TQWhatsThis::add(mEditButton, i18n("Opens the specified file in a text editor."));
+ connect( mEditButton, TQT_SIGNAL(clicked()), TQT_SLOT(slotEdit()) );
mEditButton->setAutoDefault( false );
mEditButton->setEnabled( false ); // initially nothing to edit
hlay->addWidget( mEditButton );
@@ -138,20 +138,20 @@ namespace KMail {
// page 2: "signature command" requester and label:
++pageno;
- page = new QWidget( widgetStack );
+ page = new TQWidget( widgetStack );
widgetStack->addWidget( page, pageno );
- page_vlay = new QVBoxLayout( page, 0, KDialog::spacingHint() );
- hlay = new QHBoxLayout( page_vlay ); // inherits spacing
+ page_vlay = new TQVBoxLayout( page, 0, KDialog::spacingHint() );
+ hlay = new TQHBoxLayout( page_vlay ); // inherits spacing
mCommandEdit = new KLineEdit( page );
mCommandEdit->setCompletionObject( new KShellCompletion() );
mCommandEdit->setAutoDeleteCompletionObject( true );
- QWhatsThis::add(mCommandEdit,
+ TQWhatsThis::add(mCommandEdit,
i18n("You can add an arbitrary command here, either with or without path "
"depending on whether or not the command is in your Path. For every "
"new mail, KMail will execute the command and use what it outputs (to "
"standard output) as a signature. Usual commands for use with this "
"mechanism are \"fortune\" or \"ksig -random\"."));
- hlay->addWidget( new QLabel( mCommandEdit,
+ hlay->addWidget( new TQLabel( mCommandEdit,
i18n("S&pecify command:"), page ) );
hlay->addWidget( mCommandEdit, 1 );
page_vlay->addStretch( 1 ); // spacer
@@ -195,34 +195,34 @@ namespace KMail {
mSourceCombo->setCurrentItem( idx );
}
- QString SignatureConfigurator::inlineText() const {
+ TQString SignatureConfigurator::inlineText() const {
return mTextEdit->text();
}
- void SignatureConfigurator::setInlineText( const QString & text ) {
+ void SignatureConfigurator::setInlineText( const TQString & text ) {
mTextEdit->setText( text );
}
- QString SignatureConfigurator::fileURL() const {
- QString file = mFileRequester->url().stripWhiteSpace();
+ TQString SignatureConfigurator::fileURL() const {
+ TQString file = mFileRequester->url().stripWhiteSpace();
// Force the filename to be relative to ~ instead of $PWD depending
// on the rest of the code (KRun::run in Edit and KFileItem on save)
- if ( !file.isEmpty() && QFileInfo( file ).isRelative() )
- file = QDir::home().absPath() + QDir::separator() + file;
+ if ( !file.isEmpty() && TQFileInfo( file ).isRelative() )
+ file = TQDir::home().absPath() + TQDir::separator() + file;
return file;
}
- void SignatureConfigurator::setFileURL( const QString & url ) {
+ void SignatureConfigurator::setFileURL( const TQString & url ) {
mFileRequester->setURL( url );
}
- QString SignatureConfigurator::commandURL() const {
+ TQString SignatureConfigurator::commandURL() const {
return mCommandEdit->text();
}
- void SignatureConfigurator::setCommandURL( const QString & url ) {
+ void SignatureConfigurator::setCommandURL( const TQString & url ) {
mCommandEdit->setText( url );
}
@@ -244,23 +244,23 @@ namespace KMail {
if ( sig.type() == Signature::FromFile )
setFileURL( sig.url() );
else
- setFileURL( QString::null );
+ setFileURL( TQString::null );
if ( sig.type() == Signature::FromCommand )
setCommandURL( sig.url() );
else
- setCommandURL( QString::null );
+ setCommandURL( TQString::null );
}
- void SignatureConfigurator::slotEnableEditButton( const QString & url ) {
+ void SignatureConfigurator::slotEnableEditButton( const TQString & url ) {
mEditButton->setDisabled( url.stripWhiteSpace().isEmpty() );
}
void SignatureConfigurator::slotEdit() {
- QString url = fileURL();
+ TQString url = fileURL();
// slotEnableEditButton should prevent this assert from being hit:
assert( !url.isEmpty() );
- (void)KRun::runURL( KURL( url ), QString::fromLatin1("text/plain") );
+ (void)KRun::runURL( KURL( url ), TQString::fromLatin1("text/plain") );
}
} // namespace KMail
diff --git a/kmail/signatureconfigurator.h b/kmail/signatureconfigurator.h
index f67a9f9d8..2599961ae 100644
--- a/kmail/signatureconfigurator.h
+++ b/kmail/signatureconfigurator.h
@@ -16,7 +16,7 @@
#ifndef __KMAIL_SIGNATURECONFIGURATOR_H__
#define __KMAIL_SIGNATURECONFIGURATOR_H__
-#include <qwidget.h>
+#include <tqwidget.h>
#include <libkpimidentities/identity.h> // for Signature::Type
using KPIM::Signature;
@@ -31,10 +31,10 @@ class QTextEdit;
namespace KMail {
- class SignatureConfigurator : public QWidget {
+ class SignatureConfigurator : public TQWidget {
Q_OBJECT
public:
- SignatureConfigurator( QWidget * parent=0, const char * name=0 );
+ SignatureConfigurator( TQWidget * parent=0, const char * name=0 );
virtual ~SignatureConfigurator();
bool isSignatureEnabled() const;
@@ -43,14 +43,14 @@ namespace KMail {
Signature::Type signatureType() const;
void setSignatureType( Signature::Type type );
- QString inlineText() const;
- void setInlineText( const QString & text );
+ TQString inlineText() const;
+ void setInlineText( const TQString & text );
- QString fileURL() const;
- void setFileURL( const QString & url );
+ TQString fileURL() const;
+ void setFileURL( const TQString & url );
- QString commandURL() const;
- void setCommandURL( const QString & url );
+ TQString commandURL() const;
+ void setCommandURL( const TQString & url );
/**
Conveniece method.
@@ -63,16 +63,16 @@ namespace KMail {
void setSignature( const Signature & sig );
protected slots:
- void slotEnableEditButton( const QString & );
+ void slotEnableEditButton( const TQString & );
void slotEdit();
protected:
- QCheckBox * mEnableCheck;
- QComboBox * mSourceCombo;
+ TQCheckBox * mEnableCheck;
+ TQComboBox * mSourceCombo;
KURLRequester * mFileRequester;
- QPushButton * mEditButton;
+ TQPushButton * mEditButton;
KLineEdit * mCommandEdit;
- QTextEdit * mTextEdit;
+ TQTextEdit * mTextEdit;
};
} // namespace KMail
diff --git a/kmail/simplestringlisteditor.cpp b/kmail/simplestringlisteditor.cpp
index e8dc56473..8d71e2215 100644
--- a/kmail/simplestringlisteditor.cpp
+++ b/kmail/simplestringlisteditor.cpp
@@ -41,7 +41,7 @@
#include <kdebug.h>
#include <kpushbutton.h>
-#include <qlayout.h>
+#include <tqlayout.h>
//********************************************************
@@ -49,125 +49,125 @@
//********************************************************
// small helper function:
-static inline QListBoxItem * findSelectedItem( QListBox * lb ) {
- QListBoxItem * item = 0;
+static inline TQListBoxItem * findSelectedItem( TQListBox * lb ) {
+ TQListBoxItem * item = 0;
for ( item = lb->firstItem() ; item && !item->isSelected() ;
item = item->next() ) ;
return item;
}
-SimpleStringListEditor::SimpleStringListEditor( QWidget * parent,
+SimpleStringListEditor::SimpleStringListEditor( TQWidget * parent,
const char * name,
ButtonCode buttons,
- const QString & addLabel,
- const QString & removeLabel,
- const QString & modifyLabel,
- const QString & addDialogLabel )
- : QWidget( parent, name ),
+ const TQString & addLabel,
+ const TQString & removeLabel,
+ const TQString & modifyLabel,
+ const TQString & addDialogLabel )
+ : TQWidget( parent, name ),
mAddButton(0), mRemoveButton(0), mModifyButton(0),
mUpButton(0), mDownButton(0),
mAddDialogLabel( addDialogLabel.isEmpty() ?
i18n("New entry:") : addDialogLabel )
{
- QHBoxLayout * hlay = new QHBoxLayout( this, 0, KDialog::spacingHint() );
+ TQHBoxLayout * hlay = new TQHBoxLayout( this, 0, KDialog::spacingHint() );
- mListBox = new QListBox( this );
+ mListBox = new TQListBox( this );
hlay->addWidget( mListBox, 1 );
if ( buttons == None )
kdDebug(5006) << "SimpleStringListBox called with no buttons. "
- "Consider using a plain QListBox instead!" << endl;
+ "Consider using a plain TQListBox instead!" << endl;
- QVBoxLayout * vlay = new QVBoxLayout( hlay ); // inherits spacing
+ TQVBoxLayout * vlay = new TQVBoxLayout( hlay ); // inherits spacing
if ( buttons & Add ) {
if ( addLabel.isEmpty() )
- mAddButton = new QPushButton( i18n("&Add..."), this );
+ mAddButton = new TQPushButton( i18n("&Add..."), this );
else
- mAddButton = new QPushButton( addLabel, this );
+ mAddButton = new TQPushButton( addLabel, this );
mAddButton->setAutoDefault( false );
vlay->addWidget( mAddButton );
- connect( mAddButton, SIGNAL(clicked()),
- this, SLOT(slotAdd()) );
+ connect( mAddButton, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotAdd()) );
}
if ( buttons & Remove ) {
if ( removeLabel.isEmpty() )
- mRemoveButton = new QPushButton( i18n("&Remove"), this );
+ mRemoveButton = new TQPushButton( i18n("&Remove"), this );
else
- mRemoveButton = new QPushButton( removeLabel, this );
+ mRemoveButton = new TQPushButton( removeLabel, this );
mRemoveButton->setAutoDefault( false );
mRemoveButton->setEnabled( false ); // no selection yet
vlay->addWidget( mRemoveButton );
- connect( mRemoveButton, SIGNAL(clicked()),
- this, SLOT(slotRemove()) );
+ connect( mRemoveButton, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotRemove()) );
}
if ( buttons & Modify ) {
if ( modifyLabel.isEmpty() )
- mModifyButton = new QPushButton( i18n("&Modify..."), this );
+ mModifyButton = new TQPushButton( i18n("&Modify..."), this );
else
- mModifyButton = new QPushButton( modifyLabel, this );
+ mModifyButton = new TQPushButton( modifyLabel, this );
mModifyButton->setAutoDefault( false );
mModifyButton->setEnabled( false ); // no selection yet
vlay->addWidget( mModifyButton );
- connect( mModifyButton, SIGNAL(clicked()),
- this, SLOT(slotModify()) );
- connect( mListBox, SIGNAL( doubleClicked( QListBoxItem* ) ),
- this, SLOT( slotModify() ) );
+ connect( mModifyButton, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotModify()) );
+ connect( mListBox, TQT_SIGNAL( doubleClicked( TQListBoxItem* ) ),
+ this, TQT_SLOT( slotModify() ) );
}
if ( buttons & Up ) {
if ( !(buttons & Down) )
kdDebug(5006) << "Are you sure you want to use an Up button "
"without a Down button??" << endl;
- mUpButton = new KPushButton( QString::null, this );
+ mUpButton = new KPushButton( TQString::null, this );
mUpButton->setIconSet( BarIconSet( "up", KIcon::SizeSmall ) );
mUpButton->setAutoDefault( false );
mUpButton->setEnabled( false ); // no selection yet
vlay->addWidget( mUpButton );
- connect( mUpButton, SIGNAL(clicked()),
- this, SLOT(slotUp()) );
+ connect( mUpButton, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotUp()) );
}
if ( buttons & Down ) {
if ( !(buttons & Up) )
kdDebug(5006) << "Are you sure you want to use a Down button "
"without an Up button??" << endl;
- mDownButton = new KPushButton( QString::null, this );
+ mDownButton = new KPushButton( TQString::null, this );
mDownButton->setIconSet( BarIconSet( "down", KIcon::SizeSmall ) );
mDownButton->setAutoDefault( false );
mDownButton->setEnabled( false ); // no selection yet
vlay->addWidget( mDownButton );
- connect( mDownButton, SIGNAL(clicked()),
- this, SLOT(slotDown()) );
+ connect( mDownButton, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotDown()) );
}
vlay->addStretch( 1 ); // spacer
- connect( mListBox, SIGNAL(selectionChanged()),
- this, SLOT(slotSelectionChanged()) );
+ connect( mListBox, TQT_SIGNAL(selectionChanged()),
+ this, TQT_SLOT(slotSelectionChanged()) );
}
-void SimpleStringListEditor::setStringList( const QStringList & strings ) {
+void SimpleStringListEditor::setStringList( const TQStringList & strings ) {
mListBox->clear();
mListBox->insertStringList( strings );
}
-void SimpleStringListEditor::appendStringList( const QStringList & strings ) {
+void SimpleStringListEditor::appendStringList( const TQStringList & strings ) {
mListBox->insertStringList( strings );
}
-QStringList SimpleStringListEditor::stringList() const {
- QStringList result;
- for ( QListBoxItem * item = mListBox->firstItem() ;
+TQStringList SimpleStringListEditor::stringList() const {
+ TQStringList result;
+ for ( TQListBoxItem * item = mListBox->firstItem() ;
item ; item = item->next() )
result << item->text();
return result;
}
void SimpleStringListEditor::setButtonText( ButtonCode button,
- const QString & text ) {
+ const TQString & text ) {
switch ( button ) {
case Add:
if ( !mAddButton ) break;
@@ -202,8 +202,8 @@ void SimpleStringListEditor::setButtonText( ButtonCode button,
void SimpleStringListEditor::slotAdd() {
bool ok = false;
- QString newEntry = KInputDialog::getText( i18n("New Value"),
- mAddDialogLabel, QString::null,
+ TQString newEntry = KInputDialog::getText( i18n("New Value"),
+ mAddDialogLabel, TQString::null,
&ok, this );
// let the user verify the string before adding
emit aboutToAdd( newEntry );
@@ -218,11 +218,11 @@ void SimpleStringListEditor::slotRemove() {
}
void SimpleStringListEditor::slotModify() {
- QListBoxItem * item = findSelectedItem( mListBox );
+ TQListBoxItem * item = findSelectedItem( mListBox );
if ( !item ) return;
bool ok = false;
- QString newText = KInputDialog::getText( i18n("Change Value"),
+ TQString newText = KInputDialog::getText( i18n("Change Value"),
mAddDialogLabel, item->text(),
&ok, this );
emit aboutToAdd( newText );
@@ -236,11 +236,11 @@ void SimpleStringListEditor::slotModify() {
}
void SimpleStringListEditor::slotUp() {
- QListBoxItem * item = findSelectedItem( mListBox );
+ TQListBoxItem * item = findSelectedItem( mListBox );
if ( !item || !item->prev() ) return;
// find the item that we want to insert after:
- QListBoxItem * pprev = item->prev()->prev();
+ TQListBoxItem * pprev = item->prev()->prev();
// take the item from it's current position...
mListBox->takeItem( item );
// ...and insert it after the above mentioned item:
@@ -260,11 +260,11 @@ void SimpleStringListEditor::slotUp() {
}
void SimpleStringListEditor::slotDown() {
- QListBoxItem * item = findSelectedItem( mListBox );
+ TQListBoxItem * item = findSelectedItem( mListBox );
if ( !item || !item->next() ) return;
// find the item that we want to insert after:
- QListBoxItem * next = item->next();
+ TQListBoxItem * next = item->next();
// take the item from it's current position...
mListBox->takeItem( item );
// ...and insert it after the above mentioned item:
@@ -288,7 +288,7 @@ void SimpleStringListEditor::slotDown() {
void SimpleStringListEditor::slotSelectionChanged() {
// try to find a selected item:
- QListBoxItem * item = findSelectedItem( mListBox );
+ TQListBoxItem * item = findSelectedItem( mListBox );
// if there is one, item will be non-null (ie. true), else 0
// (ie. false):
diff --git a/kmail/simplestringlisteditor.h b/kmail/simplestringlisteditor.h
index fc9c0367f..9a45e7417 100644
--- a/kmail/simplestringlisteditor.h
+++ b/kmail/simplestringlisteditor.h
@@ -32,9 +32,9 @@
#ifndef _SIMPLESTRINGLISTEDITOR_H_
#define _SIMPLESTRINGLISTEDITOR_H_
-#include <qwidget.h>
-#include <qstringlist.h>
-#include <qstring.h>
+#include <tqwidget.h>
+#include <tqstringlist.h>
+#include <tqstring.h>
class QListBox;
class QPushButton;
@@ -45,7 +45,7 @@ class QPushButton;
//
//
-class SimpleStringListEditor : public QWidget {
+class SimpleStringListEditor : public TQWidget {
Q_OBJECT
public:
enum ButtonCode {
@@ -57,28 +57,28 @@ public:
};
/** Constructor. Populates the list with @p strings. */
- SimpleStringListEditor( QWidget * parent=0, const char * name=0,
+ SimpleStringListEditor( TQWidget * parent=0, const char * name=0,
ButtonCode buttons=Unsorted,
- const QString & addLabel=QString::null,
- const QString & removeLabel=QString::null,
- const QString & modifyLabel=QString::null,
- const QString & addDialogLabel=QString::null );
+ const TQString & addLabel=TQString::null,
+ const TQString & removeLabel=TQString::null,
+ const TQString & modifyLabel=TQString::null,
+ const TQString & addDialogLabel=TQString::null );
/** Sets the list of strings displayed to @p strings */
- void setStringList( const QStringList & strings );
+ void setStringList( const TQStringList & strings );
/** Adds @p strings to the list of displayed strings */
- void appendStringList( const QStringList & strings );
+ void appendStringList( const TQStringList & strings );
/** Retrieves the current list of strings */
- QStringList stringList() const;
+ TQStringList stringList() const;
/** Sets the text of button @p button to @p text */
- void setButtonText( ButtonCode button, const QString & text );
+ void setButtonText( ButtonCode button, const TQString & text );
signals:
/** Connected slots can alter the argument to be added or set the
- argument to QString::null to suppress adding.
+ argument to TQString::null to suppress adding.
*/
- void aboutToAdd(QString&);
+ void aboutToAdd(TQString&);
void changed(void);
protected slots:
@@ -91,13 +91,13 @@ protected slots:
void slotSelectionChanged();
protected:
- QListBox *mListBox;
- QPushButton *mAddButton;
- QPushButton *mRemoveButton;
- QPushButton *mModifyButton;
- QPushButton *mUpButton;
- QPushButton *mDownButton;
- const QString mAddDialogLabel;
+ TQListBox *mListBox;
+ TQPushButton *mAddButton;
+ TQPushButton *mRemoveButton;
+ TQPushButton *mModifyButton;
+ TQPushButton *mUpButton;
+ TQPushButton *mDownButton;
+ const TQString mAddDialogLabel;
};
diff --git a/kmail/snippetconfig.h b/kmail/snippetconfig.h
index 9baad64cb..48738b7a1 100644
--- a/kmail/snippetconfig.h
+++ b/kmail/snippetconfig.h
@@ -14,8 +14,8 @@
#ifndef SNIPPETCONFIG_H
#define SNIPPETCONFIG_H
-#include <qstring.h>
-#include <qrect.h>
+#include <tqstring.h>
+#include <tqrect.h>
/**
@@ -31,28 +31,28 @@ public:
bool useToolTips() { return (bToolTip); };
int getInputMethod() { return (iInputMethod); };
- QString getDelimiter() { return (strDelimiter); };
- QRect getSingleRect() { return (rSingle); };
- QRect getMultiRect() { return (rMulti); };
+ TQString getDelimiter() { return (strDelimiter); };
+ TQRect getSingleRect() { return (rSingle); };
+ TQRect getMultiRect() { return (rMulti); };
int getAutoOpenGroups() { return iAutoOpenGroups; }
void setToolTips(bool b) { bToolTip=b; };
void setInputMethod(int i) { iInputMethod=i; };
- void setDelimiter(QString s) { strDelimiter=s; };
- void setSingleRect(QRect r) {
- rSingle = (r.isValid())?r:QRect();
+ void setDelimiter(TQString s) { strDelimiter=s; };
+ void setSingleRect(TQRect r) {
+ rSingle = (r.isValid())?r:TQRect();
}
- void setMultiRect(QRect r) {
- rMulti = (r.isValid())?r:QRect();
+ void setMultiRect(TQRect r) {
+ rMulti = (r.isValid())?r:TQRect();
}
void setAutoOpenGroups(int autoopen) { iAutoOpenGroups = autoopen; }
protected:
bool bToolTip;
int iInputMethod;
- QString strDelimiter;
- QRect rSingle;
- QRect rMulti;
+ TQString strDelimiter;
+ TQRect rSingle;
+ TQRect rMulti;
int iMultiBasicHeight;
int iMultiCount;
int iAutoOpenGroups;
diff --git a/kmail/snippetdlg.cpp b/kmail/snippetdlg.cpp
index 76b4fe178..61c75db88 100644
--- a/kmail/snippetdlg.cpp
+++ b/kmail/snippetdlg.cpp
@@ -16,8 +16,8 @@
#include <kdialog.h>
#include <klocale.h>
-#include <qlabel.h>
-#include <qlayout.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
#include <kpushbutton.h>
#include <ktextedit.h>
#include "kkeybutton.h"
@@ -31,16 +31,16 @@
* The dialog will by default be modeless, unless you set 'modal' to
* TRUE to construct a modal dialog.
*/
-SnippetDlg::SnippetDlg( KActionCollection* ac, QWidget* parent, const char* name, bool modal, WFlags fl )
+SnippetDlg::SnippetDlg( KActionCollection* ac, TQWidget* parent, const char* name, bool modal, WFlags fl )
: SnippetDlgBase( parent, name, modal, fl ), actionCollection( ac )
{
if ( !name )
setName( "SnippetDlg" );
- textLabel3 = new QLabel( this, "textLabel3" );
+ textLabel3 = new TQLabel( this, "textLabel3" );
keyButton = new KKeyButton( this );
- connect( keyButton, SIGNAL( capturedShortcut( const KShortcut& ) ),
- this, SLOT( slotCapturedShortcut( const KShortcut& ) ) );
+ connect( keyButton, TQT_SIGNAL( capturedShortcut( const KShortcut& ) ),
+ this, TQT_SLOT( slotCapturedShortcut( const KShortcut& ) ) );
layout3->addWidget( textLabel3, 7, 0 );
layout3->addWidget( keyButton, 7, 1 );
@@ -90,7 +90,7 @@ void SnippetDlg::slotCapturedShortcut( const KShortcut& sc )
keyButton->setShortcut( KShortcut::null(), false );
} else {
if( !shortcutIsValid( actionCollection, sc ) ) {
- QString msg( i18n( "The selected shortcut is already used, "
+ TQString msg( i18n( "The selected shortcut is already used, "
"please select a different one." ) );
KMessageBox::sorry( this, msg );
} else {
diff --git a/kmail/snippetdlg.h b/kmail/snippetdlg.h
index 1a9a1f02f..fd990539f 100644
--- a/kmail/snippetdlg.h
+++ b/kmail/snippetdlg.h
@@ -21,13 +21,13 @@ class SnippetDlg : public SnippetDlgBase
Q_OBJECT
public:
- SnippetDlg( KActionCollection* ac, QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
+ SnippetDlg( KActionCollection* ac, TQWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
~SnippetDlg();
void setShowShortcut( bool show );
- QLabel* textLabel3;
- QLabel* textLabelGroup;
+ TQLabel* textLabel3;
+ TQLabel* textLabelGroup;
KKeyButton* keyButton;
KActionCollection* actionCollection;
diff --git a/kmail/snippetitem.cpp b/kmail/snippetitem.cpp
index 46d28c941..206114ace 100644
--- a/kmail/snippetitem.cpp
+++ b/kmail/snippetitem.cpp
@@ -15,18 +15,18 @@
#include <kaction.h>
-#include <qstring.h>
+#include <tqstring.h>
-SnippetItem::SnippetItem(QListView * parent, QString name, QString text )
- : QListViewItem( parent, name ), action(0)
+SnippetItem::SnippetItem(TQListView * parent, TQString name, TQString text )
+ : TQListViewItem( parent, name ), action(0)
{
strName = name;
strText = text;
iParent = -1;
}
-SnippetItem::SnippetItem(QListViewItem * parent, QString name, QString text)
- : QListViewItem( parent, name ), action(0)
+SnippetItem::SnippetItem(TQListViewItem * parent, TQString name, TQString text)
+ : TQListViewItem( parent, name ), action(0)
{
strName = name;
strText = text;
@@ -45,7 +45,7 @@ SnippetItem::~SnippetItem()
/*!
\fn SnippetItem::getName()
*/
-QString SnippetItem::getName()
+TQString SnippetItem::getName()
{
return strName;
}
@@ -54,25 +54,25 @@ QString SnippetItem::getName()
/*!
\fn SnippetItem::getText
*/
-QString SnippetItem::getText()
+TQString SnippetItem::getText()
{
return strText;
}
/*!
- \fn SnippetItem::setText(QString text)
+ \fn SnippetItem::setText(TQString text)
*/
-void SnippetItem::setText(QString text)
+void SnippetItem::setText(TQString text)
{
strText = text;
}
/*!
- \fn SnippetItem::setName(QString name)
+ \fn SnippetItem::setName(TQString name)
*/
-void SnippetItem::setName(QString name)
+void SnippetItem::setName(TQString name)
{
strName = name;
}
@@ -101,7 +101,7 @@ void SnippetItem::slotExecute()
}
-SnippetItem * SnippetItem::findItemByName(QString name, QPtrList<SnippetItem> &list)
+SnippetItem * SnippetItem::findItemByName(TQString name, TQPtrList<SnippetItem> &list)
{
for ( SnippetItem * item = list.first(); item; item = list.next() ) { //write the snippet-list
if (item->getName() == name)
@@ -110,7 +110,7 @@ SnippetItem * SnippetItem::findItemByName(QString name, QPtrList<SnippetItem> &l
return NULL;
}
-SnippetGroup * SnippetItem::findGroupById(int id, QPtrList<SnippetItem> &list)
+SnippetGroup * SnippetItem::findGroupById(int id, TQPtrList<SnippetItem> &list)
{
for ( SnippetItem * item = list.first(); item; item = list.next() ) { //write the snippet-list
SnippetGroup * group = dynamic_cast<SnippetGroup*>(item);
@@ -127,7 +127,7 @@ Deklaration for class SnippetGroup
int SnippetGroup::iMaxId = 1;
-SnippetGroup::SnippetGroup(QListView * parent, QString name, int id)
+SnippetGroup::SnippetGroup(TQListView * parent, TQString name, int id)
: SnippetItem(parent, name, "GROUP")
{
if (id > 0) {
diff --git a/kmail/snippetitem.h b/kmail/snippetitem.h
index ce7cd1807..3c20661d5 100644
--- a/kmail/snippetitem.h
+++ b/kmail/snippetitem.h
@@ -17,7 +17,7 @@
#include <klistview.h>
#include <klocale.h>
-#include <qobject.h>
+#include <tqobject.h>
class QString;
class KAction;
@@ -29,34 +29,34 @@ This class represents one CodeSnippet-Item in the listview.
It also holds the needed data for one snippet.
@author Robert Gruber
*/
-class SnippetItem : public QObject, public QListViewItem {
+class SnippetItem : public TQObject, public TQListViewItem {
friend class SnippetGroup;
Q_OBJECT
public:
- SnippetItem(QListViewItem * parent, QString name, QString text);
+ SnippetItem(TQListViewItem * parent, TQString name, TQString text);
~SnippetItem();
- QString getName();
- QString getText();
- using QListViewItem::parent;
+ TQString getName();
+ TQString getText();
+ using TQListViewItem::parent;
int getParent() { return iParent; }
void resetParent();
- void setText(QString text);
- void setName(QString name);
+ void setText(TQString text);
+ void setName(TQString name);
void setAction( KAction* );
KAction* getAction();
- static SnippetItem * findItemByName(QString name, QPtrList<SnippetItem> &list);
- static SnippetGroup * findGroupById(int id, QPtrList<SnippetItem> &list);
+ static SnippetItem * findItemByName(TQString name, TQPtrList<SnippetItem> &list);
+ static SnippetGroup * findGroupById(int id, TQPtrList<SnippetItem> &list);
signals:
- void execute( QListViewItem * );
+ void execute( TQListViewItem * );
public slots:
void slotExecute();
private:
- SnippetItem(QListView * parent, QString name, QString text);
- QString strName;
- QString strText;
+ SnippetItem(TQListView * parent, TQString name, TQString text);
+ TQString strName;
+ TQString strText;
int iParent;
KAction *action;
};
@@ -64,12 +64,12 @@ private:
/**
This class represents one group in the listview.
It is derived from SnippetItem in order to allow storing
-it in the main QPtrList<SnippetItem>.
+it in the main TQPtrList<SnippetItem>.
@author Robert Gruber
*/
class SnippetGroup : public SnippetItem {
public:
- SnippetGroup(QListView * parent, QString name, int id);
+ SnippetGroup(TQListView * parent, TQString name, int id);
~SnippetGroup();
int getId() { return iId; }
diff --git a/kmail/snippetsettings.cpp b/kmail/snippetsettings.cpp
index 0e34fb738..e61ebf43c 100644
--- a/kmail/snippetsettings.cpp
+++ b/kmail/snippetsettings.cpp
@@ -11,22 +11,22 @@
* *
***************************************************************************/
-#include <qstring.h>
+#include <tqstring.h>
#include <klineedit.h>
-#include <qcheckbox.h>
-#include <qbuttongroup.h>
+#include <tqcheckbox.h>
+#include <tqbuttongroup.h>
#include "snippetsettings.h"
#include "snippetwidget.h"
-SnippetSettings::SnippetSettings(QWidget *parent, const char *name)
+SnippetSettings::SnippetSettings(TQWidget *parent, const char *name)
: SnippetSettingsBase(parent, name)
{
_widget = NULL;
}
-SnippetSettings::SnippetSettings(SnippetWidget * w, QWidget *parent, const char *name)
+SnippetSettings::SnippetSettings(SnippetWidget * w, TQWidget *parent, const char *name)
: SnippetSettingsBase(parent, name)
{
_cfg = w->getSnippetConfig();
diff --git a/kmail/snippetsettings.h b/kmail/snippetsettings.h
index 849cc4386..f6362d969 100644
--- a/kmail/snippetsettings.h
+++ b/kmail/snippetsettings.h
@@ -30,8 +30,8 @@ class SnippetSettings : public SnippetSettingsBase
{
Q_OBJECT
public:
- SnippetSettings(QWidget *parent = 0, const char *name = 0);
- SnippetSettings(SnippetWidget * w, QWidget *parent = 0, const char *name = 0);
+ SnippetSettings(TQWidget *parent = 0, const char *name = 0);
+ SnippetSettings(SnippetWidget * w, TQWidget *parent = 0, const char *name = 0);
~SnippetSettings();
diff --git a/kmail/snippetwidget.cpp b/kmail/snippetwidget.cpp
index 1682e2580..617021748 100644
--- a/kmail/snippetwidget.cpp
+++ b/kmail/snippetwidget.cpp
@@ -14,23 +14,23 @@
#include <kurl.h>
#include <kdebug.h>
#include <klocale.h>
-#include <qlayout.h>
+#include <tqlayout.h>
#include <kpushbutton.h>
#include <klistview.h>
-#include <qheader.h>
+#include <tqheader.h>
#include <klineedit.h>
#include <ktextedit.h>
#include <kmessagebox.h>
#include <kconfig.h>
-#include <qtooltip.h>
+#include <tqtooltip.h>
#include <kpopupmenu.h>
-#include <qregexp.h>
-#include <qinputdialog.h>
-#include <qlabel.h>
-#include <qcheckbox.h>
-#include <qwhatsthis.h>
-#include <qdragobject.h>
-#include <qtimer.h>
+#include <tqregexp.h>
+#include <tqinputdialog.h>
+#include <tqlabel.h>
+#include <tqcheckbox.h>
+#include <tqwhatsthis.h>
+#include <tqdragobject.h>
+#include <tqtimer.h>
#include <kcombobox.h>
#include <kmedit.h>
#include <kiconloader.h>
@@ -44,8 +44,8 @@
#include <cassert>
-SnippetWidget::SnippetWidget(KMEdit* editor, KActionCollection* actionCollection, QWidget* parent)
- : KListView(parent, "snippet widget"), QToolTip( viewport() ),
+SnippetWidget::SnippetWidget(KMEdit* editor, KActionCollection* actionCollection, TQWidget* parent)
+ : KListView(parent, "snippet widget"), TQToolTip( viewport() ),
mEditor( editor ), mActionCollection( actionCollection )
{
// init the QPtrList
@@ -62,22 +62,22 @@ SnippetWidget::SnippetWidget(KMEdit* editor, KActionCollection* actionCollection
setRootIsDecorated(true);
//connect the signals
- connect( this, SIGNAL( contextMenuRequested ( QListViewItem *, const QPoint & , int ) ),
- this, SLOT( showPopupMenu(QListViewItem *, const QPoint & , int ) ) );
+ connect( this, TQT_SIGNAL( contextMenuRequested ( TQListViewItem *, const TQPoint & , int ) ),
+ this, TQT_SLOT( showPopupMenu(TQListViewItem *, const TQPoint & , int ) ) );
- connect( this, SIGNAL( doubleClicked (QListViewItem *) ),
- this, SLOT( slotEdit( QListViewItem *) ) );
- connect( this, SIGNAL( returnPressed (QListViewItem *) ),
- this, SLOT( slotExecuted( QListViewItem *) ) );
+ connect( this, TQT_SIGNAL( doubleClicked (TQListViewItem *) ),
+ this, TQT_SLOT( slotEdit( TQListViewItem *) ) );
+ connect( this, TQT_SIGNAL( returnPressed (TQListViewItem *) ),
+ this, TQT_SLOT( slotExecuted( TQListViewItem *) ) );
- connect( this, SIGNAL( dropped(QDropEvent *, QListViewItem *) ),
- this, SLOT( slotDropped(QDropEvent *, QListViewItem *) ) );
+ connect( this, TQT_SIGNAL( dropped(TQDropEvent *, TQListViewItem *) ),
+ this, TQT_SLOT( slotDropped(TQDropEvent *, TQListViewItem *) ) );
- connect( editor, SIGNAL( insertSnippet() ), this, SLOT( slotExecute() ));
+ connect( editor, TQT_SIGNAL( insertSnippet() ), this, TQT_SLOT( slotExecute() ));
_cfg = 0;
- QTimer::singleShot(0, this, SLOT(initConfig()));
+ TQTimer::singleShot(0, this, TQT_SLOT(initConfig()));
}
SnippetWidget::~SnippetWidget()
@@ -132,28 +132,28 @@ void SnippetWidget::slotAdd()
}
dlg.cbGroup->setCurrentText(group->getName());
- if (dlg.exec() == QDialog::Accepted) {
+ if (dlg.exec() == TQDialog::Accepted) {
group = dynamic_cast<SnippetGroup*>(SnippetItem::findItemByName(dlg.cbGroup->currentText(), _list));
_list.append( makeItem( group, dlg.snippetName->text(), dlg.snippetText->text(), dlg.keyButton->shortcut() ) );
}
}
/*!
- \fn SnippetWidget::makeItem( SnippetItem* parent, const QString& name, const QString& text )
+ \fn SnippetWidget::makeItem( SnippetItem* parent, const TQString& name, const TQString& text )
Helper factory method.
*/
-SnippetItem* SnippetWidget::makeItem( SnippetItem* parent, const QString& name, const QString& text, const KShortcut& shortcut )
+SnippetItem* SnippetWidget::makeItem( SnippetItem* parent, const TQString& name, const TQString& text, const KShortcut& shortcut )
{
SnippetItem * item = new SnippetItem(parent, name, text);
- const QString actionName = i18n("Snippet %1").arg(name);
- const QString normalizedName = QString(actionName).replace(" ", "_");
+ const TQString actionName = i18n("Snippet %1").arg(name);
+ const TQString normalizedName = TQString(actionName).replace(" ", "_");
if ( !mActionCollection->action(normalizedName.utf8() ) ) {
KAction * action = new KAction( actionName, shortcut, item,
- SLOT( slotExecute() ), mActionCollection,
+ TQT_SLOT( slotExecute() ), mActionCollection,
normalizedName.utf8() );
item->setAction(action);
- connect( item, SIGNAL( execute( QListViewItem* ) ),
- this, SLOT( slotExecuted( QListViewItem* ) ) );
+ connect( item, TQT_SIGNAL( execute( TQListViewItem* ) ),
+ this, TQT_SLOT( slotExecuted( TQListViewItem* ) ) );
}
return item;
}
@@ -173,7 +173,7 @@ void SnippetWidget::slotAddGroup()
dlg.cbGroup->insertItem(i18n("All"));
dlg.cbGroup->setCurrentText(i18n("All"));
- if (dlg.exec() == QDialog::Accepted) {
+ if (dlg.exec() == TQDialog::Accepted) {
_list.append( new SnippetGroup(this, dlg.snippetName->text(), SnippetGroup::getMaxId() ) );
}
}
@@ -186,7 +186,7 @@ void SnippetWidget::slotAddGroup()
void SnippetWidget::slotRemove()
{
//get current data
- QListViewItem * item = currentItem();
+ TQListViewItem * item = currentItem();
SnippetItem *snip = dynamic_cast<SnippetItem*>( item );
SnippetGroup *group = dynamic_cast<SnippetGroup*>( item );
if (!snip)
@@ -194,7 +194,7 @@ void SnippetWidget::slotRemove()
if (group) {
if (group->childCount() > 0 &&
- KMessageBox::warningContinueCancel(this, i18n("Do you really want to remove this group and all its snippets?"),QString::null,KStdGuiItem::del())
+ KMessageBox::warningContinueCancel(this, i18n("Do you really want to remove this group and all its snippets?"),TQString::null,KStdGuiItem::del())
== KMessageBox::Cancel)
return;
@@ -221,7 +221,7 @@ void SnippetWidget::slotRemove()
\fn SnippetWidget::slotEdit()
Opens the dialog of editing the selected snippet
*/
-void SnippetWidget::slotEdit( QListViewItem* item )
+void SnippetWidget::slotEdit( TQListViewItem* item )
{
if( item == 0 ) {
item = currentItem();
@@ -248,7 +248,7 @@ void SnippetWidget::slotEdit( QListViewItem* item )
}
dlg.cbGroup->setCurrentText(SnippetItem::findGroupById(pSnippet->getParent(), _list)->getName());
- if (dlg.exec() == QDialog::Accepted) {
+ if (dlg.exec() == TQDialog::Accepted) {
//update the KListView and the SnippetItem
item->setText( 0, dlg.snippetName->text() );
pSnippet->setName( dlg.snippetName->text() );
@@ -274,7 +274,7 @@ void SnippetWidget::slotEdit( QListViewItem* item )
void SnippetWidget::slotEditGroup()
{
//get current data
- QListViewItem * item = currentItem();
+ TQListViewItem * item = currentItem();
SnippetGroup *pGroup = dynamic_cast<SnippetGroup*>( item );
if (!pGroup) /*selected item MUST be a SnippetGroup*/
@@ -290,7 +290,7 @@ void SnippetWidget::slotEditGroup()
dlg.setCaption(i18n("Edit Group"));
dlg.cbGroup->insertItem(i18n("All"));
- if (dlg.exec() == QDialog::Accepted) {
+ if (dlg.exec() == TQDialog::Accepted) {
//update the KListView and the SnippetGroup
item->setText( 0, dlg.snippetName->text() );
pGroup->setName( dlg.snippetName->text() );
@@ -299,7 +299,7 @@ void SnippetWidget::slotEditGroup()
}
}
-void SnippetWidget::slotExecuted(QListViewItem * item)
+void SnippetWidget::slotExecuted(TQListViewItem * item)
{
if( item == 0 )
{
@@ -316,10 +316,10 @@ void SnippetWidget::slotExecuted(QListViewItem * item)
/*!
- \fn SnippetWidget::insertIntoActiveView(QString text)
+ \fn SnippetWidget::insertIntoActiveView(TQString text)
Inserts the parameter text into the activ view
*/
-void SnippetWidget::insertIntoActiveView( const QString &text )
+void SnippetWidget::insertIntoActiveView( const TQString &text )
{
mEditor->insert( text );
}
@@ -337,9 +337,9 @@ void SnippetWidget::writeConfig()
//they get overwritten by a more recent entry
_cfg->setGroup("SnippetPart");
- QString strKeyName="";
- QString strKeyText="";
- QString strKeyId="";
+ TQString strKeyName="";
+ TQString strKeyText="";
+ TQString strKeyId="";
int iSnipCount = 0;
int iGroupCount = 0;
@@ -352,8 +352,8 @@ void SnippetWidget::writeConfig()
SnippetGroup * group = dynamic_cast<SnippetGroup*>(item);
if (group) {
//kdDebug(5006) << "-->GROUP " << item->getName() << group->getId() << " " << iGroupCount<< endl;
- strKeyName=QString("snippetGroupName_%1").arg(iGroupCount);
- strKeyId=QString("snippetGroupId_%1").arg(iGroupCount);
+ strKeyName=TQString("snippetGroupName_%1").arg(iGroupCount);
+ strKeyId=TQString("snippetGroupId_%1").arg(iGroupCount);
_cfg->writeEntry(strKeyName, group->getName());
_cfg->writeEntry(strKeyId, group->getId());
@@ -361,9 +361,9 @@ void SnippetWidget::writeConfig()
iGroupCount++;
} else if (dynamic_cast<SnippetItem*>(item)) {
//kdDebug(5006) << "-->ITEM " << item->getName() << item->getParent() << " " << iSnipCount << endl;
- strKeyName=QString("snippetName_%1").arg(iSnipCount);
- strKeyText=QString("snippetText_%1").arg(iSnipCount);
- strKeyId=QString("snippetParent_%1").arg(iSnipCount);
+ strKeyName=TQString("snippetName_%1").arg(iSnipCount);
+ strKeyText=TQString("snippetText_%1").arg(iSnipCount);
+ strKeyId=TQString("snippetParent_%1").arg(iSnipCount);
_cfg->writeEntry(strKeyName, item->getName());
_cfg->writeEntry(strKeyText, item->getText());
@@ -373,7 +373,7 @@ void SnippetWidget::writeConfig()
assert( action );
const KShortcut& sc = action->shortcut();
if (!sc.isNull() ) {
- _cfg->writeEntry( QString("snippetShortcut_%1").arg(iSnipCount), sc.toString() );
+ _cfg->writeEntry( TQString("snippetShortcut_%1").arg(iSnipCount), sc.toString() );
}
iSnipCount++;
} else {
@@ -385,12 +385,12 @@ void SnippetWidget::writeConfig()
_cfg->writeEntry("snippetGroupCount", iGroupCount);
int iCount = 1;
- QMap<QString, QString>::Iterator it;
+ TQMap<TQString, TQString>::Iterator it;
for ( it = _mapSaved.begin(); it != _mapSaved.end(); ++it ) { //write the saved variable values
if (it.data().length()<=0) continue; //is the saved value has no length -> no need to save it
- strKeyName=QString("snippetSavedName_%1").arg(iCount);
- strKeyText=QString("snippetSavedVal_%1").arg(iCount);
+ strKeyName=TQString("snippetSavedName_%1").arg(iCount);
+ strKeyText=TQString("snippetSavedVal_%1").arg(iCount);
_cfg->writeEntry(strKeyName, it.key());
_cfg->writeEntry(strKeyText, it.data());
@@ -422,9 +422,9 @@ void SnippetWidget::initConfig()
_cfg->setGroup("SnippetPart");
- QString strKeyName="";
- QString strKeyText="";
- QString strKeyId="";
+ TQString strKeyName="";
+ TQString strKeyText="";
+ TQString strKeyId="";
SnippetItem *item;
SnippetGroup *group;
@@ -434,10 +434,10 @@ void SnippetWidget::initConfig()
int iCount = _cfg->readNumEntry("snippetGroupCount", -1);
for ( int i=0; i<iCount; i++) { //read the group-list
- strKeyName=QString("snippetGroupName_%1").arg(i);
- strKeyId=QString("snippetGroupId_%1").arg(i);
+ strKeyName=TQString("snippetGroupName_%1").arg(i);
+ strKeyId=TQString("snippetGroupId_%1").arg(i);
- QString strNameVal="";
+ TQString strNameVal="";
int iIdVal=-1;
strNameVal = _cfg->readEntry(strKeyName, "");
@@ -460,12 +460,12 @@ void SnippetWidget::initConfig()
if (iCount != -1) {
iCount = _cfg->readNumEntry("snippetCount", 0);
for ( int i=0; i<iCount; i++) { //read the snippet-list
- strKeyName=QString("snippetName_%1").arg(i);
- strKeyText=QString("snippetText_%1").arg(i);
- strKeyId=QString("snippetParent_%1").arg(i);
+ strKeyName=TQString("snippetName_%1").arg(i);
+ strKeyText=TQString("snippetText_%1").arg(i);
+ strKeyId=TQString("snippetParent_%1").arg(i);
- QString strNameVal="";
- QString strTextVal="";
+ TQString strNameVal="";
+ TQString strTextVal="";
int iParentVal = -1;
strNameVal = _cfg->readEntry(strKeyName, "");
@@ -474,7 +474,7 @@ void SnippetWidget::initConfig()
//kdDebug(5006) << "Read item " << strNameVal << " " << iParentVal << endl;
if (strNameVal != "" && strTextVal != "" && iParentVal != -1) {
- KShortcut shortcut( _cfg->readEntry( QString("snippetShortcut_%1").arg(i), QString() ) );
+ KShortcut shortcut( _cfg->readEntry( TQString("snippetShortcut_%1").arg(i), TQString() ) );
item = makeItem( SnippetItem::findGroupById(iParentVal, _list), strNameVal, strTextVal, shortcut );
//kdDebug(5006) << "Created item " << item->getName() << " " << item->getParent() << endl;
_list.append(item);
@@ -487,11 +487,11 @@ void SnippetWidget::initConfig()
iCount = _cfg->readNumEntry("snippetSavedCount", 0);
for ( int i=1; i<=iCount; i++) { //read the saved-values and store in QMap
- strKeyName=QString("snippetSavedName_%1").arg(i);
- strKeyText=QString("snippetSavedVal_%1").arg(i);
+ strKeyName=TQString("snippetSavedName_%1").arg(i);
+ strKeyText=TQString("snippetSavedVal_%1").arg(i);
- QString strNameVal="";
- QString strTextVal="";
+ TQString strNameVal="";
+ TQString strTextVal="";
strNameVal = _cfg->readEntry(strKeyName, "");
strTextVal = _cfg->readEntry(strKeyText, "");
@@ -512,16 +512,16 @@ void SnippetWidget::initConfig()
}
/*!
- \fn SnippetWidget::maybeTip( const QPoint & p )
+ \fn SnippetWidget::maybeTip( const TQPoint & p )
Shows the Snippet-Text as ToolTip
*/
-void SnippetWidget::maybeTip( const QPoint & p )
+void SnippetWidget::maybeTip( const TQPoint & p )
{
SnippetItem * item = dynamic_cast<SnippetItem*>( itemAt( p ) );
if (!item)
return;
- QRect r = itemRect( item );
+ TQRect r = itemRect( item );
if (r.isValid() &&
_SnippetConfig.useToolTips() )
@@ -531,10 +531,10 @@ void SnippetWidget::maybeTip( const QPoint & p )
}
/*!
- \fn SnippetWidget::showPopupMenu( QListViewItem * item, const QPoint & p, int )
+ \fn SnippetWidget::showPopupMenu( TQListViewItem * item, const TQPoint & p, int )
Shows the Popup-Menu depending item is a valid pointer
*/
-void SnippetWidget::showPopupMenu( QListViewItem * item, const QPoint & p, int )
+void SnippetWidget::showPopupMenu( TQListViewItem * item, const TQPoint & p, int )
{
KPopupMenu popup;
@@ -542,43 +542,43 @@ void SnippetWidget::showPopupMenu( QListViewItem * item, const QPoint & p, int )
if ( item ) {
popup.insertTitle( selectedItem->getName() );
if (dynamic_cast<SnippetGroup*>(item)) {
- popup.insertItem( i18n("Edit &group..."), this, SLOT( slotEditGroup() ) );
+ popup.insertItem( i18n("Edit &group..."), this, TQT_SLOT( slotEditGroup() ) );
} else {
- popup.insertItem( SmallIconSet("editpaste"), i18n("&Paste"), this, SLOT( slotExecuted() ) );
- popup.insertItem( SmallIconSet("edit"), i18n("&Edit..."), this, SLOT( slotEdit() ) );
+ popup.insertItem( SmallIconSet("editpaste"), i18n("&Paste"), this, TQT_SLOT( slotExecuted() ) );
+ popup.insertItem( SmallIconSet("edit"), i18n("&Edit..."), this, TQT_SLOT( slotEdit() ) );
}
- popup.insertItem( SmallIconSet("editdelete"), i18n("&Remove"), this, SLOT( slotRemove() ) );
+ popup.insertItem( SmallIconSet("editdelete"), i18n("&Remove"), this, TQT_SLOT( slotRemove() ) );
popup.insertSeparator();
} else {
popup.insertTitle(i18n("Text Snippets"));
}
- popup.insertItem( i18n("&Add Snippet..."), this, SLOT( slotAdd() ) );
- popup.insertItem( i18n("Add G&roup..."), this, SLOT( slotAddGroup() ) );
+ popup.insertItem( i18n("&Add Snippet..."), this, TQT_SLOT( slotAdd() ) );
+ popup.insertItem( i18n("Add G&roup..."), this, TQT_SLOT( slotAddGroup() ) );
popup.exec(p);
}
-// fn SnippetWidget::parseText(QString text, QString del)
+// fn SnippetWidget::parseText(TQString text, TQString del)
/*!
- This function is used to parse the given QString for variables. If found the user will be prompted
+ This function is used to parse the given TQString for variables. If found the user will be prompted
for a replacement value. It returns the string text with all replacements made
*/
-QString SnippetWidget::parseText(QString text, QString del)
+TQString SnippetWidget::parseText(TQString text, TQString del)
{
- QString str = text;
- QString strName = "";
- QString strNew = "";
- QString strMsg="";
+ TQString str = text;
+ TQString strName = "";
+ TQString strNew = "";
+ TQString strMsg="";
int iFound = -1;
int iEnd = -1;
- QMap<QString, QString> mapVar;
+ TQMap<TQString, TQString> mapVar;
int iInMeth = _SnippetConfig.getInputMethod();
- QRect rSingle = _SnippetConfig.getSingleRect();
- QRect rMulti = _SnippetConfig.getMultiRect();
+ TQRect rSingle = _SnippetConfig.getSingleRect();
+ TQRect rMulti = _SnippetConfig.getMultiRect();
do {
- iFound = text.find(QRegExp("\\"+del+"[A-Za-z-_0-9\\s]*\\"+del), iEnd+1); //find the next variable by this QRegExp
+ iFound = text.find(TQRegExp("\\"+del+"[A-Za-z-_0-9\\s]*\\"+del), iEnd+1); //find the next variable by this QRegExp
if (iFound >= 0) {
iEnd = text.find(del, iFound+1)+1;
strName = text.mid(iFound, iEnd-iFound);
@@ -614,7 +614,7 @@ QString SnippetWidget::parseText(QString text, QString del)
bh = rMulti.height();
oh = rMulti.top();
if (showMultiVarDialog( &mapVar, &_mapSaved, w, bh, oh )) { //generate and show the dialog
- QMap<QString, QString>::Iterator it;
+ TQMap<TQString, TQString>::Iterator it;
for ( it = mapVar.begin(); it != mapVar.end(); ++it ) { //walk through the map and do the replacement
str.replace(it.key(), it.data());
}
@@ -641,7 +641,7 @@ QString SnippetWidget::parseText(QString text, QString del)
variable that is stored in the given map except the double-delimiter entry
It return true if everything was ok and false if the user hit cancel
*/
-bool SnippetWidget::showMultiVarDialog(QMap<QString, QString> * map, QMap<QString, QString> * mapSave,
+bool SnippetWidget::showMultiVarDialog(TQMap<TQString, TQString> * map, TQMap<TQString, TQString> * mapSave,
int & iWidth, int & iBasicHeight, int & iOneHeight)
{
//if no var -> no need to show
@@ -649,28 +649,28 @@ bool SnippetWidget::showMultiVarDialog(QMap<QString, QString> * map, QMap<QStrin
return true;
//if only var is the double-delimiter -> no need to show
- QMap<QString, QString>::Iterator it = map->begin();
+ TQMap<TQString, TQString>::Iterator it = map->begin();
if ( map->count() == 1 && it.data()==_SnippetConfig.getDelimiter()+_SnippetConfig.getDelimiter() )
return true;
- QMap<QString, KTextEdit *> mapVar2Te; //this map will help keeping track which TEXTEDIT goes with which variable
- QMap<QString, QCheckBox *> mapVar2Cb; //this map will help keeping track which CHECKBOX goes with which variable
+ TQMap<TQString, KTextEdit *> mapVar2Te; //this map will help keeping track which TEXTEDIT goes with which variable
+ TQMap<TQString, TQCheckBox *> mapVar2Cb; //this map will help keeping track which CHECKBOX goes with which variable
// --BEGIN-- building a dynamic dialog
- QDialog dlg(this);
+ TQDialog dlg(this);
dlg.setCaption(i18n("Enter Values for Variables"));
- QGridLayout * layout = new QGridLayout( &dlg, 1, 1, 11, 6, "layout");
- QGridLayout * layoutTop = new QGridLayout( 0, 1, 1, 0, 6, "layoutTop");
- QGridLayout * layoutVar = new QGridLayout( 0, 1, 1, 0, 6, "layoutVar");
- QGridLayout * layoutBtn = new QGridLayout( 0, 1, 1, 0, 6, "layoutBtn");
+ TQGridLayout * layout = new TQGridLayout( &dlg, 1, 1, 11, 6, "layout");
+ TQGridLayout * layoutTop = new TQGridLayout( 0, 1, 1, 0, 6, "layoutTop");
+ TQGridLayout * layoutVar = new TQGridLayout( 0, 1, 1, 0, 6, "layoutVar");
+ TQGridLayout * layoutBtn = new TQGridLayout( 0, 1, 1, 0, 6, "layoutBtn");
KTextEdit *te = NULL;
- QLabel * labTop = NULL;
- QCheckBox * cb = NULL;
+ TQLabel * labTop = NULL;
+ TQCheckBox * cb = NULL;
- labTop = new QLabel( &dlg, "label" );
- labTop->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1, (QSizePolicy::SizeType)0, 0, 0,
+ labTop = new TQLabel( &dlg, "label" );
+ labTop->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)0, 0, 0,
labTop->sizePolicy().hasHeightForWidth() ) );
labTop->setText(i18n("Enter the replacement values for these variables:"));
layoutTop->addWidget(labTop, 0, 0);
@@ -682,7 +682,7 @@ bool SnippetWidget::showMultiVarDialog(QMap<QString, QString> * map, QMap<QStrin
if (it.key() == _SnippetConfig.getDelimiter() + _SnippetConfig.getDelimiter())
continue;
- cb = new QCheckBox( &dlg, "cbVar" );
+ cb = new TQCheckBox( &dlg, "cbVar" );
cb->setChecked( FALSE );
cb->setText(it.key());
layoutVar->addWidget( cb, i ,0, Qt::AlignTop );
@@ -698,8 +698,8 @@ bool SnippetWidget::showMultiVarDialog(QMap<QString, QString> * map, QMap<QStrin
mapVar2Te[it.key()] = te;
mapVar2Cb[it.key()] = cb;
- QToolTip::add( cb, i18n("Enable this to save the value entered to the right as the default value for this variable") );
- QWhatsThis::add( cb, i18n("If you enable this option, the value entered to the right will be saved. "
+ TQToolTip::add( cb, i18n("Enable this to save the value entered to the right as the default value for this variable") );
+ TQWhatsThis::add( cb, i18n("If you enable this option, the value entered to the right will be saved. "
"If you use the same variable later, even in another snippet, the value entered to the right "
"will be the default value for that variable.") );
@@ -708,36 +708,36 @@ bool SnippetWidget::showMultiVarDialog(QMap<QString, QString> * map, QMap<QStrin
layout->addMultiCellLayout( layoutVar, 1, 1, 0, 1 );
KPushButton * btn1 = new KPushButton( KStdGuiItem::cancel(), &dlg, "pushButton1" );
- btn1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1, (QSizePolicy::SizeType)0, 0, 0,
+ btn1->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)0, 0, 0,
btn1->sizePolicy().hasHeightForWidth() ) );
layoutBtn->addWidget( btn1, 0, 0 );
KPushButton * btn2 = new KPushButton( KStdGuiItem::apply(), &dlg, "pushButton2" );
btn2->setDefault( TRUE );
- btn2->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1, (QSizePolicy::SizeType)0, 0, 0,
+ btn2->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)0, 0, 0,
btn2->sizePolicy().hasHeightForWidth() ) );
layoutBtn->addWidget( btn2, 0, 1 );
layout->addMultiCellLayout( layoutBtn, 2, 2, 0, 1 );
// --END-- building a dynamic dialog
- //connect the buttons to the QDialog default slots
- connect(btn1, SIGNAL(clicked()), &dlg, SLOT(reject()) );
- connect(btn2, SIGNAL(clicked()), &dlg, SLOT(accept()) );
+ //connect the buttons to the TQDialog default slots
+ connect(btn1, TQT_SIGNAL(clicked()), &dlg, TQT_SLOT(reject()) );
+ connect(btn2, TQT_SIGNAL(clicked()), &dlg, TQT_SLOT(accept()) );
//prepare to execute the dialog
bool bReturn = false;
//resize the textedits
if (iWidth > 1) {
- QRect r = dlg.geometry();
+ TQRect r = dlg.geometry();
r.setHeight(iBasicHeight + iOneHeight*mapVar2Te.count());
r.setWidth(iWidth);
dlg.setGeometry(r);
}
if ( i > 0 && // only if there are any variables
- dlg.exec() == QDialog::Accepted ) {
+ dlg.exec() == TQDialog::Accepted ) {
- QMap<QString, KTextEdit *>::Iterator it2;
+ TQMap<TQString, KTextEdit *>::Iterator it2;
for ( it2 = mapVar2Te.begin(); it2 != mapVar2Te.end(); ++it2 ) {
if (it2.key() == _SnippetConfig.getDelimiter() + _SnippetConfig.getDelimiter())
continue;
@@ -756,11 +756,11 @@ bool SnippetWidget::showMultiVarDialog(QMap<QString, QString> * map, QMap<QStrin
}
//do some cleanup
- QMap<QString, KTextEdit *>::Iterator it1;
+ TQMap<TQString, KTextEdit *>::Iterator it1;
for (it1 = mapVar2Te.begin(); it1 != mapVar2Te.end(); ++it1)
delete it1.data();
mapVar2Te.clear();
- QMap<QString, QCheckBox *>::Iterator it2;
+ TQMap<TQString, TQCheckBox *>::Iterator it2;
for (it2 = mapVar2Cb.begin(); it2 != mapVar2Cb.end(); ++it2)
delete it2.data();
mapVar2Cb.clear();
@@ -777,33 +777,33 @@ bool SnippetWidget::showMultiVarDialog(QMap<QString, QString> * map, QMap<QStrin
}
-// fn SnippetWidget::showSingleVarDialog(QString var, QMap<QString, QString> * mapSave)
+// fn SnippetWidget::showSingleVarDialog(TQString var, TQMap<TQString, TQString> * mapSave)
/*!
This function constructs a dialog which contains a label and a linedit for the given variable
It return either the entered value or an empty string if the user hit cancel
*/
-QString SnippetWidget::showSingleVarDialog(QString var, QMap<QString, QString> * mapSave, QRect & dlgSize)
+TQString SnippetWidget::showSingleVarDialog(TQString var, TQMap<TQString, TQString> * mapSave, TQRect & dlgSize)
{
// --BEGIN-- building a dynamic dialog
- QDialog dlg(this);
+ TQDialog dlg(this);
dlg.setCaption(i18n("Enter Values for Variables"));
- QGridLayout * layout = new QGridLayout( &dlg, 1, 1, 11, 6, "layout");
- QGridLayout * layoutTop = new QGridLayout( 0, 1, 1, 0, 6, "layoutTop");
- QGridLayout * layoutVar = new QGridLayout( 0, 1, 1, 0, 6, "layoutVar");
- QGridLayout * layoutBtn = new QGridLayout( 0, 2, 1, 0, 6, "layoutBtn");
+ TQGridLayout * layout = new TQGridLayout( &dlg, 1, 1, 11, 6, "layout");
+ TQGridLayout * layoutTop = new TQGridLayout( 0, 1, 1, 0, 6, "layoutTop");
+ TQGridLayout * layoutVar = new TQGridLayout( 0, 1, 1, 0, 6, "layoutVar");
+ TQGridLayout * layoutBtn = new TQGridLayout( 0, 2, 1, 0, 6, "layoutBtn");
KTextEdit *te = NULL;
- QLabel * labTop = NULL;
- QCheckBox * cb = NULL;
+ TQLabel * labTop = NULL;
+ TQCheckBox * cb = NULL;
- labTop = new QLabel( &dlg, "label" );
+ labTop = new TQLabel( &dlg, "label" );
layoutTop->addWidget(labTop, 0, 0);
labTop->setText(i18n("Enter the replacement values for %1:").arg( var ));
layout->addMultiCellLayout( layoutTop, 0, 0, 0, 1 );
- cb = new QCheckBox( &dlg, "cbVar" );
+ cb = new TQCheckBox( &dlg, "cbVar" );
cb->setChecked( FALSE );
cb->setText(i18n( "Make value &default" ));
@@ -815,8 +815,8 @@ QString SnippetWidget::showSingleVarDialog(QString var, QMap<QString, QString> *
te->setText((*mapSave)[var]);
}
- QToolTip::add( cb, i18n("Enable this to save the value entered to the right as the default value for this variable") );
- QWhatsThis::add( cb, i18n("If you enable this option, the value entered to the right will be saved. "
+ TQToolTip::add( cb, i18n("Enable this to save the value entered to the right as the default value for this variable") );
+ TQWhatsThis::add( cb, i18n("If you enable this option, the value entered to the right will be saved. "
"If you use the same variable later, even in another snippet, the value entered to the right "
"will be the default value for that variable.") );
@@ -833,15 +833,15 @@ QString SnippetWidget::showSingleVarDialog(QString var, QMap<QString, QString> *
te->setFocus();
// --END-- building a dynamic dialog
- //connect the buttons to the QDialog default slots
- connect(btn1, SIGNAL(clicked()), &dlg, SLOT(reject()) );
- connect(btn2, SIGNAL(clicked()), &dlg, SLOT(accept()) );
+ //connect the buttons to the TQDialog default slots
+ connect(btn1, TQT_SIGNAL(clicked()), &dlg, TQT_SLOT(reject()) );
+ connect(btn2, TQT_SIGNAL(clicked()), &dlg, TQT_SLOT(accept()) );
//execute the dialog
- QString strReturn = "";
+ TQString strReturn = "";
if (dlgSize.isValid())
dlg.setGeometry(dlgSize);
- if ( dlg.exec() == QDialog::Accepted ) {
+ if ( dlg.exec() == TQDialog::Accepted ) {
if (cb->isChecked()) //if the checkbox is on; save the values for later
(*mapSave)[var] = te->text();
else
@@ -866,26 +866,26 @@ QString SnippetWidget::showSingleVarDialog(QString var, QMap<QString, QString> *
return strReturn;
}
-// fn SnippetWidget::acceptDrag (QDropEvent *event) const
+// fn SnippetWidget::acceptDrag (TQDropEvent *event) const
/*!
Reimplementation from KListView.
Check here if the data the user is about to drop fits our restrictions.
We only accept dropps of plaintext, because from the dropped text
we will create a snippet.
*/
-bool SnippetWidget::acceptDrag (QDropEvent *event) const
+bool SnippetWidget::acceptDrag (TQDropEvent *event) const
{
//kdDebug(5006) << "Format: " << event->format() << "" << event->pos() << endl;
- QListViewItem * item = itemAt(event->pos());
+ TQListViewItem * item = itemAt(event->pos());
if (item &&
- QString(event->format()).startsWith("text/plain") &&
+ TQString(event->format()).startsWith("text/plain") &&
static_cast<SnippetWidget *>(event->source()) != this) {
///kdDebug(5006) << "returning TRUE " << endl;
return TRUE;
} else if(item &&
- QString(event->format()).startsWith("x-kmailsnippet") &&
+ TQString(event->format()).startsWith("x-kmailsnippet") &&
static_cast<SnippetWidget *>(event->source()) != this)
{
//kdDebug(5006) << "returning TRUE " << endl;
@@ -897,25 +897,25 @@ bool SnippetWidget::acceptDrag (QDropEvent *event) const
}
}
-// fn SnippetWidget::slotDropped(QDropEvent *e, QListViewItem *after)
+// fn SnippetWidget::slotDropped(TQDropEvent *e, TQListViewItem *after)
/*!
This slot is connected to the dropped signal.
If it is emitted, we need to construct a new snippet entry with
the data given
*/
-void SnippetWidget::slotDropped(QDropEvent *e, QListViewItem *)
+void SnippetWidget::slotDropped(TQDropEvent *e, TQListViewItem *)
{
- QListViewItem * item2 = itemAt(e->pos());
+ TQListViewItem * item2 = itemAt(e->pos());
SnippetGroup *group = dynamic_cast<SnippetGroup *>(item2);
if (!group)
group = dynamic_cast<SnippetGroup *>(item2->parent());
- QCString dropped;
- QByteArray data = e->encodedData("text/plain");
+ TQCString dropped;
+ TQByteArray data = e->encodedData("text/plain");
if ( e->provides("text/plain") && data.size()>0 ) {
//get the data from the event...
- QString encData(data.data());
+ TQString encData(data.data());
//kdDebug(5006) << "encData: " << encData << endl;
//... then fill the dialog with the given data
@@ -931,7 +931,7 @@ void SnippetWidget::slotDropped(QDropEvent *e, QListViewItem *)
}
dlg.cbGroup->setCurrentText(group->getName());
- if (dlg.exec() == QDialog::Accepted) {
+ if (dlg.exec() == TQDialog::Accepted) {
/* get the group that the user selected with the combobox */
group = dynamic_cast<SnippetGroup*>(SnippetItem::findItemByName(dlg.cbGroup->currentText(), _list));
_list.append( makeItem(group, dlg.snippetName->text(), dlg.snippetText->text(), dlg.keyButton->shortcut() ) );
@@ -941,8 +941,8 @@ void SnippetWidget::slotDropped(QDropEvent *e, QListViewItem *)
void SnippetWidget::startDrag()
{
- QString text = dynamic_cast<SnippetItem*>( currentItem() )->getText();
- QTextDrag *drag = new QTextDrag(text, this);
+ TQString text = dynamic_cast<SnippetItem*>( currentItem() )->getText();
+ TQTextDrag *drag = new TQTextDrag(text, this);
drag->setSubtype("x-textsnippet");
drag->drag();
}
diff --git a/kmail/snippetwidget.h b/kmail/snippetwidget.h
index e267ff5dd..b60c3ea6e 100644
--- a/kmail/snippetwidget.h
+++ b/kmail/snippetwidget.h
@@ -13,11 +13,11 @@
#ifndef __SNIPPET_WIDGET_H__
#define __SNIPPET_WIDGET_H__
-#include <qwidget.h>
-#include <qstring.h>
+#include <tqwidget.h>
+#include <tqstring.h>
#include <klistview.h>
-#include <qtooltip.h>
-#include <qrect.h>
+#include <tqtooltip.h>
+#include <tqrect.h>
#include <ktexteditor/editinterface.h>
#include <ktexteditor/view.h>
@@ -38,7 +38,7 @@ class KActionCollection;
/**
This is the widget which gets added to the right TreeToolView.
-It inherits KListView and QToolTip which is needed for showing the
+It inherits KListView and TQToolTip which is needed for showing the
tooltips which contains the text of the snippet
@author Robert Gruber
*/
@@ -47,9 +47,9 @@ class SnippetWidget : public KListView, public QToolTip
Q_OBJECT
public:
- SnippetWidget(KMEdit* editor, KActionCollection* actionCollection, QWidget* parent = 0);
+ SnippetWidget(KMEdit* editor, KActionCollection* actionCollection, TQWidget* parent = 0);
~SnippetWidget();
- QPtrList<SnippetItem> * getList() { return (&_list); }
+ TQPtrList<SnippetItem> * getList() { return (&_list); }
void writeConfig();
SnippetConfig * getSnippetConfig() { return (&_SnippetConfig); }
@@ -58,19 +58,19 @@ private slots:
void initConfig();
protected:
- void maybeTip( const QPoint & );
- bool acceptDrag (QDropEvent *event) const;
+ void maybeTip( const TQPoint & );
+ bool acceptDrag (TQDropEvent *event) const;
private:
- void insertIntoActiveView( const QString &text );
- QString parseText(QString text, QString del="$");
- bool showMultiVarDialog(QMap<QString, QString> * map, QMap<QString, QString> * mapSave,
+ void insertIntoActiveView( const TQString &text );
+ TQString parseText(TQString text, TQString del="$");
+ bool showMultiVarDialog(TQMap<TQString, TQString> * map, TQMap<TQString, TQString> * mapSave,
int & iWidth, int & iBasicHeight, int & iOneHeight);
- QString showSingleVarDialog(QString var, QMap<QString, QString> * mapSave, QRect & dlgSize);
- SnippetItem* makeItem( SnippetItem* parent, const QString& name, const QString& text, const KShortcut& shortcut );
+ TQString showSingleVarDialog(TQString var, TQMap<TQString, TQString> * mapSave, TQRect & dlgSize);
+ SnippetItem* makeItem( SnippetItem* parent, const TQString& name, const TQString& text, const KShortcut& shortcut );
- QPtrList<SnippetItem> _list;
- QMap<QString, QString> _mapSaved;
+ TQPtrList<SnippetItem> _list;
+ TQMap<TQString, TQString> _mapSaved;
KConfig * _cfg;
SnippetConfig _SnippetConfig;
KMEdit* mEditor;
@@ -78,16 +78,16 @@ private:
public slots:
void slotRemove();
- void slotEdit( QListViewItem* item_ = 0 );
+ void slotEdit( TQListViewItem* item_ = 0 );
void slotEditGroup();
void slotAdd();
void slotAddGroup();
void slotExecute();
protected slots:
- void showPopupMenu( QListViewItem * item, const QPoint & p, int );
- void slotExecuted(QListViewItem * item = 0);
- void slotDropped(QDropEvent *e, QListViewItem *after);
+ void showPopupMenu( TQListViewItem * item, const TQPoint & p, int );
+ void slotExecuted(TQListViewItem * item = 0);
+ void slotDropped(TQDropEvent *e, TQListViewItem *after);
void startDrag();
};
diff --git a/kmail/spamheaderanalyzer.cpp b/kmail/spamheaderanalyzer.cpp
index b64303631..ad77605ea 100644
--- a/kmail/spamheaderanalyzer.cpp
+++ b/kmail/spamheaderanalyzer.cpp
@@ -54,16 +54,16 @@ SpamScores SpamHeaderAnalyzer::getSpamScores( const KMMessage* message ) {
continue;
// Do we have the needed field for this agent?
- QString mField = message->headerField( (*it).header() );
+ TQString mField = message->headerField( (*it).header() );
if ( mField.isEmpty() )
continue;
- QString scoreString;
+ TQString scoreString;
bool scoreValid = false;
if ( (*it).scoreType() != SpamAgentBool ) {
// Can we extract the score?
- QRegExp scorePattern = (*it).scorePattern();
+ TQRegExp scorePattern = (*it).scorePattern();
if ( scorePattern.search( mField ) != -1 ) {
scoreString = scorePattern.cap( 1 );
scoreValid = true;
@@ -119,8 +119,8 @@ SpamScores SpamHeaderAnalyzer::getSpamScores( const KMMessage* message ) {
}
// Find the threshold value.
- QString thresholdString;
- QRegExp thresholdPattern = (*it).thresholdPattern();
+ TQString thresholdString;
+ TQRegExp thresholdPattern = (*it).thresholdPattern();
if ( thresholdPattern.search( mField ) != -1 ) {
thresholdString = thresholdPattern.cap( 1 );
}
diff --git a/kmail/spamheaderanalyzer.h b/kmail/spamheaderanalyzer.h
index b74f60293..5cf433b77 100644
--- a/kmail/spamheaderanalyzer.h
+++ b/kmail/spamheaderanalyzer.h
@@ -34,7 +34,7 @@
#ifndef __KMAIL_SPAMHEADERANALYZER_H__
#define __KMAIL_SPAMHEADERANALYZER_H__
-#include <qvaluelist.h>
+#include <tqvaluelist.h>
class QString;
class KMMessage;
@@ -56,19 +56,19 @@ namespace KMail {
class SpamScore {
public:
SpamScore() : mScore( -2.0 ) {}
- SpamScore( const QString & agent, float score, const QString & header )
+ SpamScore( const TQString & agent, float score, const TQString & header )
: mAgent( agent ), mScore( score ), mHeader( header ) {}
- QString agent() const { return mAgent; }
+ TQString agent() const { return mAgent; }
float score() const { return mScore; }
- QString spamHeader() const { return mHeader; }
+ TQString spamHeader() const { return mHeader; }
private:
- QString mAgent;
+ TQString mAgent;
float mScore;
- QString mHeader;
+ TQString mHeader;
};
- typedef QValueList<SpamScore> SpamScores;
- typedef QValueListIterator<SpamScore> SpamScoresIterator;
+ typedef TQValueList<SpamScore> SpamScores;
+ typedef TQValueListIterator<SpamScore> SpamScoresIterator;
/**
diff --git a/kmail/subscriptiondialog.cpp b/kmail/subscriptiondialog.cpp
index ac5909936..725317437 100644
--- a/kmail/subscriptiondialog.cpp
+++ b/kmail/subscriptiondialog.cpp
@@ -45,9 +45,9 @@
namespace KMail {
-SubscriptionDialogBase::SubscriptionDialogBase( QWidget *parent, const QString &caption,
- KAccount *acct, QString startPath )
- : KSubscription( parent, caption, acct, User1, QString::null, false ),
+SubscriptionDialogBase::SubscriptionDialogBase( TQWidget *parent, const TQString &caption,
+ KAccount *acct, TQString startPath )
+ : KSubscription( parent, caption, acct, User1, TQString::null, false ),
mStartPath( startPath ), mSubscribed( false ), mForceSubscriptionEnable( false)
{
// hide unneeded checkboxes
@@ -55,21 +55,21 @@ SubscriptionDialogBase::SubscriptionDialogBase( QWidget *parent, const QString &
hideNewOnlyCheckbox();
// ok-button
- connect(this, SIGNAL(okClicked()), SLOT(slotSave()));
+ connect(this, TQT_SIGNAL(okClicked()), TQT_SLOT(slotSave()));
// reload-list button
- connect(this, SIGNAL(user1Clicked()), SLOT(slotLoadFolders()));
+ connect(this, TQT_SIGNAL(user1Clicked()), TQT_SLOT(slotLoadFolders()));
// get the folders, delayed execution style, otherwise there's bother
// with virtuals from ctors and whatnot
- QTimer::singleShot(0, this, SLOT(slotLoadFolders()));
+ TQTimer::singleShot(0, this, TQT_SLOT(slotLoadFolders()));
}
//------------------------------------------------------------------------------
-void SubscriptionDialogBase::slotListDirectory( const QStringList& subfolderNames,
- const QStringList& subfolderPaths,
- const QStringList& subfolderMimeTypes,
- const QStringList& subfolderAttributes,
+void SubscriptionDialogBase::slotListDirectory( const TQStringList& subfolderNames,
+ const TQStringList& subfolderPaths,
+ const TQStringList& subfolderMimeTypes,
+ const TQStringList& subfolderAttributes,
const ImapAccountBase::jobData& jobData )
{
mFolderNames = subfolderNames;
@@ -87,15 +87,15 @@ void SubscriptionDialogBase::moveChildrenToNewParent( GroupItem *oldItem, GroupI
{
if ( !oldItem || !item ) return;
- QPtrList<QListViewItem> itemsToMove;
- QListViewItem * myChild = oldItem->firstChild();
+ TQPtrList<TQListViewItem> itemsToMove;
+ TQListViewItem * myChild = oldItem->firstChild();
while (myChild)
{
itemsToMove.append(myChild);
myChild = myChild->nextSibling();
}
- QPtrListIterator<QListViewItem> it( itemsToMove );
- QListViewItem *cur;
+ TQPtrListIterator<TQListViewItem> it( itemsToMove );
+ TQListViewItem *cur;
while ((cur = it.current()))
{
oldItem->takeItem(cur);
@@ -115,7 +115,7 @@ void SubscriptionDialogBase::createListViewItem( int i )
// get the parent
GroupItem *oldItem = 0;
- QString parentPath;
+ TQString parentPath;
findParentItem( mFolderNames[i], mFolderPaths[i], parentPath, &parent, &oldItem );
if (!parent && parentPath != "/")
@@ -123,11 +123,11 @@ void SubscriptionDialogBase::createListViewItem( int i )
// the parent is not available and it's no root-item
// this happens when the folders do not arrive in hierarchical order
// so we create each parent in advance
- QStringList folders = QStringList::split(mDelimiter, parentPath);
+ TQStringList folders = TQStringList::split(mDelimiter, parentPath);
uint i = 0;
- for ( QStringList::Iterator it = folders.begin(); it != folders.end(); ++it )
+ for ( TQStringList::Iterator it = folders.begin(); it != folders.end(); ++it )
{
- QString name = *it;
+ TQString name = *it;
if (name.startsWith("/"))
name = name.right(name.length()-1);
if (name.endsWith("/"))
@@ -135,10 +135,10 @@ void SubscriptionDialogBase::createListViewItem( int i )
KGroupInfo info(name);
info.subscribed = false;
- QStringList tmpPath;
+ TQStringList tmpPath;
for ( uint j = 0; j <= i; ++j )
tmpPath << folders[j];
- QString path = tmpPath.join(mDelimiter);
+ TQString path = tmpPath.join(mDelimiter);
if (!path.startsWith("/"))
path = "/" + path;
if (!path.endsWith("/"))
@@ -198,7 +198,7 @@ void SubscriptionDialogBase::createListViewItem( int i )
//------------------------------------------------------------------------------
-void SubscriptionDialogBase::findParentItem( QString &name, QString &path, QString &parentPath,
+void SubscriptionDialogBase::findParentItem( TQString &name, TQString &path, TQString &parentPath,
GroupItem **parent, GroupItem **oldItem )
{
// remove the name (and the separator) from the path to get the parent path
@@ -234,8 +234,8 @@ void SubscriptionDialogBase::slotLoadFolders()
{
// We'll wait for the connectionResult signal from the account.
kdDebug(5006) << "SubscriptionDialog - waiting for connection" << endl;
- connect( ai, SIGNAL( connectionResult(int, const QString&) ),
- this, SLOT( slotConnectionResult(int, const QString&) ) );
+ connect( ai, TQT_SIGNAL( connectionResult(int, const TQString&) ),
+ this, TQT_SLOT( slotConnectionResult(int, const TQString&) ) );
return;
}
// clear the views
@@ -286,10 +286,10 @@ void SubscriptionDialogBase::processNext()
// kdDebug(5006) << "process " << mCurrentNamespace << ",subscribed=" << mSubscribed << endl;
ListJob* job = new ListJob( ai, type, 0, ai->addPathToNamespace( mCurrentNamespace ), completeListing );
- connect( job, SIGNAL(receivedFolders(const QStringList&, const QStringList&,
- const QStringList&, const QStringList&, const ImapAccountBase::jobData&)),
- this, SLOT(slotListDirectory(const QStringList&, const QStringList&,
- const QStringList&, const QStringList&, const ImapAccountBase::jobData&)));
+ connect( job, TQT_SIGNAL(receivedFolders(const TQStringList&, const TQStringList&,
+ const TQStringList&, const TQStringList&, const ImapAccountBase::jobData&)),
+ this, TQT_SLOT(slotListDirectory(const TQStringList&, const TQStringList&,
+ const TQStringList&, const TQStringList&, const ImapAccountBase::jobData&)));
job->start();
}
@@ -303,8 +303,8 @@ void SubscriptionDialogBase::loadingComplete()
// implementation for server side subscription
//------------------------------------------------------------------------------
-SubscriptionDialog::SubscriptionDialog( QWidget *parent, const QString &caption,
- KAccount *acct, QString startPath )
+SubscriptionDialog::SubscriptionDialog( TQWidget *parent, const TQString &caption,
+ KAccount *acct, TQString startPath )
: SubscriptionDialogBase( parent, caption, acct, startPath )
{
}
@@ -330,8 +330,8 @@ void SubscriptionDialogBase::initPrefixList()
mPrefixList.clear();
bool hasInbox = false;
- const QStringList ns = map[ImapAccountBase::PersonalNS];
- for ( QStringList::ConstIterator it = ns.begin(); it != ns.end(); ++it )
+ const TQStringList ns = map[ImapAccountBase::PersonalNS];
+ for ( TQStringList::ConstIterator it = ns.begin(); it != ns.end(); ++it )
{
if ( (*it).isEmpty() )
hasInbox = true;
@@ -348,7 +348,7 @@ void SubscriptionDialogBase::initPrefixList()
mPrefixList += map[ImapAccountBase::SharedNS];
}
-void SubscriptionDialogBase::slotConnectionResult( int errorCode, const QString& errorMsg )
+void SubscriptionDialogBase::slotConnectionResult( int errorCode, const TQString& errorMsg )
{
Q_UNUSED( errorMsg );
if ( !errorCode )
@@ -388,7 +388,7 @@ void SubscriptionDialog::doSave()
}
// subscribe
- QListViewItemIterator it(subView);
+ TQListViewItemIterator it(subView);
for ( ; it.current(); ++it)
{
static_cast<ImapAccountBase*>(account())->changeSubscription(true,
@@ -396,7 +396,7 @@ void SubscriptionDialog::doSave()
}
// unsubscribe
- QListViewItemIterator it2(unsubView);
+ TQListViewItemIterator it2(unsubView);
for ( ; it2.current(); ++it2)
{
static_cast<ImapAccountBase*>(account())->changeSubscription(false,
@@ -418,7 +418,7 @@ void SubscriptionDialog::processItems()
if (done == 1000)
{
emit listChanged();
- QTimer::singleShot(0, this, SLOT(processItems()));
+ TQTimer::singleShot(0, this, TQT_SLOT(processItems()));
return;
}
++mCount;
diff --git a/kmail/subscriptiondialog.h b/kmail/subscriptiondialog.h
index 011a529bd..1d5a01481 100644
--- a/kmail/subscriptiondialog.h
+++ b/kmail/subscriptiondialog.h
@@ -32,7 +32,7 @@
#ifndef __SUBSCRIPTIONDIALOG
#define __SUBSCRIPTIONDIALOG
-#include <qdict.h>
+#include <tqdict.h>
#include <ksubscription.h>
#include "imapaccountbase.h"
@@ -49,10 +49,10 @@ namespace KMail {
Q_OBJECT
public:
- SubscriptionDialogBase( QWidget *parent,
- const QString &caption,
+ SubscriptionDialogBase( TQWidget *parent,
+ const TQString &caption,
KAccount* acct,
- QString startPath = QString::null );
+ TQString startPath = TQString::null );
virtual ~SubscriptionDialogBase() {}
void show();
@@ -61,7 +61,7 @@ namespace KMail {
/**
* Find the parent item
*/
- void findParentItem ( QString &name, QString &path, QString &compare,
+ void findParentItem ( TQString &name, TQString &path, TQString &compare,
GroupItem **parent, GroupItem **oldItem );
/**
@@ -80,8 +80,8 @@ namespace KMail {
/**
* get the listing from the imap-server
*/
- void slotListDirectory(const QStringList&, const QStringList&,
- const QStringList&, const QStringList&, const ImapAccountBase::jobData &);
+ void slotListDirectory(const TQStringList&, const TQStringList&,
+ const TQStringList&, const TQStringList&, const ImapAccountBase::jobData &);
/**
* called by Ok-button, saves the changes
@@ -91,7 +91,7 @@ namespace KMail {
/**
* Called from the account when a connection was established
*/
- void slotConnectionResult( int errorCode, const QString& errorMsg );
+ void slotConnectionResult( int errorCode, const TQString& errorMsg );
protected slots:
/**
@@ -112,16 +112,16 @@ namespace KMail {
* folders. */
void createListViewItem( int i );
- QString mDelimiter;
- QStringList mFolderNames, mFolderPaths,
+ TQString mDelimiter;
+ TQStringList mFolderNames, mFolderPaths,
mFolderMimeTypes, mFolderAttributes;
ImapAccountBase::jobData mJobData;
uint mCount;
- QDict<GroupItem> mItemDict;
- QString mStartPath;
+ TQDict<GroupItem> mItemDict;
+ TQString mStartPath;
bool mSubscribed, mForceSubscriptionEnable;
- QStringList mPrefixList;
- QString mCurrentNamespace;
+ TQStringList mPrefixList;
+ TQString mCurrentNamespace;
};
class SubscriptionDialog : public SubscriptionDialogBase
@@ -129,10 +129,10 @@ namespace KMail {
Q_OBJECT
public:
- SubscriptionDialog( QWidget *parent,
- const QString &caption,
+ SubscriptionDialog( TQWidget *parent,
+ const TQString &caption,
KAccount* acct,
- QString startPath = QString::null );
+ TQString startPath = TQString::null );
virtual ~SubscriptionDialog();
protected:
/** reimpl */
diff --git a/kmail/teehtmlwriter.cpp b/kmail/teehtmlwriter.cpp
index 91bc05a90..05d9969c9 100644
--- a/kmail/teehtmlwriter.cpp
+++ b/kmail/teehtmlwriter.cpp
@@ -37,7 +37,7 @@
#include <kdebug.h>
-#include <qvaluelist.h>
+#include <tqvaluelist.h>
namespace KMail {
@@ -51,7 +51,7 @@ namespace KMail {
}
TeeHtmlWriter::~TeeHtmlWriter() {
- for ( QValueListIterator<HtmlWriter*> it = mWriters.begin(); it != mWriters.end(); ++it )
+ for ( TQValueListIterator<HtmlWriter*> it = mWriters.begin(); it != mWriters.end(); ++it )
delete (*it);
}
@@ -60,38 +60,38 @@ namespace KMail {
mWriters.append( writer );
}
- void TeeHtmlWriter::begin( const QString & css ) {
- for ( QValueListIterator<HtmlWriter*> it = mWriters.begin(); it != mWriters.end(); ++it )
+ void TeeHtmlWriter::begin( const TQString & css ) {
+ for ( TQValueListIterator<HtmlWriter*> it = mWriters.begin(); it != mWriters.end(); ++it )
(*it)->begin( css );
}
void TeeHtmlWriter::end() {
- for ( QValueListIterator<HtmlWriter*> it = mWriters.begin(); it != mWriters.end(); ++it )
+ for ( TQValueListIterator<HtmlWriter*> it = mWriters.begin(); it != mWriters.end(); ++it )
(*it)->end();
}
void TeeHtmlWriter::reset() {
- for ( QValueListIterator<HtmlWriter*> it = mWriters.begin(); it != mWriters.end(); ++it )
+ for ( TQValueListIterator<HtmlWriter*> it = mWriters.begin(); it != mWriters.end(); ++it )
(*it)->reset();
}
- void TeeHtmlWriter::write( const QString & str ) {
- for ( QValueListIterator<HtmlWriter*> it = mWriters.begin(); it != mWriters.end(); ++it )
+ void TeeHtmlWriter::write( const TQString & str ) {
+ for ( TQValueListIterator<HtmlWriter*> it = mWriters.begin(); it != mWriters.end(); ++it )
(*it)->write( str );
}
- void TeeHtmlWriter::queue( const QString & str ) {
- for ( QValueListIterator<HtmlWriter*> it = mWriters.begin(); it != mWriters.end(); ++it )
+ void TeeHtmlWriter::queue( const TQString & str ) {
+ for ( TQValueListIterator<HtmlWriter*> it = mWriters.begin(); it != mWriters.end(); ++it )
(*it)->queue( str );
}
void TeeHtmlWriter::flush() {
- for ( QValueListIterator<HtmlWriter*> it = mWriters.begin(); it != mWriters.end(); ++it )
+ for ( TQValueListIterator<HtmlWriter*> it = mWriters.begin(); it != mWriters.end(); ++it )
(*it)->flush();
}
- void TeeHtmlWriter::embedPart( const QCString & contentId, const QString & url ) {
- for ( QValueListIterator<HtmlWriter*> it = mWriters.begin(); it != mWriters.end(); ++it )
+ void TeeHtmlWriter::embedPart( const TQCString & contentId, const TQString & url ) {
+ for ( TQValueListIterator<HtmlWriter*> it = mWriters.begin(); it != mWriters.end(); ++it )
(*it)->embedPart( contentId, url );
}
diff --git a/kmail/teehtmlwriter.h b/kmail/teehtmlwriter.h
index d7b1cec28..26efc1ded 100644
--- a/kmail/teehtmlwriter.h
+++ b/kmail/teehtmlwriter.h
@@ -34,7 +34,7 @@
#include "interfaces/htmlwriter.h"
-#include <qvaluelist.h>
+#include <tqvaluelist.h>
class QString;
@@ -53,17 +53,17 @@ namespace KMail {
//
// HtmlWriter Interface
//
- void begin( const QString & cssDefs );
+ void begin( const TQString & cssDefs );
void end();
void reset();
- void write( const QString & str );
- void queue( const QString & str );
+ void write( const TQString & str );
+ void queue( const TQString & str );
void flush();
- void embedPart( const QCString & contentId, const QString & url );
+ void embedPart( const TQCString & contentId, const TQString & url );
private:
/** We own the HtmlWriters added to us! */
- QValueList<KMail::HtmlWriter*> mWriters;
+ TQValueList<KMail::HtmlWriter*> mWriters;
};
} // namespace KMail
diff --git a/kmail/templateparser.cpp b/kmail/templateparser.cpp
index 39591358b..4112b58ed 100644
--- a/kmail/templateparser.cpp
+++ b/kmail/templateparser.cpp
@@ -20,18 +20,18 @@
#include <config.h>
-#include <qstring.h>
-#include <qdatetime.h>
+#include <tqstring.h>
+#include <tqdatetime.h>
#include <klocale.h>
#include <kcalendarsystem.h>
#include <kmime_util.h>
#include <kglobal.h>
#include <kprocess.h>
-#include <qregexp.h>
-#include <qfile.h>
+#include <tqregexp.h>
+#include <tqfile.h>
#include <kmessagebox.h>
#include <kshell.h>
-#include <qfileinfo.h>
+#include <tqfileinfo.h>
#include "kmmessage.h"
#include "kmmsgbase.h"
@@ -47,7 +47,7 @@
#include "templateparser.h"
TemplateParser::TemplateParser( KMMessage *amsg, const Mode amode,
- const QString aselection,
+ const TQString aselection,
bool asmartQuote, bool anoQuote,
bool aallowDecryption, bool aselectionIsBody ) :
mMode( amode ), mFolder( 0 ), mIdentity( 0 ), mSelection( aselection ),
@@ -58,20 +58,20 @@ TemplateParser::TemplateParser( KMMessage *amsg, const Mode amode,
mMsg = amsg;
}
-int TemplateParser::parseQuotes( const QString &prefix, const QString &str,
- QString &quote ) const
+int TemplateParser::parseQuotes( const TQString &prefix, const TQString &str,
+ TQString &quote ) const
{
int pos = prefix.length();
int len;
int str_len = str.length();
- QChar qc = '"';
- QChar prev = 0;
+ TQChar qc = '"';
+ TQChar prev = 0;
pos++;
len = pos;
while ( pos < str_len ) {
- QChar c = str[pos];
+ TQChar c = str[pos];
pos++;
len++;
@@ -93,18 +93,18 @@ int TemplateParser::parseQuotes( const QString &prefix, const QString &str,
return len;
}
-QString TemplateParser::getFName( const QString &str )
+TQString TemplateParser::getFName( const TQString &str )
{
// simple logic:
// if there is ',' in name, than format is 'Last, First'
// else format is 'First Last'
// last resort -- return 'name' from 'name@domain'
int sep_pos;
- QString res;
+ TQString res;
if ( ( sep_pos = str.find( '@' ) ) > 0 ) {
int i;
for ( i = (sep_pos - 1); i >= 0; --i ) {
- QChar c = str[i];
+ TQChar c = str[i];
if ( c.isLetterOrNumber() ) {
res.prepend( c );
} else {
@@ -115,7 +115,7 @@ QString TemplateParser::getFName( const QString &str )
unsigned int i;
bool begin = false;
for ( i = sep_pos; i < str.length(); ++i ) {
- QChar c = str[i];
+ TQChar c = str[i];
if ( c.isLetterOrNumber() ) {
begin = true;
res.append( c );
@@ -126,7 +126,7 @@ QString TemplateParser::getFName( const QString &str )
} else {
unsigned int i;
for ( i = 0; i < str.length(); ++i ) {
- QChar c = str[i];
+ TQChar c = str[i];
if ( c.isLetterOrNumber() ) {
res.append( c );
} else {
@@ -137,17 +137,17 @@ QString TemplateParser::getFName( const QString &str )
return res;
}
-QString TemplateParser::getLName( const QString &str )
+TQString TemplateParser::getLName( const TQString &str )
{
// simple logic:
// if there is ',' in name, than format is 'Last, First'
// else format is 'First Last'
int sep_pos;
- QString res;
+ TQString res;
if ( ( sep_pos = str.find(',') ) > 0 ) {
int i;
for ( i = sep_pos; i >= 0; --i ) {
- QChar c = str[i];
+ TQChar c = str[i];
if ( c.isLetterOrNumber() ) {
res.prepend( c );
} else {
@@ -159,7 +159,7 @@ QString TemplateParser::getLName( const QString &str )
unsigned int i;
bool begin = false;
for ( i = sep_pos; i < str.length(); ++i ) {
- QChar c = str[i];
+ TQChar c = str[i];
if ( c.isLetterOrNumber() ) {
begin = true;
res.append( c );
@@ -177,30 +177,30 @@ void TemplateParser::process( KMMessage *aorig_msg, KMFolder *afolder, bool appe
mAppend = append;
mOrigMsg = aorig_msg;
mFolder = afolder;
- QString tmpl = findTemplate();
+ TQString tmpl = findTemplate();
return processWithTemplate( tmpl );
}
-void TemplateParser::process( const QString &tmplName, KMMessage *aorig_msg,
+void TemplateParser::process( const TQString &tmplName, KMMessage *aorig_msg,
KMFolder *afolder, bool append )
{
mAppend = append;
mOrigMsg = aorig_msg;
mFolder = afolder;
- QString tmpl = findCustomTemplate( tmplName );
+ TQString tmpl = findCustomTemplate( tmplName );
return processWithTemplate( tmpl );
}
-void TemplateParser::processWithTemplate( const QString &tmpl )
+void TemplateParser::processWithTemplate( const TQString &tmpl )
{
- QString body;
+ TQString body;
int tmpl_len = tmpl.length();
bool dnl = false;
for ( int i = 0; i < tmpl_len; ++i ) {
- QChar c = tmpl[i];
+ TQChar c = tmpl[i];
// kdDebug() << "Next char: " << c << endl;
if ( c == '%' ) {
- QString cmd = tmpl.mid( i + 1 );
+ TQString cmd = tmpl.mid( i + 1 );
if ( cmd.startsWith( "-" ) ) {
// dnl
@@ -211,27 +211,27 @@ void TemplateParser::processWithTemplate( const QString &tmpl )
} else if ( cmd.startsWith( "REM=" ) ) {
// comments
kdDebug() << "Command: REM=" << endl;
- QString q;
+ TQString q;
int len = parseQuotes( "REM=", cmd, q );
i += len;
} else if ( cmd.startsWith( "INSERT=" ) ) {
// insert content of specified file as is
kdDebug() << "Command: INSERT=" << endl;
- QString q;
+ TQString q;
int len = parseQuotes( "INSERT=", cmd, q );
i += len;
- QString path = KShell::tildeExpand( q );
- QFileInfo finfo( path );
+ TQString path = KShell::tildeExpand( q );
+ TQFileInfo finfo( path );
if (finfo.isRelative() ) {
path = KShell::homeDir( "" );
path += '/';
path += q;
}
- QFile file( path );
+ TQFile file( path );
if ( file.open( IO_ReadOnly ) ) {
- QByteArray content = file.readAll();
- QString str = QString::fromLocal8Bit( content, content.size() );
+ TQByteArray content = file.readAll();
+ TQString str = TQString::fromLocal8Bit( content, content.size() );
body.append( str );
} else if ( mDebug ) {
KMessageBox::error( 0,
@@ -242,30 +242,30 @@ void TemplateParser::processWithTemplate( const QString &tmpl )
} else if ( cmd.startsWith( "SYSTEM=" ) ) {
// insert content of specified file as is
kdDebug() << "Command: SYSTEM=" << endl;
- QString q;
+ TQString q;
int len = parseQuotes( "SYSTEM=", cmd, q );
i += len;
- QString pipe_cmd = q;
- QString str = pipe( pipe_cmd, "" );
+ TQString pipe_cmd = q;
+ TQString str = pipe( pipe_cmd, "" );
body.append( str );
} else if ( cmd.startsWith( "PUT=" ) ) {
// insert content of specified file as is
kdDebug() << "Command: PUT=" << endl;
- QString q;
+ TQString q;
int len = parseQuotes( "PUT=", cmd, q );
i += len;
- QString path = KShell::tildeExpand( q );
- QFileInfo finfo( path );
+ TQString path = KShell::tildeExpand( q );
+ TQFileInfo finfo( path );
if (finfo.isRelative() ) {
path = KShell::homeDir( "" );
path += '/';
path += q;
}
- QFile file( path );
+ TQFile file( path );
if ( file.open( IO_ReadOnly ) ) {
- QByteArray content = file.readAll();
- body.append( QString::fromLocal8Bit( content, content.size() ) );
+ TQByteArray content = file.readAll();
+ body.append( TQString::fromLocal8Bit( content, content.size() ) );
} else if ( mDebug ) {
KMessageBox::error( 0,
i18n( "Cannot insert content from file %1: %2").
@@ -275,13 +275,13 @@ void TemplateParser::processWithTemplate( const QString &tmpl )
} else if ( cmd.startsWith( "QUOTEPIPE=" ) ) {
// pipe message body throw command and insert it as quotation
kdDebug() << "Command: QUOTEPIPE=" << endl;
- QString q;
+ TQString q;
int len = parseQuotes( "QUOTEPIPE=", cmd, q );
i += len;
- QString pipe_cmd = q;
+ TQString pipe_cmd = q;
if ( mOrigMsg && !mNoQuote ) {
- QString str = pipe( pipe_cmd, mSelection );
- QString quote = mOrigMsg->asQuotedString( "", mQuoteString, str,
+ TQString str = pipe( pipe_cmd, mSelection );
+ TQString quote = mOrigMsg->asQuotedString( "", mQuoteString, str,
mSmartQuote, mAllowDecryption );
body.append( quote );
}
@@ -290,7 +290,7 @@ void TemplateParser::processWithTemplate( const QString &tmpl )
kdDebug() << "Command: QUOTE" << endl;
i += strlen( "QUOTE" );
if ( mOrigMsg && !mNoQuote ) {
- QString quote = mOrigMsg->asQuotedString( "", mQuoteString, mSelection,
+ TQString quote = mOrigMsg->asQuotedString( "", mQuoteString, mSelection,
mSmartQuote, mAllowDecryption );
body.append( quote );
}
@@ -299,7 +299,7 @@ void TemplateParser::processWithTemplate( const QString &tmpl )
kdDebug() << "Command: QHEADERS" << endl;
i += strlen( "QHEADERS" );
if ( mOrigMsg && !mNoQuote ) {
- QString quote = mOrigMsg->asQuotedString( "", mQuoteString,
+ TQString quote = mOrigMsg->asQuotedString( "", mQuoteString,
mOrigMsg->headerAsSendableString(),
mSmartQuote, false );
body.append( quote );
@@ -309,53 +309,53 @@ void TemplateParser::processWithTemplate( const QString &tmpl )
kdDebug() << "Command: HEADERS" << endl;
i += strlen( "HEADERS" );
if ( mOrigMsg && !mNoQuote ) {
- QString str = mOrigMsg->headerAsSendableString();
+ TQString str = mOrigMsg->headerAsSendableString();
body.append( str );
}
} else if ( cmd.startsWith( "TEXTPIPE=" ) ) {
// pipe message body throw command and insert it as is
kdDebug() << "Command: TEXTPIPE=" << endl;
- QString q;
+ TQString q;
int len = parseQuotes( "TEXTPIPE=", cmd, q );
i += len;
- QString pipe_cmd = q;
+ TQString pipe_cmd = q;
if ( mOrigMsg ) {
- QString str = pipe(pipe_cmd, mSelection );
+ TQString str = pipe(pipe_cmd, mSelection );
body.append( str );
}
} else if ( cmd.startsWith( "MSGPIPE=" ) ) {
// pipe full message throw command and insert result as is
kdDebug() << "Command: MSGPIPE=" << endl;
- QString q;
+ TQString q;
int len = parseQuotes( "MSGPIPE=", cmd, q );
i += len;
- QString pipe_cmd = q;
+ TQString pipe_cmd = q;
if ( mOrigMsg ) {
- QString str = pipe(pipe_cmd, mOrigMsg->asString() );
+ TQString str = pipe(pipe_cmd, mOrigMsg->asString() );
body.append( str );
}
} else if ( cmd.startsWith( "BODYPIPE=" ) ) {
// pipe message body generated so far throw command and insert result as is
kdDebug() << "Command: BODYPIPE=" << endl;
- QString q;
+ TQString q;
int len = parseQuotes( "BODYPIPE=", cmd, q );
i += len;
- QString pipe_cmd = q;
- QString str = pipe( pipe_cmd, body );
+ TQString pipe_cmd = q;
+ TQString str = pipe( pipe_cmd, body );
body.append( str );
} else if ( cmd.startsWith( "CLEARPIPE=" ) ) {
// pipe message body generated so far throw command and
// insert result as is replacing current body
kdDebug() << "Command: CLEARPIPE=" << endl;
- QString q;
+ TQString q;
int len = parseQuotes( "CLEARPIPE=", cmd, q );
i += len;
- QString pipe_cmd = q;
- QString str = pipe( pipe_cmd, body );
+ TQString pipe_cmd = q;
+ TQString str = pipe( pipe_cmd, body );
body = str;
mMsg->setCursorPos( 0 );
@@ -363,7 +363,7 @@ void TemplateParser::processWithTemplate( const QString &tmpl )
kdDebug() << "Command: TEXT" << endl;
i += strlen( "TEXT" );
if ( mOrigMsg ) {
- QString quote = mOrigMsg->asPlainText( false, mAllowDecryption );
+ TQString quote = mOrigMsg->asPlainText( false, mAllowDecryption );
body.append( quote );
}
@@ -371,7 +371,7 @@ void TemplateParser::processWithTemplate( const QString &tmpl )
kdDebug() << "Command: OTEXTSIZE" << endl;
i += strlen( "OTEXTSIZE" );
if ( mOrigMsg ) {
- QString str = QString( "%1" ).arg( mOrigMsg->body().length() );
+ TQString str = TQString( "%1" ).arg( mOrigMsg->body().length() );
body.append( str );
}
@@ -379,132 +379,132 @@ void TemplateParser::processWithTemplate( const QString &tmpl )
kdDebug() << "Command: OTEXT" << endl;
i += strlen( "OTEXT" );
if ( mOrigMsg ) {
- QString quote = mOrigMsg->asPlainText( false, mAllowDecryption );
+ TQString quote = mOrigMsg->asPlainText( false, mAllowDecryption );
body.append( quote );
}
} else if ( cmd.startsWith( "CCADDR" ) ) {
kdDebug() << "Command: CCADDR" << endl;
i += strlen( "CCADDR" );
- QString str = mMsg->cc();
+ TQString str = mMsg->cc();
body.append( str );
} else if ( cmd.startsWith( "CCNAME" ) ) {
kdDebug() << "Command: CCNAME" << endl;
i += strlen( "CCNAME" );
- QString str = mMsg->ccStrip();
+ TQString str = mMsg->ccStrip();
body.append( str );
} else if ( cmd.startsWith( "CCFNAME" ) ) {
kdDebug() << "Command: CCFNAME" << endl;
i += strlen( "CCFNAME" );
- QString str = mMsg->ccStrip();
+ TQString str = mMsg->ccStrip();
body.append( getFName( str ) );
} else if ( cmd.startsWith( "CCLNAME" ) ) {
kdDebug() << "Command: CCLNAME" << endl;
i += strlen( "CCLNAME" );
- QString str = mMsg->ccStrip();
+ TQString str = mMsg->ccStrip();
body.append( getLName( str ) );
} else if ( cmd.startsWith( "TOADDR" ) ) {
kdDebug() << "Command: TOADDR" << endl;
i += strlen( "TOADDR" );
- QString str = mMsg->to();
+ TQString str = mMsg->to();
body.append( str );
} else if ( cmd.startsWith( "TONAME" ) ) {
kdDebug() << "Command: TONAME" << endl;
i += strlen( "TONAME" );
- QString str = mMsg->toStrip();
+ TQString str = mMsg->toStrip();
body.append( str );
} else if ( cmd.startsWith( "TOFNAME" ) ) {
kdDebug() << "Command: TOFNAME" << endl;
i += strlen( "TOFNAME" );
- QString str = mMsg->toStrip();
+ TQString str = mMsg->toStrip();
body.append( getFName( str ) );
} else if ( cmd.startsWith( "TOLNAME" ) ) {
kdDebug() << "Command: TOLNAME" << endl;
i += strlen( "TOLNAME" );
- QString str = mMsg->toStrip();
+ TQString str = mMsg->toStrip();
body.append( getLName( str ) );
} else if ( cmd.startsWith( "TOLIST" ) ) {
kdDebug() << "Command: TOLIST" << endl;
i += strlen( "TOLIST" );
- QString str = mMsg->to();
+ TQString str = mMsg->to();
body.append( str );
} else if ( cmd.startsWith( "FROMADDR" ) ) {
kdDebug() << "Command: FROMADDR" << endl;
i += strlen( "FROMADDR" );
- QString str = mMsg->from();
+ TQString str = mMsg->from();
body.append( str );
} else if ( cmd.startsWith( "FROMNAME" ) ) {
kdDebug() << "Command: FROMNAME" << endl;
i += strlen( "FROMNAME" );
- QString str = mMsg->fromStrip();
+ TQString str = mMsg->fromStrip();
body.append( str );
} else if ( cmd.startsWith( "FROMFNAME" ) ) {
kdDebug() << "Command: FROMFNAME" << endl;
i += strlen( "FROMFNAME" );
- QString str = mMsg->fromStrip();
+ TQString str = mMsg->fromStrip();
body.append( getFName( str ) );
} else if ( cmd.startsWith( "FROMLNAME" ) ) {
kdDebug() << "Command: FROMLNAME" << endl;
i += strlen( "FROMLNAME" );
- QString str = mMsg->fromStrip();
+ TQString str = mMsg->fromStrip();
body.append( getLName( str ) );
} else if ( cmd.startsWith( "FULLSUBJECT" ) ) {
kdDebug() << "Command: FULLSUBJECT" << endl;
i += strlen( "FULLSUBJECT" );
- QString str = mMsg->subject();
+ TQString str = mMsg->subject();
body.append( str );
} else if ( cmd.startsWith( "FULLSUBJ" ) ) {
kdDebug() << "Command: FULLSUBJ" << endl;
i += strlen( "FULLSUBJ" );
- QString str = mMsg->subject();
+ TQString str = mMsg->subject();
body.append( str );
} else if ( cmd.startsWith( "MSGID" ) ) {
kdDebug() << "Command: MSGID" << endl;
i += strlen( "MSGID" );
- QString str = mMsg->id();
+ TQString str = mMsg->id();
body.append( str );
} else if ( cmd.startsWith( "OHEADER=" ) ) {
// insert specified content of header from original message
kdDebug() << "Command: OHEADER=" << endl;
- QString q;
+ TQString q;
int len = parseQuotes( "OHEADER=", cmd, q );
i += len;
if ( mOrigMsg ) {
- QString hdr = q;
- QString str = mOrigMsg->headerFields(hdr.local8Bit() ).join( ", " );
+ TQString hdr = q;
+ TQString str = mOrigMsg->headerFields(hdr.local8Bit() ).join( ", " );
body.append( str );
}
} else if ( cmd.startsWith( "HEADER=" ) ) {
// insert specified content of header from current message
kdDebug() << "Command: HEADER=" << endl;
- QString q;
+ TQString q;
int len = parseQuotes( "HEADER=", cmd, q );
i += len;
- QString hdr = q;
- QString str = mMsg->headerFields(hdr.local8Bit() ).join( ", " );
+ TQString hdr = q;
+ TQString str = mMsg->headerFields(hdr.local8Bit() ).join( ", " );
body.append( str );
} else if ( cmd.startsWith( "HEADER( " ) ) {
// insert specified content of header from current message
kdDebug() << "Command: HEADER( " << endl;
- QRegExp re = QRegExp( "^HEADER\\((.+)\\)" );
+ TQRegExp re = TQRegExp( "^HEADER\\((.+)\\)" );
re.setMinimal( true );
int res = re.search( cmd );
if ( res != 0 ) {
@@ -512,8 +512,8 @@ void TemplateParser::processWithTemplate( const QString &tmpl )
i += strlen( "HEADER( " );
} else {
i += re.matchedLength();
- QString hdr = re.cap( 1 );
- QString str = mMsg->headerFields( hdr.local8Bit() ).join( ", " );
+ TQString hdr = re.cap( 1 );
+ TQString str = mMsg->headerFields( hdr.local8Bit() ).join( ", " );
body.append( str );
}
@@ -521,7 +521,7 @@ void TemplateParser::processWithTemplate( const QString &tmpl )
kdDebug() << "Command: OCCADDR" << endl;
i += strlen( "OCCADDR" );
if ( mOrigMsg ) {
- QString str = mOrigMsg->cc();
+ TQString str = mOrigMsg->cc();
body.append( str );
}
@@ -529,7 +529,7 @@ void TemplateParser::processWithTemplate( const QString &tmpl )
kdDebug() << "Command: OCCNAME" << endl;
i += strlen( "OCCNAME" );
if ( mOrigMsg ) {
- QString str = mOrigMsg->ccStrip();
+ TQString str = mOrigMsg->ccStrip();
body.append( str );
}
@@ -537,7 +537,7 @@ void TemplateParser::processWithTemplate( const QString &tmpl )
kdDebug() << "Command: OCCFNAME" << endl;
i += strlen( "OCCFNAME" );
if ( mOrigMsg ) {
- QString str = mOrigMsg->ccStrip();
+ TQString str = mOrigMsg->ccStrip();
body.append( getFName( str ) );
}
@@ -545,7 +545,7 @@ void TemplateParser::processWithTemplate( const QString &tmpl )
kdDebug() << "Command: OCCLNAME" << endl;
i += strlen( "OCCLNAME" );
if ( mOrigMsg ) {
- QString str = mOrigMsg->ccStrip();
+ TQString str = mOrigMsg->ccStrip();
body.append( getLName( str ) );
}
@@ -553,7 +553,7 @@ void TemplateParser::processWithTemplate( const QString &tmpl )
kdDebug() << "Command: OTOADDR" << endl;
i += strlen( "OTOADDR" );
if ( mOrigMsg ) {
- QString str = mOrigMsg->to();
+ TQString str = mOrigMsg->to();
body.append( str );
}
@@ -561,7 +561,7 @@ void TemplateParser::processWithTemplate( const QString &tmpl )
kdDebug() << "Command: OTONAME" << endl;
i += strlen( "OTONAME" );
if ( mOrigMsg ) {
- QString str = mOrigMsg->toStrip();
+ TQString str = mOrigMsg->toStrip();
body.append( str );
}
@@ -569,7 +569,7 @@ void TemplateParser::processWithTemplate( const QString &tmpl )
kdDebug() << "Command: OTOFNAME" << endl;
i += strlen( "OTOFNAME" );
if ( mOrigMsg ) {
- QString str = mOrigMsg->toStrip();
+ TQString str = mOrigMsg->toStrip();
body.append( getFName( str ) );
}
@@ -577,7 +577,7 @@ void TemplateParser::processWithTemplate( const QString &tmpl )
kdDebug() << "Command: OTOLNAME" << endl;
i += strlen( "OTOLNAME" );
if ( mOrigMsg ) {
- QString str = mOrigMsg->toStrip();
+ TQString str = mOrigMsg->toStrip();
body.append( getLName( str ) );
}
@@ -585,7 +585,7 @@ void TemplateParser::processWithTemplate( const QString &tmpl )
kdDebug() << "Command: OTOLIST" << endl;
i += strlen( "OTOLIST" );
if ( mOrigMsg ) {
- QString str = mOrigMsg->to();
+ TQString str = mOrigMsg->to();
body.append( str );
}
@@ -593,7 +593,7 @@ void TemplateParser::processWithTemplate( const QString &tmpl )
kdDebug() << "Command: OTO" << endl;
i += strlen( "OTO" );
if ( mOrigMsg ) {
- QString str = mOrigMsg->to();
+ TQString str = mOrigMsg->to();
body.append( str );
}
@@ -601,7 +601,7 @@ void TemplateParser::processWithTemplate( const QString &tmpl )
kdDebug() << "Command: OFROMADDR" << endl;
i += strlen( "OFROMADDR" );
if ( mOrigMsg ) {
- QString str = mOrigMsg->from();
+ TQString str = mOrigMsg->from();
body.append( str );
}
@@ -609,7 +609,7 @@ void TemplateParser::processWithTemplate( const QString &tmpl )
kdDebug() << "Command: OFROMNAME" << endl;
i += strlen( "OFROMNAME" );
if ( mOrigMsg ) {
- QString str = mOrigMsg->fromStrip();
+ TQString str = mOrigMsg->fromStrip();
body.append( str );
}
@@ -617,7 +617,7 @@ void TemplateParser::processWithTemplate( const QString &tmpl )
kdDebug() << "Command: OFROMFNAME" << endl;
i += strlen( "OFROMFNAME" );
if ( mOrigMsg ) {
- QString str = mOrigMsg->fromStrip();
+ TQString str = mOrigMsg->fromStrip();
body.append( getFName( str ) );
}
@@ -625,7 +625,7 @@ void TemplateParser::processWithTemplate( const QString &tmpl )
kdDebug() << "Command: OFROMLNAME" << endl;
i += strlen( "OFROMLNAME" );
if ( mOrigMsg ) {
- QString str = mOrigMsg->fromStrip();
+ TQString str = mOrigMsg->fromStrip();
body.append( getLName( str ) );
}
@@ -633,7 +633,7 @@ void TemplateParser::processWithTemplate( const QString &tmpl )
kdDebug() << "Command: OFULLSUBJECT" << endl;
i += strlen( "OFULLSUBJECT" );
if ( mOrigMsg ) {
- QString str = mOrigMsg->subject();
+ TQString str = mOrigMsg->subject();
body.append( str );
}
@@ -641,7 +641,7 @@ void TemplateParser::processWithTemplate( const QString &tmpl )
kdDebug() << "Command: OFULLSUBJ" << endl;
i += strlen( "OFULLSUBJ" );
if ( mOrigMsg ) {
- QString str = mOrigMsg->subject();
+ TQString str = mOrigMsg->subject();
body.append( str );
}
@@ -649,69 +649,69 @@ void TemplateParser::processWithTemplate( const QString &tmpl )
kdDebug() << "Command: OMSGID" << endl;
i += strlen( "OMSGID" );
if ( mOrigMsg ) {
- QString str = mOrigMsg->id();
+ TQString str = mOrigMsg->id();
body.append( str );
}
} else if ( cmd.startsWith( "DATEEN" ) ) {
kdDebug() << "Command: DATEEN" << endl;
i += strlen( "DATEEN" );
- QDateTime date = QDateTime::currentDateTime();
+ TQDateTime date = TQDateTime::currentDateTime();
KLocale locale( "C" );
- QString str = locale.formatDate( date.date(), false );
+ TQString str = locale.formatDate( date.date(), false );
body.append( str );
} else if ( cmd.startsWith( "DATESHORT" ) ) {
kdDebug() << "Command: DATESHORT" << endl;
i += strlen( "DATESHORT" );
- QDateTime date = QDateTime::currentDateTime();
- QString str = KGlobal::locale()->formatDate( date.date(), true );
+ TQDateTime date = TQDateTime::currentDateTime();
+ TQString str = KGlobal::locale()->formatDate( date.date(), true );
body.append( str );
} else if ( cmd.startsWith( "DATE" ) ) {
kdDebug() << "Command: DATE" << endl;
i += strlen( "DATE" );
- QDateTime date = QDateTime::currentDateTime();
- QString str = KGlobal::locale()->formatDate( date.date(), false );
+ TQDateTime date = TQDateTime::currentDateTime();
+ TQString str = KGlobal::locale()->formatDate( date.date(), false );
body.append( str );
} else if ( cmd.startsWith( "DOW" ) ) {
kdDebug() << "Command: DOW" << endl;
i += strlen( "DOW" );
- QDateTime date = QDateTime::currentDateTime();
- QString str = KGlobal::locale()->calendar()->weekDayName( date.date(), false );
+ TQDateTime date = TQDateTime::currentDateTime();
+ TQString str = KGlobal::locale()->calendar()->weekDayName( date.date(), false );
body.append( str );
} else if ( cmd.startsWith( "TIMELONGEN" ) ) {
kdDebug() << "Command: TIMELONGEN" << endl;
i += strlen( "TIMELONGEN" );
- QDateTime date = QDateTime::currentDateTime();
+ TQDateTime date = TQDateTime::currentDateTime();
KLocale locale( "C");
- QString str = locale.formatTime( date.time(), true );
+ TQString str = locale.formatTime( date.time(), true );
body.append( str );
} else if ( cmd.startsWith( "TIMELONG" ) ) {
kdDebug() << "Command: TIMELONG" << endl;
i += strlen( "TIMELONG" );
- QDateTime date = QDateTime::currentDateTime();
- QString str = KGlobal::locale()->formatTime( date.time(), true );
+ TQDateTime date = TQDateTime::currentDateTime();
+ TQString str = KGlobal::locale()->formatTime( date.time(), true );
body.append( str );
} else if ( cmd.startsWith( "TIME" ) ) {
kdDebug() << "Command: TIME" << endl;
i += strlen( "TIME" );
- QDateTime date = QDateTime::currentDateTime();
- QString str = KGlobal::locale()->formatTime( date.time(), false );
+ TQDateTime date = TQDateTime::currentDateTime();
+ TQString str = KGlobal::locale()->formatTime( date.time(), false );
body.append( str );
} else if ( cmd.startsWith( "ODATEEN" ) ) {
kdDebug() << "Command: ODATEEN" << endl;
i += strlen( "ODATEEN" );
if ( mOrigMsg ) {
- QDateTime date;
+ TQDateTime date;
date.setTime_t( mOrigMsg->date() );
KLocale locale( "C");
- QString str = locale.formatDate( date.date(), false );
+ TQString str = locale.formatDate( date.date(), false );
body.append( str );
}
@@ -719,9 +719,9 @@ void TemplateParser::processWithTemplate( const QString &tmpl )
kdDebug() << "Command: ODATESHORT" << endl;
i += strlen( "ODATESHORT");
if ( mOrigMsg ) {
- QDateTime date;
+ TQDateTime date;
date.setTime_t( mOrigMsg->date() );
- QString str = KGlobal::locale()->formatDate( date.date(), true );
+ TQString str = KGlobal::locale()->formatDate( date.date(), true );
body.append( str );
}
@@ -729,9 +729,9 @@ void TemplateParser::processWithTemplate( const QString &tmpl )
kdDebug() << "Command: ODATE" << endl;
i += strlen( "ODATE");
if ( mOrigMsg ) {
- QDateTime date;
+ TQDateTime date;
date.setTime_t( mOrigMsg->date() );
- QString str = KGlobal::locale()->formatDate( date.date(), false );
+ TQString str = KGlobal::locale()->formatDate( date.date(), false );
body.append( str );
}
@@ -739,9 +739,9 @@ void TemplateParser::processWithTemplate( const QString &tmpl )
kdDebug() << "Command: ODOW" << endl;
i += strlen( "ODOW");
if ( mOrigMsg ) {
- QDateTime date;
+ TQDateTime date;
date.setTime_t( mOrigMsg->date() );
- QString str = KGlobal::locale()->calendar()->weekDayName( date.date(), false );
+ TQString str = KGlobal::locale()->calendar()->weekDayName( date.date(), false );
body.append( str );
}
@@ -749,10 +749,10 @@ void TemplateParser::processWithTemplate( const QString &tmpl )
kdDebug() << "Command: OTIMELONGEN" << endl;
i += strlen( "OTIMELONGEN");
if ( mOrigMsg ) {
- QDateTime date;
+ TQDateTime date;
date.setTime_t( mOrigMsg->date() );
KLocale locale( "C");
- QString str = locale.formatTime( date.time(), true );
+ TQString str = locale.formatTime( date.time(), true );
body.append( str );
}
@@ -760,9 +760,9 @@ void TemplateParser::processWithTemplate( const QString &tmpl )
kdDebug() << "Command: OTIMELONG" << endl;
i += strlen( "OTIMELONG");
if ( mOrigMsg ) {
- QDateTime date;
+ TQDateTime date;
date.setTime_t( mOrigMsg->date() );
- QString str = KGlobal::locale()->formatTime( date.time(), true );
+ TQString str = KGlobal::locale()->formatTime( date.time(), true );
body.append( str );
}
@@ -770,9 +770,9 @@ void TemplateParser::processWithTemplate( const QString &tmpl )
kdDebug() << "Command: OTIME" << endl;
i += strlen( "OTIME");
if ( mOrigMsg ) {
- QDateTime date;
+ TQDateTime date;
date.setTime_t( mOrigMsg->date() );
- QString str = KGlobal::locale()->formatTime( date.time(), false );
+ TQString str = KGlobal::locale()->formatTime( date.time(), false );
body.append( str );
}
@@ -832,7 +832,7 @@ void TemplateParser::processWithTemplate( const QString &tmpl )
// kdDebug() << "Message body: " << body << endl;
if ( mAppend ) {
- QCString msg_body = mMsg->body();
+ TQCString msg_body = mMsg->body();
msg_body.append( body.utf8() );
mMsg->setBody( msg_body );
} else {
@@ -840,10 +840,10 @@ void TemplateParser::processWithTemplate( const QString &tmpl )
}
}
-QString TemplateParser::findCustomTemplate( const QString &tmplName )
+TQString TemplateParser::findCustomTemplate( const TQString &tmplName )
{
CTemplates t( tmplName );
- QString content = t.content();
+ TQString content = t.content();
if ( !content.isEmpty() ) {
return content;
} else {
@@ -851,7 +851,7 @@ QString TemplateParser::findCustomTemplate( const QString &tmplName )
}
}
-QString TemplateParser::findTemplate()
+TQString TemplateParser::findTemplate()
{
// import 'Phrases' if it not done yet
if ( !GlobalSettings::self()->phrasesConverted() ) {
@@ -860,7 +860,7 @@ QString TemplateParser::findTemplate()
// kdDebug() << "Trying to find template for mode " << mode << endl;
- QString tmpl;
+ TQString tmpl;
if ( !mFolder ) { // find folder message belongs to
mFolder = mMsg->parent();
@@ -877,7 +877,7 @@ QString TemplateParser::findTemplate()
if ( mFolder ) // only if a folder was found
{
- QString fid = mFolder->idString();
+ TQString fid = mFolder->idString();
Templates fconf( fid );
if ( fconf.useCustomTemplates() ) { // does folder use custom templates?
switch( mMode ) {
@@ -916,9 +916,9 @@ QString TemplateParser::findTemplate()
}
kdDebug(5006) << "Identity found: " << mIdentity << endl;
- QString iid;
+ TQString iid;
if ( mIdentity ) {
- iid = QString("IDENTITY_%1").arg( mIdentity ); // templates ID for that identity
+ iid = TQString("IDENTITY_%1").arg( mIdentity ); // templates ID for that identity
}
else {
iid = "IDENTITY_NO_IDENTITY"; // templates ID for no identity
@@ -971,25 +971,25 @@ QString TemplateParser::findTemplate()
return tmpl;
}
-QString TemplateParser::pipe( const QString &cmd, const QString &buf )
+TQString TemplateParser::pipe( const TQString &cmd, const TQString &buf )
{
mPipeOut = "";
mPipeErr = "";
mPipeRc = 0;
KProcess proc;
- QCString data = buf.local8Bit();
+ TQCString data = buf.local8Bit();
// kdDebug() << "Command data: " << data << endl;
proc << KShell::splitArgs( cmd, KShell::TildeExpand );
proc.setUseShell( true );
- connect( &proc, SIGNAL( receivedStdout( KProcess *, char *, int ) ),
- this, SLOT( onReceivedStdout( KProcess *, char *, int ) ) );
- connect( &proc, SIGNAL( receivedStderr( KProcess *, char *, int ) ),
- this, SLOT( onReceivedStderr( KProcess *, char *, int ) ) );
- connect( &proc, SIGNAL( wroteStdin( KProcess * ) ),
- this, SLOT( onWroteStdin( KProcess * ) ) );
+ connect( &proc, TQT_SIGNAL( receivedStdout( KProcess *, char *, int ) ),
+ this, TQT_SLOT( onReceivedStdout( KProcess *, char *, int ) ) );
+ connect( &proc, TQT_SIGNAL( receivedStderr( KProcess *, char *, int ) ),
+ this, TQT_SLOT( onReceivedStderr( KProcess *, char *, int ) ) );
+ connect( &proc, TQT_SIGNAL( wroteStdin( KProcess * ) ),
+ this, TQT_SLOT( onWroteStdin( KProcess * ) ) );
if ( proc.start( KProcess::NotifyOnExit, KProcess::All ) ) {
@@ -1076,13 +1076,13 @@ void TemplateParser::onProcessExited( KProcess *proc )
void TemplateParser::onReceivedStdout( KProcess *proc, char *buffer, int buflen )
{
Q_UNUSED( proc );
- mPipeOut += QString::fromLocal8Bit( buffer, buflen );
+ mPipeOut += TQString::fromLocal8Bit( buffer, buflen );
}
void TemplateParser::onReceivedStderr( KProcess *proc, char *buffer, int buflen )
{
Q_UNUSED( proc );
- mPipeErr += QString::fromLocal8Bit( buffer, buflen );
+ mPipeErr += TQString::fromLocal8Bit( buffer, buflen );
}
void TemplateParser::onWroteStdin( KProcess *proc )
diff --git a/kmail/templateparser.h b/kmail/templateparser.h
index dac78e5f7..77db0e76f 100644
--- a/kmail/templateparser.h
+++ b/kmail/templateparser.h
@@ -21,7 +21,7 @@
#ifndef __KMAIL_TEMPLATEPARSER_H__
#define __KMAIL_TEMPLATEPARSER_H__
-#include <qobject.h>
+#include <tqobject.h>
class KMMessage;
class QString;
@@ -44,20 +44,20 @@ class TemplateParser : public QObject
static const int PipeTimeout = 15;
public:
- TemplateParser( KMMessage *amsg, const Mode amode, const QString aselection,
+ TemplateParser( KMMessage *amsg, const Mode amode, const TQString aselection,
bool aSmartQuote, bool anoQuote, bool aallowDecryption,
bool aselectionIsBody );
virtual void process( KMMessage *aorig_msg, KMFolder *afolder = NULL, bool append = false );
- virtual void process( const QString &tmplName, KMMessage *aorig_msg,
+ virtual void process( const TQString &tmplName, KMMessage *aorig_msg,
KMFolder *afolder = NULL, bool append = false );
- virtual void processWithTemplate( const QString &tmpl );
- virtual QString findTemplate();
- virtual QString findCustomTemplate( const QString &tmpl );
- virtual QString pipe( const QString &cmd, const QString &buf );
+ virtual void processWithTemplate( const TQString &tmpl );
+ virtual TQString findTemplate();
+ virtual TQString findCustomTemplate( const TQString &tmpl );
+ virtual TQString pipe( const TQString &cmd, const TQString &buf );
- virtual QString getFName( const QString &str );
- virtual QString getLName( const QString &str );
+ virtual TQString getFName( const TQString &str );
+ virtual TQString getLName( const TQString &str );
protected:
Mode mMode;
@@ -65,20 +65,20 @@ class TemplateParser : public QObject
uint mIdentity;
KMMessage *mMsg;
KMMessage *mOrigMsg;
- QString mSelection;
+ TQString mSelection;
bool mSmartQuote;
bool mNoQuote;
bool mAllowDecryption;
bool mSelectionIsBody;
int mPipeRc;
- QString mPipeOut;
- QString mPipeErr;
+ TQString mPipeOut;
+ TQString mPipeErr;
bool mDebug;
- QString mQuoteString;
+ TQString mQuoteString;
bool mAppend;
- int parseQuotes( const QString &prefix, const QString &str,
- QString &quote ) const;
+ int parseQuotes( const TQString &prefix, const TQString &str,
+ TQString &quote ) const;
protected slots:
void onProcessExited( KProcess *proc );
diff --git a/kmail/templatesconfiguration.cpp b/kmail/templatesconfiguration.cpp
index bc09eff44..1e2d74cbd 100644
--- a/kmail/templatesconfiguration.cpp
+++ b/kmail/templatesconfiguration.cpp
@@ -22,13 +22,13 @@
#include <klocale.h>
#include <kglobal.h>
-#include <qpopupmenu.h>
-#include <qpushbutton.h>
-#include <qtextedit.h>
-#include <qlineedit.h>
-#include <qtoolbox.h>
+#include <tqpopupmenu.h>
+#include <tqpushbutton.h>
+#include <tqtextedit.h>
+#include <tqlineedit.h>
+#include <tqtoolbox.h>
#include <kdebug.h>
-#include <qfont.h>
+#include <tqfont.h>
#include <kactivelabel.h>
#include "templatesconfiguration_base.h"
@@ -38,34 +38,34 @@
#include "templatesconfiguration.h"
-TemplatesConfiguration::TemplatesConfiguration( QWidget *parent, const char *name )
+TemplatesConfiguration::TemplatesConfiguration( TQWidget *parent, const char *name )
:TemplatesConfigurationBase( parent, name )
{
- QFont f = KGlobalSettings::fixedFont();
+ TQFont f = KGlobalSettings::fixedFont();
textEdit_new->setFont( f );
textEdit_reply->setFont( f );
textEdit_reply_all->setFont( f );
textEdit_forward->setFont( f );
- setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding );
+ setSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Expanding );
sizeHint();
- connect( textEdit_new, SIGNAL( textChanged() ),
- this, SLOT( slotTextChanged( void ) ) );
- connect( textEdit_reply, SIGNAL( textChanged() ),
- this, SLOT( slotTextChanged( void ) ) );
- connect( textEdit_reply_all, SIGNAL( textChanged() ),
- this, SLOT( slotTextChanged( void ) ) );
- connect( textEdit_forward, SIGNAL( textChanged() ),
- this, SLOT( slotTextChanged( void ) ) );
- connect( lineEdit_quote, SIGNAL( textChanged( const QString & ) ),
- this, SLOT( slotTextChanged( void ) ) );
-
- connect( mInsertCommand, SIGNAL( insertCommand(QString, int) ),
- this, SLOT( slotInsertCommand(QString, int) ) );
-
- QString help;
- if ( QString( name ) == "folder-templates" ) {
+ connect( textEdit_new, TQT_SIGNAL( textChanged() ),
+ this, TQT_SLOT( slotTextChanged( void ) ) );
+ connect( textEdit_reply, TQT_SIGNAL( textChanged() ),
+ this, TQT_SLOT( slotTextChanged( void ) ) );
+ connect( textEdit_reply_all, TQT_SIGNAL( textChanged() ),
+ this, TQT_SLOT( slotTextChanged( void ) ) );
+ connect( textEdit_forward, TQT_SIGNAL( textChanged() ),
+ this, TQT_SLOT( slotTextChanged( void ) ) );
+ connect( lineEdit_quote, TQT_SIGNAL( textChanged( const TQString & ) ),
+ this, TQT_SLOT( slotTextChanged( void ) ) );
+
+ connect( mInsertCommand, TQT_SIGNAL( insertCommand(TQString, int) ),
+ this, TQT_SLOT( slotInsertCommand(TQString, int) ) );
+
+ TQString help;
+ if ( TQString( name ) == "folder-templates" ) {
help =
i18n( "<qt>"
"<p>Here you can create message templates to use when you "
@@ -77,7 +77,7 @@ TemplatesConfiguration::TemplatesConfiguration( QWidget *parent, const char *nam
"They override both global templates and per-identity "
"templates if they are specified.</p>"
"</qt>" );
- } else if ( QString( name ) == "identity-templates" ) {
+ } else if ( TQString( name ) == "identity-templates" ) {
help =
i18n( "<qt>"
"<p>Here you can create message templates to use when you "
@@ -117,7 +117,7 @@ void TemplatesConfiguration::loadFromGlobal()
importFromPhrases();
}
- QString str;
+ TQString str;
str = GlobalSettings::self()->templateNewMessage();
if ( str.isEmpty() ) {
textEdit_new->setText( defaultNewMessage() );
@@ -163,9 +163,9 @@ void TemplatesConfiguration::saveToGlobal()
void TemplatesConfiguration::loadFromIdentity( uint id )
{
- Templates t( QString("IDENTITY_%1").arg( id ) );
+ Templates t( TQString("IDENTITY_%1").arg( id ) );
- QString str;
+ TQString str;
str = t.templateNewMessage();
if ( str.isEmpty() ) {
@@ -215,7 +215,7 @@ void TemplatesConfiguration::loadFromIdentity( uint id )
void TemplatesConfiguration::saveToIdentity( uint id )
{
- Templates t( QString("IDENTITY_%1").arg( id ) );
+ Templates t( TQString("IDENTITY_%1").arg( id ) );
t.setTemplateNewMessage( strOrBlank( textEdit_new->text() ) );
t.setTemplateReply( strOrBlank( textEdit_reply->text() ) );
@@ -225,16 +225,16 @@ void TemplatesConfiguration::saveToIdentity( uint id )
t.writeConfig();
}
-void TemplatesConfiguration::loadFromFolder( QString id, uint identity )
+void TemplatesConfiguration::loadFromFolder( TQString id, uint identity )
{
Templates t( id );
Templates* tid = 0;
if ( identity ) {
- tid = new Templates( QString("IDENTITY_%1").arg( identity ) );
+ tid = new Templates( TQString("IDENTITY_%1").arg( identity ) );
}
- QString str;
+ TQString str;
str = t.templateNewMessage();
if ( str.isEmpty() && tid ) {
@@ -299,7 +299,7 @@ void TemplatesConfiguration::loadFromFolder( QString id, uint identity )
delete(tid);
}
-void TemplatesConfiguration::saveToFolder( QString id )
+void TemplatesConfiguration::saveToFolder( TQString id )
{
Templates t( id );
@@ -315,11 +315,11 @@ void TemplatesConfiguration::loadFromPhrases()
{
int currentNr = GlobalSettings::self()->replyCurrentLanguage();
- ReplyPhrases replyPhrases( QString::number( currentNr ) );
+ ReplyPhrases replyPhrases( TQString::number( currentNr ) );
textEdit_new->setText( defaultNewMessage() );
- QString str;
+ TQString str;
str = replyPhrases.phraseReplySender();
if ( !str.isEmpty() ) {
@@ -339,7 +339,7 @@ void TemplatesConfiguration::loadFromPhrases()
str = replyPhrases.phraseForward();
if ( !str.isEmpty() ) {
- textEdit_forward->setText( QString( i18n(
+ textEdit_forward->setText( TQString( i18n(
"%REM=\"Default forward template\"%-\n"
"---------- %1 ----------\n"
"%TEXT\n"
@@ -366,9 +366,9 @@ void TemplatesConfiguration::importFromPhrases()
int currentNr = GlobalSettings::self()->replyCurrentLanguage();
- ReplyPhrases replyPhrases( QString::number( currentNr ) );
+ ReplyPhrases replyPhrases( TQString::number( currentNr ) );
- QString str;
+ TQString str;
str = replyPhrases.phraseReplySender();
if ( !str.isEmpty() ) {
@@ -388,7 +388,7 @@ void TemplatesConfiguration::importFromPhrases()
str = replyPhrases.phraseForward();
if ( !str.isEmpty() ) {
- GlobalSettings::self()->setTemplateForward( QString( i18n(
+ GlobalSettings::self()->setTemplateForward( TQString( i18n(
"%REM=\"Default forward template\"%-\n"
"\n"
"---------- %1 ----------\n"
@@ -419,10 +419,10 @@ void TemplatesConfiguration::importFromPhrases()
GlobalSettings::self()->writeConfig();
}
-QString TemplatesConfiguration::convertPhrases( QString &str )
+TQString TemplatesConfiguration::convertPhrases( TQString &str )
{
- QString result;
- QChar ch;
+ TQString result;
+ TQChar ch;
unsigned int strLength( str.length() );
for ( uint i = 0; i < strLength; ) {
@@ -478,9 +478,9 @@ QString TemplatesConfiguration::convertPhrases( QString &str )
return result;
}
-void TemplatesConfiguration::slotInsertCommand( QString cmd, int adjustCursor )
+void TemplatesConfiguration::slotInsertCommand( TQString cmd, int adjustCursor )
{
- QTextEdit* edit;
+ TQTextEdit* edit;
if( toolBox1->currentItem() == page_new ) {
edit = textEdit_new;
@@ -506,14 +506,14 @@ void TemplatesConfiguration::slotInsertCommand( QString cmd, int adjustCursor )
edit->setCursorPosition( para, index + cmd.length() );
}
-QString TemplatesConfiguration::defaultNewMessage() {
+TQString TemplatesConfiguration::defaultNewMessage() {
return i18n(
"%REM=\"Default new message template\"%-\n"
"%BLANK"
);
}
-QString TemplatesConfiguration::defaultReply() {
+TQString TemplatesConfiguration::defaultReply() {
return i18n(
"%REM=\"Default reply template\"%-\n"
"On %ODATEEN %OTIMELONGEN you wrote:\n"
@@ -522,7 +522,7 @@ QString TemplatesConfiguration::defaultReply() {
);
}
-QString TemplatesConfiguration::defaultReplyAll() {
+TQString TemplatesConfiguration::defaultReplyAll() {
return i18n(
"%REM=\"Default reply all template\"%-\n"
"On %ODATEEN %OTIMELONGEN %OFROMNAME wrote:\n"
@@ -531,7 +531,7 @@ QString TemplatesConfiguration::defaultReplyAll() {
);
}
-QString TemplatesConfiguration::defaultForward() {
+TQString TemplatesConfiguration::defaultForward() {
return i18n(
"%REM=\"Default forward template\"%-\n"
"\n"
@@ -547,13 +547,13 @@ QString TemplatesConfiguration::defaultForward() {
);
}
-QString TemplatesConfiguration::defaultQuoteString() {
+TQString TemplatesConfiguration::defaultQuoteString() {
return "> ";
}
-QString TemplatesConfiguration::strOrBlank( QString str ) {
+TQString TemplatesConfiguration::strOrBlank( TQString str ) {
if ( str.stripWhiteSpace().isEmpty() ) {
- return QString( "%BLANK" );
+ return TQString( "%BLANK" );
}
return str;
}
diff --git a/kmail/templatesconfiguration.h b/kmail/templatesconfiguration.h
index cb2480052..b1479af31 100644
--- a/kmail/templatesconfiguration.h
+++ b/kmail/templatesconfiguration.h
@@ -32,14 +32,14 @@ class TemplatesConfiguration : public TemplatesConfigurationBase
public:
- TemplatesConfiguration( QWidget *parent = 0, const char *name = 0 );
+ TemplatesConfiguration( TQWidget *parent = 0, const char *name = 0 );
void loadFromGlobal();
void saveToGlobal();
void loadFromIdentity( uint id );
void saveToIdentity( uint id );
- void loadFromFolder( QString id, uint identity = 0 );
- void saveToFolder( QString id );
+ void loadFromFolder( TQString id, uint identity = 0 );
+ void saveToFolder( TQString id );
/** Do import settings from 'Phrases' configuration. */
void loadFromPhrases();
@@ -48,17 +48,17 @@ class TemplatesConfiguration : public TemplatesConfigurationBase
static void importFromPhrases();
/** Convert 'Phrases'-like placeholders into 'Templates' compatible. */
- static QString convertPhrases( QString &str );
+ static TQString convertPhrases( TQString &str );
- static QString defaultNewMessage();
- static QString defaultReply();
- static QString defaultReplyAll();
- static QString defaultForward();
- static QString defaultQuoteString();
+ static TQString defaultNewMessage();
+ static TQString defaultReply();
+ static TQString defaultReplyAll();
+ static TQString defaultForward();
+ static TQString defaultQuoteString();
public slots:
- void slotInsertCommand( QString cmd, int adjustCursor = 0 );
+ void slotInsertCommand( TQString cmd, int adjustCursor = 0 );
void slotTextChanged();
@@ -68,7 +68,7 @@ class TemplatesConfiguration : public TemplatesConfigurationBase
protected:
- QString strOrBlank( QString str );
+ TQString strOrBlank( TQString str );
};
diff --git a/kmail/templatesinsertcommand.cpp b/kmail/templatesinsertcommand.cpp
index f74820352..ee07c375b 100644
--- a/kmail/templatesinsertcommand.cpp
+++ b/kmail/templatesinsertcommand.cpp
@@ -20,30 +20,30 @@
#include <config.h>
-#include <qpushbutton.h>
+#include <tqpushbutton.h>
#include <kaction.h>
#include <kactionclasses.h>
#include <kpopupmenu.h>
#include <klocale.h>
-#include <qsignalmapper.h>
+#include <tqsignalmapper.h>
#include <kdebug.h>
#include "templatesinsertcommand.h"
-TemplatesInsertCommand::TemplatesInsertCommand( QWidget *parent,
+TemplatesInsertCommand::TemplatesInsertCommand( TQWidget *parent,
const char *name )
- : QPushButton( parent, name )
+ : TQPushButton( parent, name )
{
setText( i18n( "&Insert Command..." ) );
- connect( this, SIGNAL( clicked() ),
- this, SLOT( slotClicked() ) );
+ connect( this, TQT_SIGNAL( clicked() ),
+ this, TQT_SLOT( slotClicked() ) );
KAction *action;
KActionMenu *menu;
- QSignalMapper *mapper = new QSignalMapper( this );
- connect( mapper, SIGNAL( mapped(int) ),
- this, SLOT( slotMapped(int) ) );
+ TQSignalMapper *mapper = new TQSignalMapper( this );
+ connect( mapper, TQT_SIGNAL( mapped(int) ),
+ this, TQT_SLOT( slotMapped(int) ) );
mMenu = new KActionMenu( i18n( "Insert Command..." ), this );
@@ -52,107 +52,107 @@ TemplatesInsertCommand::TemplatesInsertCommand( QWidget *parent,
mMenu->insert( menu );
action = new KAction( i18n("Quoted Message"),
- 0, mapper, SLOT( map() ), menu );
+ 0, mapper, TQT_SLOT( map() ), menu );
mapper->setMapping( action, CQuote );
menu->insert( action );
action = new KAction( i18n("Message Text as Is"),
- 0, mapper, SLOT( map() ), menu );
+ 0, mapper, TQT_SLOT( map() ), menu );
mapper->setMapping( action, CText );
menu->insert( action );
action = new KAction( i18n("Message Id"),
- 0, mapper, SLOT( map() ), menu );
+ 0, mapper, TQT_SLOT( map() ), menu );
mapper->setMapping( action, COMsgId );
menu->insert( action );
action = new KAction( i18n("Date"),
- 0, mapper, SLOT( map() ), menu );
+ 0, mapper, TQT_SLOT( map() ), menu );
mapper->setMapping( action, CODate );
menu->insert( action );
action = new KAction( i18n("Date in Short Format"),
- 0, mapper, SLOT( map() ), menu );
+ 0, mapper, TQT_SLOT( map() ), menu );
mapper->setMapping( action, CODateShort );
menu->insert( action );
action = new KAction( i18n("Date in C Locale"),
- 0, mapper, SLOT( map() ), menu );
+ 0, mapper, TQT_SLOT( map() ), menu );
mapper->setMapping( action, CODateEn );
menu->insert( action );
action = new KAction( i18n("Day of Week"),
- 0, mapper, SLOT( map() ), menu );
+ 0, mapper, TQT_SLOT( map() ), menu );
mapper->setMapping( action, CODow );
menu->insert( action );
action = new KAction( i18n("Time"),
- 0, mapper, SLOT( map() ), menu );
+ 0, mapper, TQT_SLOT( map() ), menu );
mapper->setMapping( action, COTime );
menu->insert( action );
action = new KAction( i18n("Time in Long Format"),
- 0, mapper, SLOT( map() ), menu );
+ 0, mapper, TQT_SLOT( map() ), menu );
mapper->setMapping( action, COTimeLong );
menu->insert( action );
action = new KAction( i18n("Time in C Locale"),
- 0, mapper, SLOT( map() ), menu );
+ 0, mapper, TQT_SLOT( map() ), menu );
mapper->setMapping( action, COTimeLongEn );
menu->insert( action );
action = new KAction( i18n("To Field Address"),
- 0, mapper, SLOT( map() ), menu );
+ 0, mapper, TQT_SLOT( map() ), menu );
mapper->setMapping( action, COToAddr );
menu->insert( action );
action = new KAction( i18n("To Field Name"),
- 0, mapper, SLOT( map() ), menu );
+ 0, mapper, TQT_SLOT( map() ), menu );
mapper->setMapping( action, COToName );
menu->insert( action );
action = new KAction( i18n("To Field First Name"),
- 0, mapper, SLOT( map() ), menu );
+ 0, mapper, TQT_SLOT( map() ), menu );
mapper->setMapping( action, COToFName );
menu->insert( action );
action = new KAction( i18n("To Field Last Name"),
- 0, mapper, SLOT( map() ), menu );
+ 0, mapper, TQT_SLOT( map() ), menu );
mapper->setMapping( action, COToLName );
menu->insert( action );
action = new KAction( i18n( "CC Field Address" ),
- 0, mapper, SLOT( map() ), menu );
+ 0, mapper, TQT_SLOT( map() ), menu );
mapper->setMapping( action, COCCAddr );
menu->insert( action );
action = new KAction( i18n( "CC Field Name" ),
- 0, mapper, SLOT( map() ), menu );
+ 0, mapper, TQT_SLOT( map() ), menu );
mapper->setMapping( action, COCCName );
menu->insert( action );
action = new KAction( i18n( "CC Field First Name" ),
- 0, mapper, SLOT( map() ), menu );
+ 0, mapper, TQT_SLOT( map() ), menu );
mapper->setMapping( action, COCCFName );
menu->insert( action );
action = new KAction( i18n( "CC Field Last Name" ),
- 0, mapper, SLOT( map() ), menu );
+ 0, mapper, TQT_SLOT( map() ), menu );
mapper->setMapping( action, COCCLName );
menu->insert( action );
action = new KAction( i18n( "From Field Address" ),
- 0, mapper, SLOT( map() ), menu );
+ 0, mapper, TQT_SLOT( map() ), menu );
mapper->setMapping( action, COFromAddr );
menu->insert( action );
action = new KAction( i18n( "From Field Name" ),
- 0, mapper, SLOT( map() ), menu );
+ 0, mapper, TQT_SLOT( map() ), menu );
mapper->setMapping( action, COFromName );
menu->insert( action );
action = new KAction( i18n( "From Field First Name" ),
- 0, mapper, SLOT( map() ), menu );
+ 0, mapper, TQT_SLOT( map() ), menu );
mapper->setMapping( action, COFromFName );
menu->insert( action );
action = new KAction( i18n( "From Field Last Name" ),
- 0, mapper, SLOT( map() ), menu );
+ 0, mapper, TQT_SLOT( map() ), menu );
mapper->setMapping( action, COFromLName );
menu->insert( action );
action = new KAction( i18n( "Subject" ),
- 0, mapper, SLOT( map() ), menu );
+ 0, mapper, TQT_SLOT( map() ), menu );
mapper->setMapping( action, COFullSubject );
menu->insert( action );
action = new KAction( i18n( "Quoted Headers" ),
- 0, mapper, SLOT( map() ), menu );
+ 0, mapper, TQT_SLOT( map() ), menu );
mapper->setMapping( action, CQHeaders );
menu->insert( action );
action = new KAction( i18n( "Headers as Is" ),
- 0, mapper, SLOT( map() ), menu );
+ 0, mapper, TQT_SLOT( map() ), menu );
mapper->setMapping( action, CHeaders );
menu->insert( action );
action = new KAction( i18n( "Header Content" ),
- 0, mapper, SLOT( map() ), menu );
+ 0, mapper, TQT_SLOT( map() ), menu );
mapper->setMapping( action, COHeader );
menu->insert( action );
@@ -161,91 +161,91 @@ TemplatesInsertCommand::TemplatesInsertCommand( QWidget *parent,
mMenu->insert( menu );
action = new KAction( i18n( "Message Id" ),
- 0, mapper, SLOT( map() ), menu );
+ 0, mapper, TQT_SLOT( map() ), menu );
mapper->setMapping( action, CMsgId );
menu->insert( action );
action = new KAction( i18n( "Date" ),
- 0, mapper, SLOT( map() ), menu );
+ 0, mapper, TQT_SLOT( map() ), menu );
mapper->setMapping( action, CDate );
menu->insert( action );
action = new KAction( i18n( "Date in Short Format" ),
- 0, mapper, SLOT( map() ), menu );
+ 0, mapper, TQT_SLOT( map() ), menu );
mapper->setMapping( action, CDateShort );
menu->insert( action );
action = new KAction( i18n( "Date in C Locale" ),
- 0, mapper, SLOT( map() ), menu );
+ 0, mapper, TQT_SLOT( map() ), menu );
mapper->setMapping( action, CDateEn );
menu->insert( action );
action = new KAction( i18n( "Day of Week" ),
- 0, mapper, SLOT( map() ), menu );
+ 0, mapper, TQT_SLOT( map() ), menu );
mapper->setMapping( action, CDow );
menu->insert( action );
action = new KAction( i18n( "Time" ),
- 0, mapper, SLOT( map() ), menu );
+ 0, mapper, TQT_SLOT( map() ), menu );
mapper->setMapping( action, CTime );
menu->insert( action );
action = new KAction( i18n( "Time in Long Format" ),
- 0, mapper, SLOT( map() ), menu );
+ 0, mapper, TQT_SLOT( map() ), menu );
mapper->setMapping( action, CTimeLong );
menu->insert( action );
action = new KAction( i18n( "Time in C Locale" ),
- 0, mapper, SLOT( map() ), menu );
+ 0, mapper, TQT_SLOT( map() ), menu );
mapper->setMapping( action, CTimeLongEn );
menu->insert( action );
action = new KAction( i18n( "To Field Address" ),
- 0, mapper, SLOT( map() ), menu );
+ 0, mapper, TQT_SLOT( map() ), menu );
mapper->setMapping( action, CToAddr );
menu->insert( action );
action = new KAction( i18n( "To Field Name" ),
- 0, mapper, SLOT( map() ), menu );
+ 0, mapper, TQT_SLOT( map() ), menu );
mapper->setMapping( action, CToName );
menu->insert( action );
action = new KAction( i18n( "To Field First Name" ),
- 0, mapper, SLOT( map() ), menu );
+ 0, mapper, TQT_SLOT( map() ), menu );
mapper->setMapping( action, CToFName );
menu->insert( action );
action = new KAction( i18n( "To Field Last Name" ),
- 0, mapper, SLOT( map() ), menu );
+ 0, mapper, TQT_SLOT( map() ), menu );
mapper->setMapping( action, CToLName );
menu->insert( action );
action = new KAction( i18n( "CC Field Address" ),
- 0, mapper, SLOT( map() ), menu );
+ 0, mapper, TQT_SLOT( map() ), menu );
mapper->setMapping( action, CCCAddr );
menu->insert( action );
action = new KAction( i18n( "CC Field Name" ),
- 0, mapper, SLOT( map() ), menu );
+ 0, mapper, TQT_SLOT( map() ), menu );
mapper->setMapping( action, CCCName );
menu->insert( action );
action = new KAction( i18n( "CC Field First Name" ),
- 0, mapper, SLOT( map() ), menu );
+ 0, mapper, TQT_SLOT( map() ), menu );
mapper->setMapping( action, CCCFName );
menu->insert( action );
action = new KAction( i18n( "CC Field Last Name" ),
- 0, mapper, SLOT( map() ), menu );
+ 0, mapper, TQT_SLOT( map() ), menu );
mapper->setMapping( action, CCCLName );
menu->insert( action );
action = new KAction( i18n( "From Field Address" ),
- 0, mapper, SLOT( map() ), menu );
+ 0, mapper, TQT_SLOT( map() ), menu );
mapper->setMapping( action, CFromAddr );
menu->insert( action );
action = new KAction( i18n( "From Field Name" ),
- 0, mapper, SLOT( map() ), menu );
+ 0, mapper, TQT_SLOT( map() ), menu );
mapper->setMapping( action, CFromName );
menu->insert( action );
action = new KAction( i18n( "From Field First Name" ),
- 0, mapper, SLOT( map() ), menu );
+ 0, mapper, TQT_SLOT( map() ), menu );
mapper->setMapping( action, CFromFName );
menu->insert( action );
action = new KAction( i18n( "From Field Last Name" ),
- 0, mapper, SLOT( map() ), menu );
+ 0, mapper, TQT_SLOT( map() ), menu );
mapper->setMapping( action, CFromLName );
menu->insert( action );
action = new KAction( i18n( "Subject" ),
- 0, mapper, SLOT( map() ), menu );
+ 0, mapper, TQT_SLOT( map() ), menu );
mapper->setMapping( action, CFullSubject );
menu->insert( action );
action = new KAction( i18n( "Header Content" ),
- 0, mapper, SLOT( map() ), menu );
+ 0, mapper, TQT_SLOT( map() ), menu );
mapper->setMapping( action, CHeader );
menu->insert( action );
@@ -254,27 +254,27 @@ TemplatesInsertCommand::TemplatesInsertCommand( QWidget *parent,
mMenu->insert( menu );
action = new KAction( i18n( "Insert Result of Command" ),
- 0, mapper, SLOT( map() ), menu );
+ 0, mapper, TQT_SLOT( map() ), menu );
mapper->setMapping( action, CSystem );
menu->insert( action );
action = new KAction( i18n( "Pipe Original Message Body and Insert Result as Quoted Text" ),
- 0, mapper, SLOT( map() ), menu );
+ 0, mapper, TQT_SLOT( map() ), menu );
mapper->setMapping( action, CQuotePipe );
menu->insert( action );
action = new KAction( i18n( "Pipe Original Message Body and Insert Result as Is" ),
- 0, mapper, SLOT( map() ), menu );
+ 0, mapper, TQT_SLOT( map() ), menu );
mapper->setMapping( action, CTextPipe );
menu->insert( action );
action = new KAction( i18n( "Pipe Original Message with Headers and Insert Result as Is" ),
- 0, mapper, SLOT( map() ), menu );
+ 0, mapper, TQT_SLOT( map() ), menu );
mapper->setMapping( action, CMsgPipe );
menu->insert( action );
action = new KAction( i18n( "Pipe Current Message Body and Insert Result as Is" ),
- 0, mapper, SLOT( map() ), menu );
+ 0, mapper, TQT_SLOT( map() ), menu );
mapper->setMapping( action, CBodyPipe );
menu->insert( action );
action = new KAction( i18n( "Pipe Current Message Body and Replace with Result" ),
- 0, mapper, SLOT( map() ), menu );
+ 0, mapper, TQT_SLOT( map() ), menu );
mapper->setMapping( action, CClearPipe );
menu->insert( action );
@@ -283,35 +283,35 @@ TemplatesInsertCommand::TemplatesInsertCommand( QWidget *parent,
mMenu->insert( menu );
action = new KAction( i18n( "Set Cursor Position" ),
- 0, mapper, SLOT( map() ), menu );
+ 0, mapper, TQT_SLOT( map() ), menu );
mapper->setMapping( action, CCursor );
menu->insert( action );
action = new KAction( i18n( "Insert File Content" ),
- 0, mapper, SLOT( map() ), menu );
+ 0, mapper, TQT_SLOT( map() ), menu );
mapper->setMapping( action, CInsert );
menu->insert( action );
action = new KAction( i18n( "DNL" ),
- 0, mapper, SLOT( map() ), menu );
+ 0, mapper, TQT_SLOT( map() ), menu );
mapper->setMapping( action, CDnl );
menu->insert( action );
action = new KAction( i18n( "Template Comment" ),
- 0, mapper, SLOT( map() ), menu );
+ 0, mapper, TQT_SLOT( map() ), menu );
mapper->setMapping( action, CRem );
menu->insert( action );
action = new KAction( i18n( "No Operation" ),
- 0, mapper, SLOT( map() ), menu );
+ 0, mapper, TQT_SLOT( map() ), menu );
mapper->setMapping( action, CNop );
menu->insert( action );
action = new KAction( i18n( "Clear Generated Message" ),
- 0, mapper, SLOT( map() ), menu );
+ 0, mapper, TQT_SLOT( map() ), menu );
mapper->setMapping( action, CClear );
menu->insert( action );
action = new KAction( i18n( "Turn Debug On" ),
- 0, mapper, SLOT( map() ), menu );
+ 0, mapper, TQT_SLOT( map() ), menu );
mapper->setMapping( action, CDebug );
menu->insert( action );
action = new KAction( i18n( "Turn Debug Off" ),
- 0, mapper, SLOT( map() ), menu );
+ 0, mapper, TQT_SLOT( map() ), menu );
mapper->setMapping( action, CDebugOff );
menu->insert( action );
}
@@ -322,8 +322,8 @@ TemplatesInsertCommand::~TemplatesInsertCommand()
void TemplatesInsertCommand::slotClicked()
{
- QSize ps = mMenu->popupMenu()->sizeHint();
- mMenu->popup( mapToGlobal( QPoint( 0, -(ps.height()) ) ) );
+ TQSize ps = mMenu->popupMenu()->sizeHint();
+ mMenu->popup( mapToGlobal( TQPoint( 0, -(ps.height()) ) ) );
}
void TemplatesInsertCommand::slotMapped( int cmd )
diff --git a/kmail/templatesinsertcommand.h b/kmail/templatesinsertcommand.h
index f6d54cc1c..4a94a979b 100644
--- a/kmail/templatesinsertcommand.h
+++ b/kmail/templatesinsertcommand.h
@@ -23,7 +23,7 @@
#ifndef TEMPLATESINSERTCOMMAND_H
#define TEMPLATESINSERTCOMMAND_H
-#include <qpushbutton.h>
+#include <tqpushbutton.h>
class KActionMenu;
@@ -32,7 +32,7 @@ class TemplatesInsertCommand : public QPushButton
Q_OBJECT
public:
- TemplatesInsertCommand( QWidget *parent, const char *name = 0 );
+ TemplatesInsertCommand( TQWidget *parent, const char *name = 0 );
~TemplatesInsertCommand();
public:
@@ -48,7 +48,7 @@ class TemplatesInsertCommand : public QPushButton
signals:
void insertCommand( TemplatesInsertCommand::Command cmd );
- void insertCommand( QString cmd, int adjustCursor = 0 );
+ void insertCommand( TQString cmd, int adjustCursor = 0 );
public slots:
void slotClicked();
diff --git a/kmail/tests/messagedicttests.cpp b/kmail/tests/messagedicttests.cpp
index 063fc1cb4..cdb24f6d8 100644
--- a/kmail/tests/messagedicttests.cpp
+++ b/kmail/tests/messagedicttests.cpp
@@ -11,7 +11,7 @@
#include "messagedicttests.h"
-static void p( const QString & str )
+static void p( const TQString & str )
{
kdDebug() << str << endl;
}
diff --git a/kmail/tests/mimelibtests.cpp b/kmail/tests/mimelibtests.cpp
index 8d9cf9e78..b152fdcf6 100644
--- a/kmail/tests/mimelibtests.cpp
+++ b/kmail/tests/mimelibtests.cpp
@@ -32,39 +32,39 @@ KUNITTEST_MODULE_REGISTER_TESTER( MimeLibTester );
#include <mimelib/string.h>
#include <mimelib/message.h>
#include "util.h"
-#include <qfile.h>
+#include <tqfile.h>
#include <assert.h>
#if 0
-static QString makePrintable( const QCString& str )
+static TQString makePrintable( const TQCString& str )
{
- QString a = str;
+ TQString a = str;
a = a.replace( '\r', "\\r" );
a = a.replace( '\n', "\\n" );
return a;
}
#endif
-static QString makePrintable( const DwString& str )
+static TQString makePrintable( const DwString& str )
{
- QString a = KMail::Util::CString( str ); // ## we assume latin1
+ TQString a = KMail::Util::CString( str ); // ## we assume latin1
a = a.replace( '\r', "\\r" );
a = a.replace( '\n', "\\n" );
return a;
}
-QCString MimeLibTester::readFile(const QString& fileName)
+TQCString MimeLibTester::readFile(const TQString& fileName)
{
- QFile file( fileName );
+ TQFile file( fileName );
// #!@#$& kunittest... VERIFY() does nothing in setUp. Using assert instead.
bool ok = file.open( IO_ReadOnly );
if ( !ok ) {
kdError() << fileName << " not found!" << endl;
abort();
}
- QByteArray data = file.readAll();
+ TQByteArray data = file.readAll();
assert( data.size() > 1 );
- QCString result;
+ TQCString result;
KMail::Util::setFromByteArray( result, data );
return result;
}
diff --git a/kmail/tests/mimelibtests.h b/kmail/tests/mimelibtests.h
index 3c0dad71c..e12bc15f6 100644
--- a/kmail/tests/mimelibtests.h
+++ b/kmail/tests/mimelibtests.h
@@ -33,11 +33,11 @@ public slots:
void test_dwMessage_AsString();
private:
- QCString readFile(const QString& fileName);
+ TQCString readFile(const TQString& fileName);
bool test_dwMessage_AsString( const DwString& );
- QCString mMultipartMixedMail;
- QCString mSignedMail;
+ TQCString mMultipartMixedMail;
+ TQCString mSignedMail;
};
#endif /* MIMELIBTEST_H */
diff --git a/kmail/tests/utiltests.cpp b/kmail/tests/utiltests.cpp
index 6f09416ff..22c141669 100644
--- a/kmail/tests/utiltests.cpp
+++ b/kmail/tests/utiltests.cpp
@@ -27,46 +27,46 @@ void UtilTester::tearDown()
kdDebug() << "tearDown" << endl;
}
-static QString makePrintable( const QCString& str )
+static TQString makePrintable( const TQCString& str )
{
- QString a = str;
+ TQString a = str;
a = a.replace( '\r', "\\r" );
a = a.replace( '\n', "\\n" );
return a;
}
-static QString makePrintable( const QByteArray& arr )
+static TQString makePrintable( const TQByteArray& arr )
{
- QCString str;
+ TQCString str;
KMail::Util::setFromByteArray( str, arr );
return makePrintable( str );
}
void UtilTester::test_lf2crlf()
{
- QCString src = "\nfoo\r\n\nbar\rblah\n\r\r\n\n\r";
- QCString conv = KMail::Util::lf2crlf( src );
+ TQCString src = "\nfoo\r\n\nbar\rblah\n\r\r\n\n\r";
+ TQCString conv = KMail::Util::lf2crlf( src );
COMPARE( makePrintable( conv ), makePrintable("\r\nfoo\r\n\r\nbar\rblah\r\n\r\r\n\r\n\r") );
- COMPARE( KMail::Util::lf2crlf( QCString("") ), QCString("") );
+ COMPARE( KMail::Util::lf2crlf( TQCString("") ), TQCString("") );
- // QByteArray version
- QByteArray arr; KMail::Util::setFromQCString( arr, src );
+ // TQByteArray version
+ TQByteArray arr; KMail::Util::setFromQCString( arr, src );
COMPARE( arr[arr.size()-1], '\r' );
- QByteArray arrConv = KMail::Util::lf2crlf( arr );
+ TQByteArray arrConv = KMail::Util::lf2crlf( arr );
COMPARE( arrConv[arrConv.size()-1], '\r' );
COMPARE( makePrintable( arrConv ), makePrintable("\r\nfoo\r\n\r\nbar\rblah\r\n\r\r\n\r\n\r") );
- QByteArray empty;
+ TQByteArray empty;
arrConv = KMail::Util::lf2crlf( empty );
- COMPARE( makePrintable( arrConv ), QString("") );
+ COMPARE( makePrintable( arrConv ), TQString("") );
}
void UtilTester::test_crlf2lf()
{
- QCString src = "\r\n\r\nfoo\r\n\r\nbar\rblah\r\n\r\r\n\r\n\r";
+ TQCString src = "\r\n\r\nfoo\r\n\r\nbar\rblah\r\n\r\r\n\r\n\r";
int len = src.length();
COMPARE( src[len], '\0' );
int newLen = KMail::Util::crlf2lf( src.data(), len );
VERIFY( newLen <= len );
- QCString cstr( src.data(), newLen + 1 );
+ TQCString cstr( src.data(), newLen + 1 );
COMPARE( makePrintable( cstr ), makePrintable("\n\nfoo\n\nbar\rblah\n\r\n\n\r") );
}
@@ -78,40 +78,40 @@ void UtilTester::test_escapeFrom()
void UtilTester::test_append()
{
- QCString test;
- QCString str = "foo";
+ TQCString test;
+ TQCString str = "foo";
COMPARE( (int)str.size(), 4 ); // trailing nul included
- QByteArray s1 = KMail::Util::byteArrayFromQCStringNoDetach( str );
+ TQByteArray s1 = KMail::Util::byteArrayFromQCStringNoDetach( str );
COMPARE( (int)s1.size(), 3 );
COMPARE( (int)str.size(), 3 ); // trailing nul got removed
COMPARE( s1.data(), str.data() ); // yes, no detach
COMPARE( s1[2], 'o' );
- QCString bar( "bar" );
- QByteArray s2 = KMail::Util::byteArrayFromQCStringNoDetach( bar );
+ TQCString bar( "bar" );
+ TQByteArray s2 = KMail::Util::byteArrayFromQCStringNoDetach( bar );
COMPARE( (int)s2.size(), 3 );
KMail::Util::append( s1, s2 );
COMPARE( (int)s1.size(), 6 );
KMail::Util::setFromByteArray( test, s1 );
- COMPARE( test, QCString( "foobar" ) );
+ COMPARE( test, TQCString( "foobar" ) );
KMail::Util::append( s1, 0 ); // no-op
COMPARE( (int)s1.size(), 6 );
KMail::Util::setFromByteArray( test, s1 );
- COMPARE( test, QCString( "foobar" ) );
+ COMPARE( test, TQCString( "foobar" ) );
KMail::Util::append( s1, "blah" );
COMPARE( (int)s1.size(), 10 );
KMail::Util::setFromByteArray( test, s1 );
- COMPARE( test, QCString( "foobarblah" ) );
+ COMPARE( test, TQCString( "foobarblah" ) );
- KMail::Util::append( s1, QCString( " str" ) );
+ KMail::Util::append( s1, TQCString( " str" ) );
COMPARE( (int)s1.size(), 14 );
KMail::Util::setFromByteArray( test, s1 );
- COMPARE( test, QCString( "foobarblah str" ) );
+ COMPARE( test, TQCString( "foobarblah str" ) );
- QByteArray empty;
+ TQByteArray empty;
KMail::Util::append( empty, "a" );
COMPARE( (int)empty.size(), 1 );
COMPARE( empty[0], 'a' );
@@ -119,48 +119,48 @@ void UtilTester::test_append()
void UtilTester::test_insert()
{
- QCString test;
- QCString str = "foo";
+ TQCString test;
+ TQCString str = "foo";
COMPARE( (int)str.size(), 4 ); // trailing nul included
- QByteArray s1;
+ TQByteArray s1;
KMail::Util::setFromQCString( s1, str );
KMail::Util::insert( s1, 1, "bar" );
COMPARE( (int)s1.size(), 6 );
- COMPARE( makePrintable(s1), QString( "fbaroo" ) );
+ COMPARE( makePrintable(s1), TQString( "fbaroo" ) );
KMail::Util::insert( s1, 6, "END" );
COMPARE( (int)s1.size(), 9 );
- COMPARE( makePrintable(s1), QString( "fbarooEND" ) );
+ COMPARE( makePrintable(s1), TQString( "fbarooEND" ) );
KMail::Util::insert( s1, 0, "BEGIN" );
COMPARE( (int)s1.size(), 14 );
- COMPARE( makePrintable(s1), QString( "BEGINfbarooEND" ) );
+ COMPARE( makePrintable(s1), TQString( "BEGINfbarooEND" ) );
}
-void UtilTester::test_DwStringConversions( const QCString& cstr )
+void UtilTester::test_DwStringConversions( const TQCString& cstr )
{
// QCString->DwString->QCString
COMPARE( (int)cstr.size(), 8 );
DwString dwstr = KMail::Util::dwString( cstr );
COMPARE( (int)dwstr.size(), 7 );
COMPARE( dwstr[6], 'r' );
- QCString cstr2 = KMail::Util::CString( dwstr );
+ TQCString cstr2 = KMail::Util::CString( dwstr );
COMPARE( (int)cstr2.size(), 8 );
COMPARE( cstr2, cstr );
COMPARE( cstr2[6], 'r' );
// And also QCString->QByteArray
- QByteArray arr;
+ TQByteArray arr;
KMail::Util::setFromQCString( arr, cstr );
COMPARE( (int)arr.size(), 7 );
COMPARE( arr[6], 'r' );
- KMail::Util::setFromQCString( arr, QCString() );
+ KMail::Util::setFromQCString( arr, TQCString() );
COMPARE( (int)arr.size(), 0 );
// DwString->QByteArray
- QByteArray ba = KMail::Util::ByteArray( dwstr );
+ TQByteArray ba = KMail::Util::ByteArray( dwstr );
COMPARE( (int)ba.size(), 7 );
COMPARE( ba[6], 'r' );
@@ -170,27 +170,27 @@ void UtilTester::test_DwStringConversions( const QCString& cstr )
void UtilTester::test_DwStringConversions()
{
- QCString cstr = "foo&bar";
+ TQCString cstr = "foo&bar";
test_DwStringConversions( cstr );
// now embed a nul. Note that cstr="foo\0bar" wouldn't work.
cstr[3] = '\0';
test_DwStringConversions( cstr );
- cstr = QCString();
+ cstr = TQCString();
DwString dwstr = KMail::Util::dwString( cstr );
COMPARE( (int)dwstr.size(), 0 );
VERIFY( dwstr.empty() );
- dwstr = KMail::Util::dwString( QByteArray() );
+ dwstr = KMail::Util::dwString( TQByteArray() );
COMPARE( (int)dwstr.size(), 0 );
VERIFY( dwstr.empty() );
}
void UtilTester::test_QByteArrayQCString()
{
- QCString str = "foobar";
+ TQCString str = "foobar";
COMPARE( (int)str.size(), 7 ); // trailing nul included
- QByteArray s1 = KMail::Util::byteArrayFromQCStringNoDetach( str );
+ TQByteArray s1 = KMail::Util::byteArrayFromQCStringNoDetach( str );
COMPARE( (int)str.size(), 6 ); // trailing nul got removed
COMPARE( s1.data(), str.data() ); // yes, no detach
COMPARE( s1[5], 'r' );
diff --git a/kmail/tests/utiltests.h b/kmail/tests/utiltests.h
index 58de40901..2270cbcfd 100644
--- a/kmail/tests/utiltests.h
+++ b/kmail/tests/utiltests.h
@@ -24,7 +24,7 @@ public slots:
void test_DwStringConversions();
void test_QByteArrayQCString();
private:
- void test_DwStringConversions( const QCString& cstr );
+ void test_DwStringConversions( const TQCString& cstr );
};
#endif
diff --git a/kmail/textsource.cpp b/kmail/textsource.cpp
index fdb82f7e0..ab31dc422 100644
--- a/kmail/textsource.cpp
+++ b/kmail/textsource.cpp
@@ -44,8 +44,8 @@ KMTextSource::~KMTextSource() {
}
-QCString KMTextSource::text(Q_UINT32 serialNumber) const {
- QCString rc;
+TQCString KMTextSource::text(Q_UINT32 serialNumber) const {
+ TQCString rc;
KMFolder *folder = 0;
int idx;
KMMsgDict::instance()->getLocation(serialNumber, &folder, &idx);
diff --git a/kmail/textsource.h b/kmail/textsource.h
index 499af4b75..8251a09cc 100644
--- a/kmail/textsource.h
+++ b/kmail/textsource.h
@@ -40,7 +40,7 @@ public:
KMTextSource();
~KMTextSource();
- QCString text(Q_UINT32 serialNumber) const;
+ TQCString text(Q_UINT32 serialNumber) const;
};
#endif
diff --git a/kmail/transportmanager.cpp b/kmail/transportmanager.cpp
index 7b9b26eed..e80d1cb27 100644
--- a/kmail/transportmanager.cpp
+++ b/kmail/transportmanager.cpp
@@ -25,13 +25,13 @@
namespace KMail {
- QStringList TransportManager::transportNames()
+ TQStringList TransportManager::transportNames()
{
KConfigGroup general( KMKernel::config(), "General");
int numTransports = general.readNumEntry("transports", 0);
- QStringList transportNames;
+ TQStringList transportNames;
for ( int i = 1 ; i <= numTransports ; i++ ) {
KMTransportInfo ti;
ti.readConfig(i);
@@ -44,7 +44,7 @@ namespace KMail {
// more or less copied from AccountManager
uint TransportManager::createId()
{
- QValueList<unsigned int> usedIds;
+ TQValueList<unsigned int> usedIds;
KConfigGroup general( KMKernel::config(), "General");
int numTransports = general.readNumEntry( "transports", 0 );
diff --git a/kmail/transportmanager.h b/kmail/transportmanager.h
index 22ab02f88..0799bce58 100644
--- a/kmail/transportmanager.h
+++ b/kmail/transportmanager.h
@@ -31,7 +31,7 @@ namespace KMail {
virtual ~TransportManager() {};
/** Returns the list for transport names */
- static QStringList transportNames();
+ static TQStringList transportNames();
/** Create a unique id for a transport info item */
static unsigned int createId();
diff --git a/kmail/undostack.cpp b/kmail/undostack.cpp
index f1729f3a7..c7e80e8f2 100644
--- a/kmail/undostack.cpp
+++ b/kmail/undostack.cpp
@@ -36,7 +36,7 @@
namespace KMail {
UndoStack::UndoStack(int size)
- : QObject(0, "undostack"), mSize(size), mLastId(0),
+ : TQObject(0, "undostack"), mSize(size), mLastId(0),
mCachedInfo(0)
{
mStack.setAutoDelete(true);
@@ -63,7 +63,7 @@ int UndoStack::newUndoAction( KMFolder *srcFolder, KMFolder *destFolder )
void UndoStack::addMsgToAction( int undoId, ulong serNum )
{
if ( !mCachedInfo || mCachedInfo->id != undoId ) {
- QPtrListIterator<UndoInfo> itr( mStack );
+ TQPtrListIterator<UndoInfo> itr( mStack );
while ( itr.current() ) {
if ( itr.current()->id == undoId ) {
mCachedInfo = itr.current();
@@ -87,7 +87,7 @@ void UndoStack::undo()
{
UndoInfo *info = mStack.take(0);
emit undoStackChanged();
- QValueList<ulong>::iterator itr;
+ TQValueList<ulong>::iterator itr;
KMFolderOpener openDestFolder(info->destFolder, "undodest");
for( itr = info->serNums.begin(); itr != info->serNums.end(); ++itr ) {
serNum = *itr;
diff --git a/kmail/undostack.h b/kmail/undostack.h
index 78c993fb7..11a3a9898 100644
--- a/kmail/undostack.h
+++ b/kmail/undostack.h
@@ -22,9 +22,9 @@
#ifndef UNDOSTACK_H
#define UNDOSTACK_H
-#include <qptrlist.h>
-#include <qstring.h>
-#include <qobject.h>
+#include <tqptrlist.h>
+#include <tqstring.h>
+#include <tqobject.h>
class KMFolder;
class KMMsgBase;
@@ -36,7 +36,7 @@ class UndoInfo
{
public:
int id;
- QValueList<ulong> serNums;
+ TQValueList<ulong> serNums;
KMFolder *srcFolder;
KMFolder *destFolder;
};
@@ -58,7 +58,7 @@ public:
void msgDestroyed( KMMsgBase *msg);
void folderDestroyed( KMFolder *folder);
protected:
- QPtrList<UndoInfo> mStack;
+ TQPtrList<UndoInfo> mStack;
int mSize;
int mLastId;
UndoInfo *mCachedInfo;
diff --git a/kmail/urlhandlermanager.cpp b/kmail/urlhandlermanager.cpp
index cf5b92d62..100009faa 100644
--- a/kmail/urlhandlermanager.cpp
+++ b/kmail/urlhandlermanager.cpp
@@ -62,10 +62,10 @@ namespace {
~KMailProtocolURLHandler() {}
bool handleClick( const KURL &, KMReaderWin * ) const;
- bool handleContextMenuRequest( const KURL & url, const QPoint &, KMReaderWin * ) const {
+ bool handleContextMenuRequest( const KURL & url, const TQPoint &, KMReaderWin * ) const {
return url.protocol() == "kmail";
}
- QString statusBarMessage( const KURL &, KMReaderWin * ) const;
+ TQString statusBarMessage( const KURL &, KMReaderWin * ) const;
};
class ExpandCollapseQuoteURLManager : public KMail::URLHandler {
@@ -74,10 +74,10 @@ namespace {
~ExpandCollapseQuoteURLManager() {}
bool handleClick( const KURL &, KMReaderWin * ) const;
- bool handleContextMenuRequest( const KURL &, const QPoint &, KMReaderWin * ) const {
+ bool handleContextMenuRequest( const KURL &, const TQPoint &, KMReaderWin * ) const {
return false;
}
- QString statusBarMessage( const KURL &, KMReaderWin * ) const;
+ TQString statusBarMessage( const KURL &, KMReaderWin * ) const;
};
@@ -87,10 +87,10 @@ namespace {
~SMimeURLHandler() {}
bool handleClick( const KURL &, KMReaderWin * ) const;
- bool handleContextMenuRequest( const KURL &, const QPoint &, KMReaderWin * ) const {
+ bool handleContextMenuRequest( const KURL &, const TQPoint &, KMReaderWin * ) const {
return false;
}
- QString statusBarMessage( const KURL &, KMReaderWin * ) const;
+ TQString statusBarMessage( const KURL &, KMReaderWin * ) const;
};
class MailToURLHandler : public KMail::URLHandler {
@@ -99,10 +99,10 @@ namespace {
~MailToURLHandler() {}
bool handleClick( const KURL &, KMReaderWin * ) const { return false; }
- bool handleContextMenuRequest( const KURL &, const QPoint &, KMReaderWin * ) const {
+ bool handleContextMenuRequest( const KURL &, const TQPoint &, KMReaderWin * ) const {
return false;
}
- QString statusBarMessage( const KURL &, KMReaderWin * ) const;
+ TQString statusBarMessage( const KURL &, KMReaderWin * ) const;
};
class HtmlAnchorHandler : public KMail::URLHandler {
@@ -111,10 +111,10 @@ namespace {
~HtmlAnchorHandler() {}
bool handleClick( const KURL &, KMReaderWin * ) const;
- bool handleContextMenuRequest( const KURL &, const QPoint &, KMReaderWin * ) const {
+ bool handleContextMenuRequest( const KURL &, const TQPoint &, KMReaderWin * ) const {
return false;
}
- QString statusBarMessage( const KURL &, KMReaderWin * ) const { return QString::null; }
+ TQString statusBarMessage( const KURL &, KMReaderWin * ) const { return TQString::null; }
};
class AttachmentURLHandler : public KMail::URLHandler {
@@ -123,8 +123,8 @@ namespace {
~AttachmentURLHandler() {}
bool handleClick( const KURL &, KMReaderWin * ) const;
- bool handleContextMenuRequest( const KURL &, const QPoint &, KMReaderWin * ) const;
- QString statusBarMessage( const KURL &, KMReaderWin * ) const;
+ bool handleContextMenuRequest( const KURL &, const TQPoint &, KMReaderWin * ) const;
+ TQString statusBarMessage( const KURL &, KMReaderWin * ) const;
};
class ShowAuditLogURLHandler : public KMail::URLHandler {
@@ -133,8 +133,8 @@ namespace {
~ShowAuditLogURLHandler() {}
bool handleClick( const KURL &, KMReaderWin * ) const;
- bool handleContextMenuRequest( const KURL &, const QPoint &, KMReaderWin * ) const;
- QString statusBarMessage( const KURL &, KMReaderWin * ) const;
+ bool handleContextMenuRequest( const KURL &, const TQPoint &, KMReaderWin * ) const;
+ TQString statusBarMessage( const KURL &, KMReaderWin * ) const;
};
class FallBackURLHandler : public KMail::URLHandler {
@@ -143,8 +143,8 @@ namespace {
~FallBackURLHandler() {}
bool handleClick( const KURL &, KMReaderWin * ) const;
- bool handleContextMenuRequest( const KURL &, const QPoint &, KMReaderWin * ) const;
- QString statusBarMessage( const KURL & url, KMReaderWin * ) const {
+ bool handleContextMenuRequest( const KURL &, const TQPoint &, KMReaderWin * ) const;
+ TQString statusBarMessage( const KURL & url, KMReaderWin * ) const {
return url.prettyURL();
}
};
@@ -164,14 +164,14 @@ public:
~BodyPartURLHandlerManager();
bool handleClick( const KURL &, KMReaderWin * ) const;
- bool handleContextMenuRequest( const KURL &, const QPoint &, KMReaderWin * ) const;
- QString statusBarMessage( const KURL &, KMReaderWin * ) const;
+ bool handleContextMenuRequest( const KURL &, const TQPoint &, KMReaderWin * ) const;
+ TQString statusBarMessage( const KURL &, KMReaderWin * ) const;
void registerHandler( const Interface::BodyPartURLHandler * handler );
void unregisterHandler( const Interface::BodyPartURLHandler * handler );
private:
- typedef QValueVector<const Interface::BodyPartURLHandler*> BodyPartHandlerList;
+ typedef TQValueVector<const Interface::BodyPartURLHandler*> BodyPartHandlerList;
BodyPartHandlerList mHandlers;
};
@@ -192,12 +192,12 @@ void KMail::URLHandlerManager::BodyPartURLHandlerManager::unregisterHandler( con
mHandlers.erase( remove( mHandlers.begin(), mHandlers.end(), handler ), mHandlers.end() );
}
-static partNode * partNodeFromXKMailUrl( const KURL & url, KMReaderWin * w, QString * path ) {
+static partNode * partNodeFromXKMailUrl( const KURL & url, KMReaderWin * w, TQString * path ) {
assert( path );
if ( !w || url.protocol() != "x-kmail" )
return 0;
- const QString urlPath = url.path();
+ const TQString urlPath = url.path();
// urlPath format is: /bodypart/<random number>/<part id>/<path>
@@ -205,7 +205,7 @@ static partNode * partNodeFromXKMailUrl( const KURL & url, KMReaderWin * w, QStr
if ( !urlPath.startsWith( "/bodypart/" ) )
return 0;
- const QStringList urlParts = QStringList::split( '/', urlPath.mid( 10 ), true );
+ const TQStringList urlParts = TQStringList::split( '/', urlPath.mid( 10 ), true );
if ( urlParts.size() != 3 )
return 0;
bool ok = false;
@@ -217,7 +217,7 @@ static partNode * partNodeFromXKMailUrl( const KURL & url, KMReaderWin * w, QStr
}
bool KMail::URLHandlerManager::BodyPartURLHandlerManager::handleClick( const KURL & url, KMReaderWin * w ) const {
- QString path;
+ TQString path;
partNode * node = partNodeFromXKMailUrl( url, w, &path );
if ( !node )
return false;
@@ -231,8 +231,8 @@ bool KMail::URLHandlerManager::BodyPartURLHandlerManager::handleClick( const KUR
return false;
}
-bool KMail::URLHandlerManager::BodyPartURLHandlerManager::handleContextMenuRequest( const KURL & url, const QPoint & p, KMReaderWin * w ) const {
- QString path;
+bool KMail::URLHandlerManager::BodyPartURLHandlerManager::handleContextMenuRequest( const KURL & url, const TQPoint & p, KMReaderWin * w ) const {
+ TQString path;
partNode * node = partNodeFromXKMailUrl( url, w, &path );
if ( !node )
return false;
@@ -244,19 +244,19 @@ bool KMail::URLHandlerManager::BodyPartURLHandlerManager::handleContextMenuReque
return false;
}
-QString KMail::URLHandlerManager::BodyPartURLHandlerManager::statusBarMessage( const KURL & url, KMReaderWin * w ) const {
- QString path;
+TQString KMail::URLHandlerManager::BodyPartURLHandlerManager::statusBarMessage( const KURL & url, KMReaderWin * w ) const {
+ TQString path;
partNode * node = partNodeFromXKMailUrl( url, w, &path );
if ( !node )
- return QString::null;
+ return TQString::null;
KMail::PartNodeBodyPart part( *node, w->overrideCodec() );
for ( BodyPartHandlerList::const_iterator it = mHandlers.begin() ; it != mHandlers.end() ; ++it ) {
- const QString msg = (*it)->statusBarMessage( &part, path );
+ const TQString msg = (*it)->statusBarMessage( &part, path );
if ( !msg.isEmpty() )
return msg;
}
- return QString::null;
+ return TQString::null;
}
//
@@ -311,20 +311,20 @@ bool KMail::URLHandlerManager::handleClick( const KURL & url, KMReaderWin * w )
return false;
}
-bool KMail::URLHandlerManager::handleContextMenuRequest( const KURL & url, const QPoint & p, KMReaderWin * w ) const {
+bool KMail::URLHandlerManager::handleContextMenuRequest( const KURL & url, const TQPoint & p, KMReaderWin * w ) const {
for ( HandlerList::const_iterator it = mHandlers.begin() ; it != mHandlers.end() ; ++it )
if ( (*it)->handleContextMenuRequest( url, p, w ) )
return true;
return false;
}
-QString KMail::URLHandlerManager::statusBarMessage( const KURL & url, KMReaderWin * w ) const {
+TQString KMail::URLHandlerManager::statusBarMessage( const KURL & url, KMReaderWin * w ) const {
for ( HandlerList::const_iterator it = mHandlers.begin() ; it != mHandlers.end() ; ++it ) {
- const QString msg = (*it)->statusBarMessage( url, w );
+ const TQString msg = (*it)->statusBarMessage( url, w );
if ( !msg.isEmpty() )
return msg;
}
- return QString::null;
+ return TQString::null;
}
@@ -348,7 +348,7 @@ QString KMail::URLHandlerManager::statusBarMessage( const KURL & url, KMReaderWi
#include <kmessagebox.h>
#include <khtml_part.h>
-#include <qstring.h>
+#include <tqstring.h>
namespace {
bool KMailProtocolURLHandler::handleClick( const KURL & url, KMReaderWin * w ) const {
@@ -415,7 +415,7 @@ namespace {
return false;
}
- QString KMailProtocolURLHandler::statusBarMessage( const KURL & url, KMReaderWin * ) const {
+ TQString KMailProtocolURLHandler::statusBarMessage( const KURL & url, KMReaderWin * ) const {
if ( url.protocol() == "kmail" )
{
if ( url.path() == "showHTML" )
@@ -431,7 +431,7 @@ namespace {
if ( url.path() == "hideSignatureDetails" )
return i18n("Hide signature details.");
}
- return QString::null ;
+ return TQString::null ;
}
}
@@ -444,7 +444,7 @@ namespace {
// kmail:levelquote/?-num -> expand all levels quote.
if ( url.protocol() == "kmail" && url.path()=="levelquote" )
{
- QString levelStr= url.query().mid( 1,url.query().length() );
+ TQString levelStr= url.query().mid( 1,url.query().length() );
bool isNumber;
int levelQuote= levelStr.toInt(&isNumber);
if ( isNumber )
@@ -453,32 +453,32 @@ namespace {
}
return false;
}
- QString ExpandCollapseQuoteURLManager::statusBarMessage(
+ TQString ExpandCollapseQuoteURLManager::statusBarMessage(
const KURL & url, KMReaderWin * ) const
{
if ( url.protocol() == "kmail" && url.path() == "levelquote" )
{
- QString query= url.query();
+ TQString query= url.query();
if ( query.length()>=2 )
if ( query[ 1 ] =='-' )
return i18n("Expand all quoted text.");
else
return i18n("Collapse quoted text.");
}
- return QString::null ;
+ return TQString::null ;
}
}
// defined in kmreaderwin.cpp...
-extern bool foundSMIMEData( const QString aUrl, QString & displayName,
- QString & libName, QString & keyId );
+extern bool foundSMIMEData( const TQString aUrl, TQString & displayName,
+ TQString & libName, TQString & keyId );
namespace {
bool SMimeURLHandler::handleClick( const KURL & url, KMReaderWin * w ) const {
if ( !url.hasRef() )
return false;
- QString displayName, libName, keyId;
+ TQString displayName, libName, keyId;
if ( !foundSMIMEData( url.path() + '#' + url.ref(), displayName, libName, keyId ) )
return false;
KProcess cmp;
@@ -490,10 +490,10 @@ namespace {
return true;
}
- QString SMimeURLHandler::statusBarMessage( const KURL & url, KMReaderWin * ) const {
- QString displayName, libName, keyId;
+ TQString SMimeURLHandler::statusBarMessage( const KURL & url, KMReaderWin * ) const {
+ TQString displayName, libName, keyId;
if ( !foundSMIMEData( url.path() + '#' + url.ref(), displayName, libName, keyId ) )
- return QString::null;
+ return TQString::null;
return i18n("Show certificate 0x%1").arg( keyId );
}
}
@@ -503,15 +503,15 @@ namespace {
if ( url.hasHost() || url.path() != "/" || !url.hasRef() )
return false;
if ( w && !w->htmlPart()->gotoAnchor( url.ref() ) )
- static_cast<QScrollView*>( w->htmlPart()->widget() )->ensureVisible( 0, 0 );
+ static_cast<TQScrollView*>( w->htmlPart()->widget() )->ensureVisible( 0, 0 );
return true;
}
}
namespace {
- QString MailToURLHandler::statusBarMessage( const KURL & url, KMReaderWin * ) const {
+ TQString MailToURLHandler::statusBarMessage( const KURL & url, KMReaderWin * ) const {
if ( url.protocol() != "mailto" )
- return QString::null;
+ return TQString::null;
return KMMessage::decodeMailtoUrl( url.url() );
}
}
@@ -527,7 +527,7 @@ namespace {
return true;
}
- bool AttachmentURLHandler::handleContextMenuRequest( const KURL & url, const QPoint & p, KMReaderWin * w ) const {
+ bool AttachmentURLHandler::handleContextMenuRequest( const KURL & url, const TQPoint & p, KMReaderWin * w ) const {
if ( !w || !w->message() )
return false;
const int id = KMReaderWin::msgPartFromUrl( url );
@@ -537,14 +537,14 @@ namespace {
return true;
}
- QString AttachmentURLHandler::statusBarMessage( const KURL & url, KMReaderWin * w ) const {
+ TQString AttachmentURLHandler::statusBarMessage( const KURL & url, KMReaderWin * w ) const {
if ( !w || !w->message() )
- return QString::null;
+ return TQString::null;
const partNode * node = w->partNodeFromUrl( url );
if ( !node )
- return QString::null;
+ return TQString::null;
const KMMessagePart & msgPart = node->msgPart();
- QString name = msgPart.fileName();
+ TQString name = msgPart.fileName();
if ( name.isEmpty() )
name = msgPart.name();
if ( !name.isEmpty() )
@@ -554,29 +554,29 @@ namespace {
}
namespace {
- static QString extractAuditLog( const KURL & url ) {
+ static TQString extractAuditLog( const KURL & url ) {
if ( url.protocol() != "kmail" || url.path() != "showAuditLog" )
- return QString();
+ return TQString();
assert( !url.queryItem( "log" ).isEmpty() );
return url.queryItem( "log" );
}
bool ShowAuditLogURLHandler::handleClick( const KURL & url, KMReaderWin * w ) const {
- const QString auditLog = extractAuditLog( url );
+ const TQString auditLog = extractAuditLog( url );
if ( auditLog.isEmpty() )
return false;
Kleo::MessageBox::auditLog( w, auditLog );
return true;
}
- bool ShowAuditLogURLHandler::handleContextMenuRequest( const KURL & url, const QPoint &, KMReaderWin * w ) const {
+ bool ShowAuditLogURLHandler::handleContextMenuRequest( const KURL & url, const TQPoint &, KMReaderWin * w ) const {
// disable RMB for my own links:
return !extractAuditLog( url ).isEmpty();
}
- QString ShowAuditLogURLHandler::statusBarMessage( const KURL & url, KMReaderWin * ) const {
+ TQString ShowAuditLogURLHandler::statusBarMessage( const KURL & url, KMReaderWin * ) const {
if ( extractAuditLog( url ).isEmpty() )
- return QString();
+ return TQString();
else
return i18n("Show GnuPG Audit Log for this operation");
}
@@ -589,7 +589,7 @@ namespace {
return true;
}
- bool FallBackURLHandler::handleContextMenuRequest( const KURL & url, const QPoint & p, KMReaderWin * w ) const {
+ bool FallBackURLHandler::handleContextMenuRequest( const KURL & url, const TQPoint & p, KMReaderWin * w ) const {
if ( w )
w->emitPopupMenu( url, p );
return true;
diff --git a/kmail/urlhandlermanager.h b/kmail/urlhandlermanager.h
index dce3646e4..734dfcabc 100644
--- a/kmail/urlhandlermanager.h
+++ b/kmail/urlhandlermanager.h
@@ -32,7 +32,7 @@
#ifndef __KMAIL_URLHANDLERMANAGER_H__
#define __KMAIL_URLHANDLERMANAGER_H__
-#include <qvaluevector.h>
+#include <tqvaluevector.h>
class KURL;
@@ -72,11 +72,11 @@ namespace KMail {
void unregisterHandler( const Interface::BodyPartURLHandler * handler );
bool handleClick( const KURL & url, KMReaderWin * w=0 ) const;
- bool handleContextMenuRequest( const KURL & url, const QPoint & p, KMReaderWin * w=0 ) const;
- QString statusBarMessage( const KURL & url, KMReaderWin * w=0 ) const;
+ bool handleContextMenuRequest( const KURL & url, const TQPoint & p, KMReaderWin * w=0 ) const;
+ TQString statusBarMessage( const KURL & url, KMReaderWin * w=0 ) const;
private:
- typedef QValueVector<const URLHandler*> HandlerList;
+ typedef TQValueVector<const URLHandler*> HandlerList;
HandlerList mHandlers;
class BodyPartURLHandlerManager;
BodyPartURLHandlerManager * mBodyPartURLHandlerManager;
diff --git a/kmail/util.cpp b/kmail/util.cpp
index 1c45d4456..5d7173d2c 100644
--- a/kmail/util.cpp
+++ b/kmail/util.cpp
@@ -38,7 +38,7 @@
#include "util.h"
#include <stdlib.h>
-#include <qcstring.h>
+#include <tqcstring.h>
#include <mimelib/string.h>
size_t KMail::Util::crlf2lf( char* str, const size_t strLen )
@@ -71,12 +71,12 @@ size_t KMail::Util::crlf2lf( char* str, const size_t strLen )
return target - str;
}
-QCString KMail::Util::lf2crlf( const QCString & src )
+TQCString KMail::Util::lf2crlf( const TQCString & src )
{
- QCString result( 1 + 2*src.size() ); // maximal possible length
+ TQCString result( 1 + 2*src.size() ); // maximal possible length
- QCString::ConstIterator s = src.begin();
- QCString::Iterator d = result.begin();
+ TQCString::ConstIterator s = src.begin();
+ TQCString::Iterator d = result.begin();
// we use cPrev to make sure we insert '\r' only there where it is missing
char cPrev = '?';
while ( *s ) {
@@ -89,14 +89,14 @@ QCString KMail::Util::lf2crlf( const QCString & src )
return result;
}
-QByteArray KMail::Util::lf2crlf( const QByteArray & src )
+TQByteArray KMail::Util::lf2crlf( const TQByteArray & src )
{
const char* s = src.data();
if ( !s )
- return QByteArray();
+ return TQByteArray();
- QByteArray result( 2 * src.size() ); // maximal possible length
- QByteArray::Iterator d = result.begin();
+ TQByteArray result( 2 * src.size() ); // maximal possible length
+ TQByteArray::Iterator d = result.begin();
// we use cPrev to make sure we insert '\r' only there where it is missing
char cPrev = '?';
const char* end = src.end();
@@ -110,68 +110,68 @@ QByteArray KMail::Util::lf2crlf( const QByteArray & src )
return result;
}
-QCString KMail::Util::CString( const DwString& str )
+TQCString KMail::Util::CString( const DwString& str )
{
const int strLen = str.size();
- QCString cstr( strLen + 1 );
+ TQCString cstr( strLen + 1 );
memcpy( cstr.data(), str.data(), strLen );
cstr[ strLen ] = 0;
return cstr;
}
-QByteArray KMail::Util::ByteArray( const DwString& str )
+TQByteArray KMail::Util::ByteArray( const DwString& str )
{
const int strLen = str.size();
- QByteArray arr( strLen );
+ TQByteArray arr( strLen );
memcpy( arr.data(), str.data(), strLen );
return arr;
}
-DwString KMail::Util::dwString( const QCString& str )
+DwString KMail::Util::dwString( const TQCString& str )
{
if ( !str.data() ) // DwString doesn't like char*=0
return DwString();
return DwString( str.data(), str.size() - 1 );
}
-DwString KMail::Util::dwString( const QByteArray& str )
+DwString KMail::Util::dwString( const TQByteArray& str )
{
if ( !str.data() ) // DwString doesn't like char*=0
return DwString();
return DwString( str.data(), str.size() );
}
-void KMail::Util::append( QByteArray& that, const QByteArray& str )
+void KMail::Util::append( TQByteArray& that, const TQByteArray& str )
{
that.detach();
uint len1 = that.size();
uint len2 = str.size();
- if ( that.resize( len1 + len2, QByteArray::SpeedOptim ) )
+ if ( that.resize( len1 + len2, TQByteArray::SpeedOptim ) )
memcpy( that.data() + len1, str.data(), len2 );
}
-void KMail::Util::append( QByteArray& that, const char* str )
+void KMail::Util::append( TQByteArray& that, const char* str )
{
if ( !str )
return; // nothing to append
that.detach();
uint len1 = that.size();
uint len2 = qstrlen(str);
- if ( that.resize( len1 + len2, QByteArray::SpeedOptim ) )
+ if ( that.resize( len1 + len2, TQByteArray::SpeedOptim ) )
memcpy( that.data() + len1, str, len2 );
}
-void KMail::Util::append( QByteArray& that, const QCString& str )
+void KMail::Util::append( TQByteArray& that, const TQCString& str )
{
that.detach();
uint len1 = that.size();
uint len2 = str.size() - 1;
- if ( that.resize( len1 + len2, QByteArray::SpeedOptim ) )
+ if ( that.resize( len1 + len2, TQByteArray::SpeedOptim ) )
memcpy( that.data() + len1, str.data(), len2 );
}
-// Code taken from QCString::insert, but trailing nul removed
-void KMail::Util::insert( QByteArray& that, uint index, const char* s )
+// Code taken from TQCString::insert, but trailing nul removed
+void KMail::Util::insert( TQByteArray& that, uint index, const char* s )
{
int len = qstrlen(s);
if ( len == 0 )
@@ -180,13 +180,13 @@ void KMail::Util::insert( QByteArray& that, uint index, const char* s )
int nlen = olen + len;
if ( index >= olen ) { // insert after end of string
that.detach();
- if ( that.resize(nlen+index-olen, QByteArray::SpeedOptim ) ) {
+ if ( that.resize(nlen+index-olen, TQByteArray::SpeedOptim ) ) {
memset( that.data()+olen, ' ', index-olen );
memcpy( that.data()+index, s, len );
}
} else {
that.detach();
- if ( that.resize(nlen, QByteArray::SpeedOptim ) ) { // normal insert
+ if ( that.resize(nlen, TQByteArray::SpeedOptim ) ) { // normal insert
memmove( that.data()+index+len, that.data()+index, olen-index );
memcpy( that.data()+index, s, len );
}
diff --git a/kmail/util.h b/kmail/util.h
index 05eb9084b..e961bb526 100644
--- a/kmail/util.h
+++ b/kmail/util.h
@@ -40,8 +40,8 @@
#include <stdlib.h>
-#include <qobject.h>
-#include <qcstring.h>
+#include <tqobject.h>
+#include <tqcstring.h>
#include <kio/netaccess.h>
#include <kmessagebox.h>
@@ -74,40 +74,40 @@ namespace Util {
* @param src The source string to convert.
* @return The result string.
*/
- QCString lf2crlf( const QCString & src );
+ TQCString lf2crlf( const TQCString & src );
/**
* Convert "\n" line endings to "\r\n".
* @param src The source string to convert. NOT null-terminated.
* @return The result string. NOT null-terminated.
*/
- QByteArray lf2crlf( const QByteArray & src );
+ TQByteArray lf2crlf( const TQByteArray & src );
/**
- * Construct a QCString from a DwString
+ * Construct a TQCString from a DwString
*/
- QCString CString( const DwString& str );
+ TQCString CString( const DwString& str );
/**
- * Construct a QByteArray from a DwString
+ * Construct a TQByteArray from a DwString
*/
- QByteArray ByteArray( const DwString& str );
+ TQByteArray ByteArray( const DwString& str );
/**
* Construct a DwString from a QCString
*/
- DwString dwString( const QCString& str );
+ DwString dwString( const TQCString& str );
/**
* Construct a DwString from a QByteArray
*/
- DwString dwString( const QByteArray& str );
+ DwString dwString( const TQByteArray& str );
/**
- * Fills a QByteArray from a QCString - removing the trailing null.
+ * Fills a TQByteArray from a TQCString - removing the trailing null.
*/
- void setFromQCString( QByteArray& arr, const QCString& cstr );
+ void setFromQCString( TQByteArray& arr, const TQCString& cstr );
- inline void setFromQCString( QByteArray& arr, const QCString& cstr )
+ inline void setFromQCString( TQByteArray& arr, const TQCString& cstr )
{
if ( cstr.size() )
arr.duplicate( cstr.data(), cstr.size()-1 );
@@ -116,35 +116,35 @@ namespace Util {
}
/**
- * Creates a QByteArray from a QCString without detaching (duplicating the data).
- * Fast, but be careful, the QCString gets modified by this; this is only good for
- * the case where the QCString is going to be thrown away afterwards anyway.
+ * Creates a TQByteArray from a TQCString without detaching (duplicating the data).
+ * Fast, but be careful, the TQCString gets modified by this; this is only good for
+ * the case where the TQCString is going to be thrown away afterwards anyway.
*/
- QByteArray byteArrayFromQCStringNoDetach( QCString& cstr );
- inline QByteArray byteArrayFromQCStringNoDetach( QCString& cstr )
+ TQByteArray byteArrayFromQCStringNoDetach( TQCString& cstr );
+ inline TQByteArray byteArrayFromQCStringNoDetach( TQCString& cstr )
{
- QByteArray arr = cstr;
+ TQByteArray arr = cstr;
if ( arr.size() )
arr.resize( arr.size() - 1 );
return arr;
}
/**
- * Restore the QCString after byteArrayFromQCStringNoDetach modified it
+ * Restore the TQCString after byteArrayFromQCStringNoDetach modified it
*/
- void restoreQCString( QCString& str );
- inline void restoreQCString( QCString& str )
+ void restoreQCString( TQCString& str );
+ inline void restoreQCString( TQCString& str )
{
if ( str.data() )
str.resize( str.size() + 1 );
}
/**
- * Fills a QCString from a QByteArray - adding the trailing null.
+ * Fills a TQCString from a TQByteArray - adding the trailing null.
*/
- void setFromByteArray( QCString& cstr, const QByteArray& arr );
+ void setFromByteArray( TQCString& cstr, const TQByteArray& arr );
- inline void setFromByteArray( QCString& result, const QByteArray& arr )
+ inline void setFromByteArray( TQCString& result, const TQByteArray& arr )
{
const int len = arr.size();
result.resize( len + 1 /* trailing NUL */ );
@@ -155,19 +155,19 @@ namespace Util {
/**
* Append a bytearray to a bytearray. No trailing nuls anywhere.
*/
- void append( QByteArray& that, const QByteArray& str );
+ void append( TQByteArray& that, const TQByteArray& str );
/**
* Append a char* to a bytearray. Trailing nul not copied.
*/
- void append( QByteArray& that, const char* str );
+ void append( TQByteArray& that, const char* str );
/**
- * Append a QCString to a bytearray. Trailing nul not copied.
+ * Append a TQCString to a bytearray. Trailing nul not copied.
*/
- void append( QByteArray& that, const QCString& str );
+ void append( TQByteArray& that, const TQCString& str );
- void insert( QByteArray& that, uint index, const char* s );
+ void insert( TQByteArray& that, uint index, const char* s );
/**
* A LaterDeleter is intended to be used with the RAII ( Resource
@@ -179,7 +179,7 @@ namespace Util {
class LaterDeleter
{
public:
- LaterDeleter( QObject *o)
+ LaterDeleter( TQObject *o)
:m_object( o ), m_disabled( false )
{
}
@@ -194,12 +194,12 @@ namespace Util {
m_disabled = v;
}
protected:
- QObject *m_object;
+ TQObject *m_object;
bool m_disabled;
};
// return true if we should proceed, false if we should abort
- inline bool checkOverwrite( const KURL& url, QWidget* w )
+ inline bool checkOverwrite( const KURL& url, TQWidget* w )
{
if ( KIO::NetAccess::exists( url, false /*dest*/, w ) ) {
if ( KMessageBox::Cancel ==
diff --git a/kmail/vacation.cpp b/kmail/vacation.cpp
index af0c5e16b..d0cdedf85 100644
--- a/kmail/vacation.cpp
+++ b/kmail/vacation.cpp
@@ -43,7 +43,7 @@ using KMime::Types::AddrSpecList;
#include <kmessagebox.h>
#include <kdebug.h>
-#include <qdatetime.h>
+#include <tqdatetime.h>
#include <cassert>
#include <vector>
@@ -86,24 +86,24 @@ namespace KSieveExt {
#undef FOREACH
#endif
#define FOREACH for ( std::vector<KSieve::ScriptBuilder*>::const_iterator it = mBuilders.begin(), end = mBuilders.end() ; it != end ; ++it ) (*it)->
- void commandStart( const QString & identifier ) { FOREACH commandStart( identifier ); }
+ void commandStart( const TQString & identifier ) { FOREACH commandStart( identifier ); }
void commandEnd() { FOREACH commandEnd(); }
- void testStart( const QString & identifier ) { FOREACH testStart( identifier ); }
+ void testStart( const TQString & identifier ) { FOREACH testStart( identifier ); }
void testEnd() { FOREACH testEnd(); }
void testListStart() { FOREACH testListStart(); }
void testListEnd() { FOREACH testListEnd(); }
void blockStart() { FOREACH blockStart(); }
void blockEnd() { FOREACH blockEnd(); }
- void hashComment( const QString & comment ) { FOREACH hashComment( comment ); }
- void bracketComment( const QString & comment ) { FOREACH bracketComment( comment ); }
+ void hashComment( const TQString & comment ) { FOREACH hashComment( comment ); }
+ void bracketComment( const TQString & comment ) { FOREACH bracketComment( comment ); }
void lineFeed() { FOREACH lineFeed(); }
void error( const KSieve::Error & e ) { FOREACH error( e ); }
void finished() { FOREACH finished(); }
- void taggedArgument( const QString & tag ) { FOREACH taggedArgument( tag ); }
- void stringArgument( const QString & string, bool multiline, const QString & fixme ) { FOREACH stringArgument( string, multiline, fixme ); }
+ void taggedArgument( const TQString & tag ) { FOREACH taggedArgument( tag ); }
+ void stringArgument( const TQString & string, bool multiline, const TQString & fixme ) { FOREACH stringArgument( string, multiline, fixme ); }
void numberArgument( unsigned long number, char quantifier ) { FOREACH numberArgument( number, quantifier ); }
void stringListArgumentStart() { FOREACH stringListArgumentStart(); }
- void stringListEntry( const QString & string, bool multiline, const QString & fixme) { FOREACH stringListEntry( string, multiline, fixme ); }
+ void stringListEntry( const TQString & string, bool multiline, const TQString & fixme) { FOREACH stringListEntry( string, multiline, fixme ); }
void stringListArgumentEnd() { FOREACH stringListArgumentEnd(); }
#undef FOREACH
};
@@ -144,7 +144,7 @@ namespace {
};
const std::vector<StateNode> mNodes;
- std::map<QString,QString> mResults;
+ std::map<TQString,TQString> mResults;
std::set<unsigned int> mRecursionGuard;
unsigned int mState;
int mNestingDepth;
@@ -153,14 +153,14 @@ namespace {
GenericInformationExtractor( const std::vector<StateNode> & nodes )
: KSieve::ScriptBuilder(), mNodes( nodes ), mState( 0 ), mNestingDepth( 0 ) {}
- const std::map<QString,QString> & results() const { return mResults; }
+ const std::map<TQString,TQString> & results() const { return mResults; }
private:
- void process( BuilderMethod method, const QString & string=QString::null ) {
+ void process( BuilderMethod method, const TQString & string=TQString::null ) {
doProcess( method, string );
mRecursionGuard.clear();
}
- void doProcess( BuilderMethod method, const QString & string ) {
+ void doProcess( BuilderMethod method, const TQString & string ) {
mRecursionGuard.insert( mState );
bool found = true;
const StateNode & expected = mNodes[mState];
@@ -169,7 +169,7 @@ namespace {
if ( expected.method != Any && method != expected.method )
found = false;
if ( const char * str = expected.string )
- if ( string.lower() != QString::fromUtf8( str ).lower() )
+ if ( string.lower() != TQString::fromUtf8( str ).lower() )
found = false;
kdDebug(5006) << ( found ? "found: " : "not found: " )
<< mState << " -> "
@@ -183,16 +183,16 @@ namespace {
doProcess( method, string );
}
}
- void commandStart( const QString & identifier ) { kdDebug(5006) << k_funcinfo << endl; process( CommandStart, identifier ); }
+ void commandStart( const TQString & identifier ) { kdDebug(5006) << k_funcinfo << endl; process( CommandStart, identifier ); }
void commandEnd() { kdDebug(5006) << k_funcinfo << endl; process( CommandEnd ); }
- void testStart( const QString & identifier ) { kdDebug(5006) << k_funcinfo << endl; process( TestStart, identifier ); }
+ void testStart( const TQString & identifier ) { kdDebug(5006) << k_funcinfo << endl; process( TestStart, identifier ); }
void testEnd() { kdDebug(5006) << k_funcinfo << endl; process( TestEnd ); }
void testListStart() { kdDebug(5006) << k_funcinfo << endl; process( TestListStart ); }
void testListEnd() { kdDebug(5006) << k_funcinfo << endl; process( TestListEnd ); }
void blockStart() { kdDebug(5006) << k_funcinfo << endl; process( BlockStart ); ++mNestingDepth; }
void blockEnd() { kdDebug(5006) << k_funcinfo << endl; --mNestingDepth; process( BlockEnd ); }
- void hashComment( const QString & ) { kdDebug(5006) << k_funcinfo << endl; }
- void bracketComment( const QString & ) { kdDebug(5006) << k_funcinfo << endl; }
+ void hashComment( const TQString & ) { kdDebug(5006) << k_funcinfo << endl; }
+ void bracketComment( const TQString & ) { kdDebug(5006) << k_funcinfo << endl; }
void lineFeed() { kdDebug(5006) << k_funcinfo << endl; }
void error( const KSieve::Error & ) {
kdDebug(5006) << k_funcinfo << endl;
@@ -200,11 +200,11 @@ namespace {
}
void finished() { kdDebug(5006) << k_funcinfo << endl; }
- void taggedArgument( const QString & tag ) { kdDebug(5006) << k_funcinfo << endl; process( TaggedArgument, tag ); }
- void stringArgument( const QString & string, bool, const QString & ) { kdDebug(5006) << k_funcinfo << endl; process( StringArgument, string ); }
- void numberArgument( unsigned long number, char ) { kdDebug(5006) << k_funcinfo << endl; process( NumberArgument, QString::number( number ) ); }
+ void taggedArgument( const TQString & tag ) { kdDebug(5006) << k_funcinfo << endl; process( TaggedArgument, tag ); }
+ void stringArgument( const TQString & string, bool, const TQString & ) { kdDebug(5006) << k_funcinfo << endl; process( StringArgument, string ); }
+ void numberArgument( unsigned long number, char ) { kdDebug(5006) << k_funcinfo << endl; process( NumberArgument, TQString::number( number ) ); }
void stringListArgumentStart() { kdDebug(5006) << k_funcinfo << endl; process( StringListArgumentStart ); }
- void stringListEntry( const QString & string, bool, const QString & ) { kdDebug(5006) << k_funcinfo << endl; process( StringListEntry, string ); }
+ void stringListEntry( const TQString & string, bool, const TQString & ) { kdDebug(5006) << k_funcinfo << endl; process( StringListEntry, string ); }
void stringListArgumentEnd() { kdDebug(5006) << k_funcinfo << endl; process( StringListArgumentEnd ); }
};
@@ -306,9 +306,9 @@ namespace {
}
- QString domainName() /*not const, since map::op[] isn't const*/ {
+ TQString domainName() /*not const, since map::op[] isn't const*/ {
return mResults.count( "stop" ) && mResults.count( "from" )
- ? mResults["domainName"] : QString::null ;
+ ? mResults["domainName"] : TQString::null ;
}
};
@@ -330,11 +330,11 @@ namespace {
virtual ~VacationDataExtractor() {}
int notificationInterval() const { return mNotificationInterval; }
- const QString & messageText() const { return mMessageText; }
- const QStringList & aliases() const { return mAliases; }
+ const TQString & messageText() const { return mMessageText; }
+ const TQStringList & aliases() const { return mAliases; }
private:
- void commandStart( const QString & identifier ) {
+ void commandStart( const TQString & identifier ) {
kdDebug( 5006 ) << "VacationDataExtractor::commandStart( \"" << identifier << "\" )" << endl;
if ( identifier != "vacation" )
return;
@@ -347,14 +347,14 @@ namespace {
mContext = None;
}
- void testStart( const QString & ) {}
+ void testStart( const TQString & ) {}
void testEnd() {}
void testListStart() {}
void testListEnd() {}
void blockStart() {}
void blockEnd() {}
- void hashComment( const QString & ) {}
- void bracketComment( const QString & ) {}
+ void hashComment( const TQString & ) {}
+ void bracketComment( const TQString & ) {}
void lineFeed() {}
void error( const KSieve::Error & e ) {
kdDebug( 5006 ) << "VacationDataExtractor::error() ### "
@@ -363,7 +363,7 @@ namespace {
}
void finished() {}
- void taggedArgument( const QString & tag ) {
+ void taggedArgument( const TQString & tag ) {
kdDebug( 5006 ) << "VacationDataExtractor::taggedArgument( \"" << tag << "\" )" << endl;
if ( mContext != VacationCommand )
return;
@@ -373,7 +373,7 @@ namespace {
mContext = Addresses;
}
- void stringArgument( const QString & string, bool, const QString & ) {
+ void stringArgument( const TQString & string, bool, const TQString & ) {
kdDebug( 5006 ) << "VacationDataExtractor::stringArgument( \"" << string << "\" )" << endl;
if ( mContext == Addresses ) {
mAliases.push_back( string );
@@ -396,7 +396,7 @@ namespace {
}
void stringListArgumentStart() {}
- void stringListEntry( const QString & string, bool, const QString & ) {
+ void stringListEntry( const TQString & string, bool, const TQString & ) {
kdDebug( 5006 ) << "VacationDataExtractor::stringListEntry( \"" << string << "\" )" << endl;
if ( mContext != Addresses )
return;
@@ -412,15 +412,15 @@ namespace {
private:
Context mContext;
int mNotificationInterval;
- QString mMessageText;
- QStringList mAliases;
+ TQString mMessageText;
+ TQStringList mAliases;
void reset() {
kdDebug(5006) << "VacationDataExtractor::reset()" << endl;
mContext = None;
mNotificationInterval = 0;
mAliases.clear();
- mMessageText = QString::null;
+ mMessageText = TQString::null;
}
};
@@ -428,16 +428,16 @@ namespace {
namespace KMail {
- Vacation::Vacation( QObject * parent, bool checkOnly, const char * name )
- : QObject( parent, name ), mSieveJob( 0 ), mDialog( 0 ), mWasActive( false ), mCheckOnly( checkOnly )
+ Vacation::Vacation( TQObject * parent, bool checkOnly, const char * name )
+ : TQObject( parent, name ), mSieveJob( 0 ), mDialog( 0 ), mWasActive( false ), mCheckOnly( checkOnly )
{
mUrl = findURL();
kdDebug(5006) << "Vacation: found url \"" << mUrl.prettyURL() << "\"" << endl;
if ( mUrl.isEmpty() ) // nothing to do...
return;
mSieveJob = SieveJob::get( mUrl, !checkOnly );
- connect( mSieveJob, SIGNAL(gotScript(KMail::SieveJob*,bool,const QString&,bool)),
- SLOT(slotGetResult(KMail::SieveJob*,bool,const QString&,bool)) );
+ connect( mSieveJob, TQT_SIGNAL(gotScript(KMail::SieveJob*,bool,const TQString&,bool)),
+ TQT_SLOT(slotGetResult(KMail::SieveJob*,bool,const TQString&,bool)) );
}
Vacation::~Vacation() {
@@ -446,44 +446,44 @@ namespace KMail {
kdDebug(5006) << "~Vacation()" << endl;
}
- static inline QString dotstuff( QString s ) {
+ static inline TQString dotstuff( TQString s ) {
if ( s.startsWith( "." ) )
return '.' + s.replace( "\n.", "\n.." );
else
return s.replace( "\n.", "\n.." );
}
- QString Vacation::composeScript( const QString & messageText,
+ TQString Vacation::composeScript( const TQString & messageText,
int notificationInterval,
const AddrSpecList & addrSpecs,
- bool sendForSpam, const QString & domain )
+ bool sendForSpam, const TQString & domain )
{
- QString addressesArgument;
- QStringList aliases;
+ TQString addressesArgument;
+ TQStringList aliases;
if ( !addrSpecs.empty() ) {
addressesArgument += ":addresses [ ";
- QStringList sl;
+ TQStringList sl;
for ( AddrSpecList::const_iterator it = addrSpecs.begin() ; it != addrSpecs.end() ; ++it ) {
sl.push_back( '"' + (*it).asString().replace( '\\', "\\\\" ).replace( '"', "\\\"" ) + '"' );
aliases.push_back( (*it).asString() );
}
addressesArgument += sl.join( ", " ) + " ] ";
}
- QString script = QString::fromLatin1("require \"vacation\";\n\n" );
+ TQString script = TQString::fromLatin1("require \"vacation\";\n\n" );
if ( !sendForSpam )
- script += QString::fromLatin1( "if header :contains \"X-Spam-Flag\" \"YES\""
+ script += TQString::fromLatin1( "if header :contains \"X-Spam-Flag\" \"YES\""
" { keep; stop; }\n" ); // FIXME?
if ( !domain.isEmpty() ) // FIXME
- script += QString::fromLatin1( "if not address :domain :contains \"from\" \"%1\" { keep; stop; }\n" ).arg( domain );
+ script += TQString::fromLatin1( "if not address :domain :contains \"from\" \"%1\" { keep; stop; }\n" ).arg( domain );
script += "vacation ";
script += addressesArgument;
if ( notificationInterval > 0 )
- script += QString::fromLatin1(":days %1 ").arg( notificationInterval );
- script += QString::fromLatin1("text:\n");
+ script += TQString::fromLatin1(":days %1 ").arg( notificationInterval );
+ script += TQString::fromLatin1("text:\n");
script += dotstuff( messageText.isEmpty() ? defaultMessageText() : messageText );
- script += QString::fromLatin1( "\n.\n;\n" );
+ script += TQString::fromLatin1( "\n.\n;\n" );
return script;
}
@@ -522,9 +522,9 @@ namespace KMail {
return KURL();
}
- bool Vacation::parseScript( const QString & script, QString & messageText,
- int & notificationInterval, QStringList & aliases,
- bool & sendForSpam, QString & domainName ) {
+ bool Vacation::parseScript( const TQString & script, TQString & messageText,
+ int & notificationInterval, TQStringList & aliases,
+ bool & sendForSpam, TQString & domainName ) {
if ( script.stripWhiteSpace().isEmpty() ) {
messageText = defaultMessageText();
notificationInterval = defaultNotificationInterval();
@@ -537,7 +537,7 @@ namespace KMail {
// The stripWhiteSpace() call below prevents parsing errors. The
// slave somehow omits the last \n, which results in a lone \r at
// the end, leading to a parse error.
- const QCString scriptUTF8 = script.stripWhiteSpace().utf8();
+ const TQCString scriptUTF8 = script.stripWhiteSpace().utf8();
kdDebug(5006) << "scriptUtf8 = \"" + scriptUTF8 + "\"" << endl;
KSieve::Parser parser( scriptUTF8.begin(),
scriptUTF8.begin() + scriptUTF8.length() );
@@ -558,7 +558,7 @@ namespace KMail {
return true;
}
- QString Vacation::defaultMessageText() {
+ TQString Vacation::defaultMessageText() {
return i18n("I am out of office till %1.\n"
"\n"
"In urgent cases, please contact Mrs. <vacation replacement>\n"
@@ -569,15 +569,15 @@ namespace KMail {
"\n"
"Yours sincerely,\n"
"-- <enter your name and email address here>\n")
- .arg( KGlobal::locale()->formatDate( QDate::currentDate().addDays( 1 ) ) );
+ .arg( KGlobal::locale()->formatDate( TQDate::currentDate().addDays( 1 ) ) );
}
int Vacation::defaultNotificationInterval() {
return 7; // days
}
- QStringList Vacation::defaultMailAliases() {
- QStringList sl;
+ TQStringList Vacation::defaultMailAliases() {
+ TQStringList sl;
for ( KPIM::IdentityManager::ConstIterator it = kmkernel->identityManager()->begin() ;
it != kmkernel->identityManager()->end() ; ++it )
if ( !(*it).emailAddr().isEmpty() )
@@ -589,12 +589,12 @@ namespace KMail {
return GlobalSettings::outOfOfficeReactToSpam();
}
- QString Vacation::defaultDomainName() {
+ TQString Vacation::defaultDomainName() {
return GlobalSettings::outOfOfficeDomain();
}
void Vacation::slotGetResult( SieveJob * job, bool success,
- const QString & script, bool active ) {
+ const TQString & script, bool active ) {
kdDebug(5006) << "Vacation::slotGetResult( ??, " << success
<< ", ?, " << active << " )" << endl
<< "script:" << endl
@@ -615,11 +615,11 @@ namespace KMail {
if ( !mDialog && !mCheckOnly )
mDialog = new VacationDialog( i18n("Configure \"Out of Office\" Replies"), 0, 0, false );
- QString messageText = defaultMessageText();
+ TQString messageText = defaultMessageText();
int notificationInterval = defaultNotificationInterval();
- QStringList aliases = defaultMailAliases();
+ TQStringList aliases = defaultMailAliases();
bool sendForSpam = defaultSendForSpam();
- QString domainName = defaultDomainName();
+ TQString domainName = defaultDomainName();
if ( !success ) active = false; // default to inactive
if ( !mCheckOnly && ( !success || !parseScript( script, messageText, notificationInterval, aliases, sendForSpam, domainName ) ) )
@@ -639,9 +639,9 @@ namespace KMail {
mDialog->setDomainName( domainName );
mDialog->enableDomainAndSendForSpam( !GlobalSettings::allowOutOfOfficeUploadButNoSettings() );
- connect( mDialog, SIGNAL(okClicked()), SLOT(slotDialogOk()) );
- connect( mDialog, SIGNAL(cancelClicked()), SLOT(slotDialogCancel()) );
- connect( mDialog, SIGNAL(defaultClicked()), SLOT(slotDialogDefaults()) );
+ connect( mDialog, TQT_SIGNAL(okClicked()), TQT_SLOT(slotDialogOk()) );
+ connect( mDialog, TQT_SIGNAL(cancelClicked()), TQT_SLOT(slotDialogCancel()) );
+ connect( mDialog, TQT_SIGNAL(defaultClicked()), TQT_SLOT(slotDialogDefaults()) );
mDialog->show();
}
@@ -671,7 +671,7 @@ namespace KMail {
void Vacation::slotDialogOk() {
kdDebug(5006) << "Vacation::slotDialogOk()" << endl;
// compose a new script:
- const QString script = composeScript( mDialog->messageText(),
+ const TQString script = composeScript( mDialog->messageText(),
mDialog->notificationInterval(),
mDialog->mailAliases(),
mDialog->sendForSpam(),
@@ -683,10 +683,10 @@ namespace KMail {
// and commit the dialog's settings to the server:
mSieveJob = SieveJob::put( mUrl, script, active, mWasActive );
- connect( mSieveJob, SIGNAL(gotScript(KMail::SieveJob*,bool,const QString&,bool)),
+ connect( mSieveJob, TQT_SIGNAL(gotScript(KMail::SieveJob*,bool,const TQString&,bool)),
active
- ? SLOT(slotPutActiveResult(KMail::SieveJob*,bool))
- : SLOT(slotPutInactiveResult(KMail::SieveJob*,bool)) );
+ ? TQT_SLOT(slotPutActiveResult(KMail::SieveJob*,bool))
+ : TQT_SLOT(slotPutInactiveResult(KMail::SieveJob*,bool)) );
// destroy the dialog:
mDialog->delayedDestruct();
diff --git a/kmail/vacation.h b/kmail/vacation.h
index 18a48d236..18f791337 100644
--- a/kmail/vacation.h
+++ b/kmail/vacation.h
@@ -15,7 +15,7 @@
#ifndef __KMAIL_VACATION_H__
#define __KMAIL_VACATION_H__
-#include <qobject.h>
+#include <tqobject.h>
#include <kurl.h>
@@ -29,34 +29,34 @@ namespace KMail {
namespace KMime {
namespace Types {
struct AddrSpec;
- typedef QValueList<AddrSpec> AddrSpecList;
+ typedef TQValueList<AddrSpec> AddrSpecList;
}
}
namespace KMail {
- class Vacation : public QObject {
+ class Vacation : public TQObject {
Q_OBJECT
public:
- Vacation( QObject * parent=0, bool checkOnly = false, const char * name=0 );
+ Vacation( TQObject * parent=0, bool checkOnly = false, const char * name=0 );
virtual ~Vacation();
bool isUsable() const { return !mUrl.isEmpty(); }
- static QString defaultMessageText();
+ static TQString defaultMessageText();
static int defaultNotificationInterval();
- static QStringList defaultMailAliases();
+ static TQStringList defaultMailAliases();
static bool defaultSendForSpam();
- static QString defaultDomainName();
+ static TQString defaultDomainName();
protected:
- static QString composeScript( const QString & messageText,
+ static TQString composeScript( const TQString & messageText,
int notificationInterval,
const KMime::Types::AddrSpecList & aliases,
- bool sendForSpam, const QString & excludeDomain );
- static bool parseScript( const QString & script, QString & messageText,
- int & notificationInterval, QStringList & aliases,
- bool & sendForSpam, QString & domainName );
+ bool sendForSpam, const TQString & excludeDomain );
+ static bool parseScript( const TQString & script, TQString & messageText,
+ int & notificationInterval, TQStringList & aliases,
+ bool & sendForSpam, TQString & domainName );
KURL findURL() const;
void handlePutResult( KMail::SieveJob * job, bool success, bool );
@@ -69,7 +69,7 @@ namespace KMail {
protected slots:
void slotDialogDefaults();
void slotGetResult( KMail::SieveJob * job, bool success,
- const QString & script, bool active );
+ const TQString & script, bool active );
void slotDialogOk();
void slotDialogCancel();
void slotPutActiveResult( KMail::SieveJob *, bool );
diff --git a/kmail/vacationdialog.cpp b/kmail/vacationdialog.cpp
index b05f3fbf2..a2dabe9b1 100644
--- a/kmail/vacationdialog.cpp
+++ b/kmail/vacationdialog.cpp
@@ -30,16 +30,16 @@ using KMime::HeaderParsing::parseAddressList;
#include <kwin.h>
#include <kapplication.h>
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qcheckbox.h>
-#include <qlineedit.h>
-#include <qtextedit.h>
-#include <qvalidator.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqcheckbox.h>
+#include <tqlineedit.h>
+#include <tqtextedit.h>
+#include <tqvalidator.h>
namespace KMail {
- VacationDialog::VacationDialog( const QString & caption, QWidget * parent,
+ VacationDialog::VacationDialog( const TQString & caption, TQWidget * parent,
const char * name, bool modal )
: KDialogBase( Plain, caption, Ok|Cancel|Default, Ok, parent, name, modal )
{
@@ -48,57 +48,57 @@ namespace KMail {
static const int rows = 7;
int row = -1;
- QGridLayout * glay = new QGridLayout( plainPage(), rows, 2, 0, spacingHint() );
+ TQGridLayout * glay = new TQGridLayout( plainPage(), rows, 2, 0, spacingHint() );
glay->setColStretch( 1, 1 );
// explanation label:
++row;
- glay->addMultiCellWidget( new QLabel( i18n("Configure vacation "
+ glay->addMultiCellWidget( new TQLabel( i18n("Configure vacation "
"notifications to be sent:"),
plainPage() ), row, row, 0, 1 );
// Activate checkbox:
++row;
- mActiveCheck = new QCheckBox( i18n("&Activate vacation notifications"), plainPage() );
+ mActiveCheck = new TQCheckBox( i18n("&Activate vacation notifications"), plainPage() );
glay->addMultiCellWidget( mActiveCheck, row, row, 0, 1 );
// Message text edit:
++row;
glay->setRowStretch( row, 1 );
- mTextEdit = new QTextEdit( plainPage(), "mTextEdit" );
- mTextEdit->setTextFormat( QTextEdit::PlainText );
+ mTextEdit = new TQTextEdit( plainPage(), "mTextEdit" );
+ mTextEdit->setTextFormat( TQTextEdit::PlainText );
glay->addMultiCellWidget( mTextEdit, row, row, 0, 1 );
// "Resent only after" spinbox and label:
++row;
mIntervalSpin = new KIntSpinBox( 1, 356, 1, 7, 10, plainPage(), "mIntervalSpin" );
- connect(mIntervalSpin, SIGNAL( valueChanged( int )), SLOT( slotIntervalSpinChanged( int ) ) );
- glay->addWidget( new QLabel( mIntervalSpin, i18n("&Resend notification only after:"), plainPage() ), row, 0 );
+ connect(mIntervalSpin, TQT_SIGNAL( valueChanged( int )), TQT_SLOT( slotIntervalSpinChanged( int ) ) );
+ glay->addWidget( new TQLabel( mIntervalSpin, i18n("&Resend notification only after:"), plainPage() ), row, 0 );
glay->addWidget( mIntervalSpin, row, 1 );
// "Send responses for these addresses" lineedit and label:
++row;
- mMailAliasesEdit = new QLineEdit( plainPage(), "mMailAliasesEdit" );
- glay->addWidget( new QLabel( mMailAliasesEdit, i18n("&Send responses for these addresses:"), plainPage() ), row, 0 );
+ mMailAliasesEdit = new TQLineEdit( plainPage(), "mMailAliasesEdit" );
+ glay->addWidget( new TQLabel( mMailAliasesEdit, i18n("&Send responses for these addresses:"), plainPage() ), row, 0 );
glay->addWidget( mMailAliasesEdit, row, 1 );
// "Send responses also to SPAM mail" checkbox:
++row;
- mSpamCheck = new QCheckBox( i18n("Do not send vacation replies to spam messages"), plainPage(), "mSpamCheck" );
+ mSpamCheck = new TQCheckBox( i18n("Do not send vacation replies to spam messages"), plainPage(), "mSpamCheck" );
mSpamCheck->setChecked( true );
glay->addMultiCellWidget( mSpamCheck, row, row, 0, 1 );
// domain checkbox and linedit:
++row;
- mDomainCheck = new QCheckBox( i18n("Only react to mail coming from domain"), plainPage(), "mDomainCheck" );
+ mDomainCheck = new TQCheckBox( i18n("Only react to mail coming from domain"), plainPage(), "mDomainCheck" );
mDomainCheck->setChecked( false );
- mDomainEdit = new QLineEdit( plainPage(), "mDomainEdit" );
+ mDomainEdit = new TQLineEdit( plainPage(), "mDomainEdit" );
mDomainEdit->setEnabled( false );
- mDomainEdit->setValidator( new QRegExpValidator( QRegExp( "[a-zA-Z0-9+-]+(?:\\.[a-zA-Z0-9+-]+)*" ), mDomainEdit ) );
+ mDomainEdit->setValidator( new TQRegExpValidator( TQRegExp( "[a-zA-Z0-9+-]+(?:\\.[a-zA-Z0-9+-]+)*" ), mDomainEdit ) );
glay->addWidget( mDomainCheck, row, 0 );
glay->addWidget( mDomainEdit, row, 1 );
- connect( mDomainCheck, SIGNAL(toggled(bool)),
- mDomainEdit, SLOT(setEnabled(bool)) );
+ connect( mDomainCheck, TQT_SIGNAL(toggled(bool)),
+ mDomainEdit, TQT_SLOT(setEnabled(bool)) );
Q_ASSERT( row == rows - 1 );
}
@@ -115,11 +115,11 @@ namespace KMail {
mActiveCheck->setChecked( activate );
}
- QString VacationDialog::messageText() const {
+ TQString VacationDialog::messageText() const {
return mTextEdit->text().stripWhiteSpace();
}
- void VacationDialog::setMessageText( const QString & text ) {
+ void VacationDialog::setMessageText( const TQString & text ) {
mTextEdit->setText( text );
const int height = ( mTextEdit->fontMetrics().lineSpacing() + 1 ) * 11;
mTextEdit->setMinimumHeight( height );
@@ -134,7 +134,7 @@ namespace KMail {
}
AddrSpecList VacationDialog::mailAliases() const {
- QCString text = mMailAliasesEdit->text().latin1(); // ### IMAA: !ok
+ TQCString text = mMailAliasesEdit->text().latin1(); // ### IMAA: !ok
AddressList al;
const char * s = text.begin();
parseAddressList( s, text.end(), al );
@@ -149,13 +149,13 @@ namespace KMail {
}
void VacationDialog::setMailAliases( const AddrSpecList & aliases ) {
- QStringList sl;
+ TQStringList sl;
for ( AddrSpecList::const_iterator it = aliases.begin() ; it != aliases.end() ; ++it )
sl.push_back( (*it).asString() );
mMailAliasesEdit->setText( sl.join(", ") );
}
- void VacationDialog::setMailAliases( const QString & aliases ) {
+ void VacationDialog::setMailAliases( const TQString & aliases ) {
mMailAliasesEdit->setText( aliases );
}
@@ -163,11 +163,11 @@ namespace KMail {
mIntervalSpin->setSuffix( i18n(" day", " days", value) );
}
- QString VacationDialog::domainName() const {
- return mDomainCheck->isChecked() ? mDomainEdit->text() : QString::null ;
+ TQString VacationDialog::domainName() const {
+ return mDomainCheck->isChecked() ? mDomainEdit->text() : TQString::null ;
}
- void VacationDialog::setDomainName( const QString & domain ) {
+ void VacationDialog::setDomainName( const TQString & domain ) {
mDomainEdit->setText( domain );
if ( !domain.isEmpty() )
mDomainCheck->setChecked( true );
diff --git a/kmail/vacationdialog.h b/kmail/vacationdialog.h
index f84ae6a76..7f98de74b 100644
--- a/kmail/vacationdialog.h
+++ b/kmail/vacationdialog.h
@@ -28,7 +28,7 @@ template <typename T> class QValueList;
namespace KMime {
namespace Types {
struct AddrSpec;
- typedef QValueList<AddrSpec> AddrSpecList;
+ typedef TQValueList<AddrSpec> AddrSpecList;
}
}
@@ -37,7 +37,7 @@ namespace KMail {
class VacationDialog : public KDialogBase {
Q_OBJECT
public:
- VacationDialog( const QString & caption, QWidget * parent=0,
+ VacationDialog( const TQString & caption, TQWidget * parent=0,
const char * name=0, bool modal=true );
virtual ~VacationDialog();
@@ -46,18 +46,18 @@ namespace KMail {
bool activateVacation() const;
virtual void setActivateVacation( bool activate );
- QString messageText() const;
- virtual void setMessageText( const QString & text );
+ TQString messageText() const;
+ virtual void setMessageText( const TQString & text );
int notificationInterval() const;
virtual void setNotificationInterval( int days );
KMime::Types::AddrSpecList mailAliases() const;
virtual void setMailAliases( const KMime::Types::AddrSpecList & aliases );
- virtual void setMailAliases( const QString & aliases );
+ virtual void setMailAliases( const TQString & aliases );
- QString domainName() const;
- virtual void setDomainName( const QString & domain );
+ TQString domainName() const;
+ virtual void setDomainName( const TQString & domain );
bool sendForSpam() const;
virtual void setSendForSpam( bool enable );
@@ -67,13 +67,13 @@ namespace KMail {
void slotIntervalSpinChanged( int value );
protected:
- QCheckBox * mActiveCheck;
+ TQCheckBox * mActiveCheck;
KIntSpinBox * mIntervalSpin;
- QLineEdit * mMailAliasesEdit;
- QTextEdit * mTextEdit;
- QCheckBox * mSpamCheck;
- QCheckBox * mDomainCheck;
- QLineEdit * mDomainEdit;
+ TQLineEdit * mMailAliasesEdit;
+ TQTextEdit * mTextEdit;
+ TQCheckBox * mSpamCheck;
+ TQCheckBox * mDomainCheck;
+ TQLineEdit * mDomainEdit;
};
diff --git a/kmail/vcardviewer.cpp b/kmail/vcardviewer.cpp
index 87bb2bad1..ff4a3b86e 100644
--- a/kmail/vcardviewer.cpp
+++ b/kmail/vcardviewer.cpp
@@ -35,15 +35,15 @@ using KABC::Addressee;
#include <klocale.h>
-#include <qstring.h>
+#include <tqstring.h>
-KMail::VCardViewer::VCardViewer(QWidget *parent, const QString& vCard, const char* name)
+KMail::VCardViewer::VCardViewer(TQWidget *parent, const TQString& vCard, const char* name)
: KDialogBase( parent, name, false, i18n("VCard Viewer"), User1|User2|User3|Close, Close,
true, i18n("&Import"), i18n("&Next Card"), i18n("&Previous Card") )
{
mAddresseeView = new AddresseeView(this);
mAddresseeView->enableLinks( 0 );
- mAddresseeView->setVScrollBarMode(QScrollView::Auto);
+ mAddresseeView->setVScrollBarMode(TQScrollView::Auto);
setMainWidget(mAddresseeView);
VCardConverter vcc;
diff --git a/kmail/vcardviewer.h b/kmail/vcardviewer.h
index 44d07c42c..69423ca65 100644
--- a/kmail/vcardviewer.h
+++ b/kmail/vcardviewer.h
@@ -23,7 +23,7 @@
#include <kdialogbase.h>
#include <kabc/addressee.h>
-#include <qvaluelist.h>
+#include <tqvaluelist.h>
class QString;
@@ -37,7 +37,7 @@ namespace KMail {
{
Q_OBJECT
public:
- VCardViewer(QWidget *parent, const QString& vCard, const char* name);
+ VCardViewer(TQWidget *parent, const TQString& vCard, const char* name);
virtual ~VCardViewer();
protected:
@@ -49,7 +49,7 @@ namespace KMail {
KPIM::AddresseeView * mAddresseeView;
KABC::Addressee::List mAddresseeList;
- QValueListIterator<KABC::Addressee> itAddresseeList;
+ TQValueListIterator<KABC::Addressee> itAddresseeList;
};
}
diff --git a/kmail/xfaceconfigurator.cpp b/kmail/xfaceconfigurator.cpp
index ba91efaa4..f88a3cd74 100644
--- a/kmail/xfaceconfigurator.cpp
+++ b/kmail/xfaceconfigurator.cpp
@@ -52,15 +52,15 @@ using namespace KPIM;
#include <kabc/addressee.h>
using namespace KABC;
-#include <qbitmap.h>
-#include <qcheckbox.h>
-#include <qcombobox.h>
-#include <qimage.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qpushbutton.h>
-#include <qwhatsthis.h>
-#include <qwidgetstack.h>
+#include <tqbitmap.h>
+#include <tqcheckbox.h>
+#include <tqcombobox.h>
+#include <tqimage.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqpushbutton.h>
+#include <tqwhatsthis.h>
+#include <tqwidgetstack.h>
// #include <assert.h>
@@ -70,122 +70,122 @@ using namespace KPIM;
namespace KMail {
- XFaceConfigurator::XFaceConfigurator( QWidget * parent, const char * name )
- : QWidget( parent, name )
+ XFaceConfigurator::XFaceConfigurator( TQWidget * parent, const char * name )
+ : TQWidget( parent, name )
{
// tmp. vars:
- QLabel * label;
- QLabel * label1;
+ TQLabel * label;
+ TQLabel * label1;
KActiveLabel * label2;
- QWidget * page;
- QVBoxLayout * vlay;
- QHBoxLayout * hlay;
- QVBoxLayout * page_vlay;
- QPushButton * mFromFileBtn;
- QPushButton * mFromAddrbkBtn;
+ TQWidget * page;
+ TQVBoxLayout * vlay;
+ TQHBoxLayout * hlay;
+ TQVBoxLayout * page_vlay;
+ TQPushButton * mFromFileBtn;
+ TQPushButton * mFromAddrbkBtn;
- vlay = new QVBoxLayout( this, 0, KDialog::spacingHint(), "main layout" );
- hlay = new QHBoxLayout( vlay );
+ vlay = new TQVBoxLayout( this, 0, KDialog::spacingHint(), "main layout" );
+ hlay = new TQHBoxLayout( vlay );
// "enable X-Face" checkbox:
- mEnableCheck = new QCheckBox( i18n("&Send picture with every message"), this );
- QWhatsThis::add( mEnableCheck,
+ mEnableCheck = new TQCheckBox( i18n("&Send picture with every message"), this );
+ TQWhatsThis::add( mEnableCheck,
i18n( "Check this box if you want KMail to add a so-called X-Face header to messages "
"written with this identity. An X-Face is a small (48x48 pixels) black and "
"white image that some mail clients are able to display." ) );
hlay->addWidget( mEnableCheck, Qt::AlignLeft | Qt::AlignVCenter );
- mXFaceLabel = new QLabel( this );
- QWhatsThis::add(mXFaceLabel,
+ mXFaceLabel = new TQLabel( this );
+ TQWhatsThis::add(mXFaceLabel,
i18n( "This is a preview of the picture selected/entered below." ) );
mXFaceLabel->setFixedSize(48, 48);
- mXFaceLabel->setFrameShape( QFrame::Box );
+ mXFaceLabel->setFrameShape( TQFrame::Box );
hlay->addWidget( mXFaceLabel );
-// label1 = new QLabel( "X-Face:", this );
+// label1 = new TQLabel( "X-Face:", this );
// vlay->addWidget( label1 );
// "obtain X-Face from" combo and label:
- hlay = new QHBoxLayout( vlay ); // inherits spacing
- mSourceCombo = new QComboBox( false, this );
- QWhatsThis::add(mSourceCombo,
+ hlay = new TQHBoxLayout( vlay ); // inherits spacing
+ mSourceCombo = new TQComboBox( false, this );
+ TQWhatsThis::add(mSourceCombo,
i18n("Click on the widgets below to obtain help on the input methods."));
mSourceCombo->setEnabled( false ); // since !mEnableCheck->isChecked()
- mSourceCombo->insertStringList( QStringList()
+ mSourceCombo->insertStringList( TQStringList()
<< i18n( "continuation of \"obtain picture from\"",
"External Source" )
<< i18n( "continuation of \"obtain picture from\"",
"Input Field Below" ) );
- label = new QLabel( mSourceCombo,
+ label = new TQLabel( mSourceCombo,
i18n("Obtain pic&ture from:"), this );
label->setEnabled( false ); // since !mEnableCheck->isChecked()
hlay->addWidget( label );
hlay->addWidget( mSourceCombo, 1 );
// widget stack that is controlled by the source combo:
- QWidgetStack * widgetStack = new QWidgetStack( this );
+ TQWidgetStack * widgetStack = new TQWidgetStack( this );
widgetStack->setEnabled( false ); // since !mEnableCheck->isChecked()
vlay->addWidget( widgetStack, 1 );
- connect( mSourceCombo, SIGNAL(highlighted(int)),
- widgetStack, SLOT(raiseWidget(int)) );
- connect( mEnableCheck, SIGNAL(toggled(bool)),
- mSourceCombo, SLOT(setEnabled(bool)) );
- connect( mEnableCheck, SIGNAL(toggled(bool)),
- widgetStack, SLOT(setEnabled(bool)) );
- connect( mEnableCheck, SIGNAL(toggled(bool)),
- label, SLOT(setEnabled(bool)) );
+ connect( mSourceCombo, TQT_SIGNAL(highlighted(int)),
+ widgetStack, TQT_SLOT(raiseWidget(int)) );
+ connect( mEnableCheck, TQT_SIGNAL(toggled(bool)),
+ mSourceCombo, TQT_SLOT(setEnabled(bool)) );
+ connect( mEnableCheck, TQT_SIGNAL(toggled(bool)),
+ widgetStack, TQT_SLOT(setEnabled(bool)) );
+ connect( mEnableCheck, TQT_SIGNAL(toggled(bool)),
+ label, TQT_SLOT(setEnabled(bool)) );
// The focus might be still in the widget that is disabled
- connect( mEnableCheck, SIGNAL(clicked()),
- mEnableCheck, SLOT(setFocus()) );
+ connect( mEnableCheck, TQT_SIGNAL(clicked()),
+ mEnableCheck, TQT_SLOT(setFocus()) );
int pageno = 0;
// page 0: create X-Face from image file or address book entry
- page = new QWidget( widgetStack );
+ page = new TQWidget( widgetStack );
widgetStack->addWidget( page, pageno ); // force sequential numbers (play safe)
- page_vlay = new QVBoxLayout( page, 0, KDialog::spacingHint() );
- hlay = new QHBoxLayout( page_vlay ); // inherits spacing
- mFromFileBtn = new QPushButton( i18n("Select File..."), page );
- QWhatsThis::add( mFromFileBtn,
+ page_vlay = new TQVBoxLayout( page, 0, KDialog::spacingHint() );
+ hlay = new TQHBoxLayout( page_vlay ); // inherits spacing
+ mFromFileBtn = new TQPushButton( i18n("Select File..."), page );
+ TQWhatsThis::add( mFromFileBtn,
i18n("Use this to select an image file to create the picture from. "
"The image should be of high contrast and nearly quadratic shape. "
"A light background helps improve the result." ) );
mFromFileBtn->setAutoDefault( false );
page_vlay->addWidget( mFromFileBtn, 1 );
- connect( mFromFileBtn, SIGNAL(released()),
- this, SLOT(slotSelectFile()) );
- mFromAddrbkBtn = new QPushButton( i18n("Set From Address Book"), page );
- QWhatsThis::add( mFromAddrbkBtn,
+ connect( mFromFileBtn, TQT_SIGNAL(released()),
+ this, TQT_SLOT(slotSelectFile()) );
+ mFromAddrbkBtn = new TQPushButton( i18n("Set From Address Book"), page );
+ TQWhatsThis::add( mFromAddrbkBtn,
i18n( "You can use a scaled-down version of the picture "
"you have set in your address book entry." ) );
mFromAddrbkBtn->setAutoDefault( false );
page_vlay->addWidget( mFromAddrbkBtn, 1 );
- connect( mFromAddrbkBtn, SIGNAL(released()),
- this, SLOT(slotSelectFromAddressbook()) );
- label1 = new QLabel( i18n("<qt>KMail can send a small (48x48 pixels), low-quality, "
+ connect( mFromAddrbkBtn, TQT_SIGNAL(released()),
+ this, TQT_SLOT(slotSelectFromAddressbook()) );
+ label1 = new TQLabel( i18n("<qt>KMail can send a small (48x48 pixels), low-quality, "
"monochrome picture with every message. "
"For example, this could be a picture of you or a glyph. "
"It is shown in the recipient's mail client (if supported)." ), page );
- label1->setAlignment( QLabel::WordBreak | QLabel::AlignVCenter );
+ label1->setAlignment( TQLabel::WordBreak | TQLabel::AlignVCenter );
page_vlay->addWidget( label1 );
widgetStack->raiseWidget( 0 ); // since mSourceCombo->currentItem() == 0
// page 1: input field for direct entering
++pageno;
- page = new QWidget( widgetStack );
+ page = new TQWidget( widgetStack );
widgetStack->addWidget( page, pageno );
- page_vlay = new QVBoxLayout( page, 0, KDialog::spacingHint() );
- mTextEdit = new QTextEdit( page );
+ page_vlay = new TQVBoxLayout( page, 0, KDialog::spacingHint() );
+ mTextEdit = new TQTextEdit( page );
page_vlay->addWidget( mTextEdit );
- QWhatsThis::add( mTextEdit, i18n( "Use this field to enter an arbitrary X-Face string." ) );
+ TQWhatsThis::add( mTextEdit, i18n( "Use this field to enter an arbitrary X-Face string." ) );
mTextEdit->setFont( KGlobalSettings::fixedFont() );
- mTextEdit->setWrapPolicy( QTextEdit::Anywhere );
+ mTextEdit->setWrapPolicy( TQTextEdit::Anywhere );
mTextEdit->setTextFormat( Qt::PlainText );
label2 = new KActiveLabel( i18n("Examples are available at <a href=\"http://www.xs4all.nl/~ace/X-Faces/\">http://www.xs4all.nl/~ace/X-Faces/</a>."), page );
page_vlay->addWidget( label2 );
- connect(mTextEdit, SIGNAL(textChanged()), this, SLOT(slotUpdateXFace()));
+ connect(mTextEdit, TQT_SIGNAL(textChanged()), this, TQT_SLOT(slotUpdateXFace()));
}
XFaceConfigurator::~XFaceConfigurator() {
@@ -200,21 +200,21 @@ namespace KMail {
mEnableCheck->setChecked( enable );
}
- QString XFaceConfigurator::xface() const {
+ TQString XFaceConfigurator::xface() const {
return mTextEdit->text();
}
- void XFaceConfigurator::setXFace( const QString & text ) {
+ void XFaceConfigurator::setXFace( const TQString & text ) {
mTextEdit->setText( text );
}
void XFaceConfigurator::setXfaceFromFile( const KURL &url )
{
- QString tmpFile;
+ TQString tmpFile;
if( KIO::NetAccess::download( url, tmpFile, this ) )
{
KXFace xf;
- mTextEdit->setText( xf.fromImage( QImage( tmpFile ) ) );
+ mTextEdit->setText( xf.fromImage( TQImage( tmpFile ) ) );
KIO::NetAccess::removeTempFile( tmpFile );
} else {
KMessageBox::error(this, KIO::NetAccess::lastErrorString() );
@@ -223,9 +223,9 @@ namespace KMail {
void XFaceConfigurator::slotSelectFile()
{
- QStringList mimeTypes = KImageIO::mimeTypes (KImageIO::Reading);
- QString filter = mimeTypes.join (" ");
- KURL url = KFileDialog::getOpenURL( QString::null, filter, this, QString::null );
+ TQStringList mimeTypes = KImageIO::mimeTypes (KImageIO::Reading);
+ TQString filter = mimeTypes.join (" ");
+ KURL url = KFileDialog::getOpenURL( TQString::null, filter, this, TQString::null );
if ( !url.isEmpty() )
setXfaceFromFile( url );
}
@@ -238,7 +238,7 @@ namespace KMail {
{
if ( me.photo().isIntern() )
{
- QImage photo = me.photo().data();
+ TQImage photo = me.photo().data();
if ( !photo.isNull() )
{
KXFace xf;
@@ -263,7 +263,7 @@ namespace KMail {
void XFaceConfigurator::slotUpdateXFace()
{
- QString str = mTextEdit->text();
+ TQString str = mTextEdit->text();
if ( !str.isEmpty() )
{
if ( str.startsWith("x-face:", false) )
@@ -272,7 +272,7 @@ namespace KMail {
mTextEdit->setText(str);
}
KXFace xf;
- QPixmap p( 48, 48, true );
+ TQPixmap p( 48, 48, true );
p.convertFromImage( xf.toImage(str) );
mXFaceLabel->setPixmap( p );
}
diff --git a/kmail/xfaceconfigurator.h b/kmail/xfaceconfigurator.h
index a08c2e545..2e243ddfb 100644
--- a/kmail/xfaceconfigurator.h
+++ b/kmail/xfaceconfigurator.h
@@ -17,8 +17,8 @@
#ifndef __KMAIL_XFACECONFIGURATOR_H__
#define __KMAIL_XFACECONFIGURATOR_H__
-#include <qwidget.h>
-#include <qtextedit.h>
+#include <tqwidget.h>
+#include <tqtextedit.h>
class KURL;
@@ -29,24 +29,24 @@ class QComboBox;
namespace KMail {
- class XFaceConfigurator : public QWidget {
+ class XFaceConfigurator : public TQWidget {
Q_OBJECT
public:
- XFaceConfigurator( QWidget * parent=0, const char * name=0 );
+ XFaceConfigurator( TQWidget * parent=0, const char * name=0 );
virtual ~XFaceConfigurator();
bool isXFaceEnabled() const;
void setXFaceEnabled( bool enable );
- QString xface() const;
- void setXFace( const QString & text );
+ TQString xface() const;
+ void setXFace( const TQString & text );
protected:
- QCheckBox * mEnableCheck;
- QTextEdit * mTextEdit;
- QLabel * mXFaceLabel;
- QComboBox * mSourceCombo;
+ TQCheckBox * mEnableCheck;
+ TQTextEdit * mTextEdit;
+ TQLabel * mXFaceLabel;
+ TQComboBox * mSourceCombo;
private:
diff --git a/kmailcvt/filter_evolution.cxx b/kmailcvt/filter_evolution.cxx
index 20a68d0b4..abc602a21 100644
--- a/kmailcvt/filter_evolution.cxx
+++ b/kmailcvt/filter_evolution.cxx
@@ -46,10 +46,10 @@ FilterEvolution::~FilterEvolution(void)
void FilterEvolution::import(FilterInfo *info)
{
// We ask the user to choose Evolution's root directory.
- QString evolDir = QDir::homeDirPath() + "/evolution/local";
- QDir d( evolDir );
+ TQString evolDir = TQDir::homeDirPath() + "/evolution/local";
+ TQDir d( evolDir );
if ( !d.exists() ) {
- evolDir = QDir::homeDirPath();
+ evolDir = TQDir::homeDirPath();
}
mailDir = KFileDialog::getExistingDirectory(evolDir, info->parent());
@@ -61,16 +61,16 @@ void FilterEvolution::import(FilterInfo *info)
* If the user only select homedir no import needed because
* there should be no files and we surely import wrong files.
*/
- else if ( mailDir == QDir::homeDirPath() || mailDir == (QDir::homeDirPath() + "/")) {
+ else if ( mailDir == TQDir::homeDirPath() || mailDir == (TQDir::homeDirPath() + "/")) {
info->addLog(i18n("No files found for import."));
} else {
info->setOverall(0);
// Recursive import of the MBoxes.
- QDir dir(mailDir);
- QStringList rootSubDirs = dir.entryList("[^\\.]*", QDir::Dirs, QDir::Name); // Removal of . and ..
+ TQDir dir(mailDir);
+ TQStringList rootSubDirs = dir.entryList("[^\\.]*", TQDir::Dirs, TQDir::Name); // Removal of . and ..
int currentDir = 1, numSubDirs = rootSubDirs.size();
- for(QStringList::Iterator filename = rootSubDirs.begin() ; filename != rootSubDirs.end() ; ++filename, ++currentDir) {
- importDirContents(info, dir.filePath(*filename), *filename, QString::null);
+ for(TQStringList::Iterator filename = rootSubDirs.begin() ; filename != rootSubDirs.end() ; ++filename, ++currentDir) {
+ importDirContents(info, dir.filePath(*filename), *filename, TQString::null);
info->setOverall((int) ((float) currentDir / numSubDirs * 100));
}
}
@@ -86,19 +86,19 @@ void FilterEvolution::import(FilterInfo *info)
* @param KMailRootDir The directory's root directory in KMail's folder structure.
* @param KMailSubDir The directory's direct ancestor in KMail's folder structure.
*/
-void FilterEvolution::importDirContents(FilterInfo *info, const QString& dirName, const QString& KMailRootDir, const QString& KMailSubDir)
+void FilterEvolution::importDirContents(FilterInfo *info, const TQString& dirName, const TQString& KMailRootDir, const TQString& KMailSubDir)
{
// If there is a mbox, we import it
- QDir dir(dirName);
+ TQDir dir(dirName);
if(dir.exists("mbox")) {
importMBox(info, dirName + "/mbox", KMailRootDir, KMailSubDir);
}
// If there are subfolders, we import them one by one
if(dir.exists("subfolders")) {
- QDir subfolders(dirName + "/subfolders");
- QStringList subDirs = subfolders.entryList("[^\\.]*", QDir::Dirs, QDir::Name);
- for(QStringList::Iterator filename = subDirs.begin() ; filename != subDirs.end() ; ++filename) {
- QString kSubDir;
+ TQDir subfolders(dirName + "/subfolders");
+ TQStringList subDirs = subfolders.entryList("[^\\.]*", TQDir::Dirs, TQDir::Name);
+ for(TQStringList::Iterator filename = subDirs.begin() ; filename != subDirs.end() ; ++filename) {
+ TQString kSubDir;
if(!KMailSubDir.isNull()) {
kSubDir = KMailSubDir + "/" + *filename;
} else {
@@ -116,19 +116,19 @@ void FilterEvolution::importDirContents(FilterInfo *info, const QString& dirName
* @param KMailRootDir The directory's root directory in KMail's folder structure.
* @param KMailSubDir The directory's equivalent in KMail's folder structure. *
*/
-void FilterEvolution::importMBox(FilterInfo *info, const QString& mboxName, const QString& rootDir, const QString& targetDir)
+void FilterEvolution::importMBox(FilterInfo *info, const TQString& mboxName, const TQString& rootDir, const TQString& targetDir)
{
- QFile mbox(mboxName);
+ TQFile mbox(mboxName);
bool first_msg = true;
- QString tmp_from = mboxName;
+ TQString tmp_from = mboxName;
if (!mbox.open(IO_ReadOnly)) {
info->alert(i18n("Unable to open %1, skipping").arg(mboxName));
} else {
- QFileInfo filenameInfo(mboxName);
+ TQFileInfo filenameInfo(mboxName);
info->setCurrent(0);
if( mboxName.length() > 20 ) {
- QString tmp_info = mboxName;
+ TQString tmp_info = mboxName;
tmp_info = tmp_info.replace( mailDir, ".." );
if (tmp_info.contains("subfolders/"))
tmp_info.remove("subfolders/");
@@ -137,7 +137,7 @@ void FilterEvolution::importMBox(FilterInfo *info, const QString& mboxName, cons
} else
info->setFrom(mboxName);
if(targetDir.contains("subfolders/")) {
- QString tmp_info = targetDir;
+ TQString tmp_info = targetDir;
tmp_info.remove("subfolders/");
info->setTo(tmp_info);
} else
@@ -145,19 +145,19 @@ void FilterEvolution::importMBox(FilterInfo *info, const QString& mboxName, cons
info->addLog(i18n("Importing emails from %1...").arg(tmp_from));
- QByteArray input(MAX_LINE);
+ TQByteArray input(MAX_LINE);
long l = 0;
while (!mbox.atEnd()) {
KTempFile tmp;
/* comment by Danny:
- * Don't use QTextStream to read from mbox, etter use QDataStream. QTextStream only
+ * Don't use TQTextStream to read from mbox, etter use TQDataStream. TQTextStream only
* support Unicode/Latin1/Locale. So you lost information from emails with
* charset!=Unicode/Latin1/Locale (e.g. KOI8-R) and Content-Transfer-Encoding != base64
- * (e.g. 8Bit). It also not help to convert the QTextStream to Unicode. By this you
+ * (e.g. 8Bit). It also not help to convert the TQTextStream to Unicode. By this you
* get Unicode/UTF-email but KMail can't detect the correct charset.
*/
- QCString seperate;
+ TQCString seperate;
if(!first_msg)
tmp.file()->writeBlock( input, l );
@@ -170,7 +170,7 @@ void FilterEvolution::importMBox(FilterInfo *info, const QString& mboxName, cons
tmp.close();
first_msg = false;
- QString destFolder = rootDir;
+ TQString destFolder = rootDir;
if(!targetDir.isNull()) {
destFolder = "Evolution-Import/" + destFolder + "/" + targetDir;
} else {
diff --git a/kmailcvt/filter_evolution.hxx b/kmailcvt/filter_evolution.hxx
index 159332d29..1aa5184f1 100644
--- a/kmailcvt/filter_evolution.hxx
+++ b/kmailcvt/filter_evolution.hxx
@@ -36,10 +36,10 @@ public:
void import(FilterInfo *info);
private:
- QString mailDir;
+ TQString mailDir;
- void importDirContents(FilterInfo*, const QString&, const QString&, const QString&);
- void importMBox(FilterInfo*, const QString&, const QString&, const QString&);
+ void importDirContents(FilterInfo*, const TQString&, const TQString&, const TQString&);
+ void importMBox(FilterInfo*, const TQString&, const TQString&, const TQString&);
};
#endif
diff --git a/kmailcvt/filter_evolution_v2.cxx b/kmailcvt/filter_evolution_v2.cxx
index 51ae798f2..16c3093a6 100644
--- a/kmailcvt/filter_evolution_v2.cxx
+++ b/kmailcvt/filter_evolution_v2.cxx
@@ -49,13 +49,13 @@ void FilterEvolution_v2::import(FilterInfo *info)
* We ask the user to choose Evolution's root directory.
* This should be usually ~/.evolution/mail/local/
*/
- QString evolDir = QDir::homeDirPath() + "/.evolution/mail/local";
- QDir d( evolDir );
+ TQString evolDir = TQDir::homeDirPath() + "/.evolution/mail/local";
+ TQDir d( evolDir );
if ( !d.exists() ) {
- evolDir = QDir::homeDirPath();
+ evolDir = TQDir::homeDirPath();
}
- //QString mailDir = KFileDialog::getExistingDirectory(QDir::homeDirPath(), info->parent());
+ //TQString mailDir = KFileDialog::getExistingDirectory(TQDir::homeDirPath(), info->parent());
KFileDialog *kfd;
kfd = new KFileDialog( evolDir, "", 0, "kfiledialog", true );
kfd->setMode(KFile::Directory | KFile::LocalOnly);
@@ -69,23 +69,23 @@ void FilterEvolution_v2::import(FilterInfo *info)
* If the user only select homedir no import needed because
* there should be no files and we surely import wrong files.
*/
- else if ( mailDir == QDir::homeDirPath() || mailDir == (QDir::homeDirPath() + "/")) {
+ else if ( mailDir == TQDir::homeDirPath() || mailDir == (TQDir::homeDirPath() + "/")) {
info->addLog(i18n("No files found for import."));
} else {
info->setOverall(0);
/** Recursive import of the MailArchives */
- QDir dir(mailDir);
- QStringList rootSubDirs = dir.entryList("[^\\.]*", QDir::Dirs, QDir::Name); // Removal of . and ..
+ TQDir dir(mailDir);
+ TQStringList rootSubDirs = dir.entryList("[^\\.]*", TQDir::Dirs, TQDir::Name); // Removal of . and ..
int currentDir = 1, numSubDirs = rootSubDirs.size();
- for(QStringList::Iterator dirname = rootSubDirs.begin() ; dirname != rootSubDirs.end() ; ++dirname, ++currentDir) {
+ for(TQStringList::Iterator dirname = rootSubDirs.begin() ; dirname != rootSubDirs.end() ; ++dirname, ++currentDir) {
if (info->shouldTerminate()) break;
importDirContents(info, false, dir.filePath(*dirname), *dirname, *dirname);
info->setOverall((int) ((float) currentDir / numSubDirs * 100));
}
/** import last but not least all archives from the root-dir */
- importDirContents(info, true, mailDir, QString::null, QString::null);
+ importDirContents(info, true, mailDir, TQString::null, TQString::null);
info->addLog( i18n("Finished importing emails from %1").arg( mailDir ));
if(count_duplicates > 0) {
@@ -106,18 +106,18 @@ void FilterEvolution_v2::import(FilterInfo *info)
* @param KMailSubDir The directory's direct ancestor in KMail's folder structure.
*/
void FilterEvolution_v2::importDirContents(FilterInfo *info, bool root,
- const QString& dirName, const QString& KMailRootDir, const QString& KMailSubDir)
+ const TQString& dirName, const TQString& KMailRootDir, const TQString& KMailSubDir)
{
if (info->shouldTerminate()) return;
/** Here Import all archives in the current dir */
- QDir dir(dirName);
+ TQDir dir(dirName);
- QDir importDir (dirName);
- QStringList files = importDir.entryList("[^\\.]*", QDir::Files, QDir::Name);
- for ( QStringList::Iterator mailFile = files.begin(); mailFile != files.end(); ++mailFile) {
+ TQDir importDir (dirName);
+ TQStringList files = importDir.entryList("[^\\.]*", TQDir::Files, TQDir::Name);
+ for ( TQStringList::Iterator mailFile = files.begin(); mailFile != files.end(); ++mailFile) {
if (info->shouldTerminate()) break;
- QString temp_mailfile = *mailFile;
+ TQString temp_mailfile = *mailFile;
if (temp_mailfile.endsWith(".cmeta") || temp_mailfile.endsWith(".ev-summary") || temp_mailfile.endsWith(".ev-summary-meta") ||
temp_mailfile.endsWith(".ibex.index") || temp_mailfile.endsWith(".ibex.index.data") ) {}
else {
@@ -125,16 +125,16 @@ void FilterEvolution_v2::importDirContents(FilterInfo *info, bool root,
if (!root)
importMBox(info, (dirName + "/" + temp_mailfile) , KMailRootDir, KMailSubDir);
else
- importMBox(info, dirName + temp_mailfile , temp_mailfile, QString::null);
+ importMBox(info, dirName + temp_mailfile , temp_mailfile, TQString::null);
}
}
if (!root) {
/** If there are subfolders, we import them one by one */
- QDir subfolders(dirName);
- QStringList subDirs = subfolders.entryList("[^\\.]*", QDir::Dirs, QDir::Name);
- for(QStringList::Iterator filename = subDirs.begin() ; filename != subDirs.end() ; ++filename) {
- QString kSubDir;
+ TQDir subfolders(dirName);
+ TQStringList subDirs = subfolders.entryList("[^\\.]*", TQDir::Dirs, TQDir::Name);
+ for(TQStringList::Iterator filename = subDirs.begin() ; filename != subDirs.end() ; ++filename) {
+ TQString kSubDir;
if(!KMailSubDir.isNull()) {
kSubDir = KMailSubDir + "/" + *filename;
} else {
@@ -152,18 +152,18 @@ void FilterEvolution_v2::importDirContents(FilterInfo *info, bool root,
* @param KMailRootDir The directory's root directory in KMail's folder structure.
* @param KMailSubDir The directory's equivalent in KMail's folder structure. *
*/
-void FilterEvolution_v2::importMBox(FilterInfo *info, const QString& mboxName, const QString& rootDir, const QString& targetDir)
+void FilterEvolution_v2::importMBox(FilterInfo *info, const TQString& mboxName, const TQString& rootDir, const TQString& targetDir)
{
- QFile mbox(mboxName);
+ TQFile mbox(mboxName);
bool first_msg = true;
if (!mbox.open(IO_ReadOnly)) {
info->alert(i18n("Unable to open %1, skipping").arg(mboxName));
} else {
- QFileInfo filenameInfo(mboxName);
+ TQFileInfo filenameInfo(mboxName);
info->setCurrent(0);
if( mboxName.length() > 20 ) {
- QString tmp_info = mboxName;
+ TQString tmp_info = mboxName;
tmp_info = tmp_info.replace( mailDir, "../" );
if (tmp_info.contains(".sbd"))
tmp_info.remove(".sbd");
@@ -171,26 +171,26 @@ void FilterEvolution_v2::importMBox(FilterInfo *info, const QString& mboxName, c
} else
info->setFrom(mboxName);
if(targetDir.contains(".sbd")) {
- QString tmp_info = targetDir;
+ TQString tmp_info = targetDir;
tmp_info.remove(".sbd");
info->setTo(tmp_info);
} else
info->setTo(targetDir);
- QByteArray input(MAX_LINE);
+ TQByteArray input(MAX_LINE);
long l = 0;
while (!mbox.atEnd()) {
KTempFile tmp;
/** @todo check if the file is really a mbox, maybe search for 'from' string at start */
/* comment by Danny:
- * Don't use QTextStream to read from mbox, etter use QDataStream. QTextStream only
+ * Don't use TQTextStream to read from mbox, etter use TQDataStream. TQTextStream only
* support Unicode/Latin1/Locale. So you lost information from emails with
* charset!=Unicode/Latin1/Locale (e.g. KOI8-R) and Content-Transfer-Encoding != base64
- * (e.g. 8Bit). It also not help to convert the QTextStream to Unicode. By this you
+ * (e.g. 8Bit). It also not help to convert the TQTextStream to Unicode. By this you
* get Unicode/UTF-email but KMail can't detect the correct charset.
*/
- QCString seperate;
+ TQCString seperate;
if(!first_msg)
tmp.file()->writeBlock( input, l );
@@ -203,8 +203,8 @@ void FilterEvolution_v2::importMBox(FilterInfo *info, const QString& mboxName, c
tmp.close();
first_msg = false;
- QString destFolder;
- QString _targetDir = targetDir;
+ TQString destFolder;
+ TQString _targetDir = targetDir;
if(!targetDir.isNull()) {
if(_targetDir.contains(".sbd"))
_targetDir.remove(".sbd");
diff --git a/kmailcvt/filter_evolution_v2.hxx b/kmailcvt/filter_evolution_v2.hxx
index a0e297959..da58b4fe2 100644
--- a/kmailcvt/filter_evolution_v2.hxx
+++ b/kmailcvt/filter_evolution_v2.hxx
@@ -34,10 +34,10 @@ public:
void import(FilterInfo *info);
private:
- QString mailDir;
+ TQString mailDir;
- void importDirContents(FilterInfo*, bool, const QString&, const QString&, const QString&);
- void importMBox(FilterInfo*, const QString&, const QString&, const QString&);
+ void importDirContents(FilterInfo*, bool, const TQString&, const TQString&, const TQString&);
+ void importMBox(FilterInfo*, const TQString&, const TQString&, const TQString&);
};
#endif
diff --git a/kmailcvt/filter_kmail_maildir.cxx b/kmailcvt/filter_kmail_maildir.cxx
index 02b21f600..5ea7d4fc7 100644
--- a/kmailcvt/filter_kmail_maildir.cxx
+++ b/kmailcvt/filter_kmail_maildir.cxx
@@ -45,7 +45,7 @@ FilterKMail_maildir::~FilterKMail_maildir( void )
void FilterKMail_maildir::import( FilterInfo *info )
{
- QString _homeDir = QDir::homeDirPath();
+ TQString _homeDir = TQDir::homeDirPath();
KFileDialog *kfd;
kfd = new KFileDialog( _homeDir, "", 0, "kfiledialog", true );
@@ -60,16 +60,16 @@ void FilterKMail_maildir::import( FilterInfo *info )
* If the user only select homedir no import needed because
* there should be no files and we surely import wrong files.
*/
- else if ( mailDir == QDir::homeDirPath() || mailDir == ( QDir::homeDirPath() + "/" ) ) {
+ else if ( mailDir == TQDir::homeDirPath() || mailDir == ( TQDir::homeDirPath() + "/" ) ) {
info->addLog( i18n( "No files found for import." ) );
} else {
info->setOverall(0);
/** Recursive import of the MailArchives */
- QDir dir(mailDir);
- QStringList rootSubDirs = dir.entryList("*", QDir::Dirs | QDir::Hidden, QDir::Name);
+ TQDir dir(mailDir);
+ TQStringList rootSubDirs = dir.entryList("*", TQDir::Dirs | TQDir::Hidden, TQDir::Name);
int currentDir = 1, numSubDirs = rootSubDirs.size();
- for(QStringList::Iterator filename = rootSubDirs.begin() ; filename != rootSubDirs.end() ; ++filename, ++currentDir) {
+ for(TQStringList::Iterator filename = rootSubDirs.begin() ; filename != rootSubDirs.end() ; ++filename, ++currentDir) {
if(info->shouldTerminate()) break;
if(!(*filename == "." || *filename == "..")) {
info->setCurrent(0);
@@ -95,7 +95,7 @@ void FilterKMail_maildir::import( FilterInfo *info )
* @param info Information storage for the operation.
* @param dirName The name of the directory to import.
*/
-void FilterKMail_maildir::importDirContents( FilterInfo *info, const QString& dirName)
+void FilterKMail_maildir::importDirContents( FilterInfo *info, const TQString& dirName)
{
/** Here Import all archives in the current dir */
@@ -103,9 +103,9 @@ void FilterKMail_maildir::importDirContents( FilterInfo *info, const QString& di
/** If there are subfolders, we import them one by one */
- QDir subfolders(dirName);
- QStringList subDirs = subfolders.entryList("*", QDir::Dirs | QDir::Hidden, QDir::Name);
- for(QStringList::Iterator filename = subDirs.begin() ; filename != subDirs.end() ; ++filename) {
+ TQDir subfolders(dirName);
+ TQStringList subDirs = subfolders.entryList("*", TQDir::Dirs | TQDir::Hidden, TQDir::Name);
+ for(TQStringList::Iterator filename = subDirs.begin() ; filename != subDirs.end() ; ++filename) {
if(info->shouldTerminate()) return;
if(!(*filename == "." || *filename == "..")) {
importDirContents(info, subfolders.filePath(*filename));
@@ -119,20 +119,20 @@ void FilterKMail_maildir::importDirContents( FilterInfo *info, const QString& di
* @param info Information storage for the operation.
* @param fileName The full path to the file to import
*/
-QString FilterKMail_maildir::getMessageFlags( FilterInfo *info, const QString& fileName ) {
+TQString FilterKMail_maildir::getMessageFlags( FilterInfo *info, const TQString& fileName ) {
- QString status_flag = "";
+ TQString status_flag = "";
- QFile mailfile( fileName );
+ TQFile mailfile( fileName );
if (! mailfile.open( IO_ReadOnly ) ) {
info->alert( i18n("Unable to open %1, skipping").arg( fileName ) );
return status_flag;
} else {
- QByteArray input(MAX_LINE);
+ TQByteArray input(MAX_LINE);
while ( !mailfile.atEnd() && status_flag.isEmpty()) {
- QCString seperate;
+ TQCString seperate;
while ( ! mailfile.atEnd() && mailfile.readLine(input.data(),MAX_LINE) ) {
@@ -156,30 +156,30 @@ QString FilterKMail_maildir::getMessageFlags( FilterInfo *info, const QString& f
* @param info Information storage for the operation.
* @param dirName The name of the directory to import.
*/
-void FilterKMail_maildir::importFiles( FilterInfo *info, const QString& dirName)
+void FilterKMail_maildir::importFiles( FilterInfo *info, const TQString& dirName)
{
- QDir dir(dirName);
- QString _path;
+ TQDir dir(dirName);
+ TQString _path;
bool generatedPath = false;
- QDir importDir (dirName);
- QStringList files = importDir.entryList("[^\\.]*", QDir::Files, QDir::Name);
+ TQDir importDir (dirName);
+ TQStringList files = importDir.entryList("[^\\.]*", TQDir::Files, TQDir::Name);
int currentFile = 1, numFiles = files.size();
- for ( QStringList::Iterator mailFile = files.begin(); mailFile != files.end(); ++mailFile, ++currentFile) {
+ for ( TQStringList::Iterator mailFile = files.begin(); mailFile != files.end(); ++mailFile, ++currentFile) {
if(info->shouldTerminate()) return;
- QString temp_mailfile = *mailFile;
+ TQString temp_mailfile = *mailFile;
if (!(temp_mailfile.endsWith(".index") || temp_mailfile.endsWith(".index.ids") ||
temp_mailfile.endsWith(".index.sorted") || temp_mailfile.endsWith(".uidcache") )) {
if(!generatedPath) {
_path = "KMail-Import";
- QString _tmp = dir.filePath(*mailFile);
+ TQString _tmp = dir.filePath(*mailFile);
_tmp = _tmp.remove( mailDir ,TRUE);
- QStringList subFList = QStringList::split("/",_tmp,FALSE);
- for ( QStringList::Iterator it = subFList.begin(); it != subFList.end(); ++it ) {
- QString _cat = *it;
+ TQStringList subFList = TQStringList::split("/",_tmp,FALSE);
+ for ( TQStringList::Iterator it = subFList.begin(); it != subFList.end(); ++it ) {
+ TQString _cat = *it;
if(!(_cat == *mailFile)) {
if(_cat.startsWith(".") && _cat.endsWith(".directory")) {
_cat.remove(0,1);
@@ -192,14 +192,14 @@ void FilterKMail_maildir::importFiles( FilterInfo *info, const QString& dirName)
}
if(_path.endsWith("cur"))
_path.remove(_path.length() - 4 , 4);
- QString _info = _path;
+ TQString _info = _path;
info->addLog(i18n("Import folder %1...").arg(_info.remove(0,12)));
info->setFrom(_info);
info->setTo(_path);
generatedPath = true;
}
- QString msg_flag = getMessageFlags(info, dir.filePath(*mailFile));
+ TQString msg_flag = getMessageFlags(info, dir.filePath(*mailFile));
if(info->removeDupMsg) {
if(! addMessage( info, _path, dir.filePath(*mailFile), msg_flag )) {
diff --git a/kmailcvt/filter_kmail_maildir.hxx b/kmailcvt/filter_kmail_maildir.hxx
index 3ab082b4c..66f444907 100644
--- a/kmailcvt/filter_kmail_maildir.hxx
+++ b/kmailcvt/filter_kmail_maildir.hxx
@@ -32,12 +32,12 @@ public:
void import(FilterInfo *info);
private:
- QString mailDir;
+ TQString mailDir;
- QString getMessageFlags(FilterInfo*, const QString&);
+ TQString getMessageFlags(FilterInfo*, const TQString&);
- void importDirContents(FilterInfo*, const QString&);
- void importFiles(FilterInfo*, const QString&);
+ void importDirContents(FilterInfo*, const TQString&);
+ void importFiles(FilterInfo*, const TQString&);
};
#endif
diff --git a/kmailcvt/filter_lnotes.cxx b/kmailcvt/filter_lnotes.cxx
index 3ded11abf..69a48167a 100644
--- a/kmailcvt/filter_lnotes.cxx
+++ b/kmailcvt/filter_lnotes.cxx
@@ -21,7 +21,7 @@
#include <kfiledialog.h>
#include <ktempfile.h>
#include <kdebug.h>
-#include <qfileinfo.h>
+#include <tqfileinfo.h>
#include "filter_lnotes.hxx"
@@ -53,13 +53,13 @@ void FilterLNotes::import(FilterInfo *info) {
currentFile = 1;
totalFiles = 0;
- QStringList filenames = KFileDialog::getOpenFileNames( QDir::homeDirPath(), "*|" + i18n("All Files (*)"),
+ TQStringList filenames = KFileDialog::getOpenFileNames( TQDir::homeDirPath(), "*|" + i18n("All Files (*)"),
inf->parent() );
totalFiles = filenames.count();
inf->setOverall(0);
// See filter_mbox.cxx for better reference.
- for ( QStringList::Iterator filename = filenames.begin(); filename != filenames.end(); ++filename ) {
+ for ( TQStringList::Iterator filename = filenames.begin(); filename != filenames.end(); ++filename ) {
++currentFile;
info->addLog( i18n("Importing emails from %1").arg(*filename) );
@@ -74,7 +74,7 @@ void FilterLNotes::import(FilterInfo *info) {
* Import the files within a Folder.
* @param file The name of the file to import.
*/
-void FilterLNotes::ImportLNotes(const QString& file) {
+void FilterLNotes::ImportLNotes(const TQString& file) {
// See Filter_pmail.cxx for better reference
@@ -83,7 +83,7 @@ void FilterLNotes::ImportLNotes(const QString& file) {
// The Message ends with a 0c character
// open the message
- QFile f(file);
+ TQFile f(file);
if (! f.open( IO_ReadOnly ) ) {
inf->alert( i18n("Unable to open %1, skipping").arg( file ) );
@@ -95,8 +95,8 @@ void FilterLNotes::ImportLNotes(const QString& file) {
KTempFile *tempfile = 0;
// Get folder name
- QFileInfo filenameInfo( file );
- QString folder("LNotes-Import/" + filenameInfo.baseName(TRUE));
+ TQFileInfo filenameInfo( file );
+ TQString folder("LNotes-Import/" + filenameInfo.baseName(TRUE));
inf->setTo(folder);
// State machine to read the data in. The fgetc usage is probably terribly slow ...
diff --git a/kmailcvt/filter_lnotes.hxx b/kmailcvt/filter_lnotes.hxx
index cb36273ea..709fa6ce2 100644
--- a/kmailcvt/filter_lnotes.hxx
+++ b/kmailcvt/filter_lnotes.hxx
@@ -34,7 +34,7 @@ public:
private:
/** the working directory */
- QDir dir;
+ TQDir dir;
/** Our Filterinfo stuff... important methods for getting the email imported */
FilterInfo * inf;
/** which file (of totalFiles) is now in the work? */
@@ -46,7 +46,7 @@ private:
* This is were all the real action is gonna be handled.
* Gets called once for EACH file imported
*/
- void ImportLNotes(const QString& file);
+ void ImportLNotes(const TQString& file);
};
diff --git a/kmailcvt/filter_mailapp.cxx b/kmailcvt/filter_mailapp.cxx
index c6f45ced0..2121badb0 100644
--- a/kmailcvt/filter_mailapp.cxx
+++ b/kmailcvt/filter_mailapp.cxx
@@ -46,7 +46,7 @@ void FilterMailApp::import(FilterInfo *info)
int overall_status = 0;
bool first_msg = true;
- QString directory = KFileDialog::getExistingDirectory( QDir::homeDirPath(), info->parent() );
+ TQString directory = KFileDialog::getExistingDirectory( TQDir::homeDirPath(), info->parent() );
//qDebug("starting by looking in directory: %s", directory.latin1());
if ( directory.isEmpty() ) {
@@ -56,35 +56,35 @@ void FilterMailApp::import(FilterInfo *info)
info->setOverall(0);
traverseDirectory(info, directory);
- for ( QStringList::Iterator filename = mMboxFiles.begin(); filename != mMboxFiles.end(); ++filename, ++currentFile) {
+ for ( TQStringList::Iterator filename = mMboxFiles.begin(); filename != mMboxFiles.end(); ++filename, ++currentFile) {
if ( info->shouldTerminate() ) break;
- QFile mbox( *filename );
+ TQFile mbox( *filename );
if (! mbox.open( IO_ReadOnly ) ) {
info->alert( i18n("Unable to open %1, skipping").arg( *filename ) );
} else {
- QFileInfo filenameInfo( *filename );
+ TQFileInfo filenameInfo( *filename );
kdDebug() << "importing filename " << *filename << endl;
- QStringList name = QStringList::split("/", *filename);
- QString folderName(name[name.count() - 2]);
+ TQStringList name = TQStringList::split("/", *filename);
+ TQString folderName(name[name.count() - 2]);
info->setCurrent(0);
info->addLog( i18n("Importing emails from %1...").arg( *filename ) );
info->setFrom( *filename );
info->setTo( folderName );
- QByteArray input(MAX_LINE);
+ TQByteArray input(MAX_LINE);
long l = 0;
while ( ! mbox.atEnd() ) {
KTempFile tmp;
/* comment by Danny:
- * Don't use QTextStream to read from mbox, etter use QDataStream. QTextStream only
+ * Don't use TQTextStream to read from mbox, etter use TQDataStream. TQTextStream only
* support Unicode/Latin1/Locale. So you lost information from emails with
* charset!=Unicode/Latin1/Locale (e.g. KOI8-R) and Content-Transfer-Encoding != base64
- * (e.g. 8Bit). It also not help to convert the QTextStream to Unicode. By this you
+ * (e.g. 8Bit). It also not help to convert the TQTextStream to Unicode. By this you
* get Unicode/UTF-email but KMail can't detect the correct charset.
*/
- QCString seperate;
+ TQCString seperate;
if(!first_msg)
tmp.file()->writeBlock( input, l );
@@ -140,14 +140,14 @@ void FilterMailApp::import(FilterInfo *info)
info->setOverall(100);
}
-void FilterMailApp::traverseDirectory(FilterInfo *info, const QString &dirName)
+void FilterMailApp::traverseDirectory(FilterInfo *info, const TQString &dirName)
{
- QDir dir(dirName);
- dir.setFilter(QDir::Dirs | QDir::Files);
+ TQDir dir(dirName);
+ dir.setFilter(TQDir::Dirs | TQDir::Files);
const QFileInfoList *fileinfolist = dir.entryInfoList();
QFileInfoListIterator it(*fileinfolist);
- QFileInfo *fi;
+ TQFileInfo *fi;
if ( info->shouldTerminate() ) return;
diff --git a/kmailcvt/filter_mailapp.hxx b/kmailcvt/filter_mailapp.hxx
index 83ad1937c..571f77ff0 100644
--- a/kmailcvt/filter_mailapp.hxx
+++ b/kmailcvt/filter_mailapp.hxx
@@ -29,8 +29,8 @@ public:
void import(FilterInfo *info);
private:
- QStringList mMboxFiles;
- void traverseDirectory(FilterInfo *info, const QString &);
+ TQStringList mMboxFiles;
+ void traverseDirectory(FilterInfo *info, const TQString &);
};
#endif
diff --git a/kmailcvt/filter_mbox.cxx b/kmailcvt/filter_mbox.cxx
index 4692f7fdc..3777cd7e9 100644
--- a/kmailcvt/filter_mbox.cxx
+++ b/kmailcvt/filter_mbox.cxx
@@ -46,16 +46,16 @@ void FilterMBox::import(FilterInfo *info)
int overall_status = 0;
bool first_msg = true;
- QStringList filenames = KFileDialog::getOpenFileNames( QDir::homeDirPath(), "*|" + i18n("mbox Files (*)"), info->parent() );
+ TQStringList filenames = KFileDialog::getOpenFileNames( TQDir::homeDirPath(), "*|" + i18n("mbox Files (*)"), info->parent() );
info->setOverall(0);
- for ( QStringList::Iterator filename = filenames.begin(); filename != filenames.end(); ++filename, ++currentFile) {
- QFile mbox( *filename );
+ for ( TQStringList::Iterator filename = filenames.begin(); filename != filenames.end(); ++filename, ++currentFile) {
+ TQFile mbox( *filename );
if (! mbox.open( IO_ReadOnly ) ) {
info->alert( i18n("Unable to open %1, skipping").arg( *filename ) );
} else {
- QFileInfo filenameInfo( *filename );
- QString folderName( "MBOX-" + filenameInfo.baseName(TRUE) );
+ TQFileInfo filenameInfo( *filename );
+ TQString folderName( "MBOX-" + filenameInfo.baseName(TRUE) );
info->setCurrent(0);
info->addLog( i18n("Importing emails from %1...").arg( *filename ) );
@@ -63,21 +63,21 @@ void FilterMBox::import(FilterInfo *info)
info->setFrom( *filename );
info->setTo( folderName );
- QByteArray input(MAX_LINE);
+ TQByteArray input(MAX_LINE);
long l = 0;
while ( ! mbox.atEnd() ) {
KTempFile tmp;
- QIODevice::Offset filepos = 0;
+ TQIODevice::Offset filepos = 0;
/* comment by Danny:
- * Don't use QTextStream to read from mbox, better use QDataStream. QTextStream only
+ * Don't use TQTextStream to read from mbox, better use TQDataStream. TQTextStream only
* support Unicode/Latin1/Locale. So you lost information from emails with
* charset!=Unicode/Latin1/Locale (e.g. KOI8-R) and Content-Transfer-Encoding != base64
- * (e.g. 8Bit). It also not help to convert the QTextStream to Unicode. By this you
+ * (e.g. 8Bit). It also not help to convert the TQTextStream to Unicode. By this you
* get Unicode/UTF-email but KMail can't detect the correct charset.
*/
- QCString seperate;
- QString x_status_flag = "";
+ TQCString seperate;
+ TQString x_status_flag = "";
/* check if the first line start with "From " (and not "From: ") and discard the line
* in this case because some IMAP servers (e.g. Cyrus) don't accept this header line */
diff --git a/kmailcvt/filter_oe.cxx b/kmailcvt/filter_oe.cxx
index 8092b299d..e1465d141 100644
--- a/kmailcvt/filter_oe.cxx
+++ b/kmailcvt/filter_oe.cxx
@@ -56,14 +56,14 @@ FilterOE::~FilterOE()
void FilterOE::import(FilterInfo *info)
{
// Select directory containing plain text emails
- mailDir = KFileDialog::getExistingDirectory(QDir::homeDirPath(),info->parent());
+ mailDir = KFileDialog::getExistingDirectory(TQDir::homeDirPath(),info->parent());
if (mailDir.isEmpty()) { // No directory selected
info->alert(i18n("No directory selected."));
return;
}
- QDir dir (mailDir);
- QStringList files = dir.entryList("*.[dDmM][bB][xX]", QDir::Files, QDir::Name);
+ TQDir dir (mailDir);
+ TQStringList files = dir.entryList("*.[dDmM][bB][xX]", TQDir::Files, TQDir::Name);
if (files.isEmpty()) {
info->alert(i18n("No Outlook Express mailboxes found in directory %1.").arg(mailDir));
return;
@@ -78,12 +78,12 @@ void FilterOE::import(FilterInfo *info)
info->setOverall(0);
/** search the folderfile to recreate folder struct */
- for ( QStringList::Iterator mailFile = files.begin(); mailFile != files.end(); ++mailFile ) {
+ for ( TQStringList::Iterator mailFile = files.begin(); mailFile != files.end(); ++mailFile ) {
if(*mailFile == "Folders.dbx") {
info->addLog(i18n("Import folder structure..."));
importMailBox(info, dir.filePath(*mailFile));
if(!folderStructure.isEmpty()) parsedFolder = true;
- // remove file from QStringList::files, no longer needed
+ // remove file from TQStringList::files, no longer needed
files.remove(mailFile);
currentIsFolderFile = false;
break;
@@ -91,7 +91,7 @@ void FilterOE::import(FilterInfo *info)
}
int n=0;
- for ( QStringList::Iterator mailFile = files.begin(); mailFile != files.end(); ++mailFile ) {
+ for ( TQStringList::Iterator mailFile = files.begin(); mailFile != files.end(); ++mailFile ) {
if ( info->shouldTerminate() ) break;
importMailBox(info, dir.filePath(*mailFile));
info->setOverall(100 * ++n / files.count());
@@ -107,11 +107,11 @@ void FilterOE::import(FilterInfo *info)
kdDebug() << "0x04 Mails: " << count0x04 << endl;
}
-void FilterOE::importMailBox( FilterInfo *info, const QString& fileName)
+void FilterOE::importMailBox( FilterInfo *info, const TQString& fileName)
{
- QFile mailfile(fileName);
- QFileInfo mailfileinfo(fileName);
- QString _nameOfFile = fileName;
+ TQFile mailfile(fileName);
+ TQFileInfo mailfileinfo(fileName);
+ TQString _nameOfFile = fileName;
_nameOfFile.remove( mailDir );
_nameOfFile.remove( "/" );
info->setFrom(mailfileinfo.fileName());
@@ -120,8 +120,8 @@ void FilterOE::importMailBox( FilterInfo *info, const QString& fileName)
info->addLog(i18n("Unable to open mailbox %1").arg(fileName));
return;
}
- QDataStream mailbox(&mailfile);
- mailbox.setByteOrder(QDataStream::LittleEndian);
+ TQDataStream mailbox(&mailfile);
+ mailbox.setByteOrder(TQDataStream::LittleEndian);
// Parse magic
Q_UINT32 sig_block1, sig_block2;
@@ -139,7 +139,7 @@ void FilterOE::importMailBox( FilterInfo *info, const QString& fileName)
if (sig_block2 == OE5_EMAIL_SIG_2) {
folderName = "OE-Import/" + mailfileinfo.baseName(TRUE);
if(parsedFolder) {
- QString _tmpFolder = getFolderName(_nameOfFile);
+ TQString _tmpFolder = getFolderName(_nameOfFile);
if(!_tmpFolder.isEmpty()) folderName = "OE-Import/" + _tmpFolder;
}
info->addLog(i18n("Importing OE5+ Mailbox %1").arg( "../" + _nameOfFile));
@@ -162,7 +162,7 @@ void FilterOE::importMailBox( FilterInfo *info, const QString& fileName)
/* ------------------- MBX support ------------------- */
-void FilterOE::mbxImport( FilterInfo *info, QDataStream& ds)
+void FilterOE::mbxImport( FilterInfo *info, TQDataStream& ds)
{
Q_UINT32 msgCount, lastMsgNum, fileSize;
@@ -179,7 +179,7 @@ void FilterOE::mbxImport( FilterInfo *info, QDataStream& ds)
while (!ds.atEnd()) {
Q_UINT32 msgNumber, msgSize, msgTextSize;
KTempFile tmp;
- tmp.dataStream()->setByteOrder(QDataStream::LittleEndian);
+ tmp.dataStream()->setByteOrder(TQDataStream::LittleEndian);
// Read the messages
ds >> msgNumber >> msgSize >> msgTextSize; // All seem to be lies...?
@@ -209,7 +209,7 @@ void FilterOE::mbxImport( FilterInfo *info, QDataStream& ds)
/* ------------------- DBX support ------------------- */
-void FilterOE::dbxImport( FilterInfo *info, QDataStream& ds)
+void FilterOE::dbxImport( FilterInfo *info, TQDataStream& ds)
{
// Get item count & offset of index
Q_UINT32 itemCount, indexPtr;
@@ -228,7 +228,7 @@ void FilterOE::dbxImport( FilterInfo *info, QDataStream& ds)
dbxReadIndex(info, ds, indexPtr);
}
-void FilterOE::dbxReadIndex( FilterInfo *info, QDataStream& ds, int filePos)
+void FilterOE::dbxReadIndex( FilterInfo *info, TQDataStream& ds, int filePos)
{
if(info->shouldTerminate()) return;
@@ -264,14 +264,14 @@ void FilterOE::dbxReadIndex( FilterInfo *info, QDataStream& ds, int filePos)
ds.device()->at(wasAt); // Restore file position to same as when function called
}
-void FilterOE::dbxReadDataBlock( FilterInfo *info, QDataStream& ds, int filePos)
+void FilterOE::dbxReadDataBlock( FilterInfo *info, TQDataStream& ds, int filePos)
{
Q_UINT32 curOffset, blockSize;
Q_UINT16 unknown;
Q_UINT8 count, unknown2;
int wasAt = ds.device()->at();
- QString folderEntry[4];
+ TQString folderEntry[4];
ds.device()->at(filePos);
@@ -314,11 +314,11 @@ void FilterOE::dbxReadDataBlock( FilterInfo *info, QDataStream& ds, int filePos)
} else if (type == 0x80) {
// kdDebug() << "**** FOLDER: current ID ****" << endl;
- folderEntry[2] = QString::number(value);
+ folderEntry[2] = TQString::number(value);
} else if (type == 0x81) {
// kdDebug() << "**** FOLDER: parent ID ****" << endl;
- folderEntry[3] = QString::number(value);
+ folderEntry[3] = TQString::number(value);
}
}
}
@@ -328,7 +328,7 @@ void FilterOE::dbxReadDataBlock( FilterInfo *info, QDataStream& ds, int filePos)
ds.device()->at(wasAt); // Restore file position to same as when function called
}
-void FilterOE::dbxReadEmail( FilterInfo *info, QDataStream& ds, int filePos)
+void FilterOE::dbxReadEmail( FilterInfo *info, TQDataStream& ds, int filePos)
{
if(info->shouldTerminate()) return;
Q_UINT32 self, nextAddressOffset, nextAddress=0;
@@ -341,7 +341,7 @@ void FilterOE::dbxReadEmail( FilterInfo *info, QDataStream& ds, int filePos)
do {
ds >> self >> nextAddressOffset >> blockSize >> intCount >> unknown >> nextAddress; // _dbx_block_hdrstruct
- QByteArray blockBuffer(blockSize);
+ TQByteArray blockBuffer(blockSize);
ds.readRawBytes(blockBuffer.data(), blockSize);
tmp.dataStream()->writeRawBytes(blockBuffer.data(), blockSize);
// to detect incomplete mails or corrupted archives. See Bug #86119
@@ -368,10 +368,10 @@ void FilterOE::dbxReadEmail( FilterInfo *info, QDataStream& ds, int filePos)
}
/* ------------------- FolderFile support ------------------- */
-QString FilterOE::parseFolderString( QDataStream& ds, int filePos )
+TQString FilterOE::parseFolderString( TQDataStream& ds, int filePos )
{
char tmp;
- QString returnString;
+ TQString returnString;
int wasAt = ds.device()->at();
ds.device()->at(filePos);
@@ -388,36 +388,36 @@ QString FilterOE::parseFolderString( QDataStream& ds, int filePos )
}
/** get the foldername for a given file ID from folderMatrix */
-QString FilterOE::getFolderName(QString filename)
+TQString FilterOE::getFolderName(TQString filename)
{
bool found = false;
bool foundFilename = false;
- QString folder;
+ TQString folder;
// we must do this because folder with more than one upper letter
// at start have maybe not a file named like the folder !!!
- QString search = filename.lower();
+ TQString search = filename.lower();
while (!found)
{
for ( FolderStructureIterator it = folderStructure.begin(); it != folderStructure.end(); it++) {
FolderStructure tmp = *it;
if(foundFilename == false) {
- QString _tmpFileName = tmp[1];
+ TQString _tmpFileName = tmp[1];
_tmpFileName = _tmpFileName.lower();
if(_tmpFileName == search) {
- folder.prepend( tmp[0] + QString::fromLatin1("/") );
+ folder.prepend( tmp[0] + TQString::fromLatin1("/") );
search = tmp[3];
foundFilename = true;
}
} else {
- QString _currentID = tmp[2];
- QString _parentID = tmp[3];
+ TQString _currentID = tmp[2];
+ TQString _parentID = tmp[3];
if(_currentID == search) {
if(_parentID.isEmpty()) { // this is the root of the folder
found = true;
break;
} else {
- folder.prepend( tmp[0] + QString::fromLatin1("/") );
+ folder.prepend( tmp[0] + TQString::fromLatin1("/") );
search = tmp[3];
}
}
diff --git a/kmailcvt/filter_oe.hxx b/kmailcvt/filter_oe.hxx
index 348b29ff4..821aa5dfa 100644
--- a/kmailcvt/filter_oe.hxx
+++ b/kmailcvt/filter_oe.hxx
@@ -34,16 +34,16 @@ public:
void import(FilterInfo *info);
protected:
- void importMailBox( FilterInfo *info, const QString& fileName);
- void mbxImport( FilterInfo *info, QDataStream& ds);
- void dbxImport( FilterInfo *info, QDataStream& ds);
- void dbxReadIndex( FilterInfo *info, QDataStream& ds, int filePos);
- void dbxReadDataBlock( FilterInfo *info, QDataStream& ds, int filePos);
- void dbxReadEmail( FilterInfo *info, QDataStream& ds, int filePos);
+ void importMailBox( FilterInfo *info, const TQString& fileName);
+ void mbxImport( FilterInfo *info, TQDataStream& ds);
+ void dbxImport( FilterInfo *info, TQDataStream& ds);
+ void dbxReadIndex( FilterInfo *info, TQDataStream& ds, int filePos);
+ void dbxReadDataBlock( FilterInfo *info, TQDataStream& ds, int filePos);
+ void dbxReadEmail( FilterInfo *info, TQDataStream& ds, int filePos);
/** helperfunctions for folder structure support */
- QString parseFolderString( QDataStream& ds, int filePos);
- QString getFolderName(QString filename);
+ TQString parseFolderString( TQDataStream& ds, int filePos);
+ TQString getFolderName(TQString filename);
private: // Private methods
/** which file (of totalFiles) is now in the work? */
@@ -72,13 +72,13 @@ private: // Private methods
*/
typedef FolderStructureBase<4> FolderStructure;
/** matrix with information about the folder structure*/
- QValueList<FolderStructure> folderStructure;
- typedef QValueList<FolderStructure>::Iterator FolderStructureIterator;
+ TQValueList<FolderStructure> folderStructure;
+ typedef TQValueList<FolderStructure>::Iterator FolderStructureIterator;
/** name of the current folder */
- QString folderName;
+ TQString folderName;
/** name of the chosen folder */
- QString mailDir;
+ TQString mailDir;
};
#endif
diff --git a/kmailcvt/filter_opera.cxx b/kmailcvt/filter_opera.cxx
index 5d0882d9b..3b2fff176 100644
--- a/kmailcvt/filter_opera.cxx
+++ b/kmailcvt/filter_opera.cxx
@@ -43,18 +43,18 @@ FilterOpera::~FilterOpera()
void FilterOpera::import(FilterInfo *info)
{
/** try to go to opera mailfolder in the home of the user */
- QString startdir = QDir::homeDirPath() + "/.opera/mail/store/";
- QDir d( startdir );
+ TQString startdir = TQDir::homeDirPath() + "/.opera/mail/store/";
+ TQDir d( startdir );
if ( !d.exists() ) {
- startdir = QDir::homeDirPath();
+ startdir = TQDir::homeDirPath();
}
- //QString mailDir = KFileDialog::getExistingDirectory(QDir::homeDirPath(), info->parent());
+ //TQString mailDir = KFileDialog::getExistingDirectory(TQDir::homeDirPath(), info->parent());
KFileDialog *kfd;
kfd = new KFileDialog( startdir, "", 0, "kfiledialog", true );
kfd->setMode(KFile::Directory | KFile::LocalOnly);
kfd->exec();
- QString operaDir = kfd->selectedFile();
+ TQString operaDir = kfd->selectedFile();
if (operaDir.isEmpty()) {
info->alert(i18n("No directory selected."));
@@ -63,13 +63,13 @@ void FilterOpera::import(FilterInfo *info)
* If the user only select homedir no import needed because
* there should be no files and we surely import wrong files.
*/
- else if ( operaDir == QDir::homeDirPath() || operaDir == (QDir::homeDirPath() + "/")) {
+ else if ( operaDir == TQDir::homeDirPath() || operaDir == (TQDir::homeDirPath() + "/")) {
info->addLog(i18n("No files found for import."));
} else {
info->setOverall(0);
- QDir importDir (operaDir);
- QStringList files = importDir.entryList("*.[mM][bB][sS]", QDir::Files, QDir::Name);
+ TQDir importDir (operaDir);
+ TQStringList files = importDir.entryList("*.[mM][bB][sS]", TQDir::Files, TQDir::Name);
// Count total number of files to be processed
info->addLog(i18n("Counting files..."));
@@ -80,33 +80,33 @@ void FilterOpera::import(FilterInfo *info)
int overall_status = 0;
info->addLog(i18n("Importing new mail files..."));
- for ( QStringList::Iterator mailFile = files.begin(); mailFile != files.end(); ++mailFile) {
+ for ( TQStringList::Iterator mailFile = files.begin(); mailFile != files.end(); ++mailFile) {
info->setCurrent(0);
- QFile operaArchiv( importDir.filePath(*mailFile) );
+ TQFile operaArchiv( importDir.filePath(*mailFile) );
if (! operaArchiv.open( IO_ReadOnly ) ) {
info->alert( i18n("Unable to open %1, skipping").arg( *mailFile ) );
} else {
info->addLog( i18n("Importing emails from %1...").arg( *mailFile ) );
- QFileInfo filenameInfo( importDir.filePath(*mailFile) );
- QString folderName( "OPERA-" + importDir.dirName() );
+ TQFileInfo filenameInfo( importDir.filePath(*mailFile) );
+ TQString folderName( "OPERA-" + importDir.dirName() );
info->setFrom( *mailFile );
info->setTo( folderName );
- QByteArray input(MAX_LINE);
+ TQByteArray input(MAX_LINE);
long l = 0;
bool first_msg = true;
while ( !operaArchiv.atEnd() ) {
KTempFile tmp;
/* comment by Danny:
- * Don't use QTextStream to read from mbox, etter use QDataStream. QTextStream only
+ * Don't use TQTextStream to read from mbox, etter use TQDataStream. TQTextStream only
* support Unicode/Latin1/Locale. So you lost information from emails with
* charset!=Unicode/Latin1/Locale (e.g. KOI8-R) and Content-Transfer-Encoding != base64
- * (e.g. 8Bit). It also not help to convert the QTextStream to Unicode. By this you
+ * (e.g. 8Bit). It also not help to convert the TQTextStream to Unicode. By this you
* get Unicode/UTF-email but KMail can't detect the correct charset.
*/
- QCString seperate;
+ TQCString seperate;
if(!first_msg)
tmp.file()->writeBlock( input, l );
diff --git a/kmailcvt/filter_outlook.cxx b/kmailcvt/filter_outlook.cxx
index e9c53a82c..0dad8fde7 100644
--- a/kmailcvt/filter_outlook.cxx
+++ b/kmailcvt/filter_outlook.cxx
@@ -50,11 +50,11 @@ void FilterOutlook::import(FilterInfo *info)
info->addLog(i18n("Importing new mail files..."));
info->addLog(i18n("No files found for import."));
- QString outlookDir;
- outlookDir = KFileDialog::getExistingDirectory(QDir::homeDirPath(), info->parent());
- QDir importDir (outlookDir);
- QStringList files = importDir.entryList("*.[pP][sS][tT]", QDir::Files, QDir::Name);
- for ( QStringList::Iterator pstFile = files.begin(); pstFile != files.end(); ++pstFile) {
+ TQString outlookDir;
+ outlookDir = KFileDialog::getExistingDirectory(TQDir::homeDirPath(), info->parent());
+ TQDir importDir (outlookDir);
+ TQStringList files = importDir.entryList("*.[pP][sS][tT]", TQDir::Files, TQDir::Name);
+ for ( TQStringList::Iterator pstFile = files.begin(); pstFile != files.end(); ++pstFile) {
info->addLog( i18n("Importing emails from %1...").arg( *pstFile ) );
info->addLog( i18n("1 duplicate message not imported", "%n duplicate messages not imported", count_duplicates));
info->alert( i18n("Unable to open %1, skipping").arg( *pstFile ) );
diff --git a/kmailcvt/filter_plain.cxx b/kmailcvt/filter_plain.cxx
index 7dc0bda50..0246c8c63 100644
--- a/kmailcvt/filter_plain.cxx
+++ b/kmailcvt/filter_plain.cxx
@@ -40,13 +40,13 @@ FilterPlain::~FilterPlain()
void FilterPlain::import(FilterInfo *info)
{
// Select directory containing plain text emails
- QString mailDir = KFileDialog::getExistingDirectory(QDir::homeDirPath(),info->parent());
+ TQString mailDir = KFileDialog::getExistingDirectory(TQDir::homeDirPath(),info->parent());
if (mailDir.isEmpty()) { // No directory selected
info->alert(i18n("No directory selected."));
return;
}
- QDir dir (mailDir);
- QStringList files = dir.entryList("*.[eE][mM][lL]; *.[tT][xX][tT]; *.[mM][sS][gG]", QDir::Files, QDir::Name);
+ TQDir dir (mailDir);
+ TQStringList files = dir.entryList("*.[eE][mM][lL]; *.[tT][xX][tT]; *.[mM][sS][gG]", TQDir::Files, TQDir::Name);
// Count total number of files to be processed
info->addLog(i18n("Counting files..."));
@@ -54,7 +54,7 @@ void FilterPlain::import(FilterInfo *info)
int currentFile = 0;
info->addLog(i18n("Importing new mail files..."));
- for ( QStringList::Iterator mailFile = files.begin(); mailFile != files.end(); ++mailFile ) {
+ for ( TQStringList::Iterator mailFile = files.begin(); mailFile != files.end(); ++mailFile ) {
info->setFrom(*mailFile);
info->setTo(dir.dirName());
info->setCurrent(0);
diff --git a/kmailcvt/filter_pmail.cxx b/kmailcvt/filter_pmail.cxx
index 2eafb7f7e..5fcc1256e 100644
--- a/kmailcvt/filter_pmail.cxx
+++ b/kmailcvt/filter_pmail.cxx
@@ -20,7 +20,7 @@
#include <config.h>
#include <klocale.h>
#include <kfiledialog.h>
-#include <qregexp.h>
+#include <tqregexp.h>
#include <ktempfile.h>
#include <kdebug.h>
@@ -47,7 +47,7 @@ void FilterPMail::import(FilterInfo *info)
// Select directory from where I have to import files
KFileDialog *kfd;
- kfd = new KFileDialog( QDir::homeDirPath(), "", 0, "kfiledialog", true );
+ kfd = new KFileDialog( TQDir::homeDirPath(), "", 0, "kfiledialog", true );
kfd->setMode(KFile::Directory | KFile::LocalOnly);
kfd->exec();
chosenDir = kfd->selectedFile();
@@ -60,7 +60,7 @@ void FilterPMail::import(FilterInfo *info)
// Count total number of files to be processed
info->addLog(i18n("Counting files..."));
dir.setPath (chosenDir);
- QStringList files = dir.entryList("*.[cC][nN][mM]; *.[pP][mM][mM]; *.[mM][bB][xX]", QDir::Files, QDir::Name);
+ TQStringList files = dir.entryList("*.[cC][nN][mM]; *.[pP][mM][mM]; *.[mM][bB][xX]", TQDir::Files, TQDir::Name);
totalFiles = files.count();
currentFile = 0;
kdDebug() << "Count is " << totalFiles << endl;
@@ -82,20 +82,20 @@ void FilterPMail::import(FilterInfo *info)
}
/** this looks for all files with the filemask 'mask' and calls the 'workFunc' on each of them */
-void FilterPMail::processFiles(const QString& mask, void(FilterPMail::* workFunc)(const QString&) )
+void FilterPMail::processFiles(const TQString& mask, void(FilterPMail::* workFunc)(const TQString&) )
{
if (inf->shouldTerminate()) return;
- QStringList files = dir.entryList(mask, QDir::Files, QDir::Name);
+ TQStringList files = dir.entryList(mask, TQDir::Files, TQDir::Name);
//kdDebug() << "Mask is " << mask << " count is " << files.count() << endl;
- for ( QStringList::Iterator mailFile = files.begin(); mailFile != files.end(); ++mailFile ) {
+ for ( TQStringList::Iterator mailFile = files.begin(); mailFile != files.end(); ++mailFile ) {
// Notify current file
- QFileInfo mailfileinfo(*mailFile);
+ TQFileInfo mailfileinfo(*mailFile);
inf->setFrom(mailfileinfo.fileName());
// Clear the other fields
- inf->setTo(QString::null);
- inf->setCurrent(QString::null);
+ inf->setTo(TQString::null);
+ inf->setCurrent(TQString::null);
inf->setCurrent(-1);
// call worker function, increase progressbar
@@ -109,9 +109,9 @@ void FilterPMail::processFiles(const QString& mask, void(FilterPMail::* workFunc
/** this function imports one *.CNM message */
-void FilterPMail::importNewMessage(const QString& file)
+void FilterPMail::importNewMessage(const TQString& file)
{
- QString destFolder("PegasusMail-Import/New Messages");
+ TQString destFolder("PegasusMail-Import/New Messages");
inf->setTo(destFolder);
/* comment by Danny Kukawka:
@@ -126,7 +126,7 @@ void FilterPMail::importNewMessage(const QString& file)
/** this function imports one mail folder file (*.PMM) */
-void FilterPMail::importMailFolder(const QString& file)
+void FilterPMail::importMailFolder(const TQString& file)
{
// Format of a PMM file:
// First comes a header with 128 bytes. At the beginning is the name of
@@ -160,21 +160,21 @@ void FilterPMail::importMailFolder(const QString& file)
} pmm_head;
long l = 0;
- QFile f(file);
+ TQFile f(file);
if (!f.open(IO_ReadOnly)) {
inf->alert(i18n("Unable to open %1, skipping").arg(file));
} else {
// Get folder name
l = f.readBlock((char *) &pmm_head, sizeof(pmm_head));
- QString folder("PegasusMail-Import/");
+ TQString folder("PegasusMail-Import/");
if(folderParsed)
- folder.append(getFolderName((QString)pmm_head.id));
+ folder.append(getFolderName((TQString)pmm_head.id));
else
folder.append(pmm_head.folder);
inf->setTo(folder);
- inf->addLog(i18n("Importing %1").arg("../" + QString(pmm_head.folder)));
+ inf->addLog(i18n("Importing %1").arg("../" + TQString(pmm_head.folder)));
- QByteArray input(MAX_LINE);
+ TQByteArray input(MAX_LINE);
bool first_msg = true;
while (!f.atEnd()) {
@@ -215,21 +215,21 @@ void FilterPMail::importMailFolder(const QString& file)
/** imports a 'unix' format mail folder (*.MBX) */
-void FilterPMail::importUnixMailFolder(const QString& file)
+void FilterPMail::importUnixMailFolder(const TQString& file)
{
struct {
char folder[58];
char id[31];
} pmg_head;
- QFile f;
- QString folder("PegasusMail-Import/"), s(file), seperate;
- QByteArray line(MAX_LINE);
+ TQFile f;
+ TQString folder("PegasusMail-Import/"), s(file), seperate;
+ TQByteArray line(MAX_LINE);
int n = 0, l = 0;
/** Get the folder name */
- s.replace( QRegExp("mbx$"), "pmg");
- s.replace( QRegExp("MBX$"), "PMG");
+ s.replace( TQRegExp("mbx$"), "pmg");
+ s.replace( TQRegExp("MBX$"), "PMG");
f.setName(s);
if (! f.open( IO_ReadOnly ) ) {
inf->alert( i18n("Unable to open %1, skipping").arg( s ) );
@@ -239,7 +239,7 @@ void FilterPMail::importUnixMailFolder(const QString& file)
f.close();
if(folderParsed)
- folder.append(getFolderName((QString)pmg_head.id));
+ folder.append(getFolderName((TQString)pmg_head.id));
else
folder.append(pmg_head.folder);
@@ -252,7 +252,7 @@ void FilterPMail::importUnixMailFolder(const QString& file)
if (! f.open( IO_ReadOnly ) ) {
inf->alert( i18n("Unable to open %1, skipping").arg( s ) );
} else {
- inf->addLog(i18n("Importing %1").arg("../" + QString(pmg_head.folder)));
+ inf->addLog(i18n("Importing %1").arg("../" + TQString(pmg_head.folder)));
l = f.readLine( line.data(),MAX_LINE); // read the first line which is unneeded
while ( ! f.atEnd() ) {
KTempFile tempfile;
@@ -289,20 +289,20 @@ bool FilterPMail::parseFolderMatrix()
kdDebug() << "Start parsing the foldermatrix." << endl;
inf->addLog(i18n("Parsing the folder structure..."));
- QFile hierarch(chosenDir + "/hierarch.pm");
+ TQFile hierarch(chosenDir + "/hierarch.pm");
if (! hierarch.open( IO_ReadOnly ) ) {
inf->alert( i18n("Unable to open %1, skipping").arg( chosenDir + "hierarch.pm" ) );
return false;
} else {
- QStringList tmpList;
- QString tmpRead;
+ TQStringList tmpList;
+ TQString tmpRead;
while ( !hierarch.atEnd() && hierarch.readLine(tmpRead,100)) {
- QString tmpArray[5];
+ TQString tmpArray[5];
tmpRead.remove(tmpRead.length() -2,2);
- QStringList tmpList = QStringList::split(",", tmpRead, false);
+ TQStringList tmpList = TQStringList::split(",", tmpRead, false);
int i = 0;
- for ( QStringList::Iterator it = tmpList.begin(); it != tmpList.end(); ++it, i++) {
- QString _tmp = *it;
+ for ( TQStringList::Iterator it = tmpList.begin(); it != tmpList.end(); ++it, i++) {
+ TQString _tmp = *it;
if(i < 5) tmpArray[i] = _tmp.remove("\"");
else {
hierarch.close();
@@ -317,20 +317,20 @@ bool FilterPMail::parseFolderMatrix()
}
/** get the foldername for a given file ID from folderMatrix */
-QString FilterPMail::getFolderName(QString ID)
+TQString FilterPMail::getFolderName(TQString ID)
{
bool found = false;
- QString folder;
- QString search = ID;
+ TQString folder;
+ TQString search = ID;
while (!found)
{
for ( FolderStructureIterator it = folderMatrix.begin(); it != folderMatrix.end(); it++) {
FolderStructure tmp = *it;
- QString _ID = tmp[2];
+ TQString _ID = tmp[2];
if(_ID == search) {
- QString _type = tmp[0] + tmp[1];
+ TQString _type = tmp[0] + tmp[1];
if(( _type == "21")) {
found = true;
break;
diff --git a/kmailcvt/filter_pmail.hxx b/kmailcvt/filter_pmail.hxx
index 9db76d11f..664fdcc1b 100644
--- a/kmailcvt/filter_pmail.hxx
+++ b/kmailcvt/filter_pmail.hxx
@@ -18,8 +18,8 @@
#ifndef FILTER_PMAIL_HXX
#define FILTER_PMAIL_HXX
-#include <qdir.h>
-#include <qvaluelist.h>
+#include <tqdir.h>
+#include <tqvaluelist.h>
#include "filters.hxx"
@@ -33,21 +33,21 @@ public:
protected:
/** this looks for all files with the filemask 'mask' and calls the 'workFunc' on each of them */
- void processFiles(const QString& mask, void(FilterPMail::* workFunc)(const QString&) );
+ void processFiles(const TQString& mask, void(FilterPMail::* workFunc)(const TQString&) );
/** this function imports one *.CNM message */
- void importNewMessage(const QString& file);
+ void importNewMessage(const TQString& file);
/** this function imports one mail folder file (*.PMM) */
- void importMailFolder(const QString& file);
+ void importMailFolder(const TQString& file);
/** imports a 'unix' format mail folder (*.MBX) */
- void importUnixMailFolder(const QString& file);
+ void importUnixMailFolder(const TQString& file);
/** this function recreate the folder structure */
bool parseFolderMatrix();
/** this function parse the folder structure */
- QString getFolderName(QString ID);
+ TQString getFolderName(TQString ID);
private:
/** the working directory */
- QDir dir;
+ TQDir dir;
/** pointer to the info */
FilterInfo * inf;
@@ -60,12 +60,12 @@ private:
4. "ID:name" of parent folder
5. name of folder/archiv
*/
- QValueList<FolderStructure> folderMatrix;
- typedef QValueList<FolderStructure>::Iterator FolderStructureIterator;
+ TQValueList<FolderStructure> folderMatrix;
+ typedef TQValueList<FolderStructure>::Iterator FolderStructureIterator;
bool folderParsed;
- QString chosenDir;
+ TQString chosenDir;
/** which file (of totalFiles) is now in the work? */
int currentFile;
diff --git a/kmailcvt/filter_sylpheed.cxx b/kmailcvt/filter_sylpheed.cxx
index 5edda926e..fcf53f74a 100644
--- a/kmailcvt/filter_sylpheed.cxx
+++ b/kmailcvt/filter_sylpheed.cxx
@@ -44,7 +44,7 @@ FilterSylpheed::~FilterSylpheed( void )
void FilterSylpheed::import( FilterInfo *info )
{
- QString _homeDir = QDir::homeDirPath();
+ TQString _homeDir = TQDir::homeDirPath();
KFileDialog *kfd;
kfd = new KFileDialog( _homeDir, "", 0, "kfiledialog", true );
@@ -59,16 +59,16 @@ void FilterSylpheed::import( FilterInfo *info )
* If the user only select homedir no import needed because
* there should be no files and we surely import wrong files.
*/
- else if ( mailDir == QDir::homeDirPath() || mailDir == ( QDir::homeDirPath() + "/" ) ) {
+ else if ( mailDir == TQDir::homeDirPath() || mailDir == ( TQDir::homeDirPath() + "/" ) ) {
info->addLog( i18n( "No files found for import." ) );
} else {
info->setOverall(0);
/** Recursive import of the MailFolders */
- QDir dir(mailDir);
- QStringList rootSubDirs = dir.entryList("[^\\.]*", QDir::Dirs , QDir::Name);
+ TQDir dir(mailDir);
+ TQStringList rootSubDirs = dir.entryList("[^\\.]*", TQDir::Dirs , TQDir::Name);
int currentDir = 1, numSubDirs = rootSubDirs.size();
- for(QStringList::Iterator filename = rootSubDirs.begin() ; filename != rootSubDirs.end() ; ++filename, ++currentDir) {
+ for(TQStringList::Iterator filename = rootSubDirs.begin() ; filename != rootSubDirs.end() ; ++filename, ++currentDir) {
if(info->shouldTerminate()) break;
importDirContents(info, dir.filePath(*filename));
info->setOverall((int) ((float) currentDir / numSubDirs * 100));
@@ -90,7 +90,7 @@ void FilterSylpheed::import( FilterInfo *info )
* @param info Information storage for the operation.
* @param dirName The name of the directory to import.
*/
-void FilterSylpheed::importDirContents( FilterInfo *info, const QString& dirName)
+void FilterSylpheed::importDirContents( FilterInfo *info, const TQString& dirName)
{
if(info->shouldTerminate()) return;
@@ -98,9 +98,9 @@ void FilterSylpheed::importDirContents( FilterInfo *info, const QString& dirName
importFiles(info, dirName);
/** If there are subfolders, we import them one by one */
- QDir subfolders(dirName);
- QStringList subDirs = subfolders.entryList("[^\\.]*", QDir::Dirs , QDir::Name);
- for(QStringList::Iterator filename = subDirs.begin() ; filename != subDirs.end() ; ++filename) {
+ TQDir subfolders(dirName);
+ TQStringList subDirs = subfolders.entryList("[^\\.]*", TQDir::Dirs , TQDir::Name);
+ for(TQStringList::Iterator filename = subDirs.begin() ; filename != subDirs.end() ; ++filename) {
if(info->shouldTerminate()) return;
importDirContents(info, subfolders.filePath(*filename));
}
@@ -112,31 +112,31 @@ void FilterSylpheed::importDirContents( FilterInfo *info, const QString& dirName
* @param info Information storage for the operation.
* @param dirName The name of the directory to import.
*/
-void FilterSylpheed::importFiles( FilterInfo *info, const QString& dirName)
+void FilterSylpheed::importFiles( FilterInfo *info, const TQString& dirName)
{
- QDir dir(dirName);
- QString _path;
+ TQDir dir(dirName);
+ TQString _path;
bool generatedPath = false;
- QDict<unsigned long> msgflags;
+ TQDict<unsigned long> msgflags;
msgflags.setAutoDelete(true);
- QDir importDir (dirName);
- QStringList files = importDir.entryList("[^\\.]*", QDir::Files, QDir::Name);
+ TQDir importDir (dirName);
+ TQStringList files = importDir.entryList("[^\\.]*", TQDir::Files, TQDir::Name);
int currentFile = 1, numFiles = files.size();
readMarkFile(info, dir.filePath(".sylpheed_mark"), msgflags);
- for ( QStringList::Iterator mailFile = files.begin(); mailFile != files.end(); ++mailFile, ++currentFile) {
+ for ( TQStringList::Iterator mailFile = files.begin(); mailFile != files.end(); ++mailFile, ++currentFile) {
if(info->shouldTerminate()) return;
- QString _mfile = *mailFile;
+ TQString _mfile = *mailFile;
if (!(_mfile.endsWith(".sylpheed_cache") || _mfile.endsWith(".sylpheed_mark") || _mfile.endsWith(".mh_sequences") )) {
if(!generatedPath) {
_path = "Sylpheed-Import/";
- QString _tmp = dir.filePath(*mailFile);
+ TQString _tmp = dir.filePath(*mailFile);
_tmp = _tmp.remove(_tmp.length() - _mfile.length() -1, _mfile.length()+1);
_path += _tmp.remove( mailDir ,TRUE);
- QString _info = _path;
+ TQString _info = _path;
info->addLog(i18n("Import folder %1...").arg(_info.remove(0,15)));
info->setFrom(_info);
@@ -144,7 +144,7 @@ void FilterSylpheed::importFiles( FilterInfo *info, const QString& dirName)
generatedPath = true;
}
- QString flags;
+ TQString flags;
if (msgflags[_mfile])
flags = msgFlagsToString(*(msgflags[_mfile]));
@@ -164,7 +164,7 @@ void FilterSylpheed::importFiles( FilterInfo *info, const QString& dirName)
}
-void FilterSylpheed::readMarkFile( FilterInfo *info, const QString &path, QDict<unsigned long> &dict )
+void FilterSylpheed::readMarkFile( FilterInfo *info, const TQString &path, TQDict<unsigned long> &dict )
{
/* Each sylpheed mail directory contains a .sylpheed_mark file which
* contains all the flags for each messages. The layout of this file
@@ -180,15 +180,15 @@ void FilterSylpheed::readMarkFile( FilterInfo *info, const QString &path, QDict<
* and the second one with the actual message flags */
Q_UINT32 in, flags;
- QFile file(path);
+ TQFile file(path);
if (!file.open(IO_ReadOnly))
return;
- QDataStream stream(&file);
+ TQDataStream stream(&file);
if (Q_BYTE_ORDER == Q_LITTLE_ENDIAN)
- stream.setByteOrder(QDataStream::LittleEndian);
+ stream.setByteOrder(TQDataStream::LittleEndian);
@@ -206,15 +206,15 @@ void FilterSylpheed::readMarkFile( FilterInfo *info, const QString &path, QDict<
}
stream >> in;
stream >> flags;
- QString s;
+ TQString s;
s.setNum((uint) in);
dict.insert(s, new unsigned long(flags));
}
}
-QString FilterSylpheed::msgFlagsToString(unsigned long flags)
+TQString FilterSylpheed::msgFlagsToString(unsigned long flags)
{
- QString status;
+ TQString status;
/* see sylpheed's procmsg.h */
if (flags & 1UL) status += 'N';
diff --git a/kmailcvt/filter_sylpheed.hxx b/kmailcvt/filter_sylpheed.hxx
index c18f8bd8f..fcc3af851 100644
--- a/kmailcvt/filter_sylpheed.hxx
+++ b/kmailcvt/filter_sylpheed.hxx
@@ -17,7 +17,7 @@
#ifndef FILTER_SYLPHEED_HXX
#define FILTER_SYLPHEED_HXX
-#include <qdict.h>
+#include <tqdict.h>
#include "filters.hxx"
@@ -35,13 +35,13 @@ public:
void import(FilterInfo *info);
private:
- QString mailDir;
+ TQString mailDir;
- void importDirContents(FilterInfo*, const QString&);
- void importFiles(FilterInfo*, const QString&);
+ void importDirContents(FilterInfo*, const TQString&);
+ void importFiles(FilterInfo*, const TQString&);
- void readMarkFile( FilterInfo*, const QString&, QDict<unsigned long>&);
- QString msgFlagsToString(unsigned long);
+ void readMarkFile( FilterInfo*, const TQString&, TQDict<unsigned long>&);
+ TQString msgFlagsToString(unsigned long);
};
#endif
diff --git a/kmailcvt/filter_thebat.cxx b/kmailcvt/filter_thebat.cxx
index 0e634e784..fa00b915d 100644
--- a/kmailcvt/filter_thebat.cxx
+++ b/kmailcvt/filter_thebat.cxx
@@ -19,8 +19,8 @@
#include <config.h>
-#include <qregexp.h>
-#include <qvaluelist.h>
+#include <tqregexp.h>
+#include <tqvaluelist.h>
#include <klocale.h>
#include <kfiledialog.h>
@@ -50,7 +50,7 @@ FilterTheBat::~FilterTheBat( void )
/** Recursive import of The Bat! maildir. */
void FilterTheBat::import( FilterInfo *info )
{
- QString _homeDir = QDir::homeDirPath();
+ TQString _homeDir = TQDir::homeDirPath();
KFileDialog *kfd;
kfd = new KFileDialog( _homeDir, "", 0, "kfiledialog", true );
@@ -65,16 +65,16 @@ void FilterTheBat::import( FilterInfo *info )
* If the user only select homedir no import needed because
* there should be no files and we surely import wrong files.
*/
- else if ( mailDir == QDir::homeDirPath() || mailDir == ( QDir::homeDirPath() + "/" ) ) {
+ else if ( mailDir == TQDir::homeDirPath() || mailDir == ( TQDir::homeDirPath() + "/" ) ) {
info->addLog( i18n( "No files found for import." ) );
} else {
info->setOverall(0);
/** Recursive import of the MailFolders */
- QDir dir(mailDir);
- QStringList rootSubDirs = dir.entryList("[^\\.]*", QDir::Dirs , QDir::Name);
+ TQDir dir(mailDir);
+ TQStringList rootSubDirs = dir.entryList("[^\\.]*", TQDir::Dirs , TQDir::Name);
int currentDir = 1, numSubDirs = rootSubDirs.size();
- for(QStringList::Iterator filename = rootSubDirs.begin() ; filename != rootSubDirs.end() ; ++filename, ++currentDir) {
+ for(TQStringList::Iterator filename = rootSubDirs.begin() ; filename != rootSubDirs.end() ; ++filename, ++currentDir) {
importDirContents(info, dir.filePath(*filename));
info->setOverall((int) ((float) currentDir / numSubDirs * 100));
if(info->shouldTerminate()) break;
@@ -97,24 +97,24 @@ void FilterTheBat::import( FilterInfo *info )
* @param info Information storage for the operation.
* @param dirName The name of the directory to import.
*/
-void FilterTheBat::importDirContents( FilterInfo *info, const QString& dirName)
+void FilterTheBat::importDirContents( FilterInfo *info, const TQString& dirName)
{
if(info->shouldTerminate()) return;
/** Here Import all archives in the current dir */
- QDir dir(dirName);
- QDir importDir (dirName);
- QStringList files = importDir.entryList("*.[tT][bB][bB]", QDir::Files, QDir::Name);
- for ( QStringList::Iterator mailFile = files.begin(); mailFile != files.end(); ++mailFile) {
- QString temp_mailfile = *mailFile;
+ TQDir dir(dirName);
+ TQDir importDir (dirName);
+ TQStringList files = importDir.entryList("*.[tT][bB][bB]", TQDir::Files, TQDir::Name);
+ for ( TQStringList::Iterator mailFile = files.begin(); mailFile != files.end(); ++mailFile) {
+ TQString temp_mailfile = *mailFile;
importFiles(info, (dirName + "/" + temp_mailfile));
if(info->shouldTerminate()) return;
}
/** If there are subfolders, we import them one by one */
- QDir subfolders(dirName);
- QStringList subDirs = subfolders.entryList("[^\\.]*", QDir::Dirs , QDir::Name);
- for(QStringList::Iterator filename = subDirs.begin() ; filename != subDirs.end() ; ++filename) {
+ TQDir subfolders(dirName);
+ TQStringList subDirs = subfolders.entryList("[^\\.]*", TQDir::Dirs , TQDir::Name);
+ for(TQStringList::Iterator filename = subDirs.begin() ; filename != subDirs.end() ; ++filename) {
importDirContents(info, subfolders.filePath(*filename));
if(info->shouldTerminate()) return;
}
@@ -125,7 +125,7 @@ void FilterTheBat::importDirContents( FilterInfo *info, const QString& dirName)
* @param info Information storage for the operation.
* @param dirName The name of the directory to import.
*/
-void FilterTheBat::importFiles( FilterInfo *info, const QString& FileName)
+void FilterTheBat::importFiles( FilterInfo *info, const TQString& FileName)
{
// Format of a tbb-file from The Bat! 3.x
@@ -139,13 +139,13 @@ void FilterTheBat::importFiles( FilterInfo *info, const QString& FileName)
// ----------------------------------------
long l = 0;
- QByteArray input(50);
- QRegExp regexp("!.p.0");
- QFile tbb(FileName);
+ TQByteArray input(50);
+ TQRegExp regexp("!.p.0");
+ TQFile tbb(FileName);
int iFound = 0;
int count = 0;
long endOfEmail = 0;
- QValueList<long> offsets;
+ TQValueList<long> offsets;
if (!tbb.open(IO_ReadOnly)) {
info->alert(i18n("Unable to open %1, skipping").arg(FileName));
@@ -155,8 +155,8 @@ void FilterTheBat::importFiles( FilterInfo *info, const QString& FileName)
// does not work correct. Maybe in come in a continuous loop !!!
// Reason:
// if you use readLine() to read from a file with binary data
- // QFile::at() and QFile::atEnd() return wrong value. So we
- // never get QFile::atEnd() == true in some cases. This looks
+ // TQFile::at() and TQFile::atEnd() return wrong value. So we
+ // never get TQFile::atEnd() == true in some cases. This looks
// like a bug in Qt3 maybe fixed in Qt4.
//
while((l = tbb.readBlock(input.data(),50)) ) {
@@ -164,7 +164,7 @@ void FilterTheBat::importFiles( FilterInfo *info, const QString& FileName)
tbb.close();
return;
}
- QString _tmp = input.data();
+ TQString _tmp = input.data();
if (tbb.atEnd())
break;
@@ -191,22 +191,22 @@ void FilterTheBat::importFiles( FilterInfo *info, const QString& FileName)
long lastPos = 3128;
long endPos = 0;
- QString _path = "TheBat-Import/";
- QString _tmp = FileName;
+ TQString _path = "TheBat-Import/";
+ TQString _tmp = FileName;
_tmp = _tmp.remove(_tmp.length() - 13, 13);
_path += _tmp.remove( mailDir ,TRUE);
- QString _info = _path;
+ TQString _info = _path;
info->addLog(i18n("Import folder %1...").arg(_info.remove(0,14)));
info->setTo(_path);
info->setFrom("../" + _info + "/messages.tbb");
- for(QValueList<long>::Iterator it = offsets.begin() ; it != offsets.end() ; ++it) {
+ for(TQValueList<long>::Iterator it = offsets.begin() ; it != offsets.end() ; ++it) {
if(info->shouldTerminate()) {
tbb.close();
return;
}
endPos = *it;
- QByteArray input(endPos-lastPos);
+ TQByteArray input(endPos-lastPos);
tbb.readBlock(input.data(), endPos-lastPos);
KTempFile tmp;
diff --git a/kmailcvt/filter_thebat.hxx b/kmailcvt/filter_thebat.hxx
index 4dd80fa3f..7d62018d4 100644
--- a/kmailcvt/filter_thebat.hxx
+++ b/kmailcvt/filter_thebat.hxx
@@ -33,10 +33,10 @@ public:
void import(FilterInfo *info);
private:
- QString mailDir;
+ TQString mailDir;
- void importDirContents(FilterInfo*, const QString&);
- void importFiles(FilterInfo*, const QString&);
+ void importDirContents(FilterInfo*, const TQString&);
+ void importFiles(FilterInfo*, const TQString&);
};
#endif
diff --git a/kmailcvt/filter_thunderbird.cxx b/kmailcvt/filter_thunderbird.cxx
index e5d71564c..a9e091d9b 100644
--- a/kmailcvt/filter_thunderbird.cxx
+++ b/kmailcvt/filter_thunderbird.cxx
@@ -49,10 +49,10 @@ void FilterThunderbird::import(FilterInfo *info)
* We ask the user to choose Evolution's root directory.
* This should be usually ~/.thunderbird/xxxx.default/Mail/Local Folders/
*/
- QString thunderDir = QDir::homeDirPath() + "/.thunderbird/";
- QDir d( thunderDir );
+ TQString thunderDir = TQDir::homeDirPath() + "/.thunderbird/";
+ TQDir d( thunderDir );
if ( !d.exists() ) {
- thunderDir = QDir::homeDirPath();
+ thunderDir = TQDir::homeDirPath();
}
KFileDialog *kfd;
@@ -68,31 +68,31 @@ void FilterThunderbird::import(FilterInfo *info)
* If the user only select homedir no import needed because
* there should be no files and we surely import wrong files.
*/
- else if ( mailDir == QDir::homeDirPath() || mailDir == (QDir::homeDirPath() + "/")) {
+ else if ( mailDir == TQDir::homeDirPath() || mailDir == (TQDir::homeDirPath() + "/")) {
info->addLog(i18n("No files found for import."));
} else {
info->setOverall(0);
/** Recursive import of the MailArchives */
- QDir dir(mailDir);
- QStringList rootSubDirs = dir.entryList("[^\\.]*", QDir::Dirs, QDir::Name); // Removal of . and ..
+ TQDir dir(mailDir);
+ TQStringList rootSubDirs = dir.entryList("[^\\.]*", TQDir::Dirs, TQDir::Name); // Removal of . and ..
int currentDir = 1, numSubDirs = rootSubDirs.size();
- for(QStringList::Iterator filename = rootSubDirs.begin() ; filename != rootSubDirs.end() ; ++filename, ++currentDir) {
+ for(TQStringList::Iterator filename = rootSubDirs.begin() ; filename != rootSubDirs.end() ; ++filename, ++currentDir) {
if(info->shouldTerminate()) break;
importDirContents(info, dir.filePath(*filename), *filename, *filename);
info->setOverall((int) ((float) currentDir / numSubDirs * 100));
}
/** import last but not least all archives from the root-dir */
- QDir importDir (mailDir);
- QStringList files = importDir.entryList("[^\\.]*", QDir::Files, QDir::Name);
- for ( QStringList::Iterator mailFile = files.begin(); mailFile != files.end(); ++mailFile) {
+ TQDir importDir (mailDir);
+ TQStringList files = importDir.entryList("[^\\.]*", TQDir::Files, TQDir::Name);
+ for ( TQStringList::Iterator mailFile = files.begin(); mailFile != files.end(); ++mailFile) {
if(info->shouldTerminate()) break;
- QString temp_mailfile = *mailFile;
+ TQString temp_mailfile = *mailFile;
if (temp_mailfile.endsWith(".msf") || temp_mailfile.endsWith("msgFilterRules.dat")) {}
else {
info->addLog( i18n("Start import file %1...").arg( temp_mailfile ) );
- importMBox(info, mailDir + temp_mailfile , temp_mailfile, QString::null);
+ importMBox(info, mailDir + temp_mailfile , temp_mailfile, TQString::null);
}
}
@@ -113,17 +113,17 @@ void FilterThunderbird::import(FilterInfo *info)
* @param KMailRootDir The directory's root directory in KMail's folder structure.
* @param KMailSubDir The directory's direct ancestor in KMail's folder structure.
*/
-void FilterThunderbird::importDirContents(FilterInfo *info, const QString& dirName, const QString& KMailRootDir, const QString& KMailSubDir)
+void FilterThunderbird::importDirContents(FilterInfo *info, const TQString& dirName, const TQString& KMailRootDir, const TQString& KMailSubDir)
{
if(info->shouldTerminate()) return;
/** Here Import all archives in the current dir */
- QDir dir(dirName);
+ TQDir dir(dirName);
- QDir importDir (dirName);
- QStringList files = importDir.entryList("[^\\.]*", QDir::Files, QDir::Name);
- for ( QStringList::Iterator mailFile = files.begin(); mailFile != files.end(); ++mailFile) {
+ TQDir importDir (dirName);
+ TQStringList files = importDir.entryList("[^\\.]*", TQDir::Files, TQDir::Name);
+ for ( TQStringList::Iterator mailFile = files.begin(); mailFile != files.end(); ++mailFile) {
if(info->shouldTerminate()) break;
- QString temp_mailfile = *mailFile;
+ TQString temp_mailfile = *mailFile;
if (temp_mailfile.endsWith(".msf") || temp_mailfile.endsWith("msgFilterRules.dat")) {}
else {
info->addLog( i18n("Start import file %1...").arg( temp_mailfile ) );
@@ -132,11 +132,11 @@ void FilterThunderbird::importDirContents(FilterInfo *info, const QString& dirNa
}
/** If there are subfolders, we import them one by one */
- QDir subfolders(dirName);
- QStringList subDirs = subfolders.entryList("[^\\.]*", QDir::Dirs, QDir::Name);
- for(QStringList::Iterator filename = subDirs.begin() ; filename != subDirs.end() ; ++filename) {
+ TQDir subfolders(dirName);
+ TQStringList subDirs = subfolders.entryList("[^\\.]*", TQDir::Dirs, TQDir::Name);
+ for(TQStringList::Iterator filename = subDirs.begin() ; filename != subDirs.end() ; ++filename) {
if(info->shouldTerminate()) break;
- QString kSubDir;
+ TQString kSubDir;
if(!KMailSubDir.isNull()) {
kSubDir = KMailSubDir + "/" + *filename;
} else {
@@ -153,18 +153,18 @@ void FilterThunderbird::importDirContents(FilterInfo *info, const QString& dirNa
* @param KMailRootDir The directory's root directory in KMail's folder structure.
* @param KMailSubDir The directory's equivalent in KMail's folder structure. *
*/
-void FilterThunderbird::importMBox(FilterInfo *info, const QString& mboxName, const QString& rootDir, const QString& targetDir)
+void FilterThunderbird::importMBox(FilterInfo *info, const TQString& mboxName, const TQString& rootDir, const TQString& targetDir)
{
- QFile mbox(mboxName);
+ TQFile mbox(mboxName);
bool first_msg = true;
if (!mbox.open(IO_ReadOnly)) {
info->alert(i18n("Unable to open %1, skipping").arg(mboxName));
} else {
- QFileInfo filenameInfo(mboxName);
+ TQFileInfo filenameInfo(mboxName);
info->setCurrent(0);
if( mboxName.length() > 20 ) {
- QString tmp_info = mboxName;
+ TQString tmp_info = mboxName;
tmp_info = tmp_info.replace( mailDir, "../" );
if (tmp_info.contains(".sbd"))
tmp_info.remove(".sbd");
@@ -172,26 +172,26 @@ void FilterThunderbird::importMBox(FilterInfo *info, const QString& mboxName, co
} else
info->setFrom(mboxName);
if(targetDir.contains(".sbd")) {
- QString tmp_info = targetDir;
+ TQString tmp_info = targetDir;
tmp_info.remove(".sbd");
info->setTo(tmp_info);
} else
info->setTo(targetDir);
- QByteArray input(MAX_LINE);
+ TQByteArray input(MAX_LINE);
long l = 0;
while (!mbox.atEnd()) {
KTempFile tmp;
/** @todo check if the file is really a mbox, maybe search for 'from' string at start */
/* comment by Danny:
- * Don't use QTextStream to read from mbox, etter use QDataStream. QTextStream only
+ * Don't use TQTextStream to read from mbox, etter use TQDataStream. TQTextStream only
* support Unicode/Latin1/Locale. So you lost information from emails with
* charset!=Unicode/Latin1/Locale (e.g. KOI8-R) and Content-Transfer-Encoding != base64
- * (e.g. 8Bit). It also not help to convert the QTextStream to Unicode. By this you
+ * (e.g. 8Bit). It also not help to convert the TQTextStream to Unicode. By this you
* get Unicode/UTF-email but KMail can't detect the correct charset.
*/
- QCString seperate;
+ TQCString seperate;
if(!first_msg)
tmp.file()->writeBlock( input, l );
@@ -204,8 +204,8 @@ void FilterThunderbird::importMBox(FilterInfo *info, const QString& mboxName, co
tmp.close();
first_msg = false;
- QString destFolder;
- QString _targetDir = targetDir;
+ TQString destFolder;
+ TQString _targetDir = targetDir;
if(!targetDir.isNull()) {
if(_targetDir.contains(".sbd"))
_targetDir.remove(".sbd");
diff --git a/kmailcvt/filter_thunderbird.hxx b/kmailcvt/filter_thunderbird.hxx
index 438089b91..d3bcd7f96 100644
--- a/kmailcvt/filter_thunderbird.hxx
+++ b/kmailcvt/filter_thunderbird.hxx
@@ -33,10 +33,10 @@ public:
void import(FilterInfo *info);
private:
- QString mailDir;
+ TQString mailDir;
- void importDirContents(FilterInfo*, const QString&, const QString&, const QString&);
- void importMBox(FilterInfo*, const QString&, const QString&, const QString&);
+ void importDirContents(FilterInfo*, const TQString&, const TQString&, const TQString&);
+ void importMBox(FilterInfo*, const TQString&, const TQString&, const TQString&);
};
#endif
diff --git a/kmailcvt/filters.cxx b/kmailcvt/filters.cxx
index 02f869853..5e163e191 100644
--- a/kmailcvt/filters.cxx
+++ b/kmailcvt/filters.cxx
@@ -35,7 +35,7 @@
bool FilterInfo::s_terminateASAP = false;
-FilterInfo::FilterInfo( KImportPageDlg* dlg, QWidget* parent , bool _removeDupMsg)
+FilterInfo::FilterInfo( KImportPageDlg* dlg, TQWidget* parent , bool _removeDupMsg)
: m_dlg( dlg ),
m_parent( parent )
{
@@ -47,22 +47,22 @@ FilterInfo::~FilterInfo()
{
}
-void FilterInfo::setStatusMsg( const QString& status )
+void FilterInfo::setStatusMsg( const TQString& status )
{
m_dlg->_textStatus->setText( status );
}
-void FilterInfo::setFrom( const QString& from )
+void FilterInfo::setFrom( const TQString& from )
{
m_dlg->_from->setText( from );
}
-void FilterInfo::setTo( const QString& to )
+void FilterInfo::setTo( const TQString& to )
{
m_dlg->_to->setText( to );
}
-void FilterInfo::setCurrent( const QString& current )
+void FilterInfo::setCurrent( const TQString& current )
{
m_dlg->_current->setText( current );
kapp->processEvents();
@@ -79,7 +79,7 @@ void FilterInfo::setOverall( int percent )
m_dlg->_done_overall->setProgress( percent );
}
-void FilterInfo::addLog( const QString& log )
+void FilterInfo::addLog( const TQString& log )
{
m_dlg->_log->insertItem( log );
m_dlg->_log->setCurrentItem( m_dlg->_log->count() - 1 );
@@ -92,12 +92,12 @@ void FilterInfo::clear()
m_dlg->_log->clear();
setCurrent();
setOverall();
- setCurrent( QString::null );
- setFrom( QString::null );
- setTo( QString::null );
+ setCurrent( TQString::null );
+ setFrom( TQString::null );
+ setTo( TQString::null );
}
-void FilterInfo::alert( const QString& message )
+void FilterInfo::alert( const TQString& message )
{
KMessageBox::information( m_parent, message );
}
@@ -119,8 +119,8 @@ bool FilterInfo::shouldTerminate()
//////////////////////////////////////////////////////////////////////////////////
-Filter::Filter( const QString& name, const QString& author,
- const QString& info )
+Filter::Filter( const TQString& name, const TQString& author,
+ const TQString& info )
: m_name( name ),
m_author( author ),
m_info( info )
@@ -129,14 +129,14 @@ Filter::Filter( const QString& name, const QString& author,
count_duplicates = 0;
}
-bool Filter::addMessage( FilterInfo* info, const QString& folderName,
- const QString& msgPath, const QString & msgStatusFlags)
+bool Filter::addMessage( FilterInfo* info, const TQString& folderName,
+ const TQString& msgPath, const TQString & msgStatusFlags)
{
KURL msgURL;
msgURL.setPath( msgPath );
if ( !kapp->dcopClient()->isApplicationRegistered( "kmail" ) )
- KApplication::startServiceByDesktopName( "kmail", QString::null ); // Will wait until kmail is started
+ KApplication::startServiceByDesktopName( "kmail", TQString::null ); // Will wait until kmail is started
DCOPReply reply = DCOPRef( "kmail", "KMailIface" ).call( "dcopAddMessage", folderName, msgURL, msgStatusFlags );
@@ -165,14 +165,14 @@ bool Filter::addMessage( FilterInfo* info, const QString& folderName,
return true;
}
-bool Filter::addMessage_fastImport( FilterInfo* info, const QString& folderName,
- const QString& msgPath, const QString& msgStatusFlags )
+bool Filter::addMessage_fastImport( FilterInfo* info, const TQString& folderName,
+ const TQString& msgPath, const TQString& msgStatusFlags )
{
KURL msgURL;
msgURL.setPath( msgPath );
if ( !kapp->dcopClient()->isApplicationRegistered( "kmail" ) )
- KApplication::startServiceByDesktopName( "kmail", QString::null ); // Will wait until kmail is started
+ KApplication::startServiceByDesktopName( "kmail", TQString::null ); // Will wait until kmail is started
DCOPReply reply = DCOPRef( "kmail", "KMailIface" ).call( "dcopAddMessage_fastImport", folderName, msgURL, msgStatusFlags );
if ( !reply.isValid() )
@@ -200,9 +200,9 @@ bool Filter::addMessage_fastImport( FilterInfo* info, const QString& folderName,
bool Filter::endImport()
{
if ( !kapp->dcopClient()->isApplicationRegistered( "kmail" ) )
- KApplication::startServiceByDesktopName( "kmail", QString::null ); // Will wait until kmail is started
+ KApplication::startServiceByDesktopName( "kmail", TQString::null ); // Will wait until kmail is started
- DCOPReply reply = DCOPRef( "kmail", "KMailIface" ).call( "dcopAddMessage", QString::null, QString::null);
+ DCOPReply reply = DCOPRef( "kmail", "KMailIface" ).call( "dcopAddMessage", TQString::null, TQString::null);
if ( !reply.isValid() ) return false;
reply = DCOPRef( "kmail", "KMailIface" ).call( "dcopResetAddMessage" );
diff --git a/kmailcvt/filters.hxx b/kmailcvt/filters.hxx
index 10bb5c30b..203f3d7bb 100644
--- a/kmailcvt/filters.hxx
+++ b/kmailcvt/filters.hxx
@@ -22,68 +22,68 @@
#define MAX_LINE 4096
#endif
-#include <qcombobox.h>
-#include <qprogressbar.h>
-#include <qptrlist.h>
-#include <qlistbox.h>
-#include <qlabel.h>
+#include <tqcombobox.h>
+#include <tqprogressbar.h>
+#include <tqptrlist.h>
+#include <tqlistbox.h>
+#include <tqlabel.h>
#include "kimportpagedlg.h"
class FilterInfo
{
public:
- FilterInfo(KImportPageDlg *dlg, QWidget *parent, bool _removeDupMsg);
+ FilterInfo(KImportPageDlg *dlg, TQWidget *parent, bool _removeDupMsg);
~FilterInfo();
- void setStatusMsg( const QString& status );
- void setFrom( const QString& from );
- void setTo( const QString& to );
- void setCurrent( const QString& current );
+ void setStatusMsg( const TQString& status );
+ void setFrom( const TQString& from );
+ void setTo( const TQString& to );
+ void setCurrent( const TQString& current );
void setCurrent( int percent = 0 );
void setOverall( int percent = 0 );
- void addLog( const QString& log );
+ void addLog( const TQString& log );
void clear();
- void alert( const QString& message );
+ void alert( const TQString& message );
static void terminateASAP();
bool shouldTerminate();
- QWidget *parent() { return m_parent; }
+ TQWidget *parent() { return m_parent; }
bool removeDupMsg;
private:
KImportPageDlg *m_dlg;
- QWidget *m_parent;
+ TQWidget *m_parent;
static bool s_terminateASAP;
};
class Filter
{
public:
- Filter( const QString& name, const QString& author,
- const QString& info = QString::null );
+ Filter( const TQString& name, const TQString& author,
+ const TQString& info = TQString::null );
virtual ~Filter() {}
virtual void import( FilterInfo* ) = 0;
- QString author() const { return m_author; }
- QString name() const { return m_name; }
- QString info() const { return m_info; }
+ TQString author() const { return m_author; }
+ TQString name() const { return m_name; }
+ TQString info() const { return m_info; }
int count_duplicates; //to count all duplicate messages
protected:
bool addMessage( FilterInfo* info,
- const QString& folder,
- const QString& msgFile,
- const QString& msgStatusFlags = QString());
+ const TQString& folder,
+ const TQString& msgFile,
+ const TQString& msgStatusFlags = TQString());
bool addMessage_fastImport( FilterInfo* info,
- const QString& folder,
- const QString& msgFile,
- const QString& msgStatusFlags = QString());
+ const TQString& folder,
+ const TQString& msgFile,
+ const TQString& msgStatusFlags = TQString());
bool endImport();
private:
- QString m_name;
- QString m_author;
- QString m_info;
+ TQString m_name;
+ TQString m_author;
+ TQString m_info;
};
@@ -94,8 +94,8 @@ class Filter
template <unsigned int size> class FolderStructureBase
{
public:
- typedef QString NString[size];
- /** Constructor. Need a default constructor for QValueList. */
+ typedef TQString NString[size];
+ /** Constructor. Need a default constructor for TQValueList. */
FolderStructureBase() {} ;
/** Constructor. Turn N QStrings into a folder structure
@@ -124,19 +124,19 @@ public:
/** Access the different fields. There doesn't seem to
* be a real semantics for the fields.
*/
- const QString operator [](unsigned int i) const
+ const TQString operator [](unsigned int i) const
{
- if (i<size) return d[i]; else return QString::null;
+ if (i<size) return d[i]; else return TQString::null;
} ;
/** Access the different fields, for writing. */
- QString &operator [](unsigned int i)
+ TQString &operator [](unsigned int i)
{
Q_ASSERT(i<size);
if (i<size) return d[i]; else return d[0];
} ;
private:
- QString d[size];
+ TQString d[size];
} ;
#endif
diff --git a/kmailcvt/kimportpage.cpp b/kmailcvt/kimportpage.cpp
index d82571769..62e5b7de7 100644
--- a/kmailcvt/kimportpage.cpp
+++ b/kmailcvt/kimportpage.cpp
@@ -17,11 +17,11 @@
#include <kapplication.h>
#include <kstandarddirs.h>
-#include <qlabel.h>
+#include <tqlabel.h>
#include "kimportpage.h"
-KImportPage::KImportPage(QWidget *parent, const char *name ) : KImportPageDlg(parent,name) {
+KImportPage::KImportPage(TQWidget *parent, const char *name ) : KImportPageDlg(parent,name) {
mIntroSidebar->setPixmap(locate("data", "kmailcvt/pics/step1.png"));
}
diff --git a/kmailcvt/kimportpage.h b/kmailcvt/kimportpage.h
index 9ab402f8e..0b014824f 100644
--- a/kmailcvt/kimportpage.h
+++ b/kmailcvt/kimportpage.h
@@ -23,7 +23,7 @@
class KImportPage : public KImportPageDlg {
Q_OBJECT
public:
- KImportPage(QWidget *parent=0, const char *name=0);
+ KImportPage(TQWidget *parent=0, const char *name=0);
~KImportPage();
};
diff --git a/kmailcvt/kmailcvt.cpp b/kmailcvt/kmailcvt.cpp
index 840715de0..08dabe830 100644
--- a/kmailcvt/kmailcvt.cpp
+++ b/kmailcvt/kmailcvt.cpp
@@ -16,11 +16,11 @@
#include "kmailcvt.h"
#include <kaboutapplication.h>
-#include <qpushbutton.h>
+#include <tqpushbutton.h>
#include "filters.hxx"
-KMailCVT::KMailCVT(QWidget *parent, const char *name)
+KMailCVT::KMailCVT(TQWidget *parent, const char *name)
: KWizard(parent, name, true) {
setCaption( i18n( "KMailCVT Import Tool" ) );
diff --git a/kmailcvt/kmailcvt.h b/kmailcvt/kmailcvt.h
index 1875fa5fc..b4ff16ac5 100644
--- a/kmailcvt/kmailcvt.h
+++ b/kmailcvt/kmailcvt.h
@@ -28,7 +28,7 @@
class KMailCVT : public KWizard {
Q_OBJECT
public:
- KMailCVT(QWidget* parent=0, const char *name=0);
+ KMailCVT(TQWidget* parent=0, const char *name=0);
~KMailCVT();
virtual void next();
diff --git a/kmailcvt/kselfilterpage.cpp b/kmailcvt/kselfilterpage.cpp
index 1fa13b139..a3f1a9b9d 100644
--- a/kmailcvt/kselfilterpage.cpp
+++ b/kmailcvt/kselfilterpage.cpp
@@ -16,8 +16,8 @@
***************************************************************************/
#include <kstandarddirs.h>
-#include <qtextedit.h>
-#include <qcheckbox.h>
+#include <tqtextedit.h>
+#include <tqcheckbox.h>
#include <klocale.h>
#include "filters.hxx"
@@ -38,11 +38,11 @@
#include "kselfilterpage.h"
-KSelFilterPage::KSelFilterPage(QWidget *parent, const char *name ) : KSelFilterPageDlg(parent,name) {
+KSelFilterPage::KSelFilterPage(TQWidget *parent, const char *name ) : KSelFilterPageDlg(parent,name) {
mIntroSidebar->setPixmap(locate("data", "kmailcvt/pics/step1.png"));
mFilterList.setAutoDelete( TRUE );
- connect(mFilterCombo, SIGNAL(activated(int)), SLOT(filterSelected(int)));
+ connect(mFilterCombo, TQT_SIGNAL(activated(int)), TQT_SLOT(filterSelected(int)));
// Add new filters below. If this annoys you, please rewrite the stuff to use a factory.
// The former approach was overengineered and only worked around problems in the design
@@ -70,8 +70,8 @@ KSelFilterPage::~KSelFilterPage() {
void KSelFilterPage::filterSelected(int i)
{
- QString info = mFilterList.at(i)->info();
- QString author = mFilterList.at(i)->author();
+ TQString info = mFilterList.at(i)->info();
+ TQString author = mFilterList.at(i)->author();
if(!author.isEmpty())
info += i18n("<p><i>Written by %1.</i></p>").arg(author);
mDesc->setText(info);
diff --git a/kmailcvt/kselfilterpage.h b/kmailcvt/kselfilterpage.h
index a91360d5f..17e5958e7 100644
--- a/kmailcvt/kselfilterpage.h
+++ b/kmailcvt/kselfilterpage.h
@@ -26,14 +26,14 @@ template <class T> class QPtrList;
class KSelFilterPage : public KSelFilterPageDlg {
Q_OBJECT
public:
- KSelFilterPage(QWidget *parent=0, const char *name=0);
+ KSelFilterPage(TQWidget *parent=0, const char *name=0);
~KSelFilterPage();
public:
void addFilter(Filter *f);
Filter *getSelectedFilter(void);
bool removeDupMsg_checked();
private:
- QPtrList<Filter> mFilterList;
+ TQPtrList<Filter> mFilterList;
private slots:
void filterSelected(int i);
};
diff --git a/kmobile/devices/gnokii/gnokii_mobile.cpp b/kmobile/devices/gnokii/gnokii_mobile.cpp
index 871442847..7061493ac 100644
--- a/kmobile/devices/gnokii/gnokii_mobile.cpp
+++ b/kmobile/devices/gnokii/gnokii_mobile.cpp
@@ -21,9 +21,9 @@
#include <config.h>
#endif
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qdir.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqdir.h>
#include <klibloader.h>
#include <kconfig.h>
@@ -48,7 +48,7 @@
#define GNOKII_CHECK_ERROR(error) \
do { \
if (error) \
- PRINT_DEBUG << QString("ERROR %1: %2\n").arg(error).arg(gn_error_print(error));\
+ PRINT_DEBUG << TQString("ERROR %1: %2\n").arg(error).arg(gn_error_print(error));\
} while (0)
@@ -56,8 +56,8 @@
K_EXPORT_COMPONENT_FACTORY( libkmobile_gnokii, KMobileGnokii() )
/* createObject needs to be reimplemented by every KMobileDevice driver */
-QObject *KMobileGnokii::createObject( QObject *parent, const char *name,
- const char *, const QStringList &args )
+TQObject *KMobileGnokii::createObject( TQObject *parent, const char *name,
+ const char *, const TQStringList &args )
{
return new KMobileGnokii( parent, name, args );
}
@@ -66,7 +66,7 @@ QObject *KMobileGnokii::createObject( QObject *parent, const char *name,
static char *BinDir;
static char *lockfile = NULL;
static char model[GN_MODEL_MAX_LENGTH+1], revision[GN_REVISION_MAX_LENGTH+1], imei[GN_IMEI_MAX_LENGTH+1];
-static QString PhoneProductId;
+static TQString PhoneProductId;
static gn_statemachine state;
static gn_data data;
@@ -77,7 +77,7 @@ static gn_calnote_list calnote_list;
* The KDE gnokii mobile device driver.
*/
-KMobileGnokii::KMobileGnokii(QObject *obj, const char *name, const QStringList &args )
+KMobileGnokii::KMobileGnokii(TQObject *obj, const char *name, const TQStringList &args )
: KMobileDevice(obj, name, args)
{
// set initial device info
@@ -103,7 +103,7 @@ KMobileGnokii::KMobileGnokii(QObject *obj, const char *name, const QStringList &
m_baud = "9600";
}
- PRINT_DEBUG << QString("Using GNOKII configuration: %1 %2 %3 %4\n").arg(m_modelnr)
+ PRINT_DEBUG << TQString("Using GNOKII configuration: %1 %2 %3 %4\n").arg(m_modelnr)
.arg(m_connection).arg(m_port).arg(m_baud);
saveDeviceConfiguration();
@@ -119,7 +119,7 @@ KMobileGnokii::~KMobileGnokii()
* GNOKII lowlevel interface
******************************************************************************************/
-static gn_connection_type connectionToValue( QString connectionName )
+static gn_connection_type connectionToValue( TQString connectionName )
{
if (connectionName == "serial")
return GN_CT_Serial;
@@ -154,7 +154,7 @@ bool KMobileGnokii::setGnokiiStateMachine()
return true;
}
-bool KMobileGnokii::saveConfig( KConfig &conf, QString group )
+bool KMobileGnokii::saveConfig( KConfig &conf, TQString group )
{
conf.setGroup(group);
conf.writeEntry("model", m_modelnr );
@@ -170,7 +170,7 @@ bool KMobileGnokii::saveConfig( KConfig &conf, QString group )
return true;
}
-bool KMobileGnokii::loadConfig( KConfig &conf, QString group )
+bool KMobileGnokii::loadConfig( KConfig &conf, TQString group )
{
conf.setGroup(group);
m_modelnr = conf.readEntry("model", m_modelnr );
@@ -182,13 +182,13 @@ bool KMobileGnokii::loadConfig( KConfig &conf, QString group )
bool KMobileGnokii::saveGnokiiConfiguration()
{
- KConfig conf( QDir::homeDirPath() + "/.gnokiirc", false, false, "" );
+ KConfig conf( TQDir::homeDirPath() + "/.gnokiirc", false, false, "" );
return saveConfig( conf, "global" );
}
bool KMobileGnokii::loadGnokiiConfiguration()
{
- KConfig conf( QDir::homeDirPath() + "/.gnokiirc", true, false, "" );
+ KConfig conf( TQDir::homeDirPath() + "/.gnokiirc", true, false, "" );
return loadConfig( conf, "global" );
}
@@ -209,7 +209,7 @@ static void busterminate(void)
if (lockfile) gn_device_unlock(lockfile);
}
-static QString businit(void)
+static TQString businit(void)
{
gn_error error;
char *aux;
@@ -264,12 +264,12 @@ static QString businit(void)
GNOKII_CHECK_ERROR(error);
data.imei = NULL;
- GNOKII_DEBUG( QString("Found mobile phone: Model: %1, Revision: %2, IMEI: %3\n")
+ GNOKII_DEBUG( TQString("Found mobile phone: Model: %1, Revision: %2, IMEI: %3\n")
.arg(model).arg(revision).arg(imei) );
- PhoneProductId = QString("%1-%2-%3-%4").arg(APP).arg(model).arg(revision).arg(imei);
+ PhoneProductId = TQString("%1-%2-%3-%4").arg(APP).arg(model).arg(revision).arg(imei);
- return QString::null;
+ return TQString::null;
}
@@ -298,7 +298,7 @@ static gn_error read_phone_memstat( gn_memory_type memtype, gn_memory_status *me
break;
}
}
- GNOKII_DEBUG( QString("\n\nMobile phone memory status: Type: %1, used=%2, free=%3, total=%4\n\n")
+ GNOKII_DEBUG( TQString("\n\nMobile phone memory status: Type: %1, used=%2, free=%3, total=%4\n\n")
.arg(memtype).arg(memstat->used).arg(memstat->free).arg(memstat->used+memstat->free) );
return error;
}
@@ -360,8 +360,8 @@ static int gn_error2kio_error( gn_error err )
static gn_error read_phone_entry_highlevel( int index, const gn_memory_type memtype, KABC::Addressee *a )
{
gn_phonebook_entry entry;
- QStringList addrlist;
- QString s, country;
+ TQStringList addrlist;
+ TQString s, country;
KABC::Address *addr;
gn_error error;
@@ -372,21 +372,21 @@ static gn_error read_phone_entry_highlevel( int index, const gn_memory_type memt
if (error != GN_ERR_NONE)
return error;
- GNOKII_DEBUG(QString("%1: %2, num=%3, location=%4, group=%5, count=%6\n").arg(index).arg(entry.name)
+ GNOKII_DEBUG(TQString("%1: %2, num=%3, location=%4, group=%5, count=%6\n").arg(index).arg(entry.name)
.arg(entry.number).arg(entry.location).arg(entry.caller_group).arg(entry.subentries_count));
// try to split Name into FamilyName and GivenName
- s = QString(entry.name).simplifyWhiteSpace();
+ s = TQString(entry.name).simplifyWhiteSpace();
a->setFormattedName(s);
if (s.find(',')!=-1) {
- addrlist = QStringList::split(',', s);
+ addrlist = TQStringList::split(',', s);
if (addrlist.count()==2) {
a->setFamilyName(addrlist[0].simplifyWhiteSpace());
a->setGivenName(addrlist[1].simplifyWhiteSpace());
} else
a->setGivenName(s);
} else {
- addrlist = QStringList::split(' ', s);
+ addrlist = TQStringList::split(' ', s);
if (addrlist.count()==2) {
a->setFamilyName(addrlist[1].simplifyWhiteSpace());
a->setGivenName(addrlist[0].simplifyWhiteSpace());
@@ -395,19 +395,19 @@ static gn_error read_phone_entry_highlevel( int index, const gn_memory_type memt
}
a->insertCustom(APP, "X_GSM_CALLERGROUP", s.setNum(entry.caller_group));
- a->insertCustom(APP, "X_GSM_STORE_AT", QString("%1_%2").arg(GN_MT_ME).arg(entry.location));
+ a->insertCustom(APP, "X_GSM_STORE_AT", TQString("%1_%2").arg(GN_MT_ME).arg(entry.location));
// set ProductId
a->setProductId(PhoneProductId);
// evaluate timestamp (ignore timezone)
- QDateTime datetime;
+ TQDateTime datetime;
if (entry.date.year<1998)
- datetime = QDateTime::currentDateTime();
+ datetime = TQDateTime::currentDateTime();
else
- datetime = QDateTime( QDate(entry.date.year, entry.date.month, entry.date.day),
- QTime(entry.date.hour, entry.date.minute, entry.date.second) );
- GNOKII_DEBUG(QString(" date=%1\n").arg(datetime.toString()));
+ datetime = TQDateTime( TQDate(entry.date.year, entry.date.month, entry.date.day),
+ TQTime(entry.date.hour, entry.date.minute, entry.date.second) );
+ GNOKII_DEBUG(TQString(" date=%1\n").arg(datetime.toString()));
a->setRevision(datetime);
if (!entry.subentries_count)
@@ -416,8 +416,8 @@ static gn_error read_phone_entry_highlevel( int index, const gn_memory_type memt
/* scan sub-entries */
if (entry.subentries_count)
for (int n=0; n<entry.subentries_count; n++) {
- QString s = QString(entry.subentries[n].data.number).simplifyWhiteSpace();
- GNOKII_DEBUG(QString(" Subentry#%1, entry_type=%2, number_type=%3, number=%4\n")
+ TQString s = TQString(entry.subentries[n].data.number).simplifyWhiteSpace();
+ GNOKII_DEBUG(TQString(" Subentry#%1, entry_type=%2, number_type=%3, number=%4\n")
.arg(n).arg(entry.subentries[n].entry_type)
.arg(entry.subentries[n].number_type).arg(s));
if (s.isEmpty())
@@ -430,7 +430,7 @@ static gn_error read_phone_entry_highlevel( int index, const gn_memory_type memt
a->insertEmail(s);
break;
case GN_PHONEBOOK_ENTRY_Postal:
- addrlist = QStringList::split(',', s, true);
+ addrlist = TQStringList::split(',', s, true);
addr = new KABC::Address(KABC::Address::Work);
switch (addrlist.count()) {
case 4: addr->setStreet(addrlist[0].simplifyWhiteSpace());
@@ -477,7 +477,7 @@ static gn_error read_phone_entry_highlevel( int index, const gn_memory_type memt
a->insertCategory(s);
break;
default:
- GNOKII_DEBUG(QString(" Not handled id=%1, entry=%2\n")
+ GNOKII_DEBUG(TQString(" Not handled id=%1, entry=%2\n")
.arg(entry.subentries[n].entry_type).arg(s));
break;
} // switch()
@@ -494,32 +494,32 @@ static gn_error read_phone_entry_highlevel( int index, const gn_memory_type memt
// connect the device and ask user to turn device on (if necessary)
-bool KMobileGnokii::connectDevice(QWidget * /*parent*/)
+bool KMobileGnokii::connectDevice(TQWidget * /*parent*/)
{
if (connected())
return true;
- QString err = businit();
+ TQString err = businit();
m_connected = err.isEmpty();
- PRINT_DEBUG << QString("connectDevice() : %1\n").arg(m_connected ? "Ok" : err);
+ PRINT_DEBUG << TQString("connectDevice() : %1\n").arg(m_connected ? "Ok" : err);
return m_connected;
}
// disconnect the device and return true, if sucessful
-bool KMobileGnokii::disconnectDevice(QWidget * /*parent*/)
+bool KMobileGnokii::disconnectDevice(TQWidget * /*parent*/)
{
if (!connected())
return true;
busterminate();
m_connected = false;
- PRINT_DEBUG << QString("disconnectDevice() : %1\n").arg("done");
+ PRINT_DEBUG << TQString("disconnectDevice() : %1\n").arg("done");
return true;
}
// provice the own configuration dialog
-bool KMobileGnokii::configDialog(QWidget *parent)
+bool KMobileGnokii::configDialog(TQWidget *parent)
{
- QString model, connection, port, baud;
+ TQString model, connection, port, baud;
int ok = 0;
GnokiiConfig *dialog = new GnokiiConfig(parent);
if (dialog) {
@@ -528,7 +528,7 @@ bool KMobileGnokii::configDialog(QWidget *parent)
}
dialog->getValues(model, connection, port, baud);
delete dialog;
- if (ok == QDialog::Accepted) {
+ if (ok == TQDialog::Accepted) {
m_modelnr = model;
m_connection = connection;
m_port = port;
@@ -538,16 +538,16 @@ bool KMobileGnokii::configDialog(QWidget *parent)
return true;
}
-QString KMobileGnokii::iconFileName() const
+TQString KMobileGnokii::iconFileName() const
{
return "mobile_phone";
}
// return a unique ID, e.g. the IMEI number of phones, or a serial number
// this String is used to have a unique identification for syncronisation.
-QString KMobileGnokii::deviceUniqueID()
+TQString KMobileGnokii::deviceUniqueID()
{
- return QString("GNOKII-IMEI-%1").arg(QString::fromLocal8Bit(imei));
+ return TQString("GNOKII-IMEI-%1").arg(TQString::fromLocal8Bit(imei));
}
@@ -587,7 +587,7 @@ int KMobileGnokii::numAddresses()
int KMobileGnokii::readAddress( int index, KABC::Addressee &addr )
{
- PRINT_DEBUG << QString("############ GET ADDRESS #%1\n").arg(index);
+ PRINT_DEBUG << TQString("############ GET ADDRESS #%1\n").arg(index);
// index is zero-based, but in gnokii the first address starts at 1
if (index<0 || index>=numAddresses())
return KIO::ERR_DOES_NOT_EXIST;
@@ -619,7 +619,7 @@ int KMobileGnokii::storeAddress( int, const KABC::Addressee &, bool )
* Calendar support *
**********************************************************************************/
-static void QDateTime_2_timestamp( const QDateTime &qdt, gn_timestamp &ts )
+static void QDateTime_2_timestamp( const TQDateTime &qdt, gn_timestamp &ts )
{
ts.year = qdt.date().year();
ts.month = qdt.date().month();
@@ -630,10 +630,10 @@ static void QDateTime_2_timestamp( const QDateTime &qdt, gn_timestamp &ts )
ts.timezone = 0;
}
-static QDateTime timestamp_2_QDateTime( const gn_timestamp &ts )
+static TQDateTime timestamp_2_QDateTime( const gn_timestamp &ts )
{
- return QDateTime( QDate(ts.year, ts.month, ts.day),
- QTime(ts.hour, ts.minute, ts.second) );
+ return TQDateTime( TQDate(ts.year, ts.month, ts.day),
+ TQTime(ts.hour, ts.minute, ts.second) );
}
static void print_calnote( const gn_calnote &entry )
@@ -700,11 +700,11 @@ int KMobileGnokii::readCalendarEntry( int index, KCal::Event &event )
print_calnote( entry );
- QDateTime dt_start = timestamp_2_QDateTime(entry.time);
- QDateTime dt_end = dt_start.addSecs( 60*60 ); // XXX: assume one hour
+ TQDateTime dt_start = timestamp_2_QDateTime(entry.time);
+ TQDateTime dt_end = dt_start.addSecs( 60*60 ); // XXX: assume one hour
event.setDtStart( dt_start );
event.setDtEnd( dt_end );
- event.setSummary( QString::fromUtf8(entry.text) );
+ event.setSummary( TQString::fromUtf8(entry.text) );
// type:
switch (entry.type) {
@@ -713,7 +713,7 @@ int KMobileGnokii::readCalendarEntry( int index, KCal::Event &event )
break;
case GN_CALNOTE_CALL:
event.setCategories(i18n("PHONE CALL"));
- event.setDescription(QString::fromUtf8(entry.phone_number));
+ event.setDescription(TQString::fromUtf8(entry.phone_number));
break;
case GN_CALNOTE_BIRTHDAY:
event.setCategories(i18n("BIRTHDAY"));
@@ -727,7 +727,7 @@ int KMobileGnokii::readCalendarEntry( int index, KCal::Event &event )
// alarm:
if (entry.alarm.enabled) {
- QDateTime at = timestamp_2_QDateTime(entry.alarm.timestamp);
+ TQDateTime at = timestamp_2_QDateTime(entry.alarm.timestamp);
if (at.isValid() && dt_start.isValid()) {
int seconds = abs(at.secsTo(dt_start));
seconds %= 60*60*24; /* max. 1 day in advance... */
@@ -805,7 +805,7 @@ int KMobileGnokii::storeCalendarEntry( int index, const KCal::Event &event )
QDateTime_2_timestamp( eventalarm->time(), entry.alarm.timestamp );
} else
if (eventalarm->hasStartOffset()) {
- QDateTime dt = event.dtStart();
+ TQDateTime dt = event.dtStart();
dt = dt.addSecs(-eventalarm->startOffset().asSeconds());
QDateTime_2_timestamp( dt, entry.alarm.timestamp );
}
@@ -858,13 +858,13 @@ int KMobileGnokii::numNotes()
return 100; /* we simulate one address */
}
-int KMobileGnokii::readNote( int index, QString &note )
+int KMobileGnokii::readNote( int index, TQString &note )
{
// index is zero-based, and we only have one simulated note
if (index<0 || index>=numNotes())
return KIO::ERR_DOES_NOT_EXIST;
- note = QString("NOTE #%1\n"
+ note = TQString("NOTE #%1\n"
"--------\n"
"This is a sample note #%2\n\n"
"DeviceClassName: %3\n"
diff --git a/kmobile/devices/gnokii/gnokii_mobile.h b/kmobile/devices/gnokii/gnokii_mobile.h
index fdc61e30e..6be2196a0 100644
--- a/kmobile/devices/gnokii/gnokii_mobile.h
+++ b/kmobile/devices/gnokii/gnokii_mobile.h
@@ -31,24 +31,24 @@ class KMobileGnokii : public KMobileDevice
{
Q_OBJECT
public:
- KMobileGnokii( QObject *obj=0, const char *name=0, const QStringList &args=QStringList() );
+ KMobileGnokii( TQObject *obj=0, const char *name=0, const TQStringList &args=TQStringList() );
~KMobileGnokii();
// createObject needs to be reimplemented by every KMobileDevice driver
- 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() );
// connect, disconnect and current status
- bool connectDevice(QWidget *parent);
- bool disconnectDevice(QWidget *parent);
+ bool connectDevice(TQWidget *parent);
+ bool disconnectDevice(TQWidget *parent);
// provide a device-specific configure dialog
- bool configDialog(QWidget *parent);
+ bool configDialog(TQWidget *parent);
// filename and path to gnokii-icon
- QString iconFileName() const;
+ TQString iconFileName() const;
- QString deviceUniqueID();
+ TQString deviceUniqueID();
/*
* Addressbook / Phonebook support
@@ -68,23 +68,23 @@ public:
* Notes support
*/
int numNotes();
- int readNote( int index, QString &note );
+ int readNote( int index, TQString &note );
signals:
void connectionChanged( bool connected );
- void message( int msgLevel, const QString &msg );
+ void message( int msgLevel, const TQString &msg );
protected:
bool setGnokiiStateMachine();
- bool saveConfig( KConfig &conf, QString group );
- bool loadConfig( KConfig &conf, QString group );
+ bool saveConfig( KConfig &conf, TQString group );
+ bool loadConfig( KConfig &conf, TQString group );
bool saveGnokiiConfiguration();
bool loadGnokiiConfiguration();
bool saveDeviceConfiguration();
bool loadDeviceConfiguration();
private:
- QString m_modelnr, m_connection, m_port, m_baud;
+ TQString m_modelnr, m_connection, m_port, m_baud;
int m_numAddresses;
KABC::Addressee::List m_addrList;
diff --git a/kmobile/devices/gnokii/gnokiiconfig.cpp b/kmobile/devices/gnokii/gnokiiconfig.cpp
index 780dc23ce..07bc46f46 100644
--- a/kmobile/devices/gnokii/gnokiiconfig.cpp
+++ b/kmobile/devices/gnokii/gnokiiconfig.cpp
@@ -17,11 +17,11 @@
*/
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qlabel.h>
-#include <qwidget.h>
-#include <qcombobox.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqlabel.h>
+#include <tqwidget.h>
+#include <tqcombobox.h>
#include "gnokiiconfigui.h"
#include "gnokiiconfig.h"
@@ -43,19 +43,19 @@
#define BAUDRATES "57600 38400 19200 14400 9600 4800 2400"
-GnokiiConfig::GnokiiConfig( QWidget* parent, const char* name, bool modal, WFlags fl )
+GnokiiConfig::GnokiiConfig( TQWidget* parent, const char* name, bool modal, WFlags fl )
: GnokiiConfigUI(parent, name, modal, fl)
{
- QStringList list = QStringList::split(" ", MODELS);
+ TQStringList list = TQStringList::split(" ", MODELS);
cb_Model->insertStringList(list);
- list = QStringList::split(" ", CONNECTIONS);
+ list = TQStringList::split(" ", CONNECTIONS);
cb_Connection->insertStringList(list);
- list = QStringList::split(" ", AVAILABLE_PORTS);
+ list = TQStringList::split(" ", AVAILABLE_PORTS);
cb_Port->insertStringList(list);
- list = QStringList::split(" ", BAUDRATES);
+ list = TQStringList::split(" ", BAUDRATES);
cb_Baud->insertStringList(list);
}
@@ -63,7 +63,7 @@ GnokiiConfig::~GnokiiConfig()
{
}
-void GnokiiConfig::setValues(const QString &model, const QString &connection, const QString &port, const QString &baud)
+void GnokiiConfig::setValues(const TQString &model, const TQString &connection, const TQString &port, const TQString &baud)
{
cb_Model->setCurrentText(model);
cb_Connection->setCurrentText(connection);
@@ -72,10 +72,10 @@ void GnokiiConfig::setValues(const QString &model, const QString &connection, co
slotCheckValues();
- connect( cb_Connection, SIGNAL(textChanged(const QString &)), this, SLOT(slotCheckValues(const QString &)) );
+ connect( cb_Connection, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(slotCheckValues(const TQString &)) );
}
-void GnokiiConfig::getValues(QString &model, QString &connection, QString &port, QString &baud) const
+void GnokiiConfig::getValues(TQString &model, TQString &connection, TQString &port, TQString &baud) const
{
model = cb_Model->currentText();
connection = cb_Connection->currentText();
@@ -83,9 +83,9 @@ void GnokiiConfig::getValues(QString &model, QString &connection, QString &port,
baud = cb_Baud->currentText();
}
-void GnokiiConfig::slotCheckValues(const QString &txt)
+void GnokiiConfig::slotCheckValues(const TQString &txt)
{
- bool disable_serial = (QString("infrared irda").find(txt,0,false)>=0);
+ bool disable_serial = (TQString("infrared irda").find(txt,0,false)>=0);
textLabelBaudRate->setDisabled(disable_serial);
cb_Baud->setDisabled(disable_serial);
}
diff --git a/kmobile/devices/gnokii/gnokiiconfig.h b/kmobile/devices/gnokii/gnokiiconfig.h
index 662386010..30f548bf3 100644
--- a/kmobile/devices/gnokii/gnokiiconfig.h
+++ b/kmobile/devices/gnokii/gnokiiconfig.h
@@ -19,7 +19,7 @@
#ifndef GNOKIICONFIG_H
#define GNOKIICONFIG_H
-#include <qobject.h>
+#include <tqobject.h>
#include <gnokiiconfigui.h>
@@ -27,15 +27,15 @@ class GnokiiConfig : public GnokiiConfigUI
{
Q_OBJECT
public:
- GnokiiConfig( QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
+ GnokiiConfig( TQWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
~GnokiiConfig();
- void setValues(const QString &model, const QString &connection, const QString &port, const QString &baud);
- void getValues(QString &model, QString &connection, QString &port, QString &baud) const;
+ void setValues(const TQString &model, const TQString &connection, const TQString &port, const TQString &baud);
+ void getValues(TQString &model, TQString &connection, TQString &port, TQString &baud) const;
private slots:
void slotCheckValues();
- void slotCheckValues(const QString &);
+ void slotCheckValues(const TQString &);
};
#endif
diff --git a/kmobile/devices/skeleton/skeleton.cpp b/kmobile/devices/skeleton/skeleton.cpp
index 122e2af20..e6b1d9c59 100644
--- a/kmobile/devices/skeleton/skeleton.cpp
+++ b/kmobile/devices/skeleton/skeleton.cpp
@@ -17,8 +17,8 @@
*/
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
#include <klibloader.h>
#include <kstandarddirs.h>
@@ -35,8 +35,8 @@
K_EXPORT_COMPONENT_FACTORY( libkmobile_skeleton, KMobileSkeleton() )
/* createObject needs to be reimplemented by every KMobileDevice driver */
-QObject *KMobileSkeleton::createObject( QObject *parent, const char *name,
- const char *, const QStringList &args )
+TQObject *KMobileSkeleton::createObject( TQObject *parent, const char *name,
+ const char *, const TQStringList &args )
{
return new KMobileSkeleton( parent, name, args );
}
@@ -46,7 +46,7 @@ QObject *KMobileSkeleton::createObject( QObject *parent, const char *name,
* The KDE skeleton mobile device driver.
*/
-KMobileSkeleton::KMobileSkeleton(QObject *obj, const char *name, const QStringList &args )
+KMobileSkeleton::KMobileSkeleton(TQObject *obj, const char *name, const TQStringList &args )
: KMobileDevice(obj, name, args)
{
// set initial device info
@@ -61,7 +61,7 @@ KMobileSkeleton::~KMobileSkeleton()
}
// connect the device and ask user to turn device on (if necessary)
-bool KMobileSkeleton::connectDevice(QWidget *parent)
+bool KMobileSkeleton::connectDevice(TQWidget *parent)
{
if (KMessageBox::Continue != KMessageBox::warningContinueCancel(parent,
i18n("Please turn on your %1 on now and press continue to proceed.").arg(m_deviceName),
@@ -73,7 +73,7 @@ bool KMobileSkeleton::connectDevice(QWidget *parent)
}
// disconnect the device and return true, if sucessful
-bool KMobileSkeleton::disconnectDevice(QWidget *)
+bool KMobileSkeleton::disconnectDevice(TQWidget *)
{
m_connected = true;
return true;
@@ -87,12 +87,12 @@ bool KMobileSkeleton::isReadOnly() const
// return a unique ID, e.g. the IMEI number of phones, or a serial number
// this String is used to have a unique identification for syncronisation.
-QString KMobileSkeleton::deviceUniqueID()
+TQString KMobileSkeleton::deviceUniqueID()
{
- return QString::fromLocal8Bit("SkElEtOn-123456789");
+ return TQString::fromLocal8Bit("SkElEtOn-123456789");
}
-QString KMobileSkeleton::iconFileName() const
+TQString KMobileSkeleton::iconFileName() const
{
return "mobile_unknown"; /* KMOBILE_ICON_UNKNOWN */
}
@@ -112,11 +112,11 @@ int KMobileSkeleton::readAddress( int index, KABC::Addressee &addr )
return KIO::ERR_DOES_NOT_EXIST;
// now build our own sample name
- addr.setFamilyName(QString("Meyer_%1").arg(index+1));
+ addr.setFamilyName(TQString("Meyer_%1").arg(index+1));
addr.setGivenName("Peter");
addr.setFormattedName("Peter "+addr.familyName());
addr.setNickName("PeterM");
- addr.setBirthday(QDateTime(QDate(1970,7,22)));
+ addr.setBirthday(TQDateTime(TQDate(1970,7,22)));
addr.setRole("KDE Software Developer");
addr.setOrganization("KDE.ORG");
addr.setNote("the best KDE developer ever");
@@ -125,7 +125,7 @@ int KMobileSkeleton::readAddress( int index, KABC::Addressee &addr )
addr.insertPhoneNumber(KABC::PhoneNumber("+49 6110 12345"));
// the Revision might be important for syncronisations
- addr.setRevision(QDateTime(QDate(2003,1,1)));
+ addr.setRevision(TQDateTime(TQDate(2003,1,1)));
return 0;
}
@@ -144,13 +144,13 @@ int KMobileSkeleton::numNotes()
return 100;
}
-int KMobileSkeleton::readNote( int index, QString &note )
+int KMobileSkeleton::readNote( int index, TQString &note )
{
// index is zero-based, and we only have one simulated note
if (index<0 || index>=numNotes())
return KIO::ERR_DOES_NOT_EXIST;
- note = QString("NOTE #%1\n"
+ note = TQString("NOTE #%1\n"
"--------\n"
"This is a sample note #%2\n\n"
"DeviceClassName: %3\n"
diff --git a/kmobile/devices/skeleton/skeleton.h b/kmobile/devices/skeleton/skeleton.h
index eb0d7db0b..de57947a3 100644
--- a/kmobile/devices/skeleton/skeleton.h
+++ b/kmobile/devices/skeleton/skeleton.h
@@ -30,25 +30,25 @@ class KMobileSkeleton : public KMobileDevice
{
Q_OBJECT
public:
- KMobileSkeleton( QObject *obj=0, const char *name=0, const QStringList &args=QStringList() );
+ KMobileSkeleton( TQObject *obj=0, const char *name=0, const TQStringList &args=TQStringList() );
~KMobileSkeleton();
// createObject needs to be reimplemented by every KMobileDevice driver
- 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() );
// connect, disconnect and current status
- bool connectDevice(QWidget *parent);
- bool disconnectDevice(QWidget *parent);
+ bool connectDevice(TQWidget *parent);
+ bool disconnectDevice(TQWidget *parent);
// returns true, if this device is read-only (default: false)
bool isReadOnly() const;
// you may provide your own icon() implementation to display
// an appropriate Pixmap (e.g. a Palm Pilot or a Zaurus image).
- QString iconFileName() const;
+ TQString iconFileName() const;
- QString deviceUniqueID();
+ TQString deviceUniqueID();
/*
* Addressbook / Phonebook support
@@ -61,11 +61,11 @@ public:
* Notes support
*/
int numNotes();
- int readNote( int index, QString &note );
+ int readNote( int index, TQString &note );
signals:
void connectionChanged( bool connected );
- void message( int msgLevel, const QString &msg );
+ void message( int msgLevel, const TQString &msg );
};
#endif
diff --git a/kmobile/kioslave/kio_mobile.cpp b/kmobile/kioslave/kio_mobile.cpp
index ec987fb06..d32c11cb4 100644
--- a/kmobile/kioslave/kio_mobile.cpp
+++ b/kmobile/kioslave/kio_mobile.cpp
@@ -24,7 +24,7 @@
#include <unistd.h>
#include <time.h>
-#include <qregexp.h>
+#include <tqregexp.h>
#include <kdebug.h>
#include <klocale.h>
@@ -68,7 +68,7 @@ int kdemain(int argc, char **argv)
/**
* Initialize the mobile slave
*/
-KMobileProtocol::KMobileProtocol(const QCString &pool, const QCString &app)
+KMobileProtocol::KMobileProtocol(const TQCString &pool, const TQCString &app)
: SlaveBase( "mobile", pool, app)
{
}
@@ -80,14 +80,14 @@ KMobileProtocol::~KMobileProtocol()
/*
* getDeviceAndRessource("mobile:/<devicename>/<resource>/...") - split
*/
-int KMobileProtocol::getDeviceAndRessource(const QString &_path,
- QString &devName, QString &resource, QString &devPath,
+int KMobileProtocol::getDeviceAndRessource(const TQString &_path,
+ TQString &devName, TQString &resource, TQString &devPath,
KMobileDevice::Capabilities &devCaps)
{
-// PRINT_DEBUG << QString("###getDeviceAndRessource### %1\n").arg(_path);
- QStringList path = QStringList::split('/', _path, false);
+// PRINT_DEBUG << TQString("###getDeviceAndRessource### %1\n").arg(_path);
+ TQStringList path = TQStringList::split('/', _path, false);
- devName = resource = devPath = QString::null;
+ devName = resource = devPath = TQString::null;
devCaps = KMobileDevice::hasNothing;
if (path.count() >= 1) { devName = path[0]; path.pop_front(); };
@@ -108,7 +108,7 @@ int KMobileProtocol::getDeviceAndRessource(const QString &_path,
int cap = 1UL << i;
if ((_caps & cap) == 0)
continue;
- QString capname = m_dev.nameForCap(devName,cap);
+ TQString capname = m_dev.nameForCap(devName,cap);
if (capname != resource)
continue;
devCaps = (KMobileDevice::Capabilities) cap;
@@ -120,7 +120,7 @@ int KMobileProtocol::getDeviceAndRessource(const QString &_path,
static
-void addAtom(KIO::UDSEntry& entry, unsigned int ID, long l, const QString& s = QString::null)
+void addAtom(KIO::UDSEntry& entry, unsigned int ID, long l, const TQString& s = TQString::null)
{
KIO::UDSAtom atom;
atom.m_uds = ID;
@@ -130,7 +130,7 @@ void addAtom(KIO::UDSEntry& entry, unsigned int ID, long l, const QString& s = Q
}
static
-void createDirEntry(KIO::UDSEntry& entry, const QString& name, const QString& url, const QString& mime)
+void createDirEntry(KIO::UDSEntry& entry, const TQString& name, const TQString& url, const TQString& mime)
{
entry.clear();
addAtom(entry, KIO::UDS_NAME, 0, name);
@@ -140,13 +140,13 @@ void createDirEntry(KIO::UDSEntry& entry, const QString& name, const QString& ur
addAtom(entry, KIO::UDS_URL, 0, url);
addAtom(entry, KIO::UDS_USER, 0, getenv("USER"));
addAtom(entry, KIO::UDS_GROUP, 0, getenv("USER"));
- PRINT_DEBUG << QString("createDirEntry: File: %1 MIME: %2 URL: %3\n").arg(name).arg(mime).arg(url);
+ PRINT_DEBUG << TQString("createDirEntry: File: %1 MIME: %2 URL: %3\n").arg(name).arg(mime).arg(url);
// addAtom(entry, KIO::UDS_SIZE, 0);
addAtom(entry, KIO::UDS_GUESSED_MIME_TYPE, 0, mime);
}
static
-void createFileEntry(KIO::UDSEntry& entry, const QString& name, const QString& url, const QString& mime,
+void createFileEntry(KIO::UDSEntry& entry, const TQString& name, const TQString& url, const TQString& mime,
const unsigned long size = 0)
{
entry.clear();
@@ -159,7 +159,7 @@ void createFileEntry(KIO::UDSEntry& entry, const QString& name, const QString& u
addAtom(entry, KIO::UDS_MIME_TYPE, 0, mime);
if (size) addAtom(entry, KIO::UDS_SIZE, size);
addAtom(entry, KIO::UDS_GUESSED_MIME_TYPE, 0, mime);
- PRINT_DEBUG << QString("createFileEntry: File: %1, Size: %2, MIME: %3\n").arg(name).arg(size).arg(mime);
+ PRINT_DEBUG << TQString("createFileEntry: File: %1, Size: %2, MIME: %3\n").arg(name).arg(size).arg(mime);
}
@@ -169,10 +169,10 @@ void createFileEntry(KIO::UDSEntry& entry, const QString& name, const QString& u
void KMobileProtocol::get(const KURL &url)
{
PRINT_DEBUG << "###############################\n";
- PRINT_DEBUG << QString("get(%1)\n").arg(url.path());
+ PRINT_DEBUG << TQString("get(%1)\n").arg(url.path());
KMobileDevice::Capabilities devCaps;
- QString devName, resource, devPath;
+ TQString devName, resource, devPath;
int err = getDeviceAndRessource(url.path(), devName, resource, devPath, devCaps);
if (err) {
@@ -186,8 +186,8 @@ void KMobileProtocol::get(const KURL &url)
}
// collect the result
- QCString result;
- QString mime;
+ TQCString result;
+ TQString mime;
switch (devCaps) {
case KMobileDevice::hasAddressBook: err = getVCard(devName, result, mime, devPath);
break;
@@ -213,13 +213,13 @@ void KMobileProtocol::get(const KURL &url)
totalSize(processed_size);
// tell the contents of the URL
- QByteArray array;
+ TQByteArray array;
array.setRawData( result.data(), result.length() );
data(array);
array.resetRawData( result.data(), result.length() );
processedSize( processed_size );
// tell we are finished
- data(QByteArray());
+ data(TQByteArray());
// tell we are finished
finished();
@@ -231,11 +231,11 @@ void KMobileProtocol::get(const KURL &url)
*/
void KMobileProtocol::listRoot(const KURL& url)
{
- PRINT_DEBUG << QString("########## listRoot(%1) for %2:/\n").arg(url.path()).arg(url.protocol());
+ PRINT_DEBUG << TQString("########## listRoot(%1) for %2:/\n").arg(url.path()).arg(url.protocol());
KIO::UDSEntry entry;
- QStringList deviceNames = m_dev.deviceNames();
+ TQStringList deviceNames = m_dev.deviceNames();
unsigned int dirs = deviceNames.count();
totalSize(dirs);
@@ -251,7 +251,7 @@ void KMobileProtocol::listRoot(const KURL& url)
for (unsigned int i=0; i<dirs; i++) {
- QString devName = deviceNames[i];
+ TQString devName = deviceNames[i];
if (classMask != KMobileDevice::Unclassified &&
m_dev.classType(devName) != classMask)
@@ -271,9 +271,9 @@ void KMobileProtocol::listRoot(const KURL& url)
/*
* folderMimeType() - returns mimetype of the folder itself
*/
-QString KMobileProtocol::folderMimeType(int cap)
+TQString KMobileProtocol::folderMimeType(int cap)
{
- QString mimetype;
+ TQString mimetype;
switch (cap) {
case KMobileDevice::hasAddressBook: mimetype = KMOBILE_MIMETYPE_INODE "addressbook";
break;
@@ -290,9 +290,9 @@ QString KMobileProtocol::folderMimeType(int cap)
/*
* entryMimeType() - returns mimetype of the entries in the given folder
*/
-QString KMobileProtocol::entryMimeType(int cap)
+TQString KMobileProtocol::entryMimeType(int cap)
{
- QString mimetype;
+ TQString mimetype;
switch (cap) {
case KMobileDevice::hasAddressBook: mimetype = "text/x-vcard";
break;
@@ -310,9 +310,9 @@ QString KMobileProtocol::entryMimeType(int cap)
* listTopDeviceDir("mobile:/<devicename>") - sub-directory of a devices
*/
-void KMobileProtocol::listTopDeviceDir(const QString &devName)
+void KMobileProtocol::listTopDeviceDir(const TQString &devName)
{
- PRINT_DEBUG << QString("listTopDeviceDir(%1)\n").arg(devName);
+ PRINT_DEBUG << TQString("listTopDeviceDir(%1)\n").arg(devName);
KIO::UDSEntry entry;
unsigned int caps = m_dev.capabilities(devName);
@@ -322,10 +322,10 @@ void KMobileProtocol::listTopDeviceDir(const QString &devName)
if ((caps & cap) == 0)
continue;
- QString filename = m_dev.nameForCap(devName, cap);
- QString mimetype = folderMimeType(cap);
+ TQString filename = m_dev.nameForCap(devName, cap);
+ TQString mimetype = folderMimeType(cap);
- createDirEntry(entry, filename, QString("mobile:/%1/%2/").arg(devName).arg(filename), mimetype);
+ createDirEntry(entry, filename, TQString("mobile:/%1/%2/").arg(devName).arg(filename), mimetype);
listEntry(entry, false);
}
listEntry(entry, true);
@@ -336,11 +336,11 @@ void KMobileProtocol::listTopDeviceDir(const QString &devName)
/*
* listEntries("mobile:/<devicename>/<resource>") - resources of a device
*/
-void KMobileProtocol::listEntries(const QString &devName,
- const QString &resource, const QString &devPath,
+void KMobileProtocol::listEntries(const TQString &devName,
+ const TQString &resource, const TQString &devPath,
const KMobileDevice::Capabilities devCaps)
{
- PRINT_DEBUG << QString("listEntries(%1,%2,%3)\n").arg(devName).arg(resource).arg(devPath);
+ PRINT_DEBUG << TQString("listEntries(%1,%2,%3)\n").arg(devName).arg(resource).arg(devPath);
switch (devCaps) {
case KMobileDevice::hasAddressBook: listAddressBook(devName, resource);
break;
@@ -351,16 +351,16 @@ void KMobileProtocol::listEntries(const QString &devName,
case KMobileDevice::hasFileStorage: listFileStorage(devName, resource, devPath);
break;
default: error( ERR_CANNOT_ENTER_DIRECTORY,
- QString("/%1/%2").arg(devName).arg(resource) );
+ TQString("/%1/%2").arg(devName).arg(resource) );
}
}
/*
* listAddressBook("mobile:/<devicename>/Addressbook) - list the addressbook
*/
-void KMobileProtocol::listAddressBook(const QString &devName, const QString &resource)
+void KMobileProtocol::listAddressBook(const TQString &devName, const TQString &resource)
{
- PRINT_DEBUG << QString("listAddressBook(%1)\n").arg(devName);
+ PRINT_DEBUG << TQString("listAddressBook(%1)\n").arg(devName);
KIO::UDSEntry entry;
@@ -370,23 +370,23 @@ void KMobileProtocol::listAddressBook(const QString &devName, const QString &res
if (entries>=100) fieldwidth=3; else
if (entries>=10) fieldwidth=2; else fieldwidth=1;
totalSize(entries);
-// QRegExp rx; rx.setPattern( ".*FN:([\\w\\s]*)[\\n\\r]{2}.*" );
- QString name;
+// TQRegExp rx; rx.setPattern( ".*FN:([\\w\\s]*)[\\n\\r]{2}.*" );
+ TQString name;
for (int i=0; i<entries; i++) {
#if 0
- QString content = m_dev.readAddress(devName, i);
+ TQString content = m_dev.readAddress(devName, i);
if ( rx.search( content ) < 0 )
- name = QString::null;
+ name = TQString::null;
else
name = "_" + rx.cap(1);
#endif
- QString filename = QString("%1%2.vcf").arg(i,fieldwidth).arg(name);
+ TQString filename = TQString("%1%2.vcf").arg(i,fieldwidth).arg(name);
for (int p=0; p<fieldwidth; p++) {
if (filename[p]==' ') filename[p]='0'; else break;
}
- QString url = QString("mobile:/%1/%2/%3").arg(devName).arg(resource).arg(filename);
+ TQString url = TQString("mobile:/%1/%2/%3").arg(devName).arg(resource).arg(filename);
createFileEntry(entry, filename, url, entryMimeType(KMobileDevice::hasAddressBook),
400 /*content.utf8().length()*/ );
@@ -401,9 +401,9 @@ void KMobileProtocol::listAddressBook(const QString &devName, const QString &res
/*
* getVCard() - gives the vCard of the given file
*/
-int KMobileProtocol::getVCard( const QString &devName, QCString &result, QString &mime, const QString &path )
+int KMobileProtocol::getVCard( const TQString &devName, TQCString &result, TQString &mime, const TQString &path )
{
- PRINT_DEBUG << QString("getVCard(%1)\n").arg(path);
+ PRINT_DEBUG << TQString("getVCard(%1)\n").arg(path);
int index = path.find('.');
if (index>0)
@@ -411,21 +411,21 @@ int KMobileProtocol::getVCard( const QString &devName, QCString &result, QString
if (index<0 || index>=m_dev.numAddresses(devName))
return KIO::ERR_DOES_NOT_EXIST;
- QString str = m_dev.readAddress(devName, index);
+ TQString str = m_dev.readAddress(devName, index);
if (str.isEmpty())
return KIO::ERR_INTERNAL;
result = str.utf8();
mime = entryMimeType(KMobileDevice::hasAddressBook);
-// setMetaData("plugin", "const QString &key, const QString &value);
+// setMetaData("plugin", "const TQString &key, const TQString &value);
return 0;
}
/*
* listCalendar("mobile:/<devicename>/Calendar) - list the calendar entries
*/
-void KMobileProtocol::listCalendar( const QString &devName, const QString &resource)
+void KMobileProtocol::listCalendar( const TQString &devName, const TQString &resource)
{
- PRINT_DEBUG << QString("listCalendar(%1)\n").arg(devName);
+ PRINT_DEBUG << TQString("listCalendar(%1)\n").arg(devName);
KIO::UDSEntry entry;
@@ -433,8 +433,8 @@ void KMobileProtocol::listCalendar( const QString &devName, const QString &resou
totalSize(entries);
for (int i=0; i<entries; i++) {
- QString filename = QString("%1_%2.vcs").arg(i).arg(i18n("calendar"));
- QString url = QString("mobile:/%1/%2/%3").arg(devName).arg(resource).arg(filename);
+ TQString filename = TQString("%1_%2.vcs").arg(i).arg(i18n("calendar"));
+ TQString url = TQString("mobile:/%1/%2/%3").arg(devName).arg(resource).arg(filename);
createFileEntry(entry, filename, url, entryMimeType(KMobileDevice::hasCalendar));
listEntry(entry, false);
@@ -448,9 +448,9 @@ void KMobileProtocol::listCalendar( const QString &devName, const QString &resou
/*
* getCalendar() - reads a calendar entry
*/
-int KMobileProtocol::getCalendar( const QString &devName, QCString &result, QString &mime, const QString &path)
+int KMobileProtocol::getCalendar( const TQString &devName, TQCString &result, TQString &mime, const TQString &path)
{
- PRINT_DEBUG << QString("getCalendar(%1, #%2)\n").arg(devName).arg(path);
+ PRINT_DEBUG << TQString("getCalendar(%1, #%2)\n").arg(devName).arg(path);
/* TODO */
Q_UNUSED(result);
@@ -462,9 +462,9 @@ int KMobileProtocol::getCalendar( const QString &devName, QCString &result, QStr
/*
* listNotes("mobile:/<devicename>/Notes) - list the notes
*/
-void KMobileProtocol::listNotes( const QString &devName, const QString &resource)
+void KMobileProtocol::listNotes( const TQString &devName, const TQString &resource)
{
- PRINT_DEBUG << QString("listNotes(%1)\n").arg(devName);
+ PRINT_DEBUG << TQString("listNotes(%1)\n").arg(devName);
KIO::UDSEntry entry;
@@ -472,10 +472,10 @@ void KMobileProtocol::listNotes( const QString &devName, const QString &resource
totalSize(entries);
for (int i=0; i<entries; i++) {
- QString note /*= m_dev.readNote(devName, i)*/;
+ TQString note /*= m_dev.readNote(devName, i)*/;
- QString filename = QString("%1_%2.txt").arg(i).arg(i18n("note"));
- QString url = QString("mobile:/%1/%2/%3").arg(devName).arg(resource).arg(filename);
+ TQString filename = TQString("%1_%2.txt").arg(i).arg(i18n("note"));
+ TQString url = TQString("mobile:/%1/%2/%3").arg(devName).arg(resource).arg(filename);
createFileEntry(entry, filename, url, entryMimeType(KMobileDevice::hasNotes),
0 /*note.utf8().length()*/);
@@ -490,9 +490,9 @@ void KMobileProtocol::listNotes( const QString &devName, const QString &resource
/*
* getNote() - gives the Note of the given file
*/
-int KMobileProtocol::getNote( const QString &devName, QCString &result, QString &mime, const QString &path )
+int KMobileProtocol::getNote( const TQString &devName, TQCString &result, TQString &mime, const TQString &path )
{
- PRINT_DEBUG << QString("getNote(%1)\n").arg(path);
+ PRINT_DEBUG << TQString("getNote(%1)\n").arg(path);
int index = path.find('_');
if (index>0)
@@ -500,7 +500,7 @@ int KMobileProtocol::getNote( const QString &devName, QCString &result, QString
if (index<0 || index>=m_dev.numNotes(devName))
return KIO::ERR_DOES_NOT_EXIST;
- QString note = m_dev.readNote(devName, index);
+ TQString note = m_dev.readNote(devName, index);
if (note.isEmpty())
return KIO::ERR_DOES_NOT_EXIST;
@@ -512,20 +512,20 @@ int KMobileProtocol::getNote( const QString &devName, QCString &result, QString
/*
* listFileStorage("mobile:/<devicename>/Files) - list the files on the device
*/
-void KMobileProtocol::listFileStorage(const QString &devName, const QString &resource, const QString &devPath)
+void KMobileProtocol::listFileStorage(const TQString &devName, const TQString &resource, const TQString &devPath)
{
- PRINT_DEBUG << QString("listFileStorage(%1,%2)\n").arg(devName).arg(devPath);
+ PRINT_DEBUG << TQString("listFileStorage(%1,%2)\n").arg(devName).arg(devPath);
/* TODO */
- error( KIO::ERR_DOES_NOT_EXIST, QString("/%1/%2/%3").arg(devName).arg(resource).arg(devPath) );
+ error( KIO::ERR_DOES_NOT_EXIST, TQString("/%1/%2/%3").arg(devName).arg(resource).arg(devPath) );
}
/*
* getFileStorage() - gives the file contents of the given file
*/
-int KMobileProtocol::getFileStorage(const QString &devName, QCString &result, QString &mime, const QString &path)
+int KMobileProtocol::getFileStorage(const TQString &devName, TQCString &result, TQString &mime, const TQString &path)
{
- PRINT_DEBUG << QString("getFileStorage(%1)\n").arg(path);
+ PRINT_DEBUG << TQString("getFileStorage(%1)\n").arg(path);
/* TODO */
Q_UNUSED(devName);
@@ -541,10 +541,10 @@ int KMobileProtocol::getFileStorage(const QString &devName, QCString &result, QS
void KMobileProtocol::stat( const KURL &url )
{
PRINT_DEBUG << "###############################\n";
- PRINT_DEBUG << QString("stat(%1)\n").arg(url.path());
+ PRINT_DEBUG << TQString("stat(%1)\n").arg(url.path());
KMobileDevice::Capabilities devCaps;
- QString devName, resource, devPath;
+ TQString devName, resource, devPath;
int err = getDeviceAndRessource(url.path(), devName, resource, devPath, devCaps);
if (err) {
@@ -552,10 +552,10 @@ void KMobileProtocol::stat( const KURL &url )
return;
}
- QStringList path = QStringList::split('/', url.path(), false);
- QString filename = (path.count()>0) ? path[path.count()-1] : "/";
- QString fullPath = path.join("/");
- QString fullUrl = QString("mobile:/%1").arg(fullPath);
+ TQStringList path = TQStringList::split('/', url.path(), false);
+ TQString filename = (path.count()>0) ? path[path.count()-1] : "/";
+ TQString fullPath = path.join("/");
+ TQString fullUrl = TQString("mobile:/%1").arg(fullPath);
UDSEntry entry;
@@ -577,10 +577,10 @@ void KMobileProtocol::stat( const KURL &url )
void KMobileProtocol::mimetype(const KURL &url)
{
PRINT_DEBUG << "###############################\n";
- PRINT_DEBUG << QString("mimetype(%1)\n").arg(url.path());
+ PRINT_DEBUG << TQString("mimetype(%1)\n").arg(url.path());
KMobileDevice::Capabilities devCaps;
- QString devName, resource, devPath;
+ TQString devName, resource, devPath;
int err = getDeviceAndRessource(url.path(), devName, resource, devPath, devCaps);
if (err) {
@@ -599,7 +599,7 @@ void KMobileProtocol::mimetype(const KURL &url)
void KMobileProtocol::listDir(const KURL &url)
{
PRINT_DEBUG << "###############################\n";
- PRINT_DEBUG << QString("listDir(%1)\n").arg(url.path());
+ PRINT_DEBUG << TQString("listDir(%1)\n").arg(url.path());
if (!m_dev.isKMobileAvailable()) {
error( KIO::ERR_CONNECTION_BROKEN, i18n("KDE Mobile Device Manager") );
@@ -607,7 +607,7 @@ void KMobileProtocol::listDir(const KURL &url)
}
KMobileDevice::Capabilities devCaps;
- QString devName, resource, devPath;
+ TQString devName, resource, devPath;
int err = getDeviceAndRessource(url.path(), devName, resource, devPath, devCaps);
if (err) {
@@ -622,7 +622,7 @@ void KMobileProtocol::listDir(const KURL &url)
#if 0
if (!dev) {
- error( KIO::ERR_DOES_NOT_EXIST, QString("/%1").arg(devName) );
+ error( KIO::ERR_DOES_NOT_EXIST, TQString("/%1").arg(devName) );
return;
}
#endif
diff --git a/kmobile/kioslave/kio_mobile.h b/kmobile/kioslave/kio_mobile.h
index 8094f514b..eb053d599 100644
--- a/kmobile/kioslave/kio_mobile.h
+++ b/kmobile/kioslave/kio_mobile.h
@@ -19,8 +19,8 @@
#ifndef __KIO_MOBILE_H__
#define __KIO_MOBILE_H__
-#include <qstring.h>
-#include <qvaluelist.h>
+#include <tqstring.h>
+#include <tqvaluelist.h>
#include <kio/slavebase.h>
#include <kmobiledevice.h>
@@ -29,7 +29,7 @@
class KMobileProtocol : public KIO::SlaveBase
{
public:
- KMobileProtocol( const QCString &pool, const QCString &app );
+ KMobileProtocol( const TQCString &pool, const TQCString &app );
~KMobileProtocol();
void get( const KURL& url );
@@ -38,30 +38,30 @@ public:
void listDir( const KURL& url );
protected:
- int getDeviceAndRessource(const QString &_path,
- QString &devName, QString &resource, QString &devPath,
+ int getDeviceAndRessource(const TQString &_path,
+ TQString &devName, TQString &resource, TQString &devPath,
KMobileDevice::Capabilities &devCaps);
- QString folderMimeType(int cap);
- QString entryMimeType(int cap);
+ TQString folderMimeType(int cap);
+ TQString entryMimeType(int cap);
void listRoot(const KURL& url);
- void listTopDeviceDir(const QString &devName);
- void listEntries(const QString &devName,
- const QString &resource, const QString &devPath,
+ void listTopDeviceDir(const TQString &devName);
+ void listEntries(const TQString &devName,
+ const TQString &resource, const TQString &devPath,
const KMobileDevice::Capabilities devCaps);
- void listAddressBook(const QString &devName, const QString &resource);
- int getVCard( const QString &devName, QCString &result, QString &mime, const QString &path );
+ void listAddressBook(const TQString &devName, const TQString &resource);
+ int getVCard( const TQString &devName, TQCString &result, TQString &mime, const TQString &path );
- void listCalendar(const QString &devName, const QString &resource);
- int getCalendar( const QString &devName, QCString &result, QString &mime, const QString &path );
+ void listCalendar(const TQString &devName, const TQString &resource);
+ int getCalendar( const TQString &devName, TQCString &result, TQString &mime, const TQString &path );
- void listNotes(const QString &devName, const QString &resource);
- int getNote( const QString &devName, QCString &result, QString &mime, const QString &path );
+ void listNotes(const TQString &devName, const TQString &resource);
+ int getNote( const TQString &devName, TQCString &result, TQString &mime, const TQString &path );
- void listFileStorage(const QString &devName, const QString &resource, const QString &devPath);
- int getFileStorage( const QString &devName, QCString &result, QString &mime, const QString &path );
+ void listFileStorage(const TQString &devName, const TQString &resource, const TQString &devPath);
+ int getFileStorage( const TQString &devName, TQCString &result, TQString &mime, const TQString &path );
private:
KMobileClient m_dev;
diff --git a/kmobile/kmobile.cpp b/kmobile/kmobile.cpp
index 0c056bd4c..07fa1582b 100644
--- a/kmobile/kmobile.cpp
+++ b/kmobile/kmobile.cpp
@@ -17,10 +17,10 @@
*/
-#include <qdragobject.h>
+#include <tqdragobject.h>
#include <kprinter.h>
-#include <qpainter.h>
-#include <qpaintdevicemetrics.h>
+#include <tqpainter.h>
+#include <tqpaintdevicemetrics.h>
#include <kglobal.h>
#include <klocale.h>
@@ -74,8 +74,8 @@ KMobile::KMobile()
setAutoSaveSettings();
// allow the view to change the statusbar and caption
- connect(m_view, SIGNAL(signalChangeStatusbar(const QString&)),
- this, SLOT(changeStatusbar(const QString&)));
+ connect(m_view, TQT_SIGNAL(signalChangeStatusbar(const TQString&)),
+ this, TQT_SLOT(changeStatusbar(const TQString&)));
// restore all configured devices
restoreAll();
@@ -83,7 +83,7 @@ KMobile::KMobile()
// setup the system tray
m_systemTray = new SystemTray(this, "systemTray");
m_systemTray->show();
- connect(m_systemTray, SIGNAL(quitSelected()), this, SLOT(slotQuit()));
+ connect(m_systemTray, TQT_SIGNAL(quitSelected()), this, TQT_SLOT(slotQuit()));
}
KMobile::~KMobile()
@@ -93,29 +93,29 @@ KMobile::~KMobile()
void KMobile::setupActions()
{
- KStdAction::close(this, SLOT(dockApplication()), actionCollection());
- KStdAction::quit(kapp, SLOT(quit()), actionCollection());
+ KStdAction::close(this, TQT_SLOT(dockApplication()), actionCollection());
+ KStdAction::quit(kapp, TQT_SLOT(quit()), actionCollection());
- m_toolbarAction = KStdAction::showToolbar(this, SLOT(optionsShowToolbar()), actionCollection());
+ m_toolbarAction = KStdAction::showToolbar(this, TQT_SLOT(optionsShowToolbar()), actionCollection());
optionsShowToolbar();
- m_statusbarAction = KStdAction::showStatusbar(this, SLOT(optionsShowStatusbar()), actionCollection());
+ m_statusbarAction = KStdAction::showStatusbar(this, TQT_SLOT(optionsShowStatusbar()), actionCollection());
- KStdAction::keyBindings(this, SLOT(optionsConfigureKeys()), actionCollection());
- KStdAction::configureToolbars(this, SLOT(optionsConfigureToolbars()), actionCollection());
- KStdAction::preferences(this, SLOT(optionsPreferences()), actionCollection());
+ KStdAction::keyBindings(this, TQT_SLOT(optionsConfigureKeys()), actionCollection());
+ KStdAction::configureToolbars(this, TQT_SLOT(optionsConfigureToolbars()), actionCollection());
+ KStdAction::preferences(this, TQT_SLOT(optionsPreferences()), actionCollection());
new KAction(i18n("&Add Device..."), "folder_new", 0,
- this, SLOT(addDevice()), actionCollection(), "device_add");
+ this, TQT_SLOT(addDevice()), actionCollection(), "device_add");
new KAction( KGuiItem( i18n("&Remove Device"), "edittrash", i18n("Remove this device") ),
- "Delete", this, SLOT(removeDevice()), actionCollection(), "device_remove");
+ "Delete", this, TQT_SLOT(removeDevice()), actionCollection(), "device_remove");
new KAction(i18n("Re&name Device..."), 0, Key_F2,
- this, SLOT(renameDevice()), actionCollection(), "device_rename");
+ this, TQT_SLOT(renameDevice()), actionCollection(), "device_rename");
new KAction(i18n("&Configure Device..."), "configure", 0,
- this, SLOT(configDevice()), actionCollection(), "device_configure");
+ this, TQT_SLOT(configDevice()), actionCollection(), "device_configure");
createGUI();
- connect( kapp, SIGNAL(aboutToQuit()), this, SLOT(saveAll()) );
+ connect( kapp, TQT_SIGNAL(aboutToQuit()), this, TQT_SLOT(saveAll()) );
}
@@ -182,7 +182,7 @@ void KMobile::readProperties(KConfig *config)
// the app is being restored. read in here whatever you wrote
// in 'saveProperties'
- QString url = config->readPathEntry("lastURL");
+ TQString url = config->readPathEntry("lastURL");
}
void KMobile::optionsShowToolbar()
@@ -241,7 +241,7 @@ void KMobile::optionsPreferences()
void KMobile::renameDevice()
{
// rename the current selected device
- QIconViewItem *item = m_view->currentItem();
+ TQIconViewItem *item = m_view->currentItem();
if (item)
item->rename();
}
@@ -261,34 +261,34 @@ void KMobile::addDevice()
dialog->helpText->setText( i18n("Please select the category to which your new device belongs:") );
dialog->addButton->setText( i18n("&Scan for New Devices...") );
dialog->addButton->setDisabled(true);
- dialog->iconView->connect( dialog->iconView, SIGNAL(doubleClicked(QIconViewItem*)),
- dialog, SLOT(accept()) );
+ dialog->iconView->connect( dialog->iconView, TQT_SIGNAL(doubleClicked(TQIconViewItem*)),
+ dialog, TQT_SLOT(accept()) );
dialog->selectButton->setText( i18n("&Add") );
- dialog->selectButton->connect( dialog->selectButton, SIGNAL(clicked()), dialog, SLOT(accept()) );
- dialog->cancelButton->connect( dialog->cancelButton, SIGNAL(clicked()), dialog, SLOT(reject()) );
+ dialog->selectButton->connect( dialog->selectButton, TQT_SIGNAL(clicked()), dialog, TQT_SLOT(accept()) );
+ dialog->cancelButton->connect( dialog->cancelButton, TQT_SIGNAL(clicked()), dialog, TQT_SLOT(reject()) );
KTrader::OfferList list = KMobileItem::getMobileDevicesList();
KTrader::OfferListIterator it;
KService::Ptr ptr;
for ( it = list.begin(); it != list.end(); ++it ) {
ptr = *it;
- kdDebug() << QString("LIBRARY: '%1', NAME: '%2', ICON: '%3', COMMENT: '%4'\n")
+ kdDebug() << TQString("LIBRARY: '%1', NAME: '%2', ICON: '%3', COMMENT: '%4'\n")
.arg(ptr->library()).arg(ptr->name()).arg(ptr->icon()).arg(ptr->comment());
- QString iconName = ptr->icon();
+ TQString iconName = ptr->icon();
if (iconName.isEmpty())
iconName = KMOBILE_ICON_UNKNOWN;
- QPixmap pm = KGlobal::instance()->iconLoader()->loadIcon(iconName, KIcon::Desktop );
+ TQPixmap pm = KGlobal::instance()->iconLoader()->loadIcon(iconName, KIcon::Desktop );
- QIconViewItem *item;
- item = new QIconViewItem( dialog->iconView, ptr->name(), pm );
+ TQIconViewItem *item;
+ item = new TQIconViewItem( dialog->iconView, ptr->name(), pm );
//if (!ptr->comment().isNull())
- // QToolTip::add(item->pixmap(), ptr->comment() );
+ // TQToolTip::add(item->pixmap(), ptr->comment() );
}
int index = -1;
- if (dialog->exec() == QDialog::Accepted)
+ if (dialog->exec() == TQDialog::Accepted)
index = dialog->iconView->currentItem()->index(); // get index of selected item
delete dialog;
@@ -300,7 +300,7 @@ void KMobile::addDevice()
// add the new device to the list
if (!m_view->addNewDevice(m_config, ptr)) {
KMessageBox::error(this,
- QString("<qt>KMobile could not load the <b>%1</b> Device Driver.<p>"
+ TQString("<qt>KMobile could not load the <b>%1</b> Device Driver.<p>"
"Please use the Skeleton- or Gnokii Device Driver during development.<p>"
"This driver will still be visible, but you won't be able to access it "
"from Konqueror or any other application.</qt>").arg(ptr->name()),
@@ -315,7 +315,7 @@ void KMobile::addDevice()
* show dialog to user, in which he may choose and select one of the already
* configured mobile devices.
*/
-KMobileDevice * KMobileFactory::chooseDeviceDialog( QWidget *parent,
+KMobileDevice * KMobileFactory::chooseDeviceDialog( TQWidget *parent,
enum KMobileDevice::ClassType /*type*/, enum KMobileDevice::Capabilities /*caps*/ )
{
int num;
@@ -344,11 +344,11 @@ KMobileDevice * KMobileFactory::chooseDeviceDialog( QWidget *parent,
if (!dialog)
return 0L;
- dialog->addButton->connect( dialog->addButton, SIGNAL(clicked()), this, SLOT(slotAddDevice()) );
- dialog->iconView->connect( dialog->iconView, SIGNAL(doubleClicked(QIconViewItem*)),
- dialog, SLOT(accept()) );
- dialog->selectButton->connect( dialog->selectButton, SIGNAL(clicked()), dialog, SLOT(accept()) );
- dialog->cancelButton->connect( dialog->cancelButton, SIGNAL(clicked()), dialog, SLOT(reject()) );
+ dialog->addButton->connect( dialog->addButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotAddDevice()) );
+ dialog->iconView->connect( dialog->iconView, TQT_SIGNAL(doubleClicked(TQIconViewItem*)),
+ dialog, TQT_SLOT(accept()) );
+ dialog->selectButton->connect( dialog->selectButton, TQT_SIGNAL(clicked()), dialog, TQT_SLOT(accept()) );
+ dialog->cancelButton->connect( dialog->cancelButton, TQT_SIGNAL(clicked()), dialog, TQT_SLOT(reject()) );
for (int i=0; i<countDevices(); i++) {
KService::Ptr ptr;
@@ -356,21 +356,21 @@ KMobileDevice * KMobileFactory::chooseDeviceDialog( QWidget *parent,
if (!ptr)
continue;
- // kdDebug() << QString("LIBRARY: '%1', NAME: '%2', ICON: '%3', COMMENT: '%4' #%5\n")
+ // kdDebug() << TQString("LIBRARY: '%1', NAME: '%2', ICON: '%3', COMMENT: '%4' #%5\n")
// .arg(ptr->library()).arg(ptr->name()).arg(ptr->icon()).arg(ptr->comment()).arg(i);
- QString iconName = ptr->icon();
+ TQString iconName = ptr->icon();
if (iconName.isEmpty())
iconName = KMOBILE_ICON_UNKNOWN;
- QPixmap pm( ::locate("icon", iconName+".png") );
+ TQPixmap pm( ::locate("icon", iconName+".png") );
- QIconViewItem *item;
- item = new QIconViewItem( dialog->iconView, ptr->name(), pm );
+ TQIconViewItem *item;
+ item = new TQIconViewItem( dialog->iconView, ptr->name(), pm );
}
int index = -1;
- if (dialog->exec() == QDialog::Accepted)
+ if (dialog->exec() == TQDialog::Accepted)
index = dialog->iconView->currentItem()->index(); // get index of selected item
delete dialog;
@@ -385,7 +385,7 @@ KMobileDevice * KMobileFactory::chooseDeviceDialog( QWidget *parent,
void KMobile::removeDevice()
{
// remove the current selected device
- QIconViewItem *item = m_view->currentItem();
+ TQIconViewItem *item = m_view->currentItem();
if (item)
m_view->removeDevice( item->text() );
}
@@ -393,12 +393,12 @@ void KMobile::removeDevice()
void KMobile::configDevice()
{
// configure the current selected device
- QIconViewItem *item = m_view->currentItem();
+ TQIconViewItem *item = m_view->currentItem();
if (item)
m_view->configDevice( item->text() );
}
-void KMobile::changeStatusbar(const QString& text)
+void KMobile::changeStatusbar(const TQString& text)
{
// display the text on the statusbar
statusBar()->message(text);
diff --git a/kmobile/kmobile.h b/kmobile/kmobile.h
index 059934c61..18403ffa3 100644
--- a/kmobile/kmobile.h
+++ b/kmobile/kmobile.h
@@ -76,7 +76,7 @@ private slots:
void newToolbarConfig();
- void changeStatusbar(const QString& text);
+ void changeStatusbar(const TQString& text);
private:
void setupAccel();
diff --git a/kmobile/kmobileclient.cpp b/kmobile/kmobileclient.cpp
index 6da1b919e..63910fba1 100644
--- a/kmobile/kmobileclient.cpp
+++ b/kmobile/kmobileclient.cpp
@@ -17,7 +17,7 @@
*/
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include <ktrader.h>
#include <klocale.h>
@@ -36,10 +36,10 @@ KMobileClient::KMobileClient()
m_kmobileObj = "kmobileIface";
bool ok = attach();
- PRINT_DEBUG << QString("attached to DCOP server %1\n").arg(ok?"sucessful.":"failed.");
+ PRINT_DEBUG << TQString("attached to DCOP server %1\n").arg(ok?"sucessful.":"failed.");
// m_clientAppId = registerAs("kmobileclient");
-// PRINT_DEBUG << QString("registered as DCOP client %1\n").arg(m_clientAppId);
+// PRINT_DEBUG << TQString("registered as DCOP client %1\n").arg(m_clientAppId);
isKMobileAvailable();
}
@@ -47,14 +47,14 @@ KMobileClient::KMobileClient()
KMobileClient::~KMobileClient()
{
detach();
- PRINT_DEBUG << QString("detached from server\n");
+ PRINT_DEBUG << TQString("detached from server\n");
}
bool KMobileClient::isKMobileAvailable()
{
bool available = isApplicationRegistered(m_kmobileApp);
- PRINT_DEBUG << QString("KMobile DCOP server: %1\n").arg(available?"available.":"not available");
+ PRINT_DEBUG << TQString("KMobile DCOP server: %1\n").arg(available?"available.":"not available");
if (!available) {
startKMobileApplication();
// check again...
@@ -65,15 +65,15 @@ bool KMobileClient::isKMobileAvailable()
bool KMobileClient::startKMobileApplication()
{
- QByteArray data;
- QDataStream arg(data, IO_WriteOnly);
- QStringList params;
+ TQByteArray data;
+ TQDataStream arg(data, IO_WriteOnly);
+ TQStringList params;
params << "--minimized";
- arg << QString("kmobile") << params;
- QCString replyType;
- QByteArray replyData;
- bool ok = call("klauncher", "klauncher", "kdeinit_exec_wait(QString,QStringList)", data, replyType, replyData);
- PRINT_DEBUG << QString("DCOP-CALL to klauncher: %1\n").arg(ok?"ok.":"failed.");
+ arg << TQString("kmobile") << params;
+ TQCString replyType;
+ TQByteArray replyData;
+ bool ok = call("klauncher", "klauncher", "kdeinit_exec_wait(TQString,TQStringList)", data, replyType, replyData);
+ PRINT_DEBUG << TQString("DCOP-CALL to klauncher: %1\n").arg(ok?"ok.":"failed.");
return ok;
}
@@ -87,17 +87,17 @@ bool KMobileClient::startKMobileApplication()
#define PREPARE( FUNC, PARAMS ) \
- QByteArray data; \
- QDataStream arg(data, IO_WriteOnly); \
+ TQByteArray data; \
+ TQDataStream arg(data, IO_WriteOnly); \
arg << PARAMS; \
- QCString replyType; \
- QByteArray replyData; \
+ TQCString replyType; \
+ TQByteArray replyData; \
bool ok = call(m_kmobileApp, m_kmobileObj, FUNC, data, replyType, replyData, KMOBILECLIENT_USE_EVENTLOOP, KMOBILECLIENT_TIMEOUT); \
- PRINT_DEBUG << QString("DCOP-CALL to %1: %2\n").arg(FUNC).arg(ok?"ok.":"FAILED.")
+ PRINT_DEBUG << TQString("DCOP-CALL to %1: %2\n").arg(FUNC).arg(ok?"ok.":"FAILED.")
#define RETURN_TYPE( FUNC, PARAMS, RETURN_TYPE ) \
PREPARE( FUNC, PARAMS ); \
- QDataStream reply(replyData, IO_ReadOnly); \
+ TQDataStream reply(replyData, IO_ReadOnly); \
RETURN_TYPE ret; \
if (ok) \
reply >> ret; \
@@ -105,14 +105,14 @@ bool KMobileClient::startKMobileApplication()
#define RETURN_TYPE_DEFAULT( FUNC, PARAMS, RETURN_TYPE, RETURN_DEFAULT ) \
PREPARE( FUNC, PARAMS ); \
- QDataStream reply(replyData, IO_ReadOnly); \
+ TQDataStream reply(replyData, IO_ReadOnly); \
RETURN_TYPE ret = RETURN_DEFAULT; \
if (ok) \
reply >> ret; \
return ret;
#define RETURN_QSTRING( FUNC, PARAMS ) \
- RETURN_TYPE( FUNC, PARAMS, QString )
+ RETURN_TYPE( FUNC, PARAMS, TQString )
#define RETURN_BOOL( FUNC, PARAMS ) \
RETURN_TYPE_DEFAULT( FUNC, PARAMS, bool, false )
@@ -122,110 +122,110 @@ bool KMobileClient::startKMobileApplication()
-QStringList KMobileClient::deviceNames()
+TQStringList KMobileClient::deviceNames()
{
if (!isKMobileAvailable())
- return QStringList();
- RETURN_TYPE( "deviceNames()", QString::fromLatin1(""), QStringList );
+ return TQStringList();
+ RETURN_TYPE( "deviceNames()", TQString::fromLatin1(""), TQStringList );
}
-void KMobileClient::removeDevice( QString deviceName )
+void KMobileClient::removeDevice( TQString deviceName )
{
- PREPARE( "removeDevice(QString)", deviceName );
+ PREPARE( "removeDevice(TQString)", deviceName );
Q_UNUSED(ok);
}
-void KMobileClient::configDevice( QString deviceName )
+void KMobileClient::configDevice( TQString deviceName )
{
- PREPARE( "configDevice(QString)", deviceName );
+ PREPARE( "configDevice(TQString)", deviceName );
Q_UNUSED(ok);
}
-bool KMobileClient::connectDevice( QString deviceName )
+bool KMobileClient::connectDevice( TQString deviceName )
{
- RETURN_BOOL( "connectDevice(QString)", deviceName );
+ RETURN_BOOL( "connectDevice(TQString)", deviceName );
}
-bool KMobileClient::disconnectDevice( QString deviceName )
+bool KMobileClient::disconnectDevice( TQString deviceName )
{
- RETURN_BOOL( "disconnectDevice(QString)", deviceName );
+ RETURN_BOOL( "disconnectDevice(TQString)", deviceName );
}
-bool KMobileClient::connected( QString deviceName )
+bool KMobileClient::connected( TQString deviceName )
{
- RETURN_BOOL( "connected(QString)", deviceName );
+ RETURN_BOOL( "connected(TQString)", deviceName );
}
-QString KMobileClient::deviceClassName( QString deviceName )
+TQString KMobileClient::deviceClassName( TQString deviceName )
{
- RETURN_QSTRING( "deviceClassName(QString)", deviceName );
+ RETURN_QSTRING( "deviceClassName(TQString)", deviceName );
}
-QString KMobileClient::deviceName( QString deviceName )
+TQString KMobileClient::deviceName( TQString deviceName )
{
- RETURN_QSTRING( "deviceName(QString)", deviceName );
+ RETURN_QSTRING( "deviceName(TQString)", deviceName );
}
-QString KMobileClient::revision( QString deviceName )
+TQString KMobileClient::revision( TQString deviceName )
{
- RETURN_QSTRING( "revision(QString)", deviceName );
+ RETURN_QSTRING( "revision(TQString)", deviceName );
}
-int KMobileClient::classType( QString deviceName )
+int KMobileClient::classType( TQString deviceName )
{
- RETURN_INT( "classType(QString)", deviceName );
+ RETURN_INT( "classType(TQString)", deviceName );
}
-int KMobileClient::capabilities( QString deviceName )
+int KMobileClient::capabilities( TQString deviceName )
{
- RETURN_INT( "capabilities(QString)", deviceName );
+ RETURN_INT( "capabilities(TQString)", deviceName );
}
-QString KMobileClient::nameForCap( QString deviceName, int cap )
+TQString KMobileClient::nameForCap( TQString deviceName, int cap )
{
- RETURN_QSTRING( "nameForCap(QString,int)", deviceName << cap );
+ RETURN_QSTRING( "nameForCap(TQString,int)", deviceName << cap );
}
-QString KMobileClient::iconFileName( QString deviceName )
+TQString KMobileClient::iconFileName( TQString deviceName )
{
- RETURN_QSTRING( "iconFileName(QString)", deviceName );
+ RETURN_QSTRING( "iconFileName(TQString)", deviceName );
}
-int KMobileClient::numAddresses( QString deviceName )
+int KMobileClient::numAddresses( TQString deviceName )
{
- RETURN_INT( "numAddresses(QString)", deviceName );
+ RETURN_INT( "numAddresses(TQString)", deviceName );
}
-QString KMobileClient::readAddress( QString deviceName, int index )
+TQString KMobileClient::readAddress( TQString deviceName, int index )
{
- RETURN_QSTRING( "readAddress(QString,int)", deviceName << index );
+ RETURN_QSTRING( "readAddress(TQString,int)", deviceName << index );
}
-bool KMobileClient::storeAddress( QString deviceName, int index, QString vcard, bool append )
+bool KMobileClient::storeAddress( TQString deviceName, int index, TQString vcard, bool append )
{
- RETURN_BOOL( "storeAddress(QString,int,QString,bool)", deviceName << index << vcard << append );
+ RETURN_BOOL( "storeAddress(TQString,int,TQString,bool)", deviceName << index << vcard << append );
}
-int KMobileClient::numCalendarEntries( QString deviceName )
+int KMobileClient::numCalendarEntries( TQString deviceName )
{
- RETURN_INT( "numCalendarEntries(QString)", deviceName );
+ RETURN_INT( "numCalendarEntries(TQString)", deviceName );
}
-int KMobileClient::numNotes( QString deviceName )
+int KMobileClient::numNotes( TQString deviceName )
{
- RETURN_INT( "numNotes(QString)", deviceName );
+ RETURN_INT( "numNotes(TQString)", deviceName );
}
-QString KMobileClient::readNote( QString deviceName, int index )
+TQString KMobileClient::readNote( TQString deviceName, int index )
{
- RETURN_QSTRING( "readNote(QString,int)", deviceName << index );
+ RETURN_QSTRING( "readNote(TQString,int)", deviceName << index );
}
-bool KMobileClient::storeNote( QString deviceName, int index, QString note )
+bool KMobileClient::storeNote( TQString deviceName, int index, TQString note )
{
- RETURN_BOOL( "storeNote(QString,int,QString)", deviceName << index << note );
+ RETURN_BOOL( "storeNote(TQString,int,TQString)", deviceName << index << note );
}
diff --git a/kmobile/kmobileclient.h b/kmobile/kmobileclient.h
index ca4b5c182..8ad6204ac 100644
--- a/kmobile/kmobileclient.h
+++ b/kmobile/kmobileclient.h
@@ -15,7 +15,7 @@ public:
KMobileClient();
virtual ~KMobileClient();
- QCString appId() const { return m_clientAppId; };
+ TQCString appId() const { return m_clientAppId; };
bool isKMobileAvailable();
bool startKMobileApplication();
@@ -23,39 +23,39 @@ public:
/**
* DCOP implementation
*/
- QStringList deviceNames();
+ TQStringList deviceNames();
- void removeDevice( QString deviceName );
- void configDevice( QString deviceName );
+ void removeDevice( TQString deviceName );
+ void configDevice( TQString deviceName );
- bool connectDevice( QString deviceName );
- bool disconnectDevice( QString deviceName );
- bool connected( QString deviceName );
+ bool connectDevice( TQString deviceName );
+ bool disconnectDevice( TQString deviceName );
+ bool connected( TQString deviceName );
- QString deviceClassName( QString deviceName );
- QString deviceName( QString deviceName );
- QString revision( QString deviceName );
- int classType( QString deviceName );
+ TQString deviceClassName( TQString deviceName );
+ TQString deviceName( TQString deviceName );
+ TQString revision( TQString deviceName );
+ int classType( TQString deviceName );
- int capabilities( QString deviceName );
- QString nameForCap( QString deviceName, int cap );
+ int capabilities( TQString deviceName );
+ TQString nameForCap( TQString deviceName, int cap );
- QString iconFileName( QString deviceName );
+ TQString iconFileName( TQString deviceName );
- int numAddresses( QString deviceName );
- QString readAddress( QString deviceName, int index );
- bool storeAddress( QString deviceName, int index, QString vcard, bool append );
+ int numAddresses( TQString deviceName );
+ TQString readAddress( TQString deviceName, int index );
+ bool storeAddress( TQString deviceName, int index, TQString vcard, bool append );
- int numCalendarEntries( QString deviceName );
+ int numCalendarEntries( TQString deviceName );
- int numNotes( QString deviceName );
- QString readNote( QString deviceName, int index );
- bool storeNote( QString deviceName, int index, QString note );
+ int numNotes( TQString deviceName );
+ TQString readNote( TQString deviceName, int index );
+ bool storeNote( TQString deviceName, int index, TQString note );
private:
- QCString m_clientAppId;
- QCString m_kmobileApp;
- QCString m_kmobileObj;
+ TQCString m_clientAppId;
+ TQCString m_kmobileApp;
+ TQCString m_kmobileObj;
};
diff --git a/kmobile/kmobiledevice.cpp b/kmobile/kmobiledevice.cpp
index dc3039f2b..cfcbf6e88 100644
--- a/kmobile/kmobiledevice.cpp
+++ b/kmobile/kmobiledevice.cpp
@@ -26,9 +26,9 @@
#include <signal.h>
#include <fcntl.h>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qfile.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqfile.h>
#include <klibloader.h>
#include <kstandarddirs.h>
@@ -47,7 +47,7 @@
* The base plugin class of all mobile device drivers.
*/
-KMobileDevice::KMobileDevice(QObject *obj, const char *name, const QStringList &args)
+KMobileDevice::KMobileDevice(TQObject *obj, const char *name, const TQStringList &args)
: KLibFactory(obj,name),
m_config(0L), d(0L)
{
@@ -63,7 +63,7 @@ KMobileDevice::KMobileDevice(QObject *obj, const char *name, const QStringList &
m_config = new KConfig();
else
m_config = new KConfig(m_configFileName);
- PRINT_DEBUG << QString("name of config file is %1\n").arg(m_configFileName);
+ PRINT_DEBUG << TQString("name of config file is %1\n").arg(m_configFileName);
}
KMobileDevice::~KMobileDevice()
@@ -78,18 +78,18 @@ bool KMobileDevice::connected()
}
// returns e.g. "Nokia mobile phone", "MP3 Player", "Handspring Organizer"
-QString KMobileDevice::deviceClassName() const
+TQString KMobileDevice::deviceClassName() const
{
return m_deviceClassName;
}
// returns real device name, e.g. "Nokia 6310" or "Rio MP3 Player"
-QString KMobileDevice::deviceName() const
+TQString KMobileDevice::deviceName() const
{
return m_deviceName;
}
-QString KMobileDevice::revision() const
+TQString KMobileDevice::revision() const
{
return m_deviceRevision;
}
@@ -104,7 +104,7 @@ bool KMobileDevice::isReadOnly() const
return false;
}
-bool KMobileDevice::configDialog( QWidget *parent )
+bool KMobileDevice::configDialog( TQWidget *parent )
{
KMessageBox::information( parent,
i18n("This device does not need any configuration."),
@@ -123,14 +123,14 @@ enum KMobileDevice::ClassType KMobileDevice::classType() const
return m_classType;
}
-QString KMobileDevice::iconFileName() const
+TQString KMobileDevice::iconFileName() const
{
return defaultIconFileName( classType() );
}
-QString KMobileDevice::defaultIconFileName( ClassType ct )
+TQString KMobileDevice::defaultIconFileName( ClassType ct )
{
- QString name;
+ TQString name;
switch (ct) {
case Phone: name = "mobile_phone"; break;
case Organizer: name = "mobile_organizer"; break;
@@ -142,9 +142,9 @@ QString KMobileDevice::defaultIconFileName( ClassType ct )
return name;
}
-QString KMobileDevice::defaultClassName( ClassType ct )
+TQString KMobileDevice::defaultClassName( ClassType ct )
{
- QString name;
+ TQString name;
switch (ct) {
case Phone: name = i18n("Cellular Mobile Phone"); break;
case Organizer: name = i18n("Organizer"); break;
@@ -166,7 +166,7 @@ int KMobileDevice::capabilities() const
return m_caps;
}
-const QString KMobileDevice::nameForCap(int cap) const
+const TQString KMobileDevice::nameForCap(int cap) const
{
switch (cap) {
case hasAddressBook: return i18n("Contacts");
@@ -178,7 +178,7 @@ const QString KMobileDevice::nameForCap(int cap) const
}
// returns an error string for the given error code
-QString KMobileDevice::buildErrorString(KIO::Error err, const QString &errorText) const
+TQString KMobileDevice::buildErrorString(KIO::Error err, const TQString &errorText) const
{
return KIO::buildErrorString( err, errorText);
}
@@ -227,12 +227,12 @@ int KMobileDevice::numNotes()
return 0;
}
-int KMobileDevice::readNote( int, QString & )
+int KMobileDevice::readNote( int, TQString & )
{
return KIO::ERR_UNSUPPORTED_ACTION;
}
-int KMobileDevice::storeNote( int, const QString & )
+int KMobileDevice::storeNote( int, const TQString & )
{
return KIO::ERR_UNSUPPORTED_ACTION;
}
@@ -243,7 +243,7 @@ int KMobileDevice::storeNote( int, const QString & )
*/
static
-void addAtom(KIO::UDSEntry& entry, unsigned int ID, long l, const QString& s = QString::null)
+void addAtom(KIO::UDSEntry& entry, unsigned int ID, long l, const TQString& s = TQString::null)
{
KIO::UDSAtom atom;
atom.m_uds = ID;
@@ -252,7 +252,7 @@ void addAtom(KIO::UDSEntry& entry, unsigned int ID, long l, const QString& s = Q
entry.append(atom);
}
-void KMobileDevice::createDirEntry(KIO::UDSEntry& entry, const QString& name, const QString& url, const QString& mime) const
+void KMobileDevice::createDirEntry(KIO::UDSEntry& entry, const TQString& name, const TQString& url, const TQString& mime) const
{
entry.clear();
addAtom(entry, KIO::UDS_NAME, 0, name);
@@ -260,12 +260,12 @@ void KMobileDevice::createDirEntry(KIO::UDSEntry& entry, const QString& name, co
addAtom(entry, KIO::UDS_ACCESS, 0500);
addAtom(entry, KIO::UDS_MIME_TYPE, 0, mime);
addAtom(entry, KIO::UDS_URL, 0, url);
- PRINT_DEBUG << QString("createDirEntry: File: %1 MIME: %2 URL: %3\n").arg(name).arg(mime).arg(url);
+ PRINT_DEBUG << TQString("createDirEntry: File: %1 MIME: %2 URL: %3\n").arg(name).arg(mime).arg(url);
// addAtom(entry, KIO::UDS_SIZE, 0);
addAtom(entry, KIO::UDS_GUESSED_MIME_TYPE, 0, mime);
}
-void KMobileDevice::createFileEntry(KIO::UDSEntry& entry, const QString& name, const QString& url, const QString& mime,
+void KMobileDevice::createFileEntry(KIO::UDSEntry& entry, const TQString& name, const TQString& url, const TQString& mime,
const unsigned long size) const
{
entry.clear();
@@ -276,63 +276,63 @@ void KMobileDevice::createFileEntry(KIO::UDSEntry& entry, const QString& name, c
addAtom(entry, KIO::UDS_MIME_TYPE, 0, mime);
if (size) addAtom(entry, KIO::UDS_SIZE, size);
addAtom(entry, KIO::UDS_GUESSED_MIME_TYPE, 0, mime);
- PRINT_DEBUG << QString("createFileEntry: File: %1, Size: %2, MIME: %3\n").arg(name).arg(size).arg(mime);
+ PRINT_DEBUG << TQString("createFileEntry: File: %1, Size: %2, MIME: %3\n").arg(name).arg(size).arg(mime);
}
-void KMobileDevice::listDir( const QString & )
+void KMobileDevice::listDir( const TQString & )
{
- emit error(KIO::ERR_CANNOT_ENTER_DIRECTORY,QString::null);
+ emit error(KIO::ERR_CANNOT_ENTER_DIRECTORY,TQString::null);
}
-void KMobileDevice::mkdir( const QString &, int )
+void KMobileDevice::mkdir( const TQString &, int )
{
- emit error(KIO::ERR_COULD_NOT_MKDIR, QString::null);
+ emit error(KIO::ERR_COULD_NOT_MKDIR, TQString::null);
}
-void KMobileDevice::rename( const QString &, const QString &, bool )
+void KMobileDevice::rename( const TQString &, const TQString &, bool )
{
- emit error(KIO::ERR_UNSUPPORTED_ACTION, QString::null);
+ emit error(KIO::ERR_UNSUPPORTED_ACTION, TQString::null);
}
-void KMobileDevice::symlink( const QString &, const QString &, bool )
+void KMobileDevice::symlink( const TQString &, const TQString &, bool )
{
- emit error(KIO::ERR_UNSUPPORTED_ACTION, QString::null);
+ emit error(KIO::ERR_UNSUPPORTED_ACTION, TQString::null);
}
-void KMobileDevice::del( const QString &, bool )
+void KMobileDevice::del( const TQString &, bool )
{
- emit error(KIO::ERR_UNSUPPORTED_ACTION, QString::null);
+ emit error(KIO::ERR_UNSUPPORTED_ACTION, TQString::null);
}
-void KMobileDevice::stat( const QString & )
+void KMobileDevice::stat( const TQString & )
{
- emit error(KIO::ERR_UNSUPPORTED_ACTION, QString::null);
+ emit error(KIO::ERR_UNSUPPORTED_ACTION, TQString::null);
}
-void KMobileDevice::chmod( const QString &, int )
+void KMobileDevice::chmod( const TQString &, int )
{
- emit error(KIO::ERR_UNSUPPORTED_ACTION, QString::null);
+ emit error(KIO::ERR_UNSUPPORTED_ACTION, TQString::null);
}
-void KMobileDevice::get( const QString & )
+void KMobileDevice::get( const TQString & )
{
- emit error(KIO::ERR_UNSUPPORTED_ACTION, QString::null);
+ emit error(KIO::ERR_UNSUPPORTED_ACTION, TQString::null);
}
-void KMobileDevice::put( const QString &, int, bool, bool )
+void KMobileDevice::put( const TQString &, int, bool, bool )
{
- emit error(KIO::ERR_UNSUPPORTED_ACTION, QString::null);
+ emit error(KIO::ERR_UNSUPPORTED_ACTION, TQString::null);
}
-void KMobileDevice::mimetype( const QString & )
+void KMobileDevice::mimetype( const TQString & )
{
- emit error(KIO::ERR_UNSUPPORTED_ACTION, QString::null);
+ emit error(KIO::ERR_UNSUPPORTED_ACTION, TQString::null);
}
-void KMobileDevice::special( const QByteArray & )
+void KMobileDevice::special( const TQByteArray & )
{
- emit error(KIO::ERR_UNSUPPORTED_ACTION, QString::null);
+ emit error(KIO::ERR_UNSUPPORTED_ACTION, TQString::null);
}
@@ -366,7 +366,7 @@ void KMobileDevice::special( const QByteArray & )
# include <sys/types.h>
# include <sys/stat.h>
# include <unistd.h>
-# include <qfile.h>
+# include <tqfile.h>
# include <signal.h>
# include <errno.h>
# endif
@@ -374,7 +374,7 @@ void KMobileDevice::special( const QByteArray & )
#define DEVICE_LOCK_PATH_PREFIX "/var/lock/LCK.."
-bool KMobileDevice::lockDevice(const QString &device, QString &err_reason)
+bool KMobileDevice::lockDevice(const TQString &device, TQString &err_reason)
{
#ifdef HAVE_BAUDBOY_H
return ttylock(device.local8bit()) == EXIT_SUCCESS;
@@ -383,13 +383,13 @@ bool KMobileDevice::lockDevice(const QString &device, QString &err_reason)
return !dev_lock(device.local8bit());
# else
int pid = -1;
- QStringList all = QStringList::split('/', device);
+ TQStringList all = TQStringList::split('/', device);
if (!all.count()) {
err_reason = i18n("Invalid device (%1)").arg(device);
return false;
}
- QString lockName = DEVICE_LOCK_PATH_PREFIX + all[all.count()-1];
- QFile file(lockName);
+ TQString lockName = DEVICE_LOCK_PATH_PREFIX + all[all.count()-1];
+ TQFile file(lockName);
if (file.exists() && file.open(IO_ReadOnly)) {
if (file.size() == 0) {
err_reason = i18n("Unable to read lockfile %s. Please check for reason and "
@@ -400,17 +400,17 @@ bool KMobileDevice::lockDevice(const QString &device, QString &err_reason)
if (file.size() == 4 && sizeof(int)==4) {
file.readLine((char *)(&pid), 4); /* Kermit-style lockfile */
} else {
- QTextStream ts(&file);
+ TQTextStream ts(&file);
ts >> pid; /* Ascii lockfile */
}
file.close();
if (pid > 0 && kill((pid_t)pid, 0) < 0 && errno == ESRCH) {
- PRINT_DEBUG << QString("Lockfile %1 is stale. Overriding it..\n").arg(lockName);
+ PRINT_DEBUG << TQString("Lockfile %1 is stale. Overriding it..\n").arg(lockName);
sleep(1);
if (!file.remove()) {
- PRINT_DEBUG << QString("Overriding failed, please check the permissions\n");
- PRINT_DEBUG << QString("Cannot lock device %1\n").arg(device);
+ PRINT_DEBUG << TQString("Overriding failed, please check the permissions\n");
+ PRINT_DEBUG << TQString("Cannot lock device %1\n").arg(device);
err_reason = i18n("Lockfile %1 is stale. Please check permissions.").arg(lockName);
return false;
}
@@ -433,22 +433,22 @@ bool KMobileDevice::lockDevice(const QString &device, QString &err_reason)
err_reason = i18n("Could not create lockfile %1. Error-Code is %2.").arg(lockName).arg(errno);
return false;
}
- QString lockText;
- lockText = QString("%1 kmobile\n").arg(getpid(),10);
+ TQString lockText;
+ lockText = TQString("%1 kmobile\n").arg(getpid(),10);
write(fd, lockText.utf8(), lockText.utf8().length());
close(fd);
- PRINT_DEBUG << QString("%1: Device %2 locked with lockfile %3.\n")
+ PRINT_DEBUG << TQString("%1: Device %2 locked with lockfile %3.\n")
.arg(deviceName()).arg(device).arg(lockName);
- err_reason = QString::null;
+ err_reason = TQString::null;
return true;
# endif
#endif
}
-bool KMobileDevice::unlockDevice(const QString &device)
+bool KMobileDevice::unlockDevice(const TQString &device)
{
#ifdef HAVE_BAUDBOY_H
return ttyunlock(device.local8bit()) == EXIT_SUCCESS;
@@ -456,10 +456,10 @@ bool KMobileDevice::unlockDevice(const QString &device)
# ifdef HAVE_LOCKDEV_H
return 0 <= dev_unlock(device.local8bit(), getpid());
# else
- QStringList all = QStringList::split('/', device);
+ TQStringList all = TQStringList::split('/', device);
if (!all.count()) return false;
- QString lockName = DEVICE_LOCK_PATH_PREFIX + all[all.count()-1];
- QFile file(lockName);
+ TQString lockName = DEVICE_LOCK_PATH_PREFIX + all[all.count()-1];
+ TQFile file(lockName);
if (!file.exists())
return true;
return file.remove();
diff --git a/kmobile/kmobiledevice.h b/kmobile/kmobiledevice.h
index 5fbcad6d2..8d1e69a0d 100644
--- a/kmobile/kmobiledevice.h
+++ b/kmobile/kmobiledevice.h
@@ -20,9 +20,9 @@
#ifndef LIB_KMOBILEDEVICE_H
#define LIB_KMOBILEDEVICE_H
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qmutex.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqmutex.h>
#include <kdepimmacros.h>
#include <klibloader.h>
@@ -38,7 +38,7 @@
class KConfig;
#define KMOBILE_MIMETYPE_DEVICE "kdedevice/mobiledevice"
-#define KMOBILE_MIMETYPE_DEVICE_KONQUEROR(name) QString("kdedevice/kmobile_%1").arg(name)
+#define KMOBILE_MIMETYPE_DEVICE_KONQUEROR(name) TQString("kdedevice/kmobile_%1").arg(name)
#define KMOBILE_MIMETYPE_INODE "inode/"
#define KMOBILE_ICON_UNKNOWN "mobile_unknown"
@@ -51,8 +51,8 @@ class KConfig;
* For a KMobileSomeDevice driver you have to write the following code:
* <pre>
* K_EXPORT_COMPONENT_FACTORY( libkmobile_somedevice, KMobileSomeDevice() );
- * QObject *KMobileSomeDevice::createObject( QObject *parent, const char *name,
- * const char *, const QStringList &args )
+ * TQObject *KMobileSomeDevice::createObject( TQObject *parent, const char *name,
+ * const char *, const TQStringList &args )
* {
* return new KMobileSomeDevice( parent, name, args );
* }
@@ -75,7 +75,7 @@ public:
* @param name The object name. For session management and window management to work.
* @param args Additional commandline parameters - the first entry has the config file name.
*/
- KMobileDevice(QObject *obj, const char *name, const QStringList &args );
+ KMobileDevice(TQObject *obj, const char *name, const TQStringList &args );
virtual ~KMobileDevice();
@@ -84,14 +84,14 @@ public:
*
* @param parent The parent widget. It will be used as parent for message boxes.
*/
- virtual bool connectDevice( QWidget *parent = 0 ) = 0;
+ virtual bool connectDevice( TQWidget *parent = 0 ) = 0;
/**
* Disconnect from the device.
*
* @param parent The parent widget. It will be used as parent for message boxes.
*/
- virtual bool disconnectDevice( QWidget *parent = 0 ) = 0;
+ virtual bool disconnectDevice( TQWidget *parent = 0 ) = 0;
/**
* Returns true, if the device is currently connected and the link is online.
@@ -102,23 +102,23 @@ public:
* Returns the classname, to which the device belongs. Examples are e.g.
* "Nokia mobile phone", "MP3 Player", "Handspring Organizer"
*/
- virtual QString deviceClassName() const;
+ virtual TQString deviceClassName() const;
/**
* Returns the real devices name, e.g. "Nokia 6310" or "Rio MP3 Player"
*/
- virtual QString deviceName() const;
+ virtual TQString deviceName() const;
/**
* Returns the hardware revision of the devices, e.g. "Revision 1.2"
*/
- virtual QString revision() const;
+ virtual TQString revision() const;
/**
* Returns an unique ID for the device, e.g. IMEI number on phones, or serial number.
* The returned String is used to have a unique identification for syncronisation.
*/
- virtual QString deviceUniqueID() = 0;
+ virtual TQString deviceUniqueID() = 0;
/**
* Returns true, if the device is connected via a slow connection.
@@ -136,7 +136,7 @@ public:
*
* @param parent The parent widget. It will be used as parent for the configuration dialog.
*/
- virtual bool configDialog(QWidget *parent);
+ virtual bool configDialog(TQWidget *parent);
// The ClassType may be used e.g. to select an suitable icon
enum ClassType {
@@ -151,11 +151,11 @@ public:
// you may provide your own icon() implementation to display
// an appropriate Pixmap (e.g. a Palm Pilot or a Zaurus image).
- virtual QString iconFileName() const;
+ virtual TQString iconFileName() const;
// the default Icon set
- static QString defaultIconFileName( ClassType ct = Unclassified );
- static QString defaultClassName( ClassType ct = Unclassified );
+ static TQString defaultIconFileName( ClassType ct = Unclassified );
+ static TQString defaultClassName( ClassType ct = Unclassified );
// The capabilities of this device (bitmapped value)
enum Capabilities {
@@ -167,11 +167,11 @@ public:
hasAnyCapability = 0xffff // used to select devices independent of the capatibilities
};
int capabilities() const;
- const QString nameForCap(int cap) const;
+ const TQString nameForCap(int cap) const;
// returns an error string for the given error code
// See KIO::buildErrorString()
- QString buildErrorString(KIO::Error err, const QString &errorText) const;
+ TQString buildErrorString(KIO::Error err, const TQString &errorText) const;
public:
/*
@@ -192,8 +192,8 @@ public:
* Notes support
*/
virtual int numNotes();
- virtual int readNote( int index, QString &note );
- virtual int storeNote( int index, const QString &note );
+ virtual int readNote( int index, TQString &note );
+ virtual int storeNote( int index, const TQString &note );
@@ -207,10 +207,10 @@ public:
/**
* helper functions for the kmobile device drivers
*/
- void createDirEntry(KIO::UDSEntry& entry, const QString& name,
- const QString& url, const QString& mime) const;
- void createFileEntry(KIO::UDSEntry& entry, const QString& name,
- const QString& url, const QString& mime,
+ void createDirEntry(KIO::UDSEntry& entry, const TQString& name,
+ const TQString& url, const TQString& mime) const;
+ void createFileEntry(KIO::UDSEntry& entry, const TQString& name,
+ const TQString& url, const TQString& mime,
const unsigned long size = 0) const;
/**
* Lists the contents of @p path.
@@ -219,7 +219,7 @@ public:
* It should also emit @ref #totalFiles as soon as it knows how many
* files it will list.
*/
- virtual void listDir( const QString &url );
+ virtual void listDir( const TQString &url );
/**
* Create a directory
@@ -228,7 +228,7 @@ public:
* (-1 if no permissions to be set)
* The slave emits ERR_COULD_NOT_MKDIR if failure.
*/
- virtual void mkdir( const QString &url, int permissions );
+ virtual void mkdir( const TQString &url, int permissions );
/**
* Rename @p oldname into @p newname.
@@ -238,7 +238,7 @@ public:
* @param dest where to move the file to
* @param overwrite if true, any existing file will be overwritten
*/
- virtual void rename( const QString &src, const QString &dest, bool overwrite );
+ virtual void rename( const TQString &src, const TQString &dest, bool overwrite );
/**
* Creates a symbolic link named @p dest, pointing to @p target, which
@@ -247,7 +247,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 QString &dest, bool overwrite );
+ virtual void symlink( const TQString &target, const TQString &dest, bool overwrite );
/**
* Delete a file or directory.
@@ -255,20 +255,20 @@ public:
* @param isfile if true, a file should be deleted.
* if false, a directory should be deleted.
*/
- virtual void del( const QString &url, bool isfile);
+ virtual void del( const TQString &url, bool isfile);
/**
* Finds all details for one file or directory.
* The information returned is the same as what @ref #listDir returns,
* but only for one file or directory.
*/
- virtual void stat( const QString &url );
+ virtual void stat( const TQString &url );
/**
* Change permissions on @p path
* The slave emits ERR_DOES_NOT_EXIST or ERR_CANNOT_CHMOD
*/
- virtual void chmod( const QString &url, int permissions );
+ virtual void chmod( const TQString &url, int permissions );
/**
* get, aka read.
@@ -276,7 +276,7 @@ public:
* can be assumed to be the same as in the last setHost() call.
* The slave emits the data through @ref #data
*/
- virtual void get( const QString &url );
+ virtual void get( const TQString &url );
/**
* put, aka write.
@@ -287,7 +287,7 @@ public:
* permissions change to it.
* @param resume
*/
- virtual void put( const QString &url, int permissions, bool overwrite, bool resume );
+ virtual void put( const TQString &url, int permissions, bool overwrite, bool resume );
/**
* Finds mimetype for one file or directory.
@@ -301,7 +301,7 @@ public:
* determining the mimetype on it - this is obviously not a
* good thing in most cases.
*/
- virtual void mimetype( const QString &url );
+ virtual void mimetype( const TQString &url );
/**
* Used for any command that is specific to this slave (protocol)
@@ -311,7 +311,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 & );
+ virtual void special( const TQByteArray & );
signals:
/**
@@ -351,10 +351,10 @@ signals:
* 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;
* }
* </pre>
*
@@ -365,13 +365,13 @@ signals:
* 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;
* }
* </pre>
*
@@ -383,13 +383,13 @@ signals:
* @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 );
/**
* Call this in @ref #mimetype, when you know the mimetype.
* See @ref #mimetype about other ways to implement it.
*/
- void mimeType( const QString &_type );
+ void mimeType( const TQString &_type );
/**
* Call to signal an error.
@@ -408,18 +408,18 @@ signals:
* @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 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 );
/**
* Call to signal successful completion of any command
@@ -446,10 +446,10 @@ signals:
* 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 in @ref #get and @ref #copy, to give the total size
@@ -473,7 +473,7 @@ protected:
void setClassType( enum ClassType ct );
void setCapabilities( int caps );
KConfig *config() const { return m_config; };
- QString configFileName() const { return m_configFileName; };
+ TQString configFileName() const { return m_configFileName; };
/**
@@ -481,18 +481,18 @@ protected:
* @param device Name of a device port (e.g. /dev/ttyS1, ttyS1, /dev/ircomm0)
* Returns true, if device could be locked or unlocked
*/
- bool lockDevice(const QString &device, QString &err_reason);
- bool unlockDevice(const QString &device);
+ bool lockDevice(const TQString &device, TQString &err_reason);
+ bool unlockDevice(const TQString &device);
protected:
- QMutex m_mutex; // mutex to syncronize DCOP accesses to this device
- QString m_configFileName;
+ TQMutex m_mutex; // mutex to syncronize DCOP accesses to this device
+ TQString m_configFileName;
KConfig *m_config; // this is where this device should store it's configuration
enum ClassType m_classType;
- QString m_deviceClassName; // e.g. "Nokia mobile phone", "MP3 Player", "Handspring Organizer"
- QString m_deviceName; // e.g. "Nokia 6310", "Opie"
- QString m_deviceRevision; // e.g. "Revision 1.2" or "n/a"
- QString m_connectionName; // e.g. "IRDA", "USB", "Cable", "gnokii", "gammu", ...
+ TQString m_deviceClassName; // e.g. "Nokia mobile phone", "MP3 Player", "Handspring Organizer"
+ TQString m_deviceName; // e.g. "Nokia 6310", "Opie"
+ TQString m_deviceRevision; // e.g. "Revision 1.2" or "n/a"
+ TQString m_connectionName; // e.g. "IRDA", "USB", "Cable", "gnokii", "gammu", ...
int m_caps; // see enum Capabilities
bool m_connected;
diff --git a/kmobile/kmobileiface.h b/kmobile/kmobileiface.h
index 9447c667c..926c8a6bb 100644
--- a/kmobile/kmobileiface.h
+++ b/kmobile/kmobileiface.h
@@ -6,7 +6,7 @@
#define _KMOBILEIFACE_H_
#include <dcopobject.h>
-#include <qstringlist.h>
+#include <tqstringlist.h>
class QStringList;
@@ -16,40 +16,40 @@ class kmobileIface : virtual public DCOPObject
public:
k_dcop:
- virtual QStringList deviceNames() = 0;
+ virtual TQStringList deviceNames() = 0;
- virtual void removeDevice( QString deviceName ) = 0;
- virtual void configDevice( QString deviceName ) = 0;
+ virtual void removeDevice( TQString deviceName ) = 0;
+ virtual void configDevice( TQString deviceName ) = 0;
- virtual bool connectDevice( QString deviceName ) = 0;
- virtual bool disconnectDevice( QString deviceName ) = 0;
- virtual bool connected( QString deviceName ) = 0;
+ virtual bool connectDevice( TQString deviceName ) = 0;
+ virtual bool disconnectDevice( TQString deviceName ) = 0;
+ virtual bool connected( TQString deviceName ) = 0;
- virtual QString deviceClassName( QString deviceName ) = 0;
- virtual QString deviceName( QString deviceName ) = 0;
- virtual QString revision( QString deviceName ) = 0;
- virtual int classType( QString deviceName ) = 0;
+ virtual TQString deviceClassName( TQString deviceName ) = 0;
+ virtual TQString deviceName( TQString deviceName ) = 0;
+ virtual TQString revision( TQString deviceName ) = 0;
+ virtual int classType( TQString deviceName ) = 0;
- virtual int capabilities( QString deviceName ) = 0;
- virtual QString nameForCap( QString deviceName, int cap ) = 0;
+ virtual int capabilities( TQString deviceName ) = 0;
+ virtual TQString nameForCap( TQString deviceName, int cap ) = 0;
- virtual QString iconFileName( QString deviceName ) = 0;
+ virtual TQString iconFileName( TQString deviceName ) = 0;
- virtual int numAddresses( QString deviceName ) = 0;
- virtual QString readAddress( QString deviceName, int index ) = 0;
- virtual bool storeAddress( QString deviceName, int index, QString vcard, bool append ) = 0;
+ virtual int numAddresses( TQString deviceName ) = 0;
+ virtual TQString readAddress( TQString deviceName, int index ) = 0;
+ virtual bool storeAddress( TQString deviceName, int index, TQString vcard, bool append ) = 0;
- virtual int numCalendarEntries( QString deviceName ) = 0;
+ virtual int numCalendarEntries( TQString deviceName ) = 0;
- virtual int numNotes( QString deviceName ) = 0;
- virtual QString readNote( QString deviceName, int index ) = 0;
- virtual bool storeNote( QString deviceName, int index, QString note ) = 0;
+ virtual int numNotes( TQString deviceName ) = 0;
+ virtual TQString readNote( TQString deviceName, int index ) = 0;
+ virtual bool storeNote( TQString deviceName, int index, TQString note ) = 0;
/*
* DCOP functions for the devices:/ kioslave
*/
k_dcop:
- virtual QStringList kio_devices_deviceInfo(QString deviceName) = 0;
+ virtual TQStringList kio_devices_deviceInfo(TQString deviceName) = 0;
};
#endif // _KMOBILEIFACE_H_
diff --git a/kmobile/kmobileitem.cpp b/kmobile/kmobileitem.cpp
index 0cf61fec7..0e4705c5b 100644
--- a/kmobile/kmobileitem.cpp
+++ b/kmobile/kmobileitem.cpp
@@ -17,7 +17,7 @@
*/
-#include <qobject.h>
+#include <tqobject.h>
#include <kiconloader.h>
#include <klocale.h>
@@ -29,8 +29,8 @@
#define PRINT_DEBUG kdDebug() << "KMobileItem: "
-KMobileItem::KMobileItem(QIconView *parent, KConfig *_config, KService::Ptr service)
- : QObject(parent), QIconViewItem(parent), m_dev(0L)
+KMobileItem::KMobileItem(TQIconView *parent, KConfig *_config, KService::Ptr service)
+ : TQObject(parent), TQIconViewItem(parent), m_dev(0L)
{
config = _config;
@@ -38,7 +38,7 @@ KMobileItem::KMobileItem(QIconView *parent, KConfig *_config, KService::Ptr serv
if (service) {
setText(service->name());
m_deviceDesktopFile = service->desktopEntryName();
- m_deviceConfigFile = QString("kmobile_%1_rc").arg(text());
+ m_deviceConfigFile = TQString("kmobile_%1_rc").arg(text());
m_deviceConfigFile = m_deviceConfigFile.replace(' ', "");
m_iconName = service->icon();
};
@@ -51,8 +51,8 @@ KMobileItem::KMobileItem(QIconView *parent, KConfig *_config, KService::Ptr serv
}
/* restore this item from the config file */
-KMobileItem::KMobileItem(QIconView *parent, KConfig *_config, int reload_index)
- : QObject(parent), QIconViewItem(parent), m_dev(0L)
+KMobileItem::KMobileItem(TQIconView *parent, KConfig *_config, int reload_index)
+ : TQObject(parent), TQIconViewItem(parent), m_dev(0L)
{
config = _config;
@@ -96,19 +96,19 @@ bool KMobileItem::configLoad(int idx)
return true;
}
-QPixmap KMobileItem::getIcon() const
+TQPixmap KMobileItem::getIcon() const
{
return KGlobal::instance()->iconLoader()->loadIcon(m_iconName, KIcon::Desktop );
}
-QString KMobileItem::config_SectionName(int idx) const
+TQString KMobileItem::config_SectionName(int idx) const
{
if (idx == -1) idx = index();
- return QString("MobileDevice_%1").arg(idx);
+ return TQString("MobileDevice_%1").arg(idx);
}
/* this MimeType is used by konqueror */
-QString KMobileItem::getKonquMimeType() const
+TQString KMobileItem::getKonquMimeType() const
{
return KMOBILE_MIMETYPE_DEVICE_KONQUEROR(text());
}
@@ -117,13 +117,13 @@ QString KMobileItem::getKonquMimeType() const
void KMobileItem::writeKonquMimeFile() const
{
// strip path and file extension of icon name
- QString icon = m_iconName;
+ TQString icon = m_iconName;
int p = icon.findRev('/');
if (p>=0) icon = icon.mid(p+1);
p = icon.find('.');
if (p>=0) icon = icon.left(p);
- QString comment;
+ TQString comment;
if (m_dev)
comment = m_dev->deviceClassName();
if (comment.isEmpty())
@@ -161,7 +161,7 @@ KService::Ptr KMobileItem::getServicePtr() const
if (ptr->desktopEntryName() == m_deviceDesktopFile)
return ptr;
}
- PRINT_DEBUG << QString("Service for library '%1' not found in KService list\n")
+ PRINT_DEBUG << TQString("Service for library '%1' not found in KService list\n")
.arg(m_deviceDesktopFile);
return 0L;
}
@@ -178,14 +178,14 @@ bool KMobileItem::driverAvailable()
if (!ptr)
return false;
- PRINT_DEBUG << QString("Loading library %1\n").arg(ptr->library());
+ PRINT_DEBUG << TQString("Loading library %1\n").arg(ptr->library());
KLibFactory *factory = KLibLoader::self()->factory( ptr->library().utf8() );
if (!factory)
return false;
m_dev = static_cast<KMobileDevice *>(factory->create(this, ptr->name().utf8(),
- "KMobileDevice", QStringList(m_deviceConfigFile)));
- PRINT_DEBUG << QString("Got KMobileDevice object at 0x%1, configfile=%2\n")
+ "KMobileDevice", TQStringList(m_deviceConfigFile)));
+ PRINT_DEBUG << TQString("Got KMobileDevice object at 0x%1, configfile=%2\n")
.arg((unsigned long)m_dev, 0, 16).arg(m_deviceConfigFile);
return (m_dev != 0);
diff --git a/kmobile/kmobileitem.h b/kmobile/kmobileitem.h
index b23a8f1e0..2977fda7d 100644
--- a/kmobile/kmobileitem.h
+++ b/kmobile/kmobileitem.h
@@ -5,30 +5,30 @@
#ifndef _KMOBILEITEM_H_
#define _KMOBILEITEM_H_
-#include <qiconview.h>
-#include <qpixmap.h>
+#include <tqiconview.h>
+#include <tqpixmap.h>
#include <ktrader.h>
#include "kmobiledevice.h"
-class KMobileItem : public QObject, public QIconViewItem
+class KMobileItem : public TQObject, public TQIconViewItem
{
Q_OBJECT
friend class KMobileView;
public:
- KMobileItem(QIconView *parent, KConfig *config, KService::Ptr service);
- KMobileItem(QIconView *parent, KConfig *config, int reload_index);
+ KMobileItem(TQIconView *parent, KConfig *config, KService::Ptr service);
+ KMobileItem(TQIconView *parent, KConfig *config, int reload_index);
virtual ~KMobileItem();
void configSave() const;
bool configLoad(int index);
- QString config_SectionName( int idx = -1 ) const;
- QPixmap getIcon() const;
+ TQString config_SectionName( int idx = -1 ) const;
+ TQPixmap getIcon() const;
static KTrader::OfferList getMobileDevicesList();
protected:
- QString getKonquMimeType() const;
+ TQString getKonquMimeType() const;
void writeKonquMimeFile() const;
@@ -43,10 +43,10 @@ private slots:
private:
KConfig *config;
- QString m_deviceConfigFile;
- QString m_deviceDesktopFile;
+ TQString m_deviceConfigFile;
+ TQString m_deviceDesktopFile;
- QString m_iconName;
+ TQString m_iconName;
};
#endif // _KMOBILEITEM_H_
diff --git a/kmobile/kmobileview.cpp b/kmobile/kmobileview.cpp
index dca825abf..616b9edc6 100644
--- a/kmobile/kmobileview.cpp
+++ b/kmobile/kmobileview.cpp
@@ -17,8 +17,8 @@
*/
-#include <qiconview.h>
-#include <qstringlist.h>
+#include <tqiconview.h>
+#include <tqstringlist.h>
#include <ktrader.h>
#include <klibloader.h>
@@ -32,15 +32,15 @@
#include "kmobileitem.h"
-KMobileView::KMobileView(QWidget *parent, KConfig *_config)
- : DCOPObject("kmobileIface"), QIconView(parent)
+KMobileView::KMobileView(TQWidget *parent, KConfig *_config)
+ : DCOPObject("kmobileIface"), TQIconView(parent)
{
m_config = _config;
- setSelectionMode(QIconView::Single);
- setResizeMode(QIconView::Adjust);
+ setSelectionMode(TQIconView::Single);
+ setResizeMode(TQIconView::Adjust);
setAutoArrange(true);
- connect(this, SIGNAL(doubleClicked(QIconViewItem *)),
- SLOT(slotDoubleClicked(QIconViewItem *)));
+ connect(this, TQT_SIGNAL(doubleClicked(TQIconViewItem *)),
+ TQT_SLOT(slotDoubleClicked(TQIconViewItem *)));
}
KMobileView::~KMobileView()
@@ -50,7 +50,7 @@ KMobileView::~KMobileView()
bool KMobileView::addNewDevice(KConfig *config, KService::Ptr service)
{
kdDebug() << "New mobile device item:\n";
- kdDebug() << QString("LIBRARY: '%1', NAME: '%2', ICON: '%3', COMMENT: '%4'\n")
+ kdDebug() << TQString("LIBRARY: '%1', NAME: '%2', ICON: '%3', COMMENT: '%4'\n")
.arg(service->library()).arg(service->name()).arg(service->icon())
.arg(service->comment());
@@ -66,7 +66,7 @@ void KMobileView::saveAll()
{
m_config->setGroup( "Main" );
m_config->writeEntry( "Entries", count() );
- for ( QIconViewItem *item = firstItem(); item; item = item->nextItem() ) {
+ for ( TQIconViewItem *item = firstItem(); item; item = item->nextItem() ) {
KMobileItem *it = static_cast<KMobileItem *>(item);
it->driverAvailable();
it->configSave();
@@ -89,23 +89,23 @@ void KMobileView::restoreAll()
emit signalChangeStatusbar( i18n("Configuration restored") );
}
-KMobileItem *KMobileView::findDevice( const QString &deviceName ) const
+KMobileItem *KMobileView::findDevice( const TQString &deviceName ) const
{
- for ( QIconViewItem *item = firstItem(); item; item = item->nextItem() ) {
+ for ( TQIconViewItem *item = firstItem(); item; item = item->nextItem() ) {
if (item->text() == deviceName)
return static_cast<KMobileItem *>(item);
}
return 0L;
}
-bool KMobileView::startKonqueror( const QString &devName )
+bool KMobileView::startKonqueror( const TQString &devName )
{
KProcess *proc = new KProcess;
*proc << "kfmclient" << "openProfile" << "webbrowsing" << "mobile:/"+devName;
return proc->start();
}
-void KMobileView::slotDoubleClicked( QIconViewItem * item )
+void KMobileView::slotDoubleClicked( TQIconViewItem * item )
{
startKonqueror(item->text());
}
@@ -119,22 +119,22 @@ void KMobileView::slotDoubleClicked( QIconViewItem * item )
#define MUTEX_UNLOCK(dev) dev->m_mutex.unlock(); }
-QStringList KMobileView::deviceNames()
+TQStringList KMobileView::deviceNames()
{
- QStringList names;
- for ( QIconViewItem *item = firstItem(); item; item = item->nextItem() ) {
+ TQStringList names;
+ for ( TQIconViewItem *item = firstItem(); item; item = item->nextItem() ) {
names.append(item->text());
}
return names;
}
-void KMobileView::removeDevice( QString deviceName )
+void KMobileView::removeDevice( TQString deviceName )
{
delete findDevice(deviceName);
emit signalChangeStatusbar( i18n("%1 removed").arg(deviceName) );
}
-void KMobileView::configDevice( QString deviceName )
+void KMobileView::configDevice( TQString deviceName )
{
KMobileItem *dev = findDevice(deviceName);
if (!dev || !dev->driverAvailable())
@@ -145,7 +145,7 @@ void KMobileView::configDevice( QString deviceName )
}
-bool KMobileView::connectDevice( QString deviceName )
+bool KMobileView::connectDevice( TQString deviceName )
{
KMobileItem *dev = findDevice(deviceName);
if (!dev || !dev->driverAvailable())
@@ -160,7 +160,7 @@ bool KMobileView::connectDevice( QString deviceName )
return connected;
}
-bool KMobileView::disconnectDevice( QString deviceName )
+bool KMobileView::disconnectDevice( TQString deviceName )
{
KMobileItem *dev = findDevice(deviceName);
if (!dev || !dev->driverAvailable())
@@ -175,7 +175,7 @@ bool KMobileView::disconnectDevice( QString deviceName )
return disconnected;
}
-bool KMobileView::connected( QString deviceName )
+bool KMobileView::connected( TQString deviceName )
{
KMobileItem *dev = findDevice(deviceName);
if (!dev || !dev->driverAvailable())
@@ -188,43 +188,43 @@ bool KMobileView::connected( QString deviceName )
}
-QString KMobileView::deviceClassName( QString deviceName )
+TQString KMobileView::deviceClassName( TQString deviceName )
{
KMobileItem *dev = findDevice(deviceName);
if (!dev || !dev->driverAvailable())
- return QString::null;
- QString cn;
+ return TQString::null;
+ TQString cn;
MUTEX_LOCK(dev->m_dev);
cn = dev->m_dev->deviceClassName();
MUTEX_UNLOCK(dev->m_dev);
return cn;
}
-QString KMobileView::deviceName( QString deviceName )
+TQString KMobileView::deviceName( TQString deviceName )
{
KMobileItem *dev = findDevice(deviceName);
if (!dev || !dev->driverAvailable())
- return QString::null;
- QString dn;
+ return TQString::null;
+ TQString dn;
MUTEX_LOCK(dev->m_dev);
dn = dev->m_dev->deviceName();
MUTEX_UNLOCK(dev->m_dev);
return dn;
}
-QString KMobileView::revision( QString deviceName )
+TQString KMobileView::revision( TQString deviceName )
{
KMobileItem *dev = findDevice(deviceName);
if (!dev || !dev->driverAvailable())
- return QString::null;
- QString rev;
+ return TQString::null;
+ TQString rev;
MUTEX_LOCK(dev->m_dev);
rev = dev->m_dev->revision();
MUTEX_UNLOCK(dev->m_dev);
return rev;
}
-int KMobileView::classType( QString deviceName )
+int KMobileView::classType( TQString deviceName )
{
KMobileItem *dev = findDevice(deviceName);
if (!dev || !dev->driverAvailable())
@@ -236,7 +236,7 @@ int KMobileView::classType( QString deviceName )
return ct;
}
-int KMobileView::capabilities( QString deviceName )
+int KMobileView::capabilities( TQString deviceName )
{
KMobileItem *dev = findDevice(deviceName);
if (!dev || !dev->driverAvailable())
@@ -248,31 +248,31 @@ int KMobileView::capabilities( QString deviceName )
return cap;
}
-QString KMobileView::nameForCap( QString deviceName, int cap )
+TQString KMobileView::nameForCap( TQString deviceName, int cap )
{
KMobileItem *dev = findDevice(deviceName);
if (!dev || !dev->driverAvailable())
- return QString::null;
- QString nc;
+ return TQString::null;
+ TQString nc;
MUTEX_LOCK(dev->m_dev);
nc = dev->m_dev->nameForCap(cap);
MUTEX_UNLOCK(dev->m_dev);
return nc;
}
-QString KMobileView::iconFileName( QString deviceName )
+TQString KMobileView::iconFileName( TQString deviceName )
{
KMobileItem *dev = findDevice(deviceName);
if (!dev || !dev->driverAvailable())
- return QString::null;
- QString fn;
+ return TQString::null;
+ TQString fn;
MUTEX_LOCK(dev->m_dev);
fn = dev->m_dev->iconFileName();
MUTEX_UNLOCK(dev->m_dev);
return fn;
}
-int KMobileView::numAddresses( QString deviceName )
+int KMobileView::numAddresses( TQString deviceName )
{
KMobileItem *dev = findDevice(deviceName);
if (!dev || !dev->driverAvailable())
@@ -284,11 +284,11 @@ int KMobileView::numAddresses( QString deviceName )
return num;
}
-QString KMobileView::readAddress( QString deviceName, int index )
+TQString KMobileView::readAddress( TQString deviceName, int index )
{
KMobileItem *dev = findDevice(deviceName);
if (!dev || !dev->driverAvailable())
- return QString::null;
+ return TQString::null;
int err;
KABC::Addressee adr;
@@ -296,12 +296,12 @@ QString KMobileView::readAddress( QString deviceName, int index )
err = dev->m_dev->readAddress(index, adr);
MUTEX_UNLOCK(dev->m_dev);
if (err)
- return QString::null;
+ return TQString::null;
KABC::VCardConverter converter;
- QString str = converter.createVCard(adr);
+ TQString str = converter.createVCard(adr);
if (str.isEmpty())
- return QString::null;
+ return TQString::null;
emit signalChangeStatusbar( i18n("Read addressbook entry %1 from %2")
.arg(index).arg(deviceName) );
@@ -309,7 +309,7 @@ QString KMobileView::readAddress( QString deviceName, int index )
return str;
}
-bool KMobileView::storeAddress( QString deviceName, int index, QString vcard, bool append )
+bool KMobileView::storeAddress( TQString deviceName, int index, TQString vcard, bool append )
{
KMobileItem *dev = findDevice(deviceName);
if (!dev || !dev->driverAvailable())
@@ -330,7 +330,7 @@ bool KMobileView::storeAddress( QString deviceName, int index, QString vcard, bo
return (err == 0);
}
-int KMobileView::numCalendarEntries( QString deviceName )
+int KMobileView::numCalendarEntries( TQString deviceName )
{
KMobileItem *dev = findDevice(deviceName);
if (!dev || !dev->driverAvailable())
@@ -342,7 +342,7 @@ int KMobileView::numCalendarEntries( QString deviceName )
return num;
}
-int KMobileView::numNotes( QString deviceName )
+int KMobileView::numNotes( TQString deviceName )
{
KMobileItem *dev = findDevice(deviceName);
if (!dev || !dev->driverAvailable())
@@ -354,25 +354,25 @@ int KMobileView::numNotes( QString deviceName )
return num;
}
-QString KMobileView::readNote( QString deviceName, int index )
+TQString KMobileView::readNote( TQString deviceName, int index )
{
KMobileItem *dev = findDevice(deviceName);
if (!dev || !dev->driverAvailable())
- return QString::null;
+ return TQString::null;
- QString note;
+ TQString note;
int err;
MUTEX_LOCK(dev->m_dev);
err = dev->m_dev->readNote(index, note);
MUTEX_UNLOCK(dev->m_dev);
if (err)
- return QString::null;
+ return TQString::null;
emit signalChangeStatusbar( i18n("Read note %1 from %2")
.arg(index).arg(deviceName) );
return note;
}
-bool KMobileView::storeNote( QString deviceName, int index, QString note )
+bool KMobileView::storeNote( TQString deviceName, int index, TQString note )
{
KMobileItem *dev = findDevice(deviceName);
if (!dev || !dev->driverAvailable())
@@ -397,22 +397,22 @@ bool KMobileView::storeNote( QString deviceName, int index, QString note )
/*
* returns the information for the given deviceName for usage in the
- * the devices kioslave. The QStringList returned is comparable to the
+ * the devices kioslave. The TQStringList returned is comparable to the
* format of /etc/fstab file. Please refer to the devices kioslave for
* further information.
* If deviceName is empty, this functions returns information for all
* active mobile devices.
* (function is only used by the devices kioslave - don't use elsewhere !)
*/
-QStringList KMobileView::kio_devices_deviceInfo(QString deviceName)
+TQStringList KMobileView::kio_devices_deviceInfo(TQString deviceName)
{
- QStringList mobiles = deviceNames();
+ TQStringList mobiles = deviceNames();
if (mobiles.count() == 0)
return mobiles;
- QStringList mountList;
- for ( QStringList::Iterator it = mobiles.begin(); it != mobiles.end(); ++it ) {
- QString name = *it;
+ TQStringList mountList;
+ for ( TQStringList::Iterator it = mobiles.begin(); it != mobiles.end(); ++it ) {
+ TQString name = *it;
if (deviceName.isEmpty())
mountList << name;
@@ -421,11 +421,11 @@ QStringList KMobileView::kio_devices_deviceInfo(QString deviceName)
continue;
KMobileItem *dev = findDevice(name);
- QString mime = dev ? dev->getKonquMimeType() : KMOBILE_MIMETYPE_DEVICE;
+ TQString mime = dev ? dev->getKonquMimeType() : KMOBILE_MIMETYPE_DEVICE;
mountList << name;
mountList << " ";
- mountList << QString("mobile:/%1").arg(name); // KIO::encodeFileName()
+ mountList << TQString("mobile:/%1").arg(name); // KIO::encodeFileName()
mountList << mime;
mountList << "true"; // mountState
mountList << "---";
diff --git a/kmobile/kmobileview.h b/kmobile/kmobileview.h
index 4e18793cc..079eaf925 100644
--- a/kmobile/kmobileview.h
+++ b/kmobile/kmobileview.h
@@ -5,7 +5,7 @@
#ifndef _KMOBILEVIEW_H_
#define _KMOBILEVIEW_H_
-#include <qiconview.h>
+#include <tqiconview.h>
#include "kmobileiface.h"
@@ -20,66 +20,66 @@ class KMobileItem;
* @author Helge Deller <deller@kde.org>
* @version 0.1
*/
-class KDE_EXPORT KMobileView : public QIconView, public kmobileIface
+class KDE_EXPORT KMobileView : public TQIconView, public kmobileIface
{
Q_OBJECT
public:
- KMobileView(QWidget *parent, KConfig *_config);
+ KMobileView(TQWidget *parent, KConfig *_config);
virtual ~KMobileView();
bool addNewDevice(KConfig *config, KService::Ptr service);
- bool startKonqueror(const QString &devName);
+ bool startKonqueror(const TQString &devName);
/**
* DCOP implementation
*/
- QStringList deviceNames();
+ TQStringList deviceNames();
- void removeDevice( QString deviceName );
- void configDevice( QString deviceName );
+ void removeDevice( TQString deviceName );
+ void configDevice( TQString deviceName );
- bool connectDevice( QString deviceName );
- bool disconnectDevice( QString deviceName );
- bool connected( QString deviceName );
+ bool connectDevice( TQString deviceName );
+ bool disconnectDevice( TQString deviceName );
+ bool connected( TQString deviceName );
- QString deviceClassName( QString deviceName );
- QString deviceName( QString deviceName );
- QString revision( QString deviceName );
- int classType( QString deviceName );
+ TQString deviceClassName( TQString deviceName );
+ TQString deviceName( TQString deviceName );
+ TQString revision( TQString deviceName );
+ int classType( TQString deviceName );
- int capabilities( QString deviceName );
- QString nameForCap( QString deviceName, int cap );
+ int capabilities( TQString deviceName );
+ TQString nameForCap( TQString deviceName, int cap );
- QString iconFileName( QString deviceName );
+ TQString iconFileName( TQString deviceName );
- int numAddresses( QString deviceName );
- QString readAddress( QString deviceName, int index );
- bool storeAddress( QString deviceName, int index, QString vcard, bool append );
+ int numAddresses( TQString deviceName );
+ TQString readAddress( TQString deviceName, int index );
+ bool storeAddress( TQString deviceName, int index, TQString vcard, bool append );
- int numCalendarEntries( QString deviceName );
+ int numCalendarEntries( TQString deviceName );
- int numNotes( QString deviceName );
- QString readNote( QString deviceName, int index );
- bool storeNote( QString deviceName, int index, QString note );
+ int numNotes( TQString deviceName );
+ TQString readNote( TQString deviceName, int index );
+ bool storeNote( TQString deviceName, int index, TQString note );
/* devices kioslave support: */
- QStringList kio_devices_deviceInfo(QString deviceName);
+ TQStringList kio_devices_deviceInfo(TQString deviceName);
public:
void saveAll();
void restoreAll();
protected:
- KMobileItem * findDevice( const QString &deviceName ) const;
+ KMobileItem * findDevice( const TQString &deviceName ) const;
protected slots:
- void slotDoubleClicked( QIconViewItem * item );
+ void slotDoubleClicked( TQIconViewItem * item );
signals:
/**
* Use this signal to change the content of the statusbar
*/
- void signalChangeStatusbar(const QString& text);
+ void signalChangeStatusbar(const TQString& text);
private:
KConfig *m_config;
diff --git a/kmobile/pref.cpp b/kmobile/pref.cpp
index 1d463cb34..6b5a02309 100644
--- a/kmobile/pref.cpp
+++ b/kmobile/pref.cpp
@@ -6,8 +6,8 @@
#include <klocale.h>
-#include <qlayout.h>
-#include <qlabel.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
KMobilePreferences::KMobilePreferences()
: KDialogBase(TreeList, i18n("Preferences"),
@@ -16,7 +16,7 @@ KMobilePreferences::KMobilePreferences()
// this is the base class for your preferences dialog. it is now
// a Treelist dialog.. but there are a number of other
// possibilities (including Tab, Swallow, and just Plain)
- QFrame *frame;
+ TQFrame *frame;
frame = addPage(i18n("First Page"), i18n("Page One Options"));
m_pageOne = new KMobilePrefPageOne(frame);
@@ -24,21 +24,21 @@ KMobilePreferences::KMobilePreferences()
m_pageTwo = new KMobilePrefPageTwo(frame);
}
-KMobilePrefPageOne::KMobilePrefPageOne(QWidget *parent)
- : QFrame(parent)
+KMobilePrefPageOne::KMobilePrefPageOne(TQWidget *parent)
+ : TQFrame(parent)
{
- QHBoxLayout *layout = new QHBoxLayout(this);
+ TQHBoxLayout *layout = new TQHBoxLayout(this);
layout->setAutoAdd(true);
- new QLabel(i18n("Add something here"), this);
+ new TQLabel(i18n("Add something here"), this);
}
-KMobilePrefPageTwo::KMobilePrefPageTwo(QWidget *parent)
- : QFrame(parent)
+KMobilePrefPageTwo::KMobilePrefPageTwo(TQWidget *parent)
+ : TQFrame(parent)
{
- QHBoxLayout *layout = new QHBoxLayout(this);
+ TQHBoxLayout *layout = new TQHBoxLayout(this);
layout->setAutoAdd(true);
- new QLabel(i18n("Add something here"), this);
+ new TQLabel(i18n("Add something here"), this);
}
#include "pref.moc"
diff --git a/kmobile/pref.h b/kmobile/pref.h
index b8786a855..0b6415a30 100644
--- a/kmobile/pref.h
+++ b/kmobile/pref.h
@@ -6,7 +6,7 @@
#define _KMOBILEPREF_H_
#include <kdialogbase.h>
-#include <qframe.h>
+#include <tqframe.h>
class KMobilePrefPageOne;
class KMobilePrefPageTwo;
@@ -26,14 +26,14 @@ class KMobilePrefPageOne : public QFrame
{
Q_OBJECT
public:
- KMobilePrefPageOne(QWidget *parent = 0);
+ KMobilePrefPageOne(TQWidget *parent = 0);
};
class KMobilePrefPageTwo : public QFrame
{
Q_OBJECT
public:
- KMobilePrefPageTwo(QWidget *parent = 0);
+ KMobilePrefPageTwo(TQWidget *parent = 0);
};
#endif // _KMOBILEPREF_H_
diff --git a/kmobile/systemtray.cpp b/kmobile/systemtray.cpp
index b057086e4..01f21c8a5 100644
--- a/kmobile/systemtray.cpp
+++ b/kmobile/systemtray.cpp
@@ -24,10 +24,10 @@
#include <kiconeffect.h>
#include <kdebug.h>
-#include <qhbox.h>
-#include <qpushbutton.h>
-#include <qtooltip.h>
-#include <qpainter.h>
+#include <tqhbox.h>
+#include <tqpushbutton.h>
+#include <tqtooltip.h>
+#include <tqpainter.h>
#include "systemtray.h"
@@ -68,22 +68,22 @@ void SystemTray::contextMenuAboutToShow(KPopupMenu *menu)
menu->removeItemAt(pos);
// create menu entries for each mobile device and add it's icon
- QStringList list = main->mainView()->deviceNames();
+ TQStringList list = main->mainView()->deviceNames();
for (unsigned int no=0; no<list.count(); no++) {
- QString devName = list[no];
- QString iconName = main->mainView()->iconFileName(devName);
- QPixmap pm = KGlobal::instance()->iconLoader()->loadIcon(iconName, KIcon::Small);
+ TQString devName = list[no];
+ TQString iconName = main->mainView()->iconFileName(devName);
+ TQPixmap pm = KGlobal::instance()->iconLoader()->loadIcon(iconName, KIcon::Small);
menu->insertItem(pm, devName, SYSTEMTRAY_STARTID+no, 3+no);
- menu->connectItem(SYSTEMTRAY_STARTID+no, this, SLOT(menuItemSelected()));
+ menu->connectItem(SYSTEMTRAY_STARTID+no, this, TQT_SLOT(menuItemSelected()));
}
- connect(menu, SIGNAL(activated(int)), this, SLOT(menuItemActivated(int)));
+ connect(menu, TQT_SIGNAL(activated(int)), this, TQT_SLOT(menuItemActivated(int)));
}
void SystemTray::menuItemSelected()
{
if (m_menuID<SYSTEMTRAY_STARTID || m_menuID>SYSTEMTRAY_STARTID+1000)
return;
- QString devName = contextMenu()->text(m_menuID);
+ TQString devName = contextMenu()->text(m_menuID);
KMobile *main = static_cast<KMobile *>(parent());
main->mainView()->startKonqueror(devName);
}
@@ -93,12 +93,12 @@ void SystemTray::menuItemActivated(int id)
m_menuID = id;
}
-void SystemTray::setToolTip(const QString &tip)
+void SystemTray::setToolTip(const TQString &tip)
{
if (tip.isEmpty())
- QToolTip::add(this, "KMobile");
+ TQToolTip::add(this, "KMobile");
else
- QToolTip::add(this, tip);
+ TQToolTip::add(this, tip);
}
#include "systemtray.moc"
diff --git a/kmobile/systemtray.h b/kmobile/systemtray.h
index 2a4cae924..4fdef04ca 100644
--- a/kmobile/systemtray.h
+++ b/kmobile/systemtray.h
@@ -41,10 +41,10 @@ protected:
void contextMenuAboutToShow( KPopupMenu* menu );
private:
- void setToolTip(const QString &tip = QString::null);
+ void setToolTip(const TQString &tip = TQString::null);
- QPixmap m_appPix;
- QLabel *m_currentLabel;
+ TQPixmap m_appPix;
+ TQLabel *m_currentLabel;
KActionCollection *m_actionCollection;
int m_menuID;
diff --git a/kmobile/testlibkmobile.cpp b/kmobile/testlibkmobile.cpp
index f89d3871f..e8ff85580 100644
--- a/kmobile/testlibkmobile.cpp
+++ b/kmobile/testlibkmobile.cpp
@@ -5,8 +5,8 @@
#include <kapplication.h>
#include <dcopclient.h>
-#include <qdatastream.h>
-#include <qstring.h>
+#include <tqdatastream.h>
+#include <tqstring.h>
#include <kdebug.h>
int main(int argc, char **argv)
@@ -19,22 +19,22 @@ int main(int argc, char **argv)
DCOPClient *client = app.dcopClient();
client->attach();
- QByteArray data;
- QDataStream ds(data, IO_WriteOnly);
-// ds << QString("a");
+ TQByteArray data;
+ TQDataStream ds(data, IO_WriteOnly);
+// ds << TQString("a");
- QCString replyType;
- QByteArray replyData;
+ TQCString replyType;
+ TQByteArray replyData;
ok = client->call("kmobile", "kmobileIface", "deviceNames()", data, replyType, replyData);
- QDataStream reply(replyData, IO_ReadOnly);
- QStringList deviceNames;
+ TQDataStream reply(replyData, IO_ReadOnly);
+ TQStringList deviceNames;
reply >> deviceNames;
- kdDebug() << QString("%1\n").arg(ok?"Ok":"Failure");
- kdDebug() << QString("Number of currently registered drivers: %1\n").arg(deviceNames.count());
+ kdDebug() << TQString("%1\n").arg(ok?"Ok":"Failure");
+ kdDebug() << TQString("Number of currently registered drivers: %1\n").arg(deviceNames.count());
for (int i=0; i<deviceNames.count(); i++)
- kdDebug() << QString("Device %1: %2\n").arg(i+1).arg(deviceNames[i]);
+ kdDebug() << TQString("Device %1: %2\n").arg(i+1).arg(deviceNames[i]);
// return app.exec();
}
diff --git a/knode/articlewidget.cpp b/knode/articlewidget.cpp
index 805632c24..1bb7527fe 100644
--- a/knode/articlewidget.cpp
+++ b/knode/articlewidget.cpp
@@ -15,17 +15,17 @@
#include <stdlib.h>
#include <sys/stat.h>
-#include <qbuffer.h>
-#include <qclipboard.h>
-#include <qdir.h>
-#include <qfile.h>
-#include <qimage.h>
-#include <qlayout.h>
-#include <qpaintdevicemetrics.h>
-#include <qpopupmenu.h>
-#include <qstringlist.h>
-#include <qtextcodec.h>
-#include <qtimer.h>
+#include <tqbuffer.h>
+#include <tqclipboard.h>
+#include <tqdir.h>
+#include <tqfile.h>
+#include <tqimage.h>
+#include <tqlayout.h>
+#include <tqpaintdevicemetrics.h>
+#include <tqpopupmenu.h>
+#include <tqstringlist.h>
+#include <tqtextcodec.h>
+#include <tqtimer.h>
#include <kaction.h>
#include <kaddrbook.h>
@@ -73,13 +73,13 @@
using namespace KNode;
-QValueList<ArticleWidget*> ArticleWidget::mInstances;
+TQValueList<ArticleWidget*> ArticleWidget::mInstances;
-ArticleWidget::ArticleWidget( QWidget *parent,
+ArticleWidget::ArticleWidget( TQWidget *parent,
KXMLGUIClient *guiClient,
KActionCollection *actionCollection,
const char *name ) :
- QWidget( parent, name ),
+ TQWidget( parent, name ),
mArticle( 0 ),
mViewer( 0 ),
mCSSHelper( 0 ),
@@ -95,7 +95,7 @@ ArticleWidget::ArticleWidget( QWidget *parent,
{
mInstances.append( this );
- QHBoxLayout *box = new QHBoxLayout( this );
+ TQHBoxLayout *box = new TQHBoxLayout( this );
mViewer = new KHTMLPart( this, "mViewer" );
box->addWidget( mViewer->widget() );
mViewer->widget()->setFocusPolicy( WheelFocus );
@@ -104,14 +104,14 @@ ArticleWidget::ArticleWidget( QWidget *parent,
mViewer->setJavaEnabled( false );
mViewer->setMetaRefreshEnabled( false );
mViewer->setOnlyLocalReferences( true );
- mViewer->view()->setFocusPolicy( QWidget::WheelFocus );
- connect( mViewer->browserExtension(), SIGNAL(openURLRequestDelayed(const KURL&, const KParts::URLArgs&)),
- SLOT(slotURLClicked(const KURL&)) );
- connect( mViewer, SIGNAL(popupMenu(const QString&, const QPoint&)),
- SLOT(slotURLPopup(const QString&, const QPoint&)) );
+ mViewer->view()->setFocusPolicy( TQWidget::WheelFocus );
+ connect( mViewer->browserExtension(), TQT_SIGNAL(openURLRequestDelayed(const KURL&, const KParts::URLArgs&)),
+ TQT_SLOT(slotURLClicked(const KURL&)) );
+ connect( mViewer, TQT_SIGNAL(popupMenu(const TQString&, const TQPoint&)),
+ TQT_SLOT(slotURLPopup(const TQString&, const TQPoint&)) );
- mTimer = new QTimer( this );
- connect( mTimer, SIGNAL(timeout()), SLOT(slotTimeout()) );
+ mTimer = new TQTimer( this );
+ connect( mTimer, TQT_SIGNAL(timeout()), TQT_SLOT(slotTimeout()) );
initActions();
readConfig();
@@ -134,85 +134,85 @@ ArticleWidget::~ArticleWidget()
void ArticleWidget::initActions()
{
- mSaveAction = KStdAction::save( this, SLOT(slotSave()), mActionCollection );
+ mSaveAction = KStdAction::save( this, TQT_SLOT(slotSave()), mActionCollection );
mSaveAction->setText( KStdGuiItem::saveAs().text() );
- mPrintAction = KStdAction::print( this, SLOT(slotPrint()), mActionCollection );
- mCopySelectionAction = KStdAction::copy( this, SLOT(slotCopySelection()), mActionCollection );
- mSelectAllAction = KStdAction::selectAll( this, SLOT(slotSelectAll()), mActionCollection );
- mFindAction = KStdAction::find( this, SLOT(slotFind()), mActionCollection, "find_in_article" );
+ mPrintAction = KStdAction::print( this, TQT_SLOT(slotPrint()), mActionCollection );
+ mCopySelectionAction = KStdAction::copy( this, TQT_SLOT(slotCopySelection()), mActionCollection );
+ mSelectAllAction = KStdAction::selectAll( this, TQT_SLOT(slotSelectAll()), mActionCollection );
+ mFindAction = KStdAction::find( this, TQT_SLOT(slotFind()), mActionCollection, "find_in_article" );
mFindAction->setText( i18n("F&ind in Article...") );
mViewSourceAction = new KAction( i18n("&View Source"), Key_V , this,
- SLOT(slotViewSource()), mActionCollection, "article_viewSource" );
+ TQT_SLOT(slotViewSource()), mActionCollection, "article_viewSource" );
mReplyAction = new KAction( i18n("&Followup to Newsgroup..."), "message_reply",
- Key_R, this, SLOT(slotReply()), mActionCollection, "article_postReply" );
+ Key_R, this, TQT_SLOT(slotReply()), mActionCollection, "article_postReply" );
mRemailAction = new KAction( i18n("Reply by E&mail..."), "mail_reply",
- Key_A, this, SLOT(slotRemail()), mActionCollection, "article_mailReply" );
+ Key_A, this, TQT_SLOT(slotRemail()), mActionCollection, "article_mailReply" );
mForwardAction = new KAction( i18n("Forw&ard by Email..."), "mail_forward",
- Key_F, this, SLOT(slotForward()), mActionCollection, "article_forward" );
+ Key_F, this, TQT_SLOT(slotForward()), mActionCollection, "article_forward" );
mCancelAction = new KAction( i18n("article","&Cancel Article"),
- 0, this, SLOT(slotCancel()), mActionCollection, "article_cancel" );
+ 0, this, TQT_SLOT(slotCancel()), mActionCollection, "article_cancel" );
mSupersedeAction = new KAction(i18n("S&upersede Article"),
- 0, this, SLOT(slotSupersede()), mActionCollection, "article_supersede" );
+ 0, this, TQT_SLOT(slotSupersede()), mActionCollection, "article_supersede" );
mFixedFontToggle = new KToggleAction( i18n("U&se Fixed Font"),
- Key_X ,this, SLOT(slotToggleFixedFont()), mActionCollection, "view_useFixedFont" );
+ Key_X ,this, TQT_SLOT(slotToggleFixedFont()), mActionCollection, "view_useFixedFont" );
mFancyToggle = new KToggleAction( i18n("Fancy Formating"),
- Key_Y, this, SLOT(slotToggleFancyFormating()), mActionCollection, "view_fancyFormating" );
+ Key_Y, this, TQT_SLOT(slotToggleFancyFormating()), mActionCollection, "view_fancyFormating" );
mRot13Toggle = new KToggleAction( i18n("&Unscramble (Rot 13)"), "decrypted", 0 , this,
- SLOT(slotToggleRot13()), mActionCollection, "view_rot13" );
+ TQT_SLOT(slotToggleRot13()), mActionCollection, "view_rot13" );
mRot13Toggle->setChecked( false );
KRadioAction *ra;
mHeaderStyleMenu = new KActionMenu( i18n("&Headers"), mActionCollection, "view_headers" );
- ra = new KRadioAction( i18n("&Fancy Headers"), 0, this, SLOT(slotFancyHeaders()),
+ ra = new KRadioAction( i18n("&Fancy Headers"), 0, this, TQT_SLOT(slotFancyHeaders()),
mActionCollection, "view_headers_fancy" );
ra->setExclusiveGroup( "view_headers" );
mHeaderStyleMenu->insert( ra );
- ra = new KRadioAction( i18n("&Standard Headers"), 0, this, SLOT(slotStandardHeaders()),
+ ra = new KRadioAction( i18n("&Standard Headers"), 0, this, TQT_SLOT(slotStandardHeaders()),
mActionCollection, "view_headers_standard" );
ra->setExclusiveGroup( "view_headers" );
mHeaderStyleMenu->insert( ra );
- ra = new KRadioAction( i18n("&All Headers"), 0, this, SLOT(slotAllHeaders()),
+ ra = new KRadioAction( i18n("&All Headers"), 0, this, TQT_SLOT(slotAllHeaders()),
mActionCollection, "view_headers_all" );
ra->setExclusiveGroup( "view_headers" );
mHeaderStyleMenu->insert( ra );
mAttachmentStyleMenu = new KActionMenu( i18n("&Attachments"), mActionCollection, "view_attachments" );
- ra = new KRadioAction( i18n("&As Icon"), 0, this, SLOT(slotIconAttachments()),
+ ra = new KRadioAction( i18n("&As Icon"), 0, this, TQT_SLOT(slotIconAttachments()),
mActionCollection, "view_attachments_icon" );
ra->setExclusiveGroup( "view_attachments" );
mAttachmentStyleMenu->insert( ra );
- ra = new KRadioAction( i18n("&Inline"), 0, this, SLOT(slotInlineAttachments()),
+ ra = new KRadioAction( i18n("&Inline"), 0, this, TQT_SLOT(slotInlineAttachments()),
mActionCollection, "view_attachments_inline" );
ra->setExclusiveGroup( "view_attachments" );
mAttachmentStyleMenu->insert( ra );
- ra = new KRadioAction( i18n("&Hide"), 0, this, SLOT(slotHideAttachments()),
+ ra = new KRadioAction( i18n("&Hide"), 0, this, TQT_SLOT(slotHideAttachments()),
mActionCollection, "view_attachments_hide" );
ra->setExclusiveGroup( "view_attachments" );
mAttachmentStyleMenu->insert( ra );
mCharsetSelect = new KSelectAction( i18n("Chars&et"), 0, mActionCollection, "set_charset" );
mCharsetSelect->setShortcutConfigurable( false );
- QStringList cs = KGlobal::charsets()->descriptiveEncodingNames();
+ TQStringList cs = KGlobal::charsets()->descriptiveEncodingNames();
cs.prepend( i18n("Automatic") );
mCharsetSelect->setItems( cs );
mCharsetSelect->setCurrentItem( 0 );
- connect( mCharsetSelect, SIGNAL(activated(const QString&)),SLOT(slotSetCharset(const QString&)) );
+ connect( mCharsetSelect, TQT_SIGNAL(activated(const TQString&)),TQT_SLOT(slotSetCharset(const TQString&)) );
mCharsetSelectKeyb = new KAction( i18n("Charset"), Key_C, this,
- SLOT(slotSetCharsetKeyboard()), mActionCollection, "set_charset_keyboard" );
+ TQT_SLOT(slotSetCharsetKeyboard()), mActionCollection, "set_charset_keyboard" );
- new KAction( i18n("&Open URL"), "fileopen", 0, this, SLOT(slotOpenURL()),
+ new KAction( i18n("&Open URL"), "fileopen", 0, this, TQT_SLOT(slotOpenURL()),
mActionCollection, "open_url" );
- new KAction( i18n("&Copy Link Address"), "editcopy", 0, this, SLOT( slotCopyURL()),
+ new KAction( i18n("&Copy Link Address"), "editcopy", 0, this, TQT_SLOT( slotCopyURL()),
mActionCollection, "copy_url" );
- new KAction( i18n("&Bookmark This Link"), "bookmark_add", 0, this, SLOT(slotAddBookmark()),
+ new KAction( i18n("&Bookmark This Link"), "bookmark_add", 0, this, TQT_SLOT(slotAddBookmark()),
mActionCollection, "add_bookmark" );
- new KAction( i18n("&Add to Address Book"), 0, this, SLOT(slotAddToAddressBook()),
+ new KAction( i18n("&Add to Address Book"), 0, this, TQT_SLOT(slotAddToAddressBook()),
mActionCollection, "add_addr_book" );
- new KAction( i18n("&Open in Address Book"), 0, this, SLOT(slotOpenInAddressBook()),
+ new KAction( i18n("&Open in Address Book"), 0, this, TQT_SLOT(slotOpenInAddressBook()),
mActionCollection, "openin_addr_book" );
- new KAction( i18n("&Open Attachment"), "fileopen", 0, this, SLOT(slotOpenAttachment()),
+ new KAction( i18n("&Open Attachment"), "fileopen", 0, this, TQT_SLOT(slotOpenAttachment()),
mActionCollection, "open_attachment" );
- new KAction( i18n("&Save Attachment As..."), "filesaveas", 0, this, SLOT(slotSaveAttachment()),
+ new KAction( i18n("&Save Attachment As..."), "filesaveas", 0, this, TQT_SLOT(slotSaveAttachment()),
mActionCollection, "save_attachment" );
}
@@ -288,13 +288,13 @@ void ArticleWidget::readConfig()
mAttachmentStyle = conf->readEntry( "attachmentStyle", "inline" );
mHeaderStyle = conf->readEntry( "headerStyle", "fancy" );
KRadioAction *ra = 0;
- ra = static_cast<KRadioAction*>( mActionCollection->action( QString("view_attachments_%1").arg(mAttachmentStyle).latin1() ) );
+ ra = static_cast<KRadioAction*>( mActionCollection->action( TQString("view_attachments_%1").arg(mAttachmentStyle).latin1() ) );
ra->setChecked( true );
- ra = static_cast<KRadioAction*>( mActionCollection->action( QString("view_headers_%1").arg(mHeaderStyle).latin1() ) );
+ ra = static_cast<KRadioAction*>( mActionCollection->action( TQString("view_headers_%1").arg(mHeaderStyle).latin1() ) );
ra->setChecked( true );
delete mCSSHelper;
- mCSSHelper = new CSSHelper( QPaintDeviceMetrics( mViewer->view() ) );
+ mCSSHelper = new CSSHelper( TQPaintDeviceMetrics( mViewer->view() ) );
if ( !knGlobals.configManager()->readNewsGeneral()->autoMark() )
mTimer->stop();
@@ -391,29 +391,29 @@ void ArticleWidget::displayArticle()
displayHeader();
// body
- QString html;
+ TQString html;
KMime::Content *text = mArticle->textContent();
// check if codec is available
if ( text && !canDecodeText( text->contentType()->charset() ) ) {
- html += QString("<table width=\"100%\" border=\"0\"><tr><td bgcolor=\"#FF0000\">%1</td></tr></table>")
+ html += TQString("<table width=\"100%\" border=\"0\"><tr><td bgcolor=\"#FF0000\">%1</td></tr></table>")
.arg( i18n("Unknown charset. Default charset is used instead.") );
kdDebug(5003) << k_funcinfo << "unknown charset = " << text->contentType()->charset() << endl;
}
// if the article is pgp signed and the user asked for verifying the
// signature, we show a nice header:
- QPtrList<Kpgp::Block> pgpBlocks;
- QStrList nonPgpBlocks;
+ TQPtrList<Kpgp::Block> pgpBlocks;
+ TQStrList nonPgpBlocks;
bool containsPGP = Kpgp::Module::prepareMessageForDecryption( mArticle->body(), pgpBlocks, nonPgpBlocks );
mViewer->write ( html );
- html = QString();
+ html = TQString();
if ( containsPGP ) {
- QPtrListIterator<Kpgp::Block> pbit( pgpBlocks );
- QStrListIterator npbit( nonPgpBlocks );
- QTextCodec *codec;
+ TQPtrListIterator<Kpgp::Block> pbit( pgpBlocks );
+ TQStrListIterator npbit( nonPgpBlocks );
+ TQTextCodec *codec;
if ( text )
codec = KGlobal::charsets()->codecForName( text->contentType()->charset() );
else
@@ -421,18 +421,18 @@ void ArticleWidget::displayArticle()
for( ; *pbit != 0; ++pbit, ++npbit ) {
// handle non-pgp block
- QCString str( *npbit );
+ TQCString str( *npbit );
if( !str.isEmpty() ) {
- QStringList lines = QStringList::split( '\n', codec->toUnicode( str ), true );
+ TQStringList lines = TQStringList::split( '\n', codec->toUnicode( str ), true );
displayBodyBlock( lines );
}
// handle pgp block
Kpgp::Block* block = *pbit;
if ( block->type() == Kpgp::ClearsignedBlock )
block->verify();
- QStringList lines = QStringList::split( '\n', codec->toUnicode( block->text() ), true );
+ TQStringList lines = TQStringList::split( '\n', codec->toUnicode( block->text() ), true );
if ( block->isSigned() ) {
- QString signClass = displaySigHeader( block );
+ TQString signClass = displaySigHeader( block );
displayBodyBlock( lines );
displaySigFooter( signClass );
} else {
@@ -440,9 +440,9 @@ void ArticleWidget::displayArticle()
}
}
// deal with the last non-pgp block
- QCString str( *npbit );
+ TQCString str( *npbit );
if( !str.isEmpty() ) {
- QStringList lines = QStringList::split( '\n', codec->toUnicode( str ), true );
+ TQStringList lines = TQStringList::split( '\n', codec->toUnicode( str ), true );
displayBodyBlock( lines );
}
}
@@ -464,7 +464,7 @@ void ArticleWidget::displayArticle()
if ( text && text->hasContent() && !ct->isPartial() ) {
// handle HTML messages
if ( text->contentType()->isHTMLText() ) {
- QString htmlTxt;
+ TQString htmlTxt;
text->decodedText( htmlTxt, true, knGlobals.configManager()->readNewsViewer()->removeTrailingNewlines() );
if ( mShowHtml ) {
// strip </html> & </body>
@@ -486,7 +486,7 @@ void ArticleWidget::displayArticle()
}
else {
if ( !containsPGP ) {
- QStringList lines;
+ TQStringList lines;
text->decodedText( lines, true, knGlobals.configManager()->readNewsViewer()->removeTrailingNewlines() );
displayBodyBlock( lines );
}
@@ -513,12 +513,12 @@ void ArticleWidget::displayArticle()
}
-void ArticleWidget::displayErrorMessage( const QString &msg )
+void ArticleWidget::displayErrorMessage( const TQString &msg )
{
mViewer->begin();
mViewer->setUserStyleSheet( mCSSHelper->cssDefinitions( mFixedFontToggle->isChecked() ) );
mViewer->write( mCSSHelper->htmlHead( mFixedFontToggle->isChecked() ) );
- QString errMsg = msg;
+ TQString errMsg = msg;
mViewer->write( "<b><font size=\"+1\" color=\"red\">" );
mViewer->write( i18n("An error occurred.") );
mViewer->write( "</font></b><hr/><br/>" );
@@ -542,18 +542,18 @@ void ArticleWidget::displayErrorMessage( const QString &msg )
void ArticleWidget::displayHeader()
{
- QString headerHtml;
+ TQString headerHtml;
// full header style
if ( mHeaderStyle == "all" ) {
- QCString head = mArticle->head();
+ TQCString head = mArticle->head();
KMime::Headers::Generic *header = 0;
while ( !head.isEmpty() ) {
header = mArticle->getNextHeader( head );
if ( header ) {
headerHtml += "<tr>";
- headerHtml+=QString( "<td align=\"right\" valign=\"top\"><b>%1</b></td><td width=\"100%\">%2</td></tr>" )
+ headerHtml+=TQString( "<td align=\"right\" valign=\"top\"><b>%1</b></td><td width=\"100%\">%2</td></tr>" )
.arg( toHtmlString( header->type(), None ) + ": " )
.arg( toHtmlString( header->asUnicodeString() , ParseURL ) );
delete header;
@@ -569,8 +569,8 @@ void ArticleWidget::displayHeader()
// standard & fancy header style
KMime::Headers::Base *hb;
- QValueList<KNDisplayedHeader*> dhs = knGlobals.configManager()->displayedHeaders()->headers();
- for ( QValueList<KNDisplayedHeader*>::Iterator it = dhs.begin(); it != dhs.end(); ++it ) {
+ TQValueList<KNDisplayedHeader*> dhs = knGlobals.configManager()->displayedHeaders()->headers();
+ for ( TQValueList<KNDisplayedHeader*>::Iterator it = dhs.begin(); it != dhs.end(); ++it ) {
KNDisplayedHeader *dh = (*it);
hb = mArticle->getHeaderByType(dh->header().latin1());
if ( !hb || hb->is("Subject") || hb->is("Organization") )
@@ -589,7 +589,7 @@ void ArticleWidget::displayHeader()
headerHtml+="<tr><td colspan=\"2\">";
if ( hb->is("From") ) {
- headerHtml += QString( "<a href=\"mailto:%1\">%2</a>")
+ headerHtml += TQString( "<a href=\"mailto:%1\">%2</a>")
.arg( KPIM::getEmailAddress( hb->asUnicodeString() ) )
.arg( toHtmlString( hb->asUnicodeString(), None ) );
KMime::Headers::Base *orgHdr = mArticle->getHeaderByType( "Organization" );
@@ -602,7 +602,7 @@ void ArticleWidget::displayHeader()
KMime::Headers::Date *date=static_cast<KMime::Headers::Date*>(hb);
headerHtml += toHtmlString( KGlobal::locale()->formatDateTime(date->qdt(), false, true), None );
} else if ( hb->is("Newsgroups") ) {
- QString groups = hb->asUnicodeString();
+ TQString groups = hb->asUnicodeString();
groups.replace( ',', ", " );
headerHtml += toHtmlString( groups, ParseURL );
} else
@@ -621,24 +621,24 @@ void ArticleWidget::displayHeader()
}
// X-Face support
- QString xfhead;
+ TQString xfhead;
KMime::Headers::Base *temp = mArticle->getHeaderByType("X-Face");
if (temp)
xfhead = temp->asUnicodeString();
- QString xface = "";
+ TQString xface = "";
if ( !xfhead.isEmpty() ) {
KPIM::KXFace xf;
- xface = QString::fromLatin1( "<div class=\"senderpic\"><img src=\"%1\" width=\"48\" height=\"48\"/></div>" )
+ xface = TQString::fromLatin1( "<div class=\"senderpic\"><img src=\"%1\" width=\"48\" height=\"48\"/></div>" )
.arg( imgToDataUrl( xf.toImage( xfhead ), "PNG" ) );
}
// fancy header style
mViewer->write( "<div class=\"fancy header\"" );
- mViewer->write( QString("<div>") );
+ mViewer->write( TQString("<div>") );
mViewer->write( toHtmlString( mArticle->subject()->asUnicodeString(), ParseURL | FancyFormatting ) );
- mViewer->write( QString("</div>") );
+ mViewer->write( TQString("</div>") );
- QString html = QString("<table class=\"outer\"><tr><td width=\"100%\"><table>");
+ TQString html = TQString("<table class=\"outer\"><tr><td width=\"100%\"><table>");
html += headerHtml;
html+="</td></tr></table></td>";
@@ -651,12 +651,12 @@ void ArticleWidget::displayHeader()
&& knGlobals.configManager()->readNewsViewer()->showRefBar() ) {
html += "<div class=\"spamheader\">";
int refCnt = refs->count(), i = 1;
- QCString id = refs->first();
+ TQCString id = refs->first();
id = id.mid( 1, id.length() - 2 ); // remove <>
- html += QString( "<b>%1</b>" ).arg( i18n("References:") );
+ html += TQString( "<b>%1</b>" ).arg( i18n("References:") );
while ( i <= refCnt ) {
- html += " <a href=\"news:" + QString::fromLatin1( id ) + "\">" + QString::number( i ) + "</a>";
+ html += " <a href=\"news:" + TQString::fromLatin1( id ) + "\">" + TQString::number( i ) + "</a>";
id = refs->next();
id = id.mid( 1, id.length() - 2 ); // remove <>
i++;
@@ -669,17 +669,17 @@ void ArticleWidget::displayHeader()
}
-void ArticleWidget::displayBodyBlock( const QStringList &lines )
+void ArticleWidget::displayBodyBlock( const TQStringList &lines )
{
int oldLevel = -2, newLevel = -2;
bool isSig = false;
- QString line, html;
+ TQString line, html;
KNConfig::ReadNewsViewer *rnv = knGlobals.configManager()->readNewsViewer();
- QString quoteChars = rnv->quoteCharacters().simplifyWhiteSpace();
+ TQString quoteChars = rnv->quoteCharacters().simplifyWhiteSpace();
if (quoteChars.isEmpty())
quoteChars = ">";
- for ( QStringList::const_iterator it = lines.begin(); it != lines.end(); ++it) {
+ for ( TQStringList::const_iterator it = lines.begin(); it != lines.end(); ++it) {
line = (*it);
if ( !line.isEmpty() ) {
// signature found
@@ -732,12 +732,12 @@ void ArticleWidget::displayBodyBlock( const QStringList &lines )
}
-QString ArticleWidget::displaySigHeader( Kpgp::Block* block )
+TQString ArticleWidget::displaySigHeader( Kpgp::Block* block )
{
- QString signClass = "signErr";
- QString signer = block->signatureUserId();
- QCString signerKey = block->signatureKeyId();
- QString message;
+ TQString signClass = "signErr";
+ TQString signer = block->signatureUserId();
+ TQCString signerKey = block->signatureKeyId();
+ TQString message;
if ( signer.isEmpty() ) {
message = i18n( "Message was signed with unknown key 0x%1." )
.arg( signerKey );
@@ -799,7 +799,7 @@ QString ArticleWidget::displaySigHeader( Kpgp::Block* block )
}
}
- QString html = "<table cellspacing=\"1\" cellpadding=\"1\" class=\"" + signClass + "\">";
+ TQString html = "<table cellspacing=\"1\" cellpadding=\"1\" class=\"" + signClass + "\">";
html += "<tr class=\"" + signClass + "H\"><td>";
html += message;
html += "</td></tr><tr class=\"" + signClass + "B\"><td>";
@@ -808,9 +808,9 @@ QString ArticleWidget::displaySigHeader( Kpgp::Block* block )
}
-void ArticleWidget::displaySigFooter( const QString &signClass )
+void ArticleWidget::displaySigFooter( const TQString &signClass )
{
- QString html = "</td></tr><tr class=\"" + signClass + "H\">";
+ TQString html = "</td></tr><tr class=\"" + signClass + "H\">";
html += "<td>" + i18n( "End of signed message" ) + "</td></tr></table>";
mViewer->write( html );
}
@@ -821,26 +821,26 @@ void ArticleWidget::displayAttachment( KMime::Content *att, int partNum )
if ( mAttachmentStyle == "hide" )
return;
- QString html;
+ TQString html;
KMime::Headers::ContentType *ct = att->contentType();
// attachment label
- QString label = ct->name();
+ TQString label = ct->name();
if ( label.isEmpty() )
label = i18n("unnamed" );
// if label consists of only whitespace replace them by underscores
if ( (uint)label.contains( ' ' ) == label.length() )
- label.replace( QRegExp( " ", true, true ), "_" );
+ label.replace( TQRegExp( " ", true, true ), "_" );
label = toHtmlString( label, None );
// attachment comment
- QString comment = att->contentDescription()->asUnicodeString();
+ TQString comment = att->contentDescription()->asUnicodeString();
comment = toHtmlString( comment, ParseURL | FancyFormatting );
- QString href;
- QString fileName = writeAttachmentToTempFile( att, partNum );
+ TQString href;
+ TQString fileName = writeAttachmentToTempFile( att, partNum );
if ( fileName.isEmpty() ) {
- href = "part://" + QString::number( partNum );
+ href = "part://" + TQString::number( partNum );
} else {
href = "file:" + KURL::encode_string( fileName );
mAttachementMap[fileName] = partNum;
@@ -861,7 +861,7 @@ void ArticleWidget::displayAttachment( KMime::Content *att, int partNum )
html += "<br>" + comment;
html += "</td></tr><tr class=\"textAtmB\"><td>";
// content
- QString tmp;
+ TQString tmp;
att->decodedText( tmp );
/*if( ct->isHTMLText() )
// ### to dangerous, we should use the same stuff as for the main text here
@@ -872,10 +872,10 @@ void ArticleWidget::displayAttachment( KMime::Content *att, int partNum )
html += "</td></tr></table>";
}
} else { // icon
- QCString mimetype = ct->mimeType();
+ TQCString mimetype = ct->mimeType();
KPIM::kAsciiToLower( mimetype.data() );
- QString iconName = KMimeType::mimeType( mimetype )->icon( QString::null, false );
- QString iconFile = KGlobal::instance()->iconLoader()->iconPath( iconName, KIcon::Desktop );
+ TQString iconName = KMimeType::mimeType( mimetype )->icon( TQString::null, false );
+ TQString iconFile = KGlobal::instance()->iconLoader()->iconPath( iconName, KIcon::Desktop );
html += "<div><a href=\"" + href + "\"><img src=\"" +
iconFile + "\" border=\"0\">" + label +
"</a></div><div>" + comment + "</div><br>";
@@ -884,14 +884,14 @@ void ArticleWidget::displayAttachment( KMime::Content *att, int partNum )
}
-QString ArticleWidget::toHtmlString( const QString &line, int flags )
+TQString ArticleWidget::toHtmlString( const TQString &line, int flags )
{
int llflags = LinkLocator::PreserveSpaces;
if ( !(flags & ArticleWidget::ParseURL) )
llflags |= LinkLocator::IgnoreUrls;
if ( mFancyToggle->isChecked() && (flags & ArticleWidget::FancyFormatting) )
llflags |= LinkLocator::ReplaceSmileys | LinkLocator::HighlightText;
- QString text = line;
+ TQString text = line;
if ( flags & ArticleWidget::AllowROT13 ) {
if ( mRot13 )
text = KNHelper::rot13( line );
@@ -901,19 +901,19 @@ QString ArticleWidget::toHtmlString( const QString &line, int flags )
// from KMail headerstyle.cpp
-QString ArticleWidget::imgToDataUrl( const QImage &image, const char* fmt )
+TQString ArticleWidget::imgToDataUrl( const TQImage &image, const char* fmt )
{
- QByteArray ba;
- QBuffer buffer( ba );
+ TQByteArray ba;
+ TQBuffer buffer( ba );
buffer.open( IO_WriteOnly );
image.save( &buffer, fmt );
- return QString::fromLatin1("data:image/%1;base64,%2")
+ return TQString::fromLatin1("data:image/%1;base64,%2")
.arg( fmt, KCodecs::base64Encode( ba ) );
}
-int ArticleWidget::quotingDepth( const QString &line, const QString &quoteChars )
+int ArticleWidget::quotingDepth( const TQString &line, const TQString &quoteChars )
{
int level = -1;
for ( uint i = 0; i < line.length(); ++i ) {
@@ -936,7 +936,7 @@ bool ArticleWidget::inlinePossible( KMime::Content *c )
}
-bool ArticleWidget::canDecodeText( const QCString &charset ) const
+bool ArticleWidget::canDecodeText( const TQCString &charset ) const
{
if ( charset.isEmpty() )
return false;
@@ -961,26 +961,26 @@ void ArticleWidget::updateContents()
-QString ArticleWidget::writeAttachmentToTempFile( KMime::Content *att, int partNum )
+TQString ArticleWidget::writeAttachmentToTempFile( KMime::Content *att, int partNum )
{
// more or less KMail code
- KTempFile *tempFile = new KTempFile( QString::null, "." + QString::number( partNum ) );
+ KTempFile *tempFile = new KTempFile( TQString::null, "." + TQString::number( partNum ) );
tempFile->setAutoDelete( true );
- QString fname = tempFile->name();
+ TQString fname = tempFile->name();
delete tempFile;
- if( ::access( QFile::encodeName( fname ), W_OK ) != 0 )
+ if( ::access( TQFile::encodeName( fname ), W_OK ) != 0 )
// Not there or not writable
- if( ::mkdir( QFile::encodeName( fname ), 0 ) != 0
- || ::chmod( QFile::encodeName( fname ), S_IRWXU ) != 0 )
- return QString::null; //failed create
+ if( ::mkdir( TQFile::encodeName( fname ), 0 ) != 0
+ || ::chmod( TQFile::encodeName( fname ), S_IRWXU ) != 0 )
+ return TQString::null; //failed create
Q_ASSERT( !fname.isNull() );
mTempDirs.append( fname );
// strip off a leading path
KMime::Headers::ContentType* ct = att->contentType();
- QString attName = ct->name();
+ TQString attName = ct->name();
int slashPos = attName.findRev( '/' );
if( -1 != slashPos )
attName = attName.mid( slashPos + 1 );
@@ -988,16 +988,16 @@ QString ArticleWidget::writeAttachmentToTempFile( KMime::Content *att, int partN
attName = "unnamed";
fname += "/" + attName;
- QByteArray data = att->decodedContent();
+ TQByteArray data = att->decodedContent();
size_t size = data.size();
// ### KMail does crlf2lf conversion here before writing the file
if( !KPIM::kBytesToFile( data.data(), size, fname, false, false, false ) )
- return QString::null;
+ return TQString::null;
mTempFiles.append( fname );
// make file read-only so that nobody gets the impression that he might
// edit attached files
- ::chmod( QFile::encodeName( fname ), S_IRUSR );
+ ::chmod( TQFile::encodeName( fname ), S_IRUSR );
return fname;
}
@@ -1005,11 +1005,11 @@ QString ArticleWidget::writeAttachmentToTempFile( KMime::Content *att, int partN
void ArticleWidget::removeTempFiles( )
{
- for ( QStringList::Iterator it = mTempFiles.begin(); it != mTempFiles.end(); ++it )
- QFile::remove(*it);
+ for ( TQStringList::Iterator it = mTempFiles.begin(); it != mTempFiles.end(); ++it )
+ TQFile::remove(*it);
mTempFiles.clear();
- for ( QStringList::Iterator it = mTempDirs.begin(); it != mTempDirs.end(); ++it )
- QDir(*it).rmdir(*it);
+ for ( TQStringList::Iterator it = mTempDirs.begin(); it != mTempDirs.end(); ++it )
+ TQDir(*it).rmdir(*it);
mTempDirs.clear();
}
@@ -1035,7 +1035,7 @@ void ArticleWidget::processJob( KNJobData * job )
-typedef QValueList<ArticleWidget*>::ConstIterator InstanceIterator;
+typedef TQValueList<ArticleWidget*>::ConstIterator InstanceIterator;
void ArticleWidget::configChanged()
{
@@ -1071,7 +1071,7 @@ void ArticleWidget::articleChanged( KNArticle *article )
}
-void ArticleWidget::articleLoadError( KNArticle *article, const QString &error )
+void ArticleWidget::articleLoadError( KNArticle *article, const TQString &error )
{
for ( InstanceIterator it = mInstances.begin(); it != mInstances.end(); ++it )
if ( (*it)->article() == article )
@@ -1171,10 +1171,10 @@ void ArticleWidget::slotURLClicked( const KURL &url, bool forceOpen)
}
-void ArticleWidget::slotURLPopup( const QString &url, const QPoint &point )
+void ArticleWidget::slotURLPopup( const TQString &url, const TQPoint &point )
{
mCurrentURL = KURL( url );
- QString popupName;
+ TQString popupName;
if ( url.isEmpty() ) // plain text
popupName = "body_popup";
else if ( mCurrentURL.protocol() == "mailto" )
@@ -1186,7 +1186,7 @@ void ArticleWidget::slotURLPopup( const QString &url, const QPoint &point )
return; // skip
else
popupName = "url_popup"; // all other URLs
- QPopupMenu *popup = static_cast<QPopupMenu*>( mGuiClient->factory()->container( popupName, mGuiClient ) );
+ TQPopupMenu *popup = static_cast<TQPopupMenu*>( mGuiClient->factory()->container( popupName, mGuiClient ) );
if ( popup )
popup->popup( point );
}
@@ -1354,7 +1354,7 @@ void ArticleWidget::slotToggleRot13()
-void ArticleWidget::slotSetCharset( const QString &charset )
+void ArticleWidget::slotSetCharset( const TQString &charset )
{
if ( charset.isEmpty() )
return;
@@ -1394,20 +1394,20 @@ void ArticleWidget::slotOpenURL()
void ArticleWidget::slotCopyURL()
{
- QString address;
+ TQString address;
if ( mCurrentURL.protocol() == "mailto" )
address = mCurrentURL.path();
else
address = mCurrentURL.url();
- QApplication::clipboard()->setText( address, QClipboard::Clipboard );
- QApplication::clipboard()->setText( address, QClipboard::Selection );
+ TQApplication::clipboard()->setText( address, QClipboard::Clipboard );
+ TQApplication::clipboard()->setText( address, QClipboard::Selection );
}
void ArticleWidget::slotAddBookmark()
{
if ( mCurrentURL.isEmpty() )
return;
- QString filename = locateLocal( "data", QString::fromLatin1("konqueror/bookmarks.xml") );
+ TQString filename = locateLocal( "data", TQString::fromLatin1("konqueror/bookmarks.xml") );
KBookmarkManager *bookManager = KBookmarkManager::managerForFile( filename, false );
KBookmarkGroup group = bookManager->root();
group.addBookmark( bookManager, mCurrentURL.url(), mCurrentURL );
@@ -1449,26 +1449,26 @@ void ArticleWidget::slotSaveAttachment()
-void ArticleWidget::focusInEvent( QFocusEvent *e )
+void ArticleWidget::focusInEvent( TQFocusEvent *e )
{
emit focusChanged(e);
- QWidget::focusInEvent(e);
+ TQWidget::focusInEvent(e);
}
-void ArticleWidget::focusOutEvent( QFocusEvent *e )
+void ArticleWidget::focusOutEvent( TQFocusEvent *e )
{
emit focusChanged(e);
- QWidget::focusOutEvent(e);
+ TQWidget::focusOutEvent(e);
}
-bool ArticleWidget::eventFilter( QObject *o, QEvent *e )
+bool ArticleWidget::eventFilter( TQObject *o, TQEvent *e )
{
- if ( e->type() == QEvent::KeyPress && (static_cast<QKeyEvent*>(e)->key() == Key_Tab) ) {
+ if ( e->type() == TQEvent::KeyPress && (static_cast<TQKeyEvent*>(e)->key() == Key_Tab) ) {
emit focusChangeRequest( this );
if ( !hasFocus() ) // focusChangeRequest was successful
return true;
}
- return QWidget::eventFilter(o, e);
+ return TQWidget::eventFilter(o, e);
}
#include "articlewidget.moc"
diff --git a/knode/articlewidget.h b/knode/articlewidget.h
index d22926196..66e4106ec 100644
--- a/knode/articlewidget.h
+++ b/knode/articlewidget.h
@@ -14,9 +14,9 @@
#ifndef KNODE_ARTICLEWIDGET_H
#define KNODE_ARTICLEWIDGET_H
-#include <qmap.h>
-#include <qvaluelist.h>
-#include <qwidget.h>
+#include <tqmap.h>
+#include <tqvaluelist.h>
+#include <tqwidget.h>
#include <kurl.h>
@@ -50,13 +50,13 @@ class CSSHelper;
/**
Widget to display a news article
*/
-class ArticleWidget : public QWidget, public KNJobConsumer {
+class ArticleWidget : public TQWidget, public KNJobConsumer {
Q_OBJECT
public:
/// Construct a new article widget
- ArticleWidget( QWidget *parent,
+ ArticleWidget( TQWidget *parent,
KXMLGUIClient *guiClient,
KActionCollection *actionCollection,
const char *name = 0 );
@@ -83,7 +83,7 @@ class ArticleWidget : public QWidget, public KNJobConsumer {
/// notify all instances that the given article has changed
static void articleChanged( KNArticle *article );
/// notify all instances about an error during loading the given article
- static void articleLoadError( KNArticle *article, const QString &error );
+ static void articleLoadError( KNArticle *article, const TQString &error );
/// notify all instances that the given collection has been removed
static void collectionRemoved( KNArticleCollection *coll );
/// cleanup all instances
@@ -99,16 +99,16 @@ class ArticleWidget : public QWidget, public KNJobConsumer {
void scrollNext();
signals:
- void focusChanged( QFocusEvent* );
- void focusChangeRequest( QWidget* );
+ void focusChanged( TQFocusEvent* );
+ void focusChangeRequest( TQWidget* );
protected:
/// process download jobs for view source action
void processJob( KNJobData *j );
- virtual void focusInEvent( QFocusEvent *e );
- virtual void focusOutEvent( QFocusEvent *e );
- virtual bool eventFilter( QObject *o, QEvent *e );
+ virtual void focusInEvent( TQFocusEvent *e );
+ virtual void focusOutEvent( TQFocusEvent *e );
+ virtual bool eventFilter( TQObject *o, TQEvent *e );
private:
void initActions();
@@ -123,18 +123,18 @@ class ArticleWidget : public QWidget, public KNJobConsumer {
/// displays the current article or clears the view if no article is set
void displayArticle();
/// displays the given error message in the viewer
- void displayErrorMessage( const QString &msg );
+ void displayErrorMessage( const TQString &msg );
/// display the message header (should be replaced by KMail's HeaderStyle class)
void displayHeader();
/** displays the given text block, including quote and signature handling
* @param lines A list of lines to display.
*/
- void displayBodyBlock( const QStringList &lines );
+ void displayBodyBlock( const TQStringList &lines );
/// displays a signature block header
- QString displaySigHeader( Kpgp::Block* block );
+ TQString displaySigHeader( Kpgp::Block* block );
/// displays a signature footer
- void displaySigFooter( const QString &signClass );
+ void displaySigFooter( const TQString &signClass );
/// displays the given attachment
void displayAttachment( KMime::Content *att, int partNum );
@@ -146,18 +146,18 @@ class ArticleWidget : public QWidget, public KNJobConsumer {
AllowROT13 = 4
};
/// convert the given string into an HTML string
- QString toHtmlString( const QString &line, int flags = ParseURL );
+ TQString toHtmlString( const TQString &line, int flags = ParseURL );
/// convert the given image into a data:/ URL
- static QString imgToDataUrl( const QImage &image, const char* fmt );
+ static TQString imgToDataUrl( const TQImage &image, const char* fmt );
/** calculates the quoting depth of the given line
* @returns -1 if no quoting was found, the quoting level otherwise
*/
- static int quotingDepth( const QString &line, const QString &quoteChars );
+ static int quotingDepth( const TQString &line, const TQString &quoteChars );
/// checks wether the given attachment can be shown inline
bool inlinePossible( KMime::Content *c );
/// checks if the given charset is supported
- bool canDecodeText( const QCString &charset ) const;
+ bool canDecodeText( const TQCString &charset ) const;
/// regenerated viewer content without changing scrollbar position
void updateContents();
@@ -165,7 +165,7 @@ class ArticleWidget : public QWidget, public KNJobConsumer {
/** stores the given attachment into a temporary file
* @returns the filename the attachment has been stored to
*/
- QString writeAttachmentToTempFile( KMime::Content *att, int partNum );
+ TQString writeAttachmentToTempFile( KMime::Content *att, int partNum );
/// removes all temporary files
void removeTempFiles();
@@ -173,7 +173,7 @@ class ArticleWidget : public QWidget, public KNJobConsumer {
/// called if the user clicked on an URL
void slotURLClicked( const KURL &url, bool forceOpen = false );
/// called if the user RMB clicked on an URL
- void slotURLPopup( const QString &url, const QPoint &point );
+ void slotURLPopup( const TQString &url, const TQPoint &point );
/// mark as read timeout
void slotTimeout();
@@ -201,7 +201,7 @@ class ArticleWidget : public QWidget, public KNJobConsumer {
void slotInlineAttachments();
void slotHideAttachments();
- void slotSetCharset( const QString &charset );
+ void slotSetCharset( const TQString &charset );
void slotSetCharsetKeyboard();
void slotOpenURL();
@@ -218,28 +218,28 @@ class ArticleWidget : public QWidget, public KNJobConsumer {
/// attachments of the current article
KMime::Content::List mAttachments;
/// mapping of temporary file names to part numbers
- QMap<QString, int> mAttachementMap;
+ TQMap<TQString, int> mAttachementMap;
KHTMLPart *mViewer;
CSSHelper *mCSSHelper;
- QStringList mTempDirs, mTempFiles;
+ TQStringList mTempDirs, mTempFiles;
- QString mHeaderStyle;
- QString mAttachmentStyle;
+ TQString mHeaderStyle;
+ TQString mAttachmentStyle;
bool mShowHtml;
bool mRot13;
bool mForceCharset;
- QCString mOverrideCharset;
+ TQCString mOverrideCharset;
/// mark as read timer
- QTimer *mTimer;
+ TQTimer *mTimer;
/// the last RMB clicked URL
KURL mCurrentURL;
/// list of all instances of this class
- static QValueList<ArticleWidget*> mInstances;
+ static TQValueList<ArticleWidget*> mInstances;
KXMLGUIClient *mGuiClient;
KActionCollection *mActionCollection;
diff --git a/knode/csshelper.cpp b/knode/csshelper.cpp
index 144d52bc8..04fcbb6a8 100644
--- a/knode/csshelper.cpp
+++ b/knode/csshelper.cpp
@@ -17,7 +17,7 @@
#include "knglobals.h"
-KNode::CSSHelper::CSSHelper( const QPaintDeviceMetrics &pdm ) :
+KNode::CSSHelper::CSSHelper( const TQPaintDeviceMetrics &pdm ) :
KPIM::CSSHelper( pdm )
{
KNConfig::Appearance *app = knGlobals.configManager()->appearance();
diff --git a/knode/csshelper.h b/knode/csshelper.h
index 23b2216a0..1ad63470e 100644
--- a/knode/csshelper.h
+++ b/knode/csshelper.h
@@ -21,7 +21,7 @@ namespace KNode {
class CSSHelper : public KPIM::CSSHelper
{
public:
- CSSHelper( const QPaintDeviceMetrics &pdm );
+ CSSHelper( const TQPaintDeviceMetrics &pdm );
};
diff --git a/knode/headerview.cpp b/knode/headerview.cpp
index aef02f13a..ede75bb66 100644
--- a/knode/headerview.cpp
+++ b/knode/headerview.cpp
@@ -12,10 +12,10 @@
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, US
*/
-#include <qcursor.h>
-#include <qheader.h>
-#include <qstylesheet.h>
-#include <qtimer.h>
+#include <tqcursor.h>
+#include <tqheader.h>
+#include <tqstylesheet.h>
+#include <tqtimer.h>
#include <klocale.h>
#include <kdebug.h>
@@ -32,7 +32,7 @@
#include "knmainwidget.h"
-KNHeaderView::KNHeaderView(QWidget *parent, const char *name) :
+KNHeaderView::KNHeaderView(TQWidget *parent, const char *name) :
KListView(parent,name),
mSortCol( -1 ),
mSortAsc( true ),
@@ -55,7 +55,7 @@ KNHeaderView::KNHeaderView(QWidget *parent, const char *name) :
setAcceptDrops( false );
setDragEnabled( true );
setAllColumnsShowFocus( true );
- setSelectionMode( QListView::Extended );
+ setSelectionMode( TQListView::Extended );
setShowSortIndicator( true );
setShadeSortColumn ( true );
setRootIsDecorated( true );
@@ -65,9 +65,9 @@ KNHeaderView::KNHeaderView(QWidget *parent, const char *name) :
setColumnAlignment( mPaintInfo.scoreCol, Qt::AlignRight );
// due to our own column text squeezing we need to repaint on column resizing
- disconnect( header(), SIGNAL(sizeChange(int, int, int)) );
- connect( header(), SIGNAL(sizeChange(int, int, int)),
- SLOT(slotSizeChanged(int, int, int)) );
+ disconnect( header(), TQT_SIGNAL(sizeChange(int, int, int)) );
+ connect( header(), TQT_SIGNAL(sizeChange(int, int, int)),
+ TQT_SLOT(slotSizeChanged(int, int, int)) );
// column selection RMB menu
mPopup = new KPopupMenu( this );
@@ -76,11 +76,11 @@ KNHeaderView::KNHeaderView(QWidget *parent, const char *name) :
mPopup->insertItem( i18n("Line Count"), KPaintInfo::COL_SIZE );
mPopup->insertItem( i18n("Score"), KPaintInfo::COL_SCORE );
- connect( mPopup, SIGNAL(activated(int)), this, SLOT(toggleColumn(int)) );
+ connect( mPopup, TQT_SIGNAL(activated(int)), this, TQT_SLOT(toggleColumn(int)) );
// connect to the article manager
- connect( knGlobals.articleManager(), SIGNAL(aboutToShowGroup()), SLOT(prepareForGroup()) );
- connect( knGlobals.articleManager(), SIGNAL(aboutToShowFolder()), SLOT(prepareForFolder()) );
+ connect( knGlobals.articleManager(), TQT_SIGNAL(aboutToShowGroup()), TQT_SLOT(prepareForGroup()) );
+ connect( knGlobals.articleManager(), TQT_SIGNAL(aboutToShowFolder()), TQT_SLOT(prepareForFolder()) );
new KNHeaderViewToolTip( this );
@@ -114,9 +114,9 @@ void KNHeaderView::readConfig()
mDateFormatter.setFormat( rngConf->dateFormat() );
KNConfig::Appearance *app = knGlobals.configManager()->appearance();
- QPalette p = palette();
- p.setColor( QColorGroup::Base, app->backgroundColor() );
- p.setColor( QColorGroup::Text, app->textColor() );
+ TQPalette p = palette();
+ p.setColor( TQColorGroup::Base, app->backgroundColor() );
+ p.setColor( TQColorGroup::Text, app->textColor() );
setPalette( p );
setAlternateBackground( app->alternateBackgroundColor() );
setFont( app->articleListFont() );
@@ -137,7 +137,7 @@ void KNHeaderView::writeConfig()
}
-void KNHeaderView::setActive( QListViewItem *i )
+void KNHeaderView::setActive( TQListViewItem *i )
{
KNHdrViewItem *item = static_cast<KNHdrViewItem*>( i );
@@ -162,16 +162,16 @@ void KNHeaderView::setActive( QListViewItem *i )
void KNHeaderView::clear()
{
mActiveItem = 0;
- QListView::clear();
+ TQListView::clear();
}
-void KNHeaderView::ensureItemVisibleWithMargin( const QListViewItem *i )
+void KNHeaderView::ensureItemVisibleWithMargin( const TQListViewItem *i )
{
if ( !i )
return;
- QListViewItem *parent = i->parent();
+ TQListViewItem *parent = i->parent();
while ( parent ) {
if ( !parent->isOpen() )
parent->setOpen( true );
@@ -188,7 +188,7 @@ void KNHeaderView::ensureItemVisibleWithMargin( const QListViewItem *i )
{
ensureVisible( contentsX(), y + h/2, 0, h/2 );
mDelayedCenter = y + h/2;
- QTimer::singleShot( 300, this, SLOT(slotCenterDelayed()) );
+ TQTimer::singleShot( 300, this, TQT_SLOT(slotCenterDelayed()) );
} else {
ensureVisible( contentsX(), y + h/2, 0, h/2 );
}
@@ -267,7 +267,7 @@ void KNHeaderView::prevArticle()
void KNHeaderView::incCurrentArticle()
{
- QListViewItem *lvi = currentItem();
+ TQListViewItem *lvi = currentItem();
if ( lvi && lvi->isExpandable() )
lvi->setOpen( true );
if ( lvi && lvi->itemBelow() ) {
@@ -279,7 +279,7 @@ void KNHeaderView::incCurrentArticle()
void KNHeaderView::decCurrentArticle()
{
- QListViewItem *lvi = currentItem();
+ TQListViewItem *lvi = currentItem();
if ( lvi && lvi->itemAbove() ) {
if ( lvi->itemAbove()->isExpandable() )
lvi->itemAbove()->setOpen( true );
@@ -451,24 +451,24 @@ void KNHeaderView::prepareForFolder()
}
-bool KNHeaderView::event( QEvent *e )
+bool KNHeaderView::event( TQEvent *e )
{
// we don't want to have the alternate list background restored
// to the system defaults!
- if (e->type() == QEvent::ApplicationPaletteChange)
- return QListView::event(e);
+ if (e->type() == TQEvent::ApplicationPaletteChange)
+ return TQListView::event(e);
else
return KListView::event(e);
}
-void KNHeaderView::contentsMousePressEvent( QMouseEvent *e )
+void KNHeaderView::contentsMousePressEvent( TQMouseEvent *e )
{
if (!e) return;
bool selectMode=(( e->state() & ShiftButton ) || ( e->state() & ControlButton ));
- QPoint vp = contentsToViewport(e->pos());
- QListViewItem *i = itemAt(vp);
+ TQPoint vp = contentsToViewport(e->pos());
+ TQListViewItem *i = itemAt(vp);
KListView::contentsMousePressEvent( e );
@@ -485,11 +485,11 @@ void KNHeaderView::contentsMousePressEvent( QMouseEvent *e )
}
-void KNHeaderView::contentsMouseDoubleClickEvent( QMouseEvent *e )
+void KNHeaderView::contentsMouseDoubleClickEvent( TQMouseEvent *e )
{
if (!e) return;
- QListViewItem *i = itemAt( contentsToViewport(e->pos()) );
+ TQListViewItem *i = itemAt( contentsToViewport(e->pos()) );
if (i) {
emit doubleClick( i );
return;
@@ -499,11 +499,11 @@ void KNHeaderView::contentsMouseDoubleClickEvent( QMouseEvent *e )
}
-void KNHeaderView::keyPressEvent(QKeyEvent *e)
+void KNHeaderView::keyPressEvent(TQKeyEvent *e)
{
if (!e) return;
- QListViewItem *i = currentItem();
+ TQListViewItem *i = currentItem();
switch(e->key()) {
case Key_Space:
@@ -522,9 +522,9 @@ void KNHeaderView::keyPressEvent(QKeyEvent *e)
}
-QDragObject* KNHeaderView::dragObject()
+TQDragObject* KNHeaderView::dragObject()
{
- KNHdrViewItem *item = static_cast<KNHdrViewItem*>( itemAt(viewport()->mapFromGlobal(QCursor::pos())) );
+ KNHdrViewItem *item = static_cast<KNHdrViewItem*>( itemAt(viewport()->mapFromGlobal(TQCursor::pos())) );
if (item)
return item->dragObject();
else
@@ -538,20 +538,20 @@ void KNHeaderView::slotSizeChanged( int section, int, int newSize )
}
-bool KNHeaderView::eventFilter(QObject *o, QEvent *e)
+bool KNHeaderView::eventFilter(TQObject *o, TQEvent *e)
{
- if ((e->type() == QEvent::KeyPress) && (static_cast<QKeyEvent*>(e)->key() == Key_Tab)) {
+ if ((e->type() == TQEvent::KeyPress) && (static_cast<TQKeyEvent*>(e)->key() == Key_Tab)) {
emit(focusChangeRequest(this));
if (!hasFocus()) // focusChangeRequest was successful
return true;
}
// right click on header
- if ( e->type() == QEvent::MouseButtonPress &&
- static_cast<QMouseEvent*>(e)->button() == RightButton &&
- o->isA("QHeader") )
+ if ( e->type() == TQEvent::MouseButtonPress &&
+ static_cast<TQMouseEvent*>(e)->button() == RightButton &&
+ o->isA("TQHeader") )
{
- mPopup->popup( static_cast<QMouseEvent*>(e)->globalPos() );
+ mPopup->popup( static_cast<TQMouseEvent*>(e)->globalPos() );
return true;
}
@@ -559,16 +559,16 @@ bool KNHeaderView::eventFilter(QObject *o, QEvent *e)
}
-void KNHeaderView::focusInEvent(QFocusEvent *e)
+void KNHeaderView::focusInEvent(TQFocusEvent *e)
{
- QListView::focusInEvent(e);
+ TQListView::focusInEvent(e);
emit focusChanged(e);
}
-void KNHeaderView::focusOutEvent(QFocusEvent *e)
+void KNHeaderView::focusOutEvent(TQFocusEvent *e)
{
- QListView::focusOutEvent(e);
+ TQListView::focusOutEvent(e);
emit focusChanged(e);
}
@@ -576,20 +576,20 @@ void KNHeaderView::focusOutEvent(QFocusEvent *e)
void KNHeaderView::resetCurrentTime()
{
mDateFormatter.reset();
- QTimer::singleShot( 1000, this, SLOT(resetCurrentTime()) );
+ TQTimer::singleShot( 1000, this, TQT_SLOT(resetCurrentTime()) );
}
//BEGIN: KNHeaderViewToolTip ==================================================
KNHeaderViewToolTip::KNHeaderViewToolTip( KNHeaderView *parent ) :
- QToolTip( parent->viewport() ),
+ TQToolTip( parent->viewport() ),
listView( parent )
{
}
-void KNHeaderViewToolTip::maybeTip( const QPoint &p )
+void KNHeaderViewToolTip::maybeTip( const TQPoint &p )
{
const KNHdrViewItem *item = static_cast<KNHdrViewItem*>( listView->itemAt( p ) );
if ( !item )
@@ -601,15 +601,15 @@ void KNHeaderViewToolTip::maybeTip( const QPoint &p )
if ( !item->showToolTip( column ) )
return;
- const QRect itemRect = listView->itemRect( item );
+ const TQRect itemRect = listView->itemRect( item );
if ( !itemRect.isValid() )
return;
- const QRect headerRect = listView->header()->sectionRect( column );
+ const TQRect headerRect = listView->header()->sectionRect( column );
if ( !headerRect.isValid() )
return;
- tip( QRect( headerRect.left(), itemRect.top(), headerRect.width(), itemRect.height() ),
- QStyleSheet::escape( item->text( column ) ) );
+ tip( TQRect( headerRect.left(), itemRect.top(), headerRect.width(), itemRect.height() ),
+ TQStyleSheet::escape( item->text( column ) ) );
}
//END: KNHeaderViewToolTip ====================================================
diff --git a/knode/headerview.h b/knode/headerview.h
index 411258d2f..519b7d84e 100644
--- a/knode/headerview.h
+++ b/knode/headerview.h
@@ -15,7 +15,7 @@
#ifndef KNHEADERVIEW_H
#define KNHEADERVIEW_H
-#include <qtooltip.h>
+#include <tqtooltip.h>
#include <klistview.h>
#include <kfoldertree.h>
@@ -31,13 +31,13 @@ class KNHeaderView : public KListView {
friend class KNHdrViewItem;
public:
- KNHeaderView( QWidget *parent, const char *name = 0 );
+ KNHeaderView( TQWidget *parent, const char *name = 0 );
~KNHeaderView();
- void setActive( QListViewItem *item );
+ void setActive( TQListViewItem *item );
void clear();
- void ensureItemVisibleWithMargin( const QListViewItem *i );
+ void ensureItemVisibleWithMargin( const TQListViewItem *i );
virtual void setSorting( int column, bool ascending = true );
bool sortByThreadChangeDate() const { return mSortByThreadChangeDate; }
@@ -52,11 +52,11 @@ class KNHeaderView : public KListView {
const KPaintInfo* paintInfo() const { return &mPaintInfo; }
signals:
- void itemSelected( QListViewItem* );
- void doubleClick( QListViewItem* );
+ void itemSelected( TQListViewItem* );
+ void doubleClick( TQListViewItem* );
void sortingChanged( int );
- void focusChanged( QFocusEvent* );
- void focusChangeRequest( QWidget* );
+ void focusChanged( TQFocusEvent* );
+ void focusChangeRequest( TQWidget* );
public slots:
void nextArticle();
@@ -75,14 +75,14 @@ class KNHeaderView : public KListView {
* Reimplemented to avoid that KListview reloads the alternate
* background on palette changes.
*/
- virtual bool event( QEvent *e );
- void contentsMousePressEvent( QMouseEvent *e );
- void contentsMouseDoubleClickEvent( QMouseEvent *e );
- void keyPressEvent( QKeyEvent *e );
- bool eventFilter( QObject *, QEvent * );
- void focusInEvent( QFocusEvent *e );
- void focusOutEvent( QFocusEvent *e );
- virtual QDragObject* dragObject();
+ virtual bool event( TQEvent *e );
+ void contentsMousePressEvent( TQMouseEvent *e );
+ void contentsMouseDoubleClickEvent( TQMouseEvent *e );
+ void keyPressEvent( TQKeyEvent *e );
+ bool eventFilter( TQObject *, TQEvent * );
+ void focusInEvent( TQFocusEvent *e );
+ void focusOutEvent( TQFocusEvent *e );
+ virtual TQDragObject* dragObject();
private:
int mSortCol;
@@ -104,13 +104,13 @@ class KNHeaderView : public KListView {
};
-class KNHeaderViewToolTip : public QToolTip {
+class KNHeaderViewToolTip : public TQToolTip {
public:
KNHeaderViewToolTip( KNHeaderView *parent );
protected:
- void maybeTip( const QPoint &p );
+ void maybeTip( const TQPoint &p );
private:
KNHeaderView *listView;
diff --git a/knode/knaccountmanager.cpp b/knode/knaccountmanager.cpp
index be43e56b0..167a49c65 100644
--- a/knode/knaccountmanager.cpp
+++ b/knode/knaccountmanager.cpp
@@ -14,7 +14,7 @@
#include <stdlib.h>
-#include <qdir.h>
+#include <tqdir.h>
#include <kdebug.h>
#include <ksimpleconfig.h>
@@ -34,8 +34,8 @@
KWallet::Wallet* KNAccountManager::mWallet = 0;
bool KNAccountManager::mWalletOpenFailed = false;
-KNAccountManager::KNAccountManager(KNGroupManager *gm, QObject * parent, const char * name)
- : QObject(parent, name), gManager(gm), c_urrentAccount(0),
+KNAccountManager::KNAccountManager(KNGroupManager *gm, TQObject * parent, const char * name)
+ : TQObject(parent, name), gManager(gm), c_urrentAccount(0),
mAsyncOpening( false )
{
s_mtp = new KNServerInfo();
@@ -51,7 +51,7 @@ KNAccountManager::KNAccountManager(KNGroupManager *gm, QObject * parent, const c
KNAccountManager::~KNAccountManager()
{
- QValueList<KNNntpAccount*>::Iterator it;
+ TQValueList<KNNntpAccount*>::Iterator it;
for ( it = mAccounts.begin(); it != mAccounts.end(); ++it )
delete (*it);
mAccounts.clear();
@@ -63,7 +63,7 @@ KNAccountManager::~KNAccountManager()
void KNAccountManager::prepareShutdown()
{
- QValueList<KNNntpAccount*>::Iterator it;
+ TQValueList<KNNntpAccount*>::Iterator it;
for ( it = mAccounts.begin(); it != mAccounts.end(); ++it )
(*it)->saveInfo();
}
@@ -71,16 +71,16 @@ void KNAccountManager::prepareShutdown()
void KNAccountManager::loadAccounts()
{
- QString dir(locateLocal("data","knode/"));
+ TQString dir(locateLocal("data","knode/"));
if (dir.isNull()) {
KNHelper::displayInternalFileError();
return;
}
- QDir d(dir);
+ TQDir d(dir);
KNNntpAccount *a;
- QStringList entries(d.entryList("nntp.*", QDir::Dirs));
+ TQStringList entries(d.entryList("nntp.*", TQDir::Dirs));
- QStringList::Iterator it;
+ TQStringList::Iterator it;
for(it = entries.begin(); it != entries.end(); ++it) {
a = new KNNntpAccount();
if (a->readInfo(dir+(*it) + "/info")) {
@@ -99,7 +99,7 @@ KNNntpAccount* KNAccountManager::account( int id )
{
if ( id <= 0 )
return 0;
- QValueList<KNNntpAccount*>::ConstIterator it;
+ TQValueList<KNNntpAccount*>::ConstIterator it;
for ( it = mAccounts.begin(); it != mAccounts.end(); ++it )
if ( (*it)->id() == id )
return *it;
@@ -117,22 +117,22 @@ void KNAccountManager::setCurrentAccount(KNNntpAccount *a)
bool KNAccountManager::newAccount(KNNntpAccount *a)
{
// find a unused id for the new account...
- QString dir(locateLocal("data","knode/"));
+ TQString dir(locateLocal("data","knode/"));
if (dir.isNull()) {
delete a;
KNHelper::displayInternalFileError();
return false;
}
- QDir d(dir);
- QStringList entries(d.entryList("nntp.*", QDir::Dirs));
+ TQDir d(dir);
+ TQStringList entries(d.entryList("nntp.*", TQDir::Dirs));
int id = 1;
- while (entries.findIndex(QString("nntp.%1").arg(id))!=-1)
+ while (entries.findIndex(TQString("nntp.%1").arg(id))!=-1)
++id;
a->setId(id);
- dir = locateLocal("data",QString("knode/nntp.%1/").arg(a->id()));
+ dir = locateLocal("data",TQString("knode/nntp.%1/").arg(a->id()));
if (!dir.isNull()) {
mAccounts.append(a);
emit(accountAdded(a));
@@ -151,22 +151,22 @@ bool KNAccountManager::removeAccount(KNNntpAccount *a)
if(!a) a=c_urrentAccount;
if(!a) return false;
- QValueList<KNGroup*> lst;
+ TQValueList<KNGroup*> lst;
if(knGlobals.folderManager()->unsentForAccount(a->id()) > 0) {
KMessageBox::sorry(knGlobals.topWidget, i18n("This account cannot be deleted since there are some unsent messages for it."));
}
else if(KMessageBox::warningContinueCancel(knGlobals.topWidget, i18n("Do you really want to delete this account?"),"",KGuiItem(i18n("&Delete"),"editdelete"))==KMessageBox::Continue) {
lst = gManager->groupsOfAccount( a );
- for ( QValueList<KNGroup*>::Iterator it = lst.begin(); it != lst.end(); ++it ) {
+ for ( TQValueList<KNGroup*>::Iterator it = lst.begin(); it != lst.end(); ++it ) {
if ( (*it)->isLocked() ) {
KMessageBox::sorry(knGlobals.topWidget, i18n("At least one group of this account is currently in use.\nThe account cannot be deleted at the moment."));
return false;
}
}
- for ( QValueList<KNGroup*>::Iterator it = lst.begin(); it != lst.end(); ++it )
+ for ( TQValueList<KNGroup*>::Iterator it = lst.begin(); it != lst.end(); ++it )
gManager->unsubscribeGroup( (*it) );
- QDir dir(a->path());
+ TQDir dir(a->path());
if (dir.exists()) {
const QFileInfoList *list = dir.entryInfoList(); // get list of matching files and delete all
if (list) {
@@ -177,7 +177,7 @@ bool KNAccountManager::removeAccount(KNNntpAccount *a)
}
}
dir.cdUp(); // directory should now be empty, deleting it
- dir.rmdir(QString("nntp.%1/").arg(a->id()));
+ dir.rmdir(TQString("nntp.%1/").arg(a->id()));
}
if(c_urrentAccount==a) setCurrentAccount(0);
@@ -228,7 +228,7 @@ void KNAccountManager::loadPasswordsAsync()
else
mWallet = Wallet::openWallet( Wallet::NetworkWallet(), 0, Wallet::Asynchronous );
if ( mWallet ) {
- connect( mWallet, SIGNAL(walletOpened(bool)), SLOT(slotWalletOpened(bool)) );
+ connect( mWallet, TQT_SIGNAL(walletOpened(bool)), TQT_SLOT(slotWalletOpened(bool)) );
mAsyncOpening = true;
}
else {
@@ -245,7 +245,7 @@ void KNAccountManager::loadPasswordsAsync()
void KNAccountManager::loadPasswords()
{
s_mtp->readPassword();
- QValueList<KNNntpAccount*>::Iterator it;
+ TQValueList<KNNntpAccount*>::Iterator it;
for ( it = mAccounts.begin(); it != mAccounts.end(); ++it )
(*it)->readPassword();
emit passwordsChanged();
diff --git a/knode/knaccountmanager.h b/knode/knaccountmanager.h
index 5b6cd4ef9..f871e2be8 100644
--- a/knode/knaccountmanager.h
+++ b/knode/knaccountmanager.h
@@ -15,8 +15,8 @@
#ifndef KNACCOUNTMANAGER_H
#define KNACCOUNTMANAGER_H
-#include <qglobal.h>
-#include <qvaluelist.h>
+#include <tqglobal.h>
+#include <tqvaluelist.h>
namespace KWallet {
class Wallet;
@@ -32,7 +32,7 @@ class KNAccountManager : public QObject
Q_OBJECT
public:
- KNAccountManager(KNGroupManager *gm, QObject * parent=0, const char * name=0);
+ KNAccountManager(KNGroupManager *gm, TQObject * parent=0, const char * name=0);
~KNAccountManager();
void prepareShutdown();
@@ -49,8 +49,8 @@ class KNAccountManager : public QObject
KNServerInfo* smtp() const { return s_mtp; }
/** Returns the account with the given id. */
KNNntpAccount* account( int id );
- QValueList<KNNntpAccount*>::Iterator begin() { return mAccounts.begin(); }
- QValueList<KNNntpAccount*>::Iterator end() { return mAccounts.end(); }
+ TQValueList<KNNntpAccount*>::Iterator begin() { return mAccounts.begin(); }
+ TQValueList<KNNntpAccount*>::Iterator end() { return mAccounts.end(); }
/** Returns the first account (used as fallback sometimes). */
KNNntpAccount* first() const;
@@ -83,7 +83,7 @@ class KNAccountManager : public QObject
static void prepareWallet();
private:
- QValueList<KNNntpAccount*> mAccounts;
+ TQValueList<KNNntpAccount*> mAccounts;
static KWallet::Wallet *mWallet;
static bool mWalletOpenFailed;
bool mAsyncOpening;
diff --git a/knode/knapplication.cpp b/knode/knapplication.cpp
index 2bbcf0494..c8b2837f3 100644
--- a/knode/knapplication.cpp
+++ b/knode/knapplication.cpp
@@ -33,7 +33,7 @@ int KNApplication::newInstance()
KConfig *conf=knGlobals.config();
conf->setGroup("GENERAL");
- QString ver=conf->readEntry("Version");
+ TQString ver=conf->readEntry("Version");
if(!ver.isEmpty() && ver!=KNODE_VERSION) { //new version installed
if(KNConvert::needToConvert(ver)) { //we need to convert
diff --git a/knode/knarticle.cpp b/knode/knarticle.cpp
index d43e501ea..fe475b1b3 100644
--- a/knode/knarticle.cpp
+++ b/knode/knarticle.cpp
@@ -85,7 +85,7 @@ KNRemoteArticle::~KNRemoteArticle()
void KNRemoteArticle::parse()
{
KNArticle::parse();
- QCString raw;
+ TQCString raw;
if( !(raw=rawHeader(m_essageID.type())).isEmpty() )
m_essageID.from7BitString(raw);
@@ -168,7 +168,7 @@ void KNRemoteArticle::initListItem()
if(f_rom.hasName())
i_tem->setText(1, f_rom.name());
else
- i_tem->setText(1, QString(f_rom.email()));
+ i_tem->setText(1, TQString(f_rom.email()));
updateListItem();
}
@@ -296,7 +296,7 @@ KNLocalArticle::~KNLocalArticle()
void KNLocalArticle::parse()
{
KNArticle::parse();
- QCString raw;
+ TQCString raw;
if( !(raw=rawHeader(n_ewsgroups.type())).isEmpty() )
n_ewsgroups.from7BitString(raw);
@@ -359,7 +359,7 @@ void KNLocalArticle::updateListItem()
if(!i_tem)
return;
- QString tmp;
+ TQString tmp;
int idx=0;
KNConfig::Appearance *app=knGlobals.configManager()->appearance();
@@ -448,7 +448,7 @@ KNAttachment::~KNAttachment()
}
-void KNAttachment::setMimeType(const QString &s)
+void KNAttachment::setMimeType(const TQString &s)
{
m_imeType=s.latin1();
h_asChanged=true;
@@ -467,9 +467,9 @@ void KNAttachment::setMimeType(const QString &s)
}
-QString KNAttachment::contentSize() const
+TQString KNAttachment::contentSize() const
{
- QString ret;
+ TQString ret;
int s=0;
if(c_ontent && c_ontent->hasContent())
@@ -537,7 +537,7 @@ void KNAttachment::attach(Content *c)
updateContentInfo();
Headers::ContentType *type=c_ontent->contentType();
Headers::CTEncoding *e=c_ontent->contentTransferEncoding();
- QByteArray data(f_ile->size());
+ TQByteArray data(f_ile->size());
int readBytes=f_ile->readBlock(data.data(), f_ile->size());
@@ -552,7 +552,7 @@ void KNAttachment::attach(Content *c)
e->setCte(Headers::CEbase64);
e->setDecoded(false);
} else {
- c_ontent->setBody( QCString(data.data(), data.size()+1) + '\n' );
+ c_ontent->setBody( TQCString(data.data(), data.size()+1) + '\n' );
// c_ontent->b_ody += '\n';
e->setDecoded(true);
}
diff --git a/knode/knarticle.h b/knode/knarticle.h
index 9c2fc8979..798742e17 100644
--- a/knode/knarticle.h
+++ b/knode/knarticle.h
@@ -15,13 +15,13 @@
#ifndef KNARTICLE_H
#define KNARTICLE_H
-#include <qstringlist.h>
-#include <qtextstream.h>
-#include <qfile.h>
-#include <qfont.h>
-#include <qcolor.h>
-#include <qasciidict.h>
-#include <qvaluelist.h>
+#include <tqstringlist.h>
+#include <tqtextstream.h>
+#include <tqfile.h>
+#include <tqfont.h>
+#include <tqcolor.h>
+#include <tqasciidict.h>
+#include <tqvaluelist.h>
#include <kmime_headers.h>
#include <kmime_newsarticle.h>
@@ -36,13 +36,13 @@ class KNArticleCollection;
/** This class encapsulates a generic article. It provides all the
usual headers of a RFC822-message. Further more it contains an
- unique id and can store a pointer to a @ref QListViewItem. It is
+ unique id and can store a pointer to a @ref TQListViewItem. It is
used as a base class for all visible articles. */
class KNArticle : public KMime::NewsArticle, public KNJobItem {
public:
- typedef QValueList<KNArticle*> List;
+ typedef TQValueList<KNArticle*> List;
KNArticle(KNArticleCollection *c);
~KNArticle();
@@ -87,7 +87,7 @@ class KNGroup;
class KNRemoteArticle : public KNArticle {
public:
- typedef QValueList<KNRemoteArticle*> List;
+ typedef TQValueList<KNRemoteArticle*> List;
KNRemoteArticle(KNGroup *g);
~KNRemoteArticle();
@@ -169,8 +169,8 @@ class KNRemoteArticle : public KNArticle {
void setForceDefaultCS(bool b);
- QColor color() const { return c_olor; }
- void setColor(const QColor& c) { c_olor = c; }
+ TQColor color() const { return c_olor; }
+ void setColor(const TQColor& c) { c_olor = c; }
time_t subThreadChangeDate() { return s_ubThreadChangeDate; }
void setSubThreadChangeDate(time_t date) { s_ubThreadChangeDate = date; }
@@ -188,7 +188,7 @@ class KNRemoteArticle : public KNArticle {
KNRemoteArticle *d_ref; // displayed reference-article (may differ from i_dRef)
unsigned char t_hrLevel; // quality of threading
short s_core; // guess what ;-)
- QColor c_olor; // color for the header list
+ TQColor c_olor; // color for the header list
unsigned short u_nreadFups, // number of the article's unread follow-ups
n_ewFups; // number of the article's new follow-ups
time_t s_ubThreadChangeDate; // the last time the sub-thread of this article changed
@@ -207,7 +207,7 @@ class KNRemoteArticle : public KNArticle {
class KNLocalArticle : public KNArticle {
public:
- typedef QValueList<KNLocalArticle*> List;
+ typedef TQValueList<KNLocalArticle*> List;
KNLocalArticle(KNArticleCollection *c=0);
~KNLocalArticle();
@@ -294,27 +294,27 @@ class KNAttachment {
~KNAttachment();
//name (used as a Content-Type parameter and as filename)
- const QString& name() { return n_ame; }
- void setName(const QString &s) { n_ame=s; h_asChanged=true; }
+ const TQString& name() { return n_ame; }
+ void setName(const TQString &s) { n_ame=s; h_asChanged=true; }
//mime type
- const QCString& mimeType() { return m_imeType; }
- void setMimeType(const QString &s);
+ const TQCString& mimeType() { return m_imeType; }
+ void setMimeType(const TQString &s);
//Content-Description
- const QString& description() { return d_escription; }
- void setDescription(const QString &s) { d_escription=s; h_asChanged=true; }
+ const TQString& description() { return d_escription; }
+ void setDescription(const TQString &s) { d_escription=s; h_asChanged=true; }
//Encoding
int cte() { return e_ncoding.cte(); }
void setCte(int e) { e_ncoding.setCte( (KMime::Headers::contentEncoding)(e) );
h_asChanged=true; }
bool isFixedBase64()const { return f_b64; }
- QString encoding() { return e_ncoding.asUnicodeString(); }
+ TQString encoding() { return e_ncoding.asUnicodeString(); }
//content handling
KMime::Content* content()const { return c_ontent; }
- QString contentSize() const;
+ TQString contentSize() const;
bool isAttached() const { return i_sAttached; }
bool hasChanged() const { return h_asChanged; }
void updateContentInfo();
@@ -324,9 +324,9 @@ class KNAttachment {
protected:
KMime::Content *c_ontent;
KNLoadHelper *l_oadHelper;
- QFile *f_ile;
- QCString m_imeType;
- QString n_ame,
+ TQFile *f_ile;
+ TQCString m_imeType;
+ TQString n_ame,
d_escription;
KMime::Headers::CTEncoding e_ncoding;
bool i_sAttached,
diff --git a/knode/knarticlecollection.cpp b/knode/knarticlecollection.cpp
index bd8def75b..cbb4779b3 100644
--- a/knode/knarticlecollection.cpp
+++ b/knode/knarticlecollection.cpp
@@ -198,7 +198,7 @@ int KNArticleVector::compareById(const void *p1, const void *p2)
int KNArticleVector::compareByMsgId(const void *p1, const void *p2)
{
KNArticle *a1, *a2;
- QCString mid1, mid2;
+ TQCString mid1, mid2;
a1=*(KNArticle**)(p1);
a2=*(KNArticle**)(p2);
@@ -221,7 +221,7 @@ KNArticle* KNArticleVector::bsearch(int id)
}
-KNArticle* KNArticleVector::bsearch(const QCString &id)
+KNArticle* KNArticleVector::bsearch(const TQCString &id)
{
int idx=indexForMsgId(id);
@@ -261,12 +261,12 @@ int KNArticleVector::indexForId(int id)
}
-int KNArticleVector::indexForMsgId(const QCString &id)
+int KNArticleVector::indexForMsgId(const TQCString &id)
{
if(s_ortType!=STmsgId) return -1;
int start=0, end=l_en, mid=0;
- QCString currentMid=0;
+ TQCString currentMid=0;
bool found=false;
KNArticle *current=0;
int cnt=0;
@@ -368,7 +368,7 @@ KNArticle* KNArticleCollection::byId(int id)
}
-KNArticle* KNArticleCollection::byMessageId(const QCString &mid)
+KNArticle* KNArticleCollection::byMessageId(const TQCString &mid)
{
if(m_idIndex.isEmpty()) {
m_idIndex.syncWithMaster();
diff --git a/knode/knarticlecollection.h b/knode/knarticlecollection.h
index 3a92f2182..507ff266b 100644
--- a/knode/knarticlecollection.h
+++ b/knode/knarticlecollection.h
@@ -57,10 +57,10 @@ class KNArticleVector {
// article access
KNArticle* at(int i) { return ( (i>=0 && i<l_en) ? l_ist[i] : 0 ); }
KNArticle* bsearch(int id);
- KNArticle* bsearch(const QCString &id);
+ KNArticle* bsearch(const TQCString &id);
int indexForId(int id);
- int indexForMsgId(const QCString &id);
+ int indexForMsgId(const TQCString &id);
protected:
KNArticleVector *m_aster;
@@ -102,7 +102,7 @@ class KNArticleCollection : public KNCollection {
// article access
KNArticle* at(int i) { return a_rticles.at(i); }
KNArticle* byId(int id);
- KNArticle* byMessageId(const QCString &mid);
+ KNArticle* byMessageId(const TQCString &mid);
// search index
void syncSearchIndex();
diff --git a/knode/knarticlefactory.cpp b/knode/knarticlefactory.cpp
index 3c072887b..410c2bf40 100644
--- a/knode/knarticlefactory.cpp
+++ b/knode/knarticlefactory.cpp
@@ -12,9 +12,9 @@
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, US
*/
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qvbox.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqvbox.h>
#include <klocale.h>
#include <kmessagebox.h>
@@ -35,15 +35,15 @@
#include "resource.h"
-KNArticleFactory::KNArticleFactory(QObject *p, const char *n)
- : QObject(p, n), s_endErrDlg(0)
+KNArticleFactory::KNArticleFactory(TQObject *p, const char *n)
+ : TQObject(p, n), s_endErrDlg(0)
{
}
KNArticleFactory::~KNArticleFactory()
{
- for ( QValueList<KNComposer*>::Iterator it = mCompList.begin(); it != mCompList.end(); ++it )
+ for ( TQValueList<KNComposer*>::Iterator it = mCompList.begin(); it != mCompList.end(); ++it )
delete (*it);
delete s_endErrDlg;
}
@@ -54,7 +54,7 @@ void KNArticleFactory::createPosting(KNNntpAccount *a)
if(!a)
return;
- QString sig;
+ TQString sig;
KNLocalArticle *art=newArticle(a, sig, knGlobals.configManager()->postNewsTechnical()->charset());
if(!art)
return;
@@ -63,9 +63,9 @@ void KNArticleFactory::createPosting(KNNntpAccount *a)
art->setDoPost(true);
art->setDoMail(false);
- KNComposer *c = new KNComposer( art, QString::null, sig, QString::null, true );
+ KNComposer *c = new KNComposer( art, TQString::null, sig, TQString::null, true );
mCompList.append( c );
- connect(c, SIGNAL(composerDone(KNComposer*)), this, SLOT(slotComposerDone(KNComposer*)));
+ connect(c, TQT_SIGNAL(composerDone(KNComposer*)), this, TQT_SLOT(slotComposerDone(KNComposer*)));
c->show();
}
@@ -75,13 +75,13 @@ void KNArticleFactory::createPosting(KNGroup *g)
if(!g)
return;
- QCString chset;
+ TQCString chset;
if (g->useCharset())
chset = g->defaultCharset();
else
chset = knGlobals.configManager()->postNewsTechnical()->charset();
- QString sig;
+ TQString sig;
KNLocalArticle *art=newArticle(g, sig, chset);
if(!art)
@@ -92,21 +92,21 @@ void KNArticleFactory::createPosting(KNGroup *g)
art->setDoMail(false);
art->newsgroups()->fromUnicodeString(g->groupname(), art->defaultCharset());
- KNComposer *c=new KNComposer(art, QString::null, sig, QString::null, true);
+ KNComposer *c=new KNComposer(art, TQString::null, sig, TQString::null, true);
mCompList.append( c );
- connect(c, SIGNAL(composerDone(KNComposer*)), this, SLOT(slotComposerDone(KNComposer*)));
+ connect(c, TQT_SIGNAL(composerDone(KNComposer*)), this, TQT_SLOT(slotComposerDone(KNComposer*)));
c->show();
}
-void KNArticleFactory::createReply(KNRemoteArticle *a, QString selectedText, bool post, bool mail)
+void KNArticleFactory::createReply(KNRemoteArticle *a, TQString selectedText, bool post, bool mail)
{
if(!a)
return;
KNGroup *g=static_cast<KNGroup*>(a->collection());
- QCString chset;
+ TQCString chset;
if (knGlobals.configManager()->postNewsTechnical()->useOwnCharset()) {
if (g->useCharset())
chset = g->defaultCharset();
@@ -116,7 +116,7 @@ void KNArticleFactory::createReply(KNRemoteArticle *a, QString selectedText, boo
chset = knGlobals.configManager()->postNewsTechnical()->findComposerCharset(a->contentType()->charset());
//create new article
- QString sig;
+ TQString sig;
KNLocalArticle *art=newArticle(g, sig, chset, true, a);
if(!art)
return;
@@ -128,7 +128,7 @@ void KNArticleFactory::createReply(KNRemoteArticle *a, QString selectedText, boo
//------------------------- <Headers> ----------------------------
//subject
- QString subject=a->subject()->asUnicodeString();
+ TQString subject=a->subject()->asUnicodeString();
if(subject.left(3).upper()!="RE:")
subject.prepend("Re: ");
art->subject()->fromUnicodeString(subject, a->subject()->rfc2047Charset());
@@ -140,7 +140,7 @@ void KNArticleFactory::createReply(KNRemoteArticle *a, QString selectedText, boo
if( post && // user wanted to reply by public posting?
// ask the user if she wants to ignore this F'up-To: poster
( KMessageBox::Yes != KMessageBox::questionYesNo(knGlobals.topWidget,
- i18n("The author has requested a reply by email instead\nof a followup to the newsgroup. (Followup-To: poster)\nDo you want to reply in public anyway?"), QString::null, i18n("Reply Public"), i18n("Reply by Email")) ))
+ i18n("The author has requested a reply by email instead\nof a followup to the newsgroup. (Followup-To: poster)\nDo you want to reply in public anyway?"), TQString::null, i18n("Reply Public"), i18n("Reply by Email")) ))
{
art->setDoPost(false);
art->setDoMail(true);
@@ -173,7 +173,7 @@ void KNArticleFactory::createReply(KNRemoteArticle *a, QString selectedText, boo
//References
KMime::Headers::References *references=a->references(false);
- QCString refs;
+ TQCString refs;
if (references)
refs=references->as7BitString(false);
else
@@ -192,7 +192,7 @@ void KNArticleFactory::createReply(KNRemoteArticle *a, QString selectedText, boo
authorWantsMailCopies = mailCopiesTo->alwaysCopy();
if (authorWantsMailCopies) // warn the user
KMessageBox::information(knGlobals.topWidget,i18n("The author requested a mail copy of your reply. (Mail-Copies-To header)"),
- QString::null,"mailCopiesToWarning");
+ TQString::null,"mailCopiesToWarning");
if (authorWantsMailCopies && mailCopiesTo->hasEmail()) {
address.setName(mailCopiesTo->name());
address.setEmail(mailCopiesTo->email());
@@ -206,22 +206,22 @@ void KNArticleFactory::createReply(KNRemoteArticle *a, QString selectedText, boo
//--------------------------- <Body> -----------------------------
// attribution line
- QString attribution=knGlobals.configManager()->postNewsComposer()->intro();
- QString name(a->from()->name());
+ TQString attribution=knGlobals.configManager()->postNewsComposer()->intro();
+ TQString name(a->from()->name());
if (name.isEmpty())
- name = QString::fromLatin1(a->from()->email());
- attribution.replace(QRegExp("%NAME"),name);
- attribution.replace(QRegExp("%EMAIL"),QString::fromLatin1(a->from()->email()));
- attribution.replace(QRegExp("%DATE"),KGlobal::locale()->formatDateTime(a->date()->qdt(),false));
- attribution.replace(QRegExp("%MSID"),a->messageID()->asUnicodeString());
- attribution.replace(QRegExp("%GROUP"),g->groupname());
- attribution.replace(QRegExp("%L"),"\n");
+ name = TQString::fromLatin1(a->from()->email());
+ attribution.replace(TQRegExp("%NAME"),name);
+ attribution.replace(TQRegExp("%EMAIL"),TQString::fromLatin1(a->from()->email()));
+ attribution.replace(TQRegExp("%DATE"),KGlobal::locale()->formatDateTime(a->date()->qdt(),false));
+ attribution.replace(TQRegExp("%MSID"),a->messageID()->asUnicodeString());
+ attribution.replace(TQRegExp("%GROUP"),g->groupname());
+ attribution.replace(TQRegExp("%L"),"\n");
attribution+="\n\n";
- QString quoted=attribution;
- QString notRewraped=QString::null;
- QStringList text;
- QStringList::Iterator line;
+ TQString quoted=attribution;
+ TQString notRewraped=TQString::null;
+ TQStringList text;
+ TQStringList::Iterator line;
bool incSig=knGlobals.configManager()->postNewsComposer()->includeSignature();
if (selectedText.isEmpty()) {
@@ -230,7 +230,7 @@ void KNArticleFactory::createReply(KNRemoteArticle *a, QString selectedText, boo
tc->decodedText(text, true, knGlobals.configManager()->readNewsViewer()->removeTrailingNewlines());
}
else
- text = QStringList::split('\n',selectedText,true);
+ text = TQStringList::split('\n',selectedText,true);
for(line=text.begin(); line!=text.end(); ++line) {
if(!incSig && (*line)=="-- ")
@@ -264,7 +264,7 @@ void KNArticleFactory::createReply(KNRemoteArticle *a, QString selectedText, boo
//open composer
KNComposer *c=new KNComposer(art, quoted, sig, notRewraped, true, authorDislikesMailCopies, authorWantsMailCopies);
mCompList.append( c );
- connect(c, SIGNAL(composerDone(KNComposer*)), this, SLOT(slotComposerDone(KNComposer*)));
+ connect(c, TQT_SIGNAL(composerDone(KNComposer*)), this, TQT_SLOT(slotComposerDone(KNComposer*)));
c->show();
}
@@ -275,11 +275,11 @@ void KNArticleFactory::createForward(KNArticle *a)
return;
KMime::Headers::ContentType *ct=a->contentType();
- QCString chset;
+ TQCString chset;
bool incAtt = ( !knGlobals.configManager()->postNewsTechnical()->useExternalMailer() &&
ct->isMultipart() && ct->isSubtype("mixed") &&
KMessageBox::Yes == KMessageBox::questionYesNo(knGlobals.topWidget,
- i18n("This article contains attachments. Do you want them to be forwarded as well?"), QString::null, i18n("Forward"), i18n("Do Not Forward"))
+ i18n("This article contains attachments. Do you want them to be forwarded as well?"), TQString::null, i18n("Forward"), i18n("Do Not Forward"))
);
if (knGlobals.configManager()->postNewsTechnical()->useOwnCharset())
@@ -288,7 +288,7 @@ void KNArticleFactory::createForward(KNArticle *a)
chset = knGlobals.configManager()->postNewsTechnical()->findComposerCharset(a->contentType()->charset());
//create new article
- QString sig;
+ TQString sig;
KNLocalArticle *art=newArticle(knGlobals.groupManager()->currentGroup(), sig, chset);
if(!art)
return;
@@ -299,14 +299,14 @@ void KNArticleFactory::createForward(KNArticle *a)
//------------------------- <Headers> ----------------------------
//subject
- QString subject=("Fwd: "+a->subject()->asUnicodeString());
+ TQString subject=("Fwd: "+a->subject()->asUnicodeString());
art->subject()->fromUnicodeString(subject, a->subject()->rfc2047Charset());
//------------------------- </Headers> ---------------------------
//--------------------------- <Body> -----------------------------
- QString fwd = QString("\n--------------- %1\n\n").arg(i18n("Forwarded message (begin)"));
+ TQString fwd = TQString("\n--------------- %1\n\n").arg(i18n("Forwarded message (begin)"));
fwd+=( i18n("Subject") + ": " + a->subject()->asUnicodeString() + "\n" );
fwd+=( i18n("From") + ": " + a->from()->asUnicodeString() + "\n" );
@@ -315,13 +315,13 @@ void KNArticleFactory::createForward(KNArticle *a)
KMime::Content *text=a->textContent();
if(text) {
- QStringList decodedLines;
+ TQStringList decodedLines;
text->decodedText( decodedLines, false, false );
- for(QStringList::Iterator it=decodedLines.begin(); it!=decodedLines.end(); ++it)
+ for(TQStringList::Iterator it=decodedLines.begin(); it!=decodedLines.end(); ++it)
fwd += (*it) + "\n";
}
- fwd += QString("\n--------------- %1\n").arg(i18n("Forwarded message (end)"));
+ fwd += TQString("\n--------------- %1\n").arg(i18n("Forwarded message (end)"));
//--------------------------- </Body> ----------------------------
@@ -341,15 +341,15 @@ void KNArticleFactory::createForward(KNArticle *a)
if (knGlobals.configManager()->postNewsTechnical()->useExternalMailer()) {
- sendMailExternal(QString::null, subject, fwd);
+ sendMailExternal(TQString::null, subject, fwd);
delete art;
return;
}
//open composer
- KNComposer *c=new KNComposer(art, fwd, sig, QString::null, true);
+ KNComposer *c=new KNComposer(art, fwd, sig, TQString::null, true);
mCompList.append( c );
- connect(c, SIGNAL(composerDone(KNComposer*)), this, SLOT(slotComposerDone(KNComposer*)));
+ connect(c, TQT_SIGNAL(composerDone(KNComposer*)), this, TQT_SLOT(slotComposerDone(KNComposer*)));
c->show();
}
@@ -360,7 +360,7 @@ void KNArticleFactory::createCancel(KNArticle *a)
return;
if(KMessageBox::No==KMessageBox::questionYesNo(knGlobals.topWidget,
- i18n("Do you really want to cancel this article?"), QString::null, i18n("Cancel Article"), KStdGuiItem::cancel()))
+ i18n("Do you really want to cancel this article?"), TQString::null, i18n("Cancel Article"), KStdGuiItem::cancel()))
return;
bool sendNow;
@@ -390,7 +390,7 @@ void KNArticleFactory::createCancel(KNArticle *a)
grp=knGlobals.groupManager()->group(a->newsgroups()->firstGroup(), nntp);
- QString sig;
+ TQString sig;
KNLocalArticle *art=newArticle(grp, sig, "us-ascii", false);
if(!art)
return;
@@ -404,7 +404,7 @@ void KNArticleFactory::createCancel(KNArticle *a)
//subject
KMime::Headers::MessageID *msgId=a->messageID();
- QCString tmp;
+ TQCString tmp;
tmp="cancel of "+msgId->as7BitString(false);
art->subject()->from7BitString(tmp);
@@ -419,7 +419,7 @@ void KNArticleFactory::createCancel(KNArticle *a)
art->lines()->setNumberOfLines(1);
//body
- art->fromUnicodeString(QString::fromLatin1("cancel by original author\n"));
+ art->fromUnicodeString(TQString::fromLatin1("cancel by original author\n"));
//assemble
art->assemble();
@@ -440,7 +440,7 @@ void KNArticleFactory::createSupersede(KNArticle *a)
return;
if(KMessageBox::No==KMessageBox::questionYesNo(knGlobals.topWidget,
- i18n("Do you really want to supersede this article?"), QString::null, i18n("Supersede"), KStdGuiItem::cancel()))
+ i18n("Do you really want to supersede this article?"), TQString::null, i18n("Supersede"), KStdGuiItem::cancel()))
return;
KNGroup *grp;
@@ -464,7 +464,7 @@ void KNArticleFactory::createSupersede(KNArticle *a)
grp=knGlobals.groupManager()->group(a->newsgroups()->firstGroup(), nntp);
//new article
- QString sig;
+ TQString sig;
KNLocalArticle *art=newArticle(grp, sig, knGlobals.configManager()->postNewsTechnical()->findComposerCharset(a->contentType()->charset()));
if(!art)
return;
@@ -492,7 +492,7 @@ void KNArticleFactory::createSupersede(KNArticle *a)
art->supersedes()->from7BitString(a->messageID()->as7BitString(false));
//Body
- QString text;
+ TQString text;
KMime::Content *textContent=a->textContent();
if(textContent)
textContent->decodedText(text);
@@ -500,7 +500,7 @@ void KNArticleFactory::createSupersede(KNArticle *a)
//open composer
KNComposer *c=new KNComposer(art, text, sig);
mCompList.append( c );
- connect(c, SIGNAL(composerDone(KNComposer*)), this, SLOT(slotComposerDone(KNComposer*)));
+ connect(c, TQT_SIGNAL(composerDone(KNComposer*)), this, TQT_SLOT(slotComposerDone(KNComposer*)));
c->show();
}
@@ -513,7 +513,7 @@ void KNArticleFactory::createMail(KMime::Headers::AddressField *address)
}
//create new article
- QString sig;
+ TQString sig;
KNLocalArticle *art=newArticle(knGlobals.groupManager()->currentGroup(), sig, knGlobals.configManager()->postNewsTechnical()->charset());
if(!art)
return;
@@ -523,18 +523,18 @@ void KNArticleFactory::createMail(KMime::Headers::AddressField *address)
art->to()->addAddress((*address));
//open composer
- KNComposer *c=new KNComposer(art, QString::null, sig, QString::null, true);
+ KNComposer *c=new KNComposer(art, TQString::null, sig, TQString::null, true);
mCompList.append( c );
- connect(c, SIGNAL(composerDone(KNComposer*)), this, SLOT(slotComposerDone(KNComposer*)));
+ connect(c, TQT_SIGNAL(composerDone(KNComposer*)), this, TQT_SLOT(slotComposerDone(KNComposer*)));
c->show();
}
-void KNArticleFactory::sendMailExternal(const QString &address, const QString &subject, const QString &body)
+void KNArticleFactory::sendMailExternal(const TQString &address, const TQString &subject, const TQString &body)
{
KURL mailtoURL;
- QStringList queries;
- QString query=QString::null;
+ TQStringList queries;
+ TQString query=TQString::null;
mailtoURL.setProtocol("mailto");
if (!address.isEmpty())
@@ -546,7 +546,7 @@ void KNArticleFactory::sendMailExternal(const QString &address, const QString &s
if (queries.count() > 0) {
query = "?";
- for ( QStringList::Iterator it = queries.begin(); it != queries.end(); ++it ) {
+ for ( TQStringList::Iterator it = queries.begin(); it != queries.end(); ++it ) {
if (it != queries.begin())
query.append("&");
query.append((*it));
@@ -596,7 +596,7 @@ void KNArticleFactory::edit(KNLocalArticle *a)
knGlobals.articleManager()->loadArticle(a);
//open composer
- com=new KNComposer(a, QString::null, id->getSignature());
+ com=new KNComposer(a, TQString::null, id->getSignature());
if(id->useSigGenerator() && !id->getSigGeneratorStdErr().isEmpty())
KMessageBox::information(knGlobals.topWidget,
i18n("<qt>The signature generator program produced the "
@@ -604,7 +604,7 @@ void KNArticleFactory::edit(KNLocalArticle *a)
.arg(id->getSigGeneratorStdErr()));
mCompList.append( com );
- connect(com, SIGNAL(composerDone(KNComposer*)), this, SLOT(slotComposerDone(KNComposer*)));
+ connect(com, TQT_SIGNAL(composerDone(KNComposer*)), this, TQT_SLOT(slotComposerDone(KNComposer*)));
com->show();
}
@@ -682,7 +682,7 @@ void KNArticleFactory::sendOutbox()
bool KNArticleFactory::closeComposeWindows()
{
while ( !mCompList.isEmpty() ) {
- QValueList<KNComposer*>::Iterator it = mCompList.begin();
+ TQValueList<KNComposer*>::Iterator it = mCompList.begin();
if ( !(*it)->close() )
return false;
}
@@ -703,7 +703,7 @@ void KNArticleFactory::deleteComposerForArticle(KNLocalArticle *a)
KNComposer* KNArticleFactory::findComposer(KNLocalArticle *a)
{
- for ( QValueList<KNComposer*>::Iterator it = mCompList.begin(); it != mCompList.end(); ++it )
+ for ( TQValueList<KNComposer*>::Iterator it = mCompList.begin(); it != mCompList.end(); ++it )
if ( (*it)->article() == a )
return (*it);
return 0;
@@ -712,7 +712,7 @@ KNComposer* KNArticleFactory::findComposer(KNLocalArticle *a)
void KNArticleFactory::configChanged()
{
- for ( QValueList<KNComposer*>::Iterator it = mCompList.begin(); it != mCompList.end(); ++it )
+ for ( TQValueList<KNComposer*>::Iterator it = mCompList.begin(); it != mCompList.end(); ++it )
(*it)->setConfig( false );
}
@@ -774,7 +774,7 @@ void KNArticleFactory::processJob(KNJobData *j)
}
-KNLocalArticle* KNArticleFactory::newArticle(KNCollection *col, QString &sig, QCString defChset, bool withXHeaders, KNArticle *origPost)
+KNLocalArticle* KNArticleFactory::newArticle(KNCollection *col, TQString &sig, TQCString defChset, bool withXHeaders, KNArticle *origPost)
{
KNConfig::PostNewsTechnical *pnt=knGlobals.configManager()->postNewsTechnical();
@@ -871,19 +871,19 @@ KNLocalArticle* KNArticleFactory::newArticle(KNCollection *col, QString &sig, QC
if(withXHeaders) {
KNConfig::XHeaders::Iterator it;
for(it=pnt->xHeaders().begin(); it!=pnt->xHeaders().end(); ++it) {
- QString value = (*it).value();
+ TQString value = (*it).value();
if(origPost) {
- QString name(origPost->from()->name());
+ TQString name(origPost->from()->name());
if (name.isEmpty())
- name = QString::fromLatin1(origPost->from()->email());
- value.replace(QRegExp("%NAME"), name);
- value.replace(QRegExp("%EMAIL"), QString::fromLatin1(origPost->from()->email()));
+ name = TQString::fromLatin1(origPost->from()->email());
+ value.replace(TQRegExp("%NAME"), name);
+ value.replace(TQRegExp("%EMAIL"), TQString::fromLatin1(origPost->from()->email()));
}
else
if(value.find("%NAME") != -1 || value.find("%EMAIL") != -1)
continue;
- art->setHeader( new KMime::Headers::Generic( (QCString("X-")+(*it).name()), art, value, pnt->charset() ) );
+ art->setHeader( new KMime::Headers::Generic( (TQCString("X-")+(*it).name()), art, value, pnt->charset() ) );
}
}
@@ -898,7 +898,7 @@ KNLocalArticle* KNArticleFactory::newArticle(KNCollection *col, QString &sig, QC
.arg(id->getSigGeneratorStdErr()));
}
else
- sig=QString::null;
+ sig=TQString::null;
return art;
}
@@ -990,7 +990,7 @@ void KNArticleFactory::showSendErrorDialog()
{
if(!s_endErrDlg) {
s_endErrDlg=new KNSendErrorDialog();
- connect(s_endErrDlg, SIGNAL(closeClicked()), this, SLOT(slotSendErrorDialogDone()));
+ connect(s_endErrDlg, TQT_SIGNAL(closeClicked()), this, TQT_SLOT(slotSendErrorDialogDone()));
}
s_endErrDlg->show();
}
@@ -1068,16 +1068,16 @@ KNSendErrorDialog::KNSendErrorDialog()
{
p_ixmap=knGlobals.configManager()->appearance()->icon(KNConfig::Appearance::sendErr);
- QVBox *page = makeVBoxMainWidget();
+ TQVBox *page = makeVBoxMainWidget();
- new QLabel(QString("<b>%1</b><br>%2").arg(i18n("Errors occurred while sending these articles:"))
+ new TQLabel(TQString("<b>%1</b><br>%2").arg(i18n("Errors occurred while sending these articles:"))
.arg(i18n("The unsent articles are stored in the \"Outbox\" folder.")), page);
j_obs=new KNDialogListBox(true, page);
- e_rror=new QLabel(QString::null, page);
+ e_rror=new TQLabel(TQString::null, page);
- connect(j_obs, SIGNAL(highlighted(int)), this, SLOT(slotHighlighted(int)));
+ connect(j_obs, TQT_SIGNAL(highlighted(int)), this, TQT_SLOT(slotHighlighted(int)));
- KNHelper::restoreWindowSize("sendDlg", this, QSize(320,250));
+ KNHelper::restoreWindowSize("sendDlg", this, TQSize(320,250));
}
@@ -1087,7 +1087,7 @@ KNSendErrorDialog::~KNSendErrorDialog()
}
-void KNSendErrorDialog::append(const QString &subject, const QString &error)
+void KNSendErrorDialog::append(const TQString &subject, const TQString &error)
{
LBoxItem *it=new LBoxItem(error, subject, &p_ixmap);
@@ -1100,7 +1100,7 @@ void KNSendErrorDialog::slotHighlighted(int idx)
{
LBoxItem *it=static_cast<LBoxItem*>(j_obs->item(idx));
if(it) {
- QString tmp=i18n("<b>Error message:</b><br>")+it->error;
+ TQString tmp=i18n("<b>Error message:</b><br>")+it->error;
e_rror->setText(tmp);
}
}
diff --git a/knode/knarticlefactory.h b/knode/knarticlefactory.h
index 6b18b6e5b..995fcdc0d 100644
--- a/knode/knarticlefactory.h
+++ b/knode/knarticlefactory.h
@@ -15,7 +15,7 @@
#ifndef KNARTICLEFACTORY_H
#define KNARTICLEFACTORY_H
-#include <qvaluelist.h>
+#include <tqvaluelist.h>
#include <kdialogbase.h>
#include "knjobdata.h"
@@ -36,27 +36,27 @@ namespace KNConfig {
}
-class KNArticleFactory : public QObject , public KNJobConsumer {
+class KNArticleFactory : public TQObject , public KNJobConsumer {
Q_OBJECT
public:
enum replyType { RTgroup, RTmail, RTboth };
- KNArticleFactory(QObject *p=0, const char *n=0);
+ KNArticleFactory(TQObject *p=0, const char *n=0);
~KNArticleFactory();
//factory methods
void createPosting(KNNntpAccount *a);
void createPosting(KNGroup *g);
- void createReply(KNRemoteArticle *a, QString selectedText=QString::null, bool post=true, bool mail=false);
+ void createReply(KNRemoteArticle *a, TQString selectedText=TQString::null, bool post=true, bool mail=false);
void createForward(KNArticle *a);
void createCancel(KNArticle *a);
void createSupersede(KNArticle *a);
void createMail(KMime::Headers::AddressField *address);
// send a mail via an external program...
- void sendMailExternal(const QString &address=QString::null, const QString &subject=QString::null, const QString &body=QString::null);
+ void sendMailExternal(const TQString &address=TQString::null, const TQString &subject=TQString::null, const TQString &body=TQString::null);
//article handling
void edit(KNLocalArticle *a);
@@ -75,7 +75,7 @@ class KNArticleFactory : public QObject , public KNJobConsumer {
//article generation
// col: group or account
- KNLocalArticle* newArticle(KNCollection *col, QString &sig, QCString defChset, bool withXHeaders=true, KNArticle *origPost=0);
+ KNLocalArticle* newArticle(KNCollection *col, TQString &sig, TQCString defChset, bool withXHeaders=true, KNArticle *origPost=0);
//cancel & supersede
bool cancelAllowed(KNArticle *a);
@@ -83,7 +83,7 @@ class KNArticleFactory : public QObject , public KNJobConsumer {
//send-errors
void showSendErrorDialog();
- QValueList<KNComposer*> mCompList;
+ TQValueList<KNComposer*> mCompList;
KNSendErrorDialog *s_endErrDlg;
protected slots:
@@ -101,21 +101,21 @@ class KNSendErrorDialog : public KDialogBase {
KNSendErrorDialog();
~KNSendErrorDialog();
- void append(const QString &subject, const QString &error);
+ void append(const TQString &subject, const TQString &error);
protected:
class LBoxItem : public KNListBoxItem {
public:
- LBoxItem(const QString &e, const QString &t, QPixmap *p=0)
+ LBoxItem(const TQString &e, const TQString &t, TQPixmap *p=0)
: KNListBoxItem(t, p) , error(e) {}
~LBoxItem() {}
- QString error;
+ TQString error;
};
KNDialogListBox *j_obs;
- QLabel *e_rror;
- QPixmap p_ixmap;
+ TQLabel *e_rror;
+ TQPixmap p_ixmap;
protected slots:
void slotHighlighted(int idx);
diff --git a/knode/knarticlefilter.cpp b/knode/knarticlefilter.cpp
index b5a49d55b..60d0e0320 100644
--- a/knode/knarticlefilter.cpp
+++ b/knode/knarticlefilter.cpp
@@ -74,7 +74,7 @@ KNArticleFilter::~KNArticleFilter()
bool KNArticleFilter::loadInfo()
{
if (i_d!=-1) {
- QString fname(locate("data",QString( "knode/filters/%1.fltr" ).arg(i_d) ) );
+ TQString fname(locate("data",TQString( "knode/filters/%1.fltr" ).arg(i_d) ) );
if (fname.isNull())
return false;
@@ -94,7 +94,7 @@ bool KNArticleFilter::loadInfo()
void KNArticleFilter::load()
{
- QString fname(locate("data",QString( "knode/filters/%1.fltr").arg(i_d) ) );
+ TQString fname(locate("data",TQString( "knode/filters/%1.fltr").arg(i_d) ) );
if (fname.isNull())
return;
@@ -136,15 +136,15 @@ void KNArticleFilter::save()
{
if (i_d==-1)
return;
- QString dir(locateLocal("data","knode/")+"filters/");
+ TQString dir(locateLocal("data","knode/")+"filters/");
if (dir.isNull()) {
KNHelper::displayInternalFileError();
return;
}
- KSimpleConfig conf(dir+QString("%1.fltr").arg(i_d));
+ KSimpleConfig conf(dir+TQString("%1.fltr").arg(i_d));
conf.setGroup("GENERAL");
- conf.writeEntry("name", QString(n_ame));
+ conf.writeEntry("name", TQString(n_ame));
conf.writeEntry("Translate_Name",translateName);
conf.writeEntry("enabled", e_nabled);
conf.writeEntry("applyOn", (int) apon);
@@ -253,7 +253,7 @@ void KNArticleFilter::doFilter(KNGroup *g)
if( orphant_threads.count() > 0 ) {
// try to merge orphant threads by subject
KNRemoteArticle::List same_subjects;
- QString s;
+ TQString s;
for ( KNRemoteArticle::List::Iterator it = orphant_threads.begin(); it != orphant_threads.end(); ++it ) {
if ( (*it)->displayedReference() ) // already processed
continue;
@@ -301,7 +301,7 @@ void KNArticleFilter::doFilter(KNFolder *f)
// *tries* to translate the name
-QString KNArticleFilter::translatedName()
+TQString KNArticleFilter::translatedName()
{
if (translateName) {
// major hack alert !!!
@@ -311,7 +311,7 @@ QString KNArticleFilter::translatedName()
else
return n_ame;
} else
- return QString::null;
+ return TQString::null;
} else
return n_ame;
}
@@ -319,12 +319,12 @@ QString KNArticleFilter::translatedName()
// *tries* to retranslate the name to english
-void KNArticleFilter::setTranslatedName(const QString &s)
+void KNArticleFilter::setTranslatedName(const TQString &s)
{
bool retranslated = false;
for (const char **c=defFil;(*c)!=0;c++) // ok, try if it matches any of the standard filter names
if (s==i18n("default filter name",*c)) {
- n_ame = QString::fromLatin1(*c);
+ n_ame = TQString::fromLatin1(*c);
retranslated = true;
break;
}
@@ -348,7 +348,7 @@ bool KNArticleFilter::applyFilter(KNRemoteArticle *a)
if(result) result=age.doFilter(a->date()->ageInDays());
if(result) result=subject.doFilter(a->subject()->asUnicodeString());
if(result) {
- QString tmp = (a->from()->name()+"##") + QString(a->from()->email().data());
+ TQString tmp = (a->from()->name()+"##") + TQString(a->from()->email().data());
result=from.doFilter(tmp);
}
if(result) result=messageId.doFilter(a->messageID()->asUnicodeString());
@@ -370,7 +370,7 @@ bool KNArticleFilter::applyFilter(KNLocalArticle *a)
if(result) result=age.doFilter(a->date()->ageInDays());
if(result) result=subject.doFilter(a->subject()->asUnicodeString());
if(result) {
- QString tmp = (a->from()->name()+"##") + QString(a->from()->email().data());
+ TQString tmp = (a->from()->name()+"##") + TQString(a->from()->email().data());
result=from.doFilter(tmp);
}
if(result) result=messageId.doFilter(a->messageID()->asUnicodeString());
diff --git a/knode/knarticlefilter.h b/knode/knarticlefilter.h
index 6d544342d..b01cdf6a3 100644
--- a/knode/knarticlefilter.h
+++ b/knode/knarticlefilter.h
@@ -47,8 +47,8 @@ class KNArticleFilter {
int count()const { return c_ount; }
int id()const { return i_d; }
int applyOn() { return static_cast<int>(apon); }
- const QString& name() { return n_ame; }
- QString translatedName(); // *tries* to translate the name
+ const TQString& name() { return n_ame; }
+ TQString translatedName(); // *tries* to translate the name
bool isEnabled()const { return e_nabled; }
bool loaded()const { return l_oaded; }
bool isSearchFilter()const { return s_earchFilter; }
@@ -56,8 +56,8 @@ class KNArticleFilter {
void setId(int i) { i_d=i; }
void setApplyOn(int i) { apon=(ApOn)i; }
void setLoaded(bool l) { l_oaded=l; }
- void setName(const QString &s) { n_ame=s; }
- void setTranslatedName(const QString &s); // *tries* to retranslate the name to english
+ void setName(const TQString &s) { n_ame=s; }
+ void setTranslatedName(const TQString &s); // *tries* to retranslate the name to english
void setEnabled(bool l) { e_nabled=l; }
void setSearchFilter(bool b) { s_earchFilter = b; }
@@ -67,7 +67,7 @@ class KNArticleFilter {
bool applyFilter(KNRemoteArticle *a);
bool applyFilter(KNLocalArticle *a);
- QString n_ame;
+ TQString n_ame;
int i_d, c_ount;
bool l_oaded, e_nabled, translateName, s_earchFilter;
ApOn apon;
diff --git a/knode/knarticlemanager.cpp b/knode/knarticlemanager.cpp
index 4f1786e8c..86bcd8df9 100644
--- a/knode/knarticlemanager.cpp
+++ b/knode/knarticlemanager.cpp
@@ -44,7 +44,7 @@
using namespace KNode;
-KNArticleManager::KNArticleManager() : QObject(0,0)
+KNArticleManager::KNArticleManager() : TQObject(0,0)
{
g_roup=0;
f_older=0;
@@ -53,8 +53,8 @@ KNArticleManager::KNArticleManager() : QObject(0,0)
s_earchDlg=0;
d_isableExpander=false;
- connect(f_ilterMgr, SIGNAL(filterChanged(KNArticleFilter*)), this,
- SLOT(slotFilterChanged(KNArticleFilter*)));
+ connect(f_ilterMgr, TQT_SIGNAL(filterChanged(KNArticleFilter*)), this,
+ TQT_SLOT(slotFilterChanged(KNArticleFilter*)));
}
@@ -66,7 +66,7 @@ KNArticleManager::~KNArticleManager()
void KNArticleManager::deleteTempFiles()
{
- for ( QValueList<KTempFile*>::Iterator it = mTempFiles.begin(); it != mTempFiles.end(); ++it ) {
+ for ( TQValueList<KTempFile*>::Iterator it = mTempFiles.begin(); it != mTempFiles.end(); ++it ) {
(*it)->unlink();
delete (*it);
}
@@ -74,24 +74,24 @@ void KNArticleManager::deleteTempFiles()
}
-void KNArticleManager::saveContentToFile(KMime::Content *c, QWidget *parent)
+void KNArticleManager::saveContentToFile(KMime::Content *c, TQWidget *parent)
{
KNSaveHelper helper(c->contentType()->name(),parent);
- QFile *file = helper.getFile(i18n("Save Attachment"));
+ TQFile *file = helper.getFile(i18n("Save Attachment"));
if (file) {
- QByteArray data=c->decodedContent();
+ TQByteArray data=c->decodedContent();
if (file->writeBlock(data.data(), data.size()) == -1 )
KNHelper::displayExternalFileError( parent );
}
}
-void KNArticleManager::saveArticleToFile(KNArticle *a, QWidget *parent)
+void KNArticleManager::saveArticleToFile(KNArticle *a, TQWidget *parent)
{
- QString fName = a->subject()->asUnicodeString();
- QString s = "";
+ TQString fName = a->subject()->asUnicodeString();
+ TQString s = "";
for (unsigned int i=0; i<fName.length(); i++)
if (fName[i].isLetterOrNumber())
@@ -99,22 +99,22 @@ void KNArticleManager::saveArticleToFile(KNArticle *a, QWidget *parent)
else
s.append(' ');
fName = s.simplifyWhiteSpace();
- fName.replace(QRegExp("[\\s]"),"_");
+ fName.replace(TQRegExp("[\\s]"),"_");
KNSaveHelper helper(fName,parent);
- QFile *file = helper.getFile(i18n("Save Article"));
+ TQFile *file = helper.getFile(i18n("Save Article"));
if (file) {
- QCString tmp=a->encodedContent(false);
+ TQCString tmp=a->encodedContent(false);
if ( file->writeBlock(tmp.data(), tmp.size()) == -1 )
KNHelper::displayExternalFileError( parent );
}
}
-QString KNArticleManager::saveContentToTemp(KMime::Content *c)
+TQString KNArticleManager::saveContentToTemp(KMime::Content *c)
{
- QString path;
+ TQString path;
KTempFile* tmpFile;
KMime::Headers::Base *pathHdr=c->getHeaderByType("X-KNode-Tempfile"); // check for existing temp file
@@ -123,7 +123,7 @@ QString KNArticleManager::saveContentToTemp(KMime::Content *c)
bool found=false;
// lets see if the tempfile-path is still valid...
- for ( QValueList<KTempFile*>::Iterator it = mTempFiles.begin(); it != mTempFiles.end(); ++it ) {
+ for ( TQValueList<KTempFile*>::Iterator it = mTempFiles.begin(); it != mTempFiles.end(); ++it ) {
if ( (*it)->name() == path ) {
found = true;
break;
@@ -140,12 +140,12 @@ QString KNArticleManager::saveContentToTemp(KMime::Content *c)
if (tmpFile->status()!=0) {
KNHelper::displayTempFileError();
delete tmpFile;
- return QString::null;
+ return TQString::null;
}
mTempFiles.append(tmpFile);
- QFile *f=tmpFile->file();
- QByteArray data=c->decodedContent();
+ TQFile *f=tmpFile->file();
+ TQByteArray data=c->decodedContent();
f->writeBlock(data.data(), data.size());
tmpFile->close();
path=tmpFile->name();
@@ -158,7 +158,7 @@ QString KNArticleManager::saveContentToTemp(KMime::Content *c)
void KNArticleManager::openContent(KMime::Content *c)
{
- QString path=saveContentToTemp(c);
+ TQString path=saveContentToTemp(c);
if(path.isNull()) return;
KService::Ptr offer = KServiceTypeProfile::preferredService(c->contentType()->mimeType(), "Application");
@@ -324,7 +324,7 @@ void KNArticleManager::showHdrs(bool clear)
knGlobals.top->articleViewer()->setArticle( 0 );
}
- knGlobals.setStatusMsg(QString::null);
+ knGlobals.setStatusMsg(TQString::null);
updateStatusString();
knGlobals.top->setCursorBusy(false);
}
@@ -390,10 +390,10 @@ void KNArticleManager::search()
KWin::activateWindow(s_earchDlg->winId());
} else {
s_earchDlg=new KNSearchDialog(KNSearchDialog::STgroupSearch, 0);
- connect(s_earchDlg, SIGNAL(doSearch(KNArticleFilter*)), this,
- SLOT(slotFilterChanged(KNArticleFilter*)));
- connect(s_earchDlg, SIGNAL(dialogDone()), this,
- SLOT(slotSearchDialogDone()));
+ connect(s_earchDlg, TQT_SIGNAL(doSearch(KNArticleFilter*)), this,
+ TQT_SLOT(slotFilterChanged(KNArticleFilter*)));
+ connect(s_earchDlg, TQT_SIGNAL(dialogDone()), this,
+ TQT_SLOT(slotSearchDialogDone()));
s_earchDlg->show();
}
}
@@ -569,7 +569,7 @@ void KNArticleManager::moveIntoFolder(KNLocalArticle::List &l, KNFolder *f)
bool KNArticleManager::deleteArticles(KNLocalArticle::List &l, bool ask)
{
if(ask) {
- QStringList lst;
+ TQStringList lst;
for ( KNLocalArticle::List::Iterator it = l.begin(); it != l.end(); ++it ) {
if ( (*it)->isLocked() )
continue;
@@ -660,13 +660,13 @@ void KNArticleManager::setRead(KNRemoteArticle::List &l, bool r, bool handleXPos
if( r && knGlobals.configManager()->readNewsGeneral()->markCrossposts() &&
handleXPosts && (*it)->newsgroups()->isCrossposted() ) {
- QStringList groups = (*it)->newsgroups()->getGroups();
+ TQStringList groups = (*it)->newsgroups()->getGroups();
KNGroup *targetGroup=0;
KNRemoteArticle *xp=0;
KNRemoteArticle::List al;
- QCString mid = (*it)->messageID()->as7BitString( false );
+ TQCString mid = (*it)->messageID()->as7BitString( false );
- for ( QStringList::Iterator it2 = groups.begin(); it2 != groups.end(); ++it2 ) {
+ for ( TQStringList::Iterator it2 = groups.begin(); it2 != groups.end(); ++it2 ) {
targetGroup = knGlobals.groupManager()->group(*it2, g->account());
if (targetGroup) {
if (targetGroup->isLoaded() && (xp=targetGroup->byMessageId(mid)) ) {
@@ -987,7 +987,7 @@ void KNArticleManager::updateStatusString()
else
displCnt=g_roup->count();
- QString name = g_roup->name();
+ TQString name = g_roup->name();
if (g_roup->status()==KNGroup::moderated)
name += i18n(" (moderated)");
@@ -997,7 +997,7 @@ void KNArticleManager::updateStatusString()
if(f_ilter)
knGlobals.setStatusMsg(i18n(" Filter: %1").arg(f_ilter->translatedName()), SB_FILTER);
else
- knGlobals.setStatusMsg(QString::null, SB_FILTER);
+ knGlobals.setStatusMsg(TQString::null, SB_FILTER);
}
else if(f_older) {
if(f_ilter)
@@ -1006,10 +1006,10 @@ void KNArticleManager::updateStatusString()
displCnt=f_older->count();
knGlobals.setStatusMsg(i18n(" %1: %2 displayed")
.arg(f_older->name()).arg(displCnt), SB_GROUP);
- knGlobals.setStatusMsg(QString::null, SB_FILTER);
+ knGlobals.setStatusMsg(TQString::null, SB_FILTER);
} else {
- knGlobals.setStatusMsg(QString::null, SB_GROUP);
- knGlobals.setStatusMsg(QString::null, SB_FILTER);
+ knGlobals.setStatusMsg(TQString::null, SB_GROUP);
+ knGlobals.setStatusMsg(TQString::null, SB_FILTER);
}
}
@@ -1028,7 +1028,7 @@ void KNArticleManager::slotSearchDialogDone()
}
-void KNArticleManager::slotItemExpanded(QListViewItem *p)
+void KNArticleManager::slotItemExpanded(TQListViewItem *p)
{
if (d_isableExpander) // we don't want to call this method recursively
return;
@@ -1081,8 +1081,8 @@ void KNArticleManager::slotItemExpanded(QListViewItem *p)
void KNArticleManager::setView(KNHeaderView* v) {
v_iew = v;
if(v) {
- connect(v, SIGNAL(expanded(QListViewItem*)), this,
- SLOT(slotItemExpanded(QListViewItem*)));
+ connect(v, TQT_SIGNAL(expanded(TQListViewItem*)), this,
+ TQT_SLOT(slotItemExpanded(TQListViewItem*)));
}
}
diff --git a/knode/knarticlemanager.h b/knode/knarticlemanager.h
index 07335e1c1..f82cddd5c 100644
--- a/knode/knarticlemanager.h
+++ b/knode/knarticlemanager.h
@@ -15,7 +15,7 @@
#ifndef KNARTICLEMANAGER_H
#define KNARTICLEMANAGER_H
-#include <qvaluelist.h>
+#include <tqvaluelist.h>
#include "knjobdata.h"
#include "knarticle.h"
@@ -36,7 +36,7 @@ class KNSearchDialog;
class KNJobData;
-class KNArticleManager : public QObject, public KNJobConsumer {
+class KNArticleManager : public TQObject, public KNJobConsumer {
Q_OBJECT
@@ -46,9 +46,9 @@ class KNArticleManager : public QObject, public KNJobConsumer {
//content handling
void deleteTempFiles();
- void saveContentToFile(KMime::Content *c, QWidget *parent);
- void saveArticleToFile(KNArticle *a, QWidget *parent);
- QString saveContentToTemp(KMime::Content *c);
+ void saveContentToFile(KMime::Content *c, TQWidget *parent);
+ void saveArticleToFile(KNArticle *a, TQWidget *parent);
+ TQString saveContentToTemp(KMime::Content *c);
void openContent(KMime::Content *c);
//listview handling
@@ -109,13 +109,13 @@ class KNArticleManager : public QObject, public KNJobConsumer {
KNArticleFilter *f_ilter;
KNFilterManager *f_ilterMgr;
KNSearchDialog *s_earchDlg;
- QValueList<KTempFile*> mTempFiles;
+ TQValueList<KTempFile*> mTempFiles;
bool d_isableExpander;
public slots:
void slotFilterChanged(KNArticleFilter *f);
void slotSearchDialogDone();
- void slotItemExpanded(QListViewItem *p);
+ void slotItemExpanded(TQListViewItem *p);
};
diff --git a/knode/knarticlewindow.cpp b/knode/knarticlewindow.cpp
index 3e6898182..05b4f83ae 100644
--- a/knode/knarticlewindow.cpp
+++ b/knode/knarticlewindow.cpp
@@ -29,13 +29,13 @@
using namespace KNode;
-QValueList<KNArticleWindow*> KNArticleWindow::mInstances;
+TQValueList<KNArticleWindow*> KNArticleWindow::mInstances;
bool KNArticleWindow::closeAllWindowsForCollection( KNArticleCollection *col, bool force )
{
- QValueList<KNArticleWindow*> list = mInstances;
- for ( QValueList<KNArticleWindow*>::Iterator it = list.begin(); it != list.end(); ++it )
+ TQValueList<KNArticleWindow*> list = mInstances;
+ for ( TQValueList<KNArticleWindow*>::Iterator it = list.begin(); it != list.end(); ++it )
if ( (*it)->artW->article() && (*it)->artW->article()->collection() == col ) {
if ( force )
(*it)->close();
@@ -48,8 +48,8 @@ bool KNArticleWindow::closeAllWindowsForCollection( KNArticleCollection *col, bo
bool KNArticleWindow::closeAllWindowsForArticle( KNArticle *art, bool force )
{
- QValueList<KNArticleWindow*> list = mInstances;
- for ( QValueList<KNArticleWindow*>::Iterator it = list.begin(); it != list.end(); ++it )
+ TQValueList<KNArticleWindow*> list = mInstances;
+ for ( TQValueList<KNArticleWindow*>::Iterator it = list.begin(); it != list.end(); ++it )
if ( (*it)->artW->article() && (*it)->artW->article() == art ) {
if ( force )
(*it)->close();
@@ -62,7 +62,7 @@ bool KNArticleWindow::closeAllWindowsForArticle( KNArticle *art, bool force )
bool KNArticleWindow::raiseWindowForArticle( KNArticle *art )
{
- for ( QValueList<KNArticleWindow*>::Iterator it = mInstances.begin(); it != mInstances.end(); ++it )
+ for ( TQValueList<KNArticleWindow*>::Iterator it = mInstances.begin(); it != mInstances.end(); ++it )
if ( (*it)->artW->article() && (*it)->artW->article() == art ) {
KWin::activateWindow( (*it)->winId() );
return true;
@@ -71,9 +71,9 @@ bool KNArticleWindow::raiseWindowForArticle( KNArticle *art )
}
-bool KNArticleWindow::raiseWindowForArticle(const QCString &mid)
+bool KNArticleWindow::raiseWindowForArticle(const TQCString &mid)
{
- for ( QValueList<KNArticleWindow*>::Iterator it = mInstances.begin(); it != mInstances.end(); ++it )
+ for ( TQValueList<KNArticleWindow*>::Iterator it = mInstances.begin(); it != mInstances.end(); ++it )
if ( (*it)->artW->article() && (*it)->artW->article()->messageID()->as7BitString( false ) == mid ) {
KWin::activateWindow( (*it)->winId() );
return true;
@@ -101,10 +101,10 @@ KNArticleWindow::KNArticleWindow(KNArticle *art)
mInstances.append( this );
// file menu
- KStdAction::close( this, SLOT(close()), actionCollection() );
+ KStdAction::close( this, TQT_SLOT(close()), actionCollection() );
// settings menu
- KStdAction::preferences(knGlobals.top, SLOT(slotSettings()), actionCollection());
+ KStdAction::preferences(knGlobals.top, TQT_SLOT(slotSettings()), actionCollection());
KAccel *accel = new KAccel( this );
artW->setCharsetKeyboardAction()->plugAccel( accel );
diff --git a/knode/knarticlewindow.h b/knode/knarticlewindow.h
index 224af1dfb..1859e773f 100644
--- a/knode/knarticlewindow.h
+++ b/knode/knarticlewindow.h
@@ -36,11 +36,11 @@ class KNArticleWindow : public KMainWindow {
static bool closeAllWindowsForCollection(KNArticleCollection *col, bool force=true);
static bool closeAllWindowsForArticle(KNArticle *art, bool force=true);
static bool raiseWindowForArticle(KNArticle *art); // false: no window found
- static bool raiseWindowForArticle(const QCString &mid);
+ static bool raiseWindowForArticle(const TQCString &mid);
protected:
KNode::ArticleWidget *artW;
- static QValueList<KNArticleWindow*> mInstances;
+ static TQValueList<KNArticleWindow*> mInstances;
};
diff --git a/knode/kncleanup.cpp b/knode/kncleanup.cpp
index 4998bd4c2..3e79b4a62 100644
--- a/knode/kncleanup.cpp
+++ b/knode/kncleanup.cpp
@@ -14,10 +14,10 @@
#include <stdlib.h>
-#include <qdir.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qprogressbar.h>
+#include <tqdir.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqprogressbar.h>
#include <klocale.h>
#include <kmessagebox.h>
@@ -54,7 +54,7 @@ void KNCleanUp::start()
d_lg = new ProgressDialog( mColList.count() );
d_lg->show();
- for ( QValueList<KNArticleCollection*>::Iterator it = mColList.begin(); it != mColList.end(); ++it ) {
+ for ( TQValueList<KNArticleCollection*>::Iterator it = mColList.begin(); it != mColList.end(); ++it ) {
if ( (*it)->type() == KNCollection::CTgroup ) {
d_lg->showMessage( i18n("Deleting expired articles in <b>%1</b>").arg( (*it)->name() ) );
kapp->processEvents();
@@ -198,7 +198,7 @@ void KNCleanUp::compactFolder(KNFolder *f)
if (!f)
return;
- QDir dir(f->path());
+ TQDir dir(f->path());
if(!dir.exists())
return;
@@ -211,14 +211,14 @@ void KNCleanUp::compactFolder(KNFolder *f)
}
f->closeFiles();
- QFileInfo info(f->m_boxFile);
- QString oldName=info.fileName();
- QString newName=oldName+".new";
+ TQFileInfo info(f->m_boxFile);
+ TQString oldName=info.fileName();
+ TQString newName=oldName+".new";
KNFile newMBoxFile(info.dirPath(true)+"/"+newName);
if( (f->m_boxFile.open(IO_ReadOnly)) && (newMBoxFile.open(IO_WriteOnly)) ) {
- QTextStream ts(&newMBoxFile);
- ts.setEncoding(QTextStream::Latin1);
+ TQTextStream ts(&newMBoxFile);
+ ts.setEncoding(TQTextStream::Latin1);
for(int idx=0; idx<f->length(); idx++) {
art=f->at(idx);
if(f->m_boxFile.at(art->startOffset())) {
@@ -247,7 +247,7 @@ void KNCleanUp::compactFolder(KNFolder *f)
KNCleanUp::ProgressDialog::ProgressDialog(int steps)
- : QDialog(knGlobals.topWidget, 0, true)
+ : TQDialog(knGlobals.topWidget, 0, true)
{
const int w=400,
h=160;
@@ -258,21 +258,21 @@ KNCleanUp::ProgressDialog::ProgressDialog(int steps)
setCaption(kapp->makeStdCaption(i18n("Cleaning Up")));
setFixedSize(w,h);
- QFrame *top=new QFrame(this);
+ TQFrame *top=new TQFrame(this);
top->setGeometry(0,0, w,h);
- QVBoxLayout *topL=new QVBoxLayout(top, 10);
+ TQVBoxLayout *topL=new TQVBoxLayout(top, 10);
- QLabel *l=new QLabel(i18n("Cleaning up. Please wait..."), top);
+ TQLabel *l=new TQLabel(i18n("Cleaning up. Please wait..."), top);
topL->addWidget(l);
KSeparator *sep=new KSeparator(top);
topL->addWidget(sep);
- m_sg=new QLabel(top);
+ m_sg=new TQLabel(top);
topL->addWidget(m_sg);
- p_bar=new QProgressBar(top);
+ p_bar=new TQProgressBar(top);
topL->addWidget(p_bar);
p_bar->setTotalSteps(100*s_teps);
p_bar->setProgress(1);
@@ -298,7 +298,7 @@ KNCleanUp::ProgressDialog::~ProgressDialog()
}
-void KNCleanUp::ProgressDialog::showMessage(const QString &s)
+void KNCleanUp::ProgressDialog::showMessage(const TQString &s)
{
m_sg->setText(s);
}
@@ -311,7 +311,7 @@ void KNCleanUp::ProgressDialog::doProgress()
}
-void KNCleanUp::ProgressDialog::closeEvent(QCloseEvent *)
+void KNCleanUp::ProgressDialog::closeEvent(TQCloseEvent *)
{
// do nothing => prevent that the user closes the window
}
diff --git a/knode/kncleanup.h b/knode/kncleanup.h
index 81e453dff..f6cd53151 100644
--- a/knode/kncleanup.h
+++ b/knode/kncleanup.h
@@ -15,7 +15,7 @@
#ifndef KNCLEANUP_H
#define KNCLEANUP_H
-#include <qsemimodal.h>
+#include <tqsemimodal.h>
class QProgressBar;
class QLabel;
@@ -44,26 +44,26 @@ class KNCleanUp {
protected:
- class ProgressDialog : public QDialog {
+ class ProgressDialog : public TQDialog {
public:
ProgressDialog(int steps);
~ProgressDialog();
- void showMessage(const QString &s);
+ void showMessage(const TQString &s);
void doProgress();
protected:
- void closeEvent(QCloseEvent *e);
+ void closeEvent(TQCloseEvent *e);
- QLabel *m_sg;
- QProgressBar *p_bar;
+ TQLabel *m_sg;
+ TQProgressBar *p_bar;
int s_teps, p_rogress;
};
ProgressDialog *d_lg;
- QValueList<KNArticleCollection*> mColList;
+ TQValueList<KNArticleCollection*> mColList;
};
diff --git a/knode/kncollection.h b/knode/kncollection.h
index 80907ca55..f6c4b9150 100644
--- a/knode/kncollection.h
+++ b/knode/kncollection.h
@@ -17,7 +17,7 @@
#ifndef KNCOLLECTION_H
#define KNCOLLECTION_H
-#include <qstring.h>
+#include <tqstring.h>
class KNCollectionViewItem;
@@ -41,8 +41,8 @@ class KNCollection {
virtual void updateListItem();
// info
- virtual QString path()=0;
- virtual bool readInfo(const QString &confPath)=0;
+ virtual TQString path()=0;
+ virtual bool readInfo(const TQString &confPath)=0;
virtual void saveInfo()=0;
// parent
@@ -50,8 +50,8 @@ class KNCollection {
virtual void setParent(KNCollection *p) { p_arent=p; }
// name
- virtual const QString& name() { return n_ame; }
- void setName(const QString &s) { n_ame=s; }
+ virtual const TQString& name() { return n_ame; }
+ void setName(const TQString &s) { n_ame=s; }
// count
int count()const { return c_ount; }
@@ -62,7 +62,7 @@ class KNCollection {
protected:
KNCollection *p_arent;
KNCollectionViewItem *l_istItem;
- QString n_ame;
+ TQString n_ame;
int c_ount;
};
diff --git a/knode/kncollectionview.cpp b/knode/kncollectionview.cpp
index 2d48a9e5d..63542cad4 100644
--- a/knode/kncollectionview.cpp
+++ b/knode/kncollectionview.cpp
@@ -11,8 +11,8 @@
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, US
*/
-#include <qcursor.h>
-#include <qheader.h>
+#include <tqcursor.h>
+#include <tqheader.h>
#include <kiconloader.h>
#include <klistview.h>
@@ -32,7 +32,7 @@
#include "kncollectionview.h"
#include "kncollectionviewitem.h"
-KNCollectionView::KNCollectionView(QWidget *parent, const char* name) :
+KNCollectionView::KNCollectionView(TQWidget *parent, const char* name) :
KFolderTree(parent, name),
mActiveItem( 0 ),
mPopup( 0 )
@@ -49,8 +49,8 @@ KNCollectionView::KNCollectionView(QWidget *parent, const char* name) :
mPopup = new KPopupMenu( this );
mPopup->insertTitle( i18n("View Columns") );
mPopup->setCheckable( true );
- mUnreadPop = mPopup->insertItem( i18n("Unread Column"), this, SLOT(toggleUnreadColumn()) );
- mTotalPop = mPopup->insertItem( i18n("Total Column"), this, SLOT(toggleTotalColumn()) );
+ mUnreadPop = mPopup->insertItem( i18n("Unread Column"), this, TQT_SLOT(toggleUnreadColumn()) );
+ mTotalPop = mPopup->insertItem( i18n("Total Column"), this, TQT_SLOT(toggleTotalColumn()) );
// add unread and total columns if necessary
readConfig();
@@ -61,21 +61,21 @@ KNCollectionView::KNCollectionView(QWidget *parent, const char* name) :
// connect to the account manager
KNAccountManager* am = knGlobals.accountManager();
- connect(am, SIGNAL(accountAdded(KNNntpAccount*)), SLOT(addAccount(KNNntpAccount*)));
- connect(am, SIGNAL(accountRemoved(KNNntpAccount*)), SLOT(removeAccount(KNNntpAccount*)));
- connect(am, SIGNAL(accountModified(KNNntpAccount*)), SLOT(updateAccount(KNNntpAccount*)));
+ connect(am, TQT_SIGNAL(accountAdded(KNNntpAccount*)), TQT_SLOT(addAccount(KNNntpAccount*)));
+ connect(am, TQT_SIGNAL(accountRemoved(KNNntpAccount*)), TQT_SLOT(removeAccount(KNNntpAccount*)));
+ connect(am, TQT_SIGNAL(accountModified(KNNntpAccount*)), TQT_SLOT(updateAccount(KNNntpAccount*)));
// connect to the group manager
KNGroupManager* gm = knGlobals.groupManager();
- connect(gm, SIGNAL(groupAdded(KNGroup*)), SLOT(addGroup(KNGroup*)));
- connect(gm, SIGNAL(groupRemoved(KNGroup*)), SLOT(removeGroup(KNGroup*)));
- connect(gm, SIGNAL(groupUpdated(KNGroup*)), SLOT(updateGroup(KNGroup*)));
+ connect(gm, TQT_SIGNAL(groupAdded(KNGroup*)), TQT_SLOT(addGroup(KNGroup*)));
+ connect(gm, TQT_SIGNAL(groupRemoved(KNGroup*)), TQT_SLOT(removeGroup(KNGroup*)));
+ connect(gm, TQT_SIGNAL(groupUpdated(KNGroup*)), TQT_SLOT(updateGroup(KNGroup*)));
// connect to the folder manager
KNFolderManager* fm = knGlobals.folderManager();
- connect(fm, SIGNAL(folderAdded(KNFolder*)), SLOT(addPendingFolders()));
- connect(fm, SIGNAL(folderRemoved(KNFolder*)), SLOT(removeFolder(KNFolder*)));
- connect(fm, SIGNAL(folderActivated(KNFolder*)), SLOT(activateFolder(KNFolder*)));
+ connect(fm, TQT_SIGNAL(folderAdded(KNFolder*)), TQT_SLOT(addPendingFolders()));
+ connect(fm, TQT_SIGNAL(folderRemoved(KNFolder*)), TQT_SLOT(removeFolder(KNFolder*)));
+ connect(fm, TQT_SIGNAL(folderActivated(KNFolder*)), TQT_SLOT(activateFolder(KNFolder*)));
installEventFilter(this);
}
@@ -118,13 +118,13 @@ void KNCollectionView::readConfig()
KNConfig::Appearance *app = knGlobals.configManager()->appearance();
setFont( app->groupListFont() );
- QPalette p = palette();
- p.setColor( QColorGroup::Base, app->backgroundColor() );
- p.setColor( QColorGroup::Text, app->textColor() );
+ TQPalette p = palette();
+ p.setColor( TQColorGroup::Base, app->backgroundColor() );
+ p.setColor( TQColorGroup::Text, app->textColor() );
setPalette( p );
setAlternateBackground( app->backgroundColor() );
// FIXME: make this configurable
- mPaintInfo.colUnread = QColor( "blue" );
+ mPaintInfo.colUnread = TQColor( "blue" );
mPaintInfo.colFore = app->textColor();
mPaintInfo.colBack = app->backgroundColor();
}
@@ -149,8 +149,8 @@ void KNCollectionView::addAccount(KNNntpAccount *a)
item->setOpen( a->wasOpen() );
// add groups for this account
- QValueList<KNGroup*> groups = knGlobals.groupManager()->groupsOfAccount( a );
- for ( QValueList<KNGroup*>::Iterator it = groups.begin(); it != groups.end(); ++it ) {
+ TQValueList<KNGroup*> groups = knGlobals.groupManager()->groupsOfAccount( a );
+ for ( TQValueList<KNGroup*>::Iterator it = groups.begin(); it != groups.end(); ++it ) {
KNCollectionViewItem *gitem = new KNCollectionViewItem( item, KFolderTreeItem::News );
(*it)->setListItem( gitem );
(*it)->updateListItem();
@@ -179,7 +179,7 @@ void KNCollectionView::updateAccount(KNNntpAccount *a)
void KNCollectionView::reloadAccounts()
{
KNAccountManager* am = knGlobals.accountManager();
- QValueList<KNNntpAccount*>::Iterator it;
+ TQValueList<KNNntpAccount*>::Iterator it;
for ( it = am->begin(); it != am->end(); ++it ) {
removeAccount( *it );
addAccount( *it );
@@ -269,12 +269,12 @@ void KNCollectionView::reloadFolders()
void KNCollectionView::addPendingFolders()
{
- QValueList<KNFolder*> folders = knGlobals.folderManager()->folders();
- for ( QValueList<KNFolder*>::Iterator it = folders.begin(); it != folders.end(); ++it )
+ TQValueList<KNFolder*> folders = knGlobals.folderManager()->folders();
+ for ( TQValueList<KNFolder*>::Iterator it = folders.begin(); it != folders.end(); ++it )
if ( !(*it)->listItem() )
addFolder( (*it) );
// now open the folders if they were open in the last session
- for ( QValueList<KNFolder*>::Iterator it = folders.begin(); it != folders.end(); ++it )
+ for ( TQValueList<KNFolder*>::Iterator it = folders.begin(); it != folders.end(); ++it )
if ( (*it)->listItem())
(*it)->listItem()->setOpen( (*it)->wasOpen() );
}
@@ -299,7 +299,7 @@ void KNCollectionView::reload()
reloadFolders();
}
-void KNCollectionView::setActive( QListViewItem *i )
+void KNCollectionView::setActive( TQListViewItem *i )
{
if (!i || mActiveItem == i)
return;
@@ -328,7 +328,7 @@ void KNCollectionView::prevGroup()
void KNCollectionView::decCurrentFolder()
{
- QListViewItemIterator it( currentItem() );
+ TQListViewItemIterator it( currentItem() );
--it;
KFolderTreeItem* fti = static_cast<KFolderTreeItem*>(it.current());
if (fti) {
@@ -341,7 +341,7 @@ void KNCollectionView::decCurrentFolder()
void KNCollectionView::incCurrentFolder()
{
- QListViewItemIterator it( currentItem() );
+ TQListViewItemIterator it( currentItem() );
++it;
KFolderTreeItem* fti = static_cast<KFolderTreeItem*>(it.current());
if (fti) {
@@ -362,12 +362,12 @@ void KNCollectionView::selectCurrentFolder()
}
-QDragObject* KNCollectionView::dragObject()
+TQDragObject* KNCollectionView::dragObject()
{
KFolderTreeItem *item = static_cast<KFolderTreeItem*>
- (itemAt(viewport()->mapFromGlobal(QCursor::pos())));
+ (itemAt(viewport()->mapFromGlobal(TQCursor::pos())));
if ( item && item->protocol() == KFolderTreeItem::Local && item->type() == KFolderTreeItem::Other ) {
- QDragObject *d = new QStoredDrag( "x-knode-drag/folder", viewport() );
+ TQDragObject *d = new TQStoredDrag( "x-knode-drag/folder", viewport() );
d->setPixmap( SmallIcon("folder") );
return d;
}
@@ -375,10 +375,10 @@ QDragObject* KNCollectionView::dragObject()
}
-void KNCollectionView::contentsDropEvent( QDropEvent *e )
+void KNCollectionView::contentsDropEvent( TQDropEvent *e )
{
cleanItemHighlighter(); // necessary since we overwrite KListView::contentsDropEvent()
- QListViewItem *item = itemAt( contentsToViewport(e->pos()) );
+ TQListViewItem *item = itemAt( contentsToViewport(e->pos()) );
KNCollectionViewItem *fti = static_cast<KNCollectionViewItem*>(item);
if (fti && (fti->coll) && acceptDrag(e)) {
emit folderDrop( e, fti );
@@ -419,20 +419,20 @@ void KNCollectionView::updatePopup() const
-bool KNCollectionView::eventFilter(QObject *o, QEvent *e)
+bool KNCollectionView::eventFilter(TQObject *o, TQEvent *e)
{
- if ((e->type() == QEvent::KeyPress) && (static_cast<QKeyEvent*>(e)->key() == Key_Tab)) {
+ if ((e->type() == TQEvent::KeyPress) && (static_cast<TQKeyEvent*>(e)->key() == Key_Tab)) {
emit(focusChangeRequest(this));
if (!hasFocus()) // focusChangeRequest was successful
return true;
}
// header popup menu
- if ( e->type() == QEvent::MouseButtonPress &&
- static_cast<QMouseEvent*>(e)->button() == RightButton &&
- o->isA("QHeader") )
+ if ( e->type() == TQEvent::MouseButtonPress &&
+ static_cast<TQMouseEvent*>(e)->button() == RightButton &&
+ o->isA("TQHeader") )
{
- mPopup->popup( static_cast<QMouseEvent*>(e)->globalPos() );
+ mPopup->popup( static_cast<TQMouseEvent*>(e)->globalPos() );
return true;
}
@@ -440,16 +440,16 @@ bool KNCollectionView::eventFilter(QObject *o, QEvent *e)
}
-void KNCollectionView::focusInEvent(QFocusEvent *e)
+void KNCollectionView::focusInEvent(TQFocusEvent *e)
{
- QListView::focusInEvent(e);
+ TQListView::focusInEvent(e);
emit focusChanged(e);
}
-void KNCollectionView::focusOutEvent(QFocusEvent *e)
+void KNCollectionView::focusOutEvent(TQFocusEvent *e)
{
- QListView::focusOutEvent(e);
+ TQListView::focusOutEvent(e);
emit focusChanged(e);
}
diff --git a/knode/kncollectionview.h b/knode/kncollectionview.h
index 3c7e0f61c..000e1289d 100644
--- a/knode/kncollectionview.h
+++ b/knode/kncollectionview.h
@@ -29,10 +29,10 @@ class KNCollectionView : public KFolderTree {
Q_OBJECT
public:
- KNCollectionView(QWidget *parent, const char *name = 0);
+ KNCollectionView(TQWidget *parent, const char *name = 0);
~KNCollectionView();
- void setActive(QListViewItem *item);
+ void setActive(TQListViewItem *item);
void readConfig();
void writeConfig();
@@ -69,22 +69,22 @@ class KNCollectionView : public KFolderTree {
void updatePopup() const;
signals:
- void folderDrop( QDropEvent *e, KNCollectionViewItem *item );
+ void folderDrop( TQDropEvent *e, KNCollectionViewItem *item );
- void focusChanged( QFocusEvent* );
- void focusChangeRequest( QWidget* );
+ void focusChanged( TQFocusEvent* );
+ void focusChangeRequest( TQWidget* );
protected:
// dnd
- virtual QDragObject* dragObject();
- virtual void contentsDropEvent( QDropEvent *e );
+ virtual TQDragObject* dragObject();
+ virtual void contentsDropEvent( TQDropEvent *e );
- bool eventFilter( QObject *, QEvent * );
- void focusInEvent( QFocusEvent *e );
- void focusOutEvent( QFocusEvent *e );
+ bool eventFilter( TQObject *, TQEvent * );
+ void focusInEvent( TQFocusEvent *e );
+ void focusOutEvent( TQFocusEvent *e );
private:
- QListViewItem *mActiveItem;
+ TQListViewItem *mActiveItem;
KPopupMenu *mPopup;
int mUnreadPop, mTotalPop;
diff --git a/knode/kncollectionviewitem.cpp b/knode/kncollectionviewitem.cpp
index ace78a63a..8fed1f968 100644
--- a/knode/kncollectionviewitem.cpp
+++ b/knode/kncollectionviewitem.cpp
@@ -18,8 +18,8 @@
#include <config.h>
#endif
-#include <qdragobject.h>
-#include <qpainter.h>
+#include <tqdragobject.h>
+#include <tqpainter.h>
#include <kiconloader.h>
#include <kstringhandler.h>
@@ -33,14 +33,14 @@
KNCollectionViewItem::KNCollectionViewItem( KFolderTree *parent, Protocol protocol, Type type) :
- KFolderTreeItem(parent, QString::null, protocol, type), coll(0)
+ KFolderTreeItem(parent, TQString::null, protocol, type), coll(0)
{
setIcon();
}
KNCollectionViewItem::KNCollectionViewItem( KFolderTreeItem *it, Protocol protocol, Type type, int unread, int total ) :
- KFolderTreeItem(it, QString::null, protocol, type, unread, total), coll(0)
+ KFolderTreeItem(it, TQString::null, protocol, type, unread, total), coll(0)
{
setIcon();
}
@@ -81,7 +81,7 @@ void KNCollectionViewItem::setIcon() {
}
-int KNCollectionViewItem::compare(QListViewItem *i, int col, bool ascending) const
+int KNCollectionViewItem::compare(TQListViewItem *i, int col, bool ascending) const
{
KFolderTreeItem *other = static_cast<KFolderTreeItem*>(i);
@@ -101,7 +101,7 @@ int KNCollectionViewItem::compare(QListViewItem *i, int col, bool ascending) con
}
-bool KNCollectionViewItem::acceptDrag(QDropEvent* event) const
+bool KNCollectionViewItem::acceptDrag(TQDropEvent* event) const
{
if (event && coll && coll->type()==KNCollection::CTfolder) {
if (event->provides("x-knode-drag/article"))
@@ -113,7 +113,7 @@ bool KNCollectionViewItem::acceptDrag(QDropEvent* event) const
}
-void KNCollectionViewItem::paintCell( QPainter * p, const QColorGroup & cg,int column, int width, int align )
+void KNCollectionViewItem::paintCell( TQPainter * p, const TQColorGroup & cg,int column, int width, int align )
{
KFolderTree *ft = static_cast<KFolderTree*>( listView() );
@@ -126,19 +126,19 @@ void KNCollectionViewItem::paintCell( QPainter * p, const QColorGroup & cg,int c
// find out if we will use bold font, necessary for the text squeezing
if ( (column == 0 || column == ft->unreadIndex()) && ( mUnread > 0 ) ) {
- QFont f = p->font();
- f.setWeight(QFont::Bold);
+ TQFont f = p->font();
+ f.setWeight(TQFont::Bold);
p->setFont(f);
}
// consider pixmap size for squeezing
int pxWidth = 8;
- const QPixmap *px = pixmap(column);
+ const TQPixmap *px = pixmap(column);
if (px)
pxWidth += px->width();
// temporary set the squeezed text and use the parent class to paint it
- QString curText = text( column );
+ TQString curText = text( column );
if ( p->fontMetrics().width( curText ) > width - pxWidth ) {
setText( column, squeezeFolderName( curText, p->fontMetrics(), width - pxWidth ) );
KFolderTreeItem::paintCell( p, cg, column, width, align );
@@ -148,14 +148,14 @@ void KNCollectionViewItem::paintCell( QPainter * p, const QColorGroup & cg,int c
}
-QString KNCollectionViewItem::squeezeFolderName( const QString &text,
- const QFontMetrics &fm,
+TQString KNCollectionViewItem::squeezeFolderName( const TQString &text,
+ const TQFontMetrics &fm,
uint width ) const
{
if (protocol() == KFolderTreeItem::News && type() == KFolderTreeItem::Other) {
- QString t(text);
+ TQString t(text);
int curPos = 0, nextPos = 0;
- QString temp;
+ TQString temp;
while ( (uint)fm.width(t) > width && nextPos != -1 ) {
nextPos = t.find('.', curPos);
if ( nextPos != -1 ) {
diff --git a/knode/kncollectionviewitem.h b/knode/kncollectionviewitem.h
index 0d13678f2..6899dc9ae 100644
--- a/knode/kncollectionviewitem.h
+++ b/knode/kncollectionviewitem.h
@@ -33,19 +33,19 @@ class KNCollectionViewItem : public KFolderTreeItem {
Type type = Other, int unread = 0, int total = 0 );
~KNCollectionViewItem();
- void paintCell( QPainter * p, const QColorGroup & cg,
+ void paintCell( TQPainter * p, const TQColorGroup & cg,
int column, int width, int align );
- int compare(QListViewItem *i, int col, bool ascending) const;
+ int compare(TQListViewItem *i, int col, bool ascending) const;
// DND
- virtual bool acceptDrag(QDropEvent* event) const;
+ virtual bool acceptDrag(TQDropEvent* event) const;
KNCollection *coll;
protected:
- virtual QString squeezeFolderName( const QString &text,
- const QFontMetrics &fm,
+ virtual TQString squeezeFolderName( const TQString &text,
+ const TQFontMetrics &fm,
uint width ) const;
private:
diff --git a/knode/kncomposer.cpp b/knode/kncomposer.cpp
index b6fdd4249..111bdf19e 100644
--- a/knode/kncomposer.cpp
+++ b/knode/kncomposer.cpp
@@ -12,10 +12,10 @@
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, US
*/
-#include <qheader.h>
-#include <qtextcodec.h>
-#include <qclipboard.h>
-#include <qapplication.h>
+#include <tqheader.h>
+#include <tqtextcodec.h>
+#include <tqclipboard.h>
+#include <tqapplication.h>
#include <kspelldlg.h>
#include <kdeversion.h>
#include "addressesdialog.h"
@@ -42,7 +42,7 @@ using KRecentAddress::RecentAddresses;
#include <kprocess.h>
#include <kqcstringsplitter.h>
#include <ksyntaxhighlighter.h>
-#include <qcursor.h>
+#include <tqcursor.h>
#include <kurldrag.h>
#include <kcompletionbox.h>
@@ -58,27 +58,27 @@ using KRecentAddress::RecentAddresses;
#include "knarticlefactory.h"
#include <kstatusbar.h>
#include <klocale.h>
-#include <qpopupmenu.h>
+#include <tqpopupmenu.h>
#include <spellingfilter.h>
#include <kstdguiitem.h>
KNLineEdit::KNLineEdit(KNComposer::ComposerView *_composerView, bool useCompletion,
- QWidget *parent, const char *name)
+ TQWidget *parent, const char *name)
: KNLineEditInherited(parent,useCompletion,name) , composerView(_composerView)
{
}
-QPopupMenu *KNLineEdit::createPopupMenu()
+TQPopupMenu *KNLineEdit::createPopupMenu()
{
- QPopupMenu *menu = KLineEdit::createPopupMenu();
+ TQPopupMenu *menu = KLineEdit::createPopupMenu();
if ( !menu )
return 0;
menu->insertSeparator();
menu->insertItem( i18n( "Edit Recent Addresses..." ),
- this, SLOT( editRecentAddresses() ) );
+ this, TQT_SLOT( editRecentAddresses() ) );
return menu;
}
@@ -89,8 +89,8 @@ void KNLineEdit::editRecentAddresses()
dlg.setAddresses( RecentAddresses::self( knGlobals.config() )->addresses() );
if ( dlg.exec() ) {
RecentAddresses::self( knGlobals.config() )->clear();
- QStringList addrList = dlg.addresses();
- QStringList::Iterator it;
+ TQStringList addrList = dlg.addresses();
+ TQStringList::Iterator it;
for ( it = addrList.begin(); it != addrList.end(); ++it )
RecentAddresses::self( knGlobals.config() )->add( *it );
@@ -102,13 +102,13 @@ void KNLineEdit::loadAddresses()
{
KNLineEditInherited::loadAddresses();
- QStringList recent = RecentAddresses::self(knGlobals.config())->addresses();
- QStringList::Iterator it = recent.begin();
+ TQStringList recent = RecentAddresses::self(knGlobals.config())->addresses();
+ TQStringList::Iterator it = recent.begin();
for ( ; it != recent.end(); ++it )
addAddress( *it );
}
-void KNLineEdit::keyPressEvent(QKeyEvent *e)
+void KNLineEdit::keyPressEvent(TQKeyEvent *e)
{
// ---sven's Return is same Tab and arrow key navigation start ---
if ((e->key() == Key_Enter || e->key() == Key_Return) &&
@@ -131,7 +131,7 @@ void KNLineEdit::keyPressEvent(QKeyEvent *e)
KNLineEditInherited::keyPressEvent(e);
}
-KNLineEditSpell::KNLineEditSpell( KNComposer::ComposerView *_composerView, bool useCompletion,QWidget * parent, const char * name)
+KNLineEditSpell::KNLineEditSpell( KNComposer::ComposerView *_composerView, bool useCompletion,TQWidget * parent, const char * name)
:KNLineEdit( _composerView, useCompletion, parent,name )
{
}
@@ -141,18 +141,18 @@ void KNLineEditSpell::highLightWord( unsigned int length, unsigned int pos )
setSelection ( pos, length );
}
-void KNLineEditSpell::spellCheckDone( const QString &s )
+void KNLineEditSpell::spellCheckDone( const TQString &s )
{
if( s != text() )
setText( s );
}
-void KNLineEditSpell::spellCheckerMisspelling( const QString &_text, const QStringList &, unsigned int pos)
+void KNLineEditSpell::spellCheckerMisspelling( const TQString &_text, const TQStringList &, unsigned int pos)
{
highLightWord( _text.length(),pos );
}
-void KNLineEditSpell::spellCheckerCorrected( const QString &old, const QString &corr, unsigned int pos)
+void KNLineEditSpell::spellCheckerCorrected( const TQString &old, const TQString &corr, unsigned int pos)
{
if( old!= corr )
{
@@ -163,7 +163,7 @@ void KNLineEditSpell::spellCheckerCorrected( const QString &old, const QString &
}
-KNComposer::KNComposer(KNLocalArticle *a, const QString &text, const QString &sig, const QString &unwraped, bool firstEdit, bool dislikesCopies, bool createCopy)
+KNComposer::KNComposer(KNLocalArticle *a, const TQString &text, const TQString &sig, const TQString &unwraped, bool firstEdit, bool dislikesCopies, bool createCopy)
: KMainWindow(0,"composerWindow"), r_esult(CRsave), a_rticle(a), s_ignature(sig), u_nwraped(unwraped),
n_eeds8Bit(true), v_alidated(false), a_uthorDislikesMailCopies(dislikesCopies), e_xternalEdited(false), e_xternalEditor(0),
e_ditorTempfile(0), s_pellChecker(0), a_ttChanged(false),
@@ -183,74 +183,74 @@ KNComposer::KNComposer(KNLocalArticle *a, const QString &text, const QString &si
v_iew=new ComposerView(this);
setCentralWidget(v_iew);
- connect(v_iew->c_ancelEditorBtn, SIGNAL(clicked()), SLOT(slotCancelEditor()));
- connect(v_iew->e_dit, SIGNAL(sigDragEnterEvent(QDragEnterEvent *)), SLOT(slotDragEnterEvent(QDragEnterEvent *)));
- connect(v_iew->e_dit, SIGNAL(sigDropEvent(QDropEvent *)), SLOT(slotDropEvent(QDropEvent *)));
+ connect(v_iew->c_ancelEditorBtn, TQT_SIGNAL(clicked()), TQT_SLOT(slotCancelEditor()));
+ connect(v_iew->e_dit, TQT_SIGNAL(sigDragEnterEvent(TQDragEnterEvent *)), TQT_SLOT(slotDragEnterEvent(TQDragEnterEvent *)));
+ connect(v_iew->e_dit, TQT_SIGNAL(sigDropEvent(TQDropEvent *)), TQT_SLOT(slotDropEvent(TQDropEvent *)));
//statusbar
KStatusBar *sb=statusBar();
- sb->insertItem(QString::null, 1,1); // type
+ sb->insertItem(TQString::null, 1,1); // type
sb->setItemAlignment (1,AlignLeft | AlignVCenter);
- sb->insertItem(QString::null, 2,1); // charset
+ sb->insertItem(TQString::null, 2,1); // charset
sb->setItemAlignment (2,AlignLeft | AlignVCenter);
- sb->insertItem(QString::null, 3,0); // column
+ sb->insertItem(TQString::null, 3,0); // column
sb->setItemAlignment (3,AlignCenter | AlignVCenter);
- sb->insertItem(QString::null, 4,0); // column
+ sb->insertItem(TQString::null, 4,0); // column
sb->setItemAlignment (4,AlignCenter | AlignVCenter);
- sb->insertItem(QString::null, 5,0); // line
+ sb->insertItem(TQString::null, 5,0); // line
sb->setItemAlignment (5,AlignCenter | AlignVCenter);
- connect(v_iew->e_dit, SIGNAL(CursorPositionChanged()), SLOT(slotUpdateCursorPos()));
- connect(v_iew->e_dit, SIGNAL(toggle_overwrite_signal()), SLOT(slotUpdateStatusBar()));
+ connect(v_iew->e_dit, TQT_SIGNAL(CursorPositionChanged()), TQT_SLOT(slotUpdateCursorPos()));
+ connect(v_iew->e_dit, TQT_SIGNAL(toggle_overwrite_signal()), TQT_SLOT(slotUpdateStatusBar()));
//------------------------------- <Actions> --------------------------------------
//file menu
new KAction(i18n("&Send Now"),"mail_send", CTRL + Key_Return , this,
- SLOT(slotSendNow()), actionCollection(), "send_now");
+ TQT_SLOT(slotSendNow()), actionCollection(), "send_now");
new KAction(i18n("Send &Later"), "queue", 0, this,
- SLOT(slotSendLater()), actionCollection(), "send_later");
+ TQT_SLOT(slotSendLater()), actionCollection(), "send_later");
new KAction(i18n("Save as &Draft"),"filesave", 0 , this,
- SLOT(slotSaveAsDraft()), actionCollection(), "save_as_draft");
+ TQT_SLOT(slotSaveAsDraft()), actionCollection(), "save_as_draft");
new KAction(i18n("D&elete"),"editdelete", 0 , this,
- SLOT(slotArtDelete()), actionCollection(), "art_delete");
+ TQT_SLOT(slotArtDelete()), actionCollection(), "art_delete");
- KStdAction::close(this, SLOT(close()),actionCollection());
+ KStdAction::close(this, TQT_SLOT(close()),actionCollection());
//edit menu
- KStdAction::undo(this, SLOT(slotUndo()), actionCollection());
- KStdAction::redo(this, SLOT(slotRedo()), actionCollection());
+ KStdAction::undo(this, TQT_SLOT(slotUndo()), actionCollection());
+ KStdAction::redo(this, TQT_SLOT(slotRedo()), actionCollection());
- KStdAction::cut(this, SLOT(slotCut()), actionCollection());
+ KStdAction::cut(this, TQT_SLOT(slotCut()), actionCollection());
- KStdAction::copy(this, SLOT(slotCopy()), actionCollection());
+ KStdAction::copy(this, TQT_SLOT(slotCopy()), actionCollection());
- KStdAction::pasteText(this, SLOT(slotPaste()), actionCollection());
+ KStdAction::pasteText(this, TQT_SLOT(slotPaste()), actionCollection());
new KAction(i18n("Paste as &Quotation"), 0, v_iew->e_dit,
- SLOT(slotPasteAsQuotation()), actionCollection(), "paste_quoted");
+ TQT_SLOT(slotPasteAsQuotation()), actionCollection(), "paste_quoted");
- KStdAction::selectAll(this, SLOT(slotSelectAll()), actionCollection());
+ KStdAction::selectAll(this, TQT_SLOT(slotSelectAll()), actionCollection());
- KStdAction::find(v_iew->e_dit, SLOT(slotFind()), actionCollection());
- KStdAction::findNext(v_iew->e_dit, SLOT(slotSearchAgain()), actionCollection());
+ KStdAction::find(v_iew->e_dit, TQT_SLOT(slotFind()), actionCollection());
+ KStdAction::findNext(v_iew->e_dit, TQT_SLOT(slotSearchAgain()), actionCollection());
- KStdAction::replace(v_iew->e_dit, SLOT(slotReplace()), actionCollection());
+ KStdAction::replace(v_iew->e_dit, TQT_SLOT(slotReplace()), actionCollection());
//attach menu
- new KAction(i18n("Append &Signature"), 0 , this, SLOT(slotAppendSig()),
+ new KAction(i18n("Append &Signature"), 0 , this, TQT_SLOT(slotAppendSig()),
actionCollection(), "append_signature");
- new KAction(i18n("&Insert File..."), 0, this, SLOT(slotInsertFile()),
+ new KAction(i18n("&Insert File..."), 0, this, TQT_SLOT(slotInsertFile()),
actionCollection(), "insert_file");
- new KAction(i18n("Insert File (in a &box)..."), 0, this, SLOT(slotInsertFileBoxed()),
+ new KAction(i18n("Insert File (in a &box)..."), 0, this, TQT_SLOT(slotInsertFileBoxed()),
actionCollection(), "insert_file_boxed");
- new KAction(i18n("Attach &File..."), "attach", 0, this, SLOT(slotAttachFile()),
+ new KAction(i18n("Attach &File..."), "attach", 0, this, TQT_SLOT(slotAttachFile()),
actionCollection(), "attach_file");
a_ctPGPsign = new KToggleAction(i18n("Sign Article with &PGP"),
@@ -258,69 +258,69 @@ KNComposer::KNComposer(KNLocalArticle *a, const QString &text, const QString &si
actionCollection(), "sign_article");
a_ctRemoveAttachment = new KAction(i18n("&Remove"), 0, this,
- SLOT(slotRemoveAttachment()), actionCollection(), "remove_attachment");
+ TQT_SLOT(slotRemoveAttachment()), actionCollection(), "remove_attachment");
a_ctAttachmentProperties = new KAction(i18n("&Properties"), 0, this,
- SLOT(slotAttachmentProperties()), actionCollection(), "attachment_properties");
+ TQT_SLOT(slotAttachmentProperties()), actionCollection(), "attachment_properties");
//options menu
a_ctDoPost = new KToggleAction(i18n("Send &News Article"), "filenew", 0 , this,
- SLOT(slotToggleDoPost()), actionCollection(), "send_news");
+ TQT_SLOT(slotToggleDoPost()), actionCollection(), "send_news");
a_ctDoMail = new KToggleAction(i18n("Send E&mail"), "mail_generic" , 0 , this,
- SLOT(slotToggleDoMail()), actionCollection(), "send_mail");
+ TQT_SLOT(slotToggleDoMail()), actionCollection(), "send_mail");
a_ctSetCharset = new KSelectAction(i18n("Set &Charset"), 0, actionCollection(), "set_charset");
a_ctSetCharset->setItems(knGlobals.configManager()->postNewsTechnical()->composerCharsets());
a_ctSetCharset->setShortcutConfigurable(false);
- connect(a_ctSetCharset, SIGNAL(activated(const QString&)),
- this, SLOT(slotSetCharset(const QString&)));
+ connect(a_ctSetCharset, TQT_SIGNAL(activated(const TQString&)),
+ this, TQT_SLOT(slotSetCharset(const TQString&)));
a_ctSetCharsetKeyb = new KAction(i18n("Set Charset"), 0, this,
- SLOT(slotSetCharsetKeyboard()), actionCollection(), "set_charset_keyboard");
+ TQT_SLOT(slotSetCharsetKeyboard()), actionCollection(), "set_charset_keyboard");
a_ctWordWrap = new KToggleAction(i18n("&Word Wrap"), 0 , this,
- SLOT(slotToggleWordWrap()), actionCollection(), "toggle_wordwrap");
+ TQT_SLOT(slotToggleWordWrap()), actionCollection(), "toggle_wordwrap");
//tools menu
new KAction(i18n("Add &Quote Characters"), 0, v_iew->e_dit,
- SLOT(slotAddQuotes()), actionCollection(), "tools_quote");
+ TQT_SLOT(slotAddQuotes()), actionCollection(), "tools_quote");
new KAction(i18n("&Remove Quote Characters"), 0, v_iew->e_dit,
- SLOT(slotRemoveQuotes()), actionCollection(), "tools_unquote");
+ TQT_SLOT(slotRemoveQuotes()), actionCollection(), "tools_unquote");
new KAction(i18n("Add &Box"), 0, v_iew->e_dit,
- SLOT(slotAddBox()), actionCollection(), "tools_box");
+ TQT_SLOT(slotAddBox()), actionCollection(), "tools_box");
new KAction(i18n("Re&move Box"), 0, v_iew->e_dit,
- SLOT(slotRemoveBox()), actionCollection(), "tools_unbox");
+ TQT_SLOT(slotRemoveBox()), actionCollection(), "tools_unbox");
KAction *undoRewrap = new KAction(i18n("Get &Original Text (not re-wrapped)"), 0, this,
- SLOT(slotUndoRewrap()), actionCollection(), "tools_undoRewrap");
+ TQT_SLOT(slotUndoRewrap()), actionCollection(), "tools_undoRewrap");
undoRewrap->setEnabled(!u_nwraped.isNull());
KAction *rot13 = new KAction(i18n("S&cramble (Rot 13)"), "encrypted", 0, v_iew->e_dit,
- SLOT(slotRot13()), actionCollection(), "tools_rot13");
+ TQT_SLOT(slotRot13()), actionCollection(), "tools_rot13");
rot13->setEnabled(false);
- connect(v_iew->e_dit, SIGNAL(copyAvailable(bool)), rot13, SLOT(setEnabled(bool)));
+ connect(v_iew->e_dit, TQT_SIGNAL(copyAvailable(bool)), rot13, TQT_SLOT(setEnabled(bool)));
a_ctExternalEditor = new KAction(i18n("Start &External Editor"), "run", 0, this,
- SLOT(slotExternalEditor()), actionCollection(), "external_editor");
+ TQT_SLOT(slotExternalEditor()), actionCollection(), "external_editor");
- a_ctSpellCheck = KStdAction::spelling (this, SLOT(slotSpellcheck()), actionCollection());
+ a_ctSpellCheck = KStdAction::spelling (this, TQT_SLOT(slotSpellcheck()), actionCollection());
//settings menu
createStandardStatusBarAction();
setStandardToolBarMenuEnabled(true);
- KStdAction::keyBindings(this, SLOT(slotConfKeys()), actionCollection());
+ KStdAction::keyBindings(this, TQT_SLOT(slotConfKeys()), actionCollection());
- KStdAction::configureToolbars(this, SLOT(slotConfToolbar()), actionCollection());
+ KStdAction::configureToolbars(this, TQT_SLOT(slotConfToolbar()), actionCollection());
- KStdAction::preferences(knGlobals.top, SLOT(slotSettings()), actionCollection());
+ KStdAction::preferences(knGlobals.top, TQT_SLOT(slotSettings()), actionCollection());
a_ccel=new KAccel(this);
a_ctSetCharsetKeyb->plugAccel(a_ccel);
@@ -331,8 +331,8 @@ KNComposer::KNComposer(KNLocalArticle *a, const QString &text, const QString &si
//attachment popup
- a_ttPopup=static_cast<QPopupMenu*> (factory()->container("attachment_popup", this));
- if(!a_ttPopup) a_ttPopup = new QPopupMenu();
+ a_ttPopup=static_cast<TQPopupMenu*> (factory()->container("attachment_popup", this));
+ if(!a_ttPopup) a_ttPopup = new TQPopupMenu();
slotAttachmentSelected(0);
//init
@@ -398,7 +398,7 @@ KNComposer::~KNComposer()
delete e_ditorTempfile;
}
- for ( QValueList<KNAttachment*>::Iterator it = mDeletedAttachments.begin(); it != mDeletedAttachments.end(); ++it )
+ for ( TQValueList<KNAttachment*>::Iterator it = mDeletedAttachments.begin(); it != mDeletedAttachments.end(); ++it )
delete (*it);
KConfig *conf = knGlobals.config();
@@ -406,21 +406,21 @@ KNComposer::~KNComposer()
saveMainWindowSettings(conf);
}
-int KNComposer::listOfResultOfCheckWord( const QStringList & lst , const QString & selectWord)
+int KNComposer::listOfResultOfCheckWord( const TQStringList & lst , const TQString & selectWord)
{
createGUI("kncomposerui.rc", false);
unplugActionList("spell_result" );
m_listAction.clear();
if ( !lst.contains( selectWord ) )
{
- QStringList::ConstIterator it = lst.begin();
+ TQStringList::ConstIterator it = lst.begin();
for ( ; it != lst.end() ; ++it )
{
if ( !(*it).isEmpty() ) // in case of removed subtypes or placeholders
{
KAction * act = new KAction( *it );
- connect( act, SIGNAL(activated()), v_iew->e_dit, SLOT(slotCorrectWord()) );
+ connect( act, TQT_SIGNAL(activated()), v_iew->e_dit, TQT_SLOT(slotCorrectWord()) );
m_listAction.append( act );
}
}
@@ -432,47 +432,47 @@ int KNComposer::listOfResultOfCheckWord( const QStringList & lst , const QString
void KNComposer::slotUndo()
{
- QWidget* fw = focusWidget();
+ TQWidget* fw = focusWidget();
if (!fw) return;
if (fw->inherits("KEdit"))
- ((QMultiLineEdit*)fw)->undo();
- else if (fw->inherits("QLineEdit"))
- ((QLineEdit*)fw)->undo();
+ ((TQMultiLineEdit*)fw)->undo();
+ else if (fw->inherits("TQLineEdit"))
+ ((TQLineEdit*)fw)->undo();
}
void KNComposer::slotRedo()
{
- QWidget* fw = focusWidget();
+ TQWidget* fw = focusWidget();
if (!fw) return;
if (fw->inherits("KEdit"))
- ((QMultiLineEdit*)fw)->redo();
- else if (fw->inherits("QLineEdit"))
- ((QLineEdit*)fw)->redo();
+ ((TQMultiLineEdit*)fw)->redo();
+ else if (fw->inherits("TQLineEdit"))
+ ((TQLineEdit*)fw)->redo();
}
void KNComposer::slotCut()
{
- QWidget* fw = focusWidget();
+ TQWidget* fw = focusWidget();
if (!fw) return;
if (fw->inherits("KEdit"))
- ((QMultiLineEdit*)fw)->cut();
- else if (fw->inherits("QLineEdit"))
- ((QLineEdit*)fw)->cut();
+ ((TQMultiLineEdit*)fw)->cut();
+ else if (fw->inherits("TQLineEdit"))
+ ((TQLineEdit*)fw)->cut();
else kdDebug(5003) << "wrong focus widget" << endl;
}
void KNComposer::slotCopy()
{
- QWidget* fw = focusWidget();
+ TQWidget* fw = focusWidget();
if (!fw) return;
if (fw->inherits("KEdit"))
- ((QMultiLineEdit*)fw)->copy();
- else if (fw->inherits("QLineEdit"))
- ((QLineEdit*)fw)->copy();
+ ((TQMultiLineEdit*)fw)->copy();
+ else if (fw->inherits("TQLineEdit"))
+ ((TQLineEdit*)fw)->copy();
else kdDebug(5003) << "wrong focus widget" << endl;
}
@@ -480,25 +480,25 @@ void KNComposer::slotCopy()
void KNComposer::slotPaste()
{
- QWidget* fw = focusWidget();
+ TQWidget* fw = focusWidget();
if (!fw) return;
if (fw->inherits("KEdit"))
- ((QMultiLineEdit*)fw)->paste();
- else if (fw->inherits("QLineEdit"))
- ((QLineEdit*)fw)->paste();
+ ((TQMultiLineEdit*)fw)->paste();
+ else if (fw->inherits("TQLineEdit"))
+ ((TQLineEdit*)fw)->paste();
else kdDebug(5003) << "wrong focus widget" << endl;
}
void KNComposer::slotSelectAll()
{
- QWidget* fw = focusWidget();
+ TQWidget* fw = focusWidget();
if (!fw) return;
- if (fw->inherits("QLineEdit"))
- ((QLineEdit*)fw)->selectAll();
- else if (fw->inherits("QMultiLineEdit"))
- ((QMultiLineEdit*)fw)->selectAll();
+ if (fw->inherits("TQLineEdit"))
+ ((TQLineEdit*)fw)->selectAll();
+ else if (fw->inherits("TQMultiLineEdit"))
+ ((TQMultiLineEdit*)fw)->selectAll();
}
@@ -506,7 +506,7 @@ void KNComposer::setConfig(bool onlyFonts)
{
if (!onlyFonts) {
v_iew->e_dit->setWordWrap(knGlobals.configManager()->postNewsComposer()->wordWrap()?
- QMultiLineEdit::FixedColumnWidth : QMultiLineEdit::NoWrap);
+ TQMultiLineEdit::FixedColumnWidth : TQMultiLineEdit::NoWrap);
v_iew->e_dit->setWrapColumnOrWidth(knGlobals.configManager()->postNewsComposer()->maxLineLength());
a_ctWordWrap->setChecked(knGlobals.configManager()->postNewsComposer()->wordWrap());
@@ -514,7 +514,7 @@ void KNComposer::setConfig(bool onlyFonts)
a_ctPGPsign->setEnabled(pgp->usePGP());
}
- QFont fnt=knGlobals.configManager()->appearance()->composerFont();
+ TQFont fnt=knGlobals.configManager()->appearance()->composerFont();
v_iew->s_ubject->setFont(fnt);
v_iew->t_o->setFont(fnt);
v_iew->g_roups->setFont(fnt);
@@ -533,7 +533,7 @@ void KNComposer::setMessageMode(MessageMode mode)
v_iew->setMessageMode(m_ode);
if (m_ode == news_mail) {
- QString s = v_iew->e_dit->textLine(0);
+ TQString s = v_iew->e_dit->textLine(0);
if (!s.contains(i18n("<posted & mailed>")))
v_iew->e_dit->insertAt(i18n("<posted & mailed>\n\n"),0,0);
} else {
@@ -568,8 +568,8 @@ bool KNComposer::hasValidData()
return false;
}
- int groupCount = QStringList::split(',',v_iew->g_roups->text()).count();
- int fupCount = QStringList::split(',',v_iew->f_up2->currentText()).count();
+ int groupCount = TQStringList::split(',',v_iew->g_roups->text()).count();
+ int fupCount = TQStringList::split(',',v_iew->f_up2->currentText()).count();
bool followUp = !v_iew->f_up2->currentText().isEmpty();
if (groupCount>12) {
@@ -579,7 +579,7 @@ bool KNComposer::hasValidData()
if (groupCount>5)
if (!(KMessageBox::warningYesNo( this, i18n("You are crossposting to more than five newsgroups.\nPlease reconsider whether this is really useful\nand remove groups in which your article is off-topic.\nDo you want to re-edit the article or send it anyway?"),
- QString::null, i18n("&Send"),i18n("edit article","&Edit")) == KMessageBox::Yes))
+ TQString::null, i18n("&Send"),i18n("edit article","&Edit")) == KMessageBox::Yes))
return false;
if ( !followUp && groupCount > 2 ) {
@@ -588,7 +588,7 @@ bool KNComposer::hasValidData()
"Please use the \"Followup-To\" header to direct the replies "
"to your article into one group.\n"
"Do you want to re-edit the article or send it anyway?"),
- QString::null, i18n("&Send"), i18n("edit article","&Edit"), "missingFollowUpTo" )
+ TQString::null, i18n("&Send"), i18n("edit article","&Edit"), "missingFollowUpTo" )
!= KMessageBox::Yes )
return false;
}
@@ -600,7 +600,7 @@ bool KNComposer::hasValidData()
if (fupCount>5)
if (!(KMessageBox::warningYesNo( this, i18n("You are directing replies to more than five newsgroups.\nPlease reconsider whether this is really useful.\nDo you want to re-edit the article or send it anyway?"),
- QString::null, i18n("&Send"),i18n("edit article","&Edit")) == KMessageBox::Yes))
+ TQString::null, i18n("&Send"),i18n("edit article","&Edit")) == KMessageBox::Yes))
return false;
}
@@ -621,9 +621,9 @@ bool KNComposer::hasValidData()
int sigLength = 0;
int notQuoted = 0;
int textLines = 0;
- QStringList text = v_iew->e_dit->processedText();
+ TQStringList text = v_iew->e_dit->processedText();
- for (QStringList::Iterator it = text.begin(); it != text.end(); ++it) {
+ for (TQStringList::Iterator it = text.begin(); it != text.end(); ++it) {
if (!n_eeds8Bit && !KMime::isUsAscii(*it))
n_eeds8Bit=true;
@@ -670,7 +670,7 @@ bool KNComposer::hasValidData()
if ((textLines>1)&&(notQuoted==1)) {
if (hasAttributionLine)
if (!(KMessageBox::warningYesNo( this, i18n("Your article seems to consist entirely of quoted text;\ndo you want to re-edit the article or send it anyway?"),
- QString::null, i18n("&Send"),i18n("edit article","&Edit")) == KMessageBox::Yes))
+ TQString::null, i18n("&Send"),i18n("edit article","&Edit")) == KMessageBox::Yes))
return false;
} else {
if (notQuoted==0) {
@@ -684,23 +684,23 @@ bool KNComposer::hasValidData()
if (!(KMessageBox::warningYesNo( this,
i18n("Your article contains lines longer than 80 characters.\n"
"Do you want to re-edit the article or send it anyway?"),
- QString::null, i18n("&Send"),
+ TQString::null, i18n("&Send"),
i18n("edit article","&Edit")) == KMessageBox::Yes))
return false;
if (sigLength>8) {
if (!(KMessageBox::warningYesNo( this, i18n("Your signature is more than 8 lines long.\nYou should shorten it to match the widely accepted limit of 4 lines.\nDo you want to re-edit the article or send it anyway?"),
- QString::null, i18n("&Send"),i18n("edit article","&Edit")) == KMessageBox::Yes))
+ TQString::null, i18n("&Send"),i18n("edit article","&Edit")) == KMessageBox::Yes))
return false;
} else
if (sigLength>4)
KMessageBox::information(this, i18n("Your signature exceeds the widely-accepted limit of 4 lines:\nplease consider shortening your signature;\notherwise, you will probably annoy your readers."),
- QString::null,"longSignatureWarning");
+ TQString::null,"longSignatureWarning");
// check if article can be signed
if ( a_ctPGPsign->isChecked() ) {
// try to get the signing key
- QCString signingKey = knGlobals.configManager()->identity()->signingKey();
+ TQCString signingKey = knGlobals.configManager()->identity()->signingKey();
KNNntpAccount *acc = knGlobals.accountManager()->account( a_rticle->serverId() );
if ( acc ) {
KMime::Headers::Newsgroups *grps = a_rticle->newsgroups();
@@ -721,7 +721,7 @@ bool KNComposer::hasValidData()
"in the account properties or in the "
"group properties.\n"
"The article will be sent unsigned." ),
- QString::null, i18n( "Send Unsigned" ),
+ TQString::null, i18n( "Send Unsigned" ),
"sendUnsignedDialog" )
== KMessageBox::Cancel )
return false;
@@ -746,7 +746,7 @@ bool KNComposer::applyChanges()
//Newsgroups
if (m_ode != mail) {
- a_rticle->newsgroups()->fromUnicodeString(v_iew->g_roups->text().remove(QRegExp("\\s")), KMime::Headers::Latin1);
+ a_rticle->newsgroups()->fromUnicodeString(v_iew->g_roups->text().remove(TQRegExp("\\s")), KMime::Headers::Latin1);
a_rticle->setDoPost(true);
} else
a_rticle->setDoPost(false);
@@ -766,7 +766,7 @@ bool KNComposer::applyChanges()
if(a_ttChanged && (v_iew->a_ttView)) {
- QListViewItemIterator it(v_iew->a_ttView);
+ TQListViewItemIterator it(v_iew->a_ttView);
while(it.current()) {
a=(static_cast<AttachmentViewItem*> (it.current()))->attachment;
if(a->hasChanged()) {
@@ -779,7 +779,7 @@ bool KNComposer::applyChanges()
}
}
- for ( QValueList<KNAttachment*>::Iterator it = mDeletedAttachments.begin(); it != mDeletedAttachments.end(); ++it )
+ for ( TQValueList<KNAttachment*>::Iterator it = mDeletedAttachments.begin(); it != mDeletedAttachments.end(); ++it )
if ( (*it)->isAttached() )
(*it)->detach( a_rticle );
@@ -817,15 +817,15 @@ bool KNComposer::applyChanges()
}
//assemble the text line by line
- QString tmp;
- QStringList textLines = v_iew->e_dit->processedText();
- for (QStringList::Iterator it = textLines.begin(); it != textLines.end(); ++it)
+ TQString tmp;
+ TQStringList textLines = v_iew->e_dit->processedText();
+ for (TQStringList::Iterator it = textLines.begin(); it != textLines.end(); ++it)
tmp += *it + "\n";
// Sign article if needed
if ( a_ctPGPsign->isChecked() ) {
// first get the signing key
- QCString signingKey = knGlobals.configManager()->identity()->signingKey();
+ TQCString signingKey = knGlobals.configManager()->identity()->signingKey();
KNNntpAccount *acc = knGlobals.accountManager()->account( a_rticle->serverId() );
if ( acc ) {
KMime::Headers::Newsgroups *grps = a_rticle->newsgroups();
@@ -837,17 +837,17 @@ bool KNComposer::applyChanges()
}
// now try to sign the article
if (!signingKey.isEmpty()) {
- QString tmpText = tmp;
+ TQString tmpText = tmp;
Kpgp::Block block;
bool ok=true;
- QTextCodec *codec=KGlobal::charsets()->codecForName(c_harset, ok);
+ TQTextCodec *codec=KGlobal::charsets()->codecForName(c_harset, ok);
if(!ok) // no suitable codec found => try local settings and hope the best ;-)
codec=KGlobal::locale()->codecForEncoding();
block.setText( codec->fromUnicode(tmpText) );
kdDebug(5003) << "signing article from " << article()->from()->email() << endl;
if( block.clearsign( signingKey, codec->name() ) == Kpgp::Ok ) {
- QCString result = block.text();
+ TQCString result = block.text();
tmp = codec->toUnicode(result.data(), result.length() );
} else {
return false;
@@ -866,7 +866,7 @@ bool KNComposer::applyChanges()
}
-void KNComposer::closeEvent(QCloseEvent *e)
+void KNComposer::closeEvent(TQCloseEvent *e)
{
if(!v_iew->e_dit->isModified() && !a_ttChanged) { // nothing to save, don't show nag screen
if(a_rticle->id()==-1)
@@ -876,7 +876,7 @@ void KNComposer::closeEvent(QCloseEvent *e)
}
else {
switch ( KMessageBox::warningYesNoCancel( this, i18n("Do you want to save this article in the draft folder?"),
- QString::null, KStdGuiItem::save(), KStdGuiItem::discard())) {
+ TQString::null, KStdGuiItem::save(), KStdGuiItem::discard())) {
case KMessageBox::Yes :
r_esult=CRsave;
break;
@@ -896,11 +896,11 @@ void KNComposer::closeEvent(QCloseEvent *e)
}
-void KNComposer::initData(const QString &text)
+void KNComposer::initData(const TQString &text)
{
//Subject
if(a_rticle->subject()->isEmpty())
- slotSubjectChanged(QString::null);
+ slotSubjectChanged(TQString::null);
else
v_iew->s_ubject->setText(a_rticle->subject()->asUnicodeString());
@@ -916,7 +916,7 @@ void KNComposer::initData(const QString &text)
v_iew->f_up2->lineEdit()->setText(fup2->asUnicodeString());
KMime::Content *textContent=a_rticle->textContent();
- QString s;
+ TQString s;
if(text.isEmpty()) {
if(textContent)
@@ -960,21 +960,21 @@ void KNComposer::initData(const QString &text)
// inserts at cursor position if clear is false, replaces content otherwise
// puts the file content into a box if box==true
// "file" is already open for reading
-void KNComposer::insertFile(QFile *file, bool clear, bool box, QString boxTitle)
+void KNComposer::insertFile(TQFile *file, bool clear, bool box, TQString boxTitle)
{
- QString temp;
+ TQString temp;
bool ok=true;
- QTextCodec *codec=KGlobal::charsets()->codecForName(c_harset, ok);
- QTextStream ts(file);
+ TQTextCodec *codec=KGlobal::charsets()->codecForName(c_harset, ok);
+ TQTextStream ts(file);
ts.setCodec(codec);
if (box)
- temp = QString::fromLatin1(",----[ %1 ]\n").arg(boxTitle);
+ temp = TQString::fromLatin1(",----[ %1 ]\n").arg(boxTitle);
- if (box && (v_iew->e_dit->wordWrap()!=QMultiLineEdit::NoWrap)) {
+ if (box && (v_iew->e_dit->wordWrap()!=TQMultiLineEdit::NoWrap)) {
int wrapAt = v_iew->e_dit->wrapColumnOrWidth();
- QStringList lst;
- QString line;
+ TQStringList lst;
+ TQString line;
while(!file->atEnd()) {
line=ts.readLine();
if (!file->atEnd())
@@ -993,7 +993,7 @@ void KNComposer::insertFile(QFile *file, bool clear, bool box, QString boxTitle)
}
if (box)
- temp += QString::fromLatin1("`----");
+ temp += TQString::fromLatin1("`----");
if(clear)
v_iew->e_dit->setText(temp);
@@ -1006,9 +1006,9 @@ void KNComposer::insertFile(QFile *file, bool clear, bool box, QString boxTitle)
void KNComposer::insertFile(bool clear, bool box)
{
KNLoadHelper helper(this);
- QFile *file = helper.getFile(i18n("Insert File"));
+ TQFile *file = helper.getFile(i18n("Insert File"));
KURL url;
- QString boxName;
+ TQString boxName;
if (file) {
url = helper.getURL();
@@ -1165,19 +1165,19 @@ void KNComposer::slotToggleDoMail()
if (a_ctDoMail->isChecked()) {
if (a_uthorDislikesMailCopies) {
if (!(KMessageBox::warningContinueCancel(this, i18n("The poster does not want a mail copy of your reply (Mail-Copies-To: nobody);\nplease respect their request."),
- QString::null, i18n("&Send Copy")) == KMessageBox::Continue)) {
+ TQString::null, i18n("&Send Copy")) == KMessageBox::Continue)) {
a_ctDoMail->setChecked(false); //revert
return;
}
}
if (knGlobals.configManager()->postNewsTechnical()->useExternalMailer()) {
- QString s = v_iew->e_dit->textLine(0);
+ TQString s = v_iew->e_dit->textLine(0);
if (!s.contains(i18n("<posted & mailed>")))
v_iew->e_dit->insertAt(i18n("<posted & mailed>\n\n"),0,0);
- QString tmp;
- QStringList textLines = v_iew->e_dit->processedText();
- for (QStringList::Iterator it = textLines.begin(); it != textLines.end(); ++it) {
+ TQString tmp;
+ TQStringList textLines = v_iew->e_dit->processedText();
+ for (TQStringList::Iterator it = textLines.begin(); it != textLines.end(); ++it) {
if (*it == "-- ") // try to be smart, don't include the signature,
break; // kmail will append one, too.
tmp+=*it+"\n";
@@ -1203,7 +1203,7 @@ void KNComposer::slotToggleDoMail()
}
-void KNComposer::slotSetCharset(const QString &s)
+void KNComposer::slotSetCharset(const TQString &s)
{
if(s.isEmpty())
return;
@@ -1225,7 +1225,7 @@ void KNComposer::slotSetCharsetKeyboard()
void KNComposer::slotToggleWordWrap()
{
- v_iew->e_dit->setWordWrap(a_ctWordWrap->isChecked()? QMultiLineEdit::FixedColumnWidth : QMultiLineEdit::NoWrap);
+ v_iew->e_dit->setWordWrap(a_ctWordWrap->isChecked()? TQMultiLineEdit::FixedColumnWidth : TQMultiLineEdit::NoWrap);
}
@@ -1242,7 +1242,7 @@ void KNComposer::slotExternalEditor()
if(e_xternalEditor) // in progress...
return;
- QString editorCommand=knGlobals.configManager()->postNewsComposer()->externalEditor();
+ TQString editorCommand=knGlobals.configManager()->postNewsComposer()->externalEditor();
if(editorCommand.isEmpty())
KMessageBox::sorry(this, i18n("No editor configured.\nPlease do this in the settings dialog."));
@@ -1264,18 +1264,18 @@ void KNComposer::slotExternalEditor()
}
bool ok=true;
- QTextCodec *codec=KGlobal::charsets()->codecForName(c_harset, ok);
+ TQTextCodec *codec=KGlobal::charsets()->codecForName(c_harset, ok);
- QString tmp;
- QStringList textLines = v_iew->e_dit->processedText();
- for (QStringList::Iterator it = textLines.begin(); it != textLines.end();) {
+ TQString tmp;
+ TQStringList textLines = v_iew->e_dit->processedText();
+ for (TQStringList::Iterator it = textLines.begin(); it != textLines.end();) {
tmp += *it;
++it;
if (it != textLines.end())
tmp+="\n";
}
- QCString local = codec->fromUnicode(tmp);
+ TQCString local = codec->fromUnicode(tmp);
e_ditorTempfile->file()->writeBlock(local.data(),local.length());
e_ditorTempfile->file()->flush();
@@ -1290,11 +1290,11 @@ void KNComposer::slotExternalEditor()
e_xternalEditor=new KProcess();
// construct command line...
- QStringList command = QStringList::split(' ',editorCommand);
+ TQStringList command = TQStringList::split(' ',editorCommand);
bool filenameAdded=false;
- for ( QStringList::Iterator it = command.begin(); it != command.end(); ++it ) {
+ for ( TQStringList::Iterator it = command.begin(); it != command.end(); ++it ) {
if ((*it).contains("%f")) {
- (*it).replace(QRegExp("%f"),e_ditorTempfile->name());
+ (*it).replace(TQRegExp("%f"),e_ditorTempfile->name());
filenameAdded=true;
}
(*e_xternalEditor) << (*it);
@@ -1302,7 +1302,7 @@ void KNComposer::slotExternalEditor()
if(!filenameAdded) // no %f in the editor command
(*e_xternalEditor) << e_ditorTempfile->name();
- connect(e_xternalEditor, SIGNAL(processExited(KProcess *)),this, SLOT(slotEditorFinished(KProcess *)));
+ connect(e_xternalEditor, TQT_SIGNAL(processExited(KProcess *)),this, TQT_SLOT(slotEditorFinished(KProcess *)));
if(!e_xternalEditor->start()) {
KMessageBox::error(this, i18n("Unable to start external editor.\nPlease check your configuration in the settings dialog."));
delete e_xternalEditor;
@@ -1327,21 +1327,21 @@ void KNComposer::slotSpellcheck()
a_ctExternalEditor->setEnabled(false);
a_ctSpellCheck->setEnabled(false);
- s_pellChecker = new KSpell(this, i18n("Spellcheck"), this, SLOT(slotSpellStarted(KSpell *)));
- QStringList l = KSpellingHighlighter::personalWords();
- for ( QStringList::Iterator it = l.begin(); it != l.end(); ++it ) {
+ s_pellChecker = new KSpell(this, i18n("Spellcheck"), this, TQT_SLOT(slotSpellStarted(KSpell *)));
+ TQStringList l = KSpellingHighlighter::personalWords();
+ for ( TQStringList::Iterator it = l.begin(); it != l.end(); ++it ) {
s_pellChecker->addPersonal( *it );
}
- connect(s_pellChecker, SIGNAL(death()), this, SLOT(slotSpellFinished()));
- connect(s_pellChecker, SIGNAL(done(const QString&)), this, SLOT(slotSpellDone(const QString&)));
- connect(s_pellChecker, SIGNAL(misspelling (const QString &, const QStringList &, unsigned int)),
- this, SLOT(slotMisspelling (const QString &, const QStringList &, unsigned int)));
- connect(s_pellChecker, SIGNAL(corrected (const QString &, const QString &, unsigned int)),
- this, SLOT(slotCorrected (const QString &, const QString &, unsigned int)));
+ connect(s_pellChecker, TQT_SIGNAL(death()), this, TQT_SLOT(slotSpellFinished()));
+ connect(s_pellChecker, TQT_SIGNAL(done(const TQString&)), this, TQT_SLOT(slotSpellDone(const TQString&)));
+ connect(s_pellChecker, TQT_SIGNAL(misspelling (const TQString &, const TQStringList &, unsigned int)),
+ this, TQT_SLOT(slotMisspelling (const TQString &, const TQStringList &, unsigned int)));
+ connect(s_pellChecker, TQT_SIGNAL(corrected (const TQString &, const TQString &, unsigned int)),
+ this, TQT_SLOT(slotCorrected (const TQString &, const TQString &, unsigned int)));
}
-void KNComposer::slotMisspelling(const QString &text, const QStringList &lst, unsigned int pos)
+void KNComposer::slotMisspelling(const TQString &text, const TQStringList &lst, unsigned int pos)
{
if( spellLineEdit )
v_iew->s_ubject->spellCheckerMisspelling( text, lst, pos);
@@ -1350,7 +1350,7 @@ void KNComposer::slotMisspelling(const QString &text, const QStringList &lst, un
}
-void KNComposer::slotCorrected (const QString &oldWord, const QString &newWord, unsigned int pos)
+void KNComposer::slotCorrected (const TQString &oldWord, const TQString &newWord, unsigned int pos)
{
if( spellLineEdit )
v_iew->s_ubject->spellCheckerCorrected( oldWord, newWord, pos);
@@ -1360,7 +1360,7 @@ void KNComposer::slotCorrected (const QString &oldWord, const QString &newWord,
void KNComposer::slotUpdateStatusBar()
{
- QString typeDesc;
+ TQString typeDesc;
switch (m_ode) {
case news: typeDesc = i18n("News Article");
break;
@@ -1368,7 +1368,7 @@ void KNComposer::slotUpdateStatusBar()
break;
default : typeDesc = i18n("News Article & Email");
}
- QString overwriteDesc;
+ TQString overwriteDesc;
if (v_iew->e_dit->isOverwriteMode())
overwriteDesc = i18n(" OVR ");
else
@@ -1401,7 +1401,7 @@ void KNComposer::slotConfToolbar()
conf->setGroup("composerWindow_options");
saveMainWindowSettings(conf);
KEditToolbar dlg(guiFactory(),this);
- connect(&dlg,SIGNAL( newToolbarConfig() ), this, SLOT( slotNewToolbarConfig() ));
+ connect(&dlg,TQT_SIGNAL( newToolbarConfig() ), this, TQT_SLOT( slotNewToolbarConfig() ));
dlg.exec();
}
@@ -1409,8 +1409,8 @@ void KNComposer::slotNewToolbarConfig()
{
createGUI("kncomposerui.rc");
- a_ttPopup=static_cast<QPopupMenu*> (factory()->container("attachment_popup", this));
- if(!a_ttPopup) a_ttPopup = new QPopupMenu();
+ a_ttPopup=static_cast<TQPopupMenu*> (factory()->container("attachment_popup", this));
+ if(!a_ttPopup) a_ttPopup = new TQPopupMenu();
KConfig *conf = knGlobals.config();
conf->setGroup("composerWindow_options");
@@ -1420,10 +1420,10 @@ void KNComposer::slotNewToolbarConfig()
//-------------------------------- </Actions> -----------------------------------
-void KNComposer::slotSubjectChanged(const QString &t)
+void KNComposer::slotSubjectChanged(const TQString &t)
{
// replace newlines
- QString subject = t;
+ TQString subject = t;
subject.replace( '\n', ' ' );
subject.replace( '\r', ' ' );
if ( subject != t ) // setText() sets the cursor to the end
@@ -1436,18 +1436,18 @@ void KNComposer::slotSubjectChanged(const QString &t)
}
-void KNComposer::slotGroupsChanged(const QString &t)
+void KNComposer::slotGroupsChanged(const TQString &t)
{
KQCStringSplitter split;
bool splitOk;
- QString currText=v_iew->f_up2->currentText();
+ TQString currText=v_iew->f_up2->currentText();
v_iew->f_up2->clear();
split.init(t.latin1(), ",");
splitOk=split.first();
while(splitOk) {
- v_iew->f_up2->insertItem(QString::fromLatin1(split.string()));
+ v_iew->f_up2->insertItem(TQString::fromLatin1(split.string()));
splitOk=split.next();
}
v_iew->f_up2->insertItem("");
@@ -1460,12 +1460,12 @@ void KNComposer::slotGroupsChanged(const QString &t)
void KNComposer::slotToBtnClicked()
{
AddressesDialog dlg( this );
- QString txt;
- QString to = v_iew->t_o->text();
+ TQString txt;
+ TQString to = v_iew->t_o->text();
dlg.setShowBCC(false);
dlg.setShowCC(false);
#if 0
- QStringList lst;
+ TQStringList lst;
txt = mEdtTo->text().stripWhiteSpace();
@@ -1475,7 +1475,7 @@ void KNComposer::slotToBtnClicked()
}
#endif
dlg.setRecentAddresses( RecentAddresses::self(knGlobals.config())->kabcAddresses() );
- if (dlg.exec()==QDialog::Rejected) return;
+ if (dlg.exec()==TQDialog::Rejected) return;
if(!to.isEmpty())
to+=", ";
@@ -1506,12 +1506,12 @@ void KNComposer::slotGroupsBtnClicked()
if(id==-1)
a_rticle->setServerId(nntp->id());
- KNGroupSelectDialog *dlg=new KNGroupSelectDialog(this, nntp, v_iew->g_roups->text().remove(QRegExp("\\s")));
+ KNGroupSelectDialog *dlg=new KNGroupSelectDialog(this, nntp, v_iew->g_roups->text().remove(TQRegExp("\\s")));
- connect(dlg, SIGNAL(loadList(KNNntpAccount*)),
- knGlobals.groupManager(), SLOT(slotLoadGroupList(KNNntpAccount*)));
- connect(knGlobals.groupManager(), SIGNAL(newListReady(KNGroupListData*)),
- dlg, SLOT(slotReceiveList(KNGroupListData*)));
+ connect(dlg, TQT_SIGNAL(loadList(KNNntpAccount*)),
+ knGlobals.groupManager(), TQT_SLOT(slotLoadGroupList(KNNntpAccount*)));
+ connect(knGlobals.groupManager(), TQT_SIGNAL(newListReady(KNGroupListData*)),
+ dlg, TQT_SLOT(slotReceiveList(KNGroupListData*)));
if(dlg->exec())
v_iew->g_roups->setText(dlg->selectedGroups());
@@ -1547,14 +1547,14 @@ void KNComposer::slotCancelEditor()
}
-void KNComposer::slotAttachmentPopup(KListView*, QListViewItem *it, const QPoint &p)
+void KNComposer::slotAttachmentPopup(KListView*, TQListViewItem *it, const TQPoint &p)
{
if(it)
a_ttPopup->popup(p);
}
-void KNComposer::slotAttachmentSelected(QListViewItem *it)
+void KNComposer::slotAttachmentSelected(TQListViewItem *it)
{
if(v_iew->a_ttWidget) {
v_iew->a_ttRemoveBtn->setEnabled((it!=0));
@@ -1563,13 +1563,13 @@ void KNComposer::slotAttachmentSelected(QListViewItem *it)
}
-void KNComposer::slotAttachmentEdit(QListViewItem *)
+void KNComposer::slotAttachmentEdit(TQListViewItem *)
{
slotAttachmentProperties();
}
-void KNComposer::slotAttachmentRemove(QListViewItem *)
+void KNComposer::slotAttachmentRemove(TQListViewItem *)
{
slotRemoveAttachment();
}
@@ -1590,7 +1590,7 @@ void KNComposer::slotSpellStarted( KSpell *)
// read the quote indicator from the preferences
KConfig *config=knGlobals.config();
KConfigGroupSaver saver(config, "READNEWS");
- QString quotePrefix;
+ TQString quotePrefix;
quotePrefix = config->readEntry("quoteCharacters",">");
//todo fixme
//quotePrefix = mComposer->msg()->formatString(quotePrefix);
@@ -1605,7 +1605,7 @@ void KNComposer::slotSpellStarted( KSpell *)
s_pellChecker->check( v_iew->s_ubject->text());
}
-void KNComposer::slotSpellDone(const QString &newtext)
+void KNComposer::slotSpellDone(const TQString &newtext)
{
a_ctExternalEditor->setEnabled(true);
a_ctSpellCheck->setEnabled(true);
@@ -1619,7 +1619,7 @@ void KNComposer::slotSpellDone(const QString &newtext)
{
//stop spell check
spellLineEdit = false;
- QString tmpText( newtext);
+ TQString tmpText( newtext);
tmpText = tmpText.remove('\n');
if( tmpText != v_iew->s_ubject->text() )
@@ -1669,14 +1669,14 @@ void KNComposer::slotSpellFinished()
}
-void KNComposer::slotDragEnterEvent(QDragEnterEvent *ev)
+void KNComposer::slotDragEnterEvent(TQDragEnterEvent *ev)
{
- QStringList files;
+ TQStringList files;
ev->accept(KURLDrag::canDecode(ev));
}
-void KNComposer::slotDropEvent(QDropEvent *ev)
+void KNComposer::slotDropEvent(TQDropEvent *ev)
{
KURL::List urls;
@@ -1701,22 +1701,22 @@ void KNComposer::slotDropEvent(QDropEvent *ev)
}
-void KNComposer::dragEnterEvent(QDragEnterEvent *ev)
+void KNComposer::dragEnterEvent(TQDragEnterEvent *ev)
{
slotDragEnterEvent(ev);
}
-void KNComposer::dropEvent(QDropEvent *ev)
+void KNComposer::dropEvent(TQDropEvent *ev)
{
slotDropEvent(ev);
}
-QPopupMenu * KNComposer::popupMenu( const QString& name )
+TQPopupMenu * KNComposer::popupMenu( const TQString& name )
{
Q_ASSERT(factory());
if ( factory() )
- return ((QPopupMenu*)factory()->container( name, this ));
+ return ((TQPopupMenu*)factory()->container( name, this ));
return 0L;
}
@@ -1725,43 +1725,43 @@ QPopupMenu * KNComposer::popupMenu( const QString& name )
KNComposer::ComposerView::ComposerView(KNComposer *composer, const char *n)
- : QSplitter(QSplitter::Vertical, composer, n), a_ttWidget(0), a_ttView(0), v_iewOpen(false)
+ : TQSplitter(TQSplitter::Vertical, composer, n), a_ttWidget(0), a_ttView(0), v_iewOpen(false)
{
- QWidget *main=new QWidget(this);
+ TQWidget *main=new TQWidget(this);
//headers
- QFrame *hdrFrame=new QFrame(main);
- hdrFrame->setFrameStyle(QFrame::Box | QFrame::Sunken);
- QGridLayout *hdrL=new QGridLayout(hdrFrame, 4,3, 7,5);
+ TQFrame *hdrFrame=new TQFrame(main);
+ hdrFrame->setFrameStyle(TQFrame::Box | TQFrame::Sunken);
+ TQGridLayout *hdrL=new TQGridLayout(hdrFrame, 4,3, 7,5);
hdrL->setColStretch(1,1);
//To
t_o=new KNLineEdit(this, true, hdrFrame);
mEdtList.append(t_o);
- l_to=new QLabel(t_o, i18n("T&o:"), hdrFrame);
- t_oBtn=new QPushButton(i18n("&Browse..."), hdrFrame);
+ l_to=new TQLabel(t_o, i18n("T&o:"), hdrFrame);
+ t_oBtn=new TQPushButton(i18n("&Browse..."), hdrFrame);
hdrL->addWidget(l_to, 0,0);
hdrL->addWidget(t_o, 0,1);
hdrL->addWidget(t_oBtn, 0,2);
- connect(t_oBtn, SIGNAL(clicked()), parent(), SLOT(slotToBtnClicked()));
+ connect(t_oBtn, TQT_SIGNAL(clicked()), parent(), TQT_SLOT(slotToBtnClicked()));
//Newsgroups
g_roups=new KNLineEdit(this, false, hdrFrame);
mEdtList.append(g_roups);
- l_groups=new QLabel(g_roups, i18n("&Groups:"), hdrFrame);
- g_roupsBtn=new QPushButton(i18n("B&rowse..."), hdrFrame);
+ l_groups=new TQLabel(g_roups, i18n("&Groups:"), hdrFrame);
+ g_roupsBtn=new TQPushButton(i18n("B&rowse..."), hdrFrame);
hdrL->addWidget(l_groups, 1,0);
hdrL->addWidget(g_roups, 1,1);
hdrL->addWidget(g_roupsBtn, 1,2);
- connect(g_roups, SIGNAL(textChanged(const QString&)),
- parent(), SLOT(slotGroupsChanged(const QString&)));
- connect(g_roupsBtn, SIGNAL(clicked()), parent(), SLOT(slotGroupsBtnClicked()));
+ connect(g_roups, TQT_SIGNAL(textChanged(const TQString&)),
+ parent(), TQT_SLOT(slotGroupsChanged(const TQString&)));
+ connect(g_roupsBtn, TQT_SIGNAL(clicked()), parent(), TQT_SLOT(slotGroupsBtnClicked()));
//Followup-To
f_up2=new KComboBox(true, hdrFrame);
- l_fup2=new QLabel(f_up2, i18n("Follo&wup-To:"), hdrFrame);
+ l_fup2=new TQLabel(f_up2, i18n("Follo&wup-To:"), hdrFrame);
hdrL->addWidget(l_fup2, 2,0);
hdrL->addMultiCellWidget(f_up2, 2,2, 1,2);
@@ -1769,11 +1769,11 @@ KNComposer::ComposerView::ComposerView(KNComposer *composer, const char *n)
s_ubject=new KNLineEditSpell(this, false, hdrFrame);
mEdtList.append(s_ubject);
- QLabel *l=new QLabel(s_ubject, i18n("S&ubject:"), hdrFrame);
+ TQLabel *l=new TQLabel(s_ubject, i18n("S&ubject:"), hdrFrame);
hdrL->addWidget(l, 3,0);
hdrL->addMultiCellWidget(s_ubject, 3,3, 1,2);
- connect(s_ubject, SIGNAL(textChanged(const QString&)),
- parent(), SLOT(slotSubjectChanged(const QString&)));
+ connect(s_ubject, TQT_SIGNAL(textChanged(const TQString&)),
+ parent(), TQT_SLOT(slotSubjectChanged(const TQString&)));
//Editor
e_dit=new Editor(this, composer, main);
@@ -1781,34 +1781,34 @@ KNComposer::ComposerView::ComposerView(KNComposer *composer, const char *n)
KConfig *config = knGlobals.config();
KConfigGroupSaver saver(config, "VISUAL_APPEARANCE");
- QColor defaultColor1( kapp->palette().active().text()); // defaults from kmreaderwin.cpp
- QColor defaultColor2( kapp->palette().active().text() );
- QColor defaultColor3( kapp->palette().active().text() );
- QColor defaultForeground( kapp->palette().active().text() );
- QColor col1 = config->readColorEntry( "ForegroundColor", &defaultForeground );
- QColor col2 = config->readColorEntry( "quote3Color", &defaultColor3 );
- QColor col3 = config->readColorEntry( "quote2Color", &defaultColor2 );
- QColor col4 = config->readColorEntry( "quote1Color", &defaultColor1 );
- QColor c = QColor("red");
+ TQColor defaultColor1( kapp->palette().active().text()); // defaults from kmreaderwin.cpp
+ TQColor defaultColor2( kapp->palette().active().text() );
+ TQColor defaultColor3( kapp->palette().active().text() );
+ TQColor defaultForeground( kapp->palette().active().text() );
+ TQColor col1 = config->readColorEntry( "ForegroundColor", &defaultForeground );
+ TQColor col2 = config->readColorEntry( "quote3Color", &defaultColor3 );
+ TQColor col3 = config->readColorEntry( "quote2Color", &defaultColor2 );
+ TQColor col4 = config->readColorEntry( "quote1Color", &defaultColor1 );
+ TQColor c = TQColor("red");
mSpellChecker = new KDictSpellingHighlighter(e_dit, /*active*/ true, /*autoEnabled*/ true,
/*spellColor*/ config->readColorEntry("NewMessage", &c),
/*colorQuoting*/ true, col1, col2, col3, col4);
- connect( mSpellChecker, SIGNAL(newSuggestions(const QString&, const QStringList&, unsigned int)), e_dit,
- SLOT(slotAddSuggestion(const QString&, const QStringList&, unsigned int)) );
+ connect( mSpellChecker, TQT_SIGNAL(newSuggestions(const TQString&, const TQStringList&, unsigned int)), e_dit,
+ TQT_SLOT(slotAddSuggestion(const TQString&, const TQStringList&, unsigned int)) );
- QVBoxLayout *notL=new QVBoxLayout(e_dit);
+ TQVBoxLayout *notL=new TQVBoxLayout(e_dit);
notL->addStretch(1);
- n_otification=new QGroupBox(2, Qt::Horizontal, e_dit);
- l=new QLabel(i18n("You are currently editing the article body\nin an external editor. To continue, you have\nto close the external editor."), n_otification);
- c_ancelEditorBtn=new QPushButton(i18n("&Kill External Editor"), n_otification);
- n_otification->setFrameStyle(QFrame::Panel | QFrame::Raised);
+ n_otification=new TQGroupBox(2, Qt::Horizontal, e_dit);
+ l=new TQLabel(i18n("You are currently editing the article body\nin an external editor. To continue, you have\nto close the external editor."), n_otification);
+ c_ancelEditorBtn=new TQPushButton(i18n("&Kill External Editor"), n_otification);
+ n_otification->setFrameStyle(TQFrame::Panel | TQFrame::Raised);
n_otification->setLineWidth(2);
n_otification->hide();
notL->addWidget(n_otification, 0, Qt::AlignHCenter);
notL->addStretch(1);
//finish GUI
- QVBoxLayout *topL=new QVBoxLayout(main, 4,4);
+ TQVBoxLayout *topL=new TQVBoxLayout(main, 4,4);
topL->addWidget(hdrFrame);
topL->addWidget(e_dit, 1);
}
@@ -1822,8 +1822,8 @@ KNComposer::ComposerView::~ComposerView()
conf->writeEntry("Att_Splitter",sizes()); // save splitter pos
- QValueList<int> lst; // save header sizes
- QHeader *h=a_ttView->header();
+ TQValueList<int> lst; // save header sizes
+ TQHeader *h=a_ttView->header();
for (int i=0; i<5; i++)
lst << h->sectionSize(i);
conf->writeEntry("Att_Headers",lst);
@@ -1832,14 +1832,14 @@ KNComposer::ComposerView::~ComposerView()
}
-void KNComposer::ComposerView::focusNextPrevEdit(const QWidget* aCur, bool aNext)
+void KNComposer::ComposerView::focusNextPrevEdit(const TQWidget* aCur, bool aNext)
{
- QValueList<QWidget*>::Iterator it;
+ TQValueList<TQWidget*>::Iterator it;
if ( !aCur ) {
it = --( mEdtList.end() );
} else {
- for ( QValueList<QWidget*>::Iterator it2 = mEdtList.begin(); it2 != mEdtList.end(); ++it2 ) {
+ for ( TQValueList<TQWidget*>::Iterator it2 = mEdtList.begin(); it2 != mEdtList.end(); ++it2 ) {
if ( (*it2) == aCur ) {
it = it2;
break;
@@ -1899,40 +1899,40 @@ void KNComposer::ComposerView::restartBackgroundSpellCheck()
void KNComposer::ComposerView::showAttachmentView()
{
if(!a_ttWidget) {
- a_ttWidget=new QWidget(this);
- QGridLayout *topL=new QGridLayout(a_ttWidget, 3, 2, 4, 4);
+ a_ttWidget=new TQWidget(this);
+ TQGridLayout *topL=new TQGridLayout(a_ttWidget, 3, 2, 4, 4);
a_ttView=new AttachmentView(a_ttWidget);
topL->addMultiCellWidget(a_ttView, 0,2, 0,0);
//connections
- connect(a_ttView, SIGNAL(currentChanged(QListViewItem*)),
- parent(), SLOT(slotAttachmentSelected(QListViewItem*)));
- connect(a_ttView, SIGNAL(clicked ( QListViewItem * )),
- parent(), SLOT(slotAttachmentSelected(QListViewItem*)));
-
- connect(a_ttView, SIGNAL(contextMenu(KListView*, QListViewItem*, const QPoint&)),
- parent(), SLOT(slotAttachmentPopup(KListView*, QListViewItem*, const QPoint&)));
- connect(a_ttView, SIGNAL(delPressed(QListViewItem*)),
- parent(), SLOT(slotAttachmentRemove(QListViewItem*)));
- connect(a_ttView, SIGNAL(doubleClicked(QListViewItem*)),
- parent(), SLOT(slotAttachmentEdit(QListViewItem*)));
- connect(a_ttView, SIGNAL(returnPressed(QListViewItem*)),
- parent(), SLOT(slotAttachmentEdit(QListViewItem*)));
+ connect(a_ttView, TQT_SIGNAL(currentChanged(TQListViewItem*)),
+ parent(), TQT_SLOT(slotAttachmentSelected(TQListViewItem*)));
+ connect(a_ttView, TQT_SIGNAL(clicked ( TQListViewItem * )),
+ parent(), TQT_SLOT(slotAttachmentSelected(TQListViewItem*)));
+
+ connect(a_ttView, TQT_SIGNAL(contextMenu(KListView*, TQListViewItem*, const TQPoint&)),
+ parent(), TQT_SLOT(slotAttachmentPopup(KListView*, TQListViewItem*, const TQPoint&)));
+ connect(a_ttView, TQT_SIGNAL(delPressed(TQListViewItem*)),
+ parent(), TQT_SLOT(slotAttachmentRemove(TQListViewItem*)));
+ connect(a_ttView, TQT_SIGNAL(doubleClicked(TQListViewItem*)),
+ parent(), TQT_SLOT(slotAttachmentEdit(TQListViewItem*)));
+ connect(a_ttView, TQT_SIGNAL(returnPressed(TQListViewItem*)),
+ parent(), TQT_SLOT(slotAttachmentEdit(TQListViewItem*)));
//buttons
- a_ttAddBtn=new QPushButton(i18n("A&dd..."),a_ttWidget);
- connect(a_ttAddBtn, SIGNAL(clicked()), parent(), SLOT(slotAttachFile()));
+ a_ttAddBtn=new TQPushButton(i18n("A&dd..."),a_ttWidget);
+ connect(a_ttAddBtn, TQT_SIGNAL(clicked()), parent(), TQT_SLOT(slotAttachFile()));
topL->addWidget(a_ttAddBtn, 0,1);
- a_ttRemoveBtn=new QPushButton(i18n("&Remove"), a_ttWidget);
+ a_ttRemoveBtn=new TQPushButton(i18n("&Remove"), a_ttWidget);
a_ttRemoveBtn->setEnabled(false);
- connect(a_ttRemoveBtn, SIGNAL(clicked()), parent(), SLOT(slotRemoveAttachment()));
+ connect(a_ttRemoveBtn, TQT_SIGNAL(clicked()), parent(), TQT_SLOT(slotRemoveAttachment()));
topL->addWidget(a_ttRemoveBtn, 1,1);
- a_ttEditBtn=new QPushButton(i18n("&Properties"), a_ttWidget);
+ a_ttEditBtn=new TQPushButton(i18n("&Properties"), a_ttWidget);
a_ttEditBtn->setEnabled(false);
- connect(a_ttEditBtn, SIGNAL(clicked()), parent(), SLOT(slotAttachmentProperties()));
+ connect(a_ttEditBtn, TQT_SIGNAL(clicked()), parent(), TQT_SLOT(slotAttachmentProperties()));
topL->addWidget(a_ttEditBtn, 2,1, Qt::AlignTop);
topL->setRowStretch(2,1);
@@ -1946,16 +1946,16 @@ void KNComposer::ComposerView::showAttachmentView()
KConfig *conf=knGlobals.config();
conf->setGroup("POSTNEWS");
- QValueList<int> lst=conf->readIntListEntry("Att_Splitter");
+ TQValueList<int> lst=conf->readIntListEntry("Att_Splitter");
if(lst.count()!=2)
lst << 267 << 112;
setSizes(lst);
lst=conf->readIntListEntry("Att_Headers");
if(lst.count()==5) {
- QValueList<int>::Iterator it=lst.begin();
+ TQValueList<int>::Iterator it=lst.begin();
- QHeader *h=a_ttView->header();
+ TQHeader *h=a_ttView->header();
for(int i=0; i<5; i++) {
h->resizeSection(i,(*it));
++it;
@@ -1991,14 +1991,14 @@ void KNComposer::ComposerView::hideExternalNotification()
//=====================================================================================
#include <kcursor.h>
-KNComposer::Editor::Editor(KNComposer::ComposerView *_composerView, KNComposer *_composer, QWidget *parent, char *name)
+KNComposer::Editor::Editor(KNComposer::ComposerView *_composerView, KNComposer *_composer, TQWidget *parent, char *name)
: KEdit(parent, name), m_composer( _composer ), m_composerView(_composerView)
{
setOverwriteEnabled(true);
spell = 0L;
installEventFilter(this);
KCursor::setAutoHideCursor( this, true, true );
- m_bound = QRegExp( QString::fromLatin1("[\\s\\W]") );
+ m_bound = TQRegExp( TQString::fromLatin1("[\\s\\W]") );
}
@@ -2009,14 +2009,14 @@ KNComposer::Editor::~Editor()
}
//-----------------------------------------------------------------------------
-bool KNComposer::Editor::eventFilter(QObject*o, QEvent* e)
+bool KNComposer::Editor::eventFilter(TQObject*o, TQEvent* e)
{
if (o == this)
KCursor::autoHideEventFilter(o, e);
- if (e->type() == QEvent::KeyPress)
+ if (e->type() == TQEvent::KeyPress)
{
- QKeyEvent *k = (QKeyEvent*)e;
+ TQKeyEvent *k = (TQKeyEvent*)e;
// ---sven's Arrow key navigation start ---
// Key Up in first line takes you to Subject line.
if (k->key() == Key_Up && k->state() != ShiftButton && currentLine() == 0
@@ -2034,14 +2034,14 @@ bool KNComposer::Editor::eventFilter(QObject*o, QEvent* e)
m_composerView->focusNextPrevEdit(0, false);
return true;
}
- } else if ( e->type() == QEvent::ContextMenu ) {
- QContextMenuEvent *event = (QContextMenuEvent*) e;
+ } else if ( e->type() == TQEvent::ContextMenu ) {
+ TQContextMenuEvent *event = (TQContextMenuEvent*) e;
int para = 1, charPos, firstSpace, lastSpace;
//Get the character at the position of the click
charPos = charAt( viewportToContents(event->pos() ), &para );
- QString paraText = text( para );
+ TQString paraText = text( para );
if( !paraText.at(charPos).isSpace() )
{
@@ -2050,7 +2050,7 @@ bool KNComposer::Editor::eventFilter(QObject*o, QEvent* e)
lastSpace = paraText.find( m_bound, charPos );
if( lastSpace == -1 )
lastSpace = paraText.length();
- QString word = paraText.mid( firstSpace, lastSpace - firstSpace );
+ TQString word = paraText.mid( firstSpace, lastSpace - firstSpace );
//Continue if this word was misspelled
if( !word.isEmpty() && m_replacements.contains( word ) )
{
@@ -2058,18 +2058,18 @@ bool KNComposer::Editor::eventFilter(QObject*o, QEvent* e)
p.insertTitle( i18n("Suggestions") );
//Add the suggestions to the popup menu
- QStringList reps = m_replacements[word];
+ TQStringList reps = m_replacements[word];
if( reps.count() > 0 )
{
int listPos = 0;
- for ( QStringList::Iterator it = reps.begin(); it != reps.end(); ++it ) {
+ for ( TQStringList::Iterator it = reps.begin(); it != reps.end(); ++it ) {
p.insertItem( *it, listPos );
listPos++;
}
}
else
{
- p.insertItem( QString::fromLatin1("No Suggestions"), -2 );
+ p.insertItem( TQString::fromLatin1("No Suggestions"), -2 );
}
//Execute the popup inline
@@ -2097,16 +2097,16 @@ bool KNComposer::Editor::eventFilter(QObject*o, QEvent* e)
return KEdit::eventFilter(o, e);
}
-void KNComposer::Editor::slotAddSuggestion( const QString &text, const QStringList &lst, unsigned int )
+void KNComposer::Editor::slotAddSuggestion( const TQString &text, const TQStringList &lst, unsigned int )
{
m_replacements[text] = lst;
}
// expand tabs to avoid the "tab-damage",
// auto-wraped paragraphs have to split (code taken from KEdit::saveText)
-QStringList KNComposer::Editor::processedText()
+TQStringList KNComposer::Editor::processedText()
{
- QStringList ret;
+ TQStringList ret;
int lines = numLines()-1;
if (lines < 0)
return ret;
@@ -2121,7 +2121,7 @@ QStringList KNComposer::Editor::processedText()
if (lines_in_parag == 1) {
ret.append(textLine(i));
} else {
- QString parag_text = textLine(i);
+ TQString parag_text = textLine(i);
int pos = 0;
int last_pos = 0;
int current_line = 0;
@@ -2137,11 +2137,11 @@ QStringList KNComposer::Editor::processedText()
}
}
- QString replacement;
+ TQString replacement;
int tabPos;
- for (QStringList::Iterator it = ret.begin(); it != ret.end(); ++it ) {
+ for (TQStringList::Iterator it = ret.begin(); it != ret.end(); ++it ) {
while ((tabPos=(*it).find('\t'))!=-1) {
- replacement.fill(QChar(' '), 8-(tabPos%8));
+ replacement.fill(TQChar(' '), 8-(tabPos%8));
(*it).replace(tabPos, 1, replacement);
}
}
@@ -2152,14 +2152,14 @@ QStringList KNComposer::Editor::processedText()
void KNComposer::Editor::slotPasteAsQuotation()
{
- QString s = QApplication::clipboard()->text();
+ TQString s = TQApplication::clipboard()->text();
if (!s.isEmpty()) {
for (int i=0; (uint)i<s.length(); i++) {
if ( s[i] < ' ' && s[i] != '\n' && s[i] != '\t' )
s[i] = ' ';
}
s.prepend("> ");
- s.replace(QRegExp("\n"),"\n> ");
+ s.replace(TQRegExp("\n"),"\n> ");
insert(s);
}
}
@@ -2184,14 +2184,14 @@ void KNComposer::Editor::slotReplace()
void KNComposer::Editor::slotAddQuotes()
{
if (hasMarkedText()) {
- QString s = markedText();
+ TQString s = markedText();
s.prepend("> ");
- s.replace(QRegExp("\n"),"\n> ");
+ s.replace(TQRegExp("\n"),"\n> ");
insert(s);
} else {
int l = currentLine();
int c = currentColumn();
- QString s = textLine(l);
+ TQString s = textLine(l);
s.prepend("> ");
insertLine(s,l);
removeLine(l+1);
@@ -2203,15 +2203,15 @@ void KNComposer::Editor::slotAddQuotes()
void KNComposer::Editor::slotRemoveQuotes()
{
if (hasMarkedText()) {
- QString s = markedText();
+ TQString s = markedText();
if (s.left(2) == "> ")
s.remove(0,2);
- s.replace(QRegExp("\n> "),"\n");
+ s.replace(TQRegExp("\n> "),"\n");
insert(s);
} else {
int l = currentLine();
int c = currentColumn();
- QString s = textLine(l);
+ TQString s = textLine(l);
if (s.left(2) == "> ") {
s.remove(0,2);
insertLine(s,l);
@@ -2225,15 +2225,15 @@ void KNComposer::Editor::slotRemoveQuotes()
void KNComposer::Editor::slotAddBox()
{
if (hasMarkedText()) {
- QString s = markedText();
+ TQString s = markedText();
s.prepend(",----[ ]\n");
- s.replace(QRegExp("\n"),"\n| ");
+ s.replace(TQRegExp("\n"),"\n| ");
s.append("\n`----");
insert(s);
} else {
int l = currentLine();
int c = currentColumn();
- QString s = QString::fromLatin1(",----[ ]\n| %1\n`----").arg(textLine(l));
+ TQString s = TQString::fromLatin1(",----[ ]\n| %1\n`----").arg(textLine(l));
insertLine(s,l);
removeLine(l+3);
setCursorPosition(l+1,c+2);
@@ -2244,10 +2244,10 @@ void KNComposer::Editor::slotAddBox()
void KNComposer::Editor::slotRemoveBox()
{
if (hasMarkedText()) {
- QString s = QString::fromLatin1("\n") + markedText() + QString::fromLatin1("\n");
- s.replace(QRegExp("\n,----[^\n]*\n"),"\n");
- s.replace(QRegExp("\n| "),"\n");
- s.replace(QRegExp("\n`----[^\n]*\n"),"\n");
+ TQString s = TQString::fromLatin1("\n") + markedText() + TQString::fromLatin1("\n");
+ s.replace(TQRegExp("\n,----[^\n]*\n"),"\n");
+ s.replace(TQRegExp("\n| "),"\n");
+ s.replace(TQRegExp("\n`----[^\n]*\n"),"\n");
s.remove(0,1);
s.truncate(s.length()-1);
insert(s);
@@ -2255,7 +2255,7 @@ void KNComposer::Editor::slotRemoveBox()
int l = currentLine();
int c = currentColumn();
- QString s = textLine(l); // test if we are in a box
+ TQString s = textLine(l); // test if we are in a box
if (!((s.left(2) == "| ")||(s.left(5)==",----")||(s.left(5)=="`----")))
return;
@@ -2309,7 +2309,7 @@ void KNComposer::Editor::slotRot13()
}
-void KNComposer::Editor::contentsDragEnterEvent(QDragEnterEvent *ev)
+void KNComposer::Editor::contentsDragEnterEvent(TQDragEnterEvent *ev)
{
if (KURLDrag::canDecode(ev))
emit(sigDragEnterEvent(ev));
@@ -2318,7 +2318,7 @@ void KNComposer::Editor::contentsDragEnterEvent(QDragEnterEvent *ev)
}
-void KNComposer::Editor::contentsDropEvent(QDropEvent *ev)
+void KNComposer::Editor::contentsDropEvent(TQDropEvent *ev)
{
if (KURLDrag::canDecode(ev))
emit(sigDropEvent(ev));
@@ -2326,12 +2326,12 @@ void KNComposer::Editor::contentsDropEvent(QDropEvent *ev)
KEdit::dropEvent(ev);
}
-void KNComposer::Editor::keyPressEvent ( QKeyEvent *e)
+void KNComposer::Editor::keyPressEvent ( TQKeyEvent *e)
{
if( e->key() == Key_Return ) {
int line, col;
getCursorPosition( &line, &col );
- QString lineText = text( line );
+ TQString lineText = text( line );
// returns line with additional trailing space (bug in Qt?), cut it off
lineText.truncate( lineText.length() - 1 );
// special treatment of quoted lines only if the cursor is neither at
@@ -2360,7 +2360,7 @@ void KNComposer::Editor::keyPressEvent ( QKeyEvent *e)
if( isQuotedLine
&& ( bot != lineText.length() )
&& ( col >= int( bot ) ) ) {
- QString newLine = text( line + 1 );
+ TQString newLine = text( line + 1 );
// remove leading white space from the new line and instead
// add the quote indicators of the previous line
unsigned int leadingWhiteSpaceCount = 0;
@@ -2386,27 +2386,27 @@ void KNComposer::Editor::keyPressEvent ( QKeyEvent *e)
}
-void KNComposer::Editor::contentsContextMenuEvent( QContextMenuEvent */*e*/ )
+void KNComposer::Editor::contentsContextMenuEvent( TQContextMenuEvent */*e*/ )
{
- QString selectWord = selectWordUnderCursor();
- QPopupMenu* popup = 0L;
+ TQString selectWord = selectWordUnderCursor();
+ TQPopupMenu* popup = 0L;
if ( selectWord.isEmpty())
{
popup = m_composer ? m_composer->popupMenu( "edit" ): 0;
if ( popup )
- popup->popup(QCursor::pos());
+ popup->popup(TQCursor::pos());
}
else
{
- spell = new KSpell(this, i18n("Spellcheck"), this, SLOT(slotSpellStarted(KSpell *)));
- QStringList l = KSpellingHighlighter::personalWords();
- for ( QStringList::Iterator it = l.begin(); it != l.end(); ++it ) {
+ spell = new KSpell(this, i18n("Spellcheck"), this, TQT_SLOT(slotSpellStarted(KSpell *)));
+ TQStringList l = KSpellingHighlighter::personalWords();
+ for ( TQStringList::Iterator it = l.begin(); it != l.end(); ++it ) {
spell->addPersonal( *it );
}
- connect(spell, SIGNAL(death()), this, SLOT(slotSpellFinished()));
- connect(spell, SIGNAL(done(const QString&)), this, SLOT(slotSpellDone(const QString&)));
- connect(spell, SIGNAL(misspelling (const QString &, const QStringList &, unsigned int)),
- this, SLOT(slotMisspelling (const QString &, const QStringList &, unsigned int)));
+ connect(spell, TQT_SIGNAL(death()), this, TQT_SLOT(slotSpellFinished()));
+ connect(spell, TQT_SIGNAL(done(const TQString&)), this, TQT_SLOT(slotSpellDone(const TQString&)));
+ connect(spell, TQT_SIGNAL(misspelling (const TQString &, const TQStringList &, unsigned int)),
+ this, TQT_SLOT(slotMisspelling (const TQString &, const TQStringList &, unsigned int)));
}
}
@@ -2416,7 +2416,7 @@ void KNComposer::Editor::slotSpellStarted( KSpell *)
}
-void KNComposer::Editor::slotSpellDone(const QString &/*newtext*/)
+void KNComposer::Editor::slotSpellDone(const TQString &/*newtext*/)
{
spell->cleanUp();
}
@@ -2456,20 +2456,20 @@ void KNComposer::Editor::del()
}
-void KNComposer::Editor::slotMisspelling (const QString &, const QStringList &lst, unsigned int)
+void KNComposer::Editor::slotMisspelling (const TQString &, const TQStringList &lst, unsigned int)
{
int countAction = m_composer->listOfResultOfCheckWord( lst , selectWordUnderCursor());
if ( countAction>0 )
{
- QPopupMenu* popup = m_composer ? m_composer->popupMenu( "edit_with_spell" ): 0;
+ TQPopupMenu* popup = m_composer ? m_composer->popupMenu( "edit_with_spell" ): 0;
if ( popup )
- popup->popup(QCursor::pos());
+ popup->popup(TQCursor::pos());
}
else
{
- QPopupMenu* popup = m_composer ? m_composer->popupMenu( "edit" ): 0;
+ TQPopupMenu* popup = m_composer ? m_composer->popupMenu( "edit" ): 0;
if ( popup )
- popup->popup(QCursor::pos());
+ popup->popup(TQCursor::pos());
}
}
@@ -2490,10 +2490,10 @@ void KNComposer::Editor::slotCorrectWord()
//=====================================================================================
-KNComposer::AttachmentView::AttachmentView(QWidget *parent, char *name)
+KNComposer::AttachmentView::AttachmentView(TQWidget *parent, char *name)
: KListView(parent, name)
{
- setFrameStyle(QFrame::WinPanel | QFrame::Sunken); // match the QMultiLineEdit style
+ setFrameStyle(TQFrame::WinPanel | TQFrame::Sunken); // match the TQMultiLineEdit style
addColumn(i18n("File"), 115);
addColumn(i18n("Type"), 91);
addColumn(i18n("Size"), 55);
@@ -2509,7 +2509,7 @@ KNComposer::AttachmentView::~AttachmentView()
}
-void KNComposer::AttachmentView::keyPressEvent(QKeyEvent *e)
+void KNComposer::AttachmentView::keyPressEvent(TQKeyEvent *e)
{
if(!e)
return; // subclass bug
@@ -2545,44 +2545,44 @@ KNComposer::AttachmentViewItem::~AttachmentViewItem()
//=====================================================================================
-KNComposer::AttachmentPropertiesDlg::AttachmentPropertiesDlg(KNAttachment *a, QWidget *p, const char *n) :
+KNComposer::AttachmentPropertiesDlg::AttachmentPropertiesDlg(KNAttachment *a, TQWidget *p, const char *n) :
KDialogBase(p, n, true, i18n("Attachment Properties"), Help|Ok|Cancel, Ok), a_ttachment(a),
n_onTextAsText(false)
{
//init GUI
- QWidget *page=new QWidget(this);
+ TQWidget *page=new TQWidget(this);
setMainWidget(page);
- QVBoxLayout *topL=new QVBoxLayout(page);
+ TQVBoxLayout *topL=new TQVBoxLayout(page);
//file info
- QGroupBox *fileGB=new QGroupBox(i18n("File"), page);
- QGridLayout *fileL=new QGridLayout(fileGB, 3,2, 15,5);
+ TQGroupBox *fileGB=new TQGroupBox(i18n("File"), page);
+ TQGridLayout *fileL=new TQGridLayout(fileGB, 3,2, 15,5);
fileL->addRowSpacing(0, fontMetrics().lineSpacing()-9);
- fileL->addWidget(new QLabel(i18n("Name:"), fileGB) ,1,0);
- fileL->addWidget(new QLabel(QString("<b>%1</b>").arg(a->name()), fileGB), 1,1, Qt::AlignLeft);
- fileL->addWidget(new QLabel(i18n("Size:"), fileGB), 2,0);
- fileL->addWidget(new QLabel(a->contentSize(), fileGB), 2,1, Qt::AlignLeft);
+ fileL->addWidget(new TQLabel(i18n("Name:"), fileGB) ,1,0);
+ fileL->addWidget(new TQLabel(TQString("<b>%1</b>").arg(a->name()), fileGB), 1,1, Qt::AlignLeft);
+ fileL->addWidget(new TQLabel(i18n("Size:"), fileGB), 2,0);
+ fileL->addWidget(new TQLabel(a->contentSize(), fileGB), 2,1, Qt::AlignLeft);
fileL->setColStretch(1,1);
topL->addWidget(fileGB);
//mime info
- QGroupBox *mimeGB=new QGroupBox(i18n("Mime"), page);
- QGridLayout *mimeL=new QGridLayout(mimeGB, 4,2, 15,5);
+ TQGroupBox *mimeGB=new TQGroupBox(i18n("Mime"), page);
+ TQGridLayout *mimeL=new TQGridLayout(mimeGB, 4,2, 15,5);
mimeL->addRowSpacing(0, fontMetrics().lineSpacing()-9);
m_imeType=new KLineEdit(mimeGB);
m_imeType->setText(a->mimeType());
mimeL->addWidget(m_imeType, 1,1);
- mimeL->addWidget(new QLabel(m_imeType, i18n("&Mime-Type:"), mimeGB), 1,0);
+ mimeL->addWidget(new TQLabel(m_imeType, i18n("&Mime-Type:"), mimeGB), 1,0);
d_escription=new KLineEdit(mimeGB);
d_escription->setText(a->description());
mimeL->addWidget(d_escription, 2,1);
- mimeL->addWidget(new QLabel(d_escription, i18n("&Description:"), mimeGB), 2,0);
+ mimeL->addWidget(new TQLabel(d_escription, i18n("&Description:"), mimeGB), 2,0);
- e_ncoding=new QComboBox(false, mimeGB);
+ e_ncoding=new TQComboBox(false, mimeGB);
e_ncoding->insertItem("7Bit");
e_ncoding->insertItem("8Bit");
e_ncoding->insertItem("quoted-printable");
@@ -2594,18 +2594,18 @@ KNComposer::AttachmentPropertiesDlg::AttachmentPropertiesDlg(KNAttachment *a, QW
else
e_ncoding->setCurrentItem(a->cte());
mimeL->addWidget(e_ncoding, 3,1);
- mimeL->addWidget(new QLabel(e_ncoding, i18n("&Encoding:"), mimeGB), 3,0);
+ mimeL->addWidget(new TQLabel(e_ncoding, i18n("&Encoding:"), mimeGB), 3,0);
mimeL->setColStretch(1,1);
topL->addWidget(mimeGB);
//connections
- connect(m_imeType, SIGNAL(textChanged(const QString&)),
- this, SLOT(slotMimeTypeTextChanged(const QString&)));
+ connect(m_imeType, TQT_SIGNAL(textChanged(const TQString&)),
+ this, TQT_SLOT(slotMimeTypeTextChanged(const TQString&)));
//finish GUI
setFixedHeight(sizeHint().height());
- KNHelper::restoreWindowSize("attProperties", this, QSize(300,250));
+ KNHelper::restoreWindowSize("attProperties", this, TQSize(300,250));
setHelp("anc-knode-editor-advanced");
}
@@ -2639,7 +2639,7 @@ void KNComposer::AttachmentPropertiesDlg::accept()
}
-void KNComposer::AttachmentPropertiesDlg::slotMimeTypeTextChanged(const QString &text)
+void KNComposer::AttachmentPropertiesDlg::slotMimeTypeTextChanged(const TQString &text)
{
enableButtonOK( !text.isEmpty() );
if(text.left(5)!="text/") {
diff --git a/knode/kncomposer.h b/knode/kncomposer.h
index 12c2150f8..a44397b81 100644
--- a/knode/kncomposer.h
+++ b/knode/kncomposer.h
@@ -20,8 +20,8 @@
#include <kmainwindow.h>
#include <kdialogbase.h>
#include <keditcl.h>
-#include <qlineedit.h>
-#include <qregexp.h>
+#include <tqlineedit.h>
+#include <tqregexp.h>
#include <kdeversion.h>
#include <keditcl.h>
@@ -52,7 +52,7 @@ class KNComposer : public KMainWindow , virtual public KNodeComposerIface {
// unwraped == original, not rewraped text
// firstEdit==true: place the cursor at the end of the article
- KNComposer(KNLocalArticle *a, const QString &text=QString::null, const QString &sig=QString::null, const QString &unwraped=QString::null, bool firstEdit=false, bool dislikesCopies=false, bool createCopy=false);
+ KNComposer(KNLocalArticle *a, const TQString &text=TQString::null, const TQString &sig=TQString::null, const TQString &unwraped=TQString::null, bool firstEdit=false, bool dislikesCopies=false, bool createCopy=false);
~KNComposer();
void setConfig(bool onlyFonts);
void setMessageMode(MessageMode mode);
@@ -63,21 +63,21 @@ class KNComposer : public KMainWindow , virtual public KNodeComposerIface {
KNLocalArticle* article()const { return a_rticle; }
bool applyChanges();
- void closeEvent(QCloseEvent *e);
+ void closeEvent(TQCloseEvent *e);
//set data from the given article
- void initData(const QString &text);
+ void initData(const TQString &text);
// inserts at cursor position if clear is false, replaces content otherwise
// puts the file content into a box if box==true
// "file" is already open for reading
- void insertFile(QFile *file, bool clear=false, bool box=false, QString boxTitle=QString::null);
+ void insertFile(TQFile *file, bool clear=false, bool box=false, TQString boxTitle=TQString::null);
// ask for a filename, handle network urls
void insertFile(bool clear=false, bool box=false);
- QPopupMenu * popupMenu( const QString& name );
- int listOfResultOfCheckWord( const QStringList & lst , const QString & selectWord);
+ TQPopupMenu * popupMenu( const TQString& name );
+ int listOfResultOfCheckWord( const TQStringList & lst , const TQString & selectWord);
//internal classes
class ComposerView;
@@ -88,13 +88,13 @@ class KNComposer : public KMainWindow , virtual public KNodeComposerIface {
//GUI
ComposerView *v_iew;
- QPopupMenu *a_ttPopup;
+ TQPopupMenu *a_ttPopup;
//Data
composerResult r_esult;
KNLocalArticle *a_rticle;
- QString s_ignature, u_nwraped;
- QCString c_harset;
+ TQString s_ignature, u_nwraped;
+ TQCString c_harset;
MessageMode m_ode;
bool n_eeds8Bit, // false: fall back to us-ascii
v_alidated, // hasValidData was run and found no problems, n_eeds8Bit is valid
@@ -108,8 +108,8 @@ class KNComposer : public KMainWindow , virtual public KNodeComposerIface {
SpellingFilter* mSpellingFilter;
//Attachments
- QValueList<KNAttachment*> mDeletedAttachments;
- QPtrList<KAction> m_listAction;
+ TQValueList<KNAttachment*> mDeletedAttachments;
+ TQPtrList<KAction> m_listAction;
bool a_ttChanged;
//------------------------------ <Actions> -----------------------------
@@ -137,7 +137,7 @@ class KNComposer : public KMainWindow , virtual public KNodeComposerIface {
void slotAttachmentProperties();
void slotToggleDoPost();
void slotToggleDoMail();
- void slotSetCharset(const QString &s);
+ void slotSetCharset(const TQString &s);
void slotSetCharsetKeyboard();
void slotToggleWordWrap();
void slotUndoRewrap();
@@ -153,8 +153,8 @@ class KNComposer : public KMainWindow , virtual public KNodeComposerIface {
//------------------------------ </Actions> ----------------------------
// GUI
- void slotSubjectChanged(const QString &t);
- void slotGroupsChanged(const QString &t);
+ void slotSubjectChanged(const TQString &t);
+ void slotGroupsChanged(const TQString &t);
void slotToBtnClicked();
void slotGroupsBtnClicked();
@@ -163,19 +163,19 @@ class KNComposer : public KMainWindow , virtual public KNodeComposerIface {
void slotCancelEditor();
// attachment list
- void slotAttachmentPopup(KListView*, QListViewItem *it, const QPoint &p);
- void slotAttachmentSelected(QListViewItem *it);
- void slotAttachmentEdit(QListViewItem *it);
- void slotAttachmentRemove(QListViewItem *it);
+ void slotAttachmentPopup(KListView*, TQListViewItem *it, const TQPoint &p);
+ void slotAttachmentSelected(TQListViewItem *it);
+ void slotAttachmentEdit(TQListViewItem *it);
+ void slotAttachmentRemove(TQListViewItem *it);
// spellcheck operation
void slotSpellStarted(KSpell *);
- void slotSpellDone(const QString&);
+ void slotSpellDone(const TQString&);
void slotSpellFinished();
// DND handling
- virtual void slotDragEnterEvent(QDragEnterEvent *);
- virtual void slotDropEvent(QDropEvent *);
+ virtual void slotDragEnterEvent(TQDragEnterEvent *);
+ virtual void slotDropEvent(TQDropEvent *);
void slotUndo();
void slotRedo();
@@ -183,15 +183,15 @@ class KNComposer : public KMainWindow , virtual public KNodeComposerIface {
void slotCopy();
void slotPaste();
void slotSelectAll();
- void slotMisspelling(const QString &text, const QStringList &lst, unsigned int pos);
- void slotCorrected (const QString &oldWord, const QString &newWord, unsigned int pos);
+ void slotMisspelling(const TQString &text, const TQStringList &lst, unsigned int pos);
+ void slotCorrected (const TQString &oldWord, const TQString &newWord, unsigned int pos);
void addRecentAddress();
protected:
// DND handling
- virtual void dragEnterEvent(QDragEnterEvent *);
- virtual void dropEvent(QDropEvent *);
+ virtual void dragEnterEvent(TQDragEnterEvent *);
+ virtual void dropEvent(TQDropEvent *);
signals:
void composerDone(KNComposer*);
@@ -206,21 +206,21 @@ class KNComposer : public KMainWindow , virtual public KNodeComposerIface {
class KNLineEditSpell;
class KNLineEdit;
-class KNComposer::ComposerView : public QSplitter {
+class KNComposer::ComposerView : public TQSplitter {
public:
ComposerView(KNComposer *_composer, const char *n=0);
~ComposerView();
- void focusNextPrevEdit(const QWidget* aCur, bool aNext);
+ void focusNextPrevEdit(const TQWidget* aCur, bool aNext);
void setMessageMode(KNComposer::MessageMode mode);
void showAttachmentView();
void hideAttachmentView();
void showExternalNotification();
void hideExternalNotification();
void restartBackgroundSpellCheck();
- QValueList<QWidget*> mEdtList;
+ TQValueList<TQWidget*> mEdtList;
- QLabel *l_to,
+ TQLabel *l_to,
*l_groups,
*l_fup2;
KNLineEditSpell *s_ubject;
@@ -229,16 +229,16 @@ class KNComposer::ComposerView : public QSplitter {
KNLineEdit *t_o;
KComboBox *f_up2;
- QPushButton *g_roupsBtn,
+ TQPushButton *g_roupsBtn,
*t_oBtn;
Editor *e_dit;
- QGroupBox *n_otification;
- QPushButton *c_ancelEditorBtn;
+ TQGroupBox *n_otification;
+ TQPushButton *c_ancelEditorBtn;
- QWidget *a_ttWidget;
+ TQWidget *a_ttWidget;
AttachmentView *a_ttView;
- QPushButton *a_ttAddBtn,
+ TQPushButton *a_ttAddBtn,
*a_ttRemoveBtn,
*a_ttEditBtn;
KDictSpellingHighlighter *mSpellChecker;
@@ -253,9 +253,9 @@ class KNComposer::Editor : public KEdit {
Q_OBJECT
public:
- Editor(KNComposer::ComposerView *_composerView, KNComposer *_composer, QWidget *parent=0, char *name=0);
+ Editor(KNComposer::ComposerView *_composerView, KNComposer *_composer, TQWidget *parent=0, char *name=0);
~Editor();
- QStringList processedText();
+ TQStringList processedText();
public slots:
void slotPasteAsQuotation();
@@ -271,32 +271,32 @@ class KNComposer::Editor : public KEdit {
protected slots:
void slotSpellStarted( KSpell *);
- void slotSpellDone(const QString &);
+ void slotSpellDone(const TQString &);
void slotSpellFinished();
- void slotMisspelling (const QString &, const QStringList &lst, unsigned int);
+ void slotMisspelling (const TQString &, const TQStringList &lst, unsigned int);
virtual void cut();
virtual void clear();
virtual void del();
- void slotAddSuggestion( const QString &, const QStringList &lst, unsigned int );
+ void slotAddSuggestion( const TQString &, const TQStringList &lst, unsigned int );
signals:
- void sigDragEnterEvent(QDragEnterEvent *);
- void sigDropEvent(QDropEvent *);
+ void sigDragEnterEvent(TQDragEnterEvent *);
+ void sigDropEvent(TQDropEvent *);
protected:
// DND handling
- virtual void contentsDragEnterEvent(QDragEnterEvent *);
- virtual void contentsDropEvent(QDropEvent *);
- virtual void contentsContextMenuEvent( QContextMenuEvent *e );
- virtual void keyPressEvent ( QKeyEvent *e);
+ virtual void contentsDragEnterEvent(TQDragEnterEvent *);
+ virtual void contentsDropEvent(TQDropEvent *);
+ virtual void contentsContextMenuEvent( TQContextMenuEvent *e );
+ virtual void keyPressEvent ( TQKeyEvent *e);
- virtual bool eventFilter(QObject*, QEvent*);
+ virtual bool eventFilter(TQObject*, TQEvent*);
private:
KNComposer *m_composer;
KNComposer::ComposerView *m_composerView;
KSpell *spell;
- QMap<QString,QStringList> m_replacements;
- QRegExp m_bound;
+ TQMap<TQString,TQStringList> m_replacements;
+ TQRegExp m_bound;
};
@@ -305,14 +305,14 @@ class KNComposer::AttachmentView : public KListView {
Q_OBJECT
public:
- AttachmentView(QWidget *parent, char *name=0);
+ AttachmentView(TQWidget *parent, char *name=0);
~AttachmentView();
protected:
- void keyPressEvent( QKeyEvent *e );
+ void keyPressEvent( TQKeyEvent *e );
signals:
- void delPressed ( QListViewItem * ); // the user used Key_Delete on a list view item
+ void delPressed ( TQListViewItem * ); // the user used Key_Delete on a list view item
};
@@ -332,7 +332,7 @@ class KNComposer::AttachmentPropertiesDlg : public KDialogBase {
Q_OBJECT
public:
- AttachmentPropertiesDlg( KNAttachment *a, QWidget *p=0, const char *n=0);
+ AttachmentPropertiesDlg( KNAttachment *a, TQWidget *p=0, const char *n=0);
~AttachmentPropertiesDlg();
void apply();
@@ -340,14 +340,14 @@ class KNComposer::AttachmentPropertiesDlg : public KDialogBase {
protected:
KLineEdit *m_imeType,
*d_escription;
- QComboBox *e_ncoding;
+ TQComboBox *e_ncoding;
KNAttachment *a_ttachment;
bool n_onTextAsText;
protected slots:
void accept();
- void slotMimeTypeTextChanged(const QString &text);
+ void slotMimeTypeTextChanged(const TQString &text);
};
//-----------------------------------------------------------------------------
@@ -357,13 +357,13 @@ class KNLineEdit : public KABC::AddressLineEdit
typedef KABC::AddressLineEdit KNLineEditInherited;
public:
- KNLineEdit(KNComposer::ComposerView *_composerView, bool useCompletion, QWidget *parent = 0,
+ KNLineEdit(KNComposer::ComposerView *_composerView, bool useCompletion, TQWidget *parent = 0,
const char *name = 0);
protected:
// Inherited. Always called by the parent when this widget is created.
virtual void loadAddresses();
- void keyPressEvent(QKeyEvent *e);
- virtual QPopupMenu *createPopupMenu();
+ void keyPressEvent(TQKeyEvent *e);
+ virtual TQPopupMenu *createPopupMenu();
private slots:
void editRecentAddresses();
private:
@@ -374,11 +374,11 @@ class KNLineEditSpell : public KNLineEdit
{
Q_OBJECT
public:
- KNLineEditSpell(KNComposer::ComposerView *_composerView, bool useCompletion,QWidget * parent, const char * name = 0);
+ KNLineEditSpell(KNComposer::ComposerView *_composerView, bool useCompletion,TQWidget * parent, const char * name = 0);
void highLightWord( unsigned int length, unsigned int pos );
- void spellCheckDone( const QString &s );
- void spellCheckerMisspelling( const QString &text, const QStringList &, unsigned int pos);
- void spellCheckerCorrected( const QString &old, const QString &corr, unsigned int pos);
+ void spellCheckDone( const TQString &s );
+ void spellCheckerMisspelling( const TQString &text, const TQStringList &, unsigned int pos);
+ void spellCheckerCorrected( const TQString &old, const TQString &corr, unsigned int pos);
};
#endif
diff --git a/knode/knconfig.cpp b/knode/knconfig.cpp
index cadf402b8..85606d89d 100644
--- a/knode/knconfig.cpp
+++ b/knode/knconfig.cpp
@@ -16,7 +16,7 @@
#include <stdlib.h>
-#include <qtextcodec.h>
+#include <tqtextcodec.h>
#include <ksimpleconfig.h>
#include <kmessagebox.h>
@@ -75,7 +75,7 @@ void KNConfig::Identity::saveConfig(KConfigBase *c)
c->writeEntry("Reply-To", r_eplyTo);
c->writeEntry("Mail-Copies-To", m_ailCopiesTo);
c->writeEntry("Org", o_rga);
- c->writeEntry("SigningKey", QString(s_igningKey));
+ c->writeEntry("SigningKey", TQString(s_igningKey));
c->writeEntry("UseSigFile", u_seSigFile);
c->writeEntry("UseSigGenerator",u_seSigGenerator);
c->writePathEntry("sigFile", s_igPath);
@@ -110,17 +110,17 @@ bool KNConfig::Identity::emailIsValid()
}
-QString KNConfig::Identity::getSignature()
+TQString KNConfig::Identity::getSignature()
{
- s_igContents = QString::null; // don't cache file contents
- s_igStdErr = QString::null;
+ s_igContents = TQString::null; // don't cache file contents
+ s_igStdErr = TQString::null;
if (u_seSigFile) {
if(!s_igPath.isEmpty()) {
if (!u_seSigGenerator) {
- QFile f(s_igPath);
+ TQFile f(s_igPath);
if(f.open(IO_ReadOnly)) {
- QTextStream ts(&f);
+ TQTextStream ts(&f);
while(!ts.atEnd()) {
s_igContents += ts.readLine();
if (!ts.atEnd())
@@ -134,12 +134,12 @@ QString KNConfig::Identity::getSignature()
KProcess process;
// construct command line...
- QStringList command = QStringList::split(' ',s_igPath);
- for ( QStringList::Iterator it = command.begin(); it != command.end(); ++it )
+ TQStringList command = TQStringList::split(' ',s_igPath);
+ for ( TQStringList::Iterator it = command.begin(); it != command.end(); ++it )
process << (*it);
- connect(&process, SIGNAL(receivedStdout(KProcess *, char *, int)), SLOT(slotReceiveStdout(KProcess *, char *, int)));
- connect(&process, SIGNAL(receivedStderr(KProcess *, char *, int)), SLOT(slotReceiveStderr(KProcess *, char *, int)));
+ connect(&process, TQT_SIGNAL(receivedStdout(KProcess *, char *, int)), TQT_SLOT(slotReceiveStdout(KProcess *, char *, int)));
+ connect(&process, TQT_SIGNAL(receivedStderr(KProcess *, char *, int)), TQT_SLOT(slotReceiveStderr(KProcess *, char *, int)));
if (!process.start(KProcess::Block,KProcess::AllOutput))
KMessageBox::error(knGlobals.topWidget, i18n("Cannot run the signature generator."));
@@ -158,13 +158,13 @@ QString KNConfig::Identity::getSignature()
void KNConfig::Identity::slotReceiveStdout(KProcess *, char *buffer, int buflen)
{
- s_igContents.append(QString::fromLocal8Bit(buffer,buflen));
+ s_igContents.append(TQString::fromLocal8Bit(buffer,buflen));
}
void KNConfig::Identity::slotReceiveStderr(KProcess *, char *buffer, int buflen)
{
- s_igStdErr.append(QString::fromLocal8Bit(buffer,buflen));
+ s_igStdErr.append(TQString::fromLocal8Bit(buffer,buflen));
}
@@ -179,7 +179,7 @@ KNConfig::Appearance::Appearance()
//colors
u_seColors=c->readBoolEntry("customColors", false);
- QColor defCol = defaultColor( background );
+ TQColor defCol = defaultColor( background );
c_olors[background] = c->readColorEntry( "backgroundColor", &defCol );
c_olorNames[background] = i18n("Background");
@@ -242,7 +242,7 @@ KNConfig::Appearance::Appearance()
//fonts
u_seFonts = c->readBoolEntry("customFonts", false);
- QFont defFont=KGlobalSettings::generalFont();
+ TQFont defFont=KGlobalSettings::generalFont();
f_onts[article]=c->readFontEntry("articleFont",&defFont);
f_ontNames[article]=i18n("Article Body");
@@ -319,7 +319,7 @@ void KNConfig::Appearance::save()
}
-QColor KNConfig::Appearance::backgroundColor() const
+TQColor KNConfig::Appearance::backgroundColor() const
{
if(u_seColors)
return c_olors[background];
@@ -328,7 +328,7 @@ QColor KNConfig::Appearance::backgroundColor() const
}
-QColor KNConfig::Appearance::alternateBackgroundColor() const
+TQColor KNConfig::Appearance::alternateBackgroundColor() const
{
if(u_seColors)
return c_olors[alternateBackground];
@@ -337,7 +337,7 @@ QColor KNConfig::Appearance::alternateBackgroundColor() const
}
-QColor KNConfig::Appearance::textColor() const
+TQColor KNConfig::Appearance::textColor() const
{
if(u_seColors)
return c_olors[normalText];
@@ -346,7 +346,7 @@ QColor KNConfig::Appearance::textColor() const
}
-QColor KNConfig::Appearance::quoteColor( int depth ) const
+TQColor KNConfig::Appearance::quoteColor( int depth ) const
{
if ( u_seColors )
return c_olors[quoted1 + depth];
@@ -355,7 +355,7 @@ QColor KNConfig::Appearance::quoteColor( int depth ) const
}
-QColor KNConfig::Appearance::linkColor() const
+TQColor KNConfig::Appearance::linkColor() const
{
if(u_seColors)
return c_olors[url];
@@ -365,7 +365,7 @@ QColor KNConfig::Appearance::linkColor() const
}
-QColor KNConfig::Appearance::unreadThreadColor() const
+TQColor KNConfig::Appearance::unreadThreadColor() const
{
if(u_seColors)
return c_olors[unreadThread];
@@ -374,7 +374,7 @@ QColor KNConfig::Appearance::unreadThreadColor() const
}
-QColor KNConfig::Appearance::readThreadColor() const
+TQColor KNConfig::Appearance::readThreadColor() const
{
if(u_seColors)
return c_olors[readThread];
@@ -383,7 +383,7 @@ QColor KNConfig::Appearance::readThreadColor() const
}
-QColor KNConfig::Appearance::unreadArticleColor() const
+TQColor KNConfig::Appearance::unreadArticleColor() const
{
if(u_seColors)
return c_olors[unreadArticle];
@@ -392,7 +392,7 @@ QColor KNConfig::Appearance::unreadArticleColor() const
}
-QColor KNConfig::Appearance::readArticleColor() const
+TQColor KNConfig::Appearance::readArticleColor() const
{
if(u_seColors)
return c_olors[readArticle];
@@ -401,7 +401,7 @@ QColor KNConfig::Appearance::readArticleColor() const
}
-QFont KNConfig::Appearance::articleFont() const
+TQFont KNConfig::Appearance::articleFont() const
{
if(u_seFonts)
return f_onts[article];
@@ -410,7 +410,7 @@ QFont KNConfig::Appearance::articleFont() const
}
-QFont KNConfig::Appearance::articleFixedFont() const
+TQFont KNConfig::Appearance::articleFixedFont() const
{
if(u_seFonts)
return f_onts[articleFixed];
@@ -419,7 +419,7 @@ QFont KNConfig::Appearance::articleFixedFont() const
}
-QFont KNConfig::Appearance::composerFont() const
+TQFont KNConfig::Appearance::composerFont() const
{
if(u_seFonts)
return f_onts[composer];
@@ -428,7 +428,7 @@ QFont KNConfig::Appearance::composerFont() const
}
-QFont KNConfig::Appearance::groupListFont() const
+TQFont KNConfig::Appearance::groupListFont() const
{
if(u_seFonts)
return f_onts[groupList];
@@ -437,7 +437,7 @@ QFont KNConfig::Appearance::groupListFont() const
}
-QFont KNConfig::Appearance::articleListFont() const
+TQFont KNConfig::Appearance::articleListFont() const
{
if(u_seFonts)
return f_onts[articleList];
@@ -446,7 +446,7 @@ QFont KNConfig::Appearance::articleListFont() const
}
-QColor KNConfig::Appearance::defaultColor(int i) const
+TQColor KNConfig::Appearance::defaultColor(int i) const
{
// defaults should match libkdepim/csshelper.cpp
switch(i) {
@@ -458,11 +458,11 @@ QColor KNConfig::Appearance::defaultColor(int i) const
return KGlobalSettings::alternateBackgroundColor();
case quoted1:
- return QColor( 0x00, 0x80, 0x00 );
+ return TQColor( 0x00, 0x80, 0x00 );
case quoted2:
- return QColor( 0x00, 0x70, 0x00 );
+ return TQColor( 0x00, 0x70, 0x00 );
case quoted3:
- return QColor( 0x00, 0x60, 0x00 );
+ return TQColor( 0x00, 0x60, 0x00 );
case normalText:
case unreadThread:
@@ -475,28 +475,28 @@ QColor KNConfig::Appearance::defaultColor(int i) const
return kapp->palette().disabled().text();
case unreadArticle:
- return QColor( 183, 154, 11 );
+ return TQColor( 183, 154, 11 );
case readArticle:
- return QColor( 136, 136, 136 );
+ return TQColor( 136, 136, 136 );
case signOkKeyOk:
- return QColor( 0x40, 0xFF, 0x00 );
+ return TQColor( 0x40, 0xFF, 0x00 );
case signOkKeyBad:
case signWarn:
- return QColor( 0xFF, 0xFF, 0x40 );
+ return TQColor( 0xFF, 0xFF, 0x40 );
case signErr:
return Qt::red;
case htmlWarning:
- return QColor( 0xFF, 0x40, 0x40 );
+ return TQColor( 0xFF, 0x40, 0x40 );
}
return kapp->palette().disabled().text();
}
-QFont KNConfig::Appearance::defaultFont(int i) const
+TQFont KNConfig::Appearance::defaultFont(int i) const
{
if ( i == articleFixed || i == composer )
return KGlobalSettings::fixedFont();
@@ -507,9 +507,9 @@ QFont KNConfig::Appearance::defaultFont(int i) const
void KNConfig::Appearance::recreateLVIcons()
{
- QPixmap tempPix = UserIcon("greyball");
+ TQPixmap tempPix = UserIcon("greyball");
- QImage tempImg=tempPix.convertToImage();
+ TQImage tempImg=tempPix.convertToImage();
KIconEffect::colorize(tempImg, readArticleColor(), 1.0);
i_cons[greyBall].convertFromImage(tempImg);
@@ -697,18 +697,18 @@ void KNConfig::ReadNewsViewer::save()
KNConfig::DisplayedHeaders::DisplayedHeaders()
{
- QString fname( locate("data","knode/headers.rc") );
+ TQString fname( locate("data","knode/headers.rc") );
if (!fname.isNull()) {
KSimpleConfig headerConf(fname,true);
- QStringList headers = headerConf.groupList();
+ TQStringList headers = headerConf.groupList();
headers.remove("<default>");
headers.sort();
KNDisplayedHeader *h;
- QValueList<int> flags;
+ TQValueList<int> flags;
- QStringList::Iterator it;
+ TQStringList::Iterator it;
for( it = headers.begin(); it != headers.end(); ++it ) {
h=createNewHeader();
headerConf.setGroup((*it));
@@ -732,7 +732,7 @@ KNConfig::DisplayedHeaders::DisplayedHeaders()
KNConfig::DisplayedHeaders::~DisplayedHeaders()
{
- for ( QValueList<KNDisplayedHeader*>::Iterator it = mHeaderList.begin(); it != mHeaderList.end(); ++it )
+ for ( TQValueList<KNDisplayedHeader*>::Iterator it = mHeaderList.begin(); it != mHeaderList.end(); ++it )
delete (*it);
}
@@ -744,23 +744,23 @@ void KNConfig::DisplayedHeaders::save()
kdDebug(5003) << "KNConfig::DisplayedHeaders::save()" << endl;
- QString dir(locateLocal("data","knode/"));
+ TQString dir(locateLocal("data","knode/"));
if (dir.isNull()) {
KNHelper::displayInternalFileError();
return;
}
KSimpleConfig headerConf(dir+"headers.rc");
- QStringList oldHeaders = headerConf.groupList();
+ TQStringList oldHeaders = headerConf.groupList();
- QStringList::Iterator oldIt=oldHeaders.begin();
+ TQStringList::Iterator oldIt=oldHeaders.begin();
for( ;oldIt != oldHeaders.end(); ++oldIt ) // remove all old groups
headerConf.deleteGroup((*oldIt)); // find a better way to do it?
- QValueList<int> flags;
+ TQValueList<int> flags;
int idx=0;
- QString group;
+ TQString group;
- for ( QValueList<KNDisplayedHeader*>::Iterator it = mHeaderList.begin(); it != mHeaderList.end(); ++it ) {
+ for ( TQValueList<KNDisplayedHeader*>::Iterator it = mHeaderList.begin(); it != mHeaderList.end(); ++it ) {
group.setNum(idx++);
while (group.length()<3)
group.prepend("0");
@@ -859,7 +859,7 @@ void KNConfig::Scoring::save()
//==============================================================================================================
-KNConfig::XHeader::XHeader(const QString &s)
+KNConfig::XHeader::XHeader(const TQString &s)
{
if(s.left(2)=="X-") {
int pos=s.find(": ");
@@ -885,14 +885,14 @@ KNConfig::PostNewsTechnical::PostNewsTechnical()
c_omposerCharsets=conf->readListEntry("ComposerCharsets");
if (c_omposerCharsets.isEmpty())
- c_omposerCharsets=QStringList::split(',',"us-ascii,utf-8,iso-8859-1,iso-8859-2,"
+ c_omposerCharsets=TQStringList::split(',',"us-ascii,utf-8,iso-8859-1,iso-8859-2,"
"iso-8859-3,iso-8859-4,iso-8859-5,iso-8859-6,iso-8859-7,iso-8859-8,"
"iso-8859-9,iso-8859-10,iso-8859-13,iso-8859-14,iso-8859-15,koi8-r,koi8-u,"
"iso-2022-jp,iso-2022-jp-2,iso-2022-kr,euc-jp,euc-kr,Big5,gb2312");
c_harset=conf->readEntry("Charset").latin1();
if (c_harset.isEmpty()) {
- QCString localeCharset(QTextCodec::codecForLocale()->mimeName());
+ TQCString localeCharset(TQTextCodec::codecForLocale()->mimeName());
// special logic for japanese users:
// "euc-jp" is default encoding for them, but in the news
@@ -912,11 +912,11 @@ KNConfig::PostNewsTechnical::PostNewsTechnical()
d_ontIncludeUA=conf->readBoolEntry("dontIncludeUA", false);
u_seExternalMailer=conf->readBoolEntry("useExternalMailer", false);
- QString dir(locateLocal("data","knode/"));
+ TQString dir(locateLocal("data","knode/"));
if (!dir.isNull()) {
- QFile f(dir+"xheaders");
+ TQFile f(dir+"xheaders");
if(f.open(IO_ReadOnly)) {
- QTextStream ts(&f);
+ TQTextStream ts(&f);
while(!ts.eof())
x_headers.append( XHeader(ts.readLine()) );
@@ -942,21 +942,21 @@ void KNConfig::PostNewsTechnical::save()
conf->setGroup("POSTNEWS");
conf->writeEntry("ComposerCharsets", c_omposerCharsets);
- conf->writeEntry("Charset", QString::fromLatin1(c_harset));
+ conf->writeEntry("Charset", TQString::fromLatin1(c_harset));
conf->writeEntry("8BitEncoding", a_llow8BitBody);
conf->writeEntry("UseOwnCharset", u_seOwnCharset);
conf->writeEntry("generateMId", g_enerateMID);
- conf->writeEntry("MIdhost", QString::fromLatin1(h_ostname));
+ conf->writeEntry("MIdhost", TQString::fromLatin1(h_ostname));
conf->writeEntry("dontIncludeUA", d_ontIncludeUA);
conf->writeEntry("useExternalMailer", u_seExternalMailer);
- QString dir(locateLocal("data","knode/"));
+ TQString dir(locateLocal("data","knode/"));
if (dir.isNull())
KNHelper::displayInternalFileError();
else {
- QFile f(dir+"xheaders");
+ TQFile f(dir+"xheaders");
if(f.open(IO_WriteOnly)) {
- QTextStream ts(&f);
+ TQTextStream ts(&f);
XHeaders::Iterator it;
for(it=x_headers.begin(); it!=x_headers.end(); ++it)
ts << (*it).header() << "\n";
@@ -970,11 +970,11 @@ void KNConfig::PostNewsTechnical::save()
}
-int KNConfig::PostNewsTechnical::indexForCharset(const QCString &str)
+int KNConfig::PostNewsTechnical::indexForCharset(const TQCString &str)
{
int i=0;
bool found=false;
- for ( QStringList::Iterator it = c_omposerCharsets.begin(); it != c_omposerCharsets.end(); ++it ) {
+ for ( TQStringList::Iterator it = c_omposerCharsets.begin(); it != c_omposerCharsets.end(); ++it ) {
if ((*it).lower() == str.lower().data()) {
found = true;
break;
@@ -983,7 +983,7 @@ int KNConfig::PostNewsTechnical::indexForCharset(const QCString &str)
}
if (!found) {
i=0;
- for ( QStringList::Iterator it = c_omposerCharsets.begin(); it != c_omposerCharsets.end(); ++it ) {
+ for ( TQStringList::Iterator it = c_omposerCharsets.begin(); it != c_omposerCharsets.end(); ++it ) {
if ((*it).lower() == c_harset.lower().data()) {
found = true;
break;
@@ -997,15 +997,15 @@ int KNConfig::PostNewsTechnical::indexForCharset(const QCString &str)
}
-QCString KNConfig::PostNewsTechnical::findComposerCharset(QCString cs)
+TQCString KNConfig::PostNewsTechnical::findComposerCharset(TQCString cs)
{
- QCString *ret=findComposerCSCache.find(cs);
+ TQCString *ret=findComposerCSCache.find(cs);
if (ret)
return *ret;
- QCString s;
+ TQCString s;
- QStringList::Iterator it;
+ TQStringList::Iterator it;
for( it = c_omposerCharsets.begin(); it != c_omposerCharsets.end(); ++it ) {
// match by name
if ((*it).lower()==cs.lower().data()) {
@@ -1018,8 +1018,8 @@ QCString KNConfig::PostNewsTechnical::findComposerCharset(QCString cs)
for( it = c_omposerCharsets.begin(); it != c_omposerCharsets.end(); ++it ) {
// match by charset, avoid to return "us-ascii" for iso-8859-1
if ((*it).lower()!="us-ascii") {
- QTextCodec *composerCodec = QTextCodec::codecForName((*it).latin1());
- QTextCodec *csCodec = QTextCodec::codecForName(cs);
+ TQTextCodec *composerCodec = TQTextCodec::codecForName((*it).latin1());
+ TQTextCodec *csCodec = TQTextCodec::codecForName(cs);
if ((composerCodec != 0) &&
(csCodec != 0) &&
(0 == strcmp(composerCodec->name(), csCodec->name()))) {
@@ -1033,7 +1033,7 @@ QCString KNConfig::PostNewsTechnical::findComposerCharset(QCString cs)
if (s.isEmpty())
s = "us-ascii";
- findComposerCSCache.insert(cs, new QCString(s));
+ findComposerCSCache.insert(cs, new TQCString(s));
return s;
}
@@ -1100,7 +1100,7 @@ KNConfig::Cleanup::Cleanup( bool global ) :
// default values for new accounts / groups
d_oExpire( true ), r_emoveUnavailable( true ), p_reserveThr( true ),
e_xpireInterval( 5 ), r_eadMaxAge( 10 ), u_nreadMaxAge( 15 ),
- mGlobal(global), mDefault(!global), mLastExpDate( QDate::currentDate() )
+ mGlobal(global), mDefault(!global), mLastExpDate( TQDate::currentDate() )
{
if (mGlobal) {
KConfig *conf = knGlobals.config();
@@ -1174,7 +1174,7 @@ bool KNConfig::Cleanup::expireToday()
if (!d_oExpire)
return false;
- QDate today = QDate::currentDate();
+ TQDate today = TQDate::currentDate();
if (mLastExpDate == today)
return false;
@@ -1184,7 +1184,7 @@ bool KNConfig::Cleanup::expireToday()
void KNConfig::Cleanup::setLastExpireDate()
{
- mLastExpDate = QDateTime::currentDateTime();
+ mLastExpDate = TQDateTime::currentDateTime();
}
@@ -1193,7 +1193,7 @@ bool KNConfig::Cleanup::compactToday()
if (!d_oCompact)
return false;
- QDate today = QDate::currentDate();
+ TQDate today = TQDate::currentDate();
if (mLastCompDate == today)
return false;
@@ -1203,7 +1203,7 @@ bool KNConfig::Cleanup::compactToday()
void KNConfig::Cleanup::setLastCompactDate()
{
- mLastCompDate = QDateTime::currentDateTime();
+ mLastCompDate = TQDateTime::currentDateTime();
}
diff --git a/knode/knconfig.h b/knode/knconfig.h
index 2248a361c..e2aa682bf 100644
--- a/knode/knconfig.h
+++ b/knode/knconfig.h
@@ -15,12 +15,12 @@
#ifndef KNCONFIG_H
#define KNCONFIG_H
-#include <qasciidict.h>
-#include <qcolor.h>
-#include <qdatetime.h>
-#include <qfont.h>
-#include <qobject.h>
-#include <qpixmap.h>
+#include <tqasciidict.h>
+#include <tqcolor.h>
+#include <tqdatetime.h>
+#include <tqfont.h>
+#include <tqobject.h>
+#include <tqpixmap.h>
#include <kconfig.h>
@@ -63,7 +63,7 @@ class Base {
};
-class KDE_EXPORT Identity : public QObject, public Base {
+class KDE_EXPORT Identity : public TQObject, public Base {
Q_OBJECT
@@ -81,35 +81,35 @@ Q_OBJECT
//personal information
bool hasName() { return (!n_ame.isEmpty()); }
- QString name() const { return n_ame; }
- void setName(const QString &s) { n_ame=s; }
+ TQString name() const { return n_ame; }
+ void setName(const TQString &s) { n_ame=s; }
bool emailIsValid();
bool hasEmail() { return (!e_mail.isEmpty()); }
- QString email() { return e_mail; }
- void setEmail(const QCString &s) { e_mail=s; }
+ TQString email() { return e_mail; }
+ void setEmail(const TQCString &s) { e_mail=s; }
bool hasReplyTo() { return (!r_eplyTo.isEmpty()); }
- QString replyTo() { return r_eplyTo; }
- void setReplyTo(const QString &s) { r_eplyTo=s; }
+ TQString replyTo() { return r_eplyTo; }
+ void setReplyTo(const TQString &s) { r_eplyTo=s; }
bool hasMailCopiesTo() { return (!m_ailCopiesTo.isEmpty()); }
- QString mailCopiesTo() { return m_ailCopiesTo; }
- void setMailCopiesTo(const QString &s) { m_ailCopiesTo=s; }
+ TQString mailCopiesTo() { return m_ailCopiesTo; }
+ void setMailCopiesTo(const TQString &s) { m_ailCopiesTo=s; }
bool hasOrga() { return (!o_rga.isEmpty()); }
- QString orga() const { return o_rga; }
- void setOrga(const QString &s) { o_rga=s; }
+ TQString orga() const { return o_rga; }
+ void setOrga(const TQString &s) { o_rga=s; }
// OpenPGP signing key
bool hasSigningKey() { return (!s_igningKey.isEmpty()); }
- QCString signingKey() { return s_igningKey; }
- void setSigningKey(const QCString &s) { s_igningKey=s;}
+ TQCString signingKey() { return s_igningKey; }
+ void setSigningKey(const TQCString &s) { s_igningKey=s;}
//signature
bool hasSignature() { return ( (u_seSigFile && !s_igPath.isEmpty()) || !s_igText.isEmpty() ); }
bool useSigFile() const { return u_seSigFile; }
bool useSigGenerator()const { return u_seSigGenerator; }
- QString sigPath()const { return s_igPath; }
- QString sigText()const { return s_igText; }
- QString getSignature();
- QString getSigGeneratorStdErr() { return s_igStdErr; }
+ TQString sigPath()const { return s_igPath; }
+ TQString sigText()const { return s_igText; }
+ TQString getSignature();
+ TQString getSigGeneratorStdErr() { return s_igStdErr; }
protected slots:
@@ -117,7 +117,7 @@ Q_OBJECT
void slotReceiveStderr(KProcess *proc, char *buffer, int buflen);
protected:
- QString n_ame,
+ TQString n_ame,
e_mail,
o_rga,
r_eplyTo,
@@ -126,7 +126,7 @@ Q_OBJECT
s_igContents,
s_igStdErr,
s_igPath;
- QCString s_igningKey;
+ TQCString s_igningKey;
bool u_seSigFile,
u_seSigGenerator,
g_lobal;
@@ -160,49 +160,49 @@ class KDE_EXPORT Appearance : public Base {
void save();
- QColor backgroundColor() const;
- QColor alternateBackgroundColor() const;
- QColor textColor() const;
- QColor quoteColor( int depth ) const;
- QColor linkColor() const;
- QColor unreadThreadColor() const;
- QColor readThreadColor() const;
- QColor unreadArticleColor() const;
- QColor readArticleColor() const;
- QColor signOkKeyOkColor() const { return u_seColors ? c_olors[signOkKeyOk] : defaultColor( signOkKeyOk ); }
- QColor signOkKeyBadColor() const { return u_seColors ? c_olors[signOkKeyBad] : defaultColor( signOkKeyBad ); }
- QColor signWarnColor() const { return u_seColors ? c_olors[signWarn] : defaultColor( signWarn ); }
- QColor signErrColor() const { return u_seColors ? c_olors[signErr] : defaultColor( signErr ); }
- QColor htmlWarningColor() const { return u_seColors ? c_olors[htmlWarning] : defaultColor( htmlWarning ); }
-
- QFont articleFont() const;
- QFont articleFixedFont() const;
- QFont composerFont() const;
- QFont groupListFont() const;
- QFont articleListFont() const;
-
- const QPixmap& icon(IconIndex i) { return i_cons[i]; }
+ TQColor backgroundColor() const;
+ TQColor alternateBackgroundColor() const;
+ TQColor textColor() const;
+ TQColor quoteColor( int depth ) const;
+ TQColor linkColor() const;
+ TQColor unreadThreadColor() const;
+ TQColor readThreadColor() const;
+ TQColor unreadArticleColor() const;
+ TQColor readArticleColor() const;
+ TQColor signOkKeyOkColor() const { return u_seColors ? c_olors[signOkKeyOk] : defaultColor( signOkKeyOk ); }
+ TQColor signOkKeyBadColor() const { return u_seColors ? c_olors[signOkKeyBad] : defaultColor( signOkKeyBad ); }
+ TQColor signWarnColor() const { return u_seColors ? c_olors[signWarn] : defaultColor( signWarn ); }
+ TQColor signErrColor() const { return u_seColors ? c_olors[signErr] : defaultColor( signErr ); }
+ TQColor htmlWarningColor() const { return u_seColors ? c_olors[htmlWarning] : defaultColor( htmlWarning ); }
+
+ TQFont articleFont() const;
+ TQFont articleFixedFont() const;
+ TQFont composerFont() const;
+ TQFont groupListFont() const;
+ TQFont articleListFont() const;
+
+ const TQPixmap& icon(IconIndex i) { return i_cons[i]; }
protected:
- const QColor& color( int i ) const { return c_olors[i]; }
- const QString& colorName( int i ) const { return c_olorNames[i]; }
+ const TQColor& color( int i ) const { return c_olors[i]; }
+ const TQString& colorName( int i ) const { return c_olorNames[i]; }
int colorCount() const { return COL_CNT; }
- QColor defaultColor(int i) const;
+ TQColor defaultColor(int i) const;
- const QFont& font(int i) const { return f_onts[i]; }
- const QString& fontName(int i) const { return f_ontNames[i]; }
+ const TQFont& font(int i) const { return f_onts[i]; }
+ const TQString& fontName(int i) const { return f_ontNames[i]; }
int fontCount() const { return FNT_CNT; }
- QFont defaultFont(int) const;
+ TQFont defaultFont(int) const;
void recreateLVIcons();
bool u_seColors,
u_seFonts;
- QColor c_olors[COL_CNT];
- QString c_olorNames[COL_CNT];
- QFont f_onts[FNT_CNT];
- QString f_ontNames[FNT_CNT];
- QPixmap i_cons[ICON_CNT];
+ TQColor c_olors[COL_CNT];
+ TQString c_olorNames[COL_CNT];
+ TQFont f_onts[FNT_CNT];
+ TQString f_ontNames[FNT_CNT];
+ TQPixmap i_cons[ICON_CNT];
};
@@ -237,7 +237,7 @@ class KDE_EXPORT ReadNewsGeneral : public Base {
void setShowThreads(bool b) { d_irty=true; s_howThreads=b;}
KMime::DateFormatter::FormatType dateFormat() const { return mDateFormat; }
- QString dateCustomFormat() const { return mDateCustomFormat; }
+ TQString dateCustomFormat() const { return mDateCustomFormat; }
void setShowLines( bool show ) { d_irty = true; s_howLines = show; }
void setShowScore( bool show ) { d_irty = true; s_howScore = show; }
@@ -260,7 +260,7 @@ class KDE_EXPORT ReadNewsGeneral : public Base {
a_rtCacheSize;
KMime::DateFormatter::FormatType mDateFormat;
- QString mDateCustomFormat;
+ TQString mDateCustomFormat;
};
@@ -308,7 +308,7 @@ class KDE_EXPORT ReadNewsViewer : public Base {
bool showSignature()const { return s_howSig; }
bool interpretFormatTags()const { return i_nterpretFormatTags; }
void setInterpretFormatTags( bool f ) { d_irty = true; i_nterpretFormatTags = f; }
- QString quoteCharacters()const { return q_uoteCharacters; }
+ TQString quoteCharacters()const { return q_uoteCharacters; }
bool openAttachmentsOnClick()const { return o_penAtt; }
bool showAlternativeContents()const { return s_howAlts; }
@@ -332,7 +332,7 @@ class KDE_EXPORT ReadNewsViewer : public Base {
u_seFixedFont,
mShowRefBar,
mAlwaysShowHTML;
- QString q_uoteCharacters;
+ TQString q_uoteCharacters;
};
@@ -349,11 +349,11 @@ class KDE_EXPORT DisplayedHeaders : public Base
void up(KNDisplayedHeader *h);
void down(KNDisplayedHeader *h);
- QValueList<KNDisplayedHeader*> headers() const { return mHeaderList; }
+ TQValueList<KNDisplayedHeader*> headers() const { return mHeaderList; }
protected:
- QValueList<KNDisplayedHeader*> mHeaderList;
+ TQValueList<KNDisplayedHeader*> mHeaderList;
};
@@ -382,22 +382,22 @@ class KDE_EXPORT XHeader {
public:
XHeader() {}
- XHeader(const QString &s);
+ XHeader(const TQString &s);
XHeader(const XHeader &s) { n_ame=s.n_ame; v_alue=s.v_alue; }
~XHeader() {}
XHeader& operator=(const XHeader &s) { n_ame=s.n_ame; v_alue=s.v_alue; return (*this); }
- QCString name() { return n_ame; }
- QString value() { return v_alue; }
- QString header() { return (QString::fromLatin1(("X-"+n_ame+": "))+v_alue); }
+ TQCString name() { return n_ame; }
+ TQString value() { return v_alue; }
+ TQString header() { return (TQString::fromLatin1(("X-"+n_ame+": "))+v_alue); }
protected:
- QCString n_ame;
- QString v_alue;
+ TQCString n_ame;
+ TQString v_alue;
};
-typedef QValueList<XHeader> XHeaders;
+typedef TQValueList<XHeader> XHeaders;
class KDE_EXPORT PostNewsTechnical : public Base {
@@ -411,23 +411,23 @@ class KDE_EXPORT PostNewsTechnical : public Base {
void save();
- QCString charset() const { return c_harset; }
- QStringList composerCharsets() { return c_omposerCharsets; }
- int indexForCharset(const QCString &str);
- QCString findComposerCharset(QCString cs);
+ TQCString charset() const { return c_harset; }
+ TQStringList composerCharsets() { return c_omposerCharsets; }
+ int indexForCharset(const TQCString &str);
+ TQCString findComposerCharset(TQCString cs);
bool allow8BitBody() const { return a_llow8BitBody; }
bool useOwnCharset() const { return u_seOwnCharset; }
bool generateMessageID()const { return g_enerateMID; }
- QCString hostname()const { return h_ostname; }
+ TQCString hostname()const { return h_ostname; }
XHeaders& xHeaders() { return x_headers; }
bool noUserAgent()const { return d_ontIncludeUA; }
bool useExternalMailer()const { return u_seExternalMailer; }
protected:
- QCString c_harset,
+ TQCString c_harset,
h_ostname;
- QStringList c_omposerCharsets;
+ TQStringList c_omposerCharsets;
bool a_llow8BitBody,
u_seOwnCharset,
@@ -437,7 +437,7 @@ class KDE_EXPORT PostNewsTechnical : public Base {
XHeaders x_headers;
- QAsciiDict<QCString> findComposerCSCache;
+ TQAsciiDict<TQCString> findComposerCSCache;
};
@@ -455,12 +455,12 @@ class PostNewsComposer : public Base {
int maxLineLength()const { return m_axLen; }
bool appendOwnSignature()const { return a_ppSig; }
- QString intro()const { return i_ntro; }
+ TQString intro()const { return i_ntro; }
bool rewrap()const { return r_ewrap; }
bool includeSignature()const { return i_ncSig; }
bool cursorOnTop()const { return c_ursorOnTop; }
- QString externalEditor()const { return e_xternalEditor; }
+ TQString externalEditor()const { return e_xternalEditor; }
bool useExternalEditor()const { return u_seExtEditor; }
@@ -472,7 +472,7 @@ class PostNewsComposer : public Base {
i_ncSig,
c_ursorOnTop,
u_seExtEditor;
- QString i_ntro,
+ TQString i_ntro,
e_xternalEditor;
};
@@ -526,7 +526,7 @@ class KDE_EXPORT Cleanup : public Base {
/** use default cleanup configuration */
bool mDefault;
/** last expiration and last comapction date */
- QDateTime mLastExpDate, mLastCompDate;
+ TQDateTime mLastExpDate, mLastCompDate;
};
diff --git a/knode/knconfigmanager.cpp b/knode/knconfigmanager.cpp
index b117f3c49..ad77b0235 100644
--- a/knode/knconfigmanager.cpp
+++ b/knode/knconfigmanager.cpp
@@ -21,7 +21,7 @@
#include <klocale.h>
#include <kwin.h>
-#include <qhbox.h>
+#include <tqhbox.h>
#include "utilities.h"
#include "knglobals.h"
@@ -30,8 +30,8 @@
#include "knmainwidget.h"
-KNConfigManager::KNConfigManager(QObject *p, const char *n)
- : QObject(p, n), d_ialog(0)
+KNConfigManager::KNConfigManager(TQObject *p, const char *n)
+ : TQObject(p, n), d_ialog(0)
{
i_dentity = new KNConfig::Identity();
a_ppearance = new KNConfig::Appearance();
@@ -67,7 +67,7 @@ void KNConfigManager::configure()
{
if(!d_ialog) {
d_ialog=new KNConfigDialog(knGlobals.topWidget, "Preferences_Dlg");
- connect(d_ialog, SIGNAL(finished()), this, SLOT(slotDialogDone()));
+ connect(d_ialog, TQT_SIGNAL(finished()), this, TQT_SLOT(slotDialogDone()));
d_ialog->show();
}
else
@@ -100,7 +100,7 @@ void KNConfigManager::slotDialogDone()
//===================================================================================================
-KNConfigDialog::KNConfigDialog(QWidget *p, const char *n)
+KNConfigDialog::KNConfigDialog(TQWidget *p, const char *n)
: KCMultiDialog(p, n)
{
addModule ( "knode_config_identity", false );
@@ -113,7 +113,7 @@ KNConfigDialog::KNConfigDialog(QWidget *p, const char *n)
setHelp("anc-setting-your-identity");
- connect(this, SIGNAL(configCommitted()), this, SLOT(slotConfigCommitted()));
+ connect(this, TQT_SIGNAL(configCommitted()), this, TQT_SLOT(slotConfigCommitted()));
}
diff --git a/knode/knconfigmanager.h b/knode/knconfigmanager.h
index 6f0db527d..5a002a933 100644
--- a/knode/knconfigmanager.h
+++ b/knode/knconfigmanager.h
@@ -24,12 +24,12 @@
class KNConfigDialog;
-class KNConfigManager : QObject {
+class KNConfigManager : TQObject {
Q_OBJECT
public:
- KNConfigManager(QObject *p=0, const char *n=0);
+ KNConfigManager(TQObject *p=0, const char *n=0);
~KNConfigManager();
KNConfig::Identity* identity() const { return i_dentity; }
@@ -73,7 +73,7 @@ class KNConfigDialog : public KCMultiDialog {
Q_OBJECT
public:
- KNConfigDialog(QWidget *p=0, const char *n=0);
+ KNConfigDialog(TQWidget *p=0, const char *n=0);
protected slots:
void slotConfigCommitted();
diff --git a/knode/knconfigpages.cpp b/knode/knconfigpages.cpp
index c7d0c0758..030838acb 100644
--- a/knode/knconfigpages.cpp
+++ b/knode/knconfigpages.cpp
@@ -11,7 +11,7 @@
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, US
*/
-#include <qlayout.h>
+#include <tqlayout.h>
#include <kcmodule.h>
#include <kdebug.h>
@@ -28,17 +28,17 @@
//
// common config page with tabs (code mostly taken from kmail)
//
-KNConfig::BasePageWithTabs::BasePageWithTabs( QWidget * parent, const char * name )
+KNConfig::BasePageWithTabs::BasePageWithTabs( TQWidget * parent, const char * name )
: KCModule( parent, name )
{
- QVBoxLayout *vlay = new QVBoxLayout( this, 0, KDialog::spacingHint() );
- mTabWidget = new QTabWidget( this );
+ TQVBoxLayout *vlay = new TQVBoxLayout( this, 0, KDialog::spacingHint() );
+ mTabWidget = new TQTabWidget( this );
vlay->addWidget( mTabWidget );
}
-void KNConfig::BasePageWithTabs::addTab( KCModule* tab, const QString & title ) {
+void KNConfig::BasePageWithTabs::addTab( KCModule* tab, const TQString & title ) {
mTabWidget->addTab( tab, title );
- connect( tab, SIGNAL(changed( bool )), this, SIGNAL(changed( bool )) );
+ connect( tab, TQT_SIGNAL(changed( bool )), this, TQT_SIGNAL(changed( bool )) );
}
void KNConfig::BasePageWithTabs::load() {
@@ -72,7 +72,7 @@ void KNConfig::BasePageWithTabs::defaults() {
//
extern "C"
{
- KDE_EXPORT KCModule *create_knode_config_identity( QWidget *parent, const char * )
+ KDE_EXPORT KCModule *create_knode_config_identity( TQWidget *parent, const char * )
{
KNConfig::IdentityWidget *page = new KNConfig::IdentityWidget(
knGlobals.configManager()->identity(),
@@ -89,14 +89,14 @@ extern "C"
//
extern "C"
{
- KCModule *create_knode_config_accounts( QWidget *parent, const char * )
+ KCModule *create_knode_config_accounts( TQWidget *parent, const char * )
{
KNConfig::AccountsPage *page = new KNConfig::AccountsPage( parent, "kcmknode_config_accounts" );
return page;
}
}
-KNConfig::AccountsPage::AccountsPage(QWidget *parent, const char *name)
+KNConfig::AccountsPage::AccountsPage(TQWidget *parent, const char *name)
: BasePageWithTabs(parent, name) {
addTab(new KNConfig::NntpAccountListWidget(this), i18n("Newsgroup Servers"));
@@ -110,7 +110,7 @@ KNConfig::AccountsPage::AccountsPage(QWidget *parent, const char *name)
//
extern "C"
{
- KCModule *create_knode_config_appearance( QWidget *parent, const char * )
+ KCModule *create_knode_config_appearance( TQWidget *parent, const char * )
{
KNConfig::AppearanceWidget *page = new KNConfig::AppearanceWidget( parent, "kcmknode_config_appearance" );
return page;
@@ -124,14 +124,14 @@ extern "C"
//
extern "C"
{
- KCModule *create_knode_config_read_news( QWidget *parent, const char * )
+ KCModule *create_knode_config_read_news( TQWidget *parent, const char * )
{
KNConfig::ReadNewsPage *page = new KNConfig::ReadNewsPage( parent, "kcmknode_config_read_news" );
return page;
}
}
-KNConfig::ReadNewsPage::ReadNewsPage(QWidget *parent, const char *name)
+KNConfig::ReadNewsPage::ReadNewsPage(TQWidget *parent, const char *name)
: BasePageWithTabs(parent, name) {
KNConfigManager *cfgMgr = knGlobals.configManager();
@@ -150,14 +150,14 @@ KNConfig::ReadNewsPage::ReadNewsPage(QWidget *parent, const char *name)
//
extern "C"
{
- KCModule *create_knode_config_post_news( QWidget *parent, const char * )
+ KCModule *create_knode_config_post_news( TQWidget *parent, const char * )
{
KNConfig::PostNewsPage *page = new KNConfig::PostNewsPage( parent, "kcmknode_config_post_news" );
return page;
}
}
-KNConfig::PostNewsPage::PostNewsPage(QWidget *parent, const char *name)
+KNConfig::PostNewsPage::PostNewsPage(TQWidget *parent, const char *name)
: BasePageWithTabs(parent, name) {
KNConfigManager *cfgMgr = knGlobals.configManager();
@@ -173,7 +173,7 @@ KNConfig::PostNewsPage::PostNewsPage(QWidget *parent, const char *name)
//
extern "C"
{
- KCModule *create_knode_config_privacy( QWidget *parent, const char * )
+ KCModule *create_knode_config_privacy( TQWidget *parent, const char * )
{
KNConfig::PrivacyWidget *page = new KNConfig::PrivacyWidget( parent, "kcmknode_config_privacy" );
return page;
@@ -187,7 +187,7 @@ extern "C"
//
extern "C"
{
- KCModule *create_knode_config_cleanup( QWidget *parent, const char * )
+ KCModule *create_knode_config_cleanup( TQWidget *parent, const char * )
{
KNConfig::CleanupWidget *page = new KNConfig::CleanupWidget( parent, "kcmknode_config_cleanup" );
return page;
diff --git a/knode/knconfigpages.h b/knode/knconfigpages.h
index c76432b78..c1426fbc8 100644
--- a/knode/knconfigpages.h
+++ b/knode/knconfigpages.h
@@ -32,7 +32,7 @@ namespace KNConfig {
class KDE_EXPORT BasePageWithTabs : public KCModule {
Q_OBJECT
public:
- BasePageWithTabs( QWidget * parent=0, const char * name=0 );
+ BasePageWithTabs( TQWidget * parent=0, const char * name=0 );
~BasePageWithTabs() {};
virtual void load();
@@ -40,10 +40,10 @@ class KDE_EXPORT BasePageWithTabs : public KCModule {
virtual void defaults();
protected:
- void addTab( KCModule* tab, const QString & title );
+ void addTab( KCModule* tab, const TQString & title );
private:
- QTabWidget *mTabWidget;
+ TQTabWidget *mTabWidget;
};
@@ -53,7 +53,7 @@ class AccountsPage : public BasePageWithTabs {
Q_OBJECT
public:
- AccountsPage(QWidget *parent = 0, const char *name = 0);
+ AccountsPage(TQWidget *parent = 0, const char *name = 0);
};
@@ -62,7 +62,7 @@ class KDE_EXPORT ReadNewsPage : public BasePageWithTabs {
Q_OBJECT
public:
- ReadNewsPage(QWidget *parent = 0, const char *name = 0);
+ ReadNewsPage(TQWidget *parent = 0, const char *name = 0);
};
// post news page
@@ -70,7 +70,7 @@ class KDE_EXPORT PostNewsPage : public BasePageWithTabs {
Q_OBJECT
public:
- PostNewsPage(QWidget *parent = 0, const char *name = 0);
+ PostNewsPage(TQWidget *parent = 0, const char *name = 0);
};
diff --git a/knode/knconfigwidgets.cpp b/knode/knconfigwidgets.cpp
index 72d8f366c..91fba601e 100644
--- a/knode/knconfigwidgets.cpp
+++ b/knode/knconfigwidgets.cpp
@@ -13,10 +13,10 @@
*/
-#include <qvbox.h>
-#include <qpainter.h>
-#include <qwhatsthis.h>
-#include <qlabel.h>
+#include <tqvbox.h>
+#include <tqpainter.h>
+#include <tqwhatsthis.h>
+#include <tqlabel.h>
#include <klocale.h>
#include <knumvalidator.h>
@@ -50,128 +50,128 @@
#include <kpgp.h>
-KNConfig::IdentityWidget::IdentityWidget( Identity *d, QWidget *p, const char *n ) :
+KNConfig::IdentityWidget::IdentityWidget( Identity *d, TQWidget *p, const char *n ) :
KCModule( p, n ),
d_ata( d )
{
- QString msg;
+ TQString msg;
- QGridLayout *topL=new QGridLayout(this, 11, 3, 5,5);
+ TQGridLayout *topL=new TQGridLayout(this, 11, 3, 5,5);
n_ame=new KLineEdit(this);
- QLabel *l=new QLabel(n_ame, i18n("&Name:"), this);
+ TQLabel *l=new TQLabel(n_ame, i18n("&Name:"), this);
topL->addWidget(l, 0,0);
topL->addMultiCellWidget(n_ame, 0,0, 1,2);
msg = i18n("<qt><p>Your name as it will appear to others reading your articles.</p>"
"<p>Ex: <b>John Stuart Masterson III</b>.</p></qt>");
- QWhatsThis::add( n_ame, msg );
- QWhatsThis::add( l, msg );
- connect( n_ame, SIGNAL(textChanged(const QString&)), SLOT(changed()) );
+ TQWhatsThis::add( n_ame, msg );
+ TQWhatsThis::add( l, msg );
+ connect( n_ame, TQT_SIGNAL(textChanged(const TQString&)), TQT_SLOT(changed()) );
o_rga=new KLineEdit(this);
- l=new QLabel(o_rga, i18n("Organi&zation:"), this);
+ l=new TQLabel(o_rga, i18n("Organi&zation:"), this);
topL->addWidget(l, 1,0);
topL->addMultiCellWidget(o_rga, 1,1, 1,2);
msg = i18n( "<qt><p>The name of the organization you work for.</p>"
"<p>Ex: <b>KNode, Inc</b>.</p></qt>" );
- QWhatsThis::add( o_rga, msg );
- QWhatsThis::add( l, msg );
- connect( o_rga, SIGNAL(textChanged(const QString&)), SLOT(changed()) );
+ TQWhatsThis::add( o_rga, msg );
+ TQWhatsThis::add( l, msg );
+ connect( o_rga, TQT_SIGNAL(textChanged(const TQString&)), TQT_SLOT(changed()) );
e_mail=new KLineEdit(this);
- l=new QLabel(e_mail, i18n("Email a&ddress:"), this);
+ l=new TQLabel(e_mail, i18n("Email a&ddress:"), this);
topL->addWidget(l, 2,0);
topL->addMultiCellWidget(e_mail, 2,2, 1,2);
msg = i18n( "<qt><p>Your email address as it will appear to others "
"reading your articles</p><p>Ex: <b>nospam@please.com</b>.</qt>" );
- QWhatsThis::add( l, msg );
- QWhatsThis::add( e_mail, msg );
- connect( e_mail, SIGNAL(textChanged(const QString&)), SLOT(changed()) );
+ TQWhatsThis::add( l, msg );
+ TQWhatsThis::add( e_mail, msg );
+ connect( e_mail, TQT_SIGNAL(textChanged(const TQString&)), TQT_SLOT(changed()) );
r_eplyTo=new KLineEdit(this);
- l=new QLabel(r_eplyTo, i18n("&Reply-to address:"), this);
+ l=new TQLabel(r_eplyTo, i18n("&Reply-to address:"), this);
topL->addWidget(l, 3,0);
topL->addMultiCellWidget(r_eplyTo, 3,3, 1,2);
msg = i18n( "<qt><p>When someone reply to your article by email, this is the address the message "
"will be sent. If you fill in this field, please do it with a real "
"email address.</p><p>Ex: <b>john@example.com</b>.</p></qt>" );
- QWhatsThis::add( l, msg );
- QWhatsThis::add( r_eplyTo, msg );
- connect( r_eplyTo, SIGNAL(textChanged(const QString&)), SLOT(changed()) );
+ TQWhatsThis::add( l, msg );
+ TQWhatsThis::add( r_eplyTo, msg );
+ connect( r_eplyTo, TQT_SIGNAL(textChanged(const TQString&)), TQT_SLOT(changed()) );
m_ailCopiesTo=new KLineEdit(this);
- l=new QLabel(m_ailCopiesTo, i18n("&Mail-copies-to:"), this);
+ l=new TQLabel(m_ailCopiesTo, i18n("&Mail-copies-to:"), this);
topL->addWidget(l, 4,0);
topL->addMultiCellWidget(m_ailCopiesTo, 4,4, 1,2);
- connect( m_ailCopiesTo, SIGNAL(textChanged(const QString&)), SLOT(changed()) );
+ connect( m_ailCopiesTo, TQT_SIGNAL(textChanged(const TQString&)), TQT_SLOT(changed()) );
s_igningKey = new Kpgp::SecretKeyRequester(this);
s_igningKey->dialogButton()->setText(i18n("Chan&ge..."));
s_igningKey->setDialogCaption(i18n("Your OpenPGP Key"));
s_igningKey->setDialogMessage(i18n("Select the OpenPGP key which should be "
"used for signing articles."));
- l=new QLabel(s_igningKey, i18n("Signing ke&y:"), this);
+ l=new TQLabel(s_igningKey, i18n("Signing ke&y:"), this);
topL->addWidget(l, 5,0);
topL->addMultiCellWidget(s_igningKey, 5,5, 1,2);
msg = i18n("<qt><p>The OpenPGP key you choose here will be "
"used to sign your articles.</p></qt>");
- QWhatsThis::add( l, msg );
- QWhatsThis::add( s_igningKey, msg );
- connect( s_igningKey, SIGNAL(changed()), SLOT(changed()) );
+ TQWhatsThis::add( l, msg );
+ TQWhatsThis::add( s_igningKey, msg );
+ connect( s_igningKey, TQT_SIGNAL(changed()), TQT_SLOT(changed()) );
- b_uttonGroup = new QButtonGroup(this);
- connect( b_uttonGroup, SIGNAL(clicked(int)),
- this, SLOT(slotSignatureType(int)) );
+ b_uttonGroup = new TQButtonGroup(this);
+ connect( b_uttonGroup, TQT_SIGNAL(clicked(int)),
+ this, TQT_SLOT(slotSignatureType(int)) );
b_uttonGroup->setExclusive(true);
b_uttonGroup->hide();
- s_igFile = new QRadioButton( i18n("&Use a signature from file"), this );
+ s_igFile = new TQRadioButton( i18n("&Use a signature from file"), this );
b_uttonGroup->insert(s_igFile, 0);
topL->addMultiCellWidget(s_igFile, 6, 6, 0, 2);
- QWhatsThis::add( s_igFile,
+ TQWhatsThis::add( s_igFile,
i18n( "<qt><p>Mark this to let KNode read the signature from a file.</p></qt>" ) );
s_ig = new KLineEdit(this);
- f_ileName = new QLabel(s_ig, i18n("Signature &file:"), this);
+ f_ileName = new TQLabel(s_ig, i18n("Signature &file:"), this);
topL->addWidget(f_ileName, 7, 0 );
topL->addWidget(s_ig, 7, 1 );
c_ompletion = new KURLCompletion();
s_ig->setCompletionObject(c_ompletion);
msg = i18n( "<qt><p>The file from which the signature will be read.</p>"
"<p>Ex: <b>/home/robt/.sig</b>.</p></qt>" );
- QWhatsThis::add( f_ileName, msg );
- QWhatsThis::add( s_ig, msg );
+ TQWhatsThis::add( f_ileName, msg );
+ TQWhatsThis::add( s_ig, msg );
- c_hooseBtn = new QPushButton( i18n("Choo&se..."), this);
- connect(c_hooseBtn, SIGNAL(clicked()),
- this, SLOT(slotSignatureChoose()));
+ c_hooseBtn = new TQPushButton( i18n("Choo&se..."), this);
+ connect(c_hooseBtn, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotSignatureChoose()));
topL->addWidget(c_hooseBtn, 7, 2 );
- e_ditBtn = new QPushButton( i18n("&Edit File"), this);
- connect(e_ditBtn, SIGNAL(clicked()),
- this, SLOT(slotSignatureEdit()));
+ e_ditBtn = new TQPushButton( i18n("&Edit File"), this);
+ connect(e_ditBtn, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotSignatureEdit()));
topL->addWidget(e_ditBtn, 8, 2);
- s_igGenerator = new QCheckBox(i18n("&The file is a program"), this);
+ s_igGenerator = new TQCheckBox(i18n("&The file is a program"), this);
topL->addMultiCellWidget(s_igGenerator, 8, 8, 0, 1);
msg = i18n( "<qt><p>Mark this option if the signature will be generated by a program</p>"
"<p>Ex: <b>/home/robt/gensig.sh</b>.</p></qt>" );
- QWhatsThis::add( s_igGenerator, msg );
- connect( s_igGenerator, SIGNAL(toggled(bool)), SLOT(changed()) );
+ TQWhatsThis::add( s_igGenerator, msg );
+ connect( s_igGenerator, TQT_SIGNAL(toggled(bool)), TQT_SLOT(changed()) );
- s_igEdit = new QRadioButton( i18n("Specify signature &below"), this);
+ s_igEdit = new TQRadioButton( i18n("Specify signature &below"), this);
b_uttonGroup->insert(s_igEdit, 1);
topL->addMultiCellWidget(s_igEdit, 9, 9, 0, 2);
- s_igEditor = new QTextEdit(this);
+ s_igEditor = new TQTextEdit(this);
s_igEditor->setTextFormat(Qt::PlainText);
topL->addMultiCellWidget(s_igEditor, 10, 10, 0, 2);
- connect( s_igEditor, SIGNAL(textChanged()), SLOT(changed()) );
+ connect( s_igEditor, TQT_SIGNAL(textChanged()), TQT_SLOT(changed()) );
topL->setColStretch(1,1);
topL->setRowStretch(7,1);
- topL->setResizeMode(QLayout::Minimum);
- connect(s_ig,SIGNAL(textChanged ( const QString & )),
- this,SLOT(textFileNameChanged(const QString &)));
+ topL->setResizeMode(TQLayout::Minimum);
+ connect(s_ig,TQT_SIGNAL(textChanged ( const TQString & )),
+ this,TQT_SLOT(textFileNameChanged(const TQString &)));
load();
}
@@ -182,7 +182,7 @@ KNConfig::IdentityWidget::~IdentityWidget()
delete c_ompletion;
}
-void KNConfig::IdentityWidget::textFileNameChanged(const QString &text)
+void KNConfig::IdentityWidget::textFileNameChanged(const TQString &text)
{
e_ditBtn->setEnabled(!text.isEmpty());
emit changed( true );
@@ -242,7 +242,7 @@ void KNConfig::IdentityWidget::slotSignatureType(int type)
void KNConfig::IdentityWidget::slotSignatureChoose()
{
- QString tmp=KFileDialog::getOpenFileName(c_ompletion->replacedPath(s_ig->text()),QString::null,this,i18n("Choose Signature"));
+ TQString tmp=KFileDialog::getOpenFileName(c_ompletion->replacedPath(s_ig->text()),TQString::null,this,i18n("Choose Signature"));
if(!tmp.isEmpty()) s_ig->setText(tmp);
emit changed( true );
}
@@ -250,14 +250,14 @@ void KNConfig::IdentityWidget::slotSignatureChoose()
void KNConfig::IdentityWidget::slotSignatureEdit()
{
- QString fileName = c_ompletion->replacedPath(s_ig->text()).stripWhiteSpace();
+ TQString fileName = c_ompletion->replacedPath(s_ig->text()).stripWhiteSpace();
if (fileName.isEmpty()) {
KMessageBox::sorry(this, i18n("You must specify a filename."));
return;
}
- QFileInfo fileInfo( fileName );
+ TQFileInfo fileInfo( fileName );
if (fileInfo.isDir()) {
KMessageBox::sorry(this, i18n("You have specified a folder."));
return;
@@ -279,42 +279,42 @@ void KNConfig::IdentityWidget::slotSignatureEdit()
//BEGIN: NNTP account configuration widgets ----------------------------------
-KNConfig::NntpAccountListWidget::NntpAccountListWidget(QWidget *p, const char *n) :
+KNConfig::NntpAccountListWidget::NntpAccountListWidget(TQWidget *p, const char *n) :
KCModule( p, n ),
a_ccManager( knGlobals.accountManager() )
{
p_ixmap = SmallIcon("server");
- QGridLayout *topL=new QGridLayout(this, 6,2, 5,5);
+ TQGridLayout *topL=new TQGridLayout(this, 6,2, 5,5);
// account listbox
l_box=new KNDialogListBox(false, this);
- connect(l_box, SIGNAL(selected(int)), this, SLOT(slotItemSelected(int)));
- connect(l_box, SIGNAL(selectionChanged()), this, SLOT(slotSelectionChanged()));
+ connect(l_box, TQT_SIGNAL(selected(int)), this, TQT_SLOT(slotItemSelected(int)));
+ connect(l_box, TQT_SIGNAL(selectionChanged()), this, TQT_SLOT(slotSelectionChanged()));
topL->addMultiCellWidget(l_box, 0,4, 0,0);
// info box
- QGroupBox *gb = new QGroupBox(2,Qt::Vertical,QString::null,this);
+ TQGroupBox *gb = new TQGroupBox(2,Qt::Vertical,TQString::null,this);
topL->addWidget(gb,5,0);
- s_erverInfo = new QLabel(gb);
- p_ortInfo = new QLabel(gb);
+ s_erverInfo = new TQLabel(gb);
+ p_ortInfo = new TQLabel(gb);
// buttons
- a_ddBtn=new QPushButton(i18n("&Add..."), this);
- connect(a_ddBtn, SIGNAL(clicked()), this, SLOT(slotAddBtnClicked()));
+ a_ddBtn=new TQPushButton(i18n("&Add..."), this);
+ connect(a_ddBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotAddBtnClicked()));
topL->addWidget(a_ddBtn, 0,1);
- e_ditBtn=new QPushButton(i18n("modify something","&Edit..."), this);
- connect(e_ditBtn, SIGNAL(clicked()), this, SLOT(slotEditBtnClicked()));
+ e_ditBtn=new TQPushButton(i18n("modify something","&Edit..."), this);
+ connect(e_ditBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotEditBtnClicked()));
topL->addWidget(e_ditBtn, 1,1);
- d_elBtn=new QPushButton(i18n("&Delete"), this);
- connect(d_elBtn, SIGNAL(clicked()), this, SLOT(slotDelBtnClicked()));
+ d_elBtn=new TQPushButton(i18n("&Delete"), this);
+ connect(d_elBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotDelBtnClicked()));
topL->addWidget(d_elBtn, 2,1);
- s_ubBtn=new QPushButton(i18n("&Subscribe..."), this);
- connect(s_ubBtn, SIGNAL(clicked()), this, SLOT(slotSubBtnClicked()));
+ s_ubBtn=new TQPushButton(i18n("&Subscribe..."), this);
+ connect(s_ubBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotSubBtnClicked()));
topL->addWidget(s_ubBtn, 3,1);
topL->setRowStretch(4,1); // stretch the server listbox
@@ -323,9 +323,9 @@ KNConfig::NntpAccountListWidget::NntpAccountListWidget(QWidget *p, const char *n
// the settings dialog is non-modal, so we have to react to changes
// made outside of the dialog
- connect(a_ccManager, SIGNAL(accountAdded(KNNntpAccount*)), this, SLOT(slotAddItem(KNNntpAccount*)));
- connect(a_ccManager, SIGNAL(accountRemoved(KNNntpAccount*)), this, SLOT(slotRemoveItem(KNNntpAccount*)));
- connect(a_ccManager, SIGNAL(accountModified(KNNntpAccount*)), this, SLOT(slotUpdateItem(KNNntpAccount*)));
+ connect(a_ccManager, TQT_SIGNAL(accountAdded(KNNntpAccount*)), this, TQT_SLOT(slotAddItem(KNNntpAccount*)));
+ connect(a_ccManager, TQT_SIGNAL(accountRemoved(KNNntpAccount*)), this, TQT_SLOT(slotRemoveItem(KNNntpAccount*)));
+ connect(a_ccManager, TQT_SIGNAL(accountModified(KNNntpAccount*)), this, TQT_SLOT(slotUpdateItem(KNNntpAccount*)));
slotSelectionChanged(); // disable Delete & Edit initially
}
@@ -339,7 +339,7 @@ KNConfig::NntpAccountListWidget::~NntpAccountListWidget()
void KNConfig::NntpAccountListWidget::load()
{
l_box->clear();
- QValueList<KNNntpAccount*>::Iterator it;
+ TQValueList<KNNntpAccount*>::Iterator it;
for ( it = a_ccManager->begin(); it != a_ccManager->end(); ++it )
slotAddItem( *it );
}
@@ -460,67 +460,67 @@ void KNConfig::NntpAccountListWidget::slotSubBtnClicked()
//=======================================================================================
-KNConfig::NntpAccountConfDialog::NntpAccountConfDialog(KNNntpAccount *a, QWidget *p, const char *n)
+KNConfig::NntpAccountConfDialog::NntpAccountConfDialog(KNNntpAccount *a, TQWidget *p, const char *n)
: KDialogBase(Tabbed, (a->id()!=-1)? i18n("Properties of %1").arg(a->name()):i18n("New Account"),
Ok|Cancel|Help, Ok, p, n),
a_ccount(a)
{
- QFrame* page=addPage(i18n("Ser&ver"));
- QGridLayout *topL=new QGridLayout(page, 11, 3, 5);
+ TQFrame* page=addPage(i18n("Ser&ver"));
+ TQGridLayout *topL=new TQGridLayout(page, 11, 3, 5);
n_ame=new KLineEdit(page);
- QLabel *l=new QLabel(n_ame,i18n("&Name:"),page);
+ TQLabel *l=new TQLabel(n_ame,i18n("&Name:"),page);
topL->addWidget(l, 0,0);
n_ame->setText(a->name());
topL->addMultiCellWidget(n_ame, 0, 0, 1, 2);
s_erver=new KLineEdit(page);
- l=new QLabel(s_erver,i18n("&Server:"), page);
+ l=new TQLabel(s_erver,i18n("&Server:"), page);
s_erver->setText(a->server());
topL->addWidget(l, 1,0);
topL->addMultiCellWidget(s_erver, 1, 1, 1, 2);
p_ort=new KLineEdit(page);
- l=new QLabel(p_ort, i18n("&Port:"), page);
+ l=new TQLabel(p_ort, i18n("&Port:"), page);
p_ort->setValidator(new KIntValidator(0,65536,this));
- p_ort->setText(QString::number(a->port()));
+ p_ort->setText(TQString::number(a->port()));
topL->addWidget(l, 2,0);
topL->addWidget(p_ort, 2,1);
h_old = new KIntSpinBox(5,1800,5,5,10,page);
- l = new QLabel(h_old,i18n("Hol&d connection for:"), page);
+ l = new TQLabel(h_old,i18n("Hol&d connection for:"), page);
h_old->setSuffix(i18n(" sec"));
h_old->setValue(a->hold());
topL->addWidget(l,3,0);
topL->addWidget(h_old,3,1);
t_imeout = new KIntSpinBox(15,600,5,15,10,page);
- l = new QLabel(t_imeout, i18n("&Timeout:"), page);
+ l = new TQLabel(t_imeout, i18n("&Timeout:"), page);
t_imeout->setValue(a->timeout());
t_imeout->setSuffix(i18n(" sec"));
topL->addWidget(l,4,0);
topL->addWidget(t_imeout,4,1);
- f_etchDes=new QCheckBox(i18n("&Fetch group descriptions"), page);
+ f_etchDes=new TQCheckBox(i18n("&Fetch group descriptions"), page);
f_etchDes->setChecked(a->fetchDescriptions());
topL->addMultiCellWidget(f_etchDes, 5,5, 0,3);
- /*u_seDiskCache=new QCheckBox(i18n("&Cache articles on disk"), page);
+ /*u_seDiskCache=new TQCheckBox(i18n("&Cache articles on disk"), page);
u_seDiskCache->setChecked(a->useDiskCache());
topL->addMultiCellWidget(u_seDiskCache, 6,6, 0,3);*/
- a_uth=new QCheckBox(i18n("Server requires &authentication"), page);
- connect(a_uth, SIGNAL(toggled(bool)), this, SLOT(slotAuthChecked(bool)));
+ a_uth=new TQCheckBox(i18n("Server requires &authentication"), page);
+ connect(a_uth, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotAuthChecked(bool)));
topL->addMultiCellWidget(a_uth, 6,6, 0,3);
u_ser=new KLineEdit(page);
- u_serLabel=new QLabel(u_ser,i18n("&User:"), page);
+ u_serLabel=new TQLabel(u_ser,i18n("&User:"), page);
u_ser->setText(a->user());
topL->addWidget(u_serLabel, 7,0);
topL->addMultiCellWidget(u_ser, 7,7, 1,2);
p_ass=new KLineEdit(page);
- p_assLabel=new QLabel(p_ass, i18n("Pass&word:"), page);
+ p_assLabel=new TQLabel(p_ass, i18n("Pass&word:"), page);
p_ass->setEchoMode(KLineEdit::Password);
if ( a->readyForLogin() )
p_ass->setText(a->pass());
@@ -530,12 +530,12 @@ KNConfig::NntpAccountConfDialog::NntpAccountConfDialog(KNNntpAccount *a, QWidget
topL->addWidget(p_assLabel, 8,0);
topL->addMultiCellWidget(p_ass, 8,8, 1,2);
- i_nterval=new QCheckBox(i18n("Enable &interval news checking"), page);
- connect(i_nterval, SIGNAL(toggled(bool)), this, SLOT(slotIntervalChecked(bool)));
+ i_nterval=new TQCheckBox(i18n("Enable &interval news checking"), page);
+ connect(i_nterval, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotIntervalChecked(bool)));
topL->addMultiCellWidget(i_nterval, 9,9, 0,3);
c_heckInterval=new KIntSpinBox(1,10000,1,1,10,page);
- c_heckIntervalLabel=new QLabel(c_heckInterval, i18n("Check inter&val:"), page);
+ c_heckIntervalLabel=new TQLabel(c_heckInterval, i18n("Check inter&val:"), page);
c_heckInterval->setSuffix(i18n(" min") );
c_heckInterval->setValue(a->checkInterval());
c_heckIntervalLabel->setBuddy(c_heckInterval);
@@ -552,14 +552,14 @@ KNConfig::NntpAccountConfDialog::NntpAccountConfDialog(KNNntpAccount *a, QWidget
i_dWidget=new KNConfig::IdentityWidget(a->identity(), addVBoxPage(i18n("&Identity")));
// per server cleanup configuration
- QFrame* cleanupPage = addPage( i18n("&Cleanup") );
- QVBoxLayout *cleanupLayout = new QVBoxLayout( cleanupPage, KDialog::spacingHint() );
+ TQFrame* cleanupPage = addPage( i18n("&Cleanup") );
+ TQVBoxLayout *cleanupLayout = new TQVBoxLayout( cleanupPage, KDialog::spacingHint() );
mCleanupWidget = new GroupCleanupWidget( a->cleanupConfig(), cleanupPage );
mCleanupWidget->load();
cleanupLayout->addWidget( mCleanupWidget );
cleanupLayout->addStretch( 1 );
- connect( knGlobals.accountManager(), SIGNAL(passwordsChanged()), SLOT(slotPasswordChanged()) );
+ connect( knGlobals.accountManager(), TQT_SIGNAL(passwordsChanged()), TQT_SLOT(slotPasswordChanged()) );
KNHelper::restoreWindowSize("accNewsPropDLG", this, sizeHint());
@@ -629,11 +629,11 @@ void KNConfig::NntpAccountConfDialog::slotPasswordChanged()
//=============================================================================================
-KNConfig::SmtpAccountWidget::SmtpAccountWidget( QWidget *p, const char *n ) :
+KNConfig::SmtpAccountWidget::SmtpAccountWidget( TQWidget *p, const char *n ) :
SmtpAccountWidgetBase( p, n )
{
mAccount = knGlobals.accountManager()->smtp();
- connect( knGlobals.accountManager(), SIGNAL(passwordsChanged()), SLOT(slotPasswordChanged()) );
+ connect( knGlobals.accountManager(), TQT_SIGNAL(passwordsChanged()), TQT_SLOT(slotPasswordChanged()) );
load();
}
@@ -731,8 +731,8 @@ void KNConfig::SmtpAccountWidget::slotPasswordChanged()
//===================================================================================
// code taken from KMail, Copyright (C) 2000 Espen Sand, espen@kde.org
-KNConfig::AppearanceWidget::ColorListItem::ColorListItem( const QString &text, const QColor &color )
- : QListBoxText(text), mColor( color )
+KNConfig::AppearanceWidget::ColorListItem::ColorListItem( const TQString &text, const TQColor &color )
+ : TQListBoxText(text), mColor( color )
{
}
@@ -742,9 +742,9 @@ KNConfig::AppearanceWidget::ColorListItem::~ColorListItem()
}
-void KNConfig::AppearanceWidget::ColorListItem::paint( QPainter *p )
+void KNConfig::AppearanceWidget::ColorListItem::paint( TQPainter *p )
{
- QFontMetrics fm = p->fontMetrics();
+ TQFontMetrics fm = p->fontMetrics();
int h = fm.height();
p->drawText( 30+3*2, fm.ascent() + fm.leading()/2, text() );
@@ -755,13 +755,13 @@ void KNConfig::AppearanceWidget::ColorListItem::paint( QPainter *p )
}
-int KNConfig::AppearanceWidget::ColorListItem::height(const QListBox *lb ) const
+int KNConfig::AppearanceWidget::ColorListItem::height(const TQListBox *lb ) const
{
return( lb->fontMetrics().lineSpacing()+1 );
}
-int KNConfig::AppearanceWidget::ColorListItem::width(const QListBox *lb ) const
+int KNConfig::AppearanceWidget::ColorListItem::width(const TQListBox *lb ) const
{
return( 30 + lb->fontMetrics().width( text() ) + 6 );
}
@@ -770,10 +770,10 @@ int KNConfig::AppearanceWidget::ColorListItem::width(const QListBox *lb ) const
//===================================================================================
-KNConfig::AppearanceWidget::FontListItem::FontListItem( const QString &name, const QFont &font )
- : QListBoxText(name), f_ont(font)
+KNConfig::AppearanceWidget::FontListItem::FontListItem( const TQString &name, const TQFont &font )
+ : TQListBoxText(name), f_ont(font)
{
- fontInfo = QString("[%1 %2]").arg(f_ont.family()).arg(f_ont.pointSize());
+ fontInfo = TQString("[%1 %2]").arg(f_ont.family()).arg(f_ont.pointSize());
}
@@ -782,28 +782,28 @@ KNConfig::AppearanceWidget::FontListItem::~FontListItem()
}
-void KNConfig::AppearanceWidget::FontListItem::setFont(const QFont &font)
+void KNConfig::AppearanceWidget::FontListItem::setFont(const TQFont &font)
{
f_ont = font;
- fontInfo = QString("[%1 %2]").arg(f_ont.family()).arg(f_ont.pointSize());
+ fontInfo = TQString("[%1 %2]").arg(f_ont.family()).arg(f_ont.pointSize());
}
-void KNConfig::AppearanceWidget::FontListItem::paint( QPainter *p )
+void KNConfig::AppearanceWidget::FontListItem::paint( TQPainter *p )
{
- QFont fnt = p->font();
- fnt.setWeight(QFont::Bold);
+ TQFont fnt = p->font();
+ fnt.setWeight(TQFont::Bold);
p->setFont(fnt);
int fontInfoWidth = p->fontMetrics().width(fontInfo);
int h = p->fontMetrics().ascent() + p->fontMetrics().leading()/2;
p->drawText(2, h, fontInfo );
- fnt.setWeight(QFont::Normal);
+ fnt.setWeight(TQFont::Normal);
p->setFont(fnt);
p->drawText(5 + fontInfoWidth, h, text() );
}
-int KNConfig::AppearanceWidget::FontListItem::width(const QListBox *lb ) const
+int KNConfig::AppearanceWidget::FontListItem::width(const TQListBox *lb ) const
{
return( lb->fontMetrics().width(fontInfo) + lb->fontMetrics().width(text()) + 20 );
}
@@ -812,38 +812,38 @@ int KNConfig::AppearanceWidget::FontListItem::width(const QListBox *lb ) const
//===================================================================================
-KNConfig::AppearanceWidget::AppearanceWidget( QWidget *p, const char *n ) :
+KNConfig::AppearanceWidget::AppearanceWidget( TQWidget *p, const char *n ) :
KCModule( p, n ),
d_ata( knGlobals.configManager()->appearance() )
{
- QGridLayout *topL=new QGridLayout(this, 8,2, 5,5);
+ TQGridLayout *topL=new TQGridLayout(this, 8,2, 5,5);
//color-list
c_List = new KNDialogListBox(false, this);
topL->addMultiCellWidget(c_List,1,3,0,0);
- connect(c_List, SIGNAL(selected(QListBoxItem*)),SLOT(slotColItemSelected(QListBoxItem*)));
- connect(c_List, SIGNAL(selectionChanged()), SLOT(slotColSelectionChanged()));
+ connect(c_List, TQT_SIGNAL(selected(TQListBoxItem*)),TQT_SLOT(slotColItemSelected(TQListBoxItem*)));
+ connect(c_List, TQT_SIGNAL(selectionChanged()), TQT_SLOT(slotColSelectionChanged()));
- c_olorCB = new QCheckBox(i18n("&Use custom colors"),this);
+ c_olorCB = new TQCheckBox(i18n("&Use custom colors"),this);
topL->addWidget(c_olorCB,0,0);
- connect(c_olorCB, SIGNAL(toggled(bool)), this, SLOT(slotColCheckBoxToggled(bool)));
+ connect(c_olorCB, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotColCheckBoxToggled(bool)));
- c_olChngBtn=new QPushButton(i18n("Cha&nge..."), this);
- connect(c_olChngBtn, SIGNAL(clicked()), this, SLOT(slotColChangeBtnClicked()));
+ c_olChngBtn=new TQPushButton(i18n("Cha&nge..."), this);
+ connect(c_olChngBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotColChangeBtnClicked()));
topL->addWidget(c_olChngBtn,1,1);
//font-list
f_List = new KNDialogListBox(false, this);
topL->addMultiCellWidget(f_List,5,7,0,0);
- connect(f_List, SIGNAL(selected(QListBoxItem*)),SLOT(slotFontItemSelected(QListBoxItem*)));
- connect(f_List, SIGNAL(selectionChanged()),SLOT(slotFontSelectionChanged()));
+ connect(f_List, TQT_SIGNAL(selected(TQListBoxItem*)),TQT_SLOT(slotFontItemSelected(TQListBoxItem*)));
+ connect(f_List, TQT_SIGNAL(selectionChanged()),TQT_SLOT(slotFontSelectionChanged()));
- f_ontCB = new QCheckBox(i18n("Use custom &fonts"),this);
+ f_ontCB = new TQCheckBox(i18n("Use custom &fonts"),this);
topL->addWidget(f_ontCB,4,0);
- connect(f_ontCB, SIGNAL(toggled(bool)), this, SLOT(slotFontCheckBoxToggled(bool)));
+ connect(f_ontCB, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotFontCheckBoxToggled(bool)));
- f_ntChngBtn=new QPushButton(i18n("Chang&e..."), this);
- connect(f_ntChngBtn, SIGNAL(clicked()), this, SLOT(slotFontChangeBtnClicked()));
+ f_ntChngBtn=new TQPushButton(i18n("Chang&e..."), this);
+ connect(f_ntChngBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotFontChangeBtnClicked()));
topL->addWidget(f_ntChngBtn,5,1);
load();
@@ -920,11 +920,11 @@ void KNConfig::AppearanceWidget::slotColCheckBoxToggled(bool b)
// show color dialog for the entry
-void KNConfig::AppearanceWidget::slotColItemSelected(QListBoxItem *it)
+void KNConfig::AppearanceWidget::slotColItemSelected(TQListBoxItem *it)
{
if (it) {
ColorListItem *colorItem = static_cast<ColorListItem*>(it);
- QColor col = colorItem->color();
+ TQColor col = colorItem->color();
int result = KColorDialog::getColor(col,this);
if (result == KColorDialog::Accepted) {
@@ -959,11 +959,11 @@ void KNConfig::AppearanceWidget::slotFontCheckBoxToggled(bool b)
// show font dialog for the entry
-void KNConfig::AppearanceWidget::slotFontItemSelected(QListBoxItem *it)
+void KNConfig::AppearanceWidget::slotFontItemSelected(TQListBoxItem *it)
{
if (it) {
FontListItem *fontItem = static_cast<FontListItem*>(it);
- QFont font = fontItem->font();
+ TQFont font = fontItem->font();
int result = KFontDialog::getFont(font,false,this);
if (result == KFontDialog::Accepted) {
@@ -991,42 +991,42 @@ void KNConfig::AppearanceWidget::slotFontSelectionChanged()
//=============================================================================================
-KNConfig::ReadNewsGeneralWidget::ReadNewsGeneralWidget( ReadNewsGeneral *d, QWidget *p, const char *n ) :
+KNConfig::ReadNewsGeneralWidget::ReadNewsGeneralWidget( ReadNewsGeneral *d, TQWidget *p, const char *n ) :
KCModule( p, n ),
d_ata( d )
{
- QGroupBox *hgb=new QGroupBox(i18n("Article Handling"), this);
- QGroupBox *lgb=new QGroupBox(i18n("Article List"), this);
- QGroupBox *cgb=new QGroupBox(i18n("Memory Consumption"), this);
- QLabel *l1, *l2, *l3;
+ TQGroupBox *hgb=new TQGroupBox(i18n("Article Handling"), this);
+ TQGroupBox *lgb=new TQGroupBox(i18n("Article List"), this);
+ TQGroupBox *cgb=new TQGroupBox(i18n("Memory Consumption"), this);
+ TQLabel *l1, *l2, *l3;
- a_utoCB=new QCheckBox(i18n("Check for new articles a&utomatically"), hgb);
+ a_utoCB=new TQCheckBox(i18n("Check for new articles a&utomatically"), hgb);
m_axFetch=new KIntSpinBox(0, 100000, 1, 0, 10, hgb);
- l1=new QLabel(m_axFetch, i18n("&Maximum number of articles to fetch:"), hgb);
- m_arkCB=new QCheckBox(i18n("Mar&k article as read after:"), hgb);
+ l1=new TQLabel(m_axFetch, i18n("&Maximum number of articles to fetch:"), hgb);
+ m_arkCB=new TQCheckBox(i18n("Mar&k article as read after:"), hgb);
m_arkSecs=new KIntSpinBox(0, 9999, 1, 0, 10, hgb);
- connect(m_arkCB, SIGNAL(toggled(bool)), m_arkSecs, SLOT(setEnabled(bool)));
+ connect(m_arkCB, TQT_SIGNAL(toggled(bool)), m_arkSecs, TQT_SLOT(setEnabled(bool)));
m_arkSecs->setSuffix(i18n(" sec"));
- m_arkCrossCB=new QCheckBox(i18n("Mark c&rossposted articles as read"), hgb);
+ m_arkCrossCB=new TQCheckBox(i18n("Mark c&rossposted articles as read"), hgb);
- s_martScrollingCB=new QCheckBox(i18n("Smart scrolli&ng"), lgb);
- e_xpThrCB=new QCheckBox(i18n("Show &whole thread on expanding"), lgb);
- d_efaultExpandCB=new QCheckBox(i18n("Default to e&xpanded threads"), lgb);
- s_coreCB=new QCheckBox(i18n("Show article &score"), lgb);
- l_inesCB=new QCheckBox(i18n("Show &line count"), lgb);
- u_nreadCB=new QCheckBox(i18n("Show unread count in &thread"), lgb);
+ s_martScrollingCB=new TQCheckBox(i18n("Smart scrolli&ng"), lgb);
+ e_xpThrCB=new TQCheckBox(i18n("Show &whole thread on expanding"), lgb);
+ d_efaultExpandCB=new TQCheckBox(i18n("Default to e&xpanded threads"), lgb);
+ s_coreCB=new TQCheckBox(i18n("Show article &score"), lgb);
+ l_inesCB=new TQCheckBox(i18n("Show &line count"), lgb);
+ u_nreadCB=new TQCheckBox(i18n("Show unread count in &thread"), lgb);
c_ollCacheSize=new KIntSpinBox(0, 99999, 1, 1, 10, cgb);
c_ollCacheSize->setSuffix(" KB");
- l2=new QLabel(c_ollCacheSize, i18n("Cach&e size for headers:"), cgb);
+ l2=new TQLabel(c_ollCacheSize, i18n("Cach&e size for headers:"), cgb);
a_rtCacheSize=new KIntSpinBox(0, 99999, 1, 1, 10, cgb);
a_rtCacheSize->setSuffix(" KB");
- l3=new QLabel(a_rtCacheSize, i18n("Cache si&ze for articles:"), cgb);
+ l3=new TQLabel(a_rtCacheSize, i18n("Cache si&ze for articles:"), cgb);
- QVBoxLayout *topL=new QVBoxLayout(this, 5);
- QGridLayout *hgbL=new QGridLayout(hgb, 5,2, 8,5);
- QVBoxLayout *lgbL=new QVBoxLayout(lgb, 8, 5);
- QGridLayout *cgbL=new QGridLayout(cgb, 3,2, 8,5);
+ TQVBoxLayout *topL=new TQVBoxLayout(this, 5);
+ TQGridLayout *hgbL=new TQGridLayout(hgb, 5,2, 8,5);
+ TQVBoxLayout *lgbL=new TQVBoxLayout(lgb, 8, 5);
+ TQGridLayout *cgbL=new TQGridLayout(cgb, 3,2, 8,5);
topL->addWidget(hgb);
topL->addWidget(lgb);
@@ -1057,21 +1057,21 @@ KNConfig::ReadNewsGeneralWidget::ReadNewsGeneralWidget( ReadNewsGeneral *d, QWid
cgbL->addWidget(a_rtCacheSize, 2,1);
cgbL->setColStretch(0,1);
- topL->setResizeMode(QLayout::Minimum);
-
- connect(a_utoCB, SIGNAL(toggled(bool)), SLOT(changed()));
- connect(m_axFetch, SIGNAL(valueChanged(int)), SLOT(changed()));
- connect(m_arkCB, SIGNAL(toggled(bool)), SLOT(changed()));
- connect(m_arkSecs, SIGNAL(valueChanged(int)), SLOT(changed()));
- connect(m_arkCrossCB, SIGNAL(toggled(bool)), SLOT(changed()));
- connect(s_martScrollingCB, SIGNAL(toggled(bool)), SLOT(changed()));
- connect(e_xpThrCB, SIGNAL(toggled(bool)), SLOT(changed()));
- connect(d_efaultExpandCB, SIGNAL(toggled(bool)), SLOT(changed()));
- connect(l_inesCB, SIGNAL(toggled(bool)), SLOT(changed()));
- connect(s_coreCB, SIGNAL(toggled(bool)), SLOT(changed()));
- connect(u_nreadCB, SIGNAL(toggled(bool)), SLOT(changed()));
- connect(c_ollCacheSize, SIGNAL(valueChanged(int)), SLOT(changed()));
- connect(a_rtCacheSize, SIGNAL(valueChanged(int)), SLOT(changed()));
+ topL->setResizeMode(TQLayout::Minimum);
+
+ connect(a_utoCB, TQT_SIGNAL(toggled(bool)), TQT_SLOT(changed()));
+ connect(m_axFetch, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(changed()));
+ connect(m_arkCB, TQT_SIGNAL(toggled(bool)), TQT_SLOT(changed()));
+ connect(m_arkSecs, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(changed()));
+ connect(m_arkCrossCB, TQT_SIGNAL(toggled(bool)), TQT_SLOT(changed()));
+ connect(s_martScrollingCB, TQT_SIGNAL(toggled(bool)), TQT_SLOT(changed()));
+ connect(e_xpThrCB, TQT_SIGNAL(toggled(bool)), TQT_SLOT(changed()));
+ connect(d_efaultExpandCB, TQT_SIGNAL(toggled(bool)), TQT_SLOT(changed()));
+ connect(l_inesCB, TQT_SIGNAL(toggled(bool)), TQT_SLOT(changed()));
+ connect(s_coreCB, TQT_SIGNAL(toggled(bool)), TQT_SLOT(changed()));
+ connect(u_nreadCB, TQT_SIGNAL(toggled(bool)), TQT_SLOT(changed()));
+ connect(c_ollCacheSize, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(changed()));
+ connect(a_rtCacheSize, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(changed()));
load();
}
@@ -1122,56 +1122,56 @@ void KNConfig::ReadNewsGeneralWidget::save()
//=============================================================================================
-KNConfig::ReadNewsNavigationWidget::ReadNewsNavigationWidget( ReadNewsNavigation *d, QWidget *p, const char *n ) :
+KNConfig::ReadNewsNavigationWidget::ReadNewsNavigationWidget( ReadNewsNavigation *d, TQWidget *p, const char *n ) :
KCModule( p, n ),
d_ata( d )
{
- QVBoxLayout *topL=new QVBoxLayout(this, 5);
+ TQVBoxLayout *topL=new TQVBoxLayout(this, 5);
// ==== Mark All as Read ====================================================
- QGroupBox *gb=new QGroupBox(i18n("\"Mark All as Read\" Triggers Following Actions"), this);
- QVBoxLayout *gbL=new QVBoxLayout(gb, 8, 5);
+ TQGroupBox *gb=new TQGroupBox(i18n("\"Mark All as Read\" Triggers Following Actions"), this);
+ TQVBoxLayout *gbL=new TQVBoxLayout(gb, 8, 5);
topL->addWidget(gb);
gbL->addSpacing(fontMetrics().lineSpacing()-4);
- m_arkAllReadGoNextCB=new QCheckBox(i18n("&Switch to the next group"), gb);
+ m_arkAllReadGoNextCB=new TQCheckBox(i18n("&Switch to the next group"), gb);
gbL->addWidget(m_arkAllReadGoNextCB);
- connect(m_arkAllReadGoNextCB, SIGNAL(toggled(bool)), SLOT(changed()));
+ connect(m_arkAllReadGoNextCB, TQT_SIGNAL(toggled(bool)), TQT_SLOT(changed()));
// ==== Mark Thread as Read =================================================
- gb=new QGroupBox(i18n("\"Mark Thread as Read\" Triggers Following Actions"), this);
- gbL=new QVBoxLayout(gb, 8, 5);
+ gb=new TQGroupBox(i18n("\"Mark Thread as Read\" Triggers Following Actions"), this);
+ gbL=new TQVBoxLayout(gb, 8, 5);
topL->addWidget(gb);
gbL->addSpacing(fontMetrics().lineSpacing()-4);
- m_arkThreadReadCloseThreadCB=new QCheckBox(i18n("Clos&e the current thread"), gb);
+ m_arkThreadReadCloseThreadCB=new TQCheckBox(i18n("Clos&e the current thread"), gb);
gbL->addWidget(m_arkThreadReadCloseThreadCB);
- m_arkThreadReadGoNextCB=new QCheckBox(i18n("Go &to the next unread thread"), gb);
+ m_arkThreadReadGoNextCB=new TQCheckBox(i18n("Go &to the next unread thread"), gb);
gbL->addWidget(m_arkThreadReadGoNextCB);
- connect(m_arkThreadReadCloseThreadCB, SIGNAL(toggled(bool)), SLOT(changed()));
- connect(m_arkThreadReadGoNextCB, SIGNAL(toggled(bool)), SLOT(changed()));
+ connect(m_arkThreadReadCloseThreadCB, TQT_SIGNAL(toggled(bool)), TQT_SLOT(changed()));
+ connect(m_arkThreadReadGoNextCB, TQT_SIGNAL(toggled(bool)), TQT_SLOT(changed()));
// ==== Ignore Thread =======================================================
- gb=new QGroupBox(i18n("\"Ignore Thread\" Triggers Following Actions"), this);
- gbL=new QVBoxLayout(gb, 8, 5);
+ gb=new TQGroupBox(i18n("\"Ignore Thread\" Triggers Following Actions"), this);
+ gbL=new TQVBoxLayout(gb, 8, 5);
topL->addWidget(gb);
gbL->addSpacing(fontMetrics().lineSpacing()-4);
- i_gnoreThreadCloseThreadCB=new QCheckBox(i18n("Close the cu&rrent thread"), gb);
+ i_gnoreThreadCloseThreadCB=new TQCheckBox(i18n("Close the cu&rrent thread"), gb);
gbL->addWidget(i_gnoreThreadCloseThreadCB);
- i_gnoreThreadGoNextCB=new QCheckBox(i18n("Go to the next &unread thread"), gb);
+ i_gnoreThreadGoNextCB=new TQCheckBox(i18n("Go to the next &unread thread"), gb);
gbL->addWidget(i_gnoreThreadGoNextCB);
- connect(i_gnoreThreadCloseThreadCB, SIGNAL(toggled(bool)), SLOT(changed()));
- connect(i_gnoreThreadGoNextCB, SIGNAL(toggled(bool)), SLOT(changed()));
+ connect(i_gnoreThreadCloseThreadCB, TQT_SIGNAL(toggled(bool)), TQT_SLOT(changed()));
+ connect(i_gnoreThreadGoNextCB, TQT_SIGNAL(toggled(bool)), TQT_SLOT(changed()));
topL->addStretch(1);
- topL->setResizeMode(QLayout::Minimum);
+ topL->setResizeMode(TQLayout::Minimum);
load();
}
@@ -1206,30 +1206,30 @@ void KNConfig::ReadNewsNavigationWidget::save()
//=============================================================================================
-KNConfig::ReadNewsViewerWidget::ReadNewsViewerWidget( ReadNewsViewer *d, QWidget *p, const char *n ) :
+KNConfig::ReadNewsViewerWidget::ReadNewsViewerWidget( ReadNewsViewer *d, TQWidget *p, const char *n ) :
KCModule( p, n ),
d_ata( d )
{
- QGroupBox *appgb=new QGroupBox(i18n("Appearance"), this);
- QGroupBox *agb=new QGroupBox(i18n("Attachments"), this);
- QGroupBox *secbox = new QGroupBox( i18n("Security"), this );
+ TQGroupBox *appgb=new TQGroupBox(i18n("Appearance"), this);
+ TQGroupBox *agb=new TQGroupBox(i18n("Attachments"), this);
+ TQGroupBox *secbox = new TQGroupBox( i18n("Security"), this );
- r_ewrapCB=new QCheckBox(i18n("Re&wrap text when necessary"), appgb);
- r_emoveTrailingCB=new QCheckBox(i18n("Re&move trailing empty lines"), appgb);
- s_igCB=new QCheckBox(i18n("Show sig&nature"), appgb);
- mShowRefBar = new QCheckBox( i18n("Show reference bar"), appgb );
+ r_ewrapCB=new TQCheckBox(i18n("Re&wrap text when necessary"), appgb);
+ r_emoveTrailingCB=new TQCheckBox(i18n("Re&move trailing empty lines"), appgb);
+ s_igCB=new TQCheckBox(i18n("Show sig&nature"), appgb);
+ mShowRefBar = new TQCheckBox( i18n("Show reference bar"), appgb );
q_uoteCharacters=new KLineEdit(appgb);
- QLabel *quoteCharL = new QLabel(q_uoteCharacters, i18n("Recognized q&uote characters:"), appgb);
+ TQLabel *quoteCharL = new TQLabel(q_uoteCharacters, i18n("Recognized q&uote characters:"), appgb);
- o_penAttCB=new QCheckBox(i18n("Open a&ttachments on click"), agb);
- a_ltAttCB=new QCheckBox(i18n("Show alternati&ve contents as attachments"), agb);
+ o_penAttCB=new TQCheckBox(i18n("Open a&ttachments on click"), agb);
+ a_ltAttCB=new TQCheckBox(i18n("Show alternati&ve contents as attachments"), agb);
- mAlwaysShowHTML = new QCheckBox( i18n("Prefer HTML to plain text"), secbox );
+ mAlwaysShowHTML = new TQCheckBox( i18n("Prefer HTML to plain text"), secbox );
- QVBoxLayout *topL=new QVBoxLayout(this, 5);
- QGridLayout *appgbL=new QGridLayout(appgb, 5,2, 8,5);
- QVBoxLayout *agbL=new QVBoxLayout(agb, 8, 5);
- QVBoxLayout *secLayout = new QVBoxLayout( secbox, 8, 5 );
+ TQVBoxLayout *topL=new TQVBoxLayout(this, 5);
+ TQGridLayout *appgbL=new TQGridLayout(appgb, 5,2, 8,5);
+ TQVBoxLayout *agbL=new TQVBoxLayout(agb, 8, 5);
+ TQVBoxLayout *secLayout = new TQVBoxLayout( secbox, 8, 5 );
topL->addWidget(appgb);
topL->addWidget(agb);
@@ -1251,16 +1251,16 @@ KNConfig::ReadNewsViewerWidget::ReadNewsViewerWidget( ReadNewsViewer *d, QWidget
secLayout->addSpacing( fontMetrics().lineSpacing() - 4 );
secLayout->addWidget( mAlwaysShowHTML );
- topL->setResizeMode(QLayout::Minimum);
+ topL->setResizeMode(TQLayout::Minimum);
- connect(r_ewrapCB, SIGNAL(toggled(bool)), SLOT(changed()));
- connect(r_emoveTrailingCB, SIGNAL(toggled(bool)), SLOT(changed()));
- connect(s_igCB, SIGNAL(toggled(bool)), SLOT(changed()));
- connect(q_uoteCharacters, SIGNAL(textChanged(const QString&)), SLOT(changed()));
- connect(o_penAttCB, SIGNAL(toggled(bool)), SLOT(changed()));
- connect(a_ltAttCB, SIGNAL(toggled(bool)), SLOT(changed()));
- connect( mShowRefBar, SIGNAL(toggled(bool)), SLOT(changed()) );
- connect( mAlwaysShowHTML, SIGNAL(toggled(bool)), SLOT(changed()) );
+ connect(r_ewrapCB, TQT_SIGNAL(toggled(bool)), TQT_SLOT(changed()));
+ connect(r_emoveTrailingCB, TQT_SIGNAL(toggled(bool)), TQT_SLOT(changed()));
+ connect(s_igCB, TQT_SIGNAL(toggled(bool)), TQT_SLOT(changed()));
+ connect(q_uoteCharacters, TQT_SIGNAL(textChanged(const TQString&)), TQT_SLOT(changed()));
+ connect(o_penAttCB, TQT_SIGNAL(toggled(bool)), TQT_SLOT(changed()));
+ connect(a_ltAttCB, TQT_SIGNAL(toggled(bool)), TQT_SLOT(changed()));
+ connect( mShowRefBar, TQT_SIGNAL(toggled(bool)), TQT_SLOT(changed()) );
+ connect( mAlwaysShowHTML, TQT_SIGNAL(toggled(bool)), TQT_SLOT(changed()) );
load();
}
@@ -1302,38 +1302,38 @@ void KNConfig::ReadNewsViewerWidget::save()
//=============================================================================================
-KNConfig::DisplayedHeadersWidget::DisplayedHeadersWidget( DisplayedHeaders *d, QWidget *p, const char *n ) :
+KNConfig::DisplayedHeadersWidget::DisplayedHeadersWidget( DisplayedHeaders *d, TQWidget *p, const char *n ) :
KCModule( p, n ),
s_ave( false ),
d_ata( d )
{
- QGridLayout *topL=new QGridLayout(this, 7,2, 5,5);
+ TQGridLayout *topL=new TQGridLayout(this, 7,2, 5,5);
//listbox
l_box=new KNDialogListBox(false, this);
- connect(l_box, SIGNAL(selected(int)), this, SLOT(slotItemSelected(int)));
- connect(l_box, SIGNAL(selectionChanged()), this, SLOT(slotSelectionChanged()));
+ connect(l_box, TQT_SIGNAL(selected(int)), this, TQT_SLOT(slotItemSelected(int)));
+ connect(l_box, TQT_SIGNAL(selectionChanged()), this, TQT_SLOT(slotSelectionChanged()));
topL->addMultiCellWidget(l_box, 0,6, 0,0);
// buttons
- a_ddBtn=new QPushButton(i18n("&Add..."), this);
- connect(a_ddBtn, SIGNAL(clicked()), this, SLOT(slotAddBtnClicked()));
+ a_ddBtn=new TQPushButton(i18n("&Add..."), this);
+ connect(a_ddBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotAddBtnClicked()));
topL->addWidget(a_ddBtn, 0,1);
- d_elBtn=new QPushButton(i18n("&Delete"), this);
- connect(d_elBtn, SIGNAL(clicked()), this, SLOT(slotDelBtnClicked()));
+ d_elBtn=new TQPushButton(i18n("&Delete"), this);
+ connect(d_elBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotDelBtnClicked()));
topL->addWidget(d_elBtn, 1,1);
- e_ditBtn=new QPushButton(i18n("modify something","&Edit..."), this);
- connect(e_ditBtn, SIGNAL(clicked()), this, SLOT(slotEditBtnClicked()));
+ e_ditBtn=new TQPushButton(i18n("modify something","&Edit..."), this);
+ connect(e_ditBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotEditBtnClicked()));
topL->addWidget(e_ditBtn, 2,1);
- u_pBtn=new QPushButton(i18n("&Up"), this);
- connect(u_pBtn, SIGNAL(clicked()), this, SLOT(slotUpBtnClicked()));
+ u_pBtn=new TQPushButton(i18n("&Up"), this);
+ connect(u_pBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotUpBtnClicked()));
topL->addWidget(u_pBtn, 4,1);
- d_ownBtn=new QPushButton(i18n("Do&wn"), this);
- connect(d_ownBtn, SIGNAL(clicked()), this, SLOT(slotDownBtnClicked()));
+ d_ownBtn=new TQPushButton(i18n("Do&wn"), this);
+ connect(d_ownBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotDownBtnClicked()));
topL->addWidget(d_ownBtn, 5,1);
topL->addRowSpacing(3,20); // separate up/down buttons
@@ -1354,8 +1354,8 @@ KNConfig::DisplayedHeadersWidget::~DisplayedHeadersWidget()
void KNConfig::DisplayedHeadersWidget::load()
{
l_box->clear();
- QValueList<KNDisplayedHeader*> list = d_ata->headers();
- for ( QValueList<KNDisplayedHeader*>::Iterator it = list.begin(); it != list.end(); ++it )
+ TQValueList<KNDisplayedHeader*> list = d_ata->headers();
+ for ( TQValueList<KNDisplayedHeader*>::Iterator it = list.begin(); it != list.end(); ++it )
l_box->insertItem( generateItem( (*it) ) );
}
@@ -1372,7 +1372,7 @@ void KNConfig::DisplayedHeadersWidget::save()
KNConfig::DisplayedHeadersWidget::HdrItem* KNConfig::DisplayedHeadersWidget::generateItem(KNDisplayedHeader *h)
{
- QString text;
+ TQString text;
if(h->hasName()) {
text=h->translatedName();
text+=": <";
@@ -1487,53 +1487,53 @@ void KNConfig::DisplayedHeadersWidget::slotDownBtnClicked()
//=============================================================================================
-KNConfig::DisplayedHeaderConfDialog::DisplayedHeaderConfDialog(KNDisplayedHeader *h, QWidget *p, char *n)
+KNConfig::DisplayedHeaderConfDialog::DisplayedHeaderConfDialog(KNDisplayedHeader *h, TQWidget *p, char *n)
: KDialogBase(Plain, i18n("Header Properties"),Ok|Cancel|Help, Ok, p, n),
h_dr(h)
{
- QFrame* page=plainPage();
- QGridLayout *topL=new QGridLayout(page, 2, 2, 0, 5);
+ TQFrame* page=plainPage();
+ TQGridLayout *topL=new TQGridLayout(page, 2, 2, 0, 5);
- QWidget *nameW = new QWidget(page);
- QGridLayout *nameL=new QGridLayout(nameW, 2, 2, 5);
+ TQWidget *nameW = new TQWidget(page);
+ TQGridLayout *nameL=new TQGridLayout(nameW, 2, 2, 5);
h_drC=new KComboBox(true, nameW);
h_drC->lineEdit()->setMaxLength(64);
- connect(h_drC, SIGNAL(activated(int)), this, SLOT(slotActivated(int)));
- nameL->addWidget(new QLabel(h_drC, i18n("H&eader:"),nameW),0,0);
+ connect(h_drC, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotActivated(int)));
+ nameL->addWidget(new TQLabel(h_drC, i18n("H&eader:"),nameW),0,0);
nameL->addWidget(h_drC,0,1);
n_ameE=new KLineEdit(nameW);
n_ameE->setMaxLength(64);
- nameL->addWidget(new QLabel(n_ameE, i18n("Displayed na&me:"),nameW),1,0);
+ nameL->addWidget(new TQLabel(n_ameE, i18n("Displayed na&me:"),nameW),1,0);
nameL->addWidget(n_ameE,1,1);
nameL->setColStretch(1,1);
topL->addMultiCellWidget(nameW,0,0,0,1);
- QGroupBox *ngb=new QGroupBox(i18n("Name"), page);
+ TQGroupBox *ngb=new TQGroupBox(i18n("Name"), page);
// ### hide style settings for now, the new viewer doesn't support this yet
ngb->hide();
- QVBoxLayout *ngbL = new QVBoxLayout(ngb, 8, 5);
+ TQVBoxLayout *ngbL = new TQVBoxLayout(ngb, 8, 5);
ngbL->setAutoAdd(true);
ngbL->addSpacing(fontMetrics().lineSpacing()-4);
- n_ameCB[0]=new QCheckBox(i18n("&Large"), ngb);
- n_ameCB[1]=new QCheckBox(i18n("&Bold"), ngb);
- n_ameCB[2]=new QCheckBox(i18n("&Italic"), ngb);
- n_ameCB[3]=new QCheckBox(i18n("&Underlined"), ngb);
+ n_ameCB[0]=new TQCheckBox(i18n("&Large"), ngb);
+ n_ameCB[1]=new TQCheckBox(i18n("&Bold"), ngb);
+ n_ameCB[2]=new TQCheckBox(i18n("&Italic"), ngb);
+ n_ameCB[3]=new TQCheckBox(i18n("&Underlined"), ngb);
topL->addWidget(ngb,1,0);
- QGroupBox *vgb=new QGroupBox(i18n("Value"), page);
+ TQGroupBox *vgb=new TQGroupBox(i18n("Value"), page);
// ### hide style settings for now, the new viewer doen't support this yet
vgb->hide();
- QVBoxLayout *vgbL = new QVBoxLayout(vgb, 8, 5);
+ TQVBoxLayout *vgbL = new TQVBoxLayout(vgb, 8, 5);
vgbL->setAutoAdd(true);
vgbL->addSpacing(fontMetrics().lineSpacing()-4);
- v_alueCB[0]=new QCheckBox(i18n("L&arge"), vgb);
- v_alueCB[1]=new QCheckBox(i18n("Bol&d"), vgb);
- v_alueCB[2]=new QCheckBox(i18n("I&talic"), vgb);
- v_alueCB[3]=new QCheckBox(i18n("U&nderlined"), vgb);
+ v_alueCB[0]=new TQCheckBox(i18n("L&arge"), vgb);
+ v_alueCB[1]=new TQCheckBox(i18n("Bol&d"), vgb);
+ v_alueCB[2]=new TQCheckBox(i18n("I&talic"), vgb);
+ v_alueCB[3]=new TQCheckBox(i18n("U&nderlined"), vgb);
topL->addWidget(vgb,1,1);
topL->setColStretch(0,1);
@@ -1551,7 +1551,7 @@ KNConfig::DisplayedHeaderConfDialog::DisplayedHeaderConfDialog(KNDisplayedHeader
setFixedHeight(sizeHint().height());
KNHelper::restoreWindowSize("accReadHdrPropDLG", this, sizeHint());
- connect(n_ameE, SIGNAL(textChanged(const QString&)), SLOT(slotNameChanged(const QString&)));
+ connect(n_ameE, TQT_SIGNAL(textChanged(const TQString&)), TQT_SLOT(slotNameChanged(const TQString&)));
setHelp("anc-knode-headers");
slotNameChanged( n_ameE->text() );
@@ -1587,7 +1587,7 @@ void KNConfig::DisplayedHeaderConfDialog::slotActivated(int pos)
// disable the name format options when the name is empty
-void KNConfig::DisplayedHeaderConfDialog::slotNameChanged(const QString& str)
+void KNConfig::DisplayedHeaderConfDialog::slotNameChanged(const TQString& str)
{
for(int i=0; i<4; i++)
n_ameCB[i]->setEnabled(!str.isEmpty());
@@ -1596,27 +1596,27 @@ void KNConfig::DisplayedHeaderConfDialog::slotNameChanged(const QString& str)
//=============================================================================================
-KNConfig::ScoringWidget::ScoringWidget( Scoring *d, QWidget *p, const char *n ) :
+KNConfig::ScoringWidget::ScoringWidget( Scoring *d, TQWidget *p, const char *n ) :
KCModule( p, n ),
d_ata( d )
{
- QGridLayout *topL = new QGridLayout(this,4,2, 5,5);
+ TQGridLayout *topL = new TQGridLayout(this,4,2, 5,5);
ksc = new KScoringEditorWidget(knGlobals.scoringManager(), this);
topL->addMultiCellWidget(ksc, 0,0, 0,1);
topL->addRowSpacing(1, 10);
i_gnored=new KIntSpinBox(-100000, 100000, 1, 0, 10, this);
- QLabel *l=new QLabel(i_gnored, i18n("Default score for &ignored threads:"), this);
+ TQLabel *l=new TQLabel(i_gnored, i18n("Default score for &ignored threads:"), this);
topL->addWidget(l, 2, 0);
topL->addWidget(i_gnored, 2, 1);
- connect(i_gnored, SIGNAL(valueChanged(int)), SLOT(changed()));
+ connect(i_gnored, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(changed()));
w_atched=new KIntSpinBox(-100000, 100000, 1, 0, 10, this);
- l=new QLabel(w_atched, i18n("Default score for &watched threads:"), this);
+ l=new TQLabel(w_atched, i18n("Default score for &watched threads:"), this);
topL->addWidget(l, 3, 0);
topL->addWidget(w_atched, 3, 1);
- connect(w_atched, SIGNAL(valueChanged(int)), SLOT(changed()));
+ connect(w_atched, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(changed()));
topL->setColStretch(0, 1);
@@ -1647,59 +1647,59 @@ void KNConfig::ScoringWidget::save()
//=============================================================================================
-KNConfig::FilterListWidget::FilterListWidget( QWidget *p, const char *n ) :
+KNConfig::FilterListWidget::FilterListWidget( TQWidget *p, const char *n ) :
KCModule( p, n ),
f_ilManager( knGlobals.filterManager() )
{
- QGridLayout *topL=new QGridLayout(this, 6,2, 5,5);
+ TQGridLayout *topL=new TQGridLayout(this, 6,2, 5,5);
// == Filters =================================================
f_lb=new KNDialogListBox(false, this);
- topL->addWidget(new QLabel(f_lb, i18n("&Filters:"),this),0,0);
+ topL->addWidget(new TQLabel(f_lb, i18n("&Filters:"),this),0,0);
- connect(f_lb, SIGNAL(selectionChanged()), SLOT(slotSelectionChangedFilter()));
- connect(f_lb, SIGNAL(selected(int)), SLOT(slotItemSelectedFilter(int)));
+ connect(f_lb, TQT_SIGNAL(selectionChanged()), TQT_SLOT(slotSelectionChangedFilter()));
+ connect(f_lb, TQT_SIGNAL(selected(int)), TQT_SLOT(slotItemSelectedFilter(int)));
topL->addMultiCellWidget(f_lb,1,5,0,0);
- a_ddBtn=new QPushButton(i18n("&Add..."), this);
- connect(a_ddBtn, SIGNAL(clicked()), this, SLOT(slotAddBtnClicked()));
+ a_ddBtn=new TQPushButton(i18n("&Add..."), this);
+ connect(a_ddBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotAddBtnClicked()));
topL->addWidget(a_ddBtn,1,1);
- e_ditBtn=new QPushButton(i18n("modify something","&Edit..."), this);
- connect(e_ditBtn, SIGNAL(clicked()), this, SLOT(slotEditBtnClicked()));
+ e_ditBtn=new TQPushButton(i18n("modify something","&Edit..."), this);
+ connect(e_ditBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotEditBtnClicked()));
topL->addWidget(e_ditBtn,2,1);
- c_opyBtn=new QPushButton(i18n("Co&py..."), this);
- connect(c_opyBtn, SIGNAL(clicked()), this, SLOT(slotCopyBtnClicked()));
+ c_opyBtn=new TQPushButton(i18n("Co&py..."), this);
+ connect(c_opyBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotCopyBtnClicked()));
topL->addWidget(c_opyBtn,3,1);
- d_elBtn=new QPushButton(i18n("&Delete"), this);
- connect(d_elBtn, SIGNAL(clicked()), this, SLOT(slotDelBtnClicked()));
+ d_elBtn=new TQPushButton(i18n("&Delete"), this);
+ connect(d_elBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotDelBtnClicked()));
topL->addWidget(d_elBtn,4,1);
// == Menu ====================================================
m_lb=new KNDialogListBox(false, this);
- topL->addWidget(new QLabel(m_lb, i18n("&Menu:"),this),6,0);
+ topL->addWidget(new TQLabel(m_lb, i18n("&Menu:"),this),6,0);
- connect(m_lb, SIGNAL(selectionChanged()), SLOT(slotSelectionChangedMenu()));
+ connect(m_lb, TQT_SIGNAL(selectionChanged()), TQT_SLOT(slotSelectionChangedMenu()));
topL->addMultiCellWidget(m_lb,7,11,0,0);
- u_pBtn=new QPushButton(i18n("&Up"), this);
- connect(u_pBtn, SIGNAL(clicked()), this, SLOT(slotUpBtnClicked()));
+ u_pBtn=new TQPushButton(i18n("&Up"), this);
+ connect(u_pBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotUpBtnClicked()));
topL->addWidget(u_pBtn,7,1);
- d_ownBtn=new QPushButton(i18n("Do&wn"), this);
- connect(d_ownBtn, SIGNAL(clicked()), this, SLOT(slotDownBtnClicked()));
+ d_ownBtn=new TQPushButton(i18n("Do&wn"), this);
+ connect(d_ownBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotDownBtnClicked()));
topL->addWidget(d_ownBtn,8,1);
- s_epAddBtn=new QPushButton(i18n("Add\n&Separator"), this);
- connect(s_epAddBtn, SIGNAL(clicked()), this, SLOT(slotSepAddBtnClicked()));
+ s_epAddBtn=new TQPushButton(i18n("Add\n&Separator"), this);
+ connect(s_epAddBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotSepAddBtnClicked()));
topL->addWidget(s_epAddBtn,9,1);
- s_epRemBtn=new QPushButton(i18n("&Remove\nSeparator"), this);
- connect(s_epRemBtn, SIGNAL(clicked()), this, SLOT(slotSepRemBtnClicked()));
+ s_epRemBtn=new TQPushButton(i18n("&Remove\nSeparator"), this);
+ connect(s_epRemBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotSepRemBtnClicked()));
topL->addWidget(s_epRemBtn,10,1);
topL->setRowStretch(5,1);
@@ -1791,10 +1791,10 @@ void KNConfig::FilterListWidget::removeMenuItem(KNArticleFilter *f)
}
-QValueList<int> KNConfig::FilterListWidget::menuOrder()
+TQValueList<int> KNConfig::FilterListWidget::menuOrder()
{
KNArticleFilter *f;
- QValueList<int> lst;
+ TQValueList<int> lst;
for(uint i=0; i<m_lb->count(); i++) {
f= (static_cast<LBoxItem*>(m_lb->item(i)))->filter;
@@ -1807,7 +1807,7 @@ QValueList<int> KNConfig::FilterListWidget::menuOrder()
}
-int KNConfig::FilterListWidget::findItem(QListBox *l, KNArticleFilter *f)
+int KNConfig::FilterListWidget::findItem(TQListBox *l, KNArticleFilter *f)
{
int idx=0;
bool found=false;
@@ -1929,79 +1929,79 @@ void KNConfig::FilterListWidget::slotSelectionChangedMenu()
//=============================================================================================
-KNConfig::PostNewsTechnicalWidget::PostNewsTechnicalWidget( PostNewsTechnical *d, QWidget *p, const char *n ) :
+KNConfig::PostNewsTechnicalWidget::PostNewsTechnicalWidget( PostNewsTechnical *d, TQWidget *p, const char *n ) :
KCModule( p, n ),
d_ata( d )
{
- QVBoxLayout *topL=new QVBoxLayout(this, 5);
+ TQVBoxLayout *topL=new TQVBoxLayout(this, 5);
// ==== General =============================================================
- QGroupBox *ggb=new QGroupBox(i18n("General"), this);
- QGridLayout *ggbL=new QGridLayout(ggb, 6,2, 8,5);
+ TQGroupBox *ggb=new TQGroupBox(i18n("General"), this);
+ TQGridLayout *ggbL=new TQGridLayout(ggb, 6,2, 8,5);
topL->addWidget(ggb);
ggbL->addRowSpacing(0, fontMetrics().lineSpacing()-4);
- c_harset=new QComboBox(ggb);
+ c_harset=new TQComboBox(ggb);
c_harset->insertStringList(d->composerCharsets());
- ggbL->addWidget(new QLabel(c_harset, i18n("Cha&rset:"), ggb), 1,0);
+ ggbL->addWidget(new TQLabel(c_harset, i18n("Cha&rset:"), ggb), 1,0);
ggbL->addWidget(c_harset, 1,1);
- connect(c_harset, SIGNAL(activated(int)), SLOT(changed()));
+ connect(c_harset, TQT_SIGNAL(activated(int)), TQT_SLOT(changed()));
- e_ncoding=new QComboBox(ggb);
+ e_ncoding=new TQComboBox(ggb);
e_ncoding->insertItem(i18n("Allow 8-bit"));
e_ncoding->insertItem(i18n("7-bit (Quoted-Printable)"));
- ggbL->addWidget(new QLabel(e_ncoding, i18n("Enco&ding:"), ggb), 2,0);
+ ggbL->addWidget(new TQLabel(e_ncoding, i18n("Enco&ding:"), ggb), 2,0);
ggbL->addWidget(e_ncoding, 2,1);
- connect(e_ncoding, SIGNAL(activated(int)), SLOT(changed()));
+ connect(e_ncoding, TQT_SIGNAL(activated(int)), TQT_SLOT(changed()));
- u_seOwnCSCB=new QCheckBox(i18n("Use o&wn default charset when replying"), ggb);
+ u_seOwnCSCB=new TQCheckBox(i18n("Use o&wn default charset when replying"), ggb);
ggbL->addMultiCellWidget(u_seOwnCSCB, 3,3, 0,1);
- connect(u_seOwnCSCB, SIGNAL(toggled(bool)), SLOT(changed()));
+ connect(u_seOwnCSCB, TQT_SIGNAL(toggled(bool)), TQT_SLOT(changed()));
- g_enMIdCB=new QCheckBox(i18n("&Generate message-id"), ggb);
- connect(g_enMIdCB, SIGNAL(toggled(bool)), this, SLOT(slotGenMIdCBToggled(bool)));
+ g_enMIdCB=new TQCheckBox(i18n("&Generate message-id"), ggb);
+ connect(g_enMIdCB, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotGenMIdCBToggled(bool)));
ggbL->addMultiCellWidget(g_enMIdCB, 4,4, 0,1);
h_ost=new KLineEdit(ggb);
h_ost->setEnabled(false);
- h_ostL=new QLabel(h_ost, i18n("Ho&st name:"), ggb);
+ h_ostL=new TQLabel(h_ost, i18n("Ho&st name:"), ggb);
h_ostL->setEnabled(false);
ggbL->addWidget(h_ostL, 5,0);
ggbL->addWidget(h_ost, 5,1);
ggbL->setColStretch(1,1);
- connect(h_ost, SIGNAL(textChanged(const QString&)), SLOT(changed()));
+ connect(h_ost, TQT_SIGNAL(textChanged(const TQString&)), TQT_SLOT(changed()));
// ==== X-Headers =============================================================
- QGroupBox *xgb=new QGroupBox(i18n("X-Headers"), this);
+ TQGroupBox *xgb=new TQGroupBox(i18n("X-Headers"), this);
topL->addWidget(xgb, 1);
- QGridLayout *xgbL=new QGridLayout(xgb, 7,2, 8,5);
+ TQGridLayout *xgbL=new TQGridLayout(xgb, 7,2, 8,5);
xgbL->addRowSpacing(0, fontMetrics().lineSpacing()-4);
l_box=new KNDialogListBox(false, xgb);
- connect(l_box, SIGNAL(selected(int)), SLOT(slotItemSelected(int)));
- connect(l_box, SIGNAL(selectionChanged()), SLOT(slotSelectionChanged()));
+ connect(l_box, TQT_SIGNAL(selected(int)), TQT_SLOT(slotItemSelected(int)));
+ connect(l_box, TQT_SIGNAL(selectionChanged()), TQT_SLOT(slotSelectionChanged()));
xgbL->addMultiCellWidget(l_box, 1,4, 0,0);
- a_ddBtn=new QPushButton(i18n("&Add..."), xgb);
- connect(a_ddBtn, SIGNAL(clicked()), SLOT(slotAddBtnClicked()));
+ a_ddBtn=new TQPushButton(i18n("&Add..."), xgb);
+ connect(a_ddBtn, TQT_SIGNAL(clicked()), TQT_SLOT(slotAddBtnClicked()));
xgbL->addWidget(a_ddBtn, 1,1);
- d_elBtn=new QPushButton(i18n("Dele&te"), xgb);
- connect(d_elBtn, SIGNAL(clicked()), SLOT(slotDelBtnClicked()));
+ d_elBtn=new TQPushButton(i18n("Dele&te"), xgb);
+ connect(d_elBtn, TQT_SIGNAL(clicked()), TQT_SLOT(slotDelBtnClicked()));
xgbL->addWidget(d_elBtn, 2,1);
- e_ditBtn=new QPushButton(i18n("modify something","&Edit..."), xgb);
- connect(e_ditBtn, SIGNAL(clicked()), SLOT(slotEditBtnClicked()));
+ e_ditBtn=new TQPushButton(i18n("modify something","&Edit..."), xgb);
+ connect(e_ditBtn, TQT_SIGNAL(clicked()), TQT_SLOT(slotEditBtnClicked()));
xgbL->addWidget(e_ditBtn, 3,1);
- QLabel *placeHolders = new QLabel(i18n("<qt>Placeholders for replies: <b>%NAME</b>=sender's name, <b>%EMAIL</b>=sender's address</qt>"), xgb);
+ TQLabel *placeHolders = new TQLabel(i18n("<qt>Placeholders for replies: <b>%NAME</b>=sender's name, <b>%EMAIL</b>=sender's address</qt>"), xgb);
xgbL->addMultiCellWidget(placeHolders, 5, 5, 0, 1);
- i_ncUaCB=new QCheckBox(i18n("Do not add the \"&User-Agent\" identification header"), xgb);
+ i_ncUaCB=new TQCheckBox(i18n("Do not add the \"&User-Agent\" identification header"), xgb);
xgbL->addMultiCellWidget(i_ncUaCB, 6,6, 0,1);
- connect(i_ncUaCB, SIGNAL(toggled(bool)), SLOT(changed()));
+ connect(i_ncUaCB, TQT_SIGNAL(toggled(bool)), TQT_SLOT(changed()));
xgbL->setRowStretch(4,1);
xgbL->setColStretch(0,1);
@@ -2074,7 +2074,7 @@ void KNConfig::PostNewsTechnicalWidget::slotItemSelected(int)
void KNConfig::PostNewsTechnicalWidget::slotAddBtnClicked()
{
- XHeaderConfDialog *dlg=new XHeaderConfDialog(QString::null, this);
+ XHeaderConfDialog *dlg=new XHeaderConfDialog(TQString::null, this);
if (dlg->exec())
l_box->insertItem(dlg->result());
@@ -2119,16 +2119,16 @@ void KNConfig::PostNewsTechnicalWidget::slotEditBtnClicked()
//===================================================================================================
-KNConfig::XHeaderConfDialog::XHeaderConfDialog(const QString &h, QWidget *p, const char *n)
+KNConfig::XHeaderConfDialog::XHeaderConfDialog(const TQString &h, TQWidget *p, const char *n)
: KDialogBase(Plain, i18n("X-Headers"),Ok|Cancel, Ok, p, n)
{
- QFrame* page=plainPage();
- QHBoxLayout *topL=new QHBoxLayout(page, 5,8);
+ TQFrame* page=plainPage();
+ TQHBoxLayout *topL=new TQHBoxLayout(page, 5,8);
topL->setAutoAdd(true);
- new QLabel("X-", page);
+ new TQLabel("X-", page);
n_ame=new KLineEdit(page);
- new QLabel(":", page);
+ new TQLabel(":", page);
v_alue=new KLineEdit(page);
int pos=h.find(": ", 2);
@@ -2153,95 +2153,95 @@ KNConfig::XHeaderConfDialog::~XHeaderConfDialog()
-QString KNConfig::XHeaderConfDialog::result()
+TQString KNConfig::XHeaderConfDialog::result()
{
- QString value = v_alue->text();
+ TQString value = v_alue->text();
// just in case someone pastes a newline
value.replace( '\n', ' ' );
- return QString( "X-%1: %2" ).arg( n_ame->text() ).arg( value );
+ return TQString( "X-%1: %2" ).arg( n_ame->text() ).arg( value );
}
//===================================================================================================
-KNConfig::PostNewsComposerWidget::PostNewsComposerWidget( PostNewsComposer *d, QWidget *p, const char *n ) :
+KNConfig::PostNewsComposerWidget::PostNewsComposerWidget( PostNewsComposer *d, TQWidget *p, const char *n ) :
KCModule( p, n ),
d_ata( d )
{
- QVBoxLayout *topL=new QVBoxLayout(this, 5);
+ TQVBoxLayout *topL=new TQVBoxLayout(this, 5);
// === general ===========================================================
- QGroupBox *generalB=new QGroupBox(i18n("General"), this);
+ TQGroupBox *generalB=new TQGroupBox(i18n("General"), this);
topL->addWidget(generalB);
- QGridLayout *generalL=new QGridLayout(generalB, 3,3, 8,5);
+ TQGridLayout *generalL=new TQGridLayout(generalB, 3,3, 8,5);
generalL->addRowSpacing(0, fontMetrics().lineSpacing()-4);
- w_ordWrapCB=new QCheckBox(i18n("Word &wrap at column:"), generalB);
+ w_ordWrapCB=new TQCheckBox(i18n("Word &wrap at column:"), generalB);
generalL->addWidget(w_ordWrapCB,1,0);
m_axLen=new KIntSpinBox(20, 200, 1, 20, 10, generalB);
generalL->addWidget(m_axLen,1,2);
- connect(w_ordWrapCB, SIGNAL(toggled(bool)), m_axLen, SLOT(setEnabled(bool)));
- connect(w_ordWrapCB, SIGNAL(toggled(bool)), SLOT(changed()));
- connect(m_axLen, SIGNAL(valueChanged(int)), SLOT(changed()));
+ connect(w_ordWrapCB, TQT_SIGNAL(toggled(bool)), m_axLen, TQT_SLOT(setEnabled(bool)));
+ connect(w_ordWrapCB, TQT_SIGNAL(toggled(bool)), TQT_SLOT(changed()));
+ connect(m_axLen, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(changed()));
- o_wnSigCB=new QCheckBox(i18n("Appe&nd signature automatically"), generalB);
+ o_wnSigCB=new TQCheckBox(i18n("Appe&nd signature automatically"), generalB);
generalL->addMultiCellWidget(o_wnSigCB,2,2,0,1);
- connect(o_wnSigCB, SIGNAL(toggled(bool)), SLOT(changed()));
+ connect(o_wnSigCB, TQT_SIGNAL(toggled(bool)), TQT_SLOT(changed()));
generalL->setColStretch(1,1);
// === reply =============================================================
- QGroupBox *replyB=new QGroupBox(i18n("Reply"), this);
+ TQGroupBox *replyB=new TQGroupBox(i18n("Reply"), this);
topL->addWidget(replyB);
- QGridLayout *replyL=new QGridLayout(replyB, 7,2, 8,5);
+ TQGridLayout *replyL=new TQGridLayout(replyB, 7,2, 8,5);
replyL->addRowSpacing(0, fontMetrics().lineSpacing()-4);
i_ntro=new KLineEdit(replyB);
- replyL->addMultiCellWidget(new QLabel(i_ntro,i18n("&Introduction phrase:"), replyB),1,1,0,1);
+ replyL->addMultiCellWidget(new TQLabel(i_ntro,i18n("&Introduction phrase:"), replyB),1,1,0,1);
replyL->addMultiCellWidget(i_ntro, 2,2,0,1);
- replyL->addMultiCellWidget(new QLabel(i18n("<qt>Placeholders: <b>%NAME</b>=sender's name, <b>%EMAIL</b>=sender's address,<br><b>%DATE</b>=date, <b>%MSID</b>=message-id, <b>%GROUP</b>=group name, <b>%L</b>=line break</qt>"), replyB),3,3,0,1);
- connect(i_ntro, SIGNAL(textChanged(const QString&)), SLOT(changed()));
+ replyL->addMultiCellWidget(new TQLabel(i18n("<qt>Placeholders: <b>%NAME</b>=sender's name, <b>%EMAIL</b>=sender's address,<br><b>%DATE</b>=date, <b>%MSID</b>=message-id, <b>%GROUP</b>=group name, <b>%L</b>=line break</qt>"), replyB),3,3,0,1);
+ connect(i_ntro, TQT_SIGNAL(textChanged(const TQString&)), TQT_SLOT(changed()));
- r_ewrapCB=new QCheckBox(i18n("Rewrap quoted te&xt automatically"), replyB);
+ r_ewrapCB=new TQCheckBox(i18n("Rewrap quoted te&xt automatically"), replyB);
replyL->addMultiCellWidget(r_ewrapCB, 4,4,0,1);
- connect(r_ewrapCB, SIGNAL(toggled(bool)), SLOT(changed()));
+ connect(r_ewrapCB, TQT_SIGNAL(toggled(bool)), TQT_SLOT(changed()));
- a_uthSigCB=new QCheckBox(i18n("Include the a&uthor's signature"), replyB);
+ a_uthSigCB=new TQCheckBox(i18n("Include the a&uthor's signature"), replyB);
replyL->addMultiCellWidget(a_uthSigCB, 5,5,0,1);
- connect(a_uthSigCB, SIGNAL(toggled(bool)), SLOT(changed()));
+ connect(a_uthSigCB, TQT_SIGNAL(toggled(bool)), TQT_SLOT(changed()));
- c_ursorOnTopCB=new QCheckBox(i18n("Put the cursor &below the introduction phrase"), replyB);
+ c_ursorOnTopCB=new TQCheckBox(i18n("Put the cursor &below the introduction phrase"), replyB);
replyL->addMultiCellWidget(c_ursorOnTopCB, 6,6,0,1);
- connect(c_ursorOnTopCB, SIGNAL(toggled(bool)), SLOT(changed()));
+ connect(c_ursorOnTopCB, TQT_SIGNAL(toggled(bool)), TQT_SLOT(changed()));
replyL->setColStretch(1,1);
// === external editor ========================================================
- QGroupBox *editorB=new QGroupBox(i18n("External Editor"), this);
+ TQGroupBox *editorB=new TQGroupBox(i18n("External Editor"), this);
topL->addWidget(editorB);
- QGridLayout *editorL=new QGridLayout(editorB, 6,3, 8,5);
+ TQGridLayout *editorL=new TQGridLayout(editorB, 6,3, 8,5);
editorL->addRowSpacing(0, fontMetrics().lineSpacing()-4);
e_ditor=new KLineEdit(editorB);
- editorL->addWidget(new QLabel(e_ditor, i18n("Specify edi&tor:"), editorB),1,0);
+ editorL->addWidget(new TQLabel(e_ditor, i18n("Specify edi&tor:"), editorB),1,0);
editorL->addWidget(e_ditor,1,1);
- QPushButton *btn = new QPushButton(i18n("Choo&se..."),editorB);
- connect(btn, SIGNAL(clicked()), SLOT(slotChooseEditor()));
- connect(e_ditor, SIGNAL(textChanged(const QString&)), SLOT(changed()));
+ TQPushButton *btn = new TQPushButton(i18n("Choo&se..."),editorB);
+ connect(btn, TQT_SIGNAL(clicked()), TQT_SLOT(slotChooseEditor()));
+ connect(e_ditor, TQT_SIGNAL(textChanged(const TQString&)), TQT_SLOT(changed()));
editorL->addWidget(btn,1,2);
- editorL->addMultiCellWidget(new QLabel(i18n("%f will be replaced with the filename to edit."), editorB),2,2,0,2);
+ editorL->addMultiCellWidget(new TQLabel(i18n("%f will be replaced with the filename to edit."), editorB),2,2,0,2);
- e_xternCB=new QCheckBox(i18n("Start exte&rnal editor automatically"), editorB);
+ e_xternCB=new TQCheckBox(i18n("Start exte&rnal editor automatically"), editorB);
editorL->addMultiCellWidget(e_xternCB, 3,3,0,2);
- connect(e_xternCB, SIGNAL(clicked()), SLOT(changed()));
+ connect(e_xternCB, TQT_SIGNAL(clicked()), TQT_SLOT(changed()));
editorL->setColStretch(1,1);
@@ -2289,11 +2289,11 @@ void KNConfig::PostNewsComposerWidget::save()
void KNConfig::PostNewsComposerWidget::slotChooseEditor()
{
- QString path=e_ditor->text().simplifyWhiteSpace();
+ TQString path=e_ditor->text().simplifyWhiteSpace();
if (path.right(3) == " %f")
path.truncate(path.length()-3);
- path=KFileDialog::getOpenFileName(path, QString::null, this, i18n("Choose Editor"));
+ path=KFileDialog::getOpenFileName(path, TQString::null, this, i18n("Choose Editor"));
if (!path.isEmpty())
e_ditor->setText(path+" %f");
@@ -2303,14 +2303,14 @@ void KNConfig::PostNewsComposerWidget::slotChooseEditor()
//===================================================================================================
-KNConfig::PostNewsSpellingWidget::PostNewsSpellingWidget( QWidget *p, const char *n ) :
+KNConfig::PostNewsSpellingWidget::PostNewsSpellingWidget( TQWidget *p, const char *n ) :
KCModule( p, n )
{
- QVBoxLayout *topL=new QVBoxLayout(this, 5);
+ TQVBoxLayout *topL=new TQVBoxLayout(this, 5);
c_onf = new KSpellConfig( this, "spell", 0, false );
topL->addWidget(c_onf);
- connect(c_onf, SIGNAL(configChanged()), SLOT(changed()));
+ connect(c_onf, TQT_SIGNAL(configChanged()), TQT_SLOT(changed()));
topL->addStretch(1);
}
@@ -2329,13 +2329,13 @@ void KNConfig::PostNewsSpellingWidget::save()
//==============================================================================================================
-KNConfig::PrivacyWidget::PrivacyWidget(QWidget *p, const char *n) :
+KNConfig::PrivacyWidget::PrivacyWidget(TQWidget *p, const char *n) :
KCModule( p, n )
{
- QBoxLayout *topLayout = new QVBoxLayout(this, 5);
+ TQBoxLayout *topLayout = new TQVBoxLayout(this, 5);
c_onf = new Kpgp::Config(this,"knode pgp config",false);
topLayout->addWidget(c_onf);
- connect(c_onf, SIGNAL(changed()), SLOT(changed()));
+ connect(c_onf, TQT_SIGNAL(changed()), TQT_SLOT(changed()));
topLayout->addStretch(1);
@@ -2360,60 +2360,60 @@ void KNConfig::PrivacyWidget::save()
//BEGIN: Cleanup configuration widgets ---------------------------------------
-KNConfig::GroupCleanupWidget::GroupCleanupWidget( Cleanup *data, QWidget *parent, const char *name )
- : QWidget( parent, name ), mData( data )
+KNConfig::GroupCleanupWidget::GroupCleanupWidget( Cleanup *data, TQWidget *parent, const char *name )
+ : TQWidget( parent, name ), mData( data )
{
- QVBoxLayout *top = new QVBoxLayout( this );
+ TQVBoxLayout *top = new TQVBoxLayout( this );
if (!mData->isGlobal()) {
- mDefault = new QCheckBox( i18n("&Use global cleanup configuration"), this );
- connect( mDefault, SIGNAL(toggled(bool)), SLOT(slotDefaultToggled(bool)) );
+ mDefault = new TQCheckBox( i18n("&Use global cleanup configuration"), this );
+ connect( mDefault, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotDefaultToggled(bool)) );
top->addWidget( mDefault );
}
- mExpGroup = new QGroupBox( i18n("Newsgroup Cleanup Settings"), this );
+ mExpGroup = new TQGroupBox( i18n("Newsgroup Cleanup Settings"), this );
mExpGroup->setColumnLayout(0, Qt::Vertical );
mExpGroup->layout()->setSpacing( KDialog::spacingHint() );
mExpGroup->layout()->setMargin( KDialog::marginHint() );
top->addWidget( mExpGroup );
- QGridLayout *grid = new QGridLayout( mExpGroup->layout(), 7, 2 );
+ TQGridLayout *grid = new TQGridLayout( mExpGroup->layout(), 7, 2 );
grid->setRowSpacing( 0, KDialog::spacingHint() );
- mExpEnabled = new QCheckBox( i18n("&Expire old articles automatically"), mExpGroup );
+ mExpEnabled = new TQCheckBox( i18n("&Expire old articles automatically"), mExpGroup );
grid->addMultiCellWidget( mExpEnabled, 1, 1, 0, 1 );
- connect( mExpEnabled, SIGNAL(toggled(bool)), SIGNAL(changed()) );
+ connect( mExpEnabled, TQT_SIGNAL(toggled(bool)), TQT_SIGNAL(changed()) );
mExpDays = new KIntSpinBox( 0, 99999, 1, 0, 10, mExpGroup );
- QLabel *label = new QLabel( mExpDays, i18n("&Purge groups every:"), mExpGroup );
+ TQLabel *label = new TQLabel( mExpDays, i18n("&Purge groups every:"), mExpGroup );
grid->addWidget( label, 2, 0 );
grid->addWidget( mExpDays, 2, 1, Qt::AlignRight );
- connect( mExpDays, SIGNAL(valueChanged(int)), SIGNAL(changed()) );
- connect( mExpDays, SIGNAL(valueChanged(int)), SLOT(expDaysChanged(int)) );
- connect( mExpEnabled, SIGNAL(toggled(bool)), label, SLOT(setEnabled(bool)) );
- connect( mExpEnabled, SIGNAL(toggled(bool)), mExpDays, SLOT(setEnabled(bool)) );
+ connect( mExpDays, TQT_SIGNAL(valueChanged(int)), TQT_SIGNAL(changed()) );
+ connect( mExpDays, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(expDaysChanged(int)) );
+ connect( mExpEnabled, TQT_SIGNAL(toggled(bool)), label, TQT_SLOT(setEnabled(bool)) );
+ connect( mExpEnabled, TQT_SIGNAL(toggled(bool)), mExpDays, TQT_SLOT(setEnabled(bool)) );
mExpReadDays = new KIntSpinBox( 0, 99999, 1, 0, 10, mExpGroup );
- label = new QLabel( mExpReadDays, i18n("&Keep read articles:"), mExpGroup );
+ label = new TQLabel( mExpReadDays, i18n("&Keep read articles:"), mExpGroup );
grid->addWidget( label, 3, 0 );
grid->addWidget( mExpReadDays, 3, 1, Qt::AlignRight );
- connect( mExpReadDays, SIGNAL(valueChanged(int)), SIGNAL(changed()) );
- connect( mExpReadDays, SIGNAL(valueChanged(int)), SLOT(expReadDaysChanged(int)) );
+ connect( mExpReadDays, TQT_SIGNAL(valueChanged(int)), TQT_SIGNAL(changed()) );
+ connect( mExpReadDays, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(expReadDaysChanged(int)) );
mExpUnreadDays = new KIntSpinBox( 0, 99999, 1, 0, 10, mExpGroup );
- label = new QLabel( mExpUnreadDays, i18n("Keep u&nread articles:"), mExpGroup );
+ label = new TQLabel( mExpUnreadDays, i18n("Keep u&nread articles:"), mExpGroup );
grid->addWidget( label, 4, 0 );
grid->addWidget( mExpUnreadDays, 4, 1, Qt::AlignRight );
- connect( mExpUnreadDays, SIGNAL(valueChanged(int)), SIGNAL(changed()) );
- connect( mExpUnreadDays, SIGNAL(valueChanged(int)), SLOT(expUnreadDaysChanged(int)) );
+ connect( mExpUnreadDays, TQT_SIGNAL(valueChanged(int)), TQT_SIGNAL(changed()) );
+ connect( mExpUnreadDays, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(expUnreadDaysChanged(int)) );
- mExpUnavailable = new QCheckBox( i18n("&Remove articles that are not available on the server"), mExpGroup );
+ mExpUnavailable = new TQCheckBox( i18n("&Remove articles that are not available on the server"), mExpGroup );
grid->addMultiCellWidget( mExpUnavailable, 5, 5, 0, 1 );
- connect( mExpUnavailable, SIGNAL(toggled(bool)), SIGNAL(changed()) );
+ connect( mExpUnavailable, TQT_SIGNAL(toggled(bool)), TQT_SIGNAL(changed()) );
- mPreserveThreads = new QCheckBox( i18n("Preser&ve threads"), mExpGroup );
+ mPreserveThreads = new TQCheckBox( i18n("Preser&ve threads"), mExpGroup );
grid->addMultiCellWidget( mPreserveThreads, 6, 6, 0, 1 );
- connect( mPreserveThreads, SIGNAL(toggled(bool)), SIGNAL(changed()) );
+ connect( mPreserveThreads, TQT_SIGNAL(toggled(bool)), TQT_SIGNAL(changed()) );
grid->setColStretch(1,1);
}
@@ -2468,38 +2468,38 @@ void KNConfig::GroupCleanupWidget::slotDefaultToggled( bool state )
}
-KNConfig::CleanupWidget::CleanupWidget( QWidget *p, const char *n ) :
+KNConfig::CleanupWidget::CleanupWidget( TQWidget *p, const char *n ) :
KCModule( p, n ),
d_ata( knGlobals.configManager()->cleanup() )
{
- QVBoxLayout *topL=new QVBoxLayout(this, 5);
+ TQVBoxLayout *topL=new TQVBoxLayout(this, 5);
mGroupCleanup = new GroupCleanupWidget( d_ata, this );
topL->addWidget( mGroupCleanup );
- connect( mGroupCleanup, SIGNAL(changed()), SLOT(changed()) );
+ connect( mGroupCleanup, TQT_SIGNAL(changed()), TQT_SLOT(changed()) );
// === folders =========================================================
- QGroupBox *foldersB=new QGroupBox(i18n("Folders"), this);
+ TQGroupBox *foldersB=new TQGroupBox(i18n("Folders"), this);
foldersB->setColumnLayout(0, Qt::Vertical );
foldersB->layout()->setSpacing( KDialog::spacingHint() );
foldersB->layout()->setMargin( KDialog::marginHint() );
topL->addWidget(foldersB);
- QGridLayout *foldersL=new QGridLayout(foldersB->layout(), 3,2);
+ TQGridLayout *foldersL=new TQGridLayout(foldersB->layout(), 3,2);
foldersL->setRowSpacing( 0, KDialog::spacingHint() );
- f_olderCB=new QCheckBox(i18n("Co&mpact folders automatically"), foldersB);
- connect(f_olderCB, SIGNAL(toggled(bool)), this, SLOT(slotFolderCBtoggled(bool)));
+ f_olderCB=new TQCheckBox(i18n("Co&mpact folders automatically"), foldersB);
+ connect(f_olderCB, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotFolderCBtoggled(bool)));
foldersL->addMultiCellWidget(f_olderCB,1,1,0,1);
f_olderDays=new KIntSpinBox(0, 99999, 1, 0, 10, foldersB);
- f_olderDaysL=new QLabel(f_olderDays,i18n("P&urge folders every:"), foldersB);
+ f_olderDaysL=new TQLabel(f_olderDays,i18n("P&urge folders every:"), foldersB);
foldersL->addWidget(f_olderDaysL,2,0);
foldersL->addWidget(f_olderDays,2,1,Qt::AlignRight);
- connect(f_olderDays, SIGNAL(valueChanged(int)), SLOT(changed()));
- connect(f_olderDays, SIGNAL(valueChanged(int)), SLOT(slotFolderDaysChanged(int)));
+ connect(f_olderDays, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(changed()));
+ connect(f_olderDays, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(slotFolderDaysChanged(int)));
foldersL->setColStretch(1,1);
@@ -2551,22 +2551,22 @@ void KNConfig::CleanupWidget::slotFolderDaysChanged(int value)
//==============================================================================================================
/*
-KNConfig::CacheWidget::CacheWidget(Cache *d, QWidget *p, const char *n)
+KNConfig::CacheWidget::CacheWidget(Cache *d, TQWidget *p, const char *n)
: KCModule p, n), d_ata(d)
{
- QVBoxLayout *topL=new QVBoxLayout(this, 5);
+ TQVBoxLayout *topL=new TQVBoxLayout(this, 5);
// memory
- QGroupBox *memGB=new QGroupBox(i18n("Memory Cache"), this);
+ TQGroupBox *memGB=new TQGroupBox(i18n("Memory Cache"), this);
topL->addWidget(memGB);
- QGridLayout *memL=new QGridLayout(memGB, 3,2, 8,5);
+ TQGridLayout *memL=new TQGridLayout(memGB, 3,2, 8,5);
memL->addRowSpacing(0, fontMetrics().lineSpacing()-4);
- memL->addWidget(new QLabel(i18n("Max articles to keep:"), memGB), 1,0);
+ memL->addWidget(new TQLabel(i18n("Max articles to keep:"), memGB), 1,0);
m_emMaxArt=new KIntSpinBox(0, 99999, 1, 1, 10, memGB);
memL->addWidget(m_emMaxArt, 1,1);
- memL->addWidget(new QLabel(i18n("Max memory usage:"), memGB), 2,0);
+ memL->addWidget(new TQLabel(i18n("Max memory usage:"), memGB), 2,0);
m_emMaxKB=new KIntSpinBox(0, 99999, 1, 1, 10, memGB);
m_emMaxKB->setSuffix(" KB");
memL->addWidget(m_emMaxKB, 2,1);
@@ -2575,17 +2575,17 @@ KNConfig::CacheWidget::CacheWidget(Cache *d, QWidget *p, const char *n)
// disk
- QGroupBox *diskGB=new QGroupBox(i18n("Disk Cache"), this);
+ TQGroupBox *diskGB=new TQGroupBox(i18n("Disk Cache"), this);
topL->addWidget(diskGB);
- QGridLayout *diskL=new QGridLayout(diskGB, 3,2, 8,5);
+ TQGridLayout *diskL=new TQGridLayout(diskGB, 3,2, 8,5);
diskL->addRowSpacing(0, fontMetrics().lineSpacing()-4);
- d_iskMaxArtL=new QLabel(i18n("Max articles to keep:"), diskGB);
+ d_iskMaxArtL=new TQLabel(i18n("Max articles to keep:"), diskGB);
diskL->addWidget(d_iskMaxArtL, 2,0);
d_iskMaxArt=new KIntSpinBox(0, 99999, 1, 1, 10, diskGB);
diskL->addWidget(d_iskMaxArt, 2,1);
- d_iskMaxKBL=new QLabel(i18n("Max disk usage:"), diskGB);
+ d_iskMaxKBL=new TQLabel(i18n("Max disk usage:"), diskGB);
diskL->addWidget(d_iskMaxKBL, 3,0);
d_iskMaxKB=new KIntSpinBox(0, 99999, 1, 1, 10, diskGB);
d_iskMaxKB->setSuffix(" KB");
diff --git a/knode/knconfigwidgets.h b/knode/knconfigwidgets.h
index 109ea7dc7..0bd604e8c 100644
--- a/knode/knconfigwidgets.h
+++ b/knode/knconfigwidgets.h
@@ -68,27 +68,27 @@ class KDE_EXPORT IdentityWidget : public KCModule {
Q_OBJECT
public:
- IdentityWidget(Identity *d, QWidget *p=0, const char *n=0);
+ IdentityWidget(Identity *d, TQWidget *p=0, const char *n=0);
~IdentityWidget();
void load();
void save();
protected:
- QLabel *f_ileName;
+ TQLabel *f_ileName;
KLineEdit *n_ame,
*o_rga,
*e_mail,
*r_eplyTo,
*m_ailCopiesTo,
*s_ig;
- QRadioButton *s_igFile,
+ TQRadioButton *s_igFile,
*s_igEdit;
- QCheckBox *s_igGenerator;
- QPushButton *c_hooseBtn,
+ TQCheckBox *s_igGenerator;
+ TQPushButton *c_hooseBtn,
*e_ditBtn;
- QTextEdit *s_igEditor;
- QButtonGroup *b_uttonGroup;
+ TQTextEdit *s_igEditor;
+ TQButtonGroup *b_uttonGroup;
Kpgp::SecretKeyRequester
*s_igningKey;
KURLCompletion *c_ompletion;
@@ -99,7 +99,7 @@ class KDE_EXPORT IdentityWidget : public KCModule {
void slotSignatureType(int type);
void slotSignatureChoose();
void slotSignatureEdit();
- void textFileNameChanged(const QString &);
+ void textFileNameChanged(const TQString &);
};
@@ -109,7 +109,7 @@ class KDE_EXPORT NntpAccountListWidget : public KCModule {
Q_OBJECT
public:
- NntpAccountListWidget(QWidget *p=0, const char *n=0);
+ NntpAccountListWidget(TQWidget *p=0, const char *n=0);
~NntpAccountListWidget();
void load();
@@ -117,19 +117,19 @@ class KDE_EXPORT NntpAccountListWidget : public KCModule {
protected:
class LBoxItem : public KNListBoxItem {
public:
- LBoxItem(KNNntpAccount *a, const QString &t, QPixmap *p=0)
+ LBoxItem(KNNntpAccount *a, const TQString &t, TQPixmap *p=0)
: KNListBoxItem(t, p) , account(a) {}
~LBoxItem() {}
KNNntpAccount *account;
};
KNDialogListBox *l_box;
- QPushButton *a_ddBtn,
+ TQPushButton *a_ddBtn,
*d_elBtn,
*e_ditBtn,
*s_ubBtn;
- QPixmap p_ixmap;
- QLabel *s_erverInfo,
+ TQPixmap p_ixmap;
+ TQLabel *s_erverInfo,
*p_ortInfo;
KNAccountManager *a_ccManager;
@@ -156,7 +156,7 @@ class KDE_EXPORT NntpAccountConfDialog : public KDialogBase {
Q_OBJECT
public:
- NntpAccountConfDialog(KNNntpAccount* acc, QWidget *p=0, const char *n=0);
+ NntpAccountConfDialog(KNNntpAccount* acc, TQWidget *p=0, const char *n=0);
~NntpAccountConfDialog();
protected:
@@ -165,13 +165,13 @@ class KDE_EXPORT NntpAccountConfDialog : public KDialogBase {
*u_ser,
*p_ass,
*p_ort;
- QLabel *u_serLabel,
+ TQLabel *u_serLabel,
*p_assLabel,
*c_heckIntervalLabel;
KIntSpinBox *h_old,
*t_imeout,
*c_heckInterval;
- QCheckBox *f_etchDes,
+ TQCheckBox *f_etchDes,
*a_uth,
*u_seDiskCache,
*i_nterval;
@@ -197,7 +197,7 @@ class KDE_EXPORT SmtpAccountWidget : public SmtpAccountWidgetBase {
Q_OBJECT
public:
- SmtpAccountWidget(QWidget *p=0, const char *n=0);
+ SmtpAccountWidget(TQWidget *p=0, const char *n=0);
~SmtpAccountWidget() {}
virtual void load();
@@ -218,7 +218,7 @@ class KDE_EXPORT AppearanceWidget : public KCModule {
Q_OBJECT
public:
- AppearanceWidget(QWidget *p=0, const char *n=0);
+ AppearanceWidget(TQWidget *p=0, const char *n=0);
~AppearanceWidget();
void load();
@@ -228,49 +228,49 @@ class KDE_EXPORT AppearanceWidget : public KCModule {
//===================================================================================
// code taken from KMail, Copyright (C) 2000 Espen Sand, espen@kde.org
- class KDE_EXPORT ColorListItem : public QListBoxText {
+ class KDE_EXPORT ColorListItem : public TQListBoxText {
public:
- ColorListItem( const QString &text, const QColor &color=Qt::black );
+ ColorListItem( const TQString &text, const TQColor &color=Qt::black );
~ColorListItem();
- const QColor& color() { return mColor; }
- void setColor( const QColor &color ) { mColor = color; }
+ const TQColor& color() { return mColor; }
+ void setColor( const TQColor &color ) { mColor = color; }
protected:
- virtual void paint( QPainter * );
- virtual int height( const QListBox * ) const;
- virtual int width( const QListBox * ) const;
+ virtual void paint( TQPainter * );
+ virtual int height( const TQListBox * ) const;
+ virtual int width( const TQListBox * ) const;
private:
- QColor mColor;
+ TQColor mColor;
};
//===================================================================================
- class KDE_EXPORT FontListItem : public QListBoxText {
+ class KDE_EXPORT FontListItem : public TQListBoxText {
public:
- FontListItem( const QString &name, const QFont & );
+ FontListItem( const TQString &name, const TQFont & );
~FontListItem();
- const QFont& font() { return f_ont; }
- void setFont( const QFont &);
+ const TQFont& font() { return f_ont; }
+ void setFont( const TQFont &);
protected:
- virtual void paint( QPainter * );
- virtual int width( const QListBox * ) const;
+ virtual void paint( TQPainter * );
+ virtual int width( const TQListBox * ) const;
private:
- QFont f_ont;
- QString fontInfo;
+ TQFont f_ont;
+ TQString fontInfo;
};
//===================================================================================
KNDialogListBox *c_List,
*f_List;
- QCheckBox *c_olorCB,
+ TQCheckBox *c_olorCB,
*f_ontCB;
- QPushButton *c_olChngBtn,
+ TQPushButton *c_olChngBtn,
*f_ntChngBtn;
Appearance *d_ata;
@@ -278,13 +278,13 @@ class KDE_EXPORT AppearanceWidget : public KCModule {
protected slots:
//colors
void slotColCheckBoxToggled(bool b);
- void slotColItemSelected(QListBoxItem *); // show color dialog for the entry
+ void slotColItemSelected(TQListBoxItem *); // show color dialog for the entry
void slotColChangeBtnClicked();
void slotColSelectionChanged();
//fonts
void slotFontCheckBoxToggled(bool b);
- void slotFontItemSelected(QListBoxItem *); // show font dialog for the entry
+ void slotFontItemSelected(TQListBoxItem *); // show font dialog for the entry
void slotFontChangeBtnClicked();
void slotFontSelectionChanged();
@@ -294,14 +294,14 @@ class KDE_EXPORT AppearanceWidget : public KCModule {
class KDE_EXPORT ReadNewsGeneralWidget : public KCModule {
public:
- ReadNewsGeneralWidget(ReadNewsGeneral *d, QWidget *p=0, const char *n=0);
+ ReadNewsGeneralWidget(ReadNewsGeneral *d, TQWidget *p=0, const char *n=0);
~ReadNewsGeneralWidget();
void load();
void save();
protected:
- QCheckBox *a_utoCB,
+ TQCheckBox *a_utoCB,
*m_arkCB,
*m_arkCrossCB,
*s_martScrollingCB,
@@ -323,14 +323,14 @@ class KDE_EXPORT ReadNewsGeneralWidget : public KCModule {
class KDE_EXPORT ReadNewsNavigationWidget : public KCModule {
public:
- ReadNewsNavigationWidget(ReadNewsNavigation *d, QWidget *p=0, const char *n=0);
+ ReadNewsNavigationWidget(ReadNewsNavigation *d, TQWidget *p=0, const char *n=0);
~ReadNewsNavigationWidget();
void load();
void save();
protected:
- QCheckBox *m_arkAllReadGoNextCB,
+ TQCheckBox *m_arkAllReadGoNextCB,
*m_arkThreadReadGoNextCB,
*m_arkThreadReadCloseThreadCB,
*i_gnoreThreadGoNextCB,
@@ -346,14 +346,14 @@ class KDE_EXPORT ReadNewsViewerWidget : public KCModule {
Q_OBJECT
public:
- ReadNewsViewerWidget(ReadNewsViewer *d, QWidget *p=0, const char *n=0);
+ ReadNewsViewerWidget(ReadNewsViewer *d, TQWidget *p=0, const char *n=0);
~ReadNewsViewerWidget();
void load();
void save();
protected:
- QCheckBox *r_ewrapCB,
+ TQCheckBox *r_ewrapCB,
*r_emoveTrailingCB,
*s_igCB,
*o_penAttCB,
@@ -372,7 +372,7 @@ class KDE_EXPORT DisplayedHeadersWidget : public KCModule {
Q_OBJECT
public:
- DisplayedHeadersWidget(DisplayedHeaders *d, QWidget *p=0, const char *n=0);
+ DisplayedHeadersWidget(DisplayedHeaders *d, TQWidget *p=0, const char *n=0);
~DisplayedHeadersWidget();
void load();
@@ -380,10 +380,10 @@ class KDE_EXPORT DisplayedHeadersWidget : public KCModule {
protected:
- class HdrItem : public QListBoxText {
+ class HdrItem : public TQListBoxText {
public:
- HdrItem( const QString &t, KNDisplayedHeader *h ) : QListBoxText(t), hdr(h) {}
+ HdrItem( const TQString &t, KNDisplayedHeader *h ) : TQListBoxText(t), hdr(h) {}
~HdrItem() {}
KNDisplayedHeader *hdr;
@@ -392,7 +392,7 @@ class KDE_EXPORT DisplayedHeadersWidget : public KCModule {
HdrItem* generateItem(KNDisplayedHeader *);
KNDialogListBox *l_box;
- QPushButton *a_ddBtn,
+ TQPushButton *a_ddBtn,
*d_elBtn,
*e_ditBtn,
*u_pBtn,
@@ -418,7 +418,7 @@ class KDE_EXPORT DisplayedHeaderConfDialog : public KDialogBase {
Q_OBJECT
public:
- DisplayedHeaderConfDialog(KNDisplayedHeader *h, QWidget *p=0, char *n=0);
+ DisplayedHeaderConfDialog(KNDisplayedHeader *h, TQWidget *p=0, char *n=0);
~DisplayedHeaderConfDialog();
@@ -426,14 +426,14 @@ class KDE_EXPORT DisplayedHeaderConfDialog : public KDialogBase {
KNDisplayedHeader *h_dr;
KComboBox *h_drC;
KLineEdit *n_ameE;
- QCheckBox *n_ameCB[4],
+ TQCheckBox *n_ameCB[4],
*v_alueCB[4];
protected slots:
void slotOk();
void slotActivated(int);
- void slotNameChanged(const QString&);
+ void slotNameChanged(const TQString&);
};
@@ -442,7 +442,7 @@ class KDE_EXPORT ScoringWidget : public KCModule {
Q_OBJECT
public:
- ScoringWidget(Scoring *d, QWidget *p=0, const char *n=0);
+ ScoringWidget(Scoring *d, TQWidget *p=0, const char *n=0);
~ScoringWidget();
void load();
@@ -462,7 +462,7 @@ class KDE_EXPORT FilterListWidget : public KCModule {
Q_OBJECT
public:
- FilterListWidget(QWidget *p=0, const char *n=0);
+ FilterListWidget(TQWidget *p=0, const char *n=0);
~FilterListWidget();
void load();
@@ -473,25 +473,25 @@ class KDE_EXPORT FilterListWidget : public KCModule {
void updateItem(KNArticleFilter *f);
void addMenuItem(KNArticleFilter *f);
void removeMenuItem(KNArticleFilter *f);
- QValueList<int> menuOrder();
+ TQValueList<int> menuOrder();
protected:
class LBoxItem : public KNListBoxItem {
public:
- LBoxItem(KNArticleFilter *f, const QString &t, QPixmap *p=0)
+ LBoxItem(KNArticleFilter *f, const TQString &t, TQPixmap *p=0)
: KNListBoxItem(t, p) , filter(f) {}
~LBoxItem() {}
KNArticleFilter *filter;
};
- int findItem(QListBox *l, KNArticleFilter *f);
+ int findItem(TQListBox *l, KNArticleFilter *f);
KNDialogListBox *f_lb,
*m_lb;
- QPushButton *a_ddBtn,
+ TQPushButton *a_ddBtn,
*d_elBtn,
*e_ditBtn,
*c_opyBtn,
@@ -500,7 +500,7 @@ class KDE_EXPORT FilterListWidget : public KCModule {
*s_epAddBtn,
*s_epRemBtn;
- QPixmap a_ctive,
+ TQPixmap a_ctive,
d_isabled;
KNFilterManager *f_ilManager;
@@ -527,24 +527,24 @@ class KDE_EXPORT PostNewsTechnicalWidget : public KCModule {
Q_OBJECT
public:
- PostNewsTechnicalWidget(PostNewsTechnical *d, QWidget *p=0, const char *n=0);
+ PostNewsTechnicalWidget(PostNewsTechnical *d, TQWidget *p=0, const char *n=0);
~PostNewsTechnicalWidget();
void load();
void save();
protected:
- QComboBox *c_harset,
+ TQComboBox *c_harset,
*e_ncoding;
- QCheckBox *u_seOwnCSCB,
+ TQCheckBox *u_seOwnCSCB,
*g_enMIdCB,
*i_ncUaCB;
KNDialogListBox *l_box;
- QPushButton *a_ddBtn,
+ TQPushButton *a_ddBtn,
*d_elBtn,
*e_ditBtn;
KLineEdit *h_ost;
- QLabel *h_ostL;
+ TQLabel *h_ostL;
PostNewsTechnical *d_ata;
@@ -562,10 +562,10 @@ class KDE_EXPORT PostNewsTechnicalWidget : public KCModule {
class KDE_EXPORT XHeaderConfDialog : public KDialogBase {
public:
- XHeaderConfDialog(const QString &h=QString::null, QWidget *p=0, const char *n=0);
+ XHeaderConfDialog(const TQString &h=TQString::null, TQWidget *p=0, const char *n=0);
~XHeaderConfDialog();
- QString result();
+ TQString result();
protected:
@@ -580,7 +580,7 @@ class KDE_EXPORT PostNewsComposerWidget : public KCModule {
Q_OBJECT
public:
- PostNewsComposerWidget(PostNewsComposer *d, QWidget *p=0, const char *n=0);
+ PostNewsComposerWidget(PostNewsComposer *d, TQWidget *p=0, const char *n=0);
~PostNewsComposerWidget();
void load();
@@ -588,7 +588,7 @@ class KDE_EXPORT PostNewsComposerWidget : public KCModule {
protected:
KIntSpinBox *m_axLen;
- QCheckBox *w_ordWrapCB,
+ TQCheckBox *w_ordWrapCB,
*o_wnSigCB,
*r_ewrapCB,
*a_uthSigCB,
@@ -608,7 +608,7 @@ class KDE_EXPORT PostNewsComposerWidget : public KCModule {
class KDE_EXPORT PostNewsSpellingWidget : public KCModule {
public:
- PostNewsSpellingWidget(QWidget *p=0, const char *n=0);
+ PostNewsSpellingWidget(TQWidget *p=0, const char *n=0);
~PostNewsSpellingWidget();
void save();
@@ -625,7 +625,7 @@ class KDE_EXPORT PrivacyWidget : public KCModule {
Q_OBJECT
public:
- PrivacyWidget(QWidget *p=0, const char *n=0);
+ PrivacyWidget(TQWidget *p=0, const char *n=0);
~PrivacyWidget();
void save();
@@ -639,12 +639,12 @@ class KDE_EXPORT PrivacyWidget : public KCModule {
//BEGIN: Cleanup configuration -----------------------------------------------
/** Configuration widget for group expireration */
-class KDE_EXPORT GroupCleanupWidget : public QWidget {
+class KDE_EXPORT GroupCleanupWidget : public TQWidget {
Q_OBJECT
public:
- GroupCleanupWidget( Cleanup *data, QWidget *parent = 0, const char *name = 0 );
+ GroupCleanupWidget( Cleanup *data, TQWidget *parent = 0, const char *name = 0 );
void load();
void save();
@@ -653,9 +653,9 @@ class KDE_EXPORT GroupCleanupWidget : public QWidget {
void changed();
private:
- QCheckBox *mDefault, *mExpEnabled, *mExpUnavailable, *mPreserveThreads;
+ TQCheckBox *mDefault, *mExpEnabled, *mExpUnavailable, *mPreserveThreads;
KIntSpinBox *mExpDays, *mExpReadDays, *mExpUnreadDays;
- QGroupBox *mExpGroup;
+ TQGroupBox *mExpGroup;
Cleanup *mData;
private slots:
@@ -672,16 +672,16 @@ class KDE_EXPORT CleanupWidget : public KCModule {
Q_OBJECT
public:
- CleanupWidget(QWidget *p=0, const char *n=0);
+ CleanupWidget(TQWidget *p=0, const char *n=0);
~CleanupWidget();
void load();
void save();
protected:
- QCheckBox *f_olderCB;
+ TQCheckBox *f_olderCB;
KIntSpinBox *f_olderDays;
- QLabel *f_olderDaysL;
+ TQLabel *f_olderDaysL;
Cleanup *d_ata;
@@ -704,7 +704,7 @@ class KDE_EXPORT CleanupWidget : public KCModule {
Q_OBJECT
public:
- CacheWidget(Cache *d, QWidget *p=0, const char *n=0);
+ CacheWidget(Cache *d, TQWidget *p=0, const char *n=0);
~CacheWidget();
void apply();
@@ -716,7 +716,7 @@ class KDE_EXPORT CleanupWidget : public KCModule {
*d_iskMaxArt,
*d_iskMaxKB;
- QLabel *d_iskMaxArtL,
+ TQLabel *d_iskMaxArtL,
*d_iskMaxKBL;
Cache *d_ata;
diff --git a/knode/knconvert.cpp b/knode/knconvert.cpp
index 40461139b..8fdb4890c 100644
--- a/knode/knconvert.cpp
+++ b/knode/knconvert.cpp
@@ -12,10 +12,10 @@
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, US
*/
-#include <qlayout.h>
-#include <qwidgetstack.h>
-#include <qlabel.h>
-#include <qcheckbox.h>
+#include <tqlayout.h>
+#include <tqwidgetstack.h>
+#include <tqlabel.h>
+#include <tqcheckbox.h>
#include <klocale.h>
#include <kfiledialog.h>
@@ -33,7 +33,7 @@
#include "resource.h"
-bool KNConvert::needToConvert(const QString &oldVersion)
+bool KNConvert::needToConvert(const TQString &oldVersion)
{
bool ret=(
(oldVersion.left(3)=="0.3") ||
@@ -44,31 +44,31 @@ bool KNConvert::needToConvert(const QString &oldVersion)
}
-KNConvert::KNConvert(const QString &version)
- : QDialog(0,0,true), l_ogList(0), c_onversionDone(false), v_ersion(version)
+KNConvert::KNConvert(const TQString &version)
+ : TQDialog(0,0,true), l_ogList(0), c_onversionDone(false), v_ersion(version)
{
setCaption(kapp->makeStdCaption(i18n("Conversion")));
- QVBoxLayout *topL=new QVBoxLayout(this, 5,5);
- s_tack=new QWidgetStack(this);
+ TQVBoxLayout *topL=new TQVBoxLayout(this, 5,5);
+ s_tack=new TQWidgetStack(this);
topL->addWidget(s_tack, 1);
topL->addWidget(new KSeparator(this));
- QHBoxLayout *btnL=new QHBoxLayout(topL, 5);
- s_tartBtn=new QPushButton(i18n("Start Conversion..."), this);
+ TQHBoxLayout *btnL=new TQHBoxLayout(topL, 5);
+ s_tartBtn=new TQPushButton(i18n("Start Conversion..."), this);
s_tartBtn->setDefault(true);
btnL->addStretch(1);
btnL->addWidget(s_tartBtn);
c_ancelBtn=new KPushButton(KStdGuiItem::cancel(), this);
btnL->addWidget(c_ancelBtn);
- connect(s_tartBtn, SIGNAL(clicked()), this, SLOT(slotStart()));
- connect(c_ancelBtn, SIGNAL(clicked()), this, SLOT(reject()));
+ connect(s_tartBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotStart()));
+ connect(c_ancelBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(reject()));
- w_1=new QWidget(s_tack);
+ w_1=new TQWidget(s_tack);
s_tack->addWidget(w_1, 1);
- QGridLayout *w1L=new QGridLayout(w_1, 5,3, 5,5);
+ TQGridLayout *w1L=new TQGridLayout(w_1, 5,3, 5,5);
- QLabel *l1=new QLabel(i18n(
+ TQLabel *l1=new TQLabel(i18n(
"<b>Congratulations, you have upgraded to KNode version %1.</b><br>\
Unfortunately this version uses a different format for some data-files, so \
in order to keep your existing data it is necessary to convert it first. This is \
@@ -76,37 +76,37 @@ now done automatically by KNode. If you want to, a backup of your existing data
will be created before the conversion starts.").arg(KNODE_VERSION), w_1);
w1L->addMultiCellWidget(l1, 0,0, 0,2);
- c_reateBkup=new QCheckBox(i18n("Create backup of old data"), w_1);
+ c_reateBkup=new TQCheckBox(i18n("Create backup of old data"), w_1);
w1L->addMultiCellWidget(c_reateBkup, 2,2, 0,2);
- connect(c_reateBkup, SIGNAL(toggled(bool)), this, SLOT(slotCreateBkupToggled(bool)));
+ connect(c_reateBkup, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotCreateBkupToggled(bool)));
- b_ackupPathLabel=new QLabel(i18n("Save backup in:"), w_1);
+ b_ackupPathLabel=new TQLabel(i18n("Save backup in:"), w_1);
w1L->addWidget(b_ackupPathLabel, 3,0);
- b_ackupPath=new KLineEdit(QDir::homeDirPath()+QString("/knodedata-")+v_ersion+".tar.gz", w_1);
+ b_ackupPath=new KLineEdit(TQDir::homeDirPath()+TQString("/knodedata-")+v_ersion+".tar.gz", w_1);
w1L->addWidget(b_ackupPath, 3,1);
- b_rowseBtn= new QPushButton(i18n("Browse..."), w_1);
- connect(b_rowseBtn, SIGNAL(clicked()), this, SLOT(slotBrowse()));
+ b_rowseBtn= new TQPushButton(i18n("Browse..."), w_1);
+ connect(b_rowseBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotBrowse()));
w1L->addWidget(b_rowseBtn, 3,2);
w1L->setColStretch(1,1);
w1L->addRowSpacing(1,15);
w1L->setRowStretch(4,1);
w1L->addRowSpacing(4,15);
- w_2=new QLabel(s_tack);
+ w_2=new TQLabel(s_tack);
w_2->setText(i18n("<b>Converting, please wait...</b>"));
w_2->setAlignment(AlignCenter);
s_tack->addWidget(w_2, 2);
- w_3=new QWidget(s_tack);
+ w_3=new TQWidget(s_tack);
s_tack->addWidget(w_3, 3);
- QVBoxLayout *w3L=new QVBoxLayout(w_3, 5,5);
+ TQVBoxLayout *w3L=new TQVBoxLayout(w_3, 5,5);
- r_esultLabel=new QLabel(w_3);
+ r_esultLabel=new TQLabel(w_3);
w3L->addWidget(r_esultLabel);
- QLabel *l2=new QLabel(i18n("Processed tasks:"), w_3);
- l_ogList=new QListBox(w_3);
+ TQLabel *l2=new TQLabel(i18n("Processed tasks:"), w_3);
+ l_ogList=new TQListBox(w_3);
w3L->addSpacing(15);
w3L->addWidget(l2);
w3L->addWidget(l_ogList, 1);
@@ -118,7 +118,7 @@ will be created before the conversion starts.").arg(KNODE_VERSION), w_1);
KNConvert::~KNConvert()
{
- for ( QValueList<Converter*>::Iterator it = mConverters.begin(); it != mConverters.end(); ++it )
+ for ( TQValueList<Converter*>::Iterator it = mConverters.begin(); it != mConverters.end(); ++it )
delete (*it);
}
@@ -126,7 +126,7 @@ KNConvert::~KNConvert()
void KNConvert::convert()
{
int errors=0;
- for ( QValueList<Converter*>::Iterator it = mConverters.begin(); it != mConverters.end(); ++it )
+ for ( TQValueList<Converter*>::Iterator it = mConverters.begin(); it != mConverters.end(); ++it )
if( !(*it)->doConvert() )
errors++;
@@ -172,12 +172,12 @@ void KNConvert::slotStart()
return;
}
- QString dataDir=locateLocal("data","knode/");
+ TQString dataDir=locateLocal("data","knode/");
t_ar=new KProcess;
*t_ar << "tar";
*t_ar << "-cz" << dataDir
<< "-f" << b_ackupPath->text();
- connect(t_ar, SIGNAL(processExited(KProcess*)), this, SLOT(slotTarExited(KProcess*)));
+ connect(t_ar, TQT_SIGNAL(processExited(KProcess*)), this, TQT_SLOT(slotTarExited(KProcess*)));
if(!t_ar->start()) {
delete t_ar;
t_ar = 0;
@@ -199,7 +199,7 @@ void KNConvert::slotCreateBkupToggled(bool b)
void KNConvert::slotBrowse()
{
- QString newPath=KFileDialog::getSaveFileName(b_ackupPath->text());
+ TQString newPath=KFileDialog::getSaveFileName(b_ackupPath->text());
if(!newPath.isEmpty())
b_ackupPath->setText(newPath);
@@ -240,12 +240,12 @@ void KNConvert::slotTarExited(KProcess *proc)
bool KNConvert::Converter04::doConvert()
{
- QString dir=locateLocal("data","knode/")+"folders/";
+ TQString dir=locateLocal("data","knode/")+"folders/";
int num;
bool error=false;
//Drafts
- if(QFile::exists(dir+"folder1.idx")) {
+ if(TQFile::exists(dir+"folder1.idx")) {
num=convertFolder(dir+"folder1", dir+"drafts_1");
if(num==-1) {
error=true;
@@ -259,7 +259,7 @@ bool KNConvert::Converter04::doConvert()
l_og->append(i18n("nothing to be done for folder \"Drafts\""));
//Outbox
- if(QFile::exists(dir+"folder2.idx")) {
+ if(TQFile::exists(dir+"folder2.idx")) {
num=convertFolder(dir+"folder2", dir+"outbox_2");
if(num==-1) {
error=true;
@@ -273,7 +273,7 @@ bool KNConvert::Converter04::doConvert()
l_og->append(i18n("nothing to be done for folder \"Outbox\""));
//Sent
- if(QFile::exists(dir+"folder3.idx")) {
+ if(TQFile::exists(dir+"folder3.idx")) {
num=convertFolder(dir+"folder3", dir+"sent_3");
if(num==-1) {
error=true;
@@ -287,20 +287,20 @@ bool KNConvert::Converter04::doConvert()
l_og->append(i18n("nothing to be done for folder \"Sent\""));
//remove old info-files
- QFile::remove(dir+"standard.info");
- QFile::remove(dir+".standard.info");
+ TQFile::remove(dir+"standard.info");
+ TQFile::remove(dir+".standard.info");
return (!error);
}
-int KNConvert::Converter04::convertFolder(QString srcPrefix, QString dstPrefix)
+int KNConvert::Converter04::convertFolder(TQString srcPrefix, TQString dstPrefix)
{
- QFile srcMBox(srcPrefix+".mbox"),
+ TQFile srcMBox(srcPrefix+".mbox"),
srcIdx(srcPrefix+".idx"),
dstMBox(dstPrefix+".mbox"),
dstIdx(dstPrefix+".idx");
- QTextStream ts(&dstMBox);
- ts.setEncoding(QTextStream::Latin1);
+ TQTextStream ts(&dstMBox);
+ ts.setEncoding(TQTextStream::Latin1);
OldFolderIndex oldIdx;
NewFolderIndex newIdx;
@@ -399,7 +399,7 @@ int KNConvert::Converter04::convertFolder(QString srcPrefix, QString dstPrefix)
//read mbox-data
unsigned int size=oldIdx.eo-oldIdx.so;
- QCString buff(size+10);
+ TQCString buff(size+10);
srcMBox.at(oldIdx.so);
int readBytes=srcMBox.readBlock(buff.data(), size);
buff.at(readBytes)='\0'; //terminate string;
diff --git a/knode/knconvert.h b/knode/knconvert.h
index c75e0da00..e81e048a5 100644
--- a/knode/knconvert.h
+++ b/knode/knconvert.h
@@ -17,10 +17,10 @@
#include <time.h>
-#include <qdialog.h>
+#include <tqdialog.h>
-#include <qglobal.h>
-#include <qvaluelist.h>
+#include <tqglobal.h>
+#include <tqvaluelist.h>
#include <kdepimmacros.h>
class QListBox;
@@ -32,14 +32,14 @@ class KLineEdit;
class KProcess;
-class KDE_EXPORT KNConvert : public QDialog {
+class KDE_EXPORT KNConvert : public TQDialog {
Q_OBJECT
public:
- static bool needToConvert(const QString &oldVersion);
+ static bool needToConvert(const TQString &oldVersion);
- KNConvert(const QString &version);
+ KNConvert(const TQString &version);
~KNConvert();
bool conversionDone()const { return c_onversionDone; }
@@ -52,12 +52,12 @@ class KDE_EXPORT KNConvert : public QDialog {
class Converter {
public:
- Converter(QStringList *log) { l_og=log; }
+ Converter(TQStringList *log) { l_og=log; }
virtual ~Converter() {}
virtual bool doConvert()=0;
protected:
- QStringList *l_og;
+ TQStringList *l_og;
};
@@ -65,12 +65,12 @@ class KDE_EXPORT KNConvert : public QDialog {
class Converter04 : public Converter {
public:
- Converter04(QStringList *log) : Converter(log) {}
+ Converter04(TQStringList *log) : Converter(log) {}
~Converter04() {}
bool doConvert();
protected:
- int convertFolder(QString srcPrefix, QString dstPrefix);
+ int convertFolder(TQString srcPrefix, TQString dstPrefix);
struct OldFolderIndex {
int id,
@@ -93,23 +93,23 @@ class KDE_EXPORT KNConvert : public QDialog {
//------------ </Converter-classes> --------------
- QWidgetStack *s_tack;
- QWidget *w_1,
+ TQWidgetStack *s_tack;
+ TQWidget *w_1,
*w_3;
- QCheckBox *c_reateBkup;
- QLabel *b_ackupPathLabel,
+ TQCheckBox *c_reateBkup;
+ TQLabel *b_ackupPathLabel,
*w_2,
*r_esultLabel;
KLineEdit *b_ackupPath;
- QPushButton *b_rowseBtn,
+ TQPushButton *b_rowseBtn,
*s_tartBtn,
*c_ancelBtn;
- QListBox *l_ogList;
+ TQListBox *l_ogList;
- QValueList<Converter*> mConverters;
- QStringList l_og;
+ TQValueList<Converter*> mConverters;
+ TQStringList l_og;
bool c_onversionDone;
- QString v_ersion;
+ TQString v_ersion;
KProcess *t_ar;
void convert();
diff --git a/knode/kndisplayedheader.cpp b/knode/kndisplayedheader.cpp
index 589bd0027..cf25d57ef 100644
--- a/knode/kndisplayedheader.cpp
+++ b/knode/kndisplayedheader.cpp
@@ -85,7 +85,7 @@ const char** KNDisplayedHeader::predefs()
// *tries* to translate the name
-QString KNDisplayedHeader::translatedName()
+TQString KNDisplayedHeader::translatedName()
{
if (t_ranslateName) {
// major hack alert !!!
@@ -95,19 +95,19 @@ QString KNDisplayedHeader::translatedName()
else
return n_ame;
} else
- return QString::null;
+ return TQString::null;
} else
return n_ame;
}
// *tries* to retranslate the name to english
-void KNDisplayedHeader::setTranslatedName(const QString &s)
+void KNDisplayedHeader::setTranslatedName(const TQString &s)
{
bool retranslated = false;
for (const char **c=predef;(*c)!=0;c++) { // ok, first the standard header names
if (s==i18n("collection of article headers",*c)) {
- n_ame = QString::fromLatin1(*c);
+ n_ame = TQString::fromLatin1(*c);
retranslated = true;
break;
}
@@ -116,7 +116,7 @@ void KNDisplayedHeader::setTranslatedName(const QString &s)
if (!retranslated) {
for (const char **c=disp;(*c)!=0;c++) // now our standard display names
if (s==i18n("collection of article headers",*c)) {
- n_ame = QString::fromLatin1(*c);
+ n_ame = TQString::fromLatin1(*c);
retranslated = true;
break;
}
@@ -135,7 +135,7 @@ void KNDisplayedHeader::createTags()
const char *tokens[] = { "<big>","</big>","<b>","</b>",
"<i>","</i>","<u>","</u>" };
- for(int i=0; i<4; i++) t_ags[i]=QString::null;
+ for(int i=0; i<4; i++) t_ags[i]=TQString::null;
if(f_lags.at(0)) { // <big>
t_ags[0]=tokens[0];
diff --git a/knode/kndisplayedheader.h b/knode/kndisplayedheader.h
index 84f260e58..5f639740c 100644
--- a/knode/kndisplayedheader.h
+++ b/knode/kndisplayedheader.h
@@ -15,7 +15,7 @@
#ifndef KNDISPLAYEDHEADER_H
#define KNDISPLAYEDHEADER_H
-#include <qbitarray.h>
+#include <tqbitarray.h>
class KNDisplayedHeader {
@@ -28,19 +28,19 @@ class KNDisplayedHeader {
static const char** predefs();
//name
- const QString& name() { return n_ame; }
- void setName(const QString &s) { n_ame = s; }
+ const TQString& name() { return n_ame; }
+ void setName(const TQString &s) { n_ame = s; }
bool hasName() const { return !n_ame.isEmpty(); }
//translated name
- QString translatedName(); // *tries* to translate the name
- void setTranslatedName(const QString &s); // *tries* to retranslate the name to english
+ TQString translatedName(); // *tries* to translate the name
+ void setTranslatedName(const TQString &s); // *tries* to retranslate the name to english
void setTranslateName(bool b) { t_ranslateName=b; }
bool translateName() const { return t_ranslateName; }
//header
- const QString& header() { return h_eader; }
- void setHeader(const QString &s) { h_eader = s; }
+ const TQString& header() { return h_eader; }
+ void setHeader(const TQString &s) { h_eader = s; }
//flags
bool flag(int i) { return f_lags.at(i); }
@@ -48,15 +48,15 @@ class KNDisplayedHeader {
//HTML-tags
void createTags();
- const QString& nameOpenTag() { return t_ags[0]; }
- const QString& nameCloseTag() { return t_ags[1]; }
- const QString& headerOpenTag() { return t_ags[2]; }
- const QString& headerCloseTag() { return t_ags[3]; }
+ const TQString& nameOpenTag() { return t_ags[0]; }
+ const TQString& nameCloseTag() { return t_ags[1]; }
+ const TQString& headerOpenTag() { return t_ags[2]; }
+ const TQString& headerCloseTag() { return t_ags[3]; }
protected:
bool t_ranslateName;
- QString n_ame, h_eader, t_ags[4];
- QBitArray f_lags;
+ TQString n_ame, h_eader, t_ags[4];
+ TQBitArray f_lags;
};
diff --git a/knode/knfilterconfigwidget.cpp b/knode/knfilterconfigwidget.cpp
index 2a7a8cc47..3c7daee1e 100644
--- a/knode/knfilterconfigwidget.cpp
+++ b/knode/knfilterconfigwidget.cpp
@@ -14,8 +14,8 @@
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, US
*/
-#include <qlayout.h>
-#include <qlabel.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
#include <klocale.h>
@@ -25,23 +25,23 @@
#include "knfilterconfigwidget.h"
-KNFilterConfigWidget::KNFilterConfigWidget(QWidget *parent, const char *name ) :
- QTabWidget(parent,name)
+KNFilterConfigWidget::KNFilterConfigWidget(TQWidget *parent, const char *name ) :
+ TQTabWidget(parent,name)
{
- QWidget *sf, *idW, *add;
- sf=new QWidget(this);
- QVBoxLayout *sfL=new QVBoxLayout(sf, 8,5);
+ TQWidget *sf, *idW, *add;
+ sf=new TQWidget(this);
+ TQVBoxLayout *sfL=new TQVBoxLayout(sf, 8,5);
subject=new KNStringFilterWidget(i18n("Subject"), sf);
sfL->addWidget(subject);
from=new KNStringFilterWidget(i18n("From"), sf);
sfL->addWidget(from);
- QLabel *l = new QLabel(i18n("The following placeholders are supported:\n%MYNAME=own name, %MYEMAIL=own email address"),sf);
+ TQLabel *l = new TQLabel(i18n("The following placeholders are supported:\n%MYNAME=own name, %MYEMAIL=own email address"),sf);
sfL->addWidget(l);
sfL->addStretch(1);
addTab(sf, i18n("Subject && &From"));
- idW=new QWidget(this);
- QVBoxLayout *idL=new QVBoxLayout(idW, 8,5);
+ idW=new TQWidget(this);
+ TQVBoxLayout *idL=new TQVBoxLayout(idW, 8,5);
messageId=new KNStringFilterWidget(i18n("Message-ID"), idW);
idL->addWidget(messageId);
references=new KNStringFilterWidget(i18n("References"), idW);
@@ -52,8 +52,8 @@ KNFilterConfigWidget::KNFilterConfigWidget(QWidget *parent, const char *name ) :
status=new KNStatusFilterWidget(this);
addTab(status, i18n("&Status"));
- add=new QWidget(this);
- QVBoxLayout *addL=new QVBoxLayout(add, 8,5);
+ add=new TQWidget(this);
+ TQVBoxLayout *addL=new TQVBoxLayout(add, 8,5);
score=new KNRangeFilterWidget(i18n("Score"), -99999, 99999, add);
addL->addWidget(score);
age=new KNRangeFilterWidget(i18n("Age"), 0, 999, add, i18n(" days"));
diff --git a/knode/knfilterconfigwidget.h b/knode/knfilterconfigwidget.h
index 7cafa18db..8d87d53fa 100644
--- a/knode/knfilterconfigwidget.h
+++ b/knode/knfilterconfigwidget.h
@@ -17,14 +17,14 @@
#ifndef KNFILTERCONFIGWIDGET_H
#define KNFILTERCONFIGWIDGET_H
-#include <qtabwidget.h>
+#include <tqtabwidget.h>
class KNStatusFilterWidget;
class KNStringFilterWidget;
class KNRangeFilterWidget;
-class KNFilterConfigWidget : public QTabWidget {
+class KNFilterConfigWidget : public TQTabWidget {
Q_OBJECT
@@ -32,7 +32,7 @@ class KNFilterConfigWidget : public QTabWidget {
friend class KNSearchDialog;
public:
- KNFilterConfigWidget(QWidget *parent=0, const char *name=0);
+ KNFilterConfigWidget(TQWidget *parent=0, const char *name=0);
~KNFilterConfigWidget();
void reset();
diff --git a/knode/knfilterdialog.cpp b/knode/knfilterdialog.cpp
index e363e6ad0..e9ebf66e1 100644
--- a/knode/knfilterdialog.cpp
+++ b/knode/knfilterdialog.cpp
@@ -14,9 +14,9 @@
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, US
*/
-#include <qlabel.h>
-#include <qcheckbox.h>
-#include <qlayout.h>
+#include <tqlabel.h>
+#include <tqcheckbox.h>
+#include <tqlayout.h>
#include <klocale.h>
#include <kmessagebox.h>
@@ -30,25 +30,25 @@
#include "knfilterdialog.h"
-KNFilterDialog::KNFilterDialog(KNArticleFilter *f, QWidget *parent, const char *name)
+KNFilterDialog::KNFilterDialog(KNArticleFilter *f, TQWidget *parent, const char *name)
: KDialogBase(Plain, (f->id()==-1)? i18n("New Filter"):i18n("Properties of %1").arg(f->name()),
Ok|Cancel|Help, Ok, parent, name),
fltr(f)
{
- QFrame* page=plainPage();
+ TQFrame* page=plainPage();
- QGroupBox *gb=new QGroupBox(page);
+ TQGroupBox *gb=new TQGroupBox(page);
fname=new KLineEdit(gb);
- QLabel *l1=new QLabel(fname, i18n("Na&me:"), gb);
- apon=new QComboBox(gb);
+ TQLabel *l1=new TQLabel(fname, i18n("Na&me:"), gb);
+ apon=new TQComboBox(gb);
apon->insertItem(i18n("Single Articles"));
apon->insertItem(i18n("Whole Threads"));
- QLabel *l2=new QLabel(apon, i18n("Apply o&n:"), gb);
- enabled=new QCheckBox(i18n("Sho&w in menu"), gb);
+ TQLabel *l2=new TQLabel(apon, i18n("Apply o&n:"), gb);
+ enabled=new TQCheckBox(i18n("Sho&w in menu"), gb);
fw=new KNFilterConfigWidget(page);
- QGridLayout *gbL=new QGridLayout(gb, 2,4,8,5);
+ TQGridLayout *gbL=new TQGridLayout(gb, 2,4,8,5);
gbL->addWidget(l1, 0,0);
gbL->addMultiCellWidget(fname, 0,0,1,3);
gbL->addWidget(enabled, 1,0);
@@ -56,7 +56,7 @@ KNFilterDialog::KNFilterDialog(KNArticleFilter *f, QWidget *parent, const char *
gbL->addWidget(apon, 1,3);
gbL->setColStretch(1,1);
- QVBoxLayout *topL=new QVBoxLayout(page,0,5);
+ TQVBoxLayout *topL=new TQVBoxLayout(page,0,5);
topL->addWidget(gb);
topL->addWidget(fw,1);
@@ -78,7 +78,7 @@ KNFilterDialog::KNFilterDialog(KNArticleFilter *f, QWidget *parent, const char *
KNHelper::restoreWindowSize("filterDLG", this, sizeHint());
setHelp("anc-using-filters");
- connect( fname, SIGNAL( textChanged ( const QString & )), this, SLOT( slotTextChanged( const QString & )));
+ connect( fname, TQT_SIGNAL( textChanged ( const TQString & )), this, TQT_SLOT( slotTextChanged( const TQString & )));
slotTextChanged( fname->text() );
}
@@ -89,7 +89,7 @@ KNFilterDialog::~KNFilterDialog()
KNHelper::saveWindowSize("filterDLG", size());
}
-void KNFilterDialog::slotTextChanged( const QString &_text )
+void KNFilterDialog::slotTextChanged( const TQString &_text )
{
enableButtonOK( !_text.isEmpty() );
}
diff --git a/knode/knfilterdialog.h b/knode/knfilterdialog.h
index a7dcbfebf..ca7dc493e 100644
--- a/knode/knfilterdialog.h
+++ b/knode/knfilterdialog.h
@@ -33,7 +33,7 @@ class KNFilterDialog : public KDialogBase {
friend class KNFilterManager;
public:
- KNFilterDialog(KNArticleFilter *f=0, QWidget *parent=0, const char *name=0);
+ KNFilterDialog(KNArticleFilter *f=0, TQWidget *parent=0, const char *name=0);
~KNFilterDialog();
KNArticleFilter* filter() { return fltr; }
@@ -41,14 +41,14 @@ class KNFilterDialog : public KDialogBase {
protected:
KNFilterConfigWidget *fw;
KLineEdit *fname;
- QComboBox *apon;
- QCheckBox *enabled;
+ TQComboBox *apon;
+ TQCheckBox *enabled;
KNArticleFilter *fltr;
protected slots:
void slotOk();
- void slotTextChanged( const QString & );
+ void slotTextChanged( const TQString & );
};
#endif
diff --git a/knode/knfiltermanager.cpp b/knode/knfiltermanager.cpp
index ce8469512..be57996f9 100644
--- a/knode/knfiltermanager.cpp
+++ b/knode/knfiltermanager.cpp
@@ -29,12 +29,12 @@
#include "knconfigwidgets.h"
-KNFilterSelectAction::KNFilterSelectAction( const QString& text, const QString& pix,
- QObject* parent, const char *name )
+KNFilterSelectAction::KNFilterSelectAction( const TQString& text, const TQString& pix,
+ TQObject* parent, const char *name )
: KActionMenu(text,pix,parent,name), currentItem(-42)
{
popupMenu()->setCheckable(true);
- connect(popupMenu(),SIGNAL(activated(int)),this,SLOT(slotMenuActivated(int)));
+ connect(popupMenu(),TQT_SIGNAL(activated(int)),this,TQT_SLOT(slotMenuActivated(int)));
setDelayed(false);
}
@@ -61,8 +61,8 @@ void KNFilterSelectAction::slotMenuActivated(int id)
//==============================================================================
-KNFilterManager::KNFilterManager(QObject * parent, const char * name)
- : QObject(parent,name), fset(0), currFilter(0), a_ctFilter(0)
+KNFilterManager::KNFilterManager(TQObject * parent, const char * name)
+ : TQObject(parent,name), fset(0), currFilter(0), a_ctFilter(0)
{
loadFilters();
@@ -75,7 +75,7 @@ KNFilterManager::KNFilterManager(QObject * parent, const char * name)
KNFilterManager::~KNFilterManager()
{
- for ( QValueList<KNArticleFilter*>::Iterator it = mFilterList.begin(); it != mFilterList.end(); ++it )
+ for ( TQValueList<KNArticleFilter*>::Iterator it = mFilterList.begin(); it != mFilterList.end(); ++it )
delete (*it);
}
@@ -104,15 +104,15 @@ void KNFilterManager::prepareShutdown()
void KNFilterManager::loadFilters()
{
- QString fname(locate("data","knode/filters/filters.rc") );
+ TQString fname(locate("data","knode/filters/filters.rc") );
if (!fname.isNull()) {
KSimpleConfig conf(fname,true);
- QValueList<int> activeFilters = conf.readIntListEntry("Active");
+ TQValueList<int> activeFilters = conf.readIntListEntry("Active");
menuOrder = conf.readIntListEntry("Menu");
- QValueList<int>::Iterator it = activeFilters.begin();
+ TQValueList<int>::Iterator it = activeFilters.begin();
while (it != activeFilters.end()) {
KNArticleFilter *f=new KNArticleFilter((*it));
if (f->loadInfo())
@@ -129,15 +129,15 @@ void KNFilterManager::loadFilters()
void KNFilterManager::saveFilterLists()
{
- QString dir(locateLocal("data","knode/")+"filters/");
+ TQString dir(locateLocal("data","knode/")+"filters/");
if (dir.isNull()) {
KNHelper::displayInternalFileError();
return;
}
KSimpleConfig conf(dir+"filters.rc");
- QValueList<int> activeFilters;
- for ( QValueList<KNArticleFilter*>::Iterator it = mFilterList.begin(); it != mFilterList.end(); ++it )
+ TQValueList<int> activeFilters;
+ for ( TQValueList<KNArticleFilter*>::Iterator it = mFilterList.begin(); it != mFilterList.end(); ++it )
activeFilters << (*it)->id();
conf.writeEntry("Active",activeFilters);
@@ -151,10 +151,10 @@ void KNFilterManager::startConfig(KNConfig::FilterListWidget *fs)
fset=fs;
commitNeeded = false;
- for ( QValueList<KNArticleFilter*>::Iterator it = mFilterList.begin(); it != mFilterList.end(); ++it )
+ for ( TQValueList<KNArticleFilter*>::Iterator it = mFilterList.begin(); it != mFilterList.end(); ++it )
fset->addItem( (*it) );
- QValueList<int>::Iterator it = menuOrder.begin();
+ TQValueList<int>::Iterator it = menuOrder.begin();
while (it != menuOrder.end()) {
if ((*it)!=-1)
fset->addMenuItem(byID((*it)));
@@ -200,9 +200,9 @@ void KNFilterManager::newFilter()
void KNFilterManager::addFilter(KNArticleFilter *f)
{
if ( f->id() == -1 ) { // new filter, find suitable ID
- QValueList<int> activeFilters;
+ TQValueList<int> activeFilters;
// ok, this is a ugly hack: we want to reuse old id's, so we try to find the first unused id
- for ( QValueList<KNArticleFilter*>::Iterator it = mFilterList.begin(); it != mFilterList.end(); ++it )
+ for ( TQValueList<KNArticleFilter*>::Iterator it = mFilterList.begin(); it != mFilterList.end(); ++it )
activeFilters << (*it)->id();
int newId = 1;
while ( activeFilters.contains( newId ) > 0 )
@@ -262,7 +262,7 @@ void KNFilterManager::copyFilter(KNArticleFilter *f)
void KNFilterManager::deleteFilter(KNArticleFilter *f)
{
if ( KMessageBox::warningContinueCancel( fset ? fset : knGlobals.topWidget,
- i18n("Do you really want to delete this filter?"), QString::null, KGuiItem( i18n("&Delete"), "editdelete" ) )
+ i18n("Do you really want to delete this filter?"), TQString::null, KGuiItem( i18n("&Delete"), "editdelete" ) )
== KMessageBox::Continue ) {
if ( mFilterList.remove( f ) ) { // does not delete surplus config files
if ( fset ) { // we reuse ids to reduce the number of dead files
@@ -278,9 +278,9 @@ void KNFilterManager::deleteFilter(KNArticleFilter *f)
}
-bool KNFilterManager::newNameIsOK(KNArticleFilter *f, const QString &newName)
+bool KNFilterManager::newNameIsOK(KNArticleFilter *f, const TQString &newName)
{
- for ( QValueList<KNArticleFilter*>::Iterator it = mFilterList.begin(); it != mFilterList.end(); ++it )
+ for ( TQValueList<KNArticleFilter*>::Iterator it = mFilterList.begin(); it != mFilterList.end(); ++it )
if ( (*it) != f && newName == (*it)->translatedName() )
return false;
@@ -309,7 +309,7 @@ KNArticleFilter* KNFilterManager::setFilter(const int id)
KNArticleFilter* KNFilterManager::byID(int id)
{
- for ( QValueList<KNArticleFilter*>::Iterator it = mFilterList.begin(); it != mFilterList.end(); ++it )
+ for ( TQValueList<KNArticleFilter*>::Iterator it = mFilterList.begin(); it != mFilterList.end(); ++it )
if ( (*it)->id() == id )
return (*it);
@@ -326,7 +326,7 @@ void KNFilterManager::updateMenu()
a_ctFilter->popupMenu()->clear();
KNArticleFilter *f=0;
- QValueList<int>::Iterator it = menuOrder.begin();
+ TQValueList<int>::Iterator it = menuOrder.begin();
while (it != menuOrder.end()) {
if ((*it)!=-1) {
if ((f=byID((*it))))
@@ -354,10 +354,10 @@ void KNFilterManager::slotMenuActivated(int id)
void KNFilterManager::slotShowFilterChooser()
{
KNArticleFilter *f=0;
- QStringList items;
- QValueList<int> ids;
+ TQStringList items;
+ TQValueList<int> ids;
- QValueList<int>::Iterator it = menuOrder.begin();
+ TQValueList<int>::Iterator it = menuOrder.begin();
while (it != menuOrder.end()) {
if ((*it)!=-1)
if ((f=byID((*it)))) {
@@ -383,10 +383,10 @@ void KNFilterManager::setMenuAction(KNFilterSelectAction *a, KAction *keybA)
{
if(a) {
a_ctFilter = a;
- connect(a_ctFilter, SIGNAL(activated(int)), this, SLOT(slotMenuActivated(int)));
+ connect(a_ctFilter, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotMenuActivated(int)));
}
if(keybA)
- connect(keybA, SIGNAL(activated()), this, SLOT(slotShowFilterChooser()));
+ connect(keybA, TQT_SIGNAL(activated()), this, TQT_SLOT(slotShowFilterChooser()));
updateMenu();
}
diff --git a/knode/knfiltermanager.h b/knode/knfiltermanager.h
index ca76bcb75..2dc431f34 100644
--- a/knode/knfiltermanager.h
+++ b/knode/knfiltermanager.h
@@ -15,8 +15,8 @@
#ifndef KNFILTERMANAGER_H
#define KNFILTERMANAGER_H
-#include <qglobal.h>
-#include <qvaluelist.h>
+#include <tqglobal.h>
+#include <tqvaluelist.h>
#include <kaction.h>
@@ -33,8 +33,8 @@ class KNFilterSelectAction : public KActionMenu
Q_OBJECT
public:
- KNFilterSelectAction( const QString& text, const QString& pix,
- QObject* parent, const char *name );
+ KNFilterSelectAction( const TQString& text, const TQString& pix,
+ TQObject* parent, const char *name );
~KNFilterSelectAction();
void setCurrentItem(int id);
@@ -55,7 +55,7 @@ class KNFilterManager : public QObject
Q_OBJECT
public:
- KNFilterManager(QObject * parent = 0, const char * name = 0);
+ KNFilterManager(TQObject * parent = 0, const char * name = 0);
~KNFilterManager();
void readOptions();
@@ -73,7 +73,7 @@ class KNFilterManager : public QObject
void copyFilter(KNArticleFilter *f);
void addFilter(KNArticleFilter *f);
void deleteFilter(KNArticleFilter *f);
- bool newNameIsOK(KNArticleFilter *f, const QString &newName);
+ bool newNameIsOK(KNArticleFilter *f, const TQString &newName);
// Allow to delay the setup of UI elements, since the knode part may not
// be available when the config dialog is called
@@ -86,11 +86,11 @@ class KNFilterManager : public QObject
KNArticleFilter* byID(int id);
void updateMenu();
- QValueList<KNArticleFilter*> mFilterList;
+ TQValueList<KNArticleFilter*> mFilterList;
KNConfig::FilterListWidget *fset;
KNArticleFilter *currFilter;
KNFilterSelectAction *a_ctFilter;
- QValueList<int> menuOrder;
+ TQValueList<int> menuOrder;
bool commitNeeded;
protected slots:
diff --git a/knode/knfolder.cpp b/knode/knfolder.cpp
index 9cdb2f054..01855d5bd 100644
--- a/knode/knfolder.cpp
+++ b/knode/knfolder.cpp
@@ -12,7 +12,7 @@
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, US
*/
-#include <qfileinfo.h>
+#include <tqfileinfo.h>
#include <ksimpleconfig.h>
#include <kstandarddirs.h>
@@ -41,10 +41,10 @@ KNFolder::KNFolder()
}
-KNFolder::KNFolder(int id, const QString &name, KNFolder *parent)
+KNFolder::KNFolder(int id, const TQString &name, KNFolder *parent)
: KNArticleCollection(parent), i_d(id), i_ndexDirty(false), w_asOpen(true)
{
- QString fname=path()+QString("custom_%1").arg(i_d);
+ TQString fname=path()+TQString("custom_%1").arg(i_d);
n_ame = name;
m_boxFile.setName(fname+".mbox");
@@ -60,10 +60,10 @@ KNFolder::KNFolder(int id, const QString &name, KNFolder *parent)
}
-KNFolder::KNFolder(int id, const QString &name, const QString &prefix, KNFolder *parent)
+KNFolder::KNFolder(int id, const TQString &name, const TQString &prefix, KNFolder *parent)
: KNArticleCollection(parent), i_d(id), i_ndexDirty(false), w_asOpen(true)
{
- QString fname=path()+QString("%1_%2").arg(prefix).arg(i_d);
+ TQString fname=path()+TQString("%1_%2").arg(prefix).arg(i_d);
n_ame = name;
m_boxFile.setName(fname+".mbox");
@@ -95,16 +95,16 @@ void KNFolder::updateListItem()
}
-QString KNFolder::path()
+TQString KNFolder::path()
{
- QString dir(locateLocal("data","knode/")+"folders/");
+ TQString dir(locateLocal("data","knode/")+"folders/");
/*if (dir.isNull())
KNHelper::displayInternalFileError();*/
return dir;
}
-bool KNFolder::readInfo(const QString &infoPath)
+bool KNFolder::readInfo(const TQString &infoPath)
{
if(infoPath.isEmpty())
return false;
@@ -120,8 +120,8 @@ bool KNFolder::readInfo(const QString &infoPath)
w_asOpen=info.readBoolEntry("wasOpen", true);
if(i_d>-1) {
- QFileInfo fi(infoPath);
- QString fname=fi.dirPath(true)+"/"+fi.baseName();
+ TQFileInfo fi(infoPath);
+ TQString fname=fi.dirPath(true)+"/"+fi.baseName();
closeFiles();
clear();
@@ -186,7 +186,7 @@ bool KNFolder::loadHdrs()
return false;
}
- QCString tmp;
+ TQCString tmp;
KQCStringSplitter split;
KNLocalArticle *art;
DynData dynamic;
@@ -284,7 +284,7 @@ bool KNFolder::loadHdrs()
clear();
closeFiles();
- knGlobals.setStatusMsg(QString::null);
+ knGlobals.setStatusMsg(TQString::null);
knGlobals.top->setCursorBusy(false);
return false;
}
@@ -297,7 +297,7 @@ bool KNFolder::loadHdrs()
c_ount=cnt;
updateListItem();
- knGlobals.setStatusMsg(QString::null);
+ knGlobals.setStatusMsg(TQString::null);
knGlobals.top->setCursorBusy(false);
return true;
@@ -347,7 +347,7 @@ bool KNFolder::loadArticle(KNLocalArticle *a)
m_boxFile.readLine(); //skip X-KNode-Overview
unsigned int size=a->endOffset()-m_boxFile.at()-1;
- QCString buff(size+10);
+ TQCString buff(size+10);
int readBytes=m_boxFile.readBlock(buff.data(), size);
closeFiles();
if(readBytes < (int)(size) && m_boxFile.status() != IO_Ok) { //cannot read file
@@ -378,8 +378,8 @@ bool KNFolder::saveArticles( KNLocalArticle::List &l )
int addCnt=0;
bool ret=true;
bool clear=false;
- QTextStream ts(&m_boxFile);
- ts.setEncoding(QTextStream::Latin1);
+ TQTextStream ts(&m_boxFile);
+ ts.setEncoding(TQTextStream::Latin1);
for ( KNLocalArticle::List::Iterator it = l.begin(); it != l.end(); ++it ) {
@@ -527,7 +527,7 @@ void KNFolder::deleteFiles()
{
m_boxFile.remove();
i_ndexFile.remove();
- QFile::remove(i_nfoPath);
+ TQFile::remove(i_nfoPath);
}
diff --git a/knode/knfolder.h b/knode/knfolder.h
index 0e2bfafb9..0be6dafde 100644
--- a/knode/knfolder.h
+++ b/knode/knfolder.h
@@ -28,8 +28,8 @@ class KNFolder : public KNArticleCollection {
public:
KNFolder();
- KNFolder(int id, const QString &name, KNFolder *parent=0);
- KNFolder(int id, const QString &name, const QString &prefix, KNFolder *parent=0);
+ KNFolder(int id, const TQString &name, KNFolder *parent=0);
+ KNFolder(int id, const TQString &name, const TQString &prefix, KNFolder *parent=0);
~KNFolder();
//type
@@ -47,15 +47,15 @@ class KNFolder : public KNArticleCollection {
bool wasOpen()const { return w_asOpen; }
//info
- QString path();
- bool readInfo(const QString &confPath);
+ TQString path();
+ bool readInfo(const TQString &confPath);
bool readInfo();
void saveInfo();
//article access
KNLocalArticle* at(int i) { return static_cast<KNLocalArticle*>(KNArticleCollection::at(i)); }
KNLocalArticle* byId(int id) { return static_cast<KNLocalArticle*>(KNArticleCollection::byId(id)); }
- KNLocalArticle* byMessageId(const QCString &mid)
+ KNLocalArticle* byMessageId(const TQCString &mid)
{ return static_cast<KNLocalArticle*>(KNArticleCollection::byMessageId(mid)); }
//parent
@@ -80,8 +80,8 @@ class KNFolder : public KNArticleCollection {
bool i_ndexDirty; // do we need to sync?
bool w_asOpen; // was this folder open in the listview on the last shutdown?
KNFile m_boxFile;
- QFile i_ndexFile;
- QString i_nfoPath;
+ TQFile i_ndexFile;
+ TQString i_nfoPath;
/* helper-class: stores index-data of an article */
class DynData {
diff --git a/knode/knfoldermanager.cpp b/knode/knfoldermanager.cpp
index 5acb41866..7e3465bff 100644
--- a/knode/knfoldermanager.cpp
+++ b/knode/knfoldermanager.cpp
@@ -12,7 +12,7 @@
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, US
*/
-#include <qdir.h>
+#include <tqdir.h>
#include <klocale.h>
#include <kmessagebox.h>
@@ -33,7 +33,7 @@
KNFolderManager::KNFolderManager(KNArticleManager *a) : a_rtManager(a)
{
//standard folders
- QString dir(locateLocal("data","knode/")+"folders/");
+ TQString dir(locateLocal("data","knode/")+"folders/");
if (dir.isNull()) {
KNHelper::displayInternalFileError();
return;
@@ -68,7 +68,7 @@ KNFolderManager::KNFolderManager(KNArticleManager *a) : a_rtManager(a)
KNFolderManager::~KNFolderManager()
{
- for ( QValueList<KNFolder*>::Iterator it = mFolderList.begin(); it != mFolderList.end(); ++it )
+ for ( TQValueList<KNFolder*>::Iterator it = mFolderList.begin(); it != mFolderList.end(); ++it )
delete (*it);
}
@@ -128,7 +128,7 @@ bool KNFolderManager::unloadHeaders(KNFolder *f, bool force)
KNFolder* KNFolderManager::folder(int i)
{
- for ( QValueList<KNFolder*>::Iterator it = mFolderList.begin(); it != mFolderList.end(); ++it )
+ for ( TQValueList<KNFolder*>::Iterator it = mFolderList.begin(); it != mFolderList.end(); ++it )
if ( (*it)->id() == i )
return (*it);
return 0;
@@ -151,11 +151,11 @@ bool KNFolderManager::deleteFolder(KNFolder *f)
if(!f || f->isRootFolder() || f->isStandardFolder() || f->lockedArticles()>0)
return false;
- QValueList<KNFolder*> del;
+ TQValueList<KNFolder*> del;
KNCollection *p;
// find all subfolders of the folder we want to delete
- for ( QValueList<KNFolder*>::Iterator it = mFolderList.begin(); it != mFolderList.end(); ++it ) {
+ for ( TQValueList<KNFolder*>::Iterator it = mFolderList.begin(); it != mFolderList.end(); ++it ) {
p = (*it)->parent();
while ( p ) {
if ( p == f ) {
@@ -171,7 +171,7 @@ bool KNFolderManager::deleteFolder(KNFolder *f)
emit folderRemoved(f);
del.append(f);
- for ( QValueList<KNFolder*>::Iterator it = del.begin(); it != del.end(); ++it ) {
+ for ( TQValueList<KNFolder*>::Iterator it = del.begin(); it != del.end(); ++it ) {
if ( c_urrentFolder == (*it) )
c_urrentFolder = 0;
@@ -231,7 +231,7 @@ int KNFolderManager::unsentForAccount(int accId)
{
int cnt=0;
- for ( QValueList<KNFolder*>::Iterator it = mFolderList.begin(); it != mFolderList.end(); ++it ) {
+ for ( TQValueList<KNFolder*>::Iterator it = mFolderList.begin(); it != mFolderList.end(); ++it ) {
for ( int idx = 0; idx < (*it)->length(); ++idx ) {
KNLocalArticle *a = (*it)->at( idx );
if ( a->serverId() == accId && a->doPost() && !a->posted() )
@@ -255,7 +255,7 @@ void KNFolderManager::compactFolder(KNFolder *f)
void KNFolderManager::compactAll(KNCleanUp *cup)
{
- for ( QValueList<KNFolder*>::Iterator it = mFolderList.begin(); it != mFolderList.end(); ++it )
+ for ( TQValueList<KNFolder*>::Iterator it = mFolderList.begin(); it != mFolderList.end(); ++it )
if ( !(*it)->isRootFolder() && (*it)->lockedArticles() == 0 )
cup->appendCollection( (*it) );
}
@@ -288,7 +288,7 @@ void KNFolderManager::importFromMBox(KNFolder *f)
KNFile *file = helper.getFile(i18n("Import MBox Folder"));
KNLocalArticle::List list;
KNLocalArticle *art;
- QString s;
+ TQString s;
int artStart=0, artEnd=0;
bool done=true;
@@ -322,7 +322,7 @@ void KNFolderManager::importFromMBox(KNFolder *f)
if (artEnd != -1) {
file->at(artStart); // seek the first character of the article
int size=artEnd-artStart;
- QCString buff(size+10);
+ TQCString buff(size+10);
int readBytes=file->readBlock(buff.data(), size);
if (readBytes != -1) {
@@ -341,7 +341,7 @@ void KNFolderManager::importFromMBox(KNFolder *f)
if ((int)file->size() > artStart) {
file->at(artStart); // seek the first character of the article
int size=file->size()-artStart;
- QCString buff(size+10);
+ TQCString buff(size+10);
int readBytes=file->readBlock(buff.data(), size);
if (readBytes != -1) {
@@ -366,7 +366,7 @@ void KNFolderManager::importFromMBox(KNFolder *f)
if (!list.isEmpty())
knGlobals.articleManager()->moveIntoFolder(list, f);
- knGlobals.setStatusMsg(QString::null);
+ knGlobals.setStatusMsg(TQString::null);
knGlobals.top->setCursorBusy(false);
}
@@ -387,15 +387,15 @@ void KNFolderManager::exportToMBox(KNFolder *f)
}
KNSaveHelper helper(f->name()+".mbox", knGlobals.topWidget);
- QFile *file = helper.getFile(i18n("Export Folder"));
+ TQFile *file = helper.getFile(i18n("Export Folder"));
if (file) {
knGlobals.top->setCursorBusy(true);
knGlobals.setStatusMsg(i18n(" Exporting articles..."));
knGlobals.top->secureProcessEvents();
- QTextStream ts(file);
- ts.setEncoding(QTextStream::Latin1);
+ TQTextStream ts(file);
+ ts.setEncoding(TQTextStream::Latin1);
KNLocalArticle *a;
for(int idx=0; idx<f->length(); idx++) {
@@ -415,7 +415,7 @@ void KNFolderManager::exportToMBox(KNFolder *f)
knGlobals.top->secureProcessEvents();
}
- knGlobals.setStatusMsg(QString::null);
+ knGlobals.setStatusMsg(TQString::null);
knGlobals.top->setCursorBusy(false);
}
}
@@ -423,14 +423,14 @@ void KNFolderManager::exportToMBox(KNFolder *f)
void KNFolderManager::syncFolders()
{
- QString dir(locateLocal("data","knode/")+"folders/");
+ TQString dir(locateLocal("data","knode/")+"folders/");
if (dir.isNull()) {
KNHelper::displayInternalFileError();
return;
}
//sync
- for ( QValueList<KNFolder*>::Iterator it = mFolderList.begin(); it != mFolderList.end(); ++it ) {
+ for ( TQValueList<KNFolder*>::Iterator it = mFolderList.begin(); it != mFolderList.end(); ++it ) {
if ( !(*it)->isRootFolder() )
(*it)->syncIndex();
(*it)->saveInfo();
@@ -441,7 +441,7 @@ void KNFolderManager::syncFolders()
int KNFolderManager::loadCustomFolders()
{
int cnt=0;
- QString dir(locateLocal("data","knode/")+"folders/");
+ TQString dir(locateLocal("data","knode/")+"folders/");
KNFolder *f;
if (dir.isNull()) {
@@ -449,9 +449,9 @@ int KNFolderManager::loadCustomFolders()
return 0;
}
- QDir d(dir);
- QStringList entries(d.entryList("custom_*.info")); // ignore info files of standard folders
- for(QStringList::Iterator it=entries.begin(); it != entries.end(); ++it) {
+ TQDir d(dir);
+ TQStringList entries(d.entryList("custom_*.info")); // ignore info files of standard folders
+ for(TQStringList::Iterator it=entries.begin(); it != entries.end(); ++it) {
f=new KNFolder();
if(f->readInfo(d.absFilePath(*it))) {
if(f->id()>l_astId)
@@ -465,7 +465,7 @@ int KNFolderManager::loadCustomFolders()
// set parents
if(cnt>0) {
- for ( QValueList<KNFolder*>::Iterator it = mFolderList.begin(); it != mFolderList.end(); ++it ) {
+ for ( TQValueList<KNFolder*>::Iterator it = mFolderList.begin(); it != mFolderList.end(); ++it ) {
if ( !(*it)->isRootFolder() ) { // the root folder has no parent
KNFolder *par = folder( (*it)->parentId() );
if ( !par )
diff --git a/knode/knfoldermanager.h b/knode/knfoldermanager.h
index 9bc8254e8..a6337d801 100644
--- a/knode/knfoldermanager.h
+++ b/knode/knfoldermanager.h
@@ -15,8 +15,8 @@
#ifndef KNFOLDERMANAGER_H
#define KNFOLDERMANAGER_H
-#include <qobject.h>
-#include <qvaluelist.h>
+#include <tqobject.h>
+#include <tqvaluelist.h>
class KNFolder;
class KNArticleManager;
@@ -36,7 +36,7 @@ class KNFolderManager : public QObject
KNFolder* currentFolder() const { return c_urrentFolder; }
bool hasCurrentFolder() const { return (c_urrentFolder!=0); }
KNFolder* folder(int id);
- QValueList<KNFolder*> folders() const { return mFolderList; }
+ TQValueList<KNFolder*> folders() const { return mFolderList; }
//standard folders
KNFolder* root() const { return mFolderList[0]; }
@@ -82,7 +82,7 @@ class KNFolderManager : public QObject
int loadCustomFolders();
KNFolder *c_urrentFolder;
- QValueList<KNFolder*> mFolderList;
+ TQValueList<KNFolder*> mFolderList;
int l_astId;
KNArticleManager *a_rtManager;
diff --git a/knode/knglobals.cpp b/knode/knglobals.cpp
index 5238bebec..be9bb1488 100644
--- a/knode/knglobals.cpp
+++ b/knode/knglobals.cpp
@@ -107,7 +107,7 @@ KNMemoryManager* KNGlobals::memoryManager()
}
-void KNGlobals::setStatusMsg(const QString &text, int id)
+void KNGlobals::setStatusMsg(const TQString &text, int id)
{
if(top)
top->setStatusMsg(text, id);
diff --git a/knode/knglobals.h b/knode/knglobals.h
index 12b934dae..4f4c84c31 100644
--- a/knode/knglobals.h
+++ b/knode/knglobals.h
@@ -52,7 +52,7 @@ namespace KNode {
class KDE_EXPORT KNGlobals {
public:
/** topWidget == top, used for message boxes, */
- QWidget *topWidget;
+ TQWidget *topWidget;
/** no need to include knode.h everywhere */
KNMainWidget *top;
KXMLGUIClient *guiClient;
@@ -73,7 +73,7 @@ class KDE_EXPORT KNGlobals {
KNMemoryManager *memoryManager();
/** forwarded to top->setStatusMsg() if available */
- void setStatusMsg(const QString& text = QString::null, int id = SB_MAIN);
+ void setStatusMsg(const TQString& text = TQString::null, int id = SB_MAIN);
private:
KSharedConfig::Ptr c_onfig;
diff --git a/knode/kngroup.cpp b/knode/kngroup.cpp
index 1c8bdfbf1..e55bee10e 100644
--- a/knode/kngroup.cpp
+++ b/knode/kngroup.cpp
@@ -51,15 +51,15 @@ KNGroup::~KNGroup()
}
-QString KNGroup::path()
+TQString KNGroup::path()
{
return p_arent->path();
}
-const QString& KNGroup::name()
+const TQString& KNGroup::name()
{
- static QString ret;
+ static TQString ret;
if(n_ame.isEmpty()) ret=g_roupname;
else ret=n_ame;
return ret;
@@ -75,7 +75,7 @@ void KNGroup::updateListItem()
}
-bool KNGroup::readInfo(const QString &confPath)
+bool KNGroup::readInfo(const TQString &confPath)
{
KSimpleConfig info(confPath);
@@ -90,7 +90,7 @@ bool KNGroup::readInfo(const QString &confPath)
d_ynDataFormat = info.readNumEntry("dynDataFormat",0);
u_seCharset = info.readBoolEntry("useCharset", false);
d_efaultChSet = info.readEntry("defaultChSet").latin1();
- QString s = info.readEntry("status","unknown");
+ TQString s = info.readEntry("status","unknown");
if (s=="readOnly")
s_tatus = readOnly;
else if (s=="postingAllowed")
@@ -104,7 +104,7 @@ bool KNGroup::readInfo(const QString &confPath)
i_dentity=new KNConfig::Identity(false);
i_dentity->loadConfig(&info);
if(!i_dentity->isEmpty()) {
- kdDebug(5003) << "KNGroup::readInfo(const QString &confPath) : using alternative user for " << g_roupname << endl;
+ kdDebug(5003) << "KNGroup::readInfo(const TQString &confPath) : using alternative user for " << g_roupname << endl;
}
else {
delete i_dentity;
@@ -119,7 +119,7 @@ bool KNGroup::readInfo(const QString &confPath)
void KNGroup::saveInfo()
{
- QString dir(path());
+ TQString dir(path());
if (!dir.isNull()) {
KSimpleConfig info(dir+g_roupname+".grpinfo");
@@ -133,7 +133,7 @@ void KNGroup::saveInfo()
info.writeEntry("dynDataFormat", d_ynDataFormat);
info.writeEntry("name", n_ame);
info.writeEntry("useCharset", u_seCharset);
- info.writeEntry("defaultChSet", QString::fromLatin1(d_efaultChSet));
+ info.writeEntry("defaultChSet", TQString::fromLatin1(d_efaultChSet));
switch (s_tatus) {
case unknown: info.writeEntry("status","unknown");
break;
@@ -182,14 +182,14 @@ bool KNGroup::loadHdrs()
}
kdDebug(5003) << "KNGroup::loadHdrs() : loading headers" << endl;
- QCString buff, hdrValue;
+ TQCString buff, hdrValue;
KNFile f;
KQCStringSplitter split;
int cnt=0, id, lines, fileFormatVersion, artNumber;
unsigned int timeT;
KNRemoteArticle *art;
- QString dir(path());
+ TQString dir(path());
if (dir.isNull())
return false;
@@ -255,7 +255,7 @@ bool KNGroup::loadHdrs()
for (uint i = buff.toUInt(); i > 0; --i) {
buff = f.readLine();
int pos = buff.find(':');
- QCString hdrName = buff.left( pos );
+ TQCString hdrName = buff.left( pos );
// skip headers we already set above and which we actually never should
// find here, but however it still happens... (eg. #101355)
if ( hdrName == "Subject" || hdrName == "From" || hdrName == "Date"
@@ -384,14 +384,14 @@ bool KNGroup::unloadHdrs(bool force)
// Attention: this method is called from the network thread!
-void KNGroup::insortNewHeaders(QStrList *hdrs, QStrList *hdrfmt, KNProtocolClient *client)
+void KNGroup::insortNewHeaders(TQStrList *hdrs, TQStrList *hdrfmt, KNProtocolClient *client)
{
KNRemoteArticle *art=0, *art2=0;
- QCString data, hdr, hdrName;
+ TQCString data, hdr, hdrName;
KQCStringSplitter split;
split.setIncludeSep(false);
int new_cnt=0, added_cnt=0, todo=hdrs->count();
- QTime timer;
+ TQTime timer;
l_astFetchCount=0;
@@ -442,7 +442,7 @@ void KNGroup::insortNewHeaders(QStrList *hdrs, QStrList *hdrfmt, KNProtocolClien
//References
split.next();
if(!split.string().isEmpty())
- art->references()->from7BitString(split.string()); //use QCString::copy() ?
+ art->references()->from7BitString(split.string()); //use TQCString::copy() ?
// Bytes
split.next();
@@ -514,19 +514,19 @@ int KNGroup::saveStaticData(int cnt,bool ovr)
int idx, savedCnt=0, mode;
KNRemoteArticle *art;
- QString dir(path());
+ TQString dir(path());
if (dir.isNull())
return 0;
- QFile f(dir+g_roupname+".static");
+ TQFile f(dir+g_roupname+".static");
if(ovr) mode=IO_WriteOnly;
else mode=IO_WriteOnly | IO_Append;
if(f.open(mode)) {
- QTextStream ts(&f);
- ts.setEncoding(QTextStream::Latin1);
+ TQTextStream ts(&f);
+ ts.setEncoding(TQTextStream::Latin1);
for(idx=length()-cnt; idx<length(); idx++) {
@@ -557,7 +557,7 @@ int KNGroup::saveStaticData(int cnt,bool ovr)
// optional headers
ts << mOptionalHeaders.count() << '\n';
- for (QCString hdrName = mOptionalHeaders.first(); hdrName; hdrName = mOptionalHeaders.next()) {
+ for (TQCString hdrName = mOptionalHeaders.first(); hdrName; hdrName = mOptionalHeaders.next()) {
hdrName = hdrName.left( hdrName.find(':') );
KMime::Headers::Base *hdr = art->getHeaderByType( hdrName );
if ( hdr )
@@ -583,11 +583,11 @@ void KNGroup::saveDynamicData(int cnt,bool ovr)
KNRemoteArticle *art;
if(length()>0) {
- QString dir(path());
+ TQString dir(path());
if (dir.isNull())
return;
- QFile f(dir+g_roupname+".dynamic");
+ TQFile f(dir+g_roupname+".dynamic");
if(ovr) mode=IO_WriteOnly;
else mode=IO_WriteOnly | IO_Append;
@@ -616,11 +616,11 @@ void KNGroup::syncDynamicData()
if(length()>0) {
- QString dir(path());
+ TQString dir(path());
if (dir.isNull())
return;
- QFile f(dir+g_roupname+".dynamic");
+ TQFile f(dir+g_roupname+".dynamic");
if(f.open(IO_ReadWrite)) {
@@ -652,7 +652,7 @@ void KNGroup::syncDynamicData()
}
-void KNGroup::appendXPostID(const QString &id)
+void KNGroup::appendXPostID(const TQString &id)
{
c_rosspostIDBuffer.append(id);
}
@@ -660,11 +660,11 @@ void KNGroup::appendXPostID(const QString &id)
void KNGroup::processXPostBuffer(bool deleteAfterwards)
{
- QStringList remainder;
+ TQStringList remainder;
KNRemoteArticle *xp;
KNRemoteArticle::List al;
- for (QStringList::Iterator it = c_rosspostIDBuffer.begin(); it != c_rosspostIDBuffer.end(); ++it) {
+ for (TQStringList::Iterator it = c_rosspostIDBuffer.begin(); it != c_rosspostIDBuffer.end(); ++it) {
if ((xp=byMessageId((*it).local8Bit())))
al.append(xp);
else
@@ -686,7 +686,7 @@ void KNGroup::buildThreads(int cnt, KNProtocolClient *client)
foundCnt=0, bySubCnt=0, refCnt=0,
resortCnt=0, idx, oldRef; // idRef;
KNRemoteArticle *art, *ref;
- QTime timer;
+ TQTime timer;
timer.start();
@@ -869,7 +869,7 @@ void KNGroup::buildThreads(int cnt, KNProtocolClient *client)
KNRemoteArticle* KNGroup::findReference(KNRemoteArticle *a)
{
int found=false;
- QCString ref_mid;
+ TQCString ref_mid;
int ref_nr=0;
KNRemoteArticle *ref_art=0;
@@ -936,7 +936,7 @@ void KNGroup::scoreArticles(bool onlynew)
incReadCount();
}
- knGlobals.setStatusMsg(QString::null);
+ knGlobals.setStatusMsg(TQString::null);
knGlobals.top->setCursorBusy(false);
//kdDebug(5003) << KNScorableArticle::notifyC->collection() << endl;
@@ -965,7 +965,7 @@ void KNGroup::reorganize()
saveStaticData(length(), true);
saveDynamicData(length(), true);
knGlobals.top->headerView()->repaint();
- knGlobals.setStatusMsg(QString::null);
+ knGlobals.setStatusMsg(TQString::null);
knGlobals.top->setCursorBusy(false);
}
@@ -1047,10 +1047,10 @@ int KNGroup::statThrWithUnread()
return cnt;
}
-QString KNGroup::prepareForExecution()
+TQString KNGroup::prepareForExecution()
{
if (knGlobals.groupManager()->loadHeaders(this))
- return QString::null;
+ return TQString::null;
else
return i18n("Cannot load saved headers: %1").arg(groupname());
}
diff --git a/knode/kngroup.h b/knode/kngroup.h
index 8158e192b..dc28b9121 100644
--- a/knode/kngroup.h
+++ b/knode/kngroup.h
@@ -47,17 +47,17 @@ class KNGroup : public KNArticleCollection , public KNJobItem {
void updateListItem();
/** info */
- QString path();
- bool readInfo(const QString &confPath);
+ TQString path();
+ bool readInfo(const TQString &confPath);
void saveInfo();
/** name */
bool hasName() const { return (!n_ame.isEmpty()); }
- const QString& name();
- const QString& groupname() { return g_roupname; }
- void setGroupname(const QString &s) { g_roupname=s; }
- const QString& description() { return d_escription; }
- void setDescription(const QString &s) { d_escription=s; }
+ const TQString& name();
+ const TQString& groupname() { return g_roupname; }
+ void setGroupname(const TQString &s) { g_roupname=s; }
+ const TQString& description() { return d_escription; }
+ void setDescription(const TQString &s) { d_escription=s; }
/** count + numbers */
int newCount() const { return n_ewCount; }
@@ -88,18 +88,18 @@ class KNGroup : public KNArticleCollection , public KNJobItem {
/** article access */
KNRemoteArticle* at(int i) { return static_cast<KNRemoteArticle*> (KNArticleCollection::at(i)); }
KNRemoteArticle* byId(int id) { return static_cast<KNRemoteArticle*> (KNArticleCollection::byId(id)); }
- KNRemoteArticle* byMessageId(const QCString &mId)
+ KNRemoteArticle* byMessageId(const TQCString &mId)
{ return static_cast<KNRemoteArticle*> (KNArticleCollection::byMessageId(mId)); }
/** load + save */
bool loadHdrs();
bool unloadHdrs(bool force=true);
- void insortNewHeaders(QStrList *hdrs, QStrList *hdrfmt, KNProtocolClient *client=0);
+ void insortNewHeaders(TQStrList *hdrs, TQStrList *hdrfmt, KNProtocolClient *client=0);
int saveStaticData(int cnt,bool ovr=false);
void saveDynamicData(int cnt,bool ovr=false);
void syncDynamicData();
/** mark articles with this id as read when we later load the headers / fetch new articles */
- void appendXPostID(const QString &id);
+ void appendXPostID(const TQString &id);
void processXPostBuffer(bool deleteAfterwards);
/** article handling */
@@ -111,11 +111,11 @@ class KNGroup : public KNArticleCollection , public KNJobItem {
bool isLocked() { return l_ocked; }
void setLocked(bool l) { l_ocked=l; }
- QString prepareForExecution();
+ TQString prepareForExecution();
/** charset-handling */
- const QCString defaultCharset() { return d_efaultChSet; }
- void setDefaultCharset(const QCString &s) { d_efaultChSet=s; }
+ const TQCString defaultCharset() { return d_efaultChSet; }
+ void setDefaultCharset(const TQCString &s) { d_efaultChSet=s; }
bool useCharset() { return ( u_seCharset && !d_efaultChSet.isEmpty() ); }
void setUseCharset(bool b) { u_seCharset=b; }
@@ -146,8 +146,8 @@ class KNGroup : public KNArticleCollection , public KNJobItem {
d_ynDataFormat,
f_irstNew;
- QCString d_efaultChSet;
- QString g_roupname,
+ TQCString d_efaultChSet;
+ TQString g_roupname,
d_escription;
bool l_ocked,
@@ -155,12 +155,12 @@ class KNGroup : public KNArticleCollection , public KNJobItem {
Status s_tatus;
- QStringList c_rosspostIDBuffer;
+ TQStringList c_rosspostIDBuffer;
/** Optional headers provided by the XOVER command
* These headers will be saved within the static data
*/
- QStrList mOptionalHeaders;
+ TQStrList mOptionalHeaders;
KNConfig::Identity *i_dentity;
KNConfig::Cleanup *mCleanupConf;
diff --git a/knode/kngroupbrowser.cpp b/knode/kngroupbrowser.cpp
index 17342a4be..be91593a7 100644
--- a/knode/kngroupbrowser.cpp
+++ b/knode/kngroupbrowser.cpp
@@ -14,10 +14,10 @@
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, US
*/
-#include <qlayout.h>
-#include <qcheckbox.h>
-#include <qtimer.h>
-#include <qapplication.h>
+#include <tqlayout.h>
+#include <tqcheckbox.h>
+#include <tqtimer.h>
+#include <tqapplication.h>
#include <kseparator.h>
#include <kiconloader.h>
@@ -30,73 +30,73 @@
#include "knconfigmanager.h"
#include "knnntpaccount.h"
#include "kngroupbrowser.h"
-#include <qlabel.h>
-#include <qpushbutton.h>
+#include <tqlabel.h>
+#include <tqpushbutton.h>
-KNGroupBrowser::KNGroupBrowser(QWidget *parent, const QString &caption, KNNntpAccount *a,
- int buttons, bool newCBact, const QString &user1, const QString &user2) :
+KNGroupBrowser::KNGroupBrowser(TQWidget *parent, const TQString &caption, KNNntpAccount *a,
+ int buttons, bool newCBact, const TQString &user1, const TQString &user2) :
KDialogBase( parent, 0L, true, caption, buttons | Help | Ok | Cancel, Ok, true, user1, user2 ),
incrementalFilter(false), a_ccount(a)
{
- refilterTimer = new QTimer();
+ refilterTimer = new TQTimer();
- allList=new QSortedList<KNGroupInfo>;
+ allList=new TQSortedList<KNGroupInfo>;
allList->setAutoDelete(true);
- matchList=new QSortedList<KNGroupInfo>;
+ matchList=new TQSortedList<KNGroupInfo>;
matchList->setAutoDelete(false);
//create Widgets
- page=new QWidget(this);
+ page=new TQWidget(this);
setMainWidget(page);
filterEdit=new KLineEdit(page);
- QLabel *l=new QLabel(filterEdit,i18n("S&earch:"), page);
- noTreeCB=new QCheckBox(i18n("Disable &tree view"), page);
+ TQLabel *l=new TQLabel(filterEdit,i18n("S&earch:"), page);
+ noTreeCB=new TQCheckBox(i18n("Disable &tree view"), page);
noTreeCB->setChecked(false);
- subCB=new QCheckBox(i18n("&Subscribed only"), page);
+ subCB=new TQCheckBox(i18n("&Subscribed only"), page);
subCB->setChecked(false);
- newCB=new QCheckBox(i18n("&New only"), page);
+ newCB=new TQCheckBox(i18n("&New only"), page);
if (!newCBact)
newCB->hide();
newCB->setChecked(false);
KSeparator *sep=new KSeparator(KSeparator::HLine, page);
- QFont fnt=font();
+ TQFont fnt=font();
fnt.setBold(true);
- leftLabel=new QLabel(i18n("Loading groups..."), page);
- rightLabel=new QLabel(page);
+ leftLabel=new TQLabel(i18n("Loading groups..."), page);
+ rightLabel=new TQLabel(page);
leftLabel->setFont(fnt);
rightLabel->setFont(fnt);
pmGroup=knGlobals.configManager()->appearance()->icon(KNConfig::Appearance::group);
pmNew=knGlobals.configManager()->appearance()->icon(KNConfig::Appearance::redBall);
- pmRight=BarIconSet( QApplication::reverseLayout()? "back": "forward");
- pmLeft=BarIconSet( QApplication::reverseLayout() ? "forward" : "back");
+ pmRight=BarIconSet( TQApplication::reverseLayout()? "back": "forward");
+ pmLeft=BarIconSet( TQApplication::reverseLayout() ? "forward" : "back");
- arrowBtn1=new QPushButton(page);
+ arrowBtn1=new TQPushButton(page);
arrowBtn1->setEnabled(false);
- arrowBtn2=new QPushButton(page);
+ arrowBtn2=new TQPushButton(page);
arrowBtn2->setEnabled(false);
arrowBtn1->setIconSet(pmRight);
arrowBtn2->setIconSet(pmLeft);
arrowBtn1->setFixedSize(35,30);
arrowBtn2->setFixedSize(35,30);
- groupView=new QListView(page);
+ groupView=new TQListView(page);
groupView->setRootIsDecorated(true);
groupView->addColumn(i18n("Name"));
groupView->addColumn(i18n("Description"));
groupView->setTreeStepSize(15);
- connect(groupView, SIGNAL(doubleClicked(QListViewItem*)),
- this, SLOT(slotItemDoubleClicked(QListViewItem*)));
+ connect(groupView, TQT_SIGNAL(doubleClicked(TQListViewItem*)),
+ this, TQT_SLOT(slotItemDoubleClicked(TQListViewItem*)));
//layout
- QGridLayout *topL=new QGridLayout(page,3,1,0,5);
- QHBoxLayout *filterL=new QHBoxLayout(10);
- QVBoxLayout *arrL=new QVBoxLayout(10);
- listL=new QGridLayout(2, 3, 5);
+ TQGridLayout *topL=new TQGridLayout(page,3,1,0,5);
+ TQHBoxLayout *filterL=new TQHBoxLayout(10);
+ TQVBoxLayout *arrL=new TQVBoxLayout(10);
+ listL=new TQGridLayout(2, 3, 5);
topL->addLayout(filterL, 0,0);
topL->addWidget(sep,1,0);
@@ -121,22 +121,22 @@ KNGroupBrowser::KNGroupBrowser(QWidget *parent, const QString &caption, KNNntpAc
arrL->addWidget(arrowBtn2, AlignCenter);
//connect
- connect(filterEdit, SIGNAL(textChanged(const QString&)),
- SLOT(slotFilterTextChanged(const QString&)));
- connect(groupView, SIGNAL(expanded(QListViewItem*)),
- SLOT(slotItemExpand(QListViewItem*)));
+ connect(filterEdit, TQT_SIGNAL(textChanged(const TQString&)),
+ TQT_SLOT(slotFilterTextChanged(const TQString&)));
+ connect(groupView, TQT_SIGNAL(expanded(TQListViewItem*)),
+ TQT_SLOT(slotItemExpand(TQListViewItem*)));
- connect(refilterTimer, SIGNAL(timeout()), SLOT(slotRefilter()));
- connect(noTreeCB, SIGNAL(clicked()), SLOT(slotTreeCBToggled()));
- connect(subCB, SIGNAL(clicked()), SLOT(slotSubCBToggled()));
- connect(newCB, SIGNAL(clicked()), SLOT(slotNewCBToggled()));
+ connect(refilterTimer, TQT_SIGNAL(timeout()), TQT_SLOT(slotRefilter()));
+ connect(noTreeCB, TQT_SIGNAL(clicked()), TQT_SLOT(slotTreeCBToggled()));
+ connect(subCB, TQT_SIGNAL(clicked()), TQT_SLOT(slotSubCBToggled()));
+ connect(newCB, TQT_SIGNAL(clicked()), TQT_SLOT(slotNewCBToggled()));
enableButton(User1,false);
enableButton(User2,false);
filterEdit->setFocus();
- QTimer::singleShot(2, this, SLOT(slotLoadList()));
+ TQTimer::singleShot(2, this, TQT_SLOT(slotLoadList()));
}
@@ -169,7 +169,7 @@ void KNGroupBrowser::slotReceiveList(KNGroupListData* d)
void KNGroupBrowser::changeItemState(const KNGroupInfo &gi, bool s)
{
- QListViewItemIterator it(groupView);
+ TQListViewItemIterator it(groupView);
for( ; it.current(); ++it)
if (it.current()->isSelectable() && (static_cast<CheckItem*>(it.current())->info==gi))
@@ -177,10 +177,10 @@ void KNGroupBrowser::changeItemState(const KNGroupInfo &gi, bool s)
}
-bool KNGroupBrowser::itemInListView(QListView *view, const KNGroupInfo &gi)
+bool KNGroupBrowser::itemInListView(TQListView *view, const KNGroupInfo &gi)
{
if(!view) return false;
- QListViewItemIterator it(view);
+ TQListViewItemIterator it(view);
for( ; it.current(); ++it)
if(static_cast<GroupItem*>(it.current())->info==gi)
@@ -190,16 +190,16 @@ bool KNGroupBrowser::itemInListView(QListView *view, const KNGroupInfo &gi)
}
-void KNGroupBrowser::createListItems(QListViewItem *parent)
+void KNGroupBrowser::createListItems(TQListViewItem *parent)
{
- QString prefix, tlgn, compare;
- QListViewItem *it;
+ TQString prefix, tlgn, compare;
+ TQListViewItem *it;
CheckItem *cit;
int colon;
bool expandit=false;
if(parent) {
- QListViewItem *p=parent;
+ TQListViewItem *p=parent;
while(p) {
prefix.prepend(p->text(0));
p=p->parent();
@@ -229,9 +229,9 @@ void KNGroupBrowser::createListItems(QListViewItem *parent)
if(expandit) {
if(parent)
- it=new QListViewItem(parent, tlgn);
+ it=new TQListViewItem(parent, tlgn);
else
- it=new QListViewItem(groupView, tlgn);
+ it=new TQListViewItem(groupView, tlgn);
it->setSelectable(false);
it->setExpandable(true);
@@ -248,10 +248,10 @@ void KNGroupBrowser::createListItems(QListViewItem *parent)
}
-void KNGroupBrowser::removeListItem(QListView *view, const KNGroupInfo &gi)
+void KNGroupBrowser::removeListItem(TQListView *view, const KNGroupInfo &gi)
{
if(!view) return;
- QListViewItemIterator it(view);
+ TQListViewItemIterator it(view);
for( ; it.current(); ++it)
if(static_cast<GroupItem*>(it.current())->info==gi) {
@@ -267,7 +267,7 @@ void KNGroupBrowser::slotLoadList()
}
-void KNGroupBrowser::slotItemExpand(QListViewItem *it)
+void KNGroupBrowser::slotItemExpand(TQListViewItem *it)
{
if(!it) return;
@@ -287,7 +287,7 @@ void KNGroupBrowser::slotItemExpand(QListViewItem *it)
{
groupView->ensureVisible(groupView->contentsX(), y+h/2, 0, h/2);
delayedCenter = y+h/2;
- QTimer::singleShot(300, this, SLOT(slotCenterDelayed()));
+ TQTimer::singleShot(300, this, TQT_SLOT(slotCenterDelayed()));
}
}
@@ -299,29 +299,29 @@ void KNGroupBrowser::slotCenterDelayed()
}
-void KNGroupBrowser::slotItemDoubleClicked(QListViewItem *it)
+void KNGroupBrowser::slotItemDoubleClicked(TQListViewItem *it)
{
if (it && (it->childCount()==0)) static_cast<CheckItem*>(it)->setOn(!static_cast<CheckItem*>(it)->isOn());
}
#define MIN_FOR_TREE 200
-void KNGroupBrowser::slotFilter(const QString &txt)
+void KNGroupBrowser::slotFilter(const TQString &txt)
{
- QString filtertxt = txt.lower();
- QRegExp reg(filtertxt, false, false);
+ TQString filtertxt = txt.lower();
+ TQRegExp reg(filtertxt, false, false);
CheckItem *cit=0;
bool notCheckSub = !subCB->isChecked();
bool notCheckNew = !newCB->isChecked();
bool notCheckStr = (filtertxt.isEmpty());
- bool isRegexp = filtertxt.contains(QRegExp("[^a-z0-9\\-\\+.]"));
+ bool isRegexp = filtertxt.contains(TQRegExp("[^a-z0-9\\-\\+.]"));
bool doIncrementalUpdate = (!isRegexp && incrementalFilter && (filtertxt.left(lastFilter.length())==lastFilter));
if (doIncrementalUpdate) {
- QSortedList<KNGroupInfo> *tempList = new QSortedList<KNGroupInfo>();
+ TQSortedList<KNGroupInfo> *tempList = new TQSortedList<KNGroupInfo>();
tempList->setAutoDelete(false);
for(KNGroupInfo *g=matchList->first(); g; g=matchList->next()) {
@@ -386,7 +386,7 @@ void KNGroupBrowser::slotNewCBToggled()
}
-void KNGroupBrowser::slotFilterTextChanged(const QString &)
+void KNGroupBrowser::slotFilterTextChanged(const TQString &)
{
if (subCB->isChecked() || newCB->isChecked())
slotRefilter();
@@ -405,10 +405,10 @@ void KNGroupBrowser::slotRefilter()
//=======================================================================================
-KNGroupBrowser::CheckItem::CheckItem(QListView *v, const KNGroupInfo &gi, KNGroupBrowser *b) :
- QCheckListItem(v, gi.name, QCheckListItem::CheckBox), info(gi), browser(b)
+KNGroupBrowser::CheckItem::CheckItem(TQListView *v, const KNGroupInfo &gi, KNGroupBrowser *b) :
+ TQCheckListItem(v, gi.name, TQCheckListItem::CheckBox), info(gi), browser(b)
{
- QString des(gi.description);
+ TQString des(gi.description);
if (gi.status == KNGroup::moderated) {
setText(0,gi.name+" (m)");
if (!des.upper().contains(i18n("moderated").upper()))
@@ -418,10 +418,10 @@ KNGroupBrowser::CheckItem::CheckItem(QListView *v, const KNGroupInfo &gi, KNGrou
}
-KNGroupBrowser::CheckItem::CheckItem(QListViewItem *i, const KNGroupInfo &gi, KNGroupBrowser *b) :
- QCheckListItem(i, gi.name, QCheckListItem::CheckBox), info(gi), browser(b)
+KNGroupBrowser::CheckItem::CheckItem(TQListViewItem *i, const KNGroupInfo &gi, KNGroupBrowser *b) :
+ TQCheckListItem(i, gi.name, TQCheckListItem::CheckBox), info(gi), browser(b)
{
- QString des(gi.description);
+ TQString des(gi.description);
if (gi.status == KNGroup::moderated) {
setText(0,gi.name+" (m)");
if (!des.upper().contains(i18n("moderated").upper()))
@@ -440,7 +440,7 @@ void KNGroupBrowser::CheckItem::setChecked(bool c)
{
KNGroupBrowser *b=browser;
browser=0;
- QCheckListItem::setOn(c);
+ TQCheckListItem::setOn(c);
browser=b;
}
@@ -457,16 +457,16 @@ void KNGroupBrowser::CheckItem::stateChange(bool s)
//=======================================================================================
-KNGroupBrowser::GroupItem::GroupItem(QListView *v, const KNGroupInfo &gi)
- : QListViewItem(v, gi.name), info(gi)
+KNGroupBrowser::GroupItem::GroupItem(TQListView *v, const KNGroupInfo &gi)
+ : TQListViewItem(v, gi.name), info(gi)
{
if (gi.status == KNGroup::moderated)
setText(0,gi.name+" (m)");
}
-KNGroupBrowser::GroupItem::GroupItem(QListViewItem *i, const KNGroupInfo &gi)
- : QListViewItem(i, gi.name), info(gi)
+KNGroupBrowser::GroupItem::GroupItem(TQListViewItem *i, const KNGroupInfo &gi)
+ : TQListViewItem(i, gi.name), info(gi)
{
}
diff --git a/knode/kngroupbrowser.h b/knode/kngroupbrowser.h
index eb633c8b9..15e639281 100644
--- a/knode/kngroupbrowser.h
+++ b/knode/kngroupbrowser.h
@@ -17,7 +17,7 @@
#ifndef KNGROUPBROWSER_H
#define KNGROUPBROWSER_H
-#include <qlistview.h>
+#include <tqlistview.h>
#include <kdialogbase.h>
@@ -37,11 +37,11 @@ class KNGroupBrowser : public KDialogBase {
Q_OBJECT
public:
- class CheckItem : public QCheckListItem {
+ class CheckItem : public TQCheckListItem {
public:
- CheckItem(QListView *v, const KNGroupInfo &gi, KNGroupBrowser *b);
- CheckItem(QListViewItem *i, const KNGroupInfo &gi, KNGroupBrowser *b);
+ CheckItem(TQListView *v, const KNGroupInfo &gi, KNGroupBrowser *b);
+ CheckItem(TQListViewItem *i, const KNGroupInfo &gi, KNGroupBrowser *b);
~CheckItem();
void setChecked(bool c);
@@ -52,18 +52,18 @@ class KNGroupBrowser : public KDialogBase {
KNGroupBrowser *browser;
};
- class GroupItem : public QListViewItem {
+ class GroupItem : public TQListViewItem {
public:
- GroupItem(QListView *v, const KNGroupInfo &gi);
- GroupItem(QListViewItem *i, const KNGroupInfo &gi);
+ GroupItem(TQListView *v, const KNGroupInfo &gi);
+ GroupItem(TQListViewItem *i, const KNGroupInfo &gi);
~GroupItem();
KNGroupInfo info;
};
- KNGroupBrowser(QWidget *parent, const QString &caption, KNNntpAccount *a, int buttons=0,
- bool newCBact=false, const QString &user1=QString::null, const QString &user2=QString::null);
+ KNGroupBrowser(TQWidget *parent, const TQString &caption, KNNntpAccount *a, int buttons=0,
+ bool newCBact=false, const TQString &user1=TQString::null, const TQString &user2=TQString::null);
~KNGroupBrowser();
KNNntpAccount* account()const { return a_ccount; }
@@ -78,38 +78,38 @@ class KNGroupBrowser : public KDialogBase {
protected:
virtual void updateItemState(CheckItem *it)=0;
void changeItemState(const KNGroupInfo &gi, bool s);
- bool itemInListView(QListView *view, const KNGroupInfo &gi);
- void removeListItem(QListView *view, const KNGroupInfo &gi);
- void createListItems(QListViewItem *parent=0);
+ bool itemInListView(TQListView *view, const KNGroupInfo &gi);
+ void removeListItem(TQListView *view, const KNGroupInfo &gi);
+ void createListItems(TQListViewItem *parent=0);
- QWidget *page;
- QListView *groupView;
+ TQWidget *page;
+ TQListView *groupView;
int delayedCenter;
KLineEdit *filterEdit;
- QCheckBox *noTreeCB, *subCB, *newCB;
- QPushButton *arrowBtn1, *arrowBtn2;
- QPixmap pmGroup, pmNew;
- QIconSet pmRight, pmLeft;
- QGridLayout *listL;
- QLabel *leftLabel, *rightLabel;
- QTimer *refilterTimer;
- QString lastFilter;
+ TQCheckBox *noTreeCB, *subCB, *newCB;
+ TQPushButton *arrowBtn1, *arrowBtn2;
+ TQPixmap pmGroup, pmNew;
+ TQIconSet pmRight, pmLeft;
+ TQGridLayout *listL;
+ TQLabel *leftLabel, *rightLabel;
+ TQTimer *refilterTimer;
+ TQString lastFilter;
bool incrementalFilter;
KNNntpAccount *a_ccount;
- QSortedList<KNGroupInfo> *allList, *matchList;
+ TQSortedList<KNGroupInfo> *allList, *matchList;
protected slots:
void slotLoadList();
- void slotItemExpand(QListViewItem *it);
+ void slotItemExpand(TQListViewItem *it);
void slotCenterDelayed();
/** double click checks/unchecks (opens/closes) item */
- void slotItemDoubleClicked(QListViewItem *it);
- void slotFilter(const QString &txt);
+ void slotItemDoubleClicked(TQListViewItem *it);
+ void slotFilter(const TQString &txt);
void slotTreeCBToggled();
void slotSubCBToggled();
void slotNewCBToggled();
- void slotFilterTextChanged(const QString &txt);
+ void slotFilterTextChanged(const TQString &txt);
void slotRefilter();
};
diff --git a/knode/kngroupdialog.cpp b/knode/kngroupdialog.cpp
index b983f724a..64deea4f8 100644
--- a/knode/kngroupdialog.cpp
+++ b/knode/kngroupdialog.cpp
@@ -14,11 +14,11 @@
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, US
*/
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qbuttongroup.h>
-#include <qradiobutton.h>
-#include <qcheckbox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqbuttongroup.h>
+#include <tqradiobutton.h>
+#include <tqcheckbox.h>
#include <kdebug.h>
#include <kglobal.h>
@@ -31,19 +31,19 @@
#include "knnntpaccount.h"
#include "kngroupdialog.h"
#include "knglobals.h"
-#include <qpushbutton.h>
+#include <tqpushbutton.h>
-KNGroupDialog::KNGroupDialog(QWidget *parent, KNNntpAccount *a) :
+KNGroupDialog::KNGroupDialog(TQWidget *parent, KNNntpAccount *a) :
KNGroupBrowser(parent, i18n("Subscribe to Newsgroups"),a, User1 | User2, true, i18n("New &List"), i18n("New &Groups...") )
{
rightLabel->setText(i18n("Current changes:"));
- subView=new QListView(page);
+ subView=new TQListView(page);
subView->addColumn(i18n("Subscribe To"));
- unsubView=new QListView(page);
+ unsubView=new TQListView(page);
unsubView->addColumn(i18n("Unsubscribe From"));
- QVBoxLayout *protL=new QVBoxLayout(3);
+ TQVBoxLayout *protL=new TQVBoxLayout(3);
listL->addLayout(protL, 1,2);
protL->addWidget(subView);
protL->addWidget(unsubView);
@@ -51,19 +51,19 @@ KNGroupDialog::KNGroupDialog(QWidget *parent, KNNntpAccount *a) :
dir1=right;
dir2=left;
- connect(groupView, SIGNAL(selectionChanged(QListViewItem*)),
- this, SLOT(slotItemSelected(QListViewItem*)));
- connect(groupView, SIGNAL(selectionChanged()),
- this, SLOT(slotSelectionChanged()));
- connect(subView, SIGNAL(selectionChanged(QListViewItem*)),
- this, SLOT(slotItemSelected(QListViewItem*)));
- connect(unsubView, SIGNAL(selectionChanged(QListViewItem*)),
- this, SLOT(slotItemSelected(QListViewItem*)));
+ connect(groupView, TQT_SIGNAL(selectionChanged(TQListViewItem*)),
+ this, TQT_SLOT(slotItemSelected(TQListViewItem*)));
+ connect(groupView, TQT_SIGNAL(selectionChanged()),
+ this, TQT_SLOT(slotSelectionChanged()));
+ connect(subView, TQT_SIGNAL(selectionChanged(TQListViewItem*)),
+ this, TQT_SLOT(slotItemSelected(TQListViewItem*)));
+ connect(unsubView, TQT_SIGNAL(selectionChanged(TQListViewItem*)),
+ this, TQT_SLOT(slotItemSelected(TQListViewItem*)));
- connect(arrowBtn1, SIGNAL(clicked()), this, SLOT(slotArrowBtn1()));
- connect(arrowBtn2, SIGNAL(clicked()), this, SLOT(slotArrowBtn2()));
+ connect(arrowBtn1, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotArrowBtn1()));
+ connect(arrowBtn2, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotArrowBtn2()));
- KNHelper::restoreWindowSize("groupDlg", this, QSize(662,393)); // optimized for 800x600
+ KNHelper::restoreWindowSize("groupDlg", this, TQSize(662,393)); // optimized for 800x600
setHelp("anc-fetch-group-list");
}
@@ -121,14 +121,14 @@ void KNGroupDialog::updateItemState(CheckItem *it)
-void KNGroupDialog::toSubscribe(QSortedList<KNGroupInfo> *l)
+void KNGroupDialog::toSubscribe(TQSortedList<KNGroupInfo> *l)
{
KNGroupInfo *info;
l->clear();
l->setAutoDelete(true);
bool moderated=false;
- QListViewItemIterator it(subView);
+ TQListViewItemIterator it(subView);
for(; it.current(); ++it) {
info = new KNGroupInfo();
*info = ((static_cast<GroupItem*>(it.current()))->info);
@@ -138,15 +138,15 @@ void KNGroupDialog::toSubscribe(QSortedList<KNGroupInfo> *l)
}
if (moderated) // warn the user
KMessageBox::information(knGlobals.topWidget,i18n("You have subscribed to a moderated newsgroup.\nYour articles will not appear in the group immediately.\nThey have to go through a moderation process."),
- QString::null,"subscribeModeratedWarning");
+ TQString::null,"subscribeModeratedWarning");
}
-void KNGroupDialog::toUnsubscribe(QStringList *l)
+void KNGroupDialog::toUnsubscribe(TQStringList *l)
{
l->clear();
- QListViewItemIterator it(unsubView);
+ TQListViewItemIterator it(unsubView);
for(; it.current(); ++it)
l->append(((static_cast<GroupItem*>(it.current()))->info).name);
}
@@ -155,7 +155,7 @@ void KNGroupDialog::toUnsubscribe(QStringList *l)
void KNGroupDialog::setButtonDirection(arrowButton b, arrowDirection d)
{
- QPushButton *btn=0;
+ TQPushButton *btn=0;
if(b==btn1 && dir1!=d) {
btn=arrowBtn1;
dir1=d;
@@ -175,9 +175,9 @@ void KNGroupDialog::setButtonDirection(arrowButton b, arrowDirection d)
-void KNGroupDialog::slotItemSelected(QListViewItem *it)
+void KNGroupDialog::slotItemSelected(TQListViewItem *it)
{
- const QObject *s=sender();
+ const TQObject *s=sender();
if(s==subView) {
@@ -281,29 +281,29 @@ void KNGroupDialog::slotUser1()
// new groups
void KNGroupDialog::slotUser2()
{
- QDate lastDate = a_ccount->lastNewFetch();
+ TQDate lastDate = a_ccount->lastNewFetch();
KDialogBase *dlg = new KDialogBase( this, 0L, true, i18n("New Groups"), Ok | Cancel, Ok);
- QButtonGroup *btnGrp = new QButtonGroup(i18n("Check for New Groups"),dlg);
+ TQButtonGroup *btnGrp = new TQButtonGroup(i18n("Check for New Groups"),dlg);
dlg->setMainWidget(btnGrp);
- QGridLayout *topL = new QGridLayout(btnGrp,4,2,25,10);
+ TQGridLayout *topL = new TQGridLayout(btnGrp,4,2,25,10);
- QRadioButton *takeLast = new QRadioButton( i18n("Created since last check:"), btnGrp );
+ TQRadioButton *takeLast = new TQRadioButton( i18n("Created since last check:"), btnGrp );
topL->addMultiCellWidget(takeLast, 0, 0, 0, 1);
- QLabel *l = new QLabel(KGlobal::locale()->formatDate(lastDate, false),btnGrp);
+ TQLabel *l = new TQLabel(KGlobal::locale()->formatDate(lastDate, false),btnGrp);
topL->addWidget(l, 1, 1, Qt::AlignLeft);
- connect(takeLast, SIGNAL(toggled(bool)), l, SLOT(setEnabled(bool)));
+ connect(takeLast, TQT_SIGNAL(toggled(bool)), l, TQT_SLOT(setEnabled(bool)));
- QRadioButton *takeCustom = new QRadioButton( i18n("Created since this date:"), btnGrp );
+ TQRadioButton *takeCustom = new TQRadioButton( i18n("Created since this date:"), btnGrp );
topL->addMultiCellWidget(takeCustom, 2, 2, 0, 1);
KDatePicker *dateSel = new KDatePicker(btnGrp, lastDate);
dateSel->setMinimumSize(dateSel->sizeHint());
topL->addWidget(dateSel, 3, 1, Qt::AlignLeft);
- connect(takeCustom, SIGNAL(toggled(bool)), dateSel, SLOT(setEnabled(bool)));
+ connect(takeCustom, TQT_SIGNAL(toggled(bool)), dateSel, TQT_SLOT(setEnabled(bool)));
takeLast->setChecked(true);
dateSel->setEnabled(false);
@@ -314,7 +314,7 @@ void KNGroupDialog::slotUser2()
if (dlg->exec()) {
if (takeCustom->isChecked())
lastDate = dateSel->date();
- a_ccount->setLastNewFetch(QDate::currentDate());
+ a_ccount->setLastNewFetch(TQDate::currentDate());
leftLabel->setText(i18n("Checking for new groups..."));
enableButton(User1,false);
enableButton(User2,false);
diff --git a/knode/kngroupdialog.h b/knode/kngroupdialog.h
index 306a36810..a2d747986 100644
--- a/knode/kngroupdialog.h
+++ b/knode/kngroupdialog.h
@@ -25,11 +25,11 @@ class KNGroupDialog : public KNGroupBrowser {
Q_OBJECT
public:
- KNGroupDialog(QWidget *parent, KNNntpAccount *a);
+ KNGroupDialog(TQWidget *parent, KNNntpAccount *a);
~KNGroupDialog();
- void toSubscribe(QSortedList<KNGroupInfo> *l);
- void toUnsubscribe(QStringList *l);
+ void toSubscribe(TQSortedList<KNGroupInfo> *l);
+ void toUnsubscribe(TQStringList *l);
protected:
enum arrowDirection { right, left };
@@ -37,12 +37,12 @@ class KNGroupDialog : public KNGroupBrowser {
void updateItemState(CheckItem *it);
void itemChangedState(CheckItem *it, bool s);
void setButtonDirection(arrowButton b, arrowDirection d);
- QPushButton *newListBtn;
- QListView *subView, *unsubView;
+ TQPushButton *newListBtn;
+ TQListView *subView, *unsubView;
arrowDirection dir1, dir2;
protected slots:
- void slotItemSelected(QListViewItem *it);
+ void slotItemSelected(TQListViewItem *it);
/** deactivates the button when a root item is selected */
void slotSelectionChanged();
void slotArrowBtn1();
@@ -54,7 +54,7 @@ class KNGroupDialog : public KNGroupBrowser {
signals:
void fetchList(KNNntpAccount *a);
- void checkNew(KNNntpAccount *a,QDate date);
+ void checkNew(KNNntpAccount *a,TQDate date);
};
#endif
diff --git a/knode/kngroupmanager.cpp b/knode/kngroupmanager.cpp
index 584896091..429b93bc5 100644
--- a/knode/kngroupmanager.cpp
+++ b/knode/kngroupmanager.cpp
@@ -14,7 +14,7 @@
#include <stdio.h>
#include <stdlib.h>
-#include <qdir.h>
+#include <tqdir.h>
#include <klocale.h>
#include <kmessagebox.h>
@@ -51,7 +51,7 @@ KNGroupInfo::KNGroupInfo()
}
-KNGroupInfo::KNGroupInfo(const QString &n_ame, const QString &d_escription, bool n_ewGroup, bool s_ubscribed, KNGroup::Status s_tatus)
+KNGroupInfo::KNGroupInfo(const TQString &n_ame, const TQString &d_escription, bool n_ewGroup, bool s_ubscribed, KNGroup::Status s_tatus)
: name(n_ame), description(d_escription), newGroup(n_ewGroup), subscribed(s_ubscribed),
status(s_tatus)
{
@@ -81,7 +81,7 @@ bool KNGroupInfo::operator< (const KNGroupInfo &gi2)
KNGroupListData::KNGroupListData()
: codecForDescriptions(0)
{
- groups = new QSortedList<KNGroupInfo>;
+ groups = new TQSortedList<KNGroupInfo>;
groups->setAutoDelete(true);
}
@@ -97,12 +97,12 @@ KNGroupListData::~KNGroupListData()
bool KNGroupListData::readIn(KNProtocolClient *client)
{
KNFile f(path+"groups");
- QCString line;
+ TQCString line;
int sepPos1,sepPos2;
- QString name,description;
+ TQString name,description;
bool sub;
KNGroup::Status status=KNGroup::unknown;
- QTime timer;
+ TQTime timer;
uint size=f.size()+2;
timer.start();
@@ -114,18 +114,18 @@ bool KNGroupListData::readIn(KNProtocolClient *client)
sepPos1 = line.find(' ');
if (sepPos1==-1) { // no description
- name = QString::fromUtf8(line);
- description = QString::null;
+ name = TQString::fromUtf8(line);
+ description = TQString::null;
status = KNGroup::unknown;
} else {
- name = QString::fromUtf8(line.left(sepPos1));
+ name = TQString::fromUtf8(line.left(sepPos1));
sepPos2 = line.find(' ',sepPos1+1);
if (sepPos2==-1) { // no status
- description = QString::fromUtf8(line.right(line.length()-sepPos1-1));
+ description = TQString::fromUtf8(line.right(line.length()-sepPos1-1));
status = KNGroup::unknown;
} else {
- description = QString::fromUtf8(line.right(line.length()-sepPos2-1));
+ description = TQString::fromUtf8(line.right(line.length()-sepPos2-1));
switch (line[sepPos1+1]) {
case 'u': status = KNGroup::unknown;
break;
@@ -165,8 +165,8 @@ bool KNGroupListData::readIn(KNProtocolClient *client)
bool KNGroupListData::writeOut()
{
- QFile f(path+"groups");
- QCString temp;
+ TQFile f(path+"groups");
+ TQCString temp;
if(f.open(IO_WriteOnly)) {
for (KNGroupInfo *i=groups->first(); i; i=groups->next()) {
@@ -196,7 +196,7 @@ bool KNGroupListData::writeOut()
// merge in new groups, we want to preserve the "subscribed"-flag
// of the loaded groups and the "new"-flag of the new groups.
-void KNGroupListData::merge(QSortedList<KNGroupInfo>* newGroups)
+void KNGroupListData::merge(TQSortedList<KNGroupInfo>* newGroups)
{
bool subscribed;
@@ -213,9 +213,9 @@ void KNGroupListData::merge(QSortedList<KNGroupInfo>* newGroups)
}
-QSortedList<KNGroupInfo>* KNGroupListData::extractList()
+TQSortedList<KNGroupInfo>* KNGroupListData::extractList()
{
- QSortedList<KNGroupInfo>* temp = groups;
+ TQSortedList<KNGroupInfo>* temp = groups;
groups = 0;
return temp;
}
@@ -224,8 +224,8 @@ QSortedList<KNGroupInfo>* KNGroupListData::extractList()
//===============================================================================
-KNGroupManager::KNGroupManager(QObject * parent, const char * name)
- : QObject(parent,name)
+KNGroupManager::KNGroupManager(TQObject * parent, const char * name)
+ : TQObject(parent,name)
{
c_urrentGroup=0;
a_rticleMgr = knGlobals.articleManager();
@@ -234,14 +234,14 @@ KNGroupManager::KNGroupManager(QObject * parent, const char * name)
KNGroupManager::~KNGroupManager()
{
- for ( QValueList<KNGroup*>::Iterator it = mGroupList.begin(); it != mGroupList.end(); ++it )
+ for ( TQValueList<KNGroup*>::Iterator it = mGroupList.begin(); it != mGroupList.end(); ++it )
delete (*it);
}
void KNGroupManager::syncGroups()
{
- for ( QValueList<KNGroup*>::Iterator it = mGroupList.begin(); it != mGroupList.end(); ++it ) {
+ for ( TQValueList<KNGroup*>::Iterator it = mGroupList.begin(); it != mGroupList.end(); ++it ) {
(*it)->syncDynamicData();
(*it)->saveInfo();
}
@@ -252,13 +252,13 @@ void KNGroupManager::loadGroups(KNNntpAccount *a)
{
KNGroup *group;
- QString dir(a->path());
+ TQString dir(a->path());
if (dir.isNull())
return;
- QDir d(dir);
+ TQDir d(dir);
- QStringList entries(d.entryList("*.grpinfo"));
- for(QStringList::Iterator it=entries.begin(); it != entries.end(); ++it) {
+ TQStringList entries(d.entryList("*.grpinfo"));
+ for(TQStringList::Iterator it=entries.begin(); it != entries.end(); ++it) {
group=new KNGroup(a);
if (group->readInfo(dir+(*it))) {
mGroupList.append( group );
@@ -271,19 +271,19 @@ void KNGroupManager::loadGroups(KNNntpAccount *a)
}
-void KNGroupManager::getSubscribed(KNNntpAccount *a, QStringList &l)
+void KNGroupManager::getSubscribed(KNNntpAccount *a, TQStringList &l)
{
l.clear();
- for ( QValueList<KNGroup*>::Iterator it = mGroupList.begin(); it != mGroupList.end(); ++it )
+ for ( TQValueList<KNGroup*>::Iterator it = mGroupList.begin(); it != mGroupList.end(); ++it )
if ( (*it)->account() == a )
l.append( (*it)->groupname() );
}
-QValueList<KNGroup*> KNGroupManager::groupsOfAccount( KNNntpAccount *a )
+TQValueList<KNGroup*> KNGroupManager::groupsOfAccount( KNNntpAccount *a )
{
- QValueList<KNGroup*> ret;
- for ( QValueList<KNGroup*>::Iterator it = mGroupList.begin(); it != mGroupList.end(); ++it )
+ TQValueList<KNGroup*> ret;
+ for ( TQValueList<KNGroup*>::Iterator it = mGroupList.begin(); it != mGroupList.end(); ++it )
if ( (*it)->account() == a )
ret.append( (*it) );
return ret;
@@ -330,9 +330,9 @@ bool KNGroupManager::unloadHeaders(KNGroup *g, bool force)
}
-KNGroup* KNGroupManager::group(const QString &gName, const KNServerInfo *s)
+KNGroup* KNGroupManager::group(const TQString &gName, const KNServerInfo *s)
{
- for ( QValueList<KNGroup*>::Iterator it = mGroupList.begin(); it != mGroupList.end(); ++it )
+ for ( TQValueList<KNGroup*>::Iterator it = mGroupList.begin(); it != mGroupList.end(); ++it )
if ( (*it)->account() == s && (*it)->groupname() == gName )
return (*it);
@@ -342,7 +342,7 @@ KNGroup* KNGroupManager::group(const QString &gName, const KNServerInfo *s)
KNGroup* KNGroupManager::firstGroupOfAccount(const KNServerInfo *s)
{
- for ( QValueList<KNGroup*>::Iterator it = mGroupList.begin(); it != mGroupList.end(); ++it )
+ for ( TQValueList<KNGroup*>::Iterator it = mGroupList.begin(); it != mGroupList.end(); ++it )
if ( (*it)->account() == s )
return (*it);
@@ -352,7 +352,7 @@ KNGroup* KNGroupManager::firstGroupOfAccount(const KNServerInfo *s)
void KNGroupManager::expireAll(KNCleanUp *cup)
{
- for ( QValueList<KNGroup*>::Iterator it = mGroupList.begin(); it != mGroupList.end(); ++it ) {
+ for ( TQValueList<KNGroup*>::Iterator it = mGroupList.begin(); it != mGroupList.end(); ++it ) {
if( (*it)->isLocked() || (*it)->lockedArticles() > 0 )
continue;
if ( !(*it)->activeCleanupConfig()->expireToday() )
@@ -366,7 +366,7 @@ void KNGroupManager::expireAll(KNNntpAccount *a)
{
KNCleanUp *cup = new KNCleanUp();
- for ( QValueList<KNGroup*>::Iterator it = mGroupList.begin(); it != mGroupList.end(); ++it ) {
+ for ( TQValueList<KNGroup*>::Iterator it = mGroupList.begin(); it != mGroupList.end(); ++it ) {
if( (*it)->account() != a || (*it)->isLocked() || (*it)->lockedArticles() > 0 )
continue;
@@ -376,7 +376,7 @@ void KNGroupManager::expireAll(KNNntpAccount *a)
cup->start();
- for ( QValueList<KNGroup*>::Iterator it = mGroupList.begin(); it != mGroupList.end(); ++it ) {
+ for ( TQValueList<KNGroup*>::Iterator it = mGroupList.begin(); it != mGroupList.end(); ++it ) {
if( (*it)->account() != a || (*it)->isLocked() || (*it)->lockedArticles() > 0 )
continue;
@@ -393,31 +393,31 @@ void KNGroupManager::expireAll(KNNntpAccount *a)
}
-void KNGroupManager::showGroupDialog(KNNntpAccount *a, QWidget *parent)
+void KNGroupManager::showGroupDialog(KNNntpAccount *a, TQWidget *parent)
{
KNGroupDialog* gDialog=new KNGroupDialog((parent!=0)? parent:knGlobals.topWidget, a);
- connect(gDialog, SIGNAL(loadList(KNNntpAccount*)), this, SLOT(slotLoadGroupList(KNNntpAccount*)));
- connect(gDialog, SIGNAL(fetchList(KNNntpAccount*)), this, SLOT(slotFetchGroupList(KNNntpAccount*)));
- connect(gDialog, SIGNAL(checkNew(KNNntpAccount*,QDate)), this, SLOT(slotCheckForNewGroups(KNNntpAccount*,QDate)));
- connect(this, SIGNAL(newListReady(KNGroupListData*)), gDialog, SLOT(slotReceiveList(KNGroupListData*)));
+ connect(gDialog, TQT_SIGNAL(loadList(KNNntpAccount*)), this, TQT_SLOT(slotLoadGroupList(KNNntpAccount*)));
+ connect(gDialog, TQT_SIGNAL(fetchList(KNNntpAccount*)), this, TQT_SLOT(slotFetchGroupList(KNNntpAccount*)));
+ connect(gDialog, TQT_SIGNAL(checkNew(KNNntpAccount*,TQDate)), this, TQT_SLOT(slotCheckForNewGroups(KNNntpAccount*,TQDate)));
+ connect(this, TQT_SIGNAL(newListReady(KNGroupListData*)), gDialog, TQT_SLOT(slotReceiveList(KNGroupListData*)));
if(gDialog->exec()) {
KNGroup *g=0;
- QStringList lst;
+ TQStringList lst;
gDialog->toUnsubscribe(&lst);
if (lst.count()>0) {
if (KMessageBox::Yes == KMessageBox::questionYesNoList((parent!=0)? parent:knGlobals.topWidget,i18n("Do you really want to unsubscribe\nfrom these groups?"),
- lst, QString::null, i18n("Unsubscribe"), KStdGuiItem::cancel())) {
- for ( QStringList::Iterator it = lst.begin(); it != lst.end(); ++it ) {
+ lst, TQString::null, i18n("Unsubscribe"), KStdGuiItem::cancel())) {
+ for ( TQStringList::Iterator it = lst.begin(); it != lst.end(); ++it ) {
if((g=group(*it, a)))
unsubscribeGroup(g);
}
}
}
- QSortedList<KNGroupInfo> lst2;
+ TQSortedList<KNGroupInfo> lst2;
gDialog->toSubscribe(&lst2);
for(KNGroupInfo *var=lst2.first(); var; var=lst2.next()) {
subscribeGroup(var, a);
@@ -458,7 +458,7 @@ bool KNGroupManager::unsubscribeGroup(KNGroup *g)
acc=g->account();
- QDir dir(acc->path(),g->groupname()+"*");
+ TQDir dir(acc->path(),g->groupname()+"*");
if (dir.exists()) {
if (unloadHeaders(g, true)) {
if(c_urrentGroup==g) {
@@ -570,7 +570,7 @@ void KNGroupManager::checkAll(KNNntpAccount *a, bool silent)
{
if(!a) return;
- for ( QValueList<KNGroup*>::Iterator it = mGroupList.begin(); it != mGroupList.end(); ++it ) {
+ for ( TQValueList<KNGroup*>::Iterator it = mGroupList.begin(); it != mGroupList.end(); ++it ) {
if ( (*it)->account() == a ) {
(*it)->setMaxFetch( knGlobals.configManager()->readNewsGeneral()->maxToFetch() );
if ( silent )
@@ -591,7 +591,7 @@ void KNGroupManager::processJob(KNJobData *j)
if (j->success()) {
if ((j->type()==KNJobData::JTFetchGroups)||(j->type()==KNJobData::JTCheckNewGroups)) {
// update the descriptions of the subscribed groups
- for ( QValueList<KNGroup*>::Iterator it = mGroupList.begin(); it != mGroupList.end(); ++it ) {
+ for ( TQValueList<KNGroup*>::Iterator it = mGroupList.begin(); it != mGroupList.end(); ++it ) {
if ( (*it)->account() == j->account() ) {
for ( KNGroupInfo* inf = d->groups->first(); inf; inf = d->groups->next() )
if ( inf->name == (*it)->groupname() ) {
@@ -651,8 +651,8 @@ void KNGroupManager::slotLoadGroupList(KNNntpAccount *a)
KNGroupListData *d = new KNGroupListData();
d->path = a->path();
- if(!QFileInfo(d->path+"groups").exists()) {
- if (KMessageBox::Yes==KMessageBox::questionYesNo(knGlobals.topWidget,i18n("You do not have any groups for this account;\ndo you want to fetch a current list?"), QString::null, i18n("Fetch List"), i18n("Do Not Fetch"))) {
+ if(!TQFileInfo(d->path+"groups").exists()) {
+ if (KMessageBox::Yes==KMessageBox::questionYesNo(knGlobals.topWidget,i18n("You do not have any groups for this account;\ndo you want to fetch a current list?"), TQString::null, i18n("Fetch List"), i18n("Do Not Fetch"))) {
delete d;
slotFetchGroupList(a);
return;
@@ -684,7 +684,7 @@ void KNGroupManager::slotFetchGroupList(KNNntpAccount *a)
// check for new groups (created after the given date)
-void KNGroupManager::slotCheckForNewGroups(KNNntpAccount *a, QDate date)
+void KNGroupManager::slotCheckForNewGroups(KNNntpAccount *a, TQDate date)
{
KNGroupListData *d = new KNGroupListData();
d->path = a->path();
diff --git a/knode/kngroupmanager.h b/knode/kngroupmanager.h
index f3805dc81..f42407126 100644
--- a/knode/kngroupmanager.h
+++ b/knode/kngroupmanager.h
@@ -15,8 +15,8 @@
#ifndef KNGROUPMANAGER_H
#define KNGROUPMANAGER_H
-#include <qobject.h>
-#include <qsortedlist.h>
+#include <tqobject.h>
+#include <tqsortedlist.h>
#include "knjobdata.h"
#include "kngroup.h"
@@ -38,11 +38,11 @@ class KNGroupInfo {
public:
KNGroupInfo();
- KNGroupInfo(const QString &n_ame, const QString &d_escription, bool n_ewGroup=false, bool s_ubscribed=false, KNGroup::Status s_tatus=KNGroup::unknown );
+ KNGroupInfo(const TQString &n_ame, const TQString &d_escription, bool n_ewGroup=false, bool s_ubscribed=false, KNGroup::Status s_tatus=KNGroup::unknown );
~KNGroupInfo();
/** group names will be utf-8 encoded in the future... */
- QString name,description;
+ TQString name,description;
bool newGroup, subscribed;
KNGroup::Status status;
@@ -59,47 +59,47 @@ class KNGroupListData : public KNJobItem {
bool readIn(KNProtocolClient *client=0);
bool writeOut();
- void merge(QSortedList<KNGroupInfo>* newGroups);
+ void merge(TQSortedList<KNGroupInfo>* newGroups);
- QSortedList<KNGroupInfo>* extractList();
+ TQSortedList<KNGroupInfo>* extractList();
- QStringList subscribed;
- QString path;
- QSortedList<KNGroupInfo> *groups;
- QDate fetchSince;
+ TQStringList subscribed;
+ TQString path;
+ TQSortedList<KNGroupInfo> *groups;
+ TQDate fetchSince;
bool getDescriptions;
- QTextCodec *codecForDescriptions;
+ TQTextCodec *codecForDescriptions;
};
//===============================================================================
-class KNGroupManager : public QObject , public KNJobConsumer {
+class KNGroupManager : public TQObject , public KNJobConsumer {
Q_OBJECT
public:
- KNGroupManager(QObject * parent=0, const char * name=0);
+ KNGroupManager(TQObject * parent=0, const char * name=0);
~KNGroupManager();
// group access
void loadGroups(KNNntpAccount *a);
- void getSubscribed(KNNntpAccount *a, QStringList &l);
- QValueList<KNGroup*> groupsOfAccount( KNNntpAccount *a );
+ void getSubscribed(KNNntpAccount *a, TQStringList &l);
+ TQValueList<KNGroup*> groupsOfAccount( KNNntpAccount *a );
bool loadHeaders(KNGroup *g);
bool unloadHeaders(KNGroup *g, bool force=true);
- KNGroup* group(const QString &gName, const KNServerInfo *s);
+ KNGroup* group(const TQString &gName, const KNServerInfo *s);
KNGroup* firstGroupOfAccount(const KNServerInfo *s);
KNGroup* currentGroup() const { return c_urrentGroup; }
bool hasCurrentGroup() const { return (c_urrentGroup!=0); }
void setCurrentGroup(KNGroup *g);
// group handling
- void showGroupDialog(KNNntpAccount *a, QWidget *parent=0);
+ void showGroupDialog(KNNntpAccount *a, TQWidget *parent=0);
void subscribeGroup(const KNGroupInfo *gi, KNNntpAccount *a);
bool unsubscribeGroup(KNGroup *g=0);
void showGroupProperties(KNGroup *g=0);
@@ -119,12 +119,12 @@ class KNGroupManager : public QObject , public KNJobConsumer {
/** fetch group list from server */
void slotFetchGroupList(KNNntpAccount *a);
/** check for new groups (created after the given date) */
- void slotCheckForNewGroups(KNNntpAccount *a, QDate date);
+ void slotCheckForNewGroups(KNNntpAccount *a, TQDate date);
protected:
/** reimplemented from @ref KNJobConsumer */
void processJob(KNJobData *j);
- QValueList<KNGroup*> mGroupList;
+ TQValueList<KNGroup*> mGroupList;
KNGroup *c_urrentGroup;
KNArticleManager *a_rticleMgr;
diff --git a/knode/kngrouppropdlg.cpp b/knode/kngrouppropdlg.cpp
index b93669374..3ad2fee7a 100644
--- a/knode/kngrouppropdlg.cpp
+++ b/knode/kngrouppropdlg.cpp
@@ -12,10 +12,10 @@
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, US
*/
-#include <qgroupbox.h>
-#include <qlayout.h>
-#include <qvbox.h>
-#include <qcheckbox.h>
+#include <tqgroupbox.h>
+#include <tqlayout.h>
+#include <tqvbox.h>
+#include <tqcheckbox.h>
#include <klocale.h>
#include <klineedit.h>
@@ -26,10 +26,10 @@
#include "utilities.h"
#include "kngroup.h"
#include "kngrouppropdlg.h"
-#include <qlabel.h>
+#include <tqlabel.h>
-KNGroupPropDlg::KNGroupPropDlg(KNGroup *group, QWidget *parent, const char *name )
+KNGroupPropDlg::KNGroupPropDlg(KNGroup *group, TQWidget *parent, const char *name )
: KDialogBase(Tabbed, i18n("Properties of %1").arg(group->groupname()),
Ok|Cancel|Help, Ok, parent, name),
g_rp(group), n_ickChanged(false)
@@ -37,57 +37,57 @@ KNGroupPropDlg::KNGroupPropDlg(KNGroup *group, QWidget *parent, const char *name
// General tab ===============================================
- QWidget *page = addPage(i18n("&General"));
- QVBoxLayout *pageL = new QVBoxLayout(page, 3);
+ TQWidget *page = addPage(i18n("&General"));
+ TQVBoxLayout *pageL = new TQVBoxLayout(page, 3);
// settings
- QGroupBox *gb=new QGroupBox(i18n("Settings"), page);
+ TQGroupBox *gb=new TQGroupBox(i18n("Settings"), page);
pageL->addWidget(gb);
- QGridLayout *grpL=new QGridLayout(gb, 3, 3, 15, 5);
+ TQGridLayout *grpL=new TQGridLayout(gb, 3, 3, 15, 5);
grpL->addRowSpacing(0, fontMetrics().lineSpacing()-9);
n_ick=new KLineEdit(gb);
if (g_rp->hasName())
n_ick->setText(g_rp->name());
- QLabel *l=new QLabel(n_ick, i18n("&Nickname:"), gb);
+ TQLabel *l=new TQLabel(n_ick, i18n("&Nickname:"), gb);
grpL->addWidget(l,1,0);
grpL->addMultiCellWidget(n_ick,1,1,1,2);
- u_seCharset=new QCheckBox(i18n("&Use different default charset:"), gb);
+ u_seCharset=new TQCheckBox(i18n("&Use different default charset:"), gb);
u_seCharset->setChecked(g_rp->useCharset());
grpL->addMultiCellWidget(u_seCharset,2,2,0,1);
- c_harset=new QComboBox(false, gb);
+ c_harset=new TQComboBox(false, gb);
c_harset->insertStringList(knGlobals.configManager()->postNewsTechnical()->composerCharsets());
c_harset->setCurrentItem(knGlobals.configManager()->postNewsTechnical()->indexForCharset(g_rp->defaultCharset()));
c_harset->setEnabled(g_rp->useCharset());
- connect(u_seCharset, SIGNAL(toggled(bool)), c_harset, SLOT(setEnabled(bool)));
+ connect(u_seCharset, TQT_SIGNAL(toggled(bool)), c_harset, TQT_SLOT(setEnabled(bool)));
grpL->addWidget(c_harset, 2,2);
grpL->setColStretch(1,1);
grpL->setColStretch(2,2);
// group name & description
- gb=new QGroupBox(i18n("Description"), page);
+ gb=new TQGroupBox(i18n("Description"), page);
pageL->addWidget(gb);
- grpL=new QGridLayout(gb, 4, 3, 15, 5);
+ grpL=new TQGridLayout(gb, 4, 3, 15, 5);
grpL->addRowSpacing(0, fontMetrics().lineSpacing()-9);
- l=new QLabel(i18n("Name:"), gb);
+ l=new TQLabel(i18n("Name:"), gb);
grpL->addWidget(l,1,0);
- l=new QLabel(group->groupname(),gb);
+ l=new TQLabel(group->groupname(),gb);
grpL->addWidget(l,1,2);
- l=new QLabel(i18n("Description:"), gb);
+ l=new TQLabel(i18n("Description:"), gb);
grpL->addWidget(l,2,0);
- l=new QLabel(g_rp->description(),gb);
+ l=new TQLabel(g_rp->description(),gb);
grpL->addWidget(l,2,2);
- l=new QLabel(i18n("Status:"), gb);
+ l=new TQLabel(i18n("Status:"), gb);
grpL->addWidget(l,3,0);
- QString status;
+ TQString status;
switch (g_rp->status()) {
case KNGroup::unknown: status=i18n("unknown");
break;
@@ -98,42 +98,42 @@ KNGroupPropDlg::KNGroupPropDlg(KNGroup *group, QWidget *parent, const char *name
case KNGroup::moderated: status=i18n("moderated");
break;
}
- l=new QLabel(status,gb);
+ l=new TQLabel(status,gb);
grpL->addWidget(l,3,2);
grpL->addColSpacing(1,20);
grpL->setColStretch(2,1);
// statistics
- gb=new QGroupBox(i18n("Statistics"), page);
+ gb=new TQGroupBox(i18n("Statistics"), page);
pageL->addWidget(gb);
- grpL=new QGridLayout(gb, 6, 3, 15, 5);
+ grpL=new TQGridLayout(gb, 6, 3, 15, 5);
grpL->addRowSpacing(0, fontMetrics().lineSpacing()-9);
- l=new QLabel(i18n("Articles:"), gb);
+ l=new TQLabel(i18n("Articles:"), gb);
grpL->addWidget(l,1,0);
- l=new QLabel(QString::number(g_rp->count()),gb);
+ l=new TQLabel(TQString::number(g_rp->count()),gb);
grpL->addWidget(l,1,2);
- l=new QLabel(i18n("Unread articles:"), gb);
+ l=new TQLabel(i18n("Unread articles:"), gb);
grpL->addWidget(l,2,0);
- l=new QLabel(QString::number(g_rp->count()-g_rp->readCount()),gb);
+ l=new TQLabel(TQString::number(g_rp->count()-g_rp->readCount()),gb);
grpL->addWidget(l,2,2);
- l=new QLabel(i18n("New articles:"), gb);
+ l=new TQLabel(i18n("New articles:"), gb);
grpL->addWidget(l,3,0);
- l=new QLabel(QString::number(g_rp->newCount()),gb);
+ l=new TQLabel(TQString::number(g_rp->newCount()),gb);
grpL->addWidget(l,3,2);
- l=new QLabel(i18n("Threads with unread articles:"), gb);
+ l=new TQLabel(i18n("Threads with unread articles:"), gb);
grpL->addWidget(l,4,0);
- l=new QLabel(QString::number(g_rp->statThrWithUnread()),gb);
+ l=new TQLabel(TQString::number(g_rp->statThrWithUnread()),gb);
grpL->addWidget(l,4,2);
- l=new QLabel(i18n("Threads with new articles:"), gb);
+ l=new TQLabel(i18n("Threads with new articles:"), gb);
grpL->addWidget(l,5,0);
- l=new QLabel(QString::number(g_rp->statThrWithNew()),gb);
+ l=new TQLabel(TQString::number(g_rp->statThrWithNew()),gb);
grpL->addWidget(l,5,2);
grpL->addColSpacing(1,20);
@@ -145,8 +145,8 @@ KNGroupPropDlg::KNGroupPropDlg(KNGroup *group, QWidget *parent, const char *name
i_dWidget=new KNConfig::IdentityWidget(g_rp->identity(), addVBoxPage(i18n("&Identity")));
// per server cleanup configuration
- QFrame* cleanupPage = addPage( i18n("&Cleanup") );
- QVBoxLayout *cleanupLayout = new QVBoxLayout( cleanupPage, KDialog::spacingHint() );
+ TQFrame* cleanupPage = addPage( i18n("&Cleanup") );
+ TQVBoxLayout *cleanupLayout = new TQVBoxLayout( cleanupPage, KDialog::spacingHint() );
mCleanupWidget = new KNConfig::GroupCleanupWidget( g_rp->cleanupConfig(), cleanupPage );
mCleanupWidget->load();
cleanupLayout->addWidget( mCleanupWidget );
diff --git a/knode/kngrouppropdlg.h b/knode/kngrouppropdlg.h
index 3b67df9dc..c5a17a702 100644
--- a/knode/kngrouppropdlg.h
+++ b/knode/kngrouppropdlg.h
@@ -35,7 +35,7 @@ namespace KNConfig {
class KNGroupPropDlg : public KDialogBase {
public:
- KNGroupPropDlg(KNGroup *group, QWidget *parent=0, const char *name=0);
+ KNGroupPropDlg(KNGroup *group, TQWidget *parent=0, const char *name=0);
~KNGroupPropDlg();
bool nickHasChanged()const { return n_ickChanged; }
@@ -46,8 +46,8 @@ class KNGroupPropDlg : public KDialogBase {
KNConfig::IdentityWidget* i_dWidget;
KNConfig::GroupCleanupWidget *mCleanupWidget;
KLineEdit *n_ick;
- QCheckBox *u_seCharset;
- QComboBox *c_harset;
+ TQCheckBox *u_seCharset;
+ TQComboBox *c_harset;
protected slots:
void slotOk();
diff --git a/knode/kngroupselectdialog.cpp b/knode/kngroupselectdialog.cpp
index e9ac3a2dd..2cb024011 100644
--- a/knode/kngroupselectdialog.cpp
+++ b/knode/kngroupselectdialog.cpp
@@ -14,46 +14,46 @@
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, US
*/
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qheader.h>
-#include <qcheckbox.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqheader.h>
+#include <tqcheckbox.h>
#include <klocale.h>
#include <kmessagebox.h>
#include "utilities.h"
#include "kngroupselectdialog.h"
-#include <qpushbutton.h>
+#include <tqpushbutton.h>
-KNGroupSelectDialog::KNGroupSelectDialog(QWidget *parent, KNNntpAccount *a, const QString &act) :
+KNGroupSelectDialog::KNGroupSelectDialog(TQWidget *parent, KNNntpAccount *a, const TQString &act) :
KNGroupBrowser(parent, i18n("Select Destinations"), a)
{
- selView=new QListView(page);
- selView->addColumn(QString::null);
+ selView=new TQListView(page);
+ selView->addColumn(TQString::null);
selView->header()->hide();
listL->addWidget(selView, 1,2);
rightLabel->setText(i18n("Groups for this article:"));
subCB->setChecked(true);
KNGroupInfo info;
- QStringList actGroups = QStringList::split(',',act);
- for ( QStringList::Iterator it = actGroups.begin(); it != actGroups.end(); ++it ) {
+ TQStringList actGroups = TQStringList::split(',',act);
+ for ( TQStringList::Iterator it = actGroups.begin(); it != actGroups.end(); ++it ) {
info.name = *it;
new GroupItem(selView, info);
}
- connect(selView, SIGNAL(selectionChanged(QListViewItem*)),
- this, SLOT(slotItemSelected(QListViewItem*)));
- connect(groupView, SIGNAL(selectionChanged(QListViewItem*)),
- this, SLOT(slotItemSelected(QListViewItem*)));
- connect(groupView, SIGNAL(selectionChanged()),
- this, SLOT(slotSelectionChanged()));
- connect(arrowBtn1, SIGNAL(clicked()), this, SLOT(slotArrowBtn1()));
- connect(arrowBtn2, SIGNAL(clicked()), this, SLOT(slotArrowBtn2()));
+ connect(selView, TQT_SIGNAL(selectionChanged(TQListViewItem*)),
+ this, TQT_SLOT(slotItemSelected(TQListViewItem*)));
+ connect(groupView, TQT_SIGNAL(selectionChanged(TQListViewItem*)),
+ this, TQT_SLOT(slotItemSelected(TQListViewItem*)));
+ connect(groupView, TQT_SIGNAL(selectionChanged()),
+ this, TQT_SLOT(slotSelectionChanged()));
+ connect(arrowBtn1, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotArrowBtn1()));
+ connect(arrowBtn2, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotArrowBtn2()));
- KNHelper::restoreWindowSize("groupSelDlg", this, QSize(659,364)); // optimized for 800x600
+ KNHelper::restoreWindowSize("groupSelDlg", this, TQSize(659,364)); // optimized for 800x600
}
@@ -85,10 +85,10 @@ void KNGroupSelectDialog::updateItemState(CheckItem *it)
-QString KNGroupSelectDialog::selectedGroups()const
+TQString KNGroupSelectDialog::selectedGroups()const
{
- QString ret;
- QListViewItemIterator it(selView);
+ TQString ret;
+ TQListViewItemIterator it(selView);
bool moderated=false;
int count=0;
bool isFirst=true;
@@ -105,16 +105,16 @@ QString KNGroupSelectDialog::selectedGroups()const
if (moderated && (count>=2)) // warn the user
KMessageBox::information(parentWidget(),i18n("You are crossposting to a moderated newsgroup.\nPlease be aware that your article will not appear in any group\nuntil it has been approved by the moderators of the moderated group."),
- QString::null,"crosspostModeratedWarning");
+ TQString::null,"crosspostModeratedWarning");
return ret;
}
-void KNGroupSelectDialog::slotItemSelected(QListViewItem *it)
+void KNGroupSelectDialog::slotItemSelected(TQListViewItem *it)
{
- const QObject *s=sender();
+ const TQObject *s=sender();
if(s==groupView) {
selView->clearSelection();
diff --git a/knode/kngroupselectdialog.h b/knode/kngroupselectdialog.h
index d46826cc3..11c6fd39b 100644
--- a/knode/kngroupselectdialog.h
+++ b/knode/kngroupselectdialog.h
@@ -25,18 +25,18 @@ class KNGroupSelectDialog : public KNGroupBrowser {
Q_OBJECT
public:
- KNGroupSelectDialog(QWidget *parent, KNNntpAccount *a, const QString &act);
+ KNGroupSelectDialog(TQWidget *parent, KNNntpAccount *a, const TQString &act);
~KNGroupSelectDialog();
- QString selectedGroups()const;
+ TQString selectedGroups()const;
void itemChangedState(CheckItem *it, bool s);
protected:
void updateItemState(CheckItem *it);
- QListView *selView;
+ TQListView *selView;
protected slots:
- void slotItemSelected(QListViewItem *it);
+ void slotItemSelected(TQListViewItem *it);
/** deactivates the button when a root item is selected */
void slotSelectionChanged();
void slotArrowBtn1();
diff --git a/knode/knhdrviewitem.cpp b/knode/knhdrviewitem.cpp
index 93b54fc0a..e547b11d9 100644
--- a/knode/knhdrviewitem.cpp
+++ b/knode/knhdrviewitem.cpp
@@ -14,8 +14,8 @@
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, US
*/
-#include <qdragobject.h>
-#include <qpainter.h>
+#include <tqdragobject.h>
+#include <tqpainter.h>
#include <kdeversion.h>
#include <kdebug.h>
@@ -54,7 +54,7 @@ void KNHdrViewItem::init( KNArticle *a )
KNHdrViewItem::~KNHdrViewItem()
{
if (mActive) {
- QListView *lv = listView();
+ TQListView *lv = listView();
if (lv)
static_cast<KNHeaderView*>( lv )->activeRemoved();
}
@@ -65,7 +65,7 @@ KNHdrViewItem::~KNHdrViewItem()
void KNHdrViewItem::expandChildren()
{
- QListViewItemIterator it( firstChild() );
+ TQListViewItemIterator it( firstChild() );
for ( ; it.current(); ++it) {
if (it.current()->depth() <= depth())
break;
@@ -74,7 +74,7 @@ void KNHdrViewItem::expandChildren()
}
-int KNHdrViewItem::compare( QListViewItem *i, int col, bool ) const
+int KNHdrViewItem::compare( TQListViewItem *i, int col, bool ) const
{
KNArticle *otherArticle = static_cast<KNHdrViewItem*>( i )->art;
int diff = 0;
@@ -114,13 +114,13 @@ int KNHdrViewItem::compare( QListViewItem *i, int col, bool ) const
}
-void KNHdrViewItem::paintCell( QPainter *p, const QColorGroup &cg, int column, int width, int alignment )
+void KNHdrViewItem::paintCell( TQPainter *p, const TQColorGroup &cg, int column, int width, int alignment )
{
int xText = 0, xPM = 3, yPM = 0;
- QColor base;
+ TQColor base;
const KPaintInfo *paintInfo = static_cast<KNHeaderView*>( listView() )->paintInfo();
- QPen pen = p->pen();
+ TQPen pen = p->pen();
if (isSelected() || mActive) {
pen.setColor( cg.highlightedText() );
base = cg.highlight();
@@ -134,13 +134,13 @@ void KNHdrViewItem::paintCell( QPainter *p, const QColorGroup &cg, int column, i
p->setPen( pen );
- p->fillRect( 0, 0, width, height(), QBrush(base) );
+ p->fillRect( 0, 0, width, height(), TQBrush(base) );
if ( column == paintInfo->subCol ) {
- QFont font = p->font();
+ TQFont font = p->font();
font.setBold( firstColBold() );
p->setFont( font );
- const QPixmap *pm;
+ const TQPixmap *pm;
for (int i = 0; i < 4; i++) {
pm = pixmap( i );
@@ -156,15 +156,15 @@ void KNHdrViewItem::paintCell( QPainter *p, const QColorGroup &cg, int column, i
if (width - xText - 5 > 0) {
int cntWidth = 0;
- QString t2;
- QFont f2;
+ TQString t2;
+ TQFont f2;
if (countUnreadInThread() > 0 && column == paintInfo->subCol && !isOpen()) {
- t2 = QString( " (%1)" ).arg( countUnreadInThread() );
+ t2 = TQString( " (%1)" ).arg( countUnreadInThread() );
f2 = p->font();
f2.setBold( true );
- cntWidth = QFontMetrics( f2 ).width( t2, -1 );
+ cntWidth = TQFontMetrics( f2 ).width( t2, -1 );
}
- QString t = KStringHandler::rPixelSqueeze( text( column ), p->fontMetrics(), width - xText - cntWidth - 5 );
+ TQString t = KStringHandler::rPixelSqueeze( text( column ), p->fontMetrics(), width - xText - cntWidth - 5 );
// show tooltip if we have to squeeze the text
if ( t != text( column ) )
@@ -174,29 +174,29 @@ void KNHdrViewItem::paintCell( QPainter *p, const QColorGroup &cg, int column, i
p->drawText( xText, 0, width - xText - 5, height(), alignment | AlignVCenter, t );
if (cntWidth) {
- QFont orig = p->font();
+ TQFont orig = p->font();
p->setFont( f2 );
- QPen pen = p->pen();
+ TQPen pen = p->pen();
if (isSelected() || mActive) {
pen.setColor( cg.highlightedText() );
} else {
pen.setColor( cg.link() );
}
p->setPen( pen );
- p->drawText( xText + QFontMetrics( orig ).width( t, -1 ), 0, width - xText - 5, height(), alignment | AlignVCenter, t2 );
+ p->drawText( xText + TQFontMetrics( orig ).width( t, -1 ), 0, width - xText - 5, height(), alignment | AlignVCenter, t2 );
}
}
}
-int KNHdrViewItem::width( const QFontMetrics &fm, const QListView *, int column )
+int KNHdrViewItem::width( const TQFontMetrics &fm, const TQListView *, int column )
{
int ret = fm.boundingRect( text(column) ).width();
const KPaintInfo *paintInfo = static_cast<KNHeaderView*>( listView() )->paintInfo();
// all pixmaps are drawn in the first column
if ( column == paintInfo->subCol ) {
- const QPixmap *pm;
+ const TQPixmap *pm;
for (int i = 0; i < 4; ++i) {
pm = pixmap( i );
if (pm && !pm->isNull())
@@ -208,10 +208,10 @@ int KNHdrViewItem::width( const QFontMetrics &fm, const QListView *, int column
}
-QString KNHdrViewItem::text( int col ) const
+TQString KNHdrViewItem::text( int col ) const
{
if ( !art )
- return QString::null;
+ return TQString::null;
KNHeaderView *hv = static_cast<KNHeaderView*>( listView() );
if ( col == hv->paintInfo()->subCol ) {
@@ -220,16 +220,16 @@ QString KNHdrViewItem::text( int col ) const
if ( col == hv->paintInfo()->sizeCol ) {
if ( art->lines()->numberOfLines() != -1 )
- return QString::number( art->lines()->numberOfLines() );
+ return TQString::number( art->lines()->numberOfLines() );
else
- return QString::null;
+ return TQString::null;
}
if ( col == hv->paintInfo()->scoreCol ) {
if ( art->type() == KMime::Base::ATremote )
- return QString::number( static_cast<KNRemoteArticle*>( art )->score() );
+ return TQString::number( static_cast<KNRemoteArticle*>( art )->score() );
else
- return QString::null;
+ return TQString::null;
}
if ( col == hv->paintInfo()->dateCol ) {
@@ -239,9 +239,9 @@ QString KNHdrViewItem::text( int col ) const
}
-QDragObject* KNHdrViewItem::dragObject()
+TQDragObject* KNHdrViewItem::dragObject()
{
- QDragObject *d = new QStoredDrag( "x-knode-drag/article" , listView()->viewport() );
+ TQDragObject *d = new TQStoredDrag( "x-knode-drag/article" , listView()->viewport() );
d->setPixmap( knGlobals.configManager()->appearance()->icon( KNConfig::Appearance::posting ) );
return d;
}
@@ -278,7 +278,7 @@ bool KNHdrViewItem::firstColBold()
}
-QColor KNHdrViewItem::normalColor()
+TQColor KNHdrViewItem::normalColor()
{
if (art->type()==KMime::Base::ATremote)
return static_cast<KNRemoteArticle*>( art )->color();
@@ -287,7 +287,7 @@ QColor KNHdrViewItem::normalColor()
}
-QColor KNHdrViewItem::greyColor()
+TQColor KNHdrViewItem::greyColor()
{
return knGlobals.configManager()->appearance()->readThreadColor();
}
diff --git a/knode/knhdrviewitem.h b/knode/knhdrviewitem.h
index a080c8381..476c6d53c 100644
--- a/knode/knhdrviewitem.h
+++ b/knode/knhdrviewitem.h
@@ -31,12 +31,12 @@ class KNHdrViewItem : public KListViewItem {
KNHdrViewItem( KNHdrViewItem *ref, KNArticle *a = 0 );
~KNHdrViewItem();
- virtual int compare(QListViewItem *i, int col, bool ascending) const;
+ virtual int compare(TQListViewItem *i, int col, bool ascending) const;
- void paintCell(QPainter *p, const QColorGroup &cg, int column, int width, int alignment);
- int width(const QFontMetrics &fm, const QListView *lv, int column);
+ void paintCell(TQPainter *p, const TQColorGroup &cg, int column, int width, int alignment);
+ int width(const TQFontMetrics &fm, const TQListView *lv, int column);
- virtual QString text( int col ) const;
+ virtual TQString text( int col ) const;
void expandChildren();
@@ -44,7 +44,7 @@ class KNHdrViewItem : public KListViewItem {
bool isActive() const { return mActive; }
// DND
- QDragObject* dragObject();
+ TQDragObject* dragObject();
KNArticle *art;
int countUnreadInThread();
@@ -56,8 +56,8 @@ class KNHdrViewItem : public KListViewItem {
bool greyOut();
bool firstColBold();
- QColor normalColor();
- QColor greyColor();
+ TQColor normalColor();
+ TQColor greyColor();
bool mActive;
bool mShowToolTip[5]; // ### hardcoded column count :-(
diff --git a/knode/knjobdata.cpp b/knode/knjobdata.cpp
index 7d8cb6f8f..5d46c29d9 100644
--- a/knode/knjobdata.cpp
+++ b/knode/knjobdata.cpp
@@ -24,7 +24,7 @@
#include "knnetaccess.h"
#include "knnntpaccount.h"
-#include <qstylesheet.h>
+#include <tqstylesheet.h>
KNJobConsumer::KNJobConsumer()
{
@@ -33,7 +33,7 @@ KNJobConsumer::KNJobConsumer()
KNJobConsumer::~KNJobConsumer()
{
- QValueList<KNJobData*>::Iterator it;
+ TQValueList<KNJobData*>::Iterator it;
for ( it = mJobs.begin(); it != mJobs.end(); ++it )
(*it)->c_onsumer = 0;
}
@@ -105,10 +105,10 @@ void KNJobData::setJob( KIO::Job *job )
{
mJob = job;
if ( job ) {
- connect( job, SIGNAL( percent(KIO::Job*, unsigned long) ),
- SLOT( slotJobPercent(KIO::Job*, unsigned long) ) );
- connect( job, SIGNAL( infoMessage(KIO::Job*, const QString&) ),
- SLOT( slotJobInfoMessage(KIO::Job*, const QString&) ) );
+ connect( job, TQT_SIGNAL( percent(KIO::Job*, unsigned long) ),
+ TQT_SLOT( slotJobPercent(KIO::Job*, unsigned long) ) );
+ connect( job, TQT_SIGNAL( infoMessage(KIO::Job*, const TQString&) ),
+ TQT_SLOT( slotJobInfoMessage(KIO::Job*, const TQString&) ) );
}
}
@@ -117,12 +117,12 @@ void KNJobData::createProgressItem()
if ( mProgressItem )
return;
KNNntpAccount *acc = static_cast<KNNntpAccount*>( account() );
- QString msg = i18n( "KNode" );
+ TQString msg = i18n( "KNode" );
if ( type() == JTmail )
msg = i18n( "Sending message" );
else {
if ( acc )
- msg = QStyleSheet::escape( acc->name() );
+ msg = TQStyleSheet::escape( acc->name() );
}
bool encr = false;
if ( acc && acc->encryption() != KNServerInfo::None )
@@ -137,7 +137,7 @@ void KNJobData::slotJobPercent( KIO::Job*, unsigned long percent )
setProgress( percent );
}
-void KNJobData::slotJobInfoMessage( KIO::Job*, const QString &msg )
+void KNJobData::slotJobInfoMessage( KIO::Job*, const TQString &msg )
{
kdDebug(5003) << k_funcinfo << "Status: " << msg << endl;
setStatus( msg );
diff --git a/knode/knjobdata.h b/knode/knjobdata.h
index 5733a9883..35b54e934 100644
--- a/knode/knjobdata.h
+++ b/knode/knjobdata.h
@@ -15,8 +15,8 @@
#ifndef KNJOBDATA_H
#define KNJOBDATA_H
-#include <qobject.h>
-#include <qvaluelist.h>
+#include <tqobject.h>
+#include <tqvaluelist.h>
#include <libkdepim/progressmanager.h>
@@ -49,7 +49,7 @@ class KNJobConsumer {
protected:
/** The actual work is done here */
virtual void processJob(KNJobData *j);
- QValueList<KNJobData*> mJobs;
+ TQValueList<KNJobData*> mJobs;
};
@@ -63,7 +63,7 @@ class KNJobItem {
virtual bool isLocked() { return false; }
virtual void setLocked(bool) { }
- virtual QString prepareForExecution() { return QString::null; }
+ virtual TQString prepareForExecution() { return TQString::null; }
};
@@ -95,12 +95,12 @@ class KNJobData : public QObject
KNServerInfo* account() const { return a_ccount; }
KNJobItem* data() const { return d_ata; }
- const QString& errorString() const { return e_rrorString; }
+ const TQString& errorString() const { return e_rrorString; }
bool success() const { return e_rrorString.isEmpty(); }
bool canceled() const { return c_anceled; }
bool authError() const { return a_uthError; }
- void setErrorString(const QString& s) { e_rrorString=s; }
+ void setErrorString(const TQString& s) { e_rrorString=s; }
void cancel();
void setAuthError(bool b) { a_uthError=b; }
@@ -114,7 +114,7 @@ class KNJobData : public QObject
void createProgressItem();
// safe forwards to the progress item
- void setStatus( const QString &msg ) { if ( mProgressItem ) mProgressItem->setStatus( msg ); }
+ void setStatus( const TQString &msg ) { if ( mProgressItem ) mProgressItem->setStatus( msg ); }
void setProgress( unsigned int progress ) { if ( mProgressItem ) mProgressItem->setProgress( progress ); }
void setComplete() { if ( mProgressItem ) { mProgressItem->setComplete(); mProgressItem = 0; } }
@@ -122,14 +122,14 @@ class KNJobData : public QObject
jobType t_ype;
KNJobItem *d_ata;
KNServerInfo *a_ccount;
- QString e_rrorString;
+ TQString e_rrorString;
bool c_anceled;
bool a_uthError;
KNJobConsumer *c_onsumer;
private slots:
void slotJobPercent( KIO::Job *job, unsigned long percent );
- void slotJobInfoMessage( KIO::Job *job, const QString &msg );
+ void slotJobInfoMessage( KIO::Job *job, const TQString &msg );
private:
KIO::Job *mJob;
diff --git a/knode/knmainwidget.cpp b/knode/knmainwidget.cpp
index e4d91e812..0697a919e 100644
--- a/knode/knmainwidget.cpp
+++ b/knode/knmainwidget.cpp
@@ -13,8 +13,8 @@
*/
#include "knmainwidget.h"
-#include <qhbox.h>
-#include <qlayout.h>
+#include <tqhbox.h>
+#include <tqlayout.h>
#include <ktoolbar.h>
#include <kinputdialog.h>
@@ -70,7 +70,7 @@ using namespace KNode;
KNGlobals knGlobals;
-KNMainWidget::KNMainWidget( KXMLGUIClient* client, bool detachable, QWidget* parent,
+KNMainWidget::KNMainWidget( KXMLGUIClient* client, bool detachable, TQWidget* parent,
const char* name )
: DCOPObject("KNodeIface"), KDockArea( parent, name ),
b_lockui( false ), m_GUIClient( client )
@@ -84,7 +84,7 @@ KNMainWidget::KNMainWidget( KXMLGUIClient* client, bool detachable, QWidget* par
//------------------------------- </CONFIG> ----------------------------------
//-------------------------------- <GUI> ------------------------------------
- QAccel *accel = new QAccel( this );
+ TQAccel *accel = new TQAccel( this );
initStatusBar();
//setup splitter behavior
@@ -106,9 +106,9 @@ KNMainWidget::KNMainWidget( KXMLGUIClient* client, bool detachable, QWidget* par
//setView(a_rtDock);
setMainDockWidget(a_rtDock);
- connect(a_rtDock, SIGNAL(iMBeingClosed()), SLOT(slotArticleDockHidden()));
- connect(a_rtDock, SIGNAL(hasUndocked()), SLOT(slotArticleDockHidden()));
- connect( mArticleViewer, SIGNAL(focusChangeRequest(QWidget*)), SLOT(slotDockWidgetFocusChangeRequest(QWidget*)) );
+ connect(a_rtDock, TQT_SIGNAL(iMBeingClosed()), TQT_SLOT(slotArticleDockHidden()));
+ connect(a_rtDock, TQT_SIGNAL(hasUndocked()), TQT_SLOT(slotArticleDockHidden()));
+ connect( mArticleViewer, TQT_SIGNAL(focusChangeRequest(TQWidget*)), TQT_SLOT(slotDockWidgetFocusChangeRequest(TQWidget*)) );
//collection view
c_olDock = createDockWidget("group_view", UserIcon("group"), 0,
@@ -123,22 +123,22 @@ KNMainWidget::KNMainWidget( KXMLGUIClient* client, bool detachable, QWidget* par
c_olDock->setWidget(c_olView);
c_olDock->manualDock(a_rtDock, KDockWidget::DockLeft, 3000);
- connect(c_olDock, SIGNAL(iMBeingClosed()), SLOT(slotGroupDockHidden()));
- connect(c_olDock, SIGNAL(hasUndocked()), SLOT(slotGroupDockHidden()));
- connect(c_olView, SIGNAL(focusChangeRequest(QWidget *)), SLOT(slotDockWidgetFocusChangeRequest(QWidget *)));
- connect(c_olView, SIGNAL(selectionChanged(QListViewItem*)),
- SLOT(slotCollectionSelected(QListViewItem*)));
- connect(c_olView, SIGNAL(contextMenu(KListView*, QListViewItem*, const QPoint&)),
- SLOT(slotCollectionRMB(KListView*, QListViewItem*, const QPoint&)));
- connect(c_olView, SIGNAL(folderDrop(QDropEvent*, KNCollectionViewItem*)),
- SLOT(slotCollectionViewDrop(QDropEvent*, KNCollectionViewItem*)));
- connect(c_olView, SIGNAL(itemRenamed(QListViewItem*)),
- SLOT(slotCollectionRenamed(QListViewItem*)));
-
- accel->connectItem( accel->insertItem(Key_Up), mArticleViewer, SLOT(scrollUp()) );
- accel->connectItem( accel->insertItem(Key_Down), mArticleViewer, SLOT(scrollDown()) );
- accel->connectItem( accel->insertItem(Key_Prior), mArticleViewer, SLOT(scrollPrior()) );
- accel->connectItem( accel->insertItem(Key_Next), mArticleViewer, SLOT(scrollNext()) );
+ connect(c_olDock, TQT_SIGNAL(iMBeingClosed()), TQT_SLOT(slotGroupDockHidden()));
+ connect(c_olDock, TQT_SIGNAL(hasUndocked()), TQT_SLOT(slotGroupDockHidden()));
+ connect(c_olView, TQT_SIGNAL(focusChangeRequest(TQWidget *)), TQT_SLOT(slotDockWidgetFocusChangeRequest(TQWidget *)));
+ connect(c_olView, TQT_SIGNAL(selectionChanged(TQListViewItem*)),
+ TQT_SLOT(slotCollectionSelected(TQListViewItem*)));
+ connect(c_olView, TQT_SIGNAL(contextMenu(KListView*, TQListViewItem*, const TQPoint&)),
+ TQT_SLOT(slotCollectionRMB(KListView*, TQListViewItem*, const TQPoint&)));
+ connect(c_olView, TQT_SIGNAL(folderDrop(TQDropEvent*, KNCollectionViewItem*)),
+ TQT_SLOT(slotCollectionViewDrop(TQDropEvent*, KNCollectionViewItem*)));
+ connect(c_olView, TQT_SIGNAL(itemRenamed(TQListViewItem*)),
+ TQT_SLOT(slotCollectionRenamed(TQListViewItem*)));
+
+ accel->connectItem( accel->insertItem(Key_Up), mArticleViewer, TQT_SLOT(scrollUp()) );
+ accel->connectItem( accel->insertItem(Key_Down), mArticleViewer, TQT_SLOT(scrollDown()) );
+ accel->connectItem( accel->insertItem(Key_Prior), mArticleViewer, TQT_SLOT(scrollPrior()) );
+ accel->connectItem( accel->insertItem(Key_Next), mArticleViewer, TQT_SLOT(scrollNext()) );
//header view
h_drDock = createDockWidget("header_view", SmallIcon("text_block"), 0,
@@ -148,8 +148,8 @@ KNMainWidget::KNMainWidget( KXMLGUIClient* client, bool detachable, QWidget* par
}
header = new KDockWidgetHeader(h_drDock, "headerDockHeader");
h_drDock->setHeader(header);
- QWidget *dummy = new QWidget(h_drDock);
- QVBoxLayout *vlay = new QVBoxLayout(dummy);
+ TQWidget *dummy = new TQWidget(h_drDock);
+ TQVBoxLayout *vlay = new TQVBoxLayout(dummy);
h_drView = new KNHeaderView( dummy, "hdrView" );
header->setDragPanel(new KNDockWidgetHeaderDrag(h_drView, header, h_drDock));
h_drDock->setWidget(dummy);
@@ -157,7 +157,7 @@ KNMainWidget::KNMainWidget( KXMLGUIClient* client, bool detachable, QWidget* par
q_uicksearch = new KToolBar(dummy, "search toolbar");
KAction *resetQuickSearch = new KAction( i18n( "Reset Quick Search" ),
- QApplication::reverseLayout()
+ TQApplication::reverseLayout()
? "clear_left"
: "locationbar_erase",
0, actionCollection(),
@@ -167,29 +167,29 @@ KNMainWidget::KNMainWidget( KXMLGUIClient* client, bool detachable, QWidget* par
"Resets the quick search so that "
"all messages are shown again." ) );
- QLabel *lbl = new QLabel(i18n("&Search:"), q_uicksearch, "kde toolbar widget");
+ TQLabel *lbl = new TQLabel(i18n("&Search:"), q_uicksearch, "kde toolbar widget");
s_earchLineEdit = new KListViewSearchLine(q_uicksearch, h_drView, "KListViewSearchLine");
q_uicksearch->setStretchableWidget(s_earchLineEdit);
lbl->setBuddy(s_earchLineEdit);
- connect( resetQuickSearch, SIGNAL( activated() ), s_earchLineEdit, SLOT( clear() ));
+ connect( resetQuickSearch, TQT_SIGNAL( activated() ), s_earchLineEdit, TQT_SLOT( clear() ));
vlay->addWidget(q_uicksearch);
vlay->addWidget(h_drView);
- connect(h_drDock, SIGNAL(iMBeingClosed()), SLOT(slotHeaderDockHidden()));
- connect(h_drDock, SIGNAL(hasUndocked()), SLOT(slotHeaderDockHidden()));
- connect(h_drView, SIGNAL(focusChangeRequest(QWidget *)),
- SLOT(slotDockWidgetFocusChangeRequest(QWidget *)));
- connect(h_drView, SIGNAL(itemSelected(QListViewItem*)),
- SLOT(slotArticleSelected(QListViewItem*)));
- connect(h_drView, SIGNAL(selectionChanged()),
- SLOT(slotArticleSelectionChanged()));
- connect(h_drView, SIGNAL(contextMenu(KListView*, QListViewItem*, const QPoint&)),
- SLOT(slotArticleRMB(KListView*, QListViewItem*, const QPoint&)));
- connect(h_drView, SIGNAL(doubleClick(QListViewItem *)),
- SLOT(slotOpenArticle(QListViewItem *)));
- connect(h_drView, SIGNAL(sortingChanged(int)),
- SLOT(slotHdrViewSortingChanged(int)));
+ connect(h_drDock, TQT_SIGNAL(iMBeingClosed()), TQT_SLOT(slotHeaderDockHidden()));
+ connect(h_drDock, TQT_SIGNAL(hasUndocked()), TQT_SLOT(slotHeaderDockHidden()));
+ connect(h_drView, TQT_SIGNAL(focusChangeRequest(TQWidget *)),
+ TQT_SLOT(slotDockWidgetFocusChangeRequest(TQWidget *)));
+ connect(h_drView, TQT_SIGNAL(itemSelected(TQListViewItem*)),
+ TQT_SLOT(slotArticleSelected(TQListViewItem*)));
+ connect(h_drView, TQT_SIGNAL(selectionChanged()),
+ TQT_SLOT(slotArticleSelectionChanged()));
+ connect(h_drView, TQT_SIGNAL(contextMenu(KListView*, TQListViewItem*, const TQPoint&)),
+ TQT_SLOT(slotArticleRMB(KListView*, TQListViewItem*, const TQPoint&)));
+ connect(h_drView, TQT_SIGNAL(doubleClick(TQListViewItem *)),
+ TQT_SLOT(slotOpenArticle(TQListViewItem *)));
+ connect(h_drView, TQT_SIGNAL(sortingChanged(int)),
+ TQT_SLOT(slotHdrViewSortingChanged(int)));
//actions
initActions();
@@ -200,7 +200,7 @@ KNMainWidget::KNMainWidget( KXMLGUIClient* client, bool detachable, QWidget* par
//Network
n_etAccess = knGlobals.netAccess();
- connect(n_etAccess, SIGNAL(netActive(bool)), this, SLOT(slotNetworkActive(bool)));
+ connect(n_etAccess, TQT_SIGNAL(netActive(bool)), this, TQT_SLOT(slotNetworkActive(bool)));
//Filter Manager
f_ilManager = knGlobals.filterManager();
@@ -225,8 +225,8 @@ KNMainWidget::KNMainWidget( KXMLGUIClient* client, bool detachable, QWidget* par
// Score Manager
s_coreManager = knGlobals.scoringManager();
- //connect(s_coreManager, SIGNAL(changedRules()), SLOT(slotReScore()));
- connect(s_coreManager, SIGNAL(finishedEditing()), SLOT(slotReScore()));
+ //connect(s_coreManager, TQT_SIGNAL(changedRules()), TQT_SLOT(slotReScore()));
+ connect(s_coreManager, TQT_SIGNAL(finishedEditing()), TQT_SLOT(slotReScore()));
// Memory Manager
m_emManager = knGlobals.memoryManager();
@@ -245,7 +245,7 @@ KNMainWidget::KNMainWidget( KXMLGUIClient* client, bool detachable, QWidget* par
// set the keyboard focus indicator on the first item in the Collection View
if( c_olView->firstChild() ) {
- QListViewItem *i = c_olView->firstChild();
+ TQListViewItem *i = c_olView->firstChild();
bool open = i->isOpen();
c_olView->setActive( i );
i->setOpen( open );
@@ -307,15 +307,15 @@ void KNMainWidget::initStatusBar()
//statusbar
KMainWindow *mainWin = dynamic_cast<KMainWindow*>(topLevelWidget());
KStatusBar *sb = mainWin ? mainWin->statusBar() : 0;
- s_tatusFilter = new KRSqueezedTextLabel( QString::null, sb );
+ s_tatusFilter = new KRSqueezedTextLabel( TQString::null, sb );
s_tatusFilter->setAlignment( AlignLeft | AlignVCenter );
- s_tatusGroup = new KRSqueezedTextLabel( QString::null, sb );
+ s_tatusGroup = new KRSqueezedTextLabel( TQString::null, sb );
s_tatusGroup->setAlignment( AlignLeft | AlignVCenter );
}
//================================== GUI =================================
-void KNMainWidget::setStatusMsg(const QString& text, int id)
+void KNMainWidget::setStatusMsg(const TQString& text, int id)
{
KMainWindow *mainWin = dynamic_cast<KMainWindow*>(topLevelWidget());
KStatusBar *bar = mainWin ? mainWin->statusBar() : 0;
@@ -340,7 +340,7 @@ void KNMainWidget::setStatusMsg(const QString& text, int id)
}
-void KNMainWidget::setStatusHelpMsg(const QString& text)
+void KNMainWidget::setStatusHelpMsg(const TQString& text)
{
KMainWindow *mainWin = dynamic_cast<KMainWindow*>(topLevelWidget());
KStatusBar *bar = mainWin ? mainWin->statusBar() : 0;
@@ -351,7 +351,7 @@ void KNMainWidget::setStatusHelpMsg(const QString& text)
void KNMainWidget::updateCaption()
{
- QString newCaption=i18n("KDE News Reader");
+ TQString newCaption=i18n("KDE News Reader");
if (g_rpManager->currentGroup()) {
newCaption = g_rpManager->currentGroup()->name();
if (g_rpManager->currentGroup()->status()==KNGroup::moderated)
@@ -431,23 +431,23 @@ void KNMainWidget::secureProcessEvents()
}
-QSize KNMainWidget::sizeHint() const
+TQSize KNMainWidget::sizeHint() const
{
- return QSize(759,478); // default optimized for 800x600
+ return TQSize(759,478); // default optimized for 800x600
}
void KNMainWidget::openURL(const KURL &url)
{
kdDebug(5003) << k_funcinfo << url << endl;
- QString host = url.host();
+ TQString host = url.host();
unsigned short int port = url.port();
KNNntpAccount *acc=0;
if (url.url().left(7) == "news://") {
// lets see if we already have an account for this host...
- QValueList<KNNntpAccount*>::Iterator it;
+ TQValueList<KNNntpAccount*>::Iterator it;
for ( it = a_ccManager->begin(); it != a_ccManager->end(); ++it ) {
if ( (*it)->server().lower() == host.lower() && ( port==0 || (*it)->port() == port ) ) {
acc = *it;
@@ -487,10 +487,10 @@ void KNMainWidget::openURL(const KURL &url)
bool isMID=(url.url().contains('@')==1);
if (!isMID) {
- QString groupname=url.path(-1);
+ TQString groupname=url.path(-1);
while(groupname.startsWith("/"))
groupname.remove(0,1);
- QListViewItem *item=0;
+ TQListViewItem *item=0;
if(groupname.isEmpty())
item=acc->listItem();
else {
@@ -512,7 +512,7 @@ void KNMainWidget::openURL(const KURL &url)
c_olView->setActive( item );
}
} else {
- QString groupname = url.url().mid( url.protocol().length()+1 );
+ TQString groupname = url.url().mid( url.protocol().length()+1 );
KNGroup *g = g_rpManager->currentGroup();
if (g == 0)
g = g_rpManager->firstGroupOfAccount(acc);
@@ -520,7 +520,7 @@ void KNMainWidget::openURL(const KURL &url)
if (g) {
if(!KNArticleWindow::raiseWindowForArticle(groupname.latin1())) { //article not yet opened
KNRemoteArticle *a=new KNRemoteArticle(g);
- QString messageID = "<"+groupname+">";
+ TQString messageID = "<"+groupname+">";
a->messageID()->from7BitString(messageID.latin1());
KNArticleWindow *awin=new KNArticleWindow(a);
awin->show();
@@ -551,117 +551,117 @@ void KNMainWidget::initActions()
//navigation
a_ctNavNextArt = new KAction( KGuiItem(i18n("&Next Article"), "next",
i18n("Go to next article")), "N;Right", h_drView,
- SLOT(nextArticle()), actionCollection(), "go_nextArticle" );
+ TQT_SLOT(nextArticle()), actionCollection(), "go_nextArticle" );
a_ctNavPrevArt = new KAction( KGuiItem(i18n("&Previous Article"), "previous",
i18n("Go to previous article")), "P;Left" , h_drView,
- SLOT(prevArticle()), actionCollection(), "go_prevArticle" );
+ TQT_SLOT(prevArticle()), actionCollection(), "go_prevArticle" );
a_ctNavNextUnreadArt = new KAction(i18n("Next Unread &Article"), "1rightarrow", ALT+SHIFT+Key_Space , this,
- SLOT(slotNavNextUnreadArt()), actionCollection(), "go_nextUnreadArticle");
+ TQT_SLOT(slotNavNextUnreadArt()), actionCollection(), "go_nextUnreadArticle");
a_ctNavNextUnreadThread = new KAction(i18n("Next Unread &Thread"),"2rightarrow", SHIFT+Key_Space , this,
- SLOT(slotNavNextUnreadThread()), actionCollection(), "go_nextUnreadThread");
+ TQT_SLOT(slotNavNextUnreadThread()), actionCollection(), "go_nextUnreadThread");
a_ctNavNextGroup = new KAction(i18n("Ne&xt Group"), "down", Key_Plus , c_olView,
- SLOT(nextGroup()), actionCollection(), "go_nextGroup");
+ TQT_SLOT(nextGroup()), actionCollection(), "go_nextGroup");
a_ctNavPrevGroup = new KAction(i18n("Pre&vious Group"), "up", Key_Minus , c_olView,
- SLOT(prevGroup()), actionCollection(), "go_prevGroup");
+ TQT_SLOT(prevGroup()), actionCollection(), "go_prevGroup");
a_ctNavReadThrough = new KAction(i18n("Read &Through Articles"), Key_Space , this,
- SLOT(slotNavReadThrough()), actionCollection(), "go_readThrough");
+ TQT_SLOT(slotNavReadThrough()), actionCollection(), "go_readThrough");
a_ctNavReadThrough->plugAccel(a_ccel);
- QAccel *accel = new QAccel( this );
+ TQAccel *accel = new TQAccel( this );
new KAction( i18n("Focus on Next Folder"), CTRL+Key_Right, c_olView,
- SLOT(incCurrentFolder()), actionCollection(), "inc_current_folder" );
+ TQT_SLOT(incCurrentFolder()), actionCollection(), "inc_current_folder" );
accel->connectItem(accel->insertItem(CTRL+Key_Right),
- c_olView, SLOT(incCurrentFolder()));
+ c_olView, TQT_SLOT(incCurrentFolder()));
new KAction( i18n("Focus on Previous Folder"), CTRL+Key_Left, c_olView,
- SLOT(decCurrentFolder()), actionCollection(), "dec_current_folder" );
+ TQT_SLOT(decCurrentFolder()), actionCollection(), "dec_current_folder" );
accel->connectItem(accel->insertItem(CTRL+Key_Left),
- c_olView, SLOT(decCurrentFolder()));
+ c_olView, TQT_SLOT(decCurrentFolder()));
new KAction( i18n("Select Folder with Focus"), CTRL+Key_Space, c_olView,
- SLOT(selectCurrentFolder()), actionCollection(), "select_current_folder" );
+ TQT_SLOT(selectCurrentFolder()), actionCollection(), "select_current_folder" );
accel->connectItem(accel->insertItem(CTRL+Key_Space),
- c_olView, SLOT(selectCurrentFolder()));
+ c_olView, TQT_SLOT(selectCurrentFolder()));
new KAction( i18n("Focus on Next Article"), ALT+Key_Right, h_drView,
- SLOT(incCurrentArticle()), actionCollection(), "inc_current_article" );
+ TQT_SLOT(incCurrentArticle()), actionCollection(), "inc_current_article" );
accel->connectItem( accel->insertItem(ALT+Key_Right),
- h_drView, SLOT(incCurrentArticle()) );
+ h_drView, TQT_SLOT(incCurrentArticle()) );
new KAction( i18n("Focus on Previous Article"), ALT+Key_Left, h_drView,
- SLOT(decCurrentArticle()), actionCollection(), "dec_current_article" );
+ TQT_SLOT(decCurrentArticle()), actionCollection(), "dec_current_article" );
accel->connectItem( accel->insertItem(ALT+Key_Left),
- h_drView, SLOT(decCurrentArticle()) );
+ h_drView, TQT_SLOT(decCurrentArticle()) );
new KAction( i18n("Select Article with Focus"), ALT+Key_Space, h_drView,
- SLOT(selectCurrentArticle()), actionCollection(), "select_current_article" );
+ TQT_SLOT(selectCurrentArticle()), actionCollection(), "select_current_article" );
accel->connectItem( accel->insertItem(ALT+Key_Space),
- h_drView, SLOT(selectCurrentArticle()) );
+ h_drView, TQT_SLOT(selectCurrentArticle()) );
//collection-view - accounts
a_ctAccProperties = new KAction(i18n("Account &Properties"), "configure", 0, this,
- SLOT(slotAccProperties()), actionCollection(), "account_properties");
+ TQT_SLOT(slotAccProperties()), actionCollection(), "account_properties");
a_ctAccRename = new KAction(i18n("&Rename Account"), "text", 0, this,
- SLOT(slotAccRename()), actionCollection(), "account_rename");
+ TQT_SLOT(slotAccRename()), actionCollection(), "account_rename");
a_ctAccSubscribe = new KAction(i18n("&Subscribe to Newsgroups..."), "news_subscribe", 0, this,
- SLOT(slotAccSubscribe()), actionCollection(), "account_subscribe");
+ TQT_SLOT(slotAccSubscribe()), actionCollection(), "account_subscribe");
a_ctAccExpireAll = new KAction(i18n("&Expire All Groups"), 0, this,
- SLOT(slotAccExpireAll()), actionCollection(), "account_expire_all");
+ TQT_SLOT(slotAccExpireAll()), actionCollection(), "account_expire_all");
a_ctAccGetNewHdrs = new KAction(i18n("&Get New Articles in All Groups"), "mail_get", 0, this,
- SLOT(slotAccGetNewHdrs()), actionCollection(), "account_dnlHeaders");
+ TQT_SLOT(slotAccGetNewHdrs()), actionCollection(), "account_dnlHeaders");
a_ctAccGetNewHdrsAll = new KAction(i18n("&Get New Articles in All Accounts"), "mail_get_all", 0, this,
- SLOT(slotAccGetNewHdrsAll()), actionCollection(), "account_dnlAllHeaders");
+ TQT_SLOT(slotAccGetNewHdrsAll()), actionCollection(), "account_dnlAllHeaders");
a_ctAccDelete = new KAction(i18n("&Delete Account"), "editdelete", 0, this,
- SLOT(slotAccDelete()), actionCollection(), "account_delete");
+ TQT_SLOT(slotAccDelete()), actionCollection(), "account_delete");
a_ctAccPostNewArticle = new KAction(i18n("&Post to Newsgroup..."), "mail_new", CTRL+Key_N, this,
- SLOT(slotAccPostNewArticle()), actionCollection(), "article_postNew");
+ TQT_SLOT(slotAccPostNewArticle()), actionCollection(), "article_postNew");
//collection-view - groups
a_ctGrpProperties = new KAction(i18n("Group &Properties"), "configure", 0, this,
- SLOT(slotGrpProperties()), actionCollection(), "group_properties");
+ TQT_SLOT(slotGrpProperties()), actionCollection(), "group_properties");
a_ctGrpRename = new KAction(i18n("Rename &Group"), "text", 0, this,
- SLOT(slotGrpRename()), actionCollection(), "group_rename");
+ TQT_SLOT(slotGrpRename()), actionCollection(), "group_rename");
a_ctGrpGetNewHdrs = new KAction(i18n("&Get New Articles"), "mail_get" , 0, this,
- SLOT(slotGrpGetNewHdrs()), actionCollection(), "group_dnlHeaders");
+ TQT_SLOT(slotGrpGetNewHdrs()), actionCollection(), "group_dnlHeaders");
a_ctGrpExpire = new KAction(i18n("E&xpire Group"), "wizard", 0, this,
- SLOT(slotGrpExpire()), actionCollection(), "group_expire");
+ TQT_SLOT(slotGrpExpire()), actionCollection(), "group_expire");
a_ctGrpReorganize = new KAction(i18n("Re&organize Group"), 0, this,
- SLOT(slotGrpReorganize()), actionCollection(), "group_reorg");
+ TQT_SLOT(slotGrpReorganize()), actionCollection(), "group_reorg");
a_ctGrpUnsubscribe = new KAction(i18n("&Unsubscribe From Group"), "news_unsubscribe", 0, this,
- SLOT(slotGrpUnsubscribe()), actionCollection(), "group_unsubscribe");
+ TQT_SLOT(slotGrpUnsubscribe()), actionCollection(), "group_unsubscribe");
a_ctGrpSetAllRead = new KAction(i18n("Mark All as &Read"), "goto", 0, this,
- SLOT(slotGrpSetAllRead()), actionCollection(), "group_allRead");
+ TQT_SLOT(slotGrpSetAllRead()), actionCollection(), "group_allRead");
a_ctGrpSetAllUnread = new KAction(i18n("Mark All as U&nread"), 0, this,
- SLOT(slotGrpSetAllUnread()), actionCollection(), "group_allUnread");
+ TQT_SLOT(slotGrpSetAllUnread()), actionCollection(), "group_allUnread");
a_ctGrpSetUnread = new KAction(i18n("Mark Last as Unr&ead..."), 0, this,
- SLOT(slotGrpSetUnread()), actionCollection(), "group_unread");
+ TQT_SLOT(slotGrpSetUnread()), actionCollection(), "group_unread");
(void) new KAction( i18n("&Configure KNode..."),
"configure", 0, this,
- SLOT(slotSettings()), actionCollection(),
+ TQT_SLOT(slotSettings()), actionCollection(),
"knode_configure_knode" );
//collection-view - folder
a_ctFolNew = new KAction(i18n("&New Folder"), "folder_new", 0, this,
- SLOT(slotFolNew()), actionCollection(), "folder_new");
+ TQT_SLOT(slotFolNew()), actionCollection(), "folder_new");
a_ctFolNewChild = new KAction(i18n("New &Subfolder"), "folder_new", 0, this,
- SLOT(slotFolNewChild()), actionCollection(), "folder_newChild");
+ TQT_SLOT(slotFolNewChild()), actionCollection(), "folder_newChild");
a_ctFolDelete = new KAction(i18n("&Delete Folder"), "editdelete", 0, this,
- SLOT(slotFolDelete()), actionCollection(), "folder_delete");
+ TQT_SLOT(slotFolDelete()), actionCollection(), "folder_delete");
a_ctFolRename = new KAction(i18n("&Rename Folder"), "text", 0, this,
- SLOT(slotFolRename()), actionCollection(), "folder_rename");
+ TQT_SLOT(slotFolRename()), actionCollection(), "folder_rename");
a_ctFolCompact = new KAction(i18n("C&ompact Folder"), "wizard", 0, this,
- SLOT(slotFolCompact()), actionCollection(), "folder_compact");
+ TQT_SLOT(slotFolCompact()), actionCollection(), "folder_compact");
a_ctFolCompactAll = new KAction(i18n("Co&mpact All Folders"), 0, this,
- SLOT(slotFolCompactAll()), actionCollection(), "folder_compact_all");
+ TQT_SLOT(slotFolCompactAll()), actionCollection(), "folder_compact_all");
a_ctFolEmpty = new KAction(i18n("&Empty Folder"), 0, this,
- SLOT(slotFolEmpty()), actionCollection(), "folder_empty");
+ TQT_SLOT(slotFolEmpty()), actionCollection(), "folder_empty");
a_ctFolMboxImport = new KAction(i18n("&Import MBox Folder..."), 0, this,
- SLOT(slotFolMBoxImport()), actionCollection(), "folder_MboxImport");
+ TQT_SLOT(slotFolMBoxImport()), actionCollection(), "folder_MboxImport");
a_ctFolMboxExport = new KAction(i18n("E&xport as MBox Folder..."), 0, this,
- SLOT(slotFolMBoxExport()), actionCollection(), "folder_MboxExport");
+ TQT_SLOT(slotFolMBoxExport()), actionCollection(), "folder_MboxExport");
//header-view - list-handling
a_ctArtSortHeaders = new KSelectAction(i18n("S&ort"), 0, actionCollection(), "view_Sort");
- QStringList items;
+ TQStringList items;
items += i18n("By &Subject");
items += i18n("By S&ender");
items += i18n("By S&core");
@@ -669,9 +669,9 @@ void KNMainWidget::initActions()
items += i18n("By &Date");
a_ctArtSortHeaders->setItems(items);
a_ctArtSortHeaders->setShortcutConfigurable(false);
- connect(a_ctArtSortHeaders, SIGNAL(activated(int)), this, SLOT(slotArtSortHeaders(int)));
- a_ctArtSortHeadersKeyb = new KAction(i18n("Sort"), QString::null, Key_F7 , this,
- SLOT(slotArtSortHeadersKeyb()), actionCollection(), "view_Sort_Keyb");
+ connect(a_ctArtSortHeaders, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotArtSortHeaders(int)));
+ a_ctArtSortHeadersKeyb = new KAction(i18n("Sort"), TQString::null, Key_F7 , this,
+ TQT_SLOT(slotArtSortHeadersKeyb()), actionCollection(), "view_Sort_Keyb");
a_ctArtSortHeadersKeyb->plugAccel(a_ccel);
a_ctArtFilter = new KNFilterSelectAction(i18n("&Filter"), "filter",
actionCollection(), "view_Filter");
@@ -679,86 +679,86 @@ void KNMainWidget::initActions()
a_ctArtFilterKeyb = new KAction(i18n("Filter"), Key_F6, actionCollection(), "view_Filter_Keyb");
a_ctArtFilterKeyb->plugAccel(a_ccel);
a_ctArtSearch = new KAction(i18n("&Search Articles..."),"mail_find" , Key_F4 , this,
- SLOT(slotArtSearch()), actionCollection(), "article_search");
+ TQT_SLOT(slotArtSearch()), actionCollection(), "article_search");
a_ctArtRefreshList = new KAction(i18n("&Refresh List"),"reload", KStdAccel::shortcut(KStdAccel::Reload), this,
- SLOT(slotArtRefreshList()), actionCollection(), "view_Refresh");
+ TQT_SLOT(slotArtRefreshList()), actionCollection(), "view_Refresh");
a_ctArtCollapseAll = new KAction(i18n("&Collapse All Threads"), 0 , this,
- SLOT(slotArtCollapseAll()), actionCollection(), "view_CollapseAll");
+ TQT_SLOT(slotArtCollapseAll()), actionCollection(), "view_CollapseAll");
a_ctArtExpandAll = new KAction(i18n("E&xpand All Threads"), 0 , this,
- SLOT(slotArtExpandAll()), actionCollection(), "view_ExpandAll");
+ TQT_SLOT(slotArtExpandAll()), actionCollection(), "view_ExpandAll");
a_ctArtToggleThread = new KAction(i18n("&Toggle Subthread"), Key_T, this,
- SLOT(slotArtToggleThread()), actionCollection(), "thread_toggle");
+ TQT_SLOT(slotArtToggleThread()), actionCollection(), "thread_toggle");
a_ctArtToggleShowThreads = new KToggleAction(i18n("Show T&hreads"), 0 , this,
- SLOT(slotArtToggleShowThreads()), actionCollection(), "view_showThreads");
+ TQT_SLOT(slotArtToggleShowThreads()), actionCollection(), "view_showThreads");
a_ctArtToggleShowThreads->setCheckedState(i18n("Hide T&hreads"));
a_ctArtToggleShowThreads->setChecked(c_fgManager->readNewsGeneral()->showThreads());
//header-view - remote articles
a_ctArtSetArtRead = new KAction(i18n("Mark as &Read"), Key_D , this,
- SLOT(slotArtSetArtRead()), actionCollection(), "article_read");
+ TQT_SLOT(slotArtSetArtRead()), actionCollection(), "article_read");
a_ctArtSetArtUnread = new KAction(i18n("Mar&k as Unread"), Key_U , this,
- SLOT(slotArtSetArtUnread()), actionCollection(), "article_unread");
+ TQT_SLOT(slotArtSetArtUnread()), actionCollection(), "article_unread");
a_ctArtSetThreadRead = new KAction(i18n("Mark &Thread as Read"), CTRL+Key_D , this,
- SLOT(slotArtSetThreadRead()), actionCollection(), "thread_read");
+ TQT_SLOT(slotArtSetThreadRead()), actionCollection(), "thread_read");
a_ctArtSetThreadUnread = new KAction(i18n("Mark T&hread as Unread"), CTRL+Key_U , this,
- SLOT(slotArtSetThreadUnread()), actionCollection(), "thread_unread");
+ TQT_SLOT(slotArtSetThreadUnread()), actionCollection(), "thread_unread");
a_ctArtOpenNewWindow = new KAction(i18n("Open in Own &Window"), "window_new", Key_O , this,
- SLOT(slotArtOpenNewWindow()), actionCollection(), "article_ownWindow");
+ TQT_SLOT(slotArtOpenNewWindow()), actionCollection(), "article_ownWindow");
// scoring
a_ctScoresEdit = new KAction(i18n("&Edit Scoring Rules..."), "edit", CTRL+Key_E, this,
- SLOT(slotScoreEdit()), actionCollection(), "scoreedit");
+ TQT_SLOT(slotScoreEdit()), actionCollection(), "scoreedit");
a_ctReScore = new KAction(i18n("Recalculate &Scores"), 0, this,
- SLOT(slotReScore()),actionCollection(),"rescore");
+ TQT_SLOT(slotReScore()),actionCollection(),"rescore");
a_ctScoreLower = new KAction(i18n("&Lower Score for Author..."), CTRL+Key_L, this,
- SLOT(slotScoreLower()), actionCollection(), "scorelower");
+ TQT_SLOT(slotScoreLower()), actionCollection(), "scorelower");
a_ctScoreRaise = new KAction(i18n("&Raise Score for Author..."), CTRL+Key_I, this,
- SLOT(slotScoreRaise()),actionCollection(),"scoreraise");
+ TQT_SLOT(slotScoreRaise()),actionCollection(),"scoreraise");
a_ctArtToggleIgnored = new KAction(i18n("&Ignore Thread"), "bottom", Key_I , this,
- SLOT(slotArtToggleIgnored()), actionCollection(), "thread_ignore");
+ TQT_SLOT(slotArtToggleIgnored()), actionCollection(), "thread_ignore");
a_ctArtToggleWatched = new KAction(i18n("&Watch Thread"), "top", Key_W , this,
- SLOT(slotArtToggleWatched()), actionCollection(), "thread_watch");
+ TQT_SLOT(slotArtToggleWatched()), actionCollection(), "thread_watch");
//header-view local articles
a_ctArtSendOutbox = new KAction(i18n("Sen&d Pending Messages"), "mail_send", 0, this,
- SLOT(slotArtSendOutbox()), actionCollection(), "net_sendPending");
+ TQT_SLOT(slotArtSendOutbox()), actionCollection(), "net_sendPending");
a_ctArtDelete = new KAction(i18n("&Delete Article"), "editdelete", Key_Delete, this,
- SLOT(slotArtDelete()), actionCollection(), "article_delete");
+ TQT_SLOT(slotArtDelete()), actionCollection(), "article_delete");
a_ctArtSendNow = new KAction(i18n("Send &Now"),"mail_send", 0 , this,
- SLOT(slotArtSendNow()), actionCollection(), "article_sendNow");
+ TQT_SLOT(slotArtSendNow()), actionCollection(), "article_sendNow");
a_ctArtEdit = new KAction(i18n("edit article","&Edit Article..."), "edit", Key_E , this,
- SLOT(slotArtEdit()), actionCollection(), "article_edit");
+ TQT_SLOT(slotArtEdit()), actionCollection(), "article_edit");
//network
a_ctNetCancel = new KAction(i18n("Stop &Network"),"stop",0, this,
- SLOT(slotNetCancel()), actionCollection(), "net_stop");
+ TQT_SLOT(slotNetCancel()), actionCollection(), "net_stop");
a_ctNetCancel->setEnabled(false);
a_ctFetchArticleWithID = new KAction(i18n("&Fetch Article with ID..."), 0, this,
- SLOT(slotFetchArticleWithID()), actionCollection(), "fetch_article_with_id");
+ TQT_SLOT(slotFetchArticleWithID()), actionCollection(), "fetch_article_with_id");
a_ctFetchArticleWithID->setEnabled(false);
a_ctToggleGroupView = new KToggleAction(i18n("Show &Group View"), CTRL+Key_G, this,
- SLOT(slotToggleGroupView()), actionCollection(), "settings_show_groupView");
+ TQT_SLOT(slotToggleGroupView()), actionCollection(), "settings_show_groupView");
a_ctToggleGroupView->setCheckedState(i18n("Hide &Group View"));
a_ctToggleHeaderView = new KToggleAction(i18n("Show &Header View"), CTRL+Key_H, this,
- SLOT(slotToggleHeaderView()), actionCollection(), "settings_show_headerView");
+ TQT_SLOT(slotToggleHeaderView()), actionCollection(), "settings_show_headerView");
a_ctToggleHeaderView->setCheckedState(i18n("Hide &Header View"));
a_ctToggleArticleViewer = new KToggleAction(i18n("Show &Article Viewer"), CTRL+Key_J, this,
- SLOT(slotToggleArticleViewer()), actionCollection(), "settings_show_articleViewer");
+ TQT_SLOT(slotToggleArticleViewer()), actionCollection(), "settings_show_articleViewer");
a_ctToggleArticleViewer->setCheckedState(i18n("Hide &Article Viewer"));
- a_ctToggleQuickSearch = new KToggleAction(i18n("Show Quick Search"), QString::null, this,
- SLOT(slotToggleQuickSearch()), actionCollection(), "settings_show_quickSearch");
+ a_ctToggleQuickSearch = new KToggleAction(i18n("Show Quick Search"), TQString::null, this,
+ TQT_SLOT(slotToggleQuickSearch()), actionCollection(), "settings_show_quickSearch");
a_ctToggleQuickSearch->setCheckedState(i18n("Hide Quick Search"));
a_ctSwitchToGroupView = new KAction(i18n("Switch to Group View"), Key_G , this,
- SLOT(slotSwitchToGroupView()), actionCollection(), "switch_to_group_view");
+ TQT_SLOT(slotSwitchToGroupView()), actionCollection(), "switch_to_group_view");
a_ctSwitchToGroupView->plugAccel(a_ccel);
a_ctSwitchToHeaderView = new KAction(i18n("Switch to Header View"), Key_H , this,
- SLOT(slotSwitchToHeaderView()), actionCollection(), "switch_to_header_view");
+ TQT_SLOT(slotSwitchToHeaderView()), actionCollection(), "switch_to_header_view");
a_ctSwitchToHeaderView->plugAccel(a_ccel);
a_ctSwitchToArticleViewer = new KAction(i18n("Switch to Article Viewer"), Key_J , this,
- SLOT(slotSwitchToArticleViewer()), actionCollection(), "switch_to_article_viewer");
+ TQT_SLOT(slotSwitchToArticleViewer()), actionCollection(), "switch_to_article_viewer");
a_ctSwitchToArticleViewer->plugAccel(a_ccel);
}
@@ -766,16 +766,16 @@ bool KNMainWidget::firstStart()
{
KConfig *conf=knGlobals.config();
conf->setGroup("GENERAL");
- QString ver = conf->readEntry("Version");
+ TQString ver = conf->readEntry("Version");
if(!ver.isEmpty())
return false;
KConfig emailConf("emaildefaults");
emailConf.setGroup("Defaults");
- QString group = emailConf.readEntry("Profile","Default");
+ TQString group = emailConf.readEntry("Profile","Default");
- emailConf.setGroup(QString("PROFILE_%1").arg(group));
+ emailConf.setGroup(TQString("PROFILE_%1").arg(group));
KNConfig::Identity *id=knGlobals.configManager()->identity();
id->setName(emailConf.readEntry("FullName"));
id->setEmail(emailConf.readEntry("EmailAddress").latin1());
@@ -841,7 +841,7 @@ bool KNMainWidget::requestShutdown()
if( a_rtFactory->jobsPending() &&
KMessageBox::No==KMessageBox::warningYesNo(this, i18n(
"KNode is currently sending articles. If you quit now you might lose these \
-articles.\nDo you want to quit anyway?"), QString::null, KStdGuiItem::quit(), KStdGuiItem::cancel())
+articles.\nDo you want to quit anyway?"), TQString::null, KStdGuiItem::quit(), KStdGuiItem::cancel())
)
return false;
@@ -901,13 +901,13 @@ bool KNMainWidget::queryClose()
}
-void KNMainWidget::showEvent(QShowEvent *)
+void KNMainWidget::showEvent(TQShowEvent *)
{
slotCheckDockWidgetStatus();
}
-void KNMainWidget::fontChange( const QFont & )
+void KNMainWidget::fontChange( const TQFont & )
{
a_rtFactory->configChanged();
ArticleWidget::configChanged();
@@ -915,19 +915,19 @@ void KNMainWidget::fontChange( const QFont & )
}
-void KNMainWidget::paletteChange( const QPalette & )
+void KNMainWidget::paletteChange( const TQPalette & )
{
ArticleWidget::configChanged();
configChanged();
}
-bool KNMainWidget::eventFilter(QObject *o, QEvent *e)
+bool KNMainWidget::eventFilter(TQObject *o, TQEvent *e)
{
- if (((e->type() == QEvent::KeyPress) ||
- (e->type() == QEvent::KeyRelease) ||
- (e->type() == QEvent::Accel) ||
- (e->type() == QEvent::AccelOverride)) &&
+ if (((e->type() == TQEvent::KeyPress) ||
+ (e->type() == TQEvent::KeyRelease) ||
+ (e->type() == TQEvent::Accel) ||
+ (e->type() == TQEvent::AccelOverride)) &&
b_lockui)
return true;
return KDockArea::eventFilter(o, e);
@@ -939,7 +939,7 @@ void KNMainWidget::getSelectedArticles(KNArticle::List &l)
if(!g_rpManager->currentGroup() && !f_olManager->currentFolder())
return;
- for(QListViewItem *i=h_drView->firstChild(); i; i=i->itemBelow())
+ for(TQListViewItem *i=h_drView->firstChild(); i; i=i->itemBelow())
if(i->isSelected() || (static_cast<KNHdrViewItem*>(i)->isActive()))
l.append( static_cast<KNArticle*> ((static_cast<KNHdrViewItem*>(i))->art) );
}
@@ -949,7 +949,7 @@ void KNMainWidget::getSelectedArticles(KNRemoteArticle::List &l)
{
if(!g_rpManager->currentGroup()) return;
- for(QListViewItem *i=h_drView->firstChild(); i; i=i->itemBelow())
+ for(TQListViewItem *i=h_drView->firstChild(); i; i=i->itemBelow())
if(i->isSelected() || (static_cast<KNHdrViewItem*>(i)->isActive()))
l.append( static_cast<KNRemoteArticle*> ((static_cast<KNHdrViewItem*>(i))->art) );
}
@@ -958,7 +958,7 @@ void KNMainWidget::getSelectedArticles(KNRemoteArticle::List &l)
void KNMainWidget::getSelectedThreads(KNRemoteArticle::List &l)
{
KNRemoteArticle *art;
- for(QListViewItem *i=h_drView->firstChild(); i; i=i->itemBelow())
+ for(TQListViewItem *i=h_drView->firstChild(); i; i=i->itemBelow())
if(i->isSelected() || (static_cast<KNHdrViewItem*>(i)->isActive())) {
art=static_cast<KNRemoteArticle*> ((static_cast<KNHdrViewItem*>(i))->art);
// ignore the article if it is already in the list
@@ -973,7 +973,7 @@ void KNMainWidget::getSelectedArticles( KNLocalArticle::List &l )
{
if(!f_olManager->currentFolder()) return;
- for(QListViewItem *i=h_drView->firstChild(); i; i=i->itemBelow())
+ for(TQListViewItem *i=h_drView->firstChild(); i; i=i->itemBelow())
if(i->isSelected() || (static_cast<KNHdrViewItem*>(i)->isActive()))
l.append( static_cast<KNLocalArticle*> ((static_cast<KNHdrViewItem*>(i))->art) );
}
@@ -981,7 +981,7 @@ void KNMainWidget::getSelectedArticles( KNLocalArticle::List &l )
void KNMainWidget::closeCurrentThread()
{
- QListViewItem *item = h_drView->currentItem();
+ TQListViewItem *item = h_drView->currentItem();
if (item) {
while (item->parent())
item = item->parent();
@@ -991,9 +991,9 @@ void KNMainWidget::closeCurrentThread()
}
}
-void KNMainWidget::slotArticleSelected(QListViewItem *i)
+void KNMainWidget::slotArticleSelected(TQListViewItem *i)
{
- kdDebug(5003) << "KNMainWidget::slotArticleSelected(QListViewItem *i)" << endl;
+ kdDebug(5003) << "KNMainWidget::slotArticleSelected(TQListViewItem *i)" << endl;
if(b_lockui)
return;
KNArticle *selectedArticle=0;
@@ -1053,9 +1053,9 @@ void KNMainWidget::slotArticleSelectionChanged()
}
-void KNMainWidget::slotCollectionSelected(QListViewItem *i)
+void KNMainWidget::slotCollectionSelected(TQListViewItem *i)
{
- kdDebug(5003) << "KNMainWidget::slotCollectionSelected(QListViewItem *i)" << endl;
+ kdDebug(5003) << "KNMainWidget::slotCollectionSelected(TQListViewItem *i)" << endl;
if(b_lockui)
return;
KNCollection *c=0;
@@ -1172,9 +1172,9 @@ void KNMainWidget::slotCollectionSelected(QListViewItem *i)
}
-void KNMainWidget::slotCollectionRenamed(QListViewItem *i)
+void KNMainWidget::slotCollectionRenamed(TQListViewItem *i)
{
- kdDebug(5003) << "KNMainWidget::slotCollectionRenamed(QListViewItem *i)" << endl;
+ kdDebug(5003) << "KNMainWidget::slotCollectionRenamed(TQListViewItem *i)" << endl;
if (i) {
(static_cast<KNCollectionViewItem*>(i))->coll->setName(i->text(0));
@@ -1187,7 +1187,7 @@ void KNMainWidget::slotCollectionRenamed(QListViewItem *i)
}
-void KNMainWidget::slotCollectionViewDrop(QDropEvent* e, KNCollectionViewItem* after)
+void KNMainWidget::slotCollectionViewDrop(TQDropEvent* e, KNCollectionViewItem* after)
{
kdDebug(5003) << "KNMainWidget::slotCollectionViewDrop() : type = " << e->format(0) << endl;
@@ -1201,7 +1201,7 @@ void KNMainWidget::slotCollectionViewDrop(QDropEvent* e, KNCollectionViewItem* a
}
else if(dest && e->provides("x-knode-drag/article")) {
if(f_olManager->currentFolder()) {
- if (e->action() == QDropEvent::Move) {
+ if (e->action() == TQDropEvent::Move) {
KNLocalArticle::List l;
getSelectedArticles(l);
a_rtManager->moveIntoFolder(l, dest);
@@ -1220,17 +1220,17 @@ void KNMainWidget::slotCollectionViewDrop(QDropEvent* e, KNCollectionViewItem* a
}
-void KNMainWidget::slotArticleRMB(KListView*, QListViewItem *i, const QPoint &p)
+void KNMainWidget::slotArticleRMB(KListView*, TQListViewItem *i, const TQPoint &p)
{
if(b_lockui)
return;
if(i) {
- QPopupMenu *popup;
+ TQPopupMenu *popup;
if( (static_cast<KNHdrViewItem*>(i))->art->type()==KMime::Base::ATremote) {
- popup = static_cast<QPopupMenu *>(factory()->container("remote_popup", m_GUIClient));
+ popup = static_cast<TQPopupMenu *>(factory()->container("remote_popup", m_GUIClient));
} else {
- popup = static_cast<QPopupMenu *>(factory()->container("local_popup", m_GUIClient));
+ popup = static_cast<TQPopupMenu *>(factory()->container("local_popup", m_GUIClient));
}
if ( popup )
@@ -1239,28 +1239,28 @@ void KNMainWidget::slotArticleRMB(KListView*, QListViewItem *i, const QPoint &p)
}
-void KNMainWidget::slotCollectionRMB(KListView*, QListViewItem *i, const QPoint &p)
+void KNMainWidget::slotCollectionRMB(KListView*, TQListViewItem *i, const TQPoint &p)
{
if(b_lockui)
return;
if(i) {
if( (static_cast<KNCollectionViewItem*>(i))->coll->type()==KNCollection::CTgroup) {
- QPopupMenu *popup = static_cast<QPopupMenu *>(factory()->container("group_popup", m_GUIClient));
+ TQPopupMenu *popup = static_cast<TQPopupMenu *>(factory()->container("group_popup", m_GUIClient));
if ( popup )
popup->popup(p);
} else if ((static_cast<KNCollectionViewItem*>(i))->coll->type()==KNCollection::CTfolder) {
if (static_cast<KNFolder*>(static_cast<KNCollectionViewItem*>(i)->coll)->isRootFolder()) {
- QPopupMenu *popup = static_cast<QPopupMenu *>(factory()->container("root_folder_popup", m_GUIClient));
+ TQPopupMenu *popup = static_cast<TQPopupMenu *>(factory()->container("root_folder_popup", m_GUIClient));
if ( popup )
popup->popup(p);
} else {
- QPopupMenu *popup = static_cast<QPopupMenu *>(factory()->container("folder_popup", m_GUIClient));
+ TQPopupMenu *popup = static_cast<TQPopupMenu *>(factory()->container("folder_popup", m_GUIClient));
if ( popup )
popup->popup(p);
}
} else {
- QPopupMenu *popup = static_cast<QPopupMenu *>(factory()->container("account_popup", m_GUIClient));
+ TQPopupMenu *popup = static_cast<TQPopupMenu *>(factory()->container("account_popup", m_GUIClient));
if ( popup )
popup->popup( p );
}
@@ -1268,7 +1268,7 @@ void KNMainWidget::slotCollectionRMB(KListView*, QListViewItem *i, const QPoint
}
-void KNMainWidget::slotOpenArticle(QListViewItem *item)
+void KNMainWidget::slotOpenArticle(TQListViewItem *item)
{
if(b_lockui)
return;
@@ -1327,7 +1327,7 @@ void KNMainWidget::slotArticleDockHidden()
}
-void KNMainWidget::slotDockWidgetFocusChangeRequest(QWidget *w)
+void KNMainWidget::slotDockWidgetFocusChangeRequest(TQWidget *w)
{
if ( w == mArticleViewer ) {
if (c_olView->isVisible()) {
@@ -1448,7 +1448,7 @@ void KNMainWidget::slotAccDelete()
void KNMainWidget::slotAccGetNewHdrsAll()
{
- QValueList<KNNntpAccount*>::Iterator it;
+ TQValueList<KNNntpAccount*>::Iterator it;
for ( it = a_ccManager->begin(); it != a_ccManager->end(); ++it )
g_rpManager->checkAll( *it );
}
@@ -1511,7 +1511,7 @@ void KNMainWidget::slotGrpUnsubscribe()
kdDebug(5003) << "KNMainWidget::slotGrpUnsubscribe()" << endl;
if(g_rpManager->currentGroup()) {
if(KMessageBox::Yes==KMessageBox::questionYesNo(knGlobals.topWidget,
- i18n("Do you really want to unsubscribe from %1?").arg(g_rpManager->currentGroup()->groupname()), QString::null, i18n("Unsubscribe"), KStdGuiItem::cancel()))
+ i18n("Do you really want to unsubscribe from %1?").arg(g_rpManager->currentGroup()->groupname()), TQString::null, i18n("Unsubscribe"), KStdGuiItem::cancel()))
if (g_rpManager->unsubscribeGroup(g_rpManager->currentGroup()))
slotCollectionSelected(0);
}
@@ -1945,10 +1945,10 @@ void KNMainWidget::slotFetchArticleWithID()
FetchArticleIdDlg *dlg = new FetchArticleIdDlg(this, "messageid" );
if (dlg->exec()) {
- QString id = dlg->messageId().simplifyWhiteSpace();
- if (id.find(QRegExp("*@*",false,true))!=-1) {
- if (id.find(QRegExp("<*>",false,true))==-1) // add "<>" when necessary
- id = QString("<%1>").arg(id);
+ TQString id = dlg->messageId().simplifyWhiteSpace();
+ if (id.find(TQRegExp("*@*",false,true))!=-1) {
+ if (id.find(TQRegExp("<*>",false,true))==-1) // add "<>" when necessary
+ id = TQString("<%1>").arg(id);
if(!KNArticleWindow::raiseWindowForArticle(id.latin1())) { //article not yet opened
KNRemoteArticle *a=new KNRemoteArticle(g_rpManager->currentGroup());
@@ -2043,27 +2043,27 @@ KXMLGUIFactory* KNMainWidget::factory() const
//--------------------------------
-FetchArticleIdDlg::FetchArticleIdDlg(QWidget *parent, const char */*name*/ )
+FetchArticleIdDlg::FetchArticleIdDlg(TQWidget *parent, const char */*name*/ )
:KDialogBase(parent, 0, true, i18n("Fetch Article with ID"), KDialogBase::Ok|KDialogBase::Cancel, KDialogBase::Ok)
{
- QHBox *page = makeHBoxMainWidget();
+ TQHBox *page = makeHBoxMainWidget();
- QLabel *label = new QLabel(i18n("&Message-ID:"),page);
+ TQLabel *label = new TQLabel(i18n("&Message-ID:"),page);
edit = new KLineEdit(page);
label->setBuddy(edit);
edit->setFocus();
enableButtonOK( false );
setButtonOK( i18n("&Fetch") );
- connect( edit, SIGNAL(textChanged( const QString & )), this, SLOT(slotTextChanged(const QString & )));
- KNHelper::restoreWindowSize("fetchArticleWithID", this, QSize(325,66));
+ connect( edit, TQT_SIGNAL(textChanged( const TQString & )), this, TQT_SLOT(slotTextChanged(const TQString & )));
+ KNHelper::restoreWindowSize("fetchArticleWithID", this, TQSize(325,66));
}
-QString FetchArticleIdDlg::messageId() const
+TQString FetchArticleIdDlg::messageId() const
{
return edit->text();
}
-void FetchArticleIdDlg::slotTextChanged(const QString &_text )
+void FetchArticleIdDlg::slotTextChanged(const TQString &_text )
{
enableButtonOK( !_text.isEmpty() );
}
diff --git a/knode/knmainwidget.h b/knode/knmainwidget.h
index 2b3660bd7..19f2b4aaf 100644
--- a/knode/knmainwidget.h
+++ b/knode/knmainwidget.h
@@ -20,7 +20,7 @@
#include <kdialogbase.h>
#include "resource.h"
-#include <qglobal.h>
+#include <tqglobal.h>
#include <kdepimmacros.h>
class QListViewItem;
@@ -64,7 +64,7 @@ class KDE_EXPORT KNMainWidget : public KDockArea, virtual public KNodeIface
{
Q_OBJECT
public:
- KNMainWidget( KXMLGUIClient *client, bool detachable, QWidget* parent, const char* name );
+ KNMainWidget( KXMLGUIClient *client, bool detachable, TQWidget* parent, const char* name );
~KNMainWidget();
/** exit */
@@ -72,8 +72,8 @@ public:
void prepareShutdown();
//GUI
- void setStatusMsg(const QString& = QString::null, int id=SB_MAIN);
- void setStatusHelpMsg(const QString& text);
+ void setStatusMsg(const TQString& = TQString::null, int id=SB_MAIN);
+ void setStatusHelpMsg(const TQString& text);
void updateCaption();
void setCursorBusy(bool b=true);
void blockUI(bool b=true);
@@ -82,7 +82,7 @@ public:
void secureProcessEvents();
/** useful default value */
- virtual QSize sizeHint() const;
+ virtual TQSize sizeHint() const;
/** handle URL given as command-line argument */
void openURL(const KURL &url);
@@ -155,7 +155,7 @@ public:
//end dcop interface
signals:
- void signalCaptionChangeRequest( const QString& );
+ void signalCaptionChangeRequest( const TQString& );
protected:
@@ -173,19 +173,19 @@ protected:
bool requestShutdown();
- virtual void showEvent(QShowEvent *);
+ virtual void showEvent(TQShowEvent *);
/** update appearance */
- virtual void fontChange( const QFont & );
- virtual void paletteChange ( const QPalette & );
+ virtual void fontChange( const TQFont & );
+ virtual void paletteChange ( const TQPalette & );
- bool eventFilter(QObject *, QEvent *);
+ bool eventFilter(TQObject *, TQEvent *);
// convenience methods...
- void getSelectedArticles( QValueList<KNArticle*> &l );
- void getSelectedArticles( QValueList<KNRemoteArticle*> &l );
- void getSelectedThreads( QValueList<KNRemoteArticle*> &l );
- void getSelectedArticles( QValueList<KNLocalArticle*> &l );
+ void getSelectedArticles( TQValueList<KNArticle*> &l );
+ void getSelectedArticles( TQValueList<KNRemoteArticle*> &l );
+ void getSelectedThreads( TQValueList<KNRemoteArticle*> &l );
+ void getSelectedArticles( TQValueList<KNLocalArticle*> &l );
void closeCurrentThread();
//GUI
@@ -197,7 +197,7 @@ protected:
KDockWidget *c_olDock, *h_drDock, *a_rtDock;
bool b_lockui;
KToolBar *q_uicksearch;
- QLineEdit *s_earchLineEdit;
+ TQLineEdit *s_earchLineEdit;
//Core
KNConfigManager *c_fgManager;
@@ -214,15 +214,15 @@ protected:
protected slots:
//listview slots
- void slotArticleSelected(QListViewItem*);
+ void slotArticleSelected(TQListViewItem*);
void slotArticleSelectionChanged();
- void slotCollectionSelected(QListViewItem*);
- void slotCollectionRenamed(QListViewItem*);
- void slotCollectionViewDrop(QDropEvent* e, KNCollectionViewItem* after);
- void slotArticleRMB(KListView*, QListViewItem *i, const QPoint &p);
- void slotCollectionRMB(KListView*, QListViewItem *i, const QPoint &p);
+ void slotCollectionSelected(TQListViewItem*);
+ void slotCollectionRenamed(TQListViewItem*);
+ void slotCollectionViewDrop(TQDropEvent* e, KNCollectionViewItem* after);
+ void slotArticleRMB(KListView*, TQListViewItem *i, const TQPoint &p);
+ void slotCollectionRMB(KListView*, TQListViewItem *i, const TQPoint &p);
/** Open selected article in own composer/reader window */
- void slotOpenArticle(QListViewItem *item);
+ void slotOpenArticle(TQListViewItem *item);
void slotHdrViewSortingChanged(int i);
//network slots
@@ -233,7 +233,7 @@ protected slots:
void slotGroupDockHidden();
void slotHeaderDockHidden();
void slotArticleDockHidden();
- void slotDockWidgetFocusChangeRequest(QWidget *w);
+ void slotDockWidgetFocusChangeRequest(TQWidget *w);
//---------------------------------- <Actions> ----------------------------------
@@ -414,11 +414,11 @@ class FetchArticleIdDlg : public KDialogBase
{
Q_OBJECT
public:
- FetchArticleIdDlg(QWidget *parent, const char */*name*/ );
- QString messageId() const;
+ FetchArticleIdDlg(TQWidget *parent, const char */*name*/ );
+ TQString messageId() const;
protected slots:
- void slotTextChanged(const QString & );
+ void slotTextChanged(const TQString & );
protected:
KLineEdit *edit;
};
diff --git a/knode/knmemorymanager.cpp b/knode/knmemorymanager.cpp
index 283bcf546..37a639287 100644
--- a/knode/knmemorymanager.cpp
+++ b/knode/knmemorymanager.cpp
@@ -31,9 +31,9 @@ KNMemoryManager::KNMemoryManager()
KNMemoryManager::~KNMemoryManager()
{
- for ( QValueList<CollectionItem*>::Iterator it = mColList.begin(); it != mColList.end(); ++it )
+ for ( TQValueList<CollectionItem*>::Iterator it = mColList.begin(); it != mColList.end(); ++it )
delete (*it);
- for ( QValueList<ArticleItem*>::Iterator it = mArtList.begin(); it != mArtList.end(); ++it )
+ for ( TQValueList<ArticleItem*>::Iterator it = mArtList.begin(); it != mArtList.end(); ++it )
delete (*it);
}
@@ -122,7 +122,7 @@ void KNMemoryManager::removeCacheEntry(KNArticle *a)
KNMemoryManager::CollectionItem* KNMemoryManager::findCacheEntry(KNArticleCollection *c, bool take)
{
- for ( QValueList<CollectionItem*>::Iterator it = mColList.begin(); it != mColList.end(); ++it ) {
+ for ( TQValueList<CollectionItem*>::Iterator it = mColList.begin(); it != mColList.end(); ++it ) {
if ( (*it)->col == c ) {
CollectionItem *ret = (*it);
if ( take )
@@ -137,7 +137,7 @@ KNMemoryManager::CollectionItem* KNMemoryManager::findCacheEntry(KNArticleCollec
KNMemoryManager::ArticleItem* KNMemoryManager::findCacheEntry(KNArticle *a, bool take)
{
- for ( QValueList<ArticleItem*>::Iterator it = mArtList.begin(); it != mArtList.end(); ++it ) {
+ for ( TQValueList<ArticleItem*>::Iterator it = mArtList.begin(); it != mArtList.end(); ++it ) {
if ( (*it)->art == a ) {
ArticleItem *ret = (*it);
if ( take )
@@ -156,10 +156,10 @@ void KNMemoryManager::checkMemoryUsageCollections()
KNArticleCollection *c=0;
if (c_ollCacheSize > maxSize) {
- QValueList<CollectionItem*> tempList( mColList ); // work on a copy, KNGroup-/Foldermanager will
+ TQValueList<CollectionItem*> tempList( mColList ); // work on a copy, KNGroup-/Foldermanager will
// modify the original list
- for ( QValueList<CollectionItem*>::Iterator it = tempList.begin(); it != tempList.end(); ) {
+ for ( TQValueList<CollectionItem*>::Iterator it = tempList.begin(); it != tempList.end(); ) {
if ( c_ollCacheSize <= maxSize )
break;
// unloadHeaders() will remove the cache entry and thus invalidate the iterator!
@@ -185,10 +185,10 @@ void KNMemoryManager::checkMemoryUsageArticles()
int maxSize = knGlobals.configManager()->readNewsGeneral()->artCacheSize() * 1024;
if (a_rtCacheSize > maxSize) {
- QValueList<ArticleItem*> tempList( mArtList ); // work on a copy, KNArticlemanager will
+ TQValueList<ArticleItem*> tempList( mArtList ); // work on a copy, KNArticlemanager will
// modify the original list
- for ( QValueList<ArticleItem*>::Iterator it = mArtList.begin(); it != mArtList.end(); ) {
+ for ( TQValueList<ArticleItem*>::Iterator it = mArtList.begin(); it != mArtList.end(); ) {
if ( a_rtCacheSize <= maxSize )
break;
// unloadArticle() will remove the cache entry and thus invalidate the iterator!
diff --git a/knode/knmemorymanager.h b/knode/knmemorymanager.h
index a9a79d9cf..71d222425 100644
--- a/knode/knmemorymanager.h
+++ b/knode/knmemorymanager.h
@@ -15,8 +15,8 @@
#ifndef KNMEMORYMANAGER_H
#define KNMEMORYMANAGER_H
-#include <qglobal.h>
-#include <qvaluelist.h>
+#include <tqglobal.h>
+#include <tqvaluelist.h>
class KNArticle;
class KNArticleCollection;
@@ -65,8 +65,8 @@ class KNMemoryManager {
void checkMemoryUsageCollections();
void checkMemoryUsageArticles();
- QValueList<CollectionItem*> mColList;
- QValueList<ArticleItem*> mArtList;
+ TQValueList<CollectionItem*> mColList;
+ TQValueList<ArticleItem*> mArtList;
int c_ollCacheSize, a_rtCacheSize;
};
diff --git a/knode/knnetaccess.cpp b/knode/knnetaccess.cpp
index 65b43e7a5..7fc6fd371 100644
--- a/knode/knnetaccess.cpp
+++ b/knode/knnetaccess.cpp
@@ -15,7 +15,7 @@
#include <unistd.h>
#include <fcntl.h>
-#include <qsocketnotifier.h>
+#include <tqsocketnotifier.h>
#include <klocale.h>
#include <kmessagebox.h>
@@ -37,8 +37,8 @@
using KPIM::ProgressManager;
-KNNetAccess::KNNetAccess(QObject *parent, const char *name )
- : QObject(parent,name), currentNntpJob(0), currentSmtpJob(0)
+KNNetAccess::KNNetAccess(TQObject *parent, const char *name )
+ : TQObject(parent,name), currentNntpJob(0), currentSmtpJob(0)
{
if ( pipe(nntpInPipe) == -1 || pipe(nntpOutPipe) == -1 ) {
KMessageBox::error(knGlobals.topWidget, i18n("Internal error:\nFailed to open pipes for internal communication."));
@@ -50,8 +50,8 @@ KNNetAccess::KNNetAccess(QObject *parent, const char *name )
kapp->exit(1);
}
- nntpNotifier=new QSocketNotifier(nntpInPipe[0], QSocketNotifier::Read);
- connect(nntpNotifier, SIGNAL(activated(int)), this, SLOT(slotThreadSignal(int)));
+ nntpNotifier=new TQSocketNotifier(nntpInPipe[0], TQSocketNotifier::Read);
+ connect(nntpNotifier, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotThreadSignal(int)));
// initialize the KSocks stuff in the main thread, otherwise we get
// strange effects on FreeBSD
@@ -60,14 +60,14 @@ KNNetAccess::KNNetAccess(QObject *parent, const char *name )
nntpClient=new KNNntpClient(nntpOutPipe[0],nntpInPipe[1],nntp_Mutex);
nntpClient->start();
- connect( knGlobals.accountManager(), SIGNAL(passwordsChanged()), SLOT(slotPasswordsChanged()) );
+ connect( knGlobals.accountManager(), TQT_SIGNAL(passwordsChanged()), TQT_SLOT(slotPasswordsChanged()) );
}
KNNetAccess::~KNNetAccess()
{
- disconnect(nntpNotifier, SIGNAL(activated(int)), this, SLOT(slotThreadSignal(int)));
+ disconnect(nntpNotifier, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotThreadSignal(int)));
nntpClient->terminateClient();
triggerAsyncThread(nntpOutPipe[1]);
@@ -95,7 +95,7 @@ void KNNetAccess::addJob(KNJobData *job)
}
job->createProgressItem();
- connect( job->progressItem(), SIGNAL(progressItemCanceled(KPIM::ProgressItem*)), SLOT(slotCancelJob(KPIM::ProgressItem*)) );
+ connect( job->progressItem(), TQT_SIGNAL(progressItemCanceled(KPIM::ProgressItem*)), TQT_SLOT(slotCancelJob(KPIM::ProgressItem*)) );
emit netActive( true );
// put jobs which are waiting for the wallet into an extra queue
@@ -120,7 +120,7 @@ void KNNetAccess::addJob(KNJobData *job)
// avoid duplicate fetchNewHeader jobs...
bool duplicate = false;
if ( job->type() == KNJobData::JTfetchNewHeaders || job->type() == KNJobData::JTsilentFetchNewHeaders ) {
- QValueList<KNJobData*>::ConstIterator it;
+ TQValueList<KNJobData*>::ConstIterator it;
for ( it = nntpJobQueue.begin(); it != nntpJobQueue.end(); ++it ) {
if ( ( (*it)->type() == KNJobData::JTfetchNewHeaders || (*it)->type() == KNJobData::JTsilentFetchNewHeaders )
&& (*it)->data() == job->data() ) // job works on the same group...
@@ -159,7 +159,7 @@ void KNNetAccess::stopJobsNntp( int type )
{
cancelCurrentNntpJob( type );
KNJobData *tmp = 0;
- QValueList<KNJobData*>::Iterator it;
+ TQValueList<KNJobData*>::Iterator it;
for ( it = nntpJobQueue.begin(); it != nntpJobQueue.end();) {
tmp = *it;
if ( type == 0 || tmp->type() == type ) {
@@ -197,7 +197,7 @@ void KNNetAccess::stopJobsSmtp( int type )
{
cancelCurrentSmtpJob( type );
KNJobData *tmp = 0;
- QValueList<KNJobData*>::Iterator it;
+ TQValueList<KNJobData*>::Iterator it;
for ( it = smtpJobQueue.begin(); it != smtpJobQueue.end();) {
tmp = *it;
if ( type == 0 || tmp->type() == type ) {
@@ -253,9 +253,9 @@ void KNNetAccess::startJobSmtp()
if (currentSmtpJob->success()) {
KNLocalArticle *art = static_cast<KNLocalArticle*>( currentSmtpJob->data() );
// create url query part
- QString query("headers=0&from=");
+ TQString query("headers=0&from=");
query += KURL::encode_string( art->from()->email() );
- QStrList emails;
+ TQStrList emails;
art->to()->emails( &emails );
for ( char *e = emails.first(); e; e = emails.next() ) {
query += "&to=" + KURL::encode_string( e );
@@ -275,8 +275,8 @@ void KNNetAccess::startJobSmtp()
destination.setPass( account->pass() );
}
KIO::Job* job = KIO::storedPut( art->encodedContent(true), destination, -1, false, false, false );
- connect( job, SIGNAL( result(KIO::Job*) ),
- SLOT( slotJobResult(KIO::Job*) ) );
+ connect( job, TQT_SIGNAL( result(KIO::Job*) ),
+ TQT_SLOT( slotJobResult(KIO::Job*) ) );
if ( account->encryption() == KNServerInfo::TLS )
job->addMetaData( "tls", "on" );
else
@@ -307,8 +307,8 @@ void KNNetAccess::threadDoneNntp()
kdDebug(5003) << "KNNetAccess::threadDoneNntp(): authentication error" << endl;
KNServerInfo *info = tmp->account();
if (info) {
- QString user = info->user();
- QString pass = info->pass();
+ TQString user = info->user();
+ TQString pass = info->pass();
bool keep=false;
if (KDialog::Accepted == KIO::PasswordDialog::getNameAndPassword(user, pass, &keep,
i18n("You need to supply a username and a\npassword to access this server"), false,
@@ -317,7 +317,7 @@ void KNNetAccess::threadDoneNntp()
info->setUser(user);
info->setPass(pass);
tmp->setAuthError(false);
- tmp->setErrorString(QString::null);
+ tmp->setErrorString(TQString::null);
kdDebug(5003) << "KNNetAccess::threadDoneNntp(): trying again with authentication data" << endl;
@@ -331,7 +331,7 @@ void KNNetAccess::threadDoneNntp()
nntpClient->removeJob();
currentNntpJob = 0L;
- currMsg = QString::null;
+ currMsg = TQString::null;
knGlobals.setStatusMsg();
tmp->setComplete();
@@ -358,7 +358,7 @@ void KNNetAccess::threadDoneSmtp()
tmp = currentSmtpJob;
currentSmtpJob = 0L;
if (!currentNntpJob) {
- currMsg = QString::null;
+ currMsg = TQString::null;
knGlobals.setStatusMsg();
}
tmp->setComplete();
@@ -383,7 +383,7 @@ void KNNetAccess::cancelAllJobs()
void KNNetAccess::slotThreadSignal(int i)
{
int signal;
- QString tmp;
+ TQString tmp;
//kdDebug(5003) << "KNNetAccess::slotThreadSignal() : signal received from net thread" << endl;
if(read(i, &signal, sizeof(int))==-1) {
@@ -475,7 +475,7 @@ void KNNetAccess::slotJobResult( KIO::Job *job )
void KNNetAccess::slotPasswordsChanged()
{
- QValueList<KNJobData*>::ConstIterator it;
+ TQValueList<KNJobData*>::ConstIterator it;
for ( it = mWalletQueue.begin(); it != mWalletQueue.end(); ++it ) {
(*it)->setStatus( i18n("Waiting...") );
if ( (*it)->type() == KNJobData::JTmail )
@@ -494,7 +494,7 @@ void KNNetAccess::slotPasswordsChanged()
void KNNetAccess::slotCancelJob( KPIM::ProgressItem *item )
{
KNJobData *tmp = 0;
- QValueList<KNJobData*>::Iterator it;
+ TQValueList<KNJobData*>::Iterator it;
for ( it = nntpJobQueue.begin(); it != nntpJobQueue.end();) {
tmp = *it;
if ( tmp->progressItem() == item ) {
diff --git a/knode/knnetaccess.h b/knode/knnetaccess.h
index 02450b9c7..e86f4a9cb 100644
--- a/knode/knnetaccess.h
+++ b/knode/knnetaccess.h
@@ -15,9 +15,9 @@
#ifndef KNNETACCESS_H
#define KNNETACCESS_H
-#include <qobject.h>
-#include <qmutex.h>
-#include <qvaluelist.h>
+#include <tqobject.h>
+#include <tqmutex.h>
+#include <tqvaluelist.h>
class QSocketNotifier;
@@ -34,13 +34,13 @@ class KNJobData;
class KNNntpClient;
-class KNNetAccess : public QObject {
+class KNNetAccess : public TQObject {
Q_OBJECT
public:
- KNNetAccess(QObject *parent=0, const char *name=0);
+ KNNetAccess(TQObject *parent=0, const char *name=0);
~KNNetAccess();
void addJob(KNJobData *job);
@@ -51,9 +51,9 @@ class KNNetAccess : public QObject {
void cancelAllJobs();
/** current statusbar message */
- QString currentMsg() const { return currMsg; }
+ TQString currentMsg() const { return currMsg; }
- QMutex& nntpMutex() { return nntp_Mutex; }
+ TQMutex& nntpMutex() { return nntp_Mutex; }
protected:
/** passes a signal through the ipc-pipe to the net-thread */
@@ -65,14 +65,14 @@ class KNNetAccess : public QObject {
/** stores the current status message,
so that it can be restored by the mainwindow */
- QString currMsg;
+ TQString currMsg;
KNNntpClient *nntpClient;
- QValueList<KNJobData*> nntpJobQueue, smtpJobQueue;
+ TQValueList<KNJobData*> nntpJobQueue, smtpJobQueue;
KNJobData *currentNntpJob, *currentSmtpJob;
- QMutex nntp_Mutex;
+ TQMutex nntp_Mutex;
int nntpInPipe[2], nntpOutPipe[2];
- QSocketNotifier *nntpNotifier;
+ TQSocketNotifier *nntpNotifier;
protected slots:
void slotThreadSignal(int i);
@@ -95,7 +95,7 @@ class KNNetAccess : public QObject {
private:
/// jobs waiting for async wallet loading
- QValueList<KNJobData*> mWalletQueue;
+ TQValueList<KNJobData*> mWalletQueue;
};
diff --git a/knode/knnntpaccount.cpp b/knode/knnntpaccount.cpp
index 22ff904b2..ba1657c0c 100644
--- a/knode/knnntpaccount.cpp
+++ b/knode/knnntpaccount.cpp
@@ -45,8 +45,8 @@ void KNNntpAccountIntervalChecking::installTimer()
if (a_ccount->checkInterval() <= 0) return;
if(!t_imer)
{
- t_imer = new QTimer();
- connect(t_imer,SIGNAL(timeout()),this,SLOT(slotCheckNews()));
+ t_imer = new TQTimer();
+ connect(t_imer,TQT_SIGNAL(timeout()),this,TQT_SLOT(slotCheckNews()));
}
else
{
@@ -75,7 +75,7 @@ void KNNntpAccountIntervalChecking::slotCheckNews()
KNNntpAccount::KNNntpAccount()
: KNCollection(0), KNServerInfo(), i_dentity(0), f_etchDescriptions(true), w_asOpen(false), i_ntervalChecking(false), c_heckInterval(10)
{
- l_astNewFetch = QDate::currentDate();
+ l_astNewFetch = TQDate::currentDate();
a_ccountIntervalChecking = new KNNntpAccountIntervalChecking(this);
mCleanupConf = new KNConfig::Cleanup( false );
}
@@ -90,7 +90,7 @@ KNNntpAccount::~KNNntpAccount()
// tries to read information, returns false if it fails to do so
-bool KNNntpAccount::readInfo(const QString &confPath)
+bool KNNntpAccount::readInfo(const TQString &confPath)
{
KSimpleConfig conf(confPath);
@@ -109,7 +109,7 @@ bool KNNntpAccount::readInfo(const QString &confPath)
i_dentity=new KNConfig::Identity(false);
i_dentity->loadConfig(&conf);
if(!i_dentity->isEmpty()) {
- kdDebug(5003) << "KNGroup::readInfo(const QString &confPath) : using alternative user for " << n_ame << endl;
+ kdDebug(5003) << "KNGroup::readInfo(const TQString &confPath) : using alternative user for " << n_ame << endl;
} else {
delete i_dentity;
i_dentity=0;
@@ -126,7 +126,7 @@ bool KNNntpAccount::readInfo(const QString &confPath)
void KNNntpAccount::saveInfo()
{
- QString dir(path());
+ TQString dir(path());
if (dir.isNull())
return;
@@ -135,7 +135,7 @@ void KNNntpAccount::saveInfo()
conf.writeEntry("name", n_ame);
//conf.writeEntry("unsentCnt", u_nsentCount);
conf.writeEntry("fetchDescriptions", f_etchDescriptions);
- conf.writeEntry("lastNewFetch", QDateTime(l_astNewFetch));
+ conf.writeEntry("lastNewFetch", TQDateTime(l_astNewFetch));
if(l_istItem)
conf.writeEntry("listItemOpen", l_istItem->isOpen());
conf.writeEntry("useDiskCache", u_seDiskCache);
@@ -164,7 +164,7 @@ void KNNntpAccount::saveInfo()
/*void KNNntpAccount::syncInfo()
{
- QString dir(path());
+ TQString dir(path());
if (dir.isNull())
return;
KSimpleConfig conf(dir+"info");
@@ -172,16 +172,16 @@ void KNNntpAccount::saveInfo()
}*/
-QString KNNntpAccount::path()
+TQString KNNntpAccount::path()
{
- QString dir(locateLocal("data","knode/")+QString("nntp.%1/").arg(i_d));
+ TQString dir(locateLocal("data","knode/")+TQString("nntp.%1/").arg(i_d));
if (dir.isNull())
KNHelper::displayInternalFileError();
return (dir);
}
-bool KNNntpAccount::editProperties(QWidget *parent)
+bool KNNntpAccount::editProperties(TQWidget *parent)
{
if(!i_dentity) i_dentity=new KNConfig::Identity(false);
KNConfig::NntpAccountConfDialog *d = new KNConfig::NntpAccountConfDialog(this, parent);
diff --git a/knode/knnntpaccount.h b/knode/knnntpaccount.h
index 4c7694ff6..611339191 100644
--- a/knode/knnntpaccount.h
+++ b/knode/knnntpaccount.h
@@ -17,12 +17,12 @@
#ifndef KNNNTPACCOUNT_H
#define KNNNTPACCOUNT_H
-#include <qdatetime.h>
+#include <tqdatetime.h>
#include "kncollection.h"
#include "knserverinfo.h"
-#include <qobject.h>
-#include <qtimer.h>
+#include <tqobject.h>
+#include <tqtimer.h>
class KNNntpAccount;
@@ -32,7 +32,7 @@ namespace KNConfig {
}
-class KNNntpAccountIntervalChecking : public QObject {
+class KNNntpAccountIntervalChecking : public TQObject {
Q_OBJECT
@@ -43,7 +43,7 @@ class KNNntpAccountIntervalChecking : public QObject {
void deinstallTimer();
protected:
- QTimer *t_imer;
+ TQTimer *t_imer;
KNNntpAccount *a_ccount;
protected slots:
@@ -60,19 +60,19 @@ class KNNntpAccount : public KNCollection , public KNServerInfo {
collectionType type() { return CTnntpAccount; }
/** tries to read information, returns false if it fails to do so */
- bool readInfo(const QString &confPath);
+ bool readInfo(const TQString &confPath);
void saveInfo();
//void syncInfo();
- QString path();
+ TQString path();
/** returns true when the user accepted */
- bool editProperties(QWidget *parent);
+ bool editProperties(TQWidget *parent);
// news interval checking
void startTimer();
//get
bool fetchDescriptions() const { return f_etchDescriptions; }
- QDate lastNewFetch() const { return l_astNewFetch; }
+ TQDate lastNewFetch() const { return l_astNewFetch; }
bool wasOpen() const { return w_asOpen; }
bool useDiskCache() const { return u_seDiskCache; }
KNConfig::Identity* identity() const { return i_dentity; }
@@ -85,7 +85,7 @@ class KNNntpAccount : public KNCollection , public KNServerInfo {
//set
void setFetchDescriptions(bool b) { f_etchDescriptions = b; }
- void setLastNewFetch(QDate date) { l_astNewFetch = date; }
+ void setLastNewFetch(TQDate date) { l_astNewFetch = date; }
void setUseDiskCache(bool b) { u_seDiskCache=b; }
void setCheckInterval(int c);
void setIntervalChecking(bool b) { i_ntervalChecking=b; }
@@ -98,7 +98,7 @@ class KNNntpAccount : public KNCollection , public KNServerInfo {
/** use an additional "list newsgroups" command to fetch the newsgroup descriptions */
bool f_etchDescriptions;
/** last use of "newgroups" */
- QDate l_astNewFetch;
+ TQDate l_astNewFetch;
/** was the server open in the listview on the last shutdown? */
bool w_asOpen;
/** cache fetched articles on disk */
@@ -107,7 +107,7 @@ class KNNntpAccount : public KNCollection , public KNServerInfo {
bool i_ntervalChecking;
int c_heckInterval;
- /** helper class for news interval checking, manages the QTimer */
+ /** helper class for news interval checking, manages the TQTimer */
KNNntpAccountIntervalChecking *a_ccountIntervalChecking;
};
diff --git a/knode/knnntpclient.cpp b/knode/knnntpclient.cpp
index 2c594be34..47942d6b3 100644
--- a/knode/knnntpclient.cpp
+++ b/knode/knnntpclient.cpp
@@ -16,15 +16,15 @@
#include <stdlib.h>
#include <klocale.h>
-#include <qtextcodec.h>
-#include <qmutex.h>
+#include <tqtextcodec.h>
+#include <tqmutex.h>
#include "kngroupmanager.h"
#include "knnntpclient.h"
#include "utilities.h"
-KNNntpClient::KNNntpClient(int NfdPipeIn, int NfdPipeOut, QMutex& nntpMutex)
+KNNntpClient::KNNntpClient(int NfdPipeIn, int NfdPipeOut, TQMutex& nntpMutex)
: KNProtocolClient(NfdPipeIn,NfdPipeOut), mutex(nntpMutex)
{}
@@ -92,7 +92,7 @@ void KNNntpClient::doFetchGroups()
return;
char *s, *line;
- QString name;
+ TQString name;
KNGroup::Status status;
bool subscribed;
@@ -113,7 +113,7 @@ void KNNntpClient::doFetchGroups()
} else {
s[0] = 0; // cut string
- name = QString::fromUtf8(line);
+ name = TQString::fromUtf8(line);
if (target->subscribed.contains(name)) {
target->subscribed.remove(name); // group names are unique, we wont find it again anyway...
@@ -132,7 +132,7 @@ void KNNntpClient::doFetchGroups()
default : status = KNGroup::unknown;
}
- target->groups->append(new KNGroupInfo(name,QString::null,false,subscribed,status));
+ target->groups->append(new KNGroupInfo(name,TQString::null,false,subscribed,status));
}
doneLines++;
}
@@ -158,7 +158,7 @@ void KNNntpClient::doFetchGroups()
return;
if (rep == 215) { // 215 informations follows
- QString description;
+ TQString description;
KNGroupInfo info;
int pos;
@@ -182,11 +182,11 @@ void KNNntpClient::doFetchGroups()
s++;
while (*s == ' ' || *s == '\t') s++; // go on to the description
- name = QString::fromUtf8(line);
+ name = TQString::fromUtf8(line);
if (target->codecForDescriptions) // some countries use local 8 bit characters in the tag line
description = target->codecForDescriptions->toUnicode(s);
else
- description = QString::fromLocal8Bit(s);
+ description = TQString::fromLocal8Bit(s);
info.name = name;
if ((pos=tempVector.bsearch(&info))!=-1)
@@ -221,15 +221,15 @@ void KNNntpClient::doCheckNewGroups()
progressValue = 100;
predictedLines = 30; // rule of thumb ;-)
- QCString cmd;
+ TQCString cmd;
cmd.sprintf("NEWGROUPS %.2d%.2d%.2d 000000",target->fetchSince.year()%100,target->fetchSince.month(),target->fetchSince.day());
if (!sendCommandWCheck(cmd,231)) // 231 list of new newsgroups follows
return;
char *s, *line;
- QString name;
+ TQString name;
KNGroup::Status status;
- QSortedList<KNGroupInfo> tmpList;
+ TQSortedList<KNGroupInfo> tmpList;
tmpList.setAutoDelete(true);
while (getNextLine()) {
@@ -248,7 +248,7 @@ void KNNntpClient::doCheckNewGroups()
#endif
} else {
s[0] = 0; // cut string
- name = QString::fromUtf8(line);
+ name = TQString::fromUtf8(line);
while (s[1]!=0) s++; // the last character determines the moderation status
switch (s[0]) {
@@ -261,7 +261,7 @@ void KNNntpClient::doCheckNewGroups()
default : status = KNGroup::unknown;
}
- tmpList.append(new KNGroupInfo(name,QString::null,true,false,status));
+ tmpList.append(new KNGroupInfo(name,TQString::null,true,false,status));
}
doneLines++;
}
@@ -279,7 +279,7 @@ void KNNntpClient::doCheckNewGroups()
sendSignal(TSprogressUpdate);
cmd = "LIST NEWSGROUPS ";
- QStrList desList;
+ TQStrList desList;
char *s;
int rep;
@@ -304,7 +304,7 @@ void KNNntpClient::doCheckNewGroups()
if (target->codecForDescriptions) // some countries use local 8 bit characters in the tag line
group->description = target->codecForDescriptions->toUnicode(s);
else
- group->description = QString::fromLocal8Bit(s);
+ group->description = TQString::fromLocal8Bit(s);
}
}
}
@@ -330,7 +330,7 @@ void KNNntpClient::doFetchNewHeaders()
KNGroup* target=static_cast<KNGroup*>(job->data());
char* s;
int first=0, last=0, oldlast=0, toFetch=0, rep=0;
- QCString cmd;
+ TQCString cmd;
target->setLastFetchCount(0);
@@ -362,7 +362,7 @@ void KNNntpClient::doFetchNewHeaders()
if (s) {
last=atoi(s);
} else {
- QString tmp=i18n("No new articles could be retrieved.\nThe server sent a malformatted response:\n");
+ TQString tmp=i18n("No new articles could be retrieved.\nThe server sent a malformatted response:\n");
tmp+=getCurrentLine();
job->setErrorString(tmp);
closeConnection();
@@ -396,12 +396,12 @@ void KNNntpClient::doFetchNewHeaders()
// get list of additional headers provided by the XOVER command
// see RFC 2980 section 2.1.7
- QStrList headerformat;
+ TQStrList headerformat;
cmd = "LIST OVERVIEW.FMT";
if ( sendCommand( cmd, rep ) && rep == 215 ) {
- QStrList tmp;
+ TQStrList tmp;
if (getMsg(tmp)) {
- for(QCString s = tmp.first(); s; s = tmp.next()) {
+ for(TQCString s = tmp.first(); s; s = tmp.next()) {
s = s.stripWhiteSpace();
// remove the mandatory xover header
if (s == "Subject:" || s == "From:" || s == "Date:" || s == "Message-ID:"
@@ -427,7 +427,7 @@ void KNNntpClient::doFetchNewHeaders()
return;
}
- QStrList headers;
+ TQStrList headers;
if (!getMsg(headers)) {
return;
}
@@ -447,7 +447,7 @@ void KNNntpClient::doFetchNewHeaders()
void KNNntpClient::doFetchArticle()
{
KNRemoteArticle *target = static_cast<KNRemoteArticle*>(job->data());
- QCString cmd;
+ TQCString cmd;
sendSignal(TSdownloadArticle);
errorPrefix = i18n("Article could not be retrieved.\nThe following error occurred:\n");
@@ -456,7 +456,7 @@ void KNNntpClient::doFetchArticle()
predictedLines = target->lines()->numberOfLines()+10;
if (target->collection()) {
- QString groupName = static_cast<KNGroup*>(target->collection())->groupname();
+ TQString groupName = static_cast<KNGroup*>(target->collection())->groupname();
if (currentGroup != groupName) {
cmd="GROUP ";
cmd+=groupName.utf8();
@@ -476,7 +476,7 @@ void KNNntpClient::doFetchArticle()
if (!sendCommandWCheck(cmd,220)) { // 220 n <a> article retrieved - head and body follow
int code = atoi(getCurrentLine());
if ( code == 430 || code == 423 ) { // 430 no such article found || 423 no such article number in this group
- QString msgId = target->messageID()->as7BitString( false );
+ TQString msgId = target->messageID()->as7BitString( false );
// strip of '<' and '>'
msgId = msgId.mid( 1, msgId.length() - 2 );
job->setErrorString( errorPrefix + getCurrentLine() +
@@ -487,7 +487,7 @@ void KNNntpClient::doFetchArticle()
return;
}
- QStrList msg;
+ TQStrList msg;
if (!getMsg(msg))
return;
@@ -507,7 +507,7 @@ void KNNntpClient::doPostArticle()
if (art->messageID(false)!=0) {
int rep;
- if (!sendCommand(QCString("STAT ")+art->messageID(false)->as7BitString(false),rep))
+ if (!sendCommand(TQCString("STAT ")+art->messageID(false)->as7BitString(false),rep))
return;
if (rep==223) { // 223 n <a> article retrieved - request text separately
@@ -522,8 +522,8 @@ void KNNntpClient::doPostArticle()
return;
if (art->messageID(false)==0) { // article has no message ID => search for a ID in the response
- QCString s = getCurrentLine();
- int start = s.findRev(QRegExp("<[^\\s]*@[^\\s]*>"));
+ TQCString s = getCurrentLine();
+ int start = s.findRev(TQRegExp("<[^\\s]*@[^\\s]*>"));
if (start != -1) { // post response includes a recommended id
int end = s.find('>',start);
art->messageID()->from7BitString(s.mid(start,end-start+1));
@@ -552,11 +552,11 @@ void KNNntpClient::doFetchSource()
progressValue = 100;
predictedLines = target->lines()->numberOfLines()+10;
- QCString cmd = "ARTICLE " + target->messageID()->as7BitString(false);
+ TQCString cmd = "ARTICLE " + target->messageID()->as7BitString(false);
if (!sendCommandWCheck(cmd,220)) // 220 n <a> article retrieved - head and body follow
return;
- QStrList msg;
+ TQStrList msg;
if (!getMsg(msg))
return;
@@ -569,9 +569,9 @@ void KNNntpClient::doFetchSource()
bool KNNntpClient::openConnection()
{
- currentGroup = QString::null;
+ currentGroup = TQString::null;
- QString oldPrefix = errorPrefix;
+ TQString oldPrefix = errorPrefix;
errorPrefix=i18n("Unable to connect.\nThe following error occurred:\n");
if (!KNProtocolClient::openConnection())
@@ -609,7 +609,7 @@ bool KNNntpClient::openConnection()
if (account.needsLogon() && !account.user().isEmpty()) {
//qDebug("knode: user: %s",account.user().latin1());
- QCString command = "AUTHINFO USER ";
+ TQCString command = "AUTHINFO USER ";
command += account.user().local8Bit();
if (!KNProtocolClient::sendCommand(command,rep))
return false;
@@ -669,7 +669,7 @@ bool KNNntpClient::openConnection()
// authentication on demand
-bool KNNntpClient::sendCommand(const QCString &cmd, int &rep)
+bool KNNntpClient::sendCommand(const TQCString &cmd, int &rep)
{
if (!KNProtocolClient::sendCommand(cmd,rep))
return false;
@@ -686,7 +686,7 @@ bool KNNntpClient::sendCommand(const QCString &cmd, int &rep)
//qDebug("knode: user: %s",account.user().data());
- QCString command = "AUTHINFO USER ";
+ TQCString command = "AUTHINFO USER ";
command += account.user().local8Bit();
if (!KNProtocolClient::sendCommand(command,rep))
return false;
diff --git a/knode/knnntpclient.h b/knode/knnntpclient.h
index 274c12271..14ecff359 100644
--- a/knode/knnntpclient.h
+++ b/knode/knnntpclient.h
@@ -17,7 +17,7 @@
#ifndef KNNNTPCLIENT_H
#define KNNNTPCLIENT_H
-#include <qmutex.h>
+#include <tqmutex.h>
#include <knprotocolclient.h>
@@ -26,7 +26,7 @@ class KNNntpClient : public KNProtocolClient {
public:
- KNNntpClient(int NfdPipeIn, int NfdPipeOut, QMutex& nntpMutex);
+ KNNntpClient(int NfdPipeIn, int NfdPipeOut, TQMutex& nntpMutex);
~KNNntpClient();
protected:
@@ -45,12 +45,12 @@ class KNNntpClient : public KNProtocolClient {
/** connect, handshake */
virtual bool openConnection();
/** authentication on demand */
- virtual bool sendCommand(const QCString &cmd, int &rep);
+ virtual bool sendCommand(const TQCString &cmd, int &rep);
virtual void handleErrors();
- bool switchToGroup(const QString &newGroup);
+ bool switchToGroup(const TQString &newGroup);
- QString currentGroup;
- QMutex& mutex;
+ TQString currentGroup;
+ TQMutex& mutex;
};
diff --git a/knode/knode.cpp b/knode/knode.cpp
index 0dd4e6a38..c2d7ee7f6 100644
--- a/knode/knode.cpp
+++ b/knode/knode.cpp
@@ -38,7 +38,7 @@
#include "kncollectionviewitem.h"
#include "knhdrviewitem.h"
-KNMainWindow::KNMainWindow( QWidget* pWidget )
+KNMainWindow::KNMainWindow( TQWidget* pWidget )
: KMainWindow(pWidget,"mainWindow")
{
//setupStatusBar();
@@ -46,17 +46,17 @@ KNMainWindow::KNMainWindow( QWidget* pWidget )
setStandardToolBarMenuEnabled(true);
//config stuff
- KStdAction::quit(kapp, SLOT(closeAllWindows()), actionCollection());
- KStdAction::configureToolbars(this, SLOT(slotConfToolbar()), actionCollection());
- KStdAction::keyBindings(this, SLOT(slotConfKeys()), actionCollection());
+ KStdAction::quit(kapp, TQT_SLOT(closeAllWindows()), actionCollection());
+ KStdAction::configureToolbars(this, TQT_SLOT(slotConfToolbar()), actionCollection());
+ KStdAction::keyBindings(this, TQT_SLOT(slotConfKeys()), actionCollection());
m_mainWidget = new KNMainWidget( this, true, this, 0 );
- connect( m_mainWidget, SIGNAL(signalCaptionChangeRequest(const QString&)),
- SLOT( setCaption(const QString&)) );
+ connect( m_mainWidget, TQT_SIGNAL(signalCaptionChangeRequest(const TQString&)),
+ TQT_SLOT( setCaption(const TQString&)) );
setCentralWidget( m_mainWidget );
setupStatusBar();
- connect( KPIM::BroadcastStatus::instance(), SIGNAL(statusMsg(const QString&)),
- this, SLOT(slotShowStatusMsg(const QString& )) );
+ connect( KPIM::BroadcastStatus::instance(), TQT_SIGNAL(statusMsg(const TQString&)),
+ this, TQT_SLOT(slotShowStatusMsg(const TQString& )) );
createGUI( "knodeui.rc" );
knGlobals.instance = 0;
@@ -77,7 +77,7 @@ void KNMainWindow::slotConfToolbar()
{
saveMainWindowSettings(knGlobals.config(),"mainWindow_options");
KEditToolbar dlg(actionCollection(), "knodeui.rc");
- connect(&dlg,SIGNAL( newToolbarConfig() ), this, SLOT( slotNewToolbarConfig() ));
+ connect(&dlg,TQT_SIGNAL( newToolbarConfig() ), this, TQT_SLOT( slotNewToolbarConfig() ));
dlg.exec();
}
@@ -108,14 +108,14 @@ void KNMainWindow::setupStatusBar()
statusBar()->addWidget( mLittleProgress, 0 , true );
- mStatusMsgLabel = new KRSqueezedTextLabel( QString::null, statusBar() );
+ mStatusMsgLabel = new KRSqueezedTextLabel( TQString::null, statusBar() );
mStatusMsgLabel->setAlignment( AlignLeft | AlignVCenter );
statusBar()->addWidget( mStatusMsgLabel, 2 );
statusBar()->addWidget(m_mainWidget->statusBarLabelFilter(), 2);
statusBar()->addWidget(m_mainWidget->statusBarLabelGroup(), 3);
}
-void KNMainWindow::slotShowStatusMsg( const QString &msg ) {
+void KNMainWindow::slotShowStatusMsg( const TQString &msg ) {
mStatusMsgLabel->setText( msg );
}
diff --git a/knode/knode.h b/knode/knode.h
index 8b719a5d8..d628df1b6 100644
--- a/knode/knode.h
+++ b/knode/knode.h
@@ -25,7 +25,7 @@
#include <kdialogbase.h>
#include "resource.h"
-#include <qglobal.h>
+#include <tqglobal.h>
class KURL;
@@ -46,7 +46,7 @@ class KNMainWindow : public KMainWindow
Q_OBJECT
public:
- KNMainWindow( QWidget* parentWidget=0 );
+ KNMainWindow( TQWidget* parentWidget=0 );
~KNMainWindow();
void openURL( const KURL& );
KNMainWidget *mainWidget() { return m_mainWidget; }
@@ -64,7 +64,7 @@ private:
ProgressDialog *mProgressDialog;
KRSqueezedTextLabel *mStatusMsgLabel;
private slots:
- void slotShowStatusMsg( const QString& );
+ void slotShowStatusMsg( const TQString& );
};
#endif // KNODE_H
diff --git a/knode/knode_part.cpp b/knode/knode_part.cpp
index b1280ced5..52b3e4dd6 100644
--- a/knode/knode_part.cpp
+++ b/knode/knode_part.cpp
@@ -41,14 +41,14 @@
#include <kstatusbar.h>
#include <krsqueezedtextlabel.h>
-#include <qlayout.h>
+#include <tqlayout.h>
typedef KParts::GenericFactory< KNodePart > KNodeFactory;
K_EXPORT_COMPONENT_FACTORY( libknodepart, KNodeFactory )
-KNodePart::KNodePart(QWidget *parentWidget, const char *widgetName,
- QObject *parent, const char *name, const QStringList &)
+KNodePart::KNodePart(TQWidget *parentWidget, const char *widgetName,
+ TQObject *parent, const char *name, const TQStringList &)
: KParts::ReadOnlyPart(parent, name),
mParentWidget( parentWidget )
{
@@ -67,14 +67,14 @@ KNodePart::KNodePart(QWidget *parentWidget, const char *widgetName,
knGlobals.instance = KNodeFactory::instance();
// create a canvas to insert our widget
- QWidget *canvas = new QWidget(parentWidget, widgetName);
- canvas->setFocusPolicy(QWidget::ClickFocus);
+ TQWidget *canvas = new TQWidget(parentWidget, widgetName);
+ canvas->setFocusPolicy(TQWidget::ClickFocus);
setWidget(canvas);
mainWidget = new KNMainWidget( this, false, canvas, "knode_widget" );
- QVBoxLayout *topLayout = new QVBoxLayout(canvas);
+ TQVBoxLayout *topLayout = new TQVBoxLayout(canvas);
topLayout->addWidget(mainWidget);
- mainWidget->setFocusPolicy(QWidget::ClickFocus);
+ mainWidget->setFocusPolicy(TQWidget::ClickFocus);
kapp->dcopClient()->resume(); // Ok. We are ready for DCOP requests.
@@ -114,7 +114,7 @@ void KNodePart::guiActivateEvent(KParts::GUIActivateEvent *e)
}
-QWidget* KNodePart::parentWidget() const
+TQWidget* KNodePart::parentWidget() const
{
return mParentWidget;
}
diff --git a/knode/knode_part.h b/knode/knode_part.h
index 951befc5f..67e1ae549 100644
--- a/knode/knode_part.h
+++ b/knode/knode_part.h
@@ -31,7 +31,7 @@
#include <kparts/event.h>
#include <kparts/part.h>
-#include <qwidget.h>
+#include <tqwidget.h>
class KInstance;
class KAboutData;
@@ -43,11 +43,11 @@ class KNodePart: public KParts::ReadOnlyPart
{
Q_OBJECT
public:
- KNodePart(QWidget *parentWidget, const char *widgetName,
- QObject *parent, const char *name, const QStringList &);
+ KNodePart(TQWidget *parentWidget, const char *widgetName,
+ TQObject *parent, const char *name, const TQStringList &);
virtual ~KNodePart();
- QWidget* parentWidget() const;
+ TQWidget* parentWidget() const;
static KAboutData *createAboutData();
@@ -57,7 +57,7 @@ class KNodePart: public KParts::ReadOnlyPart
private:
ActionManager *mActionManager;
- QWidget *mParentWidget;
+ TQWidget *mParentWidget;
KNMainWidget *mainWidget;
};
diff --git a/knode/knodecomposeriface.h b/knode/knodecomposeriface.h
index d311541be..d6f25f5ab 100644
--- a/knode/knodecomposeriface.h
+++ b/knode/knodecomposeriface.h
@@ -8,7 +8,7 @@ class KNodeComposerIface : virtual public DCOPObject
{
K_DCOP
k_dcop:
- virtual void initData(const QString &text) = 0;
+ virtual void initData(const TQString &text) = 0;
};
#endif
diff --git a/knode/knodeiface.h b/knode/knodeiface.h
index f92967bbb..9a52923fe 100644
--- a/knode/knodeiface.h
+++ b/knode/knodeiface.h
@@ -21,7 +21,7 @@
#include <dcopobject.h>
#include <dcopref.h>
#include <kurl.h>
-#include <qstringlist.h>
+#include <tqstringlist.h>
class KNodeIface : virtual public DCOPObject
diff --git a/knode/knprotocolclient.cpp b/knode/knprotocolclient.cpp
index 1d992d8a3..4831087c9 100644
--- a/knode/knprotocolclient.cpp
+++ b/knode/knprotocolclient.cpp
@@ -166,7 +166,7 @@ void KNProtocolClient::waitForWork()
if (isConnected()) // connection is ready
processJob();
}
- errorPrefix = QString::null;
+ errorPrefix = TQString::null;
clearPipe();
}
@@ -235,7 +235,7 @@ void KNProtocolClient::closeConnection()
int ret = KSocks::self()->select(FD_SETSIZE, NULL, &fdsW, NULL, &tv);
if (ret > 0) { // we can write...
- QCString cmd = "QUIT\r\n";
+ TQCString cmd = "QUIT\r\n";
int todo = cmd.length();
KSocks::self()->write(tcpSocket,&cmd.data()[0],todo);
}
@@ -244,7 +244,7 @@ void KNProtocolClient::closeConnection()
// sends a command (one line), return code is written to rep
-bool KNProtocolClient::sendCommand(const QCString &cmd, int &rep)
+bool KNProtocolClient::sendCommand(const TQCString &cmd, int &rep)
{
if (!sendStr(cmd + "\r\n"))
return false;
@@ -255,7 +255,7 @@ bool KNProtocolClient::sendCommand(const QCString &cmd, int &rep)
// checks return code and calls handleErrors() if necessary
-bool KNProtocolClient::sendCommandWCheck(const QCString &cmd, int rep)
+bool KNProtocolClient::sendCommandWCheck(const TQCString &cmd, int rep)
{
int code;
@@ -270,11 +270,11 @@ bool KNProtocolClient::sendCommandWCheck(const QCString &cmd, int rep)
// sends a message (multiple lines)
-bool KNProtocolClient::sendMsg(const QCString &msg)
+bool KNProtocolClient::sendMsg(const TQCString &msg)
{
const char *line = msg.data();
const char *end;
- QCString buffer;
+ TQCString buffer;
size_t length;
char inter[10000];
@@ -382,7 +382,7 @@ bool KNProtocolClient::getNextLine()
// receives a message (multiple lines)
-bool KNProtocolClient::getMsg(QStrList &msg)
+bool KNProtocolClient::getMsg(TQStrList &msg)
{
char *line;
@@ -469,7 +469,7 @@ bool KNProtocolClient::waitForRead()
if (ret == -1) { // select failed
if (job) {
- QString str = i18n("Communication error:\n");
+ TQString str = i18n("Communication error:\n");
str += strerror(errno);
job->setErrorString(str);
}
@@ -531,7 +531,7 @@ bool KNProtocolClient::waitForWrite()
if (ret == -1) { // select failed
if (job) {
- QString str = i18n("Communication error:\n");
+ TQString str = i18n("Communication error:\n");
str += strerror(errno);
job->setErrorString(str);
}
@@ -579,7 +579,7 @@ void KNProtocolClient::closeSocket()
// sends str to the server
-bool KNProtocolClient::sendStr(const QCString &str)
+bool KNProtocolClient::sendStr(const TQCString &str)
{
int ret;
int todo = str.length();
@@ -591,7 +591,7 @@ bool KNProtocolClient::sendStr(const QCString &str)
ret = KSocks::self()->write(tcpSocket,&str.data()[done],todo);
if (ret <= 0) {
if (job) {
- QString str = i18n("Communication error:\n");
+ TQString str = i18n("Communication error:\n");
str += strerror(errno);
job->setErrorString(str);
}
diff --git a/knode/knprotocolclient.h b/knode/knprotocolclient.h
index e531a278b..a17b68782 100644
--- a/knode/knprotocolclient.h
+++ b/knode/knprotocolclient.h
@@ -17,9 +17,9 @@
#ifndef KNPROTOCOLCLIENT_H
#define KNPROTOCOLCLIENT_H
-#include <qdatetime.h>
-#include <qthread.h>
-#include <qcstring.h>
+#include <tqdatetime.h>
+#include <tqthread.h>
+#include <tqcstring.h>
#include <knserverinfo.h>
@@ -28,7 +28,7 @@ class KNJobData;
struct in_addr;
-class KNProtocolClient : public QThread {
+class KNProtocolClient : public TQThread {
public:
enum threadSignal { TSworkDone=0, TSjobStarted=1, TSconnect=2, TSloadGrouplist=3,
@@ -66,18 +66,18 @@ class KNProtocolClient : public QThread {
virtual void closeConnection();
/** sends a command (one line), return code is written to rep */
- virtual bool sendCommand(const QCString &cmd, int &rep);
+ virtual bool sendCommand(const TQCString &cmd, int &rep);
/** checks return code and calls handleErrors() if necessary */
- bool sendCommandWCheck(const QCString &cmd, int rep);
+ bool sendCommandWCheck(const TQCString &cmd, int rep);
/** sends a message (multiple lines) */
- bool sendMsg(const QCString &msg);
+ bool sendMsg(const TQCString &msg);
/** reads next complete line of input */
bool getNextLine();
/** returns pointer to current line of input */
char* getCurrentLine() { return thisLine; };
/** receives a message (multiple lines) */
- bool getMsg(QStrList &msg);
+ bool getMsg(TQStrList &msg);
/** reads next line and returns the response code */
bool getNextResponse(int &rep);
/** checks return code and calls handleErrors() if necessary */
@@ -91,7 +91,7 @@ class KNProtocolClient : public QThread {
KNJobData *job;
KNServerInfo account;
/** handleErrors() adds this string to the error message */
- QString errorPrefix;
+ TQString errorPrefix;
int progressValue, predictedLines, doneLines;
bool byteCountMode;
@@ -102,7 +102,7 @@ class KNProtocolClient : public QThread {
bool waitForWrite();
void closeSocket();
/** sends str to the server */
- bool sendStr(const QCString &str);
+ bool sendStr(const TQCString &str);
/** removes start/stop signal */
void clearPipe();
@@ -114,7 +114,7 @@ class KNProtocolClient : public QThread {
int tcpSocket;
/** bytes in&out for the current connection */
int byteCount;
- QTime timer;
+ TQTime timer;
bool mTerminate;
};
diff --git a/knode/knrangefilter.cpp b/knode/knrangefilter.cpp
index bfa02110f..ee14c794f 100644
--- a/knode/knrangefilter.cpp
+++ b/knode/knrangefilter.cpp
@@ -14,10 +14,10 @@
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, US
*/
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qcheckbox.h>
-#include <qcombobox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqcheckbox.h>
+#include <tqcombobox.h>
#include <ksimpleconfig.h>
#include <knuminput.h>
@@ -96,31 +96,31 @@ void KNRangeFilter::save(KSimpleConfig *conf)
//=====================================================================================
//=====================================================================================
-KNRangeFilterWidget::KNRangeFilterWidget(const QString& value, int min, int max, QWidget* parent, const QString &unit)
- : QGroupBox(value, parent)
+KNRangeFilterWidget::KNRangeFilterWidget(const TQString& value, int min, int max, TQWidget* parent, const TQString &unit)
+ : TQGroupBox(value, parent)
{
- enabled=new QCheckBox(this);
+ enabled=new TQCheckBox(this);
val1=new KIntSpinBox(min, max, 1, min, 10, this);
val1->setSuffix(unit);
val2=new KIntSpinBox(min, max, 1, min, 10, this);
val2->setSuffix(unit);
- op1=new QComboBox(this);
+ op1=new TQComboBox(this);
op1->insertItem("<");
op1->insertItem("<=");
op1->insertItem("=");
op1->insertItem(">=");
op1->insertItem(">");
- op2=new QComboBox(this);
+ op2=new TQComboBox(this);
op2->insertItem("");
op2->insertItem("<");
op2->insertItem("<=");
- des=new QLabel(value, this);
+ des=new TQLabel(value, this);
des->setAlignment(AlignCenter);
- QGridLayout *topL=new QGridLayout(this, 2,6, 8,5 );
+ TQGridLayout *topL=new TQGridLayout(this, 2,6, 8,5 );
topL->addRowSpacing(0, fontMetrics().lineSpacing()-4);
topL->addWidget(enabled,1,0, Qt::AlignHCenter);
@@ -134,9 +134,9 @@ KNRangeFilterWidget::KNRangeFilterWidget(const QString& value, int min, int max,
topL->setColStretch(1,1);
topL->setColStretch(5,1);
- connect(op1, SIGNAL(activated(int)), SLOT(slotOp1Changed(int)));
- connect(op2, SIGNAL(activated(int)), SLOT(slotOp2Changed(int)));
- connect(enabled, SIGNAL(toggled(bool)), SLOT(slotEnabled(bool)));
+ connect(op1, TQT_SIGNAL(activated(int)), TQT_SLOT(slotOp1Changed(int)));
+ connect(op2, TQT_SIGNAL(activated(int)), TQT_SLOT(slotOp2Changed(int)));
+ connect(enabled, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotEnabled(bool)));
slotEnabled(false);
}
diff --git a/knode/knrangefilter.h b/knode/knrangefilter.h
index 702a2ca55..297a21344 100644
--- a/knode/knrangefilter.h
+++ b/knode/knrangefilter.h
@@ -17,7 +17,7 @@
#ifndef KNRANGEFILTER_H
#define KNRANGEFILTER_H
-#include <qgroupbox.h>
+#include <tqgroupbox.h>
class QLabel;
class KIntSpinBox;
@@ -60,12 +60,12 @@ class KNRangeFilter {
//==================================================================================
-class KNRangeFilterWidget : public QGroupBox {
+class KNRangeFilterWidget : public TQGroupBox {
Q_OBJECT
public:
- KNRangeFilterWidget(const QString& value, int min, int max, QWidget* parent, const QString &unit=QString::null);
+ KNRangeFilterWidget(const TQString& value, int min, int max, TQWidget* parent, const TQString &unit=TQString::null);
~KNRangeFilterWidget();
KNRangeFilter filter();
@@ -73,10 +73,10 @@ class KNRangeFilterWidget : public QGroupBox {
void clear();
protected:
- QCheckBox *enabled;
- QLabel *des;
+ TQCheckBox *enabled;
+ TQLabel *des;
KIntSpinBox *val1, *val2;
- QComboBox *op1, *op2;
+ TQComboBox *op1, *op2;
protected slots:
void slotEnabled(bool e);
diff --git a/knode/knscoring.cpp b/knode/knscoring.cpp
index cad44fc81..c83cbccde 100644
--- a/knode/knscoring.cpp
+++ b/knode/knscoring.cpp
@@ -12,7 +12,7 @@
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, US
*/
-#include <qstring.h>
+#include <tqstring.h>
#include <kwin.h>
#include <kscoringeditor.h>
@@ -43,35 +43,35 @@ void KNScorableArticle::addScore(short s)
_a->setChanged(true);
}
-void KNScorableArticle::changeColor(const QColor& c)
+void KNScorableArticle::changeColor(const TQColor& c)
{
_a->setColor(c);
}
-void KNScorableArticle::displayMessage(const QString& s)
+void KNScorableArticle::displayMessage(const TQString& s)
{
if (!_a->isNew()) return;
if (!notifyC) notifyC = new NotifyCollection();
notifyC->addNote(*this,s);
}
-QString KNScorableArticle::from() const
+TQString KNScorableArticle::from() const
{
return _a->from()->asUnicodeString();
}
-QString KNScorableArticle::subject() const
+TQString KNScorableArticle::subject() const
{
return _a->subject()->asUnicodeString();
}
-QString KNScorableArticle::getHeaderByType(const QString& s) const
+TQString KNScorableArticle::getHeaderByType(const TQString& s) const
{
KMime::Headers::Base *h = _a->getHeaderByType(s.latin1());
if (!h) return "";
- QString t = _a->getHeaderByType(s.latin1())->asUnicodeString();
+ TQString t = _a->getHeaderByType(s.latin1())->asUnicodeString();
Q_ASSERT( !t.isEmpty() );
return t;
}
@@ -105,13 +105,13 @@ KNScoringManager::~KNScoringManager()
}
-QStringList KNScoringManager::getGroups() const
+TQStringList KNScoringManager::getGroups() const
{
KNAccountManager *am = knGlobals.accountManager();
- QStringList res;
- QValueList<KNNntpAccount*>::Iterator it;
+ TQStringList res;
+ TQValueList<KNNntpAccount*>::Iterator it;
for ( it = am->begin(); it != am->end(); ++it ) {
- QStringList groups;
+ TQStringList groups;
knGlobals.groupManager()->getSubscribed( (*it), groups);
res += groups;
}
@@ -120,9 +120,9 @@ QStringList KNScoringManager::getGroups() const
}
-QStringList KNScoringManager::getDefaultHeaders() const
+TQStringList KNScoringManager::getDefaultHeaders() const
{
- QStringList l = KScoringManager::getDefaultHeaders();
+ TQStringList l = KScoringManager::getDefaultHeaders();
l << "Lines";
l << "References";
return l;
diff --git a/knode/knscoring.h b/knode/knscoring.h
index 77b011e22..68b23c585 100644
--- a/knode/knscoring.h
+++ b/knode/knscoring.h
@@ -29,11 +29,11 @@ public:
virtual ~KNScorableArticle();
virtual void addScore(short s);
- virtual void changeColor(const QColor&);
- virtual void displayMessage(const QString&);
- virtual QString from() const;
- virtual QString subject() const;
- virtual QString getHeaderByType(const QString&) const;
+ virtual void changeColor(const TQColor&);
+ virtual void displayMessage(const TQString&);
+ virtual TQString from() const;
+ virtual TQString subject() const;
+ virtual TQString getHeaderByType(const TQString&) const;
virtual void markAsRead();
static NotifyCollection* notifyC;
@@ -65,8 +65,8 @@ class KNScoringManager : public KScoringManager
public:
KNScoringManager();
virtual ~KNScoringManager();
- virtual QStringList getGroups() const;
- virtual QStringList getDefaultHeaders() const;
+ virtual TQStringList getGroups() const;
+ virtual TQStringList getDefaultHeaders() const;
void configure();
bool canColors()const { return true; }
diff --git a/knode/knsearchdialog.cpp b/knode/knsearchdialog.cpp
index 113bfe733..f72afe472 100644
--- a/knode/knsearchdialog.cpp
+++ b/knode/knsearchdialog.cpp
@@ -14,8 +14,8 @@
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, US
*/
-#include <qlayout.h>
-#include <qcheckbox.h>
+#include <tqlayout.h>
+#include <tqcheckbox.h>
#include <klocale.h>
#include <kapplication.h>
@@ -29,25 +29,25 @@
#include "knsearchdialog.h"
-KNSearchDialog::KNSearchDialog(searchType /*t*/, QWidget *parent)
- : QDialog(parent)
+KNSearchDialog::KNSearchDialog(searchType /*t*/, TQWidget *parent)
+ : TQDialog(parent)
{
setCaption(kapp->makeStdCaption( i18n("Search for Articles") ));
setIcon(SmallIcon("knode"));
- QGroupBox *bg=new QGroupBox(this);
+ TQGroupBox *bg=new TQGroupBox(this);
- startBtn=new QPushButton(SmallIcon("mail_find"),i18n("Sea&rch"), bg);
+ startBtn=new TQPushButton(SmallIcon("mail_find"),i18n("Sea&rch"), bg);
startBtn->setDefault(true);
- newBtn=new QPushButton(SmallIcon("editclear"),i18n("C&lear"), bg);
+ newBtn=new TQPushButton(SmallIcon("editclear"),i18n("C&lear"), bg);
closeBtn=new KPushButton(KStdGuiItem::close(), bg);
- completeThreads=new QCheckBox(i18n("Sho&w complete threads"),this);
+ completeThreads=new TQCheckBox(i18n("Sho&w complete threads"),this);
fcw=new KNFilterConfigWidget(this);
fcw->reset();
- QHBoxLayout *topL=new QHBoxLayout(this, 5);
- QVBoxLayout *filterL=new QVBoxLayout(this, 0, 5);
- QVBoxLayout *btnL=new QVBoxLayout(bg, 8, 5);
+ TQHBoxLayout *topL=new TQHBoxLayout(this, 5);
+ TQVBoxLayout *filterL=new TQVBoxLayout(this, 0, 5);
+ TQVBoxLayout *btnL=new TQVBoxLayout(bg, 8, 5);
filterL->addWidget(completeThreads);
filterL->addWidget(fcw,1);
@@ -60,9 +60,9 @@ KNSearchDialog::KNSearchDialog(searchType /*t*/, QWidget *parent)
topL->addLayout(filterL, 1);
topL->addWidget(bg);
- connect(startBtn, SIGNAL(clicked()), this, SLOT(slotStartClicked()));
- connect(newBtn, SIGNAL(clicked()), this, SLOT(slotNewClicked()));
- connect(closeBtn, SIGNAL(clicked()), this, SLOT(slotCloseClicked()));
+ connect(startBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotStartClicked()));
+ connect(newBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotNewClicked()));
+ connect(closeBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotCloseClicked()));
f_ilter=new KNArticleFilter();
f_ilter->setLoaded(true);
@@ -111,7 +111,7 @@ void KNSearchDialog::slotCloseClicked()
}
-void KNSearchDialog::closeEvent( QCloseEvent * )
+void KNSearchDialog::closeEvent( TQCloseEvent * )
{
emit dialogDone();
}
diff --git a/knode/knsearchdialog.h b/knode/knsearchdialog.h
index 7c68a49fd..8923bd813 100644
--- a/knode/knsearchdialog.h
+++ b/knode/knsearchdialog.h
@@ -17,7 +17,7 @@
#ifndef KNSEARCHDIALOG_H
#define KNSEARCHDIALOG_H
-#include <qdialog.h>
+#include <tqdialog.h>
class QPushButton;
@@ -25,23 +25,23 @@ class KNFilterConfigWidget;
class KNArticleFilter;
-class KNSearchDialog : public QDialog {
+class KNSearchDialog : public TQDialog {
Q_OBJECT
public:
enum searchType { STfolderSearch, STgroupSearch };
- KNSearchDialog(searchType t=STgroupSearch, QWidget *parent=0);
+ KNSearchDialog(searchType t=STgroupSearch, TQWidget *parent=0);
~KNSearchDialog();
KNArticleFilter* filter() const { return f_ilter; }
protected:
- void closeEvent( QCloseEvent* e );
+ void closeEvent( TQCloseEvent* e );
KNFilterConfigWidget *fcw;
- QPushButton *startBtn, *newBtn, *closeBtn;
- QCheckBox *completeThreads;
+ TQPushButton *startBtn, *newBtn, *closeBtn;
+ TQCheckBox *completeThreads;
KNArticleFilter *f_ilter;
protected slots:
diff --git a/knode/knserverinfo.cpp b/knode/knserverinfo.cpp
index b79735a2f..d314a7710 100644
--- a/knode/knserverinfo.cpp
+++ b/knode/knserverinfo.cpp
@@ -25,7 +25,7 @@ using namespace KWallet;
#include "knaccountmanager.h"
#include "utilities.h"
-#include <qwidget.h>
+#include <tqwidget.h>
KNServerInfo::KNServerInfo() :
t_ype(STnntp), i_d(-1), p_ort(119), h_old(300),
@@ -77,7 +77,7 @@ void KNServerInfo::readConf(KConfig *conf)
if (Wallet::isOpen( Wallet::NetworkWallet() ))
readPassword();
- QString encStr = conf->readEntry( "encryption", "None" );
+ TQString encStr = conf->readEntry( "encryption", "None" );
if ( encStr.contains( "SSL", false ) )
mEncryption = SSL;
else if ( encStr.contains( "TLS", false ) )
@@ -102,7 +102,7 @@ void KNServerInfo::saveConf(KConfig *conf)
// open wallet for storing only if the user actually changed the password
if (n_eedsLogon && p_assDirty) {
Wallet *wallet = KNAccountManager::wallet();
- if (!wallet || wallet->writePassword(QString::number(i_d), p_ass)) {
+ if (!wallet || wallet->writePassword(TQString::number(i_d), p_ass)) {
if ( KMessageBox::warningYesNo( 0,
i18n("KWallet is not available. It is strongly recommended to use "
"KWallet for managing your passwords.\n"
@@ -151,7 +151,7 @@ bool KNServerInfo::operator==(const KNServerInfo &s)
}
-const QString &KNServerInfo::pass()
+const TQString &KNServerInfo::pass()
{
// if we need to load the password, load all of them
if (n_eedsLogon && !mPassLoaded && p_ass.isEmpty() )
@@ -160,7 +160,7 @@ const QString &KNServerInfo::pass()
return p_ass;
}
-void KNServerInfo::setPass(const QString &s)
+void KNServerInfo::setPass(const TQString &s)
{
if (p_ass != s) {
p_ass = s;
@@ -178,11 +178,11 @@ void KNServerInfo::readPassword()
// check wether there is a chance to find our password at all
if (Wallet::folderDoesNotExist(Wallet::NetworkWallet(), "knode") ||
- Wallet::keyDoesNotExist(Wallet::NetworkWallet(), "knode", QString::number(i_d)))
+ Wallet::keyDoesNotExist(Wallet::NetworkWallet(), "knode", TQString::number(i_d)))
return;
// finally try to open the wallet and read the password
KWallet::Wallet *wallet = KNAccountManager::wallet();
if ( wallet )
- wallet->readPassword( QString::number(i_d), p_ass );
+ wallet->readPassword( TQString::number(i_d), p_ass );
}
diff --git a/knode/knserverinfo.h b/knode/knserverinfo.h
index 6f564d934..68c39699a 100644
--- a/knode/knserverinfo.h
+++ b/knode/knserverinfo.h
@@ -15,7 +15,7 @@
#ifndef KNSERVERINFO_H
#define KNSERVERINFO_H
-#include <qstring.h>
+#include <tqstring.h>
class KConfig;
namespace KWallet {
@@ -38,9 +38,9 @@ class KNServerInfo {
//get
serverType type()const { return t_ype; }
int id()const { return i_d; }
- const QString& server() { return s_erver; }
- const QString& user() { return u_ser; }
- const QString& pass();
+ const TQString& server() { return s_erver; }
+ const TQString& user() { return u_ser; }
+ const TQString& pass();
int port() const { return p_ort; }
int hold() const { return h_old; }
int timeout() const { return t_imeout; }
@@ -52,9 +52,9 @@ class KNServerInfo {
//set
void setType(serverType t) { t_ype=t; }
void setId(int i) { i_d=i; }
- void setServer(const QString &s) { s_erver=s; }
- void setUser(const QString &s) { u_ser=s; }
- void setPass(const QString &s);
+ void setServer(const TQString &s) { s_erver=s; }
+ void setUser(const TQString &s) { u_ser=s; }
+ void setPass(const TQString &s);
void setPort(int p) { p_ort=p; }
void setHold(int h) { h_old=h; }
void setTimeout(int t) { t_imeout=t; }
@@ -69,7 +69,7 @@ class KNServerInfo {
protected:
serverType t_ype;
- QString s_erver,
+ TQString s_erver,
u_ser,
p_ass;
diff --git a/knode/knsourceviewwindow.cpp b/knode/knsourceviewwindow.cpp
index ad0eb1cf5..f0b2b75d8 100644
--- a/knode/knsourceviewwindow.cpp
+++ b/knode/knsourceviewwindow.cpp
@@ -12,7 +12,7 @@
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, US
*/
-#include <qaccel.h>
+#include <tqaccel.h>
#include <kapplication.h>
@@ -22,33 +22,33 @@
#include "utilities.h"
-KNSourceViewWindow::KNSourceViewWindow( const QString &text )
+KNSourceViewWindow::KNSourceViewWindow( const TQString &text )
: KTextBrowser(0)
{
setWFlags(WType_TopLevel | WDestructiveClose);
- QAccel *accel = new QAccel( this, "browser close-accel" );
- accel->connectItem( accel->insertItem( Qt::Key_Escape ), this , SLOT( close() ));
+ TQAccel *accel = new TQAccel( this, "browser close-accel" );
+ accel->connectItem( accel->insertItem( Qt::Key_Escape ), this , TQT_SLOT( close() ));
KNConfig::Appearance *app=knGlobals.configManager()->appearance();
setTextFormat( PlainText );
setCaption(kapp->makeStdCaption(i18n("Article Source")));
- setPaper( QBrush(app->backgroundColor()) );
+ setPaper( TQBrush(app->backgroundColor()) );
setFont( app->articleFixedFont() );
setColor( app->textColor() );
setWordWrap( KTextBrowser::NoWrap );
setText( text );
- KNHelper::restoreWindowSize("sourceWindow", this, QSize(500,300));
+ KNHelper::restoreWindowSize("sourceWindow", this, TQSize(500,300));
show();
}
-void KNSourceViewWindow::setPalette( const QPalette &pal )
+void KNSourceViewWindow::setPalette( const TQPalette &pal )
{
- QPalette p = pal;
- p.setColor( QColorGroup::Text, knGlobals.configManager()->appearance()->textColor() );
- p.setColor( QColorGroup::Background, knGlobals.configManager()->appearance()->backgroundColor() );
+ TQPalette p = pal;
+ p.setColor( TQColorGroup::Text, knGlobals.configManager()->appearance()->textColor() );
+ p.setColor( TQColorGroup::Background, knGlobals.configManager()->appearance()->backgroundColor() );
KTextBrowser::setPalette( p );
}
diff --git a/knode/knsourceviewwindow.h b/knode/knsourceviewwindow.h
index c3a7fc8ca..aabe14b50 100644
--- a/knode/knsourceviewwindow.h
+++ b/knode/knsourceviewwindow.h
@@ -23,9 +23,9 @@ class KNSourceViewWindow : public KTextBrowser {
Q_OBJECT
public:
- KNSourceViewWindow( const QString &text );
+ KNSourceViewWindow( const TQString &text );
~KNSourceViewWindow();
- virtual void setPalette( const QPalette &pal );
+ virtual void setPalette( const TQPalette &pal );
};
diff --git a/knode/knstatusfilter.cpp b/knode/knstatusfilter.cpp
index 6389794d7..a1379a265 100644
--- a/knode/knstatusfilter.cpp
+++ b/knode/knstatusfilter.cpp
@@ -14,8 +14,8 @@
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, US
*/
-#include <qlayout.h>
-#include <qcheckbox.h>
+#include <tqlayout.h>
+#include <tqcheckbox.h>
#include <klocale.h>
#include <ksimpleconfig.h>
@@ -94,21 +94,21 @@ bool KNStatusFilter::doFilter(KNRemoteArticle *a)
//==============================================================================
-KNStatusFilterWidget::KNStatusFilterWidget(QWidget *parent) :
- QButtonGroup(0, parent)
+KNStatusFilterWidget::KNStatusFilterWidget(TQWidget *parent) :
+ TQButtonGroup(0, parent)
{
setFrameStyle(NoFrame);
- enR=new QCheckBox(i18n("Is read:"), this);
- enN=new QCheckBox(i18n("Is new:"), this);
- enUS=new QCheckBox(i18n("Has unread followups:"), this);
- enNS=new QCheckBox(i18n("Has new followups:"), this);
+ enR=new TQCheckBox(i18n("Is read:"), this);
+ enN=new TQCheckBox(i18n("Is new:"), this);
+ enUS=new TQCheckBox(i18n("Has unread followups:"), this);
+ enNS=new TQCheckBox(i18n("Has new followups:"), this);
rCom=new TFCombo(this);
nCom=new TFCombo(this);
usCom=new TFCombo(this);
nsCom=new TFCombo(this);
- QGridLayout *topL=new QGridLayout(this, 5, 3, 15,5);
+ TQGridLayout *topL=new TQGridLayout(this, 5, 3, 15,5);
topL->addWidget(enR,0,0); topL->addWidget(rCom,0,1);
topL->addWidget(enN,1,0); topL->addWidget(nCom,1,1);
topL->addWidget(enUS,2,0); topL->addWidget(usCom,2,1);
@@ -116,7 +116,7 @@ KNStatusFilterWidget::KNStatusFilterWidget(QWidget *parent) :
topL->setColStretch(2,1);
topL->setRowStretch(4,1);
- connect(this, SIGNAL(clicked(int)), this, SLOT(slotEnabled(int)));
+ connect(this, TQT_SIGNAL(clicked(int)), this, TQT_SLOT(slotEnabled(int)));
}
@@ -197,7 +197,7 @@ void KNStatusFilterWidget::slotEnabled(int c)
//==============================================================================
-KNStatusFilterWidget::TFCombo::TFCombo(QWidget *parent) : QComboBox(parent)
+KNStatusFilterWidget::TFCombo::TFCombo(TQWidget *parent) : TQComboBox(parent)
{
insertItem(i18n("True"));
insertItem(i18n("False"));
diff --git a/knode/knstatusfilter.h b/knode/knstatusfilter.h
index 43030de4e..6497b3021 100644
--- a/knode/knstatusfilter.h
+++ b/knode/knstatusfilter.h
@@ -17,9 +17,9 @@
#ifndef KNSTATUSFILTER_H
#define KNSTATUSFILTER_H
-#include <qbuttongroup.h>
-#include <qcombobox.h>
-#include <qbitarray.h>
+#include <tqbuttongroup.h>
+#include <tqcombobox.h>
+#include <tqbitarray.h>
class QCheckBox;
class KSimpleConfig;
@@ -43,7 +43,7 @@ class KNStatusFilter {
bool doFilter(KNRemoteArticle *a);
protected:
- QBitArray data;
+ TQBitArray data;
};
@@ -51,12 +51,12 @@ class KNStatusFilter {
//=================================================================================
-class KNStatusFilterWidget : public QButtonGroup {
+class KNStatusFilterWidget : public TQButtonGroup {
Q_OBJECT
public:
- KNStatusFilterWidget(QWidget *parent);
+ KNStatusFilterWidget(TQWidget *parent);
~KNStatusFilterWidget();
KNStatusFilter filter();
@@ -66,17 +66,17 @@ class KNStatusFilterWidget : public QButtonGroup {
protected:
- class TFCombo : public QComboBox {
+ class TFCombo : public TQComboBox {
public:
- TFCombo(QWidget *parent);
+ TFCombo(TQWidget *parent);
~TFCombo();
void setValue(bool b) { if(b) setCurrentItem(0); else setCurrentItem(1); }
bool value() const { return (currentItem()==0); }
};
- QCheckBox *enR, *enN, *enUS, *enNS;
+ TQCheckBox *enR, *enN, *enUS, *enNS;
TFCombo *rCom, *nCom, *usCom, *nsCom;
protected slots:
diff --git a/knode/knstringfilter.cpp b/knode/knstringfilter.cpp
index c41b723fe..4f69f7eaf 100644
--- a/knode/knstringfilter.cpp
+++ b/knode/knstringfilter.cpp
@@ -12,9 +12,9 @@
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, US
*/
-#include <qcombobox.h>
-#include <qlayout.h>
-#include <qcheckbox.h>
+#include <tqcombobox.h>
+#include <tqlayout.h>
+#include <tqcheckbox.h>
#include <klocale.h>
#include <ksimpleconfig.h>
@@ -38,13 +38,13 @@ KNStringFilter& KNStringFilter::operator=(const KNStringFilter &sf)
-bool KNStringFilter::doFilter(const QString &s)
+bool KNStringFilter::doFilter(const TQString &s)
{
bool ret=true;
if(!expanded.isEmpty()) {
if(regExp) {
- QRegExp matcher(expanded);
+ TQRegExp matcher(expanded);
ret = ( matcher.search(s) >= 0 );
} else
ret=(s.find(expanded,0,false)!=-1);
@@ -69,8 +69,8 @@ void KNStringFilter::expand(KNGroup *g)
}
expanded = data;
- expanded.replace(QRegExp("%MYNAME"), id->name());
- expanded.replace(QRegExp("%MYEMAIL"), id->email());
+ expanded.replace(TQRegExp("%MYNAME"), id->name());
+ expanded.replace(TQRegExp("%MYEMAIL"), id->email());
}
@@ -94,18 +94,18 @@ void KNStringFilter::save(KSimpleConfig *conf)
//===============================================================================
-KNStringFilterWidget::KNStringFilterWidget(const QString& title, QWidget *parent)
- : QGroupBox(title, parent)
+KNStringFilterWidget::KNStringFilterWidget(const TQString& title, TQWidget *parent)
+ : TQGroupBox(title, parent)
{
- fType=new QComboBox(this);
+ fType=new TQComboBox(this);
fType->insertItem(i18n("Does Contain"));
fType->insertItem(i18n("Does NOT Contain"));
fString=new KLineEdit(this);
- regExp=new QCheckBox(i18n("Regular expression"), this);
+ regExp=new TQCheckBox(i18n("Regular expression"), this);
- QGridLayout *topL=new QGridLayout(this, 3,3, 8,5 );
+ TQGridLayout *topL=new TQGridLayout(this, 3,3, 8,5 );
topL->addRowSpacing(0, fontMetrics().lineSpacing()-4);
topL->addWidget(fType, 1,0);
topL->addColSpacing(1, 10);
diff --git a/knode/knstringfilter.h b/knode/knstringfilter.h
index 17199cbe7..e70e7e307 100644
--- a/knode/knstringfilter.h
+++ b/knode/knstringfilter.h
@@ -17,7 +17,7 @@
#ifndef KNSTRINGFILTER_H
#define KNSTRINGFILTER_H
-#include <qgroupbox.h>
+#include <tqgroupbox.h>
class QCheckBox;
class QComboBox;
@@ -43,10 +43,10 @@ class KNStringFilter {
void load(KSimpleConfig *conf);
void save(KSimpleConfig *conf);
- bool doFilter(const QString &s);
+ bool doFilter(const TQString &s);
protected:
- QString data, expanded;
+ TQString data, expanded;
bool con, regExp;
};
@@ -55,12 +55,12 @@ class KNStringFilter {
//===============================================================================
-class KNStringFilterWidget : public QGroupBox {
+class KNStringFilterWidget : public TQGroupBox {
Q_OBJECT
public:
- KNStringFilterWidget(const QString& title, QWidget *parent);
+ KNStringFilterWidget(const TQString& title, TQWidget *parent);
~KNStringFilterWidget();
KNStringFilter filter();
@@ -71,8 +71,8 @@ class KNStringFilterWidget : public QGroupBox {
void setStartFocus();
protected:
- QCheckBox *regExp;
- QComboBox *fType;
+ TQCheckBox *regExp;
+ TQComboBox *fType;
KLineEdit *fString;
};
diff --git a/knode/knwidgets.cpp b/knode/knwidgets.cpp
index d71624eb6..d75cf9bf7 100644
--- a/knode/knwidgets.cpp
+++ b/knode/knwidgets.cpp
@@ -14,15 +14,15 @@
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, US
*/
-#include <qpainter.h>
-#include <qpixmap.h>
+#include <tqpainter.h>
+#include <tqpixmap.h>
#include "knwidgets.h"
//====================================================================================
-KNListBoxItem::KNListBoxItem(const QString& text, QPixmap *pm)
+KNListBoxItem::KNListBoxItem(const TQString& text, TQPixmap *pm)
{
p_m=pm;
setText(text);
@@ -34,10 +34,10 @@ KNListBoxItem::~KNListBoxItem()
}
-void KNListBoxItem::paint(QPainter *p)
+void KNListBoxItem::paint(TQPainter *p)
{
- QFontMetrics fm = p->fontMetrics();
+ TQFontMetrics fm = p->fontMetrics();
int tYPos=0, tXPos=3, pYPos=0;
@@ -62,7 +62,7 @@ void KNListBoxItem::paint(QPainter *p)
}
-int KNListBoxItem::height(const QListBox *lb) const
+int KNListBoxItem::height(const TQListBox *lb) const
{
if(p_m)
return QMAX( p_m->height(), lb->fontMetrics().lineSpacing() + 1 );
@@ -71,7 +71,7 @@ int KNListBoxItem::height(const QListBox *lb) const
}
-int KNListBoxItem::width(const QListBox *lb) const
+int KNListBoxItem::width(const TQListBox *lb) const
{
if(p_m)
return (p_m->width() + lb->fontMetrics().width( text() ) + 6);
@@ -84,8 +84,8 @@ int KNListBoxItem::width(const QListBox *lb) const
// **** listbox for dialogs **************************************************
-KNDialogListBox::KNDialogListBox(bool alwaysIgnore, QWidget * parent, const char * name)
- : QListBox(parent, name), a_lwaysIgnore(alwaysIgnore)
+KNDialogListBox::KNDialogListBox(bool alwaysIgnore, TQWidget * parent, const char * name)
+ : TQListBox(parent, name), a_lwaysIgnore(alwaysIgnore)
{
}
@@ -95,22 +95,22 @@ KNDialogListBox::~KNDialogListBox()
}
-void KNDialogListBox::keyPressEvent(QKeyEvent *e)
+void KNDialogListBox::keyPressEvent(TQKeyEvent *e)
{
if ((a_lwaysIgnore || !(hasFocus()&&isVisible()))&&((e->key()==Key_Enter)||(e->key()==Key_Return)))
e->ignore();
else
- QListBox::keyPressEvent(e);
+ TQListBox::keyPressEvent(e);
}
//====================================================================================
-KNDockWidgetHeaderDrag::KNDockWidgetHeaderDrag(QWidget *focusWidget, KDockWidgetAbstractHeader* parent, KDockWidget* dock, const char* name )
+KNDockWidgetHeaderDrag::KNDockWidgetHeaderDrag(TQWidget *focusWidget, KDockWidgetAbstractHeader* parent, KDockWidget* dock, const char* name )
: KDockWidgetHeaderDrag(parent, dock, name), f_ocus(false)
{
- connect(focusWidget, SIGNAL(focusChanged(QFocusEvent*)), SLOT(slotFocusChanged(QFocusEvent*)));
+ connect(focusWidget, TQT_SIGNAL(focusChanged(TQFocusEvent*)), TQT_SLOT(slotFocusChanged(TQFocusEvent*)));
}
@@ -119,7 +119,7 @@ KNDockWidgetHeaderDrag::~KNDockWidgetHeaderDrag()
}
-void KNDockWidgetHeaderDrag::slotFocusChanged(QFocusEvent *e)
+void KNDockWidgetHeaderDrag::slotFocusChanged(TQFocusEvent *e)
{
if(e->gotFocus()) {
f_ocus = true;
@@ -130,18 +130,18 @@ void KNDockWidgetHeaderDrag::slotFocusChanged(QFocusEvent *e)
}
-void KNDockWidgetHeaderDrag::paintEvent(QPaintEvent* ev)
+void KNDockWidgetHeaderDrag::paintEvent(TQPaintEvent* ev)
{
if (!f_ocus) {
KDockWidgetHeaderDrag::paintEvent(ev);
return;
}
- QPixmap drawBuffer(width(), height());
- QPainter paint;
+ TQPixmap drawBuffer(width(), height());
+ TQPainter paint;
paint.begin(&drawBuffer);
- paint.fillRect(drawBuffer.rect(), QBrush(colorGroup().brush(QColorGroup::Background)));
+ paint.fillRect(drawBuffer.rect(), TQBrush(colorGroup().brush(TQColorGroup::Background)));
paint.setPen(palette().active().highlight());
paint.drawLine(1, 2, width(), 2);
diff --git a/knode/knwidgets.h b/knode/knwidgets.h
index af71bd5f0..7e8dd7d3b 100644
--- a/knode/knwidgets.h
+++ b/knode/knwidgets.h
@@ -17,8 +17,8 @@
#ifndef KNWIDGETS_H
#define KNWIDGETS_H
-#include <qlistbox.h>
-#include <qbitarray.h>
+#include <tqlistbox.h>
+#include <tqbitarray.h>
#include <kdockwidget.h>
#include <kprogress.h>
@@ -29,19 +29,19 @@ class QPixmap;
//====================================================================================
-class KNListBoxItem : public QListBoxItem {
+class KNListBoxItem : public TQListBoxItem {
public:
- KNListBoxItem(const QString& text, QPixmap *pm=0);
+ KNListBoxItem(const TQString& text, TQPixmap *pm=0);
~KNListBoxItem();
protected:
- virtual void paint(QPainter *);
- virtual int height(const QListBox *) const;
- virtual int width(const QListBox *) const;
+ virtual void paint(TQPainter *);
+ virtual int height(const TQListBox *) const;
+ virtual int width(const TQListBox *) const;
- QPixmap *p_m;
+ TQPixmap *p_m;
};
@@ -53,11 +53,11 @@ class KNDialogListBox : public QListBox
{
public:
// alwaysIgnore==false: enter is ignored when the widget isn't visible/out of focus
- KNDialogListBox(bool alwaysIgnore=false, QWidget * parent=0, const char * name=0);
+ KNDialogListBox(bool alwaysIgnore=false, TQWidget * parent=0, const char * name=0);
~KNDialogListBox();
protected:
- void keyPressEvent( QKeyEvent *e );
+ void keyPressEvent( TQKeyEvent *e );
bool a_lwaysIgnore;
};
@@ -71,15 +71,15 @@ class KNDockWidgetHeaderDrag : public KDockWidgetHeaderDrag
Q_OBJECT
public:
- KNDockWidgetHeaderDrag(QWidget *focusWidget, KDockWidgetAbstractHeader* parent, KDockWidget* dock,
+ KNDockWidgetHeaderDrag(TQWidget *focusWidget, KDockWidgetAbstractHeader* parent, KDockWidget* dock,
const char* name = 0);
virtual ~KNDockWidgetHeaderDrag();
protected slots:
- void slotFocusChanged(QFocusEvent *e);
+ void slotFocusChanged(TQFocusEvent *e);
protected:
- virtual void paintEvent( QPaintEvent* );
+ virtual void paintEvent( TQPaintEvent* );
bool f_ocus;
};
diff --git a/knode/utilities.cpp b/knode/utilities.cpp
index 5f9c2e98c..67d4e3bac 100644
--- a/knode/utilities.cpp
+++ b/knode/utilities.cpp
@@ -12,10 +12,10 @@
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, US
*/
-#include <qlayout.h>
-#include <qregexp.h>
-#include <qapplication.h>
-#include <qcursor.h>
+#include <tqlayout.h>
+#include <tqregexp.h>
+#include <tqapplication.h>
+#include <tqcursor.h>
#include <klocale.h>
#include <kmessagebox.h>
@@ -33,8 +33,8 @@
//================================================================================
-KNFile::KNFile(const QString& fname)
- : QFile(fname), filePos(0), readBytes(0)
+KNFile::KNFile(const TQString& fname)
+ : TQFile(fname), filePos(0), readBytes(0)
{
buffer.resize(512);
dataPtr=buffer.data();
@@ -47,15 +47,15 @@ KNFile::~KNFile()
}
-const QCString& KNFile::readLine()
+const TQCString& KNFile::readLine()
{
filePos=at();
- readBytes=QFile::readLine(dataPtr, buffer.size()-1);
+ readBytes=TQFile::readLine(dataPtr, buffer.size()-1);
if(readBytes!=-1) {
while ((dataPtr[readBytes-1]!='\n')&&(static_cast<uint>(readBytes+2)==buffer.size())) { // don't get tricked by files without newline
at(filePos);
if (!increaseBuffer() ||
- (readBytes=QFile::readLine(dataPtr, buffer.size()-1))==-1) {
+ (readBytes=TQFile::readLine(dataPtr, buffer.size()-1))==-1) {
readBytes=1;
break;
}
@@ -68,15 +68,15 @@ const QCString& KNFile::readLine()
}
-const QCString& KNFile::readLineWnewLine()
+const TQCString& KNFile::readLineWnewLine()
{
filePos=at();
- readBytes=QFile::readLine(dataPtr, buffer.size()-1);
+ readBytes=TQFile::readLine(dataPtr, buffer.size()-1);
if(readBytes!=-1) {
while ((dataPtr[readBytes-1]!='\n')&&(static_cast<uint>(readBytes+2)==buffer.size())) { // don't get tricked by files without newline
at(filePos);
if (!increaseBuffer() ||
- (readBytes=QFile::readLine(dataPtr, buffer.size()-1))==-1) {
+ (readBytes=TQFile::readLine(dataPtr, buffer.size()-1))==-1) {
dataPtr[0] = '\0';
break;
}
@@ -90,7 +90,7 @@ const QCString& KNFile::readLineWnewLine()
int KNFile::findString(const char *s)
{
- QCString searchBuffer;
+ TQCString searchBuffer;
searchBuffer.resize(2048);
char *buffPtr = searchBuffer.data(), *pos;
int readBytes, currentFilePos;
@@ -132,9 +132,9 @@ bool KNFile::increaseBuffer()
//===============================================================================
-QString KNSaveHelper::lastPath;
+TQString KNSaveHelper::lastPath;
-KNSaveHelper::KNSaveHelper(QString saveName, QWidget *parent)
+KNSaveHelper::KNSaveHelper(TQString saveName, TQWidget *parent)
: p_arent(parent), s_aveName(saveName), file(0), tmpFile(0)
{
}
@@ -155,9 +155,9 @@ KNSaveHelper::~KNSaveHelper()
}
-QFile* KNSaveHelper::getFile(const QString &dialogTitle)
+TQFile* KNSaveHelper::getFile(const TQString &dialogTitle)
{
- url = KFileDialog::getSaveURL(lastPath + s_aveName, QString::null, p_arent, dialogTitle);
+ url = KFileDialog::getSaveURL(lastPath + s_aveName, TQString::null, p_arent, dialogTitle);
if (url.isEmpty())
return 0;
@@ -165,14 +165,14 @@ QFile* KNSaveHelper::getFile(const QString &dialogTitle)
lastPath = url.upURL().url();
if (url.isLocalFile()) {
- if (QFileInfo(url.path()).exists() &&
+ if (TQFileInfo(url.path()).exists() &&
(KMessageBox::warningContinueCancel(knGlobals.topWidget,
i18n("<qt>A file named <b>%1</b> already exists.<br>Do you want to replace it?</qt>").arg(url.path()),
dialogTitle, i18n("&Replace")) != KMessageBox::Continue)) {
return 0;
}
- file = new QFile(url.path());
+ file = new TQFile(url.path());
if(!file->open(IO_WriteOnly)) {
KNHelper::displayExternalFileError();
delete file;
@@ -194,9 +194,9 @@ QFile* KNSaveHelper::getFile(const QString &dialogTitle)
//===============================================================================
-QString KNLoadHelper::l_astPath;
+TQString KNLoadHelper::l_astPath;
-KNLoadHelper::KNLoadHelper(QWidget *parent)
+KNLoadHelper::KNLoadHelper(TQWidget *parent)
: p_arent(parent), f_ile(0)
{
}
@@ -210,12 +210,12 @@ KNLoadHelper::~KNLoadHelper()
}
-KNFile* KNLoadHelper::getFile( const QString &dialogTitle )
+KNFile* KNLoadHelper::getFile( const TQString &dialogTitle )
{
if (f_ile)
return f_ile;
- KURL url = KFileDialog::getOpenURL(l_astPath,QString::null,p_arent,dialogTitle);
+ KURL url = KFileDialog::getOpenURL(l_astPath,TQString::null,p_arent,dialogTitle);
if (url.isEmpty())
return 0;
@@ -237,7 +237,7 @@ KNFile* KNLoadHelper::setURL(KURL url)
if (u_rl.isEmpty())
return 0;
- QString fileName;
+ TQString fileName;
if (!u_rl.isLocalFile()) {
if (KIO::NetAccess::download(u_rl, t_empName, 0))
fileName = t_empName;
@@ -261,26 +261,26 @@ KNFile* KNLoadHelper::setURL(KURL url)
// **** keyboard selection dialog *********************************************
-int KNHelper::selectDialog(QWidget *parent, const QString &caption, const QStringList &options, int initialValue)
+int KNHelper::selectDialog(TQWidget *parent, const TQString &caption, const TQStringList &options, int initialValue)
{
KDialogBase *dlg=new KDialogBase(KDialogBase::Plain, caption, KDialogBase::Ok|KDialogBase::Cancel,
KDialogBase::Ok, parent);
- QFrame *page = dlg->plainPage();
- QHBoxLayout *pageL = new QHBoxLayout(page,8,5);
+ TQFrame *page = dlg->plainPage();
+ TQHBoxLayout *pageL = new TQHBoxLayout(page,8,5);
KNDialogListBox *list = new KNDialogListBox(true, page);
pageL->addWidget(list);
- QString s;
- for ( QStringList::ConstIterator it = options.begin(); it != options.end(); ++it ) {
+ TQString s;
+ for ( TQStringList::ConstIterator it = options.begin(); it != options.end(); ++it ) {
s = (*it);
- s.replace(QRegExp("&"),""); // remove accelerators
+ s.replace(TQRegExp("&"),""); // remove accelerators
list->insertItem(s);
}
list->setCurrentItem(initialValue);
list->setFocus();
- restoreWindowSize("selectBox", dlg, QSize(247,174));
+ restoreWindowSize("selectBox", dlg, TQSize(247,174));
int ret;
if (dlg->exec())
@@ -295,7 +295,7 @@ int KNHelper::selectDialog(QWidget *parent, const QString &caption, const QStrin
// **** window geometry managing *********************************************
-void KNHelper::saveWindowSize(const QString &name, const QSize &s)
+void KNHelper::saveWindowSize(const TQString &name, const TQSize &s)
{
KConfig *c=knGlobals.config();
c->setGroup("WINDOW_SIZES");
@@ -303,15 +303,15 @@ void KNHelper::saveWindowSize(const QString &name, const QSize &s)
}
-void KNHelper::restoreWindowSize(const QString &name, QWidget *d, const QSize &defaultSize)
+void KNHelper::restoreWindowSize(const TQString &name, TQWidget *d, const TQSize &defaultSize)
{
KConfig *c=knGlobals.config();
c->setGroup("WINDOW_SIZES");
- QSize s=c->readSizeEntry(name,&defaultSize);
+ TQSize s=c->readSizeEntry(name,&defaultSize);
if(s.isValid()) {
- QRect max = KGlobalSettings::desktopGeometry(QCursor::pos());
+ TQRect max = KGlobalSettings::desktopGeometry(TQCursor::pos());
if ( s.width() > max.width() ) s.setWidth( max.width()-5 );
if ( s.height() > max.height() ) s.setHeight( max.height()-5 );
d->resize(s);
@@ -320,10 +320,10 @@ void KNHelper::restoreWindowSize(const QString &name, QWidget *d, const QSize &d
// **** scramble password strings **********************************************
-const QString KNHelper::encryptStr(const QString& aStr)
+const TQString KNHelper::encryptStr(const TQString& aStr)
{
uint i,val,len = aStr.length();
- QCString result;
+ TQCString result;
for (i=0; i<len; i++)
{
@@ -336,25 +336,25 @@ const QString KNHelper::encryptStr(const QString& aStr)
}
-const QString KNHelper::decryptStr(const QString& aStr)
+const TQString KNHelper::decryptStr(const TQString& aStr)
{
return encryptStr(aStr);
}
// **** rot13 *******************************************************************
-QString KNHelper::rot13(const QString &s)
+TQString KNHelper::rot13(const TQString &s)
{
- QString r(s);
+ TQString r(s);
for (int i=0; (uint)i<r.length(); i++) {
- if ( r[i] >= QChar('A') && r[i] <= QChar('M') ||
- r[i] >= QChar('a') && r[i] <= QChar('m') )
- r[i] = (char)((int)QChar(r[i]) + 13);
+ if ( r[i] >= TQChar('A') && r[i] <= TQChar('M') ||
+ r[i] >= TQChar('a') && r[i] <= TQChar('m') )
+ r[i] = (char)((int)TQChar(r[i]) + 13);
else
- if ( r[i] >= QChar('N') && r[i] <= QChar('Z') ||
- r[i] >= QChar('n') && r[i] <= QChar('z') )
- r[i] = (char)((int)QChar(r[i]) - 13);
+ if ( r[i] >= TQChar('N') && r[i] <= TQChar('Z') ||
+ r[i] >= TQChar('n') && r[i] <= TQChar('z') )
+ r[i] = (char)((int)TQChar(r[i]) - 13);
}
return r;
@@ -362,7 +362,7 @@ QString KNHelper::rot13(const QString &s)
// **** text rewraping *********************************************************
-int findBreakPos(const QString &text, int start)
+int findBreakPos(const TQString &text, int start)
{
int i;
for(i=start;i>=0;i--)
@@ -377,9 +377,9 @@ int findBreakPos(const QString &text, int start)
}
-void appendTextWPrefix(QString &result, const QString &text, int wrapAt, const QString &prefix)
+void appendTextWPrefix(TQString &result, const TQString &text, int wrapAt, const TQString &prefix)
{
- QString txt=text;
+ TQString txt=text;
int breakPos;
while(!txt.isEmpty()) {
@@ -390,18 +390,18 @@ void appendTextWPrefix(QString &result, const QString &text, int wrapAt, const Q
txt.remove(0,breakPos+1);
} else {
result+=(prefix+txt+"\n");
- txt=QString::null;
+ txt=TQString::null;
}
}
}
-QString KNHelper::rewrapStringList(QStringList text, int wrapAt, QChar quoteChar, bool stopAtSig, bool alwaysSpace)
+TQString KNHelper::rewrapStringList(TQStringList text, int wrapAt, TQChar quoteChar, bool stopAtSig, bool alwaysSpace)
{
- QString quoted, lastPrefix, thisPrefix, leftover, thisLine;
+ TQString quoted, lastPrefix, thisPrefix, leftover, thisLine;
int breakPos;
- for(QStringList::Iterator line=text.begin(); line!=text.end(); ++line) {
+ for(TQStringList::Iterator line=text.begin(); line!=text.end(); ++line) {
if(stopAtSig && (*line)=="-- ")
break;
@@ -412,8 +412,8 @@ QString KNHelper::rewrapStringList(QStringList text, int wrapAt, QChar quoteChar
else
thisLine.prepend(quoteChar+' ');
- thisPrefix=QString::null;
- QChar c;
+ thisPrefix=TQString::null;
+ TQChar c;
for(int idx=0; idx<(int)(thisLine.length()); idx++) {
c=thisLine.at(idx);
if( (c==' ') ||
@@ -431,7 +431,7 @@ QString KNHelper::rewrapStringList(QStringList text, int wrapAt, QChar quoteChar
appendTextWPrefix(quoted, leftover, wrapAt, lastPrefix);
else
thisLine.prepend(leftover+" ");
- leftover=QString::null;
+ leftover=TQString::null;
}
if((int)(thisPrefix.length()+thisLine.length()) > wrapAt) {
@@ -454,25 +454,25 @@ QString KNHelper::rewrapStringList(QStringList text, int wrapAt, QChar quoteChar
// **** misc. message-boxes **********************************************************
-void KNHelper::displayInternalFileError(QWidget *w)
+void KNHelper::displayInternalFileError(TQWidget *w)
{
KMessageBox::error((w!=0)? w : knGlobals.topWidget, i18n("Unable to load/save configuration.\nWrong permissions on home folder?\nYou should close KNode now to avoid data loss."));
}
-void KNHelper::displayExternalFileError(QWidget *w)
+void KNHelper::displayExternalFileError(TQWidget *w)
{
KMessageBox::error((w!=0)? w : knGlobals.topWidget, i18n("Unable to load/save file."));
}
-void KNHelper::displayRemoteFileError(QWidget *w)
+void KNHelper::displayRemoteFileError(TQWidget *w)
{
KMessageBox::error((w!=0)? w : knGlobals.topWidget, i18n("Unable to save remote file."));
}
-void KNHelper::displayTempFileError(QWidget *w)
+void KNHelper::displayTempFileError(TQWidget *w)
{
KMessageBox::error((w!=0)? w : knGlobals.topWidget, i18n("Unable to create temporary file."));
}
diff --git a/knode/utilities.h b/knode/utilities.h
index 31f83d989..9d0180961 100644
--- a/knode/utilities.h
+++ b/knode/utilities.h
@@ -17,11 +17,11 @@
#include <kurl.h>
-#include <qfile.h>
+#include <tqfile.h>
-#include <qglobal.h>
-#include <qptrvector.h>
-#include <qptrlist.h>
+#include <tqglobal.h>
+#include <tqptrvector.h>
+#include <tqptrlist.h>
class QWidget;
class QString;
@@ -36,18 +36,18 @@ class KTempFile;
// utility classes
//*****************************************************************************
-/** clone of QSortedList... */
-template<class type> class Q_EXPORT QSortedVector : public QPtrVector<type>
+/** clone of TQSortedList... */
+template<class type> class Q_EXPORT QSortedVector : public TQPtrVector<type>
{
public:
QSortedVector() {}
- QSortedVector ( uint size ) : QPtrVector<type>(size) {}
- QSortedVector( const QSortedVector<type> &l ) : QPtrVector<type>(l) {}
- ~QSortedVector() { QPtrVector<type>::clear(); }
+ QSortedVector ( uint size ) : TQPtrVector<type>(size) {}
+ QSortedVector( const QSortedVector<type> &l ) : TQPtrVector<type>(l) {}
+ ~QSortedVector() { TQPtrVector<type>::clear(); }
QSortedVector<type> &operator=(const QSortedVector<type> &l)
- { return (QSortedVector<type>&)QPtrList<type>::operator=(l); }
+ { return (QSortedVector<type>&)TQPtrList<type>::operator=(l); }
- virtual int compareItems( QPtrCollection::Item s1, QPtrCollection::Item s2 )
+ virtual int compareItems( TQPtrCollection::Item s1, TQPtrCollection::Item s2 )
{ if ( *((type*)s1) == *((type*)s2) ) return 0; return ( *((type*)s1) < *((type*)s2) ? -1 : 1 ); }
};
@@ -55,13 +55,13 @@ public:
//==============================================================================
-class KNFile : public QFile {
+class KNFile : public TQFile {
public:
- KNFile(const QString& fname=QString::null);
+ KNFile(const TQString& fname=TQString::null);
~KNFile();
- const QCString& readLine();
- const QCString& readLineWnewLine();
+ const TQCString& readLine();
+ const TQCString& readLineWnewLine();
/** searches for the string from the current file position
returns -1 when the string wasn't found. */
int findString(const char *s);
@@ -69,7 +69,7 @@ class KNFile : public QFile {
protected:
bool increaseBuffer();
- QCString buffer;
+ TQCString buffer;
char *dataPtr;
int filePos, readBytes;
};
@@ -82,20 +82,20 @@ class KNSaveHelper {
public:
- KNSaveHelper(QString saveName, QWidget *parent);
+ KNSaveHelper(TQString saveName, TQWidget *parent);
~KNSaveHelper();
/** returns a file open for writing */
- QFile* getFile(const QString &dialogTitle);
+ TQFile* getFile(const TQString &dialogTitle);
private:
- QWidget *p_arent;
- QString s_aveName;
+ TQWidget *p_arent;
+ TQString s_aveName;
KURL url;
- QFile* file;
+ TQFile* file;
KTempFile* tmpFile;
- static QString lastPath;
+ static TQString lastPath;
};
@@ -107,25 +107,25 @@ class KNLoadHelper {
public:
- KNLoadHelper(QWidget *parent);
+ KNLoadHelper(TQWidget *parent);
~KNLoadHelper();
/** opens a file dialog and returns a file open for reading */
- KNFile* getFile( const QString &dialogTitle );
+ KNFile* getFile( const TQString &dialogTitle );
/** tries to access the file specified by the url and returns
a file open for reading */
KNFile* setURL(KURL url);
- /** returns the file after getFile(QString) of setURL(url) was called */
+ /** returns the file after getFile(TQString) of setURL(url) was called */
KNFile* getFile()const { return f_ile; };
KURL getURL() const { return u_rl; };
private:
- QWidget *p_arent;
+ TQWidget *p_arent;
KURL u_rl;
KNFile *f_ile;
- QString t_empName;
- static QString l_astPath;
+ TQString t_empName;
+ static TQString l_astPath;
};
@@ -140,26 +140,26 @@ public:
/** list selection dialog, used instead of a popup menu
when a select action is called via the keyboard.
returns -1 when the user canceled the dialog. */
- static int selectDialog(QWidget *parent, const QString &caption, const QStringList &options, int initialValue);
+ static int selectDialog(TQWidget *parent, const TQString &caption, const TQStringList &options, int initialValue);
- static void saveWindowSize(const QString &name, const QSize &s);
- static void restoreWindowSize(const QString &name, QWidget *d, const QSize &defaultSize);
+ static void saveWindowSize(const TQString &name, const TQSize &s);
+ static void restoreWindowSize(const TQString &name, TQWidget *d, const TQSize &defaultSize);
- static const QString encryptStr(const QString& aStr);
- static const QString decryptStr(const QString& aStr);
- static QString rot13(const QString &s);
+ static const TQString encryptStr(const TQString& aStr);
+ static const TQString decryptStr(const TQString& aStr);
+ static TQString rot13(const TQString &s);
/** used for rewarping a text when replying to a message or inserting a file into a box */
- static QString rewrapStringList(QStringList text, int wrapAt, QChar quoteChar, bool stopAtSig, bool alwaysSpace);
+ static TQString rewrapStringList(TQStringList text, int wrapAt, TQChar quoteChar, bool stopAtSig, bool alwaysSpace);
/** use this for all internal files */
- static void displayInternalFileError(QWidget *w=0);
+ static void displayInternalFileError(TQWidget *w=0);
/** use this for all external files */
- static void displayExternalFileError(QWidget *w=0);
+ static void displayExternalFileError(TQWidget *w=0);
/** use this for remote files */
- static void displayRemoteFileError(QWidget *w=0);
+ static void displayRemoteFileError(TQWidget *w=0);
/** use this for error on temporary files */
- static void displayTempFileError(QWidget *w=0);
+ static void displayTempFileError(TQWidget *w=0);
};
diff --git a/knotes/KNotesAppIface.h b/knotes/KNotesAppIface.h
index f97776fdb..7ddfdc28a 100644
--- a/knotes/KNotesAppIface.h
+++ b/knotes/KNotesAppIface.h
@@ -32,8 +32,8 @@
#ifndef __KNotesAppIface_h__
#define __KNotesAppIface_h__
-#include <qstring.h>
-#include <qmap.h>
+#include <tqstring.h>
+#include <tqmap.h>
#include <dcopobject.h>
@@ -49,8 +49,8 @@ k_dcop:
* @param text the body of the new note
* @return the new notes' id
*/
- virtual QString newNote( const QString& name = QString::null,
- const QString& text = QString::null ) = 0;
+ virtual TQString newNote( const TQString& name = TQString::null,
+ const TQString& text = TQString::null ) = 0;
/**
* Create a new note and inserts the current text in the clipboard
@@ -60,54 +60,54 @@ k_dcop:
* KNotes will choose an appropriate name
* @return the new notes' id
*/
- virtual QString newNoteFromClipboard( const QString& name = QString::null ) = 0;
+ virtual TQString newNoteFromClipboard( const TQString& name = TQString::null ) = 0;
/**
* Deletes a note forever.
* @param noteId the id of the note to kill
*/
- virtual ASYNC killNote( const QString& noteId ) = 0;
+ virtual ASYNC killNote( const TQString& noteId ) = 0;
/**
* Deletes a note forever.
* @param noteId the id of the note to kill
* @param force do not request confirmation
*/
- virtual ASYNC killNote( const QString& noteId, bool force ) = 0;
+ virtual ASYNC killNote( const TQString& noteId, bool force ) = 0;
/**
* Get all the notes including their ids.
- * @return a QMap that maps the id of a note to its name
+ * @return a TQMap that maps the id of a note to its name
*/
- virtual QMap<QString,QString> notes() const = 0;
+ virtual TQMap<TQString,TQString> notes() const = 0;
/**
* Changes the title/name of a note.
* @param noteId the id of the note to be modified
* @param newName the new title
*/
- virtual ASYNC setName( const QString& noteId, const QString& newName ) = 0;
+ virtual ASYNC setName( const TQString& noteId, const TQString& newName ) = 0;
/**
* Sets the text of a note. This will delete the old text!
* @param noteId the id of the note
* @param newText the new text for the note
*/
- virtual ASYNC setText( const QString& noteId, const QString& newText ) = 0;
+ virtual ASYNC setText( const TQString& noteId, const TQString& newText ) = 0;
/**
* Returns the foreground/text color of a note.
* @param noteId the id of the note in question
* @return the foreground/text color as a QString
*/
- virtual QString fgColor( const QString& noteId ) const = 0;
+ virtual TQString fgColor( const TQString& noteId ) const = 0;
/**
* Returns the background color of a note.
* @param noteId the id of the note in question
* @return the background color as a QString
*/
- virtual QString bgColor( const QString& noteId ) const = 0;
+ virtual TQString bgColor( const TQString& noteId ) const = 0;
/**
* Sets the color (foreground and background color) of a note.
@@ -115,22 +115,22 @@ k_dcop:
* @param fgColor the new text color for the note
* @param bgColor the new background color for the note
*/
- virtual ASYNC setColor( const QString& noteId, const QString& fgColor,
- const QString& bgColor ) = 0;
+ virtual ASYNC setColor( const TQString& noteId, const TQString& fgColor,
+ const TQString& bgColor ) = 0;
/**
* Returns the title/name of a note.
* @param noteId the id of the note in question
* @return the name as a QString
*/
- virtual QString name( const QString& noteId ) const = 0;
+ virtual TQString name( const TQString& noteId ) const = 0;
/**
* Returns the text of a note.
* @param noteId the id of the note in question
* @return the body as a QString
*/
- virtual QString text( const QString& noteId ) const = 0;
+ virtual TQString text( const TQString& noteId ) const = 0;
/******** HERE STARTS THE KNotesAppIface DCOP INTERFACE EXTENSION ********/
@@ -139,13 +139,13 @@ k_dcop:
* Show a note as if it had been selected from the "notes" menu.
* @param noteId the id of the note to show
*/
- virtual ASYNC showNote( const QString& noteId ) const = 0;
+ virtual ASYNC showNote( const TQString& noteId ) const = 0;
/**
* Hide a note.
* @param noteId the id of the note to hide
*/
- virtual ASYNC hideNote( const QString& noteId ) const = 0;
+ virtual ASYNC hideNote( const TQString& noteId ) const = 0;
/**
* Show all notes on their respective desktops.
@@ -162,14 +162,14 @@ k_dcop:
* @param noteId the id of the note in question
* @return the width as a uint
*/
- virtual int width( const QString& noteId ) const = 0;
+ virtual int width( const TQString& noteId ) const = 0;
/**
* Returns the height of a note.
* @param noteId the id of the note in question
* @return the height as a uint
*/
- virtual int height( const QString& noteId ) const = 0;
+ virtual int height( const TQString& noteId ) const = 0;
/**
* Repositions a note.
@@ -177,7 +177,7 @@ k_dcop:
* @param x the new x-coordinate of the note
* @param y the new y-coordinate of the note
*/
- virtual ASYNC move( const QString& noteId, int x, int y ) const = 0;
+ virtual ASYNC move( const TQString& noteId, int x, int y ) const = 0;
/**
* Changes the size of a note.
@@ -185,13 +185,13 @@ k_dcop:
* @param width the new width of the note
* @param height the new height of the note
*/
- virtual ASYNC resize( const QString& noteId, int width, int height ) const = 0;
+ virtual ASYNC resize( const TQString& noteId, int width, int height ) const = 0;
/**
* This tells KNotes that a specific app has synchronized with all the notes.
* @param app the app that has synced with KNotes
*/
- virtual ASYNC sync( const QString& app ) = 0;
+ virtual ASYNC sync( const TQString& app ) = 0;
/**
* Test if a note was created new after the last sync.
@@ -200,7 +200,7 @@ k_dcop:
* @return true if the note is new, false if not or if the note does
* not exist
*/
- virtual bool isNew( const QString& app, const QString& noteId ) const = 0;
+ virtual bool isNew( const TQString& app, const TQString& noteId ) const = 0;
/**
* Test if a note was modified since the last sync.
@@ -209,7 +209,7 @@ k_dcop:
* @return true if modified (note that this will return true if the note is
* new as well!) and false if the note is not modified or doesn't exist
*/
- virtual bool isModified( const QString& app, const QString& noteId ) const = 0;
+ virtual bool isModified( const TQString& app, const TQString& noteId ) const = 0;
};
#endif
diff --git a/knotes/KNotesIface.h b/knotes/KNotesIface.h
index b1d22de3a..dc9cd41de 100644
--- a/knotes/KNotesIface.h
+++ b/knotes/KNotesIface.h
@@ -22,8 +22,8 @@
#ifndef __KNotesIface_h__
#define __KNotesIface_h__
-#include <qstring.h>
-#include <qmap.h>
+#include <tqstring.h>
+#include <tqmap.h>
#include <dcopobject.h>
@@ -39,8 +39,8 @@ k_dcop:
* @param text the body of the new note
* @return the new notes' id
*/
- virtual QString newNote( const QString& name = QString::null,
- const QString& text = QString::null ) = 0;
+ virtual TQString newNote( const TQString& name = TQString::null,
+ const TQString& text = TQString::null ) = 0;
/**
* Create a new note and inserts the current text in the clipboard
@@ -50,54 +50,54 @@ k_dcop:
* KNotes will choose an appropriate name
* @return the new notes' id
*/
- virtual QString newNoteFromClipboard( const QString& name = QString::null ) = 0;
+ virtual TQString newNoteFromClipboard( const TQString& name = TQString::null ) = 0;
/**
* Deletes a note forever.
* @param noteId the id of the note to kill
*/
- virtual ASYNC killNote( const QString& noteId ) = 0;
+ virtual ASYNC killNote( const TQString& noteId ) = 0;
/**
* Deletes a note forever.
* @param noteId the id of the note to kill
* @param force do not request confirmation
*/
- virtual ASYNC killNote( const QString& noteId, bool force ) = 0;
+ virtual ASYNC killNote( const TQString& noteId, bool force ) = 0;
/**
* Get all the notes including their ids.
- * @return a QMap that maps the id of a note to its name
+ * @return a TQMap that maps the id of a note to its name
*/
- virtual QMap<QString,QString> notes() const = 0;
+ virtual TQMap<TQString,TQString> notes() const = 0;
/**
* Changes the title/name of a note.
* @param noteId the id of the note to be modified
* @param newName the new title
*/
- virtual ASYNC setName( const QString& noteId, const QString& newName ) = 0;
+ virtual ASYNC setName( const TQString& noteId, const TQString& newName ) = 0;
/**
* Sets the text of a note. This will delete the old text!
* @param noteId the id of the note
* @param newText the new text for the note
*/
- virtual ASYNC setText( const QString& noteId, const QString& newText ) = 0;
+ virtual ASYNC setText( const TQString& noteId, const TQString& newText ) = 0;
/**
* Returns the title/name of a note.
* @param noteId the id of the note in question
* @return the name as a QString
*/
- virtual QString name( const QString& noteId ) const = 0;
+ virtual TQString name( const TQString& noteId ) const = 0;
/**
* Returns the text of a note.
* @param noteId the id of the note in question
* @return the body as a QString
*/
- virtual QString text( const QString& noteId ) const = 0;
+ virtual TQString text( const TQString& noteId ) const = 0;
};
#endif
diff --git a/knotes/knote.cpp b/knotes/knote.cpp
index 795da8a16..1e55dd14c 100644
--- a/knotes/knote.cpp
+++ b/knotes/knote.cpp
@@ -18,18 +18,18 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*******************************************************************/
-#include <qlabel.h>
-#include <qdrawutil.h>
-#include <qsize.h>
-#include <qsizegrip.h>
-#include <qbitmap.h>
-#include <qcursor.h>
-#include <qpainter.h>
-#include <qpaintdevicemetrics.h>
-#include <qsimplerichtext.h>
-#include <qobjectlist.h>
-#include <qfile.h>
-#include <qcheckbox.h>
+#include <tqlabel.h>
+#include <tqdrawutil.h>
+#include <tqsize.h>
+#include <tqsizegrip.h>
+#include <tqbitmap.h>
+#include <tqcursor.h>
+#include <tqpainter.h>
+#include <tqpaintdevicemetrics.h>
+#include <tqsimplerichtext.h>
+#include <tqobjectlist.h>
+#include <tqfile.h>
+#include <tqcheckbox.h>
#include <kapplication.h>
#include <kdebug.h>
@@ -80,8 +80,8 @@ extern Time qt_x_time;
int KNote::s_ppOffset = 0;
-KNote::KNote( QDomDocument buildDoc, Journal *j, QWidget *parent, const char *name )
- : QFrame( parent, name, WStyle_Customize | WStyle_NoBorder | WDestructiveClose ),
+KNote::KNote( TQDomDocument buildDoc, Journal *j, TQWidget *parent, const char *name )
+ : TQFrame( parent, name, WStyle_Customize | WStyle_NoBorder | WDestructiveClose ),
m_label( 0 ), m_pushpin( 0 ), m_fold( 0 ), m_button( 0 ), m_tool( 0 ), m_editor( 0 ),
m_config( 0 ), m_journal( j ), m_find( 0 ),
m_kwinConf( KSharedConfig::openConfig( "kwinrc", true ) )
@@ -98,70 +98,70 @@ KNote::KNote( QDomDocument buildDoc, Journal *j, QWidget *parent, const char *na
// (KOrganizer's journals don't have titles but a valid start date)
if ( m_journal->summary().isNull() && m_journal->dtStart().isValid() )
{
- QString s = KGlobal::locale()->formatDateTime( m_journal->dtStart() );
+ TQString s = KGlobal::locale()->formatDateTime( m_journal->dtStart() );
m_journal->setSummary( s );
}
// create the menu items for the note - not the editor...
// rename, mail, print, save as, insert date, alarm, close, delete, new note
new KAction( i18n("New"), "filenew", 0,
- this, SIGNAL(sigRequestNewNote()), actionCollection(), "new_note" );
+ this, TQT_SIGNAL(sigRequestNewNote()), actionCollection(), "new_note" );
new KAction( i18n("Rename..."), "text", 0,
- this, SLOT(slotRename()), actionCollection(), "rename_note" );
+ this, TQT_SLOT(slotRename()), actionCollection(), "rename_note" );
m_readOnly = new KToggleAction( i18n("Lock"), "lock" , 0,
- this, SLOT(slotUpdateReadOnly()), actionCollection(), "lock_note" );
+ this, TQT_SLOT(slotUpdateReadOnly()), actionCollection(), "lock_note" );
m_readOnly->setCheckedState( KGuiItem( i18n("Unlock"), "unlock" ) );
new KAction( i18n("Hide"), "fileclose" , Key_Escape,
- this, SLOT(slotClose()), actionCollection(), "hide_note" );
+ this, TQT_SLOT(slotClose()), actionCollection(), "hide_note" );
new KAction( i18n("Delete"), "knotes_delete", 0,
- this, SLOT(slotKill()), actionCollection(), "delete_note" );
+ this, TQT_SLOT(slotKill()), actionCollection(), "delete_note" );
new KAction( i18n("Insert Date"), "knotes_date", 0 ,
- this, SLOT(slotInsDate()), actionCollection(), "insert_date" );
+ this, TQT_SLOT(slotInsDate()), actionCollection(), "insert_date" );
new KAction( i18n("Set Alarm..."), "knotes_alarm", 0 ,
- this, SLOT(slotSetAlarm()), actionCollection(), "set_alarm" );
+ this, TQT_SLOT(slotSetAlarm()), actionCollection(), "set_alarm" );
new KAction( i18n("Send..."), "network", 0,
- this, SLOT(slotSend()), actionCollection(), "send_note" );
+ this, TQT_SLOT(slotSend()), actionCollection(), "send_note" );
new KAction( i18n("Mail..."), "mail_send", 0,
- this, SLOT(slotMail()), actionCollection(), "mail_note" );
+ this, TQT_SLOT(slotMail()), actionCollection(), "mail_note" );
new KAction( i18n("Save As..."), "filesaveas", 0,
- this, SLOT(slotSaveAs()), actionCollection(), "save_note" );
- KStdAction::print( this, SLOT(slotPrint()), actionCollection(), "print_note" );
+ this, TQT_SLOT(slotSaveAs()), actionCollection(), "save_note" );
+ KStdAction::print( this, TQT_SLOT(slotPrint()), actionCollection(), "print_note" );
new KAction( i18n("Preferences..."), "configure", 0,
- this, SLOT(slotPreferences()), actionCollection(), "configure_note" );
+ this, TQT_SLOT(slotPreferences()), actionCollection(), "configure_note" );
m_keepAbove = new KToggleAction( i18n("Keep Above Others"), "up", 0,
- this, SLOT(slotUpdateKeepAboveBelow()), actionCollection(), "keep_above" );
+ this, TQT_SLOT(slotUpdateKeepAboveBelow()), actionCollection(), "keep_above" );
m_keepAbove->setExclusiveGroup( "keepAB" );
m_keepBelow = new KToggleAction( i18n("Keep Below Others"), "down", 0,
- this, SLOT(slotUpdateKeepAboveBelow()), actionCollection(), "keep_below" );
+ this, TQT_SLOT(slotUpdateKeepAboveBelow()), actionCollection(), "keep_below" );
m_keepBelow->setExclusiveGroup( "keepAB" );
m_toDesktop = new KListAction( i18n("To Desktop"), 0,
- this, SLOT(slotPopupActionToDesktop(int)), actionCollection(), "to_desktop" );
- connect( m_toDesktop->popupMenu(), SIGNAL(aboutToShow()), this, SLOT(slotUpdateDesktopActions()) );
+ this, TQT_SLOT(slotPopupActionToDesktop(int)), actionCollection(), "to_desktop" );
+ connect( m_toDesktop->popupMenu(), TQT_SIGNAL(aboutToShow()), this, TQT_SLOT(slotUpdateDesktopActions()) );
// invisible action to walk through the notes to make this configurable
new KAction( i18n("Walk Through Notes"), 0, SHIFT+Key_BackTab,
- this, SIGNAL(sigShowNextNote()), actionCollection(), "walk_notes" );
+ this, TQT_SIGNAL(sigShowNextNote()), actionCollection(), "walk_notes" );
// create the note header, button and label...
- m_label = new QLabel( this );
+ m_label = new TQLabel( this );
m_label->setFrameStyle( NoFrame );
m_label->setLineWidth( 0 );
m_label->installEventFilter( this ); // receive events (for dragging & action menu)
setName( m_journal->summary() ); // don't worry, no signals are connected at this stage yet
m_button = new KNoteButton( "knotes_close", this );
- connect( m_button, SIGNAL(clicked()), this, SLOT(slotClose()) );
+ connect( m_button, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotClose()) );
// create the note editor
m_editor = new KNoteEdit( actionCollection(), this );
m_editor->installEventFilter( this ); // receive events (for modified)
m_editor->viewport()->installEventFilter( this );
- connect( m_editor, SIGNAL(contentsMoving( int, int )), this, SLOT(slotUpdateViewport( int, int )));
+ connect( m_editor, TQT_SIGNAL(contentsMoving( int, int )), this, TQT_SLOT(slotUpdateViewport( int, int )));
KXMLGUIBuilder builder( this );
KXMLGUIFactory factory( &builder, this );
@@ -177,12 +177,12 @@ KNote::KNote( QDomDocument buildDoc, Journal *j, QWidget *parent, const char *na
m_tool->setIconText( KToolBar::IconOnly );
// if there was just a way of making KComboBox adhere the toolbar height...
- QObjectList *list = m_tool->queryList( "KComboBox" );
- QObjectListIt it( *list );
+ TQObjectList *list = m_tool->queryList( "KComboBox" );
+ TQObjectListIt it( *list );
while ( it.current() != 0 )
{
KComboBox *combo = (KComboBox *)it.current();
- QFont font = combo->font();
+ TQFont font = combo->font();
font.setPointSize( 7 );
combo->setFont( font );
combo->setFixedHeight( 14 );
@@ -196,15 +196,15 @@ KNote::KNote( QDomDocument buildDoc, Journal *j, QWidget *parent, const char *na
setFocusProxy( m_editor );
// create the resize handle
- m_editor->setCornerWidget( new QSizeGrip( this ) );
+ m_editor->setCornerWidget( new TQSizeGrip( this ) );
uint width = m_editor->cornerWidget()->width();
uint height = m_editor->cornerWidget()->height();
- QBitmap mask;
+ TQBitmap mask;
mask.resize( width, height );
mask.fill( color0 );
- QPointArray array;
+ TQPointArray array;
array.setPoints( 3, 0, height, width, height, width, 0 );
- QPainter p;
+ TQPainter p;
p.begin( &mask );
p.setBrush( color1 );
p.drawPolygon( array );
@@ -213,7 +213,7 @@ KNote::KNote( QDomDocument buildDoc, Journal *j, QWidget *parent, const char *na
m_editor->cornerWidget()->setBackgroundMode( PaletteBase );
// the config file location
- QString configFile = KGlobal::dirs()->saveLocation( "appdata", "notes/" );
+ TQString configFile = KGlobal::dirs()->saveLocation( "appdata", "notes/" );
configFile += m_journal->uid();
// no config file yet? -> use the default display config if available
@@ -265,21 +265,21 @@ KNote::KNote( QDomDocument buildDoc, Journal *j, QWidget *parent, const char *na
if ( m_kwinConf->readBoolEntry( "CustomButtonPositions" ) )
closeLeft = m_kwinConf->readEntry( "ButtonsOnLeft" ).find( 'X' ) > -1;
- QPixmap pushpin_pix;
+ TQPixmap pushpin_pix;
if ( closeLeft )
- pushpin_pix = QPixmap( QPixmap( pushpin_xpm ).convertToImage().mirror( true, false ) );
+ pushpin_pix = TQPixmap( TQPixmap( pushpin_xpm ).convertToImage().mirror( true, false ) );
else
- pushpin_pix = QPixmap( pushpin_xpm );
+ pushpin_pix = TQPixmap( pushpin_xpm );
// the pushpin label at the top left or right corner
- m_pushpin = new QLabel( this );
+ m_pushpin = new TQLabel( this );
m_pushpin->setScaledContents( true );
m_pushpin->setBackgroundMode( NoBackground );
m_pushpin->setPixmap( pushpin_pix );
m_pushpin->resize( pushpin_pix.size() );
// fold label at bottom right corner
- m_fold = new QLabel( this );
+ m_fold = new TQLabel( this );
m_fold->setScaledContents( true );
m_fold->setBackgroundMode( NoBackground );
@@ -290,22 +290,22 @@ KNote::KNote( QDomDocument buildDoc, Journal *j, QWidget *parent, const char *na
// let KWin do the placement if the position is illegal--at least 10 pixels
// of a note need to be visible
- const QPoint& position = m_config->position();
- QRect desk = kapp->desktop()->rect();
+ const TQPoint& position = m_config->position();
+ TQRect desk = kapp->desktop()->rect();
desk.addCoords( 10, 10, -10, -10 );
- if ( desk.intersects( QRect( position, QSize( width, height ) ) ) )
+ if ( desk.intersects( TQRect( position, TQSize( width, height ) ) ) )
move( position ); // do before calling show() to avoid flicker
// config items in the journal have priority
- QString property = m_journal->customProperty( "KNotes", "FgColor" );
+ TQString property = m_journal->customProperty( "KNotes", "FgColor" );
if ( !property.isNull() )
- m_config->setFgColor( QColor( property ) );
+ m_config->setFgColor( TQColor( property ) );
else
m_journal->setCustomProperty( "KNotes", "FgColor", m_config->fgColor().name() );
property = m_journal->customProperty( "KNotes", "BgColor" );
if ( !property.isNull() )
- m_config->setBgColor( QColor( property ) );
+ m_config->setBgColor( TQColor( property ) );
else
m_journal->setCustomProperty( "KNotes", "BgColor", m_config->bgColor().name() );
@@ -320,7 +320,7 @@ KNote::KNote( QDomDocument buildDoc, Journal *j, QWidget *parent, const char *na
// create the mask for the fold---to be done after slotApplyConfig(),
// which calls createFold()
- m_fold->setMask( QRegion( m_fold->pixmap()->createHeuristicMask() ) );
+ m_fold->setMask( TQRegion( m_fold->pixmap()->createHeuristicMask() ) );
// if this is a new note put on current desktop - we can't use defaults
// in KConfig XT since only _changes_ will be stored in the config file
@@ -359,8 +359,8 @@ KNote::KNote( QDomDocument buildDoc, Journal *j, QWidget *parent, const char *na
// HACK: update the icon color - again after showing the note, to make kicker aware of the new colors
KIconEffect effect;
- QPixmap icon = effect.apply( kapp->icon(), KIconEffect::Colorize, 1, m_config->bgColor(), false );
- QPixmap miniIcon = effect.apply( kapp->miniIcon(), KIconEffect::Colorize, 1, m_config->bgColor(), false );
+ TQPixmap icon = effect.apply( kapp->icon(), KIconEffect::Colorize, 1, m_config->bgColor(), false );
+ TQPixmap miniIcon = effect.apply( kapp->miniIcon(), KIconEffect::Colorize, 1, m_config->bgColor(), false );
KWin::setIcons( winId(), icon, miniIcon );
}
@@ -389,7 +389,7 @@ void KNote::slotKill( bool force )
delete m_config;
m_config = 0;
- QString configFile = KGlobal::dirs()->saveLocation( "appdata", "notes/" );
+ TQString configFile = KGlobal::dirs()->saveLocation( "appdata", "notes/" );
configFile += m_journal->uid();
if ( !KIO::NetAccess::del( KURL::fromPathOrURL( configFile ), this ) )
@@ -430,26 +430,26 @@ void KNote::saveConfig() const
m_config->writeConfig();
}
-QString KNote::noteId() const
+TQString KNote::noteId() const
{
return m_journal->uid();
}
-QString KNote::name() const
+TQString KNote::name() const
{
return m_label->text();
}
-QString KNote::text() const
+TQString KNote::text() const
{
return m_editor->text();
}
-QString KNote::plainText() const
+TQString KNote::plainText() const
{
if ( m_editor->textFormat() == RichText )
{
- QTextEdit conv;
+ TQTextEdit conv;
conv.setTextFormat( RichText );
conv.setText( m_editor->text() );
conv.setTextFormat( PlainText );
@@ -459,7 +459,7 @@ QString KNote::plainText() const
return m_editor->text();
}
-void KNote::setName( const QString& name )
+void KNote::setName( const TQString& name )
{
m_label->setText( name );
updateLabelAlignment();
@@ -474,23 +474,23 @@ void KNote::setName( const QString& name )
emit sigNameChanged();
}
-void KNote::setText( const QString& text )
+void KNote::setText( const TQString& text )
{
m_editor->setText( text );
saveData();
}
-QColor KNote::fgColor() const
+TQColor KNote::fgColor() const
{
return m_config->fgColor();
}
-QColor KNote::bgColor() const
+TQColor KNote::bgColor() const
{
return m_config->bgColor();
}
-void KNote::setColor( const QColor& fg, const QColor& bg )
+void KNote::setColor( const TQColor& fg, const TQColor& bg )
{
m_journal->setCustomProperty( "KNotes", "FgColor", fg.name() );
m_journal->setCustomProperty( "KNotes", "BgColor", bg.name() );
@@ -501,25 +501,25 @@ void KNote::setColor( const QColor& fg, const QColor& bg )
emit sigDataChanged();
m_config->writeConfig();
- QPalette newpalette = palette();
- newpalette.setColor( QColorGroup::Background, bg );
- newpalette.setColor( QColorGroup::Foreground, fg );
- newpalette.setColor( QColorGroup::Base, bg ); // text background
- newpalette.setColor( QColorGroup::Text, fg ); // text color
- newpalette.setColor( QColorGroup::Button, bg );
- newpalette.setColor( QColorGroup::ButtonText, fg );
+ TQPalette newpalette = palette();
+ newpalette.setColor( TQColorGroup::Background, bg );
+ newpalette.setColor( TQColorGroup::Foreground, fg );
+ newpalette.setColor( TQColorGroup::Base, bg ); // text background
+ newpalette.setColor( TQColorGroup::Text, fg ); // text color
+ newpalette.setColor( TQColorGroup::Button, bg );
+ newpalette.setColor( TQColorGroup::ButtonText, fg );
-// newpalette.setColor( QColorGroup::Highlight, bg );
-// newpalette.setColor( QColorGroup::HighlightedText, fg );
+// newpalette.setColor( TQColorGroup::Highlight, bg );
+// newpalette.setColor( TQColorGroup::HighlightedText, fg );
// the shadow
- newpalette.setColor( QColorGroup::Midlight, bg.light(150) );
- newpalette.setColor( QColorGroup::Shadow, bg.dark(116) );
- newpalette.setColor( QColorGroup::Light, bg.light(180) );
+ newpalette.setColor( TQColorGroup::Midlight, bg.light(150) );
+ newpalette.setColor( TQColorGroup::Shadow, bg.dark(116) );
+ newpalette.setColor( TQColorGroup::Light, bg.light(180) );
if ( s_ppOffset )
- newpalette.setColor( QColorGroup::Dark, bg.dark(200) );
+ newpalette.setColor( TQColorGroup::Dark, bg.dark(200) );
else
- newpalette.setColor( QColorGroup::Dark, bg.dark(108) );
+ newpalette.setColor( TQColorGroup::Dark, bg.dark(108) );
setPalette( newpalette );
// set the text color
@@ -529,20 +529,20 @@ void KNote::setColor( const QColor& fg, const QColor& bg )
updateBackground();
// set darker value for the hide button...
- QPalette darker = palette();
- darker.setColor( QColorGroup::Button, bg.dark(116) );
+ TQPalette darker = palette();
+ darker.setColor( TQColorGroup::Button, bg.dark(116) );
m_button->setPalette( darker );
// update the icon color
KIconEffect effect;
- QPixmap icon = effect.apply( kapp->icon(), KIconEffect::Colorize, 1, bg, false );
- QPixmap miniIcon = effect.apply( kapp->miniIcon(), KIconEffect::Colorize, 1, bg, false );
+ TQPixmap icon = effect.apply( kapp->icon(), KIconEffect::Colorize, 1, bg, false );
+ TQPixmap miniIcon = effect.apply( kapp->miniIcon(), KIconEffect::Colorize, 1, bg, false );
KWin::setIcons( winId(), icon, miniIcon );
// set the color for the selection used to highlight the find stuff
- QColor sel = palette().color( QPalette::Active, QColorGroup::Base ).dark();
+ TQColor sel = palette().color( TQPalette::Active, TQColorGroup::Base ).dark();
if ( sel == Qt::black )
- sel = palette().color( QPalette::Active, QColorGroup::Base ).light();
+ sel = palette().color( TQPalette::Active, TQColorGroup::Base ).light();
m_editor->setSelectionAttributes( 1, sel, true );
@@ -554,14 +554,14 @@ void KNote::setColor( const QColor& fg, const QColor& bg )
emit sigColorChanged();
}
-void KNote::find( const QString& pattern, long options )
+void KNote::find( const TQString& pattern, long options )
{
delete m_find;
m_find = new KFind( pattern, options, this );
- connect( m_find, SIGNAL(highlight( const QString &, int, int )),
- this, SLOT(slotHighlight( 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(slotHighlight( const TQString &, int, int )) );
+ connect( m_find, TQT_SIGNAL(findNext()), this, TQT_SLOT(slotFindNext()) );
m_find->setData( plainText() );
slotFindNext();
@@ -589,7 +589,7 @@ void KNote::slotFindNext()
}
}
-void KNote::slotHighlight( const QString& str, int idx, int len )
+void KNote::slotHighlight( const TQString& str, int idx, int len )
{
int paraFrom = 0, idxFrom = 0, p = 0;
for ( ; p < idx; ++p )
@@ -623,13 +623,13 @@ bool KNote::isModified() const
}
// FIXME KDE 4.0: remove sync(), isNew() and isModified()
-void KNote::sync( const QString& app )
+void KNote::sync( const TQString& app )
{
- QByteArray sep( 1 );
+ TQByteArray sep( 1 );
sep[0] = '\0';
KMD5 hash;
- QCString result;
+ TQCString result;
hash.update( m_label->text().utf8() );
hash.update( sep );
@@ -642,17 +642,17 @@ void KNote::sync( const QString& app )
config->writeEntry( app, result.data() );
}
-bool KNote::isNew( const QString& app ) const
+bool KNote::isNew( const TQString& app ) const
{
KConfig *config = m_config->config();
config->setGroup( "Synchronisation" );
- QString hash = config->readEntry( app );
+ TQString hash = config->readEntry( app );
return hash.isEmpty();
}
-bool KNote::isModified( const QString& app ) const
+bool KNote::isModified( const TQString& app ) const
{
- QByteArray sep( 1 );
+ TQByteArray sep( 1 );
sep[0] = '\0';
KMD5 hash;
@@ -663,7 +663,7 @@ bool KNote::isModified( const QString& app ) const
KConfig *config = m_config->config();
config->setGroup( "Synchronisation" );
- QString orig = config->readEntry( app );
+ TQString orig = config->readEntry( app );
if ( hash.verify( orig.utf8() ) ) // returns false on error!
return false;
@@ -686,7 +686,7 @@ void KNote::slotRename()
{
// pop up dialog to get the new name
bool ok;
- QString newName = KInputDialog::getText( QString::null,
+ TQString newName = KInputDialog::getText( TQString::null,
i18n("Please enter the new name:"), m_label->text(), &ok, this );
if ( !ok ) // handle cancel
return;
@@ -731,7 +731,7 @@ void KNote::slotClose()
void KNote::slotInsDate()
{
- m_editor->insert( KGlobal::locale()->formatDateTime(QDateTime::currentDateTime()) );
+ m_editor->insert( KGlobal::locale()->formatDateTime(TQDateTime::currentDateTime()) );
}
void KNote::slotSetAlarm()
@@ -739,7 +739,7 @@ void KNote::slotSetAlarm()
KNoteAlarmDlg dlg( name(), this );
dlg.setIncidence( m_journal );
- if ( dlg.exec() == QDialog::Accepted )
+ if ( dlg.exec() == TQDialog::Accepted )
emit sigDataChanged();
}
@@ -751,8 +751,8 @@ void KNote::slotPreferences()
// create a new preferences dialog...
KNoteConfigDlg *dialog = new KNoteConfigDlg( m_config, name(), this, noteId().utf8() );
- connect( dialog, SIGNAL(settingsChanged()), this, SLOT(slotApplyConfig()) );
- connect( this, SIGNAL(sigNameChanged()), dialog, SLOT(slotUpdateCaption()) );
+ connect( dialog, TQT_SIGNAL(settingsChanged()), this, TQT_SLOT(slotApplyConfig()) );
+ connect( this, TQT_SIGNAL(sigNameChanged()), dialog, TQT_SLOT(slotUpdateCaption()) );
dialog->show();
}
@@ -760,8 +760,8 @@ void KNote::slotSend()
{
// pop up dialog to get the IP
KNoteHostDlg hostDlg( i18n("Send \"%1\"").arg( name() ), this );
- bool ok = (hostDlg.exec() == QDialog::Accepted);
- QString host = hostDlg.host();
+ bool ok = (hostDlg.exec() == TQDialog::Accepted);
+ TQString host = hostDlg.host();
if ( !ok ) // handle cancel
return;
@@ -782,10 +782,10 @@ void KNote::slotSend()
void KNote::slotMail()
{
// get the mail action command
- QStringList cmd_list = QStringList::split( QChar(' '), KNotesGlobalConfig::mailAction() );
+ TQStringList cmd_list = TQStringList::split( TQChar(' '), KNotesGlobalConfig::mailAction() );
KProcess mail;
- for ( QStringList::Iterator it = cmd_list.begin();
+ for ( TQStringList::Iterator it = cmd_list.begin();
it != cmd_list.end(); ++it )
{
if ( *it == "%f" )
@@ -804,9 +804,9 @@ void KNote::slotPrint()
{
saveData();
- QString content;
+ TQString content;
if ( m_editor->textFormat() == PlainText )
- content = QStyleSheet::convertFromPlainText( m_editor->text() );
+ content = TQStyleSheet::convertFromPlainText( m_editor->text() );
else
content = m_editor->text();
@@ -816,33 +816,33 @@ void KNote::slotPrint()
printer.setContext( m_editor->context() );
printer.setStyleSheet( m_editor->styleSheet() );
printer.setColorGroup( colorGroup() );
- printer.printNote( QString(), content );
+ printer.printNote( TQString(), content );
}
void KNote::slotSaveAs()
{
- QCheckBox *convert = 0;
+ TQCheckBox *convert = 0;
if ( m_editor->textFormat() == RichText )
{
- convert = new QCheckBox( 0 );
+ convert = new TQCheckBox( 0 );
convert->setText( i18n("Save note as plain text") );
}
- KFileDialog dlg( QString::null, QString::null, this, "filedialog", true, convert );
+ KFileDialog dlg( TQString::null, TQString::null, this, "filedialog", true, convert );
dlg.setOperationMode( KFileDialog::Saving );
dlg.setCaption( i18n("Save As") );
dlg.exec();
- QString fileName = dlg.selectedFile();
+ TQString fileName = dlg.selectedFile();
if ( fileName.isEmpty() )
return;
- QFile file( fileName );
+ TQFile file( fileName );
if ( file.exists() &&
KMessageBox::warningContinueCancel( this, i18n("<qt>A file named <b>%1</b> already exists.<br>"
- "Are you sure you want to overwrite it?</qt>").arg( QFileInfo(file).fileName() ) )
+ "Are you sure you want to overwrite it?</qt>").arg( TQFileInfo(file).fileName() ) )
!= KMessageBox::Continue )
{
return;
@@ -850,7 +850,7 @@ void KNote::slotSaveAs()
if ( file.open( IO_WriteOnly ) )
{
- QTextStream stream( &file );
+ TQTextStream stream( &file );
// convert rich text to plain text first
if ( convert && convert->isChecked() )
stream << plainText();
@@ -929,13 +929,13 @@ void KNote::slotUpdateDesktopActions()
NETRootInfo wm_root( qt_xdisplay(), NET::NumberOfDesktops | NET::DesktopNames );
NETWinInfo wm_client( qt_xdisplay(), winId(), qt_xrootwin(), NET::WMDesktop );
- QStringList desktops;
+ TQStringList desktops;
desktops.append( i18n("&All Desktops") );
- desktops.append( QString::null ); // Separator
+ desktops.append( TQString::null ); // Separator
int count = wm_root.numberOfDesktops();
for ( int n = 1; n <= count; n++ )
- desktops.append( QString("&%1 %2").arg( n ).arg( QString::fromUtf8(wm_root.desktopName( n )) ) );
+ desktops.append( TQString("&%1 %2").arg( n ).arg( TQString::fromUtf8(wm_root.desktopName( n )) ) );
m_toDesktop->setItems( desktops );
@@ -966,11 +966,11 @@ void KNote::toDesktop( int desktop )
void KNote::createFold()
{
- QPixmap fold( 15, 15 );
- QPainter foldp( &fold );
+ TQPixmap fold( 15, 15 );
+ TQPainter foldp( &fold );
foldp.setPen( Qt::NoPen );
foldp.setBrush( palette().active().dark() );
- QPointArray foldpoints( 3 );
+ TQPointArray foldpoints( 3 );
foldpoints.putPoints( 0, 3, 0, 0, 14, 0, 0, 14 );
foldp.drawPolygon( foldpoints );
foldp.end();
@@ -980,7 +980,7 @@ void KNote::createFold()
void KNote::updateLabelAlignment()
{
// if the name is too long to fit, left-align it, otherwise center it (#59028)
- QString labelText = m_label->text();
+ TQString labelText = m_label->text();
if ( m_label->fontMetrics().boundingRect( labelText ).width() > m_label->width() )
m_label->setAlignment( AlignLeft );
else
@@ -997,7 +997,7 @@ void KNote::updateFocus()
if ( !m_editor->isReadOnly() )
{
- if ( m_tool && m_tool->isHidden() && m_editor->textFormat() == QTextEdit::RichText )
+ if ( m_tool && m_tool->isHidden() && m_editor->textFormat() == TQTextEdit::RichText )
{
m_tool->show();
setGeometry( x(), y(), width(), height() + m_tool->height() );
@@ -1044,18 +1044,18 @@ void KNote::updateMask()
int w = width();
int h = height();
- QRegion reg( 0, s_ppOffset, w, h - s_ppOffset );
+ TQRegion reg( 0, s_ppOffset, w, h - s_ppOffset );
- const QBitmap *pushpin_bitmap = m_pushpin->pixmap()->mask();
- QRegion pushpin_reg( *pushpin_bitmap );
+ const TQBitmap *pushpin_bitmap = m_pushpin->pixmap()->mask();
+ TQRegion pushpin_reg( *pushpin_bitmap );
m_pushpin->setMask( pushpin_reg );
pushpin_reg.translate( m_pushpin->x(), m_pushpin->y() );
if ( !hasFocus() )
{
- QPointArray foldpoints( 3 );
+ TQPointArray foldpoints( 3 );
foldpoints.putPoints( 0, 3, w-15, h, w, h-15, w, h );
- QRegion fold( foldpoints, false );
+ TQRegion fold( foldpoints, false );
setMask( reg.unite( pushpin_reg ).subtract( fold ) );
}
else
@@ -1066,7 +1066,7 @@ void KNote::updateBackground( int y_offset )
{
if ( !s_ppOffset )
{
- m_editor->setPaper( QBrush( colorGroup().background() ) );
+ m_editor->setPaper( TQBrush( colorGroup().background() ) );
return;
}
@@ -1081,9 +1081,9 @@ void KNote::updateBackground( int y_offset )
y_offset = y_offset % h;
- QImage grad_img( w, h, 32 );
+ TQImage grad_img( w, h, 32 );
QRgb rgbcol;
- QColor bg = palette().active().background();
+ TQColor bg = palette().active().background();
for ( int i = 0; i < h; ++i )
{
@@ -1100,8 +1100,8 @@ void KNote::updateBackground( int y_offset )
grad_img.setPixel( j, i, rgbcol );
}
- // setPaletteBackgroundPixmap makes QTextEdit::color() stop working!!
- m_editor->setPaper( QBrush( Qt::black, QPixmap( grad_img ) ) );
+ // setPaletteBackgroundPixmap makes TQTextEdit::color() stop working!!
+ m_editor->setPaper( TQBrush( Qt::black, TQPixmap( grad_img ) ) );
}
void KNote::updateLayout()
@@ -1149,10 +1149,10 @@ void KNote::updateLayout()
contentsRect().width(), headerHeight
);
- m_editor->setGeometry( QRect(
- QPoint( contentsRect().x(),
+ m_editor->setGeometry( TQRect(
+ TQPoint( contentsRect().x(),
contentsRect().y() + headerHeight + s_ppOffset ),
- QPoint( contentsRect().right(),
+ TQPoint( contentsRect().right(),
contentsRect().bottom() - ( m_tool ? (m_tool->isHidden() ? 0 : m_tool->height()) : 0 ) )
) );
@@ -1181,9 +1181,9 @@ void KNote::updateLayout()
// -------------------- protected methods -------------------- //
-void KNote::drawFrame( QPainter *p )
+void KNote::drawFrame( TQPainter *p )
{
- QRect r = frameRect();
+ TQRect r = frameRect();
r.setTop( s_ppOffset );
if ( s_ppOffset )
qDrawShadePanel( p, r, colorGroup(), false, lineWidth() );
@@ -1191,7 +1191,7 @@ void KNote::drawFrame( QPainter *p )
qDrawWinPanel( p, r, colorGroup(), false );
}
-void KNote::showEvent( QShowEvent * )
+void KNote::showEvent( TQShowEvent * )
{
if ( m_config->hideNote() )
{
@@ -1204,29 +1204,29 @@ void KNote::showEvent( QShowEvent * )
}
}
-void KNote::resizeEvent( QResizeEvent *qre )
+void KNote::resizeEvent( TQResizeEvent *qre )
{
- QFrame::resizeEvent( qre );
+ TQFrame::resizeEvent( qre );
updateLayout();
}
-void KNote::closeEvent( QCloseEvent * )
+void KNote::closeEvent( TQCloseEvent * )
{
slotClose();
}
-void KNote::dragEnterEvent( QDragEnterEvent *e )
+void KNote::dragEnterEvent( TQDragEnterEvent *e )
{
if ( !m_config->readOnly() )
e->accept( KColorDrag::canDecode( e ) );
}
-void KNote::dropEvent( QDropEvent *e )
+void KNote::dropEvent( TQDropEvent *e )
{
if ( m_config->readOnly() )
return;
- QColor bg;
+ TQColor bg;
if ( KColorDrag::decode( e, bg ) )
setColor( paletteForegroundColor(), bg );
}
@@ -1236,41 +1236,41 @@ bool KNote::focusNextPrevChild( bool )
return true;
}
-bool KNote::event( QEvent *ev )
+bool KNote::event( TQEvent *ev )
{
- if ( ev->type() == QEvent::LayoutHint )
+ if ( ev->type() == TQEvent::LayoutHint )
{
updateLayout();
return true;
}
else
- return QFrame::event( ev );
+ return TQFrame::event( ev );
}
-bool KNote::eventFilter( QObject *o, QEvent *ev )
+bool KNote::eventFilter( TQObject *o, TQEvent *ev )
{
- if ( ev->type() == QEvent::DragEnter &&
- KColorDrag::canDecode( static_cast<QDragEnterEvent *>(ev) ) )
+ if ( ev->type() == TQEvent::DragEnter &&
+ KColorDrag::canDecode( static_cast<TQDragEnterEvent *>(ev) ) )
{
- dragEnterEvent( static_cast<QDragEnterEvent *>(ev) );
+ dragEnterEvent( static_cast<TQDragEnterEvent *>(ev) );
return true;
}
- if ( ev->type() == QEvent::Drop &&
- KColorDrag::canDecode( static_cast<QDropEvent *>(ev) ) )
+ if ( ev->type() == TQEvent::Drop &&
+ KColorDrag::canDecode( static_cast<TQDropEvent *>(ev) ) )
{
- dropEvent( static_cast<QDropEvent *>(ev) );
+ dropEvent( static_cast<TQDropEvent *>(ev) );
return true;
}
if ( o == m_label )
{
- QMouseEvent *e = (QMouseEvent *)ev;
+ TQMouseEvent *e = (TQMouseEvent *)ev;
- if ( ev->type() == QEvent::MouseButtonDblClick )
+ if ( ev->type() == TQEvent::MouseButtonDblClick )
slotRename();
- if ( ev->type() == QEvent::MouseButtonPress &&
+ if ( ev->type() == TQEvent::MouseButtonPress &&
(e->button() == LeftButton || e->button() == MidButton))
{
e->button() == LeftButton ? KWin::raiseWindow( winId() )
@@ -1283,7 +1283,7 @@ bool KNote::eventFilter( QObject *o, QEvent *ev )
}
#if KDE_IS_VERSION( 3, 5, 1 )
- if ( ev->type() == QEvent::MouseButtonRelease )
+ if ( ev->type() == TQEvent::MouseButtonRelease )
{
NETRootInfo wm_root( qt_xdisplay(), NET::WMMoveResize );
wm_root.moveResizeRequest( winId(), e->globalX(), e->globalY(), NET::MoveResizeCancel );
@@ -1291,10 +1291,10 @@ bool KNote::eventFilter( QObject *o, QEvent *ev )
}
#endif
- if ( m_menu && ( ev->type() == QEvent::MouseButtonPress )
+ if ( m_menu && ( ev->type() == TQEvent::MouseButtonPress )
&& ( e->button() == RightButton ) )
{
- m_menu->popup( QCursor::pos() );
+ m_menu->popup( TQCursor::pos() );
return true;
}
@@ -1303,18 +1303,18 @@ bool KNote::eventFilter( QObject *o, QEvent *ev )
if ( o == m_editor )
{
- if ( ev->type() == QEvent::FocusOut )
+ if ( ev->type() == TQEvent::FocusOut )
{
- QFocusEvent *fe = static_cast<QFocusEvent *>(ev);
- if ( fe->reason() != QFocusEvent::Popup &&
- fe->reason() != QFocusEvent::Mouse )
+ TQFocusEvent *fe = static_cast<TQFocusEvent *>(ev);
+ if ( fe->reason() != TQFocusEvent::Popup &&
+ fe->reason() != TQFocusEvent::Mouse )
{
updateFocus();
if ( m_editor->isModified() )
saveData();
}
}
- else if ( ev->type() == QEvent::FocusIn )
+ else if ( ev->type() == TQEvent::FocusIn )
updateFocus();
return false;
@@ -1323,10 +1323,10 @@ bool KNote::eventFilter( QObject *o, QEvent *ev )
if ( o == m_editor->viewport() )
{
if ( m_edit_menu &&
- ev->type() == QEvent::MouseButtonPress &&
- ((QMouseEvent *)ev)->button() == RightButton )
+ ev->type() == TQEvent::MouseButtonPress &&
+ ((TQMouseEvent *)ev)->button() == RightButton )
{
- m_edit_menu->popup( QCursor::pos() );
+ m_edit_menu->popup( TQCursor::pos() );
return true;
}
}
diff --git a/knotes/knote.h b/knotes/knote.h
index 0309f59d7..0f15bf4ba 100644
--- a/knotes/knote.h
+++ b/knotes/knote.h
@@ -21,11 +21,11 @@
#ifndef KNOTE_H
#define KNOTE_H
-#include <qstring.h>
-#include <qevent.h>
-#include <qframe.h>
-#include <qpoint.h>
-#include <qcolor.h>
+#include <tqstring.h>
+#include <tqevent.h>
+#include <tqframe.h>
+#include <tqpoint.h>
+#include <tqcolor.h>
#include <kconfig.h>
#include <kxmlguiclient.h>
@@ -48,37 +48,37 @@ namespace KCal {
}
-class KNote : public QFrame, virtual public KXMLGUIClient
+class KNote : public TQFrame, virtual public KXMLGUIClient
{
Q_OBJECT
public:
- KNote( QDomDocument buildDoc, KCal::Journal *journal, QWidget *parent = 0,
+ KNote( TQDomDocument buildDoc, KCal::Journal *journal, TQWidget *parent = 0,
const char *name = 0 );
~KNote();
void saveData();
void saveConfig() const;
- QString noteId() const;
+ TQString noteId() const;
- QString name() const;
- QString text() const;
- QString plainText() const;
+ TQString name() const;
+ TQString text() const;
+ TQString plainText() const;
- void setName( const QString& name );
- void setText( const QString& text );
+ void setName( const TQString& name );
+ void setText( const TQString& text );
- QColor fgColor() const;
- QColor bgColor() const;
- void setColor( const QColor& fg, const QColor& bg );
+ TQColor fgColor() const;
+ TQColor bgColor() const;
+ void setColor( const TQColor& fg, const TQColor& bg );
- void find( const QString& pattern, long options );
+ void find( const TQString& pattern, long options );
bool isModified() const;
- void sync( const QString& app );
- bool isNew( const QString& app ) const;
- bool isModified( const QString& app ) const;
+ void sync( const TQString& app );
+ bool isNew( const TQString& app ) const;
+ bool isModified( const TQString& app ) const;
static void setStyle( int style );
@@ -96,15 +96,15 @@ signals:
void sigFindFinished();
protected:
- virtual void drawFrame( QPainter* );
- virtual void showEvent( QShowEvent* );
- virtual void resizeEvent( QResizeEvent* );
- virtual void closeEvent( QCloseEvent* );
- virtual void dropEvent( QDropEvent* );
- virtual void dragEnterEvent( QDragEnterEvent* );
+ virtual void drawFrame( TQPainter* );
+ virtual void showEvent( TQShowEvent* );
+ virtual void resizeEvent( TQResizeEvent* );
+ virtual void closeEvent( TQCloseEvent* );
+ virtual void dropEvent( TQDropEvent* );
+ virtual void dragEnterEvent( TQDragEnterEvent* );
- virtual bool event( QEvent* );
- virtual bool eventFilter( QObject*, QEvent* );
+ virtual bool event( TQEvent* );
+ virtual bool eventFilter( TQObject*, TQEvent* );
virtual bool focusNextPrevChild( bool );
@@ -125,7 +125,7 @@ private slots:
void slotPopupActionToDesktop( int id );
void slotFindNext();
- void slotHighlight( const QString& txt, int idx, int len );
+ void slotHighlight( const TQString& txt, int idx, int len );
void slotApplyConfig();
void slotUpdateKeepAboveBelow();
@@ -145,10 +145,10 @@ private:
void toDesktop( int desktop );
- QString toPlainText( const QString& );
+ TQString toPlainText( const TQString& );
private:
- QLabel *m_label, *m_pushpin, *m_fold;
+ TQLabel *m_label, *m_pushpin, *m_fold;
KNoteButton *m_button;
KToolBar *m_tool;
KNoteEdit *m_editor;
diff --git a/knotes/knotealarmdlg.cpp b/knotes/knotealarmdlg.cpp
index 0acd44214..ef71c0f51 100644
--- a/knotes/knotealarmdlg.cpp
+++ b/knotes/knotealarmdlg.cpp
@@ -29,10 +29,10 @@
your version.
*******************************************************************/
-#include <qlabel.h>
-#include <qradiobutton.h>
-#include <qbuttongroup.h>
-#include <qvbox.h>
+#include <tqlabel.h>
+#include <tqradiobutton.h>
+#include <tqbuttongroup.h>
+#include <tqvbox.h>
#include <klocale.h>
@@ -45,33 +45,33 @@
#include "knotealarmdlg.h"
-KNoteAlarmDlg::KNoteAlarmDlg( const QString& caption, QWidget *parent, const char *name )
+KNoteAlarmDlg::KNoteAlarmDlg( const TQString& caption, TQWidget *parent, const char *name )
: KDialogBase( parent, name, true, caption, Ok|Cancel, Ok )
{
- QVBox *page = makeVBoxMainWidget();
- QGroupBox *group = new QGroupBox( 3, Vertical, i18n("Scheduled Alarm"), page );
- m_buttons = new QButtonGroup( page );
+ TQVBox *page = makeVBoxMainWidget();
+ TQGroupBox *group = new TQGroupBox( 3, Vertical, i18n("Scheduled Alarm"), page );
+ m_buttons = new TQButtonGroup( page );
m_buttons->hide();
- QRadioButton *none = new QRadioButton( i18n("&No alarm"), group );
+ TQRadioButton *none = new TQRadioButton( i18n("&No alarm"), group );
m_buttons->insert( none );
- QHBox *at = new QHBox( group );
- QRadioButton *label_at = new QRadioButton( i18n("Alarm &at:"), at );
+ TQHBox *at = new TQHBox( group );
+ TQRadioButton *label_at = new TQRadioButton( i18n("Alarm &at:"), at );
m_buttons->insert( label_at );
m_atDate = new KDateEdit( at );
m_atTime = new KTimeEdit( at );
at->setStretchFactor( m_atDate, 1 );
- QHBox *in = new QHBox( group );
- QRadioButton *label_in = new QRadioButton( i18n("Alarm &in:"), in );
+ TQHBox *in = new TQHBox( group );
+ TQRadioButton *label_in = new TQRadioButton( i18n("Alarm &in:"), in );
m_buttons->insert( label_in );
m_inTime = new KTimeEdit( in );
- QLabel *in_min = new QLabel( i18n("hours/minutes"), in );
+ TQLabel *in_min = new TQLabel( i18n("hours/minutes"), in );
label_in->setEnabled( false ); // TODO
- connect( m_buttons, SIGNAL(clicked( int )), SLOT(slotButtonChanged( int )) );
+ connect( m_buttons, TQT_SIGNAL(clicked( int )), TQT_SLOT(slotButtonChanged( int )) );
}
@@ -140,7 +140,7 @@ void KNoteAlarmDlg::slotOk()
alarm = m_journal->alarms().first();
if ( m_buttons->selectedId() == 1 )
- alarm->setTime( QDateTime( m_atDate->date(), m_atTime->getTime() ) );
+ alarm->setTime( TQDateTime( m_atDate->date(), m_atTime->getTime() ) );
else
{
// TODO
diff --git a/knotes/knotealarmdlg.h b/knotes/knotealarmdlg.h
index e39f81869..ba001af7d 100644
--- a/knotes/knotealarmdlg.h
+++ b/knotes/knotealarmdlg.h
@@ -47,7 +47,7 @@ class KNoteAlarmDlg : public KDialogBase
{
Q_OBJECT
public:
- KNoteAlarmDlg( const QString& caption, QWidget *parent=0, const char *name=0 );
+ KNoteAlarmDlg( const TQString& caption, TQWidget *parent=0, const char *name=0 );
void setIncidence( KCal::Journal *journal );
@@ -58,7 +58,7 @@ private slots:
void slotButtonChanged( int id );
private:
- QButtonGroup *m_buttons;
+ TQButtonGroup *m_buttons;
KCal::Journal *m_journal;
KDateEdit *m_atDate;
diff --git a/knotes/knotebutton.cpp b/knotes/knotebutton.cpp
index 372510010..b6cf49bc4 100644
--- a/knotes/knotebutton.cpp
+++ b/knotes/knotebutton.cpp
@@ -18,10 +18,10 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*******************************************************************/
-#include <qstyle.h>
-#include <qpainter.h>
-#include <qiconset.h>
-#include <qsizepolicy.h>
+#include <tqstyle.h>
+#include <tqpainter.h>
+#include <tqiconset.h>
+#include <tqsizepolicy.h>
#include <kglobal.h>
#include <kicontheme.h>
@@ -30,11 +30,11 @@
#include "knotebutton.h"
-KNoteButton::KNoteButton( const QString& icon, QWidget *parent, const char *name )
- : QPushButton( parent, name )
+KNoteButton::KNoteButton( const TQString& icon, TQWidget *parent, const char *name )
+ : TQPushButton( parent, name )
{
setFocusPolicy( NoFocus );
- setSizePolicy( QSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed ) );
+ setSizePolicy( TQSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Fixed ) );
m_flat = true;
@@ -46,55 +46,55 @@ KNoteButton::~KNoteButton()
{
}
-void KNoteButton::enterEvent( QEvent * )
+void KNoteButton::enterEvent( TQEvent * )
{
m_flat = false;
repaint( false );
}
-void KNoteButton::leaveEvent( QEvent * )
+void KNoteButton::leaveEvent( TQEvent * )
{
m_flat = true;
repaint();
}
-QSize KNoteButton::sizeHint() const
+TQSize KNoteButton::sizeHint() const
{
- return QSize( QPushButton::sizeHint().height(), QPushButton::sizeHint().height() );
+ return TQSize( TQPushButton::sizeHint().height(), TQPushButton::sizeHint().height() );
}
-void KNoteButton::drawButton( QPainter* p )
+void KNoteButton::drawButton( TQPainter* p )
{
- QStyle::SFlags flags = QStyle::Style_Default;
+ TQStyle::SFlags flags = TQStyle::Style_Default;
if ( isEnabled() )
- flags |= QStyle::Style_Enabled;
+ flags |= TQStyle::Style_Enabled;
if ( isDown() )
- flags |= QStyle::Style_Down;
+ flags |= TQStyle::Style_Down;
if ( isOn() )
- flags |= QStyle::Style_On;
+ flags |= TQStyle::Style_On;
if ( !isFlat() && !isDown() )
- flags |= QStyle::Style_Raised;
+ flags |= TQStyle::Style_Raised;
if ( !m_flat )
- flags |= QStyle::Style_MouseOver;
+ flags |= TQStyle::Style_MouseOver;
- style().drawPrimitive( QStyle::PE_ButtonTool, p, rect(), colorGroup(), flags );
+ style().drawPrimitive( TQStyle::PE_ButtonTool, p, rect(), colorGroup(), flags );
drawButtonLabel( p );
}
-void KNoteButton::drawButtonLabel( QPainter* p )
+void KNoteButton::drawButtonLabel( TQPainter* p )
{
if ( iconSet() && !iconSet()->isNull() )
{
- QIconSet::Mode mode = QIconSet::Disabled;
- QIconSet::State state = QIconSet::Off;
+ TQIconSet::Mode mode = TQIconSet::Disabled;
+ TQIconSet::State state = TQIconSet::Off;
if ( isEnabled() )
- mode = hasFocus() ? QIconSet::Active : QIconSet::Normal;
+ mode = hasFocus() ? TQIconSet::Active : TQIconSet::Normal;
if ( isToggleButton() && isOn() )
- state = QIconSet::On;
+ state = TQIconSet::On;
- QPixmap pix = iconSet()->pixmap( QIconSet::Small, mode, state );
+ TQPixmap pix = iconSet()->pixmap( TQIconSet::Small, mode, state );
int dx = ( width() - pix.width() ) / 2;
int dy = ( height() - pix.height() ) / 2;
@@ -102,8 +102,8 @@ void KNoteButton::drawButtonLabel( QPainter* p )
// Shift button contents if pushed.
if ( isOn() || isDown() )
{
- dx += style().pixelMetric( QStyle::PM_ButtonShiftHorizontal, this );
- dy += style().pixelMetric( QStyle::PM_ButtonShiftVertical, this );
+ dx += style().pixelMetric( TQStyle::PM_ButtonShiftHorizontal, this );
+ dy += style().pixelMetric( TQStyle::PM_ButtonShiftVertical, this );
}
p->drawPixmap( dx, dy, pix );
diff --git a/knotes/knotebutton.h b/knotes/knotebutton.h
index 9d0d2baa6..19ffe9b84 100644
--- a/knotes/knotebutton.h
+++ b/knotes/knotebutton.h
@@ -21,7 +21,7 @@
#ifndef KNOTEBUTTON_H
#define KNOTEBUTTON_H
-#include <qpushbutton.h>
+#include <tqpushbutton.h>
class QPainter;
class QEvent;
@@ -32,17 +32,17 @@ class KNoteButton: public QPushButton
{
Q_OBJECT
public:
- KNoteButton( const QString& icon, QWidget *parent=0, const char *name=0 );
+ KNoteButton( const TQString& icon, TQWidget *parent=0, const char *name=0 );
~KNoteButton();
- virtual QSize sizeHint() const;
+ virtual TQSize sizeHint() const;
protected:
- virtual void enterEvent( QEvent * );
- virtual void leaveEvent( QEvent * );
+ virtual void enterEvent( TQEvent * );
+ virtual void leaveEvent( TQEvent * );
- virtual void drawButton( QPainter *p );
- virtual void drawButtonLabel( QPainter *p );
+ virtual void drawButton( TQPainter *p );
+ virtual void drawButtonLabel( TQPainter *p );
private:
bool m_flat;
diff --git a/knotes/knoteconfigdlg.cpp b/knotes/knoteconfigdlg.cpp
index 334ec37bd..a1238768b 100644
--- a/knotes/knoteconfigdlg.cpp
+++ b/knotes/knoteconfigdlg.cpp
@@ -18,12 +18,12 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*******************************************************************/
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qcheckbox.h>
-#include <qcombobox.h>
-#include <qhgroupbox.h>
-#include <qtabwidget.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqcheckbox.h>
+#include <tqcombobox.h>
+#include <tqhgroupbox.h>
+#include <tqtabwidget.h>
#include <kapplication.h>
#include <kconfig.h>
@@ -41,8 +41,8 @@
#include "version.h"
-KNoteConfigDlg::KNoteConfigDlg( KNoteConfig *config, const QString& title,
- QWidget *parent, const char *name )
+KNoteConfigDlg::KNoteConfigDlg( KNoteConfig *config, const TQString& title,
+ TQWidget *parent, const char *name )
: KConfigDialog( parent, name, config ? config : KNotesGlobalConfig::self(), IconList,
config ? Default|Ok|Apply|Cancel : Default|Ok|Cancel, Ok )
{
@@ -86,32 +86,32 @@ void KNoteConfigDlg::slotUpdateCaption()
setCaption( note->name() );
}
-QWidget *KNoteConfigDlg::makeDisplayPage( bool defaults )
+TQWidget *KNoteConfigDlg::makeDisplayPage( bool defaults )
{
- QWidget *displayPage = new QWidget();
- QGridLayout *layout = new QGridLayout( displayPage, 2, 2,
+ TQWidget *displayPage = new TQWidget();
+ TQGridLayout *layout = new TQGridLayout( displayPage, 2, 2,
defaults ? marginHint() : 0, spacingHint() );
- QLabel *label_FgColor = new QLabel( i18n("&Text color:"), displayPage, "label_FgColor" );
+ TQLabel *label_FgColor = new TQLabel( i18n("&Text color:"), displayPage, "label_FgColor" );
layout->addWidget( label_FgColor, 0, 0 );
KColorButton *kcfg_FgColor = new KColorButton( displayPage, "kcfg_FgColor" );
label_FgColor->setBuddy( kcfg_FgColor );
layout->addWidget( kcfg_FgColor, 0, 1 );
- QLabel *label_BgColor = new QLabel( i18n("&Background color:"), displayPage, "label_BgColor" );
+ TQLabel *label_BgColor = new TQLabel( i18n("&Background color:"), displayPage, "label_BgColor" );
layout->addWidget( label_BgColor, 1, 0 );
KColorButton *kcfg_BgColor = new KColorButton( displayPage, "kcfg_BgColor" );
label_BgColor->setBuddy( kcfg_BgColor );
layout->addWidget( kcfg_BgColor, 1, 1 );
- QCheckBox *kcfg_ShowInTaskbar = new QCheckBox( i18n("&Show note in taskbar"),
+ TQCheckBox *kcfg_ShowInTaskbar = new TQCheckBox( i18n("&Show note in taskbar"),
displayPage, "kcfg_ShowInTaskbar" );
if ( defaults )
{
- QLabel *label_Width = new QLabel( i18n("Default &width:"), displayPage, "label_Width" );
+ TQLabel *label_Width = new TQLabel( i18n("Default &width:"), displayPage, "label_Width" );
layout->addWidget( label_Width, 2, 0 );
KIntNumInput *kcfg_Width = new KIntNumInput( displayPage, "kcfg_Width" );
@@ -119,7 +119,7 @@ QWidget *KNoteConfigDlg::makeDisplayPage( bool defaults )
kcfg_Width->setRange( 50, 2000, 10, false );
layout->addWidget( kcfg_Width, 2, 1 );
- QLabel *label_Height = new QLabel( i18n("Default &height:"), displayPage, "label_Height" );
+ TQLabel *label_Height = new TQLabel( i18n("Default &height:"), displayPage, "label_Height" );
layout->addWidget( label_Height, 3, 0 );
KIntNumInput *kcfg_Height = new KIntNumInput( displayPage, "kcfg_Height" );
@@ -135,13 +135,13 @@ QWidget *KNoteConfigDlg::makeDisplayPage( bool defaults )
return displayPage;
}
-QWidget *KNoteConfigDlg::makeEditorPage( bool defaults )
+TQWidget *KNoteConfigDlg::makeEditorPage( bool defaults )
{
- QWidget *editorPage = new QWidget();
- QGridLayout *layout = new QGridLayout( editorPage, 4, 3,
+ TQWidget *editorPage = new TQWidget();
+ TQGridLayout *layout = new TQGridLayout( editorPage, 4, 3,
defaults ? marginHint() : 0, spacingHint() );
- QLabel *label_TabSize = new QLabel( i18n( "&Tab size:" ), editorPage, "label_TabSize" );
+ TQLabel *label_TabSize = new TQLabel( i18n( "&Tab size:" ), editorPage, "label_TabSize" );
layout->addMultiCellWidget( label_TabSize, 0, 0, 0, 1 );
KIntNumInput *kcfg_TabSize = new KIntNumInput( editorPage, "kcfg_TabSize" );
@@ -149,44 +149,44 @@ QWidget *KNoteConfigDlg::makeEditorPage( bool defaults )
label_TabSize->setBuddy( kcfg_TabSize );
layout->addWidget( kcfg_TabSize, 0, 2 );
- QCheckBox *kcfg_AutoIndent = new QCheckBox( i18n("Auto &indent"), editorPage, "kcfg_AutoIndent" );
+ TQCheckBox *kcfg_AutoIndent = new TQCheckBox( i18n("Auto &indent"), editorPage, "kcfg_AutoIndent" );
layout->addMultiCellWidget( kcfg_AutoIndent, 1, 1, 0, 1 );
- QCheckBox *kcfg_RichText = new QCheckBox( i18n("&Rich text"), editorPage, "kcfg_RichText" );
+ TQCheckBox *kcfg_RichText = new TQCheckBox( i18n("&Rich text"), editorPage, "kcfg_RichText" );
layout->addWidget( kcfg_RichText, 1, 2 );
- QLabel *label_Font = new QLabel( i18n("Text font:"), editorPage, "label_Font" );
+ TQLabel *label_Font = new TQLabel( i18n("Text font:"), editorPage, "label_Font" );
layout->addWidget( label_Font, 3, 0 );
KFontRequester *kcfg_Font = new KFontRequester( editorPage, "kcfg_Font" );
- kcfg_Font->setSizePolicy( QSizePolicy( QSizePolicy::Minimum, QSizePolicy::Fixed ) );
+ kcfg_Font->setSizePolicy( TQSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Fixed ) );
layout->addMultiCellWidget( kcfg_Font, 3, 3, 1, 2 );
- QLabel *label_TitleFont = new QLabel( i18n("Title font:"), editorPage, "label_TitleFont" );
+ TQLabel *label_TitleFont = new TQLabel( i18n("Title font:"), editorPage, "label_TitleFont" );
layout->addWidget( label_TitleFont, 2, 0 );
KFontRequester *kcfg_TitleFont = new KFontRequester( editorPage, "kcfg_TitleFont" );
- kcfg_TitleFont->setSizePolicy( QSizePolicy( QSizePolicy::Minimum, QSizePolicy::Fixed ) );
+ kcfg_TitleFont->setSizePolicy( TQSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Fixed ) );
layout->addMultiCellWidget( kcfg_TitleFont, 2, 2, 1, 2 );
return editorPage;
}
-QWidget *KNoteConfigDlg::makeDefaultsPage()
+TQWidget *KNoteConfigDlg::makeDefaultsPage()
{
- QTabWidget *defaultsPage = new QTabWidget();
+ TQTabWidget *defaultsPage = new TQTabWidget();
defaultsPage->addTab( makeDisplayPage( true ), SmallIconSet( "knotes" ), i18n("Displa&y") );
defaultsPage->addTab( makeEditorPage( true ), SmallIconSet( "edit" ), i18n("&Editor") );
return defaultsPage;
}
-QWidget *KNoteConfigDlg::makeActionsPage()
+TQWidget *KNoteConfigDlg::makeActionsPage()
{
- QWidget *actionsPage = new QWidget();
- QGridLayout *layout = new QGridLayout( actionsPage, 2, 2, 0, spacingHint() );
+ TQWidget *actionsPage = new TQWidget();
+ TQGridLayout *layout = new TQGridLayout( actionsPage, 2, 2, 0, spacingHint() );
- QLabel *label_MailAction = new QLabel( i18n("&Mail action:"), actionsPage, "label_MailAction" );
+ TQLabel *label_MailAction = new TQLabel( i18n("&Mail action:"), actionsPage, "label_MailAction" );
layout->addWidget( label_MailAction, 0, 0 );
KLineEdit *kcfg_MailAction = new KLineEdit( actionsPage, "kcfg_MailAction" );
@@ -196,24 +196,24 @@ QWidget *KNoteConfigDlg::makeActionsPage()
return actionsPage;
}
-QWidget *KNoteConfigDlg::makeNetworkPage()
+TQWidget *KNoteConfigDlg::makeNetworkPage()
{
- QWidget *networkPage = new QWidget();
- QGridLayout *layout = new QGridLayout( networkPage, 4, 2, 0, spacingHint() );
+ TQWidget *networkPage = new TQWidget();
+ TQGridLayout *layout = new TQGridLayout( networkPage, 4, 2, 0, spacingHint() );
- QGroupBox *incoming = new QHGroupBox( i18n("Incoming Notes"), networkPage );
+ TQGroupBox *incoming = new TQHGroupBox( i18n("Incoming Notes"), networkPage );
layout->addMultiCellWidget( incoming, 0, 0, 0, 1 );
- new QCheckBox( i18n("Accept incoming notes"), incoming, "kcfg_ReceiveNotes" );
+ new TQCheckBox( i18n("Accept incoming notes"), incoming, "kcfg_ReceiveNotes" );
- QGroupBox *outgoing = new QHGroupBox( i18n("Outgoing Notes"), networkPage );
+ TQGroupBox *outgoing = new TQHGroupBox( i18n("Outgoing Notes"), networkPage );
layout->addMultiCellWidget( outgoing, 1, 1, 0, 1 );
- QLabel *label_SenderID = new QLabel( i18n("&Sender ID:"), outgoing, "label_SenderID" );
+ TQLabel *label_SenderID = new TQLabel( i18n("&Sender ID:"), outgoing, "label_SenderID" );
KLineEdit *kcfg_SenderID = new KLineEdit( outgoing, "kcfg_SenderID" );
label_SenderID->setBuddy( kcfg_SenderID );
- QLabel *label_Port = new QLabel( i18n("&Port:"), networkPage, "label_Port" );
+ TQLabel *label_Port = new TQLabel( i18n("&Port:"), networkPage, "label_Port" );
layout->addWidget( label_Port, 2, 0 );
KIntNumInput *kcfg_Port = new KIntNumInput( networkPage, "kcfg_Port" );
@@ -224,16 +224,16 @@ QWidget *KNoteConfigDlg::makeNetworkPage()
return networkPage;
}
-QWidget *KNoteConfigDlg::makeStylePage()
+TQWidget *KNoteConfigDlg::makeStylePage()
{
- QWidget *stylePage = new QWidget();
- QGridLayout *layout = new QGridLayout( stylePage, 2, 2, 0, spacingHint() );
+ TQWidget *stylePage = new TQWidget();
+ TQGridLayout *layout = new TQGridLayout( stylePage, 2, 2, 0, spacingHint() );
- QLabel *label_Style = new QLabel( i18n("&Style:"), stylePage, "label_Style" );
+ TQLabel *label_Style = new TQLabel( i18n("&Style:"), stylePage, "label_Style" );
layout->addWidget( label_Style, 0, 0 );
- QComboBox *kcfg_Style = new QComboBox( stylePage, "kcfg_Style" );
- QStringList list;
+ TQComboBox *kcfg_Style = new TQComboBox( stylePage, "kcfg_Style" );
+ TQStringList list;
list << "Plain" << "Fancy";
kcfg_Style->insertStringList( list );
label_Style->setBuddy( kcfg_Style );
diff --git a/knotes/knoteconfigdlg.h b/knotes/knoteconfigdlg.h
index 2232b5e93..9a44a12a9 100644
--- a/knotes/knoteconfigdlg.h
+++ b/knotes/knoteconfigdlg.h
@@ -31,21 +31,21 @@ class KNoteConfigDlg : public KConfigDialog
{
Q_OBJECT
public:
- KNoteConfigDlg( KNoteConfig *config, const QString &title,
- QWidget *parent=0, const char *name=0 );
+ KNoteConfigDlg( KNoteConfig *config, const TQString &title,
+ TQWidget *parent=0, const char *name=0 );
~KNoteConfigDlg();
public slots:
void slotUpdateCaption();
protected:
- QWidget *makeDisplayPage( bool );
- QWidget *makeEditorPage( bool );
+ TQWidget *makeDisplayPage( bool );
+ TQWidget *makeEditorPage( bool );
- QWidget *makeDefaultsPage();
- QWidget *makeActionsPage();
- QWidget *makeNetworkPage();
- QWidget *makeStylePage();
+ TQWidget *makeDefaultsPage();
+ TQWidget *makeActionsPage();
+ TQWidget *makeNetworkPage();
+ TQWidget *makeStylePage();
};
#endif
diff --git a/knotes/knoteedit.cpp b/knotes/knoteedit.cpp
index 2398df19f..7df68149c 100644
--- a/knotes/knoteedit.cpp
+++ b/knotes/knoteedit.cpp
@@ -18,8 +18,8 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*******************************************************************/
-#include <qdragobject.h>
-#include <qfont.h>
+#include <tqdragobject.h>
+#include <tqfont.h>
#include <kdebug.h>
#include <klocale.h>
@@ -34,7 +34,7 @@ static const short SEP = 5;
static const short ICON_SIZE = 10;
-KNoteEdit::KNoteEdit( KActionCollection *actions, QWidget *parent, const char *name )
+KNoteEdit::KNoteEdit( KActionCollection *actions, TQWidget *parent, const char *name )
: KTextEdit( parent, name )
{
setAcceptDrops( true );
@@ -43,27 +43,27 @@ KNoteEdit::KNoteEdit( KActionCollection *actions, QWidget *parent, const char *n
setLinkUnderline( true );
// create the actions for the RMB menu
- KAction* undo = KStdAction::undo( this, SLOT(undo()), actions );
- KAction* redo = KStdAction::redo( this, SLOT(redo()), actions );
+ KAction* undo = KStdAction::undo( this, TQT_SLOT(undo()), actions );
+ KAction* redo = KStdAction::redo( this, TQT_SLOT(redo()), actions );
undo->setEnabled( isUndoAvailable() );
redo->setEnabled( isRedoAvailable() );
- m_cut = KStdAction::cut( this, SLOT(cut()), actions );
- m_copy = KStdAction::copy( this, SLOT(copy()), actions );
- m_paste = KStdAction::paste( this, SLOT(paste()), actions );
+ m_cut = KStdAction::cut( this, TQT_SLOT(cut()), actions );
+ m_copy = KStdAction::copy( this, TQT_SLOT(copy()), actions );
+ m_paste = KStdAction::paste( this, TQT_SLOT(paste()), actions );
m_cut->setEnabled( false );
m_copy->setEnabled( false );
m_paste->setEnabled( true );
- connect( this, SIGNAL(undoAvailable(bool)), undo, SLOT(setEnabled(bool)) );
- connect( this, SIGNAL(redoAvailable(bool)), redo, SLOT(setEnabled(bool)) );
+ connect( this, TQT_SIGNAL(undoAvailable(bool)), undo, TQT_SLOT(setEnabled(bool)) );
+ connect( this, TQT_SIGNAL(redoAvailable(bool)), redo, TQT_SLOT(setEnabled(bool)) );
- connect( this, SIGNAL(copyAvailable(bool)), m_cut, SLOT(setEnabled(bool)) );
- connect( this, SIGNAL(copyAvailable(bool)), m_copy, SLOT(setEnabled(bool)) );
+ connect( this, TQT_SIGNAL(copyAvailable(bool)), m_cut, TQT_SLOT(setEnabled(bool)) );
+ connect( this, TQT_SIGNAL(copyAvailable(bool)), m_copy, TQT_SLOT(setEnabled(bool)) );
- new KAction( KStdGuiItem::clear(), 0, this, SLOT(clear()), actions, "edit_clear" );
- KStdAction::selectAll( this, SLOT(selectAll()), actions );
+ new KAction( KStdGuiItem::clear(), 0, this, TQT_SLOT(clear()), actions, "edit_clear" );
+ KStdAction::selectAll( this, TQT_SLOT(selectAll()), actions );
// create the actions modifying the text format
m_textBold = new KToggleAction( i18n("Bold"), "text_bold", CTRL + Key_B, 0, 0,
@@ -75,23 +75,23 @@ KNoteEdit::KNoteEdit( KActionCollection *actions, QWidget *parent, const char *n
m_textStrikeOut = new KToggleAction( i18n("Strike Out"), "text_strike", CTRL + Key_S, 0, 0,
actions, "format_strikeout" );
- connect( m_textBold, SIGNAL(toggled(bool)), SLOT(setBold(bool)) );
- connect( m_textItalic, SIGNAL(toggled(bool)), SLOT(setItalic(bool)) );
- connect( m_textUnderline, SIGNAL(toggled(bool)), SLOT(setUnderline(bool)) );
- connect( m_textStrikeOut, SIGNAL(toggled(bool)), SLOT(textStrikeOut(bool)) );
+ connect( m_textBold, TQT_SIGNAL(toggled(bool)), TQT_SLOT(setBold(bool)) );
+ connect( m_textItalic, TQT_SIGNAL(toggled(bool)), TQT_SLOT(setItalic(bool)) );
+ connect( m_textUnderline, TQT_SIGNAL(toggled(bool)), TQT_SLOT(setUnderline(bool)) );
+ connect( m_textStrikeOut, TQT_SIGNAL(toggled(bool)), TQT_SLOT(textStrikeOut(bool)) );
m_textAlignLeft = new KToggleAction( i18n("Align Left"), "text_left", ALT + Key_L,
- this, SLOT(textAlignLeft()),
+ this, TQT_SLOT(textAlignLeft()),
actions, "format_alignleft" );
m_textAlignLeft->setChecked( true ); // just a dummy, will be updated later
m_textAlignCenter = new KToggleAction( i18n("Align Center"), "text_center", ALT + Key_C,
- this, SLOT(textAlignCenter()),
+ this, TQT_SLOT(textAlignCenter()),
actions, "format_aligncenter" );
m_textAlignRight = new KToggleAction( i18n("Align Right"), "text_right", ALT + Key_R,
- this, SLOT(textAlignRight()),
+ this, TQT_SLOT(textAlignRight()),
actions, "format_alignright" );
m_textAlignBlock = new KToggleAction( i18n("Align Block"), "text_block", ALT + Key_B,
- this, SLOT(textAlignBlock()),
+ this, TQT_SLOT(textAlignBlock()),
actions, "format_alignblock" );
m_textAlignLeft->setExclusiveGroup( "align" );
@@ -100,16 +100,16 @@ KNoteEdit::KNoteEdit( KActionCollection *actions, QWidget *parent, const char *n
m_textAlignBlock->setExclusiveGroup( "align" );
m_textList = new KToggleAction( i18n("List"), "enum_list", 0,
- this, SLOT(textList()),
+ this, TQT_SLOT(textList()),
actions, "format_list" );
m_textList->setExclusiveGroup( "style" );
m_textSuper = new KToggleAction( i18n("Superscript"), "text_super", 0,
- this, SLOT(textSuperScript()),
+ this, TQT_SLOT(textSuperScript()),
actions, "format_super" );
m_textSub = new KToggleAction( i18n("Subscript"), "text_sub", 0,
- this, SLOT(textSubScript()),
+ this, TQT_SLOT(textSubScript()),
actions, "format_sub" );
m_textSuper->setExclusiveGroup( "valign" );
@@ -118,53 +118,53 @@ KNoteEdit::KNoteEdit( KActionCollection *actions, QWidget *parent, const char *n
// There is no easy possibility to implement text indenting with QTextEdit
//
// m_textIncreaseIndent = new KAction( i18n("Increase Indent"), "format_increaseindent", 0,
-// this, SLOT(textIncreaseIndent()),
+// this, TQT_SLOT(textIncreaseIndent()),
// actions, "format_increaseindent" );
//
// m_textDecreaseIndent = new KAction( i18n("Decrease Indent"), "format_decreaseindent", 0,
-// this, SLOT(textDecreaseIndent()),
+// this, TQT_SLOT(textDecreaseIndent()),
// actions, "format_decreaseindent" );
- QPixmap pix( ICON_SIZE, ICON_SIZE );
+ TQPixmap pix( ICON_SIZE, ICON_SIZE );
pix.fill( black ); // just a dummy, gets updated before widget is shown
m_textColor = new KAction( i18n("Text Color..."), pix, 0, this,
- SLOT(textColor()), actions, "format_color" );
+ TQT_SLOT(textColor()), actions, "format_color" );
m_textFont = new KFontAction( i18n("Text Font"), "text", KKey(),
actions, "format_font" );
- connect( m_textFont, SIGNAL(activated( const QString & )),
- this, SLOT(setFamily( const QString & )) );
+ connect( m_textFont, TQT_SIGNAL(activated( const TQString & )),
+ this, TQT_SLOT(setFamily( const TQString & )) );
m_textSize = new KFontSizeAction( i18n("Text Size"), KKey(),
actions, "format_size" );
- connect( m_textSize, SIGNAL(fontSizeChanged( int )),
- this, SLOT(setPointSize( int )) );
-
- // QTextEdit connections
- connect( this, SIGNAL(returnPressed()), SLOT(slotReturnPressed()) );
- connect( this, SIGNAL(currentFontChanged( const QFont & )),
- this, SLOT(fontChanged( const QFont & )) );
- connect( this, SIGNAL(currentColorChanged( const QColor & )),
- this, SLOT(colorChanged( const QColor & )) );
- connect( this, SIGNAL(currentAlignmentChanged( int )),
- this, SLOT(alignmentChanged( int )) );
- connect( this, SIGNAL(currentVerticalAlignmentChanged( VerticalAlignment )),
- this, SLOT(verticalAlignmentChanged( VerticalAlignment )) );
+ connect( m_textSize, TQT_SIGNAL(fontSizeChanged( int )),
+ this, TQT_SLOT(setPointSize( int )) );
+
+ // TQTextEdit connections
+ connect( this, TQT_SIGNAL(returnPressed()), TQT_SLOT(slotReturnPressed()) );
+ connect( this, TQT_SIGNAL(currentFontChanged( const TQFont & )),
+ this, TQT_SLOT(fontChanged( const TQFont & )) );
+ connect( this, TQT_SIGNAL(currentColorChanged( const TQColor & )),
+ this, TQT_SLOT(colorChanged( const TQColor & )) );
+ connect( this, TQT_SIGNAL(currentAlignmentChanged( int )),
+ this, TQT_SLOT(alignmentChanged( int )) );
+ connect( this, TQT_SIGNAL(currentVerticalAlignmentChanged( VerticalAlignment )),
+ this, TQT_SLOT(verticalAlignmentChanged( VerticalAlignment )) );
}
KNoteEdit::~KNoteEdit()
{
}
-void KNoteEdit::setText( const QString& text )
+void KNoteEdit::setText( const TQString& text )
{
- // to update the font and font size combo box - QTextEdit stopped
+ // to update the font and font size combo box - TQTextEdit stopped
// emitting the currentFontChanged signal with the new optimizations
KTextEdit::setText( text );
fontChanged( currentFont() );
}
-void KNoteEdit::setTextFont( const QFont& font )
+void KNoteEdit::setTextFont( const TQFont& font )
{
if ( textFormat() == PlainText )
setFont( font );
@@ -172,7 +172,7 @@ void KNoteEdit::setTextFont( const QFont& font )
setCurrentFont( font );
}
-void KNoteEdit::setTextColor( const QColor& color )
+void KNoteEdit::setTextColor( const TQColor& color )
{
setColor( color );
colorChanged( color );
@@ -180,7 +180,7 @@ void KNoteEdit::setTextColor( const QColor& color )
void KNoteEdit::setTabStop( int tabs )
{
- QFontMetrics fm( font() );
+ TQFontMetrics fm( font() );
setTabStopWidth( fm.width( 'x' ) * tabs );
}
@@ -199,12 +199,12 @@ void KNoteEdit::setTextFormat( TextFormat f )
if ( f == RichText )
{
- QString t = text();
+ TQString t = text();
KTextEdit::setTextFormat( f );
// if the note contains html/xml source try to display it, otherwise
// get the modified text again and set it to preserve newlines
- if ( QStyleSheet::mightBeRichText( t ) )
+ if ( TQStyleSheet::mightBeRichText( t ) )
setText( t );
else
setText( text() );
@@ -214,7 +214,7 @@ void KNoteEdit::setTextFormat( TextFormat f )
else
{
KTextEdit::setTextFormat( f );
- QString t = text();
+ TQString t = text();
setText( t );
disableRichTextActions();
@@ -223,9 +223,9 @@ void KNoteEdit::setTextFormat( TextFormat f )
void KNoteEdit::textStrikeOut( bool s )
{
- // QTextEdit does not support stroke out text (no saving,
+ // TQTextEdit does not support stroke out text (no saving,
// no changing of more than one selected character)
- QFont font;
+ TQFont font;
if ( !hasSelectedText() )
{
@@ -269,9 +269,9 @@ void KNoteEdit::textStrikeOut( bool s )
void KNoteEdit::textColor()
{
- QColor c = color();
+ TQColor c = color();
int ret = KColorDialog::getColor( c, this );
- if ( ret == QDialog::Accepted )
+ if ( ret == TQDialog::Accepted )
setTextColor( c );
}
@@ -302,9 +302,9 @@ void KNoteEdit::textAlignBlock()
void KNoteEdit::textList()
{
if ( m_textList->isChecked() )
- setParagType( QStyleSheetItem::DisplayListItem, QStyleSheetItem::ListDisc );
+ setParagType( TQStyleSheetItem::DisplayListItem, TQStyleSheetItem::ListDisc );
else
- setParagType( QStyleSheetItem::DisplayBlock, QStyleSheetItem::ListDisc );
+ setParagType( TQStyleSheetItem::DisplayBlock, TQStyleSheetItem::ListDisc );
}
void KNoteEdit::textSuperScript()
@@ -334,7 +334,7 @@ void KNoteEdit::textSubScript()
/** protected methods **/
-void KNoteEdit::contentsDragEnterEvent( QDragEnterEvent *e )
+void KNoteEdit::contentsDragEnterEvent( TQDragEnterEvent *e )
{
if ( KURLDrag::canDecode( e ) )
e->accept();
@@ -342,7 +342,7 @@ void KNoteEdit::contentsDragEnterEvent( QDragEnterEvent *e )
KTextEdit::contentsDragEnterEvent( e );
}
-void KNoteEdit::contentsDropEvent( QDropEvent *e )
+void KNoteEdit::contentsDropEvent( TQDropEvent *e )
{
KURL::List list;
@@ -366,7 +366,7 @@ void KNoteEdit::slotReturnPressed()
autoIndent();
}
-void KNoteEdit::fontChanged( const QFont &f )
+void KNoteEdit::fontChanged( const TQFont &f )
{
m_textFont->setFont( f.family() );
m_textSize->setFontSize( f.pointSize() );
@@ -377,9 +377,9 @@ void KNoteEdit::fontChanged( const QFont &f )
m_textStrikeOut->setChecked( f.strikeOut() );
}
-void KNoteEdit::colorChanged( const QColor &c )
+void KNoteEdit::colorChanged( const TQColor &c )
{
- QPixmap pix( ICON_SIZE, ICON_SIZE );
+ TQPixmap pix( ICON_SIZE, ICON_SIZE );
pix.fill( c );
m_textColor->setIconSet( pix );
}
@@ -416,7 +416,7 @@ void KNoteEdit::verticalAlignmentChanged( VerticalAlignment a )
void KNoteEdit::autoIndent()
{
int para, index;
- QString string;
+ TQString string;
getCursorPosition( &para, &index );
while ( para > 0 && string.stripWhiteSpace().isEmpty() )
string = text( --para );
@@ -428,7 +428,7 @@ void KNoteEdit::autoIndent()
// character in string.
// It is assumed that string contains at least one non whitespace character
// ie \n \r \t \v \f and space
- QString indentString;
+ TQString indentString;
int len = string.length();
int i = 0;
@@ -439,7 +439,7 @@ void KNoteEdit::autoIndent()
insert( indentString );
}
-void KNoteEdit::emitLinkClicked( const QString &s )
+void KNoteEdit::emitLinkClicked( const TQString &s )
{
kdDebug(5500) << k_funcinfo << s << endl;
}
diff --git a/knotes/knoteedit.h b/knotes/knoteedit.h
index 94760f3a7..00442ae5a 100644
--- a/knotes/knoteedit.h
+++ b/knotes/knoteedit.h
@@ -21,7 +21,7 @@
#ifndef KNOTEEDIT_H
#define KNOTEEDIT_H
-#include <qwidget.h>
+#include <tqwidget.h>
#include <ktextedit.h>
@@ -39,12 +39,12 @@ class KNoteEdit : public KTextEdit
{
Q_OBJECT
public:
- KNoteEdit( KActionCollection *actions, QWidget *parent=0, const char *name=0 );
+ KNoteEdit( KActionCollection *actions, TQWidget *parent=0, const char *name=0 );
~KNoteEdit();
- void setText( const QString& text );
- void setTextFont( const QFont& font );
- void setTextColor( const QColor& color );
+ void setText( const TQString& text );
+ void setTextFont( const TQFont& font );
+ void setTextColor( const TQColor& color );
void setTabStop( int tabs );
void setAutoIndentMode( bool newmode );
@@ -69,14 +69,14 @@ public slots:
//void textDecreaseIndent();
protected:
- virtual void contentsDragEnterEvent( QDragEnterEvent *e );
- virtual void contentsDropEvent( QDropEvent *e );
+ virtual void contentsDragEnterEvent( TQDragEnterEvent *e );
+ virtual void contentsDropEvent( TQDropEvent *e );
private slots:
void slotReturnPressed();
- void fontChanged( const QFont &f );
- void colorChanged( const QColor &c );
+ void fontChanged( const TQFont &f );
+ void colorChanged( const TQColor &c );
void alignmentChanged( int a );
void verticalAlignmentChanged( VerticalAlignment a );
@@ -84,7 +84,7 @@ private:
void autoIndent();
virtual bool linksEnabled() const { return true; }
- virtual void emitLinkClicked( const QString &s );
+ virtual void emitLinkClicked( const TQString &s );
void enableRichTextActions();
void disableRichTextActions();
diff --git a/knotes/knotehostdlg.cpp b/knotes/knotehostdlg.cpp
index 7045c465c..e78894eae 100644
--- a/knotes/knotehostdlg.cpp
+++ b/knotes/knotehostdlg.cpp
@@ -30,10 +30,10 @@
your version.
*******************************************************************/
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qlabel.h>
-#include <qvbox.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqlabel.h>
+#include <tqvbox.h>
#include <kdebug.h>
#include <kglobal.h>
@@ -46,11 +46,11 @@
#include "knotesglobalconfig.h"
-KNoteHostDlg::KNoteHostDlg( const QString &caption, QWidget *parent, const char *name )
+KNoteHostDlg::KNoteHostDlg( const TQString &caption, TQWidget *parent, const char *name )
: KDialogBase( parent, name, true, caption, Ok|Cancel, Ok, true )
{
- QVBox *page = makeVBoxMainWidget();
- (void)new QLabel( i18n("Hostname or IP address:"), page );
+ TQVBox *page = makeVBoxMainWidget();
+ (void)new TQLabel( i18n("Hostname or IP address:"), page );
m_hostCombo = new KHistoryCombo( true, page );
m_hostCombo->setMinimumWidth( fontMetrics().maxWidth() * 15 );
@@ -60,8 +60,8 @@ KNoteHostDlg::KNoteHostDlg( const QString &caption, QWidget *parent, const char
m_hostCombo->setHistoryItems( KNotesGlobalConfig::knownHosts(), true );
m_hostCombo->setFocus();
//m_hostCombo->completionObject()->setItems( KNotesGlobalConfig::hostCompletions() );
- connect( m_hostCombo->lineEdit(), SIGNAL( textChanged ( const QString & ) ),
- this, SLOT( slotTextChanged( const QString & ) ) );
+ connect( m_hostCombo->lineEdit(), TQT_SIGNAL( textChanged ( const TQString & ) ),
+ this, TQT_SLOT( slotTextChanged( const TQString & ) ) );
slotTextChanged( m_hostCombo->lineEdit()->text() );
}
@@ -76,12 +76,12 @@ KNoteHostDlg::~KNoteHostDlg()
KNotesGlobalConfig::writeConfig();
}
-void KNoteHostDlg::slotTextChanged( const QString& text )
+void KNoteHostDlg::slotTextChanged( const TQString& text )
{
enableButtonOK( !text.isEmpty() );
}
-QString KNoteHostDlg::host() const
+TQString KNoteHostDlg::host() const
{
return m_hostCombo->currentText();
}
diff --git a/knotes/knotehostdlg.h b/knotes/knotehostdlg.h
index a48be2fb4..1e8c79ff1 100644
--- a/knotes/knotehostdlg.h
+++ b/knotes/knotehostdlg.h
@@ -45,13 +45,13 @@ class KNoteHostDlg : public KDialogBase
{
Q_OBJECT
public:
- KNoteHostDlg( const QString& caption, QWidget *parent=0, const char *name=0 );
+ KNoteHostDlg( const TQString& caption, TQWidget *parent=0, const char *name=0 );
~KNoteHostDlg();
- QString host() const;
+ TQString host() const;
private slots:
- void slotTextChanged( const QString & );
+ void slotTextChanged( const TQString & );
private:
KHistoryCombo *m_hostCombo;
diff --git a/knotes/knoteprinter.cpp b/knotes/knoteprinter.cpp
index d1e6ffd59..0bd6ef8a7 100644
--- a/knotes/knoteprinter.cpp
+++ b/knotes/knoteprinter.cpp
@@ -5,86 +5,86 @@
#include <klocale.h>
#include <kprinter.h>
-#include <qfont.h>
-#include <qpaintdevicemetrics.h>
-#include <qpainter.h>
-#include <qrect.h>
-#include <qsimplerichtext.h>
-#include <qstring.h>
+#include <tqfont.h>
+#include <tqpaintdevicemetrics.h>
+#include <tqpainter.h>
+#include <tqrect.h>
+#include <tqsimplerichtext.h>
+#include <tqstring.h>
KNotePrinter::KNotePrinter() : m_styleSheet( 0 ), m_mimeSourceFactory( 0 )
{
}
-void KNotePrinter::setContext( const QString& context )
+void KNotePrinter::setContext( const TQString& context )
{
m_context = context;
}
-QString KNotePrinter::context() const
+TQString KNotePrinter::context() const
{
return m_context;
}
-void KNotePrinter::setMimeSourceFactory( QMimeSourceFactory* factory )
+void KNotePrinter::setMimeSourceFactory( TQMimeSourceFactory* factory )
{
m_mimeSourceFactory = factory;
}
-QMimeSourceFactory* KNotePrinter::mimeSourceFactory() const
+TQMimeSourceFactory* KNotePrinter::mimeSourceFactory() const
{
return m_mimeSourceFactory;
}
-void KNotePrinter::setFont( const QFont& font )
+void KNotePrinter::setFont( const TQFont& font )
{
m_font = font;
}
-QFont KNotePrinter::font() const
+TQFont KNotePrinter::font() const
{
return m_font;
}
-void KNotePrinter::setColorGroup( const QColorGroup& colorGroup )
+void KNotePrinter::setColorGroup( const TQColorGroup& colorGroup )
{
m_colorGroup = colorGroup;
}
-QColorGroup KNotePrinter::colorGroup() const
+TQColorGroup KNotePrinter::colorGroup() const
{
return m_colorGroup;
}
-void KNotePrinter::setStyleSheet( QStyleSheet* styleSheet )
+void KNotePrinter::setStyleSheet( TQStyleSheet* styleSheet )
{
m_styleSheet = styleSheet;
}
-QStyleSheet* KNotePrinter::styleSheet() const
+TQStyleSheet* KNotePrinter::styleSheet() const
{
return m_styleSheet;
}
-void KNotePrinter::doPrint( KPrinter& printer, QPainter& painter,
- const QString& content ) const
+void KNotePrinter::doPrint( KPrinter& printer, TQPainter& painter,
+ const TQString& content ) const
{
const int margin = 40; // pt
- QPaintDeviceMetrics metrics( painter.device() );
+ TQPaintDeviceMetrics metrics( painter.device() );
int marginX = margin * metrics.logicalDpiX() / 72;
int marginY = margin * metrics.logicalDpiY() / 72;
- QRect body( marginX, marginY,
+ TQRect body( marginX, marginY,
metrics.width() - marginX * 2,
metrics.height() - marginY * 2 );
- QSimpleRichText text( content, m_font, m_context,
+ TQSimpleRichText text( content, m_font, m_context,
m_styleSheet, m_mimeSourceFactory,
body.height() /*, linkColor, linkUnderline? */ );
text.setWidth( &painter, body.width() );
- QRect view( body );
+ TQRect view( body );
int page = 1;
@@ -97,8 +97,8 @@ void KNotePrinter::doPrint( KPrinter& printer, QPainter& painter,
// page numbers
painter.setFont( m_font );
painter.drawText(
- view.right() - painter.fontMetrics().width( QString::number( page ) ),
- view.bottom() + painter.fontMetrics().ascent() + 5, QString::number( page )
+ view.right() - painter.fontMetrics().width( TQString::number( page ) ),
+ view.bottom() + painter.fontMetrics().ascent() + 5, TQString::number( page )
);
if ( view.top() >= text.height() )
@@ -109,20 +109,20 @@ void KNotePrinter::doPrint( KPrinter& printer, QPainter& painter,
}
}
-void KNotePrinter::printNote( const QString& name, const QString& content ) const
+void KNotePrinter::printNote( const TQString& name, const TQString& content ) const
{
KPrinter printer;
printer.setFullPage( true );
if ( !printer.setup( 0, i18n("Print %1").arg(name) ) )
return;
- QPainter painter;
+ TQPainter painter;
painter.begin( &printer );
doPrint( printer, painter, content );
painter.end();
}
-void KNotePrinter::printNotes( const QValueList<KCal::Journal*>& journals ) const
+void KNotePrinter::printNotes( const TQValueList<KCal::Journal*>& journals ) const
{
if ( journals.isEmpty() )
return;
@@ -133,11 +133,11 @@ void KNotePrinter::printNotes( const QValueList<KCal::Journal*>& journals ) cons
if ( !printer.setup( 0, i18n("Print Note", "Print %n notes", journals.count() ) ) )
return;
- QPainter painter;
+ TQPainter painter;
painter.begin( &printer );
- QString content;
- QValueListConstIterator<KCal::Journal*> it( journals.begin() );
- QValueListConstIterator<KCal::Journal*> end( journals.end() );
+ TQString content;
+ TQValueListConstIterator<KCal::Journal*> it( journals.begin() );
+ TQValueListConstIterator<KCal::Journal*> end( journals.end() );
while ( it != end ) {
KCal::Journal *j = *it;
it++;
diff --git a/knotes/knoteprinter.h b/knotes/knoteprinter.h
index 8ce3dc763..d9b006961 100644
--- a/knotes/knoteprinter.h
+++ b/knotes/knoteprinter.h
@@ -1,9 +1,9 @@
#ifndef KNOTEPRINTER_H
#define KNOTEPRINTER_H
-#include <qfont.h>
-#include <qpalette.h>
-#include <qstring.h>
+#include <tqfont.h>
+#include <tqpalette.h>
+#include <tqstring.h>
class QMimeSourceFactory;
class QStyleSheet;
@@ -19,35 +19,35 @@ public:
KNotePrinter();
- void printNote( const QString& name,
- const QString& content ) const;
+ void printNote( const TQString& name,
+ const TQString& content ) const;
- void printNotes( const QValueList<KCal::Journal*>& journals ) const;
+ void printNotes( const TQValueList<KCal::Journal*>& journals ) const;
- void setFont( const QFont& font );
- QFont font() const;
+ void setFont( const TQFont& font );
+ TQFont font() const;
- void setColorGroup( const QColorGroup& colorGroup );
- QColorGroup colorGroup() const;
+ void setColorGroup( const TQColorGroup& colorGroup );
+ TQColorGroup colorGroup() const;
- void setStyleSheet( QStyleSheet* styleSheet );
- QStyleSheet* styleSheet() const;
+ void setStyleSheet( TQStyleSheet* styleSheet );
+ TQStyleSheet* styleSheet() const;
- void setContext( const QString& context );
- QString context() const;
+ void setContext( const TQString& context );
+ TQString context() const;
- void setMimeSourceFactory( QMimeSourceFactory* factory );
- QMimeSourceFactory* mimeSourceFactory() const;
+ void setMimeSourceFactory( TQMimeSourceFactory* factory );
+ TQMimeSourceFactory* mimeSourceFactory() const;
private:
- void doPrint( KPrinter& printer, QPainter& painter,
- const QString& content ) const;
-
- QColorGroup m_colorGroup;
- QFont m_font;
- QStyleSheet* m_styleSheet;
- QMimeSourceFactory* m_mimeSourceFactory;
- QString m_context;
+ void doPrint( KPrinter& printer, TQPainter& painter,
+ const TQString& content ) const;
+
+ TQColorGroup m_colorGroup;
+ TQFont m_font;
+ TQStyleSheet* m_styleSheet;
+ TQMimeSourceFactory* m_mimeSourceFactory;
+ TQString m_context;
};
#endif // KNOTEPRINTER
diff --git a/knotes/knotesalarm.cpp b/knotes/knotesalarm.cpp
index 056c448ed..c653d80ca 100644
--- a/knotes/knotesalarm.cpp
+++ b/knotes/knotesalarm.cpp
@@ -29,7 +29,7 @@
your version.
*******************************************************************/
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include <kmessagebox.h>
#include <klocale.h>
@@ -42,28 +42,28 @@
#include "knotesglobalconfig.h"
-KNotesAlarm::KNotesAlarm( KNotesResourceManager *manager, QObject *parent, const char *name )
- : QObject( parent, name ),
+KNotesAlarm::KNotesAlarm( KNotesResourceManager *manager, TQObject *parent, const char *name )
+ : TQObject( parent, name ),
m_manager( manager ),
m_checkTimer( 0, "m_checkTimer" )
{
// TODO: fix timezone stuff?
- connect( &m_checkTimer, SIGNAL(timeout()), SLOT(checkAlarms()) );
+ connect( &m_checkTimer, TQT_SIGNAL(timeout()), TQT_SLOT(checkAlarms()) );
m_checkTimer.start( 1000 * KNotesGlobalConfig::self()->checkInterval() ); // interval in seconds
}
void KNotesAlarm::checkAlarms()
{
- QDateTime from = KNotesGlobalConfig::self()->alarmsLastChecked().addSecs( 1 );
+ TQDateTime from = KNotesGlobalConfig::self()->alarmsLastChecked().addSecs( 1 );
if ( !from.isValid() )
from.setTime_t( 0 );
- KNotesGlobalConfig::self()->setAlarmsLastChecked( QDateTime::currentDateTime() );
- QValueList<KCal::Alarm *> alarms = m_manager->alarms( from, KNotesGlobalConfig::self()->alarmsLastChecked() );
+ KNotesGlobalConfig::self()->setAlarmsLastChecked( TQDateTime::currentDateTime() );
+ TQValueList<KCal::Alarm *> alarms = m_manager->alarms( from, KNotesGlobalConfig::self()->alarmsLastChecked() );
- QStringList notes;
- QValueList<KCal::Alarm *>::ConstIterator it;
+ TQStringList notes;
+ TQValueList<KCal::Alarm *>::ConstIterator it;
for ( it = alarms.begin(); it != alarms.end(); ++it )
{
KCal::Incidence *incidence = (*it)->parent();
diff --git a/knotes/knotesalarm.h b/knotes/knotesalarm.h
index 3845c9660..993c84905 100644
--- a/knotes/knotesalarm.h
+++ b/knotes/knotesalarm.h
@@ -32,8 +32,8 @@
#ifndef KNOTESALARM_H
#define KNOTESALARM_H
-#include <qtimer.h>
-#include <qdatetime.h>
+#include <tqtimer.h>
+#include <tqdatetime.h>
class KNotesResourceManager;
@@ -46,14 +46,14 @@ class KNotesAlarm : public QObject
{
Q_OBJECT
public:
- KNotesAlarm( KNotesResourceManager *manager, QObject *parent = 0, const char *name = 0 );
+ KNotesAlarm( KNotesResourceManager *manager, TQObject *parent = 0, const char *name = 0 );
private slots:
void checkAlarms();
private:
KNotesResourceManager *m_manager;
- QTimer m_checkTimer;
+ TQTimer m_checkTimer;
};
#endif
diff --git a/knotes/knotesapp.cpp b/knotes/knotesapp.cpp
index 1a1bdde89..858cbb795 100644
--- a/knotes/knotesapp.cpp
+++ b/knotes/knotesapp.cpp
@@ -18,9 +18,9 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*******************************************************************/
-#include <qclipboard.h>
-#include <qptrlist.h>
-#include <qtooltip.h>
+#include <tqclipboard.h>
+#include <tqptrlist.h>
+#include <tqtooltip.h>
#include <kdebug.h>
#include <kaction.h>
@@ -60,12 +60,12 @@ using namespace KNetwork;
class KNotesKeyDialog : public KDialogBase
{
public:
- KNotesKeyDialog( KGlobalAccel *globals, QWidget *parent, const char* name = 0 )
+ KNotesKeyDialog( KGlobalAccel *globals, TQWidget *parent, const char* name = 0 )
: KDialogBase( parent, name, true, i18n("Configure Shortcuts"), Default|Ok|Cancel, Ok )
{
m_keyChooser = new KKeyChooser( globals, this );
setMainWidget( m_keyChooser );
- connect( this, SIGNAL(defaultClicked()), m_keyChooser, SLOT(allDefault()) );
+ connect( this, TQT_SIGNAL(defaultClicked()), m_keyChooser, TQT_SLOT(allDefault()) );
}
void insert( KActionCollection *actions )
@@ -84,7 +84,7 @@ private:
};
-int KNotesApp::KNoteActionList::compareItems( QPtrCollection::Item s1, QPtrCollection::Item s2 )
+int KNotesApp::KNoteActionList::compareItems( TQPtrCollection::Item s1, TQPtrCollection::Item s2 )
{
if ( ((KAction*)s1)->text() == ((KAction*)s2)->text() )
return 0;
@@ -93,39 +93,39 @@ int KNotesApp::KNoteActionList::compareItems( QPtrCollection::Item s1, QPtrColle
KNotesApp::KNotesApp()
- : DCOPObject("KNotesIface"), QLabel( 0, 0, WType_TopLevel ),
+ : DCOPObject("KNotesIface"), TQLabel( 0, 0, WType_TopLevel ),
m_alarm( 0 ), m_listener( 0 ), m_find( 0 ), m_findPos( 0 )
{
- connect( kapp, SIGNAL(lastWindowClosed()), kapp, SLOT(quit()) );
+ connect( kapp, TQT_SIGNAL(lastWindowClosed()), kapp, TQT_SLOT(quit()) );
m_noteList.setAutoDelete( true );
m_noteActions.setAutoDelete( true );
// create the dock widget...
KWin::setSystemTrayWindowFor( winId(), qt_xrootwin() );
- QToolTip::add( this, i18n( "KNotes: Sticky notes for KDE" ) );
+ TQToolTip::add( this, i18n( "KNotes: Sticky notes for KDE" ) );
setBackgroundMode( X11ParentRelative );
- setPixmap( KSystemTray::loadSizedIcon( "knotes", QWidget::width() ) );
+ setPixmap( KSystemTray::loadSizedIcon( "knotes", TQWidget::width() ) );
// set the initial style
KNote::setStyle( KNotesGlobalConfig::style() );
// create the GUI...
new KAction( i18n("New Note"), "filenew", 0,
- this, SLOT(newNote()), actionCollection(), "new_note" );
+ this, TQT_SLOT(newNote()), actionCollection(), "new_note" );
new KAction( i18n("New Note From Clipboard"), "editpaste", 0,
- this, SLOT(newNoteFromClipboard()), actionCollection(), "new_note_clipboard" );
+ this, TQT_SLOT(newNoteFromClipboard()), actionCollection(), "new_note_clipboard" );
new KAction( i18n("Show All Notes"), "knotes", 0,
- this, SLOT(showAllNotes()), actionCollection(), "show_all_notes" );
+ this, TQT_SLOT(showAllNotes()), actionCollection(), "show_all_notes" );
new KAction( i18n("Hide All Notes"), "fileclose", 0,
- this, SLOT(hideAllNotes()), actionCollection(), "hide_all_notes" );
+ this, TQT_SLOT(hideAllNotes()), actionCollection(), "hide_all_notes" );
new KHelpMenu( this, kapp->aboutData(), false, actionCollection() );
- KStdAction::find( this, SLOT(slotOpenFindDialog()), actionCollection() );
- KStdAction::preferences( this, SLOT(slotPreferences()), actionCollection() );
- KStdAction::keyBindings( this, SLOT(slotConfigureAccels()), actionCollection() );
+ KStdAction::find( this, TQT_SLOT(slotOpenFindDialog()), actionCollection() );
+ KStdAction::preferences( this, TQT_SLOT(slotPreferences()), actionCollection() );
+ KStdAction::keyBindings( this, TQT_SLOT(slotConfigureAccels()), actionCollection() );
//FIXME: no shortcut removing!?
- KStdAction::quit( this, SLOT(slotQuit()), actionCollection() )->setShortcut( 0 );
+ KStdAction::quit( this, TQT_SLOT(slotQuit()), actionCollection() )->setShortcut( 0 );
setXMLFile( instance()->instanceName() + "appui.rc" );
@@ -137,12 +137,12 @@ KNotesApp::KNotesApp()
m_note_menu = static_cast<KPopupMenu*>(m_guiFactory->container( "notes_menu", this ));
// get the most recent XML UI file
- QString xmlFileName = instance()->instanceName() + "ui.rc";
- QString filter = QString::fromLatin1( instance()->instanceName() + '/' ) + xmlFileName;
- QStringList fileList = instance()->dirs()->findAllResources( "data", filter ) +
+ TQString xmlFileName = instance()->instanceName() + "ui.rc";
+ TQString filter = TQString::fromLatin1( instance()->instanceName() + '/' ) + xmlFileName;
+ TQStringList fileList = instance()->dirs()->findAllResources( "data", filter ) +
instance()->dirs()->findAllResources( "data", xmlFileName );
- QString doc;
+ TQString doc;
KXMLGUIClient::findMostRecentXMLFile( fileList, doc );
m_noteGUI.setContent( doc );
@@ -150,16 +150,16 @@ KNotesApp::KNotesApp()
m_globalAccel = new KGlobalAccel( this, "global accel" );
m_globalAccel->insert( "global_new_note", i18n("New Note"), "",
ALT+SHIFT+Key_N, ALT+SHIFT+Key_N ,
- this, SLOT(newNote()), true, true );
+ this, TQT_SLOT(newNote()), true, true );
m_globalAccel->insert( "global_new_note_clipboard", i18n("New Note From Clipboard"), "",
ALT+SHIFT+Key_C, ALT+SHIFT+Key_C,
- this, SLOT(newNoteFromClipboard()), true, true );
+ this, TQT_SLOT(newNoteFromClipboard()), true, true );
m_globalAccel->insert( "global_hide_all_notes", i18n("Hide All Notes"), "",
ALT+SHIFT+Key_H, ALT+SHIFT+Key_H ,
- this, SLOT(hideAllNotes()), true, true );
+ this, TQT_SLOT(hideAllNotes()), true, true );
m_globalAccel->insert( "global_show_all_notes", i18n("Show All Notes"), "",
ALT+SHIFT+Key_S, ALT+SHIFT+Key_S,
- this, SLOT(showAllNotes()), true, true );
+ this, TQT_SLOT(showAllNotes()), true, true );
m_globalAccel->readSettings();
@@ -174,16 +174,16 @@ KNotesApp::KNotesApp()
// create the resource manager
m_manager = new KNotesResourceManager();
- connect( m_manager, SIGNAL(sigRegisteredNote( KCal::Journal * )),
- this, SLOT(createNote( KCal::Journal * )) );
- connect( m_manager, SIGNAL(sigDeregisteredNote( KCal::Journal * )),
- this, SLOT(killNote( KCal::Journal * )) );
+ connect( m_manager, TQT_SIGNAL(sigRegisteredNote( KCal::Journal * )),
+ this, TQT_SLOT(createNote( KCal::Journal * )) );
+ connect( m_manager, TQT_SIGNAL(sigDeregisteredNote( KCal::Journal * )),
+ this, TQT_SLOT(killNote( KCal::Journal * )) );
// read the notes
m_manager->load();
// read the old config files, convert and add them
- KCal::CalendarLocal calendar( QString::fromLatin1( "UTC" ) );
+ KCal::CalendarLocal calendar( TQString::fromLatin1( "UTC" ) );
if ( KNotesLegacy::convert( &calendar ) )
{
KCal::Journal::List notes = calendar.journals();
@@ -201,7 +201,7 @@ KNotesApp::KNotesApp()
// create the socket and possibly start listening for connections
m_listener = new KServerSocket();
m_listener->setResolutionEnabled( true );
- connect( m_listener, SIGNAL(readyAccept()), SLOT(acceptConnection()) );
+ connect( m_listener, TQT_SIGNAL(readyAccept()), TQT_SLOT(acceptConnection()) );
updateNetworkListener();
if ( m_noteList.count() == 0 && !kapp->isRestored() )
@@ -210,15 +210,15 @@ KNotesApp::KNotesApp()
updateNoteActions();
}
-void KNotesApp::resizeEvent ( QResizeEvent * )
+void KNotesApp::resizeEvent ( TQResizeEvent * )
{
// Honor Free Desktop specifications that allow for arbitrary system tray icon sizes
- QPixmap origpixmap;
- QPixmap scaledpixmap;
- QImage newIcon;
- origpixmap = KSystemTray::loadSizedIcon( "knotes", QWidget::width() );
+ TQPixmap origpixmap;
+ TQPixmap scaledpixmap;
+ TQImage newIcon;
+ origpixmap = KSystemTray::loadSizedIcon( "knotes", TQWidget::width() );
newIcon = origpixmap;
- newIcon = newIcon.smoothScale(QWidget::width(), QWidget::height());
+ newIcon = newIcon.smoothScale(TQWidget::width(), TQWidget::height());
scaledpixmap = newIcon;
setPixmap(scaledpixmap);
}
@@ -244,7 +244,7 @@ bool KNotesApp::commitData( QSessionManager& )
// -------------------- public DCOP interface -------------------- //
-QString KNotesApp::newNote( const QString& name, const QString& text )
+TQString KNotesApp::newNote( const TQString& name, const TQString& text )
{
// create the new note
KCal::Journal *journal = new KCal::Journal();
@@ -253,7 +253,7 @@ QString KNotesApp::newNote( const QString& name, const QString& text )
if ( !name.isEmpty() )
journal->setSummary( name );
else
- journal->setSummary( KGlobal::locale()->formatDateTime( QDateTime::currentDateTime() ) );
+ journal->setSummary( KGlobal::locale()->formatDateTime( TQDateTime::currentDateTime() ) );
// the body of the note
journal->setDescription( text );
@@ -265,22 +265,22 @@ QString KNotesApp::newNote( const QString& name, const QString& text )
return journal->uid();
}
-QString KNotesApp::newNoteFromClipboard( const QString& name )
+TQString KNotesApp::newNoteFromClipboard( const TQString& name )
{
- const QString& text = KApplication::clipboard()->text();
+ const TQString& text = KApplication::clipboard()->text();
return newNote( name, text );
}
void KNotesApp::hideAllNotes() const
{
- QDictIterator<KNote> it( m_noteList );
+ TQDictIterator<KNote> it( m_noteList );
for ( ; *it; ++it )
(*it)->close();
}
void KNotesApp::showAllNotes() const
{
- QDictIterator<KNote> it( m_noteList );
+ TQDictIterator<KNote> it( m_noteList );
for ( ; *it; ++it )
{
(*it)->show();
@@ -288,7 +288,7 @@ void KNotesApp::showAllNotes() const
}
}
-void KNotesApp::showNote( const QString& id ) const
+void KNotesApp::showNote( const TQString& id ) const
{
KNote* note = m_noteList[id];
if ( note )
@@ -297,7 +297,7 @@ void KNotesApp::showNote( const QString& id ) const
kdWarning(5500) << "showNote: no note with id: " << id << endl;
}
-void KNotesApp::hideNote( const QString& id ) const
+void KNotesApp::hideNote( const TQString& id ) const
{
KNote* note = m_noteList[id];
if ( note )
@@ -306,7 +306,7 @@ void KNotesApp::hideNote( const QString& id ) const
kdWarning(5500) << "hideNote: no note with id: " << id << endl;
}
-void KNotesApp::killNote( const QString& id, bool force )
+void KNotesApp::killNote( const TQString& id, bool force )
{
KNote* note = m_noteList[id];
if ( note )
@@ -316,15 +316,15 @@ void KNotesApp::killNote( const QString& id, bool force )
}
// "bool force = false" doesn't work with dcop
-void KNotesApp::killNote( const QString& id )
+void KNotesApp::killNote( const TQString& id )
{
killNote( id, false );
}
-QMap<QString,QString> KNotesApp::notes() const
+TQMap<TQString,TQString> KNotesApp::notes() const
{
- QMap<QString,QString> notes;
- QDictIterator<KNote> it( m_noteList );
+ TQMap<TQString,TQString> notes;
+ TQDictIterator<KNote> it( m_noteList );
for ( ; it.current(); ++it )
notes.insert( it.current()->noteId(), it.current()->name() );
@@ -332,25 +332,25 @@ QMap<QString,QString> KNotesApp::notes() const
return notes;
}
-QString KNotesApp::name( const QString& id ) const
+TQString KNotesApp::name( const TQString& id ) const
{
KNote* note = m_noteList[id];
if ( note )
return note->name();
else
- return QString::null;
+ return TQString::null;
}
-QString KNotesApp::text( const QString& id ) const
+TQString KNotesApp::text( const TQString& id ) const
{
KNote* note = m_noteList[id];
if ( note )
return note->text();
else
- return QString::null;
+ return TQString::null;
}
-void KNotesApp::setName( const QString& id, const QString& newName )
+void KNotesApp::setName( const TQString& id, const TQString& newName )
{
KNote* note = m_noteList[id];
if ( note )
@@ -359,7 +359,7 @@ void KNotesApp::setName( const QString& id, const QString& newName )
kdWarning(5500) << "setName: no note with id: " << id << endl;
}
-void KNotesApp::setText( const QString& id, const QString& newText )
+void KNotesApp::setText( const TQString& id, const TQString& newText )
{
KNote* note = m_noteList[id];
if ( note )
@@ -368,34 +368,34 @@ void KNotesApp::setText( const QString& id, const QString& newText )
kdWarning(5500) << "setText: no note with id: " << id << endl;
}
-QString KNotesApp::fgColor( const QString& id ) const
+TQString KNotesApp::fgColor( const TQString& id ) const
{
KNote* note = m_noteList[id];
if ( note )
return note->fgColor().name();
else
- return QString::null;
+ return TQString::null;
}
-QString KNotesApp::bgColor( const QString& id ) const
+TQString KNotesApp::bgColor( const TQString& id ) const
{
KNote* note = m_noteList[id];
if ( note )
return note->bgColor().name();
else
- return QString::null;
+ return TQString::null;
}
-void KNotesApp::setColor( const QString& id, const QString& fgColor, const QString& bgColor )
+void KNotesApp::setColor( const TQString& id, const TQString& fgColor, const TQString& bgColor )
{
KNote* note = m_noteList[id];
if ( note )
- note->setColor( QColor( fgColor ), QColor( bgColor ) );
+ note->setColor( TQColor( fgColor ), TQColor( bgColor ) );
else
kdWarning(5500) << "setColor: no note with id: " << id << endl;
}
-int KNotesApp::width( const QString& id ) const
+int KNotesApp::width( const TQString& id ) const
{
KNote* note = m_noteList[id];
if ( note )
@@ -404,7 +404,7 @@ int KNotesApp::width( const QString& id ) const
return 0;
}
-int KNotesApp::height( const QString& id ) const
+int KNotesApp::height( const TQString& id ) const
{
KNote* note = m_noteList[id];
if ( note )
@@ -413,7 +413,7 @@ int KNotesApp::height( const QString& id ) const
return 0;
}
-void KNotesApp::move( const QString& id, int x, int y ) const
+void KNotesApp::move( const TQString& id, int x, int y ) const
{
KNote* note = m_noteList[id];
if ( note )
@@ -422,7 +422,7 @@ void KNotesApp::move( const QString& id, int x, int y ) const
kdWarning(5500) << "move: no note with id: " << id << endl;
}
-void KNotesApp::resize( const QString& id, int width, int height ) const
+void KNotesApp::resize( const TQString& id, int width, int height ) const
{
KNote* note = m_noteList[id];
if ( note )
@@ -431,15 +431,15 @@ void KNotesApp::resize( const QString& id, int width, int height ) const
kdWarning(5500) << "resize: no note with id: " << id << endl;
}
-void KNotesApp::sync( const QString& app )
+void KNotesApp::sync( const TQString& app )
{
- QDictIterator<KNote> it( m_noteList );
+ TQDictIterator<KNote> it( m_noteList );
for ( ; it.current(); ++it )
it.current()->sync( app );
}
-bool KNotesApp::isNew( const QString& app, const QString& id ) const
+bool KNotesApp::isNew( const TQString& app, const TQString& id ) const
{
KNote* note = m_noteList[id];
if ( note )
@@ -448,7 +448,7 @@ bool KNotesApp::isNew( const QString& app, const QString& id ) const
return false;
}
-bool KNotesApp::isModified( const QString& app, const QString& id ) const
+bool KNotesApp::isModified( const TQString& app, const TQString& id ) const
{
KNote* note = m_noteList[id];
if ( note )
@@ -460,7 +460,7 @@ bool KNotesApp::isModified( const QString& app, const QString& id ) const
// ------------------- protected methods ------------------- //
-void KNotesApp::mousePressEvent( QMouseEvent* e )
+void KNotesApp::mousePressEvent( TQMouseEvent* e )
{
if ( !rect().contains( e->pos() ) )
return;
@@ -470,7 +470,7 @@ void KNotesApp::mousePressEvent( QMouseEvent* e )
case LeftButton:
if ( m_noteList.count() == 1 )
{
- QDictIterator<KNote> it( m_noteList );
+ TQDictIterator<KNote> it( m_noteList );
showNote( it.toFirst() );
}
else if ( m_note_menu->count() > 0 )
@@ -490,13 +490,13 @@ void KNotesApp::mousePressEvent( QMouseEvent* e )
void KNotesApp::slotShowNote()
{
// tell the WM to give this note focus
- showNote( QString::fromUtf8( sender()->name() ) );
+ showNote( TQString::fromUtf8( sender()->name() ) );
}
void KNotesApp::slotWalkThroughNotes()
{
// show next note
- QDictIterator<KNote> it( m_noteList );
+ TQDictIterator<KNote> it( m_noteList );
KNote *first = it.toFirst();
for ( ; *it; ++it )
if ( (*it)->hasFocus() )
@@ -516,11 +516,11 @@ void KNotesApp::slotOpenFindDialog()
findDia.setHasCursor( false );
findDia.setSupportsBackwardsFind( false );
- if ( findDia.exec() != QDialog::Accepted )
+ if ( findDia.exec() != TQDialog::Accepted )
return;
delete m_findPos;
- m_findPos = new QDictIterator<KNote>( m_noteList );
+ m_findPos = new TQDictIterator<KNote>( m_noteList );
// this could be in an own method if searching without a dialog should be possible
delete m_find;
@@ -556,15 +556,15 @@ void KNotesApp::slotPreferences()
// create a new preferences dialog...
KNoteConfigDlg *dialog = new KNoteConfigDlg( 0, i18n("Settings"), this,
"KNotes Settings" );
- connect( dialog, SIGNAL(settingsChanged()), this, SLOT(updateNetworkListener()) );
- connect( dialog, SIGNAL(settingsChanged()), this, SLOT(updateStyle()) );
+ connect( dialog, TQT_SIGNAL(settingsChanged()), this, TQT_SLOT(updateNetworkListener()) );
+ connect( dialog, TQT_SIGNAL(settingsChanged()), this, TQT_SLOT(updateStyle()) );
dialog->show();
}
void KNotesApp::slotConfigureAccels()
{
KNotesKeyDialog keys( m_globalAccel, this );
- QDictIterator<KNote> notes( m_noteList );
+ TQDictIterator<KNote> notes( m_noteList );
if ( !m_noteList.isEmpty() )
keys.insert( (*notes)->actionCollection() );
keys.configure();
@@ -581,8 +581,8 @@ void KNotesApp::slotConfigureAccels()
return;
notes.toFirst();
- QValueList<KAction *> list = (*notes)->actionCollection()->actions();
- for ( QValueList<KAction *>::iterator it = list.begin(); it != list.end(); ++it )
+ TQValueList<KAction *> list = (*notes)->actionCollection()->actions();
+ for ( TQValueList<KAction *>::iterator it = list.begin(); it != list.end(); ++it )
{
notes.toFirst();
for ( ++notes; *notes; ++notes )
@@ -602,7 +602,7 @@ void KNotesApp::slotNoteKilled( KCal::Journal *journal )
void KNotesApp::slotQuit()
{
- QDictIterator<KNote> it( m_noteList );
+ TQDictIterator<KNote> it( m_noteList );
for ( ; *it; ++it )
if ( (*it)->isModified() )
@@ -628,14 +628,14 @@ void KNotesApp::createNote( KCal::Journal *journal )
KNote *newNote = new KNote( m_noteGUI, journal, 0, journal->uid().utf8() );
m_noteList.insert( newNote->noteId(), newNote );
- connect( newNote, SIGNAL(sigRequestNewNote()), SLOT(newNote()) );
- connect( newNote, SIGNAL(sigShowNextNote()), SLOT(slotWalkThroughNotes()) );
- connect( newNote, SIGNAL(sigKillNote( KCal::Journal* )),
- SLOT(slotNoteKilled( KCal::Journal* )) );
- connect( newNote, SIGNAL(sigNameChanged()), SLOT(updateNoteActions()) );
- connect( newNote, SIGNAL(sigDataChanged()), SLOT(saveNotes()) );
- connect( newNote, SIGNAL(sigColorChanged()), SLOT(updateNoteActions()) );
- connect( newNote, SIGNAL(sigFindFinished()), SLOT(slotFindNext()) );
+ connect( newNote, TQT_SIGNAL(sigRequestNewNote()), TQT_SLOT(newNote()) );
+ connect( newNote, TQT_SIGNAL(sigShowNextNote()), TQT_SLOT(slotWalkThroughNotes()) );
+ connect( newNote, TQT_SIGNAL(sigKillNote( KCal::Journal* )),
+ TQT_SLOT(slotNoteKilled( KCal::Journal* )) );
+ connect( newNote, TQT_SIGNAL(sigNameChanged()), TQT_SLOT(updateNoteActions()) );
+ connect( newNote, TQT_SIGNAL(sigDataChanged()), TQT_SLOT(saveNotes()) );
+ connect( newNote, TQT_SIGNAL(sigColorChanged()), TQT_SLOT(updateNoteActions()) );
+ connect( newNote, TQT_SIGNAL(sigFindFinished()), TQT_SLOT(slotFindNext()) );
// don't call this during startup for each and every loaded note
if ( m_alarm )
@@ -656,8 +656,8 @@ void KNotesApp::acceptConnection()
if ( s )
{
KNotesNetworkReceiver *recv = new KNotesNetworkReceiver( s );
- connect( recv, SIGNAL(sigNoteReceived( const QString &, const QString & )),
- this, SLOT(newNote( const QString &, const QString & )) );
+ connect( recv, TQT_SIGNAL(sigNoteReceived( const TQString &, const TQString & )),
+ this, TQT_SLOT(newNote( const TQString &, const TQString & )) );
}
}
@@ -669,7 +669,7 @@ void KNotesApp::saveNotes()
void KNotesApp::saveConfigs()
{
- QDictIterator<KNote> it( m_noteList );
+ TQDictIterator<KNote> it( m_noteList );
for ( ; it.current(); ++it )
it.current()->saveConfig();
}
@@ -679,14 +679,14 @@ void KNotesApp::updateNoteActions()
unplugActionList( "notes" );
m_noteActions.clear();
- for ( QDictIterator<KNote> it( m_noteList ); it.current(); ++it )
+ for ( TQDictIterator<KNote> it( m_noteList ); it.current(); ++it )
{
KAction *action = new KAction( it.current()->name().replace("&", "&&"),
- KShortcut(), this, SLOT(slotShowNote()),
- (QObject *)0,
+ KShortcut(), this, TQT_SLOT(slotShowNote()),
+ (TQObject *)0,
it.current()->noteId().utf8() );
KIconEffect effect;
- QPixmap icon = effect.apply( kapp->miniIcon(), KIconEffect::Colorize, 1,
+ TQPixmap icon = effect.apply( kapp->miniIcon(), KIconEffect::Colorize, 1,
it.current()->paletteBackgroundColor(), false );
action->setIconSet( icon );
m_noteActions.append( action );
@@ -745,7 +745,7 @@ void KNotesApp::updateNetworkListener()
if ( KNotesGlobalConfig::receiveNotes() )
{
- m_listener->setAddress( QString::number( KNotesGlobalConfig::port() ) );
+ m_listener->setAddress( TQString::number( KNotesGlobalConfig::port() ) );
m_listener->bind();
m_listener->listen();
}
@@ -755,9 +755,9 @@ void KNotesApp::updateStyle()
{
KNote::setStyle( KNotesGlobalConfig::style() );
- QDictIterator<KNote> it( m_noteList );
+ TQDictIterator<KNote> it( m_noteList );
for ( ; it.current(); ++it )
- QApplication::postEvent( *it, new QEvent( QEvent::LayoutHint ) );
+ TQApplication::postEvent( *it, new TQEvent( TQEvent::LayoutHint ) );
}
#include "knotesapp.moc"
diff --git a/knotes/knotesapp.h b/knotes/knotesapp.h
index 9cfa5ad31..ba156cca4 100644
--- a/knotes/knotesapp.h
+++ b/knotes/knotesapp.h
@@ -21,11 +21,11 @@
#ifndef KNOTESAPP_H
#define KNOTESAPP_H
-#include <qstring.h>
-#include <qdict.h>
-#include <qptrlist.h>
-#include <qlabel.h>
-#include <qdom.h>
+#include <tqstring.h>
+#include <tqdict.h>
+#include <tqptrlist.h>
+#include <tqlabel.h>
+#include <tqdom.h>
#include <kapplication.h>
#include <kxmlguiclient.h>
@@ -52,7 +52,7 @@ namespace KNetwork {
}
-class KNotesApp : public QLabel, public KSessionManaged, virtual public KXMLGUIClient,
+class KNotesApp : public TQLabel, public KSessionManaged, virtual public KXMLGUIClient,
virtual public KNotesAppIface
{
Q_OBJECT
@@ -60,49 +60,49 @@ public:
KNotesApp();
~KNotesApp();
- void showNote( const QString& id ) const;
- void hideNote( const QString& id ) const;
+ void showNote( const TQString& id ) const;
+ void hideNote( const TQString& id ) const;
- void killNote( const QString& id );
- void killNote( const QString& id, bool force );
+ void killNote( const TQString& id );
+ void killNote( const TQString& id, bool force );
- QString name( const QString& id ) const;
- QString text( const QString& id ) const;
+ TQString name( const TQString& id ) const;
+ TQString text( const TQString& id ) const;
- void setName( const QString& id, const QString& newName );
- void setText( const QString& id, const QString& newText );
+ void setName( const TQString& id, const TQString& newName );
+ void setText( const TQString& id, const TQString& newText );
- QString fgColor( const QString& id ) const;
- QString bgColor( const QString& id ) const;
+ TQString fgColor( const TQString& id ) const;
+ TQString bgColor( const TQString& id ) const;
- void setColor( const QString& id, const QString& fgColor,
- const QString& bgColor );
+ void setColor( const TQString& id, const TQString& fgColor,
+ const TQString& bgColor );
- QMap<QString,QString> notes() const;
+ TQMap<TQString,TQString> notes() const;
- int width( const QString& noteId ) const;
- int height( const QString& noteId ) const;
+ int width( const TQString& noteId ) const;
+ int height( const TQString& noteId ) const;
- void move( const QString& noteId, int x, int y ) const;
- void resize( const QString& noteId, int width, int height ) const;
+ void move( const TQString& noteId, int x, int y ) const;
+ void resize( const TQString& noteId, int width, int height ) const;
- void sync( const QString& app );
- bool isNew( const QString& app, const QString& id ) const;
- bool isModified( const QString& app, const QString& id ) const;
+ void sync( const TQString& app );
+ bool isNew( const TQString& app, const TQString& id ) const;
+ bool isModified( const TQString& app, const TQString& id ) const;
bool commitData( QSessionManager& );
public slots:
- QString newNote( const QString& name = QString::null,
- const QString& text = QString::null );
- QString newNoteFromClipboard( const QString& name = QString::null );
+ TQString newNote( const TQString& name = TQString::null,
+ const TQString& text = TQString::null );
+ TQString newNoteFromClipboard( const TQString& name = TQString::null );
void hideAllNotes() const;
void showAllNotes() const;
protected:
- void mousePressEvent( QMouseEvent* );
- void resizeEvent ( QResizeEvent * );
+ void mousePressEvent( TQMouseEvent* );
+ void resizeEvent ( TQResizeEvent * );
protected slots:
void slotShowNote();
@@ -134,10 +134,10 @@ private slots:
void killNote( KCal::Journal *journal );
private:
- class KNoteActionList : public QPtrList<KAction>
+ class KNoteActionList : public TQPtrList<KAction>
{
public:
- virtual int compareItems( QPtrCollection::Item s1, QPtrCollection::Item s2 );
+ virtual int compareItems( TQPtrCollection::Item s1, TQPtrCollection::Item s2 );
};
KNotesResourceManager *m_manager;
@@ -145,11 +145,11 @@ private:
KNotesAlarm *m_alarm;
KNetwork::KServerSocket *m_listener;
- QDict<KNote> m_noteList;
+ TQDict<KNote> m_noteList;
KNoteActionList m_noteActions;
KFind *m_find;
- QDictIterator<KNote> *m_findPos;
+ TQDictIterator<KNote> *m_findPos;
KPopupMenu *m_note_menu;
KPopupMenu *m_context_menu;
@@ -158,7 +158,7 @@ private:
KXMLGUIFactory *m_guiFactory;
KXMLGUIBuilder *m_guiBuilder;
- QDomDocument m_noteGUI;
+ TQDomDocument m_noteGUI;
};
#endif
diff --git a/knotes/knoteslegacy.cpp b/knotes/knoteslegacy.cpp
index 1d239d2d6..8cb57d4ce 100644
--- a/knotes/knoteslegacy.cpp
+++ b/knotes/knoteslegacy.cpp
@@ -18,12 +18,12 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*******************************************************************/
-#include <qfile.h>
-#include <qfont.h>
-#include <qpoint.h>
-#include <qcolor.h>
-#include <qstringlist.h>
-#include <qtextstream.h>
+#include <tqfile.h>
+#include <tqfont.h>
+#include <tqpoint.h>
+#include <tqcolor.h>
+#include <tqstringlist.h>
+#include <tqtextstream.h>
#include <kdebug.h>
#include <kapplication.h>
@@ -50,8 +50,8 @@ using namespace KCal;
void KNotesLegacy::cleanUp()
{
// remove old (KDE 1.x) local config file if it still exists
- QString configfile = KGlobal::dirs()->saveLocation( "config" ) + "knotesrc";
- if ( QFile::exists( configfile ) ) {
+ TQString configfile = KGlobal::dirs()->saveLocation( "config" ) + "knotesrc";
+ if ( TQFile::exists( configfile ) ) {
KSimpleConfig *test = new KSimpleConfig( configfile );
test->setGroup( "General" );
double version = test->readDoubleNumEntry( "version", 1.0 );
@@ -59,7 +59,7 @@ void KNotesLegacy::cleanUp()
if ( version == 1.0 ) {
if ( !( checkAccess( configfile, W_OK ) &&
- QFile::remove( configfile ) ) )
+ TQFile::remove( configfile ) ) )
{
kdError(5500) << k_funcinfo << "Could not delete old config file " << configfile << endl;
}
@@ -71,11 +71,11 @@ bool KNotesLegacy::convert( CalendarLocal *calendar )
{
bool converted = false;
- QDir noteDir( KGlobal::dirs()->saveLocation( "appdata", "notes/" ) );
- QStringList notes = noteDir.entryList( QDir::Files, QDir::Name );
- for ( QStringList::Iterator note = notes.begin(); note != notes.end(); note++ )
+ TQDir noteDir( KGlobal::dirs()->saveLocation( "appdata", "notes/" ) );
+ TQStringList notes = noteDir.entryList( TQDir::Files, TQDir::Name );
+ for ( TQStringList::Iterator note = notes.begin(); note != notes.end(); note++ )
{
- QString file = noteDir.absFilePath( *note );
+ TQString file = noteDir.absFilePath( *note );
KSimpleConfig* test = new KSimpleConfig( file );
test->setGroup( "General" );
double version = test->readDoubleNumEntry( "version", 1.0 );
@@ -116,10 +116,10 @@ bool KNotesLegacy::convert( CalendarLocal *calendar )
return converted;
}
-bool KNotesLegacy::convertKNotes1Config( Journal *journal, QDir& noteDir,
- const QString& file )
+bool KNotesLegacy::convertKNotes1Config( Journal *journal, TQDir& noteDir,
+ const TQString& file )
{
- QFile infile( noteDir.absFilePath( file ) );
+ TQFile infile( noteDir.absFilePath( file ) );
if ( !infile.open( IO_ReadOnly ) )
{
kdError(5500) << k_funcinfo << "Could not open input file: \""
@@ -127,12 +127,12 @@ bool KNotesLegacy::convertKNotes1Config( Journal *journal, QDir& noteDir,
return false;
}
- QTextStream input( &infile );
+ TQTextStream input( &infile );
// get the name
journal->setSummary( input.readLine() );
- QStringList props = QStringList::split( '+', input.readLine() );
+ TQStringList props = TQStringList::split( '+', input.readLine() );
// robustness
if ( props.count() != 13 )
@@ -144,7 +144,7 @@ bool KNotesLegacy::convertKNotes1Config( Journal *journal, QDir& noteDir,
}
// the new configfile's name
- QString configFile = noteDir.absFilePath( journal->uid() );
+ TQString configFile = noteDir.absFilePath( journal->uid() );
// set the defaults
KIO::NetAccess::copy(
@@ -165,23 +165,23 @@ bool KNotesLegacy::convertKNotes1Config( Journal *journal, QDir& noteDir,
uint red = input.readLine().toUInt();
uint green = input.readLine().toUInt();
uint blue = input.readLine().toUInt();
- config.setBgColor( QColor( red, green, blue ) );
+ config.setBgColor( TQColor( red, green, blue ) );
// get the foreground color
red = input.readLine().toUInt();
green = input.readLine().toUInt();
blue = input.readLine().toUInt();
- config.setFgColor( QColor( red, green, blue ) );
+ config.setFgColor( TQColor( red, green, blue ) );
// get the font
- QString fontfamily = input.readLine();
+ TQString fontfamily = input.readLine();
if ( fontfamily.isEmpty() )
- fontfamily = QString( "Sans Serif" );
+ fontfamily = TQString( "Sans Serif" );
uint size = input.readLine().toUInt();
size = QMAX( size, 4 );
uint weight = input.readLine().toUInt();
bool italic = ( input.readLine().toUInt() == 1 );
- QFont font( fontfamily, size, weight, italic );
+ TQFont font( fontfamily, size, weight, italic );
config.setTitleFont( font );
config.setFont( font );
@@ -204,13 +204,13 @@ bool KNotesLegacy::convertKNotes1Config( Journal *journal, QDir& noteDir,
note_desktop = NETWinInfo::OnAllDesktops;
config.setDesktop( note_desktop );
- config.setPosition( QPoint( props[1].toUInt(), props[2].toUInt() ) );
+ config.setPosition( TQPoint( props[1].toUInt(), props[2].toUInt() ) );
config.setKeepAbove( props[12].toUInt() & 2048 );
config.writeConfig();
// get the text
- QString text;
+ TQString text;
while ( !input.atEnd() )
{
text.append( input.readLine() );
@@ -226,10 +226,10 @@ bool KNotesLegacy::convertKNotes1Config( Journal *journal, QDir& noteDir,
return true;
}
-bool KNotesLegacy::convertKNotes2Config( Journal *journal, QDir& noteDir,
- const QString& file )
+bool KNotesLegacy::convertKNotes2Config( Journal *journal, TQDir& noteDir,
+ const TQString& file )
{
- QString configFile = noteDir.absFilePath( journal->uid() );
+ TQString configFile = noteDir.absFilePath( journal->uid() );
// new name for config file
if ( !noteDir.rename( file, journal->uid() ) )
@@ -254,11 +254,11 @@ bool KNotesLegacy::convertKNotes2Config( Journal *journal, QDir& noteDir,
config.deleteEntry( "state" );
// load the saved text and put it in the journal
- QFile infile( noteDir.absFilePath( "." + file + "_data" ) );
+ TQFile infile( noteDir.absFilePath( "." + file + "_data" ) );
if ( infile.open( IO_ReadOnly ) )
{
- QTextStream input( &infile );
- input.setEncoding( QTextStream::UnicodeUTF8 );
+ TQTextStream input( &infile );
+ input.setEncoding( TQTextStream::UnicodeUTF8 );
journal->setDescription( input.read() );
if ( !infile.remove() )
kdWarning(5500) << k_funcinfo << "Could not delete data file: \"" << infile.name() << "\"" << endl;
diff --git a/knotes/knoteslegacy.h b/knotes/knoteslegacy.h
index 84ee0fc80..70392dd6a 100644
--- a/knotes/knoteslegacy.h
+++ b/knotes/knoteslegacy.h
@@ -21,8 +21,8 @@
#ifndef KNOTESLEGACY_H
#define KNOTESLEGACY_H
-#include <qstring.h>
-#include <qdir.h>
+#include <tqstring.h>
+#include <tqdir.h>
namespace KCal {
class CalendarLocal;
@@ -39,8 +39,8 @@ public:
static void cleanUp();
static bool convert( KCal::CalendarLocal *calendar );
private:
- static bool convertKNotes1Config( KCal::Journal *j, QDir& dir, const QString& file );
- static bool convertKNotes2Config( KCal::Journal *j, QDir& dir, const QString& file );
+ static bool convertKNotes1Config( KCal::Journal *j, TQDir& dir, const TQString& file );
+ static bool convertKNotes2Config( KCal::Journal *j, TQDir& dir, const TQString& file );
};
#endif
diff --git a/knotes/knotesnetrecv.cpp b/knotes/knotesnetrecv.cpp
index 65edb2cb5..0a261252b 100644
--- a/knotes/knotesnetrecv.cpp
+++ b/knotes/knotesnetrecv.cpp
@@ -30,10 +30,10 @@
your version.
*******************************************************************/
-#include <qtimer.h>
-#include <qdatetime.h>
-#include <qregexp.h>
-#include <qcstring.h>
+#include <tqtimer.h>
+#include <tqdatetime.h>
+#include <tqregexp.h>
+#include <tqcstring.h>
#include <kdebug.h>
#include <kbufferedsocket.h>
@@ -58,27 +58,27 @@ using namespace KNetwork;
KNotesNetworkReceiver::KNotesNetworkReceiver( KBufferedSocket *s )
- : QObject(),
- m_buffer( new QByteArray() ), m_sock( s )
+ : TQObject(),
+ m_buffer( new TQByteArray() ), m_sock( s )
{
- QString date = KGlobal::locale()->formatDateTime( QDateTime::currentDateTime(), true, false );
+ TQString date = KGlobal::locale()->formatDateTime( TQDateTime::currentDateTime(), true, false );
// Add the remote IP or hostname and the date to the title, to help the
// user guess who wrote it.
- m_titleAddon = QString(" [%1, %2]")
+ m_titleAddon = TQString(" [%1, %2]")
.arg( m_sock->peerAddress().nodeName() )
.arg( date );
// Setup the communications
- connect( m_sock, SIGNAL(readyRead()), SLOT(slotDataAvailable()) );
- connect( m_sock, SIGNAL(closed()), SLOT(slotConnectionClosed()) );
- connect( m_sock, SIGNAL(gotError( int )), SLOT(slotError( int )) );
+ connect( m_sock, TQT_SIGNAL(readyRead()), TQT_SLOT(slotDataAvailable()) );
+ connect( m_sock, TQT_SIGNAL(closed()), TQT_SLOT(slotConnectionClosed()) );
+ connect( m_sock, TQT_SIGNAL(gotError( int )), TQT_SLOT(slotError( int )) );
m_sock->enableRead( true );
// Setup the timer
- m_timer = new QTimer( this, "m_timer" );
- connect( m_timer, SIGNAL(timeout()), SLOT(slotReceptionTimeout()) );
+ m_timer = new TQTimer( this, "m_timer" );
+ connect( m_timer, TQT_SIGNAL(timeout()), TQT_SLOT(slotReceptionTimeout()) );
m_timer->start( MAXTIME, true );
}
@@ -127,11 +127,11 @@ void KNotesNetworkReceiver::slotConnectionClosed()
{
if ( m_timer->isActive() )
{
- QString noteText = QString( *m_buffer ).stripWhiteSpace();
+ TQString noteText = TQString( *m_buffer ).stripWhiteSpace();
// First line is the note title or, in case of ATnotes, the id
- int pos = noteText.find( QRegExp("[\r\n]") );
- QString noteTitle = noteText.left( pos ).stripWhiteSpace() + m_titleAddon;
+ int pos = noteText.find( TQRegExp("[\r\n]") );
+ TQString noteTitle = noteText.left( pos ).stripWhiteSpace() + m_titleAddon;
noteText = noteText.mid( pos ).stripWhiteSpace();
diff --git a/knotes/knotesnetrecv.h b/knotes/knotesnetrecv.h
index 105aa6461..b0e1f4b44 100644
--- a/knotes/knotesnetrecv.h
+++ b/knotes/knotesnetrecv.h
@@ -32,7 +32,7 @@
#ifndef KNOTESNETRECV_H
#define KNOTESNETRECV_H
-#include <qobject.h>
+#include <tqobject.h>
class QTimer;
@@ -49,7 +49,7 @@ public:
~KNotesNetworkReceiver();
signals:
- void sigNoteReceived( const QString &, const QString & );
+ void sigNoteReceived( const TQString &, const TQString & );
private slots:
void slotDataAvailable();
@@ -58,12 +58,12 @@ private slots:
void slotError( int err );
private:
- QTimer *m_timer; // to avoid memory and connection floods
+ TQTimer *m_timer; // to avoid memory and connection floods
- QByteArray *m_buffer;
+ TQByteArray *m_buffer;
KNetwork::KBufferedSocket *m_sock;
- QString m_titleAddon;
+ TQString m_titleAddon;
};
#endif
diff --git a/knotes/knotesnetsend.cpp b/knotes/knotesnetsend.cpp
index 7cf7567e4..86246407b 100644
--- a/knotes/knotesnetsend.cpp
+++ b/knotes/knotesnetsend.cpp
@@ -38,29 +38,29 @@
#define CONNECT_TIMEOUT 10000
-KNotesNetworkSender::KNotesNetworkSender( const QString& hostname, int port )
- : KBufferedSocket( hostname, QString::number( port ) ),
+KNotesNetworkSender::KNotesNetworkSender( const TQString& hostname, int port )
+ : KBufferedSocket( hostname, TQString::number( port ) ),
m_note( 0 ), m_title( 0 ), m_sender( 0 ), m_index( 0 )
{
enableRead( false );
enableWrite( false );
setTimeout( CONNECT_TIMEOUT );
- // QObject:: prefix needed, otherwise the KStreamSocket::connect()
+ // TQObject:: prefix needed, otherwise the KStreamSocket::connect()
// mehtod is called!!!
- QObject::connect( this, SIGNAL(connected( const KResolverEntry& )),
- SLOT(slotConnected( const KResolverEntry& )) );
- QObject::connect( this, SIGNAL(gotError( int )), SLOT(slotError( int )) );
- QObject::connect( this, SIGNAL(closed()), SLOT(slotClosed()) );
- QObject::connect( this, SIGNAL(readyWrite()), SLOT(slotReadyWrite()) );
+ TQObject::connect( this, TQT_SIGNAL(connected( const KResolverEntry& )),
+ TQT_SLOT(slotConnected( const KResolverEntry& )) );
+ TQObject::connect( this, TQT_SIGNAL(gotError( int )), TQT_SLOT(slotError( int )) );
+ TQObject::connect( this, TQT_SIGNAL(closed()), TQT_SLOT(slotClosed()) );
+ TQObject::connect( this, TQT_SIGNAL(readyWrite()), TQT_SLOT(slotReadyWrite()) );
}
-void KNotesNetworkSender::setSenderId( const QString& sender )
+void KNotesNetworkSender::setSenderId( const TQString& sender )
{
m_sender = sender.ascii();
}
-void KNotesNetworkSender::setNote( const QString& title, const QString& text )
+void KNotesNetworkSender::setNote( const TQString& title, const TQString& text )
{
// TODO: support for unicode and rich text.
// Mmmmmm... how to behave with such heterogeneous environment?
diff --git a/knotes/knotesnetsend.h b/knotes/knotesnetsend.h
index 1c3e42b29..37a5233ba 100644
--- a/knotes/knotesnetsend.h
+++ b/knotes/knotesnetsend.h
@@ -33,7 +33,7 @@
#ifndef KNOTESNETSEND_H
#define KNOTESNETSEND_H
-#include <qcstring.h>
+#include <tqcstring.h>
#include <kbufferedsocket.h>
#include <ksocketaddress.h>
@@ -44,10 +44,10 @@ class KNotesNetworkSender : public KNetwork::KBufferedSocket
{
Q_OBJECT
public:
- KNotesNetworkSender( const QString& host, int port );
+ KNotesNetworkSender( const TQString& host, int port );
- void setSenderId( const QString& sender );
- void setNote( const QString& title, const QString& text );
+ void setSenderId( const TQString& sender );
+ void setNote( const TQString& title, const TQString& text );
protected slots:
void slotConnected( const KResolverEntry& );
@@ -57,9 +57,9 @@ protected slots:
void slotReadyWrite();
private:
- QCString m_note;
- QCString m_title;
- QCString m_sender;
+ TQCString m_note;
+ TQCString m_title;
+ TQCString m_sender;
uint m_index;
};
diff --git a/knotes/main.cpp b/knotes/main.cpp
index 682bbb792..bf38e4c71 100644
--- a/knotes/main.cpp
+++ b/knotes/main.cpp
@@ -45,7 +45,7 @@ void remove_sm_from_client_leader()
XInternAtoms( qt_xdisplay(), atom_names, 2, False, atoms );
- QWidget w;
+ TQWidget w;
KXErrorHandler handler; // ignore X errors
status = XGetWindowProperty( qt_xdisplay(), w.winId(), atoms[ 0 ], 0, 10000,
FALSE, XA_WINDOW, &type, &format,
@@ -88,7 +88,7 @@ int Application::newInstance()
int main( int argc, char* argv[] )
{
- QString version = QString::number( KNOTES_VERSION );
+ TQString version = TQString::number( KNOTES_VERSION );
KAboutData aboutData(
"knotes",
@@ -122,7 +122,7 @@ int main( int argc, char* argv[] )
KUniqueApplication::addCmdLineOptions();
Application app;
- app.connect( &app, SIGNAL( lastWindowClosed() ), &app, SLOT( quit() ) );
+ app.connect( &app, TQT_SIGNAL( lastWindowClosed() ), &app, TQT_SLOT( quit() ) );
remove_sm_from_client_leader();
diff --git a/knotes/resourcelocal.cpp b/knotes/resourcelocal.cpp
index 194afb6f0..a6e4b9a3f 100644
--- a/knotes/resourcelocal.cpp
+++ b/knotes/resourcelocal.cpp
@@ -45,7 +45,7 @@
ResourceLocal::ResourceLocal( const KConfig *config )
- : ResourceNotes( config ), mCalendar( QString::fromLatin1( "UTC" ) )
+ : ResourceNotes( config ), mCalendar( TQString::fromLatin1( "UTC" ) )
{
kdDebug(5500) << "ResourceLocal::ResourceLocal()" << endl;
setType( "file" );
@@ -108,20 +108,20 @@ bool ResourceLocal::deleteNote( KCal::Journal *journal )
return true;
}
-KCal::Alarm::List ResourceLocal::alarms( const QDateTime& from, const QDateTime& to )
+KCal::Alarm::List ResourceLocal::alarms( const TQDateTime& from, const TQDateTime& to )
{
KCal::Alarm::List alarms;
KCal::Journal::List notes = mCalendar.journals();
KCal::Journal::List::ConstIterator note;
for ( note = notes.begin(); note != notes.end(); ++note )
{
- QDateTime preTime = from.addSecs( -1 );
+ TQDateTime preTime = from.addSecs( -1 );
KCal::Alarm::List::ConstIterator it;
for( it = (*note)->alarms().begin(); it != (*note)->alarms().end(); ++it )
{
if ( (*it)->enabled() )
{
- QDateTime dt = (*it)->nextRepetition( preTime );
+ TQDateTime dt = (*it)->nextRepetition( preTime );
if ( dt.isValid() && dt <= to )
alarms.append( *it );
}
diff --git a/knotes/resourcelocal.h b/knotes/resourcelocal.h
index da318727a..0262674bd 100644
--- a/knotes/resourcelocal.h
+++ b/knotes/resourcelocal.h
@@ -64,7 +64,7 @@ public:
virtual bool addNote( KCal::Journal* );
virtual bool deleteNote( KCal::Journal* );
- virtual KCal::Alarm::List alarms( const QDateTime& from, const QDateTime& to );
+ virtual KCal::Alarm::List alarms( const TQDateTime& from, const TQDateTime& to );
protected:
KCal::CalendarLocal mCalendar;
diff --git a/knotes/resourcelocal_plugin.cpp b/knotes/resourcelocal_plugin.cpp
index 352a4c68e..0670956bb 100644
--- a/knotes/resourcelocal_plugin.cpp
+++ b/knotes/resourcelocal_plugin.cpp
@@ -43,7 +43,7 @@ public:
return new ResourceLocal( config );
}
- KRES::ConfigWidget *configWidget( QWidget *parent )
+ KRES::ConfigWidget *configWidget( TQWidget *parent )
{
return new ResourceLocalConfig(parent);
}
@@ -56,7 +56,7 @@ extern "C"
return new LocalNotesFactory();
}
- KRES::ConfigWidget *config_widget( QWidget* parent )
+ KRES::ConfigWidget *config_widget( TQWidget* parent )
{
return new ResourceLocalConfig( parent, "Configure Local Resource" );
}
diff --git a/knotes/resourcelocalconfig.cpp b/knotes/resourcelocalconfig.cpp
index 18e72c053..417f81a05 100644
--- a/knotes/resourcelocalconfig.cpp
+++ b/knotes/resourcelocalconfig.cpp
@@ -18,8 +18,8 @@
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*******************************************************************/
-#include <qlabel.h>
-#include <qlayout.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
#include <kdebug.h>
#include <klocale.h>
@@ -29,12 +29,12 @@
#include "resourcelocal.h"
#include "resourcelocalconfig.h"
-ResourceLocalConfig::ResourceLocalConfig( QWidget *parent, const char *name )
+ResourceLocalConfig::ResourceLocalConfig( TQWidget *parent, const char *name )
: KRES::ConfigWidget( parent, name )
{
- QHBoxLayout *layout = new QHBoxLayout( this );
+ TQHBoxLayout *layout = new TQHBoxLayout( this );
- QLabel *label = new QLabel( i18n( "Location:" ), this );
+ TQLabel *label = new TQLabel( i18n( "Location:" ), this );
mURL = new KURLRequester( this );
KFile::Mode mode = static_cast<KFile::Mode>( KFile::File |
KFile::LocalOnly );
diff --git a/knotes/resourcelocalconfig.h b/knotes/resourcelocalconfig.h
index 9a691853b..242b34a46 100644
--- a/knotes/resourcelocalconfig.h
+++ b/knotes/resourcelocalconfig.h
@@ -29,7 +29,7 @@ class ResourceLocalConfig : public KRES::ConfigWidget
{
Q_OBJECT
public:
- ResourceLocalConfig( QWidget *parent = 0, const char *name = 0 );
+ ResourceLocalConfig( TQWidget *parent = 0, const char *name = 0 );
virtual ~ResourceLocalConfig();
public slots:
diff --git a/knotes/resourcemanager.cpp b/knotes/resourcemanager.cpp
index aa73fc06c..112ec03f8 100644
--- a/knotes/resourcemanager.cpp
+++ b/knotes/resourcemanager.cpp
@@ -38,7 +38,7 @@
KNotesResourceManager::KNotesResourceManager()
- : QObject( 0, "KNotes Resource Manager" )
+ : TQObject( 0, "KNotes Resource Manager" )
{
m_manager = new KRES::Manager<ResourceNotes>( "notes" );
m_manager->addObserver( this );
@@ -103,7 +103,7 @@ void KNotesResourceManager::registerNote( ResourceNotes *resource,
void KNotesResourceManager::deleteNote( KCal::Journal *journal )
{
- QString uid = journal->uid();
+ TQString uid = journal->uid();
// Remove the journal from the resource it came from
m_resourceMap[ uid ]->deleteNote( journal );
@@ -114,7 +114,7 @@ void KNotesResourceManager::deleteNote( KCal::Journal *journal )
emit sigDeregisteredNote( journal );
}
-KCal::Alarm::List KNotesResourceManager::alarms( const QDateTime& from, const QDateTime& to )
+KCal::Alarm::List KNotesResourceManager::alarms( const TQDateTime& from, const TQDateTime& to )
{
KCal::Alarm::List result;
diff --git a/knotes/resourcemanager.h b/knotes/resourcemanager.h
index b32e0f52a..0ba70b4b5 100644
--- a/knotes/resourcemanager.h
+++ b/knotes/resourcemanager.h
@@ -47,7 +47,7 @@ namespace KCal {
}
-class KNotesResourceManager : public QObject, public KRES::ManagerObserver<ResourceNotes>
+class KNotesResourceManager : public TQObject, public KRES::ManagerObserver<ResourceNotes>
{
Q_OBJECT
public:
@@ -62,7 +62,7 @@ public:
void deleteNote( KCal::Journal *journal );
- KCal::Alarm::List alarms( const QDateTime& from, const QDateTime& to );
+ KCal::Alarm::List alarms( const TQDateTime& from, const TQDateTime& to );
// from the ManagerObserver interface
virtual void resourceAdded( ResourceNotes *resource );
@@ -75,7 +75,7 @@ signals:
private:
KRES::Manager<ResourceNotes> *m_manager;
- QDict<ResourceNotes> m_resourceMap;
+ TQDict<ResourceNotes> m_resourceMap;
};
diff --git a/knotes/resourcenotes.h b/knotes/resourcenotes.h
index a1c2f67b8..988c8dde3 100644
--- a/knotes/resourcenotes.h
+++ b/knotes/resourcenotes.h
@@ -71,7 +71,7 @@ public:
virtual bool addNote( KCal::Journal * ) = 0;
virtual bool deleteNote( KCal::Journal * ) = 0;
- virtual KCal::Alarm::List alarms( const QDateTime& from, const QDateTime& to ) = 0;
+ virtual KCal::Alarm::List alarms( const TQDateTime& from, const TQDateTime& to ) = 0;
void setManager( KNotesResourceManager *manager ) { mManager = manager; }
KNotesResourceManager *manager() const { return mManager; }
diff --git a/kode/automakefile.cpp b/kode/automakefile.cpp
index 4ee5408fb..468059ae3 100644
--- a/kode/automakefile.cpp
+++ b/kode/automakefile.cpp
@@ -23,7 +23,7 @@
using namespace KODE;
-AutoMakefile::Target::Target( const QString &type, const QString &name )
+AutoMakefile::Target::Target( const TQString &type, const TQString &name )
: mType( type ), mName( name )
{
}
@@ -40,17 +40,17 @@ void AutoMakefile::addTarget( const Target &t )
}
}
-void AutoMakefile::addEntry( const QString &variable, const QString &value )
+void AutoMakefile::addEntry( const TQString &variable, const TQString &value )
{
if ( variable.isEmpty() ) {
mEntries.append( variable );
return;
}
- QStringList::ConstIterator it = mEntries.find( variable );
+ TQStringList::ConstIterator it = mEntries.find( variable );
if ( it == mEntries.end() ) {
mEntries.append( variable );
- QMap<QString,QString>::Iterator it = mValues.find( variable );
+ TQMap<TQString,TQString>::Iterator it = mValues.find( variable );
if ( it == mValues.end() ) {
mValues.insert( variable, value );
} else {
@@ -64,13 +64,13 @@ void AutoMakefile::newLine()
addEntry( "" );
}
-QString AutoMakefile::text() const
+TQString AutoMakefile::text() const
{
- QString out;
+ TQString out;
- QStringList::ConstIterator it;
+ TQStringList::ConstIterator it;
for( it = mEntries.begin(); it != mEntries.end(); ++it ) {
- QString variable = *it;
+ TQString variable = *it;
if ( variable.isEmpty() ) {
out += '\n';
} else {
@@ -80,7 +80,7 @@ QString AutoMakefile::text() const
out += '\n';
for( it = mTargetTypes.begin(); it != mTargetTypes.end(); ++it ) {
- QString targetType = *it;
+ TQString targetType = *it;
out += targetType + " = ";
@@ -97,7 +97,7 @@ QString AutoMakefile::text() const
Target t = *it2;
if ( t.type() != targetType ) continue;
- QString name = t.name();
+ TQString name = t.name();
name.replace( '.', '_' );
out += name + "_SOURCES = " + t.sources() + '\n';
diff --git a/kode/automakefile.h b/kode/automakefile.h
index 328d4fcf8..ec0dce7e5 100644
--- a/kode/automakefile.h
+++ b/kode/automakefile.h
@@ -21,10 +21,10 @@
#ifndef KODE_AUTOMAKEFILE_H
#define KODE_AUTOMAKEFILE_H
-#include <qvaluelist.h>
-#include <qstring.h>
-#include <qmap.h>
-#include <qstringlist.h>
+#include <tqvaluelist.h>
+#include <tqstring.h>
+#include <tqmap.h>
+#include <tqstringlist.h>
#include <kdepimmacros.h>
@@ -36,37 +36,37 @@ class KDE_EXPORT AutoMakefile
class KDE_EXPORT Target
{
public:
- typedef QValueList<Target> List;
+ typedef TQValueList<Target> List;
Target() {}
- Target( const QString &type, const QString &name );
+ Target( const TQString &type, const TQString &name );
- 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 setName( const QString &name ) { mName = name; }
- QString name() const { return mName; }
+ void setName( const TQString &name ) { mName = name; }
+ TQString name() const { return mName; }
- void setSources( const QString &sources ) { mSources = sources; }
- QString sources() const { return mSources; }
+ void setSources( const TQString &sources ) { mSources = sources; }
+ TQString sources() const { return mSources; }
- void setLibAdd( const QString &libAdd ) { mLibAdd = libAdd; }
- QString libAdd() const { return mLibAdd; }
+ void setLibAdd( const TQString &libAdd ) { mLibAdd = libAdd; }
+ TQString libAdd() const { return mLibAdd; }
- void setLdAdd( const QString &ldAdd ) { mLdAdd = ldAdd; }
- QString ldAdd() const { return mLdAdd; }
+ void setLdAdd( const TQString &ldAdd ) { mLdAdd = ldAdd; }
+ TQString ldAdd() const { return mLdAdd; }
- void setLdFlags( const QString &ldFlags ) { mLdFlags = ldFlags; }
- QString ldFlags() const { return mLdFlags; }
+ void setLdFlags( const TQString &ldFlags ) { mLdFlags = ldFlags; }
+ TQString ldFlags() const { return mLdFlags; }
private:
- QString mType;
- QString mName;
+ TQString mType;
+ TQString mName;
- QString mSources;
- QString mLibAdd;
- QString mLdAdd;
- QString mLdFlags;
+ TQString mSources;
+ TQString mLibAdd;
+ TQString mLdAdd;
+ TQString mLdFlags;
};
AutoMakefile();
@@ -74,19 +74,19 @@ class KDE_EXPORT AutoMakefile
void addTarget( const Target &t );
Target::List targets() const { return mTargets; }
- void addEntry( const QString &variable,
- const QString &value = QString::null );
+ void addEntry( const TQString &variable,
+ const TQString &value = TQString::null );
void newLine();
- QString text() const;
+ TQString text() const;
private:
Target::List mTargets;
- QStringList mTargetTypes;
+ TQStringList mTargetTypes;
- QStringList mEntries;
- QMap<QString,QString> mValues;
+ TQStringList mEntries;
+ TQMap<TQString,TQString> mValues;
};
}
diff --git a/kode/class.cpp b/kode/class.cpp
index a65fac1ac..48c0e22f9 100644
--- a/kode/class.cpp
+++ b/kode/class.cpp
@@ -30,7 +30,7 @@ Class::Class()
mBaseClasses.setAutoDelete( true );
}
-Class::Class( const QString &name, const QString &nameSpace )
+Class::Class( const TQString &name, const TQString &nameSpace )
: mName( name ), mNameSpace( nameSpace )
{
}
@@ -54,7 +54,7 @@ Class &Class::operator=( const Class &c )
mEnums = c.mEnums;
mDocs = c.mDocs;
- QPtrListIterator<Class> it( c.mBaseClasses );
+ TQPtrListIterator<Class> it( c.mBaseClasses );
while( it.current() ) {
mBaseClasses.append( new Class( *( it.current() ) ) );
++it;
@@ -65,18 +65,18 @@ Class &Class::operator=( const Class &c )
return *this;
}
-void Class::setName( const QString &name )
+void Class::setName( const TQString &name )
{
mName = name;
}
-void Class::setNameSpace( const QString &nameSpace )
+void Class::setNameSpace( const TQString &nameSpace )
{
mNameSpace = nameSpace;
}
-void Class::addInclude( const QString &include,
- const QString &forwardDeclaration )
+void Class::addInclude( const TQString &include,
+ const TQString &forwardDeclaration )
{
if ( mIncludes.find( include ) == mIncludes.end() ) {
mIncludes.append( include );
@@ -89,7 +89,7 @@ void Class::addInclude( const QString &include,
}
}
-void Class::addHeaderInclude( const QString &include )
+void Class::addHeaderInclude( const TQString &include )
{
if ( include.isEmpty() )
return;
@@ -99,9 +99,9 @@ void Class::addHeaderInclude( const QString &include )
}
}
-void Class::addHeaderIncludes( const QStringList &includes )
+void Class::addHeaderIncludes( const TQStringList &includes )
{
- QStringList::ConstIterator it;
+ TQStringList::ConstIterator it;
for ( it = includes.begin(); it != includes.end(); ++it )
addHeaderInclude( *it );
}
@@ -125,7 +125,7 @@ Class::List Class::baseClasses() const
{
Class::List b;
- QPtrListIterator<Class> it( mBaseClasses );
+ TQPtrListIterator<Class> it( mBaseClasses );
while( it.current() ) {
b.append( Class( *( it.current() ) ) );
++it;
@@ -149,7 +149,7 @@ bool Class::isValid() const
return !mName.isEmpty();
}
-bool Class::hasFunction( const QString &functionName ) const
+bool Class::hasFunction( const TQString &functionName ) const
{
Function::List::ConstIterator it;
for( it = mFunctions.begin(); it != mFunctions.end(); ++it ) {
@@ -170,7 +170,7 @@ bool Class::isQObject() const
return false;
}
-void Class::setDocs( const QString &str )
+void Class::setDocs( const TQString &str )
{
mDocs = str;
}
diff --git a/kode/class.h b/kode/class.h
index dde50e8bd..21edc015f 100644
--- a/kode/class.h
+++ b/kode/class.h
@@ -27,70 +27,70 @@
#include "typedef.h"
#include <kdepimmacros.h>
-#include <qvaluelist.h>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qptrlist.h>
+#include <tqvaluelist.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqptrlist.h>
namespace KODE {
class KDE_EXPORT Class
{
public:
- typedef QValueList<Class> List;
+ typedef TQValueList<Class> List;
Class();
- Class( const QString &name, const QString &nameSpace = QString::null );
+ Class( const TQString &name, const TQString &nameSpace = TQString::null );
Class( const Class & );
Class &operator=( const Class &c );
bool isValid() const;
- void addInclude( const QString &file,
- const QString &forwardDeclaration = QString::null );
- void addHeaderInclude( const QString &file );
- void addHeaderIncludes( const QStringList &files );
+ void addInclude( const TQString &file,
+ const TQString &forwardDeclaration = TQString::null );
+ void addHeaderInclude( const TQString &file );
+ void addHeaderIncludes( const TQStringList &files );
void addBaseClass( const Class & );
void addFunction( const Function & );
void addMemberVariable( const MemberVariable &v );
void addTypedef( const Typedef & );
void addEnum( const Enum & );
- void setName( const QString &name );
- QString name() const { return mName; }
- void setNameSpace( const QString &nameSpace );
- QString nameSpace() const { return mNameSpace; }
- QStringList includes() const { return mIncludes; }
- QStringList headerIncludes() const { return mHeaderIncludes; }
- QStringList forwardDeclarations() const { return mForwardDeclarations; }
+ void setName( const TQString &name );
+ TQString name() const { return mName; }
+ void setNameSpace( const TQString &nameSpace );
+ TQString nameSpace() const { return mNameSpace; }
+ TQStringList includes() const { return mIncludes; }
+ TQStringList headerIncludes() const { return mHeaderIncludes; }
+ TQStringList forwardDeclarations() const { return mForwardDeclarations; }
Function::List functions() const { return mFunctions; }
MemberVariable::List memberVariables() const { return mMemberVariables; }
Class::List baseClasses() const;
Typedef::List typedefs() const { return mTypedefs; }
Enum::List enums() const { return mEnums; }
- void setDocs( const QString & );
- QString docs() const { return mDocs; }
+ void setDocs( const TQString & );
+ TQString docs() const { return mDocs; }
- bool hasFunction( const QString &name ) const;
+ bool hasFunction( const TQString &name ) const;
bool isQObject() const;
private:
// WARNING: If you add member variables, you have to adjust the copy
// constructor.
- QString mName;
- QString mNameSpace;
+ TQString mName;
+ TQString mNameSpace;
Function::List mFunctions;
MemberVariable::List mMemberVariables;
- QStringList mIncludes;
- QStringList mForwardDeclarations;
- QStringList mHeaderIncludes;
- QPtrList<Class> mBaseClasses;
+ TQStringList mIncludes;
+ TQStringList mForwardDeclarations;
+ TQStringList mHeaderIncludes;
+ TQPtrList<Class> mBaseClasses;
Typedef::List mTypedefs;
Enum::List mEnums;
- QString mDocs;
+ TQString mDocs;
};
}
diff --git a/kode/code.cpp b/kode/code.cpp
index 9d02736c6..da8976931 100644
--- a/kode/code.cpp
+++ b/kode/code.cpp
@@ -23,8 +23,8 @@
#include <kdebug.h>
-#include <qfile.h>
-#include <qtextstream.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
using namespace KODE;
@@ -41,7 +41,7 @@ Code::Code( int indent )
void Code::clear()
{
mIndent = 0;
- mText = QString::null;
+ mText = TQString::null;
}
bool Code::isEmpty() const
@@ -65,7 +65,7 @@ void Code::unindent()
if ( mIndent < 0 ) mIndent = 0;
}
-void Code::addLine( const QString &line )
+void Code::addLine( const TQString &line )
{
mText += spaces( mIndent );
mText += line;
@@ -77,22 +77,22 @@ void Code::newLine()
mText += '\n';
}
-QString Code::spaces( int count )
+TQString Code::spaces( int count )
{
- QString str;
+ TQString str;
for( int i = 0; i < count; ++i ) {
str += ' ';
}
return str;
}
-void Code::addBlock( const QString &block )
+void Code::addBlock( const TQString &block )
{
- QStringList lines = QStringList::split( "\n", block, true );
+ TQStringList lines = TQStringList::split( "\n", block, true );
if ( !lines.isEmpty() && lines.last().isEmpty() ) {
lines.pop_back();
}
- QStringList::ConstIterator it;
+ TQStringList::ConstIterator it;
for( it = lines.begin(); it != lines.end(); ++it ) {
if ( !(*it).isEmpty() ) mText += spaces( mIndent );
mText += *it;
@@ -100,7 +100,7 @@ void Code::addBlock( const QString &block )
}
}
-void Code::addBlock( const QString &block, int indent )
+void Code::addBlock( const TQString &block, int indent )
{
int tmp = mIndent;
mIndent = indent;
@@ -113,26 +113,26 @@ void Code::addBlock( const Code &c )
addBlock( c.text() );
}
-void Code::addWrappedText( const QString &txt )
+void Code::addWrappedText( const TQString &txt )
{
int maxWidth = 80 - mIndent;
unsigned int pos = 0;
while ( pos < txt.length() ) {
- QString line = txt.mid( pos, maxWidth );
+ TQString line = txt.mid( pos, maxWidth );
addLine( line );
pos += maxWidth;
}
}
-void Code::addFormattedText( const QString &text )
+void Code::addFormattedText( const TQString &text )
{
int maxWidth = 80 - mIndent;
int lineLength = 0;
- QString line;
- const QStringList words = QStringList::split( ' ', text, false );
+ TQString line;
+ const TQStringList words = TQStringList::split( ' ', text, false );
- QStringList::ConstIterator it;
+ TQStringList::ConstIterator it;
for ( it = words.begin(); it != words.end(); ++it ) {
if ( (int)(*it).length() + lineLength >= maxWidth ) {
addLine( line );
@@ -147,7 +147,7 @@ void Code::addFormattedText( const QString &text )
addLine( line );
}
-Code &Code::operator+=( const QString &str )
+Code &Code::operator+=( const TQString &str )
{
addLine( str );
@@ -156,7 +156,7 @@ Code &Code::operator+=( const QString &str )
Code &Code::operator+=( const char *str )
{
- addLine( QString::fromLocal8Bit( str ) );
+ addLine( TQString::fromLocal8Bit( str ) );
return *this;
}
diff --git a/kode/code.h b/kode/code.h
index 1723df905..9f056df2b 100644
--- a/kode/code.h
+++ b/kode/code.h
@@ -23,9 +23,9 @@
#include "license.h"
-#include <qvaluelist.h>
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqvaluelist.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
#include <kdepimmacros.h>
namespace KODE {
@@ -43,26 +43,26 @@ class KDE_EXPORT Code
void indent();
void unindent();
- QString text() const { return mText; }
+ TQString text() const { return mText; }
- void addLine( const QString & );
+ void addLine( const TQString & );
void addBlock( const Code & );
- void addBlock( const QString & );
- void addBlock( const QString &, int indent );
+ void addBlock( const TQString & );
+ void addBlock( const TQString &, int indent );
- void addWrappedText( const QString & );
- void addFormattedText( const QString & );
+ void addWrappedText( const TQString & );
+ void addFormattedText( const TQString & );
void newLine();
- Code &operator+=( const QString & );
+ Code &operator+=( const TQString & );
Code &operator+=( const char * );
Code &operator+=( const Code & );
- static QString spaces( int count );
+ static TQString spaces( int count );
private:
- QString mText;
+ TQString mText;
int mIndent;
};
diff --git a/kode/enum.cpp b/kode/enum.cpp
index 3d8ac6081..64bf8f790 100644
--- a/kode/enum.cpp
+++ b/kode/enum.cpp
@@ -28,22 +28,22 @@ Enum::Enum()
{
}
-Enum::Enum( const QString &name, const QStringList &enums, bool combinable )
+Enum::Enum( const TQString &name, const TQStringList &enums, bool combinable )
: mName( name ), mEnums( enums ), mCombinable( combinable )
{
}
-QString Enum::declaration() const
+TQString Enum::declaration() const
{
- QString retval( "enum " + mName + " {" );
+ TQString retval( "enum " + mName + " {" );
uint value = 0;
- QStringList::ConstIterator it;
+ TQStringList::ConstIterator it;
for ( it = mEnums.begin(); it != mEnums.end(); ++it, ++value ) {
if ( mCombinable ) {
if ( it == mEnums.begin() )
- retval += QString( " %1 = %2" ).arg( *it ).arg( 1 << value );
+ retval += TQString( " %1 = %2" ).arg( *it ).arg( 1 << value );
else
- retval += QString( ", %1 = %2" ).arg( *it ).arg( 1 << value );
+ retval += TQString( ", %1 = %2" ).arg( *it ).arg( 1 << value );
} else {
if ( it == mEnums.begin() )
retval += " " + *it;
diff --git a/kode/enum.h b/kode/enum.h
index e3bc695aa..cc75b2c03 100644
--- a/kode/enum.h
+++ b/kode/enum.h
@@ -21,7 +21,7 @@
#ifndef KODE_ENUM_H
#define KODE_ENUM_H
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include <kdepimmacros.h>
namespace KODE {
@@ -29,16 +29,16 @@ namespace KODE {
class KDE_EXPORT Enum
{
public:
- typedef QValueList<Enum> List;
+ typedef TQValueList<Enum> List;
Enum();
- Enum( const QString &name, const QStringList &enums, bool combinable = false );
+ Enum( const TQString &name, const TQStringList &enums, bool combinable = false );
- QString declaration() const;
+ TQString declaration() const;
private:
- QString mName;
- QStringList mEnums;
+ TQString mName;
+ TQStringList mEnums;
bool mCombinable;
};
diff --git a/kode/file.cpp b/kode/file.cpp
index fa93326c9..51c19131f 100644
--- a/kode/file.cpp
+++ b/kode/file.cpp
@@ -23,8 +23,8 @@
#include <kdebug.h>
-#include <qfile.h>
-#include <qtextstream.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
using namespace KODE;
@@ -33,37 +33,37 @@ File::File()
{
}
-void File::setFilename( const QString &filename )
+void File::setFilename( const TQString &filename )
{
mFilename = filename;
}
-QString File::filename() const
+TQString File::filename() const
{
if ( !mFilename.isEmpty() ) return mFilename;
if ( !mClasses.isEmpty() ) {
- QString className = mClasses[ 0 ].name();
+ TQString className = mClasses[ 0 ].name();
return className.lower();
}
- return QString::null;
+ return TQString::null;
}
-void File::setNameSpace( const QString &n )
+void File::setNameSpace( const TQString &n )
{
mNameSpace = n;
}
-void File::setProject( const QString &project )
+void File::setProject( const TQString &project )
{
if ( project.isEmpty() ) return;
mProject = project;
}
-void File::addCopyright( int year, const QString &name, const QString &email )
+void File::addCopyright( int year, const TQString &name, const TQString &email )
{
- QString str = "Copyright (c) " + QString::number( year ) + " " + name + " <" +
+ TQString str = "Copyright (c) " + TQString::number( year ) + " " + name + " <" +
email + ">";
mCopyrightStrings.append( str );
}
@@ -73,9 +73,9 @@ void File::setLicense( const License &l )
mLicense = l;
}
-void File::addInclude( const QString &i )
+void File::addInclude( const TQString &i )
{
- QString include = i;
+ TQString include = i;
if( !include.endsWith( ".h" ) ) include.append( ".h" );
if ( mIncludes.find( include ) == mIncludes.end() ) {
@@ -97,7 +97,7 @@ void File::insertClass( const Class &c )
mClasses.append( c );
}
-bool File::hasClass( const QString &name )
+bool File::hasClass( const TQString &name )
{
Class::List::ConstIterator it;
for( it = mClasses.begin(); it != mClasses.end(); ++it ) {
@@ -106,7 +106,7 @@ bool File::hasClass( const QString &name )
return it != mClasses.end();
}
-Class File::findClass( const QString &name )
+Class File::findClass( const TQString &name )
{
Class::List::ConstIterator it;
for( it = mClasses.begin(); it != mClasses.end(); ++it ) {
@@ -125,7 +125,7 @@ void File::addFileFunction( const Function &f )
mFileFunctions.append( f );
}
-void File::addExternCDeclaration( const QString &s )
+void File::addExternCDeclaration( const TQString &s )
{
mExternCDeclarations.append( s );
}
diff --git a/kode/file.h b/kode/file.h
index e4efdca6c..0520d7872 100644
--- a/kode/file.h
+++ b/kode/file.h
@@ -26,8 +26,8 @@
#include "class.h"
#include "membervariable.h"
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
#include <kdepimmacros.h>
namespace KODE {
@@ -37,30 +37,30 @@ class KDE_EXPORT File
public:
File();
- void setFilename( const QString & );
- QString filename() const;
+ void setFilename( const TQString & );
+ TQString filename() const;
- void setNameSpace( const QString & );
- QString nameSpace() const { return mNameSpace; }
+ void setNameSpace( const TQString & );
+ TQString nameSpace() const { return mNameSpace; }
- void setProject( const QString &project );
- QString project() const { return mProject; }
+ void setProject( const TQString &project );
+ TQString project() const { return mProject; }
- void addCopyright( int year, const QString &name, const QString &email );
- QStringList copyrightStrings() const { return mCopyrightStrings; }
+ void addCopyright( int year, const TQString &name, const TQString &email );
+ TQStringList copyrightStrings() const { return mCopyrightStrings; }
void setLicense( const License & );
License license() const { return mLicense; }
- void addInclude( const QString &include );
- QStringList includes() const { return mIncludes; }
+ void addInclude( const TQString &include );
+ TQStringList includes() const { return mIncludes; }
void insertClass( const Class & );
Class::List classes() const { return mClasses; }
- bool hasClass( const QString &className );
+ bool hasClass( const TQString &className );
- Class findClass( const QString &name );
+ Class findClass( const TQString &name );
void clearClasses();
void clearFileFunctions();
@@ -74,23 +74,23 @@ class KDE_EXPORT File
void addFileFunction( const Function & );
Function::List fileFunctions() const { return mFileFunctions; }
- void addExternCDeclaration( const QString & );
- QStringList externCDeclarations() const { return mExternCDeclarations; }
+ void addExternCDeclaration( const TQString & );
+ TQStringList externCDeclarations() const { return mExternCDeclarations; }
void addFileCode( const Code & );
Code fileCode() const { return mFileCode; }
private:
- QString mFilename;
- QString mNameSpace;
- QString mProject;
- QStringList mCopyrightStrings;
+ TQString mFilename;
+ TQString mNameSpace;
+ TQString mProject;
+ TQStringList mCopyrightStrings;
License mLicense;
- QStringList mIncludes;
+ TQStringList mIncludes;
Class::List mClasses;
Variable::List mFileVariables;
Function::List mFileFunctions;
- QStringList mExternCDeclarations;
+ TQStringList mExternCDeclarations;
Code mFileCode;
};
diff --git a/kode/function.cpp b/kode/function.cpp
index 1e379e46c..2cea97368 100644
--- a/kode/function.cpp
+++ b/kode/function.cpp
@@ -30,7 +30,7 @@ Function::Function()
{
}
-Function::Function( const QString &name, const QString &returnType,
+Function::Function( const TQString &name, const TQString &returnType,
int access, bool isStatic )
: mAccess( access ), mIsConst( false ), mIsStatic( isStatic ),
mReturnType( returnType ), mName( name )
@@ -47,27 +47,27 @@ void Function::setStatic( bool isStatic )
mIsStatic = isStatic;
}
-void Function::addArgument( const QString &argument )
+void Function::addArgument( const TQString &argument )
{
mArguments.append( argument );
}
-void Function::addInitializer( const QString &initializer )
+void Function::addInitializer( const TQString &initializer )
{
mInitializers.append( initializer );
}
-void Function::setArgumentString( const QString &argumentString )
+void Function::setArgumentString( const TQString &argumentString )
{
mArguments.clear();
- QStringList arguments = QStringList::split( ",", argumentString );
- QStringList::ConstIterator it;
+ TQStringList arguments = TQStringList::split( ",", argumentString );
+ TQStringList::ConstIterator it;
for( it = arguments.begin(); it != arguments.end(); ++it ) {
addArgument( *it );
}
}
-void Function::setBody( const QString &body )
+void Function::setBody( const TQString &body )
{
mBody = body;
}
@@ -77,7 +77,7 @@ void Function::setBody( const Code &body )
mBody = body.text();
}
-void Function::addBodyLine( const QString &bodyLine )
+void Function::addBodyLine( const TQString &bodyLine )
{
mBody.append( bodyLine );
if ( bodyLine.right( 1 ) != "\n" ) mBody.append( '\n' );
@@ -88,9 +88,9 @@ void Function::setAccess( int a )
mAccess = a;
}
-QString Function::accessAsString() const
+TQString Function::accessAsString() const
{
- QString access;
+ TQString access;
if ( mAccess & Public )
access = "public";
@@ -107,17 +107,17 @@ QString Function::accessAsString() const
return access;
}
-void Function::setReturnType( const QString &str )
+void Function::setReturnType( const TQString &str )
{
mReturnType = str;
}
-void Function::setName( const QString &str )
+void Function::setName( const TQString &str )
{
mName = str;
}
-void Function::setDocs( const QString &str )
+void Function::setDocs( const TQString &str )
{
mDocs = str;
}
diff --git a/kode/function.h b/kode/function.h
index 53ba43720..47f0dd756 100644
--- a/kode/function.h
+++ b/kode/function.h
@@ -23,9 +23,9 @@
#include "code.h"
-#include <qvaluelist.h>
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqvaluelist.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
#include <kdepimmacros.h>
namespace KODE {
@@ -33,12 +33,12 @@ namespace KODE {
class KDE_EXPORT Function
{
public:
- typedef QValueList<Function> List;
+ typedef TQValueList<Function> List;
enum AccessSpecifier { Public = 1, Protected = 2, Private = 4, Signal = 8, Slot = 16 };
Function();
- Function( const QString &name, const QString &returnType = QString::null,
+ Function( const TQString &name, const TQString &returnType = TQString::null,
int access = Public, bool isStatic = false );
void setConst( bool isConst );
@@ -47,43 +47,43 @@ class KDE_EXPORT Function
void setStatic( bool isStatic );
bool isStatic() const { return mIsStatic; }
- void addArgument( const QString &argument );
- void setArgumentString( const QString &argumentString );
+ void addArgument( const TQString &argument );
+ void setArgumentString( const TQString &argumentString );
- void addInitializer( const QString & );
- QStringList initializers() const { return mInitializers; }
+ void addInitializer( const TQString & );
+ TQStringList initializers() const { return mInitializers; }
- void setBody( const QString &body );
+ void setBody( const TQString &body );
void setBody( const Code &code );
- void addBodyLine( const QString &bodyLine );
+ void addBodyLine( const TQString &bodyLine );
void setAccess( int );
int access() const { return mAccess; }
- QString accessAsString() const;
+ TQString accessAsString() const;
- void setReturnType( const QString & );
- QString returnType() const { return mReturnType; }
+ void setReturnType( const TQString & );
+ TQString returnType() const { return mReturnType; }
- void setName( const QString & );
- QString name() const { return mName; }
+ void setName( const TQString & );
+ TQString name() const { return mName; }
- QStringList arguments() const { return mArguments; }
+ TQStringList arguments() const { return mArguments; }
- QString body() const { return mBody; }
+ TQString body() const { return mBody; }
- void setDocs( const QString & );
- QString docs() const { return mDocs; }
+ void setDocs( const TQString & );
+ TQString docs() const { return mDocs; }
private:
int mAccess;
bool mIsConst;
bool mIsStatic;
- QString mReturnType;
- QString mName;
- QStringList mArguments;
- QStringList mInitializers;
- QString mBody;
- QString mDocs;
+ TQString mReturnType;
+ TQString mName;
+ TQStringList mArguments;
+ TQStringList mInitializers;
+ TQString mBody;
+ TQString mDocs;
};
}
diff --git a/kode/kodemain.cpp b/kode/kodemain.cpp
index a567f20a0..e248a93a6 100644
--- a/kode/kodemain.cpp
+++ b/kode/kodemain.cpp
@@ -39,10 +39,10 @@
#include <ksavefile.h>
#include <kprocess.h>
-#include <qfile.h>
-#include <qtextstream.h>
-#include <qfileinfo.h>
-#include <qregexp.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
+#include <tqfileinfo.h>
+#include <tqregexp.h>
#include <iostream>
@@ -73,15 +73,15 @@ static const KCmdLineOptions options[] =
KCmdLineLastOption
};
-void addPropertyFunctions( QString &out, const QString &type,
- const QString &name )
+void addPropertyFunctions( TQString &out, const TQString &type,
+ const TQString &name )
{
// FIXME: Use KODE::Function
bool isReference = type.endsWith( "*" ) || type.endsWith( "&" );
- QString argument;
- QString upper = KODE::Style::upperFirst( name );
+ TQString argument;
+ TQString upper = KODE::Style::upperFirst( name );
if ( !isReference ) {
argument = "const " + type + " &";
} else argument = type;
@@ -107,10 +107,10 @@ void addPropertyFunctions( QString &out, const QString &type,
out += code.text();
}
-void addPropertyVariable( QString &out, const QString &type,
- const QString &name )
+void addPropertyVariable( TQString &out, const TQString &type,
+ const TQString &name )
{
- QString upper = KODE::Style::upperFirst( name );
+ TQString upper = KODE::Style::upperFirst( name );
bool isReference = type.endsWith( "*" ) || type.endsWith( "&" );
KODE::Code code;
@@ -129,68 +129,68 @@ int addProperty( KCmdLineArgs *args )
return 1;
}
- QString className = args->arg( 0 );
- QString type = args->arg( 1 );
- QString name = args->arg( 2 );
+ TQString className = args->arg( 0 );
+ TQString type = args->arg( 1 );
+ TQString name = args->arg( 2 );
kdDebug() << "Add property: class " << className << ": " << type << " " <<
name << endl;
- QString headerFileName = className.lower() + ".h";
+ TQString headerFileName = className.lower() + ".h";
- QFile headerFile( headerFileName );
+ TQFile headerFile( headerFileName );
if ( !headerFile.open( IO_ReadOnly ) ) {
std::cerr << "Unable to open file '" << headerFileName.utf8() << "'" <<
std::endl;
return 1;
}
- QTextStream in( &headerFile );
+ TQTextStream in( &headerFile );
enum State { FindClass, FindConstructor, FindProperties, FindPrivate,
FindVariables, Finish };
State state = FindClass;
- QString accessor;
- QString mutator;
+ TQString accessor;
+ TQString mutator;
- QString out;
+ TQString out;
- QString readAhead;
+ TQString readAhead;
- QString line;
+ TQString line;
while ( !( line = in.readLine() ).isNull() ) {
// std::cout << line.utf8() << std::endl;
kdDebug() << state << " LINE: " << line << endl;
- QString readAheadPrevious = readAhead;
+ TQString readAheadPrevious = readAhead;
readAhead += line + "\n";
// out += line + "\n";
switch( state ) {
case FindClass:
-// if ( line.find( QRegExp( className ) ) >= 0 ) {
- if ( line.find( QRegExp( "^\\s*class\\s+" + className ) ) >= 0 ) {
+// if ( line.find( TQRegExp( className ) ) >= 0 ) {
+ if ( line.find( TQRegExp( "^\\s*class\\s+" + className ) ) >= 0 ) {
kdDebug() << " FOUND CLASS" << endl;
state = FindConstructor;
}
break;
case FindConstructor:
- if ( line.find( QRegExp( "^\\s*" + className + "\\s*\\(" ) ) >= 0 ) {
+ if ( line.find( TQRegExp( "^\\s*" + className + "\\s*\\(" ) ) >= 0 ) {
kdDebug() << " FOUND CONSTRUCTOR" << endl;
out += readAhead;
- readAhead = QString::null;
+ readAhead = TQString::null;
state = FindProperties;
}
break;
case FindProperties:
{
- QRegExp re( "(\\w+)\\s*\\(" );
+ TQRegExp re( "(\\w+)\\s*\\(" );
if ( re.search( line ) >= 0 ) {
- QString function = re.cap( 1 ).lower();
+ TQString function = re.cap( 1 ).lower();
if ( !function.isEmpty() ) {
kdDebug() << "Function: " << function << endl;
if ( function == className || function == "~" + className ) {
out += readAhead;
- readAhead = QString::null;
+ readAhead = TQString::null;
} else {
if ( function.startsWith( "set" ) ) {
mutator = function.mid( 3 );
@@ -200,7 +200,7 @@ int addProperty( KCmdLineArgs *args )
accessor = function;
kdDebug() << "ACCESSOR: " << accessor << endl;
out += readAhead;
- readAhead = QString::null;
+ readAhead = TQString::null;
} else {
kdDebug() << "CREATE PROPERTY" << endl;
out += readAheadPrevious;
@@ -212,13 +212,13 @@ int addProperty( KCmdLineArgs *args )
}
}
}
- } else if ( line.find( QRegExp( "\\s*protected" ) ) >= 0 ) {
+ } else if ( line.find( TQRegExp( "\\s*protected" ) ) >= 0 ) {
state = FindPrivate;
- } else if ( line.find( QRegExp( "\\s*private" ) ) >= 0 ) {
+ } else if ( line.find( TQRegExp( "\\s*private" ) ) >= 0 ) {
if ( accessor.isEmpty() ) {
addPropertyFunctions( out, type, name );
out += readAhead;
- readAhead = QString::null;
+ readAhead = TQString::null;
addPropertyVariable( out, type, name );
state = Finish;
} else {
@@ -227,7 +227,7 @@ int addProperty( KCmdLineArgs *args )
addPropertyFunctions( out, type, name );
out += "\n";
out += line + "\n";
- readAhead = QString::null;
+ readAhead = TQString::null;
}
state = FindVariables;
}
@@ -235,10 +235,10 @@ int addProperty( KCmdLineArgs *args )
}
break;
case FindPrivate:
- if ( line.find( QRegExp( "\\s*private" ) ) >= 0 ) {
+ if ( line.find( TQRegExp( "\\s*private" ) ) >= 0 ) {
if ( accessor.isEmpty() ) {
out += readAhead;
- readAhead = QString::null;
+ readAhead = TQString::null;
addPropertyVariable( out, type, name );
state = Finish;
} else {
@@ -250,7 +250,7 @@ int addProperty( KCmdLineArgs *args )
{
if ( line.find( "m" + accessor.lower(), 0, false ) >= 0 ) {
out += readAhead;
- readAhead = QString::null;
+ readAhead = TQString::null;
addPropertyVariable( out, type, name );
state = Finish;
}
@@ -266,11 +266,11 @@ int addProperty( KCmdLineArgs *args )
out += readAhead;
if ( args->isSet( "inplace" ) ) {
- QString headerFileNameOut = headerFileName + ".kodeorig" ;
+ TQString headerFileNameOut = headerFileName + ".kodeorig" ;
KProcess proc;
- proc << "cp" << QFile::encodeName( headerFileName ) <<
- QFile::encodeName( headerFileNameOut );
+ proc << "cp" << TQFile::encodeName( headerFileName ) <<
+ TQFile::encodeName( headerFileNameOut );
if ( !proc.start( KProcess::Block ) ) {
kdError() << "Copy failed" << endl;
@@ -281,7 +281,7 @@ int addProperty( KCmdLineArgs *args )
"' for writing." << endl;
return 1;
}
- QTextStream o( &headerFile );
+ TQTextStream o( &headerFile );
o << out << endl;
}
} else {
@@ -298,16 +298,16 @@ int codify( KCmdLineArgs *args )
return 1;
}
- QString filename = args->arg( 0 );
+ TQString filename = args->arg( 0 );
- QFile f( filename );
+ TQFile f( filename );
if ( !f.open( IO_ReadOnly ) ) {
kdError() << "Unable to open file '" << filename << "'." << endl;
return 1;
} else {
std::cout << "KODE::Code code;" << std::endl;
- QTextStream ts( &f );
- QString line;
+ TQTextStream ts( &f );
+ TQString line;
while( !( line = ts.readLine() ).isNull() ) {
line.replace( "\\", "\\\\" );
line.replace( "\"", "\\\"" );
@@ -328,7 +328,7 @@ int create( KCmdLineArgs *args )
bool createKioslave = args->isSet( "create-kioslave" );
bool createMain = args->isSet( "create-main" );
- QString filename = args->getOption( "filename" );
+ TQString filename = args->getOption( "filename" );
if ( createMain ) {
if ( filename.isEmpty() ) {
@@ -346,9 +346,9 @@ int create( KCmdLineArgs *args )
}
}
- QString className = args->getOption( "classname" );
+ TQString className = args->getOption( "classname" );
- QString protocol;
+ TQString protocol;
if ( createKioslave ) {
if ( !args->isSet( "protocol" ) ) {
@@ -364,8 +364,8 @@ int create( KCmdLineArgs *args )
file.setProject( args->getOption( "project" ) );
- QString authorEmail = args->getOption( "author-email" );
- QString authorName;
+ TQString authorEmail = args->getOption( "author-email" );
+ TQString authorName;
KABC::Addressee a;
if ( authorEmail.isEmpty() ) {
a = KABC::StdAddressBook::self()->whoAmI();
@@ -384,7 +384,7 @@ int create( KCmdLineArgs *args )
authorName = a.realName();
}
if ( !authorEmail.isEmpty() ) {
- file.addCopyright( QDate::currentDate().year(), authorName, authorEmail );
+ file.addCopyright( TQDate::currentDate().year(), authorName, authorEmail );
}
KODE::License l;
@@ -464,7 +464,7 @@ int create( KCmdLineArgs *args )
code += "mimeType( \"text/plain\" );";
code.newLine();
- code += "QCString str( \"Hello!\" );";
+ code += "TQCString str( \"Hello!\" );";
code += "data( str );";
code.newLine();
@@ -544,8 +544,8 @@ int create( KCmdLineArgs *args )
}
if ( createKioslave ) {
- constructor.addArgument( "const QCString &pool" );
- constructor.addArgument( "const QCString &app" );
+ constructor.addArgument( "const TQCString &pool" );
+ constructor.addArgument( "const TQCString &app" );
constructor.addInitializer( "SlaveBase( \"" + protocol + "\", pool, app )" );
}
@@ -582,14 +582,14 @@ int create( KCmdLineArgs *args )
// Write protocol file
- QString protocolFilename = protocol + ".protocol";
+ TQString protocolFilename = protocol + ".protocol";
- QFileInfo fi( protocolFilename );
+ TQFileInfo fi( protocolFilename );
protocolFilename = fi.absFilePath();
- KSaveFile::backupFile( protocolFilename, QString::null, ".backup" );
+ KSaveFile::backupFile( protocolFilename, TQString::null, ".backup" );
- QFile::remove( protocolFilename );
+ TQFile::remove( protocolFilename );
KSimpleConfig protocolFile( protocolFilename );
diff --git a/kode/kwsdl/binding.cpp b/kode/kwsdl/binding.cpp
index 540de5fbe..cfce54d48 100644
--- a/kode/kwsdl/binding.cpp
+++ b/kode/kwsdl/binding.cpp
@@ -27,7 +27,7 @@ Binding::Operation::Operation()
{
}
-Binding::Operation::Operation( const QString &name, const QString &action )
+Binding::Operation::Operation( const TQString &name, const TQString &action )
: mName( name ), mAction( action )
{
}
@@ -36,7 +36,7 @@ Binding::Binding()
{
}
-Binding::Binding( const QString &name, const QString &type )
+Binding::Binding( const TQString &name, const TQString &type )
: mName( name ), mType( type )
{
}
@@ -47,7 +47,7 @@ void Binding::addOperation( const Operation &operation )
mOperations.append( operation );
}
-Binding::Operation Binding::operation( const QString &name ) const
+Binding::Operation Binding::operation( const TQString &name ) const
{
Operation::List::ConstIterator it;
for ( it = mOperations.begin(); it != mOperations.end(); ++it )
diff --git a/kode/kwsdl/binding.h b/kode/kwsdl/binding.h
index eba155c7d..a0a0d68fb 100644
--- a/kode/kwsdl/binding.h
+++ b/kode/kwsdl/binding.h
@@ -22,46 +22,46 @@
#ifndef KWSDL_BINDING_H
#define KWSDL_BINDING_H
-#include <qmap.h>
+#include <tqmap.h>
namespace KWSDL {
class Binding
{
public:
- typedef QValueList<Binding> List;
+ typedef TQValueList<Binding> List;
class Operation
{
public:
- typedef QValueList<Operation> List;
+ typedef TQValueList<Operation> List;
class Item
{
public:
- void setUse( const QString &use ) { mUse = use; }
- QString use() const { return mUse; }
+ void setUse( const TQString &use ) { mUse = use; }
+ TQString use() const { return mUse; }
- void setNameSpace( const QString &nameSpace ) { mNameSpace = nameSpace; }
- QString nameSpace() const { return mNameSpace; }
+ void setNameSpace( const TQString &nameSpace ) { mNameSpace = nameSpace; }
+ TQString nameSpace() const { return mNameSpace; }
- void setEncodingStyle( const QString &encodingStyle ) { mEncodingStyle = encodingStyle; }
- QString encodingStyle() const { return mEncodingStyle; }
+ void setEncodingStyle( const TQString &encodingStyle ) { mEncodingStyle = encodingStyle; }
+ TQString encodingStyle() const { return mEncodingStyle; }
private:
- QString mUse;
- QString mNameSpace;
- QString mEncodingStyle;
+ TQString mUse;
+ TQString mNameSpace;
+ TQString mEncodingStyle;
};
Operation();
- Operation( const QString &name, const QString &action );
+ Operation( const TQString &name, const TQString &action );
- 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 setAction( const QString &action ) { mAction = action; }
- QString action() const { return mAction; }
+ void setAction( const TQString &action ) { mAction = action; }
+ TQString action() const { return mAction; }
void setInput( const Item &item ) { mInput = item; }
Item input() const { return mInput; }
@@ -70,36 +70,36 @@ class Binding
Item output() const { return mOutput; }
private:
- QString mName;
- QString mAction;
+ TQString mName;
+ TQString mAction;
Item mInput;
Item mOutput;
};
Binding();
- Binding( const QString &name, const QString &type );
+ Binding( const TQString &name, const TQString &type );
- 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 setType( const QString &type ) { mType = type; }
- QString type() const { return mType; }
+ void setType( const TQString &type ) { mType = type; }
+ TQString type() const { return mType; }
- void setStyle( const QString &style ) { mStyle = style; }
- QString style() const { return mStyle; }
+ void setStyle( const TQString &style ) { mStyle = style; }
+ TQString style() const { return mStyle; }
- void setTransport( const QString &transport ) { mTransport = transport; }
- QString transport() const { return mTransport; }
+ void setTransport( const TQString &transport ) { mTransport = transport; }
+ TQString transport() const { return mTransport; }
void addOperation( const Operation &operation );
- Operation operation( const QString &name ) const;
+ Operation operation( const TQString &name ) const;
Operation::List operations() const;
private:
- QString mName;
- QString mType;
- QString mStyle;
- QString mTransport;
+ TQString mName;
+ TQString mType;
+ TQString mStyle;
+ TQString mTransport;
Operation::List mOperations;
};
diff --git a/kode/kwsdl/compiler.cpp b/kode/kwsdl/compiler.cpp
index dbbe52b7e..9e4c86ab9 100644
--- a/kode/kwsdl/compiler.cpp
+++ b/kode/kwsdl/compiler.cpp
@@ -19,8 +19,8 @@
Boston, MA 02110-1301, USA.
*/
-#include <qapplication.h>
-#include <qfile.h>
+#include <tqapplication.h>
+#include <tqfile.h>
#include <schema/fileprovider.h>
@@ -32,11 +32,11 @@
using namespace KWSDL;
Compiler::Compiler()
- : QObject( 0, "KWSDL::Compiler" )
+ : TQObject( 0, "KWSDL::Compiler" )
{
}
-void Compiler::setWSDLUrl( const QString &wsdlUrl )
+void Compiler::setWSDLUrl( const TQString &wsdlUrl )
{
mWSDLUrl = wsdlUrl;
mWSDLBaseUrl = mWSDLUrl.left( mWSDLUrl.findRev( '/' ) );
@@ -44,7 +44,7 @@ void Compiler::setWSDLUrl( const QString &wsdlUrl )
mParser.setSchemaBaseUrl( mWSDLBaseUrl );
}
-void Compiler::setOutputDirectory( const QString &outputDirectory )
+void Compiler::setOutputDirectory( const TQString &outputDirectory )
{
mOutputDirectory = outputDirectory;
@@ -52,7 +52,7 @@ void Compiler::setOutputDirectory( const QString &outputDirectory )
mOutputDirectory.append( "/" );
}
-void Compiler::setNameSpace( const QString &nameSpace )
+void Compiler::setNameSpace( const TQString &nameSpace )
{
mNameSpace = nameSpace;
}
@@ -66,18 +66,18 @@ void Compiler::download()
{
Schema::FileProvider provider;
- QString fileName;
+ TQString fileName;
if ( provider.get( mWSDLUrl, fileName ) ) {
- QFile file( fileName );
+ TQFile file( fileName );
if ( !file.open( IO_ReadOnly ) ) {
qDebug( "Unable to download schema file %s", mWSDLUrl.latin1() );
provider.cleanUp();
return;
}
- QString errorMsg;
+ TQString errorMsg;
int errorLine, errorCol;
- QDomDocument doc;
+ TQDomDocument doc;
if ( !doc.setContent( &file, true, &errorMsg, &errorLine, &errorCol ) ) {
qDebug( "%s at (%d,%d)", errorMsg.latin1(), errorLine, errorCol );
return;
@@ -89,7 +89,7 @@ void Compiler::download()
}
}
-void Compiler::parse( const QDomElement &element )
+void Compiler::parse( const TQDomElement &element )
{
mParser.parse( element );
create();
diff --git a/kode/kwsdl/compiler.h b/kode/kwsdl/compiler.h
index 49626ba57..1bb27e1b8 100644
--- a/kode/kwsdl/compiler.h
+++ b/kode/kwsdl/compiler.h
@@ -22,8 +22,8 @@
#ifndef KWSDL_COMPILER_H
#define KWSDL_COMPILER_H
-#include <qdom.h>
-#include <qobject.h>
+#include <tqdom.h>
+#include <tqobject.h>
#include "parser.h"
@@ -36,25 +36,25 @@ class Compiler : public QObject
public:
Compiler();
- void setWSDLUrl( const QString &wsdlUrl );
- void setOutputDirectory( const QString &outputDirectory );
- void setNameSpace( const QString &nameSpace );
+ void setWSDLUrl( const TQString &wsdlUrl );
+ void setOutputDirectory( const TQString &outputDirectory );
+ void setNameSpace( const TQString &nameSpace );
public slots:
void run();
private slots:
void download();
- void parse( const QDomElement& );
+ void parse( const TQDomElement& );
void create();
private:
- QString mWSDLUrl;
- QString mOutputDirectory;
- QString mNameSpace;
+ TQString mWSDLUrl;
+ TQString mOutputDirectory;
+ TQString mNameSpace;
Parser mParser;
- QString mWSDLBaseUrl;
+ TQString mWSDLBaseUrl;
};
}
diff --git a/kode/kwsdl/converter.cpp b/kode/kwsdl/converter.cpp
index fc255d74e..5d824afe3 100644
--- a/kode/kwsdl/converter.cpp
+++ b/kode/kwsdl/converter.cpp
@@ -23,21 +23,21 @@
using namespace KWSDL;
-static QString capitalize( const QString &str )
+static TQString capitalize( const TQString &str )
{
return str[ 0 ].upper() + str.mid( 1 );
}
-static QString escapeEnum( const QString &str )
+static TQString escapeEnum( const TQString &str )
{
- QString enumStr = capitalize( str );
+ TQString enumStr = capitalize( str );
return enumStr.replace( "-", "_" );
}
Converter::Converter()
{
- mQObject = KODE::Class( "QObject" );
+ mQObject = KODE::Class( "TQObject" );
}
void Converter::setWSDL( const WSDL &wsdl )
@@ -91,7 +91,7 @@ void Converter::convertSimpleType( const Schema::SimpleType *type )
Use setter and getter method for enums as well.
*/
if ( type->facetType() & Schema::SimpleType::ENUM ) {
- QStringList enums = type->facetEnums();
+ TQStringList enums = type->facetEnums();
for ( uint i = 0; i < enums.count(); ++i )
enums[ i ] = escapeEnum( enums[ i ] );
@@ -123,12 +123,12 @@ void Converter::convertSimpleType( const Schema::SimpleType *type )
type->baseType() != Schema::XSDType::INVALID &&
!(type->facetType() & Schema::SimpleType::ENUM) ) {
- const QString baseName = type->baseTypeName();
- const QString typeName = mTypeMapper.type( baseName );
+ const TQString baseName = type->baseTypeName();
+ const TQString typeName = mTypeMapper.type( baseName );
// include header
- QMap<QString, QString> headerDec = mTypeMapper.headerDec( baseName );
- QMap<QString, QString>::ConstIterator it;
+ TQMap<TQString, TQString> headerDec = mTypeMapper.headerDec( baseName );
+ TQMap<TQString, TQString>::ConstIterator it;
for ( it = headerDec.begin(); it != headerDec.end(); ++it ) {
if ( !it.key().isEmpty() )
newClass.addInclude( it.key(), it.data() );
@@ -159,13 +159,13 @@ void Converter::convertSimpleType( const Schema::SimpleType *type )
newClass.addFunction( getter );
}
} else if ( type->subType() == Schema::SimpleType::TypeList ) {
- newClass.addHeaderInclude( "qptrlist.h" );
- const QString baseName = type->listTypeName();
- const QString typeName = mTypeMapper.type( baseName );
+ newClass.addHeaderInclude( "tqptrlist.h" );
+ const TQString baseName = type->listTypeName();
+ const TQString typeName = mTypeMapper.type( baseName );
// include header
- QMap<QString, QString> headerDec = mTypeMapper.headerDec( baseName );
- QMap<QString, QString>::ConstIterator it;
+ TQMap<TQString, TQString> headerDec = mTypeMapper.headerDec( baseName );
+ TQMap<TQString, TQString>::ConstIterator it;
for ( it = headerDec.begin(); it != headerDec.end(); ++it ) {
if ( !it.key().isEmpty() )
newClass.addInclude( it.key(), it.data() );
@@ -175,7 +175,7 @@ void Converter::convertSimpleType( const Schema::SimpleType *type )
}
// member variables
- KODE::MemberVariable variable( "entries", "QPtrList<" + typeName + ">*" );
+ KODE::MemberVariable variable( "entries", "TQPtrList<" + typeName + ">*" );
newClass.addMemberVariable( variable );
ctorCode += variable.name() + " = 0;";
@@ -188,7 +188,7 @@ void Converter::convertSimpleType( const Schema::SimpleType *type )
setter.setBody( variable.name() + " = entries;" );
// getter method
- KODE::Function getter( "entries", "QPtrList<" + typeName + ">*" );
+ KODE::Function getter( "entries", "TQPtrList<" + typeName + ">*" );
getter.setBody( " return " + variable.name() + ";" );
getter.setConst( true );
@@ -212,26 +212,26 @@ void Converter::convertSimpleType( const Schema::SimpleType *type )
void Converter::createSimpleTypeSerializer( const Schema::SimpleType *type )
{
- const QString typeName = mTypeMapper.type( type );
- const QString baseType = mTypeMapper.type( type->baseTypeName() );
+ const TQString typeName = mTypeMapper.type( type );
+ const TQString baseType = mTypeMapper.type( type->baseTypeName() );
KODE::Function marshal( "marshal", "void" );
marshal.setStatic( true );
- marshal.addArgument( "QDomDocument &doc" );
- marshal.addArgument( "QDomElement &parent" );
- marshal.addArgument( "const QString &name" );
+ marshal.addArgument( "TQDomDocument &doc" );
+ marshal.addArgument( "TQDomElement &parent" );
+ marshal.addArgument( "const TQString &name" );
marshal.addArgument( "const " + typeName + "* value" );
KODE::Function demarshal( "demarshal", "void" );
demarshal.setStatic( true );
- demarshal.addArgument( "const QDomElement &parent" );
+ demarshal.addArgument( "const TQDomElement &parent" );
demarshal.addArgument( typeName + "* value" );
KODE::Code marshalCode, demarshalCode, code;
// include header
- QMap<QString, QString> headerDec = mTypeMapper.headerDec( type->name() );
- QMap<QString, QString>::ConstIterator it;
+ TQMap<TQString, TQString> headerDec = mTypeMapper.headerDec( type->name() );
+ TQMap<TQString, TQString>::ConstIterator it;
for ( it = headerDec.begin(); it != headerDec.end(); ++it ) {
if ( !it.key().isEmpty() )
mSerializer.addInclude( it.key(), it.data() );
@@ -243,13 +243,13 @@ void Converter::createSimpleTypeSerializer( const Schema::SimpleType *type )
if ( type->subType() == Schema::SimpleType::TypeRestriction ) {
// is an enumeration
if ( type->facetType() & Schema::SimpleType::ENUM ) {
- QStringList enums = type->facetEnums();
- QStringList escapedEnums;
+ TQStringList enums = type->facetEnums();
+ TQStringList escapedEnums;
for ( uint i = 0; i < enums.count(); ++i )
escapedEnums.append( escapeEnum( enums[ i ] ) );
// marshal value
- KODE::Function marshalValue( "marshalValue", "QString" );
+ KODE::Function marshalValue( "marshalValue", "TQString" );
marshalValue.setStatic( true );
marshalValue.addArgument( "const " + typeName + "* value" );
code += "switch ( value->type() ) {";
@@ -269,11 +269,11 @@ void Converter::createSimpleTypeSerializer( const Schema::SimpleType *type )
code.unindent();
code += "}";
code.newLine();
- code += "return QString();";
+ code += "return TQString();";
marshalValue.setBody( code );
// marshal
- marshalCode += "QDomElement root = doc.createElement( name );";
+ marshalCode += "TQDomElement root = doc.createElement( name );";
marshalCode += "root.setAttribute( \"xsi:type\", \"ns1:" + type->name() + "\" );";
marshalCode += "parent.appendChild( root );";
marshalCode += "root.appendChild( doc.createTextNode( Serializer::marshalValue( value ) ) );";
@@ -281,7 +281,7 @@ void Converter::createSimpleTypeSerializer( const Schema::SimpleType *type )
// demarshal value
KODE::Function demarshalValue( "demarshalValue", "void" );
demarshalValue.setStatic( true );
- demarshalValue.addArgument( "const QString &str" );
+ demarshalValue.addArgument( "const TQString &str" );
demarshalValue.addArgument( typeName + "* value" );
code.clear();
for ( uint i = 0; i < enums.count(); ++i ) {
@@ -305,7 +305,7 @@ void Converter::createSimpleTypeSerializer( const Schema::SimpleType *type )
marshalCode.unindent();
marshalCode += "}";
- demarshalCode += "const QString text = parent.text();";
+ demarshalCode += "const TQString text = parent.text();";
demarshalCode.newLine();
demarshalCode += "if ( !text.isEmpty() ) {";
demarshalCode.indent();
@@ -315,7 +315,7 @@ void Converter::createSimpleTypeSerializer( const Schema::SimpleType *type )
demarshalCode.unindent();
demarshalCode += "}";
- KODE::Function marshalValue( "marshalValue", "QString" );
+ KODE::Function marshalValue( "marshalValue", "TQString" );
marshalValue.setStatic( true );
marshalValue.addArgument( "const " + typeName + "* value" );
marshalValue.setBody( "return Serializer::marshalValue( value->value() );" );
@@ -324,7 +324,7 @@ void Converter::createSimpleTypeSerializer( const Schema::SimpleType *type )
KODE::Function demarshalValue( "demarshalValue", "void" );
demarshalValue.setStatic( true );
- demarshalValue.addArgument( "const QString &str" );
+ demarshalValue.addArgument( "const TQString &str" );
demarshalValue.addArgument( typeName + "* value" );
KODE::Code code;
code += baseType + "* data = new " + baseType + ";";
@@ -335,15 +335,15 @@ void Converter::createSimpleTypeSerializer( const Schema::SimpleType *type )
mSerializer.addFunction( demarshalValue );
}
} else if ( type->subType() == Schema::SimpleType::TypeList ) {
- const QString listType = mTypeMapper.type( type->listTypeName() );
+ const TQString listType = mTypeMapper.type( type->listTypeName() );
- mSerializer.addInclude( "qstringlist.h" );
+ mSerializer.addInclude( "tqstringlist.h" );
marshalCode += "if ( value->entries() ) {";
marshalCode.indent();
- marshalCode += "QStringList list;";
- marshalCode += "QPtrList<" + listType + ">* entries = value->entries();";
- marshalCode += "QPtrListIterator<" + listType + "> it( *entries );";
+ marshalCode += "TQStringList list;";
+ marshalCode += "TQPtrList<" + listType + ">* entries = value->entries();";
+ marshalCode += "TQPtrListIterator<" + listType + "> it( *entries );";
marshalCode += "while ( it.current() != 0 ) {";
marshalCode.indent();
marshalCode += "list.append( Serializer::marshalValue( it.current() ) );";
@@ -351,18 +351,18 @@ void Converter::createSimpleTypeSerializer( const Schema::SimpleType *type )
marshalCode.unindent();
marshalCode += "}";
marshalCode.newLine();
- marshalCode += "QDomElement element = doc.createElement( name );";
+ marshalCode += "TQDomElement element = doc.createElement( name );";
marshalCode += "parent.appendChild( element );";
marshalCode += "element.appendChild( doc.createTextNode( list.join( \" \" ) ) );";
marshalCode.unindent();
marshalCode += "}";
- demarshalCode += "const QStringList list = QStringList::split( \" \", parent.text(), false );";
+ demarshalCode += "const TQStringList list = TQStringList::split( \" \", parent.text(), false );";
demarshalCode += "if ( !list.isEmpty() ) {";
demarshalCode.indent();
- demarshalCode += "QPtrList<" + listType + ">* entries = new QPtrList<" + listType + ">;";
+ demarshalCode += "TQPtrList<" + listType + ">* entries = new TQPtrList<" + listType + ">;";
demarshalCode += "entries->setAutoDelete( true );";
- demarshalCode += "QStringList::ConstIterator it;";
+ demarshalCode += "TQStringList::ConstIterator it;";
demarshalCode += "for ( it = list.begin(); it != list.end(); ++it ) {";
demarshalCode.indent();
demarshalCode += listType + " *entry = new " + listType + ";";
@@ -391,7 +391,7 @@ void Converter::convertComplexType( const Schema::ComplexType *type )
KODE::Code ctorCode, dtorCode;
if ( type->baseType() != Schema::XSDType::ANYTYPE && !type->isArray() ) {
- QString baseName = mTypeMapper.type( type->baseTypeName() );
+ TQString baseName = mTypeMapper.type( type->baseTypeName() );
newClass.addBaseClass( KODE::Class( baseName ) );
newClass.addHeaderIncludes( mTypeMapper.header( type->baseTypeName() ) );
}
@@ -403,10 +403,10 @@ void Converter::convertComplexType( const Schema::ComplexType *type )
Schema::Element::List elements = type->elements();
Schema::Element::List::ConstIterator elemIt;
for ( elemIt = elements.begin(); elemIt != elements.end(); ++elemIt ) {
- QString typeName = mTypeMapper.type( &*elemIt );
+ TQString typeName = mTypeMapper.type( &*elemIt );
if ( (*elemIt).maxOccurs() > 1 )
- typeName = "QPtrList<" + typeName + ">";
+ typeName = "TQPtrList<" + typeName + ">";
// member variables
KODE::MemberVariable variable( (*elemIt).name(), typeName + "*" );
@@ -416,8 +416,8 @@ void Converter::convertComplexType( const Schema::ComplexType *type )
dtorCode += "delete " + variable.name() + ";";
dtorCode += variable.name() + " = 0;";
- QString upperName = (*elemIt).name();
- QString lowerName = (*elemIt).name();
+ TQString upperName = (*elemIt).name();
+ TQString lowerName = (*elemIt).name();
upperName[ 0 ] = upperName[ 0 ].upper();
lowerName[ 0 ] = lowerName[ 0 ].lower();
@@ -435,8 +435,8 @@ void Converter::convertComplexType( const Schema::ComplexType *type )
newClass.addFunction( getter );
// include header
- QMap<QString, QString> headerDec = mTypeMapper.headerDec( &*elemIt);
- QMap<QString, QString>::ConstIterator it;
+ TQMap<TQString, TQString> headerDec = mTypeMapper.headerDec( &*elemIt);
+ TQMap<TQString, TQString>::ConstIterator it;
for ( it = headerDec.begin(); it != headerDec.end(); ++it ) {
if ( !it.key().isEmpty() )
newClass.addInclude( it.key(), it.data() );
@@ -450,7 +450,7 @@ void Converter::convertComplexType( const Schema::ComplexType *type )
Schema::Attribute::List attributes = type->attributes();
Schema::Attribute::List::ConstIterator attrIt;
for ( attrIt = attributes.begin(); attrIt != attributes.end(); ++attrIt ) {
- const QString typeName = mTypeMapper.type( &*attrIt );
+ const TQString typeName = mTypeMapper.type( &*attrIt );
// member variables
KODE::MemberVariable variable( (*attrIt).name(), typeName + "*" );
@@ -460,8 +460,8 @@ void Converter::convertComplexType( const Schema::ComplexType *type )
dtorCode += "delete " + variable.name() + ";";
dtorCode += variable.name() + " = 0;";
- QString upperName = (*attrIt).name();
- QString lowerName = (*attrIt).name();
+ TQString upperName = (*attrIt).name();
+ TQString lowerName = (*attrIt).name();
upperName[ 0 ] = upperName[ 0 ].upper();
lowerName[ 0 ] = lowerName[ 0 ].lower();
@@ -479,8 +479,8 @@ void Converter::convertComplexType( const Schema::ComplexType *type )
newClass.addFunction( getter );
// include header
- QMap<QString, QString> headerDec = mTypeMapper.headerDec( &*attrIt);
- QMap<QString, QString>::ConstIterator it;
+ TQMap<TQString, TQString> headerDec = mTypeMapper.headerDec( &*attrIt);
+ TQMap<TQString, TQString>::ConstIterator it;
for ( it = headerDec.begin(); it != headerDec.end(); ++it ) {
if ( !it.key().isEmpty() )
newClass.addInclude( it.key(), it.data() );
@@ -506,25 +506,25 @@ void Converter::convertComplexType( const Schema::ComplexType *type )
void Converter::createComplexTypeSerializer( const Schema::ComplexType *type )
{
- const QString typeName = mTypeMapper.type( type );
+ const TQString typeName = mTypeMapper.type( type );
KODE::Function marshal( "marshal", "void" );
marshal.setStatic( true );
- marshal.addArgument( "QDomDocument &doc" );
- marshal.addArgument( "QDomElement &parent" );
- marshal.addArgument( "const QString &name" );
+ marshal.addArgument( "TQDomDocument &doc" );
+ marshal.addArgument( "TQDomElement &parent" );
+ marshal.addArgument( "const TQString &name" );
marshal.addArgument( "const " + typeName + "* value" );
KODE::Function demarshal( "demarshal", "void" );
demarshal.setStatic( true );
- demarshal.addArgument( "const QDomElement &parent" );
+ demarshal.addArgument( "const TQDomElement &parent" );
demarshal.addArgument( typeName + "* value" );
KODE::Code marshalCode, demarshalCode, demarshalFinalCode;
// include header
- QMap<QString, QString> headerDec = mTypeMapper.headerDec( type->name() );
- QMap<QString, QString>::ConstIterator it;
+ TQMap<TQString, TQString> headerDec = mTypeMapper.headerDec( type->name() );
+ TQMap<TQString, TQString>::ConstIterator it;
for ( it = headerDec.begin(); it != headerDec.end(); ++it ) {
if ( !it.key().isEmpty() )
mSerializer.addInclude( it.key(), it.data() );
@@ -533,14 +533,14 @@ void Converter::createComplexTypeSerializer( const Schema::ComplexType *type )
mSerializer.addHeaderInclude( it.key() );
}
- marshalCode += "QDomElement root = doc.createElement( name );";
+ marshalCode += "TQDomElement root = doc.createElement( name );";
marshalCode += "root.setAttribute( \"xsi:type\", \"ns1:" + typeName + "\" );";
marshalCode += "parent.appendChild( root );";
- demarshalCode += "QDomNode node = parent.firstChild();";
+ demarshalCode += "TQDomNode node = parent.firstChild();";
demarshalCode += "while ( !node.isNull() ) {";
demarshalCode.indent();
- demarshalCode += "QDomElement element = node.toElement();";
+ demarshalCode += "TQDomElement element = node.toElement();";
demarshalCode += "if ( !element.isNull() ) {";
demarshalCode.indent();
@@ -548,10 +548,10 @@ void Converter::createComplexTypeSerializer( const Schema::ComplexType *type )
Schema::Element::List elements = type->elements();
Schema::Element::List::ConstIterator elemIt;
for ( elemIt = elements.begin(); elemIt != elements.end(); ++elemIt ) {
- const QString typeName = mTypeMapper.type( &*elemIt );
+ const TQString typeName = mTypeMapper.type( &*elemIt );
- QString upperName = (*elemIt).name();
- QString lowerName = (*elemIt).name();
+ TQString upperName = (*elemIt).name();
+ TQString lowerName = (*elemIt).name();
upperName[ 0 ] = upperName[ 0 ].upper();
lowerName[ 0 ] = lowerName[ 0 ].lower();
@@ -561,16 +561,16 @@ void Converter::createComplexTypeSerializer( const Schema::ComplexType *type )
if ( (*elemIt).maxOccurs() > 1 ) {
marshalCode += "if ( value->" + mNameMapper.escape( lowerName ) + "() ) {";
marshalCode.indent();
- marshalCode += "const QPtrList<" + typeName + ">* list = value->" + mNameMapper.escape( lowerName ) + "();";
+ marshalCode += "const TQPtrList<" + typeName + ">* list = value->" + mNameMapper.escape( lowerName ) + "();";
marshalCode.newLine();
- marshalCode += "QDomElement element = doc.createElement( name );";
+ marshalCode += "TQDomElement element = doc.createElement( name );";
// no idea about the namespaces here...
marshalCode += "element.setAttribute( \"xmlns:ns1\", \"http://schemas.xmlsoap.org/soap/encoding/\" );";
marshalCode += "element.setAttribute( \"xsi:type\", \"ns1:Array\" );";
- marshalCode += "element.setAttribute( \"ns1:arrayType\", \"ns1:" + typeName + "[\" + QString::number( list->count() ) + \"]\" );";
+ marshalCode += "element.setAttribute( \"ns1:arrayType\", \"ns1:" + typeName + "[\" + TQString::number( list->count() ) + \"]\" );";
marshalCode += "parent.appendChild( element );";
marshalCode.newLine();
- marshalCode += "QPtrListIterator<" + typeName + "> it( *list );";
+ marshalCode += "TQPtrListIterator<" + typeName + "> it( *list );";
marshalCode += "while ( it.current() != 0 ) {";
marshalCode.indent();
marshalCode += "Serializer::marshal( doc, element, \"item\", it.current() );";
@@ -580,10 +580,10 @@ void Converter::createComplexTypeSerializer( const Schema::ComplexType *type )
marshalCode.unindent();
marshalCode += "}";
- const QString listName = mNameMapper.escape( lowerName ) + "List";
+ const TQString listName = mNameMapper.escape( lowerName ) + "List";
// TODO: prepend the code somehow
KODE::Code code;
- code += "QPtrList<" + typeName + ">* " + listName + " = new QPtrList<" + typeName + ">();";
+ code += "TQPtrList<" + typeName + ">* " + listName + " = new TQPtrList<" + typeName + ">();";
code += listName + "->setAutoDelete( true );";
code += demarshalCode;
demarshalCode = code;
@@ -617,10 +617,10 @@ void Converter::createComplexTypeSerializer( const Schema::ComplexType *type )
Schema::Attribute::List attributes = type->attributes();
Schema::Attribute::List::ConstIterator attrIt;
for ( attrIt = attributes.begin(); attrIt != attributes.end(); ++attrIt ) {
- const QString typeName = mTypeMapper.type( &*attrIt );
+ const TQString typeName = mTypeMapper.type( &*attrIt );
- QString upperName = (*attrIt).name();
- QString lowerName = (*attrIt).name();
+ TQString upperName = (*attrIt).name();
+ TQString lowerName = (*attrIt).name();
upperName[ 0 ] = upperName[ 0 ].upper();
lowerName[ 0 ] = lowerName[ 0 ].lower();
@@ -661,8 +661,8 @@ void Converter::convertService( const Service &service )
{
KODE::Class newClass( service.name() );
newClass.addBaseClass( mQObject );
- newClass.addHeaderInclude( "qobject.h" );
- newClass.addHeaderInclude( "qstring.h" );
+ newClass.addHeaderInclude( "tqobject.h" );
+ newClass.addHeaderInclude( "tqstring.h" );
newClass.addHeaderInclude( "transport.h" );
newClass.addInclude( "serializer.h" );
@@ -689,9 +689,9 @@ void Converter::convertService( const Service &service )
KODE::MemberVariable transport( inputMessage.name() + "Transport", "Transport" );
ctorCode += transport.name() + " = new Transport( \"" + (*it).mLocation + "\" );";
- ctorCode += "connect( " + transport.name() + ", SIGNAL( result( const QString& ) ),";
+ ctorCode += "connect( " + transport.name() + ", TQT_SIGNAL( result( const TQString& ) ),";
ctorCode.indent();
- ctorCode += "this, SLOT( " + outputMessage.name() + "Slot( const QString& ) ) );";
+ ctorCode += "this, TQT_SLOT( " + outputMessage.name() + "Slot( const TQString& ) ) );";
ctorCode.unindent();
dtorCode += "delete " + transport.name() + ";";
@@ -714,7 +714,7 @@ void Converter::convertInputMessage( const Port &port, const Message &message, K
newClass.addMemberVariable( transport );
// call
- QString messageName = message.name();
+ TQString messageName = message.name();
messageName[ 0 ] = messageName[ 0 ].lower();
KODE::Function callFunc( mNameMapper.escape( messageName ), "void", KODE::Function::Public );
@@ -722,30 +722,30 @@ void Converter::convertInputMessage( const Port &port, const Message &message, K
Message::Part::List::ConstIterator it;
for ( it = parts.begin(); it != parts.end(); ++it ) {
newClass.addHeaderIncludes( mTypeMapper.header( (*it).type() ) );
- QString lowerName = (*it).name();
+ TQString lowerName = (*it).name();
lowerName[ 0 ] = lowerName[ 0 ].lower();
callFunc.addArgument( mTypeMapper.argument( mNameMapper.escape( lowerName ), (*it).type() ) );
}
KODE::Code code;
- code += "QDomDocument doc( \"kwsdl\" );";
+ code += "TQDomDocument doc( \"kwsdl\" );";
code += "doc.appendChild( doc.createProcessingInstruction( \"xml\", \"version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"\" ) );";
- code += "QDomElement env = doc.createElement( \"SOAP-ENV:Envelope\" );";
+ code += "TQDomElement env = doc.createElement( \"SOAP-ENV:Envelope\" );";
code += "env.setAttribute( \"xmlns:SOAP-ENV\", \"http://schemas.xmlsoap.org/soap/envelope/\" );";
code += "env.setAttribute( \"xmlns:xsi\", \"http://www.w3.org/1999/XMLSchema-instance\" );";
code += "env.setAttribute( \"xmlns:xsd\", \"http://www.w3.org/1999/XMLSchema\" );";
code += "doc.appendChild( env );";
- code += "QDomElement body = doc.createElement( \"SOAP-ENV:Body\" );";
+ code += "TQDomElement body = doc.createElement( \"SOAP-ENV:Body\" );";
code += "env.appendChild( body );";
- code += "QDomElement method = doc.createElement( \"ns1:" + message.name() + "\" );";
- QString nameSpace = mWSDL.findBindingOperation( port.name(), message.name() ).input().nameSpace();
+ code += "TQDomElement method = doc.createElement( \"ns1:" + message.name() + "\" );";
+ TQString nameSpace = mWSDL.findBindingOperation( port.name(), message.name() ).input().nameSpace();
code += "method.setAttribute( \"xmlns:ns1\", \"" + nameSpace + "\" );";
code += "method.setAttribute( \"SOAP-ENV:encodingStyle\", \"http://schemas.xmlsoap.org/soap/encoding/\" );";
code += "body.appendChild( method );";
code.newLine();
for ( it = parts.begin(); it != parts.end(); ++it ) {
- QString lowerName = (*it).name();
+ TQString lowerName = (*it).name();
lowerName[ 0 ] = lowerName[ 0 ].lower();
code += "Serializer::marshal( doc, method, \"" + (*it).name() + "\", " + mNameMapper.escape( lowerName ) + " );";
code += "delete " + mNameMapper.escape( lowerName ) + ";";
@@ -763,7 +763,7 @@ void Converter::convertOutputMessage( const Port&, const Message &message, KODE:
Message::Part part = message.parts().first();
// signal
- QString messageName = message.name();
+ TQString messageName = message.name();
messageName[ 0 ] = messageName[ 0 ].lower();
KODE::Function respSignal( messageName, "void", KODE::Function::Signal );
@@ -777,7 +777,7 @@ void Converter::convertOutputMessage( const Port&, const Message &message, KODE:
const Message::Part::List parts = message.parts();
Message::Part::List::ConstIterator it;
for ( it = parts.begin(); it != parts.end(); ++it ) {
- QStringList headers = mTypeMapper.header( (*it).type() );
+ TQStringList headers = mTypeMapper.header( (*it).type() );
for ( uint i = 0; i < headers.count(); ++i )
if ( !headers[ i ].isEmpty() )
newClass.addHeaderInclude( headers[ i ] );
@@ -789,11 +789,11 @@ void Converter::convertOutputMessage( const Port&, const Message &message, KODE:
// slot
KODE::Function respSlot( messageName + "Slot", "void", KODE::Function::Slot | KODE::Function::Private );
- respSlot.addArgument( "const QString &xml" );
+ respSlot.addArgument( "const TQString &xml" );
KODE::Code code;
- code += "QDomDocument doc;";
- code += "QString errorMsg;";
+ code += "TQDomDocument doc;";
+ code += "TQString errorMsg;";
code += "int column, row;";
code.newLine();
code += "qDebug( \"%s\", xml.latin1() );";
@@ -806,9 +806,9 @@ void Converter::convertOutputMessage( const Port&, const Message &message, KODE:
code += "}";
code.newLine();
code += mTypeMapper.type( part.type() ) + "* value = new " + mTypeMapper.type( part.type() ) + ";";
- code += "QDomElement envelope = doc.documentElement();";
- code += "QDomElement body = envelope.firstChild().toElement();";
- code += "QDomElement method = body.firstChild().toElement();";
+ code += "TQDomElement envelope = doc.documentElement();";
+ code += "TQDomElement body = envelope.firstChild().toElement();";
+ code += "TQDomElement method = body.firstChild().toElement();";
code += "Serializer::demarshal( method.firstChild().toElement(), value );";
code.newLine();
code += "emit " + respSignal.name() + "( value );";
@@ -820,18 +820,18 @@ void Converter::convertOutputMessage( const Port&, const Message &message, KODE:
void Converter::createUtilClasses()
{
mSerializer = KODE::Class( "Serializer" );
- mSerializer.addHeaderInclude( "qcstring.h" );
- mSerializer.addHeaderInclude( "qdom.h" );
- mSerializer.addHeaderInclude( "qdatetime.h" );
- mSerializer.addHeaderInclude( "qstring.h" );
- mSerializer.addHeaderInclude( "qptrlist.h" );
+ mSerializer.addHeaderInclude( "tqcstring.h" );
+ mSerializer.addHeaderInclude( "tqdom.h" );
+ mSerializer.addHeaderInclude( "tqdatetime.h" );
+ mSerializer.addHeaderInclude( "tqstring.h" );
+ mSerializer.addHeaderInclude( "tqptrlist.h" );
mSerializer.addInclude( "kmdcodec.h" );
typedef struct {
- QString type;
- QString xsdType;
- QString marshalCode;
- QString demarshalCode;
+ TQString type;
+ TQString xsdType;
+ TQString marshalCode;
+ TQString demarshalCode;
} TypeEntry;
/**
@@ -839,18 +839,18 @@ void Converter::createUtilClasses()
of typing and is easier to maintain at the end ;)
*/
TypeEntry types[] = {
- { "QString", "xsd:string", "*value", "str" },
+ { "TQString", "xsd:string", "*value", "str" },
{ "bool", "xsd:boolean", "(*value ? \"true\" : \"false\")", "(str.lower() == \"true\" ? true : false)" },
- { "float", "xsd:TODO", "QString::number( *value )", "str.toFloat()" },
- { "int", "xsd:int", "QString::number( *value )", "str.toInt()" },
- { "unsigned int", "xsd:unsignedByte", "QString::number( *value )", "str.toUInt()" },
- { "double", "xsd:double", "QString::number( *value )", "str.toDouble()" },
- { "char", "xsd:byte", "QString( QChar( *value ) )", "str[ 0 ].latin1()" },
- { "unsigned char", "xsd:unsignedByte", "QString( QChar( *value ) )", "str[ 0 ].latin1()" },
- { "short", "xsd:short", "QString::number( *value )", "str.toShort()" },
- { "QByteArray", "xsd:base64Binary", "QString::fromUtf8( KCodecs::base64Encode( *value ) )", "KCodecs::base64Decode( str.utf8() )" },
- { "QDateTime", "xsd:dateTime", "value->toString( Qt::ISODate )", "QDateTime::fromString( str, Qt::ISODate )" },
- { "QDate", "xsd:date", "value->toString( Qt::ISODate )", "QDate::fromString( str, Qt::ISODate )" }
+ { "float", "xsd:TODO", "TQString::number( *value )", "str.toFloat()" },
+ { "int", "xsd:int", "TQString::number( *value )", "str.toInt()" },
+ { "unsigned int", "xsd:unsignedByte", "TQString::number( *value )", "str.toUInt()" },
+ { "double", "xsd:double", "TQString::number( *value )", "str.toDouble()" },
+ { "char", "xsd:byte", "TQString( TQChar( *value ) )", "str[ 0 ].latin1()" },
+ { "unsigned char", "xsd:unsignedByte", "TQString( TQChar( *value ) )", "str[ 0 ].latin1()" },
+ { "short", "xsd:short", "TQString::number( *value )", "str.toShort()" },
+ { "TQByteArray", "xsd:base64Binary", "TQString::fromUtf8( KCodecs::base64Encode( *value ) )", "KCodecs::base64Decode( str.utf8() )" },
+ { "TQDateTime", "xsd:dateTime", "value->toString( Qt::ISODate )", "TQDateTime::fromString( str, Qt::ISODate )" },
+ { "TQDate", "xsd:date", "value->toString( Qt::ISODate )", "TQDate::fromString( str, Qt::ISODate )" }
};
for ( uint i = 0; i < sizeof( types ) / sizeof( TypeEntry ); ++i ) {
@@ -859,7 +859,7 @@ void Converter::createUtilClasses()
TypeEntry entry = types[ i ];
- marshal = KODE::Function( "marshalValue", "QString" );
+ marshal = KODE::Function( "marshalValue", "TQString" );
marshal.setStatic( true );
marshal.addArgument( "const " + entry.type + "* value" );
@@ -870,7 +870,7 @@ void Converter::createUtilClasses()
demarshal = KODE::Function( "demarshalValue", "void" );
demarshal.setStatic( true );
- demarshal.addArgument( "const QString &str" );
+ demarshal.addArgument( "const TQString &str" );
demarshal.addArgument( entry.type + " *value" );
demarshal.setBody( "*value = " + entry.demarshalCode + ";" );
@@ -878,13 +878,13 @@ void Converter::createUtilClasses()
marshal = KODE::Function( "marshal", "void" );
marshal.setStatic( true );
- marshal.addArgument( "QDomDocument &doc" );
- marshal.addArgument( "QDomElement &parent" );
- marshal.addArgument( "const QString &name" );
+ marshal.addArgument( "TQDomDocument &doc" );
+ marshal.addArgument( "TQDomElement &parent" );
+ marshal.addArgument( "const TQString &name" );
marshal.addArgument( "const " + entry.type + "* value" );
code.clear();
- code += "QDomElement element = doc.createElement( name );";
+ code += "TQDomElement element = doc.createElement( name );";
code += "element.setAttribute( \"xsi:type\", \"" + entry.xsdType + "\" );";
code += "element.appendChild( doc.createTextNode( Serializer::marshalValue( value ) ) );";
code += "parent.appendChild( element );";
@@ -894,7 +894,7 @@ void Converter::createUtilClasses()
demarshal = KODE::Function( "demarshal", "void" );
demarshal.setStatic( true );
- demarshal.addArgument( "const QDomElement &element" );
+ demarshal.addArgument( "const TQDomElement &element" );
demarshal.addArgument( entry.type + "* value" );
demarshal.setBody( "Serializer::demarshalValue( element.text(), value );" );
@@ -906,33 +906,33 @@ void Converter::createTransportClass()
{
KODE::Class transport( "Transport" );
transport.addBaseClass( mQObject );
- transport.addHeaderInclude( "qobject.h" );
+ transport.addHeaderInclude( "tqobject.h" );
transport.addHeaderInclude( "kio/job.h" );
transport.addInclude( "kdebug.h" );
- KODE::MemberVariable url( "url", "QString" );
+ KODE::MemberVariable url( "url", "TQString" );
transport.addMemberVariable( url );
- KODE::MemberVariable slotDataVar( "data", "QByteArray" );
+ KODE::MemberVariable slotDataVar( "data", "TQByteArray" );
transport.addMemberVariable( slotDataVar );
// ctor
KODE::Function ctor( "Transport" );
- ctor.addArgument( "const QString &url" );
+ ctor.addArgument( "const TQString &url" );
ctor.setBody( url.name() + " = url;" );
transport.addFunction( ctor );
// query
KODE::Function query( "query", "void" );
- query.addArgument( "const QString &xml" );
+ query.addArgument( "const TQString &xml" );
KODE::Code queryCode;
queryCode += slotDataVar.name() + ".truncate( 0 );";
queryCode.newLine();
- queryCode += "QByteArray postData;";
- queryCode += "QDataStream stream( postData, IO_WriteOnly );";
+ queryCode += "TQByteArray postData;";
+ queryCode += "TQDataStream stream( postData, IO_WriteOnly );";
queryCode += "stream.writeRawBytes( xml.utf8(), xml.utf8().length() );";
queryCode.newLine();
queryCode += "KIO::TransferJob* job = KIO::http_post( KURL( " + url.name() + " ), postData, false );";
@@ -946,8 +946,8 @@ void Converter::createTransportClass()
queryCode += "job->addMetaData( \"UserAgent\", \"KWSDL\" );";
queryCode += "job->addMetaData( \"content-type\", \"Content-Type: text/xml; charset=utf-8\" );";
queryCode.newLine();
- queryCode += "connect( job, SIGNAL( data( KIO::Job*, const QByteArray& ) ), this, SLOT( slotData( KIO::Job*, const QByteArray& ) ) );";
- queryCode += "connect( job, SIGNAL( result( KIO::Job* ) ), this, SLOT( slotResult( KIO::Job* ) ) );";
+ queryCode += "connect( job, TQT_SIGNAL( data( KIO::Job*, const TQByteArray& ) ), this, TQT_SLOT( slotData( KIO::Job*, const TQByteArray& ) ) );";
+ queryCode += "connect( job, TQT_SIGNAL( result( KIO::Job* ) ), this, TQT_SLOT( slotResult( KIO::Job* ) ) );";
query.setBody( queryCode );
@@ -955,7 +955,7 @@ void Converter::createTransportClass()
// signal
KODE::Function result( "result", "void", KODE::Function::Signal );
- result.addArgument( "const QString &xml" );
+ result.addArgument( "const TQString &xml" );
transport.addFunction( result );
@@ -963,7 +963,7 @@ void Converter::createTransportClass()
KODE::Function slotData( "slotData", "void", KODE::Function::Private | KODE::Function::Slot );
slotData.addArgument( "KIO::Job*" );
- slotData.addArgument( "const QByteArray &data" );
+ slotData.addArgument( "const TQByteArray &data" );
KODE::Code slotDataCode;
slotDataCode += "unsigned int oldSize = " + slotDataVar.name() + ".size();";
@@ -988,7 +988,7 @@ void Converter::createTransportClass()
slotResultCode += "}";
slotResultCode.newLine();
- slotResultCode += "emit result( QString::fromUtf8( " + slotDataVar.name() + ".data(), " + slotDataVar.name() + ".size() ) );";
+ slotResultCode += "emit result( TQString::fromUtf8( " + slotDataVar.name() + ".data(), " + slotDataVar.name() + ".size() ) );";
slotResult.setBody( slotResultCode );
diff --git a/kode/kwsdl/creator.cpp b/kode/kwsdl/creator.cpp
index 53e82937e..32e7eb4b5 100644
--- a/kode/kwsdl/creator.cpp
+++ b/kode/kwsdl/creator.cpp
@@ -36,7 +36,7 @@ void Creator::create( const KODE::Class::List &list )
KODE::Printer printer;
printer.setOutputDirectory( mOutputDirectory );
- QStringList cppFiles;
+ TQStringList cppFiles;
KODE::Class::List::ConstIterator it;
for ( it = list.begin(); it != list.end(); ++it ) {
diff --git a/kode/kwsdl/creator.h b/kode/kwsdl/creator.h
index 465c3302a..776b592df 100644
--- a/kode/kwsdl/creator.h
+++ b/kode/kwsdl/creator.h
@@ -31,17 +31,17 @@ class Creator
public:
Creator();
- void setOutputDirectory( const QString &outputDirectory ) { mOutputDirectory = outputDirectory; }
- QString outputDirectory() const { return mOutputDirectory; }
+ void setOutputDirectory( const TQString &outputDirectory ) { mOutputDirectory = outputDirectory; }
+ TQString outputDirectory() const { return mOutputDirectory; }
- void setNameSpace( const QString &nameSpace ) { mNameSpace = nameSpace; }
- QString nameSpace() const { return mNameSpace; }
+ void setNameSpace( const TQString &nameSpace ) { mNameSpace = nameSpace; }
+ TQString nameSpace() const { return mNameSpace; }
void create( const KODE::Class::List &list );
private:
- QString mOutputDirectory;
- QString mNameSpace;
+ TQString mOutputDirectory;
+ TQString mNameSpace;
};
}
diff --git a/kode/kwsdl/kung/binaryinputfield.cpp b/kode/kwsdl/kung/binaryinputfield.cpp
index f83e55b1f..56643b3d2 100644
--- a/kode/kwsdl/kung/binaryinputfield.cpp
+++ b/kode/kwsdl/kung/binaryinputfield.cpp
@@ -29,23 +29,23 @@
#include <kparts/componentfactory.h>
#include <ktempfile.h>
-#include <qfile.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qpushbutton.h>
-#include <qwidget.h>
+#include <tqfile.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqpushbutton.h>
+#include <tqwidget.h>
#include <schema/simpletype.h>
#include "binaryinputfield.h"
-BinaryInputField::BinaryInputField( const QString &name, const QString &typeName, const Schema::SimpleType *type )
+BinaryInputField::BinaryInputField( const TQString &name, const TQString &typeName, const Schema::SimpleType *type )
: SimpleInputField( name, type ),
mValue( 0 ), mTypeName( typeName )
{
}
-void BinaryInputField::setXMLData( const QDomElement &element )
+void BinaryInputField::setXMLData( const TQDomElement &element )
{
if ( mName != element.tagName() ) {
qDebug( "BinaryInputField: Wrong dom element passed: expected %s, got %s", mName.latin1(), element.tagName().latin1() );
@@ -55,28 +55,28 @@ void BinaryInputField::setXMLData( const QDomElement &element )
setData( element.text() );
}
-void BinaryInputField::xmlData( QDomDocument &document, QDomElement &parent )
+void BinaryInputField::xmlData( TQDomDocument &document, TQDomElement &parent )
{
- QDomElement element = document.createElement( mName );
+ TQDomElement element = document.createElement( mName );
element.setAttribute( "xsi:type", "xsd:" + mTypeName );
- QDomText text = document.createTextNode( data() );
+ TQDomText text = document.createTextNode( data() );
element.appendChild( text );
parent.appendChild( element );
}
-void BinaryInputField::setData( const QString &data )
+void BinaryInputField::setData( const TQString &data )
{
KCodecs::base64Decode( data.utf8(), mValue );
}
-QString BinaryInputField::data() const
+TQString BinaryInputField::data() const
{
- QByteArray data = KCodecs::base64Encode( mValue, false );
- return QString::fromUtf8( data.data(), data.size() );
+ TQByteArray data = KCodecs::base64Encode( mValue, false );
+ return TQString::fromUtf8( data.data(), data.size() );
}
-QWidget *BinaryInputField::createWidget( QWidget *parent )
+TQWidget *BinaryInputField::createWidget( TQWidget *parent )
{
mInputWidget = new BinaryWidget( parent );
@@ -86,7 +86,7 @@ QWidget *BinaryInputField::createWidget( QWidget *parent )
return mInputWidget;
}
-void BinaryInputField::valueChanged( const QByteArray &value )
+void BinaryInputField::valueChanged( const TQByteArray &value )
{
mValue = value;
@@ -94,27 +94,27 @@ void BinaryInputField::valueChanged( const QByteArray &value )
}
-BinaryWidget::BinaryWidget( QWidget *parent )
- : QWidget( parent, "BinaryWidget" ),
+BinaryWidget::BinaryWidget( TQWidget *parent )
+ : TQWidget( parent, "BinaryWidget" ),
mMainWidget( 0 )
{
- mLayout = new QGridLayout( this, 3, 2, 11, 6 );
+ mLayout = new TQGridLayout( this, 3, 2, 11, 6 );
- mLoadButton = new QPushButton( i18n( "Load..." ), this );
- mSaveButton = new QPushButton( i18n( "Save..." ), this );
+ mLoadButton = new TQPushButton( i18n( "Load..." ), this );
+ mSaveButton = new TQPushButton( i18n( "Save..." ), this );
mSaveButton->setEnabled( false );
mLayout->addWidget( mLoadButton, 0, 1 );
mLayout->addWidget( mSaveButton, 1, 1 );
- connect( mLoadButton, SIGNAL( clicked() ), SLOT( load() ) );
- connect( mSaveButton, SIGNAL( clicked() ), SLOT( save() ) );
+ connect( mLoadButton, TQT_SIGNAL( clicked() ), TQT_SLOT( load() ) );
+ connect( mSaveButton, TQT_SIGNAL( clicked() ), TQT_SLOT( save() ) );
}
-void BinaryWidget::setData( const QByteArray &data )
+void BinaryWidget::setData( const TQByteArray &data )
{
KMimeMagic magic;
- QString mimetype;
+ TQString mimetype;
delete mMainWidget;
@@ -123,7 +123,7 @@ void BinaryWidget::setData( const QByteArray &data )
mimetype = result->mimeType();
if ( !mimetype.isEmpty() ) {
- KParts::ReadOnlyPart *part = KParts::ComponentFactory::createPartInstanceFromQuery<KParts::ReadOnlyPart>( mimetype, QString::null, this, 0, this, 0 );
+ KParts::ReadOnlyPart *part = KParts::ComponentFactory::createPartInstanceFromQuery<KParts::ReadOnlyPart>( mimetype, TQString::null, this, 0, this, 0 );
if ( part ) {
KTempFile file;
file.file()->writeBlock( data );
@@ -131,13 +131,13 @@ void BinaryWidget::setData( const QByteArray &data )
part->openURL( KURL( file.name() ) );
mMainWidget = part->widget();
} else {
- mMainWidget = new QLabel( i18n( "No part found for visualization of mimetype %1" ).arg( mimetype ), this );
+ mMainWidget = new TQLabel( i18n( "No part found for visualization of mimetype %1" ).arg( mimetype ), this );
}
mData = data;
mSaveButton->setEnabled( true );
} else {
- mMainWidget = new QLabel( i18n( "Got data of unknown mimetype" ), this );
+ mMainWidget = new TQLabel( i18n( "Got data of unknown mimetype" ), this );
}
mLayout->addMultiCellWidget( mMainWidget, 0, 2, 0, 0 );
@@ -146,19 +146,19 @@ void BinaryWidget::setData( const QByteArray &data )
void BinaryWidget::load()
{
- KURL url = KFileDialog::getOpenURL( QString(), QString(), this );
+ KURL url = KFileDialog::getOpenURL( TQString(), TQString(), this );
if ( url.isEmpty() )
return;
- QString tempFile;
+ TQString tempFile;
if ( KIO::NetAccess::download( url, tempFile, this ) ) {
- QFile file( tempFile );
+ TQFile file( tempFile );
if ( !file.open( IO_ReadOnly ) ) {
KMessageBox::error( this, i18n( "Unable to open file %1" ).arg( url.url() ) );
return;
}
- QByteArray data = file.readAll();
+ TQByteArray data = file.readAll();
setData( data );
file.close();
@@ -171,7 +171,7 @@ void BinaryWidget::load()
void BinaryWidget::save()
{
- KURL url = KFileDialog::getSaveURL( QString(), QString(), this );
+ KURL url = KFileDialog::getSaveURL( TQString(), TQString(), this );
if ( url.isEmpty() )
return;
diff --git a/kode/kwsdl/kung/binaryinputfield.h b/kode/kwsdl/kung/binaryinputfield.h
index eeb721d5f..479828f52 100644
--- a/kode/kwsdl/kung/binaryinputfield.h
+++ b/kode/kwsdl/kung/binaryinputfield.h
@@ -22,7 +22,7 @@
#ifndef BINARY_INPUTFIELD_H
#define BINARY_INPUTFIELD_H
-#include <qwidget.h>
+#include <tqwidget.h>
#include "inputfield.h"
@@ -35,24 +35,24 @@ class BinaryInputField : public SimpleInputField
Q_OBJECT
public:
- BinaryInputField( const QString &name, const QString &typeName, const Schema::SimpleType *type );
+ BinaryInputField( const TQString &name, const TQString &typeName, const Schema::SimpleType *type );
- virtual void setXMLData( const QDomElement &element );
- virtual void xmlData( QDomDocument &document, QDomElement &parent );
+ virtual void setXMLData( const TQDomElement &element );
+ virtual void xmlData( TQDomDocument &document, TQDomElement &parent );
- virtual void setData( const QString &data );
- virtual QString data() const;
+ virtual void setData( const TQString &data );
+ virtual TQString data() const;
- virtual QWidget *createWidget( QWidget *parent );
+ virtual TQWidget *createWidget( TQWidget *parent );
private slots:
- void valueChanged( const QByteArray &value );
+ void valueChanged( const TQByteArray &value );
private:
BinaryWidget *mInputWidget;
- QByteArray mValue;
- QString mTypeName;
+ TQByteArray mValue;
+ TQString mTypeName;
};
class BinaryWidget : public QWidget
@@ -60,24 +60,24 @@ class BinaryWidget : public QWidget
Q_OBJECT
public:
- BinaryWidget( QWidget *parent );
+ BinaryWidget( TQWidget *parent );
- void setData( const QByteArray &data );
+ void setData( const TQByteArray &data );
signals:
- void valueChanged( const QByteArray &data );
+ void valueChanged( const TQByteArray &data );
private slots:
void load();
void save();
private:
- QByteArray mData;
+ TQByteArray mData;
- QGridLayout *mLayout;
- QPushButton *mLoadButton;
- QPushButton *mSaveButton;
- QWidget* mMainWidget;
+ TQGridLayout *mLayout;
+ TQPushButton *mLoadButton;
+ TQPushButton *mSaveButton;
+ TQWidget* mMainWidget;
};
#endif
diff --git a/kode/kwsdl/kung/boolinputfield.cpp b/kode/kwsdl/kung/boolinputfield.cpp
index 69e0e8e04..e3eb3eef1 100644
--- a/kode/kwsdl/kung/boolinputfield.cpp
+++ b/kode/kwsdl/kung/boolinputfield.cpp
@@ -19,17 +19,17 @@
Boston, MA 02110-1301, USA.
*/
-#include <qcheckbox.h>
+#include <tqcheckbox.h>
#include "boolinputfield.h"
-BoolInputField::BoolInputField( const QString &name, const Schema::SimpleType *type )
+BoolInputField::BoolInputField( const TQString &name, const Schema::SimpleType *type )
: SimpleInputField( name, type ),
mValue( false )
{
}
-void BoolInputField::setXMLData( const QDomElement &element )
+void BoolInputField::setXMLData( const TQDomElement &element )
{
if ( mName != element.tagName() ) {
qDebug( "BoolInputField: Wrong dom element passed: expected %s, got %s", mName.latin1(), element.tagName().latin1() );
@@ -39,34 +39,34 @@ void BoolInputField::setXMLData( const QDomElement &element )
setData( element.text() );
}
-void BoolInputField::xmlData( QDomDocument &document, QDomElement &parent )
+void BoolInputField::xmlData( TQDomDocument &document, TQDomElement &parent )
{
- QDomElement element = document.createElement( mName );
+ TQDomElement element = document.createElement( mName );
element.setAttribute( "xsi:type", "xsd:boolean" );
- QDomText text = document.createTextNode( data() );
+ TQDomText text = document.createTextNode( data() );
element.appendChild( text );
parent.appendChild( element );
}
-void BoolInputField::setData( const QString &data )
+void BoolInputField::setData( const TQString &data )
{
mValue = ( data.lower() == "true" );
}
-QString BoolInputField::data() const
+TQString BoolInputField::data() const
{
return ( mValue ? "true" : "false" );
}
-QWidget *BoolInputField::createWidget( QWidget *parent )
+TQWidget *BoolInputField::createWidget( TQWidget *parent )
{
- mInputWidget = new QCheckBox( parent );
+ mInputWidget = new TQCheckBox( parent );
mInputWidget->setChecked( mValue );
- connect( mInputWidget, SIGNAL( toggled( bool ) ),
- this, SLOT( inputChanged( bool ) ) );
+ connect( mInputWidget, TQT_SIGNAL( toggled( bool ) ),
+ this, TQT_SLOT( inputChanged( bool ) ) );
return mInputWidget;
}
diff --git a/kode/kwsdl/kung/boolinputfield.h b/kode/kwsdl/kung/boolinputfield.h
index 1ba5347b8..f5cd9cf22 100644
--- a/kode/kwsdl/kung/boolinputfield.h
+++ b/kode/kwsdl/kung/boolinputfield.h
@@ -22,7 +22,7 @@
#ifndef BOOL_INPUTFIELD_H
#define BOOL_INPUTFIELD_H
-#include <qobject.h>
+#include <tqobject.h>
#include "inputfield.h"
@@ -33,21 +33,21 @@ class BoolInputField : public SimpleInputField
Q_OBJECT
public:
- BoolInputField( const QString &name, const Schema::SimpleType *type );
+ BoolInputField( const TQString &name, const Schema::SimpleType *type );
- virtual void setXMLData( const QDomElement &element );
- virtual void xmlData( QDomDocument &document, QDomElement &parent );
+ virtual void setXMLData( const TQDomElement &element );
+ virtual void xmlData( TQDomDocument &document, TQDomElement &parent );
- virtual void setData( const QString &data );
- virtual QString data() const;
+ virtual void setData( const TQString &data );
+ virtual TQString data() const;
- virtual QWidget *createWidget( QWidget *parent );
+ virtual TQWidget *createWidget( TQWidget *parent );
private slots:
void inputChanged( bool );
private:
- QCheckBox *mInputWidget;
+ TQCheckBox *mInputWidget;
bool mValue;
};
diff --git a/kode/kwsdl/kung/complexbaseinputfield.cpp b/kode/kwsdl/kung/complexbaseinputfield.cpp
index 26434940a..80f755817 100644
--- a/kode/kwsdl/kung/complexbaseinputfield.cpp
+++ b/kode/kwsdl/kung/complexbaseinputfield.cpp
@@ -19,9 +19,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 <schema/complextype.h>
@@ -29,7 +29,7 @@
#include "complexbaseinputfield.h"
-ComplexBaseInputField::ComplexBaseInputField( const QString &name, const Schema::ComplexType *type )
+ComplexBaseInputField::ComplexBaseInputField( const TQString &name, const Schema::ComplexType *type )
: ComplexInputField( name, type )
{
Schema::Element::List elements = type->elements();
@@ -56,7 +56,7 @@ ComplexBaseInputField::ComplexBaseInputField( const QString &name, const Schema:
}
}
-void ComplexBaseInputField::setXMLData( const QDomElement &element )
+void ComplexBaseInputField::setXMLData( const TQDomElement &element )
{
if ( mName != element.tagName() ) {
qDebug( "ComplexBaseInputField: Wrong dom element passed: expected %s, got %s", mName.latin1(), element.tagName().latin1() );
@@ -68,9 +68,9 @@ void ComplexBaseInputField::setXMLData( const QDomElement &element )
InputField *field = childField( "item" );
field->setXMLData( element );
} else {
- QDomNode node = element.firstChild();
+ TQDomNode node = element.firstChild();
while ( !node.isNull() ) {
- QDomElement child = node.toElement();
+ TQDomElement child = node.toElement();
if ( !child.isNull() ) {
InputField *field = childField( child.tagName() );
if ( !field ) {
@@ -85,10 +85,10 @@ void ComplexBaseInputField::setXMLData( const QDomElement &element )
}
// attributes
- QDomNamedNodeMap nodes = element.attributes();
+ TQDomNamedNodeMap nodes = element.attributes();
for ( uint i = 0; i < nodes.count(); ++i ) {
- QDomNode node = nodes.item( i );
- QDomAttr attr = node.toAttr();
+ TQDomNode node = nodes.item( i );
+ TQDomAttr attr = node.toAttr();
InputField *field = childField( attr.name() );
if ( !field ) {
@@ -99,9 +99,9 @@ void ComplexBaseInputField::setXMLData( const QDomElement &element )
}
}
-void ComplexBaseInputField::xmlData( QDomDocument &document, QDomElement &parent )
+void ComplexBaseInputField::xmlData( TQDomDocument &document, TQDomElement &parent )
{
- QDomElement element = document.createElement( mName );
+ TQDomElement element = document.createElement( mName );
Schema::Element::List elements = mType->elements();
Schema::Element::List::ConstIterator elemIt;
@@ -128,25 +128,25 @@ void ComplexBaseInputField::xmlData( QDomDocument &document, QDomElement &parent
parent.appendChild( element );
}
-void ComplexBaseInputField::setData( const QString& )
+void ComplexBaseInputField::setData( const TQString& )
{
}
-QString ComplexBaseInputField::data() const
+TQString ComplexBaseInputField::data() const
{
- return QString();
+ return TQString();
}
-QWidget *ComplexBaseInputField::createWidget( QWidget *parent )
+TQWidget *ComplexBaseInputField::createWidget( TQWidget *parent )
{
- QGroupBox *inputWidget = new QGroupBox( mName, parent );
+ TQGroupBox *inputWidget = new TQGroupBox( mName, parent );
inputWidget->setColumnLayout( 0, Qt::Horizontal );
- QGridLayout *layout = new QGridLayout( inputWidget->layout(), 2, 2, 6 );
+ TQGridLayout *layout = new TQGridLayout( inputWidget->layout(), 2, 2, 6 );
InputField::List::Iterator it;
int row = 0;
for ( it = mFields.begin(); it != mFields.end(); ++it, ++row ) {
- QLabel *label = new QLabel( (*it)->name(), inputWidget );
+ TQLabel *label = new TQLabel( (*it)->name(), inputWidget );
layout->addWidget( label, row, 0 );
layout->addWidget( (*it)->createWidget( inputWidget ), row, 1 );
}
diff --git a/kode/kwsdl/kung/complexbaseinputfield.h b/kode/kwsdl/kung/complexbaseinputfield.h
index e8d563ae2..9fc47dbc7 100644
--- a/kode/kwsdl/kung/complexbaseinputfield.h
+++ b/kode/kwsdl/kung/complexbaseinputfield.h
@@ -27,15 +27,15 @@
class ComplexBaseInputField : public ComplexInputField
{
public:
- ComplexBaseInputField( const QString &name, const Schema::ComplexType *type );
+ ComplexBaseInputField( const TQString &name, const Schema::ComplexType *type );
- virtual void setXMLData( const QDomElement &element );
- virtual void xmlData( QDomDocument &document, QDomElement &parent );
+ virtual void setXMLData( const TQDomElement &element );
+ virtual void xmlData( TQDomDocument &document, TQDomElement &parent );
- virtual void setData( const QString &data );
- virtual QString data() const;
+ virtual void setData( const TQString &data );
+ virtual TQString data() const;
- virtual QWidget *createWidget( QWidget *parent );
+ virtual TQWidget *createWidget( TQWidget *parent );
};
#endif
diff --git a/kode/kwsdl/kung/conversationmanager.h b/kode/kwsdl/kung/conversationmanager.h
index 6ef403c7b..74932376f 100644
--- a/kode/kwsdl/kung/conversationmanager.h
+++ b/kode/kwsdl/kung/conversationmanager.h
@@ -22,7 +22,7 @@
#ifndef CONVERSATIONMANAGER_H
#define CONVERSATIONMANAGER_H
-#include <qstringlist.h>
+#include <tqstringlist.h>
class ConversationManager
{
@@ -31,7 +31,7 @@ class ConversationManager
Returns a list of all actions which can be called after the
current action with a special condition.
*/
- virtual QStringList nextActions( const QString &currentAction, const QString &condition = QString() ) = 0;
+ virtual TQStringList nextActions( const TQString &currentAction, const TQString &condition = TQString() ) = 0;
};
#endif
diff --git a/kode/kwsdl/kung/dateinputfield.cpp b/kode/kwsdl/kung/dateinputfield.cpp
index ff60da20f..b38d46b14 100644
--- a/kode/kwsdl/kung/dateinputfield.cpp
+++ b/kode/kwsdl/kung/dateinputfield.cpp
@@ -23,13 +23,13 @@
#include "dateinputfield.h"
-DateInputField::DateInputField( const QString &name, const Schema::SimpleType *type )
+DateInputField::DateInputField( const TQString &name, const Schema::SimpleType *type )
: SimpleInputField( name, type ),
- mValue( QDate::currentDate() )
+ mValue( TQDate::currentDate() )
{
}
-void DateInputField::setXMLData( const QDomElement &element )
+void DateInputField::setXMLData( const TQDomElement &element )
{
if ( mName != element.tagName() ) {
qDebug( "DateInputField: Wrong dom element passed: expected %s, got %s", mName.latin1(), element.tagName().latin1() );
@@ -39,39 +39,39 @@ void DateInputField::setXMLData( const QDomElement &element )
setData( element.text() );
}
-void DateInputField::xmlData( QDomDocument &document, QDomElement &parent )
+void DateInputField::xmlData( TQDomDocument &document, TQDomElement &parent )
{
- QDomElement element = document.createElement( mName );
+ TQDomElement element = document.createElement( mName );
element.setAttribute( "xsi:type", "xsd:date" );
- QDomText text = document.createTextNode( data() );
+ TQDomText text = document.createTextNode( data() );
element.appendChild( text );
parent.appendChild( element );
}
-void DateInputField::setData( const QString &data )
+void DateInputField::setData( const TQString &data )
{
- mValue = QDate::fromString( data, Qt::ISODate );
+ mValue = TQDate::fromString( data, Qt::ISODate );
}
-QString DateInputField::data() const
+TQString DateInputField::data() const
{
return mValue.toString( Qt::ISODate );
}
-QWidget *DateInputField::createWidget( QWidget *parent )
+TQWidget *DateInputField::createWidget( TQWidget *parent )
{
mInputWidget = new KDatePicker( parent );
mInputWidget->setDate( mValue );
- connect( mInputWidget, SIGNAL( dateChanged( QDate ) ),
- this, SLOT( inputChanged( QDate ) ) );
+ connect( mInputWidget, TQT_SIGNAL( dateChanged( TQDate ) ),
+ this, TQT_SLOT( inputChanged( TQDate ) ) );
return mInputWidget;
}
-void DateInputField::inputChanged( QDate date )
+void DateInputField::inputChanged( TQDate date )
{
mValue = date;
diff --git a/kode/kwsdl/kung/dateinputfield.h b/kode/kwsdl/kung/dateinputfield.h
index a42e22102..28efe5e33 100644
--- a/kode/kwsdl/kung/dateinputfield.h
+++ b/kode/kwsdl/kung/dateinputfield.h
@@ -22,8 +22,8 @@
#ifndef DATE_INPUTFIELD_H
#define DATE_INPUTFIELD_H
-#include <qdatetime.h>
-#include <qobject.h>
+#include <tqdatetime.h>
+#include <tqobject.h>
#include "inputfield.h"
@@ -34,22 +34,22 @@ class DateInputField : public SimpleInputField
Q_OBJECT
public:
- DateInputField( const QString &name, const Schema::SimpleType *type );
+ DateInputField( const TQString &name, const Schema::SimpleType *type );
- virtual void setXMLData( const QDomElement &element );
- virtual void xmlData( QDomDocument &document, QDomElement &parent );
+ virtual void setXMLData( const TQDomElement &element );
+ virtual void xmlData( TQDomDocument &document, TQDomElement &parent );
- virtual void setData( const QString &data );
- virtual QString data() const;
+ virtual void setData( const TQString &data );
+ virtual TQString data() const;
- virtual QWidget *createWidget( QWidget *parent );
+ virtual TQWidget *createWidget( TQWidget *parent );
private slots:
- void inputChanged( QDate );
+ void inputChanged( TQDate );
private:
KDatePicker *mInputWidget;
- QDate mValue;
+ TQDate mValue;
};
#endif
diff --git a/kode/kwsdl/kung/dispatcher.cpp b/kode/kwsdl/kung/dispatcher.cpp
index 79f6bd949..d337d19f3 100644
--- a/kode/kwsdl/kung/dispatcher.cpp
+++ b/kode/kwsdl/kung/dispatcher.cpp
@@ -19,9 +19,9 @@
Boston, MA 02110-1301, USA.
*/
-#include <qapplication.h>
-#include <qtimer.h>
-#include <qwidget.h>
+#include <tqapplication.h>
+#include <tqtimer.h>
+#include <tqwidget.h>
#include <kinputdialog.h>
#include <klocale.h>
@@ -37,7 +37,7 @@
#include "dispatcher.h"
Dispatcher::Dispatcher()
- : QObject( 0, "Dispatcher" ),
+ : TQObject( 0, "Dispatcher" ),
mConversationManager( 0 )
{
}
@@ -57,10 +57,10 @@ void Dispatcher::setWSDL( const KWSDL::WSDL &wsdl )
mConversationManager = new GeneralConversationManager( mWSDL );
mTransport = new Transport( mWSDL.service().ports().first().mLocation );
- connect( mTransport, SIGNAL( result( const QString& ) ),
- this, SLOT( result( const QString& ) ) );
- connect( mTransport, SIGNAL( error( const QString& ) ),
- this, SLOT( error( const QString& ) ) );
+ connect( mTransport, TQT_SIGNAL( result( const TQString& ) ),
+ this, TQT_SLOT( result( const TQString& ) ) );
+ connect( mTransport, TQT_SIGNAL( error( const TQString& ) ),
+ this, TQT_SLOT( error( const TQString& ) ) );
}
void Dispatcher::run()
@@ -75,9 +75,9 @@ void Dispatcher::nextMessage()
return;
}
- QStringList items = mConversationManager->nextActions( mLastMessage, QString() );
+ TQStringList items = mConversationManager->nextActions( mLastMessage, TQString() );
- mCurrentMessage = QString();
+ mCurrentMessage = TQString();
if ( items.count() > 1 ) {
mCurrentMessage = KInputDialog::getItem( i18n( "Select a functionality of the service:" ), i18n( "Functions" ),
items );
@@ -91,25 +91,25 @@ void Dispatcher::nextMessage()
KWSDL::Message message = mWSDL.findMessage( mCurrentMessage );
InputField *field = new PageInputField( message.name(), message );
- QWidget *page = field->createWidget( 0 );
+ TQWidget *page = field->createWidget( 0 );
InputDialog dlg( page, 0 );
if ( dlg.exec() ) {
- QDomDocument doc( "kwsdl" );
+ TQDomDocument doc( "kwsdl" );
doc.appendChild( doc.createProcessingInstruction( "xml", "version=\"1.0\" encoding=\"UTF-8\"" ) );
- QDomElement env = doc.createElement( "SOAP-ENV:Envelope" );
+ TQDomElement env = doc.createElement( "SOAP-ENV:Envelope" );
env.setAttribute( "xmlns:SOAP-ENV", "http://schemas.xmlsoap.org/soap/envelope/" );
env.setAttribute( "xmlns:xsi", "http://www.w3.org/1999/XMLSchema-instance" );
env.setAttribute( "xmlns:xsd", "http://www.w3.org/1999/XMLSchema" );
doc.appendChild( env );
- QDomElement body = doc.createElement( "SOAP-ENV:Body" );
+ TQDomElement body = doc.createElement( "SOAP-ENV:Body" );
env.appendChild( body );
field->xmlData( doc, body );
- QDomElement method = body.firstChild().toElement();
- QString nameSpace = mWSDL.findBindingOperation( "", message.name() ).input().nameSpace();
+ TQDomElement method = body.firstChild().toElement();
+ TQString nameSpace = mWSDL.findBindingOperation( "", message.name() ).input().nameSpace();
method.setAttribute( "xmlns:ns1", "urn:GoogleSearch" );
method.setAttribute( "SOAP-ENV:encodingStyle", "http://schemas.xmlsoap.org/soap/encoding/" );
body.appendChild( method );
@@ -122,32 +122,32 @@ void Dispatcher::nextMessage()
qApp->quit();
}
-void Dispatcher::result( const QString &xml )
+void Dispatcher::result( const TQString &xml )
{
qDebug( "Got data %s", xml.latin1() );
KWSDL::Message message = mWSDL.findOutputMessage( mCurrentMessage );
InputField *field = new PageInputField( message.name(), message );
- QDomDocument doc;
+ TQDomDocument doc;
doc.setContent( xml, true );
field->setXMLData( doc.documentElement().firstChild().firstChild().toElement() );
- QWidget *page = field->createWidget( 0 );
+ TQWidget *page = field->createWidget( 0 );
OutputDialog dlg( page, 0 );
dlg.exec();
mLastMessage = mCurrentMessage;
- QTimer::singleShot( 0, this, SLOT( nextMessage() ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( nextMessage() ) );
}
-void Dispatcher::error( const QString &errorMsg )
+void Dispatcher::error( const TQString &errorMsg )
{
KMessageBox::error( 0, errorMsg );
- QTimer::singleShot( 0, this, SLOT( nextMessage() ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( nextMessage() ) );
}
#include "dispatcher.moc"
diff --git a/kode/kwsdl/kung/dispatcher.h b/kode/kwsdl/kung/dispatcher.h
index 892635d50..c770fe777 100644
--- a/kode/kwsdl/kung/dispatcher.h
+++ b/kode/kwsdl/kung/dispatcher.h
@@ -22,7 +22,7 @@
#ifndef DISPATCHER_H
#define DISPATCHER_H
-#include <qobject.h>
+#include <tqobject.h>
#include <kwsdl/wsdl.h>
@@ -43,14 +43,14 @@ class Dispatcher : public QObject
private slots:
void nextMessage();
- void result( const QString &xml );
- void error( const QString &errorMsg );
+ void result( const TQString &xml );
+ void error( const TQString &errorMsg );
private:
KWSDL::WSDL mWSDL;
- QString mCurrentMessage;
- QString mLastMessage;
+ TQString mCurrentMessage;
+ TQString mLastMessage;
ConversationManager *mConversationManager;
Transport *mTransport;
};
diff --git a/kode/kwsdl/kung/doubleinputfield.cpp b/kode/kwsdl/kung/doubleinputfield.cpp
index 4c19abf97..78f73bcd6 100644
--- a/kode/kwsdl/kung/doubleinputfield.cpp
+++ b/kode/kwsdl/kung/doubleinputfield.cpp
@@ -25,13 +25,13 @@
#include "doubleinputfield.h"
-DoubleInputField::DoubleInputField( const QString &name, const QString &typeName, const Schema::SimpleType *type )
+DoubleInputField::DoubleInputField( const TQString &name, const TQString &typeName, const Schema::SimpleType *type )
: SimpleInputField( name, type ),
mValue( 0 ), mTypeName( typeName )
{
}
-void DoubleInputField::setXMLData( const QDomElement &element )
+void DoubleInputField::setXMLData( const TQDomElement &element )
{
if ( mName != element.tagName() ) {
qDebug( "DoubleInputField: Wrong dom element passed: expected %s, got %s", mName.latin1(), element.tagName().latin1() );
@@ -41,27 +41,27 @@ void DoubleInputField::setXMLData( const QDomElement &element )
setData( element.text() );
}
-void DoubleInputField::xmlData( QDomDocument &document, QDomElement &parent )
+void DoubleInputField::xmlData( TQDomDocument &document, TQDomElement &parent )
{
- QDomElement element = document.createElement( mName );
+ TQDomElement element = document.createElement( mName );
element.setAttribute( "xsi:type", "xsd:" + mTypeName );
- QDomText text = document.createTextNode( data() );
+ TQDomText text = document.createTextNode( data() );
element.appendChild( text );
parent.appendChild( element );
}
-void DoubleInputField::setData( const QString &data )
+void DoubleInputField::setData( const TQString &data )
{
mValue = data.toDouble();
}
-QString DoubleInputField::data() const
+TQString DoubleInputField::data() const
{
- return QString::number( mValue );
+ return TQString::number( mValue );
}
-QWidget *DoubleInputField::createWidget( QWidget *parent )
+TQWidget *DoubleInputField::createWidget( TQWidget *parent )
{
mInputWidget = new KDoubleSpinBox( parent );
@@ -78,8 +78,8 @@ QWidget *DoubleInputField::createWidget( QWidget *parent )
mInputWidget->setValue( mValue );
- connect( mInputWidget, SIGNAL( valueChanged( double ) ),
- this, SLOT( inputChanged( double ) ) );
+ connect( mInputWidget, TQT_SIGNAL( valueChanged( double ) ),
+ this, TQT_SLOT( inputChanged( double ) ) );
return mInputWidget;
}
diff --git a/kode/kwsdl/kung/doubleinputfield.h b/kode/kwsdl/kung/doubleinputfield.h
index f1eeb789e..61299a5cc 100644
--- a/kode/kwsdl/kung/doubleinputfield.h
+++ b/kode/kwsdl/kung/doubleinputfield.h
@@ -22,7 +22,7 @@
#ifndef DOUBLE_INPUTFIELD_H
#define DOUBLE_INPUTFIELD_H
-#include <qobject.h>
+#include <tqobject.h>
#include "inputfield.h"
@@ -33,15 +33,15 @@ class DoubleInputField : public SimpleInputField
Q_OBJECT
public:
- DoubleInputField( const QString &name, const QString &typeName, const Schema::SimpleType *type );
+ DoubleInputField( const TQString &name, const TQString &typeName, const Schema::SimpleType *type );
- virtual void setXMLData( const QDomElement &element );
- virtual void xmlData( QDomDocument &document, QDomElement &parent );
+ virtual void setXMLData( const TQDomElement &element );
+ virtual void xmlData( TQDomDocument &document, TQDomElement &parent );
- virtual void setData( const QString &data );
- virtual QString data() const;
+ virtual void setData( const TQString &data );
+ virtual TQString data() const;
- virtual QWidget *createWidget( QWidget *parent );
+ virtual TQWidget *createWidget( TQWidget *parent );
private slots:
void inputChanged( double );
@@ -49,7 +49,7 @@ class DoubleInputField : public SimpleInputField
private:
KDoubleSpinBox *mInputWidget;
double mValue;
- QString mTypeName;
+ TQString mTypeName;
};
#endif
diff --git a/kode/kwsdl/kung/enuminputfield.cpp b/kode/kwsdl/kung/enuminputfield.cpp
index 61ff328d6..f290803b6 100644
--- a/kode/kwsdl/kung/enuminputfield.cpp
+++ b/kode/kwsdl/kung/enuminputfield.cpp
@@ -25,7 +25,7 @@
#include "enuminputfield.h"
-EnumInputField::EnumInputField( const QString &name, const Schema::SimpleType *type )
+EnumInputField::EnumInputField( const TQString &name, const Schema::SimpleType *type )
: SimpleInputField( name, type )
{
mEnums = type->facetEnums();
@@ -33,7 +33,7 @@ EnumInputField::EnumInputField( const QString &name, const Schema::SimpleType *t
mValue = mEnums.first();
}
-void EnumInputField::setXMLData( const QDomElement &element )
+void EnumInputField::setXMLData( const TQDomElement &element )
{
if ( mName != element.tagName() ) {
qDebug( "EnumInputField: Wrong dom element passed: expected %s, got %s", mName.latin1(), element.tagName().latin1() );
@@ -43,35 +43,35 @@ void EnumInputField::setXMLData( const QDomElement &element )
setData( element.text() );
}
-void EnumInputField::xmlData( QDomDocument &document, QDomElement &parent )
+void EnumInputField::xmlData( TQDomDocument &document, TQDomElement &parent )
{
- QDomElement element = document.createElement( mName );
+ TQDomElement element = document.createElement( mName );
element.setAttribute( "xsi:type", "xsd:string" );
- QDomText text = document.createTextNode( data() );
+ TQDomText text = document.createTextNode( data() );
element.appendChild( text );
parent.appendChild( element );
}
-void EnumInputField::setData( const QString &data )
+void EnumInputField::setData( const TQString &data )
{
mValue = data;
}
-QString EnumInputField::data() const
+TQString EnumInputField::data() const
{
return mValue;
}
-QWidget *EnumInputField::createWidget( QWidget *parent )
+TQWidget *EnumInputField::createWidget( TQWidget *parent )
{
mInputWidget = new KComboBox( parent );
mInputWidget->insertStringList( mEnums );
mInputWidget->setCurrentItem( mEnums.findIndex( mValue ) );
- connect( mInputWidget, SIGNAL( activated( int ) ),
- this, SLOT( inputChanged( int ) ) );
+ connect( mInputWidget, TQT_SIGNAL( activated( int ) ),
+ this, TQT_SLOT( inputChanged( int ) ) );
return mInputWidget;
}
diff --git a/kode/kwsdl/kung/enuminputfield.h b/kode/kwsdl/kung/enuminputfield.h
index 40369273c..14e360332 100644
--- a/kode/kwsdl/kung/enuminputfield.h
+++ b/kode/kwsdl/kung/enuminputfield.h
@@ -22,7 +22,7 @@
#ifndef ENUM_INPUTFIELD_H
#define ENUM_INPUTFIELD_H
-#include <qobject.h>
+#include <tqobject.h>
#include "inputfield.h"
@@ -33,23 +33,23 @@ class EnumInputField : public SimpleInputField
Q_OBJECT
public:
- EnumInputField( const QString &name, const Schema::SimpleType *type );
+ EnumInputField( const TQString &name, const Schema::SimpleType *type );
- virtual void setXMLData( const QDomElement &element );
- virtual void xmlData( QDomDocument &document, QDomElement &parent );
+ virtual void setXMLData( const TQDomElement &element );
+ virtual void xmlData( TQDomDocument &document, TQDomElement &parent );
- virtual void setData( const QString &data );
- virtual QString data() const;
+ virtual void setData( const TQString &data );
+ virtual TQString data() const;
- virtual QWidget *createWidget( QWidget *parent );
+ virtual TQWidget *createWidget( TQWidget *parent );
private slots:
void inputChanged( int );
private:
KComboBox *mInputWidget;
- QString mValue;
- QStringList mEnums;
+ TQString mValue;
+ TQStringList mEnums;
};
#endif
diff --git a/kode/kwsdl/kung/generalconversationmanager.cpp b/kode/kwsdl/kung/generalconversationmanager.cpp
index 266eca3b3..939935684 100644
--- a/kode/kwsdl/kung/generalconversationmanager.cpp
+++ b/kode/kwsdl/kung/generalconversationmanager.cpp
@@ -39,9 +39,9 @@ GeneralConversationManager::GeneralConversationManager( const KWSDL::WSDL &wsdl
}
}
-QStringList GeneralConversationManager::nextActions( const QString&, const QString& )
+TQStringList GeneralConversationManager::nextActions( const TQString&, const TQString& )
{
- QStringList actions;
+ TQStringList actions;
KWSDL::Message::List::ConstIterator it;
for ( it = mInputMessages.begin(); it != mInputMessages.end(); ++it )
diff --git a/kode/kwsdl/kung/generalconversationmanager.h b/kode/kwsdl/kung/generalconversationmanager.h
index 2f0297577..ea2b52066 100644
--- a/kode/kwsdl/kung/generalconversationmanager.h
+++ b/kode/kwsdl/kung/generalconversationmanager.h
@@ -31,7 +31,7 @@ class GeneralConversationManager : public ConversationManager
public:
GeneralConversationManager( const KWSDL::WSDL &wsdl );
- virtual QStringList nextActions( const QString &currentAction, const QString &condition = QString() );
+ virtual TQStringList nextActions( const TQString &currentAction, const TQString &condition = TQString() );
private:
KWSDL::WSDL mWSDL;
diff --git a/kode/kwsdl/kung/inputdialog.cpp b/kode/kwsdl/kung/inputdialog.cpp
index 2885fdc4b..17aa601b0 100644
--- a/kode/kwsdl/kung/inputdialog.cpp
+++ b/kode/kwsdl/kung/inputdialog.cpp
@@ -23,7 +23,7 @@
#include "inputdialog.h"
-InputDialog::InputDialog( QWidget *page, QWidget *parent )
+InputDialog::InputDialog( TQWidget *page, TQWidget *parent )
: KDialogBase( Swallow, "", Ok | Cancel, Ok, parent, "", true, true )
{
setMainWidget( page );
diff --git a/kode/kwsdl/kung/inputdialog.h b/kode/kwsdl/kung/inputdialog.h
index 10b107c3a..b592545b7 100644
--- a/kode/kwsdl/kung/inputdialog.h
+++ b/kode/kwsdl/kung/inputdialog.h
@@ -27,7 +27,7 @@
class InputDialog : public KDialogBase
{
public:
- InputDialog( QWidget *page, QWidget *parent );
+ InputDialog( TQWidget *page, TQWidget *parent );
};
#endif
diff --git a/kode/kwsdl/kung/inputfield.cpp b/kode/kwsdl/kung/inputfield.cpp
index d4efcbe49..7bdd4cdeb 100644
--- a/kode/kwsdl/kung/inputfield.cpp
+++ b/kode/kwsdl/kung/inputfield.cpp
@@ -24,8 +24,8 @@
#include "inputfield.h"
-InputField::InputField( const QString &name )
- : QObject( 0, QString( "InputField( %1 )" ).arg( name ).latin1() ),
+InputField::InputField( const TQString &name )
+ : TQObject( 0, TQString( "InputField( %1 )" ).arg( name ).latin1() ),
mName( name )
{
}
@@ -39,7 +39,7 @@ InputField::~InputField()
mFields.clear();
}
-QString InputField::name() const
+TQString InputField::name() const
{
return mName;
}
@@ -54,7 +54,7 @@ void InputField::removeChild( InputField *field )
mFields.remove( field );
}
-InputField *InputField::childField( const QString &name ) const
+InputField *InputField::childField( const TQString &name ) const
{
InputField::List::ConstIterator it;
for ( it = mFields.begin(); it != mFields.end(); ++it )
@@ -69,7 +69,7 @@ InputField::List InputField::childFields() const
return mFields;
}
-SimpleInputField::SimpleInputField( const QString &name, const Schema::SimpleType *type )
+SimpleInputField::SimpleInputField( const TQString &name, const Schema::SimpleType *type )
: InputField( name ), mType( 0 )
{
if ( type ) {
@@ -84,7 +84,7 @@ SimpleInputField::~SimpleInputField()
mType = 0;
}
-ComplexInputField::ComplexInputField( const QString &name, const Schema::ComplexType *type )
+ComplexInputField::ComplexInputField( const TQString &name, const Schema::ComplexType *type )
: InputField( name ), mType( 0 )
{
if ( type ) {
diff --git a/kode/kwsdl/kung/inputfield.h b/kode/kwsdl/kung/inputfield.h
index 71030bdaa..1f6242d34 100644
--- a/kode/kwsdl/kung/inputfield.h
+++ b/kode/kwsdl/kung/inputfield.h
@@ -22,10 +22,10 @@
#ifndef INPUTFIELD_H
#define INPUTFIELD_H
-#include <qdom.h>
-#include <qobject.h>
-#include <qstring.h>
-#include <qvaluelist.h>
+#include <tqdom.h>
+#include <tqobject.h>
+#include <tqstring.h>
+#include <tqvaluelist.h>
class QWidget;
@@ -42,12 +42,12 @@ class InputField : public QObject
Q_OBJECT
public:
- typedef QValueList<InputField*> List;
+ typedef TQValueList<InputField*> List;
/**
Constructs a input field.
*/
- InputField( const QString &name );
+ InputField( const TQString &name );
/**
Destructor.
@@ -57,33 +57,33 @@ class InputField : public QObject
/**
Returns the name of the field.
*/
- QString name() const;
+ TQString name() const;
/**
Sets the xml data of this field.
*/
- virtual void setXMLData( const QDomElement &element ) = 0;
+ virtual void setXMLData( const TQDomElement &element ) = 0;
/**
Returns the xml value of this field.
*/
- virtual void xmlData( QDomDocument &document, QDomElement &parent ) = 0;
+ virtual void xmlData( TQDomDocument &document, TQDomElement &parent ) = 0;
/**
Sets the plain data of this field as string.
*/
- virtual void setData( const QString &data ) = 0;
+ virtual void setData( const TQString &data ) = 0;
/**
Returns the data of this field as string.
*/
- virtual QString data() const = 0;
+ virtual TQString data() const = 0;
/**
Returns a pointer to a new created input widget which can be used to
to modify the value.
*/
- virtual QWidget *createWidget( QWidget *parent ) = 0;
+ virtual TQWidget *createWidget( TQWidget *parent ) = 0;
/**
Add a child field.
@@ -99,7 +99,7 @@ class InputField : public QObject
Returns a field with the given name or 0 when no field with this name
exists.
*/
- virtual InputField *childField( const QString &name ) const;
+ virtual InputField *childField( const TQString &name ) const;
/**
Returns a list of all child fields.
@@ -113,7 +113,7 @@ class InputField : public QObject
void modified();
protected:
- QString mName;
+ TQString mName;
InputField::List mFields;
};
@@ -123,7 +123,7 @@ class InputField : public QObject
class SimpleInputField : public InputField
{
public:
- SimpleInputField( const QString &name, const Schema::SimpleType *type );
+ SimpleInputField( const TQString &name, const Schema::SimpleType *type );
~SimpleInputField();
protected:
@@ -136,7 +136,7 @@ class SimpleInputField : public InputField
class ComplexInputField : public InputField
{
public:
- ComplexInputField( const QString &name, const Schema::ComplexType *type );
+ ComplexInputField( const TQString &name, const Schema::ComplexType *type );
~ComplexInputField();
protected:
diff --git a/kode/kwsdl/kung/inputfieldfactory.cpp b/kode/kwsdl/kung/inputfieldfactory.cpp
index 43a844c65..42905aee3 100644
--- a/kode/kwsdl/kung/inputfieldfactory.cpp
+++ b/kode/kwsdl/kung/inputfieldfactory.cpp
@@ -53,7 +53,7 @@ void InputFieldFactory::setTypes( const Schema::Types &types )
mTypes = types;
}
-InputField *InputFieldFactory::createField( const QString &name, const QString &typeName, bool isList )
+InputField *InputFieldFactory::createField( const TQString &name, const TQString &typeName, bool isList )
{
Schema::SimpleType::List simpleTypes = mTypes.simpleTypes();
Schema::SimpleType::List::ConstIterator simpleIt;
@@ -80,7 +80,7 @@ InputField *InputFieldFactory::createField( const QString &name, const QString &
return createBasicField( name, typeName, 0, isList );
}
-InputField *InputFieldFactory::createBasicField( const QString &name, const QString &typeName,
+InputField *InputFieldFactory::createBasicField( const TQString &name, const TQString &typeName,
const Schema::SimpleType *type, bool isList )
{
if ( isList )
diff --git a/kode/kwsdl/kung/inputfieldfactory.h b/kode/kwsdl/kung/inputfieldfactory.h
index 2c1e30eb9..38eae73e1 100644
--- a/kode/kwsdl/kung/inputfieldfactory.h
+++ b/kode/kwsdl/kung/inputfieldfactory.h
@@ -44,12 +44,12 @@ class InputFieldFactory
/**
Creates an input field of the given type with the given name.
*/
- InputField *createField( const QString &name, const QString &typeName, bool isList = false );
+ InputField *createField( const TQString &name, const TQString &typeName, bool isList = false );
/**
Creates an input field of the given type with the given name.
*/
- InputField *createBasicField( const QString &name, const QString &typeName, const Schema::SimpleType *type, bool isList = false );
+ InputField *createBasicField( const TQString &name, const TQString &typeName, const Schema::SimpleType *type, bool isList = false );
/**
Sets the types description, so that the factory can pass
diff --git a/kode/kwsdl/kung/integerinputfield.cpp b/kode/kwsdl/kung/integerinputfield.cpp
index a06136823..022ec0d84 100644
--- a/kode/kwsdl/kung/integerinputfield.cpp
+++ b/kode/kwsdl/kung/integerinputfield.cpp
@@ -27,13 +27,13 @@
#include "integerinputfield.h"
-IntegerInputField::IntegerInputField( const QString &name, const QString &typeName, const Schema::SimpleType *type )
+IntegerInputField::IntegerInputField( const TQString &name, const TQString &typeName, const Schema::SimpleType *type )
: SimpleInputField( name, type ),
mValue( 0 ), mTypeName( typeName )
{
}
-void IntegerInputField::setXMLData( const QDomElement &element )
+void IntegerInputField::setXMLData( const TQDomElement &element )
{
if ( mName != element.tagName() ) {
qDebug( "IntegerInputField: Wrong dom element passed: expected %s, got %s", mName.latin1(), element.tagName().latin1() );
@@ -43,27 +43,27 @@ void IntegerInputField::setXMLData( const QDomElement &element )
setData( element.text() );
}
-void IntegerInputField::xmlData( QDomDocument &document, QDomElement &parent )
+void IntegerInputField::xmlData( TQDomDocument &document, TQDomElement &parent )
{
- QDomElement element = document.createElement( mName );
+ TQDomElement element = document.createElement( mName );
element.setAttribute( "xsi:type", "xsd:" + mTypeName );
- QDomText text = document.createTextNode( data() );
+ TQDomText text = document.createTextNode( data() );
element.appendChild( text );
parent.appendChild( element );
}
-void IntegerInputField::setData( const QString &data )
+void IntegerInputField::setData( const TQString &data )
{
mValue = data.toInt();
}
-QString IntegerInputField::data() const
+TQString IntegerInputField::data() const
{
- return QString::number( mValue );
+ return TQString::number( mValue );
}
-QWidget *IntegerInputField::createWidget( QWidget *parent )
+TQWidget *IntegerInputField::createWidget( TQWidget *parent )
{
mInputWidget = new KIntSpinBox( parent );
@@ -116,8 +116,8 @@ QWidget *IntegerInputField::createWidget( QWidget *parent )
mInputWidget->setValue( mValue );
- connect( mInputWidget, SIGNAL( valueChanged( int ) ),
- this, SLOT( inputChanged( int ) ) );
+ connect( mInputWidget, TQT_SIGNAL( valueChanged( int ) ),
+ this, TQT_SLOT( inputChanged( int ) ) );
return mInputWidget;
}
diff --git a/kode/kwsdl/kung/integerinputfield.h b/kode/kwsdl/kung/integerinputfield.h
index 6576aa1df..2cda162c6 100644
--- a/kode/kwsdl/kung/integerinputfield.h
+++ b/kode/kwsdl/kung/integerinputfield.h
@@ -22,7 +22,7 @@
#ifndef INTEGER_INPUTFIELD_H
#define INTEGER_INPUTFIELD_H
-#include <qobject.h>
+#include <tqobject.h>
#include "inputfield.h"
@@ -33,15 +33,15 @@ class IntegerInputField : public SimpleInputField
Q_OBJECT
public:
- IntegerInputField( const QString &name, const QString &typeName, const Schema::SimpleType *type );
+ IntegerInputField( const TQString &name, const TQString &typeName, const Schema::SimpleType *type );
- virtual void setXMLData( const QDomElement &element );
- virtual void xmlData( QDomDocument &document, QDomElement &parent );
+ virtual void setXMLData( const TQDomElement &element );
+ virtual void xmlData( TQDomDocument &document, TQDomElement &parent );
- virtual void setData( const QString &data );
- virtual QString data() const;
+ virtual void setData( const TQString &data );
+ virtual TQString data() const;
- virtual QWidget *createWidget( QWidget *parent );
+ virtual TQWidget *createWidget( TQWidget *parent );
private slots:
void inputChanged( int );
@@ -49,7 +49,7 @@ class IntegerInputField : public SimpleInputField
private:
KIntSpinBox *mInputWidget;
int mValue;
- QString mTypeName;
+ TQString mTypeName;
};
#endif
diff --git a/kode/kwsdl/kung/listinputfield.cpp b/kode/kwsdl/kung/listinputfield.cpp
index a812df6a9..6bc1d8240 100644
--- a/kode/kwsdl/kung/listinputfield.cpp
+++ b/kode/kwsdl/kung/listinputfield.cpp
@@ -19,9 +19,9 @@
Boston, MA 02110-1301, USA.
*/
-#include <qlayout.h>
-#include <qlistbox.h>
-#include <qpushbutton.h>
+#include <tqlayout.h>
+#include <tqlistbox.h>
+#include <tqpushbutton.h>
#include <klocale.h>
@@ -33,12 +33,12 @@
#include "listinputfield.h"
-ListInputField::ListInputField( const QString &name, const QString &typeName, const Schema::SimpleType *type )
+ListInputField::ListInputField( const TQString &name, const TQString &typeName, const Schema::SimpleType *type )
: SimpleInputField( name, type ), mTypeName( typeName )
{
}
-void ListInputField::setXMLData( const QDomElement &element )
+void ListInputField::setXMLData( const TQDomElement &element )
{
InputField::List::Iterator it;
for ( it = mFields.begin(); it != mFields.end(); ++it ) {
@@ -46,9 +46,9 @@ void ListInputField::setXMLData( const QDomElement &element )
}
mFields.clear();
- QDomNode node = element.firstChild();
+ TQDomNode node = element.firstChild();
while ( !node.isNull() ) {
- QDomElement child = node.toElement();
+ TQDomElement child = node.toElement();
if ( !child.isNull() ) {
InputField *field = InputFieldFactory::self()->createField( name(), mTypeName );
if ( field ) {
@@ -62,7 +62,7 @@ void ListInputField::setXMLData( const QDomElement &element )
}
}
-void ListInputField::xmlData( QDomDocument &document, QDomElement &parent )
+void ListInputField::xmlData( TQDomDocument &document, TQDomElement &parent )
{
InputField::List::Iterator it;
for ( it = mFields.begin(); it != mFields.end(); ++it ) {
@@ -70,16 +70,16 @@ void ListInputField::xmlData( QDomDocument &document, QDomElement &parent )
}
}
-void ListInputField::setData( const QString& )
+void ListInputField::setData( const TQString& )
{
}
-QString ListInputField::data() const
+TQString ListInputField::data() const
{
- return QString();
+ return TQString();
}
-QWidget *ListInputField::createWidget( QWidget *parent )
+TQWidget *ListInputField::createWidget( TQWidget *parent )
{
mInputWidget = new ListWidget( this, name(), mTypeName, parent );
@@ -87,27 +87,27 @@ QWidget *ListInputField::createWidget( QWidget *parent )
}
-ListWidget::ListWidget( InputField *parentField, const QString &name, const QString &type, QWidget *parent )
- : QWidget( parent ),
+ListWidget::ListWidget( InputField *parentField, const TQString &name, const TQString &type, TQWidget *parent )
+ : TQWidget( parent ),
mParentField( parentField ), mName( name ), mType( type )
{
- QGridLayout *layout = new QGridLayout( this, 4, 2, 11, 6 );
+ TQGridLayout *layout = new TQGridLayout( this, 4, 2, 11, 6 );
- mView = new QListBox( this );
+ mView = new TQListBox( this );
layout->addMultiCellWidget( mView, 0, 3, 0, 0 );
- mAddButton = new QPushButton( i18n( "Add" ), this );
+ mAddButton = new TQPushButton( i18n( "Add" ), this );
layout->addWidget( mAddButton, 0, 1 );
- mEditButton = new QPushButton( i18n( "Edit..." ), this );
+ mEditButton = new TQPushButton( i18n( "Edit..." ), this );
layout->addWidget( mEditButton, 1, 1 );
- mRemoveButton = new QPushButton( i18n( "Remove" ), this );
+ mRemoveButton = new TQPushButton( i18n( "Remove" ), this );
layout->addWidget( mRemoveButton, 2, 1 );
- connect( mAddButton, SIGNAL( clicked() ), SLOT( add() ) );
- connect( mEditButton, SIGNAL( clicked() ), SLOT( edit() ) );
- connect( mRemoveButton, SIGNAL( clicked() ), SLOT( remove() ) );
+ connect( mAddButton, TQT_SIGNAL( clicked() ), TQT_SLOT( add() ) );
+ connect( mEditButton, TQT_SIGNAL( clicked() ), TQT_SLOT( edit() ) );
+ connect( mRemoveButton, TQT_SIGNAL( clicked() ), TQT_SLOT( remove() ) );
update();
}
diff --git a/kode/kwsdl/kung/listinputfield.h b/kode/kwsdl/kung/listinputfield.h
index 3b3779e25..57430d2e4 100644
--- a/kode/kwsdl/kung/listinputfield.h
+++ b/kode/kwsdl/kung/listinputfield.h
@@ -22,7 +22,7 @@
#ifndef LIST_INPUTFIELD_H
#define LIST_INPUTFIELD_H
-#include <qwidget.h>
+#include <tqwidget.h>
#include "inputfield.h"
@@ -35,19 +35,19 @@ class ListInputField : public SimpleInputField
Q_OBJECT
public:
- ListInputField( const QString &name, const QString &typeName, const Schema::SimpleType *type );
+ ListInputField( const TQString &name, const TQString &typeName, const Schema::SimpleType *type );
- virtual void setXMLData( const QDomElement &element );
- virtual void xmlData( QDomDocument &document, QDomElement &parent );
+ virtual void setXMLData( const TQDomElement &element );
+ virtual void xmlData( TQDomDocument &document, TQDomElement &parent );
- virtual void setData( const QString &data );
- virtual QString data() const;
+ virtual void setData( const TQString &data );
+ virtual TQString data() const;
- virtual QWidget *createWidget( QWidget *parent );
+ virtual TQWidget *createWidget( TQWidget *parent );
private:
ListWidget *mInputWidget;
- QString mTypeName;
+ TQString mTypeName;
};
class ListWidget : public QWidget
@@ -55,7 +55,7 @@ class ListWidget : public QWidget
Q_OBJECT
public:
- ListWidget( InputField *parentField, const QString &name, const QString &type, QWidget *parent );
+ ListWidget( InputField *parentField, const TQString &name, const TQString &type, TQWidget *parent );
void update();
@@ -68,13 +68,13 @@ class ListWidget : public QWidget
void updateButtons();
InputField *mParentField;
- QString mName;
- QString mType;
+ TQString mName;
+ TQString mType;
- QListBox *mView;
- QPushButton *mAddButton;
- QPushButton *mEditButton;
- QPushButton *mRemoveButton;
+ TQListBox *mView;
+ TQPushButton *mAddButton;
+ TQPushButton *mEditButton;
+ TQPushButton *mRemoveButton;
};
#endif
diff --git a/kode/kwsdl/kung/loader.cpp b/kode/kwsdl/kung/loader.cpp
index 1b13549fa..8b0281ac8 100644
--- a/kode/kwsdl/kung/loader.cpp
+++ b/kode/kwsdl/kung/loader.cpp
@@ -19,7 +19,7 @@
Boston, MA 02110-1301, USA.
*/
-#include <qfile.h>
+#include <tqfile.h>
#include <schema/fileprovider.h>
@@ -28,11 +28,11 @@
#include "loader.h"
Loader::Loader()
- : QObject( 0, "KWSDL::Loader" )
+ : TQObject( 0, "KWSDL::Loader" )
{
}
-void Loader::setWSDLUrl( const QString &wsdlUrl )
+void Loader::setWSDLUrl( const TQString &wsdlUrl )
{
mWSDLUrl = wsdlUrl;
mWSDLBaseUrl = mWSDLUrl.left( mWSDLUrl.findRev( '/' ) );
@@ -49,18 +49,18 @@ void Loader::download()
{
Schema::FileProvider provider;
- QString fileName;
+ TQString fileName;
if ( provider.get( mWSDLUrl, fileName ) ) {
- QFile file( fileName );
+ TQFile file( fileName );
if ( !file.open( IO_ReadOnly ) ) {
qDebug( "Unable to download wsdl file %s", mWSDLUrl.latin1() );
provider.cleanUp();
return;
}
- QString errorMsg;
+ TQString errorMsg;
int errorLine, errorCol;
- QDomDocument doc;
+ TQDomDocument doc;
if ( !doc.setContent( &file, true, &errorMsg, &errorLine, &errorCol ) ) {
qDebug( "%s at (%d,%d)", errorMsg.latin1(), errorLine, errorCol );
return;
@@ -72,7 +72,7 @@ void Loader::download()
}
}
-void Loader::parse( const QDomElement &element )
+void Loader::parse( const TQDomElement &element )
{
mParser.parse( element );
execute();
diff --git a/kode/kwsdl/kung/loader.h b/kode/kwsdl/kung/loader.h
index 2229eb23a..7762e292a 100644
--- a/kode/kwsdl/kung/loader.h
+++ b/kode/kwsdl/kung/loader.h
@@ -33,21 +33,21 @@ class Loader : public QObject
public:
Loader();
- void setWSDLUrl( const QString &wsdlUrl );
+ void setWSDLUrl( const TQString &wsdlUrl );
public slots:
void run();
private slots:
void download();
- void parse( const QDomElement& );
+ void parse( const TQDomElement& );
void execute();
private:
- QString mWSDLUrl;
+ TQString mWSDLUrl;
KWSDL::Parser mParser;
- QString mWSDLBaseUrl;
+ TQString mWSDLBaseUrl;
Dispatcher *mDispatcher;
};
diff --git a/kode/kwsdl/kung/main.cpp b/kode/kwsdl/kung/main.cpp
index 92de443ff..b01f04dc2 100644
--- a/kode/kwsdl/kung/main.cpp
+++ b/kode/kwsdl/kung/main.cpp
@@ -25,7 +25,7 @@
#include <kdebug.h>
#include <klocale.h>
-#include <qtimer.h>
+#include <tqtimer.h>
#include "loader.h"
@@ -58,7 +58,7 @@ int main( int argc, char **argv )
Loader loader;
loader.setWSDLUrl( args->url( 0 ).path() );
- QTimer::singleShot( 0, &loader, SLOT( run() ) );
+ TQTimer::singleShot( 0, &loader, TQT_SLOT( run() ) );
return app.exec();
}
diff --git a/kode/kwsdl/kung/outputdialog.cpp b/kode/kwsdl/kung/outputdialog.cpp
index 7a04db478..6cdb7e579 100644
--- a/kode/kwsdl/kung/outputdialog.cpp
+++ b/kode/kwsdl/kung/outputdialog.cpp
@@ -23,7 +23,7 @@
#include "outputdialog.h"
-OutputDialog::OutputDialog( QWidget *page, QWidget *parent )
+OutputDialog::OutputDialog( TQWidget *page, TQWidget *parent )
: KDialogBase( Swallow, "", Ok, Ok, parent, "", true, true )
{
setMainWidget( page );
diff --git a/kode/kwsdl/kung/outputdialog.h b/kode/kwsdl/kung/outputdialog.h
index e671e0841..a3c558789 100644
--- a/kode/kwsdl/kung/outputdialog.h
+++ b/kode/kwsdl/kung/outputdialog.h
@@ -27,7 +27,7 @@
class OutputDialog : public KDialogBase
{
public:
- OutputDialog( QWidget *page, QWidget *parent );
+ OutputDialog( TQWidget *page, TQWidget *parent );
};
#endif
diff --git a/kode/kwsdl/kung/pageinputfield.cpp b/kode/kwsdl/kung/pageinputfield.cpp
index 36a5b02da..956e54bfc 100644
--- a/kode/kwsdl/kung/pageinputfield.cpp
+++ b/kode/kwsdl/kung/pageinputfield.cpp
@@ -19,14 +19,14 @@
Boston, MA 02110-1301, USA.
*/
-#include <qlabel.h>
-#include <qlayout.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
#include "inputfieldfactory.h"
#include "pageinputfield.h"
-PageInputField::PageInputField( const QString &name, const KWSDL::Message &message )
+PageInputField::PageInputField( const TQString &name, const KWSDL::Message &message )
: InputField( name ),
mMessage( message )
{
@@ -42,16 +42,16 @@ PageInputField::PageInputField( const QString &name, const KWSDL::Message &messa
}
}
-void PageInputField::setXMLData( const QDomElement &element )
+void PageInputField::setXMLData( const TQDomElement &element )
{
if ( mName != element.tagName() ) {
qDebug( "PageInputField: Wrong dom element passed: expected %s, got %s", mName.latin1(), element.tagName().latin1() );
return;
}
- QDomNode node = element.firstChild();
+ TQDomNode node = element.firstChild();
while ( !node.isNull() ) {
- QDomElement child = node.toElement();
+ TQDomElement child = node.toElement();
if ( !child.isNull() ) {
InputField *field = childField( child.tagName() );
if ( !field ) {
@@ -65,9 +65,9 @@ void PageInputField::setXMLData( const QDomElement &element )
}
}
-void PageInputField::xmlData( QDomDocument &document, QDomElement &parent )
+void PageInputField::xmlData( TQDomDocument &document, TQDomElement &parent )
{
- QDomElement element = document.createElement( "ns1:" + mName );
+ TQDomElement element = document.createElement( "ns1:" + mName );
InputField::List::Iterator it;
for ( it = mFields.begin(); it != mFields.end(); ++it )
@@ -76,24 +76,24 @@ void PageInputField::xmlData( QDomDocument &document, QDomElement &parent )
parent.appendChild( element );
}
-void PageInputField::setData( const QString& )
+void PageInputField::setData( const TQString& )
{
}
-QString PageInputField::data() const
+TQString PageInputField::data() const
{
- return QString();
+ return TQString();
}
-QWidget *PageInputField::createWidget( QWidget *parent )
+TQWidget *PageInputField::createWidget( TQWidget *parent )
{
- QWidget *mInputWidget = new QWidget( parent, "PageInputWidget" );
- QGridLayout *layout = new QGridLayout( mInputWidget, 2, 2, 11, 6 );
+ TQWidget *mInputWidget = new TQWidget( parent, "PageInputWidget" );
+ TQGridLayout *layout = new TQGridLayout( mInputWidget, 2, 2, 11, 6 );
InputField::List::Iterator it;
int row = 0;
for ( it = mFields.begin(); it != mFields.end(); ++it, ++row ) {
- QLabel *label = new QLabel( (*it)->name(), mInputWidget );
+ TQLabel *label = new TQLabel( (*it)->name(), mInputWidget );
label->setAlignment( Qt::AlignTop );
layout->addWidget( label, row, 0 );
layout->addWidget( (*it)->createWidget( mInputWidget ), row, 1 );
diff --git a/kode/kwsdl/kung/pageinputfield.h b/kode/kwsdl/kung/pageinputfield.h
index c63e97aeb..152d337ed 100644
--- a/kode/kwsdl/kung/pageinputfield.h
+++ b/kode/kwsdl/kung/pageinputfield.h
@@ -22,7 +22,7 @@
#ifndef PAGE_INPUTFIELD_H
#define PAGE_INPUTFIELD_H
-#include <qobject.h>
+#include <tqobject.h>
#include <kwsdl/message.h>
@@ -33,18 +33,18 @@ class PageInputField : public InputField
Q_OBJECT
public:
- PageInputField( const QString &name, const KWSDL::Message &message );
+ PageInputField( const TQString &name, const KWSDL::Message &message );
- virtual void setXMLData( const QDomElement &element );
- virtual void xmlData( QDomDocument &document, QDomElement &parent );
+ virtual void setXMLData( const TQDomElement &element );
+ virtual void xmlData( TQDomDocument &document, TQDomElement &parent );
- virtual void setData( const QString &data );
- virtual QString data() const;
+ virtual void setData( const TQString &data );
+ virtual TQString data() const;
- virtual QWidget *createWidget( QWidget *parent );
+ virtual TQWidget *createWidget( TQWidget *parent );
private:
- QWidget *mInputWidget;
+ TQWidget *mInputWidget;
const KWSDL::Message mMessage;
};
diff --git a/kode/kwsdl/kung/simplebaseinputfield.cpp b/kode/kwsdl/kung/simplebaseinputfield.cpp
index f9cb1bd56..0198723cf 100644
--- a/kode/kwsdl/kung/simplebaseinputfield.cpp
+++ b/kode/kwsdl/kung/simplebaseinputfield.cpp
@@ -25,7 +25,7 @@
#include "simplebaseinputfield.h"
-SimpleBaseInputField::SimpleBaseInputField( const QString &name, const Schema::SimpleType *type )
+SimpleBaseInputField::SimpleBaseInputField( const TQString &name, const Schema::SimpleType *type )
: SimpleInputField( name, type )
{
if ( type->subType() == Schema::SimpleType::TypeRestriction ) {
@@ -40,7 +40,7 @@ SimpleBaseInputField::SimpleBaseInputField( const QString &name, const Schema::S
}
}
-void SimpleBaseInputField::setXMLData( const QDomElement &element )
+void SimpleBaseInputField::setXMLData( const TQDomElement &element )
{
if ( mName != element.tagName() ) {
qDebug( "SimpleBaseInputField: Wrong dom element passed: expected %s, got %s", mName.latin1(), element.tagName().latin1() );
@@ -59,7 +59,7 @@ void SimpleBaseInputField::setXMLData( const QDomElement &element )
}
}
-void SimpleBaseInputField::xmlData( QDomDocument &document, QDomElement &parent )
+void SimpleBaseInputField::xmlData( TQDomDocument &document, TQDomElement &parent )
{
if ( mType->subType() == Schema::SimpleType::TypeRestriction ) {
InputField *field = mFields.first();
@@ -73,7 +73,7 @@ void SimpleBaseInputField::xmlData( QDomDocument &document, QDomElement &parent
}
}
-void SimpleBaseInputField::setData( const QString &data )
+void SimpleBaseInputField::setData( const TQString &data )
{
if ( mType->subType() == Schema::SimpleType::TypeRestriction ) {
InputField *field = mFields.first();
@@ -87,7 +87,7 @@ void SimpleBaseInputField::setData( const QString &data )
}
}
-QString SimpleBaseInputField::data() const
+TQString SimpleBaseInputField::data() const
{
if ( mType->subType() == Schema::SimpleType::TypeRestriction ) {
InputField *field = mFields.first();
@@ -100,10 +100,10 @@ QString SimpleBaseInputField::data() const
qDebug( "SimpleBaseInputField: Unsupported subtype" );
}
- return QString();
+ return TQString();
}
-QWidget *SimpleBaseInputField::createWidget( QWidget *parent )
+TQWidget *SimpleBaseInputField::createWidget( TQWidget *parent )
{
if ( mType->subType() == Schema::SimpleType::TypeRestriction ) {
InputField *field = mFields.first();
diff --git a/kode/kwsdl/kung/simplebaseinputfield.h b/kode/kwsdl/kung/simplebaseinputfield.h
index 7af65ab37..dab7e906c 100644
--- a/kode/kwsdl/kung/simplebaseinputfield.h
+++ b/kode/kwsdl/kung/simplebaseinputfield.h
@@ -27,15 +27,15 @@
class SimpleBaseInputField : public SimpleInputField
{
public:
- SimpleBaseInputField( const QString &name, const Schema::SimpleType *type );
+ SimpleBaseInputField( const TQString &name, const Schema::SimpleType *type );
- virtual void setXMLData( const QDomElement &element );
- virtual void xmlData( QDomDocument &document, QDomElement &parent );
+ virtual void setXMLData( const TQDomElement &element );
+ virtual void xmlData( TQDomDocument &document, TQDomElement &parent );
- virtual void setData( const QString &data );
- virtual QString data() const;
+ virtual void setData( const TQString &data );
+ virtual TQString data() const;
- virtual QWidget *createWidget( QWidget *parent );
+ virtual TQWidget *createWidget( TQWidget *parent );
};
#endif
diff --git a/kode/kwsdl/kung/stringinputfield.cpp b/kode/kwsdl/kung/stringinputfield.cpp
index e0dc10ccc..390c5bc1b 100644
--- a/kode/kwsdl/kung/stringinputfield.cpp
+++ b/kode/kwsdl/kung/stringinputfield.cpp
@@ -19,20 +19,20 @@
Boston, MA 02110-1301, USA.
*/
-#include <qlineedit.h>
-#include <qvalidator.h>
+#include <tqlineedit.h>
+#include <tqvalidator.h>
#include <schema/simpletype.h>
#include "stringinputfield.h"
-StringInputField::StringInputField( const QString &name, const QString &typeName, const Schema::SimpleType *type )
+StringInputField::StringInputField( const TQString &name, const TQString &typeName, const Schema::SimpleType *type )
: SimpleInputField( name, type ),
mTypeName( typeName )
{
}
-void StringInputField::setXMLData( const QDomElement &element )
+void StringInputField::setXMLData( const TQDomElement &element )
{
if ( mName != element.tagName() ) {
qDebug( "StringInputField: Wrong dom element passed: expected %s, got %s", mName.latin1(), element.tagName().latin1() );
@@ -42,36 +42,36 @@ void StringInputField::setXMLData( const QDomElement &element )
setData( element.text() );
}
-void StringInputField::xmlData( QDomDocument &document, QDomElement &parent )
+void StringInputField::xmlData( TQDomDocument &document, TQDomElement &parent )
{
- QDomElement element = document.createElement( mName );
+ TQDomElement element = document.createElement( mName );
element.setAttribute( "xsi:type", "xsd:" + mTypeName );
- QDomText text = document.createTextNode( data() );
+ TQDomText text = document.createTextNode( data() );
element.appendChild( text );
parent.appendChild( element );
}
-void StringInputField::setData( const QString &data )
+void StringInputField::setData( const TQString &data )
{
mValue = data;
}
-QString StringInputField::data() const
+TQString StringInputField::data() const
{
return mValue;
}
-QWidget *StringInputField::createWidget( QWidget *parent )
+TQWidget *StringInputField::createWidget( TQWidget *parent )
{
- mInputWidget = new QLineEdit( parent );
+ mInputWidget = new TQLineEdit( parent );
if ( mType ) {
- if ( mType->facetType() & Schema::SimpleType::LENGTH ) // TODO: using QValidator here?
+ if ( mType->facetType() & Schema::SimpleType::LENGTH ) // TODO: using TQValidator here?
mInputWidget->setMaxLength( mType->facetLength() );
if ( mType->facetType() & Schema::SimpleType::MINLEN ) {
- // TODO: using QValidator here?
+ // TODO: using TQValidator here?
// mInputWidget->setMaxLength( type->facetMinimumLength() );
}
@@ -79,18 +79,18 @@ QWidget *StringInputField::createWidget( QWidget *parent )
mInputWidget->setMaxLength( mType->facetMaximumLength() );
if ( mType->facetType() & Schema::SimpleType::PATTERN )
- mInputWidget->setValidator( new QRegExpValidator( mType->facetPattern(), mInputWidget ) );
+ mInputWidget->setValidator( new TQRegExpValidator( mType->facetPattern(), mInputWidget ) );
}
mInputWidget->setText( mValue );
- connect( mInputWidget, SIGNAL( textChanged( const QString& ) ),
- this, SLOT( inputChanged( const QString& ) ) );
+ connect( mInputWidget, TQT_SIGNAL( textChanged( const TQString& ) ),
+ this, TQT_SLOT( inputChanged( const TQString& ) ) );
return mInputWidget;
}
-void StringInputField::inputChanged( const QString &text )
+void StringInputField::inputChanged( const TQString &text )
{
mValue = text;
diff --git a/kode/kwsdl/kung/stringinputfield.h b/kode/kwsdl/kung/stringinputfield.h
index 2713dded8..0ef30164d 100644
--- a/kode/kwsdl/kung/stringinputfield.h
+++ b/kode/kwsdl/kung/stringinputfield.h
@@ -22,7 +22,7 @@
#ifndef STRING_INPUTFIELD_H
#define STRING_INPUTFIELD_H
-#include <qobject.h>
+#include <tqobject.h>
#include "inputfield.h"
@@ -33,23 +33,23 @@ class StringInputField : public SimpleInputField
Q_OBJECT
public:
- StringInputField( const QString &name, const QString &typeName, const Schema::SimpleType *type );
+ StringInputField( const TQString &name, const TQString &typeName, const Schema::SimpleType *type );
- virtual void setXMLData( const QDomElement &element );
- virtual void xmlData( QDomDocument &document, QDomElement &parent );
+ virtual void setXMLData( const TQDomElement &element );
+ virtual void xmlData( TQDomDocument &document, TQDomElement &parent );
- virtual void setData( const QString &data );
- virtual QString data() const;
+ virtual void setData( const TQString &data );
+ virtual TQString data() const;
- virtual QWidget *createWidget( QWidget *parent );
+ virtual TQWidget *createWidget( TQWidget *parent );
private slots:
- void inputChanged( const QString& );
+ void inputChanged( const TQString& );
private:
- QLineEdit *mInputWidget;
- QString mValue;
- QString mTypeName;
+ TQLineEdit *mInputWidget;
+ TQString mValue;
+ TQString mTypeName;
};
#endif
diff --git a/kode/kwsdl/kung/timeinputfield.cpp b/kode/kwsdl/kung/timeinputfield.cpp
index 0864b8c17..9da18a0cc 100644
--- a/kode/kwsdl/kung/timeinputfield.cpp
+++ b/kode/kwsdl/kung/timeinputfield.cpp
@@ -23,13 +23,13 @@
#include "timeinputfield.h"
-TimeInputField::TimeInputField( const QString &name, const Schema::SimpleType *type )
+TimeInputField::TimeInputField( const TQString &name, const Schema::SimpleType *type )
: SimpleInputField( name, type ),
- mValue( QTime::currentTime() )
+ mValue( TQTime::currentTime() )
{
}
-void TimeInputField::setXMLData( const QDomElement &element )
+void TimeInputField::setXMLData( const TQDomElement &element )
{
if ( mName != element.tagName() ) {
qDebug( "TimeInputField: Wrong dom element passed: expected %s, got %s", mName.latin1(), element.tagName().latin1() );
@@ -39,39 +39,39 @@ void TimeInputField::setXMLData( const QDomElement &element )
setData( element.text() );
}
-void TimeInputField::xmlData( QDomDocument &document, QDomElement &parent )
+void TimeInputField::xmlData( TQDomDocument &document, TQDomElement &parent )
{
- QDomElement element = document.createElement( mName );
+ TQDomElement element = document.createElement( mName );
element.setAttribute( "xsi:type", "xsd:time" );
- QDomText text = document.createTextNode( data() );
+ TQDomText text = document.createTextNode( data() );
element.appendChild( text );
parent.appendChild( element );
}
-void TimeInputField::setData( const QString &data )
+void TimeInputField::setData( const TQString &data )
{
- mValue = QTime::fromString( data, Qt::ISODate );
+ mValue = TQTime::fromString( data, Qt::ISODate );
}
-QString TimeInputField::data() const
+TQString TimeInputField::data() const
{
return mValue.toString( Qt::ISODate );
}
-QWidget *TimeInputField::createWidget( QWidget *parent )
+TQWidget *TimeInputField::createWidget( TQWidget *parent )
{
mInputWidget = new KTimeWidget( parent );
mInputWidget->setTime( mValue );
- connect( mInputWidget, SIGNAL( valueChanged( const QTime& ) ),
- this, SLOT( inputChanged( const QTime& ) ) );
+ connect( mInputWidget, TQT_SIGNAL( valueChanged( const TQTime& ) ),
+ this, TQT_SLOT( inputChanged( const TQTime& ) ) );
return mInputWidget;
}
-void TimeInputField::inputChanged( const QTime &time )
+void TimeInputField::inputChanged( const TQTime &time )
{
mValue = time;
diff --git a/kode/kwsdl/kung/timeinputfield.h b/kode/kwsdl/kung/timeinputfield.h
index 6edf9540e..c363151de 100644
--- a/kode/kwsdl/kung/timeinputfield.h
+++ b/kode/kwsdl/kung/timeinputfield.h
@@ -22,8 +22,8 @@
#ifndef TIME_INPUTFIELD_H
#define TIME_INPUTFIELD_H
-#include <qdatetime.h>
-#include <qobject.h>
+#include <tqdatetime.h>
+#include <tqobject.h>
#include "inputfield.h"
@@ -34,22 +34,22 @@ class TimeInputField : public SimpleInputField
Q_OBJECT
public:
- TimeInputField( const QString &name, const Schema::SimpleType *type );
+ TimeInputField( const TQString &name, const Schema::SimpleType *type );
- virtual void setXMLData( const QDomElement &element );
- virtual void xmlData( QDomDocument &document, QDomElement &parent );
+ virtual void setXMLData( const TQDomElement &element );
+ virtual void xmlData( TQDomDocument &document, TQDomElement &parent );
- virtual void setData( const QString &data );
- virtual QString data() const;
+ virtual void setData( const TQString &data );
+ virtual TQString data() const;
- virtual QWidget *createWidget( QWidget *parent );
+ virtual TQWidget *createWidget( TQWidget *parent );
private slots:
- void inputChanged( const QTime& );
+ void inputChanged( const TQTime& );
private:
KTimeWidget *mInputWidget;
- QTime mValue;
+ TQTime mValue;
};
#endif
diff --git a/kode/kwsdl/kung/transport.cpp b/kode/kwsdl/kung/transport.cpp
index 5cb414c99..fd7e545e1 100644
--- a/kode/kwsdl/kung/transport.cpp
+++ b/kode/kwsdl/kung/transport.cpp
@@ -22,18 +22,18 @@
#include <kdebug.h>
-Transport::Transport( const QString &url )
+Transport::Transport( const TQString &url )
{
mUrl = url;
qDebug( "url=%s", url.latin1() );
}
-void Transport::query( const QString &xml )
+void Transport::query( const TQString &xml )
{
mData.truncate( 0 );
- QByteArray postData;
- QDataStream stream( postData, IO_WriteOnly );
+ TQByteArray postData;
+ TQDataStream stream( postData, IO_WriteOnly );
stream.writeRawBytes( xml.utf8(), xml.utf8().length() );
KIO::TransferJob* job = KIO::http_post( KURL( mUrl ), postData, false );
@@ -45,11 +45,11 @@ void Transport::query( const QString &xml )
job->addMetaData( "UserAgent", "KDE Kung" );
job->addMetaData( "content-type", "Content-Type: text/xml; charset=utf-8" );
- connect( job, SIGNAL( data( KIO::Job*, const QByteArray& ) ), this, SLOT( slotData( KIO::Job*, const QByteArray& ) ) );
- connect( job, SIGNAL( result( KIO::Job* ) ), this, SLOT( slotResult( KIO::Job* ) ) );
+ connect( job, TQT_SIGNAL( data( KIO::Job*, const TQByteArray& ) ), this, TQT_SLOT( slotData( KIO::Job*, const TQByteArray& ) ) );
+ connect( job, TQT_SIGNAL( result( KIO::Job* ) ), this, TQT_SLOT( slotResult( KIO::Job* ) ) );
}
-void Transport::slotData( KIO::Job*, const QByteArray &data )
+void Transport::slotData( KIO::Job*, const TQByteArray &data )
{
unsigned int oldSize = mData.size();
mData.resize( oldSize + data.size() );
@@ -61,7 +61,7 @@ void Transport::slotResult( KIO::Job* job )
if ( job->error() != 0 )
emit error( job->errorText() );
else
- emit result( QString::fromUtf8( mData.data(), mData.size() ) );
+ emit result( TQString::fromUtf8( mData.data(), mData.size() ) );
}
diff --git a/kode/kwsdl/kung/transport.h b/kode/kwsdl/kung/transport.h
index 5b7662fe1..240755d18 100644
--- a/kode/kwsdl/kung/transport.h
+++ b/kode/kwsdl/kung/transport.h
@@ -20,7 +20,7 @@
#ifndef TRANSPORT_H
#define TRANSPORT_H
-#include <qobject.h>
+#include <tqobject.h>
#include <kio/job.h>
class Transport : public QObject
@@ -28,20 +28,20 @@ class Transport : public QObject
Q_OBJECT
public:
- Transport( const QString &url );
- void query( const QString &xml );
+ Transport( const TQString &url );
+ void query( const TQString &xml );
signals:
- void result( const QString &xml );
- void error( const QString &errorMsg );
+ void result( const TQString &xml );
+ void error( const TQString &errorMsg );
private slots:
- void slotData( KIO::Job*, const QByteArray &data );
+ void slotData( KIO::Job*, const TQByteArray &data );
void slotResult( KIO::Job* job );
private:
- QString mUrl;
- QByteArray mData;
+ TQString mUrl;
+ TQByteArray mData;
};
#endif
diff --git a/kode/kwsdl/kung/wsclconversationmanager.cpp b/kode/kwsdl/kung/wsclconversationmanager.cpp
index c553edee6..b4f4f9c73 100644
--- a/kode/kwsdl/kung/wsclconversationmanager.cpp
+++ b/kode/kwsdl/kung/wsclconversationmanager.cpp
@@ -35,7 +35,7 @@ void WSCLConversationManager::setConversation( const WSCL::Conversation &convers
mConversation = conversation;
}
-QStringList WSCLConversationManager::nextActions( const QString &currentAction, const QString &condition )
+TQStringList WSCLConversationManager::nextActions( const TQString &currentAction, const TQString &condition )
{
WSCL::Transition::List transitions = mConversation.transitions();
WSCL::Transition::List::ConstIterator it;
@@ -46,5 +46,5 @@ QStringList WSCLConversationManager::nextActions( const QString &currentAction,
}
}
- return QStringList();
+ return TQStringList();
}
diff --git a/kode/kwsdl/kung/wsclconversationmanager.h b/kode/kwsdl/kung/wsclconversationmanager.h
index eb02ab708..cdd19f312 100644
--- a/kode/kwsdl/kung/wsclconversationmanager.h
+++ b/kode/kwsdl/kung/wsclconversationmanager.h
@@ -34,7 +34,7 @@ class WSCLConversationManager : public ConversationManager
void setConversation( const WSCL::Conversation &conversation );
- QStringList nextActions( const QString &currentAction, const QString &condition = QString() );
+ TQStringList nextActions( const TQString &currentAction, const TQString &condition = TQString() );
private:
WSCL::Conversation mConversation;
diff --git a/kode/kwsdl/main.cpp b/kode/kwsdl/main.cpp
index c793dde79..aff51ec4d 100644
--- a/kode/kwsdl/main.cpp
+++ b/kode/kwsdl/main.cpp
@@ -27,9 +27,9 @@
#include <kdebug.h>
#include <klocale.h>
-#include <qdir.h>
-#include <qfile.h>
-#include <qtimer.h>
+#include <tqdir.h>
+#include <tqfile.h>
+#include <tqtimer.h>
static const KCmdLineOptions options[] =
{
@@ -61,9 +61,9 @@ int main( int argc, char **argv )
KApplication app( false, false );
- QString outputDirectory = QFile::decodeName( args->getOption( "directory" ) );
+ TQString outputDirectory = TQFile::decodeName( args->getOption( "directory" ) );
if ( outputDirectory.isEmpty() )
- outputDirectory = QDir::current().path();
+ outputDirectory = TQDir::current().path();
KWSDL::Compiler compiler;
compiler.setWSDLUrl( args->url( 0 ).path() );
@@ -71,7 +71,7 @@ int main( int argc, char **argv )
if ( args->isSet( "namespace" ) )
compiler.setNameSpace( args->getOption( "namespace" ) );
- QTimer::singleShot( 0, &compiler, SLOT( run() ) );
+ TQTimer::singleShot( 0, &compiler, TQT_SLOT( run() ) );
return app.exec();
}
diff --git a/kode/kwsdl/message.cpp b/kode/kwsdl/message.cpp
index ee1abbc06..227441c35 100644
--- a/kode/kwsdl/message.cpp
+++ b/kode/kwsdl/message.cpp
@@ -27,7 +27,7 @@ Message::Part::Part()
{
}
-Message::Part::Part( const QString &name, const QString &type )
+Message::Part::Part( const TQString &name, const TQString &type )
: mName( name ), mType( type )
{
}
@@ -36,17 +36,17 @@ Message::Message()
{
}
-Message::Message( const QString &name )
+Message::Message( const TQString &name )
: mName( name )
{
}
-void Message::setName( const QString &name )
+void Message::setName( const TQString &name )
{
mName = name;
}
-QString Message::name() const
+TQString Message::name() const
{
return mName;
}
@@ -56,7 +56,7 @@ void Message::addPart( const Part &part )
mParts.append( part );
}
-Message::Part Message::part( const QString &name ) const
+Message::Part Message::part( const TQString &name ) const
{
Part::List::ConstIterator it;
for ( it = mParts.begin(); it != mParts.end(); ++it )
diff --git a/kode/kwsdl/message.h b/kode/kwsdl/message.h
index c8b1d4eda..23a3cba77 100644
--- a/kode/kwsdl/message.h
+++ b/kode/kwsdl/message.h
@@ -22,47 +22,47 @@
#ifndef KWSDL_MESSAGE_H
#define KWSDL_MESSAGE_H
-#include <qmap.h>
+#include <tqmap.h>
namespace KWSDL {
class Message
{
public:
- typedef QValueList<Message> List;
+ typedef TQValueList<Message> List;
class Part
{
public:
- typedef QMap<QString, Part> Map;
- typedef QValueList<Part> List;
+ typedef TQMap<TQString, Part> Map;
+ typedef TQValueList<Part> List;
Part();
- Part( const QString &name, const QString &type );
+ Part( const TQString &name, const TQString &type );
- 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 setType( const QString &type ) { mType = type; }
- QString type() const { return mType; }
+ void setType( const TQString &type ) { mType = type; }
+ TQString type() const { return mType; }
private:
- QString mName;
- QString mType;
+ TQString mName;
+ TQString mType;
};
Message();
- Message( const QString &name );
+ Message( const TQString &name );
- void setName( const QString &name );
- QString name() const;
+ void setName( const TQString &name );
+ TQString name() const;
void addPart( const Part &part );
- Part part( const QString &name ) const;
+ Part part( const TQString &name ) const;
Part::List parts() const;
private:
- QString mName;
+ TQString mName;
Part::List mParts;
};
diff --git a/kode/kwsdl/namemapper.cpp b/kode/kwsdl/namemapper.cpp
index e11d2ef0c..426498f5c 100644
--- a/kode/kwsdl/namemapper.cpp
+++ b/kode/kwsdl/namemapper.cpp
@@ -28,7 +28,7 @@ NameMapper::NameMapper()
mKeyWords << "delete" << "class" << "default" << "new" << "not";
}
-QString NameMapper::escape( const QString &name ) const
+TQString NameMapper::escape( const TQString &name ) const
{
if ( mKeyWords.contains( name ) )
return "_" + name;
@@ -36,7 +36,7 @@ QString NameMapper::escape( const QString &name ) const
return name;
}
-QString NameMapper::unescape( const QString &name ) const
+TQString NameMapper::unescape( const TQString &name ) const
{
if ( name.startsWith( "_" ) )
return name.mid( 1 );
diff --git a/kode/kwsdl/namemapper.h b/kode/kwsdl/namemapper.h
index 88c29a49d..af10aec7e 100644
--- a/kode/kwsdl/namemapper.h
+++ b/kode/kwsdl/namemapper.h
@@ -22,7 +22,7 @@
#ifndef KWSDL_NAMEMAPPER_H
#define KWSDL_NAMEMAPPER_H
-#include <qstringlist.h>
+#include <tqstringlist.h>
namespace KWSDL {
@@ -31,11 +31,11 @@ class NameMapper
public:
NameMapper();
- QString escape( const QString &name ) const;
- QString unescape( const QString &name ) const;
+ TQString escape( const TQString &name ) const;
+ TQString unescape( const TQString &name ) const;
private:
- QStringList mKeyWords;
+ TQStringList mKeyWords;
};
}
diff --git a/kode/kwsdl/parser.cpp b/kode/kwsdl/parser.cpp
index ab168b579..49f77eca4 100644
--- a/kode/kwsdl/parser.cpp
+++ b/kode/kwsdl/parser.cpp
@@ -19,13 +19,13 @@
Boston, MA 02110-1301, USA.
*/
-#include <qdom.h>
+#include <tqdom.h>
#include "parser.h"
using namespace KWSDL;
-static QString sns( const QString &str )
+static TQString sns( const TQString &str )
{
int pos = str.find( ':' );
if ( pos != -1 )
@@ -59,18 +59,18 @@ void Parser::reset()
mParser.clear();
}
-void Parser::setSchemaBaseUrl( const QString &url )
+void Parser::setSchemaBaseUrl( const TQString &url )
{
mParser.setSchemaBaseUrl( url );
}
-void Parser::parse( const QDomElement &root )
+void Parser::parse( const TQDomElement &root )
{
reset();
- QDomNode node = root.firstChild();
+ TQDomNode node = root.firstChild();
while ( !node.isNull() ) {
- QDomElement element = node.toElement();
+ TQDomElement element = node.toElement();
if ( !element.isNull() ) {
if ( element.tagName() == "types" )
parseTypes( element );
@@ -94,11 +94,11 @@ void Parser::parse( const QDomElement &root )
}
}
-void Parser::parseTypes( const QDomElement &parent )
+void Parser::parseTypes( const TQDomElement &parent )
{
- QDomNode node = parent.firstChild();
+ TQDomNode node = parent.firstChild();
while ( !node.isNull() ) {
- QDomElement element = node.toElement();
+ TQDomElement element = node.toElement();
if ( !element.isNull() ) {
if ( element.tagName() == "schema" )
mParser.parseSchemaTag( element );
@@ -108,16 +108,16 @@ void Parser::parseTypes( const QDomElement &parent )
}
}
-void Parser::parseMessage( const QDomElement &parent, Message &message )
+void Parser::parseMessage( const TQDomElement &parent, Message &message )
{
- QDomNode node = parent.firstChild();
+ TQDomNode node = parent.firstChild();
while ( !node.isNull() ) {
- QDomElement element = node.toElement();
+ TQDomElement element = node.toElement();
if ( !element.isNull() ) {
if ( element.tagName() == "part" ) {
// HACK(groupwise): is element valid here as attribute?
- QString type = sns( element.attribute( "type" ) );
+ TQString type = sns( element.attribute( "type" ) );
if ( type.isEmpty() )
type = sns( element.attribute( "element" ) );
@@ -130,18 +130,18 @@ void Parser::parseMessage( const QDomElement &parent, Message &message )
}
}
-void Parser::parsePortType( const QDomElement &parent, Port &port )
+void Parser::parsePortType( const TQDomElement &parent, Port &port )
{
- QDomNode node = parent.firstChild();
+ TQDomNode node = parent.firstChild();
while ( !node.isNull() ) {
- QDomElement element = node.toElement();
+ TQDomElement element = node.toElement();
if ( !element.isNull() ) {
if ( element.tagName() == "operation" ) {
- QString input, output;
+ TQString input, output;
- QDomNode childNode = element.firstChild();
+ TQDomNode childNode = element.firstChild();
while ( !childNode.isNull() ) {
- QDomElement childElement = childNode.toElement();
+ TQDomElement childElement = childNode.toElement();
if ( !childElement.isNull() ) {
if ( childElement.tagName() == "input" )
input = sns( childElement.attribute( "message" ) );
@@ -161,13 +161,13 @@ void Parser::parsePortType( const QDomElement &parent, Port &port )
}
}
-void Parser::parseBinding( const QDomElement &parent )
+void Parser::parseBinding( const TQDomElement &parent )
{
Binding binding( sns( parent.attribute( "name" ) ), sns( parent.attribute( "type" ) ) );
- QDomNode node = parent.firstChild();
+ TQDomNode node = parent.firstChild();
while ( !node.isNull() ) {
- QDomElement element = node.toElement();
+ TQDomElement element = node.toElement();
if ( !element.isNull() ) {
if ( element.tagName() == "binding" ) {
binding.setStyle( element.attribute( "style" ) );
@@ -176,14 +176,14 @@ void Parser::parseBinding( const QDomElement &parent )
Binding::Operation operation;
operation.setName( element.attribute( "name" ) );
- QDomNode opNode = element.firstChild();
+ TQDomNode opNode = element.firstChild();
while ( !opNode.isNull() ) {
- QDomElement opElement = opNode.toElement();
+ TQDomElement opElement = opNode.toElement();
if ( !opElement.isNull() ) {
if ( opElement.tagName() == "operation" )
operation.setAction( opElement.attribute( "soapAction" ) );
else if ( opElement.tagName() == "input" ) {
- QDomElement inputElement = opElement.firstChild().toElement();
+ TQDomElement inputElement = opElement.firstChild().toElement();
Binding::Operation::Item input;
input.setUse( inputElement.attribute( "use" ) );
@@ -192,7 +192,7 @@ void Parser::parseBinding( const QDomElement &parent )
operation.setInput( input );
} else if ( opElement.tagName() == "output" ) {
- QDomElement outputElement = opElement.firstChild().toElement();
+ TQDomElement outputElement = opElement.firstChild().toElement();
Binding::Operation::Item output;
output.setUse( outputElement.attribute( "use" ) );
@@ -216,19 +216,19 @@ void Parser::parseBinding( const QDomElement &parent )
mBindings.append( binding );
}
-void Parser::parseService( const QDomElement &parent )
+void Parser::parseService( const TQDomElement &parent )
{
- QDomNode node = parent.firstChild();
+ TQDomNode node = parent.firstChild();
while ( !node.isNull() ) {
- QDomElement element = node.toElement();
+ TQDomElement element = node.toElement();
if ( !element.isNull() ) {
if ( element.tagName() == "port" ) {
Service::Port port;
port.mName = sns( element.attribute( "name" ) );
port.mBinding = sns( element.attribute( "binding" ) );
- QDomNode childNode = element.firstChild();
+ TQDomNode childNode = element.firstChild();
if ( !childNode.isNull() ) {
- QDomElement childElement = childNode.toElement();
+ TQDomElement childElement = childNode.toElement();
port.mLocation = childElement.attribute( "location" );
}
mService.addPort( port );
diff --git a/kode/kwsdl/parser.h b/kode/kwsdl/parser.h
index f075efa70..1fd6856f0 100644
--- a/kode/kwsdl/parser.h
+++ b/kode/kwsdl/parser.h
@@ -22,8 +22,8 @@
#ifndef KWSDL_PARSER_H
#define KWSDL_PARSER_H
-#include <qdom.h>
-#include <qvaluelist.h>
+#include <tqdom.h>
+#include <tqvaluelist.h>
#include <schema/parser.h>
@@ -36,21 +36,21 @@ class Parser
public:
Parser();
- void parse( const QDomElement &element );
+ void parse( const TQDomElement &element );
void reset();
- void setSchemaBaseUrl( const QString& );
+ void setSchemaBaseUrl( const TQString& );
WSDL wsdl() const;
private:
- void parseTypes( const QDomElement& );
- void parseMessage( const QDomElement&, Message& );
- void parsePortType( const QDomElement&, Port& );
- void parseBinding( const QDomElement& );
- void parseService( const QDomElement& );
+ void parseTypes( const TQDomElement& );
+ void parseMessage( const TQDomElement&, Message& );
+ void parsePortType( const TQDomElement&, Port& );
+ void parseBinding( const TQDomElement& );
+ void parseService( const TQDomElement& );
- void parseSchema( const QDomElement& );
+ void parseSchema( const TQDomElement& );
Binding::List mBindings;
Message::List mMessages;
diff --git a/kode/kwsdl/port.cpp b/kode/kwsdl/port.cpp
index 90381f9df..d28654db7 100644
--- a/kode/kwsdl/port.cpp
+++ b/kode/kwsdl/port.cpp
@@ -27,7 +27,7 @@ Port::Operation::Operation()
{
}
-Port::Operation::Operation( const QString &name, const QString &input, const QString &output )
+Port::Operation::Operation( const TQString &name, const TQString &input, const TQString &output )
: mName( name ), mInput( input ), mOutput( output )
{
}
@@ -36,7 +36,7 @@ Port::Port()
{
}
-Port::Port( const QString &name )
+Port::Port( const TQString &name )
: mName( name )
{
}
@@ -46,7 +46,7 @@ void Port::addOperation( const Operation &operation )
mOperations.append( operation );
}
-Port::Operation Port::operation( const QString &name ) const
+Port::Operation Port::operation( const TQString &name ) const
{
Operation::List::ConstIterator it;
for ( it = mOperations.begin(); it != mOperations.end(); ++it )
diff --git a/kode/kwsdl/port.h b/kode/kwsdl/port.h
index b0e982086..fe99295c1 100644
--- a/kode/kwsdl/port.h
+++ b/kode/kwsdl/port.h
@@ -22,51 +22,51 @@
#ifndef KWSDL_PORT_H
#define KWSDL_PORT_H
-#include <qmap.h>
+#include <tqmap.h>
namespace KWSDL {
class Port
{
public:
- typedef QValueList<Port> List;
+ typedef TQValueList<Port> List;
class Operation
{
public:
- typedef QValueList<Operation> List;
- typedef QMap<QString, Operation> Map;
+ typedef TQValueList<Operation> List;
+ typedef TQMap<TQString, Operation> Map;
Operation();
- Operation( const QString &name, const QString &input, const QString &output );
+ Operation( const TQString &name, const TQString &input, const TQString &output );
- 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 setInput( const QString &input ) { mInput = input; }
- QString input() const { return mInput; }
+ void setInput( const TQString &input ) { mInput = input; }
+ TQString input() const { return mInput; }
- void setOutput( const QString &output ) { mOutput = output; }
- QString output() const { return mOutput; }
+ void setOutput( const TQString &output ) { mOutput = output; }
+ TQString output() const { return mOutput; }
private:
- QString mName;
- QString mInput;
- QString mOutput;
+ TQString mName;
+ TQString mInput;
+ TQString mOutput;
};
Port();
- Port( const QString &name );
+ Port( const TQString &name );
- 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 addOperation( const Operation &operation );
- Operation operation( const QString &name ) const;
+ Operation operation( const TQString &name ) const;
Operation::List operations() const;
private:
- QString mName;
+ TQString mName;
Operation::List mOperations;
};
diff --git a/kode/kwsdl/schema/attribute.cpp b/kode/kwsdl/schema/attribute.cpp
index 9be9be790..5637f35cd 100644
--- a/kode/kwsdl/schema/attribute.cpp
+++ b/kode/kwsdl/schema/attribute.cpp
@@ -25,8 +25,8 @@
using namespace Schema;
-Attribute::Attribute( const QString &name, int type, bool qualified,
- const QString &defaultValue, const QString &fixedValue,
+Attribute::Attribute( const TQString &name, int type, bool qualified,
+ const TQString &defaultValue, const TQString &fixedValue,
bool use )
: mName( name ), mType( type ), mQualified( qualified ),
mDefaultValue( defaultValue ), mFixedValue( fixedValue ),
@@ -39,7 +39,7 @@ Attribute::Attribute()
{
}
-QString Attribute::name() const
+TQString Attribute::name() const
{
return mName;
}
@@ -49,22 +49,22 @@ int Attribute::type() const
return mType;
}
-void Attribute::setTypeName( const QString &typeName )
+void Attribute::setTypeName( const TQString &typeName )
{
mTypeName = typeName;
}
-QString Attribute::typeName() const
+TQString Attribute::typeName() const
{
return mTypeName;
}
-QString Attribute::defaultValue() const
+TQString Attribute::defaultValue() const
{
return mDefaultValue;
}
-QString Attribute::fixedValue() const
+TQString Attribute::fixedValue() const
{
return mFixedValue;
}
diff --git a/kode/kwsdl/schema/attribute.h b/kode/kwsdl/schema/attribute.h
index 62db99d7d..d7bdf364e 100644
--- a/kode/kwsdl/schema/attribute.h
+++ b/kode/kwsdl/schema/attribute.h
@@ -23,43 +23,43 @@
#ifndef SCHEMA_ATTRIBUTE_H
#define SCHEMA_ATTRIBUTE_H
-#include <qstring.h>
-#include <qvaluelist.h>
+#include <tqstring.h>
+#include <tqvaluelist.h>
namespace Schema {
class Attribute
{
public:
- typedef QValueList<Attribute> List;
- typedef QValueList<Attribute*> PtrList;
+ typedef TQValueList<Attribute> List;
+ typedef TQValueList<Attribute*> PtrList;
Attribute();
- Attribute( const QString &name, int type, bool qualified = false,
- const QString &defaultValue = QString(),
- const QString &fixedValue = QString(),
+ Attribute( const TQString &name, int type, bool qualified = false,
+ const TQString &defaultValue = TQString(),
+ const TQString &fixedValue = TQString(),
bool use = true );
- QString name() const;
+ TQString name() const;
int type() const;
- void setTypeName( const QString &typeName );
- QString typeName() const;
+ void setTypeName( const TQString &typeName );
+ TQString typeName() const;
- QString defaultValue() const;
- QString fixedValue() const;
+ TQString defaultValue() const;
+ TQString fixedValue() const;
bool isQualified() const;
bool isUsed() const;
private:
- QString mName;
+ TQString mName;
int mType;
- QString mTypeName;
+ TQString mTypeName;
bool mQualified;
- QString mDefaultValue;
- QString mFixedValue;
+ TQString mDefaultValue;
+ TQString mFixedValue;
bool mUse;
};
diff --git a/kode/kwsdl/schema/complextype.cpp b/kode/kwsdl/schema/complextype.cpp
index 418fdf92f..51ed2ad08 100644
--- a/kode/kwsdl/schema/complextype.cpp
+++ b/kode/kwsdl/schema/complextype.cpp
@@ -24,7 +24,7 @@
using namespace Schema;
-ComplexType::ComplexType( const QString &nameSpace )
+ComplexType::ComplexType( const TQString &nameSpace )
: mNameSpace( nameSpace ), mType ( 0 ), mContentModel( COMPLEX ),
mMixed( false ), mAnonymous( false ), mIsArray( false ), mContentType( 0 ),
mTopLevelGroup( ALL ), mCurrentGroup( 0 ), mPreviousGroup( 0 ),
@@ -50,7 +50,7 @@ ComplexType::~ComplexType()
{
}
-QString ComplexType::name() const
+TQString ComplexType::name() const
{
return mName;
}
@@ -62,12 +62,12 @@ QualifiedName ComplexType::qualifiedName() const
return qn;
}
-void ComplexType::setDocumentation( const QString &documentation )
+void ComplexType::setDocumentation( const TQString &documentation )
{
mDocumentation = documentation;
}
-QString ComplexType::documentation() const
+TQString ComplexType::documentation() const
{
return mDocumentation;
}
@@ -97,7 +97,7 @@ int ComplexType::attributeType( int index )
return attribute( index )->type();
}
-QString ComplexType::attributeName( int index )
+TQString ComplexType::attributeName( int index )
{
return attribute( index )->name();
}
@@ -107,7 +107,7 @@ int ComplexType::elementType( int index )
return element( index )->type();
}
-QString ComplexType::elementName( int index )
+TQString ComplexType::elementName( int index )
{
return element( index )->name();
}
@@ -127,12 +127,12 @@ bool ComplexType::isAnonymous() const
return mAnonymous;
}
-void ComplexType::setBaseTypeName( const QString &baseTypeName )
+void ComplexType::setBaseTypeName( const TQString &baseTypeName )
{
mBaseType.name = baseTypeName;
}
-QString ComplexType::baseTypeName() const
+TQString ComplexType::baseTypeName() const
{
return mBaseType.name;
}
@@ -157,7 +157,7 @@ ComplexType::Compositor ComplexType::groupType( int groupId ) const
return mGroups[ groupId ].type;
}
-const Element *ComplexType::element( const QString &name )
+const Element *ComplexType::element( const TQString &name )
{
Element::List::ConstIterator it;
for ( it = mElements.begin(); it != mElements.end(); ++it ) {
@@ -183,7 +183,7 @@ Element *ComplexType::element( int id )
return 0;
}
-const Attribute *ComplexType::attribute( const QString &name )
+const Attribute *ComplexType::attribute( const TQString &name )
{
Attribute::List::ConstIterator it;
for ( it = mAttributes.begin(); it != mAttributes.end(); ++it ) {
@@ -254,7 +254,7 @@ void ComplexType::setAnonymous( bool anonymous )
mAnonymous = anonymous;
}
-void ComplexType::setName( const QString &name )
+void ComplexType::setName( const TQString &name )
{
mName = name;
}
@@ -274,8 +274,8 @@ void ComplexType::setContentModel( int model )
mMixed = false;
}
-void ComplexType::addAttribute( const QString &name, int type_id, bool qualified,
- const QString &defaultValue, const QString &fixedValue,
+void ComplexType::addAttribute( const TQString &name, int type_id, bool qualified,
+ const TQString &defaultValue, const TQString &fixedValue,
bool use )
{
if ( type_id == 0 ) {
@@ -295,15 +295,15 @@ void ComplexType::addAttribute( const QString &name, int type_id, bool qualified
void ComplexType::addAttributeRef( const QualifiedName &name, bool qualified, bool use )
{
- addAttribute( name.localName(), XSDType::ANYTYPE, qualified, QString(), QString(), use );
+ addAttribute( name.localName(), XSDType::ANYTYPE, qualified, TQString(), TQString(), use );
mForwardAttributeRef = true;
}
-void ComplexType::addElement( const QString &name, int type_id, int minOccurs,
+void ComplexType::addElement( const TQString &name, int type_id, int minOccurs,
int maxOccurs, bool qualified,
- const QString &defaultValue, const QString &fixedValue,
- const QString &documentation )
+ const TQString &defaultValue, const TQString &fixedValue,
+ const TQString &documentation )
{
if ( type_id == 0 ) {
qDebug( "ComplexType:addElement() :No type given for element " );
@@ -332,7 +332,7 @@ void ComplexType::addElementRef( const QualifiedName &name, int minOccurs, int m
mForwardElementRef = true;
}
-void ComplexType::matchElementRef( const QString &name, Element &element )
+void ComplexType::matchElementRef( const TQString &name, Element &element )
{
if ( mForwardElementRef ) {
Element *elementPtr = (Element*)this->element( name );
@@ -350,7 +350,7 @@ void ComplexType::matchElementRef( const QString &name, Element &element )
}
}
-void ComplexType::matchAttributeRef( const QString &name, Attribute &attribute )
+void ComplexType::matchAttributeRef( const TQString &name, Attribute &attribute )
{
if ( mForwardAttributeRef ) {
Attribute *attributePtr = (Attribute*)this->attribute( name );
diff --git a/kode/kwsdl/schema/complextype.h b/kode/kwsdl/schema/complextype.h
index 8664e007a..39db08b69 100644
--- a/kode/kwsdl/schema/complextype.h
+++ b/kode/kwsdl/schema/complextype.h
@@ -23,7 +23,7 @@
#ifndef SCHEMA_COMPLEXTYPE_H
#define SCHEMA_COMPLEXTYPE_H
-#include <qstring.h>
+#include <tqstring.h>
#include "attribute.h"
#include "element.h"
@@ -35,7 +35,7 @@ namespace Schema {
class ComplexType : public XSDType
{
public:
- typedef QValueList<ComplexType> List;
+ typedef TQValueList<ComplexType> List;
typedef enum {
SEQ = 0,
@@ -49,16 +49,16 @@ class ComplexType : public XSDType
} Derivation;
ComplexType();
- ComplexType( const QString& );
+ ComplexType( const TQString& );
~ComplexType();
- void setName( const QString &name );
- QString name() const;
+ void setName( const TQString &name );
+ TQString name() const;
QualifiedName qualifiedName() const;
- void setDocumentation( const QString &documentation );
- QString documentation() const;
+ void setDocumentation( const TQString &documentation );
+ TQString documentation() const;
void setType( int type );
int type() const;
@@ -72,10 +72,10 @@ class ComplexType : public XSDType
bool isSimple() const;
int attributeType( int index );
- QString attributeName( int index );
+ TQString attributeName( int index );
int elementType( int index );
- QString elementName( int index );
+ TQString elementName( int index );
int numElements() const;
int numAttributes() const;
@@ -84,17 +84,17 @@ class ComplexType : public XSDType
bool isAnonymous() const;
void setBaseType( int type, Derivation derivation, const XSDType *ptr );
- void setBaseTypeName( const QString &baseTypeName );
+ void setBaseTypeName( const TQString &baseTypeName );
int baseType() const;
int baseDerivation() const;
- QString baseTypeName() const;
+ TQString baseTypeName() const;
Compositor topLevelGroup() const;
Compositor groupType( int groupId ) const;
- const Element *element( const QString &name );
- const Attribute *attribute( const QString &name );
+ const Element *element( const TQString &name );
+ const Attribute *attribute( const TQString &name );
Element *element( int id );
Attribute *attribute( int id );
@@ -109,29 +109,29 @@ class ComplexType : public XSDType
void setCompositor( Compositor type, bool open = true, int minOccurs = 1, int maxOccurs = 1 );
- void addAttribute( const QString &name, int type_id, bool qualified = false,
- const QString &defaultValue = QString(),
- const QString &fixedValue = QString(),
+ void addAttribute( const TQString &name, int type_id, bool qualified = false,
+ const TQString &defaultValue = TQString(),
+ const TQString &fixedValue = TQString(),
bool use = false );
void addAttributeRef( const QualifiedName &name, bool qualified, bool use );
- void addElement( const QString &name, int type_id, int minOccurs = 1,
+ void addElement( const TQString &name, int type_id, int minOccurs = 1,
int maxOccurs = 1, bool qualified = false,
- const QString &defaultValue = QString(),
- const QString &fixedValue = QString(),
- const QString &documentation = QString() );
+ const TQString &defaultValue = TQString(),
+ const TQString &fixedValue = TQString(),
+ const TQString &documentation = TQString() );
void addElementRef( const QualifiedName &name, int minOccurs, int maxOccurs );
- void matchAttributeRef( const QString &name, Attribute &attribute );
- void matchElementRef( const QString &name, Element &element );
+ void matchAttributeRef( const TQString &name, Attribute &attribute );
+ void matchElementRef( const TQString &name, Element &element );
bool checkOccurrences();
void resetCounters();
private:
- QString mName;
- QString mNameSpace;
- QString mDocumentation;
+ TQString mName;
+ TQString mNameSpace;
+ TQString mDocumentation;
int mType;
Element::List mElements;
@@ -148,7 +148,7 @@ class ComplexType : public XSDType
int typeId;
Derivation derivation;
const XSDType *type;
- QString name;
+ TQString name;
} mBaseType;
struct CompositorStruct
@@ -167,7 +167,7 @@ class ComplexType : public XSDType
int maxOccurs;
};
- QValueList<struct CompositorStruct> mGroups;
+ TQValueList<struct CompositorStruct> mGroups;
Compositor mTopLevelGroup;
int mCurrentGroup;
diff --git a/kode/kwsdl/schema/element.cpp b/kode/kwsdl/schema/element.cpp
index bfb745e2b..d8edbee9d 100644
--- a/kode/kwsdl/schema/element.cpp
+++ b/kode/kwsdl/schema/element.cpp
@@ -31,15 +31,15 @@ Element::Element()
{
}
-Element::Element( const QString &name, int type, int minOccurs, int maxOccurs,
- bool qualified, const QString &defaultValue, const QString &fixedValue )
+Element::Element( const TQString &name, int type, int minOccurs, int maxOccurs,
+ bool qualified, const TQString &defaultValue, const TQString &fixedValue )
: mName( name ), mType( type ), mMinOccurs( minOccurs ), mMaxOccurs( maxOccurs ),
mQualified( qualified ), mDefaultValue( defaultValue ), mFixedValue( fixedValue ),
mOccurrence( 0 )
{
}
-QString Element::name() const
+TQString Element::name() const
{
return mName;
}
@@ -54,22 +54,22 @@ int Element::type() const
return mType;
}
-void Element::setTypeName( const QString &typeName )
+void Element::setTypeName( const TQString &typeName )
{
mTypeName = typeName;
}
-QString Element::typeName() const
+TQString Element::typeName() const
{
return mTypeName;
}
-void Element::setDocumentation( const QString &documentation )
+void Element::setDocumentation( const TQString &documentation )
{
mDocumentation = documentation;
}
-QString Element::documentation() const
+TQString Element::documentation() const
{
return mDocumentation;
}
@@ -104,12 +104,12 @@ int Element::maxOccurs() const
return mMaxOccurs;
}
-QString Element::defaultValue() const
+TQString Element::defaultValue() const
{
return mDefaultValue;
}
-QString Element::fixedValue() const
+TQString Element::fixedValue() const
{
return mFixedValue;
}
diff --git a/kode/kwsdl/schema/element.h b/kode/kwsdl/schema/element.h
index 6335693f6..dfd886b41 100644
--- a/kode/kwsdl/schema/element.h
+++ b/kode/kwsdl/schema/element.h
@@ -23,8 +23,8 @@
#ifndef SCHEMA_ELEMENT_H
#define SCHEMA_ELEMENT_H
-#include <qstring.h>
-#include <qvaluelist.h>
+#include <tqstring.h>
+#include <tqvaluelist.h>
#define UNBOUNDED 1000
@@ -33,25 +33,25 @@ namespace Schema {
class Element
{
public:
- typedef QValueList<Element> List;
- typedef QValueList<Element*> PtrList;
+ typedef TQValueList<Element> List;
+ typedef TQValueList<Element*> PtrList;
Element();
- Element( const QString &name, int type, int minOccurs = 1, int maxOccurs = 1,
- bool qualified = false, const QString &defaultValue = QString(),
- const QString &fixedValue = QString() );
+ Element( const TQString &name, int type, int minOccurs = 1, int maxOccurs = 1,
+ bool qualified = false, const TQString &defaultValue = TQString(),
+ const TQString &fixedValue = TQString() );
- QString name() const;
+ TQString name() const;
void setType( int id );
int type() const;
- void setTypeName( const QString &typeName );
- QString typeName() const;
+ void setTypeName( const TQString &typeName );
+ TQString typeName() const;
- void setDocumentation( const QString &documentation );
- QString documentation() const;
+ void setDocumentation( const TQString &documentation );
+ TQString documentation() const;
void setGroupId( int group );
int groupId() const;
@@ -62,8 +62,8 @@ class Element
void setMaxOccurs( int maxOccurs );
int maxOccurs() const;
- QString defaultValue() const;
- QString fixedValue() const;
+ TQString defaultValue() const;
+ TQString fixedValue() const;
bool isQualified() const;
@@ -71,15 +71,15 @@ class Element
int occurrence() const;
private:
- QString mName;
+ TQString mName;
int mType;
- QString mTypeName;
- QString mDocumentation;
+ TQString mTypeName;
+ TQString mDocumentation;
int mMinOccurs;
int mMaxOccurs;
bool mQualified;
- QString mDefaultValue;
- QString mFixedValue;
+ TQString mDefaultValue;
+ TQString mFixedValue;
int mGroupId;
int mOccurrence;
};
diff --git a/kode/kwsdl/schema/fileprovider.cpp b/kode/kwsdl/schema/fileprovider.cpp
index 642592bf4..2a7448c4f 100644
--- a/kode/kwsdl/schema/fileprovider.cpp
+++ b/kode/kwsdl/schema/fileprovider.cpp
@@ -21,9 +21,9 @@
#include <unistd.h>
-#include <qapplication.h>
-#include <qeventloop.h>
-#include <qfile.h>
+#include <tqapplication.h>
+#include <tqeventloop.h>
+#include <tqfile.h>
#include <kio/job.h>
#include <ktempfile.h>
@@ -33,11 +33,11 @@
using namespace Schema;
FileProvider::FileProvider()
- : QObject( 0 ), mBlocked( false )
+ : TQObject( 0 ), mBlocked( false )
{
}
-bool FileProvider::get( const QString &url, QString &target )
+bool FileProvider::get( const TQString &url, TQString &target )
{
if ( !mFileName.isEmpty() )
cleanUp();
@@ -53,14 +53,14 @@ bool FileProvider::get( const QString &url, QString &target )
qDebug( "Downloading external schema '%s'", url.latin1() );
KIO::TransferJob* job = KIO::get( KURL( url ), false, false );
- connect( job, SIGNAL( data( KIO::Job*, const QByteArray& ) ),
- this, SLOT( slotData( KIO::Job*, const QByteArray& ) ) );
- connect( job, SIGNAL( result( KIO::Job* ) ),
- this, SLOT( slotResult( KIO::Job* ) ) );
+ connect( job, TQT_SIGNAL( data( KIO::Job*, const TQByteArray& ) ),
+ this, TQT_SLOT( slotData( KIO::Job*, const TQByteArray& ) ) );
+ connect( job, TQT_SIGNAL( result( KIO::Job* ) ),
+ this, TQT_SLOT( slotResult( KIO::Job* ) ) );
mBlocked = true;
while ( mBlocked ) {
- qApp->eventLoop()->processEvents( QEventLoop::ExcludeUserInput );
+ qApp->eventLoop()->processEvents( TQEventLoop::ExcludeUserInput );
usleep( 500 );
}
@@ -69,11 +69,11 @@ bool FileProvider::get( const QString &url, QString &target )
void FileProvider::cleanUp()
{
- ::unlink( QFile::encodeName( mFileName ) );
- mFileName = QString();
+ ::unlink( TQFile::encodeName( mFileName ) );
+ mFileName = TQString();
}
-void FileProvider::slotData( KIO::Job*, const QByteArray &data )
+void FileProvider::slotData( KIO::Job*, const TQByteArray &data )
{
unsigned int oldSize = mData.size();
mData.resize( oldSize + data.size() );
@@ -87,7 +87,7 @@ void FileProvider::slotResult( KIO::Job *job )
return;
}
- QFile file( mFileName );
+ TQFile file( mFileName );
if ( !file.open( IO_WriteOnly ) ) {
qDebug( "Unable to create temporary file" );
return;
diff --git a/kode/kwsdl/schema/fileprovider.h b/kode/kwsdl/schema/fileprovider.h
index 8b2903c50..c665c3dac 100644
--- a/kode/kwsdl/schema/fileprovider.h
+++ b/kode/kwsdl/schema/fileprovider.h
@@ -22,7 +22,7 @@
#ifndef SCHEMA_FILEPROVIDER_H
#define SCHEMA_FILEPROVIDER_H
-#include <qobject.h>
+#include <tqobject.h>
namespace KIO {
class Job;
@@ -37,16 +37,16 @@ class FileProvider : QObject
public:
FileProvider();
- bool get( const QString &url, QString &target );
+ bool get( const TQString &url, TQString &target );
void cleanUp();
private slots:
- void slotData( KIO::Job*, const QByteArray& );
+ void slotData( KIO::Job*, const TQByteArray& );
void slotResult( KIO::Job* );
private:
- QString mFileName;
- QByteArray mData;
+ TQString mFileName;
+ TQByteArray mData;
bool mBlocked;
};
diff --git a/kode/kwsdl/schema/parser.cpp b/kode/kwsdl/schema/parser.cpp
index ec0daabe4..7ec3804f8 100644
--- a/kode/kwsdl/schema/parser.cpp
+++ b/kode/kwsdl/schema/parser.cpp
@@ -20,20 +20,20 @@
Boston, MA 02110-1301, USA.
*/
-#include <qdir.h>
-#include <qfile.h>
-#include <qurl.h>
+#include <tqdir.h>
+#include <tqfile.h>
+#include <tqurl.h>
#include "fileprovider.h"
#include "parser.h"
using namespace Schema;
-const QString soapEncUri = "http://schemas.xmlsoap.org/soap/encoding/";
-const QString wsdlUri = "http://schemas.xmlsoap.org/wsdl/";
+const TQString soapEncUri = "http://schemas.xmlsoap.org/soap/encoding/";
+const TQString wsdlUri = "http://schemas.xmlsoap.org/wsdl/";
-Parser::Parser( const QString &nameSpace )
+Parser::Parser( const TQString &nameSpace )
: mNameSpace( nameSpace )
{
mElementQualified = false;
@@ -113,24 +113,24 @@ void Parser::clear()
delete mAttributes[ i ];
}
-void Parser::setSchemaBaseUrl( const QString &url )
+void Parser::setSchemaBaseUrl( const TQString &url )
{
mSchemaBaseUrl = url;
}
-void Parser::parseNameSpace( const QDomElement &element )
+void Parser::parseNameSpace( const TQDomElement &element )
{
- QDomNamedNodeMap attributes = element.attributes();
+ TQDomNamedNodeMap attributes = element.attributes();
for ( uint i = 0; i < attributes.count(); ++i ) {
- QDomNode node = attributes.item( i );
- QDomAttr attribute = node.toAttr();
+ TQDomNode node = attributes.item( i );
+ TQDomAttr attribute = node.toAttr();
if ( attribute.name().startsWith( "xmlns:" ) )
mNameSpaceMap.insert( attribute.value(), attribute.name().mid( 6 ) );
}
}
-bool Parser::parseSchemaTag( const QDomElement &root )
+bool Parser::parseSchemaTag( const TQDomElement &root )
{
QualifiedName name = root.tagName();
if ( name.localName() != "schema" )
@@ -140,7 +140,7 @@ bool Parser::parseSchemaTag( const QDomElement &root )
mNameSpace = root.attribute( "targetNamespace" );
if ( root.hasAttribute( "elementFormDefault" ) ) {
- const QString value = root.attribute( "elementFormDefault" );
+ const TQString value = root.attribute( "elementFormDefault" );
if ( value == "unqualified" )
mElementQualified = false;
else if ( value == "qualified" )
@@ -156,9 +156,9 @@ bool Parser::parseSchemaTag( const QDomElement &root )
m_tnsPrefix = xParser->getNamespacePrefix(i);
*/
- QDomNode node = root.firstChild();
+ TQDomNode node = root.firstChild();
while ( !node.isNull() ) {
- QDomElement element = node.toElement();
+ TQDomElement element = node.toElement();
if ( !element.isNull() ) {
QualifiedName name = element.tagName();
@@ -195,9 +195,9 @@ bool Parser::parseSchemaTag( const QDomElement &root )
return true;
}
-void Parser::parseImport( const QDomElement &element )
+void Parser::parseImport( const TQDomElement &element )
{
- QString location = element.attribute( "schemaLocation" );
+ TQString location = element.attribute( "schemaLocation" );
if ( !location.isEmpty() ) {
// don't import a schema twice
if ( mImportedSchemas.contains( location ) )
@@ -209,15 +209,15 @@ void Parser::parseImport( const QDomElement &element )
}
}
-void Parser::parseAnnotation( const QDomElement& )
+void Parser::parseAnnotation( const TQDomElement& )
{
}
-void Parser::parseAnnotation( const QDomElement &element, QString &documentation )
+void Parser::parseAnnotation( const TQDomElement &element, TQString &documentation )
{
- QDomNode node = element.firstChild();
+ TQDomNode node = element.firstChild();
while ( !node.isNull() ) {
- QDomElement childElement = node.toElement();
+ TQDomElement childElement = node.toElement();
if ( !childElement.isNull() ) {
QualifiedName name = childElement.tagName();
if ( name.localName() == "documentation" )
@@ -228,11 +228,11 @@ void Parser::parseAnnotation( const QDomElement &element, QString &documentation
}
}
-void Parser::parseAnnotation( const QDomElement &element, ComplexType *complexType )
+void Parser::parseAnnotation( const TQDomElement &element, ComplexType *complexType )
{
- QDomNode node = element.firstChild();
+ TQDomNode node = element.firstChild();
while ( !node.isNull() ) {
- QDomElement childElement = node.toElement();
+ TQDomElement childElement = node.toElement();
if ( !childElement.isNull() ) {
QualifiedName name = childElement.tagName();
if ( name.localName() == "documentation" )
@@ -243,11 +243,11 @@ void Parser::parseAnnotation( const QDomElement &element, ComplexType *complexTy
}
}
-void Parser::parseAnnotation( const QDomElement &element, SimpleType *simpleType )
+void Parser::parseAnnotation( const TQDomElement &element, SimpleType *simpleType )
{
- QDomNode node = element.firstChild();
+ TQDomNode node = element.firstChild();
while ( !node.isNull() ) {
- QDomElement childElement = node.toElement();
+ TQDomElement childElement = node.toElement();
if ( !childElement.isNull() ) {
QualifiedName name = childElement.tagName();
if ( name.localName() == "documentation" )
@@ -258,7 +258,7 @@ void Parser::parseAnnotation( const QDomElement &element, SimpleType *simpleType
}
}
-XSDType *Parser::parseComplexType( const QDomElement &element )
+XSDType *Parser::parseComplexType( const TQDomElement &element )
{
ComplexType *newType = new ComplexType( mNameSpace );
@@ -266,9 +266,9 @@ XSDType *Parser::parseComplexType( const QDomElement &element )
if ( element.hasAttribute( "mixed" ) )
newType->setContentModel( newType->MIXED );
- QDomNode node = element.firstChild();
+ TQDomNode node = element.firstChild();
while ( !node.isNull() ) {
- QDomElement childElement = node.toElement();
+ TQDomElement childElement = node.toElement();
if ( !childElement.isNull() ) {
QualifiedName name = childElement.tagName();
@@ -297,18 +297,18 @@ XSDType *Parser::parseComplexType( const QDomElement &element )
return newType;
}
-void Parser::all( const QDomElement &element, ComplexType * ct )
+void Parser::all( const TQDomElement &element, ComplexType * ct )
{
int min, max;
- QString tmp;
+ TQString tmp;
min = element.attribute( "minOccurs", "1" ).toInt();
max = element.attribute( "maxOccurs", "1" ).toInt();
ct->setCompositor( ct->ALL, true, min, max );
- QDomNode node = element.firstChild();
+ TQDomNode node = element.firstChild();
while ( !node.isNull() ) {
- QDomElement childElement = node.toElement();
+ TQDomElement childElement = node.toElement();
if ( !childElement.isNull() ) {
QualifiedName name = childElement.tagName();
@@ -332,14 +332,14 @@ void Parser::all( const QDomElement &element, ComplexType * ct )
}
-void Parser::cs( const QDomElement &element, ComplexType *ct )
+void Parser::cs( const TQDomElement &element, ComplexType *ct )
{
int min = 1, max = 1;
QualifiedName name = element.tagName();
if ( name.localName() == "choice" || name.localName() == "sequence" ) {
min = element.attribute( "minOccurs", "1" ).toInt();
- QString value = element.attribute( "maxOccurs", "1" );
+ TQString value = element.attribute( "maxOccurs", "1" );
if ( value == "unbounded" )
max = UNBOUNDED;
else
@@ -350,9 +350,9 @@ void Parser::cs( const QDomElement &element, ComplexType *ct )
else
ct->setCompositor( ct->SEQ, true, min, max );
- QDomNode node = element.firstChild();
+ TQDomNode node = element.firstChild();
while ( !node.isNull() ) {
- QDomElement childElement = node.toElement();
+ TQDomElement childElement = node.toElement();
if ( !childElement.isNull() ) {
QualifiedName csName = childElement.tagName();
if ( csName.localName() == "element" )
@@ -377,9 +377,9 @@ void Parser::cs( const QDomElement &element, ComplexType *ct )
return;
}
-void Parser::addElement( const QDomElement &element, ComplexType *cType )
+void Parser::addElement( const TQDomElement &element, ComplexType *cType )
{
- QString name, fixedValue, defaultValue, documentation;
+ TQString name, fixedValue, defaultValue, documentation;
QualifiedName refName;
int type_id = 0, minOccurs = 1, maxOccurs = 1;
bool qualified = false, added = false, nill = false;
@@ -418,7 +418,7 @@ void Parser::addElement( const QDomElement &element, ComplexType *cType )
}
minOccurs = element.attribute( "minOccurs", "1" ).toInt();
- QString value = element.attribute( "maxOccurs", "1" );
+ TQString value = element.attribute( "maxOccurs", "1" );
if ( value == "unbounded" )
maxOccurs = UNBOUNDED;
else
@@ -430,9 +430,9 @@ void Parser::addElement( const QDomElement &element, ComplexType *cType )
if ( element.hasAttribute( "nillable" ) )
nill = true;
- QDomNode node = element.firstChild();
+ TQDomNode node = element.firstChild();
while ( !node.isNull() ) {
- QDomElement childElement = node.toElement();
+ TQDomElement childElement = node.toElement();
if ( !childElement.isNull() ) {
QualifiedName childName = childElement.tagName();
@@ -476,14 +476,14 @@ void Parser::addElement( const QDomElement &element, ComplexType *cType )
}
}
-void Parser::addAny( const QDomElement &element, ComplexType *cType )
+void Parser::addAny( const TQDomElement &element, ComplexType *cType )
{
- QString ns, any( "any" );
+ TQString ns, any( "any" );
int type_id = XSDType::ANY, min = 1, max = 1;
ns = element.attribute( "namespace" );
min = element.attribute( "minOccurs", "1" ).toInt();
- QString value = element.attribute( "maxOccurs", "1" );
+ TQString value = element.attribute( "maxOccurs", "1" );
if ( value == "unbounded" )
max = UNBOUNDED;
else
@@ -492,18 +492,18 @@ void Parser::addAny( const QDomElement &element, ComplexType *cType )
cType->addElement( any, type_id, min, max, false, ns );
}
-void Parser::addAnyAttribute( const QDomElement &element, ComplexType *cType )
+void Parser::addAnyAttribute( const TQDomElement &element, ComplexType *cType )
{
- QString ns, anyAttribute( "anyAttribute" );
+ TQString ns, anyAttribute( "anyAttribute" );
ns = element.attribute( "namespace" );
cType->addAttribute( anyAttribute, XSDType::ANY, false, ns );
}
-void Parser::addAttribute( const QDomElement &element, ComplexType *cType )
+void Parser::addAttribute( const TQDomElement &element, ComplexType *cType )
{
- QString name, fixedVal, defaultVal;
+ TQString name, fixedVal, defaultVal;
int type_id = 0;
bool qualified = false, use = false, added = false;
QualifiedName refAttribute;
@@ -553,9 +553,9 @@ void Parser::addAttribute( const QDomElement &element, ComplexType *cType )
use = true;
}
- QDomNode node = element.firstChild();
+ TQDomNode node = element.firstChild();
while ( !node.isNull() ) {
- QDomElement childElement = node.toElement();
+ TQDomElement childElement = node.toElement();
if ( !childElement.isNull() ) {
QualifiedName childName = childElement.tagName();
@@ -579,7 +579,7 @@ void Parser::addAttribute( const QDomElement &element, ComplexType *cType )
cType->addAttributeRef( refAttribute, qualified, use );
}
-XSDType *Parser::parseSimpleType( const QDomElement &element )
+XSDType *Parser::parseSimpleType( const TQDomElement &element )
{
SimpleType *st = new SimpleType( mNameSpace );
@@ -587,9 +587,9 @@ XSDType *Parser::parseSimpleType( const QDomElement &element )
st->setName( element.attribute( "name" ) );
- QDomNode node = element.firstChild();
+ TQDomNode node = element.firstChild();
while ( !node.isNull() ) {
- QDomElement childElement = node.toElement();
+ TQDomElement childElement = node.toElement();
if ( !childElement.isNull() ) {
QualifiedName name = childElement.tagName();
@@ -624,14 +624,14 @@ XSDType *Parser::parseSimpleType( const QDomElement &element )
return st;
}
-void Parser::parseRestriction( const QDomElement &element, SimpleType *st )
+void Parser::parseRestriction( const TQDomElement &element, SimpleType *st )
{
if ( st->baseType() == 0 )
qDebug( "<restriction>:unkown BaseType" );
- QDomNode node = element.firstChild();
+ TQDomNode node = element.firstChild();
while ( !node.isNull() ) {
- QDomElement childElement = node.toElement();
+ TQDomElement childElement = node.toElement();
if ( !childElement.isNull() ) {
if ( !st->isValidFacet( childElement.tagName() ) ) {
@@ -646,7 +646,7 @@ void Parser::parseRestriction( const QDomElement &element, SimpleType *st )
}
}
-void Parser::parseComplexContent( const QDomElement &element, ComplexType *ct )
+void Parser::parseComplexContent( const TQDomElement &element, ComplexType *ct )
{
QualifiedName typeName;
@@ -657,9 +657,9 @@ void Parser::parseComplexContent( const QDomElement &element, ComplexType *ct )
ct->setContentModel( ct->COMPLEX );
- QDomNode node = element.firstChild();
+ TQDomNode node = element.firstChild();
while ( !node.isNull() ) {
- QDomElement childElement = node.toElement();
+ TQDomElement childElement = node.toElement();
if ( !childElement.isNull() ) {
QualifiedName name = childElement.tagName();
@@ -680,16 +680,16 @@ void Parser::parseComplexContent( const QDomElement &element, ComplexType *ct )
// if the base soapenc:Array, then read only the arrayType attribute and nothing else
if ( typeName.localName() == "Array" ) {
- QDomElement arrayElement = childElement.firstChild().toElement();
+ TQDomElement arrayElement = childElement.firstChild().toElement();
ct->setIsArray( true );
QualifiedName arrayType( arrayElement.attribute( "arrayType" ) );
// arrayType.setNamespace(xParser->getNamespace(arrayType.getPrefix()));
ct->addElement( "item", typeId( arrayType, true ), 0, UNBOUNDED );
} else {
- QDomNode childNode = childElement.firstChild();
+ TQDomNode childNode = childElement.firstChild();
while ( !childNode.isNull() ) {
- QDomElement ctElement = childNode.toElement();
+ TQDomElement ctElement = childNode.toElement();
if ( !ctElement.isNull() ) {
QualifiedName name = ctElement.tagName();
@@ -716,11 +716,11 @@ void Parser::parseComplexContent( const QDomElement &element, ComplexType *ct )
}
}
-void Parser::parseSimpleContent( const QDomElement &element, ComplexType *ct )
+void Parser::parseSimpleContent( const TQDomElement &element, ComplexType *ct )
{
ct->setContentModel( ct->SIMPLE );
- const QDomElement childElement = element.firstChild().toElement();
+ const TQDomElement childElement = element.firstChild().toElement();
QualifiedName name = childElement.tagName();
if ( name.localName() == "restriction" ) {
@@ -753,9 +753,9 @@ void Parser::parseSimpleContent( const QDomElement &element, ComplexType *ct )
// typeName.setNamespace(xParser->getNamespace(typeName.getPrefix()));
ct->setContentType( basetype_id = typeId( typeName, true ) );
- QDomNode childNode = childElement.firstChild();
+ TQDomNode childNode = childElement.firstChild();
while ( !childNode.isNull() ) {
- QDomElement ctElement = childNode.toElement();
+ TQDomElement ctElement = childNode.toElement();
if ( !ctElement.isNull() ) {
QualifiedName name = ctElement.tagName();
if ( name.localName() == "attribute" )
@@ -776,7 +776,7 @@ bool Parser::isBasicType( int type ) const
return true;
}
-void Parser::parseElement( const QDomElement &element )
+void Parser::parseElement( const TQDomElement &element )
{
ComplexType *ct = new ComplexType( mNameSpace );
addElement( element, ct );
@@ -793,7 +793,7 @@ void Parser::parseElement( const QDomElement &element )
mElements.append( elementPtr );
}
-void Parser::parseAttribute( const QDomElement &element )
+void Parser::parseAttribute( const TQDomElement &element )
{
ComplexType *ct = new ComplexType( mNameSpace );
addAttribute( element, ct );
@@ -805,7 +805,7 @@ void Parser::parseAttribute( const QDomElement &element )
mAttributes.append( attributePtr );
}
-int Parser::addExternalElement( const QString &name, int localTypeId )
+int Parser::addExternalElement( const TQString &name, int localTypeId )
{
Element *element = new Element( name, localTypeId );
mElements.append( element );
@@ -817,7 +817,7 @@ int Parser::typeId( const QualifiedName &type, bool create )
{
QualifiedName typeName( type );
- QString typens = typeName.nameSpace();
+ TQString typens = typeName.nameSpace();
if ( typens.isEmpty() )
typeName.setNameSpace( typens = mNameSpace );
@@ -828,7 +828,7 @@ int Parser::typeId( const QualifiedName &type, bool create )
}
}
-QString Parser::typeName( int id ) const
+TQString Parser::typeName( int id ) const
{
return mTypesTable.typeName( id );
}
@@ -880,7 +880,7 @@ void Parser::resolveForwardDerivations()
int id;
ComplexType *type = 0;
- QValueList<ForwardDerivation>::ConstIterator it;
+ TQValueList<ForwardDerivation>::ConstIterator it;
for ( it = mForwardDerivations.begin(); it != mForwardDerivations.end(); ++it ) {
if ( ( id = typeId( (*it).type, false ) ) == 0 )
continue;
@@ -898,7 +898,7 @@ int Parser::elementId( const QualifiedName &type )
{
QualifiedName typeName( type );
- QString typens = typeName.nameSpace();
+ TQString typens = typeName.nameSpace();
if ( typens.isEmpty() )
typeName.setNameSpace( typens = mNameSpace );
@@ -930,7 +930,7 @@ Element *Parser::element( const QualifiedName &name ) const
{
QualifiedName elementName( name );
- QString typens = elementName.nameSpace();
+ TQString typens = elementName.nameSpace();
if ( typens.isEmpty() )
elementName.setNameSpace( typens = mNameSpace );
@@ -965,7 +965,7 @@ int Parser::attributeId( const QualifiedName &type ) const
{
QualifiedName typeName( type );
- QString typens = typeName.nameSpace();
+ TQString typens = typeName.nameSpace();
if ( typens.isEmpty() )
typeName.setNameSpace( typens = mNameSpace );
@@ -1012,7 +1012,7 @@ Attribute *Parser::attribute( const QualifiedName &name ) const
return 0;
}
-QString Parser::targetNamespace() const
+TQString Parser::targetNamespace() const
{
return mNameSpace;
}
@@ -1052,27 +1052,27 @@ bool Parser::shouldResolve()
return true;
}
-void Parser::importSchema( const QString &location )
+void Parser::importSchema( const TQString &location )
{
FileProvider provider;
- QString fileName;
- QString schemaLocation( location );
+ TQString fileName;
+ TQString schemaLocation( location );
- QUrl url( location );
- QDir dir( location );
+ TQUrl url( location );
+ TQDir dir( location );
if ( (url.protocol().isEmpty() || url.protocol() == "file") && dir.isRelative() )
schemaLocation = mSchemaBaseUrl + "/" + location;
if ( provider.get( schemaLocation, fileName ) ) {
- QFile file( fileName );
+ TQFile file( fileName );
if ( !file.open( IO_ReadOnly ) ) {
qDebug( "Unable to open file %s", file.name().latin1() );
return;
}
- QDomDocument doc( "kwsdl" );
- QString errorMsg;
+ TQDomDocument doc( "kwsdl" );
+ TQString errorMsg;
int errorLine, errorColumn;
bool ok = doc.setContent( &file, true, &errorMsg, &errorLine, &errorColumn );
if ( !ok ) {
@@ -1080,9 +1080,9 @@ void Parser::importSchema( const QString &location )
return;
}
- QDomNodeList nodes = doc.elementsByTagName( "schema" );
+ TQDomNodeList nodes = doc.elementsByTagName( "schema" );
if ( nodes.count() > 0 ) {
- QDomElement schemaElement = nodes.item( 0 ).toElement();
+ TQDomElement schemaElement = nodes.item( 0 ).toElement();
parseSchemaTag( schemaElement );
} else {
qDebug( "No schema tag found in schema file" );
diff --git a/kode/kwsdl/schema/parser.h b/kode/kwsdl/schema/parser.h
index afaf3dae6..3469e016b 100644
--- a/kode/kwsdl/schema/parser.h
+++ b/kode/kwsdl/schema/parser.h
@@ -23,8 +23,8 @@
#ifndef SCHEMA_PARSER_H
#define SCHEMA_PARSER_H
-#include <qdom.h>
-#include <qvaluelist.h>
+#include <tqdom.h>
+#include <tqvaluelist.h>
#include "types.h"
#include "typestable.h"
@@ -34,23 +34,23 @@ namespace Schema {
class Parser
{
public:
- Parser( const QString &nameSpace = QString() );
+ Parser( const TQString &nameSpace = TQString() );
~Parser();
Types types() const;
void clear();
- void setSchemaBaseUrl( const QString& );
+ void setSchemaBaseUrl( const TQString& );
- void parseNameSpace( const QDomElement &element );
- bool parseSchemaTag( const QDomElement &element );
+ void parseNameSpace( const TQDomElement &element );
+ bool parseSchemaTag( const TQDomElement &element );
const XSDType *type( const QualifiedName &type );
const XSDType *type( int id ) const;
int numTypes() const;
- QString typeName( int id ) const;
+ TQString typeName( int id ) const;
Element *element( const QualifiedName &element ) const;
Element *element( int id ) const;
@@ -61,7 +61,7 @@ class Parser
Attribute *attribute( int id ) const;
int numAttributes() const;
- QString targetNamespace() const;
+ TQString targetNamespace() const;
int typeId( const QualifiedName &name, bool create = false );
@@ -75,30 +75,30 @@ class Parser
int attributeType( const QualifiedName &type );
private:
- void parseImport( const QDomElement& );
- void parseElement( const QDomElement& );
- void parseAttribute( const QDomElement& );
+ void parseImport( const TQDomElement& );
+ void parseElement( const TQDomElement& );
+ void parseAttribute( const TQDomElement& );
- void parseAnnotation( const QDomElement& );
- void parseAnnotation( const QDomElement&, QString& );
- void parseAnnotation( const QDomElement&, ComplexType* );
- void parseAnnotation( const QDomElement&, SimpleType* );
- XSDType *parseComplexType( const QDomElement& );
+ void parseAnnotation( const TQDomElement& );
+ void parseAnnotation( const TQDomElement&, TQString& );
+ void parseAnnotation( const TQDomElement&, ComplexType* );
+ void parseAnnotation( const TQDomElement&, SimpleType* );
+ XSDType *parseComplexType( const TQDomElement& );
- void all( const QDomElement&, ComplexType* );
- void cs( const QDomElement&, ComplexType* );
+ void all( const TQDomElement&, ComplexType* );
+ void cs( const TQDomElement&, ComplexType* );
- void addElement( const QDomElement&, ComplexType* );
+ void addElement( const TQDomElement&, ComplexType* );
- void addAttribute( const QDomElement&, ComplexType* );
- void addAny( const QDomElement&, ComplexType* );
- void addAnyAttribute( const QDomElement&, ComplexType* );
- int addExternalElement( const QString&, int );
+ void addAttribute( const TQDomElement&, ComplexType* );
+ void addAny( const TQDomElement&, ComplexType* );
+ void addAnyAttribute( const TQDomElement&, ComplexType* );
+ int addExternalElement( const TQString&, int );
- XSDType *parseSimpleType( const QDomElement& );
- void parseRestriction( const QDomElement&, SimpleType* );
- void parseComplexContent( const QDomElement&, ComplexType* );
- void parseSimpleContent( const QDomElement&, ComplexType* );
+ XSDType *parseSimpleType( const TQDomElement& );
+ void parseRestriction( const TQDomElement&, SimpleType* );
+ void parseComplexContent( const TQDomElement&, ComplexType* );
+ void parseSimpleContent( const TQDomElement&, ComplexType* );
void resolveForwardElementRefs();
@@ -106,13 +106,13 @@ class Parser
void resolveForwardDerivations();
bool shouldResolve();
- void importSchema( const QString &location );
+ void importSchema( const TQString &location );
bool mElementQualified;
bool mAttributeQualified;
- QMap<QString, QString> mNameSpaceMap;
- QString mNameSpace;
- QString mPrefix;
+ TQMap<TQString, TQString> mNameSpaceMap;
+ TQString mNameSpace;
+ TQString mPrefix;
TypesTable mTypesTable;
Element::PtrList mElements;
@@ -127,9 +127,9 @@ class Parser
ComplexType::Derivation derivation;
} ForwardDerivation;
- QValueList<ForwardDerivation> mForwardDerivations;
- QStringList mImportedSchemas;
- QString mSchemaBaseUrl;
+ TQValueList<ForwardDerivation> mForwardDerivations;
+ TQStringList mImportedSchemas;
+ TQString mSchemaBaseUrl;
};
}
diff --git a/kode/kwsdl/schema/qualifiedname.cpp b/kode/kwsdl/schema/qualifiedname.cpp
index 5b19f1669..350bca32f 100644
--- a/kode/kwsdl/schema/qualifiedname.cpp
+++ b/kode/kwsdl/schema/qualifiedname.cpp
@@ -24,7 +24,7 @@
using namespace Schema;
-QualifiedName::QualifiedName( const QString &name )
+QualifiedName::QualifiedName( const TQString &name )
{
parse( name );
}
@@ -33,27 +33,27 @@ QualifiedName::QualifiedName()
{
}
-void QualifiedName::operator=( const QString &name )
+void QualifiedName::operator=( const TQString &name )
{
parse( name );
}
-QString QualifiedName::localName() const
+TQString QualifiedName::localName() const
{
return mLocalName;
}
-QString QualifiedName::prefix() const
+TQString QualifiedName::prefix() const
{
return mPrefix;
}
-void QualifiedName::setNameSpace( const QString &nameSpace )
+void QualifiedName::setNameSpace( const TQString &nameSpace )
{
mNameSpace = nameSpace;
}
-QString QualifiedName::nameSpace() const
+TQString QualifiedName::nameSpace() const
{
return mNameSpace;
}
@@ -63,7 +63,7 @@ bool QualifiedName::operator==( const QualifiedName &qn ) const
return (qn.nameSpace() == mNameSpace && qn.localName() == mLocalName );
}
-void QualifiedName::parse( const QString &str )
+void QualifiedName::parse( const TQString &str )
{
int pos = str.find( ':' );
if ( pos != -1 ) {
diff --git a/kode/kwsdl/schema/qualifiedname.h b/kode/kwsdl/schema/qualifiedname.h
index 5b2f59bcd..f879836cd 100644
--- a/kode/kwsdl/schema/qualifiedname.h
+++ b/kode/kwsdl/schema/qualifiedname.h
@@ -23,35 +23,35 @@
#ifndef SCHEMA_QUALIFIEDNAME_H
#define SCHEMA_QUALIFIEDNAME_H
-#include <qstring.h>
-#include <qvaluelist.h>
+#include <tqstring.h>
+#include <tqvaluelist.h>
namespace Schema {
class QualifiedName
{
public:
- typedef QValueList<QualifiedName> List;
+ typedef TQValueList<QualifiedName> List;
QualifiedName();
- QualifiedName( const QString &name );
+ QualifiedName( const TQString &name );
- void operator=( const QString &name );
+ void operator=( const TQString &name );
- QString localName() const;
- QString prefix() const;
+ TQString localName() const;
+ TQString prefix() const;
- void setNameSpace( const QString &nameSpace );
- QString nameSpace() const;
+ void setNameSpace( const TQString &nameSpace );
+ TQString nameSpace() const;
bool operator==( const QualifiedName& ) const;
private:
- void parse( const QString& );
+ void parse( const TQString& );
- QString mNameSpace;
- QString mLocalName;
- QString mPrefix;
+ TQString mNameSpace;
+ TQString mLocalName;
+ TQString mPrefix;
};
}
diff --git a/kode/kwsdl/schema/simpletype.cpp b/kode/kwsdl/schema/simpletype.cpp
index 6943563f4..d5dcf2fd9 100644
--- a/kode/kwsdl/schema/simpletype.cpp
+++ b/kode/kwsdl/schema/simpletype.cpp
@@ -31,7 +31,7 @@ SimpleType::SimpleType()
{
}
-SimpleType::SimpleType( const QString &nameSpace )
+SimpleType::SimpleType( const TQString &nameSpace )
: mNameSpace( nameSpace ), mBaseType( 0 ), mContentModel( SIMPLE ),
mRestriction( false ), mFacetId( NONE ), mAnonymous( false ),
mSubType( TypeRestriction ), mListType( INVALID )
@@ -42,12 +42,12 @@ SimpleType::~SimpleType()
{
}
-void SimpleType::setName( const QString &name )
+void SimpleType::setName( const TQString &name )
{
mName = name;
}
-QString SimpleType::name() const
+TQString SimpleType::name() const
{
return mName;
}
@@ -59,12 +59,12 @@ QualifiedName SimpleType::qualifiedName() const
return qn;
}
-void SimpleType::setDocumentation( const QString &documentation )
+void SimpleType::setDocumentation( const TQString &documentation )
{
mDocumentation = documentation;
}
-QString SimpleType::documentation() const
+TQString SimpleType::documentation() const
{
return mDocumentation;
}
@@ -90,12 +90,12 @@ int SimpleType::baseType() const
return mBaseType;
}
-void SimpleType::setBaseTypeName( const QString &baseTypeName )
+void SimpleType::setBaseTypeName( const TQString &baseTypeName )
{
mBaseTypeName = baseTypeName;
}
-QString SimpleType::baseTypeName() const
+TQString SimpleType::baseTypeName() const
{
return mBaseTypeName;
}
@@ -120,12 +120,12 @@ int SimpleType::listType() const
return mListType;
}
-void SimpleType::setListTypeName( const QString &name )
+void SimpleType::setListTypeName( const TQString &name )
{
mListTypeName = name;
}
-QString SimpleType::listTypeName() const
+TQString SimpleType::listTypeName() const
{
return mListTypeName;
}
@@ -150,7 +150,7 @@ bool SimpleType::isAnonymous() const
return mAnonymous;
}
-bool SimpleType::isValidFacet( const QString &facet )
+bool SimpleType::isValidFacet( const TQString &facet )
{
if ( mBaseType == 0 ) {
qDebug( "isValidFacet:Unknown base type" );
@@ -189,7 +189,7 @@ bool SimpleType::isValidFacet( const QString &facet )
return true;
}
-void SimpleType::setFacetValue( const QString &value )
+void SimpleType::setFacetValue( const TQString &value )
{
int number = -1;
@@ -255,7 +255,7 @@ int SimpleType::facetMaximumLength() const
return mFacetValue.lenRange.maxlen;
}
-QStringList SimpleType::facetEnums() const
+TQStringList SimpleType::facetEnums() const
{
return mEnums;
}
@@ -295,7 +295,7 @@ int SimpleType::facetFractionDigits() const
return mFacetValue.frac;
}
-QString SimpleType::facetPattern() const
+TQString SimpleType::facetPattern() const
{
return mFacetValue.pattern;
}
diff --git a/kode/kwsdl/schema/simpletype.h b/kode/kwsdl/schema/simpletype.h
index 12d129a48..b82145f71 100644
--- a/kode/kwsdl/schema/simpletype.h
+++ b/kode/kwsdl/schema/simpletype.h
@@ -23,7 +23,7 @@
#ifndef SCHEMA_SIMPLETYPE_H
#define SCHEMA_SIMPLETYPE_H
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include "qualifiedname.h"
#include "xsdtype.h"
@@ -33,7 +33,7 @@ namespace Schema {
class SimpleType : public XSDType
{
public:
- typedef QValueList<SimpleType> List;
+ typedef TQValueList<SimpleType> List;
enum FacetType
{
@@ -67,16 +67,16 @@ class SimpleType : public XSDType
};
SimpleType();
- SimpleType( const QString &nameSpace );
+ SimpleType( const TQString &nameSpace );
~SimpleType();
- void setName( const QString &name );
- QString name() const;
+ void setName( const TQString &name );
+ TQString name() const;
QualifiedName qualifiedName() const;
- void setDocumentation( const QString &documentation );
- QString documentation() const;
+ void setDocumentation( const TQString &documentation );
+ TQString documentation() const;
void setType( int type );
int type() const;
@@ -84,17 +84,17 @@ class SimpleType : public XSDType
void setBaseType( int baseType );
int baseType() const;
- void setBaseTypeName( const QString &baseTypeName );
- QString baseTypeName() const;
+ void setBaseTypeName( const TQString &baseTypeName );
+ TQString baseTypeName() const;
void setSubType( SubType subType );
SubType subType() const;
void setListType( int listType );
- void setListTypeName( const QString &name );
+ void setListTypeName( const TQString &name );
int listType() const;
- QString listTypeName() const;
+ TQString listTypeName() const;
void setContentModel( int contentModel );
int contentModel() const;
@@ -102,15 +102,15 @@ class SimpleType : public XSDType
void setAnonymous( bool anonymous );
bool isAnonymous() const;
- bool isValidFacet( const QString &facet );
- void setFacetValue( const QString &value );
+ bool isValidFacet( const TQString &facet );
+ void setFacetValue( const TQString &value );
int facetType() const;
int facetLength() const;
int facetMinimumLength() const;
int facetMaximumLength() const;
- QStringList facetEnums() const;
+ TQStringList facetEnums() const;
WhiteSpaceType facetWhiteSpace() const;
int facetMinimumInclusive() const;
int facetMaximumInclusive() const;
@@ -118,24 +118,24 @@ class SimpleType : public XSDType
int facetMaximumExclusive() const;
int facetTotalDigits() const;
int facetFractionDigits() const;
- QString facetPattern() const;
+ TQString facetPattern() const;
private:
- QString mName;
- QString mNameSpace;
- QString mDocumentation;
+ TQString mName;
+ TQString mNameSpace;
+ TQString mDocumentation;
int mType;
int mBaseType;
- QString mBaseTypeName;
+ TQString mBaseTypeName;
int mContentModel;
bool mRestriction;
int mFacetId;
bool mAnonymous;
- QStringList mEnums;
+ TQStringList mEnums;
SubType mSubType;
int mListType;
- QString mListTypeName;
+ TQString mListTypeName;
typedef struct
{
@@ -151,7 +151,7 @@ class SimpleType : public XSDType
} valRange;
int tot;
int frac;
- QString pattern;
+ TQString pattern;
} FacetValueType;
diff --git a/kode/kwsdl/schema/typestable.cpp b/kode/kwsdl/schema/typestable.cpp
index 8e0e66dd0..91a85f516 100644
--- a/kode/kwsdl/schema/typestable.cpp
+++ b/kode/kwsdl/schema/typestable.cpp
@@ -68,7 +68,7 @@ TypesTable::~TypesTable()
void TypesTable::clear()
{
- QMap<QString, int>::Iterator it;
+ TQMap<TQString, int>::Iterator it;
for ( it = mUserTypes.begin(); it != mUserTypes.end(); ++it )
delete typePtr( it.data() );
@@ -94,7 +94,7 @@ int TypesTable::extRefType( int index ) const
int TypesTable::addType( XSDType *type )
{
QualifiedName qn = type->qualifiedName();
- QString type_name( qn.localName() );
+ TQString type_name( qn.localName() );
int i = 0;
@@ -146,12 +146,12 @@ int TypesTable::typeId( const QualifiedName &name, bool create )
return typeId;
}
-QString TypesTable::typeName( int id ) const
+TQString TypesTable::typeName( int id ) const
{
if ( id < 0 )
- return QString();
+ return TQString();
- QMap<QString, int>::ConstIterator it;
+ TQMap<TQString, int>::ConstIterator it;
if ( id >= 0 && id <= XSDType::ANYURI ) {
for ( it = mBasicTypes.begin(); it != mBasicTypes.end(); ++it )
@@ -204,7 +204,7 @@ bool TypesTable::detectUndefinedTypes()
return false;
}
-void TypesTable::resolveForwardElementRefs( const QString &name, Element &element )
+void TypesTable::resolveForwardElementRefs( const TQString &name, Element &element )
{
for ( int i = 0; i < (int)mTypes.count(); i++ )
if ( mTypes[i] != 0 ) {
@@ -215,7 +215,7 @@ void TypesTable::resolveForwardElementRefs( const QString &name, Element &elemen
}
}
-void TypesTable::resolveForwardAttributeRefs( const QString &name, Attribute &attribute )
+void TypesTable::resolveForwardAttributeRefs( const TQString &name, Attribute &attribute )
{
for ( int i = 0; i < (int)mTypes.count(); i++ )
if ( mTypes[i] != 0 ) {
@@ -240,12 +240,12 @@ int TypesTable::numTypes() const
return mTypes.count();
}
-void TypesTable::setTargetNamespace( const QString &nameSpace )
+void TypesTable::setTargetNamespace( const TQString &nameSpace )
{
mNameSpace = nameSpace;
}
-QString TypesTable::targetNamespace() const
+TQString TypesTable::targetNamespace() const
{
return mNameSpace;
}
diff --git a/kode/kwsdl/schema/typestable.h b/kode/kwsdl/schema/typestable.h
index 6dfa378ed..a6ca8bf22 100644
--- a/kode/kwsdl/schema/typestable.h
+++ b/kode/kwsdl/schema/typestable.h
@@ -23,8 +23,8 @@
#ifndef SCHEMA_TYPESTABLE_H
#define SCHEMA_TYPESTABLE_H
-#include <qmap.h>
-#include <qstring.h>
+#include <tqmap.h>
+#include <tqstring.h>
#include "complextype.h"
#include "simpletype.h"
@@ -44,7 +44,7 @@ class TypesTable
int typeId( const QualifiedName &name, bool create = false );
- QString typeName( int id ) const;
+ TQString typeName( int id ) const;
int addExternalTypeId( const QualifiedName &type, XSDType *type );
@@ -52,8 +52,8 @@ class TypesTable
QualifiedName extRefName( int index ) const;
int extRefType( int index ) const;
- void resolveForwardElementRefs( const QString &name, Element &element );
- void resolveForwardAttributeRefs( const QString &name, Attribute &attribute );
+ void resolveForwardElementRefs( const TQString &name, Element &element );
+ void resolveForwardAttributeRefs( const TQString &name, Attribute &attribute );
XSDType *typePtr( int id ) const;
@@ -61,19 +61,19 @@ class TypesTable
bool detectUndefinedTypes();
- void setTargetNamespace( const QString &nameSpace );
- QString targetNamespace() const;
+ void setTargetNamespace( const TQString &nameSpace );
+ TQString targetNamespace() const;
private:
- QValueList<XSDType*> mTypes;
+ TQValueList<XSDType*> mTypes;
//maintains a map of all user defined type names and their ids
- QMap<QString, int> mUserTypes;
- QMap<QString, int> mBasicTypes;
+ TQMap<TQString, int> mUserTypes;
+ TQMap<TQString, int> mBasicTypes;
int mCurrentId;
- QString mNameSpace;
+ TQString mNameSpace;
struct ExternRef
{
@@ -81,7 +81,7 @@ class TypesTable
QualifiedName qname;
};
- QValueList<struct ExternRef> mExternRefs;
+ TQValueList<struct ExternRef> mExternRefs;
};
}
diff --git a/kode/kwsdl/schema/xsdtype.h b/kode/kwsdl/schema/xsdtype.h
index b1bc4a7f8..b1077ebe5 100644
--- a/kode/kwsdl/schema/xsdtype.h
+++ b/kode/kwsdl/schema/xsdtype.h
@@ -23,20 +23,20 @@
#ifndef SCHEMA_XSDTYPE_H
#define SCHEMA_XSDTYPE_H
-#include <qstring.h>
-#include <qvaluelist.h>
-#include <qmap.h>
+#include <tqstring.h>
+#include <tqvaluelist.h>
+#include <tqmap.h>
#include "qualifiedname.h"
namespace Schema {
-const QString SchemaUri = "http://www.w3.org/2001/XMLSchema";
+const TQString SchemaUri = "http://www.w3.org/2001/XMLSchema";
class XSDType
{
public:
- typedef QValueList<const XSDType*> List;
+ typedef TQValueList<const XSDType*> List;
enum
{
@@ -78,7 +78,7 @@ class XSDType
ANYURI
};
- XSDType( const QString& )
+ XSDType( const TQString& )
{
};
@@ -90,9 +90,9 @@ class XSDType
{
};
- virtual QString name() const = 0;
+ virtual TQString name() const = 0;
virtual QualifiedName qualifiedName() const = 0;
- virtual QString documentation() const = 0;
+ virtual TQString documentation() const = 0;
virtual int contentModel() const = 0;
virtual int type() const = 0;
virtual bool isAnonymous() const = 0;
@@ -102,8 +102,8 @@ class XSDType
return true;
}
- virtual void setName( const QString& ) = 0;
- virtual void setDocumentation( const QString& ) = 0;
+ virtual void setName( const TQString& ) = 0;
+ virtual void setDocumentation( const TQString& ) = 0;
virtual void setContentModel( int ) = 0;
virtual void setType( int ) = 0;
virtual void setAnonymous( bool ) = 0;
diff --git a/kode/kwsdl/service.cpp b/kode/kwsdl/service.cpp
index a34e1df49..a34cdb1d2 100644
--- a/kode/kwsdl/service.cpp
+++ b/kode/kwsdl/service.cpp
@@ -27,7 +27,7 @@ Service::Service()
{
}
-Service::Service( const QString &name )
+Service::Service( const TQString &name )
: mName( name )
{
}
@@ -37,7 +37,7 @@ void Service::addPort( const Port &port )
mPorts.insert( port.mName, port );
}
-Service::Port Service::port( const QString &name ) const
+Service::Port Service::port( const TQString &name ) const
{
return mPorts[ name ];
}
diff --git a/kode/kwsdl/service.h b/kode/kwsdl/service.h
index 25f00d9b4..e73db4bf9 100644
--- a/kode/kwsdl/service.h
+++ b/kode/kwsdl/service.h
@@ -22,8 +22,8 @@
#ifndef KWSDL_SERVICE_H
#define KWSDL_SERVICE_H
-#include <qmap.h>
-#include <qstringlist.h>
+#include <tqmap.h>
+#include <tqstringlist.h>
namespace KWSDL {
@@ -33,26 +33,26 @@ class Service
class Port
{
public:
- typedef QValueList<Port> List;
+ typedef TQValueList<Port> List;
- QString mName;
- QString mBinding;
- QString mLocation;
+ TQString mName;
+ TQString mBinding;
+ TQString mLocation;
};
Service();
- Service( const QString &name );
+ Service( const TQString &name );
- 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 addPort( const Port &port );
- Port port( const QString &name ) const;
+ Port port( const TQString &name ) const;
Port::List ports() const;
private:
- QString mName;
- QMap<QString, Port> mPorts;
+ TQString mName;
+ TQMap<TQString, Port> mPorts;
};
}
diff --git a/kode/kwsdl/tests/google/directorycategory.cpp b/kode/kwsdl/tests/google/directorycategory.cpp
index 87f9c5f1a..6a61dab53 100644
--- a/kode/kwsdl/tests/google/directorycategory.cpp
+++ b/kode/kwsdl/tests/google/directorycategory.cpp
@@ -25,24 +25,24 @@
#include "directorycategory.h"
#include <serializer.h>
-#include <qstring.h>
+#include <tqstring.h>
-void DirectoryCategory::setFullViewableName( QString* fullViewableName )
+void DirectoryCategory::setFullViewableName( TQString* fullViewableName )
{
mFullViewableName = fullViewableName;
}
-QString*DirectoryCategory::fullViewableName() const
+TQString*DirectoryCategory::fullViewableName() const
{
return mFullViewableName;
}
-void DirectoryCategory::setSpecialEncoding( QString* specialEncoding )
+void DirectoryCategory::setSpecialEncoding( TQString* specialEncoding )
{
mSpecialEncoding = specialEncoding;
}
-QString*DirectoryCategory::specialEncoding() const
+TQString*DirectoryCategory::specialEncoding() const
{
return mSpecialEncoding;
}
diff --git a/kode/kwsdl/tests/google/directorycategory.h b/kode/kwsdl/tests/google/directorycategory.h
index 0ce1c417d..82dadedc0 100644
--- a/kode/kwsdl/tests/google/directorycategory.h
+++ b/kode/kwsdl/tests/google/directorycategory.h
@@ -29,16 +29,16 @@ class QString;
class DirectoryCategory
{
public:
- void setFullViewableName( QString* fullViewableName );
- QString*fullViewableName() const;
- void setSpecialEncoding( QString* specialEncoding );
- QString*specialEncoding() const;
+ void setFullViewableName( TQString* fullViewableName );
+ TQString*fullViewableName() const;
+ void setSpecialEncoding( TQString* specialEncoding );
+ TQString*specialEncoding() const;
DirectoryCategory();
~DirectoryCategory();
private:
- QString*mFullViewableName;
- QString*mSpecialEncoding;
+ TQString*mFullViewableName;
+ TQString*mSpecialEncoding;
};
#endif
diff --git a/kode/kwsdl/tests/google/directorycategoryarray.cpp b/kode/kwsdl/tests/google/directorycategoryarray.cpp
index 724cf26cf..b8305222c 100644
--- a/kode/kwsdl/tests/google/directorycategoryarray.cpp
+++ b/kode/kwsdl/tests/google/directorycategoryarray.cpp
@@ -26,14 +26,14 @@
#include <serializer.h>
#include <directorycategory.h>
-#include <qptrlist.h>
+#include <tqptrlist.h>
-void DirectoryCategoryArray::setItems( QPtrList<DirectoryCategory>* items )
+void DirectoryCategoryArray::setItems( TQPtrList<DirectoryCategory>* items )
{
mItems = items;
}
-QPtrList<DirectoryCategory>*DirectoryCategoryArray::items() const
+TQPtrList<DirectoryCategory>*DirectoryCategoryArray::items() const
{
return mItems;
}
diff --git a/kode/kwsdl/tests/google/directorycategoryarray.h b/kode/kwsdl/tests/google/directorycategoryarray.h
index db19d9bfa..f4c279952 100644
--- a/kode/kwsdl/tests/google/directorycategoryarray.h
+++ b/kode/kwsdl/tests/google/directorycategoryarray.h
@@ -24,20 +24,20 @@
#ifndef DIRECTORYCATEGORYARRAY_H
#define DIRECTORYCATEGORYARRAY_H
-#include <qptrlist.h>
+#include <tqptrlist.h>
class DirectoryCategory;
class DirectoryCategoryArray
{
public:
- void setItems( QPtrList<DirectoryCategory>* items );
- QPtrList<DirectoryCategory>*items() const;
+ void setItems( TQPtrList<DirectoryCategory>* items );
+ TQPtrList<DirectoryCategory>*items() const;
DirectoryCategoryArray();
~DirectoryCategoryArray();
private:
- QPtrList<DirectoryCategory>*mItems;
+ TQPtrList<DirectoryCategory>*mItems;
};
#endif
diff --git a/kode/kwsdl/tests/google/googlesearch.cc b/kode/kwsdl/tests/google/googlesearch.cc
index 2e1374b47..5e26c769a 100644
--- a/kode/kwsdl/tests/google/googlesearch.cc
+++ b/kode/kwsdl/tests/google/googlesearch.cc
@@ -27,38 +27,38 @@
#include "resultelementarray.h"
GoogleSearch::GoogleSearch()
- : QObject( 0, "" )
+ : TQObject( 0, "" )
{
- connect( &mService, SIGNAL( doGetCachedPageResponse( QByteArray* ) ),
- this, SLOT( cachedPageResult( QByteArray* ) ) );
- connect( &mService, SIGNAL( doSpellingSuggestionResponse( QString* ) ),
- this, SLOT( spellingSuggestionResult( QString* ) ) );
- connect( &mService, SIGNAL( doGoogleSearchResponse( GoogleSearchResult* ) ),
- this, SLOT( googleSearchResult( GoogleSearchResult* ) ) );
+ connect( &mService, TQT_SIGNAL( doGetCachedPageResponse( TQByteArray* ) ),
+ this, TQT_SLOT( cachedPageResult( TQByteArray* ) ) );
+ connect( &mService, TQT_SIGNAL( doSpellingSuggestionResponse( TQString* ) ),
+ this, TQT_SLOT( spellingSuggestionResult( TQString* ) ) );
+ connect( &mService, TQT_SIGNAL( doGoogleSearchResponse( GoogleSearchResult* ) ),
+ this, TQT_SLOT( googleSearchResult( GoogleSearchResult* ) ) );
mKey = "";
}
-void GoogleSearch::cachedPage( const QString &url )
+void GoogleSearch::cachedPage( const TQString &url )
{
- mService.doGetCachedPage( new QString( mKey ), new QString( url ) );
+ mService.doGetCachedPage( new TQString( mKey ), new TQString( url ) );
}
-void GoogleSearch::spellingSuggestion( const QString &phrase )
+void GoogleSearch::spellingSuggestion( const TQString &phrase )
{
- mService.doSpellingSuggestion( new QString( mKey ), new QString( phrase ) );
+ mService.doSpellingSuggestion( new TQString( mKey ), new TQString( phrase ) );
}
-void GoogleSearch::googleSearch( const QString &query, int start, int maxResults, bool filter,
- const QString &restrict, bool safeSearch, const QString &lr, const QString &ie,
- const QString &oe )
+void GoogleSearch::googleSearch( const TQString &query, int start, int maxResults, bool filter,
+ const TQString &restrict, bool safeSearch, const TQString &lr, const TQString &ie,
+ const TQString &oe )
{
- mService.doGoogleSearch( new QString( mKey ), new QString( query ), new int( start ), new int( maxResults ),
- new bool( filter ), new QString( restrict ), new bool( safeSearch ), new QString( lr ),
- new QString( ie ), new QString( oe ) );
+ mService.doGoogleSearch( new TQString( mKey ), new TQString( query ), new int( start ), new int( maxResults ),
+ new bool( filter ), new TQString( restrict ), new bool( safeSearch ), new TQString( lr ),
+ new TQString( ie ), new TQString( oe ) );
}
-void GoogleSearch::cachedPageResult( QByteArray *array )
+void GoogleSearch::cachedPageResult( TQByteArray *array )
{
qDebug( "--------------- Cached Page Results ---------------------" );
qDebug( "%s", array->data() );
@@ -67,7 +67,7 @@ void GoogleSearch::cachedPageResult( QByteArray *array )
delete array;
}
-void GoogleSearch::spellingSuggestionResult( QString *word )
+void GoogleSearch::spellingSuggestionResult( TQString *word )
{
qDebug( "--------------- Spelling Suggestion ---------------------" );
qDebug( "%s", word->latin1() );
@@ -80,8 +80,8 @@ void GoogleSearch::googleSearchResult( GoogleSearchResult *result )
{
qDebug( "--------------------- Search Results ---------------------" );
ResultElementArray *array = result->resultElements();
- QPtrList<ResultElement> *list = array->items();
- QPtrListIterator<ResultElement> it( *list );
+ TQPtrList<ResultElement> *list = array->items();
+ TQPtrListIterator<ResultElement> it( *list );
while ( it.current() != 0 ) {
qDebug( "%s: %s", it.current()->summary()->latin1(), it.current()->uRL()->latin1() );
++it;
diff --git a/kode/kwsdl/tests/google/googlesearch.hh b/kode/kwsdl/tests/google/googlesearch.hh
index 21aed9574..a1c490bbf 100644
--- a/kode/kwsdl/tests/google/googlesearch.hh
+++ b/kode/kwsdl/tests/google/googlesearch.hh
@@ -25,7 +25,7 @@
#ifndef GOOGLESEARCH_H
#define GOOGLESEARCH_H
-#include <qobject.h>
+#include <tqobject.h>
#include "googlesearchservice.h"
class GoogleSearch : public QObject
@@ -35,25 +35,25 @@ class GoogleSearch : public QObject
public:
GoogleSearch();
- void cachedPage( const QString &url );
- void spellingSuggestion( const QString &phrase );
- void googleSearch( const QString &query,
+ void cachedPage( const TQString &url );
+ void spellingSuggestion( const TQString &phrase );
+ void googleSearch( const TQString &query,
int start,
int maxResults,
bool filter,
- const QString &restrict,
+ const TQString &restrict,
bool safeSearch,
- const QString &lr,
- const QString &ie,
- const QString &oe );
+ const TQString &lr,
+ const TQString &ie,
+ const TQString &oe );
private slots:
- void cachedPageResult( QByteArray* );
- void spellingSuggestionResult( QString* );
+ void cachedPageResult( TQByteArray* );
+ void spellingSuggestionResult( TQString* );
void googleSearchResult( GoogleSearchResult* );
private:
- QString mKey;
+ TQString mKey;
GoogleSearchService mService;
};
diff --git a/kode/kwsdl/tests/google/googlesearchresult.cpp b/kode/kwsdl/tests/google/googlesearchresult.cpp
index 2d3ce11e2..faa209ce6 100644
--- a/kode/kwsdl/tests/google/googlesearchresult.cpp
+++ b/kode/kwsdl/tests/google/googlesearchresult.cpp
@@ -25,7 +25,7 @@
#include "googlesearchresult.h"
#include <serializer.h>
-#include <qstring.h>
+#include <tqstring.h>
#include <resultelementarray.h>
#include <directorycategoryarray.h>
@@ -39,12 +39,12 @@ bool*GoogleSearchResult::documentFiltering() const
return mDocumentFiltering;
}
-void GoogleSearchResult::setSearchComments( QString* searchComments )
+void GoogleSearchResult::setSearchComments( TQString* searchComments )
{
mSearchComments = searchComments;
}
-QString*GoogleSearchResult::searchComments() const
+TQString*GoogleSearchResult::searchComments() const
{
return mSearchComments;
}
@@ -79,12 +79,12 @@ ResultElementArray*GoogleSearchResult::resultElements() const
return mResultElements;
}
-void GoogleSearchResult::setSearchQuery( QString* searchQuery )
+void GoogleSearchResult::setSearchQuery( TQString* searchQuery )
{
mSearchQuery = searchQuery;
}
-QString*GoogleSearchResult::searchQuery() const
+TQString*GoogleSearchResult::searchQuery() const
{
return mSearchQuery;
}
@@ -109,12 +109,12 @@ int*GoogleSearchResult::endIndex() const
return mEndIndex;
}
-void GoogleSearchResult::setSearchTips( QString* searchTips )
+void GoogleSearchResult::setSearchTips( TQString* searchTips )
{
mSearchTips = searchTips;
}
-QString*GoogleSearchResult::searchTips() const
+TQString*GoogleSearchResult::searchTips() const
{
return mSearchTips;
}
diff --git a/kode/kwsdl/tests/google/googlesearchresult.h b/kode/kwsdl/tests/google/googlesearchresult.h
index 542fb6864..c2cfa16dc 100644
--- a/kode/kwsdl/tests/google/googlesearchresult.h
+++ b/kode/kwsdl/tests/google/googlesearchresult.h
@@ -33,22 +33,22 @@ class GoogleSearchResult
public:
void setDocumentFiltering( bool* documentFiltering );
bool*documentFiltering() const;
- void setSearchComments( QString* searchComments );
- QString*searchComments() const;
+ void setSearchComments( TQString* searchComments );
+ TQString*searchComments() const;
void setEstimatedTotalResultsCount( int* estimatedTotalResultsCount );
int*estimatedTotalResultsCount() const;
void setEstimateIsExact( bool* estimateIsExact );
bool*estimateIsExact() const;
void setResultElements( ResultElementArray* resultElements );
ResultElementArray*resultElements() const;
- void setSearchQuery( QString* searchQuery );
- QString*searchQuery() const;
+ void setSearchQuery( TQString* searchQuery );
+ TQString*searchQuery() const;
void setStartIndex( int* startIndex );
int*startIndex() const;
void setEndIndex( int* endIndex );
int*endIndex() const;
- void setSearchTips( QString* searchTips );
- QString*searchTips() const;
+ void setSearchTips( TQString* searchTips );
+ TQString*searchTips() const;
void setDirectoryCategories( DirectoryCategoryArray* directoryCategories );
DirectoryCategoryArray*directoryCategories() const;
void setSearchTime( double* searchTime );
@@ -58,14 +58,14 @@ class GoogleSearchResult
private:
bool*mDocumentFiltering;
- QString*mSearchComments;
+ TQString*mSearchComments;
int*mEstimatedTotalResultsCount;
bool*mEstimateIsExact;
ResultElementArray*mResultElements;
- QString*mSearchQuery;
+ TQString*mSearchQuery;
int*mStartIndex;
int*mEndIndex;
- QString*mSearchTips;
+ TQString*mSearchTips;
DirectoryCategoryArray*mDirectoryCategories;
double*mSearchTime;
};
diff --git a/kode/kwsdl/tests/google/googlesearchservice.cpp b/kode/kwsdl/tests/google/googlesearchservice.cpp
index 555850713..3ccdb4935 100644
--- a/kode/kwsdl/tests/google/googlesearchservice.cpp
+++ b/kode/kwsdl/tests/google/googlesearchservice.cpp
@@ -26,18 +26,18 @@
#include <serializer.h>
-void GoogleSearchService::doGetCachedPage( QString* key, QString* url )
+void GoogleSearchService::doGetCachedPage( TQString* key, TQString* url )
{
- QDomDocument doc( "kwsdl" );
+ TQDomDocument doc( "kwsdl" );
doc.appendChild( doc.createProcessingInstruction( "xml", "version=\"1.0\" encoding=\"UTF-8\"" ) );
- QDomElement env = doc.createElement( "SOAP-ENV:Envelope" );
+ TQDomElement env = doc.createElement( "SOAP-ENV:Envelope" );
env.setAttribute( "xmlns:SOAP-ENV", "http://schemas.xmlsoap.org/soap/envelope/" );
env.setAttribute( "xmlns:xsi", "http://www.w3.org/1999/XMLSchema-instance" );
env.setAttribute( "xmlns:xsd", "http://www.w3.org/1999/XMLSchema" );
doc.appendChild( env );
- QDomElement body = doc.createElement( "SOAP-ENV:Body" );
+ TQDomElement body = doc.createElement( "SOAP-ENV:Body" );
env.appendChild( body );
- QDomElement method = doc.createElement( "ns1:doGetCachedPage" );
+ TQDomElement method = doc.createElement( "ns1:doGetCachedPage" );
method.setAttribute( "xmlns:ns1", "urn:GoogleSearch" );
method.setAttribute( "SOAP-ENV:encodingStyle", "http://schemas.xmlsoap.org/soap/encoding/" );
body.appendChild( method );
@@ -50,10 +50,10 @@ void GoogleSearchService::doGetCachedPage( QString* key, QString* url )
mDoGetCachedPageTransport->query( doc.toString() );
}
-void GoogleSearchService::doGetCachedPageResponseSlot( const QString &xml )
+void GoogleSearchService::doGetCachedPageResponseSlot( const TQString &xml )
{
- QDomDocument doc;
- QString errorMsg;
+ TQDomDocument doc;
+ TQString errorMsg;
int column, row;
qDebug( "%s", xml.latin1() );
@@ -63,27 +63,27 @@ void GoogleSearchService::doGetCachedPageResponseSlot( const QString &xml )
return;
}
- QByteArray* value = new QByteArray;
- QDomElement envelope = doc.documentElement();
- QDomElement body = envelope.firstChild().toElement();
- QDomElement method = body.firstChild().toElement();
+ TQByteArray* value = new QByteArray;
+ TQDomElement envelope = doc.documentElement();
+ TQDomElement body = envelope.firstChild().toElement();
+ TQDomElement method = body.firstChild().toElement();
Serializer::demarshal( method.firstChild().toElement(), value );
emit doGetCachedPageResponse( value );
}
-void GoogleSearchService::doSpellingSuggestion( QString* key, QString* phrase )
+void GoogleSearchService::doSpellingSuggestion( TQString* key, TQString* phrase )
{
- QDomDocument doc( "kwsdl" );
+ TQDomDocument doc( "kwsdl" );
doc.appendChild( doc.createProcessingInstruction( "xml", "version=\"1.0\" encoding=\"UTF-8\"" ) );
- QDomElement env = doc.createElement( "SOAP-ENV:Envelope" );
+ TQDomElement env = doc.createElement( "SOAP-ENV:Envelope" );
env.setAttribute( "xmlns:SOAP-ENV", "http://schemas.xmlsoap.org/soap/envelope/" );
env.setAttribute( "xmlns:xsi", "http://www.w3.org/1999/XMLSchema-instance" );
env.setAttribute( "xmlns:xsd", "http://www.w3.org/1999/XMLSchema" );
doc.appendChild( env );
- QDomElement body = doc.createElement( "SOAP-ENV:Body" );
+ TQDomElement body = doc.createElement( "SOAP-ENV:Body" );
env.appendChild( body );
- QDomElement method = doc.createElement( "ns1:doSpellingSuggestion" );
+ TQDomElement method = doc.createElement( "ns1:doSpellingSuggestion" );
method.setAttribute( "xmlns:ns1", "urn:GoogleSearch" );
method.setAttribute( "SOAP-ENV:encodingStyle", "http://schemas.xmlsoap.org/soap/encoding/" );
body.appendChild( method );
@@ -96,10 +96,10 @@ void GoogleSearchService::doSpellingSuggestion( QString* key, QString* phrase )
mDoSpellingSuggestionTransport->query( doc.toString() );
}
-void GoogleSearchService::doSpellingSuggestionResponseSlot( const QString &xml )
+void GoogleSearchService::doSpellingSuggestionResponseSlot( const TQString &xml )
{
- QDomDocument doc;
- QString errorMsg;
+ TQDomDocument doc;
+ TQString errorMsg;
int column, row;
qDebug( "%s", xml.latin1() );
@@ -109,27 +109,27 @@ void GoogleSearchService::doSpellingSuggestionResponseSlot( const QString &xml )
return;
}
- QString* value = new QString;
- QDomElement envelope = doc.documentElement();
- QDomElement body = envelope.firstChild().toElement();
- QDomElement method = body.firstChild().toElement();
+ TQString* value = new QString;
+ TQDomElement envelope = doc.documentElement();
+ TQDomElement body = envelope.firstChild().toElement();
+ TQDomElement method = body.firstChild().toElement();
Serializer::demarshal( method.firstChild().toElement(), value );
emit doSpellingSuggestionResponse( value );
}
-void GoogleSearchService::doGoogleSearch( QString* key, QString* q, int* start, int* maxResults, bool* filter, QString* restrict, bool* safeSearch, QString* lr, QString* ie, QString* oe )
+void GoogleSearchService::doGoogleSearch( TQString* key, TQString* q, int* start, int* maxResults, bool* filter, TQString* restrict, bool* safeSearch, TQString* lr, TQString* ie, TQString* oe )
{
- QDomDocument doc( "kwsdl" );
+ TQDomDocument doc( "kwsdl" );
doc.appendChild( doc.createProcessingInstruction( "xml", "version=\"1.0\" encoding=\"UTF-8\"" ) );
- QDomElement env = doc.createElement( "SOAP-ENV:Envelope" );
+ TQDomElement env = doc.createElement( "SOAP-ENV:Envelope" );
env.setAttribute( "xmlns:SOAP-ENV", "http://schemas.xmlsoap.org/soap/envelope/" );
env.setAttribute( "xmlns:xsi", "http://www.w3.org/1999/XMLSchema-instance" );
env.setAttribute( "xmlns:xsd", "http://www.w3.org/1999/XMLSchema" );
doc.appendChild( env );
- QDomElement body = doc.createElement( "SOAP-ENV:Body" );
+ TQDomElement body = doc.createElement( "SOAP-ENV:Body" );
env.appendChild( body );
- QDomElement method = doc.createElement( "ns1:doGoogleSearch" );
+ TQDomElement method = doc.createElement( "ns1:doGoogleSearch" );
method.setAttribute( "xmlns:ns1", "urn:GoogleSearch" );
method.setAttribute( "SOAP-ENV:encodingStyle", "http://schemas.xmlsoap.org/soap/encoding/" );
body.appendChild( method );
@@ -158,10 +158,10 @@ void GoogleSearchService::doGoogleSearch( QString* key, QString* q, int* start,
mDoGoogleSearchTransport->query( doc.toString() );
}
-void GoogleSearchService::doGoogleSearchResponseSlot( const QString &xml )
+void GoogleSearchService::doGoogleSearchResponseSlot( const TQString &xml )
{
- QDomDocument doc;
- QString errorMsg;
+ TQDomDocument doc;
+ TQString errorMsg;
int column, row;
qDebug( "%s", xml.latin1() );
@@ -172,9 +172,9 @@ void GoogleSearchService::doGoogleSearchResponseSlot( const QString &xml )
}
GoogleSearchResult* value = new GoogleSearchResult;
- QDomElement envelope = doc.documentElement();
- QDomElement body = envelope.firstChild().toElement();
- QDomElement method = body.firstChild().toElement();
+ TQDomElement envelope = doc.documentElement();
+ TQDomElement body = envelope.firstChild().toElement();
+ TQDomElement method = body.firstChild().toElement();
Serializer::demarshal( method.firstChild().toElement(), value );
emit doGoogleSearchResponse( value );
@@ -183,14 +183,14 @@ void GoogleSearchService::doGoogleSearchResponseSlot( const QString &xml )
GoogleSearchService::GoogleSearchService()
{
mDoGetCachedPageTransport = new Transport( "http://api.google.com/search/beta2" );
- connect( mDoGetCachedPageTransport, SIGNAL( result( const QString& ) ),
- this, SLOT( doGetCachedPageResponseSlot( const QString& ) ) );
+ connect( mDoGetCachedPageTransport, TQT_SIGNAL( result( const TQString& ) ),
+ this, TQT_SLOT( doGetCachedPageResponseSlot( const TQString& ) ) );
mDoSpellingSuggestionTransport = new Transport( "http://api.google.com/search/beta2" );
- connect( mDoSpellingSuggestionTransport, SIGNAL( result( const QString& ) ),
- this, SLOT( doSpellingSuggestionResponseSlot( const QString& ) ) );
+ connect( mDoSpellingSuggestionTransport, TQT_SIGNAL( result( const TQString& ) ),
+ this, TQT_SLOT( doSpellingSuggestionResponseSlot( const TQString& ) ) );
mDoGoogleSearchTransport = new Transport( "http://api.google.com/search/beta2" );
- connect( mDoGoogleSearchTransport, SIGNAL( result( const QString& ) ),
- this, SLOT( doGoogleSearchResponseSlot( const QString& ) ) );
+ connect( mDoGoogleSearchTransport, TQT_SIGNAL( result( const TQString& ) ),
+ this, TQT_SLOT( doGoogleSearchResponseSlot( const TQString& ) ) );
}
GoogleSearchService::~GoogleSearchService()
diff --git a/kode/kwsdl/tests/google/googlesearchservice.h b/kode/kwsdl/tests/google/googlesearchservice.h
index cc8bef027..6efd65239 100644
--- a/kode/kwsdl/tests/google/googlesearchservice.h
+++ b/kode/kwsdl/tests/google/googlesearchservice.h
@@ -24,10 +24,10 @@
#ifndef GOOGLESEARCHSERVICE_H
#define GOOGLESEARCHSERVICE_H
-#include <qobject.h>
-#include <qstring.h>
+#include <tqobject.h>
+#include <tqstring.h>
#include <transport.h>
-#include <qcstring.h>
+#include <tqcstring.h>
#include <googlesearchresult.h>
class GoogleSearchService : public QObject
@@ -35,21 +35,21 @@ class GoogleSearchService : public QObject
Q_OBJECT
public:
- void doGetCachedPage( QString* key, QString* url );
- void doSpellingSuggestion( QString* key, QString* phrase );
- void doGoogleSearch( QString* key, QString* q, int* start, int* maxResults, bool* filter, QString* restrict, bool* safeSearch, QString* lr, QString* ie, QString* oe );
+ void doGetCachedPage( TQString* key, TQString* url );
+ void doSpellingSuggestion( TQString* key, TQString* phrase );
+ void doGoogleSearch( TQString* key, TQString* q, int* start, int* maxResults, bool* filter, TQString* restrict, bool* safeSearch, TQString* lr, TQString* ie, TQString* oe );
GoogleSearchService();
~GoogleSearchService();
signals:
- void doGetCachedPageResponse( QByteArray* value );
- void doSpellingSuggestionResponse( QString* value );
+ void doGetCachedPageResponse( TQByteArray* value );
+ void doSpellingSuggestionResponse( TQString* value );
void doGoogleSearchResponse( GoogleSearchResult* value );
private slots:
- void doGetCachedPageResponseSlot( const QString &xml );
- void doSpellingSuggestionResponseSlot( const QString &xml );
- void doGoogleSearchResponseSlot( const QString &xml );
+ void doGetCachedPageResponseSlot( const TQString &xml );
+ void doSpellingSuggestionResponseSlot( const TQString &xml );
+ void doGoogleSearchResponseSlot( const TQString &xml );
private:
Transport*mDoGetCachedPageTransport;
diff --git a/kode/kwsdl/tests/google/resultelement.cpp b/kode/kwsdl/tests/google/resultelement.cpp
index b02b8ca44..c340f8b04 100644
--- a/kode/kwsdl/tests/google/resultelement.cpp
+++ b/kode/kwsdl/tests/google/resultelement.cpp
@@ -25,55 +25,55 @@
#include "resultelement.h"
#include <serializer.h>
-#include <qstring.h>
+#include <tqstring.h>
#include <directorycategory.h>
-void ResultElement::setSummary( QString* summary )
+void ResultElement::setSummary( TQString* summary )
{
mSummary = summary;
}
-QString*ResultElement::summary() const
+TQString*ResultElement::summary() const
{
return mSummary;
}
-void ResultElement::setURL( QString* uRL )
+void ResultElement::setURL( TQString* uRL )
{
mURL = uRL;
}
-QString*ResultElement::uRL() const
+TQString*ResultElement::uRL() const
{
return mURL;
}
-void ResultElement::setSnippet( QString* snippet )
+void ResultElement::setSnippet( TQString* snippet )
{
mSnippet = snippet;
}
-QString*ResultElement::snippet() const
+TQString*ResultElement::snippet() const
{
return mSnippet;
}
-void ResultElement::setTitle( QString* title )
+void ResultElement::setTitle( TQString* title )
{
mTitle = title;
}
-QString*ResultElement::title() const
+TQString*ResultElement::title() const
{
return mTitle;
}
-void ResultElement::setCachedSize( QString* cachedSize )
+void ResultElement::setCachedSize( TQString* cachedSize )
{
mCachedSize = cachedSize;
}
-QString*ResultElement::cachedSize() const
+TQString*ResultElement::cachedSize() const
{
return mCachedSize;
}
@@ -88,12 +88,12 @@ bool*ResultElement::relatedInformationPresent() const
return mRelatedInformationPresent;
}
-void ResultElement::setHostName( QString* hostName )
+void ResultElement::setHostName( TQString* hostName )
{
mHostName = hostName;
}
-QString*ResultElement::hostName() const
+TQString*ResultElement::hostName() const
{
return mHostName;
}
@@ -108,12 +108,12 @@ DirectoryCategory*ResultElement::directoryCategory() const
return mDirectoryCategory;
}
-void ResultElement::setDirectoryTitle( QString* directoryTitle )
+void ResultElement::setDirectoryTitle( TQString* directoryTitle )
{
mDirectoryTitle = directoryTitle;
}
-QString*ResultElement::directoryTitle() const
+TQString*ResultElement::directoryTitle() const
{
return mDirectoryTitle;
}
diff --git a/kode/kwsdl/tests/google/resultelement.h b/kode/kwsdl/tests/google/resultelement.h
index 4a24f7291..e83ff3713 100644
--- a/kode/kwsdl/tests/google/resultelement.h
+++ b/kode/kwsdl/tests/google/resultelement.h
@@ -30,37 +30,37 @@ class DirectoryCategory;
class ResultElement
{
public:
- void setSummary( QString* summary );
- QString*summary() const;
- void setURL( QString* uRL );
- QString*uRL() const;
- void setSnippet( QString* snippet );
- QString*snippet() const;
- void setTitle( QString* title );
- QString*title() const;
- void setCachedSize( QString* cachedSize );
- QString*cachedSize() const;
+ void setSummary( TQString* summary );
+ TQString*summary() const;
+ void setURL( TQString* uRL );
+ TQString*uRL() const;
+ void setSnippet( TQString* snippet );
+ TQString*snippet() const;
+ void setTitle( TQString* title );
+ TQString*title() const;
+ void setCachedSize( TQString* cachedSize );
+ TQString*cachedSize() const;
void setRelatedInformationPresent( bool* relatedInformationPresent );
bool*relatedInformationPresent() const;
- void setHostName( QString* hostName );
- QString*hostName() const;
+ void setHostName( TQString* hostName );
+ TQString*hostName() const;
void setDirectoryCategory( DirectoryCategory* directoryCategory );
DirectoryCategory*directoryCategory() const;
- void setDirectoryTitle( QString* directoryTitle );
- QString*directoryTitle() const;
+ void setDirectoryTitle( TQString* directoryTitle );
+ TQString*directoryTitle() const;
ResultElement();
~ResultElement();
private:
- QString*mSummary;
- QString*mURL;
- QString*mSnippet;
- QString*mTitle;
- QString*mCachedSize;
+ TQString*mSummary;
+ TQString*mURL;
+ TQString*mSnippet;
+ TQString*mTitle;
+ TQString*mCachedSize;
bool*mRelatedInformationPresent;
- QString*mHostName;
+ TQString*mHostName;
DirectoryCategory*mDirectoryCategory;
- QString*mDirectoryTitle;
+ TQString*mDirectoryTitle;
};
#endif
diff --git a/kode/kwsdl/tests/google/resultelementarray.cpp b/kode/kwsdl/tests/google/resultelementarray.cpp
index f356f0101..0ea65755f 100644
--- a/kode/kwsdl/tests/google/resultelementarray.cpp
+++ b/kode/kwsdl/tests/google/resultelementarray.cpp
@@ -25,15 +25,15 @@
#include "resultelementarray.h"
#include <serializer.h>
-#include <qptrlist.h>
+#include <tqptrlist.h>
#include <resultelement.h>
-void ResultElementArray::setItems( QPtrList<ResultElement>* items )
+void ResultElementArray::setItems( TQPtrList<ResultElement>* items )
{
mItems = items;
}
-QPtrList<ResultElement>*ResultElementArray::items() const
+TQPtrList<ResultElement>*ResultElementArray::items() const
{
return mItems;
}
diff --git a/kode/kwsdl/tests/google/resultelementarray.h b/kode/kwsdl/tests/google/resultelementarray.h
index 2d63fe4dd..972171172 100644
--- a/kode/kwsdl/tests/google/resultelementarray.h
+++ b/kode/kwsdl/tests/google/resultelementarray.h
@@ -24,20 +24,20 @@
#ifndef RESULTELEMENTARRAY_H
#define RESULTELEMENTARRAY_H
-#include <qptrlist.h>
+#include <tqptrlist.h>
class ResultElement;
class ResultElementArray
{
public:
- void setItems( QPtrList<ResultElement>* items );
- QPtrList<ResultElement>*items() const;
+ void setItems( TQPtrList<ResultElement>* items );
+ TQPtrList<ResultElement>*items() const;
ResultElementArray();
~ResultElementArray();
private:
- QPtrList<ResultElement>*mItems;
+ TQPtrList<ResultElement>*mItems;
};
#endif
diff --git a/kode/kwsdl/tests/google/serializer.cpp b/kode/kwsdl/tests/google/serializer.cpp
index 595666fab..273ce5929 100644
--- a/kode/kwsdl/tests/google/serializer.cpp
+++ b/kode/kwsdl/tests/google/serializer.cpp
@@ -31,297 +31,297 @@
#include <directorycategory.h>
#include <resultelement.h>
-QString Serializer::marshalValue( const QString* value )
+TQString Serializer::marshalValue( const TQString* value )
{
return *value;
}
-void Serializer::demarshalValue( const QString &str, QString *value )
+void Serializer::demarshalValue( const TQString &str, TQString *value )
{
*value = str;
}
-void Serializer::marshal( QDomDocument &doc, QDomElement &parent, const QString &name, const QString* value )
+void Serializer::marshal( TQDomDocument &doc, TQDomElement &parent, const TQString &name, const TQString* value )
{
- QDomElement element = doc.createElement( name );
+ TQDomElement element = doc.createElement( name );
element.setAttribute( "xsi:type", "xsd:string" );
element.appendChild( doc.createTextNode( Serializer::marshalValue( value ) ) );
parent.appendChild( element );
}
-void Serializer::demarshal( const QDomElement &element, QString* value )
+void Serializer::demarshal( const TQDomElement &element, TQString* value )
{
Serializer::demarshalValue( element.text(), value );
}
-QString Serializer::marshalValue( const bool* value )
+TQString Serializer::marshalValue( const bool* value )
{
return (*value ? "true" : "false");
}
-void Serializer::demarshalValue( const QString &str, bool *value )
+void Serializer::demarshalValue( const TQString &str, bool *value )
{
*value = (str.lower() == "true" ? true : false);
}
-void Serializer::marshal( QDomDocument &doc, QDomElement &parent, const QString &name, const bool* value )
+void Serializer::marshal( TQDomDocument &doc, TQDomElement &parent, const TQString &name, const bool* value )
{
- QDomElement element = doc.createElement( name );
+ TQDomElement element = doc.createElement( name );
element.setAttribute( "xsi:type", "xsd:boolean" );
element.appendChild( doc.createTextNode( Serializer::marshalValue( value ) ) );
parent.appendChild( element );
}
-void Serializer::demarshal( const QDomElement &element, bool* value )
+void Serializer::demarshal( const TQDomElement &element, bool* value )
{
Serializer::demarshalValue( element.text(), value );
}
-QString Serializer::marshalValue( const float* value )
+TQString Serializer::marshalValue( const float* value )
{
- return QString::number( *value );
+ return TQString::number( *value );
}
-void Serializer::demarshalValue( const QString &str, float *value )
+void Serializer::demarshalValue( const TQString &str, float *value )
{
*value = str.toFloat();
}
-void Serializer::marshal( QDomDocument &doc, QDomElement &parent, const QString &name, const float* value )
+void Serializer::marshal( TQDomDocument &doc, TQDomElement &parent, const TQString &name, const float* value )
{
- QDomElement element = doc.createElement( name );
+ TQDomElement element = doc.createElement( name );
element.setAttribute( "xsi:type", "xsd:TODO" );
element.appendChild( doc.createTextNode( Serializer::marshalValue( value ) ) );
parent.appendChild( element );
}
-void Serializer::demarshal( const QDomElement &element, float* value )
+void Serializer::demarshal( const TQDomElement &element, float* value )
{
Serializer::demarshalValue( element.text(), value );
}
-QString Serializer::marshalValue( const int* value )
+TQString Serializer::marshalValue( const int* value )
{
- return QString::number( *value );
+ return TQString::number( *value );
}
-void Serializer::demarshalValue( const QString &str, int *value )
+void Serializer::demarshalValue( const TQString &str, int *value )
{
*value = str.toInt();
}
-void Serializer::marshal( QDomDocument &doc, QDomElement &parent, const QString &name, const int* value )
+void Serializer::marshal( TQDomDocument &doc, TQDomElement &parent, const TQString &name, const int* value )
{
- QDomElement element = doc.createElement( name );
+ TQDomElement element = doc.createElement( name );
element.setAttribute( "xsi:type", "xsd:int" );
element.appendChild( doc.createTextNode( Serializer::marshalValue( value ) ) );
parent.appendChild( element );
}
-void Serializer::demarshal( const QDomElement &element, int* value )
+void Serializer::demarshal( const TQDomElement &element, int* value )
{
Serializer::demarshalValue( element.text(), value );
}
-QString Serializer::marshalValue( const unsigned int* value )
+TQString Serializer::marshalValue( const unsigned int* value )
{
- return QString::number( *value );
+ return TQString::number( *value );
}
-void Serializer::demarshalValue( const QString &str, unsigned int *value )
+void Serializer::demarshalValue( const TQString &str, unsigned int *value )
{
*value = str.toUInt();
}
-void Serializer::marshal( QDomDocument &doc, QDomElement &parent, const QString &name, const unsigned int* value )
+void Serializer::marshal( TQDomDocument &doc, TQDomElement &parent, const TQString &name, const unsigned int* value )
{
- QDomElement element = doc.createElement( name );
+ TQDomElement element = doc.createElement( name );
element.setAttribute( "xsi:type", "xsd:unsignedByte" );
element.appendChild( doc.createTextNode( Serializer::marshalValue( value ) ) );
parent.appendChild( element );
}
-void Serializer::demarshal( const QDomElement &element, unsigned int* value )
+void Serializer::demarshal( const TQDomElement &element, unsigned int* value )
{
Serializer::demarshalValue( element.text(), value );
}
-QString Serializer::marshalValue( const double* value )
+TQString Serializer::marshalValue( const double* value )
{
- return QString::number( *value );
+ return TQString::number( *value );
}
-void Serializer::demarshalValue( const QString &str, double *value )
+void Serializer::demarshalValue( const TQString &str, double *value )
{
*value = str.toDouble();
}
-void Serializer::marshal( QDomDocument &doc, QDomElement &parent, const QString &name, const double* value )
+void Serializer::marshal( TQDomDocument &doc, TQDomElement &parent, const TQString &name, const double* value )
{
- QDomElement element = doc.createElement( name );
+ TQDomElement element = doc.createElement( name );
element.setAttribute( "xsi:type", "xsd:double" );
element.appendChild( doc.createTextNode( Serializer::marshalValue( value ) ) );
parent.appendChild( element );
}
-void Serializer::demarshal( const QDomElement &element, double* value )
+void Serializer::demarshal( const TQDomElement &element, double* value )
{
Serializer::demarshalValue( element.text(), value );
}
-QString Serializer::marshalValue( const char* value )
+TQString Serializer::marshalValue( const char* value )
{
- return QString( QChar( *value ) );
+ return TQString( TQChar( *value ) );
}
-void Serializer::demarshalValue( const QString &str, char *value )
+void Serializer::demarshalValue( const TQString &str, char *value )
{
*value = str[ 0 ].latin1();
}
-void Serializer::marshal( QDomDocument &doc, QDomElement &parent, const QString &name, const char* value )
+void Serializer::marshal( TQDomDocument &doc, TQDomElement &parent, const TQString &name, const char* value )
{
- QDomElement element = doc.createElement( name );
+ TQDomElement element = doc.createElement( name );
element.setAttribute( "xsi:type", "xsd:byte" );
element.appendChild( doc.createTextNode( Serializer::marshalValue( value ) ) );
parent.appendChild( element );
}
-void Serializer::demarshal( const QDomElement &element, char* value )
+void Serializer::demarshal( const TQDomElement &element, char* value )
{
Serializer::demarshalValue( element.text(), value );
}
-QString Serializer::marshalValue( const unsigned char* value )
+TQString Serializer::marshalValue( const unsigned char* value )
{
- return QString( QChar( *value ) );
+ return TQString( TQChar( *value ) );
}
-void Serializer::demarshalValue( const QString &str, unsigned char *value )
+void Serializer::demarshalValue( const TQString &str, unsigned char *value )
{
*value = str[ 0 ].latin1();
}
-void Serializer::marshal( QDomDocument &doc, QDomElement &parent, const QString &name, const unsigned char* value )
+void Serializer::marshal( TQDomDocument &doc, TQDomElement &parent, const TQString &name, const unsigned char* value )
{
- QDomElement element = doc.createElement( name );
+ TQDomElement element = doc.createElement( name );
element.setAttribute( "xsi:type", "xsd:unsignedByte" );
element.appendChild( doc.createTextNode( Serializer::marshalValue( value ) ) );
parent.appendChild( element );
}
-void Serializer::demarshal( const QDomElement &element, unsigned char* value )
+void Serializer::demarshal( const TQDomElement &element, unsigned char* value )
{
Serializer::demarshalValue( element.text(), value );
}
-QString Serializer::marshalValue( const short* value )
+TQString Serializer::marshalValue( const short* value )
{
- return QString::number( *value );
+ return TQString::number( *value );
}
-void Serializer::demarshalValue( const QString &str, short *value )
+void Serializer::demarshalValue( const TQString &str, short *value )
{
*value = str.toShort();
}
-void Serializer::marshal( QDomDocument &doc, QDomElement &parent, const QString &name, const short* value )
+void Serializer::marshal( TQDomDocument &doc, TQDomElement &parent, const TQString &name, const short* value )
{
- QDomElement element = doc.createElement( name );
+ TQDomElement element = doc.createElement( name );
element.setAttribute( "xsi:type", "xsd:short" );
element.appendChild( doc.createTextNode( Serializer::marshalValue( value ) ) );
parent.appendChild( element );
}
-void Serializer::demarshal( const QDomElement &element, short* value )
+void Serializer::demarshal( const TQDomElement &element, short* value )
{
Serializer::demarshalValue( element.text(), value );
}
-QString Serializer::marshalValue( const QByteArray* value )
+TQString Serializer::marshalValue( const TQByteArray* value )
{
- return QString::fromUtf8( KCodecs::base64Encode( *value ) );
+ return TQString::fromUtf8( KCodecs::base64Encode( *value ) );
}
-void Serializer::demarshalValue( const QString &str, QByteArray *value )
+void Serializer::demarshalValue( const TQString &str, TQByteArray *value )
{
*value = KCodecs::base64Decode( str.utf8() );
}
-void Serializer::marshal( QDomDocument &doc, QDomElement &parent, const QString &name, const QByteArray* value )
+void Serializer::marshal( TQDomDocument &doc, TQDomElement &parent, const TQString &name, const TQByteArray* value )
{
- QDomElement element = doc.createElement( name );
+ TQDomElement element = doc.createElement( name );
element.setAttribute( "xsi:type", "xsd:base64Binary" );
element.appendChild( doc.createTextNode( Serializer::marshalValue( value ) ) );
parent.appendChild( element );
}
-void Serializer::demarshal( const QDomElement &element, QByteArray* value )
+void Serializer::demarshal( const TQDomElement &element, TQByteArray* value )
{
Serializer::demarshalValue( element.text(), value );
}
-QString Serializer::marshalValue( const QDateTime* value )
+TQString Serializer::marshalValue( const TQDateTime* value )
{
return value->toString( Qt::ISODate );
}
-void Serializer::demarshalValue( const QString &str, QDateTime *value )
+void Serializer::demarshalValue( const TQString &str, TQDateTime *value )
{
- *value = QDateTime::fromString( str, Qt::ISODate );
+ *value = TQDateTime::fromString( str, Qt::ISODate );
}
-void Serializer::marshal( QDomDocument &doc, QDomElement &parent, const QString &name, const QDateTime* value )
+void Serializer::marshal( TQDomDocument &doc, TQDomElement &parent, const TQString &name, const TQDateTime* value )
{
- QDomElement element = doc.createElement( name );
+ TQDomElement element = doc.createElement( name );
element.setAttribute( "xsi:type", "xsd:dateTime" );
element.appendChild( doc.createTextNode( Serializer::marshalValue( value ) ) );
parent.appendChild( element );
}
-void Serializer::demarshal( const QDomElement &element, QDateTime* value )
+void Serializer::demarshal( const TQDomElement &element, TQDateTime* value )
{
Serializer::demarshalValue( element.text(), value );
}
-QString Serializer::marshalValue( const QDate* value )
+TQString Serializer::marshalValue( const TQDate* value )
{
return value->toString( Qt::ISODate );
}
-void Serializer::demarshalValue( const QString &str, QDate *value )
+void Serializer::demarshalValue( const TQString &str, TQDate *value )
{
- *value = QDate::fromString( str, Qt::ISODate );
+ *value = TQDate::fromString( str, Qt::ISODate );
}
-void Serializer::marshal( QDomDocument &doc, QDomElement &parent, const QString &name, const QDate* value )
+void Serializer::marshal( TQDomDocument &doc, TQDomElement &parent, const TQString &name, const TQDate* value )
{
- QDomElement element = doc.createElement( name );
+ TQDomElement element = doc.createElement( name );
element.setAttribute( "xsi:type", "xsd:date" );
element.appendChild( doc.createTextNode( Serializer::marshalValue( value ) ) );
parent.appendChild( element );
}
-void Serializer::demarshal( const QDomElement &element, QDate* value )
+void Serializer::demarshal( const TQDomElement &element, TQDate* value )
{
Serializer::demarshalValue( element.text(), value );
}
-void Serializer::marshal( QDomDocument &doc, QDomElement &parent, const QString &name, const ResultElementArray* value )
+void Serializer::marshal( TQDomDocument &doc, TQDomElement &parent, const TQString &name, const ResultElementArray* value )
{
- QDomElement root = doc.createElement( name );
+ TQDomElement root = doc.createElement( name );
root.setAttribute( "xsi:type", "ns1:ResultElementArray" );
parent.appendChild( root );
if ( value->items() ) {
- const QPtrList<ResultElement>* list = value->items();
+ const TQPtrList<ResultElement>* list = value->items();
- QDomElement element = doc.createElement( name );
+ TQDomElement element = doc.createElement( name );
element.setAttribute( "xmlns:ns1", "http://schemas.xmlsoap.org/soap/encoding/" );
element.setAttribute( "xsi:type", "ns1:Array" );
- element.setAttribute( "ns1:arrayType", "ns1:ResultElement[" + QString::number( list->count() ) + "]" );
+ element.setAttribute( "ns1:arrayType", "ns1:ResultElement[" + TQString::number( list->count() ) + "]" );
parent.appendChild( element );
- QPtrListIterator<ResultElement> it( *list );
+ TQPtrListIterator<ResultElement> it( *list );
while ( it.current() != 0 ) {
Serializer::marshal( doc, element, "item", it.current() );
++it;
@@ -329,13 +329,13 @@ void Serializer::marshal( QDomDocument &doc, QDomElement &parent, const QString
}
}
-void Serializer::demarshal( const QDomElement &parent, ResultElementArray* value )
+void Serializer::demarshal( const TQDomElement &parent, ResultElementArray* value )
{
- QPtrList<ResultElement>* itemsList = new QPtrList<ResultElement>();
+ TQPtrList<ResultElement>* itemsList = new TQPtrList<ResultElement>();
itemsList->setAutoDelete( true );
- QDomNode node = parent.firstChild();
+ TQDomNode node = parent.firstChild();
while ( !node.isNull() ) {
- QDomElement element = node.toElement();
+ TQDomElement element = node.toElement();
if ( !element.isNull() ) {
if ( element.tagName() == "item" ) {
ResultElement *item = new ResultElement;
@@ -349,21 +349,21 @@ void Serializer::demarshal( const QDomElement &parent, ResultElementArray* value
value->setItems( itemsList );
}
-void Serializer::marshal( QDomDocument &doc, QDomElement &parent, const QString &name, const DirectoryCategoryArray* value )
+void Serializer::marshal( TQDomDocument &doc, TQDomElement &parent, const TQString &name, const DirectoryCategoryArray* value )
{
- QDomElement root = doc.createElement( name );
+ TQDomElement root = doc.createElement( name );
root.setAttribute( "xsi:type", "ns1:DirectoryCategoryArray" );
parent.appendChild( root );
if ( value->items() ) {
- const QPtrList<DirectoryCategory>* list = value->items();
+ const TQPtrList<DirectoryCategory>* list = value->items();
- QDomElement element = doc.createElement( name );
+ TQDomElement element = doc.createElement( name );
element.setAttribute( "xmlns:ns1", "http://schemas.xmlsoap.org/soap/encoding/" );
element.setAttribute( "xsi:type", "ns1:Array" );
- element.setAttribute( "ns1:arrayType", "ns1:DirectoryCategory[" + QString::number( list->count() ) + "]" );
+ element.setAttribute( "ns1:arrayType", "ns1:DirectoryCategory[" + TQString::number( list->count() ) + "]" );
parent.appendChild( element );
- QPtrListIterator<DirectoryCategory> it( *list );
+ TQPtrListIterator<DirectoryCategory> it( *list );
while ( it.current() != 0 ) {
Serializer::marshal( doc, element, "item", it.current() );
++it;
@@ -371,13 +371,13 @@ void Serializer::marshal( QDomDocument &doc, QDomElement &parent, const QString
}
}
-void Serializer::demarshal( const QDomElement &parent, DirectoryCategoryArray* value )
+void Serializer::demarshal( const TQDomElement &parent, DirectoryCategoryArray* value )
{
- QPtrList<DirectoryCategory>* itemsList = new QPtrList<DirectoryCategory>();
+ TQPtrList<DirectoryCategory>* itemsList = new TQPtrList<DirectoryCategory>();
itemsList->setAutoDelete( true );
- QDomNode node = parent.firstChild();
+ TQDomNode node = parent.firstChild();
while ( !node.isNull() ) {
- QDomElement element = node.toElement();
+ TQDomElement element = node.toElement();
if ( !element.isNull() ) {
if ( element.tagName() == "item" ) {
DirectoryCategory *item = new DirectoryCategory;
@@ -391,9 +391,9 @@ void Serializer::demarshal( const QDomElement &parent, DirectoryCategoryArray* v
value->setItems( itemsList );
}
-void Serializer::marshal( QDomDocument &doc, QDomElement &parent, const QString &name, const GoogleSearchResult* value )
+void Serializer::marshal( TQDomDocument &doc, TQDomElement &parent, const TQString &name, const GoogleSearchResult* value )
{
- QDomElement root = doc.createElement( name );
+ TQDomElement root = doc.createElement( name );
root.setAttribute( "xsi:type", "ns1:GoogleSearchResult" );
parent.appendChild( root );
if ( value->documentFiltering() ) {
@@ -431,11 +431,11 @@ void Serializer::marshal( QDomDocument &doc, QDomElement &parent, const QString
}
}
-void Serializer::demarshal( const QDomElement &parent, GoogleSearchResult* value )
+void Serializer::demarshal( const TQDomElement &parent, GoogleSearchResult* value )
{
- QDomNode node = parent.firstChild();
+ TQDomNode node = parent.firstChild();
while ( !node.isNull() ) {
- QDomElement element = node.toElement();
+ TQDomElement element = node.toElement();
if ( !element.isNull() ) {
if ( element.tagName() == "documentFiltering" ) {
bool* item = new bool;
@@ -443,7 +443,7 @@ void Serializer::demarshal( const QDomElement &parent, GoogleSearchResult* value
value->setDocumentFiltering( item );
}
if ( element.tagName() == "searchComments" ) {
- QString* item = new QString;
+ TQString* item = new QString;
Serializer::demarshal( element, item );
value->setSearchComments( item );
}
@@ -463,7 +463,7 @@ void Serializer::demarshal( const QDomElement &parent, GoogleSearchResult* value
value->setResultElements( item );
}
if ( element.tagName() == "searchQuery" ) {
- QString* item = new QString;
+ TQString* item = new QString;
Serializer::demarshal( element, item );
value->setSearchQuery( item );
}
@@ -478,7 +478,7 @@ void Serializer::demarshal( const QDomElement &parent, GoogleSearchResult* value
value->setEndIndex( item );
}
if ( element.tagName() == "searchTips" ) {
- QString* item = new QString;
+ TQString* item = new QString;
Serializer::demarshal( element, item );
value->setSearchTips( item );
}
@@ -498,9 +498,9 @@ void Serializer::demarshal( const QDomElement &parent, GoogleSearchResult* value
}
-void Serializer::marshal( QDomDocument &doc, QDomElement &parent, const QString &name, const DirectoryCategory* value )
+void Serializer::marshal( TQDomDocument &doc, TQDomElement &parent, const TQString &name, const DirectoryCategory* value )
{
- QDomElement root = doc.createElement( name );
+ TQDomElement root = doc.createElement( name );
root.setAttribute( "xsi:type", "ns1:DirectoryCategory" );
parent.appendChild( root );
if ( value->fullViewableName() ) {
@@ -511,19 +511,19 @@ void Serializer::marshal( QDomDocument &doc, QDomElement &parent, const QString
}
}
-void Serializer::demarshal( const QDomElement &parent, DirectoryCategory* value )
+void Serializer::demarshal( const TQDomElement &parent, DirectoryCategory* value )
{
- QDomNode node = parent.firstChild();
+ TQDomNode node = parent.firstChild();
while ( !node.isNull() ) {
- QDomElement element = node.toElement();
+ TQDomElement element = node.toElement();
if ( !element.isNull() ) {
if ( element.tagName() == "fullViewableName" ) {
- QString* item = new QString;
+ TQString* item = new QString;
Serializer::demarshal( element, item );
value->setFullViewableName( item );
}
if ( element.tagName() == "specialEncoding" ) {
- QString* item = new QString;
+ TQString* item = new QString;
Serializer::demarshal( element, item );
value->setSpecialEncoding( item );
}
@@ -533,9 +533,9 @@ void Serializer::demarshal( const QDomElement &parent, DirectoryCategory* value
}
-void Serializer::marshal( QDomDocument &doc, QDomElement &parent, const QString &name, const ResultElement* value )
+void Serializer::marshal( TQDomDocument &doc, TQDomElement &parent, const TQString &name, const ResultElement* value )
{
- QDomElement root = doc.createElement( name );
+ TQDomElement root = doc.createElement( name );
root.setAttribute( "xsi:type", "ns1:ResultElement" );
parent.appendChild( root );
if ( value->summary() ) {
@@ -567,34 +567,34 @@ void Serializer::marshal( QDomDocument &doc, QDomElement &parent, const QString
}
}
-void Serializer::demarshal( const QDomElement &parent, ResultElement* value )
+void Serializer::demarshal( const TQDomElement &parent, ResultElement* value )
{
- QDomNode node = parent.firstChild();
+ TQDomNode node = parent.firstChild();
while ( !node.isNull() ) {
- QDomElement element = node.toElement();
+ TQDomElement element = node.toElement();
if ( !element.isNull() ) {
if ( element.tagName() == "summary" ) {
- QString* item = new QString;
+ TQString* item = new QString;
Serializer::demarshal( element, item );
value->setSummary( item );
}
if ( element.tagName() == "URL" ) {
- QString* item = new QString;
+ TQString* item = new QString;
Serializer::demarshal( element, item );
value->setURL( item );
}
if ( element.tagName() == "snippet" ) {
- QString* item = new QString;
+ TQString* item = new QString;
Serializer::demarshal( element, item );
value->setSnippet( item );
}
if ( element.tagName() == "title" ) {
- QString* item = new QString;
+ TQString* item = new QString;
Serializer::demarshal( element, item );
value->setTitle( item );
}
if ( element.tagName() == "cachedSize" ) {
- QString* item = new QString;
+ TQString* item = new QString;
Serializer::demarshal( element, item );
value->setCachedSize( item );
}
@@ -604,7 +604,7 @@ void Serializer::demarshal( const QDomElement &parent, ResultElement* value )
value->setRelatedInformationPresent( item );
}
if ( element.tagName() == "hostName" ) {
- QString* item = new QString;
+ TQString* item = new QString;
Serializer::demarshal( element, item );
value->setHostName( item );
}
@@ -614,7 +614,7 @@ void Serializer::demarshal( const QDomElement &parent, ResultElement* value )
value->setDirectoryCategory( item );
}
if ( element.tagName() == "directoryTitle" ) {
- QString* item = new QString;
+ TQString* item = new QString;
Serializer::demarshal( element, item );
value->setDirectoryTitle( item );
}
diff --git a/kode/kwsdl/tests/google/serializer.h b/kode/kwsdl/tests/google/serializer.h
index d2db93d87..eb60d3f26 100644
--- a/kode/kwsdl/tests/google/serializer.h
+++ b/kode/kwsdl/tests/google/serializer.h
@@ -24,11 +24,11 @@
#ifndef SERIALIZER_H
#define SERIALIZER_H
-#include <qcstring.h>
-#include <qdom.h>
-#include <qdatetime.h>
-#include <qstring.h>
-#include <qptrlist.h>
+#include <tqcstring.h>
+#include <tqdom.h>
+#include <tqdatetime.h>
+#include <tqstring.h>
+#include <tqptrlist.h>
class ResultElementArray;
class DirectoryCategoryArray;
@@ -39,64 +39,64 @@ class ResultElement;
class Serializer
{
public:
- static QString marshalValue( const QString* value );
- static void demarshalValue( const QString &str, QString *value );
- static void marshal( QDomDocument &doc, QDomElement &parent, const QString &name, const QString* value );
- static void demarshal( const QDomElement &element, QString* value );
- static QString marshalValue( const bool* value );
- static void demarshalValue( const QString &str, bool *value );
- static void marshal( QDomDocument &doc, QDomElement &parent, const QString &name, const bool* value );
- static void demarshal( const QDomElement &element, bool* value );
- static QString marshalValue( const float* value );
- static void demarshalValue( const QString &str, float *value );
- static void marshal( QDomDocument &doc, QDomElement &parent, const QString &name, const float* value );
- static void demarshal( const QDomElement &element, float* value );
- static QString marshalValue( const int* value );
- static void demarshalValue( const QString &str, int *value );
- static void marshal( QDomDocument &doc, QDomElement &parent, const QString &name, const int* value );
- static void demarshal( const QDomElement &element, int* value );
- static QString marshalValue( const unsigned int* value );
- static void demarshalValue( const QString &str, unsigned int *value );
- static void marshal( QDomDocument &doc, QDomElement &parent, const QString &name, const unsigned int* value );
- static void demarshal( const QDomElement &element, unsigned int* value );
- static QString marshalValue( const double* value );
- static void demarshalValue( const QString &str, double *value );
- static void marshal( QDomDocument &doc, QDomElement &parent, const QString &name, const double* value );
- static void demarshal( const QDomElement &element, double* value );
- static QString marshalValue( const char* value );
- static void demarshalValue( const QString &str, char *value );
- static void marshal( QDomDocument &doc, QDomElement &parent, const QString &name, const char* value );
- static void demarshal( const QDomElement &element, char* value );
- static QString marshalValue( const unsigned char* value );
- static void demarshalValue( const QString &str, unsigned char *value );
- static void marshal( QDomDocument &doc, QDomElement &parent, const QString &name, const unsigned char* value );
- static void demarshal( const QDomElement &element, unsigned char* value );
- static QString marshalValue( const short* value );
- static void demarshalValue( const QString &str, short *value );
- static void marshal( QDomDocument &doc, QDomElement &parent, const QString &name, const short* value );
- static void demarshal( const QDomElement &element, short* value );
- static QString marshalValue( const QByteArray* value );
- static void demarshalValue( const QString &str, QByteArray *value );
- static void marshal( QDomDocument &doc, QDomElement &parent, const QString &name, const QByteArray* value );
- static void demarshal( const QDomElement &element, QByteArray* value );
- static QString marshalValue( const QDateTime* value );
- static void demarshalValue( const QString &str, QDateTime *value );
- static void marshal( QDomDocument &doc, QDomElement &parent, const QString &name, const QDateTime* value );
- static void demarshal( const QDomElement &element, QDateTime* value );
- static QString marshalValue( const QDate* value );
- static void demarshalValue( const QString &str, QDate *value );
- static void marshal( QDomDocument &doc, QDomElement &parent, const QString &name, const QDate* value );
- static void demarshal( const QDomElement &element, QDate* value );
- static void marshal( QDomDocument &doc, QDomElement &parent, const QString &name, const ResultElementArray* value );
- static void demarshal( const QDomElement &parent, ResultElementArray* value );
- static void marshal( QDomDocument &doc, QDomElement &parent, const QString &name, const DirectoryCategoryArray* value );
- static void demarshal( const QDomElement &parent, DirectoryCategoryArray* value );
- static void marshal( QDomDocument &doc, QDomElement &parent, const QString &name, const GoogleSearchResult* value );
- static void demarshal( const QDomElement &parent, GoogleSearchResult* value );
- static void marshal( QDomDocument &doc, QDomElement &parent, const QString &name, const DirectoryCategory* value );
- static void demarshal( const QDomElement &parent, DirectoryCategory* value );
- static void marshal( QDomDocument &doc, QDomElement &parent, const QString &name, const ResultElement* value );
- static void demarshal( const QDomElement &parent, ResultElement* value );
+ static TQString marshalValue( const TQString* value );
+ static void demarshalValue( const TQString &str, TQString *value );
+ static void marshal( TQDomDocument &doc, TQDomElement &parent, const TQString &name, const TQString* value );
+ static void demarshal( const TQDomElement &element, TQString* value );
+ static TQString marshalValue( const bool* value );
+ static void demarshalValue( const TQString &str, bool *value );
+ static void marshal( TQDomDocument &doc, TQDomElement &parent, const TQString &name, const bool* value );
+ static void demarshal( const TQDomElement &element, bool* value );
+ static TQString marshalValue( const float* value );
+ static void demarshalValue( const TQString &str, float *value );
+ static void marshal( TQDomDocument &doc, TQDomElement &parent, const TQString &name, const float* value );
+ static void demarshal( const TQDomElement &element, float* value );
+ static TQString marshalValue( const int* value );
+ static void demarshalValue( const TQString &str, int *value );
+ static void marshal( TQDomDocument &doc, TQDomElement &parent, const TQString &name, const int* value );
+ static void demarshal( const TQDomElement &element, int* value );
+ static TQString marshalValue( const unsigned int* value );
+ static void demarshalValue( const TQString &str, unsigned int *value );
+ static void marshal( TQDomDocument &doc, TQDomElement &parent, const TQString &name, const unsigned int* value );
+ static void demarshal( const TQDomElement &element, unsigned int* value );
+ static TQString marshalValue( const double* value );
+ static void demarshalValue( const TQString &str, double *value );
+ static void marshal( TQDomDocument &doc, TQDomElement &parent, const TQString &name, const double* value );
+ static void demarshal( const TQDomElement &element, double* value );
+ static TQString marshalValue( const char* value );
+ static void demarshalValue( const TQString &str, char *value );
+ static void marshal( TQDomDocument &doc, TQDomElement &parent, const TQString &name, const char* value );
+ static void demarshal( const TQDomElement &element, char* value );
+ static TQString marshalValue( const unsigned char* value );
+ static void demarshalValue( const TQString &str, unsigned char *value );
+ static void marshal( TQDomDocument &doc, TQDomElement &parent, const TQString &name, const unsigned char* value );
+ static void demarshal( const TQDomElement &element, unsigned char* value );
+ static TQString marshalValue( const short* value );
+ static void demarshalValue( const TQString &str, short *value );
+ static void marshal( TQDomDocument &doc, TQDomElement &parent, const TQString &name, const short* value );
+ static void demarshal( const TQDomElement &element, short* value );
+ static TQString marshalValue( const TQByteArray* value );
+ static void demarshalValue( const TQString &str, TQByteArray *value );
+ static void marshal( TQDomDocument &doc, TQDomElement &parent, const TQString &name, const TQByteArray* value );
+ static void demarshal( const TQDomElement &element, TQByteArray* value );
+ static TQString marshalValue( const TQDateTime* value );
+ static void demarshalValue( const TQString &str, TQDateTime *value );
+ static void marshal( TQDomDocument &doc, TQDomElement &parent, const TQString &name, const TQDateTime* value );
+ static void demarshal( const TQDomElement &element, TQDateTime* value );
+ static TQString marshalValue( const TQDate* value );
+ static void demarshalValue( const TQString &str, TQDate *value );
+ static void marshal( TQDomDocument &doc, TQDomElement &parent, const TQString &name, const TQDate* value );
+ static void demarshal( const TQDomElement &element, TQDate* value );
+ static void marshal( TQDomDocument &doc, TQDomElement &parent, const TQString &name, const ResultElementArray* value );
+ static void demarshal( const TQDomElement &parent, ResultElementArray* value );
+ static void marshal( TQDomDocument &doc, TQDomElement &parent, const TQString &name, const DirectoryCategoryArray* value );
+ static void demarshal( const TQDomElement &parent, DirectoryCategoryArray* value );
+ static void marshal( TQDomDocument &doc, TQDomElement &parent, const TQString &name, const GoogleSearchResult* value );
+ static void demarshal( const TQDomElement &parent, GoogleSearchResult* value );
+ static void marshal( TQDomDocument &doc, TQDomElement &parent, const TQString &name, const DirectoryCategory* value );
+ static void demarshal( const TQDomElement &parent, DirectoryCategory* value );
+ static void marshal( TQDomDocument &doc, TQDomElement &parent, const TQString &name, const ResultElement* value );
+ static void demarshal( const TQDomElement &parent, ResultElement* value );
};
diff --git a/kode/kwsdl/tests/google/transport.cpp b/kode/kwsdl/tests/google/transport.cpp
index 4f4583ba2..5d7d92f2b 100644
--- a/kode/kwsdl/tests/google/transport.cpp
+++ b/kode/kwsdl/tests/google/transport.cpp
@@ -26,17 +26,17 @@
#include <kdebug.h>
-Transport::Transport( const QString &url )
+Transport::Transport( const TQString &url )
{
mUrl = url;
}
-void Transport::query( const QString &xml )
+void Transport::query( const TQString &xml )
{
mData.truncate( 0 );
- QByteArray postData;
- QDataStream stream( postData, IO_WriteOnly );
+ TQByteArray postData;
+ TQDataStream stream( postData, IO_WriteOnly );
stream.writeRawBytes( xml.utf8(), xml.utf8().length() );
KIO::TransferJob* job = KIO::http_post( KURL( mUrl ), postData, false );
@@ -48,11 +48,11 @@ void Transport::query( const QString &xml )
job->addMetaData( "UserAgent", "KWSDL" );
job->addMetaData( "content-type", "Content-Type: text/xml; charset=utf-8" );
- connect( job, SIGNAL( data( KIO::Job*, const QByteArray& ) ), this, SLOT( slotData( KIO::Job*, const QByteArray& ) ) );
- connect( job, SIGNAL( result( KIO::Job* ) ), this, SLOT( slotResult( KIO::Job* ) ) );
+ connect( job, TQT_SIGNAL( data( KIO::Job*, const TQByteArray& ) ), this, TQT_SLOT( slotData( KIO::Job*, const TQByteArray& ) ) );
+ connect( job, TQT_SIGNAL( result( KIO::Job* ) ), this, TQT_SLOT( slotResult( KIO::Job* ) ) );
}
-void Transport::slotData( KIO::Job*, const QByteArray &data )
+void Transport::slotData( KIO::Job*, const TQByteArray &data )
{
unsigned int oldSize = mData.size();
mData.resize( oldSize + data.size() );
@@ -67,7 +67,7 @@ void Transport::slotResult( KIO::Job* job )
return;
}
- emit result( QString::fromUtf8( mData.data(), mData.size() ) );
+ emit result( TQString::fromUtf8( mData.data(), mData.size() ) );
}
diff --git a/kode/kwsdl/tests/google/transport.h b/kode/kwsdl/tests/google/transport.h
index b39d6e82c..f2386832f 100644
--- a/kode/kwsdl/tests/google/transport.h
+++ b/kode/kwsdl/tests/google/transport.h
@@ -24,7 +24,7 @@
#ifndef TRANSPORT_H
#define TRANSPORT_H
-#include <qobject.h>
+#include <tqobject.h>
#include <kio/job.h>
class Transport : public QObject
@@ -32,19 +32,19 @@ class Transport : public QObject
Q_OBJECT
public:
- Transport( const QString &url );
- void query( const QString &xml );
+ Transport( const TQString &url );
+ void query( const TQString &xml );
signals:
- void result( const QString &xml );
+ void result( const TQString &xml );
private slots:
- void slotData( KIO::Job*, const QByteArray &data );
+ void slotData( KIO::Job*, const TQByteArray &data );
void slotResult( KIO::Job* job );
private:
- QString mUrl;
- QByteArray mData;
+ TQString mUrl;
+ TQByteArray mData;
};
#endif
diff --git a/kode/kwsdl/typemapper.cpp b/kode/kwsdl/typemapper.cpp
index b8d1a80ba..88842ecea 100644
--- a/kode/kwsdl/typemapper.cpp
+++ b/kode/kwsdl/typemapper.cpp
@@ -19,7 +19,7 @@
Boston, MA 02110-1301, USA.
*/
-#include <qmap.h>
+#include <tqmap.h>
#include <schema/attribute.h>
#include <schema/complextype.h>
@@ -33,21 +33,21 @@ using namespace KWSDL;
TypeMapper::TypeMapper()
{
- mMap.insert( "any", TypeInfo( "any", "QString", "qstring.h" ) );
- mMap.insert( "anyURI", TypeInfo( "anyUri", "QString", "qstring.h" ) );
- mMap.insert( "base64Binary", TypeInfo( "base64Binary", "QByteArray", "qcstring.h" ) );
- mMap.insert( "binary", TypeInfo( "binary", "QByteArray", "qcstring.h" ) );
+ mMap.insert( "any", TypeInfo( "any", "TQString", "tqstring.h" ) );
+ mMap.insert( "anyURI", TypeInfo( "anyUri", "TQString", "tqstring.h" ) );
+ mMap.insert( "base64Binary", TypeInfo( "base64Binary", "TQByteArray", "tqcstring.h" ) );
+ mMap.insert( "binary", TypeInfo( "binary", "TQByteArray", "tqcstring.h" ) );
mMap.insert( "boolean", TypeInfo( "boolean", "bool", "" ) );
mMap.insert( "byte", TypeInfo( "byte", "char", "" ) );
- mMap.insert( "date", TypeInfo( "date", "QDate", "qdatetime.h" ) );
- mMap.insert( "dateTime", TypeInfo( "dateTime", "QDateTime", "qdatetime.h" ) );
+ mMap.insert( "date", TypeInfo( "date", "TQDate", "tqdatetime.h" ) );
+ mMap.insert( "dateTime", TypeInfo( "dateTime", "TQDateTime", "tqdatetime.h" ) );
mMap.insert( "decimal", TypeInfo( "decimal", "float", "" ) );
mMap.insert( "double", TypeInfo( "double", "double", "" ) );
- mMap.insert( "duration", TypeInfo( "duration", "QString", "qstring.h" ) ); // TODO: add duration class
+ mMap.insert( "duration", TypeInfo( "duration", "TQString", "tqstring.h" ) ); // TODO: add duration class
mMap.insert( "int", TypeInfo( "int", "int", "" ) );
- mMap.insert( "language", TypeInfo( "language", "QString", "qstring.h" ) );
+ mMap.insert( "language", TypeInfo( "language", "TQString", "tqstring.h" ) );
mMap.insert( "short", TypeInfo( "short", "short", "" ) );
- mMap.insert( "string", TypeInfo( "string", "QString", "qstring.h" ) );
+ mMap.insert( "string", TypeInfo( "string", "TQString", "tqstring.h" ) );
mMap.insert( "unsignedByte", TypeInfo( "unsignedByte", "unsigned char", "" ) );
mMap.insert( "unsignedInt", TypeInfo( "unsignedInt", "unsigned int", "" ) );
}
@@ -57,21 +57,21 @@ void TypeMapper::setTypes( const Schema::Types &types )
mTypes = types;
}
-QString TypeMapper::type( const Schema::XSDType *type ) const
+TQString TypeMapper::type( const Schema::XSDType *type ) const
{
- QString typeName = type->name();
+ TQString typeName = type->name();
typeName[ 0 ] = typeName[ 0 ].upper();
return typeName;
}
-QString TypeMapper::type( const Schema::Element *element ) const
+TQString TypeMapper::type( const Schema::Element *element ) const
{
- QString typeName = element->typeName();
+ TQString typeName = element->typeName();
- QString type;
+ TQString type;
// check basic types
- QMap<QString, TypeInfo>::ConstIterator it = mMap.find( typeName );
+ TQMap<TQString, TypeInfo>::ConstIterator it = mMap.find( typeName );
if ( it != mMap.end() )
type = it.data().type;
@@ -83,13 +83,13 @@ QString TypeMapper::type( const Schema::Element *element ) const
return type;
}
-QString TypeMapper::type( const Schema::Attribute *attribute ) const
+TQString TypeMapper::type( const Schema::Attribute *attribute ) const
{
- QString typeName = attribute->typeName();
+ TQString typeName = attribute->typeName();
- QString type;
+ TQString type;
// check basic types
- QMap<QString, TypeInfo>::ConstIterator it = mMap.find( typeName );
+ TQMap<TQString, TypeInfo>::ConstIterator it = mMap.find( typeName );
if ( it != mMap.end() )
type = it.data().type;
@@ -101,10 +101,10 @@ QString TypeMapper::type( const Schema::Attribute *attribute ) const
return type;
}
-QString TypeMapper::type( const QString &typeName ) const
+TQString TypeMapper::type( const TQString &typeName ) const
{
// check basic types
- QMap<QString, TypeInfo>::ConstIterator it = mMap.find( typeName );
+ TQMap<TQString, TypeInfo>::ConstIterator it = mMap.find( typeName );
if ( it != mMap.end() )
return it.data().type;
@@ -132,22 +132,22 @@ QString TypeMapper::type( const QString &typeName ) const
}
}
- return QString();
+ return TQString();
}
-QStringList TypeMapper::header( const Schema::XSDType *type ) const
+TQStringList TypeMapper::header( const Schema::XSDType *type ) const
{
return type->name().lower() + ".h";
}
-QStringList TypeMapper::header( const Schema::Element *element ) const
+TQStringList TypeMapper::header( const Schema::Element *element ) const
{
- QString typeName = element->typeName();
+ TQString typeName = element->typeName();
- QStringList headers;
+ TQStringList headers;
// check basic types
- QMap<QString, TypeInfo>::ConstIterator it = mMap.find( typeName );
+ TQMap<TQString, TypeInfo>::ConstIterator it = mMap.find( typeName );
if ( it != mMap.end() ) {
if ( !it.data().header.isEmpty() )
headers.append( it.data().header );
@@ -155,23 +155,23 @@ QStringList TypeMapper::header( const Schema::Element *element ) const
headers.append( typeName.lower() + ".h" );
if ( element->maxOccurs() > 1 )
- headers.append( "qptrlist.h" );
+ headers.append( "tqptrlist.h" );
return headers;
}
-QMap<QString, QString> TypeMapper::headerDec( const Schema::Element *element ) const
+TQMap<TQString, TQString> TypeMapper::headerDec( const Schema::Element *element ) const
{
- QString typeName = element->typeName();
+ TQString typeName = element->typeName();
- QMap<QString, QString> headers;
+ TQMap<TQString, TQString> headers;
// check basic types
- QMap<QString, TypeInfo>::ConstIterator it = mMap.find( typeName );
+ TQMap<TQString, TypeInfo>::ConstIterator it = mMap.find( typeName );
if ( it != mMap.end() ) {
if ( !it.data().header.isEmpty() ) {
- if ( it.data().type == "QByteArray" )
- headers.insert( it.data().header, QString() );
+ if ( it.data().type == "TQByteArray" )
+ headers.insert( it.data().header, TQString() );
else
headers.insert( it.data().header, it.data().type );
}
@@ -181,19 +181,19 @@ QMap<QString, QString> TypeMapper::headerDec( const Schema::Element *element ) c
}
if ( element->maxOccurs() > 1 )
- headers.insert( "qptrlist.h", QString() );
+ headers.insert( "tqptrlist.h", TQString() );
return headers;
}
-QStringList TypeMapper::header( const Schema::Attribute *attribute ) const
+TQStringList TypeMapper::header( const Schema::Attribute *attribute ) const
{
- QString typeName = attribute->typeName();
+ TQString typeName = attribute->typeName();
- QStringList headers;
+ TQStringList headers;
// check basic types
- QMap<QString, TypeInfo>::ConstIterator it = mMap.find( typeName );
+ TQMap<TQString, TypeInfo>::ConstIterator it = mMap.find( typeName );
if ( it != mMap.end() ) {
if ( !it.data().header.isEmpty() )
headers.append( it.data().header );
@@ -203,18 +203,18 @@ QStringList TypeMapper::header( const Schema::Attribute *attribute ) const
return headers;
}
-QMap<QString, QString> TypeMapper::headerDec( const Schema::Attribute *attribute ) const
+TQMap<TQString, TQString> TypeMapper::headerDec( const Schema::Attribute *attribute ) const
{
- QString typeName = attribute->typeName();
+ TQString typeName = attribute->typeName();
- QMap<QString, QString> headers;
+ TQMap<TQString, TQString> headers;
// check basic types
- QMap<QString, TypeInfo>::ConstIterator it = mMap.find( typeName );
+ TQMap<TQString, TypeInfo>::ConstIterator it = mMap.find( typeName );
if ( it != mMap.end() ) {
if ( !it.data().header.isEmpty() ) {
- if ( it.data().type == "QByteArray" )
- headers.insert( it.data().header, QString() );
+ if ( it.data().type == "TQByteArray" )
+ headers.insert( it.data().header, TQString() );
else
headers.insert( it.data().header, it.data().type );
}
@@ -226,13 +226,13 @@ QMap<QString, QString> TypeMapper::headerDec( const Schema::Attribute *attribute
return headers;
}
-QStringList TypeMapper::header( const QString &typeName ) const
+TQStringList TypeMapper::header( const TQString &typeName ) const
{
- QMap<QString, TypeInfo>::ConstIterator it = mMap.find( typeName );
+ TQMap<TQString, TypeInfo>::ConstIterator it = mMap.find( typeName );
if ( it != mMap.end() )
return it.data().header;
- const QString convertedType = type( typeName );
+ const TQString convertedType = type( typeName );
if ( isBaseType( convertedType ) ) {
for ( it = mMap.begin(); it != mMap.end(); ++it )
if ( it.data().type == convertedType )
@@ -240,20 +240,20 @@ QStringList TypeMapper::header( const QString &typeName ) const
} else
return typeName.lower() + ".h";
- return QStringList();
+ return TQStringList();
}
-QMap<QString, QString> TypeMapper::headerDec( const QString &typeName ) const
+TQMap<TQString, TQString> TypeMapper::headerDec( const TQString &typeName ) const
{
- QString type( typeName );
- QMap<QString, QString> headers;
+ TQString type( typeName );
+ TQMap<TQString, TQString> headers;
// check basic types
- QMap<QString, TypeInfo>::ConstIterator it = mMap.find( typeName );
+ TQMap<TQString, TypeInfo>::ConstIterator it = mMap.find( typeName );
if ( it != mMap.end() ) {
if ( !it.data().header.isEmpty() ) {
- if ( it.data().type == "QByteArray" )
- headers.insert( it.data().header, QString() );
+ if ( it.data().type == "TQByteArray" )
+ headers.insert( it.data().header, TQString() );
else
headers.insert( it.data().header, it.data().type );
}
@@ -265,33 +265,33 @@ QMap<QString, QString> TypeMapper::headerDec( const QString &typeName ) const
return headers;
}
-QString TypeMapper::argument( const QString &name, const Schema::Element *element ) const
+TQString TypeMapper::argument( const TQString &name, const Schema::Element *element ) const
{
- QString typeName = type( element );
+ TQString typeName = type( element );
if ( element->maxOccurs() > 1 )
- return "QPtrList<" + typeName + ">* " + name;
+ return "TQPtrList<" + typeName + ">* " + name;
else
return typeName + "* " + name;
}
-QString TypeMapper::argument( const QString &name, const Schema::Attribute *attribute ) const
+TQString TypeMapper::argument( const TQString &name, const Schema::Attribute *attribute ) const
{
return type( attribute ) + "* " + name;
}
-QString TypeMapper::argument( const QString &name, const QString &typeName, bool isList ) const
+TQString TypeMapper::argument( const TQString &name, const TQString &typeName, bool isList ) const
{
if ( isList ) {
- return "QPtrList<" + type( typeName ) + ">* " + name;
+ return "TQPtrList<" + type( typeName ) + ">* " + name;
} else {
return type( typeName ) + "* " + name;
}
}
-bool TypeMapper::isBaseType( const QString &type ) const
+bool TypeMapper::isBaseType( const TQString &type ) const
{
- QMap<QString, TypeInfo>::ConstIterator it;
+ TQMap<TQString, TypeInfo>::ConstIterator it;
for ( it = mMap.begin(); it != mMap.end(); ++it )
if ( it.data().type == type )
return true;
diff --git a/kode/kwsdl/typemapper.h b/kode/kwsdl/typemapper.h
index 529b004fe..9a718bb24 100644
--- a/kode/kwsdl/typemapper.h
+++ b/kode/kwsdl/typemapper.h
@@ -22,7 +22,7 @@
#ifndef KWSDL_TYPEMAPPER_H
#define KWSDL_TYPEMAPPER_H
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include <schema/types.h>
@@ -40,13 +40,13 @@ class TypeInfo
TypeInfo()
{}
- TypeInfo( const QString &_xsdType, const QString &_type, const QString &_header )
+ TypeInfo( const TQString &_xsdType, const TQString &_type, const TQString &_header )
: xsdType( _xsdType ), type( _type ), header( _header )
{}
- QString xsdType;
- QString type;
- QString header;
+ TQString xsdType;
+ TQString type;
+ TQString header;
};
class TypeMapper
@@ -56,27 +56,27 @@ class TypeMapper
void setTypes( const Schema::Types &types );
- QString type( const Schema::XSDType *type ) const;
- QString type( const Schema::Element *element ) const;
- QString type( const Schema::Attribute *attribute ) const;
- QString type( const QString &typeName ) const;
+ TQString type( const Schema::XSDType *type ) const;
+ TQString type( const Schema::Element *element ) const;
+ TQString type( const Schema::Attribute *attribute ) const;
+ TQString type( const TQString &typeName ) const;
- QStringList header( const Schema::XSDType *type ) const;
- QStringList header( const Schema::Element *element ) const;
- QMap<QString,QString> headerDec( const Schema::Element *element ) const;
- QStringList header( const Schema::Attribute *attribute ) const;
- QMap<QString,QString> headerDec( const Schema::Attribute *attribute ) const;
- QStringList header( const QString &typeName ) const;
- QMap<QString,QString> headerDec( const QString &typeName ) const;
+ TQStringList header( const Schema::XSDType *type ) const;
+ TQStringList header( const Schema::Element *element ) const;
+ TQMap<TQString,TQString> headerDec( const Schema::Element *element ) const;
+ TQStringList header( const Schema::Attribute *attribute ) const;
+ TQMap<TQString,TQString> headerDec( const Schema::Attribute *attribute ) const;
+ TQStringList header( const TQString &typeName ) const;
+ TQMap<TQString,TQString> headerDec( const TQString &typeName ) const;
- QString argument( const QString &name, const Schema::Element *element ) const;
- QString argument( const QString &name, const Schema::Attribute *attribute ) const;
- QString argument( const QString &name, const QString &typeName, bool isList = false ) const;
+ TQString argument( const TQString &name, const Schema::Element *element ) const;
+ TQString argument( const TQString &name, const Schema::Attribute *attribute ) const;
+ TQString argument( const TQString &name, const TQString &typeName, bool isList = false ) const;
private:
- bool isBaseType( const QString& ) const;
+ bool isBaseType( const TQString& ) const;
- QMap<QString, TypeInfo> mMap;
+ TQMap<TQString, TypeInfo> mMap;
Schema::Types mTypes;
};
diff --git a/kode/kwsdl/wscl/conversation.cpp b/kode/kwsdl/wscl/conversation.cpp
index 692f566fb..97de47d47 100644
--- a/kode/kwsdl/wscl/conversation.cpp
+++ b/kode/kwsdl/wscl/conversation.cpp
@@ -31,72 +31,72 @@ Conversation::~Conversation()
{
}
-void Conversation::setName( const QString &name )
+void Conversation::setName( const TQString &name )
{
mName = name;
}
-QString Conversation::name() const
+TQString Conversation::name() const
{
return mName;
}
-void Conversation::setVersion( const QString &version )
+void Conversation::setVersion( const TQString &version )
{
mVersion = version;
}
-QString Conversation::version() const
+TQString Conversation::version() const
{
return mVersion;
}
-void Conversation::setDescription( const QString &description )
+void Conversation::setDescription( const TQString &description )
{
mDescription = description;
}
-QString Conversation::description() const
+TQString Conversation::description() const
{
return mDescription;
}
-void Conversation::setNameSpace( const QString &nameSpace )
+void Conversation::setNameSpace( const TQString &nameSpace )
{
mNameSpace = nameSpace;
}
-QString Conversation::nameSpace() const
+TQString Conversation::nameSpace() const
{
return mNameSpace;
}
-void Conversation::setSchema( const QString &schema )
+void Conversation::setSchema( const TQString &schema )
{
mSchema = schema;
}
-QString Conversation::schema() const
+TQString Conversation::schema() const
{
return mSchema;
}
-void Conversation::setInitialInteraction( const QString &initialInteraction )
+void Conversation::setInitialInteraction( const TQString &initialInteraction )
{
mInitialInteraction = initialInteraction;
}
-QString Conversation::initialInteraction() const
+TQString Conversation::initialInteraction() const
{
return mInitialInteraction;
}
-void Conversation::setFinalInteraction( const QString &finalInteraction )
+void Conversation::setFinalInteraction( const TQString &finalInteraction )
{
mFinalInteraction = finalInteraction;
}
-QString Conversation::finalInteraction() const
+TQString Conversation::finalInteraction() const
{
return mFinalInteraction;
}
diff --git a/kode/kwsdl/wscl/conversation.h b/kode/kwsdl/wscl/conversation.h
index 757edfab9..448bd3e09 100644
--- a/kode/kwsdl/wscl/conversation.h
+++ b/kode/kwsdl/wscl/conversation.h
@@ -33,26 +33,26 @@ class Conversation
Conversation();
~Conversation();
- void setName( const QString &name );
- QString name() const;
+ void setName( const TQString &name );
+ TQString name() const;
- void setVersion( const QString &version );
- QString version() const;
+ void setVersion( const TQString &version );
+ TQString version() const;
- void setDescription( const QString &description );
- QString description() const;
+ void setDescription( const TQString &description );
+ TQString description() const;
- void setNameSpace( const QString &nameSpace );
- QString nameSpace() const;
+ void setNameSpace( const TQString &nameSpace );
+ TQString nameSpace() const;
- void setSchema( const QString &schema );
- QString schema() const;
+ void setSchema( const TQString &schema );
+ TQString schema() const;
- void setInitialInteraction( const QString &initialInteraction );
- QString initialInteraction() const;
+ void setInitialInteraction( const TQString &initialInteraction );
+ TQString initialInteraction() const;
- void setFinalInteraction( const QString &finalInteraction );
- QString finalInteraction() const;
+ void setFinalInteraction( const TQString &finalInteraction );
+ TQString finalInteraction() const;
void setInteractions( const Interaction::List &interactions );
Interaction::List interactions() const;
@@ -61,13 +61,13 @@ class Conversation
Transition::List transitions() const;
private:
- QString mName;
- QString mVersion;
- QString mDescription;
- QString mNameSpace;
- QString mSchema;
- QString mInitialInteraction;
- QString mFinalInteraction;
+ TQString mName;
+ TQString mVersion;
+ TQString mDescription;
+ TQString mNameSpace;
+ TQString mSchema;
+ TQString mInitialInteraction;
+ TQString mFinalInteraction;
Interaction::List mInteractions;
Transition::List mTransitions;
diff --git a/kode/kwsdl/wscl/documents.cpp b/kode/kwsdl/wscl/documents.cpp
index 92b7928e4..d020e63be 100644
--- a/kode/kwsdl/wscl/documents.cpp
+++ b/kode/kwsdl/wscl/documents.cpp
@@ -23,22 +23,22 @@
using namespace WSCL;
-void XMLDocument::setId( const QString &id )
+void XMLDocument::setId( const TQString &id )
{
mId = id;
}
-QString XMLDocument::id() const
+TQString XMLDocument::id() const
{
return mId;
}
-void XMLDocument::setSchema( const QString &schema )
+void XMLDocument::setSchema( const TQString &schema )
{
mSchema = schema;
}
-QString XMLDocument::schema() const
+TQString XMLDocument::schema() const
{
return mSchema;
}
diff --git a/kode/kwsdl/wscl/documents.h b/kode/kwsdl/wscl/documents.h
index 2bba60ad1..638aaa2d7 100644
--- a/kode/kwsdl/wscl/documents.h
+++ b/kode/kwsdl/wscl/documents.h
@@ -22,25 +22,25 @@
#ifndef WSCL_DOCUMENTS_H
#define WSCL_DOCUMENTS_H
-#include <qstring.h>
-#include <qvaluelist.h>
+#include <tqstring.h>
+#include <tqvaluelist.h>
namespace WSCL {
class XMLDocument
{
public:
- typedef QValueList<XMLDocument> List;
+ typedef TQValueList<XMLDocument> List;
- void setId( const QString &id );
- QString id() const;
+ void setId( const TQString &id );
+ TQString id() const;
- void setSchema( const QString &schema );
- QString schema() const;
+ void setSchema( const TQString &schema );
+ TQString schema() const;
private:
- QString mId;
- QString mSchema;
+ TQString mId;
+ TQString mSchema;
};
class ReceiveSendDocument
diff --git a/kode/kwsdl/wscl/interaction.cpp b/kode/kwsdl/wscl/interaction.cpp
index ff88408a9..78db369c6 100644
--- a/kode/kwsdl/wscl/interaction.cpp
+++ b/kode/kwsdl/wscl/interaction.cpp
@@ -32,12 +32,12 @@ Interaction::~Interaction()
{
}
-void Interaction::setId( const QString &id )
+void Interaction::setId( const TQString &id )
{
mId = id;
}
-QString Interaction::id() const
+TQString Interaction::id() const
{
return mId;
}
diff --git a/kode/kwsdl/wscl/interaction.h b/kode/kwsdl/wscl/interaction.h
index 2700d7c00..50ececb8c 100644
--- a/kode/kwsdl/wscl/interaction.h
+++ b/kode/kwsdl/wscl/interaction.h
@@ -22,7 +22,7 @@
#ifndef WSCL_INTERACTION_H
#define WSCL_INTERACTION_H
-#include <qvaluelist.h>
+#include <tqvaluelist.h>
#include "documents.h"
@@ -31,7 +31,7 @@ namespace WSCL {
class Interaction
{
public:
- typedef QValueList<Interaction> List;
+ typedef TQValueList<Interaction> List;
enum Type
{
@@ -45,8 +45,8 @@ class Interaction
Interaction();
~Interaction();
- void setId( const QString &id );
- QString id() const;
+ void setId( const TQString &id );
+ TQString id() const;
void setType( Type type );
Type type() const;
@@ -64,7 +64,7 @@ class Interaction
SendDocument sendDocument() const;
private:
- QString mId;
+ TQString mId;
Type mType;
SendReceiveDocument mSendReceiveDocument;
diff --git a/kode/kwsdl/wscl/parser.cpp b/kode/kwsdl/wscl/parser.cpp
index 129c3c3dc..a21d05fe8 100644
--- a/kode/kwsdl/wscl/parser.cpp
+++ b/kode/kwsdl/wscl/parser.cpp
@@ -19,7 +19,7 @@
Boston, MA 02110-1301, USA.
*/
-#include <qdom.h>
+#include <tqdom.h>
#include "parser.h"
@@ -33,10 +33,10 @@ Parser::~Parser()
{
}
-void Parser::parse( const QString &xml )
+void Parser::parse( const TQString &xml )
{
- QDomDocument doc( "kwscl" );
- QString errorMsg;
+ TQDomDocument doc( "kwscl" );
+ TQString errorMsg;
int errorLine, errorColumn;
bool ok = doc.setContent( xml, true, &errorMsg, &errorLine, &errorColumn );
if ( !ok ) {
@@ -44,13 +44,13 @@ void Parser::parse( const QString &xml )
return;
}
- QDomNodeList nodes = doc.elementsByTagName( "Conversation" );
+ TQDomNodeList nodes = doc.elementsByTagName( "Conversation" );
if ( nodes.count() <= 0 ) {
qDebug( "No conversation tag found in wscl data" );
return;
}
- QDomElement conversationElement = nodes.item( 0 ).toElement();
+ TQDomElement conversationElement = nodes.item( 0 ).toElement();
mConversation.setName( conversationElement.attribute( "name" ) );
mConversation.setVersion( conversationElement.attribute( "version" ) );
@@ -60,16 +60,16 @@ void Parser::parse( const QString &xml )
mConversation.setInitialInteraction( conversationElement.attribute( "initialInteraction" ) );
mConversation.setFinalInteraction( conversationElement.attribute( "finalInteraction" ) );
- QDomNode node = conversationElement.firstChild();
+ TQDomNode node = conversationElement.firstChild();
while ( !node.isNull() ) {
- QDomElement element = node.toElement();
+ TQDomElement element = node.toElement();
if ( !element.isNull() ) {
if ( element.tagName() == "ConversationInteractions" ) {
Interaction::List interactions;
- QDomNode interactionNode = element.firstChild();
+ TQDomNode interactionNode = element.firstChild();
while ( !interactionNode.isNull() ) {
- QDomElement interactionElement = interactionNode.toElement();
+ TQDomElement interactionElement = interactionNode.toElement();
if ( !interactionElement.isNull() ) {
if ( interactionElement.tagName() != "Interaction" ) {
qDebug( "Expected tag name 'Interaction', got '%s'", interactionElement.tagName().latin1() );
@@ -78,7 +78,7 @@ void Parser::parse( const QString &xml )
Interaction interaction;
interaction.setId( interactionElement.attribute( "id" ) );
- const QString type = interactionElement.attribute( "interactionType" );
+ const TQString type = interactionElement.attribute( "interactionType" );
if ( type == "ReceiveSend" )
interaction.setType( Interaction::ReceiveSend );
else if ( type == "SendReceive" )
@@ -97,11 +97,11 @@ void Parser::parse( const QString &xml )
XMLDocument inputDocument;
XMLDocument outputDocument;
- QDomNode contentNode = interactionElement.firstChild();
+ TQDomNode contentNode = interactionElement.firstChild();
while ( !contentNode.isNull() ) {
- QDomElement contentElement = contentNode.toElement();
+ TQDomElement contentElement = contentNode.toElement();
if ( !contentElement.isNull() ) {
- const QString tagName = contentElement.tagName();
+ const TQString tagName = contentElement.tagName();
if ( tagName == "InboundXMLDocument" ) {
XMLDocument document;
document.setId( contentElement.attribute( "id" ) );
@@ -170,9 +170,9 @@ void Parser::parse( const QString &xml )
} else if ( element.tagName() == "ConversationTransitions" ) {
Transition::List transitions;
- QDomNode transitionNode = element.firstChild();
+ TQDomNode transitionNode = element.firstChild();
while ( !transitionNode.isNull() ) {
- QDomElement transitionElement = transitionNode.toElement();
+ TQDomElement transitionElement = transitionNode.toElement();
if ( !transitionElement.isNull() ) {
if ( transitionElement.tagName() != "Transition" ) {
qDebug( "Expected tag name 'Transition', got '%s'", transitionElement.tagName().latin1() );
@@ -181,11 +181,11 @@ void Parser::parse( const QString &xml )
Transition transition;
- QDomNode contentNode = transitionElement.firstChild();
+ TQDomNode contentNode = transitionElement.firstChild();
while ( !contentNode.isNull() ) {
- QDomElement contentElement = contentNode.toElement();
+ TQDomElement contentElement = contentNode.toElement();
if ( !contentElement.isNull() ) {
- const QString tagName = contentElement.tagName();
+ const TQString tagName = contentElement.tagName();
if ( tagName == "SourceInteraction" )
transition.setSourceInteraction( contentElement.attribute( "href" ) );
else if ( tagName == "DestinationInteraction" )
diff --git a/kode/kwsdl/wscl/parser.h b/kode/kwsdl/wscl/parser.h
index 8f8824747..49b5a2184 100644
--- a/kode/kwsdl/wscl/parser.h
+++ b/kode/kwsdl/wscl/parser.h
@@ -32,7 +32,7 @@ class Parser
Parser();
~Parser();
- void parse( const QString &xml );
+ void parse( const TQString &xml );
void reset();
Conversation conversation() const;
diff --git a/kode/kwsdl/wscl/transition.cpp b/kode/kwsdl/wscl/transition.cpp
index c3a088a04..9e4ae491d 100644
--- a/kode/kwsdl/wscl/transition.cpp
+++ b/kode/kwsdl/wscl/transition.cpp
@@ -31,32 +31,32 @@ Transition::~Transition()
{
}
-void Transition::setSourceInteraction( const QString &sourceInteraction )
+void Transition::setSourceInteraction( const TQString &sourceInteraction )
{
mSourceInteraction = sourceInteraction;
}
-QString Transition::sourceInteraction() const
+TQString Transition::sourceInteraction() const
{
return mSourceInteraction;
}
-void Transition::setDestinationInteraction( const QString &destinationInteraction )
+void Transition::setDestinationInteraction( const TQString &destinationInteraction )
{
mDestinationInteraction = destinationInteraction;
}
-QString Transition::destinationInteraction() const
+TQString Transition::destinationInteraction() const
{
return mDestinationInteraction;
}
-void Transition::setSourceInteractionCondition( const QString &sourceInteractionCondition )
+void Transition::setSourceInteractionCondition( const TQString &sourceInteractionCondition )
{
mSourceInteractionCondition = sourceInteractionCondition;
}
-QString Transition::sourceInteractionCondition() const
+TQString Transition::sourceInteractionCondition() const
{
return mSourceInteractionCondition;
}
diff --git a/kode/kwsdl/wscl/transition.h b/kode/kwsdl/wscl/transition.h
index cb6d0a563..1a64691fb 100644
--- a/kode/kwsdl/wscl/transition.h
+++ b/kode/kwsdl/wscl/transition.h
@@ -22,32 +22,32 @@
#ifndef WSCL_TRANSITION_H
#define WSCL_TRANSITION_H
-#include <qstring.h>
-#include <qvaluelist.h>
+#include <tqstring.h>
+#include <tqvaluelist.h>
namespace WSCL {
class Transition
{
public:
- typedef QValueList<Transition> List;
+ typedef TQValueList<Transition> List;
Transition();
~Transition();
- void setSourceInteraction( const QString &sourceInteraction );
- QString sourceInteraction() const;
+ void setSourceInteraction( const TQString &sourceInteraction );
+ TQString sourceInteraction() const;
- void setDestinationInteraction( const QString &destinationInteraction );
- QString destinationInteraction() const;
+ void setDestinationInteraction( const TQString &destinationInteraction );
+ TQString destinationInteraction() const;
- void setSourceInteractionCondition( const QString &sourceInteractionCondition );
- QString sourceInteractionCondition() const;
+ void setSourceInteractionCondition( const TQString &sourceInteractionCondition );
+ TQString sourceInteractionCondition() const;
private:
- QString mSourceInteraction;
- QString mDestinationInteraction;
- QString mSourceInteractionCondition;
+ TQString mSourceInteraction;
+ TQString mDestinationInteraction;
+ TQString mSourceInteractionCondition;
};
}
diff --git a/kode/kwsdl/wsdl.cpp b/kode/kwsdl/wsdl.cpp
index c03692417..b74ade93e 100644
--- a/kode/kwsdl/wsdl.cpp
+++ b/kode/kwsdl/wsdl.cpp
@@ -73,7 +73,7 @@ Schema::Types WSDL::types() const
return mTypes;
}
-Message WSDL::findMessage( const QString &name ) const
+Message WSDL::findMessage( const TQString &name ) const
{
Message::List::ConstIterator it;
for ( it = mMessages.begin(); it != mMessages.end(); ++it ) {
@@ -85,7 +85,7 @@ Message WSDL::findMessage( const QString &name ) const
return Message();
}
-Message WSDL::findOutputMessage( const QString &name ) const
+Message WSDL::findOutputMessage( const TQString &name ) const
{
Port::List::ConstIterator it;
for ( it = mPorts.begin(); it != mPorts.end(); ++it ) {
@@ -100,7 +100,7 @@ Message WSDL::findOutputMessage( const QString &name ) const
return Message();
}
-Port WSDL::findPort( const QString &name ) const
+Port WSDL::findPort( const TQString &name ) const
{
Port::List::ConstIterator it;
for ( it = mPorts.begin(); it != mPorts.end(); ++it ) {
@@ -111,7 +111,7 @@ Port WSDL::findPort( const QString &name ) const
return Port();
}
-Binding WSDL::findBinding( const QString &name ) const
+Binding WSDL::findBinding( const TQString &name ) const
{
Binding::List::ConstIterator it;
for ( it = mBindings.begin(); it != mBindings.end(); ++it ) {
@@ -122,7 +122,7 @@ Binding WSDL::findBinding( const QString &name ) const
return Binding();
}
-Binding::Operation WSDL::findBindingOperation( const QString &portName, const QString &operationName ) const
+Binding::Operation WSDL::findBindingOperation( const TQString &portName, const TQString &operationName ) const
{
Binding::List::ConstIterator it;
for ( it = mBindings.begin(); it != mBindings.end(); ++it ) {
diff --git a/kode/kwsdl/wsdl.h b/kode/kwsdl/wsdl.h
index e057ff101..8a35ba3ba 100644
--- a/kode/kwsdl/wsdl.h
+++ b/kode/kwsdl/wsdl.h
@@ -49,11 +49,11 @@ class WSDL
void setTypes( const Schema::Types &types );
Schema::Types types() const;
- Message findMessage( const QString& ) const;
- Message findOutputMessage( const QString& ) const;
- Port findPort( const QString& ) const;
- Binding findBinding( const QString& ) const;
- Binding::Operation findBindingOperation( const QString&, const QString& ) const;
+ Message findMessage( const TQString& ) const;
+ Message findOutputMessage( const TQString& ) const;
+ Port findPort( const TQString& ) const;
+ Binding findBinding( const TQString& ) const;
+ Binding::Operation findBindingOperation( const TQString&, const TQString& ) const;
private:
Binding::List mBindings;
diff --git a/kode/kxml_compiler/creator.cpp b/kode/kxml_compiler/creator.cpp
index 1277d8d71..591265887 100644
--- a/kode/kxml_compiler/creator.cpp
+++ b/kode/kxml_compiler/creator.cpp
@@ -36,11 +36,11 @@
#include <ksimpleconfig.h>
#include <kstandarddirs.h>
-#include <qfile.h>
-#include <qtextstream.h>
-#include <qdom.h>
-#include <qregexp.h>
-#include <qmap.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
+#include <tqdom.h>
+#include <tqregexp.h>
+#include <tqmap.h>
#include <iostream>
@@ -50,7 +50,7 @@ Creator::Creator( XmlParserType p, XmlWriterType w )
setExternalClassNames();
}
-void Creator::setExternalClassPrefix( const QString &prefix )
+void Creator::setExternalClassPrefix( const TQString &prefix )
{
mExternalClassPrefix = prefix;
@@ -65,18 +65,18 @@ void Creator::setExternalClassNames()
KODE::File &Creator::file() { return mFile; }
-QString Creator::upperFirst( const QString &str )
+TQString Creator::upperFirst( const TQString &str )
{
return KODE::Style::upperFirst( str );
}
-QString Creator::lowerFirst( const QString &str )
+TQString Creator::lowerFirst( const TQString &str )
{
return KODE::Style::lowerFirst( str );
}
-void Creator::createProperty( KODE::Class &c, const QString &type,
- const QString &name )
+void Creator::createProperty( KODE::Class &c, const TQString &type,
+ const TQString &name )
{
KODE::MemberVariable v( name, type );
c.addMemberVariable( v );
@@ -95,28 +95,28 @@ void Creator::createProperty( KODE::Class &c, const QString &type,
void Creator::createElementFunctions( KODE::Class &c, Element *e )
{
if ( e->hasText ) {
- createProperty( c, "QString", e->name );
+ createProperty( c, "TQString", e->name );
if ( mXmlParserType == XmlParserCustomExternal ) {
createTextElementParserCustom( c, e );
}
return;
}
- QString type = upperFirst( e->name );
+ TQString type = upperFirst( e->name );
if ( !mFile.hasClass( type ) ) {
createClass( e );
}
- QString name = lowerFirst( e->name );
+ TQString name = lowerFirst( e->name );
if ( e->pattern.oneOrMore || e->pattern.zeroOrMore ||
e->pattern.choice || e->pattern.optional ) {
registerListTypedef( type );
- c.addHeaderInclude( "qvaluelist.h" );
+ c.addHeaderInclude( "tqvaluelist.h" );
type = type + "::List";
- QString className = upperFirst( name );
+ TQString className = upperFirst( name );
name = name + "List";
KODE::Function adder( "add" + className, "void" );
@@ -135,7 +135,7 @@ void Creator::createElementFunctions( KODE::Class &c, Element *e )
void Creator::createClass( Element *element )
{
- QString className = upperFirst( element->name );
+ TQString className = upperFirst( element->name );
if ( mProcessedClasses.find( className ) != mProcessedClasses.end() ) {
return;
@@ -145,21 +145,21 @@ void Creator::createClass( Element *element )
mProcessedClasses.append( className );
- QValueList<Attribute *>::ConstIterator itA;
+ TQValueList<Attribute *>::ConstIterator itA;
for( itA = element->attributes.begin();
itA != element->attributes.end(); ++itA ) {
Attribute *a = *itA;
- createProperty( c, "QString", a->name );
+ createProperty( c, "TQString", a->name );
}
- QValueList<Element *>::ConstIterator itE;
+ TQValueList<Element *>::ConstIterator itE;
for( itE = element->elements.begin(); itE != element->elements.end();
++itE ) {
createElementFunctions( c, *itE );
}
- QValueList<Reference *>::ConstIterator itR;
+ TQValueList<Reference *>::ConstIterator itR;
for( itR = element->references.begin(); itR != element->references.end();
++itR ) {
Element e;
@@ -176,15 +176,15 @@ void Creator::createClass( Element *element )
void Creator::createElementWriter( KODE::Class &c, Element *element )
{
- KODE::Function writer( "writeElement", "QString" );
+ KODE::Function writer( "writeElement", "TQString" );
KODE::Code code;
- code += "QString xml;";
+ code += "TQString xml;";
- QString tag = "<" + element->name;
+ TQString tag = "<" + element->name;
- QValueList<Attribute *>::ConstIterator it3;
+ TQValueList<Attribute *>::ConstIterator it3;
for( it3 = element->attributes.begin(); it3 != element->attributes.end();
++it3 ) {
tag += " " + (*it3)->name + "=\\\"\" + " + (*it3)->name + "() + \"\\\"";
@@ -201,10 +201,10 @@ void Creator::createElementWriter( KODE::Class &c, Element *element )
if ( !element->isEmpty ) {
code += "indent( 2 );";
- QValueList<Element *>::ConstIterator it;
+ TQValueList<Element *>::ConstIterator it;
for( it = element->elements.begin(); it != element->elements.end(); ++it ) {
Element *e = *it;
- QString type = upperFirst( e->name );
+ TQString type = upperFirst( e->name );
if ( e->pattern.oneOrMore || e->pattern.zeroOrMore ) {
code += type + "::List list = " + e->name + "List();";
code += type + "::List::ConstIterator it;";
@@ -223,11 +223,11 @@ void Creator::createElementWriter( KODE::Class &c, Element *element )
}
}
- QValueList<Reference *>::ConstIterator it2;
+ TQValueList<Reference *>::ConstIterator it2;
for( it2 = element->references.begin(); it2 != element->references.end();
++it2 ) {
Reference *r = *it2;
- QString type = upperFirst( r->name );
+ TQString type = upperFirst( r->name );
if ( r->pattern.oneOrMore || r->pattern.zeroOrMore ) {
code += type + "::List list2 = " + r->name + "List();";
code += type + "::List::ConstIterator it2;";
@@ -268,11 +268,11 @@ void Creator::createElementParser( KODE::Class &c, Element *e )
void Creator::createTextElementParserCustom( KODE::Class &, Element *e )
{
- KODE::Function parser( "parseElement" + upperFirst( e->name ), "QString" );
+ KODE::Function parser( "parseElement" + upperFirst( e->name ), "TQString" );
KODE::Code code;
- code += "QString result;";
+ code += "TQString result;";
code.newLine();
KODE::StateMachine sm;
@@ -285,7 +285,7 @@ void Creator::createTextElementParserCustom( KODE::Class &, Element *e )
stateCode += "} else if ( c == '&' ) {";
stateCode += " entityStart = mRunning + 1;";
stateCode += "} else if ( entityStart >= 0 && c == ';' ) {";
- stateCode += " QString entity = mBuffer.mid( entityStart, mRunning - entityStart );";
+ stateCode += " TQString entity = mBuffer.mid( entityStart, mRunning - entityStart );";
stateCode += " if ( entity == \"quot\" ) result += '\"';";
stateCode += " entityStart = -1;";
stateCode += "} else if ( entityStart < 0 ) {";
@@ -330,7 +330,7 @@ void Creator::createTextElementParserCustom( KODE::Class &, Element *e )
code.newLine();
code += "while ( mRunning < mBuffer.length() ) {";
code.indent();
- code += "QChar c = mBuffer[ mRunning ];";
+ code += "TQChar c = mBuffer[ mRunning ];";
code.addBlock( sm.transitionLogic() );
code += "++mRunning;";
code.unindent();
@@ -382,9 +382,9 @@ void Creator::createElementParserCustom( KODE::Class &c, Element *e )
for( it = e->elements.begin(); it != e->elements.end(); ++it ) {
createFoundTextFunction( (*it)->name );
- QString eName = upperFirst( (*it)->name );
+ TQString eName = upperFirst( (*it)->name );
stateCode += "} else if ( foundText" + eName + "() ) {";
- QString line = " result->";
+ TQString line = " result->";
if ( (*it)->hasText ) line += "set";
else line += "add";
line += eName + "( parseElement" + eName + "() );";
@@ -395,7 +395,7 @@ void Creator::createElementParserCustom( KODE::Class &c, Element *e )
for( it3 = e->references.begin(); it3 != e->references.end(); ++it3 ) {
createFoundTextFunction( (*it3)->name );
- QString eName = upperFirst( (*it3)->name );
+ TQString eName = upperFirst( (*it3)->name );
stateCode += "} else if ( foundText" + eName + "() ) {";
stateCode += " result->add" + eName + "( parseElement" + eName + "() );";
stateCode += " state = WHITESPACE;";
@@ -451,7 +451,7 @@ void Creator::createElementParserCustom( KODE::Class &c, Element *e )
code += "while ( mRunning < mBuffer.length() ) {";
code.indent();
- code += "QChar c = mBuffer[ mRunning ];";
+ code += "TQChar c = mBuffer[ mRunning ];";
if ( e->isEmpty ) {
code += "if ( c == '>' ) {";
@@ -485,11 +485,11 @@ KODE::Code Creator::createAttributeScanner( Attribute *a, bool firstAttribute )
{
KODE::Code code;
- QString aName = upperFirst( a->name );
+ TQString aName = upperFirst( a->name );
createFoundTextFunction( a->name );
- QString line;
+ TQString line;
if ( !firstAttribute ) line = "} else ";
line += "if ( foundText" + aName + "() ) {";
code += line;
@@ -509,7 +509,7 @@ KODE::Code Creator::createAttributeScanner( Attribute *a, bool firstAttribute )
void Creator::createElementParserDom( KODE::Class &c, Element *e )
{
- QString functionName;
+ TQString functionName;
if ( externalParser() ) functionName = "parseElement" + c.name();
else functionName = "parseElement";
@@ -517,7 +517,7 @@ void Creator::createElementParserDom( KODE::Class &c, Element *e )
parser.setStatic( true );
parser.setDocs( "Parse XML object from DOM element." );
- parser.addArgument( "const QDomElement &element" );
+ parser.addArgument( "const TQDomElement &element" );
KODE::Code code;
@@ -533,27 +533,27 @@ void Creator::createElementParserDom( KODE::Class &c, Element *e )
code += c.name() + " *result = new " + c.name() + "();";
code.newLine();
- code += "QDomNode n;";
+ code += "TQDomNode n;";
code += "for( n = element.firstChild(); !n.isNull();"
" n = n.nextSibling() ) {";
code.indent();
- code += "QDomElement e = n.toElement();";
+ code += "TQDomElement e = n.toElement();";
- QValueList<Element *>::ConstIterator it;
+ TQValueList<Element *>::ConstIterator it;
for( it = e->elements.begin(); it != e->elements.end(); ++it ) {
- QString condition;
+ TQString condition;
if ( it != e->elements.begin() ) condition = "else ";
condition += "if";
code += condition + " ( e.tagName() == \"" + (*it)->name + "\" ) {";
code.indent();
- QString className = upperFirst( (*it)->name );
+ TQString className = upperFirst( (*it)->name );
if ( (*it)->hasText ) {
code += "result->set" + className + "( e.text() );";
} else {
- QString line = className + " *o = ";
+ TQString line = className + " *o = ";
if ( externalParser() ) {
line += "parseElement" + className;
} else {
@@ -571,18 +571,18 @@ void Creator::createElementParserDom( KODE::Class &c, Element *e )
code.newLine();
- QValueList<Reference *>::ConstIterator it3;
+ TQValueList<Reference *>::ConstIterator it3;
for( it3 = e->references.begin(); it3 != e->references.end(); ++it3 ) {
- QString condition;
+ TQString condition;
if ( it3 != e->references.begin() ) condition = "else ";
condition += "if";
code += condition + " ( e.tagName() == \"" + (*it3)->name + "\" ) {";
code.indent();
- QString className = upperFirst( (*it3)->name );
+ TQString className = upperFirst( (*it3)->name );
- QString line = className + " *o = ";
+ TQString line = className + " *o = ";
if ( externalParser() ) {
line += "parseElement" + className;
} else {
@@ -601,7 +601,7 @@ void Creator::createElementParserDom( KODE::Class &c, Element *e )
code += "}";
code.newLine();
- QValueList<Attribute *>::ConstIterator it2;
+ TQValueList<Attribute *>::ConstIterator it2;
for( it2 = e->attributes.begin(); it2 != e->attributes.end(); ++it2 ) {
code += "result->set" + upperFirst( (*it2)->name ) +
"( element.attribute( \"" + (*it2)->name + "\" ) );";
@@ -619,32 +619,32 @@ void Creator::createElementParserDom( KODE::Class &c, Element *e )
}
}
-void Creator::registerListTypedef( const QString &type )
+void Creator::registerListTypedef( const TQString &type )
{
if ( !mListTypedefs.contains( type ) ) mListTypedefs.append( type );
}
void Creator::createListTypedefs()
{
- QStringList::ConstIterator it;
+ TQStringList::ConstIterator it;
for( it = mListTypedefs.begin(); it != mListTypedefs.end(); ++it ) {
KODE::Class c = mFile.findClass( *it );
if ( !c.isValid() ) continue;
- c.addTypedef( KODE::Typedef( "QValueList<" + *it + " *>", "List" ) );
+ c.addTypedef( KODE::Typedef( "TQValueList<" + *it + " *>", "List" ) );
mFile.insertClass( c );
}
}
void Creator::createIndenter( KODE::File &file )
{
- KODE::Function indenter( "indent", "QString" );
+ KODE::Function indenter( "indent", "TQString" );
indenter.addArgument( "int n = 0" );
KODE::Code code;
code += "static int i = 0;";
code += "i += n;";
- code += "QString space;";
+ code += "TQString space;";
code += "return space.fill( ' ', i );";
indenter.setBody( code );
@@ -652,15 +652,15 @@ void Creator::createIndenter( KODE::File &file )
file.addFileFunction( indenter );
}
-void Creator::createFileWriter( Element *element, const QString &dtd )
+void Creator::createFileWriter( Element *element, const TQString &dtd )
{
- QString className = upperFirst( element->name );
+ TQString className = upperFirst( element->name );
KODE::Class c = mFile.findClass( className );
c.addInclude( "kdebug.h" );
- c.addInclude( "qtextstream.h" );
- c.addInclude( "qfile.h" );
+ c.addInclude( "tqtextstream.h" );
+ c.addInclude( "tqfile.h" );
if ( !externalWriter() ) {
createIndenter( mFile );
@@ -668,19 +668,19 @@ void Creator::createFileWriter( Element *element, const QString &dtd )
KODE::Function writer( "writeFile", "bool" );
- writer.addArgument( "const QString &filename" );
+ writer.addArgument( "const TQString &filename" );
- c.addInclude( "qfile.h" );
+ c.addInclude( "tqfile.h" );
KODE::Code code;
- code += "QFile file( filename );";
+ code += "TQFile file( filename );";
code += "if ( !file.open( IO_WriteOnly ) ) {";
code += " kdError() << \"Unable to open file '\" << filename << \"'\" << endl;";
code += " return false;";
code += "}";
code += "";
- code += "QTextStream ts( &file );";
+ code += "TQTextStream ts( &file );";
code += "ts << \"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?>\\n\";";
code += "ts << \"<!DOCTYPE features SYSTEM \\\"" + dtd + "\\\">\\n\";";
@@ -714,29 +714,29 @@ void Creator::createFileParserCustom( Element *element )
{
kdDebug() << "Creator::createFileParserCustom()" << endl;
- QString className = upperFirst( element->name );
+ TQString className = upperFirst( element->name );
KODE::Function parser( "parseFile", className + " *" );
- parser.addArgument( "const QString &filename" );
+ parser.addArgument( "const TQString &filename" );
- mParserClass.addInclude( "qfile.h" );
+ mParserClass.addInclude( "tqfile.h" );
mParserClass.addInclude( "kdebug.h" );
mParserClass.addMemberVariable( KODE::MemberVariable( "mBuffer",
- "QString" ) );
+ "TQString" ) );
mParserClass.addMemberVariable( KODE::MemberVariable( "mRunning",
"unsigned int" ) );
KODE::Code code;
- code += "QFile file( filename );";
+ code += "TQFile file( filename );";
code += "if ( !file.open( IO_ReadOnly ) ) {";
code += " kdError() << \"Unable to open file '\" << filename << \"'\" << endl;";
code += " return 0;";
code += "}";
code += "";
- code += "QTextStream ts( &file );";
+ code += "TQTextStream ts( &file );";
code += "mBuffer = ts.read();";
code += "";
code += "mRunning = 0;";
@@ -771,7 +771,7 @@ void Creator::createFileParserCustom( Element *element )
code += "while ( mRunning < mBuffer.length() ) {";
code.indent();
- code += "QChar c = mBuffer[ mRunning ];";
+ code += "TQChar c = mBuffer[ mRunning ];";
code.addBlock( sm.transitionLogic() );
code += "++mRunning;";
code.unindent();
@@ -785,9 +785,9 @@ void Creator::createFileParserCustom( Element *element )
mParserClass.addFunction( parser );
}
-void Creator::createFoundTextFunction( const QString &text )
+void Creator::createFoundTextFunction( const TQString &text )
{
- QString functionName = "foundText" + upperFirst( text );
+ TQString functionName = "foundText" + upperFirst( text );
if ( mParserClass.hasFunction( functionName ) ) return;
@@ -798,8 +798,8 @@ void Creator::createFoundTextFunction( const QString &text )
code += "if ( mBuffer[ mRunning ] != '" + text.right( 1 ) + "' ) return false;";
code += "";
code += "return mBuffer.mid( mRunning - " +
- QString::number( text.length() - 1 ) + ", " +
- QString::number( text.length() ) + " ) == \"" + text + "\";";
+ TQString::number( text.length() - 1 ) + ", " +
+ TQString::number( text.length() ) + " ) == \"" + text + "\";";
f.setBody( code );
@@ -810,7 +810,7 @@ void Creator::createFileParserDom( Element *element )
{
kdDebug() << "Creator::createFileParserDom()" << endl;
- QString className = upperFirst( element->name );
+ TQString className = upperFirst( element->name );
KODE::Class c;
@@ -823,23 +823,23 @@ void Creator::createFileParserDom( Element *element )
KODE::Function parser( "parseFile", className + " *" );
parser.setStatic( true );
- parser.addArgument( "const QString &filename" );
+ parser.addArgument( "const TQString &filename" );
- c.addInclude( "qfile.h" );
- c.addInclude( "qdom.h" );
+ c.addInclude( "tqfile.h" );
+ c.addInclude( "tqdom.h" );
c.addInclude( "kdebug.h" );
KODE::Code code;
- code += "QFile file( filename );";
+ code += "TQFile file( filename );";
code += "if ( !file.open( IO_ReadOnly ) ) {";
code += " kdError() << \"Unable to open file '\" << filename << \"'\" << endl;";
code += " return 0;";
code += "}";
code += "";
- code += "QString errorMsg;";
+ code += "TQString errorMsg;";
code += "int errorLine, errorCol;";
- code += "QDomDocument doc;";
+ code += "TQDomDocument doc;";
code += "if ( !doc.setContent( &file, false, &errorMsg, &errorLine, &errorCol ) ) {";
code += " kdError() << errorMsg << \" at \" << errorLine << \",\" << errorCol << endl;";
code += " return 0;";
@@ -849,7 +849,7 @@ void Creator::createFileParserDom( Element *element )
code += "";
- QString line = className + " *c = parseElement";
+ TQString line = className + " *c = parseElement";
if ( externalParser() ) line += className;
line += "( doc.documentElement() );";
code += line;
diff --git a/kode/kxml_compiler/creator.h b/kode/kxml_compiler/creator.h
index 6e0d6f8b3..2103f928e 100644
--- a/kode/kxml_compiler/creator.h
+++ b/kode/kxml_compiler/creator.h
@@ -38,11 +38,11 @@
#include <ksimpleconfig.h>
#include <kstandarddirs.h>
-#include <qfile.h>
-#include <qtextstream.h>
-#include <qdom.h>
-#include <qregexp.h>
-#include <qmap.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
+#include <tqdom.h>
+#include <tqregexp.h>
+#include <tqmap.h>
#include <iostream>
@@ -56,28 +56,28 @@ class Creator
Creator( XmlParserType p = XmlParserDom,
XmlWriterType w = XmlWriterCustom );
- void setExternalClassPrefix( const QString & );
+ void setExternalClassPrefix( const TQString & );
bool externalParser() const;
bool externalWriter() const;
KODE::File &file();
- QString upperFirst( const QString &str );
- QString lowerFirst( const QString &str );
+ TQString upperFirst( const TQString &str );
+ TQString lowerFirst( const TQString &str );
- void createProperty( KODE::Class &c, const QString &type,
- const QString &name );
+ void createProperty( KODE::Class &c, const TQString &type,
+ const TQString &name );
void createElementFunctions( KODE::Class &c, Element *e );
void createClass( Element *element );
- void registerListTypedef( const QString &type );
+ void registerListTypedef( const TQString &type );
void createListTypedefs();
void createFileParser( Element *element );
- void createFileWriter( Element *element, const QString &dtd );
+ void createFileWriter( Element *element, const TQString &dtd );
void printFiles( KODE::Printer & );
@@ -94,7 +94,7 @@ class Creator
void createElementParserCustom( KODE::Class &c, Element *e );
void createTextElementParserCustom( KODE::Class &c, Element *e );
KODE::Code createAttributeScanner( Attribute *a, bool firstAttribute );
- void createFoundTextFunction( const QString &text );
+ void createFoundTextFunction( const TQString &text );
void createElementWriter( KODE::Class &c, Element *e );
@@ -103,13 +103,13 @@ class Creator
private:
XmlParserType mXmlParserType;
XmlWriterType mXmlWriterType;
- QString mExternalClassPrefix;
+ TQString mExternalClassPrefix;
KODE::File mFile;
KODE::Class mParserClass;
KODE::Class mWriterClass;
- QStringList mProcessedClasses;
- QStringList mListTypedefs;
+ TQStringList mProcessedClasses;
+ TQStringList mListTypedefs;
};
#endif
diff --git a/kode/kxml_compiler/kxml_compiler.cpp b/kode/kxml_compiler/kxml_compiler.cpp
index 62b2162c5..71720d6b9 100644
--- a/kode/kxml_compiler/kxml_compiler.cpp
+++ b/kode/kxml_compiler/kxml_compiler.cpp
@@ -36,11 +36,11 @@
#include <ksimpleconfig.h>
#include <kstandarddirs.h>
-#include <qfile.h>
-#include <qtextstream.h>
-#include <qdom.h>
-#include <qregexp.h>
-#include <qmap.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
+#include <tqdom.h>
+#include <tqregexp.h>
+#include <tqmap.h>
#include <iostream>
@@ -77,25 +77,25 @@ int main( int argc, char **argv )
return 1;
}
- QString baseDir = QFile::decodeName( args->getOption( "directory" ) );
+ TQString baseDir = TQFile::decodeName( args->getOption( "directory" ) );
if ( !baseDir.endsWith( "/" ) ) baseDir.append( "/" );
- QString dtdFilename = args->url( 0 ).path();
+ TQString dtdFilename = args->url( 0 ).path();
- QString baseName = args->url( 0 ).fileName();
+ TQString baseName = args->url( 0 ).fileName();
int pos = baseName.findRev( '.' );
if ( pos > 0 ) baseName = baseName.left( pos );
- QFile dtdFile( dtdFilename );
+ TQFile dtdFile( dtdFilename );
if ( !dtdFile.open( IO_ReadOnly ) ) {
kdError() << "Unable to open '" << dtdFilename << "'" << endl;
return 1;
}
- QString errorMsg;
+ TQString errorMsg;
int errorLine, errorCol;
- QDomDocument doc;
+ TQDomDocument doc;
if ( !doc.setContent( &dtdFile, false, &errorMsg, &errorLine, &errorCol ) ) {
kdError() << errorMsg << " at " << errorLine << "," << errorCol << endl;
return 1;
@@ -135,7 +135,7 @@ int main( int argc, char **argv )
Creator c( pt );
kdDebug() << "Create classes" << endl;
- QValueList<Element *>::ConstIterator it;
+ TQValueList<Element *>::ConstIterator it;
for( it = start->elements.begin(); it != start->elements.end(); ++it ) {
c.createClass( *it );
}
@@ -149,7 +149,7 @@ int main( int argc, char **argv )
c.createListTypedefs();
#if 0
- QValueList<Reference *>::ConstIterator it2;
+ TQValueList<Reference *>::ConstIterator it2;
for( it2 = start->references.begin(); it2 != start->references.end();
++it2 ) {
Element e;
diff --git a/kode/kxml_compiler/parser.cpp b/kode/kxml_compiler/parser.cpp
index bc451ce0d..9b3f33b99 100644
--- a/kode/kxml_compiler/parser.cpp
+++ b/kode/kxml_compiler/parser.cpp
@@ -35,11 +35,11 @@
#include <ksimpleconfig.h>
#include <kstandarddirs.h>
-#include <qfile.h>
-#include <qtextstream.h>
-#include <qdom.h>
-#include <qregexp.h>
-#include <qmap.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
+#include <tqdom.h>
+#include <tqregexp.h>
+#include <tqmap.h>
#include <iostream>
@@ -54,10 +54,10 @@ bool Pattern::isEmpty()
return !optional && !zeroOrMore && !oneOrMore && !choice;
}
-QString Pattern::asString()
+TQString Pattern::asString()
{
if ( isEmpty() ) return "";
- QString str = "( ";
+ TQString str = "( ";
if ( optional ) str += "optional ";
if ( zeroOrMore ) str += "zeroOrMore ";
if ( oneOrMore ) str += "oneOrMore ";
@@ -83,20 +83,20 @@ Parser::Parser()
{
}
-Element *Parser::parse( const QDomElement &docElement )
+Element *Parser::parse( const TQDomElement &docElement )
{
Element *start = 0;
- QDomNode n1;
+ TQDomNode n1;
for( n1 = docElement.firstChild(); !n1.isNull(); n1 = n1.nextSibling() ) {
- QDomElement e1 = n1.toElement();
+ TQDomElement e1 = n1.toElement();
kdDebug() << "TOP LEVEL element " << e1.tagName() << endl;
if ( e1.tagName() == "define" ) {
Element *d = new Element;
d->name = e1.attribute( "name" );
parseElement( e1, d, Pattern() );
Element::List definitions;
- QMap<QString,Element::List >::ConstIterator it;
+ TQMap<TQString,Element::List >::ConstIterator it;
it = mDefinitionMap.find( d->name );
if ( it != mDefinitionMap.end() ) definitions = *it;
definitions.append( d );
@@ -112,14 +112,14 @@ Element *Parser::parse( const QDomElement &docElement )
return start;
}
-Reference *Parser::parseReference( const QDomElement &referenceElement )
+Reference *Parser::parseReference( const TQDomElement &referenceElement )
{
Reference *r = new Reference;
r->name = referenceElement.attribute( "name" );
return r;
}
-bool Parser::parseAttribute( const QDomElement &attributeElement,
+bool Parser::parseAttribute( const TQDomElement &attributeElement,
Attribute *a )
{
a->name = attributeElement.attribute( "name" );
@@ -127,14 +127,14 @@ bool Parser::parseAttribute( const QDomElement &attributeElement,
return true;
}
-bool Parser::parseElement( const QDomElement &elementElement, Element *e,
+bool Parser::parseElement( const TQDomElement &elementElement, Element *e,
Pattern pattern )
{
kdDebug() << "parseElement " << e->name << endl;
- QDomNode n1;
+ TQDomNode n1;
for( n1 = elementElement.firstChild(); !n1.isNull(); n1 = n1.nextSibling() ) {
- QDomElement e1 = n1.toElement();
+ TQDomElement e1 = n1.toElement();
if ( e1.tagName() == "element" ) {
Element *element = new Element;
element->name = e1.attribute( "name" );
@@ -191,7 +191,7 @@ void Parser::substituteReferences( Element *s )
} else {
r->substituted = true;
}
- QMap<QString,Element::List >::ConstIterator it1;
+ TQMap<TQString,Element::List >::ConstIterator it1;
it1 = mDefinitionMap.find( r->name );
if ( it1 != mDefinitionMap.end() ) {
Element::List elements = *it1;
@@ -292,7 +292,7 @@ void Parser::dumpTree( Element *s )
void Parser::dumpDefinitionMap()
{
std::cout << "DEFINITION MAP" << std::endl;
- QMap<QString,Element::List >::ConstIterator it;
+ TQMap<TQString,Element::List >::ConstIterator it;
for( it = mDefinitionMap.begin(); it != mDefinitionMap.end(); ++it ) {
dumpElements( *it, 2 );
}
diff --git a/kode/kxml_compiler/parser.h b/kode/kxml_compiler/parser.h
index b9ff542c0..6efd6f746 100644
--- a/kode/kxml_compiler/parser.h
+++ b/kode/kxml_compiler/parser.h
@@ -35,11 +35,11 @@
#include <ksimpleconfig.h>
#include <kstandarddirs.h>
-#include <qfile.h>
-#include <qtextstream.h>
-#include <qdom.h>
-#include <qregexp.h>
-#include <qmap.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
+#include <tqdom.h>
+#include <tqregexp.h>
+#include <tqmap.h>
#include <iostream>
@@ -50,7 +50,7 @@ class Pattern
bool isEmpty();
- QString asString();
+ TQString asString();
void merge( Pattern p );
@@ -63,11 +63,11 @@ class Pattern
class Reference
{
public:
- typedef QValueList<Reference *> List;
+ typedef TQValueList<Reference *> List;
Reference() : substituted( false ) {}
- QString name;
+ TQString name;
Pattern pattern;
bool substituted;
@@ -76,22 +76,22 @@ class Reference
class Attribute
{
public:
- typedef QValueList<Attribute *> List;
+ typedef TQValueList<Attribute *> List;
- QString name;
- QValueList<QString> choices;
- QString defaultValue;
+ TQString name;
+ TQValueList<TQString> choices;
+ TQString defaultValue;
Pattern pattern;
};
class Element
{
public:
- typedef QValueList<Element *> List;
+ typedef TQValueList<Element *> List;
Element();
- QString name;
+ TQString name;
Element::List elements;
Attribute::List attributes;
Reference::List references;
@@ -105,12 +105,12 @@ class Parser
public:
Parser();
- Element *parse( const QDomElement &docElement );
+ Element *parse( const TQDomElement &docElement );
- Reference *parseReference( const QDomElement &referenceElement );
- bool parseAttribute( const QDomElement &attributeElement,
+ Reference *parseReference( const TQDomElement &referenceElement );
+ bool parseAttribute( const TQDomElement &attributeElement,
Attribute *a );
- bool parseElement( const QDomElement &elementElement, Element *e,
+ bool parseElement( const TQDomElement &elementElement, Element *e,
Pattern pattern );
void substituteReferences( Element *s );
@@ -128,7 +128,7 @@ class Parser
void dumpDefinitionMap();
private:
- QMap<QString,Element::List> mDefinitionMap;
+ TQMap<TQString,Element::List> mDefinitionMap;
};
#endif
diff --git a/kode/license.cpp b/kode/license.cpp
index 1e251eaf3..12208f8c5 100644
--- a/kode/license.cpp
+++ b/kode/license.cpp
@@ -40,9 +40,9 @@ void License::setQtException( bool v )
mQtException = v;
}
-QString License::text()
+TQString License::text()
{
- QString txt;
+ TQString txt;
switch ( mType ) {
case GPL:
diff --git a/kode/license.h b/kode/license.h
index 0d413f08d..d74a0b579 100644
--- a/kode/license.h
+++ b/kode/license.h
@@ -21,7 +21,7 @@
#ifndef KODE_LICENSE_H
#define KODE_LICENSE_H
-#include <qstring.h>
+#include <tqstring.h>
#include <kdepimmacros.h>
namespace KODE {
@@ -36,7 +36,7 @@ class KDE_EXPORT License
void setQtException( bool );
- QString text();
+ TQString text();
private:
Type mType;
diff --git a/kode/membervariable.cpp b/kode/membervariable.cpp
index e497529eb..ac8f2c25e 100644
--- a/kode/membervariable.cpp
+++ b/kode/membervariable.cpp
@@ -30,11 +30,11 @@ MemberVariable::MemberVariable()
{
}
-MemberVariable::MemberVariable( const QString &name, const QString &type,
+MemberVariable::MemberVariable( const TQString &name, const TQString &type,
bool isStatic )
: Variable( name, type, isStatic )
{
- QString n;
+ TQString n;
if ( name.isEmpty() ) {
n = "mUndefined";
diff --git a/kode/membervariable.h b/kode/membervariable.h
index e864f69ab..957df34a4 100644
--- a/kode/membervariable.h
+++ b/kode/membervariable.h
@@ -23,8 +23,8 @@
#include "variable.h"
-#include <qvaluelist.h>
-#include <qstring.h>
+#include <tqvaluelist.h>
+#include <tqstring.h>
#include <kdepimmacros.h>
namespace KODE {
@@ -32,10 +32,10 @@ namespace KODE {
class KDE_EXPORT MemberVariable : public Variable
{
public:
- typedef QValueList<MemberVariable> List;
+ typedef TQValueList<MemberVariable> List;
MemberVariable();
- MemberVariable( const QString &name, const QString &type,
+ MemberVariable( const TQString &name, const TQString &type,
bool isStatic = false );
};
diff --git a/kode/printer.cpp b/kode/printer.cpp
index 2a5cba2fc..3adf32caf 100644
--- a/kode/printer.cpp
+++ b/kode/printer.cpp
@@ -24,8 +24,8 @@
#include <kdebug.h>
#include <ksavefile.h>
-#include <qfile.h>
-#include <qtextstream.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
using namespace KODE;
@@ -44,32 +44,32 @@ void Printer::setCreationWarning( bool v )
mCreationWarning = v;
}
-void Printer::setGenerator( const QString &g )
+void Printer::setGenerator( const TQString &g )
{
mGenerator = g;
}
-void Printer::setOutputDirectory( const QString &o )
+void Printer::setOutputDirectory( const TQString &o )
{
mOutputDirectory = o;
}
-void Printer::setSourceFile( const QString &s )
+void Printer::setSourceFile( const TQString &s )
{
mSourceFile = s;
}
-QString Printer::functionSignature( const Function &f,
- const QString &className,
+TQString Printer::functionSignature( const Function &f,
+ const TQString &className,
bool includeClassQualifier )
{
- QString s;
+ TQString s;
if ( f.isStatic() && !includeClassQualifier ) {
s += "static ";
}
- QString ret = f.returnType();
+ TQString ret = f.returnType();
if ( !ret.isEmpty() ) {
s += ret;
if ( ret.right( 1 ) != "*" && ret.right( 1 ) != "&" ) {
@@ -95,10 +95,10 @@ QString Printer::functionSignature( const Function &f,
return s;
}
-QString Printer::creationWarning()
+TQString Printer::creationWarning()
{
// Create warning about generated file
- QString str = "// This file is generated by " + mGenerator;
+ TQString str = "// This file is generated by " + mGenerator;
if ( !mSourceFile.isEmpty() ) {
str += " from " + mSourceFile;
}
@@ -109,7 +109,7 @@ QString Printer::creationWarning()
return str;
}
-QString Printer::licenseHeader( const File &file )
+TQString Printer::licenseHeader( const File &file )
{
Code code;
code += "/*";
@@ -118,7 +118,7 @@ QString Printer::licenseHeader( const File &file )
code += "This file is part of " + file.project() + ".";
code.newLine();
- QStringList copyrights = file.copyrightStrings();
+ TQStringList copyrights = file.copyrightStrings();
if ( !copyrights.isEmpty() ) {
code.addBlock( copyrights.join( "\n" ) );
code.newLine();
@@ -133,7 +133,7 @@ QString Printer::licenseHeader( const File &file )
}
Code Printer::functionHeaders( const Function::List &functions,
- const QString &className,
+ const TQString &className,
int access )
{
bool needNewLine = false;
@@ -167,7 +167,7 @@ Code Printer::functionHeaders( const Function::List &functions,
return code;
}
-QString Printer::classHeader( const Class &c )
+TQString Printer::classHeader( const Class &c )
{
Code code;
@@ -179,7 +179,7 @@ QString Printer::classHeader( const Class &c )
code += "*/";
}
- QString txt = "class " + mStyle.className( c.name() );
+ TQString txt = "class " + mStyle.className( c.name() );
Class::List baseClasses = c.baseClasses();
if ( !baseClasses.isEmpty() ) {
@@ -252,7 +252,7 @@ QString Printer::classHeader( const Class &c )
for( it2 = variables.begin(); it2 != variables.end(); ++it2 ) {
MemberVariable v = *it2;
- QString decl;
+ TQString decl;
if ( v.isStatic() ) decl += "static ";
decl += v.type();
if ( v.type().right( 1 ) != "*" && v.type().right( 1 ) != "&" ) {
@@ -270,7 +270,7 @@ QString Printer::classHeader( const Class &c )
return code.text();
}
-QString Printer::classImplementation( const Class &c )
+TQString Printer::classImplementation( const Class &c )
{
Code code;
@@ -325,10 +325,10 @@ void Printer::printHeader( const File &f )
out.addBlock( licenseHeader( f ) );
// Create include guard
- QString className = f.filename();
+ TQString className = f.filename();
className.replace( "-", "_" );
- QString includeGuard;
+ TQString includeGuard;
if ( !f.nameSpace().isEmpty() ) includeGuard += f.nameSpace().upper() + "_";
includeGuard += className.upper() + "_H";
@@ -339,12 +339,12 @@ void Printer::printHeader( const File &f )
// Create includes
- QStringList processed;
+ TQStringList processed;
Class::List classes = f.classes();
Class::List::ConstIterator it;
for( it = classes.begin(); it != classes.end(); ++it ) {
- QStringList includes = (*it).headerIncludes();
- QStringList::ConstIterator it2;
+ TQStringList includes = (*it).headerIncludes();
+ TQStringList::ConstIterator it2;
for( it2 = includes.begin(); it2 != includes.end(); ++it2 ) {
if ( processed.find( *it2 ) == processed.end() ) {
out += "#include <" + *it2 + ">";
@@ -358,8 +358,8 @@ void Printer::printHeader( const File &f )
// Create forward declarations
processed.clear();
for( it = classes.begin(); it != classes.end(); ++it ) {
- QStringList decls = (*it).forwardDeclarations();
- QStringList::ConstIterator it2;
+ TQStringList decls = (*it).forwardDeclarations();
+ TQStringList::ConstIterator it2;
for( it2 = decls.begin(); it2 != decls.end(); ++it2 ) {
if ( processed.find( *it2 ) == processed.end() ) {
out += "class " + *it2 + ";";
@@ -391,19 +391,19 @@ void Printer::printHeader( const File &f )
// Print to file
- QString filename = f.filename() + ".h";
+ TQString filename = f.filename() + ".h";
if ( !mOutputDirectory.isEmpty() ) filename.prepend( mOutputDirectory + "/" );
- KSaveFile::backupFile( filename, QString::null, ".backup" );
+ KSaveFile::backupFile( filename, TQString::null, ".backup" );
- QFile header( filename );
+ TQFile header( filename );
if ( !header.open( IO_WriteOnly ) ) {
kdError() << "Can't open '" << filename << "' for writing." << endl;
return;
}
- QTextStream h( &header );
+ TQTextStream h( &header );
h << out.text();
@@ -426,20 +426,20 @@ void Printer::printImplementation( const File &f, bool createHeaderInclude )
out.newLine();
}
- QStringList includes = f.includes();
- QStringList::ConstIterator it2;
+ TQStringList includes = f.includes();
+ TQStringList::ConstIterator it2;
for( it2 = includes.begin(); it2 != includes.end(); ++it2 ) {
out += "#include <" + *it2 + ">";
}
if ( !includes.isEmpty() ) out.newLine();
// Create class includes
- QStringList processed;
+ TQStringList processed;
Class::List classes = f.classes();
Class::List::ConstIterator it;
for( it = classes.begin(); it != classes.end(); ++it ) {
- QStringList includes = (*it).includes();
- QStringList::ConstIterator it2;
+ TQStringList includes = (*it).includes();
+ TQStringList::ConstIterator it2;
for( it2 = includes.begin(); it2 != includes.end(); ++it2 ) {
if ( processed.find( *it2 ) == processed.end() ) {
out += "#include <" + *it2 + ">";
@@ -455,10 +455,10 @@ void Printer::printImplementation( const File &f, bool createHeaderInclude )
}
// 'extern "C"' declarations
- QStringList externCDeclarations = f.externCDeclarations();
+ TQStringList externCDeclarations = f.externCDeclarations();
if ( !externCDeclarations.isEmpty() ) {
out += "extern \"C\" {";
- QStringList::ConstIterator it;
+ TQStringList::ConstIterator it;
for( it = externCDeclarations.begin(); it != externCDeclarations.end();
++it ) {
out += *it + ";";
@@ -472,7 +472,7 @@ void Printer::printImplementation( const File &f, bool createHeaderInclude )
Variable::List::ConstIterator itV;
for( itV = vars.begin(); itV != vars.end(); ++itV ) {
Variable v = *itV;
- QString str;
+ TQString str;
if ( v.isStatic() ) str += "static ";
str += v.type() + " " + v.name() + ";";
out += str;
@@ -499,24 +499,24 @@ void Printer::printImplementation( const File &f, bool createHeaderInclude )
// Classes
for( it = classes.begin(); it != classes.end(); ++it ) {
- QString str = classImplementation( *it );
+ TQString str = classImplementation( *it );
if ( !str.isEmpty() ) out += classImplementation( *it );
}
// Print to file
- QString filename = f.filename() + ".cpp";
+ TQString filename = f.filename() + ".cpp";
if ( !mOutputDirectory.isEmpty() ) filename.prepend( mOutputDirectory + "/" );
- KSaveFile::backupFile( filename, QString::null, ".backup" );
+ KSaveFile::backupFile( filename, TQString::null, ".backup" );
- QFile implementation( filename );
+ TQFile implementation( filename );
if ( !implementation.open( IO_WriteOnly ) ) {
kdError() << "Can't open '" << filename << "' for writing." << endl;
return;
}
- QTextStream h( &implementation );
+ TQTextStream h( &implementation );
h << out.text();
@@ -525,19 +525,19 @@ void Printer::printImplementation( const File &f, bool createHeaderInclude )
void Printer::printAutoMakefile( const AutoMakefile &am )
{
- QString filename = "Makefile.am";
+ TQString filename = "Makefile.am";
if ( !mOutputDirectory.isEmpty() ) filename.prepend( mOutputDirectory + "/" );
- KSaveFile::backupFile( filename, QString::null, ".backup" );
+ KSaveFile::backupFile( filename, TQString::null, ".backup" );
- QFile file( filename );
+ TQFile file( filename );
if ( !file.open( IO_WriteOnly ) ) {
kdError() << "Can't open '" << filename << "' for writing." << endl;
return;
}
- QTextStream ts( &file );
+ TQTextStream ts( &file );
ts << am.text();
}
diff --git a/kode/printer.h b/kode/printer.h
index 169884571..ec50bec01 100644
--- a/kode/printer.h
+++ b/kode/printer.h
@@ -27,9 +27,9 @@
#include "automakefile.h"
#include <kdepimmacros.h>
-#include <qvaluelist.h>
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqvaluelist.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
namespace KODE {
@@ -40,34 +40,34 @@ class KDE_EXPORT Printer
Printer( const Style & );
void setCreationWarning( bool );
- void setGenerator( const QString & );
- void setOutputDirectory( const QString & );
- void setSourceFile( const QString & );
+ void setGenerator( const TQString & );
+ void setOutputDirectory( const TQString & );
+ void setSourceFile( const TQString & );
void printHeader( const File & );
void printImplementation( const File &, bool createHeaderInclude = true );
void printAutoMakefile( const AutoMakefile & );
- QString functionSignature( const Function &f,
- const QString &className = QString::null,
+ TQString functionSignature( const Function &f,
+ const TQString &className = TQString::null,
bool includeClassQualifier = false );
protected:
- QString creationWarning();
- QString licenseHeader( const File & );
- QString classHeader( const Class & );
- QString classImplementation( const Class & );
+ TQString creationWarning();
+ TQString licenseHeader( const File & );
+ TQString classHeader( const Class & );
+ TQString classImplementation( const Class & );
Code functionHeaders( const Function::List &functions,
- const QString &className,
+ const TQString &className,
int access );
private:
Style mStyle;
bool mCreationWarning;
- QString mGenerator;
- QString mOutputDirectory;
- QString mSourceFile;
+ TQString mGenerator;
+ TQString mOutputDirectory;
+ TQString mSourceFile;
};
}
diff --git a/kode/statemachine.cpp b/kode/statemachine.cpp
index fe90d5d6b..d3d49fb03 100644
--- a/kode/statemachine.cpp
+++ b/kode/statemachine.cpp
@@ -28,14 +28,14 @@ StateMachine::StateMachine()
}
-void StateMachine::setState( const QString &state, const Code &code )
+void StateMachine::setState( const TQString &state, const Code &code )
{
mStateMap.insert( state, code );
if ( mInitialState.isEmpty() ) mInitialState = state;
}
-void StateMachine::setInitialState( const QString &state )
+void StateMachine::setInitialState( const TQString &state )
{
mInitialState = state;
}
@@ -44,8 +44,8 @@ Code StateMachine::stateDefinition()
{
Code code;
- QStringList states;
- QMap<QString,Code>::ConstIterator it;
+ TQStringList states;
+ TQMap<TQString,Code>::ConstIterator it;
for ( it = mStateMap.begin(); it != mStateMap.end(); ++it ) {
states.append( it.key() );
}
@@ -63,7 +63,7 @@ Code StateMachine::transitionLogic()
code += "switch( state ) {";
code.indent();
- QMap<QString,Code>::ConstIterator it;
+ TQMap<TQString,Code>::ConstIterator it;
for ( it = mStateMap.begin(); it != mStateMap.end(); ++it ) {
code += "case " + it.key() + ":";
code.indent();
diff --git a/kode/statemachine.h b/kode/statemachine.h
index 0adcd5548..e6593c942 100644
--- a/kode/statemachine.h
+++ b/kode/statemachine.h
@@ -23,8 +23,8 @@
#include "code.h"
-#include <qstring.h>
-#include <qmap.h>
+#include <tqstring.h>
+#include <tqmap.h>
#include <kdepimmacros.h>
namespace KODE {
@@ -34,17 +34,17 @@ class KDE_EXPORT StateMachine
public:
StateMachine();
- void setState( const QString &state, const Code &code );
+ void setState( const TQString &state, const Code &code );
- void setInitialState( const QString &state );
+ void setInitialState( const TQString &state );
Code stateDefinition();
Code transitionLogic();
private:
- QMap<QString,Code> mStateMap;
+ TQMap<TQString,Code> mStateMap;
- QString mInitialState;
+ TQString mInitialState;
};
}
diff --git a/kode/style.cpp b/kode/style.cpp
index c7d20f4ca..8f4d255bd 100644
--- a/kode/style.cpp
+++ b/kode/style.cpp
@@ -23,8 +23,8 @@
#include <kdebug.h>
-#include <qfile.h>
-#include <qtextstream.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
using namespace KODE;
@@ -36,18 +36,18 @@ Style::~Style()
{
}
-QString Style::className( const QString &str )
+TQString Style::className( const TQString &str )
{
return upperFirst( str );
}
-QString Style::upperFirst( const QString &str )
+TQString Style::upperFirst( const TQString &str )
{
if ( str.isEmpty() ) return str;
return str[ 0 ].upper() + str.mid( 1 );
}
-QString Style::lowerFirst( const QString &str )
+TQString Style::lowerFirst( const TQString &str )
{
if ( str.isEmpty() ) return str;
return str[ 0 ].lower() + str.mid( 1 );
diff --git a/kode/style.h b/kode/style.h
index f88c107b4..f8a260221 100644
--- a/kode/style.h
+++ b/kode/style.h
@@ -23,9 +23,9 @@
#include "license.h"
-#include <qvaluelist.h>
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqvaluelist.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
#include <kdepimmacros.h>
@@ -37,10 +37,10 @@ class KDE_EXPORT Style
Style();
virtual ~Style();
- virtual QString className( const QString &str );
+ virtual TQString className( const TQString &str );
- static QString upperFirst( const QString &str );
- static QString lowerFirst( const QString &str );
+ static TQString upperFirst( const TQString &str );
+ static TQString lowerFirst( const TQString &str );
};
}
diff --git a/kode/typedef.cpp b/kode/typedef.cpp
index 10b2df46b..d8ccb0594 100644
--- a/kode/typedef.cpp
+++ b/kode/typedef.cpp
@@ -27,12 +27,12 @@ Typedef::Typedef()
{
}
-Typedef::Typedef( const QString &type, const QString &alias )
+Typedef::Typedef( const TQString &type, const TQString &alias )
: mType( type ), mAlias( alias )
{
}
-QString Typedef::declaration() const
+TQString Typedef::declaration() const
{
return "typedef " + mType + " " + mAlias + ";";
}
diff --git a/kode/typedef.h b/kode/typedef.h
index 59f129c9d..860d0081d 100644
--- a/kode/typedef.h
+++ b/kode/typedef.h
@@ -21,7 +21,7 @@
#ifndef KODE_TYPEDEF_H
#define KODE_TYPEDEF_H
-#include <qvaluelist.h>
+#include <tqvaluelist.h>
#include <kdepimmacros.h>
namespace KODE {
@@ -29,16 +29,16 @@ namespace KODE {
class KDE_EXPORT Typedef
{
public:
- typedef QValueList<Typedef> List;
+ typedef TQValueList<Typedef> List;
Typedef();
- Typedef( const QString &type, const QString &alias );
+ Typedef( const TQString &type, const TQString &alias );
- QString declaration() const;
+ TQString declaration() const;
private:
- QString mType;
- QString mAlias;
+ TQString mType;
+ TQString mAlias;
};
}
diff --git a/kode/variable.cpp b/kode/variable.cpp
index f56b351e0..9fa985ab2 100644
--- a/kode/variable.cpp
+++ b/kode/variable.cpp
@@ -30,7 +30,7 @@ Variable::Variable()
{
}
-Variable::Variable( const QString &name, const QString &type, bool isStatic )
+Variable::Variable( const TQString &name, const TQString &type, bool isStatic )
: mIsStatic( isStatic )
{
mType = type;
@@ -42,12 +42,12 @@ Variable::Variable( const QString &name, const QString &type, bool isStatic )
}
}
-void Variable::setName( const QString &n )
+void Variable::setName( const TQString &n )
{
mName = n;
}
-void Variable::setType( const QString &t )
+void Variable::setType( const TQString &t )
{
mType = t;
}
@@ -57,7 +57,7 @@ void Variable::setStatic( bool s )
mIsStatic = s;
}
-void Variable::setInitializer( const QString &i )
+void Variable::setInitializer( const TQString &i )
{
mInitializer = i;
}
diff --git a/kode/variable.h b/kode/variable.h
index 21c315c19..4cc66aa5a 100644
--- a/kode/variable.h
+++ b/kode/variable.h
@@ -21,8 +21,8 @@
#ifndef KODE_VARIABLE_H
#define KODE_VARIABLE_H
-#include <qvaluelist.h>
-#include <qstring.h>
+#include <tqvaluelist.h>
+#include <tqstring.h>
#include <kdepimmacros.h>
@@ -31,28 +31,28 @@ namespace KODE {
class KDE_EXPORT Variable
{
public:
- typedef QValueList<Variable> List;
+ typedef TQValueList<Variable> List;
Variable();
- Variable( const QString &name, const QString &type, bool isStatic = false );
+ Variable( const TQString &name, const TQString &type, bool isStatic = false );
- void setType( const QString & );
- QString type() const { return mType; }
+ void setType( const TQString & );
+ TQString type() const { return mType; }
- void setName( const QString & );
- QString name() const { return mName; }
+ void setName( const TQString & );
+ TQString name() const { return mName; }
void setStatic( bool );
bool isStatic() const { return mIsStatic; }
- void setInitializer( const QString & );
- QString initializer() const { return mInitializer; }
+ void setInitializer( const TQString & );
+ TQString initializer() const { return mInitializer; }
private:
- QString mType;
- QString mName;
+ TQString mType;
+ TQString mName;
bool mIsStatic;
- QString mInitializer;
+ TQString mInitializer;
};
}
diff --git a/konsolekalendar/konsolekalendar.cpp b/konsolekalendar/konsolekalendar.cpp
index 793c65d40..564adf530 100644
--- a/konsolekalendar/konsolekalendar.cpp
+++ b/konsolekalendar/konsolekalendar.cpp
@@ -34,9 +34,9 @@
#include <stdlib.h>
#include <iostream>
-#include <qdatetime.h>
-#include <qfile.h>
-#include <qtextstream.h>
+#include <tqdatetime.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
#include <kdebug.h>
#include <klocale.h>
@@ -108,8 +108,8 @@ bool KonsoleKalendar::createCalendar()
bool KonsoleKalendar::showInstance()
{
bool status = true;
- QFile f;
- QString title;
+ TQFile f;
+ TQString title;
Event *event;
if ( m_variables->isDryRun() ) {
@@ -146,7 +146,7 @@ bool KonsoleKalendar::showInstance()
printSpecs();
}
- QTextStream ts( &f );
+ TQTextStream ts( &f );
if ( m_variables->getExportType() != ExportTypeHTML &&
m_variables->getExportType() != ExportTypeMonthHTML ) {
@@ -160,7 +160,7 @@ bool KonsoleKalendar::showInstance()
m_variables->getCalendar()->events( EventSortStartDate );
if( sortedList.count() > 0 )
{
- QDate dt, firstdate, lastdate;
+ TQDate dt, firstdate, lastdate;
firstdate = sortedList.first()->dtStart().date();
lastdate = sortedList.last()->dtStart().date();
for ( dt = firstdate;
@@ -189,10 +189,10 @@ bool KonsoleKalendar::showInstance()
<< "Show next activity in calendar"
<< endl;
- QDateTime datetime = m_variables->getStartDateTime();
+ TQDateTime datetime = m_variables->getStartDateTime();
datetime = datetime.addDays( 720 );
- QDate dt;
+ TQDate dt;
for ( dt = m_variables->getStartDateTime().date();
dt <= datetime.date();
dt = dt.addDays(1) ) {
@@ -214,7 +214,7 @@ bool KonsoleKalendar::showInstance()
<< "view raw events within date range list"
<< endl;
- QDate dt;
+ TQDate dt;
for ( dt = m_variables->getStartDateTime().date();
dt <= m_variables->getEndDateTime().date() && status != false;
dt = dt.addDays(1) ) {
@@ -226,7 +226,7 @@ bool KonsoleKalendar::showInstance()
}
}
} else {
- QDate firstdate, lastdate;
+ TQDate firstdate, lastdate;
if ( m_variables->getAll() ) {
kdDebug() << "konsolekalendar.cpp::showInstance() | "
<< "HTML view all events sorted list"
@@ -292,8 +292,8 @@ bool KonsoleKalendar::showInstance()
// htmlSettings.setTaskAttendees( false );
// htmlSettings.setTaskDueDate( true );
- htmlSettings.setDateStart( QDateTime( firstdate ) );
- htmlSettings.setDateEnd( QDateTime( lastdate ) ) ;
+ htmlSettings.setDateStart( TQDateTime( firstdate ) );
+ htmlSettings.setDateEnd( TQDateTime( lastdate ) ) ;
KCal::HtmlExport *Export;
Export = new HtmlExport( m_variables->getCalendar(), &htmlSettings );
@@ -306,8 +306,8 @@ bool KonsoleKalendar::showInstance()
return status;
}
-bool KonsoleKalendar::printEventList( QTextStream *ts,
- Event::List *eventList, QDate date )
+bool KonsoleKalendar::printEventList( TQTextStream *ts,
+ Event::List *eventList, TQDate date )
{
bool status = true;
@@ -327,7 +327,7 @@ bool KonsoleKalendar::printEventList( QTextStream *ts,
return( status );
}
-bool KonsoleKalendar::printEvent( QTextStream *ts, Event *event, QDate dt )
+bool KonsoleKalendar::printEvent( TQTextStream *ts, Event *event, TQDate dt )
{
bool status = false;
bool sameDay = true;
@@ -407,8 +407,8 @@ bool KonsoleKalendar::deleteEvent()
return( del.deleteEvent() );
}
-bool KonsoleKalendar::isEvent( QDateTime startdate,
- QDateTime enddate, QString summary )
+bool KonsoleKalendar::isEvent( TQDateTime startdate,
+ TQDateTime enddate, TQString summary )
{
// Search for an event with specified start and end datetime stamp and summary
diff --git a/konsolekalendar/konsolekalendar.h b/konsolekalendar/konsolekalendar.h
index f41ed4ccb..71ded4f61 100644
--- a/konsolekalendar/konsolekalendar.h
+++ b/konsolekalendar/konsolekalendar.h
@@ -28,7 +28,7 @@
#ifndef _KONSOLEKALENDAR_H
#define _KONSOLEKALENDAR_H
-#include <qdatetime.h>
+#include <tqdatetime.h>
#include <kapplication.h>
@@ -93,7 +93,7 @@ namespace KCal
* @param enddate Ending date
* @param summary Which summary event should have have
*/
- bool isEvent( QDateTime startdate, QDateTime enddate, QString summary );
+ bool isEvent( TQDateTime startdate, TQDateTime enddate, TQString summary );
/**
* Creates calendar file (If it doesn't exists)
@@ -113,7 +113,7 @@ namespace KCal
* @param eventlist which event we should print
* @param dt is the date to use when printing the event for recurring events
*/
- bool printEventList( QTextStream *ts, Event::List *eventList, QDate dt );
+ bool printEventList( TQTextStream *ts, Event::List *eventList, TQDate dt );
/**
* Prints a single event in many formats
@@ -121,7 +121,7 @@ namespace KCal
* @param event which we should print
* @param dt is the date to use when printing the event for recurring events
*/
- bool printEvent( QTextStream *ts, Event *event, QDate dt );
+ bool printEvent( TQTextStream *ts, Event *event, TQDate dt );
/**
* Variables that changes stuff in programm
@@ -136,7 +136,7 @@ namespace KCal
/**
* This is usefull if we like to have same day events to same system
*/
- QDate m_saveDate;
+ TQDate m_saveDate;
};
diff --git a/konsolekalendar/konsolekalendaradd.cpp b/konsolekalendar/konsolekalendaradd.cpp
index 2f48d1b84..e1c80498f 100644
--- a/konsolekalendar/konsolekalendaradd.cpp
+++ b/konsolekalendar/konsolekalendaradd.cpp
@@ -33,8 +33,8 @@
#include <stdlib.h>
#include <iostream>
-#include <qdatetime.h>
-#include <qobject.h>
+#include <tqdatetime.h>
+#include <tqobject.h>
#include <kdebug.h>
#include <kstandarddirs.h>
@@ -114,7 +114,7 @@ bool KonsoleKalendarAdd::addImportedCalendar()
// If --file specified, then import into that file
// else, import into the standard calendar
- QString fileName;
+ TQString fileName;
if ( m_variables->getCalendarFile().isEmpty() )
fileName = locateLocal( "data", "korganizer/std.ics" );
else
diff --git a/konsolekalendar/konsolekalendarepoch.cpp b/konsolekalendar/konsolekalendarepoch.cpp
index c070d2532..e469a42c2 100644
--- a/konsolekalendar/konsolekalendarepoch.cpp
+++ b/konsolekalendar/konsolekalendarepoch.cpp
@@ -33,7 +33,7 @@
#include <stdlib.h>
#include <iostream>
-#include <qdatetime.h>
+#include <tqdatetime.h>
#include "konsolekalendarepoch.h"
using namespace KCal;
@@ -50,22 +50,22 @@ KonsoleKalendarEpoch::~KonsoleKalendarEpoch()
// By "epoch" we mean the number of seconds since 00:00:00 UTC on January 1 1970
// Function to convert an epoch value into a QDateTime
-QDateTime KonsoleKalendarEpoch::epoch2QDateTime( uint epoch )
+TQDateTime KonsoleKalendarEpoch::epoch2TQDateTime( uint epoch )
{
- QDateTime dt;
+ TQDateTime dt;
dt.setTime_t( epoch, Qt::UTC );
return( dt );
}
-// Function to convert a QDateTime value into an epoch
-uint KonsoleKalendarEpoch::QDateTime2epoch( QDateTime dt )
+// Function to convert a TQDateTime value into an epoch
+uint KonsoleKalendarEpoch::QDateTime2epoch( TQDateTime dt )
{
// THIS FUNCTION CAN BE OFF BY 1 HOUR DUE TO DAYLIGHT SAVINGS TIME.
// SORRY QT DOESN'T HANDLE DAYLIGHT SAVINGS TIME.
// Compute #seconds to subtract for local timezone difference from UTC.
- int offset = QDateTime::currentDateTime( Qt::UTC ).toTime_t()
- - QDateTime::currentDateTime( Qt::LocalTime ).toTime_t();
+ int offset = TQDateTime::currentDateTime( Qt::UTC ).toTime_t()
+ - TQDateTime::currentDateTime( Qt::LocalTime ).toTime_t();
return( dt.toTime_t() - offset );
}
@@ -76,7 +76,7 @@ uint KonsoleKalendarEpoch::QDateTime2epoch( QDateTime dt )
main()
{
uint epoch;
- QDateTime dt;
+ TQDateTime dt;
cout << endl;
cout << "NOTE: Some tests may be off by 1 hour (3600 secs) "
@@ -85,7 +85,7 @@ main()
// Test1
epoch = 0;
- dt = KonsoleKalendarEpoch::epoch2QDateTime( epoch );
+ dt = KonsoleKalendarEpoch::epoch2TQDateTime( epoch );
cout << "TEST 1:" << endl;
cout << "epoch="
<< epoch
@@ -103,7 +103,7 @@ main()
// Test2
epoch = 100000;
- dt = KonsoleKalendarEpoch::epoch2QDateTime( epoch );
+ dt = KonsoleKalendarEpoch::epoch2TQDateTime( epoch );
cout << "TEST 2:" << endl;
cout << "epoch="
<< epoch
@@ -121,7 +121,7 @@ main()
// Test3
epoch = 10000000;
- dt = KonsoleKalendarEpoch::epoch2QDateTime( epoch );
+ dt = KonsoleKalendarEpoch::epoch2TQDateTime( epoch );
cout << "TEST 3:" << endl;
cout << "epoch="
<< epoch
@@ -139,7 +139,7 @@ main()
// Test4
epoch = 1000000000;
- dt = KonsoleKalendarEpoch::epoch2QDateTime( epoch );
+ dt = KonsoleKalendarEpoch::epoch2TQDateTime( epoch );
cout << "TEST 4:" << endl;
cout << "epoch="
<< epoch
@@ -157,7 +157,7 @@ main()
// Test5
epoch = 10000000000;
- dt = KonsoleKalendarEpoch::epoch2QDateTime( epoch );
+ dt = KonsoleKalendarEpoch::epoch2TQDateTime( epoch );
cout << "TEST 5:" << endl;
cout << "epoch="
<< epoch
diff --git a/konsolekalendar/konsolekalendarepoch.h b/konsolekalendar/konsolekalendarepoch.h
index e6db6d77e..fedd392c3 100644
--- a/konsolekalendar/konsolekalendarepoch.h
+++ b/konsolekalendar/konsolekalendarepoch.h
@@ -28,7 +28,7 @@
#ifndef _KONSOLEKALENDAREPOCH_H_
#define _KONSOLEKALENDAREPOCH_H_
-#include <qdatetime.h>
+#include <tqdatetime.h>
/**
* @file konsolekalendarepoch.h
@@ -54,16 +54,16 @@ namespace KCal
~KonsoleKalendarEpoch();
/**
- * Converts epoch time to QDateTime format.
+ * Converts epoch time to TQDateTime format.
* @param epoch epoch time.
*/
- static QDateTime epoch2QDateTime( uint epoch );
+ static TQDateTime epoch2TQDateTime( uint epoch );
/**
* Converts QT DateTime to epoch format.
- * @param dt is a QDateTime to convert to an epoch.
+ * @param dt is a TQDateTime to convert to an epoch.
*/
- static uint QDateTime2epoch( QDateTime dt );
+ static uint QDateTime2epoch( TQDateTime dt );
};
diff --git a/konsolekalendar/konsolekalendarexports.cpp b/konsolekalendar/konsolekalendarexports.cpp
index cad79964a..f1d93b0ab 100644
--- a/konsolekalendar/konsolekalendarexports.cpp
+++ b/konsolekalendar/konsolekalendarexports.cpp
@@ -33,7 +33,7 @@
#include <stdlib.h>
#include <iostream>
-#include <qdatetime.h>
+#include <tqdatetime.h>
#include <kdebug.h>
#include <klocale.h>
@@ -58,8 +58,8 @@ KonsoleKalendarExports::~KonsoleKalendarExports()
{
}
-bool KonsoleKalendarExports::exportAsTxt( QTextStream *ts,
- Event *event, QDate date )
+bool KonsoleKalendarExports::exportAsTxt( TQTextStream *ts,
+ Event *event, TQDate date )
{
// Export "Text" Format:
@@ -144,8 +144,8 @@ bool KonsoleKalendarExports::exportAsTxt( QTextStream *ts,
return true;
}
-bool KonsoleKalendarExports::exportAsTxtShort( QTextStream *ts,
- Event *event, QDate date,
+bool KonsoleKalendarExports::exportAsTxtShort( TQTextStream *ts,
+ Event *event, TQDate date,
bool sameday )
{
@@ -174,21 +174,21 @@ bool KonsoleKalendarExports::exportAsTxtShort( QTextStream *ts,
*ts << "\t";
// Print Event Summary
- *ts << event->summary().replace( QChar( '\n' ), QChar( ' ' ) );
+ *ts << event->summary().replace( TQChar( '\n' ), TQChar( ' ' ) );
// Print Event Location
if ( !event->location().isEmpty() ) {
if ( !event->summary().isEmpty() ) {
*ts << ", ";
}
- *ts << event->location().replace( QChar( '\n' ), QChar( ' ' ) );
+ *ts << event->location().replace( TQChar( '\n' ), TQChar( ' ' ) );
}
*ts << endl;
// Print Event Description
if ( !event->description().isEmpty() ) {
*ts << "\t\t\t"
- << event->description().replace( QChar( '\n' ), QChar( ' ' ) )
+ << event->description().replace( TQChar( '\n' ), TQChar( ' ' ) )
<< endl;
}
@@ -197,29 +197,29 @@ bool KonsoleKalendarExports::exportAsTxtShort( QTextStream *ts,
return true;
}
-QString KonsoleKalendarExports::processField( QString field, QString dquote )
+TQString KonsoleKalendarExports::processField( TQString field, TQString dquote )
{
// little function that processes a field for CSV compliance:
// 1. Replaces double quotes by a pair of consecutive double quotes
// 2. Surrounds field with double quotes
- QString double_dquote = dquote + dquote;
- QString retField = dquote + field.replace( dquote, double_dquote ) + dquote;
+ TQString double_dquote = dquote + dquote;
+ TQString retField = dquote + field.replace( dquote, double_dquote ) + dquote;
return retField;
}
#define pF( x ) processField( ( x ), dquote )
-bool KonsoleKalendarExports::exportAsCSV( QTextStream *ts,
- Event *event, QDate date )
+bool KonsoleKalendarExports::exportAsCSV( TQTextStream *ts,
+ Event *event, TQDate date )
{
// Export "CSV" Format:
//
// startdate,starttime,enddate,endtime,summary,location,description,UID
- QString delim = i18n( "," ); // character to use as CSV field delimiter
- QString dquote = i18n( "\"" ); // character to use to quote CSV fields
+ TQString delim = i18n( "," ); // character to use as CSV field delimiter
+ TQString dquote = i18n( "\"" ); // character to use to quote CSV fields
if ( !event->doesFloat() ) {
*ts << pF( KGlobal::locale()->formatDate( date ) )
@@ -233,9 +233,9 @@ bool KonsoleKalendarExports::exportAsCSV( QTextStream *ts,
<< delim << pF( "" );
}
- *ts << delim << pF( event->summary().replace( QChar('\n'), QChar(' ') ) )
- << delim << pF( event->location().replace( QChar('\n'), QChar(' ') ) )
- << delim << pF( event->description().replace( QChar('\n'), QChar(' ') ) )
+ *ts << delim << pF( event->summary().replace( TQChar('\n'), TQChar(' ') ) )
+ << delim << pF( event->location().replace( TQChar('\n'), TQChar(' ') ) )
+ << delim << pF( event->description().replace( TQChar('\n'), TQChar(' ') ) )
<< delim << pF( event->uid() )
<< endl;
diff --git a/konsolekalendar/konsolekalendarexports.h b/konsolekalendar/konsolekalendarexports.h
index dc2f44eca..8db27c97f 100644
--- a/konsolekalendar/konsolekalendarexports.h
+++ b/konsolekalendar/konsolekalendarexports.h
@@ -28,7 +28,7 @@
#ifndef _KONSOLEKALENDAREXPORTS_H_
#define _KONSOLEKALENDAREXPORTS_H_
-#include <qtextstream.h>
+#include <tqtextstream.h>
#include "konsolekalendarvariables.h"
@@ -60,28 +60,28 @@ namespace KCal
/**
* Export the Event in Text Mode.
- * @param ts pointer to the output QTextStream.
+ * @param ts pointer to the output TQTextStream.
* @param event pointer to the Event to export.
- * @param date is the QDate to be exported for.
+ * @param date is the TQDate to be exported for.
*/
- bool exportAsTxt( QTextStream *ts, Event *event, QDate date );
+ bool exportAsTxt( TQTextStream *ts, Event *event, TQDate date );
/**
* Export the Event in Short Text Mode.
- * @param ts pointer to the output QTextStream.
+ * @param ts pointer to the output TQTextStream.
* @param event pointer to the Event to export.
- * @param date is the QDate to be exported for.
+ * @param date is the TQDate to be exported for.
* @param sameday flags that this Event is on the same date as the
* previously exported Event.
*/
- bool exportAsTxtShort( QTextStream *ts, Event *event, QDate date,
+ bool exportAsTxtShort( TQTextStream *ts, Event *event, TQDate date,
bool sameday );
/**
* Export the Event in Comma-Separated Values (CSV) Mode.
- * @param ts pointer to the output QTextStream.
+ * @param ts pointer to the output TQTextStream.
* @param event pointer to the Event to export.
- * @param date is the QDate to be exported for.
+ * @param date is the TQDate to be exported for.
*/
- bool exportAsCSV( QTextStream *ts, Event *event, QDate date );
+ bool exportAsCSV( TQTextStream *ts, Event *event, TQDate date );
private:
KonsoleKalendarVariables *m_variables;
@@ -91,9 +91,9 @@ namespace KCal
* 1. Replaces double quotes by a pair of consecutive double quotes
* 2. Surrounds field with double quotes
* @param field is the field value to be processed.
- * @param dquote is a QString containing the double quote character.
+ * @param dquote is a TQString containing the double quote character.
*/
- QString processField( QString field, QString dquote );
+ TQString processField( TQString field, TQString dquote );
};
diff --git a/konsolekalendar/konsolekalendarvariables.cpp b/konsolekalendar/konsolekalendarvariables.cpp
index bba7864bd..a93279239 100644
--- a/konsolekalendar/konsolekalendarvariables.cpp
+++ b/konsolekalendar/konsolekalendarvariables.cpp
@@ -36,9 +36,9 @@
#include <kconfig.h>
#include <kstandarddirs.h>
-#include <qdatetime.h>
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqdatetime.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
#include <stdlib.h>
#include <iostream>
@@ -79,13 +79,13 @@ KonsoleKalendarVariables::~KonsoleKalendarVariables()
// delete m_resource;
}
-void KonsoleKalendarVariables::setUID( QString uid )
+void KonsoleKalendarVariables::setUID( TQString uid )
{
m_bIsUID = true;
m_UID = uid;
}
-QString KonsoleKalendarVariables::getUID()
+TQString KonsoleKalendarVariables::getUID()
{
return m_UID;
}
@@ -95,13 +95,13 @@ bool KonsoleKalendarVariables::isUID()
return m_bIsUID;
}
-void KonsoleKalendarVariables::setStartDateTime( QDateTime start )
+void KonsoleKalendarVariables::setStartDateTime( TQDateTime start )
{
m_bIsStartDateTime = true;
m_startDateTime = start;
}
-QDateTime KonsoleKalendarVariables::getStartDateTime()
+TQDateTime KonsoleKalendarVariables::getStartDateTime()
{
return m_startDateTime;
}
@@ -111,13 +111,13 @@ bool KonsoleKalendarVariables::isStartDateTime()
return m_bIsStartDateTime;
}
-void KonsoleKalendarVariables::setEndDateTime( QDateTime end )
+void KonsoleKalendarVariables::setEndDateTime( TQDateTime end )
{
m_bIsEndDateTime = true;
m_endDateTime = end;
}
-QDateTime KonsoleKalendarVariables::getEndDateTime()
+TQDateTime KonsoleKalendarVariables::getEndDateTime()
{
return m_endDateTime;
}
@@ -187,22 +187,22 @@ bool KonsoleKalendarVariables::getUseJournals()
return( m_bUseJournals );
}
-void KonsoleKalendarVariables::setCalendarFile( QString calendar )
+void KonsoleKalendarVariables::setCalendarFile( TQString calendar )
{
m_calendar = calendar;
}
-QString KonsoleKalendarVariables::getCalendarFile()
+TQString KonsoleKalendarVariables::getCalendarFile()
{
return m_calendar;
}
-void KonsoleKalendarVariables::setImportFile( QString calendar )
+void KonsoleKalendarVariables::setImportFile( TQString calendar )
{
m_import = calendar;
}
-QString KonsoleKalendarVariables::getImportFile()
+TQString KonsoleKalendarVariables::getImportFile()
{
return m_import;
}
@@ -227,7 +227,7 @@ ExportType KonsoleKalendarVariables::getExportType()
return m_exportType;
}
-void KonsoleKalendarVariables::setExportFile( QString export_file )
+void KonsoleKalendarVariables::setExportFile( TQString export_file )
{
m_exportFile = export_file;
m_bIsExportFile = true;
@@ -238,7 +238,7 @@ bool KonsoleKalendarVariables::isExportFile()
return m_bIsExportFile;
}
-QString KonsoleKalendarVariables::getExportFile()
+TQString KonsoleKalendarVariables::getExportFile()
{
return m_exportFile;
}
@@ -258,13 +258,13 @@ bool KonsoleKalendarVariables::getAll()
return m_bAll;
}
-void KonsoleKalendarVariables::setDescription( QString description )
+void KonsoleKalendarVariables::setDescription( TQString description )
{
m_bDescription = true;
m_description = description;
}
-QString KonsoleKalendarVariables::getDescription()
+TQString KonsoleKalendarVariables::getDescription()
{
return m_description;
}
@@ -274,13 +274,13 @@ bool KonsoleKalendarVariables::isDescription()
return m_bDescription;
}
-void KonsoleKalendarVariables::setLocation( QString location )
+void KonsoleKalendarVariables::setLocation( TQString location )
{
m_bLocation = true;
m_location = location;
}
-QString KonsoleKalendarVariables::getLocation()
+TQString KonsoleKalendarVariables::getLocation()
{
return m_location;
}
@@ -290,13 +290,13 @@ bool KonsoleKalendarVariables::isLocation()
return m_bLocation;
}
-void KonsoleKalendarVariables::setSummary( QString summary )
+void KonsoleKalendarVariables::setSummary( TQString summary )
{
m_bSummary = true;
m_summary = summary;
}
-QString KonsoleKalendarVariables::getSummary()
+TQString KonsoleKalendarVariables::getSummary()
{
return m_summary;
}
diff --git a/konsolekalendar/konsolekalendarvariables.h b/konsolekalendar/konsolekalendarvariables.h
index ccba49348..9b0c82d32 100644
--- a/konsolekalendar/konsolekalendarvariables.h
+++ b/konsolekalendar/konsolekalendarvariables.h
@@ -34,8 +34,8 @@
#include <libkcal/resourcecalendar.h>
#include <libkcal/event.h>
-#include <qstring.h>
-#include <qdatetime.h>
+#include <tqstring.h>
+#include <tqdatetime.h>
/**
* @file konsolekalendarvariables.h
@@ -123,13 +123,13 @@ namespace KCal
* Sets start date.
* @param start is the start date.
*/
- void setStartDateTime( QDateTime start );
+ void setStartDateTime( TQDateTime start );
/**
* Get start date.
* @return start date.
*/
- QDateTime getStartDateTime();
+ TQDateTime getStartDateTime();
/**
* Is there start date?
@@ -141,13 +141,13 @@ namespace KCal
* Sets end date.
* @param end is the enddate.
*/
- void setEndDateTime( QDateTime end );
+ void setEndDateTime( TQDateTime end );
/**
* Get end date.
* @return end date.
*/
- QDateTime getEndDateTime();
+ TQDateTime getEndDateTime();
/**
* Is there end date?
@@ -159,13 +159,13 @@ namespace KCal
* Sets the UID, the unique tag for VCard entry.
* @param uid unique tag for VCard entry.
*/
- void setUID( QString uid );
+ void setUID( TQString uid );
/**
* Get UID, the unique tag for VCard entry.
* @return UID number.
*/
- QString getUID();
+ TQString getUID();
/**
* Is there UID set?
@@ -211,37 +211,37 @@ namespace KCal
* Set calendar file
* @param calendar Calendar files full path.
*/
- void setCalendarFile( QString calendar );
+ void setCalendarFile( TQString calendar );
/**
* Returns fullpath to calendar file.
* @return calendar file.
*/
- QString getCalendarFile();
+ TQString getCalendarFile();
/**
* Set file to import active calendar.
* @param calendar Calendar file to import.
*/
- void setImportFile( QString calendar );
+ void setImportFile( TQString calendar );
/**
* Return import filename.
* @return File that should be imported.
*/
- QString getImportFile();
+ TQString getImportFile();
/**
* Add description.
* @param description to event.
*/
- void setDescription( QString description );
+ void setDescription( TQString description );
/**
* Return description.
* @return description of event.
*/
- QString getDescription();
+ TQString getDescription();
/**
* Is there an event description?
@@ -253,13 +253,13 @@ namespace KCal
* Add location information.
* @param location location where the event occurs.
*/
- void setLocation( QString location );
+ void setLocation( TQString location );
/**
* Return location information.
* @return location where event is occurring.
*/
- QString getLocation();
+ TQString getLocation();
/**
* Is there event location information available?
@@ -271,13 +271,13 @@ namespace KCal
* Add summary.
* @param summary event summary.
*/
- void setSummary( QString summary );
+ void setSummary( TQString summary );
/**
* Get summary.
* @return summary.
*/
- QString getSummary();
+ TQString getSummary();
/**
* Is there an event summary?
@@ -324,12 +324,12 @@ namespace KCal
/**
* Set output file.
*/
- void setExportFile( QString export_file );
+ void setExportFile( TQString export_file );
/**
* To what file we'll output.
*/
- QString getExportFile();
+ TQString getExportFile();
/**
* Has an Export File been set?
@@ -365,29 +365,29 @@ namespace KCal
private:
bool m_bIsUID;
- QString m_UID;
+ TQString m_UID;
bool m_bIsStartDateTime;
- QDateTime m_startDateTime;
+ TQDateTime m_startDateTime;
bool m_bIsEndDateTime;
- QDateTime m_endDateTime;
+ TQDateTime m_endDateTime;
bool m_bNext;
bool m_bVerbose;
bool m_bDryRun;
bool m_bUseEvents;
bool m_bUseTodos;
bool m_bUseJournals;
- QString m_calendar;
- QString m_import;
+ TQString m_calendar;
+ TQString m_import;
ExportType m_exportType;
bool m_bIsExportFile;
- QString m_exportFile;
+ TQString m_exportFile;
bool m_bAll;
bool m_bDescription;
- QString m_description;
+ TQString m_description;
bool m_bLocation;
- QString m_location;
+ TQString m_location;
bool m_bSummary;
- QString m_summary;
+ TQString m_summary;
bool m_bFloating;
bool m_bDaysCount;
int m_daysCount;
diff --git a/konsolekalendar/main.cpp b/konsolekalendar/main.cpp
index 3792d083e..6343144e2 100644
--- a/konsolekalendar/main.cpp
+++ b/konsolekalendar/main.cpp
@@ -57,9 +57,9 @@
#include <libkcal/calendarresources.h>
#include <libkcal/resourcelocal.h>
-#include <qdatetime.h>
-#include <qfile.h>
-#include <qfileinfo.h>
+#include <tqdatetime.h>
+#include <tqfile.h>
+#include <tqfileinfo.h>
#include <stdlib.h>
#include <iostream>
@@ -204,12 +204,12 @@ int main( int argc, char *argv[] )
KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
// Default values for start date/time (today at 07:00)
- QDate startdate = QDate::currentDate();
- QTime starttime( 7, 0 );
+ TQDate startdate = TQDate::currentDate();
+ TQTime starttime( 7, 0 );
// Default values for end date/time (today at 17:00)
- QDate enddate = QDate::currentDate();
- QTime endtime( 17, 0 );
+ TQDate enddate = TQDate::currentDate();
+ TQTime endtime( 17, 0 );
// Default values for switches
bool view = true;
@@ -220,7 +220,7 @@ int main( int argc, char *argv[] )
bool calendarFile = false;
bool importFile = false;
- QString option;
+ TQString option;
KonsoleKalendarVariables variables;
KonsoleKalendarEpoch epochs;
@@ -472,7 +472,7 @@ int main( int argc, char *argv[] )
<< "(" << option << ")"
<< endl;
- startdate = QDate::fromString( option, Qt::ISODate );
+ startdate = TQDate::fromString( option, Qt::ISODate );
if ( !startdate.isValid() ) {
cout << i18n( "Invalid Start Date Specified: %1" ).
arg( option ).local8Bit()
@@ -497,7 +497,7 @@ int main( int argc, char *argv[] )
<< endl;
if ( option.upper() != "FLOAT" ) {
- starttime = QTime::fromString( option, Qt::ISODate );
+ starttime = TQTime::fromString( option, Qt::ISODate );
if ( !starttime.isValid() ) {
cout << i18n( "Invalid Start Time Specified: %1" ).
arg( option ).local8Bit()
@@ -527,7 +527,7 @@ int main( int argc, char *argv[] )
<< "(" << option << ")"
<< endl;
- enddate = QDate::fromString( option, Qt::ISODate );
+ enddate = TQDate::fromString( option, Qt::ISODate );
if ( !enddate.isValid() ) {
cout << i18n( "Invalid End Date Specified: %1" ).
arg( option ).local8Bit()
@@ -579,7 +579,7 @@ int main( int argc, char *argv[] )
<< endl;
if ( option.upper() != "FLOAT" ) {
- endtime = QTime::fromString( option, Qt::ISODate );
+ endtime = TQTime::fromString( option, Qt::ISODate );
if ( !endtime.isValid() ) {
cout << i18n( "Invalid End Time Specified: %1" ).
arg( option ).local8Bit()
@@ -662,12 +662,12 @@ int main( int argc, char *argv[] )
KURL url = KURL::fromPathOrURL( variables.getCalendarFile() );
if ( url.isLocalFile() ) {
variables.setCalendarFile( url.path() );
- exists = QFile::exists( variables.getCalendarFile() );
+ exists = TQFile::exists( variables.getCalendarFile() );
remote = false;
} else if ( url.protocol().isEmpty() ) {
- QFileInfo info( variables.getCalendarFile() );
+ TQFileInfo info( variables.getCalendarFile() );
variables.setCalendarFile( info.absFilePath() );
- exists = QFile::exists( variables.getCalendarFile() );
+ exists = TQFile::exists( variables.getCalendarFile() );
remote = false;
} else {
exists = true; // really have no idea if the remote file exists
@@ -740,7 +740,7 @@ int main( int argc, char *argv[] )
/***************************************************************************
* Glorious date/time checking and setting code *
***************************************************************************/
- QDateTime startdatetime, enddatetime;
+ TQDateTime startdatetime, enddatetime;
// Handle case with either date or end-date unspecified
if ( !args->isSet( "end-date" ) && !args->isSet( "show-next" ) &&
@@ -768,7 +768,7 @@ int main( int argc, char *argv[] )
<< "setting endtime 1 hour after starttime"
<< endl;
} else if ( args->isSet( "epoch-start" ) ) {
- startdatetime = epochs.epoch2QDateTime( epochstart );
+ startdatetime = epochs.epoch2TQDateTime( epochstart );
enddatetime = startdatetime.addSecs( 60 * 60 );
kdDebug() << "main | datetimestamp | "
<< "setting endtime 1 hour after epochstart"
@@ -786,7 +786,7 @@ int main( int argc, char *argv[] )
<< "setting starttime 1 hour before endtime"
<< endl;
} else if ( args->isSet( "epoch-end" ) ) {
- enddatetime = epochs.epoch2QDateTime( epochend );
+ enddatetime = epochs.epoch2TQDateTime( epochend );
startdatetime = enddatetime.addSecs( -60 * 60 );
kdDebug() << "main | datetimestamp | "
<< "setting starttime 1 before after epochend"
@@ -799,13 +799,13 @@ int main( int argc, char *argv[] )
if ( !args->isSet( "time" ) && !args->isSet( "epoch-start" ) &&
!args->isSet( "end-time" ) && !args->isSet( "epoch-end" ) ) {
// set default start date/time
- startdatetime = QDateTime::QDateTime( startdate, starttime );
+ startdatetime = TQDateTime::TQDateTime( startdate, starttime );
kdDebug() << "main | datetimestamp | "
<< "setting startdatetime from "
<< "default startdate (today) and starttime"
<< endl;
// set default end date/time
- enddatetime = QDateTime::QDateTime( enddate, endtime );
+ enddatetime = TQDateTime::TQDateTime( enddate, endtime );
kdDebug() << "main | datetimestamp | "
<< "setting enddatetime from "
<< "default enddate (today) and endtime"
@@ -814,13 +814,13 @@ int main( int argc, char *argv[] )
// Set startdatetime, enddatetime if still necessary
if ( startdatetime.isNull() ) {
- startdatetime = QDateTime::QDateTime( startdate, starttime );
+ startdatetime = TQDateTime::TQDateTime( startdate, starttime );
kdDebug() << "main | datetimestamp | "
<< "setting startdatetime from startdate and starttime"
<< endl;
}
if ( enddatetime.isNull() ) {
- enddatetime = QDateTime::QDateTime( enddate, endtime );
+ enddatetime = TQDateTime::TQDateTime( enddate, endtime );
kdDebug() << "main | datetimestamp | "
<< "setting enddatetime from enddate and endtime"
<< endl;
@@ -892,7 +892,7 @@ int main( int argc, char *argv[] )
* Set our application name for use in unique IDs and error messages,
* and product ID for incidence PRODID property
*/
- QString prodId = "-//K Desktop Environment//NONSGML %1 %2//EN";
+ TQString prodId = "-//K Desktop Environment//NONSGML %1 %2//EN";
CalFormat::setApplication( progDisplay,
prodId.arg( progDisplay ).arg( progVersion ) );
diff --git a/konsolekalendar/stdcalendar.cpp b/konsolekalendar/stdcalendar.cpp
index 6263172c1..6026d7720 100644
--- a/konsolekalendar/stdcalendar.cpp
+++ b/konsolekalendar/stdcalendar.cpp
@@ -33,7 +33,7 @@
using namespace KCal;
-StdCalendar::StdCalendar( const QString &fileName, const QString &resName )
+StdCalendar::StdCalendar( const TQString &fileName, const TQString &resName )
: CalendarResources( KPimPrefs::timezone() )
{
mManager = resourceManager();
@@ -56,7 +56,7 @@ StdCalendar::StdCalendar()
if ( mManager->isEmpty() ) {
KConfig config( "korganizerrc" );
config.setGroup( "General" );
- QString fileName = config.readPathEntry( "Active Calendar" );
+ TQString fileName = config.readPathEntry( "Active Calendar" );
if ( !fileName.isEmpty() ) {
addFileResource( fileName, i18n( "Active Calendar" ) );
@@ -69,8 +69,8 @@ StdCalendar::StdCalendar()
}
}
-void StdCalendar::addFileResource( const QString &fileName,
- const QString &resName )
+void StdCalendar::addFileResource( const TQString &fileName,
+ const TQString &resName )
{
KCal::ResourceCalendar *resource = 0;
diff --git a/konsolekalendar/stdcalendar.h b/konsolekalendar/stdcalendar.h
index e217786f5..b1f434729 100644
--- a/konsolekalendar/stdcalendar.h
+++ b/konsolekalendar/stdcalendar.h
@@ -31,10 +31,10 @@ class KDE_EXPORT StdCalendar : public KCal::CalendarResources
{
public:
StdCalendar();
- StdCalendar( const QString &fileName, const QString &resName );
+ StdCalendar( const TQString &fileName, const TQString &resName );
~StdCalendar();
- void addFileResource( const QString &fileName, const QString &resName );
+ void addFileResource( const TQString &fileName, const TQString &resName );
private:
KCal::CalendarResourceManager *mManager;
diff --git a/kontact/interfaces/core.cpp b/kontact/interfaces/core.cpp
index 19ed8bade..6d048504b 100644
--- a/kontact/interfaces/core.cpp
+++ b/kontact/interfaces/core.cpp
@@ -26,7 +26,7 @@
#include <kparts/part.h>
#include <kparts/componentfactory.h>
#include <kdebug.h>
-#include <qtimer.h>
+#include <tqtimer.h>
#include <klocale.h>
using namespace Kontact;
@@ -34,16 +34,16 @@ using namespace Kontact;
class Core::Private
{
public:
- QString lastErrorMessage;
+ TQString lastErrorMessage;
};
-Core::Core( QWidget *parent, const char *name )
+Core::Core( TQWidget *parent, const char *name )
: KParts::MainWindow( parent, name )
{
d = new Private;
- QTimer* timer = new QTimer( this );
- mLastDate = QDate::currentDate();
- connect(timer, SIGNAL( timeout() ), SLOT( checkNewDay() ) );
+ TQTimer* timer = new TQTimer( this );
+ mLastDate = TQDate::currentDate();
+ connect(timer, TQT_SIGNAL( timeout() ), TQT_SLOT( checkNewDay() ) );
timer->start( 1000*60 );
}
@@ -56,7 +56,7 @@ KParts::ReadOnlyPart *Core::createPart( const char *libname )
{
kdDebug(5601) << "Core::createPart(): " << libname << endl;
- QMap<QCString,KParts::ReadOnlyPart *>::ConstIterator it;
+ TQMap<TQCString,KParts::ReadOnlyPart *>::ConstIterator it;
it = mParts.find( libname );
if ( it != mParts.end() ) return it.data();
@@ -66,13 +66,13 @@ KParts::ReadOnlyPart *Core::createPart( const char *libname )
KParts::ReadOnlyPart *part =
KParts::ComponentFactory::
createPartInstanceFromLibrary<KParts::ReadOnlyPart>
- ( libname, this, 0, this, "kontact", QStringList(), &error );
+ ( libname, this, 0, this, "kontact", TQStringList(), &error );
KParts::ReadOnlyPart *pimPart = dynamic_cast<KParts::ReadOnlyPart*>( part );
if ( pimPart ) {
mParts.insert( libname, pimPart );
- QObject::connect( pimPart, SIGNAL( destroyed( QObject * ) ),
- SLOT( slotPartDestroyed( QObject * ) ) );
+ TQObject::connect( pimPart, TQT_SIGNAL( destroyed( TQObject * ) ),
+ TQT_SLOT( slotPartDestroyed( TQObject * ) ) );
} else {
// TODO move to KParts::ComponentFactory
switch( error ) {
@@ -98,12 +98,12 @@ KParts::ReadOnlyPart *Core::createPart( const char *libname )
return pimPart;
}
-void Core::slotPartDestroyed( QObject * obj )
+void Core::slotPartDestroyed( TQObject * obj )
{
// the part was deleted, we need to remove it from the part map to not return
// a dangling pointer in createPart
- QMap<QCString, KParts::ReadOnlyPart*>::Iterator end = mParts.end();
- QMap<QCString, KParts::ReadOnlyPart*>::Iterator it = mParts.begin();
+ TQMap<TQCString, KParts::ReadOnlyPart*>::Iterator end = mParts.end();
+ TQMap<TQCString, KParts::ReadOnlyPart*>::Iterator it = mParts.begin();
for ( ; it != end; ++it ) {
if ( it.data() == obj ) {
mParts.remove( it );
@@ -114,13 +114,13 @@ void Core::slotPartDestroyed( QObject * obj )
void Core::checkNewDay()
{
- if ( mLastDate != QDate::currentDate() )
- emit dayChanged( QDate::currentDate() );
+ if ( mLastDate != TQDate::currentDate() )
+ emit dayChanged( TQDate::currentDate() );
- mLastDate = QDate::currentDate();
+ mLastDate = TQDate::currentDate();
}
-QString Core::lastErrorMessage() const
+TQString Core::lastErrorMessage() const
{
return d->lastErrorMessage;
}
diff --git a/kontact/interfaces/core.h b/kontact/interfaces/core.h
index 2ebe088f9..2d75fb227 100644
--- a/kontact/interfaces/core.h
+++ b/kontact/interfaces/core.h
@@ -23,7 +23,7 @@
#ifndef KONTACT_CORE_H
#define KONTACT_CORE_H
-#include <qdatetime.h>
+#include <tqdatetime.h>
#include <kdepimmacros.h>
#include <kparts/mainwindow.h>
#include <kparts/part.h>
@@ -54,12 +54,12 @@ class KDE_EXPORT Core : public KParts::MainWindow
This is an overloaded member function. It behaves essentially like the
above function.
*/
- virtual void selectPlugin( const QString &plugin ) = 0;
+ virtual void selectPlugin( const TQString &plugin ) = 0;
/**
Returns the pointer list of available plugins.
*/
- virtual QValueList<Kontact::Plugin*> pluginList() const = 0;
+ virtual TQValueList<Kontact::Plugin*> pluginList() const = 0;
/**
@internal (for Plugin)
@@ -76,20 +76,20 @@ class KDE_EXPORT Core : public KParts::MainWindow
/**
Emitted when a new day starts
*/
- void dayChanged( const QDate& );
+ void dayChanged( const TQDate& );
protected:
- Core( QWidget *parentWidget = 0, const char *name = 0 );
+ Core( TQWidget *parentWidget = 0, const char *name = 0 );
- QString lastErrorMessage() const;
+ TQString lastErrorMessage() const;
private slots:
- void slotPartDestroyed( QObject * );
+ void slotPartDestroyed( TQObject * );
void checkNewDay();
private:
- QMap<QCString,KParts::ReadOnlyPart *> mParts;
- QDate mLastDate;
+ TQMap<TQCString,KParts::ReadOnlyPart *> mParts;
+ TQDate mLastDate;
class Private;
Private *d;
diff --git a/kontact/interfaces/plugin.cpp b/kontact/interfaces/plugin.cpp
index 33662015c..6025664f1 100644
--- a/kontact/interfaces/plugin.cpp
+++ b/kontact/interfaces/plugin.cpp
@@ -20,7 +20,7 @@
Boston, MA 02110-1301, USA.
*/
-#include <qobjectlist.h>
+#include <tqobjectlist.h>
#include <dcopclient.h>
#include <kaboutdata.h>
@@ -40,29 +40,29 @@ class Plugin::Private
public:
Kontact::Core *core;
DCOPClient *dcopClient;
- QPtrList<KAction> *newActions;
- QPtrList<KAction> *syncActions;
- QString identifier;
- QString title;
- QString icon;
- QString executableName;
- QCString partLibraryName;
+ TQPtrList<KAction> *newActions;
+ TQPtrList<KAction> *syncActions;
+ TQString identifier;
+ TQString title;
+ TQString icon;
+ TQString executableName;
+ TQCString partLibraryName;
bool hasPart;
KParts::ReadOnlyPart *part;
bool disabled;
};
-Plugin::Plugin( Kontact::Core *core, QObject *parent, const char *name )
- : KXMLGUIClient( core ), QObject( parent, name ), d( new Private )
+Plugin::Plugin( Kontact::Core *core, TQObject *parent, const char *name )
+ : KXMLGUIClient( core ), TQObject( parent, name ), d( new Private )
{
core->factory()->addClient( this );
KGlobal::locale()->insertCatalogue(name);
d->core = core;
d->dcopClient = 0;
- d->newActions = new QPtrList<KAction>;
- d->syncActions = new QPtrList<KAction>;
+ d->newActions = new TQPtrList<KAction>;
+ d->syncActions = new TQPtrList<KAction>;
d->hasPart = true;
d->part = 0;
d->disabled = false;
@@ -76,47 +76,47 @@ Plugin::~Plugin()
delete d;
}
-void Plugin::setIdentifier( const QString &identifier )
+void Plugin::setIdentifier( const TQString &identifier )
{
d->identifier = identifier;
}
-QString Plugin::identifier() const
+TQString Plugin::identifier() const
{
return d->identifier;
}
-void Plugin::setTitle( const QString &title )
+void Plugin::setTitle( const TQString &title )
{
d->title = title;
}
-QString Plugin::title() const
+TQString Plugin::title() const
{
return d->title;
}
-void Plugin::setIcon( const QString &icon )
+void Plugin::setIcon( const TQString &icon )
{
d->icon = icon;
}
-QString Plugin::icon() const
+TQString Plugin::icon() const
{
return d->icon;
}
-void Plugin::setExecutableName( const QString& bin )
+void Plugin::setExecutableName( const TQString& bin )
{
d->executableName = bin;
}
-QString Plugin::executableName() const
+TQString Plugin::executableName() const
{
return d->executableName;
}
-void Plugin::setPartLibraryName( const QCString &libName )
+void Plugin::setPartLibraryName( const TQCString &libName )
{
d->partLibraryName = libName;
}
@@ -147,16 +147,16 @@ KParts::ReadOnlyPart *Plugin::part()
if ( !d->part ) {
d->part = createPart();
if ( d->part ) {
- connect( d->part, SIGNAL( destroyed() ), SLOT( partDestroyed() ) );
+ connect( d->part, TQT_SIGNAL( destroyed() ), TQT_SLOT( partDestroyed() ) );
core()->partLoaded( this, d->part );
}
}
return d->part;
}
-QString Plugin::tipFile() const
+TQString Plugin::tipFile() const
{
- return QString::null;
+ return TQString::null;
}
@@ -183,12 +183,12 @@ void Plugin::insertSyncAction( KAction *action )
d->syncActions->append( action );
}
-QPtrList<KAction> *Plugin::newActions() const
+TQPtrList<KAction> *Plugin::newActions() const
{
return d->newActions;
}
-QPtrList<KAction> *Plugin::syncActions() const
+TQPtrList<KAction> *Plugin::syncActions() const
{
return d->syncActions;
}
@@ -242,11 +242,11 @@ bool Kontact::Plugin::disabled() const
return d->disabled;
}
-void Kontact::Plugin::loadProfile( const QString& )
+void Kontact::Plugin::loadProfile( const TQString& )
{
}
-void Kontact::Plugin::saveToProfile( const QString& ) const
+void Kontact::Plugin::saveToProfile( const TQString& ) const
{
}
diff --git a/kontact/interfaces/plugin.h b/kontact/interfaces/plugin.h
index c80227984..f3b44431d 100644
--- a/kontact/interfaces/plugin.h
+++ b/kontact/interfaces/plugin.h
@@ -24,10 +24,10 @@
#ifndef KONTACT_PLUGIN_H
#define KONTACT_PLUGIN_H
-#include <qobject.h>
+#include <tqobject.h>
#include <kxmlguiclient.h>
#include <kdepimmacros.h>
-#include <qptrlist.h>
+#include <tqptrlist.h>
class QStringList;
class DCOPClient;
@@ -55,7 +55,7 @@ class Summary;
to get a plugin. It can insert an icon into the sidepane,
add widgets to the widgetstack and add menu items via XMLGUI.
*/
-class KDE_EXPORT Plugin : public QObject, virtual public KXMLGUIClient
+class KDE_EXPORT Plugin : public TQObject, virtual public KXMLGUIClient
{
Q_OBJECT
@@ -68,61 +68,61 @@ class KDE_EXPORT Plugin : public QObject, virtual public KXMLGUIClient
provides the part! This is the name used for DCOP registration.
It's ok to have several plugins using the same application name.
*/
- Plugin( Core *core, QObject *parent, const char *name );
+ Plugin( Core *core, TQObject *parent, const char *name );
~Plugin();
/**
Sets the identifier.
*/
- void setIdentifier( const QString &identifier );
+ void setIdentifier( const TQString &identifier );
/**
Returns the identifier. It is used as argument for several
methods of Kontacts core.
*/
- QString identifier() const;
+ TQString identifier() const;
/**
Sets the localized title.
*/
- void setTitle( const QString &title );
+ void setTitle( const TQString &title );
/**
Returns the localized title.
*/
- QString title() const;
+ TQString title() const;
/**
Sets the icon name.
*/
- void setIcon( const QString &icon );
+ void setIcon( const TQString &icon );
/**
Returns the icon name.
*/
- QString icon() const;
+ TQString icon() const;
/**
Sets the name of executable (if existant).
*/
- void setExecutableName( const QString &bin );
+ void setExecutableName( const TQString &bin );
/**
Returns the name of the binary (if existant).
*/
- QString executableName() const;
+ TQString executableName() const;
/**
Set name of library which contains the KPart used by this plugin.
*/
- void setPartLibraryName( const QCString & );
+ void setPartLibraryName( const TQCString & );
/**
Create the DCOP interface for the given @p serviceType, if this
plugin provides it. Return false otherwise.
*/
- virtual bool createDCOPInterface( const QString& /*serviceType*/ ) { return false; }
+ virtual bool createDCOPInterface( const TQString& /*serviceType*/ ) { return false; }
/**
Reimplement this method and return wether a standalone application is still running
@@ -153,7 +153,7 @@ class KDE_EXPORT Plugin : public QObject, virtual public KXMLGUIClient
/**
Reimplement this method and return the a path relative to "data" to the tips file.
*/
- virtual QString tipFile() const;
+ virtual TQString tipFile() const;
/**
This function is called when the plugin is selected by the user before the
@@ -171,7 +171,7 @@ class KDE_EXPORT Plugin : public QObject, virtual public KXMLGUIClient
Reimplement this method if you want to add a widget for your application
to Kontact's summary page.
*/
- virtual Summary *createSummaryWidget( QWidget * /*parent*/ ) { return 0; }
+ virtual Summary *createSummaryWidget( TQWidget * /*parent*/ ) { return 0; }
/**
Returns wether the plugin provides a part that should be shown in the sidebar.
@@ -220,31 +220,31 @@ class KDE_EXPORT Plugin : public QObject, virtual public KXMLGUIClient
/**
FIXME: write API doc for Kontact::Plugin::newActions().
*/
- QPtrList<KAction>* newActions() const;
+ TQPtrList<KAction>* newActions() const;
/**
FIXME: write API doc for Kontact::Plugin::syncActions().
*/
- QPtrList<KAction>* syncActions() const;
+ TQPtrList<KAction>* syncActions() const;
/**
Returns a list of action name which shall be hidden in the main toolbar.
*/
- virtual QStringList invisibleToolbarActions() const { return QStringList(); }
+ virtual TQStringList invisibleToolbarActions() const { return TQStringList(); }
/**
Return, if the plugin can handle the drag object of the given mime type.
*/
- virtual bool canDecodeDrag( QMimeSource * ) { return false; }
+ virtual bool canDecodeDrag( TQMimeSource * ) { return false; }
/**
Process drop event.
*/
- virtual void processDropEvent( QDropEvent * ) {}
+ virtual void processDropEvent( TQDropEvent * ) {}
- virtual void loadProfile( const QString& directoryPath );
+ virtual void loadProfile( const TQString& directoryPath );
- virtual void saveToProfile( const QString& directoryPath ) const;
+ virtual void saveToProfile( const TQString& directoryPath ) const;
/**
* Session management: read properties
diff --git a/kontact/interfaces/summary.cpp b/kontact/interfaces/summary.cpp
index f4e38771d..da978d6e2 100644
--- a/kontact/interfaces/summary.cpp
+++ b/kontact/interfaces/summary.cpp
@@ -22,20 +22,20 @@
#include "summary.h"
-#include <qimage.h>
-#include <qdragobject.h>
-#include <qhbox.h>
-#include <qfont.h>
-#include <qlabel.h>
-#include <qpainter.h>
+#include <tqimage.h>
+#include <tqdragobject.h>
+#include <tqhbox.h>
+#include <tqfont.h>
+#include <tqlabel.h>
+#include <tqpainter.h>
#include <kiconloader.h>
#include <kdialog.h>
using namespace Kontact;
-Summary::Summary( QWidget *parent, const char *name )
- : QWidget( parent, name )
+Summary::Summary( TQWidget *parent, const char *name )
+ : TQWidget( parent, name )
{
setAcceptDrops( true );
}
@@ -44,22 +44,22 @@ Summary::~Summary()
{
}
-QWidget* Summary::createHeader(QWidget *parent, const QPixmap& icon, const QString& heading)
+TQWidget* Summary::createHeader(TQWidget *parent, const TQPixmap& icon, const TQString& heading)
{
- QHBox* hbox = new QHBox( parent );
+ TQHBox* hbox = new TQHBox( parent );
hbox->setMargin( 2 );
- QFont boldFont;
+ TQFont boldFont;
boldFont.setBold( true );
boldFont.setPointSize( boldFont.pointSize() + 2 );
- QLabel *label = new QLabel( hbox );
+ TQLabel *label = new TQLabel( hbox );
label->setPixmap( icon );
label->setFixedSize( label->sizeHint() );
label->setPaletteBackgroundColor( colorGroup().mid() );
label->setAcceptDrops( true );
- label = new QLabel( heading, hbox );
+ label = new TQLabel( heading, hbox );
label->setAlignment( AlignLeft|AlignVCenter );
label->setIndent( KDialog::spacingHint() );
label->setFont( boldFont );
@@ -73,25 +73,25 @@ QWidget* Summary::createHeader(QWidget *parent, const QPixmap& icon, const QStri
return hbox;
}
-void Summary::mousePressEvent( QMouseEvent *event )
+void Summary::mousePressEvent( TQMouseEvent *event )
{
mDragStartPoint = event->pos();
- QWidget::mousePressEvent( event );
+ TQWidget::mousePressEvent( event );
}
-void Summary::mouseMoveEvent( QMouseEvent *event )
+void Summary::mouseMoveEvent( TQMouseEvent *event )
{
if ( (event->state() & LeftButton) &&
(event->pos() - mDragStartPoint).manhattanLength() > 4 ) {
- QDragObject *drag = new QTextDrag( "", this, "SummaryWidgetDrag" );
+ TQDragObject *drag = new TQTextDrag( "", this, "SummaryWidgetDrag" );
- QPixmap pm = QPixmap::grabWidget( this );
+ TQPixmap pm = TQPixmap::grabWidget( this );
if ( pm.width() > 300 )
- pm = pm.convertToImage().smoothScale( 300, 300, QImage::ScaleMin );
+ pm = pm.convertToImage().smoothScale( 300, 300, TQImage::ScaleMin );
- QPainter painter;
+ TQPainter painter;
painter.begin( &pm );
painter.setPen( Qt::gray );
painter.drawRect( 0, 0, pm.width(), pm.height() );
@@ -99,15 +99,15 @@ void Summary::mouseMoveEvent( QMouseEvent *event )
drag->setPixmap( pm );
drag->dragMove();
} else
- QWidget::mouseMoveEvent( event );
+ TQWidget::mouseMoveEvent( event );
}
-void Summary::dragEnterEvent( QDragEnterEvent *event )
+void Summary::dragEnterEvent( TQDragEnterEvent *event )
{
- event->accept( QTextDrag::canDecode( event ) );
+ event->accept( TQTextDrag::canDecode( event ) );
}
-void Summary::dropEvent( QDropEvent *event )
+void Summary::dropEvent( TQDropEvent *event )
{
int alignment = (event->pos().y() < (height() / 2) ? Qt::AlignTop : Qt::AlignBottom);
emit summaryWidgetDropped( this, event->source(), alignment );
diff --git a/kontact/interfaces/summary.h b/kontact/interfaces/summary.h
index 8ef96ef2c..5bbfcf2b3 100644
--- a/kontact/interfaces/summary.h
+++ b/kontact/interfaces/summary.h
@@ -21,8 +21,8 @@
#ifndef KONTACT_SUMMARY_H
#define KONTACT_SUMMARY_H
-#include <qwidget.h>
-#include <qpixmap.h>
+#include <tqwidget.h>
+#include <tqpixmap.h>
#include <kdepimmacros.h>
class KStatusBar;
@@ -38,7 +38,7 @@ class KDE_EXPORT Summary : public QWidget
Q_OBJECT
public:
- Summary( QWidget *parent, const char *name = 0 );
+ Summary( TQWidget *parent, const char *name = 0 );
virtual ~Summary();
@@ -52,15 +52,15 @@ class KDE_EXPORT Summary : public QWidget
/**
Creates a heading for a typical summary view with an icon and a heading.
*/
- QWidget *createHeader( QWidget* parent, const QPixmap &icon,
- const QString& heading );
+ TQWidget *createHeader( TQWidget* parent, const TQPixmap &icon,
+ const TQString& heading );
/**
Return list of strings identifying configuration modules for this summary
part. The string has to be suitable for being passed to
KCMultiDialog::addModule().
*/
- virtual QStringList configModules() const { return QStringList(); }
+ virtual TQStringList configModules() const { return TQStringList(); }
public slots:
virtual void configChanged() {}
@@ -72,18 +72,18 @@ class KDE_EXPORT Summary : public QWidget
virtual void updateSummary( bool force = false ) { Q_UNUSED( force ); }
signals:
- void message( const QString &message );
- void summaryWidgetDropped( QWidget *target, QWidget *widget, int alignment );
+ void message( const TQString &message );
+ void summaryWidgetDropped( TQWidget *target, TQWidget *widget, int alignment );
protected:
- virtual void mousePressEvent( QMouseEvent* );
- virtual void mouseMoveEvent( QMouseEvent* );
- virtual void dragEnterEvent( QDragEnterEvent* );
- virtual void dropEvent( QDropEvent* );
+ virtual void mousePressEvent( TQMouseEvent* );
+ virtual void mouseMoveEvent( TQMouseEvent* );
+ virtual void dragEnterEvent( TQDragEnterEvent* );
+ virtual void dropEvent( TQDropEvent* );
private:
KStatusBar *mStatusBar;
- QPoint mDragStartPoint;
+ TQPoint mDragStartPoint;
class Private;
Private *d;
diff --git a/kontact/interfaces/uniqueapphandler.cpp b/kontact/interfaces/uniqueapphandler.cpp
index de77df7d5..34de01807 100644
--- a/kontact/interfaces/uniqueapphandler.cpp
+++ b/kontact/interfaces/uniqueapphandler.cpp
@@ -90,8 +90,8 @@ int UniqueAppHandler::newInstance()
return 0;
}
-bool UniqueAppHandler::process( const QCString &fun, const QByteArray &data,
- QCString& replyType, QByteArray &replyData )
+bool UniqueAppHandler::process( const TQCString &fun, const TQByteArray &data,
+ TQCString& replyType, TQByteArray &replyData )
{
if ( fun == "newInstance()" ) {
replyType = "int";
@@ -100,15 +100,15 @@ bool UniqueAppHandler::process( const QCString &fun, const QByteArray &data,
loadCommandLineOptions(); // implemented by plugin
// This bit is duplicated from KUniqueApplication::processDelayed()
- QDataStream ds( data, IO_ReadOnly );
+ TQDataStream ds( data, IO_ReadOnly );
KCmdLineArgs::loadAppArgs( ds );
if ( !ds.atEnd() ) { // backwards compatibility
- QCString asn_id;
+ TQCString asn_id;
ds >> asn_id;
kapp->setStartupId( asn_id );
}
- QDataStream _replyStream( replyData, IO_WriteOnly );
+ TQDataStream _replyStream( replyData, IO_WriteOnly );
_replyStream << newInstance();
// OK, we're done, reload the initial kontact command line options,
@@ -121,7 +121,7 @@ bool UniqueAppHandler::process( const QCString &fun, const QByteArray &data,
replyType = "bool";
(void)mPlugin->part(); // load the part without bringing it to front
- QDataStream _replyStream( replyData, IO_WriteOnly );
+ TQDataStream _replyStream( replyData, IO_WriteOnly );
_replyStream << true;
} else {
return DCOPObject::process( fun, data, replyType, replyData );
@@ -145,7 +145,7 @@ QCStringList UniqueAppHandler::functions()
}
UniqueAppWatcher::UniqueAppWatcher( UniqueAppHandlerFactoryBase* factory, Plugin* plugin )
- : QObject( plugin ), mFactory( factory ), mPlugin( plugin )
+ : TQObject( plugin ), mFactory( factory ), mPlugin( plugin )
{
// The app is running standalone if 1) that name is known to DCOP
mRunningStandalone = kapp->dcopClient()->isApplicationRegistered( plugin->name() );
@@ -156,8 +156,8 @@ UniqueAppWatcher::UniqueAppWatcher( UniqueAppHandlerFactoryBase* factory, Plugin
if ( mRunningStandalone ) {
kapp->dcopClient()->setNotifications( true );
- connect( kapp->dcopClient(), SIGNAL( applicationRemoved( const QCString& ) ),
- this, SLOT( unregisteredFromDCOP( const QCString& ) ) );
+ connect( kapp->dcopClient(), TQT_SIGNAL( applicationRemoved( const TQCString& ) ),
+ this, TQT_SLOT( unregisteredFromDCOP( const TQCString& ) ) );
} else {
mFactory->createHandler( mPlugin );
}
@@ -171,11 +171,11 @@ UniqueAppWatcher::~UniqueAppWatcher()
delete mFactory;
}
-void UniqueAppWatcher::unregisteredFromDCOP( const QCString& appId )
+void UniqueAppWatcher::unregisteredFromDCOP( const TQCString& appId )
{
if ( appId == mPlugin->name() && mRunningStandalone ) {
- disconnect( kapp->dcopClient(), SIGNAL( applicationRemoved( const QCString& ) ),
- this, SLOT( unregisteredFromDCOP( const QCString& ) ) );
+ disconnect( kapp->dcopClient(), TQT_SIGNAL( applicationRemoved( const TQCString& ) ),
+ this, TQT_SLOT( unregisteredFromDCOP( const TQCString& ) ) );
kdDebug(5601) << k_funcinfo << appId << endl;
mFactory->createHandler( mPlugin );
kapp->dcopClient()->setNotifications( false );
diff --git a/kontact/interfaces/uniqueapphandler.h b/kontact/interfaces/uniqueapphandler.h
index 23a593af6..62886cc1b 100644
--- a/kontact/interfaces/uniqueapphandler.h
+++ b/kontact/interfaces/uniqueapphandler.h
@@ -110,7 +110,7 @@ class KDE_EXPORT UniqueAppWatcher : public QObject
bool isRunningStandalone() const { return mRunningStandalone; }
protected slots:
- void unregisteredFromDCOP( const QCString& appId );
+ void unregisteredFromDCOP( const TQCString& appId );
private:
bool mRunningStandalone;
diff --git a/kontact/plugins/akregator/akregator_plugin.cpp b/kontact/plugins/akregator/akregator_plugin.cpp
index d57cea7f6..16f80e803 100644
--- a/kontact/plugins/akregator/akregator_plugin.cpp
+++ b/kontact/plugins/akregator/akregator_plugin.cpp
@@ -22,7 +22,7 @@
without including the source code for Qt in the source distribution.
*/
-#include <qwidget.h>
+#include <tqwidget.h>
#include <dcopclient.h>
#include <dcopref.h>
@@ -48,13 +48,13 @@ typedef KGenericFactory<Akregator::Plugin, Kontact::Core > PluginFactory;
K_EXPORT_COMPONENT_FACTORY( libkontact_akregator,
PluginFactory( "kontact_akregator" ) )
-Plugin::Plugin( Kontact::Core *core, const char *, const QStringList& )
+Plugin::Plugin( Kontact::Core *core, const char *, const TQStringList& )
: Kontact::Plugin( core, core, "akregator" ), m_stub(0)
{
setInstance( PluginFactory::instance() );
- insertNewAction( new KAction( i18n( "New Feed..." ), "bookmark_add", CTRL+SHIFT+Key_F, this, SLOT( addFeed() ), actionCollection(), "feed_new" ) );
+ insertNewAction( new KAction( i18n( "New Feed..." ), "bookmark_add", CTRL+SHIFT+Key_F, this, TQT_SLOT( addFeed() ), actionCollection(), "feed_new" ) );
m_uniqueAppWatcher = new Kontact::UniqueAppWatcher(
new Kontact::UniqueAppHandlerFactory<Akregator::UniqueAppHandler>(), this );
@@ -69,9 +69,9 @@ bool Plugin::isRunningStandalone()
return m_uniqueAppWatcher->isRunningStandalone();
}
-QStringList Plugin::invisibleToolbarActions() const
+TQStringList Plugin::invisibleToolbarActions() const
{
- return QStringList( "file_new_contact" );
+ return TQStringList( "file_new_contact" );
}
@@ -90,7 +90,7 @@ MyBasePart* Plugin::createPart()
{
MyBasePart* p = loadPart();
- connect(p, SIGNAL(showPart()), this, SLOT(showPart()));
+ connect(p, TQT_SIGNAL(showPart()), this, TQT_SLOT(showPart()));
m_stub = new Akregator::AkregatorPartIface_stub( dcopClient(), "akregator",
"AkregatorIface" );
m_stub->openStandardFeedList();
@@ -108,9 +108,9 @@ void Plugin::addFeed()
interface()->addFeed();
}
-QStringList Plugin::configModules() const
+TQStringList Plugin::configModules() const
{
- QStringList modules;
+ TQStringList modules;
modules << "PIM/akregator.desktop";
return modules;
}
diff --git a/kontact/plugins/akregator/akregator_plugin.h b/kontact/plugins/akregator/akregator_plugin.h
index af1a905f9..428084646 100644
--- a/kontact/plugins/akregator/akregator_plugin.h
+++ b/kontact/plugins/akregator/akregator_plugin.h
@@ -54,15 +54,15 @@ class Plugin : public Kontact::Plugin
public:
Plugin( Kontact::Core *core, const char *name,
- const QStringList & );
+ const TQStringList & );
~Plugin();
int weight() const { return 700; }
AkregatorPartIface_stub *interface();
- virtual QStringList configModules() const;
- virtual QStringList invisibleToolbarActions() const;
+ virtual TQStringList configModules() const;
+ virtual TQStringList invisibleToolbarActions() const;
virtual bool isRunningStandalone();
virtual void readProperties( KConfig *config );
virtual void saveProperties( KConfig *config );
diff --git a/kontact/plugins/kaddressbook/kaddressbook_plugin.cpp b/kontact/plugins/kaddressbook/kaddressbook_plugin.cpp
index e2f5a706f..be1fb08de 100644
--- a/kontact/plugins/kaddressbook/kaddressbook_plugin.cpp
+++ b/kontact/plugins/kaddressbook/kaddressbook_plugin.cpp
@@ -22,8 +22,8 @@
without including the source code for Qt in the source distribution.
*/
-#include <qwidget.h>
-#include <qdragobject.h>
+#include <tqwidget.h>
+#include <tqdragobject.h>
#include <kaction.h>
#include <kapplication.h>
@@ -51,21 +51,21 @@ typedef KGenericFactory< KAddressbookPlugin, Kontact::Core > KAddressbookPluginF
K_EXPORT_COMPONENT_FACTORY( libkontact_kaddressbookplugin,
KAddressbookPluginFactory( "kontact_kaddressbookplugin" ) )
-KAddressbookPlugin::KAddressbookPlugin( Kontact::Core *core, const char *, const QStringList& )
+KAddressbookPlugin::KAddressbookPlugin( Kontact::Core *core, const char *, const TQStringList& )
: Kontact::Plugin( core, core, "kaddressbook" ),
mStub( 0 )
{
setInstance( KAddressbookPluginFactory::instance() );
insertNewAction( new KAction( i18n( "New Contact..." ), "identity",
- CTRL+SHIFT+Key_C, this, SLOT( slotNewContact() ), actionCollection(),
+ CTRL+SHIFT+Key_C, this, TQT_SLOT( slotNewContact() ), actionCollection(),
"new_contact" ) );
insertNewAction( new KAction( i18n( "&New Distribution List..." ), "kontact_contacts", 0, this,
- SLOT( slotNewDistributionList() ), actionCollection(), "new_distributionlist" ) );
+ TQT_SLOT( slotNewDistributionList() ), actionCollection(), "new_distributionlist" ) );
insertSyncAction( new KAction( i18n( "Synchronize Contacts" ), "reload",
- 0, this, SLOT( slotSyncContacts() ), actionCollection(),
+ 0, this, TQT_SLOT( slotSyncContacts() ), actionCollection(),
"kaddressbook_sync" ) );
mUniqueAppWatcher = new Kontact::UniqueAppWatcher(
new Kontact::UniqueAppHandlerFactory<KABUniqueAppHandler>(), this );
@@ -86,16 +86,16 @@ KParts::ReadOnlyPart* KAddressbookPlugin::createPart()
return part;
}
-QStringList KAddressbookPlugin::configModules() const
+TQStringList KAddressbookPlugin::configModules() const
{
- QStringList modules;
+ TQStringList modules;
modules << "PIM/kabconfig.desktop" << "PIM/kabldapconfig.desktop";
return modules;
}
-QStringList KAddressbookPlugin::invisibleToolbarActions() const
+TQStringList KAddressbookPlugin::invisibleToolbarActions() const
{
- return QStringList( "file_new_contact" );
+ return TQStringList( "file_new_contact" );
}
KAddressBookIface_stub *KAddressbookPlugin::interface()
@@ -121,10 +121,10 @@ void KAddressbookPlugin::slotNewDistributionList()
void KAddressbookPlugin::slotSyncContacts()
{
DCOPRef ref( "kmail", "KMailICalIface" );
- ref.send( "triggerSync", QString("Contact") );
+ ref.send( "triggerSync", TQString("Contact") );
}
-bool KAddressbookPlugin::createDCOPInterface( const QString& serviceType )
+bool KAddressbookPlugin::createDCOPInterface( const TQString& serviceType )
{
if ( serviceType == "DCOP/AddressBook" ) {
Q_ASSERT( mStub );
@@ -143,15 +143,15 @@ bool KAddressbookPlugin::isRunningStandalone()
return mUniqueAppWatcher->isRunningStandalone();
}
-bool KAddressbookPlugin::canDecodeDrag( QMimeSource *mimeSource )
+bool KAddressbookPlugin::canDecodeDrag( TQMimeSource *mimeSource )
{
- return QTextDrag::canDecode( mimeSource ) ||
+ return TQTextDrag::canDecode( mimeSource ) ||
KPIM::MailListDrag::canDecode( mimeSource );
}
#include <dcopref.h>
-void KAddressbookPlugin::processDropEvent( QDropEvent *event )
+void KAddressbookPlugin::processDropEvent( TQDropEvent *event )
{
KPIM::MailList mails;
if ( KPIM::MailListDrag::decode( event, mails ) ) {
@@ -162,7 +162,7 @@ void KAddressbookPlugin::processDropEvent( QDropEvent *event )
KPIM::MailSummary mail = mails.first();
KMailIface_stub kmailIface( "kmail", "KMailIface" );
- QString sFrom = kmailIface.getFrom( mail.serialNumber() );
+ TQString sFrom = kmailIface.getFrom( mail.serialNumber() );
if ( !sFrom.isEmpty() ) {
KAddrBookExternal::addEmail( sFrom, core() );
@@ -176,13 +176,13 @@ void KAddressbookPlugin::processDropEvent( QDropEvent *event )
}
-void KAddressbookPlugin::loadProfile( const QString& directory )
+void KAddressbookPlugin::loadProfile( const TQString& directory )
{
DCOPRef ref( "kaddressbook", "KAddressBookIface" );
ref.send( "loadProfile", directory );
}
-void KAddressbookPlugin::saveToProfile( const QString& directory ) const
+void KAddressbookPlugin::saveToProfile( const TQString& directory ) const
{
DCOPRef ref( "kaddressbook", "KAddressBookIface" );
ref.send( "saveToProfile", directory );
diff --git a/kontact/plugins/kaddressbook/kaddressbook_plugin.h b/kontact/plugins/kaddressbook/kaddressbook_plugin.h
index f66d44aaf..85107d0be 100644
--- a/kontact/plugins/kaddressbook/kaddressbook_plugin.h
+++ b/kontact/plugins/kaddressbook/kaddressbook_plugin.h
@@ -47,29 +47,29 @@ class KAddressbookPlugin : public Kontact::Plugin
Q_OBJECT
public:
- KAddressbookPlugin( Kontact::Core *core, const char *name, const QStringList& );
+ KAddressbookPlugin( Kontact::Core *core, const char *name, const TQStringList& );
~KAddressbookPlugin();
- virtual bool createDCOPInterface( const QString &serviceType );
+ virtual bool createDCOPInterface( const TQString &serviceType );
virtual bool isRunningStandalone();
int weight() const { return 300; }
- bool canDecodeDrag( QMimeSource * );
- void processDropEvent( QDropEvent * );
+ bool canDecodeDrag( TQMimeSource * );
+ void processDropEvent( TQDropEvent * );
- virtual QStringList configModules() const;
+ virtual TQStringList configModules() const;
- virtual QStringList invisibleToolbarActions() const;
+ virtual TQStringList invisibleToolbarActions() const;
virtual void configUpdated();
KAddressBookIface_stub *interface();
//override
- void loadProfile( const QString& directory );
+ void loadProfile( const TQString& directory );
//override
- void saveToProfile( const QString& directory ) const;
+ void saveToProfile( const TQString& directory ) const;
protected:
KParts::ReadOnlyPart *createPart();
diff --git a/kontact/plugins/karm/karm_plugin.cpp b/kontact/plugins/karm/karm_plugin.cpp
index a3a9d277d..c79bdab2c 100644
--- a/kontact/plugins/karm/karm_plugin.cpp
+++ b/kontact/plugins/karm/karm_plugin.cpp
@@ -36,13 +36,13 @@ typedef KGenericFactory<KarmPlugin, Kontact::Core> KarmPluginFactory;
K_EXPORT_COMPONENT_FACTORY( libkontact_karm,
KarmPluginFactory( "kontact_karm" ) )
-KarmPlugin::KarmPlugin( Kontact::Core *core, const char *, const QStringList& )
+KarmPlugin::KarmPlugin( Kontact::Core *core, const char *, const TQStringList& )
: Kontact::Plugin( core, core, "KArm" )
{
setInstance( KarmPluginFactory::instance() );
(void)dcopClient();
insertNewAction( new KAction( i18n( "New Task" ), "karm",
- CTRL+SHIFT+Key_W, this, SLOT( newTask() ), actionCollection(),
+ CTRL+SHIFT+Key_W, this, TQT_SLOT( newTask() ), actionCollection(),
"new_task" ) );
}
diff --git a/kontact/plugins/karm/karm_plugin.h b/kontact/plugins/karm/karm_plugin.h
index c5ef3e289..f4cb04bdc 100644
--- a/kontact/plugins/karm/karm_plugin.h
+++ b/kontact/plugins/karm/karm_plugin.h
@@ -40,7 +40,7 @@ class KarmPlugin : public Kontact::Plugin
public:
KarmPlugin( Kontact::Core *core, const char *name,
- const QStringList & );
+ const TQStringList & );
~KarmPlugin();
int weight() const { return 700; }
diff --git a/kontact/plugins/kitchensync/kitchensync_plugin.cpp b/kontact/plugins/kitchensync/kitchensync_plugin.cpp
index 4de6cf8da..343d724b0 100644
--- a/kontact/plugins/kitchensync/kitchensync_plugin.cpp
+++ b/kontact/plugins/kitchensync/kitchensync_plugin.cpp
@@ -22,7 +22,7 @@
without including the source code for Qt in the source distribution.
*/
-#include <qwidget.h>
+#include <tqwidget.h>
#include <kaboutdata.h>
#include <kaction.h>
@@ -42,7 +42,7 @@ typedef KGenericFactory< KitchenSyncPlugin, Kontact::Core > KitchenSyncPluginFac
K_EXPORT_COMPONENT_FACTORY( libkontact_kitchensync,
KitchenSyncPluginFactory( "kontact_kitchensync" ) )
-KitchenSyncPlugin::KitchenSyncPlugin( Kontact::Core *core, const char *, const QStringList& )
+KitchenSyncPlugin::KitchenSyncPlugin( Kontact::Core *core, const char *, const TQStringList& )
: Kontact::Plugin( core, core, "KitchenSync" )
{
setInstance( KitchenSyncPluginFactory::instance() );
@@ -57,9 +57,9 @@ KParts::ReadOnlyPart* KitchenSyncPlugin::createPart()
return loadPart();
}
-QStringList KitchenSyncPlugin::configModules() const
+TQStringList KitchenSyncPlugin::configModules() const
{
- QStringList modules;
+ TQStringList modules;
modules << "PIM/kitchensync.desktop";
return modules;
}
diff --git a/kontact/plugins/kitchensync/kitchensync_plugin.h b/kontact/plugins/kitchensync/kitchensync_plugin.h
index fafa12d71..f3b8c62a0 100644
--- a/kontact/plugins/kitchensync/kitchensync_plugin.h
+++ b/kontact/plugins/kitchensync/kitchensync_plugin.h
@@ -38,12 +38,12 @@ class KitchenSyncPlugin : public Kontact::Plugin
public:
KitchenSyncPlugin( Kontact::Core *core, const char *name,
- const QStringList & );
+ const TQStringList & );
~KitchenSyncPlugin();
int weight() const { return 800; }
- virtual QStringList configModules() const;
+ virtual TQStringList configModules() const;
protected:
KParts::ReadOnlyPart *createPart();
};
diff --git a/kontact/plugins/kmail/kcmkmailsummary.cpp b/kontact/plugins/kmail/kcmkmailsummary.cpp
index 02627c0fe..656ffe4e9 100644
--- a/kontact/plugins/kmail/kcmkmailsummary.cpp
+++ b/kontact/plugins/kmail/kcmkmailsummary.cpp
@@ -21,8 +21,8 @@
without including the source code for Qt in the source distribution.
*/
-#include <qcheckbox.h>
-#include <qlayout.h>
+#include <tqcheckbox.h>
+#include <tqlayout.h>
#include <dcopref.h>
@@ -41,19 +41,19 @@
extern "C"
{
- KDE_EXPORT KCModule *create_kmailsummary( QWidget *parent, const char * )
+ KDE_EXPORT KCModule *create_kmailsummary( TQWidget *parent, const char * )
{
return new KCMKMailSummary( parent, "kcmkmailsummary" );
}
}
-KCMKMailSummary::KCMKMailSummary( QWidget *parent, const char *name )
+KCMKMailSummary::KCMKMailSummary( TQWidget *parent, const char *name )
: KCModule( parent, name )
{
initGUI();
- connect( mFolderView, SIGNAL( clicked( QListViewItem* ) ), SLOT( modified() ) );
- connect( mFullPath, SIGNAL( toggled( bool ) ), SLOT( modified() ) );
+ connect( mFolderView, TQT_SIGNAL( clicked( TQListViewItem* ) ), TQT_SLOT( modified() ) );
+ connect( mFullPath, TQT_SIGNAL( toggled( bool ) ), TQT_SLOT( modified() ) );
KAcceleratorManager::manage( this );
@@ -75,7 +75,7 @@ void KCMKMailSummary::modified()
void KCMKMailSummary::initGUI()
{
- QVBoxLayout *layout = new QVBoxLayout( this, 0, KDialog::spacingHint() );
+ TQVBoxLayout *layout = new TQVBoxLayout( this, 0, KDialog::spacingHint() );
mFolderView = new KListView( this );
mFolderView->setRootIsDecorated( true );
@@ -83,7 +83,7 @@ void KCMKMailSummary::initGUI()
mFolderView->addColumn( i18n( "Summary" ) );
- mFullPath = new QCheckBox( i18n( "Show full path for folders" ), this );
+ mFullPath = new TQCheckBox( i18n( "Show full path for folders" ), this );
layout->addWidget( mFolderView );
layout->addWidget( mFullPath );
@@ -93,32 +93,32 @@ void KCMKMailSummary::initFolders()
{
DCOPRef kmail( "kmail", "KMailIface" );
- QStringList folderList;
+ TQStringList folderList;
kmail.call( "folderList" ).get( folderList );
mFolderView->clear();
mFolderMap.clear();
- QStringList::Iterator it;
+ TQStringList::Iterator it;
for ( it = folderList.begin(); it != folderList.end(); ++it ) {
- QString displayName;
+ TQString displayName;
if ( (*it) == "/Local" )
displayName = i18n( "prefix for local folders", "Local" );
else {
- DCOPRef folderRef = kmail.call( "getFolder(QString)", *it );
+ DCOPRef folderRef = kmail.call( "getFolder(TQString)", *it );
folderRef.call( "displayName()" ).get( displayName );
}
if ( (*it).contains( '/' ) == 1 ) {
if ( mFolderMap.find( *it ) == mFolderMap.end() )
- mFolderMap.insert( *it, new QListViewItem( mFolderView,
+ mFolderMap.insert( *it, new TQListViewItem( mFolderView,
displayName ) );
} else {
const int pos = (*it).findRev( '/' );
- const QString parentFolder = (*it).left( pos );
+ const TQString parentFolder = (*it).left( pos );
mFolderMap.insert( *it,
- new QCheckListItem( mFolderMap[ parentFolder ],
+ new TQCheckListItem( mFolderMap[ parentFolder ],
displayName,
- QCheckListItem::CheckBox ) );
+ TQCheckListItem::CheckBox ) );
}
}
}
@@ -128,15 +128,15 @@ void KCMKMailSummary::loadFolders()
KConfig config( "kcmkmailsummaryrc" );
config.setGroup( "General" );
- QStringList folders;
+ TQStringList folders;
if ( !config.hasKey( "ActiveFolders" ) )
folders << "/Local/inbox";
else
folders = config.readListEntry( "ActiveFolders" );
- QMap<QString, QListViewItem*>::Iterator it;
+ TQMap<TQString, TQListViewItem*>::Iterator it;
for ( it = mFolderMap.begin(); it != mFolderMap.end(); ++it ) {
- if ( QCheckListItem *qli = dynamic_cast<QCheckListItem*>( it.data() ) ) {
+ if ( TQCheckListItem *qli = dynamic_cast<TQCheckListItem*>( it.data() ) ) {
if ( folders.contains( it.key() ) ) {
qli->setOn( true );
mFolderView->ensureItemVisible( it.data() );
@@ -153,11 +153,11 @@ void KCMKMailSummary::storeFolders()
KConfig config( "kcmkmailsummaryrc" );
config.setGroup( "General" );
- QStringList folders;
+ TQStringList folders;
- QMap<QString, QListViewItem*>::Iterator it;
+ TQMap<TQString, TQListViewItem*>::Iterator it;
for ( it = mFolderMap.begin(); it != mFolderMap.end(); ++it )
- if ( QCheckListItem *qli = dynamic_cast<QCheckListItem*>( it.data() ) )
+ if ( TQCheckListItem *qli = dynamic_cast<TQCheckListItem*>( it.data() ) )
if ( qli->isOn() )
folders.append( it.key() );
diff --git a/kontact/plugins/kmail/kcmkmailsummary.h b/kontact/plugins/kmail/kcmkmailsummary.h
index e2959dead..da43a0b26 100644
--- a/kontact/plugins/kmail/kcmkmailsummary.h
+++ b/kontact/plugins/kmail/kcmkmailsummary.h
@@ -24,7 +24,7 @@
#ifndef KCMKMAILSUMMARY_H
#define KCMKMAILSUMMARY_H
-#include <qvaluelist.h>
+#include <tqvaluelist.h>
#include <kcmodule.h>
@@ -38,7 +38,7 @@ class KCMKMailSummary : public KCModule
Q_OBJECT
public:
- KCMKMailSummary( QWidget *parent = 0, const char *name = 0 );
+ KCMKMailSummary( TQWidget *parent = 0, const char *name = 0 );
virtual void load();
virtual void save();
@@ -54,8 +54,8 @@ class KCMKMailSummary : public KCModule
void storeFolders();
KListView *mFolderView;
- QCheckBox *mFullPath;
- QMap<QString, QListViewItem*> mFolderMap;
+ TQCheckBox *mFullPath;
+ TQMap<TQString, TQListViewItem*> mFolderMap;
};
#endif
diff --git a/kontact/plugins/kmail/kmail_plugin.cpp b/kontact/plugins/kmail/kmail_plugin.cpp
index 3d9f45bec..5a8797472 100644
--- a/kontact/plugins/kmail/kmail_plugin.cpp
+++ b/kontact/plugins/kmail/kmail_plugin.cpp
@@ -21,7 +21,7 @@
without including the source code for Qt in the source distribution.
*/
-#include <qwidget.h>
+#include <tqwidget.h>
#include <kaction.h>
#include <kapplication.h>
@@ -55,35 +55,35 @@ typedef KGenericFactory<KMailPlugin, Kontact::Core> KMailPluginFactory;
K_EXPORT_COMPONENT_FACTORY( libkontact_kmailplugin,
KMailPluginFactory( "kontact_kmailplugin" ) )
-KMailPlugin::KMailPlugin(Kontact::Core *core, const char *, const QStringList& )
+KMailPlugin::KMailPlugin(Kontact::Core *core, const char *, const TQStringList& )
: Kontact::Plugin( core, core, "kmail" ),
mStub( 0 )
{
setInstance( KMailPluginFactory::instance() );
insertNewAction( new KAction( i18n( "New Message..." ), "mail_new",
- CTRL+SHIFT+Key_M, this, SLOT( slotNewMail() ), actionCollection(),
+ CTRL+SHIFT+Key_M, this, TQT_SLOT( slotNewMail() ), actionCollection(),
"new_mail" ) );
insertSyncAction( new KAction( i18n( "Synchronize Mail" ), "reload",
- 0, this, SLOT( slotSyncFolders() ), actionCollection(),
+ 0, this, TQT_SLOT( slotSyncFolders() ), actionCollection(),
"sync_mail" ) );
mUniqueAppWatcher = new Kontact::UniqueAppWatcher(
new Kontact::UniqueAppHandlerFactory<KMailUniqueAppHandler>(), this );
}
-bool KMailPlugin::canDecodeDrag( QMimeSource *qms )
+bool KMailPlugin::canDecodeDrag( TQMimeSource *qms )
{
return ( ICalDrag::canDecode( qms ) ||
VCalDrag::canDecode( qms ) ||
KVCardDrag::canDecode( qms ) );
}
-void KMailPlugin::processDropEvent( QDropEvent * de )
+void KMailPlugin::processDropEvent( TQDropEvent * de )
{
kdDebug() << k_funcinfo << endl;
- CalendarLocal cal( QString::fromLatin1("UTC") );
+ CalendarLocal cal( TQString::fromLatin1("UTC") );
KABC::Addressee::List list;
if ( VCalDrag::decode( de, &cal ) || ICalDrag::decode( de, &cal ) ) {
@@ -93,7 +93,7 @@ void KMailPlugin::processDropEvent( QDropEvent * de )
}
else if ( KVCardDrag::decode( de, list ) ) {
KABC::Addressee::List::Iterator it;
- QStringList to;
+ TQStringList to;
for ( it = list.begin(); it != list.end(); ++it ) {
to.append( ( *it ).fullEmail() );
}
@@ -114,7 +114,7 @@ void KMailPlugin::openComposer( const KURL& attach )
}
}
-void KMailPlugin::openComposer( const QString& to )
+void KMailPlugin::openComposer( const TQString& to )
{
(void) part(); // ensure part is loaded
Q_ASSERT( mStub );
@@ -125,7 +125,7 @@ void KMailPlugin::openComposer( const QString& to )
void KMailPlugin::slotNewMail()
{
- openComposer( QString::null );
+ openComposer( TQString::null );
}
void KMailPlugin::slotSyncFolders()
@@ -138,7 +138,7 @@ KMailPlugin::~KMailPlugin()
{
}
-bool KMailPlugin::createDCOPInterface( const QString& serviceType )
+bool KMailPlugin::createDCOPInterface( const TQString& serviceType )
{
if ( serviceType == "DCOP/ResourceBackend/IMAP" ) {
if ( part() )
@@ -148,9 +148,9 @@ bool KMailPlugin::createDCOPInterface( const QString& serviceType )
return false;
}
-QString KMailPlugin::tipFile() const
+TQString KMailPlugin::tipFile() const
{
- QString file = ::locate("data", "kmail/tips");
+ TQString file = ::locate("data", "kmail/tips");
return file;
}
@@ -164,9 +164,9 @@ KParts::ReadOnlyPart* KMailPlugin::createPart()
return part;
}
-QStringList KMailPlugin::invisibleToolbarActions() const
+TQStringList KMailPlugin::invisibleToolbarActions() const
{
- return QStringList( "new_message" );
+ return TQStringList( "new_message" );
}
bool KMailPlugin::isRunningStandalone()
@@ -174,7 +174,7 @@ bool KMailPlugin::isRunningStandalone()
return mUniqueAppWatcher->isRunningStandalone();
}
-Kontact::Summary *KMailPlugin::createSummaryWidget( QWidget *parent )
+Kontact::Summary *KMailPlugin::createSummaryWidget( TQWidget *parent )
{
return new SummaryWidget( this, parent );
}
@@ -208,12 +208,12 @@ bool KMailPlugin::queryClose() const {
return canClose;
}
-void KMailPlugin::loadProfile( const QString& profileDirectory ) {
+void KMailPlugin::loadProfile( const TQString& profileDirectory ) {
DCOPRef ref( "kmail", "KMailIface" );
ref.send( "loadProfile", profileDirectory );
}
-void KMailPlugin::saveToProfile( const QString& profileDirectory ) {
+void KMailPlugin::saveToProfile( const TQString& profileDirectory ) {
DCOPRef ref( "kmail", "KMailIface" );
ref.send( "saveToProfile", profileDirectory );
}
diff --git a/kontact/plugins/kmail/kmail_plugin.h b/kontact/plugins/kmail/kmail_plugin.h
index 0d6013867..73bb361b1 100644
--- a/kontact/plugins/kmail/kmail_plugin.h
+++ b/kontact/plugins/kmail/kmail_plugin.h
@@ -48,30 +48,30 @@ class KMailPlugin : public Kontact::Plugin
Q_OBJECT
public:
- KMailPlugin( Kontact::Core *core, const char *name, const QStringList& );
+ KMailPlugin( Kontact::Core *core, const char *name, const TQStringList& );
~KMailPlugin();
virtual bool isRunningStandalone();
- virtual bool createDCOPInterface( const QString& serviceType );
- virtual Kontact::Summary *createSummaryWidget( QWidget *parent );
- virtual QString tipFile() const;
+ virtual bool createDCOPInterface( const TQString& serviceType );
+ virtual Kontact::Summary *createSummaryWidget( TQWidget *parent );
+ virtual TQString tipFile() const;
int weight() const { return 200; }
- virtual QStringList invisibleToolbarActions() const;
+ virtual TQStringList invisibleToolbarActions() const;
virtual bool queryClose() const;
//override
- void loadProfile( const QString& profileDirectory );
+ void loadProfile( const TQString& profileDirectory );
//override
- void saveToProfile( const QString& profileDirectory );
+ void saveToProfile( const TQString& profileDirectory );
protected:
virtual KParts::ReadOnlyPart* createPart();
void openComposer( const KURL& = KURL() );
- void openComposer( const QString& to );
- bool canDecodeDrag( QMimeSource * );
- void processDropEvent( QDropEvent * );
+ void openComposer( const TQString& to );
+ bool canDecodeDrag( TQMimeSource * );
+ void processDropEvent( TQDropEvent * );
protected slots:
diff --git a/kontact/plugins/kmail/summarywidget.cpp b/kontact/plugins/kmail/summarywidget.cpp
index 79f2f4657..43c1e2cb7 100644
--- a/kontact/plugins/kmail/summarywidget.cpp
+++ b/kontact/plugins/kmail/summarywidget.cpp
@@ -22,8 +22,8 @@
without including the source code for Qt in the source distribution.
*/
-#include <qlabel.h>
-#include <qlayout.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
#include <dcopref.h>
#include <kapplication.h>
@@ -41,17 +41,17 @@
#include <time.h>
-SummaryWidget::SummaryWidget( Kontact::Plugin *plugin, QWidget *parent, const char *name )
+SummaryWidget::SummaryWidget( Kontact::Plugin *plugin, TQWidget *parent, const char *name )
: Kontact::Summary( parent, name ),
- DCOPObject( QCString("MailSummary") ),
+ DCOPObject( TQCString("MailSummary") ),
mPlugin( plugin )
{
- QVBoxLayout *mainLayout = new QVBoxLayout( this, 3, 3 );
+ TQVBoxLayout *mainLayout = new TQVBoxLayout( this, 3, 3 );
- QPixmap icon = KGlobal::iconLoader()->loadIcon( "kontact_mail", KIcon::Desktop,
+ TQPixmap icon = KGlobal::iconLoader()->loadIcon( "kontact_mail", KIcon::Desktop,
KIcon::SizeMedium );
- QWidget *header = createHeader(this, icon, i18n("E-Mail"));
- mLayout = new QGridLayout( 1, 3, 3 );
+ TQWidget *header = createHeader(this, icon, i18n("E-Mail"));
+ mLayout = new TQGridLayout( 1, 3, 3 );
mainLayout->addWidget(header);
mainLayout->addLayout(mLayout);
@@ -61,16 +61,16 @@ SummaryWidget::SummaryWidget( Kontact::Plugin *plugin, QWidget *parent, const ch
false );
}
-void SummaryWidget::selectFolder( const QString& folder )
+void SummaryWidget::selectFolder( const TQString& folder )
{
if ( mPlugin->isRunningStandalone() )
mPlugin->bringToForeground();
else
mPlugin->core()->selectPlugin( mPlugin );
- QByteArray data;
- QDataStream arg( data, IO_WriteOnly );
+ TQByteArray data;
+ TQDataStream arg( data, IO_WriteOnly );
arg << folder;
- emitDCOPSignal( "kmailSelectFolder(QString)", data );
+ emitDCOPSignal( "kmailSelectFolder(TQString)", data );
}
void SummaryWidget::updateSummary( bool )
@@ -88,7 +88,7 @@ void SummaryWidget::slotUnreadCountChanged()
DCOPRef kmail( "kmail", "KMailIface" );
DCOPReply reply = kmail.call( "folderList" );
if ( reply.isValid() ) {
- QStringList folderList = reply;
+ TQStringList folderList = reply;
updateFolderList( folderList );
}
else {
@@ -98,7 +98,7 @@ void SummaryWidget::slotUnreadCountChanged()
mTimeOfLastMessageCountUpdate = ::time( 0 );
}
-void SummaryWidget::updateFolderList( const QStringList& folders )
+void SummaryWidget::updateFolderList( const TQStringList& folders )
{
mLabels.setAutoDelete( true );
mLabels.clear();
@@ -107,24 +107,24 @@ void SummaryWidget::updateFolderList( const QStringList& folders )
KConfig config( "kcmkmailsummaryrc" );
config.setGroup( "General" );
- QStringList activeFolders;
+ TQStringList activeFolders;
if ( !config.hasKey( "ActiveFolders" ) )
activeFolders << "/Local/inbox";
else
activeFolders = config.readListEntry( "ActiveFolders" );
int counter = 0;
- QStringList::ConstIterator it;
+ TQStringList::ConstIterator it;
DCOPRef kmail( "kmail", "KMailIface" );
for ( it = folders.begin(); it != folders.end(); ++it ) {
if ( activeFolders.contains( *it ) ) {
- DCOPRef folderRef = kmail.call( "getFolder(QString)", *it );
+ DCOPRef folderRef = kmail.call( "getFolder(TQString)", *it );
const int numMsg = folderRef.call( "messages()" );
const int numUnreadMsg = folderRef.call( "unreadMessages()" );
if ( numUnreadMsg == 0 ) continue;
- QString folderPath;
+ TQString folderPath;
if ( config.readBoolEntry( "ShowFullPath", true ) )
folderRef.call( "displayPath()" ).get( folderPath );
else
@@ -134,13 +134,13 @@ void SummaryWidget::updateFolderList( const QStringList& folders )
urlLabel->installEventFilter( this );
urlLabel->setAlignment( AlignLeft );
urlLabel->show();
- connect( urlLabel, SIGNAL( leftClickedURL( const QString& ) ),
- SLOT( selectFolder( const QString& ) ) );
+ connect( urlLabel, TQT_SIGNAL( leftClickedURL( const TQString& ) ),
+ TQT_SLOT( selectFolder( const TQString& ) ) );
mLayout->addWidget( urlLabel, counter, 0 );
mLabels.append( urlLabel );
- QLabel *label =
- new QLabel( QString( i18n("%1: number of unread messages "
+ TQLabel *label =
+ new TQLabel( TQString( i18n("%1: number of unread messages "
"%2: total number of messages", "%1 / %2") )
.arg( numUnreadMsg ).arg( numMsg ), this );
label->setAlignment( AlignLeft );
@@ -153,7 +153,7 @@ void SummaryWidget::updateFolderList( const QStringList& folders )
}
if ( counter == 0 ) {
- QLabel *label = new QLabel( i18n( "No unread messages in your monitored folders" ), this );
+ TQLabel *label = new TQLabel( i18n( "No unread messages in your monitored folders" ), this );
label->setAlignment( AlignHCenter | AlignVCenter );
mLayout->addMultiCellWidget( label, 0, 0, 0, 2 );
label->show();
@@ -161,22 +161,22 @@ void SummaryWidget::updateFolderList( const QStringList& folders )
}
}
-bool SummaryWidget::eventFilter( QObject *obj, QEvent* e )
+bool SummaryWidget::eventFilter( TQObject *obj, TQEvent* e )
{
if ( obj->inherits( "KURLLabel" ) ) {
KURLLabel* label = static_cast<KURLLabel*>( obj );
- if ( e->type() == QEvent::Enter )
+ if ( e->type() == TQEvent::Enter )
emit message( i18n( "Open Folder: \"%1\"" ).arg( label->text() ) );
- if ( e->type() == QEvent::Leave )
- emit message( QString::null );
+ if ( e->type() == TQEvent::Leave )
+ emit message( TQString::null );
}
return Kontact::Summary::eventFilter( obj, e );
}
-QStringList SummaryWidget::configModules() const
+TQStringList SummaryWidget::configModules() const
{
- return QStringList( "kcmkmailsummary.desktop" );
+ return TQStringList( "kcmkmailsummary.desktop" );
}
#include "summarywidget.moc"
diff --git a/kontact/plugins/kmail/summarywidget.h b/kontact/plugins/kmail/summarywidget.h
index 563a021e1..dc058e452 100644
--- a/kontact/plugins/kmail/summarywidget.h
+++ b/kontact/plugins/kmail/summarywidget.h
@@ -24,9 +24,9 @@
#ifndef SUMMARYWIDGET_H
#define SUMMARYWIDGET_H
-#include <qmap.h>
-#include <qtimer.h>
-#include <qwidget.h>
+#include <tqmap.h>
+#include <tqtimer.h>
+#include <tqwidget.h>
#include <dcopobject.h>
#include <kurllabel.h>
@@ -44,28 +44,28 @@ class SummaryWidget : public Kontact::Summary, public DCOPObject
K_DCOP
public:
- SummaryWidget( Kontact::Plugin *plugin, QWidget *parent, const char *name = 0 );
+ SummaryWidget( Kontact::Plugin *plugin, TQWidget *parent, const char *name = 0 );
int summaryHeight() const { return 1; }
- QStringList configModules() const;
+ TQStringList configModules() const;
k_dcop_hidden:
void slotUnreadCountChanged();
protected:
- virtual bool eventFilter( QObject *obj, QEvent* e );
+ virtual bool eventFilter( TQObject *obj, TQEvent* e );
public slots:
virtual void updateSummary( bool force );
private slots:
- void selectFolder( const QString& );
+ void selectFolder( const TQString& );
private:
- void updateFolderList( const QStringList& folders );
+ void updateFolderList( const TQStringList& folders );
- QPtrList<QLabel> mLabels;
- QGridLayout *mLayout;
+ TQPtrList<TQLabel> mLabels;
+ TQGridLayout *mLayout;
Kontact::Plugin *mPlugin;
int mTimeOfLastMessageCountUpdate;
};
diff --git a/kontact/plugins/knode/knode_plugin.cpp b/kontact/plugins/knode/knode_plugin.cpp
index 6ad7fedb1..131c8bdf4 100644
--- a/kontact/plugins/knode/knode_plugin.cpp
+++ b/kontact/plugins/knode/knode_plugin.cpp
@@ -36,7 +36,7 @@
#include <dcopclient.h>
-#include <qwidget.h>
+#include <tqwidget.h>
typedef KGenericFactory<KNodePlugin, Kontact::Core> KNodePluginFactory;
@@ -44,13 +44,13 @@ K_EXPORT_COMPONENT_FACTORY( libkontact_knodeplugin,
KNodePluginFactory( "kontact_knodeplugin" ) )
-KNodePlugin::KNodePlugin( Kontact::Core *core, const char *, const QStringList& )
+KNodePlugin::KNodePlugin( Kontact::Core *core, const char *, const TQStringList& )
: Kontact::Plugin( core, core, "knode" ), mStub(0)
{
setInstance( KNodePluginFactory::instance() );
insertNewAction( new KAction( i18n( "New Article..." ), "mail_new", CTRL+SHIFT+Key_A,
- this, SLOT( slotPostArticle() ), actionCollection(), "post_article" ) );
+ this, TQT_SLOT( slotPostArticle() ), actionCollection(), "post_article" ) );
mUniqueAppWatcher = new Kontact::UniqueAppWatcher(
new Kontact::UniqueAppHandlerFactory<KNodeUniqueAppHandler>(), this );
@@ -60,7 +60,7 @@ KNodePlugin::~KNodePlugin()
{
}
-bool KNodePlugin::createDCOPInterface( const QString& /*serviceType*/ )
+bool KNodePlugin::createDCOPInterface( const TQString& /*serviceType*/ )
{
return false;
}
@@ -70,9 +70,9 @@ bool KNodePlugin::isRunningStandalone()
return mUniqueAppWatcher->isRunningStandalone();
}
-QStringList KNodePlugin::invisibleToolbarActions() const
+TQStringList KNodePlugin::invisibleToolbarActions() const
{
- return QStringList( "article_postNew" );
+ return TQStringList( "article_postNew" );
}
void KNodePlugin::slotPostArticle()
diff --git a/kontact/plugins/knode/knode_plugin.h b/kontact/plugins/knode/knode_plugin.h
index 78d4275ed..3701dc7ba 100644
--- a/kontact/plugins/knode/knode_plugin.h
+++ b/kontact/plugins/knode/knode_plugin.h
@@ -45,14 +45,14 @@ class KNodePlugin : public Kontact::Plugin
Q_OBJECT
public:
- KNodePlugin( Kontact::Core *core, const char *name, const QStringList& );
+ KNodePlugin( Kontact::Core *core, const char *name, const TQStringList& );
~KNodePlugin();
- virtual bool createDCOPInterface( const QString& serviceType );
+ virtual bool createDCOPInterface( const TQString& serviceType );
virtual bool isRunningStandalone();
int weight() const { return 500; }
- virtual QStringList invisibleToolbarActions() const;
+ virtual TQStringList invisibleToolbarActions() const;
protected:
virtual KParts::ReadOnlyPart* createPart();
diff --git a/kontact/plugins/knotes/knotes_part.cpp b/kontact/plugins/knotes/knotes_part.cpp
index 5bd160d1d..4702eb2d2 100644
--- a/kontact/plugins/knotes/knotes_part.cpp
+++ b/kontact/plugins/knotes/knotes_part.cpp
@@ -19,8 +19,8 @@
Boston, MA 02110-1301, USA.
*/
-#include <qpopupmenu.h>
-#include <qclipboard.h>
+#include <tqpopupmenu.h>
+#include <tqclipboard.h>
#include <kapplication.h>
#include <kdebug.h>
@@ -38,7 +38,7 @@
#include "knotetip.h"
-KNotesPart::KNotesPart( QObject *parent, const char *name )
+KNotesPart::KNotesPart( TQObject *parent, const char *name )
: DCOPObject( "KNotesIface" ), KParts::ReadOnlyPart( parent, name ),
mNotesView( new KNotesIconView() ),
mNoteTip( new KNoteTip( mNotesView ) ),
@@ -50,38 +50,38 @@ KNotesPart::KNotesPart( QObject *parent, const char *name )
setInstance( new KInstance( "knotes" ) );
// create the actions
- new KAction( i18n( "&New" ), "knotes", CTRL+Key_N, this, SLOT( newNote() ),
+ new KAction( i18n( "&New" ), "knotes", CTRL+Key_N, this, TQT_SLOT( newNote() ),
actionCollection(), "file_new" );
- new KAction( i18n( "Rename..." ), "text", this, SLOT( renameNote() ),
+ new KAction( i18n( "Rename..." ), "text", this, TQT_SLOT( renameNote() ),
actionCollection(), "edit_rename" );
- new KAction( i18n( "Delete" ), "editdelete", Key_Delete, this, SLOT( killSelectedNotes() ),
+ new KAction( i18n( "Delete" ), "editdelete", Key_Delete, this, TQT_SLOT( killSelectedNotes() ),
actionCollection(), "edit_delete" );
- new KAction( i18n( "Print Selected Notes..." ), "print", CTRL+Key_P, this, SLOT( printSelectedNotes() ),
+ new KAction( i18n( "Print Selected Notes..." ), "print", CTRL+Key_P, this, TQT_SLOT( printSelectedNotes() ),
actionCollection(), "print_note" );
// TODO icons: s/editdelete/knotes_delete/ or the other way round in knotes
// set the view up
- mNotesView->setSelectionMode( QIconView::Extended );
+ mNotesView->setSelectionMode( TQIconView::Extended );
mNotesView->setItemsMovable( false );
- mNotesView->setResizeMode( QIconView::Adjust );
+ mNotesView->setResizeMode( TQIconView::Adjust );
mNotesView->setAutoArrange( true );
mNotesView->setSorting( true );
- connect( mNotesView, SIGNAL( executed( QIconViewItem* ) ),
- this, SLOT( editNote( QIconViewItem* ) ) );
- connect( mNotesView, SIGNAL( returnPressed( QIconViewItem* ) ),
- this, SLOT( editNote( QIconViewItem* ) ) );
- connect( mNotesView, SIGNAL( itemRenamed( QIconViewItem* ) ),
- this, SLOT( renamedNote( QIconViewItem* ) ) );
- connect( mNotesView, SIGNAL( contextMenuRequested( QIconViewItem*, const QPoint& ) ),
- this, SLOT( popupRMB( QIconViewItem*, const QPoint& ) ) );
- connect( mNotesView, SIGNAL( onItem( QIconViewItem* ) ),
- this, SLOT( slotOnItem( QIconViewItem* ) ) );
- connect( mNotesView, SIGNAL( onViewport() ),
- this, SLOT( slotOnViewport() ) );
- connect( mNotesView, SIGNAL( currentChanged( QIconViewItem* ) ),
- this, SLOT( slotOnCurrentChanged( QIconViewItem* ) ) );
+ connect( mNotesView, TQT_SIGNAL( executed( TQIconViewItem* ) ),
+ this, TQT_SLOT( editNote( TQIconViewItem* ) ) );
+ connect( mNotesView, TQT_SIGNAL( returnPressed( TQIconViewItem* ) ),
+ this, TQT_SLOT( editNote( TQIconViewItem* ) ) );
+ connect( mNotesView, TQT_SIGNAL( itemRenamed( TQIconViewItem* ) ),
+ this, TQT_SLOT( renamedNote( TQIconViewItem* ) ) );
+ connect( mNotesView, TQT_SIGNAL( contextMenuRequested( TQIconViewItem*, const TQPoint& ) ),
+ this, TQT_SLOT( popupRMB( TQIconViewItem*, const TQPoint& ) ) );
+ connect( mNotesView, TQT_SIGNAL( onItem( TQIconViewItem* ) ),
+ this, TQT_SLOT( slotOnItem( TQIconViewItem* ) ) );
+ connect( mNotesView, TQT_SIGNAL( onViewport() ),
+ this, TQT_SLOT( slotOnViewport() ) );
+ connect( mNotesView, TQT_SIGNAL( currentChanged( TQIconViewItem* ) ),
+ this, TQT_SLOT( slotOnCurrentChanged( TQIconViewItem* ) ) );
slotOnCurrentChanged( 0 );
@@ -91,10 +91,10 @@ KNotesPart::KNotesPart( QObject *parent, const char *name )
setXMLFile( "knotes_part.rc" );
// connect the resource manager
- connect( mManager, SIGNAL( sigRegisteredNote( KCal::Journal* ) ),
- this, SLOT( createNote( KCal::Journal* ) ) );
- connect( mManager, SIGNAL( sigDeregisteredNote( KCal::Journal* ) ),
- this, SLOT( killNote( KCal::Journal* ) ) );
+ connect( mManager, TQT_SIGNAL( sigRegisteredNote( KCal::Journal* ) ),
+ this, TQT_SLOT( createNote( KCal::Journal* ) ) );
+ connect( mManager, TQT_SIGNAL( sigDeregisteredNote( KCal::Journal* ) ),
+ this, TQT_SLOT( killNote( KCal::Journal* ) ) );
// read the notes
mManager->load();
@@ -111,9 +111,9 @@ KNotesPart::~KNotesPart()
void KNotesPart::printSelectedNotes()
{
- QValueList<KCal::Journal*> journals;
+ TQValueList<KCal::Journal*> journals;
- for ( QIconViewItem *it = mNotesView->firstItem(); it; it = it->nextItem() ) {
+ for ( TQIconViewItem *it = mNotesView->firstItem(); it; it = it->nextItem() ) {
if ( it->isSelected() ) {
journals.append( static_cast<KNotesIconViewItem *>( it )->journal() );
}
@@ -128,9 +128,9 @@ void KNotesPart::printSelectedNotes()
printer.printNotes(journals );
#if 0
- QString content;
+ TQString content;
if ( m_editor->textFormat() == PlainText )
- content = QStyleSheet::convertFromPlainText( m_editor->text() );
+ content = TQStyleSheet::convertFromPlainText( m_editor->text() );
else
content = m_editor->text();
@@ -152,7 +152,7 @@ bool KNotesPart::openFile()
// public KNotes DCOP interface implementation
-QString KNotesPart::newNote( const QString& name, const QString& text )
+TQString KNotesPart::newNote( const TQString& name, const TQString& text )
{
// create the new note
KCal::Journal *journal = new KCal::Journal();
@@ -161,7 +161,7 @@ QString KNotesPart::newNote( const QString& name, const QString& text )
if ( !name.isEmpty() )
journal->setSummary( name );
else
- journal->setSummary( KGlobal::locale()->formatDateTime( QDateTime::currentDateTime() ) );
+ journal->setSummary( KGlobal::locale()->formatDateTime( TQDateTime::currentDateTime() ) );
// the body of the note
journal->setDescription( text );
@@ -177,7 +177,7 @@ QString KNotesPart::newNote( const QString& name, const QString& text )
mNoteEditDlg->setTitle( journal->summary() );
mNoteEditDlg->setText( journal->description() );
- if ( mNoteEditDlg->exec() == QDialog::Accepted )
+ if ( mNoteEditDlg->exec() == TQDialog::Accepted )
{
journal->setSummary( mNoteEditDlg->title() );
journal->setDescription( mNoteEditDlg->text() );
@@ -199,18 +199,18 @@ QString KNotesPart::newNote( const QString& name, const QString& text )
return journal->uid();
}
-QString KNotesPart::newNoteFromClipboard( const QString& name )
+TQString KNotesPart::newNoteFromClipboard( const TQString& name )
{
- const QString& text = KApplication::clipboard()->text();
+ const TQString& text = KApplication::clipboard()->text();
return newNote( name, text );
}
-void KNotesPart::killNote( const QString& id )
+void KNotesPart::killNote( const TQString& id )
{
killNote( id, false );
}
-void KNotesPart::killNote( const QString& id, bool force )
+void KNotesPart::killNote( const TQString& id, bool force )
{
KNotesIconViewItem *note = mNoteList[ id ];
@@ -227,25 +227,25 @@ void KNotesPart::killNote( const QString& id, bool force )
}
}
-QString KNotesPart::name( const QString& id ) const
+TQString KNotesPart::name( const TQString& id ) const
{
KNotesIconViewItem *note = mNoteList[ id ];
if ( note )
return note->text();
else
- return QString::null;
+ return TQString::null;
}
-QString KNotesPart::text( const QString& id ) const
+TQString KNotesPart::text( const TQString& id ) const
{
KNotesIconViewItem *note = mNoteList[id];
if ( note )
return note->journal()->description();
else
- return QString::null;
+ return TQString::null;
}
-void KNotesPart::setName( const QString& id, const QString& newName )
+void KNotesPart::setName( const TQString& id, const TQString& newName )
{
KNotesIconViewItem *note = mNoteList[ id ];
if ( note ) {
@@ -254,7 +254,7 @@ void KNotesPart::setName( const QString& id, const QString& newName )
}
}
-void KNotesPart::setText( const QString& id, const QString& newText )
+void KNotesPart::setText( const TQString& id, const TQString& newText )
{
KNotesIconViewItem *note = mNoteList[ id ];
if ( note ) {
@@ -263,10 +263,10 @@ void KNotesPart::setText( const QString& id, const QString& newText )
}
}
-QMap<QString, QString> KNotesPart::notes() const
+TQMap<TQString, TQString> KNotesPart::notes() const
{
- QMap<QString, QString> notes;
- QDictIterator<KNotesIconViewItem> it( mNoteList );
+ TQMap<TQString, TQString> notes;
+ TQDictIterator<KNotesIconViewItem> it( mNoteList );
for ( ; it.current(); ++it )
notes.insert( (*it)->journal()->uid(), (*it)->journal()->summary() );
@@ -279,11 +279,11 @@ QMap<QString, QString> KNotesPart::notes() const
void KNotesPart::killSelectedNotes()
{
- QPtrList<KNotesIconViewItem> items;
- QStringList notes;
+ TQPtrList<KNotesIconViewItem> items;
+ TQStringList notes;
KNotesIconViewItem *knivi;
- for ( QIconViewItem *it = mNotesView->firstItem(); it; it = it->nextItem() ) {
+ for ( TQIconViewItem *it = mNotesView->firstItem(); it; it = it->nextItem() ) {
if ( it->isSelected() ) {
knivi = static_cast<KNotesIconViewItem *>( it );
items.append( knivi );
@@ -301,7 +301,7 @@ void KNotesPart::killSelectedNotes()
KStdGuiItem::del() );
if ( ret == KMessageBox::Continue ) {
- QPtrListIterator<KNotesIconViewItem> kniviIt( items );
+ TQPtrListIterator<KNotesIconViewItem> kniviIt( items );
while ( (knivi = *kniviIt) ) {
++kniviIt;
mManager->deleteNote( knivi->journal() );
@@ -311,14 +311,14 @@ void KNotesPart::killSelectedNotes()
}
}
-void KNotesPart::popupRMB( QIconViewItem *item, const QPoint& pos )
+void KNotesPart::popupRMB( TQIconViewItem *item, const TQPoint& pos )
{
- QPopupMenu *contextMenu = NULL;
+ TQPopupMenu *contextMenu = NULL;
if ( item )
- contextMenu = static_cast<QPopupMenu *>( factory()->container( "note_context", this ) );
+ contextMenu = static_cast<TQPopupMenu *>( factory()->container( "note_context", this ) );
else
- contextMenu = static_cast<QPopupMenu *>( factory()->container( "notepart_context", this ) );
+ contextMenu = static_cast<TQPopupMenu *>( factory()->container( "notepart_context", this ) );
if ( !contextMenu )
return;
@@ -326,9 +326,9 @@ void KNotesPart::popupRMB( QIconViewItem *item, const QPoint& pos )
contextMenu->popup( pos );
}
-void KNotesPart::slotOnItem( QIconViewItem *i )
+void KNotesPart::slotOnItem( TQIconViewItem *i )
{
- // TODO: disable (i.e. setNote( QString::null )) when mouse button pressed
+ // TODO: disable (i.e. setNote( TQString::null )) when mouse button pressed
KNotesIconViewItem *item = static_cast<KNotesIconViewItem *>( i );
mNoteTip->setNote( item );
@@ -346,7 +346,7 @@ void KNotesPart::slotOnViewport()
void KNotesPart::createNote( KCal::Journal *journal )
{
// make sure all fields are existent, initialize them with default values
- QString property = journal->customProperty( "KNotes", "BgColor" );
+ TQString property = journal->customProperty( "KNotes", "BgColor" );
if ( property.isNull() )
journal->setCustomProperty( "KNotes", "BgColor", "#ffff00" );
@@ -366,7 +366,7 @@ void KNotesPart::killNote( KCal::Journal *journal )
mNoteList.remove( journal->uid() );
}
-void KNotesPart::editNote( QIconViewItem *item )
+void KNotesPart::editNote( TQIconViewItem *item )
{
if ( !mNoteEditDlg )
mNoteEditDlg = new KNoteEditDlg( widget() );
@@ -377,7 +377,7 @@ void KNotesPart::editNote( QIconViewItem *item )
mNoteEditDlg->setTitle( journal->summary() );
mNoteEditDlg->setText( journal->description() );
- if ( mNoteEditDlg->exec() == QDialog::Accepted ) {
+ if ( mNoteEditDlg->exec() == TQDialog::Accepted ) {
item->setText( mNoteEditDlg->title() );
journal->setDescription( mNoteEditDlg->text() );
mManager->save();
@@ -389,12 +389,12 @@ void KNotesPart::renameNote()
mNotesView->currentItem()->rename();
}
-void KNotesPart::renamedNote( QIconViewItem* )
+void KNotesPart::renamedNote( TQIconViewItem* )
{
mManager->save();
}
-void KNotesPart::slotOnCurrentChanged( QIconViewItem* )
+void KNotesPart::slotOnCurrentChanged( TQIconViewItem* )
{
KAction *renameAction = actionCollection()->action( "edit_rename" );
KAction *deleteAction = actionCollection()->action( "edit_delete" );
diff --git a/kontact/plugins/knotes/knotes_part.h b/kontact/plugins/knotes/knotes_part.h
index c034d04fb..b737ddf83 100644
--- a/kontact/plugins/knotes/knotes_part.h
+++ b/kontact/plugins/knotes/knotes_part.h
@@ -22,7 +22,7 @@
#ifndef KNOTES_PART_H
#define KNOTES_PART_H
-#include <qdict.h>
+#include <tqdict.h>
#include <kiconview.h>
#include <kglobal.h>
@@ -49,42 +49,42 @@ class KNotesPart : public KParts::ReadOnlyPart, virtual public KNotesIface
Q_OBJECT
public:
- KNotesPart( QObject *parent = 0, const char *name = 0 );
+ KNotesPart( TQObject *parent = 0, const char *name = 0 );
~KNotesPart();
bool openFile();
public slots:
- QString newNote( const QString& name = QString::null,
- const QString& text = QString::null );
- QString newNoteFromClipboard( const QString& name = QString::null );
+ TQString newNote( const TQString& name = TQString::null,
+ const TQString& text = TQString::null );
+ TQString newNoteFromClipboard( const TQString& name = TQString::null );
public:
- void killNote( const QString& id );
- void killNote( const QString& id, bool force );
+ void killNote( const TQString& id );
+ void killNote( const TQString& id, bool force );
- QString name( const QString& id ) const;
- QString text( const QString& id ) const;
+ TQString name( const TQString& id ) const;
+ TQString text( const TQString& id ) const;
- void setName( const QString& id, const QString& newName );
- void setText( const QString& id, const QString& newText );
+ void setName( const TQString& id, const TQString& newName );
+ void setText( const TQString& id, const TQString& newText );
- QMap<QString, QString> notes() const;
+ TQMap<TQString, TQString> notes() const;
private slots:
void createNote( KCal::Journal *journal );
void killNote( KCal::Journal *journal );
- void editNote( QIconViewItem *item );
+ void editNote( TQIconViewItem *item );
void renameNote();
- void renamedNote( QIconViewItem *item );
+ void renamedNote( TQIconViewItem *item );
- void slotOnItem( QIconViewItem *item );
+ void slotOnItem( TQIconViewItem *item );
void slotOnViewport();
- void slotOnCurrentChanged( QIconViewItem *item );
+ void slotOnCurrentChanged( TQIconViewItem *item );
- void popupRMB( QIconViewItem *item, const QPoint& pos );
+ void popupRMB( TQIconViewItem *item, const TQPoint& pos );
void killSelectedNotes();
void printSelectedNotes();
@@ -95,7 +95,7 @@ class KNotesPart : public KParts::ReadOnlyPart, virtual public KNotesIface
KNoteEditDlg *mNoteEditDlg;
KNotesResourceManager *mManager;
- QDict<KNotesIconViewItem> mNoteList;
+ TQDict<KNotesIconViewItem> mNoteList;
};
#endif
diff --git a/kontact/plugins/knotes/knotes_part_p.h b/kontact/plugins/knotes/knotes_part_p.h
index 55a0374b6..0bf073f3a 100644
--- a/kontact/plugins/knotes/knotes_part_p.h
+++ b/kontact/plugins/knotes/knotes_part_p.h
@@ -32,8 +32,8 @@
#ifndef KNOTES_PART_P_H
#define KNOTES_PART_P_H
-#include <qlayout.h>
-#include <qlabel.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
#include <kactioncollection.h>
#include <klocale.h>
@@ -67,8 +67,8 @@ class KNotesIconViewItem : public KIconViewItem
setRenameEnabled( true );
KIconEffect effect;
- QColor color( journal->customProperty( "KNotes", "BgColor" ) );
- QPixmap icon = KGlobal::iconLoader()->loadIcon( "knotes", KIcon::Desktop );
+ TQColor color( journal->customProperty( "KNotes", "BgColor" ) );
+ TQPixmap icon = KGlobal::iconLoader()->loadIcon( "knotes", KIcon::Desktop );
icon = effect.apply( icon, KIconEffect::Colorize, 1, color, false );
setPixmap( icon );
setText( journal->summary() );
@@ -79,7 +79,7 @@ class KNotesIconViewItem : public KIconViewItem
return mJournal;
}
- virtual void setText( const QString& text )
+ virtual void setText( const TQString& text )
{
KIconViewItem::setText( text );
mJournal->setSummary( text );
@@ -93,10 +93,10 @@ class KNotesIconViewItem : public KIconViewItem
class KNotesIconView : public KIconView
{
protected:
- QDragObject* dragObject()
+ TQDragObject* dragObject()
{
- QValueList<KNotesIconViewItem*> selectedItems;
- for ( QIconViewItem *it = firstItem(); it; it = it->nextItem() ) {
+ TQValueList<KNotesIconViewItem*> selectedItems;
+ for ( TQIconViewItem *it = firstItem(); it; it = it->nextItem() ) {
if ( it->isSelected() )
selectedItems.append( static_cast<KNotesIconViewItem *>( it ) );
}
@@ -117,7 +117,7 @@ class KNoteEditDlg : public KDialogBase, virtual public KXMLGUIClient
Q_OBJECT
public:
- KNoteEditDlg( QWidget *parent = 0, const char *name = 0 )
+ KNoteEditDlg( TQWidget *parent = 0, const char *name = 0 )
: KDialogBase( Plain, i18n( "Edit Note" ), Ok | Cancel, Ok,
parent, name, true, true )
{
@@ -128,11 +128,11 @@ class KNoteEditDlg : public KDialogBase, virtual public KXMLGUIClient
setXMLFile( "knotesui.rc" );
actionCollection()->setWidget( this );
- QWidget *page = plainPage();
- QVBoxLayout *layout = new QVBoxLayout( page );
+ TQWidget *page = plainPage();
+ TQVBoxLayout *layout = new TQVBoxLayout( page );
- QHBoxLayout *hbl = new QHBoxLayout( layout, marginHint() );
- QLabel *label = new QLabel( page);
+ TQHBoxLayout *hbl = new TQHBoxLayout( layout, marginHint() );
+ TQLabel *label = new TQLabel( page);
label->setText( i18n( "Name:" ) );
hbl->addWidget( label,0 );
mTitleEdit= new KLineEdit( page, "name" );
@@ -152,22 +152,22 @@ class KNoteEditDlg : public KDialogBase, virtual public KXMLGUIClient
layout->addWidget( mNoteEdit );
}
- QString text() const
+ TQString text() const
{
return mNoteEdit->text();
}
- void setText( const QString& text )
+ void setText( const TQString& text )
{
mNoteEdit->setText( text );
}
- QString title() const
+ TQString title() const
{
return mTitleEdit->text();
}
- void setTitle( const QString& text )
+ void setTitle( const TQString& text )
{
mTitleEdit->setText( text );
}
diff --git a/kontact/plugins/knotes/knotes_plugin.cpp b/kontact/plugins/knotes/knotes_plugin.cpp
index beaaa6331..1a94fdea3 100644
--- a/kontact/plugins/knotes/knotes_plugin.cpp
+++ b/kontact/plugins/knotes/knotes_plugin.cpp
@@ -38,16 +38,16 @@ K_EXPORT_COMPONENT_FACTORY( libkontact_knotesplugin,
KNotesPluginFactory( "kontact_knotesplugin" ) )
-KNotesPlugin::KNotesPlugin( Kontact::Core *core, const char *, const QStringList & )
+KNotesPlugin::KNotesPlugin( Kontact::Core *core, const char *, const TQStringList & )
: Kontact::Plugin( core, core, "knotes" ),
mAboutData( 0 )
{
setInstance( KNotesPluginFactory::instance() );
insertNewAction( new KAction( i18n( "New Note..." ), "knotes", CTRL+SHIFT+Key_N,
- this, SLOT( slotNewNote() ), actionCollection(), "new_note" ) );
+ this, TQT_SLOT( slotNewNote() ), actionCollection(), "new_note" ) );
insertSyncAction( new KAction( i18n( "Synchronize Notes" ), "reload", 0,
- this, SLOT( slotSyncNotes() ), actionCollection(), "knotes_sync" ) );
+ this, TQT_SLOT( slotSyncNotes() ), actionCollection(), "knotes_sync" ) );
}
KNotesPlugin::~KNotesPlugin()
@@ -59,7 +59,7 @@ KParts::ReadOnlyPart* KNotesPlugin::createPart()
return new KNotesPart( this, "notes" );
}
-Kontact::Summary *KNotesPlugin::createSummaryWidget( QWidget *parentWidget )
+Kontact::Summary *KNotesPlugin::createSummaryWidget( TQWidget *parentWidget )
{
return new KNotesSummaryWidget( this, parentWidget );
}
@@ -90,7 +90,7 @@ void KNotesPlugin::slotNewNote()
void KNotesPlugin::slotSyncNotes()
{
DCOPRef ref( "kmail", "KMailICalIface" );
- ref.send( "triggerSync", QString("Note") );
+ ref.send( "triggerSync", TQString("Note") );
}
#include "knotes_plugin.moc"
diff --git a/kontact/plugins/knotes/knotes_plugin.h b/kontact/plugins/knotes/knotes_plugin.h
index d4d58cb03..a94494581 100644
--- a/kontact/plugins/knotes/knotes_plugin.h
+++ b/kontact/plugins/knotes/knotes_plugin.h
@@ -34,10 +34,10 @@ class KNotesPlugin : public Kontact::Plugin
Q_OBJECT
public:
- KNotesPlugin( Kontact::Core *core, const char *name, const QStringList& );
+ KNotesPlugin( Kontact::Core *core, const char *name, const TQStringList& );
~KNotesPlugin();
- virtual Kontact::Summary *createSummaryWidget( QWidget *parentWidget );
+ virtual Kontact::Summary *createSummaryWidget( TQWidget *parentWidget );
int weight() const { return 600; }
diff --git a/kontact/plugins/knotes/knotetip.cpp b/kontact/plugins/knotes/knotetip.cpp
index 6e2c998d7..64db3a336 100644
--- a/kontact/plugins/knotes/knotetip.cpp
+++ b/kontact/plugins/knotes/knotetip.cpp
@@ -29,9 +29,9 @@
your version.
*/
-#include <qtooltip.h>
-#include <qlayout.h>
-#include <qtextedit.h>
+#include <tqtooltip.h>
+#include <tqlayout.h>
+#include <tqtextedit.h>
#include <kapplication.h>
#include <kglobalsettings.h>
@@ -41,23 +41,23 @@
KNoteTip::KNoteTip( KIconView *parent )
- : QFrame( 0, 0, WX11BypassWM | // this will make Seli happy >:-P
+ : TQFrame( 0, 0, WX11BypassWM | // this will make Seli happy >:-P
WStyle_Customize | WStyle_NoBorder | WStyle_Tool | WStyle_StaysOnTop ),
mFilter( false ),
mView( parent ),
mNoteIVI( 0 ),
- mPreview( new QTextEdit( this ) )
+ mPreview( new TQTextEdit( this ) )
{
mPreview->setReadOnly( true );
- mPreview->setHScrollBarMode( QScrollView::AlwaysOff );
- mPreview->setVScrollBarMode( QScrollView::AlwaysOff );
+ mPreview->setHScrollBarMode( TQScrollView::AlwaysOff );
+ mPreview->setVScrollBarMode( TQScrollView::AlwaysOff );
- QBoxLayout *layout = new QVBoxLayout( this );
+ TQBoxLayout *layout = new TQVBoxLayout( this );
layout->addWidget( mPreview );
- setPalette( QToolTip::palette() );
+ setPalette( TQToolTip::palette() );
setMargin( 1 );
- setFrameStyle( QFrame::Plain | QFrame::Box );
+ setFrameStyle( TQFrame::Plain | TQFrame::Box );
hide();
}
@@ -87,8 +87,8 @@ void KNoteTip::setNote( KNotesIconViewItem *item )
else
mPreview->setTextFormat( Qt::PlainText );
- QColor fg( journal->customProperty( "KNotes", "FgColor" ) );
- QColor bg( journal->customProperty( "KNotes", "BgColor" ) );
+ TQColor fg( journal->customProperty( "KNotes", "FgColor" ) );
+ TQColor bg( journal->customProperty( "KNotes", "BgColor" ) );
setColor( fg, bg );
mPreview->setText( journal->description() );
@@ -100,7 +100,7 @@ void KNoteTip::setNote( KNotesIconViewItem *item )
while ( w > 60 && h == mPreview->heightForWidth( w - 20 ) )
w -= 20;
- QRect desk = KGlobalSettings::desktopGeometry( mNoteIVI->rect().center() );
+ TQRect desk = KGlobalSettings::desktopGeometry( mNoteIVI->rect().center() );
resize( w, QMIN( h, desk.height() / 2 - 20 ) );
hide();
@@ -113,13 +113,13 @@ void KNoteTip::setNote( KNotesIconViewItem *item )
// protected, virtual methods
-void KNoteTip::resizeEvent( QResizeEvent *ev )
+void KNoteTip::resizeEvent( TQResizeEvent *ev )
{
- QFrame::resizeEvent( ev );
+ TQFrame::resizeEvent( ev );
reposition();
}
-void KNoteTip::timerEvent( QTimerEvent * )
+void KNoteTip::timerEvent( TQTimerEvent * )
{
killTimers();
@@ -133,17 +133,17 @@ void KNoteTip::timerEvent( QTimerEvent * )
}
}
-bool KNoteTip::eventFilter( QObject *, QEvent *e )
+bool KNoteTip::eventFilter( TQObject *, TQEvent *e )
{
switch ( e->type() ) {
- case QEvent::Leave:
- case QEvent::MouseButtonPress:
- case QEvent::MouseButtonRelease:
- case QEvent::KeyPress:
- case QEvent::KeyRelease:
- case QEvent::FocusIn:
- case QEvent::FocusOut:
- case QEvent::Wheel:
+ case TQEvent::Leave:
+ case TQEvent::MouseButtonPress:
+ case TQEvent::MouseButtonRelease:
+ case TQEvent::KeyPress:
+ case TQEvent::KeyRelease:
+ case TQEvent::FocusIn:
+ case TQEvent::FocusOut:
+ case TQEvent::Wheel:
killTimers();
setFilter( false );
hide();
@@ -157,20 +157,20 @@ bool KNoteTip::eventFilter( QObject *, QEvent *e )
// private stuff
-void KNoteTip::setColor( const QColor &fg, const QColor &bg )
+void KNoteTip::setColor( const TQColor &fg, const TQColor &bg )
{
- QPalette newpalette = palette();
- newpalette.setColor( QColorGroup::Background, bg );
- newpalette.setColor( QColorGroup::Foreground, fg );
- newpalette.setColor( QColorGroup::Base, bg ); // text background
- newpalette.setColor( QColorGroup::Text, fg ); // text color
- newpalette.setColor( QColorGroup::Button, bg );
+ TQPalette newpalette = palette();
+ newpalette.setColor( TQColorGroup::Background, bg );
+ newpalette.setColor( TQColorGroup::Foreground, fg );
+ newpalette.setColor( TQColorGroup::Base, bg ); // text background
+ newpalette.setColor( TQColorGroup::Text, fg ); // text color
+ newpalette.setColor( TQColorGroup::Button, bg );
// the shadow
- newpalette.setColor( QColorGroup::Midlight, bg.light(110) );
- newpalette.setColor( QColorGroup::Shadow, bg.dark(116) );
- newpalette.setColor( QColorGroup::Light, bg.light(180) );
- newpalette.setColor( QColorGroup::Dark, bg.dark(108) );
+ newpalette.setColor( TQColorGroup::Midlight, bg.light(110) );
+ newpalette.setColor( TQColorGroup::Shadow, bg.dark(116) );
+ newpalette.setColor( TQColorGroup::Light, bg.light(180) );
+ newpalette.setColor( TQColorGroup::Dark, bg.dark(108) );
setPalette( newpalette );
// set the text color
@@ -185,9 +185,9 @@ void KNoteTip::setFilter( bool enable )
if ( enable ) {
kapp->installEventFilter( this );
- QApplication::setGlobalMouseTracking( true );
+ TQApplication::setGlobalMouseTracking( true );
} else {
- QApplication::setGlobalMouseTracking( false );
+ TQApplication::setGlobalMouseTracking( false );
kapp->removeEventFilter( this );
}
@@ -199,14 +199,14 @@ void KNoteTip::reposition()
if ( !mNoteIVI )
return;
- QRect rect = mNoteIVI->rect();
- QPoint off = mView->mapToGlobal( mView->contentsToViewport( QPoint( 0, 0 ) ) );
+ TQRect rect = mNoteIVI->rect();
+ TQPoint off = mView->mapToGlobal( mView->contentsToViewport( TQPoint( 0, 0 ) ) );
rect.moveBy( off.x(), off.y() );
- QPoint pos = rect.center();
+ TQPoint pos = rect.center();
// should the tooltip be shown to the left or to the right of the ivi?
- QRect desk = KGlobalSettings::desktopGeometry( pos );
+ TQRect desk = KGlobalSettings::desktopGeometry( pos );
if ( rect.center().x() + width() > desk.right() ) {
// to the left
if ( pos.x() - width() < 0 )
diff --git a/kontact/plugins/knotes/knotetip.h b/kontact/plugins/knotes/knotetip.h
index f07b75f0c..a97391962 100644
--- a/kontact/plugins/knotes/knotetip.h
+++ b/kontact/plugins/knotes/knotetip.h
@@ -32,7 +32,7 @@
#ifndef KNOTETIP_H
#define KNOTETIP_H
-#include <qframe.h>
+#include <tqframe.h>
class QTextEdit;
class KIconView;
@@ -47,12 +47,12 @@ class KNoteTip : public QFrame
void setNote( KNotesIconViewItem *item );
protected:
- virtual bool eventFilter( QObject *, QEvent *e );
- virtual void timerEvent( QTimerEvent * );
- virtual void resizeEvent( QResizeEvent * );
+ virtual bool eventFilter( TQObject *, TQEvent *e );
+ virtual void timerEvent( TQTimerEvent * );
+ virtual void resizeEvent( TQResizeEvent * );
private:
- void setColor( const QColor &fg, const QColor &bg );
+ void setColor( const TQColor &fg, const TQColor &bg );
void setFilter( bool enable );
void reposition();
@@ -62,7 +62,7 @@ class KNoteTip : public QFrame
KIconView *mView;
KNotesIconViewItem *mNoteIVI;
- QTextEdit *mPreview;
+ TQTextEdit *mPreview;
};
#endif
diff --git a/kontact/plugins/knotes/summarywidget.cpp b/kontact/plugins/knotes/summarywidget.cpp
index 3045ede53..012e6ae82 100644
--- a/kontact/plugins/knotes/summarywidget.cpp
+++ b/kontact/plugins/knotes/summarywidget.cpp
@@ -21,10 +21,10 @@
without including the source code for Qt in the source distribution.
*/
-#include <qobject.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qtooltip.h>
+#include <tqobject.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqtooltip.h>
#include <dcopclient.h>
#include <dcopref.h>
@@ -45,26 +45,26 @@
#include "summarywidget.h"
KNotesSummaryWidget::KNotesSummaryWidget( Kontact::Plugin *plugin,
- QWidget *parent, const char *name )
+ TQWidget *parent, const char *name )
: Kontact::Summary( parent, name ), mLayout( 0 ), mPlugin( plugin )
{
- QVBoxLayout *mainLayout = new QVBoxLayout( this, 3, 3 );
+ TQVBoxLayout *mainLayout = new TQVBoxLayout( this, 3, 3 );
- QPixmap icon = KGlobal::iconLoader()->loadIcon( "kontact_notes",
+ TQPixmap icon = KGlobal::iconLoader()->loadIcon( "kontact_notes",
KIcon::Desktop, KIcon::SizeMedium );
- QWidget* header = createHeader( this, icon, i18n( "Notes" ) );
+ TQWidget* header = createHeader( this, icon, i18n( "Notes" ) );
mainLayout->addWidget( header );
- mLayout = new QGridLayout( mainLayout, 7, 3, 3 );
+ mLayout = new TQGridLayout( mainLayout, 7, 3, 3 );
mLayout->setRowStretch( 6, 1 );
- mCalendar = new KCal::CalendarLocal( QString::fromLatin1("UTC") );
+ mCalendar = new KCal::CalendarLocal( TQString::fromLatin1("UTC") );
KNotesResourceManager *manager = new KNotesResourceManager();
- QObject::connect( manager, SIGNAL( sigRegisteredNote( KCal::Journal* ) ),
- this, SLOT( addNote( KCal::Journal* ) ) );
- QObject::connect( manager, SIGNAL( sigDeregisteredNote( KCal::Journal* ) ),
- this, SLOT( removeNote( KCal::Journal* ) ) );
+ TQObject::connect( manager, TQT_SIGNAL( sigRegisteredNote( KCal::Journal* ) ),
+ this, TQT_SLOT( addNote( KCal::Journal* ) ) );
+ TQObject::connect( manager, TQT_SIGNAL( sigDeregisteredNote( KCal::Journal* ) ),
+ this, TQT_SLOT( removeNote( KCal::Journal* ) ) );
manager->load();
@@ -74,7 +74,7 @@ KNotesSummaryWidget::KNotesSummaryWidget( Kontact::Plugin *plugin,
void KNotesSummaryWidget::updateView()
{
mNotes = mCalendar->journals();
- QLabel *label;
+ TQLabel *label;
for ( label = mLabels.first(); label; label = mLabels.next() )
label->deleteLater();
@@ -83,14 +83,14 @@ void KNotesSummaryWidget::updateView()
KIconLoader loader( "knotes" );
int counter = 0;
- QPixmap pm = loader.loadIcon( "knotes", KIcon::Small );
+ TQPixmap pm = loader.loadIcon( "knotes", KIcon::Small );
KCal::Journal::List::Iterator it;
if ( mNotes.count() ) {
for (it = mNotes.begin(); it != mNotes.end(); ++it) {
// Fill Note Pixmap Field
- label = new QLabel( this );
+ label = new TQLabel( this );
label->setPixmap( pm );
label->setMaximumWidth( label->minimumSizeHint().width() );
label->setAlignment( AlignVCenter );
@@ -98,7 +98,7 @@ void KNotesSummaryWidget::updateView()
mLabels.append( label );
// File Note Summary Field
- QString newtext = (*it)->summary();
+ TQString newtext = (*it)->summary();
KURLLabel *urlLabel = new KURLLabel( (*it)->uid(), newtext, this );
urlLabel->installEventFilter( this );
@@ -108,16 +108,16 @@ void KNotesSummaryWidget::updateView()
mLabels.append( urlLabel );
if ( !(*it)->description().isEmpty() ) {
- QToolTip::add( urlLabel, (*it)->description().left( 80 ) );
+ TQToolTip::add( urlLabel, (*it)->description().left( 80 ) );
}
- connect( urlLabel, SIGNAL( leftClickedURL( const QString& ) ),
- this, SLOT( urlClicked( const QString& ) ) );
+ connect( urlLabel, TQT_SIGNAL( leftClickedURL( const TQString& ) ),
+ this, TQT_SLOT( urlClicked( const TQString& ) ) );
counter++;
}
} else {
- QLabel *noNotes = new QLabel( i18n( "No Notes Available" ), this );
+ TQLabel *noNotes = new TQLabel( i18n( "No Notes Available" ), this );
noNotes->setAlignment( AlignHCenter | AlignVCenter );
mLayout->addWidget( noNotes, 0, 1 );
mLabels.append( noNotes );
@@ -127,7 +127,7 @@ void KNotesSummaryWidget::updateView()
label->show();
}
-void KNotesSummaryWidget::urlClicked( const QString &/*uid*/ )
+void KNotesSummaryWidget::urlClicked( const TQString &/*uid*/ )
{
if ( !mPlugin->isRunningStandalone() )
mPlugin->core()->selectPlugin( mPlugin );
@@ -135,14 +135,14 @@ void KNotesSummaryWidget::urlClicked( const QString &/*uid*/ )
mPlugin->bringToForeground();
}
-bool KNotesSummaryWidget::eventFilter( QObject *obj, QEvent* e )
+bool KNotesSummaryWidget::eventFilter( TQObject *obj, TQEvent* e )
{
if ( obj->inherits( "KURLLabel" ) ) {
KURLLabel* label = static_cast<KURLLabel*>( obj );
- if ( e->type() == QEvent::Enter )
+ if ( e->type() == TQEvent::Enter )
emit message( i18n( "Read Note: \"%1\"" ).arg( label->text() ) );
- if ( e->type() == QEvent::Leave )
- emit message( QString::null );
+ if ( e->type() == TQEvent::Leave )
+ emit message( TQString::null );
}
return Kontact::Summary::eventFilter( obj, e );
diff --git a/kontact/plugins/knotes/summarywidget.h b/kontact/plugins/knotes/summarywidget.h
index f21d829fa..dff4319ac 100644
--- a/kontact/plugins/knotes/summarywidget.h
+++ b/kontact/plugins/knotes/summarywidget.h
@@ -26,9 +26,9 @@
#include "summary.h"
-#include <qmap.h>
-#include <qptrlist.h>
-#include <qwidget.h>
+#include <tqmap.h>
+#include <tqptrlist.h>
+#include <tqwidget.h>
#include <libkcal/resourcelocal.h>
#include <libkcal/calendarresources.h>
@@ -45,15 +45,15 @@ class KNotesSummaryWidget : public Kontact::Summary
Q_OBJECT
public:
- KNotesSummaryWidget( Kontact::Plugin *plugin, QWidget *parent, const char *name = 0 );
+ KNotesSummaryWidget( Kontact::Plugin *plugin, TQWidget *parent, const char *name = 0 );
void updateSummary( bool force = false ) { Q_UNUSED( force ); updateView(); }
protected:
- virtual bool eventFilter( QObject *obj, QEvent* e );
+ virtual bool eventFilter( TQObject *obj, TQEvent* e );
protected slots:
- void urlClicked( const QString& );
+ void urlClicked( const TQString& );
void updateView();
void addNote( KCal::Journal* );
void removeNote( KCal::Journal* );
@@ -62,9 +62,9 @@ class KNotesSummaryWidget : public Kontact::Summary
KCal::CalendarLocal *mCalendar;
KCal::Journal::List mNotes;
- QGridLayout *mLayout;
+ TQGridLayout *mLayout;
- QPtrList<QLabel> mLabels;
+ TQPtrList<TQLabel> mLabels;
Kontact::Plugin *mPlugin;
};
diff --git a/kontact/plugins/korganizer/journalplugin.cpp b/kontact/plugins/korganizer/journalplugin.cpp
index 178901b4c..789762d5f 100644
--- a/kontact/plugins/korganizer/journalplugin.cpp
+++ b/kontact/plugins/korganizer/journalplugin.cpp
@@ -22,7 +22,7 @@
without including the source code for Qt in the source distribution.
*/
-#include <qwidget.h>
+#include <tqwidget.h>
#include <kapplication.h>
#include <kaction.h>
@@ -42,7 +42,7 @@ typedef KGenericFactory< JournalPlugin, Kontact::Core > JournalPluginFactory;
K_EXPORT_COMPONENT_FACTORY( libkontact_journalplugin,
JournalPluginFactory( "kontact_journalplugin" ) )
-JournalPlugin::JournalPlugin( Kontact::Core *core, const char *, const QStringList& )
+JournalPlugin::JournalPlugin( Kontact::Core *core, const char *, const TQStringList& )
: Kontact::Plugin( core, core, "korganizer" ),
mIface( 0 )
{
@@ -50,10 +50,10 @@ JournalPlugin::JournalPlugin( Kontact::Core *core, const char *, const QStringLi
instance()->iconLoader()->addAppDir("kdepim");
insertNewAction( new KAction( i18n( "New Journal..." ), "newjournal",
- CTRL+SHIFT+Key_J, this, SLOT( slotNewJournal() ), actionCollection(),
+ CTRL+SHIFT+Key_J, this, TQT_SLOT( slotNewJournal() ), actionCollection(),
"new_journal" ) );
insertSyncAction( new KAction( i18n( "Synchronize Journal" ), "reload",
- 0, this, SLOT( slotSyncJournal() ), actionCollection(),
+ 0, this, TQT_SLOT( slotSyncJournal() ), actionCollection(),
"journal_sync" ) );
@@ -83,9 +83,9 @@ void JournalPlugin::select()
interface()->showJournalView();
}
-QStringList JournalPlugin::invisibleToolbarActions() const
+TQStringList JournalPlugin::invisibleToolbarActions() const
{
- QStringList invisible;
+ TQStringList invisible;
invisible += "new_event";
invisible += "new_todo";
invisible += "new_journal";
@@ -117,10 +117,10 @@ void JournalPlugin::slotNewJournal()
void JournalPlugin::slotSyncJournal()
{
DCOPRef ref( "kmail", "KMailICalIface" );
- ref.send( "triggerSync", QString("Journal") );
+ ref.send( "triggerSync", TQString("Journal") );
}
-bool JournalPlugin::createDCOPInterface( const QString& serviceType )
+bool JournalPlugin::createDCOPInterface( const TQString& serviceType )
{
kdDebug(5602) << k_funcinfo << serviceType << endl;
if ( serviceType == "DCOP/Organizer" || serviceType == "DCOP/Calendar" ) {
diff --git a/kontact/plugins/korganizer/journalplugin.h b/kontact/plugins/korganizer/journalplugin.h
index 668c2b289..2aeca3544 100644
--- a/kontact/plugins/korganizer/journalplugin.h
+++ b/kontact/plugins/korganizer/journalplugin.h
@@ -35,14 +35,14 @@ class JournalPlugin : public Kontact::Plugin
{
Q_OBJECT
public:
- JournalPlugin( Kontact::Core *core, const char *name, const QStringList& );
+ JournalPlugin( Kontact::Core *core, const char *name, const TQStringList& );
~JournalPlugin();
- virtual bool createDCOPInterface( const QString& serviceType );
+ virtual bool createDCOPInterface( const TQString& serviceType );
virtual bool isRunningStandalone();
int weight() const { return 500; }
- virtual QStringList invisibleToolbarActions() const;
+ virtual TQStringList invisibleToolbarActions() const;
void select();
diff --git a/kontact/plugins/korganizer/kcmkorgsummary.cpp b/kontact/plugins/korganizer/kcmkorgsummary.cpp
index 9ab0b6838..2a4b6a3e1 100644
--- a/kontact/plugins/korganizer/kcmkorgsummary.cpp
+++ b/kontact/plugins/korganizer/kcmkorgsummary.cpp
@@ -21,11 +21,11 @@
without including the source code for Qt in the source distribution.
*/
-#include <qbuttongroup.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qradiobutton.h>
-#include <qspinbox.h>
+#include <tqbuttongroup.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqradiobutton.h>
+#include <tqspinbox.h>
#include <kaboutdata.h>
#include <kapplication.h>
@@ -41,24 +41,24 @@
extern "C"
{
- KDE_EXPORT KCModule *create_korgsummary( QWidget *parent, const char * )
+ KDE_EXPORT KCModule *create_korgsummary( TQWidget *parent, const char * )
{
return new KCMKOrgSummary( parent, "kcmkorgsummary" );
}
}
-KCMKOrgSummary::KCMKOrgSummary( QWidget *parent, const char *name )
+KCMKOrgSummary::KCMKOrgSummary( TQWidget *parent, const char *name )
: KCModule( parent, name )
{
initGUI();
customDaysChanged( 1 );
- connect( mCalendarGroup, SIGNAL( clicked( int ) ), SLOT( modified() ) );
- connect( mCalendarGroup, SIGNAL( clicked( int ) ), SLOT( buttonClicked( int ) ) );
- connect( mTodoGroup, SIGNAL( clicked( int ) ), SLOT( modified() ) );
- connect( mCustomDays, SIGNAL( valueChanged( int ) ), SLOT( modified() ) );
- connect( mCustomDays, SIGNAL( valueChanged( int ) ), SLOT( customDaysChanged( int ) ) );
+ connect( mCalendarGroup, TQT_SIGNAL( clicked( int ) ), TQT_SLOT( modified() ) );
+ connect( mCalendarGroup, TQT_SIGNAL( clicked( int ) ), TQT_SLOT( buttonClicked( int ) ) );
+ connect( mTodoGroup, TQT_SIGNAL( clicked( int ) ), TQT_SLOT( modified() ) );
+ connect( mCustomDays, TQT_SIGNAL( valueChanged( int ) ), TQT_SLOT( modified() ) );
+ connect( mCustomDays, TQT_SIGNAL( valueChanged( int ) ), TQT_SLOT( customDaysChanged( int ) ) );
KAcceleratorManager::manage( this );
@@ -90,33 +90,33 @@ void KCMKOrgSummary::customDaysChanged( int value )
void KCMKOrgSummary::initGUI()
{
- QVBoxLayout *layout = new QVBoxLayout( this, 0, KDialog::spacingHint() );
+ TQVBoxLayout *layout = new TQVBoxLayout( this, 0, KDialog::spacingHint() );
- mCalendarGroup = new QButtonGroup( 0, Vertical, i18n( "Appointments" ), this );
- QVBoxLayout *boxLayout = new QVBoxLayout( mCalendarGroup->layout(),
+ mCalendarGroup = new TQButtonGroup( 0, Vertical, i18n( "Appointments" ), this );
+ TQVBoxLayout *boxLayout = new TQVBoxLayout( mCalendarGroup->layout(),
KDialog::spacingHint() );
- QLabel *label = new QLabel( i18n( "How many days should the calendar show at once?" ), mCalendarGroup );
+ TQLabel *label = new TQLabel( i18n( "How many days should the calendar show at once?" ), mCalendarGroup );
boxLayout->addWidget( label );
- QRadioButton *button = new QRadioButton( i18n( "One day" ), mCalendarGroup );
+ TQRadioButton *button = new TQRadioButton( i18n( "One day" ), mCalendarGroup );
boxLayout->addWidget( button );
- button = new QRadioButton( i18n( "Five days" ), mCalendarGroup );
+ button = new TQRadioButton( i18n( "Five days" ), mCalendarGroup );
boxLayout->addWidget( button );
- button = new QRadioButton( i18n( "One week" ), mCalendarGroup );
+ button = new TQRadioButton( i18n( "One week" ), mCalendarGroup );
boxLayout->addWidget( button );
- button = new QRadioButton( i18n( "One month" ), mCalendarGroup );
+ button = new TQRadioButton( i18n( "One month" ), mCalendarGroup );
boxLayout->addWidget( button );
- QHBoxLayout *hbox = new QHBoxLayout( boxLayout, KDialog::spacingHint() );
+ TQHBoxLayout *hbox = new TQHBoxLayout( boxLayout, KDialog::spacingHint() );
- button = new QRadioButton( "", mCalendarGroup );
+ button = new TQRadioButton( "", mCalendarGroup );
hbox->addWidget( button );
- mCustomDays = new QSpinBox( 1, 365, 1, mCalendarGroup );
+ mCustomDays = new TQSpinBox( 1, 365, 1, mCalendarGroup );
mCustomDays->setEnabled( false );
hbox->addWidget( mCustomDays );
@@ -124,9 +124,9 @@ void KCMKOrgSummary::initGUI()
layout->addWidget( mCalendarGroup );
- mTodoGroup = new QButtonGroup( 2, Horizontal, i18n( "To-dos" ), this );
- new QRadioButton( i18n( "Show all to-dos" ), mTodoGroup );
- new QRadioButton( i18n( "Show today's to-dos only" ), mTodoGroup );
+ mTodoGroup = new TQButtonGroup( 2, Horizontal, i18n( "To-dos" ), this );
+ new TQRadioButton( i18n( "Show all to-dos" ), mTodoGroup );
+ new TQRadioButton( i18n( "Show today's to-dos only" ), mTodoGroup );
layout->addWidget( mTodoGroup );
diff --git a/kontact/plugins/korganizer/kcmkorgsummary.h b/kontact/plugins/korganizer/kcmkorgsummary.h
index cf484e56d..9ae0ac58e 100644
--- a/kontact/plugins/korganizer/kcmkorgsummary.h
+++ b/kontact/plugins/korganizer/kcmkorgsummary.h
@@ -34,7 +34,7 @@ class KCMKOrgSummary : public KCModule
Q_OBJECT
public:
- KCMKOrgSummary( QWidget *parent = 0, const char *name = 0 );
+ KCMKOrgSummary( TQWidget *parent = 0, const char *name = 0 );
virtual void load();
virtual void save();
@@ -48,9 +48,9 @@ class KCMKOrgSummary : public KCModule
private:
void initGUI();
- QButtonGroup *mCalendarGroup;
- QButtonGroup *mTodoGroup;
- QSpinBox *mCustomDays;
+ TQButtonGroup *mCalendarGroup;
+ TQButtonGroup *mTodoGroup;
+ TQSpinBox *mCustomDays;
};
#endif
diff --git a/kontact/plugins/korganizer/korganizerplugin.cpp b/kontact/plugins/korganizer/korganizerplugin.cpp
index f4a3dfe1b..a73e551ef 100644
--- a/kontact/plugins/korganizer/korganizerplugin.cpp
+++ b/kontact/plugins/korganizer/korganizerplugin.cpp
@@ -22,10 +22,10 @@
without including the source code for Qt in the source distribution.
*/
-#include <qcursor.h>
-#include <qfile.h>
-#include <qwidget.h>
-#include <qdragobject.h>
+#include <tqcursor.h>
+#include <tqfile.h>
+#include <tqwidget.h>
+#include <tqdragobject.h>
#include <kapplication.h>
#include <kabc/vcardconverter.h>
@@ -52,7 +52,7 @@ typedef KGenericFactory< KOrganizerPlugin, Kontact::Core > KOrganizerPluginFacto
K_EXPORT_COMPONENT_FACTORY( libkontact_korganizerplugin,
KOrganizerPluginFactory( "kontact_korganizerplugin" ) )
-KOrganizerPlugin::KOrganizerPlugin( Kontact::Core *core, const char *, const QStringList& )
+KOrganizerPlugin::KOrganizerPlugin( Kontact::Core *core, const char *, const TQStringList& )
: Kontact::Plugin( core, core, "korganizer" ),
mIface( 0 )
{
@@ -61,11 +61,11 @@ KOrganizerPlugin::KOrganizerPlugin( Kontact::Core *core, const char *, const QSt
instance()->iconLoader()->addAppDir("kdepim");
insertNewAction( new KAction( i18n( "New Event..." ), "newappointment",
- CTRL+SHIFT+Key_E, this, SLOT( slotNewEvent() ), actionCollection(),
+ CTRL+SHIFT+Key_E, this, TQT_SLOT( slotNewEvent() ), actionCollection(),
"new_event" ) );
insertSyncAction( new KAction( i18n( "Synchronize Calendar" ), "reload",
- 0, this, SLOT( slotSyncEvents() ), actionCollection(),
+ 0, this, TQT_SLOT( slotSyncEvents() ), actionCollection(),
"korganizer_sync" ) );
mUniqueAppWatcher = new Kontact::UniqueAppWatcher(
@@ -76,7 +76,7 @@ KOrganizerPlugin::~KOrganizerPlugin()
{
}
-Kontact::Summary *KOrganizerPlugin::createSummaryWidget( QWidget *parent )
+Kontact::Summary *KOrganizerPlugin::createSummaryWidget( TQWidget *parent )
{
return new SummaryWidget( this, parent );
}
@@ -93,15 +93,15 @@ KParts::ReadOnlyPart *KOrganizerPlugin::createPart()
return part;
}
-QString KOrganizerPlugin::tipFile() const
+TQString KOrganizerPlugin::tipFile() const
{
- QString file = ::locate("data", "korganizer/tips");
+ TQString file = ::locate("data", "korganizer/tips");
return file;
}
-QStringList KOrganizerPlugin::invisibleToolbarActions() const
+TQStringList KOrganizerPlugin::invisibleToolbarActions() const
{
- QStringList invisible;
+ TQStringList invisible;
invisible += "new_event";
invisible += "new_todo";
invisible += "new_journal";
@@ -133,10 +133,10 @@ void KOrganizerPlugin::slotNewEvent()
void KOrganizerPlugin::slotSyncEvents()
{
DCOPRef ref( "kmail", "KMailICalIface" );
- ref.send( "triggerSync", QString("Calendar") );
+ ref.send( "triggerSync", TQString("Calendar") );
}
-bool KOrganizerPlugin::createDCOPInterface( const QString& serviceType )
+bool KOrganizerPlugin::createDCOPInterface( const TQString& serviceType )
{
kdDebug(5602) << k_funcinfo << serviceType << endl;
if ( serviceType == "DCOP/Organizer" || serviceType == "DCOP/Calendar" ) {
@@ -152,36 +152,36 @@ bool KOrganizerPlugin::isRunningStandalone()
return mUniqueAppWatcher->isRunningStandalone();
}
-bool KOrganizerPlugin::canDecodeDrag( QMimeSource *mimeSource )
+bool KOrganizerPlugin::canDecodeDrag( TQMimeSource *mimeSource )
{
- return QTextDrag::canDecode( mimeSource ) ||
+ return TQTextDrag::canDecode( mimeSource ) ||
KPIM::MailListDrag::canDecode( mimeSource );
}
-void KOrganizerPlugin::processDropEvent( QDropEvent *event )
+void KOrganizerPlugin::processDropEvent( TQDropEvent *event )
{
- QString text;
+ TQString text;
KABC::VCardConverter converter;
if ( KVCardDrag::canDecode( event ) && KVCardDrag::decode( event, text ) ) {
KABC::Addressee::List contacts = converter.parseVCards( text );
KABC::Addressee::List::Iterator it;
- QStringList attendees;
+ TQStringList attendees;
for ( it = contacts.begin(); it != contacts.end(); ++it ) {
- QString email = (*it).fullEmail();
+ TQString email = (*it).fullEmail();
if ( email.isEmpty() )
attendees.append( (*it).realName() + "<>" );
else
attendees.append( email );
}
- interface()->openEventEditor( i18n( "Meeting" ), QString::null, QString::null,
+ interface()->openEventEditor( i18n( "Meeting" ), TQString::null, TQString::null,
attendees );
return;
}
- if ( QTextDrag::decode( event, text ) ) {
+ if ( TQTextDrag::decode( event, text ) ) {
kdDebug(5602) << "DROP:" << text << endl;
interface()->openEventEditor( text );
return;
@@ -194,16 +194,16 @@ void KOrganizerPlugin::processDropEvent( QDropEvent *event )
i18n("Drops of multiple mails are not supported." ) );
} else {
KPIM::MailSummary mail = mails.first();
- QString txt = i18n("From: %1\nTo: %2\nSubject: %3").arg( mail.from() )
+ TQString txt = i18n("From: %1\nTo: %2\nSubject: %3").arg( mail.from() )
.arg( mail.to() ).arg( mail.subject() );
KTempFile tf;
tf.setAutoDelete( true );
- QString uri = QString::fromLatin1("kmail:") + QString::number( mail.serialNumber() );
+ TQString uri = TQString::fromLatin1("kmail:") + TQString::number( mail.serialNumber() );
tf.file()->writeBlock( event->encodedData( "message/rfc822" ) );
tf.close();
interface()->openEventEditor( i18n("Mail: %1").arg( mail.subject() ), txt,
- uri, tf.name(), QStringList(), "message/rfc822" );
+ uri, tf.name(), TQStringList(), "message/rfc822" );
}
return;
}
@@ -218,13 +218,13 @@ bool KOrganizerPlugin::queryClose() const {
return (!canClose);
}
-void KOrganizerPlugin::loadProfile( const QString& directory )
+void KOrganizerPlugin::loadProfile( const TQString& directory )
{
DCOPRef ref( "korganizer", "KOrganizerIface" );
ref.send( "loadProfile", directory );
}
-void KOrganizerPlugin::saveToProfile( const QString& directory ) const
+void KOrganizerPlugin::saveToProfile( const TQString& directory ) const
{
DCOPRef ref( "korganizer", "KOrganizerIface" );
ref.send( "saveToProfile", directory );
diff --git a/kontact/plugins/korganizer/korganizerplugin.h b/kontact/plugins/korganizer/korganizerplugin.h
index 7d74c830e..1343464ec 100644
--- a/kontact/plugins/korganizer/korganizerplugin.h
+++ b/kontact/plugins/korganizer/korganizerplugin.h
@@ -38,30 +38,30 @@ class KOrganizerPlugin : public Kontact::Plugin
Q_OBJECT
public:
- KOrganizerPlugin( Kontact::Core *core, const char *name, const QStringList& );
+ KOrganizerPlugin( Kontact::Core *core, const char *name, const TQStringList& );
~KOrganizerPlugin();
- virtual bool createDCOPInterface( const QString& serviceType );
+ virtual bool createDCOPInterface( const TQString& serviceType );
virtual bool isRunningStandalone();
int weight() const { return 400; }
virtual bool queryClose() const;
- bool canDecodeDrag( QMimeSource * );
- void processDropEvent( QDropEvent * );
+ bool canDecodeDrag( TQMimeSource * );
+ void processDropEvent( TQDropEvent * );
- virtual Kontact::Summary *createSummaryWidget( QWidget *parent );
+ virtual Kontact::Summary *createSummaryWidget( TQWidget *parent );
- virtual QString tipFile() const;
- virtual QStringList invisibleToolbarActions() const;
+ virtual TQString tipFile() const;
+ virtual TQStringList invisibleToolbarActions() const;
void select();
KCalendarIface_stub *interface();
- void loadProfile( const QString& path );
- void saveToProfile( const QString& path ) const;
+ void loadProfile( const TQString& path );
+ void saveToProfile( const TQString& path ) const;
protected:
KParts::ReadOnlyPart *createPart();
diff --git a/kontact/plugins/korganizer/summarywidget.cpp b/kontact/plugins/korganizer/summarywidget.cpp
index 68742248f..ff3d5da9d 100644
--- a/kontact/plugins/korganizer/summarywidget.cpp
+++ b/kontact/plugins/korganizer/summarywidget.cpp
@@ -21,10 +21,10 @@
without including the source code for Qt in the source distribution.
*/
-#include <qcursor.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qtooltip.h>
+#include <tqcursor.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqtooltip.h>
#include <kdialog.h>
#include <kglobal.h>
@@ -50,26 +50,26 @@
#include "summarywidget.h"
-SummaryWidget::SummaryWidget( KOrganizerPlugin *plugin, QWidget *parent,
+SummaryWidget::SummaryWidget( KOrganizerPlugin *plugin, TQWidget *parent,
const char *name )
: Kontact::Summary( parent, name ), mPlugin( plugin ), mCalendar( 0 )
{
- QVBoxLayout *mainLayout = new QVBoxLayout( this, 3, 3 );
+ TQVBoxLayout *mainLayout = new TQVBoxLayout( this, 3, 3 );
- QPixmap icon = KGlobal::iconLoader()->loadIcon( "kontact_date",
+ TQPixmap icon = KGlobal::iconLoader()->loadIcon( "kontact_date",
KIcon::Desktop, KIcon::SizeMedium );
- QWidget *header = createHeader( this, icon, i18n( "Calendar" ) );
+ TQWidget *header = createHeader( this, icon, i18n( "Calendar" ) );
mainLayout->addWidget( header );
- mLayout = new QGridLayout( mainLayout, 7, 5, 3 );
+ mLayout = new TQGridLayout( mainLayout, 7, 5, 3 );
mLayout->setRowStretch( 6, 1 );
mCalendar = KOrg::StdCalendar::self();
mCalendar->load();
- connect( mCalendar, SIGNAL( calendarChanged() ), SLOT( updateView() ) );
- connect( mPlugin->core(), SIGNAL( dayChanged( const QDate& ) ),
- SLOT( updateView() ) );
+ connect( mCalendar, TQT_SIGNAL( calendarChanged() ), TQT_SLOT( updateView() ) );
+ connect( mPlugin->core(), TQT_SIGNAL( dayChanged( const TQDate& ) ),
+ TQT_SLOT( updateView() ) );
updateView();
}
@@ -91,12 +91,12 @@ void SummaryWidget::updateView()
config.setGroup( "Calendar" );
int days = config.readNumEntry( "DaysToShow", 1 );
- QLabel *label = 0;
+ TQLabel *label = 0;
int counter = 0;
- QPixmap pm = loader.loadIcon( "appointment", KIcon::Small );
+ TQPixmap pm = loader.loadIcon( "appointment", KIcon::Small );
- QDate dt;
- QDate currentDate = QDate::currentDate();
+ TQDate dt;
+ TQDate currentDate = TQDate::currentDate();
for ( dt=currentDate;
dt<=currentDate.addDays( days - 1 );
dt=dt.addDays(1) ) {
@@ -108,10 +108,10 @@ void SummaryWidget::updateView()
KCal::Event::List events;
events.setAutoDelete( true );
- QDateTime qdt;
+ TQDateTime qdt;
// prevent implicitely sharing while finding recurring events
- // replacing the QDate with the currentDate
+ // replacing the TQDate with the currentDate
for ( ; it != events_orig.end(); ++it ) {
ev = (*it)->clone();
if ( ev->recursOn( dt ) ) {
@@ -137,7 +137,7 @@ void SummaryWidget::updateView()
// Count number of days remaining in multiday event
int span=1; int dayof=1;
if ( ev->isMultiDay() ) {
- QDate d = ev->dtStart().date();
+ TQDate d = ev->dtStart().date();
if ( d < currentDate ) {
d = currentDate;
}
@@ -155,7 +155,7 @@ void SummaryWidget::updateView()
if ( ev->isMultiDay() && ev->doesFloat() && dayof != 1 ) continue;
// Fill Appointment Pixmap Field
- label = new QLabel( this );
+ label = new TQLabel( this );
label->setPixmap( pm );
label->setMaximumWidth( label->minimumSizeHint().width() );
label->setAlignment( AlignVCenter );
@@ -164,10 +164,10 @@ void SummaryWidget::updateView()
// Fill Event Date Field
bool makeBold = false;
- QString datestr;
+ TQString datestr;
// Modify event date for printing
- QDate sD = QDate::QDate( dt.year(), dt.month(), dt.day() );
+ TQDate sD = TQDate::TQDate( dt.year(), dt.month(), dt.day() );
if ( ( sD.month() == currentDate.month() ) &&
( sD.day() == currentDate.day() ) ) {
datestr = i18n( "Today" );
@@ -187,10 +187,10 @@ void SummaryWidget::updateView()
KGlobal::locale()->formatDate( sD.addDays( span-1 ) );
}
- label = new QLabel( datestr, this );
+ label = new TQLabel( datestr, this );
label->setAlignment( AlignLeft | AlignVCenter );
if ( makeBold ) {
- QFont font = label->font();
+ TQFont font = label->font();
font.setBold( true );
label->setFont( font );
}
@@ -198,9 +198,9 @@ void SummaryWidget::updateView()
mLabels.append( label );
// Fill Event Summary Field
- QString newtext = ev->summary();
+ TQString newtext = ev->summary();
if ( ev->isMultiDay() && !ev->doesFloat() ) {
- newtext.append( QString(" (%1/%2)").arg( dayof ).arg( span ) );
+ newtext.append( TQString(" (%1/%2)").arg( dayof ).arg( span ) );
}
KURLLabel *urlLabel = new KURLLabel( this );
@@ -211,32 +211,32 @@ void SummaryWidget::updateView()
mLayout->addWidget( urlLabel, counter, 2 );
mLabels.append( urlLabel );
- connect( urlLabel, SIGNAL( leftClickedURL( const QString& ) ),
- this, SLOT( viewEvent( const QString& ) ) );
- connect( urlLabel, SIGNAL( rightClickedURL( const QString& ) ),
- this, SLOT( popupMenu( const QString& ) ) );
+ connect( urlLabel, TQT_SIGNAL( leftClickedURL( const TQString& ) ),
+ this, TQT_SLOT( viewEvent( const TQString& ) ) );
+ connect( urlLabel, TQT_SIGNAL( rightClickedURL( const TQString& ) ),
+ this, TQT_SLOT( popupMenu( const TQString& ) ) );
- QString tipText( KCal::IncidenceFormatter::toolTipString( ev, true ) );
+ TQString tipText( KCal::IncidenceFormatter::toolTipString( ev, true ) );
if ( !tipText.isEmpty() ) {
- QToolTip::add( urlLabel, tipText );
+ TQToolTip::add( urlLabel, tipText );
}
// Fill Event Time Range Field (only for non-floating Events)
if ( !ev->doesFloat() ) {
- QTime sST = ev->dtStart().time();
- QTime sET = ev->dtEnd().time();
+ TQTime sST = ev->dtStart().time();
+ TQTime sET = ev->dtEnd().time();
if ( ev->isMultiDay() ) {
if ( ev->dtStart().date() < dt ) {
- sST = QTime::QTime( 0, 0 );
+ sST = TQTime::TQTime( 0, 0 );
}
if ( ev->dtEnd().date() > dt ) {
- sET = QTime::QTime( 23, 59 );
+ sET = TQTime::TQTime( 23, 59 );
}
}
datestr = i18n( "Time from - to", "%1 - %2" )
.arg( KGlobal::locale()->formatTime( sST ) )
.arg( KGlobal::locale()->formatTime( sET ) );
- label = new QLabel( datestr, this );
+ label = new TQLabel( datestr, this );
label->setAlignment( AlignLeft | AlignVCenter );
mLayout->addWidget( label, counter, 3 );
mLabels.append( label );
@@ -247,7 +247,7 @@ void SummaryWidget::updateView()
}
if ( !counter ) {
- QLabel *noEvents = new QLabel(
+ TQLabel *noEvents = new TQLabel(
i18n( "No appointments pending within the next day",
"No appointments pending within the next %n days",
days ), this, "nothing to see" );
@@ -260,29 +260,29 @@ void SummaryWidget::updateView()
label->show();
}
-void SummaryWidget::viewEvent( const QString &uid )
+void SummaryWidget::viewEvent( const TQString &uid )
{
mPlugin->core()->selectPlugin( "kontact_korganizerplugin" ); //ensure loaded
KOrganizerIface_stub iface( "korganizer", "KOrganizerIface" );
iface.editIncidence( uid );
}
-void SummaryWidget::removeEvent( const QString &uid )
+void SummaryWidget::removeEvent( const TQString &uid )
{
mPlugin->core()->selectPlugin( "kontact_korganizerplugin" ); //ensure loaded
KOrganizerIface_stub iface( "korganizer", "KOrganizerIface" );
iface.deleteIncidence( uid, false );
}
-void SummaryWidget::popupMenu( const QString &uid )
+void SummaryWidget::popupMenu( const TQString &uid )
{
KPopupMenu popup( this );
- QToolTip::remove( this );
+ TQToolTip::remove( this );
popup.insertItem( i18n( "&Edit Appointment..." ), 0 );
popup.insertItem( KGlobal::iconLoader()->loadIcon( "editdelete", KIcon::Small),
i18n( "&Delete Appointment" ), 1 );
- switch ( popup.exec( QCursor::pos() ) ) {
+ switch ( popup.exec( TQCursor::pos() ) ) {
case 0:
viewEvent( uid );
break;
@@ -292,22 +292,22 @@ void SummaryWidget::popupMenu( const QString &uid )
}
}
-bool SummaryWidget::eventFilter( QObject *obj, QEvent* e )
+bool SummaryWidget::eventFilter( TQObject *obj, TQEvent* e )
{
if ( obj->inherits( "KURLLabel" ) ) {
KURLLabel* label = static_cast<KURLLabel*>( obj );
- if ( e->type() == QEvent::Enter )
+ if ( e->type() == TQEvent::Enter )
emit message( i18n( "Edit Appointment: \"%1\"" ).arg( label->text() ) );
- if ( e->type() == QEvent::Leave )
- emit message( QString::null );
+ if ( e->type() == TQEvent::Leave )
+ emit message( TQString::null );
}
return Kontact::Summary::eventFilter( obj, e );
}
-QStringList SummaryWidget::configModules() const
+TQStringList SummaryWidget::configModules() const
{
- return QStringList( "kcmkorgsummary.desktop" );
+ return TQStringList( "kcmkorgsummary.desktop" );
}
#include "summarywidget.moc"
diff --git a/kontact/plugins/korganizer/summarywidget.h b/kontact/plugins/korganizer/summarywidget.h
index c9c572eca..a88d50dd9 100644
--- a/kontact/plugins/korganizer/summarywidget.h
+++ b/kontact/plugins/korganizer/summarywidget.h
@@ -24,8 +24,8 @@
#ifndef SUMMARYWIDGET_H
#define SUMMARYWIDGET_H
-#include <qptrlist.h>
-#include <qwidget.h>
+#include <tqptrlist.h>
+#include <tqwidget.h>
#include <libkcal/calendarresources.h>
@@ -41,29 +41,29 @@ class SummaryWidget : public Kontact::Summary
Q_OBJECT
public:
- SummaryWidget( KOrganizerPlugin *plugin, QWidget *parent,
+ SummaryWidget( KOrganizerPlugin *plugin, TQWidget *parent,
const char *name = 0 );
~SummaryWidget();
int summaryHeight() const { return 3; }
- QStringList configModules() const;
+ TQStringList configModules() const;
public slots:
void updateSummary( bool force = false ) { Q_UNUSED( force ); updateView(); }
protected:
- virtual bool eventFilter( QObject *obj, QEvent* e );
+ virtual bool eventFilter( TQObject *obj, TQEvent* e );
private slots:
void updateView();
- void popupMenu( const QString &uid );
- void viewEvent( const QString &uid );
- void removeEvent( const QString &uid );
+ void popupMenu( const TQString &uid );
+ void viewEvent( const TQString &uid );
+ void removeEvent( const TQString &uid );
private:
KOrganizerPlugin *mPlugin;
- QGridLayout *mLayout;
+ TQGridLayout *mLayout;
- QPtrList<QLabel> mLabels;
+ TQPtrList<TQLabel> mLabels;
KCal::CalendarResources *mCalendar;
};
diff --git a/kontact/plugins/korganizer/todoplugin.cpp b/kontact/plugins/korganizer/todoplugin.cpp
index 4cb281b84..3b6ab214f 100644
--- a/kontact/plugins/korganizer/todoplugin.cpp
+++ b/kontact/plugins/korganizer/todoplugin.cpp
@@ -22,9 +22,9 @@
without including the source code for Qt in the source distribution.
*/
-#include <qwidget.h>
-#include <qdragobject.h>
-#include <qfile.h>
+#include <tqwidget.h>
+#include <tqdragobject.h>
+#include <tqfile.h>
#include <kapplication.h>
#include <kabc/vcardconverter.h>
@@ -54,7 +54,7 @@ typedef KGenericFactory< TodoPlugin, Kontact::Core > TodoPluginFactory;
K_EXPORT_COMPONENT_FACTORY( libkontact_todoplugin,
TodoPluginFactory( "kontact_todoplugin" ) )
-TodoPlugin::TodoPlugin( Kontact::Core *core, const char *, const QStringList& )
+TodoPlugin::TodoPlugin( Kontact::Core *core, const char *, const TQStringList& )
: Kontact::Plugin( core, core, "korganizer" ),
mIface( 0 )
{
@@ -62,11 +62,11 @@ TodoPlugin::TodoPlugin( Kontact::Core *core, const char *, const QStringList& )
instance()->iconLoader()->addAppDir("kdepim");
insertNewAction( new KAction( i18n( "New To-do..." ), "newtodo",
- CTRL+SHIFT+Key_T, this, SLOT( slotNewTodo() ), actionCollection(),
+ CTRL+SHIFT+Key_T, this, TQT_SLOT( slotNewTodo() ), actionCollection(),
"new_todo" ) );
insertSyncAction( new KAction( i18n( "Synchronize To-do List" ), "reload",
- 0, this, SLOT( slotSyncTodos() ), actionCollection(),
+ 0, this, TQT_SLOT( slotSyncTodos() ), actionCollection(),
"todo_sync" ) );
mUniqueAppWatcher = new Kontact::UniqueAppWatcher(
@@ -77,7 +77,7 @@ TodoPlugin::~TodoPlugin()
{
}
-Kontact::Summary *TodoPlugin::createSummaryWidget( QWidget *parent )
+Kontact::Summary *TodoPlugin::createSummaryWidget( TQWidget *parent )
{
return new TodoSummaryWidget( this, parent );
}
@@ -100,9 +100,9 @@ void TodoPlugin::select()
interface()->showTodoView();
}
-QStringList TodoPlugin::invisibleToolbarActions() const
+TQStringList TodoPlugin::invisibleToolbarActions() const
{
- QStringList invisible;
+ TQStringList invisible;
invisible += "new_event";
invisible += "new_todo";
invisible += "new_journal";
@@ -134,10 +134,10 @@ void TodoPlugin::slotNewTodo()
void TodoPlugin::slotSyncTodos()
{
DCOPRef ref( "kmail", "KMailICalIface" );
- ref.send( "triggerSync", QString("Todo") );
+ ref.send( "triggerSync", TQString("Todo") );
}
-bool TodoPlugin::createDCOPInterface( const QString& serviceType )
+bool TodoPlugin::createDCOPInterface( const TQString& serviceType )
{
kdDebug(5602) << k_funcinfo << serviceType << endl;
if ( serviceType == "DCOP/Organizer" || serviceType == "DCOP/Calendar" ) {
@@ -148,9 +148,9 @@ bool TodoPlugin::createDCOPInterface( const QString& serviceType )
return false;
}
-bool TodoPlugin::canDecodeDrag( QMimeSource *mimeSource )
+bool TodoPlugin::canDecodeDrag( TQMimeSource *mimeSource )
{
- return QTextDrag::canDecode( mimeSource ) ||
+ return TQTextDrag::canDecode( mimeSource ) ||
KPIM::MailListDrag::canDecode( mimeSource );
}
@@ -159,25 +159,25 @@ bool TodoPlugin::isRunningStandalone()
return mUniqueAppWatcher->isRunningStandalone();
}
-void TodoPlugin::processDropEvent( QDropEvent *event )
+void TodoPlugin::processDropEvent( TQDropEvent *event )
{
- QString text;
+ TQString text;
KABC::VCardConverter converter;
if ( KVCardDrag::canDecode( event ) && KVCardDrag::decode( event, text ) ) {
KABC::Addressee::List contacts = converter.parseVCards( text );
KABC::Addressee::List::Iterator it;
- QStringList attendees;
+ TQStringList attendees;
for ( it = contacts.begin(); it != contacts.end(); ++it ) {
- QString email = (*it).fullEmail();
+ TQString email = (*it).fullEmail();
if ( email.isEmpty() )
attendees.append( (*it).realName() + "<>" );
else
attendees.append( email );
}
- interface()->openTodoEditor( i18n( "Meeting" ), QString::null, QString::null,
+ interface()->openTodoEditor( i18n( "Meeting" ), TQString::null, TQString::null,
attendees );
return;
}
@@ -189,14 +189,14 @@ void TodoPlugin::processDropEvent( QDropEvent *event )
if ( !journals.isEmpty() ) {
event->accept();
KCal::Journal *j = journals.first();
- interface()->openTodoEditor( i18n("Note: %1").arg( j->summary() ), j->description(), QString() );
+ interface()->openTodoEditor( i18n("Note: %1").arg( j->summary() ), j->description(), TQString() );
return;
}
// else fall through to text decoding
}
}
- if ( QTextDrag::decode( event, text ) ) {
+ if ( TQTextDrag::decode( event, text ) ) {
interface()->openTodoEditor( text );
return;
}
@@ -208,17 +208,17 @@ void TodoPlugin::processDropEvent( QDropEvent *event )
i18n("Drops of multiple mails are not supported." ) );
} else {
KPIM::MailSummary mail = mails.first();
- QString txt = i18n("From: %1\nTo: %2\nSubject: %3").arg( mail.from() )
+ TQString txt = i18n("From: %1\nTo: %2\nSubject: %3").arg( mail.from() )
.arg( mail.to() ).arg( mail.subject() );
KTempFile tf;
tf.setAutoDelete( true );
- QString uri = "kmail:" + QString::number( mail.serialNumber() ) + "/" +
+ TQString uri = "kmail:" + TQString::number( mail.serialNumber() ) + "/" +
mail.messageId();
tf.file()->writeBlock( event->encodedData( "message/rfc822" ) );
tf.close();
interface()->openTodoEditor( i18n("Mail: %1").arg( mail.subject() ), txt,
- uri, tf.name(), QStringList(), "message/rfc822" );
+ uri, tf.name(), TQStringList(), "message/rfc822" );
}
return;
}
diff --git a/kontact/plugins/korganizer/todoplugin.h b/kontact/plugins/korganizer/todoplugin.h
index ce0cb5823..5fc13316f 100644
--- a/kontact/plugins/korganizer/todoplugin.h
+++ b/kontact/plugins/korganizer/todoplugin.h
@@ -35,19 +35,19 @@ class TodoPlugin : public Kontact::Plugin
{
Q_OBJECT
public:
- TodoPlugin( Kontact::Core *core, const char *name, const QStringList& );
+ TodoPlugin( Kontact::Core *core, const char *name, const TQStringList& );
~TodoPlugin();
- virtual bool createDCOPInterface( const QString& serviceType );
+ virtual bool createDCOPInterface( const TQString& serviceType );
virtual bool isRunningStandalone();
int weight() const { return 450; }
- bool canDecodeDrag( QMimeSource * );
- void processDropEvent( QDropEvent * );
+ bool canDecodeDrag( TQMimeSource * );
+ void processDropEvent( TQDropEvent * );
- virtual QStringList invisibleToolbarActions() const;
+ virtual TQStringList invisibleToolbarActions() const;
- virtual Kontact::Summary *createSummaryWidget( QWidget *parent );
+ virtual Kontact::Summary *createSummaryWidget( TQWidget *parent );
void select();
diff --git a/kontact/plugins/korganizer/todosummarywidget.cpp b/kontact/plugins/korganizer/todosummarywidget.cpp
index d52941ee4..e58ee6aa0 100644
--- a/kontact/plugins/korganizer/todosummarywidget.cpp
+++ b/kontact/plugins/korganizer/todosummarywidget.cpp
@@ -21,10 +21,10 @@
without including the source code for Qt in the source distribution.
*/
-#include <qcursor.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qtooltip.h>
+#include <tqcursor.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqtooltip.h>
#include <kdialog.h>
#include <kglobal.h>
@@ -53,25 +53,25 @@
#include "todosummarywidget.h"
TodoSummaryWidget::TodoSummaryWidget( TodoPlugin *plugin,
- QWidget *parent, const char *name )
+ TQWidget *parent, const char *name )
: Kontact::Summary( parent, name ), mPlugin( plugin )
{
- QVBoxLayout *mainLayout = new QVBoxLayout( this, 3, 3 );
+ TQVBoxLayout *mainLayout = new TQVBoxLayout( this, 3, 3 );
- QPixmap icon = KGlobal::iconLoader()->loadIcon( "kontact_todo",
+ TQPixmap icon = KGlobal::iconLoader()->loadIcon( "kontact_todo",
KIcon::Desktop, KIcon::SizeMedium );
- QWidget *header = createHeader( this, icon, i18n( "To-do" ) );
+ TQWidget *header = createHeader( this, icon, i18n( "To-do" ) );
mainLayout->addWidget( header );
- mLayout = new QGridLayout( mainLayout, 7, 4, 3 );
+ mLayout = new TQGridLayout( mainLayout, 7, 4, 3 );
mLayout->setRowStretch( 6, 1 );
mCalendar = KOrg::StdCalendar::self();
mCalendar->load();
- connect( mCalendar, SIGNAL( calendarChanged() ), SLOT( updateView() ) );
- connect( mPlugin->core(), SIGNAL( dayChanged( const QDate& ) ),
- SLOT( updateView() ) );
+ connect( mCalendar, TQT_SIGNAL( calendarChanged() ), TQT_SLOT( updateView() ) );
+ connect( mPlugin->core(), TQT_SIGNAL( dayChanged( const TQDate& ) ),
+ TQT_SLOT( updateView() ) );
updateView();
}
@@ -92,19 +92,19 @@ void TodoSummaryWidget::updateView()
KIconLoader loader( "kdepim" );
- QLabel *label = 0;
+ TQLabel *label = 0;
int counter = 0;
- QDate currentDate = QDate::currentDate();
+ TQDate currentDate = TQDate::currentDate();
KCal::Todo::List todos = mCalendar->todos();
if ( todos.count() > 0 ) {
- QPixmap pm = loader.loadIcon( "todo", KIcon::Small );
+ TQPixmap pm = loader.loadIcon( "todo", KIcon::Small );
KCal::Todo::List::ConstIterator it;
for ( it = todos.begin(); it != todos.end(); ++it ) {
KCal::Todo *todo = *it;
bool accepted = false;
- QString stateText;
+ TQString stateText;
// show all incomplete todos
if ( showAllTodos && !todo->isCompleted())
@@ -140,19 +140,19 @@ void TodoSummaryWidget::updateView()
if ( !accepted )
continue;
- label = new QLabel( this );
+ label = new TQLabel( this );
label->setPixmap( pm );
- label->setSizePolicy( QSizePolicy::Maximum, QSizePolicy::Maximum );
+ label->setSizePolicy( TQSizePolicy::Maximum, TQSizePolicy::Maximum );
mLayout->addWidget( label, counter, 0 );
mLabels.append( label );
- label = new QLabel( QString::number( todo->percentComplete() ) + "%", this );
+ label = new TQLabel( TQString::number( todo->percentComplete() ) + "%", this );
label->setAlignment( AlignHCenter | AlignVCenter );
- label->setSizePolicy( QSizePolicy::Maximum, QSizePolicy::Maximum );
+ label->setSizePolicy( TQSizePolicy::Maximum, TQSizePolicy::Maximum );
mLayout->addWidget( label, counter, 1 );
mLabels.append( label );
- QString sSummary = todo->summary();
+ TQString sSummary = todo->summary();
if ( todo->relatedTo() ) { // show parent only, not entire ancestry
sSummary = todo->relatedTo()->summary() + ":" + todo->summary();
}
@@ -164,19 +164,19 @@ void TodoSummaryWidget::updateView()
mLayout->addWidget( urlLabel, counter, 2 );
mLabels.append( urlLabel );
- connect( urlLabel, SIGNAL( leftClickedURL( const QString& ) ),
- this, SLOT( viewTodo( const QString& ) ) );
- connect( urlLabel, SIGNAL( rightClickedURL( const QString& ) ),
- this, SLOT( popupMenu( const QString& ) ) );
+ connect( urlLabel, TQT_SIGNAL( leftClickedURL( const TQString& ) ),
+ this, TQT_SLOT( viewTodo( const TQString& ) ) );
+ connect( urlLabel, TQT_SIGNAL( rightClickedURL( const TQString& ) ),
+ this, TQT_SLOT( popupMenu( const TQString& ) ) );
- QString tipText( KCal::IncidenceFormatter::toolTipString( todo, true ) );
+ TQString tipText( KCal::IncidenceFormatter::toolTipString( todo, true ) );
if ( !tipText.isEmpty() ) {
- QToolTip::add( urlLabel, tipText );
+ TQToolTip::add( urlLabel, tipText );
}
- label = new QLabel( stateText, this );
+ label = new TQLabel( stateText, this );
label->setAlignment( AlignLeft | AlignVCenter );
- label->setSizePolicy( QSizePolicy::Maximum, QSizePolicy::Maximum );
+ label->setSizePolicy( TQSizePolicy::Maximum, TQSizePolicy::Maximum );
mLayout->addWidget( label, counter, 3 );
mLabels.append( label );
@@ -185,7 +185,7 @@ void TodoSummaryWidget::updateView()
}
if ( counter == 0 ) {
- QLabel *noTodos = new QLabel( i18n( "No to-dos pending" ), this );
+ TQLabel *noTodos = new TQLabel( i18n( "No to-dos pending" ), this );
noTodos->setAlignment( AlignHCenter | AlignVCenter );
mLayout->addWidget( noTodos, 0, 1 );
mLabels.append( noTodos );
@@ -195,27 +195,27 @@ void TodoSummaryWidget::updateView()
label->show();
}
-void TodoSummaryWidget::viewTodo( const QString &uid )
+void TodoSummaryWidget::viewTodo( const TQString &uid )
{
mPlugin->core()->selectPlugin( "kontact_todoplugin" );//ensure loaded
KOrganizerIface_stub iface( "korganizer", "KOrganizerIface" );
iface.editIncidence( uid );
}
-void TodoSummaryWidget::removeTodo( const QString &uid )
+void TodoSummaryWidget::removeTodo( const TQString &uid )
{
mPlugin->core()->selectPlugin( "kontact_todoplugin" );//ensure loaded
KOrganizerIface_stub iface( "korganizer", "KOrganizerIface" );
iface.deleteIncidence( uid, false );
}
-void TodoSummaryWidget::completeTodo( const QString &uid )
+void TodoSummaryWidget::completeTodo( const TQString &uid )
{
KCal::Todo *todo = mCalendar->todo( uid );
IncidenceChanger *changer = new IncidenceChanger( mCalendar, this );
if ( !todo->isReadOnly() && changer->beginChange( todo ) ) {
KCal::Todo *oldTodo = todo->clone();
- todo->setCompleted( QDateTime::currentDateTime() );
+ todo->setCompleted( TQDateTime::currentDateTime() );
changer->changeIncidence( oldTodo, todo, KOGlobals::COMPLETION_MODIFIED );
changer->endChange( todo );
delete oldTodo;
@@ -223,10 +223,10 @@ void TodoSummaryWidget::completeTodo( const QString &uid )
}
}
-void TodoSummaryWidget::popupMenu( const QString &uid )
+void TodoSummaryWidget::popupMenu( const TQString &uid )
{
KPopupMenu popup( this );
- QToolTip::remove( this );
+ TQToolTip::remove( this );
popup.insertItem( i18n( "&Edit To-do..." ), 0 );
popup.insertItem( KGlobal::iconLoader()->loadIcon( "editdelete", KIcon::Small),
i18n( "&Delete To-do" ), 1 );
@@ -236,7 +236,7 @@ void TodoSummaryWidget::popupMenu( const QString &uid )
i18n( "&Mark To-do Completed" ), 2 );
}
- switch ( popup.exec( QCursor::pos() ) ) {
+ switch ( popup.exec( TQCursor::pos() ) ) {
case 0:
viewTodo( uid );
break;
@@ -249,22 +249,22 @@ void TodoSummaryWidget::popupMenu( const QString &uid )
}
}
-bool TodoSummaryWidget::eventFilter( QObject *obj, QEvent* e )
+bool TodoSummaryWidget::eventFilter( TQObject *obj, TQEvent* e )
{
if ( obj->inherits( "KURLLabel" ) ) {
KURLLabel* label = static_cast<KURLLabel*>( obj );
- if ( e->type() == QEvent::Enter )
+ if ( e->type() == TQEvent::Enter )
emit message( i18n( "Edit To-do: \"%1\"" ).arg( label->text() ) );
- if ( e->type() == QEvent::Leave )
- emit message( QString::null );
+ if ( e->type() == TQEvent::Leave )
+ emit message( TQString::null );
}
return Kontact::Summary::eventFilter( obj, e );
}
-QStringList TodoSummaryWidget::configModules() const
+TQStringList TodoSummaryWidget::configModules() const
{
- return QStringList( "kcmtodosummary.desktop" );
+ return TQStringList( "kcmtodosummary.desktop" );
}
#include "todosummarywidget.moc"
diff --git a/kontact/plugins/korganizer/todosummarywidget.h b/kontact/plugins/korganizer/todosummarywidget.h
index d5aca429e..029dec9a7 100644
--- a/kontact/plugins/korganizer/todosummarywidget.h
+++ b/kontact/plugins/korganizer/todosummarywidget.h
@@ -24,8 +24,8 @@
#ifndef TODO_SUMMARYWIDGET_H
#define TODO_SUMMARYWIDGET_H
-#include <qptrlist.h>
-#include <qwidget.h>
+#include <tqptrlist.h>
+#include <tqwidget.h>
#include <libkcal/calendarresources.h>
@@ -41,31 +41,31 @@ class TodoSummaryWidget : public Kontact::Summary
Q_OBJECT
public:
- TodoSummaryWidget( TodoPlugin *plugin, QWidget *parent,
+ TodoSummaryWidget( TodoPlugin *plugin, TQWidget *parent,
const char *name = 0 );
~TodoSummaryWidget();
int summaryHeight() const { return 3; }
- QStringList configModules() const;
+ TQStringList configModules() const;
public slots:
void updateSummary( bool force = false ) { Q_UNUSED( force ); updateView(); }
protected:
- virtual bool eventFilter( QObject *obj, QEvent* e );
+ virtual bool eventFilter( TQObject *obj, TQEvent* e );
private slots:
void updateView();
- void popupMenu( const QString &uid );
- void viewTodo( const QString &uid );
- void removeTodo( const QString &uid );
- void completeTodo( const QString &uid );
+ void popupMenu( const TQString &uid );
+ void viewTodo( const TQString &uid );
+ void removeTodo( const TQString &uid );
+ void completeTodo( const TQString &uid );
private:
TodoPlugin *mPlugin;
- QGridLayout *mLayout;
+ TQGridLayout *mLayout;
- QPtrList<QLabel> mLabels;
+ TQPtrList<TQLabel> mLabels;
KCal::CalendarResources *mCalendar;
};
diff --git a/kontact/plugins/kpilot/kpilot_plugin.cpp b/kontact/plugins/kpilot/kpilot_plugin.cpp
index ed6104bd4..953c5f255 100644
--- a/kontact/plugins/kpilot/kpilot_plugin.cpp
+++ b/kontact/plugins/kpilot/kpilot_plugin.cpp
@@ -34,7 +34,7 @@ typedef KGenericFactory< KPilotPlugin, Kontact::Core > KPilotPluginFactory;
K_EXPORT_COMPONENT_FACTORY( libkontact_kpilotplugin,
KPilotPluginFactory( "kontact_kpilotplugin" ) )
-KPilotPlugin::KPilotPlugin( Kontact::Core *core, const char *name, const QStringList& )
+KPilotPlugin::KPilotPlugin( Kontact::Core *core, const char *name, const TQStringList& )
: Kontact::Plugin( core, core, "kpilot" ), mAboutData( 0 )
{
setInstance( KPilotPluginFactory::instance() );
@@ -43,7 +43,7 @@ KPilotPlugin::KPilotPlugin( Kontact::Core *core, const char *name, const QString
}
-Kontact::Summary *KPilotPlugin::createSummaryWidget( QWidget *parentWidget )
+Kontact::Summary *KPilotPlugin::createSummaryWidget( TQWidget *parentWidget )
{
return new SummaryWidget( parentWidget );
}
diff --git a/kontact/plugins/kpilot/kpilot_plugin.h b/kontact/plugins/kpilot/kpilot_plugin.h
index 9b76bd644..5695d2605 100644
--- a/kontact/plugins/kpilot/kpilot_plugin.h
+++ b/kontact/plugins/kpilot/kpilot_plugin.h
@@ -30,13 +30,13 @@ class SummaryWidget;
class KPilotPlugin : public Kontact::Plugin
{
public:
- KPilotPlugin( Kontact::Core *core, const char *name, const QStringList& );
+ KPilotPlugin( Kontact::Core *core, const char *name, const TQStringList& );
KPilotPlugin();
- virtual Kontact::Summary *createSummaryWidget( QWidget *parentWidget );
+ virtual Kontact::Summary *createSummaryWidget( TQWidget *parentWidget );
virtual bool showInSideBar() const { return false; }
-// virtual QStringList configModules() const;
+// virtual TQStringList configModules() const;
const KAboutData *aboutData();
diff --git a/kontact/plugins/kpilot/summarywidget.cpp b/kontact/plugins/kpilot/summarywidget.cpp
index 4230e6479..779a55c19 100644
--- a/kontact/plugins/kpilot/summarywidget.cpp
+++ b/kontact/plugins/kpilot/summarywidget.cpp
@@ -22,14 +22,14 @@
without including the source code for Qt in the source distribution.
*/
-#include <qimage.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qtooltip.h>
-#include <qfile.h>
-#include <qlabel.h>
-#include <qtextedit.h>
-#include <qvbox.h>
+#include <tqimage.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqtooltip.h>
+#include <tqfile.h>
+#include <tqlabel.h>
+#include <tqtextedit.h>
+#include <tqvbox.h>
#include <dcopclient.h>
#include <dcopref.h>
@@ -49,77 +49,77 @@
#include "summarywidget.h"
-SummaryWidget::SummaryWidget( QWidget *parent, const char *name )
+SummaryWidget::SummaryWidget( TQWidget *parent, const char *name )
: Kontact::Summary( parent, name ),
DCOPObject( "KPilotSummaryWidget" ),
mDCOPSuccess( false ),
mStartedDaemon( false ),
mShouldStopDaemon( true )
{
- mLayout = new QGridLayout( this, 2, 3, 3, 3 );
+ mLayout = new TQGridLayout( this, 2, 3, 3, 3 );
int row=0;
- QPixmap icon = KGlobal::iconLoader()->loadIcon( "kpilot", KIcon::Desktop, KIcon::SizeMedium );
- QWidget *header = createHeader( this, icon, i18n( "KPilot Configuration" ) );
+ TQPixmap icon = KGlobal::iconLoader()->loadIcon( "kpilot", KIcon::Desktop, KIcon::SizeMedium );
+ TQWidget *header = createHeader( this, icon, i18n( "KPilot Configuration" ) );
mLayout->addMultiCellWidget( header, row,row, 0,3 );
// Last sync information
row++;
- mSyncTimeTextLabel = new QLabel( i18n( "<i>Last sync:</i>" ), this);
+ mSyncTimeTextLabel = new TQLabel( i18n( "<i>Last sync:</i>" ), this);
mLayout->addWidget( mSyncTimeTextLabel, row, 0 );
- mSyncTimeLabel = new QLabel( i18n( "No information available" ), this );
+ mSyncTimeLabel = new TQLabel( i18n( "No information available" ), this );
mLayout->addWidget( mSyncTimeLabel, row, 1 );
mShowSyncLogLabel = new KURLLabel( "", i18n( "[View Sync Log]" ), this );
mLayout->addWidget( mShowSyncLogLabel, row, 3 );
- connect( mShowSyncLogLabel, SIGNAL( leftClickedURL( const QString& ) ),
- this, SLOT( showSyncLog( const QString& ) ) );
+ connect( mShowSyncLogLabel, TQT_SIGNAL( leftClickedURL( const TQString& ) ),
+ this, TQT_SLOT( showSyncLog( const TQString& ) ) );
// User
row++;
- mPilotUserTextLabel = new QLabel( i18n( "<i>User:</i>" ), this);
+ mPilotUserTextLabel = new TQLabel( i18n( "<i>User:</i>" ), this);
mLayout->addWidget( mPilotUserTextLabel, row, 0);
- mPilotUserLabel = new QLabel( i18n( "Unknown" ), this );
+ mPilotUserLabel = new TQLabel( i18n( "Unknown" ), this );
mLayout->addMultiCellWidget( mPilotUserLabel, row, row, 1, 3 );
// Device information
row++;
- mPilotDeviceTextLabel = new QLabel( i18n( "<i>Device:</i>" ), this);
+ mPilotDeviceTextLabel = new TQLabel( i18n( "<i>Device:</i>" ), this);
mLayout->addWidget( mPilotDeviceTextLabel, row, 0 );
- mPilotDeviceLabel = new QLabel( i18n( "Unknown" ), this );
+ mPilotDeviceLabel = new TQLabel( i18n( "Unknown" ), this );
mLayout->addMultiCellWidget( mPilotDeviceLabel, row, row, 1, 3 );
// Status
row++;
- mDaemonStatusTextLabel = new QLabel( i18n( "<i>Status:</i>" ), this);
+ mDaemonStatusTextLabel = new TQLabel( i18n( "<i>Status:</i>" ), this);
mLayout->addWidget( mDaemonStatusTextLabel, row, 0 );
- mDaemonStatusLabel = new QLabel( i18n( "No communication with the daemon possible" ), this );
+ mDaemonStatusLabel = new TQLabel( i18n( "No communication with the daemon possible" ), this );
mLayout->addMultiCellWidget( mDaemonStatusLabel, row, row, 1, 3 );
// Conduits:
row++;
- mConduitsTextLabel = new QLabel( i18n( "<i>Conduits:</i>" ), this );
+ mConduitsTextLabel = new TQLabel( i18n( "<i>Conduits:</i>" ), this );
mConduitsTextLabel->setAlignment( AlignAuto | AlignTop | ExpandTabs );
mLayout->addWidget( mConduitsTextLabel, row, 0 );
- mConduitsLabel = new QLabel( i18n( "No information available" ), this );
+ mConduitsLabel = new TQLabel( i18n( "No information available" ), this );
mConduitsLabel->setAlignment( mConduitsLabel->alignment() | Qt::WordBreak );
mLayout->addMultiCellWidget( mConduitsLabel, row, row, 1, 3 );
// widgets shown if kpilotDaemon is not running
row++;
- mNoConnectionLabel = new QLabel( i18n( "KPilot is currently not running." ), this );
+ mNoConnectionLabel = new TQLabel( i18n( "KPilot is currently not running." ), this );
mLayout->addMultiCellWidget( mNoConnectionLabel, row, row, 1, 2 );
mNoConnectionStartLabel = new KURLLabel( "", i18n( "[Start KPilot]" ), this );
mLayout->addWidget( mNoConnectionStartLabel, row, 3 );
- connect( mNoConnectionStartLabel, SIGNAL( leftClickedURL( const QString& ) ),
- this, SLOT( startKPilot() ) );
+ connect( mNoConnectionStartLabel, TQT_SIGNAL( leftClickedURL( const TQString& ) ),
+ this, TQT_SLOT( startKPilot() ) );
if ( !kapp->dcopClient()->isApplicationRegistered( "kpilotDaemon" ) ) {
startKPilot();
}
- connectDCOPSignal( 0, 0, "kpilotDaemonStatusDetails(QDateTime,QString,QStringList,QString,QString,QString,bool)",
- "receiveDaemonStatusDetails(QDateTime,QString,QStringList,QString,QString,QString,bool)", false );
- connect( kapp->dcopClient(), SIGNAL( applicationRemoved( const QCString & ) ), SLOT( slotAppRemoved( const QCString& ) ) );
+ connectDCOPSignal( 0, 0, "kpilotDaemonStatusDetails(TQDateTime,TQString,TQStringList,TQString,TQString,TQString,bool)",
+ "receiveDaemonStatusDetails(TQDateTime,TQString,TQStringList,TQString,TQString,TQString,bool)", false );
+ connect( kapp->dcopClient(), TQT_SIGNAL( applicationRemoved( const TQCString & ) ), TQT_SLOT( slotAppRemoved( const TQCString& ) ) );
}
SummaryWidget::~SummaryWidget()
@@ -130,14 +130,14 @@ SummaryWidget::~SummaryWidget()
}
}
-QStringList SummaryWidget::configModules() const
+TQStringList SummaryWidget::configModules() const
{
- QStringList modules;
+ TQStringList modules;
modules << "kpilot_config.desktop";
return modules;
}
-void SummaryWidget::receiveDaemonStatusDetails(QDateTime lastSyncTime, QString status, QStringList conduits, QString logFileName, QString userName, QString pilotDevice, bool killOnExit )
+void SummaryWidget::receiveDaemonStatusDetails(TQDateTime lastSyncTime, TQString status, TQStringList conduits, TQString logFileName, TQString userName, TQString pilotDevice, bool killOnExit )
{
mDCOPSuccess = true;
mLastSyncTime = lastSyncTime;
@@ -192,43 +192,43 @@ void SummaryWidget::updateView()
mNoConnectionStartLabel->setShown( !mDCOPSuccess );
}
-void SummaryWidget::showSyncLog( const QString &filename )
+void SummaryWidget::showSyncLog( const TQString &filename )
{
- KDialogBase dlg( this, 0, true, QString::null, KDialogBase::Ok, KDialogBase::Ok );
+ KDialogBase dlg( this, 0, true, TQString::null, KDialogBase::Ok, KDialogBase::Ok );
dlg.setCaption( i18n( "KPilot HotSync Log" ) );
- QTextEdit *edit = new QTextEdit( dlg.makeVBoxMainWidget() );
+ TQTextEdit *edit = new TQTextEdit( dlg.makeVBoxMainWidget() );
edit->setReadOnly( true );
- QFile f(filename);
+ TQFile f(filename);
if ( !f.open( IO_ReadOnly ) ) {
KMessageBox::error( this, i18n( "Unable to open Hotsync log %1." ).arg( filename ) );
return;
}
- QTextStream s( &f );
+ TQTextStream s( &f );
while ( !s.eof() )
edit->append( s.readLine() );
- edit->moveCursor( QTextEdit::MoveHome, false );
+ edit->moveCursor( TQTextEdit::MoveHome, false );
f.close();
- dlg.setInitialSize( QSize( 400, 350 ) );
+ dlg.setInitialSize( TQSize( 400, 350 ) );
dlg.exec();
}
void SummaryWidget::startKPilot()
{
- QString error;
- QCString appID;
- if ( !KApplication::kdeinitExec( "kpilotDaemon", QString( "--fail-silently" ) ) ) {
+ TQString error;
+ TQCString appID;
+ if ( !KApplication::kdeinitExec( "kpilotDaemon", TQString( "--fail-silently" ) ) ) {
kdDebug(5602) << "No service available..." << endl;
mStartedDaemon = true;
}
}
-void SummaryWidget::slotAppRemoved( const QCString & appId )
+void SummaryWidget::slotAppRemoved( const TQCString & appId )
{
if ( appId == "kpilotDaemon" )
{
diff --git a/kontact/plugins/kpilot/summarywidget.h b/kontact/plugins/kpilot/summarywidget.h
index 94fda7e55..ab221b4c2 100644
--- a/kontact/plugins/kpilot/summarywidget.h
+++ b/kontact/plugins/kpilot/summarywidget.h
@@ -30,13 +30,13 @@
#include <dcopobject.h>
#include <pilotDaemonDCOP.h>
-#include <qmap.h>
-#include <qpixmap.h>
-#include <qptrlist.h>
-#include <qstringlist.h>
-#include <qtimer.h>
-#include <qwidget.h>
-#include <qdatetime.h>
+#include <tqmap.h>
+#include <tqpixmap.h>
+#include <tqptrlist.h>
+#include <tqstringlist.h>
+#include <tqtimer.h>
+#include <tqwidget.h>
+#include <tqdatetime.h>
class QGridLayout;
class QLabel;
@@ -48,47 +48,47 @@ class SummaryWidget : public Kontact::Summary, public DCOPObject
K_DCOP
public:
- SummaryWidget( QWidget *parent, const char *name = 0 );
+ SummaryWidget( TQWidget *parent, const char *name = 0 );
virtual ~SummaryWidget();
int summaryHeight() const { return 1; }
- QStringList configModules() const;
+ TQStringList configModules() const;
k_dcop:
// all the information is pushed to Kontact by the daemon, to remove the chance of Kontact calling a daemon
// that is blocked for some reason, and blocking itself.
- void receiveDaemonStatusDetails( QDateTime, QString, QStringList, QString, QString, QString, bool );
+ void receiveDaemonStatusDetails( TQDateTime, TQString, TQStringList, TQString, TQString, TQString, bool );
private slots:
void updateView();
- void showSyncLog( const QString &filename );
+ void showSyncLog( const TQString &filename );
void startKPilot();
- void slotAppRemoved( const QCString & );
+ void slotAppRemoved( const TQCString & );
private:
- QTimer mTimer;
+ TQTimer mTimer;
- QLabel*mSyncTimeTextLabel;
- QLabel*mSyncTimeLabel;
+ TQLabel*mSyncTimeTextLabel;
+ TQLabel*mSyncTimeLabel;
KURLLabel*mShowSyncLogLabel;
- QLabel*mPilotUserTextLabel;
- QLabel*mPilotUserLabel;
- QLabel*mPilotDeviceTextLabel;
- QLabel*mPilotDeviceLabel;
- QLabel*mDaemonStatusTextLabel;
- QLabel*mDaemonStatusLabel;
- QLabel*mConduitsTextLabel;
- QLabel*mConduitsLabel;
- QLabel*mNoConnectionLabel;
+ TQLabel*mPilotUserTextLabel;
+ TQLabel*mPilotUserLabel;
+ TQLabel*mPilotDeviceTextLabel;
+ TQLabel*mPilotDeviceLabel;
+ TQLabel*mDaemonStatusTextLabel;
+ TQLabel*mDaemonStatusLabel;
+ TQLabel*mConduitsTextLabel;
+ TQLabel*mConduitsLabel;
+ TQLabel*mNoConnectionLabel;
KURLLabel*mNoConnectionStartLabel;
- QGridLayout *mLayout;
+ TQGridLayout *mLayout;
- QDateTime mLastSyncTime;
- QString mDaemonStatus;
- QStringList mConduits;
- QString mSyncLog;
- QString mUserName;
- QString mPilotDevice;
+ TQDateTime mLastSyncTime;
+ TQString mDaemonStatus;
+ TQStringList mConduits;
+ TQString mSyncLog;
+ TQString mUserName;
+ TQString mPilotDevice;
bool mDCOPSuccess;
bool mStartedDaemon; // Record whether the daemon was started by kontact
diff --git a/kontact/plugins/newsticker/kcmkontactknt.cpp b/kontact/plugins/newsticker/kcmkontactknt.cpp
index 18f439c8e..13734a8ab 100644
--- a/kontact/plugins/newsticker/kcmkontactknt.cpp
+++ b/kontact/plugins/newsticker/kcmkontactknt.cpp
@@ -21,12 +21,12 @@
without including the source code for Qt in the source distribution.
*/
-#include <qgroupbox.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qlineedit.h>
-#include <qvaluevector.h>
-#include <qspinbox.h>
+#include <tqgroupbox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqlineedit.h>
+#include <tqvaluevector.h>
+#include <tqspinbox.h>
#include <dcopref.h>
#include <dcopclient.h>
@@ -49,41 +49,41 @@
extern "C"
{
- KDE_EXPORT KCModule *create_kontactknt( QWidget *parent, const char * )
+ KDE_EXPORT KCModule *create_kontactknt( TQWidget *parent, const char * )
{
return new KCMKontactKNT( parent, "kcmkontactknt" );
}
}
-NewsEditDialog::NewsEditDialog( const QString& title, const QString& url, QWidget *parent )
+NewsEditDialog::NewsEditDialog( const TQString& title, const TQString& url, TQWidget *parent )
: KDialogBase( Plain, i18n( "New News Feed" ), Ok | Cancel,
Ok, parent, 0, true, true )
{
- QWidget *page = plainPage();
- QGridLayout *layout = new QGridLayout( page, 2, 3, marginHint(),
+ TQWidget *page = plainPage();
+ TQGridLayout *layout = new TQGridLayout( page, 2, 3, marginHint(),
spacingHint() );
- QLabel *label = new QLabel( i18n( "Name:" ), page );
+ TQLabel *label = new TQLabel( i18n( "Name:" ), page );
layout->addWidget( label, 0, 0 );
- mTitle = new QLineEdit( page );
+ mTitle = new TQLineEdit( page );
label->setBuddy( mTitle );
layout->addMultiCellWidget( mTitle, 0, 0, 1, 2 );
- label = new QLabel( i18n( "URL:" ), page );
+ label = new TQLabel( i18n( "URL:" ), page );
layout->addWidget( label, 1, 0 );
- mURL = new QLineEdit( page );
+ mURL = new TQLineEdit( page );
label->setBuddy( mURL );
layout->addMultiCellWidget( mURL, 1, 1, 1, 2 );
mTitle->setText( title );
mURL->setText( url );
mTitle->setFocus();
- connect( mTitle, SIGNAL( textChanged( const QString& ) ),
- this, SLOT( modified() ) );
- connect( mURL, SIGNAL( textChanged( const QString& ) ),
- this, SLOT( modified() ) );
+ connect( mTitle, TQT_SIGNAL( textChanged( const TQString& ) ),
+ this, TQT_SLOT( modified() ) );
+ connect( mURL, TQT_SIGNAL( textChanged( const TQString& ) ),
+ this, TQT_SLOT( modified() ) );
modified();
}
@@ -93,12 +93,12 @@ void NewsEditDialog::modified()
enableButton( KDialogBase::Ok, !title().isEmpty() && !url().isEmpty() );
}
-QString NewsEditDialog::title() const
+TQString NewsEditDialog::title() const
{
return mTitle->text();
}
-QString NewsEditDialog::url() const
+TQString NewsEditDialog::url() const
{
return mURL->text();
}
@@ -106,45 +106,45 @@ QString NewsEditDialog::url() const
class NewsItem : public QListViewItem
{
public:
- NewsItem( QListView *parent, const QString& title, const QString& url, bool custom )
- : QListViewItem( parent ), mTitle( title ), mUrl( url ), mCustom( custom )
+ NewsItem( TQListView *parent, const TQString& title, const TQString& url, bool custom )
+ : TQListViewItem( parent ), mTitle( title ), mUrl( url ), mCustom( custom )
{
setText( 0, mTitle );
}
- NewsItem( QListViewItem *parent, const QString& title, const QString& url, bool custom )
- : QListViewItem( parent ), mTitle( title ), mUrl( url ), mCustom( custom )
+ NewsItem( TQListViewItem *parent, const TQString& title, const TQString& url, bool custom )
+ : TQListViewItem( parent ), mTitle( title ), mUrl( url ), mCustom( custom )
{
setText( 0, mTitle );
}
- QString title() const { return mTitle; }
- QString url() const { return mUrl; }
+ TQString title() const { return mTitle; }
+ TQString url() const { return mUrl; }
bool custom() const { return mCustom; }
private:
- QString mTitle;
- QString mUrl;
+ TQString mTitle;
+ TQString mUrl;
bool mCustom;
};
-KCMKontactKNT::KCMKontactKNT( QWidget *parent, const char *name )
+KCMKontactKNT::KCMKontactKNT( TQWidget *parent, const char *name )
: KCModule( parent, name )
{
initGUI();
- connect( mAllNews, SIGNAL( currentChanged( QListViewItem* ) ),
- this, SLOT( allCurrentChanged( QListViewItem* ) ) );
- connect( mSelectedNews, SIGNAL( selectionChanged( QListViewItem* ) ),
- this, SLOT( selectedChanged( QListViewItem* ) ) );
+ connect( mAllNews, TQT_SIGNAL( currentChanged( TQListViewItem* ) ),
+ this, TQT_SLOT( allCurrentChanged( TQListViewItem* ) ) );
+ connect( mSelectedNews, TQT_SIGNAL( selectionChanged( TQListViewItem* ) ),
+ this, TQT_SLOT( selectedChanged( TQListViewItem* ) ) );
- connect( mUpdateInterval, SIGNAL( valueChanged( int ) ), SLOT( modified() ) );
- connect( mArticleCount, SIGNAL( valueChanged( int ) ), SLOT( modified() ) );
+ connect( mUpdateInterval, TQT_SIGNAL( valueChanged( int ) ), TQT_SLOT( modified() ) );
+ connect( mArticleCount, TQT_SIGNAL( valueChanged( int ) ), TQT_SLOT( modified() ) );
- connect( mAddButton, SIGNAL( clicked() ), this, SLOT( addNews() ) );
- connect( mRemoveButton, SIGNAL( clicked() ), this, SLOT( removeNews() ) );
- connect( mNewButton, SIGNAL( clicked() ), this, SLOT( newFeed() ) );
- connect( mDeleteButton, SIGNAL( clicked() ), this, SLOT( deleteFeed() ) );
+ connect( mAddButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( addNews() ) );
+ connect( mRemoveButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( removeNews() ) );
+ connect( mNewButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( newFeed() ) );
+ connect( mDeleteButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( deleteFeed() ) );
KAcceleratorManager::manage( this );
@@ -153,15 +153,15 @@ KCMKontactKNT::KCMKontactKNT( QWidget *parent, const char *name )
void KCMKontactKNT::loadNews()
{
- QValueVector<QListViewItem*> parents;
- QValueVector<QListViewItem*>::Iterator it;
+ TQValueVector<TQListViewItem*> parents;
+ TQValueVector<TQListViewItem*>::Iterator it;
- parents.append( new QListViewItem( mAllNews, i18n( "Arts" ) ) );
- parents.append( new QListViewItem( mAllNews, i18n( "Business" ) ) );
- parents.append( new QListViewItem( mAllNews, i18n( "Computers" ) ) );
- parents.append( new QListViewItem( mAllNews, i18n( "Misc" ) ) );
- parents.append( new QListViewItem( mAllNews, i18n( "Recreation" ) ) );
- parents.append( new QListViewItem( mAllNews, i18n( "Society" ) ) );
+ parents.append( new TQListViewItem( mAllNews, i18n( "Arts" ) ) );
+ parents.append( new TQListViewItem( mAllNews, i18n( "Business" ) ) );
+ parents.append( new TQListViewItem( mAllNews, i18n( "Computers" ) ) );
+ parents.append( new TQListViewItem( mAllNews, i18n( "Misc" ) ) );
+ parents.append( new TQListViewItem( mAllNews, i18n( "Recreation" ) ) );
+ parents.append( new TQListViewItem( mAllNews, i18n( "Society" ) ) );
for ( it = parents.begin(); it != parents.end(); ++it )
(*it)->setSelectable( false );
@@ -176,18 +176,18 @@ void KCMKontactKNT::loadNews()
void KCMKontactKNT::loadCustomNews()
{
KConfig config( "kcmkontactkntrc" );
- QMap<QString, QString> customFeeds = config.entryMap( "CustomFeeds" );
+ TQMap<TQString, TQString> customFeeds = config.entryMap( "CustomFeeds" );
config.setGroup( "CustomFeeds" );
- mCustomItem = new QListViewItem( mAllNews, i18n( "Custom" ) );
+ mCustomItem = new TQListViewItem( mAllNews, i18n( "Custom" ) );
mCustomItem->setSelectable( false );
if ( customFeeds.count() == 0 )
mCustomItem->setVisible( false );
- QMap<QString, QString>::Iterator it;
+ TQMap<TQString, TQString>::Iterator it;
for ( it = customFeeds.begin(); it != customFeeds.end(); ++it ) {
- QStringList value = config.readListEntry( it.key() );
+ TQStringList value = config.readListEntry( it.key() );
mCustomFeeds.append( new NewsItem( mCustomItem, value[ 0 ], value[ 1 ], true ) );
mFeedMap.insert( value[ 1 ], value[ 0 ] );
mCustomItem->setVisible( true );
@@ -201,11 +201,11 @@ void KCMKontactKNT::storeCustomNews()
config.setGroup( "CustomFeeds" );
int counter = 0;
- QValueList<NewsItem*>::Iterator it;
+ TQValueList<NewsItem*>::Iterator it;
for ( it = mCustomFeeds.begin(); it != mCustomFeeds.end(); ++it ) {
- QStringList value;
+ TQStringList value;
value << (*it)->title() << (*it)->url();
- config.writeEntry( QString::number( counter ), value );
+ config.writeEntry( TQString::number( counter ), value );
++counter;
}
@@ -223,7 +223,7 @@ void KCMKontactKNT::addNews()
return;
DCOPRef service( "rssservice", "RSSService" );
- service.send( "add(QString)", item->url() );
+ service.send( "add(TQString)", item->url() );
scanNews();
@@ -240,7 +240,7 @@ void KCMKontactKNT::removeNews()
return;
DCOPRef service( "rssservice", "RSSService" );
- service.send( "remove(QString)", item->url() );
+ service.send( "remove(TQString)", item->url() );
scanNews();
@@ -292,24 +292,24 @@ void KCMKontactKNT::scanNews()
mSelectedNews->clear();
DCOPRef service( "rssservice", "RSSService" );
- QStringList urls = service.call( "list()" );
+ TQStringList urls = service.call( "list()" );
for ( uint i = 0; i < urls.count(); ++i )
{
- QString url = urls[ i ];
- QString feedName = mFeedMap[ url ];
+ TQString url = urls[ i ];
+ TQString feedName = mFeedMap[ url ];
if ( feedName.isEmpty() )
feedName = url;
new NewsItem( mSelectedNews, feedName, url, false );
}
}
-void KCMKontactKNT::selectedChanged( QListViewItem *item )
+void KCMKontactKNT::selectedChanged( TQListViewItem *item )
{
mRemoveButton->setEnabled( item && item->isSelected() );
}
-void KCMKontactKNT::allCurrentChanged( QListViewItem *item )
+void KCMKontactKNT::allCurrentChanged( TQListViewItem *item )
{
NewsItem *newsItem = dynamic_cast<NewsItem*>( item );
@@ -331,7 +331,7 @@ void KCMKontactKNT::modified()
void KCMKontactKNT::initGUI()
{
- QGridLayout *layout = new QGridLayout( this, 2, 3, KDialog::marginHint(),
+ TQGridLayout *layout = new TQGridLayout( this, 2, 3, KDialog::marginHint(),
KDialog::spacingHint() );
mAllNews = new KListView( this );
@@ -340,7 +340,7 @@ void KCMKontactKNT::initGUI()
mAllNews->setFullWidth( true );
layout->addWidget( mAllNews, 0, 0 );
- QVBoxLayout *vbox = new QVBoxLayout( layout, KDialog::spacingHint() );
+ TQVBoxLayout *vbox = new TQVBoxLayout( layout, KDialog::spacingHint() );
vbox->addStretch();
mAddButton = new KPushButton( i18n( "Add" ), this );
@@ -356,24 +356,24 @@ void KCMKontactKNT::initGUI()
mSelectedNews->setFullWidth( true );
layout->addWidget( mSelectedNews, 0, 2 );
- QGroupBox *box = new QGroupBox( 0, Qt::Vertical,
+ TQGroupBox *box = new TQGroupBox( 0, Qt::Vertical,
i18n( "News Feed Settings" ), this );
- QGridLayout *boxLayout = new QGridLayout( box->layout(), 2, 3,
+ TQGridLayout *boxLayout = new TQGridLayout( box->layout(), 2, 3,
KDialog::spacingHint() );
- QLabel *label = new QLabel( i18n( "Refresh time:" ), box );
+ TQLabel *label = new TQLabel( i18n( "Refresh time:" ), box );
boxLayout->addWidget( label, 0, 0 );
- mUpdateInterval = new QSpinBox( 1, 3600, 1, box );
+ mUpdateInterval = new TQSpinBox( 1, 3600, 1, box );
mUpdateInterval->setSuffix( " sec." );
label->setBuddy( mUpdateInterval );
boxLayout->addWidget( mUpdateInterval, 0, 1 );
- label = new QLabel( i18n( "Number of items shown:" ), box );
+ label = new TQLabel( i18n( "Number of items shown:" ), box );
boxLayout->addWidget( label, 1, 0 );
- mArticleCount = new QSpinBox( box );
+ mArticleCount = new TQSpinBox( box );
label->setBuddy( mArticleCount );
boxLayout->addWidget( mArticleCount, 1, 1 );
@@ -389,12 +389,12 @@ void KCMKontactKNT::initGUI()
bool KCMKontactKNT::dcopActive() const
{
- QString error;
- QCString appID;
+ TQString error;
+ TQCString appID;
bool isGood = true;
DCOPClient *client = kapp->dcopClient();
if ( !client->isApplicationRegistered( "rssservice" ) ) {
- if ( KApplication::startServiceByDesktopName( "rssservice", QStringList(), &error, &appID ) )
+ if ( KApplication::startServiceByDesktopName( "rssservice", TQStringList(), &error, &appID ) )
isGood = false;
}
diff --git a/kontact/plugins/newsticker/kcmkontactknt.h b/kontact/plugins/newsticker/kcmkontactknt.h
index 7463cf004..c88c94e27 100644
--- a/kontact/plugins/newsticker/kcmkontactknt.h
+++ b/kontact/plugins/newsticker/kcmkontactknt.h
@@ -40,7 +40,7 @@ class KCMKontactKNT : public KCModule
Q_OBJECT
public:
- KCMKontactKNT( QWidget *parent = 0, const char *name = 0 );
+ KCMKontactKNT( TQWidget *parent = 0, const char *name = 0 );
virtual void load();
virtual void save();
@@ -53,8 +53,8 @@ class KCMKontactKNT : public KCModule
void newFeed();
void deleteFeed();
- void selectedChanged( QListViewItem *item );
- void allCurrentChanged( QListViewItem *item );
+ void selectedChanged( TQListViewItem *item );
+ void allCurrentChanged( TQListViewItem *item );
void modified();
@@ -69,17 +69,17 @@ class KCMKontactKNT : public KCModule
KListView *mAllNews;
KListView *mSelectedNews;
- QListViewItem *mCustomItem;
+ TQListViewItem *mCustomItem;
KPushButton *mAddButton;
KPushButton *mRemoveButton;
KPushButton *mNewButton;
KPushButton *mDeleteButton;
- QSpinBox *mUpdateInterval;
- QSpinBox *mArticleCount;
+ TQSpinBox *mUpdateInterval;
+ TQSpinBox *mArticleCount;
- QMap<QString, QString> mFeedMap;
- QValueList<NewsItem*> mCustomFeeds;
+ TQMap<TQString, TQString> mFeedMap;
+ TQValueList<NewsItem*> mCustomFeeds;
};
class NewsEditDialog : public KDialogBase
@@ -87,16 +87,16 @@ class NewsEditDialog : public KDialogBase
Q_OBJECT
public:
- NewsEditDialog( const QString&, const QString&, QWidget *parent );
- QString title() const;
- QString url() const;
+ NewsEditDialog( const TQString&, const TQString&, TQWidget *parent );
+ TQString title() const;
+ TQString url() const;
private slots:
void modified();
private:
- QLineEdit *mTitle;
- QLineEdit *mURL;
+ TQLineEdit *mTitle;
+ TQLineEdit *mURL;
};
#endif
diff --git a/kontact/plugins/newsticker/newsfeeds.h b/kontact/plugins/newsticker/newsfeeds.h
index fb5ef4098..66555d4fe 100644
--- a/kontact/plugins/newsticker/newsfeeds.h
+++ b/kontact/plugins/newsticker/newsfeeds.h
@@ -24,291 +24,291 @@
#ifndef NEWSFEEDS_H
#define NEWSFEEDS_H
-#include <qvaluelist.h>
+#include <tqvaluelist.h>
#define DEFAULT_NEWSSOURCES 60
class NewsSourceData
{
public:
- typedef QValueList<NewsSourceData> List;
+ typedef TQValueList<NewsSourceData> List;
enum Category { Arts, Business, Computers, Misc,
Recreation, Society };
- NewsSourceData( const QString &name = I18N_NOOP( "Unknown" ),
- const QString &url = QString::null,
- const QString &icon = QString::null,
+ NewsSourceData( const TQString &name = I18N_NOOP( "Unknown" ),
+ const TQString &url = TQString::null,
+ const TQString &icon = TQString::null,
const Category category= Computers )
: mName( name ), mURL( url ), mIcon( icon ), mCategory( category )
{
}
- QString name() const { return mName; }
- QString url() const { return mURL; }
- QString icon() const { return mIcon; }
+ TQString name() const { return mName; }
+ TQString url() const { return mURL; }
+ TQString icon() const { return mIcon; }
Category category() const { return mCategory; }
- QString mName;
- QString mURL;
- QString mIcon;
+ TQString mName;
+ TQString mURL;
+ TQString mIcon;
Category mCategory;
};
static NewsSourceData NewsSourceDefault[DEFAULT_NEWSSOURCES] = {
// Arts ---------------
NewsSourceData(
- QString::fromLatin1("Bureau 42"),
- QString::fromLatin1("http://www.bureau42.com/rdf/"),
- QString::fromLatin1("http://www.bureau42.com/favicon.ico"),
+ TQString::fromLatin1("Bureau 42"),
+ TQString::fromLatin1("http://www.bureau42.com/rdf/"),
+ TQString::fromLatin1("http://www.bureau42.com/favicon.ico"),
NewsSourceData::Arts ),
NewsSourceData(
- QString::fromLatin1("eFilmCritic"),
- QString::fromLatin1("http://efilmcritic.com/fo.rdf"),
- QString::fromLatin1("http://efilmcritic.com/favicon.ico"),
+ TQString::fromLatin1("eFilmCritic"),
+ TQString::fromLatin1("http://efilmcritic.com/fo.rdf"),
+ TQString::fromLatin1("http://efilmcritic.com/favicon.ico"),
NewsSourceData::Arts ),
// Business -----------
NewsSourceData(
- QString::fromLatin1("Internet.com Business"),
- QString::fromLatin1("http://headlines.internet.com/internetnews/bus-news/news.rss"),
- QString::null,
+ TQString::fromLatin1("Internet.com Business"),
+ TQString::fromLatin1("http://headlines.internet.com/internetnews/bus-news/news.rss"),
+ TQString::null,
NewsSourceData::Business ),
NewsSourceData(
- QString::fromLatin1("TradeSims"),
- QString::fromLatin1("http://www.tradesims.com/AEX.rdf"),
- QString::null,
+ TQString::fromLatin1("TradeSims"),
+ TQString::fromLatin1("http://www.tradesims.com/AEX.rdf"),
+ TQString::null,
NewsSourceData::Business ),
// Computers ----------
NewsSourceData(
- QString::fromLatin1("KDE Deutschland"),
- QString::fromLatin1("http://www.kde.de/nachrichten/nachrichten.rdf"),
- QString::fromLatin1("http://www.kde.de/favicon.ico"),
+ TQString::fromLatin1("KDE Deutschland"),
+ TQString::fromLatin1("http://www.kde.de/nachrichten/nachrichten.rdf"),
+ TQString::fromLatin1("http://www.kde.de/favicon.ico"),
NewsSourceData::Computers ),
NewsSourceData(
- QString::fromLatin1("KDE France"),
- QString::fromLatin1("http://www.kde-france.org/backend-breves.php3"),
- QString::null,
+ TQString::fromLatin1("KDE France"),
+ TQString::fromLatin1("http://www.kde-france.org/backend-breves.php3"),
+ TQString::null,
NewsSourceData::Computers ),
NewsSourceData(
- QString::fromLatin1("FreeBSD Project News"),
- QString::fromLatin1("http://www.freebsd.org/news/news.rdf"),
- QString::fromLatin1("http://www.freebsd.org/favicon.ico"),
+ TQString::fromLatin1("FreeBSD Project News"),
+ TQString::fromLatin1("http://www.freebsd.org/news/news.rdf"),
+ TQString::fromLatin1("http://www.freebsd.org/favicon.ico"),
NewsSourceData::Computers ),
NewsSourceData(
- QString::fromLatin1("dot.kde.org"),
- QString::fromLatin1("http://www.kde.org/dotkdeorg.rdf"),
- QString::fromLatin1("http://www.kde.org/favicon.ico"),
+ TQString::fromLatin1("dot.kde.org"),
+ TQString::fromLatin1("http://www.kde.org/dotkdeorg.rdf"),
+ TQString::fromLatin1("http://www.kde.org/favicon.ico"),
NewsSourceData::Computers ),
- NewsSourceData( QString::fromLatin1("KDE-Look.org"),
- QString::fromLatin1("http://www.kde.org/kde-look-content.rdf"),
- QString::fromLatin1("http://kde-look.org/img/favicon-1-1.ico"),
+ NewsSourceData( TQString::fromLatin1("KDE-Look.org"),
+ TQString::fromLatin1("http://www.kde.org/kde-look-content.rdf"),
+ TQString::fromLatin1("http://kde-look.org/img/favicon-1-1.ico"),
NewsSourceData::Computers ),
- NewsSourceData( QString::fromLatin1("KDE-Apps.org"),
- QString::fromLatin1("http://www.kde.org/dot/kde-apps-content.rdf"),
- QString::fromLatin1("http://kde-apps.org/img/favicon-1-1.ico"),
+ NewsSourceData( TQString::fromLatin1("KDE-Apps.org"),
+ TQString::fromLatin1("http://www.kde.org/dot/kde-apps-content.rdf"),
+ TQString::fromLatin1("http://kde-apps.org/img/favicon-1-1.ico"),
NewsSourceData::Computers ),
- NewsSourceData( QString::fromLatin1("DesktopLinux"),
- QString::fromLatin1("http://www.desktoplinux.com/backend/index.html"),
- QString::fromLatin1("http://www.desktoplinux.com/images/favicon.ico"),
+ NewsSourceData( TQString::fromLatin1("DesktopLinux"),
+ TQString::fromLatin1("http://www.desktoplinux.com/backend/index.html"),
+ TQString::fromLatin1("http://www.desktoplinux.com/images/favicon.ico"),
NewsSourceData::Computers ),
- NewsSourceData( QString::fromLatin1("DistroWatch"),
- QString::fromLatin1("http://distrowatch.com/news/dw.xml"),
- QString::fromLatin1("http://distrowatch.com/favicon.ico"),
+ NewsSourceData( TQString::fromLatin1("DistroWatch"),
+ TQString::fromLatin1("http://distrowatch.com/news/dw.xml"),
+ TQString::fromLatin1("http://distrowatch.com/favicon.ico"),
NewsSourceData::Computers ),
/*URL changed*/
NewsSourceData(
- QString::fromLatin1("GNOME News"),
- QString::fromLatin1("http://www.gnomedesktop.org/node/feed"),
- QString::null,
+ TQString::fromLatin1("GNOME News"),
+ TQString::fromLatin1("http://www.gnomedesktop.org/node/feed"),
+ TQString::null,
NewsSourceData::Computers ),
NewsSourceData(
- QString::fromLatin1("Slashdot"),
- QString::fromLatin1("http://slashdot.org/slashdot.rdf"),
- QString::fromLatin1("http://slashdot.org/favicon.ico"),
+ TQString::fromLatin1("Slashdot"),
+ TQString::fromLatin1("http://slashdot.org/slashdot.rdf"),
+ TQString::fromLatin1("http://slashdot.org/favicon.ico"),
NewsSourceData::Computers ),
NewsSourceData(
- QString::fromLatin1("Ask Slashdot"),
- QString::fromLatin1("http://slashdot.org/askslashdot.rdf"),
- QString::fromLatin1("http://slashdot.org/favicon.ico"),
+ TQString::fromLatin1("Ask Slashdot"),
+ TQString::fromLatin1("http://slashdot.org/askslashdot.rdf"),
+ TQString::fromLatin1("http://slashdot.org/favicon.ico"),
NewsSourceData::Computers ),
NewsSourceData(
- QString::fromLatin1("Slashdot: Features"),
- QString::fromLatin1("http://slashdot.org/features.rdf"),
- QString::fromLatin1("http://slashdot.org/favicon.ico"),
+ TQString::fromLatin1("Slashdot: Features"),
+ TQString::fromLatin1("http://slashdot.org/features.rdf"),
+ TQString::fromLatin1("http://slashdot.org/favicon.ico"),
NewsSourceData::Computers ),
NewsSourceData(
- QString::fromLatin1("Slashdot: Apache"),
- QString::fromLatin1("http://slashdot.org/apache.rdf"),
- QString::fromLatin1("http://slashdot.org/favicon.ico"),
+ TQString::fromLatin1("Slashdot: Apache"),
+ TQString::fromLatin1("http://slashdot.org/apache.rdf"),
+ TQString::fromLatin1("http://slashdot.org/favicon.ico"),
NewsSourceData::Computers ),
NewsSourceData(
- QString::fromLatin1("Slashdot: Books"),
- QString::fromLatin1("http://slashdot.org/books.rdf"),
- QString::fromLatin1("http://slashdot.org/favicon.ico"),
+ TQString::fromLatin1("Slashdot: Books"),
+ TQString::fromLatin1("http://slashdot.org/books.rdf"),
+ TQString::fromLatin1("http://slashdot.org/favicon.ico"),
NewsSourceData::Computers ),
NewsSourceData(
- QString::fromLatin1("Jabber News"),
- QString::fromLatin1("http://www.jabber.org/news/rss.xml"),
- QString::null,
+ TQString::fromLatin1("Jabber News"),
+ TQString::fromLatin1("http://www.jabber.org/news/rss.xml"),
+ TQString::null,
NewsSourceData::Computers ),
NewsSourceData(
- QString::fromLatin1("Freshmeat"),
- QString::fromLatin1("http://freshmeat.net/backend/fm.rdf"),
- QString::fromLatin1("http://freshmeat.net/favicon.ico"),
+ TQString::fromLatin1("Freshmeat"),
+ TQString::fromLatin1("http://freshmeat.net/backend/fm.rdf"),
+ TQString::fromLatin1("http://freshmeat.net/favicon.ico"),
NewsSourceData::Computers ),
NewsSourceData(
- QString::fromLatin1("Linux Weekly News"),
- QString::fromLatin1("http://www.lwn.net/headlines/rss"),
- QString::fromLatin1("http://www.lwn.net/favicon.ico"),
+ TQString::fromLatin1("Linux Weekly News"),
+ TQString::fromLatin1("http://www.lwn.net/headlines/rss"),
+ TQString::fromLatin1("http://www.lwn.net/favicon.ico"),
NewsSourceData::Computers ),
NewsSourceData(
- QString::fromLatin1("heise online news"),
- QString::fromLatin1("http://www.heise.de/newsticker/heise.rdf"),
- QString::fromLatin1("http://www.heise.de/favicon.ico"),
+ TQString::fromLatin1("heise online news"),
+ TQString::fromLatin1("http://www.heise.de/newsticker/heise.rdf"),
+ TQString::fromLatin1("http://www.heise.de/favicon.ico"),
NewsSourceData::Computers ),
NewsSourceData(
- QString::fromLatin1("RUS-CERT Ticker"),
- QString::fromLatin1("http://cert.uni-stuttgart.de/ticker/rus-cert.rdf"),
- QString::fromLatin1("http://cert.uni-stuttgart.de/favicon.ico"),
+ TQString::fromLatin1("RUS-CERT Ticker"),
+ TQString::fromLatin1("http://cert.uni-stuttgart.de/ticker/rus-cert.rdf"),
+ TQString::fromLatin1("http://cert.uni-stuttgart.de/favicon.ico"),
NewsSourceData::Computers ),
NewsSourceData(
- QString::fromLatin1("RUS-CERT Elsewhere"),
- QString::fromLatin1("http://cert.uni-stuttgart.de/ticker/rus-cert-elsewhere.rdf"),
- QString::fromLatin1("http://cert.uni-stuttgart.de/favicon.ico"),
+ TQString::fromLatin1("RUS-CERT Elsewhere"),
+ TQString::fromLatin1("http://cert.uni-stuttgart.de/ticker/rus-cert-elsewhere.rdf"),
+ TQString::fromLatin1("http://cert.uni-stuttgart.de/favicon.ico"),
NewsSourceData::Computers ),
NewsSourceData(
- QString::fromLatin1("Kuro5hin"),
- QString::fromLatin1("http://kuro5hin.org/backend.rdf"),
- QString::fromLatin1("http://kuro5hin.org/favicon.ico"),
+ TQString::fromLatin1("Kuro5hin"),
+ TQString::fromLatin1("http://kuro5hin.org/backend.rdf"),
+ TQString::fromLatin1("http://kuro5hin.org/favicon.ico"),
NewsSourceData::Computers ),
NewsSourceData(
- QString::fromLatin1("Prolinux"),
- QString::fromLatin1("http://www.pl-forum.de/backend/pro-linux.rdf"),
- QString::fromLatin1("http://www.prolinux.de/favicon.ico"),
+ TQString::fromLatin1("Prolinux"),
+ TQString::fromLatin1("http://www.pl-forum.de/backend/pro-linux.rdf"),
+ TQString::fromLatin1("http://www.prolinux.de/favicon.ico"),
NewsSourceData::Computers ),
NewsSourceData(
- QString::fromLatin1("LinuxSecurity.com"),
- QString::fromLatin1("http://www.linuxsecurity.com/linuxsecurity_hybrid.rdf"),
- QString::fromLatin1("http://www.linuxsecurity.com/favicon.ico"),
+ TQString::fromLatin1("LinuxSecurity.com"),
+ TQString::fromLatin1("http://www.linuxsecurity.com/linuxsecurity_hybrid.rdf"),
+ TQString::fromLatin1("http://www.linuxsecurity.com/favicon.ico"),
NewsSourceData::Computers ),
NewsSourceData(
- QString::fromLatin1("Linux Game Tome"),
- QString::fromLatin1("http://happypenguin.org/html/news.rdf"),
- QString::null,
+ TQString::fromLatin1("Linux Game Tome"),
+ TQString::fromLatin1("http://happypenguin.org/html/news.rdf"),
+ TQString::null,
NewsSourceData::Computers ),
NewsSourceData(
- QString::fromLatin1("Mozilla"),
- QString::fromLatin1("http://www.mozilla.org/news.rdf"),
- QString::fromLatin1("http://www.mozillazine.org/favicon.ico"),
+ TQString::fromLatin1("Mozilla"),
+ TQString::fromLatin1("http://www.mozilla.org/news.rdf"),
+ TQString::fromLatin1("http://www.mozillazine.org/favicon.ico"),
NewsSourceData::Computers ),
NewsSourceData(
- QString::fromLatin1("MozillaZine"),
- QString::fromLatin1("http://www.mozillazine.org/contents.rdf"),
- QString::fromLatin1("http://www.mozillazine.org/favicon.ico"),
+ TQString::fromLatin1("MozillaZine"),
+ TQString::fromLatin1("http://www.mozillazine.org/contents.rdf"),
+ TQString::fromLatin1("http://www.mozillazine.org/favicon.ico"),
NewsSourceData::Computers ),
NewsSourceData(
- QString::fromLatin1("Daemon News"),
- QString::fromLatin1("http://daily.daemonnews.org/ddn.rdf.php3"),
- QString::null,
+ TQString::fromLatin1("Daemon News"),
+ TQString::fromLatin1("http://daily.daemonnews.org/ddn.rdf.php3"),
+ TQString::null,
NewsSourceData::Computers ),
NewsSourceData(
- QString::fromLatin1("use Perl;"),
- QString::fromLatin1("http://use.perl.org/useperl.rdf"),
- QString::null,
+ TQString::fromLatin1("use Perl;"),
+ TQString::fromLatin1("http://use.perl.org/useperl.rdf"),
+ TQString::null,
NewsSourceData::Computers ),
NewsSourceData(
- QString::fromLatin1("Root prompt"),
- QString::fromLatin1("http://www.rootprompt.org/rss/"),
- QString::fromLatin1("http://www.rootprompt.org/favicon.ico"),
+ TQString::fromLatin1("Root prompt"),
+ TQString::fromLatin1("http://www.rootprompt.org/rss/"),
+ TQString::fromLatin1("http://www.rootprompt.org/favicon.ico"),
NewsSourceData::Computers ),
NewsSourceData(
- QString::fromLatin1("SecurityFocus"),
- QString::fromLatin1("http://www.securityfocus.com/topnews-rdf.html"),
- QString::fromLatin1("http://www.securityfocus.com/favicon.ico"),
+ TQString::fromLatin1("SecurityFocus"),
+ TQString::fromLatin1("http://www.securityfocus.com/topnews-rdf.html"),
+ TQString::fromLatin1("http://www.securityfocus.com/favicon.ico"),
NewsSourceData::Computers ),
NewsSourceData(
- QString::fromLatin1("Arstechnica"),
- QString::fromLatin1("http://arstechnica.com/etc/rdf/ars.rdf"),
- QString::fromLatin1("http://arstechnica.com/favicon.ico"),
+ TQString::fromLatin1("Arstechnica"),
+ TQString::fromLatin1("http://arstechnica.com/etc/rdf/ars.rdf"),
+ TQString::fromLatin1("http://arstechnica.com/favicon.ico"),
NewsSourceData::Computers ),
NewsSourceData(
- QString::fromLatin1("amiga-news.de - deutschsprachige Amiga Nachrichten"),
- QString::fromLatin1("http://www.amiga-news.de/de/backends/news/index.rss"),
- QString::fromLatin1("http://www.amiga-news.de/favicon.ico"),
+ TQString::fromLatin1("amiga-news.de - deutschsprachige Amiga Nachrichten"),
+ TQString::fromLatin1("http://www.amiga-news.de/de/backends/news/index.rss"),
+ TQString::fromLatin1("http://www.amiga-news.de/favicon.ico"),
NewsSourceData::Computers ),
NewsSourceData(
- QString::fromLatin1("amiga-news.de - english Amiga news"),
- QString::fromLatin1("http://www.amiga-news.de/en/backends/news/index.rss"),
- QString::fromLatin1("http://www.amiga-news.de/favicon.ico"),
+ TQString::fromLatin1("amiga-news.de - english Amiga news"),
+ TQString::fromLatin1("http://www.amiga-news.de/en/backends/news/index.rss"),
+ TQString::fromLatin1("http://www.amiga-news.de/favicon.ico"),
NewsSourceData::Computers ),
NewsSourceData(
- QString::fromLatin1("FreshPorts - the place for ports"),
- QString::fromLatin1("http://www.freshports.org/news.php3"),
- QString::fromLatin1("http://www.freshports.org/favicon.ico"),
+ TQString::fromLatin1("FreshPorts - the place for ports"),
+ TQString::fromLatin1("http://www.freshports.org/news.php3"),
+ TQString::fromLatin1("http://www.freshports.org/favicon.ico"),
NewsSourceData::Computers ),
NewsSourceData(
- QString::fromLatin1("zez.org - about code "),
- QString::fromLatin1("http://zez.org/article/rssheadlines"),
- QString::null,
+ TQString::fromLatin1("zez.org - about code "),
+ TQString::fromLatin1("http://zez.org/article/rssheadlines"),
+ TQString::null,
NewsSourceData::Computers ),
NewsSourceData(
- QString::fromLatin1("BSDatwork.com"),
- QString::fromLatin1("http://BSDatwork.com/backend.php"),
- QString::fromLatin1("http://BSDatwork.com/favicon.ico"),
+ TQString::fromLatin1("BSDatwork.com"),
+ TQString::fromLatin1("http://BSDatwork.com/backend.php"),
+ TQString::fromLatin1("http://BSDatwork.com/favicon.ico"),
NewsSourceData::Computers ),
NewsSourceData(
- QString::fromLatin1("FreshSource - the place for source"),
- QString::fromLatin1("http://www.freshsource.org/news.php"),
- QString::fromLatin1("http://www.freshsource.org/favicon.ico"),
+ TQString::fromLatin1("FreshSource - the place for source"),
+ TQString::fromLatin1("http://www.freshsource.org/news.php"),
+ TQString::fromLatin1("http://www.freshsource.org/favicon.ico"),
NewsSourceData::Computers ),
NewsSourceData(
- QString::fromLatin1("The FreeBSD Diary"),
- QString::fromLatin1("http://www.freebsddiary.org/news.php"),
- QString::fromLatin1("http://www.freebsddiary.org/favicon.ico"),
+ TQString::fromLatin1("The FreeBSD Diary"),
+ TQString::fromLatin1("http://www.freebsddiary.org/news.php"),
+ TQString::fromLatin1("http://www.freebsddiary.org/favicon.ico"),
NewsSourceData::Computers ),
// Miscellaneous ------
NewsSourceData(
- QString::fromLatin1("tagesschau.de"),
- QString::fromLatin1("http://www.tagesschau.de/newsticker.rdf"),
- QString::fromLatin1("http://www.tagesschau.de/favicon.ico"),
+ TQString::fromLatin1("tagesschau.de"),
+ TQString::fromLatin1("http://www.tagesschau.de/newsticker.rdf"),
+ TQString::fromLatin1("http://www.tagesschau.de/favicon.ico"),
NewsSourceData::Misc ),
NewsSourceData(
- QString::fromLatin1("CNN Top Stories"),
- QString::fromLatin1("http://rss.cnn.com/rss/cnn_topstories.rss"),
- QString::fromLatin1("http://www.cnn.com/favicon.ico"),
+ TQString::fromLatin1("CNN Top Stories"),
+ TQString::fromLatin1("http://rss.cnn.com/rss/cnn_topstories.rss"),
+ TQString::fromLatin1("http://www.cnn.com/favicon.ico"),
NewsSourceData::Misc ),
/*feed URL changed*/
NewsSourceData(
- QString::fromLatin1("HotWired"),
- QString::fromLatin1("http://www.wired.com/news/feeds/rss2/0,2610,,00.xml"),
- QString::fromLatin1("http://www.hotwired.com/favicon.ico"),
+ TQString::fromLatin1("HotWired"),
+ TQString::fromLatin1("http://www.wired.com/news/feeds/rss2/0,2610,,00.xml"),
+ TQString::fromLatin1("http://www.hotwired.com/favicon.ico"),
NewsSourceData::Misc ),
NewsSourceData(
- QString::fromLatin1("The Register"),
- QString::fromLatin1("http://www.theregister.co.uk/headlines.rss"),
- QString::fromLatin1("http://www.theregister.co.uk/favicon.ico"),
+ TQString::fromLatin1("The Register"),
+ TQString::fromLatin1("http://www.theregister.co.uk/headlines.rss"),
+ TQString::fromLatin1("http://www.theregister.co.uk/favicon.ico"),
NewsSourceData::Misc ),
NewsSourceData(
- QString::fromLatin1( "Christian Science Monitor" ),
- QString::fromLatin1( "http://www.csmonitor.com/rss/csm.rss"),
- QString::fromLatin1( "http://www.csmonitor.com/favicon.ico"),
+ TQString::fromLatin1( "Christian Science Monitor" ),
+ TQString::fromLatin1( "http://www.csmonitor.com/rss/csm.rss"),
+ TQString::fromLatin1( "http://www.csmonitor.com/favicon.ico"),
NewsSourceData::Misc ),
// Recreation
// Society
NewsSourceData(
- QString::fromLatin1("nippon.it"),
- QString::fromLatin1("http://www.nippon.it/backend.it.php"),
- QString::fromLatin1("http://www.nippon.it/favicon.ico"),
+ TQString::fromLatin1("nippon.it"),
+ TQString::fromLatin1("http://www.nippon.it/backend.it.php"),
+ TQString::fromLatin1("http://www.nippon.it/favicon.ico"),
NewsSourceData::Society ),
NewsSourceData(
- QString::fromLatin1( "gflash" ),
- QString::fromLatin1( "http://www.gflash.de/backend.php"),
- QString::fromLatin1( "http://www.gflash.de/favicon.ico"),
+ TQString::fromLatin1( "gflash" ),
+ TQString::fromLatin1( "http://www.gflash.de/backend.php"),
+ TQString::fromLatin1( "http://www.gflash.de/favicon.ico"),
NewsSourceData::Society ),
NewsSourceData(
- QString::fromLatin1( "Quintessenz" ),
- QString::fromLatin1( "http://quintessenz.at/cgi-bin/rdf"),
- QString::fromLatin1( "http://quintessenz.at/favicon.ico"),
+ TQString::fromLatin1( "Quintessenz" ),
+ TQString::fromLatin1( "http://quintessenz.at/cgi-bin/rdf"),
+ TQString::fromLatin1( "http://quintessenz.at/favicon.ico"),
NewsSourceData::Society )
};
diff --git a/kontact/plugins/newsticker/newsticker_plugin.cpp b/kontact/plugins/newsticker/newsticker_plugin.cpp
index 0bc42bd14..4afb0350d 100644
--- a/kontact/plugins/newsticker/newsticker_plugin.cpp
+++ b/kontact/plugins/newsticker/newsticker_plugin.cpp
@@ -31,13 +31,13 @@ typedef KGenericFactory< NewsTickerPlugin, Kontact::Core > NewsTickerPluginFacto
K_EXPORT_COMPONENT_FACTORY( libkontact_newstickerplugin,
NewsTickerPluginFactory( "kontact_newstickerplugin" ) )
-NewsTickerPlugin::NewsTickerPlugin( Kontact::Core *core, const char *name, const QStringList& )
+NewsTickerPlugin::NewsTickerPlugin( Kontact::Core *core, const char *name, const TQStringList& )
: Kontact::Plugin( core, core, name )
{
setInstance( NewsTickerPluginFactory::instance() );
}
-Kontact::Summary *NewsTickerPlugin::createSummaryWidget( QWidget* parentWidget )
+Kontact::Summary *NewsTickerPlugin::createSummaryWidget( TQWidget* parentWidget )
{
return new SummaryWidget( parentWidget );
}
diff --git a/kontact/plugins/newsticker/newsticker_plugin.h b/kontact/plugins/newsticker/newsticker_plugin.h
index d912da797..b3c0b651d 100644
--- a/kontact/plugins/newsticker/newsticker_plugin.h
+++ b/kontact/plugins/newsticker/newsticker_plugin.h
@@ -28,10 +28,10 @@ class SummaryWidget;
class NewsTickerPlugin : public Kontact::Plugin
{
public:
- NewsTickerPlugin( Kontact::Core *core, const char *name, const QStringList& );
+ NewsTickerPlugin( Kontact::Core *core, const char *name, const TQStringList& );
NewsTickerPlugin();
- virtual Kontact::Summary *createSummaryWidget( QWidget* parentWidget );
+ virtual Kontact::Summary *createSummaryWidget( TQWidget* parentWidget );
protected:
virtual KParts::ReadOnlyPart* createPart() { return 0L; }
diff --git a/kontact/plugins/newsticker/summarywidget.cpp b/kontact/plugins/newsticker/summarywidget.cpp
index 14b7bc27a..b45f8c7bf 100644
--- a/kontact/plugins/newsticker/summarywidget.cpp
+++ b/kontact/plugins/newsticker/summarywidget.cpp
@@ -21,13 +21,13 @@
without including the source code for Qt in the source distribution.
*/
-#include <qclipboard.h>
-#include <qeventloop.h>
-#include <qhbox.h>
-#include <qlayout.h>
-#include <qpixmap.h>
-#include <qpopupmenu.h>
-#include <qcursor.h>
+#include <tqclipboard.h>
+#include <tqeventloop.h>
+#include <tqhbox.h>
+#include <tqlayout.h>
+#include <tqpixmap.h>
+#include <tqpopupmenu.h>
+#include <tqcursor.h>
#include <dcopclient.h>
#include <kapplication.h>
@@ -41,34 +41,34 @@
#include "summarywidget.h"
-SummaryWidget::SummaryWidget( QWidget *parent, const char *name )
+SummaryWidget::SummaryWidget( TQWidget *parent, const char *name )
: Kontact::Summary( parent, name ),
DCOPObject( "NewsTickerPlugin" ), mLayout( 0 ), mFeedCounter( 0 )
{
- QVBoxLayout *vlay = new QVBoxLayout( this, 3, 3 );
+ TQVBoxLayout *vlay = new TQVBoxLayout( this, 3, 3 );
- QPixmap icon = KGlobal::iconLoader()->loadIcon( "kontact_news",
+ TQPixmap icon = KGlobal::iconLoader()->loadIcon( "kontact_news",
KIcon::Desktop, KIcon::SizeMedium );
- QWidget *header = createHeader( this, icon, i18n( "News Feeds" ) );
+ TQWidget *header = createHeader( this, icon, i18n( "News Feeds" ) );
vlay->addWidget( header );
- QString error;
- QCString appID;
+ TQString error;
+ TQCString appID;
bool dcopAvailable = true;
if ( !kapp->dcopClient()->isApplicationRegistered( "rssservice" ) ) {
- if ( KApplication::startServiceByDesktopName( "rssservice", QStringList(), &error, &appID ) ) {
- QLabel *label = new QLabel( i18n( "No rss dcop service available.\nYou need rssservice to use this plugin." ), this );
+ if ( KApplication::startServiceByDesktopName( "rssservice", TQStringList(), &error, &appID ) ) {
+ TQLabel *label = new TQLabel( i18n( "No rss dcop service available.\nYou need rssservice to use this plugin." ), this );
vlay->addWidget( label, Qt::AlignHCenter );
dcopAvailable = false;
}
}
- mBaseWidget = new QWidget( this, "baseWidget" );
+ mBaseWidget = new TQWidget( this, "baseWidget" );
vlay->addWidget( mBaseWidget );
- connect( &mTimer, SIGNAL( timeout() ), this, SLOT( updateDocuments() ) );
+ connect( &mTimer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( updateDocuments() ) );
readConfig();
@@ -77,8 +77,8 @@ SummaryWidget::SummaryWidget( QWidget *parent, const char *name )
if ( dcopAvailable )
initDocuments();
- connectDCOPSignal( 0, 0, "added(QString)", "documentAdded(QString)", false );
- connectDCOPSignal( 0, 0, "removed(QString)", "documentRemoved(QString)", false );
+ connectDCOPSignal( 0, 0, "added(TQString)", "documentAdded(TQString)", false );
+ connectDCOPSignal( 0, 0, "removed(TQString)", "documentRemoved(TQString)", false );
}
int SummaryWidget::summaryHeight() const
@@ -86,12 +86,12 @@ int SummaryWidget::summaryHeight() const
return ( mFeeds.count() == 0 ? 1 : mFeeds.count() );
}
-void SummaryWidget::documentAdded( QString )
+void SummaryWidget::documentAdded( TQString )
{
initDocuments();
}
-void SummaryWidget::documentRemoved( QString )
+void SummaryWidget::documentRemoved( TQString )
{
initDocuments();
}
@@ -117,17 +117,17 @@ void SummaryWidget::initDocuments()
mFeeds.clear();
DCOPRef dcopCall( "rssservice", "RSSService" );
- QStringList urls;
+ TQStringList urls;
dcopCall.call( "list()" ).get( urls );
if ( urls.isEmpty() ) { // add default
urls.append( "http://www.kde.org/dotkdeorg.rdf" );
- dcopCall.send( "add(QString)", urls[ 0 ] );
+ dcopCall.send( "add(TQString)", urls[ 0 ] );
}
- QStringList::Iterator it;
+ TQStringList::Iterator it;
for ( it = urls.begin(); it != urls.end(); ++it ) {
- DCOPRef feedRef = dcopCall.call( "document(QString)", *it );
+ DCOPRef feedRef = dcopCall.call( "document(TQString)", *it );
Feed feed;
feed.ref = feedRef;
@@ -141,8 +141,8 @@ void SummaryWidget::initDocuments()
"documentUpdated(DCOPRef)", false );
if ( qApp )
- qApp->eventLoop()->processEvents( QEventLoop::ExcludeUserInput |
- QEventLoop::ExcludeSocketNotifiers );
+ qApp->eventLoop()->processEvents( TQEventLoop::ExcludeUserInput |
+ TQEventLoop::ExcludeSocketNotifiers );
}
updateDocuments();
@@ -166,16 +166,16 @@ void SummaryWidget::documentUpdated( DCOPRef feedRef )
int numArticles = feedRef.call( "count()" );
for ( int i = 0; i < numArticles; ++i ) {
DCOPRef artRef = feedRef.call( "article(int)", i );
- QString title, url;
+ TQString title, url;
if ( qApp )
- qApp->eventLoop()->processEvents( QEventLoop::ExcludeUserInput |
- QEventLoop::ExcludeSocketNotifiers );
+ qApp->eventLoop()->processEvents( TQEventLoop::ExcludeUserInput |
+ TQEventLoop::ExcludeSocketNotifiers );
artRef.call( "title()" ).get( title );
artRef.call( "link()" ).get( url );
- QPair<QString, KURL> article(title, KURL( url ));
+ QPair<TQString, KURL> article(title, KURL( url ));
map.append( article );
}
@@ -205,15 +205,15 @@ void SummaryWidget::updateView()
mLabels.setAutoDelete( false );
delete mLayout;
- mLayout = new QVBoxLayout( mBaseWidget, 3 );
+ mLayout = new TQVBoxLayout( mBaseWidget, 3 );
- QFont boldFont;
+ TQFont boldFont;
boldFont.setBold( true );
boldFont.setPointSize( boldFont.pointSize() + 2 );
FeedList::Iterator it;
for ( it = mFeeds.begin(); it != mFeeds.end(); ++it ) {
- QHBox *hbox = new QHBox( mBaseWidget );
+ TQHBox *hbox = new TQHBox( mBaseWidget );
mLayout->addWidget( hbox );
// icon
@@ -223,13 +223,13 @@ void SummaryWidget::updateView()
urlLabel->setMaximumSize( urlLabel->minimumSizeHint() );
mLabels.append( urlLabel );
- connect( urlLabel, SIGNAL( leftClickedURL( const QString& ) ),
- kapp, SLOT( invokeBrowser( const QString& ) ) );
- connect( urlLabel, SIGNAL( rightClickedURL( const QString& ) ),
- this, SLOT( rmbMenu( const QString& ) ) );
+ connect( urlLabel, TQT_SIGNAL( leftClickedURL( const TQString& ) ),
+ kapp, TQT_SLOT( invokeBrowser( const TQString& ) ) );
+ connect( urlLabel, TQT_SIGNAL( rightClickedURL( const TQString& ) ),
+ this, TQT_SLOT( rmbMenu( const TQString& ) ) );
// header
- QLabel *label = new QLabel( hbox );
+ TQLabel *label = new TQLabel( hbox );
label->setText( KCharsets::resolveEntities( (*it).title ) );
label->setAlignment( AlignLeft|AlignVCenter );
label->setFont( boldFont );
@@ -252,17 +252,17 @@ void SummaryWidget::updateView()
mLabels.append( urlLabel );
mLayout->addWidget( urlLabel );
- connect( urlLabel, SIGNAL( leftClickedURL( const QString& ) ),
- kapp, SLOT( invokeBrowser( const QString& ) ) );
- connect( urlLabel, SIGNAL( rightClickedURL( const QString& ) ),
- this, SLOT( rmbMenu( const QString& ) ) );
+ connect( urlLabel, TQT_SIGNAL( leftClickedURL( const TQString& ) ),
+ kapp, TQT_SLOT( invokeBrowser( const TQString& ) ) );
+ connect( urlLabel, TQT_SIGNAL( rightClickedURL( const TQString& ) ),
+ this, TQT_SLOT( rmbMenu( const TQString& ) ) );
numArticles++;
}
}
- for ( QLabel *label = mLabels.first(); label; label = mLabels.next() )
+ for ( TQLabel *label = mLabels.first(); label; label = mLabels.next() )
label->show();
}
@@ -284,7 +284,7 @@ void SummaryWidget::documentUpdateError( DCOPRef feedRef, int errorCode )
}
-QStringList SummaryWidget::configModules() const
+TQStringList SummaryWidget::configModules() const
{
return "kcmkontactknt.desktop";
}
@@ -294,23 +294,23 @@ void SummaryWidget::updateSummary( bool )
updateDocuments();
}
-void SummaryWidget::rmbMenu( const QString& url )
+void SummaryWidget::rmbMenu( const TQString& url )
{
- QPopupMenu menu;
+ TQPopupMenu menu;
menu.insertItem( i18n( "Copy URL to Clipboard" ) );
- int id = menu.exec( QCursor::pos() );
+ int id = menu.exec( TQCursor::pos() );
if ( id != -1 )
kapp->clipboard()->setText( url, QClipboard::Clipboard );
}
-bool SummaryWidget::eventFilter( QObject *obj, QEvent* e )
+bool SummaryWidget::eventFilter( TQObject *obj, TQEvent* e )
{
if ( obj->inherits( "KURLLabel" ) ) {
KURLLabel* label = static_cast<KURLLabel*>( obj );
- if ( e->type() == QEvent::Enter )
+ if ( e->type() == TQEvent::Enter )
emit message( label->url() );
- if ( e->type() == QEvent::Leave )
- emit message( QString::null );
+ if ( e->type() == TQEvent::Leave )
+ emit message( TQString::null );
}
return Kontact::Summary::eventFilter( obj, e );
diff --git a/kontact/plugins/newsticker/summarywidget.h b/kontact/plugins/newsticker/summarywidget.h
index ad914334b..d6cdefa0e 100644
--- a/kontact/plugins/newsticker/summarywidget.h
+++ b/kontact/plugins/newsticker/summarywidget.h
@@ -27,10 +27,10 @@
#include <dcopobject.h>
#include <dcopref.h>
-#include <qmap.h>
-#include <qptrlist.h>
-#include <qtimer.h>
-#include <qwidget.h>
+#include <tqmap.h>
+#include <tqptrlist.h>
+#include <tqtimer.h>
+#include <tqwidget.h>
#include "summary.h"
#include <kurl.h>
@@ -41,17 +41,17 @@ class QLabel;
class DCOPRef;
class KURLLabel;
-typedef QValueList< QPair<QString, KURL> > ArticleMap;
+typedef TQValueList< QPair<TQString, KURL> > ArticleMap;
typedef struct {
DCOPRef ref;
- QString title;
- QString url;
- QPixmap logo;
+ TQString title;
+ TQString url;
+ TQPixmap logo;
ArticleMap map;
} Feed;
-typedef QValueList<Feed> FeedList;
+typedef TQValueList<Feed> FeedList;
class SummaryWidget : public Kontact::Summary, public DCOPObject
{
@@ -59,10 +59,10 @@ class SummaryWidget : public Kontact::Summary, public DCOPObject
K_DCOP
public:
- SummaryWidget( QWidget *parent, const char *name = 0 );
+ SummaryWidget( TQWidget *parent, const char *name = 0 );
int summaryHeight() const;
- QStringList configModules() const;
+ TQStringList configModules() const;
k_dcop:
/**
@@ -72,11 +72,11 @@ class SummaryWidget : public Kontact::Summary, public DCOPObject
/**
* Inform the newsticker summary widget that a feed has been added.
*/
- void documentAdded( QString );
+ void documentAdded( TQString );
/**
* Inform the newsticker summary widget that a feed has been removed.
*/
- void documentRemoved( QString );
+ void documentRemoved( TQString );
/**
* Inform the newsticker summary widget that an error occurred while updating a feed.
* @param ref DCOPRef to the failing RSSDocument.
@@ -90,23 +90,23 @@ class SummaryWidget : public Kontact::Summary, public DCOPObject
protected slots:
void updateDocuments();
- void rmbMenu( const QString& );
+ void rmbMenu( const TQString& );
protected:
- virtual bool eventFilter( QObject *obj, QEvent *e );
+ virtual bool eventFilter( TQObject *obj, TQEvent *e );
void initDocuments();
void updateView();
void readConfig();
private:
- QVBoxLayout *mLayout;
- QWidget* mBaseWidget;
+ TQVBoxLayout *mLayout;
+ TQWidget* mBaseWidget;
- QPtrList<QLabel> mLabels;
+ TQPtrList<TQLabel> mLabels;
FeedList mFeeds;
- QTimer mTimer;
+ TQTimer mTimer;
int mUpdateInterval;
int mArticleCount;
uint mFeedCounter;
diff --git a/kontact/plugins/specialdates/kcmsdsummary.cpp b/kontact/plugins/specialdates/kcmsdsummary.cpp
index 9bb0211a5..326055855 100644
--- a/kontact/plugins/specialdates/kcmsdsummary.cpp
+++ b/kontact/plugins/specialdates/kcmsdsummary.cpp
@@ -22,12 +22,12 @@
without including the source code for Qt in the source distribution.
*/
-#include <qbuttongroup.h>
-#include <qcheckbox.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qradiobutton.h>
-#include <qspinbox.h>
+#include <tqbuttongroup.h>
+#include <tqcheckbox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqradiobutton.h>
+#include <tqspinbox.h>
#include <kaboutdata.h>
#include <kapplication.h>
@@ -43,25 +43,25 @@
extern "C"
{
- KDE_EXPORT KCModule *create_sdsummary( QWidget *parent, const char * )
+ KDE_EXPORT KCModule *create_sdsummary( TQWidget *parent, const char * )
{
return new KCMSDSummary( parent, "kcmsdsummary" );
}
}
-KCMSDSummary::KCMSDSummary( QWidget *parent, const char *name )
+KCMSDSummary::KCMSDSummary( TQWidget *parent, const char *name )
: KCModule( parent, name )
{
initGUI();
customDaysChanged( 1 );
- connect( mDaysGroup, SIGNAL( clicked( int ) ), SLOT( modified() ) );
- connect( mDaysGroup, SIGNAL( clicked( int ) ), SLOT( buttonClicked( int ) ) );
- connect( mCalendarGroup, SIGNAL( clicked( int ) ), SLOT( modified() ) );
- connect( mContactGroup, SIGNAL( clicked( int ) ), SLOT( modified() ) );
- connect( mCustomDays, SIGNAL( valueChanged( int ) ), SLOT( modified() ) );
- connect( mCustomDays, SIGNAL( valueChanged( int ) ), SLOT( customDaysChanged( int ) ) );
+ connect( mDaysGroup, TQT_SIGNAL( clicked( int ) ), TQT_SLOT( modified() ) );
+ connect( mDaysGroup, TQT_SIGNAL( clicked( int ) ), TQT_SLOT( buttonClicked( int ) ) );
+ connect( mCalendarGroup, TQT_SIGNAL( clicked( int ) ), TQT_SLOT( modified() ) );
+ connect( mContactGroup, TQT_SIGNAL( clicked( int ) ), TQT_SLOT( modified() ) );
+ connect( mCustomDays, TQT_SIGNAL( valueChanged( int ) ), TQT_SLOT( modified() ) );
+ connect( mCustomDays, TQT_SIGNAL( valueChanged( int ) ), TQT_SLOT( customDaysChanged( int ) ) );
KAcceleratorManager::manage( this );
@@ -85,33 +85,33 @@ void KCMSDSummary::customDaysChanged( int value )
void KCMSDSummary::initGUI()
{
- QGridLayout *layout = new QGridLayout( this, 3, 2, KDialog::spacingHint() );
+ TQGridLayout *layout = new TQGridLayout( this, 3, 2, KDialog::spacingHint() );
- mDaysGroup = new QButtonGroup( 0, Vertical, i18n( "Special Dates Summary" ), this );
- QVBoxLayout *boxLayout = new QVBoxLayout( mDaysGroup->layout(),
+ mDaysGroup = new TQButtonGroup( 0, Vertical, i18n( "Special Dates Summary" ), this );
+ TQVBoxLayout *boxLayout = new TQVBoxLayout( mDaysGroup->layout(),
KDialog::spacingHint() );
- QLabel *label = new QLabel( i18n( "How many days should the special dates summary show at once?" ), mDaysGroup );
+ TQLabel *label = new TQLabel( i18n( "How many days should the special dates summary show at once?" ), mDaysGroup );
boxLayout->addWidget( label );
- QRadioButton *button = new QRadioButton( i18n( "One day" ), mDaysGroup );
+ TQRadioButton *button = new TQRadioButton( i18n( "One day" ), mDaysGroup );
boxLayout->addWidget( button );
- button = new QRadioButton( i18n( "Five days" ), mDaysGroup );
+ button = new TQRadioButton( i18n( "Five days" ), mDaysGroup );
boxLayout->addWidget( button );
- button = new QRadioButton( i18n( "One week" ), mDaysGroup );
+ button = new TQRadioButton( i18n( "One week" ), mDaysGroup );
boxLayout->addWidget( button );
- button = new QRadioButton( i18n( "One month" ), mDaysGroup );
+ button = new TQRadioButton( i18n( "One month" ), mDaysGroup );
boxLayout->addWidget( button );
- QHBoxLayout *hbox = new QHBoxLayout( boxLayout, KDialog::spacingHint() );
+ TQHBoxLayout *hbox = new TQHBoxLayout( boxLayout, KDialog::spacingHint() );
- button = new QRadioButton( "", mDaysGroup );
+ button = new TQRadioButton( "", mDaysGroup );
hbox->addWidget( button );
- mCustomDays = new QSpinBox( 1, 365, 1, mDaysGroup );
+ mCustomDays = new TQSpinBox( 1, 365, 1, mDaysGroup );
mCustomDays->setEnabled( false );
hbox->addWidget( mCustomDays );
@@ -119,18 +119,18 @@ void KCMSDSummary::initGUI()
layout->addMultiCellWidget( mDaysGroup, 0, 0, 0, 1 );
- mCalendarGroup = new QButtonGroup( 1, Horizontal, i18n( "Special Dates From Calendar" ), this );
+ mCalendarGroup = new TQButtonGroup( 1, Horizontal, i18n( "Special Dates From Calendar" ), this );
- mShowBirthdaysFromCal = new QCheckBox( i18n( "Show birthdays" ), mCalendarGroup );
- mShowAnniversariesFromCal = new QCheckBox( i18n( "Show anniversaries" ), mCalendarGroup );
- mShowHolidays = new QCheckBox( i18n( "Show holidays" ), mCalendarGroup );
+ mShowBirthdaysFromCal = new TQCheckBox( i18n( "Show birthdays" ), mCalendarGroup );
+ mShowAnniversariesFromCal = new TQCheckBox( i18n( "Show anniversaries" ), mCalendarGroup );
+ mShowHolidays = new TQCheckBox( i18n( "Show holidays" ), mCalendarGroup );
- mShowSpecialsFromCal = new QCheckBox( i18n( "Show special occasions" ), mCalendarGroup );
+ mShowSpecialsFromCal = new TQCheckBox( i18n( "Show special occasions" ), mCalendarGroup );
- mContactGroup = new QButtonGroup( 1, Horizontal, i18n( "Special Dates From Contact List" ), this );
+ mContactGroup = new TQButtonGroup( 1, Horizontal, i18n( "Special Dates From Contact List" ), this );
- mShowBirthdaysFromKAB = new QCheckBox( i18n( "Show birthdays" ), mContactGroup );
- mShowAnniversariesFromKAB = new QCheckBox( i18n( "Show anniversaries" ), mContactGroup );
+ mShowBirthdaysFromKAB = new TQCheckBox( i18n( "Show birthdays" ), mContactGroup );
+ mShowAnniversariesFromKAB = new TQCheckBox( i18n( "Show anniversaries" ), mContactGroup );
layout->addWidget( mCalendarGroup, 1, 0 );
layout->addWidget( mContactGroup, 1, 1 );
diff --git a/kontact/plugins/specialdates/kcmsdsummary.h b/kontact/plugins/specialdates/kcmsdsummary.h
index 60b2ea082..589c1d91e 100644
--- a/kontact/plugins/specialdates/kcmsdsummary.h
+++ b/kontact/plugins/specialdates/kcmsdsummary.h
@@ -38,7 +38,7 @@ class KCMSDSummary : public KCModule
Q_OBJECT
public:
- KCMSDSummary( QWidget *parent = 0, const char *name = 0 );
+ KCMSDSummary( TQWidget *parent = 0, const char *name = 0 );
virtual void load();
virtual void save();
@@ -53,17 +53,17 @@ class KCMSDSummary : public KCModule
private:
void initGUI();
- QButtonGroup *mDaysGroup;
- QButtonGroup *mCalendarGroup;
- QButtonGroup *mContactGroup;
- QCheckBox *mShowBirthdaysFromKAB;
- QCheckBox *mShowBirthdaysFromCal;
- QCheckBox *mShowAnniversariesFromKAB;
- QCheckBox *mShowAnniversariesFromCal;
- QCheckBox *mShowHolidays;
- QCheckBox *mShowHolidaysFromCal;
- QCheckBox *mShowSpecialsFromCal;
- QSpinBox *mCustomDays;
+ TQButtonGroup *mDaysGroup;
+ TQButtonGroup *mCalendarGroup;
+ TQButtonGroup *mContactGroup;
+ TQCheckBox *mShowBirthdaysFromKAB;
+ TQCheckBox *mShowBirthdaysFromCal;
+ TQCheckBox *mShowAnniversariesFromKAB;
+ TQCheckBox *mShowAnniversariesFromCal;
+ TQCheckBox *mShowHolidays;
+ TQCheckBox *mShowHolidaysFromCal;
+ TQCheckBox *mShowSpecialsFromCal;
+ TQSpinBox *mCustomDays;
};
#endif
diff --git a/kontact/plugins/specialdates/sdsummarywidget.cpp b/kontact/plugins/specialdates/sdsummarywidget.cpp
index 721073490..44c671559 100644
--- a/kontact/plugins/specialdates/sdsummarywidget.cpp
+++ b/kontact/plugins/specialdates/sdsummarywidget.cpp
@@ -22,11 +22,11 @@
without including the source code for Qt in the source distribution.
*/
-#include <qcursor.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qimage.h>
-#include <qtooltip.h>
+#include <tqcursor.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqimage.h>
+#include <tqtooltip.h>
#include <dcopclient.h>
#include <dcopref.h>
@@ -65,9 +65,9 @@ class SDEntry
SDCategory category;
int yearsOld;
int daysTo;
- QDate date;
- QString summary;
- QString desc;
+ TQDate date;
+ TQString summary;
+ TQString desc;
int span; // #days in the special occassion.
KABC::Addressee addressee;
@@ -77,28 +77,28 @@ class SDEntry
}
};
-SDSummaryWidget::SDSummaryWidget( Kontact::Plugin *plugin, QWidget *parent,
+SDSummaryWidget::SDSummaryWidget( Kontact::Plugin *plugin, TQWidget *parent,
const char *name )
: Kontact::Summary( parent, name ), mPlugin( plugin ), mCalendar( 0 ), mHolidays( 0 )
{
// Create the Summary Layout
- QVBoxLayout *mainLayout = new QVBoxLayout( this, 3, 3 );
+ TQVBoxLayout *mainLayout = new TQVBoxLayout( this, 3, 3 );
- QPixmap icon = KGlobal::iconLoader()->loadIcon( "cookie",
+ TQPixmap icon = KGlobal::iconLoader()->loadIcon( "cookie",
KIcon::Desktop, KIcon::SizeMedium );
- QWidget *header = createHeader( this, icon, i18n( "Special Dates" ) );
+ TQWidget *header = createHeader( this, icon, i18n( "Special Dates" ) );
mainLayout->addWidget(header);
- mLayout = new QGridLayout( mainLayout, 7, 6, 3 );
+ mLayout = new TQGridLayout( mainLayout, 7, 6, 3 );
mLayout->setRowStretch( 6, 1 );
// Setup the Addressbook
KABC::StdAddressBook *ab = KABC::StdAddressBook::self( true );
- connect( ab, SIGNAL( addressBookChanged( AddressBook* ) ),
- this, SLOT( updateView() ) );
- connect( mPlugin->core(), SIGNAL( dayChanged( const QDate& ) ),
- this, SLOT( updateView() ) );
+ connect( ab, TQT_SIGNAL( addressBookChanged( AddressBook* ) ),
+ this, TQT_SLOT( updateView() ) );
+ connect( mPlugin->core(), TQT_SIGNAL( dayChanged( const TQDate& ) ),
+ this, TQT_SLOT( updateView() ) );
// Setup the Calendar
mCalendar = new KCal::CalendarResources( KPimPrefs::timezone() );
@@ -108,9 +108,9 @@ SDSummaryWidget::SDSummaryWidget( Kontact::Plugin *plugin, QWidget *parent,
if ( manager->isEmpty() ) {
KConfig config( "korganizerrc" );
config.setGroup( "General" );
- QString fileName = config.readPathEntry( "Active Calendar" );
+ TQString fileName = config.readPathEntry( "Active Calendar" );
- QString resourceName;
+ TQString resourceName;
if ( fileName.isEmpty() ) {
fileName = locateLocal( "data", "korganizer/std.ics" );
resourceName = i18n( "Default KOrganizer resource" );
@@ -129,10 +129,10 @@ SDSummaryWidget::SDSummaryWidget( Kontact::Plugin *plugin, QWidget *parent,
mCalendar = KOrg::StdCalendar::self();
mCalendar->load();
- connect( mCalendar, SIGNAL( calendarChanged() ),
- this, SLOT( updateView() ) );
- connect( mPlugin->core(), SIGNAL( dayChanged( const QDate& ) ),
- this, SLOT( updateView() ) );
+ connect( mCalendar, TQT_SIGNAL( calendarChanged() ),
+ this, TQT_SLOT( updateView() ) );
+ connect( mPlugin->core(), TQT_SIGNAL( dayChanged( const TQDate& ) ),
+ this, TQT_SLOT( updateView() ) );
// Update Configuration
configUpdated();
@@ -169,7 +169,7 @@ bool SDSummaryWidget::initHolidays()
{
KConfig hconfig( "korganizerrc" );
hconfig.setGroup( "Time & Date" );
- QString location = hconfig.readEntry( "Holidays" );
+ TQString location = hconfig.readEntry( "Holidays" );
if ( !location.isEmpty() ) {
if ( mHolidays ) delete mHolidays;
mHolidays = new KHolidays( location );
@@ -183,9 +183,9 @@ int SDSummaryWidget::span( KCal::Event *event )
{
int span=1;
if ( event->isMultiDay() && event->doesFloat() ) {
- QDate d = event->dtStart().date();
- if ( d < QDate::currentDate() ) {
- d = QDate::currentDate();
+ TQDate d = event->dtStart().date();
+ if ( d < TQDate::currentDate() ) {
+ d = TQDate::currentDate();
}
while ( d < event->dtEnd().date() ) {
span++;
@@ -196,12 +196,12 @@ int SDSummaryWidget::span( KCal::Event *event )
}
// day of a multiday Event
-int SDSummaryWidget::dayof( KCal::Event *event, const QDate& date )
+int SDSummaryWidget::dayof( KCal::Event *event, const TQDate& date )
{
int dayof=1;
- QDate d = event->dtStart().date();
- if ( d < QDate::currentDate() ) {
- d = QDate::currentDate();
+ TQDate d = event->dtStart().date();
+ if ( d < TQDate::currentDate() ) {
+ d = TQDate::currentDate();
}
while ( d < event->dtEnd().date() ) {
if ( d < date ) {
@@ -221,18 +221,18 @@ void SDSummaryWidget::updateView()
mLabels.setAutoDelete( false );
KABC::StdAddressBook *ab = KABC::StdAddressBook::self( true );
- QValueList<SDEntry> dates;
- QLabel *label = 0;
+ TQValueList<SDEntry> dates;
+ TQLabel *label = 0;
// No reason to show the date year
- QString savefmt = KGlobal::locale()->dateFormat();
+ TQString savefmt = KGlobal::locale()->dateFormat();
KGlobal::locale()->setDateFormat( KGlobal::locale()->
dateFormat().replace( 'Y', ' ' ) );
// Search for Birthdays and Anniversaries in the Addressbook
KABC::AddressBook::Iterator it;
for ( it = ab->begin(); it != ab->end(); ++it ) {
- QDate birthday = (*it).birthday().date();
+ TQDate birthday = (*it).birthday().date();
if ( birthday.isValid() && mShowBirthdaysFromKAB ) {
SDEntry entry;
entry.type = IncidenceTypeContact;
@@ -246,10 +246,10 @@ void SDSummaryWidget::updateView()
dates.append( entry );
}
- QString anniversaryAsString =
+ TQString anniversaryAsString =
(*it).custom( "KADDRESSBOOK" , "X-Anniversary" );
if ( !anniversaryAsString.isEmpty() ) {
- QDate anniversary = QDate::fromString( anniversaryAsString, Qt::ISODate );
+ TQDate anniversary = TQDate::fromString( anniversaryAsString, Qt::ISODate );
if ( anniversary.isValid() && mShowAnniversariesFromKAB ) {
SDEntry entry;
entry.type = IncidenceTypeContact;
@@ -267,8 +267,8 @@ void SDSummaryWidget::updateView()
// Search for Birthdays, Anniversaries, Holidays, and Special Occasions
// in the Calendar
- QDate dt;
- QDate currentDate = QDate::currentDate();
+ TQDate dt;
+ TQDate currentDate = TQDate::currentDate();
for ( dt=currentDate;
dt<=currentDate.addDays( mDaysAhead - 1 );
dt=dt.addDays(1) ) {
@@ -280,8 +280,8 @@ void SDSummaryWidget::updateView()
for ( it=events.begin(); it!=events.end(); ++it ) {
ev = *it;
if ( !ev->categoriesStr().isEmpty() ) {
- QStringList::ConstIterator it2;
- QStringList c = ev->categories();
+ TQStringList::ConstIterator it2;
+ TQStringList c = ev->categories();
for ( it2=c.begin(); it2!=c.end(); ++it2 ) {
// Append Birthday Event?
@@ -360,8 +360,8 @@ void SDSummaryWidget::updateView()
for ( dt=currentDate;
dt<=currentDate.addDays( mDaysAhead - 1 );
dt=dt.addDays(1) ) {
- QValueList<KHoliday> holidays = mHolidays->getHolidays( dt );
- QValueList<KHoliday>::ConstIterator it = holidays.begin();
+ TQValueList<KHoliday> holidays = mHolidays->getHolidays( dt );
+ TQValueList<KHoliday>::ConstIterator it = holidays.begin();
for ( ; it != holidays.end(); ++it ) {
SDEntry entry;
entry.type = IncidenceTypeEvent;
@@ -382,21 +382,21 @@ void SDSummaryWidget::updateView()
if ( !dates.isEmpty() ) {
int counter = 0;
- QValueList<SDEntry>::Iterator addrIt;
- QString lines;
+ TQValueList<SDEntry>::Iterator addrIt;
+ TQString lines;
for ( addrIt = dates.begin(); addrIt != dates.end(); ++addrIt ) {
bool makeBold = (*addrIt).daysTo == 0; // i.e., today
// Pixmap
- QImage icon_img;
- QString icon_name;
+ TQImage icon_img;
+ TQString icon_name;
KABC::Picture pic;
switch( (*addrIt).category ) { // TODO: better icons
case CategoryBirthday:
icon_name = "cookie";
pic = (*addrIt).addressee.photo();
if ( pic.isIntern() && !pic.data().isNull() ) {
- QImage img = pic.data();
+ TQImage img = pic.data();
if ( img.width() > img.height() ) {
icon_img = img.scaleWidth( 32 );
} else {
@@ -408,7 +408,7 @@ void SDSummaryWidget::updateView()
icon_name = "kdmconfig";
pic = (*addrIt).addressee.photo();
if ( pic.isIntern() && !pic.data().isNull() ) {
- QImage img = pic.data();
+ TQImage img = pic.data();
if ( img.width() > img.height() ) {
icon_img = img.scaleWidth( 32 );
} else {
@@ -421,7 +421,7 @@ void SDSummaryWidget::updateView()
case CategoryOther:
icon_name = "cookie"; break;
}
- label = new QLabel( this );
+ label = new TQLabel( this );
if ( icon_img.isNull() ) {
label->setPixmap( KGlobal::iconLoader()->loadIcon( icon_name,
KIcon::Small ) );
@@ -434,11 +434,11 @@ void SDSummaryWidget::updateView()
mLabels.append( label );
// Event date
- QString datestr;
+ TQString datestr;
//Muck with the year -- change to the year 'daysTo' days away
int year = currentDate.addDays( (*addrIt).daysTo ).year();
- QDate sD = QDate::QDate( year,
+ TQDate sD = TQDate::TQDate( year,
(*addrIt).date.month(), (*addrIt).date.day() );
if ( (*addrIt).daysTo == 0 ) {
@@ -451,23 +451,23 @@ void SDSummaryWidget::updateView()
// Print the date span for multiday, floating events, for the
// first day of the event only.
if ( (*addrIt).span > 1 ) {
- QString endstr =
+ TQString endstr =
KGlobal::locale()->formatDate( sD.addDays( (*addrIt).span - 1 ) );
datestr += " -\n " + endstr;
}
- label = new QLabel( datestr, this );
+ label = new TQLabel( datestr, this );
label->setAlignment( AlignLeft | AlignVCenter );
mLayout->addWidget( label, counter, 1 );
mLabels.append( label );
if ( makeBold ) {
- QFont font = label->font();
+ TQFont font = label->font();
font.setBold( true );
label->setFont( font );
}
// Countdown
- label = new QLabel( this );
+ label = new TQLabel( this );
if ( (*addrIt).daysTo == 0 ) {
label->setText( i18n( "now" ) );
} else {
@@ -479,7 +479,7 @@ void SDSummaryWidget::updateView()
mLabels.append( label );
// What
- QString what;
+ TQString what;
switch( (*addrIt).category ) {
case CategoryBirthday:
what = i18n( "Birthday" ); break;
@@ -490,7 +490,7 @@ void SDSummaryWidget::updateView()
case CategoryOther:
what = i18n( "Special Occasion" ); break;
}
- label = new QLabel( this );
+ label = new TQLabel( this );
label->setText( what );
label->setAlignment( AlignLeft | AlignVCenter );
mLayout->addWidget( label, counter, 3 );
@@ -506,25 +506,25 @@ void SDSummaryWidget::updateView()
mLayout->addWidget( urlLabel, counter, 4 );
mLabels.append( urlLabel );
- connect( urlLabel, SIGNAL( leftClickedURL( const QString& ) ),
- this, SLOT( mailContact( const QString& ) ) );
- connect( urlLabel, SIGNAL( rightClickedURL( const QString& ) ),
- this, SLOT( popupMenu( const QString& ) ) );
+ connect( urlLabel, TQT_SIGNAL( leftClickedURL( const TQString& ) ),
+ this, TQT_SLOT( mailContact( const TQString& ) ) );
+ connect( urlLabel, TQT_SIGNAL( rightClickedURL( const TQString& ) ),
+ this, TQT_SLOT( popupMenu( const TQString& ) ) );
} else {
- label = new QLabel( this );
+ label = new TQLabel( this );
label->setText( (*addrIt).summary );
label->setTextFormat( Qt::RichText );
mLayout->addWidget( label, counter, 4 );
mLabels.append( label );
if ( !(*addrIt).desc.isEmpty() ) {
- QToolTip::add( label, (*addrIt).desc );
+ TQToolTip::add( label, (*addrIt).desc );
}
}
// Age
if ( (*addrIt).category == CategoryBirthday ||
(*addrIt).category == CategoryAnniversary ) {
- label = new QLabel( this );
+ label = new TQLabel( this );
if ( (*addrIt).yearsOld <= 0 ) {
label->setText( "" );
} else {
@@ -538,7 +538,7 @@ void SDSummaryWidget::updateView()
counter++;
}
} else {
- label = new QLabel(
+ label = new TQLabel(
i18n( "No special dates within the next 1 day",
"No special dates pending within the next %n days",
mDaysAhead ), this, "nothing to see" );
@@ -553,15 +553,15 @@ void SDSummaryWidget::updateView()
KGlobal::locale()->setDateFormat( savefmt );
}
-void SDSummaryWidget::mailContact( const QString &uid )
+void SDSummaryWidget::mailContact( const TQString &uid )
{
KABC::StdAddressBook *ab = KABC::StdAddressBook::self( true );
- QString email = ab->findByUid( uid ).fullEmail();
+ TQString email = ab->findByUid( uid ).fullEmail();
- kapp->invokeMailer( email, QString::null );
+ kapp->invokeMailer( email, TQString::null );
}
-void SDSummaryWidget::viewContact( const QString &uid )
+void SDSummaryWidget::viewContact( const TQString &uid )
{
if ( !mPlugin->isRunningStandalone() )
mPlugin->core()->selectPlugin( "kontact_kaddressbookplugin" );
@@ -569,10 +569,10 @@ void SDSummaryWidget::viewContact( const QString &uid )
mPlugin->bringToForeground();
DCOPRef dcopCall( "kaddressbook", "KAddressBookIface" );
- dcopCall.send( "showContactEditor(QString)", uid );
+ dcopCall.send( "showContactEditor(TQString)", uid );
}
-void SDSummaryWidget::popupMenu( const QString &uid )
+void SDSummaryWidget::popupMenu( const TQString &uid )
{
KPopupMenu popup( this );
popup.insertItem( KGlobal::iconLoader()->loadIcon( "kmail", KIcon::Small ),
@@ -580,7 +580,7 @@ void SDSummaryWidget::popupMenu( const QString &uid )
popup.insertItem( KGlobal::iconLoader()->loadIcon( "kaddressbook", KIcon::Small ),
i18n( "View &Contact" ), 1 );
- switch ( popup.exec( QCursor::pos() ) ) {
+ switch ( popup.exec( TQCursor::pos() ) ) {
case 0:
mailContact( uid );
break;
@@ -590,48 +590,48 @@ void SDSummaryWidget::popupMenu( const QString &uid )
}
}
-bool SDSummaryWidget::eventFilter( QObject *obj, QEvent* e )
+bool SDSummaryWidget::eventFilter( TQObject *obj, TQEvent* e )
{
if ( obj->inherits( "KURLLabel" ) ) {
KURLLabel* label = static_cast<KURLLabel*>( obj );
- if ( e->type() == QEvent::Enter )
+ if ( e->type() == TQEvent::Enter )
emit message( i18n( "Mail to:\"%1\"" ).arg( label->text() ) );
- if ( e->type() == QEvent::Leave )
- emit message( QString::null );
+ if ( e->type() == TQEvent::Leave )
+ emit message( TQString::null );
}
return Kontact::Summary::eventFilter( obj, e );
}
-void SDSummaryWidget::dateDiff( const QDate &date, int &days, int &years )
+void SDSummaryWidget::dateDiff( const TQDate &date, int &days, int &years )
{
- QDate currentDate;
- QDate eventDate;
+ TQDate currentDate;
+ TQDate eventDate;
- if ( QDate::leapYear( date.year() ) && date.month() == 2 && date.day() == 29 ) {
- currentDate = QDate( date.year(), QDate::currentDate().month(), QDate::currentDate().day() );
- if ( !QDate::leapYear( QDate::currentDate().year() ) )
- eventDate = QDate( date.year(), date.month(), 28 ); // celebrate one day earlier ;)
+ if ( TQDate::leapYear( date.year() ) && date.month() == 2 && date.day() == 29 ) {
+ currentDate = TQDate( date.year(), TQDate::currentDate().month(), TQDate::currentDate().day() );
+ if ( !TQDate::leapYear( TQDate::currentDate().year() ) )
+ eventDate = TQDate( date.year(), date.month(), 28 ); // celebrate one day earlier ;)
else
- eventDate = QDate( date.year(), date.month(), date.day() );
+ eventDate = TQDate( date.year(), date.month(), date.day() );
} else {
- currentDate = QDate( 0, QDate::currentDate().month(), QDate::currentDate().day() );
- eventDate = QDate( 0, date.month(), date.day() );
+ currentDate = TQDate( 0, TQDate::currentDate().month(), TQDate::currentDate().day() );
+ eventDate = TQDate( 0, date.month(), date.day() );
}
int offset = currentDate.daysTo( eventDate );
if ( offset < 0 ) {
days = 365 + offset;
- years = QDate::currentDate().year() + 1 - date.year();
+ years = TQDate::currentDate().year() + 1 - date.year();
} else {
days = offset;
- years = QDate::currentDate().year() - date.year();
+ years = TQDate::currentDate().year() - date.year();
}
}
-QStringList SDSummaryWidget::configModules() const
+TQStringList SDSummaryWidget::configModules() const
{
- return QStringList( "kcmsdsummary.desktop" );
+ return TQStringList( "kcmsdsummary.desktop" );
}
#include "sdsummarywidget.moc"
diff --git a/kontact/plugins/specialdates/sdsummarywidget.h b/kontact/plugins/specialdates/sdsummarywidget.h
index 74cd08942..00e4da223 100644
--- a/kontact/plugins/specialdates/sdsummarywidget.h
+++ b/kontact/plugins/specialdates/sdsummarywidget.h
@@ -25,8 +25,8 @@
#ifndef SDSUMMARYWIDGET_H
#define SDSUMMARYWIDGET_H
-#include <qptrlist.h>
-#include <qwidget.h>
+#include <tqptrlist.h>
+#include <tqwidget.h>
#include <libkcal/calendarresources.h>
#include <libkholidays/kholidays.h>
@@ -45,29 +45,29 @@ class SDSummaryWidget : public Kontact::Summary
Q_OBJECT
public:
- SDSummaryWidget( Kontact::Plugin *plugin, QWidget *parent,
+ SDSummaryWidget( Kontact::Plugin *plugin, TQWidget *parent,
const char *name = 0 );
- QStringList configModules() const;
+ TQStringList configModules() const;
void configUpdated();
void updateSummary( bool force = false ) { Q_UNUSED( force ); updateView(); }
protected:
- virtual bool eventFilter( QObject *obj, QEvent* e );
+ virtual bool eventFilter( TQObject *obj, TQEvent* e );
private slots:
void updateView();
- void popupMenu( const QString &uid );
- void mailContact( const QString &uid );
- void viewContact( const QString &uid );
+ void popupMenu( const TQString &uid );
+ void mailContact( const TQString &uid );
+ void viewContact( const TQString &uid );
private:
int span( KCal::Event *event );
- int dayof( KCal::Event *event, const QDate &date );
+ int dayof( KCal::Event *event, const TQDate &date );
bool initHolidays();
- void dateDiff( const QDate &date, int &days, int &years );
- QGridLayout *mLayout;
- QPtrList<QLabel> mLabels;
+ void dateDiff( const TQDate &date, int &days, int &years );
+ TQGridLayout *mLayout;
+ TQPtrList<TQLabel> mLabels;
Kontact::Plugin *mPlugin;
KCal::CalendarResources *mCalendar;
int mDaysAhead;
diff --git a/kontact/plugins/specialdates/specialdates_plugin.cpp b/kontact/plugins/specialdates/specialdates_plugin.cpp
index f0149fd9a..9f78de3f6 100644
--- a/kontact/plugins/specialdates/specialdates_plugin.cpp
+++ b/kontact/plugins/specialdates/specialdates_plugin.cpp
@@ -36,7 +36,7 @@ typedef KGenericFactory< SpecialdatesPlugin, Kontact::Core > SpecialdatesPluginF
K_EXPORT_COMPONENT_FACTORY( libkontact_specialdatesplugin,
SpecialdatesPluginFactory( "kontact_specialdatesplugin" ) )
-SpecialdatesPlugin::SpecialdatesPlugin( Kontact::Core *core, const char *name, const QStringList& )
+SpecialdatesPlugin::SpecialdatesPlugin( Kontact::Core *core, const char *name, const TQStringList& )
: Kontact::Plugin( core, core, name ),
mAboutData( 0 )
{
@@ -47,7 +47,7 @@ SpecialdatesPlugin::~SpecialdatesPlugin()
{
}
-Kontact::Summary *SpecialdatesPlugin::createSummaryWidget( QWidget *parentWidget )
+Kontact::Summary *SpecialdatesPlugin::createSummaryWidget( TQWidget *parentWidget )
{
return new SDSummaryWidget( this, parentWidget );
}
diff --git a/kontact/plugins/specialdates/specialdates_plugin.h b/kontact/plugins/specialdates/specialdates_plugin.h
index 6534afb5c..59fc8dbba 100644
--- a/kontact/plugins/specialdates/specialdates_plugin.h
+++ b/kontact/plugins/specialdates/specialdates_plugin.h
@@ -32,14 +32,14 @@ class SDSummaryWidget;
class SpecialdatesPlugin : public Kontact::Plugin
{
public:
- SpecialdatesPlugin( Kontact::Core *core, const char *name, const QStringList& );
+ SpecialdatesPlugin( Kontact::Core *core, const char *name, const TQStringList& );
~SpecialdatesPlugin();
int weight() const { return 310; }
const KAboutData *aboutData();
- virtual Kontact::Summary *createSummaryWidget( QWidget *parentWidget );
+ virtual Kontact::Summary *createSummaryWidget( TQWidget *parentWidget );
protected:
virtual KParts::ReadOnlyPart *createPart() { return false; }
diff --git a/kontact/plugins/summary/dropwidget.cpp b/kontact/plugins/summary/dropwidget.cpp
index 0d6aa5305..341c37d80 100644
--- a/kontact/plugins/summary/dropwidget.cpp
+++ b/kontact/plugins/summary/dropwidget.cpp
@@ -19,22 +19,22 @@
Boston, MA 02110-1301, USA.
*/
-#include <qdragobject.h>
+#include <tqdragobject.h>
#include "dropwidget.h"
-DropWidget::DropWidget( QWidget *parent, const char *name )
- : QWidget( parent, name )
+DropWidget::DropWidget( TQWidget *parent, const char *name )
+ : TQWidget( parent, name )
{
setAcceptDrops( true );
}
-void DropWidget::dragEnterEvent( QDragEnterEvent *event )
+void DropWidget::dragEnterEvent( TQDragEnterEvent *event )
{
- event->accept( QTextDrag::canDecode( event ) );
+ event->accept( TQTextDrag::canDecode( event ) );
}
-void DropWidget::dropEvent( QDropEvent *event )
+void DropWidget::dropEvent( TQDropEvent *event )
{
int alignment = ( event->pos().x() < (width() / 2) ? Qt::AlignLeft : Qt::AlignRight );
alignment |= ( event->pos().y() < (height() / 2) ? Qt::AlignTop : Qt::AlignBottom );
diff --git a/kontact/plugins/summary/dropwidget.h b/kontact/plugins/summary/dropwidget.h
index 7cde7f5e0..ade7b6c17 100644
--- a/kontact/plugins/summary/dropwidget.h
+++ b/kontact/plugins/summary/dropwidget.h
@@ -22,21 +22,21 @@
#ifndef DROP_WIDGET_H
#define DROP_WIDGET_H
-#include <qwidget.h>
+#include <tqwidget.h>
class DropWidget : public QWidget
{
Q_OBJECT
public:
- DropWidget( QWidget *parent, const char *name = 0 );
+ DropWidget( TQWidget *parent, const char *name = 0 );
signals:
- void summaryWidgetDropped( QWidget *target, QWidget *widget, int alignment );
+ void summaryWidgetDropped( TQWidget *target, TQWidget *widget, int alignment );
protected:
- virtual void dragEnterEvent( QDragEnterEvent* );
- virtual void dropEvent( QDropEvent* );
+ virtual void dragEnterEvent( TQDragEnterEvent* );
+ virtual void dropEvent( TQDropEvent* );
};
#endif
diff --git a/kontact/plugins/summary/kcmkontactsummary.cpp b/kontact/plugins/summary/kcmkontactsummary.cpp
index d52d991fc..cf8154168 100644
--- a/kontact/plugins/summary/kcmkontactsummary.cpp
+++ b/kontact/plugins/summary/kcmkontactsummary.cpp
@@ -33,9 +33,9 @@
#include <kplugininfo.h>
#include <ktrader.h>
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qpixmap.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqpixmap.h>
#include "kcmkontactsummary.h"
@@ -43,7 +43,7 @@
extern "C"
{
- KDE_EXPORT KCModule *create_kontactsummary( QWidget *parent, const char * ) {
+ KDE_EXPORT KCModule *create_kontactsummary( TQWidget *parent, const char * ) {
return new KCMKontactSummary( parent, "kcmkontactsummary" );
}
}
@@ -52,10 +52,10 @@ class PluginItem : public QCheckListItem
{
public:
PluginItem( KPluginInfo *info, KListView *parent )
- : QCheckListItem( parent, QString::null, QCheckListItem::CheckBox ),
+ : TQCheckListItem( parent, TQString::null, TQCheckListItem::CheckBox ),
mInfo( info )
{
- QPixmap pm = KGlobal::iconLoader()->loadIcon( mInfo->icon(), KIcon::Small );
+ TQPixmap pm = KGlobal::iconLoader()->loadIcon( mInfo->icon(), KIcon::Small );
setPixmap( 0, pm );
}
@@ -64,21 +64,21 @@ class PluginItem : public QCheckListItem
return mInfo;
}
- virtual QString text( int column ) const
+ virtual TQString text( int column ) const
{
if ( column == 0 )
return mInfo->name();
else if ( column == 1 )
return mInfo->comment();
else
- return QString::null;
+ return TQString::null;
}
private:
KPluginInfo *mInfo;
};
-PluginView::PluginView( QWidget *parent, const char *name )
+PluginView::PluginView( TQWidget *parent, const char *name )
: KListView( parent, name )
{
addColumn( i18n( "Name" ) );
@@ -90,12 +90,12 @@ PluginView::~PluginView()
{
}
-KCMKontactSummary::KCMKontactSummary( QWidget *parent, const char *name )
+KCMKontactSummary::KCMKontactSummary( TQWidget *parent, const char *name )
: KCModule( parent, name )
{
- QVBoxLayout *layout = new QVBoxLayout( this, 0, KDialog::spacingHint() );
+ TQVBoxLayout *layout = new TQVBoxLayout( this, 0, KDialog::spacingHint() );
- QLabel *label = new QLabel( i18n( "Here you can select which summary plugins to have visible in your summary view." ), this );
+ TQLabel *label = new TQLabel( i18n( "Here you can select which summary plugins to have visible in your summary view." ), this );
layout->addWidget( label );
mPluginView = new PluginView( this );
@@ -103,8 +103,8 @@ KCMKontactSummary::KCMKontactSummary( QWidget *parent, const char *name )
layout->setStretchFactor( mPluginView, 1 );
- connect( mPluginView, SIGNAL( clicked( QListViewItem* ) ),
- this, SLOT( itemClicked( QListViewItem* ) ) );
+ connect( mPluginView, TQT_SIGNAL( clicked( TQListViewItem* ) ),
+ this, TQT_SLOT( itemClicked( TQListViewItem* ) ) );
load();
KAboutData *about = new KAboutData( I18N_NOOP( "kontactsummary" ),
@@ -119,10 +119,10 @@ KCMKontactSummary::KCMKontactSummary( QWidget *parent, const char *name )
void KCMKontactSummary::load()
{
KTrader::OfferList offers = KTrader::self()->query(
- QString::fromLatin1( "Kontact/Plugin" ),
- QString( "[X-KDE-KontactPluginVersion] == %1" ).arg( KONTACT_PLUGIN_VERSION ) );
+ TQString::fromLatin1( "Kontact/Plugin" ),
+ TQString( "[X-KDE-KontactPluginVersion] == %1" ).arg( KONTACT_PLUGIN_VERSION ) );
- QStringList activeSummaries;
+ TQStringList activeSummaries;
KConfig config( "kontact_summaryrc" );
if ( !config.hasKey( "ActiveSummaries" ) ) {
@@ -148,7 +148,7 @@ void KCMKontactSummary::load()
if ( !(*it)->isPluginEnabled() )
continue;
- QVariant var = (*it)->property( "X-KDE-KontactPluginHasSummary" );
+ TQVariant var = (*it)->property( "X-KDE-KontactPluginHasSummary" );
if ( !var.isValid() )
continue;
@@ -163,9 +163,9 @@ void KCMKontactSummary::load()
void KCMKontactSummary::save()
{
- QStringList activeSummaries;
+ TQStringList activeSummaries;
- QListViewItemIterator it( mPluginView, QListViewItemIterator::Checked );
+ TQListViewItemIterator it( mPluginView, TQListViewItemIterator::Checked );
while ( it.current() ) {
PluginItem *item = static_cast<PluginItem*>( it.current() );
activeSummaries.append( item->pluginInfo()->pluginName() );
@@ -181,7 +181,7 @@ void KCMKontactSummary::defaults()
emit changed( true );
}
-void KCMKontactSummary::itemClicked( QListViewItem* )
+void KCMKontactSummary::itemClicked( TQListViewItem* )
{
emit changed( true );
}
diff --git a/kontact/plugins/summary/kcmkontactsummary.h b/kontact/plugins/summary/kcmkontactsummary.h
index 3c6c6d05d..fd1f983d9 100644
--- a/kontact/plugins/summary/kcmkontactsummary.h
+++ b/kontact/plugins/summary/kcmkontactsummary.h
@@ -35,7 +35,7 @@ class PluginView : public KListView
Q_OBJECT
public:
- PluginView( QWidget *parent, const char *name = 0 );
+ PluginView( TQWidget *parent, const char *name = 0 );
~PluginView();
};
@@ -44,14 +44,14 @@ class KCMKontactSummary : public KCModule
Q_OBJECT
public:
- KCMKontactSummary( QWidget *parent = 0, const char *name = 0 );
+ KCMKontactSummary( TQWidget *parent = 0, const char *name = 0 );
virtual void load();
virtual void save();
virtual void defaults();
private slots:
- void itemClicked( QListViewItem* );
+ void itemClicked( TQListViewItem* );
private:
PluginView *mPluginView;
diff --git a/kontact/plugins/summary/summaryview_part.cpp b/kontact/plugins/summary/summaryview_part.cpp
index 9597de674..0b22f853b 100644
--- a/kontact/plugins/summary/summaryview_part.cpp
+++ b/kontact/plugins/summary/summaryview_part.cpp
@@ -21,10 +21,10 @@
Boston, MA 02110-1301, USA.
*/
-#include <qframe.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qtimer.h>
+#include <tqframe.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqtimer.h>
#include <dcopclient.h>
#include <kaction.h>
@@ -38,7 +38,7 @@
#include <kservice.h>
#include <ktrader.h>
#include <kstandarddirs.h>
-#include <qscrollview.h>
+#include <tqscrollview.h>
#include <kglobal.h>
#include <klocale.h>
#include <kcmultidialog.h>
@@ -67,7 +67,7 @@ namespace Kontact
SummaryViewPart::SummaryViewPart( Kontact::Core *core, const char*,
const KAboutData *aboutData,
- QObject *parent, const char *name )
+ TQObject *parent, const char *name )
: KParts::ReadOnlyPart( parent, name ),
mCore( core ), mFrame( 0 ), mConfigAction( 0 )
{
@@ -77,25 +77,25 @@ SummaryViewPart::SummaryViewPart( Kontact::Core *core, const char*,
initGUI( core );
- connect( kapp, SIGNAL( kdisplayPaletteChanged() ), SLOT( slotAdjustPalette() ) );
+ connect( kapp, TQT_SIGNAL( kdisplayPaletteChanged() ), TQT_SLOT( slotAdjustPalette() ) );
slotAdjustPalette();
- setDate( QDate::currentDate() );
- connect( mCore, SIGNAL( dayChanged( const QDate& ) ),
- SLOT( setDate( const QDate& ) ) );
+ setDate( TQDate::currentDate() );
+ connect( mCore, TQT_SIGNAL( dayChanged( const TQDate& ) ),
+ TQT_SLOT( setDate( const TQDate& ) ) );
KParts::InfoExtension *info = new KParts::InfoExtension( this, "Summary" );
- connect( this, SIGNAL( textChanged( const QString& ) ),
- info, SIGNAL( textChanged( const QString& ) ) );
+ connect( this, TQT_SIGNAL( textChanged( const TQString& ) ),
+ info, TQT_SIGNAL( textChanged( const TQString& ) ) );
mConfigAction = new KAction( i18n( "&Configure Summary View..." ),
"configure", 0, this,
- SLOT( slotConfigure() ), actionCollection(),
+ TQT_SLOT( slotConfigure() ), actionCollection(),
"summaryview_configure" );
setXMLFile( "kontactsummary_part.rc" );
- QTimer::singleShot( 0, this, SLOT( slotTextChanged() ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( slotTextChanged() ) );
}
SummaryViewPart::~SummaryViewPart()
@@ -122,7 +122,7 @@ void SummaryViewPart::partActivateEvent( KParts::PartActivateEvent *event )
void SummaryViewPart::updateSummaries()
{
- QMap<QString, Kontact::Summary*>::Iterator it;
+ TQMap<TQString, Kontact::Summary*>::Iterator it;
for ( it = mSummaries.begin(); it != mSummaries.end(); ++it )
it.data()->updateSummary( false );
}
@@ -136,18 +136,18 @@ void SummaryViewPart::updateWidgets()
KPIM::IdentityManager idm( true, this );
const KPIM::Identity &id = idm.defaultIdentity();
- QString currentUser = i18n( "Summary for %1" ).arg( id.fullName() );
- mUsernameLabel->setText( QString::fromLatin1( "<b>%1</b>" ).arg( currentUser ) );
+ TQString currentUser = i18n( "Summary for %1" ).arg( id.fullName() );
+ mUsernameLabel->setText( TQString::fromLatin1( "<b>%1</b>" ).arg( currentUser ) );
mSummaries.clear();
mFrame = new DropWidget( mMainWidget );
- connect( mFrame, SIGNAL( summaryWidgetDropped( QWidget*, QWidget*, int ) ),
- this, SLOT( summaryWidgetMoved( QWidget*, QWidget*, int ) ) );
+ connect( mFrame, TQT_SIGNAL( summaryWidgetDropped( TQWidget*, TQWidget*, int ) ),
+ this, TQT_SLOT( summaryWidgetMoved( TQWidget*, TQWidget*, int ) ) );
mMainLayout->insertWidget( 2, mFrame );
- QStringList activeSummaries;
+ TQStringList activeSummaries;
KConfig config( "kontact_summaryrc" );
if ( !config.hasKey( "ActiveSummaries" ) ) {
@@ -161,11 +161,11 @@ void SummaryViewPart::updateWidgets()
}
// Collect all summary widgets with a summaryHeight > 0
- QStringList loadedSummaries;
+ TQStringList loadedSummaries;
- QValueList<Kontact::Plugin*> plugins = mCore->pluginList();
- QValueList<Kontact::Plugin*>::ConstIterator end = plugins.end();
- QValueList<Kontact::Plugin*>::ConstIterator it = plugins.begin();
+ TQValueList<Kontact::Plugin*> plugins = mCore->pluginList();
+ TQValueList<Kontact::Plugin*>::ConstIterator end = plugins.end();
+ TQValueList<Kontact::Plugin*>::ConstIterator it = plugins.begin();
for ( ; it != end; ++it ) {
Kontact::Plugin *plugin = *it;
if ( activeSummaries.find( plugin->identifier() ) == activeSummaries.end() )
@@ -176,10 +176,10 @@ void SummaryViewPart::updateWidgets()
if ( summary->summaryHeight() > 0 ) {
mSummaries.insert( plugin->identifier(), summary );
- connect( summary, SIGNAL( message( const QString& ) ),
- BroadcastStatus::instance(), SLOT( setStatusMsg( const QString& ) ) );
- connect( summary, SIGNAL( summaryWidgetDropped( QWidget*, QWidget*, int ) ),
- this, SLOT( summaryWidgetMoved( QWidget*, QWidget*, int ) ) );
+ connect( summary, TQT_SIGNAL( message( const TQString& ) ),
+ BroadcastStatus::instance(), TQT_SLOT( setStatusMsg( const TQString& ) ) );
+ connect( summary, TQT_SIGNAL( summaryWidgetDropped( TQWidget*, TQWidget*, int ) ),
+ this, TQT_SLOT( summaryWidgetMoved( TQWidget*, TQWidget*, int ) ) );
if ( !mLeftColumnSummaries.contains( plugin->identifier() ) &&
!mRightColumnSummaries.contains( plugin->identifier() ) ) {
@@ -195,7 +195,7 @@ void SummaryViewPart::updateWidgets()
// Remove all unavailable summary widgets
{
- QStringList::Iterator strIt;
+ TQStringList::Iterator strIt;
for ( strIt = mLeftColumnSummaries.begin(); strIt != mLeftColumnSummaries.end(); ++strIt ) {
if ( loadedSummaries.find( *strIt ) == loadedSummaries.end() ) {
strIt = mLeftColumnSummaries.remove( strIt );
@@ -211,17 +211,17 @@ void SummaryViewPart::updateWidgets()
}
// Add vertical line between the two rows of summary widgets.
- QFrame *vline = new QFrame( mFrame );
- vline->setFrameStyle( QFrame::VLine | QFrame::Plain );
+ TQFrame *vline = new TQFrame( mFrame );
+ vline->setFrameStyle( TQFrame::VLine | TQFrame::Plain );
- QHBoxLayout *layout = new QHBoxLayout( mFrame );
+ TQHBoxLayout *layout = new TQHBoxLayout( mFrame );
- mLeftColumn = new QVBoxLayout( layout, KDialog::spacingHint() );
+ mLeftColumn = new TQVBoxLayout( layout, KDialog::spacingHint() );
layout->addWidget( vline );
- mRightColumn = new QVBoxLayout( layout, KDialog::spacingHint() );
+ mRightColumn = new TQVBoxLayout( layout, KDialog::spacingHint() );
- QStringList::Iterator strIt;
+ TQStringList::Iterator strIt;
for ( strIt = mLeftColumnSummaries.begin(); strIt != mLeftColumnSummaries.end(); ++strIt ) {
if ( mSummaries.find( *strIt ) != mSummaries.end() )
mLeftColumn->addWidget( mSummaries[ *strIt ] );
@@ -241,7 +241,7 @@ void SummaryViewPart::updateWidgets()
mRightColumn->addStretch();
}
-void SummaryViewPart::summaryWidgetMoved( QWidget *target, QWidget *widget, int alignment )
+void SummaryViewPart::summaryWidgetMoved( TQWidget *target, TQWidget *widget, int alignment )
{
if ( target == widget )
return;
@@ -314,9 +314,9 @@ void SummaryViewPart::slotAdjustPalette()
mMainWidget->setPaletteBackgroundColor( kapp->palette().active().base() );
}
-void SummaryViewPart::setDate( const QDate& newDate )
+void SummaryViewPart::setDate( const TQDate& newDate )
{
- QString date( "<b>%1</b>" );
+ TQString date( "<b>%1</b>" );
date = date.arg( KGlobal::locale()->formatDate( newDate ) );
mDateLabel->setText( date );
}
@@ -325,26 +325,26 @@ void SummaryViewPart::slotConfigure()
{
KCMultiDialog dlg( mMainWidget, "ConfigDialog", true );
- QStringList modules = configModules();
+ TQStringList modules = configModules();
modules.prepend( "kcmkontactsummary.desktop" );
- connect( &dlg, SIGNAL( configCommitted() ),
- this, SLOT( updateWidgets() ) );
+ connect( &dlg, TQT_SIGNAL( configCommitted() ),
+ this, TQT_SLOT( updateWidgets() ) );
- QStringList::ConstIterator strIt;
+ TQStringList::ConstIterator strIt;
for ( strIt = modules.begin(); strIt != modules.end(); ++strIt )
dlg.addModule( *strIt );
dlg.exec();
}
-QStringList SummaryViewPart::configModules() const
+TQStringList SummaryViewPart::configModules() const
{
- QStringList modules;
+ TQStringList modules;
- QMap<QString, Kontact::Summary*>::ConstIterator it;
+ TQMap<TQString, Kontact::Summary*>::ConstIterator it;
for ( it = mSummaries.begin(); it != mSummaries.end(); ++it ) {
- QStringList cm = it.data()->configModules();
- QStringList::ConstIterator strIt;
+ TQStringList cm = it.data()->configModules();
+ TQStringList::ConstIterator strIt;
for ( strIt = cm.begin(); strIt != cm.end(); ++strIt )
if ( !(*strIt).isEmpty() && !modules.contains( *strIt ) )
modules.append( *strIt );
@@ -355,37 +355,37 @@ QStringList SummaryViewPart::configModules() const
void SummaryViewPart::initGUI( Kontact::Core *core )
{
- QScrollView *sv = new QScrollView( core );
+ TQScrollView *sv = new TQScrollView( core );
- sv->setResizePolicy( QScrollView::AutoOneFit );
- sv->setFrameStyle( QFrame::NoFrame | QFrame::Plain );
- sv->setHScrollBarMode( QScrollView::AlwaysOff );
+ sv->setResizePolicy( TQScrollView::AutoOneFit );
+ sv->setFrameStyle( TQFrame::NoFrame | TQFrame::Plain );
+ sv->setHScrollBarMode( TQScrollView::AlwaysOff );
- mMainWidget = new QFrame( sv->viewport() );
+ mMainWidget = new TQFrame( sv->viewport() );
sv->addChild( mMainWidget );
- mMainWidget->setFrameStyle( QFrame::Panel | QFrame::Sunken );
- sv->setFocusPolicy( QWidget::StrongFocus );
+ mMainWidget->setFrameStyle( TQFrame::Panel | TQFrame::Sunken );
+ sv->setFocusPolicy( TQWidget::StrongFocus );
setWidget( sv );
- mMainLayout = new QVBoxLayout( mMainWidget,KDialog::marginHint(),
+ mMainLayout = new TQVBoxLayout( mMainWidget,KDialog::marginHint(),
KDialog::spacingHint() );
- QHBoxLayout *hbl = new QHBoxLayout( mMainLayout );
- mUsernameLabel = new QLabel( mMainWidget );
+ TQHBoxLayout *hbl = new TQHBoxLayout( mMainLayout );
+ mUsernameLabel = new TQLabel( mMainWidget );
hbl->addWidget( mUsernameLabel );
- mDateLabel = new QLabel( mMainWidget );
+ mDateLabel = new TQLabel( mMainWidget );
mDateLabel->setAlignment( AlignRight );
hbl->addWidget( mDateLabel );
- QFrame *hline = new QFrame( mMainWidget );
- hline->setFrameStyle( QFrame::HLine | QFrame::Plain );
+ TQFrame *hline = new TQFrame( mMainWidget );
+ hline->setFrameStyle( TQFrame::HLine | TQFrame::Plain );
mMainLayout->insertWidget( 1, hline );
mFrame = new DropWidget( mMainWidget );
mMainLayout->insertWidget( 2, mFrame );
- connect( mFrame, SIGNAL( summaryWidgetDropped( QWidget*, QWidget*, int ) ),
- this, SLOT( summaryWidgetMoved( QWidget*, QWidget*, int ) ) );
+ connect( mFrame, TQT_SIGNAL( summaryWidgetDropped( TQWidget*, TQWidget*, int ) ),
+ this, TQT_SLOT( summaryWidgetMoved( TQWidget*, TQWidget*, int ) ) );
updateWidgets();
}
@@ -420,15 +420,15 @@ void SummaryViewPart::saveLayout()
config.sync();
}
-QString SummaryViewPart::widgetName( QWidget *widget ) const
+TQString SummaryViewPart::widgetName( TQWidget *widget ) const
{
- QMap<QString, Kontact::Summary*>::ConstIterator it;
+ TQMap<TQString, Kontact::Summary*>::ConstIterator it;
for ( it = mSummaries.begin(); it != mSummaries.end(); ++it ) {
if ( it.data() == widget )
return it.key();
}
- return QString::null;
+ return TQString::null;
}
#include "summaryview_part.moc"
diff --git a/kontact/plugins/summary/summaryview_part.h b/kontact/plugins/summary/summaryview_part.h
index f98d7d065..0868b13c9 100644
--- a/kontact/plugins/summary/summaryview_part.h
+++ b/kontact/plugins/summary/summaryview_part.h
@@ -24,8 +24,8 @@
#ifndef SUMMARYVIEW_PART_H
#define SUMMARYVIEW_PART_H
-#include <qdatetime.h>
-#include <qmap.h>
+#include <tqdatetime.h>
+#include <tqmap.h>
#include <kparts/part.h>
@@ -56,17 +56,17 @@ class SummaryViewPart : public KParts::ReadOnlyPart
public:
SummaryViewPart( Kontact::Core *core, const char *widgetName,
const KAboutData *aboutData,
- QObject *parent = 0, const char *name = 0 );
+ TQObject *parent = 0, const char *name = 0 );
~SummaryViewPart();
public slots:
void slotTextChanged();
void slotAdjustPalette();
- void setDate( const QDate& newDate );
+ void setDate( const TQDate& newDate );
void updateSummaries();
signals:
- void textChanged( const QString& );
+ void textChanged( const TQString& );
protected:
virtual bool openFile();
@@ -75,29 +75,29 @@ class SummaryViewPart : public KParts::ReadOnlyPart
protected slots:
void slotConfigure();
void updateWidgets();
- void summaryWidgetMoved( QWidget *target, QWidget *widget, int alignment );
+ void summaryWidgetMoved( TQWidget *target, TQWidget *widget, int alignment );
private:
void initGUI( Kontact::Core *core );
void loadLayout();
void saveLayout();
- QString widgetName( QWidget* ) const;
+ TQString widgetName( TQWidget* ) const;
- QStringList configModules() const;
+ TQStringList configModules() const;
- QMap<QString, Kontact::Summary*> mSummaries;
+ TQMap<TQString, Kontact::Summary*> mSummaries;
Kontact::Core *mCore;
DropWidget *mFrame;
- QFrame *mMainWidget;
- QVBoxLayout *mMainLayout;
- QVBoxLayout *mLeftColumn;
- QVBoxLayout *mRightColumn;
- QLabel *mUsernameLabel;
- QLabel *mDateLabel;
+ TQFrame *mMainWidget;
+ TQVBoxLayout *mMainLayout;
+ TQVBoxLayout *mLeftColumn;
+ TQVBoxLayout *mRightColumn;
+ TQLabel *mUsernameLabel;
+ TQLabel *mDateLabel;
KAction *mConfigAction;
- QStringList mLeftColumnSummaries;
- QStringList mRightColumnSummaries;
+ TQStringList mLeftColumnSummaries;
+ TQStringList mRightColumnSummaries;
};
#endif
diff --git a/kontact/plugins/summary/summaryview_plugin.cpp b/kontact/plugins/summary/summaryview_plugin.cpp
index a73faf7e0..9f9073808 100644
--- a/kontact/plugins/summary/summaryview_plugin.cpp
+++ b/kontact/plugins/summary/summaryview_plugin.cpp
@@ -27,23 +27,23 @@
#include <kaboutdata.h>
#include <kaction.h>
-#include <qpopupmenu.h>
+#include <tqpopupmenu.h>
typedef KGenericFactory< SummaryView, Kontact::Core > SummaryViewFactory;
K_EXPORT_COMPONENT_FACTORY( libkontact_summaryplugin,
SummaryViewFactory( "kontact_summaryplugin" ) )
-SummaryView::SummaryView( Kontact::Core *core, const char *name, const QStringList& )
+SummaryView::SummaryView( Kontact::Core *core, const char *name, const TQStringList& )
: Kontact::Plugin( core, core, name),
mAboutData( 0 ), mPart( 0 )
{
setInstance( SummaryViewFactory::instance() );
mSyncAction = new KSelectAction( i18n( "Synchronize All" ), "reload", 0, this,
- SLOT( doSync() ), actionCollection(),
+ TQT_SLOT( doSync() ), actionCollection(),
"kontact_summary_sync" );
- connect( mSyncAction, SIGNAL( activated( const QString& ) ), this, SLOT( syncAccount( const QString& ) ) );
- connect( mSyncAction->popupMenu(), SIGNAL( aboutToShow() ), this, SLOT( fillSyncActionSubEntries() ) );
+ connect( mSyncAction, TQT_SIGNAL( activated( const TQString& ) ), this, TQT_SLOT( syncAccount( const TQString& ) ) );
+ connect( mSyncAction->popupMenu(), TQT_SIGNAL( aboutToShow() ), this, TQT_SLOT( fillSyncActionSubEntries() ) );
insertSyncAction( mSyncAction );
fillSyncActionSubEntries();
@@ -51,7 +51,7 @@ SummaryView::SummaryView( Kontact::Core *core, const char *name, const QStringLi
void SummaryView::fillSyncActionSubEntries()
{
- QStringList menuItems;
+ TQStringList menuItems;
menuItems.append( i18n("All") );
DCOPRef ref( "kmail", "KMailIface" );
@@ -59,16 +59,16 @@ void SummaryView::fillSyncActionSubEntries()
if ( reply.isValid() )
{
- const QStringList accounts = reply;
+ const TQStringList accounts = reply;
menuItems += accounts;
}
mSyncAction->clear();
mSyncAction->setItems( menuItems );
}
-void SummaryView::syncAccount( const QString& account )
+void SummaryView::syncAccount( const TQString& account )
{
- const QString acc = account == i18n("All") ? QString() : account;
+ const TQString acc = account == i18n("All") ? TQString() : account;
DCOPRef ref( "kmail", "KMailIface" );
ref.send( "checkAccount", acc );
fillSyncActionSubEntries();
@@ -83,12 +83,12 @@ void SummaryView::doSync()
if ( mPart )
mPart->updateSummaries();
- const QValueList<Kontact::Plugin*> pluginList = core()->pluginList();
- for ( QValueList<Kontact::Plugin*>::ConstIterator it = pluginList.begin(), end = pluginList.end();
+ const TQValueList<Kontact::Plugin*> pluginList = core()->pluginList();
+ for ( TQValueList<Kontact::Plugin*>::ConstIterator it = pluginList.begin(), end = pluginList.end();
it != end; ++it ) {
// execute all sync actions but our own
- QPtrList<KAction> *actions = (*it)->syncActions();
- for ( QPtrList<KAction>::Iterator jt = actions->begin(), end = actions->end(); jt != end; ++jt ) {
+ TQPtrList<KAction> *actions = (*it)->syncActions();
+ for ( TQPtrList<KAction>::Iterator jt = actions->begin(), end = actions->end(); jt != end; ++jt ) {
if ( *jt != mSyncAction )
(*jt)->activate();
}
diff --git a/kontact/plugins/summary/summaryview_plugin.h b/kontact/plugins/summary/summaryview_plugin.h
index 9093a1b34..82e3db96b 100644
--- a/kontact/plugins/summary/summaryview_plugin.h
+++ b/kontact/plugins/summary/summaryview_plugin.h
@@ -26,7 +26,7 @@
#include <klocale.h>
#include <kparts/part.h>
-#include <qmap.h>
+#include <tqmap.h>
class KSelectAction;
@@ -37,7 +37,7 @@ class SummaryView : public Kontact::Plugin
Q_OBJECT
public:
- SummaryView( Kontact::Core *core, const char *name, const QStringList& );
+ SummaryView( Kontact::Core *core, const char *name, const TQStringList& );
~SummaryView();
int weight() const { return 100; }
@@ -50,7 +50,7 @@ class SummaryView : public Kontact::Plugin
private slots:
void doSync();
- void syncAccount( const QString& account );
+ void syncAccount( const TQString& account );
void fillSyncActionSubEntries();
private:
diff --git a/kontact/plugins/test/test_part.cpp b/kontact/plugins/test/test_part.cpp
index 6477d1420..a32e734f5 100644
--- a/kontact/plugins/test/test_part.cpp
+++ b/kontact/plugins/test/test_part.cpp
@@ -25,8 +25,8 @@
#include "test_part.h"
#include "kaddressbookiface_stub.h"
-#include <qtextedit.h>
-#include <qcombobox.h>
+#include <tqtextedit.h>
+#include <tqcombobox.h>
#include "sidebarextension.h"
@@ -41,21 +41,21 @@
#include <kservice.h>
-TestPart::TestPart(QObject *parent, const char *name) // ## parentWidget
+TestPart::TestPart(TQObject *parent, const char *name) // ## parentWidget
: KParts::ReadOnlyPart(parent, name)
{
setInstance( new KInstance("testpart") ); // ## memleak
m_edit = new QTextEdit;
setWidget(m_edit);
setXMLFile("testpartui.rc");
- new KAction( "new contact (test)", 0, this, SLOT( newContact() ), actionCollection(), "test_deleteevent" );
+ new KAction( "new contact (test)", 0, this, TQT_SLOT( newContact() ), actionCollection(), "test_deleteevent" );
m_kab_stub = 0L;
- new KParts::SideBarExtension(new QComboBox(this), this, "sbe");
+ new KParts::SideBarExtension(new TQComboBox(this), this, "sbe");
kapp->dcopClient()->setNotifications( true );
- connect( kapp->dcopClient(), SIGNAL( applicationRemoved( const QCString&)),
- this, SLOT( unregisteredFromDCOP( const QCString& )) );
+ connect( kapp->dcopClient(), TQT_SIGNAL( applicationRemoved( const TQCString&)),
+ this, TQT_SLOT( unregisteredFromDCOP( const TQCString& )) );
}
TestPart::~TestPart()
@@ -83,21 +83,21 @@ bool TestPart::connectToAddressBook()
{
if ( !m_kab_stub )
{
- QString error;
- QCString dcopService;
- int result = KDCOPServiceStarter::self()->findServiceFor( "DCOP/AddressBook", QString::null, QString::null, &error, &dcopService );
+ TQString error;
+ TQCString dcopService;
+ int result = KDCOPServiceStarter::self()->findServiceFor( "DCOP/AddressBook", TQString::null, TQString::null, &error, &dcopService );
if ( result != 0 ) {
// You might want to show "error" (if not empty) here, using e.g. KMessageBox
return false;
}
// TODO document the required named for the dcop interfaces e.g. "CalendarIface".
- QCString dcopObjectId = "KAddressBookIface";
+ TQCString dcopObjectId = "KAddressBookIface";
m_kab_stub = new KAddressBookIface_stub(kapp->dcopClient(), dcopService, dcopObjectId);
}
return m_kab_stub != 0L;
}
-void TestPart::unregisteredFromDCOP( const QCString& appId )
+void TestPart::unregisteredFromDCOP( const TQCString& appId )
{
if ( m_kab_stub && m_kab_stub->app() == appId )
{
diff --git a/kontact/plugins/test/test_part.h b/kontact/plugins/test/test_part.h
index 8f2a927c1..8d9c0ba7f 100644
--- a/kontact/plugins/test/test_part.h
+++ b/kontact/plugins/test/test_part.h
@@ -37,7 +37,7 @@ class TestPart : public KParts::ReadOnlyPart
public:
- TestPart(QObject *parent=0, const char *name=0);
+ TestPart(TQObject *parent=0, const char *name=0);
~TestPart();
protected:
@@ -48,11 +48,11 @@ protected:
protected slots:
void newContact();
- void unregisteredFromDCOP( const QCString& );
+ void unregisteredFromDCOP( const TQCString& );
private:
- QTextEdit *m_edit;
+ TQTextEdit *m_edit;
KAddressBookIface_stub *m_kab_stub;
};
diff --git a/kontact/plugins/test/test_plugin.cpp b/kontact/plugins/test/test_plugin.cpp
index 62bd74bd2..93001d2f7 100644
--- a/kontact/plugins/test/test_plugin.cpp
+++ b/kontact/plugins/test/test_plugin.cpp
@@ -34,12 +34,12 @@
typedef KGenericFactory< TestPlugin, Kontact::Core > TestPluginFactory;
K_EXPORT_COMPONENT_FACTORY( libkptestplugin, TestPluginFactory( "kptestplugin" ) )
-TestPlugin::TestPlugin(Kontact::Core *_core, const char *name, const QStringList &)
+TestPlugin::TestPlugin(Kontact::Core *_core, const char *name, const TQStringList &)
: Kontact::Plugin(_core, _core, name)
{
setInstance(TestPluginFactory::instance());
- insertNewAction(new KAction("Test", 0, this, SLOT(slotTestMenu()), actionCollection(), "edit_test"));
+ insertNewAction(new KAction("Test", 0, this, TQT_SLOT(slotTestMenu()), actionCollection(), "edit_test"));
setXMLFile("kptestplugin.rc");
}
diff --git a/kontact/plugins/test/test_plugin.h b/kontact/plugins/test/test_plugin.h
index 35b60283d..9d1a0e8ea 100644
--- a/kontact/plugins/test/test_plugin.h
+++ b/kontact/plugins/test/test_plugin.h
@@ -37,7 +37,7 @@ class TestPlugin : public Kontact::Plugin
public:
- TestPlugin(Kontact::Core *core, const char *name, const QStringList &);
+ TestPlugin(Kontact::Core *core, const char *name, const TQStringList &);
~TestPlugin();
protected:
diff --git a/kontact/plugins/weather/summarywidget.cpp b/kontact/plugins/weather/summarywidget.cpp
index 04a559ae4..8c1064094 100644
--- a/kontact/plugins/weather/summarywidget.cpp
+++ b/kontact/plugins/weather/summarywidget.cpp
@@ -20,10 +20,10 @@
with any edition of Qt, and distribute the resulting executable,
without including the source code for Qt in the source distribution.
*/
-#include <qimage.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qtooltip.h>
+#include <tqimage.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqtooltip.h>
#include <dcopclient.h>
#include <dcopref.h>
@@ -38,38 +38,38 @@
#include "summarywidget.h"
-SummaryWidget::SummaryWidget( QWidget *parent, const char *name )
+SummaryWidget::SummaryWidget( TQWidget *parent, const char *name )
: Kontact::Summary( parent, name ),
DCOPObject( "WeatherSummaryWidget" ), mProc( 0 )
{
- mLayout = new QVBoxLayout( this, 3, 3 );
+ mLayout = new TQVBoxLayout( this, 3, 3 );
mLayout->setAlignment( Qt::AlignTop );
- QPixmap icon = KGlobal::iconLoader()->loadIcon( "kweather", KIcon::Desktop, KIcon::SizeMedium );
- QWidget *header = createHeader( this, icon, i18n( "Weather Service" ) );
+ TQPixmap icon = KGlobal::iconLoader()->loadIcon( "kweather", KIcon::Desktop, KIcon::SizeMedium );
+ TQWidget *header = createHeader( this, icon, i18n( "Weather Service" ) );
mLayout->addWidget( header );
- QString error;
- QCString appID;
+ TQString error;
+ TQCString appID;
bool serviceAvailable = true;
if ( !kapp->dcopClient()->isApplicationRegistered( "KWeatherService" ) ) {
- if ( KApplication::startServiceByDesktopName( "kweatherservice", QStringList(), &error, &appID ) ) {
- QLabel *label = new QLabel( i18n( "No weather dcop service available;\nyou need KWeather to use this plugin." ), this );
+ if ( KApplication::startServiceByDesktopName( "kweatherservice", TQStringList(), &error, &appID ) ) {
+ TQLabel *label = new TQLabel( i18n( "No weather dcop service available;\nyou need KWeather to use this plugin." ), this );
mLayout->addWidget( label, Qt::AlignHCenter | AlignVCenter );
serviceAvailable = false;
}
}
if ( serviceAvailable ) {
- connectDCOPSignal( 0, 0, "fileUpdate(QString)", "refresh(QString)", false );
- connectDCOPSignal( 0, 0, "stationRemoved(QString)", "stationRemoved(QString)", false );
+ connectDCOPSignal( 0, 0, "fileUpdate(TQString)", "refresh(TQString)", false );
+ connectDCOPSignal( 0, 0, "stationRemoved(TQString)", "stationRemoved(TQString)", false );
DCOPRef dcopCall( "KWeatherService", "WeatherService" );
DCOPReply reply = dcopCall.call( "listStations()", true );
if ( reply.isValid() ) {
mStations = reply;
- connect( &mTimer, SIGNAL( timeout() ), this, SLOT( timeout() ) );
+ connect( &mTimer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( timeout() ) );
mTimer.start( 0 );
} else {
kdDebug(5602) << "ERROR: dcop reply not valid..." << endl;
@@ -94,19 +94,19 @@ void SummaryWidget::updateView()
}
- QValueList<WeatherData> dataList = mWeatherMap.values();
+ TQValueList<WeatherData> dataList = mWeatherMap.values();
qHeapSort( dataList );
- QValueList<WeatherData>::Iterator it;
+ TQValueList<WeatherData>::Iterator it;
for ( it = dataList.begin(); it != dataList.end(); ++it ) {
- QString cover;
+ TQString cover;
for ( uint i = 0; i < (*it).cover().count(); ++i )
- cover += QString( "- %1\n" ).arg( (*it).cover()[ i ] );
+ cover += TQString( "- %1\n" ).arg( (*it).cover()[ i ] );
- QImage img;
+ TQImage img;
img = (*it).icon();
- QGridLayout *layout = new QGridLayout( mLayout, 3, 3, 3 );
+ TQGridLayout *layout = new TQGridLayout( mLayout, 3, 3, 3 );
mLayouts.append( layout );
KURLLabel* urlLabel = new KURLLabel( this );
@@ -117,20 +117,20 @@ void SummaryWidget::updateView()
urlLabel->setAlignment( AlignTop );
layout->addMultiCellWidget( urlLabel, 0, 1, 0, 0 );
mLabels.append( urlLabel );
- connect ( urlLabel, SIGNAL( leftClickedURL( const QString& ) ),
- this, SLOT( showReport( const QString& ) ) );
+ connect ( urlLabel, TQT_SIGNAL( leftClickedURL( const TQString& ) ),
+ this, TQT_SLOT( showReport( const TQString& ) ) );
- QLabel* label = new QLabel( this );
- label->setText( QString( "%1 (%2)" ).arg( (*it).name() ).arg( (*it).temperature() ) );
- QFont font = label->font();
+ TQLabel* label = new TQLabel( this );
+ label->setText( TQString( "%1 (%2)" ).arg( (*it).name() ).arg( (*it).temperature() ) );
+ TQFont font = label->font();
font.setBold( true );
label->setFont( font );
label->setAlignment( AlignLeft );
layout->addMultiCellWidget( label, 0, 0, 1, 2 );
mLabels.append( label );
- QString labelText;
- labelText = QString( "<b>%1:</b> %2<br>"
+ TQString labelText;
+ labelText = TQString( "<b>%1:</b> %2<br>"
"<b>%3:</b> %4<br>"
"<b>%5:</b> %6" )
.arg( i18n( "Last updated on" ) )
@@ -140,15 +140,15 @@ void SummaryWidget::updateView()
.arg( i18n( "Rel. Humidity" ) )
.arg( (*it).relativeHumidity() );
- QToolTip::add( label, labelText.replace( " ", "&nbsp;" ) );
+ TQToolTip::add( label, labelText.replace( " ", "&nbsp;" ) );
- label = new QLabel( cover, this );
+ label = new TQLabel( cover, this );
label->setAlignment( AlignLeft );
layout->addMultiCellWidget( label, 1, 1, 1, 2 );
mLabels.append( label );
}
- for ( QLabel *label = mLabels.first(); label; label = mLabels.next() )
+ for ( TQLabel *label = mLabels.first(); label; label = mLabels.next() )
label->show();
}
@@ -162,44 +162,44 @@ void SummaryWidget::timeout()
mTimer.start( 15 * 60000 );
}
-void SummaryWidget::refresh( QString station )
+void SummaryWidget::refresh( TQString station )
{
DCOPRef dcopCall( "KWeatherService", "WeatherService" );
- mWeatherMap[ station ].setIcon( dcopCall.call( "currentIcon(QString)", station, true ) );
- mWeatherMap[ station ].setName( dcopCall.call( "stationName(QString)", station, true ) );
- mWeatherMap[ station ].setCover( dcopCall.call( "cover(QString)", station, true ) );
- mWeatherMap[ station ].setDate( dcopCall.call( "date(QString)", station, true ) );
- mWeatherMap[ station ].setTemperature( dcopCall.call( "temperature(QString)", station, true ) );
- mWeatherMap[ station ].setWindSpeed( dcopCall.call( "wind(QString)", station, true ) );
- mWeatherMap[ station ].setRelativeHumidity( dcopCall.call( "relativeHumidity(QString)", station, true ) );
+ mWeatherMap[ station ].setIcon( dcopCall.call( "currentIcon(TQString)", station, true ) );
+ mWeatherMap[ station ].setName( dcopCall.call( "stationName(TQString)", station, true ) );
+ mWeatherMap[ station ].setCover( dcopCall.call( "cover(TQString)", station, true ) );
+ mWeatherMap[ station ].setDate( dcopCall.call( "date(TQString)", station, true ) );
+ mWeatherMap[ station ].setTemperature( dcopCall.call( "temperature(TQString)", station, true ) );
+ mWeatherMap[ station ].setWindSpeed( dcopCall.call( "wind(TQString)", station, true ) );
+ mWeatherMap[ station ].setRelativeHumidity( dcopCall.call( "relativeHumidity(TQString)", station, true ) );
mWeatherMap[ station ].setStationID(station);
updateView();
}
-void SummaryWidget::stationRemoved( QString station )
+void SummaryWidget::stationRemoved( TQString station )
{
mWeatherMap.remove( station );
updateView();
}
-bool SummaryWidget::eventFilter( QObject *obj, QEvent* e )
+bool SummaryWidget::eventFilter( TQObject *obj, TQEvent* e )
{
if ( obj->inherits( "KURLLabel" ) ) {
- if ( e->type() == QEvent::Enter )
+ if ( e->type() == TQEvent::Enter )
emit message(
i18n( "View Weather Report for Station" ) );
- if ( e->type() == QEvent::Leave )
- emit message( QString::null );
+ if ( e->type() == TQEvent::Leave )
+ emit message( TQString::null );
}
return Kontact::Summary::eventFilter( obj, e );
}
-QStringList SummaryWidget::configModules() const
+TQStringList SummaryWidget::configModules() const
{
- return QStringList( "kcmweatherservice.desktop" );
+ return TQStringList( "kcmweatherservice.desktop" );
}
void SummaryWidget::updateSummary( bool )
@@ -207,11 +207,11 @@ void SummaryWidget::updateSummary( bool )
timeout();
}
-void SummaryWidget::showReport( const QString &stationID )
+void SummaryWidget::showReport( const TQString &stationID )
{
mProc = new KProcess;
- QApplication::connect( mProc, SIGNAL( processExited( KProcess* ) ),
- this, SLOT( reportFinished( KProcess* ) ) );
+ TQApplication::connect( mProc, TQT_SIGNAL( processExited( KProcess* ) ),
+ this, TQT_SLOT( reportFinished( KProcess* ) ) );
*mProc << "kweatherreport";
*mProc << stationID;
diff --git a/kontact/plugins/weather/summarywidget.h b/kontact/plugins/weather/summarywidget.h
index 40e0bb705..9af476903 100644
--- a/kontact/plugins/weather/summarywidget.h
+++ b/kontact/plugins/weather/summarywidget.h
@@ -28,12 +28,12 @@
#include <dcopobject.h>
-#include <qmap.h>
-#include <qpixmap.h>
-#include <qptrlist.h>
-#include <qstringlist.h>
-#include <qtimer.h>
-#include <qwidget.h>
+#include <tqmap.h>
+#include <tqpixmap.h>
+#include <tqptrlist.h>
+#include <tqstringlist.h>
+#include <tqtimer.h>
+#include <tqwidget.h>
class KProcess;
@@ -44,44 +44,44 @@ class QVBoxLayout;
class WeatherData
{
public:
- void setIcon( const QPixmap &icon ) { mIcon = icon; }
- QPixmap icon() const { return mIcon; }
+ void setIcon( const TQPixmap &icon ) { mIcon = icon; }
+ TQPixmap icon() const { return mIcon; }
- 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 setCover( const QStringList& cover ) { mCover = cover; }
- QStringList cover() const { return mCover; }
+ void setCover( const TQStringList& cover ) { mCover = cover; }
+ TQStringList cover() const { return mCover; }
- void setDate( const QString &date ) { mDate = date; }
- QString date() const { return mDate; }
+ void setDate( const TQString &date ) { mDate = date; }
+ TQString date() const { return mDate; }
- void setTemperature( const QString &temperature ) { mTemperature = temperature; }
- QString temperature() const { return mTemperature; }
+ void setTemperature( const TQString &temperature ) { mTemperature = temperature; }
+ TQString temperature() const { return mTemperature; }
- void setWindSpeed( const QString &windSpeed ) { mWindSpeed = windSpeed; }
- QString windSpeed() const { return mWindSpeed; }
+ void setWindSpeed( const TQString &windSpeed ) { mWindSpeed = windSpeed; }
+ TQString windSpeed() const { return mWindSpeed; }
- void setRelativeHumidity( const QString &relativeHumidity ) { mRelativeHumidity = relativeHumidity; }
- QString relativeHumidity() const { return mRelativeHumidity; }
+ void setRelativeHumidity( const TQString &relativeHumidity ) { mRelativeHumidity = relativeHumidity; }
+ TQString relativeHumidity() const { return mRelativeHumidity; }
- void setStationID( const QString &station ) { mStationID = station;}
- QString stationID() { return mStationID; }
+ void setStationID( const TQString &station ) { mStationID = station;}
+ TQString stationID() { return mStationID; }
bool operator< ( const WeatherData &data )
{
- return ( QString::localeAwareCompare( mName, data.mName ) < 0 );
+ return ( TQString::localeAwareCompare( mName, data.mName ) < 0 );
}
private:
- QPixmap mIcon;
- QString mName;
- QStringList mCover;
- QString mDate;
- QString mTemperature;
- QString mWindSpeed;
- QString mRelativeHumidity;
- QString mStationID;
+ TQPixmap mIcon;
+ TQString mName;
+ TQStringList mCover;
+ TQString mDate;
+ TQString mTemperature;
+ TQString mWindSpeed;
+ TQString mRelativeHumidity;
+ TQString mStationID;
};
class SummaryWidget : public Kontact::Summary, public DCOPObject
@@ -89,33 +89,33 @@ class SummaryWidget : public Kontact::Summary, public DCOPObject
Q_OBJECT
K_DCOP
public:
- SummaryWidget( QWidget *parent, const char *name = 0 );
+ SummaryWidget( TQWidget *parent, const char *name = 0 );
- QStringList configModules() const;
+ TQStringList configModules() const;
void updateSummary( bool force = false );
k_dcop:
- virtual void refresh( QString );
- virtual void stationRemoved( QString );
+ virtual void refresh( TQString );
+ virtual void stationRemoved( TQString );
protected:
- virtual bool eventFilter( QObject *obj, QEvent *e );
+ virtual bool eventFilter( TQObject *obj, TQEvent *e );
private slots:
void updateView();
void timeout();
- void showReport( const QString& );
+ void showReport( const TQString& );
void reportFinished( KProcess* );
private:
- QStringList mStations;
- QMap<QString, WeatherData> mWeatherMap;
- QTimer mTimer;
+ TQStringList mStations;
+ TQMap<TQString, WeatherData> mWeatherMap;
+ TQTimer mTimer;
- QPtrList<QLabel> mLabels;
- QPtrList<QGridLayout> mLayouts;
- QVBoxLayout *mLayout;
+ TQPtrList<TQLabel> mLabels;
+ TQPtrList<TQGridLayout> mLayouts;
+ TQVBoxLayout *mLayout;
KProcess* mProc;
};
diff --git a/kontact/plugins/weather/weather_plugin.cpp b/kontact/plugins/weather/weather_plugin.cpp
index 4c1a91e6e..a3ea74d1e 100644
--- a/kontact/plugins/weather/weather_plugin.cpp
+++ b/kontact/plugins/weather/weather_plugin.cpp
@@ -31,13 +31,13 @@ typedef KGenericFactory< WeatherPlugin, Kontact::Core > WeatherPluginFactory;
K_EXPORT_COMPONENT_FACTORY( libkontact_weatherplugin,
WeatherPluginFactory( "kontact_weatherplugin" ) )
-WeatherPlugin::WeatherPlugin( Kontact::Core *core, const char *name, const QStringList& )
+WeatherPlugin::WeatherPlugin( Kontact::Core *core, const char *name, const TQStringList& )
: Kontact::Plugin( core, core, name ), mAboutData( 0 )
{
setInstance( WeatherPluginFactory::instance() );
}
-Kontact::Summary *WeatherPlugin::createSummaryWidget( QWidget *parentWidget )
+Kontact::Summary *WeatherPlugin::createSummaryWidget( TQWidget *parentWidget )
{
return new SummaryWidget( parentWidget );
}
diff --git a/kontact/plugins/weather/weather_plugin.h b/kontact/plugins/weather/weather_plugin.h
index 637ebea9c..4ab019645 100644
--- a/kontact/plugins/weather/weather_plugin.h
+++ b/kontact/plugins/weather/weather_plugin.h
@@ -28,10 +28,10 @@ class SummaryWidget;
class WeatherPlugin : public Kontact::Plugin
{
public:
- WeatherPlugin( Kontact::Core *core, const char *name, const QStringList& );
+ WeatherPlugin( Kontact::Core *core, const char *name, const TQStringList& );
WeatherPlugin();
- virtual Kontact::Summary *createSummaryWidget( QWidget *parentWidget );
+ virtual Kontact::Summary *createSummaryWidget( TQWidget *parentWidget );
const KAboutData *aboutData();
diff --git a/kontact/src/aboutdialog.cpp b/kontact/src/aboutdialog.cpp
index d0a43721a..19e9d9ea7 100644
--- a/kontact/src/aboutdialog.cpp
+++ b/kontact/src/aboutdialog.cpp
@@ -33,8 +33,8 @@
#include <kactivelabel.h>
#include <ktextbrowser.h>
-#include <qlayout.h>
-#include <qlabel.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
#include <kdebug.h>
@@ -45,12 +45,12 @@ AboutDialog::AboutDialog( Kontact::Core *core, const char *name )
true ),
mCore( core )
{
- addAboutData( i18n( "Kontact Container" ), QString( "kontact" ),
+ addAboutData( i18n( "Kontact Container" ), TQString( "kontact" ),
KGlobal::instance()->aboutData() );
- QValueList<Plugin*> plugins = mCore->pluginList();
- QValueList<Plugin*>::ConstIterator end = plugins.end();
- QValueList<Plugin*>::ConstIterator it = plugins.begin();
+ TQValueList<Plugin*> plugins = mCore->pluginList();
+ TQValueList<Plugin*>::ConstIterator end = plugins.end();
+ TQValueList<Plugin*>::ConstIterator it = plugins.begin();
for ( ; it != end; ++it )
addAboutPlugin( *it );
@@ -62,22 +62,22 @@ void AboutDialog::addAboutPlugin( Kontact::Plugin *plugin )
addAboutData( plugin->title(), plugin->icon(), plugin->aboutData() );
}
-void AboutDialog::addAboutData( const QString &title, const QString &icon,
+void AboutDialog::addAboutData( const TQString &title, const TQString &icon,
const KAboutData *about )
{
- QPixmap pixmap = KGlobal::iconLoader()->loadIcon( icon,
+ TQPixmap pixmap = KGlobal::iconLoader()->loadIcon( icon,
KIcon::Desktop, 48 );
- QFrame *topFrame = addPage( title, QString::null, pixmap );
+ TQFrame *topFrame = addPage( title, TQString::null, pixmap );
- QBoxLayout *topLayout = new QVBoxLayout( topFrame );
+ TQBoxLayout *topLayout = new TQVBoxLayout( topFrame );
if ( !about ) {
- QLabel *label = new QLabel( i18n( "No about information available." ),
+ TQLabel *label = new TQLabel( i18n( "No about information available." ),
topFrame );
topLayout->addWidget( label );
} else {
- QString text;
+ TQString text;
text += "<p><b>" + about->programName() + "</b><br>";
@@ -88,7 +88,7 @@ void AboutDialog::addAboutData( const QString &title, const QString &icon,
about->copyrightStatement() + "</p>";
}
- QString home = about->homepage();
+ TQString home = about->homepage();
if ( !home.isEmpty() ) {
text += "<a href=\"" + home + "\">" + home + "</a><br>";
}
@@ -100,17 +100,17 @@ void AboutDialog::addAboutData( const QString &title, const QString &icon,
topLayout->addWidget( label );
- QTextEdit *personView = new QTextEdit( topFrame );
+ TQTextEdit *personView = new TQTextEdit( topFrame );
personView->setReadOnly( true );
topLayout->addWidget( personView, 1 );
text = "";
- const QValueList<KAboutPerson> authors = about->authors();
+ const TQValueList<KAboutPerson> authors = about->authors();
if ( !authors.isEmpty() ) {
text += i18n( "<p><b>Authors:</b></p>" );
- QValueList<KAboutPerson>::ConstIterator it;
+ TQValueList<KAboutPerson>::ConstIterator it;
for ( it = authors.begin(); it != authors.end(); ++it ) {
text += formatPerson( (*it).name(), (*it).emailAddress() );
if ( !(*it).task().isEmpty() )
@@ -118,11 +118,11 @@ void AboutDialog::addAboutData( const QString &title, const QString &icon,
}
}
- const QValueList<KAboutPerson> credits = about->credits();
+ const TQValueList<KAboutPerson> credits = about->credits();
if ( !credits.isEmpty() ) {
text += i18n( "<p><b>Thanks to:</b></p>" );
- QValueList<KAboutPerson>::ConstIterator it;
+ TQValueList<KAboutPerson>::ConstIterator it;
for ( it = credits.begin(); it != credits.end(); ++it ) {
text += formatPerson( (*it).name(), (*it).emailAddress() );
if ( !(*it).task().isEmpty() )
@@ -130,11 +130,11 @@ void AboutDialog::addAboutData( const QString &title, const QString &icon,
}
}
- const QValueList<KAboutTranslator> translators = about->translators();
+ const TQValueList<KAboutTranslator> translators = about->translators();
if ( !translators.isEmpty() ) {
text += i18n("<p><b>Translators:</b></p>");
- QValueList<KAboutTranslator>::ConstIterator it;
+ TQValueList<KAboutTranslator>::ConstIterator it;
for ( it = translators.begin(); it != translators.end(); ++it ) {
text += formatPerson( (*it).name(), (*it).emailAddress() );
}
@@ -144,9 +144,9 @@ void AboutDialog::addAboutData( const QString &title, const QString &icon,
}
}
-QString AboutDialog::formatPerson( const QString &name, const QString &email )
+TQString AboutDialog::formatPerson( const TQString &name, const TQString &email )
{
- QString text = name;
+ TQString text = name;
if ( !email.isEmpty() ) {
text += " &lt;<a href=\"mailto:" + email + "\">" + email + "</a>&gt;";
}
@@ -160,16 +160,16 @@ void AboutDialog::addLicenseText( const KAboutData *about )
if ( !about || about->license().isEmpty() )
return;
- QPixmap pixmap = KGlobal::iconLoader()->loadIcon( "signature",
+ TQPixmap pixmap = KGlobal::iconLoader()->loadIcon( "signature",
KIcon::Desktop, 48 );
- QString title = i18n( "%1 License" ).arg( about->programName() );
+ TQString title = i18n( "%1 License" ).arg( about->programName() );
- QFrame *topFrame = addPage( title, QString::null, pixmap );
- QBoxLayout *topLayout = new QVBoxLayout( topFrame );
+ TQFrame *topFrame = addPage( title, TQString::null, pixmap );
+ TQBoxLayout *topLayout = new TQVBoxLayout( topFrame );
KTextBrowser *textBrowser = new KTextBrowser( topFrame );
- textBrowser->setText( QString( "<pre>%1</pre>" ).arg( about->license() ) );
+ textBrowser->setText( TQString( "<pre>%1</pre>" ).arg( about->license() ) );
topLayout->addWidget( textBrowser );
}
diff --git a/kontact/src/aboutdialog.h b/kontact/src/aboutdialog.h
index 9697c5274..ab8ab1a82 100644
--- a/kontact/src/aboutdialog.h
+++ b/kontact/src/aboutdialog.h
@@ -41,12 +41,12 @@ class AboutDialog : public KDialogBase
protected:
void addAboutPlugin( Kontact::Plugin *plugin );
- void addAboutData( const QString &title, const QString &icon,
+ void addAboutData( const TQString &title, const TQString &icon,
const KAboutData *about );
void addLicenseText( const KAboutData *about );
- QString formatPerson( const QString &name, const QString &email );
+ TQString formatPerson( const TQString &name, const TQString &email );
private:
Core *mCore;
diff --git a/kontact/src/iconsidepane.cpp b/kontact/src/iconsidepane.cpp
index c7e9c84a0..d56513aeb 100644
--- a/kontact/src/iconsidepane.cpp
+++ b/kontact/src/iconsidepane.cpp
@@ -19,22 +19,22 @@
Boston, MA 02110-1301, USA.
*/
-#include <qptrlist.h>
-#include <qwidgetstack.h>
-#include <qsignal.h>
-#include <qobjectlist.h>
-#include <qlabel.h>
-#include <qimage.h>
-#include <qpainter.h>
-#include <qbitmap.h>
-#include <qfontmetrics.h>
-#include <qsignalmapper.h>
-#include <qstyle.h>
-#include <qframe.h>
-#include <qdrawutil.h>
-#include <qcursor.h>
-#include <qtimer.h>
-#include <qtooltip.h>
+#include <tqptrlist.h>
+#include <tqwidgetstack.h>
+#include <tqsignal.h>
+#include <tqobjectlist.h>
+#include <tqlabel.h>
+#include <tqimage.h>
+#include <tqpainter.h>
+#include <tqbitmap.h>
+#include <tqfontmetrics.h>
+#include <tqsignalmapper.h>
+#include <tqstyle.h>
+#include <tqframe.h>
+#include <tqdrawutil.h>
+#include <tqcursor.h>
+#include <tqtimer.h>
+#include <tqtooltip.h>
#include <kpopupmenu.h>
#include <kapplication.h>
@@ -93,7 +93,7 @@ class PluginProxy
using namespace Kontact;
EntryItem::EntryItem( Navigator *parent, Kontact::Plugin *plugin )
- : QListBoxItem( parent ),
+ : TQListBoxItem( parent ),
mPlugin( plugin ),
mHasHover( false ),
mPaintActive( false )
@@ -117,7 +117,7 @@ void EntryItem::reloadPixmap()
KIcon::DisabledState
: KIcon::DefaultState);
else
- mPixmap = QPixmap();
+ mPixmap = TQPixmap();
}
Navigator* EntryItem::navigator() const
@@ -125,7 +125,7 @@ Navigator* EntryItem::navigator() const
return static_cast<Navigator*>( listBox() );
}
-int EntryItem::width( const QListBox *listbox ) const
+int EntryItem::width( const TQListBox *listbox ) const
{
int w = 0;
if( navigator()->showIcons() ) {
@@ -142,7 +142,7 @@ int EntryItem::width( const QListBox *listbox ) const
return w + ( KDialog::marginHint() * 2 );
}
-int EntryItem::height( const QListBox *listbox ) const
+int EntryItem::height( const TQListBox *listbox ) const
{
int h = 0;
if ( navigator()->showIcons() )
@@ -156,11 +156,11 @@ int EntryItem::height( const QListBox *listbox ) const
return h;
}
-void EntryItem::paint( QPainter *p )
+void EntryItem::paint( TQPainter *p )
{
reloadPixmap();
- QListBox *box = listBox();
+ TQListBox *box = listBox();
bool iconAboveText = ( navigator()->viewMode() > SmallIcons )
&& navigator()->showIcons();
int w = box->viewport()->width();
@@ -171,14 +171,14 @@ void EntryItem::paint( QPainter *p )
if ( isCurrent() || isSelected() || mHasHover || mPaintActive ) {
int h = height( box );
- QBrush brush;
+ TQBrush brush;
if ( isCurrent() || isSelected() || mPaintActive )
- brush = box->colorGroup().brush( QColorGroup::Highlight );
+ brush = box->colorGroup().brush( TQColorGroup::Highlight );
else
brush = box->colorGroup().highlight().light( 115 );
p->fillRect( 1, 0, w - 2, h - 1, brush );
- QPen pen = p->pen();
- QPen oldPen = pen;
+ TQPen pen = p->pen();
+ TQPen oldPen = pen;
pen.setColor( box->colorGroup().mid() );
p->setPen( pen );
@@ -196,13 +196,13 @@ void EntryItem::paint( QPainter *p )
p->drawPixmap( x, y, mPixmap );
}
- QColor shadowColor = listBox()->colorGroup().background().dark(115);
+ TQColor shadowColor = listBox()->colorGroup().background().dark(115);
if ( isCurrent() || isSelected() ) {
p->setPen( box->colorGroup().highlightedText() );
}
if ( !text().isEmpty() && navigator()->showText() ) {
- QFontMetrics fm = p->fontMetrics();
+ TQFontMetrics fm = p->fontMetrics();
int x = 0;
if ( iconAboveText ) {
@@ -226,7 +226,7 @@ void EntryItem::paint( QPainter *p )
p->setPen( box->palette().disabled().text( ) );
} else if ( isCurrent() || isSelected() || mHasHover ) {
p->setPen( box->colorGroup().highlight().dark(115) );
- p->drawText( x + ( QApplication::reverseLayout() ? -1 : 1),
+ p->drawText( x + ( TQApplication::reverseLayout() ? -1 : 1),
y + 1, text() );
p->setPen( box->colorGroup().highlightedText() );
}
@@ -261,32 +261,32 @@ Navigator::Navigator( SidePaneBase *parent, const char *name )
mShowText = Prefs::self()->sidePaneShowText();
setSelectionMode( KListBox::Single );
viewport()->setBackgroundMode( PaletteBackground );
- setFrameStyle( QFrame::NoFrame );
- setHScrollBarMode( QScrollView::AlwaysOff );
+ setFrameStyle( TQFrame::NoFrame );
+ setHScrollBarMode( TQScrollView::AlwaysOff );
setAcceptDrops( true );
setFocusPolicy( NoFocus );
- connect( this, SIGNAL( selectionChanged( QListBoxItem* ) ),
- SLOT( slotExecuted( QListBoxItem* ) ) );
- connect( this, SIGNAL( rightButtonPressed( QListBoxItem*, const QPoint& ) ),
- SLOT( slotShowRMBMenu( QListBoxItem*, const QPoint& ) ) );
- connect( this, SIGNAL( onItem( QListBoxItem * ) ),
- SLOT( slotMouseOn( QListBoxItem * ) ) );
- connect( this, SIGNAL( onViewport() ), SLOT( slotMouseOff() ) );
+ connect( this, TQT_SIGNAL( selectionChanged( TQListBoxItem* ) ),
+ TQT_SLOT( slotExecuted( TQListBoxItem* ) ) );
+ connect( this, TQT_SIGNAL( rightButtonPressed( TQListBoxItem*, const TQPoint& ) ),
+ TQT_SLOT( slotShowRMBMenu( TQListBoxItem*, const TQPoint& ) ) );
+ connect( this, TQT_SIGNAL( onItem( TQListBoxItem * ) ),
+ TQT_SLOT( slotMouseOn( TQListBoxItem * ) ) );
+ connect( this, TQT_SIGNAL( onViewport() ), TQT_SLOT( slotMouseOff() ) );
- mMapper = new QSignalMapper( this );
- connect( mMapper, SIGNAL( mapped( int ) ), SLOT( shortCutSelected( int ) ) );
+ mMapper = new TQSignalMapper( this );
+ connect( mMapper, TQT_SIGNAL( mapped( int ) ), TQT_SLOT( shortCutSelected( int ) ) );
- QToolTip::remove( this );
+ TQToolTip::remove( this );
if ( !mShowText )
new EntryItemToolTip( this );
}
-QSize Navigator::sizeHint() const
+TQSize Navigator::sizeHint() const
{
- return QSize( 100, 100 );
+ return TQSize( 100, 100 );
}
void Navigator::highlightItem( EntryItem * item )
@@ -295,7 +295,7 @@ void Navigator::highlightItem( EntryItem * item )
setPaintActiveItem( mHighlightItem, true );
- QTimer::singleShot( 2000, this, SLOT( slotStopHighlight() ) );
+ TQTimer::singleShot( 2000, this, TQT_SLOT( slotStopHighlight() ) );
}
void Navigator::slotStopHighlight()
@@ -303,7 +303,7 @@ void Navigator::slotStopHighlight()
setPaintActiveItem( mHighlightItem, false );
}
-void Navigator::setSelected( QListBoxItem *item, bool selected )
+void Navigator::setSelected( TQListBoxItem *item, bool selected )
{
// Reimplemented to avoid the immediate activation of
// the item. might turn out it doesn't work, we check that
@@ -314,11 +314,11 @@ void Navigator::setSelected( QListBoxItem *item, bool selected )
}
}
-void Navigator::updatePlugins( QValueList<Kontact::Plugin*> plugins_ )
+void Navigator::updatePlugins( TQValueList<Kontact::Plugin*> plugins_ )
{
- QValueList<Kontact::PluginProxy> plugins;
- QValueList<Kontact::Plugin*>::ConstIterator end_ = plugins_.end();
- QValueList<Kontact::Plugin*>::ConstIterator it_ = plugins_.begin();
+ TQValueList<Kontact::PluginProxy> plugins;
+ TQValueList<Kontact::Plugin*>::ConstIterator end_ = plugins_.end();
+ TQValueList<Kontact::Plugin*>::ConstIterator it_ = plugins_.begin();
for ( ; it_ != end_; ++it_ )
plugins += PluginProxy( *it_ );
@@ -331,8 +331,8 @@ void Navigator::updatePlugins( QValueList<Kontact::Plugin*> plugins_ )
int counter = 0;
int minWidth = 0;
qBubbleSort( plugins );
- QValueList<Kontact::PluginProxy>::ConstIterator end = plugins.end();
- QValueList<Kontact::PluginProxy>::ConstIterator it = plugins.begin();
+ TQValueList<Kontact::PluginProxy>::ConstIterator end = plugins.end();
+ TQValueList<Kontact::PluginProxy>::ConstIterator it = plugins.begin();
for ( ; it != end; ++it ) {
Kontact::Plugin *plugin = ( *it ).plugin();
if ( !plugin->showInSideBar() )
@@ -344,9 +344,9 @@ void Navigator::updatePlugins( QValueList<Kontact::Plugin*> plugins_ )
if ( item->width( this ) > minWidth )
minWidth = item->width( this );
- QString name = QString( "CTRL+%1" ).arg( counter + 1 );
+ TQString name = TQString( "CTRL+%1" ).arg( counter + 1 );
KAction *action = new KAction( plugin->title(), plugin->icon(), KShortcut( name ),
- mMapper, SLOT( map() ),
+ mMapper, TQT_SLOT( map() ),
mSidePane->actionCollection(), name.latin1() );
mActions.append( action );
mMapper->setMapping( action, counter );
@@ -356,20 +356,20 @@ void Navigator::updatePlugins( QValueList<Kontact::Plugin*> plugins_ )
parentWidget()->setFixedWidth( minWidth );
}
-void Navigator::dragEnterEvent( QDragEnterEvent *event )
+void Navigator::dragEnterEvent( TQDragEnterEvent *event )
{
kdDebug(5600) << "Navigator::dragEnterEvent()" << endl;
dragMoveEvent( event );
}
-void Navigator::dragMoveEvent( QDragMoveEvent *event )
+void Navigator::dragMoveEvent( TQDragMoveEvent *event )
{
kdDebug(5600) << "Navigator::dragEnterEvent()" << endl;
kdDebug(5600) << " Format: " << event->format() << endl;
- QListBoxItem *item = itemAt( event->pos() );
+ TQListBoxItem *item = itemAt( event->pos() );
if ( !item ) {
event->accept( false );
@@ -383,11 +383,11 @@ void Navigator::dragMoveEvent( QDragMoveEvent *event )
event->accept( entry->plugin()->canDecodeDrag( event ) );
}
-void Navigator::dropEvent( QDropEvent *event )
+void Navigator::dropEvent( TQDropEvent *event )
{
kdDebug(5600) << "Navigator::dropEvent()" << endl;
- QListBoxItem *item = itemAt( event->pos() );
+ TQListBoxItem *item = itemAt( event->pos() );
if ( !item ) {
return;
@@ -400,27 +400,27 @@ void Navigator::dropEvent( QDropEvent *event )
entry->plugin()->processDropEvent( event );
}
-void Navigator::resizeEvent( QResizeEvent *event )
+void Navigator::resizeEvent( TQResizeEvent *event )
{
- QListBox::resizeEvent( event );
+ TQListBox::resizeEvent( event );
triggerUpdate( true );
}
-void Navigator::enterEvent( QEvent *event )
+void Navigator::enterEvent( TQEvent *event )
{
// work around Qt behaviour: onItem is not emmitted in enterEvent()
KListBox::enterEvent( event );
- emit onItem( itemAt( mapFromGlobal( QCursor::pos() ) ) );
+ emit onItem( itemAt( mapFromGlobal( TQCursor::pos() ) ) );
}
-void Navigator::leaveEvent( QEvent *event )
+void Navigator::leaveEvent( TQEvent *event )
{
KListBox::leaveEvent( event );
slotMouseOn( 0 );
mMouseOn = 0;
}
-void Navigator::slotExecuted( QListBoxItem *item )
+void Navigator::slotExecuted( TQListBoxItem *item )
{
if ( !item )
return;
@@ -450,7 +450,7 @@ IconViewMode Navigator::sizeIntToEnum(int size) const
}
}
-void Navigator::slotShowRMBMenu( QListBoxItem *, const QPoint &pos )
+void Navigator::slotShowRMBMenu( TQListBoxItem *, const TQPoint &pos )
{
KPopupMenu menu;
menu.insertTitle( i18n( "Icon Size" ) );
@@ -483,17 +483,17 @@ void Navigator::slotShowRMBMenu( QListBoxItem *, const QPoint &pos )
if ( choice == ShowIcons ) {
mShowIcons = !mShowIcons;
Prefs::self()->setSidePaneShowIcons( mShowIcons );
- QToolTip::remove( this );
+ TQToolTip::remove( this );
if ( !mShowText )
new EntryItemToolTip( this );
} else {
mShowText = !mShowText;
Prefs::self()->setSidePaneShowText( mShowText );
- QToolTip::remove( this );
+ TQToolTip::remove( this );
}
}
int maxWidth = 0;
- QListBoxItem* it = 0;
+ TQListBoxItem* it = 0;
for (int i = 0; (it = item(i)) != 0; ++i)
{
int width = it->width(this);
@@ -510,21 +510,21 @@ void Navigator::shortCutSelected( int pos )
setCurrentItem( pos );
}
-void Navigator::setHoverItem( QListBoxItem* item, bool hover )
+void Navigator::setHoverItem( TQListBoxItem* item, bool hover )
{
static_cast<EntryItem*>( item )->setHover( hover );
updateItem( item );
}
-void Navigator::setPaintActiveItem( QListBoxItem* item, bool paintActive )
+void Navigator::setPaintActiveItem( TQListBoxItem* item, bool paintActive )
{
static_cast<EntryItem*>( item )->setPaintActive( paintActive );
updateItem( item );
}
-void Navigator::slotMouseOn( QListBoxItem* newItem )
+void Navigator::slotMouseOn( TQListBoxItem* newItem )
{
- QListBoxItem* oldItem = mMouseOn;
+ TQListBoxItem* oldItem = mMouseOn;
if ( oldItem == newItem ) return;
if ( oldItem && !oldItem->isCurrent() && !oldItem->isSelected() )
@@ -544,12 +544,12 @@ void Navigator::slotMouseOff()
slotMouseOn( 0 );
}
-IconSidePane::IconSidePane( Core *core, QWidget *parent, const char *name )
+IconSidePane::IconSidePane( Core *core, TQWidget *parent, const char *name )
: SidePaneBase( core, parent, name )
{
mNavigator = new Navigator( this );
- connect( mNavigator, SIGNAL( pluginActivated( Kontact::Plugin* ) ),
- SIGNAL( pluginSelected( Kontact::Plugin* ) ) );
+ connect( mNavigator, TQT_SIGNAL( pluginActivated( Kontact::Plugin* ) ),
+ TQT_SIGNAL( pluginSelected( Kontact::Plugin* ) ) );
setAcceptDrops( true );
}
@@ -579,7 +579,7 @@ void IconSidePane::selectPlugin( Kontact::Plugin *plugin )
blockSignals( blocked );
}
-void IconSidePane::selectPlugin( const QString &name )
+void IconSidePane::selectPlugin( const TQString &name )
{
bool blocked = signalsBlocked();
blockSignals( true );
diff --git a/kontact/src/iconsidepane.h b/kontact/src/iconsidepane.h
index 281d25aec..89fb002a8 100644
--- a/kontact/src/iconsidepane.h
+++ b/kontact/src/iconsidepane.h
@@ -21,7 +21,7 @@
#ifndef KONTACT_ICONSIDEPANEBASE_H
#define KONTACT_ICONSIDEPANEBASE_H
-#include <qtooltip.h>
+#include <tqtooltip.h>
#include <klistbox.h>
@@ -44,7 +44,7 @@ enum IconViewMode { LargeIcons = 48, NormalIcons = 32, SmallIcons = 22, ShowText
/**
- A QListBoxPixmap Square Box with an optional icon and a text
+ A TQListBoxPixmap Square Box with an optional icon and a text
underneath.
*/
class EntryItem : public QListBoxItem
@@ -55,7 +55,7 @@ class EntryItem : public QListBoxItem
Kontact::Plugin *plugin() const { return mPlugin; }
- const QPixmap *pixmap() const { return &mPixmap; }
+ const TQPixmap *pixmap() const { return &mPixmap; }
Navigator* navigator() const;
@@ -65,20 +65,20 @@ class EntryItem : public QListBoxItem
/**
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;
protected:
void reloadPixmap();
- virtual void paint( QPainter *p );
+ virtual void paint( TQPainter *p );
private:
Kontact::Plugin *mPlugin;
- QPixmap mPixmap;
+ TQPixmap mPixmap;
bool mHasHover;
bool mPaintActive;
};
@@ -90,25 +90,25 @@ class EntryItem : public QListBoxItem
class EntryItemToolTip : public QToolTip
{
public:
- EntryItemToolTip( QListBox* parent )
- : QToolTip( parent->viewport() ), mListBox( parent )
+ EntryItemToolTip( TQListBox* parent )
+ : TQToolTip( parent->viewport() ), mListBox( parent )
{}
protected:
- void maybeTip( const QPoint& p ) {
+ void maybeTip( const TQPoint& p ) {
// We only show tooltips when there are no texts shown
if ( Prefs::self()->sidePaneShowText() ) return;
if ( !mListBox ) return;
- QListBoxItem* item = mListBox->itemAt( p );
+ TQListBoxItem* item = mListBox->itemAt( p );
if ( !item ) return;
- const QRect itemRect = mListBox->itemRect( item );
+ const TQRect itemRect = mListBox->itemRect( item );
if ( !itemRect.isValid() ) return;
const EntryItem *entryItem = static_cast<EntryItem*>( item );
- QString tipStr = entryItem->text();
+ TQString tipStr = entryItem->text();
tip( itemRect, tipStr );
}
private:
- QListBox* mListBox;
+ TQListBox* mListBox;
};
/**
@@ -120,38 +120,38 @@ class Navigator : public KListBox
public:
Navigator( SidePaneBase *parent = 0, const char *name = 0 );
- virtual void setSelected( QListBoxItem *, bool );
+ virtual void setSelected( TQListBoxItem *, bool );
- void updatePlugins( QValueList<Kontact::Plugin*> plugins );
+ void updatePlugins( TQValueList<Kontact::Plugin*> plugins );
- QSize sizeHint() const;
+ TQSize sizeHint() const;
void highlightItem( EntryItem* item );
IconViewMode viewMode() { return mViewMode; }
IconViewMode sizeIntToEnum(int size) const;
- const QPtrList<KAction> & actions() { return mActions; }
+ const TQPtrList<KAction> & actions() { return mActions; }
bool showIcons() const { return mShowIcons; }
bool showText() const { return mShowText; }
signals:
void pluginActivated( Kontact::Plugin * );
protected:
- void dragEnterEvent( QDragEnterEvent * );
- void dragMoveEvent ( QDragMoveEvent * );
- void dropEvent( QDropEvent * );
- void resizeEvent( QResizeEvent * );
- void enterEvent( QEvent* );
- void leaveEvent( QEvent* );
+ void dragEnterEvent( TQDragEnterEvent * );
+ void dragMoveEvent ( TQDragMoveEvent * );
+ void dropEvent( TQDropEvent * );
+ void resizeEvent( TQResizeEvent * );
+ void enterEvent( TQEvent* );
+ void leaveEvent( TQEvent* );
- void setHoverItem( QListBoxItem*, bool );
- void setPaintActiveItem( QListBoxItem*, bool );
+ void setHoverItem( TQListBoxItem*, bool );
+ void setPaintActiveItem( TQListBoxItem*, bool );
protected slots:
- void slotExecuted( QListBoxItem * );
- void slotMouseOn( QListBoxItem *item );
+ void slotExecuted( TQListBoxItem * );
+ void slotMouseOn( TQListBoxItem *item );
void slotMouseOff();
- void slotShowRMBMenu( QListBoxItem *, const QPoint& );
+ void slotShowRMBMenu( TQListBoxItem *, const TQPoint& );
void shortCutSelected( int );
void slotStopHighlight();
@@ -159,12 +159,12 @@ class Navigator : public KListBox
SidePaneBase *mSidePane;
IconViewMode mViewMode;
- QListBoxItem* mMouseOn;
+ TQListBoxItem* mMouseOn;
EntryItem* mHighlightItem;
- QSignalMapper *mMapper;
- QPtrList<KAction> mActions;
+ TQSignalMapper *mMapper;
+ TQPtrList<KAction> mActions;
bool mShowIcons;
bool mShowText;
};
@@ -173,7 +173,7 @@ class IconSidePane : public SidePaneBase
{
Q_OBJECT
public:
- IconSidePane( Core *core, QWidget *parent, const char *name = 0 );
+ IconSidePane( Core *core, TQWidget *parent, const char *name = 0 );
~IconSidePane();
virtual void indicateForegrunding( Kontact::Plugin* );
@@ -181,8 +181,8 @@ class IconSidePane : public SidePaneBase
public slots:
virtual void updatePlugins();
virtual void selectPlugin( Kontact::Plugin* );
- virtual void selectPlugin( const QString &name );
- const QPtrList<KAction> & actions() { return mNavigator->actions(); }
+ virtual void selectPlugin( const TQString &name );
+ const TQPtrList<KAction> & actions() { return mNavigator->actions(); }
private:
Navigator *mNavigator;
diff --git a/kontact/src/kcmkontact.cpp b/kontact/src/kcmkontact.cpp
index 0c518d5c8..c14669ff8 100644
--- a/kontact/src/kcmkontact.cpp
+++ b/kontact/src/kcmkontact.cpp
@@ -32,17 +32,17 @@
#include <klocale.h>
#include <ktrader.h>
-#include <qbuttongroup.h>
-#include <qcheckbox.h>
-#include <qcombobox.h>
-#include <qlabel.h>
-#include <qlayout.h>
+#include <tqbuttongroup.h>
+#include <tqcheckbox.h>
+#include <tqcombobox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
#include <kdepimmacros.h>
extern "C"
{
- KDE_EXPORT KCModule *create_kontactconfig( QWidget *parent, const char * ) {
+ KDE_EXPORT KCModule *create_kontactconfig( TQWidget *parent, const char * ) {
return new KcmKontact( parent, "kcmkontact" );
}
}
@@ -50,8 +50,8 @@ extern "C"
class PluginItem : public QListViewItem
{
public:
- PluginItem( QListView *parent, const KService::Ptr &ptr )
- : QListViewItem( parent, ptr->name(), ptr->comment(), ptr->library() ),
+ PluginItem( TQListView *parent, const KService::Ptr &ptr )
+ : TQListViewItem( parent, ptr->name(), ptr->comment(), ptr->library() ),
mPtr( ptr )
{
}
@@ -65,11 +65,11 @@ class PluginItem : public QListViewItem
KService::Ptr mPtr;
};
-KcmKontact::KcmKontact( QWidget *parent, const char *name )
+KcmKontact::KcmKontact( TQWidget *parent, const char *name )
: KPrefsModule( Kontact::Prefs::self(), parent, name )
{
- QBoxLayout *topLayout = new QVBoxLayout( this );
- QBoxLayout *pluginStartupLayout = new QHBoxLayout( topLayout );
+ TQBoxLayout *topLayout = new TQVBoxLayout( this );
+ TQBoxLayout *pluginStartupLayout = new TQHBoxLayout( topLayout );
topLayout->addStretch();
KPrefsWidBool *forceStartupPlugin = addWidBool( Kontact::Prefs::self()->forceStartupPluginItem(), this );
@@ -81,8 +81,8 @@ KcmKontact::KcmKontact( QWidget *parent, const char *name )
pluginStartupLayout->addWidget( selection->comboBox() );
selection->comboBox()->setEnabled( false );
- connect( forceStartupPlugin->checkBox(), SIGNAL( toggled( bool ) ),
- selection->comboBox(), SLOT( setEnabled( bool ) ) );
+ connect( forceStartupPlugin->checkBox(), TQT_SIGNAL( toggled( bool ) ),
+ selection->comboBox(), TQT_SLOT( setEnabled( bool ) ) );
load();
}
@@ -100,11 +100,11 @@ const KAboutData* KcmKontact::aboutData() const
}
-PluginSelection::PluginSelection( KConfigSkeleton::ItemString *item, QWidget *parent )
+PluginSelection::PluginSelection( KConfigSkeleton::ItemString *item, TQWidget *parent )
{
mItem = item;
- mPluginCombo = new QComboBox( parent );
- connect( mPluginCombo, SIGNAL( activated( int ) ), SIGNAL( changed() ) );
+ mPluginCombo = new TQComboBox( parent );
+ connect( mPluginCombo, TQT_SIGNAL( activated( int ) ), TQT_SIGNAL( changed() ) );
}
PluginSelection::~PluginSelection()
@@ -114,15 +114,15 @@ PluginSelection::~PluginSelection()
void PluginSelection::readConfig()
{
const KTrader::OfferList offers = KTrader::self()->query(
- QString::fromLatin1( "Kontact/Plugin" ),
- QString( "[X-KDE-KontactPluginVersion] == %1" ).arg( KONTACT_PLUGIN_VERSION ) );
+ TQString::fromLatin1( "Kontact/Plugin" ),
+ TQString( "[X-KDE-KontactPluginVersion] == %1" ).arg( KONTACT_PLUGIN_VERSION ) );
int activeComponent = 0;
mPluginCombo->clear();
for ( KService::List::ConstIterator it = offers.begin(); it != offers.end(); ++it ) {
KService::Ptr service = *it;
// skip summary only plugins
- QVariant var = service->property( "X-KDE-KontactPluginHasPart" );
+ TQVariant var = service->property( "X-KDE-KontactPluginHasPart" );
if ( var.isValid() && var.toBool() == false )
continue;
mPluginCombo->insertItem( service->name() );
@@ -141,9 +141,9 @@ void PluginSelection::writeConfig()
mItem->setValue( ptr->property("X-KDE-PluginInfo-Name").toString() );
}
-QValueList<QWidget *> PluginSelection::widgets() const
+TQValueList<TQWidget *> PluginSelection::widgets() const
{
- QValueList<QWidget *> widgets;
+ TQValueList<TQWidget *> widgets;
widgets.append( mPluginCombo );
return widgets;
diff --git a/kontact/src/kcmkontact.h b/kontact/src/kcmkontact.h
index 3b37f68f5..d914bd351 100644
--- a/kontact/src/kcmkontact.h
+++ b/kontact/src/kcmkontact.h
@@ -41,7 +41,7 @@ class KcmKontact : public KPrefsModule
Q_OBJECT
public:
- KcmKontact( QWidget *parent = 0, const char *name = 0 );
+ KcmKontact( TQWidget *parent = 0, const char *name = 0 );
virtual const KAboutData* aboutData() const;
};
@@ -51,18 +51,18 @@ class PluginSelection : public KPrefsWid
Q_OBJECT
public:
- PluginSelection( KConfigSkeleton::ItemString *item, QWidget *parent );
+ PluginSelection( KConfigSkeleton::ItemString *item, TQWidget *parent );
~PluginSelection();
void readConfig();
void writeConfig();
- QValueList<QWidget *> widgets() const;
- QComboBox *comboBox() const { return mPluginCombo; }
+ TQValueList<TQWidget *> widgets() const;
+ TQComboBox *comboBox() const { return mPluginCombo; }
private:
- QComboBox *mPluginCombo;
- QValueList<KService::Ptr> mPluginList;
+ TQComboBox *mPluginCombo;
+ TQValueList<KService::Ptr> mPluginList;
KConfigSkeleton::ItemString *mItem;
};
diff --git a/kontact/src/kontactiface.h b/kontact/src/kontactiface.h
index 7af3e8a5c..6251b3b81 100644
--- a/kontact/src/kontactiface.h
+++ b/kontact/src/kontactiface.h
@@ -29,7 +29,7 @@ class KontactIface : public DCOPObject
KontactIface() : DCOPObject("KontactIface") {}
k_dcop:
- virtual void selectPlugin( const QString &name ) = 0;
+ virtual void selectPlugin( const TQString &name ) = 0;
};
diff --git a/kontact/src/main.cpp b/kontact/src/main.cpp
index ee29ce9d3..c19872357 100644
--- a/kontact/src/main.cpp
+++ b/kontact/src/main.cpp
@@ -34,7 +34,7 @@
#include <ktrader.h>
#include "plugin.h"
-#include <qlabel.h>
+#include <tqlabel.h>
#include "prefs.h"
#include "alarmclient.h"
@@ -72,12 +72,12 @@ static void listPlugins()
{
KInstance instance( "kontact" ); // Can't use KontactApp since it's too late for adding cmdline options
KTrader::OfferList offers = KTrader::self()->query(
- QString::fromLatin1( "Kontact/Plugin" ),
- QString( "[X-KDE-KontactPluginVersion] == %1" ).arg( KONTACT_PLUGIN_VERSION ) );
+ TQString::fromLatin1( "Kontact/Plugin" ),
+ TQString( "[X-KDE-KontactPluginVersion] == %1" ).arg( KONTACT_PLUGIN_VERSION ) );
for ( KService::List::Iterator it = offers.begin(); it != offers.end(); ++it ) {
KService::Ptr service = (*it);
// skip summary only plugins
- QVariant var = service->property( "X-KDE-KontactPluginHasPart" );
+ TQVariant var = service->property( "X-KDE-KontactPluginHasPart" );
if ( var.isValid() && var.toBool() == false )
continue;
cout << service->library().remove( "libkontact_" ).latin1() << endl;
@@ -87,12 +87,12 @@ static void listPlugins()
int KontactApp::newInstance()
{
KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
- QString moduleName;
+ TQString moduleName;
if ( Kontact::Prefs::self()->forceStartupPlugin() ) {
moduleName = Kontact::Prefs::self()->forcedStartupPlugin();
}
if ( args->isSet( "module" ) ) {
- moduleName = QString::fromLocal8Bit( args->getOption( "module" ) );
+ moduleName = TQString::fromLocal8Bit( args->getOption( "module" ) );
}
if ( !mSessionRestored ) {
diff --git a/kontact/src/mainwindow.cpp b/kontact/src/mainwindow.cpp
index a96085283..541742bba 100644
--- a/kontact/src/mainwindow.cpp
+++ b/kontact/src/mainwindow.cpp
@@ -20,17 +20,17 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#include <qcombobox.h>
-#include <qdockarea.h>
-#include <qguardedptr.h>
-#include <qhbox.h>
-#include <qimage.h>
-#include <qobjectlist.h>
-#include <qprogressbar.h>
-#include <qpushbutton.h>
-#include <qsplitter.h>
-#include <qtimer.h>
-#include <qwhatsthis.h>
+#include <tqcombobox.h>
+#include <tqdockarea.h>
+#include <tqguardedptr.h>
+#include <tqhbox.h>
+#include <tqimage.h>
+#include <tqobjectlist.h>
+#include <tqprogressbar.h>
+#include <tqpushbutton.h>
+#include <tqsplitter.h>
+#include <tqtimer.h>
+#include <tqwhatsthis.h>
#include <dcopclient.h>
#include <kapplication.h>
@@ -86,16 +86,16 @@ using namespace Kontact;
class SettingsDialogWrapper : public KSettings::Dialog
{
public:
- SettingsDialogWrapper( ContentInListView content, QWidget * parent = 0 )
+ SettingsDialogWrapper( ContentInListView content, TQWidget * parent = 0 )
: KSettings::Dialog( content, parent, 0 )
{
}
- void fixButtonLabel( QWidget *widget )
+ void fixButtonLabel( TQWidget *widget )
{
- QObject *object = widget->child( "KJanusWidget::buttonBelowList" );
- QPushButton *button = static_cast<QPushButton*>( object );
+ TQObject *object = widget->child( "KJanusWidget::buttonBelowList" );
+ TQPushButton *button = static_cast<TQPushButton*>( object );
if ( button )
button->setText( i18n( "Select Components ..." ) );
}
@@ -119,11 +119,11 @@ void MainWindow::initGUI()
setupActions();
setHelpMenuEnabled( false );
KHelpMenu *helpMenu = new KHelpMenu( this, 0, true, actionCollection() );
- connect( helpMenu, SIGNAL( showAboutApplication() ),
- SLOT( showAboutDialog() ) );
+ connect( helpMenu, TQT_SIGNAL( showAboutApplication() ),
+ TQT_SLOT( showAboutDialog() ) );
- KStdAction::keyBindings( this, SLOT( configureShortcuts() ), actionCollection() );
- KStdAction::configureToolbars( this, SLOT( configureToolbars() ), actionCollection() );
+ KStdAction::keyBindings( this, TQT_SLOT( configureShortcuts() ), actionCollection() );
+ KStdAction::configureToolbars( this, TQT_SLOT( configureToolbars() ), actionCollection() );
setXMLFile( "kontactui.rc" );
setStandardToolBarMenuEnabled( true );
@@ -133,18 +133,18 @@ void MainWindow::initGUI()
resize( 700, 520 ); // initial size to prevent a scrollbar in sidepane
setAutoSaveSettings();
- connect( Kontact::ProfileManager::self(), SIGNAL( profileLoaded( const QString& ) ),
- this, SLOT( slotLoadProfile( const QString& ) ) );
- connect( Kontact::ProfileManager::self(), SIGNAL( saveToProfileRequested( const QString& ) ),
- this, SLOT( slotSaveToProfile( const QString& ) ) );
+ connect( Kontact::ProfileManager::self(), TQT_SIGNAL( profileLoaded( const TQString& ) ),
+ this, TQT_SLOT( slotLoadProfile( const TQString& ) ) );
+ connect( Kontact::ProfileManager::self(), TQT_SIGNAL( saveToProfileRequested( const TQString& ) ),
+ this, TQT_SLOT( slotSaveToProfile( const TQString& ) ) );
}
void MainWindow::initObject()
{
KTrader::OfferList offers = KTrader::self()->query(
- QString::fromLatin1( "Kontact/Plugin" ),
- QString( "[X-KDE-KontactPluginVersion] == %1" ).arg( KONTACT_PLUGIN_VERSION ) );
+ TQString::fromLatin1( "Kontact/Plugin" ),
+ TQString( "[X-KDE-KontactPluginVersion] == %1" ).arg( KONTACT_PLUGIN_VERSION ) );
mPluginInfos = KPluginInfo::fromServices( offers, Prefs::self()->config(), "Plugins" );
KPluginInfo::List::Iterator it;
@@ -154,8 +154,8 @@ void MainWindow::initObject()
// prepare the part manager
mPartManager = new KParts::PartManager( this );
- connect( mPartManager, SIGNAL( activePartChanged( KParts::Part* ) ),
- this, SLOT( slotActivePartChanged( KParts::Part* ) ) );
+ connect( mPartManager, TQT_SIGNAL( activePartChanged( KParts::Part* ) ),
+ this, TQT_SLOT( slotActivePartChanged( KParts::Part* ) ) );
loadPlugins();
@@ -165,7 +165,7 @@ void MainWindow::initObject()
}
KSettings::Dispatcher::self()->registerInstance( instance(), this,
- SLOT( updateConfig() ) );
+ TQT_SLOT( updateConfig() ) );
loadSettings();
@@ -174,10 +174,10 @@ void MainWindow::initObject()
showTip( false );
// done initializing
- slotShowStatusMsg( QString::null );
+ slotShowStatusMsg( TQString::null );
- connect( KPIM::BroadcastStatus::instance(), SIGNAL( statusMsg( const QString& ) ),
- this, SLOT( slotShowStatusMsg( const QString& ) ) );
+ connect( KPIM::BroadcastStatus::instance(), TQT_SIGNAL( statusMsg( const TQString& ) ),
+ this, TQT_SLOT( slotShowStatusMsg( const TQString& ) ) );
// launch commandline specified module if any
activatePluginModule();
@@ -194,7 +194,7 @@ MainWindow::~MainWindow()
{
saveSettings();
- QPtrList<KParts::Part> parts = *mPartManager->parts();
+ TQPtrList<KParts::Part> parts = *mPartManager->parts();
for ( KParts::Part *p = parts.last(); p; p = parts.prev() ) {
delete p;
@@ -204,7 +204,7 @@ MainWindow::~MainWindow()
Prefs::self()->writeConfig();
}
-void MainWindow::setActivePluginModule( const QString &module )
+void MainWindow::setActivePluginModule( const TQString &module )
{
mActiveModule = module;
activatePluginModule();
@@ -225,39 +225,39 @@ void MainWindow::activatePluginModule()
void MainWindow::initWidgets()
{
// includes sidebar and part stack
- mTopWidget = new QHBox( this );
- mTopWidget->setFrameStyle( QFrame::Panel | QFrame::Sunken );
+ mTopWidget = new TQHBox( this );
+ mTopWidget->setFrameStyle( TQFrame::Panel | TQFrame::Sunken );
setCentralWidget( mTopWidget );
- QHBox *mBox = 0;
- mSplitter = new QSplitter( mTopWidget );
- mBox = new QHBox( mTopWidget );
+ TQHBox *mBox = 0;
+ mSplitter = new TQSplitter( mTopWidget );
+ mBox = new TQHBox( mTopWidget );
mSidePane = new IconSidePane( this, mSplitter );
- mSidePane->setSizePolicy( QSizePolicy( QSizePolicy::Maximum,
- QSizePolicy::Preferred ) );
+ mSidePane->setSizePolicy( TQSizePolicy( TQSizePolicy::Maximum,
+ TQSizePolicy::Preferred ) );
// donÄt occupy screen estate on load
- QValueList<int> sizes;
+ TQValueList<int> sizes;
sizes << 0;
mSplitter->setSizes(sizes);
mSidePane->setActionCollection( actionCollection() );
- connect( mSidePane, SIGNAL( pluginSelected( Kontact::Plugin * ) ),
- SLOT( selectPlugin( Kontact::Plugin * ) ) );
+ connect( mSidePane, TQT_SIGNAL( pluginSelected( Kontact::Plugin * ) ),
+ TQT_SLOT( selectPlugin( Kontact::Plugin * ) ) );
- QVBox *vBox;
+ TQVBox *vBox;
if ( mSplitter ) {
- vBox = new QVBox( mSplitter );
+ vBox = new TQVBox( mSplitter );
} else {
- vBox = new QVBox( mBox );
+ vBox = new TQVBox( mBox );
}
vBox->setSpacing( 0 );
- mPartsStack = new QWidgetStack( vBox );
+ mPartsStack = new TQWidgetStack( vBox );
initAboutScreen();
- QString loading = i18n( "<h2 style='text-align:center; margin-top: 0px; margin-bottom: 0px'>%1</h2>" )
+ TQString loading = i18n( "<h2 style='text-align:center; margin-top: 0px; margin-bottom: 0px'>%1</h2>" )
.arg( i18n("Loading Kontact...") );
paintAboutScreen( loading );
@@ -277,10 +277,10 @@ void MainWindow::initWidgets()
}
-void MainWindow::paintAboutScreen( const QString& msg )
+void MainWindow::paintAboutScreen( const TQString& msg )
{
- QString location = locate( "data", "kontact/about/main.html" );
- QString content = KPIM::kFileToString( location );
+ TQString location = locate( "data", "kontact/about/main.html" );
+ TQString content = KPIM::kFileToString( location );
content = content.arg( locate( "data", "libkdepim/about/kde_infopage.css" ) );
if ( kapp->reverseLayout() )
content = content.arg( "@import \"%1\";" ).arg( locate( "data", "libkdepim/about/kde_infopage_rtl.css" ) );
@@ -289,18 +289,18 @@ void MainWindow::paintAboutScreen( const QString& msg )
mIntroPart->begin( KURL( location ) );
- QString appName( i18n( "KDE Kontact" ) );
- QString catchPhrase( i18n( "Get Organized!" ) );
- QString quickDescription( i18n( "The KDE Personal Information Management Suite" ) );
+ TQString appName( i18n( "KDE Kontact" ) );
+ TQString catchPhrase( i18n( "Get Organized!" ) );
+ TQString quickDescription( i18n( "The KDE Personal Information Management Suite" ) );
- mIntroPart->write( content.arg( QFont().pointSize() + 2 ).arg( appName )
+ mIntroPart->write( content.arg( TQFont().pointSize() + 2 ).arg( appName )
.arg( catchPhrase ).arg( quickDescription ).arg( msg ) );
mIntroPart->end();
}
void MainWindow::initAboutScreen()
{
- QHBox *introbox = new QHBox( mPartsStack );
+ TQHBox *introbox = new TQHBox( mPartsStack );
mPartsStack->addWidget( introbox );
mPartsStack->raiseWidget( introbox );
mIntroPart = new KHTMLPart( introbox );
@@ -314,19 +314,19 @@ void MainWindow::initAboutScreen()
mIntroPart->view()->setLineWidth( 0 );
connect( mIntroPart->browserExtension(),
- SIGNAL( openURLRequest( const KURL&, const KParts::URLArgs& ) ),
- SLOT( slotOpenUrl( const KURL& ) ) );
+ TQT_SIGNAL( openURLRequest( const KURL&, const KParts::URLArgs& ) ),
+ TQT_SLOT( slotOpenUrl( const KURL& ) ) );
connect( mIntroPart->browserExtension(),
- SIGNAL( createNewWindow( const KURL&, const KParts::URLArgs& ) ),
- SLOT( slotOpenUrl( const KURL& ) ) );
+ TQT_SIGNAL( createNewWindow( const KURL&, const KParts::URLArgs& ) ),
+ TQT_SLOT( slotOpenUrl( const KURL& ) ) );
}
void MainWindow::setupActions()
{
- KStdAction::quit( this, SLOT( slotQuit() ), actionCollection() );
+ KStdAction::quit( this, TQT_SLOT( slotQuit() ), actionCollection() );
mNewActions = new KToolBarPopupAction( KGuiItem( i18n( "New" ), "" ),
- KStdAccel::shortcut(KStdAccel::New), this, SLOT( slotNewClicked() ),
+ KStdAccel::shortcut(KStdAccel::New), this, TQT_SLOT( slotNewClicked() ),
actionCollection(), "action_new" );
KConfig* const cfg = Prefs::self()->config();
@@ -335,36 +335,36 @@ void MainWindow::setupActions()
if ( mSyncActionsEnabled ) {
mSyncActions = new KToolBarPopupAction( KGuiItem( i18n( "Synchronize" ), "kitchensync" ),
- KStdAccel::shortcut(KStdAccel::Reload), this, SLOT( slotSyncClicked() ),
+ KStdAccel::shortcut(KStdAccel::Reload), this, TQT_SLOT( slotSyncClicked() ),
actionCollection(), "action_sync" );
}
- new KAction( i18n( "Configure Kontact..." ), "configure", 0, this, SLOT( slotPreferences() ),
+ new KAction( i18n( "Configure Kontact..." ), "configure", 0, this, TQT_SLOT( slotPreferences() ),
actionCollection(), "settings_configure_kontact" );
- new KAction( i18n( "Configure &Profiles..." ), 0, this, SLOT( slotConfigureProfiles() ),
+ new KAction( i18n( "Configure &Profiles..." ), 0, this, TQT_SLOT( slotConfigureProfiles() ),
actionCollection(), "settings_configure_kontact_profiles" );
- new KAction( i18n( "&Kontact Introduction" ), 0, this, SLOT( slotShowIntroduction() ),
+ new KAction( i18n( "&Kontact Introduction" ), 0, this, TQT_SLOT( slotShowIntroduction() ),
actionCollection(), "help_introduction" );
- new KAction( i18n( "&Tip of the Day" ), 0, this, SLOT( slotShowTip() ),
+ new KAction( i18n( "&Tip of the Day" ), 0, this, TQT_SLOT( slotShowTip() ),
actionCollection(), "help_tipofday" );
- new KAction( i18n( "&Request Feature..." ), 0, this, SLOT( slotRequestFeature() ),
+ new KAction( i18n( "&Request Feature..." ), 0, this, TQT_SLOT( slotRequestFeature() ),
actionCollection(), "help_requestfeature" );
- KWidgetAction* spacerAction = new KWidgetAction( new QWidget( this ), "SpacerAction", "", 0, 0, actionCollection(), "navigator_spacer_item" );
+ KWidgetAction* spacerAction = new KWidgetAction( new TQWidget( this ), "SpacerAction", "", 0, 0, actionCollection(), "navigator_spacer_item" );
spacerAction->setAutoSized( true );
}
void MainWindow::slotConfigureProfiles()
{
- QGuardedPtr<Kontact::ProfileDialog> dlg = new Kontact::ProfileDialog( this );
+ TQGuardedPtr<Kontact::ProfileDialog> dlg = new Kontact::ProfileDialog( this );
dlg->setModal( true );
dlg->exec();
delete dlg;
}
namespace {
- void copyConfigEntry( KConfig* source, KConfig* dest, const QString& group, const QString& key, const QString& defaultValue=QString() )
+ void copyConfigEntry( KConfig* source, KConfig* dest, const TQString& group, const TQString& key, const TQString& defaultValue=TQString() )
{
source->setGroup( group );
dest->setGroup( group );
@@ -372,9 +372,9 @@ namespace {
}
}
-void MainWindow::slotSaveToProfile( const QString& id )
+void MainWindow::slotSaveToProfile( const TQString& id )
{
- const QString path = Kontact::ProfileManager::self()->profileById( id ).saveLocation();
+ const TQString path = Kontact::ProfileManager::self()->profileById( id ).saveLocation();
if ( path.isNull() )
return;
@@ -396,9 +396,9 @@ void MainWindow::slotSaveToProfile( const QString& id )
}
}
-void MainWindow::slotLoadProfile( const QString& id )
+void MainWindow::slotLoadProfile( const TQString& id )
{
- const QString path = Kontact::ProfileManager::self()->profileById( id ).saveLocation();
+ const TQString path = Kontact::ProfileManager::self()->profileById( id ).saveLocation();
if ( path.isNull() )
return;
@@ -408,11 +408,11 @@ void MainWindow::slotLoadProfile( const QString& id )
saveSettings();
const KConfig profile( path+"/kontactrc", /*read-only=*/false, /*useglobals=*/false );
- const QStringList groups = profile.groupList();
- for ( QStringList::ConstIterator it = groups.begin(), end = groups.end(); it != end; ++it )
+ const TQStringList groups = profile.groupList();
+ for ( TQStringList::ConstIterator it = groups.begin(), end = groups.end(); it != end; ++it )
{
cfg->setGroup( *it );
- typedef QMap<QString, QString> StringMap;
+ typedef TQMap<TQString, TQString> StringMap;
const StringMap entries = profile.entryMap( *it );
for ( StringMap::ConstIterator it2 = entries.begin(), end = entries.end(); it2 != end; ++it2 )
{
@@ -463,8 +463,8 @@ Plugin *MainWindow::pluginFromInfo( const KPluginInfo *info )
void MainWindow::loadPlugins()
{
- QPtrList<Plugin> plugins;
- QPtrList<KParts::Part> loadDelayed;
+ TQPtrList<Plugin> plugins;
+ TQPtrList<KParts::Part> loadDelayed;
uint i;
KPluginInfo::List::ConstIterator it;
@@ -490,10 +490,10 @@ void MainWindow::loadPlugins()
plugin->setTitle( (*it)->name() );
plugin->setIcon( (*it)->icon() );
- QVariant libNameProp = (*it)->property( "X-KDE-KontactPartLibraryName" );
- QVariant exeNameProp = (*it)->property( "X-KDE-KontactPartExecutableName" );
- QVariant loadOnStart = (*it)->property( "X-KDE-KontactPartLoadOnStart" );
- QVariant hasPartProp = (*it)->property( "X-KDE-KontactPluginHasPart" );
+ TQVariant libNameProp = (*it)->property( "X-KDE-KontactPartLibraryName" );
+ TQVariant exeNameProp = (*it)->property( "X-KDE-KontactPartExecutableName" );
+ TQVariant loadOnStart = (*it)->property( "X-KDE-KontactPartLoadOnStart" );
+ TQVariant hasPartProp = (*it)->property( "X-KDE-KontactPluginHasPart" );
if ( !loadOnStart.isNull() && loadOnStart.toBool() )
mDelayedPreload.append( plugin );
@@ -518,7 +518,7 @@ void MainWindow::loadPlugins()
Plugin *plugin = plugins.at( i );
KAction *action;
- QPtrList<KAction> *actionList = plugin->newActions();
+ TQPtrList<KAction> *actionList = plugin->newActions();
for ( action = actionList->first(); action; action = actionList->next() ) {
kdDebug(5600) << "Plugging " << action->name() << endl;
@@ -558,7 +558,7 @@ bool MainWindow::removePlugin( const KPluginInfo *info )
Plugin *plugin = *it;
KAction *action;
- QPtrList<KAction> *actionList = plugin->newActions();
+ TQPtrList<KAction> *actionList = plugin->newActions();
for ( action = actionList->first(); action; action = actionList->next() ) {
kdDebug(5600) << "Unplugging " << action->name() << endl;
@@ -686,7 +686,7 @@ void MainWindow::selectPlugin( Kontact::Plugin *plugin )
return;
}
- KApplication::setOverrideCursor( QCursor( Qt::WaitCursor ) );
+ KApplication::setOverrideCursor( TQCursor( Qt::WaitCursor ) );
KParts::Part *part = plugin->part();
@@ -701,13 +701,13 @@ void MainWindow::selectPlugin( Kontact::Plugin *plugin )
}
// store old focus widget
- QWidget *focusWidget = kapp->focusWidget();
+ TQWidget *focusWidget = kapp->focusWidget();
if ( mCurrentPlugin && focusWidget ) {
// save the focus widget only when it belongs to the activated part
- QWidget *parent = focusWidget->parentWidget();
+ TQWidget *parent = focusWidget->parentWidget();
while ( parent ) {
if ( parent == mCurrentPlugin->part()->widget() )
- mFocusWidgets.insert( mCurrentPlugin->identifier(), QGuardedPtr<QWidget>( focusWidget ) );
+ mFocusWidgets.insert( mCurrentPlugin->identifier(), TQGuardedPtr<TQWidget>( focusWidget ) );
parent = parent->parentWidget();
}
@@ -719,7 +719,7 @@ void MainWindow::selectPlugin( Kontact::Plugin *plugin )
plugin->select();
mPartManager->setActivePart( part );
- QWidget *view = part->widget();
+ TQWidget *view = part->widget();
Q_ASSERT( view );
if ( view ) {
@@ -779,13 +779,13 @@ void MainWindow::selectPlugin( Kontact::Plugin *plugin )
}
}
}
- QStringList invisibleActions = plugin->invisibleToolbarActions();
+ TQStringList invisibleActions = plugin->invisibleToolbarActions();
- QStringList::ConstIterator it;
+ TQStringList::ConstIterator it;
for ( it = invisibleActions.begin(); it != invisibleActions.end(); ++it ) {
KAction *action = part->actionCollection()->action( (*it).latin1() );
if ( action ) {
- QPtrListIterator<KToolBar> it( toolBarIterator() );
+ TQPtrListIterator<KToolBar> it( toolBarIterator() );
for ( ; it.current() ; ++it ) {
action->unplug( it.current() );
}
@@ -795,7 +795,7 @@ void MainWindow::selectPlugin( Kontact::Plugin *plugin )
KApplication::restoreOverrideCursor();
}
-void MainWindow::selectPlugin( const QString &pluginName )
+void MainWindow::selectPlugin( const TQString &pluginName )
{
PluginList::ConstIterator end = mPlugins.end();
for ( PluginList::ConstIterator it = mPlugins.begin(); it != end; ++it )
@@ -845,10 +845,10 @@ void MainWindow::slotShowIntroduction()
void MainWindow::showTip( bool force )
{
- QStringList tips;
+ TQStringList tips;
PluginList::ConstIterator end = mPlugins.end();
for ( PluginList::ConstIterator it = mPlugins.begin(); it != end; ++it ) {
- QString file = (*it)->tipFile();
+ TQString file = (*it)->tipFile();
if ( !file.isEmpty() )
tips.append( file );
}
@@ -867,11 +867,11 @@ void MainWindow::slotPreferences()
static SettingsDialogWrapper *dlg = 0;
if ( !dlg ) {
// do not show settings of components running standalone
- QValueList<KPluginInfo*> filteredPlugins = mPluginInfos;
+ TQValueList<KPluginInfo*> filteredPlugins = mPluginInfos;
PluginList::ConstIterator it;
for ( it = mPlugins.begin(); it != mPlugins.end(); ++it )
if ( (*it)->isRunningStandalone() ) {
- QValueList<KPluginInfo*>::ConstIterator infoIt;
+ TQValueList<KPluginInfo*>::ConstIterator infoIt;
for ( infoIt = filteredPlugins.begin(); infoIt != filteredPlugins.end(); ++infoIt ) {
if ( (*infoIt)->pluginName() == (*it)->identifier() ) {
filteredPlugins.remove( *infoIt );
@@ -881,18 +881,18 @@ void MainWindow::slotPreferences()
}
dlg = new SettingsDialogWrapper( KSettings::Dialog::Configurable, this );
dlg->addPluginInfos( filteredPlugins );
- connect( dlg, SIGNAL( pluginSelectionChanged() ),
- SLOT( pluginsChanged() ) );
+ connect( dlg, TQT_SIGNAL( pluginSelectionChanged() ),
+ TQT_SLOT( pluginsChanged() ) );
}
dlg->show();
dlg->fixButtonLabel( this );
}
-int MainWindow::startServiceFor( const QString& serviceType,
- const QString& constraint,
- const QString& preferences,
- QString *error, QCString* dcopService,
+int MainWindow::startServiceFor( const TQString& serviceType,
+ const TQString& constraint,
+ const TQString& preferences,
+ TQString *error, TQCString* dcopService,
int flags )
{
PluginList::ConstIterator end = mPlugins.end();
@@ -932,7 +932,7 @@ void MainWindow::updateConfig()
void MainWindow::showAboutDialog()
{
- KApplication::setOverrideCursor( QCursor( Qt::WaitCursor ) );
+ KApplication::setOverrideCursor( TQCursor( Qt::WaitCursor ) );
if ( !mAboutDialog )
mAboutDialog = new AboutDialog( this );
@@ -958,8 +958,8 @@ void MainWindow::configureToolbars()
saveMainWindowSettings( KGlobal::config(), "MainWindow" );
KEditToolbar edit( factory() );
- connect( &edit, SIGNAL( newToolbarConfig() ),
- this, SLOT( slotNewToolbarConfig() ) );
+ connect( &edit, TQT_SIGNAL( newToolbarConfig() ),
+ this, TQT_SLOT( slotNewToolbarConfig() ) );
edit.exec();
}
@@ -988,13 +988,13 @@ void MainWindow::readProperties( KConfig *config )
{
Core::readProperties( config );
- QStringList activePlugins = config->readListEntry( "ActivePlugins" );
- QValueList<Plugin*>::ConstIterator it = mPlugins.begin();
- QValueList<Plugin*>::ConstIterator end = mPlugins.end();
+ TQStringList activePlugins = config->readListEntry( "ActivePlugins" );
+ TQValueList<Plugin*>::ConstIterator it = mPlugins.begin();
+ TQValueList<Plugin*>::ConstIterator end = mPlugins.end();
for ( ; it != end; ++it ) {
Plugin *plugin = *it;
if ( !plugin->isRunningStandalone() ) {
- QStringList::ConstIterator activePlugin = activePlugins.find( plugin->identifier() );
+ TQStringList::ConstIterator activePlugin = activePlugins.find( plugin->identifier() );
if ( activePlugin != activePlugins.end() ) {
plugin->readProperties( config );
}
@@ -1006,7 +1006,7 @@ void MainWindow::saveProperties( KConfig *config )
{
Core::saveProperties( config );
- QStringList activePlugins;
+ TQStringList activePlugins;
KPluginInfo::List::Iterator it = mPluginInfos.begin();
KPluginInfo::List::Iterator end = mPluginInfos.end();
@@ -1031,8 +1031,8 @@ bool MainWindow::queryClose()
return true;
bool localClose = true;
- QValueList<Plugin*>::ConstIterator end = mPlugins.end();
- QValueList<Plugin*>::ConstIterator it = mPlugins.begin();
+ TQValueList<Plugin*>::ConstIterator end = mPlugins.end();
+ TQValueList<Plugin*>::ConstIterator it = mPlugins.begin();
for ( ; it != end; ++it ) {
Plugin *plugin = *it;
if ( !plugin->isRunningStandalone() )
@@ -1043,7 +1043,7 @@ bool MainWindow::queryClose()
return localClose;
}
-void MainWindow::slotShowStatusMsg( const QString &msg )
+void MainWindow::slotShowStatusMsg( const TQString &msg )
{
if ( !statusBar() || !mStatusMsgLabel )
return;
@@ -1051,16 +1051,16 @@ void MainWindow::slotShowStatusMsg( const QString &msg )
mStatusMsgLabel->setText( msg );
}
-QString MainWindow::introductionString()
+TQString MainWindow::introductionString()
{
KIconLoader *iconloader = KGlobal::iconLoader();
int iconSize = iconloader->currentSize( KIcon::Desktop );
- QString handbook_icon_path = iconloader->iconPath( "contents2", KIcon::Desktop );
- QString html_icon_path = iconloader->iconPath( "html", KIcon::Desktop );
- QString wizard_icon_path = iconloader->iconPath( "wizard", KIcon::Desktop );
+ TQString handbook_icon_path = iconloader->iconPath( "contents2", KIcon::Desktop );
+ TQString html_icon_path = iconloader->iconPath( "html", KIcon::Desktop );
+ TQString wizard_icon_path = iconloader->iconPath( "wizard", KIcon::Desktop );
- QString info = i18n( "<h2 style='text-align:center; margin-top: 0px;'>Welcome to Kontact %1</h2>"
+ TQString info = i18n( "<h2 style='text-align:center; margin-top: 0px;'>Welcome to Kontact %1</h2>"
"<p>%1</p>"
"<table align=\"center\">"
"<tr><td><a href=\"%1\"><img width=\"%1\" height=\"%1\" src=\"%1\" /></a></td>"
diff --git a/kontact/src/mainwindow.h b/kontact/src/mainwindow.h
index a96d5bf6b..5fe50a22f 100644
--- a/kontact/src/mainwindow.h
+++ b/kontact/src/mainwindow.h
@@ -24,9 +24,9 @@
#ifndef KONTACT_MAINWINDOW_H
#define KONTACT_MAINWINDOW_H
-#include <qguardedptr.h>
-#include <qptrlist.h>
-#include <qwidgetstack.h>
+#include <tqguardedptr.h>
+#include <tqptrlist.h>
+#include <tqwidgetstack.h>
#include <kparts/mainwindow.h>
#include <kparts/part.h>
@@ -60,7 +60,7 @@ class Plugin;
class SidePaneBase;
class AboutDialog;
-typedef QValueList<Kontact::Plugin*> PluginList;
+typedef TQValueList<Kontact::Plugin*> PluginList;
class MainWindow : public Kontact::Core, public KDCOPServiceStarter, public KontactIface
{
@@ -71,18 +71,18 @@ class MainWindow : public Kontact::Core, public KDCOPServiceStarter, public Kont
~MainWindow();
// KDCOPServiceStarter interface
- 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 );
virtual PluginList pluginList() const { return mPlugins; }
- void setActivePluginModule( const QString & );
+ void setActivePluginModule( const TQString & );
public slots:
virtual void selectPlugin( Kontact::Plugin *plugin );
- virtual void selectPlugin( const QString &pluginName );
+ virtual void selectPlugin( const TQString &pluginName );
void updateConfig();
@@ -97,12 +97,12 @@ class MainWindow : public Kontact::Core, public KDCOPServiceStarter, public Kont
void slotShowTip();
void slotRequestFeature();
void slotConfigureProfiles();
- void slotLoadProfile( const QString& id );
- void slotSaveToProfile( const QString& id );
+ void slotLoadProfile( const TQString& id );
+ void slotSaveToProfile( const TQString& id );
void slotNewToolbarConfig();
void slotShowIntroduction();
void showAboutDialog();
- void slotShowStatusMsg( const QString& );
+ void slotShowStatusMsg( const TQString& );
void activatePluginModule();
void slotOpenUrl( const KURL &url );
@@ -124,8 +124,8 @@ class MainWindow : public Kontact::Core, public KDCOPServiceStarter, public Kont
virtual bool queryClose();
virtual void readProperties( KConfig *config );
virtual void saveProperties( KConfig *config );
- void paintAboutScreen( const QString& msg );
- static QString introductionString();
+ void paintAboutScreen( const TQString& msg );
+ static TQString introductionString();
KToolBar* findToolBar(const char* name);
private slots:
@@ -135,27 +135,27 @@ class MainWindow : public Kontact::Core, public KDCOPServiceStarter, public Kont
void configureToolbars();
private:
- QFrame *mTopWidget;
+ TQFrame *mTopWidget;
- QSplitter *mSplitter;
+ TQSplitter *mSplitter;
KToolBarPopupAction *mNewActions;
KToolBarPopupAction *mSyncActions;
SidePaneBase *mSidePane;
- QWidgetStack *mPartsStack;
+ TQWidgetStack *mPartsStack;
Plugin *mCurrentPlugin;
KParts::PartManager *mPartManager;
PluginList mPlugins;
PluginList mDelayedPreload;
- QValueList<KPluginInfo*> mPluginInfos;
+ TQValueList<KPluginInfo*> mPluginInfos;
KHTMLPart *mIntroPart;
KRSqueezedTextLabel* mStatusMsgLabel;
KPIM::StatusbarProgressWidget *mLittleProgress;
- QString mActiveModule;
+ TQString mActiveModule;
- QMap<QString, QGuardedPtr<QWidget> > mFocusWidgets;
+ TQMap<TQString, TQGuardedPtr<TQWidget> > mFocusWidgets;
AboutDialog *mAboutDialog;
bool mReallyClose;
diff --git a/kontact/src/profiledialog.cpp b/kontact/src/profiledialog.cpp
index 9525c968a..5d440e5f7 100644
--- a/kontact/src/profiledialog.cpp
+++ b/kontact/src/profiledialog.cpp
@@ -30,86 +30,86 @@
#include <klocale.h>
#include <kmessagebox.h>
-#include <qlayout.h>
-#include <qpushbutton.h>
-#include <qstring.h>
+#include <tqlayout.h>
+#include <tqpushbutton.h>
+#include <tqstring.h>
-Kontact::ProfileDialog::ProfileDialog( QWidget* parent, WFlags flags ) : KDialogBase( parent, /*name=*/0, /*modal=*/true, /*caption=*/QString(), /*buttonMask=*/KDialogBase::Ok|KDialogBase::Close )
+Kontact::ProfileDialog::ProfileDialog( TQWidget* parent, WFlags flags ) : KDialogBase( parent, /*name=*/0, /*modal=*/true, /*caption=*/TQString(), /*buttonMask=*/KDialogBase::Ok|KDialogBase::Close )
{
setWFlags( flags );
setCaption( i18n("Configure Profiles") );
setButtonOK( i18n("Load Profile") );
- QWidget* mainWidget = new QWidget( this );
+ TQWidget* mainWidget = new TQWidget( this );
- QHBoxLayout* horizontalLayout = new QHBoxLayout( mainWidget );
+ TQHBoxLayout* horizontalLayout = new TQHBoxLayout( mainWidget );
horizontalLayout->setSpacing( 5 );
m_list = new KListView( mainWidget );
m_list->addColumn( i18n("Name") );
m_list->addColumn( i18n("Description") );
- m_list->setSelectionMode( QListView::Single );
+ m_list->setSelectionMode( TQListView::Single );
m_list->setItemsRenameable( true );
m_list->setRenameable( NameColumn, true );
m_list->setRenameable( DescriptionColumn, true );
- connect( m_list, SIGNAL( selectionChanged() ),
- this, SLOT( listSelectionChanged() ) );
- connect( m_list, SIGNAL( itemRenamed( QListViewItem*, const QString&, int ) ),
- this, SLOT( listItemRenamed( QListViewItem*, const QString&, int ) ) );
+ connect( m_list, TQT_SIGNAL( selectionChanged() ),
+ this, TQT_SLOT( listSelectionChanged() ) );
+ connect( m_list, TQT_SIGNAL( itemRenamed( TQListViewItem*, const TQString&, int ) ),
+ this, TQT_SLOT( listItemRenamed( TQListViewItem*, const TQString&, int ) ) );
horizontalLayout->addWidget( m_list );
- QVBoxLayout* buttonLayout = new QVBoxLayout( horizontalLayout );
+ TQVBoxLayout* buttonLayout = new TQVBoxLayout( horizontalLayout );
buttonLayout->setSpacing( 5 );
- m_newProfileButton = new QPushButton( mainWidget );
+ m_newProfileButton = new TQPushButton( mainWidget );
m_newProfileButton->setText( i18n("New Profile") );
- connect( m_newProfileButton, SIGNAL( clicked() ),
- this, SLOT( addNewProfile() ) );
+ connect( m_newProfileButton, TQT_SIGNAL( clicked() ),
+ this, TQT_SLOT( addNewProfile() ) );
buttonLayout->addWidget( m_newProfileButton );
- m_deleteProfileButton = new QPushButton( mainWidget );
+ m_deleteProfileButton = new TQPushButton( mainWidget );
m_deleteProfileButton->setText( i18n("Delete Profile") );
m_deleteProfileButton->setEnabled( false );
- connect( m_deleteProfileButton, SIGNAL( clicked() ),
- this, SLOT( deleteSelectedProfile() ) );
+ connect( m_deleteProfileButton, TQT_SIGNAL( clicked() ),
+ this, TQT_SLOT( deleteSelectedProfile() ) );
buttonLayout->addWidget( m_deleteProfileButton );
- m_saveProfileButton = new QPushButton( mainWidget );
+ m_saveProfileButton = new TQPushButton( mainWidget );
m_saveProfileButton->setText( i18n("Save Profile") );
m_saveProfileButton->setEnabled( false );
- connect( m_saveProfileButton, SIGNAL( clicked() ),
- this, SLOT( saveToSelectedProfile() ) );
+ connect( m_saveProfileButton, TQT_SIGNAL( clicked() ),
+ this, TQT_SLOT( saveToSelectedProfile() ) );
buttonLayout->addWidget( m_saveProfileButton );
buttonLayout->addStretch();
- m_importProfileButton = new QPushButton( mainWidget );
+ m_importProfileButton = new TQPushButton( mainWidget );
m_importProfileButton->setText( i18n("Import Profile") );
- connect( m_importProfileButton, SIGNAL( clicked() ),
- this, SLOT( importProfile() ) );
+ connect( m_importProfileButton, TQT_SIGNAL( clicked() ),
+ this, TQT_SLOT( importProfile() ) );
buttonLayout->addWidget( m_importProfileButton );
- m_exportProfileButton = new QPushButton( mainWidget );
+ m_exportProfileButton = new TQPushButton( mainWidget );
m_exportProfileButton->setText( i18n("Export Profile") );
m_exportProfileButton->setEnabled( false );
- connect( m_exportProfileButton, SIGNAL( clicked() ),
- this, SLOT( exportSelectedProfile() ) );
+ connect( m_exportProfileButton, TQT_SIGNAL( clicked() ),
+ this, TQT_SLOT( exportSelectedProfile() ) );
buttonLayout->addWidget( m_exportProfileButton );
setMainWidget( mainWidget );
- connect( Kontact::ProfileManager::self(), SIGNAL( profileAdded( const QString& ) ),
- this, SLOT( profileAdded( const QString& ) ) );
- connect( Kontact::ProfileManager::self(), SIGNAL( profileRemoved( const QString& ) ),
- this, SLOT( profileRemoved( const QString& ) ) );
- connect( Kontact::ProfileManager::self(), SIGNAL( profileLoaded( const QString& ) ),
- this, SLOT( profileLoaded( const QString& ) ) );
- connect( Kontact::ProfileManager::self(), SIGNAL( profileUpdated( const QString& ) ),
- this, SLOT( profileUpdated( const QString& ) ) );
-
- const QValueList<Kontact::Profile> profiles = Kontact::ProfileManager::self()->profiles();
- for ( QValueList<Kontact::Profile>::ConstIterator it = profiles.begin(), end = profiles.end(); it != end; ++it )
+ connect( Kontact::ProfileManager::self(), TQT_SIGNAL( profileAdded( const TQString& ) ),
+ this, TQT_SLOT( profileAdded( const TQString& ) ) );
+ connect( Kontact::ProfileManager::self(), TQT_SIGNAL( profileRemoved( const TQString& ) ),
+ this, TQT_SLOT( profileRemoved( const TQString& ) ) );
+ connect( Kontact::ProfileManager::self(), TQT_SIGNAL( profileLoaded( const TQString& ) ),
+ this, TQT_SLOT( profileLoaded( const TQString& ) ) );
+ connect( Kontact::ProfileManager::self(), TQT_SIGNAL( profileUpdated( const TQString& ) ),
+ this, TQT_SLOT( profileUpdated( const TQString& ) ) );
+
+ const TQValueList<Kontact::Profile> profiles = Kontact::ProfileManager::self()->profiles();
+ for ( TQValueList<Kontact::Profile>::ConstIterator it = profiles.begin(), end = profiles.end(); it != end; ++it )
{
profileAdded( (*it).id() );
}
@@ -122,7 +122,7 @@ void Kontact::ProfileDialog::slotOk()
KDialogBase::slotOk();
}
-QString Kontact::ProfileDialog::selectedProfile() const
+TQString Kontact::ProfileDialog::selectedProfile() const
{
return m_itemToProfile[m_list->selectedItem()];
}
@@ -135,7 +135,7 @@ void Kontact::ProfileDialog::loadSelectedProfile()
Kontact::ProfileManager::self()->loadProfile( profile.id() );
}
-void Kontact::ProfileDialog::profileLoaded( const QString& id )
+void Kontact::ProfileDialog::profileLoaded( const TQString& id )
{
const Kontact::Profile profile = Kontact::ProfileManager::self()->profileById( id );
if ( profile.isNull() )
@@ -165,11 +165,11 @@ void Kontact::ProfileDialog::deleteSelectedProfile()
void Kontact::ProfileDialog::exportSelectedProfile()
{
- const QString id = selectedProfile();
+ const TQString id = selectedProfile();
const Kontact::Profile profile = Kontact::ProfileManager::self()->profileById( id );
if ( profile.isNull() )
return;
- const QString path = KFileDialog::getExistingDirectory( QString(), this, i18n("Select Profile Folder") );
+ const TQString path = KFileDialog::getExistingDirectory( TQString(), this, i18n("Select Profile Folder") );
if ( path.isNull() )
return;
const Kontact::ProfileManager::ExportError error = Kontact::ProfileManager::self()->exportProfileToDirectory( id, path );
@@ -185,7 +185,7 @@ void Kontact::ProfileDialog::exportSelectedProfile()
void Kontact::ProfileDialog::importProfile()
{
- const QString path = KFileDialog::getExistingDirectory( QString(), this, i18n("Select Profile Folder") );
+ const TQString path = KFileDialog::getExistingDirectory( TQString(), this, i18n("Select Profile Folder") );
if ( path.isNull() )
return;
const Kontact::ProfileManager::ImportError error = Kontact::ProfileManager::self()->importProfileFromDirectory( path );
@@ -195,29 +195,29 @@ void Kontact::ProfileDialog::importProfile()
}
}
-void Kontact::ProfileDialog::profileAdded( const QString& id )
+void Kontact::ProfileDialog::profileAdded( const TQString& id )
{
Q_ASSERT( !m_profileToItem[id] );
const Kontact::Profile profile = Kontact::ProfileManager::self()->profileById( id );
Q_ASSERT( !profile.isNull() );
- QListViewItem* const item = new QListViewItem( m_list );
+ TQListViewItem* const item = new TQListViewItem( m_list );
m_profileToItem[id] = item;
m_itemToProfile[item] = id;
profileUpdated( id );
}
-void Kontact::ProfileDialog::profileRemoved( const QString& id )
+void Kontact::ProfileDialog::profileRemoved( const TQString& id )
{
- QListViewItem* item = m_profileToItem[id];
+ TQListViewItem* item = m_profileToItem[id];
Q_ASSERT( item );
m_profileToItem.remove( id );
m_itemToProfile.remove( item );
delete item;
}
-void Kontact::ProfileDialog::profileUpdated( const QString& id )
+void Kontact::ProfileDialog::profileUpdated( const TQString& id )
{
- QListViewItem* item = m_profileToItem[id];
+ TQListViewItem* item = m_profileToItem[id];
Q_ASSERT( item );
const Kontact::Profile profile = Kontact::ProfileManager::self()->profileById( id );
Q_ASSERT( !profile.isNull() );
@@ -233,7 +233,7 @@ void Kontact::ProfileDialog::addNewProfile()
Kontact::ProfileManager::self()->addProfile( profile );
}
-void Kontact::ProfileDialog::listItemRenamed( QListViewItem* item, const QString& text, int col )
+void Kontact::ProfileDialog::listItemRenamed( TQListViewItem* item, const TQString& text, int col )
{
Kontact::Profile profile = Kontact::ProfileManager::self()->profileById( m_itemToProfile[item] );
Q_ASSERT( !profile.isNull() );
diff --git a/kontact/src/profiledialog.h b/kontact/src/profiledialog.h
index 7fa620e6e..730b044f3 100644
--- a/kontact/src/profiledialog.h
+++ b/kontact/src/profiledialog.h
@@ -27,8 +27,8 @@
#include <kdialogbase.h>
-#include <qmap.h>
-#include <qstring.h>
+#include <tqmap.h>
+#include <tqstring.h>
class QListViewItem;
@@ -42,7 +42,7 @@ class ProfileDialog : public KDialogBase
Q_OBJECT
public:
- explicit ProfileDialog( QWidget* parent = 0, WFlags f = 0 );
+ explicit ProfileDialog( TQWidget* parent = 0, WFlags f = 0 );
private:
enum ListColumn {
@@ -50,7 +50,7 @@ private:
DescriptionColumn=1
};
- QString selectedProfile() const;
+ TQString selectedProfile() const;
void updateButtonState();
protected slots:
@@ -67,22 +67,22 @@ private slots:
void exportSelectedProfile();
void addNewProfile();
void listSelectionChanged();
- void listItemRenamed( QListViewItem* item, const QString& text, int col );
+ void listItemRenamed( TQListViewItem* item, const TQString& text, int col );
- void profileAdded( const QString& id );
- void profileRemoved( const QString& id );
- void profileUpdated( const QString& id );
- void profileLoaded( const QString& id );
+ void profileAdded( const TQString& id );
+ void profileRemoved( const TQString& id );
+ void profileUpdated( const TQString& id );
+ void profileLoaded( const TQString& id );
private:
KListView* m_list;
- QPushButton* m_newProfileButton;
- QPushButton* m_deleteProfileButton;
- QPushButton* m_saveProfileButton;
- QPushButton* m_importProfileButton;
- QPushButton* m_exportProfileButton;
- QMap<QListViewItem*, QString> m_itemToProfile;
- QMap<QString, QListViewItem*> m_profileToItem;
+ TQPushButton* m_newProfileButton;
+ TQPushButton* m_deleteProfileButton;
+ TQPushButton* m_saveProfileButton;
+ TQPushButton* m_importProfileButton;
+ TQPushButton* m_exportProfileButton;
+ TQMap<TQListViewItem*, TQString> m_itemToProfile;
+ TQMap<TQString, TQListViewItem*> m_profileToItem;
};
} // Kontact
diff --git a/kontact/src/profilemanager.cpp b/kontact/src/profilemanager.cpp
index 53419cc54..bb8d50957 100644
--- a/kontact/src/profilemanager.cpp
+++ b/kontact/src/profilemanager.cpp
@@ -33,11 +33,11 @@
#include <kstaticdeleter.h>
#include <kurl.h>
-#include <qdir.h>
-#include <qstringlist.h>
-#include <qvaluelist.h>
+#include <tqdir.h>
+#include <tqstringlist.h>
+#include <tqvaluelist.h>
-Kontact::Profile::Profile( const QString& id, bool isLocal ) : m_id( id ), m_local( isLocal )
+Kontact::Profile::Profile( const TQString& id, bool isLocal ) : m_id( id ), m_local( isLocal )
{
}
@@ -45,17 +45,17 @@ Kontact::Profile::Profile() : m_local( false )
{
}
-QString Kontact::Profile::id() const
+TQString Kontact::Profile::id() const
{
return m_id;
}
-QString Kontact::Profile::name() const
+TQString Kontact::Profile::name() const
{
return m_name;
}
-QString Kontact::Profile::description() const
+TQString Kontact::Profile::description() const
{
return m_description;
}
@@ -65,17 +65,17 @@ bool Kontact::Profile::isNull() const
return m_id.isNull();
}
-void Kontact::Profile::setId( const QString& id )
+void Kontact::Profile::setId( const TQString& id )
{
m_id = id;
}
-void Kontact::Profile::setDescription( const QString& description )
+void Kontact::Profile::setDescription( const TQString& description )
{
m_description = description;
}
-void Kontact::Profile::setName( const QString& name )
+void Kontact::Profile::setName( const TQString& name )
{
m_name = name;
}
@@ -96,18 +96,18 @@ bool Kontact::Profile::isLocal() const
return m_local;
}
-void Kontact::Profile::setOriginalLocation( const QString& path )
+void Kontact::Profile::setOriginalLocation( const TQString& path )
{
m_originalLocation = path;
}
-QString Kontact::Profile::localSaveLocation() const
+TQString Kontact::Profile::localSaveLocation() const
{
- return m_id.isNull() ? QString() : locateLocal( "data", "kontact/profiles/" + m_id, /*create folder=*/true );
+ return m_id.isNull() ? TQString() : locateLocal( "data", "kontact/profiles/" + m_id, /*create folder=*/true );
}
-QString Kontact::Profile::saveLocation() const
+TQString Kontact::Profile::saveLocation() const
{
return m_local ? localSaveLocation() : m_originalLocation;
}
@@ -131,7 +131,7 @@ Kontact::ProfileManager* Kontact::ProfileManager::self()
return m_self;
}
-Kontact::ProfileManager::ProfileManager( QObject* parent ) : QObject( parent )
+Kontact::ProfileManager::ProfileManager( TQObject* parent ) : TQObject( parent )
{
}
@@ -142,19 +142,19 @@ Kontact::ProfileManager::~ProfileManager()
void Kontact::ProfileManager::writeConfig() const
{
- const QValueList<Kontact::Profile> profiles = m_profiles.values();
- for ( QValueList<Kontact::Profile>::ConstIterator it = profiles.begin(), end = profiles.end(); it != end; ++it )
+ const TQValueList<Kontact::Profile> profiles = m_profiles.values();
+ for ( TQValueList<Kontact::Profile>::ConstIterator it = profiles.begin(), end = profiles.end(); it != end; ++it )
{
writeProfileConfig( *it );
}
}
-Kontact::Profile Kontact::ProfileManager::readFromConfiguration( const QString& configFile, bool isLocal )
+Kontact::Profile Kontact::ProfileManager::readFromConfiguration( const TQString& configFile, bool isLocal )
{
KConfig profileCfg( configFile, true /*read-only*/, false /*no KDE global*/ );
- const QString configDir = configFile.left( configFile.findRev( QDir::separator(), -1 ) );
+ const TQString configDir = configFile.left( configFile.findRev( TQDir::separator(), -1 ) );
profileCfg.setGroup( "Kontact Profile" );
- const QString id = profileCfg.readEntry( "Identifier" );
+ const TQString id = profileCfg.readEntry( "Identifier" );
Kontact::Profile profile( id );
profile.setName( profileCfg.readEntry( "Name" ) );
profile.setDescription( profileCfg.readEntry( "Description" ) );
@@ -166,8 +166,8 @@ Kontact::Profile Kontact::ProfileManager::readFromConfiguration( const QString&
void Kontact::ProfileManager::writeProfileConfig( const Kontact::Profile& profile ) const
{
- const QString profileDir = profile.saveLocation();
- const QString cfgPath = profileDir + "/profile.cfg";
+ const TQString profileDir = profile.saveLocation();
+ const TQString cfgPath = profileDir + "/profile.cfg";
KConfig profileCfg( cfgPath, false /*read-only*/, false /*no KDE global*/ );
profileCfg.setGroup( "Kontact Profile" );
profileCfg.writeEntry( "Identifier", profile.id() );
@@ -178,14 +178,14 @@ void Kontact::ProfileManager::writeProfileConfig( const Kontact::Profile& profil
void Kontact::ProfileManager::readConfig()
{
- const QStringList profilePaths = KGlobal::dirs()->findAllResources( "data", QString::fromLatin1( "kontact/profiles/*/profile.cfg" ) );
+ const TQStringList profilePaths = KGlobal::dirs()->findAllResources( "data", TQString::fromLatin1( "kontact/profiles/*/profile.cfg" ) );
- typedef QMap<QString, Kontact::Profile> ProfileMap;
+ typedef TQMap<TQString, Kontact::Profile> ProfileMap;
ProfileMap profiles;
ProfileMap globalProfiles;
- const QString localPrefix = locateLocal( "data", "kontact/profiles/", /*createDir=*/false );
- for ( QStringList::ConstIterator it = profilePaths.begin(), end = profilePaths.end(); it != end; ++it )
+ const TQString localPrefix = locateLocal( "data", "kontact/profiles/", /*createDir=*/false );
+ for ( TQStringList::ConstIterator it = profilePaths.begin(), end = profilePaths.end(); it != end; ++it )
{
const bool isLocal = (*it).startsWith( localPrefix );
const Kontact::Profile profile = readFromConfiguration( *it, isLocal );
@@ -209,19 +209,19 @@ void Kontact::ProfileManager::readConfig()
}
}
-QValueList<Kontact::Profile> Kontact::ProfileManager::profiles() const
+TQValueList<Kontact::Profile> Kontact::ProfileManager::profiles() const
{
return m_profiles.values();
}
-Kontact::Profile Kontact::ProfileManager::profileById( const QString& id ) const
+Kontact::Profile Kontact::ProfileManager::profileById( const TQString& id ) const
{
return m_profiles[id];
}
void Kontact::ProfileManager::updateProfile( const Kontact::Profile& profile_ )
{
- const QString id = profile_.id();
+ const TQString id = profile_.id();
if ( id.isNull() || m_profiles[id] == profile_ )
return;
Kontact::Profile profile( profile_ );
@@ -231,7 +231,7 @@ void Kontact::ProfileManager::updateProfile( const Kontact::Profile& profile_ )
emit profileUpdated( id );
}
-void Kontact::Profile::copyConfigFiles( const QString& source_, const QString& dest_ )
+void Kontact::Profile::copyConfigFiles( const TQString& source_, const TQString& dest_ )
{
const KURL source = KURL::fromPathOrURL( source_+"/*rc" );
const KURL dest = KURL::fromPathOrURL( dest_ );
@@ -239,7 +239,7 @@ void Kontact::Profile::copyConfigFiles( const QString& source_, const QString& d
// TODO better check for the copy result
}
-void Kontact::ProfileManager::saveToProfile( const QString& id )
+void Kontact::ProfileManager::saveToProfile( const TQString& id )
{
Kontact::Profile profile = profileById( id );
if ( profile.isNull() )
@@ -251,7 +251,7 @@ void Kontact::ProfileManager::saveToProfile( const QString& id )
bool Kontact::ProfileManager::addProfile( const Kontact::Profile& profile, bool syncConfig )
{
- const QString id = profile.id();
+ const TQString id = profile.id();
if ( m_profiles.contains( id ) )
return false;
m_profiles[id] = profile;
@@ -264,7 +264,7 @@ bool Kontact::ProfileManager::addProfile( const Kontact::Profile& profile, bool
return true;
}
-void Kontact::ProfileManager::loadProfile( const QString& id )
+void Kontact::ProfileManager::loadProfile( const TQString& id )
{
if ( !m_profiles.contains( id ) )
return;
@@ -276,7 +276,7 @@ void Kontact::ProfileManager::removeProfile( const Kontact::Profile& profile )
removeProfile( profile.id() );
}
-void Kontact::ProfileManager::removeProfile( const QString& id )
+void Kontact::ProfileManager::removeProfile( const TQString& id )
{
if ( !m_profiles.contains( id ) )
return;
@@ -290,17 +290,17 @@ void Kontact::ProfileManager::removeProfile( const QString& id )
emit profileRemoved( id );
}
-Kontact::ProfileManager::ExportError Kontact::ProfileManager::exportProfileToDirectory( const QString& id, const QString& path )
+Kontact::ProfileManager::ExportError Kontact::ProfileManager::exportProfileToDirectory( const TQString& id, const TQString& path )
{
if ( !m_profiles.contains( id ) )
return SuccessfulExport;
- if ( !QDir( path ).exists() )
+ if ( !TQDir( path ).exists() )
return DirectoryDoesNotExist;
const Kontact::Profile profile = profileById( id );
const KURL source = KURL::fromPathOrURL( profile.saveLocation() );
- const KURL target = KURL::fromPathOrURL( path + QDir::separator() + profile.name() );
+ const KURL target = KURL::fromPathOrURL( path + TQDir::separator() + profile.name() );
KIO::CopyJob* job = KIO::copy( source, target, /*showProgressInfo=*/false );
// TODO check result
@@ -308,7 +308,7 @@ Kontact::ProfileManager::ExportError Kontact::ProfileManager::exportProfileToDir
return SuccessfulExport;
}
-Kontact::ProfileManager::ImportError Kontact::ProfileManager::importProfileFromDirectory( const QString& path )
+Kontact::ProfileManager::ImportError Kontact::ProfileManager::importProfileFromDirectory( const TQString& path )
{
Kontact::Profile profile = readFromConfiguration( path + "/profile.cfg", /*isLocal=*/ true );
if ( profile.isNull() )
@@ -327,11 +327,11 @@ Kontact::ProfileManager::ImportError Kontact::ProfileManager::importProfileFromD
return SuccessfulImport;
}
-QString Kontact::ProfileManager::generateNewId() const
+TQString Kontact::ProfileManager::generateNewId() const
{
while ( true )
{
- const QString newId = KApplication::randomString( 10 );
+ const TQString newId = KApplication::randomString( 10 );
if ( !m_profiles.contains( newId ) )
return newId;
}
diff --git a/kontact/src/profilemanager.h b/kontact/src/profilemanager.h
index e8b10adb5..ff6d6e1bf 100644
--- a/kontact/src/profilemanager.h
+++ b/kontact/src/profilemanager.h
@@ -25,9 +25,9 @@
#ifndef KONTACT_PROFILEMANAGER_H
#define KONTACT_PROFILEMANAGER_H
-#include <qmap.h>
-#include <qobject.h>
-#include <qstring.h>
+#include <tqmap.h>
+#include <tqobject.h>
+#include <tqstring.h>
template <class T> class QValueList;
@@ -43,23 +43,23 @@ class Profile
public:
Profile();
- explicit Profile( const QString& id, bool isLocal = false );
+ explicit Profile( const TQString& id, bool isLocal = false );
- QString id() const;
+ TQString id() const;
- QString name() const;
+ TQString name() const;
- QString description() const;
+ TQString description() const;
bool isNull() const;
- void setName( const QString& name );
+ void setName( const TQString& name );
- void setDescription( const QString& description );
+ void setDescription( const TQString& description );
bool operator==( const Kontact::Profile& other ) const;
- QString saveLocation() const;
+ TQString saveLocation() const;
private: // ProfileManager only
@@ -69,21 +69,21 @@ private: // ProfileManager only
};
void setLocal( SetLocalMode mode );
bool isLocal() const;
- void setOriginalLocation( const QString& path );
- void setId( const QString& id );
+ void setOriginalLocation( const TQString& path );
+ void setId( const TQString& id );
private:
- static void copyConfigFiles( const QString& source, const QString& dest );
+ static void copyConfigFiles( const TQString& source, const TQString& dest );
- QString localSaveLocation() const;
+ TQString localSaveLocation() const;
private:
- QString m_id;
- QString m_name;
- QString m_description;
+ TQString m_id;
+ TQString m_name;
+ TQString m_description;
bool m_local;
- QString m_originalLocation;
+ TQString m_originalLocation;
};
class ProfileManager : public QObject
@@ -105,47 +105,47 @@ public:
~ProfileManager();
- Kontact::Profile profileById( const QString& id ) const;
+ Kontact::Profile profileById( const TQString& id ) const;
bool addProfile( const Kontact::Profile& profile, bool syncConfig = true );
void removeProfile( const Kontact::Profile& profile );
- void removeProfile( const QString& id );
+ void removeProfile( const TQString& id );
void updateProfile( const Kontact::Profile& profile );
- void loadProfile( const QString& id );
+ void loadProfile( const TQString& id );
- void saveToProfile( const QString& id );
+ void saveToProfile( const TQString& id );
- QValueList<Kontact::Profile> profiles() const;
+ TQValueList<Kontact::Profile> profiles() const;
- ExportError exportProfileToDirectory( const QString& id, const QString& path );
+ ExportError exportProfileToDirectory( const TQString& id, const TQString& path );
- ImportError importProfileFromDirectory( const QString& path );
+ ImportError importProfileFromDirectory( const TQString& path );
- QString generateNewId() const;
+ TQString generateNewId() const;
signals:
- void profileAdded( const QString& id );
+ void profileAdded( const TQString& id );
- void profileRemoved( const QString& id );
+ void profileRemoved( const TQString& id );
- void profileUpdated( const QString& id );
+ void profileUpdated( const TQString& id );
- void profileLoaded( const QString& id );
+ void profileLoaded( const TQString& id );
- void saveToProfileRequested( const QString& id );
+ void saveToProfileRequested( const TQString& id );
void profileImportFinished( ImportError status );
private:
static ProfileManager* m_self;
- static Kontact::Profile readFromConfiguration( const QString& configFile, bool isLocal );
+ static Kontact::Profile readFromConfiguration( const TQString& configFile, bool isLocal );
- explicit ProfileManager( QObject* parent = 0 );
+ explicit ProfileManager( TQObject* parent = 0 );
void readConfig();
@@ -154,7 +154,7 @@ private:
void writeProfileConfig( const Kontact::Profile& profile ) const;
private:
- QMap<QString, Kontact::Profile> m_profiles;
+ TQMap<TQString, Kontact::Profile> m_profiles;
};
}
diff --git a/kontact/src/sidepanebase.cpp b/kontact/src/sidepanebase.cpp
index 781556085..28bae2999 100644
--- a/kontact/src/sidepanebase.cpp
+++ b/kontact/src/sidepanebase.cpp
@@ -25,8 +25,8 @@
using namespace Kontact;
-SidePaneBase::SidePaneBase( Core *core, QWidget *parent, const char *name )
- : QVBox( parent, name ), mCore( core )
+SidePaneBase::SidePaneBase( Core *core, TQWidget *parent, const char *name )
+ : TQVBox( parent, name ), mCore( core )
{
}
diff --git a/kontact/src/sidepanebase.h b/kontact/src/sidepanebase.h
index 95378f919..407d98de6 100644
--- a/kontact/src/sidepanebase.h
+++ b/kontact/src/sidepanebase.h
@@ -21,7 +21,7 @@
#ifndef KONTACT_SIDEPANEBASE_H
#define KONTACT_SIDEPANEBASE_H
-#include <qvbox.h>
+#include <tqvbox.h>
namespace KParts { class Part; }
@@ -35,13 +35,13 @@ class SidePaneBase : public QVBox
{
Q_OBJECT
public:
- SidePaneBase( Core *core, QWidget *parent, const char *name = 0 );
+ SidePaneBase( Core *core, TQWidget *parent, const char *name = 0 );
virtual ~SidePaneBase();
void setActionCollection( KActionCollection *actionCollection );
KActionCollection *actionCollection() const;
- virtual const QPtrList<KAction> & actions() = 0;
+ virtual const TQPtrList<KAction> & actions() = 0;
signals:
void pluginSelected( Kontact::Plugin* );
@@ -63,7 +63,7 @@ class SidePaneBase : public QVBox
This is an overloaded member function. It behaves essentially like the
above function.
*/
- virtual void selectPlugin( const QString &name ) = 0;
+ virtual void selectPlugin( const TQString &name ) = 0;
virtual void indicateForegrunding( Kontact::Plugin* ) = 0;
protected:
diff --git a/korganizer/actionmanager.cpp b/korganizer/actionmanager.cpp
index ce608165e..8d1bb0aef 100644
--- a/korganizer/actionmanager.cpp
+++ b/korganizer/actionmanager.cpp
@@ -69,19 +69,19 @@
#include <kdeversion.h>
#include <kactionclasses.h>
-#include <qapplication.h>
-#include <qcursor.h>
-#include <qtimer.h>
-#include <qlabel.h>
+#include <tqapplication.h>
+#include <tqcursor.h>
+#include <tqtimer.h>
+#include <tqlabel.h>
// FIXME: Several places in the file don't use KConfigXT yet!
KOWindowList *ActionManager::mWindowList = 0;
ActionManager::ActionManager( KXMLGUIClient *client, CalendarView *widget,
- QObject *parent, KOrg::MainWindow *mainWindow,
+ TQObject *parent, KOrg::MainWindow *mainWindow,
bool isPart )
- : QObject( parent ), KCalendarIface(), mRecent( 0 ),
+ : TQObject( parent ), KCalendarIface(), mRecent( 0 ),
mResourceButtonsAction( 0 ), mResourceViewShowAction( 0 ), mCalendar( 0 ),
mCalendarResources( 0 ), mResourceView( 0 ), mIsClosing( false )
{
@@ -125,7 +125,7 @@ void ActionManager::init()
mWindowList = new KOWindowList;
// Show tip of the day, when the first calendar is shown.
if ( !mIsPart )
- QTimer::singleShot( 0, this, SLOT( showTipOnStart() ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( showTipOnStart() ) );
}
// Note: We need this ActionManager to be fully constructed, and
// parent() to have a valid reference to it before the following
@@ -135,28 +135,28 @@ void ActionManager::init()
initActions();
// set up autoSaving stuff
- mAutoSaveTimer = new QTimer( this );
- connect( mAutoSaveTimer,SIGNAL( timeout() ), SLOT( checkAutoSave() ) );
+ mAutoSaveTimer = new TQTimer( this );
+ connect( mAutoSaveTimer,TQT_SIGNAL( timeout() ), TQT_SLOT( checkAutoSave() ) );
if ( KOPrefs::instance()->mAutoSave &&
KOPrefs::instance()->mAutoSaveInterval > 0 ) {
mAutoSaveTimer->start( 1000 * 60 * KOPrefs::instance()->mAutoSaveInterval );
}
- mAutoArchiveTimer = new QTimer( this );
- connect( mAutoArchiveTimer, SIGNAL( timeout() ), SLOT( slotAutoArchive() ) );
+ mAutoArchiveTimer = new TQTimer( this );
+ connect( mAutoArchiveTimer, TQT_SIGNAL( timeout() ), TQT_SLOT( slotAutoArchive() ) );
// First auto-archive should be in 5 minutes (like in kmail).
if ( KOPrefs::instance()->mAutoArchive )
mAutoArchiveTimer->start( 5 * 60 * 1000, true ); // singleshot
setTitle();
- connect( mCalendarView, SIGNAL( modifiedChanged( bool ) ), SLOT( setTitle() ) );
- connect( mCalendarView, SIGNAL( configChanged() ), SLOT( updateConfig() ) );
+ connect( mCalendarView, TQT_SIGNAL( modifiedChanged( bool ) ), TQT_SLOT( setTitle() ) );
+ connect( mCalendarView, TQT_SIGNAL( configChanged() ), TQT_SLOT( updateConfig() ) );
- connect( mCalendarView, SIGNAL( incidenceSelected( Incidence * ) ),
- this, SLOT( processIncidenceSelection( Incidence * ) ) );
- connect( mCalendarView, SIGNAL( exportHTML( HTMLExportSettings * ) ),
- this, SLOT( exportHTML( HTMLExportSettings * ) ) );
+ connect( mCalendarView, TQT_SIGNAL( incidenceSelected( Incidence * ) ),
+ this, TQT_SLOT( processIncidenceSelection( Incidence * ) ) );
+ connect( mCalendarView, TQT_SIGNAL( exportHTML( HTMLExportSettings * ) ),
+ this, TQT_SLOT( exportHTML( HTMLExportSettings * ) ) );
processIncidenceSelection( 0 );
@@ -196,13 +196,13 @@ void ActionManager::createCalendarResources()
mCalendarView->addExtension( &factory );
mResourceView = factory.resourceView();
- connect( mCalendarResources, SIGNAL( calendarChanged() ),
- mCalendarView, SLOT(resourcesChanged() ) );
- connect( mCalendarResources, SIGNAL( signalErrorMessage( const QString & ) ),
- mCalendarView, SLOT( showErrorMessage( const QString & ) ) );
+ connect( mCalendarResources, TQT_SIGNAL( calendarChanged() ),
+ mCalendarView, TQT_SLOT(resourcesChanged() ) );
+ connect( mCalendarResources, TQT_SIGNAL( signalErrorMessage( const TQString & ) ),
+ mCalendarView, TQT_SLOT( showErrorMessage( const TQString & ) ) );
- connect( mCalendarView, SIGNAL( configChanged() ),
- SLOT( updateConfig() ) );
+ connect( mCalendarView, TQT_SIGNAL( configChanged() ),
+ TQT_SLOT( updateConfig() ) );
initCalendar( mCalendarResources );
}
@@ -225,58 +225,58 @@ void ActionManager::initActions()
//~~~~~~~~~~~~~~~~~~~~~~~ LOADING / SAVING ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
if ( mIsPart ) {
if ( mMainWindow->hasDocument() ) {
- KStdAction::openNew( this, SLOT(file_new()), mACollection, "korganizer_openNew" );
- KStdAction::open( this, SLOT( file_open() ), mACollection, "korganizer_open" );
- mRecent = KStdAction::openRecent( this, SLOT( file_open( const KURL& ) ),
+ KStdAction::openNew( this, TQT_SLOT(file_new()), mACollection, "korganizer_openNew" );
+ KStdAction::open( this, TQT_SLOT( file_open() ), mACollection, "korganizer_open" );
+ mRecent = KStdAction::openRecent( this, TQT_SLOT( file_open( const KURL& ) ),
mACollection, "korganizer_openRecent" );
- KStdAction::revert( this,SLOT( file_revert() ), mACollection, "korganizer_revert" );
- KStdAction::saveAs( this, SLOT( file_saveas() ), mACollection,
+ KStdAction::revert( this,TQT_SLOT( file_revert() ), mACollection, "korganizer_revert" );
+ KStdAction::saveAs( this, TQT_SLOT( file_saveas() ), mACollection,
"korganizer_saveAs" );
- KStdAction::save( this, SLOT( file_save() ), mACollection, "korganizer_save" );
+ KStdAction::save( this, TQT_SLOT( file_save() ), mACollection, "korganizer_save" );
}
- KStdAction::print( mCalendarView, SLOT( print() ), mACollection, "korganizer_print" );
+ KStdAction::print( mCalendarView, TQT_SLOT( print() ), mACollection, "korganizer_print" );
} else {
- KStdAction::openNew( this, SLOT( file_new() ), mACollection );
- KStdAction::open( this, SLOT( file_open() ), mACollection );
- mRecent = KStdAction::openRecent( this, SLOT( file_open( const KURL& ) ),
+ KStdAction::openNew( this, TQT_SLOT( file_new() ), mACollection );
+ KStdAction::open( this, TQT_SLOT( file_open() ), mACollection );
+ mRecent = KStdAction::openRecent( this, TQT_SLOT( file_open( const KURL& ) ),
mACollection );
if ( mMainWindow->hasDocument() ) {
- KStdAction::revert( this,SLOT( file_revert() ), mACollection );
- KStdAction::save( this, SLOT( file_save() ), mACollection );
- KStdAction::saveAs( this, SLOT( file_saveas() ), mACollection );
+ KStdAction::revert( this,TQT_SLOT( file_revert() ), mACollection );
+ KStdAction::save( this, TQT_SLOT( file_save() ), mACollection );
+ KStdAction::saveAs( this, TQT_SLOT( file_saveas() ), mACollection );
}
- KStdAction::print( mCalendarView, SLOT( print() ), mACollection );
+ KStdAction::print( mCalendarView, TQT_SLOT( print() ), mACollection );
}
//~~~~~~~~~~~~~~~~~~~~~~~~ IMPORT / EXPORT ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- new KAction( i18n("Import &Calendar..."), 0, this, SLOT( file_merge() ),
+ new KAction( i18n("Import &Calendar..."), 0, this, TQT_SLOT( file_merge() ),
mACollection, "import_icalendar" );
- new KAction( i18n("&Import From UNIX Ical tool"), 0, this, SLOT( file_icalimport() ),
+ new KAction( i18n("&Import From UNIX Ical tool"), 0, this, TQT_SLOT( file_icalimport() ),
mACollection, "import_ical" );
new KAction( i18n("Get &Hot New Stuff..."), 0, this,
- SLOT( downloadNewStuff() ), mACollection,
+ TQT_SLOT( downloadNewStuff() ), mACollection,
"downloadnewstuff" );
new KAction( i18n("Export &Web Page..."), "webexport", 0,
- mCalendarView, SLOT( exportWeb() ),
+ mCalendarView, TQT_SLOT( exportWeb() ),
mACollection, "export_web" );
new KAction( i18n("&iCalendar..."), 0,
- mCalendarView, SLOT( exportICalendar() ),
+ mCalendarView, TQT_SLOT( exportICalendar() ),
mACollection, "export_icalendar" );
new KAction( i18n("&vCalendar..."), 0,
- mCalendarView, SLOT( exportVCalendar() ),
+ mCalendarView, TQT_SLOT( exportVCalendar() ),
mACollection, "export_vcalendar" );
new KAction( i18n("Upload &Hot New Stuff..."), 0, this,
- SLOT( uploadNewStuff() ), mACollection,
+ TQT_SLOT( uploadNewStuff() ), mACollection,
"uploadnewstuff" );
- new KAction( i18n("Archive O&ld Entries..."), 0, this, SLOT( file_archive() ),
+ new KAction( i18n("Archive O&ld Entries..."), 0, this, TQT_SLOT( file_archive() ),
mACollection, "file_archive" );
new KAction( i18n("delete completed to-dos", "Pur&ge Completed To-dos"), 0,
- mCalendarView, SLOT( purgeCompleted() ), mACollection,
+ mCalendarView, TQT_SLOT( purgeCompleted() ), mACollection,
"purge_completed" );
@@ -287,45 +287,45 @@ void ActionManager::initActions()
KOrg::History *h = mCalendarView->history();
if ( mIsPart ) {
// edit menu
- mCutAction = KStdAction::cut( mCalendarView, SLOT( edit_cut() ),
+ mCutAction = KStdAction::cut( mCalendarView, TQT_SLOT( edit_cut() ),
mACollection, "korganizer_cut" );
- mCopyAction = KStdAction::copy( mCalendarView, SLOT( edit_copy() ),
+ mCopyAction = KStdAction::copy( mCalendarView, TQT_SLOT( edit_copy() ),
mACollection, "korganizer_copy" );
- pasteAction = KStdAction::paste( mCalendarView, SLOT( edit_paste() ),
+ pasteAction = KStdAction::paste( mCalendarView, TQT_SLOT( edit_paste() ),
mACollection, "korganizer_paste" );
- mUndoAction = KStdAction::undo( h, SLOT( undo() ),
+ mUndoAction = KStdAction::undo( h, TQT_SLOT( undo() ),
mACollection, "korganizer_undo" );
- mRedoAction = KStdAction::redo( h, SLOT( redo() ),
+ mRedoAction = KStdAction::redo( h, TQT_SLOT( redo() ),
mACollection, "korganizer_redo" );
} else {
- mCutAction = KStdAction::cut( mCalendarView,SLOT( edit_cut() ),
+ mCutAction = KStdAction::cut( mCalendarView,TQT_SLOT( edit_cut() ),
mACollection );
- mCopyAction = KStdAction::copy( mCalendarView,SLOT( edit_copy() ),
+ mCopyAction = KStdAction::copy( mCalendarView,TQT_SLOT( edit_copy() ),
mACollection );
- pasteAction = KStdAction::paste( mCalendarView,SLOT( edit_paste() ),
+ pasteAction = KStdAction::paste( mCalendarView,TQT_SLOT( edit_paste() ),
mACollection );
- mUndoAction = KStdAction::undo( h, SLOT( undo() ), mACollection );
- mRedoAction = KStdAction::redo( h, SLOT( redo() ), mACollection );
+ mUndoAction = KStdAction::undo( h, TQT_SLOT( undo() ), mACollection );
+ mRedoAction = KStdAction::redo( h, TQT_SLOT( redo() ), mACollection );
}
mDeleteAction = new KAction( i18n("&Delete"), "editdelete", 0,
- mCalendarView, SLOT( appointment_delete() ),
+ mCalendarView, TQT_SLOT( appointment_delete() ),
mACollection, "edit_delete" );
if ( mIsPart ) {
- KStdAction::find( mCalendarView->dialogManager(), SLOT( showSearchDialog() ),
+ KStdAction::find( mCalendarView->dialogManager(), TQT_SLOT( showSearchDialog() ),
mACollection, "korganizer_find" );
} else {
- KStdAction::find( mCalendarView->dialogManager(), SLOT( showSearchDialog() ),
+ KStdAction::find( mCalendarView->dialogManager(), TQT_SLOT( showSearchDialog() ),
mACollection );
}
pasteAction->setEnabled( false );
mUndoAction->setEnabled( false );
mRedoAction->setEnabled( false );
- connect( mCalendarView, SIGNAL( pasteEnabled( bool ) ),
- pasteAction, SLOT( setEnabled( bool ) ) );
- connect( h, SIGNAL( undoAvailable( const QString & ) ),
- SLOT( updateUndoAction( const QString & ) ) );
- connect( h, SIGNAL( redoAvailable( const QString & ) ),
- SLOT( updateRedoAction( const QString & ) ) );
+ connect( mCalendarView, TQT_SIGNAL( pasteEnabled( bool ) ),
+ pasteAction, TQT_SLOT( setEnabled( bool ) ) );
+ connect( h, TQT_SIGNAL( undoAvailable( const TQString & ) ),
+ TQT_SLOT( updateUndoAction( const TQString & ) ) );
+ connect( h, TQT_SIGNAL( redoAvailable( const TQString & ) ),
+ TQT_SLOT( updateRedoAction( const TQString & ) ) );
@@ -335,83 +335,83 @@ void ActionManager::initActions()
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~ VIEWS ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
new KAction( i18n("What's &Next"),
KOGlobals::self()->smallIcon( "whatsnext" ), 0,
- mCalendarView->viewManager(), SLOT( showWhatsNextView() ),
+ mCalendarView->viewManager(), TQT_SLOT( showWhatsNextView() ),
mACollection, "view_whatsnext" );
new KAction( i18n("&Day"),
KOGlobals::self()->smallIcon( "1day" ), 0,
- mCalendarView->viewManager(), SLOT( showDayView() ),
+ mCalendarView->viewManager(), TQT_SLOT( showDayView() ),
mACollection, "view_day" );
mNextXDays = new KAction( "",
KOGlobals::self()->smallIcon( "xdays" ), 0,
mCalendarView->viewManager(),
- SLOT( showNextXView() ),
+ TQT_SLOT( showNextXView() ),
mACollection, "view_nextx" );
mNextXDays->setText( i18n( "&Next Day", "Ne&xt %n Days",
KOPrefs::instance()->mNextXDays ) );
new KAction( i18n("W&ork Week"),
KOGlobals::self()->smallIcon( "5days" ), 0,
- mCalendarView->viewManager(), SLOT( showWorkWeekView() ),
+ mCalendarView->viewManager(), TQT_SLOT( showWorkWeekView() ),
mACollection, "view_workweek" );
new KAction( i18n("&Week"),
KOGlobals::self()->smallIcon( "7days" ), 0,
- mCalendarView->viewManager(), SLOT( showWeekView() ),
+ mCalendarView->viewManager(), TQT_SLOT( showWeekView() ),
mACollection, "view_week" );
new KAction( i18n("&Month"),
KOGlobals::self()->smallIcon( "month" ), 0,
- mCalendarView->viewManager(), SLOT( showMonthView() ),
+ mCalendarView->viewManager(), TQT_SLOT( showMonthView() ),
mACollection, "view_month" );
new KAction( i18n("&List"),
KOGlobals::self()->smallIcon( "list" ), 0,
- mCalendarView->viewManager(), SLOT( showListView() ),
+ mCalendarView->viewManager(), TQT_SLOT( showListView() ),
mACollection, "view_list" );
new KAction( i18n("&To-do List"),
KOGlobals::self()->smallIcon( "todo" ), 0,
- mCalendarView->viewManager(), SLOT( showTodoView() ),
+ mCalendarView->viewManager(), TQT_SLOT( showTodoView() ),
mACollection, "view_todo" );
new KAction( i18n("&Journal"),
KOGlobals::self()->smallIcon( "journal" ), 0,
- mCalendarView->viewManager(), SLOT( showJournalView() ),
+ mCalendarView->viewManager(), TQT_SLOT( showJournalView() ),
mACollection, "view_journal" );
new KAction( i18n("&Timeline View"),
KOGlobals::self()->smallIcon( "timeline" ), 0,
- mCalendarView->viewManager(), SLOT( showTimelineView() ),
+ mCalendarView->viewManager(), TQT_SLOT( showTimelineView() ),
mACollection, "view_timeline" );
//~~~~~~~~~~~~~~~~~~~~~~~~~~~ FILTERS ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
new KAction( i18n("&Refresh"), 0,
- mCalendarView, SLOT( updateView() ),
+ mCalendarView, TQT_SLOT( updateView() ),
mACollection, "update" );
// TODO:
// new KAction( i18n("Hide &Completed To-dos"), 0,
-// mCalendarView, SLOT( toggleHideCompleted() ),
+// mCalendarView, TQT_SLOT( toggleHideCompleted() ),
// mACollection, "hide_completed_todos" );
mFilterAction = new KSelectAction( i18n("F&ilter"), 0,
mACollection, "filter_select" );
mFilterAction->setEditable( false );
- connect( mFilterAction, SIGNAL( activated(int) ),
- mCalendarView, SLOT( filterActivated( int ) ) );
- connect( mCalendarView, SIGNAL( newFilterListSignal( const QStringList & ) ),
- mFilterAction, SLOT( setItems( const QStringList & ) ) );
- connect( mCalendarView, SIGNAL( selectFilterSignal( int ) ),
- mFilterAction, SLOT( setCurrentItem( int ) ) );
- connect( mCalendarView, SIGNAL( filterChanged() ),
- this, SLOT( setTitle() ) );
+ connect( mFilterAction, TQT_SIGNAL( activated(int) ),
+ mCalendarView, TQT_SLOT( filterActivated( int ) ) );
+ connect( mCalendarView, TQT_SIGNAL( newFilterListSignal( const TQStringList & ) ),
+ mFilterAction, TQT_SLOT( setItems( const TQStringList & ) ) );
+ connect( mCalendarView, TQT_SIGNAL( selectFilterSignal( int ) ),
+ mFilterAction, TQT_SLOT( setCurrentItem( int ) ) );
+ connect( mCalendarView, TQT_SIGNAL( filterChanged() ),
+ this, TQT_SLOT( setTitle() ) );
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ZOOM ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// TODO: try to find / create better icons for the following 4 actions
new KAction( i18n( "Zoom In Horizontally" ), "viewmag+", 0,
- mCalendarView->viewManager(), SLOT( zoomInHorizontally() ),
+ mCalendarView->viewManager(), TQT_SLOT( zoomInHorizontally() ),
mACollection, "zoom_in_horizontally" );
new KAction( i18n( "Zoom Out Horizontally" ), "viewmag-", 0,
- mCalendarView->viewManager(), SLOT( zoomOutHorizontally() ),
+ mCalendarView->viewManager(), TQT_SLOT( zoomOutHorizontally() ),
mACollection, "zoom_out_horizontally" );
new KAction( i18n( "Zoom In Vertically" ), "viewmag+", 0,
- mCalendarView->viewManager(), SLOT( zoomInVertically() ),
+ mCalendarView->viewManager(), TQT_SLOT( zoomInVertically() ),
mACollection, "zoom_in_vertically" );
new KAction( i18n( "Zoom Out Vertically" ), "viewmag-", 0,
- mCalendarView->viewManager(), SLOT( zoomOutVertically() ),
+ mCalendarView->viewManager(), TQT_SLOT( zoomOutVertically() ),
mACollection, "zoom_out_vertically" );
@@ -420,73 +420,73 @@ void ActionManager::initActions()
//************************** Actions MENU *********************************
new KAction( i18n("Go to &Today"), "today", 0,
- mCalendarView,SLOT( goToday() ),
+ mCalendarView,TQT_SLOT( goToday() ),
mACollection, "go_today" );
- bool isRTL = QApplication::reverseLayout();
+ bool isRTL = TQApplication::reverseLayout();
action = new KAction( i18n("Go &Backward"), isRTL ? "forward" : "back", 0,
- mCalendarView,SLOT( goPrevious() ),
+ mCalendarView,TQT_SLOT( goPrevious() ),
mACollection, "go_previous" );
// Changing the action text by setText makes the toolbar button disappear.
// This has to be fixed first, before the connects below can be reenabled.
/*
- connect( mCalendarView, SIGNAL( changeNavStringPrev( const QString & ) ),
- action, SLOT( setText( const QString & ) ) );
- connect( mCalendarView, SIGNAL( changeNavStringPrev( const QString & ) ),
- this, SLOT( dumpText( const QString & ) ) );*/
+ connect( mCalendarView, TQT_SIGNAL( changeNavStringPrev( const TQString & ) ),
+ action, TQT_SLOT( setText( const TQString & ) ) );
+ connect( mCalendarView, TQT_SIGNAL( changeNavStringPrev( const TQString & ) ),
+ this, TQT_SLOT( dumpText( const TQString & ) ) );*/
action = new KAction( i18n("Go &Forward"), isRTL ? "back" : "forward", 0,
- mCalendarView,SLOT( goNext() ),
+ mCalendarView,TQT_SLOT( goNext() ),
mACollection, "go_next" );
/*
- connect( mCalendarView,SIGNAL( changeNavStringNext( const QString & ) ),
- action,SLOT( setText( const QString & ) ) );
+ connect( mCalendarView,TQT_SIGNAL( changeNavStringNext( const TQString & ) ),
+ action,TQT_SLOT( setText( const TQString & ) ) );
*/
//************************** Actions MENU *********************************
new KAction( i18n("New E&vent..."),
KOGlobals::self()->smallIcon( "newappointment" ), 0,
- mCalendarView, SLOT( newEvent() ),
+ mCalendarView, TQT_SLOT( newEvent() ),
mACollection, "new_event" );
new KAction( i18n("New &To-do..."),
KOGlobals::self()->smallIcon( "newtodo" ), 0,
- mCalendarView, SLOT( newTodo() ),
+ mCalendarView, TQT_SLOT( newTodo() ),
mACollection, "new_todo" );
action = new KAction( i18n("New Su&b-to-do..."), 0,
- mCalendarView,SLOT( newSubTodo() ),
+ mCalendarView,TQT_SLOT( newSubTodo() ),
mACollection, "new_subtodo" );
action->setEnabled( false );
- connect( mCalendarView,SIGNAL( todoSelected( bool ) ),
- action,SLOT( setEnabled( bool ) ) );
+ connect( mCalendarView,TQT_SIGNAL( todoSelected( bool ) ),
+ action,TQT_SLOT( setEnabled( bool ) ) );
new KAction( i18n("New &Journal..."),
KOGlobals::self()->smallIcon( "newjournal" ), 0,
- mCalendarView, SLOT( newJournal() ),
+ mCalendarView, TQT_SLOT( newJournal() ),
mACollection, "new_journal" );
mShowIncidenceAction = new KAction( i18n("&Show"), 0,
- mCalendarView,SLOT( showIncidence() ),
+ mCalendarView,TQT_SLOT( showIncidence() ),
mACollection, "show_incidence" );
mEditIncidenceAction = new KAction( i18n("&Edit..."), 0,
- mCalendarView,SLOT( editIncidence() ),
+ mCalendarView,TQT_SLOT( editIncidence() ),
mACollection, "edit_incidence" );
mDeleteIncidenceAction = new KAction( i18n("&Delete"), Key_Delete,
- mCalendarView,SLOT( deleteIncidence()),
+ mCalendarView,TQT_SLOT( deleteIncidence()),
mACollection, "delete_incidence" );
action = new KAction( i18n("&Make Sub-to-do Independent"), 0,
- mCalendarView,SLOT( todo_unsub() ),
+ mCalendarView,TQT_SLOT( todo_unsub() ),
mACollection, "unsub_todo" );
action->setEnabled( false );
- connect( mCalendarView,SIGNAL( subtodoSelected( bool ) ),
- action,SLOT( setEnabled( bool ) ) );
+ connect( mCalendarView,TQT_SIGNAL( subtodoSelected( bool ) ),
+ action,TQT_SLOT( setEnabled( bool ) ) );
// TODO: Add item to move the incidence to different resource
// mAssignResourceAction = new KAction( i18n("Assign &Resource..."), 0,
-// mCalendarView, SLOT( assignResource()),
+// mCalendarView, TQT_SLOT( assignResource()),
// mACollection, "assign_resource" );
// TODO: Add item to quickly toggle the reminder of a given incidence
// mToggleAlarmAction = new KToggleAction( i18n("&Activate Reminder"), 0,
-// mCalendarView, SLOT( toggleAlarm()),
+// mCalendarView, TQT_SLOT( toggleAlarm()),
// mACollection, "activate_alarm" );
@@ -494,63 +494,63 @@ void ActionManager::initActions()
//************************** SCHEDULE MENU ********************************
mPublishEvent = new KAction( i18n("&Publish Item Information..."), "mail_send", 0,
- mCalendarView, SLOT( schedule_publish() ),
+ mCalendarView, TQT_SLOT( schedule_publish() ),
mACollection, "schedule_publish" );
mPublishEvent->setEnabled( false );
action = new KAction( i18n("Send &Invitation to Attendees"),"mail_generic",0,
- mCalendarView,SLOT( schedule_request() ),
+ mCalendarView,TQT_SLOT( schedule_request() ),
mACollection,"schedule_request" );
action->setEnabled( false );
- connect( mCalendarView, SIGNAL( organizerEventsSelected( bool ) ),
- action, SLOT( setEnabled( bool ) ) );
+ connect( mCalendarView, TQT_SIGNAL( organizerEventsSelected( bool ) ),
+ action, TQT_SLOT( setEnabled( bool ) ) );
action = new KAction( i18n("Re&quest Update"), 0,
- mCalendarView, SLOT( schedule_refresh() ),
+ mCalendarView, TQT_SLOT( schedule_refresh() ),
mACollection, "schedule_refresh" );
action->setEnabled( false );
- connect( mCalendarView,SIGNAL( groupEventsSelected( bool ) ),
- action,SLOT( setEnabled( bool ) ) );
+ connect( mCalendarView,TQT_SIGNAL( groupEventsSelected( bool ) ),
+ action,TQT_SLOT( setEnabled( bool ) ) );
action = new KAction( i18n("Send &Cancelation to Attendees"), 0,
- mCalendarView, SLOT( schedule_cancel() ),
+ mCalendarView, TQT_SLOT( schedule_cancel() ),
mACollection, "schedule_cancel" );
action->setEnabled( false );
- connect( mCalendarView,SIGNAL( organizerEventsSelected( bool ) ),
- action,SLOT( setEnabled( bool ) ) );
+ connect( mCalendarView,TQT_SIGNAL( organizerEventsSelected( bool ) ),
+ action,TQT_SLOT( setEnabled( bool ) ) );
action = new KAction( i18n("Send Status &Update"),"mail_reply",0,
- mCalendarView,SLOT( schedule_reply() ),
+ mCalendarView,TQT_SLOT( schedule_reply() ),
mACollection,"schedule_reply" );
action->setEnabled( false );
- connect( mCalendarView,SIGNAL( groupEventsSelected( bool ) ),
- action,SLOT( setEnabled( bool ) ) );
+ connect( mCalendarView,TQT_SIGNAL( groupEventsSelected( bool ) ),
+ action,TQT_SLOT( setEnabled( bool ) ) );
action = new KAction( i18n("counter proposal","Request Chan&ge"),0,
- mCalendarView,SLOT( schedule_counter() ),
+ mCalendarView,TQT_SLOT( schedule_counter() ),
mACollection, "schedule_counter" );
action->setEnabled( false );
- connect( mCalendarView,SIGNAL( groupEventsSelected( bool ) ),
- action,SLOT( setEnabled( bool ) ) );
+ connect( mCalendarView,TQT_SIGNAL( groupEventsSelected( bool ) ),
+ action,TQT_SLOT( setEnabled( bool ) ) );
mForwardEvent = new KAction( i18n("&Send as iCalendar..."), "mail_forward", 0,
- mCalendarView, SLOT(schedule_forward()),
+ mCalendarView, TQT_SLOT(schedule_forward()),
mACollection, "schedule_forward" );
mForwardEvent->setEnabled( false );
action = new KAction( i18n("&Mail Free Busy Information..."), 0,
- mCalendarView, SLOT( mailFreeBusy() ),
+ mCalendarView, TQT_SLOT( mailFreeBusy() ),
mACollection, "mail_freebusy" );
action->setEnabled( true );
action = new KAction( i18n("&Upload Free Busy Information"), 0,
- mCalendarView, SLOT( uploadFreeBusy() ),
+ mCalendarView, TQT_SLOT( uploadFreeBusy() ),
mACollection, "upload_freebusy" );
action->setEnabled( true );
if ( !mIsPart ) {
action = new KAction( i18n("&Addressbook"),"contents",0,
- mCalendarView,SLOT( openAddressbook() ),
+ mCalendarView,TQT_SLOT( openAddressbook() ),
mACollection,"addressbook" );
}
@@ -561,13 +561,13 @@ void ActionManager::initActions()
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~ SIDEBAR ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
mDateNavigatorShowAction = new KToggleAction( i18n("Show Date Navigator"), 0,
- this, SLOT( toggleDateNavigator() ),
+ this, TQT_SLOT( toggleDateNavigator() ),
mACollection, "show_datenavigator" );
mTodoViewShowAction = new KToggleAction ( i18n("Show To-do View"), 0,
- this, SLOT( toggleTodoView() ),
+ this, TQT_SLOT( toggleTodoView() ),
mACollection, "show_todoview" );
mEventViewerShowAction = new KToggleAction ( i18n("Show Item Viewer"), 0,
- this, SLOT( toggleEventViewer() ),
+ this, TQT_SLOT( toggleEventViewer() ),
mACollection, "show_eventviewer" );
KConfig *config = KOGlobals::self()->config();
config->setGroup( "Settings" );
@@ -586,10 +586,10 @@ void ActionManager::initActions()
if ( !mMainWindow->hasDocument() ) {
mResourceViewShowAction = new KToggleAction ( i18n("Show Resource View"), 0,
- this, SLOT( toggleResourceView() ),
+ this, TQT_SLOT( toggleResourceView() ),
mACollection, "show_resourceview" );
mResourceButtonsAction = new KToggleAction( i18n("Show &Resource Buttons"), 0,
- this, SLOT( toggleResourceButtons() ),
+ this, TQT_SLOT( toggleResourceButtons() ),
mACollection, "show_resourcebuttons" );
mResourceViewShowAction->setChecked(
config->readBoolEntry( "ResourceViewVisible", true ) );
@@ -604,45 +604,45 @@ void ActionManager::initActions()
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~ SIDEBAR ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
new KAction( i18n("Configure &Date && Time..."), 0,
- this, SLOT( configureDateTime() ),
+ this, TQT_SLOT( configureDateTime() ),
mACollection, "conf_datetime" );
// TODO: Add an item to show the resource management dlg
// new KAction( i18n("Manage &Resources..."), 0,
-// this, SLOT( manageResources() ),
+// this, TQT_SLOT( manageResources() ),
// mACollection, "conf_resources" );
new KAction( i18n("Manage View &Filters..."), "configure", 0,
- mCalendarView, SLOT( editFilters() ),
+ mCalendarView, TQT_SLOT( editFilters() ),
mACollection, "edit_filters" );
new KAction( i18n("Manage C&ategories..."), 0,
- mCalendarView->dialogManager(), SLOT( showCategoryEditDialog() ),
+ mCalendarView->dialogManager(), TQT_SLOT( showCategoryEditDialog() ),
mACollection, "edit_categories" );
if ( mIsPart ) {
new KAction( i18n("&Configure Calendar..."), "configure", 0,
- mCalendarView, SLOT( edit_options() ),
+ mCalendarView, TQT_SLOT( edit_options() ),
mACollection, "korganizer_configure" );
- KStdAction::keyBindings( this, SLOT( keyBindings() ),
+ KStdAction::keyBindings( this, TQT_SLOT( keyBindings() ),
mACollection, "korganizer_configure_shortcuts" );
} else {
- KStdAction::preferences( mCalendarView, SLOT( edit_options() ),
+ KStdAction::preferences( mCalendarView, TQT_SLOT( edit_options() ),
mACollection );
- KStdAction::keyBindings( this, SLOT( keyBindings() ), mACollection );
+ KStdAction::keyBindings( this, TQT_SLOT( keyBindings() ), mACollection );
}
//**************************** HELP MENU **********************************
- KStdAction::tipOfDay( this, SLOT( showTip() ), mACollection,
+ KStdAction::tipOfDay( this, TQT_SLOT( showTip() ), mACollection,
"help_tipofday" );
// new KAction( i18n("Show Intro Page"), 0,
-// mCalendarView,SLOT( showIntro() ),
+// mCalendarView,TQT_SLOT( showIntro() ),
// mACollection,"show_intro" );
//************************* TOOLBAR ACTIONS *******************************
- QLabel *filterLabel = new QLabel( i18n("Filter: "), mCalendarView );
+ TQLabel *filterLabel = new TQLabel( i18n("Filter: "), mCalendarView );
filterLabel->hide();
new KWidgetAction( filterLabel, i18n("Filter: "), 0, 0, 0,
mACollection, "filter_label" );
@@ -705,7 +705,7 @@ void ActionManager::file_new()
void ActionManager::file_open()
{
KURL url;
- QString defaultPath = locateLocal( "data","korganizer/" );
+ TQString defaultPath = locateLocal( "data","korganizer/" );
url = KFileDialog::getOpenURL( defaultPath,i18n("*.vcs *.ics|Calendar Files"),
dialogParent() );
@@ -738,12 +738,12 @@ void ActionManager::file_icalimport()
// FIXME: eventually, we will need a dialog box to select import type, etc.
// for now, hard-coded to ical file, $HOME/.calendar.
int retVal = -1;
- QString progPath;
+ TQString progPath;
KTempFile tmpfn;
- QString homeDir = QDir::homeDirPath() + QString::fromLatin1( "/.calendar" );
+ TQString homeDir = TQDir::homeDirPath() + TQString::fromLatin1( "/.calendar" );
- if ( !QFile::exists( homeDir ) ) {
+ if ( !TQFile::exists( homeDir ) ) {
KMessageBox::error( dialogParent(),
i18n( "You have no ical file in your home directory.\n"
"Import cannot proceed.\n" ) );
@@ -878,7 +878,7 @@ bool ActionManager::openURL( const KURL &url,bool merge )
}
setTitle();
} else {
- QString tmpFile;
+ TQString tmpFile;
if( KIO::NetAccess::download( url, tmpFile, view() ) ) {
kdDebug(5850) << "--- Downloaded to " << tmpFile << endl;
bool success = mCalendarView->openCalendar( tmpFile, merge );
@@ -901,7 +901,7 @@ bool ActionManager::openURL( const KURL &url,bool merge )
}
return success;
} else {
- QString msg;
+ TQString msg;
msg = i18n("Cannot download calendar from '%1'.").arg( url.prettyURL() );
KMessageBox::error( dialogParent(), msg );
return false;
@@ -918,7 +918,7 @@ bool ActionManager::addResource( const KURL &mUrl )
ResourceCalendar *resource = 0;
- QString name;
+ TQString name;
kdDebug(5850) << "URL: " << mUrl << endl;
if ( mUrl.isLocalFile() ) {
@@ -948,7 +948,7 @@ bool ActionManager::addResource( const KURL &mUrl )
if ( mCalendarResources )
mCalendarResources->resourceAdded( resource );
} else {
- QString msg = i18n("Unable to create calendar resource '%1'.")
+ TQString msg = i18n("Unable to create calendar resource '%1'.")
.arg( name );
KMessageBox::error( dialogParent(), msg );
}
@@ -976,7 +976,7 @@ void ActionManager::closeURL()
bool ActionManager::saveURL()
{
- QString ext;
+ TQString ext;
if ( mURL.isLocalFile() ) {
ext = mFile.right( 4 );
@@ -993,7 +993,7 @@ bool ActionManager::saveURL()
true );
if ( result != KMessageBox::Continue ) return false;
- QString filename = mURL.fileName();
+ TQString filename = mURL.fileName();
filename.replace( filename.length() - 4, 4, ".ics" );
mURL.setFileName( filename );
if ( mURL.isLocalFile() ) {
@@ -1013,7 +1013,7 @@ bool ActionManager::saveURL()
if ( !mURL.isLocalFile() ) {
if ( !KIO::NetAccess::upload( mFile, mURL, view() ) ) {
- QString msg = i18n("Cannot upload calendar to '%1'")
+ TQString msg = i18n("Cannot upload calendar to '%1'")
.arg( mURL.prettyURL() );
KMessageBox::error( dialogParent() ,msg );
return false;
@@ -1038,10 +1038,10 @@ void ActionManager::exportHTML()
// seem to load the config theirselves
settings.readConfig();
- QDate qd1;
- qd1 = QDate::currentDate();
- QDate qd2;
- qd2 = QDate::currentDate();
+ TQDate qd1;
+ qd1 = TQDate::currentDate();
+ TQDate qd2;
+ qd2 = TQDate::currentDate();
if ( settings.monthView() )
qd2.addMonths( 1 );
else
@@ -1063,12 +1063,12 @@ void ActionManager::exportHTML( HTMLExportSettings *settings )
KCal::HtmlExport mExport( mCalendarView->calendar(), settings );
- QDate cdate = settings->dateStart().date();
- QDate qd2 = settings->dateEnd().date();
+ TQDate cdate = settings->dateStart().date();
+ TQDate qd2 = settings->dateEnd().date();
while ( cdate <= qd2 ) {
- QStringList holidays = KOGlobals::self()->holiday( cdate );
+ TQStringList holidays = KOGlobals::self()->holiday( cdate );
if ( !holidays.isEmpty() ) {
- QStringList::ConstIterator it = holidays.begin();
+ TQStringList::ConstIterator it = holidays.begin();
for ( ; it != holidays.end(); ++it ) {
mExport.addHoliday( cdate, *it );
}
@@ -1081,7 +1081,7 @@ void ActionManager::exportHTML( HTMLExportSettings *settings )
mExport.save( dest.path() );
} else {
KTempFile tf;
- QString tfile = tf.name();
+ TQString tfile = tf.name();
tf.close();
mExport.save( tfile );
if ( !KIO::NetAccess::upload( tfile, dest, view() ) ) {
@@ -1105,7 +1105,7 @@ bool ActionManager::saveAsURL( const KURL &url )
return false;
}
- QString fileOrig = mFile;
+ TQString fileOrig = mFile;
KURL URLOrig = mURL;
KTempFile *tempFile = 0;
@@ -1153,7 +1153,7 @@ bool ActionManager::saveModifiedURL()
int result = KMessageBox::warningYesNoCancel(
dialogParent(),
i18n("The calendar has been modified.\nDo you want to save it?"),
- QString::null,
+ TQString::null,
KStdGuiItem::save(), KStdGuiItem::discard() );
switch( result ) {
case KMessageBox::Yes:
@@ -1184,9 +1184,9 @@ KURL ActionManager::getSaveURL()
if ( url.isEmpty() ) return url;
- QString filename = url.fileName( false );
+ TQString filename = url.fileName( false );
- QString e = filename.right( 4 );
+ TQString e = filename.right( 4 );
if ( e != ".vcs" && e != ".ics" ) {
// Default save format is iCalendar
filename += ".ics";
@@ -1215,7 +1215,7 @@ void ActionManager::readProperties( KConfig *config )
bool isResourceCalendar(
config->readBoolEntry( "UseResourceCalendar", true ) );
- QString calendarUrl = config->readPathEntry( "Calendar" );
+ TQString calendarUrl = config->readPathEntry( "Calendar" );
if ( !isResourceCalendar && !calendarUrl.isEmpty() ) {
mMainWindow->init( true );
@@ -1284,8 +1284,8 @@ void ActionManager::configureDateTime()
KProcess *proc = new KProcess;
*proc << "kcmshell" << "language";
- connect( proc,SIGNAL( processExited( KProcess * ) ),
- SLOT( configureDateTimeFinished( KProcess * ) ) );
+ connect( proc,TQT_SIGNAL( processExited( KProcess * ) ),
+ TQT_SLOT( configureDateTimeFinished( KProcess * ) ) );
if ( !proc->start() ) {
KMessageBox::sorry( dialogParent(),
@@ -1296,7 +1296,7 @@ void ActionManager::configureDateTime()
void ActionManager::showTip()
{
- KTipDialog::showTip( dialogParent(),QString::null,true );
+ KTipDialog::showTip( dialogParent(),TQString::null,true );
}
void ActionManager::showTipOnStart()
@@ -1314,7 +1314,7 @@ KOrg::MainWindow *ActionManager::findInstance( const KURL &url )
}
}
-void ActionManager::dumpText( const QString &str )
+void ActionManager::dumpText( const TQString &str )
{
kdDebug(5850) << "ActionManager::dumpText(): " << str << endl;
}
@@ -1356,37 +1356,37 @@ void ActionManager::toggleResourceButtons()
if ( mResourceView ) mResourceView->showButtons( visible );
}
-bool ActionManager::openURL( const QString &url )
+bool ActionManager::openURL( const TQString &url )
{
return openURL( KURL( url ) );
}
-bool ActionManager::mergeURL( const QString &url )
+bool ActionManager::mergeURL( const TQString &url )
{
return openURL( KURL( url ),true );
}
-bool ActionManager::saveAsURL( const QString &url )
+bool ActionManager::saveAsURL( const TQString &url )
{
return saveAsURL( KURL( url ) );
}
-QString ActionManager::getCurrentURLasString() const
+TQString ActionManager::getCurrentURLasString() const
{
return mURL.url();
}
-bool ActionManager::editIncidence( const QString& uid )
+bool ActionManager::editIncidence( const TQString& uid )
{
return mCalendarView->editIncidence( uid );
}
-bool ActionManager::deleteIncidence( const QString& uid, bool force )
+bool ActionManager::deleteIncidence( const TQString& uid, bool force )
{
return mCalendarView->deleteIncidence( uid, force );
}
-bool ActionManager::addIncidence( const QString& ical )
+bool ActionManager::addIncidence( const TQString& ical )
{
return mCalendarView->addIncidence( ical );
}
@@ -1410,7 +1410,7 @@ void ActionManager::uploadNewStuff()
mNewStuff->upload();
}
-QString ActionManager::localFileName()
+TQString ActionManager::localFileName()
{
return mFile;
}
@@ -1515,9 +1515,9 @@ void ActionManager::setTitle()
mMainWindow->setTitle();
}
-KCalendarIface::ResourceRequestReply ActionManager::resourceRequest( const QValueList<QPair<QDateTime, QDateTime> >&,
- const QCString& resource,
- const QString& vCalIn )
+KCalendarIface::ResourceRequestReply ActionManager::resourceRequest( const TQValueList<QPair<TQDateTime, TQDateTime> >&,
+ const TQCString& resource,
+ const TQString& vCalIn )
{
kdDebug(5850) << k_funcinfo << "resource=" << resource << " vCalIn=" << vCalIn << endl;
KCalendarIface::ResourceRequestReply reply;
@@ -1525,32 +1525,32 @@ KCalendarIface::ResourceRequestReply ActionManager::resourceRequest( const QValu
return reply;
}
-void ActionManager::openEventEditor( const QString& text )
+void ActionManager::openEventEditor( const TQString& text )
{
mCalendarView->newEvent( text );
}
-void ActionManager::openEventEditor( const QString& summary,
- const QString& description,
- const QString& attachment )
+void ActionManager::openEventEditor( const TQString& summary,
+ const TQString& description,
+ const TQString& attachment )
{
mCalendarView->newEvent( summary, description, attachment );
}
-void ActionManager::openEventEditor( const QString& summary,
- const QString& description,
- const QString& attachment,
- const QStringList& attendees )
+void ActionManager::openEventEditor( const TQString& summary,
+ const TQString& description,
+ const TQString& attachment,
+ const TQStringList& attendees )
{
mCalendarView->newEvent( summary, description, attachment, attendees );
}
-void ActionManager::openEventEditor( const QString & summary,
- const QString & description,
- const QString & uri,
- const QString & file,
- const QStringList & attendees,
- const QString & attachmentMimetype )
+void ActionManager::openEventEditor( const TQString & summary,
+ const TQString & description,
+ const TQString & uri,
+ const TQString & file,
+ const TQStringList & attendees,
+ const TQString & attachmentMimetype )
{
int action = KOPrefs::instance()->defaultEmailAttachMethod();
if ( attachmentMimetype != "message/rfc822" ) {
@@ -1562,11 +1562,11 @@ void ActionManager::openEventEditor( const QString & summary,
menu->insertItem( i18n("Attach inline &without attachments"), KOPrefs::InlineBody );
menu->insertSeparator();
menu->insertItem( SmallIcon("cancel"), i18n("C&ancel"), KOPrefs::Ask );
- action = menu->exec( QCursor::pos(), 0 );
+ action = menu->exec( TQCursor::pos(), 0 );
delete menu;
}
- QString attData;
+ TQString attData;
KTempFile tf;
tf.setAutoDelete( true );
switch ( action ) {
@@ -1580,12 +1580,12 @@ void ActionManager::openEventEditor( const QString & summary,
break;
case KOPrefs::InlineBody:
{
- QFile f( file );
+ TQFile f( file );
if ( !f.open( IO_ReadOnly ) )
return;
KMime::Message *msg = new KMime::Message();
- msg->setContent( QCString( f.readAll() ) );
- QCString head = msg->head();
+ msg->setContent( TQCString( f.readAll() ) );
+ TQCString head = msg->head();
msg->parse();
if ( msg == msg->textContent() || msg->textContent() == 0 ) { // no attachments
attData = file;
@@ -1603,7 +1603,7 @@ void ActionManager::openEventEditor( const QString & summary,
if ( head.find( "Content-Type:", begin, false ) != begin &&
head.find( "Content-Transfer-Encoding:", begin, false ) != begin &&
!(skipFolded && (head[begin] == ' ' || head[end] == '\t')) ) {
- QCString line = head.mid( begin, end - begin );
+ TQCString line = head.mid( begin, end - begin );
tf.file()->writeBlock( line.data(), line.length() );
tf.file()->writeBlock( "\n", 1 );
skipFolded = false;
@@ -1616,12 +1616,12 @@ void ActionManager::openEventEditor( const QString & summary,
if ( end < 0 && begin < (int)head.length() )
end = head.length() - 1;
}
- QCString cte = msg->textContent()->contentTransferEncoding()->as7BitString();
+ TQCString cte = msg->textContent()->contentTransferEncoding()->as7BitString();
if ( !cte.stripWhiteSpace().isEmpty() ) {
tf.file()->writeBlock( cte.data(), cte.length() );
tf.file()->writeBlock( "\n", 1 );
}
- QCString ct = msg->textContent()->contentType()->as7BitString();
+ TQCString ct = msg->textContent()->contentType()->as7BitString();
if ( !ct.stripWhiteSpace().isEmpty() )
tf.file()->writeBlock( ct.data(), ct.length() );
tf.file()->writeBlock( "\n", 1 );
@@ -1640,32 +1640,32 @@ void ActionManager::openEventEditor( const QString & summary,
mCalendarView->newEvent( summary, description, attData, attendees, attachmentMimetype, action != KOPrefs::Link );
}
-void ActionManager::openTodoEditor( const QString& text )
+void ActionManager::openTodoEditor( const TQString& text )
{
mCalendarView->newTodo( text );
}
-void ActionManager::openTodoEditor( const QString& summary,
- const QString& description,
- const QString& attachment )
+void ActionManager::openTodoEditor( const TQString& summary,
+ const TQString& description,
+ const TQString& attachment )
{
mCalendarView->newTodo( summary, description, attachment );
}
-void ActionManager::openTodoEditor( const QString& summary,
- const QString& description,
- const QString& attachment,
- const QStringList& attendees )
+void ActionManager::openTodoEditor( const TQString& summary,
+ const TQString& description,
+ const TQString& attachment,
+ const TQStringList& attendees )
{
mCalendarView->newTodo( summary, description, attachment, attendees );
}
-void ActionManager::openTodoEditor(const QString & summary,
- const QString & description,
- const QString & uri,
- const QString & file,
- const QStringList & attendees,
- const QString & attachmentMimetype)
+void ActionManager::openTodoEditor(const TQString & summary,
+ const TQString & description,
+ const TQString & uri,
+ const TQString & file,
+ const TQStringList & attendees,
+ const TQString & attachmentMimetype)
{
int action = KOPrefs::instance()->defaultTodoAttachMethod();
if ( attachmentMimetype != "message/rfc822" ) {
@@ -1676,11 +1676,11 @@ void ActionManager::openTodoEditor(const QString & summary,
menu->insertItem( i18n("Attach &inline"), KOPrefs::TodoAttachInlineFull );
menu->insertSeparator();
menu->insertItem( SmallIcon("cancel"), i18n("C&ancel"), KOPrefs::TodoAttachAsk );
- action = menu->exec( QCursor::pos(), 0 );
+ action = menu->exec( TQCursor::pos(), 0 );
delete menu;
}
- QString attData;
+ TQString attData;
switch ( action ) {
case KOPrefs::TodoAttachAsk:
return;
@@ -1698,25 +1698,25 @@ void ActionManager::openTodoEditor(const QString & summary,
mCalendarView->newTodo( summary, description, attData, attendees, attachmentMimetype, action != KOPrefs::Link );
}
-void ActionManager::openJournalEditor( const QDate& date )
+void ActionManager::openJournalEditor( const TQDate& date )
{
mCalendarView->newJournal( date );
}
-void ActionManager::openJournalEditor( const QString& text, const QDate& date )
+void ActionManager::openJournalEditor( const TQString& text, const TQDate& date )
{
mCalendarView->newJournal( text, date );
}
-void ActionManager::openJournalEditor( const QString& text )
+void ActionManager::openJournalEditor( const TQString& text )
{
mCalendarView->newJournal( text );
}
//TODO:
-// void ActionManager::openJournalEditor( const QString& summary,
-// const QString& description,
-// const QString& attachment )
+// void ActionManager::openJournalEditor( const TQString& summary,
+// const TQString& description,
+// const TQString& attachment )
// {
// mCalendarView->newJournal( summary, description, attachment );
// }
@@ -1737,23 +1737,23 @@ void ActionManager::showEventView()
mCalendarView->viewManager()->showEventView();
}
-void ActionManager::goDate( const QDate& date )
+void ActionManager::goDate( const TQDate& date )
{
mCalendarView->goDate( date );
}
-void ActionManager::goDate( const QString& date )
+void ActionManager::goDate( const TQString& date )
{
goDate( KGlobal::locale()->readDate( date ) );
}
-void ActionManager::showDate(const QDate & date)
+void ActionManager::showDate(const TQDate & date)
{
mCalendarView->showDate( date );
}
-void ActionManager::updateUndoAction( const QString &text )
+void ActionManager::updateUndoAction( const TQString &text )
{
if ( text.isNull() ) {
mUndoAction->setEnabled( false );
@@ -1765,7 +1765,7 @@ void ActionManager::updateUndoAction( const QString &text )
}
}
-void ActionManager::updateRedoAction( const QString &text )
+void ActionManager::updateRedoAction( const TQString &text )
{
if ( text.isNull() ) {
mRedoAction->setEnabled( false );
@@ -1785,12 +1785,12 @@ bool ActionManager::queryClose()
if ( mCalendar && mCalendar->isModified() ) {
int res = KMessageBox::questionYesNoCancel( dialogParent(),
- i18n("The calendar contains unsaved changes. Do you want to save them before exiting?"), QString::null, KStdGuiItem::save(), KStdGuiItem::discard() );
+ i18n("The calendar contains unsaved changes. Do you want to save them before exiting?"), TQString::null, KStdGuiItem::save(), KStdGuiItem::discard() );
// Exit on yes and no, don't exit on cancel. If saving fails, ask for exiting.
if ( res == KMessageBox::Yes ) {
close = saveModifiedURL();
if ( !close ) {
- int res1 = KMessageBox::questionYesNo( dialogParent(), i18n("Unable to save the calendar. Do you still want to close this window?"), QString::null, KStdGuiItem::close(), KStdGuiItem::cancel() );
+ int res1 = KMessageBox::questionYesNo( dialogParent(), i18n("Unable to save the calendar. Do you still want to close this window?"), TQString::null, KStdGuiItem::close(), KStdGuiItem::cancel() );
close = ( res1 == KMessageBox::Yes );
}
} else {
@@ -1804,8 +1804,8 @@ bool ActionManager::queryClose()
// FIXME: Put main window into a state indicating final saving.
mIsClosing = true;
// FIXME: Close main window when save is finished
-// connect( mCalendarResources, SIGNAL( calendarSaved() ),
-// mMainWindow, SLOT( close() ) );
+// connect( mCalendarResources, TQT_SIGNAL( calendarSaved() ),
+// mMainWindow, TQT_SLOT( close() ) );
}
if ( mCalendarResources->isSaving() ) {
kdDebug(5850) << "ActionManager::queryClose(): isSaving" << endl;
@@ -1830,7 +1830,7 @@ void ActionManager::saveCalendar()
if ( !url().isEmpty() ) {
saveURL();
} else {
- QString location = locateLocal( "data", "korganizer/kontact.ics" );
+ TQString location = locateLocal( "data", "korganizer/kontact.ics" );
saveAsURL( location );
}
}
@@ -1870,14 +1870,14 @@ void ActionManager::importCalendar( const KURL &url )
ImportDialog *dialog;
dialog = new ImportDialog( url, mMainWindow->topLevelWidget() );
- connect( dialog, SIGNAL( dialogFinished( ImportDialog * ) ),
- SLOT( slotImportDialogFinished( ImportDialog * ) ) );
- connect( dialog, SIGNAL( openURL( const KURL &, bool ) ),
- SLOT( openURL( const KURL &, bool ) ) );
- connect( dialog, SIGNAL( newWindow( const KURL & ) ),
- SIGNAL( actionNew( const KURL & ) ) );
- connect( dialog, SIGNAL( addResource( const KURL & ) ),
- SLOT( addResource( const KURL & ) ) );
+ connect( dialog, TQT_SIGNAL( dialogFinished( ImportDialog * ) ),
+ TQT_SLOT( slotImportDialogFinished( ImportDialog * ) ) );
+ connect( dialog, TQT_SIGNAL( openURL( const KURL &, bool ) ),
+ TQT_SLOT( openURL( const KURL &, bool ) ) );
+ connect( dialog, TQT_SIGNAL( newWindow( const KURL & ) ),
+ TQT_SIGNAL( actionNew( const KURL & ) ) );
+ connect( dialog, TQT_SIGNAL( addResource( const KURL & ) ),
+ TQT_SLOT( addResource( const KURL & ) ) );
dialog->show();
}
@@ -1902,23 +1902,23 @@ void ActionManager::slotAutoArchive()
return;
mAutoArchiveTimer->stop();
EventArchiver archiver;
- connect( &archiver, SIGNAL( eventsDeleted() ), mCalendarView, SLOT( updateView() ) );
+ connect( &archiver, TQT_SIGNAL( eventsDeleted() ), mCalendarView, TQT_SLOT( updateView() ) );
archiver.runAuto( mCalendarView->calendar(), mCalendarView, false /*no gui*/ );
// restart timer with the correct delay ( especially useful for the first time )
slotAutoArchivingSettingsModified();
}
-void ActionManager::loadProfile( const QString & path )
+void ActionManager::loadProfile( const TQString & path )
{
KOPrefs::instance()->writeConfig();
KConfig* const cfg = KOPrefs::instance()->config();
const KConfig profile( path+"/korganizerrc", /*read-only=*/false, /*useglobals=*/false );
- const QStringList groups = profile.groupList();
- for ( QStringList::ConstIterator it = groups.begin(), end = groups.end(); it != end; ++it )
+ const TQStringList groups = profile.groupList();
+ for ( TQStringList::ConstIterator it = groups.begin(), end = groups.end(); it != end; ++it )
{
cfg->setGroup( *it );
- typedef QMap<QString, QString> StringMap;
+ typedef TQMap<TQString, TQString> StringMap;
const StringMap entries = profile.entryMap( *it );
for ( StringMap::ConstIterator it2 = entries.begin(), end = entries.end(); it2 != end; ++it2 )
{
@@ -1931,7 +1931,7 @@ void ActionManager::loadProfile( const QString & path )
}
namespace {
- void copyConfigEntry( KConfig* source, KConfig* dest, const QString& group, const QString& key, const QString& defaultValue=QString() )
+ void copyConfigEntry( KConfig* source, KConfig* dest, const TQString& group, const TQString& key, const TQString& defaultValue=TQString() )
{
source->setGroup( group );
dest->setGroup( group );
@@ -1939,7 +1939,7 @@ namespace {
}
}
-void ActionManager::saveToProfile( const QString & path ) const
+void ActionManager::saveToProfile( const TQString & path ) const
{
KOPrefs::instance()->writeConfig();
KConfig* const cfg = KOPrefs::instance()->config();
@@ -1948,7 +1948,7 @@ void ActionManager::saveToProfile( const QString & path ) const
::copyConfigEntry( cfg, &profile, "Views", "Agenda View Calendar Display" );
}
-QWidget *ActionManager::dialogParent()
+TQWidget *ActionManager::dialogParent()
{
return mCalendarView->topLevelWidget();
}
diff --git a/korganizer/actionmanager.h b/korganizer/actionmanager.h
index b8c9cadbc..f19f7b4bb 100644
--- a/korganizer/actionmanager.h
+++ b/korganizer/actionmanager.h
@@ -27,7 +27,7 @@
#ifndef KORG_ACTIONMANAGER_H
#define KORG_ACTIONMANAGER_H
-#include <qobject.h>
+#include <tqobject.h>
#include <kurl.h>
#include <korganizer/part.h>
#include <kdepimmacros.h>
@@ -71,12 +71,12 @@ using namespace KCal;
actions are in one location.
It also provides DCOP interface[s].
*/
-class KDE_EXPORT ActionManager : public QObject, public KCalendarIface
+class KDE_EXPORT ActionManager : public TQObject, public KCalendarIface
{
Q_OBJECT
public:
ActionManager( KXMLGUIClient *client, CalendarView *widget,
- QObject *parent, KOrg::MainWindow *mainWindow,
+ TQObject *parent, KOrg::MainWindow *mainWindow,
bool isPart );
virtual ~ActionManager();
@@ -130,90 +130,90 @@ class KDE_EXPORT ActionManager : public QObject, public KCalendarIface
/** Is there a instance with this URL? */
static KOrg::MainWindow* findInstance( const KURL &url );
/** Open calendar file from URL */
- bool openURL( const QString &url );
+ bool openURL( const TQString &url );
/** Open calendar file from URL */
- bool mergeURL( const QString &url );
+ bool mergeURL( const TQString &url );
/** Save calendar file to URL */
- bool saveAsURL( const QString &url );
+ bool saveAsURL( const TQString &url );
/** Close calendar file opened from URL */
void closeURL();
- /** Get current URL as QString */
- QString getCurrentURLasString() const;
+ /** Get current URL as TQString */
+ TQString getCurrentURLasString() const;
/**
Delete the incidence with the given unique id from current calendar.
@param uid UID of the incidence to delete.
@param force If true, all recurrences and sub-todos (if applicable) will be
deleted without prompting for confirmation.
*/
- virtual bool deleteIncidence( const QString& uid, bool force = false );
+ virtual bool deleteIncidence( const TQString& uid, bool force = false );
- bool editIncidence( const QString& uid );
+ bool editIncidence( const TQString& uid );
/**
Add an incidence to the active calendar.
@param ical A calendar in iCalendar format containing the incidence.
*/
- bool addIncidence( const QString& ical );
+ bool addIncidence( const TQString& ical );
//// Implementation of the DCOP interface
- virtual ResourceRequestReply resourceRequest( const QValueList<QPair<QDateTime, QDateTime> >& busy,
- const QCString& resource,
- const QString& vCalIn );
-
- void openEventEditor( const QString& );
- void openEventEditor( const QString& summary,
- const QString& description,
- const QString& attachment );
- void openEventEditor( const QString& summary,
- const QString& description,
- const QString& attachment,
- const QStringList& attendees );
- void openEventEditor( const QString& summary,
- const QString& description,
- const QString& uri,
- const QString& file,
- const QStringList& attendees,
- const QString& attachmentMimetype );
-
- void openTodoEditor( const QString& );
- void openTodoEditor( const QString& summary,
- const QString& description,
- const QString& attachment );
- void openTodoEditor( const QString& summary,
- const QString& description,
- const QString& attachment,
- const QStringList& attendees );
- void openTodoEditor( const QString& summary,
- const QString& description,
- const QString& uri,
- const QString& file,
- const QStringList& attendees,
- const QString& attachmentMimetype );
-
- void openJournalEditor( const QDate& date );
- void openJournalEditor( const QString& text, const QDate& date );
- void openJournalEditor( const QString& text );
+ virtual ResourceRequestReply resourceRequest( const TQValueList<QPair<TQDateTime, TQDateTime> >& busy,
+ const TQCString& resource,
+ const TQString& vCalIn );
+
+ void openEventEditor( const TQString& );
+ void openEventEditor( const TQString& summary,
+ const TQString& description,
+ const TQString& attachment );
+ void openEventEditor( const TQString& summary,
+ const TQString& description,
+ const TQString& attachment,
+ const TQStringList& attendees );
+ void openEventEditor( const TQString& summary,
+ const TQString& description,
+ const TQString& uri,
+ const TQString& file,
+ const TQStringList& attendees,
+ const TQString& attachmentMimetype );
+
+ void openTodoEditor( const TQString& );
+ void openTodoEditor( const TQString& summary,
+ const TQString& description,
+ const TQString& attachment );
+ void openTodoEditor( const TQString& summary,
+ const TQString& description,
+ const TQString& attachment,
+ const TQStringList& attendees );
+ void openTodoEditor( const TQString& summary,
+ const TQString& description,
+ const TQString& uri,
+ const TQString& file,
+ const TQStringList& attendees,
+ const TQString& attachmentMimetype );
+
+ void openJournalEditor( const TQDate& date );
+ void openJournalEditor( const TQString& text, const TQDate& date );
+ void openJournalEditor( const TQString& text );
//TODO:
- // void openJournalEditor( const QString& summary,
- // const QString& description,
- // const QString& attachment );
+ // void openJournalEditor( const TQString& summary,
+ // const TQString& description,
+ // const TQString& attachment );
void showJournalView();
void showTodoView();
void showEventView();
- void goDate( const QDate& );
- void goDate( const QString& );
- void showDate( const QDate &date );
+ void goDate( const TQDate& );
+ void goDate( const TQString& );
+ void showDate( const TQDate &date );
- QString localFileName();
+ TQString localFileName();
bool queryClose();
- void loadProfile( const QString & path );
+ void loadProfile( const TQString & path );
- void saveToProfile( const QString & path ) const;
+ void saveToProfile( const TQString & path ) const;
signals:
/**
@@ -333,9 +333,9 @@ class KDE_EXPORT ActionManager : public QObject, public KCalendarIface
void setTitle();
- void updateUndoAction( const QString & );
+ void updateUndoAction( const TQString & );
- void updateRedoAction( const QString & );
+ void updateRedoAction( const TQString & );
void slotImportDialogFinished( ImportDialog * );
@@ -350,10 +350,10 @@ class KDE_EXPORT ActionManager : public QObject, public KCalendarIface
/**
Return widget used as parent for dialogs and message boxes.
*/
- QWidget *dialogParent();
+ TQWidget *dialogParent();
private slots:
- void dumpText( const QString & ); // only for debugging purposes
+ void dumpText( const TQString & ); // only for debugging purposes
private:
class ActionStringsVisitor;
@@ -364,12 +364,12 @@ class KDE_EXPORT ActionManager : public QObject, public KCalendarIface
KOrg::Part::List mParts; // List of parts loaded
KURL mURL; // URL of calendar file
- QString mFile; // Local name of calendar file
- QString mLastUrl; // URL of last loaded calendar.
+ TQString mFile; // Local name of calendar file
+ TQString mLastUrl; // URL of last loaded calendar.
KTempFile *mTempFile;
- QTimer *mAutoSaveTimer; // used if calendar is to be autosaved
- QTimer *mAutoArchiveTimer; // used for the auto-archiving feature
+ TQTimer *mAutoSaveTimer; // used if calendar is to be autosaved
+ TQTimer *mAutoArchiveTimer; // used for the auto-archiving feature
// list of all existing KOrganizer instances
static KOWindowList *mWindowList;
diff --git a/korganizer/agendaview.cpp b/korganizer/agendaview.cpp
index c013faa82..df1417897 100644
--- a/korganizer/agendaview.cpp
+++ b/korganizer/agendaview.cpp
@@ -22,14 +22,14 @@
using namespace KOrg;
-AgendaView::AgendaView(Calendar * cal, QWidget * parent, const char * name) :
+AgendaView::AgendaView(Calendar * cal, TQWidget * parent, const char * name) :
KOEventView( cal, parent, name )
{
KCal::CalendarResources *calres = dynamic_cast<KCal::CalendarResources*>( cal );
if ( calres ) {
- connect( calres, SIGNAL(signalResourceAdded(ResourceCalendar *)), SLOT(resourcesChanged()) );
- connect( calres, SIGNAL(signalResourceModified( ResourceCalendar *)), SLOT(resourcesChanged()) );
- connect( calres, SIGNAL(signalResourceDeleted(ResourceCalendar *)), SLOT(resourcesChanged()) );
+ connect( calres, TQT_SIGNAL(signalResourceAdded(ResourceCalendar *)), TQT_SLOT(resourcesChanged()) );
+ connect( calres, TQT_SIGNAL(signalResourceModified( ResourceCalendar *)), TQT_SLOT(resourcesChanged()) );
+ connect( calres, TQT_SIGNAL(signalResourceDeleted(ResourceCalendar *)), TQT_SLOT(resourcesChanged()) );
}
}
diff --git a/korganizer/agendaview.h b/korganizer/agendaview.h
index 5a1c84c6b..cf262dac5 100644
--- a/korganizer/agendaview.h
+++ b/korganizer/agendaview.h
@@ -28,9 +28,9 @@ class AgendaView : public KOEventView
{
Q_OBJECT
public:
- AgendaView( Calendar *cal,QWidget *parent=0,const char *name=0 );
+ AgendaView( Calendar *cal,TQWidget *parent=0,const char *name=0 );
- virtual void setTypeAheadReceiver( QObject * ) = 0;
+ virtual void setTypeAheadReceiver( TQObject * ) = 0;
public slots:
virtual void finishTypeAhead() = 0;
diff --git a/korganizer/archivedialog.cpp b/korganizer/archivedialog.cpp
index 89d7ecdd4..88d20fded 100644
--- a/korganizer/archivedialog.cpp
+++ b/korganizer/archivedialog.cpp
@@ -24,12 +24,12 @@
// ArchiveDialog -- archive/delete past events.
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qdatetime.h>
-#include <qcheckbox.h>
-#include <qwhatsthis.h>
-#include <qhgroupbox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqdatetime.h>
+#include <tqcheckbox.h>
+#include <tqwhatsthis.h>
+#include <tqhgroupbox.h>
#include <kdebug.h>
#include <klocale.h>
@@ -47,19 +47,19 @@
#include "archivedialog.h"
#include "eventarchiver.h"
#include <knuminput.h>
-#include <qbuttongroup.h>
-#include <qradiobutton.h>
+#include <tqbuttongroup.h>
+#include <tqradiobutton.h>
#include "archivedialog.moc"
-ArchiveDialog::ArchiveDialog(Calendar *cal,QWidget *parent, const char *name)
+ArchiveDialog::ArchiveDialog(Calendar *cal,TQWidget *parent, const char *name)
: KDialogBase (Plain,i18n("Archive/Delete Past Events and To-dos"),
User1|Cancel,User1,parent,name,false,true,
i18n("&Archive"))
{
mCalendar = cal;
- QFrame *topFrame = plainPage();
- QVBoxLayout *topLayout = new QVBoxLayout(topFrame);
+ TQFrame *topFrame = plainPage();
+ TQVBoxLayout *topLayout = new TQVBoxLayout(topFrame);
topLayout->setSpacing(spacingHint());
KActiveLabel *descLabel = new KActiveLabel(
@@ -74,16 +74,16 @@ ArchiveDialog::ArchiveDialog(Calendar *cal,QWidget *parent, const char *name)
topFrame);
topLayout->addWidget(descLabel);
- QButtonGroup* radioBG = new QButtonGroup( this );
+ TQButtonGroup* radioBG = new TQButtonGroup( this );
radioBG->hide(); // just for the exclusive behavior
- connect( radioBG, SIGNAL( clicked( int ) ), SLOT( slotActionChanged() ) );
+ connect( radioBG, TQT_SIGNAL( clicked( int ) ), TQT_SLOT( slotActionChanged() ) );
- QHBoxLayout *dateLayout = new QHBoxLayout(0);
- mArchiveOnceRB = new QRadioButton(i18n("Archive now items older than:"),topFrame);
+ TQHBoxLayout *dateLayout = new TQHBoxLayout(0);
+ mArchiveOnceRB = new TQRadioButton(i18n("Archive now items older than:"),topFrame);
dateLayout->addWidget(mArchiveOnceRB);
radioBG->insert(mArchiveOnceRB);
mDateEdit = new KDateEdit(topFrame);
- QWhatsThis::add(mDateEdit,
+ TQWhatsThis::add(mDateEdit,
i18n("The date before which items should be archived. All older events and to-dos will "
"be saved and deleted, the newer (and events exactly on that date) will be kept."));
dateLayout->addWidget(mDateEdit);
@@ -91,11 +91,11 @@ ArchiveDialog::ArchiveDialog(Calendar *cal,QWidget *parent, const char *name)
// Checkbox, numinput and combo for auto-archiving
// (similar to kmail's mExpireFolderCheckBox/mReadExpiryTimeNumInput in kmfolderdia.cpp)
- QHBox* autoArchiveHBox = new QHBox(topFrame);
+ TQHBox* autoArchiveHBox = new TQHBox(topFrame);
topLayout->addWidget(autoArchiveHBox);
- mAutoArchiveRB = new QRadioButton(i18n("Automaticall&y archive items older than:"), autoArchiveHBox);
+ mAutoArchiveRB = new TQRadioButton(i18n("Automaticall&y archive items older than:"), autoArchiveHBox);
radioBG->insert(mAutoArchiveRB);
- QWhatsThis::add(mAutoArchiveRB,
+ TQWhatsThis::add(mAutoArchiveRB,
i18n("If this feature is enabled, KOrganizer will regularly check if events and to-dos have to be archived; "
"this means you will not need to use this dialog box again, except to change the settings."));
@@ -103,25 +103,25 @@ ArchiveDialog::ArchiveDialog(Calendar *cal,QWidget *parent, const char *name)
mExpiryTimeNumInput->setRange(1, 500, 1, false);
mExpiryTimeNumInput->setEnabled(false);
mExpiryTimeNumInput->setValue(7);
- QWhatsThis::add(mExpiryTimeNumInput,
+ TQWhatsThis::add(mExpiryTimeNumInput,
i18n("The age of the events and to-dos to archive. All older items "
"will be saved and deleted, the newer will be kept."));
- mExpiryUnitsComboBox = new QComboBox(autoArchiveHBox);
+ mExpiryUnitsComboBox = new TQComboBox(autoArchiveHBox);
// Those items must match the "Expiry Unit" enum in the kcfg file!
mExpiryUnitsComboBox->insertItem(i18n("Day(s)"));
mExpiryUnitsComboBox->insertItem(i18n("Week(s)"));
mExpiryUnitsComboBox->insertItem(i18n("Month(s)"));
mExpiryUnitsComboBox->setEnabled(false);
- QHBoxLayout *fileLayout = new QHBoxLayout(0);
+ TQHBoxLayout *fileLayout = new TQHBoxLayout(0);
fileLayout->setSpacing(spacingHint());
- QLabel *l = new QLabel(i18n("Archive &file:"),topFrame);
+ TQLabel *l = new TQLabel(i18n("Archive &file:"),topFrame);
fileLayout->addWidget(l);
mArchiveFile = new KURLRequester(KOPrefs::instance()->mArchiveFile,topFrame);
mArchiveFile->setMode(KFile::File);
mArchiveFile->setFilter(i18n("*.ics|iCalendar Files"));
- QWhatsThis::add(mArchiveFile,
+ TQWhatsThis::add(mArchiveFile,
i18n("The path of the archive. The events and to-dos will be added to the "
"archive file, so any events that are already in the file "
"will not be modified or deleted. You can later load or merge the "
@@ -131,26 +131,26 @@ ArchiveDialog::ArchiveDialog(Calendar *cal,QWidget *parent, const char *name)
fileLayout->addWidget(mArchiveFile);
topLayout->addLayout(fileLayout);
- QHGroupBox *typeBox = new QHGroupBox( i18n("Type of Items to Archive"),
+ TQHGroupBox *typeBox = new TQHGroupBox( i18n("Type of Items to Archive"),
topFrame);
- mEvents = new QCheckBox( i18n("&Events"), typeBox );
- mTodos = new QCheckBox( i18n("&To-dos"), typeBox );
+ mEvents = new TQCheckBox( i18n("&Events"), typeBox );
+ mTodos = new TQCheckBox( i18n("&To-dos"), typeBox );
topLayout->addWidget( typeBox );
- QWhatsThis::add( typeBox, i18n("Here you can select which items "
+ TQWhatsThis::add( typeBox, i18n("Here you can select which items "
"should be archived. Events are archived if they "
"ended before the date given above; to-dos are archived if "
"they were finished before the date.") );
- mDeleteCb = new QCheckBox(i18n("&Delete only, do not save"),
+ mDeleteCb = new TQCheckBox(i18n("&Delete only, do not save"),
topFrame);
- QWhatsThis::add(mDeleteCb,
+ TQWhatsThis::add(mDeleteCb,
i18n("Select this option to delete old events and to-dos without saving them. "
"It is not possible to recover the events later."));
topLayout->addWidget(mDeleteCb);
- connect(mDeleteCb, SIGNAL(toggled(bool)), mArchiveFile, SLOT(setDisabled(bool)));
- connect(mDeleteCb, SIGNAL(toggled(bool)), this, SLOT(slotEnableUser1()));
- connect(mArchiveFile->lineEdit(),SIGNAL(textChanged ( const QString & )),
- this,SLOT(slotEnableUser1()));
+ connect(mDeleteCb, TQT_SIGNAL(toggled(bool)), mArchiveFile, TQT_SLOT(setDisabled(bool)));
+ connect(mDeleteCb, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotEnableUser1()));
+ connect(mArchiveFile->lineEdit(),TQT_SIGNAL(textChanged ( const TQString & )),
+ this,TQT_SLOT(slotEnableUser1()));
// Load settings from KOPrefs
mExpiryTimeNumInput->setValue( KOPrefs::instance()->mExpiryTime );
@@ -194,7 +194,7 @@ void ArchiveDialog::slotActionChanged()
void ArchiveDialog::slotUser1()
{
EventArchiver archiver;
- connect( &archiver, SIGNAL( eventsDeleted() ), this, SLOT( slotEventsDeleted() ) );
+ connect( &archiver, TQT_SIGNAL( eventsDeleted() ), this, TQT_SLOT( slotEventsDeleted() ) );
KOPrefs::instance()->mAutoArchive = mAutoArchiveRB->isChecked();
KOPrefs::instance()->mExpiryTime = mExpiryTimeNumInput->value();
@@ -212,7 +212,7 @@ void ArchiveDialog::slotUser1()
return;
}
// Force filename to be ending with vCalendar extension
- QString filename = destUrl.fileName();
+ TQString filename = destUrl.fileName();
if (!filename.endsWith(".vcs") && !filename.endsWith(".ics")) {
filename.append(".ics");
destUrl.setFileName(filename);
diff --git a/korganizer/archivedialog.h b/korganizer/archivedialog.h
index 3f5c2247f..39a625cbf 100644
--- a/korganizer/archivedialog.h
+++ b/korganizer/archivedialog.h
@@ -42,7 +42,7 @@ class ArchiveDialog : public KDialogBase
{
Q_OBJECT
public:
- ArchiveDialog(Calendar *calendar,QWidget *parent=0, const char *name=0);
+ ArchiveDialog(Calendar *calendar,TQWidget *parent=0, const char *name=0);
virtual ~ArchiveDialog();
signals:
@@ -59,13 +59,13 @@ class ArchiveDialog : public KDialogBase
private:
KURLRequester *mArchiveFile;
KDateEdit *mDateEdit;
- QCheckBox *mDeleteCb;
- QRadioButton *mArchiveOnceRB;
- QRadioButton *mAutoArchiveRB;
+ TQCheckBox *mDeleteCb;
+ TQRadioButton *mArchiveOnceRB;
+ TQRadioButton *mAutoArchiveRB;
KIntNumInput *mExpiryTimeNumInput;
- QComboBox *mExpiryUnitsComboBox;
- QCheckBox *mEvents;
- QCheckBox *mTodos;
+ TQComboBox *mExpiryUnitsComboBox;
+ TQCheckBox *mEvents;
+ TQCheckBox *mTodos;
Calendar *mCalendar;
};
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp
index 6a91254e5..b13b0691f 100644
--- a/korganizer/calendarview.cpp
+++ b/korganizer/calendarview.cpp
@@ -91,27 +91,27 @@
#include <krun.h>
#include <kdirwatch.h>
-#include <qapplication.h>
-#include <qclipboard.h>
-#include <qcursor.h>
-#include <qmultilineedit.h>
-#include <qtimer.h>
-#include <qwidgetstack.h>
-#include <qptrlist.h>
-#include <qfile.h>
-#include <qlayout.h>
+#include <tqapplication.h>
+#include <tqclipboard.h>
+#include <tqcursor.h>
+#include <tqmultilineedit.h>
+#include <tqtimer.h>
+#include <tqwidgetstack.h>
+#include <tqptrlist.h>
+#include <tqfile.h>
+#include <tqlayout.h>
#ifndef KORG_NOSPLITTER
-#include <qsplitter.h>
+#include <tqsplitter.h>
#endif
-#include <qvbox.h>
-#include <qwhatsthis.h>
+#include <tqvbox.h>
+#include <tqwhatsthis.h>
#include <stdlib.h>
#include <assert.h>
using namespace KOrg;
-CalendarView::CalendarView( QWidget *parent, const char *name )
+CalendarView::CalendarView( TQWidget *parent, const char *name )
: CalendarViewBase( parent, name ),
mHistory( 0 ),
mCalendar( CalendarNull::self() ),
@@ -133,61 +133,61 @@ CalendarView::CalendarView( QWidget *parent, const char *name )
mNavigator = new DateNavigator( this );
mDateChecker = new DateChecker( this );
- QBoxLayout *topLayout = new QVBoxLayout( this );
+ TQBoxLayout *topLayout = new TQVBoxLayout( this );
#ifndef KORG_NOSPLITTER
// create the main layout frames.
- mPanner = new QSplitter( QSplitter::Horizontal, this,
+ mPanner = new TQSplitter( TQSplitter::Horizontal, this,
"CalendarView::Panner" );
topLayout->addWidget( mPanner );
- mLeftSplitter = new QSplitter( QSplitter::Vertical, mPanner,
+ mLeftSplitter = new TQSplitter( TQSplitter::Vertical, mPanner,
"CalendarView::LeftFrame" );
-// mPanner->setResizeMode( mLeftSplitter, QSplitter::Stretch );
+// mPanner->setResizeMode( mLeftSplitter, TQSplitter::Stretch );
mDateNavigator = new DateNavigatorContainer( mLeftSplitter,
"CalendarView::DateNavigator" );
-// mLeftSplitter->setResizeMode( mDateNavigator, QSplitter::Stretch );
+// mLeftSplitter->setResizeMode( mDateNavigator, TQSplitter::Stretch );
mLeftSplitter->setCollapsible( mDateNavigator, true );
mTodoList = new KOTodoView( CalendarNull::self(), mLeftSplitter, "todolist" );
mEventViewer = new KOEventViewer( mLeftSplitter,"EventViewer" );
- QVBox *rightBox = new QVBox( mPanner );
+ TQVBox *rightBox = new TQVBox( mPanner );
mNavigatorBar = new NavigatorBar( rightBox );
- mRightFrame = new QWidgetStack( rightBox );
+ mRightFrame = new TQWidgetStack( rightBox );
rightBox->setStretchFactor( mRightFrame, 1 );
mLeftFrame = mLeftSplitter;
#else
- QWidget *mainBox;
- QWidget *leftFrame;
+ TQWidget *mainBox;
+ TQWidget *leftFrame;
if ( KOPrefs::instance()->mVerticalScreen ) {
- mainBox = new QVBox( this );
- leftFrame = new QHBox( mainBox );
+ mainBox = new TQVBox( this );
+ leftFrame = new TQHBox( mainBox );
} else {
- mainBox = new QHBox( this );
- leftFrame = new QVBox( mainBox );
+ mainBox = new TQHBox( this );
+ leftFrame = new TQVBox( mainBox );
}
topLayout->addWidget( mainBox );
mDateNavigator = new KDateNavigator( leftFrame, true,
"CalendarView::DateNavigator",
- QDate::currentDate() );
+ TQDate::currentDate() );
mTodoList = new KOTodoView( CalendarNull::self(), leftFrame, "todolist" );
mEventViewer = new KOEventViewer ( leftFrame, "EventViewer" );
- QWidget *rightBox = new QWidget( mainBox );
- QBoxLayout *rightLayout = new QVBoxLayout( rightBox );
+ TQWidget *rightBox = new TQWidget( mainBox );
+ TQBoxLayout *rightLayout = new TQVBoxLayout( rightBox );
- mNavigatorBar = new NavigatorBar( QDate::currentDate(), rightBox );
+ mNavigatorBar = new NavigatorBar( TQDate::currentDate(), rightBox );
rightLayout->addWidget( mNavigatorBar );
- mRightFrame = new QWidgetStack( rightBox );
+ mRightFrame = new TQWidgetStack( rightBox );
rightLayout->addWidget( mRightFrame );
mLeftFrame = leftFrame;
@@ -198,73 +198,73 @@ CalendarView::CalendarView( QWidget *parent, const char *name )
}
#endif
- connect( mNavigator, SIGNAL( datesSelected( const KCal::DateList & ) ),
- SLOT( showDates( const KCal::DateList & ) ) );
- connect( mNavigator, SIGNAL( datesSelected( const KCal::DateList & ) ),
- mDateNavigator, SLOT( selectDates( const KCal::DateList & ) ) );
-
- connect( mNavigatorBar, SIGNAL( goPrevYear() ),
- mNavigator, SLOT( selectPreviousYear() ) );
- connect( mNavigatorBar, SIGNAL( goNextYear() ),
- mNavigator, SLOT( selectNextYear() ) );
- connect( mNavigatorBar, SIGNAL( goPrevMonth() ),
- mNavigator, SLOT( selectPreviousMonth() ) );
- connect( mNavigatorBar, SIGNAL( goNextMonth() ),
- mNavigator, SLOT( selectNextMonth() ) );
- connect( mNavigatorBar, SIGNAL( goMonth(int) ),
- mNavigator, SLOT( selectMonth(int) ) );
-
- connect( mNavigator, SIGNAL( datesSelected( const KCal::DateList & ) ),
- mNavigatorBar, SLOT( selectDates( const KCal::DateList & ) ) );
-
- connect( mDateNavigator, SIGNAL( weekClicked( const QDate & ) ),
- mNavigator, SLOT( selectWeek( const QDate & ) ) );
-
- connect( mDateNavigator, SIGNAL( goPrevYear() ),
- mNavigator, SLOT( selectPreviousYear() ) );
- connect( mDateNavigator, SIGNAL( goNextYear() ),
- mNavigator, SLOT( selectNextYear() ) );
- connect( mDateNavigator, SIGNAL( goPrevMonth() ),
- mNavigator, SLOT( selectPreviousMonth() ) );
- connect( mDateNavigator, SIGNAL( goNextMonth() ),
- mNavigator, SLOT( selectNextMonth() ) );
- connect( mDateNavigator, SIGNAL( goMonth(int) ),
- mNavigator, SLOT( selectMonth(int) ) );
-
- connect( mDateNavigator, SIGNAL( goPrevious() ),
- mNavigator, SLOT( selectPrevious() ) );
- connect( mDateNavigator, SIGNAL( goNext() ),
- mNavigator, SLOT( selectNext() ) );
-
- connect( mDateNavigator, SIGNAL( datesSelected( const KCal::DateList & ) ),
- mNavigator, SLOT( selectDates( const KCal::DateList & ) ) );
-
- connect( mDateNavigator, SIGNAL(incidenceDropped(Incidence*, const QDate&)),
- SLOT( addIncidenceOn( Incidence *, const QDate & ) ) );
- connect( mDateNavigator, SIGNAL(incidenceDroppedMove(Incidence*,const QDate&)),
- SLOT( moveIncidenceTo( Incidence *, const QDate & ) ) );
-
- connect( mDateChecker, SIGNAL( dayPassed( const QDate & ) ),
- mTodoList, SLOT( dayPassed( const QDate & ) ) );
- connect( mDateChecker, SIGNAL( dayPassed( const QDate & ) ),
- SIGNAL( dayPassed( const QDate & ) ) );
- connect( mDateChecker, SIGNAL( dayPassed( const QDate & ) ),
- mDateNavigator, SLOT( updateToday() ) );
-
- connect( this, SIGNAL( configChanged() ),
- mDateNavigator, SLOT( updateConfig() ) );
-
- connect( this, SIGNAL( incidenceSelected(Incidence *) ),
- mEventViewer, SLOT ( setIncidence (Incidence *) ) );
+ connect( mNavigator, TQT_SIGNAL( datesSelected( const KCal::DateList & ) ),
+ TQT_SLOT( showDates( const KCal::DateList & ) ) );
+ connect( mNavigator, TQT_SIGNAL( datesSelected( const KCal::DateList & ) ),
+ mDateNavigator, TQT_SLOT( selectDates( const KCal::DateList & ) ) );
+
+ connect( mNavigatorBar, TQT_SIGNAL( goPrevYear() ),
+ mNavigator, TQT_SLOT( selectPreviousYear() ) );
+ connect( mNavigatorBar, TQT_SIGNAL( goNextYear() ),
+ mNavigator, TQT_SLOT( selectNextYear() ) );
+ connect( mNavigatorBar, TQT_SIGNAL( goPrevMonth() ),
+ mNavigator, TQT_SLOT( selectPreviousMonth() ) );
+ connect( mNavigatorBar, TQT_SIGNAL( goNextMonth() ),
+ mNavigator, TQT_SLOT( selectNextMonth() ) );
+ connect( mNavigatorBar, TQT_SIGNAL( goMonth(int) ),
+ mNavigator, TQT_SLOT( selectMonth(int) ) );
+
+ connect( mNavigator, TQT_SIGNAL( datesSelected( const KCal::DateList & ) ),
+ mNavigatorBar, TQT_SLOT( selectDates( const KCal::DateList & ) ) );
+
+ connect( mDateNavigator, TQT_SIGNAL( weekClicked( const TQDate & ) ),
+ mNavigator, TQT_SLOT( selectWeek( const TQDate & ) ) );
+
+ connect( mDateNavigator, TQT_SIGNAL( goPrevYear() ),
+ mNavigator, TQT_SLOT( selectPreviousYear() ) );
+ connect( mDateNavigator, TQT_SIGNAL( goNextYear() ),
+ mNavigator, TQT_SLOT( selectNextYear() ) );
+ connect( mDateNavigator, TQT_SIGNAL( goPrevMonth() ),
+ mNavigator, TQT_SLOT( selectPreviousMonth() ) );
+ connect( mDateNavigator, TQT_SIGNAL( goNextMonth() ),
+ mNavigator, TQT_SLOT( selectNextMonth() ) );
+ connect( mDateNavigator, TQT_SIGNAL( goMonth(int) ),
+ mNavigator, TQT_SLOT( selectMonth(int) ) );
+
+ connect( mDateNavigator, TQT_SIGNAL( goPrevious() ),
+ mNavigator, TQT_SLOT( selectPrevious() ) );
+ connect( mDateNavigator, TQT_SIGNAL( goNext() ),
+ mNavigator, TQT_SLOT( selectNext() ) );
+
+ connect( mDateNavigator, TQT_SIGNAL( datesSelected( const KCal::DateList & ) ),
+ mNavigator, TQT_SLOT( selectDates( const KCal::DateList & ) ) );
+
+ connect( mDateNavigator, TQT_SIGNAL(incidenceDropped(Incidence*, const TQDate&)),
+ TQT_SLOT( addIncidenceOn( Incidence *, const TQDate & ) ) );
+ connect( mDateNavigator, TQT_SIGNAL(incidenceDroppedMove(Incidence*,const TQDate&)),
+ TQT_SLOT( moveIncidenceTo( Incidence *, const TQDate & ) ) );
+
+ connect( mDateChecker, TQT_SIGNAL( dayPassed( const TQDate & ) ),
+ mTodoList, TQT_SLOT( dayPassed( const TQDate & ) ) );
+ connect( mDateChecker, TQT_SIGNAL( dayPassed( const TQDate & ) ),
+ TQT_SIGNAL( dayPassed( const TQDate & ) ) );
+ connect( mDateChecker, TQT_SIGNAL( dayPassed( const TQDate & ) ),
+ mDateNavigator, TQT_SLOT( updateToday() ) );
+
+ connect( this, TQT_SIGNAL( configChanged() ),
+ mDateNavigator, TQT_SLOT( updateConfig() ) );
+
+ connect( this, TQT_SIGNAL( incidenceSelected(Incidence *) ),
+ mEventViewer, TQT_SLOT ( setIncidence (Incidence *) ) );
//TODO: do a pretty Summary,
- QString s;
+ TQString s;
s = i18n( "<p><em>No Item Selected</em></p>"
"<p>Select an event, to-do or journal entry to view its details "
"here.</p>");
mEventViewer->setDefaultText( s );
- QWhatsThis::add( mEventViewer,
+ TQWhatsThis::add( mEventViewer,
i18n( "View the details of events, journal entries or to-dos "
"selected in KOrganizer's main view here." ) );
mEventViewer->setIncidence( 0 );
@@ -275,13 +275,13 @@ CalendarView::CalendarView( QWidget *parent, const char *name )
KOGlobals::self()->
setHolidays( new KHolidays( KOPrefs::instance()->mHolidays ) );
- connect( QApplication::clipboard(), SIGNAL( dataChanged() ),
- SLOT( checkClipboard() ) );
+ connect( TQApplication::clipboard(), TQT_SIGNAL( dataChanged() ),
+ TQT_SLOT( checkClipboard() ) );
- connect( mTodoList, SIGNAL( incidenceSelected( Incidence * ) ),
- SLOT( processTodoListSelection( Incidence * ) ) );
- disconnect( mTodoList, SIGNAL( incidenceSelected( Incidence * ) ),
- this, SLOT( processMainViewSelection( Incidence * ) ) );
+ connect( mTodoList, TQT_SIGNAL( incidenceSelected( Incidence * ) ),
+ TQT_SLOT( processTodoListSelection( Incidence * ) ) );
+ disconnect( mTodoList, TQT_SIGNAL( incidenceSelected( Incidence * ) ),
+ this, TQT_SLOT( processMainViewSelection( Incidence * ) ) );
kdDebug(5850) << "CalendarView::CalendarView() done" << endl;
}
@@ -305,8 +305,8 @@ void CalendarView::setCalendar( Calendar *cal )
delete mHistory;
mHistory = new History( mCalendar );
- connect( mHistory, SIGNAL( undone() ), SLOT( updateView() ) );
- connect( mHistory, SIGNAL( redone() ), SLOT( updateView() ) );
+ connect( mHistory, TQT_SIGNAL( undone() ), TQT_SLOT( updateView() ) );
+ connect( mHistory, TQT_SIGNAL( redone() ), TQT_SLOT( updateView() ) );
if ( mChanger ) delete mChanger;
setIncidenceChanger( new IncidenceChanger( mCalendar, this ) );
@@ -322,23 +322,23 @@ void CalendarView::setIncidenceChanger( IncidenceChangerBase *changer )
{
mChanger = changer;
emit newIncidenceChanger( mChanger );
- connect( mChanger, SIGNAL( incidenceAdded( Incidence* ) ),
- this, SLOT( incidenceAdded( Incidence* ) ) );
- connect( mChanger, SIGNAL( incidenceChanged( Incidence*, Incidence*, int ) ),
- this, SLOT( incidenceChanged( Incidence*, Incidence*, int ) ) );
- connect( mChanger, SIGNAL( incidenceChanged( Incidence*, Incidence* ) ),
- this, SLOT( incidenceChanged( Incidence*, Incidence* ) ) );
- connect( mChanger, SIGNAL( incidenceToBeDeleted( Incidence * ) ),
- this, SLOT( incidenceToBeDeleted( Incidence * ) ) );
- connect( mChanger, SIGNAL( incidenceDeleted( Incidence * ) ),
- this, SLOT( incidenceDeleted( Incidence * ) ) );
+ connect( mChanger, TQT_SIGNAL( incidenceAdded( Incidence* ) ),
+ this, TQT_SLOT( incidenceAdded( Incidence* ) ) );
+ connect( mChanger, TQT_SIGNAL( incidenceChanged( Incidence*, Incidence*, int ) ),
+ this, TQT_SLOT( incidenceChanged( Incidence*, Incidence*, int ) ) );
+ connect( mChanger, TQT_SIGNAL( incidenceChanged( Incidence*, Incidence* ) ),
+ this, TQT_SLOT( incidenceChanged( Incidence*, Incidence* ) ) );
+ connect( mChanger, TQT_SIGNAL( incidenceToBeDeleted( Incidence * ) ),
+ this, TQT_SLOT( incidenceToBeDeleted( Incidence * ) ) );
+ connect( mChanger, TQT_SIGNAL( incidenceDeleted( Incidence * ) ),
+ this, TQT_SLOT( incidenceDeleted( Incidence * ) ) );
- connect( mChanger, SIGNAL( schedule( Scheduler::Method, Incidence*) ),
- this, SLOT( schedule( Scheduler::Method, Incidence*) ) );
+ connect( mChanger, TQT_SIGNAL( schedule( Scheduler::Method, Incidence*) ),
+ this, TQT_SLOT( schedule( Scheduler::Method, Incidence*) ) );
- connect( this, SIGNAL( cancelAttendees( Incidence * ) ),
- mChanger, SLOT( cancelAttendees( Incidence * ) ) );
+ connect( this, TQT_SIGNAL( cancelAttendees( Incidence * ) ),
+ mChanger, TQT_SLOT( cancelAttendees( Incidence * ) ) );
}
Calendar *CalendarView::calendar()
@@ -354,14 +354,14 @@ KOIncidenceEditor *CalendarView::editorDialog( Incidence *incidence ) const
else return 0;
}
-QDate CalendarView::startDate()
+TQDate CalendarView::startDate()
{
DateList dates = mNavigator->selectedDates();
return dates.first();
}
-QDate CalendarView::endDate()
+TQDate CalendarView::endDate()
{
DateList dates = mNavigator->selectedDates();
@@ -369,7 +369,7 @@ QDate CalendarView::endDate()
}
-bool CalendarView::openCalendar(const QString& filename, bool merge)
+bool CalendarView::openCalendar(const TQString& filename, bool merge)
{
kdDebug(5850) << "CalendarView::openCalendar(): " << filename << endl;
@@ -378,7 +378,7 @@ bool CalendarView::openCalendar(const QString& filename, bool merge)
return false;
}
- if (!QFile::exists(filename)) {
+ if (!TQFile::exists(filename)) {
kdDebug(5850) << "CalendarView::openCalendar(): Error! File '" << filename
<< "' doesn't exist." << endl;
}
@@ -424,7 +424,7 @@ bool CalendarView::openCalendar(const QString& filename, bool merge)
}
}
-bool CalendarView::saveCalendar( const QString& filename )
+bool CalendarView::saveCalendar( const TQString& filename )
{
kdDebug(5850) << "CalendarView::saveCalendar(): " << filename << endl;
@@ -466,7 +466,7 @@ void CalendarView::readSettings()
{
// kdDebug(5850) << "CalendarView::readSettings()" << endl;
- QString str;
+ TQString str;
// read settings from the KConfig, supplying reasonable
// defaults where none are to be found
@@ -476,7 +476,7 @@ void CalendarView::readSettings()
#ifndef KORG_NOSPLITTER
config->setGroup( "KOrganizer Geometry" );
- QValueList<int> sizes = config->readIntListEntry( "Separator1" );
+ TQValueList<int> sizes = config->readIntListEntry( "Separator1" );
if ( sizes.count() != 2 ) {
sizes << mDateNavigator->minimumSizeHint().width();
sizes << 300;
@@ -490,7 +490,7 @@ void CalendarView::readSettings()
mEventViewer->readSettings( config );
mViewManager->readSettings( config );
- mTodoList->restoreLayout( config, QString( "Todo Layout" ) );
+ mTodoList->restoreLayout( config, TQString( "Todo Layout" ) );
readFilterSettings( config );
@@ -510,7 +510,7 @@ void CalendarView::writeSettings()
#ifndef KORG_NOSPLITTER
config->setGroup( "KOrganizer Geometry" );
- QValueList<int> list = mPanner->sizes();
+ TQValueList<int> list = mPanner->sizes();
config->writeEntry( "Separator1", list );
list = mLeftSplitter->sizes();
@@ -518,7 +518,7 @@ void CalendarView::writeSettings()
#endif
mEventViewer->writeSettings( config );
mViewManager->writeSettings( config );
- mTodoList->saveLayout( config, QString( "Todo Layout" ) );
+ mTodoList->saveLayout( config, TQString( "Todo Layout" ) );
KOPrefs::instance()->writeConfig();
@@ -538,11 +538,11 @@ void CalendarView::readFilterSettings( KConfig *config )
config->setGroup( "General" );
// FIXME: Move the filter loading and saving to the CalFilter class in libkcal
- QStringList filterList = config->readListEntry ("CalendarFilters" );
- QString currentFilter = config->readEntry( "Current Filter" );
+ TQStringList filterList = config->readListEntry ("CalendarFilters" );
+ TQString currentFilter = config->readEntry( "Current Filter" );
- QStringList::ConstIterator it = filterList.begin();
- QStringList::ConstIterator end = filterList.end();
+ TQStringList::ConstIterator it = filterList.begin();
+ TQStringList::ConstIterator end = filterList.end();
while( it != end ) {
// kdDebug(5850) << " filter: " << (*it) << endl;
CalFilter *filter;
@@ -571,7 +571,7 @@ void CalendarView::writeFilterSettings( KConfig *config )
{
// kdDebug(5850) << "CalendarView::writeFilterSettings()" << endl;
- QStringList filterList;
+ TQStringList filterList;
CalFilter *filter = mFilters.first();
while( filter ) {
@@ -588,17 +588,17 @@ void CalendarView::writeFilterSettings( KConfig *config )
if ( mCurrentFilter ) {
config->writeEntry( "Current Filter", mCurrentFilter->name() );
} else {
- config->writeEntry( "Current Filter", QString::null );
+ config->writeEntry( "Current Filter", TQString::null );
}
}
-void CalendarView::goDate( const QDate& date )
+void CalendarView::goDate( const TQDate& date )
{
mNavigator->selectDate( date );
}
-void CalendarView::showDate(const QDate & date)
+void CalendarView::showDate(const TQDate & date)
{
int dateCount = mNavigator->datesCount();
if ( dateCount == 7 )
@@ -628,7 +628,7 @@ void CalendarView::goPrevious()
mNavigator->selectPrevious();
}
-void CalendarView::updateConfig( const QCString& receiver)
+void CalendarView::updateConfig( const TQCString& receiver)
{
if ( receiver != "korganizer" ) return;
kdDebug(5850) << "CalendarView::updateConfig()" << endl;
@@ -636,12 +636,12 @@ void CalendarView::updateConfig( const QCString& receiver)
KOGlobals::self()->
setHolidays( new KHolidays( KOPrefs::instance()->mHolidays ) );
- QString tz( mCalendar->timeZoneId() );
+ TQString tz( mCalendar->timeZoneId() );
// Only set a new time zone if it changed. This prevents the window
// from being modified on start
if ( tz != KOPrefs::instance()->mTimeZoneId ) {
- const QString question( i18n("The timezone setting was changed. Do you want to keep the absolute time of "
+ const TQString question( i18n("The timezone setting was changed. Do you want to keep the absolute time of "
"the items in your calendar, which will show them to be at a different time than "
"before, or move them to be at the old time also in the new timezone?") );
int rc = KMessageBox::questionYesNo( this, question,
@@ -714,18 +714,18 @@ void CalendarView::incidenceChanged( Incidence *oldIncidence,
Todo *todo = static_cast<Todo *>(newIncidence);
if ( todo->isCompleted()
|| what == KOGlobals::COMPLETION_MODIFIED_WITH_RECURRENCE ) {
- QString timeStr = KGlobal::locale()->formatTime( QTime::currentTime() );
- QString description = i18n( "To-do completed: %1 (%2)" ).arg(
+ TQString timeStr = KGlobal::locale()->formatTime( TQTime::currentTime() );
+ TQString description = i18n( "To-do completed: %1 (%2)" ).arg(
newIncidence->summary() ).arg( timeStr );
- Journal::List journals = calendar()->journals( QDate::currentDate() );
+ Journal::List journals = calendar()->journals( TQDate::currentDate() );
Journal *journal;
if ( journals.isEmpty() ) {
journal = new Journal();
- journal->setDtStart( QDateTime::currentDateTime() );
+ journal->setDtStart( TQDateTime::currentDateTime() );
- QString dateStr = KGlobal::locale()->formatDate( QDate::currentDate() );
+ TQString dateStr = KGlobal::locale()->formatDate( TQDate::currentDate() );
journal->setSummary( i18n("Journal of %1").arg( dateStr ) );
journal->setDescription( description );
@@ -786,7 +786,7 @@ void CalendarView::checkForFilteredChange( Incidence *incidence )
}
}
-void CalendarView::startMultiModify( const QString &text )
+void CalendarView::startMultiModify( const TQString &text )
{
history()->startMultiModify( text );
}
@@ -814,7 +814,7 @@ void CalendarView::changeIncidenceDisplay( Incidence *incidence, int action )
}
-void CalendarView::updateView(const QDate &start, const QDate &end)
+void CalendarView::updateView(const TQDate &start, const TQDate &end)
{
mTodoList->updateView();
mViewManager->updateView(start, end);
@@ -873,10 +873,10 @@ void CalendarView::edit_paste()
// In all other cases, paste the event on the first day of the
// selection in the day matrix on the left
- QDate date;
+ TQDate date;
// create an invalid time to check if we got a new time for the eevent
- QTime time(-1,-1);
- QDateTime startDT, endDT;
+ TQTime time(-1,-1);
+ TQDateTime startDT, endDT;
bool useEndTime = false;
KOAgendaView *aView = mViewManager->agendaView();
@@ -929,7 +929,7 @@ void CalendarView::edit_options()
mDialogManager->showOptionsDialog();
}
-void CalendarView::dateTimesForNewEvent( QDateTime &startDt, QDateTime &endDt, bool &allDay )
+void CalendarView::dateTimesForNewEvent( TQDateTime &startDt, TQDateTime &endDt, bool &allDay )
{
if ( !startDt.isValid() ) {
// Default start is the first selected date with the preferred time as set
@@ -949,12 +949,12 @@ void CalendarView::dateTimesForNewEvent( QDateTime &startDt, QDateTime &endDt, b
mViewManager->currentView()->eventDurationHint( startDt, endDt, allDay );
}
-KOEventEditor *CalendarView::newEventEditor( const QDateTime &startDtParam,
- const QDateTime &endDtParam, bool allDayParam)
+KOEventEditor *CalendarView::newEventEditor( const TQDateTime &startDtParam,
+ const TQDateTime &endDtParam, bool allDayParam)
{
// let the current view change the default start/end datetime
bool allDay = allDayParam;
- QDateTime startDt( startDtParam ), endDt( endDtParam );
+ TQDateTime startDt( startDtParam ), endDt( endDtParam );
// Adjust the start/end date times (i.e. replace invalid values by defaults,
// and let the view adjust the type.
dateTimesForNewEvent( startDt, endDt, allDay );
@@ -973,30 +973,30 @@ KOEventEditor *CalendarView::newEventEditor( const QDateTime &startDtParam,
void CalendarView::newEvent()
{
kdDebug(5850) << "CalendarView::newEvent()" << endl;
- newEvent( QDateTime(), QDateTime() );
+ newEvent( TQDateTime(), TQDateTime() );
}
-void CalendarView::newEvent( const QDate &dt )
+void CalendarView::newEvent( const TQDate &dt )
{
- QDateTime startDt( dt, KOPrefs::instance()->mStartTime.time() );
- return newEvent( QDateTime( dt ), QDateTime() );
+ TQDateTime startDt( dt, KOPrefs::instance()->mStartTime.time() );
+ return newEvent( TQDateTime( dt ), TQDateTime() );
}
-void CalendarView::newEvent( const QDateTime &startDt )
+void CalendarView::newEvent( const TQDateTime &startDt )
{
- return newEvent( startDt, QDateTime() );
+ return newEvent( startDt, TQDateTime() );
}
-void CalendarView::newEvent( const QDateTime &startDt, const QDateTime &endDt,
+void CalendarView::newEvent( const TQDateTime &startDt, const TQDateTime &endDt,
bool allDay )
{
KOEventEditor *eventEditor = newEventEditor( startDt, endDt, allDay );
eventEditor->show();
}
-void CalendarView::newEvent( const QString &summary, const QString &description,
- const QStringList &attachments, const QStringList &attendees,
- const QStringList &attachmentMimetypes, bool inlineAttachment )
+void CalendarView::newEvent( const TQString &summary, const TQString &description,
+ const TQStringList &attachments, const TQStringList &attendees,
+ const TQStringList &attachmentMimetypes, bool inlineAttachment )
{
KOEventEditor *eventEditor = newEventEditor();
eventEditor->setTexts( summary, description );
@@ -1007,9 +1007,9 @@ void CalendarView::newEvent( const QString &summary, const QString &description,
eventEditor->show();
}
-void CalendarView::newTodo( const QString &summary, const QString &description,
- const QStringList &attachments, const QStringList &attendees,
- const QStringList &attachmentMimetypes, bool inlineAttachment )
+void CalendarView::newTodo( const TQString &summary, const TQString &description,
+ const TQStringList &attachments, const TQStringList &attendees,
+ const TQStringList &attachmentMimetypes, bool inlineAttachment )
{
kdDebug(5850) << k_funcinfo << endl;
KOTodoEditor *todoEditor = mDialogManager->getTodoEditor();
@@ -1024,14 +1024,14 @@ void CalendarView::newTodo( const QString &summary, const QString &description,
void CalendarView::newTodo()
{
kdDebug(5850) << k_funcinfo << endl;
- QDateTime dtDue;
+ TQDateTime dtDue;
bool allday = true;
KOTodoEditor *todoEditor = mDialogManager->getTodoEditor();
connectIncidenceEditor( todoEditor );
todoEditor->newTodo();
if ( mViewManager->currentView()->isEventView() ) {
dtDue.setDate( mNavigator->selectedDates().first() );
- QDateTime dtDummy = QDateTime::currentDateTime();
+ TQDateTime dtDummy = TQDateTime::currentDateTime();
mViewManager->currentView()->
eventDurationHint( dtDue, dtDummy, allday );
todoEditor->setDates( dtDue, allday );
@@ -1039,27 +1039,27 @@ void CalendarView::newTodo()
todoEditor->show();
}
-void CalendarView::newTodo( const QDate &date )
+void CalendarView::newTodo( const TQDate &date )
{
KOTodoEditor *todoEditor = mDialogManager->getTodoEditor();
connectIncidenceEditor( todoEditor );
todoEditor->newTodo();
- todoEditor->setDates( QDateTime( date, QTime::currentTime() ), true );
+ todoEditor->setDates( TQDateTime( date, TQTime::currentTime() ), true );
todoEditor->show();
}
void CalendarView::newJournal()
{
kdDebug(5850) << "CalendarView::newJournal()" << endl;
- newJournal( QString::null, QDate() );
+ newJournal( TQString::null, TQDate() );
}
-void CalendarView::newJournal( const QDate &date)
+void CalendarView::newJournal( const TQDate &date)
{
- newJournal( QString::null, date );
+ newJournal( TQString::null, date );
}
-void CalendarView::newJournal( const QString &text, const QDate &date )
+void CalendarView::newJournal( const TQString &text, const TQDate &date )
{
KOJournalEditor *journalEditor = mDialogManager->getJournalEditor();
connectIncidenceEditor( journalEditor );
@@ -1084,20 +1084,20 @@ void CalendarView::newSubTodo(Todo *parentEvent)
KOTodoEditor *todoEditor = mDialogManager->getTodoEditor();
connectIncidenceEditor( todoEditor );
todoEditor->newTodo();
- todoEditor->setDates( QDateTime(), false, parentEvent );
+ todoEditor->setDates( TQDateTime(), false, parentEvent );
todoEditor->show();
}
void CalendarView::newFloatingEvent()
{
DateList tmpList = mNavigator->selectedDates();
- QDate date = tmpList.first();
+ TQDate date = tmpList.first();
- newEvent( QDateTime( date, QTime( 12, 0, 0 ) ),
- QDateTime( date, QTime( 12, 0, 0 ) ), true );
+ newEvent( TQDateTime( date, TQTime( 12, 0, 0 ) ),
+ TQDateTime( date, TQTime( 12, 0, 0 ) ), true );
}
-bool CalendarView::addIncidence( const QString &ical )
+bool CalendarView::addIncidence( const TQString &ical )
{
kdDebug(5850) << "CalendarView::addIncidence:\n" << ical << endl;
ICalFormat format;
@@ -1201,7 +1201,7 @@ bool CalendarView::makeSubTodosIndependents ( Todo *todo )
return true;
}
-bool CalendarView::deleteIncidence( const QString &uid, bool force )
+bool CalendarView::deleteIncidence( const TQString &uid, bool force )
{
Incidence *inc = mCalendar->incidence( uid );
if ( inc ) {
@@ -1241,7 +1241,7 @@ void CalendarView::toggleAlarm( Incidence *incidence )
// mClickedItem->updateIcons();
}
-void CalendarView::dissociateOccurrence( Incidence *incidence, const QDate &date )
+void CalendarView::dissociateOccurrence( Incidence *incidence, const TQDate &date )
{
if ( !incidence || !mChanger ) {
kdDebug(5850) << "CalendarView::toggleAlarm() called without having a clicked item" << endl;
@@ -1269,7 +1269,7 @@ void CalendarView::dissociateOccurrence( Incidence *incidence, const QDate &date
delete oldincidence;
}
-void CalendarView::dissociateFutureOccurrence( Incidence *incidence, const QDate &date )
+void CalendarView::dissociateFutureOccurrence( Incidence *incidence, const TQDate &date )
{
if ( !incidence || !mChanger ) {
kdDebug(5850) << "CalendarView::toggleAlarm() called without having a clicked item" << endl;
@@ -1319,7 +1319,7 @@ void CalendarView::schedule_publish(Incidence *incidence)
publishdlg->addAttendee( *it );
}
}
- if ( publishdlg->exec() == QDialog::Accepted ) {
+ if ( publishdlg->exec() == TQDialog::Accepted ) {
Incidence *inc = incidence->clone();
inc->registerObserver( 0 );
inc->clearAttendees();
@@ -1383,10 +1383,10 @@ void CalendarView::schedule_forward(Incidence * incidence)
}
PublishDialog publishdlg;
- if ( publishdlg.exec() == QDialog::Accepted ) {
- QString recipients = publishdlg.addresses();
+ if ( publishdlg.exec() == TQDialog::Accepted ) {
+ TQString recipients = publishdlg.addresses();
ICalFormat format;
- QString messageText = format.createScheduleMessage( incidence, Scheduler::Request );
+ TQString messageText = format.createScheduleMessage( incidence, Scheduler::Request );
KOMailClient mailer;
if ( mailer.mailTo( incidence, recipients, messageText ) ) {
@@ -1400,8 +1400,8 @@ void CalendarView::schedule_forward(Incidence * incidence)
void CalendarView::mailFreeBusy( int daysToPublish )
{
- QDateTime start = QDateTime::currentDateTime();
- QDateTime end = start.addDays(daysToPublish);
+ TQDateTime start = TQDateTime::currentDateTime();
+ TQDateTime end = start.addDays(daysToPublish);
FreeBusy *freebusy = new FreeBusy(mCalendar, start, end);
freebusy->setOrganizer( Person( KOPrefs::instance()->fullName(),
@@ -1412,7 +1412,7 @@ void CalendarView::mailFreeBusy( int daysToPublish )
<< KGlobal::locale()->formatDateTime( end ) << endl;
PublishDialog *publishdlg = new PublishDialog();
- if ( publishdlg->exec() == QDialog::Accepted ) {
+ if ( publishdlg->exec() == TQDialog::Accepted ) {
// Send the mail
KCal::MailScheduler scheduler( mCalendar );
if ( scheduler.publish( freebusy, publishdlg->addresses() ) ) {
@@ -1507,7 +1507,7 @@ void CalendarView::print()
#ifndef KORG_NOPRINTER
KOCoreHelper helper;
CalPrinter printer( this, mCalendar, &helper );
- connect( this, SIGNAL(configChanged()), &printer, SLOT(updateConfig()) );
+ connect( this, TQT_SIGNAL(configChanged()), &printer, TQT_SLOT(updateConfig()) );
KOrg::BaseView *currentView = mViewManager->currentView();
@@ -1531,14 +1531,14 @@ void CalendarView::exportWeb()
// seem to load the config theirselves
if ( settings ) settings->readConfig();
ExportWebDialog *dlg = new ExportWebDialog( settings, this );
- connect( dlg, SIGNAL( exportHTML( HTMLExportSettings* ) ),
- this, SIGNAL( exportHTML( HTMLExportSettings* ) ) );
+ connect( dlg, TQT_SIGNAL( exportHTML( HTMLExportSettings* ) ),
+ this, TQT_SIGNAL( exportHTML( HTMLExportSettings* ) ) );
dlg->show();
}
void CalendarView::exportICalendar()
{
- QString filename = KFileDialog::getSaveFileName("icalout.ics",i18n("*.ics|ICalendars"),this);
+ TQString filename = KFileDialog::getSaveFileName("icalout.ics",i18n("*.ics|ICalendars"),this);
// Force correct extension
if (filename.right(4) != ".ics") filename += ".ics";
@@ -1557,7 +1557,7 @@ void CalendarView::exportVCalendar()
if (result != KMessageBox::Continue) return;
}
- QString filename = KFileDialog::getSaveFileName("vcalout.vcs",i18n("*.vcs|vCalendars"),this);
+ TQString filename = KFileDialog::getSaveFileName("vcalout.vcs",i18n("*.vcs|vCalendars"),this);
// TODO: I don't like forcing extensions:
// Force correct extension
@@ -1634,7 +1634,7 @@ void CalendarView::processIncidenceSelection( Incidence *incidence )
void CalendarView::checkClipboard()
{
#ifndef KORG_NODND
- if (ICalDrag::canDecode(QApplication::clipboard()->data())) {
+ if (ICalDrag::canDecode(TQApplication::clipboard()->data())) {
kdDebug(5850) << "CalendarView::checkClipboard() true" << endl;
emit pasteEnabled(true);
} else {
@@ -1672,7 +1672,7 @@ void CalendarView::editFilters()
*/
void CalendarView::updateFilter()
{
- QStringList filters;
+ TQStringList filters;
CalFilter *filter;
int pos = mFilters.find( mCurrentFilter );
@@ -1709,7 +1709,7 @@ void CalendarView::filterActivated( int filterNo )
emit filterChanged();
}
-QString CalendarView::currentFilterName() const
+TQString CalendarView::currentFilterName() const
{
if ( mCurrentFilter) {
return mCurrentFilter->name();
@@ -1862,7 +1862,7 @@ void CalendarView::editIncidence()
editIncidence( selectedIncidence() );
}
-bool CalendarView::editIncidence( const QString& uid )
+bool CalendarView::editIncidence( const TQString& uid )
{
kdDebug(5850) << "CalendarView::editIncidence()" << endl;
return editIncidence( mCalendar->incidence( uid ) );
@@ -2028,7 +2028,7 @@ void CalendarView::deleteIncidence(Incidence *incidence, bool force)
}
if ( incidence->doesRecur() ) {
- QDate itemDate = mViewManager->currentSelectionDate();
+ TQDate itemDate = mViewManager->currentSelectionDate();
kdDebug(5850) << "Recurrence-Date: " << itemDate.toString() << endl;
int km = KMessageBox::Ok;
if ( !force ) {
@@ -2040,7 +2040,7 @@ void CalendarView::deleteIncidence(Incidence *incidence, bool force)
"and all its recurrences?").arg( incidence->summary() ),
i18n("KOrganizer Confirmation"), i18n("Delete All") );
} else {
- km = KOMessageBox::fourBtnMsgBox( this, QMessageBox::Warning,
+ km = KOMessageBox::fourBtnMsgBox( this, TQMessageBox::Warning,
i18n("The calendar item \"%1\" recurs over multiple dates. "
"Do you want to delete only the current one on %2, only all "
"future recurrences, or all its recurrences?" )
@@ -2091,8 +2091,8 @@ void CalendarView::deleteIncidence(Incidence *incidence, bool force)
void CalendarView::connectIncidenceEditor( KOIncidenceEditor *editor )
{
- connect( this, SIGNAL( newIncidenceChanger( IncidenceChangerBase* ) ),
- editor, SLOT( setIncidenceChanger( IncidenceChangerBase* ) ) );
+ connect( this, TQT_SIGNAL( newIncidenceChanger( IncidenceChangerBase* ) ),
+ editor, TQT_SLOT( setIncidenceChanger( IncidenceChangerBase* ) ) );
editor->setIncidenceChanger( mChanger );
}
@@ -2172,17 +2172,17 @@ void CalendarView::editCanceled( Incidence *i )
mCalendar->endChange( i );
}
-void CalendarView::showErrorMessage( const QString &msg )
+void CalendarView::showErrorMessage( const TQString &msg )
{
KMessageBox::error( this, msg );
}
void CalendarView::updateCategories()
{
- QStringList allCats( calendar()->categories() );
+ TQStringList allCats( calendar()->categories() );
allCats.sort();
- QStringList categories( KOPrefs::instance()->mCustomCategories );
- for ( QStringList::ConstIterator si = allCats.constBegin(); si != allCats.constEnd(); ++si ) {
+ TQStringList categories( KOPrefs::instance()->mCustomCategories );
+ for ( TQStringList::ConstIterator si = allCats.constBegin(); si != allCats.constEnd(); ++si ) {
if ( categories.find( *si ) == categories.end() ) {
categories.append( *si );
}
@@ -2193,7 +2193,7 @@ void CalendarView::updateCategories()
emit categoriesChanged();
}
-void CalendarView::addIncidenceOn( Incidence *incadd, const QDate &dt )
+void CalendarView::addIncidenceOn( Incidence *incadd, const TQDate &dt )
{
if ( !incadd || !mChanger ) {
KMessageBox::sorry(this, i18n("Unable to copy the item to %1.")
@@ -2210,8 +2210,8 @@ void CalendarView::addIncidenceOn( Incidence *incadd, const QDate &dt )
Event *event = static_cast<Event*>(incidence);
// Adjust date
- QDateTime start = event->dtStart();
- QDateTime end = event->dtEnd();
+ TQDateTime start = event->dtStart();
+ TQDateTime end = event->dtEnd();
int duration = start.daysTo( end );
start.setDate( dt );
@@ -2222,7 +2222,7 @@ void CalendarView::addIncidenceOn( Incidence *incadd, const QDate &dt )
} else if ( incidence->type() == "Todo" ) {
Todo *todo = static_cast<Todo*>(incidence);
- QDateTime due = todo->dtDue();
+ TQDateTime due = todo->dtDue();
due.setDate( dt );
todo->setDtDue( due );
@@ -2235,7 +2235,7 @@ void CalendarView::addIncidenceOn( Incidence *incadd, const QDate &dt )
}
}
-void CalendarView::moveIncidenceTo( Incidence *incmove, const QDate &dt )
+void CalendarView::moveIncidenceTo( Incidence *incmove, const TQDate &dt )
{
if ( !incmove || !mChanger ) {
KMessageBox::sorry( this, i18n("Unable to move the item to %1.")
@@ -2257,8 +2257,8 @@ void CalendarView::moveIncidenceTo( Incidence *incmove, const QDate &dt )
Event *event = static_cast<Event*>(incidence);
// Adjust date
- QDateTime start = event->dtStart();
- QDateTime end = event->dtEnd();
+ TQDateTime start = event->dtStart();
+ TQDateTime end = event->dtEnd();
int duration = start.daysTo( end );
start.setDate( dt );
@@ -2269,7 +2269,7 @@ void CalendarView::moveIncidenceTo( Incidence *incmove, const QDate &dt )
} else if ( incidence->type() == "Todo" ) {
Todo *todo = static_cast<Todo*>(incidence);
- QDateTime due = todo->dtDue();
+ TQDateTime due = todo->dtDue();
due.setDate( dt );
todo->setDtDue( due );
diff --git a/korganizer/calendarview.h b/korganizer/calendarview.h
index ceb2b2d7a..a3e9a9ab3 100644
--- a/korganizer/calendarview.h
+++ b/korganizer/calendarview.h
@@ -25,9 +25,9 @@
#ifndef CALENDARVIEW_H
#define CALENDARVIEW_H
-#include <qwidget.h>
-#include <qptrlist.h>
-#include <qmap.h>
+#include <tqwidget.h>
+#include <tqptrlist.h>
+#include <tqmap.h>
#include <kfile.h>
#include <korganizer/koeventviewer.h>
#include <libkcal/scheduler.h>
@@ -58,13 +58,13 @@ using namespace KCal;
class CalendarViewExtension : public QWidget
{
public:
- CalendarViewExtension( QWidget *parent, const char *name = 0 )
- : QWidget( parent, name ) {}
+ CalendarViewExtension( TQWidget *parent, const char *name = 0 )
+ : TQWidget( parent, name ) {}
class Factory
{
public:
- virtual CalendarViewExtension *create( QWidget *parent ) = 0;
+ virtual CalendarViewExtension *create( TQWidget *parent ) = 0;
};
};
@@ -87,7 +87,7 @@ class KDE_EXPORT CalendarView : public KOrg::CalendarViewBase, public Calendar::
@param parent parent window
@param name Qt internal widget object name
*/
- CalendarView( QWidget *parent = 0, const char *name = 0 );
+ CalendarView( TQWidget *parent = 0, const char *name = 0 );
virtual ~CalendarView();
@@ -121,16 +121,16 @@ class KDE_EXPORT CalendarView : public KOrg::CalendarViewBase, public Calendar::
KOViewManager *viewManager() const { return mViewManager; }
KODialogManager *dialogManager() const { return mDialogManager; }
- QWidgetStack *viewStack() const { return mRightFrame; }
- QWidget *leftFrame() const { return mLeftFrame; }
+ TQWidgetStack *viewStack() const { return mRightFrame; }
+ TQWidget *leftFrame() const { return mLeftFrame; }
NavigatorBar *navigatorBar() const { return mNavigatorBar; }
DateNavigator *dateNavigator() const { return mNavigator; }
KOIncidenceEditor *editorDialog( Incidence* ) const;
IncidenceChangerBase *incidenceChanger() const { return mChanger; }
- QDate startDate();
- QDate endDate();
+ TQDate startDate();
+ TQDate endDate();
void addView( KOrg::BaseView * );
@@ -148,7 +148,7 @@ class KDE_EXPORT CalendarView : public KOrg::CalendarViewBase, public Calendar::
is no selection, return the selected todo from the todo list on the left */
Incidence *selectedIncidence();
/** Returns the name of the current filter */
- QString currentFilterName() const;
+ TQString currentFilterName() const;
signals:
/** when change is made to options dialog, the topwidget will catch this
@@ -162,7 +162,7 @@ class KDE_EXPORT CalendarView : public KOrg::CalendarViewBase, public Calendar::
child windows can also close. */
void closingDown();
/** emitted right before we die */
- void closed( QWidget * );
+ void closed( TQWidget * );
/** Emitted when state of modified flag changes */
void modifiedChanged( bool );
@@ -171,8 +171,8 @@ class KDE_EXPORT CalendarView : public KOrg::CalendarViewBase, public Calendar::
void readOnlyChanged( bool );
/** Emitted when the unit of navigation changes */
- void changeNavStringPrev( const QString & );
- void changeNavStringNext( const QString & );
+ void changeNavStringPrev( const TQString & );
+ void changeNavStringNext( const TQString & );
/** Emitted when state of events selection has changed and user is organizer*/
void organizerEventsSelected( bool );
@@ -190,7 +190,7 @@ class KDE_EXPORT CalendarView : public KOrg::CalendarViewBase, public Calendar::
/** Emitted, when a day changed (i.e. korganizer was running at midnight).
The argument is the new date */
- void dayPassed( const QDate & );
+ void dayPassed( const TQDate & );
/**
Attendees were removed from this incidence. Only the removed attendees
are present in the incidence, so we just need to send a cancel messages
@@ -205,7 +205,7 @@ class KDE_EXPORT CalendarView : public KOrg::CalendarViewBase, public Calendar::
*/
void pasteEnabled( bool );
/** Send status message, which can e.g. be displayed in the status bar. */
- void statusMessage( const QString & );
+ void statusMessage( const TQString & );
void calendarViewExpanded( bool );
@@ -215,14 +215,14 @@ class KDE_EXPORT CalendarView : public KOrg::CalendarViewBase, public Calendar::
void newIncidenceChanger( IncidenceChangerBase* );
void exportHTML( HTMLExportSettings* );
- void newFilterListSignal( const QStringList & );
+ void newFilterListSignal( const TQStringList & );
void selectFilterSignal( int );
void filterChanged();
public slots:
/** options dialog made a changed to the configuration. we catch this
* and notify all widgets which need to update their configuration. */
- void updateConfig( const QCString& );
+ void updateConfig( const TQCString& );
/** Calendar configuration was changed, so refresh categories list
*/
void updateCategories();
@@ -233,13 +233,13 @@ class KDE_EXPORT CalendarView : public KOrg::CalendarViewBase, public Calendar::
calendar into existing one, if it is false, clear calendar, before
loading. Return true, if calendar could be successfully loaded.
*/
- bool openCalendar( const QString &filename, bool merge = false );
+ bool openCalendar( const TQString &filename, bool merge = false );
/**
Save calendar data to file. Return true if calendar could be
successfully saved.
*/
- bool saveCalendar( const QString &filename );
+ bool saveCalendar( const TQString &filename );
/**
Close calendar. Clear calendar data and reset views to display an empty
@@ -252,7 +252,7 @@ class KDE_EXPORT CalendarView : public KOrg::CalendarViewBase, public Calendar::
void showIncidence();
void editIncidence();
- bool editIncidence( const QString& uid );
+ bool editIncidence( const TQString& uid );
void deleteIncidence();
/**
@@ -263,7 +263,7 @@ class KDE_EXPORT CalendarView : public KOrg::CalendarViewBase, public Calendar::
optionally a VTIMEZONE component. If there is more than one
incidence, only the first is added to KOrganizer's calendar.
*/
- bool addIncidence( const QString &ical );
+ bool addIncidence( const TQString &ical );
void connectIncidenceEditor( KOIncidenceEditor * );
@@ -272,16 +272,16 @@ class KDE_EXPORT CalendarView : public KOrg::CalendarViewBase, public Calendar::
void newEvent();
/** create an editeventwin with supplied date/time, and if bool is true,
* make the event take all day. */
- void newEvent( const QDate &startDt );
- void newEvent( const QDateTime &startDt );
- void newEvent( const QDateTime &startDt, const QDateTime &EndDt, bool allDay = false );
+ void newEvent( const TQDate &startDt );
+ void newEvent( const TQDateTime &startDt );
+ void newEvent( const TQDateTime &startDt, const TQDateTime &EndDt, bool allDay = false );
/**
Create new Event from given summary, description, attachment list and
attendees list
*/
- void newEvent( const QString &summary, const QString &description = QString::null,
- const QStringList &attachment = QStringList(), const QStringList &attendees = QStringList(),
- const QStringList &attachmentMimetypes = QStringList(), bool inlineAttachment = false );
+ void newEvent( const TQString &summary, const TQString &description = TQString::null,
+ const TQStringList &attachment = TQStringList(), const TQStringList &attendees = TQStringList(),
+ const TQStringList &attachmentMimetypes = TQStringList(), bool inlineAttachment = false );
void newFloatingEvent();
/** Create a read-only viewer dialog for the supplied incidence. It calls the correct showXXX method*/
@@ -327,28 +327,28 @@ class KDE_EXPORT CalendarView : public KOrg::CalendarViewBase, public Calendar::
@param force If true, all recurrences and sub-todos (if applicable) will be
deleted without prompting for confirmation.
*/
- bool deleteIncidence( const QString &uid, bool force = false );
+ bool deleteIncidence( const TQString &uid, bool force = false );
/** create new todo */
void newTodo();
/** create new todo, due on date */
- void newTodo( const QDate &date );
+ void newTodo( const TQDate &date );
/** create new todo with a parent todo */
void newSubTodo();
/** create new todo with a parent todo */
void newSubTodo( Todo * );
- void newTodo( const QString &summary, const QString &description = QString::null,
- const QStringList &attachments = QStringList(), const QStringList &attendees = QStringList(),
- const QStringList &attachmentMimetypes = QStringList(), bool inlineAttachment = false );
+ void newTodo( const TQString &summary, const TQString &description = TQString::null,
+ const TQStringList &attachments = TQStringList(), const TQStringList &attendees = TQStringList(),
+ const TQStringList &attachmentMimetypes = TQStringList(), bool inlineAttachment = false );
void newJournal();
- void newJournal( const QDate &date );
- void newJournal( const QString &text, const QDate &date = QDate() );
+ void newJournal( const TQDate &date );
+ void newJournal( const TQString &text, const TQDate &date = TQDate() );
void toggleAlarm( Incidence * );
- void dissociateOccurrence( Incidence *, const QDate & );
- void dissociateFutureOccurrence( Incidence *, const QDate & );
+ void dissociateOccurrence( Incidence *, const TQDate & );
+ void dissociateFutureOccurrence( Incidence *, const TQDate & );
/**
@@ -383,12 +383,12 @@ class KDE_EXPORT CalendarView : public KOrg::CalendarViewBase, public Calendar::
void incidenceChanged( Incidence *oldEvent, Incidence *newEvent, int what );
void incidenceToBeDeleted( Incidence *incidence );
void incidenceDeleted( Incidence * );
- void startMultiModify( const QString &text );
+ void startMultiModify( const TQString &text );
void endMultiModify();
void editCanceled( Incidence * );
- void updateView( const QDate &start, const QDate &end );
+ void updateView( const TQDate &start, const TQDate &end );
void updateView();
void updateUnmanagedViews();
@@ -487,10 +487,10 @@ class KDE_EXPORT CalendarView : public KOrg::CalendarViewBase, public Calendar::
void showEventViewer( bool );
/** Move the current view date to the specified date */
- void goDate( const QDate& date );
+ void goDate( const TQDate& date );
/** Show the given date without changing date selection length. */
- void showDate( const QDate &date );
+ void showDate( const TQDate &date );
/** Move the current view date to today */
void goToday();
@@ -517,10 +517,10 @@ class KDE_EXPORT CalendarView : public KOrg::CalendarViewBase, public Calendar::
void slotAutoArchivingSettingsModified() { emit autoArchivingSettingsModified(); }
- void showErrorMessage( const QString & );
+ void showErrorMessage( const TQString & );
void schedule( Scheduler::Method, Incidence *incidence );
- void addIncidenceOn( Incidence *, const QDate & );
- void moveIncidenceTo( Incidence *, const QDate & );
+ void addIncidenceOn( Incidence *, const TQDate & );
+ void moveIncidenceTo( Incidence *, const TQDate & );
void filterActivated( int filterNum );
void resourcesChanged();
@@ -554,9 +554,9 @@ class KDE_EXPORT CalendarView : public KOrg::CalendarViewBase, public Calendar::
/** Adjust the given date/times by valid defaults (selection or configured
defaults, if invalid values are given) and allow the view to adjust the
type. */
- void dateTimesForNewEvent( QDateTime &startDt, QDateTime &endDt, bool &allDay );
- KOEventEditor *newEventEditor( const QDateTime &startDtParam = QDateTime(),
- const QDateTime &endDtParam = QDateTime() , bool allDayParam = false );
+ void dateTimesForNewEvent( TQDateTime &startDt, TQDateTime &endDt, bool &allDay );
+ KOEventEditor *newEventEditor( const TQDateTime &startDtParam = TQDateTime(),
+ const TQDateTime &endDtParam = TQDateTime() , bool allDayParam = false );
private:
void init();
@@ -569,17 +569,17 @@ class KDE_EXPORT CalendarView : public KOrg::CalendarViewBase, public Calendar::
KOrg::History *mHistory;
- QSplitter *mPanner;
- QSplitter *mLeftSplitter;
- QWidget *mLeftFrame;
- QWidgetStack *mRightFrame;
+ TQSplitter *mPanner;
+ TQSplitter *mLeftSplitter;
+ TQWidget *mLeftFrame;
+ TQWidgetStack *mRightFrame;
NavigatorBar *mNavigatorBar;
DateNavigatorContainer *mDateNavigator;
- QPtrList<CalendarViewExtension> mExtensions;
+ TQPtrList<CalendarViewExtension> mExtensions;
Calendar *mCalendar;
@@ -591,18 +591,18 @@ class KDE_EXPORT CalendarView : public KOrg::CalendarViewBase, public Calendar::
KODialogManager *mDialogManager;
// Calendar filters
- QPtrList<CalFilter> mFilters;
+ TQPtrList<CalFilter> mFilters;
CalFilter *mCurrentFilter;
// various housekeeping variables.
bool mModified; // flag indicating if calendar is modified
bool mReadOnly; // flag indicating if calendar is read-only
- QDate mSaveSingleDate;
+ TQDate mSaveSingleDate;
Incidence *mSelectedIncidence;
KOTodoView *mTodoList;
- QMap<Incidence*,KOIncidenceEditor*> mDialogList;
+ TQMap<Incidence*,KOIncidenceEditor*> mDialogList;
KOrg::IncidenceChangerBase *mChanger;
};
diff --git a/korganizer/customlistviewitem.h b/korganizer/customlistviewitem.h
index c4ea1a97f..c25d780d3 100644
--- a/korganizer/customlistviewitem.h
+++ b/korganizer/customlistviewitem.h
@@ -24,8 +24,8 @@
#ifndef CUSTOMLISTVIEWITEM_H
#define CUSTOMLISTVIEWITEM_H
-#include <qmap.h>
-#include <qstring.h>
+#include <tqmap.h>
+#include <tqstring.h>
#include <klistview.h>
template<class T>
@@ -42,14 +42,14 @@ class CustomListViewItem : public KListViewItem
T data() const { return mData; }
- QString key(int column, bool) const
+ TQString key(int column, bool) const
{
- QMap<int,QString>::ConstIterator it = mKeyMap.find(column);
+ TQMap<int,TQString>::ConstIterator it = mKeyMap.find(column);
if (it == mKeyMap.end()) return text(column);
else return *it;
}
- void setSortKey(int column,const QString &key)
+ void setSortKey(int column,const TQString &key)
{
mKeyMap.insert(column,key);
}
@@ -57,7 +57,7 @@ class CustomListViewItem : public KListViewItem
private:
T mData;
- QMap<int,QString> mKeyMap;
+ TQMap<int,TQString> mKeyMap;
};
#endif
diff --git a/korganizer/datechecker.cpp b/korganizer/datechecker.cpp
index 43654983b..c0ce30eb6 100644
--- a/korganizer/datechecker.cpp
+++ b/korganizer/datechecker.cpp
@@ -23,7 +23,7 @@
without including the source code for Qt in the source distribution.
*/
-#include <qtimer.h>
+#include <tqtimer.h>
#include <kdebug.h>
#include <klocale.h>
@@ -31,8 +31,8 @@
#include "datechecker.h"
-DateChecker::DateChecker( QObject *parent, const char *name )
- : QObject( parent, name ), mUpdateTimer( 0 )
+DateChecker::DateChecker( TQObject *parent, const char *name )
+ : TQObject( parent, name ), mUpdateTimer( 0 )
{
enableRollover( FollowMonth );
}
@@ -54,19 +54,19 @@ void DateChecker::enableRollover( RolloverType r )
case FollowDay:
case FollowMonth:
if ( !mUpdateTimer ) {
- mUpdateTimer = new QTimer( this, "mUpdateTimer" );
- connect( mUpdateTimer, SIGNAL( timeout() ),
- SLOT( possiblyPastMidnight() ) );
+ mUpdateTimer = new TQTimer( this, "mUpdateTimer" );
+ connect( mUpdateTimer, TQT_SIGNAL( timeout() ),
+ TQT_SLOT( possiblyPastMidnight() ) );
}
mUpdateTimer->start( 0, true );
- mLastDayChecked = QDate::currentDate();
+ mLastDayChecked = TQDate::currentDate();
}
mUpdateRollover = r;
}
void DateChecker::passedMidnight()
{
- QDate today = QDate::currentDate();
+ TQDate today = TQDate::currentDate();
if ( today.month() != mLastDayChecked.month() ) {
if ( mUpdateRollover == FollowMonth ) {
@@ -78,15 +78,15 @@ void DateChecker::passedMidnight()
void DateChecker::possiblyPastMidnight()
{
- if ( mLastDayChecked != QDate::currentDate() ) {
+ if ( mLastDayChecked != TQDate::currentDate() ) {
passedMidnight();
- mLastDayChecked = QDate::currentDate();
+ mLastDayChecked = TQDate::currentDate();
}
// Set the timer to go off 1 second after midnight
// or after 8 minutes, whichever comes first.
if ( mUpdateTimer ) {
- QTime now = QTime::currentTime();
- QTime midnight = QTime( 23, 59, 59 );
+ TQTime now = TQTime::currentTime();
+ TQTime midnight = TQTime( 23, 59, 59 );
int msecsWait = QMIN( 480000, now.msecsTo( midnight ) + 2000 );
mUpdateTimer->stop();
diff --git a/korganizer/datechecker.h b/korganizer/datechecker.h
index f2d20bf3b..4866faf8a 100644
--- a/korganizer/datechecker.h
+++ b/korganizer/datechecker.h
@@ -25,8 +25,8 @@
#ifndef DATECHECKER_H
#define DATECHECKER_H
-#include <qobject.h>
-#include <qdatetime.h>
+#include <tqobject.h>
+#include <tqdatetime.h>
class QTimer;
@@ -38,7 +38,7 @@ class DateChecker: public QObject
{
Q_OBJECT
public:
- DateChecker( QObject *parent = 0, const char *name = 0 );
+ DateChecker( TQObject *parent = 0, const char *name = 0 );
~DateChecker();
/**
@@ -57,8 +57,8 @@ class DateChecker: public QObject
signals:
// Signals emitted at midnight carrying the new date.
- void dayPassed( const QDate & );
- void monthPassed( const QDate & );
+ void dayPassed( const TQDate & );
+ void monthPassed( const TQDate & );
protected slots:
/**
@@ -78,8 +78,8 @@ class DateChecker: public QObject
void passedMidnight();
private:
- QTimer *mUpdateTimer;
- QDate mLastDayChecked;
+ TQTimer *mUpdateTimer;
+ TQDate mLastDayChecked;
RolloverType mUpdateRollover;
};
diff --git a/korganizer/datenavigator.cpp b/korganizer/datenavigator.cpp
index 56360ca2e..6f5570a10 100644
--- a/korganizer/datenavigator.cpp
+++ b/korganizer/datenavigator.cpp
@@ -34,10 +34,10 @@
using namespace KCal;
-DateNavigator::DateNavigator( QObject *parent, const char *name )
- : QObject( parent, name )
+DateNavigator::DateNavigator( TQObject *parent, const char *name )
+ : TQObject( parent, name )
{
- mSelectedDates.append( QDate::currentDate() );
+ mSelectedDates.append( TQDate::currentDate() );
}
DateNavigator::~DateNavigator()
@@ -63,13 +63,13 @@ void DateNavigator::selectDates( const DateList& dateList )
}
}
-void DateNavigator::selectDate( const QDate &date )
+void DateNavigator::selectDate( const TQDate &date )
{
- QDate d = date;
+ TQDate d = date;
if ( !d.isValid() ) {
- kdDebug(5850) << "DateNavigator::selectDates(QDate): an invalid date was passed as a parameter!" << endl;
- d = QDate::currentDate();
+ kdDebug(5850) << "DateNavigator::selectDates(TQDate): an invalid date was passed as a parameter!" << endl;
+ d = TQDate::currentDate();
}
mSelectedDates.clear();
@@ -83,7 +83,7 @@ void DateNavigator::selectDates( int count )
selectDates( mSelectedDates.first(), count );
}
-void DateNavigator::selectDates( const QDate &d, int count )
+void DateNavigator::selectDates( const TQDate &d, int count )
{
DateList dates;
@@ -97,7 +97,7 @@ void DateNavigator::selectDates( const QDate &d, int count )
emitSelected();
}
-void DateNavigator::selectWeekByDay( int weekDay, const QDate &d )
+void DateNavigator::selectWeekByDay( int weekDay, const TQDate &d )
{
int dateCount = mSelectedDates.count();
bool weekStart = ( weekDay == KGlobal::locale()->weekStartDay() );
@@ -110,13 +110,13 @@ void DateNavigator::selectWeek()
selectWeek( mSelectedDates.first() );
}
-void DateNavigator::selectWeek( const QDate &d )
+void DateNavigator::selectWeek( const TQDate &d )
{
int dayOfWeek = KOGlobals::self()->calendarSystem()->dayOfWeek( d );
int weekStart = KGlobal::locale()->weekStartDay();
- QDate firstDate = d.addDays( weekStart - dayOfWeek );
+ TQDate firstDate = d.addDays( weekStart - dayOfWeek );
if ( weekStart != 1 && dayOfWeek < weekStart ) {
firstDate = firstDate.addDays( -7 );
@@ -130,13 +130,13 @@ void DateNavigator::selectWorkWeek()
selectWorkWeek( mSelectedDates.first() );
}
-void DateNavigator::selectWorkWeek( const QDate &d )
+void DateNavigator::selectWorkWeek( const TQDate &d )
{
int weekStart = KGlobal::locale()->weekStartDay();
int dayOfWeek = KOGlobals::self()->calendarSystem()->dayOfWeek( d );
- QDate currentDate = d.addDays( weekStart - dayOfWeek );
+ TQDate currentDate = d.addDays( weekStart - dayOfWeek );
if ( weekStart != 1 && dayOfWeek < weekStart ) {
currentDate = currentDate.addDays( -7 );
@@ -156,7 +156,7 @@ void DateNavigator::selectWorkWeek( const QDate &d )
void DateNavigator::selectToday()
{
- QDate d = QDate::currentDate();
+ TQDate d = TQDate::currentDate();
int dateCount = mSelectedDates.count();
@@ -166,7 +166,7 @@ void DateNavigator::selectToday()
void DateNavigator::selectPreviousYear()
{
- QDate firstSelected = mSelectedDates.first();
+ TQDate firstSelected = mSelectedDates.first();
int weekDay = firstSelected.dayOfWeek();
firstSelected = KOGlobals::self()->calendarSystem()->addYears( firstSelected, -1 );
@@ -175,7 +175,7 @@ void DateNavigator::selectPreviousYear()
void DateNavigator::selectPreviousMonth()
{
- QDate firstSelected = mSelectedDates.first();
+ TQDate firstSelected = mSelectedDates.first();
int weekDay = firstSelected.dayOfWeek();
firstSelected = KOGlobals::self()->calendarSystem()->addMonths( firstSelected, -1 );
@@ -184,7 +184,7 @@ void DateNavigator::selectPreviousMonth()
void DateNavigator::selectPreviousWeek()
{
- QDate firstSelected = mSelectedDates.first();
+ TQDate firstSelected = mSelectedDates.first();
int weekDay = firstSelected.dayOfWeek();
firstSelected = KOGlobals::self()->calendarSystem()->addDays( firstSelected, -7 );
@@ -193,7 +193,7 @@ void DateNavigator::selectPreviousWeek()
void DateNavigator::selectNextWeek()
{
- QDate firstSelected = mSelectedDates.first();
+ TQDate firstSelected = mSelectedDates.first();
int weekDay = firstSelected.dayOfWeek();
firstSelected = KOGlobals::self()->calendarSystem()->addDays( firstSelected, 7 );
@@ -203,7 +203,7 @@ void DateNavigator::selectNextWeek()
void DateNavigator::selectNextMonth()
{
- QDate firstSelected = mSelectedDates.first();
+ TQDate firstSelected = mSelectedDates.first();
int weekDay = firstSelected.dayOfWeek();
firstSelected = KOGlobals::self()->calendarSystem()->addMonths( firstSelected, 1 );
@@ -213,7 +213,7 @@ void DateNavigator::selectNextMonth()
void DateNavigator::selectNextYear()
{
- QDate firstSelected = mSelectedDates.first();
+ TQDate firstSelected = mSelectedDates.first();
int weekDay = firstSelected.dayOfWeek();
firstSelected = KOGlobals::self()->calendarSystem()->addYears( firstSelected, 1 );
@@ -242,7 +242,7 @@ void DateNavigator::selectNext()
void DateNavigator::selectMonth(int month)
{
- QDate firstSelected = mSelectedDates.first();
+ TQDate firstSelected = mSelectedDates.first();
int weekDay = firstSelected.dayOfWeek();
const KCalendarSystem *calSys = KOGlobals::self()->calendarSystem();
diff --git a/korganizer/datenavigator.h b/korganizer/datenavigator.h
index 062f1a67d..d91bad318 100644
--- a/korganizer/datenavigator.h
+++ b/korganizer/datenavigator.h
@@ -26,7 +26,7 @@
#include <libkcal/incidencebase.h>
-#include <qobject.h>
+#include <tqobject.h>
/**
This class controls date navigation. All requests to move the views to another
@@ -37,7 +37,7 @@ class DateNavigator : public QObject
{
Q_OBJECT
public:
- DateNavigator( QObject *parent = 0, const char *name = 0 );
+ DateNavigator( TQObject *parent = 0, const char *name = 0 );
~DateNavigator();
KCal::DateList selectedDates();
@@ -46,18 +46,18 @@ class DateNavigator : public QObject
public slots:
void selectDates( const KCal::DateList & );
- void selectDate( const QDate & );
+ void selectDate( const TQDate & );
void selectDates( int count );
- void selectDates( const QDate &, int count );
+ void selectDates( const TQDate &, int count );
void selectWeek();
- void selectWeek( const QDate & );
+ void selectWeek( const TQDate & );
void selectWorkWeek();
- void selectWorkWeek( const QDate & );
+ void selectWorkWeek( const TQDate & );
- void selectWeekByDay( int weekDay, const QDate & );
+ void selectWeekByDay( int weekDay, const TQDate & );
void selectToday();
diff --git a/korganizer/datenavigatorcontainer.cpp b/korganizer/datenavigatorcontainer.cpp
index 61be083b4..e3c092fc0 100644
--- a/korganizer/datenavigatorcontainer.cpp
+++ b/korganizer/datenavigatorcontainer.cpp
@@ -35,19 +35,19 @@
#include "datenavigatorcontainer.h"
-#include <qwhatsthis.h>
-#include <qtimer.h>
+#include <tqwhatsthis.h>
+#include <tqtimer.h>
-DateNavigatorContainer::DateNavigatorContainer( QWidget *parent,
+DateNavigatorContainer::DateNavigatorContainer( TQWidget *parent,
const char *name )
- : QFrame( parent, name ), mCalendar( 0 ),
+ : TQFrame( parent, name ), mCalendar( 0 ),
mHorizontalCount( 1 ), mVerticalCount( 1 )
{
mExtraViews.setAutoDelete( true );
- setFrameStyle( QFrame::Sunken | QFrame::StyledPanel );
+ setFrameStyle( TQFrame::Sunken | TQFrame::StyledPanel );
mNavigatorView = new KDateNavigator( this, name );
- QWhatsThis::add( mNavigatorView,
+ TQWhatsThis::add( mNavigatorView,
i18n( "<qt><p>Select the dates you want to "
"display in KOrganizer's main view here. Hold down the "
"mouse button to select more than one day.</p>"
@@ -67,24 +67,24 @@ DateNavigatorContainer::~DateNavigatorContainer()
void DateNavigatorContainer::connectNavigatorView( KDateNavigator *v )
{
- connect( v, SIGNAL( datesSelected( const KCal::DateList & ) ),
- SIGNAL( datesSelected( const KCal::DateList & ) ) );
- connect( v, SIGNAL( incidenceDropped( Incidence *, const QDate & ) ),
- SIGNAL( incidenceDropped( Incidence *, const QDate & ) ) );
- connect( v, SIGNAL( incidenceDroppedMove( Incidence *, const QDate & ) ),
- SIGNAL( incidenceDroppedMove( Incidence *, const QDate & ) ) );
- connect( v, SIGNAL( weekClicked( const QDate & ) ),
- SIGNAL( weekClicked( const QDate & ) ) );
-
- connect( v, SIGNAL( goPrevious() ), SIGNAL( goPrevious() ) );
- connect( v, SIGNAL( goNext() ), SIGNAL( goNext() ) );
-
- connect( v, SIGNAL( goNextMonth() ), SIGNAL( goNextMonth() ) );
- connect( v, SIGNAL( goPrevMonth() ), SIGNAL( goPrevMonth() ) );
- connect( v, SIGNAL( goNextYear() ), SIGNAL( goNextYear() ) );
- connect( v, SIGNAL( goPrevYear() ), SIGNAL( goPrevYear() ) );
-
- connect( v, SIGNAL( goMonth( int ) ), SIGNAL( goMonth( int ) ) );
+ connect( v, TQT_SIGNAL( datesSelected( const KCal::DateList & ) ),
+ TQT_SIGNAL( datesSelected( const KCal::DateList & ) ) );
+ connect( v, TQT_SIGNAL( incidenceDropped( Incidence *, const TQDate & ) ),
+ TQT_SIGNAL( incidenceDropped( Incidence *, const TQDate & ) ) );
+ connect( v, TQT_SIGNAL( incidenceDroppedMove( Incidence *, const TQDate & ) ),
+ TQT_SIGNAL( incidenceDroppedMove( Incidence *, const TQDate & ) ) );
+ connect( v, TQT_SIGNAL( weekClicked( const TQDate & ) ),
+ TQT_SIGNAL( weekClicked( const TQDate & ) ) );
+
+ connect( v, TQT_SIGNAL( goPrevious() ), TQT_SIGNAL( goPrevious() ) );
+ connect( v, TQT_SIGNAL( goNext() ), TQT_SIGNAL( goNext() ) );
+
+ connect( v, TQT_SIGNAL( goNextMonth() ), TQT_SIGNAL( goNextMonth() ) );
+ connect( v, TQT_SIGNAL( goPrevMonth() ), TQT_SIGNAL( goPrevMonth() ) );
+ connect( v, TQT_SIGNAL( goNextYear() ), TQT_SIGNAL( goNextYear() ) );
+ connect( v, TQT_SIGNAL( goPrevYear() ), TQT_SIGNAL( goPrevYear() ) );
+
+ connect( v, TQT_SIGNAL( goMonth( int ) ), TQT_SIGNAL( goMonth( int ) ) );
}
void DateNavigatorContainer::setCalendar( Calendar *cal )
@@ -139,11 +139,11 @@ void DateNavigatorContainer::updateConfig()
void DateNavigatorContainer::selectDates( const DateList &dateList )
{
if ( !dateList.isEmpty() ) {
- QDate start( dateList.first() );
- QDate end( dateList.last() );
- QDate navfirst( mNavigatorView->startDate() );
- QDate navsecond; // start of the second shown month if existant
- QDate navlast;
+ TQDate start( dateList.first() );
+ TQDate end( dateList.last() );
+ TQDate navfirst( mNavigatorView->startDate() );
+ TQDate navsecond; // start of the second shown month if existant
+ TQDate navlast;
if ( !mExtraViews.isEmpty() ) {
navlast = mExtraViews.last()->endDate();
navsecond = mExtraViews.first()->startDate();
@@ -167,9 +167,9 @@ void DateNavigatorContainer::selectDates( const DateList &dateList )
}
}
-void DateNavigatorContainer::setBaseDates( const QDate &start )
+void DateNavigatorContainer::setBaseDates( const TQDate &start )
{
- QDate baseDate = start;
+ TQDate baseDate = start;
mNavigatorView->setBaseDate( baseDate );
for( KDateNavigator *n = mExtraViews.first(); n; n = mExtraViews.next() ) {
baseDate = KOGlobals::self()->calendarSystem()->addMonths( baseDate, 1 );
@@ -177,7 +177,7 @@ void DateNavigatorContainer::setBaseDates( const QDate &start )
}
}
-void DateNavigatorContainer::resizeEvent( QResizeEvent * )
+void DateNavigatorContainer::resizeEvent( TQResizeEvent * )
{
#if 0
kdDebug(5850) << "DateNavigatorContainer::resizeEvent()" << endl;
@@ -186,12 +186,12 @@ void DateNavigatorContainer::resizeEvent( QResizeEvent * )
kdDebug(5850) << " SIZEHINT: " << sizeHint() << endl;
kdDebug(5850) << " MINIMUM SIZE: " << minimumSize() << endl;
#endif
- QTimer::singleShot( 0, this, SLOT( resizeAllContents() ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( resizeAllContents() ) );
}
void DateNavigatorContainer::resizeAllContents()
{
- QSize minSize = mNavigatorView->minimumSizeHint();
+ TQSize minSize = mNavigatorView->minimumSizeHint();
// kdDebug(5850) << " NAVIGATORVIEW minimumSizeHint: " << minSize << endl;
@@ -251,16 +251,16 @@ void DateNavigatorContainer::resizeAllContents()
}
}
-QSize DateNavigatorContainer::minimumSizeHint() const
+TQSize DateNavigatorContainer::minimumSizeHint() const
{
int margin = KDialog::spacingHint() * 2;
- return mNavigatorView->minimumSizeHint() + QSize( margin, margin );
+ return mNavigatorView->minimumSizeHint() + TQSize( margin, margin );
}
-QSize DateNavigatorContainer::sizeHint() const
+TQSize DateNavigatorContainer::sizeHint() const
{
int margin = KDialog::spacingHint() * 2;
- return mNavigatorView->sizeHint() + QSize( margin, margin );
+ return mNavigatorView->sizeHint() + TQSize( margin, margin );
}
#include "datenavigatorcontainer.moc"
diff --git a/korganizer/datenavigatorcontainer.h b/korganizer/datenavigatorcontainer.h
index 07be7cbf0..2facad303 100644
--- a/korganizer/datenavigatorcontainer.h
+++ b/korganizer/datenavigatorcontainer.h
@@ -25,7 +25,7 @@
#ifndef DATENAVIGATORCONTAINER_H
#define DATENAVIGATORCONTAINER_H
-#include <qframe.h>
+#include <tqframe.h>
class KDateNavigator;
@@ -33,7 +33,7 @@ class DateNavigatorContainer: public QFrame
{
Q_OBJECT
public:
- DateNavigatorContainer( QWidget *parent = 0, const char *name = 0 );
+ DateNavigatorContainer( TQWidget *parent = 0, const char *name = 0 );
~DateNavigatorContainer();
/**
@@ -41,8 +41,8 @@ class DateNavigatorContainer: public QFrame
*/
void setCalendar( Calendar * );
- QSize minimumSizeHint() const;
- QSize sizeHint() const;
+ TQSize minimumSizeHint() const;
+ TQSize sizeHint() const;
public slots:
void selectDates( const KCal::DateList & );
@@ -53,9 +53,9 @@ class DateNavigatorContainer: public QFrame
signals:
void datesSelected( const KCal::DateList & );
- void incidenceDropped( Incidence *, const QDate & );
- void incidenceDroppedMove( Incidence *, const QDate & );
- void weekClicked( const QDate &);
+ void incidenceDropped( Incidence *, const TQDate & );
+ void incidenceDroppedMove( Incidence *, const TQDate & );
+ void weekClicked( const TQDate &);
void goPrevious();
void goNext();
@@ -68,12 +68,12 @@ class DateNavigatorContainer: public QFrame
void goMonth( int month );
protected:
- void resizeEvent( QResizeEvent * );
- void setBaseDates( const QDate &start );
+ void resizeEvent( TQResizeEvent * );
+ void setBaseDates( const TQDate &start );
void connectNavigatorView( KDateNavigator *v );
protected slots:
/** Resizes all the child elements after the size of the widget
- changed. This slot is called by a QTimer::singleShot from
+ changed. This slot is called by a TQTimer::singleShot from
resizeEvent. This makes the UI seem more responsive, since
the other parts of the splitter are resized earlier now */
void resizeAllContents();
@@ -83,7 +83,7 @@ class DateNavigatorContainer: public QFrame
KCal::Calendar *mCalendar;
- QPtrList<KDateNavigator> mExtraViews;
+ TQPtrList<KDateNavigator> mExtraViews;
int mHorizontalCount;
int mVerticalCount;
diff --git a/korganizer/docprefs.cpp b/korganizer/docprefs.cpp
index 958eb236e..498886be4 100644
--- a/korganizer/docprefs.cpp
+++ b/korganizer/docprefs.cpp
@@ -30,7 +30,7 @@
KSimpleConfig *DocPrefs::mConfig = 0;
-DocPrefs::DocPrefs( const QString &type )
+DocPrefs::DocPrefs( const TQString &type )
{
if ( !mConfig ) {
mConfig = new KSimpleConfig( locateLocal( "data", "korganizer/docprefs." + type + ".kconfig" ) );
@@ -42,17 +42,17 @@ DocPrefs::~DocPrefs()
mConfig->sync();
}
-void DocPrefs::setDoc( const QString &identifier )
+void DocPrefs::setDoc( const TQString &identifier )
{
mDocId = identifier;
}
-QString DocPrefs::doc() const
+TQString DocPrefs::doc() const
{
return mDocId;
}
-bool DocPrefs::readBoolEntry( const QString &id ) const
+bool DocPrefs::readBoolEntry( const TQString &id ) const
{
mConfig->setGroup( mDocId );
bool result = mConfig->readBoolEntry( id, false );
@@ -60,7 +60,7 @@ bool DocPrefs::readBoolEntry( const QString &id ) const
return result;
}
-void DocPrefs::writeEntry( const QString &id, bool value )
+void DocPrefs::writeEntry( const TQString &id, bool value )
{
// kdDebug(5850) << "DocPrefs::writeEntry(): " << id << " : " << (value ? "True" : "False" ) << endl;
mConfig->setGroup( mDocId );
diff --git a/korganizer/docprefs.h b/korganizer/docprefs.h
index 0c9609ed5..70d1cac9d 100644
--- a/korganizer/docprefs.h
+++ b/korganizer/docprefs.h
@@ -24,26 +24,26 @@
#ifndef DOCPREFS_H
#define DOCPREFS_H
-#include <qstring.h>
+#include <tqstring.h>
class KSimpleConfig;
class DocPrefs
{
public:
- DocPrefs( const QString &type="general" );
+ DocPrefs( const TQString &type="general" );
~DocPrefs();
- void setDoc( const QString &identifier );
- QString doc() const;
+ void setDoc( const TQString &identifier );
+ TQString doc() const;
- bool readBoolEntry( const QString &identifier ) const;
- void writeEntry( const QString &identifier, bool value );
+ bool readBoolEntry( const TQString &identifier ) const;
+ void writeEntry( const TQString &identifier, bool value );
private:
static KSimpleConfig *mConfig;
- QString mDocId;
+ TQString mDocId;
};
#endif
diff --git a/korganizer/eventarchiver.cpp b/korganizer/eventarchiver.cpp
index f4ff3cbf9..b5a9c0c98 100644
--- a/korganizer/eventarchiver.cpp
+++ b/korganizer/eventarchiver.cpp
@@ -36,8 +36,8 @@
#include <kdebug.h>
#include "koprefs.h"
-EventArchiver::EventArchiver( QObject* parent, const char* name )
- : QObject( parent, name )
+EventArchiver::EventArchiver( TQObject* parent, const char* name )
+ : TQObject( parent, name )
{
}
@@ -45,14 +45,14 @@ EventArchiver::~EventArchiver()
{
}
-void EventArchiver::runOnce( Calendar* calendar, const QDate& limitDate, QWidget* widget )
+void EventArchiver::runOnce( Calendar* calendar, const TQDate& limitDate, TQWidget* widget )
{
run( calendar, limitDate, widget, true, true );
}
-void EventArchiver::runAuto( Calendar* calendar, QWidget* widget, bool withGUI )
+void EventArchiver::runAuto( Calendar* calendar, TQWidget* widget, bool withGUI )
{
- QDate limitDate( QDate::currentDate() );
+ TQDate limitDate( TQDate::currentDate() );
int expiryTime = KOPrefs::instance()->mExpiryTime;
switch (KOPrefs::instance()->mExpiryUnit) {
case KOPrefs::UnitDays: // Days
@@ -70,7 +70,7 @@ void EventArchiver::runAuto( Calendar* calendar, QWidget* widget, bool withGUI )
run( calendar, limitDate, widget, withGUI, false );
}
-void EventArchiver::run( Calendar* calendar, const QDate& limitDate, QWidget* widget, bool withGUI, bool errorIfNone )
+void EventArchiver::run( Calendar* calendar, const TQDate& limitDate, TQWidget* widget, bool withGUI, bool errorIfNone )
{
// We need to use rawEvents, otherwise events hidden by filters will not be archived.
Incidence::List incidences;
@@ -80,7 +80,7 @@ void EventArchiver::run( Calendar* calendar, const QDate& limitDate, QWidget* wi
if ( KOPrefs::instance()->mArchiveEvents ) {
events = calendar->rawEvents(
- QDate( 1769, 12, 1 ),
+ TQDate( 1769, 12, 1 ),
// #29555, also advertised by the "limitDate not included" in the class docu
limitDate.addDays( -1 ),
true );
@@ -118,9 +118,9 @@ void EventArchiver::run( Calendar* calendar, const QDate& limitDate, QWidget* wi
}
}
-void EventArchiver::deleteIncidences( Calendar* calendar, const QDate& limitDate, QWidget* widget, const Incidence::List& incidences, bool withGUI )
+void EventArchiver::deleteIncidences( Calendar* calendar, const TQDate& limitDate, TQWidget* widget, const Incidence::List& incidences, bool withGUI )
{
- QStringList incidenceStrs;
+ TQStringList incidenceStrs;
Incidence::List::ConstIterator it;
for( it = incidences.begin(); it != incidences.end(); ++it ) {
incidenceStrs.append( (*it)->summary() );
@@ -141,7 +141,7 @@ void EventArchiver::deleteIncidences( Calendar* calendar, const QDate& limitDate
emit eventsDeleted();
}
-void EventArchiver::archiveIncidences( Calendar* calendar, const QDate& /*limitDate*/, QWidget* widget, const Incidence::List& incidences, bool /*withGUI*/)
+void EventArchiver::archiveIncidences( Calendar* calendar, const TQDate& /*limitDate*/, TQWidget* widget, const Incidence::List& incidences, bool /*withGUI*/)
{
FileStorage storage( calendar );
@@ -166,7 +166,7 @@ void EventArchiver::archiveIncidences( Calendar* calendar, const QDate& /*limitD
// Strip active events from calendar so that only events to be archived
// remain. This is not really efficient, but there is no other easy way.
- QStringList uids;
+ TQStringList uids;
Incidence::List allIncidences = archiveCalendar.rawIncidences();
Incidence::List::ConstIterator it;
for( it = incidences.begin(); it != incidences.end(); ++it ) {
@@ -180,7 +180,7 @@ void EventArchiver::archiveIncidences( Calendar* calendar, const QDate& /*limitD
// Get or create the archive file
KURL archiveURL( KOPrefs::instance()->mArchiveFile );
- QString archiveFile;
+ TQString archiveFile;
if ( KIO::NetAccess::exists( archiveURL, true, widget ) ) {
if( !KIO::NetAccess::download( archiveURL, archiveFile, widget ) ) {
diff --git a/korganizer/eventarchiver.h b/korganizer/eventarchiver.h
index 2826e7a92..4d5a8544d 100644
--- a/korganizer/eventarchiver.h
+++ b/korganizer/eventarchiver.h
@@ -25,8 +25,8 @@
#ifndef EVENTARCHIVER_H
#define EVENTARCHIVER_H
-#include <qobject.h>
-#include <qdatetime.h>
+#include <tqobject.h>
+#include <tqdatetime.h>
#include <libkcal/event.h>
namespace KCal {
@@ -49,7 +49,7 @@ class EventArchiver : public QObject
Q_OBJECT
public:
- EventArchiver( QObject* parent = 0, const char* name = 0 );
+ EventArchiver( TQObject* parent = 0, const char* name = 0 );
virtual ~EventArchiver();
/**
@@ -59,7 +59,7 @@ class EventArchiver : public QObject
* @param widget parent widget for message boxes
* Confirmation and "no events to process" dialogs will be shown
*/
- void runOnce( Calendar* calendar, const QDate& limitDate, QWidget* widget );
+ void runOnce( Calendar* calendar, const TQDate& limitDate, TQWidget* widget );
/**
* Delete or archive events. This is called regularly, when auto-archiving is enabled
@@ -69,16 +69,16 @@ class EventArchiver : public QObject
* Note that error dialogs like "cannot save" are shown even if from this method, so widget
* should be set in all cases.
*/
- void runAuto( Calendar* calendar, QWidget* widget, bool withGUI );
+ void runAuto( Calendar* calendar, TQWidget* widget, bool withGUI );
signals:
void eventsDeleted();
private:
- void run( Calendar* calendar, const QDate& limitDate, QWidget* widget, bool withGUI, bool errorIfNone );
+ void run( Calendar* calendar, const TQDate& limitDate, TQWidget* widget, bool withGUI, bool errorIfNone );
- void deleteIncidences( Calendar* calendar, const QDate& limitDate, QWidget* widget, const Incidence::List& incidences, bool withGUI );
- void archiveIncidences( Calendar* calendar, const QDate& limitDate, QWidget* widget, const Incidence::List& incidences, bool withGUI );
+ void deleteIncidences( Calendar* calendar, const TQDate& limitDate, TQWidget* widget, const Incidence::List& incidences, bool withGUI );
+ void archiveIncidences( Calendar* calendar, const TQDate& limitDate, TQWidget* widget, const Incidence::List& incidences, bool withGUI );
};
#endif /* EVENTARCHIVER_H */
diff --git a/korganizer/exportwebdialog.cpp b/korganizer/exportwebdialog.cpp
index e62b94c93..c926ad053 100644
--- a/korganizer/exportwebdialog.cpp
+++ b/korganizer/exportwebdialog.cpp
@@ -22,19 +22,19 @@
without including the source code for Qt in the source distribution.
*/
-#include <qlayout.h>
-#include <qhgroupbox.h>
-#include <qvgroupbox.h>
-#include <qvbuttongroup.h>
-#include <qradiobutton.h>
-#include <qcheckbox.h>
-#include <qlineedit.h>
-#include <qhbox.h>
-#include <qvbox.h>
-#include <qpushbutton.h>
-#include <qfiledialog.h>
-#include <qtextstream.h>
-#include <qlabel.h>
+#include <tqlayout.h>
+#include <tqhgroupbox.h>
+#include <tqvgroupbox.h>
+#include <tqvbuttongroup.h>
+#include <tqradiobutton.h>
+#include <tqcheckbox.h>
+#include <tqlineedit.h>
+#include <tqhbox.h>
+#include <tqvbox.h>
+#include <tqpushbutton.h>
+#include <tqfiledialog.h>
+#include <tqtextstream.h>
+#include <tqlabel.h>
#include <klocale.h>
#include <kdebug.h>
@@ -68,7 +68,7 @@
// because we want custom buttons, a Tabbed dialog, and a different
// headline... Maybe we should try to achieve the same without code
// duplication.
-ExportWebDialog::ExportWebDialog( HTMLExportSettings *settings, QWidget *parent,
+ExportWebDialog::ExportWebDialog( HTMLExportSettings *settings, TQWidget *parent,
const char *name)
: KDialogBase( Tabbed,i18n("Export Calendar as Web Page"),Help|Default|User1|Cancel, User1, parent, name, false, false, i18n("Export") ),
KPrefsWidManager( settings ), mSettings( settings )
@@ -81,8 +81,8 @@ ExportWebDialog::ExportWebDialog( HTMLExportSettings *settings, QWidget *parent,
// setupFreeBusyPage();
// setupAdvancedPage();
- connect( this, SIGNAL( user1Clicked() ), SLOT( slotOk() ) );
- connect( this, SIGNAL( cancelClicked() ), SLOT( reject() ) );
+ connect( this, TQT_SIGNAL( user1Clicked() ), TQT_SLOT( slotOk() ) );
+ connect( this, TQT_SIGNAL( cancelClicked() ), TQT_SLOT( reject() ) );
readConfig();
}
@@ -137,14 +137,14 @@ void ExportWebDialog::slotDefault()
void ExportWebDialog::setupGeneralPage()
{
mGeneralPage = addPage( i18n("General") );
- QVBoxLayout *topLayout = new QVBoxLayout(mGeneralPage, 10);
+ TQVBoxLayout *topLayout = new TQVBoxLayout(mGeneralPage, 10);
- QGroupBox *rangeGroup = new QHGroupBox( i18n("Date Range"), mGeneralPage );
+ TQGroupBox *rangeGroup = new TQHGroupBox( i18n("Date Range"), mGeneralPage );
topLayout->addWidget( rangeGroup );
addWidDate( mSettings->dateStartItem(), rangeGroup );
addWidDate( mSettings->dateEndItem(), rangeGroup );
- QButtonGroup *typeGroup = new QVButtonGroup( i18n("View Type"), mGeneralPage );
+ TQButtonGroup *typeGroup = new TQVButtonGroup( i18n("View Type"), mGeneralPage );
topLayout->addWidget( typeGroup );
// addWidBool( mSettings->weekViewItem(), typeGroup );
addWidBool( mSettings->monthViewItem(), typeGroup );
@@ -155,17 +155,17 @@ void ExportWebDialog::setupGeneralPage()
addWidBool( mSettings->excludePrivateItem(), typeGroup );
addWidBool( mSettings->excludeConfidentialItem(), typeGroup );
- QGroupBox *destGroup = new QVGroupBox(i18n("Destination"), mGeneralPage );
+ TQGroupBox *destGroup = new TQVGroupBox(i18n("Destination"), mGeneralPage );
topLayout->addWidget(destGroup);
KPrefsWidPath *pathWid = addWidPath( mSettings->outputFileItem(),
destGroup, "text/html", KFile::File );
- connect( pathWid->urlRequester(), SIGNAL( textChanged( const QString & ) ),
- SLOT( slotTextChanged( const QString & ) ) );
+ connect( pathWid->urlRequester(), TQT_SIGNAL( textChanged( const TQString & ) ),
+ TQT_SLOT( slotTextChanged( const TQString & ) ) );
topLayout->addStretch( 1 );
}
-void ExportWebDialog::slotTextChanged( const QString & _text)
+void ExportWebDialog::slotTextChanged( const TQString & _text)
{
enableButton( User1, !_text.isEmpty() );
}
@@ -173,13 +173,13 @@ void ExportWebDialog::slotTextChanged( const QString & _text)
void ExportWebDialog::setupTodoPage()
{
mTodoPage = addPage(i18n("To-dos"));
- QVBoxLayout *topLayout = new QVBoxLayout( mTodoPage, 10 );
+ TQVBoxLayout *topLayout = new TQVBoxLayout( mTodoPage, 10 );
- QHBox *hbox = new QHBox( mTodoPage );
+ TQHBox *hbox = new TQHBox( mTodoPage );
topLayout->addWidget( hbox );
addWidString( mSettings->todoListTitleItem(), hbox );
- QVBox *vbox = new QVBox( mTodoPage );
+ TQVBox *vbox = new TQVBox( mTodoPage );
topLayout->addWidget( vbox );
addWidBool( mSettings->taskDueDateItem(), vbox );
addWidBool( mSettings->taskLocationItem(), vbox );
@@ -194,13 +194,13 @@ void ExportWebDialog::setupTodoPage()
void ExportWebDialog::setupEventPage()
{
mEventPage = addPage(i18n("Events"));
- QVBoxLayout *topLayout = new QVBoxLayout( mEventPage, 10 );
+ TQVBoxLayout *topLayout = new TQVBoxLayout( mEventPage, 10 );
- QHBox *hbox = new QHBox( mEventPage );
+ TQHBox *hbox = new TQHBox( mEventPage );
topLayout->addWidget( hbox );
addWidString( mSettings->eventTitleItem(), hbox );
- QVBox *vbox = new QVBox( mEventPage );
+ TQVBox *vbox = new TQVBox( mEventPage );
topLayout->addWidget( vbox );
addWidBool( mSettings->eventLocationItem(), vbox );
addWidBool( mSettings->eventCategoriesItem(), vbox );
@@ -214,13 +214,13 @@ void ExportWebDialog::setupEventPage()
void ExportWebDialog::setupJournalPage()
{
mJournalPage = addPage(i18n("Journal"));
- QVBoxLayout *topLayout = new QVBoxLayout( mJournalPage, 10 );
+ TQVBoxLayout *topLayout = new TQVBoxLayout( mJournalPage, 10 );
- QHBox *hbox = new QHBox( mJournalPage );
+ TQHBox *hbox = new TQHBox( mJournalPage );
topLayout->addWidget( hbox );
addWidString( mSettings->journalTitleItem(), hbox );
- QVBox *vbox = new QVBox( mJournalPage );
+ TQVBox *vbox = new TQVBox( mJournalPage );
topLayout->addWidget( vbox );
// addWidBool( mSettings->eventExcludeConfidentialItem(), vbox );
@@ -230,13 +230,13 @@ void ExportWebDialog::setupJournalPage()
void ExportWebDialog::setupFreeBusyPage()
{
mFreeBusyPage = addPage(i18n("Free/Busy"));
- QVBoxLayout *topLayout = new QVBoxLayout( mFreeBusyPage, 10 );
+ TQVBoxLayout *topLayout = new TQVBoxLayout( mFreeBusyPage, 10 );
- QHBox *hbox = new QHBox( mFreeBusyPage );
+ TQHBox *hbox = new TQHBox( mFreeBusyPage );
topLayout->addWidget( hbox );
addWidString( mSettings->journalTitleItem(), hbox );
- QVBox *vbox = new QVBox( mFreeBusyPage );
+ TQVBox *vbox = new TQVBox( mFreeBusyPage );
topLayout->addWidget( vbox );
// addWidBool( mSettings->eventExcludeConfidentialItem(), vbox );
@@ -246,9 +246,9 @@ void ExportWebDialog::setupFreeBusyPage()
void ExportWebDialog::setupAdvancedPage()
{
mAdvancedPage = addPage(i18n("Advanced"));
- QVBoxLayout *topLayout = new QVBoxLayout( mAdvancedPage, 10 );
+ TQVBoxLayout *topLayout = new TQVBoxLayout( mAdvancedPage, 10 );
- QVBox *vbox = new QVBox( mAdvancedPage );
+ TQVBox *vbox = new TQVBox( mAdvancedPage );
topLayout->addWidget( vbox );
// addWidBool( mSettings->eventExcludeConfidentialItem(), vbox );
diff --git a/korganizer/exportwebdialog.h b/korganizer/exportwebdialog.h
index ead1e454c..4d2dcd39c 100644
--- a/korganizer/exportwebdialog.h
+++ b/korganizer/exportwebdialog.h
@@ -38,12 +38,12 @@ class ExportWebDialog : public KDialogBase, public KPrefsWidManager
{
Q_OBJECT
public:
- ExportWebDialog( HTMLExportSettings *settings, QWidget *parent = 0,
+ ExportWebDialog( HTMLExportSettings *settings, TQWidget *parent = 0,
const char *name = 0 );
virtual ~ExportWebDialog();
public slots:
- void slotTextChanged( const QString & _text);
+ void slotTextChanged( const TQString & _text);
protected:
void setupGeneralPage();
@@ -73,12 +73,12 @@ class ExportWebDialog : public KDialogBase, public KPrefsWidManager
private:
HTMLExportSettings* mSettings;
- QFrame *mGeneralPage;
- QFrame *mEventPage;
- QFrame *mTodoPage;
-// QFrame *mJournalPage;
-// QFrame *mFreeBusyPage;
-// QFrame *mAdvancedPage;
+ TQFrame *mGeneralPage;
+ TQFrame *mEventPage;
+ TQFrame *mTodoPage;
+// TQFrame *mJournalPage;
+// TQFrame *mFreeBusyPage;
+// TQFrame *mAdvancedPage;
};
#endif // _EXPORTWEBDIALOG_H
diff --git a/korganizer/filtereditdialog.cpp b/korganizer/filtereditdialog.cpp
index 72bf89023..32138bffb 100644
--- a/korganizer/filtereditdialog.cpp
+++ b/korganizer/filtereditdialog.cpp
@@ -24,13 +24,13 @@
without including the source code for Qt in the source distribution.
*/
-#include <qpushbutton.h>
-#include <qcheckbox.h>
-#include <qbuttongroup.h>
-#include <qlineedit.h>
-#include <qradiobutton.h>
-#include <qlistbox.h>
-#include <qwhatsthis.h>
+#include <tqpushbutton.h>
+#include <tqcheckbox.h>
+#include <tqbuttongroup.h>
+#include <tqlineedit.h>
+#include <tqradiobutton.h>
+#include <tqlistbox.h>
+#include <tqwhatsthis.h>
#include <kdebug.h>
#include <klocale.h>
@@ -46,18 +46,18 @@
#include "filtereditdialog.h"
#include "filtereditdialog.moc"
-FilterEditDialog::FilterEditDialog( QPtrList<CalFilter> *filters,
- QWidget *parent, const char *name)
+FilterEditDialog::FilterEditDialog( TQPtrList<CalFilter> *filters,
+ TQWidget *parent, const char *name)
: KDialogBase( parent, name, false, i18n("Edit Calendar Filters"),
Ok | Apply | Cancel )
{
setMainWidget( mFilterEdit = new FilterEdit(filters, this));
- connect(mFilterEdit, SIGNAL(dataConsistent(bool)),
- SLOT(setDialogConsistent(bool)));
+ connect(mFilterEdit, TQT_SIGNAL(dataConsistent(bool)),
+ TQT_SLOT(setDialogConsistent(bool)));
updateFilterList();
- connect( mFilterEdit, SIGNAL( editCategories() ), SIGNAL( editCategories() ) );
- connect( mFilterEdit, SIGNAL( filterChanged() ), SIGNAL( filterChanged() ) );
+ connect( mFilterEdit, TQT_SIGNAL( editCategories() ), TQT_SIGNAL( editCategories() ) );
+ connect( mFilterEdit, TQT_SIGNAL( filterChanged() ), TQT_SIGNAL( filterChanged() ) );
}
FilterEditDialog::~FilterEditDialog()
@@ -92,18 +92,18 @@ void FilterEditDialog::setDialogConsistent(bool consistent) {
enableButtonApply( consistent );
}
-FilterEdit::FilterEdit(QPtrList<CalFilter> *filters, QWidget *parent)
+FilterEdit::FilterEdit(TQPtrList<CalFilter> *filters, TQWidget *parent)
: FilterEdit_base( parent), current(0), mCategorySelectDialog( 0 )
{
mFilters = filters;
- QWhatsThis::add( mNewButton, i18n( "Press this button to define a new filter." ) );
- QWhatsThis::add( mDeleteButton, i18n( "Press this button to remove the currently active filter." ) );
+ TQWhatsThis::add( mNewButton, i18n( "Press this button to define a new filter." ) );
+ TQWhatsThis::add( mDeleteButton, i18n( "Press this button to remove the currently active filter." ) );
- connect( mRulesList, SIGNAL(selectionChanged()), this, SLOT(filterSelected()) );
- connect( mNewButton, SIGNAL( clicked() ), SLOT( bNewPressed() ) );
- connect( mDeleteButton, SIGNAL( clicked() ), SLOT( bDeletePressed() ) );
- connect( mNameLineEdit, SIGNAL( textChanged(const QString &) ), SLOT( updateSelectedName(const QString &) ) );
- connect( mCatEditButton, SIGNAL( clicked() ), SLOT( editCategorySelection() ) );
+ connect( mRulesList, TQT_SIGNAL(selectionChanged()), this, TQT_SLOT(filterSelected()) );
+ connect( mNewButton, TQT_SIGNAL( clicked() ), TQT_SLOT( bNewPressed() ) );
+ connect( mDeleteButton, TQT_SIGNAL( clicked() ), TQT_SLOT( bDeletePressed() ) );
+ connect( mNameLineEdit, TQT_SIGNAL( textChanged(const TQString &) ), TQT_SLOT( updateSelectedName(const TQString &) ) );
+ connect( mCatEditButton, TQT_SIGNAL( clicked() ), TQT_SLOT( editCategorySelection() ) );
}
FilterEdit::~FilterEdit() {
@@ -151,7 +151,7 @@ void FilterEdit::saveChanges()
current->setCriteria( criteria );
current->setCompletedTimeSpan( mCompletedTimeSpan->value() );
- QStringList categoryList;
+ TQStringList categoryList;
for( uint i = 0; i < mCatList->count(); ++i )
categoryList.append( mCatList->text( i ) );
current->setCategoryList( categoryList );
@@ -211,7 +211,7 @@ void FilterEdit::bDeletePressed() {
emit filterChanged();
}
-void FilterEdit::updateSelectedName(const QString &newText) {
+void FilterEdit::updateSelectedName(const TQString &newText) {
mRulesList->blockSignals( true );
mRulesList->changeItem(newText, mRulesList->currentItem());
mRulesList->blockSignals( false );
@@ -231,10 +231,10 @@ void FilterEdit::editCategorySelection()
if ( !mCategorySelectDialog ) {
mCategorySelectDialog = new KPIM::CategorySelectDialog( KOPrefs::instance(), this, "filterCatSelect" );
connect( mCategorySelectDialog,
- SIGNAL( categoriesSelected( const QStringList & ) ),
- SLOT( updateCategorySelection( const QStringList & ) ) );
- connect( mCategorySelectDialog, SIGNAL( editCategories() ),
- SIGNAL( editCategories() ) );
+ TQT_SIGNAL( categoriesSelected( const TQStringList & ) ),
+ TQT_SLOT( updateCategorySelection( const TQStringList & ) ) );
+ connect( mCategorySelectDialog, TQT_SIGNAL( editCategories() ),
+ TQT_SIGNAL( editCategories() ) );
}
mCategorySelectDialog->setSelected( current->categoryList() );
@@ -242,7 +242,7 @@ void FilterEdit::editCategorySelection()
mCategorySelectDialog->show();
}
-void FilterEdit::updateCategorySelection( const QStringList &categories )
+void FilterEdit::updateCategorySelection( const TQStringList &categories )
{
mCatList->clear();
mCatList->insertStringList(categories);
diff --git a/korganizer/filtereditdialog.h b/korganizer/filtereditdialog.h
index b7f061b1c..b726e169f 100644
--- a/korganizer/filtereditdialog.h
+++ b/korganizer/filtereditdialog.h
@@ -46,7 +46,7 @@ class FilterEditDialog : public KDialogBase
{
Q_OBJECT
public:
- FilterEditDialog(QPtrList<CalFilter> *,QWidget *parent=0, const char *name=0);
+ FilterEditDialog(TQPtrList<CalFilter> *,TQWidget *parent=0, const char *name=0);
virtual ~FilterEditDialog();
signals:
@@ -70,7 +70,7 @@ class FilterEdit : public FilterEdit_base
{
Q_OBJECT
public:
- FilterEdit(QPtrList<CalFilter> *filters, QWidget *parent);
+ FilterEdit(TQPtrList<CalFilter> *filters, TQWidget *parent);
~FilterEdit();
void updateFilterList();
@@ -86,14 +86,14 @@ class FilterEdit : public FilterEdit_base
void filterSelected();
void bNewPressed();
void bDeletePressed();
- void updateSelectedName(const QString &);
- void updateCategorySelection(const QStringList &categories);
+ void updateSelectedName(const TQString &);
+ void updateCategorySelection(const TQStringList &categories);
void editCategorySelection();
private:
void filterSelected(CalFilter *f);
- QPtrList<CalFilter> *mFilters;
+ TQPtrList<CalFilter> *mFilters;
CalFilter *current;
KPIM::CategorySelectDialog *mCategorySelectDialog;
};
diff --git a/korganizer/freebusymanager.cpp b/korganizer/freebusymanager.cpp
index fdb4f531b..81b65a3b7 100644
--- a/korganizer/freebusymanager.cpp
+++ b/korganizer/freebusymanager.cpp
@@ -61,25 +61,25 @@
#include <kabc/stdaddressbook.h>
#include <kabc/addressee.h>
-#include <qfile.h>
-#include <qbuffer.h>
-#include <qregexp.h>
-#include <qdir.h>
+#include <tqfile.h>
+#include <tqbuffer.h>
+#include <tqregexp.h>
+#include <tqdir.h>
#define DEBUG_5850 kdDebug(5850)
using namespace KCal;
-FreeBusyDownloadJob::FreeBusyDownloadJob( const QString &email, const KURL &url,
+FreeBusyDownloadJob::FreeBusyDownloadJob( const TQString &email, const KURL &url,
FreeBusyManager *manager,
const char *name )
- : QObject( manager, name ), mManager( manager ), mEmail( email )
+ : TQObject( manager, name ), mManager( manager ), mEmail( email )
{
KIO::TransferJob *job = KIO::get( url, false, false );
- 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 & ) ) );
KIO::Scheduler::scheduleJob( job );
}
@@ -88,9 +88,9 @@ FreeBusyDownloadJob::~FreeBusyDownloadJob()
}
-void FreeBusyDownloadJob::slotData( KIO::Job *, const QByteArray &data )
+void FreeBusyDownloadJob::slotData( KIO::Job *, const TQByteArray &data )
{
- QByteArray tmp = data;
+ TQByteArray tmp = data;
tmp.resize( tmp.size() + 1 );
tmp[tmp.size()-1] = 0;
mFreeBusyData += tmp;
@@ -117,8 +117,8 @@ void FreeBusyDownloadJob::slotResult( KIO::Job *job )
////
-FreeBusyManager::FreeBusyManager( QObject *parent, const char *name )
- : QObject( parent, name ),
+FreeBusyManager::FreeBusyManager( TQObject *parent, const char *name )
+ : TQObject( parent, name ),
mCalendar( 0 ), mTimerID( 0 ), mUploadingFreeBusy( false ),
mBrokenUrl( false )
{
@@ -134,8 +134,8 @@ void FreeBusyManager::setCalendar( KCal::Calendar *c )
KCal::FreeBusy *FreeBusyManager::ownerFreeBusy()
{
- QDateTime start = QDateTime::currentDateTime();
- QDateTime end = start.addDays( KOPrefs::instance()->mFreeBusyPublishDays );
+ TQDateTime start = TQDateTime::currentDateTime();
+ TQDateTime end = start.addDays( KOPrefs::instance()->mFreeBusyPublishDays );
FreeBusy *freebusy = new FreeBusy( mCalendar, start, end );
freebusy->setOrganizer( Person( KOPrefs::instance()->fullName(),
@@ -144,18 +144,18 @@ KCal::FreeBusy *FreeBusyManager::ownerFreeBusy()
return freebusy;
}
-QString FreeBusyManager::ownerFreeBusyAsString()
+TQString FreeBusyManager::ownerFreeBusyAsString()
{
FreeBusy *freebusy = ownerFreeBusy();
- QString result = freeBusyToIcal( freebusy );
+ TQString result = freeBusyToIcal( freebusy );
delete freebusy;
return result;
}
-QString FreeBusyManager::freeBusyToIcal( KCal::FreeBusy *freebusy )
+TQString FreeBusyManager::freeBusyToIcal( KCal::FreeBusy *freebusy )
{
return mFormat.createScheduleMessage( freebusy, Scheduler::Publish );
}
@@ -170,13 +170,13 @@ void FreeBusyManager::slotPerhapsUploadFB()
// A timer is already running, so we don't need to do anything
return;
- int now = static_cast<int>( QDateTime::currentDateTime().toTime_t() );
+ int now = static_cast<int>( TQDateTime::currentDateTime().toTime_t() );
int eta = static_cast<int>( mNextUploadTime.toTime_t() ) - now;
if( !mUploadingFreeBusy ) {
// Not currently uploading
if( mNextUploadTime.isNull() ||
- QDateTime::currentDateTime() > mNextUploadTime ) {
+ TQDateTime::currentDateTime() > mNextUploadTime ) {
// No uploading have been done in this session, or delay time is over
publishFreeBusy();
return;
@@ -205,7 +205,7 @@ void FreeBusyManager::slotPerhapsUploadFB()
}
// This is used for delayed Free/Busy list uploading
-void FreeBusyManager::timerEvent( QTimerEvent* )
+void FreeBusyManager::timerEvent( TQTimerEvent* )
{
publishFreeBusy();
}
@@ -245,11 +245,11 @@ void FreeBusyManager::publishFreeBusy()
}
// // Substitute %u and %d [FIXME]
-// QString defaultEmail = KOCore()::self()->email();
+// TQString defaultEmail = KOCore()::self()->email();
// int emailpos = defaultEmail.find( '@' );
// if (emailpos != -1) {
-// const QString emailName = defaultEmail.left( emailpos );
-// const QString emailHost = defaultEmail.mid( emailpos + 1 );
+// const TQString emailName = defaultEmail.left( emailpos );
+// const TQString emailHost = defaultEmail.mid( emailpos + 1 );
// targetURL = targetURL.url().replace("%25u", emailName, true);
// targetURL = targetURL.url().replace("%25d", emailHost, true);
// }
@@ -265,34 +265,34 @@ void FreeBusyManager::publishFreeBusy()
}
// Save the time of the next free/busy uploading
- mNextUploadTime = QDateTime::currentDateTime();
+ mNextUploadTime = TQDateTime::currentDateTime();
if( KOPrefs::instance()->mFreeBusyPublishDelay > 0 )
mNextUploadTime = mNextUploadTime.addSecs(
KOPrefs::instance()->mFreeBusyPublishDelay * 60 );
- QString messageText = ownerFreeBusyAsString();
+ TQString messageText = ownerFreeBusyAsString();
// We need to massage the list a bit so that Outlook understands
// it.
- messageText = messageText.replace( QRegExp( "ORGANIZER\\s*:MAILTO:" ),
+ messageText = messageText.replace( TQRegExp( "ORGANIZER\\s*:MAILTO:" ),
"ORGANIZER:" );
// Create a local temp file and save the message to it
KTempFile tempFile;
- QTextStream *textStream = tempFile.textStream();
+ TQTextStream *textStream = tempFile.textStream();
if( textStream ) {
*textStream << messageText;
tempFile.close();
#if 0
- QString defaultEmail = KOCore()::self()->email();
- QString emailHost = defaultEmail.mid( defaultEmail.find( '@' ) + 1 );
+ TQString defaultEmail = KOCore()::self()->email();
+ TQString emailHost = defaultEmail.mid( defaultEmail.find( '@' ) + 1 );
// Put target string together
KURL targetURL;
if( KOPrefs::instance()->mPublishKolab ) {
// we use Kolab
- QString server;
+ TQString server;
if( KOPrefs::instance()->mPublishKolabServer == "%SERVER%" ||
KOPrefs::instance()->mPublishKolabServer.isEmpty() )
server = emailHost;
@@ -302,7 +302,7 @@ void FreeBusyManager::publishFreeBusy()
targetURL.setProtocol( "webdavs" );
targetURL.setHost( server );
- QString fbname = KOPrefs::instance()->mPublishUserName;
+ TQString fbname = KOPrefs::instance()->mPublishUserName;
int at = fbname.find('@');
if( at > 1 && fbname.length() > (uint)at ) {
fbname = fbname.left(at);
@@ -329,8 +329,8 @@ void FreeBusyManager::publishFreeBusy()
true /*overwrite*/,
false /*don't resume*/,
false /*don't show progress info*/ );
- connect( job, SIGNAL( result( KIO::Job * ) ),
- SLOT( slotUploadFreeBusyResult( KIO::Job * ) ) );
+ connect( job, TQT_SIGNAL( result( KIO::Job * ) ),
+ TQT_SLOT( slotUploadFreeBusyResult( KIO::Job * ) ) );
}
}
@@ -349,11 +349,11 @@ void FreeBusyManager::slotUploadFreeBusyResult(KIO::Job *_job)
KURL src = job->srcURL();
Q_ASSERT( src.isLocalFile() );
if( src.isLocalFile() )
- QFile::remove(src.path());
+ TQFile::remove(src.path());
mUploadingFreeBusy = false;
}
-bool FreeBusyManager::retrieveFreeBusy( const QString &email, bool forceDownload )
+bool FreeBusyManager::retrieveFreeBusy( const TQString &email, bool forceDownload )
{
DEBUG_5850 << "FreeBusyManager::retrieveFreeBusy(): " << email << endl;
if ( email.isEmpty() ) return false;
@@ -381,7 +381,7 @@ bool FreeBusyManager::processRetrieveQueue()
{
if ( mRetrieveQueue.isEmpty() ) return true;
- QString email = mRetrieveQueue.first();
+ TQString email = mRetrieveQueue.first();
mRetrieveQueue.pop_front();
KURL sourceURL = freeBusyUrl( email );
@@ -397,20 +397,20 @@ bool FreeBusyManager::processRetrieveQueue()
FreeBusyDownloadJob *job = new FreeBusyDownloadJob( email, sourceURL, this,
"freebusy_download_job" );
- connect( job, SIGNAL( freeBusyDownloaded( KCal::FreeBusy *,
- const QString & ) ),
- SIGNAL( freeBusyRetrieved( KCal::FreeBusy *, const QString & ) ) );
- connect( job, SIGNAL( freeBusyDownloaded( KCal::FreeBusy *,
- const QString & ) ),
- SLOT( processRetrieveQueue() ) );
+ connect( job, TQT_SIGNAL( freeBusyDownloaded( KCal::FreeBusy *,
+ const TQString & ) ),
+ TQT_SIGNAL( freeBusyRetrieved( KCal::FreeBusy *, const TQString & ) ) );
+ connect( job, TQT_SIGNAL( freeBusyDownloaded( KCal::FreeBusy *,
+ const TQString & ) ),
+ TQT_SLOT( processRetrieveQueue() ) );
- connect( job, SIGNAL( freeBusyDownloadError( const QString& ) ),
- this, SLOT( slotFreeBusyDownloadError( const QString& ) ) );
+ connect( job, TQT_SIGNAL( freeBusyDownloadError( const TQString& ) ),
+ this, TQT_SLOT( slotFreeBusyDownloadError( const TQString& ) ) );
return true;
}
-void FreeBusyManager::slotFreeBusyDownloadError( const QString& email )
+void FreeBusyManager::slotFreeBusyDownloadError( const TQString& email )
{
if( KOPrefs::instance()->thatIsMe( email ) ) {
// We tried to download our own free-busy list from the net, but it failed
@@ -429,16 +429,16 @@ void FreeBusyManager::cancelRetrieval()
mRetrieveQueue.clear();
}
-KURL FreeBusyManager::freeBusyUrl( const QString &email )
+KURL FreeBusyManager::freeBusyUrl( const TQString &email )
{
DEBUG_5850 << "FreeBusyManager::freeBusyUrl(): " << email << endl;
// First check if there is a specific FB url for this email
- QString configFile = locateLocal( "data", "korganizer/freebusyurls" );
+ TQString configFile = locateLocal( "data", "korganizer/freebusyurls" );
KConfig cfg( configFile );
cfg.setGroup( email );
- QString url = cfg.readEntry( "url" );
+ TQString url = cfg.readEntry( "url" );
if ( !url.isEmpty() ) {
DEBUG_5850 << "found cached url: " << url << endl;
return KURL( url );
@@ -446,7 +446,7 @@ KURL FreeBusyManager::freeBusyUrl( const QString &email )
// Try with the url configurated by preferred email in kaddressbook
KABC::Addressee::List list= KABC::StdAddressBook::self( true )->findByEmail( email );
KABC::Addressee::List::Iterator it;
- QString pref;
+ TQString pref;
for ( it = list.begin(); it != list.end(); ++it ) {
pref = (*it).preferredEmail();
if ( !pref.isEmpty() && pref != email ) {
@@ -476,8 +476,8 @@ KURL FreeBusyManager::freeBusyUrl( const QString &email )
}
// Cut off everything left of the @ sign to get the user name.
- const QString emailName = email.left( emailpos );
- const QString emailHost = email.mid( emailpos + 1 );
+ const TQString emailName = email.left( emailpos );
+ const TQString emailHost = email.mid( emailpos + 1 );
// Build the URL
KURL sourceURL;
@@ -486,7 +486,7 @@ KURL FreeBusyManager::freeBusyUrl( const QString &email )
if ( KOPrefs::instance()->mFreeBusyCheckHostname ) {
// Don't try to fetch free/busy data for users not on the specified servers
// This tests if the hostnames match, or one is a subset of the other
- const QString hostDomain = sourceURL.host();
+ const TQString hostDomain = sourceURL.host();
if ( hostDomain != emailHost && !hostDomain.endsWith( '.' + emailHost )
&& !emailHost.endsWith( '.' + hostDomain ) ) {
// Host names do not match
@@ -524,12 +524,12 @@ KURL FreeBusyManager::freeBusyUrl( const QString &email )
}
}
-KCal::FreeBusy *FreeBusyManager::iCalToFreeBusy( const QCString &data )
+KCal::FreeBusy *FreeBusyManager::iCalToFreeBusy( const TQCString &data )
{
DEBUG_5850 << "FreeBusyManager::iCalToFreeBusy()" << endl;
DEBUG_5850 << data << endl;
- QString freeBusyVCal = QString::fromUtf8( data );
+ TQString freeBusyVCal = TQString::fromUtf8( data );
KCal::FreeBusy *fb = mFormat.parseFreeBusy( freeBusyVCal );
if ( !fb ) {
DEBUG_5850 << "FreeBusyManager::iCalToFreeBusy(): Error parsing free/busy"
@@ -539,18 +539,18 @@ KCal::FreeBusy *FreeBusyManager::iCalToFreeBusy( const QCString &data )
return fb;
}
-QString FreeBusyManager::freeBusyDir()
+TQString FreeBusyManager::freeBusyDir()
{
return locateLocal( "data", "korganizer/freebusy" );
}
-FreeBusy *FreeBusyManager::loadFreeBusy( const QString &email )
+FreeBusy *FreeBusyManager::loadFreeBusy( const TQString &email )
{
DEBUG_5850 << "FreeBusyManager::loadFreeBusy(): " << email << endl;
- QString fbd = freeBusyDir();
+ TQString fbd = freeBusyDir();
- QFile f( fbd + "/" + email + ".ifb" );
+ TQFile f( fbd + "/" + email + ".ifb" );
if ( !f.exists() ) {
DEBUG_5850 << "FreeBusyManager::loadFreeBusy() " << f.name()
<< " doesn't exist." << endl;
@@ -563,8 +563,8 @@ FreeBusy *FreeBusyManager::loadFreeBusy( const QString &email )
return 0;
}
- QTextStream ts( &f );
- QString str = ts.read();
+ TQTextStream ts( &f );
+ TQString str = ts.read();
return iCalToFreeBusy( str.utf8() );
}
@@ -573,9 +573,9 @@ bool FreeBusyManager::saveFreeBusy( FreeBusy *freebusy, const Person &person )
{
DEBUG_5850 << "FreeBusyManager::saveFreeBusy(): " << person.fullName() << endl;
- QString fbd = freeBusyDir();
+ TQString fbd = freeBusyDir();
- QDir freeBusyDirectory( fbd );
+ TQDir freeBusyDirectory( fbd );
if ( !freeBusyDirectory.exists() ) {
DEBUG_5850 << "Directory " << fbd << " does not exist!" << endl;
DEBUG_5850 << "Creating directory: " << fbd << endl;
@@ -586,11 +586,11 @@ bool FreeBusyManager::saveFreeBusy( FreeBusy *freebusy, const Person &person )
}
}
- QString filename( fbd );
+ TQString filename( fbd );
filename += "/";
filename += person.email();
filename += ".ifb";
- QFile f( filename );
+ TQFile f( filename );
DEBUG_5850 << "FreeBusyManager::saveFreeBusy(): filename: " << filename
<< endl;
@@ -598,7 +598,7 @@ bool FreeBusyManager::saveFreeBusy( FreeBusy *freebusy, const Person &person )
freebusy->clearAttendees();
freebusy->setOrganizer( person );
- QString messageText = mFormat.createScheduleMessage( freebusy,
+ TQString messageText = mFormat.createScheduleMessage( freebusy,
Scheduler::Publish );
if ( !f.open( IO_ReadWrite ) ) {
@@ -606,7 +606,7 @@ bool FreeBusyManager::saveFreeBusy( FreeBusy *freebusy, const Person &person )
<< endl;
return false;
}
- QTextStream t( &f );
+ TQTextStream t( &f );
t << messageText;
f.close();
diff --git a/korganizer/freebusymanager.h b/korganizer/freebusymanager.h
index c51af125b..a91d9f36d 100644
--- a/korganizer/freebusymanager.h
+++ b/korganizer/freebusymanager.h
@@ -39,8 +39,8 @@
#include <kurl.h>
#include <libkcal/icalformat.h>
#include <libkcal/freebusycache.h>
-#include <qstring.h>
-#include <qobject.h>
+#include <tqstring.h>
+#include <tqobject.h>
namespace KIO { class Job; }
namespace KCal {
@@ -56,31 +56,31 @@ class FreeBusyDownloadJob : public QObject
{
Q_OBJECT
public:
- FreeBusyDownloadJob( const QString &email, const KURL &url,
+ FreeBusyDownloadJob( const TQString &email, const KURL &url,
FreeBusyManager *manager, const char *name = 0 );
virtual ~FreeBusyDownloadJob();
protected slots:
void slotResult( KIO::Job * );
- void slotData( KIO::Job *, const QByteArray &data );
+ void slotData( KIO::Job *, const TQByteArray &data );
signals:
- void freeBusyDownloaded( KCal::FreeBusy *, const QString& email );
- void freeBusyDownloadError( const QString& email );
+ void freeBusyDownloaded( KCal::FreeBusy *, const TQString& email );
+ void freeBusyDownloadError( const TQString& email );
private:
FreeBusyManager *mManager;
- QString mEmail;
+ TQString mEmail;
- QCString mFreeBusyData;
+ TQCString mFreeBusyData;
};
-class FreeBusyManager : public QObject, public KCal::FreeBusyCache
+class FreeBusyManager : public TQObject, public KCal::FreeBusyCache
{
Q_OBJECT
public:
- FreeBusyManager( QObject *parent, const char *name );
+ FreeBusyManager( TQObject *parent, const char *name );
void setCalendar( KCal::Calendar * );
@@ -91,35 +91,35 @@ class FreeBusyManager : public QObject, public KCal::FreeBusyCache
KOrganizer downloads somebody else's free/busy list
The call is asynchronous, and upon download, the
receivers slot specified by member will be called.
- The slot should be of type "member(const QString&, KCal::FreeBusy*)"
+ The slot should be of type "member(const TQString&, KCal::FreeBusy*)"
Return true if a download is initiated, and false otherwise
*/
- bool retrieveFreeBusy( const QString &email, bool forceDownload );
+ bool retrieveFreeBusy( const TQString &email, bool forceDownload );
void cancelRetrieval();
- KCal::FreeBusy *iCalToFreeBusy( const QCString &data );
+ KCal::FreeBusy *iCalToFreeBusy( const TQCString &data );
/**
Load freebusy information belonging to email.
*/
- KCal::FreeBusy *loadFreeBusy( const QString &email );
+ KCal::FreeBusy *loadFreeBusy( const TQString &email );
/**
Store freebusy information belonging to email.
*/
bool saveFreeBusy( KCal::FreeBusy *freebusy, const KCal::Person &person );
-// bool saveFreeBusy( KCal::FreeBusy *, const QString &email );
+// bool saveFreeBusy( KCal::FreeBusy *, const TQString &email );
/**
Return URL of freeBusy information for given email address.
*/
- KURL freeBusyUrl( const QString &email );
+ KURL freeBusyUrl( const TQString &email );
/**
Return directory used for stroing free/busy information.
*/
- QString freeBusyDir();
+ TQString freeBusyDir();
/**
Change the broken Url status
@@ -135,15 +135,15 @@ class FreeBusyManager : public QObject, public KCal::FreeBusyCache
/**
This signal is emitted to return results of free/busy requests.
*/
- void freeBusyRetrieved( KCal::FreeBusy *, const QString &email );
+ void freeBusyRetrieved( KCal::FreeBusy *, const TQString &email );
protected:
- void timerEvent( QTimerEvent* );
+ void timerEvent( TQTimerEvent* );
/**
Return free/busy list of calendar owner as iCalendar string.
*/
- QString ownerFreeBusyAsString();
+ TQString ownerFreeBusyAsString();
/**
Return free/busy list of calendar owner.
@@ -153,23 +153,23 @@ class FreeBusyManager : public QObject, public KCal::FreeBusyCache
/**
Convert free/busy object to iCalendar string.
*/
- QString freeBusyToIcal( KCal::FreeBusy * );
+ TQString freeBusyToIcal( KCal::FreeBusy * );
protected slots:
bool processRetrieveQueue();
private slots:
void slotUploadFreeBusyResult( KIO::Job * );
- void slotFreeBusyDownloadError( const QString& email );
+ void slotFreeBusyDownloadError( const TQString& email );
private:
KCal::Calendar *mCalendar;
KCal::ICalFormat mFormat;
- QStringList mRetrieveQueue;
+ TQStringList mRetrieveQueue;
// Free/Busy uploading
- QDateTime mNextUploadTime;
+ TQDateTime mNextUploadTime;
int mTimerID;
bool mUploadingFreeBusy;
bool mBrokenUrl;
diff --git a/korganizer/freebusyurldialog.cpp b/korganizer/freebusyurldialog.cpp
index 39e4c14ed..61165545d 100644
--- a/korganizer/freebusyurldialog.cpp
+++ b/korganizer/freebusyurldialog.cpp
@@ -32,17 +32,17 @@
#include <kdebug.h>
#include <kstandarddirs.h>
-#include <qlayout.h>
-#include <qlabel.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
-FreeBusyUrlDialog::FreeBusyUrlDialog( KCal::Attendee *attendee, QWidget *parent,
+FreeBusyUrlDialog::FreeBusyUrlDialog( KCal::Attendee *attendee, TQWidget *parent,
const char *name )
: KDialogBase( Plain, i18n("Edit Free/Busy Location"), Ok|Cancel, Ok, parent,
name, true, false )
{
- QFrame *topFrame = plainPage();
+ TQFrame *topFrame = plainPage();
- QBoxLayout *topLayout = new QVBoxLayout( topFrame, 0, spacingHint() );
+ TQBoxLayout *topLayout = new TQVBoxLayout( topFrame, 0, spacingHint() );
mWidget = new FreeBusyUrlWidget( attendee, topFrame );
topLayout->addWidget( mWidget );
@@ -57,14 +57,14 @@ void FreeBusyUrlDialog::slotOk()
}
-FreeBusyUrlWidget::FreeBusyUrlWidget( KCal::Attendee *attendee, QWidget *parent,
+FreeBusyUrlWidget::FreeBusyUrlWidget( KCal::Attendee *attendee, TQWidget *parent,
const char *name )
- : QWidget( parent, name ), mAttendee( attendee )
+ : TQWidget( parent, name ), mAttendee( attendee )
{
- QBoxLayout *topLayout = new QVBoxLayout( this );
+ TQBoxLayout *topLayout = new TQVBoxLayout( this );
topLayout->setSpacing( KDialog::spacingHint() );
- QLabel *label = new QLabel(
+ TQLabel *label = new TQLabel(
i18n("Location of Free/Busy information for %1 <%2>:")
.arg( mAttendee->name() ).arg( mAttendee->email() ), this );
topLayout->addWidget( label );
@@ -81,7 +81,7 @@ void FreeBusyUrlWidget::loadConfig()
{
kdDebug(5850) << "FreeBusyUrlWidget::loadConfig()" << endl;
- QString url = KCal::FreeBusyUrlStore::self()->readUrl( mAttendee->email() );
+ TQString url = KCal::FreeBusyUrlStore::self()->readUrl( mAttendee->email() );
mUrlEdit->setText( url );
}
@@ -90,7 +90,7 @@ void FreeBusyUrlWidget::saveConfig()
{
kdDebug(5850) << "FreeBusyUrlWidget::saveConfig()" << endl;
- QString url = mUrlEdit->text();
+ TQString url = mUrlEdit->text();
KCal::FreeBusyUrlStore::self()->writeUrl( mAttendee->email(), url );
diff --git a/korganizer/freebusyurldialog.h b/korganizer/freebusyurldialog.h
index db5cff6c0..49c77f3f8 100644
--- a/korganizer/freebusyurldialog.h
+++ b/korganizer/freebusyurldialog.h
@@ -37,7 +37,7 @@ class FreeBusyUrlDialog : public KDialogBase
{
Q_OBJECT
public:
- FreeBusyUrlDialog( KCal::Attendee *, QWidget *parent = 0,
+ FreeBusyUrlDialog( KCal::Attendee *, TQWidget *parent = 0,
const char *name = 0 );
public slots:
@@ -51,7 +51,7 @@ class FreeBusyUrlWidget : public QWidget
{
Q_OBJECT
public:
- FreeBusyUrlWidget( KCal::Attendee *, QWidget *parent = 0,
+ FreeBusyUrlWidget( KCal::Attendee *, TQWidget *parent = 0,
const char *name = 0 );
~FreeBusyUrlWidget();
diff --git a/korganizer/history.cpp b/korganizer/history.cpp
index 5afc325e7..6207ebec9 100644
--- a/korganizer/history.cpp
+++ b/korganizer/history.cpp
@@ -57,7 +57,7 @@ void History::undo()
entry = mUndoEntry.current();
if ( entry ) emit undoAvailable( entry->text() );
- else emit undoAvailable( QString::null );
+ else emit undoAvailable( TQString::null );
}
void History::redo()
@@ -76,7 +76,7 @@ void History::redo()
entry = mRedoEntry.current();
if ( entry ) emit redoAvailable( entry->text() );
- else emit redoAvailable( QString::null );
+ else emit redoAvailable( TQString::null );
}
void History::truncate()
@@ -84,8 +84,8 @@ void History::truncate()
while ( mUndoEntry.current() != mEntries.last() ) {
mEntries.removeLast();
}
- mRedoEntry = QPtrList<Entry>( mEntries );
- emit redoAvailable( QString::null );
+ mRedoEntry = TQPtrList<Entry>( mEntries );
+ emit redoAvailable( TQString::null );
}
void History::recordDelete( Incidence *incidence )
@@ -97,7 +97,7 @@ void History::recordDelete( Incidence *incidence )
truncate();
mEntries.append( entry );
mUndoEntry.toLast();
- mRedoEntry = QPtrList<Entry>( mEntries );
+ mRedoEntry = TQPtrList<Entry>( mEntries );
emit undoAvailable( entry->text() );
}
}
@@ -111,7 +111,7 @@ void History::recordAdd( Incidence *incidence )
truncate();
mEntries.append( entry );
mUndoEntry.toLast();
- mRedoEntry = QPtrList<Entry>( mEntries );
+ mRedoEntry = TQPtrList<Entry>( mEntries );
emit undoAvailable( entry->text() );
}
}
@@ -125,12 +125,12 @@ void History::recordEdit( Incidence *oldIncidence, Incidence *newIncidence )
truncate();
mEntries.append( entry );
mUndoEntry.toLast();
- mRedoEntry = QPtrList<Entry>( mEntries );
+ mRedoEntry = TQPtrList<Entry>( mEntries );
emit undoAvailable( entry->text() );
}
}
-void History::startMultiModify( const QString &description )
+void History::startMultiModify( const TQString &description )
{
if ( mCurrentMultiEntry ) {
endMultiModify();
@@ -139,7 +139,7 @@ void History::startMultiModify( const QString &description )
truncate();
mEntries.append( mCurrentMultiEntry );
mUndoEntry.toLast();
- mRedoEntry = QPtrList<Entry>( mEntries );
+ mRedoEntry = TQPtrList<Entry>( mEntries );
emit undoAvailable( mCurrentMultiEntry->text() );
}
@@ -180,7 +180,7 @@ void History::EntryDelete::redo()
mCalendar->deleteIncidence( incidence );
}
-QString History::EntryDelete::text()
+TQString History::EntryDelete::text()
{
return i18n("Delete %1").arg(mIncidence->type());
}
@@ -209,7 +209,7 @@ void History::EntryAdd::redo()
mCalendar->addIncidence( mIncidence->clone() );
}
-QString History::EntryAdd::text()
+TQString History::EntryAdd::text()
{
return i18n("Add %1").arg(mIncidence->type());
}
@@ -246,12 +246,12 @@ void History::EntryEdit::redo()
mCalendar->addIncidence( mNewIncidence->clone() );
}
-QString History::EntryEdit::text()
+TQString History::EntryEdit::text()
{
return i18n("Edit %1").arg(mNewIncidence->type());
}
-History::MultiEntry::MultiEntry( Calendar *calendar, const QString &text )
+History::MultiEntry::MultiEntry( Calendar *calendar, const TQString &text )
: Entry( calendar ), mText( text )
{
mEntries.setAutoDelete( true );
@@ -268,7 +268,7 @@ void History::MultiEntry::appendEntry( Entry* entry )
void History::MultiEntry::undo()
{
- QPtrListIterator<Entry> it( mEntries );
+ TQPtrListIterator<Entry> it( mEntries );
it.toLast();
Entry *entry;
while ( (entry = it.current()) != 0 ) {
@@ -279,7 +279,7 @@ void History::MultiEntry::undo()
void History::MultiEntry::redo()
{
- QPtrListIterator<Entry> it( mEntries );
+ TQPtrListIterator<Entry> it( mEntries );
Entry *entry;
while ( (entry = it.current()) != 0 ) {
++it;
@@ -287,7 +287,7 @@ void History::MultiEntry::redo()
}
}
-QString History::MultiEntry::text()
+TQString History::MultiEntry::text()
{
return mText;
}
diff --git a/korganizer/history.h b/korganizer/history.h
index a6d6a9f6f..4e71dea14 100644
--- a/korganizer/history.h
+++ b/korganizer/history.h
@@ -24,8 +24,8 @@
#ifndef KORG_HISTORY_H
#define KORG_HISTORY_H
-#include <qobject.h>
-#include <qptrlist.h>
+#include <tqobject.h>
+#include <tqptrlist.h>
namespace KCal {
@@ -46,7 +46,7 @@ class History : public QObject
void recordAdd( KCal::Incidence * );
void recordEdit( KCal::Incidence *oldIncidence,
KCal::Incidence *newIncidence );
- void startMultiModify( const QString &description );
+ void startMultiModify( const TQString &description );
void endMultiModify();
public slots:
@@ -57,8 +57,8 @@ class History : public QObject
void undone();
void redone();
- void undoAvailable( const QString & );
- void redoAvailable( const QString & );
+ void undoAvailable( const TQString & );
+ void redoAvailable( const TQString & );
protected:
void truncate();
@@ -74,7 +74,7 @@ class History : public QObject
virtual void undo() = 0;
virtual void redo() = 0;
- virtual QString text() = 0;
+ virtual TQString text() = 0;
protected:
KCal::Calendar *mCalendar;
@@ -89,7 +89,7 @@ class History : public QObject
void undo();
void redo();
- QString text();
+ TQString text();
private:
KCal::Incidence *mIncidence;
@@ -104,7 +104,7 @@ class History : public QObject
void undo();
void redo();
- QString text();
+ TQString text();
private:
KCal::Incidence *mIncidence;
@@ -120,7 +120,7 @@ class History : public QObject
void undo();
void redo();
- QString text();
+ TQString text();
private:
KCal::Incidence *mOldIncidence;
@@ -130,26 +130,26 @@ class History : public QObject
class MultiEntry : public Entry
{
public:
- MultiEntry( KCal::Calendar *calendar, const QString &text );
+ MultiEntry( KCal::Calendar *calendar, const TQString &text );
~MultiEntry();
void appendEntry( Entry* entry );
void undo();
void redo();
- QString text();
+ TQString text();
private:
- QPtrList<Entry> mEntries;
- QString mText;
+ TQPtrList<Entry> mEntries;
+ TQString mText;
};
KCal::Calendar *mCalendar;
MultiEntry *mCurrentMultiEntry;
- QPtrList<Entry> mEntries;
- QPtrListIterator<Entry> mUndoEntry;
- QPtrListIterator<Entry> mRedoEntry;
+ TQPtrList<Entry> mEntries;
+ TQPtrListIterator<Entry> mUndoEntry;
+ TQPtrListIterator<Entry> mRedoEntry;
};
}
diff --git a/korganizer/importdialog.cpp b/korganizer/importdialog.cpp
index a07d0ef1c..f1181225d 100644
--- a/korganizer/importdialog.cpp
+++ b/korganizer/importdialog.cpp
@@ -30,36 +30,36 @@
#include <klocale.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qradiobutton.h>
-#include <qbuttongroup.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqradiobutton.h>
+#include <tqbuttongroup.h>
using namespace KCal;
-ImportDialog::ImportDialog( const KURL &url, QWidget *parent )
+ImportDialog::ImportDialog( const KURL &url, TQWidget *parent )
: KDialogBase( Plain, i18n("Import Calendar"), Ok | Cancel, Ok, parent,
0, true, true ),
mUrl( url )
{
- QFrame *topFrame = plainPage();
- QVBoxLayout *topLayout = new QVBoxLayout( topFrame, 0, spacingHint() );
+ TQFrame *topFrame = plainPage();
+ TQVBoxLayout *topLayout = new TQVBoxLayout( topFrame, 0, spacingHint() );
- QString txt = i18n("Import calendar at '%1' into KOrganizer.")
+ TQString txt = i18n("Import calendar at '%1' into KOrganizer.")
.arg( mUrl.prettyURL() );
- topLayout->addWidget( new QLabel( txt, topFrame ) );
+ topLayout->addWidget( new TQLabel( txt, topFrame ) );
- QButtonGroup *radioBox = new QButtonGroup( 1, Horizontal, topFrame );
+ TQButtonGroup *radioBox = new TQButtonGroup( 1, Horizontal, topFrame );
radioBox->setFlat( true );
topLayout->addWidget( radioBox );
- mAddButton = new QRadioButton( i18n("Add as new calendar"), radioBox );
+ mAddButton = new TQRadioButton( i18n("Add as new calendar"), radioBox );
- mMergeButton = new QRadioButton( i18n("Merge into existing calendar"),
+ mMergeButton = new TQRadioButton( i18n("Merge into existing calendar"),
radioBox );
- mOpenButton = new QRadioButton( i18n("Open in separate window"), radioBox );
+ mOpenButton = new TQRadioButton( i18n("Open in separate window"), radioBox );
mAddButton->setChecked( true );
}
diff --git a/korganizer/importdialog.h b/korganizer/importdialog.h
index a62ffb3e7..f2cf436a4 100644
--- a/korganizer/importdialog.h
+++ b/korganizer/importdialog.h
@@ -36,7 +36,7 @@ class ImportDialog : public KDialogBase
{
Q_OBJECT
public:
- ImportDialog( const KURL &url, QWidget *parent );
+ ImportDialog( const KURL &url, TQWidget *parent );
~ImportDialog();
public slots:
@@ -51,9 +51,9 @@ class ImportDialog : public KDialogBase
private:
KURL mUrl;
- QRadioButton *mAddButton;
- QRadioButton *mMergeButton;
- QRadioButton *mOpenButton;
+ TQRadioButton *mAddButton;
+ TQRadioButton *mMergeButton;
+ TQRadioButton *mOpenButton;
};
#endif
diff --git a/korganizer/incidencechanger.cpp b/korganizer/incidencechanger.cpp
index d440f0842..623eaa944 100644
--- a/korganizer/incidencechanger.cpp
+++ b/korganizer/incidencechanger.cpp
@@ -97,10 +97,10 @@ kdDebug(5850)<<"IncidenceChanger::deleteIncidence for incidence \""<<incidence->
emit incidenceToBeDeleted( incidence );
doDelete = mCalendar->deleteIncidence( incidence );
if ( !KOPrefs::instance()->thatIsMe( tmp->organizer().email() ) ) {
- const QStringList myEmails = KOPrefs::instance()->allEmails();
+ const TQStringList myEmails = KOPrefs::instance()->allEmails();
bool notifyOrganizer = false;
- for ( QStringList::ConstIterator it = myEmails.begin(); it != myEmails.end(); ++it ) {
- QString email = *it;
+ for ( TQStringList::ConstIterator it = myEmails.begin(); it != myEmails.end(); ++it ) {
+ TQString email = *it;
Attendee *me = tmp->attendeeByMail(email);
if ( me ) {
if ( me->status() == KCal::Attendee::Accepted || me->status() == KCal::Attendee::Delegated )
@@ -314,7 +314,7 @@ kdDebug(5850)<<"IncidenceChanger::changeIncidence for incidence \""<<newinc->sum
return true;
}
-bool IncidenceChanger::addIncidence( Incidence *incidence, QWidget *parent )
+bool IncidenceChanger::addIncidence( Incidence *incidence, TQWidget *parent )
{
kdDebug(5850)<<"IncidenceChanger::addIncidence for incidence \""<<incidence->summary()<<"\""<<endl;
if ( KOPrefs::instance()->mUseGroupwareCommunication ) {
@@ -329,7 +329,7 @@ kdDebug(5850)<<"IncidenceChanger::addIncidence for incidence \""<<incidence->sum
// in the calendar, only in the CalendarResources::DestinationPolicy
// So we need to type-cast it and extract it from the CalendarResources
CalendarResources *stdcal = dynamic_cast<CalendarResources*>(mCalendar);
- QWidget *tmpparent = 0;
+ TQWidget *tmpparent = 0;
if ( stdcal ) {
tmpparent = stdcal->dialogParentWidget();
stdcal->setDialogParentWidget( parent );
diff --git a/korganizer/incidencechanger.h b/korganizer/incidencechanger.h
index 0b1ed4cb2..1423b4888 100644
--- a/korganizer/incidencechanger.h
+++ b/korganizer/incidencechanger.h
@@ -30,14 +30,14 @@ class IncidenceChanger : public KOrg::IncidenceChangerBase
{
Q_OBJECT
public:
- IncidenceChanger( Calendar*cal, QObject *parent ) : IncidenceChangerBase( cal, parent ) {}
+ IncidenceChanger( Calendar*cal, TQObject *parent ) : IncidenceChangerBase( cal, parent ) {}
~IncidenceChanger() {}
bool beginChange( Incidence * incidence );
bool sendGroupwareMessage( Incidence *incidence, KCal::Scheduler::Method method, bool deleting = false );
bool endChange( Incidence *incidence );
- bool addIncidence( Incidence *incidence, QWidget *parent = 0 );
+ bool addIncidence( Incidence *incidence, TQWidget *parent = 0 );
bool changeIncidence( Incidence *oldinc, Incidence *newinc, int action = -1 );
bool deleteIncidence( Incidence *incidence );
diff --git a/korganizer/interfaces/calendar/calendardecoration.h b/korganizer/interfaces/calendar/calendardecoration.h
index a6f487b7b..1653edb48 100644
--- a/korganizer/interfaces/calendar/calendardecoration.h
+++ b/korganizer/interfaces/calendar/calendardecoration.h
@@ -21,9 +21,9 @@
#ifndef KORG_CALENDARDECORATION_H
#define KORG_CALENDARDECORATION_H
-#include <qstring.h>
-#include <qdatetime.h>
-#include <qpixmap.h>
+#include <tqstring.h>
+#include <tqdatetime.h>
+#include <tqpixmap.h>
#include <klibloader.h>
@@ -41,9 +41,9 @@ class CalendarDecoration : public Plugin
{
public:
static int interfaceVersion() { return 2; }
- static QString serviceType() { return "Calendar/Decoration"; }
+ static TQString serviceType() { return "Calendar/Decoration"; }
- typedef QPtrList<CalendarDecoration> List;
+ typedef TQPtrList<CalendarDecoration> List;
CalendarDecoration() {}
virtual ~CalendarDecoration() {}
@@ -51,26 +51,26 @@ class CalendarDecoration : public Plugin
/**
Return a short text for a given date, ususally only a few words.
*/
- virtual QString shortText( const QDate & ) { return QString::null; }
+ virtual TQString shortText( const TQDate & ) { return TQString::null; }
/**
Return along text for a given date. This text can be of any length, but
usually it will have one or a few paragraphs.
*/
- virtual QString longText( const QDate & ) { return QString::null; }
+ virtual TQString longText( const TQDate & ) { return TQString::null; }
/**
Return a small pixmap. The size should be something like 30x30 pixels.
*/
- virtual QPixmap smallPixmap( const QDate &) { return QPixmap(); }
+ virtual TQPixmap smallPixmap( const TQDate &) { return TQPixmap(); }
/**
Return a large pixmap. The size should be something like 300x300 pixels.
*/
- virtual QPixmap largePixmap( const QDate &) { return QPixmap(); }
+ virtual TQPixmap largePixmap( const TQDate &) { return TQPixmap(); }
/**
Return a small widget. It should have the size of a pushbutton.
*/
- virtual QWidget *smallWidget( QWidget *, const QDate & ) { return 0; }
+ virtual TQWidget *smallWidget( TQWidget *, const TQDate & ) { return 0; }
};
class CalendarDecorationFactory : public PluginFactory
diff --git a/korganizer/interfaces/calendar/plugin.h b/korganizer/interfaces/calendar/plugin.h
index 478b86468..eb0f78927 100644
--- a/korganizer/interfaces/calendar/plugin.h
+++ b/korganizer/interfaces/calendar/plugin.h
@@ -30,14 +30,14 @@ class Plugin
{
public:
static int interfaceVersion() { return 2; }
- static QString serviceType() { return "Calendar/Plugin"; }
+ static TQString serviceType() { return "Calendar/Plugin"; }
Plugin() {}
virtual ~Plugin() {}
- virtual QString info() = 0;
+ virtual TQString info() = 0;
- virtual void configure( QWidget * ) {}
+ virtual void configure( TQWidget * ) {}
};
class PluginFactory : public KLibFactory
@@ -46,8 +46,8 @@ class PluginFactory : public KLibFactory
virtual Plugin *create() = 0;
protected:
- virtual QObject *createObject( QObject *, const char *,const char *,
- const QStringList & )
+ virtual TQObject *createObject( TQObject *, const char *,const char *,
+ const TQStringList & )
{
return 0;
}
diff --git a/korganizer/interfaces/korganizer/baseview.h b/korganizer/interfaces/korganizer/baseview.h
index abaa85917..64fbd72b5 100644
--- a/korganizer/interfaces/korganizer/baseview.h
+++ b/korganizer/interfaces/korganizer/baseview.h
@@ -22,9 +22,9 @@
#ifndef KORG_BASEVIEW_H
#define KORG_BASEVIEW_H
-#include <qwidget.h>
-#include <qptrlist.h>
-#include <qvaluelist.h>
+#include <tqwidget.h>
+#include <tqptrlist.h>
+#include <tqvaluelist.h>
#include <klocale.h>
#include <kdebug.h>
@@ -66,9 +66,9 @@ class KDE_EXPORT BaseView : public QWidget
@param parent parent widget.
@param name name of this widget.
*/
- BaseView( Calendar *cal, QWidget *parent = 0,
+ BaseView( Calendar *cal, TQWidget *parent = 0,
const char *name = 0 )
- : QWidget( parent, name ), mCalendar( cal ), mChanger( 0 ) {}
+ : TQWidget( parent, name ), mCalendar( cal ), mChanger( 0 ) {}
/**
Destructor. Views will do view-specific cleanups here.
@@ -117,7 +117,7 @@ class KDE_EXPORT BaseView : public QWidget
@param start Start of date range.
@param end End of date range.
*/
- virtual void showDates( const QDate &start, const QDate &end ) = 0;
+ virtual void showDates( const TQDate &start, const TQDate &end ) = 0;
/**
Show given incidences. Depending on the actual view it might not be possible to
@@ -132,7 +132,7 @@ class KDE_EXPORT BaseView : public QWidget
in the calendar since the last display refresh.
*/
virtual void updateView() = 0;
- virtual void dayPassed( const QDate & ) { updateView(); }
+ virtual void dayPassed( const TQDate & ) { updateView(); }
/**
Assign a new incidence change helper object.
@@ -163,7 +163,7 @@ class KDE_EXPORT BaseView : public QWidget
/**
Set the default start/end date/time for new events. Return true if anything was changed
*/
- virtual bool eventDurationHint(QDateTime &/*startDt*/, QDateTime &/*endDt*/, bool &/*allDay*/) { return false; }
+ virtual bool eventDurationHint(TQDateTime &/*startDt*/, TQDateTime &/*endDt*/, bool &/*allDay*/) { return false; }
signals:
void incidenceSelected( Incidence * );
@@ -208,12 +208,12 @@ class KDE_EXPORT BaseView : public QWidget
void toggleAlarmSignal(Incidence *);
/** Dissociate from a recurring incidence the occurrence on the given
date to a new incidence */
- void dissociateOccurrenceSignal( Incidence *, const QDate & );
+ void dissociateOccurrenceSignal( Incidence *, const TQDate & );
/** Dissociate from a recurring incidence all occurrences after the given
date to a new incidence */
- void dissociateFutureOccurrenceSignal( Incidence *, const QDate & );
+ void dissociateFutureOccurrenceSignal( Incidence *, const TQDate & );
- void startMultiModify( const QString & );
+ void startMultiModify( const TQString & );
void endMultiModify();
/**
@@ -225,23 +225,23 @@ class KDE_EXPORT BaseView : public QWidget
* instructs the receiver to create a new event with the specified beginning
* time. Doesn't make sense to connect to more than one receiver.
*/
- void newEventSignal( const QDate & );
+ void newEventSignal( const TQDate & );
/**
* instructs the receiver to create a new event with the specified beginning
* time. Doesn't make sense to connect to more than one receiver.
*/
- void newEventSignal( const QDateTime & );
+ void newEventSignal( const TQDateTime & );
/**
* instructs the receiver to create a new event, with the specified
* beginning end ending times. Doesn't make sense to connect to more
* than one receiver.
*/
- void newEventSignal( const QDateTime &, const QDateTime & );
+ void newEventSignal( const TQDateTime &, const TQDateTime & );
- void newTodoSignal( const QDate & );
+ void newTodoSignal( const TQDate & );
void newSubTodoSignal( Todo * );
- void newJournalSignal( const QDate & );
+ void newJournalSignal( const TQDate & );
private:
Calendar *mCalendar;
diff --git a/korganizer/interfaces/korganizer/calendarviewbase.h b/korganizer/interfaces/korganizer/calendarviewbase.h
index fe0cd4961..02c2459bb 100644
--- a/korganizer/interfaces/korganizer/calendarviewbase.h
+++ b/korganizer/interfaces/korganizer/calendarviewbase.h
@@ -22,7 +22,7 @@
#ifndef KORG_CALENDARVIEWBASE_H
#define KORG_CALENDARVIEWBASE_H
-#include <qwidget.h>
+#include <tqwidget.h>
#include <libkcal/calendar.h>
@@ -37,14 +37,14 @@ namespace KOrg {
class CalendarViewBase : public QWidget
{
public:
- CalendarViewBase( QWidget *parent, const char *name )
- : QWidget( parent, name ) {}
+ CalendarViewBase( TQWidget *parent, const char *name )
+ : TQWidget( parent, name ) {}
virtual ~CalendarViewBase() {}
virtual KCal::Calendar *calendar() = 0;
- virtual QDate startDate() = 0;
- virtual QDate endDate() = 0;
+ virtual TQDate startDate() = 0;
+ virtual TQDate endDate() = 0;
virtual Incidence *currentSelection() = 0;
diff --git a/korganizer/interfaces/korganizer/corehelper.h b/korganizer/interfaces/korganizer/corehelper.h
index 2ab839065..53b5d9fb2 100644
--- a/korganizer/interfaces/korganizer/corehelper.h
+++ b/korganizer/interfaces/korganizer/corehelper.h
@@ -23,9 +23,9 @@
#ifndef KORG_COREHELPER_H
#define KORG_COREHELPER_H
-#include <qstring.h>
-#include <qdatetime.h>
-#include <qcolor.h>
+#include <tqstring.h>
+#include <tqdatetime.h>
+#include <tqcolor.h>
#include "printplugin.h"
class KCalendarSytstem;
@@ -38,14 +38,14 @@ class CoreHelper
CoreHelper() {}
virtual ~CoreHelper() {}
- virtual QColor defaultEventColor() = 0;
- virtual QColor textColor( const QColor &bgColor ) = 0;
- virtual QColor categoryColor( const QStringList &cats ) = 0;
- virtual QString holidayString( const QDate &dt ) = 0;
- virtual QTime dayStart() = 0;
+ virtual TQColor defaultEventColor() = 0;
+ virtual TQColor textColor( const TQColor &bgColor ) = 0;
+ virtual TQColor categoryColor( const TQStringList &cats ) = 0;
+ virtual TQString holidayString( const TQDate &dt ) = 0;
+ virtual TQTime dayStart() = 0;
virtual const KCalendarSystem *calendarSystem() = 0;
virtual KOrg::PrintPlugin::List loadPrintPlugins() = 0;
- virtual bool isWorkingDay( const QDate &dt ) = 0;
+ virtual bool isWorkingDay( const TQDate &dt ) = 0;
};
}
diff --git a/korganizer/interfaces/korganizer/incidencechangerbase.h b/korganizer/interfaces/korganizer/incidencechangerbase.h
index 9aeaf2438..9deb87642 100644
--- a/korganizer/interfaces/korganizer/incidencechangerbase.h
+++ b/korganizer/interfaces/korganizer/incidencechangerbase.h
@@ -22,7 +22,7 @@
#define KORG_INCIDENCECHANGERBASE_H
#include <libkcal/scheduler.h>
-#include <qobject.h>
+#include <tqobject.h>
class QWidget;
namespace KCal {
@@ -37,8 +37,8 @@ class IncidenceChangerBase : public QObject
{
Q_OBJECT
public:
- IncidenceChangerBase( Calendar*cal, QObject *parent = 0 ) :
- QObject( parent ), mCalendar( cal ) {}
+ IncidenceChangerBase( Calendar*cal, TQObject *parent = 0 ) :
+ TQObject( parent ), mCalendar( cal ) {}
virtual ~IncidenceChangerBase() {}
virtual bool sendGroupwareMessage( Incidence *incidence,
@@ -47,7 +47,7 @@ public:
virtual bool beginChange( Incidence * incidence ) = 0;
virtual bool endChange( Incidence *incidence ) = 0;
- virtual bool addIncidence( Incidence *incidence, QWidget *parent = 0 ) = 0;
+ virtual bool addIncidence( Incidence *incidence, TQWidget *parent = 0 ) = 0;
virtual bool changeIncidence( Incidence *newinc, Incidence *oldinc,
int action = -1 ) = 0;
virtual bool deleteIncidence( Incidence *incidence ) = 0;
diff --git a/korganizer/interfaces/korganizer/mainwindow.h b/korganizer/interfaces/korganizer/mainwindow.h
index cbfb7915c..3343470aa 100644
--- a/korganizer/interfaces/korganizer/mainwindow.h
+++ b/korganizer/interfaces/korganizer/mainwindow.h
@@ -22,7 +22,7 @@
#include <kxmlguiclient.h>
-#include <qwidget.h>
+#include <tqwidget.h>
class KActionCollection;
class KAction;
@@ -68,7 +68,7 @@ class MainWindow
/**
Return widget whcih represents this main window.
*/
- virtual QWidget *topLevelWidget() = 0;
+ virtual TQWidget *topLevelWidget() = 0;
/**
Return ActionManager of this main window.
*/
@@ -80,7 +80,7 @@ class MainWindow
/**
Show status mesage in status bar.
*/
- virtual void showStatusMessage( const QString &message ) = 0;
+ virtual void showStatusMessage( const TQString &message ) = 0;
/**
Set window title.
diff --git a/korganizer/interfaces/korganizer/part.h b/korganizer/interfaces/korganizer/part.h
index 5db429298..2ce21c13f 100644
--- a/korganizer/interfaces/korganizer/part.h
+++ b/korganizer/interfaces/korganizer/part.h
@@ -21,7 +21,7 @@
#ifndef KORG_PART_H
#define KORG_PART_H
-#include <qstring.h>
+#include <tqstring.h>
#include <klibloader.h>
#include <kparts/part.h>
@@ -34,18 +34,18 @@ class Part : public KParts::Part
{
public:
static int interfaceVersion() { return 2; }
- static QString serviceType() { return "KOrganizer/Part"; }
+ static TQString serviceType() { return "KOrganizer/Part"; }
- typedef QPtrList<Part> List;
+ typedef TQPtrList<Part> List;
Part( MainWindow *parent, const char *name )
: KParts::Part( parent?(parent->topLevelWidget()):0, name ), mMainWindow( parent ) {}
virtual ~Part() {}
- virtual QString info() = 0;
+ virtual TQString info() = 0;
/** short name of the part, used as category in the keybindings dialog */
- virtual QString shortInfo() = 0;
+ virtual TQString shortInfo() = 0;
MainWindow *mainWindow() { return mMainWindow; }
@@ -59,8 +59,8 @@ class PartFactory : public KLibFactory
virtual Part *create( MainWindow *parent, const char *name = 0 ) = 0;
protected:
- virtual QObject *createObject( QObject *, const char *,const char *,
- const QStringList & )
+ virtual TQObject *createObject( TQObject *, const char *,const char *,
+ const TQStringList & )
{
return 0;
}
diff --git a/korganizer/interfaces/korganizer/printplugin.h b/korganizer/interfaces/korganizer/printplugin.h
index 0a7abd44c..a1414cdb8 100644
--- a/korganizer/interfaces/korganizer/printplugin.h
+++ b/korganizer/interfaces/korganizer/printplugin.h
@@ -23,7 +23,7 @@
#ifndef KORG_NOPRINTER
-#include <qdatetime.h>
+#include <tqdatetime.h>
#include <kprinter.h>
#include <calendar/plugin.h>
#include <libkcal/incidence.h>
@@ -55,9 +55,9 @@ class PrintPlugin : public KOrg::Plugin
mCalendar(0), mConfig(0) {}
virtual ~PrintPlugin() {}
- typedef QPtrList<PrintPlugin> List;
+ typedef TQPtrList<PrintPlugin> List;
static int interfaceVersion() { return 2; }
- static QString serviceType() { return "KOrganizer/PrintPlugin"; }
+ static TQString serviceType() { return "KOrganizer/PrintPlugin"; }
virtual void setKOrgCoreHelper( KOrg::CoreHelper*helper ) { mCoreHelper = helper; }
virtual void setConfig( KConfig *cfg ) { mConfig = cfg; }
@@ -69,11 +69,11 @@ class PrintPlugin : public KOrg::Plugin
/**
Returns short description of print format.
*/
- virtual QString description() = 0;
+ virtual TQString description() = 0;
/**
Returns long description of print format.
*/
- virtual QString info() = 0;
+ virtual TQString info() = 0;
/**
Returns the sort ID of the plugin. This value will be used to identify
@@ -90,7 +90,7 @@ class PrintPlugin : public KOrg::Plugin
*/
virtual bool enabled() { return false; }
- QWidget *configWidget( QWidget *w )
+ TQWidget *configWidget( TQWidget *w )
{
if ( !mConfigWidget ) {
mConfigWidget = createConfigWidget( w );
@@ -100,7 +100,7 @@ class PrintPlugin : public KOrg::Plugin
}
/* Create the config widget. setSettingsWidget will be automatically
called on it */
- virtual QWidget *createConfigWidget( QWidget * ) = 0;
+ virtual TQWidget *createConfigWidget( TQWidget * ) = 0;
/**
Actually do the printing.
@@ -138,18 +138,18 @@ class PrintPlugin : public KOrg::Plugin
/**
Set date range which should be printed.
*/
- virtual void setDateRange( const QDate &from, const QDate &to )
+ virtual void setDateRange( const TQDate &from, const TQDate &to )
{
mFromDate = from;
mToDate = to;
}
protected:
- QDate mFromDate;
- QDate mToDate;
+ TQDate mFromDate;
+ TQDate mToDate;
protected:
- QWidget *mConfigWidget;
+ TQWidget *mConfigWidget;
KOrg::CoreHelper *mCoreHelper;
/** The printer object. This will only be available in the doPrint method
of the selected plugin */
diff --git a/korganizer/journalentry.cpp b/korganizer/journalentry.cpp
index 3c680c654..ae80a8d6f 100644
--- a/korganizer/journalentry.cpp
+++ b/korganizer/journalentry.cpp
@@ -25,12 +25,12 @@
//
// Journal Entry
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qcheckbox.h>
-#include <qwhatsthis.h>
-#include <qtooltip.h>
-#include <qtoolbutton.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqcheckbox.h>
+#include <tqwhatsthis.h>
+#include <tqtooltip.h>
+#include <tqtoolbutton.h>
#include <kdebug.h>
#include <kdialog.h>
@@ -60,32 +60,32 @@
class JournalTitleLable : public KActiveLabel
{
public:
- JournalTitleLable( QWidget *parent, const char *name=0 ) : KActiveLabel( parent, name ) {}
+ JournalTitleLable( TQWidget *parent, const char *name=0 ) : KActiveLabel( parent, name ) {}
- void openLink( const QString &/*link*/ ) {}
+ void openLink( const TQString &/*link*/ ) {}
};
-JournalDateEntry::JournalDateEntry( Calendar *calendar, QWidget *parent ) :
- QVBox( parent ), mCalendar( calendar )
+JournalDateEntry::JournalDateEntry( Calendar *calendar, TQWidget *parent ) :
+ TQVBox( parent ), mCalendar( calendar )
{
//kdDebug(5850)<<"JournalEntry::JournalEntry, parent="<<parent<<endl;
mChanger = 0;
mTitle = new JournalTitleLable( this );
mTitle->setMargin(2);
- mTitle->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed );
- connect( mTitle, SIGNAL( linkClicked( const QString & ) ),
- this, SLOT( emitNewJournal() ) );
+ mTitle->setSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Fixed );
+ connect( mTitle, TQT_SIGNAL( linkClicked( const TQString & ) ),
+ this, TQT_SLOT( emitNewJournal() ) );
}
JournalDateEntry::~JournalDateEntry()
{
}
-void JournalDateEntry::setDate(const QDate &date)
+void JournalDateEntry::setDate(const TQDate &date)
{
- QString dtstring = QString( "<qt><center><b><i>%1</i></b> " )
+ TQString dtstring = TQString( "<qt><center><b><i>%1</i></b> " )
.arg( KGlobal::locale()->formatDate(date) );
dtstring += " <font size=\"-1\"><a href=\"#\">" +
@@ -99,9 +99,9 @@ void JournalDateEntry::setDate(const QDate &date)
void JournalDateEntry::clear()
{
- QValueList<JournalEntry*> values( mEntries.values() );
+ TQValueList<JournalEntry*> values( mEntries.values() );
- QValueList<JournalEntry*>::Iterator it = values.begin();
+ TQValueList<JournalEntry*>::Iterator it = values.begin();
for ( ; it != values.end(); ++it ) {
delete (*it);
}
@@ -111,7 +111,7 @@ void JournalDateEntry::clear()
// should only be called by the KOJournalView now.
void JournalDateEntry::addJournal( Journal *j )
{
- QMap<Journal*,JournalEntry*>::Iterator pos = mEntries.find( j );
+ TQMap<Journal*,JournalEntry*>::Iterator pos = mEntries.find( j );
if ( pos != mEntries.end() ) return;
JournalEntry *entry = new JournalEntry( j, this );
@@ -120,23 +120,23 @@ void JournalDateEntry::addJournal( Journal *j )
entry->setIncidenceChanger( mChanger );
mEntries.insert( j, entry );
- connect( this, SIGNAL( setIncidenceChangerSignal( IncidenceChangerBase * ) ),
- entry, SLOT( setIncidenceChanger( IncidenceChangerBase * ) ) );
- connect( this, SIGNAL( setDateSignal( const QDate & ) ),
- entry, SLOT( setDate( const QDate & ) ) );
- connect( this, SIGNAL( flushEntries() ),
- entry, SLOT( flushEntry() ) );
- connect( entry, SIGNAL( deleteIncidence( Incidence* ) ),
- this, SIGNAL( deleteIncidence( Incidence* ) ) );
- connect( entry, SIGNAL( editIncidence( Incidence* ) ),
- this, SIGNAL( editIncidence( Incidence* ) ) );
+ connect( this, TQT_SIGNAL( setIncidenceChangerSignal( IncidenceChangerBase * ) ),
+ entry, TQT_SLOT( setIncidenceChanger( IncidenceChangerBase * ) ) );
+ connect( this, TQT_SIGNAL( setDateSignal( const TQDate & ) ),
+ entry, TQT_SLOT( setDate( const TQDate & ) ) );
+ connect( this, TQT_SIGNAL( flushEntries() ),
+ entry, TQT_SLOT( flushEntry() ) );
+ connect( entry, TQT_SIGNAL( deleteIncidence( Incidence* ) ),
+ this, TQT_SIGNAL( deleteIncidence( Incidence* ) ) );
+ connect( entry, TQT_SIGNAL( editIncidence( Incidence* ) ),
+ this, TQT_SIGNAL( editIncidence( Incidence* ) ) );
}
Journal::List JournalDateEntry::journals() const
{
- QValueList<Journal*> jList( mEntries.keys() );
+ TQValueList<Journal*> jList( mEntries.keys() );
Journal::List l;
- QValueList<Journal*>::Iterator it = jList.begin();
+ TQValueList<Journal*>::Iterator it = jList.begin();
for ( ; it != jList.end(); ++it ) {
l.append( *it );
}
@@ -156,7 +156,7 @@ void JournalDateEntry::emitNewJournal()
void JournalDateEntry::journalEdited( Journal *journal )
{
- QMap<Journal*,JournalEntry*>::Iterator pos = mEntries.find( journal );
+ TQMap<Journal*,JournalEntry*>::Iterator pos = mEntries.find( journal );
if ( pos == mEntries.end() ) return;
pos.data()->setJournal( journal );
@@ -165,7 +165,7 @@ void JournalDateEntry::journalEdited( Journal *journal )
void JournalDateEntry::journalDeleted( Journal *journal )
{
- QMap<Journal*,JournalEntry*>::Iterator pos = mEntries.find( journal );
+ TQMap<Journal*,JournalEntry*>::Iterator pos = mEntries.find( journal );
if ( pos == mEntries.end() ) return;
delete pos.data();
@@ -175,8 +175,8 @@ void JournalDateEntry::journalDeleted( Journal *journal )
-JournalEntry::JournalEntry( Journal* j, QWidget *parent ) :
- QWidget( parent ), mJournal( j )
+JournalEntry::JournalEntry( Journal* j, TQWidget *parent ) :
+ TQWidget( parent ), mJournal( j )
{
//kdDebug(5850)<<"JournalEntry::JournalEntry, parent="<<parent<<endl;
mDirty = false;
@@ -184,65 +184,65 @@ JournalEntry::JournalEntry( Journal* j, QWidget *parent ) :
mChanger = 0;
mReadOnly = false;
- mLayout = new QGridLayout( this );
+ mLayout = new TQGridLayout( this );
mLayout->setSpacing( KDialog::spacingHint() );
mLayout->setMargin( KDialog::marginHint() );
- QString whatsThis = i18n("Sets the Title of this journal entry.");
+ TQString whatsThis = i18n("Sets the Title of this journal entry.");
- mTitleLabel = new QLabel( i18n("&Title: "), this );
+ mTitleLabel = new TQLabel( i18n("&Title: "), this );
mLayout->addWidget( mTitleLabel, 0, 0 );
mTitleEdit = new KLineEdit( this );
mLayout->addWidget( mTitleEdit, 0, 1 );
mTitleLabel->setBuddy( mTitleEdit );
- QWhatsThis::add( mTitleLabel, whatsThis );
- QWhatsThis::add( mTitleEdit, whatsThis );
+ TQWhatsThis::add( mTitleLabel, whatsThis );
+ TQWhatsThis::add( mTitleEdit, whatsThis );
- mTimeCheck = new QCheckBox( i18n("Ti&me: "), this );
+ mTimeCheck = new TQCheckBox( i18n("Ti&me: "), this );
mLayout->addWidget( mTimeCheck, 0, 2 );
mTimeEdit = new KTimeEdit( this );
mLayout->addWidget( mTimeEdit, 0, 3 );
- connect( mTimeCheck, SIGNAL(toggled(bool)),
- this, SLOT(timeCheckBoxToggled(bool)) );
- QWhatsThis::add( mTimeCheck, i18n("Determines whether this journal entry has "
+ connect( mTimeCheck, TQT_SIGNAL(toggled(bool)),
+ this, TQT_SLOT(timeCheckBoxToggled(bool)) );
+ TQWhatsThis::add( mTimeCheck, i18n("Determines whether this journal entry has "
"a time associated with it") );
- QWhatsThis::add( mTimeEdit, i18n( "Sets the time associated with this journal "
+ TQWhatsThis::add( mTimeEdit, i18n( "Sets the time associated with this journal "
"entry" ) );
- mDeleteButton = new QToolButton( this, "deleteButton" );
- QPixmap pix = KOGlobals::self()->smallIcon( "editdelete" );
+ mDeleteButton = new TQToolButton( this, "deleteButton" );
+ TQPixmap pix = KOGlobals::self()->smallIcon( "editdelete" );
mDeleteButton->setPixmap( pix );
- mDeleteButton->setSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed );
- QToolTip::add( mDeleteButton, i18n("Delete this journal entry") );
- QWhatsThis::add( mDeleteButton, i18n("Delete this journal entry") );
+ mDeleteButton->setSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Fixed );
+ TQToolTip::add( mDeleteButton, i18n("Delete this journal entry") );
+ TQWhatsThis::add( mDeleteButton, i18n("Delete this journal entry") );
mLayout->addWidget( mDeleteButton, 0, 4 );
- connect( mDeleteButton, SIGNAL(pressed()), this, SLOT(deleteItem()) );
+ connect( mDeleteButton, TQT_SIGNAL(pressed()), this, TQT_SLOT(deleteItem()) );
- mEditButton = new QToolButton( this, "editButton" );
+ mEditButton = new TQToolButton( this, "editButton" );
mEditButton->setPixmap( KOGlobals::self()->smallIcon( "edit" ) );
- mEditButton->setSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed );
- QToolTip::add( mEditButton, i18n("Edit this journal entry") );
- QWhatsThis::add( mEditButton, i18n("Opens an editor dialog for this journal entry") );
+ mEditButton->setSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Fixed );
+ TQToolTip::add( mEditButton, i18n("Edit this journal entry") );
+ TQWhatsThis::add( mEditButton, i18n("Opens an editor dialog for this journal entry") );
mLayout->addWidget( mEditButton, 0, 5 );
- connect( mEditButton, SIGNAL(clicked()), this, SLOT( editItem() ) );
+ connect( mEditButton, TQT_SIGNAL(clicked()), this, TQT_SLOT( editItem() ) );
#ifndef KORG_NOPRINTER
- mPrintButton = new QToolButton( this, "printButton" );
+ mPrintButton = new TQToolButton( this, "printButton" );
mPrintButton->setPixmap( KOGlobals::self()->smallIcon( "printer1" ) );
- mPrintButton->setSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed );
- QToolTip::add( mPrintButton, i18n("Print this journal entry") );
- QWhatsThis::add( mPrintButton, i18n("Opens the print dialog for this journal entry") );
+ mPrintButton->setSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Fixed );
+ TQToolTip::add( mPrintButton, i18n("Print this journal entry") );
+ TQWhatsThis::add( mPrintButton, i18n("Opens the print dialog for this journal entry") );
mLayout->addWidget( mPrintButton, 0, 6 );
- connect( mPrintButton, SIGNAL(clicked()), this, SLOT( printItem() ) );
+ connect( mPrintButton, TQT_SIGNAL(clicked()), this, TQT_SLOT( printItem() ) );
#endif
mEditor = new KTextEdit(this);
mLayout->addMultiCellWidget( mEditor, 1, 2, 0, 6 );
- connect( mTitleEdit, SIGNAL(textChanged( const QString& )), SLOT(setDirty()) );
- connect( mTimeCheck, SIGNAL(toggled(bool)), SLOT(setDirty()) );
- connect( mTimeEdit, SIGNAL(timeChanged(QTime)), SLOT(setDirty()) );
- connect( mEditor, SIGNAL(textChanged()), SLOT(setDirty()) );
+ connect( mTitleEdit, TQT_SIGNAL(textChanged( const TQString& )), TQT_SLOT(setDirty()) );
+ connect( mTimeCheck, TQT_SIGNAL(toggled(bool)), TQT_SLOT(setDirty()) );
+ connect( mTimeEdit, TQT_SIGNAL(timeChanged(TQTime)), TQT_SLOT(setDirty()) );
+ connect( mEditor, TQT_SIGNAL(textChanged()), TQT_SLOT(setDirty()) );
mEditor->installEventFilter(this);
@@ -282,13 +282,13 @@ void JournalEntry::printItem()
if ( mJournal ) {
KOCoreHelper helper;
CalPrinter printer( this, 0, &helper );
- connect( this, SIGNAL(configChanged()), &printer, SLOT(updateConfig()) );
+ connect( this, TQT_SIGNAL(configChanged()), &printer, TQT_SLOT(updateConfig()) );
Incidence::List selectedIncidences;
selectedIncidences.append( mJournal );
printer.print( KOrg::CalPrinterBase::Incidence,
- QDate(), QDate(), selectedIncidences );
+ TQDate(), TQDate(), selectedIncidences );
}
#endif
}
@@ -304,7 +304,7 @@ void JournalEntry::setReadOnly( bool readonly )
}
-void JournalEntry::setDate(const QDate &date)
+void JournalEntry::setDate(const TQDate &date)
{
writeJournal();
mDate = date;
@@ -328,15 +328,15 @@ void JournalEntry::setDirty()
kdDebug(5850) << "JournalEntry::setDirty()" << endl;
}
-bool JournalEntry::eventFilter( QObject *o, QEvent *e )
+bool JournalEntry::eventFilter( TQObject *o, TQEvent *e )
{
// kdDebug(5850) << "JournalEntry::event received " << e->type() << endl;
- if ( e->type() == QEvent::FocusOut || e->type() == QEvent::Hide ||
- e->type() == QEvent::Close ) {
+ if ( e->type() == TQEvent::FocusOut || e->type() == TQEvent::Hide ||
+ e->type() == TQEvent::Close ) {
writeJournal();
}
- return QWidget::eventFilter( o, e ); // standard event processing
+ return TQWidget::eventFilter( o, e ); // standard event processing
}
@@ -358,8 +358,8 @@ void JournalEntry::writeJournalPrivate( Journal *j )
{
j->setSummary( mTitleEdit->text() );
bool hasTime = mTimeCheck->isChecked();
- QTime tm( mTimeEdit->getTime() );
- j->setDtStart( QDateTime( mDate, hasTime?tm:QTime(0,0,0) ) );
+ TQTime tm( mTimeEdit->getTime() );
+ j->setDtStart( TQDateTime( mDate, hasTime?tm:TQTime(0,0,0) ) );
j->setFloats( !hasTime );
j->setDescription( mEditor->text() );
}
diff --git a/korganizer/journalentry.h b/korganizer/journalentry.h
index 761e77e58..02e85e1e5 100644
--- a/korganizer/journalentry.h
+++ b/korganizer/journalentry.h
@@ -26,7 +26,7 @@
//
// Widget showing one Journal entry
-#include <qvbox.h>
+#include <tqvbox.h>
class QLabel;
class KActiveLabel;
@@ -46,18 +46,18 @@ namespace KCal {
}
using namespace KCal;
-class JournalEntry : public QWidget {
+class JournalEntry : public TQWidget {
Q_OBJECT
public:
typedef ListBase<JournalEntry> List;
- JournalEntry( Journal* j, QWidget *parent );
+ JournalEntry( Journal* j, TQWidget *parent );
virtual ~JournalEntry();
void setJournal(Journal *);
Journal *journal() const { return mJournal; }
- QDate date() const { return mDate; }
+ TQDate date() const { return mDate; }
void clear();
void readJournal( Journal *j );
@@ -73,7 +73,7 @@ class JournalEntry : public QWidget {
void timeCheckBoxToggled(bool on);
public slots:
void setIncidenceChanger( IncidenceChangerBase *changer ) { mChanger = changer; }
- void setDate(const QDate &);
+ void setDate(const TQDate &);
void flushEntry();
signals:
@@ -82,7 +82,7 @@ class JournalEntry : public QWidget {
protected:
void clearFields();
- bool eventFilter( QObject *o, QEvent *e );
+ bool eventFilter( TQObject *o, TQEvent *e );
void writeJournal();
@@ -90,19 +90,19 @@ class JournalEntry : public QWidget {
void writeJournalPrivate( Journal *j );
Journal *mJournal;
- QDate mDate;
+ TQDate mDate;
bool mReadOnly;
- QLabel *mTitleLabel;
+ TQLabel *mTitleLabel;
KLineEdit *mTitleEdit;
KTextEdit *mEditor;
- QCheckBox *mTimeCheck;
+ TQCheckBox *mTimeCheck;
KTimeEdit *mTimeEdit;
- QButton *mDeleteButton;
- QButton *mEditButton;
- QButton *mPrintButton;
+ TQButton *mDeleteButton;
+ TQButton *mEditButton;
+ TQButton *mPrintButton;
- QGridLayout *mLayout;
+ TQGridLayout *mLayout;
bool mDirty;
bool mWriteInProgress;
@@ -110,30 +110,30 @@ class JournalEntry : public QWidget {
};
-class JournalDateEntry : public QVBox {
+class JournalDateEntry : public TQVBox {
Q_OBJECT
public:
typedef ListBase<JournalDateEntry> List;
- JournalDateEntry( Calendar *, QWidget *parent );
+ JournalDateEntry( Calendar *, TQWidget *parent );
virtual ~JournalDateEntry();
void addJournal( Journal * );
Journal::List journals() const;
- void setDate( const QDate & );
- QDate date() const { return mDate; }
+ void setDate( const TQDate & );
+ TQDate date() const { return mDate; }
void clear();
signals:
void setIncidenceChangerSignal( IncidenceChangerBase *changer );
- void setDateSignal( const QDate & );
+ void setDateSignal( const TQDate & );
void flushEntries();
void editIncidence( Incidence * );
void deleteIncidence( Incidence * );
- void newJournal( const QDate & );
+ void newJournal( const TQDate & );
public slots:
void emitNewJournal();
@@ -143,11 +143,11 @@ class JournalDateEntry : public QVBox {
private:
Calendar *mCalendar;
- QDate mDate;
- QMap<Journal*,JournalEntry*> mEntries;
+ TQDate mDate;
+ TQMap<Journal*,JournalEntry*> mEntries;
KActiveLabel *mTitle;
- QWidget *mAddBar;
+ TQWidget *mAddBar;
IncidenceChangerBase *mChanger;
};
diff --git a/korganizer/kcalendariface.h b/korganizer/kcalendariface.h
index c84281d7f..a63f3f1c7 100644
--- a/korganizer/kcalendariface.h
+++ b/korganizer/kcalendariface.h
@@ -26,14 +26,14 @@
*/
#include <dcopobject.h>
-#include <qdatetime.h>
-#include <qdatastream.h>
-#include <qstringlist.h>
+#include <tqdatetime.h>
+#include <tqdatastream.h>
+#include <tqstringlist.h>
// yes, this is this very header - but it tells dcopidl to include it
// in _stub.cpp and _skel.cpp files, to get the definition of the structs.
#include "kcalendariface.h"
-typedef QPair<QDateTime, QDateTime> QDateTimePair;
+typedef QPair<TQDateTime, TQDateTime> QDateTimePair;
/** Interface class for calendar requests. */
class KCalendarIface : public DCOPObject
@@ -49,71 +49,71 @@ class KCalendarIface : public DCOPObject
*/
struct ResourceRequestReply {
bool vCalInOK;
- QString vCalOut;
+ TQString vCalOut;
bool vCalOutOK; bool isFree;
- QDateTime start; QDateTime end;
+ TQDateTime start; TQDateTime end;
};
virtual KCalendarIface::ResourceRequestReply resourceRequest(
- const QValueList< QDateTimePair >& busy,
- const QCString& resource,
- const QString& vCalIn ) = 0;
-
- virtual void openEventEditor( const QString& text ) = 0;
- virtual void openEventEditor( const QString& summary,
- const QString& description,
- const QString& attachment ) = 0;
- virtual void openEventEditor( const QString& summary,
- const QString& description,
- const QString& attachment,
- const QStringList& attendees ) = 0;
- virtual void openEventEditor( const QString& summary,
- const QString& description,
- const QString& uri,
- const QString& file,
- const QStringList& attendees,
- const QString& attachmentMimetype ) = 0;
-
- virtual void openTodoEditor( const QString& text ) = 0;
- virtual void openTodoEditor( const QString& summary,
- const QString& description,
- const QString& attachment ) = 0;
- virtual void openTodoEditor( const QString& summary,
- const QString& description,
- const QString& attachment,
- const QStringList& attendees ) = 0;
- virtual void openTodoEditor( const QString& summary,
- const QString& description,
- const QString& uri,
- const QString& file,
- const QStringList& attendees,
- const QString& attachmentMimetype ) = 0;
-
- virtual void openJournalEditor( const QDate& date ) = 0;
- virtual void openJournalEditor( const QString& text,
- const QDate& date ) = 0;
- virtual void openJournalEditor( const QString& text ) = 0;
+ const TQValueList< QDateTimePair >& busy,
+ const TQCString& resource,
+ const TQString& vCalIn ) = 0;
+
+ virtual void openEventEditor( const TQString& text ) = 0;
+ virtual void openEventEditor( const TQString& summary,
+ const TQString& description,
+ const TQString& attachment ) = 0;
+ virtual void openEventEditor( const TQString& summary,
+ const TQString& description,
+ const TQString& attachment,
+ const TQStringList& attendees ) = 0;
+ virtual void openEventEditor( const TQString& summary,
+ const TQString& description,
+ const TQString& uri,
+ const TQString& file,
+ const TQStringList& attendees,
+ const TQString& attachmentMimetype ) = 0;
+
+ virtual void openTodoEditor( const TQString& text ) = 0;
+ virtual void openTodoEditor( const TQString& summary,
+ const TQString& description,
+ const TQString& attachment ) = 0;
+ virtual void openTodoEditor( const TQString& summary,
+ const TQString& description,
+ const TQString& attachment,
+ const TQStringList& attendees ) = 0;
+ virtual void openTodoEditor( const TQString& summary,
+ const TQString& description,
+ const TQString& uri,
+ const TQString& file,
+ const TQStringList& attendees,
+ const TQString& attachmentMimetype ) = 0;
+
+ virtual void openJournalEditor( const TQDate& date ) = 0;
+ virtual void openJournalEditor( const TQString& text,
+ const TQDate& date ) = 0;
+ virtual void openJournalEditor( const TQString& text ) = 0;
//TODO:
- // virtual void openJournalEditor( const QString& summary,
- // const QString& description,
- // const QString& attachment ) = 0;
+ // virtual void openJournalEditor( const TQString& summary,
+ // const TQString& description,
+ // const TQString& attachment ) = 0;
virtual void showJournalView() = 0;
virtual void showTodoView() = 0;
virtual void showEventView() = 0;
- virtual void goDate( const QDate& date ) = 0;
- virtual void goDate( const QString& date ) = 0;
+ virtual void goDate( const TQDate& date ) = 0;
+ virtual void goDate( const TQString& date ) = 0;
- virtual void showDate( const QDate &date ) = 0;
+ virtual void showDate( const TQDate &date ) = 0;
};
-inline QDataStream& operator<<( QDataStream& str, const KCalendarIface::ResourceRequestReply& reply )
+inline TQDataStream& operator<<( TQDataStream& str, const KCalendarIface::ResourceRequestReply& reply )
{
str << reply.vCalInOK << reply.vCalOut << reply.vCalOutOK << reply.isFree << reply.start << reply.end;
return str;
}
-inline QDataStream& operator>>( QDataStream& str, KCalendarIface::ResourceRequestReply& reply )
+inline TQDataStream& operator>>( TQDataStream& str, KCalendarIface::ResourceRequestReply& reply )
{
str >> reply.vCalInOK >> reply.vCalOut >> reply.vCalOutOK >> reply.isFree >> reply.start >> reply.end;
return str;
diff --git a/korganizer/kdatenavigator.cpp b/korganizer/kdatenavigator.cpp
index 900a7b24e..1dea017a2 100644
--- a/korganizer/kdatenavigator.cpp
+++ b/korganizer/kdatenavigator.cpp
@@ -23,12 +23,12 @@
without including the source code for Qt in the source distribution.
*/
-#include <qstring.h>
-#include <qkeycode.h>
-#include <qlayout.h>
-#include <qtimer.h>
-#include <qframe.h>
-#include <qlabel.h>
+#include <tqstring.h>
+#include <tqkeycode.h>
+#include <tqlayout.h>
+#include <tqtimer.h>
+#include <tqframe.h>
+#include <tqlabel.h>
#include <kdebug.h>
#include <klocale.h>
@@ -45,27 +45,27 @@
#include "kdatenavigator.h"
-KDateNavigator::KDateNavigator( QWidget *parent, const char *name )
- : QFrame( parent, name ), mBaseDate( 1970, 1, 1 )
+KDateNavigator::KDateNavigator( TQWidget *parent, const char *name )
+ : TQFrame( parent, name ), mBaseDate( 1970, 1, 1 )
{
- QGridLayout* topLayout = new QGridLayout( this, 8, 8 );
+ TQGridLayout* topLayout = new TQGridLayout( this, 8, 8 );
mNavigatorBar = new NavigatorBar( this );
topLayout->addMultiCellWidget( mNavigatorBar, 0, 0, 0, 7 );
- connect( mNavigatorBar, SIGNAL( goPrevYear() ), SIGNAL( goPrevYear() ) );
- connect( mNavigatorBar, SIGNAL( goPrevMonth() ), SIGNAL( goPrevMonth() ) );
- connect( mNavigatorBar, SIGNAL( goNextMonth() ), SIGNAL( goNextMonth() ) );
- connect( mNavigatorBar, SIGNAL( goNextYear() ), SIGNAL( goNextYear() ) );
- connect( mNavigatorBar, SIGNAL( goMonth( int ) ), SIGNAL( goMonth( int ) ) );
+ connect( mNavigatorBar, TQT_SIGNAL( goPrevYear() ), TQT_SIGNAL( goPrevYear() ) );
+ connect( mNavigatorBar, TQT_SIGNAL( goPrevMonth() ), TQT_SIGNAL( goPrevMonth() ) );
+ connect( mNavigatorBar, TQT_SIGNAL( goNextMonth() ), TQT_SIGNAL( goNextMonth() ) );
+ connect( mNavigatorBar, TQT_SIGNAL( goNextYear() ), TQT_SIGNAL( goNextYear() ) );
+ connect( mNavigatorBar, TQT_SIGNAL( goMonth( int ) ), TQT_SIGNAL( goMonth( int ) ) );
int i;
- QString generalFont = KGlobalSettings::generalFont().family();
+ TQString generalFont = KGlobalSettings::generalFont().family();
// Set up the heading fields.
for( i = 0; i < 7; i++ ) {
- mHeadings[i] = new QLabel( this );
- mHeadings[i]->setFont( QFont( generalFont, 10, QFont::Bold ) );
+ mHeadings[i] = new TQLabel( this );
+ mHeadings[i]->setFont( TQFont( generalFont, 10, TQFont::Bold ) );
mHeadings[i]->setAlignment( AlignCenter );
topLayout->addWidget( mHeadings[i], 1, i + 1 );
@@ -73,9 +73,9 @@ KDateNavigator::KDateNavigator( QWidget *parent, const char *name )
// Create the weeknumber labels
for( i = 0; i < 6; i++ ) {
- mWeeknos[i] = new QLabel( this );
+ mWeeknos[i] = new TQLabel( this );
mWeeknos[i]->setAlignment( AlignCenter );
- mWeeknos[i]->setFont( QFont( generalFont, 10 ) );
+ mWeeknos[i]->setFont( TQFont( generalFont, 10 ) );
mWeeknos[i]->installEventFilter( this );
topLayout->addWidget( mWeeknos[i], i + 2, 0 );
@@ -83,13 +83,13 @@ KDateNavigator::KDateNavigator( QWidget *parent, const char *name )
mDayMatrix = new KODayMatrix( this, "KDateNavigator::dayMatrix" );
- connect( mDayMatrix, SIGNAL( selected( const KCal::DateList & ) ),
- SIGNAL( datesSelected( const KCal::DateList & ) ) );
+ connect( mDayMatrix, TQT_SIGNAL( selected( const KCal::DateList & ) ),
+ TQT_SIGNAL( datesSelected( const KCal::DateList & ) ) );
- connect( mDayMatrix, SIGNAL( incidenceDropped( Incidence *, const QDate & ) ),
- SIGNAL( incidenceDropped( Incidence *, const QDate & ) ) );
- connect( mDayMatrix, SIGNAL( incidenceDroppedMove( Incidence * , const QDate & ) ),
- SIGNAL( incidenceDroppedMove( Incidence *, const QDate & ) ) );
+ connect( mDayMatrix, TQT_SIGNAL( incidenceDropped( Incidence *, const TQDate & ) ),
+ TQT_SIGNAL( incidenceDropped( Incidence *, const TQDate & ) ) );
+ connect( mDayMatrix, TQT_SIGNAL( incidenceDroppedMove( Incidence * , const TQDate & ) ),
+ TQT_SIGNAL( incidenceDroppedMove( Incidence *, const TQDate & ) ) );
topLayout->addMultiCellWidget( mDayMatrix, 2, 7, 1, 7 );
@@ -107,7 +107,7 @@ void KDateNavigator::setCalendar( Calendar *cal )
mDayMatrix->setCalendar( cal );
}
-void KDateNavigator::setBaseDate( const QDate &date )
+void KDateNavigator::setBaseDate( const TQDate &date )
{
if ( date != mBaseDate ) {
mBaseDate = date;
@@ -125,10 +125,10 @@ void KDateNavigator::setBaseDate( const QDate &date )
}
}
-QSizePolicy KDateNavigator::sizePolicy () const
+TQSizePolicy KDateNavigator::sizePolicy () const
{
- return QSizePolicy( QSizePolicy::MinimumExpanding,
- QSizePolicy::MinimumExpanding );
+ return TQSizePolicy( TQSizePolicy::MinimumExpanding,
+ TQSizePolicy::MinimumExpanding );
}
void KDateNavigator::updateToday()
@@ -136,10 +136,10 @@ void KDateNavigator::updateToday()
mDayMatrix->recalculateToday();
mDayMatrix->repaint();
}
-QDate KDateNavigator::startDate() const
+TQDate KDateNavigator::startDate() const
{
// Find the first day of the week of the current month.
- QDate dayone( mBaseDate.year(), mBaseDate.month(), mBaseDate.day() );
+ TQDate dayone( mBaseDate.year(), mBaseDate.month(), mBaseDate.day() );
int d2 = KOGlobals::self()->calendarSystem()->day( dayone );
//int di = d1 - d2 + 1;
dayone = dayone.addDays( -d2 + 1 );
@@ -160,7 +160,7 @@ QDate KDateNavigator::startDate() const
return dayone;
}
-QDate KDateNavigator::endDate() const
+TQDate KDateNavigator::endDate() const
{
return startDate().addDays( 6*7 );
}
@@ -168,7 +168,7 @@ QDate KDateNavigator::endDate() const
void KDateNavigator::updateDates()
{
// kdDebug(5850) << "KDateNavigator::updateDates(), this=" << this << endl;
- QDate dayone = startDate();
+ TQDate dayone = startDate();
mDayMatrix->updateView( dayone );
@@ -177,11 +177,11 @@ void KDateNavigator::updateDates()
// set the week numbers.
for( int i = 0; i < 6; i++ ) {
// Use QDate's weekNumber method to determine the week number!
- QDate dtStart = mDayMatrix->getDate( i * 7 );
- QDate dtEnd = mDayMatrix->getDate( ( i + 1 ) * 7 - 1 );
+ TQDate dtStart = mDayMatrix->getDate( i * 7 );
+ TQDate dtEnd = mDayMatrix->getDate( ( i + 1 ) * 7 - 1 );
int weeknumstart = calsys->weekNumber( dtStart );
int weeknumend = calsys->weekNumber( dtEnd );
- QString weeknum;
+ TQString weeknum;
if ( weeknumstart != weeknumend ) {
weeknum = i18n("start/end week number of line in date picker", "%1/%2")
@@ -217,7 +217,7 @@ void KDateNavigator::updateConfig()
int weekstart = KGlobal::locale()->weekStartDay();
for( int i = 0; i < 7; i++ ) {
day = weekstart + i <= 7 ? weekstart + i : ( weekstart + i ) % 7;
- QString dayName = KOGlobals::self()->calendarSystem()->weekDayName( day,
+ TQString dayName = KOGlobals::self()->calendarSystem()->weekDayName( day,
true );
if ( KOPrefs::instance()->mCompactDialogs ) dayName = dayName.left( 1 );
mHeadings[i]->setText( dayName );
@@ -251,7 +251,7 @@ void KDateNavigator::selectDates( const DateList &dateList )
}
}
-void KDateNavigator::wheelEvent ( QWheelEvent *e )
+void KDateNavigator::wheelEvent ( TQWheelEvent *e )
{
if( e->delta() > 0 ) emit goPrevious();
else emit goNext();
@@ -259,13 +259,13 @@ void KDateNavigator::wheelEvent ( QWheelEvent *e )
e->accept();
}
-bool KDateNavigator::eventFilter ( QObject *o, QEvent *e )
+bool KDateNavigator::eventFilter ( TQObject *o, TQEvent *e )
{
- if ( e->type() == QEvent::MouseButtonPress ) {
+ if ( e->type() == TQEvent::MouseButtonPress ) {
int i;
for( i = 0; i < 6; ++i ) {
if ( o == mWeeknos[ i ] ) {
- QDate weekstart = mDayMatrix->getDate( i * 7 );
+ TQDate weekstart = mDayMatrix->getDate( i * 7 );
emit weekClicked( weekstart );
break;
}
diff --git a/korganizer/kdatenavigator.h b/korganizer/kdatenavigator.h
index 873c4cd3e..07e85c2d5 100644
--- a/korganizer/kdatenavigator.h
+++ b/korganizer/kdatenavigator.h
@@ -25,8 +25,8 @@
#ifndef KDATENAVIGATOR_H
#define KDATENAVIGATOR_H
-#include <qframe.h>
-#include <qdatetime.h>
+#include <tqframe.h>
+#include <tqdatetime.h>
#include <libkcal/incidencebase.h>
@@ -46,7 +46,7 @@ class KDateNavigator: public QFrame
{
Q_OBJECT
public:
- KDateNavigator( QWidget *parent = 0, const char *name = 0 );
+ KDateNavigator( TQWidget *parent = 0, const char *name = 0 );
~KDateNavigator();
/**
@@ -54,15 +54,15 @@ class KDateNavigator: public QFrame
*/
void setCalendar( Calendar * );
- void setBaseDate( const QDate & );
+ void setBaseDate( const TQDate & );
KCal::DateList selectedDates() const { return mSelectedDates; }
- QSizePolicy sizePolicy () const;
+ TQSizePolicy sizePolicy () const;
NavigatorBar *navigatorBar() const { return mNavigatorBar; }
- QDate startDate() const;
- QDate endDate() const;
+ TQDate startDate() const;
+ TQDate endDate() const;
public slots:
void selectDates( const KCal::DateList & );
@@ -73,9 +73,9 @@ class KDateNavigator: public QFrame
signals:
void datesSelected( const KCal::DateList & );
- void incidenceDropped( Incidence *, const QDate & );
- void incidenceDroppedMove( Incidence *, const QDate & );
- void weekClicked( const QDate &);
+ void incidenceDropped( Incidence *, const TQDate & );
+ void incidenceDroppedMove( Incidence *, const TQDate & );
+ void weekClicked( const TQDate &);
void goPrevious();
void goNext();
@@ -90,22 +90,22 @@ class KDateNavigator: public QFrame
protected:
void updateDates();
- void wheelEvent( QWheelEvent * );
+ void wheelEvent( TQWheelEvent * );
- bool eventFilter( QObject *,QEvent * );
+ bool eventFilter( TQObject *,TQEvent * );
void setShowWeekNums( bool enabled );
private:
NavigatorBar *mNavigatorBar;
- QLabel *mHeadings[ 7 ];
- QLabel *mWeeknos[ 7 ];
+ TQLabel *mHeadings[ 7 ];
+ TQLabel *mWeeknos[ 7 ];
KODayMatrix *mDayMatrix;
KCal::DateList mSelectedDates;
- QDate mBaseDate;
+ TQDate mBaseDate;
// Disabling copy constructor and assignment operator
KDateNavigator( const KDateNavigator & );
diff --git a/korganizer/koagenda.cpp b/korganizer/koagenda.cpp
index 953bb606a..270ca8f80 100644
--- a/korganizer/koagenda.cpp
+++ b/korganizer/koagenda.cpp
@@ -26,13 +26,13 @@
*/
#include <assert.h>
-#include <qintdict.h>
-#include <qdatetime.h>
-#include <qapplication.h>
-#include <qpopupmenu.h>
-#include <qcursor.h>
-#include <qpainter.h>
-#include <qlabel.h>
+#include <tqintdict.h>
+#include <tqdatetime.h>
+#include <tqapplication.h>
+#include <tqpopupmenu.h>
+#include <tqcursor.h>
+#include <tqpainter.h>
+#include <tqlabel.h>
#include <kdebug.h>
#include <klocale.h>
@@ -62,19 +62,19 @@
////////////////////////////////////////////////////////////////////////////
MarcusBains::MarcusBains(KOAgenda *_agenda,const char *name)
- : QFrame(_agenda->viewport(),name), agenda(_agenda)
+ : TQFrame(_agenda->viewport(),name), agenda(_agenda)
{
setLineWidth(0);
setMargin(0);
setBackgroundColor(Qt::red);
- minutes = new QTimer(this);
- connect(minutes, SIGNAL(timeout()), this, SLOT(updateLocation()));
+ minutes = new TQTimer(this);
+ connect(minutes, TQT_SIGNAL(timeout()), this, TQT_SLOT(updateLocation()));
minutes->start(0, true);
- mTimeBox = new QLabel(this);
+ mTimeBox = new TQLabel(this);
mTimeBox->setAlignment(Qt::AlignRight | Qt::AlignBottom);
- QPalette pal = mTimeBox->palette();
- pal.setColor(QColorGroup::Foreground, Qt::red);
+ TQPalette pal = mTimeBox->palette();
+ pal.setColor(TQColorGroup::Foreground, Qt::red);
mTimeBox->setPalette(pal);
mTimeBox->setAutoMask(true);
@@ -90,7 +90,7 @@ MarcusBains::~MarcusBains()
int MarcusBains::todayColumn()
{
- QDate currentDate = QDate::currentDate();
+ TQDate currentDate = TQDate::currentDate();
DateList dateList = agenda->dateList();
DateList::ConstIterator it;
@@ -107,7 +107,7 @@ int MarcusBains::todayColumn()
void MarcusBains::updateLocation(bool recalculate)
{
- QTime tim = QTime::currentTime();
+ TQTime tim = TQTime::currentTime();
if((tim.hour() == 0) && (oldTime.hour()==23))
recalculate = true;
@@ -157,9 +157,9 @@ void MarcusBains::updateLocation(bool recalculate)
/*
Create an agenda widget with rows rows and columns columns.
*/
-KOAgenda::KOAgenda( int columns, int rows, int rowSize, QWidget *parent,
+KOAgenda::KOAgenda( int columns, int rows, int rowSize, TQWidget *parent,
const char *name, WFlags f )
- : QScrollView( parent, name, f ), mChanger( 0 )
+ : TQScrollView( parent, name, f ), mChanger( 0 )
{
mColumns = columns;
mRows = rows;
@@ -175,8 +175,8 @@ KOAgenda::KOAgenda( int columns, int rows, int rowSize, QWidget *parent,
Create an agenda widget with columns columns and one row. This is used for
all-day events.
*/
-KOAgenda::KOAgenda( int columns, QWidget *parent, const char *name, WFlags f )
- : QScrollView( parent, name, f )
+KOAgenda::KOAgenda( int columns, TQWidget *parent, const char *name, WFlags f )
+ : TQScrollView( parent, name, f )
{
mColumns = columns;
mRows = 1;
@@ -200,12 +200,12 @@ Incidence *KOAgenda::selectedIncidence() const
}
-QDate KOAgenda::selectedIncidenceDate() const
+TQDate KOAgenda::selectedIncidenceDate() const
{
- return ( mSelectedItem ? mSelectedItem->itemDate() : QDate() );
+ return ( mSelectedItem ? mSelectedItem->itemDate() : TQDate() );
}
-const QString KOAgenda::lastSelectedUid() const
+const TQString KOAgenda::lastSelectedUid() const
{
return mSelectedUid;
}
@@ -226,16 +226,16 @@ void KOAgenda::init()
// effect. Has to be fixed.
setFocusPolicy( WheelFocus );
- connect( &mScrollUpTimer, SIGNAL( timeout() ), SLOT( scrollUp() ) );
- connect( &mScrollDownTimer, SIGNAL( timeout() ), SLOT( scrollDown() ) );
+ connect( &mScrollUpTimer, TQT_SIGNAL( timeout() ), TQT_SLOT( scrollUp() ) );
+ connect( &mScrollDownTimer, TQT_SIGNAL( timeout() ), TQT_SLOT( scrollDown() ) );
- mStartCell = QPoint( 0, 0 );
- mEndCell = QPoint( 0, 0 );
+ mStartCell = TQPoint( 0, 0 );
+ mEndCell = TQPoint( 0, 0 );
mHasSelection = false;
- mSelectionStartPoint = QPoint( 0, 0 );
- mSelectionStartCell = QPoint( 0, 0 );
- mSelectionEndCell = QPoint( 0, 0 );
+ mSelectionStartPoint = TQPoint( 0, 0 );
+ mSelectionStartCell = TQPoint( 0, 0 );
+ mSelectionEndCell = TQPoint( 0, 0 );
mOldLowerScrollValue = -1;
mOldUpperScrollValue = -1;
@@ -247,7 +247,7 @@ void KOAgenda::init()
mItemMoved = false;
mSelectedItem = 0;
- mSelectedUid = QString::null;
+ mSelectedUid = TQString::null;
setAcceptDrops( true );
installEventFilter( this );
@@ -273,8 +273,8 @@ void KOAgenda::init()
calculateWorkingHours();
- connect( verticalScrollBar(), SIGNAL( valueChanged( int ) ),
- SLOT( checkScrollBoundaries( int ) ) );
+ connect( verticalScrollBar(), TQT_SIGNAL( valueChanged( int ) ),
+ TQT_SLOT( checkScrollBoundaries( int ) ) );
// Create the Marcus Bains line.
if( mAllDayMode ) {
@@ -334,71 +334,71 @@ void KOAgenda::changeColumns(int columns)
// init();
// update();
- QResizeEvent event( size(), size() );
+ TQResizeEvent event( size(), size() );
- QApplication::sendEvent( this, &event );
+ TQApplication::sendEvent( this, &event );
}
/*
This is the eventFilter function, which gets all events from the KOAgendaItems
contained in the agenda. It has to handle moving and resizing for all items.
*/
-bool KOAgenda::eventFilter ( QObject *object, QEvent *event )
+bool KOAgenda::eventFilter ( TQObject *object, TQEvent *event )
{
// kdDebug(5850) << "KOAgenda::eventFilter() " << int( event->type() ) << endl;
switch( event->type() ) {
- case QEvent::MouseButtonPress:
- case QEvent::MouseButtonDblClick:
- case QEvent::MouseButtonRelease:
- case QEvent::MouseMove:
- return eventFilter_mouse( object, static_cast<QMouseEvent *>( event ) );
+ case TQEvent::MouseButtonPress:
+ case TQEvent::MouseButtonDblClick:
+ case TQEvent::MouseButtonRelease:
+ case TQEvent::MouseMove:
+ return eventFilter_mouse( object, static_cast<TQMouseEvent *>( event ) );
#ifndef QT_NO_WHEELEVENT
- case QEvent::Wheel:
- return eventFilter_wheel( object, static_cast<QWheelEvent *>( event ) );
+ case TQEvent::Wheel:
+ return eventFilter_wheel( object, static_cast<TQWheelEvent *>( event ) );
#endif
- case QEvent::KeyPress:
- case QEvent::KeyRelease:
- return eventFilter_key( object, static_cast<QKeyEvent *>( event ) );
+ case TQEvent::KeyPress:
+ case TQEvent::KeyRelease:
+ return eventFilter_key( object, static_cast<TQKeyEvent *>( event ) );
- case ( QEvent::Leave ):
+ case ( TQEvent::Leave ):
if ( !mActionItem )
setCursor( arrowCursor );
if ( object == viewport() )
emit leaveAgenda();
return true;
- case QEvent::Enter:
+ case TQEvent::Enter:
emit enterAgenda();
- return QScrollView::eventFilter( object, event );
+ return TQScrollView::eventFilter( object, event );
#ifndef KORG_NODND
- case QEvent::DragEnter:
- case QEvent::DragMove:
- case QEvent::DragLeave:
- case QEvent::Drop:
- // case QEvent::DragResponse:
- return eventFilter_drag(object, static_cast<QDropEvent*>(event));
+ case TQEvent::DragEnter:
+ case TQEvent::DragMove:
+ case TQEvent::DragLeave:
+ case TQEvent::Drop:
+ // case TQEvent::DragResponse:
+ return eventFilter_drag(object, static_cast<TQDropEvent*>(event));
#endif
default:
- return QScrollView::eventFilter( object, event );
+ return TQScrollView::eventFilter( object, event );
}
}
-bool KOAgenda::eventFilter_drag( QObject *object, QDropEvent *de )
+bool KOAgenda::eventFilter_drag( TQObject *object, TQDropEvent *de )
{
#ifndef KORG_NODND
- QPoint viewportPos;
+ TQPoint viewportPos;
if ( object != viewport() && object != this ) {
- viewportPos = static_cast<QWidget *>( object )->mapToParent( de->pos() );
+ viewportPos = static_cast<TQWidget *>( object )->mapToParent( de->pos() );
} else {
viewportPos = de->pos();
}
switch ( de->type() ) {
- case QEvent::DragEnter:
- case QEvent::DragMove:
+ case TQEvent::DragEnter:
+ case TQEvent::DragMove:
if ( ICalDrag::canDecode( de ) || VCalDrag::canDecode( de ) ) {
DndFactory factory( mCalendar );
@@ -412,10 +412,10 @@ bool KOAgenda::eventFilter_drag( QObject *object, QDropEvent *de )
return true;
} else return false;
break;
- case QEvent::DragLeave:
+ case TQEvent::DragLeave:
return false;
break;
- case QEvent::Drop:
+ case TQEvent::Drop:
{
if ( !ICalDrag::canDecode( de ) && !VCalDrag::canDecode( de ) ) {
return false;
@@ -426,23 +426,23 @@ bool KOAgenda::eventFilter_drag( QObject *object, QDropEvent *de )
if ( todo ) {
de->acceptAction();
- QPoint pos;
+ TQPoint pos;
// FIXME: This is a bad hack, as the viewportToContents seems to be off by
// 2000 (which is the left upper corner of the viewport). It works correctly
// for agendaItems.
if ( object == this ) {
- pos = viewportPos + QPoint( contentsX(), contentsY() );
+ pos = viewportPos + TQPoint( contentsX(), contentsY() );
} else {
pos = viewportToContents( viewportPos );
}
- QPoint gpos = contentsToGrid( pos );
+ TQPoint gpos = contentsToGrid( pos );
emit droppedToDo( todo, gpos, mAllDayMode );
return true;
}
}
break;
- case QEvent::DragResponse:
+ case TQEvent::DragResponse:
default:
break;
}
@@ -451,14 +451,14 @@ bool KOAgenda::eventFilter_drag( QObject *object, QDropEvent *de )
return false;
}
-bool KOAgenda::eventFilter_key( QObject *, QKeyEvent *ke )
+bool KOAgenda::eventFilter_key( TQObject *, TQKeyEvent *ke )
{
// kdDebug(5850) << "KOAgenda::eventFilter_key() " << ke->type() << endl;
// If Return is pressed bring up an editor for the current selected time span.
if ( ke->key() == Key_Return ) {
- if ( ke->type() == QEvent::KeyPress ) mReturnPressed = true;
- else if ( ke->type() == QEvent::KeyRelease ) {
+ if ( ke->type() == TQEvent::KeyPress ) mReturnPressed = true;
+ else if ( ke->type() == TQEvent::KeyRelease ) {
if ( mReturnPressed ) {
emitNewEventForSelection();
mReturnPressed = false;
@@ -472,7 +472,7 @@ bool KOAgenda::eventFilter_key( QObject *, QKeyEvent *ke )
// Ignore all input that does not produce any output
if ( ke->text().isEmpty() ) return false;
- if ( ke->type() == QEvent::KeyPress || ke->type() == QEvent::KeyRelease ) {
+ if ( ke->type() == TQEvent::KeyPress || ke->type() == TQEvent::KeyRelease ) {
switch ( ke->key() ) {
case Key_Escape:
case Key_Return:
@@ -494,7 +494,7 @@ bool KOAgenda::eventFilter_key( QObject *, QKeyEvent *ke )
case Key_Alt:
break;
default:
- mTypeAheadEvents.append( new QKeyEvent( ke->type(), ke->key(),
+ mTypeAheadEvents.append( new TQKeyEvent( ke->type(), ke->key(),
ke->ascii(), ke->state(),
ke->text(), ke->isAutoRepeat(),
ke->count() ) );
@@ -517,23 +517,23 @@ void KOAgenda::finishTypeAhead()
{
// kdDebug(5850) << "KOAgenda::finishTypeAhead()" << endl;
if ( typeAheadReceiver() ) {
- for( QEvent *e = mTypeAheadEvents.first(); e;
+ for( TQEvent *e = mTypeAheadEvents.first(); e;
e = mTypeAheadEvents.next() ) {
// kdDebug(5850) << "sendEvent() " << int( typeAheadReceiver() ) << endl;
- QApplication::sendEvent( typeAheadReceiver(), e );
+ TQApplication::sendEvent( typeAheadReceiver(), e );
}
}
mTypeAheadEvents.clear();
mTypeAhead = false;
}
#ifndef QT_NO_WHEELEVENT
-bool KOAgenda::eventFilter_wheel ( QObject *object, QWheelEvent *e )
+bool KOAgenda::eventFilter_wheel ( TQObject *object, TQWheelEvent *e )
{
- QPoint viewportPos;
+ TQPoint viewportPos;
bool accepted=false;
if ( ( e->state() & ShiftButton) == ShiftButton ) {
if ( object != viewport() ) {
- viewportPos = ( (QWidget *) object )->mapToParent( e->pos() );
+ viewportPos = ( (TQWidget *) object )->mapToParent( e->pos() );
} else {
viewportPos = e->pos();
}
@@ -547,7 +547,7 @@ bool KOAgenda::eventFilter_wheel ( QObject *object, QWheelEvent *e )
if ( ( e->state() & ControlButton ) == ControlButton ){
if ( object != viewport() ) {
- viewportPos = ( (QWidget *)object )->mapToParent( e->pos() );
+ viewportPos = ( (TQWidget *)object )->mapToParent( e->pos() );
} else {
viewportPos = e->pos();
}
@@ -561,17 +561,17 @@ bool KOAgenda::eventFilter_wheel ( QObject *object, QWheelEvent *e )
return accepted;
}
#endif
-bool KOAgenda::eventFilter_mouse(QObject *object, QMouseEvent *me)
+bool KOAgenda::eventFilter_mouse(TQObject *object, TQMouseEvent *me)
{
- QPoint viewportPos;
+ TQPoint viewportPos;
if (object != viewport()) {
- viewportPos = ((QWidget *)object)->mapToParent(me->pos());
+ viewportPos = ((TQWidget *)object)->mapToParent(me->pos());
} else {
viewportPos = me->pos();
}
switch (me->type()) {
- case QEvent::MouseButtonPress:
+ case TQEvent::MouseButtonPress:
// kdDebug(5850) << "koagenda: filtered button press" << endl;
if (object != viewport()) {
if (me->button() == RightButton) {
@@ -602,7 +602,7 @@ bool KOAgenda::eventFilter_mouse(QObject *object, QMouseEvent *me)
if (me->button() == RightButton)
{
// if mouse pointer is not in selection, select the cell below the cursor
- QPoint gpos = contentsToGrid( viewportToContents( viewportPos ) );
+ TQPoint gpos = contentsToGrid( viewportToContents( viewportPos ) );
if ( !ptInSelection( gpos ) ) {
mSelectionStartCell = gpos;
mSelectionEndCell = gpos;
@@ -616,7 +616,7 @@ bool KOAgenda::eventFilter_mouse(QObject *object, QMouseEvent *me)
else
{
// if mouse pointer is in selection, don't change selection
- QPoint gpos = contentsToGrid( viewportToContents( viewportPos ) );
+ TQPoint gpos = contentsToGrid( viewportToContents( viewportPos ) );
if ( !ptInSelection( gpos ) ) {
selectItem(0);
mActionItem = 0;
@@ -627,7 +627,7 @@ bool KOAgenda::eventFilter_mouse(QObject *object, QMouseEvent *me)
}
break;
- case QEvent::MouseButtonRelease:
+ case TQEvent::MouseButtonRelease:
if (mActionItem) {
endItemAction();
} else if ( mActionType == SELECT ) {
@@ -639,10 +639,10 @@ bool KOAgenda::eventFilter_mouse(QObject *object, QMouseEvent *me)
viewportToContents( viewportPos ) ) ));
break;
- case QEvent::MouseMove: {
+ case TQEvent::MouseMove: {
// This nasty gridToContents(contentsToGrid(..)) is needed to
// avoid an offset of a few pixels. Don't ask me why...
- QPoint indicatorPos = gridToContents(contentsToGrid(
+ TQPoint indicatorPos = gridToContents(contentsToGrid(
viewportToContents( viewportPos )));
if (object != viewport()) {
KOAgendaItem *moveItem = dynamic_cast<KOAgendaItem *>(object);
@@ -656,12 +656,12 @@ bool KOAgenda::eventFilter_mouse(QObject *object, QMouseEvent *me)
// show cursor at the current begin of the item
KOAgendaItem *firstItem = mActionItem->firstMultiItem();
if (!firstItem) firstItem = mActionItem;
- indicatorPos = gridToContents( QPoint( firstItem->cellXLeft(),
+ indicatorPos = gridToContents( TQPoint( firstItem->cellXLeft(),
firstItem->cellYTop() ) );
} else if ( mActionType == RESIZEBOTTOM ) {
// RESIZETOP is handled correctly, only resizebottom works differently
- indicatorPos = gridToContents( QPoint( mActionItem->cellXLeft(),
+ indicatorPos = gridToContents( TQPoint( mActionItem->cellXLeft(),
mActionItem->cellYBottom()+1 ) );
}
@@ -674,7 +674,7 @@ bool KOAgenda::eventFilter_mouse(QObject *object, QMouseEvent *me)
// show cursor at end of timespan
if ( ((mStartCell.y() < mEndCell.y()) && (mEndCell.x() >= mStartCell.x())) ||
(mEndCell.x() > mStartCell.x()) )
- indicatorPos = gridToContents( QPoint(mEndCell.x(), mEndCell.y()+1) );
+ indicatorPos = gridToContents( TQPoint(mEndCell.x(), mEndCell.y()+1) );
else
indicatorPos = gridToContents( mEndCell );
}
@@ -682,7 +682,7 @@ bool KOAgenda::eventFilter_mouse(QObject *object, QMouseEvent *me)
emit mousePosSignal( indicatorPos );
break; }
- case QEvent::MouseButtonDblClick:
+ case TQEvent::MouseButtonDblClick:
if (object == viewport()) {
selectItem(0);
emit newEventSignal();
@@ -702,7 +702,7 @@ bool KOAgenda::eventFilter_mouse(QObject *object, QMouseEvent *me)
return true;
}
-bool KOAgenda::ptInSelection( QPoint gpos ) const
+bool KOAgenda::ptInSelection( TQPoint gpos ) const
{
if ( !mHasSelection ) {
return false;
@@ -716,7 +716,7 @@ bool KOAgenda::ptInSelection( QPoint gpos ) const
return true;
}
-void KOAgenda::startSelectAction( const QPoint &viewportPos )
+void KOAgenda::startSelectAction( const TQPoint &viewportPos )
{
emit newStartSelectSignal();
@@ -724,8 +724,8 @@ void KOAgenda::startSelectAction( const QPoint &viewportPos )
mSelectionStartPoint = viewportPos;
mHasSelection = true;
- QPoint pos = viewportToContents( viewportPos );
- QPoint gpos = contentsToGrid( pos );
+ TQPoint pos = viewportToContents( viewportPos );
+ TQPoint gpos = contentsToGrid( pos );
// Store new selection
mStartCell = gpos;
@@ -736,12 +736,12 @@ void KOAgenda::startSelectAction( const QPoint &viewportPos )
updateContents();
}
-void KOAgenda::performSelectAction(const QPoint& viewportPos)
+void KOAgenda::performSelectAction(const TQPoint& viewportPos)
{
- QPoint pos = viewportToContents( viewportPos );
- QPoint gpos = contentsToGrid( pos );
+ TQPoint pos = viewportToContents( viewportPos );
+ TQPoint gpos = contentsToGrid( pos );
- QPoint clipperPos = clipper()->
+ TQPoint clipperPos = clipper()->
mapFromGlobal(viewport()->mapToGlobal(viewportPos));
// Scroll if cursor was moved to upper or lower end of agenda.
@@ -771,7 +771,7 @@ void KOAgenda::performSelectAction(const QPoint& viewportPos)
}
}
-void KOAgenda::endSelectAction( const QPoint &currentPos )
+void KOAgenda::endSelectAction( const TQPoint &currentPos )
{
mScrollUpTimer.stop();
mScrollDownTimer.stop();
@@ -782,19 +782,19 @@ void KOAgenda::endSelectAction( const QPoint &currentPos )
if ( KOPrefs::instance()->mSelectionStartsEditor ) {
if ( ( mSelectionStartPoint - currentPos ).manhattanLength() >
- QApplication::startDragDistance() ) {
+ TQApplication::startDragDistance() ) {
emitNewEventForSelection();
}
}
}
KOAgenda::MouseActionType KOAgenda::isInResizeArea( bool horizontal,
- const QPoint &pos, KOAgendaItem*item )
+ const TQPoint &pos, KOAgendaItem*item )
{
if (!item) return NOP;
- QPoint gridpos = contentsToGrid( pos );
- QPoint contpos = gridToContents( gridpos +
- QPoint( (KOGlobals::self()->reverseLayout())?1:0, 0 ) );
+ TQPoint gridpos = contentsToGrid( pos );
+ TQPoint contpos = gridToContents( gridpos +
+ TQPoint( (KOGlobals::self()->reverseLayout())?1:0, 0 ) );
//kdDebug(5850)<<"contpos="<<contpos<<", pos="<<pos<<", gpos="<<gpos<<endl;
//kdDebug(5850)<<"clXLeft="<<clXLeft<<", clXRight="<<clXRight<<endl;
@@ -834,9 +834,9 @@ KOAgenda::MouseActionType KOAgenda::isInResizeArea( bool horizontal,
}
}
-void KOAgenda::startItemAction(const QPoint& viewportPos)
+void KOAgenda::startItemAction(const TQPoint& viewportPos)
{
- QPoint pos = viewportToContents( viewportPos );
+ TQPoint pos = viewportToContents( viewportPos );
mStartCell = contentsToGrid( pos );
mEndCell = mStartCell;
@@ -852,18 +852,18 @@ void KOAgenda::startItemAction(const QPoint& viewportPos)
setActionCursor( mActionType, true );
}
-void KOAgenda::performItemAction(const QPoint& viewportPos)
+void KOAgenda::performItemAction(const TQPoint& viewportPos)
{
// kdDebug(5850) << "viewportPos: " << viewportPos.x() << "," << viewportPos.y() << endl;
-// QPoint point = viewport()->mapToGlobal(viewportPos);
+// TQPoint point = viewport()->mapToGlobal(viewportPos);
// kdDebug(5850) << "Global: " << point.x() << "," << point.y() << endl;
// point = clipper()->mapFromGlobal(point);
// kdDebug(5850) << "clipper: " << point.x() << "," << point.y() << endl;
// kdDebug(5850) << "visible height: " << visibleHeight() << endl;
- QPoint pos = viewportToContents( viewportPos );
+ TQPoint pos = viewportToContents( viewportPos );
// kdDebug(5850) << "contents: " << x << "," << y << "\n" << endl;
- QPoint gpos = contentsToGrid( pos );
- QPoint clipperPos = clipper()->
+ TQPoint gpos = contentsToGrid( pos );
+ TQPoint clipperPos = clipper()->
mapFromGlobal(viewport()->mapToGlobal(viewportPos));
// Cursor left active agenda area.
@@ -925,7 +925,7 @@ void KOAgenda::performItemAction(const QPoint& viewportPos)
if (!firstItem) firstItem = mActionItem;
KOAgendaItem *lastItem = mActionItem->lastMultiItem();
if (!lastItem) lastItem = mActionItem;
- QPoint deltapos = gpos - mEndCell;
+ TQPoint deltapos = gpos - mEndCell;
KOAgendaItem *moveItem = firstItem;
while (moveItem) {
bool changed=false;
@@ -947,7 +947,7 @@ void KOAgenda::performItemAction(const QPoint& viewportPos)
mItems.append( newFirst );
moveItem->resize( int( mGridSpacingX * newFirst->cellWidth() ),
int( mGridSpacingY * newFirst->cellHeight() ));
- QPoint cpos = gridToContents( QPoint( newFirst->cellXLeft(), newFirst->cellYTop() ) );
+ TQPoint cpos = gridToContents( TQPoint( newFirst->cellXLeft(), newFirst->cellYTop() ) );
addChild( newFirst, cpos.x(), cpos.y() );
} else {
newFirst = insertItem( moveItem->incidence(), moveItem->itemDate(),
@@ -992,7 +992,7 @@ void KOAgenda::performItemAction(const QPoint& viewportPos)
mItems.append(newLast);
moveItem->resize( int( mGridSpacingX * newLast->cellWidth() ),
int( mGridSpacingY * newLast->cellHeight() ));
- QPoint cpos = gridToContents( QPoint( newLast->cellXLeft(), newLast->cellYTop() ) ) ;
+ TQPoint cpos = gridToContents( TQPoint( newLast->cellXLeft(), newLast->cellYTop() ) ) ;
addChild( newLast, cpos.x(), cpos.y() );
} else {
newLast = insertItem( moveItem->incidence(), moveItem->itemDate(),
@@ -1050,7 +1050,7 @@ void KOAgenda::endItemAction()
if ( mItemMoved ) {
bool modify = true;
if ( mActionItem->incidence()->doesRecur() ) {
- int res = KOMessageBox::fourBtnMsgBox( this, QMessageBox::Question,
+ int res = KOMessageBox::fourBtnMsgBox( this, TQMessageBox::Question,
i18n("The item you try to change is a recurring item. Shall the changes "
"be applied only to this single occurrence, only to the future items, "
"or to all items in the recurrence?"),
@@ -1132,7 +1132,7 @@ void KOAgenda::endItemAction()
KOAgendaItem *modif = placeItem;
- QPtrList<KOAgendaItem> oldconflictItems = placeItem->conflictItems();
+ TQPtrList<KOAgendaItem> oldconflictItems = placeItem->conflictItems();
KOAgendaItem *item;
for ( item = oldconflictItems.first(); item != 0;
item = oldconflictItems.next() ) {
@@ -1179,15 +1179,15 @@ void KOAgenda::setActionCursor( int actionType, bool acting )
}
}
-void KOAgenda::setNoActionCursor( KOAgendaItem *moveItem, const QPoint& viewportPos )
+void KOAgenda::setNoActionCursor( KOAgendaItem *moveItem, const TQPoint& viewportPos )
{
// kdDebug(5850) << "viewportPos: " << viewportPos.x() << "," << viewportPos.y() << endl;
-// QPoint point = viewport()->mapToGlobal(viewportPos);
+// TQPoint point = viewport()->mapToGlobal(viewportPos);
// kdDebug(5850) << "Global: " << point.x() << "," << point.y() << endl;
// point = clipper()->mapFromGlobal(point);
// kdDebug(5850) << "clipper: " << point.x() << "," << point.y() << endl;
- QPoint pos = viewportToContents( viewportPos );
+ TQPoint pos = viewportToContents( viewportPos );
bool noResize = (moveItem && moveItem->incidence() &&
moveItem->incidence()->type() == "Todo");
@@ -1201,10 +1201,10 @@ void KOAgenda::setNoActionCursor( KOAgendaItem *moveItem, const QPoint& viewport
*/
double KOAgenda::calcSubCellWidth( KOAgendaItem *item )
{
- QPoint pt, pt1;
- pt = gridToContents( QPoint( item->cellXLeft(), item->cellYTop() ) );
- pt1 = gridToContents( QPoint( item->cellXLeft(), item->cellYTop() ) +
- QPoint( 1, 1 ) );
+ TQPoint pt, pt1;
+ pt = gridToContents( TQPoint( item->cellXLeft(), item->cellYTop() ) );
+ pt1 = gridToContents( TQPoint( item->cellXLeft(), item->cellYTop() ) +
+ TQPoint( 1, 1 ) );
pt1 -= pt;
int maxSubCells = item->subCells();
double newSubCellWidth;
@@ -1224,7 +1224,7 @@ void KOAgenda::adjustItemPosition( KOAgendaItem *item )
int clXLeft = item->cellXLeft();
if ( KOGlobals::self()->reverseLayout() )
clXLeft = item->cellXRight() + 1;
- QPoint cpos = gridToContents( QPoint( clXLeft, item->cellYTop() ) );
+ TQPoint cpos = gridToContents( TQPoint( clXLeft, item->cellYTop() ) );
moveChild( item, cpos.x(), cpos.y() );
}
@@ -1234,9 +1234,9 @@ void KOAgenda::placeAgendaItem( KOAgendaItem *item, double subCellWidth )
// << " subCellWidth: " << subCellWidth << endl;
// "left" upper corner, no subcells yet, RTL layouts have right/left switched, widths are negative then
- QPoint pt = gridToContents( QPoint( item->cellXLeft(), item->cellYTop() ) );
+ TQPoint pt = gridToContents( TQPoint( item->cellXLeft(), item->cellYTop() ) );
// right lower corner
- QPoint pt1 = gridToContents( QPoint( item->cellXLeft() + item->cellWidth(),
+ TQPoint pt1 = gridToContents( TQPoint( item->cellXLeft() + item->cellWidth(),
item->cellYBottom()+1 ) );
double subCellPos = item->subCell() * subCellWidth;
@@ -1296,16 +1296,16 @@ void KOAgenda::placeSubCells( KOAgendaItem *placeItem )
kdDebug(5850) << "KOAgenda::placeSubCells()..." << endl;
#endif
- QPtrList<KOrg::CellItem> cells;
+ TQPtrList<KOrg::CellItem> cells;
KOAgendaItem *item;
for ( item = mItems.first(); item != 0; item = mItems.next() ) {
cells.append( item );
}
- QPtrList<KOrg::CellItem> items = KOrg::CellItem::placeItem( cells,
+ TQPtrList<KOrg::CellItem> items = KOrg::CellItem::placeItem( cells,
placeItem );
- placeItem->setConflictItems( QPtrList<KOAgendaItem>() );
+ placeItem->setConflictItems( TQPtrList<KOAgendaItem>() );
double newSubCellWidth = calcSubCellWidth( placeItem );
KOrg::CellItem *i;
for ( i = items.first(); i; i = items.next() ) {
@@ -1322,22 +1322,22 @@ void KOAgenda::placeSubCells( KOAgendaItem *placeItem )
int KOAgenda::columnWidth( int column )
{
- int start = gridToContents( QPoint( column, 0 ) ).x();
+ int start = gridToContents( TQPoint( column, 0 ) ).x();
if (KOGlobals::self()->reverseLayout() )
column--;
else
column++;
- int end = gridToContents( QPoint( column, 0 ) ).x();
+ int end = gridToContents( TQPoint( column, 0 ) ).x();
return end - start;
}
/*
Draw grid in the background of the agenda.
*/
-void KOAgenda::drawContents(QPainter* p, int cx, int cy, int cw, int ch)
+void KOAgenda::drawContents(TQPainter* p, int cx, int cy, int cw, int ch)
{
- QPixmap db(cw, ch);
+ TQPixmap db(cw, ch);
db.fill(KOPrefs::instance()->mAgendaBgColor);
- QPainter dbp(&db);
+ TQPainter dbp(&db);
dbp.translate(-cx,-cy);
// kdDebug(5850) << "KOAgenda::drawContents()" << endl;
@@ -1345,8 +1345,8 @@ void KOAgenda::drawContents(QPainter* p, int cx, int cy, int cw, int ch)
// Highlight working hours
if (mWorkingHoursEnable) {
- QPoint pt1( cx, mWorkingHoursYTop );
- QPoint pt2( cx+cw, mWorkingHoursYBottom );
+ TQPoint pt1( cx, mWorkingHoursYTop );
+ TQPoint pt2( cx+cw, mWorkingHoursYBottom );
if ( pt2.x() >= pt1.x() /*&& pt2.y() >= pt1.y()*/) {
int gxStart = contentsToGrid( pt1 ).x();
int gxEnd = contentsToGrid( pt2 ).x();
@@ -1358,7 +1358,7 @@ void KOAgenda::drawContents(QPainter* p, int cx, int cy, int cw, int ch)
}
int xoffset = ( KOGlobals::self()->reverseLayout()?1:0 );
while( gxStart <= gxEnd ) {
- int xStart = gridToContents( QPoint( gxStart+xoffset, 0 ) ).x();
+ int xStart = gridToContents( TQPoint( gxStart+xoffset, 0 ) ).x();
int xWidth = columnWidth( gxStart ) + 1;
if ( pt2.y() < pt1.y() ) {
// overnight working hours
@@ -1389,32 +1389,32 @@ void KOAgenda::drawContents(QPainter* p, int cx, int cy, int cw, int ch)
// draw selection
if ( mHasSelection ) {
- QPoint pt, pt1;
+ TQPoint pt, pt1;
if ( mSelectionEndCell.x() > mSelectionStartCell.x() ) { // multi day selection
// draw start day
pt = gridToContents( mSelectionStartCell );
- pt1 = gridToContents( QPoint( mSelectionStartCell.x() + 1, mRows + 1 ) );
- dbp.fillRect( QRect( pt, pt1 ), KOPrefs::instance()->mHighlightColor );
+ pt1 = gridToContents( TQPoint( mSelectionStartCell.x() + 1, mRows + 1 ) );
+ dbp.fillRect( TQRect( pt, pt1 ), KOPrefs::instance()->mHighlightColor );
// draw all other days between the start day and the day of the selection end
for ( int c = mSelectionStartCell.x() + 1; c < mSelectionEndCell.x(); ++c ) {
- pt = gridToContents( QPoint( c, 0 ) );
- pt1 = gridToContents( QPoint( c + 1, mRows + 1 ) );
- dbp.fillRect( QRect( pt, pt1 ), KOPrefs::instance()->mHighlightColor );
+ pt = gridToContents( TQPoint( c, 0 ) );
+ pt1 = gridToContents( TQPoint( c + 1, mRows + 1 ) );
+ dbp.fillRect( TQRect( pt, pt1 ), KOPrefs::instance()->mHighlightColor );
}
// draw end day
- pt = gridToContents( QPoint( mSelectionEndCell.x(), 0 ) );
- pt1 = gridToContents( mSelectionEndCell + QPoint(1,1) );
- dbp.fillRect( QRect( pt, pt1), KOPrefs::instance()->mHighlightColor );
+ pt = gridToContents( TQPoint( mSelectionEndCell.x(), 0 ) );
+ pt1 = gridToContents( mSelectionEndCell + TQPoint(1,1) );
+ dbp.fillRect( TQRect( pt, pt1), KOPrefs::instance()->mHighlightColor );
} else { // single day selection
pt = gridToContents( mSelectionStartCell );
- pt1 = gridToContents( mSelectionEndCell + QPoint(1,1) );
- dbp.fillRect( QRect( pt, pt1 ), KOPrefs::instance()->mHighlightColor );
+ pt1 = gridToContents( mSelectionEndCell + TQPoint(1,1) );
+ dbp.fillRect( TQRect( pt, pt1 ), KOPrefs::instance()->mHighlightColor );
}
}
- QPen hourPen( KOPrefs::instance()->mAgendaBgColor.dark( 150 ) );
- QPen halfHourPen( KOPrefs::instance()->mAgendaBgColor.dark( 125 ) );
+ TQPen hourPen( KOPrefs::instance()->mAgendaBgColor.dark( 150 ) );
+ TQPen halfHourPen( KOPrefs::instance()->mAgendaBgColor.dark( 125 ) );
dbp.setPen( hourPen );
// Draw vertical lines of grid, start with the last line not yet visible
@@ -1445,23 +1445,23 @@ void KOAgenda::drawContents(QPainter* p, int cx, int cy, int cw, int ch)
/*
Convert srcollview contents coordinates to agenda grid coordinates.
*/
-QPoint KOAgenda::contentsToGrid ( const QPoint &pos ) const
+TQPoint KOAgenda::contentsToGrid ( const TQPoint &pos ) const
{
int gx = int( KOGlobals::self()->reverseLayout() ?
mColumns - pos.x()/mGridSpacingX : pos.x()/mGridSpacingX );
int gy = int( pos.y()/mGridSpacingY );
- return QPoint( gx, gy );
+ return TQPoint( gx, gy );
}
/*
Convert agenda grid coordinates to scrollview contents coordinates.
*/
-QPoint KOAgenda::gridToContents( const QPoint &gpos ) const
+TQPoint KOAgenda::gridToContents( const TQPoint &gpos ) const
{
int x = int( KOGlobals::self()->reverseLayout() ?
(mColumns - gpos.x())*mGridSpacingX : gpos.x()*mGridSpacingX );
int y = int( gpos.y()*mGridSpacingY );
- return QPoint( x, y );
+ return TQPoint( x, y );
}
@@ -1469,7 +1469,7 @@ QPoint KOAgenda::gridToContents( const QPoint &gpos ) const
Return Y coordinate corresponding to time. Coordinates are rounded to fit into
the grid.
*/
-int KOAgenda::timeToY(const QTime &time)
+int KOAgenda::timeToY(const TQTime &time)
{
// kdDebug(5850) << "Time: " << time.toString() << endl;
int minutesPerCell = 24 * 60 / mRows;
@@ -1487,14 +1487,14 @@ int KOAgenda::timeToY(const QTime &time)
Return time corresponding to cell y coordinate. Coordinates are rounded to
fit into the grid.
*/
-QTime KOAgenda::gyToTime(int gy)
+TQTime KOAgenda::gyToTime(int gy)
{
// kdDebug(5850) << "gyToTime: " << gy << endl;
int secondsPerCell = 24 * 60 * 60/ mRows;
int timeSeconds = secondsPerCell * gy;
- QTime time( 0, 0, 0 );
+ TQTime time( 0, 0, 0 );
if ( timeSeconds < 24 * 60 * 60 ) {
time = time.addSecs(timeSeconds);
} else {
@@ -1505,10 +1505,10 @@ QTime KOAgenda::gyToTime(int gy)
return time;
}
-QMemArray<int> KOAgenda::minContentsY()
+TQMemArray<int> KOAgenda::minContentsY()
{
- QMemArray<int> minArray;
- minArray.fill( timeToY( QTime(23, 59) ), mSelectedDates.count() );
+ TQMemArray<int> minArray;
+ minArray.fill( timeToY( TQTime(23, 59) ), mSelectedDates.count() );
for ( KOAgendaItem *item = mItems.first();
item != 0; item = mItems.next() ) {
int ymin = item->cellYTop();
@@ -1522,10 +1522,10 @@ QMemArray<int> KOAgenda::minContentsY()
return minArray;
}
-QMemArray<int> KOAgenda::maxContentsY()
+TQMemArray<int> KOAgenda::maxContentsY()
{
- QMemArray<int> maxArray;
- maxArray.fill( timeToY( QTime(0, 0) ), mSelectedDates.count() );
+ TQMemArray<int> maxArray;
+ maxArray.fill( timeToY( TQTime(0, 0) ), mSelectedDates.count() );
for ( KOAgendaItem *item = mItems.first();
item != 0; item = mItems.next() ) {
int ymax = item->cellYBottom();
@@ -1539,7 +1539,7 @@ QMemArray<int> KOAgenda::maxContentsY()
return maxArray;
}
-void KOAgenda::setStartTime( const QTime &startHour )
+void KOAgenda::setStartTime( const TQTime &startHour )
{
double startPos = ( startHour.hour()/24. + startHour.minute()/1440. +
startHour.second()/86400. ) * mRows * gridSpacingY();
@@ -1550,7 +1550,7 @@ void KOAgenda::setStartTime( const QTime &startHour )
/*
Insert KOAgendaItem into agenda.
*/
-KOAgendaItem *KOAgenda::insertItem( Incidence *incidence, const QDate &qd, int X,
+KOAgendaItem *KOAgenda::insertItem( Incidence *incidence, const TQDate &qd, int X,
int YTop, int YBottom )
{
#if 0
@@ -1568,10 +1568,10 @@ KOAgendaItem *KOAgenda::insertItem( Incidence *incidence, const QDate &qd, int X
mActionType = NOP;
KOAgendaItem *agendaItem = new KOAgendaItem( incidence, qd, viewport() );
- connect( agendaItem, SIGNAL( removeAgendaItem( KOAgendaItem * ) ),
- SLOT( removeAgendaItem( KOAgendaItem * ) ) );
- connect( agendaItem, SIGNAL( showAgendaItem( KOAgendaItem * ) ),
- SLOT( showAgendaItem( KOAgendaItem * ) ) );
+ connect( agendaItem, TQT_SIGNAL( removeAgendaItem( KOAgendaItem * ) ),
+ TQT_SLOT( removeAgendaItem( KOAgendaItem * ) ) );
+ connect( agendaItem, TQT_SIGNAL( showAgendaItem( KOAgendaItem * ) ),
+ TQT_SLOT( showAgendaItem( KOAgendaItem * ) ) );
if ( YBottom <= YTop ) {
kdDebug(5850) << "KOAgenda::insertItem(): Text: " << agendaItem->text() << " YSize<0" << endl;
@@ -1602,7 +1602,7 @@ KOAgendaItem *KOAgenda::insertItem( Incidence *incidence, const QDate &qd, int X
/*
Insert all-day KOAgendaItem into agenda.
*/
-KOAgendaItem *KOAgenda::insertAllDayItem( Incidence *event, const QDate &qd,
+KOAgendaItem *KOAgenda::insertAllDayItem( Incidence *event, const TQDate &qd,
int XBegin, int XEnd )
{
if ( !mAllDayMode ) {
@@ -1613,10 +1613,10 @@ KOAgendaItem *KOAgenda::insertAllDayItem( Incidence *event, const QDate &qd,
mActionType = NOP;
KOAgendaItem *agendaItem = new KOAgendaItem( event, qd, viewport() );
- connect( agendaItem, SIGNAL( removeAgendaItem( KOAgendaItem* ) ),
- SLOT( removeAgendaItem( KOAgendaItem* ) ) );
- connect( agendaItem, SIGNAL( showAgendaItem( KOAgendaItem* ) ),
- SLOT( showAgendaItem( KOAgendaItem* ) ) );
+ connect( agendaItem, TQT_SIGNAL( removeAgendaItem( KOAgendaItem* ) ),
+ TQT_SLOT( removeAgendaItem( KOAgendaItem* ) ) );
+ connect( agendaItem, TQT_SIGNAL( showAgendaItem( KOAgendaItem* ) ),
+ TQT_SLOT( showAgendaItem( KOAgendaItem* ) ) );
agendaItem->setCellXY( XBegin, 0, 0 );
agendaItem->setCellXRight( XEnd );
@@ -1640,7 +1640,7 @@ KOAgendaItem *KOAgenda::insertAllDayItem( Incidence *event, const QDate &qd,
}
-void KOAgenda::insertMultiItem (Event *event,const QDate &qd,int XBegin,int XEnd,
+void KOAgenda::insertMultiItem (Event *event,const TQDate &qd,int XBegin,int XEnd,
int YTop,int YBottom)
{
if (mAllDayMode) {
@@ -1650,11 +1650,11 @@ void KOAgenda::insertMultiItem (Event *event,const QDate &qd,int XBegin,int XEnd
mActionType = NOP;
int cellX,cellYTop,cellYBottom;
- QString newtext;
+ TQString newtext;
int width = XEnd - XBegin + 1;
int count = 0;
KOAgendaItem *current = 0;
- QPtrList<KOAgendaItem> multiItems;
+ TQPtrList<KOAgendaItem> multiItems;
int visibleCount = mSelectedDates.first().daysTo(mSelectedDates.last());
for ( cellX = XBegin; cellX <= XEnd; ++cellX ) {
++count;
@@ -1664,7 +1664,7 @@ void KOAgenda::insertMultiItem (Event *event,const QDate &qd,int XBegin,int XEnd
else cellYTop = 0;
if ( cellX == XEnd ) cellYBottom = YBottom;
else cellYBottom = rows() - 1;
- newtext = QString("(%1/%2): ").arg( count ).arg( width );
+ newtext = TQString("(%1/%2): ").arg( count ).arg( width );
newtext.append( event->summary() );
current = insertItem( event, qd, cellX, cellYTop, cellYBottom );
@@ -1699,7 +1699,7 @@ void KOAgenda::removeIncidence( Incidence *incidence )
// First find all items to be deleted and store them
// in its own list. Otherwise removeAgendaItem will reset
// the current position and mess this up.
- QPtrList<KOAgendaItem> itemsToRemove;
+ TQPtrList<KOAgendaItem> itemsToRemove;
KOAgendaItem *item = mItems.first();
while ( item ) {
@@ -1732,7 +1732,7 @@ bool KOAgenda::removeAgendaItem( KOAgendaItem *item )
// we found the item. Let's remove it and update the conflicts
bool taken = false;
KOAgendaItem *thisItem = item;
- QPtrList<KOAgendaItem> conflictItems = thisItem->conflictItems();
+ TQPtrList<KOAgendaItem> conflictItems = thisItem->conflictItems();
removeChild( thisItem );
int pos = mItems.find( thisItem );
if ( pos>=0 ) {
@@ -1748,7 +1748,7 @@ bool KOAgenda::removeAgendaItem( KOAgendaItem *item )
}
mItemsToDelete.append( thisItem );
- QTimer::singleShot( 0, this, SLOT( deleteItemsToDelete() ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( deleteItemsToDelete() ) );
return taken;
}
@@ -1757,7 +1757,7 @@ void KOAgenda::deleteItemsToDelete()
mItemsToDelete.clear();
}
-/*QSizePolicy KOAgenda::sizePolicy() const
+/*TQSizePolicy KOAgenda::sizePolicy() const
{
// Thought this would make the all-day event agenda minimum size and the
// normal agenda take the remaining space. But it doesnt work. The QSplitter
@@ -1765,21 +1765,21 @@ void KOAgenda::deleteItemsToDelete()
// Preferred one.
// But it doesnt hurt, so it stays.
if (mAllDayMode) {
- return QSizePolicy(QSizePolicy::Expanding,QSizePolicy::Preferred);
+ return TQSizePolicy(TQSizePolicy::Expanding,TQSizePolicy::Preferred);
} else {
- return QSizePolicy(QSizePolicy::Expanding,QSizePolicy::Expanding);
+ return TQSizePolicy(TQSizePolicy::Expanding,TQSizePolicy::Expanding);
}
}
*/
/*
- Overridden from QScrollView to provide proper resizing of KOAgendaItems.
+ Overridden from TQScrollView to provide proper resizing of KOAgendaItems.
*/
-void KOAgenda::resizeEvent ( QResizeEvent *ev )
+void KOAgenda::resizeEvent ( TQResizeEvent *ev )
{
// kdDebug(5850) << "KOAgenda::resizeEvent" << endl;
- QSize newSize( ev->size() );
+ TQSize newSize( ev->size() );
if (mAllDayMode) {
mGridSpacingX = double( newSize.width() - 2 * frameWidth() ) / (double)mColumns;
mGridSpacingY = newSize.height() - 2 * frameWidth();
@@ -1792,9 +1792,9 @@ void KOAgenda::resizeEvent ( QResizeEvent *ev )
mGridSpacingY = mDesiredGridSpacingY;
}
calculateWorkingHours();
- QTimer::singleShot( 0, this, SLOT( resizeAllContents() ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( resizeAllContents() ) );
emit gridSpacingYChanged( mGridSpacingY * 4 );
- QScrollView::resizeEvent(ev);
+ TQScrollView::resizeEvent(ev);
}
void KOAgenda::resizeAllContents()
@@ -1919,7 +1919,7 @@ void KOAgenda::selectItem(KOAgendaItem *item)
emit incidenceSelected( incidence );
}
-void KOAgenda::selectItemByUID( const QString& uid )
+void KOAgenda::selectItemByUID( const TQString& uid )
{
KOAgendaItem *item;
for ( item = mItems.first(); item != 0; item = mItems.next() ) {
@@ -1931,7 +1931,7 @@ void KOAgenda::selectItemByUID( const QString& uid )
}
// This function seems never be called.
-void KOAgenda::keyPressEvent( QKeyEvent *kev )
+void KOAgenda::keyPressEvent( TQKeyEvent *kev )
{
switch(kev->key()) {
case Key_PageDown:
@@ -1955,7 +1955,7 @@ void KOAgenda::calculateWorkingHours()
{
mWorkingHoursEnable = !mAllDayMode;
- QTime tmp = KOPrefs::instance()->mWorkingHoursStart.time();
+ TQTime tmp = KOPrefs::instance()->mWorkingHoursStart.time();
mWorkingHoursYTop = int( 4 * mGridSpacingY *
( tmp.hour() + tmp.minute() / 60. +
tmp.second() / 3600. ) );
@@ -1977,24 +1977,24 @@ void KOAgenda::setDateList(const DateList &selectedDates)
marcus_bains();
}
-void KOAgenda::setHolidayMask(QMemArray<bool> *mask)
+void KOAgenda::setHolidayMask(TQMemArray<bool> *mask)
{
mHolidayMask = mask;
}
-void KOAgenda::contentsMousePressEvent ( QMouseEvent *event )
+void KOAgenda::contentsMousePressEvent ( TQMouseEvent *event )
{
kdDebug(5850) << "KOagenda::contentsMousePressEvent(): type: " << event->type() << endl;
- QScrollView::contentsMousePressEvent(event);
+ TQScrollView::contentsMousePressEvent(event);
}
-void KOAgenda::setTypeAheadReceiver( QObject *o )
+void KOAgenda::setTypeAheadReceiver( TQObject *o )
{
mTypeAheadReceiver = o;
}
-QObject *KOAgenda::typeAheadReceiver() const
+TQObject *KOAgenda::typeAheadReceiver() const
{
return mTypeAheadReceiver;
}
diff --git a/korganizer/koagenda.h b/korganizer/koagenda.h
index cec1b74d8..0b0d06986 100644
--- a/korganizer/koagenda.h
+++ b/korganizer/koagenda.h
@@ -24,9 +24,9 @@
#ifndef KOAGENDA_H
#define KOAGENDA_H
-#include <qscrollview.h>
-#include <qtimer.h>
-#include <qguardedptr.h>
+#include <tqscrollview.h>
+#include <tqtimer.h>
+#include <tqguardedptr.h>
#include <libkcal/incidencebase.h>
@@ -49,7 +49,7 @@ class Todo;
class Calendar;
}
-class MarcusBains : public QFrame {
+class MarcusBains : public TQFrame {
Q_OBJECT
public:
MarcusBains( KOAgenda *agenda = 0, const char *name = 0 );
@@ -60,10 +60,10 @@ class MarcusBains : public QFrame {
private:
int todayColumn();
- QTimer *minutes;
- QLabel *mTimeBox;
+ TQTimer *minutes;
+ TQLabel *mTimeBox;
KOAgenda *agenda;
- QTime oldTime;
+ TQTime oldTime;
int oldToday;
};
@@ -72,47 +72,47 @@ class KOAgenda : public QScrollView
{
Q_OBJECT
public:
- KOAgenda ( int columns, int rows, int columnSize, QWidget *parent=0,
+ KOAgenda ( int columns, int rows, int columnSize, TQWidget *parent=0,
const char *name = 0, WFlags f = 0 );
- KOAgenda ( int columns, QWidget *parent = 0,
+ KOAgenda ( int columns, TQWidget *parent = 0,
const char *name = 0, WFlags f = 0 );
virtual ~KOAgenda();
Incidence *selectedIncidence() const;
- QDate selectedIncidenceDate() const;
+ TQDate selectedIncidenceDate() const;
/**
* Returns the uid of the last incidence that was selected. This
* persists across reloads and clear, so that if the same uid
* reappears, it can be reselected. */
- const QString lastSelectedUid() const;
+ const TQString lastSelectedUid() const;
- virtual bool eventFilter ( QObject *, QEvent * );
+ virtual bool eventFilter ( TQObject *, TQEvent * );
- QPoint contentsToGrid ( const QPoint &pos ) const;
- QPoint gridToContents ( const QPoint &gpos ) const;
+ TQPoint contentsToGrid ( const TQPoint &pos ) const;
+ TQPoint gridToContents ( const TQPoint &gpos ) const;
- int timeToY ( const QTime &time );
- QTime gyToTime ( int y );
+ int timeToY ( const TQTime &time );
+ TQTime gyToTime ( int y );
- QMemArray<int> minContentsY();
- QMemArray<int> maxContentsY();
+ TQMemArray<int> minContentsY();
+ TQMemArray<int> maxContentsY();
int visibleContentsYMin();
int visibleContentsYMax();
- void setStartTime( const QTime &startHour );
+ void setStartTime( const TQTime &startHour );
- KOAgendaItem *insertItem ( Incidence *incidence, const QDate &qd, int X, int YTop,
+ KOAgendaItem *insertItem ( Incidence *incidence, const TQDate &qd, int X, int YTop,
int YBottom );
- KOAgendaItem *insertAllDayItem ( Incidence *event, const QDate &qd, int XBegin,
+ KOAgendaItem *insertAllDayItem ( Incidence *event, const TQDate &qd, int XBegin,
int XEnd );
- void insertMultiItem ( Event *event, const QDate &qd, int XBegin, int XEnd,
+ void insertMultiItem ( Event *event, const TQDate &qd, int XBegin, int XEnd,
int YTop, int YBottom );
/** remove an event and all its multi-items from the agenda.
* This function removes the items from the view, but doesn't delete them immediately.
* Instead, they are queued in mItemsToDelete and later deleted by
- * the slot deleteItemsToDelete() (called by QTimer::singleShot ) */
+ * the slot deleteItemsToDelete() (called by TQTimer::singleShot ) */
void removeIncidence( Incidence *incidence );
void changeColumns( int columns );
@@ -123,7 +123,7 @@ class KOAgenda : public QScrollView
double gridSpacingX() const { return mGridSpacingX; }
double gridSpacingY() const { return mGridSpacingY; }
-// virtual QSizePolicy sizePolicy() const;
+// virtual TQSizePolicy sizePolicy() const;
void clear();
@@ -134,13 +134,13 @@ class KOAgenda : public QScrollView
void checkScrollBoundaries();
- void setHolidayMask( QMemArray<bool> * );
+ void setHolidayMask( TQMemArray<bool> * );
void setDateList( const DateList &selectedDates );
DateList dateList() const;
- void setTypeAheadReceiver( QObject * );
- QObject *typeAheadReceiver() const;
+ void setTypeAheadReceiver( TQObject * );
+ TQObject *typeAheadReceiver() const;
void finishTypeAhead();
void setCalendar( Calendar*cal ) { mCalendar = cal; }
@@ -166,36 +166,36 @@ class KOAgenda : public QScrollView
/**
Select the item associated with a given uid. Linear search, use carefully.
*/
- void selectItemByUID( const QString& uid );
+ void selectItemByUID( const TQString& uid );
bool removeAgendaItem( KOAgendaItem *item );
void showAgendaItem( KOAgendaItem *item );
signals:
void newEventSignal();
- void newTimeSpanSignal( const QPoint &, const QPoint & );
+ void newTimeSpanSignal( const TQPoint &, const TQPoint & );
void newStartSelectSignal();
void showIncidenceSignal( Incidence * );
void editIncidenceSignal( Incidence * );
void deleteIncidenceSignal( Incidence * );
- void showIncidencePopupSignal( Incidence *, const QDate &);
+ void showIncidencePopupSignal( Incidence *, const TQDate &);
void showNewEventPopupSignal();
void itemModified( KOAgendaItem *item );
void incidenceSelected( Incidence * );
- void startMultiModify( const QString & );
+ void startMultiModify( const TQString & );
void endMultiModify();
void lowerYChanged( int );
void upperYChanged( int );
void startDragSignal(Incidence *);
- void droppedToDo( Todo*todo, const QPoint &gpos, bool allDay );
+ void droppedToDo( Todo*todo, const TQPoint &gpos, bool allDay );
void enableAgendaUpdate( bool enable );
- void zoomView( const int delta, const QPoint &pos, const Qt::Orientation );
+ void zoomView( const int delta, const TQPoint &pos, const Qt::Orientation );
- void mousePosSignal(const QPoint &pos);
+ void mousePosSignal(const TQPoint &pos);
void enterAgenda();
void leaveAgenda();
@@ -206,21 +206,21 @@ class KOAgenda : public QScrollView
RESIZETOP, RESIZEBOTTOM, RESIZELEFT, RESIZERIGHT };
protected:
- void drawContents( QPainter *p, int cx, int cy, int cw, int ch );
+ void drawContents( TQPainter *p, int cx, int cy, int cw, int ch );
int columnWidth( int column );
- virtual void resizeEvent ( QResizeEvent * );
+ virtual void resizeEvent ( TQResizeEvent * );
/** Handles mouse events. Called from eventFilter */
- virtual bool eventFilter_mouse ( QObject *, QMouseEvent * );
+ virtual bool eventFilter_mouse ( TQObject *, TQMouseEvent * );
#ifndef QT_NO_WHEELEVENT
/** Handles mousewheel events. Called from eventFilter */
- virtual bool eventFilter_wheel ( QObject *, QWheelEvent * );
+ virtual bool eventFilter_wheel ( TQObject *, TQWheelEvent * );
#endif
/** Handles key events. Called from eventFilter */
- virtual bool eventFilter_key ( QObject *, QKeyEvent * );
+ virtual bool eventFilter_key ( TQObject *, TQKeyEvent * );
/** Handles drag and drop events. Called from eventFilter */
- virtual bool eventFilter_drag( QObject *, QDropEvent * );
+ virtual bool eventFilter_drag( TQObject *, TQDropEvent * );
/** returns RESIZELEFT if pos is near the lower edge of the action item,
RESIZERIGHT if pos is near the higher edge, and MOVE otherwise.
@@ -228,32 +228,32 @@ class KOAgenda : public QScrollView
the event, although that means moving to the right!
horizontal is the same as mAllDayAgenda.
*/
- MouseActionType isInResizeArea( bool horizontal, const QPoint &pos, KOAgendaItem *item );
+ MouseActionType isInResizeArea( bool horizontal, const TQPoint &pos, KOAgendaItem *item );
/** Return whether the cell specified by the grid point belongs to the current select
*/
- bool ptInSelection( QPoint gpos ) const;
+ bool ptInSelection( TQPoint gpos ) const;
/** Start selecting time span. */
- void startSelectAction( const QPoint &viewportPos );
+ void startSelectAction( const TQPoint &viewportPos );
/** Select time span. */
- void performSelectAction( const QPoint &viewportPos );
+ void performSelectAction( const TQPoint &viewportPos );
/** Emd selecting time span. */
- void endSelectAction( const QPoint &viewportPos );
+ void endSelectAction( const TQPoint &viewportPos );
/** Start moving/resizing agenda item */
- void startItemAction(const QPoint& viewportPos);
+ void startItemAction(const TQPoint& viewportPos);
/** Move/resize agenda item */
- void performItemAction(const QPoint& viewportPos);
+ void performItemAction(const TQPoint& viewportPos);
/** End moving/resizing agenda item */
void endItemAction();
/** Set cursor, when no item action is in progress */
- void setNoActionCursor( KOAgendaItem *moveItem, const QPoint &viewportPos );
+ void setNoActionCursor( KOAgendaItem *moveItem, const TQPoint &viewportPos );
/** Sets the cursor according to the given action type. If acting==true,
the corresponding action is running (i.e. the item is really moved). If
acting==false the cursor should just indicate that the corresponding action
@@ -272,11 +272,11 @@ class KOAgenda : public QScrollView
/** Process the keyevent, including the ignored keyevents of eventwidgets.
* Implements pgup/pgdn and cursor key navigation in the view.
*/
- void keyPressEvent( QKeyEvent * );
+ void keyPressEvent( TQKeyEvent * );
void calculateWorkingHours();
- virtual void contentsMousePressEvent ( QMouseEvent * );
+ virtual void contentsMousePressEvent ( TQMouseEvent * );
void emitNewEventForSelection();
@@ -312,44 +312,44 @@ class KOAgenda : public QScrollView
int mScrollDelay;
int mScrollOffset;
- QTimer mScrollUpTimer;
- QTimer mScrollDownTimer;
+ TQTimer mScrollUpTimer;
+ TQTimer mScrollDownTimer;
// Number of Columns/Rows of agenda grid
int mColumns;
int mRows;
// Cells to store Move and Resize coordiantes while performing the action
- QPoint mStartCell;
- QPoint mEndCell;
+ TQPoint mStartCell;
+ TQPoint mEndCell;
// Working Hour coordiantes
bool mWorkingHoursEnable;
- QMemArray<bool> *mHolidayMask;
+ TQMemArray<bool> *mHolidayMask;
int mWorkingHoursYTop;
int mWorkingHoursYBottom;
// Selection
bool mHasSelection;
- QPoint mSelectionStartPoint;
- QPoint mSelectionStartCell;
- QPoint mSelectionEndCell;
+ TQPoint mSelectionStartPoint;
+ TQPoint mSelectionStartCell;
+ TQPoint mSelectionEndCell;
// List of dates to be displayed
DateList mSelectedDates;
// The KOAgendaItem, which has been right-clicked last
- QGuardedPtr<KOAgendaItem> mClickedItem;
+ TQGuardedPtr<KOAgendaItem> mClickedItem;
// The KOAgendaItem, which is being moved/resized
- QGuardedPtr<KOAgendaItem> mActionItem;
+ TQGuardedPtr<KOAgendaItem> mActionItem;
// Currently selected item
- QGuardedPtr<KOAgendaItem> mSelectedItem;
+ TQGuardedPtr<KOAgendaItem> mSelectedItem;
// Uid of the last selected item. Used for reselecting in situations
// where the selected item points to a no longer valid incidence, for
// example during resource reload.
- QString mSelectedUid;
+ TQString mSelectedUid;
// The Marcus Bains Line widget.
MarcusBains *mMarcusBains;
@@ -359,17 +359,17 @@ class KOAgenda : public QScrollView
bool mItemMoved;
// List of all Items contained in agenda
- QPtrList<KOAgendaItem> mItems;
- QPtrList<KOAgendaItem> mItemsToDelete;
+ TQPtrList<KOAgendaItem> mItems;
+ TQPtrList<KOAgendaItem> mItemsToDelete;
- QPopupMenu *mItemPopup; // Right mouse button popup menu for KOAgendaItems
+ TQPopupMenu *mItemPopup; // Right mouse button popup menu for KOAgendaItems
int mOldLowerScrollValue;
int mOldUpperScrollValue;
bool mTypeAhead;
- QObject *mTypeAheadReceiver;
- QPtrList<QEvent> mTypeAheadEvents;
+ TQObject *mTypeAheadReceiver;
+ TQPtrList<TQEvent> mTypeAheadEvents;
bool mReturnPressed;
KOrg::IncidenceChangerBase *mChanger;
diff --git a/korganizer/koagendaitem.cpp b/korganizer/koagendaitem.cpp
index 34d851a7f..629f59c31 100644
--- a/korganizer/koagendaitem.cpp
+++ b/korganizer/koagendaitem.cpp
@@ -23,9 +23,9 @@
without including the source code for Qt in the source distribution.
*/
-#include <qtooltip.h>
-#include <qdragobject.h>
-#include <qpainter.h>
+#include <tqtooltip.h>
+#include <tqdragobject.h>
+#include <tqpainter.h>
#include <kiconloader.h>
#include <kdebug.h>
@@ -51,21 +51,21 @@
//--------------------------------------------------------------------------
-QToolTipGroup *KOAgendaItem::mToolTipGroup = 0;
+TQToolTipGroup *KOAgendaItem::mToolTipGroup = 0;
-QPixmap *KOAgendaItem::alarmPxmp = 0;
-QPixmap *KOAgendaItem::recurPxmp = 0;
-QPixmap *KOAgendaItem::readonlyPxmp = 0;
-QPixmap *KOAgendaItem::replyPxmp = 0;
-QPixmap *KOAgendaItem::groupPxmp = 0;
-QPixmap *KOAgendaItem::groupPxmpTentative = 0;
-QPixmap *KOAgendaItem::organizerPxmp = 0;
+TQPixmap *KOAgendaItem::alarmPxmp = 0;
+TQPixmap *KOAgendaItem::recurPxmp = 0;
+TQPixmap *KOAgendaItem::readonlyPxmp = 0;
+TQPixmap *KOAgendaItem::replyPxmp = 0;
+TQPixmap *KOAgendaItem::groupPxmp = 0;
+TQPixmap *KOAgendaItem::groupPxmpTentative = 0;
+TQPixmap *KOAgendaItem::organizerPxmp = 0;
//--------------------------------------------------------------------------
-KOAgendaItem::KOAgendaItem( Incidence *incidence, const QDate &qd, QWidget *parent,
+KOAgendaItem::KOAgendaItem( Incidence *incidence, const TQDate &qd, TQWidget *parent,
const char *name, WFlags f ) :
- QWidget( parent, name, f ), mIncidence( incidence ), mDate( qd ),
+ TQWidget( parent, name, f ), mIncidence( incidence ), mDate( qd ),
mLabelText( mIncidence->summary() ), mIconAlarm( false ),
mIconRecur( false ), mIconReadonly( false ), mIconReply( false ),
mIconGroup( false ), mIconGroupTentative( false ), mIconOrganizer( false ),
@@ -76,7 +76,7 @@ KOAgendaItem::KOAgendaItem( Incidence *incidence, const QDate &qd, QWidget *pare
setCellXY( 0, 0, 1 );
setCellXRight( 0 );
setMouseTracking( true );
- mResourceColor = QColor();
+ mResourceColor = TQColor();
updateIcons();
// select() does nothing, if state hasn't change, so preset mSelected.
@@ -188,7 +188,7 @@ int KOAgendaItem::cellWidth() const
return mCellXRight - mCellXLeft + 1;
}
-void KOAgendaItem::setItemDate( const QDate &qd )
+void KOAgendaItem::setItemDate( const TQDate &qd )
{
mDate = qd;
}
@@ -530,59 +530,59 @@ void KOAgendaItem::expandRight(int dx)
setCellX( newXLeft, newXRight );
}
-QToolTipGroup *KOAgendaItem::toolTipGroup()
+TQToolTipGroup *KOAgendaItem::toolTipGroup()
{
- if (!mToolTipGroup) mToolTipGroup = new QToolTipGroup(0);
+ if (!mToolTipGroup) mToolTipGroup = new TQToolTipGroup(0);
return mToolTipGroup;
}
-void KOAgendaItem::dragEnterEvent( QDragEnterEvent *e )
+void KOAgendaItem::dragEnterEvent( TQDragEnterEvent *e )
{
#ifndef KORG_NODND
if ( ICalDrag::canDecode( e ) || VCalDrag::canDecode( e ) ) {
e->ignore();
return;
}
- if ( KVCardDrag::canDecode( e ) || QTextDrag::canDecode( e ) )
+ if ( KVCardDrag::canDecode( e ) || TQTextDrag::canDecode( e ) )
e->accept();
else
e->ignore();
#endif
}
-void KOAgendaItem::addAttendee( const QString &newAttendee )
+void KOAgendaItem::addAttendee( const TQString &newAttendee )
{
kdDebug(5850) << " Email: " << newAttendee << endl;
- QString name, email;
+ TQString name, email;
KPIM::getNameAndMail( newAttendee, name, email );
if ( !( name.isEmpty() && email.isEmpty() ) ) {
mIncidence->addAttendee(new Attendee(name,email));
- KMessageBox::information( this, i18n("Attendee \"%1\" added to the calendar item \"%2\"").arg(KPIM::normalizedAddress(name, email, QString())).arg(text()), i18n("Attendee added"), "AttendeeDroppedAdded" );
+ KMessageBox::information( this, i18n("Attendee \"%1\" added to the calendar item \"%2\"").arg(KPIM::normalizedAddress(name, email, TQString())).arg(text()), i18n("Attendee added"), "AttendeeDroppedAdded" );
}
}
-void KOAgendaItem::dropEvent( QDropEvent *e )
+void KOAgendaItem::dropEvent( TQDropEvent *e )
{
// TODO: Organize this better: First check for attachment (not only file, also any other url!), then if it's a vcard, otherwise check for attendees, then if the data is binary, add a binary attachment.
#ifndef KORG_NODND
- QString text;
+ TQString text;
- bool decoded = QTextDrag::decode( e, text );
+ bool decoded = TQTextDrag::decode( e, text );
if( decoded && text.startsWith( "file:" ) ) {
mIncidence->addAttachment( new Attachment( text ) );
return;
}
#ifndef KORG_NOKABC
- QString vcards;
+ TQString vcards;
KABC::VCardConverter converter;
KVCardDrag::decode( e, vcards );
KABC::Addressee::List list = converter.parseVCards( vcards );
KABC::Addressee::List::Iterator it;
for ( it = list.begin(); it != list.end(); ++it ) {
- QString em( (*it).fullEmail() );
+ TQString em( (*it).fullEmail() );
if (em.isEmpty()) {
em=(*it).realName();
}
@@ -592,8 +592,8 @@ void KOAgendaItem::dropEvent( QDropEvent *e )
if( decoded ) {
kdDebug(5850) << "Dropped : " << text << endl;
- QStringList emails = QStringList::split( ",", text );
- for( QStringList::ConstIterator it = emails.begin(); it != emails.end();
+ TQStringList emails = TQStringList::split( ",", text );
+ for( TQStringList::ConstIterator it = emails.begin(); it != emails.end();
++it ) {
addAttendee( *it );
}
@@ -604,12 +604,12 @@ void KOAgendaItem::dropEvent( QDropEvent *e )
}
-QPtrList<KOAgendaItem> KOAgendaItem::conflictItems()
+TQPtrList<KOAgendaItem> KOAgendaItem::conflictItems()
{
return mConflictItems;
}
-void KOAgendaItem::setConflictItems( QPtrList<KOAgendaItem> ci )
+void KOAgendaItem::setConflictItems( TQPtrList<KOAgendaItem> ci )
{
mConflictItems = ci;
KOAgendaItem *item;
@@ -624,7 +624,7 @@ void KOAgendaItem::addConflictItem( KOAgendaItem *ci )
if ( mConflictItems.find( ci ) < 0 ) mConflictItems.append( ci );
}
-QString KOAgendaItem::label() const
+TQString KOAgendaItem::label() const
{
return mLabelText;
}
@@ -644,17 +644,17 @@ bool KOAgendaItem::overlaps( KOrg::CellItem *o ) const
return false;
}
-void KOAgendaItem::paintFrame( QPainter *p, const QColor &color )
+void KOAgendaItem::paintFrame( TQPainter *p, const TQColor &color )
{
- QColor oldpen(p->pen().color());
+ TQColor oldpen(p->pen().color());
p->setPen( color );
p->drawRect( 0, 0, width(), height() );
p->drawRect( 1, 1, width() - 2, height() - 2 );
p->setPen( oldpen );
}
-static void conditionalPaint( QPainter *p, bool cond, int &x, int ft,
- const QPixmap &pxmp )
+static void conditionalPaint( TQPainter *p, bool cond, int &x, int ft,
+ const TQPixmap &pxmp )
{
if ( !cond ) return;
@@ -662,22 +662,22 @@ static void conditionalPaint( QPainter *p, bool cond, int &x, int ft,
x += pxmp.width() + ft;
}
-void KOAgendaItem::paintEventIcon( QPainter *p, int &x, int ft )
+void KOAgendaItem::paintEventIcon( TQPainter *p, int &x, int ft )
{
if ( !mIncidence ) return;
- static const QPixmap eventPxmp =
+ static const TQPixmap eventPxmp =
KOGlobals::self()->smallIcon( "appointment" );
if ( mIncidence->type() != "Event" )
return;
conditionalPaint( p, true, x, ft, eventPxmp );
}
-void KOAgendaItem::paintTodoIcon( QPainter *p, int &x, int ft )
+void KOAgendaItem::paintTodoIcon( TQPainter *p, int &x, int ft )
{
if ( !mIncidence ) return;
- static const QPixmap todoPxmp =
+ static const TQPixmap todoPxmp =
KOGlobals::self()->smallIcon( "todo" );
- static const QPixmap completedPxmp =
+ static const TQPixmap completedPxmp =
KOGlobals::self()->smallIcon( "checkedbox" );
if ( mIncidence->type() != "Todo" )
return;
@@ -686,7 +686,7 @@ void KOAgendaItem::paintTodoIcon( QPainter *p, int &x, int ft )
conditionalPaint( p, b, x, ft, completedPxmp );
}
-void KOAgendaItem::paintAlarmIcon( QPainter *p, int &x, int ft )
+void KOAgendaItem::paintAlarmIcon( TQPainter *p, int &x, int ft )
{
if (!mIconAlarm) return;
int y = ft;
@@ -698,7 +698,7 @@ void KOAgendaItem::paintAlarmIcon( QPainter *p, int &x, int ft )
x += alarmPxmp->width() + ft;
}
-void KOAgendaItem::paintIcons( QPainter *p, int &x, int ft )
+void KOAgendaItem::paintIcons( TQPainter *p, int &x, int ft )
{
paintEventIcon( p, x, ft );
paintTodoIcon( p, x, ft );
@@ -711,7 +711,7 @@ void KOAgendaItem::paintIcons( QPainter *p, int &x, int ft )
conditionalPaint( p, mIconOrganizer, x, ft, *organizerPxmp );
}
-void KOAgendaItem::paintEvent( QPaintEvent *ev )
+void KOAgendaItem::paintEvent( TQPaintEvent *ev )
{
//HACK
// to reproduce a crash:
@@ -721,7 +721,7 @@ void KOAgendaItem::paintEvent( QPaintEvent *ev )
// the following check
if ( !mIncidence )return;
- QRect visRect = visibleRect();
+ TQRect visRect = visibleRect();
// when scrolling horizontally in the side-by-side view, the repainted area is clipped
// to the newly visible area, which is a problem since the content changes when visRect
// changes, so repaint the full item in that case
@@ -730,7 +730,7 @@ void KOAgendaItem::paintEvent( QPaintEvent *ev )
return;
}
- QPainter p( this );
+ TQPainter p( this );
const int ft = 2; // frame thickness for layout, see paintFrame()
const int margin = 1 + ft; // frame + space between frame and content
@@ -740,40 +740,40 @@ void KOAgendaItem::paintEvent( QPaintEvent *ev )
// Also look at #17984
if ( !alarmPxmp ) {
- alarmPxmp = new QPixmap( KOGlobals::self()->smallIcon("bell") );
- recurPxmp = new QPixmap( KOGlobals::self()->smallIcon("recur") );
- readonlyPxmp = new QPixmap( KOGlobals::self()->smallIcon("readonlyevent") );
- replyPxmp = new QPixmap( KOGlobals::self()->smallIcon("mail_reply") );
- groupPxmp = new QPixmap( KOGlobals::self()->smallIcon("groupevent") );
- groupPxmpTentative = new QPixmap( KOGlobals::self()->smallIcon("groupeventtentative") );
- organizerPxmp = new QPixmap( KOGlobals::self()->smallIcon("organizer") );
+ alarmPxmp = new TQPixmap( KOGlobals::self()->smallIcon("bell") );
+ recurPxmp = new TQPixmap( KOGlobals::self()->smallIcon("recur") );
+ readonlyPxmp = new TQPixmap( KOGlobals::self()->smallIcon("readonlyevent") );
+ replyPxmp = new TQPixmap( KOGlobals::self()->smallIcon("mail_reply") );
+ groupPxmp = new TQPixmap( KOGlobals::self()->smallIcon("groupevent") );
+ groupPxmpTentative = new TQPixmap( KOGlobals::self()->smallIcon("groupeventtentative") );
+ organizerPxmp = new TQPixmap( KOGlobals::self()->smallIcon("organizer") );
}
- QColor bgColor;
+ TQColor bgColor;
if ( mIncidence->type() == "Todo" ) {
if ( static_cast<Todo*>(mIncidence)->isOverdue() )
bgColor = KOPrefs::instance()->todoOverdueColor();
else if ( static_cast<Todo*>(mIncidence)->dtDue().date() ==
- QDateTime::currentDateTime().date() )
+ TQDateTime::currentDateTime().date() )
bgColor = KOPrefs::instance()->todoDueTodayColor();
}
- QColor categoryColor;
- QStringList categories = mIncidence->categories();
- QString cat = categories.first();
+ TQColor categoryColor;
+ TQStringList categories = mIncidence->categories();
+ TQString cat = categories.first();
if (cat.isEmpty())
categoryColor = KOPrefs::instance()->mEventColor;
else
categoryColor = *(KOPrefs::instance()->categoryColor(cat));
- QColor resourceColor = mResourceColor;
+ TQColor resourceColor = mResourceColor;
if ( !resourceColor.isValid() )
resourceColor = categoryColor;
if (!KOPrefs::instance()->hasCategoryColor(cat))
categoryColor = resourceColor;
- QColor frameColor;
+ TQColor frameColor;
if ( KOPrefs::instance()->agendaViewColors() == KOPrefs::ResourceOnly ||
KOPrefs::instance()->agendaViewColors() == KOPrefs::CategoryInsideResourceOutside ) {
frameColor = bgColor.isValid() ? bgColor : resourceColor;
@@ -791,17 +791,17 @@ void KOAgendaItem::paintEvent( QPaintEvent *ev )
}
if ( mSelected ) {
- frameColor = QColor( 85 + frameColor.red() * 2/3,
+ frameColor = TQColor( 85 + frameColor.red() * 2/3,
85 + frameColor.green() * 2/3,
85 + frameColor.blue() * 2/3 );
} else {
frameColor = frameColor.dark( 115 );
}
- QColor textColor = getTextColor(bgColor);
+ TQColor textColor = getTextColor(bgColor);
p.setPen( textColor );
p.setBackgroundColor( bgColor );
p.setFont(KOPrefs::instance()->mAgendaViewFont);
- QFontMetrics fm = p.fontMetrics();
+ TQFontMetrics fm = p.fontMetrics();
int singleLineHeight = fm.boundingRect( mLabelText ).height();
@@ -811,8 +811,8 @@ void KOAgendaItem::paintEvent( QPaintEvent *ev )
// calculate the height of the full version (case 4) to test whether it is
// possible
- QString shortH;
- QString longH;
+ TQString shortH;
+ TQString longH;
if ( !isMultiItem() ) {
shortH = KGlobal::locale()->formatTime(mIncidence->dtStart().time());
if (mIncidence->type() != "Todo")
@@ -829,7 +829,7 @@ void KOAgendaItem::paintEvent( QPaintEvent *ev )
}
KWordWrap *ww = KWordWrap::formatText( fm,
- QRect(0, 0, width() - (2 * margin), -1),
+ TQRect(0, 0, width() - (2 * margin), -1),
0,
mLabelText );
int th = ww->boundingRect().height();
@@ -889,7 +889,7 @@ void KOAgendaItem::paintEvent( QPaintEvent *ev )
}
ww = KWordWrap::formatText( fm,
- QRect( 0, 0, txtWidth,
+ TQRect( 0, 0, txtWidth,
(height() - (2 * margin)) ),
0,
mLabelText );
@@ -920,7 +920,7 @@ void KOAgendaItem::paintEvent( QPaintEvent *ev )
// paint headline
p.fillRect( 0, 0, width(), (ft/2) + margin + hlHeight,
- QBrush( frameColor ) );
+ TQBrush( frameColor ) );
}
x += visRect.left();
@@ -932,7 +932,7 @@ void KOAgendaItem::paintEvent( QPaintEvent *ev )
else {
// paint headline
p.fillRect( 0, 0, width(), (ft/2) + margin + hlHeight,
- QBrush( frameColor ) );
+ TQBrush( frameColor ) );
txtWidth = width() - margin - x;
eventX = x;
@@ -940,7 +940,7 @@ void KOAgendaItem::paintEvent( QPaintEvent *ev )
hTxtWidth = width() - margin - x;
}
- QString headline;
+ TQString headline;
int hw = fm.boundingRect( longH ).width();
if ( hw > hTxtWidth ) {
headline = shortH;
@@ -957,13 +957,13 @@ void KOAgendaItem::paintEvent( QPaintEvent *ev )
// draw event text
ww = KWordWrap::formatText( fm,
- QRect( 0, 0, txtWidth, height() - margin - y ),
+ TQRect( 0, 0, txtWidth, height() - margin - y ),
0,
mLabelText );
p.setBackgroundColor( bgColor );
p.setPen( textColor );
- QString ws = ww->wrappedString();
+ TQString ws = ww->wrappedString();
if ( ws.left( ws.length()-1 ).find( '\n' ) >= 0 )
ww->drawText( &p, eventX, y,
Qt::AlignAuto | KWordWrap::FadeOut );
diff --git a/korganizer/koagendaitem.h b/korganizer/koagendaitem.h
index 2595e9c98..39a71e7ee 100644
--- a/korganizer/koagendaitem.h
+++ b/korganizer/koagendaitem.h
@@ -27,7 +27,7 @@
#include "cellitem.h"
-#include <qdatetime.h>
+#include <tqdatetime.h>
class QToolTipGroup;
class QDragEnterEvent;
@@ -71,11 +71,11 @@ struct MultiItemInfo
when the move started. The prev and next members of mStartMoveInfo are used
for that longer sequence including all (shown and hidden) items.
*/
-class KOAgendaItem : public QWidget, public KOrg::CellItem
+class KOAgendaItem : public TQWidget, public KOrg::CellItem
{
Q_OBJECT
public:
- KOAgendaItem(Incidence *incidence, const QDate &qd, QWidget *parent, const char *name=0,
+ KOAgendaItem(Incidence *incidence, const TQDate &qd, TQWidget *parent, const char *name=0,
WFlags f=0 );
int cellXLeft() const { return mCellXLeft; }
@@ -121,26 +121,26 @@ class KOAgendaItem : public QWidget, public KOrg::CellItem
bool setIncidence( Incidence * );
Incidence *incidence() const { return mIncidence; }
- QDate itemDate() { return mDate; }
+ TQDate itemDate() { return mDate; }
/** Update the date of this item's occurrence (not in the event) */
- void setItemDate( const QDate &qd );
+ void setItemDate( const TQDate &qd );
- void setText ( const QString & text ) { mLabelText = text; }
- QString text () { return mLabelText; }
+ void setText ( const TQString & text ) { mLabelText = text; }
+ TQString text () { return mLabelText; }
- static QToolTipGroup *toolTipGroup();
+ static TQToolTipGroup *toolTipGroup();
- QPtrList<KOAgendaItem> conflictItems();
- void setConflictItems(QPtrList<KOAgendaItem>);
+ TQPtrList<KOAgendaItem> conflictItems();
+ void setConflictItems(TQPtrList<KOAgendaItem>);
void addConflictItem(KOAgendaItem *ci);
- QString label() const;
+ TQString label() const;
bool overlaps( KOrg::CellItem * ) const;
- void setResourceColor( const QColor& color ) { mResourceColor = color; }
- QColor resourceColor() {return mResourceColor;}
+ void setResourceColor( const TQColor& color ) { mResourceColor = color; }
+ TQColor resourceColor() {return mResourceColor;}
signals:
void removeAgendaItem( KOAgendaItem* );
void showAgendaItem( KOAgendaItem* );
@@ -148,19 +148,19 @@ class KOAgendaItem : public QWidget, public KOrg::CellItem
public slots:
void updateIcons();
void select(bool=true);
- void addAttendee( const QString & );
+ void addAttendee( const TQString & );
protected:
- void dragEnterEvent(QDragEnterEvent *e);
- void dropEvent(QDropEvent *e);
- void paintEvent(QPaintEvent *e);
- void paintFrame(QPainter *p, const QColor &color);
- void paintEventIcon(QPainter *p, int &x, int ft);
- void paintTodoIcon(QPainter *p, int &x, int ft);
- void paintAlarmIcon(QPainter *p, int &x, int ft);
+ void dragEnterEvent(TQDragEnterEvent *e);
+ void dropEvent(TQDropEvent *e);
+ void paintEvent(TQPaintEvent *e);
+ void paintFrame(TQPainter *p, const TQColor &color);
+ void paintEventIcon(TQPainter *p, int &x, int ft);
+ void paintTodoIcon(TQPainter *p, int &x, int ft);
+ void paintAlarmIcon(TQPainter *p, int &x, int ft);
// paint all visible icons
- void paintIcons(QPainter *p, int &x, int ft);
+ void paintIcons(TQPainter *p, int &x, int ft);
/** private movement functions. startMove needs to be called of only one of
* the multitems. it will then loop through the whole series using
@@ -177,8 +177,8 @@ class KOAgendaItem : public QWidget, public KOrg::CellItem
int mSubCells; // Total number of subcells in cell of this item
Incidence *mIncidence; // corresponding event or todo
- QDate mDate; //date this events occurs (for recurrence)
- QString mLabelText;
+ TQDate mDate; //date this events occurs (for recurrence)
+ TQString mLabelText;
bool mIconAlarm, mIconRecur, mIconReadonly;
bool mIconReply, mIconGroup, mIconGroupTentative;
bool mIconOrganizer;
@@ -189,20 +189,20 @@ class KOAgendaItem : public QWidget, public KOrg::CellItem
// Variables to remember start position
MultiItemInfo* mStartMoveInfo;
//Color of the resource
- QColor mResourceColor;
+ TQColor mResourceColor;
private:
- static QToolTipGroup *mToolTipGroup;
+ static TQToolTipGroup *mToolTipGroup;
bool mSelected;
- QPtrList<KOAgendaItem> mConflictItems;
-
- static QPixmap *alarmPxmp;
- static QPixmap *recurPxmp;
- static QPixmap *readonlyPxmp;
- static QPixmap *replyPxmp;
- static QPixmap *groupPxmp;
- static QPixmap *groupPxmpTentative;
- static QPixmap *organizerPxmp;
+ TQPtrList<KOAgendaItem> mConflictItems;
+
+ static TQPixmap *alarmPxmp;
+ static TQPixmap *recurPxmp;
+ static TQPixmap *readonlyPxmp;
+ static TQPixmap *replyPxmp;
+ static TQPixmap *groupPxmp;
+ static TQPixmap *groupPxmpTentative;
+ static TQPixmap *organizerPxmp;
};
#endif
diff --git a/korganizer/koagendaview.cpp b/korganizer/koagendaview.cpp
index e81e04850..256c4d0dd 100644
--- a/korganizer/koagendaview.cpp
+++ b/korganizer/koagendaview.cpp
@@ -22,22 +22,22 @@
without including the source code for Qt in the source distribution.
*/
-#include <qhbox.h>
-#include <qvbox.h>
-#include <qlabel.h>
-#include <qframe.h>
-#include <qlayout.h>
+#include <tqhbox.h>
+#include <tqvbox.h>
+#include <tqlabel.h>
+#include <tqframe.h>
+#include <tqlayout.h>
#ifndef KORG_NOSPLITTER
-#include <qsplitter.h>
+#include <tqsplitter.h>
#endif
-#include <qfont.h>
-#include <qfontmetrics.h>
-#include <qpopupmenu.h>
-#include <qtooltip.h>
-#include <qpainter.h>
-#include <qpushbutton.h>
-#include <qcursor.h>
-#include <qbitarray.h>
+#include <tqfont.h>
+#include <tqfontmetrics.h>
+#include <tqpopupmenu.h>
+#include <tqtooltip.h>
+#include <tqpainter.h>
+#include <tqpushbutton.h>
+#include <tqcursor.h>
+#include <tqbitarray.h>
#include <kapplication.h>
#include <kdebug.h>
@@ -76,8 +76,8 @@
using namespace KOrg;
-EventIndicator::EventIndicator(Location loc,QWidget *parent,const char *name)
- : QFrame(parent,name)
+EventIndicator::EventIndicator(Location loc,TQWidget *parent,const char *name)
+ : TQFrame(parent,name)
{
mColumns = 1;
mEnabled.resize( mColumns );
@@ -93,7 +93,7 @@ EventIndicator::~EventIndicator()
{
}
-void EventIndicator::drawContents(QPainter *p)
+void EventIndicator::drawContents(TQPainter *p)
{
// kdDebug(5850) << "======== top: " << contentsRect().top() << " bottom "
// << contentsRect().bottom() << " left " << contentsRect().left()
@@ -106,7 +106,7 @@ void EventIndicator::drawContents(QPainter *p)
int xOffset = KOGlobals::self()->reverseLayout() ?
(mColumns - 1 - i)*cellWidth + cellWidth/2 -mPixmap.width()/2 :
i*cellWidth + cellWidth/2 -mPixmap.width()/2;
- p->drawPixmap(QPoint(xOffset,0),mPixmap);
+ p->drawPixmap(TQPoint(xOffset,0),mPixmap);
}
}
}
@@ -132,12 +132,12 @@ void EventIndicator::enableColumn(int column, bool enable)
////////////////////////////////////////////////////////////////////////////
-KOAlternateLabel::KOAlternateLabel(const QString &shortlabel, const QString &longlabel,
- const QString &extensivelabel, QWidget *parent, const char *name )
- : QLabel(parent, name), mTextTypeFixed(false), mShortText(shortlabel),
+KOAlternateLabel::KOAlternateLabel(const TQString &shortlabel, const TQString &longlabel,
+ const TQString &extensivelabel, TQWidget *parent, const char *name )
+ : TQLabel(parent, name), mTextTypeFixed(false), mShortText(shortlabel),
mLongText(longlabel), mExtensiveText(extensivelabel)
{
- setSizePolicy(QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ));
+ setSizePolicy(TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Fixed ));
if (mExtensiveText.isEmpty()) mExtensiveText = mLongText;
squeezeTextToLabel();
}
@@ -149,25 +149,25 @@ KOAlternateLabel::~KOAlternateLabel()
void KOAlternateLabel::useShortText()
{
mTextTypeFixed = true;
- QLabel::setText( mShortText );
- QToolTip::remove( this );
- QToolTip::add( this, mExtensiveText );
+ TQLabel::setText( mShortText );
+ TQToolTip::remove( this );
+ TQToolTip::add( this, mExtensiveText );
}
void KOAlternateLabel::useLongText()
{
mTextTypeFixed = true;
- QLabel::setText( mLongText );
- QToolTip::remove( this );
- QToolTip::add( this, mExtensiveText );
+ TQLabel::setText( mLongText );
+ TQToolTip::remove( this );
+ TQToolTip::add( this, mExtensiveText );
}
void KOAlternateLabel::useExtensiveText()
{
mTextTypeFixed = true;
- QLabel::setText( mExtensiveText );
- QToolTip::remove( this );
- QToolTip::hide();
+ TQLabel::setText( mExtensiveText );
+ TQToolTip::remove( this );
+ TQToolTip::hide();
}
void KOAlternateLabel::useDefaultText()
@@ -180,38 +180,38 @@ void KOAlternateLabel::squeezeTextToLabel()
{
if (mTextTypeFixed) return;
- QFontMetrics fm(fontMetrics());
+ TQFontMetrics fm(fontMetrics());
int labelWidth = size().width();
int textWidth = fm.width(mLongText);
int longTextWidth = fm.width(mExtensiveText);
if (longTextWidth <= labelWidth) {
- QLabel::setText( mExtensiveText );
- QToolTip::remove( this );
- QToolTip::hide();
+ TQLabel::setText( mExtensiveText );
+ TQToolTip::remove( this );
+ TQToolTip::hide();
} else if (textWidth <= labelWidth) {
- QLabel::setText( mLongText );
- QToolTip::remove( this );
- QToolTip::add( this, mExtensiveText );
+ TQLabel::setText( mLongText );
+ TQToolTip::remove( this );
+ TQToolTip::add( this, mExtensiveText );
} else {
- QLabel::setText( mShortText );
- QToolTip::remove( this );
- QToolTip::add( this, mExtensiveText );
+ TQLabel::setText( mShortText );
+ TQToolTip::remove( this );
+ TQToolTip::add( this, mExtensiveText );
}
}
-void KOAlternateLabel::resizeEvent( QResizeEvent * )
+void KOAlternateLabel::resizeEvent( TQResizeEvent * )
{
squeezeTextToLabel();
}
-QSize KOAlternateLabel::minimumSizeHint() const
+TQSize KOAlternateLabel::minimumSizeHint() const
{
- QSize sh = QLabel::minimumSizeHint();
+ TQSize sh = TQLabel::minimumSizeHint();
sh.setWidth(-1);
return sh;
}
-void KOAlternateLabel::setText( const QString &text ) {
+void KOAlternateLabel::setText( const TQString &text ) {
mLongText = text;
squeezeTextToLabel();
}
@@ -221,14 +221,14 @@ void KOAlternateLabel::setText( const QString &text ) {
////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////
-KOAgendaView::KOAgendaView(Calendar *cal,QWidget *parent,const char *name, bool isSideBySide ) :
+KOAgendaView::KOAgendaView(Calendar *cal,TQWidget *parent,const char *name, bool isSideBySide ) :
KOrg::AgendaView (cal,parent,name), mExpandButton( 0 ), mAllowAgendaUpdate( true ),
mUpdateItem( 0 ),
mResource( 0 ),
mIsSideBySide( isSideBySide ),
mPendingChanges( true )
{
- mSelectedDates.append(QDate::currentDate());
+ mSelectedDates.append(TQDate::currentDate());
mLayoutDayLabels = 0;
mDayLabelsFrame = 0;
@@ -246,15 +246,15 @@ KOAgendaView::KOAgendaView(Calendar *cal,QWidget *parent,const char *name, bool
}
}
- QBoxLayout *topLayout = new QVBoxLayout(this);
+ TQBoxLayout *topLayout = new TQVBoxLayout(this);
// Create day name labels for agenda columns
- mDayLabelsFrame = new QHBox(this);
+ mDayLabelsFrame = new TQHBox(this);
topLayout->addWidget(mDayLabelsFrame);
// Create agenda splitter
#ifndef KORG_NOSPLITTER
- mSplitterAgenda = new QSplitter(Vertical,this);
+ mSplitterAgenda = new TQSplitter(Vertical,this);
topLayout->addWidget(mSplitterAgenda);
#if KDE_IS_VERSION( 3, 1, 93 )
@@ -263,40 +263,40 @@ KOAgendaView::KOAgendaView(Calendar *cal,QWidget *parent,const char *name, bool
mSplitterAgenda->setOpaqueResize();
#endif
- mAllDayFrame = new QHBox(mSplitterAgenda);
+ mAllDayFrame = new TQHBox(mSplitterAgenda);
- QWidget *agendaFrame = new QWidget(mSplitterAgenda);
+ TQWidget *agendaFrame = new TQWidget(mSplitterAgenda);
#else
- QVBox *mainBox = new QVBox( this );
+ TQVBox *mainBox = new TQVBox( this );
topLayout->addWidget( mainBox );
- mAllDayFrame = new QHBox(mainBox);
+ mAllDayFrame = new TQHBox(mainBox);
- QWidget *agendaFrame = new QWidget(mainBox);
+ TQWidget *agendaFrame = new TQWidget(mainBox);
#endif
// Create all-day agenda widget
- mDummyAllDayLeft = new QVBox( mAllDayFrame );
+ mDummyAllDayLeft = new TQVBox( mAllDayFrame );
if ( isSideBySide )
mDummyAllDayLeft->hide();
if ( KOPrefs::instance()->compactDialogs() ) {
- mExpandButton = new QPushButton(mDummyAllDayLeft);
+ mExpandButton = new TQPushButton(mDummyAllDayLeft);
mExpandButton->setPixmap( mNotExpandedPixmap );
- mExpandButton->setSizePolicy( QSizePolicy( QSizePolicy::Fixed,
- QSizePolicy::Fixed ) );
- connect( mExpandButton, SIGNAL( clicked() ), SIGNAL( toggleExpand() ) );
+ mExpandButton->setSizePolicy( TQSizePolicy( TQSizePolicy::Fixed,
+ TQSizePolicy::Fixed ) );
+ connect( mExpandButton, TQT_SIGNAL( clicked() ), TQT_SIGNAL( toggleExpand() ) );
} else {
- QLabel *label = new QLabel( i18n("All Day"), mDummyAllDayLeft );
+ TQLabel *label = new TQLabel( i18n("All Day"), mDummyAllDayLeft );
label->setAlignment( Qt::AlignRight | Qt::AlignVCenter | Qt::WordBreak );
}
mAllDayAgenda = new KOAgenda(1,mAllDayFrame);
- QWidget *dummyAllDayRight = new QWidget(mAllDayFrame);
+ TQWidget *dummyAllDayRight = new TQWidget(mAllDayFrame);
// Create agenda frame
- QGridLayout *agendaLayout = new QGridLayout(agendaFrame,3,3);
-// QHBox *agendaFrame = new QHBox(splitterAgenda);
+ TQGridLayout *agendaLayout = new TQGridLayout(agendaFrame,3,3);
+// TQHBox *agendaFrame = new TQHBox(splitterAgenda);
// create event indicator bars
mEventIndicatorTop = new EventIndicator(EventIndicator::Top,agendaFrame);
@@ -304,7 +304,7 @@ KOAgendaView::KOAgendaView(Calendar *cal,QWidget *parent,const char *name, bool
mEventIndicatorBottom = new EventIndicator(EventIndicator::Bottom,
agendaFrame);
agendaLayout->addWidget(mEventIndicatorBottom,2,1);
- QWidget *dummyAgendaRight = new QWidget(agendaFrame);
+ TQWidget *dummyAgendaRight = new TQWidget(agendaFrame);
agendaLayout->addWidget(dummyAgendaRight,0,2);
// Create time labels
@@ -341,27 +341,27 @@ KOAgendaView::KOAgendaView(Calendar *cal,QWidget *parent,const char *name, bool
updateTimeBarWidth();
// Scrolling
- connect(mAgenda->verticalScrollBar(),SIGNAL(valueChanged(int)),
- mTimeLabels, SLOT(positionChanged()));
+ connect(mAgenda->verticalScrollBar(),TQT_SIGNAL(valueChanged(int)),
+ mTimeLabels, TQT_SLOT(positionChanged()));
connect( mAgenda,
- SIGNAL( zoomView( const int, const QPoint & ,const Qt::Orientation ) ),
- SLOT( zoomView( const int, const QPoint &, const Qt::Orientation ) ) );
+ TQT_SIGNAL( zoomView( const int, const TQPoint & ,const Qt::Orientation ) ),
+ TQT_SLOT( zoomView( const int, const TQPoint &, const Qt::Orientation ) ) );
- connect(mTimeLabels->verticalScrollBar(),SIGNAL(valueChanged(int)),
- SLOT(setContentsPos(int)));
+ connect(mTimeLabels->verticalScrollBar(),TQT_SIGNAL(valueChanged(int)),
+ TQT_SLOT(setContentsPos(int)));
// Create Events, depends on type of agenda
- connect( mAgenda, SIGNAL(newTimeSpanSignal(const QPoint &, const QPoint &)),
- SLOT(newTimeSpanSelected(const QPoint &, const QPoint &)));
- connect( mAllDayAgenda, SIGNAL(newTimeSpanSignal(const QPoint &, const QPoint &)),
- SLOT(newTimeSpanSelectedAllDay(const QPoint &, const QPoint &)));
+ connect( mAgenda, TQT_SIGNAL(newTimeSpanSignal(const TQPoint &, const TQPoint &)),
+ TQT_SLOT(newTimeSpanSelected(const TQPoint &, const TQPoint &)));
+ connect( mAllDayAgenda, TQT_SIGNAL(newTimeSpanSignal(const TQPoint &, const TQPoint &)),
+ TQT_SLOT(newTimeSpanSelectedAllDay(const TQPoint &, const TQPoint &)));
// event indicator update
- connect( mAgenda, SIGNAL(lowerYChanged(int)),
- SLOT(updateEventIndicatorTop(int)));
- connect( mAgenda, SIGNAL(upperYChanged(int)),
- SLOT(updateEventIndicatorBottom(int)));
+ connect( mAgenda, TQT_SIGNAL(lowerYChanged(int)),
+ TQT_SLOT(updateEventIndicatorTop(int)));
+ connect( mAgenda, TQT_SIGNAL(upperYChanged(int)),
+ TQT_SLOT(updateEventIndicatorBottom(int)));
connectAgenda( mAgenda, mAgendaPopup, mAllDayAgenda );
connectAgenda( mAllDayAgenda, mAllDayAgendaPopup, mAgenda);
@@ -371,9 +371,9 @@ KOAgendaView::KOAgendaView(Calendar *cal,QWidget *parent,const char *name, bool
CalendarResources *calres = dynamic_cast<CalendarResources*>( cal );
if ( calres ) {
- connect( calres, SIGNAL(signalResourceAdded(ResourceCalendar *)), SLOT(resourcesChanged()) );
- connect( calres, SIGNAL(signalResourceModified( ResourceCalendar *)), SLOT(resourcesChanged()) );
- connect( calres, SIGNAL(signalResourceDeleted(ResourceCalendar *)), SLOT(resourcesChanged()) );
+ connect( calres, TQT_SIGNAL(signalResourceAdded(ResourceCalendar *)), TQT_SLOT(resourcesChanged()) );
+ connect( calres, TQT_SIGNAL(signalResourceModified( ResourceCalendar *)), TQT_SLOT(resourcesChanged()) );
+ connect( calres, TQT_SIGNAL(signalResourceDeleted(ResourceCalendar *)), TQT_SLOT(resourcesChanged()) );
}
}
@@ -386,55 +386,55 @@ KOAgendaView::~KOAgendaView()
delete mAllDayAgendaPopup;
}
-void KOAgendaView::connectAgenda( KOAgenda *agenda, QPopupMenu *popup,
+void KOAgendaView::connectAgenda( KOAgenda *agenda, TQPopupMenu *popup,
KOAgenda *otherAgenda )
{
- connect( agenda, SIGNAL( showIncidencePopupSignal( Incidence *, const QDate & ) ),
- popup, SLOT( showIncidencePopup( Incidence *, const QDate & ) ) );
+ connect( agenda, TQT_SIGNAL( showIncidencePopupSignal( Incidence *, const TQDate & ) ),
+ popup, TQT_SLOT( showIncidencePopup( Incidence *, const TQDate & ) ) );
- connect( agenda, SIGNAL( showNewEventPopupSignal() ),
- SLOT( showNewEventPopup() ) );
+ connect( agenda, TQT_SIGNAL( showNewEventPopupSignal() ),
+ TQT_SLOT( showNewEventPopup() ) );
agenda->setCalendar( calendar() );
// Create/Show/Edit/Delete Event
- connect( agenda, SIGNAL( newEventSignal() ), SIGNAL( newEventSignal() ) );
-
- connect( agenda, SIGNAL( newStartSelectSignal() ),
- otherAgenda, SLOT( clearSelection() ) );
- connect( agenda, SIGNAL( newStartSelectSignal() ),
- SIGNAL( timeSpanSelectionChanged()) );
-
- connect( agenda, SIGNAL( editIncidenceSignal( Incidence * ) ),
- SIGNAL( editIncidenceSignal( Incidence * ) ) );
- connect( agenda, SIGNAL( showIncidenceSignal( Incidence * ) ),
- SIGNAL( showIncidenceSignal( Incidence * ) ) );
- connect( agenda, SIGNAL( deleteIncidenceSignal( Incidence * ) ),
- SIGNAL( deleteIncidenceSignal( Incidence * ) ) );
-
- connect( agenda, SIGNAL( startMultiModify( const QString & ) ),
- SIGNAL( startMultiModify( const QString & ) ) );
- connect( agenda, SIGNAL( endMultiModify() ),
- SIGNAL( endMultiModify() ) );
-
- connect( agenda, SIGNAL( itemModified( KOAgendaItem * ) ),
- SLOT( updateEventDates( KOAgendaItem * ) ) );
- connect( agenda, SIGNAL( enableAgendaUpdate( bool ) ),
- SLOT( enableAgendaUpdate( bool ) ) );
+ connect( agenda, TQT_SIGNAL( newEventSignal() ), TQT_SIGNAL( newEventSignal() ) );
+
+ connect( agenda, TQT_SIGNAL( newStartSelectSignal() ),
+ otherAgenda, TQT_SLOT( clearSelection() ) );
+ connect( agenda, TQT_SIGNAL( newStartSelectSignal() ),
+ TQT_SIGNAL( timeSpanSelectionChanged()) );
+
+ connect( agenda, TQT_SIGNAL( editIncidenceSignal( Incidence * ) ),
+ TQT_SIGNAL( editIncidenceSignal( Incidence * ) ) );
+ connect( agenda, TQT_SIGNAL( showIncidenceSignal( Incidence * ) ),
+ TQT_SIGNAL( showIncidenceSignal( Incidence * ) ) );
+ connect( agenda, TQT_SIGNAL( deleteIncidenceSignal( Incidence * ) ),
+ TQT_SIGNAL( deleteIncidenceSignal( Incidence * ) ) );
+
+ connect( agenda, TQT_SIGNAL( startMultiModify( const TQString & ) ),
+ TQT_SIGNAL( startMultiModify( const TQString & ) ) );
+ connect( agenda, TQT_SIGNAL( endMultiModify() ),
+ TQT_SIGNAL( endMultiModify() ) );
+
+ connect( agenda, TQT_SIGNAL( itemModified( KOAgendaItem * ) ),
+ TQT_SLOT( updateEventDates( KOAgendaItem * ) ) );
+ connect( agenda, TQT_SIGNAL( enableAgendaUpdate( bool ) ),
+ TQT_SLOT( enableAgendaUpdate( bool ) ) );
// drag signals
- connect( agenda, SIGNAL( startDragSignal( Incidence * ) ),
- SLOT( startDrag( Incidence * ) ) );
+ connect( agenda, TQT_SIGNAL( startDragSignal( Incidence * ) ),
+ TQT_SLOT( startDrag( Incidence * ) ) );
// synchronize selections
- connect( agenda, SIGNAL( incidenceSelected( Incidence * ) ),
- otherAgenda, SLOT( deselectItem() ) );
- connect( agenda, SIGNAL( incidenceSelected( Incidence * ) ),
- SIGNAL( incidenceSelected( Incidence * ) ) );
+ connect( agenda, TQT_SIGNAL( incidenceSelected( Incidence * ) ),
+ otherAgenda, TQT_SLOT( deselectItem() ) );
+ connect( agenda, TQT_SIGNAL( incidenceSelected( Incidence * ) ),
+ TQT_SIGNAL( incidenceSelected( Incidence * ) ) );
// rescheduling of todos by d'n'd
- connect( agenda, SIGNAL( droppedToDo( Todo *, const QPoint &, bool ) ),
- SLOT( slotTodoDropped( Todo *, const QPoint &, bool ) ) );
+ connect( agenda, TQT_SIGNAL( droppedToDo( Todo *, const TQPoint &, bool ) ),
+ TQT_SLOT( slotTodoDropped( Todo *, const TQPoint &, bool ) ) );
}
@@ -470,11 +470,11 @@ void KOAgendaView::zoomOutVertically( )
}
}
-void KOAgendaView::zoomInHorizontally( const QDate &date)
+void KOAgendaView::zoomInHorizontally( const TQDate &date)
{
- QDate begin;
- QDate newBegin;
- QDate dateToZoom = date;
+ TQDate begin;
+ TQDate newBegin;
+ TQDate dateToZoom = date;
int ndays,count;
begin = mSelectedDates.first();
@@ -502,11 +502,11 @@ void KOAgendaView::zoomInHorizontally( const QDate &date)
}
}
-void KOAgendaView::zoomOutHorizontally( const QDate &date )
+void KOAgendaView::zoomOutHorizontally( const TQDate &date )
{
- QDate begin;
- QDate newBegin;
- QDate dateToZoom = date;
+ TQDate begin;
+ TQDate newBegin;
+ TQDate dateToZoom = date;
int ndays,count;
begin = mSelectedDates.first();
@@ -531,17 +531,17 @@ void KOAgendaView::zoomOutHorizontally( const QDate &date )
emit zoomViewHorizontally( newBegin, count );
}
-void KOAgendaView::zoomView( const int delta, const QPoint &pos,
+void KOAgendaView::zoomView( const int delta, const TQPoint &pos,
const Qt::Orientation orient )
{
- static QDate zoomDate;
- static QTimer *t = new QTimer( this );
+ static TQDate zoomDate;
+ static TQTimer *t = new TQTimer( this );
//Zoom to the selected incidence, on the other way
// zoom to the date on screen after the first mousewheel move.
if ( orient == Qt::Horizontal ) {
- QDate date=mAgenda->selectedIncidenceDate();
+ TQDate date=mAgenda->selectedIncidenceDate();
if ( date.isValid() )
zoomDate=date;
else{
@@ -556,13 +556,13 @@ void KOAgendaView::zoomView( const int delta, const QPoint &pos,
zoomInHorizontally( zoomDate );
} else {
// Vertical zoom
- QPoint posConstentsOld = mAgenda->gridToContents(pos);
+ TQPoint posConstentsOld = mAgenda->gridToContents(pos);
if ( delta > 0 ) {
zoomOutVertically();
} else {
zoomInVertically();
}
- QPoint posConstentsNew = mAgenda->gridToContents(pos);
+ TQPoint posConstentsNew = mAgenda->gridToContents(pos);
mAgenda->scrollBy( 0, posConstentsNew.y() - posConstentsOld.y() );
}
}
@@ -576,8 +576,8 @@ void KOAgendaView::createDayLabels()
// each updateView() call)
delete mDayLabels;
- mDayLabels = new QFrame (mDayLabelsFrame);
- mLayoutDayLabels = new QHBoxLayout(mDayLabels);
+ mDayLabels = new TQFrame (mDayLabelsFrame);
+ mLayoutDayLabels = new TQHBoxLayout(mDayLabels);
if ( !mIsSideBySide )
mLayoutDayLabels->addSpacing(mTimeLabels->width());
@@ -585,35 +585,35 @@ void KOAgendaView::createDayLabels()
DateList::ConstIterator dit;
for( dit = mSelectedDates.begin(); dit != mSelectedDates.end(); ++dit ) {
- QDate date = *dit;
- QBoxLayout *dayLayout = new QVBoxLayout(mLayoutDayLabels);
+ TQDate date = *dit;
+ TQBoxLayout *dayLayout = new TQVBoxLayout(mLayoutDayLabels);
mLayoutDayLabels->setStretchFactor(dayLayout, 1);
// dayLayout->setMinimumWidth(1);
int dW = calsys->dayOfWeek(date);
- QString veryLongStr = KGlobal::locale()->formatDate( date );
- QString longstr = i18n( "short_weekday date (e.g. Mon 13)","%1 %2" )
+ TQString veryLongStr = KGlobal::locale()->formatDate( date );
+ TQString longstr = i18n( "short_weekday date (e.g. Mon 13)","%1 %2" )
.arg( calsys->weekDayName( dW, true ) )
.arg( calsys->day(date) );
- QString shortstr = QString::number(calsys->day(date));
+ TQString shortstr = TQString::number(calsys->day(date));
KOAlternateLabel *dayLabel = new KOAlternateLabel(shortstr,
longstr, veryLongStr, mDayLabels);
dayLabel->setMinimumWidth(1);
- dayLabel->setAlignment(QLabel::AlignHCenter);
- if (date == QDate::currentDate()) {
- QFont font = dayLabel->font();
+ dayLabel->setAlignment(TQLabel::AlignHCenter);
+ if (date == TQDate::currentDate()) {
+ TQFont font = dayLabel->font();
font.setBold(true);
dayLabel->setFont(font);
}
dayLayout->addWidget(dayLabel);
// if a holiday region is selected, show the holiday name
- QStringList texts = KOGlobals::self()->holiday( date );
- QStringList::ConstIterator textit = texts.begin();
+ TQStringList texts = KOGlobals::self()->holiday( date );
+ TQStringList::ConstIterator textit = texts.begin();
for ( ; textit != texts.end(); ++textit ) {
// use a KOAlternateLabel so when the text doesn't fit any more a tooltip is used
- KOAlternateLabel*label = new KOAlternateLabel( (*textit), (*textit), QString::null, mDayLabels );
+ KOAlternateLabel*label = new KOAlternateLabel( (*textit), (*textit), TQString::null, mDayLabels );
label->setMinimumWidth(1);
label->setAlignment(AlignCenter);
dayLayout->addWidget(label);
@@ -623,10 +623,10 @@ void KOAgendaView::createDayLabels()
CalendarDecoration::List cds = KOCore::self()->calendarDecorations();
CalendarDecoration *it;
for(it = cds.first(); it; it = cds.next()) {
- QString text = it->shortText( date );
+ TQString text = it->shortText( date );
if ( !text.isEmpty() ) {
// use a KOAlternateLabel so when the text doesn't fit any more a tooltip is used
- KOAlternateLabel*label = new KOAlternateLabel( text, text, QString::null, mDayLabels );
+ KOAlternateLabel*label = new KOAlternateLabel( text, text, TQString::null, mDayLabels );
label->setMinimumWidth(1);
label->setAlignment(AlignCenter);
dayLayout->addWidget(label);
@@ -634,7 +634,7 @@ void KOAgendaView::createDayLabels()
}
for(it = cds.first(); it; it = cds.next()) {
- QWidget *wid = it->smallWidget(mDayLabels,date);
+ TQWidget *wid = it->smallWidget(mDayLabels,date);
if ( wid ) {
// wid->setHeight(20);
dayLayout->addWidget(wid);
@@ -681,7 +681,7 @@ Incidence::List KOAgendaView::selectedIncidences()
DateList KOAgendaView::selectedDates()
{
DateList selected;
- QDate qd;
+ TQDate qd;
qd = mAgenda->selectedIncidenceDate();
if (qd.isValid()) selected.append(qd);
@@ -692,17 +692,17 @@ DateList KOAgendaView::selectedDates()
return selected;
}
-bool KOAgendaView::eventDurationHint( QDateTime &startDt, QDateTime &endDt,
+bool KOAgendaView::eventDurationHint( TQDateTime &startDt, TQDateTime &endDt,
bool &allDay )
{
if ( selectionStart().isValid() ) {
- QDateTime start = selectionStart();
- QDateTime end = selectionEnd();
+ TQDateTime start = selectionStart();
+ TQDateTime end = selectionEnd();
if ( start.secsTo( end ) == 15*60 ) {
// One cell in the agenda view selected, e.g.
// because of a double-click, => Use the default duration
- QTime defaultDuration( KOPrefs::instance()->mDefaultDuration.time() );
+ TQTime defaultDuration( KOPrefs::instance()->mDefaultDuration.time() );
int addSecs = ( defaultDuration.hour()*3600 ) +
( defaultDuration.minute()*60 );
end = start.addSecs( addSecs );
@@ -787,19 +787,19 @@ void KOAgendaView::updateEventDates( KOAgendaItem *item )
{
kdDebug(5850) << "KOAgendaView::updateEventDates(): " << item->text() << endl;
- QDateTime startDt,endDt;
+ TQDateTime startDt,endDt;
// Start date of this incidence, calculate the offset from it (so recurring and
// non-recurring items can be treated exactly the same, we never need to check
// for doesRecur(), because we only move the start day by the number of days the
// agenda item was really moved. Smart, isn't it?)
- QDate thisDate;
+ TQDate thisDate;
if ( item->cellXLeft() < 0 ) {
thisDate = ( mSelectedDates.first() ).addDays( item->cellXLeft() );
} else {
thisDate = mSelectedDates[ item->cellXLeft() ];
}
- QDate oldThisDate( item->itemDate() );
+ TQDate oldThisDate( item->itemDate() );
int daysOffset = oldThisDate.daysTo( thisDate );
int daysLength = 0;
@@ -810,7 +810,7 @@ void KOAgendaView::updateEventDates( KOAgendaItem *item )
if ( !mChanger || !mChanger->beginChange(incidence) ) return;
Incidence *oldIncidence = incidence->clone();
- QTime startTime(0,0,0), endTime(0,0,0);
+ TQTime startTime(0,0,0), endTime(0,0,0);
if ( incidence->doesFloat() ) {
daysLength = item->cellWidth() - 1;
} else {
@@ -863,14 +863,14 @@ void KOAgendaView::updateEventDates( KOAgendaItem *item )
case Recurrence::rYearlyPos: {
int freq = recur->frequency();
int duration = recur->duration();
- QDate endDt( recur->endDate() );
+ TQDate endDt( recur->endDate() );
bool negative = false;
- QPtrList<Recurrence::rMonthPos> monthPos( recur->yearMonthPositions() );
+ TQPtrList<Recurrence::rMonthPos> monthPos( recur->yearMonthPositions() );
if ( monthPos.first() ) {
negative = monthPos.first()->negative;
}
- QBitArray days( 7 );
+ TQBitArray days( 7 );
int pos = 0;
days.fill( false );
days.setBit( thisDate.dayOfWeek() - 1 );
@@ -893,7 +893,7 @@ void KOAgendaView::updateEventDates( KOAgendaItem *item )
case Recurrence::rYearlyDay: {
int freq = recur->frequency();
int duration = recur->duration();
- QDate endDt( recur->endDate() );
+ TQDate endDt( recur->endDate() );
// Terrible hack: to change the month days, I have to unset the recurrence, and set all days manually again
recur->unsetRecurs();
if ( duration == 0 ) { // end by date
@@ -906,7 +906,7 @@ void KOAgendaView::updateEventDates( KOAgendaItem *item )
case Recurrence::rYearlyMonth: {
int freq = recur->frequency();
int duration = recur->duration();
- QDate endDt( recur->endDate() );
+ TQDate endDt( recur->endDate() );
// Terrible hack: to change the month days, I have to unset the recurrence, and set all days manually again
recur->unsetRecurs();
if ( duration != 0 ) {
@@ -919,13 +919,13 @@ void KOAgendaView::updateEventDates( KOAgendaItem *item )
case Recurrence::rMonthlyPos: {
int freq = recur->frequency();
int duration = recur->duration();
- QDate endDt( recur->endDate() );
- QPtrList<Recurrence::rMonthPos> monthPos( recur->monthPositions() );
+ TQDate endDt( recur->endDate() );
+ TQPtrList<Recurrence::rMonthPos> monthPos( recur->monthPositions() );
if ( !monthPos.isEmpty() ) {
// FIXME: How shall I adapt the day x of week Y if we move the date across month borders???
// for now, just use the date of the moved item and assume the recurrence only occurs on that day.
// That's fine for korganizer, but might mess up other organizers.
- QBitArray rDays( 7 );
+ TQBitArray rDays( 7 );
rDays = monthPos.first()->rDays;
bool negative = monthPos.first()->negative;
int newPos;
@@ -950,8 +950,8 @@ void KOAgendaView::updateEventDates( KOAgendaItem *item )
case Recurrence::rMonthlyDay: {
int freq = recur->frequency();
int duration = recur->duration();
- QDate endDt( recur->endDate() );
- QPtrList<int> monthDays( recur->monthDays() );
+ TQDate endDt( recur->endDate() );
+ TQPtrList<int> monthDays( recur->monthDays() );
// Terrible hack: to change the month days, I have to unset the recurrence, and set all days manually again
recur->unsetRecurs();
if ( duration == 0 ) { // end by date
@@ -966,7 +966,7 @@ void KOAgendaView::updateEventDates( KOAgendaItem *item )
break;}
case Recurrence::rWeekly: {
- QBitArray days(7), oldDays( recur->days() );
+ TQBitArray days(7), oldDays( recur->days() );
int offset = daysOffset % 7;
if ( offset<0 ) offset = (offset+7) % 7;
// rotate the days
@@ -1028,7 +1028,7 @@ void KOAgendaView::updateEventDates( KOAgendaItem *item )
// recreated. All others have to!!!
if ( incidence->doesRecur() ) {
mUpdateItem = incidence;
- QTimer::singleShot( 0, this, SLOT( doUpdateItem() ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( doUpdateItem() ) );
}
enableAgendaUpdate( true );
@@ -1046,7 +1046,7 @@ void KOAgendaView::doUpdateItem()
-void KOAgendaView::showDates( const QDate &start, const QDate &end )
+void KOAgendaView::showDates( const TQDate &start, const TQDate &end )
{
// kdDebug(5850) << "KOAgendaView::selectDates" << endl;
if ( !mSelectedDates.isEmpty() && mSelectedDates.first() == start
@@ -1055,7 +1055,7 @@ void KOAgendaView::showDates( const QDate &start, const QDate &end )
mSelectedDates.clear();
- QDate d = start;
+ TQDate d = start;
while (d <= end) {
mSelectedDates.append(d);
d = d.addDays( 1 );
@@ -1071,7 +1071,7 @@ void KOAgendaView::showIncidences( const Incidence::List & )
kdDebug(5850) << "KOAgendaView::showIncidences( const Incidence::List & ) is not yet implemented" << endl;
}
-void KOAgendaView::insertIncidence( Incidence *incidence, const QDate &curDate,
+void KOAgendaView::insertIncidence( Incidence *incidence, const TQDate &curDate,
int curCol )
{
if ( !filterByResource( incidence ) )
@@ -1116,32 +1116,32 @@ void KOAgendaView::insertIncidence( Incidence *incidence, const QDate &curDate,
}
} else if ( event && event->isMultiDay() ) {
int startY = mAgenda->timeToY( event->dtStart().time() );
- QTime endtime( event->dtEnd().time() );
- if ( endtime == QTime( 0, 0, 0 ) ) endtime = QTime( 23, 59, 59 );
+ TQTime endtime( event->dtEnd().time() );
+ if ( endtime == TQTime( 0, 0, 0 ) ) endtime = TQTime( 23, 59, 59 );
int endY = mAgenda->timeToY( endtime ) - 1;
if ( (beginX <= 0 && curCol == 0) || beginX == curCol ) {
mAgenda->insertMultiItem( event, curDate, beginX, endX, startY, endY );
}
if ( beginX == curCol ) {
- mMaxY[curCol] = mAgenda->timeToY( QTime(23,59) );
+ mMaxY[curCol] = mAgenda->timeToY( TQTime(23,59) );
if ( startY < mMinY[curCol] ) mMinY[curCol] = startY;
} else if ( endX == curCol ) {
- mMinY[curCol] = mAgenda->timeToY( QTime(0,0) );
+ mMinY[curCol] = mAgenda->timeToY( TQTime(0,0) );
if ( endY > mMaxY[curCol] ) mMaxY[curCol] = endY;
} else {
- mMinY[curCol] = mAgenda->timeToY( QTime(0,0) );
- mMaxY[curCol] = mAgenda->timeToY( QTime(23,59) );
+ mMinY[curCol] = mAgenda->timeToY( TQTime(0,0) );
+ mMaxY[curCol] = mAgenda->timeToY( TQTime(23,59) );
}
} else {
int startY = 0, endY = 0;
if ( event ) {
startY = mAgenda->timeToY( incidence->dtStart().time() );
- QTime endtime( event->dtEnd().time() );
- if ( endtime == QTime( 0, 0, 0 ) ) endtime = QTime( 23, 59, 59 );
+ TQTime endtime( event->dtEnd().time() );
+ if ( endtime == TQTime( 0, 0, 0 ) ) endtime = TQTime( 23, 59, 59 );
endY = mAgenda->timeToY( endtime ) - 1;
}
if ( todo ) {
- QTime t = todo->dtDue().time();
+ TQTime t = todo->dtDue().time();
endY = mAgenda->timeToY( t ) - 1;
startY = mAgenda->timeToY( t.addSecs( -1800 ) );
}
@@ -1160,13 +1160,13 @@ void KOAgendaView::changeIncidenceDisplayAdded( Incidence *incidence )
( todo && !KOPrefs::instance()->showAllDayTodo() ) )
return;
- QDate f = mSelectedDates.first();
- QDate l = mSelectedDates.last();
- QDate startDt = incidence->dtStart().date();
+ TQDate f = mSelectedDates.first();
+ TQDate l = mSelectedDates.last();
+ TQDate startDt = incidence->dtStart().date();
if ( incidence->doesRecur() ) {
DateList::ConstIterator dit;
- QDate curDate;
+ TQDate curDate;
for( dit = mSelectedDates.begin(); dit != mSelectedDates.end(); ++dit ) {
curDate = *dit;
// FIXME: This breaks with recurring multi-day events!
@@ -1177,11 +1177,11 @@ void KOAgendaView::changeIncidenceDisplayAdded( Incidence *incidence )
return;
}
- QDate endDt;
+ TQDate endDt;
if ( incidence->type() == "Event" )
endDt = (static_cast<Event *>(incidence))->dateEnd();
if ( todo ) {
- endDt = todo->isOverdue() ? QDate::currentDate()
+ endDt = todo->isOverdue() ? TQDate::currentDate()
: todo->dtDue().date();
if ( endDt >= f && endDt <= l ) {
@@ -1228,7 +1228,7 @@ void KOAgendaView::changeIncidenceDisplay( Incidence *incidence, int mode )
}
}
-void KOAgendaView::fillAgenda( const QDate & )
+void KOAgendaView::fillAgenda( const TQDate & )
{
fillAgenda();
}
@@ -1239,8 +1239,8 @@ void KOAgendaView::fillAgenda()
/* Remember the uids of the selected items. In case one of the
* items was deleted and re-added, we want to reselect it. */
- const QString &selectedAgendaUid = mAgenda->lastSelectedUid();
- const QString &selectedAllDayAgendaUid = mAllDayAgenda->lastSelectedUid();
+ const TQString &selectedAgendaUid = mAgenda->lastSelectedUid();
+ const TQString &selectedAllDayAgendaUid = mAllDayAgenda->lastSelectedUid();
enableAgendaUpdate( true );
clearView();
@@ -1264,13 +1264,13 @@ void KOAgendaView::fillAgenda()
mAgenda->setDateList(mSelectedDates);
- QDate today = QDate::currentDate();
+ TQDate today = TQDate::currentDate();
bool somethingReselected = false;
DateList::ConstIterator dit;
int curCol = 0;
for( dit = mSelectedDates.begin(); dit != mSelectedDates.end(); ++dit ) {
- QDate currentDate = *dit;
+ TQDate currentDate = *dit;
// kdDebug(5850) << "KOAgendaView::fillAgenda(): " << currentDate.toString()
// << endl;
@@ -1279,8 +1279,8 @@ void KOAgendaView::fillAgenda()
SortDirectionAscending);
// Default values, which can never be reached
- mMinY[curCol] = mAgenda->timeToY(QTime(23,59)) + 1;
- mMaxY[curCol] = mAgenda->timeToY(QTime(0,0)) - 1;
+ mMinY[curCol] = mAgenda->timeToY(TQTime(23,59)) + 1;
+ mMaxY[curCol] = mAgenda->timeToY(TQTime(0,0)) - 1;
unsigned int numEvent;
for(numEvent=0;numEvent<dayEvents.count();++numEvent) {
@@ -1387,12 +1387,12 @@ void KOAgendaView::updateEventIndicatorBottom( int newY )
mEventIndicatorBottom->update();
}
-void KOAgendaView::slotTodoDropped( Todo *todo, const QPoint &gpos, bool allDay )
+void KOAgendaView::slotTodoDropped( Todo *todo, const TQPoint &gpos, bool allDay )
{
if ( gpos.x()<0 || gpos.y()<0 ) return;
- QDate day = mSelectedDates[gpos.x()];
- QTime time = mAgenda->gyToTime( gpos.y() );
- QDateTime newTime( day, time );
+ TQDate day = mSelectedDates[gpos.x()];
+ TQTime time = mAgenda->gyToTime( gpos.y() );
+ TQDateTime newTime( day, time );
if ( todo ) {
Todo *existingTodo = calendar()->todo( todo->uid() );
@@ -1445,7 +1445,7 @@ void KOAgendaView::readSettings(KConfig *config)
config->setGroup("Views");
#ifndef KORG_NOSPLITTER
- QValueList<int> sizes = config->readIntListEntry("Separator AgendaView");
+ TQValueList<int> sizes = config->readIntListEntry("Separator AgendaView");
if (sizes.count() == 2) {
mSplitterAgenda->setSizes(sizes);
}
@@ -1461,7 +1461,7 @@ void KOAgendaView::writeSettings(KConfig *config)
config->setGroup("Views");
#ifndef KORG_NOSPLITTER
- QValueList<int> list = mSplitterAgenda->sizes();
+ TQValueList<int> list = mSplitterAgenda->sizes();
config->writeEntry("Separator AgendaView",list);
#endif
}
@@ -1505,26 +1505,26 @@ void KOAgendaView::clearSelection()
mAllDayAgenda->deselectItem();
}
-void KOAgendaView::newTimeSpanSelectedAllDay( const QPoint &start, const QPoint &end )
+void KOAgendaView::newTimeSpanSelectedAllDay( const TQPoint &start, const TQPoint &end )
{
newTimeSpanSelected( start, end );
mTimeSpanInAllDay = true;
}
-void KOAgendaView::newTimeSpanSelected( const QPoint &start, const QPoint &end )
+void KOAgendaView::newTimeSpanSelected( const TQPoint &start, const TQPoint &end )
{
if (!mSelectedDates.count()) return;
mTimeSpanInAllDay = false;
- QDate dayStart = mSelectedDates[ kClamp( start.x(), 0, (int)mSelectedDates.size() - 1 ) ];
- QDate dayEnd = mSelectedDates[ kClamp( end.x(), 0, (int)mSelectedDates.size() - 1 ) ];
+ TQDate dayStart = mSelectedDates[ kClamp( start.x(), 0, (int)mSelectedDates.size() - 1 ) ];
+ TQDate dayEnd = mSelectedDates[ kClamp( end.x(), 0, (int)mSelectedDates.size() - 1 ) ];
- QTime timeStart = mAgenda->gyToTime(start.y());
- QTime timeEnd = mAgenda->gyToTime( end.y() + 1 );
+ TQTime timeStart = mAgenda->gyToTime(start.y());
+ TQTime timeEnd = mAgenda->gyToTime( end.y() + 1 );
- QDateTime dtStart(dayStart,timeStart);
- QDateTime dtEnd(dayEnd,timeEnd);
+ TQDateTime dtStart(dayStart,timeStart);
+ TQDateTime dtEnd(dayEnd,timeEnd);
mTimeSpanBegin = dtStart;
mTimeSpanEnd = dtEnd;
@@ -1532,12 +1532,12 @@ void KOAgendaView::newTimeSpanSelected( const QPoint &start, const QPoint &end )
void KOAgendaView::deleteSelectedDateTime()
{
- mTimeSpanBegin.setDate(QDate());
- mTimeSpanEnd.setDate(QDate());
+ mTimeSpanBegin.setDate(TQDate());
+ mTimeSpanEnd.setDate(TQDate());
mTimeSpanInAllDay = false;
}
-void KOAgendaView::setTypeAheadReceiver( QObject *o )
+void KOAgendaView::setTypeAheadReceiver( TQObject *o )
{
mAgenda->setTypeAheadReceiver( o );
mAllDayAgenda->setTypeAheadReceiver( o );
@@ -1579,7 +1579,7 @@ void KOAgendaView::clearTimeSpanSelection()
deleteSelectedDateTime();
}
-void KOAgendaView::setResource(KCal::ResourceCalendar * res, const QString & subResource)
+void KOAgendaView::setResource(KCal::ResourceCalendar * res, const TQString & subResource)
{
mResource = res;
mSubResource = subResource;
diff --git a/korganizer/koagendaview.h b/korganizer/koagendaview.h
index 6fc673307..c1434dc1d 100644
--- a/korganizer/koagendaview.h
+++ b/korganizer/koagendaview.h
@@ -25,8 +25,8 @@
#ifndef KOAGENDAVIEW_H
#define KOAGENDAVIEW_H
-#include <qscrollview.h>
-#include <qlabel.h>
+#include <tqscrollview.h>
+#include <tqlabel.h>
#include <libkcal/calendar.h>
@@ -56,7 +56,7 @@ class EventIndicator : public QFrame
Q_OBJECT
public:
enum Location { Top, Bottom };
- EventIndicator( Location loc = Top, QWidget *parent = 0,
+ EventIndicator( Location loc = Top, TQWidget *parent = 0,
const char *name = 0 );
virtual ~EventIndicator();
@@ -65,38 +65,38 @@ class EventIndicator : public QFrame
void enableColumn( int column, bool enable );
protected:
- void drawContents( QPainter * );
+ void drawContents( TQPainter * );
private:
int mColumns;
Location mLocation;
- QPixmap mPixmap;
- QMemArray<bool> mEnabled;
+ TQPixmap mPixmap;
+ TQMemArray<bool> mEnabled;
};
class KOAlternateLabel : public QLabel
{
Q_OBJECT
public:
- KOAlternateLabel( const QString &shortlabel, const QString &longlabel,
- const QString &extensivelabel = QString::null,
- QWidget *parent = 0, const char *name = 0 );
+ KOAlternateLabel( const TQString &shortlabel, const TQString &longlabel,
+ const TQString &extensivelabel = TQString::null,
+ TQWidget *parent = 0, const char *name = 0 );
~KOAlternateLabel();
- virtual QSize minimumSizeHint() const;
+ virtual TQSize minimumSizeHint() const;
public slots:
- void setText( const QString & );
+ void setText( const TQString & );
void useShortText();
void useLongText();
void useExtensiveText();
void useDefaultText();
protected:
- virtual void resizeEvent( QResizeEvent * );
+ virtual void resizeEvent( TQResizeEvent * );
virtual void squeezeTextToLabel();
bool mTextTypeFixed;
- QString mShortText, mLongText, mExtensiveText;
+ TQString mShortText, mLongText, mExtensiveText;
};
/**
@@ -107,7 +107,7 @@ class KOAgendaView : public KOrg::AgendaView, public KCal::Calendar::Observer
{
Q_OBJECT
public:
- KOAgendaView( Calendar *cal, QWidget *parent = 0, const char *name = 0, bool isSideBySide = false );
+ KOAgendaView( Calendar *cal, TQWidget *parent = 0, const char *name = 0, bool isSideBySide = false );
virtual ~KOAgendaView();
@@ -125,7 +125,7 @@ class KOAgendaView : public KOrg::AgendaView, public KCal::Calendar::Observer
virtual DateList selectedDates();
/** return the default start/end date/time for new events */
- virtual bool eventDurationHint(QDateTime &startDt, QDateTime &endDt, bool &allDay);
+ virtual bool eventDurationHint(TQDateTime &startDt, TQDateTime &endDt, bool &allDay);
/** Remove all events from view */
void clearView();
@@ -133,9 +133,9 @@ class KOAgendaView : public KOrg::AgendaView, public KCal::Calendar::Observer
KOrg::CalPrinterBase::PrintType printType();
/** start-datetime of selection */
- QDateTime selectionStart() { return mTimeSpanBegin; }
+ TQDateTime selectionStart() { return mTimeSpanBegin; }
/** end-datetime of selection */
- QDateTime selectionEnd() { return mTimeSpanEnd; }
+ TQDateTime selectionEnd() { return mTimeSpanEnd; }
/** returns true if selection is for whole day */
bool selectedIsAllDay() { return mTimeSpanInAllDay; }
/** make selected start/end invalid */
@@ -143,13 +143,13 @@ class KOAgendaView : public KOrg::AgendaView, public KCal::Calendar::Observer
/** returns if only a single cell is selected, or a range of cells */
bool selectedIsSingleCell();
- void setTypeAheadReceiver( QObject * );
+ void setTypeAheadReceiver( TQObject * );
/** Show only incidences from the given resource. */
- void setResource( KCal::ResourceCalendar *res, const QString &subResource = QString::null );
+ void setResource( KCal::ResourceCalendar *res, const TQString &subResource = TQString::null );
KOAgenda* agenda() const { return mAgenda; }
- QSplitter* splitter() const { return mSplitterAgenda; }
+ TQSplitter* splitter() const { return mSplitterAgenda; }
/* reimplmented from KCal::Calendar::Observer */
void calendarIncidenceAdded( Incidence *incidence );
@@ -159,10 +159,10 @@ class KOAgendaView : public KOrg::AgendaView, public KCal::Calendar::Observer
public slots:
virtual void updateView();
virtual void updateConfig();
- virtual void showDates( const QDate &start, const QDate &end );
+ virtual void showDates( const TQDate &start, const TQDate &end );
virtual void showIncidences( const Incidence::List &incidenceList );
- void insertIncidence( Incidence *incidence, const QDate &curDate, int curCol = -1 );
+ void insertIncidence( Incidence *incidence, const TQDate &curDate, int curCol = -1 );
void changeIncidenceDisplayAdded( Incidence *incidence );
void changeIncidenceDisplay( Incidence *incidence, int mode );
@@ -181,18 +181,18 @@ class KOAgendaView : public KOrg::AgendaView, public KCal::Calendar::Observer
void finishTypeAhead();
/** reschedule the todo to the given x- and y- coordinates. Third parameter determines all-day (no time specified) */
- void slotTodoDropped( Todo *, const QPoint &, bool );
+ void slotTodoDropped( Todo *, const TQPoint &, bool );
void enableAgendaUpdate( bool enable );
void setIncidenceChanger( KOrg::IncidenceChangerBase *changer );
- void zoomInHorizontally( const QDate& date=QDate() );
- void zoomOutHorizontally( const QDate& date=QDate() );
+ void zoomInHorizontally( const TQDate& date=TQDate() );
+ void zoomOutHorizontally( const TQDate& date=TQDate() );
void zoomInVertically( );
void zoomOutVertically( );
- void zoomView( const int delta, const QPoint &pos,
+ void zoomView( const int delta, const TQPoint &pos,
const Qt::Orientation orient=Qt::Horizontal );
void clearTimeSpanSelection();
@@ -201,18 +201,18 @@ class KOAgendaView : public KOrg::AgendaView, public KCal::Calendar::Observer
signals:
void toggleExpand();
- void zoomViewHorizontally(const QDate &, int count );
+ void zoomViewHorizontally(const TQDate &, int count );
void timeSpanSelectionChanged();
protected:
/** Fill agenda beginning with date startDate */
- void fillAgenda( const QDate &startDate );
+ void fillAgenda( const TQDate &startDate );
/** Fill agenda using the current set value for the start date */
void fillAgenda();
- void connectAgenda( KOAgenda*agenda, QPopupMenu*popup, KOAgenda* otherAgenda );
+ void connectAgenda( KOAgenda*agenda, TQPopupMenu*popup, KOAgenda* otherAgenda );
/** Create labels for the selected dates. */
void createDayLabels();
@@ -241,25 +241,25 @@ class KOAgendaView : public KOrg::AgendaView, public KCal::Calendar::Observer
void updateEventIndicatorBottom( int newY );
/** Updates data for selected timespan */
- void newTimeSpanSelected( const QPoint &start, const QPoint &end );
+ void newTimeSpanSelected( const TQPoint &start, const TQPoint &end );
/** Updates data for selected timespan for all day event*/
- void newTimeSpanSelectedAllDay( const QPoint &start, const QPoint &end );
+ void newTimeSpanSelectedAllDay( const TQPoint &start, const TQPoint &end );
private:
bool filterByResource( Incidence *incidence );
private:
// view widgets
- QFrame *mDayLabels;
- QHBox *mDayLabelsFrame;
- QBoxLayout *mLayoutDayLabels;
- QFrame *mAllDayFrame;
+ TQFrame *mDayLabels;
+ TQHBox *mDayLabelsFrame;
+ TQBoxLayout *mLayoutDayLabels;
+ TQFrame *mAllDayFrame;
KOAgenda *mAllDayAgenda;
KOAgenda *mAgenda;
TimeLabels *mTimeLabels;
- QWidget *mDummyAllDayLeft;
- QSplitter *mSplitterAgenda;
- QPushButton *mExpandButton;
+ TQWidget *mDummyAllDayLeft;
+ TQSplitter *mSplitterAgenda;
+ TQPushButton *mExpandButton;
DateList mSelectedDates; // List of dates to be displayed
int mViewType;
@@ -270,23 +270,23 @@ class KOAgendaView : public KOrg::AgendaView, public KCal::Calendar::Observer
EventIndicator *mEventIndicatorTop;
EventIndicator *mEventIndicatorBottom;
- QMemArray<int> mMinY;
- QMemArray<int> mMaxY;
+ TQMemArray<int> mMinY;
+ TQMemArray<int> mMaxY;
- QMemArray<bool> mHolidayMask;
+ TQMemArray<bool> mHolidayMask;
- QPixmap mExpandedPixmap;
- QPixmap mNotExpandedPixmap;
+ TQPixmap mExpandedPixmap;
+ TQPixmap mNotExpandedPixmap;
- QDateTime mTimeSpanBegin;
- QDateTime mTimeSpanEnd;
+ TQDateTime mTimeSpanBegin;
+ TQDateTime mTimeSpanEnd;
bool mTimeSpanInAllDay;
bool mAllowAgendaUpdate;
Incidence *mUpdateItem;
KCal::ResourceCalendar *mResource;
- QString mSubResource;
+ TQString mSubResource;
bool mIsSideBySide;
bool mPendingChanges;
diff --git a/korganizer/koapp.cpp b/korganizer/koapp.cpp
index 66bb39556..3fa1f28d8 100644
--- a/korganizer/koapp.cpp
+++ b/korganizer/koapp.cpp
@@ -56,7 +56,7 @@ using namespace std;
KOrganizerApp::KOrganizerApp() : KUniqueApplication()
{
- QString prodId = "-//K Desktop Environment//NONSGML KOrganizer %1//EN";
+ TQString prodId = "-//K Desktop Environment//NONSGML KOrganizer %1//EN";
CalFormat::setApplication( "KOrganizer", prodId.arg( korgVersion ) );
}
diff --git a/korganizer/koattendeeeditor.cpp b/korganizer/koattendeeeditor.cpp
index c6a255e9c..370ac3b32 100644
--- a/korganizer/koattendeeeditor.cpp
+++ b/korganizer/koattendeeeditor.cpp
@@ -35,32 +35,32 @@
#include <kiconloader.h>
#include <klocale.h>
-#include <qcheckbox.h>
-#include <qcombobox.h>
-#include <qhbox.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qpushbutton.h>
-#include <qwhatsthis.h>
+#include <tqcheckbox.h>
+#include <tqcombobox.h>
+#include <tqhbox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqpushbutton.h>
+#include <tqwhatsthis.h>
using namespace KCal;
-KOAttendeeEditor::KOAttendeeEditor( QWidget * parent, const char *name ) :
- QWidget( parent, name ),
+KOAttendeeEditor::KOAttendeeEditor( TQWidget * parent, const char *name ) :
+ TQWidget( parent, name ),
mDisableItemUpdate( true )
{
}
-void KOAttendeeEditor::initOrganizerWidgets(QWidget * parent, QBoxLayout * layout)
+void KOAttendeeEditor::initOrganizerWidgets(TQWidget * parent, TQBoxLayout * layout)
{
- mOrganizerHBox = new QHBox( parent );
+ mOrganizerHBox = new TQHBox( parent );
layout->addWidget( mOrganizerHBox );
// If creating a new event, then the user is the organizer -> show the
// identity combo
// readEvent will delete it and set another label text instead, if the user
// isn't the organizer.
// Note that the i18n text below is duplicated in readEvent
- QString whatsThis = i18n("Sets the identity corresponding to "
+ TQString whatsThis = i18n("Sets the identity corresponding to "
"the organizer of this to-do or event. "
"Identities can be set in the 'Personal' "
"section of the KOrganizer configuration, or in the "
@@ -72,64 +72,64 @@ void KOAttendeeEditor::initOrganizerWidgets(QWidget * parent, QBoxLayout * layou
"be sure to check 'Use email settings from "
"Control Center' in the 'Personal' section of the "
"KOrganizer configuration.");
- mOrganizerLabel = new QLabel( i18n( "Identity as organizer:" ),
+ mOrganizerLabel = new TQLabel( i18n( "Identity as organizer:" ),
mOrganizerHBox );
- mOrganizerCombo = new QComboBox( mOrganizerHBox );
- QWhatsThis::add( mOrganizerLabel, whatsThis );
- QWhatsThis::add( mOrganizerCombo, whatsThis );
+ mOrganizerCombo = new TQComboBox( mOrganizerHBox );
+ TQWhatsThis::add( mOrganizerLabel, whatsThis );
+ TQWhatsThis::add( mOrganizerCombo, whatsThis );
fillOrganizerCombo();
mOrganizerHBox->setStretchFactor( mOrganizerCombo, 100 );
}
-void KOAttendeeEditor::initEditWidgets(QWidget * parent, QBoxLayout * layout)
+void KOAttendeeEditor::initEditWidgets(TQWidget * parent, TQBoxLayout * layout)
{
- QGridLayout *topLayout = new QGridLayout();
+ TQGridLayout *topLayout = new TQGridLayout();
layout->addLayout( topLayout );
- QString whatsThis = i18n("Edits the name of the attendee selected in the list "
+ TQString whatsThis = i18n("Edits the name of the attendee selected in the list "
"above, or adds a new attendee if there are no attendees"
"in the list.");
- QLabel *attendeeLabel = new QLabel( parent );
- QWhatsThis::add( attendeeLabel, whatsThis );
+ TQLabel *attendeeLabel = new TQLabel( parent );
+ TQWhatsThis::add( attendeeLabel, whatsThis );
attendeeLabel->setText( i18n("Na&me:") );
topLayout->addWidget( attendeeLabel, 0, 0 );
mNameEdit = new KPIM::AddresseeLineEdit( parent );
- QWhatsThis::add( mNameEdit, whatsThis );
+ TQWhatsThis::add( mNameEdit, whatsThis );
mNameEdit->setClickMessage( i18n("Click to add a new attendee") );
attendeeLabel->setBuddy( mNameEdit );
mNameEdit->installEventFilter( this );
- connect( mNameEdit, SIGNAL( textChanged( const QString & ) ),
- SLOT( updateAttendee() ) );
+ connect( mNameEdit, TQT_SIGNAL( textChanged( const TQString & ) ),
+ TQT_SLOT( updateAttendee() ) );
topLayout->addMultiCellWidget( mNameEdit, 0, 0, 1, 2 );
whatsThis = i18n("Edits the role of the attendee selected "
"in the list above.");
- QLabel *attendeeRoleLabel = new QLabel( parent );
- QWhatsThis::add( attendeeRoleLabel, whatsThis );
+ TQLabel *attendeeRoleLabel = new TQLabel( parent );
+ TQWhatsThis::add( attendeeRoleLabel, whatsThis );
attendeeRoleLabel->setText( i18n("Ro&le:") );
topLayout->addWidget( attendeeRoleLabel, 1, 0 );
- mRoleCombo = new QComboBox( false, parent );
- QWhatsThis::add( mRoleCombo, whatsThis );
+ mRoleCombo = new TQComboBox( false, parent );
+ TQWhatsThis::add( mRoleCombo, whatsThis );
mRoleCombo->insertStringList( Attendee::roleList() );
attendeeRoleLabel->setBuddy( mRoleCombo );
- connect( mRoleCombo, SIGNAL( activated( int ) ),
- SLOT( updateAttendee() ) );
+ connect( mRoleCombo, TQT_SIGNAL( activated( int ) ),
+ TQT_SLOT( updateAttendee() ) );
topLayout->addWidget( mRoleCombo, 1, 1 );
- mDelegateLabel = new QLabel( parent );
+ mDelegateLabel = new TQLabel( parent );
topLayout->addWidget( mDelegateLabel, 1, 2 );
whatsThis = i18n("Edits the current attendance status of the attendee "
"selected in the list above.");
- QLabel *statusLabel = new QLabel( parent );
- QWhatsThis::add( statusLabel, whatsThis );
+ TQLabel *statusLabel = new TQLabel( parent );
+ TQWhatsThis::add( statusLabel, whatsThis );
statusLabel->setText( i18n("Stat&us:") );
topLayout->addWidget( statusLabel, 2, 0 );
- mStatusCombo = new QComboBox( false, parent );
- QWhatsThis::add( mStatusCombo, whatsThis );
+ mStatusCombo = new TQComboBox( false, parent );
+ TQWhatsThis::add( mStatusCombo, whatsThis );
// mStatusCombo->insertStringList( Attendee::statusList() );
mStatusCombo->insertItem( SmallIcon( "help" ), Attendee::statusName( Attendee::NeedsAction ) );
mStatusCombo->insertItem( KOGlobals::self()->smallIcon( "ok" ), Attendee::statusName( Attendee::Accepted ) );
@@ -140,26 +140,26 @@ void KOAttendeeEditor::initEditWidgets(QWidget * parent, QBoxLayout * layout)
mStatusCombo->insertItem( KOGlobals::self()->smallIcon( "help" ), Attendee::statusName( Attendee::InProcess ) );
statusLabel->setBuddy( mStatusCombo );
- connect( mStatusCombo, SIGNAL( activated( int ) ),
- SLOT( updateAttendee() ) );
+ connect( mStatusCombo, TQT_SIGNAL( activated( int ) ),
+ TQT_SLOT( updateAttendee() ) );
topLayout->addWidget( mStatusCombo, 2, 1 );
topLayout->setColStretch( 2, 1 );
- mRsvpButton = new QCheckBox( parent );
- QWhatsThis::add( mRsvpButton,
+ mRsvpButton = new TQCheckBox( parent );
+ TQWhatsThis::add( mRsvpButton,
i18n("Edits whether to send an email to the attendee "
"selected in the list above to request "
"a response concerning attendance.") );
mRsvpButton->setText( i18n("Re&quest response") );
- connect( mRsvpButton, SIGNAL( clicked() ), SLOT( updateAttendee() ) );
+ connect( mRsvpButton, TQT_SIGNAL( clicked() ), TQT_SLOT( updateAttendee() ) );
topLayout->addWidget( mRsvpButton, 2, 2 );
- QWidget *buttonBox = new QWidget( parent );
- QVBoxLayout *buttonLayout = new QVBoxLayout( buttonBox );
+ TQWidget *buttonBox = new TQWidget( parent );
+ TQVBoxLayout *buttonLayout = new TQVBoxLayout( buttonBox );
- mAddButton = new QPushButton( i18n("&New"), buttonBox );
- QWhatsThis::add( mAddButton,
+ mAddButton = new TQPushButton( i18n("&New"), buttonBox );
+ TQWhatsThis::add( mAddButton,
i18n("Adds a new attendee to the list. Once the "
"attendee is added, you will be able to "
"edit the attendee's name, role, attendance "
@@ -168,21 +168,21 @@ void KOAttendeeEditor::initEditWidgets(QWidget * parent, QBoxLayout * layout)
"from your addressbook, click the 'Select Addressee' "
"button instead.") );
buttonLayout->addWidget( mAddButton );
- connect( mAddButton, SIGNAL( clicked() ), SLOT( addNewAttendee() ) );
+ connect( mAddButton, TQT_SIGNAL( clicked() ), TQT_SLOT( addNewAttendee() ) );
- mRemoveButton = new QPushButton( i18n("&Remove"), buttonBox );
- QWhatsThis::add( mRemoveButton,
+ mRemoveButton = new TQPushButton( i18n("&Remove"), buttonBox );
+ TQWhatsThis::add( mRemoveButton,
i18n("Removes the attendee selected in "
"the list above.") );
buttonLayout->addWidget( mRemoveButton );
- mAddressBookButton = new QPushButton( i18n("Select Addressee..."),
+ mAddressBookButton = new TQPushButton( i18n("Select Addressee..."),
buttonBox );
- QWhatsThis::add( mAddressBookButton,
+ TQWhatsThis::add( mAddressBookButton,
i18n("Opens your address book, allowing you to select "
"new attendees from it.") );
buttonLayout->addWidget( mAddressBookButton );
- connect( mAddressBookButton, SIGNAL( clicked() ), SLOT( openAddressBook() ) );
+ connect( mAddressBookButton, TQT_SIGNAL( clicked() ), TQT_SLOT( openAddressBook() ) );
topLayout->addMultiCellWidget( buttonBox, 0, 3, 3, 3 );
@@ -249,9 +249,9 @@ void KOAttendeeEditor::fillOrganizerCombo()
Q_ASSERT( mOrganizerCombo );
// Get all emails from KOPrefs (coming from various places),
// and insert them - removing duplicates
- const QStringList lst = KOPrefs::instance()->fullEmails();
- QStringList uniqueList;
- for( QStringList::ConstIterator it = lst.begin(); it != lst.end(); ++it ) {
+ const TQStringList lst = KOPrefs::instance()->fullEmails();
+ TQStringList uniqueList;
+ for( TQStringList::ConstIterator it = lst.begin(); it != lst.end(); ++it ) {
if ( uniqueList.find( *it ) == uniqueList.end() )
uniqueList << *it;
}
@@ -268,7 +268,7 @@ void KOAttendeeEditor::addNewAttendee()
// We don't want the hint again
mNameEdit->setClickMessage( "" );
mNameEdit->setFocus();
- QTimer::singleShot( 0, mNameEdit, SLOT( selectAll() ) );
+ TQTimer::singleShot( 0, mNameEdit, TQT_SLOT( selectAll() ) );
}
void KOAttendeeEditor::readEvent(KCal::Incidence * incidence)
@@ -277,13 +277,13 @@ void KOAttendeeEditor::readEvent(KCal::Incidence * incidence)
mnewAttendees.clear();
if ( KOPrefs::instance()->thatIsMe( incidence->organizer().email() ) ) {
if ( !mOrganizerCombo ) {
- mOrganizerCombo = new QComboBox( mOrganizerHBox );
+ mOrganizerCombo = new TQComboBox( mOrganizerHBox );
fillOrganizerCombo();
}
mOrganizerLabel->setText( i18n( "Identity as organizer:" ) );
int found = -1;
- QString fullOrganizer = incidence->organizer().fullName();
+ TQString fullOrganizer = incidence->organizer().fullName();
for ( int i = 0 ; i < mOrganizerCombo->count(); ++i ) {
if ( mOrganizerCombo->text( i ) == fullOrganizer ) {
found = i;
@@ -330,12 +330,12 @@ void KOAttendeeEditor::setEnableAttendeeInput(bool enabled)
void KOAttendeeEditor::clearAttendeeInput()
{
mNameEdit->setText("");
- mUid = QString::null;
+ mUid = TQString::null;
mRoleCombo->setCurrentItem(0);
mStatusCombo->setCurrentItem(0);
mRsvpButton->setChecked(true);
setEnableAttendeeInput( false );
- mDelegateLabel->setText( QString() );
+ mDelegateLabel->setText( TQString() );
}
void KOAttendeeEditor::updateAttendee()
@@ -344,8 +344,8 @@ void KOAttendeeEditor::updateAttendee()
if ( !a || mDisableItemUpdate )
return;
- QString name;
- QString email;
+ TQString name;
+ TQString email;
KPIM::getNameAndMail(mNameEdit->text(), name, email);
bool iAmTheOrganizer = mOrganizerCombo &&
@@ -380,7 +380,7 @@ void KOAttendeeEditor::fillAttendeeInput( KCal::Attendee *a )
{
mDisableItemUpdate = true;
- QString name = a->name();
+ TQString name = a->name();
if (!a->email().isEmpty()) {
name = KPIM::quoteNameIfNecessary( name );
name += " <" + a->email() + ">";
@@ -444,14 +444,14 @@ void KOAttendeeEditor::declineForMe()
changeStatusForMe( Attendee::Declined );
}
-bool KOAttendeeEditor::eventFilter(QObject *watched, QEvent *ev)
+bool KOAttendeeEditor::eventFilter(TQObject *watched, TQEvent *ev)
{
- if ( watched && watched == mNameEdit && ev->type() == QEvent::FocusIn &&
+ if ( watched && watched == mNameEdit && ev->type() == TQEvent::FocusIn &&
currentAttendee() == 0 ) {
addNewAttendee();
}
- return QWidget::eventFilter( watched, ev );
+ return TQWidget::eventFilter( watched, ev );
}
#include "koattendeeeditor.moc"
diff --git a/korganizer/koattendeeeditor.h b/korganizer/koattendeeeditor.h
index d7eb8cbdc..0641748f6 100644
--- a/korganizer/koattendeeeditor.h
+++ b/korganizer/koattendeeeditor.h
@@ -21,7 +21,7 @@
#ifndef KOATTENDEEEDITOR_H
#define KOATTENDEEEDITOR_H
-#include <qwidget.h>
+#include <tqwidget.h>
#include <libkcal/attendee.h>
class QBoxLayout;
@@ -50,7 +50,7 @@ class KOAttendeeEditor : public QWidget
{
Q_OBJECT
public:
- KOAttendeeEditor( QWidget *parent, const char *name = 0 );
+ KOAttendeeEditor( TQWidget *parent, const char *name = 0 );
virtual void insertAttendee( KCal::Attendee* attendee, bool fetchFB = true ) = 0;
@@ -68,8 +68,8 @@ class KOAttendeeEditor : public QWidget
void updateAttendeeSummary( int count );
protected:
- void initOrganizerWidgets( QWidget *parent, QBoxLayout *layout );
- void initEditWidgets( QWidget *parent, QBoxLayout *layout );
+ void initOrganizerWidgets( TQWidget *parent, TQBoxLayout *layout );
+ void initEditWidgets( TQWidget *parent, TQBoxLayout *layout );
/** Reads values from a KABC::Addressee and inserts a new Attendee
* item into the listview with those items. Used when adding attendees
@@ -85,7 +85,7 @@ class KOAttendeeEditor : public QWidget
virtual void changeStatusForMe( KCal::Attendee::PartStat status ) = 0;
- virtual bool eventFilter( QObject *, QEvent *);
+ virtual bool eventFilter( TQObject *, TQEvent *);
protected slots:
void addNewAttendee();
@@ -99,23 +99,23 @@ class KOAttendeeEditor : public QWidget
protected:
KPIM::AddresseeLineEdit *mNameEdit;
- QString mUid;
- QComboBox* mRoleCombo;
- QCheckBox* mRsvpButton;
- QComboBox* mStatusCombo;
+ TQString mUid;
+ TQComboBox* mRoleCombo;
+ TQCheckBox* mRsvpButton;
+ TQComboBox* mStatusCombo;
- QHBox* mOrganizerHBox;
- QComboBox *mOrganizerCombo; // either we organize it (combo shown)
- QLabel *mOrganizerLabel; // or someone else does (just a label is shown)
+ TQHBox* mOrganizerHBox;
+ TQComboBox *mOrganizerCombo; // either we organize it (combo shown)
+ TQLabel *mOrganizerLabel; // or someone else does (just a label is shown)
- QLabel* mDelegateLabel;
+ TQLabel* mDelegateLabel;
- QPushButton* mAddButton;
- QPushButton* mRemoveButton;
- QPushButton* mAddressBookButton;
+ TQPushButton* mAddButton;
+ TQPushButton* mRemoveButton;
+ TQPushButton* mAddressBookButton;
- QPtrList<KCal::Attendee> mdelAttendees;
- QPtrList<KCal::Attendee> mnewAttendees;
+ TQPtrList<KCal::Attendee> mdelAttendees;
+ TQPtrList<KCal::Attendee> mnewAttendees;
private:
bool mDisableItemUpdate;
diff --git a/korganizer/kocore.cpp b/korganizer/kocore.cpp
index 6aca769b5..b9d404e70 100644
--- a/korganizer/kocore.cpp
+++ b/korganizer/kocore.cpp
@@ -39,7 +39,7 @@
#include <kstandarddirs.h>
#include <klocale.h>
-#include <qwidget.h>
+#include <tqwidget.h>
KOCore *KOCore::mSelf = 0;
@@ -62,12 +62,12 @@ KOCore::~KOCore()
mSelf = 0;
}
-KTrader::OfferList KOCore::availablePlugins( const QString &type, int version )
+KTrader::OfferList KOCore::availablePlugins( const TQString &type, int version )
{
- QString constraint;
+ TQString constraint;
if ( version >= 0 ) {
- constraint = QString("[X-KDE-PluginInterfaceVersion] == %1")
- .arg( QString::number( version ) );
+ constraint = TQString("[X-KDE-PluginInterfaceVersion] == %1")
+ .arg( TQString::number( version ) );
}
return KTrader::self()->query( type, constraint );
@@ -124,7 +124,7 @@ KOrg::Plugin *KOCore::loadPlugin( KService::Ptr service )
return pluginFactory->create();
}
-KOrg::Plugin *KOCore::loadPlugin( const QString &name )
+KOrg::Plugin *KOCore::loadPlugin( const TQString &name )
{
KTrader::OfferList list = availablePlugins();
KTrader::OfferList::ConstIterator it;
@@ -158,7 +158,7 @@ KOrg::CalendarDecoration *KOCore::loadCalendarDecoration(KService::Ptr service)
return pluginFactory->create();
}
-KOrg::CalendarDecoration *KOCore::loadCalendarDecoration( const QString &name )
+KOrg::CalendarDecoration *KOCore::loadCalendarDecoration( const TQString &name )
{
KTrader::OfferList list = availableCalendarDecorations();
KTrader::OfferList::ConstIterator it;
@@ -224,27 +224,27 @@ KOrg::PrintPlugin *KOCore::loadPrintPlugin( KService::Ptr service )
return pluginFactory->create();
}
-void KOCore::addXMLGUIClient( QWidget *wdg, KXMLGUIClient *guiclient )
+void KOCore::addXMLGUIClient( TQWidget *wdg, KXMLGUIClient *guiclient )
{
mXMLGUIClients.insert( wdg, guiclient );
}
-void KOCore::removeXMLGUIClient( QWidget *wdg )
+void KOCore::removeXMLGUIClient( TQWidget *wdg )
{
mXMLGUIClients.remove( wdg );
}
-KXMLGUIClient* KOCore::xmlguiClient( QWidget *wdg ) const
+KXMLGUIClient* KOCore::xmlguiClient( TQWidget *wdg ) const
{
- QWidget *topLevel = wdg->topLevelWidget();
- QMap<QWidget*, KXMLGUIClient*>::ConstIterator it = mXMLGUIClients.find( topLevel );
+ TQWidget *topLevel = wdg->topLevelWidget();
+ TQMap<TQWidget*, KXMLGUIClient*>::ConstIterator it = mXMLGUIClients.find( topLevel );
if ( it != mXMLGUIClients.end() )
return it.data();
return 0;
}
-KOrg::Part *KOCore::loadPart( const QString &name, KOrg::MainWindow *parent )
+KOrg::Part *KOCore::loadPart( const TQString &name, KOrg::MainWindow *parent )
{
KTrader::OfferList list = availableParts();
KTrader::OfferList::ConstIterator it;
@@ -256,7 +256,7 @@ KOrg::Part *KOCore::loadPart( const QString &name, KOrg::MainWindow *parent )
return 0;
}
-KOrg::PrintPlugin *KOCore::loadPrintPlugin( const QString &name )
+KOrg::PrintPlugin *KOCore::loadPrintPlugin( const TQString &name )
{
KTrader::OfferList list = availablePrintPlugins();
KTrader::OfferList::ConstIterator it;
@@ -271,14 +271,14 @@ KOrg::PrintPlugin *KOCore::loadPrintPlugin( const QString &name )
KOrg::CalendarDecoration::List KOCore::calendarDecorations()
{
if ( !mCalendarDecorationsLoaded ) {
- QStringList selectedPlugins = KOPrefs::instance()->mSelectedPlugins;
+ TQStringList selectedPlugins = KOPrefs::instance()->mSelectedPlugins;
mCalendarDecorations.clear();
KTrader::OfferList plugins = availableCalendarDecorations();
KTrader::OfferList::ConstIterator it;
for( it = plugins.begin(); it != plugins.end(); ++it ) {
if ( (*it)->hasServiceType("Calendar/Decoration") ) {
- QString name = (*it)->desktopEntryName();
+ TQString name = (*it)->desktopEntryName();
if ( selectedPlugins.find( name ) != selectedPlugins.end() ) {
KOrg::CalendarDecoration *d = loadCalendarDecoration(*it);
mCalendarDecorations.append( d );
@@ -295,7 +295,7 @@ KOrg::Part::List KOCore::loadParts( KOrg::MainWindow *parent )
{
KOrg::Part::List parts;
- QStringList selectedPlugins = KOPrefs::instance()->mSelectedPlugins;
+ TQStringList selectedPlugins = KOPrefs::instance()->mSelectedPlugins;
KTrader::OfferList plugins = availableParts();
KTrader::OfferList::ConstIterator it;
@@ -321,7 +321,7 @@ KOrg::PrintPlugin::List KOCore::loadPrintPlugins()
{
KOrg::PrintPlugin::List loadedPlugins;
- QStringList selectedPlugins = KOPrefs::instance()->mSelectedPlugins;
+ TQStringList selectedPlugins = KOPrefs::instance()->mSelectedPlugins;
KTrader::OfferList plugins = availablePrintPlugins();
KTrader::OfferList::ConstIterator it;
diff --git a/korganizer/kocore.h b/korganizer/kocore.h
index 0cfa7011e..f28382635 100644
--- a/korganizer/kocore.h
+++ b/korganizer/kocore.h
@@ -47,24 +47,24 @@ class KDE_EXPORT KOCore
KTrader::OfferList availablePrintPlugins();
KOrg::Plugin *loadPlugin( KService::Ptr service );
- KOrg::Plugin *loadPlugin( const QString & );
+ KOrg::Plugin *loadPlugin( const TQString & );
KOrg::CalendarDecoration *loadCalendarDecoration( KService::Ptr service );
- KOrg::CalendarDecoration *loadCalendarDecoration( const QString & );
+ KOrg::CalendarDecoration *loadCalendarDecoration( const TQString & );
KOrg::Part *loadPart( KService::Ptr, KOrg::MainWindow *parent );
- KOrg::Part *loadPart( const QString &, KOrg::MainWindow *parent );
+ KOrg::Part *loadPart( const TQString &, KOrg::MainWindow *parent );
KOrg::PrintPlugin *loadPrintPlugin( KService::Ptr service );
- KOrg::PrintPlugin *loadPrintPlugin( const QString & );
+ KOrg::PrintPlugin *loadPrintPlugin( const TQString & );
KOrg::CalendarDecoration::List calendarDecorations();
KOrg::PrintPlugin::List loadPrintPlugins();
KOrg::Part::List loadParts( KOrg::MainWindow *parent );
- void addXMLGUIClient( QWidget*, KXMLGUIClient *guiclient );
- void removeXMLGUIClient( QWidget* );
- KXMLGUIClient *xmlguiClient( QWidget* ) const;
+ void addXMLGUIClient( TQWidget*, KXMLGUIClient *guiclient );
+ void removeXMLGUIClient( TQWidget* );
+ KXMLGUIClient *xmlguiClient( TQWidget* ) const;
/**
Unload the parts in &p parts for this main window. Clears
@@ -87,7 +87,7 @@ class KDE_EXPORT KOCore
protected:
KOCore();
- KTrader::OfferList availablePlugins( const QString &type,
+ KTrader::OfferList availablePlugins( const TQString &type,
int pluginInterfaceVersion = -1 );
private:
@@ -96,7 +96,7 @@ class KDE_EXPORT KOCore
KOrg::CalendarDecoration::List mCalendarDecorations;
bool mCalendarDecorationsLoaded;
- QMap<QWidget*, KXMLGUIClient*> mXMLGUIClients;
+ TQMap<TQWidget*, KXMLGUIClient*> mXMLGUIClients;
KPIM::IdentityManager *mIdentityManager;
};
diff --git a/korganizer/kocorehelper.cpp b/korganizer/kocorehelper.cpp
index 40f557263..374c7107b 100644
--- a/korganizer/kocorehelper.cpp
+++ b/korganizer/kocorehelper.cpp
@@ -26,11 +26,11 @@
#include "koglobals.h"
-QColor KOCoreHelper::categoryColor( const QStringList &categories )
+TQColor KOCoreHelper::categoryColor( const TQStringList &categories )
{
// FIXME: Correctly treat events with multiple categories
- QString cat = categories.first();
- QColor bgColor;
+ TQString cat = categories.first();
+ TQColor bgColor;
if (cat.isEmpty())
bgColor = defaultEventColor();
else
@@ -38,7 +38,7 @@ QColor KOCoreHelper::categoryColor( const QStringList &categories )
return bgColor;
}
-QString KOCoreHelper::holidayString( const QDate &dt )
+TQString KOCoreHelper::holidayString( const TQDate &dt )
{
return KOGlobals::self()->holiday( dt ).join( i18n("delimiter for joining holiday names", ", " ) );
}
diff --git a/korganizer/kocorehelper.h b/korganizer/kocorehelper.h
index 62a7d8a49..609278563 100644
--- a/korganizer/kocorehelper.h
+++ b/korganizer/kocorehelper.h
@@ -40,14 +40,14 @@ class KOCoreHelper : public KOrg::CoreHelper
KOCoreHelper() {}
virtual ~KOCoreHelper() {}
- virtual QColor defaultEventColor() { return KOPrefs::instance()->mEventColor; }
- virtual QColor textColor( const QColor &bgColor ) { return getTextColor( bgColor ); }
- virtual QColor categoryColor( const QStringList &cats );
- virtual QString holidayString( const QDate &dt );
- virtual QTime dayStart() { return KOPrefs::instance()->mDayBegins.time(); }
+ virtual TQColor defaultEventColor() { return KOPrefs::instance()->mEventColor; }
+ virtual TQColor textColor( const TQColor &bgColor ) { return getTextColor( bgColor ); }
+ virtual TQColor categoryColor( const TQStringList &cats );
+ virtual TQString holidayString( const TQDate &dt );
+ virtual TQTime dayStart() { return KOPrefs::instance()->mDayBegins.time(); }
virtual const KCalendarSystem *calendarSystem() { return KOGlobals::self()->calendarSystem(); }
virtual KOrg::PrintPlugin::List loadPrintPlugins() { return KOCore::self()->loadPrintPlugins(); }
- virtual bool isWorkingDay( const QDate &dt ) { return KOGlobals::self()->isWorkDay( dt ); }
+ virtual bool isWorkingDay( const TQDate &dt ) { return KOGlobals::self()->isWorkDay( dt ); }
};
#endif
diff --git a/korganizer/kocounterdialog.cpp b/korganizer/kocounterdialog.cpp
index f3c0a2e4f..bf3f736ff 100644
--- a/korganizer/kocounterdialog.cpp
+++ b/korganizer/kocounterdialog.cpp
@@ -32,15 +32,15 @@
#include "kocounterdialog.h"
#include "kocounterdialog.moc"
-KOCounterDialog::KOCounterDialog( QWidget *parent, const char *name )
+KOCounterDialog::KOCounterDialog( TQWidget *parent, const char *name )
: KDialogBase( parent, name, false, i18n("Counter-Event Viewer"),
User1 | User2, User1, false, i18n("Decline"), i18n("Accept") )
{
mEventViewer = new KOEventViewer( this );
setMainWidget( mEventViewer );
- connect( this, SIGNAL( user1Clicked() ), SLOT( slotCancel() ) );
- connect( this, SIGNAL( user2Clicked() ), SLOT( slotOk( ) ) );
+ connect( this, TQT_SIGNAL( user1Clicked() ), TQT_SLOT( slotCancel() ) );
+ connect( this, TQT_SIGNAL( user2Clicked() ), TQT_SLOT( slotOk( ) ) );
// FIXME: Set a sensible size (based on the content?).
setMinimumSize( 300, 200 );
@@ -61,7 +61,7 @@ void KOCounterDialog::addIncidence( Incidence *incidence )
mEventViewer->appendIncidence( incidence );
}
-void KOCounterDialog::addText( const QString &text )
+void KOCounterDialog::addText( const TQString &text )
{
mEventViewer->addText( text );
}
diff --git a/korganizer/kocounterdialog.h b/korganizer/kocounterdialog.h
index 9bc5d28d3..cedb9dabb 100644
--- a/korganizer/kocounterdialog.h
+++ b/korganizer/kocounterdialog.h
@@ -41,12 +41,12 @@ class KOCounterDialog : public KDialogBase
{
Q_OBJECT
public:
- KOCounterDialog(QWidget *parent = 0, const char *name = 0 );
+ KOCounterDialog(TQWidget *parent = 0, const char *name = 0 );
virtual ~KOCounterDialog();
void setIncidence( Incidence *incidence );
void addIncidence( Incidence *incidence );
- void addText( const QString &text );
+ void addText( const TQString &text );
private:
KOEventViewer *mEventViewer;
diff --git a/korganizer/kodaymatrix.cpp b/korganizer/kodaymatrix.cpp
index b749b2227..ff82ada9c 100644
--- a/korganizer/kodaymatrix.cpp
+++ b/korganizer/kodaymatrix.cpp
@@ -26,9 +26,9 @@
without including the source code for Qt in the source distribution.
*/
-#include <qevent.h>
-#include <qpainter.h>
-#include <qptrlist.h>
+#include <tqevent.h>
+#include <tqpainter.h>
+#include <tqptrlist.h>
#include <kglobal.h>
#include <kdebug.h>
@@ -51,7 +51,7 @@
#include "kodaymatrix.moc"
#ifndef NODND
-#include <qcursor.h>
+#include <tqcursor.h>
#include <kpopupmenu.h>
#include <X11/Xlib.h>
#undef FocusIn
@@ -64,29 +64,29 @@
// D Y N A M I C T I P
// ============================================================================
-DynamicTip::DynamicTip( QWidget * parent )
- : QToolTip( parent )
+DynamicTip::DynamicTip( TQWidget * parent )
+ : TQToolTip( parent )
{
mMatrix = static_cast<KODayMatrix *>( parent );
}
-void DynamicTip::maybeTip( const QPoint &pos )
+void DynamicTip::maybeTip( const TQPoint &pos )
{
//calculate which cell of the matrix the mouse is in
- QRect sz = mMatrix->frameRect();
+ TQRect sz = mMatrix->frameRect();
int dheight = sz.height() * 7 / 42;
int dwidth = sz.width() / 7;
int row = pos.y() / dheight;
int col = pos.x() / dwidth;
- QRect rct( col * dwidth, row * dheight, dwidth, dheight );
+ TQRect rct( col * dwidth, row * dheight, dwidth, dheight );
// kdDebug(5850) << "DynamicTip::maybeTip matrix cell index [" <<
// col << "][" << row << "] => " <<(col+row*7) << endl;
//show holiday names only
- QString str = mMatrix->getHolidayLabel( col + row * 7 );
+ TQString str = mMatrix->getHolidayLabel( col + row * 7 );
if ( str.isEmpty() ) return;
tip( rct, str );
}
@@ -99,8 +99,8 @@ void DynamicTip::maybeTip( const QPoint &pos )
const int KODayMatrix::NOSELECTION = -1000;
const int KODayMatrix::NUMDAYS = 42;
-KODayMatrix::KODayMatrix( QWidget *parent, const char *name )
- : QFrame( parent, name ), mCalendar( 0 ), mStartDate(), mPendingChanges( false )
+KODayMatrix::KODayMatrix( TQWidget *parent, const char *name )
+ : TQFrame( parent, name ), mCalendar( 0 ), mStartDate(), mPendingChanges( false )
{
// initialize dynamic arrays
mDays = new QDate[ NUMDAYS ];
@@ -125,9 +125,9 @@ void KODayMatrix::setCalendar( Calendar *cal )
mCalendar->registerObserver( this );
CalendarResources *calres = dynamic_cast<CalendarResources*>( cal );
if ( calres ) {
- connect( calres, SIGNAL(signalResourceAdded(ResourceCalendar *)), SLOT(resourcesChanged()) );
- connect( calres, SIGNAL(signalResourceModified( ResourceCalendar *)), SLOT(resourcesChanged()) );
- connect( calres, SIGNAL(signalResourceDeleted(ResourceCalendar *)), SLOT(resourcesChanged()) );
+ connect( calres, TQT_SIGNAL(signalResourceAdded(ResourceCalendar *)), TQT_SLOT(resourcesChanged()) );
+ connect( calres, TQT_SIGNAL(signalResourceModified( ResourceCalendar *)), TQT_SLOT(resourcesChanged()) );
+ connect( calres, TQT_SIGNAL(signalResourceDeleted(ResourceCalendar *)), TQT_SLOT(resourcesChanged()) );
}
setAcceptDrops( mCalendar );
@@ -135,9 +135,9 @@ void KODayMatrix::setCalendar( Calendar *cal )
updateEvents();
}
-QColor KODayMatrix::getShadedColor( const QColor &color )
+TQColor KODayMatrix::getShadedColor( const TQColor &color )
{
- QColor shaded;
+ TQColor shaded;
int h = 0;
int s = 0;
int v = 0;
@@ -192,7 +192,7 @@ void KODayMatrix::addSelectedDaysTo( DateList &selDays )
}
}
-void KODayMatrix::setSelectedDaysFrom( const QDate &start, const QDate &end )
+void KODayMatrix::setSelectedDaysFrom( const TQDate &start, const TQDate &end )
{
if ( mStartDate.isValid() ) {
mSelStart = mStartDate.daysTo( start );
@@ -211,12 +211,12 @@ void KODayMatrix::recalculateToday()
mToday = -1;
for ( int i = 0; i < NUMDAYS; i++ ) {
mDays[ i ] = mStartDate.addDays( i );
- mDayLabels[ i ] = QString::number( KOGlobals::self()->calendarSystem()->day( mDays[i] ));
+ mDayLabels[ i ] = TQString::number( KOGlobals::self()->calendarSystem()->day( mDays[i] ));
// if today is in the currently displayed month, hilight today
- if ( mDays[ i ].year() == QDate::currentDate().year() &&
- mDays[ i ].month() == QDate::currentDate().month() &&
- mDays[ i ].day() == QDate::currentDate().day() ) {
+ if ( mDays[ i ].year() == TQDate::currentDate().year() &&
+ mDays[ i ].month() == TQDate::currentDate().month() &&
+ mDays[ i ].day() == TQDate::currentDate().day() ) {
mToday = i;
}
}
@@ -228,7 +228,7 @@ void KODayMatrix::recalculateToday()
updateView( mStartDate );
}
-void KODayMatrix::updateView( const QDate &actdate )
+void KODayMatrix::updateView( const TQDate &actdate )
{
kdDebug(5850) << "KODayMatrix::updateView() " << actdate << ", day start="<<mStartDate<< endl;
if ( !actdate.isValid() ) return;
@@ -274,8 +274,8 @@ void KODayMatrix::updateView( const QDate &actdate )
updateEvents();
for( int i = 0; i < NUMDAYS; i++ ) {
//if it is a holy day then draw it red. Sundays are consider holidays, too
- QStringList holidays = KOGlobals::self()->holiday( mDays[ i ] );
- QString holiStr = QString::null;
+ TQStringList holidays = KOGlobals::self()->holiday( mDays[ i ] );
+ TQString holiStr = TQString::null;
if ( ( KOGlobals::self()->calendarSystem()->dayOfWeek( mDays[ i ] ) ==
KOGlobals::self()->calendarSystem()->weekDayOfPray() ) ||
@@ -313,7 +313,7 @@ void KODayMatrix::updateEvents()
mPendingChanges = false;
}
-const QDate& KODayMatrix::getDate( int offset )
+const TQDate& KODayMatrix::getDate( int offset )
{
if ( offset < 0 || offset > NUMDAYS - 1 ) {
kdDebug(5850) << "Wrong offset (" << offset << ") in KODayMatrix::getDate(int)" << endl;
@@ -322,7 +322,7 @@ const QDate& KODayMatrix::getDate( int offset )
return mDays[ offset ];
}
-QString KODayMatrix::getHolidayLabel( int offset )
+TQString KODayMatrix::getHolidayLabel( int offset )
{
if ( offset < 0 || offset > NUMDAYS - 1 ) {
kdDebug(5850) << "Wrong offset (" << offset << ") in KODayMatrix::getHolidayLabel(int)" << endl;
@@ -363,14 +363,14 @@ void KODayMatrix::resourcesChanged()
// M O U S E E V E N T H A N D L I N G
// ----------------------------------------------------------------------------
-void KODayMatrix::mousePressEvent( QMouseEvent *e )
+void KODayMatrix::mousePressEvent( TQMouseEvent *e )
{
mSelStart = getDayIndexFrom(e->x(), e->y());
if (mSelStart > NUMDAYS-1) mSelStart=NUMDAYS-1;
mSelInit = mSelStart;
}
-void KODayMatrix::mouseReleaseEvent( QMouseEvent *e )
+void KODayMatrix::mouseReleaseEvent( TQMouseEvent *e )
{
int tmp = getDayIndexFrom(e->x(), e->y());
if (tmp > NUMDAYS-1) tmp=NUMDAYS-1;
@@ -399,7 +399,7 @@ void KODayMatrix::mouseReleaseEvent( QMouseEvent *e )
emit selected((const DateList)daylist);
}
-void KODayMatrix::mouseMoveEvent( QMouseEvent *e )
+void KODayMatrix::mouseMoveEvent( TQMouseEvent *e )
{
int tmp = getDayIndexFrom(e->x(), e->y());
if (tmp > NUMDAYS-1) tmp=NUMDAYS-1;
@@ -434,7 +434,7 @@ enum {
DRAG_CANCEL = 2
};
-void KODayMatrix::dragEnterEvent( QDragEnterEvent *e )
+void KODayMatrix::dragEnterEvent( TQDragEnterEvent *e )
{
#ifndef KORG_NODND
if ( !ICalDrag::canDecode( e ) && !VCalDrag::canDecode( e ) ) {
@@ -449,7 +449,7 @@ void KODayMatrix::dragEnterEvent( QDragEnterEvent *e )
#endif
}
-void KODayMatrix::dragMoveEvent( QDragMoveEvent *e )
+void KODayMatrix::dragMoveEvent( TQDragMoveEvent *e )
{
#ifndef KORG_NODND
if ( !ICalDrag::canDecode( e ) && !VCalDrag::canDecode( e ) ) {
@@ -461,7 +461,7 @@ void KODayMatrix::dragMoveEvent( QDragMoveEvent *e )
#endif
}
-void KODayMatrix::dragLeaveEvent( QDragLeaveEvent * /*dl*/ )
+void KODayMatrix::dragLeaveEvent( TQDragLeaveEvent * /*dl*/ )
{
#ifndef KORG_NODND
// setPalette(oldPalette);
@@ -469,7 +469,7 @@ void KODayMatrix::dragLeaveEvent( QDragLeaveEvent * /*dl*/ )
#endif
}
-void KODayMatrix::dropEvent( QDropEvent *e )
+void KODayMatrix::dropEvent( TQDropEvent *e )
{
#ifndef KORG_NODND
kdDebug(5850) << "KODayMatrix::dropEvent(e) begin" << endl;
@@ -518,7 +518,7 @@ void KODayMatrix::dropEvent( QDropEvent *e )
}
menu->insertSeparator();
menu->insertItem( KOGlobals::self()->smallIcon("cancel"), i18n("Cancel"), DRAG_CANCEL, 3 );
- action = menu->exec( QCursor::pos(), 0 );
+ action = menu->exec( TQCursor::pos(), 0 );
}
if ( action == DRAG_COPY || action == DRAG_MOVE ) {
@@ -542,20 +542,20 @@ void KODayMatrix::dropEvent( QDropEvent *e )
// P A I N T E V E N T H A N D L I N G
// ----------------------------------------------------------------------------
-void KODayMatrix::paintEvent( QPaintEvent * )
+void KODayMatrix::paintEvent( TQPaintEvent * )
{
// kdDebug(5850) << "KODayMatrix::paintEvent() BEGIN" << endl;
- QPainter p;
- QRect sz = frameRect();
- QPixmap pm( sz.size() );
+ TQPainter p;
+ TQRect sz = frameRect();
+ TQPixmap pm( sz.size() );
int dheight = mDaySize.height();
int dwidth = mDaySize.width();
int row,col;
int selw, selh;
bool isRTL = KOGlobals::self()->reverseLayout();
- QColorGroup cg = palette().active();
+ TQColorGroup cg = palette().active();
p.begin( &pm, this );
pm.fill( cg.base() );
@@ -573,7 +573,7 @@ void KODayMatrix::paintEvent( QPaintEvent * )
// fix larger selections starting in the previous month
if ( row < 0 && mSelEnd > 0 ) row = 0;
col = mSelStart -row*7;
- QColor selcol = KOPrefs::instance()->mHighlightColor;
+ TQColor selcol = KOPrefs::instance()->mHighlightColor;
if ( row < 6 && row >= 0 ) {
if (row == mSelEnd/7) {
@@ -601,11 +601,11 @@ void KODayMatrix::paintEvent( QPaintEvent * )
}
// iterate over all days in the matrix and draw the day label in appropriate colors
- QColor textColor = cg.text();
- QColor textColorShaded = getShadedColor( textColor );
- QColor actcol = textColorShaded;
+ TQColor textColor = cg.text();
+ TQColor textColorShaded = getShadedColor( textColor );
+ TQColor actcol = textColorShaded;
p.setPen(actcol);
- QPen tmppen;
+ TQPen tmppen;
for ( int i = 0; i < NUMDAYS; ++i ) {
row = i/7;
col = isRTL ? 6-(i-row*7) : i-row*7;
@@ -627,11 +627,11 @@ void KODayMatrix::paintEvent( QPaintEvent * )
bool holiday = ! KOGlobals::self()->isWorkDay( mDays[ i ] );
- QColor holidayColorShaded = getShadedColor( KOPrefs::instance()->mHolidayColor );
+ TQColor holidayColorShaded = getShadedColor( KOPrefs::instance()->mHolidayColor );
// if today then draw rectangle around day
if (mToday == i) {
tmppen = p.pen();
- QPen mTodayPen(p.pen());
+ TQPen mTodayPen(p.pen());
mTodayPen.setWidth(mTodayMarginWidth);
//draw red rectangle for holidays
@@ -644,7 +644,7 @@ void KODayMatrix::paintEvent( QPaintEvent * )
}
//draw gray rectangle for today if in selection
if (i >= mSelStart && i <= mSelEnd) {
- QColor grey("grey");
+ TQColor grey("grey");
mTodayPen.setColor(grey);
}
p.setPen(mTodayPen);
@@ -654,7 +654,7 @@ void KODayMatrix::paintEvent( QPaintEvent * )
// if any events are on that day then draw it using a bold font
if (mEvents[i] > 0) {
- QFont myFont = font();
+ TQFont myFont = font();
myFont.setBold(true);
p.setFont(myFont);
}
@@ -671,7 +671,7 @@ void KODayMatrix::paintEvent( QPaintEvent * )
// draw selected days with special color
// DO NOT specially highlight holidays in selection !
if (i >= mSelStart && i <= mSelEnd) {
- p.setPen( QColor( "white" ) );
+ p.setPen( TQColor( "white" ) );
}
p.drawText(col*dwidth, row*dheight, dwidth, dheight,
@@ -683,7 +683,7 @@ void KODayMatrix::paintEvent( QPaintEvent * )
}
// reset bold font to plain font
if (mEvents[i] > 0) {
- QFont myFont = font();
+ TQFont myFont = font();
myFont.setBold(false);
p.setFont(myFont);
}
@@ -696,9 +696,9 @@ void KODayMatrix::paintEvent( QPaintEvent * )
// R E SI Z E E V E N T H A N D L I N G
// ----------------------------------------------------------------------------
-void KODayMatrix::resizeEvent( QResizeEvent * )
+void KODayMatrix::resizeEvent( TQResizeEvent * )
{
- QRect sz = frameRect();
+ TQRect sz = frameRect();
mDaySize.setHeight( sz.height() * 7 / NUMDAYS );
mDaySize.setWidth( sz.width() / 7 );
}
diff --git a/korganizer/kodaymatrix.h b/korganizer/kodaymatrix.h
index a76e61874..60c2e3ced 100644
--- a/korganizer/kodaymatrix.h
+++ b/korganizer/kodaymatrix.h
@@ -29,10 +29,10 @@
#include <libkcal/incidencebase.h>
#include <libkcal/calendar.h>
-#include <qframe.h>
-#include <qcolor.h>
-#include <qtooltip.h>
-#include <qmap.h>
+#include <tqframe.h>
+#include <tqcolor.h>
+#include <tqtooltip.h>
+#include <tqmap.h>
class QDragEnterEvent;
class QDragMoveEvent;
@@ -61,7 +61,7 @@ class DynamicTip : public QToolTip
*
* @param parent the parent KODayMatrix control.
*/
- DynamicTip( QWidget *parent );
+ DynamicTip( TQWidget *parent );
protected:
/**
@@ -70,7 +70,7 @@ class DynamicTip : public QToolTip
*
* @param pos coordinates of the mouse.
*/
- void maybeTip( const QPoint &pos );
+ void maybeTip( const TQPoint &pos );
private:
/** the parent control this tooltip is designed for. */
@@ -102,7 +102,7 @@ class DynamicTip : public QToolTip
*
* @author Eitzenberger Thomas
*/
-class KODayMatrix: public QFrame, public KCal::Calendar::Observer
+class KODayMatrix: public TQFrame, public KCal::Calendar::Observer
{
Q_OBJECT
public:
@@ -112,7 +112,7 @@ class KODayMatrix: public QFrame, public KCal::Calendar::Observer
* Normally this should be a KDateNavigator
* @param name name of the widget
*/
- KODayMatrix( QWidget *parent, const char *name );
+ KODayMatrix( TQWidget *parent, const char *name );
/** destructor that deallocates all dynamically allocated private members.
*/
@@ -131,7 +131,7 @@ class KODayMatrix: public QFrame, public KCal::Calendar::Observer
* @param actdate recalculates the day matrix to show NUMDAYS starting from this
* date.
*/
- void updateView( const QDate &actdate );
+ void updateView( const TQDate &actdate );
/**
Update event states of dates. Depending of the preferences days with
@@ -139,15 +139,15 @@ class KODayMatrix: public QFrame, public KCal::Calendar::Observer
*/
void updateEvents();
- /** returns the QDate object associated with day indexed by the
+ /** returns the TQDate object associated with day indexed by the
* supplied offset.
*/
- const QDate& getDate( int offset );
+ const TQDate& getDate( int offset );
/** returns the official name of this holy day or 0 if there is no label
* for this day.
*/
- QString getHolidayLabel( int offset );
+ TQString getHolidayLabel( int offset );
/** adds all actual selected days from mSelStart to mSelEnd to the supplied
* DateList.
@@ -158,7 +158,7 @@ class KODayMatrix: public QFrame, public KCal::Calendar::Observer
* start and ending with end. Theview must be manually updated by calling
* repaint. (?)
*/
- void setSelectedDaysFrom( const QDate &start, const QDate &end );
+ void setSelectedDaysFrom( const TQDate &start, const TQDate &end );
/**
Clear all selections.
@@ -212,34 +212,34 @@ class KODayMatrix: public QFrame, public KCal::Calendar::Observer
/** emitted if the user has dropped an incidence (event or todo) inside the matrix
*
* @param incidence the dropped calendar incidence
- * @param dt QDate that has been selected
+ * @param dt TQDate that has been selected
*/
- void incidenceDropped( Incidence *incidence, const QDate &dt );
+ void incidenceDropped( Incidence *incidence, const TQDate &dt );
/** emitted if the user has dropped an event inside the matrix and chose to move it instead of copy
*
* @param oldincidence the new calendar incidence
- * @param dt QDate that has been selected
+ * @param dt TQDate that has been selected
*/
- void incidenceDroppedMove( Incidence *oldincidence, const QDate &dt );
+ void incidenceDroppedMove( Incidence *oldincidence, const TQDate &dt );
protected:
- void paintEvent( QPaintEvent *ev );
+ void paintEvent( TQPaintEvent *ev );
- void mousePressEvent( QMouseEvent *e );
+ void mousePressEvent( TQMouseEvent *e );
- void mouseReleaseEvent( QMouseEvent *e );
+ void mouseReleaseEvent( TQMouseEvent *e );
- void mouseMoveEvent( QMouseEvent *e );
+ void mouseMoveEvent( TQMouseEvent *e );
- void dragEnterEvent( QDragEnterEvent * );
+ void dragEnterEvent( TQDragEnterEvent * );
- void dragMoveEvent( QDragMoveEvent * );
+ void dragMoveEvent( TQDragMoveEvent * );
- void dragLeaveEvent( QDragLeaveEvent * );
+ void dragLeaveEvent( TQDragLeaveEvent * );
- void dropEvent( QDropEvent * );
+ void dropEvent( TQDropEvent * );
- void resizeEvent( QResizeEvent * );
+ void resizeEvent( TQResizeEvent * );
private:
/** returns the index of the day located at the matrix's widget (x,y) position.
@@ -254,7 +254,7 @@ class KODayMatrix: public QFrame, public KCal::Calendar::Observer
*
* @param color source based on which a shaded color should be calculated.
*/
- QColor getShadedColor( const QColor &color );
+ TQColor getShadedColor( const TQColor &color );
/** number of days to be displayed. For now there is no support for any other number then 42.
so change it at your own risk :o) */
@@ -264,14 +264,14 @@ class KODayMatrix: public QFrame, public KCal::Calendar::Observer
Calendar *mCalendar;
/** starting date of the matrix */
- QDate mStartDate;
+ TQDate mStartDate;
/** array of day labels to optimeize drawing performance. */
- QString *mDayLabels;
+ TQString *mDayLabels;
/** array of days displayed to reduce memory consumption by
- subsequently calling QDate::addDays(). */
- QDate *mDays;
+ subsequently calling TQDate::addDays(). */
+ TQDate *mDays;
/** array of storing the number of events on a given day.
* used for drawing a bold font if there is at least one event on that day.
@@ -279,7 +279,7 @@ class KODayMatrix: public QFrame, public KCal::Calendar::Observer
int *mEvents;
/** stores holiday names of the days shown in the matrix. */
- QMap<int,QString> mHolidays;
+ TQMap<int,TQString> mHolidays;
/** index of today or -1 if today is not visible in the matrix. */
int mToday;
@@ -307,7 +307,7 @@ class KODayMatrix: public QFrame, public KCal::Calendar::Observer
/** stores actual size of each day in the widget so that I don't need to ask this data
* on every repaint.
*/
- QRect mDaySize;
+ TQRect mDaySize;
/**
* Indicate pending calendar changes.
diff --git a/korganizer/kodialogmanager.cpp b/korganizer/kodialogmanager.cpp
index 908b74913..e17f03409 100644
--- a/korganizer/kodialogmanager.cpp
+++ b/korganizer/kodialogmanager.cpp
@@ -82,7 +82,7 @@ class KODialogManager::EditorDialogVisitor :
KODialogManager::KODialogManager( CalendarView *mainView ) :
- QObject(), mMainView( mainView )
+ TQObject(), mMainView( mainView )
{
mOptionsDialog = 0;
mSearchDialog = 0;
@@ -93,8 +93,8 @@ KODialogManager::KODialogManager( CalendarView *mainView ) :
// don't set any specific parent for the dialog, as its kept around and reused
// in different cases where it should have different parents
KWin::setMainWindow( mCategoryEditDialog, 0 );
- connect( mainView, SIGNAL( categoriesChanged() ),
- mCategoryEditDialog, SLOT( reload() ) );
+ connect( mainView, TQT_SIGNAL( categoriesChanged() ),
+ mCategoryEditDialog, TQT_SLOT( reload() ) );
KOGlobals::fitDialogToScreen( mCategoryEditDialog );
}
@@ -108,7 +108,7 @@ KODialogManager::~KODialogManager()
delete mFilterEditDialog;
}
-void KODialogManager::errorSaveIncidence( QWidget *parent, Incidence *incidence )
+void KODialogManager::errorSaveIncidence( TQWidget *parent, Incidence *incidence )
{
KMessageBox::sorry( parent, i18n("Unable to save %1 \"%2\".")
.arg( i18n( incidence->type() ) )
@@ -123,23 +123,23 @@ void KODialogManager::showOptionsDialog()
// mOptionsDialog = new KConfigureDialog( KConfigureDialog::Configurable );
// mOptionsDialog = new KConfigureDialog( mMainView );
connect( mOptionsDialog->dialog(),
- SIGNAL( configCommitted( const QCString & ) ),
- mMainView, SLOT( updateConfig() ) );
+ TQT_SIGNAL( configCommitted( const TQCString & ) ),
+ mMainView, TQT_SLOT( updateConfig() ) );
#else
mOptionsDialog = new KCMultiDialog( mMainView, "KorganizerPreferences" );
- connect( mOptionsDialog, SIGNAL( configCommitted( const QCString & ) ),
- mMainView, SLOT( updateConfig( const QCString& ) ) );
+ connect( mOptionsDialog, TQT_SIGNAL( configCommitted( const TQCString & ) ),
+ mMainView, TQT_SLOT( updateConfig( const TQCString& ) ) );
#if 0
- connect( mOptionsDialog, SIGNAL( applyClicked() ),
- mMainView, SLOT( updateConfig() ) );
- connect( mOptionsDialog, SIGNAL( okClicked() ),
- mMainView, SLOT( updateConfig() ) );
+ connect( mOptionsDialog, TQT_SIGNAL( applyClicked() ),
+ mMainView, TQT_SLOT( updateConfig() ) );
+ connect( mOptionsDialog, TQT_SIGNAL( okClicked() ),
+ mMainView, TQT_SLOT( updateConfig() ) );
// @TODO Find a way to do this with KCMultiDialog
- connect(mCategoryEditDialog,SIGNAL(categoryConfigChanged()),
- mOptionsDialog,SLOT(updateCategories()));
+ connect(mCategoryEditDialog,TQT_SIGNAL(categoryConfigChanged()),
+ mOptionsDialog,TQT_SLOT(updateCategories()));
#endif
- QStringList modules;
+ TQStringList modules;
modules.append( "korganizer_configmain.desktop" );
modules.append( "korganizer_configtime.desktop" );
@@ -153,7 +153,7 @@ void KODialogManager::showOptionsDialog()
modules.append( "korganizer_configdesignerfields.desktop" );
// add them all
- QStringList::iterator mit;
+ TQStringList::iterator mit;
for ( mit = modules.begin(); mit != modules.end(); ++mit )
mOptionsDialog->addModule( *mit );
#endif
@@ -172,13 +172,13 @@ void KODialogManager::showSearchDialog()
{
if (!mSearchDialog) {
mSearchDialog = new SearchDialog(mMainView->calendar(),mMainView);
- connect(mSearchDialog,SIGNAL(showIncidenceSignal(Incidence *)),
- mMainView,SLOT(showIncidence(Incidence *)));
- connect(mSearchDialog,SIGNAL(editIncidenceSignal(Incidence *)),
- mMainView,SLOT(editIncidence(Incidence *)));
- connect(mSearchDialog,SIGNAL(deleteIncidenceSignal(Incidence *)),
- mMainView, SLOT(deleteIncidence(Incidence *)));
- connect(mMainView,SIGNAL(closingDown()),mSearchDialog,SLOT(reject()));
+ connect(mSearchDialog,TQT_SIGNAL(showIncidenceSignal(Incidence *)),
+ mMainView,TQT_SLOT(showIncidence(Incidence *)));
+ connect(mSearchDialog,TQT_SIGNAL(editIncidenceSignal(Incidence *)),
+ mMainView,TQT_SLOT(editIncidence(Incidence *)));
+ connect(mSearchDialog,TQT_SIGNAL(deleteIncidenceSignal(Incidence *)),
+ mMainView, TQT_SLOT(deleteIncidence(Incidence *)));
+ connect(mMainView,TQT_SIGNAL(closingDown()),mSearchDialog,TQT_SLOT(reject()));
}
// make sure the widget is on top again
mSearchDialog->show();
@@ -190,29 +190,29 @@ void KODialogManager::showArchiveDialog()
#ifndef KORG_NOARCHIVE
if (!mArchiveDialog) {
mArchiveDialog = new ArchiveDialog(mMainView->calendar(),mMainView);
- connect(mArchiveDialog,SIGNAL(eventsDeleted()),
- mMainView,SLOT(updateView()));
- connect(mArchiveDialog,SIGNAL(autoArchivingSettingsModified()),
- mMainView,SLOT(slotAutoArchivingSettingsModified()));
+ connect(mArchiveDialog,TQT_SIGNAL(eventsDeleted()),
+ mMainView,TQT_SLOT(updateView()));
+ connect(mArchiveDialog,TQT_SIGNAL(autoArchivingSettingsModified()),
+ mMainView,TQT_SLOT(slotAutoArchivingSettingsModified()));
}
mArchiveDialog->show();
mArchiveDialog->raise();
// Workaround.
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
#endif
}
-void KODialogManager::showFilterEditDialog( QPtrList<CalFilter> *filters )
+void KODialogManager::showFilterEditDialog( TQPtrList<CalFilter> *filters )
{
if ( !mFilterEditDialog ) {
mFilterEditDialog = new FilterEditDialog( filters, mMainView );
- connect( mFilterEditDialog, SIGNAL( filterChanged() ),
- mMainView, SLOT( updateFilter() ) );
- connect( mFilterEditDialog, SIGNAL( editCategories() ),
- mCategoryEditDialog, SLOT( show() ) );
- connect( mCategoryEditDialog, SIGNAL( categoryConfigChanged() ),
- mFilterEditDialog, SLOT( updateCategoryConfig() ) );
+ connect( mFilterEditDialog, TQT_SIGNAL( filterChanged() ),
+ mMainView, TQT_SLOT( updateFilter() ) );
+ connect( mFilterEditDialog, TQT_SIGNAL( editCategories() ),
+ mCategoryEditDialog, TQT_SLOT( show() ) );
+ connect( mCategoryEditDialog, TQT_SIGNAL( categoryConfigChanged() ),
+ mFilterEditDialog, TQT_SLOT( updateCategoryConfig() ) );
}
mFilterEditDialog->show();
mFilterEditDialog->raise();
@@ -241,29 +241,29 @@ void KODialogManager::connectTypeAhead( KOEventEditor *editor,
{
if ( editor && agenda ) {
agenda->setTypeAheadReceiver( editor->typeAheadReceiver() );
- connect( editor, SIGNAL( focusReceivedSignal() ),
- agenda, SLOT( finishTypeAhead() ) );
+ connect( editor, TQT_SIGNAL( focusReceivedSignal() ),
+ agenda, TQT_SLOT( finishTypeAhead() ) );
}
}
void KODialogManager::connectEditor( KOIncidenceEditor*editor )
{
- connect( editor, SIGNAL( deleteIncidenceSignal( Incidence * ) ),
- mMainView, SLOT( deleteIncidence( Incidence * ) ) );
-
- connect( mCategoryEditDialog, SIGNAL( categoryConfigChanged() ),
- editor, SIGNAL( updateCategoryConfig() ) );
- connect( editor, SIGNAL( editCategories() ),
- mCategoryEditDialog, SLOT( show() ) );
-
- connect( editor, SIGNAL( dialogClose( Incidence * ) ),
- mMainView, SLOT( dialogClosing( Incidence * ) ) );
- connect( editor, SIGNAL( editCanceled( Incidence * ) ),
- mMainView, SLOT( editCanceled( Incidence * ) ) );
- connect( mMainView, SIGNAL( closingDown() ), editor, SLOT( reject() ) );
-
- connect( editor, SIGNAL( deleteAttendee( Incidence * ) ),
- mMainView, SIGNAL( cancelAttendees( Incidence * ) ) );
+ connect( editor, TQT_SIGNAL( deleteIncidenceSignal( Incidence * ) ),
+ mMainView, TQT_SLOT( deleteIncidence( Incidence * ) ) );
+
+ connect( mCategoryEditDialog, TQT_SIGNAL( categoryConfigChanged() ),
+ editor, TQT_SIGNAL( updateCategoryConfig() ) );
+ connect( editor, TQT_SIGNAL( editCategories() ),
+ mCategoryEditDialog, TQT_SLOT( show() ) );
+
+ connect( editor, TQT_SIGNAL( dialogClose( Incidence * ) ),
+ mMainView, TQT_SLOT( dialogClosing( Incidence * ) ) );
+ connect( editor, TQT_SIGNAL( editCanceled( Incidence * ) ),
+ mMainView, TQT_SLOT( editCanceled( Incidence * ) ) );
+ connect( mMainView, TQT_SIGNAL( closingDown() ), editor, TQT_SLOT( reject() ) );
+
+ connect( editor, TQT_SIGNAL( deleteAttendee( Incidence * ) ),
+ mMainView, TQT_SIGNAL( cancelAttendees( Incidence * ) ) );
}
KOTodoEditor *KODialogManager::getTodoEditor()
diff --git a/korganizer/kodialogmanager.h b/korganizer/kodialogmanager.h
index 50c52412f..63fee901e 100644
--- a/korganizer/kodialogmanager.h
+++ b/korganizer/kodialogmanager.h
@@ -25,8 +25,8 @@
#ifndef KODIALOGMANAGER_H
#define KODIALOGMANAGER_H
-#include <qobject.h>
-#include <qptrlist.h>
+#include <tqobject.h>
+#include <tqptrlist.h>
namespace KCal{class CalFilter; }
class CalendarView;
@@ -69,14 +69,14 @@ class KODialogManager : public QObject
void connectTypeAhead( KOEventEditor *editor, KOrg::AgendaView *agenda );
- static void errorSaveIncidence( QWidget *parent, Incidence *incidence );
+ static void errorSaveIncidence( TQWidget *parent, Incidence *incidence );
public slots:
void showOptionsDialog();
void showCategoryEditDialog();
void showSearchDialog();
void showArchiveDialog();
- void showFilterEditDialog(QPtrList<CalFilter> *filters);
+ void showFilterEditDialog(TQPtrList<CalFilter> *filters);
private:
class DialogManagerVisitor;
diff --git a/korganizer/koeditoralarms.cpp b/korganizer/koeditoralarms.cpp
index e14581e4d..0a2c7399a 100644
--- a/korganizer/koeditoralarms.cpp
+++ b/korganizer/koeditoralarms.cpp
@@ -26,15 +26,15 @@
#include "koeditoralarms_base.h"
#include "koeditoralarms.h"
-#include <qlayout.h>
-#include <qlistview.h>
-#include <qpushbutton.h>
-#include <qspinbox.h>
-#include <qcombobox.h>
-#include <qcheckbox.h>
-#include <qbuttongroup.h>
-#include <qtextedit.h>
-#include <qwidgetstack.h>
+#include <tqlayout.h>
+#include <tqlistview.h>
+#include <tqpushbutton.h>
+#include <tqspinbox.h>
+#include <tqcombobox.h>
+#include <tqcheckbox.h>
+#include <tqbuttongroup.h>
+#include <tqtextedit.h>
+#include <tqwidgetstack.h>
#include <kurlrequester.h>
#include <klocale.h>
@@ -48,7 +48,7 @@
class AlarmListViewItem : public QListViewItem
{
public:
- AlarmListViewItem( QListView *parent, KCal::Alarm *alarm );
+ AlarmListViewItem( TQListView *parent, KCal::Alarm *alarm );
virtual ~AlarmListViewItem();
KCal::Alarm *alarm() const { return mAlarm; }
void construct();
@@ -57,8 +57,8 @@ class AlarmListViewItem : public QListViewItem
KCal::Alarm *mAlarm;
};
-AlarmListViewItem::AlarmListViewItem( QListView *parent, KCal::Alarm *alarm )
- : QListViewItem( parent )
+AlarmListViewItem::AlarmListViewItem( TQListView *parent, KCal::Alarm *alarm )
+ : TQListViewItem( parent )
{
if ( alarm ) {
mAlarm = new KCal::Alarm( *alarm );
@@ -77,7 +77,7 @@ void AlarmListViewItem::construct()
{
if ( mAlarm ) {
// Alarm type:
- QString type;
+ TQString type;
switch ( mAlarm->type() ) {
case KCal::Alarm::Display:
type = i18n("Reminder Dialog");
@@ -98,7 +98,7 @@ void AlarmListViewItem::construct()
setText( ColAlarmType, type );
// Alarm offset:
- QString offsetstr;
+ TQString offsetstr;
int offset = 0;
if ( mAlarm->hasStartOffset() ) {
offset = mAlarm->startOffset().asSeconds();
@@ -143,32 +143,32 @@ void AlarmListViewItem::construct()
}
-KOEditorAlarms::KOEditorAlarms( KCal::Alarm::List *alarms, QWidget *parent,
+KOEditorAlarms::KOEditorAlarms( KCal::Alarm::List *alarms, TQWidget *parent,
const char *name )
: KDialogBase( parent, name, true, i18n("Edit Reminders"), Ok | Cancel ), mAlarms( alarms ),mCurrentItem(0L)
{
setMainWidget( mWidget = new KOEditorAlarms_base( this ) );
- mWidget->mAlarmList->setColumnWidthMode( 0, QListView::Maximum );
- mWidget->mAlarmList->setColumnWidthMode( 1, QListView::Maximum );
- connect( mWidget->mAlarmList, SIGNAL( selectionChanged( QListViewItem * ) ),
- SLOT( selectionChanged( QListViewItem * ) ) );
- connect( mWidget->mAddButton, SIGNAL( clicked() ), SLOT( slotAdd() ) );
- connect( mWidget->mRemoveButton, SIGNAL( clicked() ), SLOT( slotRemove() ) );
- connect( mWidget->mDuplicateButton, SIGNAL( clicked() ), SLOT( slotDuplicate() ) );
-
- connect( mWidget->mAlarmOffset, SIGNAL( valueChanged( int ) ), SLOT( changed() ) );
- connect( mWidget->mOffsetUnit, SIGNAL( activated( int ) ), SLOT( changed() ) );
- connect( mWidget->mBeforeAfter, SIGNAL( activated( int ) ), SLOT( changed() ) );
- connect( mWidget->mRepeats, SIGNAL( toggled( bool ) ), SLOT( changed() ) );
- connect( mWidget->mRepeatCount, SIGNAL( valueChanged( int ) ), SLOT( changed() ) );
- connect( mWidget->mRepeatInterval, SIGNAL( valueChanged( int ) ), SLOT( changed() ) );
- connect( mWidget->mAlarmType, SIGNAL(clicked(int)), SLOT( changed() ) );
- connect( mWidget->mDisplayText, SIGNAL( textChanged() ), SLOT( changed() ) );
- connect( mWidget->mSoundFile, SIGNAL( textChanged( const QString & ) ), SLOT( changed() ) );
- connect( mWidget->mApplication, SIGNAL( textChanged( const QString & ) ), SLOT( changed() ) );
- connect( mWidget->mAppArguments, SIGNAL( textChanged( const QString & ) ), SLOT( changed() ) );
- connect( mWidget->mEmailAddress, SIGNAL( textChanged( const QString & ) ), SLOT( changed() ) );
- connect( mWidget->mEmailText, SIGNAL( textChanged() ), SLOT( changed() ) );
+ mWidget->mAlarmList->setColumnWidthMode( 0, TQListView::Maximum );
+ mWidget->mAlarmList->setColumnWidthMode( 1, TQListView::Maximum );
+ connect( mWidget->mAlarmList, TQT_SIGNAL( selectionChanged( TQListViewItem * ) ),
+ TQT_SLOT( selectionChanged( TQListViewItem * ) ) );
+ connect( mWidget->mAddButton, TQT_SIGNAL( clicked() ), TQT_SLOT( slotAdd() ) );
+ connect( mWidget->mRemoveButton, TQT_SIGNAL( clicked() ), TQT_SLOT( slotRemove() ) );
+ connect( mWidget->mDuplicateButton, TQT_SIGNAL( clicked() ), TQT_SLOT( slotDuplicate() ) );
+
+ connect( mWidget->mAlarmOffset, TQT_SIGNAL( valueChanged( int ) ), TQT_SLOT( changed() ) );
+ connect( mWidget->mOffsetUnit, TQT_SIGNAL( activated( int ) ), TQT_SLOT( changed() ) );
+ connect( mWidget->mBeforeAfter, TQT_SIGNAL( activated( int ) ), TQT_SLOT( changed() ) );
+ connect( mWidget->mRepeats, TQT_SIGNAL( toggled( bool ) ), TQT_SLOT( changed() ) );
+ connect( mWidget->mRepeatCount, TQT_SIGNAL( valueChanged( int ) ), TQT_SLOT( changed() ) );
+ connect( mWidget->mRepeatInterval, TQT_SIGNAL( valueChanged( int ) ), TQT_SLOT( changed() ) );
+ connect( mWidget->mAlarmType, TQT_SIGNAL(clicked(int)), TQT_SLOT( changed() ) );
+ connect( mWidget->mDisplayText, TQT_SIGNAL( textChanged() ), TQT_SLOT( changed() ) );
+ connect( mWidget->mSoundFile, TQT_SIGNAL( textChanged( const TQString & ) ), TQT_SLOT( changed() ) );
+ connect( mWidget->mApplication, TQT_SIGNAL( textChanged( const TQString & ) ), TQT_SLOT( changed() ) );
+ connect( mWidget->mAppArguments, TQT_SIGNAL( textChanged( const TQString & ) ), TQT_SLOT( changed() ) );
+ connect( mWidget->mEmailAddress, TQT_SIGNAL( textChanged( const TQString & ) ), TQT_SLOT( changed() ) );
+ connect( mWidget->mEmailText, TQT_SIGNAL( textChanged() ), TQT_SLOT( changed() ) );
init();
}
@@ -244,9 +244,9 @@ void KOEditorAlarms::readAlarm( KCal::Alarm *alarm )
break;
case KCal::Alarm::Email: {
mWidget->mAlarmType->setButton( 3 );
- QValueList<KCal::Person> addresses = alarm->mailAddresses();
- QStringList add;
- for ( QValueList<KCal::Person>::ConstIterator it = addresses.begin();
+ TQValueList<KCal::Person> addresses = alarm->mailAddresses();
+ TQStringList add;
+ for ( TQValueList<KCal::Person>::ConstIterator it = addresses.begin();
it != addresses.end(); ++it ) {
add << (*it).fullName();
}
@@ -303,14 +303,14 @@ void KOEditorAlarms::writeAlarm( KCal::Alarm *alarm )
alarm->setProcedureAlarm( mWidget->mApplication->url(), mWidget->mAppArguments->text() );
break;
case 3: { // Email
- QStringList addresses = KPIM::splitEmailAddrList( mWidget->mEmailAddress->text() );
- QValueList<KCal::Person> add;
- for ( QStringList::Iterator it = addresses.begin(); it != addresses.end();
+ TQStringList addresses = KPIM::splitEmailAddrList( mWidget->mEmailAddress->text() );
+ TQValueList<KCal::Person> add;
+ for ( TQStringList::Iterator it = addresses.begin(); it != addresses.end();
++it ) {
add << KCal::Person( *it );
}
// TODO: Add a subject line and possibilities for attachments
- alarm->setEmailAlarm( QString::null, mWidget->mEmailText->text(),
+ alarm->setEmailAlarm( TQString::null, mWidget->mEmailText->text(),
add );
break; }
case 0: // Display
@@ -320,7 +320,7 @@ void KOEditorAlarms::writeAlarm( KCal::Alarm *alarm )
}
}
-void KOEditorAlarms::selectionChanged( QListViewItem *listviewitem )
+void KOEditorAlarms::selectionChanged( TQListViewItem *listviewitem )
{
AlarmListViewItem *item = dynamic_cast<AlarmListViewItem*>(listviewitem);
mCurrentItem = item;
@@ -336,7 +336,7 @@ void KOEditorAlarms::slotOk()
// copy the mAlarms list
if ( mAlarms ) {
mAlarms->clear();
- QListViewItemIterator it( mWidget->mAlarmList );
+ TQListViewItemIterator it( mWidget->mAlarmList );
while ( it.current() ) {
AlarmListViewItem *item = dynamic_cast<AlarmListViewItem*>(*it);
if ( item ) {
diff --git a/korganizer/koeditoralarms.h b/korganizer/koeditoralarms.h
index 04af51b48..ed01d656b 100644
--- a/korganizer/koeditoralarms.h
+++ b/korganizer/koeditoralarms.h
@@ -35,7 +35,7 @@ class KOEditorAlarms : public KDialogBase
{
Q_OBJECT
public:
- KOEditorAlarms( KCal::Alarm::List *alarms, QWidget *parent = 0,
+ KOEditorAlarms( KCal::Alarm::List *alarms, TQWidget *parent = 0,
const char *name = 0 );
~KOEditorAlarms();
@@ -45,7 +45,7 @@ class KOEditorAlarms : public KDialogBase
void slotDuplicate();
void slotRemove();
void changed();
- void selectionChanged( QListViewItem *listviewitem );
+ void selectionChanged( TQListViewItem *listviewitem );
protected:
void init();
void readAlarm( KCal::Alarm *alarm );
diff --git a/korganizer/koeditorattachments.cpp b/korganizer/koeditorattachments.cpp
index 51dd63044..adcd871e6 100644
--- a/korganizer/koeditorattachments.cpp
+++ b/korganizer/koeditorattachments.cpp
@@ -46,16 +46,16 @@
#include <kactioncollection.h>
#include <kpopupmenu.h>
-#include <qfile.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qlistview.h>
-#include <qpushbutton.h>
-#include <qdragobject.h>
-#include <qtooltip.h>
-#include <qwhatsthis.h>
-#include <qapplication.h>
-#include <qclipboard.h>
+#include <tqfile.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqlistview.h>
+#include <tqpushbutton.h>
+#include <tqdragobject.h>
+#include <tqtooltip.h>
+#include <tqwhatsthis.h>
+#include <tqapplication.h>
+#include <tqclipboard.h>
#include <cassert>
#include <set>
@@ -63,13 +63,13 @@
class AttachmentListItem : public KIconViewItem
{
public:
- AttachmentListItem( KCal::Attachment*att, QIconView *parent ) :
+ AttachmentListItem( KCal::Attachment*att, TQIconView *parent ) :
KIconViewItem( parent )
{
if ( att ) {
mAttachment = new KCal::Attachment( *att );
} else {
- mAttachment = new KCal::Attachment( QString::null );
+ mAttachment = new KCal::Attachment( TQString::null );
}
readAttachment();
setDragEnabled( true );
@@ -77,7 +77,7 @@ class AttachmentListItem : public KIconViewItem
~AttachmentListItem() { delete mAttachment; }
KCal::Attachment *attachment() const { return mAttachment; }
- void setUri( const QString &uri )
+ void setUri( const TQString &uri )
{
mAttachment->setUri( uri );
readAttachment();
@@ -87,12 +87,12 @@ class AttachmentListItem : public KIconViewItem
mAttachment->setData( base64 );
readAttachment();
}
- void setMimeType( const QString &mime )
+ void setMimeType( const TQString &mime )
{
mAttachment->setMimeType( mime );
readAttachment();
}
- void setLabel( const QString &label )
+ void setLabel( const TQString &label )
{
mAttachment->setLabel( label );
readAttachment();
@@ -110,8 +110,8 @@ class AttachmentListItem : public KIconViewItem
}
KMimeType::Ptr mt = KMimeType::mimeType( mAttachment->mimeType() );
if ( mt ) {
- const QString iconName( mt->icon( QString(), false ) );
- QPixmap pix = KGlobal::iconLoader( )->loadIcon( iconName, KIcon::Small );
+ const TQString iconName( mt->icon( TQString(), false ) );
+ TQPixmap pix = KGlobal::iconLoader( )->loadIcon( iconName, KIcon::Small );
if ( pix.isNull() )
pix = KGlobal::iconLoader( )->loadIcon( "unknown", KIcon::Small );
if ( !pix.isNull() )
@@ -132,10 +132,10 @@ class AttachmentIconView : public KIconView
mParent( parent )
{
setAcceptDrops( true );
- setSelectionMode( QIconView::Extended );
+ setSelectionMode( TQIconView::Extended );
setMode( KIconView::Select );
- setItemTextPos( QIconView::Right );
- setArrangement( QIconView::LeftToRight );
+ setItemTextPos( TQIconView::Right );
+ setArrangement( TQIconView::LeftToRight );
setMaxItemWidth( QMAX(maxItemWidth(), 250) );
setMinimumHeight( QMAX(fontMetrics().height(), 16) + 12 );
}
@@ -146,10 +146,10 @@ class AttachmentIconView : public KIconView
}
}
protected:
- QDragObject * dragObject()
+ TQDragObject * dragObject()
{
KURL::List urls;
- for ( QIconViewItem *it = firstItem( ); it; it = it->nextItem( ) ) {
+ for ( TQIconViewItem *it = firstItem( ); it; it = it->nextItem( ) ) {
if ( !it->isSelected() ) continue;
AttachmentListItem * item = dynamic_cast<AttachmentListItem*>( it );
if ( !item ) return 0;
@@ -162,11 +162,11 @@ class AttachmentIconView : public KIconView
KTempDir * tempDir = new KTempDir(); // will be deleted on editor close
tempDir->setAutoDelete( true );
mTempDirs.insert( tempDir );
- QByteArray encoded;
+ TQByteArray encoded;
encoded.duplicate( att->data(), strlen(att->data()) );
- QByteArray decoded;
+ TQByteArray decoded;
KCodecs::base64Decode( encoded, decoded );
- const QString fileName = tempDir->name( ) + "/" + att->label();
+ const TQString fileName = tempDir->name( ) + "/" + att->label();
KPIM::kByteArrayToFile( decoded, fileName, false, false, false );
url.setPath( fileName );
}
@@ -175,7 +175,7 @@ class AttachmentIconView : public KIconView
KURLDrag *drag = new KURLDrag( urls, this );
return drag;
}
- void contentsDropEvent( QDropEvent* event )
+ void contentsDropEvent( TQDropEvent* event )
{
mParent->handlePasteOrDrop( event );
}
@@ -184,66 +184,66 @@ class AttachmentIconView : public KIconView
KOEditorAttachments* mParent;
};
-KOEditorAttachments::KOEditorAttachments( int spacing, QWidget *parent,
+KOEditorAttachments::KOEditorAttachments( int spacing, TQWidget *parent,
const char *name )
- : QWidget( parent, name )
+ : TQWidget( parent, name )
{
- QBoxLayout *topLayout = new QHBoxLayout( this );
+ TQBoxLayout *topLayout = new TQHBoxLayout( this );
topLayout->setSpacing( spacing );
- QLabel *label = new QLabel( i18n("Attachments:"), this );
+ TQLabel *label = new TQLabel( i18n("Attachments:"), this );
topLayout->addWidget( label );
mAttachments = new AttachmentIconView( this );
- QWhatsThis::add( mAttachments,
+ TQWhatsThis::add( mAttachments,
i18n("Displays a list of current items (files, mail, etc.) "
"that have been associated with this event or to-do. ") );
topLayout->addWidget( mAttachments );
- connect( mAttachments, SIGNAL( doubleClicked( QIconViewItem * ) ),
- SLOT( showAttachment( QIconViewItem * ) ) );
- connect( mAttachments, SIGNAL(selectionChanged()),
- SLOT(selectionChanged()) );
- connect( mAttachments, SIGNAL(contextMenuRequested(QIconViewItem*,const QPoint&)),
- SLOT(contextMenu(QIconViewItem*,const QPoint&)) );
+ connect( mAttachments, TQT_SIGNAL( doubleClicked( TQIconViewItem * ) ),
+ TQT_SLOT( showAttachment( TQIconViewItem * ) ) );
+ connect( mAttachments, TQT_SIGNAL(selectionChanged()),
+ TQT_SLOT(selectionChanged()) );
+ connect( mAttachments, TQT_SIGNAL(contextMenuRequested(TQIconViewItem*,const TQPoint&)),
+ TQT_SLOT(contextMenu(TQIconViewItem*,const TQPoint&)) );
mAddMenu = new KPopupMenu( this );
mContextMenu = new KPopupMenu( this );
KActionCollection* ac = new KActionCollection( this, this );
- mOpenAction = new KAction( i18n("View"), 0, this, SLOT(slotShow()), ac );
+ mOpenAction = new KAction( i18n("View"), 0, this, TQT_SLOT(slotShow()), ac );
mOpenAction->plug( mContextMenu );
mContextMenu->insertSeparator();
- mCopyAction = KStdAction::copy(this, SLOT(slotCopy( ) ), ac );
+ mCopyAction = KStdAction::copy(this, TQT_SLOT(slotCopy( ) ), ac );
mCopyAction->plug( mContextMenu );
- mCutAction = KStdAction::cut(this, SLOT(slotCut( ) ), ac );
+ mCutAction = KStdAction::cut(this, TQT_SLOT(slotCut( ) ), ac );
mCutAction->plug( mContextMenu );
- KAction *action = KStdAction::paste(this, SLOT(slotPaste( ) ), ac );
+ KAction *action = KStdAction::paste(this, TQT_SLOT(slotPaste( ) ), ac );
action->plug( mContextMenu );
- action = new KAction( i18n("&Attach File..."), 0, this, SLOT(slotAddData()), ac );
+ action = new KAction( i18n("&Attach File..."), 0, this, TQT_SLOT(slotAddData()), ac );
action->setWhatsThis( i18n("Shows a dialog used to select an attachment "
"to add to this event or to-do as link as inline data.") );
action->plug( mAddMenu );
- action = new KAction( i18n("Attach &Link..."), 0, this, SLOT(slotAdd()), ac );
+ action = new KAction( i18n("Attach &Link..."), 0, this, TQT_SLOT(slotAdd()), ac );
action->setWhatsThis( i18n("Shows a dialog used to select an attachment "
"to add to this event or to-do as link.") );
action->plug( mAddMenu );
- QPushButton *addButton = new QPushButton( this );
+ TQPushButton *addButton = new TQPushButton( this );
addButton->setIconSet( SmallIconSet( "add" ) );
addButton->setPopup( mAddMenu );
topLayout->addWidget( addButton );
- mRemoveBtn = new QPushButton( this );
+ mRemoveBtn = new TQPushButton( this );
mRemoveBtn->setIconSet( SmallIconSet( "remove" ) );
- QToolTip::add( mRemoveBtn, i18n("&Remove") );
- QWhatsThis::add( mRemoveBtn,
+ TQToolTip::add( mRemoveBtn, i18n("&Remove") );
+ TQWhatsThis::add( mRemoveBtn,
i18n("Removes the attachment selected in the list above "
"from this event or to-do.") );
topLayout->addWidget( mRemoveBtn );
- connect( mRemoveBtn, SIGNAL( clicked() ), SLOT( slotRemove() ) );
+ connect( mRemoveBtn, TQT_SIGNAL( clicked() ), TQT_SLOT( slotRemove() ) );
selectionChanged();
setAcceptDrops( true );
@@ -258,36 +258,36 @@ bool KOEditorAttachments::hasAttachments()
return mAttachments->count() != 0;
}
-void KOEditorAttachments::dragEnterEvent( QDragEnterEvent* event )
+void KOEditorAttachments::dragEnterEvent( TQDragEnterEvent* event )
{
- event->accept( KURLDrag::canDecode( event ) | QTextDrag::canDecode( event ) );
+ event->accept( KURLDrag::canDecode( event ) | TQTextDrag::canDecode( event ) );
}
-void KOEditorAttachments::handlePasteOrDrop( QMimeSource* source )
+void KOEditorAttachments::handlePasteOrDrop( TQMimeSource* source )
{
KURL::List urls;
- QString text;
+ TQString text;
if ( KURLDrag::decode( source, urls ) ) {
const bool asUri = KMessageBox::questionYesNo( this,
i18n("Do you want to link to the attachments, or include them in the event?"),
i18n("Attach as link?"), i18n("As Link"), i18n("As File") ) == KMessageBox::Yes;
for ( KURL::List::ConstIterator it = urls.begin(); it != urls.end(); ++it ) {
- addAttachment( (*it).url(), QString::null, asUri );
+ addAttachment( (*it).url(), TQString::null, asUri );
}
- } else if ( QTextDrag::decode( source, text ) ) {
- QStringList lst = QStringList::split( '\n', text );
- for ( QStringList::ConstIterator it = lst.begin(); it != lst.end(); ++it ) {
+ } else if ( TQTextDrag::decode( source, text ) ) {
+ TQStringList lst = TQStringList::split( '\n', text );
+ for ( TQStringList::ConstIterator it = lst.begin(); it != lst.end(); ++it ) {
addAttachment( (*it) );
}
}
}
-void KOEditorAttachments::dropEvent( QDropEvent* event )
+void KOEditorAttachments::dropEvent( TQDropEvent* event )
{
handlePasteOrDrop( event );
}
-void KOEditorAttachments::showAttachment( QIconViewItem *item )
+void KOEditorAttachments::showAttachment( TQIconViewItem *item )
{
AttachmentListItem *attitem = static_cast<AttachmentListItem*>(item);
if ( !attitem || !attitem->attachment() ) return;
@@ -299,9 +299,9 @@ void KOEditorAttachments::showAttachment( QIconViewItem *item )
KTempFile f;
if ( !f.file() )
return;
- QByteArray encoded;
+ TQByteArray encoded;
encoded.duplicate( att->data(), strlen(att->data()) );
- QByteArray decoded;
+ TQByteArray decoded;
KCodecs::base64Decode( encoded, decoded );
f.file()->writeBlock( decoded );
f.file()->close();
@@ -311,7 +311,7 @@ void KOEditorAttachments::showAttachment( QIconViewItem *item )
void KOEditorAttachments::slotAdd()
{
- KURL uri = KPimURLRequesterDlg::getURL( QString::null, i18n(
+ KURL uri = KPimURLRequesterDlg::getURL( TQString::null, i18n(
"URL (e.g. a web page) or file to be attached (only "
"the link will be attached, not the file itself):"), this,
i18n("Add Attachment") );
@@ -322,15 +322,15 @@ void KOEditorAttachments::slotAdd()
void KOEditorAttachments::slotAddData()
{
- KURL uri = KFileDialog::getOpenFileName( QString(), QString(), this, i18n("Add Attachment") );
+ KURL uri = KFileDialog::getOpenFileName( TQString(), TQString(), this, i18n("Add Attachment") );
if ( !uri.isEmpty() ) {
- addAttachment( uri, QString::null, false );
+ addAttachment( uri, TQString::null, false );
}
}
void KOEditorAttachments::slotEdit()
{
- QIconViewItem *item = mAttachments->currentItem();
+ TQIconViewItem *item = mAttachments->currentItem();
AttachmentListItem *attitem = static_cast<AttachmentListItem*>(item);
if ( !attitem || !attitem->attachment() ) return;
@@ -344,19 +344,19 @@ void KOEditorAttachments::slotEdit()
if ( !uri.isEmpty() )
attitem->setUri( uri.url() );
} else {
- KURL uri = KPimURLRequesterDlg::getURL( QString::null, i18n(
+ KURL uri = KPimURLRequesterDlg::getURL( TQString::null, i18n(
"File to be attached:"), this, i18n("Add Attachment") );
if ( !uri.isEmpty() ) {
- QString tmpFile;
+ TQString tmpFile;
if ( KIO::NetAccess::download( uri, tmpFile, this ) ) {
- QFile f( tmpFile );
+ TQFile f( tmpFile );
if ( !f.open( IO_ReadOnly ) )
return;
- QByteArray data = f.readAll();
+ TQByteArray data = f.readAll();
f.close();
attitem->setData( KCodecs::base64Encode( data ) );
attitem->setMimeType( KIO::NetAccess::mimetype( uri, this ) );
- QString label = uri.fileName();
+ TQString label = uri.fileName();
if ( label.isEmpty() )
label = uri.prettyURL();
attitem->setLabel( label );
@@ -368,8 +368,8 @@ void KOEditorAttachments::slotEdit()
void KOEditorAttachments::slotRemove()
{
- QValueList<QIconViewItem*> selected;
- for ( QIconViewItem *it = mAttachments->firstItem( ); it; it = it->nextItem( ) ) {
+ TQValueList<TQIconViewItem*> selected;
+ for ( TQIconViewItem *it = mAttachments->firstItem( ); it; it = it->nextItem( ) ) {
if ( !it->isSelected() ) continue;
selected << it;
}
@@ -379,14 +379,14 @@ void KOEditorAttachments::slotRemove()
i18n("KOrganizer Confirmation"),KStdGuiItem::del()) != KMessageBox::Continue )
return;
- for ( QValueList<QIconViewItem*>::iterator it( selected.begin() ), end( selected.end() ); it != end ; ++it ) {
+ for ( TQValueList<TQIconViewItem*>::iterator it( selected.begin() ), end( selected.end() ); it != end ; ++it ) {
delete *it;
}
}
void KOEditorAttachments::slotShow()
{
- for ( QIconViewItem *it = mAttachments->firstItem(); it; it = it->nextItem() ) {
+ for ( TQIconViewItem *it = mAttachments->firstItem(); it; it = it->nextItem() ) {
if ( !it->isSelected() )
continue;
showAttachment( it );
@@ -399,26 +399,26 @@ void KOEditorAttachments::setDefaults()
}
void KOEditorAttachments::addAttachment( const KURL &uri,
- const QString &mimeType, bool asUri )
+ const TQString &mimeType, bool asUri )
{
AttachmentListItem *item = new AttachmentListItem( 0, mAttachments );
if ( asUri ) {
item->setUri( uri.url() );
if ( !mimeType.isEmpty() ) item->setMimeType( mimeType );
} else {
- QString tmpFile;
+ TQString tmpFile;
if ( KIO::NetAccess::download( uri, tmpFile, this ) ) {
- QFile f( tmpFile );
+ TQFile f( tmpFile );
if ( !f.open( IO_ReadOnly ) )
return;
- QByteArray data = f.readAll();
+ TQByteArray data = f.readAll();
f.close();
item->setData( KCodecs::base64Encode( data ) );
if ( !mimeType.isEmpty() )
item->setMimeType( mimeType );
else
item->setMimeType( KIO::NetAccess::mimetype( uri, this ) );
- QString label = uri.fileName();
+ TQString label = uri.fileName();
if ( label.isEmpty() )
label = uri.prettyURL();
item->setLabel( label );
@@ -443,7 +443,7 @@ void KOEditorAttachments::readIncidence( KCal::Incidence *i )
addAttachment( (*it) );
}
if ( mAttachments->count() > 0 ) {
- QTimer::singleShot( 0, mAttachments, SLOT(arrangeItemsInGrid()) );
+ TQTimer::singleShot( 0, mAttachments, TQT_SLOT(arrangeItemsInGrid()) );
}
}
@@ -451,7 +451,7 @@ void KOEditorAttachments::writeIncidence( KCal::Incidence *i )
{
i->clearAttachments();
- QIconViewItem *item;
+ TQIconViewItem *item;
AttachmentListItem *attitem;
for( item = mAttachments->firstItem(); item; item = item->nextItem() ) {
attitem = static_cast<AttachmentListItem*>(item);
@@ -463,7 +463,7 @@ void KOEditorAttachments::writeIncidence( KCal::Incidence *i )
void KOEditorAttachments::slotCopy()
{
- QApplication::clipboard()->setData( mAttachments->dragObject(), QClipboard::Clipboard );
+ TQApplication::clipboard()->setData( mAttachments->dragObject(), QClipboard::Clipboard );
}
void KOEditorAttachments::slotCut()
@@ -474,13 +474,13 @@ void KOEditorAttachments::slotCut()
void KOEditorAttachments::slotPaste()
{
- handlePasteOrDrop( QApplication::clipboard()->data() );
+ handlePasteOrDrop( TQApplication::clipboard()->data() );
}
void KOEditorAttachments::selectionChanged()
{
bool selected = false;
- for ( QIconViewItem *item = mAttachments->firstItem(); item; item = item->nextItem() ) {
+ for ( TQIconViewItem *item = mAttachments->firstItem(); item; item = item->nextItem() ) {
if ( item->isSelected() ) {
selected = true;
break;
@@ -489,7 +489,7 @@ void KOEditorAttachments::selectionChanged()
mRemoveBtn->setEnabled( selected );
}
-void KOEditorAttachments::contextMenu(QIconViewItem * item, const QPoint & pos)
+void KOEditorAttachments::contextMenu(TQIconViewItem * item, const TQPoint & pos)
{
const bool enable = item != 0;
mOpenAction->setEnabled( enable );
diff --git a/korganizer/koeditorattachments.h b/korganizer/koeditorattachments.h
index 813124a22..11dd7e8d4 100644
--- a/korganizer/koeditorattachments.h
+++ b/korganizer/koeditorattachments.h
@@ -25,7 +25,7 @@
#ifndef KOEDITORATTACHMENTS_H
#define KOEDITORATTACHMENTS_H
-#include <qwidget.h>
+#include <tqwidget.h>
#include <kurl.h>
namespace KCal {
@@ -44,12 +44,12 @@ class KOEditorAttachments : public QWidget
{
Q_OBJECT
public:
- KOEditorAttachments( int spacing = 8, QWidget *parent = 0,
+ KOEditorAttachments( int spacing = 8, TQWidget *parent = 0,
const char *name = 0 );
~KOEditorAttachments();
void addAttachment( const KURL &uri,
- const QString &mimeType = QString::null, bool asUri = true );
+ const TQString &mimeType = TQString::null, bool asUri = true );
void addAttachment( KCal::Attachment *attachment );
/** Set widgets to default values */
@@ -62,29 +62,29 @@ class KOEditorAttachments : public QWidget
bool hasAttachments();
protected slots:
- void showAttachment( QIconViewItem *item );
+ void showAttachment( TQIconViewItem *item );
void slotAdd();
void slotAddData();
void slotEdit();
void slotRemove();
void slotShow();
- void dragEnterEvent( QDragEnterEvent *event );
- void dropEvent( QDropEvent *event );
+ void dragEnterEvent( TQDragEnterEvent *event );
+ void dropEvent( TQDropEvent *event );
void slotCopy();
void slotCut();
void slotPaste();
void selectionChanged();
- void contextMenu( QIconViewItem* item, const QPoint &pos );
+ void contextMenu( TQIconViewItem* item, const TQPoint &pos );
signals:
void openURL( const KURL &url );
private:
friend class AttachmentIconView;
- void handlePasteOrDrop( QMimeSource* source );
+ void handlePasteOrDrop( TQMimeSource* source );
AttachmentIconView *mAttachments;
- QPushButton *mRemoveBtn;
- QPopupMenu *mContextMenu, *mAddMenu;
+ TQPushButton *mRemoveBtn;
+ TQPopupMenu *mContextMenu, *mAddMenu;
KAction *mOpenAction, *mCopyAction, *mCutAction;
};
diff --git a/korganizer/koeditordetails.cpp b/korganizer/koeditordetails.cpp
index 2485fc96a..0b8c6159f 100644
--- a/korganizer/koeditordetails.cpp
+++ b/korganizer/koeditordetails.cpp
@@ -25,25 +25,25 @@
#include "koeditordetails.h"
-#include <qbuttongroup.h>
-#include <qcheckbox.h>
-#include <qcombobox.h>
-#include <qdatetime.h>
-#include <qdragobject.h>
-#include <qfiledialog.h>
-#include <qgroupbox.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qlineedit.h>
-#include <qpushbutton.h>
-#include <qradiobutton.h>
-#include <qregexp.h>
-#include <qtooltip.h>
-#include <qvbox.h>
-#include <qvgroupbox.h>
-#include <qwhatsthis.h>
-#include <qwidgetstack.h>
-#include <qvaluevector.h>
+#include <tqbuttongroup.h>
+#include <tqcheckbox.h>
+#include <tqcombobox.h>
+#include <tqdatetime.h>
+#include <tqdragobject.h>
+#include <tqfiledialog.h>
+#include <tqgroupbox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqlineedit.h>
+#include <tqpushbutton.h>
+#include <tqradiobutton.h>
+#include <tqregexp.h>
+#include <tqtooltip.h>
+#include <tqvbox.h>
+#include <tqvgroupbox.h>
+#include <tqwhatsthis.h>
+#include <tqwidgetstack.h>
+#include <tqvaluevector.h>
#include <kdebug.h>
#include <klocale.h>
@@ -90,7 +90,7 @@ void CustomListViewItem<KCal::Attendee *>::updateItem()
setText(6, mData->delegator());
}
-KOAttendeeListView::KOAttendeeListView ( QWidget *parent, const char *name )
+KOAttendeeListView::KOAttendeeListView ( TQWidget *parent, const char *name )
: KListView(parent, name)
{
setAcceptDrops( true );
@@ -101,21 +101,21 @@ KOAttendeeListView::KOAttendeeListView ( QWidget *parent, const char *name )
/** KOAttendeeListView is a child class of KListView which supports
* dropping of attendees (e.g. from kaddressbook) onto it. If an attendeee
* was dropped, the signal dropped(Attendee*) is emitted. Valid drop classes
- * are KVCardDrag and QTextDrag.
+ * are KVCardDrag and TQTextDrag.
*/
KOAttendeeListView::~KOAttendeeListView()
{
}
-void KOAttendeeListView::contentsDragEnterEvent( QDragEnterEvent *e )
+void KOAttendeeListView::contentsDragEnterEvent( TQDragEnterEvent *e )
{
dragEnterEvent(e);
}
-void KOAttendeeListView::contentsDragMoveEvent( QDragMoveEvent *e )
+void KOAttendeeListView::contentsDragMoveEvent( TQDragMoveEvent *e )
{
#ifndef KORG_NODND
- if ( KVCardDrag::canDecode( e ) || QTextDrag::canDecode( e ) ) {
+ if ( KVCardDrag::canDecode( e ) || TQTextDrag::canDecode( e ) ) {
e->accept();
} else {
e->ignore();
@@ -123,10 +123,10 @@ void KOAttendeeListView::contentsDragMoveEvent( QDragMoveEvent *e )
#endif
}
-void KOAttendeeListView::dragEnterEvent( QDragEnterEvent *e )
+void KOAttendeeListView::dragEnterEvent( TQDragEnterEvent *e )
{
#ifndef KORG_NODND
- if ( KVCardDrag::canDecode( e ) || QTextDrag::canDecode( e ) ) {
+ if ( KVCardDrag::canDecode( e ) || TQTextDrag::canDecode( e ) ) {
e->accept();
} else {
e->ignore();
@@ -134,25 +134,25 @@ void KOAttendeeListView::dragEnterEvent( QDragEnterEvent *e )
#endif
}
-void KOAttendeeListView::addAttendee( const QString &newAttendee )
+void KOAttendeeListView::addAttendee( const TQString &newAttendee )
{
kdDebug(5850) << " Email: " << newAttendee << endl;
- QString name;
- QString email;
+ TQString name;
+ TQString email;
KPIM::getNameAndMail( newAttendee, name, email );
emit dropped( new Attendee( name, email, true ) );
}
-void KOAttendeeListView::contentsDropEvent( QDropEvent *e )
+void KOAttendeeListView::contentsDropEvent( TQDropEvent *e )
{
dropEvent(e);
}
-void KOAttendeeListView::dropEvent( QDropEvent *e )
+void KOAttendeeListView::dropEvent( TQDropEvent *e )
{
#ifndef KORG_NODND
- QString text;
- QString vcards;
+ TQString text;
+ TQString vcards;
#ifndef KORG_NOKABC
if ( KVCardDrag::decode( e, vcards ) ) {
@@ -161,7 +161,7 @@ void KOAttendeeListView::dropEvent( QDropEvent *e )
KABC::Addressee::List list = converter.parseVCards( vcards );
KABC::Addressee::List::Iterator it;
for ( it = list.begin(); it != list.end(); ++it ) {
- QString em( (*it).fullEmail() );
+ TQString em( (*it).fullEmail() );
if (em.isEmpty()) {
em=(*it).realName();
}
@@ -169,10 +169,10 @@ void KOAttendeeListView::dropEvent( QDropEvent *e )
}
} else
#endif // KORG_NOKABC
- if (QTextDrag::decode(e,text)) {
+ if (TQTextDrag::decode(e,text)) {
kdDebug(5850) << "Dropped : " << text << endl;
- QStringList emails = QStringList::split(",",text);
- for(QStringList::ConstIterator it = emails.begin();it!=emails.end();++it) {
+ TQStringList emails = TQStringList::split(",",text);
+ for(TQStringList::ConstIterator it = emails.begin();it!=emails.end();++it) {
addAttendee(*it);
}
}
@@ -180,17 +180,17 @@ void KOAttendeeListView::dropEvent( QDropEvent *e )
}
-KOEditorDetails::KOEditorDetails( int spacing, QWidget *parent,
+KOEditorDetails::KOEditorDetails( int spacing, TQWidget *parent,
const char *name )
: KOAttendeeEditor( parent, name), mDisableItemUpdate( false )
{
- QBoxLayout *topLayout = new QVBoxLayout( this );
+ TQBoxLayout *topLayout = new TQVBoxLayout( this );
topLayout->setSpacing( spacing );
initOrganizerWidgets( this, topLayout );
mListView = new KOAttendeeListView( this, "mListView" );
- QWhatsThis::add( mListView,
+ TQWhatsThis::add( mListView,
i18n("Displays information about current attendees. "
"To edit an attendee, select it in this list "
"and modify the values in the area below. "
@@ -205,22 +205,22 @@ KOEditorDetails::KOEditorDetails( int spacing, QWidget *parent,
mListView->addColumn( i18n("RSVP"), 55 );
mListView->addColumn( i18n("Delegated to"), 120 );
mListView->addColumn( i18n("Delegated from" ), 120 );
- mListView->setResizeMode( QListView::LastColumn );
+ mListView->setResizeMode( TQListView::LastColumn );
if ( KOPrefs::instance()->mCompactDialogs ) {
mListView->setFixedHeight( 78 );
}
- connect( mListView, SIGNAL( selectionChanged( QListViewItem * ) ),
- SLOT( updateAttendeeInput() ) );
+ connect( mListView, TQT_SIGNAL( selectionChanged( TQListViewItem * ) ),
+ TQT_SLOT( updateAttendeeInput() ) );
#ifndef KORG_NODND
- connect( mListView, SIGNAL( dropped( Attendee * ) ),
- SLOT( slotInsertAttendee( Attendee * ) ) );
+ connect( mListView, TQT_SIGNAL( dropped( Attendee * ) ),
+ TQT_SLOT( slotInsertAttendee( Attendee * ) ) );
#endif
topLayout->addWidget( mListView );
initEditWidgets( this, topLayout );
- connect( mRemoveButton, SIGNAL(clicked()), SLOT(removeAttendee()) );
+ connect( mRemoveButton, TQT_SIGNAL(clicked()), TQT_SLOT(removeAttendee()) );
updateAttendeeInput();
}
@@ -281,8 +281,8 @@ void KOEditorDetails::readEvent( Incidence *event )
void KOEditorDetails::writeEvent(Incidence *event)
{
event->clearAttendees();
- QValueVector<QListViewItem*> toBeDeleted;
- QListViewItem *item;
+ TQValueVector<TQListViewItem*> toBeDeleted;
+ TQListViewItem *item;
AttendeeListItem *a;
for (item = mListView->firstChild(); item;
item = item->nextSibling()) {
@@ -323,7 +323,7 @@ void KOEditorDetails::writeEvent(Incidence *event)
KOAttendeeEditor::writeEvent( event );
// cleanup
- QValueVector<QListViewItem*>::iterator it;
+ TQValueVector<TQListViewItem*>::iterator it;
for( it = toBeDeleted.begin(); it != toBeDeleted.end(); ++it ) {
delete *it;
}
@@ -336,7 +336,7 @@ bool KOEditorDetails::validateInput()
KCal::Attendee * KOEditorDetails::currentAttendee() const
{
- QListViewItem *item = mListView->selectedItem();
+ TQListViewItem *item = mListView->selectedItem();
AttendeeListItem *aItem = static_cast<AttendeeListItem *>( item );
if ( !aItem )
return 0;
@@ -357,10 +357,10 @@ void KOEditorDetails::slotInsertAttendee(Attendee * a)
void KOEditorDetails::changeStatusForMe(Attendee::PartStat status)
{
- const QStringList myEmails = KOPrefs::instance()->allEmails();
- for ( QListViewItemIterator it( mListView ); it.current(); ++it ) {
+ const TQStringList myEmails = KOPrefs::instance()->allEmails();
+ for ( TQListViewItemIterator it( mListView ); it.current(); ++it ) {
AttendeeListItem *item = static_cast<AttendeeListItem*>( it.current() );
- for ( QStringList::ConstIterator it2( myEmails.begin() ), end( myEmails.end() ); it2 != end; ++it2 ) {
+ for ( TQStringList::ConstIterator it2( myEmails.begin() ), end( myEmails.end() ); it2 != end; ++it2 ) {
if ( item->data()->email() == *it2 ) {
item->data()->setStatus( status );
item->updateItem();
diff --git a/korganizer/koeditordetails.h b/korganizer/koeditordetails.h
index 1929a49ab..7d122244b 100644
--- a/korganizer/koeditordetails.h
+++ b/korganizer/koeditordetails.h
@@ -55,21 +55,21 @@ typedef CustomListViewItem<KCal::Attendee *> AttendeeListItem;
/** KOAttendeeListView is a child class of KListView which supports
* dropping of attendees (e.g. from kaddressbook) onto it. If an attendeee
* was dropped, the signal dropped(Attendee*) is emitted. Valid drop classes
- * are KVCardDrag and QTextDrag.
+ * are KVCardDrag and TQTextDrag.
*/
class KOAttendeeListView : public KListView
{
Q_OBJECT
public:
- KOAttendeeListView (QWidget *parent=0, const char *name=0);
+ KOAttendeeListView (TQWidget *parent=0, const char *name=0);
virtual ~KOAttendeeListView();
- virtual void addAttendee( const QString& newAttendee );
+ virtual void addAttendee( const TQString& newAttendee );
public slots:
- virtual void contentsDragEnterEvent( QDragEnterEvent *e );
- virtual void dragEnterEvent( QDragEnterEvent *e );
- virtual void contentsDropEvent( QDropEvent *e );
- virtual void dropEvent( QDropEvent *e );
- virtual void contentsDragMoveEvent(QDragMoveEvent *e);
+ virtual void contentsDragEnterEvent( TQDragEnterEvent *e );
+ virtual void dragEnterEvent( TQDragEnterEvent *e );
+ virtual void contentsDropEvent( TQDropEvent *e );
+ virtual void dropEvent( TQDropEvent *e );
+ virtual void contentsDragMoveEvent(TQDragMoveEvent *e);
signals:
void dropped(Attendee*);
};
@@ -79,7 +79,7 @@ class KOEditorDetails : public KOAttendeeEditor
{
Q_OBJECT
public:
- KOEditorDetails (int spacing = 8,QWidget* parent = 0, const char* name = 0);
+ KOEditorDetails (int spacing = 8,TQWidget* parent = 0, const char* name = 0);
virtual ~KOEditorDetails();
/** Set widgets to default values */
diff --git a/korganizer/koeditorfreebusy.cpp b/korganizer/koeditorfreebusy.cpp
index 3849bc5d0..19691e807 100644
--- a/korganizer/koeditorfreebusy.cpp
+++ b/korganizer/koeditorfreebusy.cpp
@@ -22,13 +22,13 @@
without including the source code for Qt in the source distribution.
*/
-#include <qtooltip.h>
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qcombobox.h>
-#include <qpushbutton.h>
-#include <qvaluevector.h>
-#include <qwhatsthis.h>
+#include <tqtooltip.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqcombobox.h>
+#include <tqpushbutton.h>
+#include <tqvaluevector.h>
+#include <tqwhatsthis.h>
#include <kdebug.h>
#include <klocale.h>
@@ -90,19 +90,19 @@ class FreeBusyItem : public KDGanttViewTaskItem
void setFreeBusyPeriods( FreeBusy *fb );
- QString key( int column, bool ) const
+ TQString key( int column, bool ) const
{
- QMap<int,QString>::ConstIterator it = mKeyMap.find( column );
+ TQMap<int,TQString>::ConstIterator it = mKeyMap.find( column );
if ( it == mKeyMap.end() ) return listViewText( column );
else return *it;
}
- void setSortKey( int column, const QString &key )
+ void setSortKey( int column, const TQString &key )
{
mKeyMap.insert( column, key );
}
- QString email() const { return mAttendee->email(); }
+ TQString email() const { return mAttendee->email(); }
void setUpdateTimerID( int id ) { mTimerID = id; }
int updateTimerID() const { return mTimerID; }
@@ -119,7 +119,7 @@ class FreeBusyItem : public KDGanttViewTaskItem
Attendee *mAttendee;
KCal::FreeBusy *mFreeBusy;
- QMap<int,QString> mKeyMap;
+ TQMap<int,TQString> mKeyMap;
// This is used for the update timer
int mTimerID;
@@ -149,7 +149,7 @@ void FreeBusyItem::updateItem()
setPixmap( 0, KOGlobals::self()->smallIcon( "mail_forward" ) );
break;
default:
- setPixmap( 0, QPixmap() );
+ setPixmap( 0, TQPixmap() );
}
}
@@ -163,14 +163,14 @@ void FreeBusyItem::setFreeBusyPeriods( FreeBusy* fb )
delete it;
// Evaluate free/busy information
- QValueList<KCal::Period> busyPeriods = fb->busyPeriods();
- for( QValueList<KCal::Period>::Iterator it = busyPeriods.begin();
+ TQValueList<KCal::Period> busyPeriods = fb->busyPeriods();
+ for( TQValueList<KCal::Period>::Iterator it = busyPeriods.begin();
it != busyPeriods.end(); ++it ) {
KDGanttViewTaskItem* newSubItem = new KDGanttViewTaskItem( this );
newSubItem->setStartTime( (*it).start() );
newSubItem->setEndTime( (*it).end() );
newSubItem->setColors( Qt::red, Qt::red, Qt::red );
- QString toolTip;
+ TQString toolTip;
if ( !(*it).summary().isEmpty() )
toolTip += "<b>" + (*it).summary() + "</b><br/>";
if ( !(*it).location().isEmpty() )
@@ -184,7 +184,7 @@ void FreeBusyItem::setFreeBusyPeriods( FreeBusy* fb )
// No free/busy information
//debug only start
// int ii ;
- // QDateTime cur = QDateTime::currentDateTime();
+ // TQDateTime cur = TQDateTime::currentDateTime();
// for( ii = 0; ii < 10 ;++ii ) {
// KDGanttViewTaskItem* newSubItem = new KDGanttViewTaskItem( this );
// cur = cur.addSecs( 7200 );
@@ -204,11 +204,11 @@ void FreeBusyItem::setFreeBusyPeriods( FreeBusy* fb )
////
-KOEditorFreeBusy::KOEditorFreeBusy( int spacing, QWidget *parent,
+KOEditorFreeBusy::KOEditorFreeBusy( int spacing, TQWidget *parent,
const char *name )
: KOAttendeeEditor( parent, name )
{
- QVBoxLayout *topLayout = new QVBoxLayout( this );
+ TQVBoxLayout *topLayout = new TQVBoxLayout( this );
topLayout->setSpacing( spacing );
initOrganizerWidgets( this, topLayout );
@@ -216,66 +216,66 @@ KOEditorFreeBusy::KOEditorFreeBusy( int spacing, QWidget *parent,
// Label for status summary information
// Uses the tooltip palette to highlight it
mIsOrganizer = false; // Will be set later. This is just valgrind silencing
- mStatusSummaryLabel = new QLabel( this );
- mStatusSummaryLabel->setPalette( QToolTip::palette() );
- mStatusSummaryLabel->setFrameStyle( QFrame::Plain | QFrame::Box );
+ mStatusSummaryLabel = new TQLabel( this );
+ mStatusSummaryLabel->setPalette( TQToolTip::palette() );
+ mStatusSummaryLabel->setFrameStyle( TQFrame::Plain | TQFrame::Box );
mStatusSummaryLabel->setLineWidth( 1 );
mStatusSummaryLabel->hide(); // Will be unhidden later if you are organizer
topLayout->addWidget( mStatusSummaryLabel );
// The control panel for the gantt widget
- QBoxLayout *controlLayout = new QHBoxLayout( topLayout );
+ TQBoxLayout *controlLayout = new TQHBoxLayout( topLayout );
- QString whatsThis = i18n("Sets the zoom level on the Gantt chart. "
+ TQString whatsThis = i18n("Sets the zoom level on the Gantt chart. "
"'Hour' shows a range of several hours, "
"'Day' shows a range of a few days, "
"'Week' shows a range of a few months, "
"and 'Month' shows a range of a few years, "
"while 'Automatic' selects the range most "
"appropriate for the current event or to-do.");
- QLabel *label = new QLabel( i18n( "Scale: " ), this );
- QWhatsThis::add( label, whatsThis );
+ TQLabel *label = new TQLabel( i18n( "Scale: " ), this );
+ TQWhatsThis::add( label, whatsThis );
controlLayout->addWidget( label );
- scaleCombo = new QComboBox( this );
- QWhatsThis::add( scaleCombo, whatsThis );
+ scaleCombo = new TQComboBox( this );
+ TQWhatsThis::add( scaleCombo, whatsThis );
scaleCombo->insertItem( i18n( "Hour" ) );
scaleCombo->insertItem( i18n( "Day" ) );
scaleCombo->insertItem( i18n( "Week" ) );
scaleCombo->insertItem( i18n( "Month" ) );
scaleCombo->insertItem( i18n( "Automatic" ) );
scaleCombo->setCurrentItem( 0 ); // start with "hour"
- connect( scaleCombo, SIGNAL( activated( int ) ),
- SLOT( slotScaleChanged( int ) ) );
+ connect( scaleCombo, TQT_SIGNAL( activated( int ) ),
+ TQT_SLOT( slotScaleChanged( int ) ) );
controlLayout->addWidget( scaleCombo );
- QPushButton *button = new QPushButton( i18n( "Center on Start" ), this );
- QWhatsThis::add( button,
+ TQPushButton *button = new TQPushButton( i18n( "Center on Start" ), this );
+ TQWhatsThis::add( button,
i18n("Centers the Gantt chart on the start time "
"and day of this event.") );
- connect( button, SIGNAL( clicked() ), SLOT( slotCenterOnStart() ) );
+ connect( button, TQT_SIGNAL( clicked() ), TQT_SLOT( slotCenterOnStart() ) );
controlLayout->addWidget( button );
controlLayout->addStretch( 1 );
- button = new QPushButton( i18n( "Pick Date" ), this );
- QWhatsThis::add( button,
+ button = new TQPushButton( i18n( "Pick Date" ), this );
+ TQWhatsThis::add( button,
i18n("Moves the event to a date and time when all the "
"attendees are free.") );
- connect( button, SIGNAL( clicked() ), SLOT( slotPickDate() ) );
+ connect( button, TQT_SIGNAL( clicked() ), TQT_SLOT( slotPickDate() ) );
controlLayout->addWidget( button );
controlLayout->addStretch( 1 );
- button = new QPushButton( i18n("Reload"), this );
- QWhatsThis::add( button,
+ button = new TQPushButton( i18n("Reload"), this );
+ TQWhatsThis::add( button,
i18n("Reloads Free/Busy data for all attendees from "
"the corresponding servers.") );
controlLayout->addWidget( button );
- connect( button, SIGNAL( clicked() ), SLOT( manualReload() ) );
+ connect( button, TQT_SIGNAL( clicked() ), TQT_SLOT( manualReload() ) );
mGanttView = new KDGanttView( this, "mGanttView" );
- QWhatsThis::add( mGanttView,
+ TQWhatsThis::add( mGanttView,
i18n("Shows the free/busy status of all attendees. "
"Double-clicking on an attendees entry in the "
"list will allow you to enter the location of their "
@@ -292,16 +292,16 @@ KOEditorFreeBusy::KOEditorFreeBusy( int spacing, QWidget *parent,
mGanttView->setShowHeaderPopupMenu( false, false, false, false, false, false );
// Initially, show 15 days back and forth
// set start to even hours, i.e. to 12:AM 0 Min 0 Sec
- QDateTime horizonStart = QDateTime( QDateTime::currentDateTime()
+ TQDateTime horizonStart = TQDateTime( TQDateTime::currentDateTime()
.addDays( -15 ).date() );
- QDateTime horizonEnd = QDateTime::currentDateTime().addDays( 15 );
+ TQDateTime horizonEnd = TQDateTime::currentDateTime().addDays( 15 );
mGanttView->setHorizonStart( horizonStart );
mGanttView->setHorizonEnd( horizonEnd );
mGanttView->setCalendarMode( true );
//mGanttView->setDisplaySubitemsAsGroup( true );
mGanttView->setShowLegendButton( false );
// Initially, center to current date
- mGanttView->centerTimelineAfterShow( QDateTime::currentDateTime() );
+ mGanttView->centerTimelineAfterShow( TQDateTime::currentDateTime() );
if ( KGlobal::locale()->use12Clock() )
mGanttView->setHourFormat( KDGanttView::Hour_12 );
else
@@ -312,37 +312,37 @@ KOEditorFreeBusy::KOEditorFreeBusy( int spacing, QWidget *parent,
mEventRectangle->setColor( Qt::magenta );
mGanttView->addIntervalBackgroundColor( mEventRectangle );
- connect( mGanttView, SIGNAL ( timeIntervalSelected( const QDateTime &,
- const QDateTime & ) ),
- mGanttView, SLOT( zoomToSelection( const QDateTime &,
- const QDateTime & ) ) );
- connect( mGanttView, SIGNAL( lvItemDoubleClicked( KDGanttViewItem * ) ),
- SLOT( editFreeBusyUrl( KDGanttViewItem * ) ) );
- connect( mGanttView, SIGNAL( intervalColorRectangleMoved( const QDateTime&, const QDateTime& ) ),
- this, SLOT( slotIntervalColorRectangleMoved( const QDateTime&, const QDateTime& ) ) );
-
- connect( mGanttView, SIGNAL(lvSelectionChanged(KDGanttViewItem*)),
- this, SLOT(updateAttendeeInput()) );
- connect( mGanttView, SIGNAL(lvItemLeftClicked(KDGanttViewItem*)),
- this, SLOT(showAttendeeStatusMenu()) );
- connect( mGanttView, SIGNAL(lvItemRightClicked(KDGanttViewItem*)),
- this, SLOT(showAttendeeStatusMenu()) );
- connect( mGanttView, SIGNAL(lvMouseButtonClicked(int, KDGanttViewItem*, const QPoint&, int)),
- this, SLOT(listViewClicked(int, KDGanttViewItem*)) );
+ connect( mGanttView, TQT_SIGNAL ( timeIntervalSelected( const TQDateTime &,
+ const TQDateTime & ) ),
+ mGanttView, TQT_SLOT( zoomToSelection( const TQDateTime &,
+ const TQDateTime & ) ) );
+ connect( mGanttView, TQT_SIGNAL( lvItemDoubleClicked( KDGanttViewItem * ) ),
+ TQT_SLOT( editFreeBusyUrl( KDGanttViewItem * ) ) );
+ connect( mGanttView, TQT_SIGNAL( intervalColorRectangleMoved( const TQDateTime&, const TQDateTime& ) ),
+ this, TQT_SLOT( slotIntervalColorRectangleMoved( const TQDateTime&, const TQDateTime& ) ) );
+
+ connect( mGanttView, TQT_SIGNAL(lvSelectionChanged(KDGanttViewItem*)),
+ this, TQT_SLOT(updateAttendeeInput()) );
+ connect( mGanttView, TQT_SIGNAL(lvItemLeftClicked(KDGanttViewItem*)),
+ this, TQT_SLOT(showAttendeeStatusMenu()) );
+ connect( mGanttView, TQT_SIGNAL(lvItemRightClicked(KDGanttViewItem*)),
+ this, TQT_SLOT(showAttendeeStatusMenu()) );
+ connect( mGanttView, TQT_SIGNAL(lvMouseButtonClicked(int, KDGanttViewItem*, const TQPoint&, int)),
+ this, TQT_SLOT(listViewClicked(int, KDGanttViewItem*)) );
FreeBusyManager *m = KOGroupware::instance()->freeBusyManager();
- connect( m, SIGNAL( freeBusyRetrieved( KCal::FreeBusy *, const QString & ) ),
- SLOT( slotInsertFreeBusy( KCal::FreeBusy *, const QString & ) ) );
+ connect( m, TQT_SIGNAL( freeBusyRetrieved( KCal::FreeBusy *, const TQString & ) ),
+ TQT_SLOT( slotInsertFreeBusy( KCal::FreeBusy *, const TQString & ) ) );
- connect( &mReloadTimer, SIGNAL( timeout() ), SLOT( autoReload() ) );
+ connect( &mReloadTimer, TQT_SIGNAL( timeout() ), TQT_SLOT( autoReload() ) );
initEditWidgets( this, topLayout );
- connect( mRemoveButton, SIGNAL(clicked()),
- SLOT(removeAttendee()) );
+ connect( mRemoveButton, TQT_SIGNAL(clicked()),
+ TQT_SLOT(removeAttendee()) );
slotOrganizerChanged( mOrganizerCombo->currentText() );
- connect( mOrganizerCombo, SIGNAL( activated(const QString&) ),
- this, SLOT( slotOrganizerChanged(const QString&) ) );
+ connect( mOrganizerCombo, TQT_SIGNAL( activated(const TQString&) ),
+ this, TQT_SLOT( slotOrganizerChanged(const TQString&) ) );
//suppress the buggy consequences of clicks on the time header widget
mGanttView->timeHeaderWidget()->installEventFilter( this );
@@ -414,7 +414,7 @@ void KOEditorFreeBusy::readEvent( Event *event )
emit updateAttendeeSummary( mGanttView->childCount() );
}
-void KOEditorFreeBusy::slotIntervalColorRectangleMoved( const QDateTime& start, const QDateTime& end )
+void KOEditorFreeBusy::slotIntervalColorRectangleMoved( const TQDateTime& start, const TQDateTime& end )
{
kdDebug() << k_funcinfo << "slotIntervalColorRectangleMoved " << start << "," << end << endl;
mDtStart = start;
@@ -422,7 +422,7 @@ void KOEditorFreeBusy::slotIntervalColorRectangleMoved( const QDateTime& start,
emit dateTimesChanged( start, end );
}
-void KOEditorFreeBusy::setDateTimes( const QDateTime &start, const QDateTime &end )
+void KOEditorFreeBusy::setDateTimes( const TQDateTime &start, const TQDateTime &end )
{
slotUpdateGanttView( start, end );
}
@@ -460,7 +460,7 @@ void KOEditorFreeBusy::updateFreeBusyData( FreeBusyItem* item )
item->setUpdateTimerID( startTimer( 5000 ) );
}
-void KOEditorFreeBusy::timerEvent( QTimerEvent* event )
+void KOEditorFreeBusy::timerEvent( TQTimerEvent* event )
{
killTimer( event->timerId() );
FreeBusyItem *item = static_cast<FreeBusyItem *>( mGanttView->firstChild() );
@@ -477,7 +477,7 @@ void KOEditorFreeBusy::timerEvent( QTimerEvent* event )
// Set the Free Busy list for everyone having this email address
// If fb == 0, this disabled the free busy list for them
void KOEditorFreeBusy::slotInsertFreeBusy( KCal::FreeBusy *fb,
- const QString &email )
+ const TQString &email )
{
kdDebug(5850) << "KOEditorFreeBusy::slotInsertFreeBusy() " << email << endl;
@@ -499,13 +499,13 @@ void KOEditorFreeBusy::slotInsertFreeBusy( KCal::FreeBusy *fb,
Centers the Gantt view to the date/time passed in.
*/
-void KOEditorFreeBusy::slotUpdateGanttView( const QDateTime &dtFrom, const QDateTime &dtTo )
+void KOEditorFreeBusy::slotUpdateGanttView( const TQDateTime &dtFrom, const TQDateTime &dtTo )
{
mDtStart = dtFrom;
mDtEnd = dtTo;
bool block = mGanttView->getUpdateEnabled( );
mGanttView->setUpdateEnabled( false );
- QDateTime horizonStart = QDateTime( dtFrom.addDays( -15 ).date() );
+ TQDateTime horizonStart = TQDateTime( dtFrom.addDays( -15 ).date() );
mGanttView->setHorizonStart( horizonStart );
mGanttView->setHorizonEnd( dtTo.addDays( 15 ) );
mEventRectangle->setDateTimes( dtFrom, dtTo );
@@ -519,21 +519,21 @@ void KOEditorFreeBusy::slotUpdateGanttView( const QDateTime &dtFrom, const QDate
*/
void KOEditorFreeBusy::slotPickDate()
{
- QDateTime start = mDtStart;
- QDateTime end = mDtEnd;
+ TQDateTime start = mDtStart;
+ TQDateTime end = mDtEnd;
bool success = findFreeSlot( start, end );
if( success ) {
if ( start == mDtStart && end == mDtEnd ) {
KMessageBox::information( this,
- i18n( "The meeting already has suitable start/end times." ), QString::null,
+ i18n( "The meeting already has suitable start/end times." ), TQString::null,
"MeetingTimeOKFreeBusy" );
} else {
emit dateTimesChanged( start, end );
slotUpdateGanttView( start, end );
KMessageBox::information( this,
i18n( "The meeting has been moved to\nStart: %1\nEnd: %2." )
- .arg( start.toString() ).arg( end.toString() ), QString::null,
+ .arg( start.toString() ).arg( end.toString() ), TQString::null,
"MeetingMovedFreeBusy" );
}
} else
@@ -545,21 +545,21 @@ void KOEditorFreeBusy::slotPickDate()
Finds a free slot in the future which has at least the same size as
the initial slot.
*/
-bool KOEditorFreeBusy::findFreeSlot( QDateTime &dtFrom, QDateTime &dtTo )
+bool KOEditorFreeBusy::findFreeSlot( TQDateTime &dtFrom, TQDateTime &dtTo )
{
if( tryDate( dtFrom, dtTo ) )
// Current time is acceptable
return true;
- QDateTime tryFrom = dtFrom;
- QDateTime tryTo = dtTo;
+ TQDateTime tryFrom = dtFrom;
+ TQDateTime tryTo = dtTo;
// Make sure that we never suggest a date in the past, even if the
// user originally scheduled the meeting to be in the past.
- if( tryFrom < QDateTime::currentDateTime() ) {
+ if( tryFrom < TQDateTime::currentDateTime() ) {
// The slot to look for is at least partially in the past.
int secs = tryFrom.secsTo( tryTo );
- tryFrom = QDateTime::currentDateTime();
+ tryFrom = TQDateTime::currentDateTime();
tryTo = tryFrom.addSecs( secs );
}
@@ -586,7 +586,7 @@ bool KOEditorFreeBusy::findFreeSlot( QDateTime &dtFrom, QDateTime &dtTo )
that participant. In other words, the returned slot does not have to
be free for everybody else.
*/
-bool KOEditorFreeBusy::tryDate( QDateTime& tryFrom, QDateTime& tryTo )
+bool KOEditorFreeBusy::tryDate( TQDateTime& tryFrom, TQDateTime& tryTo )
{
FreeBusyItem* currentItem = static_cast<FreeBusyItem*>( mGanttView->firstChild() );
while( currentItem ) {
@@ -609,7 +609,7 @@ bool KOEditorFreeBusy::tryDate( QDateTime& tryFrom, QDateTime& tryTo )
available for all participants).
*/
bool KOEditorFreeBusy::tryDate( FreeBusyItem *attendee,
- QDateTime &tryFrom, QDateTime &tryTo )
+ TQDateTime &tryFrom, TQDateTime &tryTo )
{
// If we don't have any free/busy information, assume the
// participant is free. Otherwise a participant without available
@@ -618,8 +618,8 @@ bool KOEditorFreeBusy::tryDate( FreeBusyItem *attendee,
if( !fb )
return true;
- QValueList<KCal::Period> busyPeriods = fb->busyPeriods();
- for( QValueList<KCal::Period>::Iterator it = busyPeriods.begin();
+ TQValueList<KCal::Period> busyPeriods = fb->busyPeriods();
+ for( TQValueList<KCal::Period>::Iterator it = busyPeriods.begin();
it != busyPeriods.end(); ++it ) {
if( (*it).end() <= tryFrom || // busy period ends before try period
(*it).start() >= tryTo ) // busy period starts after try period
@@ -732,7 +732,7 @@ void KOEditorFreeBusy::editFreeBusyUrl( KDGanttViewItem *i )
void KOEditorFreeBusy::writeEvent(KCal::Event * event)
{
event->clearAttendees();
- QValueVector<FreeBusyItem*> toBeDeleted;
+ TQValueVector<FreeBusyItem*> toBeDeleted;
for ( FreeBusyItem *item = static_cast<FreeBusyItem *>( mGanttView->firstChild() ); item;
item = static_cast<FreeBusyItem*>( item->nextSibling() ) )
{
@@ -772,7 +772,7 @@ void KOEditorFreeBusy::writeEvent(KCal::Event * event)
KOAttendeeEditor::writeEvent( event );
// cleanup
- QValueVector<FreeBusyItem*>::iterator it;
+ TQValueVector<FreeBusyItem*>::iterator it;
for( it = toBeDeleted.begin(); it != toBeDeleted.end(); ++it ) {
delete *it;
}
@@ -825,11 +825,11 @@ void KOEditorFreeBusy::clearSelection() const
void KOEditorFreeBusy::changeStatusForMe(KCal::Attendee::PartStat status)
{
- const QStringList myEmails = KOPrefs::instance()->allEmails();
+ const TQStringList myEmails = KOPrefs::instance()->allEmails();
for ( FreeBusyItem *item = static_cast<FreeBusyItem *>( mGanttView->firstChild() ); item;
item = static_cast<FreeBusyItem*>( item->nextSibling() ) )
{
- for ( QStringList::ConstIterator it2( myEmails.begin() ), end( myEmails.end() ); it2 != end; ++it2 ) {
+ for ( TQStringList::ConstIterator it2( myEmails.begin() ), end( myEmails.end() ); it2 != end; ++it2 ) {
if ( item->attendee()->email() == *it2 ) {
item->attendee()->setStatus( status );
item->updateItem();
@@ -840,9 +840,9 @@ void KOEditorFreeBusy::changeStatusForMe(KCal::Attendee::PartStat status)
void KOEditorFreeBusy::showAttendeeStatusMenu()
{
- if ( mGanttView->mapFromGlobal( QCursor::pos() ).x() > 22 )
+ if ( mGanttView->mapFromGlobal( TQCursor::pos() ).x() > 22 )
return;
- QPopupMenu popup;
+ TQPopupMenu popup;
popup.insertItem( SmallIcon( "help" ), Attendee::statusName( Attendee::NeedsAction ), Attendee::NeedsAction );
popup.insertItem( KOGlobals::self()->smallIcon( "ok" ), Attendee::statusName( Attendee::Accepted ), Attendee::Accepted );
popup.insertItem( KOGlobals::self()->smallIcon( "no" ), Attendee::statusName( Attendee::Declined ), Attendee::Declined );
@@ -851,7 +851,7 @@ void KOEditorFreeBusy::showAttendeeStatusMenu()
popup.insertItem( Attendee::statusName( Attendee::Completed ), Attendee::Completed );
popup.insertItem( KOGlobals::self()->smallIcon( "help" ), Attendee::statusName( Attendee::InProcess ), Attendee::InProcess );
popup.setItemChecked( currentAttendee()->status(), true );
- int status = popup.exec( QCursor::pos() );
+ int status = popup.exec( TQCursor::pos() );
if ( status >= 0 ) {
currentAttendee()->setStatus( (Attendee::PartStat)status );
updateCurrentItem();
@@ -865,12 +865,12 @@ void KOEditorFreeBusy::listViewClicked(int button, KDGanttViewItem * item)
addNewAttendee();
}
-void KOEditorFreeBusy::slotOrganizerChanged(const QString & newOrganizer)
+void KOEditorFreeBusy::slotOrganizerChanged(const TQString & newOrganizer)
{
if (newOrganizer==mCurrentOrganizer) return;
- QString name;
- QString email;
+ TQString name;
+ TQString email;
bool success = KPIM::getNameAndMail( newOrganizer, name, email );
if (!success) return;
@@ -918,10 +918,10 @@ void KOEditorFreeBusy::slotOrganizerChanged(const QString & newOrganizer)
mCurrentOrganizer = newOrganizer;
}
-bool KOEditorFreeBusy::eventFilter( QObject *watched, QEvent *event )
+bool KOEditorFreeBusy::eventFilter( TQObject *watched, TQEvent *event )
{
if ( watched == mGanttView->timeHeaderWidget() &&
- event->type() >= QEvent::MouseButtonPress && event->type() <= QEvent::MouseMove ) {
+ event->type() >= TQEvent::MouseButtonPress && event->type() <= TQEvent::MouseMove ) {
return true;
} else {
return KOAttendeeEditor::eventFilter( watched, event );
diff --git a/korganizer/koeditorfreebusy.h b/korganizer/koeditorfreebusy.h
index 9ff3af21c..854bc1126 100644
--- a/korganizer/koeditorfreebusy.h
+++ b/korganizer/koeditorfreebusy.h
@@ -26,9 +26,9 @@
#include "koattendeeeditor.h"
-#include <qwidget.h>
-#include <qdatetime.h>
-#include <qtimer.h>
+#include <tqwidget.h>
+#include <tqdatetime.h>
+#include <tqtimer.h>
class KDIntervalColorRectangle;
class QLabel;
@@ -46,7 +46,7 @@ class KOEditorFreeBusy : public KOAttendeeEditor
{
Q_OBJECT
public:
- KOEditorFreeBusy( int spacing = 8, QWidget *parent = 0,
+ KOEditorFreeBusy( int spacing = 8, TQWidget *parent = 0,
const char *name = 0 );
virtual ~KOEditorFreeBusy();
@@ -64,17 +64,17 @@ class KOEditorFreeBusy : public KOAttendeeEditor
void cancelReload();
signals:
- void dateTimesChanged( const QDateTime &, const QDateTime & );
+ void dateTimesChanged( const TQDateTime &, const TQDateTime & );
public slots:
- void slotInsertFreeBusy( KCal::FreeBusy *fb, const QString &email );
+ void slotInsertFreeBusy( KCal::FreeBusy *fb, const TQString &email );
- void setDateTimes( const QDateTime &, const QDateTime & );
+ void setDateTimes( const TQDateTime &, const TQDateTime & );
void editFreeBusyUrl( KDGanttViewItem *item );
protected slots:
- void slotUpdateGanttView( const QDateTime &, const QDateTime & );
+ void slotUpdateGanttView( const TQDateTime &, const TQDateTime & );
void slotScaleChanged( int );
void slotCenterOnStart() ;
void slotZoomToTime();
@@ -85,43 +85,43 @@ class KOEditorFreeBusy : public KOAttendeeEditor
void manualReload();
// Only download FB if the auto-download option is set in config
void autoReload();
- void slotIntervalColorRectangleMoved( const QDateTime& start, const QDateTime& end );
+ void slotIntervalColorRectangleMoved( const TQDateTime& start, const TQDateTime& end );
void removeAttendee();
void listViewClicked( int button, KDGanttViewItem* item );
protected:
- void timerEvent( QTimerEvent* );
+ void timerEvent( TQTimerEvent* );
KCal::Attendee* currentAttendee() const;
void updateCurrentItem();
void clearSelection() const;
void changeStatusForMe( KCal::Attendee::PartStat status );
- virtual bool eventFilter( QObject *watched, QEvent *event );
+ virtual bool eventFilter( TQObject *watched, TQEvent *event );
private slots:
- void slotOrganizerChanged( const QString &newOrganizer );
+ void slotOrganizerChanged( const TQString &newOrganizer );
private:
void updateFreeBusyData( FreeBusyItem * );
- bool findFreeSlot( QDateTime &dtFrom, QDateTime &dtTo );
- bool tryDate( QDateTime &tryFrom, QDateTime &tryTo );
+ bool findFreeSlot( TQDateTime &dtFrom, TQDateTime &dtTo );
+ bool tryDate( TQDateTime &tryFrom, TQDateTime &tryTo );
bool tryDate( FreeBusyItem *attendee,
- QDateTime &tryFrom, QDateTime &tryTo );
+ TQDateTime &tryFrom, TQDateTime &tryTo );
void updateStatusSummary();
void reload();
KDGanttView *mGanttView;
KDIntervalColorRectangle* mEventRectangle;
- QLabel *mStatusSummaryLabel;
+ TQLabel *mStatusSummaryLabel;
bool mIsOrganizer;
- QComboBox *scaleCombo;
+ TQComboBox *scaleCombo;
- QDateTime mDtStart, mDtEnd;
+ TQDateTime mDtStart, mDtEnd;
- QTimer mReloadTimer;
+ TQTimer mReloadTimer;
bool mForceDownload;
- QString mCurrentOrganizer;
+ TQString mCurrentOrganizer;
};
#endif
diff --git a/korganizer/koeditorgeneral.cpp b/korganizer/koeditorgeneral.cpp
index 3a9c20071..adaea1252 100644
--- a/korganizer/koeditorgeneral.cpp
+++ b/korganizer/koeditorgeneral.cpp
@@ -23,22 +23,22 @@
*/
-#include <qwidget.h>
-#include <qtooltip.h>
-#include <qlayout.h>
-#include <qvbox.h>
-#include <qhbox.h>
-#include <qbuttongroup.h>
-#include <qvgroupbox.h>
-#include <qwidgetstack.h>
-#include <qdatetime.h>
-#include <qlineedit.h>
-#include <qlabel.h>
-#include <qcheckbox.h>
-#include <qpushbutton.h>
-#include <qcombobox.h>
-#include <qspinbox.h>
-#include <qwhatsthis.h>
+#include <tqwidget.h>
+#include <tqtooltip.h>
+#include <tqlayout.h>
+#include <tqvbox.h>
+#include <tqhbox.h>
+#include <tqbuttongroup.h>
+#include <tqvgroupbox.h>
+#include <tqwidgetstack.h>
+#include <tqdatetime.h>
+#include <tqlineedit.h>
+#include <tqlabel.h>
+#include <tqcheckbox.h>
+#include <tqpushbutton.h>
+#include <tqcombobox.h>
+#include <tqspinbox.h>
+#include <tqwhatsthis.h>
#include <kglobal.h>
#include <kdialog.h>
@@ -67,8 +67,8 @@
#include "koeditorgeneral.moc"
#include "kohelper.h"
-KOEditorGeneral::KOEditorGeneral(QObject* parent, const char* name) :
- QObject( parent, name ), mAttachments(0)
+KOEditorGeneral::KOEditorGeneral(TQObject* parent, const char* name) :
+ TQObject( parent, name ), mAttachments(0)
{
mAlarmList.setAutoDelete( true );
}
@@ -78,111 +78,111 @@ KOEditorGeneral::~KOEditorGeneral()
}
-FocusLineEdit::FocusLineEdit( QWidget *parent )
- : QLineEdit( parent ), mSkipFirst( true )
+FocusLineEdit::FocusLineEdit( TQWidget *parent )
+ : TQLineEdit( parent ), mSkipFirst( true )
{
}
-void FocusLineEdit::focusInEvent ( QFocusEvent *e )
+void FocusLineEdit::focusInEvent ( TQFocusEvent *e )
{
if ( !mSkipFirst ) {
emit focusReceivedSignal();
} else {
mSkipFirst = false;
}
- QLineEdit::focusInEvent( e );
+ TQLineEdit::focusInEvent( e );
}
-void KOEditorGeneral::initHeader( QWidget *parent,QBoxLayout *topLayout)
+void KOEditorGeneral::initHeader( TQWidget *parent,TQBoxLayout *topLayout)
{
- QGridLayout *headerLayout = new QGridLayout();
+ TQGridLayout *headerLayout = new TQGridLayout();
headerLayout->setSpacing( topLayout->spacing() );
topLayout->addLayout( headerLayout );
#if 0
- mOwnerLabel = new QLabel(i18n("Owner:"),parent);
+ mOwnerLabel = new TQLabel(i18n("Owner:"),parent);
headerLayout->addMultiCellWidget(mOwnerLabel,0,0,0,1);
#endif
- QString whatsThis = i18n("Sets the Title of this event or to-do.");
- QLabel *summaryLabel = new QLabel( i18n("T&itle:"), parent );
- QWhatsThis::add( summaryLabel, whatsThis );
- QFont f = summaryLabel->font();
+ TQString whatsThis = i18n("Sets the Title of this event or to-do.");
+ TQLabel *summaryLabel = new TQLabel( i18n("T&itle:"), parent );
+ TQWhatsThis::add( summaryLabel, whatsThis );
+ TQFont f = summaryLabel->font();
f.setBold( true );
summaryLabel->setFont(f);
headerLayout->addWidget(summaryLabel,1,0);
mSummaryEdit = new FocusLineEdit( parent );
- QWhatsThis::add( mSummaryEdit, whatsThis );
- connect( mSummaryEdit, SIGNAL( focusReceivedSignal() ),
- SIGNAL( focusReceivedSignal() ) );
+ TQWhatsThis::add( mSummaryEdit, whatsThis );
+ connect( mSummaryEdit, TQT_SIGNAL( focusReceivedSignal() ),
+ TQT_SIGNAL( focusReceivedSignal() ) );
headerLayout->addWidget(mSummaryEdit,1,1);
summaryLabel->setBuddy( mSummaryEdit );
- mAttendeeSummaryLabel = new QLabel( parent );
+ mAttendeeSummaryLabel = new TQLabel( parent );
updateAttendeeSummary( 0 );
headerLayout->addWidget( mAttendeeSummaryLabel, 1, 2 );
whatsThis = i18n("Sets where the event or to-do will take place.");
- QLabel *locationLabel = new QLabel( i18n("&Location:"), parent );
- QWhatsThis::add( locationLabel, whatsThis );
+ TQLabel *locationLabel = new TQLabel( i18n("&Location:"), parent );
+ TQWhatsThis::add( locationLabel, whatsThis );
headerLayout->addWidget(locationLabel,2,0);
- mLocationEdit = new QLineEdit( parent );
- QWhatsThis::add( mLocationEdit, whatsThis );
+ mLocationEdit = new TQLineEdit( parent );
+ TQWhatsThis::add( mLocationEdit, whatsThis );
headerLayout->addMultiCellWidget( mLocationEdit, 2, 2, 1, 2 );
locationLabel->setBuddy( mLocationEdit );
- QBoxLayout *thirdLineLayout = new QHBoxLayout();
+ TQBoxLayout *thirdLineLayout = new TQHBoxLayout();
headerLayout->addMultiCellLayout( thirdLineLayout, 3, 3, 0, 2 );
- mResourceLabel = new QLabel( parent );
+ mResourceLabel = new TQLabel( parent );
mResourceLabel->hide();
thirdLineLayout->addWidget( mResourceLabel );
whatsThis = i18n("Allows you to select the categories that this event or to-do belongs to.");
- QLabel *categoriesLabel = new QLabel( i18n("Categories:"), parent );
- QWhatsThis::add( categoriesLabel, whatsThis );
+ TQLabel *categoriesLabel = new TQLabel( i18n("Categories:"), parent );
+ TQWhatsThis::add( categoriesLabel, whatsThis );
thirdLineLayout->addWidget( categoriesLabel );
mCategoriesLabel = new KSqueezedTextLabel( parent );
- QWhatsThis::add( mCategoriesLabel, whatsThis );
- mCategoriesLabel->setFrameStyle(QFrame::Panel|QFrame::Sunken);
+ TQWhatsThis::add( mCategoriesLabel, whatsThis );
+ mCategoriesLabel->setFrameStyle(TQFrame::Panel|TQFrame::Sunken);
thirdLineLayout->addWidget( mCategoriesLabel );
- mCategoriesButton = new QPushButton( parent );
+ mCategoriesButton = new TQPushButton( parent );
mCategoriesButton->setText(i18n("&Select..."));
- QWhatsThis::add( mCategoriesButton, whatsThis );
- connect(mCategoriesButton,SIGNAL(clicked()),SLOT(selectCategories()));
+ TQWhatsThis::add( mCategoriesButton, whatsThis );
+ connect(mCategoriesButton,TQT_SIGNAL(clicked()),TQT_SLOT(selectCategories()));
thirdLineLayout->addWidget( mCategoriesButton );
}
-void KOEditorGeneral::initSecrecy(QWidget *parent, QBoxLayout *topLayout)
+void KOEditorGeneral::initSecrecy(TQWidget *parent, TQBoxLayout *topLayout)
{
- QBoxLayout *secrecyLayout = new QHBoxLayout( topLayout );
+ TQBoxLayout *secrecyLayout = new TQHBoxLayout( topLayout );
- QLabel *secrecyLabel = new QLabel(i18n("Acc&ess:"),parent);
- QString whatsThis = i18n("Sets whether the access to this event or to-do "
+ TQLabel *secrecyLabel = new TQLabel(i18n("Acc&ess:"),parent);
+ TQString whatsThis = i18n("Sets whether the access to this event or to-do "
"is restricted. Please note that KOrganizer "
"currently does not use this setting, so the "
"implementation of the restrictions will depend "
"on the groupware server. This means that events "
"or to-dos marked as private or confidential may "
"be visible to others.");
- QWhatsThis::add( secrecyLabel, whatsThis );
+ TQWhatsThis::add( secrecyLabel, whatsThis );
secrecyLayout->addWidget(secrecyLabel);
- mSecrecyCombo = new QComboBox(parent);
- QWhatsThis::add( mSecrecyCombo, whatsThis );
+ mSecrecyCombo = new TQComboBox(parent);
+ TQWhatsThis::add( mSecrecyCombo, whatsThis );
mSecrecyCombo->insertStringList(Incidence::secrecyList());
secrecyLayout->addWidget(mSecrecyCombo);
secrecyLabel->setBuddy( mSecrecyCombo );
}
-void KOEditorGeneral::initDescription(QWidget *parent,QBoxLayout *topLayout)
+void KOEditorGeneral::initDescription(TQWidget *parent,TQBoxLayout *topLayout)
{
mDescriptionEdit = new KTextEdit(parent);
- QWhatsThis::add( mDescriptionEdit,
+ TQWhatsThis::add( mDescriptionEdit,
i18n("Sets the description for this event or to-do. This "
"will be displayed in a reminder if one is set, "
"as well as in a tooltip when you hover over the "
@@ -195,70 +195,70 @@ void KOEditorGeneral::initDescription(QWidget *parent,QBoxLayout *topLayout)
topLayout->addWidget(mDescriptionEdit, 4);
}
-void KOEditorGeneral::initAlarm(QWidget *parent,QBoxLayout *topLayout)
+void KOEditorGeneral::initAlarm(TQWidget *parent,TQBoxLayout *topLayout)
{
- QBoxLayout *alarmLayout = new QHBoxLayout(topLayout);
+ TQBoxLayout *alarmLayout = new TQHBoxLayout(topLayout);
- mAlarmBell = new QLabel(parent);
+ mAlarmBell = new TQLabel(parent);
mAlarmBell->setPixmap(KOGlobals::self()->smallIcon("bell"));
alarmLayout->addWidget( mAlarmBell );
- mAlarmStack = new QWidgetStack( parent );
+ mAlarmStack = new TQWidgetStack( parent );
alarmLayout->addWidget( mAlarmStack );
- mAlarmInfoLabel = new QLabel( i18n("No reminders configured"), mAlarmStack );
+ mAlarmInfoLabel = new TQLabel( i18n("No reminders configured"), mAlarmStack );
mAlarmStack->addWidget( mAlarmInfoLabel, AdvancedAlarmLabel );
- QHBox *simpleAlarmBox = new QHBox( mAlarmStack );
+ TQHBox *simpleAlarmBox = new TQHBox( mAlarmStack );
mAlarmStack->addWidget( simpleAlarmBox, SimpleAlarmPage );
- mAlarmButton = new QCheckBox(i18n("&Reminder:"), simpleAlarmBox );
- QWhatsThis::add( mAlarmButton,
+ mAlarmButton = new TQCheckBox(i18n("&Reminder:"), simpleAlarmBox );
+ TQWhatsThis::add( mAlarmButton,
i18n("Activates a reminder for this event or to-do.") );
- QString whatsThis = i18n("Sets how long before the event occurs "
+ TQString whatsThis = i18n("Sets how long before the event occurs "
"the reminder will be triggered.");
- mAlarmTimeEdit = new QSpinBox( 0, 99999, 1, simpleAlarmBox, "alarmTimeEdit" );
+ mAlarmTimeEdit = new TQSpinBox( 0, 99999, 1, simpleAlarmBox, "alarmTimeEdit" );
mAlarmTimeEdit->setValue( 0 );
- QWhatsThis::add( mAlarmTimeEdit, whatsThis );
+ TQWhatsThis::add( mAlarmTimeEdit, whatsThis );
- mAlarmIncrCombo = new QComboBox( false, simpleAlarmBox );
- QWhatsThis::add( mAlarmIncrCombo, whatsThis );
+ mAlarmIncrCombo = new TQComboBox( false, simpleAlarmBox );
+ TQWhatsThis::add( mAlarmIncrCombo, whatsThis );
mAlarmIncrCombo->insertItem( i18n("minute(s)") );
mAlarmIncrCombo->insertItem( i18n("hour(s)") );
mAlarmIncrCombo->insertItem( i18n("day(s)") );
// mAlarmIncrCombo->setMinimumHeight(20);
- connect(mAlarmButton, SIGNAL(toggled(bool)), mAlarmTimeEdit, SLOT(setEnabled(bool)));
- connect(mAlarmButton, SIGNAL(toggled(bool)), mAlarmIncrCombo, SLOT(setEnabled(bool)));
+ connect(mAlarmButton, TQT_SIGNAL(toggled(bool)), mAlarmTimeEdit, TQT_SLOT(setEnabled(bool)));
+ connect(mAlarmButton, TQT_SIGNAL(toggled(bool)), mAlarmIncrCombo, TQT_SLOT(setEnabled(bool)));
mAlarmTimeEdit->setEnabled( false );
mAlarmIncrCombo->setEnabled( false );
- mAlarmEditButton = new QPushButton( i18n("Advanced"), parent );
+ mAlarmEditButton = new TQPushButton( i18n("Advanced"), parent );
mAlarmEditButton->setEnabled( false );
alarmLayout->addWidget( mAlarmEditButton );
- connect( mAlarmButton, SIGNAL(toggled(bool)), mAlarmEditButton, SLOT(setEnabled( bool)));
- connect( mAlarmEditButton, SIGNAL( clicked() ),
- SLOT( editAlarms() ) );
+ connect( mAlarmButton, TQT_SIGNAL(toggled(bool)), mAlarmEditButton, TQT_SLOT(setEnabled( bool)));
+ connect( mAlarmEditButton, TQT_SIGNAL( clicked() ),
+ TQT_SLOT( editAlarms() ) );
}
-void KOEditorGeneral::initAttachments(QWidget *parent,QBoxLayout *topLayout)
+void KOEditorGeneral::initAttachments(TQWidget *parent,TQBoxLayout *topLayout)
{
mAttachments = new KOEditorAttachments( KDialog::spacingHint(), parent );
- connect( mAttachments, SIGNAL( openURL( const KURL & ) ) ,
- this, SIGNAL( openURL( const KURL & ) ) );
+ connect( mAttachments, TQT_SIGNAL( openURL( const KURL & ) ) ,
+ this, TQT_SIGNAL( openURL( const KURL & ) ) );
topLayout->addWidget( mAttachments, 1 );
}
-void KOEditorGeneral::addAttachments( const QStringList &attachments,
- const QStringList &mimeTypes,
+void KOEditorGeneral::addAttachments( const TQStringList &attachments,
+ const TQStringList &mimeTypes,
bool inlineAttachments )
{
- QStringList::ConstIterator it;
+ TQStringList::ConstIterator it;
uint i = 0;
for ( it = attachments.begin(); it != attachments.end(); ++it, ++i ) {
- QString mimeType;
+ TQString mimeType;
if ( mimeTypes.count() > i )
mimeType = mimeTypes[ i ];
mAttachments->addAttachment( *it, mimeType, !inlineAttachments );
@@ -271,8 +271,8 @@ void KOEditorGeneral::selectCategories()
KOGlobals::fitDialogToScreen( categoryDialog );
categoryDialog->setSelected( mCategories );
- connect(categoryDialog, SIGNAL(editCategories()), this, SIGNAL(openCategoryDialog()));
- connect(this, SIGNAL(updateCategoryConfig()), categoryDialog, SLOT(updateCategoryConfig()));
+ connect(categoryDialog, TQT_SIGNAL(editCategories()), this, TQT_SIGNAL(openCategoryDialog()));
+ connect(this, TQT_SIGNAL(updateCategoryConfig()), categoryDialog, TQT_SLOT(updateCategoryConfig()));
if ( categoryDialog->exec() ) {
setCategories( categoryDialog->selectedCategories() );
@@ -310,7 +310,7 @@ void KOEditorGeneral::toggleAlarm( bool on )
mAlarmButton->setChecked( on );
}
-void KOEditorGeneral::setCategories( const QStringList &categories )
+void KOEditorGeneral::setCategories( const TQStringList &categories )
{
mCategoriesLabel->setText( categories.join(",") );
mCategories = categories;
@@ -422,7 +422,7 @@ void KOEditorGeneral::readIncidence(Incidence *event, Calendar *calendar)
mAttachments->readIncidence( event );
- QString resLabel = KOHelper::resourceLabel( calendar, event );
+ TQString resLabel = KOHelper::resourceLabel( calendar, event );
if ( !resLabel.isEmpty() ) {
mResourceLabel->setText( i18n( "Calendar: %1" ).arg( resLabel ) );
mResourceLabel->show();
@@ -435,7 +435,7 @@ Alarm *KOEditorGeneral::alarmFromSimplePage() const
Alarm *alarm = new Alarm( 0 );
alarm->setDisplayAlarm("");
alarm->setEnabled(true);
- QString tmpStr = mAlarmTimeEdit->text();
+ TQString tmpStr = mAlarmTimeEdit->text();
int j = mAlarmTimeEdit->value() * -60;
if (mAlarmIncrCombo->currentItem() == 1)
j = j * 60;
@@ -478,17 +478,17 @@ void KOEditorGeneral::writeIncidence(Incidence *event)
mAttachments->writeIncidence( event );
}
-void KOEditorGeneral::setSummary( const QString &text )
+void KOEditorGeneral::setSummary( const TQString &text )
{
mSummaryEdit->setText( text );
}
-void KOEditorGeneral::setDescription( const QString &text )
+void KOEditorGeneral::setDescription( const TQString &text )
{
mDescriptionEdit->setText( text );
}
-QObject *KOEditorGeneral::typeAheadReceiver() const
+TQObject *KOEditorGeneral::typeAheadReceiver() const
{
return mSummaryEdit;
}
diff --git a/korganizer/koeditorgeneral.h b/korganizer/koeditorgeneral.h
index b369c2389..c2d1867b9 100644
--- a/korganizer/koeditorgeneral.h
+++ b/korganizer/koeditorgeneral.h
@@ -24,7 +24,7 @@
#define KOEDITORGENERAL_H
#include <libkcal/alarm.h>
-#include <qlineedit.h>
+#include <tqlineedit.h>
class QWidget;
class QBoxLayout;
@@ -50,13 +50,13 @@ class FocusLineEdit : public QLineEdit
{
Q_OBJECT
public:
- FocusLineEdit( QWidget *parent );
+ FocusLineEdit( TQWidget *parent );
signals:
void focusReceivedSignal();
protected:
- void focusInEvent ( QFocusEvent *e );
+ void focusInEvent ( TQFocusEvent *e );
private:
bool mSkipFirst;
@@ -66,14 +66,14 @@ class KOEditorGeneral : public QObject
{
Q_OBJECT
public:
- KOEditorGeneral (QObject* parent=0,const char* name=0);
+ KOEditorGeneral (TQObject* parent=0,const char* name=0);
virtual ~KOEditorGeneral();
- void initHeader( QWidget *parent,QBoxLayout *topLayout );
- void initDescription(QWidget *,QBoxLayout *);
- void initSecrecy(QWidget *,QBoxLayout *);
- void initAlarm(QWidget *,QBoxLayout *);
- void initAttachments(QWidget *,QBoxLayout *);
+ void initHeader( TQWidget *parent,TQBoxLayout *topLayout );
+ void initDescription(TQWidget *,TQBoxLayout *);
+ void initSecrecy(TQWidget *,TQBoxLayout *);
+ void initAlarm(TQWidget *,TQBoxLayout *);
+ void initAttachments(TQWidget *,TQBoxLayout *);
/** Set widgets to default values */
void setDefaults(bool allDay);
@@ -88,16 +88,16 @@ class KOEditorGeneral : public QObject
void enableAlarm( bool enable );
void toggleAlarm( bool on );
- void setSummary( const QString & );
- void setDescription( const QString & );
+ void setSummary( const TQString & );
+ void setDescription( const TQString & );
- QObject *typeAheadReceiver() const;
+ TQObject *typeAheadReceiver() const;
public slots:
- void setCategories(const QStringList &categories);
+ void setCategories(const TQStringList &categories);
void selectCategories();
- void addAttachments( const QStringList &attachments,
- const QStringList& mimeTypes = QStringList(),
+ void addAttachments( const TQStringList &attachments,
+ const TQStringList& mimeTypes = TQStringList(),
bool inlineAttachment = false );
@@ -115,28 +115,28 @@ class KOEditorGeneral : public QObject
protected:
Alarm *alarmFromSimplePage() const;
- QLineEdit *mSummaryEdit;
- QLineEdit *mLocationEdit;
- QLabel *mAttendeeSummaryLabel;
- QLabel *mAlarmBell;
- QWidgetStack *mAlarmStack;
- QLabel *mAlarmInfoLabel;
- QCheckBox *mAlarmButton;
- QSpinBox *mAlarmTimeEdit;
- QComboBox *mAlarmIncrCombo;
- QPushButton *mAlarmEditButton;
+ TQLineEdit *mSummaryEdit;
+ TQLineEdit *mLocationEdit;
+ TQLabel *mAttendeeSummaryLabel;
+ TQLabel *mAlarmBell;
+ TQWidgetStack *mAlarmStack;
+ TQLabel *mAlarmInfoLabel;
+ TQCheckBox *mAlarmButton;
+ TQSpinBox *mAlarmTimeEdit;
+ TQComboBox *mAlarmIncrCombo;
+ TQPushButton *mAlarmEditButton;
KTextEdit *mDescriptionEdit;
- QLabel *mOwnerLabel;
- QComboBox *mSecrecyCombo;
- QPushButton *mCategoriesButton;
+ TQLabel *mOwnerLabel;
+ TQComboBox *mSecrecyCombo;
+ TQPushButton *mCategoriesButton;
KSqueezedTextLabel *mCategoriesLabel;
KOEditorAttachments *mAttachments;
- QLabel *mResourceLabel;
+ TQLabel *mResourceLabel;
enum AlarmStackPages { SimpleAlarmPage, AdvancedAlarmLabel };
private:
- QStringList mCategories;
+ TQStringList mCategories;
KCal::Alarm::List mAlarmList;
};
diff --git a/korganizer/koeditorgeneralevent.cpp b/korganizer/koeditorgeneralevent.cpp
index e9bc44d6d..24e8b4ca2 100644
--- a/korganizer/koeditorgeneralevent.cpp
+++ b/korganizer/koeditorgeneralevent.cpp
@@ -22,19 +22,19 @@
without including the source code for Qt in the source distribution.
*/
-#include <qtooltip.h>
-#include <qlayout.h>
-#include <qvbox.h>
-#include <qbuttongroup.h>
-#include <qvgroupbox.h>
-#include <qwidgetstack.h>
-#include <qspinbox.h>
-#include <qdatetime.h>
-#include <qlabel.h>
-#include <qcheckbox.h>
-#include <qcombobox.h>
-#include <qpushbutton.h>
-#include <qwhatsthis.h>
+#include <tqtooltip.h>
+#include <tqlayout.h>
+#include <tqvbox.h>
+#include <tqbuttongroup.h>
+#include <tqvgroupbox.h>
+#include <tqwidgetstack.h>
+#include <tqspinbox.h>
+#include <tqdatetime.h>
+#include <tqlabel.h>
+#include <tqcheckbox.h>
+#include <tqcombobox.h>
+#include <tqpushbutton.h>
+#include <tqwhatsthis.h>
#include <kdebug.h>
#include <kglobal.h>
@@ -56,14 +56,14 @@
#include "koeditorgeneralevent.h"
#include "koeditorgeneralevent.moc"
-KOEditorGeneralEvent::KOEditorGeneralEvent(QObject* parent,
+KOEditorGeneralEvent::KOEditorGeneralEvent(TQObject* parent,
const char* name) :
KOEditorGeneral( parent, name)
{
- connect( this, SIGNAL( dateTimesChanged( const QDateTime &, const QDateTime & )),
- SLOT( setDuration() ) );
- connect( this, SIGNAL( dateTimesChanged( const QDateTime &, const QDateTime & )),
- SLOT( emitDateTimeStr() ));
+ connect( this, TQT_SIGNAL( dateTimesChanged( const TQDateTime &, const TQDateTime & )),
+ TQT_SLOT( setDuration() ) );
+ connect( this, TQT_SIGNAL( dateTimesChanged( const TQDateTime &, const TQDateTime & )),
+ TQT_SLOT( emitDateTimeStr() ));
}
KOEditorGeneralEvent::~KOEditorGeneralEvent()
@@ -72,46 +72,46 @@ KOEditorGeneralEvent::~KOEditorGeneralEvent()
void KOEditorGeneralEvent::finishSetup()
{
- QWidget::setTabOrder( mSummaryEdit, mLocationEdit );
- QWidget::setTabOrder( mLocationEdit, mStartDateEdit );
- QWidget::setTabOrder( mStartDateEdit, mStartTimeEdit );
- QWidget::setTabOrder( mStartTimeEdit, mEndDateEdit );
- QWidget::setTabOrder( mEndDateEdit, mEndTimeEdit );
- QWidget::setTabOrder( mEndTimeEdit, mAlldayEventCheckbox );
- QWidget::setTabOrder( mAlldayEventCheckbox, mAlarmButton );
- QWidget::setTabOrder( mAlarmButton, mAlarmTimeEdit );
- QWidget::setTabOrder( mAlarmTimeEdit, mAlarmIncrCombo );
-// QWidget::setTabOrder( mAlarmIncrCombo, mAlarmSoundButton );
- QWidget::setTabOrder( mAlarmIncrCombo, mAlarmEditButton );
-// QWidget::setTabOrder( mAlarmSoundButton, mAlarmProgramButton );
-// QWidget::setTabOrder( mAlarmProgramButton, mFreeTimeCombo );
- QWidget::setTabOrder( mAlarmEditButton, mFreeTimeCombo );
- QWidget::setTabOrder( mFreeTimeCombo, mDescriptionEdit );
- QWidget::setTabOrder( mDescriptionEdit, mCategoriesButton );
- QWidget::setTabOrder( mCategoriesButton, mSecrecyCombo );
-// QWidget::setTabOrder( mSecrecyCombo, mDescriptionEdit );
+ TQWidget::setTabOrder( mSummaryEdit, mLocationEdit );
+ TQWidget::setTabOrder( mLocationEdit, mStartDateEdit );
+ TQWidget::setTabOrder( mStartDateEdit, mStartTimeEdit );
+ TQWidget::setTabOrder( mStartTimeEdit, mEndDateEdit );
+ TQWidget::setTabOrder( mEndDateEdit, mEndTimeEdit );
+ TQWidget::setTabOrder( mEndTimeEdit, mAlldayEventCheckbox );
+ TQWidget::setTabOrder( mAlldayEventCheckbox, mAlarmButton );
+ TQWidget::setTabOrder( mAlarmButton, mAlarmTimeEdit );
+ TQWidget::setTabOrder( mAlarmTimeEdit, mAlarmIncrCombo );
+// TQWidget::setTabOrder( mAlarmIncrCombo, mAlarmSoundButton );
+ TQWidget::setTabOrder( mAlarmIncrCombo, mAlarmEditButton );
+// TQWidget::setTabOrder( mAlarmSoundButton, mAlarmProgramButton );
+// TQWidget::setTabOrder( mAlarmProgramButton, mFreeTimeCombo );
+ TQWidget::setTabOrder( mAlarmEditButton, mFreeTimeCombo );
+ TQWidget::setTabOrder( mFreeTimeCombo, mDescriptionEdit );
+ TQWidget::setTabOrder( mDescriptionEdit, mCategoriesButton );
+ TQWidget::setTabOrder( mCategoriesButton, mSecrecyCombo );
+// TQWidget::setTabOrder( mSecrecyCombo, mDescriptionEdit );
mSummaryEdit->setFocus();
}
-void KOEditorGeneralEvent::initTime(QWidget *parent,QBoxLayout *topLayout)
+void KOEditorGeneralEvent::initTime(TQWidget *parent,TQBoxLayout *topLayout)
{
- QBoxLayout *timeLayout = new QVBoxLayout(topLayout);
+ TQBoxLayout *timeLayout = new TQVBoxLayout(topLayout);
- QGroupBox *timeGroupBox = new QGroupBox(1,QGroupBox::Horizontal,
+ TQGroupBox *timeGroupBox = new TQGroupBox(1,TQGroupBox::Horizontal,
i18n("Date && Time"),parent);
- QWhatsThis::add( timeGroupBox,
+ TQWhatsThis::add( timeGroupBox,
i18n("Sets options related to the date and time of the "
"event or to-do.") );
timeLayout->addWidget(timeGroupBox);
- QFrame *timeBoxFrame = new QFrame(timeGroupBox);
+ TQFrame *timeBoxFrame = new TQFrame(timeGroupBox);
- QGridLayout *layoutTimeBox = new QGridLayout( timeBoxFrame );
+ TQGridLayout *layoutTimeBox = new TQGridLayout( timeBoxFrame );
layoutTimeBox->setSpacing(topLayout->spacing());
layoutTimeBox->setColStretch( 3, 1 );
- mStartDateLabel = new QLabel(i18n("&Start:"),timeBoxFrame);
+ mStartDateLabel = new TQLabel(i18n("&Start:"),timeBoxFrame);
layoutTimeBox->addWidget(mStartDateLabel,0,0);
mStartDateEdit = new KDateEdit(timeBoxFrame);
@@ -122,7 +122,7 @@ void KOEditorGeneralEvent::initTime(QWidget *parent,QBoxLayout *topLayout)
layoutTimeBox->addWidget(mStartTimeEdit,0,2);
- mEndDateLabel = new QLabel(i18n("&End:"),timeBoxFrame);
+ mEndDateLabel = new TQLabel(i18n("&End:"),timeBoxFrame);
layoutTimeBox->addWidget(mEndDateLabel,1,0);
mEndDateEdit = new KDateEdit(timeBoxFrame);
@@ -132,87 +132,87 @@ void KOEditorGeneralEvent::initTime(QWidget *parent,QBoxLayout *topLayout)
mEndTimeEdit = new KTimeEdit(timeBoxFrame);
layoutTimeBox->addWidget(mEndTimeEdit,1,2);
- mAlldayEventCheckbox = new QCheckBox(i18n("All-&day"),timeBoxFrame);
+ mAlldayEventCheckbox = new TQCheckBox(i18n("All-&day"),timeBoxFrame);
layoutTimeBox->addWidget( mAlldayEventCheckbox, 0, 3 );
- connect(mAlldayEventCheckbox, SIGNAL(toggled(bool)),SLOT(associateTime(bool)));
+ connect(mAlldayEventCheckbox, TQT_SIGNAL(toggled(bool)),TQT_SLOT(associateTime(bool)));
- mDurationLabel = new QLabel( timeBoxFrame );
+ mDurationLabel = new TQLabel( timeBoxFrame );
layoutTimeBox->addWidget( mDurationLabel, 1, 3 );
// time widgets are checked if they contain a valid time
- connect(mStartTimeEdit, SIGNAL(timeChanged(QTime)),
- this, SLOT(startTimeChanged(QTime)));
- connect(mEndTimeEdit, SIGNAL(timeChanged(QTime)),
- this, SLOT(endTimeChanged(QTime)));
+ connect(mStartTimeEdit, TQT_SIGNAL(timeChanged(TQTime)),
+ this, TQT_SLOT(startTimeChanged(TQTime)));
+ connect(mEndTimeEdit, TQT_SIGNAL(timeChanged(TQTime)),
+ this, TQT_SLOT(endTimeChanged(TQTime)));
// date widgets are checked if they contain a valid date
- connect(mStartDateEdit, SIGNAL(dateChanged(const QDate&)),
- this, SLOT(startDateChanged(const QDate&)));
- connect(mEndDateEdit, SIGNAL(dateChanged(const QDate&)),
- this, SLOT(endDateChanged(const QDate&)));
+ connect(mStartDateEdit, TQT_SIGNAL(dateChanged(const TQDate&)),
+ this, TQT_SLOT(startDateChanged(const TQDate&)));
+ connect(mEndDateEdit, TQT_SIGNAL(dateChanged(const TQDate&)),
+ this, TQT_SLOT(endDateChanged(const TQDate&)));
- QBoxLayout *recLayout = new QHBoxLayout();
+ TQBoxLayout *recLayout = new TQHBoxLayout();
layoutTimeBox->addMultiCellLayout( recLayout, 2, 2, 1, 4 );
- mRecurrenceSummary = new QLabel( QString(), timeBoxFrame );
+ mRecurrenceSummary = new TQLabel( TQString(), timeBoxFrame );
recLayout->addWidget( mRecurrenceSummary );
- QPushButton *recEditButton = new QPushButton( i18n("Edit..."), timeBoxFrame );
+ TQPushButton *recEditButton = new TQPushButton( i18n("Edit..."), timeBoxFrame );
recLayout->addWidget( recEditButton );
- connect( recEditButton, SIGNAL(clicked()), SIGNAL(editRecurrence()) );
+ connect( recEditButton, TQT_SIGNAL(clicked()), TQT_SIGNAL(editRecurrence()) );
recLayout->addStretch( 1 );
- QLabel *label = new QLabel( i18n("Reminder:"), timeBoxFrame );
+ TQLabel *label = new TQLabel( i18n("Reminder:"), timeBoxFrame );
layoutTimeBox->addWidget( label, 3, 0 );
- QBoxLayout *alarmLineLayout = new QHBoxLayout();
+ TQBoxLayout *alarmLineLayout = new TQHBoxLayout();
layoutTimeBox->addMultiCellLayout( alarmLineLayout, 3, 3, 1, 4 );
initAlarm( timeBoxFrame, alarmLineLayout );
alarmLineLayout->addStretch( 1 );
- QBoxLayout *secLayout = new QHBoxLayout();
+ TQBoxLayout *secLayout = new TQHBoxLayout();
layoutTimeBox->addLayout( secLayout, 0, 4 );
initSecrecy( timeBoxFrame, secLayout );
- QBoxLayout *classLayout = new QHBoxLayout();
+ TQBoxLayout *classLayout = new TQHBoxLayout();
layoutTimeBox->addLayout( classLayout, 1, 4 );
initClass( timeBoxFrame, classLayout );
}
-void KOEditorGeneralEvent::initClass(QWidget *parent,QBoxLayout *topLayout)
+void KOEditorGeneralEvent::initClass(TQWidget *parent,TQBoxLayout *topLayout)
{
- QBoxLayout *classLayout = new QHBoxLayout(topLayout);
+ TQBoxLayout *classLayout = new TQHBoxLayout(topLayout);
- QLabel *freeTimeLabel = new QLabel(i18n("S&how time as:"),parent);
- QString whatsThis = i18n("Sets how this time will appear on your Free/Busy "
+ TQLabel *freeTimeLabel = new TQLabel(i18n("S&how time as:"),parent);
+ TQString whatsThis = i18n("Sets how this time will appear on your Free/Busy "
"information.");
- QWhatsThis::add( freeTimeLabel, whatsThis );
+ TQWhatsThis::add( freeTimeLabel, whatsThis );
classLayout->addWidget(freeTimeLabel);
- mFreeTimeCombo = new QComboBox(false, parent);
- QWhatsThis::add( mFreeTimeCombo, whatsThis );
+ mFreeTimeCombo = new TQComboBox(false, parent);
+ TQWhatsThis::add( mFreeTimeCombo, whatsThis );
mFreeTimeCombo->insertItem(i18n("Busy"));
mFreeTimeCombo->insertItem(i18n("Free"));
classLayout->addWidget(mFreeTimeCombo);
freeTimeLabel->setBuddy( mFreeTimeCombo );
}
-void KOEditorGeneralEvent::initInvitationBar(QWidget * parent, QBoxLayout * layout)
+void KOEditorGeneralEvent::initInvitationBar(TQWidget * parent, TQBoxLayout * layout)
{
- QBoxLayout *topLayout = new QHBoxLayout( layout );
- mInvitationBar = new QFrame( parent );
+ TQBoxLayout *topLayout = new TQHBoxLayout( layout );
+ mInvitationBar = new TQFrame( parent );
mInvitationBar->setPaletteBackgroundColor( KGlobalSettings::alternateBackgroundColor() );
topLayout->addWidget( mInvitationBar );
- QBoxLayout *barLayout = new QHBoxLayout( mInvitationBar );
+ TQBoxLayout *barLayout = new TQHBoxLayout( mInvitationBar );
barLayout->setSpacing( layout->spacing() );
- QLabel *label = new QLabel( i18n("You have not yet definitely responded to this invitation." ), mInvitationBar );
+ TQLabel *label = new TQLabel( i18n("You have not yet definitely responded to this invitation." ), mInvitationBar );
barLayout->addWidget( label );
barLayout->addStretch( 1 );
- QPushButton *button = new QPushButton( i18n("Accept"), mInvitationBar );
- connect( button, SIGNAL(clicked()), SIGNAL(acceptInvitation()) );
- connect( button, SIGNAL(clicked()), mInvitationBar, SLOT(hide()) );
+ TQPushButton *button = new TQPushButton( i18n("Accept"), mInvitationBar );
+ connect( button, TQT_SIGNAL(clicked()), TQT_SIGNAL(acceptInvitation()) );
+ connect( button, TQT_SIGNAL(clicked()), mInvitationBar, TQT_SLOT(hide()) );
barLayout->addWidget( button );
- button = new QPushButton( i18n("Decline"), mInvitationBar );
- connect( button, SIGNAL(clicked()), SIGNAL(declineInvitation()) );
- connect( button, SIGNAL(clicked()), mInvitationBar, SLOT(hide()) );
+ button = new TQPushButton( i18n("Decline"), mInvitationBar );
+ connect( button, TQT_SIGNAL(clicked()), TQT_SIGNAL(declineInvitation()) );
+ connect( button, TQT_SIGNAL(clicked()), mInvitationBar, TQT_SLOT(hide()) );
barLayout->addWidget( button );
mInvitationBar->hide();
@@ -234,7 +234,7 @@ void KOEditorGeneralEvent::associateTime(bool time)
allDayChanged(time);
}
-void KOEditorGeneralEvent::setDateTimes( const QDateTime &start, const QDateTime &end )
+void KOEditorGeneralEvent::setDateTimes( const TQDateTime &start, const TQDateTime &end )
{
// kdDebug(5850) << "KOEditorGeneralEvent::setDateTimes(): Start DateTime: " << start.toString() << endl;
@@ -253,7 +253,7 @@ void KOEditorGeneralEvent::setDateTimes( const QDateTime &start, const QDateTime
emitDateTimeStr();
}
-void KOEditorGeneralEvent::startTimeChanged( QTime newtime )
+void KOEditorGeneralEvent::startTimeChanged( TQTime newtime )
{
kdDebug(5850) << "KOEditorGeneralEvent::startTimeChanged() " << newtime.toString() << endl;
@@ -269,17 +269,17 @@ void KOEditorGeneralEvent::startTimeChanged( QTime newtime )
emit dateTimesChanged(mCurrStartDateTime,mCurrEndDateTime);
}
-void KOEditorGeneralEvent::endTimeChanged( QTime newtime )
+void KOEditorGeneralEvent::endTimeChanged( TQTime newtime )
{
// kdDebug(5850) << "KOEditorGeneralEvent::endTimeChanged " << newtime.toString() << endl;
- QDateTime newdt(mCurrEndDateTime.date(), newtime);
+ TQDateTime newdt(mCurrEndDateTime.date(), newtime);
mCurrEndDateTime = newdt;
emit dateTimesChanged(mCurrStartDateTime,mCurrEndDateTime);
}
-void KOEditorGeneralEvent::startDateChanged( const QDate &newdate )
+void KOEditorGeneralEvent::startDateChanged( const TQDate &newdate )
{
if ( !newdate.isValid() )
return;
@@ -295,19 +295,19 @@ void KOEditorGeneralEvent::startDateChanged( const QDate &newdate )
emit dateTimesChanged(mCurrStartDateTime,mCurrEndDateTime);
}
-void KOEditorGeneralEvent::endDateChanged( const QDate &newdate )
+void KOEditorGeneralEvent::endDateChanged( const TQDate &newdate )
{
if ( !newdate.isValid() )
return;
- QDateTime newdt(newdate, mCurrEndDateTime.time());
+ TQDateTime newdt(newdate, mCurrEndDateTime.time());
mCurrEndDateTime = newdt;
emit dateTimesChanged(mCurrStartDateTime,mCurrEndDateTime);
}
-void KOEditorGeneralEvent::setDefaults( const QDateTime &from,
- const QDateTime &to, bool allDay)
+void KOEditorGeneralEvent::setDefaults( const TQDateTime &from,
+ const TQDateTime &to, bool allDay)
{
KOEditorGeneral::setDefaults(allDay);
@@ -319,7 +319,7 @@ void KOEditorGeneralEvent::setDefaults( const QDateTime &from,
void KOEditorGeneralEvent::readEvent( Event *event, Calendar *calendar, bool tmpl )
{
- QString tmpStr;
+ TQString tmpStr;
mAlldayEventCheckbox->setChecked(event->doesFloat());
timeStuffDisable(event->doesFloat());
@@ -357,12 +357,12 @@ void KOEditorGeneralEvent::writeEvent(Event *event)
writeIncidence(event);
- QDate tmpDate;
- QTime tmpTime;
- QDateTime tmpDT;
+ TQDate tmpDate;
+ TQTime tmpTime;
+ TQDateTime tmpDT;
// temp. until something better happens.
- QString tmpStr;
+ TQString tmpStr;
if (mAlldayEventCheckbox->isChecked()) {
event->setFloats(true);
@@ -405,7 +405,7 @@ void KOEditorGeneralEvent::writeEvent(Event *event)
void KOEditorGeneralEvent::setDuration()
{
- QString tmpStr, catStr;
+ TQString tmpStr, catStr;
int hourdiff, minutediff;
// end<date is an accepted temporary state while typing, but don't show
// any duration if this happens
@@ -443,7 +443,7 @@ void KOEditorGeneralEvent::setDuration()
}
}
mDurationLabel->setText(tmpStr);
- QWhatsThis::add( mDurationLabel,
+ TQWhatsThis::add( mDurationLabel,
i18n("Shows the duration of the event or to-do with the "
"current start and end dates and times.") );
}
@@ -452,7 +452,7 @@ void KOEditorGeneralEvent::emitDateTimeStr()
{
KLocale *l = KGlobal::locale();
- QString from,to;
+ TQString from,to;
if (mAlldayEventCheckbox->isChecked()) {
from = l->formatDate(mCurrStartDateTime.date());
to = l->formatDate(mCurrEndDateTime.date());
@@ -461,7 +461,7 @@ void KOEditorGeneralEvent::emitDateTimeStr()
to = l->formatDateTime(mCurrEndDateTime);
}
- QString str = i18n("From: %1 To: %2 %3").arg(from).arg(to)
+ TQString str = i18n("From: %1 To: %2 %3").arg(from).arg(to)
.arg(mDurationLabel->text());
emit dateTimeStrChanged(str);
@@ -475,14 +475,14 @@ bool KOEditorGeneralEvent::validateInput()
if (!mStartTimeEdit->inputIsValid()) {
KMessageBox::sorry( 0,
i18n("Please specify a valid start time, for example '%1'.")
- .arg( KGlobal::locale()->formatTime( QTime::currentTime() ) ) );
+ .arg( KGlobal::locale()->formatTime( TQTime::currentTime() ) ) );
return false;
}
if (!mEndTimeEdit->inputIsValid()) {
KMessageBox::sorry( 0,
i18n("Please specify a valid end time, for example '%1'.")
- .arg( KGlobal::locale()->formatTime( QTime::currentTime() ) ) );
+ .arg( KGlobal::locale()->formatTime( TQTime::currentTime() ) ) );
return false;
}
}
@@ -490,18 +490,18 @@ bool KOEditorGeneralEvent::validateInput()
if (!mStartDateEdit->date().isValid()) {
KMessageBox::sorry( 0,
i18n("Please specify a valid start date, for example '%1'.")
- .arg( KGlobal::locale()->formatDate( QDate::currentDate() ) ) );
+ .arg( KGlobal::locale()->formatDate( TQDate::currentDate() ) ) );
return false;
}
if (!mEndDateEdit->date().isValid()) {
KMessageBox::sorry( 0,
i18n("Please specify a valid end date, for example '%1'.")
- .arg( KGlobal::locale()->formatDate( QDate::currentDate() ) ) );
+ .arg( KGlobal::locale()->formatDate( TQDate::currentDate() ) ) );
return false;
}
- QDateTime startDt,endDt;
+ TQDateTime startDt,endDt;
startDt.setDate(mStartDateEdit->date());
endDt.setDate(mEndDateEdit->date());
if (!mAlldayEventCheckbox->isChecked()) {
@@ -518,7 +518,7 @@ bool KOEditorGeneralEvent::validateInput()
return KOEditorGeneral::validateInput();
}
-void KOEditorGeneralEvent::updateRecurrenceSummary(const QString & summary)
+void KOEditorGeneralEvent::updateRecurrenceSummary(const TQString & summary)
{
mRecurrenceSummary->setText( summary );
}
diff --git a/korganizer/koeditorgeneralevent.h b/korganizer/koeditorgeneralevent.h
index 67fc51e4d..21a7dfc4d 100644
--- a/korganizer/koeditorgeneralevent.h
+++ b/korganizer/koeditorgeneralevent.h
@@ -25,7 +25,7 @@
#define _KOEDITORGENERALEVENT_H
#include "koeditorgeneral.h"
-#include <qdatetime.h>
+#include <tqdatetime.h>
class QLabel;
class KDateEdit;
@@ -43,17 +43,17 @@ class KOEditorGeneralEvent : public KOEditorGeneral
{
Q_OBJECT
public:
- KOEditorGeneralEvent (QObject* parent=0,const char* name=0);
+ KOEditorGeneralEvent (TQObject* parent=0,const char* name=0);
virtual ~KOEditorGeneralEvent();
- void initTime(QWidget *,QBoxLayout *);
- void initClass(QWidget *,QBoxLayout *);
- void initInvitationBar( QWidget* parent, QBoxLayout *layout );
+ void initTime(TQWidget *,TQBoxLayout *);
+ void initClass(TQWidget *,TQBoxLayout *);
+ void initInvitationBar( TQWidget* parent, TQBoxLayout *layout );
void finishSetup();
/** Set widgets to default values */
- void setDefaults( const QDateTime &from, const QDateTime &to, bool allDay );
+ void setDefaults( const TQDateTime &from, const TQDateTime &to, bool allDay );
/**
Read event object and setup widgets accordingly. If templ is true, the
event is read as template, i.e. the time and date information isn't set.
@@ -65,49 +65,49 @@ class KOEditorGeneralEvent : public KOEditorGeneral
/** Check if the input is valid. */
bool validateInput();
- void updateRecurrenceSummary( const QString &summary );
+ void updateRecurrenceSummary( const TQString &summary );
- QFrame* invitationBar() const { return mInvitationBar; }
+ TQFrame* invitationBar() const { return mInvitationBar; }
public slots:
- void setDateTimes( const QDateTime &start, const QDateTime &end );
+ void setDateTimes( const TQDateTime &start, const TQDateTime &end );
void setDuration();
protected slots:
void timeStuffDisable( bool disable );
void associateTime( bool time );
- void startTimeChanged( QTime );
- void startDateChanged( const QDate& );
- void endTimeChanged( QTime );
- void endDateChanged( const QDate& );
+ void startTimeChanged( TQTime );
+ void startDateChanged( const TQDate& );
+ void endTimeChanged( TQTime );
+ void endDateChanged( const TQDate& );
void emitDateTimeStr();
signals:
void allDayChanged(bool);
- void dateTimeStrChanged( const QString & );
- void dateTimesChanged( const QDateTime &start, const QDateTime &end );
+ void dateTimeStrChanged( const TQString & );
+ void dateTimesChanged( const TQDateTime &start, const TQDateTime &end );
void editRecurrence();
void acceptInvitation();
void declineInvitation();
private:
- QLabel *mStartDateLabel;
- QLabel *mEndDateLabel;
+ TQLabel *mStartDateLabel;
+ TQLabel *mEndDateLabel;
KDateEdit *mStartDateEdit;
KDateEdit *mEndDateEdit;
KTimeEdit *mStartTimeEdit;
KTimeEdit *mEndTimeEdit;
- QLabel *mDurationLabel;
- QCheckBox *mAlldayEventCheckbox;
- QComboBox *mFreeTimeCombo;
- QLabel *mRecurrenceSummary;
- QFrame *mInvitationBar;
+ TQLabel *mDurationLabel;
+ TQCheckBox *mAlldayEventCheckbox;
+ TQComboBox *mFreeTimeCombo;
+ TQLabel *mRecurrenceSummary;
+ TQFrame *mInvitationBar;
// current start and end date and time
- QDateTime mCurrStartDateTime;
- QDateTime mCurrEndDateTime;
+ TQDateTime mCurrStartDateTime;
+ TQDateTime mCurrEndDateTime;
};
#endif
diff --git a/korganizer/koeditorgeneraljournal.cpp b/korganizer/koeditorgeneraljournal.cpp
index 500c389bd..620417194 100644
--- a/korganizer/koeditorgeneraljournal.cpp
+++ b/korganizer/koeditorgeneraljournal.cpp
@@ -37,17 +37,17 @@
#include <kmessagebox.h>
#include <kdebug.h>
-#include <qgroupbox.h>
-#include <qdatetime.h>
-#include <qcheckbox.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qwhatsthis.h>
+#include <tqgroupbox.h>
+#include <tqdatetime.h>
+#include <tqcheckbox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqwhatsthis.h>
-KOEditorGeneralJournal::KOEditorGeneralJournal( QObject *parent,
+KOEditorGeneralJournal::KOEditorGeneralJournal( TQObject *parent,
const char *name )
- : QObject( parent, name )
+ : TQObject( parent, name )
{
}
@@ -55,31 +55,31 @@ KOEditorGeneralJournal::~KOEditorGeneralJournal()
{
}
-void KOEditorGeneralJournal::initTitle( QWidget *parent, QBoxLayout *topLayout )
+void KOEditorGeneralJournal::initTitle( TQWidget *parent, TQBoxLayout *topLayout )
{
- QHBoxLayout *hbox = new QHBoxLayout( topLayout );
+ TQHBoxLayout *hbox = new TQHBoxLayout( topLayout );
- QString whatsThis = i18n("Sets the title of this journal.");
- QLabel *summaryLabel = new QLabel( i18n("T&itle:"), parent );
- QWhatsThis::add( summaryLabel, whatsThis );
- QFont f = summaryLabel->font();
+ TQString whatsThis = i18n("Sets the title of this journal.");
+ TQLabel *summaryLabel = new TQLabel( i18n("T&itle:"), parent );
+ TQWhatsThis::add( summaryLabel, whatsThis );
+ TQFont f = summaryLabel->font();
f.setBold( true );
summaryLabel->setFont( f );
hbox->addWidget( summaryLabel );
mSummaryEdit = new FocusLineEdit( parent );
- QWhatsThis::add( mSummaryEdit, whatsThis );
+ TQWhatsThis::add( mSummaryEdit, whatsThis );
summaryLabel->setBuddy( mSummaryEdit );
hbox->addWidget( mSummaryEdit );
}
-void KOEditorGeneralJournal::initDate( QWidget *parent, QBoxLayout *topLayout )
+void KOEditorGeneralJournal::initDate( TQWidget *parent, TQBoxLayout *topLayout )
{
-// QBoxLayout *dateLayout = new QVBoxLayout(topLayout);
- QBoxLayout *dateLayout = new QHBoxLayout( topLayout );
+// TQBoxLayout *dateLayout = new TQVBoxLayout(topLayout);
+ TQBoxLayout *dateLayout = new TQHBoxLayout( topLayout );
- mDateLabel = new QLabel( i18n("&Date:"), parent);
+ mDateLabel = new TQLabel( i18n("&Date:"), parent);
dateLayout->addWidget( mDateLabel );
mDateEdit = new KDateEdit( parent );
@@ -88,26 +88,26 @@ void KOEditorGeneralJournal::initDate( QWidget *parent, QBoxLayout *topLayout )
dateLayout->addStretch();
- mTimeCheckBox = new QCheckBox( i18n("&Time: "), parent );
+ mTimeCheckBox = new TQCheckBox( i18n("&Time: "), parent );
dateLayout->addWidget( mTimeCheckBox );
mTimeEdit = new KTimeEdit( parent );
dateLayout->addWidget( mTimeEdit );
- connect( mTimeCheckBox, SIGNAL(toggled(bool)),
- mTimeEdit, SLOT(setEnabled(bool)) );
+ connect( mTimeCheckBox, TQT_SIGNAL(toggled(bool)),
+ mTimeEdit, TQT_SLOT(setEnabled(bool)) );
dateLayout->addStretch();
- setTime( QTime( -1, -1, -1 ) );
+ setTime( TQTime( -1, -1, -1 ) );
}
-void KOEditorGeneralJournal::setDate( const QDate &date )
+void KOEditorGeneralJournal::setDate( const TQDate &date )
{
// kdDebug(5850) << "KOEditorGeneralJournal::setDate(): Date: " << date.toString() << endl;
mDateEdit->setDate( date );
}
-void KOEditorGeneralJournal::setTime( const QTime &time )
+void KOEditorGeneralJournal::setTime( const TQTime &time )
{
kdDebug()<<"KOEditorGeneralJournal::setTime, time="<<time.toString()<<endl;
bool validTime = time.isValid();
@@ -119,7 +119,7 @@ kdDebug()<<"KOEditorGeneralJournal::setTime, time is valid"<<endl;
}
}
-void KOEditorGeneralJournal::initDescription( QWidget *parent, QBoxLayout *topLayout )
+void KOEditorGeneralJournal::initDescription( TQWidget *parent, TQBoxLayout *topLayout )
{
mDescriptionEdit = new KTextEdit( parent );
mDescriptionEdit->append("");
@@ -130,7 +130,7 @@ void KOEditorGeneralJournal::initDescription( QWidget *parent, QBoxLayout *topLa
topLayout->addWidget( mDescriptionEdit );
}
-void KOEditorGeneralJournal::setDefaults( const QDate &date )
+void KOEditorGeneralJournal::setDefaults( const TQDate &date )
{
setDate( date );
}
@@ -145,7 +145,7 @@ kdDebug()<<"KOEditorGeneralJournal::readJournal, does not float, time="<<(journa
setTime( journal->dtStart().time() );
} else {
kdDebug()<<"KOEditorGeneralJournal::readJournal, does float"<<endl;
- setTime( QTime( -1, -1, -1 ) );
+ setTime( TQTime( -1, -1, -1 ) );
}
}
setDescription( journal->description() );
@@ -157,7 +157,7 @@ void KOEditorGeneralJournal::writeJournal( Journal *journal )
journal->setSummary( mSummaryEdit->text() );
journal->setDescription( mDescriptionEdit->text() );
- QDateTime tmpDT( mDateEdit->date(), QTime(0,0,0) );
+ TQDateTime tmpDT( mDateEdit->date(), TQTime(0,0,0) );
bool hasTime = mTimeCheckBox->isChecked();
journal->setFloats( !hasTime );
if ( hasTime ) {
@@ -169,22 +169,22 @@ void KOEditorGeneralJournal::writeJournal( Journal *journal )
}
-void KOEditorGeneralJournal::setDescription( const QString &text )
+void KOEditorGeneralJournal::setDescription( const TQString &text )
{
mDescriptionEdit->setText( text );
}
-void KOEditorGeneralJournal::setSummary( const QString &text )
+void KOEditorGeneralJournal::setSummary( const TQString &text )
{
mSummaryEdit->setText( text );
}
void KOEditorGeneralJournal::finishSetup()
{
- QWidget::setTabOrder( mSummaryEdit, mDateEdit );
- QWidget::setTabOrder( mDateEdit, mTimeCheckBox );
- QWidget::setTabOrder( mTimeCheckBox, mTimeEdit );
- QWidget::setTabOrder( mTimeEdit, mDescriptionEdit );
+ TQWidget::setTabOrder( mSummaryEdit, mDateEdit );
+ TQWidget::setTabOrder( mDateEdit, mTimeCheckBox );
+ TQWidget::setTabOrder( mTimeCheckBox, mTimeEdit );
+ TQWidget::setTabOrder( mTimeEdit, mDescriptionEdit );
mSummaryEdit->setFocus();
}
@@ -195,7 +195,7 @@ bool KOEditorGeneralJournal::validateInput()
if (!mDateEdit->date().isValid()) {
KMessageBox::sorry( 0,
i18n("Please specify a valid date, for example '%1'.")
- .arg( KGlobal::locale()->formatDate( QDate::currentDate() ) ) );
+ .arg( KGlobal::locale()->formatDate( TQDate::currentDate() ) ) );
return false;
}
diff --git a/korganizer/koeditorgeneraljournal.h b/korganizer/koeditorgeneraljournal.h
index 38fe4e525..a2645c221 100644
--- a/korganizer/koeditorgeneraljournal.h
+++ b/korganizer/koeditorgeneraljournal.h
@@ -25,8 +25,8 @@
#ifndef KOEDITORGENERALJOURNAL_H
#define KOEDITORGENERALJOURNAL_H
-#include <qobject.h>
-#include <qdatetime.h>
+#include <tqobject.h>
+#include <tqdatetime.h>
class KDateEdit;
class KTimeEdit;
@@ -47,17 +47,17 @@ class KOEditorGeneralJournal : public QObject
{
Q_OBJECT
public:
- KOEditorGeneralJournal ( QObject* parent=0, const char* name=0 );
+ KOEditorGeneralJournal ( TQObject* parent=0, const char* name=0 );
virtual ~KOEditorGeneralJournal();
- void initDate( QWidget *, QBoxLayout * );
- void initDescription( QWidget *, QBoxLayout * );
- void initTitle( QWidget *parent, QBoxLayout *topLayout );
+ void initDate( TQWidget *, TQBoxLayout * );
+ void initDescription( TQWidget *, TQBoxLayout * );
+ void initTitle( TQWidget *parent, TQBoxLayout *topLayout );
/** Set widgets to default values */
- void setDefaults( const QDate &date );
- void setDate( const QDate &date );
- void setTime( const QTime &time );
+ void setDefaults( const TQDate &date );
+ void setDate( const TQDate &date );
+ void setTime( const TQTime &time );
/** Read journal object and setup widgets accordingly */
void readJournal( Journal *, bool tmpl = false );
/** Write journal settings to event object */
@@ -66,17 +66,17 @@ class KOEditorGeneralJournal : public QObject
/** Check if the input is valid. */
bool validateInput();
- void setDescription( const QString &text );
- void setSummary( const QString &text );
+ void setDescription( const TQString &text );
+ void setSummary( const TQString &text );
void finishSetup();
protected:
- QLineEdit *mSummaryEdit;
- QLabel *mSummaryLabel;
+ TQLineEdit *mSummaryEdit;
+ TQLabel *mSummaryLabel;
KTextEdit *mDescriptionEdit;
- QLabel *mDateLabel;
+ TQLabel *mDateLabel;
KDateEdit *mDateEdit;
- QCheckBox *mTimeCheckBox;
+ TQCheckBox *mTimeCheckBox;
KTimeEdit *mTimeEdit;
};
diff --git a/korganizer/koeditorgeneraltodo.cpp b/korganizer/koeditorgeneraltodo.cpp
index 89deed4f2..dd2a77b5c 100644
--- a/korganizer/koeditorgeneraltodo.cpp
+++ b/korganizer/koeditorgeneraltodo.cpp
@@ -22,19 +22,19 @@
without including the source code for Qt in the source distribution.
*/
-#include <qtooltip.h>
-#include <qfiledialog.h>
-#include <qlayout.h>
-#include <qvbox.h>
-#include <qbuttongroup.h>
-#include <qvgroupbox.h>
-#include <qwidgetstack.h>
-#include <qdatetime.h>
-#include <qcheckbox.h>
-#include <qlabel.h>
-#include <qspinbox.h>
-#include <qpushbutton.h>
-#include <qwhatsthis.h>
+#include <tqtooltip.h>
+#include <tqfiledialog.h>
+#include <tqlayout.h>
+#include <tqvbox.h>
+#include <tqbuttongroup.h>
+#include <tqvgroupbox.h>
+#include <tqwidgetstack.h>
+#include <tqdatetime.h>
+#include <tqcheckbox.h>
+#include <tqlabel.h>
+#include <tqspinbox.h>
+#include <tqpushbutton.h>
+#include <tqwhatsthis.h>
#include <kglobal.h>
#include <klocale.h>
@@ -56,7 +56,7 @@
#include "koeditorgeneraltodo.h"
#include "koeditorgeneraltodo.moc"
-KOEditorGeneralTodo::KOEditorGeneralTodo(QObject* parent,
+KOEditorGeneralTodo::KOEditorGeneralTodo(TQObject* parent,
const char* name)
: KOEditorGeneral( parent, name)
{
@@ -68,142 +68,142 @@ KOEditorGeneralTodo::~KOEditorGeneralTodo()
void KOEditorGeneralTodo::finishSetup()
{
- QWidget::setTabOrder( mSummaryEdit, mLocationEdit );
- QWidget::setTabOrder( mLocationEdit, mStartCheck );
- QWidget::setTabOrder( mStartCheck, mStartDateEdit );
- QWidget::setTabOrder( mStartDateEdit, mStartTimeEdit );
- QWidget::setTabOrder( mStartTimeEdit, mDueCheck );
- QWidget::setTabOrder( mDueCheck, mDueDateEdit );
- QWidget::setTabOrder( mDueDateEdit, mDueTimeEdit );
- QWidget::setTabOrder( mDueTimeEdit, mTimeButton );
- QWidget::setTabOrder( mTimeButton, mCompletedCombo );
- QWidget::setTabOrder( mCompletedCombo, mPriorityCombo );
- QWidget::setTabOrder( mPriorityCombo, mAlarmButton );
- QWidget::setTabOrder( mAlarmButton, mAlarmTimeEdit );
- QWidget::setTabOrder( mAlarmTimeEdit, mAlarmIncrCombo );
-// QWidget::setTabOrder( mAlarmIncrCombo, mAlarmSoundButton );
- QWidget::setTabOrder( mAlarmIncrCombo, mAlarmEditButton );
-// QWidget::setTabOrder( mAlarmSoundButton, mAlarmProgramButton );
-// QWidget::setTabOrder( mAlarmProgramButton, mDescriptionEdit );
- QWidget::setTabOrder( mAlarmEditButton, mDescriptionEdit );
- QWidget::setTabOrder( mDescriptionEdit, mCategoriesButton );
- QWidget::setTabOrder( mCategoriesButton, mSecrecyCombo );
-// QWidget::setTabOrder( mSecrecyCombo, mDescriptionEdit );
+ TQWidget::setTabOrder( mSummaryEdit, mLocationEdit );
+ TQWidget::setTabOrder( mLocationEdit, mStartCheck );
+ TQWidget::setTabOrder( mStartCheck, mStartDateEdit );
+ TQWidget::setTabOrder( mStartDateEdit, mStartTimeEdit );
+ TQWidget::setTabOrder( mStartTimeEdit, mDueCheck );
+ TQWidget::setTabOrder( mDueCheck, mDueDateEdit );
+ TQWidget::setTabOrder( mDueDateEdit, mDueTimeEdit );
+ TQWidget::setTabOrder( mDueTimeEdit, mTimeButton );
+ TQWidget::setTabOrder( mTimeButton, mCompletedCombo );
+ TQWidget::setTabOrder( mCompletedCombo, mPriorityCombo );
+ TQWidget::setTabOrder( mPriorityCombo, mAlarmButton );
+ TQWidget::setTabOrder( mAlarmButton, mAlarmTimeEdit );
+ TQWidget::setTabOrder( mAlarmTimeEdit, mAlarmIncrCombo );
+// TQWidget::setTabOrder( mAlarmIncrCombo, mAlarmSoundButton );
+ TQWidget::setTabOrder( mAlarmIncrCombo, mAlarmEditButton );
+// TQWidget::setTabOrder( mAlarmSoundButton, mAlarmProgramButton );
+// TQWidget::setTabOrder( mAlarmProgramButton, mDescriptionEdit );
+ TQWidget::setTabOrder( mAlarmEditButton, mDescriptionEdit );
+ TQWidget::setTabOrder( mDescriptionEdit, mCategoriesButton );
+ TQWidget::setTabOrder( mCategoriesButton, mSecrecyCombo );
+// TQWidget::setTabOrder( mSecrecyCombo, mDescriptionEdit );
mSummaryEdit->setFocus();
}
-void KOEditorGeneralTodo::initTime(QWidget *parent,QBoxLayout *topLayout)
+void KOEditorGeneralTodo::initTime(TQWidget *parent,TQBoxLayout *topLayout)
{
kdDebug(5850) << k_funcinfo << endl;
- QBoxLayout *timeLayout = new QVBoxLayout(topLayout);
+ TQBoxLayout *timeLayout = new TQVBoxLayout(topLayout);
- QGroupBox *timeGroupBox = new QGroupBox(1,QGroupBox::Horizontal,
+ TQGroupBox *timeGroupBox = new TQGroupBox(1,TQGroupBox::Horizontal,
i18n("Date && Time"),parent);
timeLayout->addWidget(timeGroupBox);
- QFrame *timeBoxFrame = new QFrame(timeGroupBox);
- QWhatsThis::add( timeBoxFrame,
+ TQFrame *timeBoxFrame = new TQFrame(timeGroupBox);
+ TQWhatsThis::add( timeBoxFrame,
i18n("Sets options for due and start dates and times "
"for this to-do.") );
- QGridLayout *layoutTimeBox = new QGridLayout(timeBoxFrame,1,1);
+ TQGridLayout *layoutTimeBox = new TQGridLayout(timeBoxFrame,1,1);
layoutTimeBox->setSpacing(topLayout->spacing());
- QString whatsThis = i18n("Sets the start date for this to-do");
- mStartCheck = new QCheckBox(i18n("Sta&rt:"),timeBoxFrame);
- QWhatsThis::add( mStartCheck, whatsThis );
+ TQString whatsThis = i18n("Sets the start date for this to-do");
+ mStartCheck = new TQCheckBox(i18n("Sta&rt:"),timeBoxFrame);
+ TQWhatsThis::add( mStartCheck, whatsThis );
layoutTimeBox->addWidget(mStartCheck,0,0);
- connect(mStartCheck,SIGNAL(toggled(bool)),SLOT(enableStartEdit(bool)));
- connect(mStartCheck,SIGNAL(toggled(bool)),SLOT(startDateModified()));
+ connect(mStartCheck,TQT_SIGNAL(toggled(bool)),TQT_SLOT(enableStartEdit(bool)));
+ connect(mStartCheck,TQT_SIGNAL(toggled(bool)),TQT_SLOT(startDateModified()));
mStartDateEdit = new KDateEdit(timeBoxFrame);
- QWhatsThis::add( mStartDateEdit, whatsThis );
+ TQWhatsThis::add( mStartDateEdit, whatsThis );
layoutTimeBox->addWidget(mStartDateEdit,0,1);
- connect(mStartDateEdit,SIGNAL(dateChanged(const QDate&)),SLOT(startDateModified()));
+ connect(mStartDateEdit,TQT_SIGNAL(dateChanged(const TQDate&)),TQT_SLOT(startDateModified()));
mStartTimeEdit = new KTimeEdit(timeBoxFrame);
- QWhatsThis::add( mStartTimeEdit,
+ TQWhatsThis::add( mStartTimeEdit,
i18n("Sets the start time for this to-do.") );
layoutTimeBox->addWidget(mStartTimeEdit,0,2);
- connect(mStartTimeEdit,SIGNAL(timeChanged(QTime)),SLOT(startDateModified()));
+ connect(mStartTimeEdit,TQT_SIGNAL(timeChanged(TQTime)),TQT_SLOT(startDateModified()));
whatsThis = i18n("Sets the due date for this to-do.");
- mDueCheck = new QCheckBox(i18n("&Due:"),timeBoxFrame);
- QWhatsThis::add( mDueCheck, whatsThis );
+ mDueCheck = new TQCheckBox(i18n("&Due:"),timeBoxFrame);
+ TQWhatsThis::add( mDueCheck, whatsThis );
layoutTimeBox->addWidget(mDueCheck,1,0);
- connect(mDueCheck,SIGNAL(toggled(bool)),SLOT(enableDueEdit(bool)));
- connect(mDueCheck,SIGNAL(toggled(bool)),SLOT(showAlarm()));
- connect(mDueCheck,SIGNAL(toggled(bool)),SIGNAL(dueDateEditToggle(bool)));
- connect(mDueCheck,SIGNAL(toggled(bool)),SLOT(dateChanged()));
+ connect(mDueCheck,TQT_SIGNAL(toggled(bool)),TQT_SLOT(enableDueEdit(bool)));
+ connect(mDueCheck,TQT_SIGNAL(toggled(bool)),TQT_SLOT(showAlarm()));
+ connect(mDueCheck,TQT_SIGNAL(toggled(bool)),TQT_SIGNAL(dueDateEditToggle(bool)));
+ connect(mDueCheck,TQT_SIGNAL(toggled(bool)),TQT_SLOT(dateChanged()));
mDueDateEdit = new KDateEdit(timeBoxFrame);
- QWhatsThis::add( mDueDateEdit, whatsThis );
+ TQWhatsThis::add( mDueDateEdit, whatsThis );
layoutTimeBox->addWidget(mDueDateEdit,1,1);
- connect(mDueDateEdit,SIGNAL(dateChanged(const QDate&)),SLOT(dateChanged()));
+ connect(mDueDateEdit,TQT_SIGNAL(dateChanged(const TQDate&)),TQT_SLOT(dateChanged()));
mDueTimeEdit = new KTimeEdit(timeBoxFrame);
- QWhatsThis::add( mDueTimeEdit,
+ TQWhatsThis::add( mDueTimeEdit,
i18n("Sets the due time for this to-do.") );
layoutTimeBox->addWidget(mDueTimeEdit,1,2);
- connect(mDueTimeEdit,SIGNAL(timeChanged( QTime )),SLOT(dateChanged()));
+ connect(mDueTimeEdit,TQT_SIGNAL(timeChanged( TQTime )),TQT_SLOT(dateChanged()));
- mTimeButton = new QCheckBox(i18n("Ti&me associated"),timeBoxFrame);
- QWhatsThis::add( mTimeButton,
+ mTimeButton = new TQCheckBox(i18n("Ti&me associated"),timeBoxFrame);
+ TQWhatsThis::add( mTimeButton,
i18n("Sets whether or not this to-do's start and due dates "
"have times associated with them.") );
layoutTimeBox->addMultiCellWidget(mTimeButton,2,2,0,2);
- connect(mTimeButton,SIGNAL(toggled(bool)),SLOT(enableTimeEdits(bool)));
- connect(mTimeButton,SIGNAL(toggled(bool)),SLOT(dateChanged()));
+ connect(mTimeButton,TQT_SIGNAL(toggled(bool)),TQT_SLOT(enableTimeEdits(bool)));
+ connect(mTimeButton,TQT_SIGNAL(toggled(bool)),TQT_SLOT(dateChanged()));
// some more layouting
layoutTimeBox->setColStretch(3,1);
- QBoxLayout *secLayout = new QHBoxLayout();
+ TQBoxLayout *secLayout = new TQHBoxLayout();
layoutTimeBox->addLayout( secLayout, 0, 4 );
initSecrecy( timeBoxFrame, secLayout );
}
-void KOEditorGeneralTodo::initCompletion(QWidget *parent, QBoxLayout *topLayout)
+void KOEditorGeneralTodo::initCompletion(TQWidget *parent, TQBoxLayout *topLayout)
{
- QString whatsThis = i18n("Sets the current completion status of this to-do "
+ TQString whatsThis = i18n("Sets the current completion status of this to-do "
"as a percentage.");
- mCompletedCombo = new QComboBox(parent);
- QWhatsThis::add( mCompletedCombo, whatsThis );
+ mCompletedCombo = new TQComboBox(parent);
+ TQWhatsThis::add( mCompletedCombo, whatsThis );
for (int i = 0; i <= 100; i+=10) {
// xgettext:no-c-format
- QString label = i18n("Percent complete", "%1 %").arg (i);
+ TQString label = i18n("Percent complete", "%1 %").arg (i);
mCompletedCombo->insertItem(label);
}
- connect(mCompletedCombo,SIGNAL(activated(int)),SLOT(completedChanged(int)));
+ connect(mCompletedCombo,TQT_SIGNAL(activated(int)),TQT_SLOT(completedChanged(int)));
topLayout->addWidget(mCompletedCombo);
- mCompletedLabel = new QLabel(i18n("co&mpleted"),parent);
+ mCompletedLabel = new TQLabel(i18n("co&mpleted"),parent);
topLayout->addWidget(mCompletedLabel);
mCompletedLabel->setBuddy( mCompletedCombo );
mCompletionDateEdit = new KDateEdit( parent );
mCompletionDateEdit->hide();
topLayout->addWidget( mCompletionDateEdit );
- mCompletionTimeEdit = new KTimeEdit( parent, QTime() );
+ mCompletionTimeEdit = new KTimeEdit( parent, TQTime() );
mCompletionTimeEdit->hide();
topLayout->addWidget( mCompletionTimeEdit );
}
-void KOEditorGeneralTodo::initPriority(QWidget *parent, QBoxLayout *topLayout)
+void KOEditorGeneralTodo::initPriority(TQWidget *parent, TQBoxLayout *topLayout)
{
- QString whatsThis = i18n("Sets the priority of this to-do on a scale "
+ TQString whatsThis = i18n("Sets the priority of this to-do on a scale "
"from one to nine, with one being the highest "
"priority, five being a medium priority, and "
"nine being the lowest. In programs that have a "
"different scale, the numbers will be adjusted "
"to match the appropriate scale.");
- QLabel *priorityLabel = new QLabel(i18n("&Priority:"),parent);
+ TQLabel *priorityLabel = new TQLabel(i18n("&Priority:"),parent);
topLayout->addWidget(priorityLabel);
- mPriorityCombo = new QComboBox(parent);
+ mPriorityCombo = new TQComboBox(parent);
mPriorityCombo->insertItem(i18n("unspecified"));
mPriorityCombo->insertItem(i18n("1 (highest)"));
mPriorityCombo->insertItem(i18n("2"));
@@ -218,9 +218,9 @@ void KOEditorGeneralTodo::initPriority(QWidget *parent, QBoxLayout *topLayout)
priorityLabel->setBuddy( mPriorityCombo );
}
-void KOEditorGeneralTodo::initStatus(QWidget *parent,QBoxLayout *topLayout)
+void KOEditorGeneralTodo::initStatus(TQWidget *parent,TQBoxLayout *topLayout)
{
- QBoxLayout *statusLayout = new QHBoxLayout(topLayout);
+ TQBoxLayout *statusLayout = new TQHBoxLayout(topLayout);
initCompletion( parent, statusLayout );
@@ -229,7 +229,7 @@ void KOEditorGeneralTodo::initStatus(QWidget *parent,QBoxLayout *topLayout)
initPriority( parent, statusLayout );
}
-void KOEditorGeneralTodo::setDefaults( const QDateTime &due, bool allDay )
+void KOEditorGeneralTodo::setDefaults( const TQDateTime &due, bool allDay )
{
kdDebug(5850) << k_funcinfo << due <<endl;
KOEditorGeneral::setDefaults(allDay);
@@ -250,13 +250,13 @@ void KOEditorGeneralTodo::setDefaults( const QDateTime &due, bool allDay )
mDueTimeEdit->setTime( due.time() );
} else {
// Make it due tomorrow.
- mDueDateEdit->setDate( QDate::currentDate().addDays(1) );
- mDueTimeEdit->setTime( QTime::currentTime() );
+ mDueDateEdit->setDate( TQDate::currentDate().addDays(1) );
+ mDueTimeEdit->setTime( TQTime::currentTime() );
}
- if ( !due.isValid() || (QDateTime::currentDateTime() < due) ) {
- mStartDateEdit->setDate( QDate::currentDate() );
- mStartTimeEdit->setTime( QTime::currentTime() );
+ if ( !due.isValid() || (TQDateTime::currentDateTime() < due) ) {
+ mStartDateEdit->setDate( TQDate::currentDate() );
+ mStartTimeEdit->setTime( TQTime::currentTime() );
} else {
mStartDateEdit->setDate( due.date().addDays( -1 ) );
mStartTimeEdit->setTime( due.time() );
@@ -272,7 +272,7 @@ void KOEditorGeneralTodo::readTodo(Todo *todo, Calendar *calendar)
{
KOEditorGeneral::readIncidence(todo, calendar);
- QDateTime dueDT;
+ TQDateTime dueDT;
if (todo->hasDueDate()) {
enableAlarm( true );
@@ -284,8 +284,8 @@ void KOEditorGeneralTodo::readTodo(Todo *todo, Calendar *calendar)
enableAlarm( false );
mDueDateEdit->setEnabled(false);
mDueTimeEdit->setEnabled(false);
- mDueDateEdit->setDate(QDate::currentDate());
- mDueTimeEdit->setTime(QTime::currentTime());
+ mDueDateEdit->setDate(TQDate::currentDate());
+ mDueTimeEdit->setTime(TQTime::currentTime());
mDueCheck->setChecked(false);
}
@@ -296,8 +296,8 @@ void KOEditorGeneralTodo::readTodo(Todo *todo, Calendar *calendar)
} else {
mStartDateEdit->setEnabled(false);
mStartTimeEdit->setEnabled(false);
- mStartDateEdit->setDate(QDate::currentDate());
- mStartTimeEdit->setTime(QTime::currentTime());
+ mStartDateEdit->setDate(TQDate::currentDate());
+ mStartTimeEdit->setTime(TQTime::currentTime());
mStartCheck->setChecked(false);
}
@@ -320,14 +320,14 @@ void KOEditorGeneralTodo::writeTodo(Todo *todo)
KOEditorGeneral::writeIncidence(todo);
// temp. until something better happens.
- QString tmpStr;
+ TQString tmpStr;
todo->setHasDueDate(mDueCheck->isChecked());
todo->setHasStartDate(mStartCheck->isChecked());
- QDate tmpSDate, tmpDDate;
- QTime tmpSTime, tmpDTime;
- QDateTime tmpStartDT, tmpDueDT;
+ TQDate tmpSDate, tmpDDate;
+ TQTime tmpSTime, tmpDTime;
+ TQDateTime tmpStartDT, tmpDueDT;
if ( mTimeButton->isChecked() ) {
todo->setFloats(false);
@@ -380,7 +380,7 @@ void KOEditorGeneralTodo::writeTodo(Todo *todo)
todo->setPercentComplete(mCompletedCombo->currentItem() * 10);
if (mCompletedCombo->currentItem() == 10 && mCompleted.isValid()) {
- QDateTime completed( mCompletionDateEdit->date(),
+ TQDateTime completed( mCompletionDateEdit->date(),
mCompletionTimeEdit->getTime() );
int difference = mCompleted.secsTo( completed );
if ( (difference < 60) && (difference > -60) &&
@@ -473,8 +473,8 @@ bool KOEditorGeneralTodo::validateInput()
}
if (mStartCheck->isChecked() && mDueCheck->isChecked()) {
- QDateTime startDate;
- QDateTime dueDate;
+ TQDateTime startDate;
+ TQDateTime dueDate;
startDate.setDate(mStartDateEdit->date());
dueDate.setDate(mDueDateEdit->date());
if (mTimeButton->isChecked()) {
@@ -494,7 +494,7 @@ bool KOEditorGeneralTodo::validateInput()
void KOEditorGeneralTodo::completedChanged(int index)
{
if (index == 10) {
- mCompleted = QDateTime::currentDateTime();
+ mCompleted = TQDateTime::currentDateTime();
}
setCompletedDate();
}
@@ -502,13 +502,13 @@ void KOEditorGeneralTodo::completedChanged(int index)
void KOEditorGeneralTodo::dateChanged()
{
KLocale *l = KGlobal::locale();
- QString dateTimeStr = "";
+ TQString dateTimeStr = "";
if ( mStartCheck->isChecked() ) {
dateTimeStr += i18n("Start: %1").arg(
l->formatDate( mStartDateEdit->date() ) );
if ( mTimeButton->isChecked() )
- dateTimeStr += QString(" %1").arg(
+ dateTimeStr += TQString(" %1").arg(
l->formatTime( mStartTimeEdit->getTime() ) );
}
@@ -516,12 +516,12 @@ void KOEditorGeneralTodo::dateChanged()
dateTimeStr += i18n(" Due: %1").arg(
l->formatDate( mDueDateEdit->date() ) );
if ( mTimeButton->isChecked() )
- dateTimeStr += QString(" %1").arg(
+ dateTimeStr += TQString(" %1").arg(
l->formatTime( mDueTimeEdit->getTime() ) );
}
emit dateTimeStrChanged( dateTimeStr );
- QDateTime endDt( mDueDateEdit->date(), mDueTimeEdit->getTime() );
+ TQDateTime endDt( mDueDateEdit->date(), mDueTimeEdit->getTime() );
emit signalDateTimeChanged( endDt, endDt );
}
diff --git a/korganizer/koeditorgeneraltodo.h b/korganizer/koeditorgeneraltodo.h
index d3e051866..7ebc1f7ef 100644
--- a/korganizer/koeditorgeneraltodo.h
+++ b/korganizer/koeditorgeneraltodo.h
@@ -25,7 +25,7 @@
#define _KOEDITORGENERALTODO_H
#include "koeditorgeneral.h"
-#include <qdatetime.h>
+#include <tqdatetime.h>
class KRestrictedLine;
@@ -41,18 +41,18 @@ class KOEditorGeneralTodo : public KOEditorGeneral
{
Q_OBJECT
public:
- KOEditorGeneralTodo (QObject* parent=0,const char* name=0);
+ KOEditorGeneralTodo (TQObject* parent=0,const char* name=0);
virtual ~KOEditorGeneralTodo();
- void initTime(QWidget *, QBoxLayout *);
- void initStatus(QWidget *, QBoxLayout *);
- void initCompletion(QWidget *, QBoxLayout *);
- void initPriority(QWidget *, QBoxLayout *);
+ void initTime(TQWidget *, TQBoxLayout *);
+ void initStatus(TQWidget *, TQBoxLayout *);
+ void initCompletion(TQWidget *, TQBoxLayout *);
+ void initPriority(TQWidget *, TQBoxLayout *);
void finishSetup();
/** Set widgets to default values */
- void setDefaults( const QDateTime &due, bool allDay );
+ void setDefaults( const TQDateTime &due, bool allDay );
/** Read todo object and setup widgets accordingly */
void readTodo(Todo *todo, Calendar *calendar);
/** Write todo settings to event object */
@@ -66,8 +66,8 @@ class KOEditorGeneralTodo : public KOEditorGeneral
signals:
void dueDateEditToggle( bool );
- void dateTimeStrChanged( const QString & );
- void signalDateTimeChanged( const QDateTime &, const QDateTime & );
+ void dateTimeStrChanged( const TQString & );
+ void signalDateTimeChanged( const TQDateTime &, const TQDateTime & );
protected slots:
void completedChanged(int);
@@ -88,21 +88,21 @@ class KOEditorGeneralTodo : public KOEditorGeneral
KDateEdit *mStartDateEdit;
KTimeEdit *mStartTimeEdit;
- QCheckBox *mTimeButton;
- QCheckBox *mDueCheck;
+ TQCheckBox *mTimeButton;
+ TQCheckBox *mDueCheck;
KDateEdit *mDueDateEdit;
KTimeEdit *mDueTimeEdit;
- QComboBox *mCompletedCombo;
- QLabel *mCompletedLabel;
- QLabel *mPriorityLabel;
- QComboBox *mPriorityCombo;
+ TQComboBox *mCompletedCombo;
+ TQLabel *mCompletedLabel;
+ TQLabel *mPriorityLabel;
+ TQComboBox *mPriorityCombo;
KDateEdit *mCompletionDateEdit;
KTimeEdit *mCompletionTimeEdit;
- QCheckBox *mStartCheck;
+ TQCheckBox *mStartCheck;
- QDateTime mCompleted;
+ TQDateTime mCompleted;
};
diff --git a/korganizer/koeditorrecurrence.cpp b/korganizer/koeditorrecurrence.cpp
index 48471c421..6f24446c2 100644
--- a/korganizer/koeditorrecurrence.cpp
+++ b/korganizer/koeditorrecurrence.cpp
@@ -22,23 +22,23 @@
without including the source code for Qt in the source distribution.
*/
-#include <qtooltip.h>
-#include <qfiledialog.h>
-#include <qlayout.h>
-#include <qvbox.h>
-#include <qbuttongroup.h>
-#include <qvgroupbox.h>
-#include <qwidgetstack.h>
-#include <qdatetime.h>
-#include <qlistbox.h>
-#include <qspinbox.h>
-#include <qcheckbox.h>
-#include <qgroupbox.h>
-#include <qwidgetstack.h>
-#include <qradiobutton.h>
-#include <qlabel.h>
-#include <qpushbutton.h>
-#include <qwhatsthis.h>
+#include <tqtooltip.h>
+#include <tqfiledialog.h>
+#include <tqlayout.h>
+#include <tqvbox.h>
+#include <tqbuttongroup.h>
+#include <tqvgroupbox.h>
+#include <tqwidgetstack.h>
+#include <tqdatetime.h>
+#include <tqlistbox.h>
+#include <tqspinbox.h>
+#include <tqcheckbox.h>
+#include <tqgroupbox.h>
+#include <tqwidgetstack.h>
+#include <tqradiobutton.h>
+#include <tqlabel.h>
+#include <tqpushbutton.h>
+#include <tqwhatsthis.h>
#include <kdialog.h>
#include <kglobal.h>
@@ -60,14 +60,14 @@
/////////////////////////// RecurBase ///////////////////////////////
-RecurBase::RecurBase( QWidget *parent, const char *name ) :
- QWidget( parent, name )
+RecurBase::RecurBase( TQWidget *parent, const char *name ) :
+ TQWidget( parent, name )
{
- mFrequencyEdit = new QSpinBox( 1, 9999, 1, this );
+ mFrequencyEdit = new TQSpinBox( 1, 9999, 1, this );
mFrequencyEdit->setValue( 1 );
}
-QWidget *RecurBase::frequencyEdit()
+TQWidget *RecurBase::frequencyEdit()
{
return mFrequencyEdit;
}
@@ -84,10 +84,10 @@ int RecurBase::frequency()
return mFrequencyEdit->value();
}
-QComboBox *RecurBase::createWeekCountCombo( QWidget *parent, const char *name )
+TQComboBox *RecurBase::createWeekCountCombo( TQWidget *parent, const char *name )
{
- QComboBox *combo = new QComboBox( parent, name );
- QWhatsThis::add( combo,
+ TQComboBox *combo = new TQComboBox( parent, name );
+ TQWhatsThis::add( combo,
i18n("The number of the week from the beginning "
"of the month on which this event or to-do "
"should recur.") );
@@ -105,10 +105,10 @@ QComboBox *RecurBase::createWeekCountCombo( QWidget *parent, const char *name )
return combo;
}
-QComboBox *RecurBase::createWeekdayCombo( QWidget *parent, const char *name )
+TQComboBox *RecurBase::createWeekdayCombo( TQWidget *parent, const char *name )
{
- QComboBox *combo = new QComboBox( parent, name );
- QWhatsThis::add( combo,
+ TQComboBox *combo = new TQComboBox( parent, name );
+ TQWhatsThis::add( combo,
i18n("The weekday on which this event or to-do "
"should recur.") );
if ( !combo ) return 0;
@@ -119,38 +119,38 @@ QComboBox *RecurBase::createWeekdayCombo( QWidget *parent, const char *name )
return combo;
}
-QComboBox *RecurBase::createMonthNameCombo( QWidget *parent, const char *name )
+TQComboBox *RecurBase::createMonthNameCombo( TQWidget *parent, const char *name )
{
- QComboBox *combo = new QComboBox( parent, name );
- QWhatsThis::add( combo,
+ TQComboBox *combo = new TQComboBox( parent, name );
+ TQWhatsThis::add( combo,
i18n("The month during which this event or to-do "
"should recur.") );
if ( !combo ) return 0;
const KCalendarSystem *calSys = KOGlobals::self()->calendarSystem();
for( int i = 1; i <= 12; ++i ) {
// use an arbitrary year, we just need the month name...
- QDate dt( 2005, i, 1 );
+ TQDate dt( 2005, i, 1 );
combo->insertItem( calSys->monthName( dt ) );
}
return combo;
}
-QBoxLayout *RecurBase::createFrequencySpinBar( QWidget *parent, QLayout *layout,
- QString everyText, QString unitText )
+TQBoxLayout *RecurBase::createFrequencySpinBar( TQWidget *parent, TQLayout *layout,
+ TQString everyText, TQString unitText )
{
- QBoxLayout *freqLayout = new QHBoxLayout( layout );
+ TQBoxLayout *freqLayout = new TQHBoxLayout( layout );
- QString whatsThis = i18n("Sets how often this event or to-do should recur.");
- QLabel *preLabel = new QLabel( everyText, parent );
- QWhatsThis::add( preLabel, whatsThis );
+ TQString whatsThis = i18n("Sets how often this event or to-do should recur.");
+ TQLabel *preLabel = new TQLabel( everyText, parent );
+ TQWhatsThis::add( preLabel, whatsThis );
freqLayout->addWidget( preLabel );
freqLayout->addWidget( frequencyEdit() );
preLabel->setBuddy( frequencyEdit() );
- QWhatsThis::add( preLabel->buddy(), whatsThis );
+ TQWhatsThis::add( preLabel->buddy(), whatsThis );
- QLabel *postLabel = new QLabel( unitText, parent );
- QWhatsThis::add( postLabel, whatsThis );
+ TQLabel *postLabel = new TQLabel( unitText, parent );
+ TQWhatsThis::add( postLabel, whatsThis );
freqLayout->addWidget( postLabel );
freqLayout->addStretch();
return freqLayout;
@@ -158,10 +158,10 @@ QBoxLayout *RecurBase::createFrequencySpinBar( QWidget *parent, QLayout *layout,
/////////////////////////// RecurDaily ///////////////////////////////
-RecurDaily::RecurDaily( QWidget *parent, const char *name ) :
+RecurDaily::RecurDaily( TQWidget *parent, const char *name ) :
RecurBase( parent, name )
{
- QBoxLayout *topLayout = new QVBoxLayout( this );
+ TQBoxLayout *topLayout = new TQVBoxLayout( this );
topLayout->setSpacing( KDialog::spacingHint() );
createFrequencySpinBar( this, topLayout, i18n("&Recur every"), i18n("day(s)") );
@@ -170,17 +170,17 @@ RecurDaily::RecurDaily( QWidget *parent, const char *name ) :
/////////////////////////// RecurWeekly ///////////////////////////////
-RecurWeekly::RecurWeekly( QWidget *parent, const char *name ) :
+RecurWeekly::RecurWeekly( TQWidget *parent, const char *name ) :
RecurBase( parent, name )
{
- QBoxLayout *topLayout = new QVBoxLayout( this );
+ TQBoxLayout *topLayout = new TQVBoxLayout( this );
topLayout->setSpacing( KDialog::spacingHint() );
// topLayout->addStretch( 1 );
createFrequencySpinBar( this, topLayout, i18n("&Recur every"), i18n("week(s) on:") );
- QHBox *dayBox = new QHBox( this );
+ TQHBox *dayBox = new TQHBox( this );
topLayout->addWidget( dayBox, 1, AlignVCenter );
// Respect start of week setting
int weekStart=KGlobal::locale()->weekStartDay();
@@ -189,13 +189,13 @@ RecurWeekly::RecurWeekly( QWidget *parent, const char *name ) :
// label=(i+weekStart+6)%7 + 1;
// index in CheckBox array(=day): label-1
const KCalendarSystem *calSys = KOGlobals::self()->calendarSystem();
- QString weekDayName = calSys->weekDayName(
+ TQString weekDayName = calSys->weekDayName(
(i + weekStart + 6)%7 + 1, true );
if ( KOPrefs::instance()->mCompactDialogs ) {
weekDayName = weekDayName.left( 1 );
}
- mDayBoxes[ (i + weekStart + 6)%7 ] = new QCheckBox( weekDayName, dayBox );
- QWhatsThis::add( mDayBoxes[ (i + weekStart + 6)%7 ],
+ mDayBoxes[ (i + weekStart + 6)%7 ] = new TQCheckBox( weekDayName, dayBox );
+ TQWhatsThis::add( mDayBoxes[ (i + weekStart + 6)%7 ],
i18n("Day of the week on which this event or to-do "
"should recur.") );
}
@@ -203,16 +203,16 @@ RecurWeekly::RecurWeekly( QWidget *parent, const char *name ) :
topLayout->addStretch( 1 );
}
-void RecurWeekly::setDays( const QBitArray &days )
+void RecurWeekly::setDays( const TQBitArray &days )
{
for ( int i = 0; i < 7; ++i ) {
mDayBoxes[ i ]->setChecked( days.testBit( i ) );
}
}
-QBitArray RecurWeekly::days()
+TQBitArray RecurWeekly::days()
{
- QBitArray days( 7 );
+ TQBitArray days( 7 );
for ( int i = 0; i < 7; ++i ) {
days.setBit( i, mDayBoxes[ i ]->isChecked() );
@@ -223,38 +223,38 @@ QBitArray RecurWeekly::days()
/////////////////////////// RecurMonthly ///////////////////////////////
-RecurMonthly::RecurMonthly( QWidget *parent, const char *name ) :
+RecurMonthly::RecurMonthly( TQWidget *parent, const char *name ) :
RecurBase( parent, name )
{
- QBoxLayout *topLayout = new QVBoxLayout( this );
+ TQBoxLayout *topLayout = new TQVBoxLayout( this );
topLayout->setSpacing( KDialog::spacingHint() );
createFrequencySpinBar( this, topLayout, i18n("&Recur every"), i18n("month(s)") );
- QButtonGroup *buttonGroup = new QButtonGroup( this );
- buttonGroup->setFrameStyle( QFrame::NoFrame );
+ TQButtonGroup *buttonGroup = new TQButtonGroup( this );
+ buttonGroup->setFrameStyle( TQFrame::NoFrame );
topLayout->addWidget( buttonGroup, 1, AlignVCenter );
- QGridLayout *buttonLayout = new QGridLayout( buttonGroup, 3, 2 );
+ TQGridLayout *buttonLayout = new TQGridLayout( buttonGroup, 3, 2 );
buttonLayout->setSpacing( KDialog::spacingHint() );
- QString recurOnText;
+ TQString recurOnText;
if ( !KOPrefs::instance()->mCompactDialogs ) {
recurOnText = i18n("&Recur on the");
}
- mByDayRadio = new QRadioButton( recurOnText, buttonGroup );
- QWhatsThis::add( mByDayRadio,
+ mByDayRadio = new TQRadioButton( recurOnText, buttonGroup );
+ TQWhatsThis::add( mByDayRadio,
i18n("Sets a specific day of the month on which "
"this event or to-do should recur.") );
buttonLayout->addWidget( mByDayRadio, 0, 0 );
- QString whatsThis = i18n("The day of the month on which this event or to-do "
+ TQString whatsThis = i18n("The day of the month on which this event or to-do "
"should recur.");
- mByDayCombo = new QComboBox( buttonGroup );
- QWhatsThis::add( mByDayCombo, whatsThis );
+ mByDayCombo = new TQComboBox( buttonGroup );
+ TQWhatsThis::add( mByDayCombo, whatsThis );
mByDayCombo->setSizeLimit( 7 );
mByDayCombo->insertItem( i18n("1st") );
mByDayCombo->insertItem( i18n("2nd") );
@@ -322,13 +322,13 @@ RecurMonthly::RecurMonthly( QWidget *parent, const char *name ) :
mByDayCombo->insertItem( i18n("31st Last") );*/
buttonLayout->addWidget( mByDayCombo, 0, 1 );
- QLabel *byDayLabel = new QLabel( i18n("day"), buttonGroup );
- QWhatsThis::add( byDayLabel, whatsThis );
+ TQLabel *byDayLabel = new TQLabel( i18n("day"), buttonGroup );
+ TQWhatsThis::add( byDayLabel, whatsThis );
buttonLayout->addWidget( byDayLabel, 0, 2 );
- mByPosRadio = new QRadioButton( recurOnText, buttonGroup);
- QWhatsThis::add( mByPosRadio,
+ mByPosRadio = new TQRadioButton( recurOnText, buttonGroup);
+ TQWhatsThis::add( mByPosRadio,
i18n("Sets a weekday and specific week in the month "
"on which this event or to-do should recur") );
buttonLayout->addWidget( mByPosRadio, 1, 0 );
@@ -396,41 +396,41 @@ int RecurMonthly::weekday()
/////////////////////////// RecurYearly ///////////////////////////////
-RecurYearly::RecurYearly( QWidget *parent, const char *name ) :
+RecurYearly::RecurYearly( TQWidget *parent, const char *name ) :
RecurBase( parent, name )
{
- QBoxLayout *topLayout = new QVBoxLayout( this );
+ TQBoxLayout *topLayout = new TQVBoxLayout( this );
topLayout->setSpacing( KDialog::spacingHint() );
createFrequencySpinBar( this, topLayout, i18n("&Recur every"), i18n("year(s)") );
- QButtonGroup *buttonGroup = new QButtonGroup( this );
- buttonGroup->setFrameStyle( QFrame::NoFrame );
+ TQButtonGroup *buttonGroup = new TQButtonGroup( this );
+ buttonGroup->setFrameStyle( TQFrame::NoFrame );
topLayout->addWidget( buttonGroup, 1, AlignVCenter );
- QBoxLayout *buttonLayout = new QVBoxLayout( buttonGroup );
+ TQBoxLayout *buttonLayout = new TQVBoxLayout( buttonGroup );
/* YearlyMonth (day n of Month Y) */
- QBoxLayout *monthLayout = new QHBoxLayout( buttonLayout );
- QString recurInMonthText(
+ TQBoxLayout *monthLayout = new TQHBoxLayout( buttonLayout );
+ TQString recurInMonthText(
i18n("part before XXX of 'Recur on day XXX of month YYY'",
"&Recur on day "));
if ( KOPrefs::instance()->mCompactDialogs ) {
recurInMonthText = i18n("&Day ");
}
- mByMonthRadio = new QRadioButton( recurInMonthText, buttonGroup );
- QWhatsThis::add( mByMonthRadio,
+ mByMonthRadio = new TQRadioButton( recurInMonthText, buttonGroup );
+ TQWhatsThis::add( mByMonthRadio,
i18n("Sets a specific day in a specific month on which "
"this event or to-do should recur.") );
monthLayout->addWidget( mByMonthRadio );
- mByMonthSpin = new QSpinBox( 1, 31, 1, buttonGroup );
- QWhatsThis::add( mByMonthSpin,
+ mByMonthSpin = new TQSpinBox( 1, 31, 1, buttonGroup );
+ TQWhatsThis::add( mByMonthSpin,
i18n("The day of the month on which this event or to-do "
"should recur.") );
monthLayout->addWidget( mByMonthSpin );
- QLabel *ofLabel = new QLabel(
+ TQLabel *ofLabel = new TQLabel(
i18n("part between XXX and YYY of 'Recur on day XXX of month YYY'", " &of "),
buttonGroup );
//What do I do here? I'm not sure if this label should have What's This in it... - Antonio
@@ -444,13 +444,13 @@ RecurYearly::RecurYearly( QWidget *parent, const char *name ) :
/* YearlyPos (weekday X of week N of month Y) */
- QBoxLayout *posLayout = new QHBoxLayout( buttonLayout );
- QString recurOnPosText( i18n("Part before XXX in 'Recur on NNN. WEEKDAY of MONTH', short version", "&On" ) );
+ TQBoxLayout *posLayout = new TQHBoxLayout( buttonLayout );
+ TQString recurOnPosText( i18n("Part before XXX in 'Recur on NNN. WEEKDAY of MONTH', short version", "&On" ) );
if ( !KOPrefs::instance()->mCompactDialogs ) {
recurOnPosText = i18n("Part before XXX in 'Recur on NNN. WEEKDAY of MONTH'", "&On the" );
}
- mByPosRadio = new QRadioButton( recurOnPosText, buttonGroup );
- QWhatsThis::add( mByPosRadio,
+ mByPosRadio = new TQRadioButton( recurOnPosText, buttonGroup );
+ TQWhatsThis::add( mByPosRadio,
i18n("Sets a specific day in a specific week of a specific "
"month on which this event or to-do should recur.") );
posLayout->addWidget( mByPosRadio );
@@ -461,7 +461,7 @@ RecurYearly::RecurYearly( QWidget *parent, const char *name ) :
mByPosWeekdayCombo = createWeekdayCombo( buttonGroup );
posLayout->addWidget( mByPosWeekdayCombo );
- ofLabel = new QLabel(
+ ofLabel = new TQLabel(
i18n("part between WEEKDAY and MONTH in 'Recur on NNN. WEEKDAY of MONTH'", " o&f "),
buttonGroup );
posLayout->addWidget( ofLabel );
@@ -474,31 +474,31 @@ RecurYearly::RecurYearly( QWidget *parent, const char *name ) :
/* YearlyDay (day N of the year) */
- QBoxLayout *dayLayout = new QHBoxLayout( buttonLayout );
- QString recurOnDayText;
+ TQBoxLayout *dayLayout = new TQHBoxLayout( buttonLayout );
+ TQString recurOnDayText;
if ( KOPrefs::instance()->mCompactDialogs ) {
recurOnDayText = i18n("Day #");
} else {
recurOnDayText = i18n("Recur on &day #");
}
- QString whatsThis = i18n("Sets a specific day within the year on which this "
+ TQString whatsThis = i18n("Sets a specific day within the year on which this "
"event or to-do should recur.");
- mByDayRadio = new QRadioButton( recurOnDayText, buttonGroup );
- QWhatsThis::add( mByDayRadio, whatsThis );
+ mByDayRadio = new TQRadioButton( recurOnDayText, buttonGroup );
+ TQWhatsThis::add( mByDayRadio, whatsThis );
dayLayout->addWidget( mByDayRadio );
- mByDaySpin = new QSpinBox( 1, 366, 1, buttonGroup );
- QWhatsThis::add( mByDaySpin, whatsThis );
+ mByDaySpin = new TQSpinBox( 1, 366, 1, buttonGroup );
+ TQWhatsThis::add( mByDaySpin, whatsThis );
dayLayout->addWidget( mByDaySpin );
- QString ofTheYear( i18n("part after NNN of 'Recur on day #NNN of the year'", " of the &year"));
+ TQString ofTheYear( i18n("part after NNN of 'Recur on day #NNN of the year'", " of the &year"));
if ( KOPrefs::instance()->mCompactDialogs ) {
ofTheYear = i18n("part after NNN of 'Recur on day #NNN of the year', short version",
" of the year");
}
- ofLabel = new QLabel( ofTheYear, buttonGroup );
- QWhatsThis::add( ofLabel, whatsThis );
+ ofLabel = new TQLabel( ofTheYear, buttonGroup );
+ TQWhatsThis::add( ofLabel, whatsThis );
dayLayout->addWidget( ofLabel );
ofLabel->setBuddy( mByDaySpin );
@@ -573,44 +573,44 @@ int RecurYearly::day()
//////////////////////////// ExceptionsWidget //////////////////////////
-ExceptionsWidget::ExceptionsWidget( QWidget *parent, const char *name ) :
- QWidget( parent, name )
+ExceptionsWidget::ExceptionsWidget( TQWidget *parent, const char *name ) :
+ TQWidget( parent, name )
{
- QBoxLayout *topLayout = new QVBoxLayout( this );
+ TQBoxLayout *topLayout = new TQVBoxLayout( this );
- QGroupBox *groupBox = new QGroupBox( 1, Horizontal, i18n("E&xceptions"),
+ TQGroupBox *groupBox = new TQGroupBox( 1, Horizontal, i18n("E&xceptions"),
this );
topLayout->addWidget( groupBox );
- QWidget *box = new QWidget( groupBox );
+ TQWidget *box = new TQWidget( groupBox );
- QGridLayout *boxLayout = new QGridLayout( box );
+ TQGridLayout *boxLayout = new TQGridLayout( box );
mExceptionDateEdit = new KDateEdit( box );
- QWhatsThis::add( mExceptionDateEdit,
+ TQWhatsThis::add( mExceptionDateEdit,
i18n("A date that should be considered an exception "
"to the recurrence rules for this event or to-do.") );
- mExceptionDateEdit->setDate( QDate::currentDate() );
+ mExceptionDateEdit->setDate( TQDate::currentDate() );
boxLayout->addWidget( mExceptionDateEdit, 0, 0 );
- QPushButton *addExceptionButton = new QPushButton( i18n("&Add"), box );
- QWhatsThis::add( addExceptionButton,
+ TQPushButton *addExceptionButton = new TQPushButton( i18n("&Add"), box );
+ TQWhatsThis::add( addExceptionButton,
i18n("Add this date as an exception "
"to the recurrence rules for this event or to-do.") );
boxLayout->addWidget( addExceptionButton, 1, 0 );
- QPushButton *changeExceptionButton = new QPushButton( i18n("&Change"), box );
- QWhatsThis::add( changeExceptionButton,
+ TQPushButton *changeExceptionButton = new TQPushButton( i18n("&Change"), box );
+ TQWhatsThis::add( changeExceptionButton,
i18n("Replace the currently selected date with this date.") );
boxLayout->addWidget( changeExceptionButton, 2, 0 );
- QPushButton *deleteExceptionButton = new QPushButton( i18n("&Delete"), box );
- QWhatsThis::add( deleteExceptionButton,
+ TQPushButton *deleteExceptionButton = new TQPushButton( i18n("&Delete"), box );
+ TQWhatsThis::add( deleteExceptionButton,
i18n("Delete the currently selected date from the list of dates "
"that should be considered exceptions to the recurrence rules "
"for this event or to-do.") );
boxLayout->addWidget( deleteExceptionButton, 3, 0 );
- mExceptionList = new QListBox( box );
- QWhatsThis::add( mExceptionList,
+ mExceptionList = new TQListBox( box );
+ TQWhatsThis::add( mExceptionList,
i18n("Displays current dates that are being considered "
"exceptions to the recurrence rules for this event "
"or to-do.") );
@@ -619,18 +619,18 @@ ExceptionsWidget::ExceptionsWidget( QWidget *parent, const char *name ) :
boxLayout->setRowStretch( 4, 1 );
boxLayout->setColStretch( 1, 3 );
- connect( addExceptionButton, SIGNAL( clicked() ),
- SLOT( addException() ) );
- connect( changeExceptionButton, SIGNAL( clicked() ),
- SLOT( changeException() ) );
- connect( deleteExceptionButton, SIGNAL( clicked() ),
- SLOT( deleteException() ) );
+ connect( addExceptionButton, TQT_SIGNAL( clicked() ),
+ TQT_SLOT( addException() ) );
+ connect( changeExceptionButton, TQT_SIGNAL( clicked() ),
+ TQT_SLOT( changeException() ) );
+ connect( deleteExceptionButton, TQT_SIGNAL( clicked() ),
+ TQT_SLOT( deleteException() ) );
}
void ExceptionsWidget::addException()
{
- QDate date = mExceptionDateEdit->date();
- QString dateStr = KGlobal::locale()->formatDate( date );
+ TQDate date = mExceptionDateEdit->date();
+ TQString dateStr = KGlobal::locale()->formatDate( date );
if( !mExceptionList->findItem( dateStr ) ) {
mExceptionDates.append( date );
mExceptionList->insertItem( dateStr );
@@ -642,7 +642,7 @@ void ExceptionsWidget::changeException()
int pos = mExceptionList->currentItem();
if ( pos < 0 ) return;
- QDate date = mExceptionDateEdit->date();
+ TQDate date = mExceptionDateEdit->date();
mExceptionDates[ pos ] = date;
mExceptionList->changeItem( KGlobal::locale()->formatDate( date ), pos );
}
@@ -674,7 +674,7 @@ DateList ExceptionsWidget::dates()
///////////////////////// ExceptionsDialog ///////////////////////////
-ExceptionsDialog::ExceptionsDialog( QWidget *parent, const char *name ) :
+ExceptionsDialog::ExceptionsDialog( TQWidget *parent, const char *name ) :
KDialogBase( parent, name, true, i18n("Edit Exceptions"), Ok|Cancel )
{
mExceptions = new ExceptionsWidget( this );
@@ -693,86 +693,86 @@ DateList ExceptionsDialog::dates()
///////////////////////// RecurrenceRangeWidget ///////////////////////////
-RecurrenceRangeWidget::RecurrenceRangeWidget( QWidget *parent,
+RecurrenceRangeWidget::RecurrenceRangeWidget( TQWidget *parent,
const char *name )
- : QWidget( parent, name )
+ : TQWidget( parent, name )
{
- QBoxLayout *topLayout = new QVBoxLayout( this );
+ TQBoxLayout *topLayout = new TQVBoxLayout( this );
- mRangeGroupBox = new QGroupBox( 1, Horizontal, i18n("Recurrence Range"),
+ mRangeGroupBox = new TQGroupBox( 1, Horizontal, i18n("Recurrence Range"),
this );
- QWhatsThis::add( mRangeGroupBox,
+ TQWhatsThis::add( mRangeGroupBox,
i18n("Sets a range for which these recurrence rules will "
"apply to this event or to-do.") );
topLayout->addWidget( mRangeGroupBox );
- QWidget *rangeBox = new QWidget( mRangeGroupBox );
- QVBoxLayout *rangeLayout = new QVBoxLayout( rangeBox );
+ TQWidget *rangeBox = new TQWidget( mRangeGroupBox );
+ TQVBoxLayout *rangeLayout = new TQVBoxLayout( rangeBox );
rangeLayout->setSpacing( KDialog::spacingHint() );
- mStartDateLabel = new QLabel( i18n("Begin on:"), rangeBox );
- QWhatsThis::add( mStartDateLabel,
+ mStartDateLabel = new TQLabel( i18n("Begin on:"), rangeBox );
+ TQWhatsThis::add( mStartDateLabel,
i18n("The date on which the recurrences for this event or to-do "
"should begin.") );
rangeLayout->addWidget( mStartDateLabel );
- QButtonGroup *rangeButtonGroup = new QButtonGroup( this );
+ TQButtonGroup *rangeButtonGroup = new TQButtonGroup( this );
rangeButtonGroup->hide();
- mNoEndDateButton = new QRadioButton( i18n("&No ending date"), rangeBox );
- QWhatsThis::add( mNoEndDateButton,
+ mNoEndDateButton = new TQRadioButton( i18n("&No ending date"), rangeBox );
+ TQWhatsThis::add( mNoEndDateButton,
i18n("Sets the event or to-do to recur forever.") );
rangeButtonGroup->insert( mNoEndDateButton );
rangeLayout->addWidget( mNoEndDateButton );
- QBoxLayout *durationLayout = new QHBoxLayout( rangeLayout );
+ TQBoxLayout *durationLayout = new TQHBoxLayout( rangeLayout );
durationLayout->setSpacing( KDialog::spacingHint() );
- mEndDurationButton = new QRadioButton( i18n("End &after"), rangeBox );
- QWhatsThis::add( mEndDurationButton,
+ mEndDurationButton = new TQRadioButton( i18n("End &after"), rangeBox );
+ TQWhatsThis::add( mEndDurationButton,
i18n("Sets the event or to-do to stop recurring after a "
"certain number of occurrences.") );
rangeButtonGroup->insert( mEndDurationButton );
durationLayout->addWidget( mEndDurationButton );
- QString whatsThis = i18n("Number of times the event or to-do should recur "
+ TQString whatsThis = i18n("Number of times the event or to-do should recur "
"before stopping.");
- mEndDurationEdit = new QSpinBox( 1, 9999, 1, rangeBox );
- QWhatsThis::add( mEndDurationEdit, whatsThis );
+ mEndDurationEdit = new TQSpinBox( 1, 9999, 1, rangeBox );
+ TQWhatsThis::add( mEndDurationEdit, whatsThis );
durationLayout->addWidget( mEndDurationEdit );
- QLabel *endDurationLabel = new QLabel( i18n("&occurrence(s)"), rangeBox );
- QWhatsThis::add( endDurationLabel, whatsThis );
+ TQLabel *endDurationLabel = new TQLabel( i18n("&occurrence(s)"), rangeBox );
+ TQWhatsThis::add( endDurationLabel, whatsThis );
durationLayout ->addWidget( endDurationLabel );
endDurationLabel->setBuddy( mEndDurationEdit );
- QBoxLayout *endDateLayout = new QHBoxLayout( rangeLayout );
+ TQBoxLayout *endDateLayout = new TQHBoxLayout( rangeLayout );
endDateLayout->setSpacing( KDialog::spacingHint() );
- mEndDateButton = new QRadioButton( i18n("End &on:"), rangeBox );
- QWhatsThis::add( mEndDateButton,
+ mEndDateButton = new TQRadioButton( i18n("End &on:"), rangeBox );
+ TQWhatsThis::add( mEndDateButton,
i18n("Sets the event or to-do to stop recurring on "
"a certain date.") );
rangeButtonGroup->insert( mEndDateButton );
endDateLayout->addWidget( mEndDateButton );
mEndDateEdit = new KDateEdit( rangeBox );
- QWhatsThis::add( mEndDateEdit,
+ TQWhatsThis::add( mEndDateEdit,
i18n("Date after which the event or to-do should stop "
"recurring") );
endDateLayout->addWidget( mEndDateEdit );
endDateLayout->addStretch( 1 );
- connect( mNoEndDateButton, SIGNAL( toggled( bool ) ),
- SLOT( showCurrentRange() ) );
- connect( mEndDurationButton, SIGNAL( toggled( bool ) ),
- SLOT( showCurrentRange() ) );
- connect( mEndDateButton, SIGNAL( toggled( bool ) ),
- SLOT( showCurrentRange() ) );
+ connect( mNoEndDateButton, TQT_SIGNAL( toggled( bool ) ),
+ TQT_SLOT( showCurrentRange() ) );
+ connect( mEndDurationButton, TQT_SIGNAL( toggled( bool ) ),
+ TQT_SLOT( showCurrentRange() ) );
+ connect( mEndDateButton, TQT_SIGNAL( toggled( bool ) ),
+ TQT_SLOT( showCurrentRange() ) );
}
-void RecurrenceRangeWidget::setDefaults( const QDateTime &from )
+void RecurrenceRangeWidget::setDefaults( const TQDateTime &from )
{
mNoEndDateButton->setChecked( true );
@@ -803,12 +803,12 @@ int RecurrenceRangeWidget::duration()
}
}
-void RecurrenceRangeWidget::setEndDate( const QDate &date )
+void RecurrenceRangeWidget::setEndDate( const TQDate &date )
{
mEndDateEdit->setDate( date );
}
-QDate RecurrenceRangeWidget::endDate()
+TQDate RecurrenceRangeWidget::endDate()
{
return mEndDateEdit->date();
}
@@ -819,8 +819,8 @@ void RecurrenceRangeWidget::showCurrentRange()
mEndDateEdit->setEnabled( mEndDateButton->isChecked() );
}
-void RecurrenceRangeWidget::setDateTimes( const QDateTime &start,
- const QDateTime & )
+void RecurrenceRangeWidget::setDateTimes( const TQDateTime &start,
+ const TQDateTime & )
{
mStartDateLabel->setText( i18n("Begins on: %1")
.arg( KGlobal::locale()->formatDate( start.date() ) ) );
@@ -828,7 +828,7 @@ void RecurrenceRangeWidget::setDateTimes( const QDateTime &start,
///////////////////////// RecurrenceRangeDialog ///////////////////////////
-RecurrenceRangeDialog::RecurrenceRangeDialog( QWidget *parent,
+RecurrenceRangeDialog::RecurrenceRangeDialog( TQWidget *parent,
const char *name ) :
KDialogBase( parent, name, true, i18n("Edit Recurrence Range"), Ok|Cancel )
{
@@ -836,7 +836,7 @@ RecurrenceRangeDialog::RecurrenceRangeDialog( QWidget *parent,
setMainWidget( mRecurrenceRangeWidget );
}
-void RecurrenceRangeDialog::setDefaults( const QDateTime &from )
+void RecurrenceRangeDialog::setDefaults( const TQDateTime &from )
{
mRecurrenceRangeWidget->setDefaults( from );
}
@@ -851,32 +851,32 @@ int RecurrenceRangeDialog::duration()
return mRecurrenceRangeWidget->duration();
}
-void RecurrenceRangeDialog::setEndDate( const QDate &date )
+void RecurrenceRangeDialog::setEndDate( const TQDate &date )
{
mRecurrenceRangeWidget->setEndDate( date );
}
-QDate RecurrenceRangeDialog::endDate()
+TQDate RecurrenceRangeDialog::endDate()
{
return mRecurrenceRangeWidget->endDate();
}
-void RecurrenceRangeDialog::setDateTimes( const QDateTime &start,
- const QDateTime &end )
+void RecurrenceRangeDialog::setDateTimes( const TQDateTime &start,
+ const TQDateTime &end )
{
mRecurrenceRangeWidget->setDateTimes( start, end );
}
//////////////////////////// RecurrenceChooser ////////////////////////
-RecurrenceChooser::RecurrenceChooser( QWidget *parent, const char *name ) :
- QWidget( parent, name )
+RecurrenceChooser::RecurrenceChooser( TQWidget *parent, const char *name ) :
+ TQWidget( parent, name )
{
- QBoxLayout *topLayout = new QVBoxLayout( this );
+ TQBoxLayout *topLayout = new TQVBoxLayout( this );
if ( KOPrefs::instance()->mCompactDialogs ) {
- mTypeCombo = new QComboBox( this );
- QWhatsThis::add( mTypeCombo,
+ mTypeCombo = new TQComboBox( this );
+ TQWhatsThis::add( mTypeCombo,
i18n("Sets the type of recurrence this event or to-do "
"should have.") );
mTypeCombo->insertItem( i18n("Daily") );
@@ -886,39 +886,39 @@ RecurrenceChooser::RecurrenceChooser( QWidget *parent, const char *name ) :
topLayout->addWidget( mTypeCombo );
- connect( mTypeCombo, SIGNAL( activated( int ) ), SLOT( emitChoice() ) );
+ connect( mTypeCombo, TQT_SIGNAL( activated( int ) ), TQT_SLOT( emitChoice() ) );
} else {
mTypeCombo = 0;
- QButtonGroup *ruleButtonGroup = new QButtonGroup( 1, Horizontal, this );
- ruleButtonGroup->setFrameStyle( QFrame::NoFrame );
+ TQButtonGroup *ruleButtonGroup = new TQButtonGroup( 1, Horizontal, this );
+ ruleButtonGroup->setFrameStyle( TQFrame::NoFrame );
topLayout->addWidget( ruleButtonGroup );
- mDailyButton = new QRadioButton( i18n("&Daily"), ruleButtonGroup );
- QWhatsThis::add( mDailyButton,
+ mDailyButton = new TQRadioButton( i18n("&Daily"), ruleButtonGroup );
+ TQWhatsThis::add( mDailyButton,
i18n("Sets the event or to-do to recur daily according "
"to the specified rules.") );
- mWeeklyButton = new QRadioButton( i18n("&Weekly"), ruleButtonGroup );
- QWhatsThis::add( mWeeklyButton,
+ mWeeklyButton = new TQRadioButton( i18n("&Weekly"), ruleButtonGroup );
+ TQWhatsThis::add( mWeeklyButton,
i18n("Sets the event or to-do to recur weekly according "
"to the specified rules.") );
- mMonthlyButton = new QRadioButton( i18n("&Monthly"), ruleButtonGroup );
- QWhatsThis::add( mMonthlyButton,
+ mMonthlyButton = new TQRadioButton( i18n("&Monthly"), ruleButtonGroup );
+ TQWhatsThis::add( mMonthlyButton,
i18n("Sets the event or to-do to recur monthly according "
"to the specified rules.") );
- mYearlyButton = new QRadioButton( i18n("&Yearly"), ruleButtonGroup );
- QWhatsThis::add( mYearlyButton,
+ mYearlyButton = new TQRadioButton( i18n("&Yearly"), ruleButtonGroup );
+ TQWhatsThis::add( mYearlyButton,
i18n("Sets the event or to-do to recur yearly according "
"to the specified rules.") );
- connect( mDailyButton, SIGNAL( toggled( bool ) ),
- SLOT( emitChoice() ) );
- connect( mWeeklyButton, SIGNAL( toggled( bool ) ),
- SLOT( emitChoice() ) );
- connect( mMonthlyButton, SIGNAL( toggled( bool ) ),
- SLOT( emitChoice() ) );
- connect( mYearlyButton, SIGNAL( toggled( bool ) ),
- SLOT( emitChoice() ) );
+ connect( mDailyButton, TQT_SIGNAL( toggled( bool ) ),
+ TQT_SLOT( emitChoice() ) );
+ connect( mWeeklyButton, TQT_SIGNAL( toggled( bool ) ),
+ TQT_SLOT( emitChoice() ) );
+ connect( mMonthlyButton, TQT_SIGNAL( toggled( bool ) ),
+ TQT_SLOT( emitChoice() ) );
+ connect( mYearlyButton, TQT_SIGNAL( toggled( bool ) ),
+ TQT_SLOT( emitChoice() ) );
}
}
@@ -964,24 +964,24 @@ void RecurrenceChooser::emitChoice()
/////////////////////////////// Main Widget /////////////////////////////
-KOEditorRecurrence::KOEditorRecurrence( QWidget* parent, const char *name ) :
- QWidget( parent, name )
+KOEditorRecurrence::KOEditorRecurrence( TQWidget* parent, const char *name ) :
+ TQWidget( parent, name )
{
- QGridLayout *topLayout = new QGridLayout( this );
+ TQGridLayout *topLayout = new TQGridLayout( this );
topLayout->setSpacing( KDialog::spacingHint() );
- mEnabledCheck = new QCheckBox( i18n("&Enable recurrence"), this );
- QWhatsThis::add( mEnabledCheck,
+ mEnabledCheck = new TQCheckBox( i18n("&Enable recurrence"), this );
+ TQWhatsThis::add( mEnabledCheck,
i18n("Enables recurrence for this event or to-do according "
"to the specified rules.") );
- connect( mEnabledCheck, SIGNAL( toggled( bool ) ),
- SLOT( setRecurrenceEnabled( bool ) ) );
+ connect( mEnabledCheck, TQT_SIGNAL( toggled( bool ) ),
+ TQT_SLOT( setRecurrenceEnabled( bool ) ) );
topLayout->addMultiCellWidget( mEnabledCheck, 0, 0, 0, 1 );
- mTimeGroupBox = new QGroupBox( 1, Horizontal, i18n("Appointment Time "),
+ mTimeGroupBox = new TQGroupBox( 1, Horizontal, i18n("Appointment Time "),
this );
- QWhatsThis::add( mTimeGroupBox,
+ TQWhatsThis::add( mTimeGroupBox,
i18n("Displays appointment time information.") );
topLayout->addMultiCellWidget( mTimeGroupBox, 1, 1 , 0 , 1 );
@@ -989,20 +989,20 @@ KOEditorRecurrence::KOEditorRecurrence( QWidget* parent, const char *name ) :
mTimeGroupBox->hide();
}
-// QFrame *timeFrame = new QFrame( mTimeGroupBox );
-// QBoxLayout *layoutTimeFrame = new QHBoxLayout( timeFrame );
+// TQFrame *timeFrame = new TQFrame( mTimeGroupBox );
+// TQBoxLayout *layoutTimeFrame = new TQHBoxLayout( timeFrame );
// layoutTimeFrame->setSpacing( KDialog::spacingHint() );
- mDateTimeLabel = new QLabel( mTimeGroupBox );
-// mDateTimeLabel = new QLabel( timeFrame );
+ mDateTimeLabel = new TQLabel( mTimeGroupBox );
+// mDateTimeLabel = new TQLabel( timeFrame );
// layoutTimeFrame->addWidget( mDateTimeLabel );
Qt::Orientation orientation;
if ( KOPrefs::instance()->mCompactDialogs ) orientation = Horizontal;
else orientation = Vertical;
- mRuleBox = new QGroupBox( 1, orientation, i18n("Recurrence Rule"), this );
- QWhatsThis::add( mRuleBox,
+ mRuleBox = new TQGroupBox( 1, orientation, i18n("Recurrence Rule"), this );
+ TQWhatsThis::add( mRuleBox,
i18n("Options concerning the type of recurrence this event "
"or to-do should have.") );
if ( KOPrefs::instance()->mCompactDialogs ) {
@@ -1012,15 +1012,15 @@ KOEditorRecurrence::KOEditorRecurrence( QWidget* parent, const char *name ) :
}
mRecurrenceChooser = new RecurrenceChooser( mRuleBox );
- connect( mRecurrenceChooser, SIGNAL( chosen( int ) ),
- SLOT( showCurrentRule( int ) ) );
+ connect( mRecurrenceChooser, TQT_SIGNAL( chosen( int ) ),
+ TQT_SLOT( showCurrentRule( int ) ) );
if ( !KOPrefs::instance()->mCompactDialogs ) {
- QFrame *ruleSepFrame = new QFrame( mRuleBox );
- ruleSepFrame->setFrameStyle( QFrame::VLine | QFrame::Sunken );
+ TQFrame *ruleSepFrame = new TQFrame( mRuleBox );
+ ruleSepFrame->setFrameStyle( TQFrame::VLine | TQFrame::Sunken );
}
- mRuleStack = new QWidgetStack( mRuleBox );
+ mRuleStack = new TQWidgetStack( mRuleBox );
mDaily = new RecurDaily( mRuleStack );
mRuleStack->addWidget( mDaily, 0 );
@@ -1040,26 +1040,26 @@ KOEditorRecurrence::KOEditorRecurrence( QWidget* parent, const char *name ) :
mRecurrenceRangeWidget = 0;
mRecurrenceRangeDialog = new RecurrenceRangeDialog( this );
mRecurrenceRange = mRecurrenceRangeDialog;
- mRecurrenceRangeButton = new QPushButton( i18n("Recurrence Range..."),
+ mRecurrenceRangeButton = new TQPushButton( i18n("Recurrence Range..."),
this );
- QWhatsThis::add( mRecurrenceRangeButton,
+ TQWhatsThis::add( mRecurrenceRangeButton,
i18n("Options concerning the time range during which "
"this event or to-do should recur.") );
topLayout->addWidget( mRecurrenceRangeButton, 3, 0 );
- connect( mRecurrenceRangeButton, SIGNAL( clicked() ),
- SLOT( showRecurrenceRangeDialog() ) );
+ connect( mRecurrenceRangeButton, TQT_SIGNAL( clicked() ),
+ TQT_SLOT( showRecurrenceRangeDialog() ) );
mExceptionsWidget = 0;
mExceptionsDialog = new ExceptionsDialog( this );
mExceptions = mExceptionsDialog;
- mExceptionsButton = new QPushButton( i18n("Exceptions..."), this );
+ mExceptionsButton = new TQPushButton( i18n("Exceptions..."), this );
topLayout->addWidget( mExceptionsButton, 4, 0 );
- connect( mExceptionsButton, SIGNAL( clicked() ),
- SLOT( showExceptionsDialog() ) );
+ connect( mExceptionsButton, TQT_SIGNAL( clicked() ),
+ TQT_SLOT( showExceptionsDialog() ) );
} else {
mRecurrenceRangeWidget = new RecurrenceRangeWidget( this );
- QWhatsThis::add( mRecurrenceRangeWidget,
+ TQWhatsThis::add( mRecurrenceRangeWidget,
i18n("Options concerning the time range during which "
"this event or to-do should recur.") );
mRecurrenceRangeDialog = 0;
@@ -1110,7 +1110,7 @@ void KOEditorRecurrence::showCurrentRule( int current )
}
}
-void KOEditorRecurrence::setDateTimes( const QDateTime &start, const QDateTime &end )
+void KOEditorRecurrence::setDateTimes( const TQDateTime &start, const TQDateTime &end )
{
// kdDebug(5850) << "KOEditorRecurrence::setDateTimes" << endl;
@@ -1126,7 +1126,7 @@ void KOEditorRecurrence::setDateTimes( const QDateTime &start, const QDateTime &
int type = mRecurrenceChooser->type();
if ( !enabled || type != RecurrenceChooser::Weekly ) {
- QBitArray days( 7 );
+ TQBitArray days( 7 );
days.fill( 0 );
days.setBit( (start.date().dayOfWeek()+6) % 7 );
mWeekly->setDays( days );
@@ -1143,7 +1143,7 @@ void KOEditorRecurrence::setDateTimes( const QDateTime &start, const QDateTime &
}
}
-void KOEditorRecurrence::setDefaults( const QDateTime &from, const QDateTime &to, bool )
+void KOEditorRecurrence::setDefaults( const TQDateTime &from, const TQDateTime &to, bool )
{
setDateTimes( from, to );
@@ -1159,7 +1159,7 @@ void KOEditorRecurrence::setDefaults( const QDateTime &from, const QDateTime &to
mDaily->setFrequency( 1 );
mWeekly->setFrequency( 1 );
- QBitArray days( 7 );
+ TQBitArray days( 7 );
days.fill( 0 );
days.setBit( (from.date().dayOfWeek()+6) % 7 );
mWeekly->setDays( days );
@@ -1179,7 +1179,7 @@ void KOEditorRecurrence::readIncidence(Incidence *incidence)
{
if (!incidence) return;
- QBitArray rDays( 7 );
+ TQBitArray rDays( 7 );
int day = 0;
int count = 0;
int month = 0;
@@ -1224,7 +1224,7 @@ void KOEditorRecurrence::readIncidence(Incidence *incidence)
// more extended, this can be changed.
recurrenceType = RecurrenceChooser::Monthly;
- QValueList<RecurrenceRule::WDayPos> rmp = r->monthPositions();
+ TQValueList<RecurrenceRule::WDayPos> rmp = r->monthPositions();
if ( !rmp.isEmpty() ) {
mMonthly->setByPos( rmp.first().pos(), rmp.first().day() );
}
@@ -1235,7 +1235,7 @@ void KOEditorRecurrence::readIncidence(Incidence *incidence)
case Recurrence::rMonthlyDay: {
recurrenceType = RecurrenceChooser::Monthly;
- QValueList<int> rmd = r->monthDays();
+ TQValueList<int> rmd = r->monthDays();
// check if we have any setting for which day (vcs import is broken and
// does not set any day, thus we need to check)
if ( rmd.isEmpty() ) {
@@ -1250,7 +1250,7 @@ void KOEditorRecurrence::readIncidence(Incidence *incidence)
break; }
case Recurrence::rYearlyMonth: {
recurrenceType = RecurrenceChooser::Yearly;
- QValueList<int> rmd = r->yearDates();
+ TQValueList<int> rmd = r->yearDates();
if ( rmd.isEmpty() ) {
day = incidence->dtStart().date().day();
} else {
@@ -1266,14 +1266,14 @@ void KOEditorRecurrence::readIncidence(Incidence *incidence)
case Recurrence::rYearlyPos: {
recurrenceType = RecurrenceChooser::Yearly;
- QValueList<int> months = r->yearMonths();
+ TQValueList<int> months = r->yearMonths();
if ( months.isEmpty() ) {
month = incidence->dtStart().date().month();
} else {
month = months.first();
}
- QValueList<RecurrenceRule::WDayPos> pos = r->yearPositions();
+ TQValueList<RecurrenceRule::WDayPos> pos = r->yearPositions();
if ( pos.isEmpty() ) {
// Use dtStart if nothing is given (shouldn't happen!)
@@ -1288,7 +1288,7 @@ void KOEditorRecurrence::readIncidence(Incidence *incidence)
break; }
case Recurrence::rYearlyDay: {
recurrenceType = RecurrenceChooser::Yearly;
- QValueList<int> days = r->yearDays();
+ TQValueList<int> days = r->yearDays();
if ( days.isEmpty() ) {
day = incidence->dtStart().date().dayOfYear();
} else {
@@ -1330,7 +1330,7 @@ void KOEditorRecurrence::writeIncidence( Incidence *incidence )
r->unsetRecurs();
int duration = mRecurrenceRange->duration();
- QDate endDate;
+ TQDate endDate;
if ( duration == 0 ) endDate = mRecurrenceRange->endDate();
int recurrenceType = mRecurrenceChooser->type();
@@ -1344,7 +1344,7 @@ void KOEditorRecurrence::writeIncidence( Incidence *incidence )
if ( mMonthly->byPos() ) {
int pos = mMonthly->count();
- QBitArray days( 7 );
+ TQBitArray days( 7 );
days.fill( false );
days.setBit( mMonthly->weekday() - 1 );
r->addMonthlyPos( pos, days );
@@ -1362,7 +1362,7 @@ void KOEditorRecurrence::writeIncidence( Incidence *incidence )
break;
case RecurYearly::byPos: {
r->addYearlyMonth( mYearly->posMonth() );
- QBitArray days( 7 );
+ TQBitArray days( 7 );
days.fill( false );
days.setBit( mYearly->posWeekday() - 1 );
r->addYearlyPos( mYearly->posCount(), days );
@@ -1380,7 +1380,7 @@ void KOEditorRecurrence::writeIncidence( Incidence *incidence )
incidence->recurrence()->setExDates( mExceptions->dates() );
}
-void KOEditorRecurrence::setDateTimeStr( const QString &str )
+void KOEditorRecurrence::setDateTimeStr( const TQString &str )
{
mDateTimeLabel->setText( str );
}
@@ -1401,7 +1401,7 @@ bool KOEditorRecurrence::validateInput()
// Check if a weekly recurrence has at least one day selected
// TODO: Get rid of this, it's not really needed (by default the day should be taken from dtStart)
if( mEnabledCheck->isChecked() && recurrenceType == RecurrenceChooser::Weekly ) {
- const QBitArray &days = mWeekly->days();
+ const TQBitArray &days = mWeekly->days();
bool valid = false;
for ( int i=0; i<7; ++i ) valid = valid || days.testBit( i );
if ( !valid ) {
@@ -1418,16 +1418,16 @@ void KOEditorRecurrence::showExceptionsDialog()
{
DateList dates = mExceptions->dates();
int result = mExceptionsDialog->exec();
- if ( result == QDialog::Rejected ) mExceptions->setDates( dates );
+ if ( result == TQDialog::Rejected ) mExceptions->setDates( dates );
}
void KOEditorRecurrence::showRecurrenceRangeDialog()
{
int duration = mRecurrenceRange->duration();
- QDate endDate = mRecurrenceRange->endDate();
+ TQDate endDate = mRecurrenceRange->endDate();
int result = mRecurrenceRangeDialog->exec();
- if ( result == QDialog::Rejected ) {
+ if ( result == TQDialog::Rejected ) {
mRecurrenceRange->setDuration( duration );
mRecurrenceRange->setEndDate( endDate );
}
@@ -1439,7 +1439,7 @@ bool KOEditorRecurrence::doesRecur()
}
-KOEditorRecurrenceDialog::KOEditorRecurrenceDialog(QWidget * parent) :
+KOEditorRecurrenceDialog::KOEditorRecurrenceDialog(TQWidget * parent) :
KDialogBase( parent, 0, false, i18n("Recurrence"), Ok )
{
mRecurrence = new KOEditorRecurrence( this );
diff --git a/korganizer/koeditorrecurrence.h b/korganizer/koeditorrecurrence.h
index 2a0532a6e..5b900330d 100644
--- a/korganizer/koeditorrecurrence.h
+++ b/korganizer/koeditorrecurrence.h
@@ -24,9 +24,9 @@
#ifndef _KOEDITORRECURRENCE_H
#define _KOEDITORRECURRENCE_H
-#include <qdatetime.h>
-#include <qwidget.h>
-#include <qbitarray.h>
+#include <tqdatetime.h>
+#include <tqwidget.h>
+#include <tqbitarray.h>
#include <kdialogbase.h>
@@ -47,49 +47,49 @@ using namespace KCal;
class RecurBase : public QWidget
{
public:
- RecurBase( QWidget *parent = 0, const char *name = 0 );
+ RecurBase( TQWidget *parent = 0, const char *name = 0 );
void setFrequency( int );
int frequency();
// FIXME: If we want to adjust the recurrence when the start/due date change,
// we need to reimplement this method in the derived classes!
- void setDateTimes( const QDateTime &/*start*/, const QDateTime &/*end*/ ) {}
+ void setDateTimes( const TQDateTime &/*start*/, const TQDateTime &/*end*/ ) {}
- QWidget *frequencyEdit();
+ TQWidget *frequencyEdit();
protected:
- static QComboBox *createWeekCountCombo( QWidget *parent=0, const char *name=0 );
- static QComboBox *createWeekdayCombo( QWidget *parent=0, const char *name=0 );
- static QComboBox *createMonthNameCombo( QWidget *parent=0, const char *name=0 );
- QBoxLayout *createFrequencySpinBar( QWidget *parent, QLayout *layout,
- QString everyText, QString unitText );
+ static TQComboBox *createWeekCountCombo( TQWidget *parent=0, const char *name=0 );
+ static TQComboBox *createWeekdayCombo( TQWidget *parent=0, const char *name=0 );
+ static TQComboBox *createMonthNameCombo( TQWidget *parent=0, const char *name=0 );
+ TQBoxLayout *createFrequencySpinBar( TQWidget *parent, TQLayout *layout,
+ TQString everyText, TQString unitText );
private:
- QSpinBox *mFrequencyEdit;
+ TQSpinBox *mFrequencyEdit;
};
class RecurDaily : public RecurBase
{
public:
- RecurDaily( QWidget *parent = 0, const char *name = 0 );
+ RecurDaily( TQWidget *parent = 0, const char *name = 0 );
};
class RecurWeekly : public RecurBase
{
public:
- RecurWeekly( QWidget *parent = 0, const char *name = 0 );
+ RecurWeekly( TQWidget *parent = 0, const char *name = 0 );
- void setDays( const QBitArray & );
- QBitArray days();
+ void setDays( const TQBitArray & );
+ TQBitArray days();
private:
- QCheckBox *mDayBoxes[7];
+ TQCheckBox *mDayBoxes[7];
};
class RecurMonthly : public RecurBase
{
public:
- RecurMonthly( QWidget *parent = 0, const char *name = 0 );
+ RecurMonthly( TQWidget *parent = 0, const char *name = 0 );
void setByDay( int day );
void setByPos( int count, int weekday );
@@ -103,12 +103,12 @@ class RecurMonthly : public RecurBase
int weekday();
private:
- QRadioButton *mByDayRadio;
- QComboBox *mByDayCombo;
+ TQRadioButton *mByDayRadio;
+ TQComboBox *mByDayCombo;
- QRadioButton *mByPosRadio;
- QComboBox *mByPosCountCombo;
- QComboBox *mByPosWeekdayCombo;
+ TQRadioButton *mByPosRadio;
+ TQComboBox *mByPosCountCombo;
+ TQComboBox *mByPosWeekdayCombo;
};
class RecurYearly : public RecurBase
@@ -116,7 +116,7 @@ class RecurYearly : public RecurBase
public:
enum YearlyType { byDay, byPos, byMonth };
- RecurYearly( QWidget *parent = 0, const char *name = 0 );
+ RecurYearly( TQWidget *parent = 0, const char *name = 0 );
void setByDay( int day );
void setByPos( int count, int weekday, int month );
@@ -132,25 +132,25 @@ class RecurYearly : public RecurBase
int month();
private:
- QRadioButton *mByMonthRadio;
- QRadioButton *mByPosRadio;
- QRadioButton *mByDayRadio;
+ TQRadioButton *mByMonthRadio;
+ TQRadioButton *mByPosRadio;
+ TQRadioButton *mByDayRadio;
- QSpinBox *mByMonthSpin;
- QComboBox *mByMonthCombo;
+ TQSpinBox *mByMonthSpin;
+ TQComboBox *mByMonthCombo;
- QComboBox *mByPosDayCombo;
- QComboBox *mByPosWeekdayCombo;
- QComboBox *mByPosMonthCombo;
+ TQComboBox *mByPosDayCombo;
+ TQComboBox *mByPosWeekdayCombo;
+ TQComboBox *mByPosMonthCombo;
- QSpinBox *mByDaySpin;
+ TQSpinBox *mByDaySpin;
};
class RecurrenceChooser : public QWidget
{
Q_OBJECT
public:
- RecurrenceChooser( QWidget *parent = 0, const char *name = 0 );
+ RecurrenceChooser( TQWidget *parent = 0, const char *name = 0 );
enum { Daily, Weekly, Monthly, Yearly };
@@ -164,12 +164,12 @@ class RecurrenceChooser : public QWidget
void emitChoice();
private:
- QComboBox *mTypeCombo;
+ TQComboBox *mTypeCombo;
- QRadioButton *mDailyButton;
- QRadioButton *mWeeklyButton;
- QRadioButton *mMonthlyButton;
- QRadioButton *mYearlyButton;
+ TQRadioButton *mDailyButton;
+ TQRadioButton *mWeeklyButton;
+ TQRadioButton *mMonthlyButton;
+ TQRadioButton *mYearlyButton;
};
class ExceptionsBase
@@ -179,11 +179,11 @@ class ExceptionsBase
virtual DateList dates() = 0;
};
-class ExceptionsWidget : public QWidget, public ExceptionsBase
+class ExceptionsWidget : public TQWidget, public ExceptionsBase
{
Q_OBJECT
public:
- ExceptionsWidget( QWidget *parent = 0, const char *name = 0 );
+ ExceptionsWidget( TQWidget *parent = 0, const char *name = 0 );
void setDates( const DateList & );
DateList dates();
@@ -195,14 +195,14 @@ class ExceptionsWidget : public QWidget, public ExceptionsBase
private:
KDateEdit *mExceptionDateEdit;
- QListBox *mExceptionList;
+ TQListBox *mExceptionList;
DateList mExceptionDates;
};
class ExceptionsDialog : public KDialogBase, public ExceptionsBase
{
public:
- ExceptionsDialog( QWidget *parent, const char *name = 0 );
+ ExceptionsDialog( TQWidget *parent, const char *name = 0 );
void setDates( const DateList & );
DateList dates();
@@ -214,63 +214,63 @@ class ExceptionsDialog : public KDialogBase, public ExceptionsBase
class RecurrenceRangeBase
{
public:
- virtual void setDefaults( const QDateTime &from ) = 0;
+ virtual void setDefaults( const TQDateTime &from ) = 0;
virtual void setDuration( int ) = 0;
virtual int duration() = 0;
- virtual void setEndDate( const QDate & ) = 0;
- virtual QDate endDate() = 0;
+ virtual void setEndDate( const TQDate & ) = 0;
+ virtual TQDate endDate() = 0;
- virtual void setDateTimes( const QDateTime &start,
- const QDateTime &end = QDateTime() ) = 0;
+ virtual void setDateTimes( const TQDateTime &start,
+ const TQDateTime &end = TQDateTime() ) = 0;
};
-class RecurrenceRangeWidget : public QWidget, public RecurrenceRangeBase
+class RecurrenceRangeWidget : public TQWidget, public RecurrenceRangeBase
{
Q_OBJECT
public:
- RecurrenceRangeWidget( QWidget *parent = 0, const char *name = 0 );
+ RecurrenceRangeWidget( TQWidget *parent = 0, const char *name = 0 );
- void setDefaults( const QDateTime &from );
+ void setDefaults( const TQDateTime &from );
void setDuration( int );
int duration();
- void setEndDate( const QDate & );
- QDate endDate();
+ void setEndDate( const TQDate & );
+ TQDate endDate();
- void setDateTimes( const QDateTime &start,
- const QDateTime &end = QDateTime() );
+ void setDateTimes( const TQDateTime &start,
+ const TQDateTime &end = TQDateTime() );
protected slots:
void showCurrentRange();
private:
- QGroupBox *mRangeGroupBox;
- QLabel *mStartDateLabel;
- QRadioButton *mNoEndDateButton;
- QRadioButton *mEndDurationButton;
- QSpinBox *mEndDurationEdit;
- QRadioButton *mEndDateButton;
+ TQGroupBox *mRangeGroupBox;
+ TQLabel *mStartDateLabel;
+ TQRadioButton *mNoEndDateButton;
+ TQRadioButton *mEndDurationButton;
+ TQSpinBox *mEndDurationEdit;
+ TQRadioButton *mEndDateButton;
KDateEdit *mEndDateEdit;
};
class RecurrenceRangeDialog : public KDialogBase, public RecurrenceRangeBase
{
public:
- RecurrenceRangeDialog( QWidget *parent = 0, const char *name = 0 );
+ RecurrenceRangeDialog( TQWidget *parent = 0, const char *name = 0 );
- void setDefaults( const QDateTime &from );
+ void setDefaults( const TQDateTime &from );
void setDuration( int );
int duration();
- void setEndDate( const QDate & );
- QDate endDate();
+ void setEndDate( const TQDate & );
+ TQDate endDate();
- void setDateTimes( const QDateTime &start,
- const QDateTime &end = QDateTime() );
+ void setDateTimes( const TQDateTime &start,
+ const TQDateTime &end = TQDateTime() );
private:
RecurrenceRangeWidget *mRecurrenceRangeWidget;
@@ -280,13 +280,13 @@ class KOEditorRecurrence : public QWidget
{
Q_OBJECT
public:
- KOEditorRecurrence ( QWidget *parent = 0, const char *name = 0 );
+ KOEditorRecurrence ( TQWidget *parent = 0, const char *name = 0 );
virtual ~KOEditorRecurrence();
enum { Daily, Weekly, Monthly, Yearly };
/** Set widgets to default values */
- void setDefaults( const QDateTime &from, const QDateTime &to, bool allday );
+ void setDefaults( const TQDateTime &from, const TQDateTime &to, bool allday );
/** Read event object and setup widgets accordingly */
void readIncidence( Incidence * );
/** Write event settings to event object */
@@ -299,11 +299,11 @@ class KOEditorRecurrence : public QWidget
public slots:
void setRecurrenceEnabled( bool );
- void setDateTimes( const QDateTime &start, const QDateTime &end );
- void setDateTimeStr( const QString & );
+ void setDateTimes( const TQDateTime &start, const TQDateTime &end );
+ void setDateTimeStr( const TQString & );
signals:
- void dateTimesChanged( const QDateTime &start, const QDateTime &end );
+ void dateTimesChanged( const TQDateTime &start, const TQDateTime &end );
protected slots:
void showCurrentRule( int );
@@ -311,13 +311,13 @@ class KOEditorRecurrence : public QWidget
void showRecurrenceRangeDialog();
private:
- QCheckBox *mEnabledCheck;
+ TQCheckBox *mEnabledCheck;
- QGroupBox *mTimeGroupBox;
- QLabel *mDateTimeLabel;
+ TQGroupBox *mTimeGroupBox;
+ TQLabel *mDateTimeLabel;
- QGroupBox *mRuleBox;
- QWidgetStack *mRuleStack;
+ TQGroupBox *mRuleBox;
+ TQWidgetStack *mRuleStack;
RecurrenceChooser *mRecurrenceChooser;
RecurDaily *mDaily;
@@ -328,21 +328,21 @@ class KOEditorRecurrence : public QWidget
RecurrenceRangeBase *mRecurrenceRange;
RecurrenceRangeWidget *mRecurrenceRangeWidget;
RecurrenceRangeDialog *mRecurrenceRangeDialog;
- QPushButton *mRecurrenceRangeButton;
+ TQPushButton *mRecurrenceRangeButton;
ExceptionsBase *mExceptions;
ExceptionsDialog *mExceptionsDialog;
ExceptionsWidget *mExceptionsWidget;
- QPushButton *mExceptionsButton;
+ TQPushButton *mExceptionsButton;
- QDateTime mEventStartDt;
+ TQDateTime mEventStartDt;
};
class KOEditorRecurrenceDialog : public KDialogBase
{
Q_OBJECT
public:
- KOEditorRecurrenceDialog( QWidget *parent );
+ KOEditorRecurrenceDialog( TQWidget *parent );
KOEditorRecurrence* editor() const { return mRecurrence; }
private:
diff --git a/korganizer/koeventeditor.cpp b/korganizer/koeventeditor.cpp
index 31a909717..5cc7041ee 100644
--- a/korganizer/koeventeditor.cpp
+++ b/korganizer/koeventeditor.cpp
@@ -23,12 +23,12 @@
without including the source code for Qt in the source distribution.
*/
-#include <qtooltip.h>
-#include <qframe.h>
-#include <qpixmap.h>
-#include <qlayout.h>
-#include <qwidgetstack.h>
-#include <qwhatsthis.h>
+#include <tqtooltip.h>
+#include <tqframe.h>
+#include <tqpixmap.h>
+#include <tqlayout.h>
+#include <tqwidgetstack.h>
+#include <tqwhatsthis.h>
#include <kiconloader.h>
#include <kdebug.h>
@@ -51,8 +51,8 @@
#include "koeventeditor.h"
-KOEventEditor::KOEventEditor( Calendar *calendar, QWidget *parent )
- : KOIncidenceEditor( QString::null, calendar, parent ),
+KOEventEditor::KOEventEditor( Calendar *calendar, TQWidget *parent )
+ : KOIncidenceEditor( TQString::null, calendar, parent ),
mEvent( 0 ), mCalendar( 0 ), mGeneral( 0 ), mRecurrence( 0 ), mFreeBusy( 0 )
{
}
@@ -72,39 +72,39 @@ void KOEventEditor::init()
setupDesignerTabs( "event" );
// Propagate date time settings to recurrence tab
- connect( mGeneral, SIGNAL( dateTimesChanged( const QDateTime &, const QDateTime & ) ),
- mRecurrence, SLOT( setDateTimes( const QDateTime &, const QDateTime &) ) );
- connect( mGeneral, SIGNAL( dateTimeStrChanged( const QString & ) ),
- mRecurrence, SLOT( setDateTimeStr( const QString & ) ) );
- connect( mFreeBusy, SIGNAL( dateTimesChanged( const QDateTime &, const QDateTime & ) ),
- mRecurrence, SLOT( setDateTimes( const QDateTime &, const QDateTime & ) ) );
+ connect( mGeneral, TQT_SIGNAL( dateTimesChanged( const TQDateTime &, const TQDateTime & ) ),
+ mRecurrence, TQT_SLOT( setDateTimes( const TQDateTime &, const TQDateTime &) ) );
+ connect( mGeneral, TQT_SIGNAL( dateTimeStrChanged( const TQString & ) ),
+ mRecurrence, TQT_SLOT( setDateTimeStr( const TQString & ) ) );
+ connect( mFreeBusy, TQT_SIGNAL( dateTimesChanged( const TQDateTime &, const TQDateTime & ) ),
+ mRecurrence, TQT_SLOT( setDateTimes( const TQDateTime &, const TQDateTime & ) ) );
// Propagate date time settings to gantt tab and back
- connect( mGeneral, SIGNAL( dateTimesChanged( const QDateTime &, const QDateTime & ) ),
- mFreeBusy, SLOT( slotUpdateGanttView( const QDateTime &, const QDateTime & ) ) );
- connect( mFreeBusy, SIGNAL( dateTimesChanged( const QDateTime &, const QDateTime & ) ),
- mGeneral, SLOT( setDateTimes( const QDateTime &, const QDateTime & ) ) );
-
- connect( mGeneral, SIGNAL( focusReceivedSignal() ),
- SIGNAL( focusReceivedSignal() ) );
-
- connect( mGeneral, SIGNAL( openCategoryDialog() ),
- SIGNAL( editCategories() ) );
- connect( this, SIGNAL( updateCategoryConfig() ),
- mGeneral, SIGNAL( updateCategoryConfig() ) );
-
- connect( mFreeBusy, SIGNAL(updateAttendeeSummary(int)),
- mGeneral, SLOT(updateAttendeeSummary(int)) );
-
- connect( mGeneral, SIGNAL(editRecurrence()),
- mRecurrenceDialog, SLOT(show()) );
- connect( mRecurrenceDialog, SIGNAL(okClicked()),
- SLOT(updateRecurrenceSummary()) );
-
- connect( mGeneral, SIGNAL(acceptInvitation()),
- mFreeBusy, SLOT(acceptForMe()) );
- connect( mGeneral, SIGNAL(declineInvitation()),
- mFreeBusy, SLOT(declineForMe()) );
+ connect( mGeneral, TQT_SIGNAL( dateTimesChanged( const TQDateTime &, const TQDateTime & ) ),
+ mFreeBusy, TQT_SLOT( slotUpdateGanttView( const TQDateTime &, const TQDateTime & ) ) );
+ connect( mFreeBusy, TQT_SIGNAL( dateTimesChanged( const TQDateTime &, const TQDateTime & ) ),
+ mGeneral, TQT_SLOT( setDateTimes( const TQDateTime &, const TQDateTime & ) ) );
+
+ connect( mGeneral, TQT_SIGNAL( focusReceivedSignal() ),
+ TQT_SIGNAL( focusReceivedSignal() ) );
+
+ connect( mGeneral, TQT_SIGNAL( openCategoryDialog() ),
+ TQT_SIGNAL( editCategories() ) );
+ connect( this, TQT_SIGNAL( updateCategoryConfig() ),
+ mGeneral, TQT_SIGNAL( updateCategoryConfig() ) );
+
+ connect( mFreeBusy, TQT_SIGNAL(updateAttendeeSummary(int)),
+ mGeneral, TQT_SLOT(updateAttendeeSummary(int)) );
+
+ connect( mGeneral, TQT_SIGNAL(editRecurrence()),
+ mRecurrenceDialog, TQT_SLOT(show()) );
+ connect( mRecurrenceDialog, TQT_SIGNAL(okClicked()),
+ TQT_SLOT(updateRecurrenceSummary()) );
+
+ connect( mGeneral, TQT_SIGNAL(acceptInvitation()),
+ mFreeBusy, TQT_SLOT(acceptForMe()) );
+ connect( mGeneral, TQT_SIGNAL(declineInvitation()),
+ mFreeBusy, TQT_SLOT(declineForMe()) );
}
void KOEventEditor::reload()
@@ -119,37 +119,37 @@ void KOEventEditor::setupGeneral()
mGeneral = new KOEditorGeneralEvent( this );
if( KOPrefs::instance()->mCompactDialogs ) {
- QFrame *topFrame = addPage(i18n("General"));
- QWhatsThis::add( topFrame,
+ TQFrame *topFrame = addPage(i18n("General"));
+ TQWhatsThis::add( topFrame,
i18n("The General tab allows you to set the most common "
"options for the event.") );
- QBoxLayout *topLayout = new QVBoxLayout(topFrame);
+ TQBoxLayout *topLayout = new TQVBoxLayout(topFrame);
topLayout->setSpacing(spacingHint());
mGeneral->initHeader( topFrame, topLayout );
mGeneral->initTime(topFrame,topLayout);
-// QBoxLayout *alarmLineLayout = new QHBoxLayout(topLayout);
+// TQBoxLayout *alarmLineLayout = new TQHBoxLayout(topLayout);
mGeneral->initAlarm(topFrame,topLayout);
mGeneral->enableAlarm( false );
topLayout->addStretch( 1 );
- QFrame *topFrame2 = addPage(i18n("Details"));
+ TQFrame *topFrame2 = addPage(i18n("Details"));
- QBoxLayout *topLayout2 = new QVBoxLayout(topFrame2);
+ TQBoxLayout *topLayout2 = new TQVBoxLayout(topFrame2);
topLayout2->setSpacing(spacingHint());
mGeneral->initClass(topFrame2,topLayout2);
mGeneral->initSecrecy( topFrame2, topLayout2 );
mGeneral->initDescription(topFrame2,topLayout2);
} else {
- QFrame *topFrame = addPage(i18n("&General"));
- QWhatsThis::add( topFrame,
+ TQFrame *topFrame = addPage(i18n("&General"));
+ TQWhatsThis::add( topFrame,
i18n("The General tab allows you to set the most common "
"options for the event.") );
- QBoxLayout *topLayout = new QVBoxLayout(topFrame);
+ TQBoxLayout *topLayout = new TQVBoxLayout(topFrame);
topLayout->setSpacing(spacingHint());
mGeneral->initInvitationBar( topFrame, topLayout );
@@ -157,10 +157,10 @@ void KOEventEditor::setupGeneral()
mGeneral->initTime(topFrame,topLayout);
mGeneral->initDescription(topFrame,topLayout);
mGeneral->initAttachments(topFrame,topLayout);
- connect( mGeneral, SIGNAL( openURL( const KURL& ) ),
- this, SLOT( openURL( const KURL& ) ) );
- connect( this, SIGNAL( signalAddAttachments( const QStringList&, const QStringList&, bool ) ),
- mGeneral, SLOT( addAttachments( const QStringList&, const QStringList&, bool ) ) );
+ connect( mGeneral, TQT_SIGNAL( openURL( const KURL& ) ),
+ this, TQT_SLOT( openURL( const KURL& ) ) );
+ connect( this, TQT_SIGNAL( signalAddAttachments( const TQStringList&, const TQStringList&, bool ) ),
+ mGeneral, TQT_SLOT( addAttachments( const TQStringList&, const TQStringList&, bool ) ) );
}
mGeneral->finishSetup();
@@ -176,13 +176,13 @@ void KOEventEditor::modified (int /*modification*/)
void KOEventEditor::setupRecurrence()
{
#if 0
- QFrame *topFrame = addPage( i18n("Rec&urrence") );
+ TQFrame *topFrame = addPage( i18n("Rec&urrence") );
- QWhatsThis::add( topFrame,
+ TQWhatsThis::add( topFrame,
i18n("The Recurrence tab allows you to set options on "
"how often this event recurs.") );
- QBoxLayout *topLayout = new QVBoxLayout( topFrame );
+ TQBoxLayout *topLayout = new TQVBoxLayout( topFrame );
mRecurrence = new KOEditorRecurrence( topFrame );
topLayout->addWidget( mRecurrence );
@@ -194,12 +194,12 @@ void KOEventEditor::setupRecurrence()
void KOEventEditor::setupFreeBusy()
{
- QFrame *freeBusyPage = addPage( i18n("&Attendees") );
- QWhatsThis::add( freeBusyPage,
+ TQFrame *freeBusyPage = addPage( i18n("&Attendees") );
+ TQWhatsThis::add( freeBusyPage,
i18n("The Free/Busy tab allows you to see whether "
"other attendees are free or busy during your event.") );
- QBoxLayout *topLayout = new QVBoxLayout( freeBusyPage );
+ TQBoxLayout *topLayout = new TQVBoxLayout( freeBusyPage );
mAttendeeEditor = mFreeBusy = new KOEditorFreeBusy( spacingHint(), freeBusyPage );
topLayout->addWidget( mFreeBusy );
@@ -227,7 +227,7 @@ void KOEventEditor::newEvent()
setCaption( i18n("New Event") );
}
-void KOEventEditor::setDates( const QDateTime &from, const QDateTime &to, bool allDay )
+void KOEventEditor::setDates( const TQDateTime &from, const TQDateTime &to, bool allDay )
{
mGeneral->setDefaults( from, to, allDay );
mRecurrence->setDefaults( from, to, allDay );
@@ -239,7 +239,7 @@ void KOEventEditor::setDates( const QDateTime &from, const QDateTime &to, bool a
}
}
-void KOEventEditor::setTexts( const QString &summary, const QString &description )
+void KOEventEditor::setTexts( const TQString &summary, const TQString &description )
{
if ( description.isEmpty() && summary.contains("\n") ) {
mGeneral->setDescription( summary );
@@ -253,10 +253,10 @@ void KOEventEditor::setTexts( const QString &summary, const QString &description
void KOEventEditor::loadDefaults()
{
- QDateTime from( QDate::currentDate(), KOPrefs::instance()->mStartTime.time() );
+ TQDateTime from( TQDate::currentDate(), KOPrefs::instance()->mStartTime.time() );
int addSecs = ( KOPrefs::instance()->mDefaultDuration.time().hour()*3600 ) +
( KOPrefs::instance()->mDefaultDuration.time().minute()*60 );
- QDateTime to( from.addSecs( addSecs ) );
+ TQDateTime to( from.addSecs( addSecs ) );
setDates( from, to, false );
}
@@ -267,7 +267,7 @@ bool KOEventEditor::processInput()
if ( !validateInput() || !mChanger ) return false;
- QGuardedPtr<KOEditorFreeBusy> freeBusy( mFreeBusy );
+ TQGuardedPtr<KOEditorFreeBusy> freeBusy( mFreeBusy );
if ( mEvent ) {
bool rc = true;
@@ -394,12 +394,12 @@ void KOEventEditor::loadTemplate( /*const*/ CalendarLocal& cal )
}
}
-QStringList& KOEventEditor::templates() const
+TQStringList& KOEventEditor::templates() const
{
return KOPrefs::instance()->mEventTemplates;
}
-void KOEventEditor::slotSaveTemplate( const QString &templateName )
+void KOEventEditor::slotSaveTemplate( const TQString &templateName )
{
kdDebug(5006) << "SlotSaveTemplate" << endl;
Event *event = new Event;
@@ -407,7 +407,7 @@ void KOEventEditor::slotSaveTemplate( const QString &templateName )
saveAsTemplate( event, templateName );
}
-QObject *KOEventEditor::typeAheadReceiver() const
+TQObject *KOEventEditor::typeAheadReceiver() const
{
return mGeneral->typeAheadReceiver();
}
diff --git a/korganizer/koeventeditor.h b/korganizer/koeventeditor.h
index 6d06fe276..ba0974793 100644
--- a/korganizer/koeventeditor.h
+++ b/korganizer/koeventeditor.h
@@ -52,7 +52,7 @@ class KOEventEditor : public KOIncidenceEditor
/**
Construct new event editor.
*/
- KOEventEditor( Calendar *calendar, QWidget *parent );
+ KOEventEditor( Calendar *calendar, TQWidget *parent );
virtual ~KOEventEditor(void);
void init();
@@ -70,7 +70,7 @@ class KOEventEditor : public KOIncidenceEditor
summary contains multiple lines, the summary will be used as description
and only the first line of summary will be used as the summary.
*/
- void setTexts( const QString &summary, const QString &description = QString::null );
+ void setTexts( const TQString &summary, const TQString &description = TQString::null );
/**
Edit an existing event.
*/
@@ -79,7 +79,7 @@ class KOEventEditor : public KOIncidenceEditor
/**
Set widgets to the given date/time values
*/
- void setDates( const QDateTime &from, const QDateTime &to, bool allDay );
+ void setDates( const TQDateTime &from, const TQDateTime &to, bool allDay );
/**
Read event object and setup widgets accordingly. If tmpl is true, the
@@ -91,7 +91,7 @@ class KOEventEditor : public KOIncidenceEditor
*/
void writeEvent( Event * );
- QObject *typeAheadReceiver() const;
+ TQObject *typeAheadReceiver() const;
void selectInvitationCounterProposal( bool enable );
@@ -102,11 +102,11 @@ class KOEventEditor : public KOIncidenceEditor
void loadDefaults();
void deleteEvent();
- void slotSaveTemplate( const QString & );
+ void slotSaveTemplate( const TQString & );
void updateRecurrenceSummary();
protected:
- QString type() { return "Event"; }
+ TQString type() { return "Event"; }
void setupGeneral();
void setupRecurrence();
void setupFreeBusy();
@@ -119,7 +119,7 @@ class KOEventEditor : public KOIncidenceEditor
void processCancel();
int msgItemDelete();
void loadTemplate( /*const*/ CalendarLocal& );
- QStringList& templates() const;
+ TQStringList& templates() const;
private:
Event *mEvent;
diff --git a/korganizer/koeventpopupmenu.cpp b/korganizer/koeventpopupmenu.cpp
index 54272fd54..75c96d205 100644
--- a/korganizer/koeventpopupmenu.cpp
+++ b/korganizer/koeventpopupmenu.cpp
@@ -22,7 +22,7 @@
without including the source code for Qt in the source distribution.
*/
-#include <qcursor.h>
+#include <tqcursor.h>
#include <kactioncollection.h>
#include <klocale.h>
@@ -46,71 +46,71 @@
KOEventPopupMenu::KOEventPopupMenu()
{
mCurrentIncidence = 0;
- mCurrentDate = QDate();
+ mCurrentDate = TQDate();
mHasAdditionalItems = false;
- insertItem( i18n("&Show"), this, SLOT( popupShow() ) );
+ insertItem( i18n("&Show"), this, TQT_SLOT( popupShow() ) );
mEditOnlyItems.append(
- insertItem(i18n("&Edit..."), this, SLOT( popupEdit() ) ) );
+ insertItem(i18n("&Edit..."), this, TQT_SLOT( popupEdit() ) ) );
#ifndef KORG_NOPRINTER
insertItem( KOGlobals::self()->smallIcon("printer1"), i18n("&Print..."),
- this, SLOT( print() ) );
+ this, TQT_SLOT( print() ) );
#endif
//------------------------------------------------------------------------
mEditOnlyItems.append( insertSeparator() );
mEditOnlyItems.append(
insertItem( KOGlobals::self()->smallIcon("editcut"), i18n("&Cut"),
- this, SLOT( popupCut() ) ) );
+ this, TQT_SLOT( popupCut() ) ) );
mEditOnlyItems.append(
insertItem( KOGlobals::self()->smallIcon("editcopy"), i18n("&Copy"),
- this, SLOT( popupCopy() ) ) );
+ this, TQT_SLOT( popupCopy() ) ) );
// paste is always possible
insertItem( KOGlobals::self()->smallIcon("editpaste"), i18n("&Paste"),
- this, SLOT( popupPaste() ) );
+ this, TQT_SLOT( popupPaste() ) );
mEditOnlyItems.append(
insertItem( KOGlobals::self()->smallIcon("editdelete"), i18n("&Delete"),
- this, SLOT( popupDelete() ) ) );
+ this, TQT_SLOT( popupDelete() ) ) );
//------------------------------------------------------------------------
mEditOnlyItems.append( insertSeparator() );
mEditOnlyItems.append(
insertItem( KOGlobals::self()->smallIcon("bell"), i18n("&Toggle Reminder"),
- this, SLOT( popupAlarm() ) ) );
+ this, TQT_SLOT( popupAlarm() ) ) );
//------------------------------------------------------------------------
mRecurrenceItems.append( insertSeparator() );
mRecurrenceItems.append(
insertItem( i18n("&Dissociate This Occurrence"),
- this, SLOT( dissociateOccurrence() ) ) );
+ this, TQT_SLOT( dissociateOccurrence() ) ) );
mRecurrenceItems.append(
insertItem( i18n("&Dissociate Future Occurrences"),
- this, SLOT( dissociateFutureOccurrence() ) ) );
+ this, TQT_SLOT( dissociateFutureOccurrence() ) ) );
insertSeparator();
insertItem( KOGlobals::self()->smallIcon("mail_forward"), i18n( "Send as iCalendar..."),
- this, SLOT(forward()) );
+ this, TQT_SLOT(forward()) );
}
-void KOEventPopupMenu::showIncidencePopup( Incidence *incidence, const QDate &qd )
+void KOEventPopupMenu::showIncidencePopup( Incidence *incidence, const TQDate &qd )
{
mCurrentIncidence = incidence;
mCurrentDate = qd;
if (mCurrentIncidence) {
// Enable/Disabled menu items only valid for editable events.
- QValueList<int>::Iterator it;
+ TQValueList<int>::Iterator it;
for( it = mEditOnlyItems.begin(); it != mEditOnlyItems.end(); ++it ) {
setItemEnabled(*it,!mCurrentIncidence->isReadOnly());
}
for ( it = mRecurrenceItems.begin(); it != mRecurrenceItems.end(); ++it ) {
setItemVisible( *it, mCurrentIncidence->doesRecur() );
}
- popup(QCursor::pos());
+ popup(TQCursor::pos());
} else {
kdDebug(5850) << "KOEventPopupMenu::showEventPopup(): No event selected" << endl;
}
}
-void KOEventPopupMenu::addAdditionalItem(const QIconSet &icon,const QString &text,
- const QObject *receiver, const char *member,
+void KOEventPopupMenu::addAdditionalItem(const TQIconSet &icon,const TQString &text,
+ const TQObject *receiver, const char *member,
bool editOnly)
{
if (!mHasAdditionalItems) {
@@ -136,7 +136,7 @@ void KOEventPopupMenu::print()
#ifndef KORG_NOPRINTER
KOCoreHelper helper;
CalPrinter printer( this, 0, &helper );
- connect( this, SIGNAL(configChanged()), &printer, SLOT(updateConfig()) );
+ connect( this, TQT_SIGNAL(configChanged()), &printer, TQT_SLOT(updateConfig()) );
Incidence::List selectedIncidences;
selectedIncidences.append( mCurrentIncidence );
diff --git a/korganizer/koeventpopupmenu.h b/korganizer/koeventpopupmenu.h
index 9d5db17c4..8d4f2df26 100644
--- a/korganizer/koeventpopupmenu.h
+++ b/korganizer/koeventpopupmenu.h
@@ -27,26 +27,26 @@
// Context menu for event views with standard event actions
//
-#include <qpopupmenu.h>
-#include <qdatetime.h>
+#include <tqpopupmenu.h>
+#include <tqdatetime.h>
namespace KCal {
class Incidence;
}
using namespace KCal;
-class KOEventPopupMenu : public QPopupMenu {
+class KOEventPopupMenu : public TQPopupMenu {
Q_OBJECT
public:
KOEventPopupMenu();
- void addAdditionalItem(const QIconSet &icon,const QString &text,
- const QObject *receiver, const char *member,
+ void addAdditionalItem(const TQIconSet &icon,const TQString &text,
+ const TQObject *receiver, const char *member,
bool editOnly=false);
public slots:
- void showIncidencePopup( Incidence *, const QDate & );
+ void showIncidencePopup( Incidence *, const TQDate & );
protected slots:
void popupShow();
@@ -69,16 +69,16 @@ class KOEventPopupMenu : public QPopupMenu {
void copyIncidenceSignal(Incidence *);
void pasteIncidenceSignal();
void toggleAlarmSignal(Incidence *);
- void dissociateOccurrenceSignal( Incidence *, const QDate & );
- void dissociateFutureOccurrenceSignal( Incidence *, const QDate & );
+ void dissociateOccurrenceSignal( Incidence *, const TQDate & );
+ void dissociateFutureOccurrenceSignal( Incidence *, const TQDate & );
private:
Incidence *mCurrentIncidence;
- QDate mCurrentDate;
+ TQDate mCurrentDate;
bool mHasAdditionalItems;
- QValueList<int> mEditOnlyItems;
- QValueList<int> mRecurrenceItems;
+ TQValueList<int> mEditOnlyItems;
+ TQValueList<int> mRecurrenceItems;
};
#endif
diff --git a/korganizer/koeventview.cpp b/korganizer/koeventview.cpp
index 1f3e62a59..17708953b 100644
--- a/korganizer/koeventview.cpp
+++ b/korganizer/koeventview.cpp
@@ -22,8 +22,8 @@
without including the source code for Qt in the source distribution.
*/
-#include <qpopupmenu.h>
-#include <qcursor.h>
+#include <tqpopupmenu.h>
+#include <tqcursor.h>
#include <klocale.h>
#include <kdebug.h>
@@ -44,7 +44,7 @@ using namespace KOrg;
//---------------------------------------------------------------------------
-KOEventView::KOEventView(Calendar *cal,QWidget *parent,const char *name)
+KOEventView::KOEventView(Calendar *cal,TQWidget *parent,const char *name)
: KOrg::BaseView(cal,parent,name)
{
}
@@ -61,29 +61,29 @@ KOEventPopupMenu *KOEventView::eventPopup()
{
KOEventPopupMenu *eventPopup = new KOEventPopupMenu;
- connect(eventPopup,SIGNAL(editIncidenceSignal(Incidence *)),
- SIGNAL(editIncidenceSignal(Incidence *)));
- connect(eventPopup,SIGNAL(showIncidenceSignal(Incidence *)),
- SIGNAL(showIncidenceSignal(Incidence *)));
- connect(eventPopup,SIGNAL(deleteIncidenceSignal(Incidence *)),
- SIGNAL(deleteIncidenceSignal(Incidence *)));
- connect(eventPopup,SIGNAL(cutIncidenceSignal(Incidence *)),
- SIGNAL(cutIncidenceSignal(Incidence *)));
- connect(eventPopup,SIGNAL(copyIncidenceSignal(Incidence *)),
- SIGNAL(copyIncidenceSignal(Incidence *)));
- connect(eventPopup,SIGNAL(pasteIncidenceSignal()),
- SIGNAL(pasteIncidenceSignal()));
- connect(eventPopup,SIGNAL(toggleAlarmSignal(Incidence *)),
- SIGNAL(toggleAlarmSignal(Incidence*)));
- connect(eventPopup,SIGNAL(dissociateOccurrenceSignal( Incidence *, const QDate & )),
- SIGNAL(dissociateOccurrenceSignal( Incidence *, const QDate & )));
- connect(eventPopup,SIGNAL(dissociateFutureOccurrenceSignal( Incidence *, const QDate & )),
- SIGNAL(dissociateFutureOccurrenceSignal( Incidence *, const QDate & )));
+ connect(eventPopup,TQT_SIGNAL(editIncidenceSignal(Incidence *)),
+ TQT_SIGNAL(editIncidenceSignal(Incidence *)));
+ connect(eventPopup,TQT_SIGNAL(showIncidenceSignal(Incidence *)),
+ TQT_SIGNAL(showIncidenceSignal(Incidence *)));
+ connect(eventPopup,TQT_SIGNAL(deleteIncidenceSignal(Incidence *)),
+ TQT_SIGNAL(deleteIncidenceSignal(Incidence *)));
+ connect(eventPopup,TQT_SIGNAL(cutIncidenceSignal(Incidence *)),
+ TQT_SIGNAL(cutIncidenceSignal(Incidence *)));
+ connect(eventPopup,TQT_SIGNAL(copyIncidenceSignal(Incidence *)),
+ TQT_SIGNAL(copyIncidenceSignal(Incidence *)));
+ connect(eventPopup,TQT_SIGNAL(pasteIncidenceSignal()),
+ TQT_SIGNAL(pasteIncidenceSignal()));
+ connect(eventPopup,TQT_SIGNAL(toggleAlarmSignal(Incidence *)),
+ TQT_SIGNAL(toggleAlarmSignal(Incidence*)));
+ connect(eventPopup,TQT_SIGNAL(dissociateOccurrenceSignal( Incidence *, const TQDate & )),
+ TQT_SIGNAL(dissociateOccurrenceSignal( Incidence *, const TQDate & )));
+ connect(eventPopup,TQT_SIGNAL(dissociateFutureOccurrenceSignal( Incidence *, const TQDate & )),
+ TQT_SIGNAL(dissociateFutureOccurrenceSignal( Incidence *, const TQDate & )));
return eventPopup;
}
-QPopupMenu *KOEventView::newEventPopup()
+TQPopupMenu *KOEventView::newEventPopup()
{
KXMLGUIClient *client = KOCore::self()->xmlguiClient( this );
if ( !client ) {
@@ -95,7 +95,7 @@ QPopupMenu *KOEventView::newEventPopup()
return 0; // can happen if called too early
}
- return static_cast<QPopupMenu*>
+ return static_cast<TQPopupMenu*>
( client->factory()->container( "rmb_selection_popup", client ) );
}
//---------------------------------------------------------------------------
@@ -137,14 +137,14 @@ void KOEventView::popupCopy()
void KOEventView::showNewEventPopup()
{
- QPopupMenu *popup = newEventPopup();
+ TQPopupMenu *popup = newEventPopup();
if ( !popup ) {
kdError() << "KOEventView::showNewEventPopup(): popup creation failed"
<< endl;
return;
}
- popup->popup( QCursor::pos() );
+ popup->popup( TQCursor::pos() );
}
//---------------------------------------------------------------------------
diff --git a/korganizer/koeventview.h b/korganizer/koeventview.h
index d2073d532..23d1bc441 100644
--- a/korganizer/koeventview.h
+++ b/korganizer/koeventview.h
@@ -61,10 +61,10 @@ class KOEventView : public KOrg::BaseView
* Constructs a view.
* @param cal is a pointer to the calendar object from which events
* will be retrieved for display.
- * @param parent is the parent QWidget.
+ * @param parent is the parent TQWidget.
* @param name is the view name.
*/
- KOEventView(Calendar *cal,QWidget *parent=0,const char *name=0);
+ KOEventView(Calendar *cal,TQWidget *parent=0,const char *name=0);
/**
* Destructor. Views will do view-specific cleanups here.
@@ -85,7 +85,7 @@ class KOEventView : public KOrg::BaseView
/**
* Construct a standard context that allows to create a new event.
*/
- QPopupMenu *newEventPopup();
+ TQPopupMenu *newEventPopup();
/** This view is an view for displaying events. */
bool isEventView() { return true; }
@@ -113,7 +113,7 @@ class KOEventView : public KOrg::BaseView
* Emitted when an event is moved using the mouse in an agenda
* view (week / month).
*/
- void shiftedEvent(const QDate& olddate, const QDate& newdate);
+ void shiftedEvent(const TQDate& olddate, const TQDate& newdate);
protected slots:
diff --git a/korganizer/koeventviewer.cpp b/korganizer/koeventviewer.cpp
index 5567211e5..47ac5b7a4 100644
--- a/korganizer/koeventviewer.cpp
+++ b/korganizer/koeventviewer.cpp
@@ -31,8 +31,8 @@
#include <kdebug.h>
#include <koglobals.h>
-KOEventViewer::KOEventViewer( QWidget *parent, const char *name )
- : QTextBrowser( parent, name ), mDefaultText("")
+KOEventViewer::KOEventViewer( TQWidget *parent, const char *name )
+ : TQTextBrowser( parent, name ), mDefaultText("")
{
mIncidence = 0;
}
@@ -47,7 +47,7 @@ void KOEventViewer::readSettings( KConfig * config )
// With each restart of KOrganizer the font site gets halfed. What should this
// be good for?
#if 0
- config->setGroup( QString("EventViewer-%1").arg( name() ) );
+ config->setGroup( TQString("EventViewer-%1").arg( name() ) );
int zoomFactor = config->readNumEntry("ZoomFactor", pointSize() );
zoomTo( zoomFactor/2 );
kdDebug(5850) << " KOEventViewer: restoring the pointSize: "<< pointSize()
@@ -60,12 +60,12 @@ void KOEventViewer::writeSettings( KConfig * config )
{
if ( config ) {
kdDebug(5850) << " KOEventViewer: saving the zoomFactor: "<< pointSize() << endl;
- config->setGroup( QString("EventViewer-%1").arg( name() ) );
+ config->setGroup( TQString("EventViewer-%1").arg( name() ) );
config->writeEntry("ZoomFactor", pointSize() );
}
}
-void KOEventViewer::setSource( const QString &n )
+void KOEventViewer::setSource( const TQString &n )
{
UriHandler::process( n );
}
@@ -94,13 +94,13 @@ void KOEventViewer::clearEvents( bool now )
if ( now ) setText( mDefaultText );
}
-void KOEventViewer::addText( const QString &text )
+void KOEventViewer::addText( const TQString &text )
{
mText.append( text );
setText( mText );
}
-void KOEventViewer::setDefaultText( const QString &text )
+void KOEventViewer::setDefaultText( const TQString &text )
{
mDefaultText = text;
}
diff --git a/korganizer/koeventviewer.h b/korganizer/koeventviewer.h
index 31a4160d6..80b1ef772 100644
--- a/korganizer/koeventviewer.h
+++ b/korganizer/koeventviewer.h
@@ -24,7 +24,7 @@
#ifndef KOEVENTVIEWER_H
#define KOEVENTVIEWER_H
-#include <qtextbrowser.h>
+#include <tqtextbrowser.h>
#include <kdepimmacros.h>
#include <kconfig.h>
@@ -43,13 +43,13 @@ class KDE_EXPORT KOEventViewer : public QTextBrowser
{
Q_OBJECT
public:
- KOEventViewer( QWidget *parent = 0, const char *name = 0 );
+ KOEventViewer( TQWidget *parent = 0, const char *name = 0 );
virtual ~KOEventViewer();
/**
- Reimplemented from QTextBrowser to handle links.
+ Reimplemented from TQTextBrowser to handle links.
*/
- void setSource( const QString & );
+ void setSource( const TQString & );
virtual bool appendIncidence( Incidence * );
@@ -63,13 +63,13 @@ class KDE_EXPORT KOEventViewer : public QTextBrowser
Add given text to currently shown content.
*/
- void addText( const QString &text );
+ void addText( const TQString &text );
/**
Set the default text that is showed when
there aren't a incidence to show
*/
- void setDefaultText( const QString &text );
+ void setDefaultText( const TQString &text );
void readSettings( KConfig *config);
void writeSettings ( KConfig *config);
@@ -82,9 +82,9 @@ class KDE_EXPORT KOEventViewer : public QTextBrowser
void changeIncidenceDisplay( Incidence *incidence, int action );
private:
Incidence *mIncidence;
- QTextBrowser *mEventTextView;
- QString mDefaultText;
- QString mText;
+ TQTextBrowser *mEventTextView;
+ TQString mDefaultText;
+ TQString mText;
};
#endif
diff --git a/korganizer/koeventviewerdialog.cpp b/korganizer/koeventviewerdialog.cpp
index f99a9ac13..a51e5bccb 100644
--- a/korganizer/koeventviewerdialog.cpp
+++ b/korganizer/koeventviewerdialog.cpp
@@ -28,7 +28,7 @@
#include <klocale.h>
-KOEventViewerDialog::KOEventViewerDialog( QWidget *parent, const char *name,
+KOEventViewerDialog::KOEventViewerDialog( TQWidget *parent, const char *name,
bool compact )
: KDialogBase( parent, name, false, i18n("Event Viewer"), Ok, Ok, false,
i18n("Edit") )
@@ -44,14 +44,14 @@ KOEventViewerDialog::KOEventViewerDialog( QWidget *parent, const char *name,
setMinimumSize( 300, 200 );
resize( 320, 300 );
}
- connect( this, SIGNAL(finished()), this, SLOT(delayedDestruct()) );
+ connect( this, TQT_SIGNAL(finished()), this, TQT_SLOT(delayedDestruct()) );
}
KOEventViewerDialog::~KOEventViewerDialog()
{
}
-void KOEventViewerDialog::addText( const QString &text )
+void KOEventViewerDialog::addText( const TQString &text )
{
mEventViewer->addText(text);
}
diff --git a/korganizer/koeventviewerdialog.h b/korganizer/koeventviewerdialog.h
index 750b29f05..e14c6bafd 100644
--- a/korganizer/koeventviewerdialog.h
+++ b/korganizer/koeventviewerdialog.h
@@ -42,14 +42,14 @@ class KDE_EXPORT KOEventViewerDialog : public KDialogBase
{
Q_OBJECT
public:
- KOEventViewerDialog( QWidget *parent = 0, const char *name = 0,
+ KOEventViewerDialog( TQWidget *parent = 0, const char *name = 0,
bool compact = false );
virtual ~KOEventViewerDialog();
void setIncidence( Incidence *incidence ) { mEventViewer->setIncidence( incidence ); }
void appendIncidence( Incidence *incidence ) { mEventViewer->appendIncidence( incidence ); }
- void addText( const QString &text );
+ void addText( const TQString &text );
private:
KOEventViewer *mEventViewer;
diff --git a/korganizer/koglobals.cpp b/korganizer/koglobals.cpp
index 21428e85b..dd55bd374 100644
--- a/korganizer/koglobals.cpp
+++ b/korganizer/koglobals.cpp
@@ -22,7 +22,7 @@
without including the source code for Qt in the source distribution.
*/
-#include <qapplication.h>
+#include <tqapplication.h>
#include <kdebug.h>
#include <kglobal.h>
@@ -99,14 +99,14 @@ AlarmClient *KOGlobals::alarmClient() const
return mAlarmClient;
}
-void KOGlobals::fitDialogToScreen( QWidget *wid, bool force )
+void KOGlobals::fitDialogToScreen( TQWidget *wid, bool force )
{
bool resized = false;
int w = wid->frameSize().width();
int h = wid->frameSize().height();
- QRect desk = KGlobalSettings::desktopGeometry( wid );
+ TQRect desk = KGlobalSettings::desktopGeometry( wid );
if ( w > desk.width() ) {
w = desk.width();
resized = true;
@@ -127,43 +127,43 @@ void KOGlobals::fitDialogToScreen( QWidget *wid, bool force )
bool KOGlobals::reverseLayout()
{
#if QT_VERSION >= 0x030000
- return QApplication::reverseLayout();
+ return TQApplication::reverseLayout();
#else
return false;
#endif
}
-QPixmap KOGlobals::smallIcon( const QString& name )
+TQPixmap KOGlobals::smallIcon( const TQString& name )
{
return SmallIcon( name, mOwnInstance );
}
-QIconSet KOGlobals::smallIconSet( const QString& name, int size )
+TQIconSet KOGlobals::smallIconSet( const TQString& name, int size )
{
return SmallIconSet( name, size, mOwnInstance );
}
-QStringList KOGlobals::holiday( const QDate &date )
+TQStringList KOGlobals::holiday( const TQDate &date )
{
- QStringList hdays;
+ TQStringList hdays;
if ( !mHolidays ) return hdays;
- QValueList<KHoliday> list = mHolidays->getHolidays( date );
- QValueList<KHoliday>::ConstIterator it = list.begin();
+ TQValueList<KHoliday> list = mHolidays->getHolidays( date );
+ TQValueList<KHoliday>::ConstIterator it = list.begin();
for ( ; it != list.end(); ++it ) {
hdays.append( (*it).text );
}
return hdays;
}
-bool KOGlobals::isWorkDay( const QDate &date )
+bool KOGlobals::isWorkDay( const TQDate &date )
{
int mask( ~( KOPrefs::instance()->mWorkWeekMask ) );
bool nonWorkDay = ( mask & ( 1 << ( date.dayOfWeek() - 1 ) ) );
if ( KOPrefs::instance()->mExcludeHolidays && mHolidays ) {
- QValueList<KHoliday> list = mHolidays->getHolidays( date );
- QValueList<KHoliday>::ConstIterator it = list.begin();
+ TQValueList<KHoliday> list = mHolidays->getHolidays( date );
+ TQValueList<KHoliday>::ConstIterator it = list.begin();
for ( ; it != list.end(); ++it ) {
nonWorkDay = nonWorkDay
|| ( (*it).Category == KHolidays::HOLIDAY );
diff --git a/korganizer/koglobals.h b/korganizer/koglobals.h
index d03a5d8ce..88435d4cd 100644
--- a/korganizer/koglobals.h
+++ b/korganizer/koglobals.h
@@ -45,7 +45,7 @@ class KDE_EXPORT KOGlobals
DESCRIPTION_MODIFIED, SUMMARY_MODIFIED,
COMPLETION_MODIFIED_WITH_RECURRENCE, UNKNOWN_MODIFIED };
- static void fitDialogToScreen( QWidget *widget, bool force=false );
+ static void fitDialogToScreen( TQWidget *widget, bool force=false );
KConfig *config() const;
static bool reverseLayout();
@@ -56,11 +56,11 @@ class KDE_EXPORT KOGlobals
~KOGlobals();
- QPixmap smallIcon( const QString& name );
- QIconSet smallIconSet( const QString& name, int size = 0 );
+ TQPixmap smallIcon( const TQString& name );
+ TQIconSet smallIconSet( const TQString& name, int size = 0 );
- QStringList holiday( const QDate & );
- bool isWorkDay( const QDate & );
+ TQStringList holiday( const TQDate & );
+ bool isWorkDay( const TQDate & );
int getWorkWeekMask();
/**
Set which holidays the user wants to use.
diff --git a/korganizer/kogroupware.cpp b/korganizer/kogroupware.cpp
index d788abddd..7b017cc4d 100644
--- a/korganizer/kogroupware.cpp
+++ b/korganizer/kogroupware.cpp
@@ -48,10 +48,10 @@
#include <kmessagebox.h>
#include <kstandarddirs.h>
#include <kdirwatch.h>
-#include <qfile.h>
-#include <qregexp.h>
-#include <qdir.h>
-#include <qtimer.h>
+#include <tqfile.h>
+#include <tqregexp.h>
+#include <tqdir.h>
+#include <tqtimer.h>
FreeBusyManager *KOGroupware::mFreeBusyManager = 0;
@@ -74,7 +74,7 @@ KOGroupware *KOGroupware::instance()
KOGroupware::KOGroupware( CalendarView* view, KCal::CalendarResources* cal )
- : QObject( 0, "kmgroupware_instance" ), mView( view ), mCalendar( cal )
+ : TQObject( 0, "kmgroupware_instance" ), mView( view ), mCalendar( cal )
{
// Set up the dir watch of the three incoming dirs
KDirWatch* watcher = KDirWatch::self();
@@ -84,10 +84,10 @@ KOGroupware *KOGroupware::instance()
watcher->addDir( locateLocal( "data", "korganizer/income.cancel/" ) );
watcher->addDir( locateLocal( "data", "korganizer/income.reply/" ) );
watcher->addDir( locateLocal( "data", "korganizer/income.delegated/" ) );
- connect( watcher, SIGNAL( dirty( const QString& ) ),
- this, SLOT( incomingDirChanged( const QString& ) ) );
+ connect( watcher, TQT_SIGNAL( dirty( const TQString& ) ),
+ this, TQT_SLOT( incomingDirChanged( const TQString& ) ) );
// Now set the ball rolling
- QTimer::singleShot( 0, this, SLOT(initialCheckForChanges()) );
+ TQTimer::singleShot( 0, this, TQT_SLOT(initialCheckForChanges()) );
}
void KOGroupware::initialCheckForChanges()
@@ -103,14 +103,14 @@ void KOGroupware::initialCheckForChanges()
void KOGroupware::slotViewNewIncidenceChanger( IncidenceChangerBase* changer )
{
// Call slot perhapsUploadFB if an incidence was added, changed or removed
- connect( changer, SIGNAL( incidenceAdded( Incidence* ) ),
- mFreeBusyManager, SLOT( slotPerhapsUploadFB() ) );
- connect( changer, SIGNAL( incidenceChanged( Incidence*, Incidence*, int ) ),
- mFreeBusyManager, SLOT( slotPerhapsUploadFB() ) );
- connect( changer, SIGNAL( incidenceChanged( Incidence*, Incidence* ) ),
- mFreeBusyManager, SLOT( slotPerhapsUploadFB() ) ) ;
- connect( changer, SIGNAL( incidenceDeleted( Incidence * ) ),
- mFreeBusyManager, SLOT( slotPerhapsUploadFB() ) );
+ connect( changer, TQT_SIGNAL( incidenceAdded( Incidence* ) ),
+ mFreeBusyManager, TQT_SLOT( slotPerhapsUploadFB() ) );
+ connect( changer, TQT_SIGNAL( incidenceChanged( Incidence*, Incidence*, int ) ),
+ mFreeBusyManager, TQT_SLOT( slotPerhapsUploadFB() ) );
+ connect( changer, TQT_SIGNAL( incidenceChanged( Incidence*, Incidence* ) ),
+ mFreeBusyManager, TQT_SLOT( slotPerhapsUploadFB() ) ) ;
+ connect( changer, TQT_SIGNAL( incidenceDeleted( Incidence * ) ),
+ mFreeBusyManager, TQT_SLOT( slotPerhapsUploadFB() ) );
}
FreeBusyManager *KOGroupware::freeBusyManager()
@@ -118,52 +118,52 @@ FreeBusyManager *KOGroupware::freeBusyManager()
if ( !mFreeBusyManager ) {
mFreeBusyManager = new FreeBusyManager( this, "freebusymanager" );
mFreeBusyManager->setCalendar( mCalendar );
- connect( mCalendar, SIGNAL( calendarChanged() ),
- mFreeBusyManager, SLOT( slotPerhapsUploadFB() ) );
- connect( mView, SIGNAL( newIncidenceChanger( IncidenceChangerBase* ) ),
- this, SLOT( slotViewNewIncidenceChanger( IncidenceChangerBase* ) ) );
+ connect( mCalendar, TQT_SIGNAL( calendarChanged() ),
+ mFreeBusyManager, TQT_SLOT( slotPerhapsUploadFB() ) );
+ connect( mView, TQT_SIGNAL( newIncidenceChanger( IncidenceChangerBase* ) ),
+ this, TQT_SLOT( slotViewNewIncidenceChanger( IncidenceChangerBase* ) ) );
slotViewNewIncidenceChanger( mView->incidenceChanger() );
}
return mFreeBusyManager;
}
-void KOGroupware::incomingDirChanged( const QString& path )
+void KOGroupware::incomingDirChanged( const TQString& path )
{
- const QString incomingDirName = locateLocal( "data","korganizer/" )
+ const TQString incomingDirName = locateLocal( "data","korganizer/" )
+ "income.";
if ( !path.startsWith( incomingDirName ) ) {
kdDebug(5850) << "incomingDirChanged: Wrong dir " << path << endl;
return;
}
- QString action = path.mid( incomingDirName.length() );
+ TQString action = path.mid( incomingDirName.length() );
while ( action.length() > 0 && action[ action.length()-1 ] == '/' )
// Strip slashes at the end
action.truncate( action.length()-1 );
// Handle accepted invitations
- QDir dir( path );
- const QStringList files = dir.entryList( QDir::Files );
+ TQDir dir( path );
+ const TQStringList files = dir.entryList( TQDir::Files );
if ( files.isEmpty() )
// No more files here
return;
// Read the file and remove it
- QFile f( path + "/" + files[0] );
+ TQFile f( path + "/" + files[0] );
if (!f.open(IO_ReadOnly)) {
kdError(5850) << "Can't open file '" << files[0] << "'" << endl;
return;
}
- QTextStream t(&f);
- t.setEncoding( QTextStream::UnicodeUTF8 );
- QString receiver = KPIM::getFirstEmailAddress( t.readLine() );
- QString iCal = t.read();
+ TQTextStream t(&f);
+ t.setEncoding( TQTextStream::UnicodeUTF8 );
+ TQString receiver = KPIM::getFirstEmailAddress( t.readLine() );
+ TQString iCal = t.read();
f.remove();
ScheduleMessage *message = mFormat.parseScheduleMessage( mCalendar, iCal );
if ( !message ) {
- QString errorMessage;
+ TQString errorMessage;
if (mFormat.exception())
errorMessage = i18n( "Error message: %1" ).arg( mFormat.exception()->message() );
kdDebug(5850) << "MailScheduler::retrieveTransactions() Error parsing "
@@ -227,7 +227,7 @@ void KOGroupware::incomingDirChanged( const QString& path )
class KOInvitationFormatterHelper : public InvitationFormatterHelper
{
public:
- virtual QString generateLinkURL( const QString &id ) { return "kmail:groupware_request_" + id; }
+ virtual TQString generateLinkURL( const TQString &id ) { return "kmail:groupware_request_" + id; }
};
/* This function sends mails if necessary, and makes sure the user really
@@ -236,7 +236,7 @@ class KOInvitationFormatterHelper : public InvitationFormatterHelper
* Return true means accept the changes
* Return false means revert the changes
*/
-bool KOGroupware::sendICalMessage( QWidget* parent,
+bool KOGroupware::sendICalMessage( TQWidget* parent,
KCal::Scheduler::Method method,
Incidence* incidence, bool isDeleting,
bool statusChanged )
@@ -267,12 +267,12 @@ bool KOGroupware::sendICalMessage( QWidget* parent,
* mail. */
if ( incidence->attendees().count() > 1
|| incidence->attendees().first()->email() != incidence->organizer().email() ) {
- QString type;
+ TQString type;
if( incidence->type() == "Event") type = i18n("event");
else if( incidence->type() == "Todo" ) type = i18n("task");
else if( incidence->type() == "Journal" ) type = i18n("journal entry");
else type = incidence->type();
- QString txt = i18n( "This %1 includes other people. "
+ TQString txt = i18n( "This %1 includes other people. "
"Should email be sent out to the attendees?" )
.arg( type );
rc = KMessageBox::questionYesNoCancel( parent, txt,
@@ -286,17 +286,17 @@ bool KOGroupware::sendICalMessage( QWidget* parent,
method = Scheduler::Reply;
// Ask if the user wants to tell the organizer about the current status
- QString txt = i18n( "Do you want to send a status update to the "
+ TQString txt = i18n( "Do you want to send a status update to the "
"organizer of this task?");
- rc = KMessageBox::questionYesNo( parent, txt, QString::null, i18n("Send Update"), i18n("Do Not Send") );
+ rc = KMessageBox::questionYesNo( parent, txt, TQString::null, i18n("Send Update"), i18n("Do Not Send") );
} else if( incidence->type() == "Event" ) {
- QString txt;
+ TQString txt;
if ( statusChanged && method == Scheduler::Request ) {
txt = i18n( "Your status as an attendee of this event "
"changed. Do you want to send a status update to the "
"organizer of this event?" );
method = Scheduler::Reply;
- rc = KMessageBox::questionYesNo( parent, txt, QString::null, i18n("Send Update"), i18n("Do Not Send") );
+ rc = KMessageBox::questionYesNo( parent, txt, TQString::null, i18n("Send Update"), i18n("Do Not Send") );
} else {
if( isDeleting )
txt = i18n( "You are not the organizer of this event. "
diff --git a/korganizer/kogroupware.h b/korganizer/kogroupware.h
index 25f62cef4..0af6a3c42 100644
--- a/korganizer/kogroupware.h
+++ b/korganizer/kogroupware.h
@@ -40,7 +40,7 @@
#include <libkcal/calendarresources.h>
#include <libkcal/icalformat.h>
#include <libkcal/scheduler.h>
-#include <qstring.h>
+#include <tqstring.h>
#include <kio/job.h>
@@ -72,7 +72,7 @@ class KOGroupware : public QObject
Returns false if the user cancels the dialog, and true if the
user presses Yes og or No.
*/
- bool sendICalMessage( QWidget* parent, KCal::Scheduler::Method method,
+ bool sendICalMessage( TQWidget* parent, KCal::Scheduler::Method method,
Incidence* incidence, bool isDeleting = false,
bool statusChanged = false );
@@ -87,11 +87,11 @@ class KOGroupware : public QObject
enum EventState { Accepted, ConditionallyAccepted, Declined, Request };
// convert the TNEF attachment to a vCard or iCalendar part
- QString msTNEFToVPart( const QByteArray& tnef );
+ TQString msTNEFToVPart( const TQByteArray& tnef );
private slots:
/** Handle iCals given by KMail. */
- void incomingDirChanged( const QString& path );
+ void incomingDirChanged( const TQString& path );
/** Updates some slot connections when the view incidence changer changes */
void slotViewNewIncidenceChanger( IncidenceChangerBase* changer );
diff --git a/korganizer/kohelper.cpp b/korganizer/kohelper.cpp
index 5c0b4ccb5..827279fe4 100644
--- a/korganizer/kohelper.cpp
+++ b/korganizer/kohelper.cpp
@@ -22,7 +22,7 @@
without including the source code for Qt in the source distribution.
*/
-#include <qcolor.h>
+#include <tqcolor.h>
#include <kdebug.h>
@@ -34,9 +34,9 @@
#include "koprefs.h"
#include "kohelper.h"
-QColor KOHelper::resourceColor( KCal::Calendar*calendar, KCal::Incidence*incidence )
+TQColor KOHelper::resourceColor( KCal::Calendar*calendar, KCal::Incidence*incidence )
{
- QColor resourceColor = QColor(); //Default invalid color
+ TQColor resourceColor = TQColor(); //Default invalid color
//FIXME: dynamic_cast are dirty, Better We implements interface to get the color
// from the calendar
KCal::CalendarResources *calendarResource = dynamic_cast<KCal::CalendarResources*>( calendar );
@@ -45,14 +45,14 @@ QColor KOHelper::resourceColor( KCal::Calendar*calendar, KCal::Incidence*inciden
KCal::ResourceCalendar *resourceCalendar = calendarResource->resource( incidence );
if( resourceCalendar ) {
- QString identifier = resourceCalendar->identifier();
+ TQString identifier = resourceCalendar->identifier();
resourceColor = *KOPrefs::instance()->resourceColor( identifier );
if ( !resourceCalendar->subresources().isEmpty() ) {
identifier = resourceCalendar->subresourceIdentifier( incidence );
if ( identifier.isEmpty() )
identifier = resourceCalendar->identifier();
- QColor subrescolor( *KOPrefs::instance()->resourceColor( identifier ) );
+ TQColor subrescolor( *KOPrefs::instance()->resourceColor( identifier ) );
if ( subrescolor.isValid() )
resourceColor = subrescolor;
}
@@ -63,16 +63,16 @@ QColor KOHelper::resourceColor( KCal::Calendar*calendar, KCal::Incidence*inciden
return resourceColor;
}
-QString KOHelper::resourceLabel(KCal::Calendar * calendar, KCal::Incidence * incidence)
+TQString KOHelper::resourceLabel(KCal::Calendar * calendar, KCal::Incidence * incidence)
{
KCal::CalendarResources *calendarResource = dynamic_cast<KCal::CalendarResources*>( calendar );
if ( !calendarResource || ! incidence )
- return QString();
+ return TQString();
KCal::ResourceCalendar *resourceCalendar = calendarResource->resource( incidence );
if( resourceCalendar ) {
if ( !resourceCalendar->subresources().isEmpty() ) {
- QString subRes = resourceCalendar->subresourceIdentifier( incidence );
+ TQString subRes = resourceCalendar->subresourceIdentifier( incidence );
if ( subRes.isEmpty() )
return resourceCalendar->resourceName();
return resourceCalendar->labelForSubresource( subRes );
@@ -80,5 +80,5 @@ QString KOHelper::resourceLabel(KCal::Calendar * calendar, KCal::Incidence * inc
return resourceCalendar->resourceName();
}
- return QString();
+ return TQString();
}
diff --git a/korganizer/kohelper.h b/korganizer/kohelper.h
index 0f5ec764b..b7f61b796 100644
--- a/korganizer/kohelper.h
+++ b/korganizer/kohelper.h
@@ -41,12 +41,12 @@ class KDE_EXPORT KOHelper
@return The resource color for the incidence. If the incidence belongs
to a subresource, the color for the subresource is returned (if set).
*/
- static QColor resourceColor( KCal::Calendar*calendar, KCal::Incidence*incidence );
+ static TQColor resourceColor( KCal::Calendar*calendar, KCal::Incidence*incidence );
/**
Returns the resource label the given incidence belongs to.
*/
- static QString resourceLabel( KCal::Calendar *calendar, KCal::Incidence *incidence );
+ static TQString resourceLabel( KCal::Calendar *calendar, KCal::Incidence *incidence );
};
diff --git a/korganizer/koidentitymanager.cpp b/korganizer/koidentitymanager.cpp
index eb68b939b..86bac4c9f 100644
--- a/korganizer/koidentitymanager.cpp
+++ b/korganizer/koidentitymanager.cpp
@@ -28,7 +28,7 @@
// This is called to create a default identity in case emailidentities has none
// (i.e. the user never used KMail before)
// We provide the values from KOPrefs, since those are configurable in korganizer.
-void KOrg::IdentityManager::createDefaultIdentity( QString& fullName, QString& emailAddress )
+void KOrg::IdentityManager::createDefaultIdentity( TQString& fullName, TQString& emailAddress )
{
fullName = KOPrefs::instance()->fullName();
emailAddress = KOPrefs::instance()->email();
diff --git a/korganizer/koidentitymanager.h b/korganizer/koidentitymanager.h
index 69067d199..c1a70fc21 100644
--- a/korganizer/koidentitymanager.h
+++ b/korganizer/koidentitymanager.h
@@ -32,11 +32,11 @@ namespace KOrg {
class IdentityManager : public KPIM::IdentityManager
{
public:
- IdentityManager( QObject * parent=0, const char * name=0 )
+ IdentityManager( TQObject * parent=0, const char * name=0 )
: KPIM::IdentityManager( true /*readonly*/, parent, name ) {}
protected:
- virtual void createDefaultIdentity( QString& fullName, QString& emailAddress );
+ virtual void createDefaultIdentity( TQString& fullName, TQString& emailAddress );
};
} // namespace
diff --git a/korganizer/koincidenceeditor.cpp b/korganizer/koincidenceeditor.cpp
index b854ea519..3eb4920f8 100644
--- a/korganizer/koincidenceeditor.cpp
+++ b/korganizer/koincidenceeditor.cpp
@@ -22,14 +22,14 @@
without including the source code for Qt in the source distribution.
*/
-#include <qtooltip.h>
-#include <qframe.h>
-#include <qguardedptr.h>
-#include <qpixmap.h>
-#include <qlayout.h>
-#include <qwidgetstack.h>
-#include <qdatetime.h>
-#include <qwhatsthis.h>
+#include <tqtooltip.h>
+#include <tqframe.h>
+#include <tqguardedptr.h>
+#include <tqpixmap.h>
+#include <tqlayout.h>
+#include <tqwidgetstack.h>
+#include <tqdatetime.h>
+#include <tqwhatsthis.h>
#include <kdebug.h>
#include <klocale.h>
@@ -54,8 +54,8 @@
#include "koincidenceeditor.h"
#include "templatemanagementdialog.h"
-KOIncidenceEditor::KOIncidenceEditor( const QString &caption,
- Calendar *calendar, QWidget *parent )
+KOIncidenceEditor::KOIncidenceEditor( const TQString &caption,
+ Calendar *calendar, TQWidget *parent )
: KDialogBase( Tabbed, caption, Ok | Apply | Cancel | Default, Ok,
parent, 0, false, false ),
mAttendeeEditor( 0 ), mIsCounter( false )
@@ -73,8 +73,8 @@ KOIncidenceEditor::KOIncidenceEditor( const QString &caption,
setButtonText( Default, i18n("&Templates...") );
}
- connect( this, SIGNAL( defaultClicked() ), SLOT( slotManageTemplates() ) );
- connect( this, SIGNAL( finished() ), SLOT( delayedDestruct() ) );
+ connect( this, TQT_SIGNAL( defaultClicked() ), TQT_SLOT( slotManageTemplates() ) );
+ connect( this, TQT_SIGNAL( finished() ), TQT_SLOT( delayedDestruct() ) );
}
KOIncidenceEditor::~KOIncidenceEditor()
@@ -83,12 +83,12 @@ KOIncidenceEditor::~KOIncidenceEditor()
void KOIncidenceEditor::setupAttendeesTab()
{
- QFrame *topFrame = addPage( i18n("Atte&ndees") );
- QWhatsThis::add( topFrame,
+ TQFrame *topFrame = addPage( i18n("Atte&ndees") );
+ TQWhatsThis::add( topFrame,
i18n("The Attendees tab allows you to Add or Remove "
"Attendees to/from this event or to-do.") );
- QBoxLayout *topLayout = new QVBoxLayout( topFrame );
+ TQBoxLayout *topLayout = new TQVBoxLayout( topFrame );
mAttendeeEditor = mDetails = new KOEditorDetails( spacingHint(), topFrame );
topLayout->addWidget( mDetails );
@@ -104,7 +104,7 @@ void KOIncidenceEditor::slotOk()
// "this" can be deleted before processInput() returns (processInput() opens
// a non-modal dialog when Kolab is used). So accept should only be executed
// when "this" is still valid
- QGuardedPtr<QWidget> ptr( this );
+ TQGuardedPtr<TQWidget> ptr( this );
if ( processInput() && ptr ) accept();
}
@@ -137,22 +137,22 @@ void KOIncidenceEditor::slotManageTemplates()
kdDebug(5850) << "KOIncidenceEditor::manageTemplates()" << endl;
TemplateManagementDialog * const d = new TemplateManagementDialog( this, templates() );
- connect( d, SIGNAL( loadTemplate( const QString& ) ),
- this, SLOT( slotLoadTemplate( const QString& ) ) );
- connect( d, SIGNAL( templatesChanged( const QStringList& ) ),
- this, SLOT( slotTemplatesChanged( const QStringList& ) ) );
- connect( d, SIGNAL( saveTemplate( const QString& ) ),
- this, SLOT( slotSaveTemplate( const QString& ) ) );
+ connect( d, TQT_SIGNAL( loadTemplate( const TQString& ) ),
+ this, TQT_SLOT( slotLoadTemplate( const TQString& ) ) );
+ connect( d, TQT_SIGNAL( templatesChanged( const TQStringList& ) ),
+ this, TQT_SLOT( slotTemplatesChanged( const TQStringList& ) ) );
+ connect( d, TQT_SIGNAL( saveTemplate( const TQString& ) ),
+ this, TQT_SLOT( slotSaveTemplate( const TQString& ) ) );
d->exec();
return;
}
void KOIncidenceEditor::saveAsTemplate( Incidence *incidence,
- const QString &templateName )
+ const TQString &templateName )
{
if ( !incidence || templateName.isEmpty() ) return;
- QString fileName = "templates/" + incidence->type();
+ TQString fileName = "templates/" + incidence->type();
fileName.append( "/" + templateName );
fileName = locateLocal( "data", "korganizer/" + fileName );
@@ -162,10 +162,10 @@ void KOIncidenceEditor::saveAsTemplate( Incidence *incidence,
format.save( &cal, fileName );
}
-void KOIncidenceEditor::slotLoadTemplate( const QString& templateName )
+void KOIncidenceEditor::slotLoadTemplate( const TQString& templateName )
{
CalendarLocal cal( KOPrefs::instance()->mTimeZoneId );
- QString fileName = locateLocal( "data", "korganizer/templates/" + type() + "/" +
+ TQString fileName = locateLocal( "data", "korganizer/templates/" + type() + "/" +
templateName );
if ( fileName.isEmpty() ) {
@@ -182,37 +182,37 @@ void KOIncidenceEditor::slotLoadTemplate( const QString& templateName )
loadTemplate( cal );
}
-void KOIncidenceEditor::slotTemplatesChanged( const QStringList& newTemplates )
+void KOIncidenceEditor::slotTemplatesChanged( const TQStringList& newTemplates )
{
templates() = newTemplates;
}
-void KOIncidenceEditor::setupDesignerTabs( const QString &type )
+void KOIncidenceEditor::setupDesignerTabs( const TQString &type )
{
- QStringList activePages = KOPrefs::instance()->activeDesignerFields();
+ TQStringList activePages = KOPrefs::instance()->activeDesignerFields();
- QStringList list = KGlobal::dirs()->findAllResources( "data",
+ TQStringList list = KGlobal::dirs()->findAllResources( "data",
"korganizer/designer/" + type + "/*.ui", true, true );
- for ( QStringList::iterator it = list.begin(); it != list.end(); ++it ) {
- const QString &fn = (*it).mid( (*it).findRev('/') + 1 );
+ for ( TQStringList::iterator it = list.begin(); it != list.end(); ++it ) {
+ const TQString &fn = (*it).mid( (*it).findRev('/') + 1 );
if ( activePages.find( fn ) != activePages.end() ) {
addDesignerTab( *it );
}
}
}
-QWidget *KOIncidenceEditor::addDesignerTab( const QString &uifile )
+TQWidget *KOIncidenceEditor::addDesignerTab( const TQString &uifile )
{
kdDebug(5850) << "Designer tab: " << uifile << endl;
KPIM::DesignerFields *wid = new KPIM::DesignerFields( uifile, 0 );
mDesignerFields.append( wid );
- QFrame *topFrame = addPage( wid->title() );
+ TQFrame *topFrame = addPage( wid->title() );
- QBoxLayout *topLayout = new QVBoxLayout( topFrame );
+ TQBoxLayout *topLayout = new TQVBoxLayout( topFrame );
- wid->reparent( topFrame, 0, QPoint() );
+ wid->reparent( topFrame, 0, TQPoint() );
topLayout->addWidget( wid );
mDesignerFieldForWidget[ topFrame ] = wid;
@@ -227,15 +227,15 @@ class KCalStorage : public KPIM::DesignerFields::Storage
{
}
- QStringList keys()
+ TQStringList keys()
{
- QStringList keys;
+ TQStringList keys;
- QMap<QCString, QString> props = mIncidence->customProperties();
- QMap<QCString, QString>::ConstIterator it;
+ TQMap<TQCString, TQString> props = mIncidence->customProperties();
+ TQMap<TQCString, TQString>::ConstIterator it;
for( it = props.begin(); it != props.end(); ++it ) {
- QString customKey = it.key();
- QStringList parts = QStringList::split( "-", customKey );
+ TQString customKey = it.key();
+ TQStringList parts = TQStringList::split( "-", customKey );
if ( parts.count() != 4 ) continue;
if ( parts[ 2 ] != "KORGANIZER" ) continue;
keys.append( parts[ 3 ] );
@@ -244,12 +244,12 @@ class KCalStorage : public KPIM::DesignerFields::Storage
return keys;
}
- QString read( const QString &key )
+ TQString read( const TQString &key )
{
return mIncidence->customProperty( "KORGANIZER", key.utf8() );
}
- void write( const QString &key, const QString &value )
+ void write( const TQString &key, const TQString &value )
{
mIncidence->setCustomProperty( "KORGANIZER", key.utf8(), value );
}
@@ -282,20 +282,20 @@ void KOIncidenceEditor::writeDesignerFields( Incidence *i )
}
-void KOIncidenceEditor::setupEmbeddedURLPage( const QString &label,
- const QString &url, const QString &mimetype )
+void KOIncidenceEditor::setupEmbeddedURLPage( const TQString &label,
+ const TQString &url, const TQString &mimetype )
{
kdDebug(5850) << "KOIncidenceEditor::setupEmbeddedURLPage()" << endl;
kdDebug(5850) << "label=" << label << ", url=" << url << ", mimetype=" << mimetype << endl;
- QFrame *topFrame = addPage( label );
- QBoxLayout *topLayout = new QVBoxLayout( topFrame );
+ TQFrame *topFrame = addPage( label );
+ TQBoxLayout *topLayout = new TQVBoxLayout( topFrame );
KPIM::EmbeddedURLPage *wid = new KPIM::EmbeddedURLPage( url, mimetype,
topFrame );
topLayout->addWidget( wid );
mEmbeddedURLPages.append( topFrame );
- connect( wid, SIGNAL( openURL( const KURL & ) ) ,
- this, SLOT( openURL( const KURL & ) ) );
+ connect( wid, TQT_SIGNAL( openURL( const KURL & ) ) ,
+ this, TQT_SLOT( openURL( const KURL & ) ) );
// TODO: Call this method only when the tab is actually activated!
wid->loadContents();
}
@@ -312,7 +312,7 @@ void KOIncidenceEditor::createEmbeddedURLPages( Incidence *i )
mEmbeddedURLPages.setAutoDelete( false );
}
if ( !mAttachedDesignerFields.isEmpty() ) {
- for ( QPtrList<QWidget>::Iterator it = mAttachedDesignerFields.begin();
+ for ( TQPtrList<TQWidget>::Iterator it = mAttachedDesignerFields.begin();
it != mAttachedDesignerFields.end(); ++it ) {
if ( mDesignerFieldForWidget.contains( *it ) ) {
mDesignerFields.remove( mDesignerFieldForWidget[ *it ] );
@@ -331,7 +331,7 @@ void KOIncidenceEditor::createEmbeddedURLPages( Incidence *i )
if ( a && a->showInline() && a->isUri() ) {
// TODO: Allow more mime-types, but add security checks!
/* if ( a->mimeType() == "application/x-designer" ) {
- QString tmpFile;
+ TQString tmpFile;
if ( KIO::NetAccess::download( a->uri(), tmpFile, this ) ) {
mAttachedDesignerFields.append( addDesignerTab( tmpFile ) );
KIO::NetAccess::removeTempFile( tmpFile );
@@ -348,22 +348,22 @@ void KOIncidenceEditor::createEmbeddedURLPages( Incidence *i )
void KOIncidenceEditor::openURL( const KURL &url )
{
- QString uri = url.url();
+ TQString uri = url.url();
UriHandler::process( uri );
}
-void KOIncidenceEditor::addAttachments( const QStringList &attachments,
- const QStringList &mimeTypes,
+void KOIncidenceEditor::addAttachments( const TQStringList &attachments,
+ const TQStringList &mimeTypes,
bool inlineAttachments )
{
emit signalAddAttachments( attachments, mimeTypes, inlineAttachments );
}
-void KOIncidenceEditor::addAttendees( const QStringList &attendees )
+void KOIncidenceEditor::addAttendees( const TQStringList &attendees )
{
- QStringList::ConstIterator it;
+ TQStringList::ConstIterator it;
for ( it = attendees.begin(); it != attendees.end(); ++it ) {
- QString name, email;
+ TQString name, email;
KABC::Addressee::parseEmailAddress( *it, name, email );
mAttendeeEditor->insertAttendee( new Attendee( name, email ) );
}
diff --git a/korganizer/koincidenceeditor.h b/korganizer/koincidenceeditor.h
index 6816c7808..3440a35b2 100644
--- a/korganizer/koincidenceeditor.h
+++ b/korganizer/koincidenceeditor.h
@@ -59,8 +59,8 @@ class KOIncidenceEditor : public KDialogBase
/**
Construct new IncidenceEditor.
*/
- KOIncidenceEditor( const QString &caption, Calendar *calendar,
- QWidget *parent );
+ KOIncidenceEditor( const TQString &caption, Calendar *calendar,
+ TQWidget *parent );
virtual ~KOIncidenceEditor();
/** This incidence has been modified externally */
@@ -80,13 +80,13 @@ class KOIncidenceEditor : public KDialogBase
/**
Adds attachments to the editor
*/
- void addAttachments( const QStringList &attachments,
- const QStringList& mimeTypes = QStringList(),
+ void addAttachments( const TQStringList &attachments,
+ const TQStringList& mimeTypes = TQStringList(),
bool inlineAttachment = false );
/**
Adds attendees to the editor
*/
- void addAttendees( const QStringList &attendees );
+ void addAttendees( const TQStringList &attendees );
signals:
@@ -98,8 +98,8 @@ class KOIncidenceEditor : public KDialogBase
void editCanceled( Incidence * );
void deleteIncidenceSignal( Incidence * );
- void signalAddAttachments( const QStringList &attachments,
- const QStringList& mimeTypes = QStringList(),
+ void signalAddAttachments( const TQStringList &attachments,
+ const TQStringList& mimeTypes = TQStringList(),
bool inlineAttachment = false );
@@ -111,27 +111,27 @@ class KOIncidenceEditor : public KDialogBase
virtual void slotManageTemplates();
- virtual void slotSaveTemplate( const QString & ) = 0;
- virtual void slotLoadTemplate( const QString& );
- virtual void slotTemplatesChanged( const QStringList& );
+ virtual void slotSaveTemplate( const TQString & ) = 0;
+ virtual void slotLoadTemplate( const TQString& );
+ virtual void slotTemplatesChanged( const TQStringList& );
protected:
- virtual QString type() { return QString::null; }
- virtual QStringList& templates() const = 0;
+ virtual TQString type() { return TQString::null; }
+ virtual TQStringList& templates() const = 0;
virtual void loadTemplate( /*const*/ CalendarLocal& ) = 0;
void setupAttendeesTab();
- void setupDesignerTabs( const QString &type );
+ void setupDesignerTabs( const TQString &type );
- void saveAsTemplate( Incidence *, const QString &name );
+ void saveAsTemplate( Incidence *, const TQString &name );
void readDesignerFields( Incidence *i );
void writeDesignerFields( Incidence *i );
// Returns the page widget. To remove the tab, just delete that one.
- QWidget *addDesignerTab( const QString &uifile );
+ TQWidget *addDesignerTab( const TQString &uifile );
- void setupEmbeddedURLPage( const QString &label, const QString &url,
- const QString &mimetype );
+ void setupEmbeddedURLPage( const TQString &label, const TQString &url,
+ const TQString &mimetype );
void createEmbeddedURLPages( Incidence *i );
/**
@@ -149,10 +149,10 @@ class KOIncidenceEditor : public KDialogBase
KOAttendeeEditor *mAttendeeEditor;
KOrg::IncidenceChangerBase *mChanger;
- QPtrList<KPIM::DesignerFields> mDesignerFields;
- QMap<QWidget*, KPIM::DesignerFields*> mDesignerFieldForWidget;
- QPtrList<QWidget> mEmbeddedURLPages;
- QPtrList<QWidget> mAttachedDesignerFields;
+ TQPtrList<KPIM::DesignerFields> mDesignerFields;
+ TQMap<TQWidget*, KPIM::DesignerFields*> mDesignerFieldForWidget;
+ TQPtrList<TQWidget> mEmbeddedURLPages;
+ TQPtrList<TQWidget> mAttachedDesignerFields;
bool mIsCounter;
};
diff --git a/korganizer/koincidencetooltip.cpp b/korganizer/koincidencetooltip.cpp
index c7065a28b..8b3f11756 100644
--- a/korganizer/koincidencetooltip.cpp
+++ b/korganizer/koincidencetooltip.cpp
@@ -33,22 +33,22 @@
some improvements by Mikolaj Machowski
*/
-void KOIncidenceToolTip::add ( QWidget * widget, Incidence *incidence,
- QToolTipGroup * group, const QString & longText )
+void KOIncidenceToolTip::add ( TQWidget * widget, Incidence *incidence,
+ TQToolTipGroup * group, const TQString & longText )
{
if ( !widget || !incidence ) return;
- QToolTip::add(widget, IncidenceFormatter::toolTipString( incidence ), group, longText);
+ TQToolTip::add(widget, IncidenceFormatter::toolTipString( incidence ), group, longText);
}
-void KOIncidenceToolTip::add(KOAgendaItem * item, Incidence * incidence, QToolTipGroup * group)
+void KOIncidenceToolTip::add(KOAgendaItem * item, Incidence * incidence, TQToolTipGroup * group)
{
Q_UNUSED( incidence );
Q_UNUSED( group );
- QToolTip::remove( item );
+ TQToolTip::remove( item );
new KOIncidenceToolTip( item );
}
-void KOIncidenceToolTip::maybeTip(const QPoint & pos)
+void KOIncidenceToolTip::maybeTip(const TQPoint & pos)
{
Q_UNUSED( pos );
KOAgendaItem *item = dynamic_cast<KOAgendaItem*>( parentWidget() );
@@ -56,5 +56,5 @@ void KOIncidenceToolTip::maybeTip(const QPoint & pos)
return;
if ( !mText )
mText = IncidenceFormatter::toolTipString( item->incidence() );
- tip( QRect( QPoint( 0, 0 ), item->size() ), mText );
+ tip( TQRect( TQPoint( 0, 0 ), item->size() ), mText );
}
diff --git a/korganizer/koincidencetooltip.h b/korganizer/koincidencetooltip.h
index 5f6e84a81..11b5d39a3 100644
--- a/korganizer/koincidencetooltip.h
+++ b/korganizer/koincidencetooltip.h
@@ -23,7 +23,7 @@
#ifndef KOINCIDENCETOOLTIP_H
#define KOINCIDENCETOOLTIP_H
-#include <qtooltip.h>
+#include <tqtooltip.h>
namespace KCal
{
@@ -39,20 +39,20 @@ class KOAgendaItem;
class KOIncidenceToolTip : public QToolTip
{
public:
- KOIncidenceToolTip(QWidget * widget, QToolTipGroup * group = 0 ):QToolTip (widget, group),mText(0) {}
+ KOIncidenceToolTip(TQWidget * widget, TQToolTipGroup * group = 0 ):TQToolTip (widget, group),mText(0) {}
/* ~KOIncidenceToolTip();*/
public:
- static void add ( QWidget * widget, Incidence *incidence,
- QToolTipGroup * group = 0, const QString & longText = "" );
+ static void add ( TQWidget * widget, Incidence *incidence,
+ TQToolTipGroup * group = 0, const TQString & longText = "" );
static void add( KOAgendaItem *item, Incidence *incidence = 0,
- QToolTipGroup *group = 0 );
+ TQToolTipGroup *group = 0 );
- /* reimplmented from QToolTip */
- void maybeTip( const QPoint &pos );
+ /* reimplmented from TQToolTip */
+ void maybeTip( const TQPoint &pos );
private:
- QString mText;
+ TQString mText;
};
#endif
diff --git a/korganizer/kojournaleditor.cpp b/korganizer/kojournaleditor.cpp
index 1d2d75410..a50ba1fe2 100644
--- a/korganizer/kojournaleditor.cpp
+++ b/korganizer/kojournaleditor.cpp
@@ -39,11 +39,11 @@
#include <klocale.h>
#include <kdebug.h>
-#include <qlayout.h>
+#include <tqlayout.h>
using namespace KCal;
-KOJournalEditor::KOJournalEditor( Calendar *calendar, QWidget *parent ) :
+KOJournalEditor::KOJournalEditor( Calendar *calendar, TQWidget *parent ) :
KOIncidenceEditor( i18n("Edit Journal Entry"), calendar, parent )
{
mJournal = 0;
@@ -71,9 +71,9 @@ void KOJournalEditor::setupGeneral()
mGeneral = new KOEditorGeneralJournal(this);
if (KOPrefs::instance()->mCompactDialogs) {
- QFrame *topFrame = addPage(i18n("General"));
+ TQFrame *topFrame = addPage(i18n("General"));
- QBoxLayout *topLayout = new QVBoxLayout( topFrame );
+ TQBoxLayout *topLayout = new TQVBoxLayout( topFrame );
topLayout->setMargin( marginHint() );
topLayout->setSpacing( spacingHint() );
@@ -81,9 +81,9 @@ void KOJournalEditor::setupGeneral()
mGeneral->initDate( topFrame, topLayout );
mGeneral->initDescription( topFrame, topLayout );
} else {
- QFrame *topFrame = addPage(i18n("&General"));
+ TQFrame *topFrame = addPage(i18n("&General"));
- QBoxLayout *topLayout = new QVBoxLayout(topFrame);
+ TQBoxLayout *topLayout = new TQVBoxLayout(topFrame);
topLayout->setSpacing(spacingHint());
mGeneral->initTitle( topFrame, topLayout );
@@ -114,7 +114,7 @@ void KOJournalEditor::newJournal()
loadDefaults();
}
-void KOJournalEditor::setTexts( const QString &summary, const QString &description )
+void KOJournalEditor::setTexts( const TQString &summary, const TQString &description )
{
if ( description.isEmpty() && summary.contains("\n") ) {
mGeneral->setDescription( summary );
@@ -130,7 +130,7 @@ void KOJournalEditor::setTexts( const QString &summary, const QString &descripti
void KOJournalEditor::loadDefaults()
{
- setDate( QDate::currentDate() );
+ setDate( TQDate::currentDate() );
}
bool KOJournalEditor::processInput()
@@ -170,7 +170,7 @@ void KOJournalEditor::deleteJournal()
reject();
}
-void KOJournalEditor::setDate( const QDate &date )
+void KOJournalEditor::setDate( const TQDate &date )
{
mGeneral->setDefaults( date );
mDetails->setDefaults();
@@ -219,14 +219,14 @@ void KOJournalEditor::loadTemplate( /*const*/ CalendarLocal& cal)
}
}
-void KOJournalEditor::slotSaveTemplate( const QString &templateName )
+void KOJournalEditor::slotSaveTemplate( const TQString &templateName )
{
Journal *journal = new Journal;
writeJournal( journal );
saveAsTemplate( journal, templateName );
}
-QStringList& KOJournalEditor::templates() const
+TQStringList& KOJournalEditor::templates() const
{
return KOPrefs::instance()->mJournalTemplates;
}
diff --git a/korganizer/kojournaleditor.h b/korganizer/kojournaleditor.h
index a6dc501d6..7d102769e 100644
--- a/korganizer/kojournaleditor.h
+++ b/korganizer/kojournaleditor.h
@@ -28,7 +28,7 @@
#include "koincidenceeditor.h"
-#include <qdatetime.h>
+#include <tqdatetime.h>
class QDateTime;
namespace KCal {
@@ -50,7 +50,7 @@ class KOJournalEditor : public KOIncidenceEditor
/**
Constructs a new Journal editor.
*/
- KOJournalEditor( Calendar *calendar, QWidget *parent );
+ KOJournalEditor( Calendar *calendar, TQWidget *parent );
virtual ~KOJournalEditor();
void init();
@@ -67,12 +67,12 @@ class KOJournalEditor : public KOIncidenceEditor
summary contains multiple lines, the summary will be used as description
and only the first line of summary will be used as the summary.
*/
- void setTexts( const QString &summary, const QString &description = QString::null );
+ void setTexts( const TQString &summary, const TQString &description = TQString::null );
/** Edit an existing Journal. */
void editIncidence(Incidence *, Calendar *);
/** Set widgets to default values */
- void setDate( const QDate &date );
+ void setDate( const TQDate &date );
/** Read event object and setup widgets accordingly */
void readJournal( Journal * );
/** Write event settings to event object */
@@ -92,15 +92,15 @@ class KOJournalEditor : public KOIncidenceEditor
void loadDefaults();
void deleteJournal();
- void slotSaveTemplate( const QString & );
+ void slotSaveTemplate( const TQString & );
protected:
- QString type() { return "Journal"; }
+ TQString type() { return "Journal"; }
void setupGeneral();
// int msgItemDelete();
void loadTemplate( /*const*/ CalendarLocal& );
- QStringList& templates() const;
+ TQStringList& templates() const;
private:
Journal *mJournal;
KOEditorGeneralJournal *mGeneral;
diff --git a/korganizer/kojournalview.cpp b/korganizer/kojournalview.cpp
index dd064169b..e8de3daed 100644
--- a/korganizer/kojournalview.cpp
+++ b/korganizer/kojournalview.cpp
@@ -25,11 +25,11 @@
//
// View of Journal entries
-#include <qlayout.h>
-#include <qpopupmenu.h>
-#include <qvbox.h>
-#include <qlabel.h>
-#include <qscrollview.h>
+#include <tqlayout.h>
+#include <tqpopupmenu.h>
+#include <tqvbox.h>
+#include <tqlabel.h>
+#include <tqscrollview.h>
#include <klocale.h>
#include <kdebug.h>
@@ -42,17 +42,17 @@
#include "koglobals.h"
using namespace KOrg;
-KOJournalView::KOJournalView(Calendar *calendar, QWidget *parent,
+KOJournalView::KOJournalView(Calendar *calendar, TQWidget *parent,
const char *name)
: KOrg::BaseView(calendar, parent, name)
{
- QVBoxLayout*topLayout = new QVBoxLayout( this );
+ TQVBoxLayout*topLayout = new TQVBoxLayout( this );
topLayout->setAutoAdd(true);
- mSV = new QScrollView( this, "JournalScrollView" );
- mVBox = new QVBox( mSV->viewport() );
- mSV->setVScrollBarMode( QScrollView::Auto );
- mSV->setHScrollBarMode( QScrollView::AlwaysOff );
- mSV->setResizePolicy( QScrollView::AutoOneFit );
+ mSV = new TQScrollView( this, "JournalScrollView" );
+ mVBox = new TQVBox( mSV->viewport() );
+ mSV->setVScrollBarMode( TQScrollView::Auto );
+ mSV->setHScrollBarMode( TQScrollView::AlwaysOff );
+ mSV->setResizePolicy( TQScrollView::AutoOneFit );
mSV->addChild( mVBox );
// mVBox->setSpacing( 10 );
}
@@ -61,7 +61,7 @@ KOJournalView::~KOJournalView()
{
}
-void KOJournalView::appendJournal( Journal*journal, const QDate &dt)
+void KOJournalView::appendJournal( Journal*journal, const TQDate &dt)
{
JournalDateEntry *entry = 0;
if ( mEntries.contains( dt ) ) {
@@ -71,20 +71,20 @@ void KOJournalView::appendJournal( Journal*journal, const QDate &dt)
entry->setDate( dt );
entry->setIncidenceChanger( mChanger );
entry->show();
- connect( this, SIGNAL(flushEntries()), entry, SIGNAL(flushEntries()) );
- connect( this, SIGNAL(setIncidenceChangerSignal( IncidenceChangerBase * ) ),
- entry, SLOT(setIncidenceChanger( IncidenceChangerBase * ) ) );
- connect( this, SIGNAL( journalEdited( Journal* ) ),
- entry, SLOT( journalEdited( Journal* ) ) );
- connect( this, SIGNAL( journalDeleted( Journal* ) ),
- entry, SLOT( journalDeleted( Journal* ) ) );
-
- connect( entry, SIGNAL( editIncidence( Incidence* ) ),
- this, SIGNAL( editIncidenceSignal( Incidence* ) ) );
- connect( entry, SIGNAL( deleteIncidence( Incidence* ) ),
- this, SIGNAL( deleteIncidenceSignal( Incidence* ) ) );
- connect( entry, SIGNAL( newJournal( const QDate & ) ),
- this, SIGNAL( newJournalSignal( const QDate & ) ) );
+ connect( this, TQT_SIGNAL(flushEntries()), entry, TQT_SIGNAL(flushEntries()) );
+ connect( this, TQT_SIGNAL(setIncidenceChangerSignal( IncidenceChangerBase * ) ),
+ entry, TQT_SLOT(setIncidenceChanger( IncidenceChangerBase * ) ) );
+ connect( this, TQT_SIGNAL( journalEdited( Journal* ) ),
+ entry, TQT_SLOT( journalEdited( Journal* ) ) );
+ connect( this, TQT_SIGNAL( journalDeleted( Journal* ) ),
+ entry, TQT_SLOT( journalDeleted( Journal* ) ) );
+
+ connect( entry, TQT_SIGNAL( editIncidence( Incidence* ) ),
+ this, TQT_SIGNAL( editIncidenceSignal( Incidence* ) ) );
+ connect( entry, TQT_SIGNAL( deleteIncidence( Incidence* ) ),
+ this, TQT_SIGNAL( deleteIncidenceSignal( Incidence* ) ) );
+ connect( entry, TQT_SIGNAL( newJournal( const TQDate & ) ),
+ this, TQT_SIGNAL( newJournalSignal( const TQDate & ) ) );
mEntries.insert( dt, entry );
}
@@ -109,7 +109,7 @@ Incidence::List KOJournalView::selectedIncidences()
void KOJournalView::clearEntries()
{
// kdDebug(5850)<<"KOJournalView::clearEntries()"<<endl;
- QMap<QDate, JournalDateEntry*>::Iterator it;
+ TQMap<TQDate, JournalDateEntry*>::Iterator it;
for ( it = mEntries.begin(); it != mEntries.end(); ++it ) {
delete (it.data());
}
@@ -117,7 +117,7 @@ void KOJournalView::clearEntries()
}
void KOJournalView::updateView()
{
- QMap<QDate, JournalDateEntry*>::Iterator it;
+ TQMap<TQDate, JournalDateEntry*>::Iterator it;
for ( it = mEntries.begin(); it != mEntries.end(); ++it ) {
it.data()->clear();
Journal::List journals = calendar()->journals( it.key() );
@@ -134,7 +134,7 @@ void KOJournalView::flushView()
emit flushEntries();
}
-void KOJournalView::showDates(const QDate &start, const QDate &end)
+void KOJournalView::showDates(const TQDate &start, const TQDate &end)
{
// kdDebug(5850) << "KOJournalView::showDates(): "<<start.toString().latin1()<<" - "<<end.toString().latin1() << endl;
clearEntries();
@@ -142,8 +142,8 @@ void KOJournalView::showDates(const QDate &start, const QDate &end)
Journal::List::ConstIterator it;
Journal::List jnls;
- QDate d=start;
- for ( QDate d=start; d<=end; d=d.addDays(1) ) {
+ TQDate d=start;
+ for ( TQDate d=start; d<=end; d=d.addDays(1) ) {
jnls = calendar()->journals( d );
for ( it = jnls.begin(); it != jnls.end(); ++it ) {
appendJournal( *it, d );
@@ -202,7 +202,7 @@ void KOJournalView::setIncidenceChanger( IncidenceChangerBase *changer )
void KOJournalView::newJournal()
{
- emit newJournalSignal( QDate::currentDate() );
+ emit newJournalSignal( TQDate::currentDate() );
}
#include "kojournalview.moc"
diff --git a/korganizer/kojournalview.h b/korganizer/kojournalview.h
index 8c147d232..3e48dd710 100644
--- a/korganizer/kojournalview.h
+++ b/korganizer/kojournalview.h
@@ -42,24 +42,24 @@ class KOJournalView : public KOrg::BaseView
{
Q_OBJECT
public:
- KOJournalView( Calendar *calendar, QWidget *parent = 0,
+ KOJournalView( Calendar *calendar, TQWidget *parent = 0,
const char *name = 0);
~KOJournalView();
virtual int currentDateCount();
virtual Incidence::List selectedIncidences();
DateList selectedDates() { return DateList(); }
- void appendJournal( Journal*journal, const QDate &dt);
+ void appendJournal( Journal*journal, const TQDate &dt);
CalPrinterBase::PrintType printType();
public slots:
// Don't update the view when midnight passed, otherwise we'll have data loss (bug 79145)
- virtual void dayPassed( const QDate & ) {}
+ virtual void dayPassed( const TQDate & ) {}
void updateView();
void flushView();
- void showDates( const QDate &start, const QDate &end );
+ void showDates( const TQDate &start, const TQDate &end );
void showIncidences( const Incidence::List &incidenceList );
void changeIncidenceDisplay( Incidence *, int );
@@ -75,9 +75,9 @@ class KOJournalView : public KOrg::BaseView
void clearEntries();
private:
- QScrollView *mSV;
- QVBox *mVBox;
- QMap<QDate, JournalDateEntry*> mEntries;
+ TQScrollView *mSV;
+ TQVBox *mVBox;
+ TQMap<TQDate, JournalDateEntry*> mEntries;
// DateList mSelectedDates; // List of dates to be displayed
};
diff --git a/korganizer/kolistview.cpp b/korganizer/kolistview.cpp
index 722a26460..7ca342e87 100644
--- a/korganizer/kolistview.cpp
+++ b/korganizer/kolistview.cpp
@@ -24,10 +24,10 @@
without including the source code for Qt in the source distribution.
*/
-#include <qlistview.h>
-#include <qlayout.h>
-#include <qpopupmenu.h>
-#include <qcursor.h>
+#include <tqlistview.h>
+#include <tqlayout.h>
+#include <tqpopupmenu.h>
+#include <tqcursor.h>
#include <klocale.h>
#include <kdebug.h>
@@ -46,24 +46,24 @@
#include "kolistview.moc"
-KOListViewToolTip::KOListViewToolTip( QWidget* parent,
+KOListViewToolTip::KOListViewToolTip( TQWidget* parent,
KListView* lv )
- :QToolTip(parent)
+ :TQToolTip(parent)
{
eventlist=lv;
}
-void KOListViewToolTip::maybeTip( const QPoint & pos)
+void KOListViewToolTip::maybeTip( const TQPoint & pos)
{
- QRect r;
- QListViewItem *it = eventlist->itemAt(pos);
+ TQRect r;
+ TQListViewItem *it = eventlist->itemAt(pos);
KOListViewItem *i = static_cast<KOListViewItem*>(it);
if( i && KOPrefs::instance()->mEnableToolTips ) {
/* Calculate the rectangle. */
r=eventlist->itemRect( it );
/* Show the tip */
- QString tipText( IncidenceFormatter::toolTipString( i->data() ) );
+ TQString tipText( IncidenceFormatter::toolTipString( i->data() ) );
if ( !tipText.isEmpty() ) {
tip(r, tipText);
}
@@ -93,7 +93,7 @@ bool KOListView::ListItemVisitor::visit( Event *e )
{
mItem->setText(0,e->summary());
if ( e->isAlarmEnabled() ) {
- static const QPixmap alarmPxmp = KOGlobals::self()->smallIcon( "bell" );
+ static const TQPixmap alarmPxmp = KOGlobals::self()->smallIcon( "bell" );
mItem->setPixmap(1,alarmPxmp);
mItem->setSortKey(1,"1");
}
@@ -101,14 +101,14 @@ bool KOListView::ListItemVisitor::visit( Event *e )
mItem->setSortKey(1,"0");
if ( e->doesRecur() ) {
- static const QPixmap recurPxmp = KOGlobals::self()->smallIcon( "recur" );
+ static const TQPixmap recurPxmp = KOGlobals::self()->smallIcon( "recur" );
mItem->setPixmap(2,recurPxmp);
mItem->setSortKey(2,"1");
}
else
mItem->setSortKey(2,"0");
- static const QPixmap eventPxmp = KOGlobals::self()->smallIcon( "appointment" );
+ static const TQPixmap eventPxmp = KOGlobals::self()->smallIcon( "appointment" );
mItem->setPixmap(0, eventPxmp);
mItem->setText( 3,e->dtStartDateStr());
@@ -130,12 +130,12 @@ bool KOListView::ListItemVisitor::visit( Event *e )
bool KOListView::ListItemVisitor::visit(Todo *t)
{
- static const QPixmap todoPxmp = KOGlobals::self()->smallIcon( "todo" );
- static const QPixmap todoDonePxmp = KOGlobals::self()->smallIcon( "checkedbox" );
+ static const TQPixmap todoPxmp = KOGlobals::self()->smallIcon( "todo" );
+ static const TQPixmap todoDonePxmp = KOGlobals::self()->smallIcon( "checkedbox" );
mItem->setPixmap(0, t->isCompleted() ? todoDonePxmp : todoPxmp );
mItem->setText(0,t->summary());
if ( t->isAlarmEnabled() ) {
- static const QPixmap alarmPxmp = KOGlobals::self()->smallIcon( "bell" );
+ static const TQPixmap alarmPxmp = KOGlobals::self()->smallIcon( "bell" );
mItem->setPixmap(1,alarmPxmp);
mItem->setSortKey(1, "1");
}
@@ -143,7 +143,7 @@ bool KOListView::ListItemVisitor::visit(Todo *t)
mItem->setSortKey(1, "0");
if ( t->doesRecur() ) {
- static const QPixmap recurPxmp = KOGlobals::self()->smallIcon( "recur" );
+ static const TQPixmap recurPxmp = KOGlobals::self()->smallIcon( "recur" );
mItem->setPixmap(2,recurPxmp);
mItem->setSortKey(2, "1");
}
@@ -185,7 +185,7 @@ bool KOListView::ListItemVisitor::visit(Todo *t)
bool KOListView::ListItemVisitor::visit(Journal *t)
{
- static const QPixmap jrnalPxmp = KOGlobals::self()->smallIcon( "journal" );
+ static const TQPixmap jrnalPxmp = KOGlobals::self()->smallIcon( "journal" );
mItem->setPixmap(0,jrnalPxmp);
// Just use the first line
mItem->setText( 0, t->description().section( "\n", 0, 0 ) );
@@ -195,7 +195,7 @@ bool KOListView::ListItemVisitor::visit(Journal *t)
return true;
}
-KOListView::KOListView( Calendar *calendar, QWidget *parent,
+KOListView::KOListView( Calendar *calendar, TQWidget *parent,
const char *name)
: KOEventView(calendar, parent, name)
{
@@ -215,35 +215,35 @@ KOListView::KOListView( Calendar *calendar, QWidget *parent,
mListView->setColumnAlignment(6,AlignHCenter);
mListView->addColumn(i18n("Categories"));
- QBoxLayout *layoutTop = new QVBoxLayout(this);
+ TQBoxLayout *layoutTop = new TQVBoxLayout(this);
layoutTop->addWidget(mListView);
mPopupMenu = eventPopup();
/*
mPopupMenu->insertSeparator();
mPopupMenu->insertItem(i18n("Show Dates"), this,
- SLOT(showDates()));
+ TQT_SLOT(showDates()));
mPopupMenu->insertItem(i18n("Hide Dates"), this,
- SLOT(hideDates()));
+ TQT_SLOT(hideDates()));
*/
- QObject::connect( mListView, SIGNAL( doubleClicked( QListViewItem * ) ),
- SLOT( defaultItemAction( QListViewItem * ) ) );
- QObject::connect( mListView, SIGNAL( returnPressed( QListViewItem * ) ),
- SLOT( defaultItemAction( QListViewItem * ) ) );
- QObject::connect( mListView, SIGNAL( rightButtonClicked ( QListViewItem *,
- const QPoint &,
+ TQObject::connect( mListView, TQT_SIGNAL( doubleClicked( TQListViewItem * ) ),
+ TQT_SLOT( defaultItemAction( TQListViewItem * ) ) );
+ TQObject::connect( mListView, TQT_SIGNAL( returnPressed( TQListViewItem * ) ),
+ TQT_SLOT( defaultItemAction( TQListViewItem * ) ) );
+ TQObject::connect( mListView, TQT_SIGNAL( rightButtonClicked ( TQListViewItem *,
+ const TQPoint &,
int ) ),
- SLOT( popupMenu( QListViewItem *, const QPoint &, int ) ) );
- QObject::connect( mListView, SIGNAL( selectionChanged() ),
- SLOT( processSelectionChange() ) );
+ TQT_SLOT( popupMenu( TQListViewItem *, const TQPoint &, int ) ) );
+ TQObject::connect( mListView, TQT_SIGNAL( selectionChanged() ),
+ TQT_SLOT( processSelectionChange() ) );
// setMinimumSize(100,100);
mListView->restoreLayout(KOGlobals::self()->config(),"KOListView Layout");
new KOListViewToolTip( mListView->viewport(), mListView );
- mSelectedDates.append( QDate::currentDate() );
+ mSelectedDates.append( TQDate::currentDate() );
}
KOListView::~KOListView()
@@ -265,7 +265,7 @@ Incidence::List KOListView::selectedIncidences()
{
Incidence::List eventList;
- QListViewItem *item = mListView->selectedItem();
+ TQListViewItem *item = mListView->selectedItem();
if (item) eventList.append(((KOListViewItem *)item)->data());
return eventList;
@@ -310,11 +310,11 @@ void KOListView::updateView()
kdDebug(5850) << "KOListView::updateView() does nothing" << endl;
}
-void KOListView::showDates(const QDate &start, const QDate &end)
+void KOListView::showDates(const TQDate &start, const TQDate &end)
{
clear();
- QDate date = start;
+ TQDate date = start;
while( date <= end ) {
addIncidences( calendar()->incidences(date) );
mSelectedDates.append( date );
@@ -357,10 +357,10 @@ void KOListView::showIncidences( const Incidence::List &incidenceList )
void KOListView::changeIncidenceDisplay(Incidence *incidence, int action)
{
KOListViewItem *item;
- QDate f = mSelectedDates.first();
- QDate l = mSelectedDates.last();
+ TQDate f = mSelectedDates.first();
+ TQDate l = mSelectedDates.last();
- QDate date;
+ TQDate date;
if ( incidence->type() == "Todo" )
date = static_cast<Todo *>(incidence)->dtDue().date();
else
@@ -404,20 +404,20 @@ KOListViewItem *KOListView::getItemForIncidence(Incidence *incidence)
return 0;
}
-void KOListView::defaultItemAction(QListViewItem *i)
+void KOListView::defaultItemAction(TQListViewItem *i)
{
KOListViewItem *item = static_cast<KOListViewItem *>( i );
if ( item ) defaultAction( item->data() );
}
-void KOListView::popupMenu(QListViewItem *item,const QPoint &,int)
+void KOListView::popupMenu(TQListViewItem *item,const TQPoint &,int)
{
mActiveItem = (KOListViewItem *)item;
if (mActiveItem) {
Incidence *incidence = mActiveItem->data();
// FIXME: For recurring incidences we don't know the date of this
// occurrence, there's no reference to it at all!
- mPopupMenu->showIncidencePopup( incidence, QDate() );
+ mPopupMenu->showIncidencePopup( incidence, TQDate() );
}
else {
showNewEventPopup();
diff --git a/korganizer/kolistview.h b/korganizer/kolistview.h
index d2586ea4a..6da6988a8 100644
--- a/korganizer/kolistview.h
+++ b/korganizer/kolistview.h
@@ -26,8 +26,8 @@
#ifndef _KOLISTVIEW_H
#define _KOLISTVIEW_H
-#include <qdict.h>
-#include <qtooltip.h>
+#include <tqdict.h>
+#include <tqtooltip.h>
#include <libkcal/incidence.h>
@@ -43,10 +43,10 @@ class KOListView;
class KOListViewToolTip : public QToolTip
{
public:
- KOListViewToolTip (QWidget* parent, KListView* lv );
+ KOListViewToolTip (TQWidget* parent, KListView* lv );
protected:
- void maybeTip( const QPoint & pos);
+ void maybeTip( const TQPoint & pos);
private:
KListView* eventlist;
@@ -67,7 +67,7 @@ class KOListView : public KOEventView
{
Q_OBJECT
public:
- KOListView(Calendar *calendar, QWidget *parent = 0,
+ KOListView(Calendar *calendar, TQWidget *parent = 0,
const char *name = 0);
~KOListView();
@@ -85,7 +85,7 @@ class KOListView : public KOEventView
public slots:
virtual void updateView();
- virtual void showDates( const QDate &start, const QDate &end );
+ virtual void showDates( const TQDate &start, const TQDate &end );
virtual void showIncidences( const Incidence::List &incidenceList );
void clearSelection();
@@ -95,8 +95,8 @@ class KOListView : public KOEventView
void changeIncidenceDisplay(Incidence *, int);
- void defaultItemAction(QListViewItem *item);
- void popupMenu(QListViewItem *item,const QPoint &,int);
+ void defaultItemAction(TQListViewItem *item);
+ void popupMenu(TQListViewItem *item,const TQPoint &,int);
protected slots:
void processSelectionChange();
@@ -111,7 +111,7 @@ class KOListView : public KOEventView
KListView *mListView;
KOEventPopupMenu *mPopupMenu;
KOListViewItem *mActiveItem;
- QDict<Incidence> mUidDict;
+ TQDict<Incidence> mUidDict;
DateList mSelectedDates;
};
diff --git a/korganizer/komailclient.cpp b/korganizer/komailclient.cpp
index c9e021979..946331fde 100644
--- a/korganizer/komailclient.cpp
+++ b/korganizer/komailclient.cpp
@@ -51,16 +51,16 @@ KOMailClient::~KOMailClient()
{
}
-bool KOMailClient::mailAttendees(IncidenceBase *incidence,const QString &attachment)
+bool KOMailClient::mailAttendees(IncidenceBase *incidence,const TQString &attachment)
{
Attendee::List attendees = incidence->attendees();
if (attendees.count() == 0) return false;
- const QString from = incidence->organizer().fullName();
- const QString organizerEmail = incidence->organizer().email();
- QStringList toList;
+ const TQString from = incidence->organizer().fullName();
+ const TQString organizerEmail = incidence->organizer().email();
+ TQStringList toList;
for(uint i=0; i<attendees.count();++i) {
- const QString email = (*attendees.at(i))->email();
+ const TQString email = (*attendees.at(i))->email();
// In case we (as one of our identities) are the organizer we are sending this
// mail. We could also have added ourselves as an attendee, in which case we
// don't want to send ourselves a notification mail.
@@ -70,9 +70,9 @@ bool KOMailClient::mailAttendees(IncidenceBase *incidence,const QString &attachm
if( toList.count() == 0 )
// Not really to be called a groupware meeting, eh
return false;
- QString to = toList.join( ", " );
+ TQString to = toList.join( ", " );
- QString subject;
+ TQString subject;
if(incidence->type()!="FreeBusy") {
Incidence *inc = static_cast<Incidence *>(incidence);
subject = inc->summary();
@@ -80,20 +80,20 @@ bool KOMailClient::mailAttendees(IncidenceBase *incidence,const QString &attachm
subject = "Free Busy Object";
}
- QString body = IncidenceFormatter::mailBodyString(incidence);
+ TQString body = IncidenceFormatter::mailBodyString(incidence);
bool bcc = KOPrefs::instance()->mBcc;
return send(from,to,subject,body,bcc,attachment);
}
-bool KOMailClient::mailOrganizer(IncidenceBase *incidence,const QString &attachment, const QString &sub)
+bool KOMailClient::mailOrganizer(IncidenceBase *incidence,const TQString &attachment, const TQString &sub)
{
- QString to = incidence->organizer().fullName();
+ TQString to = incidence->organizer().fullName();
- QString from = KOPrefs::instance()->email();
+ TQString from = KOPrefs::instance()->email();
- QString subject = sub;
+ TQString subject = sub;
if(incidence->type()!="FreeBusy") {
Incidence *inc = static_cast<Incidence *>(incidence);
if ( subject.isEmpty() )
@@ -102,33 +102,33 @@ bool KOMailClient::mailOrganizer(IncidenceBase *incidence,const QString &attachm
subject = "Free Busy Message";
}
- QString body = IncidenceFormatter::mailBodyString(incidence);
+ TQString body = IncidenceFormatter::mailBodyString(incidence);
bool bcc = KOPrefs::instance()->mBcc;
return send(from,to,subject,body,bcc,attachment);
}
-bool KOMailClient::mailTo(IncidenceBase *incidence,const QString &recipients,
- const QString &attachment)
+bool KOMailClient::mailTo(IncidenceBase *incidence,const TQString &recipients,
+ const TQString &attachment)
{
- QString from = KOPrefs::instance()->email();
- QString subject;
+ TQString from = KOPrefs::instance()->email();
+ TQString subject;
if(incidence->type()!="FreeBusy") {
Incidence *inc = static_cast<Incidence *>(incidence);
subject = inc->summary();
} else {
subject = "Free Busy Message";
}
- QString body = IncidenceFormatter::mailBodyString(incidence);
+ TQString body = IncidenceFormatter::mailBodyString(incidence);
bool bcc = KOPrefs::instance()->mBcc;
kdDebug () << "KOMailClient::mailTo " << recipients << endl;
return send(from,recipients,subject,body,bcc,attachment);
}
-bool KOMailClient::send(const QString &from,const QString &to,
- const QString &subject,const QString &body,bool bcc,
- const QString &attachment)
+bool KOMailClient::send(const TQString &from,const TQString &to,
+ const TQString &subject,const TQString &body,bool bcc,
+ const TQString &attachment)
{
kdDebug(5850) << "KOMailClient::sendMail():\nFrom: " << from << "\nTo: " << to
<< "\nSubject: " << subject << "\nBody: \n" << body
@@ -137,18 +137,18 @@ bool KOMailClient::send(const QString &from,const QString &to,
if (KOPrefs::instance()->mMailClient == KOPrefs::MailClientSendmail) {
bool needHeaders = true;
- QString command = KStandardDirs::findExe(QString::fromLatin1("sendmail"),
- QString::fromLatin1("/sbin:/usr/sbin:/usr/lib"));
- if (!command.isNull()) command += QString::fromLatin1(" -oi -t");
+ TQString command = KStandardDirs::findExe(TQString::fromLatin1("sendmail"),
+ TQString::fromLatin1("/sbin:/usr/sbin:/usr/lib"));
+ if (!command.isNull()) command += TQString::fromLatin1(" -oi -t");
else {
- command = KStandardDirs::findExe(QString::fromLatin1("mail"));
+ command = KStandardDirs::findExe(TQString::fromLatin1("mail"));
if (command.isNull()) return false; // give up
- command.append(QString::fromLatin1(" -s "));
+ command.append(TQString::fromLatin1(" -s "));
command.append(KProcess::quote(subject));
if (bcc) {
- command.append(QString::fromLatin1(" -b "));
+ command.append(TQString::fromLatin1(" -b "));
command.append(KProcess::quote(from));
}
@@ -165,14 +165,14 @@ bool KOMailClient::send(const QString &from,const QString &to,
return false;
}
- QString textComplete;
+ TQString textComplete;
if (needHeaders)
{
- textComplete += QString::fromLatin1("From: ") + from + '\n';
- textComplete += QString::fromLatin1("To: ") + to + '\n';
- if (bcc) textComplete += QString::fromLatin1("Bcc: ") + from + '\n';
- textComplete += QString::fromLatin1("Subject: ") + subject + '\n';
- textComplete += QString::fromLatin1("X-Mailer: KOrganizer") + korgVersion + '\n';
+ textComplete += TQString::fromLatin1("From: ") + from + '\n';
+ textComplete += TQString::fromLatin1("To: ") + to + '\n';
+ if (bcc) textComplete += TQString::fromLatin1("Bcc: ") + from + '\n';
+ textComplete += TQString::fromLatin1("Subject: ") + subject + '\n';
+ textComplete += TQString::fromLatin1("X-Mailer: KOrganizer") + korgVersion + '\n';
}
textComplete += '\n'; // end of headers
textComplete += body;
@@ -193,7 +193,7 @@ bool KOMailClient::send(const QString &from,const QString &to,
if (attachment.isEmpty()) {
if (!kMailOpenComposer(to,"",bcc ? from : "",subject,body,0,KURL())) return false;
} else {
- QString meth;
+ TQString meth;
int idx = attachment.find("METHOD");
if (idx>=0) {
idx = attachment.find(':',idx)+1;
@@ -211,8 +211,8 @@ bool KOMailClient::send(const QString &from,const QString &to,
return true;
}
-int KOMailClient::kMailOpenComposer(const QString& arg0,const QString& arg1,
- const QString& arg2,const QString& arg3,const QString& arg4,int arg5,
+int KOMailClient::kMailOpenComposer(const TQString& arg0,const TQString& arg1,
+ const TQString& arg2,const TQString& arg3,const TQString& arg4,int arg5,
const KURL& arg6)
{
//kdDebug(5850) << "KOMailClient::kMailOpenComposer( "
@@ -220,9 +220,9 @@ int KOMailClient::kMailOpenComposer(const QString& arg0,const QString& arg1,
// << arg4 << " , " << arg5 << " , " << arg6 << " )" << endl;
int result = 0;
- QByteArray data, replyData;
- QCString replyType;
- QDataStream arg( data, IO_WriteOnly );
+ TQByteArray data, replyData;
+ TQCString replyType;
+ TQDataStream arg( data, IO_WriteOnly );
arg << arg0;
arg << arg1;
arg << arg2;
@@ -233,9 +233,9 @@ int KOMailClient::kMailOpenComposer(const QString& arg0,const QString& arg1,
#if KDE_IS_VERSION( 3, 2, 90 )
kapp->updateRemoteUserTimestamp( "kmail" );
#endif
- if (kapp->dcopClient()->call("kmail","KMailIface","openComposer(QString,QString,QString,QString,QString,int,KURL)", data, replyType, replyData ) ) {
+ if (kapp->dcopClient()->call("kmail","KMailIface","openComposer(TQString,TQString,TQString,TQString,TQString,int,KURL)", data, replyType, replyData ) ) {
if ( replyType == "int" ) {
- QDataStream _reply_stream( replyData, IO_ReadOnly );
+ TQDataStream _reply_stream( replyData, IO_ReadOnly );
_reply_stream >> result;
} else {
kdDebug(5850) << "kMailOpenComposer() call failed." << endl;
@@ -246,13 +246,13 @@ int KOMailClient::kMailOpenComposer(const QString& arg0,const QString& arg1,
return result;
}
-int KOMailClient::kMailOpenComposer( const QString& arg0, const QString& arg1,
- const QString& arg2, const QString& arg3,
- const QString& arg4, int arg5, const QString& arg6,
- const QCString& arg7, const QCString& arg8,
- const QCString& arg9, const QCString& arg10,
- const QCString& arg11, const QString& arg12,
- const QCString& arg13, const QCString& arg14 )
+int KOMailClient::kMailOpenComposer( const TQString& arg0, const TQString& arg1,
+ const TQString& arg2, const TQString& arg3,
+ const TQString& arg4, int arg5, const TQString& arg6,
+ const TQCString& arg7, const TQCString& arg8,
+ const TQCString& arg9, const TQCString& arg10,
+ const TQCString& arg11, const TQString& arg12,
+ const TQCString& arg13, const TQCString& arg14 )
{
//kdDebug(5850) << "KOMailClient::kMailOpenComposer( "
// << arg0 << " , " << arg1 << arg2 << " , " << arg3
@@ -263,9 +263,9 @@ int KOMailClient::kMailOpenComposer( const QString& arg0, const QString& arg1,
int result = 0;
- QByteArray data, replyData;
- QCString replyType;
- QDataStream arg( data, IO_WriteOnly );
+ TQByteArray data, replyData;
+ TQCString replyType;
+ TQDataStream arg( data, IO_WriteOnly );
arg << arg0;
arg << arg1;
arg << arg2;
@@ -285,9 +285,9 @@ int KOMailClient::kMailOpenComposer( const QString& arg0, const QString& arg1,
kapp->updateRemoteUserTimestamp("kmail");
#endif
if ( kapp->dcopClient()->call("kmail","KMailIface",
- "openComposer(QString,QString,QString,QString,QString,int,QString,QCString,QCString,QCString,QCString,QCString,QString,QCString,QCString)", data, replyType, replyData ) ) {
+ "openComposer(TQString,TQString,TQString,TQString,TQString,int,TQString,TQCString,TQCString,TQCString,TQCString,TQCString,TQString,TQCString,TQCString)", data, replyType, replyData ) ) {
if ( replyType == "int" ) {
- QDataStream _reply_stream( replyData, IO_ReadOnly );
+ TQDataStream _reply_stream( replyData, IO_ReadOnly );
_reply_stream >> result;
} else {
kdDebug(5850) << "kMailOpenComposer() call failed." << endl;
diff --git a/korganizer/komailclient.h b/korganizer/komailclient.h
index ad9b756bb..da71ecec1 100644
--- a/korganizer/komailclient.h
+++ b/korganizer/komailclient.h
@@ -24,7 +24,7 @@
#ifndef KOMAILCLIENT_H
#define KOMAILCLIENT_H
-#include <qstring.h>
+#include <tqstring.h>
class KURL;
namespace KCal {
@@ -38,31 +38,31 @@ class KOMailClient
KOMailClient();
virtual ~KOMailClient();
- bool mailAttendees(IncidenceBase *,const QString &attachment=QString::null);
- bool mailOrganizer(IncidenceBase *,const QString &attachment=QString::null, const QString &sub = QString::null);
- bool mailTo(IncidenceBase *,const QString &recipients,const QString &attachment=QString::null);
+ bool mailAttendees(IncidenceBase *,const TQString &attachment=TQString::null);
+ bool mailOrganizer(IncidenceBase *,const TQString &attachment=TQString::null, const TQString &sub = TQString::null);
+ bool mailTo(IncidenceBase *,const TQString &recipients,const TQString &attachment=TQString::null);
protected:
/** Send mail with specified from, to and subject field and body as text. If
* bcc is set, send a blind carbon copy to the sender from */
- bool send(const QString &from,const QString &to,const QString &subject,
- const QString &body,bool bcc=false,
- const QString &attachment=QString::null);
+ bool send(const TQString &from,const TQString &to,const TQString &subject,
+ const TQString &body,bool bcc=false,
+ const TQString &attachment=TQString::null);
- int kMailOpenComposer(const QString& to, const QString& cc,
- const QString& bcc, const QString& subject,
- const QString& body, int hidden,
- const QString& attachName, const QCString& attachCte,
- const QCString& attachData,
- const QCString& attachType,
- const QCString& attachSubType,
- const QCString& attachParamAttr,
- const QString& attachParamValue,
- const QCString& attachContDisp,
- const QCString& attachCharset);
- int kMailOpenComposer(const QString& arg0,const QString& arg1,
- const QString& arg2,const QString& arg3,
- const QString& arg4,int arg5,const KURL& arg6);
+ int kMailOpenComposer(const TQString& to, const TQString& cc,
+ const TQString& bcc, const TQString& subject,
+ const TQString& body, int hidden,
+ const TQString& attachName, const TQCString& attachCte,
+ const TQCString& attachData,
+ const TQCString& attachType,
+ const TQCString& attachSubType,
+ const TQCString& attachParamAttr,
+ const TQString& attachParamValue,
+ const TQCString& attachContDisp,
+ const TQCString& attachCharset);
+ int kMailOpenComposer(const TQString& arg0,const TQString& arg1,
+ const TQString& arg2,const TQString& arg3,
+ const TQString& arg4,int arg5,const KURL& arg6);
};
#endif
diff --git a/korganizer/komessagebox.cpp b/korganizer/komessagebox.cpp
index d3189ffaa..1874fe202 100644
--- a/korganizer/komessagebox.cpp
+++ b/korganizer/komessagebox.cpp
@@ -24,12 +24,12 @@
#include <kmessagebox.h>
#include <kdialogbase.h>
-#include <qpushbutton.h>
+#include <tqpushbutton.h>
#include "komessagebox.h"
-int KOMessageBox::fourBtnMsgBox( QWidget *parent, QMessageBox::Icon type,
- const QString &text, const QString &caption,
+int KOMessageBox::fourBtnMsgBox( TQWidget *parent, TQMessageBox::Icon type,
+ const TQString &text, const TQString &caption,
const KGuiItem &button1, const KGuiItem &button2,
const KGuiItem &button3, int options)
{
@@ -41,14 +41,14 @@ int KOMessageBox::fourBtnMsgBox( QWidget *parent, QMessageBox::Icon type,
dialog->setButtonOK( button3 );
dialog->setButtonText( KDialogBase::Yes, button1.text() );
dialog->setButtonText( KDialogBase::No, button2.text() );
- QObject::connect( dialog->actionButton( KDialogBase::Yes ), SIGNAL( clicked() ), dialog, SLOT(slotYes()));
- QObject::connect( dialog->actionButton( KDialogBase::No ), SIGNAL( clicked() ), dialog, SLOT(slotNo()));
-// QObject::connect( dialog, SIGNAL( noClicked() ), dialog, SLOT(slotNo()));
+ TQObject::connect( dialog->actionButton( KDialogBase::Yes ), TQT_SIGNAL( clicked() ), dialog, TQT_SLOT(slotYes()));
+ TQObject::connect( dialog->actionButton( KDialogBase::No ), TQT_SIGNAL( clicked() ), dialog, TQT_SLOT(slotNo()));
+// TQObject::connect( dialog, TQT_SIGNAL( noClicked() ), dialog, TQT_SLOT(slotNo()));
bool checkboxResult = false;
- int result = KMessageBox::createKMessageBox(dialog, type, text, QStringList(),
- QString::null, &checkboxResult, options);
+ int result = KMessageBox::createKMessageBox(dialog, type, text, TQStringList(),
+ TQString::null, &checkboxResult, options);
switch (result) {
case KDialogBase::Yes: result = KMessageBox::Yes; break;
case KDialogBase::No: result = KMessageBox::No; break;
diff --git a/korganizer/komessagebox.h b/korganizer/komessagebox.h
index be40eeb6e..a1499bfe6 100644
--- a/korganizer/komessagebox.h
+++ b/korganizer/komessagebox.h
@@ -26,15 +26,15 @@
#include <kguiitem.h>
#include <kstdguiitem.h>
#include <kmessagebox.h>
-#include <qmessagebox.h>
-#include <qstring.h>
+#include <tqmessagebox.h>
+#include <tqstring.h>
class KOMessageBox
{
public:
- static int fourBtnMsgBox( QWidget *parent, QMessageBox::Icon type,
- const QString &text, const QString &caption = QString::null,
+ static int fourBtnMsgBox( TQWidget *parent, TQMessageBox::Icon type,
+ const TQString &text, const TQString &caption = TQString::null,
const KGuiItem &button1 = KStdGuiItem::yes(), const KGuiItem &button2 = KStdGuiItem::no(),
const KGuiItem &button3 = KStdGuiItem::cont(),
int options = 0 );
diff --git a/korganizer/komonthview.cpp b/korganizer/komonthview.cpp
index 3c88bb01f..f54a6a183 100644
--- a/korganizer/komonthview.cpp
+++ b/korganizer/komonthview.cpp
@@ -23,19 +23,19 @@
without including the source code for Qt in the source distribution.
*/
-#include <qpopupmenu.h>
-#include <qfont.h>
-#include <qfontmetrics.h>
-#include <qkeycode.h>
-#include <qhbox.h>
-#include <qvbox.h>
-#include <qpushbutton.h>
-#include <qtooltip.h>
-#include <qpainter.h>
-#include <qcursor.h>
-#include <qlistbox.h>
-#include <qlayout.h>
-#include <qlabel.h>
+#include <tqpopupmenu.h>
+#include <tqfont.h>
+#include <tqfontmetrics.h>
+#include <tqkeycode.h>
+#include <tqhbox.h>
+#include <tqvbox.h>
+#include <tqpushbutton.h>
+#include <tqtooltip.h>
+#include <tqpainter.h>
+#include <tqcursor.h>
+#include <tqlistbox.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
#include <kdebug.h>
#include <klocale.h>
@@ -61,59 +61,59 @@
//--------------------------------------------------------------------------
-KOMonthCellToolTip::KOMonthCellToolTip( QWidget *parent,
+KOMonthCellToolTip::KOMonthCellToolTip( TQWidget *parent,
KNoScrollListBox *lv )
- : QToolTip( parent )
+ : TQToolTip( parent )
{
eventlist = lv;
}
-void KOMonthCellToolTip::maybeTip( const QPoint & pos )
+void KOMonthCellToolTip::maybeTip( const TQPoint & pos )
{
- QRect r;
- QListBoxItem *it = eventlist->itemAt( pos );
+ TQRect r;
+ TQListBoxItem *it = eventlist->itemAt( pos );
MonthViewItem *i = static_cast<MonthViewItem*>( it );
if( i && KOPrefs::instance()->mEnableToolTips ) {
/* Calculate the rectangle. */
r=eventlist->itemRect( it );
/* Show the tip */
- QString tipText( IncidenceFormatter::toolTipString( i->incidence() ) );
+ TQString tipText( IncidenceFormatter::toolTipString( i->incidence() ) );
if ( !tipText.isEmpty() ) {
tip( r, tipText );
}
}
}
-KNoScrollListBox::KNoScrollListBox( QWidget *parent, const char *name )
- : QListBox( parent, name ),
+KNoScrollListBox::KNoScrollListBox( TQWidget *parent, const char *name )
+ : TQListBox( parent, name ),
mSqueezing( false )
{
- QPalette pal = palette();
- pal.setColor( QColorGroup::Foreground, KOPrefs::instance()->agendaBgColor().dark( 150 ) );
- pal.setColor( QColorGroup::Base, KOPrefs::instance()->agendaBgColor() );
+ TQPalette pal = palette();
+ pal.setColor( TQColorGroup::Foreground, KOPrefs::instance()->agendaBgColor().dark( 150 ) );
+ pal.setColor( TQColorGroup::Base, KOPrefs::instance()->agendaBgColor() );
setPalette( pal );
}
void KNoScrollListBox::setBackground( bool primary, bool workDay )
{
- QColor color;
+ TQColor color;
if ( workDay ) {
color = KOPrefs::instance()->workingHoursColor();
} else {
color = KOPrefs::instance()->agendaBgColor();
}
- QPalette pal = palette();
+ TQPalette pal = palette();
if ( primary ) {
- pal.setColor( QColorGroup::Base, color );
+ pal.setColor( TQColorGroup::Base, color );
} else {
- pal.setColor( QColorGroup::Base, color.dark( 115 ) );
+ pal.setColor( TQColorGroup::Base, color.dark( 115 ) );
}
setPalette( pal );
}
-void KNoScrollListBox::keyPressEvent( QKeyEvent *e )
+void KNoScrollListBox::keyPressEvent( TQKeyEvent *e )
{
switch( e->key() ) {
case Key_Right:
@@ -151,7 +151,7 @@ void KNoScrollListBox::keyPressEvent( QKeyEvent *e )
}
}
-void KNoScrollListBox::keyReleaseEvent( QKeyEvent *e )
+void KNoScrollListBox::keyReleaseEvent( TQKeyEvent *e )
{
switch( e->key() ) {
case Key_Shift:
@@ -162,36 +162,36 @@ void KNoScrollListBox::keyReleaseEvent( QKeyEvent *e )
}
}
-void KNoScrollListBox::mousePressEvent( QMouseEvent *e )
+void KNoScrollListBox::mousePressEvent( TQMouseEvent *e )
{
- QListBox::mousePressEvent( e );
+ TQListBox::mousePressEvent( e );
if ( e->button() == RightButton ) {
emit rightClick();
}
}
-void KNoScrollListBox::contentsMouseDoubleClickEvent ( QMouseEvent * e )
+void KNoScrollListBox::contentsMouseDoubleClickEvent ( TQMouseEvent * e )
{
- QListBox::contentsMouseDoubleClickEvent( e );
- QListBoxItem *item = itemAt( e->pos() );
+ TQListBox::contentsMouseDoubleClickEvent( e );
+ TQListBoxItem *item = itemAt( e->pos() );
if ( !item ) {
emit doubleClicked( item );
}
}
-void KNoScrollListBox::resizeEvent( QResizeEvent *e )
+void KNoScrollListBox::resizeEvent( TQResizeEvent *e )
{
bool s = count() && ( maxItemWidth() > e->size().width() );
if ( mSqueezing || s )
triggerUpdate( false );
mSqueezing = s;
- QListBox::resizeEvent( e );
+ TQListBox::resizeEvent( e );
}
-MonthViewItem::MonthViewItem( Incidence *incidence, const QDateTime &qd,
- const QString & s ) : QListBoxItem()
+MonthViewItem::MonthViewItem( Incidence *incidence, const TQDateTime &qd,
+ const TQString & s ) : TQListBoxItem()
{
setText( s );
@@ -205,7 +205,7 @@ MonthViewItem::MonthViewItem( Incidence *incidence, const QDateTime &qd,
mRecurPixmap = KOGlobals::self()->smallIcon( "recur" );
mReplyPixmap = KOGlobals::self()->smallIcon( "mail_reply" );
- mResourceColor = QColor();
+ mResourceColor = TQColor();
mEvent = false;
mTodo = false;
mTodoDone = false;
@@ -214,7 +214,7 @@ MonthViewItem::MonthViewItem( Incidence *incidence, const QDateTime &qd,
mReply = false;
}
-void MonthViewItem::paint( QPainter *p )
+void MonthViewItem::paint( TQPainter *p )
{
#if QT_VERSION >= 0x030000
bool sel = isSelected();
@@ -222,8 +222,8 @@ void MonthViewItem::paint( QPainter *p )
bool sel = selected();
#endif
- QColor bgColor = palette().color( QPalette::Normal,
- sel ? QColorGroup::Highlight : QColorGroup::Background );
+ TQColor bgColor = palette().color( TQPalette::Normal,
+ sel ? TQColorGroup::Highlight : TQColorGroup::Background );
int offset=0;
if ( KOPrefs::instance()->monthViewUsesResourceColor() &&
mResourceColor.isValid() ) {
@@ -261,7 +261,7 @@ void MonthViewItem::paint( QPainter *p )
p->drawPixmap(x, 0, mReplyPixmap );
x += mReplyPixmap.width() + 2;
}
- QFontMetrics fm = p->fontMetrics();
+ TQFontMetrics fm = p->fontMetrics();
int yPos;
int pmheight = QMAX( mRecurPixmap.height(),
QMAX( mAlarmPixmap.height(), mReplyPixmap.height() ) );
@@ -269,19 +269,19 @@ void MonthViewItem::paint( QPainter *p )
yPos = fm.ascent() + fm.leading()/2;
else
yPos = pmheight/2 - fm.height()/2 + fm.ascent();
- QColor textColor = getTextColor( bgColor );
+ TQColor textColor = getTextColor( bgColor );
p->setPen( textColor );
KWordWrap::drawFadeoutText( p, x, yPos, listBox()->width() - x, text() );
}
-int MonthViewItem::height( const QListBox *lb ) const
+int MonthViewItem::height( const TQListBox *lb ) const
{
return QMAX( QMAX( mRecurPixmap.height(), mReplyPixmap.height() ),
QMAX( mAlarmPixmap.height(), lb->fontMetrics().lineSpacing()+1) );
}
-int MonthViewItem::width( const QListBox *lb ) const
+int MonthViewItem::width( const TQListBox *lb ) const
{
int x = 3;
if( mRecur ) {
@@ -299,19 +299,19 @@ int MonthViewItem::width( const QListBox *lb ) const
MonthViewCell::MonthViewCell( KOMonthView *parent)
- : QWidget( parent ),
+ : TQWidget( parent ),
mMonthView( parent ), mPrimary( false ), mHoliday( false )
{
- QVBoxLayout *topLayout = new QVBoxLayout( this );
+ TQVBoxLayout *topLayout = new TQVBoxLayout( this );
- mLabel = new QLabel( this );
- mLabel->setFrameStyle( QFrame::Panel | QFrame::Plain );
+ mLabel = new TQLabel( this );
+ mLabel->setFrameStyle( TQFrame::Panel | TQFrame::Plain );
mLabel->setLineWidth( 1 );
mLabel->setAlignment( AlignCenter );
mItemList = new KNoScrollListBox( this );
mItemList->setMinimumSize( 10, 10 );
- mItemList->setFrameStyle( QFrame::Panel | QFrame::Plain );
+ mItemList->setFrameStyle( TQFrame::Panel | TQFrame::Plain );
mItemList->setLineWidth( 1 );
new KOMonthCellToolTip( mItemList->viewport(),
@@ -327,16 +327,16 @@ MonthViewCell::MonthViewCell( KOMonthView *parent)
updateConfig();
- connect( mItemList, SIGNAL( doubleClicked( QListBoxItem *) ),
- SLOT( defaultAction( QListBoxItem * ) ) );
- connect( mItemList, SIGNAL( rightButtonPressed( QListBoxItem *,
- const QPoint &) ),
- SLOT( contextMenu( QListBoxItem * ) ) );
- connect( mItemList, SIGNAL( clicked( QListBoxItem * ) ),
- SLOT( select() ) );
+ connect( mItemList, TQT_SIGNAL( doubleClicked( TQListBoxItem *) ),
+ TQT_SLOT( defaultAction( TQListBoxItem * ) ) );
+ connect( mItemList, TQT_SIGNAL( rightButtonPressed( TQListBoxItem *,
+ const TQPoint &) ),
+ TQT_SLOT( contextMenu( TQListBoxItem * ) ) );
+ connect( mItemList, TQT_SIGNAL( clicked( TQListBoxItem * ) ),
+ TQT_SLOT( select() ) );
}
-void MonthViewCell::setDate( const QDate &date )
+void MonthViewCell::setDate( const TQDate &date )
{
// kdDebug(5850) << "MonthViewCell::setDate(): " << date.toString() << endl;
@@ -344,23 +344,23 @@ void MonthViewCell::setDate( const QDate &date )
setFrameWidth();
- QString text;
+ TQString text;
if ( KOGlobals::self()->calendarSystem()->day( date ) == 1 ) {
text = i18n("'Month day' for month view cells", "%1 %2")
.arg( KOGlobals::self()->calendarSystem()->monthName( date, true ) )
.arg( KOGlobals::self()->calendarSystem()->day(mDate) );
- QFontMetrics fm( mLabel->font() );
- mLabel->resize( mLabelSize + QSize( fm.width( text ), 0 ) );
+ TQFontMetrics fm( mLabel->font() );
+ mLabel->resize( mLabelSize + TQSize( fm.width( text ), 0 ) );
} else {
mLabel->resize( mLabelSize );
- text = QString::number( KOGlobals::self()->calendarSystem()->day(mDate) );
+ text = TQString::number( KOGlobals::self()->calendarSystem()->day(mDate) );
}
mLabel->setText( text );
resizeEvent( 0 );
}
-QDate MonthViewCell::date() const
+TQDate MonthViewCell::date() const
{
return mDate;
}
@@ -368,7 +368,7 @@ QDate MonthViewCell::date() const
void MonthViewCell::setFrameWidth()
{
// show current day with a thicker frame
- if ( mDate == QDate::currentDate() )
+ if ( mDate == TQDate::currentDate() )
mItemList->setLineWidth( 3 );
else
mItemList->setLineWidth( 1 );
@@ -403,7 +403,7 @@ void MonthViewCell::setHoliday( bool holiday )
}
}
-void MonthViewCell::setHolidayString( const QString &holiday )
+void MonthViewCell::setHolidayString( const TQString &holiday )
{
mHolidayString = holiday;
}
@@ -412,11 +412,11 @@ void MonthViewCell::updateCell()
{
setFrameWidth();
- if ( mDate == QDate::currentDate() ) {
+ if ( mDate == TQDate::currentDate() ) {
setPalette( mTodayPalette );
- QPalette pal = mItemList->palette();
- pal.setColor( QColorGroup::Foreground, KOPrefs::instance()->highlightColor() );
+ TQPalette pal = mItemList->palette();
+ pal.setColor( TQColorGroup::Foreground, KOPrefs::instance()->highlightColor() );
mItemList->setPalette( pal );
}
else {
@@ -425,15 +425,15 @@ void MonthViewCell::updateCell()
else
setPalette( mStandardPalette );
- QPalette pal = mItemList->palette();
- pal.setColor( QColorGroup::Foreground, KOPrefs::instance()->agendaBgColor().dark( 150 ) );
+ TQPalette pal = mItemList->palette();
+ pal.setColor( TQColorGroup::Foreground, KOPrefs::instance()->agendaBgColor().dark( 150 ) );
mItemList->setPalette( pal );
}
mItemList->clear();
if ( !mHolidayString.isEmpty() ) {
- MonthViewItem *item = new MonthViewItem( 0, QDateTime( mDate ), mHolidayString );
+ MonthViewItem *item = new MonthViewItem( 0, TQDateTime( mDate ), mHolidayString );
item->setPalette( mHolidayPalette );
mItemList->insertItem( item );
}
@@ -445,7 +445,7 @@ class MonthViewCell::CreateItemVisitor :
public:
CreateItemVisitor() : mItem(0) { emails = KOPrefs::instance()->allEmails(); }
- bool act( IncidenceBase *incidence, QDate date, QPalette stdPal, int multiDay )
+ bool act( IncidenceBase *incidence, TQDate date, TQPalette stdPal, int multiDay )
{
mItem = 0;
mDate = date;
@@ -454,14 +454,14 @@ class MonthViewCell::CreateItemVisitor :
return incidence->accept( *this );
}
MonthViewItem *item() const { return mItem; }
- QStringList emails;
+ TQStringList emails;
protected:
bool visit( Event *event ) {
- QString text;
- QDateTime dt( mDate );
+ TQString text;
+ TQDateTime dt( mDate );
// take the time 0:00 into account, which is non-inclusive
- QDate dtEnd = event->dtEnd().addSecs( event->doesFloat() ? 0 : -1).date();
+ TQDate dtEnd = event->dtEnd().addSecs( event->doesFloat() ? 0 : -1).date();
int length = event->dtStart().daysTo( dtEnd );
if ( event->isMultiDay() ) {
if ( mDate == event->dtStart().date()
@@ -476,7 +476,7 @@ class MonthViewCell::CreateItemVisitor :
text = "-- " + event->summary() + " --";
} else {
text = "----------------";
- dt = QDateTime( mDate );
+ dt = TQDateTime( mDate );
}
} else {
if (event->doesFloat())
@@ -491,12 +491,12 @@ class MonthViewCell::CreateItemVisitor :
mItem = new MonthViewItem( event, dt, text );
mItem->setEvent( true );
if (KOPrefs::instance()->monthViewUsesCategoryColor()) {
- QStringList categories = event->categories();
- QString cat = categories.first();
+ TQStringList categories = event->categories();
+ TQString cat = categories.first();
if (cat.isEmpty()) {
- mItem->setPalette(QPalette(KOPrefs::instance()->mEventColor, KOPrefs::instance()->mEventColor));
+ mItem->setPalette(TQPalette(KOPrefs::instance()->mEventColor, KOPrefs::instance()->mEventColor));
} else {
- mItem->setPalette(QPalette(*(KOPrefs::instance()->categoryColor(cat)), *(KOPrefs::instance()->categoryColor(cat))));
+ mItem->setPalette(TQPalette(*(KOPrefs::instance()->categoryColor(cat)), *(KOPrefs::instance()->categoryColor(cat))));
}
} else {
mItem->setPalette( mStandardPalette );
@@ -510,10 +510,10 @@ class MonthViewCell::CreateItemVisitor :
return true;
}
bool visit( Todo *todo ) {
- QString text;
+ TQString text;
if ( !KOPrefs::instance()->showAllDayTodo() )
return false;
- QDateTime dt( mDate );
+ TQDateTime dt( mDate );
if ( todo->hasDueDate() && !todo->doesFloat() ) {
text += KGlobal::locale()->formatTime( todo->dtDue().time() );
text += ' ';
@@ -533,8 +533,8 @@ class MonthViewCell::CreateItemVisitor :
}
protected:
MonthViewItem *mItem;
- QDate mDate;
- QPalette mStandardPalette;
+ TQDate mDate;
+ TQPalette mStandardPalette;
int mMultiDay;
};
@@ -547,7 +547,7 @@ void MonthViewCell::addIncidence( Incidence *incidence, CreateItemVisitor& v, in
item->setAlarm( incidence->isAlarmEnabled() );
item->setRecur( incidence->recurrenceType() );
- QColor resourceColor = KOHelper::resourceColor( mCalendar, incidence );
+ TQColor resourceColor = KOHelper::resourceColor( mCalendar, incidence );
if ( !resourceColor.isValid() )
resourceColor = KOPrefs::instance()->mEventColor;
item->setResourceColor( resourceColor );
@@ -557,10 +557,10 @@ void MonthViewCell::addIncidence( Incidence *incidence, CreateItemVisitor& v, in
// chronologically sorted.
uint i = 0;
int pos = -1;
- QDateTime dt( item->incidenceDateTime() );
+ TQDateTime dt( item->incidenceDateTime() );
while ( i < mItemList->count() && pos<0 ) {
- QListBoxItem *item = mItemList->item( i );
+ TQListBoxItem *item = mItemList->item( i );
MonthViewItem *mvitem = dynamic_cast<MonthViewItem*>( item );
if ( mvitem && mvitem->incidenceDateTime()>dt ) {
pos = i;
@@ -588,12 +588,12 @@ void MonthViewCell::updateConfig()
{
setFont( KOPrefs::instance()->mMonthViewFont );
- QFontMetrics fm( font() );
+ TQFontMetrics fm( font() );
mLabelSize = fm.size( 0, "30" ) +
- QSize( mLabel->frameWidth() * 2, mLabel->frameWidth() * 2 ) +
- QSize( 2, 2 );
+ TQSize( mLabel->frameWidth() * 2, mLabel->frameWidth() * 2 ) +
+ TQSize( 2, 2 );
// mStandardPalette = mOriginalPalette;
- QColor bg = mStandardPalette.color( QPalette::Active, QColorGroup::Background );
+ TQColor bg = mStandardPalette.color( TQPalette::Active, TQColorGroup::Background );
int h,s,v;
bg.getHsv( &h, &s, &v );
if ( date().month() %2 == 0 ) {
@@ -604,17 +604,17 @@ void MonthViewCell::updateConfig()
}
}
setPaletteBackgroundColor( bg );
-// mStandardPalette.setColor( QColorGroup::Background, bg);*/
+// mStandardPalette.setColor( TQColorGroup::Background, bg);*/
mHolidayPalette = mStandardPalette;
- mHolidayPalette.setColor( QColorGroup::Foreground,
+ mHolidayPalette.setColor( TQColorGroup::Foreground,
KOPrefs::instance()->holidayColor() );
- mHolidayPalette.setColor( QColorGroup::Text,
+ mHolidayPalette.setColor( TQColorGroup::Text,
KOPrefs::instance()->holidayColor() );
mTodayPalette = mStandardPalette;
- mTodayPalette.setColor( QColorGroup::Foreground,
+ mTodayPalette.setColor( TQColorGroup::Foreground,
KOPrefs::instance()->highlightColor() );
- mTodayPalette.setColor( QColorGroup::Text,
+ mTodayPalette.setColor( TQColorGroup::Text,
KOPrefs::instance()->highlightColor() );
updateCell();
@@ -624,11 +624,11 @@ void MonthViewCell::updateConfig()
void MonthViewCell::enableScrollBars( bool enabled )
{
if ( enabled ) {
- mItemList->setVScrollBarMode( QScrollView::Auto );
- mItemList->setHScrollBarMode( QScrollView::Auto );
+ mItemList->setVScrollBarMode( TQScrollView::Auto );
+ mItemList->setHScrollBarMode( TQScrollView::Auto );
} else {
- mItemList->setVScrollBarMode( QScrollView::AlwaysOff );
- mItemList->setHScrollBarMode( QScrollView::AlwaysOff );
+ mItemList->setVScrollBarMode( TQScrollView::AlwaysOff );
+ mItemList->setHScrollBarMode( TQScrollView::AlwaysOff );
}
}
@@ -645,9 +645,9 @@ Incidence *MonthViewCell::selectedIncidence()
return item->incidence();
}
-QDate MonthViewCell::selectedIncidenceDate()
+TQDate MonthViewCell::selectedIncidenceDate()
{
- QDate qd;
+ TQDate qd;
int index = mItemList->currentItem();
if ( index < 0 ) return qd;
@@ -668,8 +668,8 @@ void MonthViewCell::select()
enableScrollBars( true );
// don't mess up the cell when it represents today
- if( mDate != QDate::currentDate() ) {
- mItemList->setFrameStyle( QFrame::Sunken | QFrame::Panel );
+ if( mDate != TQDate::currentDate() ) {
+ mItemList->setFrameStyle( TQFrame::Sunken | TQFrame::Panel );
mItemList->setLineWidth( 3 );
}
}
@@ -677,18 +677,18 @@ void MonthViewCell::select()
void MonthViewCell::deselect()
{
mItemList->clearSelection();
- mItemList->setFrameStyle( QFrame::Plain | QFrame::Panel );
+ mItemList->setFrameStyle( TQFrame::Plain | TQFrame::Panel );
setFrameWidth();
enableScrollBars( false );
}
-void MonthViewCell::resizeEvent ( QResizeEvent * )
+void MonthViewCell::resizeEvent ( TQResizeEvent * )
{
mLabel->move( width() - mLabel->width(), height() - mLabel->height() );
}
-void MonthViewCell::defaultAction( QListBoxItem *item )
+void MonthViewCell::defaultAction( TQListBoxItem *item )
{
select();
@@ -701,7 +701,7 @@ void MonthViewCell::defaultAction( QListBoxItem *item )
}
}
-void MonthViewCell::contextMenu( QListBoxItem *item )
+void MonthViewCell::contextMenu( TQListBoxItem *item )
{
select();
@@ -716,27 +716,27 @@ void MonthViewCell::contextMenu( QListBoxItem *item )
}
-KOMonthView::KOMonthView( Calendar *calendar, QWidget *parent, const char *name )
+KOMonthView::KOMonthView( Calendar *calendar, TQWidget *parent, const char *name )
: KOEventView( calendar, parent, name ),
mDaysPerWeek( 7 ), mNumWeeks( 6 ), mNumCells( mDaysPerWeek * mNumWeeks ),
mShortDayLabels( false ), mWidthLongDayLabel( 0 ), mSelectedCell( 0 )
{
mCells.setAutoDelete( true );
- QGridLayout *dayLayout = new QGridLayout( this );
+ TQGridLayout *dayLayout = new TQGridLayout( this );
- QFont bfont = font();
+ TQFont bfont = font();
bfont.setBold( true );
- QFont mfont = bfont;
+ TQFont mfont = bfont;
mfont.setPointSize( 20 );
// month name on top
- mLabel = new QLabel( this );
+ mLabel = new TQLabel( this );
mLabel->setFont( mfont );
mLabel->setAlignment( AlignCenter );
mLabel->setLineWidth( 0 );
- mLabel->setFrameStyle( QFrame::Plain );
+ mLabel->setFrameStyle( TQFrame::Plain );
dayLayout->addMultiCellWidget( mLabel, 0, 0, 0, mDaysPerWeek );
@@ -745,9 +745,9 @@ KOMonthView::KOMonthView( Calendar *calendar, QWidget *parent, const char *name
mDayLabels.resize( mDaysPerWeek );
int i;
for( i = 0; i < mDaysPerWeek; i++ ) {
- QLabel *label = new QLabel( this );
+ TQLabel *label = new TQLabel( this );
label->setFont( bfont );
- label->setFrameStyle( QFrame::Panel | QFrame::Raised );
+ label->setFrameStyle( TQFrame::Panel | TQFrame::Raised );
label->setLineWidth( 1 );
label->setAlignment( AlignCenter );
@@ -768,10 +768,10 @@ KOMonthView::KOMonthView( Calendar *calendar, QWidget *parent, const char *name
mCells.insert( row * mDaysPerWeek + col, cell );
dayLayout->addWidget( cell, row + 2, col );
- connect( cell, SIGNAL( defaultAction( Incidence * ) ),
- SLOT( defaultAction( Incidence * ) ) );
- connect( cell, SIGNAL( newEventSignal( const QDate & ) ),
- SIGNAL( newEventSignal( const QDate & ) ) );
+ connect( cell, TQT_SIGNAL( defaultAction( Incidence * ) ),
+ TQT_SLOT( defaultAction( Incidence * ) ) );
+ connect( cell, TQT_SIGNAL( newEventSignal( const TQDate & ) ),
+ TQT_SIGNAL( newEventSignal( const TQDate & ) ) );
}
dayLayout->setRowStretch( row + 2, 1 );
}
@@ -815,14 +815,14 @@ DateList KOMonthView::selectedDates()
DateList selected;
if ( mSelectedCell ) {
- QDate qd = mSelectedCell->selectedIncidenceDate();
+ TQDate qd = mSelectedCell->selectedIncidenceDate();
if ( qd.isValid() ) selected.append( qd );
}
return selected;
}
-bool KOMonthView::eventDurationHint( QDateTime &startDt, QDateTime &endDt, bool &allDay )
+bool KOMonthView::eventDurationHint( TQDateTime &startDt, TQDateTime &endDt, bool &allDay )
{
if ( mSelectedCell ) {
startDt.setDate( mSelectedCell->date() );
@@ -837,7 +837,7 @@ void KOMonthView::updateConfig()
{
mWeekStartDay = KGlobal::locale()->weekStartDay();
- QFontMetrics fontmetric( mDayLabels[0]->font() );
+ TQFontMetrics fontmetric( mDayLabels[0]->font() );
mWidthLongDayLabel = 0;
for ( int i = 0; i < 7; ++i ) {
@@ -866,7 +866,7 @@ void KOMonthView::updateDayLabels()
}
}
-void KOMonthView::showDates( const QDate &start, const QDate & )
+void KOMonthView::showDates( const TQDate &start, const TQDate & )
{
// kdDebug(5850) << "KOMonthView::showDates(): " << start.toString() << endl;
@@ -892,7 +892,7 @@ void KOMonthView::showDates( const QDate &start, const QDate & )
bool primary = false;
uint i;
for( i = 0; i < mCells.size(); ++i ) {
- QDate date = mStartDate.addDays( i );
+ TQDate date = mStartDate.addDays( i );
if ( calSys->day( date ) == 1 ) {
primary = !primary;
}
@@ -909,7 +909,7 @@ void KOMonthView::showDates( const QDate &start, const QDate & )
mCells[i]->setHoliday( isHoliday );
// add holiday, if present
- QStringList holidays( KOGlobals::self()->holiday( date ) );
+ TQStringList holidays( KOGlobals::self()->holiday( date ) );
mCells[i]->setHolidayString( holidays.join( i18n("delimiter for joining holiday names", ", " ) ) );
}
@@ -930,8 +930,8 @@ class KOMonthView::GetDateVisitor : public IncidenceBase::Visitor
{
return incidence->accept( *this );
}
- QDateTime startDate() const { return mStartDate; }
- QDateTime endDate() const { return mEndDate; }
+ TQDateTime startDate() const { return mStartDate; }
+ TQDateTime endDate() const { return mEndDate; }
protected:
bool visit( Event *event ) {
@@ -953,8 +953,8 @@ class KOMonthView::GetDateVisitor : public IncidenceBase::Visitor
return true;
}
protected:
- QDateTime mStartDate;
- QDateTime mEndDate;
+ TQDateTime mStartDate;
+ TQDateTime mEndDate;
};
void KOMonthView::changeIncidenceDisplayAdded( Incidence *incidence, MonthViewCell::CreateItemVisitor& v)
@@ -982,8 +982,8 @@ void KOMonthView::changeIncidenceDisplayAdded( Incidence *incidence, MonthViewCe
} else {
// addSecs(-1) is added to handle 0:00 cases (because it's non-inclusive according to rfc)
if ( gdv.endDate().isValid() ) {
- QDate endDate = gdv.endDate().addSecs( floats ? 0 : -1).date();
- for ( QDate date = gdv.startDate().date();
+ TQDate endDate = gdv.endDate().addSecs( floats ? 0 : -1).date();
+ for ( TQDate date = gdv.startDate().date();
date <= endDate; date = date.addDays( 1 ) ) {
MonthViewCell *mvc = mDateToCell[ date ];
if ( mvc ) mvc->addIncidence( incidence, v );
@@ -1029,7 +1029,7 @@ void KOMonthView::updateView()
processSelectionChange();
}
-void KOMonthView::resizeEvent( QResizeEvent * )
+void KOMonthView::resizeEvent( TQResizeEvent * )
{
// select the appropriate heading string size. E.g. "Wednesday" or "Wed".
// note this only changes the text if the requested size crosses the
@@ -1048,7 +1048,7 @@ void KOMonthView::resizeEvent( QResizeEvent * )
}
}
-void KOMonthView::showEventContextMenu( Incidence *incidence, const QDate &qd )
+void KOMonthView::showEventContextMenu( Incidence *incidence, const TQDate &qd )
{
mEventContextMenu->showIncidencePopup( incidence, qd );
}
diff --git a/korganizer/komonthview.h b/korganizer/komonthview.h
index 44e36b055..9a3015d03 100644
--- a/korganizer/komonthview.h
+++ b/korganizer/komonthview.h
@@ -26,9 +26,9 @@
#ifndef _KOMONTHVIEW_H
#define _KOMONTHVIEW_H
-#include <qlistbox.h>
-#include <qptrvector.h>
-#include <qtooltip.h>
+#include <tqlistbox.h>
+#include <tqptrvector.h>
+#include <tqtooltip.h>
#include "koeventview.h"
class KNoScrollListBox;
@@ -36,10 +36,10 @@ class KNoScrollListBox;
class KOMonthCellToolTip : public QToolTip
{
public:
- KOMonthCellToolTip (QWidget* parent, KNoScrollListBox* lv );
+ KOMonthCellToolTip (TQWidget* parent, KNoScrollListBox* lv );
protected:
- void maybeTip( const QPoint & pos);
+ void maybeTip( const TQPoint & pos);
private:
KNoScrollListBox* eventlist;
@@ -50,7 +50,7 @@ class KNoScrollListBox: public QListBox
{
Q_OBJECT
public:
- KNoScrollListBox(QWidget *parent=0, const char *name=0);
+ KNoScrollListBox(TQWidget *parent=0, const char *name=0);
~KNoScrollListBox() {}
void setBackground( bool primary, bool workday );
@@ -61,11 +61,11 @@ class KNoScrollListBox: public QListBox
void rightClick();
protected slots:
- void keyPressEvent(QKeyEvent *);
- void keyReleaseEvent(QKeyEvent *);
- void mousePressEvent(QMouseEvent *);
- void resizeEvent(QResizeEvent *);
- void contentsMouseDoubleClickEvent( QMouseEvent * e );
+ void keyPressEvent(TQKeyEvent *);
+ void keyReleaseEvent(TQKeyEvent *);
+ void mousePressEvent(TQMouseEvent *);
+ void resizeEvent(TQResizeEvent *);
+ void contentsMouseDoubleClickEvent( TQMouseEvent * e );
private:
bool mSqueezing;
@@ -75,7 +75,7 @@ class KNoScrollListBox: public QListBox
class MonthViewItem: public QListBoxItem
{
public:
- MonthViewItem( Incidence *, const QDateTime &qd, const QString & title );
+ MonthViewItem( Incidence *, const TQDateTime &qd, const TQString & title );
void setEvent(bool on) { mEvent = on; }
void setTodo(bool on) { mTodo = on; }
@@ -84,20 +84,20 @@ class MonthViewItem: public QListBoxItem
void setAlarm(bool on) { mAlarm = on; }
void setReply(bool on) { mReply = on; }
- void setPalette(const QPalette &p) { mPalette = p; }
- QPalette palette() const { return mPalette; }
+ void setPalette(const TQPalette &p) { mPalette = p; }
+ TQPalette palette() const { return mPalette; }
Incidence *incidence() const { return mIncidence; }
- QDateTime incidenceDateTime() { return mDateTime; }
+ TQDateTime incidenceDateTime() { return mDateTime; }
- void setResourceColor( QColor& color ) { mResourceColor = color; }
- QColor &resourceColor() { return mResourceColor; }
+ void setResourceColor( TQColor& color ) { mResourceColor = color; }
+ TQColor &resourceColor() { return mResourceColor; }
protected:
- virtual void paint(QPainter *);
- virtual int height(const QListBox *) const;
- virtual int width(const QListBox *) const;
+ virtual void paint(TQPainter *);
+ virtual int height(const TQListBox *) const;
+ virtual int width(const TQListBox *) const;
//Color of the resource
- QColor mResourceColor;
+ TQColor mResourceColor;
private:
bool mEvent;
bool mTodo;
@@ -106,15 +106,15 @@ class MonthViewItem: public QListBoxItem
bool mAlarm;
bool mReply;
- QPixmap mEventPixmap;
- QPixmap mTodoPixmap;
- QPixmap mTodoDonePixmap;
- QPixmap mAlarmPixmap;
- QPixmap mRecurPixmap;
- QPixmap mReplyPixmap;
+ TQPixmap mEventPixmap;
+ TQPixmap mTodoPixmap;
+ TQPixmap mTodoDonePixmap;
+ TQPixmap mAlarmPixmap;
+ TQPixmap mRecurPixmap;
+ TQPixmap mReplyPixmap;
- QPalette mPalette;
- QDateTime mDateTime;
+ TQPalette mPalette;
+ TQDateTime mDateTime;
Incidence *mIncidence;
};
@@ -134,9 +134,9 @@ class MonthViewCell : public QWidget
MonthViewCell( KOMonthView * );
/** Sets the date of the cell */
- void setDate( const QDate & );
+ void setDate( const TQDate & );
/** @return Date of cell */
- QDate date() const;
+ TQDate date() const;
/**
Set this cell as primary if @p primary is true. A primary cell belongs
@@ -158,7 +158,7 @@ class MonthViewCell : public QWidget
setHoliday( true ).
@param name The name of the holiday.
*/
- void setHolidayString( const QString &name );
+ void setHolidayString( const TQString &name );
void updateCell();
/** Adds an incidence to the cell.
@@ -180,7 +180,7 @@ class MonthViewCell : public QWidget
void enableScrollBars( bool );
Incidence *selectedIncidence();
- QDate selectedIncidenceDate();
+ TQDate selectedIncidenceDate();
void deselect();
@@ -192,37 +192,37 @@ class MonthViewCell : public QWidget
will pop up.
@param date The date of the event we want create.
*/
- void newEventSignal( const QDate &date );
+ void newEventSignal( const TQDate &date );
public slots:
void select();
protected:
void setFrameWidth();
- void resizeEvent( QResizeEvent * );
+ void resizeEvent( TQResizeEvent * );
protected slots:
- void defaultAction( QListBoxItem * );
- void contextMenu( QListBoxItem * );
+ void defaultAction( TQListBoxItem * );
+ void contextMenu( TQListBoxItem * );
private:
KOMonthView *mMonthView;
// We need the calendar for paint the ResourceColor
Calendar *mCalendar;
- QDate mDate;
+ TQDate mDate;
bool mPrimary;
bool mHoliday;
- QString mHolidayString;
+ TQString mHolidayString;
- QLabel *mLabel;
+ TQLabel *mLabel;
KNoScrollListBox *mItemList;
- QSize mLabelSize;
-// QPalette mOriginalPalette;
- QPalette mHolidayPalette;
- QPalette mStandardPalette;
- QPalette mTodayPalette;
+ TQSize mLabelSize;
+// TQPalette mOriginalPalette;
+ TQPalette mHolidayPalette;
+ TQPalette mStandardPalette;
+ TQPalette mTodayPalette;
};
/**
@@ -236,7 +236,7 @@ class KOMonthView: public KOEventView
{
Q_OBJECT
public:
- KOMonthView(Calendar *cal, QWidget *parent = 0, const char *name = 0 );
+ KOMonthView(Calendar *cal, TQWidget *parent = 0, const char *name = 0 );
~KOMonthView();
/** Returns maximum number of days supported by the komonthview */
@@ -251,12 +251,12 @@ class KOMonthView: public KOEventView
/** Returns dates of the currently selected events */
virtual DateList selectedDates();
- virtual bool eventDurationHint(QDateTime &startDt, QDateTime &endDt, bool &allDay);
+ virtual bool eventDurationHint(TQDateTime &startDt, TQDateTime &endDt, bool &allDay);
public slots:
virtual void updateView();
virtual void updateConfig();
- virtual void showDates(const QDate &start, const QDate &end);
+ virtual void showDates(const TQDate &start, const TQDate &end);
virtual void showIncidences( const Incidence::List &incidenceList );
void changeIncidenceDisplay(Incidence *, int);
@@ -264,7 +264,7 @@ class KOMonthView: public KOEventView
void clearSelection();
- void showEventContextMenu( Incidence *, const QDate & );
+ void showEventContextMenu( Incidence *, const TQDate & );
void showGeneralContextMenu();
void setSelectedCell( MonthViewCell * );
@@ -273,7 +273,7 @@ class KOMonthView: public KOEventView
void processSelectionChange();
protected:
- void resizeEvent(QResizeEvent *);
+ void resizeEvent(TQResizeEvent *);
void viewChanged();
void updateDayLabels();
@@ -285,20 +285,20 @@ class KOMonthView: public KOEventView
int mNumCells;
int mWeekStartDay;
- QPtrVector<MonthViewCell> mCells;
- QMap<QDate,MonthViewCell *> mDateToCell;
- QPtrVector<QLabel> mDayLabels;
+ TQPtrVector<MonthViewCell> mCells;
+ TQMap<TQDate,MonthViewCell *> mDateToCell;
+ TQPtrVector<TQLabel> mDayLabels;
bool mShortDayLabels;
int mWidthLongDayLabel;
- QDate mStartDate;
- QDate mSelectedDate;
+ TQDate mStartDate;
+ TQDate mSelectedDate;
MonthViewCell *mSelectedCell;
KOEventPopupMenu *mEventContextMenu;
- QLabel *mLabel;
+ TQLabel *mLabel;
};
#endif
diff --git a/korganizer/konewstuff.cpp b/korganizer/konewstuff.cpp
index 331126b38..83ee226da 100644
--- a/korganizer/konewstuff.cpp
+++ b/korganizer/konewstuff.cpp
@@ -38,7 +38,7 @@ KONewStuff::KONewStuff( CalendarView *view ) :
{
}
-bool KONewStuff::install( const QString &fileName )
+bool KONewStuff::install( const TQString &fileName )
{
kdDebug(5850) << "KONewStuff::install(): " << fileName << endl;
@@ -51,11 +51,11 @@ bool KONewStuff::install( const QString &fileName )
Event::List events = cal.events();
- QStringList eventList;
+ TQStringList eventList;
Event::List::ConstIterator it;
for( it = events.begin(); it != events.end(); ++it ) {
- QString text = (*it)->summary();
+ TQString text = (*it)->summary();
eventList.append( text );
}
@@ -68,7 +68,7 @@ bool KONewStuff::install( const QString &fileName )
return mView->openCalendar( fileName, true );
}
-bool KONewStuff::createUploadFile( const QString &fileName )
+bool KONewStuff::createUploadFile( const TQString &fileName )
{
return mView->saveCalendar( fileName );
}
diff --git a/korganizer/konewstuff.h b/korganizer/konewstuff.h
index c9a5333a8..ba70394fa 100644
--- a/korganizer/konewstuff.h
+++ b/korganizer/konewstuff.h
@@ -33,8 +33,8 @@ class KONewStuff : public KNewStuff
public:
KONewStuff( CalendarView * );
- bool install( const QString &fileName );
- bool createUploadFile( const QString &fileName );
+ bool install( const TQString &fileName );
+ bool createUploadFile( const TQString &fileName );
private:
CalendarView *mView;
diff --git a/korganizer/koprefs.cpp b/korganizer/koprefs.cpp
index 3e4d78dda..3532b1cc1 100644
--- a/korganizer/koprefs.cpp
+++ b/korganizer/koprefs.cpp
@@ -26,12 +26,12 @@
#include <time.h>
#include <unistd.h>
-#include <qdir.h>
-#include <qstring.h>
-#include <qfont.h>
-#include <qcolor.h>
-#include <qmap.h>
-#include <qstringlist.h>
+#include <tqdir.h>
+#include <tqstring.h>
+#include <tqfont.h>
+#include <tqcolor.h>
+#include <tqmap.h>
+#include <tqstringlist.h>
#include <kglobalsettings.h>
#include <kglobal.h>
@@ -55,10 +55,10 @@
KOPrefs *KOPrefs::mInstance = 0;
static KStaticDeleter<KOPrefs> insd;
-QColor getTextColor(const QColor &c)
+TQColor getTextColor(const TQColor &c)
{
float luminance = (c.red() * 0.299) + (c.green() * 0.587) + (c.blue() * 0.114);
- return (luminance > 128.0) ? QColor( 0, 0 ,0 ) : QColor( 255, 255 ,255 );
+ return (luminance > 128.0) ? TQColor( 0, 0 ,0 ) : TQColor( 255, 255 ,255 );
}
@@ -68,9 +68,9 @@ KOPrefs::KOPrefs() :
mCategoryColors.setAutoDelete( true );
mResourceColors.setAutoDelete( true );
- mDefaultCategoryColor = QColor( 151, 235, 121 );
+ mDefaultCategoryColor = TQColor( 151, 235, 121 );
- mDefaultResourceColor = QColor();//Default is a color invalid
+ mDefaultResourceColor = TQColor();//Default is a color invalid
mDefaultTimeBarFont = KGlobalSettings::generalFont();
// make a large default time bar font, at least 16 points.
@@ -84,7 +84,7 @@ KOPrefs::KOPrefs() :
KConfigSkeleton::setCurrentGroup( "General" );
addItemPath( "Html Export File", mHtmlExportFile,
- QDir::homeDirPath() + "/" + i18n( "Default export file", "calendar.html" ) );
+ TQDir::homeDirPath() + "/" + i18n( "Default export file", "calendar.html" ) );
timeBarFontItem()->setDefaultValue( mDefaultTimeBarFont );
monthViewFontItem()->setDefaultValue( mDefaultMonthViewFont );
@@ -119,7 +119,7 @@ void KOPrefs::usrSetDefaults()
// settings for example.
KEMailSettings settings;
- QString tmp = settings.getSetting(KEMailSettings::RealName);
+ TQString tmp = settings.getSetting(KEMailSettings::RealName);
if ( !tmp.isEmpty() ) setUserName( tmp );
tmp = settings.getSetting(KEMailSettings::EmailAddress);
if ( !tmp.isEmpty() ) setUserEmail( tmp );
@@ -136,7 +136,7 @@ void KOPrefs::usrSetDefaults()
void KOPrefs::fillMailDefaults()
{
userEmailItem()->swapDefault();
- QString defEmail = userEmailItem()->value();
+ TQString defEmail = userEmailItem()->value();
userEmailItem()->swapDefault();
if ( userEmail() == defEmail ) {
@@ -149,7 +149,7 @@ void KOPrefs::fillMailDefaults()
void KOPrefs::setTimeZoneIdDefault()
{
- QString zone;
+ TQString zone;
zone = KTimezones().local()->name();
@@ -179,28 +179,28 @@ void KOPrefs::usrReadConfig()
// old category colors, ignore if they have the old default
// should be removed a few versions after 3.2...
config()->setGroup("Category Colors");
- QValueList<QColor> oldCategoryColors;
- QStringList::Iterator it;
+ TQValueList<TQColor> oldCategoryColors;
+ TQStringList::Iterator it;
for (it = mCustomCategories.begin();it != mCustomCategories.end();++it ) {
- QColor c = config()->readColorEntry(*it, &mDefaultCategoryColor);
- oldCategoryColors.append( (c == QColor(196,196,196)) ?
+ TQColor c = config()->readColorEntry(*it, &mDefaultCategoryColor);
+ oldCategoryColors.append( (c == TQColor(196,196,196)) ?
mDefaultCategoryColor : c);
}
// new category colors
config()->setGroup("Category Colors2");
- QValueList<QColor>::Iterator it2;
+ TQValueList<TQColor>::Iterator it2;
for (it = mCustomCategories.begin(), it2 = oldCategoryColors.begin();
it != mCustomCategories.end(); ++it, ++it2 ) {
- QColor c = config()->readColorEntry(*it, &*it2);
+ TQColor c = config()->readColorEntry(*it, &*it2);
if ( c != mDefaultCategoryColor )
setCategoryColor(*it,c);
}
config()->setGroup( "Resources Colors" );
- QMap<QString, QString> map = config()->entryMap( "Resources Colors" );
+ TQMap<TQString, TQString> map = config()->entryMap( "Resources Colors" );
- QMapIterator<QString, QString> it3;
+ TQMapIterator<TQString, TQString> it3;
for( it3 = map.begin(); it3 != map.end(); ++it3 ) {
kdDebug(5850)<< "KOPrefs::usrReadConfig: key: " << it3.key() << " value: "
<< it3.data()<<endl;
@@ -232,14 +232,14 @@ void KOPrefs::usrWriteConfig()
config()->writeEntry("Custom Categories",mCustomCategories);
config()->setGroup("Category Colors2");
- QDictIterator<QColor> it(mCategoryColors);
+ TQDictIterator<TQColor> it(mCategoryColors);
while (it.current()) {
config()->writeEntry(it.currentKey(),*(it.current()));
++it;
}
config()->setGroup( "Resources Colors" );
- QDictIterator<QColor> it2( mResourceColors );
+ TQDictIterator<TQColor> it2( mResourceColors );
while( it2.current() ) {
config()->writeEntry( it2.currentKey(), *( it2.current() ) );
++it2;
@@ -269,14 +269,14 @@ void KOPrefs::usrWriteConfig()
KPimPrefs::usrWriteConfig();
}
-void KOPrefs::setCategoryColor( const QString &cat, const QColor & color)
+void KOPrefs::setCategoryColor( const TQString &cat, const TQColor & color)
{
- mCategoryColors.replace( cat, new QColor( color ) );
+ mCategoryColors.replace( cat, new TQColor( color ) );
}
-QColor *KOPrefs::categoryColor( const QString &cat )
+TQColor *KOPrefs::categoryColor( const TQString &cat )
{
- QColor *color = 0;
+ TQColor *color = 0;
if ( !cat.isEmpty() ) color = mCategoryColors[ cat ];
@@ -285,28 +285,28 @@ QColor *KOPrefs::categoryColor( const QString &cat )
}
-bool KOPrefs::hasCategoryColor( const QString& cat ) const
+bool KOPrefs::hasCategoryColor( const TQString& cat ) const
{
return mCategoryColors[ cat ];
}
-void KOPrefs::setResourceColor ( const QString &cal, const QColor &color )
+void KOPrefs::setResourceColor ( const TQString &cal, const TQColor &color )
{
kdDebug(5850)<<"KOPrefs::setResourceColor: " << cal << " color: "<<
color.name()<<endl;
- mResourceColors.replace( cal, new QColor( color ) );
+ mResourceColors.replace( cal, new TQColor( color ) );
}
-QColor* KOPrefs::resourceColor( const QString &cal )
+TQColor* KOPrefs::resourceColor( const TQString &cal )
{
- QColor *color=0;
+ TQColor *color=0;
if( !cal.isEmpty() ) color = mResourceColors[cal];
// assign default color if enabled
if ( !cal.isEmpty() && !color && assignDefaultResourceColors() ) {
- QColor defColor( 0x37, 0x7A, 0xBC );
+ TQColor defColor( 0x37, 0x7A, 0xBC );
if ( defaultResourceColorSeed() > 0 && defaultResourceColorSeed() - 1 < (int)defaultResourceColors().size() ) {
- defColor = QColor( defaultResourceColors()[defaultResourceColorSeed()-1] );
+ defColor = TQColor( defaultResourceColors()[defaultResourceColorSeed()-1] );
} else {
int h, s, v;
defColor.getHsv( h, s, v );
@@ -325,7 +325,7 @@ QColor* KOPrefs::resourceColor( const QString &cal )
return &mDefaultResourceColor;
}
-QString KOPrefs::fullName()
+TQString KOPrefs::fullName()
{
if ( mEmailControlCenter ) {
KEMailSettings settings;
@@ -335,7 +335,7 @@ QString KOPrefs::fullName()
}
}
-QString KOPrefs::email()
+TQString KOPrefs::email()
{
if ( mEmailControlCenter ) {
KEMailSettings settings;
@@ -345,10 +345,10 @@ QString KOPrefs::email()
}
}
-QStringList KOPrefs::allEmails()
+TQStringList KOPrefs::allEmails()
{
// Grab emails from the email identities
- QStringList lst = KOCore::self()->identityManager()->allEmails();
+ TQStringList lst = KOCore::self()->identityManager()->allEmails();
// Add emails configured in korganizer
lst += mAdditionalMails;
// Add emails from the user's kaddressbook entry
@@ -360,16 +360,16 @@ QStringList KOPrefs::allEmails()
return lst;
}
-QStringList KOPrefs::fullEmails()
+TQStringList KOPrefs::fullEmails()
{
- QStringList fullEmails;
+ TQStringList fullEmails;
// The user name and email from the config dialog:
- fullEmails << QString("%1 <%2>").arg( fullName() ).arg( email() );
+ fullEmails << TQString("%1 <%2>").arg( fullName() ).arg( email() );
- QStringList::Iterator it;
+ TQStringList::Iterator it;
// Grab emails from the email identities
KPIM::IdentityManager *idmanager = KOCore::self()->identityManager();
- QStringList lst = idmanager->identities();
+ TQStringList lst = idmanager->identities();
KPIM::IdentityManager::ConstIterator it1;
for ( it1 = idmanager->begin() ; it1 != idmanager->end() ; ++it1 ) {
fullEmails << (*it1).fullEmailAddr();
@@ -377,7 +377,7 @@ QStringList KOPrefs::fullEmails()
// Add emails configured in korganizer
lst = mAdditionalMails;
for ( it = lst.begin(); it != lst.end(); ++it ) {
- fullEmails << QString("%1 <%2>").arg( fullName() ).arg( *it );
+ fullEmails << TQString("%1 <%2>").arg( fullName() ).arg( *it );
}
// Add emails from the user's kaddressbook entry
KABC::Addressee me = KABC::StdAddressBook::self()->whoAmI();
@@ -390,7 +390,7 @@ QStringList KOPrefs::fullEmails()
return fullEmails;
}
-bool KOPrefs::thatIsMe( const QString& _email )
+bool KOPrefs::thatIsMe( const TQString& _email )
{
// NOTE: this method is called for every created agenda view item, so we need to keep
// performance in mind
@@ -405,13 +405,13 @@ bool KOPrefs::thatIsMe( const QString& _email )
// in case email contains a full name, strip it out
// the below is the simpler but slower version of the following KMime code
- // const QString email = KPIM::getEmailAddress( _email );
- const QCString tmp = _email.utf8();
+ // const TQString email = KPIM::getEmailAddress( _email );
+ const TQCString tmp = _email.utf8();
const char *cursor = tmp.data();
const char *end = tmp.data() + tmp.length();
KMime::Types::Mailbox mbox;
KMime::HeaderParsing::parseMailbox( cursor, end, mbox );
- const QString email = mbox.addrSpec.asString();
+ const TQString email = mbox.addrSpec.asString();
for ( KPIM::IdentityManager::ConstIterator it = KOCore::self()->identityManager()->begin();
it != KOCore::self()->identityManager()->end(); ++it ) {
@@ -421,7 +421,7 @@ bool KOPrefs::thatIsMe( const QString& _email )
if ( mAdditionalMails.find( email ) != mAdditionalMails.end() )
return true;
- QStringList lst = mMyAddrBookMails;
+ TQStringList lst = mMyAddrBookMails;
if ( lst.find( email ) != lst.end() )
return true;
return false;
diff --git a/korganizer/koprefs.h b/korganizer/koprefs.h
index dc7a62d18..c65382f5d 100644
--- a/korganizer/koprefs.h
+++ b/korganizer/koprefs.h
@@ -24,7 +24,7 @@
#ifndef KOPREFS_H
#define KOPREFS_H
-#include <qdict.h>
+#include <tqdict.h>
#include <kdepimmacros.h>
@@ -35,7 +35,7 @@ class QFont;
class QColor;
class QStringList;
-QColor getTextColor(const QColor &c);
+TQColor getTextColor(const TQColor &c);
class KDE_EXPORT KOPrefs : public KOPrefsBase
@@ -72,46 +72,46 @@ class KDE_EXPORT KOPrefs : public KOPrefsBase
public:
// preferences data
- void setFullName( const QString & );
- QString fullName();
- void setEmail( const QString & );
- QString email();
+ void setFullName( const TQString & );
+ TQString fullName();
+ void setEmail( const TQString & );
+ TQString email();
/// Returns all email addresses for the user.
- QStringList allEmails();
+ TQStringList allEmails();
/// Returns all email addresses together with the full username for the user.
- QStringList fullEmails();
+ TQStringList fullEmails();
/// Return true if the given email belongs to the user
- bool thatIsMe( const QString& email );
+ bool thatIsMe( const TQString& email );
- void setCategoryColor( const QString &cat, const QColor &color );
- QColor *categoryColor( const QString &cat );
- bool hasCategoryColor( const QString &cat ) const;
+ void setCategoryColor( const TQString &cat, const TQColor &color );
+ TQColor *categoryColor( const TQString &cat );
+ bool hasCategoryColor( const TQString &cat ) const;
- void setResourceColor ( const QString &, const QColor & );
- QColor* resourceColor( const QString & );
+ void setResourceColor ( const TQString &, const TQColor & );
+ TQColor* resourceColor( const TQString & );
- QString mHtmlExportFile;
+ TQString mHtmlExportFile;
bool mAlarmsEnabledByDefault;
// Groupware passwords
- QString mPublishPassword;
- QString mRetrievePassword;
+ TQString mPublishPassword;
+ TQString mRetrievePassword;
private:
- QDict<QColor> mCategoryColors;
- QColor mDefaultCategoryColor;
+ TQDict<TQColor> mCategoryColors;
+ TQColor mDefaultCategoryColor;
- QDict<QColor> mResourceColors;
- QColor mDefaultResourceColor;
+ TQDict<TQColor> mResourceColors;
+ TQColor mDefaultResourceColor;
- QFont mDefaultTimeBarFont;
- QFont mDefaultMonthViewFont;
+ TQFont mDefaultTimeBarFont;
+ TQFont mDefaultMonthViewFont;
- QStringList mMyAddrBookMails;
+ TQStringList mMyAddrBookMails;
public: // Do not use - except in KOPrefsDialogMain
- QString mName;
- QString mEmail;
+ TQString mName;
+ TQString mEmail;
};
#endif
diff --git a/korganizer/koprefsdialog.cpp b/korganizer/koprefsdialog.cpp
index fd9fd8246..0205b59ea 100644
--- a/korganizer/koprefsdialog.cpp
+++ b/korganizer/koprefsdialog.cpp
@@ -23,25 +23,25 @@
without including the source code for Qt in the source distribution.
*/
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qgroupbox.h>
-#include <qbuttongroup.h>
-#include <qlineedit.h>
-#include <qslider.h>
-#include <qfile.h>
-#include <qcombobox.h>
-#include <qhbox.h>
-#include <qvbox.h>
-#include <qgrid.h>
-#include <qspinbox.h>
-#include <qcheckbox.h>
-#include <qradiobutton.h>
-#include <qpushbutton.h>
-#include <qstrlist.h>
-#include <qlistview.h>
-#include <qtabwidget.h>
-#include <qwhatsthis.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqgroupbox.h>
+#include <tqbuttongroup.h>
+#include <tqlineedit.h>
+#include <tqslider.h>
+#include <tqfile.h>
+#include <tqcombobox.h>
+#include <tqhbox.h>
+#include <tqvbox.h>
+#include <tqgrid.h>
+#include <tqspinbox.h>
+#include <tqcheckbox.h>
+#include <tqradiobutton.h>
+#include <tqpushbutton.h>
+#include <tqstrlist.h>
+#include <tqlistview.h>
+#include <tqtabwidget.h>
+#include <tqwhatsthis.h>
#include <kcolorbutton.h>
#include <kdebug.h>
@@ -76,39 +76,39 @@
#include <kdepimmacros.h>
-KOPrefsDialogMain::KOPrefsDialogMain( QWidget *parent, const char *name )
+KOPrefsDialogMain::KOPrefsDialogMain( TQWidget *parent, const char *name )
: KPrefsModule( KOPrefs::instance(), parent, name )
{
- QBoxLayout *topTopLayout = new QVBoxLayout( this );
+ TQBoxLayout *topTopLayout = new TQVBoxLayout( this );
- QVBox *topFrame = new QVBox( this );
+ TQVBox *topFrame = new TQVBox( this );
topTopLayout->addWidget( topFrame );
topFrame->setSpacing( KDialog::spacingHint() );
KPrefsWidBool *emailControlCenter =
addWidBool( KOPrefs::instance()->emailControlCenterItem(), topFrame );
- connect(emailControlCenter->checkBox(),SIGNAL(toggled(bool)),
- SLOT(toggleEmailSettings(bool)));
+ connect(emailControlCenter->checkBox(),TQT_SIGNAL(toggled(bool)),
+ TQT_SLOT(toggleEmailSettings(bool)));
- mUserEmailSettings = new QGrid( 2, topFrame );
+ mUserEmailSettings = new TQGrid( 2, topFrame );
addWidString( KOPrefs::instance()->userNameItem(), mUserEmailSettings );
addWidString( KOPrefs::instance()->userEmailItem(), mUserEmailSettings );
- QGroupBox *saveGroup = new QGroupBox(1,Horizontal,i18n("Saving Calendar"),
+ TQGroupBox *saveGroup = new TQGroupBox(1,Horizontal,i18n("Saving Calendar"),
topFrame);
addWidBool( KOPrefs::instance()->htmlWithSaveItem(), saveGroup );
KPrefsWidBool *autoSave = addWidBool( KOPrefs::instance()->autoSaveItem(), saveGroup );
- QHBox *intervalBox = new QHBox( saveGroup );
+ TQHBox *intervalBox = new TQHBox( saveGroup );
addWidInt( KOPrefs::instance()->autoSaveIntervalItem(), intervalBox );
- connect( autoSave->checkBox(), SIGNAL( toggled( bool ) ),
- intervalBox, SLOT( setEnabled( bool ) ) );
+ connect( autoSave->checkBox(), TQT_SIGNAL( toggled( bool ) ),
+ intervalBox, TQT_SLOT( setEnabled( bool ) ) );
intervalBox->setSpacing( KDialog::spacingHint() );
- new QWidget( intervalBox );
+ new TQWidget( intervalBox );
addWidBool( KOPrefs::instance()->confirmItem(), topFrame );
addWidRadios( KOPrefs::instance()->destinationItem(), topFrame);
@@ -134,7 +134,7 @@ void KOPrefsDialogMain::toggleEmailSettings( bool on )
extern "C"
{
- KDE_EXPORT KCModule *create_korganizerconfigmain( QWidget *parent, const char * )
+ KDE_EXPORT KCModule *create_korganizerconfigmain( TQWidget *parent, const char * )
{
return new KOPrefsDialogMain( parent, "kcmkorganizermain" );
}
@@ -144,37 +144,37 @@ extern "C"
class KOPrefsDialogTime : public KPrefsModule
{
public:
- KOPrefsDialogTime( QWidget *parent, const char *name )
+ KOPrefsDialogTime( TQWidget *parent, const char *name )
: KPrefsModule( KOPrefs::instance(), parent, name )
{
- QBoxLayout *topTopLayout = new QVBoxLayout( this );
+ TQBoxLayout *topTopLayout = new TQVBoxLayout( this );
- QWidget *topFrame = new QWidget( this );
+ TQWidget *topFrame = new TQWidget( this );
topTopLayout->addWidget( topFrame );
- QGridLayout *topLayout = new QGridLayout(topFrame,6,2);
+ TQGridLayout *topLayout = new TQGridLayout(topFrame,6,2);
topLayout->setSpacing( KDialog::spacingHint() );
- QHBox *timeZoneBox = new QHBox( topFrame );
+ TQHBox *timeZoneBox = new TQHBox( topFrame );
topLayout->addMultiCellWidget( timeZoneBox, 0, 0, 0, 1 );
- QLabel *timeZoneLabel = new QLabel( i18n("Timezone:"), timeZoneBox );
- QString whatsThis = i18n( "Select your timezone from the list of "
+ TQLabel *timeZoneLabel = new TQLabel( i18n("Timezone:"), timeZoneBox );
+ TQString whatsThis = i18n( "Select your timezone from the list of "
"locations on this drop down box. If your city "
"is not listed, select one which shares the "
"same timezone. KOrganizer will automatically "
"adjust for daylight savings." );
- QWhatsThis::add( timeZoneLabel, whatsThis );
- mTimeZoneCombo = new QComboBox( timeZoneBox );
+ TQWhatsThis::add( timeZoneLabel, whatsThis );
+ mTimeZoneCombo = new TQComboBox( timeZoneBox );
- connect( mTimeZoneCombo, SIGNAL( activated( int ) ),
- SLOT( slotWidChanged() ) );
+ connect( mTimeZoneCombo, TQT_SIGNAL( activated( int ) ),
+ TQT_SLOT( slotWidChanged() ) );
FILE *f;
char tempstring[101] = "Unknown";
- QString sCurrentlySet(i18n("Unknown"));
+ TQString sCurrentlySet(i18n("Unknown"));
int nCurrentlySet = 0;
- QStringList list;
+ TQStringList list;
// read the currently set time zone
#if defined(USE_SOLARIS) // MARCO
@@ -189,7 +189,7 @@ class KOPrefsDialogTime : public KPrefsModule
if (fgets(buf, MAXPATHLEN - 1, f) != NULL)
{
buf[strlen(buf) - 1] = '\0';
- sCurrentlySet = QString(buf);
+ sCurrentlySet = TQString(buf);
}
pclose(f);
}
@@ -198,7 +198,7 @@ class KOPrefsDialogTime : public KPrefsModule
// get the currently set timezone
fgets(tempstring, 100, f);
tempstring[strlen(tempstring) - 1] = '\0';
- sCurrentlySet = QString(tempstring);
+ sCurrentlySet = TQString(tempstring);
fclose(f);
}
#endif // !USE_SOLARIS
@@ -246,34 +246,34 @@ class KOPrefsDialogTime : public KPrefsModule
}
mTimeZoneCombo->setCurrentItem(nCurrentlySet);
- QWhatsThis::add( mTimeZoneCombo, whatsThis );
+ TQWhatsThis::add( mTimeZoneCombo, whatsThis );
// holiday region selection
- QHBox *holidayRegBox = new QHBox( topFrame );
+ TQHBox *holidayRegBox = new TQHBox( topFrame );
topLayout->addMultiCellWidget( holidayRegBox, 1, 1, 0, 1 );
- QLabel *holidayLabel = new QLabel( i18n( "Use holiday region:" ), holidayRegBox );
+ TQLabel *holidayLabel = new TQLabel( i18n( "Use holiday region:" ), holidayRegBox );
whatsThis = i18n( "Select from which region you want to use the "
"holidays here. Defined holidays are shown as "
"non-working days in the date navigator, the "
"agenda view, etc." );
- QWhatsThis::add( holidayLabel, whatsThis );
+ TQWhatsThis::add( holidayLabel, whatsThis );
- mHolidayCombo = new QComboBox( holidayRegBox );
- connect( mHolidayCombo, SIGNAL( activated( int ) ),
- SLOT( slotWidChanged() ) );
+ mHolidayCombo = new TQComboBox( holidayRegBox );
+ connect( mHolidayCombo, TQT_SIGNAL( activated( int ) ),
+ TQT_SLOT( slotWidChanged() ) );
- QWhatsThis::add( mHolidayCombo, whatsThis );
+ TQWhatsThis::add( mHolidayCombo, whatsThis );
- QString currentHolidayName;
- QStringList holidayList;
- QStringList countryList = KHolidays::locations();
- QStringList::ConstIterator it;
+ TQString currentHolidayName;
+ TQStringList holidayList;
+ TQStringList countryList = KHolidays::locations();
+ TQStringList::ConstIterator it;
for ( it = countryList.begin(); it != countryList.end(); ++it ) {
- QString countryFile = locate( "locale",
+ TQString countryFile = locate( "locale",
"l10n/" + (*it) + "/entry.desktop" );
- QString regionName;
+ TQString regionName;
if ( !countryFile.isEmpty() ) {
KSimpleConfig cfg( countryFile );
cfg.setGroup( "KCM Locale" );
@@ -315,60 +315,60 @@ class KOPrefsDialogTime : public KPrefsModule
topLayout->addWidget( defaultDuration->label(), 4, 0 );
topLayout->addWidget( defaultDuration->timeEdit(), 4, 1 );
- QStringList alarmList;
+ TQStringList alarmList;
alarmList << i18n( "1 minute" ) << i18n( "5 minutes" )
<< i18n( "10 minutes" ) << i18n( "15 minutes" )
<< i18n( "30 minutes" );
- QLabel *alarmLabel = new QLabel( i18n( "Default reminder time:" ), topFrame);
+ TQLabel *alarmLabel = new TQLabel( i18n( "Default reminder time:" ), topFrame);
topLayout->addWidget( alarmLabel, 5, 0 );
- QWhatsThis::add( alarmLabel,
+ TQWhatsThis::add( alarmLabel,
i18n( "Enter the default reminder time here." ) );
- mAlarmTimeCombo = new QComboBox( topFrame );
- QWhatsThis::add( mAlarmTimeCombo,
+ mAlarmTimeCombo = new TQComboBox( topFrame );
+ TQWhatsThis::add( mAlarmTimeCombo,
i18n( "Enter the default reminder time here." ) );
- connect( mAlarmTimeCombo, SIGNAL( activated( int ) ),
- SLOT( slotWidChanged() ) );
+ connect( mAlarmTimeCombo, TQT_SIGNAL( activated( int ) ),
+ TQT_SLOT( slotWidChanged() ) );
mAlarmTimeCombo->insertStringList( alarmList );
topLayout->addWidget( mAlarmTimeCombo, 5, 1 );
- QLabel *alarmDefaultLabel = new QLabel( i18n( "Enable reminders by default:" ), topFrame);
+ TQLabel *alarmDefaultLabel = new TQLabel( i18n( "Enable reminders by default:" ), topFrame);
topLayout->addWidget( alarmDefaultLabel, 6, 0 );
- mAlarmTimeDefaultCheckBox = new QCheckBox( topFrame );
+ mAlarmTimeDefaultCheckBox = new TQCheckBox( topFrame );
topLayout->addWidget( mAlarmTimeDefaultCheckBox, 6, 1 );
- connect( mAlarmTimeDefaultCheckBox, SIGNAL( toggled( bool ) ),
- SLOT( slotWidChanged() ) );
+ connect( mAlarmTimeDefaultCheckBox, TQT_SIGNAL( toggled( bool ) ),
+ TQT_SLOT( slotWidChanged() ) );
- QGroupBox *workingHoursGroup = new QGroupBox(1,Horizontal,
+ TQGroupBox *workingHoursGroup = new TQGroupBox(1,Horizontal,
i18n("Working Hours"),
topFrame);
topLayout->addMultiCellWidget( workingHoursGroup, 7, 7, 0, 1 );
- QHBox *workDaysBox = new QHBox( workingHoursGroup );
+ TQHBox *workDaysBox = new TQHBox( workingHoursGroup );
// Respect start of week setting
int weekStart=KGlobal::locale()->weekStartDay();
for ( int i = 0; i < 7; ++i ) {
const KCalendarSystem *calSys = KOGlobals::self()->calendarSystem();
- QString weekDayName = calSys->weekDayName( (i + weekStart + 6)%7 + 1, true );
+ TQString weekDayName = calSys->weekDayName( (i + weekStart + 6)%7 + 1, true );
if ( KOPrefs::instance()->mCompactDialogs ) {
weekDayName = weekDayName.left( 1 );
}
int index = ( i + weekStart + 6 ) % 7;
- mWorkDays[ index ] = new QCheckBox( weekDayName, workDaysBox );
- QWhatsThis::add( mWorkDays[ index ],
+ mWorkDays[ index ] = new TQCheckBox( weekDayName, workDaysBox );
+ TQWhatsThis::add( mWorkDays[ index ],
i18n( "Check this box to make KOrganizer mark the "
"working hours for this day of the week. "
"If this is a work day for you, check "
"this box, or the working hours will not be "
"marked with color." ) );
- connect( mWorkDays[ index ], SIGNAL( stateChanged( int ) ),
- SLOT( slotWidChanged() ) );
+ connect( mWorkDays[ index ], TQT_SIGNAL( stateChanged( int ) ),
+ TQT_SLOT( slotWidChanged() ) );
}
- QHBox *workStartBox = new QHBox(workingHoursGroup);
+ TQHBox *workStartBox = new TQHBox(workingHoursGroup);
addWidTime( KOPrefs::instance()->workingHoursStartItem(), workStartBox );
- QHBox *workEndBox = new QHBox(workingHoursGroup);
+ TQHBox *workEndBox = new TQHBox(workingHoursGroup);
addWidTime( KOPrefs::instance()->workingHoursEndItem(), workEndBox );
@@ -396,7 +396,7 @@ class KOPrefsDialogTime : public KPrefsModule
void usrWriteConfig()
{
// Find untranslated selected zone
- QStringList::Iterator tz;
+ TQStringList::Iterator tz;
for ( tz = tzonenames.begin(); tz != tzonenames.end(); ++tz )
if (mTimeZoneCombo->currentText() == i18n((*tz).utf8()))
break;
@@ -406,7 +406,7 @@ class KOPrefsDialogTime : public KPrefsModule
KOPrefs::instance()->mTimeZoneId = mTimeZoneCombo->currentText();
KOPrefs::instance()->mHolidays = ( mHolidayCombo->currentItem() == 0 ) ? // (None)
- QString::null :
+ TQString::null :
mRegionMap[mHolidayCombo->currentText()];
KOPrefs::instance()->mAlarmTime = mAlarmTimeCombo->currentItem();
@@ -419,8 +419,8 @@ class KOPrefsDialogTime : public KPrefsModule
KOPrefs::instance()->writeConfig();
}
- void setCombo( QComboBox *combo, const QString &text,
- const QStringList *tags = 0 )
+ void setCombo( TQComboBox *combo, const TQString &text,
+ const TQStringList *tags = 0 )
{
if (tags) {
int i = tags->findIndex(text);
@@ -436,18 +436,18 @@ class KOPrefsDialogTime : public KPrefsModule
}
private:
- QComboBox *mTimeZoneCombo;
- QStringList tzonenames;
- QComboBox *mHolidayCombo;
- QMap<QString,QString> mRegionMap;
- QComboBox *mAlarmTimeCombo;
- QCheckBox *mAlarmTimeDefaultCheckBox;
- QCheckBox *mWorkDays[7];
+ TQComboBox *mTimeZoneCombo;
+ TQStringList tzonenames;
+ TQComboBox *mHolidayCombo;
+ TQMap<TQString,TQString> mRegionMap;
+ TQComboBox *mAlarmTimeCombo;
+ TQCheckBox *mAlarmTimeDefaultCheckBox;
+ TQCheckBox *mWorkDays[7];
};
extern "C"
{
- KCModule *create_korganizerconfigtime( QWidget *parent, const char * )
+ KCModule *create_korganizerconfigtime( TQWidget *parent, const char * )
{
KGlobal::locale()->insertCatalogue( "timezones" );
return new KOPrefsDialogTime( parent, "kcmkorganizertime" );
@@ -458,15 +458,15 @@ extern "C"
class KOPrefsDialogViews : public KPrefsModule
{
public:
- KOPrefsDialogViews( QWidget *parent, const char *name )
+ KOPrefsDialogViews( TQWidget *parent, const char *name )
: KPrefsModule( KOPrefs::instance(), parent, name )
{
- QBoxLayout *topTopLayout = new QVBoxLayout( this );
+ TQBoxLayout *topTopLayout = new TQVBoxLayout( this );
- QWidget *topFrame = new QWidget( this );
+ TQWidget *topFrame = new TQWidget( this );
topTopLayout->addWidget( topFrame );
- QBoxLayout *topLayout = new QVBoxLayout( topFrame );
+ TQBoxLayout *topLayout = new TQVBoxLayout( topFrame );
topLayout->setSpacing( KDialog::spacingHint() );
KPrefsWidBool *enableToolTips =
@@ -478,7 +478,7 @@ class KOPrefsDialogViews : public KPrefsModule
topLayout->addWidget( showTodosAgenda->checkBox() );
/*** Date Navigator Group ***/
- QGroupBox *dateNavGroup = new QGroupBox( 1, Horizontal,
+ TQGroupBox *dateNavGroup = new TQGroupBox( 1, Horizontal,
i18n("Date Navigator"),
topFrame );
addWidBool( KOPrefs::instance()->dailyRecurItem(), dateNavGroup );
@@ -487,30 +487,30 @@ class KOPrefsDialogViews : public KPrefsModule
/*** Agenda View Group ***/
- QGroupBox *agendaGroup = new QGroupBox( 1, Horizontal,
+ TQGroupBox *agendaGroup = new TQGroupBox( 1, Horizontal,
i18n("Agenda View"),
topFrame );
- QHBox *hourSizeBox = new QHBox( agendaGroup );
+ TQHBox *hourSizeBox = new TQHBox( agendaGroup );
KPrefsWidInt *hourSize =
addWidInt( KOPrefs::instance()->hourSizeItem(), hourSizeBox );
hourSize->spinBox()->setSuffix(i18n("suffix in the hour size spin box", " pixel"));
// horizontal spacer:
- new QWidget( hourSizeBox );
+ new TQWidget( hourSizeBox );
- QHBox *nextDaysBox = new QHBox( agendaGroup );
+ TQHBox *nextDaysBox = new TQHBox( agendaGroup );
KPrefsWidInt *nextDays =
addWidInt( KOPrefs::instance()->nextXDaysItem(), nextDaysBox );
nextDays->spinBox()->setSuffix(i18n("suffix in the N days spin box", " days"));
- new QWidget( nextDaysBox );
+ new TQWidget( nextDaysBox );
KPrefsWidBool *marcusBainsEnabled =
addWidBool( KOPrefs::instance()->marcusBainsEnabledItem(), agendaGroup );
KPrefsWidBool *marcusBainsShowSeconds =
addWidBool( KOPrefs::instance()->marcusBainsShowSecondsItem(), agendaGroup );
- connect( marcusBainsEnabled->checkBox(), SIGNAL( toggled( bool ) ),
- marcusBainsShowSeconds->checkBox(), SLOT( setEnabled( bool ) ) );
+ connect( marcusBainsEnabled->checkBox(), TQT_SIGNAL( toggled( bool ) ),
+ marcusBainsShowSeconds->checkBox(), TQT_SLOT( setEnabled( bool ) ) );
addWidBool( KOPrefs::instance()->selectionStartsEditorItem(), agendaGroup );
@@ -521,11 +521,11 @@ class KOPrefsDialogViews : public KPrefsModule
topLayout->addWidget( agendaGroup );
/*** Month and Todo view groups side by side, to save space. ***/
- QHBoxLayout *hbox = new QHBoxLayout();
+ TQHBoxLayout *hbox = new TQHBoxLayout();
topLayout->addLayout( hbox );
/*** Month View Group ***/
- QGroupBox *monthGroup = new QGroupBox( 1, Horizontal,
+ TQGroupBox *monthGroup = new TQGroupBox( 1, Horizontal,
i18n("Month View"),
topFrame );
addWidBool( KOPrefs::instance()->enableMonthScrollItem(), monthGroup );
@@ -537,7 +537,7 @@ class KOPrefsDialogViews : public KPrefsModule
/*** Todo View Group ***/
- QGroupBox *todoGroup = new QGroupBox( 1, Horizontal,
+ TQGroupBox *todoGroup = new TQGroupBox( 1, Horizontal,
i18n("To-do View"),
topFrame );
addWidBool( KOPrefs::instance()->fullViewTodoItem(), todoGroup );
@@ -552,7 +552,7 @@ class KOPrefsDialogViews : public KPrefsModule
extern "C"
{
- KCModule *create_korganizerconfigviews( QWidget *parent, const char * )
+ KCModule *create_korganizerconfigviews( TQWidget *parent, const char * )
{
return new KOPrefsDialogViews( parent, "kcmkorganizerviews" );
}
@@ -562,27 +562,27 @@ extern "C"
class KOPrefsDialogFonts : public KPrefsModule
{
public:
- KOPrefsDialogFonts( QWidget *parent, const char *name )
+ KOPrefsDialogFonts( TQWidget *parent, const char *name )
: KPrefsModule( KOPrefs::instance(), parent, name )
{
- QBoxLayout *topTopLayout = new QVBoxLayout( this );
+ TQBoxLayout *topTopLayout = new TQVBoxLayout( this );
- QWidget *topFrame = new QWidget( this );
+ TQWidget *topFrame = new TQWidget( this );
topTopLayout->addWidget( topFrame );
- QGridLayout *topLayout = new QGridLayout(topFrame,5,3);
+ TQGridLayout *topLayout = new TQGridLayout(topFrame,5,3);
topLayout->setSpacing( KDialog::spacingHint() );
KPrefsWidFont *timeBarFont =
addWidFont( KOPrefs::instance()->timeBarFontItem(), topFrame,
- KGlobal::locale()->formatTime( QTime( 12, 34 ) ) );
+ KGlobal::locale()->formatTime( TQTime( 12, 34 ) ) );
topLayout->addWidget(timeBarFont->label(),0,0);
topLayout->addWidget(timeBarFont->preview(),0,1);
topLayout->addWidget(timeBarFont->button(),0,2);
KPrefsWidFont *monthViewFont =
addWidFont( KOPrefs::instance()->monthViewFontItem(), topFrame,
- KGlobal::locale()->formatTime(QTime(12,34)) + " " +
+ KGlobal::locale()->formatTime(TQTime(12,34)) + " " +
i18n("Event text") );
topLayout->addWidget(monthViewFont->label(),1,0);
@@ -598,7 +598,7 @@ class KOPrefsDialogFonts : public KPrefsModule
KPrefsWidFont *marcusBainsFont =
addWidFont( KOPrefs::instance()->marcusBainsFontItem(), topFrame,
- KGlobal::locale()->formatTime( QTime( 12, 34, 23 ) ) );
+ KGlobal::locale()->formatTime( TQTime( 12, 34, 23 ) ) );
topLayout->addWidget(marcusBainsFont->label(),3,0);
topLayout->addWidget(marcusBainsFont->preview(),3,1);
topLayout->addWidget(marcusBainsFont->button(),3,2);
@@ -612,22 +612,22 @@ class KOPrefsDialogFonts : public KPrefsModule
extern "C"
{
- KCModule *create_korganizerconfigfonts( QWidget *parent, const char * )
+ KCModule *create_korganizerconfigfonts( TQWidget *parent, const char * )
{
return new KOPrefsDialogFonts( parent, "kcmkorganizerfonts" );
}
}
-KOPrefsDialogColors::KOPrefsDialogColors( QWidget *parent, const char *name )
+KOPrefsDialogColors::KOPrefsDialogColors( TQWidget *parent, const char *name )
: KPrefsModule( KOPrefs::instance(), parent, name )
{
- QBoxLayout *topTopLayout = new QVBoxLayout( this );
+ TQBoxLayout *topTopLayout = new TQVBoxLayout( this );
- QWidget *topFrame = new QWidget( this );
+ TQWidget *topFrame = new TQWidget( this );
topTopLayout->addWidget( topFrame );
- QGridLayout *topLayout = new QGridLayout(topFrame,7,2);
+ TQGridLayout *topLayout = new TQGridLayout(topFrame,7,2);
topLayout->setSpacing( KDialog::spacingHint() );
// Holiday Color
@@ -672,42 +672,42 @@ KOPrefsDialogColors::KOPrefsDialogColors( QWidget *parent, const char *name )
topLayout->addWidget(todoOverdueColor->button(),6,1);
// categories colors
- QGroupBox *categoryGroup = new QGroupBox(1,Horizontal,i18n("Categories"),
+ TQGroupBox *categoryGroup = new TQGroupBox(1,Horizontal,i18n("Categories"),
topFrame);
topLayout->addMultiCellWidget(categoryGroup,7,7,0,1);
- mCategoryCombo = new QComboBox(categoryGroup);
+ mCategoryCombo = new TQComboBox(categoryGroup);
mCategoryCombo->insertStringList(KOPrefs::instance()->mCustomCategories);
- QWhatsThis::add( mCategoryCombo,
+ TQWhatsThis::add( mCategoryCombo,
i18n( "Select here the event category you want to modify. "
"You can change the selected category color using "
"the button below." ) );
- connect(mCategoryCombo,SIGNAL(activated(int)),SLOT(updateCategoryColor()));
+ connect(mCategoryCombo,TQT_SIGNAL(activated(int)),TQT_SLOT(updateCategoryColor()));
mCategoryButton = new KColorButton(categoryGroup);
- QWhatsThis::add( mCategoryButton,
+ TQWhatsThis::add( mCategoryButton,
i18n( "Choose here the color of the event category selected "
"using the combo box above." ) );
- connect(mCategoryButton,SIGNAL(changed(const QColor &)),SLOT(setCategoryColor()));
+ connect(mCategoryButton,TQT_SIGNAL(changed(const TQColor &)),TQT_SLOT(setCategoryColor()));
updateCategoryColor();
// resources colors
- QGroupBox *resourceGroup = new QGroupBox(1,Horizontal,i18n("Resources"),
+ TQGroupBox *resourceGroup = new TQGroupBox(1,Horizontal,i18n("Resources"),
topFrame);
topLayout->addMultiCellWidget(resourceGroup,8,8,0,1);
- mResourceCombo = new QComboBox(resourceGroup);
- QWhatsThis::add( mResourceCombo,
+ mResourceCombo = new TQComboBox(resourceGroup);
+ TQWhatsThis::add( mResourceCombo,
i18n( "Select here resource you want to modify. "
"You can change the selected resource color using "
"the button below." ) );
- connect(mResourceCombo,SIGNAL(activated(int)),SLOT(updateResourceColor()));
+ connect(mResourceCombo,TQT_SIGNAL(activated(int)),TQT_SLOT(updateResourceColor()));
mResourceButton = new KColorButton(resourceGroup);
- QWhatsThis::add( mResourceButton,
+ TQWhatsThis::add( mResourceButton,
i18n( "Choose here the color of the resource selected "
"using the combo box above." ) );
- connect(mResourceButton,SIGNAL(changed(const QColor &)),SLOT(setResourceColor()));
+ connect(mResourceButton,TQT_SIGNAL(changed(const TQColor &)),TQT_SLOT(setResourceColor()));
updateResources();
topLayout->setRowStretch(9,1);
@@ -717,13 +717,13 @@ KOPrefsDialogColors::KOPrefsDialogColors( QWidget *parent, const char *name )
void KOPrefsDialogColors::usrWriteConfig()
{
- QDictIterator<QColor> itCat(mCategoryDict);
+ TQDictIterator<TQColor> itCat(mCategoryDict);
while (itCat.current()) {
KOPrefs::instance()->setCategoryColor(itCat.currentKey(),*itCat.current());
++itCat;
}
- QDictIterator<QColor> itRes(mResourceDict);
+ TQDictIterator<TQColor> itRes(mResourceDict);
while (itRes.current()) {
KOPrefs::instance()->setResourceColor(itRes.currentKey(),*itRes.current());
++itRes;
@@ -745,14 +745,14 @@ void KOPrefsDialogColors::updateCategories()
void KOPrefsDialogColors::setCategoryColor()
{
- mCategoryDict.replace(mCategoryCombo->currentText(), new QColor(mCategoryButton->color()));
+ mCategoryDict.replace(mCategoryCombo->currentText(), new TQColor(mCategoryButton->color()));
slotWidChanged();
}
void KOPrefsDialogColors::updateCategoryColor()
{
- QString cat = mCategoryCombo->currentText();
- QColor *color = mCategoryDict.find(cat);
+ TQString cat = mCategoryCombo->currentText();
+ TQColor *color = mCategoryDict.find(cat);
if (!color) {
color = KOPrefs::instance()->categoryColor(cat);
}
@@ -773,9 +773,9 @@ void KOPrefsDialogColors::updateResources()
KCal::CalendarResourceManager::Iterator it;
for( it = manager->begin(); it != manager->end(); ++it ) {
if ( !(*it)->subresources().isEmpty() ) {
- QStringList subresources = (*it)->subresources();
+ TQStringList subresources = (*it)->subresources();
for ( uint i = 0; i < subresources.count(); ++i ) {
- QString resource = subresources[ i ];
+ TQString resource = subresources[ i ];
if ( (*it)->subresourceActive( resource ) ) {
mResourceCombo->insertItem( (*it)->labelForSubresource( resource ) );
mResourceIdentifier.append( resource );
@@ -795,15 +795,15 @@ void KOPrefsDialogColors::setResourceColor()
kdDebug( 5850) << "KOPrefsDialogColors::setResorceColor()" << endl;
mResourceDict.replace( mResourceIdentifier[mResourceCombo->currentItem()],
- new QColor( mResourceButton->color() ) );
+ new TQColor( mResourceButton->color() ) );
slotWidChanged();
}
void KOPrefsDialogColors::updateResourceColor()
{
kdDebug( 5850 ) << "KOPrefsDialogColors::updateResourceColor()" << endl;
- QString res= mResourceIdentifier[mResourceCombo->currentItem()];
- QColor *color = mCategoryDict.find(res);
+ TQString res= mResourceIdentifier[mResourceCombo->currentItem()];
+ TQColor *color = mCategoryDict.find(res);
if( !color ) {
color = KOPrefs::instance()->resourceColor( res );
}
@@ -813,22 +813,22 @@ void KOPrefsDialogColors::updateResourceColor()
}
extern "C"
{
- KCModule *create_korganizerconfigcolors( QWidget *parent, const char * )
+ KCModule *create_korganizerconfigcolors( TQWidget *parent, const char * )
{
return new KOPrefsDialogColors( parent, "kcmkorganizercolors" );
}
}
-KOPrefsDialogGroupScheduling::KOPrefsDialogGroupScheduling( QWidget *parent, const char *name )
+KOPrefsDialogGroupScheduling::KOPrefsDialogGroupScheduling( TQWidget *parent, const char *name )
: KPrefsModule( KOPrefs::instance(), parent, name )
{
- QBoxLayout *topTopLayout = new QVBoxLayout( this );
+ TQBoxLayout *topTopLayout = new TQVBoxLayout( this );
- QWidget *topFrame = new QWidget( this );
+ TQWidget *topFrame = new TQWidget( this );
topTopLayout->addWidget( topFrame );
- QGridLayout *topLayout = new QGridLayout(topFrame,6,2);
+ TQGridLayout *topLayout = new TQGridLayout(topFrame,6,2);
topLayout->setSpacing( KDialog::spacingHint() );
KPrefsWidBool *useGroupwareBool =
@@ -836,8 +836,8 @@ KOPrefsDialogGroupScheduling::KOPrefsDialogGroupScheduling( QWidget *parent, con
topFrame );
topLayout->addMultiCellWidget(useGroupwareBool->checkBox(),0,0,0,1);
// FIXME: This radio button should only be available when KMail is chosen
-// connect(thekmailradiobuttonupthere,SIGNAL(toggled(bool)),
-// useGroupwareBool->checkBox(), SLOT(enabled(bool)));
+// connect(thekmailradiobuttonupthere,TQT_SIGNAL(toggled(bool)),
+// useGroupwareBool->checkBox(), TQT_SLOT(enabled(bool)));
KPrefsWidBool *bcc =
addWidBool( KOPrefs::instance()->bccItem(), topFrame );
@@ -858,50 +858,50 @@ KOPrefsDialogGroupScheduling::KOPrefsDialogGroupScheduling( QWidget *parent, con
topLayout->addMultiCellWidget(schedulerGroup->groupBox(),0,0,0,1);
#endif
- QLabel *aMailsLabel = new QLabel(i18n("Additional email addresses:"),topFrame);
- QString whatsThis = i18n( "Add, edit or remove additional e-mails addresses "
+ TQLabel *aMailsLabel = new TQLabel(i18n("Additional email addresses:"),topFrame);
+ TQString whatsThis = i18n( "Add, edit or remove additional e-mails addresses "
"here. These email addresses are the ones you "
"have in addition to the one set in personal "
"preferences. If you are an attendee of one event, "
"but use another email address there, you need to "
"list this address here so KOrganizer can "
"recognize it as yours." );
- QWhatsThis::add( aMailsLabel, whatsThis );
+ TQWhatsThis::add( aMailsLabel, whatsThis );
topLayout->addMultiCellWidget(aMailsLabel,3,3,0,1);
- mAMails = new QListView(topFrame);
- QWhatsThis::add( mAMails, whatsThis );
+ mAMails = new TQListView(topFrame);
+ TQWhatsThis::add( mAMails, whatsThis );
mAMails->addColumn(i18n("Email"),300);
topLayout->addMultiCellWidget(mAMails,4,4,0,1);
- QLabel *aEmailsEditLabel = new QLabel(i18n("Additional email address:"),topFrame);
+ TQLabel *aEmailsEditLabel = new TQLabel(i18n("Additional email address:"),topFrame);
whatsThis = i18n( "Edit additional e-mails addresses here. To edit an "
"address select it from the list above "
"or press the \"New\" button below. These email "
"addresses are the ones you have in addition to the "
"one set in personal preferences." );
- QWhatsThis::add( aEmailsEditLabel, whatsThis );
+ TQWhatsThis::add( aEmailsEditLabel, whatsThis );
topLayout->addWidget(aEmailsEditLabel,5,0);
- aEmailsEdit = new QLineEdit(topFrame);
- QWhatsThis::add( aEmailsEdit, whatsThis );
+ aEmailsEdit = new TQLineEdit(topFrame);
+ TQWhatsThis::add( aEmailsEdit, whatsThis );
aEmailsEdit->setEnabled(false);
topLayout->addWidget(aEmailsEdit,5,1);
- QPushButton *add = new QPushButton(i18n("New"),topFrame,"new");
+ TQPushButton *add = new TQPushButton(i18n("New"),topFrame,"new");
whatsThis = i18n( "Press this button to add a new entry to the "
"additional e-mail addresses list. Use the edit "
"box above to edit the new entry." );
- QWhatsThis::add( add, whatsThis );
+ TQWhatsThis::add( add, whatsThis );
topLayout->addWidget(add,6,0);
- QPushButton *del = new QPushButton(i18n("Remove"),topFrame,"remove");
- QWhatsThis::add( del, whatsThis );
+ TQPushButton *del = new TQPushButton(i18n("Remove"),topFrame,"remove");
+ TQWhatsThis::add( del, whatsThis );
topLayout->addWidget(del,6,1);
//topLayout->setRowStretch(2,1);
- connect(add, SIGNAL( clicked() ), this, SLOT(addItem()) );
- connect(del, SIGNAL( clicked() ), this, SLOT(removeItem()) );
- connect(aEmailsEdit,SIGNAL( textChanged(const QString&) ), this,SLOT(updateItem()));
- connect(mAMails,SIGNAL(selectionChanged(QListViewItem *)),SLOT(updateInput()));
+ connect(add, TQT_SIGNAL( clicked() ), this, TQT_SLOT(addItem()) );
+ connect(del, TQT_SIGNAL( clicked() ), this, TQT_SLOT(removeItem()) );
+ connect(aEmailsEdit,TQT_SIGNAL( textChanged(const TQString&) ), this,TQT_SLOT(updateItem()));
+ connect(mAMails,TQT_SIGNAL(selectionChanged(TQListViewItem *)),TQT_SLOT(updateInput()));
load();
}
@@ -909,9 +909,9 @@ KOPrefsDialogGroupScheduling::KOPrefsDialogGroupScheduling( QWidget *parent, con
void KOPrefsDialogGroupScheduling::usrReadConfig()
{
mAMails->clear();
- for ( QStringList::Iterator it = KOPrefs::instance()->mAdditionalMails.begin();
+ for ( TQStringList::Iterator it = KOPrefs::instance()->mAdditionalMails.begin();
it != KOPrefs::instance()->mAdditionalMails.end(); ++it ) {
- QListViewItem *item = new QListViewItem(mAMails);
+ TQListViewItem *item = new TQListViewItem(mAMails);
item->setText(0,*it);
mAMails->insertItem(item);
}
@@ -920,7 +920,7 @@ void KOPrefsDialogGroupScheduling::usrReadConfig()
void KOPrefsDialogGroupScheduling::usrWriteConfig()
{
KOPrefs::instance()->mAdditionalMails.clear();
- QListViewItem *item;
+ TQListViewItem *item;
item = mAMails->firstChild();
while (item)
{
@@ -932,7 +932,7 @@ void KOPrefsDialogGroupScheduling::usrWriteConfig()
void KOPrefsDialogGroupScheduling::addItem()
{
aEmailsEdit->setEnabled(true);
- QListViewItem *item = new QListViewItem(mAMails);
+ TQListViewItem *item = new TQListViewItem(mAMails);
mAMails->insertItem(item);
mAMails->setSelected(item,true);
aEmailsEdit->setText(i18n("(EmptyEmail)"));
@@ -941,7 +941,7 @@ void KOPrefsDialogGroupScheduling::addItem()
void KOPrefsDialogGroupScheduling::removeItem()
{
- QListViewItem *item;
+ TQListViewItem *item;
item = mAMails->selectedItem();
if (!item) return;
mAMails->takeItem(item);
@@ -958,7 +958,7 @@ void KOPrefsDialogGroupScheduling::removeItem()
void KOPrefsDialogGroupScheduling::updateItem()
{
- QListViewItem *item;
+ TQListViewItem *item;
item = mAMails->selectedItem();
if (!item) return;
item->setText(0,aEmailsEdit->text());
@@ -967,7 +967,7 @@ void KOPrefsDialogGroupScheduling::updateItem()
void KOPrefsDialogGroupScheduling::updateInput()
{
- QListViewItem *item;
+ TQListViewItem *item;
item = mAMails->selectedItem();
if (!item) return;
aEmailsEdit->setEnabled(true);
@@ -976,7 +976,7 @@ void KOPrefsDialogGroupScheduling::updateInput()
extern "C"
{
- KCModule *create_korganizerconfiggroupscheduling( QWidget *parent,
+ KCModule *create_korganizerconfiggroupscheduling( TQWidget *parent,
const char * )
{
return new KOPrefsDialogGroupScheduling( parent,
@@ -985,12 +985,12 @@ extern "C"
}
-KOPrefsDialogGroupwareScheduling::KOPrefsDialogGroupwareScheduling( QWidget *parent, const char *name )
+KOPrefsDialogGroupwareScheduling::KOPrefsDialogGroupwareScheduling( TQWidget *parent, const char *name )
: KPrefsModule( KOPrefs::instance(), parent, name )
{
mGroupwarePage = new KOGroupwarePrefsPage( this );
- connect( mGroupwarePage, SIGNAL( changed() ), SLOT( slotWidChanged() ) );
- ( new QVBoxLayout( this ) )->addWidget( mGroupwarePage );
+ connect( mGroupwarePage, TQT_SIGNAL( changed() ), TQT_SLOT( slotWidChanged() ) );
+ ( new TQVBoxLayout( this ) )->addWidget( mGroupwarePage );
load();
}
@@ -1035,7 +1035,7 @@ void KOPrefsDialogGroupwareScheduling::usrWriteConfig()
extern "C"
{
- KCModule *create_korganizerconfigfreebusy( QWidget *parent, const char * )
+ KCModule *create_korganizerconfigfreebusy( TQWidget *parent, const char * )
{
return new KOPrefsDialogGroupwareScheduling( parent,
"kcmkorganizerfreebusy" );
@@ -1044,10 +1044,10 @@ extern "C"
-class PluginItem : public QCheckListItem {
+class PluginItem : public TQCheckListItem {
public:
- PluginItem( QListView *parent, KService::Ptr service ) :
- QCheckListItem( parent, service->name(), QCheckListItem::CheckBox ), mService( service )
+ PluginItem( TQListView *parent, KService::Ptr service ) :
+ TQCheckListItem( parent, service->name(), TQCheckListItem::CheckBox ), mService( service )
{}
KService::Ptr service() { return mService; }
private:
@@ -1058,47 +1058,47 @@ class PluginItem : public QCheckListItem {
/**
Dialog for selecting and configuring KOrganizer plugins
*/
-KOPrefsDialogPlugins::KOPrefsDialogPlugins( QWidget *parent, const char* name )
+KOPrefsDialogPlugins::KOPrefsDialogPlugins( TQWidget *parent, const char* name )
: KPrefsModule( KOPrefs::instance(), parent, name )
{
- QBoxLayout *topTopLayout = new QVBoxLayout( this );
+ TQBoxLayout *topTopLayout = new TQVBoxLayout( this );
- QWidget *topFrame = new QWidget( this );
+ TQWidget *topFrame = new TQWidget( this );
topTopLayout->addWidget( topFrame );
- QBoxLayout *topLayout = new QVBoxLayout( topFrame );
+ TQBoxLayout *topLayout = new TQVBoxLayout( topFrame );
topLayout->setSpacing( KDialog::spacingHint() );
- mListView = new QListView( topFrame );
+ mListView = new TQListView( topFrame );
mListView->addColumn( i18n("Name") );
- mListView->setResizeMode( QListView::LastColumn );
+ mListView->setResizeMode( TQListView::LastColumn );
topLayout->addWidget( mListView );
- mDescription = new QLabel( topFrame );
- mDescription->setAlignment( QLabel::NoAccel | QLabel::WordBreak | QLabel::AlignVCenter );
- mDescription->setFrameShape( QLabel::Panel );
- mDescription->setFrameShadow( QLabel::Sunken );
- mDescription->setMinimumSize( QSize( 0, 55 ) );
+ mDescription = new TQLabel( topFrame );
+ mDescription->setAlignment( TQLabel::NoAccel | TQLabel::WordBreak | TQLabel::AlignVCenter );
+ mDescription->setFrameShape( TQLabel::Panel );
+ mDescription->setFrameShadow( TQLabel::Sunken );
+ mDescription->setMinimumSize( TQSize( 0, 55 ) );
mDescription->setSizePolicy(
- QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)0,
+ TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)0,
0, 0, mDescription->sizePolicy().hasHeightForWidth() ) );
topLayout->addWidget( mDescription );
- QWidget *buttonRow = new QWidget( topFrame );
- QBoxLayout *buttonRowLayout = new QHBoxLayout( buttonRow );
+ TQWidget *buttonRow = new TQWidget( topFrame );
+ TQBoxLayout *buttonRowLayout = new TQHBoxLayout( buttonRow );
mConfigureButton = new KPushButton( KGuiItem( i18n("Configure &Plugin..."),
- "configure", QString::null, i18n("This button allows you to configure"
+ "configure", TQString::null, i18n("This button allows you to configure"
" the plugin that you have selected in the list above") ), buttonRow );
buttonRowLayout->addWidget( mConfigureButton );
- buttonRowLayout->addItem( new QSpacerItem(1, 1, QSizePolicy::Expanding) );
+ buttonRowLayout->addItem( new TQSpacerItem(1, 1, TQSizePolicy::Expanding) );
topLayout->addWidget( buttonRow );
- connect( mConfigureButton, SIGNAL( clicked() ), SLOT( configure() ) );
+ connect( mConfigureButton, TQT_SIGNAL( clicked() ), TQT_SLOT( configure() ) );
- connect( mListView, SIGNAL( selectionChanged( QListViewItem* ) ),
- SLOT( selectionChanged( QListViewItem* ) ) );
- connect( mListView, SIGNAL( clicked( QListViewItem* ) ),
- SLOT( slotWidChanged() ) );
+ connect( mListView, TQT_SIGNAL( selectionChanged( TQListViewItem* ) ),
+ TQT_SLOT( selectionChanged( TQListViewItem* ) ) );
+ connect( mListView, TQT_SIGNAL( clicked( TQListViewItem* ) ),
+ TQT_SLOT( slotWidChanged() ) );
load();
// usrReadConfig();
@@ -1111,11 +1111,11 @@ void KOPrefsDialogPlugins::usrReadConfig()
KTrader::OfferList plugins = KOCore::self()->availablePlugins();
plugins += KOCore::self()->availableParts();
- QStringList selectedPlugins = KOPrefs::instance()->mSelectedPlugins;
+ TQStringList selectedPlugins = KOPrefs::instance()->mSelectedPlugins;
KTrader::OfferList::ConstIterator it;
for( it = plugins.begin(); it != plugins.end(); ++it ) {
- QCheckListItem *item = new PluginItem( mListView, *it );
+ TQCheckListItem *item = new PluginItem( mListView, *it );
if ( selectedPlugins.find( (*it)->desktopEntryName() ) !=
selectedPlugins.end() ) {
item->setOn( true );
@@ -1125,7 +1125,7 @@ void KOPrefsDialogPlugins::usrReadConfig()
void KOPrefsDialogPlugins::usrWriteConfig()
{
- QStringList selectedPlugins;
+ TQStringList selectedPlugins;
PluginItem *item = static_cast<PluginItem *>( mListView->firstChild() );
while( item ) {
@@ -1153,16 +1153,16 @@ void KOPrefsDialogPlugins::configure()
}
}
-void KOPrefsDialogPlugins::selectionChanged( QListViewItem *i )
+void KOPrefsDialogPlugins::selectionChanged( TQListViewItem *i )
{
PluginItem *item = dynamic_cast<PluginItem*>( i );
if ( !item ) {
mConfigureButton->setEnabled( false );
- mDescription->setText( QString::null );
+ mDescription->setText( TQString::null );
return;
}
- QVariant variant = item->service()->property( "X-KDE-KOrganizer-HasSettings" );
+ TQVariant variant = item->service()->property( "X-KDE-KOrganizer-HasSettings" );
bool hasSettings = true;
if ( variant.isValid() )
@@ -1176,7 +1176,7 @@ void KOPrefsDialogPlugins::selectionChanged( QListViewItem *i )
extern "C"
{
- KCModule *create_korganizerconfigplugins( QWidget *parent, const char * )
+ KCModule *create_korganizerconfigplugins( TQWidget *parent, const char * )
{
return new KOPrefsDialogPlugins( parent,
"kcmkorganizerplugins" );
@@ -1186,40 +1186,40 @@ extern "C"
extern "C"
{
- KCModule *create_korgdesignerfields( QWidget *parent, const char * ) {
+ KCModule *create_korgdesignerfields( TQWidget *parent, const char * ) {
return new KOPrefsDesignerFields( parent, "kcmkorgdesignerfields" );
}
}
-KOPrefsDesignerFields::KOPrefsDesignerFields( QWidget *parent, const char *name )
+KOPrefsDesignerFields::KOPrefsDesignerFields( TQWidget *parent, const char *name )
: KCMDesignerFields( parent, name )
{
}
-QString KOPrefsDesignerFields::localUiDir()
+TQString KOPrefsDesignerFields::localUiDir()
{
- QString dir = locateLocal( "data", "korganizer/designer/event/");
+ TQString dir = locateLocal( "data", "korganizer/designer/event/");
kdDebug() << "KOPrefsDesignerFields::localUiDir(): " << dir << endl;
return dir;
}
-QString KOPrefsDesignerFields::uiPath()
+TQString KOPrefsDesignerFields::uiPath()
{
return "korganizer/designer/event/";
}
-void KOPrefsDesignerFields::writeActivePages( const QStringList &activePages )
+void KOPrefsDesignerFields::writeActivePages( const TQStringList &activePages )
{
KOPrefs::instance()->setActiveDesignerFields( activePages );
KOPrefs::instance()->writeConfig();
}
-QStringList KOPrefsDesignerFields::readActivePages()
+TQStringList KOPrefsDesignerFields::readActivePages()
{
return KOPrefs::instance()->activeDesignerFields();
}
-QString KOPrefsDesignerFields::applicationName()
+TQString KOPrefsDesignerFields::applicationName()
{
return "KORGANIZER";
}
diff --git a/korganizer/koprefsdialog.h b/korganizer/koprefsdialog.h
index 797c50e5b..b412fff7e 100644
--- a/korganizer/koprefsdialog.h
+++ b/korganizer/koprefsdialog.h
@@ -27,7 +27,7 @@
#include <libkdepim/kprefsdialog.h>
#include <libkdepim/kcmdesignerfields.h>
-#include <qdict.h>
+#include <tqdict.h>
class QLineEdit;
class QLabel;
@@ -42,19 +42,19 @@ class KDE_EXPORT KOPrefsDialogMain : public KPrefsModule
{
Q_OBJECT
public:
- KOPrefsDialogMain( QWidget *parent, const char *name );
+ KOPrefsDialogMain( TQWidget *parent, const char *name );
protected slots:
void toggleEmailSettings( bool on );
private:
- QWidget *mUserEmailSettings;
+ TQWidget *mUserEmailSettings;
};
class KDE_EXPORT KOPrefsDialogColors : public KPrefsModule
{
Q_OBJECT
public:
- KOPrefsDialogColors( QWidget *parent, const char *name );
+ KOPrefsDialogColors( TQWidget *parent, const char *name );
protected:
void usrWriteConfig();
@@ -69,22 +69,22 @@ class KDE_EXPORT KOPrefsDialogColors : public KPrefsModule
void setResourceColor();
void updateResourceColor();
private:
- QComboBox *mCategoryCombo;
+ TQComboBox *mCategoryCombo;
KColorButton *mCategoryButton;
- QDict<QColor> mCategoryDict;
+ TQDict<TQColor> mCategoryDict;
- QComboBox *mResourceCombo;
+ TQComboBox *mResourceCombo;
KColorButton *mResourceButton;
- QDict<QColor> mResourceDict;
+ TQDict<TQColor> mResourceDict;
//For translation Identifier <->idx in Combo
- QStringList mResourceIdentifier;
+ TQStringList mResourceIdentifier;
};
class KDE_EXPORT KOPrefsDialogGroupScheduling : public KPrefsModule
{
Q_OBJECT
public:
- KOPrefsDialogGroupScheduling( QWidget *parent, const char *name );
+ KOPrefsDialogGroupScheduling( TQWidget *parent, const char *name );
protected:
void usrReadConfig();
@@ -97,8 +97,8 @@ class KDE_EXPORT KOPrefsDialogGroupScheduling : public KPrefsModule
void updateInput();
private:
- QListView *mAMails;
- QLineEdit *aEmailsEdit;
+ TQListView *mAMails;
+ TQLineEdit *aEmailsEdit;
};
class KOGroupwarePrefsPage;
@@ -107,7 +107,7 @@ class KDE_EXPORT KOPrefsDialogGroupwareScheduling : public KPrefsModule
{
Q_OBJECT
public:
- KOPrefsDialogGroupwareScheduling( QWidget *parent, const char *name );
+ KOPrefsDialogGroupwareScheduling( TQWidget *parent, const char *name );
protected:
void usrReadConfig();
@@ -121,32 +121,32 @@ class KDE_EXPORT KOPrefsDialogPlugins : public KPrefsModule
{
Q_OBJECT
public:
- KOPrefsDialogPlugins( QWidget *parent, const char *name );
+ KOPrefsDialogPlugins( TQWidget *parent, const char *name );
protected slots:
void usrReadConfig();
void usrWriteConfig();
void configure();
- void selectionChanged( QListViewItem* );
+ void selectionChanged( TQListViewItem* );
private:
void buildList();
- QListView *mListView;
- QLabel *mDescription;
+ TQListView *mListView;
+ TQLabel *mDescription;
KPushButton *mConfigureButton;
};
class KDE_EXPORT KOPrefsDesignerFields : public KPIM::KCMDesignerFields
{
public:
- KOPrefsDesignerFields( QWidget *parent = 0, const char *name = 0 );
+ KOPrefsDesignerFields( TQWidget *parent = 0, const char *name = 0 );
protected:
- QString localUiDir();
- QString uiPath();
- void writeActivePages( const QStringList & );
- QStringList readActivePages();
- QString applicationName();
+ TQString localUiDir();
+ TQString uiPath();
+ void writeActivePages( const TQStringList & );
+ TQStringList readActivePages();
+ TQString applicationName();
};
#endif
diff --git a/korganizer/korgac/alarmclientiface.h b/korganizer/korgac/alarmclientiface.h
index c4edd9f43..d7788a3b0 100644
--- a/korganizer/korgac/alarmclientiface.h
+++ b/korganizer/korgac/alarmclientiface.h
@@ -22,7 +22,7 @@
#define ALARMCLIENTIFACE_H
#include <dcopobject.h>
-#include <qstringlist.h>
+#include <tqstringlist.h>
class AlarmClientIface : virtual public DCOPObject
{
@@ -32,7 +32,7 @@ class AlarmClientIface : virtual public DCOPObject
virtual ASYNC forceAlarmCheck() = 0;
virtual ASYNC dumpDebug() = 0;
- virtual QStringList dumpAlarms() = 0;
+ virtual TQStringList dumpAlarms() = 0;
virtual void debugShowDialog() = 0;
};
diff --git a/korganizer/korgac/alarmdialog.cpp b/korganizer/korgac/alarmdialog.cpp
index 68e1822dc..6c9d62e90 100644
--- a/korganizer/korgac/alarmdialog.cpp
+++ b/korganizer/korgac/alarmdialog.cpp
@@ -22,15 +22,15 @@
without including the source code for Qt in the source distribution.
*/
-#include <qhbox.h>
-#include <qvbox.h>
-#include <qlabel.h>
-#include <qfile.h>
-#include <qspinbox.h>
-#include <qlayout.h>
-#include <qpushbutton.h>
-#include <qcstring.h>
-#include <qdatastream.h>
+#include <tqhbox.h>
+#include <tqvbox.h>
+#include <tqlabel.h>
+#include <tqfile.h>
+#include <tqspinbox.h>
+#include <tqlayout.h>
+#include <tqpushbutton.h>
+#include <tqcstring.h>
+#include <tqdatastream.h>
#include <kapplication.h>
#include <kconfig.h>
@@ -57,7 +57,7 @@
class AlarmListItem : public KListViewItem
{
public:
- AlarmListItem( Incidence *incidence, QListView *parent ) :
+ AlarmListItem( Incidence *incidence, TQListView *parent ) :
KListViewItem( parent ),
mIncidence( incidence->clone() ),
mNotified( false )
@@ -69,13 +69,13 @@ class AlarmListItem : public KListViewItem
}
Incidence *mIncidence;
- QDateTime mRemindAt;
+ TQDateTime mRemindAt;
bool mNotified;
};
-typedef QValueList<AlarmListItem*> ItemList;
+typedef TQValueList<AlarmListItem*> ItemList;
-AlarmDialog::AlarmDialog( QWidget *parent, const char *name )
+AlarmDialog::AlarmDialog( TQWidget *parent, const char *name )
: KDialogBase( Plain, WType_TopLevel | WStyle_Customize | WStyle_StaysOnTop |
WStyle_DialogBorder,
parent, name, false, i18n("Reminder"), Ok | User1 | User2 | User3, User1/*3*/,
@@ -85,11 +85,11 @@ AlarmDialog::AlarmDialog( QWidget *parent, const char *name )
KGlobal::iconLoader()->addAppDir( "kdepim" );
setButtonOK( i18n( "Dismiss" ) );
- QWidget *topBox = plainPage();
- QBoxLayout *topLayout = new QVBoxLayout( topBox );
+ TQWidget *topBox = plainPage();
+ TQBoxLayout *topLayout = new TQVBoxLayout( topBox );
topLayout->setSpacing( spacingHint() );
- QLabel *label = new QLabel( i18n("The following events triggered reminders:"),
+ TQLabel *label = new TQLabel( i18n("The following events triggered reminders:"),
topBox );
topLayout->addWidget( label );
@@ -97,22 +97,22 @@ AlarmDialog::AlarmDialog( QWidget *parent, const char *name )
mIncidenceListView->addColumn( i18n( "Summary" ) );
mIncidenceListView->addColumn( i18n( "Due" ) );
mIncidenceListView->setAllColumnsShowFocus( true );
- mIncidenceListView->setSelectionMode( QListView::Extended );
+ mIncidenceListView->setSelectionMode( TQListView::Extended );
topLayout->addWidget( mIncidenceListView );
- connect( mIncidenceListView, SIGNAL(selectionChanged()), SLOT(updateButtons()) );
- connect( mIncidenceListView, SIGNAL(doubleClicked(QListViewItem*)), SLOT(slotUser2()) );
- connect( mIncidenceListView, SIGNAL(currentChanged(QListViewItem*)), SLOT(showDetails()) );
- connect( mIncidenceListView, SIGNAL(selectionChanged()), SLOT(showDetails()) );
+ connect( mIncidenceListView, TQT_SIGNAL(selectionChanged()), TQT_SLOT(updateButtons()) );
+ connect( mIncidenceListView, TQT_SIGNAL(doubleClicked(TQListViewItem*)), TQT_SLOT(slotUser2()) );
+ connect( mIncidenceListView, TQT_SIGNAL(currentChanged(TQListViewItem*)), TQT_SLOT(showDetails()) );
+ connect( mIncidenceListView, TQT_SIGNAL(selectionChanged()), TQT_SLOT(showDetails()) );
mDetailView = new KOEventViewer( topBox );
topLayout->addWidget( mDetailView );
- QHBox *suspendBox = new QHBox( topBox );
+ TQHBox *suspendBox = new TQHBox( topBox );
suspendBox->setSpacing( spacingHint() );
topLayout->addWidget( suspendBox );
- QLabel *l = new QLabel( i18n("Suspend &duration:"), suspendBox );
- mSuspendSpin = new QSpinBox( 1, 9999, 1, suspendBox );
+ TQLabel *l = new TQLabel( i18n("Suspend &duration:"), suspendBox );
+ mSuspendSpin = new TQSpinBox( 1, 9999, 1, suspendBox );
mSuspendSpin->setValue( 5 ); // default suspend duration
l->setBuddy( mSuspendSpin );
@@ -121,7 +121,7 @@ AlarmDialog::AlarmDialog( QWidget *parent, const char *name )
mSuspendUnit->insertItem( i18n("hour(s)") );
mSuspendUnit->insertItem( i18n("day(s)") );
mSuspendUnit->insertItem( i18n("week(s)") );
- connect( &mSuspendTimer, SIGNAL(timeout()), SLOT(wakeUp()) );
+ connect( &mSuspendTimer, TQT_SIGNAL(timeout()), TQT_SLOT(wakeUp()) );
// showButton( User2/*3*/, false );
@@ -133,7 +133,7 @@ AlarmDialog::~AlarmDialog()
mIncidenceListView->clear();
}
-void AlarmDialog::addIncidence( Incidence *incidence, const QDateTime &reminderAt )
+void AlarmDialog::addIncidence( Incidence *incidence, const TQDateTime &reminderAt )
{
AlarmListItem *item = new AlarmListItem( incidence, mIncidenceListView );
item->setText( 0, incidence->summary() );
@@ -142,7 +142,7 @@ void AlarmDialog::addIncidence( Incidence *incidence, const QDateTime &reminderA
if ( dynamic_cast<Event*>( incidence ) ) {
item->setPixmap( 0, SmallIcon( "appointment" ) );
if ( incidence->doesRecur() ) {
- QDateTime nextStart = incidence->recurrence()->getNextDateTime( reminderAt );
+ TQDateTime nextStart = incidence->recurrence()->getNextDateTime( reminderAt );
if ( nextStart.isValid() )
item->setText( 1, KGlobal::locale()->formatDateTime( nextStart ) );
}
@@ -202,12 +202,12 @@ void AlarmDialog::suspend()
break;
}
- for ( QListViewItemIterator it( mIncidenceListView ) ; it.current() ; ++it ) {
+ for ( TQListViewItemIterator it( mIncidenceListView ) ; it.current() ; ++it ) {
AlarmListItem * item = static_cast<AlarmListItem*>( it.current() );
if ( item->isSelected() && item->isVisible() ) {
item->setVisible( false );
item->setSelected( false );
- item->mRemindAt = QDateTime::currentDateTime().addSecs( unit * mSuspendSpin->value() );
+ item->mRemindAt = TQDateTime::currentDateTime().addSecs( unit * mSuspendSpin->value() );
item->mNotified = false;
}
}
@@ -225,10 +225,10 @@ void AlarmDialog::suspend()
void AlarmDialog::setTimer()
{
int nextReminderAt = -1;
- for ( QListViewItemIterator it( mIncidenceListView ) ; it.current() ; ++it ) {
+ for ( TQListViewItemIterator it( mIncidenceListView ) ; it.current() ; ++it ) {
AlarmListItem * item = static_cast<AlarmListItem*>( it.current() );
- if ( item->mRemindAt > QDateTime::currentDateTime() ) {
- int secs = QDateTime::currentDateTime().secsTo( item->mRemindAt );
+ if ( item->mRemindAt > TQDateTime::currentDateTime() ) {
+ int secs = TQDateTime::currentDateTime().secsTo( item->mRemindAt );
nextReminderAt = nextReminderAt <= 0 ? secs : QMIN( nextReminderAt, secs );
}
}
@@ -247,17 +247,17 @@ void AlarmDialog::slotUser2()
Incidence *incidence = selection.first()->mIncidence;
if ( !kapp->dcopClient()->isApplicationRegistered( "korganizer" ) ) {
- if ( kapp->startServiceByDesktopName( "korganizer", QString::null ) )
+ if ( kapp->startServiceByDesktopName( "korganizer", TQString::null ) )
KMessageBox::error( 0, i18n("Could not start KOrganizer.") );
}
kapp->dcopClient()->send( "korganizer", "KOrganizerIface",
- "editIncidence(QString)",
+ "editIncidence(TQString)",
incidence->uid() );
// get desktop # where korganizer (or kontact) runs
- QByteArray replyData;
- QCString object, replyType;
+ TQByteArray replyData;
+ TQCString object, replyType;
object = kapp->dcopClient()->isApplicationRegistered( "kontact" ) ?
"kontact-mainwindow#1" : "KOrganizer MainWindow";
if (!kapp->dcopClient()->call( "korganizer", object,
@@ -266,7 +266,7 @@ void AlarmDialog::slotUser2()
if ( replyType == "int" ) {
int desktop, window;
- QDataStream ds( replyData, IO_ReadOnly );
+ TQDataStream ds( replyData, IO_ReadOnly );
ds >> window;
desktop = KWin::windowInfo( window ).desktop();
@@ -287,7 +287,7 @@ void AlarmDialog::slotUser3()
void AlarmDialog::dismissAll()
{
- for ( QListViewItemIterator it( mIncidenceListView ) ; it.current() ; ) {
+ for ( TQListViewItemIterator it( mIncidenceListView ) ; it.current() ; ) {
AlarmListItem *item = static_cast<AlarmListItem*>( it.current() );
if ( !item->isVisible() ) {
++it;
@@ -316,8 +316,8 @@ void AlarmDialog::eventNotification()
{
bool beeped = false, found = false;
- QValueList<AlarmListItem*> list;
- for ( QListViewItemIterator it( mIncidenceListView ) ; it.current() ; ++it ) {
+ TQValueList<AlarmListItem*> list;
+ for ( TQListViewItemIterator it( mIncidenceListView ) ; it.current() ; ++it ) {
AlarmListItem *item = static_cast<AlarmListItem*>( it.current() );
if ( !item->isVisible() || item->mNotified )
continue;
@@ -332,12 +332,12 @@ void AlarmDialog::eventNotification()
// FIXME: Add a message box asking whether the procedure should really be executed
kdDebug(5890) << "Starting program: '" << alarm->programFile() << "'" << endl;
KProcess proc;
- proc << QFile::encodeName(alarm->programFile());
+ proc << TQFile::encodeName(alarm->programFile());
proc.start(KProcess::DontCare);
}
else if (alarm->type() == Alarm::Audio) {
beeped = true;
- KAudioPlayer::play(QFile::encodeName(alarm->audioFile()));
+ KAudioPlayer::play(TQFile::encodeName(alarm->audioFile()));
}
}
}
@@ -350,9 +350,9 @@ void AlarmDialog::eventNotification()
void AlarmDialog::wakeUp()
{
bool activeReminders = false;
- for ( QListViewItemIterator it( mIncidenceListView ) ; it.current() ; ++it ) {
+ for ( TQListViewItemIterator it( mIncidenceListView ) ; it.current() ; ++it ) {
AlarmListItem * item = static_cast<AlarmListItem*>( it.current() );
- if ( item->mRemindAt <= QDateTime::currentDateTime() ) {
+ if ( item->mRemindAt <= TQDateTime::currentDateTime() ) {
if ( !item->isVisible() ) {
item->setVisible( true );
item->setSelected( false );
@@ -380,9 +380,9 @@ void AlarmDialog::slotSave()
config->setGroup( "General" );
int numReminders = config->readNumEntry("Reminders", 0);
- for ( QListViewItemIterator it( mIncidenceListView ) ; it.current() ; ++it ) {
+ for ( TQListViewItemIterator it( mIncidenceListView ) ; it.current() ; ++it ) {
AlarmListItem * item = static_cast<AlarmListItem*>( it.current() );
- config->setGroup( QString("Incidence-%1").arg(numReminders) );
+ config->setGroup( TQString("Incidence-%1").arg(numReminders) );
config->writeEntry( "UID", item->mIncidence->uid() );
config->writeEntry( "RemindAt", item->mRemindAt );
++numReminders;
@@ -402,10 +402,10 @@ void AlarmDialog::updateButtons()
enableButton( User3, selection.count() > 0 );
}
-QValueList< AlarmListItem * > AlarmDialog::selectedItems() const
+TQValueList< AlarmListItem * > AlarmDialog::selectedItems() const
{
- QValueList<AlarmListItem*> list;
- for ( QListViewItemIterator it( mIncidenceListView ) ; it.current() ; ++it ) {
+ TQValueList<AlarmListItem*> list;
+ for ( TQListViewItemIterator it( mIncidenceListView ) ; it.current() ; ++it ) {
if ( it.current()->isSelected() )
list.append( static_cast<AlarmListItem*>( it.current() ) );
}
@@ -415,7 +415,7 @@ QValueList< AlarmListItem * > AlarmDialog::selectedItems() const
int AlarmDialog::activeCount()
{
int count = 0;
- for ( QListViewItemIterator it( mIncidenceListView ) ; it.current() ; ++it ) {
+ for ( TQListViewItemIterator it( mIncidenceListView ) ; it.current() ; ++it ) {
AlarmListItem * item = static_cast<AlarmListItem*>( it.current() );
if ( item->isVisible() )
++count;
@@ -426,7 +426,7 @@ int AlarmDialog::activeCount()
void AlarmDialog::suspendAll()
{
mIncidenceListView->clearSelection();
- for ( QListViewItemIterator it( mIncidenceListView ) ; it.current() ; ++it ) {
+ for ( TQListViewItemIterator it( mIncidenceListView ) ; it.current() ; ++it ) {
if ( it.current()->isVisible() )
it.current()->setSelected( true );
}
diff --git a/korganizer/korgac/alarmdialog.h b/korganizer/korgac/alarmdialog.h
index 085ae8a9b..711a47bd6 100644
--- a/korganizer/korgac/alarmdialog.h
+++ b/korganizer/korgac/alarmdialog.h
@@ -25,8 +25,8 @@
//
// Alarm dialog.
//
-#include <qtimer.h>
-#include <qdatetime.h>
+#include <tqtimer.h>
+#include <tqdatetime.h>
#include <kdialogbase.h>
@@ -44,10 +44,10 @@ class AlarmListItem;
class AlarmDialog : public KDialogBase {
Q_OBJECT
public:
- AlarmDialog( QWidget *parent = 0, const char *name = 0 );
+ AlarmDialog( TQWidget *parent = 0, const char *name = 0 );
virtual ~AlarmDialog();
- void addIncidence( Incidence *incidence, const QDateTime &reminderAt );
+ void addIncidence( Incidence *incidence, const TQDateTime &reminderAt );
void eventNotification();
public slots:
@@ -73,14 +73,14 @@ class AlarmDialog : public KDialogBase {
bool startKOrganizer();
void setTimer();
int activeCount();
- QValueList<AlarmListItem*> selectedItems() const;
+ TQValueList<AlarmListItem*> selectedItems() const;
KListView *mIncidenceListView;
KOEventViewer *mDetailView;
- QSpinBox *mSuspendSpin;
+ TQSpinBox *mSuspendSpin;
KComboBox *mSuspendUnit;
- QTimer mSuspendTimer;
+ TQTimer mSuspendTimer;
};
#endif
diff --git a/korganizer/korgac/alarmdockwindow.cpp b/korganizer/korgac/alarmdockwindow.cpp
index 074ee9206..bef9b1bda 100644
--- a/korganizer/korgac/alarmdockwindow.cpp
+++ b/korganizer/korgac/alarmdockwindow.cpp
@@ -39,8 +39,8 @@
#include <kaction.h>
#include <kstdaction.h>
-#include <qtooltip.h>
-#include <qfile.h>
+#include <tqtooltip.h>
+#include <tqfile.h>
#include <stdlib.h>
@@ -64,16 +64,16 @@ AlarmDockWindow::AlarmDockWindow( const char *name )
setPixmap( alarmsEnabled ? mPixmapEnabled : mPixmapDisabled );
// Set up the context menu
- mSuspendAll = contextMenu()->insertItem( i18n("Suspend All"), this, SLOT( slotSuspendAll() ) );
- mDismissAll = contextMenu()->insertItem( i18n("Dismiss All"), this, SLOT( slotDismissAll() ) );
+ mSuspendAll = contextMenu()->insertItem( i18n("Suspend All"), this, TQT_SLOT( slotSuspendAll() ) );
+ mDismissAll = contextMenu()->insertItem( i18n("Dismiss All"), this, TQT_SLOT( slotDismissAll() ) );
contextMenu()->setItemEnabled( mSuspendAll, false );
contextMenu()->setItemEnabled( mDismissAll, false );
contextMenu()->insertSeparator();
mAlarmsEnabledId = contextMenu()->insertItem( i18n("Reminders Enabled"), this,
- SLOT( toggleAlarmsEnabled() ) );
+ TQT_SLOT( toggleAlarmsEnabled() ) );
mAutostartId = contextMenu()->insertItem( i18n("Start Reminder Daemon at Login"), this,
- SLOT( toggleAutostart() ) );
+ TQT_SLOT( toggleAutostart() ) );
contextMenu()->setItemChecked( mAutostartId, autostart );
contextMenu()->setItemChecked( mAlarmsEnabledId, alarmsEnabled );
@@ -86,25 +86,25 @@ AlarmDockWindow::AlarmDockWindow( const char *name )
kdDebug(5890) << "No Quit standard action." << endl;
} else {
#if KDE_IS_VERSION(3,3,90)
- quit->disconnect( SIGNAL( activated() ), this,
- SLOT( maybeQuit() ) );
- connect( quit, SIGNAL( activated() ), SLOT( slotQuit() ) );
+ quit->disconnect( TQT_SIGNAL( activated() ), this,
+ TQT_SLOT( maybeQuit() ) );
+ connect( quit, TQT_SIGNAL( activated() ), TQT_SLOT( slotQuit() ) );
}
#else //FIXME: remove for KDE 4.0
- quit->disconnect( SIGNAL( activated() ), qApp,
- SLOT( closeAllWindows() ) );
+ quit->disconnect( TQT_SIGNAL( activated() ), qApp,
+ TQT_SLOT( closeAllWindows() ) );
}
- connect( this, SIGNAL( quitSelected() ), SLOT( slotQuit() ) );
+ connect( this, TQT_SIGNAL( quitSelected() ), TQT_SLOT( slotQuit() ) );
#endif
- QToolTip::add(this, mName );
+ TQToolTip::add(this, mName );
}
AlarmDockWindow::~AlarmDockWindow()
{
}
-void AlarmDockWindow::resizeEvent ( QResizeEvent * )
+void AlarmDockWindow::resizeEvent ( TQResizeEvent * )
{
// Honor Free Desktop specifications that allow for arbitrary system tray icon sizes
mPixmapEnabled = loadSizedIcon( "korgac", width() );
@@ -117,17 +117,17 @@ void AlarmDockWindow::resizeEvent ( QResizeEvent * )
void AlarmDockWindow::slotUpdate( int reminders )
{
- QToolTip::remove( this );
+ TQToolTip::remove( this );
if ( reminders > 0 )
{
- QToolTip::add( this, i18n( "There is 1 active reminder.",
+ TQToolTip::add( this, i18n( "There is 1 active reminder.",
"There are %n active reminders.", reminders ) );
contextMenu()->setItemEnabled( mSuspendAll, true );
contextMenu()->setItemEnabled( mDismissAll, true );
}
else
{
- QToolTip::add( this, mName );
+ TQToolTip::add( this, mName );
contextMenu()->setItemEnabled( mSuspendAll, false );
contextMenu()->setItemEnabled( mDismissAll, false );
}
@@ -175,16 +175,16 @@ void AlarmDockWindow::enableAutostart( bool enable )
contextMenu()->setItemChecked( mAutostartId, enable );
}
-void AlarmDockWindow::mousePressEvent( QMouseEvent *e )
+void AlarmDockWindow::mousePressEvent( TQMouseEvent *e )
{
if ( e->button() == LeftButton ) {
- kapp->startServiceByDesktopName( "korganizer", QString::null );
+ kapp->startServiceByDesktopName( "korganizer", TQString::null );
} else {
KSystemTray::mousePressEvent( e );
}
}
-//void AlarmDockWindow::closeEvent( QCloseEvent * )
+//void AlarmDockWindow::closeEvent( TQCloseEvent * )
void AlarmDockWindow::slotQuit()
{
int result = KMessageBox::questionYesNoCancel( this,
@@ -192,7 +192,7 @@ void AlarmDockWindow::slotQuit()
"(note that you will not get reminders whilst the daemon is not running)?"),
i18n("Close KOrganizer Reminder Daemon"),
i18n("Start"), i18n("Do Not Start"),
- QString::fromLatin1("AskForStartAtLogin")
+ TQString::fromLatin1("AskForStartAtLogin")
);
bool autostart = true;
diff --git a/korganizer/korgac/alarmdockwindow.h b/korganizer/korgac/alarmdockwindow.h
index f26b6d8c1..548e39aa2 100644
--- a/korganizer/korgac/alarmdockwindow.h
+++ b/korganizer/korgac/alarmdockwindow.h
@@ -26,7 +26,7 @@
#include <ksystemtray.h>
-#include <qpixmap.h>
+#include <tqpixmap.h>
class AlarmDockWindow : public KSystemTray
{
@@ -48,9 +48,9 @@ class AlarmDockWindow : public KSystemTray
void dismissAllSignal();
protected:
- void mousePressEvent( QMouseEvent * );
-// void closeEvent( QCloseEvent * );
- void resizeEvent ( QResizeEvent * );
+ void mousePressEvent( TQMouseEvent * );
+// void closeEvent( TQCloseEvent * );
+ void resizeEvent ( TQResizeEvent * );
protected slots:
void slotQuit();
@@ -58,9 +58,9 @@ class AlarmDockWindow : public KSystemTray
void slotDismissAll();
private:
- QPixmap mPixmapEnabled;
- QPixmap mPixmapDisabled;
- QString mName;
+ TQPixmap mPixmapEnabled;
+ TQPixmap mPixmapDisabled;
+ TQString mName;
int mAlarmsEnabledId;
int mAutostartId;
diff --git a/korganizer/korgac/koalarmclient.cpp b/korganizer/korgac/koalarmclient.cpp
index c4ef2de82..a4298d7aa 100644
--- a/korganizer/korgac/koalarmclient.cpp
+++ b/korganizer/korgac/koalarmclient.cpp
@@ -37,28 +37,28 @@
#include <kapplication.h>
#include <kwin.h>
-#include <qpushbutton.h>
+#include <tqpushbutton.h>
-KOAlarmClient::KOAlarmClient( QObject *parent, const char *name )
- : DCOPObject( "ac" ), QObject( parent, name ), mDialog( 0 )
+KOAlarmClient::KOAlarmClient( TQObject *parent, const char *name )
+ : DCOPObject( "ac" ), TQObject( parent, name ), mDialog( 0 )
{
kdDebug(5890) << "KOAlarmClient::KOAlarmClient()" << endl;
mDocker = new AlarmDockWindow;
mDocker->show();
- connect( this, SIGNAL( reminderCount( int ) ), mDocker, SLOT( slotUpdate( int ) ) );
- connect( mDocker, SIGNAL( quitSignal() ), SLOT( slotQuit() ) );
+ connect( this, TQT_SIGNAL( reminderCount( int ) ), mDocker, TQT_SLOT( slotUpdate( int ) ) );
+ connect( mDocker, TQT_SIGNAL( quitSignal() ), TQT_SLOT( slotQuit() ) );
KConfig c( locate( "config", "korganizerrc" ) );
c.setGroup( "Time & Date" );
- QString tz = c.readEntry( "TimeZoneId" );
+ TQString tz = c.readEntry( "TimeZoneId" );
kdDebug(5890) << "TimeZone: " << tz << endl;
mCalendar = new CalendarResources( tz );
mCalendar->readConfig();
mCalendar->load();
- connect( &mCheckTimer, SIGNAL( timeout() ), SLOT( checkAlarms() ) );
+ connect( &mCheckTimer, TQT_SIGNAL( timeout() ), TQT_SLOT( checkAlarms() ) );
KConfig *config = kapp->config();
config->setGroup( "Alarms" );
@@ -72,10 +72,10 @@ KOAlarmClient::KOAlarmClient( QObject *parent, const char *name )
int numReminders = config->readNumEntry( "Reminders", 0 );
for ( int i=1; i<=numReminders; ++i )
{
- QString group( QString( "Incidence-%1" ).arg( i ) );
+ TQString group( TQString( "Incidence-%1" ).arg( i ) );
config->setGroup( group );
- QString uid = config->readEntry( "UID" );
- QDateTime dt = config->readDateTimeEntry( "RemindAt" );
+ TQString uid = config->readEntry( "UID" );
+ TQDateTime dt = config->readDateTimeEntry( "RemindAt" );
if ( !uid.isEmpty() )
createReminder( mCalendar->incidence( uid ), dt );
config->deleteGroup( group );
@@ -104,32 +104,32 @@ void KOAlarmClient::checkAlarms()
cfg->setGroup( "General" );
if ( !cfg->readBoolEntry( "Enabled", true ) ) return;
- QDateTime from = mLastChecked.addSecs( 1 );
- mLastChecked = QDateTime::currentDateTime();
+ TQDateTime from = mLastChecked.addSecs( 1 );
+ mLastChecked = TQDateTime::currentDateTime();
kdDebug(5891) << "Check: " << from.toString() << " - " << mLastChecked.toString() << endl;
- QValueList<Alarm *> alarms = mCalendar->alarms( from, mLastChecked );
+ TQValueList<Alarm *> alarms = mCalendar->alarms( from, mLastChecked );
- QValueList<Alarm *>::ConstIterator it;
+ TQValueList<Alarm *>::ConstIterator it;
for( it = alarms.begin(); it != alarms.end(); ++it ) {
kdDebug(5891) << "REMINDER: " << (*it)->parent()->summary() << endl;
Incidence *incidence = mCalendar->incidence( (*it)->parent()->uid() );
- createReminder( incidence, QDateTime::currentDateTime() );
+ createReminder( incidence, TQDateTime::currentDateTime() );
}
}
-void KOAlarmClient::createReminder( KCal::Incidence *incidence, QDateTime dt )
+void KOAlarmClient::createReminder( KCal::Incidence *incidence, TQDateTime dt )
{
if ( !incidence )
return;
if ( !mDialog ) {
mDialog = new AlarmDialog();
- connect( mDialog, SIGNAL(reminderCount(int)), mDocker, SLOT(slotUpdate(int)) );
- connect( mDocker, SIGNAL(suspendAllSignal()), mDialog, SLOT(suspendAll()) );
- connect( mDocker, SIGNAL(dismissAllSignal()), mDialog, SLOT(dismissAll()) );
- connect( this, SIGNAL( saveAllSignal() ), mDialog, SLOT( slotSave() ) );
+ connect( mDialog, TQT_SIGNAL(reminderCount(int)), mDocker, TQT_SLOT(slotUpdate(int)) );
+ connect( mDocker, TQT_SIGNAL(suspendAllSignal()), mDialog, TQT_SLOT(suspendAll()) );
+ connect( mDocker, TQT_SIGNAL(dismissAllSignal()), mDialog, TQT_SLOT(dismissAll()) );
+ connect( this, TQT_SIGNAL( saveAllSignal() ), mDialog, TQT_SLOT( slotSave() ) );
}
mDialog->addIncidence( incidence, dt );
@@ -175,27 +175,27 @@ void KOAlarmClient::dumpDebug()
KConfig *cfg = kapp->config();
cfg->setGroup( "Alarms" );
- QDateTime lastChecked = cfg->readDateTimeEntry( "CalendarsLastChecked" );
+ TQDateTime lastChecked = cfg->readDateTimeEntry( "CalendarsLastChecked" );
kdDebug(5890) << "Last Check: " << lastChecked << endl;
}
-QStringList KOAlarmClient::dumpAlarms()
+TQStringList KOAlarmClient::dumpAlarms()
{
- QDateTime start = QDateTime( QDateTime::currentDateTime().date(),
- QTime( 0, 0 ) );
- QDateTime end = start.addDays( 1 ).addSecs( -1 );
+ TQDateTime start = TQDateTime( TQDateTime::currentDateTime().date(),
+ TQTime( 0, 0 ) );
+ TQDateTime end = start.addDays( 1 ).addSecs( -1 );
- QStringList lst;
+ TQStringList lst;
// Don't translate, this is for debugging purposes.
- lst << QString("AlarmDeamon::dumpAlarms() from ") + start.toString()+ " to " +
+ lst << TQString("AlarmDeamon::dumpAlarms() from ") + start.toString()+ " to " +
end.toString();
- QValueList<Alarm*> alarms = mCalendar->alarms( start, end );
- QValueList<Alarm*>::ConstIterator it;
+ TQValueList<Alarm*> alarms = mCalendar->alarms( start, end );
+ TQValueList<Alarm*>::ConstIterator it;
for( it = alarms.begin(); it != alarms.end(); ++it ) {
Alarm *a = *it;
- lst << QString(" ") + a->parent()->summary() + " ("
+ lst << TQString(" ") + a->parent()->summary() + " ("
+ a->time().toString() + ")";
}
diff --git a/korganizer/korgac/koalarmclient.h b/korganizer/korgac/koalarmclient.h
index 241a3eda8..89c122c39 100644
--- a/korganizer/korgac/koalarmclient.h
+++ b/korganizer/korgac/koalarmclient.h
@@ -30,8 +30,8 @@
#include <kapplication.h>
-#include <qtimer.h>
-#include <qdatetime.h>
+#include <tqtimer.h>
+#include <tqdatetime.h>
class AlarmDialog;
class AlarmDockWindow;
@@ -41,11 +41,11 @@ class CalendarResources;
class Incidence;
}
-class KOAlarmClient : public QObject, virtual public AlarmClientIface, public KSessionManaged
+class KOAlarmClient : public TQObject, virtual public AlarmClientIface, public KSessionManaged
{
Q_OBJECT
public:
- KOAlarmClient( QObject *parent = 0, const char *name = 0 );
+ KOAlarmClient( TQObject *parent = 0, const char *name = 0 );
~KOAlarmClient();
bool commitData( QSessionManager & );
@@ -54,7 +54,7 @@ class KOAlarmClient : public QObject, virtual public AlarmClientIface, public KS
void quit();
void forceAlarmCheck();
void dumpDebug();
- QStringList dumpAlarms();
+ TQStringList dumpAlarms();
void debugShowDialog();
@@ -69,14 +69,14 @@ class KOAlarmClient : public QObject, virtual public AlarmClientIface, public KS
void saveAllSignal();
private:
- void createReminder( KCal::Incidence *incidence, QDateTime dt );
+ void createReminder( KCal::Incidence *incidence, TQDateTime dt );
void saveLastCheckTime();
AlarmDockWindow *mDocker; // the panel icon
KCal::CalendarResources *mCalendar;
- QDateTime mLastChecked;
- QTimer mCheckTimer;
+ TQDateTime mLastChecked;
+ TQTimer mCheckTimer;
AlarmDialog *mDialog;
};
diff --git a/korganizer/korgac/testalarmdlg.cpp b/korganizer/korgac/testalarmdlg.cpp
index 69352a175..84fa51ed6 100644
--- a/korganizer/korgac/testalarmdlg.cpp
+++ b/korganizer/korgac/testalarmdlg.cpp
@@ -22,7 +22,7 @@
without including the source code for Qt in the source distribution.
*/
-#include <qwidget.h>
+#include <tqwidget.h>
#include <kaboutdata.h>
#include <kapplication.h>
@@ -41,7 +41,7 @@ int main(int argc,char **argv)
Event *e1 = new Event;
e1->setSummary( "This is a summary." );
- QDateTime now = QDateTime::currentDateTime();
+ TQDateTime now = TQDateTime::currentDateTime();
e1->setDtStart( now );
e1->setDtEnd( now.addDays( 1 ) );
Alarm *a = e1->newAlarm();
@@ -61,9 +61,9 @@ int main(int argc,char **argv)
AlarmDialog dlg;
app.setMainWidget( &dlg );
- dlg.addIncidence( e1, QDateTime::currentDateTime() );
- dlg.addIncidence( t1, QDateTime::currentDateTime() );
- dlg.addIncidence( e2, QDateTime::currentDateTime() );
+ dlg.addIncidence( e1, TQDateTime::currentDateTime() );
+ dlg.addIncidence( t1, TQDateTime::currentDateTime() );
+ dlg.addIncidence( e2, TQDateTime::currentDateTime() );
dlg.show();
dlg.eventNotification();
diff --git a/korganizer/korganizer.cpp b/korganizer/korganizer.cpp
index 87dc79f4f..fae21bff1 100644
--- a/korganizer/korganizer.cpp
+++ b/korganizer/korganizer.cpp
@@ -73,12 +73,12 @@
#include <kstdguiitem.h>
#include <kstatusbar.h>
-#include <qcursor.h>
-#include <qtimer.h>
-#include <qvbox.h>
-#include <qfile.h>
-#include <qlabel.h>
-#include <qlayout.h>
+#include <tqcursor.h>
+#include <tqtimer.h>
+#include <tqvbox.h>
+#include <tqfile.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
#include <stdlib.h>
@@ -128,8 +128,8 @@ void KOrganizer::init( bool document )
}
mActionManager->init();
- connect( mActionManager, SIGNAL( actionNew( const KURL & ) ),
- SLOT( newMainWindow( const KURL & ) ) );
+ connect( mActionManager, TQT_SIGNAL( actionNew( const KURL & ) ),
+ TQT_SLOT( newMainWindow( const KURL & ) ) );
mActionManager->loadParts();
@@ -139,7 +139,7 @@ void KOrganizer::init( bool document )
KStatusBar *bar = statusBar();
bar->insertItem( "", ID_GENERAL, 10 );
- connect( bar, SIGNAL( pressed( int ) ), SLOT( statusBarPressed( int ) ) );
+ connect( bar, TQT_SIGNAL( pressed( int ) ), TQT_SLOT( statusBarPressed( int ) ) );
KPIM::ProgressDialog *progressDialog = new KPIM::ProgressDialog( bar, this );
progressDialog->hide();
@@ -150,8 +150,8 @@ void KOrganizer::init( bool document )
bar->addWidget( progressWidget, 0, true );
- connect( mActionManager->view(), SIGNAL( statusMessage( const QString & ) ),
- SLOT( showStatusMessage( const QString & ) ) );
+ connect( mActionManager->view(), TQT_SIGNAL( statusMessage( const TQString & ) ),
+ TQT_SLOT( showStatusMessage( const TQString & ) ) );
setStandardToolBarMenuEnabled( true );
setTitle();
@@ -208,9 +208,9 @@ void KOrganizer::initActions()
setStandardToolBarMenuEnabled( true );
createStandardStatusBarAction();
- KStdAction::keyBindings(guiFactory(), SLOT(configureShortcuts()), actionCollection());
- KStdAction::configureToolbars(this, SLOT(configureToolbars() ), actionCollection());
- KStdAction::quit( this, SLOT( close() ), actionCollection() );
+ KStdAction::keyBindings(guiFactory(), TQT_SLOT(configureShortcuts()), actionCollection());
+ KStdAction::configureToolbars(this, TQT_SLOT(configureToolbars() ), actionCollection());
+ KStdAction::quit( this, TQT_SLOT( close() ), actionCollection() );
setAutoSaveSettings();
createGUI( 0 );
@@ -241,7 +241,7 @@ void KOrganizer::statusBarPressed( int /*id*/ )
{
}
-void KOrganizer::showStatusMessage( const QString &message )
+void KOrganizer::showStatusMessage( const TQString &message )
{
statusBar()->message(message,2000);
}
@@ -285,7 +285,7 @@ void KOrganizer::setTitle()
{
// kdDebug(5850) << "KOrganizer::setTitle" << endl;
- QString title;
+ TQString title;
if ( !hasDocument() ) {
title = i18n("Calendar");
} else {
diff --git a/korganizer/korganizer.h b/korganizer/korganizer.h
index ab9f44f68..3ad0952a1 100644
--- a/korganizer/korganizer.h
+++ b/korganizer/korganizer.h
@@ -93,11 +93,11 @@ class KOrganizer : public KPartsMainWindow, public KOrgMainWindow
virtual KXMLGUIFactory *mainGuiFactory() { return factory(); }
virtual KXMLGUIClient *mainGuiClient() { return this; }
- virtual QWidget *topLevelWidget() { return this; }
+ virtual TQWidget *topLevelWidget() { return this; }
public slots:
/** show status message */
- void showStatusMessage( const QString & );
+ void showStatusMessage( const TQString & );
protected slots:
diff --git a/korganizer/korganizer_part.cpp b/korganizer/korganizer_part.cpp
index 32786943d..572255494 100644
--- a/korganizer/korganizer_part.cpp
+++ b/korganizer/korganizer_part.cpp
@@ -58,17 +58,17 @@
#include <sidebarextension.h>
#include <infoextension.h>
-#include <qapplication.h>
-#include <qfile.h>
-#include <qtimer.h>
-#include <qlayout.h>
+#include <tqapplication.h>
+#include <tqfile.h>
+#include <tqtimer.h>
+#include <tqlayout.h>
typedef KParts::GenericFactory< KOrganizerPart > KOrganizerFactory;
K_EXPORT_COMPONENT_FACTORY( libkorganizerpart, KOrganizerFactory )
-KOrganizerPart::KOrganizerPart( QWidget *parentWidget, const char *widgetName,
- QObject *parent, const char *name,
- const QStringList & ) :
+KOrganizerPart::KOrganizerPart( TQWidget *parentWidget, const char *widgetName,
+ TQObject *parent, const char *name,
+ const TQStringList & ) :
KParts::ReadOnlyPart(parent, name), mTopLevelWidget( parentWidget->topLevelWidget() )
{
KGlobal::locale()->insertCatalogue( "libkcal" );
@@ -77,11 +77,11 @@ KOrganizerPart::KOrganizerPart( QWidget *parentWidget, const char *widgetName,
KOCore::self()->addXMLGUIClient( mTopLevelWidget, this );
- QString pname( name );
+ TQString pname( name );
// create a canvas to insert our widget
- QWidget *canvas = new QWidget( parentWidget, widgetName );
- canvas->setFocusPolicy( QWidget::ClickFocus );
+ TQWidget *canvas = new TQWidget( parentWidget, widgetName );
+ canvas->setFocusPolicy( TQWidget::ClickFocus );
setWidget( canvas );
mView = new CalendarView( canvas );
@@ -102,17 +102,17 @@ KOrganizerPart::KOrganizerPart( QWidget *parentWidget, const char *widgetName,
setInstance( KOrganizerFactory::instance() );
- QVBoxLayout *topLayout = new QVBoxLayout( canvas );
+ TQVBoxLayout *topLayout = new TQVBoxLayout( canvas );
topLayout->addWidget( mView );
new KParts::SideBarExtension( mView->leftFrame(), this, "SBE" );
KParts::InfoExtension *ie = new KParts::InfoExtension( this,
"KOrganizerInfo" );
- connect( mView, SIGNAL( incidenceSelected( Incidence * ) ),
- SLOT( slotChangeInfo( Incidence * ) ) );
- connect( this, SIGNAL( textChanged( const QString & ) ),
- ie, SIGNAL( textChanged( const QString & ) ) );
+ connect( mView, TQT_SIGNAL( incidenceSelected( Incidence * ) ),
+ TQT_SLOT( slotChangeInfo( Incidence * ) ) );
+ connect( this, TQT_SIGNAL( textChanged( const TQString & ) ),
+ ie, TQT_SIGNAL( textChanged( const TQString & ) ) );
mActionManager->init();
mActionManager->readSettings();
@@ -151,11 +151,11 @@ void KOrganizerPart::slotChangeInfo( Incidence *incidence )
emit textChanged( incidence->summary() + " / " +
incidence->dtStartTimeStr() );
} else {
- emit textChanged( QString::null );
+ emit textChanged( TQString::null );
}
}
-QWidget *KOrganizerPart::topLevelWidget()
+TQWidget *KOrganizerPart::topLevelWidget()
{
return mView->topLevelWidget();
}
@@ -165,7 +165,7 @@ ActionManager *KOrganizerPart::actionManager()
return mActionManager;
}
-void KOrganizerPart::showStatusMessage( const QString &message )
+void KOrganizerPart::showStatusMessage( const TQString &message )
{
KStatusBar *statusBar = mStatusBarExtension->statusBar();
if ( statusBar ) statusBar->message( message );
@@ -211,7 +211,7 @@ void KOrganizerPart::setTitle()
// type of view (calendar, to-do, journal). How can I add the filter
// name in that case?
/*
- QString title;
+ TQString title;
if ( !hasDocument() ) {
title = i18n("Calendar");
} else {
diff --git a/korganizer/korganizer_part.h b/korganizer/korganizer_part.h
index cb1bf99c9..25a4b9c4b 100644
--- a/korganizer/korganizer_part.h
+++ b/korganizer/korganizer_part.h
@@ -56,8 +56,8 @@ class KOrganizerPart: public KParts::ReadOnlyPart,
{
Q_OBJECT
public:
- KOrganizerPart( QWidget *parentWidget, const char *widgetName,
- QObject *parent, const char *name, const QStringList & );
+ KOrganizerPart( TQWidget *parentWidget, const char *widgetName,
+ TQObject *parent, const char *name, const TQStringList & );
virtual ~KOrganizerPart();
static KAboutData *createAboutData();
@@ -76,10 +76,10 @@ class KOrganizerPart: public KParts::ReadOnlyPart,
virtual KXMLGUIFactory *mainGuiFactory() { return factory(); }
virtual KXMLGUIClient *mainGuiClient() { return this; }
- virtual QWidget *topLevelWidget();
+ virtual TQWidget *topLevelWidget();
virtual ActionManager *actionManager();
virtual KActionCollection *getActionCollection() const { return actionCollection(); }
- virtual void showStatusMessage( const QString &message );
+ virtual void showStatusMessage( const TQString &message );
void setTitle();
@@ -96,10 +96,10 @@ class KOrganizerPart: public KParts::ReadOnlyPart,
CalendarView *mView;
ActionManager *mActionManager;
KParts::StatusBarExtension *mStatusBarExtension;
- QWidget *mTopLevelWidget;
+ TQWidget *mTopLevelWidget;
signals:
- void textChanged( const QString & );
+ void textChanged( const TQString & );
};
#endif
diff --git a/korganizer/korganizeriface.h b/korganizer/korganizeriface.h
index 5a8c7bde8..b3be3c64a 100644
--- a/korganizer/korganizeriface.h
+++ b/korganizer/korganizeriface.h
@@ -27,22 +27,22 @@ class KOrganizerIface : virtual public DCOPObject
{
K_DCOP
k_dcop:
- virtual bool openURL(const QString &url) = 0;
- virtual bool mergeURL(const QString &url) = 0;
+ virtual bool openURL(const TQString &url) = 0;
+ virtual bool mergeURL(const TQString &url) = 0;
virtual void closeURL() = 0;
virtual bool saveURL() = 0;
virtual bool canQueryClose() = 0;
- virtual bool saveAsURL(const QString &url) = 0;
- virtual QString getCurrentURLasString() const = 0;
- virtual bool editIncidence(const QString &uid) = 0;
- virtual bool deleteIncidence(const QString &uid) = 0;
+ virtual bool saveAsURL(const TQString &url) = 0;
+ virtual TQString getCurrentURLasString() const = 0;
+ virtual bool editIncidence(const TQString &uid) = 0;
+ virtual bool deleteIncidence(const TQString &uid) = 0;
/**
Delete the incidence with the given unique ID from the active calendar.
@param uid The incidence's unique ID.
@param force If true, all recurrences and sub-todos (if applicable) will
be deleted without prompting for confirmation.
*/
- virtual bool deleteIncidence(const QString &uid, bool force) = 0;
+ virtual bool deleteIncidence(const TQString &uid, bool force) = 0;
/**
Add an incidence to the active calendar.
@param iCal A calendar in iCalendar format containing the incidence. The
@@ -51,10 +51,10 @@ class KOrganizerIface : virtual public DCOPObject
optionally a VTIMEZONE component. If there is more than one
incidence, only the first is added to KOrganizer's calendar.
*/
- virtual bool addIncidence(const QString &iCal) = 0;
+ virtual bool addIncidence(const TQString &iCal) = 0;
- virtual void loadProfile( const QString& path ) = 0;
- virtual void saveToProfile( const QString& path ) const = 0;
+ virtual void loadProfile( const TQString& path ) = 0;
+ virtual void saveToProfile( const TQString& path ) const = 0;
};
#endif
diff --git a/korganizer/korganizerifaceimpl.cpp b/korganizer/korganizerifaceimpl.cpp
index a88a41cd5..7b61f8cf7 100644
--- a/korganizer/korganizerifaceimpl.cpp
+++ b/korganizer/korganizerifaceimpl.cpp
@@ -35,8 +35,8 @@
KOrganizerIfaceImpl::KOrganizerIfaceImpl( ActionManager* actionManager,
- QObject* parent, const char* name )
- : DCOPObject( "KOrganizerIface" ), QObject( parent, name ),
+ TQObject* parent, const char* name )
+ : DCOPObject( "KOrganizerIface" ), TQObject( parent, name ),
mActionManager( actionManager )
{
}
@@ -45,12 +45,12 @@ KOrganizerIfaceImpl::~KOrganizerIfaceImpl()
{
}
-bool KOrganizerIfaceImpl::openURL( const QString &url )
+bool KOrganizerIfaceImpl::openURL( const TQString &url )
{
return mActionManager->openURL( url );
}
-bool KOrganizerIfaceImpl::mergeURL( const QString &url )
+bool KOrganizerIfaceImpl::mergeURL( const TQString &url )
{
return mActionManager->mergeURL( url );
}
@@ -65,27 +65,27 @@ bool KOrganizerIfaceImpl::saveURL()
return mActionManager->saveURL();
}
-bool KOrganizerIfaceImpl::saveAsURL( const QString &url )
+bool KOrganizerIfaceImpl::saveAsURL( const TQString &url )
{
return mActionManager->saveAsURL( url );
}
-QString KOrganizerIfaceImpl::getCurrentURLasString() const
+TQString KOrganizerIfaceImpl::getCurrentURLasString() const
{
return mActionManager->getCurrentURLasString();
}
-bool KOrganizerIfaceImpl::deleteIncidence( const QString &uid, bool force )
+bool KOrganizerIfaceImpl::deleteIncidence( const TQString &uid, bool force )
{
return mActionManager->deleteIncidence( uid, force );
}
-bool KOrganizerIfaceImpl::editIncidence( const QString &uid )
+bool KOrganizerIfaceImpl::editIncidence( const TQString &uid )
{
return mActionManager->editIncidence( uid );
}
-bool KOrganizerIfaceImpl::addIncidence( const QString &ical )
+bool KOrganizerIfaceImpl::addIncidence( const TQString &ical )
{
return mActionManager->addIncidence( ical );
}
@@ -95,12 +95,12 @@ bool KOrganizerIfaceImpl::canQueryClose()
return (!(mActionManager->queryClose()));
}
-void KOrganizerIfaceImpl::loadProfile( const QString& path )
+void KOrganizerIfaceImpl::loadProfile( const TQString& path )
{
mActionManager->loadProfile( path );
}
-void KOrganizerIfaceImpl::saveToProfile( const QString& path ) const
+void KOrganizerIfaceImpl::saveToProfile( const TQString& path ) const
{
mActionManager->saveToProfile( path );
}
diff --git a/korganizer/korganizerifaceimpl.h b/korganizer/korganizerifaceimpl.h
index b27cd6608..c49d36bb4 100644
--- a/korganizer/korganizerifaceimpl.h
+++ b/korganizer/korganizerifaceimpl.h
@@ -33,40 +33,40 @@
#include "korganizeriface.h"
-#include <qobject.h>
+#include <tqobject.h>
#include <kdepimmacros.h>
class ActionManager;
-class KDE_EXPORT KOrganizerIfaceImpl : public QObject, virtual public KOrganizerIface {
+class KDE_EXPORT KOrganizerIfaceImpl : public TQObject, virtual public KOrganizerIface {
public:
KOrganizerIfaceImpl( ActionManager* mActionManager,
- QObject* parent=0, const char* name=0 );
+ TQObject* parent=0, const char* name=0 );
~KOrganizerIfaceImpl();
- bool openURL( const QString &url );
- bool mergeURL( const QString &url );
+ bool openURL( const TQString &url );
+ bool mergeURL( const TQString &url );
void closeURL();
bool saveURL();
bool canQueryClose();
- bool saveAsURL( const QString &url );
- QString getCurrentURLasString() const;
+ bool saveAsURL( const TQString &url );
+ TQString getCurrentURLasString() const;
- bool editIncidence( const QString &uid );
+ bool editIncidence( const TQString &uid );
/** @reimp from KOrganizerIface::deleteIncidence() */
- bool deleteIncidence( const QString &uid ) { return deleteIncidence( uid, false ); }
+ bool deleteIncidence( const TQString &uid ) { return deleteIncidence( uid, false ); }
/** @reimp from KOrganizerIface::deleteIncidence() */
- bool deleteIncidence( const QString &uid, bool force );
+ bool deleteIncidence( const TQString &uid, bool force );
/** @reimp from KOrganizerIface::addIncidence() */
- bool addIncidence( const QString &iCal );
+ bool addIncidence( const TQString &iCal );
/** @reimp from KOrganizerIface::loadProfile() */
- void loadProfile( const QString& path );
+ void loadProfile( const TQString& path );
/** @reimp from KOrganizerIface::saveToProfile() */
- void saveToProfile( const QString& path ) const;
+ void saveToProfile( const TQString& path ) const;
private:
ActionManager* mActionManager;
diff --git a/korganizer/kotimelineview.cpp b/korganizer/kotimelineview.cpp
index 24f981a53..ac40e2a31 100644
--- a/korganizer/kotimelineview.cpp
+++ b/korganizer/kotimelineview.cpp
@@ -26,7 +26,7 @@
#include <libkcal/calendar.h>
#include <libkcal/calendarresources.h>
-#include <qlayout.h>
+#include <tqlayout.h>
#include <kdgantt/KDGanttViewTaskItem.h>
#include <kdgantt/KDGanttViewSubwidgets.h>
@@ -41,12 +41,12 @@
using namespace KOrg;
using namespace KCal;
-KOTimelineView::KOTimelineView(Calendar *calendar, QWidget *parent,
+KOTimelineView::KOTimelineView(Calendar *calendar, TQWidget *parent,
const char *name)
: KOEventView(calendar, parent, name),
mEventPopup( 0 )
{
- QVBoxLayout* vbox = new QVBoxLayout(this);
+ TQVBoxLayout* vbox = new TQVBoxLayout(this);
mGantt = new KDGanttView(this);
mGantt->setCalendarMode( true );
mGantt->setShowLegendButton( false );
@@ -62,18 +62,18 @@ KOTimelineView::KOTimelineView(Calendar *calendar, QWidget *parent,
vbox->addWidget( mGantt );
- connect( mGantt, SIGNAL(gvCurrentChanged(KDGanttViewItem*)),
- SLOT(itemSelected(KDGanttViewItem*)) );
- connect( mGantt, SIGNAL(itemDoubleClicked(KDGanttViewItem*)),
- SLOT(itemDoubleClicked(KDGanttViewItem*)) );
- connect( mGantt, SIGNAL(itemRightClicked(KDGanttViewItem*)),
- SLOT(itemRightClicked(KDGanttViewItem*)) );
- connect( mGantt, SIGNAL(gvItemMoved(KDGanttViewItem*)),
- SLOT(itemMoved(KDGanttViewItem*)) );
- connect( mGantt, SIGNAL(rescaling(KDGanttView::Scale)),
- SLOT(overscale(KDGanttView::Scale)) );
- connect( mGantt, SIGNAL( dateTimeDoubleClicked( const QDateTime& ) ),
- SLOT( newEventWithHint( const QDateTime& ) ) );
+ connect( mGantt, TQT_SIGNAL(gvCurrentChanged(KDGanttViewItem*)),
+ TQT_SLOT(itemSelected(KDGanttViewItem*)) );
+ connect( mGantt, TQT_SIGNAL(itemDoubleClicked(KDGanttViewItem*)),
+ TQT_SLOT(itemDoubleClicked(KDGanttViewItem*)) );
+ connect( mGantt, TQT_SIGNAL(itemRightClicked(KDGanttViewItem*)),
+ TQT_SLOT(itemRightClicked(KDGanttViewItem*)) );
+ connect( mGantt, TQT_SIGNAL(gvItemMoved(KDGanttViewItem*)),
+ TQT_SLOT(itemMoved(KDGanttViewItem*)) );
+ connect( mGantt, TQT_SIGNAL(rescaling(KDGanttView::Scale)),
+ TQT_SLOT(overscale(KDGanttView::Scale)) );
+ connect( mGantt, TQT_SIGNAL( dateTimeDoubleClicked( const TQDateTime& ) ),
+ TQT_SLOT( newEventWithHint( const TQDateTime& ) ) );
}
KOTimelineView::~KOTimelineView()
@@ -100,13 +100,13 @@ int KOTimelineView::currentDateCount()
}
/*virtual*/
-void KOTimelineView::showDates(const QDate& start, const QDate& end)
+void KOTimelineView::showDates(const TQDate& start, const TQDate& end)
{
mStartDate = start;
mEndDate = end;
- mHintDate = QDateTime();
- mGantt->setHorizonStart( QDateTime(start) );
- mGantt->setHorizonEnd( QDateTime(end.addDays(1)) );
+ mHintDate = TQDateTime();
+ mGantt->setHorizonStart( TQDateTime(start) );
+ mGantt->setHorizonEnd( TQDateTime(end.addDays(1)) );
mGantt->setMinorScaleCount( 1 );
mGantt->setScale( KDGanttView::Hour );
mGantt->setMinimumScale( KDGanttView::Hour );
@@ -121,20 +121,20 @@ void KOTimelineView::showDates(const QDate& start, const QDate& end)
CalendarResources *calres = dynamic_cast<CalendarResources*>( calendar() );
if ( !calres ) {
item = new TimelineItem( i18n("Calendar"), mGantt );
- mCalendarItemMap[0][QString()] = item;
+ mCalendarItemMap[0][TQString()] = item;
} else {
CalendarResourceManager *manager = calres->resourceManager();
for ( CalendarResourceManager::ActiveIterator it = manager->activeBegin(); it != manager->activeEnd(); ++it ) {
- QColor resourceColor = *KOPrefs::instance()->resourceColor( (*it)->identifier() );
+ TQColor resourceColor = *KOPrefs::instance()->resourceColor( (*it)->identifier() );
if ( (*it)->canHaveSubresources() ) {
- QStringList subResources = (*it)->subresources();
- for ( QStringList::ConstIterator subit = subResources.constBegin(); subit != subResources.constEnd(); ++subit ) {
- QString type = (*it)->subresourceType( *subit );
+ TQStringList subResources = (*it)->subresources();
+ for ( TQStringList::ConstIterator subit = subResources.constBegin(); subit != subResources.constEnd(); ++subit ) {
+ TQString type = (*it)->subresourceType( *subit );
if ( !(*it)->subresourceActive( *subit ) || (!type.isEmpty() && type != "event") )
continue;
item = new TimelineItem( (*it)->labelForSubresource( *subit ), mGantt );
resourceColor = *KOPrefs::instance()->resourceColor( (*it)->identifier() );
- QColor subrescol = *KOPrefs::instance()->resourceColor( *subit );
+ TQColor subrescol = *KOPrefs::instance()->resourceColor( *subit );
if ( subrescol.isValid() )
resourceColor = subrescol;
if ( resourceColor.isValid() )
@@ -145,14 +145,14 @@ void KOTimelineView::showDates(const QDate& start, const QDate& end)
item = new TimelineItem( (*it)->resourceName(), mGantt );
if ( resourceColor.isValid() )
item->setColors( resourceColor, resourceColor, resourceColor );
- mCalendarItemMap[*it][QString()] = item;
+ mCalendarItemMap[*it][TQString()] = item;
}
}
}
// add incidences
Event::List events;
- for ( QDate day = start; day <= end; day = day.addDays( 1 ) ) {
+ for ( TQDate day = start; day <= end; day = day.addDays( 1 ) ) {
events = calendar()->events( day, EventSortStartDate, SortDirectionAscending );
for ( Event::List::ConstIterator it = events.constBegin(); it != events.constEnd(); ++it ) {
insertIncidence( *it, day );
@@ -210,7 +210,7 @@ void KOTimelineView::itemDoubleClicked( KDGanttViewItem *item )
void KOTimelineView::itemRightClicked( KDGanttViewItem *item )
{
- mHintDate = mGantt->getDateTimeForCoordX( QCursor::pos().x(), true );
+ mHintDate = mGantt->getDateTimeForCoordX( TQCursor::pos().x(), true );
TimelineSubItem *tlitem = dynamic_cast<TimelineSubItem*>( item );
if ( !tlitem ) {
showNewEventPopup();
@@ -218,10 +218,10 @@ void KOTimelineView::itemRightClicked( KDGanttViewItem *item )
}
if ( !mEventPopup )
mEventPopup = eventPopup();
- mEventPopup->showIncidencePopup( tlitem->incidence(), QDate() );
+ mEventPopup->showIncidencePopup( tlitem->incidence(), TQDate() );
}
-bool KOTimelineView::eventDurationHint(QDateTime & startDt, QDateTime & endDt, bool & allDay)
+bool KOTimelineView::eventDurationHint(TQDateTime & startDt, TQDateTime & endDt, bool & allDay)
{
startDt = mHintDate;
endDt = mHintDate.addSecs( 2 * 60 * 60 );
@@ -230,7 +230,7 @@ bool KOTimelineView::eventDurationHint(QDateTime & startDt, QDateTime & endDt, b
}
//slot
-void KOTimelineView::newEventWithHint( const QDateTime& dt )
+void KOTimelineView::newEventWithHint( const TQDateTime& dt )
{
mHintDate = dt;
emit newEventSignal( dt );
@@ -241,22 +241,22 @@ TimelineItem * KOTimelineView::calendarItemForIncidence(KCal::Incidence * incide
CalendarResources *calres = dynamic_cast<CalendarResources*>( calendar() );
TimelineItem *item = 0;
if ( !calres ) {
- item = mCalendarItemMap[0][QString()];
+ item = mCalendarItemMap[0][TQString()];
} else {
ResourceCalendar *res = calres->resource( incidence );
if ( !res )
return 0;
if ( res->canHaveSubresources() ) {
- QString subRes = res->subresourceIdentifier( incidence );
+ TQString subRes = res->subresourceIdentifier( incidence );
item = mCalendarItemMap[res][subRes];
} else {
- item = mCalendarItemMap[res][QString()];
+ item = mCalendarItemMap[res][TQString()];
}
}
return item;
}
-void KOTimelineView::insertIncidence(KCal::Incidence * incidence, const QDate &day )
+void KOTimelineView::insertIncidence(KCal::Incidence * incidence, const TQDate &day )
{
TimelineItem *item = calendarItemForIncidence( incidence );
if ( !item ) {
@@ -265,13 +265,13 @@ void KOTimelineView::insertIncidence(KCal::Incidence * incidence, const QDate &d
}
if ( incidence->doesRecur() ) {
- QValueList<QDateTime> l = incidence->startDateTimesForDate( day );
+ TQValueList<TQDateTime> l = incidence->startDateTimesForDate( day );
if ( l.isEmpty() ) {
// strange, but seems to happen for some recurring events...
- item->insertIncidence( incidence, QDateTime( day, incidence->dtStart().time() ),
- QDateTime( day, incidence->dtEnd().time() ) );
+ item->insertIncidence( incidence, TQDateTime( day, incidence->dtStart().time() ),
+ TQDateTime( day, incidence->dtEnd().time() ) );
} else {
- for ( QValueList<QDateTime>::ConstIterator it = l.constBegin();
+ for ( TQValueList<TQDateTime>::ConstIterator it = l.constBegin();
it != l.constEnd(); ++it ) {
item->insertIncidence( incidence, *it, incidence->endDateForStart( *it ) );
}
@@ -288,8 +288,8 @@ void KOTimelineView::insertIncidence(KCal::Incidence * incidence)
if ( !event )
return;
if ( incidence->doesRecur() )
- insertIncidence( incidence, QDate() );
- for ( QDate day = mStartDate; day <= mEndDate; day = day.addDays( 1 ) ) {
+ insertIncidence( incidence, TQDate() );
+ for ( TQDate day = mStartDate; day <= mEndDate; day = day.addDays( 1 ) ) {
Event::List events = calendar()->events( day, EventSortStartDate, SortDirectionAscending );
for ( Event::List::ConstIterator it = events.constBegin(); it != events.constEnd(); ++it ) {
if ( events.contains( event ) )
@@ -305,8 +305,8 @@ void KOTimelineView::removeIncidence(KCal::Incidence * incidence)
item->removeIncidence( incidence );
} else {
// try harder, the incidence might already be removed from the resource
- typedef QMap<QString, KOrg::TimelineItem*> M2_t;
- typedef QMap<KCal::ResourceCalendar*, M2_t> M1_t;
+ typedef TQMap<TQString, KOrg::TimelineItem*> M2_t;
+ typedef TQMap<KCal::ResourceCalendar*, M2_t> M1_t;
for ( M1_t::ConstIterator it1 = mCalendarItemMap.constBegin(); it1 != mCalendarItemMap.constEnd(); ++it1 ) {
for ( M2_t::ConstIterator it2 = it1.data().constBegin(); it2 != it1.data().constEnd(); ++it2 ) {
if ( it2.data() ) {
@@ -324,9 +324,9 @@ void KOTimelineView::itemMoved(KDGanttViewItem * item)
return;
Incidence *i = tlit->incidence();
mChanger->beginChange( i );
- QDateTime newStart = tlit->startTime();
+ TQDateTime newStart = tlit->startTime();
if ( i->doesFloat() )
- newStart = QDateTime( newStart.date() );
+ newStart = TQDateTime( newStart.date() );
int delta = tlit->originalStart().secsTo( newStart );
i->setDtStart( i->dtStart().addSecs( delta ) );
int duration = tlit->startTime().secsTo( tlit->endTime() );
diff --git a/korganizer/kotimelineview.h b/korganizer/kotimelineview.h
index c1bfb89ee..5c3ec6a7c 100644
--- a/korganizer/kotimelineview.h
+++ b/korganizer/kotimelineview.h
@@ -26,7 +26,7 @@
#include <koeventview.h>
#include <kdgantt/KDGanttView.h>
-#include <qmap.h>
+#include <tqmap.h>
class KDGanttViewItem;
@@ -45,25 +45,25 @@ class KOTimelineView : public KOEventView
{
Q_OBJECT
public:
- KOTimelineView(Calendar *calendar, QWidget *parent = 0,
+ KOTimelineView(Calendar *calendar, TQWidget *parent = 0,
const char *name = 0);
~KOTimelineView();
virtual KCal::ListBase<KCal::Incidence> selectedIncidences();
virtual KCal::DateList selectedDates();
virtual int currentDateCount();
- virtual void showDates(const QDate&, const QDate&);
+ virtual void showDates(const TQDate&, const TQDate&);
virtual void showIncidences(const KCal::ListBase<KCal::Incidence>&);
virtual void updateView();
virtual void changeIncidenceDisplay(KCal::Incidence* incidence, int mode);
virtual int maxDatesHint() { return 0; }
- virtual bool eventDurationHint(QDateTime &startDt, QDateTime &endDt, bool &allDay);
+ virtual bool eventDurationHint(TQDateTime &startDt, TQDateTime &endDt, bool &allDay);
private:
KOrg::TimelineItem* calendarItemForIncidence( KCal::Incidence* incidence );
void insertIncidence( KCal::Incidence* incidence );
- void insertIncidence( KCal::Incidence* incidence, const QDate &day );
+ void insertIncidence( KCal::Incidence* incidence, const TQDate &day );
void removeIncidence( KCal::Incidence* incidence );
private slots:
@@ -72,14 +72,14 @@ class KOTimelineView : public KOEventView
void itemRightClicked( KDGanttViewItem *item );
void itemMoved( KDGanttViewItem *item );
void overscale( KDGanttView::Scale scale );
- void newEventWithHint( const QDateTime & );
+ void newEventWithHint( const TQDateTime & );
private:
KDGanttView* mGantt;
- QMap<KCal::ResourceCalendar*, QMap<QString, KOrg::TimelineItem*> > mCalendarItemMap;
+ TQMap<KCal::ResourceCalendar*, TQMap<TQString, KOrg::TimelineItem*> > mCalendarItemMap;
KOEventPopupMenu *mEventPopup;
- QDate mStartDate, mEndDate;
- QDateTime mHintDate;
+ TQDate mStartDate, mEndDate;
+ TQDateTime mHintDate;
};
#endif
diff --git a/korganizer/kotodoeditor.cpp b/korganizer/kotodoeditor.cpp
index a4e5f11c8..fe749c9c9 100644
--- a/korganizer/kotodoeditor.cpp
+++ b/korganizer/kotodoeditor.cpp
@@ -24,11 +24,11 @@
without including the source code for Qt in the source distribution.
*/
-#include <qtooltip.h>
-#include <qframe.h>
-#include <qpixmap.h>
-#include <qlayout.h>
-#include <qdatetime.h>
+#include <tqtooltip.h>
+#include <tqframe.h>
+#include <tqpixmap.h>
+#include <tqlayout.h>
+#include <tqdatetime.h>
#include <kiconloader.h>
#include <klocale.h>
@@ -51,8 +51,8 @@
#include "kotodoeditor.h"
#include "kocore.h"
-KOTodoEditor::KOTodoEditor( Calendar *calendar, QWidget *parent ) :
- KOIncidenceEditor( QString::null, calendar, parent )
+KOTodoEditor::KOTodoEditor( Calendar *calendar, TQWidget *parent ) :
+ KOIncidenceEditor( TQString::null, calendar, parent )
{
mTodo = 0;
mCalendar = 0;
@@ -72,16 +72,16 @@ void KOTodoEditor::init()
setupAttendeesTab();
// setupAttachmentsTab();
- connect( mGeneral, SIGNAL( dateTimeStrChanged( const QString & ) ),
- mRecurrence, SLOT( setDateTimeStr( const QString & ) ) );
- connect( mGeneral, SIGNAL( signalDateTimeChanged( const QDateTime &, const QDateTime & ) ),
- mRecurrence, SLOT( setDateTimes( const QDateTime &, const QDateTime & ) ) );
+ connect( mGeneral, TQT_SIGNAL( dateTimeStrChanged( const TQString & ) ),
+ mRecurrence, TQT_SLOT( setDateTimeStr( const TQString & ) ) );
+ connect( mGeneral, TQT_SIGNAL( signalDateTimeChanged( const TQDateTime &, const TQDateTime & ) ),
+ mRecurrence, TQT_SLOT( setDateTimes( const TQDateTime &, const TQDateTime & ) ) );
- connect( mGeneral, SIGNAL( openCategoryDialog() ),
- SIGNAL( editCategories() ) );
+ connect( mGeneral, TQT_SIGNAL( openCategoryDialog() ),
+ TQT_SIGNAL( editCategories() ) );
- connect( mDetails, SIGNAL(updateAttendeeSummary(int)),
- mGeneral, SLOT(updateAttendeeSummary(int)) );
+ connect( mDetails, TQT_SIGNAL(updateAttendeeSummary(int)),
+ mGeneral, TQT_SLOT(updateAttendeeSummary(int)) );
}
void KOTodoEditor::reload()
@@ -94,25 +94,25 @@ void KOTodoEditor::setupGeneral()
mGeneral = new KOEditorGeneralTodo(this);
if (KOPrefs::instance()->mCompactDialogs) {
- QFrame *topFrame = addPage(i18n("General"));
+ TQFrame *topFrame = addPage(i18n("General"));
- QBoxLayout *topLayout = new QVBoxLayout(topFrame);
+ TQBoxLayout *topLayout = new TQVBoxLayout(topFrame);
topLayout->setMargin(marginHint());
topLayout->setSpacing(spacingHint());
mGeneral->initHeader( topFrame, topLayout );
mGeneral->initTime(topFrame,topLayout);
- QHBoxLayout *priorityLayout = new QHBoxLayout( topLayout );
+ TQHBoxLayout *priorityLayout = new TQHBoxLayout( topLayout );
mGeneral->initPriority(topFrame,priorityLayout);
topLayout->addStretch(1);
- QFrame *topFrame2 = addPage(i18n("Details"));
+ TQFrame *topFrame2 = addPage(i18n("Details"));
- QBoxLayout *topLayout2 = new QVBoxLayout(topFrame2);
+ TQBoxLayout *topLayout2 = new TQVBoxLayout(topFrame2);
topLayout2->setMargin(marginHint());
topLayout2->setSpacing(spacingHint());
- QHBoxLayout *completionLayout = new QHBoxLayout( topLayout2 );
+ TQHBoxLayout *completionLayout = new TQHBoxLayout( topLayout2 );
mGeneral->initCompletion(topFrame2,completionLayout);
mGeneral->initAlarm(topFrame,topLayout);
@@ -120,23 +120,23 @@ void KOTodoEditor::setupGeneral()
mGeneral->initSecrecy( topFrame2, topLayout2 );
mGeneral->initDescription(topFrame2,topLayout2);
} else {
- QFrame *topFrame = addPage(i18n("&General"));
+ TQFrame *topFrame = addPage(i18n("&General"));
- QBoxLayout *topLayout = new QVBoxLayout(topFrame);
+ TQBoxLayout *topLayout = new TQVBoxLayout(topFrame);
topLayout->setSpacing(spacingHint());
mGeneral->initHeader( topFrame, topLayout );
mGeneral->initTime(topFrame,topLayout);
mGeneral->initStatus(topFrame,topLayout);
- QBoxLayout *alarmLineLayout = new QHBoxLayout(topLayout);
+ TQBoxLayout *alarmLineLayout = new TQHBoxLayout(topLayout);
mGeneral->initAlarm(topFrame,alarmLineLayout);
alarmLineLayout->addStretch( 1 );
mGeneral->initDescription(topFrame,topLayout);
mGeneral->initAttachments(topFrame,topLayout);
- connect( mGeneral, SIGNAL( openURL( const KURL& ) ),
- this, SLOT( openURL( const KURL& ) ) );
- connect( this, SIGNAL( signalAddAttachments( const QStringList&, const QStringList&, bool ) ),
- mGeneral, SLOT( addAttachments( const QStringList&, const QStringList&, bool ) ) );
+ connect( mGeneral, TQT_SIGNAL( openURL( const KURL& ) ),
+ this, TQT_SLOT( openURL( const KURL& ) ) );
+ connect( this, TQT_SIGNAL( signalAddAttachments( const TQStringList&, const TQStringList&, bool ) ),
+ mGeneral, TQT_SLOT( addAttachments( const TQStringList&, const TQStringList&, bool ) ) );
}
mGeneral->enableAlarm( true );
@@ -145,16 +145,16 @@ void KOTodoEditor::setupGeneral()
void KOTodoEditor::setupRecurrence()
{
- QFrame *topFrame = addPage( i18n("Rec&urrence") );
+ TQFrame *topFrame = addPage( i18n("Rec&urrence") );
- QBoxLayout *topLayout = new QVBoxLayout( topFrame );
+ TQBoxLayout *topLayout = new TQVBoxLayout( topFrame );
mRecurrence = new KOEditorRecurrence( topFrame );
topLayout->addWidget( mRecurrence );
mRecurrence->setEnabled( false );
- connect(mGeneral,SIGNAL(dueDateEditToggle( bool ) ),
- mRecurrence, SLOT( setEnabled( bool ) ) );
+ connect(mGeneral,TQT_SIGNAL(dueDateEditToggle( bool ) ),
+ mRecurrence, TQT_SLOT( setEnabled( bool ) ) );
}
void KOTodoEditor::editIncidence(Incidence *incidence, Calendar *calendar)
@@ -183,7 +183,7 @@ void KOTodoEditor::newTodo()
loadDefaults();
}
-void KOTodoEditor::setTexts( const QString &summary, const QString &description )
+void KOTodoEditor::setTexts( const TQString &summary, const TQString &description )
{
if ( description.isEmpty() && summary.contains("\n") ) {
mGeneral->setDescription( summary );
@@ -200,7 +200,7 @@ void KOTodoEditor::setTexts( const QString &summary, const QString &description
void KOTodoEditor::loadDefaults()
{
kdDebug(5850) << k_funcinfo << endl;
- setDates( QDateTime::currentDateTime().addDays(7), true, 0 );
+ setDates( TQDateTime::currentDateTime().addDays(7), true, 0 );
mGeneral->toggleAlarm( true );
}
@@ -256,7 +256,7 @@ void KOTodoEditor::deleteTodo()
reject();
}
-void KOTodoEditor::setDates( const QDateTime &due, bool allDay, Todo *relatedEvent )
+void KOTodoEditor::setDates( const TQDateTime &due, bool allDay, Todo *relatedEvent )
{
mRelatedTodo = relatedEvent;
@@ -274,7 +274,7 @@ void KOTodoEditor::setDates( const QDateTime &due, bool allDay, Todo *relatedEve
if ( mTodo )
mRecurrence->setDefaults( mTodo->dtStart(), due, false );
else
- mRecurrence->setDefaults( QDateTime::currentDateTime(), due, false );
+ mRecurrence->setDefaults( TQDateTime::currentDateTime(), due, false );
}
void KOTodoEditor::readTodo( Todo *todo, Calendar *calendar )
@@ -346,14 +346,14 @@ void KOTodoEditor::loadTemplate( /*const*/ CalendarLocal& cal )
}
}
-void KOTodoEditor::slotSaveTemplate( const QString &templateName )
+void KOTodoEditor::slotSaveTemplate( const TQString &templateName )
{
Todo *todo = new Todo;
writeTodo( todo );
saveAsTemplate( todo, templateName );
}
-QStringList& KOTodoEditor::templates() const
+TQStringList& KOTodoEditor::templates() const
{
return KOPrefs::instance()->mTodoTemplates;
}
diff --git a/korganizer/kotodoeditor.h b/korganizer/kotodoeditor.h
index 2451ea807..2abaa9e51 100644
--- a/korganizer/kotodoeditor.h
+++ b/korganizer/kotodoeditor.h
@@ -41,7 +41,7 @@ class KOTodoEditor : public KOIncidenceEditor
/**
Constructs a new todo editor.
*/
- KOTodoEditor( Calendar *calendar, QWidget *parent );
+ KOTodoEditor( Calendar *calendar, TQWidget *parent );
virtual ~KOTodoEditor();
void init();
@@ -58,12 +58,12 @@ class KOTodoEditor : public KOIncidenceEditor
summary contains multiple lines, the summary will be used as description
and only the first line of summary will be used as the summary.
*/
- void setTexts( const QString &summary, const QString &description = QString::null );
+ void setTexts( const TQString &summary, const TQString &description = TQString::null );
/** Edit an existing todo. */
void editIncidence(Incidence *incidence, Calendar* calendar);
/** Set widgets to default values */
- void setDates( const QDateTime &due, bool allDay = true, Todo *relatedTodo = 0 );
+ void setDates( const TQDateTime &due, bool allDay = true, Todo *relatedTodo = 0 );
/** Read event object and setup widgets accordingly */
void readTodo(Todo *todo, Calendar *calendar);
/** Write event settings to event object */
@@ -81,12 +81,12 @@ class KOTodoEditor : public KOIncidenceEditor
protected slots:
void loadDefaults();
void deleteTodo();
- void slotSaveTemplate( const QString & );
+ void slotSaveTemplate( const TQString & );
protected:
void loadTemplate( /*const*/ CalendarLocal& );
- QStringList& templates() const;
- QString type() { return "Todo"; }
+ TQStringList& templates() const;
+ TQString type() { return "Todo"; }
void setupGeneral();
void setupRecurrence();
int msgItemDelete();
diff --git a/korganizer/kotodoview.cpp b/korganizer/kotodoview.cpp
index f43ca2f69..3736bf29c 100644
--- a/korganizer/kotodoview.cpp
+++ b/korganizer/kotodoview.cpp
@@ -23,11 +23,11 @@
without including the source code for Qt in the source distribution.
*/
-#include <qlayout.h>
-#include <qheader.h>
-#include <qcursor.h>
-#include <qlabel.h>
-#include <qtimer.h>
+#include <tqlayout.h>
+#include <tqheader.h>
+#include <tqcursor.h>
+#include <tqlabel.h>
+#include <tqtimer.h>
#include <kdebug.h>
#include <klocale.h>
@@ -63,16 +63,16 @@ using namespace KOrg;
#include "calprinter.h"
#endif
-KOTodoListViewToolTip::KOTodoListViewToolTip (QWidget* parent,
+KOTodoListViewToolTip::KOTodoListViewToolTip (TQWidget* parent,
KOTodoListView* lv )
- :QToolTip(parent)
+ :TQToolTip(parent)
{
todolist=lv;
}
-void KOTodoListViewToolTip::maybeTip( const QPoint & pos)
+void KOTodoListViewToolTip::maybeTip( const TQPoint & pos)
{
- QRect r;
+ TQRect r;
int headerPos;
int col=todolist->header()->sectionAt(todolist->contentsX() + pos.x());
KOTodoViewItem *i=(KOTodoViewItem *)todolist->itemAt(pos);
@@ -88,7 +88,7 @@ void KOTodoListViewToolTip::maybeTip( const QPoint & pos)
r.setRight(headerPos + todolist->header()->sectionSize(col));
/* Show the tip */
- QString tipText( IncidenceFormatter::toolTipString( i->todo() ) );;
+ TQString tipText( IncidenceFormatter::toolTipString( i->todo() ) );;
if ( !tipText.isEmpty() ) {
tip(r, tipText);
}
@@ -98,7 +98,7 @@ void KOTodoListViewToolTip::maybeTip( const QPoint & pos)
-KOTodoListView::KOTodoListView( QWidget *parent, const char *name )
+KOTodoListView::KOTodoListView( TQWidget *parent, const char *name )
: KListView( parent, name ), mCalendar( 0 ), mChanger( 0 )
{
mOldCurrent = 0;
@@ -120,14 +120,14 @@ void KOTodoListView::setCalendar( Calendar *cal )
viewport()->setAcceptDrops( mCalendar );
}
-bool KOTodoListView::event(QEvent *e)
+bool KOTodoListView::event(TQEvent *e)
{
int tmp=0;
KOTodoViewItem *i;
/* Checks for an ApplicationPaletteChange event and updates
* the small Progress bars to make therm have the right colors. */
- if(e->type()==QEvent::ApplicationPaletteChange)
+ if(e->type()==TQEvent::ApplicationPaletteChange)
{
KListView::event(e);
@@ -142,15 +142,15 @@ bool KOTodoListView::event(QEvent *e)
}
- return (KListView::event(e) || e->type()==QEvent::ApplicationPaletteChange);
+ return (KListView::event(e) || e->type()==TQEvent::ApplicationPaletteChange);
}
-void KOTodoListView::contentsDragEnterEvent(QDragEnterEvent *e)
+void KOTodoListView::contentsDragEnterEvent(TQDragEnterEvent *e)
{
#ifndef KORG_NODND
// kdDebug(5850) << "KOTodoListView::contentsDragEnterEvent" << endl;
if ( !ICalDrag::canDecode( e ) && !VCalDrag::canDecode( e ) &&
- !QTextDrag::canDecode( e ) ) {
+ !TQTextDrag::canDecode( e ) ) {
e->ignore();
return;
}
@@ -159,13 +159,13 @@ void KOTodoListView::contentsDragEnterEvent(QDragEnterEvent *e)
#endif
}
-void KOTodoListView::contentsDragMoveEvent(QDragMoveEvent *e)
+void KOTodoListView::contentsDragMoveEvent(TQDragMoveEvent *e)
{
#ifndef KORG_NODND
// kdDebug(5850) << "KOTodoListView::contentsDragMoveEvent" << endl;
if ( !ICalDrag::canDecode( e ) && !VCalDrag::canDecode( e ) &&
- !QTextDrag::canDecode( e ) ) {
+ !TQTextDrag::canDecode( e ) ) {
e->ignore();
return;
}
@@ -174,7 +174,7 @@ void KOTodoListView::contentsDragMoveEvent(QDragMoveEvent *e)
#endif
}
-void KOTodoListView::contentsDragLeaveEvent( QDragLeaveEvent * )
+void KOTodoListView::contentsDragLeaveEvent( TQDragLeaveEvent * )
{
#ifndef KORG_NODND
// kdDebug(5850) << "KOTodoListView::contentsDragLeaveEvent" << endl;
@@ -184,14 +184,14 @@ void KOTodoListView::contentsDragLeaveEvent( QDragLeaveEvent * )
#endif
}
-void KOTodoListView::contentsDropEvent( QDropEvent *e )
+void KOTodoListView::contentsDropEvent( TQDropEvent *e )
{
#ifndef KORG_NODND
kdDebug(5850) << "KOTodoListView::contentsDropEvent" << endl;
if ( !mCalendar || !mChanger ||
( !ICalDrag::canDecode( e ) && !VCalDrag::canDecode( e ) &&
- !QTextDrag::canDecode( e ) ) ) {
+ !TQTextDrag::canDecode( e ) ) ) {
e->ignore();
return;
}
@@ -244,7 +244,7 @@ void KOTodoListView::contentsDropEvent( QDropEvent *e )
}
}
else {
- QString text;
+ TQString text;
KOTodoViewItem *todoi = dynamic_cast<KOTodoViewItem *>(itemAt( contentsToViewport(e->pos()) ));
if ( ! todoi ) {
// Not dropped on a todo item:
@@ -252,8 +252,8 @@ void KOTodoListView::contentsDropEvent( QDropEvent *e )
kdDebug( 5850 ) << "KOTodoListView::contentsDropEvent(): Not dropped on a todo item" << endl;
kdDebug( 5850 ) << "TODO: Create a new todo with the given data" << endl;
// FIXME: Create a new todo with the given text/contact/whatever
- } else if ( QTextDrag::decode(e, text) ) {
- //QListViewItem *qlvi = itemAt( contentsToViewport(e->pos()) );
+ } else if ( TQTextDrag::decode(e, text) ) {
+ //TQListViewItem *qlvi = itemAt( contentsToViewport(e->pos()) );
kdDebug(5850) << "Dropped : " << text << endl;
Todo*todo = todoi->todo();
if( mChanger->beginChange( todo ) ) {
@@ -262,12 +262,12 @@ void KOTodoListView::contentsDropEvent( QDropEvent *e )
if( text.startsWith( "file:" ) ) {
todo->addAttachment( new Attachment( text ) );
} else {
- QStringList emails = KPIM::splitEmailAddrList( text );
- for(QStringList::ConstIterator it = emails.begin();it!=emails.end();++it) {
+ TQStringList emails = KPIM::splitEmailAddrList( text );
+ for(TQStringList::ConstIterator it = emails.begin();it!=emails.end();++it) {
kdDebug(5850) << " Email: " << (*it) << endl;
int pos = (*it).find("<");
- QString name = (*it).left(pos);
- QString email = (*it).mid(pos);
+ TQString name = (*it).left(pos);
+ TQString email = (*it).mid(pos);
if (!email.isEmpty() && todoi) {
todo->addAttendee( new Attendee( name, email ) );
}
@@ -288,11 +288,11 @@ void KOTodoListView::contentsDropEvent( QDropEvent *e )
#endif
}
-void KOTodoListView::contentsMousePressEvent(QMouseEvent* e)
+void KOTodoListView::contentsMousePressEvent(TQMouseEvent* e)
{
- QListView::contentsMousePressEvent(e);
- QPoint p(contentsToViewport(e->pos()));
- QListViewItem *i = itemAt(p);
+ TQListView::contentsMousePressEvent(e);
+ TQPoint p(contentsToViewport(e->pos()));
+ TQListViewItem *i = itemAt(p);
if (i) {
// if the user clicked into the root decoration of the item, don't
// try to start a drag!
@@ -308,15 +308,15 @@ void KOTodoListView::contentsMousePressEvent(QMouseEvent* e)
}
}
-void KOTodoListView::contentsMouseMoveEvent(QMouseEvent* e)
+void KOTodoListView::contentsMouseMoveEvent(TQMouseEvent* e)
{
#ifndef KORG_NODND
// kdDebug(5850) << "KOTodoListView::contentsMouseMoveEvent()" << endl;
- QListView::contentsMouseMoveEvent(e);
+ TQListView::contentsMouseMoveEvent(e);
if (mMousePressed && (mPressPos - e->pos()).manhattanLength() >
- QApplication::startDragDistance()) {
+ TQApplication::startDragDistance()) {
mMousePressed = false;
- QListViewItem *item = itemAt(contentsToViewport(mPressPos));
+ TQListViewItem *item = itemAt(contentsToViewport(mPressPos));
if ( item && mCalendar ) {
// kdDebug(5850) << "Start Drag for item " << item->text(0) << endl;
DndFactory factory( mCalendar );
@@ -326,33 +326,33 @@ void KOTodoListView::contentsMouseMoveEvent(QMouseEvent* e)
kdDebug(5850) << "KOTodoListView::contentsMouseMoveEvent(): Delete drag source" << endl;
}
/*
- QString source = fullPath(item);
- if ( QFile::exists(source) ) {
+ TQString source = fullPath(item);
+ if ( TQFile::exists(source) ) {
KURL url;
url.setPath(source);
KURLDrag* ud = KURLDrag::newDrag(KURL::List(url), viewport());
if ( ud->drag() )
- QMessageBox::information( this, "Drag source",
- QString("Delete ")+source, "Not implemented" );
+ TQMessageBox::information( this, "Drag source",
+ TQString("Delete ")+source, "Not implemented" );
*/
}
}
#endif
}
-void KOTodoListView::contentsMouseReleaseEvent(QMouseEvent *e)
+void KOTodoListView::contentsMouseReleaseEvent(TQMouseEvent *e)
{
- QListView::contentsMouseReleaseEvent(e);
+ TQListView::contentsMouseReleaseEvent(e);
mMousePressed = false;
}
-void KOTodoListView::contentsMouseDoubleClickEvent(QMouseEvent *e)
+void KOTodoListView::contentsMouseDoubleClickEvent(TQMouseEvent *e)
{
if (!e) return;
- QPoint vp = contentsToViewport(e->pos());
+ TQPoint vp = contentsToViewport(e->pos());
- QListViewItem *item = itemAt(vp);
+ TQListViewItem *item = itemAt(vp);
if (!item) return;
@@ -361,13 +361,13 @@ void KOTodoListView::contentsMouseDoubleClickEvent(QMouseEvent *e)
/////////////////////////////////////////////////////////////////////////////
-KOTodoView::KOTodoView( Calendar *calendar, QWidget *parent, const char* name)
+KOTodoView::KOTodoView( Calendar *calendar, TQWidget *parent, const char* name)
: KOrg::BaseView( calendar, parent, name )
{
- QBoxLayout *topLayout = new QVBoxLayout( this );
+ TQBoxLayout *topLayout = new TQVBoxLayout( this );
- QLabel *title = new QLabel( i18n("To-dos:"), this );
- title->setFrameStyle( QFrame::Panel | QFrame::Raised );
+ TQLabel *title = new TQLabel( i18n("To-dos:"), this );
+ title->setFrameStyle( TQFrame::Panel | TQFrame::Raised );
topLayout->addWidget( title );
mQuickAdd = new KPIM::ClickLineEdit( this, i18n( "Click to add a new to-do" ) );
@@ -402,17 +402,17 @@ KOTodoView::KOTodoView( Calendar *calendar, QWidget *parent, const char* name)
mTodoListView->setItemsRenameable( true );
mTodoListView->setRenameable( 0 );
- mTodoListView->setColumnWidthMode( eSummaryColumn, QListView::Manual );
- mTodoListView->setColumnWidthMode( eRecurColumn, QListView::Manual );
- mTodoListView->setColumnWidthMode( ePriorityColumn, QListView::Manual );
- mTodoListView->setColumnWidthMode( ePercentColumn, QListView::Manual );
- mTodoListView->setColumnWidthMode( eDueDateColumn, QListView::Manual );
- mTodoListView->setColumnWidthMode( eCategoriesColumn, QListView::Manual );
+ mTodoListView->setColumnWidthMode( eSummaryColumn, TQListView::Manual );
+ mTodoListView->setColumnWidthMode( eRecurColumn, TQListView::Manual );
+ mTodoListView->setColumnWidthMode( ePriorityColumn, TQListView::Manual );
+ mTodoListView->setColumnWidthMode( ePercentColumn, TQListView::Manual );
+ mTodoListView->setColumnWidthMode( eDueDateColumn, TQListView::Manual );
+ mTodoListView->setColumnWidthMode( eCategoriesColumn, TQListView::Manual );
#if 0
- mTodoListView->setColumnWidthMode( eDescriptionColumn, QListView::Manual );
+ mTodoListView->setColumnWidthMode( eDescriptionColumn, TQListView::Manual );
#endif
- mPriorityPopupMenu = new QPopupMenu( this );
+ mPriorityPopupMenu = new TQPopupMenu( this );
mPriority[ mPriorityPopupMenu->insertItem( i18n("Unspecified priority", "unspecified") ) ] = 0;
mPriority[ mPriorityPopupMenu->insertItem( i18n( "1 (highest)") ) ] = 1;
mPriority[ mPriorityPopupMenu->insertItem( i18n( "2" ) ) ] = 2;
@@ -423,16 +423,16 @@ KOTodoView::KOTodoView( Calendar *calendar, QWidget *parent, const char* name)
mPriority[ mPriorityPopupMenu->insertItem( i18n( "7" ) ) ] = 7;
mPriority[ mPriorityPopupMenu->insertItem( i18n( "8" ) ) ] = 8;
mPriority[ mPriorityPopupMenu->insertItem( i18n( "9 (lowest)" ) ) ] = 9;
- connect( mPriorityPopupMenu, SIGNAL( activated( int ) ),
- SLOT( setNewPriority( int ) ));
+ connect( mPriorityPopupMenu, TQT_SIGNAL( activated( int ) ),
+ TQT_SLOT( setNewPriority( int ) ));
- mPercentageCompletedPopupMenu = new QPopupMenu(this);
+ mPercentageCompletedPopupMenu = new TQPopupMenu(this);
for (int i = 0; i <= 100; i+=10) {
- QString label = QString ("%1 %").arg (i);
+ TQString label = TQString ("%1 %").arg (i);
mPercentage[mPercentageCompletedPopupMenu->insertItem (label)] = i;
}
- connect( mPercentageCompletedPopupMenu, SIGNAL( activated( int ) ),
- SLOT( setNewPercentage( int ) ) );
+ connect( mPercentageCompletedPopupMenu, TQT_SIGNAL( activated( int ) ),
+ TQT_SLOT( setNewPercentage( int ) ) );
mMovePopupMenu = new KDatePickerPopup(
KDatePickerPopup::NoDate |
@@ -444,76 +444,76 @@ KOTodoView::KOTodoView( Calendar *calendar, QWidget *parent, const char* name)
KDatePickerPopup::Words );
- connect( mMovePopupMenu, SIGNAL( dateChanged( QDate )),
- SLOT( setNewDate( QDate ) ) );
- connect( mCopyPopupMenu, SIGNAL( dateChanged( QDate )),
- SLOT( copyTodoToDate( QDate ) ) );
+ connect( mMovePopupMenu, TQT_SIGNAL( dateChanged( TQDate )),
+ TQT_SLOT( setNewDate( TQDate ) ) );
+ connect( mCopyPopupMenu, TQT_SIGNAL( dateChanged( TQDate )),
+ TQT_SLOT( copyTodoToDate( TQDate ) ) );
- mItemPopupMenu = new QPopupMenu(this);
+ mItemPopupMenu = new TQPopupMenu(this);
mItemPopupMenu->insertItem(i18n("&Show"), this,
- SLOT (showTodo()));
+ TQT_SLOT (showTodo()));
mItemPopupMenu->insertItem(i18n("&Edit..."), this,
- SLOT (editTodo()), 0, ePopupEdit );
+ TQT_SLOT (editTodo()), 0, ePopupEdit );
#ifndef KORG_NOPRINTER
- mItemPopupMenu->insertItem(KOGlobals::self()->smallIcon("printer1"), i18n("&Print..."), this, SLOT( printTodo() ) );
+ mItemPopupMenu->insertItem(KOGlobals::self()->smallIcon("printer1"), i18n("&Print..."), this, TQT_SLOT( printTodo() ) );
#endif
mItemPopupMenu->insertItem(KOGlobals::self()->smallIconSet("editdelete"), i18n("&Delete"), this,
- SLOT (deleteTodo()), 0, ePopupDelete );
+ TQT_SLOT (deleteTodo()), 0, ePopupDelete );
mItemPopupMenu->insertSeparator();
mItemPopupMenu->insertItem(KOGlobals::self()->smallIconSet("todo"), i18n("New &To-do..."), this,
- SLOT (newTodo()));
+ TQT_SLOT (newTodo()));
mItemPopupMenu->insertItem(i18n("New Su&b-to-do..."), this,
- SLOT (newSubTodo()));
+ TQT_SLOT (newSubTodo()));
mItemPopupMenu->insertItem( i18n("&Make this To-do Independent"), this,
- SIGNAL( unSubTodoSignal() ), 0, ePopupUnSubTodo );
+ TQT_SIGNAL( unSubTodoSignal() ), 0, ePopupUnSubTodo );
mItemPopupMenu->insertItem( i18n("Make all Sub-to-dos &Independent"), this,
- SIGNAL( unAllSubTodoSignal() ), 0, ePopupUnAllSubTodo );
+ TQT_SIGNAL( unAllSubTodoSignal() ), 0, ePopupUnAllSubTodo );
mItemPopupMenu->insertSeparator();
mItemPopupMenu->insertItem( i18n("&Copy To"), mCopyPopupMenu, ePopupCopyTo );
mItemPopupMenu->insertItem(i18n("&Move To"), mMovePopupMenu, ePopupMoveTo );
mItemPopupMenu->insertSeparator();
mItemPopupMenu->insertItem(i18n("delete completed to-dos","Pur&ge Completed"),
- this, SLOT( purgeCompleted() ) );
+ this, TQT_SLOT( purgeCompleted() ) );
- connect( mMovePopupMenu, SIGNAL( dateChanged( QDate ) ),
- mItemPopupMenu, SLOT( hide() ) );
- connect( mCopyPopupMenu, SIGNAL( dateChanged( QDate ) ),
- mItemPopupMenu, SLOT( hide() ) );
+ connect( mMovePopupMenu, TQT_SIGNAL( dateChanged( TQDate ) ),
+ mItemPopupMenu, TQT_SLOT( hide() ) );
+ connect( mCopyPopupMenu, TQT_SIGNAL( dateChanged( TQDate ) ),
+ mItemPopupMenu, TQT_SLOT( hide() ) );
- mPopupMenu = new QPopupMenu(this);
+ mPopupMenu = new TQPopupMenu(this);
mPopupMenu->insertItem(KOGlobals::self()->smallIconSet("todo"), i18n("&New To-do..."), this,
- SLOT (newTodo()));
+ TQT_SLOT (newTodo()));
mPopupMenu->insertItem(i18n("delete completed to-dos","&Purge Completed"),
- this, SLOT(purgeCompleted()));
+ this, TQT_SLOT(purgeCompleted()));
mDocPrefs = new DocPrefs( name );
// Double clicking conflicts with opening/closing the subtree
- connect( mTodoListView, SIGNAL( doubleClicked( QListViewItem *,
- const QPoint &, int ) ),
- SLOT( editItem( QListViewItem *, const QPoint &, int ) ) );
- connect( mTodoListView, SIGNAL( returnPressed( QListViewItem * ) ),
- SLOT( editItem( QListViewItem * ) ) );
- connect( mTodoListView, SIGNAL( contextMenuRequested( QListViewItem *,
- const QPoint &, int ) ),
- SLOT( popupMenu( QListViewItem *, const QPoint &, int ) ) );
- connect( mTodoListView, SIGNAL( expanded( QListViewItem * ) ),
- SLOT( itemStateChanged( QListViewItem * ) ) );
- connect( mTodoListView, SIGNAL( collapsed( QListViewItem * ) ),
- SLOT( itemStateChanged( QListViewItem * ) ) );
+ connect( mTodoListView, TQT_SIGNAL( doubleClicked( TQListViewItem *,
+ const TQPoint &, int ) ),
+ TQT_SLOT( editItem( TQListViewItem *, const TQPoint &, int ) ) );
+ connect( mTodoListView, TQT_SIGNAL( returnPressed( TQListViewItem * ) ),
+ TQT_SLOT( editItem( TQListViewItem * ) ) );
+ connect( mTodoListView, TQT_SIGNAL( contextMenuRequested( TQListViewItem *,
+ const TQPoint &, int ) ),
+ TQT_SLOT( popupMenu( TQListViewItem *, const TQPoint &, int ) ) );
+ connect( mTodoListView, TQT_SIGNAL( expanded( TQListViewItem * ) ),
+ TQT_SLOT( itemStateChanged( TQListViewItem * ) ) );
+ connect( mTodoListView, TQT_SIGNAL( collapsed( TQListViewItem * ) ),
+ TQT_SLOT( itemStateChanged( TQListViewItem * ) ) );
#if 0
- connect(mTodoListView,SIGNAL(selectionChanged(QListViewItem *)),
- SLOT(selectionChanged(QListViewItem *)));
- connect(mTodoListView,SIGNAL(clicked(QListViewItem *)),
- SLOT(selectionChanged(QListViewItem *)));
- connect(mTodoListView,SIGNAL(pressed(QListViewItem *)),
- SLOT(selectionChanged(QListViewItem *)));
+ connect(mTodoListView,TQT_SIGNAL(selectionChanged(TQListViewItem *)),
+ TQT_SLOT(selectionChanged(TQListViewItem *)));
+ connect(mTodoListView,TQT_SIGNAL(clicked(TQListViewItem *)),
+ TQT_SLOT(selectionChanged(TQListViewItem *)));
+ connect(mTodoListView,TQT_SIGNAL(pressed(TQListViewItem *)),
+ TQT_SLOT(selectionChanged(TQListViewItem *)));
#endif
- connect( mTodoListView, SIGNAL(selectionChanged() ),
- SLOT( processSelectionChange() ) );
- connect( mQuickAdd, SIGNAL( returnPressed () ),
- SLOT( addQuickTodo() ) );
+ connect( mTodoListView, TQT_SIGNAL(selectionChanged() ),
+ TQT_SLOT( processSelectionChange() ) );
+ connect( mQuickAdd, TQT_SIGNAL( returnPressed () ),
+ TQT_SLOT( addQuickTodo() ) );
}
KOTodoView::~KOTodoView()
@@ -546,7 +546,7 @@ void KOTodoView::updateView()
kdDebug(5850) << " (related to " << t->getRelatedTo()->getSummary() << ")" << endl;
}
- QPtrList<Event> l = t->getRelations();
+ TQPtrList<Event> l = t->getRelations();
Event *c;
for(c=l.first();c;c=l.next()) {
kdDebug(5850) << " - relation: " << c->getSummary() << endl;
@@ -575,7 +575,7 @@ void KOTodoView::updateView()
processSelectionChange();
}
-void KOTodoView::restoreItemState( QListViewItem *item )
+void KOTodoView::restoreItemState( TQListViewItem *item )
{
while( item ) {
KOTodoViewItem *todoItem = (KOTodoViewItem *)item;
@@ -586,7 +586,7 @@ void KOTodoView::restoreItemState( QListViewItem *item )
}
-QMap<Todo *,KOTodoViewItem *>::ConstIterator
+TQMap<Todo *,KOTodoViewItem *>::ConstIterator
KOTodoView::insertTodoItem(Todo *todo)
{
// kdDebug(5850) << "KOTodoView::insertTodoItem(): " << todo->getSummary() << endl;
@@ -599,7 +599,7 @@ QMap<Todo *,KOTodoViewItem *>::ConstIterator
mTodoMap.insert(todo,0);
// kdDebug(5850) << " has Related" << endl;
- QMap<Todo *,KOTodoViewItem *>::ConstIterator itemIterator;
+ TQMap<Todo *,KOTodoViewItem *>::ConstIterator itemIterator;
itemIterator = mTodoMap.find(relatedTodo);
if (itemIterator == mTodoMap.end()) {
// kdDebug(5850) << " related not yet in list" << endl;
@@ -645,7 +645,7 @@ bool KOTodoView::scheduleRemoveTodoItem( KOTodoViewItem *todoItem )
{
if ( todoItem ) {
mItemsToDelete.append( todoItem );
- QTimer::singleShot( 0, this, SLOT( removeTodoItems() ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( removeTodoItems() ) );
return true;
} else
return false;
@@ -728,17 +728,17 @@ void KOTodoView::changeIncidenceDisplay(Incidence *incidence, int action)
}
break;
default:
- QTimer::singleShot( 0, this, SLOT( updateView() ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( updateView() ) );
}
} else {
- // use a QTimer here, because when marking todos finished using
+ // use a TQTimer here, because when marking todos finished using
// the checkbox, this slot gets called, but we cannot update the views
// because we're still inside KOTodoViewItem::stateChange
- QTimer::singleShot(0,this,SLOT(updateView()));
+ TQTimer::singleShot(0,this,TQT_SLOT(updateView()));
}
}
-void KOTodoView::showDates(const QDate &, const QDate &)
+void KOTodoView::showDates(const TQDate &, const TQDate &)
{
}
@@ -756,29 +756,29 @@ CalPrinterBase::PrintType KOTodoView::printType()
}
}
-void KOTodoView::editItem( QListViewItem *item )
+void KOTodoView::editItem( TQListViewItem *item )
{
if (item)
emit editIncidenceSignal( static_cast<KOTodoViewItem *>( item )->todo() );
}
-void KOTodoView::editItem( QListViewItem *item, const QPoint &, int )
+void KOTodoView::editItem( TQListViewItem *item, const TQPoint &, int )
{
editItem( item );
}
-void KOTodoView::showItem( QListViewItem *item )
+void KOTodoView::showItem( TQListViewItem *item )
{
if (item)
emit showIncidenceSignal( static_cast<KOTodoViewItem *>( item )->todo() );
}
-void KOTodoView::showItem( QListViewItem *item, const QPoint &, int )
+void KOTodoView::showItem( TQListViewItem *item, const TQPoint &, int )
{
showItem( item );
}
-void KOTodoView::popupMenu( QListViewItem *item, const QPoint &, int column )
+void KOTodoView::popupMenu( TQListViewItem *item, const TQPoint &, int column )
{
mActiveItem = static_cast<KOTodoViewItem *>( item );
if ( mActiveItem && mActiveItem->todo() &&
@@ -792,45 +792,45 @@ void KOTodoView::popupMenu( QListViewItem *item, const QPoint &, int column )
mItemPopupMenu->setItemEnabled( ePopupUnAllSubTodo, editable );
if ( editable ) {
- QDate date = mActiveItem->todo()->dtDue().date();
+ TQDate date = mActiveItem->todo()->dtDue().date();
if ( mActiveItem->todo()->hasDueDate () ) {
mMovePopupMenu->datePicker()->setDate( date );
} else {
- mMovePopupMenu->datePicker()->setDate( QDate::currentDate() );
+ mMovePopupMenu->datePicker()->setDate( TQDate::currentDate() );
}
switch ( column ) {
case ePriorityColumn:
- mPriorityPopupMenu->popup( QCursor::pos() );
+ mPriorityPopupMenu->popup( TQCursor::pos() );
break;
case ePercentColumn: {
- mPercentageCompletedPopupMenu->popup( QCursor::pos() );
+ mPercentageCompletedPopupMenu->popup( TQCursor::pos() );
break;
}
case eDueDateColumn:
- mMovePopupMenu->popup( QCursor::pos() );
+ mMovePopupMenu->popup( TQCursor::pos() );
break;
case eCategoriesColumn:
- getCategoryPopupMenu( mActiveItem )->popup( QCursor::pos() );
+ getCategoryPopupMenu( mActiveItem )->popup( TQCursor::pos() );
break;
default:
mCopyPopupMenu->datePicker()->setDate( date );
- mCopyPopupMenu->datePicker()->setDate( QDate::currentDate() );
+ mCopyPopupMenu->datePicker()->setDate( TQDate::currentDate() );
mItemPopupMenu->setItemEnabled( ePopupUnSubTodo,
mActiveItem->todo()->relatedTo() );
mItemPopupMenu->setItemEnabled( ePopupUnAllSubTodo,
!mActiveItem->todo()->relations().isEmpty() );
- mItemPopupMenu->popup( QCursor::pos() );
+ mItemPopupMenu->popup( TQCursor::pos() );
}
} else {
- mItemPopupMenu->popup( QCursor::pos() );
+ mItemPopupMenu->popup( TQCursor::pos() );
}
- } else mPopupMenu->popup( QCursor::pos() );
+ } else mPopupMenu->popup( TQCursor::pos() );
}
void KOTodoView::newTodo()
{
kdDebug() << k_funcinfo << endl;
- emit newTodoSignal( QDate::currentDate().addDays(7) );
+ emit newTodoSignal( TQDate::currentDate().addDays(7) );
}
void KOTodoView::newSubTodo()
@@ -855,13 +855,13 @@ void KOTodoView::printTodo()
#ifndef KORG_NOPRINTER
KOCoreHelper helper;
CalPrinter printer( this, BaseView::calendar(), &helper );
- connect( this, SIGNAL(configChanged()), &printer, SLOT(updateConfig()) );
+ connect( this, TQT_SIGNAL(configChanged()), &printer, TQT_SLOT(updateConfig()) );
Incidence::List selectedIncidences;
selectedIncidences.append( mActiveItem->todo() );
printer.print( KOrg::CalPrinterBase::Incidence,
- QDate(), QDate(), selectedIncidences );
+ TQDate(), TQDate(), selectedIncidences );
#endif
}
@@ -899,7 +899,7 @@ void KOTodoView::setNewPercentage( KOTodoViewItem *item, int percentage )
Todo *oldTodo = todo->clone();
/* Old code to make sub-items's percentage related to this one's:
- QListViewItem *myChild = firstChild();
+ TQListViewItem *myChild = firstChild();
KOTodoViewItem *item;
while( myChild ) {
item = static_cast<KOTodoViewItem*>(myChild);
@@ -907,10 +907,10 @@ void KOTodoView::setNewPercentage( KOTodoViewItem *item, int percentage )
myChild = myChild->nextSibling();
}*/
if ( percentage == 100 ) {
- todo->setCompleted( QDateTime::currentDateTime() );
+ todo->setCompleted( TQDateTime::currentDateTime() );
// If the todo does recur, it doesn't get set as completed. However, the
// item is still checked. Uncheck it again.
- if ( !todo->isCompleted() ) item->setState( QCheckListItem::Off );
+ if ( !todo->isCompleted() ) item->setState( TQCheckListItem::Off );
else todo->setPercentComplete( percentage );
} else {
todo->setCompleted( false );
@@ -934,7 +934,7 @@ void KOTodoView::setNewPercentage( int index )
setNewPercentage( mActiveItem, mPercentage[index] );
}
-void KOTodoView::setNewDate( QDate date )
+void KOTodoView::setNewDate( TQDate date )
{
if ( !mActiveItem || !mChanger ) return;
Todo *todo = mActiveItem->todo();
@@ -943,7 +943,7 @@ void KOTodoView::setNewDate( QDate date )
if ( !todo->isReadOnly() && mChanger->beginChange( todo ) ) {
Todo *oldTodo = todo->clone();
- QDateTime dt;
+ TQDateTime dt;
dt.setDate( date );
if ( !todo->doesFloat() )
@@ -964,9 +964,9 @@ void KOTodoView::setNewDate( QDate date )
}
}
-void KOTodoView::copyTodoToDate( QDate date )
+void KOTodoView::copyTodoToDate( TQDate date )
{
- QDateTime dt( date );
+ TQDateTime dt( date );
if ( mActiveItem && mChanger ) {
Todo *newTodo = mActiveItem->todo()->clone();
@@ -984,13 +984,13 @@ void KOTodoView::copyTodoToDate( QDate date )
}
}
-QPopupMenu *KOTodoView::getCategoryPopupMenu( KOTodoViewItem *todoItem )
+TQPopupMenu *KOTodoView::getCategoryPopupMenu( KOTodoViewItem *todoItem )
{
- QPopupMenu *tempMenu = new QPopupMenu( this );
- QStringList checkedCategories = todoItem->todo()->categories();
+ TQPopupMenu *tempMenu = new TQPopupMenu( this );
+ TQStringList checkedCategories = todoItem->todo()->categories();
tempMenu->setCheckable( true );
- QStringList::Iterator it;
+ TQStringList::Iterator it;
for ( it = KOPrefs::instance()->mCustomCategories.begin();
it != KOPrefs::instance()->mCustomCategories.end();
++it ) {
@@ -1000,8 +1000,8 @@ QPopupMenu *KOTodoView::getCategoryPopupMenu( KOTodoViewItem *todoItem )
tempMenu->setItemChecked( index, true );
}
- connect ( tempMenu, SIGNAL( activated( int ) ),
- SLOT( changedCategories( int ) ) );
+ connect ( tempMenu, TQT_SIGNAL( activated( int ) ),
+ TQT_SLOT( changedCategories( int ) ) );
return tempMenu;
}
@@ -1014,7 +1014,7 @@ void KOTodoView::changedCategories(int index)
if ( !todo->isReadOnly() && mChanger->beginChange( todo ) ) {
Todo *oldTodo = todo->clone();
- QStringList categories = todo->categories ();
+ TQStringList categories = todo->categories ();
if ( categories.find( mCategory[index] ) != categories.end() )
categories.remove( mCategory[index] );
else
@@ -1030,14 +1030,14 @@ void KOTodoView::changedCategories(int index)
}
}
-void KOTodoView::setDocumentId( const QString &id )
+void KOTodoView::setDocumentId( const TQString &id )
{
kdDebug(5850) << "KOTodoView::setDocumentId()" << endl;
mDocPrefs->setDoc( id );
}
-void KOTodoView::itemStateChanged( QListViewItem *item )
+void KOTodoView::itemStateChanged( TQListViewItem *item )
{
if (!item) return;
@@ -1052,24 +1052,24 @@ void KOTodoView::setNewPercentageDelayed( KOTodoViewItem *item, int percentage )
{
mPercentChangedMap.append( qMakePair( item, percentage ) );
- QTimer::singleShot( 0, this, SLOT( processDelayedNewPercentage() ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( processDelayedNewPercentage() ) );
}
void KOTodoView::processDelayedNewPercentage()
{
- QValueList< QPair< KOTodoViewItem *, int> >::Iterator it;
+ TQValueList< QPair< KOTodoViewItem *, int> >::Iterator it;
for ( it = mPercentChangedMap.begin(); it != mPercentChangedMap.end(); ++it )
setNewPercentage( (*it).first, (*it).second );
mPercentChangedMap.clear();
}
-void KOTodoView::saveLayout(KConfig *config, const QString &group) const
+void KOTodoView::saveLayout(KConfig *config, const TQString &group) const
{
mTodoListView->saveLayout(config,group);
}
-void KOTodoView::restoreLayout(KConfig *config, const QString &group)
+void KOTodoView::restoreLayout(KConfig *config, const TQString &group)
{
mTodoListView->restoreLayout(config,group);
}
@@ -1110,7 +1110,7 @@ void KOTodoView::addQuickTodo()
delete todo;
return;
}
- mQuickAdd->setText( QString::null );
+ mQuickAdd->setText( TQString::null );
}
}
diff --git a/korganizer/kotodoview.h b/korganizer/kotodoview.h
index aee9037ea..881d92358 100644
--- a/korganizer/kotodoview.h
+++ b/korganizer/kotodoview.h
@@ -25,8 +25,8 @@
#ifndef KOTODOVIEW_H
#define KOTODOVIEW_H
-#include <qmap.h>
-#include <qtooltip.h>
+#include <tqmap.h>
+#include <tqtooltip.h>
#include <klistview.h>
@@ -58,10 +58,10 @@ using namespace KOrg;
class KOTodoListViewToolTip : public QToolTip
{
public:
- KOTodoListViewToolTip( QWidget *parent, KOTodoListView *lv );
+ KOTodoListViewToolTip( TQWidget *parent, KOTodoListView *lv );
protected:
- void maybeTip( const QPoint &pos );
+ void maybeTip( const TQPoint &pos );
private:
KOTodoListView *todolist;
@@ -72,7 +72,7 @@ class KOTodoListView : public KListView
{
Q_OBJECT
public:
- KOTodoListView( QWidget *parent = 0, const char *name = 0 );
+ KOTodoListView( TQWidget *parent = 0, const char *name = 0 );
~KOTodoListView();
void setCalendar( Calendar * );
@@ -80,25 +80,25 @@ class KOTodoListView : public KListView
void setIncidenceChanger( IncidenceChangerBase *changer ) { mChanger = changer; }
protected:
- virtual bool event( QEvent * );
+ virtual bool event( TQEvent * );
- void contentsDragEnterEvent( QDragEnterEvent * );
- void contentsDragMoveEvent( QDragMoveEvent * );
- void contentsDragLeaveEvent( QDragLeaveEvent * );
- void contentsDropEvent( QDropEvent * );
+ void contentsDragEnterEvent( TQDragEnterEvent * );
+ void contentsDragMoveEvent( TQDragMoveEvent * );
+ void contentsDragLeaveEvent( TQDragLeaveEvent * );
+ void contentsDropEvent( TQDropEvent * );
- void contentsMousePressEvent( QMouseEvent * );
- void contentsMouseMoveEvent( QMouseEvent * );
- void contentsMouseReleaseEvent( QMouseEvent * );
- void contentsMouseDoubleClickEvent( QMouseEvent * );
+ void contentsMousePressEvent( TQMouseEvent * );
+ void contentsMouseMoveEvent( TQMouseEvent * );
+ void contentsMouseReleaseEvent( TQMouseEvent * );
+ void contentsMouseDoubleClickEvent( TQMouseEvent * );
private:
Calendar *mCalendar;
KOrg::IncidenceChangerBase *mChanger;
- QPoint mPressPos;
+ TQPoint mPressPos;
bool mMousePressed;
- QListViewItem *mOldCurrent;
+ TQListViewItem *mOldCurrent;
KOTodoListViewToolTip *tooltip;
};
@@ -113,7 +113,7 @@ class KOTodoView : public KOrg::BaseView
{
Q_OBJECT
public:
- KOTodoView( Calendar *cal, QWidget *parent = 0, const char *name = 0 );
+ KOTodoView( Calendar *cal, TQWidget *parent = 0, const char *name = 0 );
~KOTodoView();
void setCalendar( Calendar * );
@@ -128,12 +128,12 @@ class KOTodoView : public KOrg::BaseView
CalPrinterBase::PrintType printType();
- void setDocumentId( const QString & );
+ void setDocumentId( const TQString & );
- void saveLayout( KConfig *config, const QString &group ) const;
- void restoreLayout( KConfig *config, const QString &group );
+ void saveLayout( KConfig *config, const TQString &group ) const;
+ void restoreLayout( KConfig *config, const TQString &group );
/** Create a popup menu to set categories */
- QPopupMenu *getCategoryPopupMenu( KOTodoViewItem *todoItem );
+ TQPopupMenu *getCategoryPopupMenu( KOTodoViewItem *todoItem );
void setIncidenceChanger( IncidenceChangerBase *changer );
public slots:
@@ -142,16 +142,16 @@ class KOTodoView : public KOrg::BaseView
void changeIncidenceDisplay( Incidence *, int );
- void showDates( const QDate &start, const QDate &end );
+ void showDates( const TQDate &start, const TQDate &end );
void showIncidences( const Incidence::List &incidenceList );
void clearSelection();
- void editItem( QListViewItem *item, const QPoint &, int );
- void editItem( QListViewItem *item );
- void showItem( QListViewItem *item, const QPoint &, int );
- void showItem( QListViewItem *item );
- void popupMenu( QListViewItem *item, const QPoint &, int );
+ void editItem( TQListViewItem *item, const TQPoint &, int );
+ void editItem( TQListViewItem *item );
+ void showItem( TQListViewItem *item, const TQPoint &, int );
+ void showItem( TQListViewItem *item );
+ void popupMenu( TQListViewItem *item, const TQPoint &, int );
void newTodo();
void newSubTodo();
void showTodo();
@@ -163,13 +163,13 @@ class KOTodoView : public KOrg::BaseView
void setNewPriority( int );
void setNewPercentage( int );
- void setNewDate( QDate );
- void copyTodoToDate( QDate );
+ void setNewDate( TQDate );
+ void copyTodoToDate( TQDate );
void changedCategories( int );
void purgeCompleted();
- void itemStateChanged( QListViewItem * );
+ void itemStateChanged( TQListViewItem * );
void setNewPercentageDelayed( KOTodoViewItem *item, int percentage );
void processDelayedNewPercentage();
@@ -190,38 +190,38 @@ class KOTodoView : public KOrg::BaseView
* the TodoEditor approach is rather unscaling in the long
* run.
* Korganizer keeps it in memory and we need to update
- * 1. make KOTodoViewItem a QObject again?
+ * 1. make KOTodoViewItem a TQObject again?
* 2. add a public method for setting one todo modified?
* 3. add a private method for setting a todo modified + friend here?
* -- zecke 2002-07-08
*/
friend class KOTodoViewItem;
- QMap<Todo *,KOTodoViewItem *>::ConstIterator insertTodoItem( Todo *todo );
+ TQMap<Todo *,KOTodoViewItem *>::ConstIterator insertTodoItem( Todo *todo );
bool scheduleRemoveTodoItem( KOTodoViewItem *todoItem );
- void restoreItemState( QListViewItem * );
+ void restoreItemState( TQListViewItem * );
KOTodoListView *mTodoListView;
- QPopupMenu *mItemPopupMenu;
- QPopupMenu *mPopupMenu;
- QPopupMenu *mPriorityPopupMenu;
- QPopupMenu *mPercentageCompletedPopupMenu;
- QPopupMenu *mCategoryPopupMenu;
+ TQPopupMenu *mItemPopupMenu;
+ TQPopupMenu *mPopupMenu;
+ TQPopupMenu *mPriorityPopupMenu;
+ TQPopupMenu *mPercentageCompletedPopupMenu;
+ TQPopupMenu *mCategoryPopupMenu;
KDatePickerPopup *mMovePopupMenu;
KDatePickerPopup *mCopyPopupMenu;
- QMap<int, int> mPercentage;
- QMap<int, int> mPriority;
- QMap<int, QString> mCategory;
+ TQMap<int, int> mPercentage;
+ TQMap<int, int> mPriority;
+ TQMap<int, TQString> mCategory;
KOTodoViewItem *mActiveItem;
- QMap<Todo *,KOTodoViewItem *> mTodoMap;
- QPtrList<KOTodoViewItem> mItemsToDelete;
- QValueList< QPair<KOTodoViewItem *, int> > mPercentChangedMap;
+ TQMap<Todo *,KOTodoViewItem *> mTodoMap;
+ TQPtrList<KOTodoViewItem> mItemsToDelete;
+ TQValueList< QPair<KOTodoViewItem *, int> > mPercentChangedMap;
DocPrefs *mDocPrefs;
- QString mCurrentDoc;
+ TQString mCurrentDoc;
KPIM::ClickLineEdit *mQuickAdd;
public:
diff --git a/korganizer/kotodoviewitem.cpp b/korganizer/kotodoviewitem.cpp
index bb5f08c52..7e5541fa3 100644
--- a/korganizer/kotodoviewitem.cpp
+++ b/korganizer/kotodoviewitem.cpp
@@ -24,26 +24,26 @@
without including the source code for Qt in the source distribution.
*/
-#include <qpainter.h>
+#include <tqpainter.h>
#include <klocale.h>
#include <kdebug.h>
-#include <qpainter.h>
-#include <qpixmap.h>
+#include <tqpainter.h>
+#include <tqpixmap.h>
#include "kotodoviewitem.h"
#include "kotodoview.h"
#include "koprefs.h"
#include "koglobals.h"
-KOTodoViewItem::KOTodoViewItem( QListView *parent, Todo *todo, KOTodoView *kotodo)
- : QCheckListItem( parent , "", CheckBox ), mTodo( todo ), mTodoView( kotodo )
+KOTodoViewItem::KOTodoViewItem( TQListView *parent, Todo *todo, KOTodoView *kotodo)
+ : TQCheckListItem( parent , "", CheckBox ), mTodo( todo ), mTodoView( kotodo )
{
construct();
}
KOTodoViewItem::KOTodoViewItem( KOTodoViewItem *parent, Todo *todo, KOTodoView *kotodo )
- : QCheckListItem( parent, "", CheckBox ), mTodo( todo ), mTodoView( kotodo )
+ : TQCheckListItem( parent, "", CheckBox ), mTodo( todo ), mTodoView( kotodo )
{
construct();
}
@@ -60,11 +60,11 @@ inline int KOTodoViewItem::compareDueDates( const KOTodoViewItem *b ) const
return b->mEffectiveDueDate.secsTo( mEffectiveDueDate );
}
-int KOTodoViewItem::compare( QListViewItem *it, int col, bool ascending ) const
+int KOTodoViewItem::compare( TQListViewItem *it, int col, bool ascending ) const
{
KOTodoViewItem *i = dynamic_cast<KOTodoViewItem *>( it );
if ( !i )
- return QListViewItem::compare( it, col, ascending );
+ return TQListViewItem::compare( it, col, ascending );
// throw completed todos to the bottom
if ( mTodo->isCompleted() && !i->todo()->isCompleted() )
@@ -97,15 +97,15 @@ int KOTodoViewItem::compare( QListViewItem *it, int col, bool ascending ) const
return mTodo->description().localeAwareCompare( i->todo()->description() );
default:
Q_ASSERT( false && "unknown column to compare" );
- return QListViewItem::compare( it, col, ascending );
+ return TQListViewItem::compare( it, col, ascending );
}
}
#if QT_VERSION >= 300
-void KOTodoViewItem::paintBranches(QPainter *p,const QColorGroup & cg,int w,
+void KOTodoViewItem::paintBranches(TQPainter *p,const TQColorGroup & cg,int w,
int y,int h)
{
- QListViewItem::paintBranches(p,cg,w,y,h);
+ TQListViewItem::paintBranches(p,cg,w,y,h);
}
#else
#endif
@@ -117,19 +117,19 @@ void KOTodoViewItem::construct()
setOn( mTodo->isCompleted() );
setText( KOTodoView::eSummaryColumn, mTodo->summary());
- static const QPixmap recurPxmp = KOGlobals::self()->smallIcon("recur");
+ static const TQPixmap recurPxmp = KOGlobals::self()->smallIcon("recur");
if ( mTodo->doesRecur() )
setPixmap( KOTodoView::eRecurColumn, recurPxmp );
if ( mTodo->priority()==0 ) {
setText( KOTodoView::ePriorityColumn, i18n("--") );
} else {
- setText( KOTodoView::ePriorityColumn, QString::number(mTodo->priority()) );
+ setText( KOTodoView::ePriorityColumn, TQString::number(mTodo->priority()) );
}
- setText( KOTodoView::ePercentColumn, QString::number(mTodo->percentComplete()) );
+ setText( KOTodoView::ePercentColumn, TQString::number(mTodo->percentComplete()) );
if (mTodo->hasDueDate()) {
- QString dtStr = mTodo->dtDueDateStr();
+ TQString dtStr = mTodo->dtDueDateStr();
if (!mTodo->doesFloat()) {
dtStr += " " + mTodo->dtDueTimeStr();
}
@@ -154,7 +154,7 @@ void KOTodoViewItem::construct()
if (pos < 0) {
setText( KOTodoView::eDescriptionColumn, "" );
} else {
- QString str = mTodo->description().mid(pos+1);
+ TQString str = mTodo->description().mid(pos+1);
str.stripWhiteSpace();
setText( KOTodoView::eDescriptionColumn, str );
}
@@ -195,12 +195,12 @@ bool KOTodoViewItem::isAlternate()
{
KOTodoViewItem *item;
bool previous = true;
- if (QListViewItem::parent())
+ if (TQListViewItem::parent())
{
- item = dynamic_cast<KOTodoViewItem *>(QListViewItem::parent());
+ item = dynamic_cast<KOTodoViewItem *>(TQListViewItem::parent());
if (item)
previous = item->m_odd;
- item = dynamic_cast<KOTodoViewItem *>(QListViewItem::parent()->firstChild());
+ item = dynamic_cast<KOTodoViewItem *>(TQListViewItem::parent()->firstChild());
}
else
{
@@ -222,24 +222,24 @@ bool KOTodoViewItem::isAlternate()
#endif
}
-void KOTodoViewItem::paintCell(QPainter *p, const QColorGroup &cg, int column, int width, int alignment)
+void KOTodoViewItem::paintCell(TQPainter *p, const TQColorGroup &cg, int column, int width, int alignment)
{
- QColorGroup _cg = cg;
+ TQColorGroup _cg = cg;
// If no todo is set, just don't paint anything...
if ( !mTodo ) return;
#ifndef KORG_NOLVALTERNATION
if (isAlternate())
- _cg.setColor(QColorGroup::Base, static_cast< KOTodoListView* >(listView())->alternateBackground());
+ _cg.setColor(TQColorGroup::Base, static_cast< KOTodoListView* >(listView())->alternateBackground());
if (mTodo->hasDueDate()) {
- if (mTodo->dtDue().date()==QDate::currentDate() &&
+ if (mTodo->dtDue().date()==TQDate::currentDate() &&
!mTodo->isCompleted()) {
- _cg.setColor(QColorGroup::Base, KOPrefs::instance()->mTodoDueTodayColor);
- _cg.setColor(QColorGroup::Text, getTextColor(KOPrefs::instance()->mTodoDueTodayColor));
+ _cg.setColor(TQColorGroup::Base, KOPrefs::instance()->mTodoDueTodayColor);
+ _cg.setColor(TQColorGroup::Text, getTextColor(KOPrefs::instance()->mTodoDueTodayColor));
}
- if (mTodo->dtDue().date() < QDate::currentDate() &&
+ if (mTodo->dtDue().date() < TQDate::currentDate() &&
!mTodo->isCompleted()) {
- _cg.setColor(QColorGroup::Base, KOPrefs::instance()->mTodoOverdueColor);
- _cg.setColor(QColorGroup::Text, getTextColor(KOPrefs::instance()->mTodoOverdueColor));
+ _cg.setColor(TQColorGroup::Base, KOPrefs::instance()->mTodoOverdueColor);
+ _cg.setColor(TQColorGroup::Text, getTextColor(KOPrefs::instance()->mTodoOverdueColor));
}
}
#endif
@@ -257,6 +257,6 @@ void KOTodoViewItem::paintCell(QPainter *p, const QColorGroup &cg, int column, i
KGlobalSettings::highlightColor() );
p->restore();
} else {
- QCheckListItem::paintCell(p, _cg, column, width, alignment);
+ TQCheckListItem::paintCell(p, _cg, column, width, alignment);
}
}
diff --git a/korganizer/kotodoviewitem.h b/korganizer/kotodoviewitem.h
index 5cb362af9..80b3b9617 100644
--- a/korganizer/kotodoviewitem.h
+++ b/korganizer/kotodoviewitem.h
@@ -26,10 +26,10 @@
#ifndef KOTODOVIEWITEM_H
#define KOTODOVIEWITEM_H
-#include <qmap.h>
-#include <qlistview.h>
-#include <qpalette.h>
-#include <qdatetime.h>
+#include <tqmap.h>
+#include <tqlistview.h>
+#include <tqpalette.h>
+#include <tqdatetime.h>
namespace KCal {
class Todo;
@@ -55,7 +55,7 @@ class KOTodoViewItem : public QCheckListItem
@param todo is the todo to have the item display information for.
@param kotodo is a pointer to the KOTodoView object.
*/
- KOTodoViewItem(QListView *parent, Todo *todo, KOTodoView *kotodo);
+ KOTodoViewItem(TQListView *parent, Todo *todo, KOTodoView *kotodo);
KOTodoViewItem(KOTodoViewItem *parent, Todo *todo, KOTodoView *kotodo);
virtual ~KOTodoViewItem() {}
@@ -64,13 +64,13 @@ class KOTodoViewItem : public QCheckListItem
Todo *todo() const { return mTodo; }
bool isAlternate();
- int compare( QListViewItem *i, int col, bool ascending ) const;
- virtual void paintCell(QPainter *p, const QColorGroup &cg,
+ int compare( TQListViewItem *i, int col, bool ascending ) const;
+ virtual void paintCell(TQPainter *p, const TQColorGroup &cg,
int column, int width, int alignment);
protected:
#if QT_VERSION >= 300
- void paintBranches(QPainter *p,const QColorGroup & cg,int w,int y,int h);
+ void paintBranches(TQPainter *p,const TQColorGroup & cg,int w,int y,int h);
#else
#endif
virtual void stateChange(bool);
@@ -78,7 +78,7 @@ class KOTodoViewItem : public QCheckListItem
private:
Todo *mTodo;
KOTodoView *mTodoView;
- QDateTime mEffectiveDueDate;
+ TQDateTime mEffectiveDueDate;
int compareDueDates( const KOTodoViewItem *b ) const;
uint m_odd : 1;
diff --git a/korganizer/koviewmanager.cpp b/korganizer/koviewmanager.cpp
index d7929039e..f086e1924 100644
--- a/korganizer/koviewmanager.cpp
+++ b/korganizer/koviewmanager.cpp
@@ -23,8 +23,8 @@
without including the source code for Qt in the source distribution.
*/
-#include <qwidgetstack.h>
-#include <qtabwidget.h>
+#include <tqwidgetstack.h>
+#include <tqtabwidget.h>
#include <kconfig.h>
#include <kglobal.h>
@@ -47,7 +47,7 @@
#include "koviewmanager.moc"
KOViewManager::KOViewManager( CalendarView *mainView ) :
- QObject(), mMainView( mainView )
+ TQObject(), mMainView( mainView )
{
mCurrentView = 0;
@@ -77,7 +77,7 @@ KOrg::BaseView *KOViewManager::currentView()
void KOViewManager::readSettings(KConfig *config)
{
config->setGroup("General");
- QString view = config->readEntry("Current View");
+ TQString view = config->readEntry("Current View");
if (view == "WhatsNext") showWhatsNextView();
else if (view == "Month") showMonthView();
@@ -92,7 +92,7 @@ void KOViewManager::writeSettings(KConfig *config)
{
config->setGroup("General");
- QString view;
+ TQString view;
if (mCurrentView == mWhatsNextView) view = "WhatsNext";
else if (mCurrentView == mMonthView) view = "Month";
else if (mCurrentView == mListView) view = "List";
@@ -156,7 +156,7 @@ void KOViewManager::updateView()
if ( mCurrentView ) mCurrentView->updateView();
}
-void KOViewManager::updateView(const QDate &start, const QDate &end)
+void KOViewManager::updateView(const TQDate &start, const TQDate &end)
{
// kdDebug(5850) << "KOViewManager::updateView()" << endl;
@@ -170,58 +170,58 @@ void KOViewManager::connectView(KOrg::BaseView *view)
if (!view) return;
// selecting an incidence
- connect( view, SIGNAL( incidenceSelected( Incidence * ) ),
- mMainView, SLOT( processMainViewSelection( Incidence * ) ) );
+ connect( view, TQT_SIGNAL( incidenceSelected( Incidence * ) ),
+ mMainView, TQT_SLOT( processMainViewSelection( Incidence * ) ) );
// showing/editing/deleting an incidence. The calendar view takes care of the action.
- connect(view, SIGNAL(showIncidenceSignal(Incidence *)),
- mMainView, SLOT(showIncidence(Incidence *)));
- connect(view, SIGNAL(editIncidenceSignal(Incidence *)),
- mMainView, SLOT(editIncidence(Incidence *)));
- connect(view, SIGNAL(deleteIncidenceSignal(Incidence *)),
- mMainView, SLOT(deleteIncidence(Incidence *)));
- connect(view, SIGNAL(copyIncidenceSignal(Incidence *)),
- mMainView, SLOT(copyIncidence(Incidence *)));
- connect(view, SIGNAL(cutIncidenceSignal(Incidence *)),
- mMainView, SLOT(cutIncidence(Incidence *)));
- connect(view, SIGNAL(pasteIncidenceSignal()),
- mMainView, SLOT(pasteIncidence()));
- connect(view, SIGNAL(toggleAlarmSignal(Incidence *)),
- mMainView, SLOT(toggleAlarm(Incidence *)));
- connect(view,SIGNAL(dissociateOccurrenceSignal( Incidence *, const QDate & )),
- mMainView, SLOT(dissociateOccurrence( Incidence *, const QDate & )));
- connect(view,SIGNAL(dissociateFutureOccurrenceSignal( Incidence *, const QDate & )),
- mMainView, SLOT(dissociateFutureOccurrence( Incidence *, const QDate & )));
+ connect(view, TQT_SIGNAL(showIncidenceSignal(Incidence *)),
+ mMainView, TQT_SLOT(showIncidence(Incidence *)));
+ connect(view, TQT_SIGNAL(editIncidenceSignal(Incidence *)),
+ mMainView, TQT_SLOT(editIncidence(Incidence *)));
+ connect(view, TQT_SIGNAL(deleteIncidenceSignal(Incidence *)),
+ mMainView, TQT_SLOT(deleteIncidence(Incidence *)));
+ connect(view, TQT_SIGNAL(copyIncidenceSignal(Incidence *)),
+ mMainView, TQT_SLOT(copyIncidence(Incidence *)));
+ connect(view, TQT_SIGNAL(cutIncidenceSignal(Incidence *)),
+ mMainView, TQT_SLOT(cutIncidence(Incidence *)));
+ connect(view, TQT_SIGNAL(pasteIncidenceSignal()),
+ mMainView, TQT_SLOT(pasteIncidence()));
+ connect(view, TQT_SIGNAL(toggleAlarmSignal(Incidence *)),
+ mMainView, TQT_SLOT(toggleAlarm(Incidence *)));
+ connect(view,TQT_SIGNAL(dissociateOccurrenceSignal( Incidence *, const TQDate & )),
+ mMainView, TQT_SLOT(dissociateOccurrence( Incidence *, const TQDate & )));
+ connect(view,TQT_SIGNAL(dissociateFutureOccurrenceSignal( Incidence *, const TQDate & )),
+ mMainView, TQT_SLOT(dissociateFutureOccurrence( Incidence *, const TQDate & )));
// signals to create new incidences
- connect( view, SIGNAL( newEventSignal() ),
- mMainView, SLOT( newEvent() ) );
- connect( view, SIGNAL( newEventSignal( const QDateTime & ) ),
- mMainView, SLOT( newEvent( const QDateTime & ) ) );
- connect( view, SIGNAL( newEventSignal( const QDateTime &, const QDateTime & ) ),
- mMainView, SLOT( newEvent( const QDateTime &, const QDateTime & ) ) );
- connect( view, SIGNAL( newEventSignal( const QDate & ) ),
- mMainView, SLOT( newEvent( const QDate & ) ) );
- connect( view, SIGNAL( newTodoSignal( const QDate & ) ),
- mMainView, SLOT( newTodo( const QDate & ) ) );
- connect( view, SIGNAL( newSubTodoSignal( Todo * ) ),
- mMainView, SLOT( newSubTodo( Todo *) ) );
- connect( view, SIGNAL( newJournalSignal( const QDate & ) ),
- mMainView, SLOT( newJournal( const QDate & ) ) );
+ connect( view, TQT_SIGNAL( newEventSignal() ),
+ mMainView, TQT_SLOT( newEvent() ) );
+ connect( view, TQT_SIGNAL( newEventSignal( const TQDateTime & ) ),
+ mMainView, TQT_SLOT( newEvent( const TQDateTime & ) ) );
+ connect( view, TQT_SIGNAL( newEventSignal( const TQDateTime &, const TQDateTime & ) ),
+ mMainView, TQT_SLOT( newEvent( const TQDateTime &, const TQDateTime & ) ) );
+ connect( view, TQT_SIGNAL( newEventSignal( const TQDate & ) ),
+ mMainView, TQT_SLOT( newEvent( const TQDate & ) ) );
+ connect( view, TQT_SIGNAL( newTodoSignal( const TQDate & ) ),
+ mMainView, TQT_SLOT( newTodo( const TQDate & ) ) );
+ connect( view, TQT_SIGNAL( newSubTodoSignal( Todo * ) ),
+ mMainView, TQT_SLOT( newSubTodo( Todo *) ) );
+ connect( view, TQT_SIGNAL( newJournalSignal( const TQDate & ) ),
+ mMainView, TQT_SLOT( newJournal( const TQDate & ) ) );
// reload settings
- connect(mMainView, SIGNAL(configChanged()), view, SLOT(updateConfig()));
+ connect(mMainView, TQT_SIGNAL(configChanged()), view, TQT_SLOT(updateConfig()));
// Notifications about added, changed and deleted incidences
- connect( mMainView, SIGNAL( dayPassed( const QDate & ) ),
- view, SLOT( dayPassed( const QDate & ) ) );
- connect( view, SIGNAL( startMultiModify( const QString & ) ),
- mMainView, SLOT( startMultiModify( const QString & ) ) );
- connect( view, SIGNAL( endMultiModify() ),
- mMainView, SLOT( endMultiModify() ) );
-
- connect( mMainView, SIGNAL( newIncidenceChanger( IncidenceChangerBase* ) ),
- view, SLOT( setIncidenceChanger( IncidenceChangerBase * ) ) );
+ connect( mMainView, TQT_SIGNAL( dayPassed( const TQDate & ) ),
+ view, TQT_SLOT( dayPassed( const TQDate & ) ) );
+ connect( view, TQT_SIGNAL( startMultiModify( const TQString & ) ),
+ mMainView, TQT_SLOT( startMultiModify( const TQString & ) ) );
+ connect( view, TQT_SIGNAL( endMultiModify() ),
+ mMainView, TQT_SLOT( endMultiModify() ) );
+
+ connect( mMainView, TQT_SIGNAL( newIncidenceChanger( IncidenceChangerBase* ) ),
+ view, TQT_SLOT( setIncidenceChanger( IncidenceChangerBase * ) ) );
view->setIncidenceChanger( mMainView->incidenceChanger() );
}
@@ -230,12 +230,12 @@ void KOViewManager::connectTodoView( KOTodoView* todoView )
if (!todoView) return;
// SIGNALS/SLOTS FOR TODO VIEW
- connect( todoView, SIGNAL( purgeCompletedSignal() ),
- mMainView, SLOT( purgeCompleted() ) );
- connect( todoView, SIGNAL( unSubTodoSignal() ),
- mMainView, SLOT( todo_unsub() ) );
- connect( todoView, SIGNAL( unAllSubTodoSignal() ),
- mMainView, SLOT( makeSubTodosIndependents() ) );
+ connect( todoView, TQT_SIGNAL( purgeCompletedSignal() ),
+ mMainView, TQT_SLOT( purgeCompleted() ) );
+ connect( todoView, TQT_SIGNAL( unSubTodoSignal() ),
+ mMainView, TQT_SLOT( todo_unsub() ) );
+ connect( todoView, TQT_SIGNAL( unAllSubTodoSignal() ),
+ mMainView, TQT_SLOT( makeSubTodosIndependents() ) );
}
void KOViewManager::zoomInHorizontally()
@@ -290,11 +290,11 @@ void KOViewManager::showAgendaView()
const bool showMerged = showBoth || KOPrefs::instance()->agendaViewCalendarDisplay() == KOPrefs::CalendarsMerged;
const bool showSideBySide = showBoth || KOPrefs::instance()->agendaViewCalendarDisplay() == KOPrefs::CalendarsSideBySide;
- QWidget *parent = mMainView->viewStack();
+ TQWidget *parent = mMainView->viewStack();
if ( !mAgendaViewTabs && showBoth ) {
- mAgendaViewTabs = new QTabWidget( mMainView->viewStack() );
- connect( mAgendaViewTabs, SIGNAL( currentChanged( QWidget* ) ),
- this, SLOT( currentAgendaViewTabChanged( QWidget* ) ) );
+ mAgendaViewTabs = new TQTabWidget( mMainView->viewStack() );
+ connect( mAgendaViewTabs, TQT_SIGNAL( currentChanged( TQWidget* ) ),
+ this, TQT_SLOT( currentAgendaViewTabChanged( TQWidget* ) ) );
parent = mAgendaViewTabs;
}
@@ -303,13 +303,13 @@ void KOViewManager::showAgendaView()
addView(mAgendaView);
- connect(mAgendaView, SIGNAL( toggleExpand() ),
- mMainView, SLOT( toggleExpand() ) );
- connect(mMainView, SIGNAL( calendarViewExpanded( bool ) ),
- mAgendaView, SLOT( setExpandedButton( bool ) ) );
+ connect(mAgendaView, TQT_SIGNAL( toggleExpand() ),
+ mMainView, TQT_SLOT( toggleExpand() ) );
+ connect(mMainView, TQT_SIGNAL( calendarViewExpanded( bool ) ),
+ mAgendaView, TQT_SLOT( setExpandedButton( bool ) ) );
- connect( mAgendaView,SIGNAL( zoomViewHorizontally(const QDate &, int )),
- mMainView->dateNavigator(),SLOT( selectDates( const QDate &, int ) ) );
+ connect( mAgendaView,TQT_SIGNAL( zoomViewHorizontally(const TQDate &, int )),
+ mMainView->dateNavigator(),TQT_SLOT( selectDates( const TQDate &, int ) ) );
mAgendaView->readSettings();
}
@@ -320,13 +320,13 @@ void KOViewManager::showAgendaView()
addView(mAgendaSideBySideView);
-/* connect(mAgendaSideBySideView, SIGNAL( toggleExpand() ),
- mMainView, SLOT( toggleExpand() ) );
- connect(mMainView, SIGNAL( calendarViewExpanded( bool ) ),
- mAgendaSideBySideView, SLOT( setExpandedButton( bool ) ) );
+/* connect(mAgendaSideBySideView, TQT_SIGNAL( toggleExpand() ),
+ mMainView, TQT_SLOT( toggleExpand() ) );
+ connect(mMainView, TQT_SIGNAL( calendarViewExpanded( bool ) ),
+ mAgendaSideBySideView, TQT_SLOT( setExpandedButton( bool ) ) );
- connect( mAgendaSideBySideView,SIGNAL( zoomViewHorizontally(const QDate &, int )),
- mMainView->dateNavigator(),SLOT( selectDates( const QDate &, int ) ) );*/
+ connect( mAgendaSideBySideView,TQT_SIGNAL( zoomViewHorizontally(const TQDate &, int )),
+ mMainView->dateNavigator(),TQT_SLOT( selectDates( const TQDate &, int ) ) );*/
}
if ( showBoth && mAgendaViewTabs ) {
@@ -370,7 +370,7 @@ void KOViewManager::showWeekView()
void KOViewManager::showNextXView()
{
showAgendaView();
- mMainView->dateNavigator()->selectDates( QDate::currentDate(),
+ mMainView->dateNavigator()->selectDates( TQDate::currentDate(),
KOPrefs::instance()->mNextXDays );
}
@@ -437,9 +437,9 @@ Incidence *KOViewManager::currentSelection()
return incidenceList.first();
}
-QDate KOViewManager::currentSelectionDate()
+TQDate KOViewManager::currentSelectionDate()
{
- QDate qd;
+ TQDate qd;
if (mCurrentView) {
DateList qvl = mCurrentView->selectedDates();
if (!qvl.isEmpty()) qd = qvl.first();
@@ -447,13 +447,13 @@ QDate KOViewManager::currentSelectionDate()
return qd;
}
-void KOViewManager::setDocumentId( const QString &id )
+void KOViewManager::setDocumentId( const TQString &id )
{
if (mTodoView) mTodoView->setDocumentId( id );
}
-QWidget* KOViewManager::widgetForView( KOrg::BaseView* view ) const
+TQWidget* KOViewManager::widgetForView( KOrg::BaseView* view ) const
{
const bool showBoth = KOPrefs::instance()->agendaViewCalendarDisplay() == KOPrefs::AllCalendarViews;
if ( (view == mAgendaView || view == mAgendaSideBySideView) && mAgendaViewTabs && showBoth ) {
@@ -463,7 +463,7 @@ QWidget* KOViewManager::widgetForView( KOrg::BaseView* view ) const
}
-void KOViewManager::currentAgendaViewTabChanged( QWidget* widget )
+void KOViewManager::currentAgendaViewTabChanged( TQWidget* widget )
{
showView( static_cast<KOrg::BaseView*>( widget ) );
}
diff --git a/korganizer/koviewmanager.h b/korganizer/koviewmanager.h
index 4a401d189..58faf6369 100644
--- a/korganizer/koviewmanager.h
+++ b/korganizer/koviewmanager.h
@@ -25,7 +25,7 @@
#ifndef KOVIEWMANAGER_H
#define KOVIEWMANAGER_H
-#include <qobject.h>
+#include <tqobject.h>
class QWidget;
class QTabWidget;
@@ -69,10 +69,10 @@ class KOViewManager : public QObject
KOrg::BaseView *currentView();
- void setDocumentId( const QString & );
+ void setDocumentId( const TQString & );
void updateView();
- void updateView( const QDate &start, const QDate &end );
+ void updateView( const TQDate &start, const TQDate &end );
void raiseCurrentView();
@@ -80,7 +80,7 @@ class KOViewManager : public QObject
void addView( KOrg::BaseView * );
Incidence *currentSelection();
- QDate currentSelectionDate();
+ TQDate currentSelectionDate();
KOAgendaView *agendaView() const { return mAgendaView; }
KOrg::MultiAgendaView *multiAgendaView() const { return mAgendaSideBySideView; }
@@ -111,9 +111,9 @@ class KOViewManager : public QObject
void resourcesChanged();
private slots:
- void currentAgendaViewTabChanged( QWidget* );
+ void currentAgendaViewTabChanged( TQWidget* );
private:
- QWidget* widgetForView( KOrg::BaseView* ) const;
+ TQWidget* widgetForView( KOrg::BaseView* ) const;
CalendarView *mMainView;
KOAgendaView *mAgendaView;
@@ -128,7 +128,7 @@ class KOViewManager : public QObject
KOrg::BaseView *mCurrentView;
KOrg::BaseView *mLastEventView;
- QTabWidget *mAgendaViewTabs;
+ TQTabWidget *mAgendaViewTabs;
};
#endif
diff --git a/korganizer/kowhatsnextview.cpp b/korganizer/kowhatsnextview.cpp
index d4b6618aa..351972199 100644
--- a/korganizer/kowhatsnextview.cpp
+++ b/korganizer/kowhatsnextview.cpp
@@ -22,11 +22,11 @@
without including the source code for Qt in the source distribution.
*/
-#include <qlayout.h>
-#include <qtextbrowser.h>
-#include <qtextcodec.h>
-#include <qfileinfo.h>
-#include <qlabel.h>
+#include <tqlayout.h>
+#include <tqtextbrowser.h>
+#include <tqtextcodec.h>
+#include <tqfileinfo.h>
+#include <tqlabel.h>
#include <kglobal.h>
#include <klocale.h>
@@ -44,7 +44,7 @@
using namespace KOrg;
-void WhatsNextTextBrowser::setSource(const QString& n)
+void WhatsNextTextBrowser::setSource(const TQString& n)
{
kdDebug(5850) << "WhatsNextTextBrowser::setSource(): " << n << endl;
@@ -55,23 +55,23 @@ void WhatsNextTextBrowser::setSource(const QString& n)
emit showIncidence(n);
return;
} else {
- QTextBrowser::setSource(n);
+ TQTextBrowser::setSource(n);
}
}
-KOWhatsNextView::KOWhatsNextView(Calendar *calendar, QWidget *parent,
+KOWhatsNextView::KOWhatsNextView(Calendar *calendar, TQWidget *parent,
const char *name)
: KOrg::BaseView(calendar, parent, name)
{
-// QLabel *dateLabel =
-// new QLabel(KGlobal::locale()->formatDate(QDate::currentDate()),this);
+// TQLabel *dateLabel =
+// new TQLabel(KGlobal::locale()->formatDate(TQDate::currentDate()),this);
// dateLabel->setMargin(2);
// dateLabel->setAlignment(AlignCenter);
mView = new WhatsNextTextBrowser(this);
- connect(mView,SIGNAL(showIncidence(const QString &)),SLOT(showIncidence(const QString &)));
+ connect(mView,TQT_SIGNAL(showIncidence(const TQString &)),TQT_SLOT(showIncidence(const TQString &)));
- QBoxLayout *topLayout = new QVBoxLayout(this);
+ TQBoxLayout *topLayout = new TQVBoxLayout(this);
// topLayout->addWidget(dateLabel);
topLayout->addWidget(mView);
}
@@ -88,7 +88,7 @@ int KOWhatsNextView::currentDateCount()
void KOWhatsNextView::updateView()
{
KIconLoader kil("kdepim");
- QString *ipath = new QString();
+ TQString *ipath = new TQString();
kil.loadIcon("kdepim",KIcon::NoGroup,32,KIcon::DefaultState,ipath);
mText = "<table width=\"100%\">\n";
@@ -111,7 +111,7 @@ void KOWhatsNextView::updateView()
mText+="</h2>\n";
Event::List events;
- for ( QDate date = mStartDate; date <= mEndDate; date = date.addDays( 1 ) )
+ for ( TQDate date = mStartDate; date <= mEndDate; date = date.addDays( 1 ) )
events += calendar()->events(date, EventSortStartDate, SortDirectionAscending);
if (events.count() > 0) {
@@ -133,9 +133,9 @@ void KOWhatsNextView::updateView()
// given time span.
Recurrence *recur = ev->recurrence();
int duration = ev->dtStart().secsTo( ev->dtEnd() );
- QDateTime start = recur->getPreviousDateTime(
- QDateTime( mStartDate, QTime() ) );
- QDateTime end = start.addSecs( duration );
+ TQDateTime start = recur->getPreviousDateTime(
+ TQDateTime( mStartDate, TQTime() ) );
+ TQDateTime end = start.addSecs( duration );
if ( end.date() >= mStartDate ) {
appendEvent( ev, start, end );
}
@@ -180,9 +180,9 @@ void KOWhatsNextView::updateView()
mText += "</ul>\n";
}
- QStringList myEmails( KOPrefs::instance()->allEmails() );
+ TQStringList myEmails( KOPrefs::instance()->allEmails() );
int replies = 0;
- events = calendar()->events( QDate::currentDate(), QDate(2975,12,6) );
+ events = calendar()->events( TQDate::currentDate(), TQDate(2975,12,6) );
Event::List::ConstIterator it2;
for( it2 = events.begin(); it2 != events.end(); ++it2 ) {
Event *ev = *it2;
@@ -237,7 +237,7 @@ void KOWhatsNextView::updateView()
mView->setText(mText);
}
-void KOWhatsNextView::showDates( const QDate &start, const QDate &end )
+void KOWhatsNextView::showDates( const TQDate &start, const TQDate &end )
{
mStartDate = start;
mEndDate = end;
@@ -261,8 +261,8 @@ void KOWhatsNextView::changeIncidenceDisplay(Incidence *, int action)
}
}
-void KOWhatsNextView::appendEvent( Incidence *ev, const QDateTime &start,
- const QDateTime &end )
+void KOWhatsNextView::appendEvent( Incidence *ev, const TQDateTime &start,
+ const TQDateTime &end )
{
kdDebug(5850) << "KOWhatsNextView::appendEvent(): " << ev->uid() << endl;
@@ -270,10 +270,10 @@ void KOWhatsNextView::appendEvent( Incidence *ev, const QDateTime &start,
// if (!ev->doesFloat()) {
if (ev->type()=="Event") {
Event *event = static_cast<Event *>(ev);
- QDateTime starttime( start );
+ TQDateTime starttime( start );
if ( !starttime.isValid() )
starttime = event->dtStart();
- QDateTime endtime( end );
+ TQDateTime endtime( end );
if ( !endtime.isValid() )
endtime = starttime.addSecs(
event->dtStart().secsTo( event->dtEnd() ) );
@@ -319,7 +319,7 @@ void KOWhatsNextView::appendTodo( Incidence *ev )
mText += "</li>\n";
}
-void KOWhatsNextView::showIncidence( const QString &uid )
+void KOWhatsNextView::showIncidence( const TQString &uid )
{
kdDebug(5850) << "KOWhatsNextView::showIncidence(): " << uid << endl;
Incidence *incidence = 0;
diff --git a/korganizer/kowhatsnextview.h b/korganizer/kowhatsnextview.h
index 7632fd028..54daf616c 100644
--- a/korganizer/kowhatsnextview.h
+++ b/korganizer/kowhatsnextview.h
@@ -24,7 +24,7 @@
#ifndef KOWHATSNEXTVIEW_H
#define KOWHATSNEXTVIEW_H
-#include <qtextbrowser.h>
+#include <tqtextbrowser.h>
#include <korganizer/baseview.h>
@@ -32,15 +32,15 @@ class QListView;
class KOEventViewerDialog;
-class WhatsNextTextBrowser : public QTextBrowser {
+class WhatsNextTextBrowser : public TQTextBrowser {
Q_OBJECT
public:
- WhatsNextTextBrowser(QWidget *parent) : QTextBrowser(parent) {}
+ WhatsNextTextBrowser(TQWidget *parent) : TQTextBrowser(parent) {}
- void setSource(const QString &);
+ void setSource(const TQString &);
signals:
- void showIncidence(const QString &uid);
+ void showIncidence(const TQString &uid);
};
@@ -51,7 +51,7 @@ class KOWhatsNextView : public KOrg::BaseView
{
Q_OBJECT
public:
- KOWhatsNextView(Calendar *calendar, QWidget *parent = 0,
+ KOWhatsNextView(Calendar *calendar, TQWidget *parent = 0,
const char *name = 0);
~KOWhatsNextView();
@@ -61,24 +61,24 @@ class KOWhatsNextView : public KOrg::BaseView
public slots:
virtual void updateView();
- virtual void showDates(const QDate &start, const QDate &end);
+ virtual void showDates(const TQDate &start, const TQDate &end);
virtual void showIncidences( const Incidence::List &incidenceList );
void changeIncidenceDisplay(Incidence *, int);
protected:
- void appendEvent( Incidence *, const QDateTime &start = QDateTime(),
- const QDateTime &end = QDateTime() );
+ void appendEvent( Incidence *, const TQDateTime &start = TQDateTime(),
+ const TQDateTime &end = TQDateTime() );
void appendTodo( Incidence * );
private slots:
- void showIncidence(const QString &);
+ void showIncidence(const TQString &);
private:
- QTextBrowser *mView;
- QString mText;
- QDate mStartDate;
- QDate mEndDate;
+ TQTextBrowser *mView;
+ TQString mText;
+ TQDate mStartDate;
+ TQDate mEndDate;
Incidence::List mTodos;
};
diff --git a/korganizer/kowindowlist.cpp b/korganizer/kowindowlist.cpp
index 8af857cb4..ddb3d680a 100644
--- a/korganizer/kowindowlist.cpp
+++ b/korganizer/kowindowlist.cpp
@@ -29,7 +29,7 @@
#include "kowindowlist.moc"
KOWindowList::KOWindowList( const char *name )
- : QObject( 0, name ), mDefaultWindow( 0 )
+ : TQObject( 0, name ), mDefaultWindow( 0 )
{
// kdDebug(5850) << "KOWindowList::KOWindowList()" << endl;
}
diff --git a/korganizer/kowindowlist.h b/korganizer/kowindowlist.h
index b8fc3190f..97ce2d1f2 100644
--- a/korganizer/kowindowlist.h
+++ b/korganizer/kowindowlist.h
@@ -24,7 +24,7 @@
#ifndef KOWINDOWLIST_H
#define KOWINDOWLIST_H
-#include <qobject.h>
+#include <tqobject.h>
namespace KOrg {
class MainWindow;
@@ -78,7 +78,7 @@ class KOWindowList : public QObject
void removeWindow( KOrg::MainWindow * );
private:
- QPtrList<KOrg::MainWindow> mWindowList; // list of all existing KOrganizer instances
+ TQPtrList<KOrg::MainWindow> mWindowList; // list of all existing KOrganizer instances
KOrg::MainWindow *mDefaultWindow;
};
diff --git a/korganizer/mailscheduler.cpp b/korganizer/mailscheduler.cpp
index bbd3daee5..0c0ddb966 100644
--- a/korganizer/mailscheduler.cpp
+++ b/korganizer/mailscheduler.cpp
@@ -22,9 +22,9 @@
without including the source code for Qt in the source distribution.
*/
-#include <qdir.h>
-#include <qfile.h>
-#include <qregexp.h>
+#include <tqdir.h>
+#include <tqfile.h>
+#include <tqregexp.h>
#include <klocale.h>
#include <kstandarddirs.h>
@@ -52,9 +52,9 @@ MailScheduler::~MailScheduler()
}
bool MailScheduler::publish( IncidenceBase *incidence,
- const QString &recipients )
+ const TQString &recipients )
{
- QString messageText = mFormat->createScheduleMessage( incidence,
+ TQString messageText = mFormat->createScheduleMessage( incidence,
Scheduler::Publish );
KOMailClient mailer;
return mailer.mailTo( incidence, recipients, messageText );
@@ -62,9 +62,9 @@ bool MailScheduler::publish( IncidenceBase *incidence,
bool MailScheduler::performTransaction( IncidenceBase *incidence,
Method method,
- const QString &recipients )
+ const TQString &recipients )
{
- QString messageText = mFormat->createScheduleMessage( incidence, method );
+ TQString messageText = mFormat->createScheduleMessage( incidence, method );
KOMailClient mailer;
return mailer.mailTo( incidence, recipients, messageText );
@@ -73,7 +73,7 @@ bool MailScheduler::performTransaction( IncidenceBase *incidence,
bool MailScheduler::performTransaction( IncidenceBase *incidence,
Method method )
{
- QString messageText = mFormat->createScheduleMessage( incidence, method );
+ TQString messageText = mFormat->createScheduleMessage( incidence, method );
KOMailClient mailer;
bool status;
@@ -83,7 +83,7 @@ bool MailScheduler::performTransaction( IncidenceBase *incidence,
method == Declinecounter ) {
status = mailer.mailAttendees( incidence, messageText );
} else {
- QString subject;
+ TQString subject;
Incidence *inc = dynamic_cast<Incidence*>( incidence );
if ( inc && method == Counter )
subject = i18n( "Counter proposal: %1" ).arg( inc->summary() );
@@ -92,23 +92,23 @@ bool MailScheduler::performTransaction( IncidenceBase *incidence,
return status;
}
-QPtrList<ScheduleMessage> MailScheduler::retrieveTransactions()
+TQPtrList<ScheduleMessage> MailScheduler::retrieveTransactions()
{
- QString incomingDirName = locateLocal( "data", "korganizer/income" );
+ TQString incomingDirName = locateLocal( "data", "korganizer/income" );
kdDebug(5850) << "MailScheduler::retrieveTransactions: dir: "
<< incomingDirName << endl;
- QPtrList<ScheduleMessage> messageList;
+ TQPtrList<ScheduleMessage> messageList;
- QDir incomingDir( incomingDirName );
- QStringList incoming = incomingDir.entryList( QDir::Files );
- QStringList::ConstIterator it;
+ TQDir incomingDir( incomingDirName );
+ TQStringList incoming = incomingDir.entryList( TQDir::Files );
+ TQStringList::ConstIterator it;
for( it = incoming.begin(); it != incoming.end(); ++it ) {
kdDebug(5850) << "-- File: " << (*it) << endl;
- QFile f( incomingDirName + "/" + (*it) );
+ TQFile f( incomingDirName + "/" + (*it) );
bool inserted = false;
- QMap<IncidenceBase*, QString>::Iterator iter;
+ TQMap<IncidenceBase*, TQString>::Iterator iter;
for ( iter = mEventMap.begin(); iter != mEventMap.end(); ++iter ) {
if ( iter.data() == incomingDirName + "/" + (*it) )
inserted = true;
@@ -119,11 +119,11 @@ QPtrList<ScheduleMessage> MailScheduler::retrieveTransactions()
<< "MailScheduler::retrieveTransactions(): Can't open file'"
<< (*it) << "'" << endl;
} else {
- QTextStream t( &f );
- t.setEncoding( QTextStream::Latin1 );
- QString messageString = t.read();
- messageString.replace( QRegExp( "\n[ \t]"), "" );
- messageString = QString::fromUtf8( messageString.latin1() );
+ TQTextStream t( &f );
+ t.setEncoding( TQTextStream::Latin1 );
+ TQString messageString = t.read();
+ messageString.replace( TQRegExp( "\n[ \t]"), "" );
+ messageString = TQString::fromUtf8( messageString.latin1() );
ScheduleMessage *mess = mFormat->parseScheduleMessage( mCalendar,
messageString );
if ( mess) {
@@ -133,7 +133,7 @@ QPtrList<ScheduleMessage> MailScheduler::retrieveTransactions()
messageList.append( mess );
mEventMap[ mess->event() ] = incomingDirName + "/" + (*it);
} else {
- QString errorMessage;
+ TQString errorMessage;
if ( mFormat->exception() ) {
errorMessage = mFormat->exception()->message();
}
@@ -151,7 +151,7 @@ QPtrList<ScheduleMessage> MailScheduler::retrieveTransactions()
bool MailScheduler::deleteTransaction( IncidenceBase *incidence )
{
bool status;
- QFile f( mEventMap[incidence] );
+ TQFile f( mEventMap[incidence] );
mEventMap.remove( incidence );
if ( !f.exists() ) {
status = false;
@@ -161,7 +161,7 @@ bool MailScheduler::deleteTransaction( IncidenceBase *incidence )
return status;
}
-QString MailScheduler::freeBusyDir()
+TQString MailScheduler::freeBusyDir()
{
return locateLocal( "data", "korganizer/freebusy" );
}
diff --git a/korganizer/mailscheduler.h b/korganizer/mailscheduler.h
index 50a60dcff..7553ee74d 100644
--- a/korganizer/mailscheduler.h
+++ b/korganizer/mailscheduler.h
@@ -24,9 +24,9 @@
#ifndef MAILSCHEDULER_H
#define MAILSCHEDULER_H
-#include <qptrlist.h>
-#include <qmap.h>
-#include <qstring.h>
+#include <tqptrlist.h>
+#include <tqmap.h>
+#include <tqstring.h>
#include <libkcal/imipscheduler.h>
@@ -42,22 +42,22 @@ class MailScheduler : public IMIPScheduler
MailScheduler( Calendar * );
virtual ~MailScheduler();
- bool publish ( IncidenceBase *incidence, const QString &recipients );
+ bool publish ( IncidenceBase *incidence, const TQString &recipients );
bool performTransaction( IncidenceBase *incidence, Method method );
bool performTransaction( IncidenceBase *incidence, Method method,
- const QString &recipients );
- QPtrList<ScheduleMessage> retrieveTransactions();
+ const TQString &recipients );
+ TQPtrList<ScheduleMessage> retrieveTransactions();
bool deleteTransaction( IncidenceBase *incidence );
/** Returns the directory where the free-busy information is stored */
- virtual QString freeBusyDir();
+ virtual TQString freeBusyDir();
/** Accepts a counter proposal */
bool acceptCounterProposal( Incidence *incidence );
private:
- QMap<IncidenceBase *, QString> mEventMap;
+ TQMap<IncidenceBase *, TQString> mEventMap;
};
}
diff --git a/korganizer/multiagendaview.cpp b/korganizer/multiagendaview.cpp
index e2a7281e8..fb5cd6255 100644
--- a/korganizer/multiagendaview.cpp
+++ b/korganizer/multiagendaview.cpp
@@ -27,68 +27,68 @@
#include <kglobalsettings.h>
-#include <qlayout.h>
-#include <qvbox.h>
-#include <qobjectlist.h>
+#include <tqlayout.h>
+#include <tqvbox.h>
+#include <tqobjectlist.h>
#define FOREACH_VIEW(av) \
-for(QValueList<KOAgendaView*>::ConstIterator it = mAgendaViews.constBegin(); \
+for(TQValueList<KOAgendaView*>::ConstIterator it = mAgendaViews.constBegin(); \
it != mAgendaViews.constEnd();) \
for(KOAgendaView* av = (it != mAgendaViews.constEnd() ? (*it) : 0); \
it != mAgendaViews.constEnd(); ++it, av = (*it) )
using namespace KOrg;
-MultiAgendaView::MultiAgendaView(Calendar * cal, QWidget * parent, const char *name ) :
+MultiAgendaView::MultiAgendaView(Calendar * cal, TQWidget * parent, const char *name ) :
AgendaView( cal, parent, name ),
mLastMovedSplitter( 0 ),
mUpdateOnShow( false ),
mPendingChanges( true )
{
- QBoxLayout *topLevelLayout = new QHBoxLayout( this );
+ TQBoxLayout *topLevelLayout = new TQHBoxLayout( this );
- QFontMetrics fm( font() );
+ TQFontMetrics fm( font() );
int topLabelHeight = 2 * fm.height();
- QVBox *topSideBox = new QVBox( this );
- QWidget *topSideSpacer = new QWidget( topSideBox );
+ TQVBox *topSideBox = new TQVBox( this );
+ TQWidget *topSideSpacer = new TQWidget( topSideBox );
topSideSpacer->setFixedHeight( topLabelHeight );
- mLeftSplitter = new QSplitter( Qt::Vertical, topSideBox );
+ mLeftSplitter = new TQSplitter( Qt::Vertical, topSideBox );
mLeftSplitter->setOpaqueResize( KGlobalSettings::opaqueResize() );
- QLabel *label = new QLabel( i18n("All Day"), mLeftSplitter );
+ TQLabel *label = new TQLabel( i18n("All Day"), mLeftSplitter );
label->setAlignment( Qt::AlignRight | Qt::AlignVCenter | Qt::WordBreak );
- QVBox *sideBox = new QVBox( mLeftSplitter );
+ TQVBox *sideBox = new TQVBox( mLeftSplitter );
EventIndicator *eiSpacer = new EventIndicator( EventIndicator::Top, sideBox );
eiSpacer->changeColumns( 0 );
mTimeLabels = new TimeLabels( 24, sideBox );
eiSpacer = new EventIndicator( EventIndicator::Bottom, sideBox );
eiSpacer->changeColumns( 0 );
- mLeftBottomSpacer = new QWidget( topSideBox );
+ mLeftBottomSpacer = new TQWidget( topSideBox );
topLevelLayout->addWidget( topSideBox );
- mScrollView = new QScrollView( this );
- mScrollView->setResizePolicy( QScrollView::Manual );
- mScrollView->setVScrollBarMode( QScrollView::AlwaysOff );
- mScrollView->setFrameShape( QFrame::NoFrame );
+ mScrollView = new TQScrollView( this );
+ mScrollView->setResizePolicy( TQScrollView::Manual );
+ mScrollView->setVScrollBarMode( TQScrollView::AlwaysOff );
+ mScrollView->setFrameShape( TQFrame::NoFrame );
topLevelLayout->addWidget( mScrollView, 100 );
- mTopBox = new QHBox( mScrollView->viewport() );
+ mTopBox = new TQHBox( mScrollView->viewport() );
mScrollView->addChild( mTopBox );
- topSideBox = new QVBox( this );
- topSideSpacer = new QWidget( topSideBox );
+ topSideBox = new TQVBox( this );
+ topSideSpacer = new TQWidget( topSideBox );
topSideSpacer->setFixedHeight( topLabelHeight );
- mRightSplitter = new QSplitter( Qt::Vertical, topSideBox );
+ mRightSplitter = new TQSplitter( Qt::Vertical, topSideBox );
mRightSplitter->setOpaqueResize( KGlobalSettings::opaqueResize() );
- new QWidget( mRightSplitter );
- sideBox = new QVBox( mRightSplitter );
+ new TQWidget( mRightSplitter );
+ sideBox = new TQVBox( mRightSplitter );
eiSpacer = new EventIndicator( EventIndicator::Top, sideBox );
eiSpacer->setFixedHeight( eiSpacer->minimumHeight() );
eiSpacer->changeColumns( 0 );
- mScrollBar = new QScrollBar( Qt::Vertical, sideBox );
+ mScrollBar = new TQScrollBar( Qt::Vertical, sideBox );
eiSpacer = new EventIndicator( EventIndicator::Bottom, sideBox );
eiSpacer->setFixedHeight( eiSpacer->minimumHeight() );
eiSpacer->changeColumns( 0 );
- mRightBottomSpacer = new QWidget( topSideBox );
+ mRightBottomSpacer = new TQWidget( topSideBox );
topLevelLayout->addWidget( topSideBox );
recreateViews();
@@ -113,9 +113,9 @@ void MultiAgendaView::recreateViews()
CalendarResourceManager *manager = calres->resourceManager();
for ( CalendarResourceManager::ActiveIterator it = manager->activeBegin(); it != manager->activeEnd(); ++it ) {
if ( (*it)->canHaveSubresources() ) {
- QStringList subResources = (*it)->subresources();
- for ( QStringList::ConstIterator subit = subResources.constBegin(); subit != subResources.constEnd(); ++subit ) {
- QString type = (*it)->subresourceType( *subit );
+ TQStringList subResources = (*it)->subresources();
+ for ( TQStringList::ConstIterator subit = subResources.constBegin(); subit != subResources.constEnd(); ++subit ) {
+ TQString type = (*it)->subresourceType( *subit );
if ( !(*it)->subresourceActive( *subit ) || (!type.isEmpty() && type != "event") )
continue;
addView( (*it)->labelForSubresource( *subit ), *it, *subit );
@@ -131,19 +131,19 @@ void MultiAgendaView::recreateViews()
return;
setupViews();
- QTimer::singleShot( 0, this, SLOT(slotResizeScrollView()) );
+ TQTimer::singleShot( 0, this, TQT_SLOT(slotResizeScrollView()) );
mTimeLabels->updateConfig();
- QScrollBar *scrollBar = mAgendaViews.first()->agenda()->verticalScrollBar();
+ TQScrollBar *scrollBar = mAgendaViews.first()->agenda()->verticalScrollBar();
mScrollBar->setMinValue( scrollBar->minValue() );
mScrollBar->setMaxValue( scrollBar->maxValue() );
mScrollBar->setLineStep( scrollBar->lineStep() );
mScrollBar->setPageStep( scrollBar->pageStep() );
mScrollBar->setValue( scrollBar->value() );
- connect( mTimeLabels->verticalScrollBar(), SIGNAL(valueChanged(int)),
- mScrollBar, SLOT(setValue(int)) );
- connect( mScrollBar, SIGNAL(valueChanged(int)),
- mTimeLabels, SLOT(positionChanged(int)) );
+ connect( mTimeLabels->verticalScrollBar(), TQT_SIGNAL(valueChanged(int)),
+ mScrollBar, TQT_SLOT(setValue(int)) );
+ connect( mScrollBar, TQT_SIGNAL(valueChanged(int)),
+ mTimeLabels, TQT_SLOT(positionChanged(int)) );
installSplitterEventFilter( mLeftSplitter );
installSplitterEventFilter( mRightSplitter );
@@ -152,7 +152,7 @@ void MultiAgendaView::recreateViews()
void MultiAgendaView::deleteViews()
{
- for ( QValueList<QWidget*>::ConstIterator it = mAgendaWidgets.constBegin();
+ for ( TQValueList<TQWidget*>::ConstIterator it = mAgendaWidgets.constBegin();
it != mAgendaWidgets.constEnd(); ++it ) {
delete *it;
}
@@ -164,53 +164,53 @@ void MultiAgendaView::deleteViews()
void MultiAgendaView::setupViews()
{
FOREACH_VIEW( agenda ) {
- connect( agenda, SIGNAL( newEventSignal() ),
- SIGNAL( newEventSignal() ) );
- connect( agenda, SIGNAL( editIncidenceSignal( Incidence * ) ),
- SIGNAL( editIncidenceSignal( Incidence * ) ) );
- connect( agenda, SIGNAL( showIncidenceSignal( Incidence * ) ),
- SIGNAL( showIncidenceSignal( Incidence * ) ) );
- connect( agenda, SIGNAL( deleteIncidenceSignal( Incidence * ) ),
- SIGNAL( deleteIncidenceSignal( Incidence * ) ) );
- connect( agenda, SIGNAL( startMultiModify( const QString & ) ),
- SIGNAL( startMultiModify( const QString & ) ) );
- connect( agenda, SIGNAL( endMultiModify() ),
- SIGNAL( endMultiModify() ) );
-
- connect( agenda, SIGNAL( incidenceSelected( Incidence * ) ),
- SIGNAL( incidenceSelected( Incidence * ) ) );
-
- connect( agenda, SIGNAL(cutIncidenceSignal(Incidence*)),
- SIGNAL(cutIncidenceSignal(Incidence*)) );
- connect( agenda, SIGNAL(copyIncidenceSignal(Incidence*)),
- SIGNAL(copyIncidenceSignal(Incidence*)) );
- connect( agenda, SIGNAL(pasteIncidenceSignal()),
- SIGNAL(pasteIncidenceSignal()) );
- connect( agenda, SIGNAL(toggleAlarmSignal(Incidence*)),
- SIGNAL(toggleAlarmSignal(Incidence*)) );
- connect( agenda, SIGNAL(dissociateOccurrenceSignal(Incidence*, const QDate&)),
- SIGNAL(dissociateOccurrenceSignal(Incidence*, const QDate&)) );
- connect( agenda, SIGNAL(dissociateFutureOccurrenceSignal(Incidence*, const QDate&)),
- SIGNAL(dissociateFutureOccurrenceSignal(Incidence*, const QDate&)) );
-
- connect( agenda, SIGNAL(newEventSignal(const QDate&)),
- SIGNAL(newEventSignal(const QDate&)) );
- connect( agenda, SIGNAL(newEventSignal(const QDateTime&)),
- SIGNAL(newEventSignal(const QDateTime&)) );
- connect( agenda, SIGNAL(newEventSignal(const QDateTime&, const QDateTime&)),
- SIGNAL(newEventSignal(const QDateTime&, const QDateTime&)) );
- connect( agenda, SIGNAL(newTodoSignal(const QDate&)),
- SIGNAL(newTodoSignal(const QDate&)) );
-
- connect( agenda, SIGNAL(incidenceSelected(Incidence*)),
- SLOT(slotSelectionChanged()) );
-
- connect( agenda, SIGNAL(timeSpanSelectionChanged()),
- SLOT(slotClearTimeSpanSelection()) );
-
- disconnect( agenda->agenda(), SIGNAL(zoomView(const int,const QPoint&,const Qt::Orientation)), agenda, 0 );
- connect( agenda->agenda(), SIGNAL(zoomView(const int,const QPoint&,const Qt::Orientation)),
- SLOT(zoomView(const int,const QPoint&,const Qt::Orientation)) );
+ connect( agenda, TQT_SIGNAL( newEventSignal() ),
+ TQT_SIGNAL( newEventSignal() ) );
+ connect( agenda, TQT_SIGNAL( editIncidenceSignal( Incidence * ) ),
+ TQT_SIGNAL( editIncidenceSignal( Incidence * ) ) );
+ connect( agenda, TQT_SIGNAL( showIncidenceSignal( Incidence * ) ),
+ TQT_SIGNAL( showIncidenceSignal( Incidence * ) ) );
+ connect( agenda, TQT_SIGNAL( deleteIncidenceSignal( Incidence * ) ),
+ TQT_SIGNAL( deleteIncidenceSignal( Incidence * ) ) );
+ connect( agenda, TQT_SIGNAL( startMultiModify( const TQString & ) ),
+ TQT_SIGNAL( startMultiModify( const TQString & ) ) );
+ connect( agenda, TQT_SIGNAL( endMultiModify() ),
+ TQT_SIGNAL( endMultiModify() ) );
+
+ connect( agenda, TQT_SIGNAL( incidenceSelected( Incidence * ) ),
+ TQT_SIGNAL( incidenceSelected( Incidence * ) ) );
+
+ connect( agenda, TQT_SIGNAL(cutIncidenceSignal(Incidence*)),
+ TQT_SIGNAL(cutIncidenceSignal(Incidence*)) );
+ connect( agenda, TQT_SIGNAL(copyIncidenceSignal(Incidence*)),
+ TQT_SIGNAL(copyIncidenceSignal(Incidence*)) );
+ connect( agenda, TQT_SIGNAL(pasteIncidenceSignal()),
+ TQT_SIGNAL(pasteIncidenceSignal()) );
+ connect( agenda, TQT_SIGNAL(toggleAlarmSignal(Incidence*)),
+ TQT_SIGNAL(toggleAlarmSignal(Incidence*)) );
+ connect( agenda, TQT_SIGNAL(dissociateOccurrenceSignal(Incidence*, const TQDate&)),
+ TQT_SIGNAL(dissociateOccurrenceSignal(Incidence*, const TQDate&)) );
+ connect( agenda, TQT_SIGNAL(dissociateFutureOccurrenceSignal(Incidence*, const TQDate&)),
+ TQT_SIGNAL(dissociateFutureOccurrenceSignal(Incidence*, const TQDate&)) );
+
+ connect( agenda, TQT_SIGNAL(newEventSignal(const TQDate&)),
+ TQT_SIGNAL(newEventSignal(const TQDate&)) );
+ connect( agenda, TQT_SIGNAL(newEventSignal(const TQDateTime&)),
+ TQT_SIGNAL(newEventSignal(const TQDateTime&)) );
+ connect( agenda, TQT_SIGNAL(newEventSignal(const TQDateTime&, const TQDateTime&)),
+ TQT_SIGNAL(newEventSignal(const TQDateTime&, const TQDateTime&)) );
+ connect( agenda, TQT_SIGNAL(newTodoSignal(const TQDate&)),
+ TQT_SIGNAL(newTodoSignal(const TQDate&)) );
+
+ connect( agenda, TQT_SIGNAL(incidenceSelected(Incidence*)),
+ TQT_SLOT(slotSelectionChanged()) );
+
+ connect( agenda, TQT_SIGNAL(timeSpanSelectionChanged()),
+ TQT_SLOT(slotClearTimeSpanSelection()) );
+
+ disconnect( agenda->agenda(), TQT_SIGNAL(zoomView(const int,const TQPoint&,const Qt::Orientation)), agenda, 0 );
+ connect( agenda->agenda(), TQT_SIGNAL(zoomView(const int,const TQPoint&,const Qt::Orientation)),
+ TQT_SLOT(zoomView(const int,const TQPoint&,const Qt::Orientation)) );
}
FOREACH_VIEW( agenda ) {
@@ -218,9 +218,9 @@ void MultiAgendaView::setupViews()
}
int minWidth = 0;
- for ( QValueList<QWidget*>::ConstIterator it = mAgendaWidgets.constBegin(); it != mAgendaWidgets.constEnd(); ++it )
+ for ( TQValueList<TQWidget*>::ConstIterator it = mAgendaWidgets.constBegin(); it != mAgendaWidgets.constEnd(); ++it )
minWidth = QMAX( minWidth, (*it)->minimumSizeHint().width() );
- for ( QValueList<QWidget*>::ConstIterator it = mAgendaWidgets.constBegin(); it != mAgendaWidgets.constEnd(); ++it )
+ for ( TQValueList<TQWidget*>::ConstIterator it = mAgendaWidgets.constBegin(); it != mAgendaWidgets.constEnd(); ++it )
(*it)->setMinimumWidth( minWidth );
}
@@ -253,7 +253,7 @@ int MultiAgendaView::currentDateCount()
return 0;
}
-void MultiAgendaView::showDates(const QDate & start, const QDate & end)
+void MultiAgendaView::showDates(const TQDate & start, const TQDate & end)
{
mStartDate = start;
mEndDate = end;
@@ -296,7 +296,7 @@ void MultiAgendaView::slotSelectionChanged()
}
}
-bool MultiAgendaView::eventDurationHint(QDateTime & startDt, QDateTime & endDt, bool & allDay)
+bool MultiAgendaView::eventDurationHint(TQDateTime & startDt, TQDateTime & endDt, bool & allDay)
{
FOREACH_VIEW( agenda ) {
bool valid = agenda->eventDurationHint( startDt, endDt, allDay );
@@ -314,7 +314,7 @@ void MultiAgendaView::slotClearTimeSpanSelection()
}
}
-void MultiAgendaView::setTypeAheadReceiver(QObject * o)
+void MultiAgendaView::setTypeAheadReceiver(TQObject * o)
{
FOREACH_VIEW( agenda )
agenda->setTypeAheadReceiver( o );
@@ -326,35 +326,35 @@ void MultiAgendaView::finishTypeAhead()
agenda->finishTypeAhead();
}
-void MultiAgendaView::addView( const QString &label, KCal::ResourceCalendar * res, const QString & subRes )
+void MultiAgendaView::addView( const TQString &label, KCal::ResourceCalendar * res, const TQString & subRes )
{
- QVBox *box = new QVBox( mTopBox );
- QLabel *l = new QLabel( label, box );
+ TQVBox *box = new TQVBox( mTopBox );
+ TQLabel *l = new TQLabel( label, box );
l->setAlignment( AlignVCenter | AlignHCenter );
KOAgendaView* av = new KOAgendaView( calendar(), box, 0, true );
av->setResource( res, subRes );
av->setIncidenceChanger( mChanger );
- av->agenda()->setVScrollBarMode( QScrollView::AlwaysOff );
+ av->agenda()->setVScrollBarMode( TQScrollView::AlwaysOff );
mAgendaViews.append( av );
mAgendaWidgets.append( box );
box->show();
mTimeLabels->setAgenda( av->agenda() );
- connect( av->agenda()->verticalScrollBar(), SIGNAL(valueChanged(int)),
- mTimeLabels, SLOT(positionChanged(int)) );
- connect( mTimeLabels->verticalScrollBar(), SIGNAL(valueChanged(int)),
- av, SLOT(setContentsPos(int)) );
+ connect( av->agenda()->verticalScrollBar(), TQT_SIGNAL(valueChanged(int)),
+ mTimeLabels, TQT_SLOT(positionChanged(int)) );
+ connect( mTimeLabels->verticalScrollBar(), TQT_SIGNAL(valueChanged(int)),
+ av, TQT_SLOT(setContentsPos(int)) );
installSplitterEventFilter( av->splitter() );
}
-void MultiAgendaView::resizeEvent(QResizeEvent * ev)
+void MultiAgendaView::resizeEvent(TQResizeEvent * ev)
{
resizeScrollView( ev->size() );
AgendaView::resizeEvent( ev );
}
-void MultiAgendaView::resizeScrollView(const QSize & size)
+void MultiAgendaView::resizeScrollView(const TQSize & size)
{
const int widgetWidth = size.width() - mTimeLabels->width() - mScrollBar->width();
int width = QMAX( mTopBox->sizeHint().width(), widgetWidth );
@@ -387,12 +387,12 @@ void MultiAgendaView::updateConfig()
agenda->updateConfig();
}
-// KDE4: not needed anymore, QSplitter has a moved signal there
-bool MultiAgendaView::eventFilter(QObject * obj, QEvent * event)
+// KDE4: not needed anymore, TQSplitter has a moved signal there
+bool MultiAgendaView::eventFilter(TQObject * obj, TQEvent * event)
{
- if ( obj->className() == QCString("QSplitterHandle") ) {
- if ( (event->type() == QEvent::MouseMove && KGlobalSettings::opaqueResize())
- || event->type() == QEvent::MouseButtonRelease ) {
+ if ( obj->className() == TQCString("QSplitterHandle") ) {
+ if ( (event->type() == TQEvent::MouseMove && KGlobalSettings::opaqueResize())
+ || event->type() == TQEvent::MouseButtonRelease ) {
FOREACH_VIEW( agenda ) {
if ( agenda->splitter() == obj->parent() )
mLastMovedSplitter = agenda->splitter();
@@ -401,7 +401,7 @@ bool MultiAgendaView::eventFilter(QObject * obj, QEvent * event)
mLastMovedSplitter = mLeftSplitter;
else if ( mRightSplitter == obj->parent() )
mLastMovedSplitter = mRightSplitter;
- QTimer::singleShot( 0, this, SLOT(resizeSplitters()) );
+ TQTimer::singleShot( 0, this, TQT_SLOT(resizeSplitters()) );
}
}
return AgendaView::eventFilter( obj, event );
@@ -422,7 +422,7 @@ void MultiAgendaView::resizeSplitters()
mRightSplitter->setSizes( mLastMovedSplitter->sizes() );
}
-void MultiAgendaView::zoomView( const int delta, const QPoint & pos, const Qt::Orientation ori )
+void MultiAgendaView::zoomView( const int delta, const TQPoint & pos, const Qt::Orientation ori )
{
if ( ori == Qt::Vertical ) {
if ( delta > 0 ) {
@@ -441,16 +441,16 @@ void MultiAgendaView::zoomView( const int delta, const QPoint & pos, const Qt::O
mTimeLabels->repaint();
}
-// KDE4: not needed, use existing QSplitter signals instead
-void MultiAgendaView::installSplitterEventFilter(QSplitter * splitter)
+// KDE4: not needed, use existing TQSplitter signals instead
+void MultiAgendaView::installSplitterEventFilter(TQSplitter * splitter)
{
- QObjectList *objlist = splitter->queryList( "QSplitterHandle" );
+ TQObjectList *objlist = splitter->queryList( "QSplitterHandle" );
// HACK: when not being visible, the splitter handle is sometimes not found
// for unknown reasons, so trigger an update when we are shown again
if ( objlist->count() == 0 && !isVisible() )
mUpdateOnShow = true;
- QObjectListIt it( *objlist );
- QObject *obj;
+ TQObjectListIt it( *objlist );
+ TQObject *obj;
while ( (obj = it.current()) != 0 ) {
obj->removeEventFilter( this );
obj->installEventFilter( this );
diff --git a/korganizer/multiagendaview.h b/korganizer/multiagendaview.h
index 8145dd66b..01b74ce74 100644
--- a/korganizer/multiagendaview.h
+++ b/korganizer/multiagendaview.h
@@ -41,7 +41,7 @@ class MultiAgendaView : public AgendaView
{
Q_OBJECT
public:
- explicit MultiAgendaView( Calendar* cal, QWidget *parent = 0, const char *name = 0 );
+ explicit MultiAgendaView( Calendar* cal, TQWidget *parent = 0, const char *name = 0 );
~MultiAgendaView();
Incidence::List selectedIncidences();
@@ -49,12 +49,12 @@ class MultiAgendaView : public AgendaView
int currentDateCount();
int maxDatesHint();
- bool eventDurationHint(QDateTime &startDt, QDateTime &endDt, bool &allDay);
+ bool eventDurationHint(TQDateTime &startDt, TQDateTime &endDt, bool &allDay);
- void setTypeAheadReceiver( QObject *o );
+ void setTypeAheadReceiver( TQObject *o );
public slots:
- void showDates( const QDate &start, const QDate &end );
+ void showDates( const TQDate &start, const TQDate &end );
void showIncidences( const Incidence::List &incidenceList );
void updateView();
void changeIncidenceDisplay( Incidence *incidence, int mode );
@@ -69,35 +69,35 @@ class MultiAgendaView : public AgendaView
void resourcesChanged();
protected:
- void resizeEvent( QResizeEvent *ev );
- bool eventFilter( QObject *obj, QEvent *event );
+ void resizeEvent( TQResizeEvent *ev );
+ bool eventFilter( TQObject *obj, TQEvent *event );
private:
- void addView( const QString &label, KCal::ResourceCalendar *res, const QString &subRes = QString::null );
+ void addView( const TQString &label, KCal::ResourceCalendar *res, const TQString &subRes = TQString::null );
void deleteViews();
void recreateViews();
void setupViews();
- void resizeScrollView( const QSize &size );
- void installSplitterEventFilter( QSplitter *splitter );
+ void resizeScrollView( const TQSize &size );
+ void installSplitterEventFilter( TQSplitter *splitter );
private slots:
void slotSelectionChanged();
void slotClearTimeSpanSelection();
void resizeSplitters();
- void zoomView( const int delta, const QPoint &pos, const Qt::Orientation ori );
+ void zoomView( const int delta, const TQPoint &pos, const Qt::Orientation ori );
void slotResizeScrollView();
private:
- QValueList<KOAgendaView*> mAgendaViews;
- QValueList<QWidget*> mAgendaWidgets;
- QHBox *mTopBox;
- QScrollView *mScrollView;
+ TQValueList<KOAgendaView*> mAgendaViews;
+ TQValueList<TQWidget*> mAgendaWidgets;
+ TQHBox *mTopBox;
+ TQScrollView *mScrollView;
TimeLabels *mTimeLabels;
- QSplitter *mLeftSplitter, *mRightSplitter;
- QSplitter *mLastMovedSplitter;
- QScrollBar *mScrollBar;
- QWidget *mLeftBottomSpacer, *mRightBottomSpacer;
- QDate mStartDate, mEndDate;
+ TQSplitter *mLeftSplitter, *mRightSplitter;
+ TQSplitter *mLastMovedSplitter;
+ TQScrollBar *mScrollBar;
+ TQWidget *mLeftBottomSpacer, *mRightBottomSpacer;
+ TQDate mStartDate, mEndDate;
bool mUpdateOnShow;
bool mPendingChanges;
};
diff --git a/korganizer/navigatorbar.cpp b/korganizer/navigatorbar.cpp
index dd7b45ea6..0ece74c57 100644
--- a/korganizer/navigatorbar.cpp
+++ b/korganizer/navigatorbar.cpp
@@ -22,13 +22,13 @@
without including the source code for Qt in the source distribution.
*/
-#include <qstring.h>
-#include <qtooltip.h>
-#include <qpushbutton.h>
-#include <qlayout.h>
-#include <qframe.h>
-#include <qpopupmenu.h>
-#include <qlabel.h>
+#include <tqstring.h>
+#include <tqtooltip.h>
+#include <tqpushbutton.h>
+#include <tqlayout.h>
+#include <tqframe.h>
+#include <tqpopupmenu.h>
+#include <tqlabel.h>
#include <kdebug.h>
#include <klocale.h>
@@ -42,73 +42,73 @@
#include "navigatorbar.h"
-ActiveLabel::ActiveLabel( QWidget *parent, const char *name )
- : QLabel( parent, name )
+ActiveLabel::ActiveLabel( TQWidget *parent, const char *name )
+ : TQLabel( parent, name )
{
}
-void ActiveLabel::mouseReleaseEvent( QMouseEvent * )
+void ActiveLabel::mouseReleaseEvent( TQMouseEvent * )
{
emit clicked();
}
-NavigatorBar::NavigatorBar( QWidget *parent, const char *name )
- : QWidget( parent, name ), mHasMinWidth( false )
+NavigatorBar::NavigatorBar( TQWidget *parent, const char *name )
+ : TQWidget( parent, name ), mHasMinWidth( false )
{
- QFont tfont = font();
+ TQFont tfont = font();
tfont.setPointSize( 10 );
tfont.setBold( false );
bool isRTL = KOGlobals::self()->reverseLayout();
- QPixmap pix;
+ TQPixmap pix;
// Create backward navigation buttons
- mPrevYear = new QPushButton( this );
+ mPrevYear = new TQPushButton( this );
pix = KOGlobals::self()->smallIcon( isRTL ? "2rightarrow" : "2leftarrow" );
mPrevYear->setPixmap( pix );
- mPrevYear->setSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed );
- QToolTip::add( mPrevYear, i18n("Previous year") );
+ mPrevYear->setSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Fixed );
+ TQToolTip::add( mPrevYear, i18n("Previous year") );
pix = KOGlobals::self()->smallIcon( isRTL ? "1rightarrow" : "1leftarrow");
- mPrevMonth = new QPushButton( this );
+ mPrevMonth = new TQPushButton( this );
mPrevMonth->setPixmap( pix );
- mPrevMonth->setSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed );
- QToolTip::add( mPrevMonth, i18n("Previous month") );
+ mPrevMonth->setSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Fixed );
+ TQToolTip::add( mPrevMonth, i18n("Previous month") );
// Create forward navigation buttons
pix = KOGlobals::self()->smallIcon( isRTL ? "1leftarrow" : "1rightarrow");
- mNextMonth = new QPushButton( this );
+ mNextMonth = new TQPushButton( this );
mNextMonth->setPixmap( pix );
- mNextMonth->setSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed );
- QToolTip::add( mNextMonth, i18n("Next month") );
+ mNextMonth->setSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Fixed );
+ TQToolTip::add( mNextMonth, i18n("Next month") );
pix = KOGlobals::self()->smallIcon( isRTL ? "2leftarrow" : "2rightarrow");
- mNextYear = new QPushButton( this );
+ mNextYear = new TQPushButton( this );
mNextYear->setPixmap( pix );
- mNextYear->setSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed );
- QToolTip::add( mNextYear, i18n("Next year") );
+ mNextYear->setSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Fixed );
+ TQToolTip::add( mNextYear, i18n("Next year") );
// Create month name button
mMonth = new ActiveLabel( this );
mMonth->setFont( tfont );
mMonth->setAlignment( AlignCenter );
mMonth->setMinimumHeight( mPrevYear->sizeHint().height() );
- QToolTip::add( mMonth, i18n("Select a month") );
+ TQToolTip::add( mMonth, i18n("Select a month") );
// set up control frame layout
- QBoxLayout *ctrlLayout = new QHBoxLayout( this, 0, 4 );
+ TQBoxLayout *ctrlLayout = new TQHBoxLayout( this, 0, 4 );
ctrlLayout->addWidget( mPrevYear, 3 );
ctrlLayout->addWidget( mPrevMonth, 3 );
ctrlLayout->addWidget( mMonth, 3 );
ctrlLayout->addWidget( mNextMonth, 3 );
ctrlLayout->addWidget( mNextYear, 3 );
- connect( mPrevYear, SIGNAL( clicked() ), SIGNAL( goPrevYear() ) );
- connect( mPrevMonth, SIGNAL( clicked() ), SIGNAL( goPrevMonth() ) );
- connect( mNextMonth, SIGNAL( clicked() ), SIGNAL( goNextMonth() ) );
- connect( mNextYear, SIGNAL( clicked() ), SIGNAL( goNextYear() ) );
- connect( mMonth, SIGNAL( clicked() ), SLOT( selectMonth() ) );
+ connect( mPrevYear, TQT_SIGNAL( clicked() ), TQT_SIGNAL( goPrevYear() ) );
+ connect( mPrevMonth, TQT_SIGNAL( clicked() ), TQT_SIGNAL( goPrevMonth() ) );
+ connect( mNextMonth, TQT_SIGNAL( clicked() ), TQT_SIGNAL( goNextMonth() ) );
+ connect( mNextYear, TQT_SIGNAL( clicked() ), TQT_SIGNAL( goNextYear() ) );
+ connect( mMonth, TQT_SIGNAL( clicked() ), TQT_SLOT( selectMonth() ) );
}
NavigatorBar::~NavigatorBar()
@@ -148,7 +148,7 @@ void NavigatorBar::selectDates( const KCal::DateList &dateList )
int maxwidth = 0;
for( i = 1; i <= calSys->monthsInYear( mDate ); ++i ) {
- int w = QFontMetrics( mMonth->font() ).width( QString("%1 8888")
+ int w = TQFontMetrics( mMonth->font() ).width( TQString("%1 8888")
.arg( calSys->monthName( i, calSys->year( mDate ) ) ) );
if ( w > maxwidth ) maxwidth = w;
}
@@ -171,7 +171,7 @@ void NavigatorBar::selectMonth()
int i, month, months = calSys->monthsInYear( mDate );
- QPopupMenu *popup = new QPopupMenu( mMonth );
+ TQPopupMenu *popup = new TQPopupMenu( mMonth );
for ( i = 1; i <= months; i++ )
popup->insertItem( calSys->monthName( i, calSys->year( mDate ) ), i );
@@ -179,7 +179,7 @@ void NavigatorBar::selectMonth()
popup->setActiveItem( calSys->month( mDate ) - 1 );
popup->setMinimumWidth( mMonth->width() );
- if ( ( month = popup->exec( mMonth->mapToGlobal( QPoint( 0, 0 ) ),
+ if ( ( month = popup->exec( mMonth->mapToGlobal( TQPoint( 0, 0 ) ),
calSys->month( mDate ) - 1 ) ) == -1 ) {
delete popup;
return; // canceled
diff --git a/korganizer/navigatorbar.h b/korganizer/navigatorbar.h
index 171c6b408..88dfeeff5 100644
--- a/korganizer/navigatorbar.h
+++ b/korganizer/navigatorbar.h
@@ -26,7 +26,7 @@
#include <libkcal/incidencebase.h>
-#include <qlabel.h>
+#include <tqlabel.h>
class QPushButton;
class QFrame;
@@ -35,13 +35,13 @@ class ActiveLabel : public QLabel
{
Q_OBJECT
public:
- ActiveLabel( QWidget *parent, const char *name = 0 );
+ ActiveLabel( TQWidget *parent, const char *name = 0 );
signals:
void clicked();
protected:
- void mouseReleaseEvent ( QMouseEvent * e );
+ void mouseReleaseEvent ( TQMouseEvent * e );
};
@@ -49,7 +49,7 @@ class NavigatorBar: public QWidget
{
Q_OBJECT
public:
- NavigatorBar( QWidget *parent = 0, const char *name = 0 );
+ NavigatorBar( TQWidget *parent = 0, const char *name = 0 );
~NavigatorBar();
void showButtons( bool left, bool right );
@@ -70,13 +70,13 @@ class NavigatorBar: public QWidget
private:
bool mHasMinWidth;
- QDate mDate;
+ TQDate mDate;
- QPushButton *mPrevYear;
- QPushButton *mPrevMonth;
+ TQPushButton *mPrevYear;
+ TQPushButton *mPrevMonth;
ActiveLabel *mMonth;
- QPushButton *mNextMonth;
- QPushButton *mNextYear;
+ TQPushButton *mNextMonth;
+ TQPushButton *mNextYear;
};
#endif
diff --git a/korganizer/plugins/datenums/configdialog.cpp b/korganizer/plugins/datenums/configdialog.cpp
index d26a1fd86..3766e2ffd 100644
--- a/korganizer/plugins/datenums/configdialog.cpp
+++ b/korganizer/plugins/datenums/configdialog.cpp
@@ -18,10 +18,10 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qvbuttongroup.h>
-#include <qradiobutton.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqvbuttongroup.h>
+#include <tqradiobutton.h>
#include <klocale.h>
#include <kmessagebox.h>
@@ -34,20 +34,20 @@
#include "configdialog.h"
#include "configdialog.moc"
-ConfigDialog::ConfigDialog(QWidget *parent)
+ConfigDialog::ConfigDialog(TQWidget *parent)
: KDialogBase(Plain,i18n("Configure Day Numbers"),Ok|Cancel,Ok,parent)
{
- QFrame *topFrame = plainPage();
- QVBoxLayout *topLayout = new QVBoxLayout(topFrame,0,spacingHint());
+ TQFrame *topFrame = plainPage();
+ TQVBoxLayout *topLayout = new TQVBoxLayout(topFrame,0,spacingHint());
-// QLabel *label = new QLabel(i18n("Show date numbers:"),topFrame);
+// TQLabel *label = new TQLabel(i18n("Show date numbers:"),topFrame);
// topLayout->addWidget(label);
- mDayNumGroup = new QVButtonGroup( i18n("Show Date Number"), topFrame );
+ mDayNumGroup = new TQVButtonGroup( i18n("Show Date Number"), topFrame );
topLayout->addWidget( mDayNumGroup );
- new QRadioButton( i18n("Show day number"), mDayNumGroup );
- new QRadioButton( i18n("Show days to end of year"), mDayNumGroup );
- new QRadioButton( i18n("Show both"), mDayNumGroup );
+ new TQRadioButton( i18n("Show day number"), mDayNumGroup );
+ new TQRadioButton( i18n("Show days to end of year"), mDayNumGroup );
+ new TQRadioButton( i18n("Show both"), mDayNumGroup );
load();
}
diff --git a/korganizer/plugins/datenums/configdialog.h b/korganizer/plugins/datenums/configdialog.h
index 15efaf049..cef3e013b 100644
--- a/korganizer/plugins/datenums/configdialog.h
+++ b/korganizer/plugins/datenums/configdialog.h
@@ -27,7 +27,7 @@ class ConfigDialog : public KDialogBase
{
Q_OBJECT
public:
- ConfigDialog(QWidget *parent=0);
+ ConfigDialog(TQWidget *parent=0);
virtual ~ConfigDialog();
protected:
@@ -38,7 +38,7 @@ class ConfigDialog : public KDialogBase
void slotOk();
private:
- QButtonGroup *mDayNumGroup;
+ TQButtonGroup *mDayNumGroup;
};
#endif
diff --git a/korganizer/plugins/datenums/datenums.cpp b/korganizer/plugins/datenums/datenums.cpp
index a849f39f3..af022837e 100644
--- a/korganizer/plugins/datenums/datenums.cpp
+++ b/korganizer/plugins/datenums/datenums.cpp
@@ -40,7 +40,7 @@ Datenums::Datenums()
mDateNum = config.readNumEntry( "ShowDayNumbers", 0 );
}
-void Datenums::configure(QWidget *parent)
+void Datenums::configure(TQWidget *parent)
{
ConfigDialog *dlg = new ConfigDialog(parent);
dlg->exec();
@@ -48,12 +48,12 @@ void Datenums::configure(QWidget *parent)
}
-QString Datenums::shortText(const QDate &date)
+TQString Datenums::shortText(const TQDate &date)
{
int doy = KOGlobals::self()->calendarSystem()->dayOfYear(date);
switch (mDateNum) {
case 1: // only days until end of year
- return QString::number( KOGlobals::self()->calendarSystem()->daysInYear(date) - doy );
+ return TQString::number( KOGlobals::self()->calendarSystem()->daysInYear(date) - doy );
break;
case 2: // both day of year and days till end of year
return i18n("dayOfYear / daysTillEndOfYear", "%1 / %2").arg( doy )
@@ -61,12 +61,12 @@ QString Datenums::shortText(const QDate &date)
break;
case 0: // only day of year
default:
- return QString::number( doy );
+ return TQString::number( doy );
}
- return QString::number( doy );
+ return TQString::number( doy );
}
-QString Datenums::info()
+TQString Datenums::info()
{
return i18n("This plugin provides numbers of days and weeks.");
}
diff --git a/korganizer/plugins/datenums/datenums.h b/korganizer/plugins/datenums/datenums.h
index af3e46473..f9ca7783a 100644
--- a/korganizer/plugins/datenums/datenums.h
+++ b/korganizer/plugins/datenums/datenums.h
@@ -19,7 +19,7 @@
#ifndef KORG_DATENUMS_H
#define KORG_DATENUMS_H
-#include <qstring.h>
+#include <tqstring.h>
#include <calendar/calendardecoration.h>
@@ -30,10 +30,10 @@ class Datenums : public CalendarDecoration {
Datenums();
~Datenums() {}
- void configure(QWidget *parent);
- QString shortText(const QDate &);
+ void configure(TQWidget *parent);
+ TQString shortText(const TQDate &);
- QString info();
+ TQString info();
protected:
int mDateNum;
};
diff --git a/korganizer/plugins/exchange/exchange.cpp b/korganizer/plugins/exchange/exchange.cpp
index 86377f046..3d3719ed4 100644
--- a/korganizer/plugins/exchange/exchange.cpp
+++ b/korganizer/plugins/exchange/exchange.cpp
@@ -17,7 +17,7 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#include <qfile.h>
+#include <tqfile.h>
#include <kapplication.h>
#include <kconfig.h>
@@ -69,29 +69,29 @@ Exchange::Exchange(KOrg::MainWindow *parent, const char *name) :
setXMLFile("plugins/exchangeui.rc");
- new KAction(i18n("&Download..."), 0, this, SLOT(download()),
+ new KAction(i18n("&Download..."), 0, this, TQT_SLOT(download()),
actionCollection(), "exchange_download");
- KAction *action = new KAction(i18n("&Upload Event..."), 0, this, SLOT(upload()),
+ KAction *action = new KAction(i18n("&Upload Event..."), 0, this, TQT_SLOT(upload()),
actionCollection(), "exchange_upload");
- QObject::connect(mainWindow()->view(),SIGNAL(incidenceSelected(Incidence *)),
- this, SLOT(slotIncidenceSelected(Incidence *)));
+ TQObject::connect(mainWindow()->view(),TQT_SIGNAL(incidenceSelected(Incidence *)),
+ this, TQT_SLOT(slotIncidenceSelected(Incidence *)));
action->setEnabled( false );
- QObject::connect(this,SIGNAL(enableIncidenceActions(bool)),
- action,SLOT(setEnabled(bool)));
+ TQObject::connect(this,TQT_SIGNAL(enableIncidenceActions(bool)),
+ action,TQT_SLOT(setEnabled(bool)));
- action = new KAction(i18n("De&lete Event"), 0, this, SLOT(remove()),
+ action = new KAction(i18n("De&lete Event"), 0, this, TQT_SLOT(remove()),
actionCollection(), "exchange_delete");
- QObject::connect(this,SIGNAL(enableIncidenceActions(bool)),
- action,SLOT(setEnabled(bool)));
+ TQObject::connect(this,TQT_SIGNAL(enableIncidenceActions(bool)),
+ action,TQT_SLOT(setEnabled(bool)));
action->setEnabled( false );
- new KAction(i18n("&Configure..."), 0, this, SLOT(configure()),
+ new KAction(i18n("&Configure..."), 0, this, TQT_SLOT(configure()),
actionCollection(), "exchange_configure");
- connect( this, SIGNAL( calendarChanged() ), mainWindow()->view(), SLOT( updateView() ) );
- connect( this, SIGNAL( calendarChanged(const QDate &, const QDate &)),
- mainWindow()->view(), SLOT(updateView(const QDate &, const QDate &)) );
+ connect( this, TQT_SIGNAL( calendarChanged() ), mainWindow()->view(), TQT_SLOT( updateView() ) );
+ connect( this, TQT_SIGNAL( calendarChanged(const TQDate &, const TQDate &)),
+ mainWindow()->view(), TQT_SLOT(updateView(const TQDate &, const TQDate &)) );
}
Exchange::~Exchange()
@@ -99,12 +99,12 @@ Exchange::~Exchange()
kdDebug(5850) << "Exchange Plugin destructor" << endl;
}
-QString Exchange::info()
+TQString Exchange::info()
{
return i18n("This plugin imports and export calendar events from/to a Microsoft Exchange 2000 Server.");
}
-QString Exchange::shortInfo()
+TQString Exchange::shortInfo()
{
return i18n("Exchange Plugin");
}
@@ -118,11 +118,11 @@ void Exchange::download()
{
ExchangeDialog dialog( mainWindow()->view()->startDate(), mainWindow()->view()->endDate() );
- if (dialog.exec() != QDialog::Accepted )
+ if (dialog.exec() != TQDialog::Accepted )
return;
- QDate start = dialog.m_start->date();
- QDate end = dialog.m_end->date();
+ TQDate start = dialog.m_start->date();
+ TQDate end = dialog.m_end->date();
KCal::Calendar* calendar = mainWindow()->view()->calendar();
@@ -183,13 +183,13 @@ void Exchange::configure()
kdDebug(5850) << "Exchange::configure" << endl;
ExchangeConfig dialog( mAccount );
- if (dialog.exec() == QDialog::Accepted )
+ if (dialog.exec() == TQDialog::Accepted )
mAccount->save( "Calendar/Exchange Plugin" );
}
-void Exchange::showError( int error, const QString& moreInfo /* = QString::null */ )
+void Exchange::showError( int error, const TQString& moreInfo /* = TQString::null */ )
{
- QString errorText;
+ TQString errorText;
switch( error ) {
case KPIM::ExchangeClient::ResultOK:
errorText = i18n( "No Error" );
diff --git a/korganizer/plugins/exchange/exchange.h b/korganizer/plugins/exchange/exchange.h
index a145bd12f..22a15f1c7 100644
--- a/korganizer/plugins/exchange/exchange.h
+++ b/korganizer/plugins/exchange/exchange.h
@@ -19,8 +19,8 @@
#ifndef KORG_EXCHANGE_H
#define KORG_EXCHANGE_H
-#include <qstring.h>
-#include <qdatetime.h>
+#include <tqstring.h>
+#include <tqdatetime.h>
#include <korganizer/part.h>
@@ -39,14 +39,14 @@ class Exchange : public KOrg::Part {
Exchange( KOrg::MainWindow *, const char *name );
~Exchange();
- QString info();
+ TQString info();
// This method is used for the category of the key bindings
- QString shortInfo();
+ TQString shortInfo();
signals:
void enableIncidenceActions( bool );
void calendarChanged();
- void calendarChanged(const QDate&start,const QDate&end);
+ void calendarChanged(const TQDate&start,const TQDate&end);
private slots:
void download();
@@ -58,7 +58,7 @@ class Exchange : public KOrg::Part {
private:
void test2();
- void showError( int error, const QString& moreInfo = QString::null );
+ void showError( int error, const TQString& moreInfo = TQString::null );
KPIM::ExchangeClient *mClient;
KPIM::ExchangeAccount* mAccount;
diff --git a/korganizer/plugins/exchange/exchangeconfig.cpp b/korganizer/plugins/exchange/exchangeconfig.cpp
index e75265caa..fe01324ac 100644
--- a/korganizer/plugins/exchange/exchangeconfig.cpp
+++ b/korganizer/plugins/exchange/exchangeconfig.cpp
@@ -17,9 +17,9 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qcombobox.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqcombobox.h>
#include <kapplication.h>
#include <kconfig.h>
@@ -31,7 +31,7 @@
#include "exchangeconfig.h"
-ExchangeConfig::ExchangeConfig( KPIM::ExchangeAccount* account, QWidget* parent )
+ExchangeConfig::ExchangeConfig( KPIM::ExchangeAccount* account, TQWidget* parent )
: KDialogBase(Plain,i18n("Exchange Plugin"),Ok|Cancel,Ok,parent)
{
mAccount = account;
@@ -39,38 +39,38 @@ ExchangeConfig::ExchangeConfig( KPIM::ExchangeAccount* account, QWidget* parent
kdDebug(5850) << "Creating ExchangeConfig with account: " <<
account->host() << ":" << account->account() << endl;
- QFrame *topFrame = plainPage();
- QGridLayout *topLayout = new QGridLayout( topFrame, 5, 3, 3 );
+ TQFrame *topFrame = plainPage();
+ TQGridLayout *topLayout = new TQGridLayout( topFrame, 5, 3, 3 );
m_host = new KLineEdit( mAccount->host(), topFrame );
- topLayout->addWidget( new QLabel( i18n( "Exchange server:" ), topFrame ), 0, 0 );
+ topLayout->addWidget( new TQLabel( i18n( "Exchange server:" ), topFrame ), 0, 0 );
topLayout->addWidget( m_host, 0, 1 );
m_port = new KLineEdit( mAccount->port(), topFrame );
- topLayout->addWidget( new QLabel( i18n( "Port:" ), topFrame ), 1, 0 );
+ topLayout->addWidget( new TQLabel( i18n( "Port:" ), topFrame ), 1, 0 );
topLayout->addWidget( m_port, 1, 1 );
m_user = new KLineEdit( mAccount->account(), topFrame );
- topLayout->addWidget( new QLabel( i18n( "User:" ), topFrame ), 2, 0 );
+ topLayout->addWidget( new TQLabel( i18n( "User:" ), topFrame ), 2, 0 );
topLayout->addWidget( m_user, 2, 1 );
- connect( m_user, SIGNAL(textChanged(const QString&)), this, SLOT(slotUserChanged(const QString&)) );
+ connect( m_user, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(slotUserChanged(const TQString&)) );
m_password = new KLineEdit( mAccount->password(), topFrame );
- topLayout->addWidget( new QLabel( i18n( "Password:" ), topFrame ), 3, 0 );
+ topLayout->addWidget( new TQLabel( i18n( "Password:" ), topFrame ), 3, 0 );
topLayout->addWidget( m_password, 3, 1 );
- m_password->setEchoMode( QLineEdit::Password );
+ m_password->setEchoMode( TQLineEdit::Password );
- m_autoMailbox = new QCheckBox( i18n( "Determine mailbox automatically" ), topFrame );
+ m_autoMailbox = new TQCheckBox( i18n( "Determine mailbox automatically" ), topFrame );
topLayout->addMultiCellWidget( m_autoMailbox, 4, 4, 0, 1 );
- connect( m_autoMailbox, SIGNAL(toggled(bool)), this, SLOT(slotToggleAuto(bool)) );
+ connect( m_autoMailbox, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotToggleAuto(bool)) );
m_mailbox= new KLineEdit( mAccount->mailbox(), topFrame );
- topLayout->addWidget( new QLabel( i18n( "Mailbox URL:" ), topFrame ), 5, 0 );
+ topLayout->addWidget( new TQLabel( i18n( "Mailbox URL:" ), topFrame ), 5, 0 );
topLayout->addWidget( m_mailbox, 5, 1 );
- m_tryFindMailbox = new QPushButton( "&Find", topFrame );
+ m_tryFindMailbox = new TQPushButton( "&Find", topFrame );
topLayout->addWidget( m_tryFindMailbox, 5, 2 );
- connect( m_tryFindMailbox, SIGNAL(clicked()), this, SLOT(slotFindClicked()) );
+ connect( m_tryFindMailbox, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotFindClicked()) );
kapp->config()->setGroup( "Calendar/Exchange Plugin" );
bool autoChecked = kapp->config()->readBoolEntry( "auto-mailbox", true );
@@ -90,7 +90,7 @@ void ExchangeConfig::slotToggleAuto( bool on )
// }
}
-void ExchangeConfig::slotUserChanged( const QString& /*text*/ )
+void ExchangeConfig::slotUserChanged( const TQString& /*text*/ )
{
// if ( m_mailboxEqualsUser->isChecked() ) {
// m_mailbox->setText( "webdav://" + m_host->text() + "/exchange/" + text );
@@ -100,7 +100,7 @@ void ExchangeConfig::slotUserChanged( const QString& /*text*/ )
void ExchangeConfig::slotOk()
{
if ( m_autoMailbox->isChecked() ) {
- QString mailbox = mAccount->tryFindMailbox( m_host->text(), m_port->text(), m_user->text(), m_password->text() );
+ TQString mailbox = mAccount->tryFindMailbox( m_host->text(), m_port->text(), m_user->text(), m_password->text() );
if ( mailbox.isNull() ) {
kdWarning() << "Could not find Exchange mailbox URL, incomplete settings!"<< endl;
KMessageBox::sorry( this, "Could not determine mailbox URL" );
@@ -124,7 +124,7 @@ void ExchangeConfig::slotOk()
void ExchangeConfig::slotFindClicked()
{
- QString mailbox = mAccount->tryFindMailbox( m_host->text(), m_port->text(), m_user->text(), m_password->text() );
+ TQString mailbox = mAccount->tryFindMailbox( m_host->text(), m_port->text(), m_user->text(), m_password->text() );
if ( mailbox.isNull() ) {
KMessageBox::sorry( this, "Could not determine mailbox URL" );
} else {
diff --git a/korganizer/plugins/exchange/exchangeconfig.h b/korganizer/plugins/exchange/exchangeconfig.h
index ba974ba26..0e18bfe2e 100644
--- a/korganizer/plugins/exchange/exchangeconfig.h
+++ b/korganizer/plugins/exchange/exchangeconfig.h
@@ -19,8 +19,8 @@
#ifndef EXCHANGECONFIG_H
#define EXCHANGECONFIG_H
-#include <qcheckbox.h>
-#include <qpushbutton.h>
+#include <tqcheckbox.h>
+#include <tqpushbutton.h>
#include <kdialogbase.h>
#include <klineedit.h>
//#include <kpassdlg.h>
@@ -31,7 +31,7 @@ class ExchangeConfig : public KDialogBase
{
Q_OBJECT
public:
- ExchangeConfig(KPIM::ExchangeAccount* account, QWidget *parent=0);
+ ExchangeConfig(KPIM::ExchangeAccount* account, TQWidget *parent=0);
virtual ~ExchangeConfig();
// protected:
@@ -40,7 +40,7 @@ class ExchangeConfig : public KDialogBase
protected slots:
void slotToggleAuto( bool on );
- void slotUserChanged( const QString& text );
+ void slotUserChanged( const TQString& text );
void slotFindClicked();
void slotOk();
@@ -50,9 +50,9 @@ class ExchangeConfig : public KDialogBase
KLineEdit *m_host;
KLineEdit *m_port;
KLineEdit *m_user;
- QCheckBox *m_autoMailbox;
+ TQCheckBox *m_autoMailbox;
KLineEdit *m_mailbox;
- QPushButton* m_tryFindMailbox;
+ TQPushButton* m_tryFindMailbox;
KLineEdit *m_password;
};
diff --git a/korganizer/plugins/exchange/exchangedialog.cpp b/korganizer/plugins/exchange/exchangedialog.cpp
index 249b07a91..de56a3a19 100644
--- a/korganizer/plugins/exchange/exchangedialog.cpp
+++ b/korganizer/plugins/exchange/exchangedialog.cpp
@@ -17,9 +17,9 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qcombobox.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqcombobox.h>
#include <klocale.h>
#include <kmessagebox.h>
@@ -30,20 +30,20 @@
#include "exchangedialog.h"
-ExchangeDialog::ExchangeDialog( const QDate &_start, const QDate &_end, QWidget *parent)
+ExchangeDialog::ExchangeDialog( const TQDate &_start, const TQDate &_end, TQWidget *parent)
: KDialogBase(Plain,i18n("Exchange Plugin"),Ok|Cancel,Ok,parent)
{
- QFrame *topFrame = plainPage();
- QGridLayout *topLayout = new QGridLayout( topFrame, 2, 2, 3 );
+ TQFrame *topFrame = plainPage();
+ TQGridLayout *topLayout = new TQGridLayout( topFrame, 2, 2, 3 );
- QLabel *label = new QLabel(i18n("Start date:"),topFrame);
+ TQLabel *label = new TQLabel(i18n("Start date:"),topFrame);
topLayout->addWidget(label, 0, 0);
m_start = new KDateWidget( _start, topFrame );
topLayout->addWidget( m_start, 0, 1 );
m_end = new KDateWidget( _end, topFrame );
- topLayout->addWidget( new QLabel( i18n( "End date:" ), topFrame ), 1, 0 );
+ topLayout->addWidget( new TQLabel( i18n( "End date:" ), topFrame ), 1, 0 );
topLayout->addWidget( m_end, 1, 1 );
}
diff --git a/korganizer/plugins/exchange/exchangedialog.h b/korganizer/plugins/exchange/exchangedialog.h
index 440d48fd9..bd0e2f26a 100644
--- a/korganizer/plugins/exchange/exchangedialog.h
+++ b/korganizer/plugins/exchange/exchangedialog.h
@@ -28,7 +28,7 @@ class ExchangeDialog : public KDialogBase
{
Q_OBJECT
public:
- ExchangeDialog( const QDate &start, const QDate &end, QWidget *parent=0);
+ ExchangeDialog( const TQDate &start, const TQDate &end, TQWidget *parent=0);
virtual ~ExchangeDialog();
protected slots:
diff --git a/korganizer/plugins/hebrew/configdialog.cpp b/korganizer/plugins/hebrew/configdialog.cpp
index aad50a680..6298151ac 100644
--- a/korganizer/plugins/hebrew/configdialog.cpp
+++ b/korganizer/plugins/hebrew/configdialog.cpp
@@ -19,33 +19,33 @@
#include "configdialog.h"
#include "configdialog.moc"
#include <klocale.h>
-#include <qlayout.h>
+#include <tqlayout.h>
#include <kapplication.h>
#include <kglobal.h>
#include <kconfig.h>
#include <kstandarddirs.h>
#include <ksimpleconfig.h>
-ConfigDialog::ConfigDialog(QWidget * parent):KDialogBase(Plain, i18n("Configure Holidays"), Ok|Cancel, Ok,
+ConfigDialog::ConfigDialog(TQWidget * parent):KDialogBase(Plain, i18n("Configure Holidays"), Ok|Cancel, Ok,
parent)
{
- QFrame *topFrame = plainPage();
- QVBoxLayout *topLayout =
- new QVBoxLayout(topFrame, 0, spacingHint());
+ TQFrame *topFrame = plainPage();
+ TQVBoxLayout *topLayout =
+ new TQVBoxLayout(topFrame, 0, spacingHint());
- israel_box = new QCheckBox(topFrame);
+ israel_box = new TQCheckBox(topFrame);
israel_box->setText(i18n("Use Israeli holidays"));
topLayout->addWidget(israel_box);
- parsha_box = new QCheckBox(topFrame);
+ parsha_box = new TQCheckBox(topFrame);
parsha_box->setText(i18n("Show weekly parsha"));
topLayout->addWidget(parsha_box);
- omer_box = new QCheckBox(topFrame);
+ omer_box = new TQCheckBox(topFrame);
omer_box->setText(i18n("Show day of Omer"));
topLayout->addWidget(omer_box);
- chol_box = new QCheckBox(topFrame);
+ chol_box = new TQCheckBox(topFrame);
chol_box->setText(i18n("Show Chol HaMoed"));
topLayout->addWidget(chol_box);
diff --git a/korganizer/plugins/hebrew/configdialog.h b/korganizer/plugins/hebrew/configdialog.h
index 1d0d18115..1638f75c3 100644
--- a/korganizer/plugins/hebrew/configdialog.h
+++ b/korganizer/plugins/hebrew/configdialog.h
@@ -20,7 +20,7 @@
#define CONFIGDIALOG_H
#include <kdialogbase.h>
-#include <qcheckbox.h>
+#include <tqcheckbox.h>
/**
@author Jonathan Singer
@@ -29,7 +29,7 @@ class ConfigDialog:public KDialogBase
{
Q_OBJECT public:
- ConfigDialog(QWidget * parent = 0);
+ ConfigDialog(TQWidget * parent = 0);
virtual ~ ConfigDialog();
protected:
@@ -39,10 +39,10 @@ protected:
protected slots: void slotOk();
private:
- QCheckBox * omer_box;
- QCheckBox *parsha_box;
- QCheckBox *israel_box;
- QCheckBox *chol_box;
+ TQCheckBox * omer_box;
+ TQCheckBox *parsha_box;
+ TQCheckBox *israel_box;
+ TQCheckBox *chol_box;
};
diff --git a/korganizer/plugins/hebrew/converter.h b/korganizer/plugins/hebrew/converter.h
index 8a3bc8baf..430f10eb1 100644
--- a/korganizer/plugins/hebrew/converter.h
+++ b/korganizer/plugins/hebrew/converter.h
@@ -11,8 +11,8 @@
#ifndef CONVERTER_H
#define CONVERTER_H
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
struct DateResult
{
@@ -67,8 +67,8 @@ public:
private:
- static QStringList HebrewMonthNames;
- static QStringList SecularMonthNames;
+ static TQStringList HebrewMonthNames;
+ static TQStringList SecularMonthNames;
};
diff --git a/korganizer/plugins/hebrew/hebrew.cpp b/korganizer/plugins/hebrew/hebrew.cpp
index 4c557d00d..9fb0f2fbf 100644
--- a/korganizer/plugins/hebrew/hebrew.cpp
+++ b/korganizer/plugins/hebrew/hebrew.cpp
@@ -43,7 +43,7 @@ public:
K_EXPORT_COMPONENT_FACTORY( libkorg_hebrew, HebrewFactory )
-QString Hebrew::shortText(const QDate & date)
+TQString Hebrew::shortText(const TQDate & date)
{
KConfig config("korganizerrc", true, false); // Open read-only, no kdeglobals
@@ -55,7 +55,7 @@ QString Hebrew::shortText(const QDate & date)
Holiday::ParshaP = config.readBoolEntry("Parsha", true);
Holiday::CholP = config.readBoolEntry("Chol_HaMoed", true);
Holiday::OmerP = config.readBoolEntry("Omer", true);
- QString *label_text = new QString();
+ TQString *label_text = new TQString();
int day = date.day();
int month = date.month();
@@ -74,14 +74,14 @@ QString Hebrew::shortText(const QDate & date)
int hebrew_kvia = result.kvia;
int hebrew_day_number = result.hebrew_day_number;
- QStringList holidays =
+ TQStringList holidays =
Holiday::FindHoliday(hebrew_month, hebrew_day,
hebrew_day_of_week + 1, hebrew_kvia,
hebrew_leap_year_p, IsraelP,
hebrew_day_number, hebrew_year);
KCalendarSystem *cal = KCalendarSystemFactory::create("hebrew");
- *label_text = QString("%1 %2").arg(cal->dayString(date, false))
+ *label_text = TQString("%1 %2").arg(cal->dayString(date, false))
.arg(cal->monthName(date));
if (holidays.count())
@@ -97,13 +97,13 @@ QString Hebrew::shortText(const QDate & date)
return *label_text;
}
-QString Hebrew::info()
+TQString Hebrew::info()
{
return
i18n("This plugin provides the date in the Jewish calendar.");
}
-void Hebrew::configure(QWidget * parent)
+void Hebrew::configure(TQWidget * parent)
{
ConfigDialog *dlg = new ConfigDialog(parent); //parent?
diff --git a/korganizer/plugins/hebrew/hebrew.h b/korganizer/plugins/hebrew/hebrew.h
index 1153c1012..c337f7ef4 100644
--- a/korganizer/plugins/hebrew/hebrew.h
+++ b/korganizer/plugins/hebrew/hebrew.h
@@ -19,8 +19,8 @@
#ifndef KORG_HEBREW_H
#define KORG_HEBREW_H
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
#include <calendar/calendardecoration.h>
using namespace KOrg;
@@ -34,10 +34,10 @@ public:
~Hebrew()
{
}
- void configure(QWidget * parent);
- QString shortText(const QDate &);
+ void configure(TQWidget * parent);
+ TQString shortText(const TQDate &);
- QString info();
+ TQString info();
static bool IsraelP;
private:
diff --git a/korganizer/plugins/hebrew/holiday.cpp b/korganizer/plugins/hebrew/holiday.cpp
index 732a00447..9b5ea3f11 100644
--- a/korganizer/plugins/hebrew/holiday.cpp
+++ b/korganizer/plugins/hebrew/holiday.cpp
@@ -15,7 +15,7 @@ bool Holiday::CholP;
bool Holiday::OmerP;
bool Holiday::ParshaP;
-QStringList Holiday::holidays;
+TQStringList Holiday::holidays;
int Holiday::HolidayFlags;
Holiday::Holiday()
@@ -413,7 +413,7 @@ QStringList
}
/* Return a string corresponding to the nth day of the Omer */
-QString Holiday::Sfirah(int day)
+TQString Holiday::Sfirah(int day)
{
/*static char buffer[40];
char *endings[] = {"th", "st", "nd", "rd"};
@@ -422,7 +422,7 @@ QString Holiday::Sfirah(int day)
if ( ((day >= 11) && (day <= 19)) || (remainder > 3)) remainder = 0;
sprintf(buffer, "%d%s day Omer", day, endings[remainder]);
return buffer; */
- QString buffer;
+ TQString buffer;
buffer.setNum(day);
buffer + i18n(" Omer"); // Fix this to original function
diff --git a/korganizer/plugins/hebrew/holiday.h b/korganizer/plugins/hebrew/holiday.h
index 6c8c61d9d..f73083fd7 100644
--- a/korganizer/plugins/hebrew/holiday.h
+++ b/korganizer/plugins/hebrew/holiday.h
@@ -11,8 +11,8 @@
#ifndef HOLIDAY_H
#define HOLIDAY_H
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
#include <parsha.h>
/**
@author Jonathan Singer
@@ -24,12 +24,12 @@ public:
Holiday();
~Holiday();
- static QStringList FindHoliday(int month, int day, int weekday,
+ static TQStringList FindHoliday(int month, int day, int weekday,
int kvia, bool leap_year_p,
bool israel_p, int day_number,
int year);
- static QString Sfirah(int);
+ static TQString Sfirah(int);
static bool CholP;
static bool OmerP;
@@ -37,7 +37,7 @@ public:
private:
- static QStringList holidays;
+ static TQStringList holidays;
static int HolidayFlags; //supposed to be extern
//parsha Parsha_lookup;
diff --git a/korganizer/plugins/hebrew/parsha.cpp b/korganizer/plugins/hebrew/parsha.cpp
index 21fdf8a4e..d8ff2dd6f 100644
--- a/korganizer/plugins/hebrew/parsha.cpp
+++ b/korganizer/plugins/hebrew/parsha.cpp
@@ -11,7 +11,7 @@
#include "parsha.h"
#include <klocale.h>
-QStringList Parsha::parshiot_names;
+TQStringList Parsha::parshiot_names;
Parsha::Parsha()
{
@@ -243,7 +243,7 @@ QString
}
- QString buffer;
+ TQString buffer;
if (array == NULL)
/* Something is terribly wrong. */
diff --git a/korganizer/plugins/hebrew/parsha.h b/korganizer/plugins/hebrew/parsha.h
index aac2625ff..59099b0ef 100644
--- a/korganizer/plugins/hebrew/parsha.h
+++ b/korganizer/plugins/hebrew/parsha.h
@@ -11,8 +11,8 @@
#ifndef PARSHA_H
#define PARSHA_H
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
/**
@author Jonathan Singer
@@ -23,11 +23,11 @@ public:
Parsha();
~Parsha();
- static QString FindParshaName(int daynumber, int kvia, bool leap_p,
+ static TQString FindParshaName(int daynumber, int kvia, bool leap_p,
bool israel_p);
private:
- static QStringList parshiot_names;
+ static TQStringList parshiot_names;
};
#endif
diff --git a/korganizer/plugins/printing/journal/journalprint.cpp b/korganizer/plugins/printing/journal/journalprint.cpp
index 31b1b10b6..551f23a9d 100644
--- a/korganizer/plugins/printing/journal/journalprint.cpp
+++ b/korganizer/plugins/printing/journal/journalprint.cpp
@@ -33,7 +33,7 @@
#include <kconfig.h>
#include <kdebug.h>
-#include <qbuttongroup.h>
+#include <tqbuttongroup.h>
#include "calprintjournalconfig_base.h"
@@ -50,7 +50,7 @@ K_EXPORT_COMPONENT_FACTORY( libkorg_journalprint, JournalPrintFactory )
* Print Journal
**************************************************************/
-QWidget *CalPrintJournal::createConfigWidget( QWidget *w )
+TQWidget *CalPrintJournal::createConfigWidget( TQWidget *w )
{
return new CalPrintJournalConfig_Base( w );
}
@@ -96,7 +96,7 @@ void CalPrintJournal::saveConfig()
}
}
-void CalPrintJournal::setDateRange( const QDate& from, const QDate& to )
+void CalPrintJournal::setDateRange( const TQDate& from, const TQDate& to )
{
CalPrintPluginBase::setDateRange( from, to );
CalPrintJournalConfig_Base *cfg =
@@ -107,7 +107,7 @@ void CalPrintJournal::setDateRange( const QDate& from, const QDate& to )
}
}
-void CalPrintJournal::print( QPainter &p, int width, int height )
+void CalPrintJournal::print( TQPainter &p, int width, int height )
{
int x=0, y=0;
Journal::List journals( mCalendar->journals() );
@@ -116,14 +116,14 @@ void CalPrintJournal::print( QPainter &p, int width, int height )
journals.clear();
Journal::List::Iterator it = allJournals.begin();
for ( ; it != allJournals.end(); ++it ) {
- QDate dt = (*it)->dtStart().date();
+ TQDate dt = (*it)->dtStart().date();
if ( mFromDate <= dt && dt <= mToDate ) {
journals.append( *it );
}
}
}
- drawHeader( p, i18n("Journal entries"), QDate(), QDate(), QRect( 0, 0, width, headerHeight() ) );
+ drawHeader( p, i18n("Journal entries"), TQDate(), TQDate(), TQRect( 0, 0, width, headerHeight() ) );
y = headerHeight() + 15;
Journal::List::Iterator it = journals.begin();
diff --git a/korganizer/plugins/printing/journal/journalprint.h b/korganizer/plugins/printing/journal/journalprint.h
index fb91759f1..f1c0db44c 100644
--- a/korganizer/plugins/printing/journal/journalprint.h
+++ b/korganizer/plugins/printing/journal/journalprint.h
@@ -40,19 +40,19 @@ class CalPrintJournal : public CalPrintPluginBase
public:
CalPrintJournal():CalPrintPluginBase() {}
virtual ~CalPrintJournal() {}
- virtual QString description() { return i18n("Print &journal"); }
- virtual QString info() { return i18n("Prints all journals for a given date range"); }
+ virtual TQString description() { return i18n("Print &journal"); }
+ virtual TQString info() { return i18n("Prints all journals for a given date range"); }
virtual int sortID() { return CalPrinterBase::Journallist; }
virtual bool enabled() { return true; }
- virtual QWidget *createConfigWidget( QWidget* );
+ virtual TQWidget *createConfigWidget( TQWidget* );
public:
- virtual void print(QPainter &p, int width, int height);
+ virtual void print(TQPainter &p, int width, int height);
virtual void readSettingsWidget();
virtual void setSettingsWidget();
virtual void loadConfig();
virtual void saveConfig();
- virtual void setDateRange( const QDate& from, const QDate& to );
+ virtual void setDateRange( const TQDate& from, const TQDate& to );
protected:
bool mUseDateRange;
diff --git a/korganizer/plugins/printing/list/listprint.cpp b/korganizer/plugins/printing/list/listprint.cpp
index 0221f1c67..4a90bfb5b 100644
--- a/korganizer/plugins/printing/list/listprint.cpp
+++ b/korganizer/plugins/printing/list/listprint.cpp
@@ -34,7 +34,7 @@
#include <kconfig.h>
#include <kdebug.h>
-#include <qbuttongroup.h>
+#include <tqbuttongroup.h>
#include "calprintlistconfig_base.h"
@@ -52,7 +52,7 @@ K_EXPORT_COMPONENT_FACTORY( libkorg_listprint, ListPrintFactory )
* Print Day
**************************************************************/
-QWidget *CalPrintList::createConfigWidget( QWidget *w )
+TQWidget *CalPrintList::createConfigWidget( TQWidget *w )
{
return new CalPrintListConfig_Base( w );
}
@@ -98,7 +98,7 @@ void CalPrintList::saveConfig()
}
}
-void CalPrintList::setDateRange( const QDate& from, const QDate& to )
+void CalPrintList::setDateRange( const TQDate& from, const TQDate& to )
{
CalPrintPluginBase::setDateRange( from, to );
CalPrintListConfig_Base *cfg =
@@ -109,7 +109,7 @@ void CalPrintList::setDateRange( const QDate& from, const QDate& to )
}
}
-void CalPrintList::print( QPainter &p, int width, int height )
+void CalPrintList::print( TQPainter &p, int width, int height )
{
}
diff --git a/korganizer/plugins/printing/list/listprint.h b/korganizer/plugins/printing/list/listprint.h
index dc370ba86..561e0d467 100644
--- a/korganizer/plugins/printing/list/listprint.h
+++ b/korganizer/plugins/printing/list/listprint.h
@@ -39,18 +39,18 @@ class CalPrintList : public CalPrintPluginBase
public:
CalPrintList():CalPrintPluginBase() {}
virtual ~CalPrintList() {}
- virtual QString description() { return i18n("Print list"); }
- virtual QString info() { return i18n("Prints a list of events and to-dos"); }
+ virtual TQString description() { return i18n("Print list"); }
+ virtual TQString info() { return i18n("Prints a list of events and to-dos"); }
virtual int sortID() { return 950; }
- virtual QWidget *createConfigWidget( QWidget* );
+ virtual TQWidget *createConfigWidget( TQWidget* );
public:
- virtual void print(QPainter &p, int width, int height);
+ virtual void print(TQPainter &p, int width, int height);
virtual void readSettingsWidget();
virtual void setSettingsWidget();
virtual void loadConfig();
virtual void saveConfig();
- virtual void setDateRange( const QDate& from, const QDate& to );
+ virtual void setDateRange( const TQDate& from, const TQDate& to );
protected:
bool mUseDateRange;
diff --git a/korganizer/plugins/printing/whatsnext/whatsnextprint.cpp b/korganizer/plugins/printing/whatsnext/whatsnextprint.cpp
index 48dd30436..b5d43ae97 100644
--- a/korganizer/plugins/printing/whatsnext/whatsnextprint.cpp
+++ b/korganizer/plugins/printing/whatsnext/whatsnextprint.cpp
@@ -34,7 +34,7 @@
#include <kconfig.h>
#include <kdebug.h>
-#include <qbuttongroup.h>
+#include <tqbuttongroup.h>
#include "calprintwhatsnextconfig_base.h"
@@ -51,7 +51,7 @@ K_EXPORT_COMPONENT_FACTORY( libkorg_whatsnextprint, WhatsNextPrintFactory )
* Print What's Next
**************************************************************/
-QWidget *CalPrintWhatsNext::createConfigWidget( QWidget *w )
+TQWidget *CalPrintWhatsNext::createConfigWidget( TQWidget *w )
{
return new CalPrintWhatsNextConfig_Base( w );
}
@@ -97,7 +97,7 @@ void CalPrintWhatsNext::saveConfig()
}
}
-void CalPrintWhatsNext::setDateRange( const QDate& from, const QDate& to )
+void CalPrintWhatsNext::setDateRange( const TQDate& from, const TQDate& to )
{
CalPrintPluginBase::setDateRange( from, to );
CalPrintWhatsNextConfig_Base *cfg =
@@ -108,7 +108,7 @@ void CalPrintWhatsNext::setDateRange( const QDate& from, const QDate& to )
}
}
-void CalPrintWhatsNext::print( QPainter &p, int width, int height )
+void CalPrintWhatsNext::print( TQPainter &p, int width, int height )
{
}
diff --git a/korganizer/plugins/printing/whatsnext/whatsnextprint.h b/korganizer/plugins/printing/whatsnext/whatsnextprint.h
index bdba1f71b..fb9ee66ee 100644
--- a/korganizer/plugins/printing/whatsnext/whatsnextprint.h
+++ b/korganizer/plugins/printing/whatsnext/whatsnextprint.h
@@ -39,18 +39,18 @@ class CalPrintWhatsNext : public CalPrintPluginBase
public:
CalPrintWhatsNext():CalPrintPluginBase() {}
virtual ~CalPrintWhatsNext() {}
- virtual QString description() { return i18n("Print What's Next"); }
- virtual QString info() { return i18n("Prints a list of all upcoming events and todos."); }
+ virtual TQString description() { return i18n("Print What's Next"); }
+ virtual TQString info() { return i18n("Prints a list of all upcoming events and todos."); }
virtual int sortID() { return 50; }
- virtual QWidget *createConfigWidget( QWidget* );
+ virtual TQWidget *createConfigWidget( TQWidget* );
public:
- virtual void print(QPainter &p, int width, int height);
+ virtual void print(TQPainter &p, int width, int height);
virtual void readSettingsWidget();
virtual void setSettingsWidget();
virtual void loadConfig();
virtual void saveConfig();
- virtual void setDateRange( const QDate& from, const QDate& to );
+ virtual void setDateRange( const TQDate& from, const TQDate& to );
protected:
bool mUseDateRange;
diff --git a/korganizer/plugins/printing/year/yearprint.cpp b/korganizer/plugins/printing/year/yearprint.cpp
index d71cd9f08..5f3a9dc68 100644
--- a/korganizer/plugins/printing/year/yearprint.cpp
+++ b/korganizer/plugins/printing/year/yearprint.cpp
@@ -34,10 +34,10 @@
#include <kcalendarsystem.h>
#include <klocale.h>
-#include <qcheckbox.h>
-#include <qspinbox.h>
-#include <qcombobox.h>
-#include <qpainter.h>
+#include <tqcheckbox.h>
+#include <tqspinbox.h>
+#include <tqcombobox.h>
+#include <tqpainter.h>
class YearPrintFactory : public KOrg::PrintPluginFactory {
public:
@@ -51,7 +51,7 @@ K_EXPORT_COMPONENT_FACTORY( libkorg_yearlyprint, YearPrintFactory )
* Print Year
**************************************************************/
-QWidget *CalPrintYear::createConfigWidget( QWidget *w )
+TQWidget *CalPrintYear::createConfigWidget( TQWidget *w )
{
return new CalPrintYearConfig_Base( w );
}
@@ -74,7 +74,7 @@ void CalPrintYear::setSettingsWidget()
dynamic_cast<CalPrintYearConfig_Base*>( mConfigWidget );
if ( cfg ) {
const KCalendarSystem *calsys = calendarSystem();
- QDate start;
+ TQDate start;
calsys->setYMD( start, mYear, 1, 1 );
int months = calsys->monthsInYear( start );
int pages=0, prevPages=0;
@@ -82,12 +82,12 @@ void CalPrintYear::setSettingsWidget()
pages = (months-1)/i + 1;
if ( pages != prevPages ) {
prevPages = pages;
- cfg->mPages->insertItem( QString::number( pages ), 0 );
+ cfg->mPages->insertItem( TQString::number( pages ), 0 );
}
}
cfg->mYear->setValue( mYear );
- cfg->mPages->setCurrentText( QString::number( mPages ) );
+ cfg->mPages->setCurrentText( TQString::number( mPages ) );
cfg->mSubDays->setCurrentItem( (mSubDaysEvents==Text)?0:1 );
cfg->mHolidays->setCurrentItem( (mHolidaysEvents==Text)?0:1 );
@@ -125,7 +125,7 @@ KPrinter::Orientation CalPrintYear::defaultOrientation()
}
-void CalPrintYear::setDateRange( const QDate& from, const QDate& to )
+void CalPrintYear::setDateRange( const TQDate& from, const TQDate& to )
{
CalPrintPluginBase::setDateRange( from, to );
CalPrintYearConfig_Base *cfg =
@@ -135,21 +135,21 @@ void CalPrintYear::setDateRange( const QDate& from, const QDate& to )
}
}
-void CalPrintYear::print( QPainter &p, int width, int height )
+void CalPrintYear::print( TQPainter &p, int width, int height )
{
kdDebug()<<"CalPrintYear::print, width: "<<width<<", height: "<<height<<endl;
- QRect headerBox( 0, 0, width, headerHeight() );
+ TQRect headerBox( 0, 0, width, headerHeight() );
kdDebug()<<"headerBox: "<<headerBox<<endl;
const KCalendarSystem *calsys = calendarSystem();
KLocale *locale = KGlobal::locale();
if ( !calsys || !locale ) return;
- QDate start;
+ TQDate start;
calsys->setYMD( start, mYear, 1, 1 );
// Determine the nr of months and the max nr of days per month (dependent on
// calendar system!!!!)
- QDate temp( start );
+ TQDate temp( start );
int months = calsys->monthsInYear( start );
int maxdays = 1;
for ( int i = 1; i< months; ++i ) {
@@ -167,9 +167,9 @@ kdDebug()<<"headerBox: "<<headerBox<<endl;
if ( page > 0 ) {
mPrinter->newPage();
}
- QDate end( calsys->addMonths( start, monthsPerPage ) );
+ TQDate end( calsys->addMonths( start, monthsPerPage ) );
end = calsys->addDays( end, -1 );
- QString title;
+ TQString title;
if ( orientation() == KPrinter::Landscape ) {
title = i18n("date from - to", "%1 - %2");
} else {
@@ -181,7 +181,7 @@ kdDebug()<<"headerBox: "<<headerBox<<endl;
calsys->addMonths( start, -1), calsys->addMonths( start, monthsPerPage ),
headerBox );
- QRect monthesBox( headerBox );
+ TQRect monthesBox( headerBox );
monthesBox.setTop( monthesBox.bottom() + padding() );
monthesBox.setBottom( height );
@@ -192,7 +192,7 @@ kdDebug()<<"headerBox: "<<headerBox<<endl;
if ( ++thismonth > months ) break;
int xstart = int(j*monthwidth + 0.5);
int xend = int((j+1)*monthwidth + 0.5);
- QRect monthBox( xstart, monthesBox.top(), xend-xstart, monthesBox.height() );
+ TQRect monthBox( xstart, monthesBox.top(), xend-xstart, monthesBox.height() );
drawMonth( p, temp, monthBox, maxdays, mSubDaysEvents, mHolidaysEvents );
temp = calsys->addMonths( temp, 1 );
diff --git a/korganizer/plugins/printing/year/yearprint.h b/korganizer/plugins/printing/year/yearprint.h
index 3191150b2..f993e5dab 100644
--- a/korganizer/plugins/printing/year/yearprint.h
+++ b/korganizer/plugins/printing/year/yearprint.h
@@ -39,20 +39,20 @@ class CalPrintYear : public CalPrintPluginBase
public:
CalPrintYear():CalPrintPluginBase() {}
virtual ~CalPrintYear() {}
- virtual QString description() { return i18n("Print &Year"); }
- virtual QString info() { return i18n("Prints a calendar for an entire year"); }
+ virtual TQString description() { return i18n("Print &Year"); }
+ virtual TQString info() { return i18n("Prints a calendar for an entire year"); }
virtual int sortID() { return 900; }
virtual bool enabled() { return true; }
- virtual QWidget *createConfigWidget( QWidget* );
+ virtual TQWidget *createConfigWidget( TQWidget* );
virtual KPrinter::Orientation defaultOrientation();
public:
- virtual void print(QPainter &p, int width, int height);
+ virtual void print(TQPainter &p, int width, int height);
virtual void readSettingsWidget();
virtual void setSettingsWidget();
virtual void loadConfig();
virtual void saveConfig();
- virtual void setDateRange( const QDate& from, const QDate& to );
+ virtual void setDateRange( const TQDate& from, const TQDate& to );
protected:
int mYear;
diff --git a/korganizer/plugins/projectview/koprojectview.cpp b/korganizer/plugins/projectview/koprojectview.cpp
index 0f2601954..6c448b371 100644
--- a/korganizer/plugins/projectview/koprojectview.cpp
+++ b/korganizer/plugins/projectview/koprojectview.cpp
@@ -17,16 +17,16 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#include <qlayout.h>
-#include <qheader.h>
-#include <qpushbutton.h>
-#include <qfont.h>
-#include <qlabel.h>
-#include <qlineedit.h>
-#include <qlistbox.h>
-#include <qpopupmenu.h>
-#include <qstrlist.h>
-#include <qlistview.h>
+#include <tqlayout.h>
+#include <tqheader.h>
+#include <tqpushbutton.h>
+#include <tqfont.h>
+#include <tqlabel.h>
+#include <tqlineedit.h>
+#include <tqlistbox.h>
+#include <tqpopupmenu.h>
+#include <tqstrlist.h>
+#include <tqlistview.h>
#include <kapplication.h>
#include <kdebug.h>
@@ -46,9 +46,9 @@
using namespace KOrg;
KOProjectViewItem::KOProjectViewItem(Todo *event,KGanttItem* parentTask,
- const QString& text,
- const QDateTime& start,
- const QDateTime& end) :
+ const TQString& text,
+ const TQDateTime& start,
+ const TQDateTime& end) :
KGanttItem(parentTask,text,start,end)
{
mEvent = event;
@@ -64,30 +64,30 @@ Todo *KOProjectViewItem::event()
}
-KOProjectView::KOProjectView(Calendar *calendar,QWidget* parent,
+KOProjectView::KOProjectView(Calendar *calendar,TQWidget* parent,
const char* name) :
KOrg::BaseView(calendar,parent,name)
{
- QBoxLayout *topLayout = new QVBoxLayout(this);
+ TQBoxLayout *topLayout = new TQVBoxLayout(this);
- QBoxLayout *topBar = new QHBoxLayout;
+ TQBoxLayout *topBar = new QHBoxLayout;
topLayout->addLayout(topBar);
- QLabel *title = new QLabel(i18n("Project View"),this);
- title->setFrameStyle(QFrame::Panel|QFrame::Raised);
+ TQLabel *title = new TQLabel(i18n("Project View"),this);
+ title->setFrameStyle(TQFrame::Panel|TQFrame::Raised);
topBar->addWidget(title,1);
- QPushButton *zoomIn = new QPushButton(i18n("Zoom In"),this);
+ TQPushButton *zoomIn = new TQPushButton(i18n("Zoom In"),this);
topBar->addWidget(zoomIn,0);
- connect(zoomIn,SIGNAL(clicked()),SLOT(zoomIn()));
+ connect(zoomIn,TQT_SIGNAL(clicked()),TQT_SLOT(zoomIn()));
- QPushButton *zoomOut = new QPushButton(i18n("Zoom Out"),this);
+ TQPushButton *zoomOut = new TQPushButton(i18n("Zoom Out"),this);
topBar->addWidget(zoomOut,0);
- connect(zoomOut,SIGNAL(clicked()),SLOT(zoomOut()));
+ connect(zoomOut,TQT_SIGNAL(clicked()),TQT_SLOT(zoomOut()));
- QPushButton *menuButton = new QPushButton(i18n("Select Mode"),this);
+ TQPushButton *menuButton = new TQPushButton(i18n("Select Mode"),this);
topBar->addWidget(menuButton,0);
- connect(menuButton,SIGNAL(clicked()),SLOT(showModeMenu()));
+ connect(menuButton,TQT_SIGNAL(clicked()),TQT_SLOT(showModeMenu()));
createMainTask();
@@ -107,8 +107,8 @@ KOProjectView::KOProjectView(Calendar *calendar,QWidget* parent,
void KOProjectView::createMainTask()
{
mMainTask = new KGanttItem(0,i18n("main task"),
- QDateTime::currentDateTime(),
- QDateTime::currentDateTime());
+ TQDateTime::currentDateTime(),
+ TQDateTime::currentDateTime());
mMainTask->setMode(KGanttItem::Rubberband);
mMainTask->setStyle(KGanttItem::DrawBorder | KGanttItem::DrawText |
KGanttItem::DrawHandle);
@@ -122,7 +122,7 @@ void KOProjectView::readSettings()
KConfig config( "korganizerrc", true, false); // Open read-only, no kdeglobals
config.setGroup("Views");
- QValueList<int> sizes = config.readIntListEntry("Separator ProjectView");
+ TQValueList<int> sizes = config.readIntListEntry("Separator ProjectView");
if (sizes.count() == 2) {
mGantt->splitter()->setSizes(sizes);
}
@@ -134,7 +134,7 @@ void KOProjectView::writeSettings(KConfig *config)
config->setGroup("Views");
- QValueList<int> list = mGantt->splitter()->sizes();
+ TQValueList<int> list = mGantt->splitter()->sizes();
config->writeEntry("Separator ProjectView",list);
}
@@ -144,7 +144,7 @@ void KOProjectView::updateView()
kdDebug(5850) << "KOProjectView::updateView()" << endl;
// Clear Gantt view
- QPtrList<KGanttItem> subs = mMainTask->getSubItems();
+ TQPtrList<KGanttItem> subs = mMainTask->getSubItems();
KGanttItem *t=subs.first();
while(t) {
KGanttItem *nt=subs.next();
@@ -154,12 +154,12 @@ void KOProjectView::updateView()
#if 0
KGanttItem* t1 = new KGanttItem(mGantt->getMainTask(), "task 1, no subtasks",
- QDateTime::currentDateTime().addDays(10),
- QDateTime::currentDateTime().addDays(20) );
+ TQDateTime::currentDateTime().addDays(10),
+ TQDateTime::currentDateTime().addDays(20) );
KGanttItem* t2 = new KGanttItem(mGantt->getMainTask(), "task 2, subtasks, no rubberband",
- QDateTime(QDate(2000,10,1)),
- QDateTime(QDate(2000,10,31)) );
+ TQDateTime(TQDate(2000,10,1)),
+ TQDateTime(TQDate(2000,10,31)) );
#endif
Todo::List todoList = calendar()->todos();
@@ -174,7 +174,7 @@ void KOProjectView::updateView()
kdDebug(5850) << " (related to " << t->getRelatedTo()->getSummary() << ")" << endl;
}
- QPtrList<Event> l = t->getRelations();
+ TQPtrList<Event> l = t->getRelations();
Event *c;
for(c=l.first();c;c=l.next()) {
kdDebug(5850) << " - relation: " << c->getSummary() << endl;
@@ -194,14 +194,14 @@ void KOProjectView::updateView()
}
}
-QMap<Todo *,KGanttItem *>::ConstIterator
+TQMap<Todo *,KGanttItem *>::ConstIterator
KOProjectView::insertTodoItem(Todo *todo)
{
// kdDebug(5850) << "KOProjectView::insertTodoItem(): " << todo->getSummary() << endl;
Todo *relatedTodo = dynamic_cast<Todo *>(todo->relatedTo());
if (relatedTodo) {
// kdDebug(5850) << " has Related" << endl;
- QMap<Todo *,KGanttItem *>::ConstIterator itemIterator;
+ TQMap<Todo *,KGanttItem *>::ConstIterator itemIterator;
itemIterator = mTodoMap.find(relatedTodo);
if (itemIterator == mTodoMap.end()) {
// kdDebug(5850) << " related not yet in list" << endl;
@@ -218,20 +218,20 @@ QMap<Todo *,KGanttItem *>::ConstIterator
KGanttItem *KOProjectView::createTask(KGanttItem *parent,Todo *todo)
{
- QDateTime startDt;
- QDateTime endDt;
+ TQDateTime startDt;
+ TQDateTime endDt;
if (todo->hasStartDate() && !todo->hasDueDate()) {
// start date but no due date
startDt = todo->dtStart();
- endDt = QDateTime::currentDateTime();
+ endDt = TQDateTime::currentDateTime();
} else if (!todo->hasStartDate() && todo->hasDueDate()) {
// due date but no start date
startDt = todo->dtDue();
endDt = todo->dtDue();
} else if (!todo->hasStartDate() || !todo->hasDueDate()) {
- startDt = QDateTime::currentDateTime();
- endDt = QDateTime::currentDateTime();
+ startDt = TQDateTime::currentDateTime();
+ endDt = TQDateTime::currentDateTime();
} else {
startDt = todo->dtStart();
endDt = todo->dtDue();
@@ -239,10 +239,10 @@ KGanttItem *KOProjectView::createTask(KGanttItem *parent,Todo *todo)
KGanttItem *task = new KOProjectViewItem(todo,parent,todo->summary(),startDt,
endDt);
- connect(task,SIGNAL(changed(KGanttItem*, KGanttItem::Change)),
- SLOT(taskChanged(KGanttItem*,KGanttItem::Change)));
+ connect(task,TQT_SIGNAL(changed(KGanttItem*, KGanttItem::Change)),
+ TQT_SLOT(taskChanged(KGanttItem*,KGanttItem::Change)));
if (todo->relations().count() > 0) {
- task->setBrush(QBrush(QColor(240,240,240), QBrush::Dense4Pattern));
+ task->setBrush(TQBrush(TQColor(240,240,240), TQBrush::Dense4Pattern));
}
return task;
@@ -276,7 +276,7 @@ void KOProjectView::changeIncidenceDisplay(Incidence *, int)
updateView();
}
-void KOProjectView::showDates(const QDate &, const QDate &)
+void KOProjectView::showDates(const TQDate &, const TQDate &)
{
updateView();
}
@@ -287,21 +287,21 @@ void KOProjectView::showIncidences( const Incidence::List & )
}
#if 0
-void KOProjectView::editItem(QListViewItem *item)
+void KOProjectView::editItem(TQListViewItem *item)
{
emit editIncidenceSignal(((KOProjectViewItem *)item)->event());
}
-void KOProjectView::showItem(QListViewItem *item)
+void KOProjectView::showItem(TQListViewItem *item)
{
emit showIncidenceSignal(((KOProjectViewItem *)item)->event());
}
-void KOProjectView::popupMenu(QListViewItem *item,const QPoint &,int)
+void KOProjectView::popupMenu(TQListViewItem *item,const TQPoint &,int)
{
mActiveItem = (KOProjectViewItem *)item;
- if (item) mItemPopupMenu->popup(QCursor::pos());
- else mPopupMenu->popup(QCursor::pos());
+ if (item) mItemPopupMenu->popup(TQCursor::pos());
+ else mPopupMenu->popup(TQCursor::pos());
}
void KOProjectView::newTodo()
@@ -316,7 +316,7 @@ void KOProjectView::newSubTodo()
}
}
-void KOProjectView::itemClicked(QListViewItem *item)
+void KOProjectView::itemClicked(TQListViewItem *item)
{
if (!item) return;
@@ -337,7 +337,7 @@ void KOProjectView::itemClicked(QListViewItem *item)
void KOProjectView::showModeMenu()
{
- mGantt->menu()->popup(QCursor::pos());
+ mGantt->menu()->popup(TQCursor::pos());
}
void KOProjectView::taskChanged(KGanttItem *task,KGanttItem::Change change)
diff --git a/korganizer/plugins/projectview/koprojectview.h b/korganizer/plugins/projectview/koprojectview.h
index a356fe024..4d2d8226c 100644
--- a/korganizer/plugins/projectview/koprojectview.h
+++ b/korganizer/plugins/projectview/koprojectview.h
@@ -20,10 +20,10 @@
#define KOPROJECTVIEW_H
/* $Id$ */
-#include <qptrlist.h>
-#include <qfontmetrics.h>
+#include <tqptrlist.h>
+#include <tqfontmetrics.h>
-#include <qmap.h>
+#include <tqmap.h>
#include <libkcal/calendar.h>
#include <libkcal/event.h>
@@ -46,8 +46,8 @@ class QListView;
*/
class KOProjectViewItem : public KGanttItem {
public:
- KOProjectViewItem(Todo *,KGanttItem* parentTask, const QString& text,
- const QDateTime& start, const QDateTime& end);
+ KOProjectViewItem(Todo *,KGanttItem* parentTask, const TQString& text,
+ const TQDateTime& start, const TQDateTime& end);
~KOProjectViewItem();
Todo *event();
@@ -67,7 +67,7 @@ class KOProjectView : public KOrg::BaseView
{
Q_OBJECT
public:
- KOProjectView(Calendar *, QWidget* parent=0, const char* name=0 );
+ KOProjectView(Calendar *, TQWidget* parent=0, const char* name=0 );
~KOProjectView() {}
Incidence::List selectedIncidences();
@@ -85,16 +85,16 @@ class KOProjectView : public KOrg::BaseView
void changeIncidenceDisplay(Incidence *, int);
- void showDates(const QDate &start, const QDate &end);
+ void showDates(const TQDate &start, const TQDate &end);
void showIncidences( const Incidence::List &incidenceList );
/*
- void editItem(QListViewItem *item);
- void showItem(QListViewItem *item);
- void popupMenu(QListViewItem *item,const QPoint &,int);
+ void editItem(TQListViewItem *item);
+ void showItem(TQListViewItem *item);
+ void popupMenu(TQListViewItem *item,const TQPoint &,int);
void newTodo();
void newSubTodo();
- void itemClicked(QListViewItem *);
+ void itemClicked(TQListViewItem *);
*/
protected slots:
@@ -110,9 +110,9 @@ class KOProjectView : public KOrg::BaseView
KGantt *mGantt;
KGanttItem *mMainTask;
- QMap<Todo *,KGanttItem *>::ConstIterator insertTodoItem(Todo *todo);
+ TQMap<Todo *,KGanttItem *>::ConstIterator insertTodoItem(Todo *todo);
- QMap<Todo *,KGanttItem *> mTodoMap;
+ TQMap<Todo *,KGanttItem *> mTodoMap;
};
#endif
diff --git a/korganizer/plugins/projectview/projectview.cpp b/korganizer/plugins/projectview/projectview.cpp
index 3fdf84b43..2e7b3dc61 100644
--- a/korganizer/plugins/projectview/projectview.cpp
+++ b/korganizer/plugins/projectview/projectview.cpp
@@ -17,7 +17,7 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#include <qfile.h>
+#include <tqfile.h>
#include <kapplication.h>
#include <kconfig.h>
@@ -52,7 +52,7 @@ ProjectView::ProjectView(KOrg::MainWindow *parent, const char *name) :
setXMLFile("plugins/projectviewui.rc");
- new KAction(i18n("&Project"), "project", 0, this, SLOT(showView()),
+ new KAction(i18n("&Project"), "project", 0, this, TQT_SLOT(showView()),
actionCollection(), "view_project");
}
@@ -60,12 +60,12 @@ ProjectView::~ProjectView()
{
}
-QString ProjectView::info()
+TQString ProjectView::info()
{
return i18n("This plugin provides a Gantt diagram as project view.");
}
-QString ProjectView::shortInfo()
+TQString ProjectView::shortInfo()
{
return i18n("Project View Plugin");
}
diff --git a/korganizer/plugins/projectview/projectview.h b/korganizer/plugins/projectview/projectview.h
index acc9a604f..a3f372a87 100644
--- a/korganizer/plugins/projectview/projectview.h
+++ b/korganizer/plugins/projectview/projectview.h
@@ -29,8 +29,8 @@ class ProjectView : public KOrg::Part {
ProjectView(KOrg::MainWindow *, const char *);
~ProjectView();
- QString info();
- QString shortInfo();
+ TQString info();
+ TQString shortInfo();
private slots:
void showView();
diff --git a/korganizer/plugins/timespanview/kotimespanview.cpp b/korganizer/plugins/timespanview/kotimespanview.cpp
index 507438a6a..eec3ab461 100644
--- a/korganizer/plugins/timespanview/kotimespanview.cpp
+++ b/korganizer/plugins/timespanview/kotimespanview.cpp
@@ -22,7 +22,7 @@
without including the source code for Qt in the source distribution.
*/
-#include <qlayout.h>
+#include <tqlayout.h>
#include <kconfig.h>
#include <kstandarddirs.h>
@@ -35,16 +35,16 @@
#include "kotimespanview.h"
#include "kotimespanview.moc"
-KOTimeSpanView::KOTimeSpanView(Calendar *calendar, QWidget *parent,
+KOTimeSpanView::KOTimeSpanView(Calendar *calendar, TQWidget *parent,
const char *name) :
KOEventView( calendar, parent, name )
{
- QBoxLayout *topLayout = new QVBoxLayout( this );
+ TQBoxLayout *topLayout = new TQVBoxLayout( this );
mTimeSpanWidget = new TimeSpanWidget( this );
topLayout->addWidget( mTimeSpanWidget );
- connect( mTimeSpanWidget, SIGNAL( dateRangeChanged() ), SLOT( updateView() ) );
+ connect( mTimeSpanWidget, TQT_SIGNAL( dateRangeChanged() ), TQT_SLOT( updateView() ) );
}
KOTimeSpanView::~KOTimeSpanView()
@@ -58,7 +58,7 @@ void KOTimeSpanView::readSettings()
KConfig config( "korganizerrc", true, false); // Open read-only, no kdeglobals
config.setGroup("Views");
- QValueList<int> sizes = config.readIntListEntry("Separator TimeSpanView");
+ TQValueList<int> sizes = config.readIntListEntry("Separator TimeSpanView");
if (sizes.count() == 2) {
mTimeSpanWidget->setSplitterSizes(sizes);
}
@@ -70,7 +70,7 @@ void KOTimeSpanView::writeSettings(KConfig *config)
config->setGroup("Views");
- QValueList<int> list = mTimeSpanWidget->splitterSizes();
+ TQValueList<int> list = mTimeSpanWidget->splitterSizes();
config->writeEntry("Separator TimeSpanView",list);
}
@@ -97,15 +97,15 @@ void KOTimeSpanView::updateView()
mTimeSpanWidget->endDateTime().date() );
}
-void KOTimeSpanView::showDates(const QDate &start, const QDate &end)
+void KOTimeSpanView::showDates(const TQDate &start, const TQDate &end)
{
- QDate s = start.addDays( -2 );
- QDate e = end.addDays( 2 );
+ TQDate s = start.addDays( -2 );
+ TQDate e = end.addDays( 2 );
insertItems( s, e );
}
-void KOTimeSpanView::insertItems(const QDate &start, const QDate &end)
+void KOTimeSpanView::insertItems(const TQDate &start, const TQDate &end)
{
mTimeSpanWidget->clear();
mTimeSpanWidget->setDateRange( start, end );
diff --git a/korganizer/plugins/timespanview/kotimespanview.h b/korganizer/plugins/timespanview/kotimespanview.h
index 142ba75f4..d115b630b 100644
--- a/korganizer/plugins/timespanview/kotimespanview.h
+++ b/korganizer/plugins/timespanview/kotimespanview.h
@@ -33,7 +33,7 @@ class KOTimeSpanView : public KOEventView
{
Q_OBJECT
public:
- KOTimeSpanView( Calendar *calendar, QWidget *parent = 0,
+ KOTimeSpanView( Calendar *calendar, TQWidget *parent = 0,
const char *name = 0 );
~KOTimeSpanView();
@@ -47,13 +47,13 @@ class KOTimeSpanView : public KOEventView
public slots:
virtual void updateView();
- virtual void showDates( const QDate &start, const QDate &end );
+ virtual void showDates( const TQDate &start, const TQDate &end );
virtual void showIncidences( const Incidence::List &incidenceList );
void changeIncidenceDisplay(Incidence *, int);
private:
- void insertItems( const QDate &start, const QDate & end );
+ void insertItems( const TQDate &start, const TQDate & end );
TimeSpanWidget *mTimeSpanWidget;
};
diff --git a/korganizer/plugins/timespanview/lineview.cpp b/korganizer/plugins/timespanview/lineview.cpp
index 26779bdb3..93a2f0bfa 100644
--- a/korganizer/plugins/timespanview/lineview.cpp
+++ b/korganizer/plugins/timespanview/lineview.cpp
@@ -22,7 +22,7 @@
without including the source code for Qt in the source distribution.
*/
-#include <qpainter.h>
+#include <tqpainter.h>
#include <kdebug.h>
@@ -31,8 +31,8 @@
#include "lineview.h"
#include "lineview.moc"
-LineView::LineView( QWidget *parent, const char *name ) :
- QScrollView( parent, name )
+LineView::LineView( TQWidget *parent, const char *name ) :
+ TQScrollView( parent, name )
{
mPixelWidth = 1000;
@@ -71,7 +71,7 @@ void LineView::clear()
update();
}
-void LineView::drawContents(QPainter* p, int cx, int cy, int cw, int ch)
+void LineView::drawContents(TQPainter* p, int cx, int cy, int cw, int ch)
{
// kdDebug(5850) << "LineView::drawContents()" << endl;
@@ -112,7 +112,7 @@ void LineView::drawContents(QPainter* p, int cx, int cy, int cw, int ch)
if ( cbottom > (cy+ch) ) cbottom = cy+ch;
// kdDebug(5850) << " drawContents(): ctop: " << ctop << " cbottom: "
// << cbottom << " s: " << s << " e: " << e << endl;
- p->fillRect( s, ctop, e - s + 1, cbottom - ctop + 1, QBrush("red") );
+ p->fillRect( s, ctop, e - s + 1, cbottom - ctop + 1, TQBrush("red") );
}
}
}
diff --git a/korganizer/plugins/timespanview/lineview.h b/korganizer/plugins/timespanview/lineview.h
index 0bb1788a7..e98d905b0 100644
--- a/korganizer/plugins/timespanview/lineview.h
+++ b/korganizer/plugins/timespanview/lineview.h
@@ -24,14 +24,14 @@
#ifndef LINEVIEW_H
#define LINEVIEW_H
-#include <qscrollview.h>
-#include <qptrlist.h>
+#include <tqscrollview.h>
+#include <tqptrlist.h>
class LineView : public QScrollView
{
Q_OBJECT
public:
- LineView( QWidget *parent = 0, const char *name = 0 );
+ LineView( TQWidget *parent = 0, const char *name = 0 );
virtual ~LineView();
int pixelWidth();
@@ -41,7 +41,7 @@ class LineView : public QScrollView
void clear();
protected:
- void drawContents(QPainter* p, int cx, int cy, int cw, int ch);
+ void drawContents(TQPainter* p, int cx, int cy, int cw, int ch);
private:
struct Line {
@@ -51,7 +51,7 @@ class LineView : public QScrollView
int end;
};
- QPtrList<Line> mLines;
+ TQPtrList<Line> mLines;
int mPixelWidth;
};
diff --git a/korganizer/plugins/timespanview/timeline.cpp b/korganizer/plugins/timespanview/timeline.cpp
index 0d679e192..19ed75818 100644
--- a/korganizer/plugins/timespanview/timeline.cpp
+++ b/korganizer/plugins/timespanview/timeline.cpp
@@ -22,15 +22,15 @@
without including the source code for Qt in the source distribution.
*/
-#include <qpainter.h>
+#include <tqpainter.h>
#include <kdebug.h>
#include "timeline.h"
#include "timeline.moc"
-TimeLine::TimeLine( QWidget *parent, const char *name ) :
- QScrollView( parent, name )
+TimeLine::TimeLine( TQWidget *parent, const char *name ) :
+ TQScrollView( parent, name )
{
mPixelWidth = 1000;
@@ -46,7 +46,7 @@ TimeLine::~TimeLine()
{
}
-void TimeLine::drawContents(QPainter* p, int cx, int cy, int cw, int ch)
+void TimeLine::drawContents(TQPainter* p, int cx, int cy, int cw, int ch)
{
int spacingX = mDaySpacing;
int offsetX = mDayOffset;
@@ -59,14 +59,14 @@ void TimeLine::drawContents(QPainter* p, int cx, int cy, int cw, int ch)
while (x < cx + cw) {
// kdDebug(5850) << " x: " << x << endl;
p->drawLine(x,cy,x,cy+ch);
- p->drawText( x + 5, 15, QString::number( mStartDate.addDays( cell + 1 ).date().day() ) );
+ p->drawText( x + 5, 15, TQString::number( mStartDate.addDays( cell + 1 ).date().day() ) );
x += spacingX;
cell++;
}
}
-void TimeLine::setDateRange( const QDateTime &start, const QDateTime &end )
+void TimeLine::setDateRange( const TQDateTime &start, const TQDateTime &end )
{
mStartDate = start;
mEndDate = end;
@@ -75,7 +75,7 @@ void TimeLine::setDateRange( const QDateTime &start, const QDateTime &end )
mDaySpacing = 60 * 60 * 24 / mSecsPerPixel;
- mDayOffset = QDateTime( mStartDate.date() ).secsTo( mStartDate ) / mSecsPerPixel;
+ mDayOffset = TQDateTime( mStartDate.date() ).secsTo( mStartDate ) / mSecsPerPixel;
kdDebug(5850) << "TimeLines::setDateRange(): mDaySpacing: " << mDaySpacing << " mDayOffset: "
<< mDayOffset << " mSecsPerPixel: " << mSecsPerPixel << endl;
@@ -83,5 +83,5 @@ void TimeLine::setDateRange( const QDateTime &start, const QDateTime &end )
void TimeLine::setContentsPos( int pos )
{
- QScrollView::setContentsPos ( pos, 0 );
+ TQScrollView::setContentsPos ( pos, 0 );
}
diff --git a/korganizer/plugins/timespanview/timeline.h b/korganizer/plugins/timespanview/timeline.h
index 7c9bd8689..031763f72 100644
--- a/korganizer/plugins/timespanview/timeline.h
+++ b/korganizer/plugins/timespanview/timeline.h
@@ -24,27 +24,27 @@
#ifndef TIMELINE_H
#define TIMELINE_H
-#include <qscrollview.h>
-#include <qdatetime.h>
+#include <tqscrollview.h>
+#include <tqdatetime.h>
class TimeLine : public QScrollView
{
Q_OBJECT
public:
- TimeLine( QWidget *parent = 0, const char *name = 0 );
+ TimeLine( TQWidget *parent = 0, const char *name = 0 );
virtual ~TimeLine();
- void setDateRange( const QDateTime &start, const QDateTime &end );
+ void setDateRange( const TQDateTime &start, const TQDateTime &end );
public slots:
void setContentsPos( int pos );
protected:
- void drawContents(QPainter* p, int cx, int cy, int cw, int ch);
+ void drawContents(TQPainter* p, int cx, int cy, int cw, int ch);
private:
- QDateTime mStartDate;
- QDateTime mEndDate;
+ TQDateTime mStartDate;
+ TQDateTime mEndDate;
int mPixelWidth;
int mDaySpacing;
diff --git a/korganizer/plugins/timespanview/timespanview.cpp b/korganizer/plugins/timespanview/timespanview.cpp
index be95a2c8d..24a45abb1 100644
--- a/korganizer/plugins/timespanview/timespanview.cpp
+++ b/korganizer/plugins/timespanview/timespanview.cpp
@@ -17,7 +17,7 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#include <qfile.h>
+#include <tqfile.h>
#include <kapplication.h>
#include <kconfig.h>
@@ -51,7 +51,7 @@ TimespanView::TimespanView(KOrg::MainWindow *parent, const char *name) :
setXMLFile( "plugins/timespanviewui.rc" );
- new KAction( i18n("&Timespan"), "timespan", 0, this, SLOT( showView() ),
+ new KAction( i18n("&Timespan"), "timespan", 0, this, TQT_SLOT( showView() ),
actionCollection(), "view_timespan" );
}
@@ -59,12 +59,12 @@ TimespanView::~TimespanView()
{
}
-QString TimespanView::info()
+TQString TimespanView::info()
{
return i18n("This plugin provides a Gantt-like Timespan view.");
}
-QString TimespanView::shortInfo()
+TQString TimespanView::shortInfo()
{
return i18n( "Timespan View Plugin" );
}
diff --git a/korganizer/plugins/timespanview/timespanview.h b/korganizer/plugins/timespanview/timespanview.h
index e88e140c5..cb2d17f70 100644
--- a/korganizer/plugins/timespanview/timespanview.h
+++ b/korganizer/plugins/timespanview/timespanview.h
@@ -29,8 +29,8 @@ class TimespanView : public KOrg::Part {
TimespanView(KOrg::MainWindow *, const char *);
~TimespanView();
- QString info();
- QString shortInfo();
+ TQString info();
+ TQString shortInfo();
private slots:
void showView();
diff --git a/korganizer/plugins/timespanview/timespanwidget.cpp b/korganizer/plugins/timespanview/timespanwidget.cpp
index 23d781f45..0e8f0c4b9 100644
--- a/korganizer/plugins/timespanview/timespanwidget.cpp
+++ b/korganizer/plugins/timespanview/timespanwidget.cpp
@@ -22,11 +22,11 @@
without including the source code for Qt in the source distribution.
*/
-#include <qsplitter.h>
-#include <qlistview.h>
-#include <qlayout.h>
-#include <qheader.h>
-#include <qpushbutton.h>
+#include <tqsplitter.h>
+#include <tqlistview.h>
+#include <tqlayout.h>
+#include <tqheader.h>
+#include <tqpushbutton.h>
#include <klocale.h>
#include <kdebug.h>
@@ -39,19 +39,19 @@
#include "timespanwidget.h"
#include "timespanwidget.moc"
-TimeSpanWidget::TimeSpanWidget( QWidget *parent, const char *name ) :
- QWidget( parent, name )
+TimeSpanWidget::TimeSpanWidget( TQWidget *parent, const char *name ) :
+ TQWidget( parent, name )
{
- QBoxLayout *topLayout = new QVBoxLayout( this );
+ TQBoxLayout *topLayout = new TQVBoxLayout( this );
- mSplitter = new QSplitter( this );
+ mSplitter = new TQSplitter( this );
topLayout->addWidget( mSplitter );
- mList = new QListView( mSplitter );
+ mList = new TQListView( mSplitter );
mList->addColumn( i18n("Summary") );
- QWidget *rightPane = new QWidget( mSplitter );
- QBoxLayout *rightPaneLayout = new QVBoxLayout( rightPane );
+ TQWidget *rightPane = new TQWidget( mSplitter );
+ TQBoxLayout *rightPaneLayout = new TQVBoxLayout( rightPane );
mTimeLine = new TimeLine( rightPane );
mTimeLine->setFixedHeight( mList->header()->height() );
@@ -60,44 +60,44 @@ TimeSpanWidget::TimeSpanWidget( QWidget *parent, const char *name ) :
mLineView = new LineView( rightPane );
rightPaneLayout->addWidget( mLineView );
- QBoxLayout *buttonLayout = new QHBoxLayout( rightPaneLayout );
+ TQBoxLayout *buttonLayout = new TQHBoxLayout( rightPaneLayout );
- QPushButton *zoomInButton = new QPushButton( i18n("Zoom In"), rightPane );
- connect( zoomInButton, SIGNAL( clicked() ), SLOT( zoomIn() ) );
+ TQPushButton *zoomInButton = new TQPushButton( i18n("Zoom In"), rightPane );
+ connect( zoomInButton, TQT_SIGNAL( clicked() ), TQT_SLOT( zoomIn() ) );
buttonLayout->addWidget( zoomInButton );
- QPushButton *zoomOutButton = new QPushButton( i18n("Zoom Out"), rightPane );
- connect( zoomOutButton, SIGNAL( clicked() ), SLOT( zoomOut() ) );
+ TQPushButton *zoomOutButton = new TQPushButton( i18n("Zoom Out"), rightPane );
+ connect( zoomOutButton, TQT_SIGNAL( clicked() ), TQT_SLOT( zoomOut() ) );
buttonLayout->addWidget( zoomOutButton );
- QPushButton *centerButton = new QPushButton( i18n("Center View"), rightPane );
- connect( centerButton, SIGNAL( clicked() ), SLOT( centerView() ) );
+ TQPushButton *centerButton = new TQPushButton( i18n("Center View"), rightPane );
+ connect( centerButton, TQT_SIGNAL( clicked() ), TQT_SLOT( centerView() ) );
buttonLayout->addWidget( centerButton );
- connect(mLineView->horizontalScrollBar(),SIGNAL(valueChanged(int)),
- mTimeLine,SLOT(setContentsPos(int)));
+ connect(mLineView->horizontalScrollBar(),TQT_SIGNAL(valueChanged(int)),
+ mTimeLine,TQT_SLOT(setContentsPos(int)));
}
TimeSpanWidget::~TimeSpanWidget()
{
}
-QValueList<int> TimeSpanWidget::splitterSizes()
+TQValueList<int> TimeSpanWidget::splitterSizes()
{
return mSplitter->sizes();
}
-void TimeSpanWidget::setSplitterSizes( QValueList<int> sizes )
+void TimeSpanWidget::setSplitterSizes( TQValueList<int> sizes )
{
mSplitter->setSizes( sizes );
}
void TimeSpanWidget::addItem( KCal::Event *event )
{
- new QListViewItem( mList, event->summary() );
+ new TQListViewItem( mList, event->summary() );
- QDateTime startDt = event->dtStart();
- QDateTime endDt = event->dtEnd();
+ TQDateTime startDt = event->dtStart();
+ TQDateTime endDt = event->dtEnd();
// kdDebug(5850) << "TimeSpanWidget::addItem(): start: " << startDt.toString()
// << " end: " << endDt.toString() << endl;
@@ -130,7 +130,7 @@ void TimeSpanWidget::updateView()
#endif
}
-void TimeSpanWidget::setDateRange( const QDateTime &start, const QDateTime &end )
+void TimeSpanWidget::setDateRange( const TQDateTime &start, const TQDateTime &end )
{
mStartDate = start;
mEndDate = end;
@@ -140,12 +140,12 @@ void TimeSpanWidget::setDateRange( const QDateTime &start, const QDateTime &end
mSecsPerPixel = mStartDate.secsTo( mEndDate ) / mLineView->pixelWidth();
}
-QDateTime TimeSpanWidget::startDateTime()
+TQDateTime TimeSpanWidget::startDateTime()
{
return mStartDate;
}
-QDateTime TimeSpanWidget::endDateTime()
+TQDateTime TimeSpanWidget::endDateTime()
{
return mEndDate;
}
@@ -168,7 +168,7 @@ void TimeSpanWidget::zoomOut()
void TimeSpanWidget::centerView()
{
- QScrollBar *scrollBar = mLineView->horizontalScrollBar();
+ TQScrollBar *scrollBar = mLineView->horizontalScrollBar();
int min = scrollBar->minValue();
int max = scrollBar->maxValue();
scrollBar->setValue( min + (max-min) / 2 );
diff --git a/korganizer/plugins/timespanview/timespanwidget.h b/korganizer/plugins/timespanview/timespanwidget.h
index 316437023..38cdea6c8 100644
--- a/korganizer/plugins/timespanview/timespanwidget.h
+++ b/korganizer/plugins/timespanview/timespanwidget.h
@@ -24,7 +24,7 @@
#ifndef TimeSpanWidget_H
#define TimeSpanWidget_H
-#include <qwidget.h>
+#include <tqwidget.h>
namespace KCal {
class Event;
@@ -39,20 +39,20 @@ class TimeSpanWidget : public QWidget
{
Q_OBJECT
public:
- TimeSpanWidget( QWidget *parent=0, const char *name=0 );
+ TimeSpanWidget( TQWidget *parent=0, const char *name=0 );
virtual ~TimeSpanWidget();
void addItem( KCal::Event * );
- QValueList<int> splitterSizes();
- void setSplitterSizes( QValueList<int> );
+ TQValueList<int> splitterSizes();
+ void setSplitterSizes( TQValueList<int> );
void clear();
- void setDateRange( const QDateTime &start, const QDateTime &end );
+ void setDateRange( const TQDateTime &start, const TQDateTime &end );
- QDateTime startDateTime();
- QDateTime endDateTime();
+ TQDateTime startDateTime();
+ TQDateTime endDateTime();
public slots:
void updateView();
@@ -65,13 +65,13 @@ class TimeSpanWidget : public QWidget
void dateRangeChanged();
private:
- QSplitter *mSplitter;
- QListView *mList;
+ TQSplitter *mSplitter;
+ TQListView *mList;
TimeLine *mTimeLine;
LineView *mLineView;
- QDateTime mStartDate;
- QDateTime mEndDate;
+ TQDateTime mStartDate;
+ TQDateTime mEndDate;
int mSecsPerPixel;
};
diff --git a/korganizer/printing/calprintdefaultplugins.cpp b/korganizer/printing/calprintdefaultplugins.cpp
index d12df1e26..bc4c62496 100644
--- a/korganizer/printing/calprintdefaultplugins.cpp
+++ b/korganizer/printing/calprintdefaultplugins.cpp
@@ -26,11 +26,11 @@
#ifndef KORG_NOPRINTER
-#include <qpainter.h>
-#include <qdatetimeedit.h>
-#include <qcheckbox.h>
-#include <qlineedit.h>
-#include <qbuttongroup.h>
+#include <tqpainter.h>
+#include <tqdatetimeedit.h>
+#include <tqcheckbox.h>
+#include <tqlineedit.h>
+#include <tqbuttongroup.h>
#include <kdebug.h>
#include <kconfig.h>
@@ -59,7 +59,7 @@ CalPrintIncidence::~CalPrintIncidence()
{
}
-QWidget *CalPrintIncidence::createConfigWidget( QWidget *w )
+TQWidget *CalPrintIncidence::createConfigWidget( TQWidget *w )
{
return new CalPrintIncidenceConfig_Base( w );
}
@@ -124,9 +124,9 @@ class TimePrintStringsVisitor : public IncidenceBase::Visitor
{
return incidence->accept( *this );
}
- QString mStartCaption, mStartString;
- QString mEndCaption, mEndString;
- QString mDurationCaption, mDurationString;
+ TQString mStartCaption, mStartString;
+ TQString mEndCaption, mEndString;
+ TQString mDurationCaption, mDurationString;
protected:
bool visit( Event *event ) {
@@ -137,7 +137,7 @@ class TimePrintStringsVisitor : public IncidenceBase::Visitor
mStartString = (event->doesFloat()) ? (event->dtStartDateStr(false)) : (event->dtStartStr());
} else {
mStartCaption = i18n("No start date");
- mStartString = QString::null;
+ mStartString = TQString::null;
}
if ( event->hasEndDate() ) {
@@ -154,7 +154,7 @@ class TimePrintStringsVisitor : public IncidenceBase::Visitor
}
} else {
mEndCaption = i18n("No end date");
- mEndString = QString::null;
+ mEndString = TQString::null;
}
return true;
}
@@ -166,7 +166,7 @@ class TimePrintStringsVisitor : public IncidenceBase::Visitor
mStartString = (todo->doesFloat()) ? (todo->dtStartDateStr(false)) : (todo->dtStartStr());
} else {
mStartCaption = i18n("No start date");
- mStartString = QString::null;
+ mStartString = TQString::null;
}
if ( todo->hasDueDate() ) {
@@ -174,7 +174,7 @@ class TimePrintStringsVisitor : public IncidenceBase::Visitor
mEndString = (todo->doesFloat()) ? (todo->dtDueDateStr(false)) : (todo->dtDueStr());
} else {
mEndCaption = i18n("No due date");
- mEndString = QString::null;
+ mEndString = TQString::null;
}
return true;
}
@@ -182,19 +182,19 @@ class TimePrintStringsVisitor : public IncidenceBase::Visitor
mStartCaption = i18n("Start date: ");
// TODO: Add shortfmt param to dtStartStr, dtEndStr and dtDueStr!!!
mStartString = (journal->doesFloat()) ? (journal->dtStartDateStr(false)) : (journal->dtStartStr());
- mEndCaption = QString::null;
- mEndString = QString::null;
+ mEndCaption = TQString::null;
+ mEndString = TQString::null;
return true;
}
};
-int CalPrintIncidence::printCaptionAndText( QPainter &p, const QRect &box, const QString &caption, const QString &text, QFont captionFont, QFont textFont )
+int CalPrintIncidence::printCaptionAndText( TQPainter &p, const TQRect &box, const TQString &caption, const TQString &text, TQFont captionFont, TQFont textFont )
{
- QFontMetrics captionFM( captionFont );
+ TQFontMetrics captionFM( captionFont );
int textWd = captionFM.width( caption );
- QRect textRect( box );
+ TQRect textRect( box );
- QFont oldFont( p.font() );
+ TQFont oldFont( p.font() );
p.setFont( captionFont );
p.drawText( box, Qt::AlignLeft|Qt::AlignTop|Qt::SingleLine, caption );
@@ -207,17 +207,17 @@ int CalPrintIncidence::printCaptionAndText( QPainter &p, const QRect &box, const
return textRect.bottom();
}
-#include <qfontdatabase.h>
-void CalPrintIncidence::print( QPainter &p, int width, int height )
+#include <tqfontdatabase.h>
+void CalPrintIncidence::print( TQPainter &p, int width, int height )
{
KLocale *local = KGlobal::locale();
- QFont oldFont(p.font());
- QFont textFont( "sans-serif", 11, QFont::Normal );
- QFont captionFont( "sans-serif", 11, QFont::Bold );
+ TQFont oldFont(p.font());
+ TQFont textFont( "sans-serif", 11, TQFont::Normal );
+ TQFont captionFont( "sans-serif", 11, TQFont::Bold );
p.setFont( textFont );
int lineHeight = p.fontMetrics().lineSpacing();
- QString cap, txt;
+ TQString cap, txt;
Incidence::List::ConstIterator it;
@@ -257,21 +257,21 @@ void CalPrintIncidence::print( QPainter &p, int width, int height )
// | Categories: _____________________ |
// +-----------------------------------+
- QRect box( 0, 0, width, height );
- QRect titleBox( box );
+ TQRect box( 0, 0, width, height );
+ TQRect titleBox( box );
titleBox.setHeight( headerHeight() );
// Draw summary as header, no small calendars in title bar, expand height if needed
- int titleBottom = drawHeader( p, (*it)->summary(), QDate(), QDate(), titleBox, true );
+ int titleBottom = drawHeader( p, (*it)->summary(), TQDate(), TQDate(), titleBox, true );
titleBox.setBottom( titleBottom );
- QRect timesBox( titleBox );
+ TQRect timesBox( titleBox );
timesBox.setTop( titleBox.bottom() + padding() );
timesBox.setHeight( height / 8 );
TimePrintStringsVisitor stringVis;
int h = timesBox.top();
if ( stringVis.act(*it) ) {
- QRect textRect( timesBox.left()+padding(), timesBox.top()+padding(), 0, lineHeight );
+ TQRect textRect( timesBox.left()+padding(), timesBox.top()+padding(), 0, lineHeight );
textRect.setRight( timesBox.center().x() );
h = printCaptionAndText( p, textRect, stringVis.mStartCaption, stringVis.mStartString, captionFont, textFont );
@@ -282,27 +282,27 @@ void CalPrintIncidence::print( QPainter &p, int width, int height )
if ( (*it)->doesRecur() ) {
- QRect recurBox( timesBox.left()+padding(), h+padding(), timesBox.right()-padding(), lineHeight );
+ TQRect recurBox( timesBox.left()+padding(), h+padding(), timesBox.right()-padding(), lineHeight );
// TODO: Convert the recurrence to a string and print it out!
- QString recurString( "TODO: Convert Repeat to String!" );
+ TQString recurString( "TODO: Convert Repeat to String!" );
h = QMAX( printCaptionAndText( p, recurBox, i18n("Repeats: "), recurString, captionFont, textFont ), h );
}
- QRect alarmBox( timesBox.left()+padding(), h+padding(), timesBox.right()-padding(), lineHeight );
+ TQRect alarmBox( timesBox.left()+padding(), h+padding(), timesBox.right()-padding(), lineHeight );
Alarm::List alarms = (*it)->alarms();
if ( alarms.count() == 0 ) {
cap = i18n("No reminders");
- txt = QString::null;
+ txt = TQString::null;
} else {
cap = i18n("Reminder: ", "%n reminders: ", alarms.count() );
- QStringList alarmStrings;
+ TQStringList alarmStrings;
KCal::Alarm::List::ConstIterator it;
for ( it = alarms.begin(); it != alarms.end(); ++it ) {
Alarm *alarm = *it;
// Alarm offset, copied from koeditoralarms.cpp:
- QString offsetstr;
+ TQString offsetstr;
int offset = 0;
if ( alarm->hasStartOffset() ) {
offset = alarm->startOffset().asSeconds();
@@ -343,7 +343,7 @@ void CalPrintIncidence::print( QPainter &p, int width, int height )
h = QMAX( printCaptionAndText( p, alarmBox, cap, txt, captionFont, textFont ), h );
- QRect organizerBox( timesBox.left()+padding(), h+padding(), timesBox.right()-padding(), lineHeight );
+ TQRect organizerBox( timesBox.left()+padding(), h+padding(), timesBox.right()-padding(), lineHeight );
h = QMAX( printCaptionAndText( p, organizerBox, i18n("Organizer: "), (*it)->organizer().fullName(), captionFont, textFont ), h );
// Finally, draw the frame around the time information...
@@ -351,7 +351,7 @@ void CalPrintIncidence::print( QPainter &p, int width, int height )
drawBox( p, BOX_BORDER_WIDTH, timesBox );
- QRect locationBox( timesBox );
+ TQRect locationBox( timesBox );
locationBox.setTop( timesBox.bottom() + padding() );
locationBox.setHeight( 0 );
int locationBottom = drawBoxWithCaption( p, locationBox, i18n("Location: "),
@@ -360,20 +360,20 @@ void CalPrintIncidence::print( QPainter &p, int width, int height )
// Now start constructing the boxes from the bottom:
- QRect categoriesBox( locationBox );
+ TQRect categoriesBox( locationBox );
categoriesBox.setBottom( box.bottom() );
categoriesBox.setTop( categoriesBox.bottom() - lineHeight - 2*padding() );
- QRect attendeesBox( box.left(), categoriesBox.top()-padding()-box.height()/9, box.width(), box.height()/9 );
+ TQRect attendeesBox( box.left(), categoriesBox.top()-padding()-box.height()/9, box.width(), box.height()/9 );
if ( !mShowAttendees ) {
attendeesBox.setTop( categoriesBox.top() );
}
- QRect attachmentsBox( box.left(), attendeesBox.top()-padding()-box.height()/9, box.width()*3/4 - padding(), box.height()/9 );
- QRect optionsBox( attachmentsBox.right() + padding(), attachmentsBox.top(), 0, 0 );
+ TQRect attachmentsBox( box.left(), attendeesBox.top()-padding()-box.height()/9, box.width()*3/4 - padding(), box.height()/9 );
+ TQRect optionsBox( attachmentsBox.right() + padding(), attachmentsBox.top(), 0, 0 );
optionsBox.setRight( box.right() );
optionsBox.setBottom( attachmentsBox.bottom() );
- QRect notesBox( optionsBox.left(), locationBox.bottom() + padding(), optionsBox.width(), 0 );
+ TQRect notesBox( optionsBox.left(), locationBox.bottom() + padding(), optionsBox.width(), 0 );
notesBox.setBottom( optionsBox.top() - padding() );
// TODO: Adjust boxes depending on the show options...
@@ -385,7 +385,7 @@ void CalPrintIncidence::print( QPainter &p, int width, int height )
// bool mShowAttachments;
- QRect descriptionBox( notesBox );
+ TQRect descriptionBox( notesBox );
descriptionBox.setLeft( box.left() );
descriptionBox.setRight( mShowOptions?(attachmentsBox.right()):(box.right()) );
@@ -396,9 +396,9 @@ void CalPrintIncidence::print( QPainter &p, int width, int height )
if ( mShowSubitemsNotes ) {
if ( (*it)->relations().isEmpty() || (*it)->type() != "Todo" ) {
int notesPosition = drawBoxWithCaption( p, notesBox, i18n("Notes:"),
- QString::null, /*sameLine=*/false, /*expand=*/false,
+ TQString::null, /*sameLine=*/false, /*expand=*/false,
captionFont, textFont );
- QPen oldPen( p.pen() );
+ TQPen oldPen( p.pen() );
p.setPen( Qt::DotLine );
while ( (notesPosition += int(1.5*lineHeight)) < notesBox.bottom() ) {
p.drawLine( notesBox.left()+padding(), notesPosition, notesBox.right()-padding(), notesPosition );
@@ -414,19 +414,19 @@ void CalPrintIncidence::print( QPainter &p, int width, int height )
if ( mShowAttachments ) {
int attachStart = drawBoxWithCaption( p, attachmentsBox,
- i18n("Attachments:"), QString::null, /*sameLine=*/false,
+ i18n("Attachments:"), TQString::null, /*sameLine=*/false,
/*expand=*/false, captionFont, textFont );
// TODO: Print out the attachments somehow
}
if ( mShowAttendees ) {
Attendee::List attendees = (*it)->attendees();
- QString attendeeCaption;
+ TQString attendeeCaption;
if ( attendees.count() == 0 )
attendeeCaption = i18n("No Attendees");
else
attendeeCaption = i18n("1 Attendee:", "%n Attendees:", attendees.count() );
- QString attendeeString;
+ TQString attendeeString;
for ( Attendee::List::ConstIterator ait = attendees.begin(); ait != attendees.end(); ++ait ) {
if ( !attendeeString.isEmpty() ) attendeeString += "\n";
attendeeString += i18n("Formatting of an attendee: "
@@ -441,7 +441,7 @@ void CalPrintIncidence::print( QPainter &p, int width, int height )
}
if ( mShowOptions ) {
- QString optionsString;
+ TQString optionsString;
if ( !(*it)->statusStr().isEmpty() ) {
optionsString += i18n("Status: %1").arg( (*it)->statusStr() );
optionsString += "\n";
@@ -490,7 +490,7 @@ CalPrintDay::~CalPrintDay()
{
}
-QWidget *CalPrintDay::createConfigWidget( QWidget *w )
+TQWidget *CalPrintDay::createConfigWidget( TQWidget *w )
{
return new CalPrintDayConfig_Base( w );
}
@@ -532,10 +532,10 @@ void CalPrintDay::setSettingsWidget()
void CalPrintDay::loadConfig()
{
if ( mConfig ) {
- QDate dt;
- QTime tm1( dayStart() );
- QDateTime startTm( dt, tm1 );
- QDateTime endTm( dt, tm1.addSecs( 12 * 60 * 60 ) );
+ TQDate dt;
+ TQTime tm1( dayStart() );
+ TQDateTime startTm( dt, tm1 );
+ TQDateTime endTm( dt, tm1.addSecs( 12 * 60 * 60 ) );
mStartTime = mConfig->readDateTimeEntry( "Start time", &startTm ).time();
mEndTime = mConfig->readDateTimeEntry( "End time", &endTm ).time();
mIncludeTodos = mConfig->readBoolEntry( "Include todos", false );
@@ -548,14 +548,14 @@ void CalPrintDay::saveConfig()
{
readSettingsWidget();
if ( mConfig ) {
- mConfig->writeEntry( "Start time", QDateTime( QDate(), mStartTime ) );
- mConfig->writeEntry( "End time", QDateTime( QDate(), mEndTime ) );
+ mConfig->writeEntry( "Start time", TQDateTime( TQDate(), mStartTime ) );
+ mConfig->writeEntry( "End time", TQDateTime( TQDate(), mEndTime ) );
mConfig->writeEntry( "Include todos", mIncludeTodos );
mConfig->writeEntry( "Include all events", mIncludeAllEvents );
}
}
-void CalPrintDay::setDateRange( const QDate& from, const QDate& to )
+void CalPrintDay::setDateRange( const TQDate& from, const TQDate& to )
{
CalPrintPluginBase::setDateRange( from, to );
CalPrintDayConfig_Base *cfg =
@@ -566,45 +566,45 @@ void CalPrintDay::setDateRange( const QDate& from, const QDate& to )
}
}
-void CalPrintDay::print( QPainter &p, int width, int height )
+void CalPrintDay::print( TQPainter &p, int width, int height )
{
- QDate curDay( mFromDate );
+ TQDate curDay( mFromDate );
do {
- QTime curStartTime( mStartTime );
- QTime curEndTime( mEndTime );
+ TQTime curStartTime( mStartTime );
+ TQTime curEndTime( mEndTime );
// For an invalid time range, simply show one hour, starting at the hour
// before the given start time
if ( curEndTime <= curStartTime ) {
- curStartTime = QTime( curStartTime.hour(), 0, 0 );
+ curStartTime = TQTime( curStartTime.hour(), 0, 0 );
curEndTime = curStartTime.addSecs( 3600 );
}
KLocale *local = KGlobal::locale();
- QRect headerBox( 0, 0, width, headerHeight() );
- drawHeader( p, local->formatDate( curDay ), curDay, QDate(), headerBox );
+ TQRect headerBox( 0, 0, width, headerHeight() );
+ drawHeader( p, local->formatDate( curDay ), curDay, TQDate(), headerBox );
Event::List eventList = mCalendar->events( curDay,
EventSortStartDate,
SortDirectionAscending );
- p.setFont( QFont( "sans-serif", 12 ) );
+ p.setFont( TQFont( "sans-serif", 12 ) );
// TODO: Find a good way to determine the height of the all-day box
- QRect allDayBox( TIMELINE_WIDTH + padding(), headerBox.bottom() + padding(),
+ TQRect allDayBox( TIMELINE_WIDTH + padding(), headerBox.bottom() + padding(),
0, height / 20 );
allDayBox.setRight( width );
int allDayHeight = drawAllDayBox( p, eventList, curDay, true, allDayBox );
- QRect dayBox( allDayBox );
+ TQRect dayBox( allDayBox );
dayBox.setTop( allDayHeight /*allDayBox.bottom()*/ );
dayBox.setBottom( height );
drawAgendaDayBox( p, eventList, curDay, mIncludeAllEvents,
curStartTime, curEndTime, dayBox );
- QRect tlBox( dayBox );
+ TQRect tlBox( dayBox );
tlBox.setLeft( 0 );
tlBox.setWidth( TIMELINE_WIDTH );
drawTimeLine( p, curStartTime, curEndTime, tlBox );
@@ -627,7 +627,7 @@ CalPrintWeek::~CalPrintWeek()
{
}
-QWidget *CalPrintWeek::createConfigWidget( QWidget *w )
+TQWidget *CalPrintWeek::createConfigWidget( TQWidget *w )
{
return new CalPrintWeekConfig_Base( w );
}
@@ -672,10 +672,10 @@ void CalPrintWeek::setSettingsWidget()
void CalPrintWeek::loadConfig()
{
if ( mConfig ) {
- QDate dt;
- QTime tm1( dayStart() );
- QDateTime startTm( dt, tm1 );
- QDateTime endTm( dt, tm1.addSecs( 43200 ) );
+ TQDate dt;
+ TQTime tm1( dayStart() );
+ TQDateTime startTm( dt, tm1 );
+ TQDateTime endTm( dt, tm1.addSecs( 43200 ) );
mStartTime = mConfig->readDateTimeEntry( "Start time", &startTm ).time();
mEndTime = mConfig->readDateTimeEntry( "End time", &endTm ).time();
mIncludeTodos = mConfig->readBoolEntry( "Include todos", false );
@@ -688,8 +688,8 @@ void CalPrintWeek::saveConfig()
{
readSettingsWidget();
if ( mConfig ) {
- mConfig->writeEntry( "Start time", QDateTime( QDate(), mStartTime ) );
- mConfig->writeEntry( "End time", QDateTime( QDate(), mEndTime ) );
+ mConfig->writeEntry( "Start time", TQDateTime( TQDate(), mStartTime ) );
+ mConfig->writeEntry( "End time", TQDateTime( TQDate(), mEndTime ) );
mConfig->writeEntry( "Include todos", mIncludeTodos );
mConfig->writeEntry( "Print type", int( mWeekPrintType ) );
}
@@ -702,7 +702,7 @@ KPrinter::Orientation CalPrintWeek::defaultOrientation()
else return KPrinter::Landscape;
}
-void CalPrintWeek::setDateRange( const QDate &from, const QDate &to )
+void CalPrintWeek::setDateRange( const TQDate &from, const TQDate &to )
{
CalPrintPluginBase::setDateRange( from, to );
CalPrintWeekConfig_Base *cfg =
@@ -713,9 +713,9 @@ void CalPrintWeek::setDateRange( const QDate &from, const QDate &to )
}
}
-void CalPrintWeek::print( QPainter &p, int width, int height )
+void CalPrintWeek::print( TQPainter &p, int width, int height )
{
- QDate curWeek, fromWeek, toWeek;
+ TQDate curWeek, fromWeek, toWeek;
// correct begin and end to first and last day of week
int weekdayCol = weekdayColumn( mFromDate.dayOfWeek() );
@@ -726,9 +726,9 @@ void CalPrintWeek::print( QPainter &p, int width, int height )
curWeek = fromWeek.addDays( 6 );
KLocale *local = KGlobal::locale();
- QString line1, line2, title;
- QRect headerBox( 0, 0, width, headerHeight() );
- QRect weekBox( headerBox );
+ TQString line1, line2, title;
+ TQRect headerBox( 0, 0, width, headerHeight() );
+ TQRect weekBox( headerBox );
weekBox.setTop( headerBox.bottom() + padding() );
weekBox.setBottom( height );
@@ -743,7 +743,7 @@ void CalPrintWeek::print( QPainter &p, int width, int height )
title = i18n("date from-\nto", "%1 -\n%2");;
}
title = title.arg( line1 ).arg( line2 );
- drawHeader( p, title, curWeek.addDays( -6 ), QDate(), headerBox );
+ drawHeader( p, title, curWeek.addDays( -6 ), TQDate(), headerBox );
drawWeek( p, curWeek, weekBox );
curWeek = curWeek.addDays( 7 );
if ( curWeek <= toWeek )
@@ -762,8 +762,8 @@ void CalPrintWeek::print( QPainter &p, int width, int height )
title = i18n("date from -\nto (week number)", "%1 -\n%2 (Week %3)");
}
title = title.arg( line1 ).arg( line2 ).arg( curWeek.weekNumber() );
- drawHeader( p, title, curWeek, QDate(), headerBox );
- QRect weekBox( headerBox );
+ drawHeader( p, title, curWeek, TQDate(), headerBox );
+ TQRect weekBox( headerBox );
weekBox.setTop( headerBox.bottom() + padding() );
weekBox.setBottom( height );
@@ -776,19 +776,19 @@ void CalPrintWeek::print( QPainter &p, int width, int height )
break;
case SplitWeek: {
- QRect weekBox1( weekBox );
+ TQRect weekBox1( weekBox );
// On the left side there are four days (mo-th) plus the timeline,
// on the right there are only three days (fr-su) plus the timeline. Don't
// use the whole width, but rather give them the same width as on the left.
weekBox1.setRight( int( ( width - TIMELINE_WIDTH ) * 3. / 4. + TIMELINE_WIDTH ) );
do {
- QDate endLeft( fromWeek.addDays( 3 ) );
+ TQDate endLeft( fromWeek.addDays( 3 ) );
int hh = headerHeight();
drawTimeTable( p, fromWeek, endLeft,
mStartTime, mEndTime, weekBox );
mPrinter->newPage();
- drawSplitHeaderRight( p, fromWeek, curWeek, QDate(), width, hh );
+ drawSplitHeaderRight( p, fromWeek, curWeek, TQDate(), width, hh );
drawTimeTable( p, endLeft.addDays( 1 ), curWeek,
mStartTime, mEndTime, weekBox1 );
@@ -817,7 +817,7 @@ CalPrintMonth::~CalPrintMonth()
{
}
-QWidget *CalPrintMonth::createConfigWidget( QWidget *w )
+TQWidget *CalPrintMonth::createConfigWidget( TQWidget *w )
{
return new CalPrintMonthConfig_Base( w );
}
@@ -827,8 +827,8 @@ void CalPrintMonth::readSettingsWidget()
CalPrintMonthConfig_Base *cfg =
dynamic_cast<CalPrintMonthConfig_Base *>( mConfigWidget );
if ( cfg ) {
- mFromDate = QDate( cfg->mFromYear->value(), cfg->mFromMonth->currentItem()+1, 1 );
- mToDate = QDate( cfg->mToYear->value(), cfg->mToMonth->currentItem()+1, 1 );
+ mFromDate = TQDate( cfg->mFromYear->value(), cfg->mFromMonth->currentItem()+1, 1 );
+ mToDate = TQDate( cfg->mToYear->value(), cfg->mToMonth->currentItem()+1, 1 );
mWeekNumbers = cfg->mWeekNumbers->isChecked();
mRecurDaily = cfg->mRecurDaily->isChecked();
@@ -874,7 +874,7 @@ void CalPrintMonth::saveConfig()
}
}
-void CalPrintMonth::setDateRange( const QDate &from, const QDate &to )
+void CalPrintMonth::setDateRange( const TQDate &from, const TQDate &to )
{
CalPrintPluginBase::setDateRange( from, to );
CalPrintMonthConfig_Base *cfg =
@@ -898,9 +898,9 @@ void CalPrintMonth::setDateRange( const QDate &from, const QDate &to )
}
}
-void CalPrintMonth::print( QPainter &p, int width, int height )
+void CalPrintMonth::print( TQPainter &p, int width, int height )
{
- QDate curMonth, fromMonth, toMonth;
+ TQDate curMonth, fromMonth, toMonth;
fromMonth = mFromDate.addDays( -( mFromDate.day() - 1 ) );
toMonth = mToDate.addDays( mToDate.daysInMonth() - mToDate.day() );
@@ -909,15 +909,15 @@ void CalPrintMonth::print( QPainter &p, int width, int height )
const KCalendarSystem *calSys = calendarSystem();
if ( !calSys ) return;
- QRect headerBox( 0, 0, width, headerHeight() );
- QRect monthBox( 0, 0, width, height );
+ TQRect headerBox( 0, 0, width, headerHeight() );
+ TQRect monthBox( 0, 0, width, height );
monthBox.setTop( headerBox.bottom() + padding() );
do {
- QString title( i18n("monthname year", "%1 %2") );
+ TQString title( i18n("monthname year", "%1 %2") );
title = title.arg( calSys->monthName( curMonth ) )
.arg( curMonth.year() );
- QDate tmp( fromMonth );
+ TQDate tmp( fromMonth );
int weekdayCol = weekdayColumn( tmp.dayOfWeek() );
tmp = tmp.addDays( -weekdayCol );
@@ -947,7 +947,7 @@ CalPrintTodos::~CalPrintTodos()
{
}
-QWidget *CalPrintTodos::createConfigWidget( QWidget *w )
+TQWidget *CalPrintTodos::createConfigWidget( TQWidget *w )
{
return new CalPrintTodoConfig_Base( w );
}
@@ -1051,7 +1051,7 @@ void CalPrintTodos::saveConfig()
}
}
-void CalPrintTodos::print( QPainter &p, int width, int height )
+void CalPrintTodos::print( TQPainter &p, int width, int height )
{
// TODO: Find a good way to guarantee a nicely designed output
int pospriority = 10;
@@ -1062,15 +1062,15 @@ void CalPrintTodos::print( QPainter &p, int width, int height )
int fontHeight = 10;
// Draw the First Page Header
- drawHeader( p, mPageTitle, mFromDate, QDate(),
- QRect( 0, 0, width, headerHeight() ) );
+ drawHeader( p, mPageTitle, mFromDate, TQDate(),
+ TQRect( 0, 0, width, headerHeight() ) );
// Draw the Column Headers
int mCurrentLinePos = headerHeight() + 5;
- QString outStr;
- QFont oldFont( p.font() );
+ TQString outStr;
+ TQFont oldFont( p.font() );
- p.setFont( QFont( "sans-serif", 10, QFont::Bold ) );
+ p.setFont( TQFont( "sans-serif", 10, TQFont::Bold ) );
lineSpacing = p.fontMetrics().lineSpacing();
mCurrentLinePos += lineSpacing;
if ( mIncludePriority ) {
@@ -1103,7 +1103,7 @@ void CalPrintTodos::print( QPainter &p, int width, int height )
posdue = -1;
}
- p.setFont( QFont( "sans-serif", 10 ) );
+ p.setFont( TQFont( "sans-serif", 10 ) );
fontHeight = p.fontMetrics().height();
Todo::List todoList;
diff --git a/korganizer/printing/calprintdefaultplugins.h b/korganizer/printing/calprintdefaultplugins.h
index 463312ff2..79a909a87 100644
--- a/korganizer/printing/calprintdefaultplugins.h
+++ b/korganizer/printing/calprintdefaultplugins.h
@@ -42,8 +42,8 @@ class CalPrintIncidence : public CalPrintPluginBase
public:
CalPrintIncidence();
virtual ~CalPrintIncidence();
- virtual QString description() { return i18n("Print &incidence"); }
- virtual QString info() { return i18n("Prints an incidence on one page"); }
+ virtual TQString description() { return i18n("Print &incidence"); }
+ virtual TQString info() { return i18n("Prints an incidence on one page"); }
virtual int sortID() { return CalPrinterBase::Incidence; }
// Enable the Print Incidence option only if there are selected incidences.
virtual bool enabled()
@@ -54,19 +54,19 @@ class CalPrintIncidence : public CalPrintPluginBase
return false;
}
}
- virtual QWidget *createConfigWidget(QWidget*);
+ virtual TQWidget *createConfigWidget(TQWidget*);
virtual KPrinter::Orientation defaultOrientation()
{ return KPrinter::Portrait; }
public:
- void print( QPainter &p, int width, int height );
+ void print( TQPainter &p, int width, int height );
virtual void readSettingsWidget();
virtual void setSettingsWidget();
virtual void loadConfig();
virtual void saveConfig();
protected:
- int printCaptionAndText( QPainter &p, const QRect &box, const QString &caption,
- const QString &text, QFont captionFont, QFont textFont );
+ int printCaptionAndText( TQPainter &p, const TQRect &box, const TQString &caption,
+ const TQString &text, TQFont captionFont, TQFont textFont );
protected:
@@ -82,22 +82,22 @@ class CalPrintDay : public CalPrintPluginBase
public:
CalPrintDay();
virtual ~CalPrintDay();
- virtual QString description() { return i18n("Print da&y"); }
- virtual QString info() { return i18n("Prints all events of a single day on one page"); }
+ virtual TQString description() { return i18n("Print da&y"); }
+ virtual TQString info() { return i18n("Prints all events of a single day on one page"); }
virtual int sortID() { return CalPrinterBase::Day; }
virtual bool enabled() { return true; }
- virtual QWidget *createConfigWidget( QWidget* );
+ virtual TQWidget *createConfigWidget( TQWidget* );
public:
- void print(QPainter &p, int width, int height);
+ void print(TQPainter &p, int width, int height);
virtual void readSettingsWidget();
virtual void setSettingsWidget();
virtual void loadConfig();
virtual void saveConfig();
- virtual void setDateRange( const QDate& from, const QDate& to );
+ virtual void setDateRange( const TQDate& from, const TQDate& to );
protected:
- QTime mStartTime, mEndTime;
+ TQTime mStartTime, mEndTime;
bool mIncludeTodos;
bool mIncludeAllEvents;
};
@@ -107,27 +107,27 @@ class CalPrintWeek : public CalPrintPluginBase
public:
CalPrintWeek();
virtual ~CalPrintWeek();
- virtual QString description() { return i18n("Print &week"); }
- virtual QString info() { return i18n("Prints all events of one week on one page"); }
+ virtual TQString description() { return i18n("Print &week"); }
+ virtual TQString info() { return i18n("Prints all events of one week on one page"); }
virtual int sortID() { return CalPrinterBase::Week; }
virtual bool enabled() { return true; }
- virtual QWidget *createConfigWidget(QWidget*);
+ virtual TQWidget *createConfigWidget(TQWidget*);
/**
Returns the default orientation for the eWeekPrintType.
*/
virtual KPrinter::Orientation defaultOrientation();
public:
- void print(QPainter &p, int width, int height);
+ void print(TQPainter &p, int width, int height);
virtual void readSettingsWidget();
virtual void setSettingsWidget();
virtual void loadConfig();
virtual void saveConfig();
- virtual void setDateRange( const QDate& from, const QDate& to );
+ virtual void setDateRange( const TQDate& from, const TQDate& to );
protected:
enum eWeekPrintType { Filofax=0, Timetable, SplitWeek } mWeekPrintType;
- QTime mStartTime, mEndTime;
+ TQTime mStartTime, mEndTime;
bool mIncludeTodos;
};
@@ -136,20 +136,20 @@ class CalPrintMonth : public CalPrintPluginBase
public:
CalPrintMonth();
virtual ~CalPrintMonth();
- virtual QString description() { return i18n("Print mont&h"); }
- virtual QString info() { return i18n("Prints all events of one month on one page"); }
+ virtual TQString description() { return i18n("Print mont&h"); }
+ virtual TQString info() { return i18n("Prints all events of one month on one page"); }
virtual int sortID() { return CalPrinterBase::Month; }
virtual bool enabled() { return true; }
- virtual QWidget *createConfigWidget(QWidget*);
+ virtual TQWidget *createConfigWidget(TQWidget*);
virtual KPrinter::Orientation defaultOrientation() { return KPrinter::Landscape; }
public:
- void print(QPainter &p, int width, int height);
+ void print(TQPainter &p, int width, int height);
virtual void readSettingsWidget();
virtual void setSettingsWidget();
virtual void loadConfig();
virtual void saveConfig();
- virtual void setDateRange( const QDate& from, const QDate& to );
+ virtual void setDateRange( const TQDate& from, const TQDate& to );
protected:
bool mWeekNumbers;
@@ -163,21 +163,21 @@ class CalPrintTodos : public CalPrintPluginBase
public:
CalPrintTodos();
virtual ~CalPrintTodos();
- virtual QString description() { return i18n("Print to-&dos"); }
- virtual QString info() { return i18n("Prints all to-dos in a (tree-like) list"); }
+ virtual TQString description() { return i18n("Print to-&dos"); }
+ virtual TQString info() { return i18n("Prints all to-dos in a (tree-like) list"); }
virtual int sortID() { return CalPrinterBase::Todolist; }
virtual bool enabled() { return true; }
- virtual QWidget *createConfigWidget(QWidget*);
+ virtual TQWidget *createConfigWidget(TQWidget*);
public:
- void print( QPainter &p, int width, int height );
+ void print( TQPainter &p, int width, int height );
virtual void readSettingsWidget();
virtual void setSettingsWidget();
virtual void loadConfig();
virtual void saveConfig();
protected:
- QString mPageTitle;
+ TQString mPageTitle;
enum eTodoPrintType {
TodosAll = 0, TodosUnfinished, TodosDueRange
diff --git a/korganizer/printing/calprinter.cpp b/korganizer/printing/calprinter.cpp
index 066c9c296..0ab61fdac 100644
--- a/korganizer/printing/calprinter.cpp
+++ b/korganizer/printing/calprinter.cpp
@@ -23,15 +23,15 @@
without including the source code for Qt in the source distribution.
*/
-#include <qvbuttongroup.h>
-#include <qwidgetstack.h>
-#include <qradiobutton.h>
-#include <qlayout.h>
-#include <qpushbutton.h>
-#include <qcombobox.h>
-#include <qlabel.h>
-#include <qvbox.h>
-#include <qsplitter.h>
+#include <tqvbuttongroup.h>
+#include <tqwidgetstack.h>
+#include <tqradiobutton.h>
+#include <tqlayout.h>
+#include <tqpushbutton.h>
+#include <tqcombobox.h>
+#include <tqlabel.h>
+#include <tqvbox.h>
+#include <tqsplitter.h>
#include <kprinter.h>
#include <ksimpleconfig.h>
@@ -46,8 +46,8 @@
#include "calprintdefaultplugins.h"
-CalPrinter::CalPrinter( QWidget *parent, Calendar *calendar, KOrg::CoreHelper *helper )
- : QObject( parent, "CalPrinter" )
+CalPrinter::CalPrinter( TQWidget *parent, Calendar *calendar, KOrg::CoreHelper *helper )
+ : TQObject( parent, "CalPrinter" )
{
mParent = parent;
mConfig = new KSimpleConfig( "korganizer_printing.rc" );
@@ -90,7 +90,7 @@ void CalPrinter::init( Calendar *calendar )
}
}
-void CalPrinter::setDateRange( const QDate &fd, const QDate &td )
+void CalPrinter::setDateRange( const TQDate &fd, const TQDate &td )
{
KOrg::PrintPlugin::List::Iterator it = mPrintPlugins.begin();
for ( ; it != mPrintPlugins.end(); ++it ) {
@@ -98,7 +98,7 @@ void CalPrinter::setDateRange( const QDate &fd, const QDate &td )
}
}
-void CalPrinter::print( int type, const QDate &fd, const QDate &td,
+void CalPrinter::print( int type, const TQDate &fd, const TQDate &td,
Incidence::List selectedIncidences, bool preview )
{
KOrg::PrintPlugin::List::Iterator it = mPrintPlugins.begin();
@@ -111,7 +111,7 @@ void CalPrinter::print( int type, const QDate &fd, const QDate &td,
printDialog.setPrintType( type );
setDateRange( fd, td );
- if ( printDialog.exec() == QDialog::Accepted ) {
+ if ( printDialog.exec() == TQDialog::Accepted ) {
mConfig->writeEntry( "Orientation", printDialog.orientation() );
// Save all changes in the dialog
@@ -168,33 +168,33 @@ void CalPrinter::updateConfig()
/****************************************************************************/
CalPrintDialog::CalPrintDialog( KOrg::PrintPlugin::List plugins,
- QWidget *parent, const char *name )
+ TQWidget *parent, const char *name )
: KDialogBase( parent, name, /*modal*/true, i18n("Print"), Ok | Cancel )
{
- QVBox *page = makeVBoxMainWidget();
+ TQVBox *page = makeVBoxMainWidget();
- QSplitter *splitter = new QSplitter( page );
- splitter->setOrientation( QSplitter::Horizontal );
+ TQSplitter *splitter = new TQSplitter( page );
+ splitter->setOrientation( TQSplitter::Horizontal );
- mTypeGroup = new QVButtonGroup( i18n("Print Style"), splitter, "buttonGroup" );
+ mTypeGroup = new TQVButtonGroup( i18n("Print Style"), splitter, "buttonGroup" );
// use the minimal width possible = max width of the radio buttons, not extensible
-/* mTypeGroup->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)4,
- (QSizePolicy::SizeType)5, 0, 0,
+/* mTypeGroup->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)4,
+ (TQSizePolicy::SizeType)5, 0, 0,
mTypeGroup->sizePolicy().hasHeightForWidth() ) );*/
- QWidget *splitterRight = new QWidget( splitter, "splitterRight" );
- QGridLayout *splitterRightLayout = new QGridLayout( splitterRight );
+ TQWidget *splitterRight = new TQWidget( splitter, "splitterRight" );
+ TQGridLayout *splitterRightLayout = new TQGridLayout( splitterRight );
splitterRightLayout->setMargin( marginHint() );
splitterRightLayout->setSpacing( spacingHint() );
- mConfigArea = new QWidgetStack( splitterRight, "configWidgetStack" );
+ mConfigArea = new TQWidgetStack( splitterRight, "configWidgetStack" );
splitterRightLayout->addMultiCellWidget( mConfigArea, 0,0, 0,1 );
- QLabel *orientationLabel = new QLabel( i18n("Page &orientation:"),
+ TQLabel *orientationLabel = new TQLabel( i18n("Page &orientation:"),
splitterRight, "orientationLabel" );
splitterRightLayout->addWidget( orientationLabel, 1, 0 );
- mOrientationSelection = new QComboBox( splitterRight, "orientationCombo" );
+ mOrientationSelection = new TQComboBox( splitterRight, "orientationCombo" );
mOrientationSelection->insertItem( i18n("Use Default Orientation of Selected Style") );
mOrientationSelection->insertItem( i18n("Use Printer Default") );
mOrientationSelection->insertItem( i18n("Portrait") );
@@ -202,7 +202,7 @@ CalPrintDialog::CalPrintDialog( KOrg::PrintPlugin::List plugins,
splitterRightLayout->addWidget( mOrientationSelection, 1, 1 );
// signals and slots connections
- connect( mTypeGroup, SIGNAL( clicked( int ) ), SLOT( setPrintType( int ) ) );
+ connect( mTypeGroup, TQT_SIGNAL( clicked( int ) ), TQT_SLOT( setPrintType( int ) ) );
orientationLabel->setBuddy( mOrientationSelection );
// First insert the config widgets into the widget stack. This possibly assigns
@@ -214,10 +214,10 @@ CalPrintDialog::CalPrintDialog( KOrg::PrintPlugin::List plugins,
mPluginIDs[newid] = (*it);
}
// Insert all plugins with in sorted order; plugins with clashing IDs will be first...
- QMap<int, KOrg::PrintPlugin*>::ConstIterator mapit;
+ TQMap<int, KOrg::PrintPlugin*>::ConstIterator mapit;
for ( mapit = mPluginIDs.begin(); mapit != mPluginIDs.end(); ++mapit ) {
KOrg::PrintPlugin *p = mapit.data();
- QRadioButton *radioButton = new QRadioButton( p->description(), mTypeGroup );
+ TQRadioButton *radioButton = new TQRadioButton( p->description(), mTypeGroup );
radioButton->setEnabled( p->enabled() );
mTypeGroup->insert( radioButton, mapit.key() );
// radioButton->setMinimumHeight( radioButton->sizeHint().height() - 5 );
@@ -266,7 +266,7 @@ void CalPrintDialog::slotOk()
{
mOrientation = (CalPrinter::ePrintOrientation)mOrientationSelection->currentItem();
- QMap<int, KOrg::PrintPlugin*>::Iterator it = mPluginIDs.begin();
+ TQMap<int, KOrg::PrintPlugin*>::Iterator it = mPluginIDs.begin();
for ( ; it != mPluginIDs.end(); ++it ) {
if ( it.data() )
it.data()->readSettingsWidget();
diff --git a/korganizer/printing/calprinter.h b/korganizer/printing/calprinter.h
index e05073e58..a1cea6a24 100644
--- a/korganizer/printing/calprinter.h
+++ b/korganizer/printing/calprinter.h
@@ -27,7 +27,7 @@
#ifndef KORG_NOPRINTER
-#include <qptrlist.h>
+#include <tqptrlist.h>
#include <kdialogbase.h>
#include <korganizer/baseview.h>
#include <korganizer/printplugin.h>
@@ -50,7 +50,7 @@ class QLabel;
different formats (day, week, month). It also provides a way for setting
up the printer and remembering these preferences.
*/
-class KDE_EXPORT CalPrinter : public QObject, public KOrg::CalPrinterBase
+class KDE_EXPORT CalPrinter : public TQObject, public KOrg::CalPrinterBase
{
Q_OBJECT
@@ -67,7 +67,7 @@ class KDE_EXPORT CalPrinter : public QObject, public KOrg::CalPrinterBase
\param cal calendar to be printed
\param helper is a pointer to the KOrg::CoreHelper object
*/
- CalPrinter( QWidget *par, Calendar *cal, KOrg::CoreHelper *helper );
+ CalPrinter( TQWidget *par, Calendar *cal, KOrg::CoreHelper *helper );
virtual ~CalPrinter();
void init( Calendar *calendar );
@@ -78,7 +78,7 @@ class KDE_EXPORT CalPrinter : public QObject, public KOrg::CalPrinterBase
\param start Start date
\param end End date
*/
- void setDateRange( const QDate &start, const QDate &end );
+ void setDateRange( const TQDate &start, const TQDate &end );
public slots:
void updateConfig();
@@ -87,7 +87,7 @@ class KDE_EXPORT CalPrinter : public QObject, public KOrg::CalPrinterBase
void doPrint( KOrg::PrintPlugin *selectedStyle, CalPrinter::ePrintOrientation dlgorientation, bool preview = false );
public:
- void print( int type, const QDate &fd, const QDate &td,
+ void print( int type, const TQDate &fd, const TQDate &td,
Incidence::List selectedIncidences = Incidence::List(), bool preview = false );
Calendar *calendar() const;
@@ -98,7 +98,7 @@ class KDE_EXPORT CalPrinter : public QObject, public KOrg::CalPrinterBase
private:
Calendar *mCalendar;
- QWidget *mParent;
+ TQWidget *mParent;
KConfig *mConfig;
KOrg::CoreHelper *mCoreHelper;
};
@@ -108,7 +108,7 @@ class CalPrintDialog : public KDialogBase
Q_OBJECT
public:
CalPrintDialog( KOrg::PrintPlugin::List plugins,
- QWidget *parent = 0, const char *name = 0 );
+ TQWidget *parent = 0, const char *name = 0 );
virtual ~CalPrintDialog();
KOrg::PrintPlugin *selectedPlugin();
void setOrientation( CalPrinter::ePrintOrientation orientation );
@@ -122,11 +122,11 @@ class CalPrintDialog : public KDialogBase
void slotOk();
private:
- QVButtonGroup *mTypeGroup;
- QWidgetStack *mConfigArea;
- QMap<int, KOrg::PrintPlugin*> mPluginIDs;
- QString mPreviewText;
- QComboBox *mOrientationSelection;
+ TQVButtonGroup *mTypeGroup;
+ TQWidgetStack *mConfigArea;
+ TQMap<int, KOrg::PrintPlugin*> mPluginIDs;
+ TQString mPreviewText;
+ TQComboBox *mOrientationSelection;
CalPrinter::ePrintOrientation mOrientation;
};
diff --git a/korganizer/printing/calprintpluginbase.cpp b/korganizer/printing/calprintpluginbase.cpp
index 44739db48..6f6762032 100644
--- a/korganizer/printing/calprintpluginbase.cpp
+++ b/korganizer/printing/calprintpluginbase.cpp
@@ -23,10 +23,10 @@
without including the source code for Qt in the source distribution.
*/
-#include <qpainter.h>
-#include <qlayout.h>
-#include <qframe.h>
-#include <qlabel.h>
+#include <tqpainter.h>
+#include <tqlayout.h>
+#include <tqframe.h>
+#include <tqlabel.h>
#include <kdebug.h>
#include <kconfig.h>
@@ -48,10 +48,10 @@ inline int round(const double x)
class CalPrintPluginBase::TodoParentStart
{
public:
- TodoParentStart( QRect pt = QRect(), bool page = true )
+ TodoParentStart( TQRect pt = TQRect(), bool page = true )
: mRect( pt ), mSamePage( page ) {}
- QRect mRect;
+ TQRect mRect;
bool mSamePage;
};
@@ -64,17 +64,17 @@ class CalPrintPluginBase::TodoParentStart
class PrintCellItem : public KOrg::CellItem
{
public:
- PrintCellItem( Event *event, const QDateTime &start, const QDateTime &end )
+ PrintCellItem( Event *event, const TQDateTime &start, const TQDateTime &end )
: mEvent( event ), mStart( start), mEnd( end )
{
}
Event *event() const { return mEvent; }
- QString label() const { return mEvent->summary(); }
+ TQString label() const { return mEvent->summary(); }
- QDateTime start() const { return mStart; }
- QDateTime end() const { return mEnd; }
+ TQDateTime start() const { return mStart; }
+ TQDateTime end() const { return mEnd; }
/** Calculate the start and end date/time of the recurrence that
happens on the given day */
@@ -96,7 +96,7 @@ class PrintCellItem : public KOrg::CellItem
private:
Event *mEvent;
- QDateTime mStart, mEnd;
+ TQDateTime mStart, mEnd;
};
@@ -118,21 +118,21 @@ CalPrintPluginBase::~CalPrintPluginBase()
-QWidget *CalPrintPluginBase::createConfigWidget( QWidget *w )
+TQWidget *CalPrintPluginBase::createConfigWidget( TQWidget *w )
{
- QFrame *wdg = new QFrame( w );
- QVBoxLayout *layout = new QVBoxLayout( wdg );
+ TQFrame *wdg = new TQFrame( w );
+ TQVBoxLayout *layout = new TQVBoxLayout( wdg );
- QLabel *title = new QLabel( description(), wdg );
- QFont titleFont( title->font() );
+ TQLabel *title = new TQLabel( description(), wdg );
+ TQFont titleFont( title->font() );
titleFont.setPointSize( 20 );
titleFont.setBold( true );
title->setFont( titleFont );
layout->addWidget( title );
- layout->addWidget( new QLabel( info(), wdg ) );
+ layout->addWidget( new TQLabel( info(), wdg ) );
layout->addSpacing( 20 );
- layout->addWidget( new QLabel( i18n("This printing style does not "
+ layout->addWidget( new TQLabel( i18n("This printing style does not "
"have any configuration options."),
wdg ) );
layout->addStretch();
@@ -143,7 +143,7 @@ void CalPrintPluginBase::doPrint( KPrinter *printer )
{
if ( !printer ) return;
mPrinter = printer;
- QPainter p;
+ TQPainter p;
mPrinter->setColorMode( mUseColors?(KPrinter::Color):(KPrinter::GrayScale) );
@@ -155,7 +155,7 @@ void CalPrintPluginBase::doPrint( KPrinter *printer )
p.setViewport( margins, margins,
p.viewport().width() - 2*margins,
p.viewport().height() - 2*margins );
-// QRect vp( p.viewport() );
+// TQRect vp( p.viewport() );
// vp.setRight( vp.right()*2 );
// vp.setBottom( vp.bottom()*2 );
// p.setWindow( vp );
@@ -175,7 +175,7 @@ void CalPrintPluginBase::doLoadConfig()
if ( mConfig ) {
KConfigGroupSaver saver( mConfig, description() );
mConfig->sync();
- QDateTime currDate( QDate::currentDate() );
+ TQDateTime currDate( TQDate::currentDate() );
mFromDate = mConfig->readDateTimeEntry( "FromDate", &currDate ).date();
mToDate = mConfig->readDateTimeEntry( "ToDate" ).date();
mUseColors = mConfig->readBoolEntry( "UseColors", true );
@@ -191,8 +191,8 @@ void CalPrintPluginBase::doSaveConfig()
if ( mConfig ) {
KConfigGroupSaver saver( mConfig, description() );
saveConfig();
- mConfig->writeEntry( "FromDate", QDateTime( mFromDate ) );
- mConfig->writeEntry( "ToDate", QDateTime( mToDate ) );
+ mConfig->writeEntry( "FromDate", TQDateTime( mFromDate ) );
+ mConfig->writeEntry( "ToDate", TQDateTime( mToDate ) );
mConfig->writeEntry( "UseColors", mUseColors );
mConfig->sync();
} else {
@@ -226,50 +226,50 @@ KPrinter::Orientation CalPrintPluginBase::orientation() const
-QTime CalPrintPluginBase::dayStart()
+TQTime CalPrintPluginBase::dayStart()
{
- QTime start( 8,0,0 );
+ TQTime start( 8,0,0 );
if ( mCoreHelper ) start = mCoreHelper->dayStart();
return start;
}
-void CalPrintPluginBase::setCategoryColors( QPainter &p, Incidence *incidence )
+void CalPrintPluginBase::setCategoryColors( TQPainter &p, Incidence *incidence )
{
- QColor bgColor = categoryBgColor( incidence );
+ TQColor bgColor = categoryBgColor( incidence );
if ( bgColor.isValid() )
p.setBrush( bgColor );
- QColor tColor( textColor( bgColor ) );
+ TQColor tColor( textColor( bgColor ) );
if ( tColor.isValid() )
p.setPen( tColor );
}
-QColor CalPrintPluginBase::categoryBgColor( Incidence *incidence )
+TQColor CalPrintPluginBase::categoryBgColor( Incidence *incidence )
{
if (mCoreHelper && incidence)
return mCoreHelper->categoryColor( incidence->categories() );
else
- return QColor();
+ return TQColor();
}
-QColor CalPrintPluginBase::textColor( const QColor &color )
+TQColor CalPrintPluginBase::textColor( const TQColor &color )
{
- return (mCoreHelper)?(mCoreHelper->textColor( color )):QColor();
+ return (mCoreHelper)?(mCoreHelper->textColor( color )):TQColor();
}
-bool CalPrintPluginBase::isWorkingDay( const QDate &dt )
+bool CalPrintPluginBase::isWorkingDay( const TQDate &dt )
{
return (mCoreHelper)?( mCoreHelper->isWorkingDay( dt ) ):true;
}
-QString CalPrintPluginBase::holidayString( const QDate &dt )
+TQString CalPrintPluginBase::holidayString( const TQDate &dt )
{
- return (mCoreHelper)?(mCoreHelper->holidayString(dt)):(QString::null);
+ return (mCoreHelper)?(mCoreHelper->holidayString(dt)):(TQString::null);
}
-Event *CalPrintPluginBase::holiday( const QDate &dt )
+Event *CalPrintPluginBase::holiday( const TQDate &dt )
{
- QString hstring( holidayString( dt ) );
+ TQString hstring( holidayString( dt ) );
if ( !hstring.isEmpty() ) {
Event*holiday=new Event();
holiday->setSummary( hstring );
@@ -344,41 +344,41 @@ void CalPrintPluginBase::setBorderWidth( const int borderwidth )
-void CalPrintPluginBase::drawBox( QPainter &p, int linewidth, const QRect &rect )
+void CalPrintPluginBase::drawBox( TQPainter &p, int linewidth, const TQRect &rect )
{
- QPen pen( p.pen() );
- QPen oldpen( pen );
+ TQPen pen( p.pen() );
+ TQPen oldpen( pen );
pen.setWidth( linewidth );
p.setPen( pen );
p.drawRect( rect );
p.setPen( oldpen );
}
-void CalPrintPluginBase::drawShadedBox( QPainter &p, int linewidth, const QBrush &brush, const QRect &rect )
+void CalPrintPluginBase::drawShadedBox( TQPainter &p, int linewidth, const TQBrush &brush, const TQRect &rect )
{
- QBrush oldbrush( p.brush() );
+ TQBrush oldbrush( p.brush() );
p.setBrush( brush );
drawBox( p, linewidth, rect );
p.setBrush( oldbrush );
}
-void CalPrintPluginBase::printEventString( QPainter &p, const QRect &box, const QString &str, int flags )
+void CalPrintPluginBase::printEventString( TQPainter &p, const TQRect &box, const TQString &str, int flags )
{
- QRect newbox( box );
+ TQRect newbox( box );
newbox.addCoords( 3, 1, -1, -1 );
p.drawText( newbox, (flags==-1)?(Qt::AlignTop | Qt::AlignJustify | Qt::BreakAnywhere):flags, str );
}
-void CalPrintPluginBase::showEventBox( QPainter &p, const QRect &box, Incidence *incidence, const QString &str, int flags )
+void CalPrintPluginBase::showEventBox( TQPainter &p, const TQRect &box, Incidence *incidence, const TQString &str, int flags )
{
- QPen oldpen( p.pen() );
- QBrush oldbrush( p.brush() );
- QColor bgColor( categoryBgColor( incidence ) );
+ TQPen oldpen( p.pen() );
+ TQBrush oldbrush( p.brush() );
+ TQColor bgColor( categoryBgColor( incidence ) );
if ( mUseColors & bgColor.isValid() ) {
p.setBrush( bgColor );
} else {
- p.setBrush( QColor( 232, 232, 232 ) );
+ p.setBrush( TQColor( 232, 232, 232 ) );
}
drawBox( p, EVENT_BORDER_WIDTH, box );
@@ -391,21 +391,21 @@ void CalPrintPluginBase::showEventBox( QPainter &p, const QRect &box, Incidence
}
-void CalPrintPluginBase::drawSubHeaderBox(QPainter &p, const QString &str,
- const QRect &box )
+void CalPrintPluginBase::drawSubHeaderBox(TQPainter &p, const TQString &str,
+ const TQRect &box )
{
- drawShadedBox( p, BOX_BORDER_WIDTH, QColor( 232, 232, 232 ), box );
- QFont oldfont( p.font() );
- p.setFont( QFont( "sans-serif", 10, QFont::Bold ) );
+ drawShadedBox( p, BOX_BORDER_WIDTH, TQColor( 232, 232, 232 ), box );
+ TQFont oldfont( p.font() );
+ p.setFont( TQFont( "sans-serif", 10, TQFont::Bold ) );
p.drawText( box, Qt::AlignCenter | Qt::AlignVCenter, str );
p.setFont( oldfont );
}
-void CalPrintPluginBase::drawVerticalBox( QPainter &p, const QRect &box, const QString &str )
+void CalPrintPluginBase::drawVerticalBox( TQPainter &p, const TQRect &box, const TQString &str )
{
p.save();
p.rotate( -90 );
- QRect rotatedBox( -box.top()-box.height(), box.left(), box.height(), box.width() );
+ TQRect rotatedBox( -box.top()-box.height(), box.left(), box.height(), box.width() );
showEventBox( p, rotatedBox, 0, str, Qt::AlignLeft | Qt::AlignVCenter | Qt::SingleLine );
p.restore();
@@ -417,20 +417,20 @@ void CalPrintPluginBase::drawVerticalBox( QPainter &p, const QRect &box, const Q
// Return value: If expand, bottom of the printed box, otherwise vertical end
// of the printed contents inside the box.
-int CalPrintPluginBase::drawBoxWithCaption( QPainter &p, const QRect &allbox,
- const QString &caption, const QString &contents, bool sameLine, bool expand, const QFont &captionFont, const QFont &textFont )
+int CalPrintPluginBase::drawBoxWithCaption( TQPainter &p, const TQRect &allbox,
+ const TQString &caption, const TQString &contents, bool sameLine, bool expand, const TQFont &captionFont, const TQFont &textFont )
{
- QFont oldFont( p.font() );
-// QFont captionFont( "sans-serif", 11, QFont::Bold );
-// QFont textFont( "sans-serif", 11, QFont::Normal );
-// QFont captionFont( "Tahoma", 11, QFont::Bold );
-// QFont textFont( "Tahoma", 11, QFont::Normal );
+ TQFont oldFont( p.font() );
+// TQFont captionFont( "sans-serif", 11, TQFont::Bold );
+// TQFont textFont( "sans-serif", 11, TQFont::Normal );
+// TQFont captionFont( "Tahoma", 11, TQFont::Bold );
+// TQFont textFont( "Tahoma", 11, TQFont::Normal );
- QRect box( allbox );
+ TQRect box( allbox );
// Bounding rectangle for caption, single-line, clip on the right
- QRect captionBox( box.left() + padding(), box.top() + padding(), 0, 0 );
+ TQRect captionBox( box.left() + padding(), box.top() + padding(), 0, 0 );
p.setFont( captionFont );
captionBox = p.boundingRect( captionBox, Qt::AlignLeft | Qt::AlignTop | Qt::SingleLine, caption );
p.setFont( oldFont );
@@ -440,7 +440,7 @@ int CalPrintPluginBase::drawBoxWithCaption( QPainter &p, const QRect &allbox,
box.setBottom( captionBox.bottom() + padding() );
// Bounding rectangle for the contents (if any), word break, clip on the bottom
- QRect textBox( captionBox );
+ TQRect textBox( captionBox );
if ( !contents.isEmpty() ) {
if ( sameLine ) {
textBox.setLeft( captionBox.right() + padding() );
@@ -480,8 +480,8 @@ int CalPrintPluginBase::drawBoxWithCaption( QPainter &p, const QRect &allbox,
///////////////////////////////////////////////////////////////////////////////
-int CalPrintPluginBase::drawHeader( QPainter &p, QString title,
- const QDate &month1, const QDate &month2, const QRect &allbox, bool expand )
+int CalPrintPluginBase::drawHeader( TQPainter &p, TQString title,
+ const TQDate &month1, const TQDate &month2, const TQRect &allbox, bool expand )
{
// print previous month for month view, print current for to-do, day and week
int smallMonthWidth = (allbox.width()/4) - 10;
@@ -490,17 +490,17 @@ int CalPrintPluginBase::drawHeader( QPainter &p, QString title,
int right = allbox.right();
if ( month1.isValid() ) right -= (20+smallMonthWidth);
if ( month2.isValid() ) right -= (20+smallMonthWidth);
- QRect box( allbox );
- QRect textRect( allbox );
+ TQRect box( allbox );
+ TQRect textRect( allbox );
textRect.addCoords( 5, 0, 0, 0 );
textRect.setRight( right );
- QFont oldFont( p.font() );
- QFont newFont("sans-serif", (textRect.height()<60)?16:18, QFont::Bold);
+ TQFont oldFont( p.font() );
+ TQFont newFont("sans-serif", (textRect.height()<60)?16:18, TQFont::Bold);
if ( expand ) {
p.setFont( newFont );
- QRect boundingR = p.boundingRect( textRect, Qt::AlignLeft | Qt::AlignVCenter | Qt::WordBreak, title );
+ TQRect boundingR = p.boundingRect( textRect, Qt::AlignLeft | Qt::AlignVCenter | Qt::WordBreak, title );
p.setFont( oldFont );
int h = boundingR.height();
if ( h > allbox.height() ) {
@@ -509,15 +509,15 @@ int CalPrintPluginBase::drawHeader( QPainter &p, QString title,
}
}
- drawShadedBox( p, BOX_BORDER_WIDTH, QColor( 232, 232, 232 ), box );
+ drawShadedBox( p, BOX_BORDER_WIDTH, TQColor( 232, 232, 232 ), box );
- QRect monthbox( box.right()-10-smallMonthWidth, box.top(), smallMonthWidth, box.height() );
+ TQRect monthbox( box.right()-10-smallMonthWidth, box.top(), smallMonthWidth, box.height() );
if (month2.isValid()) {
- drawSmallMonth( p, QDate(month2.year(), month2.month(), 1), monthbox );
+ drawSmallMonth( p, TQDate(month2.year(), month2.month(), 1), monthbox );
monthbox.moveBy( -20 - smallMonthWidth, 0 );
}
if (month1.isValid()) {
- drawSmallMonth( p, QDate(month1.year(), month1.month(), 1), monthbox );
+ drawSmallMonth( p, TQDate(month1.year(), month1.month(), 1), monthbox );
monthbox.moveBy( -20 - smallMonthWidth, 0 );
}
@@ -530,38 +530,38 @@ int CalPrintPluginBase::drawHeader( QPainter &p, QString title,
}
-void CalPrintPluginBase::drawSmallMonth(QPainter &p, const QDate &qd,
- const QRect &box )
+void CalPrintPluginBase::drawSmallMonth(TQPainter &p, const TQDate &qd,
+ const TQRect &box )
{
int weekdayCol = weekdayColumn( qd.dayOfWeek() );
int month = qd.month();
- QDate monthDate(QDate(qd.year(), qd.month(), 1));
+ TQDate monthDate(TQDate(qd.year(), qd.month(), 1));
// correct begin of week
- QDate monthDate2( monthDate.addDays( -weekdayCol ) );
+ TQDate monthDate2( monthDate.addDays( -weekdayCol ) );
double cellWidth = double(box.width())/double(7);
int rownr = 3 + ( qd.daysInMonth() + weekdayCol - 1 ) / 7;
// 3 Pixel after month name, 2 after day names, 1 after the calendar
double cellHeight = (box.height() - 5) / rownr;
- QFont oldFont( p.font() );
- p.setFont(QFont("sans-serif", int(cellHeight-1), QFont::Normal));
+ TQFont oldFont( p.font() );
+ p.setFont(TQFont("sans-serif", int(cellHeight-1), TQFont::Normal));
// draw the title
if ( mCalSys ) {
- QRect titleBox( box );
+ TQRect titleBox( box );
titleBox.setHeight( int(cellHeight+1) );
p.drawText( titleBox, Qt::AlignTop | Qt::AlignHCenter, mCalSys->monthName( qd ) );
}
// draw days of week
- QRect wdayBox( box );
+ TQRect wdayBox( box );
wdayBox.setTop( int( box.top() + 3 + cellHeight ) );
wdayBox.setHeight( int(2*cellHeight)-int(cellHeight) );
if ( mCalSys ) {
for (int col = 0; col < 7; ++col) {
- QString tmpStr = mCalSys->weekDayName( monthDate2 )[0].upper();
+ TQString tmpStr = mCalSys->weekDayName( monthDate2 )[0].upper();
wdayBox.setLeft( int(box.left() + col*cellWidth) );
wdayBox.setRight( int(box.left() + (col+1)*cellWidth) );
p.drawText( wdayBox, Qt::AlignCenter, tmpStr );
@@ -577,10 +577,10 @@ void CalPrintPluginBase::drawSmallMonth(QPainter &p, const QDate &qd,
for ( int row = 0; row < (rownr-2); row++ ) {
for ( int col = 0; col < 7; col++ ) {
if ( monthDate.month() == month ) {
- QRect dayRect( int( box.left() + col*cellWidth ), int( calStartY + row*cellHeight ), 0, 0 );
+ TQRect dayRect( int( box.left() + col*cellWidth ), int( calStartY + row*cellHeight ), 0, 0 );
dayRect.setRight( int( box.left() + (col+1)*cellWidth ) );
dayRect.setBottom( int( calStartY + (row+1)*cellHeight ) );
- p.drawText( dayRect, Qt::AlignCenter, QString::number( monthDate.day() ) );
+ p.drawText( dayRect, Qt::AlignCenter, TQString::number( monthDate.day() ) );
}
monthDate = monthDate.addDays(1);
}
@@ -598,12 +598,12 @@ void CalPrintPluginBase::drawSmallMonth(QPainter &p, const QDate &qd,
* This routine draws a header box over the main part of the calendar
* containing the days of the week.
*/
-void CalPrintPluginBase::drawDaysOfWeek(QPainter &p,
- const QDate &fromDate, const QDate &toDate, const QRect &box )
+void CalPrintPluginBase::drawDaysOfWeek(TQPainter &p,
+ const TQDate &fromDate, const TQDate &toDate, const TQRect &box )
{
double cellWidth = double(box.width()) / double(fromDate.daysTo( toDate )+1);
- QDate cellDate( fromDate );
- QRect dateBox( box );
+ TQDate cellDate( fromDate );
+ TQRect dateBox( box );
int i = 0;
while ( cellDate <= toDate ) {
@@ -616,16 +616,16 @@ void CalPrintPluginBase::drawDaysOfWeek(QPainter &p,
}
-void CalPrintPluginBase::drawDaysOfWeekBox(QPainter &p, const QDate &qd,
- const QRect &box )
+void CalPrintPluginBase::drawDaysOfWeekBox(TQPainter &p, const TQDate &qd,
+ const TQRect &box )
{
- drawSubHeaderBox( p, (mCalSys)?(mCalSys->weekDayName( qd )):(QString::null), box );
+ drawSubHeaderBox( p, (mCalSys)?(mCalSys->weekDayName( qd )):(TQString::null), box );
}
-void CalPrintPluginBase::drawTimeLine(QPainter &p,
- const QTime &fromTime, const QTime &toTime,
- const QRect &box)
+void CalPrintPluginBase::drawTimeLine(TQPainter &p,
+ const TQTime &fromTime, const TQTime &toTime,
+ const TQRect &box)
{
drawBox( p, BOX_BORDER_WIDTH, box );
@@ -636,46 +636,46 @@ void CalPrintPluginBase::drawTimeLine(QPainter &p,
// TODO: Don't use half of the width, but less, for the minutes!
int xcenter = box.left()+box.width()/2;
- QTime curTime( fromTime );
- QTime endTime( toTime );
+ TQTime curTime( fromTime );
+ TQTime endTime( toTime );
if ( fromTime.minute() > 30 )
- curTime = QTime( fromTime.hour()+1, 0, 0 );
+ curTime = TQTime( fromTime.hour()+1, 0, 0 );
else if ( fromTime.minute() > 0 ) {
- curTime = QTime( fromTime.hour(), 30, 0 );
+ curTime = TQTime( fromTime.hour(), 30, 0 );
float yy = currY + minlen*(float)fromTime.secsTo( curTime )/60.;
p.drawLine( xcenter, (int)yy, box.right(), (int)yy );
- curTime = QTime( fromTime.hour()+1, 0, 0 );
+ curTime = TQTime( fromTime.hour()+1, 0, 0 );
}
currY += ( float( fromTime.secsTo(curTime)*minlen ) / 60. );
while ( curTime < endTime ) {
p.drawLine( box.left(), (int)currY, box.right(), (int)currY );
int newY=(int)(currY+cellHeight/2.);
- QString numStr;
+ TQString numStr;
if ( newY < box.bottom() ) {
- QFont oldFont( p.font() );
+ TQFont oldFont( p.font() );
// draw the time:
if ( !KGlobal::locale()->use12Clock() ) {
p.drawLine( xcenter, (int)newY, box.right(), (int)newY);
numStr.setNum(curTime.hour());
if (cellHeight > 30) {
- p.setFont(QFont("sans-serif", 16, QFont::Bold));
+ p.setFont(TQFont("sans-serif", 16, TQFont::Bold));
} else {
- p.setFont(QFont("sans-serif", 12, QFont::Bold));
+ p.setFont(TQFont("sans-serif", 12, TQFont::Bold));
}
p.drawText( box.left()+2, (int)currY+2, box.width()/2-2, (int)cellHeight,
Qt::AlignTop | Qt::AlignRight, numStr);
- p.setFont(QFont("sans-serif", 10, QFont::Normal));
+ p.setFont(TQFont("sans-serif", 10, TQFont::Normal));
p.drawText( xcenter, (int)currY+2, box.width()/2+2, (int)(cellHeight/2)-3,
Qt::AlignTop | Qt::AlignLeft, "00");
} else {
p.drawLine( box.left(), (int)newY, box.right(), (int)newY);
- QTime time( curTime.hour(), 0 );
+ TQTime time( curTime.hour(), 0 );
numStr = KGlobal::locale()->formatTime( time );
if ( box.width() < 60 ) {
- p.setFont(QFont("sans-serif", 8, QFont::Bold)); // for weekprint
+ p.setFont(TQFont("sans-serif", 8, TQFont::Bold)); // for weekprint
} else {
- p.setFont(QFont("sans-serif", 12, QFont::Bold)); // for dayprint
+ p.setFont(TQFont("sans-serif", 12, TQFont::Bold)); // for dayprint
}
p.drawText(box.left()+2, (int)currY+2, box.width()-4, (int)cellHeight/2-3,
Qt::AlignTop|Qt::AlignLeft, numStr);
@@ -697,14 +697,14 @@ void CalPrintPluginBase::drawTimeLine(QPainter &p,
be the total height used for the all-day events. If !expandable, only one
cell will be used, and multiple events are concatenated using ", ".
*/
-int CalPrintPluginBase::drawAllDayBox(QPainter &p, Event::List &eventList,
- const QDate &qd, bool expandable, const QRect &box )
+int CalPrintPluginBase::drawAllDayBox(TQPainter &p, Event::List &eventList,
+ const TQDate &qd, bool expandable, const TQRect &box )
{
Event::List::Iterator it, itold;
int offset=box.top();
- QString multiDayStr;
+ TQString multiDayStr;
Event*hd = holiday( qd );
if ( hd ) eventList.prepend( hd );
@@ -719,7 +719,7 @@ int CalPrintPluginBase::drawAllDayBox(QPainter &p, Event::List &eventList,
if ( currEvent && currEvent->doesFloat() ) {
// set the colors according to the categories
if ( expandable ) {
- QRect eventBox( box );
+ TQRect eventBox( box );
eventBox.setTop( offset );
showEventBox( p, eventBox, currEvent, currEvent->summary() );
offset += box.height();
@@ -733,10 +733,10 @@ int CalPrintPluginBase::drawAllDayBox(QPainter &p, Event::List &eventList,
if ( hd ) delete hd;
int ret = box.height();
- QRect eventBox( box );
+ TQRect eventBox( box );
if (!expandable) {
if (!multiDayStr.isEmpty()) {
- drawShadedBox( p, BOX_BORDER_WIDTH, QColor( 128, 128, 128 ), eventBox );
+ drawShadedBox( p, BOX_BORDER_WIDTH, TQColor( 128, 128, 128 ), eventBox );
printEventString( p, eventBox, multiDayStr );
} else {
drawBox( p, BOX_BORDER_WIDTH, eventBox );
@@ -750,17 +750,17 @@ int CalPrintPluginBase::drawAllDayBox(QPainter &p, Event::List &eventList,
}
-void CalPrintPluginBase::drawAgendaDayBox( QPainter &p, Event::List &events,
- const QDate &qd, bool expandable,
- QTime &fromTime, QTime &toTime,
- const QRect &oldbox )
+void CalPrintPluginBase::drawAgendaDayBox( TQPainter &p, Event::List &events,
+ const TQDate &qd, bool expandable,
+ TQTime &fromTime, TQTime &toTime,
+ const TQRect &oldbox )
{
if ( !isWorkingDay( qd ) ) {
- drawShadedBox( p, BOX_BORDER_WIDTH, QColor( 232, 232, 232 ), oldbox );
+ drawShadedBox( p, BOX_BORDER_WIDTH, TQColor( 232, 232, 232 ), oldbox );
} else {
drawBox( p, BOX_BORDER_WIDTH, oldbox );
}
- QRect box( oldbox );
+ TQRect box( oldbox );
// Account for the border with and cut away that margin from the interior
// box.setRight( box.right()-BOX_BORDER_WIDTH );
@@ -780,7 +780,7 @@ void CalPrintPluginBase::drawAgendaDayBox( QPainter &p, Event::List &events,
// Show at least one hour
// if ( fromTime.secsTo( toTime ) < 3600 ) {
-// fromTime = QTime( fromTime.hour(), 0, 0 );
+// fromTime = TQTime( fromTime.hour(), 0, 0 );
// toTime = fromTime.addSecs( 3600 );
// }
@@ -791,7 +791,7 @@ void CalPrintPluginBase::drawAgendaDayBox( QPainter &p, Event::List &events,
float currY = box.top();
// print grid:
- QTime curTime( QTime( fromTime.hour(), 0, 0 ) );
+ TQTime curTime( TQTime( fromTime.hour(), 0, 0 ) );
currY += fromTime.secsTo( curTime ) * minlen / 60;
while ( curTime < toTime && curTime.isValid() ) {
@@ -800,8 +800,8 @@ void CalPrintPluginBase::drawAgendaDayBox( QPainter &p, Event::List &events,
currY += cellHeight / 2;
if ( ( currY > box.top() ) && ( currY < box.bottom() ) ) {
// enough space for half-hour line
- QPen oldPen( p.pen() );
- p.setPen( QColor( 192, 192, 192 ) );
+ TQPen oldPen( p.pen() );
+ p.setPen( TQColor( 192, 192, 192 ) );
p.drawLine( box.left(), int( currY ), box.right(), int( currY ) );
p.setPen( oldPen );
}
@@ -811,31 +811,31 @@ void CalPrintPluginBase::drawAgendaDayBox( QPainter &p, Event::List &events,
currY += cellHeight / 2;
}
- QDateTime startPrintDate = QDateTime( qd, fromTime );
- QDateTime endPrintDate = QDateTime( qd, toTime );
+ TQDateTime startPrintDate = TQDateTime( qd, fromTime );
+ TQDateTime endPrintDate = TQDateTime( qd, toTime );
// Calculate horizontal positions and widths of events taking into account
// overlapping events
- QPtrList<KOrg::CellItem> cells;
+ TQPtrList<KOrg::CellItem> cells;
cells.setAutoDelete( true );
Event::List::ConstIterator itEvents;
for( itEvents = events.begin(); itEvents != events.end(); ++itEvents ) {
- QValueList<QDateTime> times = (*itEvents)->startDateTimesForDate( qd );
- for ( QValueList<QDateTime>::ConstIterator it = times.begin();
+ TQValueList<TQDateTime> times = (*itEvents)->startDateTimesForDate( qd );
+ for ( TQValueList<TQDateTime>::ConstIterator it = times.begin();
it != times.end(); ++it ) {
cells.append( new PrintCellItem( *itEvents, (*it), (*itEvents)->endDateForStart( *it ) ) );
}
}
- QPtrListIterator<KOrg::CellItem> it1( cells );
+ TQPtrListIterator<KOrg::CellItem> it1( cells );
for( it1.toFirst(); it1.current(); ++it1 ) {
KOrg::CellItem *placeItem = it1.current();
KOrg::CellItem::placeItem( cells, placeItem );
}
-// p.setFont( QFont( "sans-serif", 10 ) );
+// p.setFont( TQFont( "sans-serif", 10 ) );
for( it1.toFirst(); it1.current(); ++it1 ) {
PrintCellItem *placeItem = static_cast<PrintCellItem *>( it1.current() );
@@ -846,16 +846,16 @@ void CalPrintPluginBase::drawAgendaDayBox( QPainter &p, Event::List &events,
-void CalPrintPluginBase::drawAgendaItem( PrintCellItem *item, QPainter &p,
- const QDateTime &startPrintDate,
- const QDateTime &endPrintDate,
- float minlen, const QRect &box )
+void CalPrintPluginBase::drawAgendaItem( PrintCellItem *item, TQPainter &p,
+ const TQDateTime &startPrintDate,
+ const TQDateTime &endPrintDate,
+ float minlen, const TQRect &box )
{
Event *event = item->event();
// start/end of print area for event
- QDateTime startTime = item->start();
- QDateTime endTime = item->end();
+ TQDateTime startTime = item->start();
+ TQDateTime endTime = item->end();
if ( ( startTime < endPrintDate && endTime > startPrintDate ) ||
( endTime > startPrintDate && startTime < endPrintDate ) ) {
if ( startTime < startPrintDate ) startTime = startPrintDate;
@@ -866,18 +866,18 @@ void CalPrintPluginBase::drawAgendaItem( PrintCellItem *item, QPainter &p,
minlen / 60. );
int currentHeight = int( box.top() + startPrintDate.secsTo( endTime ) * minlen / 60. ) - currentYPos;
- QRect eventBox( currentX, currentYPos, currentWidth, currentHeight );
+ TQRect eventBox( currentX, currentYPos, currentWidth, currentHeight );
showEventBox( p, eventBox, event, event->summary() );
}
}
//TODO TODO TODO
-void CalPrintPluginBase::drawDayBox( QPainter &p, const QDate &qd,
- const QRect &box,
+void CalPrintPluginBase::drawDayBox( TQPainter &p, const TQDate &qd,
+ const TQRect &box,
bool fullDate, bool printRecurDaily, bool printRecurWeekly )
{
- QString dayNumStr;
- QString ampm;
+ TQString dayNumStr;
+ TQString ampm;
const KLocale*local = KGlobal::locale();
@@ -890,33 +890,33 @@ void CalPrintPluginBase::drawDayBox( QPainter &p, const QDate &qd,
.arg( qd.day() );
// dayNumStr = local->formatDate(qd);
} else {
- dayNumStr = QString::number( qd.day() );
+ dayNumStr = TQString::number( qd.day() );
}
- QRect subHeaderBox( box );
+ TQRect subHeaderBox( box );
subHeaderBox.setHeight( mSubHeaderHeight );
drawShadedBox( p, BOX_BORDER_WIDTH, p.backgroundColor(), box );
- drawShadedBox( p, 0, QColor( 232, 232, 232 ), subHeaderBox );
+ drawShadedBox( p, 0, TQColor( 232, 232, 232 ), subHeaderBox );
drawBox( p, BOX_BORDER_WIDTH, box );
- QString hstring( holidayString( qd ) );
- QFont oldFont( p.font() );
+ TQString hstring( holidayString( qd ) );
+ TQFont oldFont( p.font() );
- QRect headerTextBox( subHeaderBox );
+ TQRect headerTextBox( subHeaderBox );
headerTextBox.setLeft( subHeaderBox.left()+5 );
headerTextBox.setRight( subHeaderBox.right()-5 );
if (!hstring.isEmpty()) {
- p.setFont( QFont( "sans-serif", 8, QFont::Bold, true ) );
+ p.setFont( TQFont( "sans-serif", 8, TQFont::Bold, true ) );
p.drawText( headerTextBox, Qt::AlignLeft | Qt::AlignVCenter, hstring );
}
- p.setFont(QFont("sans-serif", 10, QFont::Bold));
+ p.setFont(TQFont("sans-serif", 10, TQFont::Bold));
p.drawText( headerTextBox, Qt::AlignRight | Qt::AlignVCenter, dayNumStr);
Event::List eventList = mCalendar->events( qd,
EventSortStartDate,
SortDirectionAscending );
- QString text;
- p.setFont( QFont( "sans-serif", 8 ) );
+ TQString text;
+ p.setFont( TQFont( "sans-serif", 8 ) );
int textY=mSubHeaderHeight+3; // gives the relative y-coord of the next printed entry
Event::List::ConstIterator it;
@@ -954,19 +954,19 @@ void CalPrintPluginBase::drawDayBox( QPainter &p, const QDate &qd,
}
// TODO TODO TODO
-void CalPrintPluginBase::drawIncidence( QPainter &p, const QRect &dayBox, const QString &time, const QString &summary, int &textY )
+void CalPrintPluginBase::drawIncidence( TQPainter &p, const TQRect &dayBox, const TQString &time, const TQString &summary, int &textY )
{
kdDebug(5850) << "summary = " << summary << endl;
int flags = Qt::AlignLeft;
- QFontMetrics fm = p.fontMetrics();
- QRect timeBound = p.boundingRect( dayBox.x() + 5, dayBox.y() + textY,
+ TQFontMetrics fm = p.fontMetrics();
+ TQRect timeBound = p.boundingRect( dayBox.x() + 5, dayBox.y() + textY,
dayBox.width() - 10, fm.lineSpacing(),
flags, time );
p.drawText( timeBound, flags, time );
int summaryWidth = time.isEmpty() ? 0 : timeBound.width() + 4;
- QRect summaryBound = QRect( dayBox.x() + 5 + summaryWidth, dayBox.y() + textY,
+ TQRect summaryBound = TQRect( dayBox.x() + 5 + summaryWidth, dayBox.y() + textY,
dayBox.width() - summaryWidth -5, dayBox.height() );
KWordWrap *ww = KWordWrap::formatText( fm, summaryBound, flags, summary );
@@ -980,9 +980,9 @@ void CalPrintPluginBase::drawIncidence( QPainter &p, const QRect &dayBox, const
///////////////////////////////////////////////////////////////////////////////
-void CalPrintPluginBase::drawWeek(QPainter &p, const QDate &qd, const QRect &box )
+void CalPrintPluginBase::drawWeek(TQPainter &p, const TQDate &qd, const TQRect &box )
{
- QDate weekDate = qd;
+ TQDate weekDate = qd;
bool portrait = ( box.height() > box.width() );
int cellWidth, cellHeight;
int vcells;
@@ -1003,40 +1003,40 @@ void CalPrintPluginBase::drawWeek(QPainter &p, const QDate &qd, const QRect &box
// Saturday and sunday share a cell, so we have to special-case sunday
int hpos = ((i<6)?i:(i-1)) / vcells;
int vpos = ((i<6)?i:(i-1)) % vcells;
- QRect dayBox( box.left()+cellWidth*hpos, box.top()+cellHeight*vpos + ((i==6)?(cellHeight/2):0),
+ TQRect dayBox( box.left()+cellWidth*hpos, box.top()+cellHeight*vpos + ((i==6)?(cellHeight/2):0),
cellWidth, (i<5)?(cellHeight):(cellHeight/2) );
drawDayBox(p, weekDate, dayBox, true);
} // for i through all weekdays
}
-void CalPrintPluginBase::drawTimeTable(QPainter &p,
- const QDate &fromDate, const QDate &toDate,
- QTime &fromTime, QTime &toTime,
- const QRect &box)
+void CalPrintPluginBase::drawTimeTable(TQPainter &p,
+ const TQDate &fromDate, const TQDate &toDate,
+ TQTime &fromTime, TQTime &toTime,
+ const TQRect &box)
{
// timeline is 1 hour:
int alldayHeight = (int)( 3600.*box.height()/(fromTime.secsTo(toTime)+3600.) );
int timelineWidth = TIMELINE_WIDTH;
- QRect dowBox( box );
+ TQRect dowBox( box );
dowBox.setLeft( box.left() + timelineWidth );
dowBox.setHeight( mSubHeaderHeight );
drawDaysOfWeek( p, fromDate, toDate, dowBox );
- QRect tlBox( box );
+ TQRect tlBox( box );
tlBox.setWidth( timelineWidth );
tlBox.setTop( dowBox.bottom() + BOX_BORDER_WIDTH + alldayHeight );
drawTimeLine( p, fromTime, toTime, tlBox );
// draw each day
- QDate curDate(fromDate);
+ TQDate curDate(fromDate);
int i=0;
double cellWidth = double(dowBox.width()) / double(fromDate.daysTo(toDate)+1);
while (curDate<=toDate) {
- QRect allDayBox( dowBox.left()+int(i*cellWidth), dowBox.bottom() + BOX_BORDER_WIDTH,
+ TQRect allDayBox( dowBox.left()+int(i*cellWidth), dowBox.bottom() + BOX_BORDER_WIDTH,
int((i+1)*cellWidth)-int(i*cellWidth), alldayHeight );
- QRect dayBox( allDayBox );
+ TQRect dayBox( allDayBox );
dayBox.setTop( tlBox.top() );
dayBox.setBottom( box.bottom() );
Event::List eventList = mCalendar->events(curDate,
@@ -1057,33 +1057,33 @@ class MonthEventStruct
{
public:
MonthEventStruct() : event(0) {}
- MonthEventStruct( const QDateTime &s, const QDateTime &e, Event *ev)
+ MonthEventStruct( const TQDateTime &s, const TQDateTime &e, Event *ev)
{
event = ev;
start = s;
end = e;
if ( event->doesFloat() ) {
- start = QDateTime( start.date(), QTime(0,0,0) );
- end = QDateTime( end.date().addDays(1), QTime(0,0,0) ).addSecs(-1);
+ start = TQDateTime( start.date(), TQTime(0,0,0) );
+ end = TQDateTime( end.date().addDays(1), TQTime(0,0,0) ).addSecs(-1);
}
}
bool operator<(const MonthEventStruct &mes) { return start < mes.start; }
- QDateTime start;
- QDateTime end;
+ TQDateTime start;
+ TQDateTime end;
Event *event;
};
-void CalPrintPluginBase::drawMonth( QPainter &p, const QDate &dt, const QRect &box, int maxdays, int subDailyFlags, int holidaysFlags )
+void CalPrintPluginBase::drawMonth( TQPainter &p, const TQDate &dt, const TQRect &box, int maxdays, int subDailyFlags, int holidaysFlags )
{
const KCalendarSystem *calsys = calendarSystem();
- QRect subheaderBox( box );
+ TQRect subheaderBox( box );
subheaderBox.setHeight( subHeaderHeight() );
- QRect borderBox( box );
+ TQRect borderBox( box );
borderBox.setTop( subheaderBox.bottom()+1 );
drawSubHeaderBox( p, calsys->monthName(dt), subheaderBox );
// correct for half the border width
int correction = (BOX_BORDER_WIDTH/*-1*/)/2;
- QRect daysBox( borderBox );
+ TQRect daysBox( borderBox );
daysBox.addCoords( correction, correction, -correction, -correction );
int daysinmonth = calsys->daysInMonth( dt );
@@ -1092,43 +1092,43 @@ void CalPrintPluginBase::drawMonth( QPainter &p, const QDate &dt, const QRect &b
int d;
float dayheight = float(daysBox.height()) / float( maxdays );
- QColor holidayColor( 240, 240, 240 );
- QColor workdayColor( 255, 255, 255 );
+ TQColor holidayColor( 240, 240, 240 );
+ TQColor workdayColor( 255, 255, 255 );
int dayNrWidth = p.fontMetrics().width( "99" );
// Fill the remaining space (if a month has less days than others) with a crossed-out pattern
if ( daysinmonth<maxdays ) {
- QRect dayBox( box.left(), daysBox.top() + round(dayheight*daysinmonth), box.width(), 0 );
+ TQRect dayBox( box.left(), daysBox.top() + round(dayheight*daysinmonth), box.width(), 0 );
dayBox.setBottom( daysBox.bottom() );
p.fillRect( dayBox, Qt::DiagCrossPattern );
}
// Backgrounded boxes for each day, plus day numbers
- QBrush oldbrush( p.brush() );
+ TQBrush oldbrush( p.brush() );
for ( d = 0; d < daysinmonth; ++d ) {
- QDate day;
+ TQDate day;
calsys->setYMD( day, dt.year(), dt.month(), d+1 );
- QRect dayBox( daysBox.left()/*+rand()%50*/, daysBox.top() + round(dayheight*d), daysBox.width()/*-rand()%50*/, 0 );
+ TQRect dayBox( daysBox.left()/*+rand()%50*/, daysBox.top() + round(dayheight*d), daysBox.width()/*-rand()%50*/, 0 );
// FIXME: When using a border width of 0 for event boxes, don't let the rectangles overlap, i.e. subtract 1 from the top or bottom!
dayBox.setBottom( daysBox.top()+round(dayheight*(d+1)) - 1 );
p.setBrush( isWorkingDay( day )?workdayColor:holidayColor );
p.drawRect( dayBox );
- QRect dateBox( dayBox );
+ TQRect dateBox( dayBox );
dateBox.setWidth( dayNrWidth+3 );
p.drawText( dateBox, Qt::AlignRight | Qt::AlignVCenter | Qt::SingleLine,
- QString::number(d+1) );
+ TQString::number(d+1) );
}
p.setBrush( oldbrush );
int xstartcont = box.left() + dayNrWidth + 5;
- QDate start, end;
+ TQDate start, end;
calsys->setYMD( start, dt.year(), dt.month(), 1 );
end = calsys->addMonths( start, 1 );
end = calsys->addDays( end, -1 );
Event::List events = mCalendar->events( start, end );
- QMap<int, QStringList> textEvents;
- QPtrList<KOrg::CellItem> timeboxItems;
+ TQMap<int, TQStringList> textEvents;
+ TQPtrList<KOrg::CellItem> timeboxItems;
timeboxItems.setAutoDelete( true );
@@ -1141,13 +1141,13 @@ void CalPrintPluginBase::drawMonth( QPainter &p, const QDate &dt, const QRect &b
// Holidays
Event::List holidays;
holidays.setAutoDelete( true );
- for ( QDate d(start); d <= end; d = d.addDays(1) ) {
+ for ( TQDate d(start); d <= end; d = d.addDays(1) ) {
Event *e = holiday( d );
if ( e ) {
holidays.append( e );
if ( holidaysFlags & TimeBoxes ) {
- timeboxItems.append( new PrintCellItem( e, QDateTime(d, QTime(0,0,0) ),
- QDateTime( d.addDays(1), QTime(0,0,0) ) ) );
+ timeboxItems.append( new PrintCellItem( e, TQDateTime(d, TQTime(0,0,0) ),
+ TQDateTime( d.addDays(1), TQTime(0,0,0) ) ) );
}
if ( holidaysFlags & Text ) {
textEvents[ d.day() ] << e->summary();
@@ -1155,7 +1155,7 @@ void CalPrintPluginBase::drawMonth( QPainter &p, const QDate &dt, const QRect &b
}
}
- QValueList<MonthEventStruct> monthentries;
+ TQValueList<MonthEventStruct> monthentries;
for ( Event::List::ConstIterator evit = events.begin();
evit != events.end(); ++evit ) {
@@ -1165,8 +1165,8 @@ void CalPrintPluginBase::drawMonth( QPainter &p, const QDate &dt, const QRect &b
if ( e->recursOn( start ) ) {
// This occurrence has possibly started before the beginning of the
// month, so obtain the start date before the beginning of the month
- QValueList<QDateTime> starttimes = e->startDateTimesForDate( start );
- QValueList<QDateTime>::ConstIterator it = starttimes.begin();
+ TQValueList<TQDateTime> starttimes = e->startDateTimesForDate( start );
+ TQValueList<TQDateTime>::ConstIterator it = starttimes.begin();
for ( ; it != starttimes.end(); ++it ) {
monthentries.append( MonthEventStruct( *it, e->endDateForStart( *it ), e ) );
}
@@ -1176,13 +1176,13 @@ void CalPrintPluginBase::drawMonth( QPainter &p, const QDate &dt, const QRect &b
// also return events that have started earlier. These start dates
// however, have already been treated!
Recurrence *recur = e->recurrence();
- QDate d1( start.addDays(1) );
+ TQDate d1( start.addDays(1) );
while ( d1 <= end ) {
if ( recur->recursOn(d1) ) {
TimeList times( recur->recurTimesOn( d1 ) );
for ( TimeList::ConstIterator it = times.begin();
it != times.end(); ++it ) {
- QDateTime d1start( d1, *it );
+ TQDateTime d1start( d1, *it );
monthentries.append( MonthEventStruct( d1start, e->endDateForStart( d1start ), e ) );
}
}
@@ -1194,8 +1194,8 @@ void CalPrintPluginBase::drawMonth( QPainter &p, const QDate &dt, const QRect &b
}
qHeapSort( monthentries );
- QValueList<MonthEventStruct>::ConstIterator mit = monthentries.begin();
- QDateTime endofmonth( end, QTime(0,0,0) );
+ TQValueList<MonthEventStruct>::ConstIterator mit = monthentries.begin();
+ TQDateTime endofmonth( end, TQTime(0,0,0) );
endofmonth = endofmonth.addDays(1);
for ( ; mit != monthentries.end(); ++mit ) {
if ( (*mit).start.date() == (*mit).end.date() ) {
@@ -1209,8 +1209,8 @@ void CalPrintPluginBase::drawMonth( QPainter &p, const QDate &dt, const QRect &b
}
} else {
// Multi-day events are always shown as time line boxes
- QDateTime thisstart( (*mit).start );
- QDateTime thisend( (*mit).end );
+ TQDateTime thisstart( (*mit).start );
+ TQDateTime thisend( (*mit).end );
if ( thisstart.date()<start ) thisstart = start;
if ( thisend>endofmonth ) thisend = endofmonth;
timeboxItems.append( new PrintCellItem( (*mit).event, thisstart, thisend ) );
@@ -1218,22 +1218,22 @@ void CalPrintPluginBase::drawMonth( QPainter &p, const QDate &dt, const QRect &b
}
// For Multi-day events, line them up nicely so that the boxes don't overlap
- QPtrListIterator<KOrg::CellItem> it1( timeboxItems );
+ TQPtrListIterator<KOrg::CellItem> it1( timeboxItems );
for( it1.toFirst(); it1.current(); ++it1 ) {
KOrg::CellItem *placeItem = it1.current();
KOrg::CellItem::placeItem( timeboxItems, placeItem );
}
- QDateTime starttime( start, QTime( 0, 0, 0 ) );
+ TQDateTime starttime( start, TQTime( 0, 0, 0 ) );
int newxstartcont = xstartcont;
- QFont oldfont( p.font() );
- p.setFont( QFont( "sans-serif", 7 ) );
+ TQFont oldfont( p.font() );
+ p.setFont( TQFont( "sans-serif", 7 ) );
for( it1.toFirst(); it1.current(); ++it1 ) {
PrintCellItem *placeItem = static_cast<PrintCellItem *>( it1.current() );
int minsToStart = starttime.secsTo( placeItem->start() )/60;
int minsToEnd = starttime.secsTo( placeItem->end() )/60;
- QRect eventBox( xstartcont + placeItem->subCell()*17,
+ TQRect eventBox( xstartcont + placeItem->subCell()*17,
daysBox.top() + round( double( minsToStart*daysBox.height()) / double(maxdays*24*60) ),
14, 0 );
eventBox.setBottom( daysBox.top() + round( double( minsToEnd*daysBox.height()) / double(maxdays*24*60) ) );
@@ -1245,9 +1245,9 @@ void CalPrintPluginBase::drawMonth( QPainter &p, const QDate &dt, const QRect &b
// For Single-day events, simply print their summaries into the remaining
// space of the day's cell
for ( int d=0; d<daysinmonth; ++d ) {
- QStringList dayEvents( textEvents[d+1] );
- QString txt = dayEvents.join(", ");
- QRect dayBox( xstartcont, daysBox.top()+round(dayheight*d), 0, 0 );
+ TQStringList dayEvents( textEvents[d+1] );
+ TQString txt = dayEvents.join(", ");
+ TQRect dayBox( xstartcont, daysBox.top()+round(dayheight*d), 0, 0 );
dayBox.setRight( box.right() );
dayBox.setBottom( daysBox.top()+round(dayheight*(d+1)) );
printEventString(p, dayBox, txt, Qt::AlignTop | Qt::AlignLeft | Qt::BreakAnywhere );
@@ -1260,15 +1260,15 @@ void CalPrintPluginBase::drawMonth( QPainter &p, const QDate &dt, const QRect &b
///////////////////////////////////////////////////////////////////////////////
-void CalPrintPluginBase::drawMonthTable(QPainter &p, const QDate &qd, bool weeknumbers,
+void CalPrintPluginBase::drawMonthTable(TQPainter &p, const TQDate &qd, bool weeknumbers,
bool recurDaily, bool recurWeekly,
- const QRect &box)
+ const TQRect &box)
{
int yoffset = mSubHeaderHeight;
int xoffset = 0;
- QDate monthDate(QDate(qd.year(), qd.month(), 1));
- QDate monthFirst(monthDate);
- QDate monthLast(monthDate.addMonths(1).addDays(-1));
+ TQDate monthDate(TQDate(qd.year(), qd.month(), 1));
+ TQDate monthFirst(monthDate);
+ TQDate monthLast(monthDate.addMonths(1).addDays(-1));
int weekdayCol = weekdayColumn( monthDate.dayOfWeek() );
@@ -1291,26 +1291,26 @@ void CalPrintPluginBase::drawMonthTable(QPainter &p, const QDate &qd, bool weekn
}
if (weeknumbers) {
- QFont oldFont(p.font());
- QFont newFont(p.font());
+ TQFont oldFont(p.font());
+ TQFont newFont(p.font());
newFont.setPointSize(6);
p.setFont(newFont);
- QDate weekDate(monthDate);
+ TQDate weekDate(monthDate);
for (int row = 0; row<rows; ++row ) {
int calWeek = weekDate.weekNumber();
- QRect rc( box.left(), rowedges[row], coledges[0] - 3 - box.left(), rowedges[row+1]-rowedges[row] );
- p.drawText( rc, Qt::AlignRight | Qt::AlignVCenter, QString::number( calWeek ) );
+ TQRect rc( box.left(), rowedges[row], coledges[0] - 3 - box.left(), rowedges[row+1]-rowedges[row] );
+ p.drawText( rc, Qt::AlignRight | Qt::AlignVCenter, TQString::number( calWeek ) );
weekDate = weekDate.addDays( 7 );
}
p.setFont( oldFont );
}
- QRect daysOfWeekBox( box );
+ TQRect daysOfWeekBox( box );
daysOfWeekBox.setHeight( mSubHeaderHeight );
daysOfWeekBox.setLeft( box.left()+xoffset );
drawDaysOfWeek( p, monthDate, monthDate.addDays( 6 ), daysOfWeekBox );
- QColor back = p.backgroundColor();
+ TQColor back = p.backgroundColor();
bool darkbg = false;
for ( int row = 0; row < rows; ++row ) {
for ( int col = 0; col < 7; ++col ) {
@@ -1319,7 +1319,7 @@ void CalPrintPluginBase::drawMonthTable(QPainter &p, const QDate &qd, bool weekn
p.setBackgroundColor( back.dark( 120 ) );
darkbg = true;
}
- QRect dayBox( coledges[col], rowedges[row], coledges[col+1]-coledges[col], rowedges[row+1]-rowedges[row] );
+ TQRect dayBox( coledges[col], rowedges[row], coledges[col+1]-coledges[col], rowedges[row+1]-rowedges[row] );
drawDayBox(p, monthDate, dayBox, false, recurDaily, recurWeekly );
if ( darkbg ) {
p.setBackgroundColor( back );
@@ -1333,7 +1333,7 @@ void CalPrintPluginBase::drawMonthTable(QPainter &p, const QDate &qd, bool weekn
///////////////////////////////////////////////////////////////////////////////
-void CalPrintPluginBase::drawTodo( int &count, Todo *todo, QPainter &p,
+void CalPrintPluginBase::drawTodo( int &count, Todo *todo, TQPainter &p,
TodoSortField sortField, SortDirection sortDir,
bool connectSubTodos, bool strikeoutCompleted,
bool desc, int posPriority, int posSummary,
@@ -1342,14 +1342,14 @@ void CalPrintPluginBase::drawTodo( int &count, Todo *todo, QPainter &p,
int pageHeight, const Todo::List &todoList,
TodoParentStart *r )
{
- QString outStr;
+ TQString outStr;
const KLocale *local = KGlobal::locale();
- QRect rect;
+ TQRect rect;
TodoParentStart startpt;
// This list keeps all starting points of the parent to-dos so the connection
// lines of the tree can easily be drawn (needed if a new page is started)
- static QPtrList<TodoParentStart> startPoints;
+ static TQPtrList<TodoParentStart> startPoints;
if ( level < 1 ) {
startPoints.clear();
}
@@ -1407,7 +1407,7 @@ void CalPrintPluginBase::drawTodo( int &count, Todo *todo, QPainter &p,
rect.setHeight(18);
// Draw a checkbox
- p.setBrush( QBrush( Qt::NoBrush ) );
+ p.setBrush( TQBrush( Qt::NoBrush ) );
p.drawRect( rect );
if ( todo->isCompleted() ) {
// cross out the rectangle for completed to-dos
@@ -1442,10 +1442,10 @@ void CalPrintPluginBase::drawTodo( int &count, Todo *todo, QPainter &p,
rect = p.boundingRect( lhs, rect.top(), (rhs-(left + rect.width() + 5)),
-1, Qt::WordBreak, outStr );
- QRect newrect;
+ TQRect newrect;
//FIXME: the following code prints underline rather than strikeout text
#if 0
- QFont f( p.font() );
+ TQFont f( p.font() );
if ( todo->isCompleted() && strikeoutCompleted ) {
f.setStrikeOut( true );
p.setFont( f );
@@ -1484,10 +1484,10 @@ void CalPrintPluginBase::drawTodo( int &count, Todo *todo, QPainter &p,
//first, draw the progress bar
int progress = (int)(( lwidth*todo->percentComplete())/100.0 + 0.5);
- p.setBrush( QBrush( Qt::NoBrush ) );
+ p.setBrush( TQBrush( Qt::NoBrush ) );
p.drawRect( posPercentComplete, y+3, lwidth, lheight );
if ( progress > 0 ) {
- p.setBrush( QColor( 128, 128, 128 ) );
+ p.setBrush( TQColor( 128, 128, 128 ) );
p.drawRect( posPercentComplete, y+3, progress, lheight );
}
@@ -1563,14 +1563,14 @@ int CalPrintPluginBase::weekdayColumn( int weekday )
return ( weekday + 7 - KGlobal::locale()->weekStartDay() ) % 7;
}
-void CalPrintPluginBase::drawJournalField( QPainter &p, QString field, QString text,
+void CalPrintPluginBase::drawJournalField( TQPainter &p, TQString field, TQString text,
int x, int &y, int width, int pageHeight )
{
if ( text.isEmpty() ) return;
- QString entry( field.arg( text ) );
+ TQString entry( field.arg( text ) );
- QRect rect( p.boundingRect( x, y, width, -1, Qt::WordBreak, entry) );
+ TQRect rect( p.boundingRect( x, y, width, -1, Qt::WordBreak, entry) );
if ( rect.bottom() > pageHeight) {
// Start new page...
// FIXME: If it's a multi-line text, draw a few lines on this page, and the
@@ -1579,18 +1579,18 @@ void CalPrintPluginBase::drawJournalField( QPainter &p, QString field, QString t
mPrinter->newPage();
rect = p.boundingRect( x, y, width, -1, Qt::WordBreak, entry);
}
- QRect newrect;
+ TQRect newrect;
p.drawText( rect, Qt::WordBreak, entry, -1, &newrect );
y = newrect.bottom() + 7;
}
-void CalPrintPluginBase::drawJournal( Journal * journal, QPainter &p, int x, int &y,
+void CalPrintPluginBase::drawJournal( Journal * journal, TQPainter &p, int x, int &y,
int width, int pageHeight )
{
- QFont oldFont( p.font() );
- p.setFont( QFont( "sans-serif", 15 ) );
- QString headerText;
- QString dateText( KGlobal::locale()->
+ TQFont oldFont( p.font() );
+ p.setFont( TQFont( "sans-serif", 15 ) );
+ TQString headerText;
+ TQString dateText( KGlobal::locale()->
formatDate( journal->dtStart().date(), false ) );
if ( journal->summary().isEmpty() ) {
@@ -1601,14 +1601,14 @@ void CalPrintPluginBase::drawJournal( Journal * journal, QPainter &p, int x, int
.arg( dateText );
}
- QRect rect( p.boundingRect( x, y, width, -1, Qt::WordBreak, headerText) );
+ TQRect rect( p.boundingRect( x, y, width, -1, Qt::WordBreak, headerText) );
if ( rect.bottom() > pageHeight) {
// Start new page...
y=0;
mPrinter->newPage();
rect = p.boundingRect( x, y, width, -1, Qt::WordBreak, headerText );
}
- QRect newrect;
+ TQRect newrect;
p.drawText( rect, Qt::WordBreak, headerText, -1, &newrect );
p.setFont( oldFont );
@@ -1623,17 +1623,17 @@ void CalPrintPluginBase::drawJournal( Journal * journal, QPainter &p, int x, int
}
-void CalPrintPluginBase::drawSplitHeaderRight( QPainter &p, const QDate &fd,
- const QDate &td,
- const QDate &,
+void CalPrintPluginBase::drawSplitHeaderRight( TQPainter &p, const TQDate &fd,
+ const TQDate &td,
+ const TQDate &,
int width, int )
{
- QFont oldFont( p.font() );
+ TQFont oldFont( p.font() );
- QPen oldPen( p.pen() );
- QPen pen( Qt::black, 4 );
+ TQPen oldPen( p.pen() );
+ TQPen pen( Qt::black, 4 );
- QString title;
+ TQString title;
if ( mCalSys ) {
if ( fd.month() == td.month() ) {
title = i18n("Date range: Month dayStart - dayEnd", "%1 %2 - %3")
@@ -1649,7 +1649,7 @@ void CalPrintPluginBase::drawSplitHeaderRight( QPainter &p, const QDate &fd,
}
}
- QFont serifFont("Times", 30);
+ TQFont serifFont("Times", 30);
p.setFont(serifFont);
int lineSpacing = p.fontMetrics().lineSpacing();
@@ -1662,9 +1662,9 @@ void CalPrintPluginBase::drawSplitHeaderRight( QPainter &p, const QDate &fd,
p.drawLine(300, lineSpacing * 1, width, lineSpacing * 1);
p.setPen( oldPen );
- p.setFont(QFont("Times", 20, QFont::Bold, TRUE));
+ p.setFont(TQFont("Times", 20, TQFont::Bold, TRUE));
int newlineSpacing = p.fontMetrics().lineSpacing();
- title += QString::number(fd.year());
+ title += TQString::number(fd.year());
p.drawText( 0, lineSpacing * 1 + 4, width, newlineSpacing,
Qt::AlignRight | Qt::AlignTop, title );
diff --git a/korganizer/printing/calprintpluginbase.h b/korganizer/printing/calprintpluginbase.h
index 9312d0042..226998f85 100644
--- a/korganizer/printing/calprintpluginbase.h
+++ b/korganizer/printing/calprintpluginbase.h
@@ -28,7 +28,7 @@
#ifndef KORG_NOPRINTER
-#include <qdatetime.h>
+#include <tqdatetime.h>
#include <kprinter.h>
#include <kdepimmacros.h>
#include <libkcal/calendar.h>
@@ -77,16 +77,16 @@ class KDE_EXPORT CalPrintPluginBase : public KOrg::PrintPlugin
/**
Returns widget for configuring the print format.
*/
- virtual QWidget *createConfigWidget( QWidget * );
+ virtual TQWidget *createConfigWidget( TQWidget * );
/**
Actually do the printing.
- \param p QPainter the print result is painted to
+ \param p TQPainter the print result is painted to
\param width Width of printable area
\param height Height of printable area
*/
- virtual void print( QPainter &p, int width, int height ) = 0;
+ virtual void print( TQPainter &p, int width, int height ) = 0;
/**
Start printing.
*/
@@ -117,12 +117,12 @@ class KDE_EXPORT CalPrintPluginBase : public KOrg::PrintPlugin
void setUseColors( bool useColors );
/** Helper functions to hide the KOrg::CoreHelper */
- QColor categoryBgColor( Incidence *incidence );
- QColor textColor( const QColor &color );
- QTime dayStart();
- bool isWorkingDay( const QDate &dt );
- QString holidayString( const QDate &dt );
- Event *holiday( const QDate &dt );
+ TQColor categoryBgColor( Incidence *incidence );
+ TQColor textColor( const TQColor &color );
+ TQTime dayStart();
+ bool isWorkingDay( const TQDate &dt );
+ TQString holidayString( const TQDate &dt );
+ Event *holiday( const TQDate &dt );
/**
Determines the column of the given weekday ( 1=Monday, 7=Sunday ), taking the
@@ -130,7 +130,7 @@ class KDE_EXPORT CalPrintPluginBase : public KOrg::PrintPlugin
\param weekday Index of the weekday
*/
static int weekdayColumn( int weekday );
- void setCategoryColors( QPainter &p, Incidence *incidence );
+ void setCategoryColors( TQPainter &p, Incidence *incidence );
KPrinter::Orientation orientation() const;
@@ -168,7 +168,7 @@ class KDE_EXPORT CalPrintPluginBase : public KOrg::PrintPlugin
\param linewidth The border width of the box
\param rect The rectangle of the box
*/
- static void drawBox( QPainter &p, int linewidth, const QRect &rect );
+ static void drawBox( TQPainter &p, int linewidth, const TQRect &rect );
/**
Draw a shaded box with given width at the given coordinates.
\param p The printer to be used
@@ -176,16 +176,16 @@ class KDE_EXPORT CalPrintPluginBase : public KOrg::PrintPlugin
\param brush The brush to fill the box
\param rect The rectangle of the box
*/
- static void drawShadedBox( QPainter &p, int linewidth, const QBrush &brush, const QRect &rect );
+ static void drawShadedBox( TQPainter &p, int linewidth, const TQBrush &brush, const TQRect &rect );
/**
Print the given string (event summary) in the given rectangle. Margins
and justification (centered or not) are automatically adjusted.
- \param p QPainter of the printout
+ \param p TQPainter of the printout
\param box Coordinates of the surrounding event box
\param str The text to be printed in the box
*/
- void printEventString( QPainter &p, const QRect &box, const QString &str, int flags = -1 );
+ void printEventString( TQPainter &p, const TQRect &box, const TQString &str, int flags = -1 );
/**
Print the box for the given event with the given string.
@@ -195,27 +195,27 @@ class KDE_EXPORT CalPrintPluginBase : public KOrg::PrintPlugin
color will be deduced, if applicable.
\param str The string to print inside the box
*/
- void showEventBox( QPainter &p, const QRect &box, Incidence *incidence, const QString &str, int flags = -1 );
+ void showEventBox( TQPainter &p, const TQRect &box, Incidence *incidence, const TQString &str, int flags = -1 );
/**
Draw a subheader box with a shaded background and the given string
- \param p QPainter of the printout
+ \param p TQPainter of the printout
\param str Text to be printed inside the box
\param box Coordinates of the box
*/
- void drawSubHeaderBox(QPainter &p, const QString &str, const QRect &box );
+ void drawSubHeaderBox(TQPainter &p, const TQString &str, const TQRect &box );
/**
Draw an event box with vertical text.
- \param p QPainter of the printout
+ \param p TQPainter of the printout
\param box Coordinates of the box
\param str ext to be printed inside the box
*/
- void drawVerticalBox( QPainter &p, const QRect &box, const QString &str );
+ void drawVerticalBox( TQPainter &p, const TQRect &box, const TQString &str );
/**
Draw a component box with a heading (printed in bold).
- \param p QPainter of the printout
+ \param p TQPainter of the printout
\param box Coordinates of the box
\param caption Caption string to be printed inside the box
\param contents Normal text contents of the box. If contents.isNull(),
@@ -233,20 +233,20 @@ class KDE_EXPORT CalPrintPluginBase : public KOrg::PrintPlugin
the contents, use the return value as the top-value of your
custom contents in that case.
*/
- int drawBoxWithCaption( QPainter &p, const QRect &box, const QString &caption,
- const QString &contents,
- bool sameLine, bool expand, const QFont &captionFont, const QFont &textFont );
+ int drawBoxWithCaption( TQPainter &p, const TQRect &box, const TQString &caption,
+ const TQString &contents,
+ bool sameLine, bool expand, const TQFont &captionFont, const TQFont &textFont );
/**
- Draw the gray header bar of the printout to the QPainter.
+ Draw the gray header bar of the printout to the TQPainter.
It prints the given text and optionally one or two small
- month views, as specified by the two QDate. The printed
+ month views, as specified by the two TQDate. The printed
text can also contain a line feed.
If month2 is invalid, only the month that contains month1
is printed.
E.g. the filofax week view draws just the current month,
while the month view draws the previous and the next month.
- \param p QPainter of the printout
+ \param p TQPainter of the printout
\param title The string printed as the title of the page
(e.g. the date, date range or todo list title)
\param month1 Date specifying the month for the left one of
@@ -264,51 +264,51 @@ class KDE_EXPORT CalPrintPluginBase : public KOrg::PrintPlugin
is box.bottom, otherwise it is larger than box.bottom
and matches the y-coordinate of the surrounding rectangle.
*/
- int drawHeader( QPainter &p, QString title,
- const QDate &month1, const QDate &month2,
- const QRect &box, bool expand = false );
+ int drawHeader( TQPainter &p, TQString title,
+ const TQDate &month1, const TQDate &month2,
+ const TQRect &box, bool expand = false );
/**
Draw a small calendar with the days of a month into the given area.
Used for example in the title bar of the sheet.
- \param p QPainter of the printout
+ \param p TQPainter of the printout
\param qd Arbitrary Date within the month to be printed.
\param box coordinates of the small calendar
*/
- void drawSmallMonth( QPainter &p, const QDate &qd, const QRect &box );
+ void drawSmallMonth( TQPainter &p, const TQDate &qd, const TQRect &box );
/**
Draw a horizontal bar with the weekday names of the given date range
in the given area of the painter.
This is used for the weekday-bar on top of the timetable view and the month view.
- \param p QPainter of the printout
+ \param p TQPainter of the printout
\param fromDate First date of the printed dates
\param toDate Last date of the printed dates
\param box coordinates of the box for the days of the week
*/
- void drawDaysOfWeek( QPainter &p,
- const QDate &fromDate, const QDate &toDate,
- const QRect &box );
+ void drawDaysOfWeek( TQPainter &p,
+ const TQDate &fromDate, const TQDate &toDate,
+ const TQRect &box );
/**
Draw a single weekday name in a box inside the given area of the painter.
This is called in a loop by drawDaysOfWeek.
- \param p QPainter of the printout
+ \param p TQPainter of the printout
\param qd Date of the printed day
\param box coordinates of the weekbox
*/
- void drawDaysOfWeekBox( QPainter &p, const QDate &qd, const QRect &box );
+ void drawDaysOfWeekBox( TQPainter &p, const TQDate &qd, const TQRect &box );
/**
Draw a (vertical) time scale from time fromTime to toTime inside the given area of the painter.
Every hour will have a one-pixel line over the whole width, every
half-hour the line will only span the left half of the width.
This is used in the day and timetable print styles
- \param p QPainter of the printout
+ \param p TQPainter of the printout
\param fromTime Start time of the time range to display
\param toTime End time of the time range to display
\param box coordinates of the timeline
*/
- void drawTimeLine( QPainter &p,
- const QTime &fromTime, const QTime &toTime,
- const QRect &box );
+ void drawTimeLine( TQPainter &p,
+ const TQTime &fromTime, const TQTime &toTime,
+ const TQRect &box );
/**
Draw the all-day box for the agenda print view (the box on top which
@@ -316,7 +316,7 @@ class KDE_EXPORT CalPrintPluginBase : public KOrg::PrintPlugin
height is the cell height of a single cell, and the returned height will
be the total height used for the all-day events. If !expandable, only one
cell will be used, and multiple events are concatenated using ", ".
- \param p QPainter of the printout
+ \param p TQPainter of the printout
\param eventList The list of all-day events that are supposed to be printed
inside this box
\param qd The date of the currently printed day
@@ -328,13 +328,13 @@ class KDE_EXPORT CalPrintPluginBase : public KOrg::PrintPlugin
\param box coordinates of the all day box.
\return The height used for the all-day box.
*/
- int drawAllDayBox( QPainter &p, Event::List &eventList,
- const QDate &qd, bool expandable,
- const QRect &box );
+ int drawAllDayBox( TQPainter &p, Event::List &eventList,
+ const TQDate &qd, bool expandable,
+ const TQRect &box );
/**
Draw the agenda box for the day print style (the box showing all events of that day).
Also draws a grid with half-hour spacing of the grid lines.
- \param p QPainter of the printout
+ \param p TQPainter of the printout
\param eventList The list of the events that are supposed to be printed
inside this box
\param qd The date of the currently printed day
@@ -350,20 +350,20 @@ class KDE_EXPORT CalPrintPluginBase : public KOrg::PrintPlugin
to include all events if expandable==true
\param box coordinates of the agenda day box.
*/
- void drawAgendaDayBox( QPainter &p, Event::List &eventList,
- const QDate &qd, bool expandable,
- QTime &fromTime, QTime &toTime,
- const QRect &box );
+ void drawAgendaDayBox( TQPainter &p, Event::List &eventList,
+ const TQDate &qd, bool expandable,
+ TQTime &fromTime, TQTime &toTime,
+ const TQRect &box );
- void drawAgendaItem( PrintCellItem *item, QPainter &p,
- const QDateTime &startPrintDate,
- const QDateTime &endPrintDate,
- float minlen, const QRect &box );
+ void drawAgendaItem( PrintCellItem *item, TQPainter &p,
+ const TQDateTime &startPrintDate,
+ const TQDateTime &endPrintDate,
+ float minlen, const TQRect &box );
/**
Draw the box containing a list of all events of the given day (with their times,
of course). Used in the Filofax and the month print style.
- \param p QPainter of the printout
+ \param p TQPainter of the printout
\param qd The date of the currently printed day. All events of the calendar
that appear on that day will be printed.
\param box coordinates of the day box.
@@ -372,8 +372,8 @@ class KDE_EXPORT CalPrintPluginBase : public KOrg::PrintPlugin
\param printRecurDaily Whether daily recurring incidences should be printed.
\param printRecurWeekly Whether weekly recurring incidences should be printed.
*/
- void drawDayBox( QPainter &p, const QDate &qd,
- const QRect &box,
+ void drawDayBox( TQPainter &p, const TQDate &qd,
+ const TQRect &box,
bool fullDate = false, bool printRecurDaily = true,
bool printRecurWeekly = true );
/**
@@ -381,12 +381,12 @@ class KDE_EXPORT CalPrintPluginBase : public KOrg::PrintPlugin
three days of the week will be shown in the first column (using drawDayBox),
the remaining four in the second column, where the last two days of the week
(typically Saturday and Sunday) only get half the height of the other day boxes.
- \param p QPainter of the printout
+ \param p TQPainter of the printout
\param qd Arbitrary date within the week to be printed.
\param box coordinates of the week box.
*/
- void drawWeek( QPainter &p, const QDate &qd,
- const QRect &box );
+ void drawWeek( TQPainter &p, const TQDate &qd,
+ const TQRect &box );
/**
Draw the timetable view of the given time range from fromDate to toDate.
On the left side the time scale is printed (using drawTimeLine), then each
@@ -395,16 +395,16 @@ class KDE_EXPORT CalPrintPluginBase : public KOrg::PrintPlugin
The first cell of each column contains the all-day events (using
drawAllDayBox with expandable=false).
The given time range cannot be expanded to include all events.
- \param p QPainter of the printout
+ \param p TQPainter of the printout
\param fromDate First day to be included in the page
\param toDate Last day to be included in the page
\param fromTime Start time of the displayed time range
\param toTime End time of the displayed time range
\param box coordinates of the time table.
*/
- void drawTimeTable( QPainter &p, const QDate &fromDate, const QDate &toDate,
- QTime &fromTime, QTime &toTime,
- const QRect &box );
+ void drawTimeTable( TQPainter &p, const TQDate &fromDate, const TQDate &toDate,
+ TQTime &fromTime, TQTime &toTime,
+ const TQRect &box );
/**
Draw the month table of the month containing the date qd. Each day gets one
@@ -412,20 +412,20 @@ class KDE_EXPORT CalPrintPluginBase : public KOrg::PrintPlugin
in a matrix, with the first column being the first day of the
week (so it might display some days of the previous and the next month).
Above the matrix there is a bar showing the weekdays (drawn using drawDaysOfWeek).
- \param p QPainter of the printout
+ \param p TQPainter of the printout
\param qd Arbitrary date within the month to be printed.
\param recurDaily Whether daily recurring incidences should be printed.
\param recurWeekly Whether weekly recurring incidences should be printed.
\param weeknumbers Whether the week numbers are printed left of each row of the matrix
\param box coordinates of the month.
*/
- void drawMonthTable( QPainter &p, const QDate &qd, bool weeknumbers,
+ void drawMonthTable( TQPainter &p, const TQDate &qd, bool weeknumbers,
bool recurDaily, bool recurWeekly,
- const QRect &box );
+ const TQRect &box );
/**
Draw a vertical representation of the month containing the date dt. Each
day gets one line.
- \param p QPainter of the printout
+ \param p TQPainter of the printout
\param dt Arbitrary date within the month to be printed
\param box coordinates of the box reserved for the month
\param maxdays Days to print. If a value of -1 is given, the number of days
@@ -437,7 +437,7 @@ class KDE_EXPORT CalPrintPluginBase : public KOrg::PrintPlugin
\param holidaysFlags Bitfield consisting of DisplayFlags flags to determine
how holidays should be printed.
*/
- void drawMonth( QPainter &p, const QDate &dt, const QRect &box, int maxdays = -1, int subDailyFlags = TimeBoxes, int holidaysFlags = Text );
+ void drawMonth( TQPainter &p, const TQDate &dt, const TQRect &box, int maxdays = -1, int subDailyFlags = TimeBoxes, int holidaysFlags = Text );
/**
Internal class representing the start of a todo.
@@ -448,7 +448,7 @@ class KDE_EXPORT CalPrintPluginBase : public KOrg::PrintPlugin
Draws single to-do and its (intented) sub-to-dos, optionally connects them by a tree-like line, and optionally shows due date, summary, description and priority.
\param count The number of the currently printed to-do (count will be incremented for each to-do drawn)
\param todo The to-do to be printed. It's sub-to-dos are recursively drawn, so drawTodo should only be called on the to-dos of the highest level.
- \param p QPainter of the printout
+ \param p TQPainter of the printout
\param sortField Specifies on which attribute of the todo you want to sort.
\param sortDir Specifies if you want to sort ascending or descending.
\param connectSubTodos Whether sub-to-dos shall be connected with their parent by a line (tree-like).
@@ -466,7 +466,7 @@ class KDE_EXPORT CalPrintPluginBase : public KOrg::PrintPlugin
\param todoList Contains a list of sub-todos for the specified @p todo .
\param r Internal (used when printing sub-to-dos to give information about its parent)
*/
- void drawTodo( int &count, Todo *todo, QPainter &p,
+ void drawTodo( int &count, Todo *todo, TQPainter &p,
TodoSortField sortField, SortDirection sortDir,
bool connectSubTodos, bool strikeoutCompleted, bool desc,
int posPriority, int posSummary, int posDueDt,
@@ -477,25 +477,25 @@ class KDE_EXPORT CalPrintPluginBase : public KOrg::PrintPlugin
/**
Draws single journal item.
\param journal The item to be printed.
- \param p QPainter of the printout
+ \param p TQPainter of the printout
\param x x-coordinate of the upper left coordinate of the first item
\param y y-coordinate of the upper left coordinate of the first item
\param width width of the whole list
\param pageHeight Total height allowed for the list on a page. If an item
would be below that line, a new page is started.
*/
- void drawJournal( Journal * journal, QPainter &p, int x, int &y,
+ void drawJournal( Journal * journal, TQPainter &p, int x, int &y,
int width, int pageHeight );
- void drawJournalField( QPainter &p, QString field, QString text,
+ void drawJournalField( TQPainter &p, TQString field, TQString text,
int x, int &y, int width, int pageHeight );
- void drawSplitHeaderRight( QPainter &p, const QDate &fd, const QDate &td,
- const QDate &cd, int width, int height );
+ void drawSplitHeaderRight( TQPainter &p, const TQDate &fd, const TQDate &td,
+ const TQDate &cd, int width, int height );
protected:
- void drawIncidence( QPainter &p, const QRect &dayBox, const QString &time,
- const QString &summary, int &textY );
+ void drawIncidence( TQPainter &p, const TQRect &dayBox, const TQString &time,
+ const TQString &summary, int &textY );
protected:
bool mUseColors;
diff --git a/korganizer/printing/cellitem.cpp b/korganizer/printing/cellitem.cpp
index 67e52c58e..73c8aa50b 100644
--- a/korganizer/printing/cellitem.cpp
+++ b/korganizer/printing/cellitem.cpp
@@ -27,26 +27,26 @@
#include <klocale.h>
#include <kdebug.h>
-#include <qintdict.h>
+#include <tqintdict.h>
using namespace KOrg;
-QString CellItem::label() const
+TQString CellItem::label() const
{
return i18n("<undefined>");
}
-QPtrList<CellItem> CellItem::placeItem( QPtrList<CellItem> cells,
+TQPtrList<CellItem> CellItem::placeItem( TQPtrList<CellItem> cells,
CellItem *placeItem )
{
kdDebug(5855) << "Placing " << placeItem->label() << endl;
- QPtrList<KOrg::CellItem> conflictItems;
+ TQPtrList<KOrg::CellItem> conflictItems;
int maxSubCells = 0;
- QIntDict<KOrg::CellItem> subCellDict;
+ TQIntDict<KOrg::CellItem> subCellDict;
// Find all items which are in same cell
- QPtrListIterator<KOrg::CellItem> it2( cells );
+ TQPtrListIterator<KOrg::CellItem> it2( cells );
for( it2.toFirst(); it2.current(); ++it2 ) {
KOrg::CellItem *item = it2.current();
if ( item == placeItem ) continue;
@@ -83,7 +83,7 @@ QPtrList<CellItem> CellItem::placeItem( QPtrList<CellItem> cells,
conflictItems.append( placeItem );
placeItem->setSubCells( maxSubCells );
- QPtrListIterator<KOrg::CellItem> it3( conflictItems );
+ TQPtrListIterator<KOrg::CellItem> it3( conflictItems );
for( it3.toFirst(); it3.current(); ++it3 ) {
(*it3)->setSubCells( maxSubCells );
}
diff --git a/korganizer/printing/cellitem.h b/korganizer/printing/cellitem.h
index fa708147e..83759cc8d 100644
--- a/korganizer/printing/cellitem.h
+++ b/korganizer/printing/cellitem.h
@@ -24,8 +24,8 @@
#ifndef KORG_CELLITEM_H
#define KORG_CELLITEM_H
-#include <qstring.h>
-#include <qptrlist.h>
+#include <tqstring.h>
+#include <tqptrlist.h>
#include <kdepimmacros.h>
@@ -47,7 +47,7 @@ class KDE_EXPORT CellItem
virtual bool overlaps( CellItem *other ) const = 0;
- virtual QString label() const;
+ virtual TQString label() const;
/**
Place item \arg placeItem into stripe containing items \arg cells in a
@@ -55,7 +55,7 @@ class KDE_EXPORT CellItem
\return Placed items
*/
- static QPtrList<CellItem> placeItem( QPtrList<CellItem> cells,
+ static TQPtrList<CellItem> placeItem( TQPtrList<CellItem> cells,
CellItem *placeItem );
private:
diff --git a/korganizer/publishdialog.cpp b/korganizer/publishdialog.cpp
index a6d0881eb..ac684069f 100644
--- a/korganizer/publishdialog.cpp
+++ b/korganizer/publishdialog.cpp
@@ -21,10 +21,10 @@
without including the source code for Qt in the source distribution.
*/
-#include <qlineedit.h>
-#include <qpushbutton.h>
+#include <tqlineedit.h>
+#include <tqpushbutton.h>
#include <kdebug.h>
-#include <qlistview.h>
+#include <tqlistview.h>
#include <kglobal.h>
#include <klocale.h>
@@ -37,7 +37,7 @@
#include "publishdialog.h"
#include "publishdialog_base.h"
-PublishDialog::PublishDialog( QWidget* parent, const char* name,
+PublishDialog::PublishDialog( TQWidget* parent, const char* name,
bool modal )
: KDialogBase( parent, name, modal,
i18n("Select Addresses"), Ok|Cancel|Help, Ok, true )
@@ -46,18 +46,18 @@ PublishDialog::PublishDialog( QWidget* parent, const char* name,
setMainWidget( mWidget );
mWidget->mNameLineEdit->setEnabled( false );
mWidget->mEmailLineEdit->setEnabled( false );
- connect( mWidget->mAddressListView, SIGNAL( selectionChanged(QListViewItem *) ),
- SLOT(updateInput()));
- connect( mWidget->mNew, SIGNAL( clicked() ),
- SLOT( addItem() ) );
- connect( mWidget->mRemove, SIGNAL( clicked() ),
- SLOT( removeItem() ) );
- connect( mWidget->mSelectAddressee, SIGNAL( clicked() ),
- SLOT( openAddressbook() ) );
- connect( mWidget->mNameLineEdit, SIGNAL( textChanged(const QString&) ),
- SLOT( updateItem() ) );
- connect( mWidget->mEmailLineEdit, SIGNAL( textChanged(const QString&) ),
- SLOT( updateItem() ) );
+ connect( mWidget->mAddressListView, TQT_SIGNAL( selectionChanged(TQListViewItem *) ),
+ TQT_SLOT(updateInput()));
+ connect( mWidget->mNew, TQT_SIGNAL( clicked() ),
+ TQT_SLOT( addItem() ) );
+ connect( mWidget->mRemove, TQT_SIGNAL( clicked() ),
+ TQT_SLOT( removeItem() ) );
+ connect( mWidget->mSelectAddressee, TQT_SIGNAL( clicked() ),
+ TQT_SLOT( openAddressbook() ) );
+ connect( mWidget->mNameLineEdit, TQT_SIGNAL( textChanged(const TQString&) ),
+ TQT_SLOT( updateItem() ) );
+ connect( mWidget->mEmailLineEdit, TQT_SIGNAL( textChanged(const TQString&) ),
+ TQT_SLOT( updateItem() ) );
}
PublishDialog::~PublishDialog()
@@ -68,16 +68,16 @@ void PublishDialog::addAttendee( Attendee *attendee )
{
mWidget->mNameLineEdit->setEnabled( true );
mWidget->mEmailLineEdit->setEnabled( true );
- QListViewItem *item = new QListViewItem( mWidget->mAddressListView );
+ TQListViewItem *item = new TQListViewItem( mWidget->mAddressListView );
item->setText( 0, attendee->name() );
item->setText( 1, attendee->email() );
mWidget->mAddressListView->insertItem( item );
}
-QString PublishDialog::addresses()
+TQString PublishDialog::addresses()
{
- QString to = "";
- QListViewItem *item;
+ TQString to = "";
+ TQListViewItem *item;
int i, count;
count = mWidget->mAddressListView->childCount();
for ( i=0; i<count; i++ ) {
@@ -95,7 +95,7 @@ void PublishDialog::addItem()
{
mWidget->mNameLineEdit->setEnabled( true );
mWidget->mEmailLineEdit->setEnabled( true );
- QListViewItem *item = new QListViewItem( mWidget->mAddressListView );
+ TQListViewItem *item = new TQListViewItem( mWidget->mAddressListView );
mWidget->mAddressListView->insertItem( item );
mWidget->mAddressListView->setSelected( item, true );
mWidget->mNameLineEdit->setText( i18n("(EmptyName)") );
@@ -104,7 +104,7 @@ void PublishDialog::addItem()
void PublishDialog::removeItem()
{
- QListViewItem *item;
+ TQListViewItem *item;
item = mWidget->mAddressListView->selectedItem();
if (!item) return;
mWidget->mAddressListView->takeItem( item );
@@ -134,7 +134,7 @@ void PublishDialog::openAddressbook()
a = addressList[i];
mWidget->mNameLineEdit->setEnabled( true );
mWidget->mEmailLineEdit->setEnabled( true );
- QListViewItem *item = new QListViewItem( mWidget->mAddressListView );
+ TQListViewItem *item = new TQListViewItem( mWidget->mAddressListView );
mWidget->mAddressListView->setSelected( item, true );
mWidget->mNameLineEdit->setText( a.realName() );
mWidget->mEmailLineEdit->setText( a.preferredEmail() );
@@ -146,7 +146,7 @@ void PublishDialog::openAddressbook()
void PublishDialog::updateItem()
{
- QListViewItem *item;
+ TQListViewItem *item;
item = mWidget->mAddressListView->selectedItem();
if (!item) return;
item->setText( 0, mWidget->mNameLineEdit->text() );
@@ -155,12 +155,12 @@ void PublishDialog::updateItem()
void PublishDialog::updateInput()
{
- QListViewItem *item;
+ TQListViewItem *item;
item = mWidget->mAddressListView->selectedItem();
if (!item) return;
mWidget->mNameLineEdit->setEnabled( true );
mWidget->mEmailLineEdit->setEnabled( true );
- QString mail = item->text( 1 );
+ TQString mail = item->text( 1 );
mWidget->mNameLineEdit->setText( item->text( 0 ) );
mWidget->mEmailLineEdit->setText( mail );
}
diff --git a/korganizer/publishdialog.h b/korganizer/publishdialog.h
index cbe6fc809..d7f642059 100644
--- a/korganizer/publishdialog.h
+++ b/korganizer/publishdialog.h
@@ -35,12 +35,12 @@ class PublishDialog : public KDialogBase
{
Q_OBJECT
public:
- PublishDialog(QWidget* parent=0,const char* name=0,
+ PublishDialog(TQWidget* parent=0,const char* name=0,
bool modal=true );
~PublishDialog();
void addAttendee(Attendee *attendee);
- QString addresses();
+ TQString addresses();
signals:
void numMessagesChanged(int);
diff --git a/korganizer/resourceview.cpp b/korganizer/resourceview.cpp
index 112a2801b..d4a76f73e 100644
--- a/korganizer/resourceview.cpp
+++ b/korganizer/resourceview.cpp
@@ -38,15 +38,15 @@
#include <kresources/configdialog.h>
#include <libkcal/calendarresources.h>
-#include <qhbox.h>
-#include <qheader.h>
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qpainter.h>
-#include <qpushbutton.h>
-#include <qpopupmenu.h>
-#include <qtooltip.h>
-#include <qwhatsthis.h>
+#include <tqhbox.h>
+#include <tqheader.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqpainter.h>
+#include <tqpushbutton.h>
+#include <tqpopupmenu.h>
+#include <tqtooltip.h>
+#include <tqwhatsthis.h>
#include "koprefs.h"
@@ -58,27 +58,27 @@ ResourceViewFactory::ResourceViewFactory( KCal::CalendarResources *calendar,
{
}
-CalendarViewExtension *ResourceViewFactory::create( QWidget *parent )
+CalendarViewExtension *ResourceViewFactory::create( TQWidget *parent )
{
mResourceView = new ResourceView( mCalendar, parent );
- QObject::connect( mResourceView, SIGNAL( resourcesChanged() ),
- mView, SLOT( resourcesChanged() ) );
- QObject::connect( mResourceView, SIGNAL( resourcesChanged() ),
- mView, SLOT( updateCategories() ) );
+ TQObject::connect( mResourceView, TQT_SIGNAL( resourcesChanged() ),
+ mView, TQT_SLOT( resourcesChanged() ) );
+ TQObject::connect( mResourceView, TQT_SIGNAL( resourcesChanged() ),
+ mView, TQT_SLOT( updateCategories() ) );
- QObject::connect( mCalendar,
- SIGNAL( signalResourceAdded( ResourceCalendar * ) ),
+ TQObject::connect( mCalendar,
+ TQT_SIGNAL( signalResourceAdded( ResourceCalendar * ) ),
mResourceView,
- SLOT( addResourceItem( ResourceCalendar * ) ) );
- QObject::connect( mCalendar,
- SIGNAL( signalResourceModified( ResourceCalendar * ) ),
+ TQT_SLOT( addResourceItem( ResourceCalendar * ) ) );
+ TQObject::connect( mCalendar,
+ TQT_SIGNAL( signalResourceModified( ResourceCalendar * ) ),
mResourceView,
- SLOT( updateResourceItem( ResourceCalendar * ) ) );
- QObject::connect( mCalendar, SIGNAL( signalResourceAdded( ResourceCalendar * ) ),
- mView, SLOT( updateCategories() ) );
- QObject::connect( mCalendar, SIGNAL( signalResourceModified( ResourceCalendar * ) ),
- mView, SLOT( updateCategories() ) );
+ TQT_SLOT( updateResourceItem( ResourceCalendar * ) ) );
+ TQObject::connect( mCalendar, TQT_SIGNAL( signalResourceAdded( ResourceCalendar * ) ),
+ mView, TQT_SLOT( updateCategories() ) );
+ TQObject::connect( mCalendar, TQT_SIGNAL( signalResourceModified( ResourceCalendar * ) ),
+ mView, TQT_SLOT( updateCategories() ) );
return mResourceView;
}
@@ -90,12 +90,12 @@ ResourceView *ResourceViewFactory::resourceView() const
ResourceItem::ResourceItem( ResourceCalendar *resource, ResourceView *view,
KListView *parent )
- : QCheckListItem( parent, resource->resourceName(), CheckBox ),
+ : TQCheckListItem( parent, resource->resourceName(), CheckBox ),
mResource( resource ), mView( view ), mBlockStateChange( false ),
- mIsSubresource( false ), mResourceIdentifier( QString::null ),
+ mIsSubresource( false ), mResourceIdentifier( TQString::null ),
mSubItemsCreated( false ), mIsStandardResource( false )
{
- mResourceColor = QColor();
+ mResourceColor = TQColor();
setGuiState();
if ( mResource->isActive() ) {
@@ -105,16 +105,16 @@ ResourceItem::ResourceItem( ResourceCalendar *resource, ResourceView *view,
void ResourceItem::createSubresourceItems()
{
- const QStringList subresources = mResource->subresources();
+ const TQStringList subresources = mResource->subresources();
if ( !subresources.isEmpty() ) {
setOpen( true );
setExpandable( true );
// This resource has subresources
- QStringList::ConstIterator it;
+ TQStringList::ConstIterator it;
for ( it=subresources.begin(); it!=subresources.end(); ++it ) {
ResourceItem *item = new ResourceItem( mResource, *it, mResource->labelForSubresource( *it ),
mView, this );
- QColor resourceColor = *KOPrefs::instance()->resourceColor( *it );
+ TQColor resourceColor = *KOPrefs::instance()->resourceColor( *it );
item->setResourceColor( resourceColor );
item->update();
}
@@ -123,14 +123,14 @@ void ResourceItem::createSubresourceItems()
}
ResourceItem::ResourceItem( KCal::ResourceCalendar *resource,
- const QString& sub, const QString& label,
+ const TQString& sub, const TQString& label,
ResourceView *view, ResourceItem* parent )
- : QCheckListItem( parent, label, CheckBox ), mResource( resource ),
+ : TQCheckListItem( parent, label, CheckBox ), mResource( resource ),
mView( view ), mBlockStateChange( false ), mIsSubresource( true ),
mSubItemsCreated( false ), mIsStandardResource( false )
{
- mResourceColor = QColor();
+ mResourceColor = TQColor();
mResourceIdentifier = sub;
setGuiState();
}
@@ -178,11 +178,11 @@ void ResourceItem::update()
setGuiState();
}
-void ResourceItem::setResourceColor(QColor& color)
+void ResourceItem::setResourceColor(TQColor& color)
{
if ( color.isValid() ) {
if ( mResourceColor != color ) {
- QPixmap px(height()-4,height()-4);
+ TQPixmap px(height()-4,height()-4);
mResourceColor = color;
px.fill(color);
setPixmap(0,px);
@@ -201,40 +201,40 @@ void ResourceItem::setStandardResource( bool std )
}
}
-void ResourceItem::paintCell(QPainter *p, const QColorGroup &cg,
+void ResourceItem::paintCell(TQPainter *p, const TQColorGroup &cg,
int column, int width, int alignment)
{
- QFont oldFont = p->font();
- QFont newFont = oldFont;
+ TQFont oldFont = p->font();
+ TQFont newFont = oldFont;
newFont.setBold( mIsStandardResource && !mIsSubresource );
p->setFont( newFont );
- QCheckListItem::paintCell( p, cg, column, width, alignment );
+ TQCheckListItem::paintCell( p, cg, column, width, alignment );
p->setFont( oldFont );
-/* QColorGroup _cg = cg;
+/* TQColorGroup _cg = cg;
if(!mResource) return;
- _cg.setColor(QColorGroup::Base, getTextColor(mResourceColor));*/
+ _cg.setColor(TQColorGroup::Base, getTextColor(mResourceColor));*/
}
ResourceView::ResourceView( KCal::CalendarResources *calendar,
- QWidget *parent, const char *name )
+ TQWidget *parent, const char *name )
: CalendarViewExtension( parent, name ), mCalendar( calendar )
{
- QBoxLayout *topLayout = new QVBoxLayout( this, 0, KDialog::spacingHint() );
+ TQBoxLayout *topLayout = new TQVBoxLayout( this, 0, KDialog::spacingHint() );
- QHBoxLayout *buttonBox = new QHBoxLayout();
+ TQHBoxLayout *buttonBox = new TQHBoxLayout();
buttonBox->setSpacing( KDialog::spacingHint() );
topLayout->addLayout( buttonBox );
- QLabel *calLabel = new QLabel( i18n( "Calendar" ), this );
+ TQLabel *calLabel = new TQLabel( i18n( "Calendar" ), this );
buttonBox->addWidget( calLabel );
buttonBox->addStretch( 1 );
- mAddButton = new QPushButton( this, "add" );
+ mAddButton = new TQPushButton( this, "add" );
mAddButton->setIconSet( SmallIconSet( "add" ) );
buttonBox->addWidget( mAddButton );
- QToolTip::add( mAddButton, i18n( "Add calendar" ) );
- QWhatsThis::add( mAddButton,
+ TQToolTip::add( mAddButton, i18n( "Add calendar" ) );
+ TQWhatsThis::add( mAddButton,
i18n( "<qt><p>Press this button to add a resource to "
"KOrganizer.</p>"
"<p>Events, journal entries and to-dos are retrieved "
@@ -245,18 +245,18 @@ ResourceView::ResourceView( KCal::CalendarResources *calendar,
"when creating incidents you will either automatically "
"use the default resource or be prompted "
"to select the resource to use.</p></qt>" ) );
- mEditButton = new QPushButton( this, "edit" );
+ mEditButton = new TQPushButton( this, "edit" );
mEditButton->setIconSet( SmallIconSet( "edit" ) );
buttonBox->addWidget( mEditButton );
- QToolTip::add( mEditButton, i18n( "Edit calendar settings" ) );
- QWhatsThis::add( mEditButton,
+ TQToolTip::add( mEditButton, i18n( "Edit calendar settings" ) );
+ TQWhatsThis::add( mEditButton,
i18n( "Press this button to edit the resource currently "
"selected on the KOrganizer resources list above." ) );
- mDeleteButton = new QPushButton( this, "del" );
+ mDeleteButton = new TQPushButton( this, "del" );
mDeleteButton->setIconSet( SmallIconSet( "remove" ) );
buttonBox->addWidget( mDeleteButton );
- QToolTip::add( mDeleteButton, i18n( "Remove calendar" ) );
- QWhatsThis::add( mDeleteButton,
+ TQToolTip::add( mDeleteButton, i18n( "Remove calendar" ) );
+ TQWhatsThis::add( mDeleteButton,
i18n( "Press this button to delete the resource currently "
"selected on the KOrganizer resources list above." ) );
mDeleteButton->setDisabled( true );
@@ -264,7 +264,7 @@ ResourceView::ResourceView( KCal::CalendarResources *calendar,
mListView = new KListView( this );
mListView->header()->hide();
- QWhatsThis::add( mListView,
+ TQWhatsThis::add( mListView,
i18n( "<qt><p>Select on this list the active KOrganizer "
"resources. Check the resource box to make it "
"active. Press the \"Add...\" button below to add new "
@@ -278,20 +278,20 @@ ResourceView::ResourceView( KCal::CalendarResources *calendar,
"use the default resource or be prompted "
"to select the resource to use.</p></qt>" ) );
mListView->addColumn( i18n("Calendar") );
- mListView->setResizeMode( QListView::LastColumn );
+ mListView->setResizeMode( TQListView::LastColumn );
topLayout->addWidget( mListView );
- connect( mListView, SIGNAL( clicked( QListViewItem * ) ),
- SLOT( currentChanged( QListViewItem * ) ) );
- connect( mAddButton, SIGNAL( clicked() ), SLOT( addResource() ) );
- connect( mDeleteButton, SIGNAL( clicked() ), SLOT( removeResource() ) );
- connect( mEditButton, SIGNAL( clicked() ), SLOT( editResource() ) );
- connect( mListView, SIGNAL( doubleClicked ( QListViewItem *, const QPoint &,
+ connect( mListView, TQT_SIGNAL( clicked( TQListViewItem * ) ),
+ TQT_SLOT( currentChanged( TQListViewItem * ) ) );
+ connect( mAddButton, TQT_SIGNAL( clicked() ), TQT_SLOT( addResource() ) );
+ connect( mDeleteButton, TQT_SIGNAL( clicked() ), TQT_SLOT( removeResource() ) );
+ connect( mEditButton, TQT_SIGNAL( clicked() ), TQT_SLOT( editResource() ) );
+ connect( mListView, TQT_SIGNAL( doubleClicked ( TQListViewItem *, const TQPoint &,
int ) ),
- SLOT( editResource() ) );
- connect( mListView, SIGNAL( contextMenuRequested ( QListViewItem *,
- const QPoint &, int ) ),
- SLOT( contextMenuRequested( QListViewItem *, const QPoint &,
+ TQT_SLOT( editResource() ) );
+ connect( mListView, TQT_SIGNAL( contextMenuRequested ( TQListViewItem *,
+ const TQPoint &, int ) ),
+ TQT_SLOT( contextMenuRequested( TQListViewItem *, const TQPoint &,
int ) ) );
updateView();
@@ -325,12 +325,12 @@ void ResourceView::addResource()
KCal::CalendarResourceManager *manager = mCalendar->resourceManager();
ResourceItem *i = static_cast<ResourceItem*>( mListView->selectedItem() );
if ( i && ( i->isSubresource() || i->resource()->canHaveSubresources() ) ) {
- const QString folderName = KInputDialog::getText( i18n( "Add Subresource" ),
- i18n( "Please enter a name for the new subresource" ), QString::null,
+ const TQString folderName = KInputDialog::getText( i18n( "Add Subresource" ),
+ i18n( "Please enter a name for the new subresource" ), TQString::null,
&ok, this );
if ( !ok )
return;
- const QString parentId = i->isSubresource() ? i->resourceIdentifier() : QString:: null;
+ const TQString parentId = i->isSubresource() ? i->resourceIdentifier() : TQString:: null;
if ( !i->resource()->addSubresource( folderName, parentId ) ) {
KMessageBox::error( this, i18n("<qt>Unable to create subresource <b>%1</b>.</qt>")
.arg( folderName ) );
@@ -338,15 +338,15 @@ void ResourceView::addResource()
return;
}
- QStringList types = manager->resourceTypeNames();
- QStringList descs = manager->resourceTypeDescriptions();
- QString desc = KInputDialog::getItem( i18n( "Resource Configuration" ),
+ TQStringList types = manager->resourceTypeNames();
+ TQStringList descs = manager->resourceTypeDescriptions();
+ 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
ResourceCalendar *resource = manager->createResource( type );
@@ -358,7 +358,7 @@ void ResourceView::addResource()
resource->setResourceName( i18n("%1 resource").arg( type ) );
- KRES::ConfigDialog *dlg = new KRES::ConfigDialog( this, QString("calendar"), resource,
+ KRES::ConfigDialog *dlg = new KRES::ConfigDialog( this, TQString("calendar"), resource,
"KRES::ConfigDialog" );
bool success = true;
@@ -401,26 +401,26 @@ void ResourceView::addResourceItem( ResourceCalendar *resource )
// assign a color, but only if this is a resource that actually
// hold items at top level
if ( !resource->canHaveSubresources() || resource->subresources().isEmpty() ) {
- QColor resourceColor = *KOPrefs::instance()->resourceColor(resource->identifier());
+ TQColor resourceColor = *KOPrefs::instance()->resourceColor(resource->identifier());
item->setResourceColor(resourceColor);
item->update();
}
- connect( resource, SIGNAL( signalSubresourceAdded( ResourceCalendar *,
- const QString &,
- const QString &,
- const QString & ) ),
- SLOT( slotSubresourceAdded( ResourceCalendar *, const QString &,
- const QString &, const QString & ) ) );
+ connect( resource, TQT_SIGNAL( signalSubresourceAdded( ResourceCalendar *,
+ const TQString &,
+ const TQString &,
+ const TQString & ) ),
+ TQT_SLOT( slotSubresourceAdded( ResourceCalendar *, const TQString &,
+ const TQString &, const TQString & ) ) );
- connect( resource, SIGNAL( signalSubresourceRemoved( ResourceCalendar *,
- const QString &,
- const QString & ) ),
- SLOT( slotSubresourceRemoved( ResourceCalendar *, const QString &,
- const QString & ) ) );
+ connect( resource, TQT_SIGNAL( signalSubresourceRemoved( ResourceCalendar *,
+ const TQString &,
+ const TQString & ) ),
+ TQT_SLOT( slotSubresourceRemoved( ResourceCalendar *, const TQString &,
+ const TQString & ) ) );
- connect( resource, SIGNAL( resourceSaved( ResourceCalendar * ) ),
- SLOT( closeResource( ResourceCalendar * ) ) );
+ connect( resource, TQT_SIGNAL( resourceSaved( ResourceCalendar * ) ),
+ TQT_SLOT( closeResource( ResourceCalendar * ) ) );
updateResourceList();
emit resourcesChanged();
@@ -428,11 +428,11 @@ void ResourceView::addResourceItem( ResourceCalendar *resource )
// Add a new entry
void ResourceView::slotSubresourceAdded( ResourceCalendar *calendar,
- const QString& /*type*/,
- const QString& resource,
- const QString& label)
+ const TQString& /*type*/,
+ const TQString& resource,
+ const TQString& label)
{
- QListViewItem *i = mListView->findItem( calendar->resourceName(), 0 );
+ TQListViewItem *i = mListView->findItem( calendar->resourceName(), 0 );
if ( !i )
// Not found
return;
@@ -441,14 +441,14 @@ void ResourceView::slotSubresourceAdded( ResourceCalendar *calendar,
ResourceItem *item = static_cast<ResourceItem *>( i );
ResourceItem *newItem = new ResourceItem( calendar, resource, label, this, item );
- QColor resourceColor = *KOPrefs::instance()->resourceColor( resource );
+ TQColor resourceColor = *KOPrefs::instance()->resourceColor( resource );
newItem->setResourceColor( resourceColor );
}
// Remove an entry
void ResourceView::slotSubresourceRemoved( ResourceCalendar * /*calendar*/,
- const QString &/*type*/,
- const QString &resource )
+ const TQString &/*type*/,
+ const TQString &resource )
{
delete findItemByIdentifier( resource );
emit resourcesChanged();
@@ -472,7 +472,7 @@ void ResourceView::updateResourceItem( ResourceCalendar *resource )
ResourceItem *ResourceView::currentItem()
{
- QListViewItem *item = mListView->currentItem();
+ TQListViewItem *item = mListView->currentItem();
ResourceItem *rItem = static_cast<ResourceItem *>( item );
return rItem;
}
@@ -482,7 +482,7 @@ void ResourceView::removeResource()
ResourceItem *item = currentItem();
if ( !item ) return;
- const QString warningMsg = item->isSubresource() ?
+ const TQString warningMsg = item->isSubresource() ?
i18n("<qt>Do you really want to remove the subresource <b>%1</b>? "
"Note that its contents will be completely deleted. This "
"operation cannot be undone. </qt>").arg( item->text( 0 ) ) :
@@ -524,7 +524,7 @@ void ResourceView::editResource()
if (!item) return;
ResourceCalendar *resource = item->resource();
- KRES::ConfigDialog dlg( this, QString("calendar"), resource,
+ KRES::ConfigDialog dlg( this, TQString("calendar"), resource,
"KRES::ConfigDialog" );
if ( dlg.exec() ) {
@@ -535,7 +535,7 @@ void ResourceView::editResource()
emitResourcesChanged();
}
-void ResourceView::currentChanged( QListViewItem *item )
+void ResourceView::currentChanged( TQListViewItem *item )
{
ResourceItem *i = currentItem();
if ( !item || i->isSubresource() ) {
@@ -549,7 +549,7 @@ void ResourceView::currentChanged( QListViewItem *item )
ResourceItem *ResourceView::findItem( ResourceCalendar *r )
{
- QListViewItem *item;
+ TQListViewItem *item;
ResourceItem *i = 0;
for( item = mListView->firstChild(); item; item = item->nextSibling() ) {
i = static_cast<ResourceItem *>( item );
@@ -558,9 +558,9 @@ ResourceItem *ResourceView::findItem( ResourceCalendar *r )
return i;
}
-ResourceItem *ResourceView::findItemByIdentifier( const QString& id )
+ResourceItem *ResourceView::findItemByIdentifier( const TQString& id )
{
- QListViewItem *item;
+ TQListViewItem *item;
ResourceItem *i = 0;
for( item = mListView->firstChild(); item; item = item->itemBelow() ) {
i = static_cast<ResourceItem *>( item );
@@ -571,44 +571,44 @@ ResourceItem *ResourceView::findItemByIdentifier( const QString& id )
}
-void ResourceView::contextMenuRequested ( QListViewItem *i,
- const QPoint &pos, int )
+void ResourceView::contextMenuRequested ( TQListViewItem *i,
+ const TQPoint &pos, int )
{
KCal::CalendarResourceManager *manager = mCalendar->resourceManager();
ResourceItem *item = static_cast<ResourceItem *>( i );
- QPopupMenu *menu = new QPopupMenu( this );
- connect( menu, SIGNAL( aboutToHide() ), menu, SLOT( deleteLater() ) );
+ TQPopupMenu *menu = new TQPopupMenu( this );
+ connect( menu, TQT_SIGNAL( aboutToHide() ), menu, TQT_SLOT( deleteLater() ) );
if ( item ) {
int reloadId = menu->insertItem( i18n("Re&load"), this,
- SLOT( reloadResource() ) );
+ TQT_SLOT( reloadResource() ) );
menu->setItemEnabled( reloadId, item->resource()->isActive() );
int saveId = menu->insertItem( i18n("&Save"), this,
- SLOT( saveResource() ) );
+ TQT_SLOT( saveResource() ) );
menu->setItemEnabled( saveId, item->resource()->isActive() );
menu->insertSeparator();
- menu->insertItem( i18n("Show &Info"), this, SLOT( showInfo() ) );
+ menu->insertItem( i18n("Show &Info"), this, TQT_SLOT( showInfo() ) );
//FIXME: This is better on the resource dialog
if ( KOPrefs::instance()->agendaViewColors() != KOPrefs::CategoryOnly ) {
- QPopupMenu *assignMenu= new QPopupMenu( menu );
- assignMenu->insertItem( i18n( "&Assign Color" ), this, SLOT( assignColor() ) );
+ TQPopupMenu *assignMenu= new TQPopupMenu( menu );
+ assignMenu->insertItem( i18n( "&Assign Color" ), this, TQT_SLOT( assignColor() ) );
if ( item->resourceColor().isValid() )
- assignMenu->insertItem( i18n( "&Disable Color" ), this, SLOT( disableColor() ) );
+ assignMenu->insertItem( i18n( "&Disable Color" ), this, TQT_SLOT( disableColor() ) );
menu->insertItem( i18n( "Resources Colors" ), assignMenu );
}
- menu->insertItem( i18n("&Edit..."), this, SLOT( editResource() ) );
- menu->insertItem( i18n("&Remove"), this, SLOT( removeResource() ) );
+ menu->insertItem( i18n("&Edit..."), this, TQT_SLOT( editResource() ) );
+ menu->insertItem( i18n("&Remove"), this, TQT_SLOT( removeResource() ) );
if ( item->resource() != manager->standardResource() ) {
menu->insertSeparator();
menu->insertItem( i18n("Use as &Default Calendar"), this,
- SLOT( setStandard() ) );
+ TQT_SLOT( setStandard() ) );
}
menu->insertSeparator();
}
- menu->insertItem( i18n("&Add..."), this, SLOT( addResource() ) );
+ menu->insertItem( i18n("&Add..."), this, TQT_SLOT( addResource() ) );
menu->popup( pos );
}
@@ -619,14 +619,14 @@ void ResourceView::assignColor()
if ( !item )
return;
// A color without initialized is a color invalid
- QColor myColor;
+ TQColor myColor;
KCal::ResourceCalendar *cal = item->resource();
- QString identifier = cal->identifier();
+ TQString identifier = cal->identifier();
if ( item->isSubresource() )
identifier = item->resourceIdentifier();
- QColor defaultColor =*KOPrefs::instance()->resourceColor( identifier );
+ TQColor defaultColor =*KOPrefs::instance()->resourceColor( identifier );
int result = KColorDialog::getColor( myColor,defaultColor);
@@ -643,9 +643,9 @@ void ResourceView::disableColor()
ResourceItem *item = currentItem();
if ( !item )
return;
- QColor colorInvalid;
+ TQColor colorInvalid;
KCal::ResourceCalendar *cal = item->resource();
- QString identifier = cal->identifier();
+ TQString identifier = cal->identifier();
if ( item->isSubresource() )
identifier = item->resourceIdentifier();
KOPrefs::instance()->setResourceColor( identifier, colorInvalid );
@@ -658,7 +658,7 @@ void ResourceView::showInfo()
ResourceItem *item = currentItem();
if ( !item ) return;
- QString txt = "<qt>" + item->resource()->infoText() + "</qt>";
+ TQString txt = "<qt>" + item->resource()->infoText() + "</qt>";
KMessageBox::information( this, txt );
}
@@ -693,7 +693,7 @@ void ResourceView::setStandard()
void ResourceView::updateResourceList()
{
- QListViewItemIterator it( mListView );
+ TQListViewItemIterator it( mListView );
ResourceCalendar* stdRes = mCalendar->resourceManager()->standardResource();
while ( it.current() ) {
ResourceItem *item = static_cast<ResourceItem *>( it.current() );
diff --git a/korganizer/resourceview.h b/korganizer/resourceview.h
index c8c6a6c66..932c81885 100644
--- a/korganizer/resourceview.h
+++ b/korganizer/resourceview.h
@@ -28,7 +28,7 @@
#include "calendarview.h"
#include <libkcal/resourcecalendar.h>
-#include <qlistview.h>
+#include <tqlistview.h>
namespace KCal {
class CalendarResources;
@@ -44,7 +44,7 @@ class ResourceViewFactory : public CalendarViewExtension::Factory
ResourceViewFactory( KCal::CalendarResources *calendar,
CalendarView *view );
- CalendarViewExtension *create( QWidget * );
+ CalendarViewExtension *create( TQWidget * );
ResourceView *resourceView() const;
@@ -60,35 +60,35 @@ class ResourceItem : public QCheckListItem
public:
ResourceItem( KCal::ResourceCalendar *resource, ResourceView *view,
KListView *parent );
- ResourceItem( KCal::ResourceCalendar *resource, const QString& sub,
- const QString& label, ResourceView *view,
+ ResourceItem( KCal::ResourceCalendar *resource, const TQString& sub,
+ const TQString& label, ResourceView *view,
ResourceItem* parent );
KCal::ResourceCalendar *resource() { return mResource; }
- const QString& resourceIdentifier() { return mResourceIdentifier; }
+ const TQString& resourceIdentifier() { return mResourceIdentifier; }
bool isSubresource() const { return mIsSubresource; }
void createSubresourceItems();
void setStandardResource( bool std );
void update();
- virtual void paintCell(QPainter *p, const QColorGroup &cg,
+ virtual void paintCell(TQPainter *p, const TQColorGroup &cg,
int column, int width, int alignment);
- void setResourceColor(QColor& color);
- QColor &resourceColor() {return mResourceColor;}
+ void setResourceColor(TQColor& color);
+ TQColor &resourceColor() {return mResourceColor;}
protected:
void stateChange( bool active );
void setGuiState();
- QColor mResourceColor;
+ TQColor mResourceColor;
private:
KCal::ResourceCalendar *mResource;
ResourceView *mView;
bool mBlockStateChange;
bool mIsSubresource;
- QString mResourceIdentifier;
+ TQString mResourceIdentifier;
bool mSubItemsCreated;
bool mIsStandardResource;
};
@@ -100,7 +100,7 @@ class ResourceView : public CalendarViewExtension
{
Q_OBJECT
public:
- ResourceView( KCal::CalendarResources *calendar, QWidget *parent = 0,
+ ResourceView( KCal::CalendarResources *calendar, TQWidget *parent = 0,
const char *name = 0 );
~ResourceView();
@@ -123,22 +123,22 @@ class ResourceView : public CalendarViewExtension
protected:
ResourceItem *findItem( ResourceCalendar * );
- ResourceItem *findItemByIdentifier( const QString& id );
+ ResourceItem *findItemByIdentifier( const TQString& id );
ResourceItem *currentItem();
protected slots:
void addResource();
void removeResource();
void editResource();
- void currentChanged( QListViewItem* );
- void slotSubresourceAdded( ResourceCalendar *, const QString &,
- const QString &resource,const QString& label );
+ void currentChanged( TQListViewItem* );
+ void slotSubresourceAdded( ResourceCalendar *, const TQString &,
+ const TQString &resource,const TQString& label );
- void slotSubresourceRemoved( ResourceCalendar *, const QString &,
- const QString & );
+ void slotSubresourceRemoved( ResourceCalendar *, const TQString &,
+ const TQString & );
void closeResource( ResourceCalendar * );
- void contextMenuRequested ( QListViewItem *i, const QPoint &pos, int );
+ void contextMenuRequested ( TQListViewItem *i, const TQPoint &pos, int );
void assignColor();
void disableColor();
@@ -153,10 +153,10 @@ class ResourceView : public CalendarViewExtension
private:
KListView *mListView;
KCal::CalendarResources *mCalendar;
- QPushButton *mAddButton;
- QPushButton *mDeleteButton;
- QPushButton *mEditButton;
- QPtrList<ResourceCalendar> mResourcesToClose;
+ TQPushButton *mAddButton;
+ TQPushButton *mDeleteButton;
+ TQPushButton *mEditButton;
+ TQPtrList<ResourceCalendar> mResourcesToClose;
};
#endif
diff --git a/korganizer/searchdialog.cpp b/korganizer/searchdialog.cpp
index 082a6eacc..487296a6d 100644
--- a/korganizer/searchdialog.cpp
+++ b/korganizer/searchdialog.cpp
@@ -24,12 +24,12 @@
without including the source code for Qt in the source distribution.
*/
-#include <qlayout.h>
-#include <qcheckbox.h>
-#include <qgroupbox.h>
-#include <qhbuttongroup.h>
-#include <qlabel.h>
-#include <qlineedit.h>
+#include <tqlayout.h>
+#include <tqcheckbox.h>
+#include <tqgroupbox.h>
+#include <tqhbuttongroup.h>
+#include <tqlabel.h>
+#include <tqlineedit.h>
#include <klocale.h>
#include <kmessagebox.h>
@@ -45,67 +45,67 @@
#include "searchdialog.h"
#include "searchdialog.moc"
-SearchDialog::SearchDialog(Calendar *calendar,QWidget *parent)
+SearchDialog::SearchDialog(Calendar *calendar,TQWidget *parent)
: KDialogBase(Plain,i18n("Find Events"),User1|Close,User1,parent,0,false,false,
KGuiItem( i18n("&Find"), "find") )
{
mCalendar = calendar;
- QFrame *topFrame = plainPage();
- QVBoxLayout *layout = new QVBoxLayout(topFrame,0,spacingHint());
+ TQFrame *topFrame = plainPage();
+ TQVBoxLayout *layout = new TQVBoxLayout(topFrame,0,spacingHint());
// Search expression
- QHBoxLayout *subLayout = new QHBoxLayout();
+ TQHBoxLayout *subLayout = new TQHBoxLayout();
layout->addLayout(subLayout);
- searchEdit = new QLineEdit( "*", topFrame ); // Find all events by default
- searchLabel = new QLabel( searchEdit, i18n("&Search for:"), topFrame );
+ searchEdit = new TQLineEdit( "*", topFrame ); // Find all events by default
+ searchLabel = new TQLabel( searchEdit, i18n("&Search for:"), topFrame );
subLayout->addWidget( searchLabel );
subLayout->addWidget( searchEdit );
searchEdit->setFocus();
- connect( searchEdit, SIGNAL( textChanged( const QString & ) ),
- this, SLOT( searchTextChanged( const QString & ) ) );
+ connect( searchEdit, TQT_SIGNAL( textChanged( const TQString & ) ),
+ this, TQT_SLOT( searchTextChanged( const TQString & ) ) );
- QHButtonGroup *itemsGroup = new QHButtonGroup( i18n("Search For"), topFrame );
+ TQHButtonGroup *itemsGroup = new TQHButtonGroup( i18n("Search For"), topFrame );
layout->addWidget( itemsGroup );
- mEventsCheck = new QCheckBox( i18n("&Events"), itemsGroup );
- mTodosCheck = new QCheckBox( i18n("To-&dos"), itemsGroup );
- mJournalsCheck = new QCheckBox( i18n("&Journal entries"), itemsGroup );
+ mEventsCheck = new TQCheckBox( i18n("&Events"), itemsGroup );
+ mTodosCheck = new TQCheckBox( i18n("To-&dos"), itemsGroup );
+ mJournalsCheck = new TQCheckBox( i18n("&Journal entries"), itemsGroup );
mEventsCheck->setChecked( true );
mTodosCheck->setChecked( true );
// Date range
- QGroupBox *rangeGroup = new QGroupBox( 1, Horizontal, i18n( "Date Range" ),
+ TQGroupBox *rangeGroup = new TQGroupBox( 1, Horizontal, i18n( "Date Range" ),
topFrame );
layout->addWidget( rangeGroup );
- QWidget *rangeWidget = new QWidget( rangeGroup );
- QHBoxLayout *rangeLayout = new QHBoxLayout( rangeWidget, 0, spacingHint() );
+ TQWidget *rangeWidget = new TQWidget( rangeGroup );
+ TQHBoxLayout *rangeLayout = new TQHBoxLayout( rangeWidget, 0, spacingHint() );
mStartDate = new KDateEdit( rangeWidget );
- rangeLayout->addWidget( new QLabel( mStartDate, i18n("Fr&om:"), rangeWidget ) );
+ rangeLayout->addWidget( new TQLabel( mStartDate, i18n("Fr&om:"), rangeWidget ) );
rangeLayout->addWidget( mStartDate );
mEndDate = new KDateEdit( rangeWidget );
- rangeLayout->addWidget( new QLabel( mEndDate, i18n("&To:"), rangeWidget ) );
- mEndDate->setDate( QDate::currentDate().addDays( 365 ) );
+ rangeLayout->addWidget( new TQLabel( mEndDate, i18n("&To:"), rangeWidget ) );
+ mEndDate->setDate( TQDate::currentDate().addDays( 365 ) );
rangeLayout->addWidget( mEndDate );
- mInclusiveCheck = new QCheckBox( i18n("E&vents have to be completely included"),
+ mInclusiveCheck = new TQCheckBox( i18n("E&vents have to be completely included"),
rangeGroup );
mInclusiveCheck->setChecked( false );
- mIncludeUndatedTodos = new QCheckBox( i18n("Include to-dos &without due date"), rangeGroup );
+ mIncludeUndatedTodos = new TQCheckBox( i18n("Include to-dos &without due date"), rangeGroup );
mIncludeUndatedTodos->setChecked( true );
// Subjects to search
- QHButtonGroup *subjectGroup = new QHButtonGroup( i18n("Search In"), topFrame );
+ TQHButtonGroup *subjectGroup = new TQHButtonGroup( i18n("Search In"), topFrame );
layout->addWidget(subjectGroup);
- mSummaryCheck = new QCheckBox( i18n("Su&mmaries"), subjectGroup );
+ mSummaryCheck = new TQCheckBox( i18n("Su&mmaries"), subjectGroup );
mSummaryCheck->setChecked( true );
- mDescriptionCheck = new QCheckBox( i18n("Desc&riptions"), subjectGroup );
- mCategoryCheck = new QCheckBox( i18n("Cate&gories"), subjectGroup );
+ mDescriptionCheck = new TQCheckBox( i18n("Desc&riptions"), subjectGroup );
+ mCategoryCheck = new TQCheckBox( i18n("Cate&gories"), subjectGroup );
// Results list view
@@ -117,29 +117,29 @@ SearchDialog::SearchDialog(Calendar *calendar,QWidget *parent)
KOGlobals::fitDialogToScreen( this, true );
}
- connect( this,SIGNAL(user1Clicked()),SLOT(doSearch()));
+ connect( this,TQT_SIGNAL(user1Clicked()),TQT_SLOT(doSearch()));
// Propagate edit and delete event signals from event list view
- connect( listView, SIGNAL( showIncidenceSignal( Incidence * ) ),
- SIGNAL( showIncidenceSignal( Incidence *) ) );
- connect( listView, SIGNAL( editIncidenceSignal( Incidence * ) ),
- SIGNAL( editIncidenceSignal( Incidence * ) ) );
- connect( listView, SIGNAL( deleteIncidenceSignal( Incidence * ) ),
- SIGNAL( deleteIncidenceSignal( Incidence * ) ) );
+ connect( listView, TQT_SIGNAL( showIncidenceSignal( Incidence * ) ),
+ TQT_SIGNAL( showIncidenceSignal( Incidence *) ) );
+ connect( listView, TQT_SIGNAL( editIncidenceSignal( Incidence * ) ),
+ TQT_SIGNAL( editIncidenceSignal( Incidence * ) ) );
+ connect( listView, TQT_SIGNAL( deleteIncidenceSignal( Incidence * ) ),
+ TQT_SIGNAL( deleteIncidenceSignal( Incidence * ) ) );
}
SearchDialog::~SearchDialog()
{
}
-void SearchDialog::searchTextChanged( const QString &_text )
+void SearchDialog::searchTextChanged( const TQString &_text )
{
enableButton( KDialogBase::User1, !_text.isEmpty() );
}
void SearchDialog::doSearch()
{
- QRegExp re;
+ TQRegExp re;
re.setWildcard( true ); // most people understand these better.
re.setCaseSensitive( false );
@@ -166,7 +166,7 @@ void SearchDialog::doSearch()
void SearchDialog::updateView()
{
- QRegExp re;
+ TQRegExp re;
re.setWildcard( true ); // most people understand these better.
re.setCaseSensitive( false );
re.setPattern( searchEdit->text() );
@@ -179,10 +179,10 @@ void SearchDialog::updateView()
listView->showIncidences( mMatchedEvents );
}
-void SearchDialog::search( const QRegExp &re )
+void SearchDialog::search( const TQRegExp &re )
{
- QDate startDt = mStartDate->date();
- QDate endDt = mEndDate->date();
+ TQDate startDt = mStartDate->date();
+ TQDate endDt = mEndDate->date();
Event::List events;
if (mEventsCheck->isChecked()) {
@@ -204,7 +204,7 @@ void SearchDialog::search( const QRegExp &re )
}
}
} else {
- QDate dt = startDt;
+ TQDate dt = startDt;
while ( dt <= endDt ) {
todos += mCalendar->todos( dt );
dt = dt.addDays( 1 );
@@ -214,7 +214,7 @@ void SearchDialog::search( const QRegExp &re )
Journal::List journals;
if (mJournalsCheck->isChecked()) {
- QDate dt = startDt;
+ TQDate dt = startDt;
while ( dt <= endDt ) {
journals += mCalendar->journals( dt );
dt = dt.addDays( 1 );
diff --git a/korganizer/searchdialog.h b/korganizer/searchdialog.h
index 3876ba212..c8ba4dea8 100644
--- a/korganizer/searchdialog.h
+++ b/korganizer/searchdialog.h
@@ -26,7 +26,7 @@
#ifndef SEARCHDIALOG_H
#define SEARCHDIALOG_H
-#include <qregexp.h>
+#include <tqregexp.h>
#include <kdialogbase.h>
@@ -47,7 +47,7 @@ class SearchDialog : public KDialogBase
{
Q_OBJECT
public:
- SearchDialog(Calendar *calendar,QWidget *parent=0);
+ SearchDialog(Calendar *calendar,TQWidget *parent=0);
virtual ~SearchDialog();
void updateView();
@@ -57,7 +57,7 @@ class SearchDialog : public KDialogBase
protected slots:
void doSearch();
- void searchTextChanged( const QString &_text );
+ void searchTextChanged( const TQString &_text );
signals:
void showIncidenceSignal(Incidence *);
@@ -65,29 +65,29 @@ class SearchDialog : public KDialogBase
void deleteIncidenceSignal(Incidence *);
private:
- void search(const QRegExp &);
+ void search(const TQRegExp &);
Calendar *mCalendar;
Incidence::List mMatchedEvents;
- QLabel *searchLabel;
- QLineEdit *searchEdit;
+ TQLabel *searchLabel;
+ TQLineEdit *searchEdit;
KOListView *listView;
- QCheckBox *mEventsCheck;
- QCheckBox *mTodosCheck;
- QCheckBox *mJournalsCheck;
+ TQCheckBox *mEventsCheck;
+ TQCheckBox *mTodosCheck;
+ TQCheckBox *mJournalsCheck;
KDateEdit *mStartDate;
KDateEdit *mEndDate;
- QCheckBox *mInclusiveCheck;
- QCheckBox *mIncludeUndatedTodos;
+ TQCheckBox *mInclusiveCheck;
+ TQCheckBox *mIncludeUndatedTodos;
- QCheckBox *mSummaryCheck;
- QCheckBox *mDescriptionCheck;
- QCheckBox *mCategoryCheck;
+ TQCheckBox *mSummaryCheck;
+ TQCheckBox *mDescriptionCheck;
+ TQCheckBox *mCategoryCheck;
};
#endif
diff --git a/korganizer/statusdialog.cpp b/korganizer/statusdialog.cpp
index 8422957ba..29eb04ef2 100644
--- a/korganizer/statusdialog.cpp
+++ b/korganizer/statusdialog.cpp
@@ -22,10 +22,10 @@
without including the source code for Qt in the source distribution.
*/
-#include <qlabel.h>
-#include <qstringlist.h>
-#include <qlayout.h>
-#include <qcombobox.h>
+#include <tqlabel.h>
+#include <tqstringlist.h>
+#include <tqlayout.h>
+#include <tqcombobox.h>
#include <kdebug.h>
#include <klocale.h>
@@ -35,32 +35,32 @@
#include "statusdialog.h"
#include "statusdialog.moc"
-StatusDialog::StatusDialog(QWidget* parent, const char* name) :
+StatusDialog::StatusDialog(TQWidget* parent, const char* name) :
KDialog(parent,name,true)
{
setCaption(i18n("Set Your Status"));
- QBoxLayout *topLayout = new QVBoxLayout( this );
+ TQBoxLayout *topLayout = new TQVBoxLayout( this );
topLayout->setSpacing( spacingHint() );
topLayout->setMargin( marginHint() );
- QBoxLayout *statusLayout = new QHBoxLayout( topLayout );
+ TQBoxLayout *statusLayout = new TQHBoxLayout( topLayout );
- QLabel *text = new QLabel(i18n("Set your status"),this);
+ TQLabel *text = new TQLabel(i18n("Set your status"),this);
statusLayout->addWidget( text );
- mStatus = new QComboBox(false,this);
+ mStatus = new TQComboBox(false,this);
mStatus->insertStringList(Attendee::statusList());
statusLayout->addWidget( mStatus );
- QBoxLayout *buttonLayout = new QHBoxLayout( topLayout );
+ TQBoxLayout *buttonLayout = new TQHBoxLayout( topLayout );
- QPushButton *ok = new KPushButton(KStdGuiItem::ok(), this);
- connect ( ok,SIGNAL(clicked()), this,SLOT(accept()) );
+ TQPushButton *ok = new KPushButton(KStdGuiItem::ok(), this);
+ connect ( ok,TQT_SIGNAL(clicked()), this,TQT_SLOT(accept()) );
buttonLayout->addWidget( ok );
- QPushButton *cancel = new KPushButton(KStdGuiItem::cancel(), this);
- connect ( cancel,SIGNAL(clicked()), this,SLOT(reject()) );
+ TQPushButton *cancel = new KPushButton(KStdGuiItem::cancel(), this);
+ connect ( cancel,TQT_SIGNAL(clicked()), this,TQT_SLOT(reject()) );
buttonLayout->addWidget( cancel );
}
diff --git a/korganizer/statusdialog.h b/korganizer/statusdialog.h
index 66a9d364d..e0bcb4478 100644
--- a/korganizer/statusdialog.h
+++ b/korganizer/statusdialog.h
@@ -30,13 +30,13 @@ class StatusDialog : public KDialog
{
Q_OBJECT
public:
- StatusDialog(QWidget* parent=0,const char* name=0);
+ StatusDialog(TQWidget* parent=0,const char* name=0);
~StatusDialog();
Attendee::PartStat status();
private:
- QComboBox *mStatus;
+ TQComboBox *mStatus;
};
#endif
diff --git a/korganizer/stdcalendar.cpp b/korganizer/stdcalendar.cpp
index 55b47d56e..83285e183 100644
--- a/korganizer/stdcalendar.cpp
+++ b/korganizer/stdcalendar.cpp
@@ -53,10 +53,10 @@ StdCalendar::StdCalendar()
if ( manager->isEmpty() ) {
KConfig config( "korganizerrc" );
config.setGroup( "General" );
- QString fileName = config.readPathEntry( "Active Calendar" );
+ TQString fileName = config.readPathEntry( "Active Calendar" );
- QString resourceName;
- QString resoruceType;
+ TQString resourceName;
+ TQString resoruceType;
KCal::ResourceCalendar *defaultResource = 0;
if ( !fileName.isEmpty() ) {
KURL url( fileName );
diff --git a/korganizer/templatemanagementdialog.cpp b/korganizer/templatemanagementdialog.cpp
index 5d31f7fb1..18c82214d 100644
--- a/korganizer/templatemanagementdialog.cpp
+++ b/korganizer/templatemanagementdialog.cpp
@@ -37,30 +37,30 @@
*******************************************************************************/
#include "templatemanagementdialog.h"
-#include <qstringlist.h>
-#include <qtimer.h>
+#include <tqstringlist.h>
+#include <tqtimer.h>
#include <kpushbutton.h>
#include <kinputdialog.h>
#include <klocale.h>
#include <kmessagebox.h>
-TemplateManagementDialog::TemplateManagementDialog(QWidget *parent, const QStringList &templates )
+TemplateManagementDialog::TemplateManagementDialog(TQWidget *parent, const TQStringList &templates )
:KDialogBase( parent, "template_management_dialog", true,
i18n("Manage Templates"), Ok|Cancel, Ok, true , i18n("Apply Template")),
- m_templates( templates ), m_newTemplate( QString::null ), m_changed( false )
+ m_templates( templates ), m_newTemplate( TQString::null ), m_changed( false )
{
m_base = new TemplateManagementDialog_base( this, "template_management_dialog_base" );
setMainWidget( m_base );
- connect( m_base->m_buttonAdd, SIGNAL( clicked() ),
- SLOT( slotAddTemplate() ) );
- connect( m_base->m_buttonDelete, SIGNAL( clicked() ),
- SLOT( slotDeleteTemplate() ) );
+ connect( m_base->m_buttonAdd, TQT_SIGNAL( clicked() ),
+ TQT_SLOT( slotAddTemplate() ) );
+ connect( m_base->m_buttonDelete, TQT_SIGNAL( clicked() ),
+ TQT_SLOT( slotDeleteTemplate() ) );
m_base->m_listBox->insertStringList( m_templates );
- connect( m_base->m_listBox, SIGNAL( selectionChanged( QListBoxItem * ) ),
- SLOT( slotUpdateDeleteButton( QListBoxItem * ) ) );
- connect( m_base->m_buttonApply, SIGNAL( clicked() ),
- SLOT( slotApplyTemplate() ) );
+ connect( m_base->m_listBox, TQT_SIGNAL( selectionChanged( TQListBoxItem * ) ),
+ TQT_SLOT( slotUpdateDeleteButton( TQListBoxItem * ) ) );
+ connect( m_base->m_buttonApply, TQT_SIGNAL( clicked() ),
+ TQT_SLOT( slotApplyTemplate() ) );
}
@@ -68,14 +68,14 @@ void TemplateManagementDialog::slotAddTemplate()
{
bool ok;
bool duplicate = false;
- const QString newTemplate = KInputDialog::getText( i18n("Template Name"),
+ const TQString newTemplate = KInputDialog::getText( i18n("Template Name"),
i18n("Please enter a name for the new template:"),
i18n("New Template"), &ok );
if ( newTemplate.isEmpty() || !ok ) return;
if ( m_templates.find( newTemplate) != m_templates.end() ) {
int rc = KMessageBox::warningContinueCancel( this, i18n("A template with that name already exists, do you want to overwrite it?."), i18n("Duplicate Template Name"), i18n("Overwrite"));
if ( rc == KMessageBox::Cancel ) {
- QTimer::singleShot(0, this, SLOT( slotAddTemplate() ) );
+ TQTimer::singleShot(0, this, TQT_SLOT( slotAddTemplate() ) );
return;
}
duplicate = true;
@@ -96,7 +96,7 @@ void TemplateManagementDialog::slotAddTemplate()
void TemplateManagementDialog::slotDeleteTemplate()
{
- QListBoxItem *const item = m_base->m_listBox->selectedItem();
+ TQListBoxItem *const item = m_base->m_listBox->selectedItem();
if ( !item ) return; // can't happen (TM)
unsigned int current = m_base->m_listBox->index(item);
m_templates.remove( item->text() );
@@ -105,7 +105,7 @@ void TemplateManagementDialog::slotDeleteTemplate()
m_base->m_listBox->setSelected(QMAX(current -1, 0), true);
}
-void TemplateManagementDialog::slotUpdateDeleteButton( QListBoxItem *item )
+void TemplateManagementDialog::slotUpdateDeleteButton( TQListBoxItem *item )
{
m_base->m_buttonDelete->setEnabled( item != 0 );
}
@@ -114,7 +114,7 @@ void TemplateManagementDialog::slotApplyTemplate()
{
// Once the user has applied the current template to the event, it makes no sense to add it again
m_base->m_buttonAdd->setEnabled( false );
- const QString &cur = m_base->m_listBox->currentText();
+ const TQString &cur = m_base->m_listBox->currentText();
if ( !cur.isEmpty() && cur != m_newTemplate )
emit loadTemplate( cur );
}
diff --git a/korganizer/templatemanagementdialog.h b/korganizer/templatemanagementdialog.h
index 5e0a4a616..fbc4c5125 100644
--- a/korganizer/templatemanagementdialog.h
+++ b/korganizer/templatemanagementdialog.h
@@ -38,7 +38,7 @@
#ifndef TEMPLATEMANAGEMENTDIALOG_H
#define TEMPLATEMANAGEMENTDIALOG_H
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include "template_management_dialog_base.h"
@@ -47,30 +47,30 @@
class TemplateManagementDialog: public KDialogBase {
Q_OBJECT
public:
- TemplateManagementDialog( QWidget *parent, const QStringList& templates );
+ TemplateManagementDialog( TQWidget *parent, const TQStringList& templates );
signals:
/* Emitted whenever the user hits apply, indicating that the currently selected template
should be loaded into to the incidence editor which triggered this. */
- void loadTemplate( const QString& templateName );
+ void loadTemplate( const TQString& templateName );
/* Emitted whenever the user wants to add teh current incidence as a template
with the given name. */
- void saveTemplate( const QString& templateName );
+ void saveTemplate( const TQString& templateName );
/* Emitted when the dialog changed the list of templates. Calling code can the replace
the list that was handed in with the one this signal transports. */
- void templatesChanged( const QStringList& templates );
+ void templatesChanged( const TQStringList& templates );
protected slots:
void slotAddTemplate();
void slotDeleteTemplate();
void slotApplyTemplate();
- void slotUpdateDeleteButton( QListBoxItem *item );
+ void slotUpdateDeleteButton( TQListBoxItem *item );
void slotOk();
private:
TemplateManagementDialog_base *m_base;
- QStringList m_templates;
- QString m_newTemplate;
+ TQStringList m_templates;
+ TQString m_newTemplate;
bool m_changed;
};
diff --git a/korganizer/timelabels.cpp b/korganizer/timelabels.cpp
index ab5967055..0c4956bd4 100644
--- a/korganizer/timelabels.cpp
+++ b/korganizer/timelabels.cpp
@@ -24,16 +24,16 @@
#include "timelabels.h"
-#include <qhbox.h>
-#include <qvbox.h>
-#include <qlabel.h>
-#include <qframe.h>
-#include <qlayout.h>
-#include <qfont.h>
-#include <qfontmetrics.h>
-#include <qpainter.h>
-#include <qstringlist.h>
-#include <qdatetime.h>
+#include <tqhbox.h>
+#include <tqvbox.h>
+#include <tqlabel.h>
+#include <tqframe.h>
+#include <tqlayout.h>
+#include <tqfont.h>
+#include <tqfontmetrics.h>
+#include <tqpainter.h>
+#include <tqstringlist.h>
+#include <tqdatetime.h>
#include <kglobal.h>
@@ -42,8 +42,8 @@
#include "koprefs.h"
#include "koagenda.h"
-TimeLabels::TimeLabels(int rows,QWidget *parent,const char *name,WFlags f) :
- QScrollView(parent,name,f)
+TimeLabels::TimeLabels(int rows,TQWidget *parent,const char *name,WFlags f) :
+ TQScrollView(parent,name,f)
{
mRows = rows;
mMiniWidth = 0;
@@ -59,7 +59,7 @@ TimeLabels::TimeLabels(int rows,QWidget *parent,const char *name,WFlags f) :
viewport()->setBackgroundMode( PaletteBackground );
- mMousePos = new QFrame(this);
+ mMousePos = new TQFrame(this);
mMousePos->setLineWidth(0);
mMousePos->setMargin(0);
mMousePos->setBackgroundColor(Qt::red);
@@ -67,7 +67,7 @@ TimeLabels::TimeLabels(int rows,QWidget *parent,const char *name,WFlags f) :
addChild(mMousePos, 0, 0);
}
-void TimeLabels::mousePosChanged(const QPoint &pos)
+void TimeLabels::mousePosChanged(const TQPoint &pos)
{
moveChild(mMousePos, 0, pos.y());
}
@@ -91,7 +91,7 @@ void TimeLabels::setCellHeight(double height)
Optimization so that only the "dirty" portion of the scroll view
is redrawn. Unfortunately, this is not called by default paintEvent() method.
*/
-void TimeLabels::drawContents(QPainter *p,int cx, int cy, int cw, int ch)
+void TimeLabels::drawContents(TQPainter *p,int cx, int cy, int cw, int ch)
{
// bug: the parameters cx and cw are the areas that need to be
// redrawn, not the area of the widget. unfortunately, this
@@ -104,11 +104,11 @@ void TimeLabels::drawContents(QPainter *p,int cx, int cy, int cw, int ch)
int cell = ((int)(cy/mCellHeight));
double y = cell * mCellHeight;
- QFontMetrics fm = fontMetrics();
- QString hour;
- QString suffix = "am";
+ TQFontMetrics fm = fontMetrics();
+ TQString hour;
+ TQString suffix = "am";
int timeHeight = fm.ascent();
- QFont nFont = font();
+ TQFont nFont = font();
p->setFont( font() );
if (!KGlobal::locale()->use12Clock()) {
@@ -121,18 +121,18 @@ void TimeLabels::drawContents(QPainter *p,int cx, int cy, int cw, int ch)
int pointS = nFont.pointSize();
while ( pointS > 4 ) {
nFont.setPointSize( pointS );
- fm = QFontMetrics( nFont );
+ fm = TQFontMetrics( nFont );
if ( fm.ascent() < mCellHeight )
break;
-- pointS;
}
- fm = QFontMetrics( nFont );
+ fm = TQFontMetrics( nFont );
timeHeight = fm.ascent();
}
//timeHeight -= (timeHeight/4-2);
- QFont sFont = nFont;
+ TQFont sFont = nFont;
sFont.setPointSize( sFont.pointSize()/2 );
- QFontMetrics fmS( sFont );
+ TQFontMetrics fmS( sFont );
int startW = mMiniWidth - frameWidth()-2 ;
int tw2 = fmS.width(suffix);
int divTimeHeight = (timeHeight-1) /2 - 1;
@@ -183,7 +183,7 @@ void TimeLabels::updateConfig()
setFont(KOPrefs::instance()->mTimeBarFont);
- QString test = "20";
+ TQString test = "20";
if ( KGlobal::locale()->use12Clock() )
test = "12";
mMiniWidth = fontMetrics().width( test );
@@ -192,9 +192,9 @@ void TimeLabels::updateConfig()
else {
test = "00";
}
- QFont sFont = font();
+ TQFont sFont = font();
sFont.setPointSize( sFont.pointSize()/2 );
- QFontMetrics fmS( sFont );
+ TQFontMetrics fmS( sFont );
mMiniWidth += fmS.width( test ) + frameWidth()*2+4 ;
// update geometry restrictions based on new settings
setFixedWidth( mMiniWidth );
@@ -226,20 +226,20 @@ void TimeLabels::setAgenda(KOAgenda* agenda)
{
mAgenda = agenda;
- connect(mAgenda, SIGNAL(mousePosSignal(const QPoint &)), this, SLOT(mousePosChanged(const QPoint &)));
- connect(mAgenda, SIGNAL(enterAgenda()), this, SLOT(showMousePos()));
- connect(mAgenda, SIGNAL(leaveAgenda()), this, SLOT(hideMousePos()));
- connect(mAgenda, SIGNAL(gridSpacingYChanged( double ) ), this, SLOT( setCellHeight( double ) ) );
+ connect(mAgenda, TQT_SIGNAL(mousePosSignal(const TQPoint &)), this, TQT_SLOT(mousePosChanged(const TQPoint &)));
+ connect(mAgenda, TQT_SIGNAL(enterAgenda()), this, TQT_SLOT(showMousePos()));
+ connect(mAgenda, TQT_SIGNAL(leaveAgenda()), this, TQT_SLOT(hideMousePos()));
+ connect(mAgenda, TQT_SIGNAL(gridSpacingYChanged( double ) ), this, TQT_SLOT( setCellHeight( double ) ) );
}
/** This is called in response to repaint() */
-void TimeLabels::paintEvent(QPaintEvent*)
+void TimeLabels::paintEvent(TQPaintEvent*)
{
// kdDebug(5850) << "paintevent..." << endl;
// this is another hack!
-// QPainter painter(this);
- //QString c
+// TQPainter painter(this);
+ //TQString c
repaintContents(contentsX(), contentsY(), visibleWidth(), visibleHeight());
}
diff --git a/korganizer/timelabels.h b/korganizer/timelabels.h
index fe0a1aeb0..84ea5473b 100644
--- a/korganizer/timelabels.h
+++ b/korganizer/timelabels.h
@@ -25,8 +25,8 @@
#ifndef TIMELABELS_H
#define TIMELABELS_H
-#include <qscrollview.h>
-#include <qlabel.h>
+#include <tqscrollview.h>
+#include <tqlabel.h>
class QHBox;
class QPushButton;
@@ -40,7 +40,7 @@ class TimeLabels : public QScrollView
{
Q_OBJECT
public:
- TimeLabels( int rows, QWidget *parent = 0, const char *name = 0,
+ TimeLabels( int rows, TQWidget *parent = 0, const char *name = 0,
WFlags f = 0 );
/** Calculates the minimum width */
@@ -53,7 +53,7 @@ class TimeLabels : public QScrollView
void setAgenda( KOAgenda *agenda );
/** */
- virtual void paintEvent( QPaintEvent *e );
+ virtual void paintEvent( TQPaintEvent *e );
public slots:
/** update time label positions */
@@ -61,11 +61,11 @@ class TimeLabels : public QScrollView
void positionChanged( int pos );
protected:
- void drawContents( QPainter *p, int cx, int cy, int cw, int ch );
+ void drawContents( TQPainter *p, int cx, int cy, int cw, int ch );
private slots:
/** update the position of the marker showing the mouse position */
- void mousePosChanged(const QPoint &pos);
+ void mousePosChanged(const TQPoint &pos);
void showMousePos();
void hideMousePos();
@@ -78,7 +78,7 @@ class TimeLabels : public QScrollView
int mMiniWidth;
KOAgenda* mAgenda;
- QFrame *mMousePos; // shows a marker for the current mouse position in y direction
+ TQFrame *mMousePos; // shows a marker for the current mouse position in y direction
};
#endif
diff --git a/korganizer/timelineitem.cpp b/korganizer/timelineitem.cpp
index ed057de9d..7240e06d0 100644
--- a/korganizer/timelineitem.cpp
+++ b/korganizer/timelineitem.cpp
@@ -31,7 +31,7 @@
using namespace KOrg;
using namespace KCal;
-TimelineItem::TimelineItem( const QString &label, KDGanttView * parent) :
+TimelineItem::TimelineItem( const TQString &label, KDGanttView * parent) :
KDGanttViewTaskItem( parent )
{
setListViewText( 0, label );
@@ -40,9 +40,9 @@ TimelineItem::TimelineItem( const QString &label, KDGanttView * parent) :
listView()->setRootIsDecorated( false );
}
-void TimelineItem::insertIncidence(KCal::Incidence * incidence, const QDateTime & _start, const QDateTime & _end)
+void TimelineItem::insertIncidence(KCal::Incidence * incidence, const TQDateTime & _start, const TQDateTime & _end)
{
- QDateTime start = incidence->dtStart(), end = incidence->dtEnd();
+ TQDateTime start = incidence->dtStart(), end = incidence->dtEnd();
if ( _start.isValid() )
start = _start;
if ( _end.isValid() )
@@ -50,14 +50,14 @@ void TimelineItem::insertIncidence(KCal::Incidence * incidence, const QDateTime
if ( incidence->doesFloat() )
end = end.addDays( 1 );
- typedef QValueList<TimelineSubItem*> ItemList;
+ typedef TQValueList<TimelineSubItem*> ItemList;
ItemList list = mItemMap[incidence];
for ( ItemList::ConstIterator it = list.constBegin(); it != list.constEnd(); ++it )
if ( (*it)->startTime() == start && (*it)->endTime() == end )
return;
TimelineSubItem * item = new TimelineSubItem( incidence, this );
- QColor c1, c2, c3;
+ TQColor c1, c2, c3;
colors( c1, c2, c3 );
item->setColors( c1, c2, c3 );
@@ -70,7 +70,7 @@ void TimelineItem::insertIncidence(KCal::Incidence * incidence, const QDateTime
void TimelineItem::removeIncidence(KCal::Incidence * incidence)
{
- typedef QValueList<TimelineSubItem*> ItemList;
+ typedef TQValueList<TimelineSubItem*> ItemList;
ItemList list = mItemMap[incidence];
for ( ItemList::ConstIterator it = list.constBegin(); it != list.constEnd(); ++it )
delete *it;
@@ -79,10 +79,10 @@ void TimelineItem::removeIncidence(KCal::Incidence * incidence)
void TimelineItem::moveItems(KCal::Incidence * incidence, int delta, int duration)
{
- typedef QValueList<TimelineSubItem*> ItemList;
+ typedef TQValueList<TimelineSubItem*> ItemList;
ItemList list = mItemMap[incidence];
for ( ItemList::ConstIterator it = list.constBegin(); it != list.constEnd(); ++it ) {
- QDateTime start = (*it)->originalStart();
+ TQDateTime start = (*it)->originalStart();
start = start.addSecs( delta );
(*it)->setStartTime( start );
(*it)->setOriginalStart( start );
@@ -128,7 +128,7 @@ void TimelineSubItem::showItem(bool show, int coordY)
mLeft = new KDCanvasPolygon( myGanttView->timeTableWidget(), this, Type_is_KDGanttViewItem );
mLeft->setBrush( Qt::black );
}
- QPointArray a = QPointArray( 4 );
+ TQPointArray a = TQPointArray( 4 );
a.setPoint( 0, 0, -mw -myItemSize/2 - 2 );
a.setPoint( 1, mw, -myItemSize/2 - 2 );
a.setPoint( 2, mw, myItemSize/2 + 2 );
@@ -140,7 +140,7 @@ void TimelineSubItem::showItem(bool show, int coordY)
mRight = new KDCanvasPolygon( myGanttView->timeTableWidget(), this, Type_is_KDGanttViewItem );
mRight->setBrush( Qt::black );
}
- QPointArray a = QPointArray( 4 );
+ TQPointArray a = TQPointArray( 4 );
a.setPoint( 0, -mw, -myItemSize/2 - 2 );
a.setPoint( 1, 0, -myItemSize/2 - mw - 2 );
a.setPoint( 2, 0, myItemSize/2 + mw + 2 );
diff --git a/korganizer/timelineitem.h b/korganizer/timelineitem.h
index c4f35af24..2ff3b2e06 100644
--- a/korganizer/timelineitem.h
+++ b/korganizer/timelineitem.h
@@ -23,8 +23,8 @@
#include <kdgantt/KDGanttViewTaskItem.h>
#undef protected
-#include <qmap.h>
-#include <qvaluelist.h>
+#include <tqmap.h>
+#include <tqvaluelist.h>
class KDGanttView;
class KDCanvasPolygon;
@@ -42,17 +42,17 @@ class TimelineSubItem;
class TimelineItem : public KDGanttViewTaskItem
{
public:
- TimelineItem( const QString &label, KDGanttView* parent );
+ TimelineItem( const TQString &label, KDGanttView* parent );
void insertIncidence( KCal::Incidence *incidence,
- const QDateTime &start = QDateTime(),
- const QDateTime &end = QDateTime() );
+ const TQDateTime &start = TQDateTime(),
+ const TQDateTime &end = TQDateTime() );
void removeIncidence( KCal::Incidence *incidence );
void moveItems( KCal::Incidence* incidence, int delta, int duration );
private:
- QMap<KCal::Incidence*, QValueList<TimelineSubItem*> > mItemMap;
+ TQMap<KCal::Incidence*, TQValueList<TimelineSubItem*> > mItemMap;
};
class TimelineSubItem : public KDGanttViewTaskItem
@@ -63,15 +63,15 @@ class TimelineSubItem : public KDGanttViewTaskItem
KCal::Incidence* incidence() const { return mIncidence; }
- QDateTime originalStart() const { return mStart; }
- void setOriginalStart( const QDateTime &dt ) { mStart = dt; }
+ TQDateTime originalStart() const { return mStart; }
+ void setOriginalStart( const TQDateTime &dt ) { mStart = dt; }
private:
void showItem( bool show = true, int coordY = 0 );
private:
KCal::Incidence *mIncidence;
- QDateTime mStart;
+ TQDateTime mStart;
KDCanvasPolygon *mLeft, *mRight;
int mMarkerWidth;
};
diff --git a/korganizer/timezone.cpp b/korganizer/timezone.cpp
index 8fdfcae21..d95ae3cf6 100644
--- a/korganizer/timezone.cpp
+++ b/korganizer/timezone.cpp
@@ -23,7 +23,7 @@
*/
#include <time.h>
-#include <qdatetime.h>
+#include <tqdatetime.h>
#include <kaboutdata.h>
#include <kapplication.h>
@@ -53,9 +53,9 @@ int main(int argc,char **argv)
kdDebug(5850) << "tzname: " << tzname[0] << " " << tzname[1] << endl;
kdDebug(5850) << "timezone: " << timezone/3600 << endl;
- QTime qtime = QTime::currentTime();
+ TQTime qtime = TQTime::currentTime();
- kdDebug(5850) << "QDateTime::currentTime(): "
+ kdDebug(5850) << "TQDateTime::currentTime(): "
<< qtime.toString( Qt::ISODate ) << endl;
kdDebug(5850) << "KLocale::formatTime(): "
diff --git a/korganizer/urihandler.cpp b/korganizer/urihandler.cpp
index 6bbd45d2f..4b7c7bdff 100644
--- a/korganizer/urihandler.cpp
+++ b/korganizer/urihandler.cpp
@@ -35,7 +35,7 @@
#include <kprocess.h>
#include <kdebug.h>
-bool UriHandler::process( const QString &uri )
+bool UriHandler::process( const TQString &uri )
{
kdDebug(5850) << "UriHandler::process(): " << uri << endl;
@@ -47,21 +47,21 @@ bool UriHandler::process( const QString &uri )
// parse string, show
int colon = uri.find( ':' );
// extract 'number' from 'kmail:<number>/<id>'
- QString serialNumberStr = uri.mid( colon + 1 );
+ TQString serialNumberStr = uri.mid( colon + 1 );
serialNumberStr = serialNumberStr.left( serialNumberStr.find( '/' ) );
KMailIface_stub kmailIface( "kmail", "KMailIface" );
- kmailIface.showMail( serialNumberStr.toUInt(), QString() );
+ kmailIface.showMail( serialNumberStr.toUInt(), TQString() );
return true;
} else if ( uri.startsWith( "mailto:" ) ) {
- KApplication::kApplication()->invokeMailer( uri.mid(7), QString::null );
+ KApplication::kApplication()->invokeMailer( uri.mid(7), TQString::null );
return true;
} else if ( uri.startsWith( "uid:" ) ) {
DCOPClient *client = KApplication::kApplication()->dcopClient();
- const QByteArray noParamData;
- const QByteArray paramData;
- QByteArray replyData;
- QCString replyTypeStr;
+ const TQByteArray noParamData;
+ const TQByteArray paramData;
+ TQByteArray replyData;
+ TQCString replyTypeStr;
bool foundAbbrowser = client->call( "kaddressbook", "KAddressBookIface",
"interfaces()", noParamData,
replyTypeStr, replyData );
@@ -78,8 +78,8 @@ bool UriHandler::process( const QString &uri )
KaddressBook is not already running. Pass it the UID of the contact via the command line while starting it - its neater.
We start it without its main interface
*/
- QString iconPath = KGlobal::iconLoader()->iconPath( "go", KIcon::Small );
- QString tmpStr = "kaddressbook --editor-only --uid ";
+ TQString iconPath = KGlobal::iconLoader()->iconPath( "go", KIcon::Small );
+ TQString tmpStr = "kaddressbook --editor-only --uid ";
tmpStr += KProcess::quote( uri.mid( 6 ) );
KRun::runCommand( tmpStr, "KAddressBook", iconPath );
return true;
diff --git a/korganizer/urihandler.h b/korganizer/urihandler.h
index 7b3d22375..915b28578 100644
--- a/korganizer/urihandler.h
+++ b/korganizer/urihandler.h
@@ -24,7 +24,7 @@
#ifndef URIHANDLER_H
#define URIHANDLER_H
-#include <qstring.h>
+#include <tqstring.h>
#include <kdepimmacros.h>
class KDE_EXPORT UriHandler
@@ -33,7 +33,7 @@ class KDE_EXPORT UriHandler
/**
Process URI. Return true if handler handled the URI, otherwise false.
*/
- static bool process( const QString &uri );
+ static bool process( const TQString &uri );
};
#endif
diff --git a/korn/account_input.cpp b/korn/account_input.cpp
index 363e04751..d75848052 100644
--- a/korn/account_input.cpp
+++ b/korn/account_input.cpp
@@ -22,15 +22,15 @@
#include <kurlrequester.h>
#include <klineedit.h>
-#include <qcheckbox.h>
-#include <qcombobox.h>
-#include <qlabel.h>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qvalidator.h>
+#include <tqcheckbox.h>
+#include <tqcombobox.h>
+#include <tqlabel.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqvalidator.h>
-AccountInput::AccountInput( const QString& configName )
- : _configName( new QString( configName ) )
+AccountInput::AccountInput( const TQString& configName )
+ : _configName( new TQString( configName ) )
{
}
@@ -39,33 +39,33 @@ AccountInput::~AccountInput()
delete _configName;
}
-QString AccountInput::configName() const
+TQString AccountInput::configName() const
{
return *_configName;
}
-TextInput::TextInput( QWidget *parent, const QString& title, Type type, const QString& defaul, const QString& configName )
+TextInput::TextInput( TQWidget *parent, const TQString& title, Type type, const TQString& defaul, const TQString& configName )
: AccountInput( configName )
{
- _left = new QLabel( title, parent, "label" );
+ _left = new TQLabel( title, parent, "label" );
_right = new KLineEdit( "", parent, "edit" );
switch( type )
{
case text:
break;
case password:
- _right->setEchoMode( QLineEdit::Password );
+ _right->setEchoMode( TQLineEdit::Password );
break;
}
setValue( defaul );
}
-TextInput::TextInput( QWidget *parent, const QString& title, int min, int max, const QString& defaul, const QString& configName )
+TextInput::TextInput( TQWidget *parent, const TQString& title, int min, int max, const TQString& defaul, const TQString& configName )
: AccountInput( configName )
{
- _left = new QLabel( title, parent, "label" );
+ _left = new TQLabel( title, parent, "label" );
_right = new KLineEdit( "", parent, "edit" );
- _right->setValidator( new QIntValidator( min, max, _right, "validator" ) );
+ _right->setValidator( new TQIntValidator( min, max, _right, "validator" ) );
setValue( defaul );
}
@@ -75,20 +75,20 @@ TextInput::~TextInput()
delete _right;
}
-QString TextInput::value() const
+TQString TextInput::value() const
{
return _right->text();
}
-void TextInput::setValue( const QString& value )
+void TextInput::setValue( const TQString& value )
{
return _right->setText( value );
}
-URLInput::URLInput( QWidget *parent, const QString& title, const QString& defaul, const QString& configName )
+URLInput::URLInput( TQWidget *parent, const TQString& title, const TQString& defaul, const TQString& configName )
: AccountInput( configName )
{
- _left = new QLabel( title, parent, "label" );
+ _left = new TQLabel( title, parent, "label" );
_right = new KURLRequester( "", parent, "kurledit" );
setValue( defaul );
}
@@ -99,24 +99,24 @@ URLInput::~URLInput()
delete _right;
}
-QString URLInput::value() const
+TQString URLInput::value() const
{
return _right->url();
}
-void URLInput::setValue( const QString& value )
+void URLInput::setValue( const TQString& value )
{
_right->setURL( value );
}
-ComboInput::ComboInput( QWidget *parent, const QString& title, const QMap<QString, QString>& list,
- const QString& defaul, const QString& configName )
+ComboInput::ComboInput( TQWidget *parent, const TQString& title, const TQMap<TQString, TQString>& list,
+ const TQString& defaul, const TQString& configName )
: AccountInput( configName )
- , _list( new QMap< QString, QString >( list ) )
+ , _list( new TQMap< TQString, TQString >( list ) )
{
- _left = new QLabel( title, parent, "label" );
- _right = new QComboBox( false, parent, "combo" );
- _right->insertStringList( QStringList( _list->values() ) );
+ _left = new TQLabel( title, parent, "label" );
+ _right = new TQComboBox( false, parent, "combo" );
+ _right->insertStringList( TQStringList( _list->values() ) );
setValue( defaul );
}
@@ -126,7 +126,7 @@ ComboInput::~ComboInput()
delete _right;
}
-QString ComboInput::value() const
+TQString ComboInput::value() const
{
if( _right->currentItem() >= 0 )
return _list->keys()[ _right->currentItem() ];
@@ -134,7 +134,7 @@ QString ComboInput::value() const
return "";
}
-void ComboInput::setValue( const QString& value )
+void ComboInput::setValue( const TQString& value )
{
if( _list->contains( value ) )
_right->setCurrentItem( _list->keys().findIndex( value ) );
@@ -142,10 +142,10 @@ void ComboInput::setValue( const QString& value )
_right->setCurrentItem( -1 );
}
-CheckboxInput::CheckboxInput( QWidget *parent, const QString& title, const QString& defaul, const QString& configName )
+CheckboxInput::CheckboxInput( TQWidget *parent, const TQString& title, const TQString& defaul, const TQString& configName )
: AccountInput( configName )
{
- _right = new QCheckBox( title, parent, "checkbox" );
+ _right = new TQCheckBox( title, parent, "checkbox" );
setValue( defaul );
}
@@ -154,7 +154,7 @@ CheckboxInput::~CheckboxInput()
delete _right;
}
-QString CheckboxInput::value() const
+TQString CheckboxInput::value() const
{
if( _right->isChecked() )
return "true";
@@ -162,7 +162,7 @@ QString CheckboxInput::value() const
return "false";
}
-void CheckboxInput::setValue( const QString& value )
+void CheckboxInput::setValue( const TQString& value )
{
if( value == "true" )
_right->setChecked( true );
diff --git a/korn/account_input.h b/korn/account_input.h
index 80f989034..0f7f2e232 100644
--- a/korn/account_input.h
+++ b/korn/account_input.h
@@ -30,7 +30,7 @@ class KURLRequester;
class QComboBox;
class QCheckBox;
-#include <qmap.h>
+#include <tqmap.h>
/**
* This classe contains methods to use in the creation of the protocol configuration box.
@@ -44,7 +44,7 @@ public:
*
* @param configName The name as the information is stored in the configuration-file.
*/
- AccountInput( const QString& configName );
+ AccountInput( const TQString& configName );
/**
* Destructor
*/
@@ -55,20 +55,20 @@ public:
* possible to make a left label and a right input box.
* @return The pointer to the widget.
*/
- virtual QWidget* leftWidget() = 0;
+ virtual TQWidget* leftWidget() = 0;
/**
* Implementations should return the right widget. In the configuration, it is
* possible to make a left label and a right input box.
* @return The pointer to the widget.
*/
- virtual QWidget* rightWidget() = 0;
+ virtual TQWidget* rightWidget() = 0;
/**
* This function return the config name. This is used for stored an retrieving information.
*
* @return The configName as used for this config field.
*/
- QString configName() const;
+ TQString configName() const;
/**
* Return the value of the configuration object. In most cases, this is the value the user typed in.
@@ -76,16 +76,16 @@ public:
*
* @return The value of the object
*/
- virtual QString value() const = 0;
+ virtual TQString value() const = 0;
/**
* Implementation should edit there widget such that value() would return the parameter.
*
* @param value The value that the object must get.
*/
- virtual void setValue( const QString& value ) = 0;
+ virtual void setValue( const TQString& value ) = 0;
protected:
- QString *_configName;
+ TQString *_configName;
};
/**
@@ -112,7 +112,7 @@ public:
* @param defaul The default value of this object
* @param configName The name it has in the configuration box.
*/
- TextInput( QWidget *parent, const QString& title, Type type, const QString& defaul, const QString& configName );
+ TextInput( TQWidget *parent, const TQString& title, Type type, const TQString& defaul, const TQString& configName );
/**
* Constructor. Use this one if you want to ensure a number is inserted.
*
@@ -123,7 +123,7 @@ public:
* @param defaul The default value of this object
* @param configName The name it has in the configuration box.
*/
- TextInput( QWidget *parent, const QString& title, int min, int max, const QString& defaul, const QString& configName );
+ TextInput( TQWidget *parent, const TQString& title, int min, int max, const TQString& defaul, const TQString& configName );
/**
* Destructor
*/
@@ -133,25 +133,25 @@ public:
* Returns a pointer to the label.
* @return A pointer to the label
*/
- virtual QWidget* leftWidget() { return (QWidget*)_left; }
+ virtual TQWidget* leftWidget() { return (TQWidget*)_left; }
/**
* Returns a pointer to the KLineEdit.
* @return A pointer to the KLineEdit
*/
- virtual QWidget* rightWidget() { return (QWidget*)_right; }
+ virtual TQWidget* rightWidget() { return (TQWidget*)_right; }
/**
* The value of the lineedit.
* @return The value of the lineedit.
*/
- virtual QString value() const;
+ virtual TQString value() const;
/**
* This function sets the text of the edit box.
* @param value The value to appear in the lineedit box.
*/
- virtual void setValue( const QString& value );
+ virtual void setValue( const TQString& value );
private:
- QLabel *_left;
+ TQLabel *_left;
KLineEdit *_right;
};
@@ -168,7 +168,7 @@ public:
* @param defaul The default value
* @param configName The name of the configuration entry
*/
- URLInput( QWidget *parent, const QString& title, const QString& defaul, const QString& configName );
+ URLInput( TQWidget *parent, const TQString& title, const TQString& defaul, const TQString& configName );
/**
* Destructor
*/
@@ -178,26 +178,26 @@ public:
* This return a pointer to the label of this object
* @return A pointer to the label of this object
*/
- virtual QWidget* leftWidget() { return (QWidget*)_left; }
+ virtual TQWidget* leftWidget() { return (TQWidget*)_left; }
/**
* This return a pointer to the KURLRequestor of this object
* @return A pointer to the KURLRequestor of this object
*/
- virtual QWidget* rightWidget() { return (QWidget*)_right; }
+ virtual TQWidget* rightWidget() { return (TQWidget*)_right; }
/**
* This function returns the url as given in the KURLRequestor
* @return The currently selected url
*/
- virtual QString value() const;
+ virtual TQString value() const;
/**
* Sets the currently selected url
* @param value The url to be set.
*/
- virtual void setValue( const QString& );
+ virtual void setValue( const TQString& );
private:
- QLabel *_left;
+ TQLabel *_left;
KURLRequester *_right;
};
@@ -217,8 +217,8 @@ public:
* @param default The default value of the combo box.
* @param configName The name in which the option is saved.
*/
- ComboInput( QWidget *parent, const QString& title, const QMap<QString,QString>& list,
- const QString& defaul, const QString& configName );
+ ComboInput( TQWidget *parent, const TQString& title, const TQMap<TQString,TQString>& list,
+ const TQString& defaul, const TQString& configName );
/**
* Destructor
*/
@@ -228,29 +228,29 @@ public:
* The left widget (a label with the title on it)
* @return A pointer to the label of this object.
*/
- virtual QWidget* leftWidget() { return (QWidget*)_left; }
+ virtual TQWidget* leftWidget() { return (TQWidget*)_left; }
/**
* The right widget (the combo box itselfs)
* @return A pointer to the combo box of this object
*/
- virtual QWidget* rightWidget() { return (QWidget*)_right; }
+ virtual TQWidget* rightWidget() { return (TQWidget*)_right; }
/**
* Return the value of the currently selected item
* @return The value of the currently selected item
*/
- virtual QString value() const;
+ virtual TQString value() const;
/**
* This function sets the combo box to an item which has @p value as value.
*
* @param value The value to be searched
*/
- virtual void setValue( const QString& value );
+ virtual void setValue( const TQString& value );
private:
- QLabel *_left;
- QComboBox *_right;
- QMap< QString, QString > *_list;
+ TQLabel *_left;
+ TQComboBox *_right;
+ TQMap< TQString, TQString > *_list;
};
@@ -269,7 +269,7 @@ public:
* @param defaul The default value ("true" for checked, "false" otherwise")
* @param configName The name of the configuration entry of this object
*/
- CheckboxInput( QWidget *parent, const QString& title, const QString& defaul, const QString& configName );
+ CheckboxInput( TQWidget *parent, const TQString& title, const TQString& defaul, const TQString& configName );
/**
* Destructor
*/
@@ -280,19 +280,19 @@ public:
*
* @return 0
*/
- virtual QWidget* leftWidget() { return 0; }
+ virtual TQWidget* leftWidget() { return 0; }
/**
* This function returns the checkbox.
* @return A pointer to the checkbox.
*/
- virtual QWidget* rightWidget() { return (QWidget*)_right; }
+ virtual TQWidget* rightWidget() { return (TQWidget*)_right; }
/**
* This gives the value of the checkbox: "true" if checked, "false" otherwise.
*
* @return "true" if the checkbox is checked, "false" otherwise.
*/
- virtual QString value() const;
+ virtual TQString value() const;
/**
* This function can change the state of the checkbox.
* It can check or uncheck it.
@@ -300,10 +300,10 @@ public:
* @param value If this parameter is "true", the checkbox gets checked,
* if it is "false", the checkbox get unchecked.
*/
- virtual void setValue( const QString& value );
+ virtual void setValue( const TQString& value );
private:
- QCheckBox *_right;
+ TQCheckBox *_right;
};
#endif
diff --git a/korn/accountmanager.cpp b/korn/accountmanager.cpp
index d8c482e42..a791c53d4 100644
--- a/korn/accountmanager.cpp
+++ b/korn/accountmanager.cpp
@@ -30,15 +30,15 @@
#include <kconfig.h>
#include <kdebug.h>
-#include <qptrlist.h>
+#include <tqptrlist.h>
KornSubjectsDlg* AccountManager::_subjectsDlg = 0;
-AccountManager::AccountManager( QObject * parent, const char * name )
- : QObject( parent, name ),
- _kioList( new QPtrList< KMailDrop > ),
- _dcopList( new QPtrList< DCOPDrop > ),
- _dropInfo( new QMap< KMailDrop*, Dropinfo* > )
+AccountManager::AccountManager( TQObject * parent, const char * name )
+ : TQObject( parent, name ),
+ _kioList( new TQPtrList< KMailDrop > ),
+ _dcopList( new TQPtrList< DCOPDrop > ),
+ _dropInfo( new TQMap< KMailDrop*, Dropinfo* > )
{
_kioList->setAutoDelete( true );
_dcopList->setAutoDelete( true );
@@ -53,14 +53,14 @@ AccountManager::~AccountManager()
void AccountManager::readConfig( KConfig* config, const int index )
{
- KConfigGroup *masterGroup = new KConfigGroup( config, QString( "korn-%1" ).arg( index ) );
- QStringList dcop = masterGroup->readListEntry( "dcop", ',' );
+ KConfigGroup *masterGroup = new KConfigGroup( config, TQString( "korn-%1" ).arg( index ) );
+ TQStringList dcop = masterGroup->readListEntry( "dcop", ',' );
KConfigGroup *accountGroup;
int counter = 0;
- while( config->hasGroup( QString( "korn-%1-%2" ).arg( index ).arg( counter ) ) )
+ while( config->hasGroup( TQString( "korn-%1-%2" ).arg( index ).arg( counter ) ) )
{
- accountGroup = new KConfigGroup( config, QString( "korn-%1-%2" ).arg( index ).arg( counter ) );
+ accountGroup = new KConfigGroup( config, TQString( "korn-%1-%2" ).arg( index ).arg( counter ) );
const Protocol *proto = Protocols::getProto( accountGroup->readEntry( "protocol" ) );
if( !proto )
@@ -69,7 +69,7 @@ void AccountManager::readConfig( KConfig* config, const int index )
++counter;
continue;
}
- QMap< QString, QString > *configmap = proto->createConfig( accountGroup,
+ TQMap< TQString, TQString > *configmap = proto->createConfig( accountGroup,
KOrnPassword::readKOrnPassword( index, counter, *accountGroup ) );
KMailDrop *kiodrop = proto->createMaildrop( accountGroup );
const Protocol *nproto = proto->getProtocol( accountGroup );
@@ -84,12 +84,12 @@ void AccountManager::readConfig( KConfig* config, const int index )
}
//TODO: connect some stuff
- connect( kiodrop, SIGNAL( changed( int, KMailDrop* ) ), this, SLOT( slotChanged( int, KMailDrop* ) ) );
- connect( kiodrop, SIGNAL( showPassivePopup( QPtrList< KornMailSubject >*, int, bool, const QString& ) ),
- this, SLOT( slotShowPassivePopup( QPtrList< KornMailSubject >*, int, bool, const QString& ) ) );
- connect( kiodrop, SIGNAL( showPassivePopup( const QString&, const QString& ) ),
- this, SLOT( slotShowPassivePopup( const QString&, const QString& ) ) );
- connect( kiodrop, SIGNAL( validChanged( bool ) ), this, SLOT( slotValidChanged( bool ) ) );
+ connect( kiodrop, TQT_SIGNAL( changed( int, KMailDrop* ) ), this, TQT_SLOT( slotChanged( int, KMailDrop* ) ) );
+ connect( kiodrop, TQT_SIGNAL( showPassivePopup( TQPtrList< KornMailSubject >*, int, bool, const TQString& ) ),
+ this, TQT_SLOT( slotShowPassivePopup( TQPtrList< KornMailSubject >*, int, bool, const TQString& ) ) );
+ connect( kiodrop, TQT_SIGNAL( showPassivePopup( const TQString&, const TQString& ) ),
+ this, TQT_SLOT( slotShowPassivePopup( const TQString&, const TQString& ) ) );
+ connect( kiodrop, TQT_SIGNAL( validChanged( bool ) ), this, TQT_SLOT( slotValidChanged( bool ) ) );
kiodrop->readGeneralConfigGroup( *masterGroup );
if( !kiodrop->readConfigGroup( *accountGroup ) || !kiodrop->readConfigGroup( *configmap, nproto ) )
@@ -113,15 +113,15 @@ void AccountManager::readConfig( KConfig* config, const int index )
++counter;
}
- QStringList::Iterator it;
+ TQStringList::Iterator it;
for( it = dcop.begin(); it != dcop.end(); ++it )
{
DCOPDrop *dcopdrop = new DCOPDrop;
Dropinfo *info = new Dropinfo;
- connect( dcopdrop, SIGNAL( changed( int, KMailDrop* ) ), this, SLOT( slotChanged( int, KMailDrop* ) ) );
- connect( dcopdrop, SIGNAL( showPassivePopup( QPtrList< KornMailSubject >*, int, bool, const QString& ) ),
- this, SLOT( slotShowPassivePopup( QPtrList< KornMailSubject >*, int, bool, const QString& ) ) );
+ connect( dcopdrop, TQT_SIGNAL( changed( int, KMailDrop* ) ), this, TQT_SLOT( slotChanged( int, KMailDrop* ) ) );
+ connect( dcopdrop, TQT_SIGNAL( showPassivePopup( TQPtrList< KornMailSubject >*, int, bool, const TQString& ) ),
+ this, TQT_SLOT( slotShowPassivePopup( TQPtrList< KornMailSubject >*, int, bool, const TQString& ) ) );
dcopdrop->readConfigGroup( *masterGroup );
dcopdrop->setDCOPName( *it );
@@ -141,25 +141,25 @@ void AccountManager::readConfig( KConfig* config, const int index )
void AccountManager::writeConfig( KConfig* config, const int index )
{
- QMap< KMailDrop*, Dropinfo* >::Iterator it;
+ TQMap< KMailDrop*, Dropinfo* >::Iterator it;
for( it = _dropInfo->begin(); it != _dropInfo->end(); ++it )
{
- config->setGroup( QString( "korn-%1-%2" ).arg( index ).arg( it.data()->index ) );
+ config->setGroup( TQString( "korn-%1-%2" ).arg( index ).arg( it.data()->index ) );
config->writeEntry( "reset", it.data()->reset );
}
}
-QString AccountManager::getTooltip() const
+TQString AccountManager::getTooltip() const
{
- QStringList result;
- QMap< KMailDrop*, Dropinfo* >::Iterator it;
+ TQStringList result;
+ TQMap< KMailDrop*, Dropinfo* >::Iterator it;
for( it = _dropInfo->begin(); it != _dropInfo->end(); ++it )
if( it.key()->valid() )
- result.append( QString( "%1: %2" ).arg( it.key()->realName() ).arg( it.data()->msgnr - it.data()->reset ));
+ result.append( TQString( "%1: %2" ).arg( it.key()->realName() ).arg( it.data()->msgnr - it.data()->reset ));
else
- result.append( QString( "%1: invalid" ).arg( it.key()->realName() ) );
+ result.append( TQString( "%1: invalid" ).arg( it.key()->realName() ) );
result.sort();
- return result.join( QChar( '\n' ) );
+ return result.join( TQChar( '\n' ) );
}
void AccountManager::doRecheck()
@@ -171,7 +171,7 @@ void AccountManager::doRecheck()
void AccountManager::doReset()
{
- QMap< KMailDrop*, Dropinfo* >::Iterator it;
+ TQMap< KMailDrop*, Dropinfo* >::Iterator it;
for( it = _dropInfo->begin(); it != _dropInfo->end(); ++it )
{
it.data()->reset = it.data()->msgnr;
@@ -183,7 +183,7 @@ void AccountManager::doReset()
void AccountManager::doView()
{
- QMap< KMailDrop*, Dropinfo* >::Iterator it;
+ TQMap< KMailDrop*, Dropinfo* >::Iterator it;
if( !_subjectsDlg )
_subjectsDlg = new KornSubjectsDlg();
@@ -216,7 +216,7 @@ int AccountManager::totalMessages()
{
int result = 0;
- QMap< KMailDrop*, Dropinfo* >::Iterator it;
+ TQMap< KMailDrop*, Dropinfo* >::Iterator it;
for( it = _dropInfo->begin(); it != _dropInfo->end(); ++it )
//if( it.date()->msgnr - it.date()->reset > 0 )
result += it.data()->msgnr - it.data()->reset;
@@ -226,7 +226,7 @@ int AccountManager::totalMessages()
bool AccountManager::hasNewMessages()
{
- QMap< KMailDrop*, Dropinfo* >::Iterator it;
+ TQMap< KMailDrop*, Dropinfo* >::Iterator it;
for( it = _dropInfo->begin(); it != _dropInfo->end(); ++it )
if( it.data()->newMessages )
return true;
@@ -234,7 +234,7 @@ bool AccountManager::hasNewMessages()
return false;
}
-void AccountManager::playSound( const QString& file )
+void AccountManager::playSound( const TQString& file )
{
KAudioPlayer::play( file );
}
diff --git a/korn/accountmanager.h b/korn/accountmanager.h
index 958e5b57c..037887d4e 100644
--- a/korn/accountmanager.h
+++ b/korn/accountmanager.h
@@ -19,7 +19,7 @@
#ifndef MK_ACCOUNTMANAGER_H
#define MK_ACCOUNTMANAGER_H
-#include <qobject.h>
+#include <tqobject.h>
class DCOPDrop;
class KornSubjectsDlg;
@@ -42,9 +42,9 @@ class AccountManager : public QObject
{ Q_OBJECT
public:
/**
- * Constructor, parameters are directed to QObject.
+ * Constructor, parameters are directed to TQObject.
*/
- AccountManager( QObject * parent = 0, const char * name = 0 );
+ AccountManager( TQObject * parent = 0, const char * name = 0 );
/**
* Destructor
@@ -72,13 +72,13 @@ public:
virtual void writeConfig( KConfig* config, const int index );
/**
- * This method makes a QString which can be used for a tooltip.
+ * This method makes a TQString which can be used for a tooltip.
* In it, all accounts are summed and the number of new messages of
* every account is added.
*
* @return A string that can be used for the Tooltip of the box.
*/
- QString getTooltip() const;
+ TQString getTooltip() const;
protected:
/**
* This function is called when the number of emails has changed.
@@ -93,14 +93,14 @@ protected:
* This functions sets a new Tooltip. Boxes must override this method
* @param tooltip The tooltip to be set.
*/
- virtual void setTooltip( const QString& tooltip ) = 0;
+ virtual void setTooltip( const TQString& tooltip ) = 0;
/**
* This funtion is called if @p command have to be executed.
* For example, if new email has arrived, and the user setuped KOrn
* to execute a command. Boxes must override this function.
*/
- virtual void runCommand( const QString& command ) = 0;
+ virtual void runCommand( const TQString& command ) = 0;
/**
* This function can be called by classes that inherit this class.
@@ -135,17 +135,17 @@ private:
int reset;
};
- QPtrList< KMailDrop > *_kioList;
- QPtrList< DCOPDrop > *_dcopList;
+ TQPtrList< KMailDrop > *_kioList;
+ TQPtrList< DCOPDrop > *_dcopList;
- QMap< KMailDrop*, Dropinfo* > *_dropInfo;
+ TQMap< KMailDrop*, Dropinfo* > *_dropInfo;
static KornSubjectsDlg *_subjectsDlg;
private:
int totalMessages();
bool hasNewMessages();
- void playSound( const QString& );
+ void playSound( const TQString& );
private slots:
void slotChanged( int, KMailDrop* );
void slotValidChanged( bool );
diff --git a/korn/boxcontainer.cpp b/korn/boxcontainer.cpp
index e245004c7..934a47c53 100644
--- a/korn/boxcontainer.cpp
+++ b/korn/boxcontainer.cpp
@@ -22,11 +22,11 @@
#include <kconfig.h>
#include <kdebug.h>
-#include <qptrlist.h>
+#include <tqptrlist.h>
-BoxContainer::BoxContainer( QObject * parent, const char * name )
- : QObject( parent, name ),
- _items( new QPtrList< BoxContainerItem > )
+BoxContainer::BoxContainer( TQObject * parent, const char * name )
+ : TQObject( parent, name ),
+ _items( new TQPtrList< BoxContainerItem > )
{
_items->setAutoDelete( true );
}
@@ -39,9 +39,9 @@ BoxContainer::~BoxContainer()
void BoxContainer::readConfig( KConfig* config )
{
int counter = 0;
- while( config->hasGroup( QString( "korn-%1" ).arg( counter ) ) )
+ while( config->hasGroup( TQString( "korn-%1" ).arg( counter ) ) )
{
- config->setGroup( QString( "korn-%1" ).arg( counter ) );
+ config->setGroup( TQString( "korn-%1" ).arg( counter ) );
BoxContainerItem *item = newBoxInstance();
item->readConfig( config, counter );
addItem( item );
@@ -76,7 +76,7 @@ void BoxContainer::slotShowConfiguration()
void BoxContainer::addItem( BoxContainerItem* item )
{
- connect( item, SIGNAL( showConfiguration() ), this, SLOT( slotShowConfiguration() ) );
+ connect( item, TQT_SIGNAL( showConfiguration() ), this, TQT_SLOT( slotShowConfiguration() ) );
_items->append( item );
}
diff --git a/korn/boxcontainer.h b/korn/boxcontainer.h
index 800fab78e..d650657e8 100644
--- a/korn/boxcontainer.h
+++ b/korn/boxcontainer.h
@@ -19,7 +19,7 @@
#ifndef MK_BOXCONTAINER_H
#define MK_BOXCONTAINER_H
-#include <qobject.h>
+#include <tqobject.h>
class BoxContainerItem;
@@ -35,12 +35,12 @@ class BoxContainer : public QObject
{ Q_OBJECT
public:
/**
- * Constructor: everything is passed to QObject.
+ * Constructor: everything is passed to TQObject.
*
* @param parent The parent of this object
* @param name The name of this object
*/
- BoxContainer( QObject *parent = 0, const char * name = 0 );
+ BoxContainer( TQObject *parent = 0, const char * name = 0 );
/**
* Destructor
*/
@@ -90,7 +90,7 @@ protected:
/**
* The list of BoxContainerItems.
*/
- QPtrList< BoxContainerItem > *_items;
+ TQPtrList< BoxContainerItem > *_items;
signals:
/**
diff --git a/korn/boxcontaineritem.cpp b/korn/boxcontaineritem.cpp
index fec7ab41d..4dec01904 100644
--- a/korn/boxcontaineritem.cpp
+++ b/korn/boxcontaineritem.cpp
@@ -35,22 +35,22 @@
#include <kprocess.h>
#include <kshortcut.h>
-#include <qbitmap.h>
-#include <qcolor.h>
-#include <qfont.h>
-#include <qgrid.h>
-#include <qlabel.h>
-#include <qpainter.h>
-#include <qpixmap.h>
-#include <qptrlist.h>
-#include <qstring.h>
-#include <qtooltip.h>
-#include <qvbox.h>
+#include <tqbitmap.h>
+#include <tqcolor.h>
+#include <tqfont.h>
+#include <tqgrid.h>
+#include <tqlabel.h>
+#include <tqpainter.h>
+#include <tqpixmap.h>
+#include <tqptrlist.h>
+#include <tqstring.h>
+#include <tqtooltip.h>
+#include <tqvbox.h>
-BoxContainerItem::BoxContainerItem( QObject * parent, const char * name )
+BoxContainerItem::BoxContainerItem( TQObject * parent, const char * name )
: AccountManager( parent, name ),
DCOPObject(),
- _command( new QString )
+ _command( new TQString )
{
short i;
@@ -81,48 +81,48 @@ BoxContainerItem::~BoxContainerItem()
void BoxContainerItem::readConfig( KConfig* config, const int index )
{
//Read information about how the thing have to look like
- config->setGroup( QString( "korn-%1" ).arg( index ) );
+ config->setGroup( TQString( "korn-%1" ).arg( index ) );
if( config->readBoolEntry( "hasnormalicon", false ) )
- _icons[ 0 ] = new QString( config->readEntry( "normalicon", "" ) );
+ _icons[ 0 ] = new TQString( config->readEntry( "normalicon", "" ) );
else
_icons[ 0 ] = 0;
if( config->readBoolEntry( "hasnewicon", false ) )
- _icons[ 1 ] = new QString( config->readEntry( "newicon", "" ) );
+ _icons[ 1 ] = new TQString( config->readEntry( "newicon", "" ) );
else
_icons[ 1 ] = 0;
if( config->readBoolEntry( "hasnormalanim", false ) )
- _anims[ 0 ] = new QString( config->readEntry( "normalanim", "" ) );
+ _anims[ 0 ] = new TQString( config->readEntry( "normalanim", "" ) );
else
_anims[ 0 ] = 0;
if( config->readBoolEntry( "hasnewanim", false ) )
- _anims[ 1 ] = new QString( config->readEntry( "newanim", "" ) );
+ _anims[ 1 ] = new TQString( config->readEntry( "newanim", "" ) );
else
_anims[ 1 ] = 0;
if( config->readBoolEntry( "hasnormalfgcolour", false ) )
- _fgColour[ 0 ] = new QColor( config->readColorEntry( "normalfgcolour" ) );
+ _fgColour[ 0 ] = new TQColor( config->readColorEntry( "normalfgcolour" ) );
else
_fgColour[ 0 ] = 0;
if( config->readBoolEntry( "hasnewfgcolour", false ) )
- _fgColour[ 1 ] = new QColor( config->readColorEntry( "newfgcolour" ) );
+ _fgColour[ 1 ] = new TQColor( config->readColorEntry( "newfgcolour" ) );
else
_fgColour[ 1 ] = 0;
if( config->readBoolEntry( "hasnormalbgcolour", false ) )
- _bgColour[ 0 ] = new QColor( config->readColorEntry( "normalbgcolour" ) );
+ _bgColour[ 0 ] = new TQColor( config->readColorEntry( "normalbgcolour" ) );
else
_bgColour[ 0 ] = 0;
if( config->readBoolEntry( "hasnewbgcolour", false ) )
- _bgColour[ 1 ] = new QColor( config->readColorEntry( "newbgcolour" ) );
+ _bgColour[ 1 ] = new TQColor( config->readColorEntry( "newbgcolour" ) );
else
_bgColour[ 1 ] = 0;
if( config->readBoolEntry( "hasnormalfont", false ) )
- _fonts[ 0 ] = new QFont( config->readFontEntry( "normalfont" ) );
+ _fonts[ 0 ] = new TQFont( config->readFontEntry( "normalfont" ) );
else
_fonts[ 0 ] = 0;
if( config->readBoolEntry( "hasnewfont", false ) )
- _fonts[ 1 ] = new QFont( config->readFontEntry( "newfont" ) );
+ _fonts[ 1 ] = new TQFont( config->readFontEntry( "newfont" ) );
else
_fonts[ 1 ] = 0;
@@ -159,12 +159,12 @@ void BoxContainerItem::readConfig( KConfig* config, const int index )
AccountManager::readConfig( config, index );
}
-void BoxContainerItem::runCommand( const QString& cmd )
+void BoxContainerItem::runCommand( const TQString& cmd )
{
KProcess *process = new KProcess;
process->setUseShell( true );
*process << cmd;
- connect( process, SIGNAL( processExited (KProcess *) ), this, SLOT( processExited( KProcess * ) ) );
+ connect( process, TQT_SIGNAL( processExited (KProcess *) ), this, TQT_SLOT( processExited( KProcess * ) ) );
process->start();
}
@@ -194,45 +194,45 @@ void BoxContainerItem::mouseButtonPressed( Qt::ButtonState state )
void BoxContainerItem::fillKPopupMenu( KPopupMenu* popupMenu, KActionCollection* actions ) const
{
- /*popupMenu->insertItem( i18n( "&Configure" ), this, SLOT( slotConfigure() ) );
- popupMenu->insertItem( i18n( "&Recheck" ), this, SLOT( slotRecheck() ) );
- popupMenu->insertItem( i18n( "R&eset Counter" ), this, SLOT( slotReset() ) );
- popupMenu->insertItem( i18n( "&View Emails" ), this, SLOT( slotView() ) );
- popupMenu->insertItem( i18n( "R&un Command" ), this, SLOT( slotRunCommand() ) );*/
-
- (new KAction( i18n("&Configure"), KShortcut(), this, SLOT( slotConfigure() ), actions ))->plug( popupMenu );
- (new KAction( i18n("&Recheck"), KShortcut(), this, SLOT( slotRecheck() ), actions ))->plug( popupMenu );
- (new KAction( i18n("R&eset Counter"), KShortcut(), this, SLOT( slotReset() ), actions ))->plug( popupMenu );
- (new KAction( i18n("&View Emails"), KShortcut(), this, SLOT( slotView() ), actions ))->plug( popupMenu );
- (new KAction( i18n("R&un Command"), KShortcut(), this, SLOT( slotRunCommand() ), actions ))->plug( popupMenu );
+ /*popupMenu->insertItem( i18n( "&Configure" ), this, TQT_SLOT( slotConfigure() ) );
+ popupMenu->insertItem( i18n( "&Recheck" ), this, TQT_SLOT( slotRecheck() ) );
+ popupMenu->insertItem( i18n( "R&eset Counter" ), this, TQT_SLOT( slotReset() ) );
+ popupMenu->insertItem( i18n( "&View Emails" ), this, TQT_SLOT( slotView() ) );
+ popupMenu->insertItem( i18n( "R&un Command" ), this, TQT_SLOT( slotRunCommand() ) );*/
+
+ (new KAction( i18n("&Configure"), KShortcut(), this, TQT_SLOT( slotConfigure() ), actions ))->plug( popupMenu );
+ (new KAction( i18n("&Recheck"), KShortcut(), this, TQT_SLOT( slotRecheck() ), actions ))->plug( popupMenu );
+ (new KAction( i18n("R&eset Counter"), KShortcut(), this, TQT_SLOT( slotReset() ), actions ))->plug( popupMenu );
+ (new KAction( i18n("&View Emails"), KShortcut(), this, TQT_SLOT( slotView() ), actions ))->plug( popupMenu );
+ (new KAction( i18n("R&un Command"), KShortcut(), this, TQT_SLOT( slotRunCommand() ), actions ))->plug( popupMenu );
popupMenu->insertSeparator();
- KStdAction::help( this, SLOT( help() ), actions )->plug( popupMenu );
- KStdAction::reportBug( this, SLOT( reportBug() ), actions )->plug( popupMenu );
- KStdAction::aboutApp( this, SLOT( about() ), actions )->plug( popupMenu );
+ KStdAction::help( this, TQT_SLOT( help() ), actions )->plug( popupMenu );
+ KStdAction::reportBug( this, TQT_SLOT( reportBug() ), actions )->plug( popupMenu );
+ KStdAction::aboutApp( this, TQT_SLOT( about() ), actions )->plug( popupMenu );
}
-void BoxContainerItem::showPassivePopup( QWidget* parent, QPtrList< KornMailSubject >* list, int total,
- const QString &accountName, bool date )
+void BoxContainerItem::showPassivePopup( TQWidget* parent, TQPtrList< KornMailSubject >* list, int total,
+ const TQString &accountName, bool date )
{
KPassivePopup *popup = new KPassivePopup( parent, "Passive popup" );
- QVBox *mainvlayout = popup->standardView( i18n( "KOrn - %1/%2 (total: %3)" ).arg( objId() ).arg( accountName )
- .arg( total ), "", QPixmap(), 0 );
- QGrid *mainglayout = new QGrid( date ? 3 : 2 ,mainvlayout, "Grid-Layout" );
+ TQVBox *mainvlayout = popup->standardView( i18n( "KOrn - %1/%2 (total: %3)" ).arg( objId() ).arg( accountName )
+ .arg( total ), "", TQPixmap(), 0 );
+ TQGrid *mainglayout = new TQGrid( date ? 3 : 2 ,mainvlayout, "Grid-Layout" );
- QLabel *title = new QLabel( i18n("From"), mainglayout, "from_label" );
- QFont font = title->font();
+ TQLabel *title = new TQLabel( i18n("From"), mainglayout, "from_label" );
+ TQFont font = title->font();
font.setBold( true );
title->setFont( font );
- title = new QLabel( i18n("Subject"), mainglayout, "subject_label" );
+ title = new TQLabel( i18n("Subject"), mainglayout, "subject_label" );
font = title->font();
font.setBold( true );
title->setFont( font );
if( date )
{
- title = new QLabel( i18n("Date"), mainglayout, "date_label" );
+ title = new TQLabel( i18n("Date"), mainglayout, "date_label" );
font = title->font();
font.setBold( true );
title->setFont( font );
@@ -240,13 +240,13 @@ void BoxContainerItem::showPassivePopup( QWidget* parent, QPtrList< KornMailSubj
for( KornMailSubject* subject = list->first(); subject; subject = list->next() )
{
- new QLabel( subject->getSender(), mainglayout, "from-value" );
- new QLabel( subject->getSubject(), mainglayout, "subject-value" );
+ new TQLabel( subject->getSender(), mainglayout, "from-value" );
+ new TQLabel( subject->getSubject(), mainglayout, "subject-value" );
if( date )
{
- QDateTime tijd;
+ TQDateTime tijd;
tijd.setTime_t( subject->getDate() );
- new QLabel( tijd.toString(), mainglayout, "date-value" );
+ new TQLabel( tijd.toString(), mainglayout, "date-value" );
}
}
@@ -257,7 +257,7 @@ void BoxContainerItem::showPassivePopup( QWidget* parent, QPtrList< KornMailSubj
popup->show(); //Display it
}
-void BoxContainerItem::drawLabel( QLabel *label, const int count, const bool newMessages )
+void BoxContainerItem::drawLabel( TQLabel *label, const int count, const bool newMessages )
{
//This would fail if bool have fome other values.
short index = newMessages ? 1 : 0;
@@ -267,10 +267,10 @@ void BoxContainerItem::drawLabel( QLabel *label, const int count, const bool new
bool hasBg = _bgColour[ index ] && _bgColour[ index ]->isValid();
bool hasFg = _fgColour[ index ] && _fgColour[ index ]->isValid();
- QPixmap pixmap;
+ TQPixmap pixmap;
label->setText( "" );
- //QToolTip::add( label, this->getTooltip() );
+ //TQToolTip::add( label, this->getTooltip() );
if( hasAnim )
{ //An animation can't have a foreground-colour and can't have a icon.
@@ -317,7 +317,7 @@ void BoxContainerItem::drawLabel( QLabel *label, const int count, const bool new
label->setFont( *_fonts[ index ] );
label->setPaletteForegroundColor( *_fgColour[ index ] );
label->setAlignment( Qt::AlignHCenter | Qt::AlignVCenter );
- label->setText( QString::number( count ) );
+ label->setText( TQString::number( count ) );
}
if( hasFg || hasBg || hasIcon || hasAnim )
@@ -327,14 +327,14 @@ void BoxContainerItem::drawLabel( QLabel *label, const int count, const bool new
}
//This function makes a pixmap which is based on icon, but has a number painted on it.
-QPixmap BoxContainerItem::calcComplexPixmap( const QPixmap &icon, const QColor& fgColour, const QFont* font, const int count )
+TQPixmap BoxContainerItem::calcComplexPixmap( const TQPixmap &icon, const TQColor& fgColour, const TQFont* font, const int count )
{
- QPixmap result( icon );
- QPixmap numberPixmap( icon.size() );
- QImage iconImage( icon.convertToImage() );
- QImage numberImage;
+ TQPixmap result( icon );
+ TQPixmap numberPixmap( icon.size() );
+ TQImage iconImage( icon.convertToImage() );
+ TQImage numberImage;
QRgb *rgbline;
- QPainter p;
+ TQPainter p;
//Make a transparent number; first make a white number on a black background.
//This pixmap also is the base alpha-channel, the foreground colour is added later.
@@ -343,7 +343,7 @@ QPixmap BoxContainerItem::calcComplexPixmap( const QPixmap &icon, const QColor&
p.setPen( Qt::white );
if( font )
p.setFont( *font );
- p.drawText( icon.rect(), Qt::AlignCenter, QString::number( count ) );
+ p.drawText( icon.rect(), Qt::AlignCenter, TQString::number( count ) );
p.end();
//Convert to image and add the alpha channel.
@@ -369,10 +369,10 @@ QPixmap BoxContainerItem::calcComplexPixmap( const QPixmap &icon, const QColor&
return result;
}
-void BoxContainerItem::setAnimIcon( QLabel* label, const QString& anim )
+void BoxContainerItem::setAnimIcon( TQLabel* label, const TQString& anim )
{
label->setAlignment( Qt::AlignHCenter | Qt::AlignVCenter );
- label->setMovie( QMovie( anim ) );
+ label->setMovie( TQMovie( anim ) );
label->show();
}
diff --git a/korn/boxcontaineritem.h b/korn/boxcontaineritem.h
index 46f85da57..0112f9acf 100644
--- a/korn/boxcontaineritem.h
+++ b/korn/boxcontaineritem.h
@@ -46,14 +46,14 @@ class BoxContainerItem : public AccountManager, public DCOPObject
public:
/**
* Standaard QObject-constuctor
- * This constructor implements the default arguments for any QObject.
+ * This constructor implements the default arguments for any TQObject.
* Note that is does not give a name to DCOPObject; that name
* is set in the readConfig-function.
* @param parent The parent of this object, See Object::QObject
- * @param name The name of this object, See QObject::QObject
+ * @param name The name of this object, See TQObject::QObject
* @see BoxContainerItem::readConfig
*/
- BoxContainerItem( QObject * parent = 0, const char * name = 0 );
+ BoxContainerItem( TQObject * parent = 0, const char * name = 0 );
/**
* The default destructor. This only removes _command-pointer.
@@ -86,7 +86,7 @@ public slots:
*
* @param cmd The command to be executed.
*/
- virtual void runCommand( const QString& cmd );
+ virtual void runCommand( const TQString& cmd );
/**
* This function displays the (kde) help dialog
@@ -128,7 +128,7 @@ protected:
* @param accountName The name of the account it belongs to
* @param date Should the date be displayed?
*/
- void showPassivePopup( QWidget* parent, QPtrList< KornMailSubject >* list, int total, const QString& accountName, bool date );
+ void showPassivePopup( TQWidget* parent, TQPtrList< KornMailSubject >* list, int total, const TQString& accountName, bool date );
//this functions should be reimplemented
/**
@@ -143,7 +143,7 @@ protected:
* @param count the number of new messages
* @param newMessages are the messages new?
*/
- void drawLabel( QLabel *label, const int count, const bool newMessages );
+ void drawLabel( TQLabel *label, const int count, const bool newMessages );
private:
/**
@@ -153,14 +153,14 @@ private:
* @param font the font; 0 is default font.
* @param count the number of messages
*/
- static QPixmap calcComplexPixmap( const QPixmap &icon, const QColor& fgColour, const QFont* font, const int count );
+ static TQPixmap calcComplexPixmap( const TQPixmap &icon, const TQColor& fgColour, const TQFont* font, const int count );
/**
* This functions sets a movie to a specified label
* @param label The label to set the movie in
* @param anim The path to the animation
*/
- void setAnimIcon( QLabel* label, const QString& anim );
+ void setAnimIcon( TQLabel* label, const TQString& anim );
private slots:
void slotRecheck() { recheck(); }
@@ -218,14 +218,14 @@ private slots:
protected:
//This settings are stored here because every implementation needs them.
- QString *_icons[ 2 ];
- QString *_anims[ 2 ];
- QColor *_fgColour[ 2 ];
- QColor *_bgColour[ 2 ];
- QFont *_fonts[ 2 ];
+ TQString *_icons[ 2 ];
+ TQString *_anims[ 2 ];
+ TQColor *_fgColour[ 2 ];
+ TQColor *_bgColour[ 2 ];
+ TQFont *_fonts[ 2 ];
private:
- QString *_command;
+ TQString *_command;
bool _recheckSettings[ 3 ];
bool _resetSettings[ 3 ];
bool _viewSettings[ 3 ];
diff --git a/korn/dcop_proto.cpp b/korn/dcop_proto.cpp
index a5896b8f1..d1f27a616 100644
--- a/korn/dcop_proto.cpp
+++ b/korn/dcop_proto.cpp
@@ -25,38 +25,38 @@
#include <kconfigbase.h>
#include <klocale.h>
-#include <qmap.h>
-#include <qptrlist.h>
-#include <qptrvector.h>
+#include <tqmap.h>
+#include <tqptrlist.h>
+#include <tqptrvector.h>
KMailDrop* DCOP_Protocol::createMaildrop( KConfigGroup* ) const
{
return new DCOPDrop();
}
-QMap< QString, QString > * DCOP_Protocol::createConfig( KConfigGroup* config, const QString& ) const
+TQMap< TQString, TQString > * DCOP_Protocol::createConfig( KConfigGroup* config, const TQString& ) const
{
- QMap< QString, QString > *result = new QMap< QString, QString >;
+ TQMap< TQString, TQString > *result = new TQMap< TQString, TQString >;
result->insert( "dcopname", config->readEntry( "dcopname", "korn_dcop" ) );
return result;
}
-void DCOP_Protocol::configFillGroupBoxes( QStringList* groupBoxes ) const
+void DCOP_Protocol::configFillGroupBoxes( TQStringList* groupBoxes ) const
{
groupBoxes->append( "DCOP" );
}
-void DCOP_Protocol::configFields( QPtrVector< QWidget >* vector, const QObject*, QPtrList< AccountInput >* result ) const
+void DCOP_Protocol::configFields( TQPtrVector< TQWidget >* vector, const TQObject*, TQPtrList< AccountInput >* result ) const
{
- result->append( new TextInput( (QWidget*)vector->at( 0 ), i18n( "DCOP name" ), TextInput::text, "korn_dcop", "dcopname" ) );
+ result->append( new TextInput( (TQWidget*)vector->at( 0 ), i18n( "DCOP name" ), TextInput::text, "korn_dcop", "dcopname" ) );
}
-void DCOP_Protocol::readEntries( QMap< QString, QString >* ) const
+void DCOP_Protocol::readEntries( TQMap< TQString, TQString >* ) const
{
}
-void DCOP_Protocol::writeEntries( QMap< QString, QString >* ) const
+void DCOP_Protocol::writeEntries( TQMap< TQString, TQString >* ) const
{
}
diff --git a/korn/dcop_proto.h b/korn/dcop_proto.h
index cb92b8bf9..38a5404dd 100644
--- a/korn/dcop_proto.h
+++ b/korn/dcop_proto.h
@@ -37,7 +37,7 @@ template< class T> class QPtrList;
template< class T> class QPtrVector;
template< class T, class S> class QMap;
-#include <qstring.h>
+#include <tqstring.h>
/**
* This class implements a DCOP-protocol.
@@ -72,19 +72,19 @@ public:
* @param config The configuration instance to be mapped
* @return The keys and values of the configuration in a mapping
*/
- virtual QMap< QString, QString > * createConfig( KConfigGroup* config, const QString& passwd ) const;
+ virtual TQMap< TQString, TQString > * createConfig( KConfigGroup* config, const TQString& passwd ) const;
/**
* This return the name of this protocol. It is always "dcop".
* @return The name of this protocol: "dcop"
*/
- virtual QString configName() const { return "dcop"; }
+ virtual TQString configName() const { return "dcop"; }
/**
* This function sets into the list the groupboxes.
*
* @param list A (empty) list, which is filled with the names of group-boxes.
*/
- virtual void configFillGroupBoxes( QStringList* list ) const;
+ virtual void configFillGroupBoxes( TQStringList* list ) const;
/**
* This function filles the configuration field of this protocol.
* It is used to construct the configuration dialog.
@@ -93,15 +93,15 @@ public:
* @param obj The pointer to the configDialog to connect signals to.
* @param result A list with AccountInput which is used to reconstruct the configuration.
*/
- virtual void configFields( QPtrVector< QWidget >* vector, const QObject* obj, QPtrList< AccountInput >* result ) const;
+ virtual void configFields( TQPtrVector< TQWidget >* vector, const TQObject* obj, TQPtrList< AccountInput >* result ) const;
/**
* This function can edit some configuaration option before reading them.
*/
- virtual void readEntries( QMap< QString, QString >* ) const;
+ virtual void readEntries( TQMap< TQString, TQString >* ) const;
/**
* This function can edit some configuaration option before writing them.
*/
- virtual void writeEntries( QMap< QString, QString >* ) const;
+ virtual void writeEntries( TQMap< TQString, TQString >* ) const;
//Functions that return a derived class.
//This way, no explicit cast is needed
diff --git a/korn/dcopdrop.cpp b/korn/dcopdrop.cpp
index 906f268de..407a6ff06 100644
--- a/korn/dcopdrop.cpp
+++ b/korn/dcopdrop.cpp
@@ -26,16 +26,16 @@
#include <kconfigbase.h>
#include <kdebug.h>
-#include <qdatetime.h>
-#include <qmap.h>
-#include <qstring.h>
-#include <qtimer.h>
+#include <tqdatetime.h>
+#include <tqmap.h>
+#include <tqstring.h>
+#include <tqtimer.h>
DCOPDrop::DCOPDrop()
: KMailDrop(),
_isRunning( false ),
- _msgList( new QMap< int, KornMailSubject* > ),
- _name( new QString( "" ) ),
+ _msgList( new TQMap< int, KornMailSubject* > ),
+ _name( new TQString( "" ) ),
_counter( 1 ),
_interface( 0 )
{
@@ -72,7 +72,7 @@ bool DCOPDrop::readConfigGroup( const KConfigGroup &cfg )
return KMailDrop::readConfigGroup( cfg );
}
-bool DCOPDrop::readConfigGroup( const QMap< QString, QString > &map, const Protocol * )
+bool DCOPDrop::readConfigGroup( const TQMap< TQString, TQString > &map, const Protocol * )
{
if( !map.contains( "dcopname" ) )
//The mapping MUST contain dcopname.
@@ -93,12 +93,12 @@ bool DCOPDrop::writeConfigGroup( KConfigBase& cfg ) const
return true;
}
-QString DCOPDrop::type() const
+TQString DCOPDrop::type() const
{
- return QString( "dcop" );
+ return TQString( "dcop" );
}
-QValueVector< KornMailSubject >* DCOPDrop::doReadSubjects( bool * )
+TQValueVector< KornMailSubject >* DCOPDrop::doReadSubjects( bool * )
{
emit readSubjectsTotalSteps( 1 );
@@ -106,19 +106,19 @@ QValueVector< KornMailSubject >* DCOPDrop::doReadSubjects( bool * )
* This way, the function is really asynchrone.
* So, the return value arraves before any data arrives.
*/
- QTimer::singleShot( 1, this, SLOT( doReadSubjectsASync( void ) ) );
+ TQTimer::singleShot( 1, this, TQT_SLOT( doReadSubjectsASync( void ) ) );
/*
- * A empty QValueVector is made here.
+ * A empty TQValueVector is made here.
* After that, the size is expanded to the expected number of subjects.
* This way, reallocation of memmory is minimized, and thus more efficient.
*/
- QValueVector<KornMailSubject> *vector = new QValueVector<KornMailSubject>( );
+ TQValueVector<KornMailSubject> *vector = new TQValueVector<KornMailSubject>( );
vector->reserve( _msgList->count() );
return vector;
}
-bool DCOPDrop::deleteMails( QPtrList<const KornMailId> * ids, bool * )
+bool DCOPDrop::deleteMails( TQPtrList<const KornMailId> * ids, bool * )
{
emit deleteMailsTotalSteps( 1 );
@@ -137,7 +137,7 @@ bool DCOPDrop::deleteMails( QPtrList<const KornMailId> * ids, bool * )
void DCOPDrop::eraseList( void )
{
- QMap<int, KornMailSubject* >::iterator it;
+ TQMap<int, KornMailSubject* >::iterator it;
for( it = _msgList->begin(); it != _msgList->end(); ++it )
delete it.data();
_msgList->clear();
@@ -145,24 +145,24 @@ void DCOPDrop::eraseList( void )
void DCOPDrop::doReadSubjectsASync( void )
{
- QMap<int, KornMailSubject* >::iterator it;
+ TQMap<int, KornMailSubject* >::iterator it;
for( it = _msgList->begin(); it != _msgList->end(); ++it )
emit readSubject( new KornMailSubject( *it.data() ) );
emit readSubjectsProgress( 1 );
emit readSubjectsReady( true );
}
-int DCOPDrop::addMessage( const QString& subject, const QString& message )
+int DCOPDrop::addMessage( const TQString& subject, const TQString& message )
{
KornIntId *id = new KornIntId( _counter );
KornMailSubject *mailsubject = new KornMailSubject( id, this );
++_counter;
mailsubject->setSubject( subject );
- mailsubject->setSender( QString( "DCOP: %1" ).arg( *_name ) );
+ mailsubject->setSender( TQString( "DCOP: %1" ).arg( *_name ) );
mailsubject->setHeader( message, true );
mailsubject->setSize( message.length() );
- mailsubject->setDate( QDateTime::currentDateTime().toTime_t() );
+ mailsubject->setDate( TQDateTime::currentDateTime().toTime_t() );
_msgList->insert( id->getId(), mailsubject );
@@ -184,12 +184,12 @@ bool DCOPDrop::removeMessage( int id )
return true;
}
-QString DCOPDrop::DCOPName() const
+TQString DCOPDrop::DCOPName() const
{
return *_name;
}
-void DCOPDrop::setDCOPName( const QString& name)
+void DCOPDrop::setDCOPName( const TQString& name)
{
*_name = name;
if( _interface )
diff --git a/korn/dcopdrop.h b/korn/dcopdrop.h
index 91bc8f98d..32e85066d 100644
--- a/korn/dcopdrop.h
+++ b/korn/dcopdrop.h
@@ -105,7 +105,7 @@ public:
*
* @return true is all information is retrieved succesfully.
*/
- virtual bool readConfigGroup( const QMap< QString, QString > & map, const Protocol * protocol );
+ virtual bool readConfigGroup( const TQMap< TQString, TQString > & map, const Protocol * protocol );
/**
* This function writes the information to a config group.
*
@@ -118,7 +118,7 @@ public:
*
* @return "dcop"
*/
- virtual QString type() const;
+ virtual TQString type() const;
/**
* This function should return true if it uses a synchrone comminucation.
@@ -137,9 +137,9 @@ public:
/**
* This function does reads the subjects.
* @param stop A variable which isn't used: only used for synchrone actions
- * @return A QValueVector which KornMailSubject* instance for every new mail.
+ * @return A TQValueVector which KornMailSubject* instance for every new mail.
*/
- virtual QValueVector< KornMailSubject >* doReadSubjects( bool *stop );
+ virtual TQValueVector< KornMailSubject >* doReadSubjects( bool *stop );
/**
* This function should return true if it is possible to delete emails.
@@ -155,7 +155,7 @@ public:
* @param stop Not used: only for synchrone opererations.
* @return true if deleting was succesfull
*/
- virtual bool deleteMails( QPtrList<const KornMailId> * ids, bool * stop );
+ virtual bool deleteMails( TQPtrList<const KornMailId> * ids, bool * stop );
/**
* This function returns true if it is possible to read emails.
@@ -168,8 +168,8 @@ public:
private:
bool _isRunning;
- QMap< int, KornMailSubject* > *_msgList;
- QString *_name;
+ TQMap< int, KornMailSubject* > *_msgList;
+ TQString *_name;
int _counter;
DCOPDropInterface *_interface;
@@ -179,12 +179,12 @@ private slots:
void doReadSubjectsASync( void );
public: //accessed by DCOPDropInterface
- int addMessage( const QString& subject, const QString& message );
+ int addMessage( const TQString& subject, const TQString& message );
bool removeMessage( int id );
//accessed by DCOPDropCfg
- QString DCOPName() const;
- void setDCOPName( const QString& );
+ TQString DCOPName() const;
+ void setDCOPName( const TQString& );
};
#endif
diff --git a/korn/dcopdropif.cpp b/korn/dcopdropif.cpp
index 709161451..94c16ca21 100644
--- a/korn/dcopdropif.cpp
+++ b/korn/dcopdropif.cpp
@@ -30,12 +30,12 @@ DCOPDropInterface::~DCOPDropInterface()
{
}
-void DCOPDropInterface::changeName( const QString& name )
+void DCOPDropInterface::changeName( const TQString& name )
{
this->setObjId( name.utf8() );
}
-int DCOPDropInterface::addMessage( const QString& subject, const QString& message )
+int DCOPDropInterface::addMessage( const TQString& subject, const TQString& message )
{
return _drop->addMessage( subject, message );
}
diff --git a/korn/dcopdropif.h b/korn/dcopdropif.h
index a041ab059..9e755ac69 100644
--- a/korn/dcopdropif.h
+++ b/korn/dcopdropif.h
@@ -46,7 +46,7 @@ public:
*
* @param name The new name of this dcop interface.
*/
- void changeName( const QString& name );
+ void changeName( const TQString& name );
k_dcop:
/**
* This function adds a message to list of new messages.
@@ -55,7 +55,7 @@ k_dcop:
* @param message The body of the message
* @return The id which this message got
*/
- int addMessage( const QString& subject, const QString& message );
+ int addMessage( const TQString& subject, const TQString& message );
/**
* This function removes a message from the list of new messages.
*
diff --git a/korn/dockedcontainer.cpp b/korn/dockedcontainer.cpp
index e820c12c5..5e2463886 100644
--- a/korn/dockedcontainer.cpp
+++ b/korn/dockedcontainer.cpp
@@ -20,7 +20,7 @@
#include "dockeditem.h"
-DockedContainer::DockedContainer( QObject * parent, const char * name )
+DockedContainer::DockedContainer( TQObject * parent, const char * name )
: BoxContainer( parent, name )
{
}
diff --git a/korn/dockedcontainer.h b/korn/dockedcontainer.h
index 96216f16f..278de0443 100644
--- a/korn/dockedcontainer.h
+++ b/korn/dockedcontainer.h
@@ -30,7 +30,7 @@ class BoxContainerItem;
class DockedContainer : public BoxContainer
{ Q_OBJECT
public:
- DockedContainer( QObject * parent = 0, const char * name = 0 );
+ DockedContainer( TQObject * parent = 0, const char * name = 0 );
~DockedContainer();
protected:
diff --git a/korn/dockeditem.cpp b/korn/dockeditem.cpp
index 2ec57a4f7..4423e7660 100644
--- a/korn/dockeditem.cpp
+++ b/korn/dockeditem.cpp
@@ -29,22 +29,22 @@
#include <kpopupmenu.h>
#include <klocale.h>
-#include <qbitmap.h>
-#include <qcursor.h>
-#include <qtooltip.h>
-#include <qpainter.h>
-#include <qpixmap.h>
-#include <qmovie.h>
+#include <tqbitmap.h>
+#include <tqcursor.h>
+#include <tqtooltip.h>
+#include <tqpainter.h>
+#include <tqpixmap.h>
+#include <tqmovie.h>
-DockedItem::DockedItem( QWidget * parent, const char * name )
+DockedItem::DockedItem( TQWidget * parent, const char * name )
: BoxContainerItem( parent, name ),
_systemtray( new SystemTray( parent, "System tray" ) )
{
this->fillKPopupMenu( _systemtray->contextMenu(), _systemtray->actionCollection() );
- connect( _systemtray, SIGNAL( quitSelected() ), kapp, SLOT( quit() ) );
- connect( _systemtray, SIGNAL( mouseButtonPressed( Qt::ButtonState ) ),
- this, SLOT( mouseButtonPressed( Qt::ButtonState ) ) );
+ connect( _systemtray, TQT_SIGNAL( quitSelected() ), kapp, TQT_SLOT( quit() ) );
+ connect( _systemtray, TQT_SIGNAL( mouseButtonPressed( Qt::ButtonState ) ),
+ this, TQT_SLOT( mouseButtonPressed( Qt::ButtonState ) ) );
}
DockedItem::~DockedItem()
@@ -69,24 +69,24 @@ void DockedItem::setCount( const int count, const bool newMessages )
drawLabel( _systemtray, count, newMessages );
}
-void DockedItem::setTooltip( const QString& tooltip )
+void DockedItem::setTooltip( const TQString& tooltip )
{
- QToolTip::add( _systemtray, tooltip );
+ TQToolTip::add( _systemtray, tooltip );
}
-void DockedItem::slotShowPassivePopup( QPtrList< KornMailSubject >* list, int total, bool date, const QString& name )
+void DockedItem::slotShowPassivePopup( TQPtrList< KornMailSubject >* list, int total, bool date, const TQString& name )
{
showPassivePopup( _systemtray, list, total, name, date );
}
-void DockedItem::slotShowPassivePopup( const QString& message, const QString& name )
+void DockedItem::slotShowPassivePopup( const TQString& message, const TQString& name )
{
KPassivePopup::message( i18n( "Korn - %1/%2" ).arg( objId() ).arg( name ), message, _systemtray, "Passive error message" );
}
void DockedItem::doPopup()
{
- _systemtray->contextMenu()->popup( QCursor::pos() );
+ _systemtray->contextMenu()->popup( TQCursor::pos() );
}
#include "dockeditem.moc"
diff --git a/korn/dockeditem.h b/korn/dockeditem.h
index 152fbb2cd..d9a85004d 100644
--- a/korn/dockeditem.h
+++ b/korn/dockeditem.h
@@ -42,7 +42,7 @@ public:
* @param parant The parent window
* @param name The name of the QObject's parents.
*/
- DockedItem( QWidget * parent = 0, const char * name = 0 );
+ DockedItem( TQWidget * parent = 0, const char * name = 0 );
/**
* Empty destructor; does nothing at the moment
*/
@@ -74,11 +74,11 @@ public slots:
* This function sets the tooltip @p string to a box.
* @param string The tooltip to be added.
*/
- virtual void setTooltip( const QString& string );
+ virtual void setTooltip( const TQString& string );
- void slotShowPassivePopup( QPtrList< KornMailSubject >* list, int total, bool date, const QString& );
+ void slotShowPassivePopup( TQPtrList< KornMailSubject >* list, int total, bool date, const TQString& );
- void slotShowPassivePopup( const QString& error, const QString& );
+ void slotShowPassivePopup( const TQString& error, const TQString& );
protected:
/**
@@ -87,7 +87,7 @@ protected:
virtual void doPopup();
private:
- void setAnimIcon( const QString& anim );
+ void setAnimIcon( const TQString& anim );
private:
SystemTray *_systemtray;
diff --git a/korn/hvcontainer.cpp b/korn/hvcontainer.cpp
index f0268ba3a..fa815179d 100644
--- a/korn/hvcontainer.cpp
+++ b/korn/hvcontainer.cpp
@@ -22,16 +22,16 @@
#include <kdebug.h>
-#include <qvbox.h>
+#include <tqvbox.h>
-HVContainer::HVContainer( Qt::Orientation orientation, QObject * parent, const char * name )
+HVContainer::HVContainer( Qt::Orientation orientation, TQObject * parent, const char * name )
: BoxContainer( parent, name ),
box( 0 )
{
if( orientation == Qt::Horizontal )
- box = new QHBox( 0, "hbox" );
+ box = new TQHBox( 0, "hbox" );
else
- box = new QVBox( 0, "vbox" );
+ box = new TQVBox( 0, "vbox" );
}
HVContainer::~HVContainer()
diff --git a/korn/hvcontainer.h b/korn/hvcontainer.h
index 9bae17b28..54a96cd81 100644
--- a/korn/hvcontainer.h
+++ b/korn/hvcontainer.h
@@ -37,7 +37,7 @@ public:
*
* @param orientation The orientation of the box: it is a vertical or horizontal box?
*/
- HVContainer( Qt::Orientation orientation, QObject * parent = 0 , const char * name = 0 );
+ HVContainer( Qt::Orientation orientation, TQObject * parent = 0 , const char * name = 0 );
~HVContainer();
/**
@@ -52,7 +52,7 @@ protected:
*/
virtual BoxContainerItem* newBoxInstance() const;
private:
- QHBox *box;
+ TQHBox *box;
};
#endif //MK_HVCONTAINER_H
diff --git a/korn/hvitem.cpp b/korn/hvitem.cpp
index e8cc2483d..7d836da3c 100644
--- a/korn/hvitem.cpp
+++ b/korn/hvitem.cpp
@@ -27,10 +27,10 @@
#include <kpopupmenu.h>
#include <kstdaction.h>
-#include <qcursor.h>
-#include <qtooltip.h>
+#include <tqcursor.h>
+#include <tqtooltip.h>
-HVItem::HVItem( QWidget *parent, const char *name )
+HVItem::HVItem( TQWidget *parent, const char *name )
: BoxContainerItem( 0, name ),
_label( new Label( parent, "label" ) ),
_popup( new KPopupMenu( _label, "popupmenu" ) ),
@@ -39,9 +39,9 @@ HVItem::HVItem( QWidget *parent, const char *name )
_popup->insertTitle( kapp->miniIcon(), kapp->caption() );
this->fillKPopupMenu( _popup, _actions );
_popup->insertSeparator();
- KStdAction::quit( kapp, SLOT( quit() ), _actions )->plug( _popup );
+ KStdAction::quit( kapp, TQT_SLOT( quit() ), _actions )->plug( _popup );
- connect( _label, SIGNAL( mouseButtonPressed( Qt::ButtonState ) ), this, SLOT( mouseButtonPressed( Qt::ButtonState ) ) );
+ connect( _label, TQT_SIGNAL( mouseButtonPressed( Qt::ButtonState ) ), this, TQT_SLOT( mouseButtonPressed( Qt::ButtonState ) ) );
}
HVItem::~HVItem()
@@ -59,24 +59,24 @@ void HVItem::setCount( const int count, const bool newMessages )
drawLabel( _label, count, newMessages );
}
-void HVItem::setTooltip( const QString& string )
+void HVItem::setTooltip( const TQString& string )
{
- QToolTip::add( _label, string );
+ TQToolTip::add( _label, string );
}
-void HVItem::slotShowPassivePopup( QPtrList< KornMailSubject >* list, int total, bool date, const QString& name )
+void HVItem::slotShowPassivePopup( TQPtrList< KornMailSubject >* list, int total, bool date, const TQString& name )
{
showPassivePopup( _label, list, total, name, date );
}
-void HVItem::slotShowPassivePopup( const QString& errorMessage, const QString& name )
+void HVItem::slotShowPassivePopup( const TQString& errorMessage, const TQString& name )
{
- KPassivePopup::message( QString( "korn-%1-%2" ).arg( objId() ).arg( name ), errorMessage, _label, "Passive error message" );
+ KPassivePopup::message( TQString( "korn-%1-%2" ).arg( objId() ).arg( name ), errorMessage, _label, "Passive error message" );
}
void HVItem::doPopup()
{
- _popup->popup( QCursor::pos() );
+ _popup->popup( TQCursor::pos() );
}
#include "hvitem.moc"
diff --git a/korn/hvitem.h b/korn/hvitem.h
index ced99eb4d..e728846a3 100644
--- a/korn/hvitem.h
+++ b/korn/hvitem.h
@@ -32,7 +32,7 @@ class Label;
class HVItem : public BoxContainerItem
{ Q_OBJECT
public:
- HVItem( QWidget *parent = 0, const char *name = 0 );
+ HVItem( TQWidget *parent = 0, const char *name = 0 );
~HVItem();
/**
@@ -53,19 +53,19 @@ public slots:
* This function sets the tooltip @p string to a box.
* @param string The tooltip to be added.
*/
- virtual void setTooltip( const QString& string );
+ virtual void setTooltip( const TQString& string );
/**
* This slot triggered when the passive popup is to be shown. It is transported
* to BoxContainerItem, but so it is possible to change the arguments.
*/
- void slotShowPassivePopup( QPtrList< KornMailSubject >* list, int total, bool date, const QString& );
+ void slotShowPassivePopup( TQPtrList< KornMailSubject >* list, int total, bool date, const TQString& );
/**
* This slot triggered when the passive popup is to be shown. It is transported
* to BoxContainerItem, but so it is possible to change the arguments.
*/
- void slotShowPassivePopup( const QString& errorMessage, const QString& name );
+ void slotShowPassivePopup( const TQString& errorMessage, const TQString& name );
/**
* Trigered if the popup-menu is to be shown
diff --git a/korn/imap_proto.cpp b/korn/imap_proto.cpp
index d0be64360..caedb4597 100644
--- a/korn/imap_proto.cpp
+++ b/korn/imap_proto.cpp
@@ -21,61 +21,61 @@
#include "account_input.h"
-#include <qwidget.h>
-#include <qobject.h>
-#include <qstringlist.h>
-#include <qptrvector.h>
-#include <qptrlist.h>
+#include <tqwidget.h>
+#include <tqobject.h>
+#include <tqstringlist.h>
+#include <tqptrvector.h>
+#include <tqptrlist.h>
-void Imap_Protocol::configFillGroupBoxes( QStringList* groupBoxes ) const
+void Imap_Protocol::configFillGroupBoxes( TQStringList* groupBoxes ) const
{
groupBoxes->append( "Server" );
groupBoxes->append( "Identity" );
}
-void Imap_Protocol::configFields( QPtrVector< QWidget >* vector, const QObject* configDialog, QPtrList< AccountInput > * result ) const
+void Imap_Protocol::configFields( TQPtrVector< TQWidget >* vector, const TQObject* configDialog, TQPtrList< AccountInput > * result ) const
{
- QMap< QString, QString > encrList;
+ TQMap< TQString, TQString > encrList;
encrList.insert( "ssl", i18n( "SSL" ) );
encrList.insert( "tls=auto", i18n( "TLS if possible" ) );
encrList.insert( "tls=on", i18n( "Always TLS" ) );
encrList.insert( "tls=off", i18n( "Never TLS" ) );
- QMap< QString, QString > authList;
+ TQMap< TQString, TQString > authList;
authList.insert( "auth=*", i18n( "Default" ) );
authList.insert( "auth=LOGIN", i18n( "LOGIN" ) ); //Note: LOGIN is an authentication method
authList.insert( "auth=ANONTMOUS", i18n( "Anonymous" ) ); //Note: ANONYMOUS is an authentication method
authList.insert( "auth=CRAM-MD5", i18n( "CRAM-MD5" ) ); //Note: CRAM-MD5 is an authentication method
- result->append( new TextInput( (QWidget*)vector->at( 0 ), i18n( "Server" ), TextInput::text, "", "server" ) );
- result->append( new TextInput( (QWidget*)vector->at( 0 ), i18n( "Port" ), 0, 65535, "143", "port" ) );
- result->append( new ComboInput( (QWidget*)vector->at( 0 ), i18n( "Encryption" ), encrList, "tls=auto", "encryption" ) );
- QObject::connect( (QObject*)result->last()->rightWidget(), SIGNAL( activated( int) ),
- configDialog, SLOT( slotSSLChanged() ) );
+ result->append( new TextInput( (TQWidget*)vector->at( 0 ), i18n( "Server" ), TextInput::text, "", "server" ) );
+ result->append( new TextInput( (TQWidget*)vector->at( 0 ), i18n( "Port" ), 0, 65535, "143", "port" ) );
+ result->append( new ComboInput( (TQWidget*)vector->at( 0 ), i18n( "Encryption" ), encrList, "tls=auto", "encryption" ) );
+ TQObject::connect( (TQObject*)result->last()->rightWidget(), TQT_SIGNAL( activated( int) ),
+ configDialog, TQT_SLOT( slotSSLChanged() ) );
- result->append( new TextInput( (QWidget*)vector->at( 1 ), i18n( "Username" ), TextInput::text, "", "username" ) );
- result->append( new TextInput( (QWidget*)vector->at( 1 ), i18n( "Mailbox" ), TextInput::text, "INBOX", "mailbox" ) );
- result->append( new TextInput( (QWidget*)vector->at( 1 ), i18n( "Password" ), TextInput::password, "", "password" ) );
- result->append( new CheckboxInput( (QWidget*)vector->at( 1 ), i18n( "Save password" ), "true", "savepassword" ) );
- QObject::connect( (QObject*)result->last()->rightWidget(), SIGNAL( toggled( bool ) ),
- (QObject*)result->prev()->rightWidget(), SLOT( setEnabled( bool ) ) );
+ result->append( new TextInput( (TQWidget*)vector->at( 1 ), i18n( "Username" ), TextInput::text, "", "username" ) );
+ result->append( new TextInput( (TQWidget*)vector->at( 1 ), i18n( "Mailbox" ), TextInput::text, "INBOX", "mailbox" ) );
+ result->append( new TextInput( (TQWidget*)vector->at( 1 ), i18n( "Password" ), TextInput::password, "", "password" ) );
+ result->append( new CheckboxInput( (TQWidget*)vector->at( 1 ), i18n( "Save password" ), "true", "savepassword" ) );
+ TQObject::connect( (TQObject*)result->last()->rightWidget(), TQT_SIGNAL( toggled( bool ) ),
+ (TQObject*)result->prev()->rightWidget(), TQT_SLOT( setEnabled( bool ) ) );
result->last()->setValue( "false" );
- result->append( new ComboInput( (QWidget*)vector->at( 1 ), i18n( "Authentication" ), authList, "auth=*", "auth" ) );
+ result->append( new ComboInput( (TQWidget*)vector->at( 1 ), i18n( "Authentication" ), authList, "auth=*", "auth" ) );
}
-void Imap_Protocol::readEntries( QMap< QString, QString >* map, QMap< QString, QString > *metadata ) const
+void Imap_Protocol::readEntries( TQMap< TQString, TQString >* map, TQMap< TQString, TQString > *metadata ) const
{
if( map->contains( "ssl" ) && *map->find( "ssl" ) == "true" )
map->insert( "encryption", "ssl" );
if( metadata->contains( "tls" ) )
- map->insert( "encryption", QString( "tls=%1" ).arg( *metadata->find( "tls" ) ) );
+ map->insert( "encryption", TQString( "tls=%1" ).arg( *metadata->find( "tls" ) ) );
if( metadata->contains( "auth" ) )
- map->insert( "auth", QString( "auth=%1" ).arg( *metadata->find( "auth" ) ) );
+ map->insert( "auth", TQString( "auth=%1" ).arg( *metadata->find( "auth" ) ) );
}
-void Imap_Protocol::writeEntries( QMap< QString, QString >* map ) const
+void Imap_Protocol::writeEntries( TQMap< TQString, TQString >* map ) const
{
- QString metadata;
+ TQString metadata;
if( map->contains( "encryption" ) )
{
if( *map->find( "encryption" ) == "ssl" )
diff --git a/korn/imap_proto.h b/korn/imap_proto.h
index c4dfc896d..97fb209ad 100644
--- a/korn/imap_proto.h
+++ b/korn/imap_proto.h
@@ -59,13 +59,13 @@ public:
* @param ssl true if ssl is selected.
* @return "imaps" if ssl is true, "imap" otherwise
*/
- virtual QString protocol( bool ssl ) const { return ssl ? "imaps" : "imap"; }
+ virtual TQString protocol( bool ssl ) const { return ssl ? "imaps" : "imap"; }
/**
* This name of this protocol: it goed in the configuration under this name.
*
* @return The name of this protocol: "imap"
*/
- virtual QString configName() const { return "imap"; }
+ virtual TQString configName() const { return "imap"; }
/**
* true, because it is possible to read subjects with imap.
*
@@ -95,7 +95,7 @@ public:
*/
virtual unsigned short defaultPort( bool ssl ) const { return ssl ? 993 : 143; }
- virtual QStringList authList() const { return QStringList::split( '|', "*|LOGIN|ANONYMOUS|CRAM-MD5", false); }
+ virtual TQStringList authList() const { return TQStringList::split( '|', "*|LOGIN|ANONYMOUS|CRAM-MD5", false); }
//Could not test did, my server don't support other authentication methods.
/**
@@ -113,7 +113,7 @@ public:
*
* @param list A list to add the name of groupboxes in.
*/
- virtual void configFillGroupBoxes( QStringList* list ) const;
+ virtual void configFillGroupBoxes( TQStringList* list ) const;
/**
* This function adds elements to the groupbox.
*
@@ -121,7 +121,7 @@ public:
* @param object The object to connect signals to
* @param ptrlist A list with object which is filled in this function. The list must already be created.
*/
- virtual void configFields( QPtrVector< QWidget >* vector, const QObject* object, QPtrList< AccountInput >* ptrlist ) const;
+ virtual void configFields( TQPtrVector< TQWidget >* vector, const TQObject* object, TQPtrList< AccountInput >* ptrlist ) const;
/**
* This function is used to change the configuration.
* In the case, the metadata-key is splitted out, and put in the @p metadata parameter.
@@ -129,7 +129,7 @@ public:
* @param map The mapping containing the configuration. This object can change in this function.
* @param metadata An empty mapping at the begin, a mapping containing metadata at the end.
*/
- virtual void readEntries( QMap< QString, QString >* map, QMap< QString, QString >* metadata ) const;
+ virtual void readEntries( TQMap< TQString, TQString >* map, TQMap< TQString, TQString >* metadata ) const;
/**
* This function edits writeEntry. It merge things back to a metadata-key and adds this
* key to the configuration.
@@ -137,7 +137,7 @@ public:
* @param map The mapping which contains the information to be written to a configuarion file.
* the contents of this mapping can change in this function.
*/
- virtual void writeEntries( QMap< QString, QString >* map ) const;
+ virtual void writeEntries( TQMap< TQString, TQString >* map ) const;
};
#endif
diff --git a/korn/imaps_proto.h b/korn/imaps_proto.h
index 06b4920bc..00964dab5 100644
--- a/korn/imaps_proto.h
+++ b/korn/imaps_proto.h
@@ -31,8 +31,8 @@ public:
virtual KIO_Protocol * clone() const { return new Imaps_Protocol; }
- virtual QString protocol() const { return "imaps"; }
- virtual QString configName() const { return "imaps"; }
+ virtual TQString protocol() const { return "imaps"; }
+ virtual TQString configName() const { return "imaps"; }
virtual unsigned short defaultPort() const { return 993; }
};
diff --git a/korn/intid.cpp b/korn/intid.cpp
index 060f9c962..4cad2e0b8 100644
--- a/korn/intid.cpp
+++ b/korn/intid.cpp
@@ -14,9 +14,9 @@ KornIntId::~KornIntId()
{
}
-QString KornIntId::toString() const
+TQString KornIntId::toString() const
{
- return QString("KornIntId, Id: ") + QString::number(_id);
+ return TQString("KornIntId, Id: ") + TQString::number(_id);
}
KornMailId * KornIntId::clone() const
diff --git a/korn/intid.h b/korn/intid.h
index ab4b4d3cc..34a68092e 100644
--- a/korn/intid.h
+++ b/korn/intid.h
@@ -40,7 +40,7 @@ public:
* Return a string representation of this (for debugging purposes only)
* @return a string representation
*/
- virtual QString toString() const;
+ virtual TQString toString() const;
/**
* Create an exact copy of this.
diff --git a/korn/kconf_update/korn-3-4-config_change.cpp b/korn/kconf_update/korn-3-4-config_change.cpp
index f8afa1ff4..08ca732bd 100644
--- a/korn/kconf_update/korn-3-4-config_change.cpp
+++ b/korn/kconf_update/korn-3-4-config_change.cpp
@@ -16,19 +16,19 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include <qstring.h>
-#include <qregexp.h>
-#include <qtextstream.h>
-#include <qmap.h>
-#include <qvaluelist.h>
+#include <tqstring.h>
+#include <tqregexp.h>
+#include <tqtextstream.h>
+#include <tqmap.h>
+#include <tqvaluelist.h>
#include <stdio.h>
-QString decodeString( const QString &password )
+TQString decodeString( const TQString &password )
{
unsigned int i, val;
unsigned int len = password.length();
- QString result="";
+ TQString result="";
for ( i=0; i < len; i++ )
{
val = password[i].latin1() - ' ';
@@ -38,7 +38,7 @@ QString decodeString( const QString &password )
return result;
}
-void printToprint( QTextStream &out, QMap<QString,QString> &to_printed, const QString type )
+void printToprint( TQTextStream &out, TQMap<TQString,TQString> &to_printed, const TQString type )
{
out << "printToprint( " << type << " )" << endl;
@@ -104,26 +104,26 @@ void printToprint( QTextStream &out, QMap<QString,QString> &to_printed, const QS
int main( int, char** )
{
- QString line = QString::null;
- QString currentGroup1 = QString::null;
- QString currentGroup2 = QString::null;
- QString type = QString::null;
- QString password = QString::null;
- QRegExp interesting_group( "^\\[box-(\\d+)\\]" );
- QRegExp key_value( "^(\\w*)=(.*)$" );
- QValueList<QString> tobe_deleted;
+ TQString line = TQString::null;
+ TQString currentGroup1 = TQString::null;
+ TQString currentGroup2 = TQString::null;
+ TQString type = TQString::null;
+ TQString password = TQString::null;
+ TQRegExp interesting_group( "^\\[box-(\\d+)\\]" );
+ TQRegExp key_value( "^(\\w*)=(.*)$" );
+ TQValueList<TQString> tobe_deleted;
int numboxes = -1;
bool isKey = false;
- QTextStream in( stdin, IO_ReadOnly );
- QTextStream out( stdout, IO_WriteOnly );
+ TQTextStream in( stdin, IO_ReadOnly );
+ TQTextStream out( stdout, IO_WriteOnly );
- in.setEncoding( QTextStream::UnicodeUTF8 );
- out.setEncoding( QTextStream::UnicodeUTF8 );
+ in.setEncoding( TQTextStream::UnicodeUTF8 );
+ out.setEncoding( TQTextStream::UnicodeUTF8 );
- QMap<QString,QString> mapping1;
- QValueList<QString> mapping2;
- QMap<QString,QString> to_printed;
+ TQMap<TQString,TQString> mapping1;
+ TQValueList<TQString> mapping2;
+ TQMap<TQString,TQString> to_printed;
mapping1.insert( "caption", "name" );
mapping1.insert( "onclick", "command" );
@@ -168,15 +168,15 @@ int main( int, char** )
printToprint( out, to_printed, type );
}
- currentGroup1 = QString::null;
+ currentGroup1 = TQString::null;
}
if( interesting_group.search( line ) >= 0 )
{
if( numboxes > -1 && interesting_group.cap( 1 ).toInt() < numboxes )
{
- currentGroup1 = QString( "[korn-%1]" ).arg( interesting_group.cap( 1 ) );
- currentGroup2 = QString( "[korn-%1-0]" ).arg( interesting_group.cap( 1 ) );
+ currentGroup1 = TQString( "[korn-%1]" ).arg( interesting_group.cap( 1 ) );
+ currentGroup2 = TQString( "[korn-%1-0]" ).arg( interesting_group.cap( 1 ) );
}
tobe_deleted.append( line );
continue;
@@ -250,8 +250,8 @@ int main( int, char** )
printToprint( out, to_printed, type );
}
- QValueList<QString>::Iterator it1 = tobe_deleted.begin();
- QValueList<QString>::Iterator it1_end = tobe_deleted.end();
+ TQValueList<TQString>::Iterator it1 = tobe_deleted.begin();
+ TQValueList<TQString>::Iterator it1_end = tobe_deleted.end();
for( ; it1 != it1_end; ++it1 )
out << "# DELETEGROUP " << *it1 << endl;
diff --git a/korn/keditlistboxman.cpp b/korn/keditlistboxman.cpp
index 43cce8318..cab1d777a 100644
--- a/korn/keditlistboxman.cpp
+++ b/korn/keditlistboxman.cpp
@@ -21,10 +21,10 @@
#include <kconfig.h>
#include <kdebug.h>
-#include <qmap.h>
-#include <qstring.h>
+#include <tqmap.h>
+#include <tqstring.h>
-KEditListBoxManager::KEditListBoxManager( QWidget *parent, const char *name,
+KEditListBoxManager::KEditListBoxManager( TQWidget *parent, const char *name,
bool checkAtEntering, int buttons )
: KEditListBox( parent, name, checkAtEntering, buttons ),
_config( 0 ),
@@ -35,7 +35,7 @@ KEditListBoxManager::KEditListBoxManager( QWidget *parent, const char *name,
init();
}
-KEditListBoxManager::KEditListBoxManager( const QString& title, QWidget *parent,
+KEditListBoxManager::KEditListBoxManager( const TQString& title, TQWidget *parent,
const char *name, bool checkAtEntering,
int buttons)
: KEditListBox( title, parent, name, checkAtEntering, buttons ),
@@ -47,9 +47,9 @@ KEditListBoxManager::KEditListBoxManager( const QString& title, QWidget *parent,
init();
}
-KEditListBoxManager::KEditListBoxManager( const QString& title,
+KEditListBoxManager::KEditListBoxManager( const TQString& title,
const KEditListBox::CustomEditor &customEditor,
- QWidget *parent, const char *name,
+ TQWidget *parent, const char *name,
bool checkAtEntering, int buttons )
: KEditListBox( title, customEditor, parent, name, checkAtEntering, buttons ),
_config( 0 ),
@@ -72,23 +72,23 @@ void KEditListBoxManager::setConfig( KConfig* config )
readNames();
}
-void KEditListBoxManager::setGroupName( const QString& name )
+void KEditListBoxManager::setGroupName( const TQString& name )
{
if( _groupName )
*_groupName = name;
else
- _groupName = new QString( name );
+ _groupName = new TQString( name );
if( _config )
readNames();
}
-void KEditListBoxManager::setSubGroupName( const QString& name )
+void KEditListBoxManager::setSubGroupName( const TQString& name )
{
if( _subGroupName )
*_subGroupName = name;
else
- _subGroupName = new QString( name );
+ _subGroupName = new TQString( name );
if( _config && _groupName )
readNames();
@@ -96,12 +96,12 @@ void KEditListBoxManager::setSubGroupName( const QString& name )
void KEditListBoxManager::init()
{
- connect( this, SIGNAL( changed() ), this, SLOT( slotChanged() ) );
- connect( this, SIGNAL( added( const QString& ) ), this, SLOT( slotAdded( const QString& ) ) );
- connect( this, SIGNAL( removed( const QString& ) ), this, SLOT( slotRemoved( const QString& ) ) );
+ connect( this, TQT_SIGNAL( changed() ), this, TQT_SLOT( slotChanged() ) );
+ connect( this, TQT_SIGNAL( added( const TQString& ) ), this, TQT_SLOT( slotAdded( const TQString& ) ) );
+ connect( this, TQT_SIGNAL( removed( const TQString& ) ), this, TQT_SLOT( slotRemoved( const TQString& ) ) );
- connect( this->listBox(), SIGNAL( doubleClicked( QListBoxItem * ) ), this, SLOT( slotActivated( QListBoxItem * ) ) );
- connect( this->listBox(), SIGNAL( returnPressed( QListBoxItem * ) ), this, SLOT( slotActivated( QListBoxItem * ) ) );
+ connect( this->listBox(), TQT_SIGNAL( doubleClicked( TQListBoxItem * ) ), this, TQT_SLOT( slotActivated( TQListBoxItem * ) ) );
+ connect( this->listBox(), TQT_SIGNAL( returnPressed( TQListBoxItem * ) ), this, TQT_SLOT( slotActivated( TQListBoxItem * ) ) );
}
void KEditListBoxManager::readNames()
@@ -112,7 +112,7 @@ void KEditListBoxManager::readNames()
while( _config->hasGroup( _groupName->arg( number ) ) )
{
_config->setGroup( _groupName->arg( number ) );
- this->insertItem( _config->readEntry( "name", QString::null ) );
+ this->insertItem( _config->readEntry( "name", TQString::null ) );
++number;
}
@@ -140,16 +140,16 @@ void KEditListBoxManager::slotChanged()
_config->setGroup( _groupName->arg( this->currentItem() ) );
- if( this->currentItem() > 0 && this->text( this->currentItem() - 1 ) == _config->readEntry( "name", QString::null ) )
+ if( this->currentItem() > 0 && this->text( this->currentItem() - 1 ) == _config->readEntry( "name", TQString::null ) )
changeItem( this->currentItem() - 1, this->currentItem() ); //moved down
else if( this->currentItem() < this->count() - 1 &&
- this->text( this->currentItem() + 1 ) == _config->readEntry( "name", QString::null ) )
+ this->text( this->currentItem() + 1 ) == _config->readEntry( "name", TQString::null ) )
changeItem( this->currentItem(), this->currentItem() + 1 ); //moved up
- else if( this->currentText() != _config->readEntry( "name", QString::null ) )
+ else if( this->currentText() != _config->readEntry( "name", TQString::null ) )
changedText(); //changed
}
-void KEditListBoxManager::slotAdded( const QString& name )
+void KEditListBoxManager::slotAdded( const TQString& name )
{
//Update _prevCount
_prevCount = this->count();
@@ -167,7 +167,7 @@ void KEditListBoxManager::slotAdded( const QString& name )
emit setDefaults( name, number, _config );
}
-void KEditListBoxManager::slotRemoved( const QString& name )
+void KEditListBoxManager::slotRemoved( const TQString& name )
{
//Update prevCount
_prevCount = this->count();
@@ -186,7 +186,7 @@ void KEditListBoxManager::slotRemoved( const QString& name )
break;
}
_config->setGroup( _groupName->arg( number ) );
- if( name == _config->readEntry( "name", QString::null ) )
+ if( name == _config->readEntry( "name", TQString::null ) )
break; //found
++number; //Try next group
@@ -212,7 +212,7 @@ void KEditListBoxManager::slotRemoved( const QString& name )
}
}
-void KEditListBoxManager::slotActivated( QListBoxItem* item )
+void KEditListBoxManager::slotActivated( TQListBoxItem* item )
{
if( item )
emit activated( item->text() );
@@ -220,8 +220,8 @@ void KEditListBoxManager::slotActivated( QListBoxItem* item )
void KEditListBoxManager::moveItem( int src, int dest )
{
- QMap<QString, QString> *srcList = new QMap<QString, QString >;
- QMap<QString, QString>::iterator it;
+ TQMap<TQString, TQString> *srcList = new TQMap<TQString, TQString >;
+ TQMap<TQString, TQString>::iterator it;
int subnumber = 0;
*srcList = _config->entryMap( _groupName->arg( src ) );
@@ -248,9 +248,9 @@ void KEditListBoxManager::moveItem( int src, int dest )
void KEditListBoxManager::changeItem( int first, int last )
{
- QMap<QString, QString> *firstList = new QMap<QString, QString >;
- QMap<QString, QString> *lastList = new QMap<QString, QString >;
- QMap<QString, QString>::iterator it;
+ TQMap<TQString, TQString> *firstList = new TQMap<TQString, TQString >;
+ TQMap<TQString, TQString> *lastList = new TQMap<TQString, TQString >;
+ TQMap<TQString, TQString>::iterator it;
int subnumber = 0;
*firstList = _config->entryMap( _groupName->arg( first ) );
diff --git a/korn/keditlistboxman.h b/korn/keditlistboxman.h
index 6792ee814..ffc2920e7 100644
--- a/korn/keditlistboxman.h
+++ b/korn/keditlistboxman.h
@@ -35,24 +35,24 @@ class KEditListBoxManager : public KEditListBox
{ Q_OBJECT
public:
/**
- * Constructor: @see KEditListBoxManager::KEditListBoxManager( const QString&, QWidget, const char * name, bool, int )
+ * Constructor: @see KEditListBoxManager::KEditListBoxManager( const TQString&, TQWidget, const char * name, bool, int )
*/
- KEditListBoxManager( QWidget *parent = 0, const char *name = 0,
+ KEditListBoxManager( TQWidget *parent = 0, const char *name = 0,
bool checkAtEntering=true, int buttons = All );
/**
* The save as above, but with other options for KEditListBox.
*/
- KEditListBoxManager( const QString& title, QWidget *parent = 0,
+ KEditListBoxManager( const TQString& title, TQWidget *parent = 0,
const char *name = 0, bool checkAtEntering=true,
int buttons = All );
/**
* The save as above, but with other options for KEditListBox.
*/
- KEditListBoxManager( const QString& title,
+ KEditListBoxManager( const TQString& title,
const KEditListBox::CustomEditor &customEditor,
- QWidget *parent = 0, const char *name = 0,
+ TQWidget *parent = 0, const char *name = 0,
bool checkAtEntering = true, int buttons = All );
/**
@@ -71,14 +71,14 @@ public:
* It is used for makeing groupnames.
* @param name The groupname
*/
- void setGroupName( const QString& name );
+ void setGroupName( const TQString& name );
/**
* Sets the subGroupName. subGroupName should contain %1 and %2.
* It is used to execute operations on a group and its subgroups.
* @param name The groupname
*/
- void setSubGroupName( const QString& name );
+ void setSubGroupName( const TQString& name );
private:
/**
* This functions is called from and only from the constructor to prevent writing the
@@ -92,17 +92,17 @@ private:
void readNames();
private:
KConfig *_config; //Stores the KConfig-object
- QString *_groupName; //Stores the groupName string.
- QString *_subGroupName;
+ TQString *_groupName; //Stores the groupName string.
+ TQString *_subGroupName;
int _prevCount;
private slots:
//These comes directly from the KEditListBox itselfs.
void slotChanged();
- void slotAdded( const QString& );
- void slotRemoved( const QString& );
+ void slotAdded( const TQString& );
+ void slotRemoved( const TQString& );
- void slotActivated( QListBoxItem* );
+ void slotActivated( TQListBoxItem* );
private:
/**
* This private method moves an item. It is called from slotChanged().
@@ -128,7 +128,7 @@ signals:
* This signal is emitted when somebody selects an item
* @param text The text of the newly selected item.
*/
- void activated( const QString& text );
+ void activated( const TQString& text );
/**
* This signal is emitted when defaults have to be set.
@@ -137,7 +137,7 @@ signals:
* @param index The number of the item.
* this config is already in the right group.
*/
- void setDefaults( const QString& name, const int index, KConfig* config );
+ void setDefaults( const TQString& name, const int index, KConfig* config );
void elementsSwapped( int, int );
void elementDeleted( int );
diff --git a/korn/kio.cpp b/korn/kio.cpp
index 4677c81cf..8015595c0 100644
--- a/korn/kio.cpp
+++ b/korn/kio.cpp
@@ -46,10 +46,10 @@
#include<klocale.h>
#include<kprocess.h>
-#include<qptrlist.h>
-#include<qregexp.h>
-#include<qvaluelist.h>
-#include<qvaluevector.h>
+#include<tqptrlist.h>
+#include<tqregexp.h>
+#include<tqvaluelist.h>
+#include<tqvaluevector.h>
#include<assert.h>
#include<ctype.h>
@@ -109,7 +109,7 @@ KKioDrop::KKioDrop()
//This class can delete mails.
_delete = new KIO_Delete( this, "kio_delete" );
- _mailurls = new QValueList<FileInfo>;
+ _mailurls = new TQValueList<FileInfo>;
}
KKioDrop::KKioDrop( KConfigGroup* )
@@ -147,21 +147,21 @@ KKioDrop::KKioDrop( KConfigGroup* )
//This class can delete mails.
_delete = new KIO_Delete( this, "kio_delete" );
- _mailurls = new QValueList<FileInfo>;
+ _mailurls = new TQValueList<FileInfo>;
//readConfigGroup( *config );
}
-void KKioDrop::setKioServer( const QString & proto, const QString & server, int port )
+void KKioDrop::setKioServer( const TQString & proto, const TQString & server, int port )
{
//Settings default for last vars; could not inline because KIO::MetaData-object is not defined in header.
setKioServer( proto, server, port, KIO::MetaData(), false, true );
}
-void KKioDrop::setKioServer(const QString & proto, const QString & server, int port, const KIO::MetaData metadata, bool ssl,
+void KKioDrop::setKioServer(const TQString & proto, const TQString & server, int port, const KIO::MetaData metadata, bool ssl,
bool setProtocol )
{
- QString auth;
+ TQString auth;
if( port == -1 )
port = _protocol->defaultPort( ssl );
@@ -192,8 +192,8 @@ void KKioDrop::setKioServer(const QString & proto, const QString & server, int p
_count->stopActiveCount();
}
-void KKioDrop::setUser(const QString & user, const QString & password,
- const QString & mailbox, const QString & auth )
+void KKioDrop::setUser(const TQString & user, const TQString & password,
+ const TQString & mailbox, const TQString & auth )
{
_kurl->setUser( user );
_password = password ;
@@ -213,12 +213,12 @@ void KKioDrop::setUser(const QString & user, const QString & password,
_count->stopActiveCount();
}
-QString KKioDrop::protocol() const
+TQString KKioDrop::protocol() const
{
return _protocol->configName();
}
-QString KKioDrop::server() const
+TQString KKioDrop::server() const
{
return _kurl->host();
}
@@ -227,19 +227,19 @@ int KKioDrop::port() const
return _kurl->port();
}
-QString KKioDrop::user() const
+TQString KKioDrop::user() const
{
return _kurl->user();
}
-QString KKioDrop::password() const
+TQString KKioDrop::password() const
{
return _password ;
}
-QString KKioDrop::mailbox() const
+TQString KKioDrop::mailbox() const
{
return _kurl->path();
}
-QString KKioDrop::auth() const
+TQString KKioDrop::auth() const
{
return ( _metadata->contains("auth")?(*_metadata)["auth"]:"" );
}
@@ -287,16 +287,16 @@ bool KKioDrop::canReadSubjects( )
return (_protocol!=0?_protocol->canReadSubjects():false);
}
-QValueVector<KornMailSubject> * KKioDrop::doReadSubjects(bool * )
+TQValueVector<KornMailSubject> * KKioDrop::doReadSubjects(bool * )
{
_subjects->doReadSubjects( this );
/*
- * A empty QValueVector is made here.
+ * A empty TQValueVector is made here.
* After that, the size is expanded to the expected number of subjects.
* This way, reallocation of memmory is minimized, and thus more efficient.
*/
- QValueVector<KornMailSubject> *vector = new QValueVector<KornMailSubject>( );
+ TQValueVector<KornMailSubject> *vector = new TQValueVector<KornMailSubject>( );
vector->reserve( _mailurls->count() );
return vector;
}
@@ -306,7 +306,7 @@ bool KKioDrop::canReadMail( )
return (_protocol!=0?_protocol->canReadMail():false);
}
-bool KKioDrop::deleteMails(QPtrList<const KornMailId> * ids, bool * /*stop*/)
+bool KKioDrop::deleteMails(TQPtrList<const KornMailId> * ids, bool * /*stop*/)
{
_delete->deleteMails( ids, this );
return _delete->valid();
@@ -317,7 +317,7 @@ bool KKioDrop::canDeleteMails ()
return (_protocol!=0?_protocol->canDeleteMail():false);
}
-QString KKioDrop::readMail(const KornMailId * item, bool * )
+TQString KKioDrop::readMail(const KornMailId * item, bool * )
{
_read->readMail( item, this );
@@ -333,9 +333,9 @@ KMailDrop* KKioDrop::clone() const
return clone;
}
-bool KKioDrop::readConfigGroup( const QMap< QString, QString > &map, const Protocol* protocol )
+bool KKioDrop::readConfigGroup( const TQMap< TQString, TQString > &map, const Protocol* protocol )
{
- QString val, val2;
+ TQString val, val2;
if( !map.contains( "server" ) || !map.contains( "port" ) || !map.contains( "ssl" ) || !map.contains( "username" ) ||
!map.contains( "mailbox" ) || !map.contains( "password" ) || !map.contains( "metadata" ) || !map.contains( "name" ) )
@@ -358,8 +358,8 @@ bool KKioDrop::readConfigGroup( const QMap< QString, QString > &map, const Proto
_kurl->setPass( *map.find( "password" ) );
- QStringList list = QStringList::split( ',', *map.find( "metadata" ) );
- QStringList::Iterator it;
+ TQStringList list = TQStringList::split( ',', *map.find( "metadata" ) );
+ TQStringList::Iterator it;
for( it = list.begin(); it != list.end(); ++it )
{
int split = (*it).find( "=" );
@@ -376,7 +376,7 @@ bool KKioDrop::readConfigGroup( const QMap< QString, QString > &map, const Proto
bool KKioDrop::writeConfigGroup( KConfigBase& cfg ) const
{
KPollableDrop::writeConfigGroup( cfg );
- /*QString p;
+ /*TQString p;
if( _kurl->hasPass() ) {
p = _kurl->pass();
@@ -429,19 +429,19 @@ void KKioDrop::deleteMailsCanceled()
}
//Private slots for displaying connection errors
-void KKioDrop::slotConnectionError( int number, const QString& arg )
+void KKioDrop::slotConnectionError( int number, const TQString& arg )
{
kdError() << KIO::buildErrorString( number, arg ) << endl;
// if( passivePopup() )
emitShowPassivePopup( KIO::buildErrorString( number, arg ) );
}
-void KKioDrop::slotConnectionWarning( const QString& msg )
+void KKioDrop::slotConnectionWarning( const TQString& msg )
{
kdWarning() << msg << endl;
}
-void KKioDrop::slotConnectionInfoMessage( const QString& msg )
+void KKioDrop::slotConnectionInfoMessage( const TQString& msg )
{
kdDebug() << msg << endl; //Display only in debug modes
}
@@ -466,10 +466,10 @@ bool KKioDrop::startProcess()
// only reading stdin yet
- connect( _process,SIGNAL(receivedStdout( KProcess *, char *, int)),
- this, SLOT(receivedStdout( KProcess *,char *,int)) );
- connect( _process, SIGNAL(processExited(KProcess*)),
- this, SLOT(processExit(KProcess*)) );
+ connect( _process,TQT_SIGNAL(receivedStdout( KProcess *, char *, int)),
+ this, TQT_SLOT(receivedStdout( KProcess *,char *,int)) );
+ connect( _process, TQT_SIGNAL(processExited(KProcess*)),
+ this, TQT_SLOT(processExit(KProcess*)) );
*_process << _kurl->path();
_process->start( KProcess::NotifyOnExit, KProcess::Stdout );
@@ -529,8 +529,8 @@ void KKioDrop::receivedStdout( KProcess *proc, char * buffer, int /*len*/ )
delete [] buf;*/
//Alternatieve code
- QString buf = buffer;
- QRegExp regexp( "^(.*\\D+|\\D*)(\\d+)\\D*$" );
+ TQString buf = buffer;
+ TQRegExp regexp( "^(.*\\D+|\\D*)(\\d+)\\D*$" );
if( regexp.search( buf ) == 0 )
{ //Number found
diff --git a/korn/kio.h b/korn/kio.h
index 8ffde2f4b..a2d396e32 100644
--- a/korn/kio.h
+++ b/korn/kio.h
@@ -54,7 +54,7 @@ private:
KURL *_kurl;
KIO::MetaData *_metadata;
- QString _password;
+ TQString _password;
bool _valid;
@@ -73,10 +73,10 @@ private:
//List of mailurls fetched by the last time emails were counted
struct FileInfo {
- QString name;
+ TQString name;
long size;
};
- QValueList<FileInfo> *_mailurls;
+ TQValueList<FileInfo> *_mailurls;
/*
* The help-classes of this functions are friend functions, because this way, they can
@@ -108,22 +108,22 @@ public:
/**
* Set the server that will be checked for new mail.
*/
- void setKioServer( const QString & proto, const QString & server, int port = -1 );
- void setKioServer( const QString & proto, const QString & server, int port,
+ void setKioServer( const TQString & proto, const TQString & server, int port = -1 );
+ void setKioServer( const TQString & proto, const TQString & server, int port,
const KIO::MetaData metadata, bool ssl, bool setProtocol = true ); //Last argument inits _protocol
/** Set the account information for the PROTO server. */
- void setUser( const QString & user, const QString & password, const QString & mailbox, const QString & auth );
+ void setUser( const TQString & user, const TQString & password, const TQString & mailbox, const TQString & auth );
// The next functions return settings
- QString protocol() const;
- QString server() const;
+ TQString protocol() const;
+ TQString server() const;
int port() const;
- QString user() const;
- QString password() const;
- QString mailbox() const;
- QString auth() const;
+ TQString user() const;
+ TQString password() const;
+ TQString mailbox() const;
+ TQString auth() const;
virtual void recheck();
virtual void forceRecheck();
@@ -136,18 +136,18 @@ public:
virtual ~KKioDrop();
virtual bool canReadSubjects(void);
- virtual QValueVector<KornMailSubject> * doReadSubjects(bool * stop);
+ virtual TQValueVector<KornMailSubject> * doReadSubjects(bool * stop);
virtual bool canDeleteMails();
- virtual bool deleteMails(QPtrList<const KornMailId> * ids, bool * stop);
+ virtual bool deleteMails(TQPtrList<const KornMailId> * ids, bool * stop);
virtual bool canReadMail ();
- virtual QString readMail(const KornMailId * id, bool * stop);
+ virtual TQString readMail(const KornMailId * id, bool * stop);
virtual KMailDrop* clone () const ;
- virtual bool readConfigGroup ( const QMap< QString, QString >& map, const Protocol * protocol );
+ virtual bool readConfigGroup ( const TQMap< TQString, TQString >& map, const Protocol * protocol );
virtual bool writeConfigGroup ( KConfigBase& cfg ) const;
- virtual QString type() const { return QString::fromUtf8("kio"); }
+ virtual TQString type() const { return TQString::fromUtf8("kio"); }
virtual bool synchrone() const { return false; } //class is not synchrone
@@ -157,8 +157,8 @@ public:
private:
KKioDrop& operator = ( const KKioDrop& );
- //static void encrypt( QString& str );
- //static void decrypt( QString& str );
+ //static void encrypt( TQString& str );
+ //static void decrypt( TQString& str );
/*
* The next functions are called from the help-classes (which are friend of the class).
@@ -172,22 +172,22 @@ private:
void emitReadSubjectsTotalSteps( int value ) { _readSubjectsTotalSteps = value; emit readSubjectsTotalSteps( value ); }
void emitReadSubjectsProgress( int value ) { emit readSubjectsProgress( _readSubjectsTotalSteps - value ); }
- void emitReadMailReady( QString* msg ) { emit readMailReady( msg ); }
+ void emitReadMailReady( TQString* msg ) { emit readMailReady( msg ); }
void emitDeleteMailsReady( bool value ) { emit deleteMailsReady( value ); }
void emitDeleteMailsTotalSteps( int value ) { _deleteMailsTotalSteps = value; emit deleteMailsTotalSteps( value ); }
void emitDeleteMailsProgress( int value ) { emit deleteMailsProgress( _deleteMailsTotalSteps - value ); }
- void emitShowPassivePopup( QPtrList< KornMailSubject > *subject, int total )
+ void emitShowPassivePopup( TQPtrList< KornMailSubject > *subject, int total )
{ emit showPassivePopup( subject, total, passiveDate(), this->realName() ); }
- void emitShowPassivePopup( const QString& error )
+ void emitShowPassivePopup( const TQString& error )
{ if( passivePopup() ) { emit showPassivePopup( error, this->realName() ); } }
void emitValidChanged() { emit validChanged( valid() ); }
private slots:
- void slotConnectionError( int, const QString& );
- void slotConnectionWarning( const QString& );
- void slotConnectionInfoMessage( const QString& );
+ void slotConnectionError( int, const TQString& );
+ void slotConnectionWarning( const TQString& );
+ void slotConnectionInfoMessage( const TQString& );
protected:
//The next functions are needed for Process;
diff --git a/korn/kio_count.cpp b/korn/kio_count.cpp
index e82827bb4..d97fa1e92 100644
--- a/korn/kio_count.cpp
+++ b/korn/kio_count.cpp
@@ -30,12 +30,12 @@
#include <kio/slave.h>
#include <kio/global.h>
#include <kurl.h>
-#include <qvaluelist.h>
+#include <tqvaluelist.h>
-#include <qstring.h>
+#include <tqstring.h>
-KIO_Count::KIO_Count( QObject * parent, const char * name )
- : QObject ( parent, name ),
+KIO_Count::KIO_Count( TQObject * parent, const char * name )
+ : TQObject ( parent, name ),
_kurl( 0 ),
_metadata( 0 ),
_protocol( 0 ),
@@ -95,9 +95,9 @@ void KIO_Count::count( KKioDrop *drop )
return;
}
- connect( _slave, SIGNAL( error( int, const QString& ) ), _kio, SLOT( slotConnectionError( int, const QString& ) ) );
- connect( _slave, SIGNAL( warning( const QString& ) ), _kio, SLOT( slotConnectionWarning( const QString& ) ) );
- connect( _slave, SIGNAL( infoMessage( const QString& ) ), _kio, SLOT( slotConnectionInfoMessage( const QString& ) ) );
+ connect( _slave, TQT_SIGNAL( error( int, const TQString& ) ), _kio, TQT_SLOT( slotConnectionError( int, const TQString& ) ) );
+ connect( _slave, TQT_SIGNAL( warning( const TQString& ) ), _kio, TQT_SLOT( slotConnectionWarning( const TQString& ) ) );
+ connect( _slave, TQT_SIGNAL( infoMessage( const TQString& ) ), _kio, TQT_SLOT( slotConnectionInfoMessage( const TQString& ) ) );
/*
* _protocol->recheckConnectKURL could have change kurl and metadata in order to have the right
@@ -113,7 +113,7 @@ void KIO_Count::count( KKioDrop *drop )
}
/* Blocking this function: no new counts can be started from now */
- _new_mailurls = new QValueList< KKioDrop::FileInfo >;
+ _new_mailurls = new TQValueList< KKioDrop::FileInfo >;
_protocol->recheckKURL( kurl, metadata );
@@ -125,9 +125,9 @@ void KIO_Count::count( KKioDrop *drop )
_job = KIO::listDir( kurl, false );
_job->addMetaData( metadata );
- connect( _job, SIGNAL( result( KIO::Job* ) ), this, SLOT( result( KIO::Job* ) ) );
- connect( _job, SIGNAL( entries( KIO::Job*, const KIO::UDSEntryList& ) ),
- this, SLOT( entries( KIO::Job*, const KIO::UDSEntryList& ) ) );
+ connect( _job, TQT_SIGNAL( result( KIO::Job* ) ), this, TQT_SLOT( result( KIO::Job* ) ) );
+ connect( _job, TQT_SIGNAL( entries( KIO::Job*, const KIO::UDSEntryList& ) ),
+ this, TQT_SLOT( entries( KIO::Job*, const KIO::UDSEntryList& ) ) );
if( _protocol->connectionBased() )
KIO::Scheduler::assignJobToSlave( _slave, _job );
@@ -140,9 +140,9 @@ void KIO_Count::stopActiveCount()
if( !_new_mailurls )
return;
- disconnect( _job, SIGNAL( result( KIO::Job* ) ), this, SLOT( result( KIO::Job* ) ) );
- disconnect( _job, SIGNAL( entries( KIO::Job*, const KIO::UDSEntryList& ) ),
- this, SLOT( entries( KIO::Job*, const KIO::UDSEntryList& ) ) );
+ disconnect( _job, TQT_SIGNAL( result( KIO::Job* ) ), this, TQT_SLOT( result( KIO::Job* ) ) );
+ disconnect( _job, TQT_SIGNAL( entries( KIO::Job*, const KIO::UDSEntryList& ) ),
+ this, TQT_SLOT( entries( KIO::Job*, const KIO::UDSEntryList& ) ) );
KIO::Scheduler::cancelJob( _job );
@@ -160,7 +160,7 @@ void KIO_Count::stopActiveCount()
delete _new_mailurls; _new_mailurls = 0;
}
-void KIO_Count::showPassive( const QString& id )
+void KIO_Count::showPassive( const TQString& id )
{
KURL kurl = *_kio->_kurl;
KIO::MetaData metadata = *_kio->_metadata;
@@ -175,8 +175,8 @@ void KIO_Count::showPassive( const QString& id )
_subjects_pending++;
- connect( subject, SIGNAL( readSubject( KornMailSubject* ) ), this, SLOT( addtoPassivePopup( KornMailSubject* ) ) );
- connect( subject, SIGNAL( finished( KIO_Single_Subject* ) ), this, SLOT( deleteSingleSubject( KIO_Single_Subject* ) ) );
+ connect( subject, TQT_SIGNAL( readSubject( KornMailSubject* ) ), this, TQT_SLOT( addtoPassivePopup( KornMailSubject* ) ) );
+ connect( subject, TQT_SIGNAL( finished( KIO_Single_Subject* ) ), this, TQT_SLOT( deleteSingleSubject( KIO_Single_Subject* ) ) );
}
void KIO_Count::disconnectSlave()
@@ -213,9 +213,9 @@ void KIO_Count::result( KIO::Job* job )
_kio->emitValidChanged();
}
- disconnect( job, SIGNAL( result( KIO::Job* ) ), this, SLOT( result( KIO::Job* ) ) );
- disconnect( job, SIGNAL( entries( KIO::Job*, const KIO::UDSEntryList& ) ),
- this, SLOT( entries( KIO::Job*, const KIO::UDSEntryList& ) ) );
+ disconnect( job, TQT_SIGNAL( result( KIO::Job* ) ), this, TQT_SLOT( result( KIO::Job* ) ) );
+ disconnect( job, TQT_SIGNAL( entries( KIO::Job*, const KIO::UDSEntryList& ) ),
+ this, TQT_SLOT( entries( KIO::Job*, const KIO::UDSEntryList& ) ) );
disconnectSlave();
@@ -242,7 +242,7 @@ void KIO_Count::result( KIO::Job* job )
//An file list is ready; now save it in _kio->_mailurls.
void KIO_Count::entries( KIO::Job* job, const KIO::UDSEntryList &list )
{
- QStringList old_list;
+ TQStringList old_list;
KIO::UDSEntryListConstIterator it1 ;
KIO::UDSEntry::ConstIterator it2 ;
KIO::MetaData metadata;
@@ -253,7 +253,7 @@ void KIO_Count::entries( KIO::Job* job, const KIO::UDSEntryList &list )
if( job != _job )
kdError() << i18n( "Got unknown job; something must be wrong..." ) << endl;
- for( QValueListConstIterator<KKioDrop::FileInfo> it = _kio->_mailurls->begin(); it != _kio->_mailurls->end(); ++it )
+ for( TQValueListConstIterator<KKioDrop::FileInfo> it = _kio->_mailurls->begin(); it != _kio->_mailurls->end(); ++it )
old_list.append( (*it).name );
for ( it1 = list.begin() ; it1 != list.end() ; it1++ )
@@ -264,7 +264,7 @@ void KIO_Count::entries( KIO::Job* job, const KIO::UDSEntryList &list )
*/
isFile=false;
KKioDrop::FileInfo fileinfo;
- fileinfo.name = QString::null;
+ fileinfo.name = TQString::null;
fileinfo.size = 0;
for ( it2 = (*it1).begin() ; it2 != (*it1).end() ; it2++ )
@@ -314,7 +314,7 @@ void KIO_Count::addtoPassivePopup( KornMailSubject* subject )
_total_new_messages++;
if( _subjects_pending == 0 )
{
- _kio->emitShowPassivePopup( dynamic_cast< QPtrList<KornMailSubject>* >( _popup_subjects ), _total_new_messages );
+ _kio->emitShowPassivePopup( dynamic_cast< TQPtrList<KornMailSubject>* >( _popup_subjects ), _total_new_messages );
delete _popup_subjects; _popup_subjects = 0;
_total_new_messages = 0;
diff --git a/korn/kio_count.h b/korn/kio_count.h
index c9a1b9f08..ed5ef584d 100644
--- a/korn/kio_count.h
+++ b/korn/kio_count.h
@@ -21,7 +21,7 @@
//This class count the number of message available.
-#include <qobject.h>
+#include <tqobject.h>
#include "kio.h" //Alsewise, no access to KKioDrop::FileInfo (needed in template)
@@ -44,7 +44,7 @@ class QString;
class KIO_Count : public QObject
{ Q_OBJECT
public:
- KIO_Count( QObject * parent = 0, const char * name = 0 );
+ KIO_Count( TQObject * parent = 0, const char * name = 0 );
~KIO_Count();
//This function starts counting
@@ -62,12 +62,12 @@ private:
KIO::MetaData *_metadata;
const KIO_Protocol *_protocol;
bool _valid;
- QValueList<KKioDrop::FileInfo> *_new_mailurls; //entries can come with more function calls.
+ TQValueList<KKioDrop::FileInfo> *_new_mailurls; //entries can come with more function calls.
int _subjects_pending;
int _total_new_messages;
SortedMailSubject *_popup_subjects;
private:
- void showPassive( const QString& );
+ void showPassive( const TQString& );
void disconnectSlave();
private slots:
diff --git a/korn/kio_delete.cpp b/korn/kio_delete.cpp
index 78c2d88ac..db27e28d9 100644
--- a/korn/kio_delete.cpp
+++ b/korn/kio_delete.cpp
@@ -30,16 +30,16 @@
#include <kio/jobclasses.h>
#include <kio/scheduler.h>
-#include <qptrlist.h>
+#include <tqptrlist.h>
-KIO_Delete::KIO_Delete( QObject * parent, const char * name ) : QObject( parent, name ),
+KIO_Delete::KIO_Delete( TQObject * parent, const char * name ) : TQObject( parent, name ),
_kio( 0 ),
_total( 0 ),
_jobs( 0 ),
_slave( 0 ),
_valid( true )
{
- _jobs = new QPtrList< KIO::Job >;
+ _jobs = new TQPtrList< KIO::Job >;
}
KIO_Delete::~KIO_Delete( )
@@ -48,7 +48,7 @@ KIO_Delete::~KIO_Delete( )
delete _jobs;
}
-bool KIO_Delete::deleteMails( QPtrList< const KornMailId > * ids, KKioDrop *drop )
+bool KIO_Delete::deleteMails( TQPtrList< const KornMailId > * ids, KKioDrop *drop )
{
KURL kurl = *drop->_kurl;
KIO::MetaData metadata = *drop->_metadata;
@@ -142,7 +142,7 @@ void KIO_Delete::deleteItem( const KornMailId *item, KURL kurl, KIO::MetaData me
else
return; //Unknown deleteFunction
- connect( job, SIGNAL( result( KIO::Job* ) ), this, SLOT( slotResult( KIO::Job* ) ) );
+ connect( job, TQT_SIGNAL( result( KIO::Job* ) ), this, TQT_SLOT( slotResult( KIO::Job* ) ) );
job->addMetaData( metadata );
@@ -161,7 +161,7 @@ void KIO_Delete::commitDelete( KURL kurl, KIO::MetaData metadata, const KIO_Prot
KIO::TransferJob *job = KIO::get( kurl, true, false );
job->addMetaData( metadata );
- connect( job, SIGNAL( result( KIO::Job* ) ), this, SLOT( slotResult( KIO::Job* ) ) );
+ connect( job, TQT_SIGNAL( result( KIO::Job* ) ), this, TQT_SLOT( slotResult( KIO::Job* ) ) );
_jobs->append( dynamic_cast< KIO::Job* >( job ) );
diff --git a/korn/kio_delete.h b/korn/kio_delete.h
index a22c6f17f..469ff29a2 100644
--- a/korn/kio_delete.h
+++ b/korn/kio_delete.h
@@ -24,7 +24,7 @@
* This class starts working when deleteMails() is called.
*/
-#include <qobject.h>
+#include <tqobject.h>
class KKioDrop;
class KIO_Protocol;
class KornMailId;
@@ -38,11 +38,11 @@ class KIO_Delete : public QObject
{ Q_OBJECT
public:
//constructors
- KIO_Delete( QObject * parent = 0, const char * name = 0 );
+ KIO_Delete( TQObject * parent = 0, const char * name = 0 );
~KIO_Delete( );
//This function should be called if there are messages to be deleted.
- bool deleteMails( QPtrList< const KornMailId > *, KKioDrop* );
+ bool deleteMails( TQPtrList< const KornMailId > *, KKioDrop* );
//This function should return false then and only then if an error occurred.
bool valid( ) { return _valid; }
@@ -61,7 +61,7 @@ private:
KKioDrop *_kio;
unsigned int _total;
- QPtrList< KIO::Job > *_jobs;
+ TQPtrList< KIO::Job > *_jobs;
KIO::Slave *_slave;
bool _valid;
};
diff --git a/korn/kio_proto.cpp b/korn/kio_proto.cpp
index a3de22723..8434fe44b 100644
--- a/korn/kio_proto.cpp
+++ b/korn/kio_proto.cpp
@@ -22,11 +22,11 @@
#include <kconfig.h>
#include <kdebug.h>
-#include <qmap.h>
+#include <tqmap.h>
-QMap< QString, QString >* KIO_Protocol::createConfig( KConfigGroup * group, const QString& password ) const
+TQMap< TQString, TQString >* KIO_Protocol::createConfig( KConfigGroup * group, const TQString& password ) const
{
- QMap< QString, QString > *result = new QMap< QString, QString >;
+ TQMap< TQString, TQString > *result = new TQMap< TQString, TQString >;
result->insert( "name", group->readEntry( "name", "" ) );
result->insert( "server", group->readEntry( "server", "" ) );
@@ -41,7 +41,7 @@ QMap< QString, QString >* KIO_Protocol::createConfig( KConfigGroup * group, cons
return result;
}
-void KIO_Protocol::clearFields( QMap<QString, QString> *map, const KIO_Protocol::Fields fields ) const
+void KIO_Protocol::clearFields( TQMap<TQString, TQString> *map, const KIO_Protocol::Fields fields ) const
{
if( fields & server )
map->insert( "server", "" );
@@ -59,14 +59,14 @@ void KIO_Protocol::clearFields( QMap<QString, QString> *map, const KIO_Protocol:
map->insert( "metadata", "" );
}
-void KIO_Protocol::readEntries( QMap< QString, QString >* map ) const
+void KIO_Protocol::readEntries( TQMap< TQString, TQString >* map ) const
{
- QMap< QString, QString> *metadata = new QMap< QString, QString >;
+ TQMap< TQString, TQString> *metadata = new TQMap< TQString, TQString >;
if( map->contains( "metadata" ) )
{
- QStringList list = QStringList::split( ",", *map->find( "metadata" ) );
- QStringList::Iterator it;
+ TQStringList list = TQStringList::split( ",", *map->find( "metadata" ) );
+ TQStringList::Iterator it;
for( it = list.begin(); it != list.end(); ++it )
{
int split = (*it).find( '=' );
diff --git a/korn/kio_proto.h b/korn/kio_proto.h
index 3770f1209..216b58263 100644
--- a/korn/kio_proto.h
+++ b/korn/kio_proto.h
@@ -29,7 +29,7 @@
class QString;
#include <kio/global.h>
#include <klocale.h>
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include "protocol.h"
#include "kio.h"
@@ -58,17 +58,17 @@ public:
virtual KMailDrop* createMaildrop( KConfigGroup* config ) const { return new KKioDrop( config ); }
- virtual QMap< QString, QString >* createConfig( KConfigGroup *group, const QString& password ) const;
+ virtual TQMap< TQString, TQString >* createConfig( KConfigGroup *group, const TQString& password ) const;
/*
* @return: the name of the kio_slave
*/
- virtual QString protocol( bool ) const { return "file"; }
+ virtual TQString protocol( bool ) const { return "file"; }
/*
* @return: the name of the protocol used by the configuration
*/
- virtual QString configName() const { return "not specified"; }
+ virtual TQString configName() const { return "not specified"; }
virtual bool connectionBased() const { return false; }
@@ -94,13 +94,13 @@ public:
/*
* This sets the string of such fields in Configuration
*/
- virtual QString serverName() const { return i18n( "Server:" ); }
- virtual QString portName() const { return i18n( "Port:" ); }
- virtual QString usernameName() const { return i18n( "Username:" ); }
- virtual QString mailboxName() const { return i18n( "Mailbox:" ); }
- virtual QString passwordName() const { return i18n( "Password:" ); }
- virtual QString savePasswordName() const { return i18n( "Save password" ); }
- virtual QString authName() const { return i18n( "Authentication:" ); }
+ virtual TQString serverName() const { return i18n( "Server:" ); }
+ virtual TQString portName() const { return i18n( "Port:" ); }
+ virtual TQString usernameName() const { return i18n( "Username:" ); }
+ virtual TQString mailboxName() const { return i18n( "Mailbox:" ); }
+ virtual TQString passwordName() const { return i18n( "Password:" ); }
+ virtual TQString savePasswordName() const { return i18n( "Save password" ); }
+ virtual TQString authName() const { return i18n( "Authentication:" ); }
/*
* The next function returns the method of deleting: some protoocols
@@ -112,7 +112,7 @@ public:
* The next options are the input for the Authentication Combo, seperated by '|'.
* The name should be the same as the auth-metadata.
*/
- virtual QStringList authList() const { return QStringList::split( '|', "Plain", false ); }
+ virtual TQStringList authList() const { return TQStringList::split( '|', "Plain", false ); }
/*
* The next functions are manipulations of an KURL.
@@ -141,8 +141,8 @@ public:
virtual const KIO_Protocol* getKIOProtocol() const { return this; }
- virtual void readEntries( QMap< QString, QString >* ) const;
- virtual void readEntries( QMap< QString, QString >*, QMap< QString, QString >* ) const = 0;
+ virtual void readEntries( TQMap< TQString, TQString >* ) const;
+ virtual void readEntries( TQMap< TQString, TQString >*, TQMap< TQString, TQString >* ) const = 0;
protected:
/*
@@ -151,7 +151,7 @@ protected:
enum Fields { no_fields = 0, server = 1, port = 2, username = 4, password = 8,
mailbox = 16, save_password = 32, metadata = 64 };
- void clearFields( QMap< QString, QString > *map, const Fields fields ) const;
+ void clearFields( TQMap< TQString, TQString > *map, const Fields fields ) const;
};
#endif //MK_KIO_PROTO_H
diff --git a/korn/kio_read.cpp b/korn/kio_read.cpp
index e1f5211e4..54466990c 100644
--- a/korn/kio_read.cpp
+++ b/korn/kio_read.cpp
@@ -30,11 +30,11 @@
#include <kio/jobclasses.h>
#include <kio/scheduler.h>
-#include <qcstring.h>
-#include <qstring.h>
+#include <tqcstring.h>
+#include <tqstring.h>
-KIO_Read::KIO_Read( QObject * parent, const char * name )
- : QObject( parent, name ),
+KIO_Read::KIO_Read( TQObject * parent, const char * name )
+ : TQObject( parent, name ),
_job( 0 ),
_message( 0 )
{
@@ -60,8 +60,8 @@ void KIO_Read::readMail( const KornMailId *& mailid, KKioDrop* drop )
_job = KIO::get( kurl, false, false );
_job->addMetaData( metadata );
- connect( _job, SIGNAL( result( KIO::Job* ) ), this, SLOT( slotResult( KIO::Job* ) ) );
- connect( _job, SIGNAL( data( KIO::Job*, const QByteArray& ) ), this, SLOT( slotData( KIO::Job*, const QByteArray & ) ) );
+ connect( _job, TQT_SIGNAL( result( KIO::Job* ) ), this, TQT_SLOT( slotResult( KIO::Job* ) ) );
+ connect( _job, TQT_SIGNAL( data( KIO::Job*, const TQByteArray& ) ), this, TQT_SLOT( slotData( KIO::Job*, const TQByteArray & ) ) );
}
void KIO_Read::canceled( )
@@ -85,7 +85,7 @@ void KIO_Read::slotResult( KIO::Job* job )
_job = 0;
}
-void KIO_Read::slotData( KIO::Job* job, const QByteArray & data )
+void KIO_Read::slotData( KIO::Job* job, const TQByteArray & data )
{
if( job != _job )
kdWarning() << i18n( "Unknown job returned; I will try if this one will do... " ) << endl;
diff --git a/korn/kio_read.h b/korn/kio_read.h
index 52dd986ab..970e3c8cc 100644
--- a/korn/kio_read.h
+++ b/korn/kio_read.h
@@ -21,7 +21,7 @@
//This class should be used if someone wants to read the Full Message
-#include <qobject.h>
+#include <tqobject.h>
class KKioDrop;
class KornMailId;
@@ -35,7 +35,7 @@ class QString;
class KIO_Read : public QObject
{ Q_OBJECT
public:
- KIO_Read( QObject * parent = 0, const char * name = 0 );
+ KIO_Read( TQObject * parent = 0, const char * name = 0 );
~KIO_Read();
public slots:
@@ -46,15 +46,15 @@ public slots:
private:
KKioDrop *_kio;
KIO::Job *_job;
- QString *_message;
+ TQString *_message;
signals:
- //This signal is emitted when the whole message is read; the message got passed as QString*
- void ready( QString* );
+ //This signal is emitted when the whole message is read; the message got passed as TQString*
+ void ready( TQString* );
private slots:
void slotResult( KIO::Job* );
- void slotData( KIO::Job*, const QByteArray& );
+ void slotData( KIO::Job*, const TQByteArray& );
};
#endif //MK_KIO_READ_H
diff --git a/korn/kio_single_subject.cpp b/korn/kio_single_subject.cpp
index cdb70733f..6d797efd8 100644
--- a/korn/kio_single_subject.cpp
+++ b/korn/kio_single_subject.cpp
@@ -31,19 +31,19 @@
#include <kio/jobclasses.h>
#include <krfcdate.h>
-#include <qregexp.h>
-#include <qcstring.h>
-#include <qstring.h>
+#include <tqregexp.h>
+#include <tqcstring.h>
+#include <tqstring.h>
-KIO_Single_Subject::KIO_Single_Subject( QObject * parent, const char * name,
+KIO_Single_Subject::KIO_Single_Subject( TQObject * parent, const char * name,
KURL &kurl, KIO::MetaData &metadata, const KIO_Protocol * protocol, KIO::Slave *& slave,
- const QString &url, const long size )
- : QObject( parent, name )
+ const TQString &url, const long size )
+ : TQObject( parent, name )
{
_kurl = new KURL( kurl );
_metadata = new KIO::MetaData( metadata );
_protocol = protocol;
- _name = new QString( url );
+ _name = new TQString( url );
_size = size;
_message = new QString;
@@ -65,9 +65,9 @@ void KIO_Single_Subject::init( KIO::Slave *& slave)
_job = KIO::get( *_kurl, false, false );
_job->addMetaData( *_metadata );
- connect( _job, SIGNAL( result( KIO::Job* ) ), this, SLOT( slotResult( KIO::Job* ) ) );
- connect( _job, SIGNAL( data (KIO::Job *, const QByteArray &) ),
- this, SLOT( slotData(KIO::Job *, const QByteArray &) ) );
+ connect( _job, TQT_SIGNAL( result( KIO::Job* ) ), this, TQT_SLOT( slotResult( KIO::Job* ) ) );
+ connect( _job, TQT_SIGNAL( data (KIO::Job *, const TQByteArray &) ),
+ this, TQT_SLOT( slotData(KIO::Job *, const TQByteArray &) ) );
if( _protocol->connectionBased( ) && slave )
KIO::Scheduler::assignJobToSlave( slave , _job );
@@ -76,15 +76,15 @@ void KIO_Single_Subject::init( KIO::Slave *& slave)
}
-void KIO_Single_Subject::parseMail( QString * message, KornMailSubject *subject, bool fullMessage )
+void KIO_Single_Subject::parseMail( TQString * message, KornMailSubject *subject, bool fullMessage )
{
- QTextStream stream( message, IO_ReadOnly );
- QString line;
- QRegExp rx_sender( "^[fF]rom: " ); //Ex: From: ...
- QRegExp rx_sender_has_name1( "^[fF]rom:\\s*(\\w+[\\w\\s]*)\\<" ); //Ex: From: A name<email@domein.country>
- QRegExp rx_sender_has_name2( "^[fF]rom:\\s*\\\"\\s*(\\w+[\\w\\s]*)\\\""); //Ex: From: "A name"<a@invalid>
- QRegExp rx_subject( "^[sS]ubject: " ); //Ex: Subject: ...
- QRegExp rx_date ( "^[dD]ate: ");
+ TQTextStream stream( message, IO_ReadOnly );
+ TQString line;
+ TQRegExp rx_sender( "^[fF]rom: " ); //Ex: From: ...
+ TQRegExp rx_sender_has_name1( "^[fF]rom:\\s*(\\w+[\\w\\s]*)\\<" ); //Ex: From: A name<email@domein.country>
+ TQRegExp rx_sender_has_name2( "^[fF]rom:\\s*\\\"\\s*(\\w+[\\w\\s]*)\\\""); //Ex: From: "A name"<a@invalid>
+ TQRegExp rx_subject( "^[sS]ubject: " ); //Ex: Subject: ...
+ TQRegExp rx_date ( "^[dD]ate: ");
bool inheader = true;
int fieldnumber = 0;
@@ -122,7 +122,7 @@ void KIO_Single_Subject::parseMail( QString * message, KornMailSubject *subject,
subject->setHeader( *message, fullMessage );
}
-void KIO_Single_Subject::slotData( KIO::Job* job, const QByteArray& data )
+void KIO_Single_Subject::slotData( KIO::Job* job, const TQByteArray& data )
{
if( job != _job )
kdWarning() << i18n( "Got invalid job; something strange happened?" ) << endl;
diff --git a/korn/kio_single_subject.h b/korn/kio_single_subject.h
index d235680ab..662d2e538 100644
--- a/korn/kio_single_subject.h
+++ b/korn/kio_single_subject.h
@@ -21,7 +21,7 @@
//This function reads a single subject
-#include <qobject.h>
+#include <tqobject.h>
class KornMailSubject;
@@ -31,21 +31,21 @@ class KIO_Protocol;
class QString;
template<class T> class QMemArray;
-typedef QMemArray<char> QByteArray;
+typedef TQMemArray<char> QByteArray;
class KIO_Single_Subject : public QObject
{ Q_OBJECT
public:
- KIO_Single_Subject( QObject * parent, const char * name, KURL &, KIO::MetaData &, const KIO_Protocol *,
- KIO::Slave *&, const QString &, const long );
+ KIO_Single_Subject( TQObject * parent, const char * name, KURL &, KIO::MetaData &, const KIO_Protocol *,
+ KIO::Slave *&, const TQString &, const long );
~KIO_Single_Subject( );
//This functions try's te parse EMail; data, sender names and so on...
- static void parseMail( QString * message, KornMailSubject *subject, bool );
+ static void parseMail( TQString * message, KornMailSubject *subject, bool );
private:
- QString *_message;
- QString *_name;
+ TQString *_message;
+ TQString *_name;
KURL *_kurl;
const KIO_Protocol *_protocol;
KIO::MetaData *_metadata;
@@ -56,7 +56,7 @@ private:
private slots:
void slotResult( KIO::Job* );
- void slotData( KIO::Job*, const QByteArray& );
+ void slotData( KIO::Job*, const TQByteArray& );
signals:
//This signal is emitted if the headers are read and put into a KornMailSubject*
diff --git a/korn/kio_subjects.cpp b/korn/kio_subjects.cpp
index ba4278ff8..2de6ac59a 100644
--- a/korn/kio_subjects.cpp
+++ b/korn/kio_subjects.cpp
@@ -27,17 +27,17 @@
#include <kio/scheduler.h>
#include <kdebug.h>
-#include <qptrlist.h>
-#include <qvaluelist.h>
-#include <qstring.h>
+#include <tqptrlist.h>
+#include <tqvaluelist.h>
+#include <tqstring.h>
-KIO_Subjects::KIO_Subjects( QObject * parent, const char * name )
- : QObject( parent, name ),
+KIO_Subjects::KIO_Subjects( TQObject * parent, const char * name )
+ : TQObject( parent, name ),
_protocol( 0 ),
_slave( 0 ),
_valid( true )
{
- _jobs = new QPtrList<KIO_Single_Subject>;
+ _jobs = new TQPtrList<KIO_Single_Subject>;
_kurl = new KURL;
_metadata = new KIO::MetaData;
@@ -54,8 +54,8 @@ KIO_Subjects::~KIO_Subjects( )
void KIO_Subjects::doReadSubjects( KKioDrop *drop )
{
- QValueList<KKioDrop::FileInfo>::ConstIterator it;
- QValueList<KKioDrop::FileInfo>::ConstIterator end_it = drop->_mailurls->end();
+ TQValueList<KKioDrop::FileInfo>::ConstIterator it;
+ TQValueList<KKioDrop::FileInfo>::ConstIterator end_it = drop->_mailurls->end();
_kio = drop;
_protocol = _kio->_protocol;
@@ -112,7 +112,7 @@ void KIO_Subjects::getConnection( )
}
}
-void KIO_Subjects::startJob( const QString &name, const long size )
+void KIO_Subjects::startJob( const TQString &name, const long size )
{
KURL kurl = *_kurl;
KIO::MetaData metadata = *_metadata;
@@ -127,8 +127,8 @@ void KIO_Subjects::startJob( const QString &name, const long size )
subject = new KIO_Single_Subject( this, name.latin1(), kurl, metadata, _protocol, _slave, name, size );
- connect( subject, SIGNAL( readSubject( KornMailSubject* ) ), this, SLOT( slotReadSubject( KornMailSubject* ) ) );
- connect( subject, SIGNAL( finished( KIO_Single_Subject* ) ), this, SLOT( slotFinished( KIO_Single_Subject* ) ) );
+ connect( subject, TQT_SIGNAL( readSubject( KornMailSubject* ) ), this, TQT_SLOT( slotReadSubject( KornMailSubject* ) ) );
+ connect( subject, TQT_SIGNAL( finished( KIO_Single_Subject* ) ), this, TQT_SLOT( slotFinished( KIO_Single_Subject* ) ) );
_jobs->append( subject );
}
diff --git a/korn/kio_subjects.h b/korn/kio_subjects.h
index c14ff43be..d51e1ec5f 100644
--- a/korn/kio_subjects.h
+++ b/korn/kio_subjects.h
@@ -21,7 +21,7 @@
//This class calls other class to read all the subjects
-#include <qobject.h>
+#include <tqobject.h>
class KKioDrop;
class KIO_Single_Subject;
class KIO_Protocol;
@@ -37,7 +37,7 @@ template<class T> class QValueList;
class KIO_Subjects : public QObject
{ Q_OBJECT
public:
- KIO_Subjects( QObject * parent, const char * name );
+ KIO_Subjects( TQObject * parent, const char * name );
~KIO_Subjects( );
//This function let it start fetching headers.
@@ -51,14 +51,14 @@ private:
KURL *_kurl;
KIO::MetaData *_metadata;
const KIO_Protocol *_protocol;
- QPtrList<KIO_Single_Subject> *_jobs;
+ TQPtrList<KIO_Single_Subject> *_jobs;
KIO::Slave *_slave;
bool _valid;
//Opens a connection.
void getConnection( );
//Start a job; the job itself is executed in KIO_Single_Subject
- void startJob( const QString&, const long );
+ void startJob( const TQString&, const long );
//Disconnect the connection
void disConnect( bool );
diff --git a/korn/kmail_proto.cpp b/korn/kmail_proto.cpp
index 15b228f39..b0b65233c 100644
--- a/korn/kmail_proto.cpp
+++ b/korn/kmail_proto.cpp
@@ -28,10 +28,10 @@
#include <kdebug.h>
#include <klocale.h>
-#include <qmap.h>
-#include <qobject.h>
-#include <qptrvector.h>
-#include <qstringlist.h>
+#include <tqmap.h>
+#include <tqobject.h>
+#include <tqptrvector.h>
+#include <tqstringlist.h>
const char* KMail_Protocol::kmailGroupName = "Account %1";
const char* KMail_Protocol::kmailKeyType = "Type";
@@ -55,7 +55,7 @@ const Protocol* KMail_Protocol::getProtocol( KConfigGroup* config ) const
{
KConfig kmailconfig( "kmailrc", true, false );
int id;
- QString type = getTypeAndConfig( config->readEntry( "kmailname" ), kmailconfig, id );
+ TQString type = getTypeAndConfig( config->readEntry( "kmailname" ), kmailconfig, id );
if( type == "imap" )
return Protocols::getProto( "imap" );
@@ -77,7 +77,7 @@ KMailDrop* KMail_Protocol::createMaildrop( KConfigGroup *config ) const
{
int id;
KConfig kmailconfig( "kmailrc", true, false );
- QString type = getTypeAndConfig( config->readEntry( "kmailname" ), kmailconfig, id );
+ TQString type = getTypeAndConfig( config->readEntry( "kmailname" ), kmailconfig, id );
if( type == "imap" || type == "cachedimap" || type == "pop" || type == "local" || type == "maildir" )
return new KKioDrop();
@@ -86,20 +86,20 @@ KMailDrop* KMail_Protocol::createMaildrop( KConfigGroup *config ) const
return 0;
}
-QMap< QString, QString > * KMail_Protocol::createConfig( KConfigGroup* config, const QString& ) const
+TQMap< TQString, TQString > * KMail_Protocol::createConfig( KConfigGroup* config, const TQString& ) const
{
- QMap< QString, QString > *result = new QMap<QString, QString>;
+ TQMap< TQString, TQString > *result = new TQMap<TQString, TQString>;
int id;
KConfig kmailconfig( "kmailrc", true, false );
//First: find the account in the configuration and get the type and id out of it.
- QString type = getTypeAndConfig( config->readEntry( "kmailname" ), kmailconfig, id );
- QString metadata;
+ TQString type = getTypeAndConfig( config->readEntry( "kmailname" ), kmailconfig, id );
+ TQString metadata;
if( type == "imap" || type == "cachedimap" )
{
//Construct metadata
if( kmailconfig.hasKey( "auth" ) )
- metadata += QString( "auth=%1," ).arg( kmailconfig.readEntry( "auth" ) );
+ metadata += TQString( "auth=%1," ).arg( kmailconfig.readEntry( "auth" ) );
if( !kmailconfig.hasKey( "use-tls" ) )
metadata += "tls=auto";
else
@@ -124,7 +124,7 @@ QMap< QString, QString > * KMail_Protocol::createConfig( KConfigGroup* config, c
{
//Constructing metadata
if( kmailconfig.hasKey( "auth" ) )
- metadata += QString( "auth=%1," ).arg( kmailconfig.readEntry( "auth" ) );
+ metadata += TQString( "auth=%1," ).arg( kmailconfig.readEntry( "auth" ) );
if( !kmailconfig.hasKey( "use-tls" ) )
metadata += "tls=auto";
else
@@ -172,44 +172,44 @@ QMap< QString, QString > * KMail_Protocol::createConfig( KConfigGroup* config, c
return result;
}
-void KMail_Protocol::configFillGroupBoxes( QStringList* lijst ) const
+void KMail_Protocol::configFillGroupBoxes( TQStringList* lijst ) const
{
lijst->append( "KMail" );
}
-void KMail_Protocol::configFields( QPtrVector< QWidget >* vector, const QObject*, QPtrList< AccountInput >* result ) const
+void KMail_Protocol::configFields( TQPtrVector< TQWidget >* vector, const TQObject*, TQPtrList< AccountInput >* result ) const
{
- QMap< QString, QString > accountList;
- QString type;
- QString name;
+ TQMap< TQString, TQString > accountList;
+ TQString type;
+ TQString name;
int nummer = kmailFirstGroup - 1;
KConfig kmailconfig( "kmailrc", true, false );
- while( kmailconfig.hasGroup( QString( kmailGroupName ).arg( ++nummer ) ) )
+ while( kmailconfig.hasGroup( TQString( kmailGroupName ).arg( ++nummer ) ) )
{
- kmailconfig.setGroup( QString( kmailGroupName ).arg( nummer ) );
- type = kmailconfig.readEntry( kmailKeyType, QString::null );
- name = kmailconfig.readEntry( kmailKeyName, QString::null );
+ kmailconfig.setGroup( TQString( kmailGroupName ).arg( nummer ) );
+ type = kmailconfig.readEntry( kmailKeyType, TQString::null );
+ name = kmailconfig.readEntry( kmailKeyName, TQString::null );
if( type == "imap" || type == "cachedimap" || type == "pop" || type == "local" )
{
accountList.insert( name, name );
}
}
- result->append( new ComboInput( (QWidget*)vector->at( 0 ), i18n( "KMail name" ), accountList, *accountList.begin(), "kmailname" ) );
+ result->append( new ComboInput( (TQWidget*)vector->at( 0 ), i18n( "KMail name" ), accountList, *accountList.begin(), "kmailname" ) );
}
-void KMail_Protocol::readEntries( QMap< QString, QString >* ) const
+void KMail_Protocol::readEntries( TQMap< TQString, TQString >* ) const
{
//The configuartion is read out on the right way
}
-void KMail_Protocol::writeEntries( QMap< QString, QString >* ) const
+void KMail_Protocol::writeEntries( TQMap< TQString, TQString >* ) const
{
//The configuartion is read out on the right way
}
-QString KMail_Protocol::readPassword( bool store, const KConfigBase& config, int id ) const
+TQString KMail_Protocol::readPassword( bool store, const KConfigBase& config, int id ) const
{
if( !store )
return "";
@@ -217,17 +217,17 @@ QString KMail_Protocol::readPassword( bool store, const KConfigBase& config, int
return KOrnPassword::readKMailPassword( id, config );
}
-QString KMail_Protocol::getTypeAndConfig( const QString& kmailname, KConfig &kmailconfig, int &id ) const
+TQString KMail_Protocol::getTypeAndConfig( const TQString& kmailname, KConfig &kmailconfig, int &id ) const
{
int nummer = kmailFirstGroup - 1;
bool found = false;
id = -1;
- while( kmailconfig.hasGroup( QString( kmailGroupName ).arg( ++nummer ) ) )
+ while( kmailconfig.hasGroup( TQString( kmailGroupName ).arg( ++nummer ) ) )
{
- kmailconfig.setGroup( QString( kmailGroupName ).arg( nummer ) );
- if( kmailconfig.readEntry( kmailKeyName, QString::null ) == kmailname )
+ kmailconfig.setGroup( TQString( kmailGroupName ).arg( nummer ) );
+ if( kmailconfig.readEntry( kmailKeyName, TQString::null ) == kmailname )
{
id = kmailconfig.readNumEntry( kmailKeyId, 0 );
found = true;
@@ -237,10 +237,10 @@ QString KMail_Protocol::getTypeAndConfig( const QString& kmailname, KConfig &kma
if( !found )
{
nummer = -1;
- return QString::null;
+ return TQString::null;
}
//The correct group is found, and kmailconfig.setGroup() is already called for the right group.
- return kmailconfig.readEntry( kmailKeyType, QString::null );
+ return kmailconfig.readEntry( kmailKeyType, TQString::null );
}
diff --git a/korn/kmail_proto.h b/korn/kmail_proto.h
index 6e055b406..9a255ad0d 100644
--- a/korn/kmail_proto.h
+++ b/korn/kmail_proto.h
@@ -67,20 +67,20 @@ public:
* @param password The password fetched out of the configuration or KWallet.
* @return A mapping containing the configuration if success, and empty mapping otherwise.
*/
- virtual QMap< QString, QString > * createConfig( KConfigGroup* config, const QString& password ) const;
+ virtual TQMap< TQString, TQString > * createConfig( KConfigGroup* config, const TQString& password ) const;
/**
* The name of thes protocol
*
* @return "kmail"
*/
- virtual QString configName() const { return "kmail"; }
+ virtual TQString configName() const { return "kmail"; }
/**
* This adds the names of the groupboxes neccesairy for configuration to list.
*
* @param list A empty list at calling; after this function, "KMail" is added, because KMail is the only group here.
*/
- virtual void configFillGroupBoxes( QStringList* list ) const;
+ virtual void configFillGroupBoxes( TQStringList* list ) const;
/**
* This filles the config fields of the configuration.
* There is only one config field, containing the accounts of KMail.
@@ -89,14 +89,14 @@ public:
* @param object An object to connect slots to.
* @param result The resulting object.
*/
- virtual void configFields( QPtrVector< QWidget >* vector, const QObject* object, QPtrList< AccountInput >* result ) const;
+ virtual void configFields( TQPtrVector< TQWidget >* vector, const TQObject* object, TQPtrList< AccountInput >* result ) const;
/**
* This can manipulate entries that are readed from the configuartion.
* This function does nothing here.
*
* @param config The configuration mapping as read from the configuration file
*/
- virtual void readEntries( QMap< QString, QString >* config ) const;
+ virtual void readEntries( TQMap< TQString, TQString >* config ) const;
/**
* This can manipulate entries that are writed to the configuartion file.
@@ -104,11 +104,11 @@ public:
*
* @param config The configuration mapping as to be written to the configuration file (can be modified)
*/
- virtual void writeEntries( QMap< QString, QString >* config ) const;
+ virtual void writeEntries( TQMap< TQString, TQString >* config ) const;
private:
- QString readPassword( bool store, const KConfigBase &config, int id ) const;
- QString getTypeAndConfig( const QString& kmailname, KConfig &config, int &nummer ) const;
+ TQString readPassword( bool store, const KConfigBase &config, int id ) const;
+ TQString getTypeAndConfig( const TQString& kmailname, KConfig &config, int &nummer ) const;
static const char* kmailGroupName;
static const char* kmailKeyName;
diff --git a/korn/kornaccountcfgimpl.cpp b/korn/kornaccountcfgimpl.cpp
index f4980ca97..43493d998 100644
--- a/korn/kornaccountcfgimpl.cpp
+++ b/korn/kornaccountcfgimpl.cpp
@@ -29,15 +29,15 @@
#include <klineedit.h>
#include <kurlrequester.h>
-#include <qcheckbox.h>
-#include <qcombobox.h>
-#include <qptrvector.h>
-#include <qlayout.h>
-#include <qmap.h>
-#include <qlabel.h>
-#include <qwidget.h>
-
-KornAccountCfgImpl::KornAccountCfgImpl( QWidget * parent, const char * name )
+#include <tqcheckbox.h>
+#include <tqcombobox.h>
+#include <tqptrvector.h>
+#include <tqlayout.h>
+#include <tqmap.h>
+#include <tqlabel.h>
+#include <tqwidget.h>
+
+KornAccountCfgImpl::KornAccountCfgImpl( TQWidget * parent, const char * name )
: KornAccountCfg( parent, name ),
_config( 0 ),
_fields( 0 ),
@@ -47,10 +47,10 @@ KornAccountCfgImpl::KornAccountCfgImpl( QWidget * parent, const char * name )
_vlayout( 0 ),
_protocolLayout( 0 ),
_groupBoxes( 0 ),
- _accountinput( new QPtrList< AccountInput >() )
+ _accountinput( new TQPtrList< AccountInput >() )
{
- connect( parent, SIGNAL( okClicked() ), this, SLOT( slotOK() ) );
- connect( parent, SIGNAL( cancelClicked() ), this, SLOT( slotCancel() ) );
+ connect( parent, TQT_SIGNAL( okClicked() ), this, TQT_SLOT( slotOK() ) );
+ connect( parent, TQT_SIGNAL( cancelClicked() ), this, TQT_SLOT( slotCancel() ) );
this->cbProtocol->insertStringList( Protocols::getProtocols() );
@@ -63,7 +63,7 @@ KornAccountCfgImpl::~KornAccountCfgImpl()
delete _accountinput;
}
-void KornAccountCfgImpl::readConfig( KConfigGroup *config, QMap< QString, QString > *entries, int boxnr, int accountnr )
+void KornAccountCfgImpl::readConfig( KConfigGroup *config, TQMap< TQString, TQString > *entries, int boxnr, int accountnr )
{
AccountInput *input;
@@ -108,8 +108,8 @@ void KornAccountCfgImpl::writeConfig()
_config->writeEntry( "protocol", this->cbProtocol->currentText() );
- QMap< QString, QString > *map = new QMap< QString, QString >;
- QMap< QString, QString >::ConstIterator it;
+ TQMap< TQString, TQString > *map = new TQMap< TQString, TQString >;
+ TQMap< TQString, TQString >::ConstIterator it;
for( input = _accountinput->first(); input; input = _accountinput->next() )
map->insert( input->configName(), input->value() );
@@ -149,8 +149,8 @@ void KornAccountCfgImpl::slotSSLChanged()
ssl = true;
for( input = _accountinput->first(); input; input = _accountinput->next() )
- if( input->configName() == "port" && ( input->value() == QString::number( protocol->defaultPort( !ssl ) ) ) )
- input->setValue( QString::number( protocol->defaultPort( ssl ) ) );
+ if( input->configName() == "port" && ( input->value() == TQString::number( protocol->defaultPort( !ssl ) ) ) )
+ input->setValue( TQString::number( protocol->defaultPort( ssl ) ) );
}
void KornAccountCfgImpl::slotOK()
@@ -162,10 +162,10 @@ void KornAccountCfgImpl::slotCancel()
{
}
-void KornAccountCfgImpl::slotProtocolChanged( const QString& proto )
+void KornAccountCfgImpl::slotProtocolChanged( const TQString& proto )
{
const Protocol *protocol = Protocols::getProto( proto );
- QStringList *groupBoxes = new QStringList;
+ TQStringList *groupBoxes = new QStringList;
int counter = 1;
protocol->configFillGroupBoxes( groupBoxes );
@@ -174,21 +174,21 @@ void KornAccountCfgImpl::slotProtocolChanged( const QString& proto )
delete _groupBoxes;
delete _protocolLayout;
delete _vlayout;
- _vlayout = new QVBoxLayout( this->server_tab, groupBoxes->count() + 1 );
+ _vlayout = new TQVBoxLayout( this->server_tab, groupBoxes->count() + 1 );
_vlayout->setSpacing( 10 );
_vlayout->setMargin( 10 );
- _protocolLayout = new QHBoxLayout( _vlayout );
+ _protocolLayout = new TQHBoxLayout( _vlayout );
_protocolLayout->addWidget( this->lbProtocol );
_protocolLayout->addWidget( this->cbProtocol );
- QStringList::iterator it;
+ TQStringList::iterator it;
counter = 0;
- _groupBoxes = new QPtrVector< QWidget >( groupBoxes->count() );
+ _groupBoxes = new TQPtrVector< TQWidget >( groupBoxes->count() );
_groupBoxes->setAutoDelete( true );
for( it = groupBoxes->begin(); it != groupBoxes->end(); ++it )
{
- _groupBoxes->insert( counter, new QGroupBox( (*it), this->server_tab, "groupbox" ) );
+ _groupBoxes->insert( counter, new TQGroupBox( (*it), this->server_tab, "groupbox" ) );
_vlayout->addWidget( _groupBoxes->at( counter ) );
++counter;
}
@@ -200,7 +200,7 @@ void KornAccountCfgImpl::slotProtocolChanged( const QString& proto )
for( unsigned int groupCounter = 0; groupCounter < _groupBoxes->count(); ++groupCounter )
{
int counter = 0;
- QGridLayout *grid = new QGridLayout( _groupBoxes->at( groupCounter ), 0, 2 );
+ TQGridLayout *grid = new TQGridLayout( _groupBoxes->at( groupCounter ), 0, 2 );
grid->setSpacing( 10 );
grid->setMargin( 15 );
for( input = _accountinput->first(); input; input = _accountinput->next() )
diff --git a/korn/kornaccountcfgimpl.h b/korn/kornaccountcfgimpl.h
index 1bbb44c3b..bfaf5c517 100644
--- a/korn/kornaccountcfgimpl.h
+++ b/korn/kornaccountcfgimpl.h
@@ -38,17 +38,17 @@ template< class T > class QPtrVector;
class KornAccountCfgImpl : public KornAccountCfg
{ Q_OBJECT
public:
- KornAccountCfgImpl( QWidget * parent = 0, const char * name = 0 );
+ KornAccountCfgImpl( TQWidget * parent = 0, const char * name = 0 );
~KornAccountCfgImpl();
- void readConfig( KConfigGroup *config, QMap< QString, QString > *entries, int boxnr, int accountnr );
+ void readConfig( KConfigGroup *config, TQMap< TQString, TQString > *entries, int boxnr, int accountnr );
void writeConfig();
public slots:
void slotSSLChanged();
protected slots:
- virtual void slotProtocolChanged( const QString& );
+ virtual void slotProtocolChanged( const TQString& );
private slots:
void slotOK();
@@ -59,11 +59,11 @@ private:
int _urlfields;
int _boxnr, _accountnr;
- QVBoxLayout *_vlayout;
- QHBoxLayout *_protocolLayout;
- QPtrVector< QWidget > *_groupBoxes;
+ TQVBoxLayout *_vlayout;
+ TQHBoxLayout *_protocolLayout;
+ TQPtrVector< TQWidget > *_groupBoxes;
- QPtrList< AccountInput > *_accountinput;
+ TQPtrList< AccountInput > *_accountinput;
};
#endif //MK_KORNACCOUNTCFGIMPL_H
diff --git a/korn/kornboxcfgimpl.cpp b/korn/kornboxcfgimpl.cpp
index 6ab6ce5e0..5667a5f28 100644
--- a/korn/kornboxcfgimpl.cpp
+++ b/korn/kornboxcfgimpl.cpp
@@ -32,13 +32,13 @@ class KConfig;
#include <kicondialog.h>
#include <kurlrequester.h>
-#include <qcheckbox.h>
-#include <qcolor.h>
-#include <qfont.h>
-#include <qlabel.h>
-#include <qstring.h>
+#include <tqcheckbox.h>
+#include <tqcolor.h>
+#include <tqfont.h>
+#include <tqlabel.h>
+#include <tqstring.h>
-KornBoxCfgImpl::KornBoxCfgImpl( QWidget * parent, const char * name )
+KornBoxCfgImpl::KornBoxCfgImpl( TQWidget * parent, const char * name )
: KornBoxCfg( parent, name ),
_config( 0 ),
_base( 0 ),
@@ -56,13 +56,13 @@ KornBoxCfgImpl::KornBoxCfgImpl( QWidget * parent, const char * name )
if( lbRight->text() == "Right" )
lbRight->setText( i18n( "Right" ) );
- connect( parent, SIGNAL( okClicked() ), this, SLOT( slotOK() ) );
- connect( parent, SIGNAL( cancelClicked() ), this, SLOT( slotCancel() ) );
+ connect( parent, TQT_SIGNAL( okClicked() ), this, TQT_SLOT( slotOK() ) );
+ connect( parent, TQT_SIGNAL( cancelClicked() ), this, TQT_SLOT( slotCancel() ) );
elbAccounts->setTitle( i18n( "Accounts" ) );
- connect( elbAccounts, SIGNAL( elementsSwapped( int, int ) ), this, SLOT( slotAccountsSwapped( int, int ) ) );
- connect( elbAccounts, SIGNAL( elementDeleted( int ) ), this, SLOT( slotAccountDeleted( int ) ) );
+ connect( elbAccounts, TQT_SIGNAL( elementsSwapped( int, int ) ), this, TQT_SLOT( slotAccountsSwapped( int, int ) ) );
+ connect( elbAccounts, TQT_SIGNAL( elementDeleted( int ) ), this, TQT_SLOT( slotAccountDeleted( int ) ) );
}
KornBoxCfgImpl::~KornBoxCfgImpl()
@@ -78,7 +78,7 @@ void KornBoxCfgImpl::readConfig( KConfig * config, const int index )
_config = config;
_index = index;
- _config->setGroup( QString( "korn-%1" ).arg( index ) );
+ _config->setGroup( TQString( "korn-%1" ).arg( index ) );
readViewConfig();
readEventConfig();
@@ -88,7 +88,7 @@ void KornBoxCfgImpl::readConfig( KConfig * config, const int index )
void KornBoxCfgImpl::writeConfig( KConfig * config, const int index )
{
- config->setGroup( QString( "korn-%1" ).arg( index ) );
+ config->setGroup( TQString( "korn-%1" ).arg( index ) );
writeViewConfig( config );
writeEventConfig( config );
@@ -155,7 +155,7 @@ void KornBoxCfgImpl::readEventConfig()
void KornBoxCfgImpl::readAccountsConfig()
{
- elbAccounts->setGroupName( QString( "korn-%1-%2" ).arg( _index ) );
+ elbAccounts->setGroupName( TQString( "korn-%1-%2" ).arg( _index ) );
elbAccounts->setConfig( _config );
}
@@ -167,7 +167,7 @@ void KornBoxCfgImpl::readDCOPConfig()
void KornBoxCfgImpl::writeViewConfig( KConfig* config )
{
- QColor invalid;
+ TQColor invalid;
config->writeEntry( "hasnormalfgcolour", this->chNormalText->isChecked() );
config->writeEntry( "normalfgcolour", this->chNormalText->isChecked() ? this->cbNormalText->color() : invalid );
@@ -184,9 +184,9 @@ void KornBoxCfgImpl::writeViewConfig( KConfig* config )
config->writeEntry( "newicon", this->chNewIcon->isChecked() ? this->ibNewIcon->icon() : "" );
config->writeEntry( "hasnormalfont", this->chNormalFont->isChecked() );
- config->writeEntry( "normalfont", this->chNormalFont->isChecked() ? *_fonts[ 0 ] : QFont() );
+ config->writeEntry( "normalfont", this->chNormalFont->isChecked() ? *_fonts[ 0 ] : TQFont() );
config->writeEntry( "hasnewfont", this->chNewFont->isChecked() );
- config->writeEntry( "newfont", this->chNewFont->isChecked() ? *_fonts[ 1 ] : QFont() );
+ config->writeEntry( "newfont", this->chNewFont->isChecked() ? *_fonts[ 1 ] : TQFont() );
config->writeEntry( "hasnormalanim", this->chNormalAnim->isChecked() );
config->writeEntry( "normalanim", this->chNormalAnim->isChecked() ? *_anims[ 0 ] : "" );
config->writeEntry( "hasnewanim", this->chNewAnim->isChecked() );
@@ -247,12 +247,12 @@ void KornBoxCfgImpl::slotEditBox()
_base->setMainWidget( widget );
- connect( _base, SIGNAL( finished() ), this, SLOT( slotDialogDestroyed() ) );
+ connect( _base, TQT_SIGNAL( finished() ), this, TQT_SLOT( slotDialogDestroyed() ) );
- _group = new KConfigGroup( _config, QString( "korn-%1-%2" ).
+ _group = new KConfigGroup( _config, TQString( "korn-%1-%2" ).
arg( _index ).arg(elbAccounts->listBox()->currentItem() ) );
- QMap< QString, QString > *map = new QMap< QString, QString >( _config->entryMap( QString( "korn-%1-%2" ).
+ TQMap< TQString, TQString > *map = new TQMap< TQString, TQString >( _config->entryMap( TQString( "korn-%1-%2" ).
arg( _index ).arg(elbAccounts->listBox()->currentItem() ) ) );
widget->readConfig( _group, map, _index, elbAccounts->listBox()->currentItem() );
delete map;
@@ -260,7 +260,7 @@ void KornBoxCfgImpl::slotEditBox()
_base->show();
}
-void KornBoxCfgImpl::slotActivated( const QString& )
+void KornBoxCfgImpl::slotActivated( const TQString& )
{
slotEditBox();
}
@@ -270,17 +270,17 @@ void KornBoxCfgImpl::slotActivated( const int )
slotEditBox();
}
-void KornBoxCfgImpl::slotSetDefaults( const QString& name, const int, KConfig* config )
+void KornBoxCfgImpl::slotSetDefaults( const TQString& name, const int, KConfig* config )
{
config->writeEntry( "name", name );
config->writeEntry( "protocol", "mbox" );
- config->writeEntry( "host", QString::null );
- config->writeEntry( "port", QString::null );
- config->writeEntry( "username", QString::null );
+ config->writeEntry( "host", TQString::null );
+ config->writeEntry( "port", TQString::null );
+ config->writeEntry( "username", TQString::null );
config->writeEntry( "mailbox", "/var/spool/mail/" );
config->writeEntry( "savepassword", 0 );
- config->writeEntry( "password", QString::null );
- config->writeEntry( "auth", QString::null );
+ config->writeEntry( "password", TQString::null );
+ config->writeEntry( "auth", TQString::null );
config->writeEntry( "interval", 300 );
config->writeEntry( "boxsettings", true );
config->writeEntry( "command", "" );
diff --git a/korn/kornboxcfgimpl.h b/korn/kornboxcfgimpl.h
index 3a3ea2eec..23b6bf53c 100644
--- a/korn/kornboxcfgimpl.h
+++ b/korn/kornboxcfgimpl.h
@@ -32,7 +32,7 @@ class QWidget;
class KornBoxCfgImpl : public KornBoxCfg
{ Q_OBJECT
public:
- KornBoxCfgImpl( QWidget *parent, const char * name );
+ KornBoxCfgImpl( TQWidget *parent, const char * name );
~KornBoxCfgImpl();
/**
@@ -66,14 +66,14 @@ private:
KConfigGroup *_group;
KDialogBase *_base;
int _index;
- QString *_anims[ 2 ];
- QFont *_fonts[ 2 ];
+ TQString *_anims[ 2 ];
+ TQFont *_fonts[ 2 ];
protected slots:
virtual void slotEditBox();
- virtual void slotActivated( const QString& );
+ virtual void slotActivated( const TQString& );
virtual void slotActivated( const int );
- virtual void slotSetDefaults( const QString&, const int, KConfig* );
+ virtual void slotSetDefaults( const TQString&, const int, KConfig* );
virtual void slotChangeNormalAnim();
virtual void slotChangeNewAnim();
virtual void slotChangeNormalFont();
diff --git a/korn/korncfgimpl.cpp b/korn/korncfgimpl.cpp
index 6860c17e9..ae49765cf 100644
--- a/korn/korncfgimpl.cpp
+++ b/korn/korncfgimpl.cpp
@@ -27,17 +27,17 @@
#include <kdialogbase.h>
#include <klocale.h>
-#include <qcolor.h>
-#include <qcheckbox.h>
-#include <qradiobutton.h>
-#include <qstring.h>
-#include <qtimer.h>
+#include <tqcolor.h>
+#include <tqcheckbox.h>
+#include <tqradiobutton.h>
+#include <tqstring.h>
+#include <tqtimer.h>
/*
* parent should be of type KDialogBase
*/
-KornCfgImpl::KornCfgImpl( QWidget * parent, const char * name )
+KornCfgImpl::KornCfgImpl( TQWidget * parent, const char * name )
: KornCfgWidget( parent, name ),
_config( new KConfig( "kornrc" ) ),
_base( 0 )
@@ -47,12 +47,12 @@ KornCfgImpl::KornCfgImpl( QWidget * parent, const char * name )
elbBoxes->setConfig( _config );
elbBoxes->setTitle( i18n( "Boxes" ) );
- connect( parent, SIGNAL( okClicked() ), this, SLOT( slotOK() ) );
- connect( parent, SIGNAL( cancelClicked() ), this, SLOT( slotCancel() ) );
- connect( parent, SIGNAL( applyClicked() ), this, SLOT( slotApply() ) );
+ connect( parent, TQT_SIGNAL( okClicked() ), this, TQT_SLOT( slotOK() ) );
+ connect( parent, TQT_SIGNAL( cancelClicked() ), this, TQT_SLOT( slotCancel() ) );
+ connect( parent, TQT_SIGNAL( applyClicked() ), this, TQT_SLOT( slotApply() ) );
- connect( elbBoxes, SIGNAL( elementsSwapped( int, int ) ), this, SLOT( slotElementsSwapped( int, int ) ) );
- connect( elbBoxes, SIGNAL( elementDeleted( int ) ), this, SLOT( slotElementDeleted( int ) ) );
+ connect( elbBoxes, TQT_SIGNAL( elementsSwapped( int, int ) ), this, TQT_SLOT( slotElementsSwapped( int, int ) ) );
+ connect( elbBoxes, TQT_SIGNAL( elementDeleted( int ) ), this, TQT_SLOT( slotElementDeleted( int ) ) );
readConfig();
}
@@ -74,7 +74,7 @@ void KornCfgImpl::slotEditBox()
KDialogBase::Ok | KDialogBase::Cancel, KDialogBase::Ok, true );
KornBoxCfgImpl *widget = new KornBoxCfgImpl( _base, "Box Widget" );
- connect( _base, SIGNAL( finished() ), this, SLOT( slotDialogDestroyed() ) );
+ connect( _base, TQT_SIGNAL( finished() ), this, TQT_SLOT( slotDialogDestroyed() ) );
_base->setMainWidget( widget );
widget->readConfig( _config, elbBoxes->listBox()->currentItem() );
@@ -91,10 +91,10 @@ void KornCfgImpl::slotDialogDestroyed()
void KornCfgImpl::slotElementsSwapped( int box1, int box2 )
{
int accountnumber1 = 0, accountnumber2 = 0;
- while( _config->hasGroup( QString( "korn-%1-%2" ).arg( box1 ).arg( accountnumber1 ) ) )
+ while( _config->hasGroup( TQString( "korn-%1-%2" ).arg( box1 ).arg( accountnumber1 ) ) )
++accountnumber1;
- while( _config->hasGroup( QString( "korn-%1-%2" ).arg( box2 ).arg( accountnumber2 ) ) )
+ while( _config->hasGroup( TQString( "korn-%1-%2" ).arg( box2 ).arg( accountnumber2 ) ) )
++accountnumber2;
KOrnPassword::swapKOrnWalletPasswords( box1, accountnumber1, box2, accountnumber2 );
@@ -103,14 +103,14 @@ void KornCfgImpl::slotElementsSwapped( int box1, int box2 )
void KornCfgImpl::slotElementDeleted( int box )
{
int accountnumber = 0;
- while( _config->hasGroup( QString( "korn-%1-%2" ).arg( box ).arg( accountnumber ) ) )
+ while( _config->hasGroup( TQString( "korn-%1-%2" ).arg( box ).arg( accountnumber ) ) )
{
KOrnPassword::deleteKOrnPassword( box, accountnumber );
++accountnumber;
}
}
-void KornCfgImpl::slotActivated( const QString& )
+void KornCfgImpl::slotActivated( const TQString& )
{
slotEditBox();
}
@@ -120,7 +120,7 @@ void KornCfgImpl::slotActivated( const int )
slotEditBox();
}
-void KornCfgImpl::slotSetDefaults( const QString& name, const int index, KConfig* config )
+void KornCfgImpl::slotSetDefaults( const TQString& name, const int index, KConfig* config )
{
config->writeEntry( "name", name );
config->writeEntry( "hasnormalfgcolour", true );
@@ -133,12 +133,12 @@ void KornCfgImpl::slotSetDefaults( const QString& name, const int index, KConfig
config->writeEntry( "hasnewanim", false );
config->writeEntry( "normalfgcolour", Qt::black );
config->writeEntry( "newfgcolour", Qt::black );
- config->writeEntry( "normalbgcolour", QString::null );
- config->writeEntry( "newbgcolour", QString::null );
- config->writeEntry( "normalicon", QString::null );
- config->writeEntry( "newicon", QString::null );
- config->writeEntry( "normalanim", QString::null );
- config->writeEntry( "newanim", QString::null );
+ config->writeEntry( "normalbgcolour", TQString::null );
+ config->writeEntry( "newbgcolour", TQString::null );
+ config->writeEntry( "normalicon", TQString::null );
+ config->writeEntry( "newicon", TQString::null );
+ config->writeEntry( "normalanim", TQString::null );
+ config->writeEntry( "newanim", TQString::null );
config->writeEntry( "leftrecheck", true );
config->writeEntry( "middlerecheck", false );
config->writeEntry( "rightrecheck", false );
@@ -160,17 +160,17 @@ void KornCfgImpl::slotSetDefaults( const QString& name, const int index, KConfig
config->writeEntry( "passivepopup", false );
config->writeEntry( "passivedate", false );
config->writeEntry( "numaccounts", 1 );
- config->writeEntry( "dcop", QStringList() );
- config->setGroup( QString( "korn-%1-0" ).arg( index ) );
+ config->writeEntry( "dcop", TQStringList() );
+ config->setGroup( TQString( "korn-%1-0" ).arg( index ) );
config->writeEntry( "name", name );
config->writeEntry( "protocol", "mbox" );
- config->writeEntry( "server", QString::null );
- config->writeEntry( "port", QString::null );
- config->writeEntry( "username", QString::null );
+ config->writeEntry( "server", TQString::null );
+ config->writeEntry( "port", TQString::null );
+ config->writeEntry( "username", TQString::null );
config->writeEntry( "mailbox", "/var/spool/mail/" );
config->writeEntry( "savepassword", 0 );
- config->writeEntry( "password", QString::null );
- config->writeEntry( "auth", QString::null );
+ config->writeEntry( "password", TQString::null );
+ config->writeEntry( "auth", TQString::null );
config->writeEntry( "interval", 300 );
config->writeEntry( "boxsettings", true );
config->writeEntry( "command", "" );
@@ -198,10 +198,10 @@ void KornCfgImpl::readConfig()
{
_config->setGroup( "korn" );
- QChar layout = _config->readEntry( "layout" ).stripWhiteSpace()[0].upper();
- if( layout == QChar( 'H' ) )
+ TQChar layout = _config->readEntry( "layout" ).stripWhiteSpace()[0].upper();
+ if( layout == TQChar( 'H' ) )
rbHorizontal->setChecked( true );
- else if( layout == QChar( 'V' ) )
+ else if( layout == TQChar( 'V' ) )
rbVertical->setChecked( true );
else
rbDocked->setChecked( true );
@@ -236,12 +236,12 @@ void KornCfgImpl::rewritePasswords()
int account = 0 - 1;
KConfigGroup *group;
- while( _config->hasGroup( QString( "korn-%1" ).arg( ++box ) ) )
+ while( _config->hasGroup( TQString( "korn-%1" ).arg( ++box ) ) )
{
account = 0 - 1;
- while( _config->hasGroup( QString( "korn-%1-%2" ).arg( box ).arg( ++account ) ) )
+ while( _config->hasGroup( TQString( "korn-%1-%2" ).arg( box ).arg( ++account ) ) )
{
- group = new KConfigGroup( _config, QString( "korn-%1-%2" ).arg( box ).arg( account ) );
+ group = new KConfigGroup( _config, TQString( "korn-%1-%2" ).arg( box ).arg( account ) );
KOrnPassword::rewritePassword( box, account, *group, chUseWallet->isChecked() );
delete group;
}
diff --git a/korn/korncfgimpl.h b/korn/korncfgimpl.h
index fc86a4fad..322ba3d54 100644
--- a/korn/korncfgimpl.h
+++ b/korn/korncfgimpl.h
@@ -30,7 +30,7 @@ class QString;
class KornCfgImpl : public KornCfgWidget
{ Q_OBJECT
public:
- KornCfgImpl( QWidget * parent = 0, const char * name = 0 );
+ KornCfgImpl( TQWidget * parent = 0, const char * name = 0 );
~KornCfgImpl();
private slots:
@@ -39,9 +39,9 @@ private slots:
void slotElementDeleted( int box );
protected slots:
virtual void slotEditBox();
- virtual void slotActivated( const QString& );
+ virtual void slotActivated( const TQString& );
virtual void slotActivated( const int );
- virtual void slotSetDefaults( const QString&, const int, KConfig* );
+ virtual void slotSetDefaults( const TQString&, const int, KConfig* );
public slots:
virtual void slotOK();
virtual void slotCancel();
diff --git a/korn/kornshell.cpp b/korn/kornshell.cpp
index 3e87ba42f..4fccd0754 100644
--- a/korn/kornshell.cpp
+++ b/korn/kornshell.cpp
@@ -30,10 +30,10 @@
#include <kdialogbase.h>
#include <klocale.h>
-#include <qtimer.h>
+#include <tqtimer.h>
-KornShell::KornShell( QWidget * parent, const char * name )
- : QWidget( parent, name ),
+KornShell::KornShell( TQWidget * parent, const char * name )
+ : TQWidget( parent, name ),
_config( new KConfig( "kornrc" ) ),
_box( 0 ),
_configDialog( 0 ),
@@ -43,7 +43,7 @@ KornShell::KornShell( QWidget * parent, const char * name )
if( kapp->isRestored() )
{
_config->setGroup( "korn" );
- QTimer::singleShot( _config->readNumEntry( "session_startup_delay", 2000 ), this, SLOT(readConfig()) );
+ TQTimer::singleShot( _config->readNumEntry( "session_startup_delay", 2000 ), this, TQT_SLOT(readConfig()) );
kdDebug() << "startup delayed" << endl;
}
else
@@ -84,8 +84,8 @@ void KornShell::optionDlg()
KornCfgImpl *widget = new KornCfgImpl( _configDialog, "Configuration widget" );
_configDialog->setMainWidget( widget );
- connect( _configDialog, SIGNAL( finished() ), this, SLOT( slotDialogClosed() ) );
- connect( _configDialog, SIGNAL( applyClicked() ), this, SLOT( slotApply() ) );
+ connect( _configDialog, TQT_SIGNAL( finished() ), this, TQT_SLOT( slotDialogClosed() ) );
+ connect( _configDialog, TQT_SIGNAL( applyClicked() ), this, TQT_SLOT( slotApply() ) );
_configDialog->show();
}
@@ -95,7 +95,7 @@ void KornShell::readConfig()
static bool shownConfig = false;
_config->setGroup( "korn" );
- QChar layout = _config->readEntry( "layout", "Docked" )[0].upper();
+ TQChar layout = _config->readEntry( "layout", "Docked" )[0].upper();
KOrnPassword::setUseWallet( _config->readBoolEntry( "usewallet", false ) );
if( layout == 'H' )
@@ -105,7 +105,7 @@ void KornShell::readConfig()
else
_box = new DockedContainer( this, "docked container" );
- connect( _box, SIGNAL( showConfiguration() ), this, SLOT( optionDlg() ) );
+ connect( _box, TQT_SIGNAL( showConfiguration() ), this, TQT_SLOT( optionDlg() ) );
_box->readConfig( _config );
diff --git a/korn/kornshell.h b/korn/kornshell.h
index b999bfed4..1e94173af 100644
--- a/korn/kornshell.h
+++ b/korn/kornshell.h
@@ -24,7 +24,7 @@ class KDialogBase;
class KConfig;
-#include <qwidget.h>
+#include <tqwidget.h>
/**
* This is a rewritten KornShell class. It is rewritten because the depending classes changed.
@@ -32,7 +32,7 @@ class KConfig;
class KornShell : public QWidget
{ Q_OBJECT
public:
- KornShell( QWidget * parent = 0, const char * name = 0 );
+ KornShell( TQWidget * parent = 0, const char * name = 0 );
~KornShell();
void show();
diff --git a/korn/label.h b/korn/label.h
index d3c87ae9c..18d4cb298 100644
--- a/korn/label.h
+++ b/korn/label.h
@@ -19,20 +19,20 @@
#ifndef MK_LABEL_H
#define MK_LABEL_H
-#include <qlabel.h>
-#include <qevent.h>
+#include <tqlabel.h>
+#include <tqevent.h>
/**
- * A simple overriding of the QLabel class to get a mouseButtonPressed() signal
+ * A simple overriding of the TQLabel class to get a mouseButtonPressed() signal
*/
class Label : public QLabel
{ Q_OBJECT
public:
- Label( QWidget * parent = 0, const char * name = 0 ) : QLabel( parent, name ) {}
+ Label( TQWidget * parent = 0, const char * name = 0 ) : TQLabel( parent, name ) {}
virtual ~Label() {}
protected:
- virtual void mousePressEvent( QMouseEvent *e ) { emit mouseButtonPressed( e->button() ); }
+ virtual void mousePressEvent( TQMouseEvent *e ) { emit mouseButtonPressed( e->button() ); }
signals:
/**
* Emitted when a button is pressed.
diff --git a/korn/maildir_proto.h b/korn/maildir_proto.h
index b3b7ae3a1..2ce5e9dbb 100644
--- a/korn/maildir_proto.h
+++ b/korn/maildir_proto.h
@@ -33,8 +33,8 @@ public:
virtual KIO_Protocol * clone() const { return new Maildir_Protocol; }
- virtual QString protocol() const { return "file"; }
- virtual QString configName() const { return "maildir"; }
+ virtual TQString protocol() const { return "file"; }
+ virtual TQString configName() const { return "maildir"; }
virtual bool canReadSubjects() const { return true; }
virtual bool canDeleteMail() const { return true; }
@@ -44,7 +44,7 @@ public:
virtual int fields() const { return server | mailbox; }
virtual int urlFields() const { return no_fields; }
- virtual QString serverName() const { return i18n( "Path:" ); }
+ virtual TQString serverName() const { return i18n( "Path:" ); }
virtual void recheckKURL( KURL &kurl, KIO::MetaData & )
{ kurl.setPath( kurl.host() + "/." + kurl.path().replace( '/' , '.' ) + "/new" ); kurl.setHost( "" ); }
diff --git a/korn/maildlg.cpp b/korn/maildlg.cpp
index 3e6cd4cce..086796c8a 100644
--- a/korn/maildlg.cpp
+++ b/korn/maildlg.cpp
@@ -1,24 +1,24 @@
#include "maildlg.h"
-#include <qlayout.h>
+#include <tqlayout.h>
#include<kdebug.h>
#include<klocale.h>
-#include<qapplication.h>
+#include<tqapplication.h>
#include "mailsubject.h"
-#include <qprogressdialog.h>
+#include <tqprogressdialog.h>
#include "maildrop.h"
-KornMailDlg::KornMailDlg( QWidget *parent )
+KornMailDlg::KornMailDlg( TQWidget *parent )
: KDialogBase( parent, "maildialog", true, i18n("Mail Details"), User1|Close, Close, true, KGuiItem(i18n("&Full Message"))),
_progress( 0 )
{
- 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() );
_editCtrl = new KEdit(page);
topLayout->addWidget(_editCtrl, 10);
_editCtrl->setReadOnly(true);
- connect(this, SIGNAL(user1Clicked()), this, SLOT(showFullMessage()));
- setInitialSize(QSize(QApplication::desktop()->width()*9/10, QApplication::desktop()->height()/2));
+ connect(this, TQT_SIGNAL(user1Clicked()), this, TQT_SLOT(showFullMessage()));
+ setInitialSize(TQSize(TQApplication::desktop()->width()*9/10, TQApplication::desktop()->height()/2));
}
KornMailDlg::~KornMailDlg()
@@ -36,7 +36,7 @@ void KornMailDlg::showFullMessage()
_loadMailCanceled = false;
// create progress dialog
- _progress = new QProgressDialog(this, "bla", TRUE);
+ _progress = new TQProgressDialog(this, "bla", TRUE);
_progress->setMinimumDuration(0);
_progress->setLabelText(i18n("Loading full mail. Please wait..."));
@@ -46,19 +46,19 @@ void KornMailDlg::showFullMessage()
qApp->processEvents();
// connect the mailbox with the progress dialog in case it supports progress bars
- connect(_mailDrop, SIGNAL(readMailTotalSteps(int)), _progress, SLOT(setTotalSteps(int)));
- connect(_mailDrop, SIGNAL(readMailProgress(int)), _progress, SLOT(setProgress(int)));
+ connect(_mailDrop, TQT_SIGNAL(readMailTotalSteps(int)), _progress, TQT_SLOT(setTotalSteps(int)));
+ connect(_mailDrop, TQT_SIGNAL(readMailProgress(int)), _progress, TQT_SLOT(setProgress(int)));
qApp->processEvents();
// connect the mailbox's cancel button
- connect(_progress, SIGNAL(canceled()), this, SLOT(loadMailCanceled()));
+ connect(_progress, TQT_SIGNAL(canceled()), this, TQT_SLOT(loadMailCanceled()));
- connect(_mailDrop, SIGNAL(readMailReady(QString*)), this, SLOT(readMailReady(QString*)));
+ connect(_mailDrop, TQT_SIGNAL(readMailReady(TQString*)), this, TQT_SLOT(readMailReady(TQString*)));
// now load the mail fully
if( _mailDrop->synchrone() )
{
- QString mail = _mailDrop->readMail(_mailSubject->getId(), &_loadMailCanceled);
+ TQString mail = _mailDrop->readMail(_mailSubject->getId(), &_loadMailCanceled);
readMailReady( &mail );
}
else
@@ -77,7 +77,7 @@ void KornMailDlg::setMailSubject( KornMailSubject * mailSubject )
enableButton(User1, !_mailSubject->isHeaderFullMessage() && _mailDrop->canReadMail());
}
-void KornMailDlg::readMailReady( QString* mail )
+void KornMailDlg::readMailReady( TQString* mail )
{
deleteProgress();
@@ -100,7 +100,7 @@ void KornMailDlg::deleteProgress()
_progress->setProgress(_progress->totalSteps());
_progress->hide();
- disconnect( _mailDrop, SIGNAL(readMailReady(QString*)), this, SLOT(readMailReady(QString*)));
+ disconnect( _mailDrop, TQT_SIGNAL(readMailReady(TQString*)), this, TQT_SLOT(readMailReady(TQString*)));
delete _progress;
_progress = 0;
diff --git a/korn/maildlg.h b/korn/maildlg.h
index 0d222a706..93bfe0988 100644
--- a/korn/maildlg.h
+++ b/korn/maildlg.h
@@ -41,13 +41,13 @@ class KornMailDlg : public KDialogBase
/**
* Progress bar
*/
- QProgressDialog *_progress;
+ TQProgressDialog *_progress;
public:
/**
* KornMailDlg Constructor
* @param parent parent widget
*/
- KornMailDlg( QWidget *parent=0 );
+ KornMailDlg( TQWidget *parent=0 );
/**
* Set the mail details to show. The mails body is transfered to the edit control
@@ -76,7 +76,7 @@ private slots:
*/
void loadMailCanceled();
- void readMailReady( QString* );
+ void readMailReady( TQString* );
};
#endif
diff --git a/korn/maildrop.cpp b/korn/maildrop.cpp
index 7a1dd4443..9d2f12f67 100644
--- a/korn/maildrop.cpp
+++ b/korn/maildrop.cpp
@@ -6,7 +6,7 @@
*/
#include<assert.h>
-#include<qapplication.h>
+#include<tqapplication.h>
#include<kconfigbase.h>
#include<kdebug.h>
@@ -37,13 +37,13 @@ KMailDrop::KMailDrop()
: _style(Plain),
_lastCount(0)
{
- connect(this, SIGNAL(changed( int, KMailDrop* )), SLOT(setCount( int, KMailDrop* )));
+ connect(this, TQT_SIGNAL(changed( int, KMailDrop* )), TQT_SLOT(setCount( int, KMailDrop* )));
- //Set default colours; this prevents black (QColor::invalid) boxes after creating a new box.
- _bgColour = QApplication::palette().active().background();
- _fgColour = QApplication::palette().active().text();
- _nbgColour = QApplication::palette().active().background();
- _nfgColour = QApplication::palette().active().text();
+ //Set default colours; this prevents black (TQColor::invalid) boxes after creating a new box.
+ _bgColour = TQApplication::palette().active().background();
+ _fgColour = TQApplication::palette().active().text();
+ _nbgColour = TQApplication::palette().active().background();
+ _nfgColour = TQApplication::palette().active().text();
}
KMailDrop::~KMailDrop()
@@ -87,10 +87,10 @@ bool KMailDrop::readConfigGroup(const KConfigBase & c)
_caption = c.readEntry(fu(CaptionConfigKey));
_clickCmd = c.readPathEntry(fu(ClickConfigKey));
_style = Style(c.readUnsignedNumEntry(fu(DisplayStyleConfigKey), Plain));
- _bgColour = c.readColorEntry(fu(BgColourConfigKey), &QApplication::palette().active().background());
- _fgColour = c.readColorEntry(fu(FgColourConfigKey), &QApplication::palette().active().text());
- _nbgColour = c.readColorEntry(fu(NBgColourConfigKey), &QApplication::palette().active().background());
- _nfgColour = c.readColorEntry(fu(NFgColourConfigKey), &QApplication::palette().active().text());
+ _bgColour = c.readColorEntry(fu(BgColourConfigKey), &TQApplication::palette().active().background());
+ _fgColour = c.readColorEntry(fu(FgColourConfigKey), &TQApplication::palette().active().text());
+ _nbgColour = c.readColorEntry(fu(NBgColourConfigKey), &TQApplication::palette().active().background());
+ _nfgColour = c.readColorEntry(fu(NFgColourConfigKey), &TQApplication::palette().active().text());
_icon = c.readEntry(fu(IconConfigKey));
_nIcon = c.readEntry(fu(NewMailIconConfigKey));
_realName = c.readEntry(fu(RealNameConfigKey));
@@ -123,12 +123,12 @@ bool KMailDrop::writeConfigGroup(KConfigBase & c) const
return true;
}
-QValueVector<KornMailSubject> * KMailDrop::doReadSubjects(bool * /*stop*/)
+TQValueVector<KornMailSubject> * KMailDrop::doReadSubjects(bool * /*stop*/)
{
- return new QValueVector<KornMailSubject>(); // empty vector
+ return new TQValueVector<KornMailSubject>(); // empty vector
}
-QValueVector<KornMailSubject> * KMailDrop::readSubjects(bool * stop)
+TQValueVector<KornMailSubject> * KMailDrop::readSubjects(bool * stop)
{
// remember timer status
bool timerWasRunning = running();
@@ -138,7 +138,7 @@ QValueVector<KornMailSubject> * KMailDrop::readSubjects(bool * stop)
stopMonitor();
// read the subjects
- QValueVector<KornMailSubject> * result = doReadSubjects(stop);
+ TQValueVector<KornMailSubject> * result = doReadSubjects(stop);
int newcount = result->size();
// if the mail count has changed: notify the button!
@@ -154,35 +154,35 @@ QValueVector<KornMailSubject> * KMailDrop::readSubjects(bool * stop)
}
-bool KMailDrop::deleteMails(QPtrList<const KornMailId> * /*ids*/, bool * /*stop*/)
+bool KMailDrop::deleteMails(TQPtrList<const KornMailId> * /*ids*/, bool * /*stop*/)
{
return false;
}
-QString KMailDrop::readMail(const KornMailId * /*id*/, bool * /*stop*/)
+TQString KMailDrop::readMail(const KornMailId * /*id*/, bool * /*stop*/)
{
return "";
}
-void KMailDrop::setCaption(QString s)
+void KMailDrop::setCaption(TQString s)
{
_caption = s;
emit(configChanged());
}
-void KMailDrop::setClickCmd(QString s)
+void KMailDrop::setClickCmd(TQString s)
{
_clickCmd = s;
emit(configChanged());
}
-void KMailDrop::setNewMailCmd(QString s)
+void KMailDrop::setNewMailCmd(TQString s)
{
_nMailCmd = s;
emit(configChanged());
}
-void KMailDrop::setSoundFile(QString s)
+void KMailDrop::setSoundFile(TQString s)
{
_soundFile = s;
emit(configChanged());
@@ -194,37 +194,37 @@ void KMailDrop::setDisplayStyle(Style s)
emit(configChanged());
}
-void KMailDrop::setBgColour(QColor c)
+void KMailDrop::setBgColour(TQColor c)
{
_bgColour = c;
emit(configChanged());
}
-void KMailDrop::setFgColour(QColor c)
+void KMailDrop::setFgColour(TQColor c)
{
_fgColour = c;
emit(configChanged());
}
-void KMailDrop::setNewBgColour(QColor c)
+void KMailDrop::setNewBgColour(TQColor c)
{
_nbgColour = c;
emit(configChanged());
}
-void KMailDrop::setNewFgColour(QColor c)
+void KMailDrop::setNewFgColour(TQColor c)
{
_nfgColour = c;
emit(configChanged());
}
-void KMailDrop::setIcon(QString s)
+void KMailDrop::setIcon(TQString s)
{
_icon = s;
emit(configChanged());
}
-void KMailDrop::setNewIcon(QString s)
+void KMailDrop::setNewIcon(TQString s)
{
_nIcon = s;
emit(configChanged());
@@ -242,7 +242,7 @@ void KMailDrop::setPassiveDate( bool pd )
emit(configChanged());
}
-void KMailDrop::setRealName(QString str)
+void KMailDrop::setRealName(TQString str)
{
_realName = str;
}
diff --git a/korn/maildrop.h b/korn/maildrop.h
index 4bf8f0faa..0c937c626 100644
--- a/korn/maildrop.h
+++ b/korn/maildrop.h
@@ -5,11 +5,11 @@
#ifndef SSK_MAILDROP_H
#define SSK_MAILDROP_H
-#include<qobject.h>
-#include<qstring.h>
-#include<qcolor.h>
-#include<qvaluevector.h>
-#include <qptrlist.h>
+#include<tqobject.h>
+#include<tqstring.h>
+#include<tqcolor.h>
+#include<tqvaluevector.h>
+#include <tqptrlist.h>
class Protocol;
@@ -37,19 +37,19 @@ class KMailDrop : public QObject
private:
- QString _caption;
- QString _clickCmd;
- QString _nMailCmd;
- QString _soundFile;
+ TQString _caption;
+ TQString _clickCmd;
+ TQString _nMailCmd;
+ TQString _soundFile;
Style _style;
- QColor _bgColour;
- QColor _fgColour;
- QColor _nbgColour;
- QColor _nfgColour;
- QString _icon;
- QString _nIcon;
+ TQColor _bgColour;
+ TQColor _fgColour;
+ TQColor _nbgColour;
+ TQColor _nfgColour;
+ TQString _icon;
+ TQString _nIcon;
int _lastCount;
- QString _realName;
+ TQString _realName;
bool _passivePopup;
bool _passiveDate;
@@ -160,7 +160,7 @@ class KMailDrop : public QObject
* @return true if read was successful, false otherwise.
*/
virtual bool readConfigGroup( const KConfigBase& cfg );
- virtual bool readConfigGroup( const QMap< QString, QString > &, const Protocol * ) { return true; }
+ virtual bool readConfigGroup( const TQMap< TQString, TQString > &, const Protocol * ) { return true; }
/**
* Write box configuration to a config group. Subclasses that
@@ -177,7 +177,7 @@ class KMailDrop : public QObject
* configuration purposes. Each concrete subclass should return a
* unique identifier.
*/
- virtual QString type() const = 0;
+ virtual TQString type() const = 0;
/**
* Return if the maildrop is synchrone (true) or asynchrone (false).
@@ -205,7 +205,7 @@ class KMailDrop : public QObject
* terminate before all mail subjects are loaded.
* @return all new mails subjects as a vector.
*/
- virtual QValueVector<KornMailSubject> * readSubjects(bool * stop);
+ virtual TQValueVector<KornMailSubject> * readSubjects(bool * stop);
/**
* Read the subjects of all new mails. The concrete subclass has
@@ -216,7 +216,7 @@ class KMailDrop : public QObject
* terminate before all mail subjects are loaded.
* @return all new mails subjects as a vector.
*/
- virtual QValueVector<KornMailSubject> * doReadSubjects(bool * stop);
+ virtual TQValueVector<KornMailSubject> * doReadSubjects(bool * stop);
/**
* Return true if the concrete subclass can delete individual mails.
@@ -241,7 +241,7 @@ class KMailDrop : public QObject
* the KornMailSubject instances of the remaining mails might be used
* further more.
*/
- virtual bool deleteMails(QPtrList<const KornMailId> * ids, bool * stop);
+ virtual bool deleteMails(TQPtrList<const KornMailId> * ids, bool * stop);
/**
* Return true if the concrete subclass can load individual mails fully.
@@ -260,40 +260,40 @@ class KMailDrop : public QObject
* terminate before the mail is loaded.
* @return the fully loaded mail (header and body) or "" on error.
*/
- virtual QString readMail(const KornMailId * id, bool * stop);
+ virtual TQString readMail(const KornMailId * id, bool * stop);
// data that belongs in every monitor
- QString caption() const { return _caption; }
- QString clickCmd() const { return _clickCmd; }
- QString newMailCmd() const { return _nMailCmd; }
- QString soundFile() const { return _soundFile;}
- QColor bgColour() const { return _bgColour; }
- QColor fgColour() const { return _fgColour; }
- QColor newBgColour() const { return _nbgColour; }
- QColor newFgColour() const { return _nfgColour; }
- QString icon() const { return _icon; }
- QString newIcon() const { return _nIcon; }
+ TQString caption() const { return _caption; }
+ TQString clickCmd() const { return _clickCmd; }
+ TQString newMailCmd() const { return _nMailCmd; }
+ TQString soundFile() const { return _soundFile;}
+ TQColor bgColour() const { return _bgColour; }
+ TQColor fgColour() const { return _fgColour; }
+ TQColor newBgColour() const { return _nbgColour; }
+ TQColor newFgColour() const { return _nfgColour; }
+ TQString icon() const { return _icon; }
+ TQString newIcon() const { return _nIcon; }
Style displayStyle() const { return _style; }
bool passivePopup() const { return _passivePopup; }
bool passiveDate() const { return _passiveDate; }
- QString realName() const { return _realName; }
+ TQString realName() const { return _realName; }
;
- void setCaption(QString);
- void setClickCmd(QString);
- void setNewMailCmd(QString);
- void setSoundFile(QString);
+ void setCaption(TQString);
+ void setClickCmd(TQString);
+ void setNewMailCmd(TQString);
+ void setSoundFile(TQString);
void setDisplayStyle(Style);
- void setBgColour(QColor);
- void setFgColour(QColor);
- void setNewBgColour(QColor);
- void setNewFgColour(QColor);
- void setIcon(QString);
- void setNewIcon(QString);
+ void setBgColour(TQColor);
+ void setFgColour(TQColor);
+ void setNewBgColour(TQColor);
+ void setNewFgColour(TQColor);
+ void setIcon(TQString);
+ void setNewIcon(TQString);
void setResetCounter(int);
void setPassivePopup(bool);
void setPassiveDate(bool);
- void setRealName(QString);
+ void setRealName(TQString);
/**
* This is called by the manager when it wishes to delete
@@ -361,7 +361,7 @@ signals:
* As argument, there is a KornSubject, which contains a subject and
* some more info that could be used with the popup.
*/
- void showPassivePopup( QPtrList< KornMailSubject >*, int, bool, const QString& realname );
+ void showPassivePopup( TQPtrList< KornMailSubject >*, int, bool, const TQString& realname );
/**
* This signal is emitted when a passive error message should be displayed.
@@ -369,7 +369,7 @@ signals:
* @param error The error message
* @param realName The real name of this object.
*/
- void showPassivePopup( const QString& error, const QString& realname );
+ void showPassivePopup( const TQString& error, const TQString& realname );
/**
* readSubjects() might signal readSubject() if
@@ -450,7 +450,7 @@ signals:
* in asynchrone situations.
* @param pointer to the full email-message.
*/
- void readMailReady( QString* );
+ void readMailReady( TQString* );
};
#endif // SSK_MAILDROP_H
diff --git a/korn/mailid.h b/korn/mailid.h
index d640bfe7f..3ad3af97a 100644
--- a/korn/mailid.h
+++ b/korn/mailid.h
@@ -1,7 +1,7 @@
#ifndef MailId_h
#define MailId_h
-#include <qstring.h>
+#include <tqstring.h>
/**
* Abstract base class for mail ids. Concrete mail ids store the id.
@@ -20,7 +20,7 @@ public:
* Return a string representation of this (for debuggin purposes only)
* @return a string representation
*/
- virtual QString toString() const = 0;
+ virtual TQString toString() const = 0;
/**
* Create an exact copy of this.
diff --git a/korn/mailsubject.cpp b/korn/mailsubject.cpp
index 1f2011a02..d431f4402 100644
--- a/korn/mailsubject.cpp
+++ b/korn/mailsubject.cpp
@@ -5,8 +5,8 @@
#include <kdebug.h>
#include <kglobal.h>
#include <klocale.h>
-#include <qdatetime.h>
-#include <qtextcodec.h>
+#include <tqdatetime.h>
+#include <tqtextcodec.h>
#include <ctype.h>
KornMailSubject::KornMailSubject() : _id(0), _drop(0), _size(-1), _date(-1), _fullMessage(false)
@@ -48,32 +48,32 @@ KornMailSubject::~KornMailSubject()
_id = 0;
}
-QString KornMailSubject::toString() const
+TQString KornMailSubject::toString() const
{
- QDateTime date;
+ TQDateTime date;
date.setTime_t(_date);
- return QString("KornMailSubject, Id: ") + (_id?_id->toString():QString("NULL")) + ", " + i18n("Subject:") + " " + _subject
- + ", " + i18n("Sender:") + " " + _sender + ", " + i18n("Size:") + " " + QString::number(_size)
+ return TQString("KornMailSubject, Id: ") + (_id?_id->toString():TQString("NULL")) + ", " + i18n("Subject:") + " " + _subject
+ + ", " + i18n("Sender:") + " " + _sender + ", " + i18n("Size:") + " " + TQString::number(_size)
+ ", " + i18n("Date:") + " " + date.toString(Qt::ISODate);
}
-QString KornMailSubject::decodeRFC2047String(const QCString& aStr)
+TQString KornMailSubject::decodeRFC2047String(const TQCString& aStr)
{
if ( aStr.isEmpty() )
- return QString::null;
+ return TQString::null;
- const QCString str = unfold( aStr );
+ const TQCString str = unfold( aStr );
if ( str.isEmpty() )
- return QString::null;
+ return TQString::null;
if ( str.find( "=?" ) < 0 ) {
// No need to decode
- return QString(str);
+ return TQString(str);
}
- QString result;
- QCString LWSP_buffer;
+ TQString result;
+ TQCString LWSP_buffer;
bool lastWasEncodedWord = false;
for ( const char * pos = str.data() ; *pos ; ++pos ) {
@@ -95,7 +95,7 @@ QString KornMailSubject::decodeRFC2047String(const QCString& aStr)
const char * const beg = pos;
{
// parse charset name
- QCString charset;
+ TQCString charset;
int i = 2;
pos += 2;
for ( ; *pos != '?' && ( *pos==' ' || ispunct(*pos) || isalnum(*pos) ); ++i, ++pos ) {
@@ -123,12 +123,12 @@ QString KornMailSubject::decodeRFC2047String(const QCString& aStr)
const KMime::Codec * c = KMime::Codec::codecForName( encoding );
kdFatal( !c ) << "No \"" << encoding << "\" codec!?" << endl;
- QByteArray in; in.setRawData( enc_start, pos - enc_start );
- const QByteArray enc = c->decode( in );
+ TQByteArray in; in.setRawData( enc_start, pos - enc_start );
+ const TQByteArray enc = c->decode( in );
in.resetRawData( enc_start, pos - enc_start );
- const QTextCodec * codec = codecForName(charset);
- if (!codec) return QString::null;
+ const TQTextCodec * codec = codecForName(charset);
+ if (!codec) return TQString::null;
result += codec->toUnicode(enc);
lastWasEncodedWord = true;
@@ -149,12 +149,12 @@ invalid_encoded_word:
return result;
}
-QCString KornMailSubject::unfold( const QCString & header )
+TQCString KornMailSubject::unfold( const TQCString & header )
{
if ( header.isEmpty() )
- return QCString();
+ return TQCString();
- QCString result( header.size() ); // size() >= length()+1 and size() is O(1)
+ TQCString result( header.size() ); // size() >= length()+1 and size() is O(1)
char * d = result.data();
for ( const char * s = header.data() ; *s ; )
@@ -174,10 +174,10 @@ QCString KornMailSubject::unfold( const QCString & header )
}
//-----------------------------------------------------------------------------
-const QTextCodec* KornMailSubject::codecForName(const QCString& _str)
+const TQTextCodec* KornMailSubject::codecForName(const TQCString& _str)
{
if (_str.isEmpty()) return 0;
- QCString codec = _str;
+ TQCString codec = _str;
return KGlobal::charsets()->codecForName(codec);
}
diff --git a/korn/mailsubject.h b/korn/mailsubject.h
index f3e2e4577..aecd19f5c 100644
--- a/korn/mailsubject.h
+++ b/korn/mailsubject.h
@@ -69,38 +69,38 @@ public:
* Set the mails subject.
* @param subject the mails subject.
*/
- void setSubject(const QString & subject) {_subject = subject;}
+ void setSubject(const TQString & subject) {_subject = subject;}
/**
* Return the subject.
* @return the subject.
*/
- const QString & getSubject() const {return _subject;}
+ const TQString & getSubject() const {return _subject;}
/**
* Set the mails sender.
* @param sender the mails sender.
*/
- void setSender(const QString & sender) {_sender = sender;}
+ void setSender(const TQString & sender) {_sender = sender;}
/**
* Return the sender.
* @return the sender.
*/
- const QString & getSender() const {return _sender;}
+ const TQString & getSender() const {return _sender;}
/**
* Set the mails header and (if possible) body.
* @param header the mails header with or without body (see fullMessage parameter).
* @param fullMessage true, if header contains the message body as well, false otherwise.
*/
- void setHeader(const QString & header, bool fullMessage) {_header = header; _fullMessage = fullMessage;}
+ void setHeader(const TQString & header, bool fullMessage) {_header = header; _fullMessage = fullMessage;}
/**
* Return the header or the full message (if isHeaderFullMessage() is true).
* @return the header or the full message.
*/
- const QString & getHeader() const {return _header;}
+ const TQString & getHeader() const {return _header;}
/**
* Return true, if the header contains the header and the full message.
@@ -137,7 +137,7 @@ public:
* Return a string representation of this (for debugging purposes only)
* @return a string representation
*/
- QString toString() const;
+ TQString toString() const;
/**
* Sets the KMailDrop field.
@@ -160,12 +160,12 @@ private:
/**
* Decode a string based on RFC2047
*/
- QString decodeRFC2047String(const QCString& aStr);
+ TQString decodeRFC2047String(const TQCString& aStr);
/**
* Unfolding a string (basically changing tabs to spaces
*/
- QCString unfold( const QCString & header );
+ TQCString unfold( const TQCString & header );
/**
* Returns true if the parameter is a blank (or tab)
@@ -181,7 +181,7 @@ private:
/**
* ??
*/
- const QTextCodec* codecForName(const QCString& _str);
+ const TQTextCodec* codecForName(const TQCString& _str);
};
#endif
diff --git a/korn/mbox_proto.cpp b/korn/mbox_proto.cpp
index 5ee327114..eb53449d0 100644
--- a/korn/mbox_proto.cpp
+++ b/korn/mbox_proto.cpp
@@ -21,27 +21,27 @@
#include <kdebug.h>
-#include <qlayout.h>
-#include <qptrvector.h>
-#include <qstringlist.h>
+#include <tqlayout.h>
+#include <tqptrvector.h>
+#include <tqstringlist.h>
#include "account_input.h"
-void MBox_Protocol::configFillGroupBoxes( QStringList* groupBoxes ) const
+void MBox_Protocol::configFillGroupBoxes( TQStringList* groupBoxes ) const
{
groupBoxes->append( "mbox" );
}
-void MBox_Protocol::configFields( QPtrVector< QWidget >* vector, const QObject*, QPtrList< AccountInput > *result ) const
+void MBox_Protocol::configFields( TQPtrVector< TQWidget >* vector, const TQObject*, TQPtrList< AccountInput > *result ) const
{
- result->append( new URLInput( (QWidget*)vector->at( 0 ), i18n( "File:" ), "", "mailbox" ) );
+ result->append( new URLInput( (TQWidget*)vector->at( 0 ), i18n( "File:" ), "", "mailbox" ) );
}
-void MBox_Protocol::readEntries( QMap< QString, QString >*, QMap< QString, QString >* ) const
+void MBox_Protocol::readEntries( TQMap< TQString, TQString >*, TQMap< TQString, TQString >* ) const
{
}
-void MBox_Protocol::writeEntries( QMap< QString, QString >* map ) const
+void MBox_Protocol::writeEntries( TQMap< TQString, TQString >* map ) const
{
clearFields( map, (KIO_Protocol::Fields)( server | port | username | password | save_password | metadata ) );
}
diff --git a/korn/mbox_proto.h b/korn/mbox_proto.h
index d33ff8944..78b01abfb 100644
--- a/korn/mbox_proto.h
+++ b/korn/mbox_proto.h
@@ -30,8 +30,8 @@ public:
MBox_Protocol() {}
virtual ~MBox_Protocol() {}
- virtual QString protocol( bool ) const { return "mbox"; }
- virtual QString configName() const { return "mbox"; }
+ virtual TQString protocol( bool ) const { return "mbox"; }
+ virtual TQString configName() const { return "mbox"; }
virtual bool canReadSubjects() const { return true; }
virtual bool canDeleteMail() const { return false; }
@@ -41,7 +41,7 @@ public:
//virtual int fields() const { return no_fields; }
//virtual int urlFields() const { return mailbox; }
- virtual QString mailboxName() const { return i18n( "File:" ); }
+ virtual TQString mailboxName() const { return i18n( "File:" ); }
virtual void recheckKURL( KURL &, KIO::MetaData & md ) const
{ md.insert( "onlynew", "" ); md.insert( "savetime", "" ); }
@@ -49,10 +49,10 @@ public:
virtual void deleteMailKURL( KURL &, KIO::MetaData & ) const { }
virtual void readMailKURL( KURL &, KIO::MetaData & ) const { }
- virtual void configFillGroupBoxes( QStringList* ) const;
- virtual void configFields( QPtrVector< QWidget >*, const QObject*, QPtrList< AccountInput >* ) const;
- virtual void readEntries( QMap< QString, QString >*, QMap< QString, QString >* ) const;
- virtual void writeEntries( QMap< QString, QString >* ) const;
+ virtual void configFillGroupBoxes( TQStringList* ) const;
+ virtual void configFields( TQPtrVector< TQWidget >*, const TQObject*, TQPtrList< AccountInput >* ) const;
+ virtual void readEntries( TQMap< TQString, TQString >*, TQMap< TQString, TQString >* ) const;
+ virtual void writeEntries( TQMap< TQString, TQString >* ) const;
};
#endif
diff --git a/korn/nntp_proto.cpp b/korn/nntp_proto.cpp
index 532ac47a9..bc2f85251 100644
--- a/korn/nntp_proto.cpp
+++ b/korn/nntp_proto.cpp
@@ -21,36 +21,36 @@
#include "account_input.h"
-#include <qwidget.h>
-#include <qobject.h>
-#include <qstringlist.h>
-#include <qptrvector.h>
-#include <qptrlist.h>
+#include <tqwidget.h>
+#include <tqobject.h>
+#include <tqstringlist.h>
+#include <tqptrvector.h>
+#include <tqptrlist.h>
-void Nntp_Protocol::configFillGroupBoxes( QStringList* groupBoxes ) const
+void Nntp_Protocol::configFillGroupBoxes( TQStringList* groupBoxes ) const
{
groupBoxes->append( "server" );
groupBoxes->append( "user" );
}
-void Nntp_Protocol::configFields( QPtrVector< QWidget >* vector, const QObject*, QPtrList< AccountInput > * result ) const
+void Nntp_Protocol::configFields( TQPtrVector< TQWidget >* vector, const TQObject*, TQPtrList< AccountInput > * result ) const
{
- result->append( new TextInput( (QWidget*)vector->at( 0 ), i18n( "Server" ), TextInput::text, "", "server" ) );
- result->append( new TextInput( (QWidget*)vector->at( 0 ), i18n( "Port" ), 0, 65535, "119", "port" ) );
+ result->append( new TextInput( (TQWidget*)vector->at( 0 ), i18n( "Server" ), TextInput::text, "", "server" ) );
+ result->append( new TextInput( (TQWidget*)vector->at( 0 ), i18n( "Port" ), 0, 65535, "119", "port" ) );
- result->append( new TextInput( (QWidget*)vector->at( 1 ), i18n( "Username" ), TextInput::text, "", "username" ) );
- result->append( new TextInput( (QWidget*)vector->at( 1 ), i18n( "Password" ), TextInput::password, "", "password" ) );
- result->append( new CheckboxInput( (QWidget*)vector->at( 1 ), i18n( "Save password" ), "true", "savepassword" ) );
- QObject::connect( (QObject*)result->last()->rightWidget(), SIGNAL( toggled( bool ) ),
- (QObject*)result->prev()->rightWidget(), SLOT( setEnabled( bool ) ) );
+ result->append( new TextInput( (TQWidget*)vector->at( 1 ), i18n( "Username" ), TextInput::text, "", "username" ) );
+ result->append( new TextInput( (TQWidget*)vector->at( 1 ), i18n( "Password" ), TextInput::password, "", "password" ) );
+ result->append( new CheckboxInput( (TQWidget*)vector->at( 1 ), i18n( "Save password" ), "true", "savepassword" ) );
+ TQObject::connect( (TQObject*)result->last()->rightWidget(), TQT_SIGNAL( toggled( bool ) ),
+ (TQObject*)result->prev()->rightWidget(), TQT_SLOT( setEnabled( bool ) ) );
result->last()->setValue( "false" );
}
-void Nntp_Protocol::readEntries( QMap< QString, QString >*, QMap< QString, QString > * ) const
+void Nntp_Protocol::readEntries( TQMap< TQString, TQString >*, TQMap< TQString, TQString > * ) const
{
}
-void Nntp_Protocol::writeEntries( QMap< QString, QString >* map ) const
+void Nntp_Protocol::writeEntries( TQMap< TQString, TQString >* map ) const
{
clearFields( map, (KIO_Protocol::Fields)( KIO_Protocol::mailbox | KIO_Protocol::metadata ) );
}
diff --git a/korn/nntp_proto.h b/korn/nntp_proto.h
index c32a50b6d..c08c0d078 100644
--- a/korn/nntp_proto.h
+++ b/korn/nntp_proto.h
@@ -31,8 +31,8 @@ public:
virtual bool connectionBased() const { return true; }
- virtual QString protocol() const { return "nntp"; }
- virtual QString configName() const { return "nntp"; }
+ virtual TQString protocol() const { return "nntp"; }
+ virtual TQString configName() const { return "nntp"; }
virtual bool canReadSubjects() const { return true; }
virtual bool canDeleteMail() const { return false; }
@@ -43,10 +43,10 @@ public:
//virtual int urlFields() const { return no_fields; }
virtual unsigned short defaultPort( bool ) const { return 119; }
- virtual void configFillGroupBoxes( QStringList* ) const;
- virtual void configFields( QPtrVector< QWidget >* vector, const QObject*, QPtrList< AccountInput >* ) const;
- virtual void readEntries( QMap< QString, QString >*, QMap< QString, QString >* ) const;
- virtual void writeEntries( QMap< QString, QString >* ) const;
+ virtual void configFillGroupBoxes( TQStringList* ) const;
+ virtual void configFields( TQPtrVector< TQWidget >* vector, const TQObject*, TQPtrList< AccountInput >* ) const;
+ virtual void readEntries( TQMap< TQString, TQString >*, TQMap< TQString, TQString >* ) const;
+ virtual void writeEntries( TQMap< TQString, TQString >* ) const;
};
#endif
diff --git a/korn/password.cpp b/korn/password.cpp
index a3eb76ed9..764b90f98 100644
--- a/korn/password.cpp
+++ b/korn/password.cpp
@@ -23,16 +23,16 @@
#include <kdebug.h>
#include <kwallet.h>
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
KWallet::Wallet* KOrnPassword::m_wallet = 0;
bool KOrnPassword::m_openFailed = false;
bool KOrnPassword::m_useWallet = false; //Not default true until moving works
-QString KOrnPassword::readKOrnPassword( int box, int account, const KConfigBase &fallbackConfig )
+TQString KOrnPassword::readKOrnPassword( int box, int account, const KConfigBase &fallbackConfig )
{
- QString result;
+ TQString result;
if( readKOrnPassword( box, account, result ) )
return result;
@@ -40,9 +40,9 @@ QString KOrnPassword::readKOrnPassword( int box, int account, const KConfigBase
return fallbackConfig.readEntry( "password" );
}
-QString KOrnPassword::readKMailPassword( int accountnr, const KConfigBase& fallbackConfig )
+TQString KOrnPassword::readKMailPassword( int accountnr, const KConfigBase& fallbackConfig )
{
- QString password;
+ TQString password;
open();
if( !m_wallet || !m_wallet->isOpen() || m_openFailed )
@@ -52,13 +52,13 @@ QString KOrnPassword::readKMailPassword( int accountnr, const KConfigBase& fallb
return KMailDecrypt( fallbackConfig.readEntry( "pass" ));
m_wallet->setFolder( "kmail" );
- if( m_wallet->readPassword( QString( "account-%1" ).arg( accountnr ), password ) != 0 )
+ if( m_wallet->readPassword( TQString( "account-%1" ).arg( accountnr ), password ) != 0 )
return fallbackConfig.readEntry( "password" );
return password;
}
-void KOrnPassword::writeKOrnPassword( int box, int account, KConfigBase& fallbackConfig, const QString& password )
+void KOrnPassword::writeKOrnPassword( int box, int account, KConfigBase& fallbackConfig, const TQString& password )
{
if( writeKOrnPassword( box, account, password ) )
{
@@ -95,7 +95,7 @@ bool KOrnPassword::deleteKOrnPassword( int box, int account )
m_wallet->setFolder( "korn" );
//Write to wallet
- if( m_wallet->removeEntry( QString( "account-%1-%2" ).arg( box ).arg( account ) ) != 0 )
+ if( m_wallet->removeEntry( TQString( "account-%1-%2" ).arg( box ).arg( account ) ) != 0 )
//Writing failed
return false;
@@ -106,7 +106,7 @@ bool KOrnPassword::deleteKOrnPassword( int box, int account )
void KOrnPassword::moveKOrnPassword( int boxSrc, int accountSrc, KConfigBase& configSrc,
int boxDest, int accountDest, KConfigBase &configDest )
{
- QString password;
+ TQString password;
password = readKOrnPassword( boxSrc, accountSrc, configSrc );
deleteKOrnPassword( boxSrc, accountSrc, configSrc );
@@ -115,7 +115,7 @@ void KOrnPassword::moveKOrnPassword( int boxSrc, int accountSrc, KConfigBase& co
void KOrnPassword::swapKOrnPassword( int box1, int account1, KConfigBase &config1, int box2, int account2, KConfigBase &config2 )
{
- QString password1, password2;
+ TQString password1, password2;
password1 = readKOrnPassword( box1, account1, config1 );
password2 = readKOrnPassword( box2, account2, config2 );
deleteKOrnPassword( box1, account1, config1 );
@@ -126,7 +126,7 @@ void KOrnPassword::swapKOrnPassword( int box1, int account1, KConfigBase &config
void KOrnPassword::swapKOrnWalletPassword( int box1, int account1, int box2, int account2 )
{
- QString password1, password2;
+ TQString password1, password2;
bool passExist1, passExist2;
passExist1 = readKOrnPassword( box1, account1, password1 );
passExist2 = readKOrnPassword( box2, account2, password2 );
@@ -152,7 +152,7 @@ void KOrnPassword::swapKOrnWalletPasswords( int box1, int accountnumber1 ,int bo
void KOrnPassword::rewritePassword( int box, int account, KConfigBase &config, bool newUseWalletValue )
{
bool useWallet = m_useWallet;
- QString password;
+ TQString password;
setUseWallet( !newUseWalletValue );
password = readKOrnPassword( box, account, config );
@@ -184,7 +184,7 @@ void KOrnPassword::open()
m_openFailed = true;
}
-bool KOrnPassword::readKOrnPassword( int box, int account, QString& password )
+bool KOrnPassword::readKOrnPassword( int box, int account, TQString& password )
{
if( !m_useWallet )
return false;
@@ -201,7 +201,7 @@ bool KOrnPassword::readKOrnPassword( int box, int account, QString& password )
return false;
m_wallet->setFolder( "korn" );
- if( m_wallet->readPassword( QString( "account-%1-%2" ).arg( box ).arg( account ), password ) != 0 )
+ if( m_wallet->readPassword( TQString( "account-%1-%2" ).arg( box ).arg( account ), password ) != 0 )
//Error during reading the password: use the one in the config file
return false;
@@ -209,7 +209,7 @@ bool KOrnPassword::readKOrnPassword( int box, int account, QString& password )
return true;
}
-bool KOrnPassword::writeKOrnPassword( int box, int account, const QString& password )
+bool KOrnPassword::writeKOrnPassword( int box, int account, const TQString& password )
{
if( !m_useWallet )
//Wallet should not be used => saving in the config file
@@ -228,7 +228,7 @@ bool KOrnPassword::writeKOrnPassword( int box, int account, const QString& passw
m_wallet->setFolder( "korn" );
//Write to wallet
- if( m_wallet->writePassword( QString( "account-%1-%2" ).arg( box ).arg( account ), password ) != 0 )
+ if( m_wallet->writePassword( TQString( "account-%1-%2" ).arg( box ).arg( account ), password ) != 0 )
//Writing failed
return false;
@@ -237,11 +237,11 @@ bool KOrnPassword::writeKOrnPassword( int box, int account, const QString& passw
}
//This function is copyed from kmail/kmaccount.cpp
-QString KOrnPassword::KMailDecrypt( const QString& enc )
+TQString KOrnPassword::KMailDecrypt( const TQString& enc )
{
- QString result;
+ TQString result;
for (uint i = 0; i < enc.length(); i++)
- result += (enc[i].unicode() <= 0x21) ? enc[i] : QChar(0x1001F - enc[i].unicode());
+ result += (enc[i].unicode() <= 0x21) ? enc[i] : TQChar(0x1001F - enc[i].unicode());
return result;
}
diff --git a/korn/password.h b/korn/password.h
index b024fa842..c8ecdd1d2 100644
--- a/korn/password.h
+++ b/korn/password.h
@@ -47,9 +47,9 @@ public:
* @param box The boxnumber of the account
* @param account The accountnumber of the account
* @param fallbackConfig The configuration file if KWallet cannot be used.
- * @return The password, or QString::null if it failes.
+ * @return The password, or TQString::null if it failes.
*/
- static QString readKOrnPassword( int box, int account, const KConfigBase& fallbackConfig );
+ static TQString readKOrnPassword( int box, int account, const KConfigBase& fallbackConfig );
/**
* This function gets a password with is puts in KWallet by KMail
*
@@ -57,7 +57,7 @@ public:
* @param fallbackConfig The configuration used if KWallet isn't available.
* @return The password, QStirng::null if it failes.
*/
- static QString readKMailPassword( int accountnr, const KConfigBase& fallbackConfig );
+ static TQString readKMailPassword( int accountnr, const KConfigBase& fallbackConfig );
/**
* This function saves a password for usage in KOrn.
@@ -67,7 +67,7 @@ public:
* @param fallbackConfig The configuration file if KWallet isn't available.
* @param password The password to be stored.
*/
- static void writeKOrnPassword( int box, int account, KConfigBase& fallbackConfig, const QString& password );
+ static void writeKOrnPassword( int box, int account, KConfigBase& fallbackConfig, const TQString& password );
/**
* This function deletes a password from both KWallet and the configuration file
@@ -154,10 +154,10 @@ public:
private:
static void open();
- static bool readKOrnPassword( int box, int account, QString& password );
- static bool writeKOrnPassword( int box, int account, const QString& password );
+ static bool readKOrnPassword( int box, int account, TQString& password );
+ static bool writeKOrnPassword( int box, int account, const TQString& password );
- static QString KMailDecrypt( const QString& enc );
+ static TQString KMailDecrypt( const TQString& enc );
static KWallet::Wallet *m_wallet;
static bool m_openFailed;
diff --git a/korn/polldrop.cpp b/korn/polldrop.cpp
index 32a44be43..8d05a03be 100644
--- a/korn/polldrop.cpp
+++ b/korn/polldrop.cpp
@@ -48,14 +48,14 @@ bool KPollableDrop::stopMonitor()
}
-void KPollableDrop::timerEvent( QTimerEvent *ev )
+void KPollableDrop::timerEvent( TQTimerEvent *ev )
{
if( _timerRunning && (ev->timerId() == _timerId) ) {
// this event is ours.
recheck(); // should be reimplemented by children.
}
else {
- QObject::timerEvent( ev );
+ TQObject::timerEvent( ev );
}
}
diff --git a/korn/polldrop.h b/korn/polldrop.h
index b7ea69aba..49e400b20 100644
--- a/korn/polldrop.h
+++ b/korn/polldrop.h
@@ -52,7 +52,7 @@ public:
//virtual void addConfigPage( KDropCfgDialog * );
protected:
- void timerEvent( QTimerEvent * );
+ void timerEvent( TQTimerEvent * );
};
inline void KPollableDrop::setFreq( int freq )
diff --git a/korn/pop3_proto.cpp b/korn/pop3_proto.cpp
index 7e88f7fb2..b42a63ec2 100644
--- a/korn/pop3_proto.cpp
+++ b/korn/pop3_proto.cpp
@@ -23,58 +23,58 @@
#include <kdebug.h>
-#include <qwidget.h>
-#include <qobject.h>
-#include <qstringlist.h>
-#include <qptrvector.h>
-#include <qptrlist.h>
+#include <tqwidget.h>
+#include <tqobject.h>
+#include <tqstringlist.h>
+#include <tqptrvector.h>
+#include <tqptrlist.h>
-void Pop3_Protocol::configFillGroupBoxes( QStringList* groupBoxes ) const
+void Pop3_Protocol::configFillGroupBoxes( TQStringList* groupBoxes ) const
{
groupBoxes->append( "Server" );
groupBoxes->append( "Identify" );
}
-void Pop3_Protocol::configFields( QPtrVector< QWidget >* vector, const QObject* configDialog, QPtrList< AccountInput > * result ) const
+void Pop3_Protocol::configFields( TQPtrVector< TQWidget >* vector, const TQObject* configDialog, TQPtrList< AccountInput > * result ) const
{
- QMap< QString, QString > encrList;
+ TQMap< TQString, TQString > encrList;
encrList.insert( "ssl", i18n( "SSL" ) );
encrList.insert( "tls=auto", i18n( "TLS if possible" ) );
encrList.insert( "tls=on", i18n( "Always TLS" ) );
encrList.insert( "tls=off", i18n( "Never TLS" ) );
- QMap< QString, QString > authList;
+ TQMap< TQString, TQString > authList;
authList.insert( "", i18n( "Plain" ) );
authList.insert( "auth=APOP", i18n( "APOP" ) );
- result->append( new TextInput( (QWidget*)vector->at( 0 ), i18n( "Server" ), TextInput::text, "", "server" ) );
- result->append( new TextInput( (QWidget*)vector->at( 0 ), i18n( "Port" ), 0, 65535, "110", "port" ) );
- result->append( new ComboInput( (QWidget*)vector->at( 0 ), i18n( "Encryption" ), encrList, "tls=auto", "encryption" ) );
- QObject::connect( (QObject*)result->last()->rightWidget(), SIGNAL( activated( int) ),
- configDialog, SLOT( slotSSLChanged() ) );
+ result->append( new TextInput( (TQWidget*)vector->at( 0 ), i18n( "Server" ), TextInput::text, "", "server" ) );
+ result->append( new TextInput( (TQWidget*)vector->at( 0 ), i18n( "Port" ), 0, 65535, "110", "port" ) );
+ result->append( new ComboInput( (TQWidget*)vector->at( 0 ), i18n( "Encryption" ), encrList, "tls=auto", "encryption" ) );
+ TQObject::connect( (TQObject*)result->last()->rightWidget(), TQT_SIGNAL( activated( int) ),
+ configDialog, TQT_SLOT( slotSSLChanged() ) );
- result->append( new TextInput( (QWidget*)vector->at( 1 ), i18n( "Username" ), TextInput::text, "", "username" ) );
- result->append( new TextInput( (QWidget*)vector->at( 1 ), i18n( "Password" ), TextInput::password, "", "password" ) );
- result->append( new CheckboxInput( (QWidget*)vector->at( 1 ), i18n( "Save password" ), "true", "savepassword" ) );
- QObject::connect( (QObject*)result->last()->rightWidget(), SIGNAL( toggled( bool ) ),
- (QObject*)result->prev()->rightWidget(), SLOT( setEnabled( bool ) ) );
+ result->append( new TextInput( (TQWidget*)vector->at( 1 ), i18n( "Username" ), TextInput::text, "", "username" ) );
+ result->append( new TextInput( (TQWidget*)vector->at( 1 ), i18n( "Password" ), TextInput::password, "", "password" ) );
+ result->append( new CheckboxInput( (TQWidget*)vector->at( 1 ), i18n( "Save password" ), "true", "savepassword" ) );
+ TQObject::connect( (TQObject*)result->last()->rightWidget(), TQT_SIGNAL( toggled( bool ) ),
+ (TQObject*)result->prev()->rightWidget(), TQT_SLOT( setEnabled( bool ) ) );
result->last()->setValue( "false" );
- result->append( new ComboInput( (QWidget*)vector->at( 1 ), i18n( "Authentication" ), authList, "", "auth" ) );
+ result->append( new ComboInput( (TQWidget*)vector->at( 1 ), i18n( "Authentication" ), authList, "", "auth" ) );
}
-void Pop3_Protocol::readEntries( QMap< QString, QString >* map, QMap< QString, QString > *metadata ) const
+void Pop3_Protocol::readEntries( TQMap< TQString, TQString >* map, TQMap< TQString, TQString > *metadata ) const
{
if( map->contains( "ssl" ) && *map->find( "ssl" ) == "true" )
map->insert( "encryption", "ssl" );
if( metadata->contains( "tls" ) )
- map->insert( "encryption", QString( "tls=%1" ).arg( *metadata->find( "tls" ) ) );
+ map->insert( "encryption", TQString( "tls=%1" ).arg( *metadata->find( "tls" ) ) );
if( metadata->contains( "auth" ) )
- map->insert( "auth", QString( "auth=APOP" ) );
+ map->insert( "auth", TQString( "auth=APOP" ) );
}
-void Pop3_Protocol::writeEntries( QMap< QString, QString >* map ) const
+void Pop3_Protocol::writeEntries( TQMap< TQString, TQString >* map ) const
{
- QString metadata;
+ TQString metadata;
if( map->contains( "encryption" ) )
{
if( *map->find( "encryption" ) == "ssl" )
diff --git a/korn/pop3_proto.h b/korn/pop3_proto.h
index bf67896bd..c828e595f 100644
--- a/korn/pop3_proto.h
+++ b/korn/pop3_proto.h
@@ -32,8 +32,8 @@ public:
virtual bool connectionBased() const { return true; }
- virtual QString protocol( bool ssl ) const { return ssl ? "pop3s" : "pop3"; }
- virtual QString configName() const { return "pop3"; }
+ virtual TQString protocol( bool ssl ) const { return ssl ? "pop3s" : "pop3"; }
+ virtual TQString configName() const { return "pop3"; }
virtual bool canReadSubjects() const { return true; }
virtual bool canDeleteMail() const { return true; }
virtual bool canReadMail() const { return true; }
@@ -42,17 +42,17 @@ public:
virtual DeleteTypeEnum deleteFunction() const { return get; }
- virtual QStringList authList() const { return QStringList::split( '|', "Plain|APOP", false ); }
+ virtual TQStringList authList() const { return TQStringList::split( '|', "Plain|APOP", false ); }
virtual void readSubjectKURL( KURL & kurl, KIO::MetaData & ) const { kurl.setPath( kurl.path().replace( "/download/", "/headers/" ) ); }
virtual void deleteMailKURL ( KURL & kurl, KIO::MetaData & ) const { kurl.setPath( kurl.path().replace( "/download/", "/remove/" ) ); }
virtual bool commitDelete () const { return true; }
virtual void deleteCommitKURL(KURL & kurl, KIO::MetaData & ) const { kurl.setPath( "commit" ); }
- virtual void configFillGroupBoxes( QStringList* ) const;
- virtual void configFields( QPtrVector< QWidget >* vector, const QObject*, QPtrList< AccountInput >* ) const;
- virtual void readEntries( QMap< QString, QString >*, QMap< QString, QString >* ) const;
- virtual void writeEntries( QMap< QString, QString >* ) const;
+ virtual void configFillGroupBoxes( TQStringList* ) const;
+ virtual void configFields( TQPtrVector< TQWidget >* vector, const TQObject*, TQPtrList< AccountInput >* ) const;
+ virtual void readEntries( TQMap< TQString, TQString >*, TQMap< TQString, TQString >* ) const;
+ virtual void writeEntries( TQMap< TQString, TQString >* ) const;
};
#endif
diff --git a/korn/pop3s_proto.h b/korn/pop3s_proto.h
index 32beb4a06..4e10dca1f 100644
--- a/korn/pop3s_proto.h
+++ b/korn/pop3s_proto.h
@@ -31,8 +31,8 @@ public:
virtual KIO_Protocol * clone() const { return new Pop3s_Protocol; }
- virtual QString protocol() const { return "pop3s"; }
- virtual QString configName() const { return "pop3s"; }
+ virtual TQString protocol() const { return "pop3s"; }
+ virtual TQString configName() const { return "pop3s"; }
virtual unsigned short defaultPort() const { return 995; }
};
diff --git a/korn/process_proto.cpp b/korn/process_proto.cpp
index 30cb6f4d5..2d4885fdf 100644
--- a/korn/process_proto.cpp
+++ b/korn/process_proto.cpp
@@ -21,27 +21,27 @@
#include <kdebug.h>
-#include <qlayout.h>
-#include <qptrvector.h>
-#include <qstringlist.h>
+#include <tqlayout.h>
+#include <tqptrvector.h>
+#include <tqstringlist.h>
#include "account_input.h"
-void Process_Protocol::configFillGroupBoxes( QStringList* groupBoxes ) const
+void Process_Protocol::configFillGroupBoxes( TQStringList* groupBoxes ) const
{
groupBoxes->append( "Process" );
}
-void Process_Protocol::configFields( QPtrVector< QWidget >* vector, const QObject*, QPtrList< AccountInput > *result ) const
+void Process_Protocol::configFields( TQPtrVector< TQWidget >* vector, const TQObject*, TQPtrList< AccountInput > *result ) const
{
- result->append( new URLInput( (QWidget*)vector->at( 0 ), i18n( "Program:" ), "", "mailbox" ) );
+ result->append( new URLInput( (TQWidget*)vector->at( 0 ), i18n( "Program:" ), "", "mailbox" ) );
}
-void Process_Protocol::readEntries( QMap< QString, QString >*, QMap< QString, QString >* ) const
+void Process_Protocol::readEntries( TQMap< TQString, TQString >*, TQMap< TQString, TQString >* ) const
{
}
-void Process_Protocol::writeEntries( QMap< QString, QString >* map ) const
+void Process_Protocol::writeEntries( TQMap< TQString, TQString >* map ) const
{
clearFields( map, (KIO_Protocol::Fields)( server | port | username | password | save_password | metadata ) );
}
diff --git a/korn/process_proto.h b/korn/process_proto.h
index 6275be2c6..70c8cb671 100644
--- a/korn/process_proto.h
+++ b/korn/process_proto.h
@@ -29,20 +29,20 @@ public:
virtual KIO_Protocol * clone() const { return new Process_Protocol; }
- virtual QString protocol() const { return "process"; }
- virtual QString configName() const { return "process"; }
+ virtual TQString protocol() const { return "process"; }
+ virtual TQString configName() const { return "process"; }
virtual bool canReadSubjects() const { return false; }
virtual bool canDeleteMail() const { return false; }
virtual bool canReadMail() const { return false; }
virtual bool fullMessage() const { return false; }
- virtual QString mailboxName() const { return i18n("Program: "); }
+ virtual TQString mailboxName() const { return i18n("Program: "); }
- virtual void configFillGroupBoxes( QStringList* ) const;
- virtual void configFields( QPtrVector< QWidget >* vector, const QObject*, QPtrList< AccountInput >* ) const;
- virtual void readEntries( QMap< QString, QString >*, QMap< QString, QString >* ) const;
- virtual void writeEntries( QMap< QString, QString >* ) const;
+ virtual void configFillGroupBoxes( TQStringList* ) const;
+ virtual void configFields( TQPtrVector< TQWidget >* vector, const TQObject*, TQPtrList< AccountInput >* ) const;
+ virtual void readEntries( TQMap< TQString, TQString >*, TQMap< TQString, TQString >* ) const;
+ virtual void writeEntries( TQMap< TQString, TQString >* ) const;
};
#endif
diff --git a/korn/progress_dialog.ui.h b/korn/progress_dialog.ui.h
index fc982b8a0..2407ca530 100644
--- a/korn/progress_dialog.ui.h
+++ b/korn/progress_dialog.ui.h
@@ -29,7 +29,7 @@
*****************************************************************************/
-void DoubleProgressDialog::setText( const QString & str )
+void DoubleProgressDialog::setText( const TQString & str )
{
lbText->setText( str );
}
diff --git a/korn/protocol.h b/korn/protocol.h
index 75062b515..148e9e7f7 100644
--- a/korn/protocol.h
+++ b/korn/protocol.h
@@ -34,7 +34,7 @@ template< class T> class QPtrList;
template< class T> class QPtrVector;
template< class T, class S> class QMap;
-#include <qstring.h>
+#include <tqstring.h>
class Protocol
{
@@ -44,13 +44,13 @@ public:
virtual const Protocol* getProtocol( KConfigGroup* ) const = 0;
virtual KMailDrop* createMaildrop( KConfigGroup* ) const = 0;
- virtual QMap< QString, QString > * createConfig( KConfigGroup* config, const QString& password ) const = 0;
- virtual QString configName() const { return "not specified"; }
+ virtual TQMap< TQString, TQString > * createConfig( KConfigGroup* config, const TQString& password ) const = 0;
+ virtual TQString configName() const { return "not specified"; }
- virtual void configFillGroupBoxes( QStringList* ) const = 0;
- virtual void configFields( QPtrVector< QWidget >* vector, const QObject*, QPtrList< AccountInput >* ) const = 0;
- virtual void readEntries( QMap< QString, QString >* ) const = 0;
- virtual void writeEntries( QMap< QString, QString >* ) const = 0;
+ virtual void configFillGroupBoxes( TQStringList* ) const = 0;
+ virtual void configFields( TQPtrVector< TQWidget >* vector, const TQObject*, TQPtrList< AccountInput >* ) const = 0;
+ virtual void readEntries( TQMap< TQString, TQString >* ) const = 0;
+ virtual void writeEntries( TQMap< TQString, TQString >* ) const = 0;
virtual unsigned short defaultPort( bool ) const { return 0; }
diff --git a/korn/protocols.cpp b/korn/protocols.cpp
index 60fac95a1..526c099b3 100644
--- a/korn/protocols.cpp
+++ b/korn/protocols.cpp
@@ -31,13 +31,13 @@
#include "dcop_proto.h"
#include "kmail_proto.h"
-#include <qdict.h>
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqdict.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
-QDict<Protocol>* Protocols::protocols = 0;
+TQDict<Protocol>* Protocols::protocols = 0;
-const Protocol* Protocols::getProto( const QString& proto )
+const Protocol* Protocols::getProto( const TQString& proto )
{
if( !protocols )
fillProtocols();
@@ -50,14 +50,14 @@ const Protocol* Protocols::firstProtocol()
return getProto( "mbox" );
}
-QStringList Protocols::getProtocols()
+TQStringList Protocols::getProtocols()
{
- QStringList output;
+ TQStringList output;
if( !protocols )
fillProtocols();
- QDictIterator<Protocol> it( *protocols );
+ TQDictIterator<Protocol> it( *protocols );
for( ; it.current(); ++it )
output.append( it.currentKey() );
@@ -68,7 +68,7 @@ QStringList Protocols::getProtocols()
void Protocols::fillProtocols()
{
- protocols = new QDict< Protocol>;
+ protocols = new TQDict< Protocol>;
protocols->setAutoDelete( true );
addProtocol( new Imap_Protocol );
addProtocol( new MBox_Protocol );
diff --git a/korn/protocols.h b/korn/protocols.h
index 02492ce13..d77a61754 100644
--- a/korn/protocols.h
+++ b/korn/protocols.h
@@ -31,16 +31,16 @@ public:
Protocols() {}
~Protocols() {}
- static const Protocol* getProto( const QString& );
+ static const Protocol* getProto( const TQString& );
static const Protocol* firstProtocol();
- static QStringList getProtocols();
+ static TQStringList getProtocols();
static void fillProtocols();
private:
static void addProtocol( Protocol* );
- static QDict<Protocol> *protocols;
+ static TQDict<Protocol> *protocols;
};
#endif //MK_PROTOCOLS_H
diff --git a/korn/qmail_proto.cpp b/korn/qmail_proto.cpp
index 8accfbdb1..55b98123d 100644
--- a/korn/qmail_proto.cpp
+++ b/korn/qmail_proto.cpp
@@ -22,28 +22,28 @@
#include <kdebug.h>
#include <kurlrequester.h>
-#include <qlayout.h>
-#include <qptrvector.h>
-#include <qstringlist.h>
+#include <tqlayout.h>
+#include <tqptrvector.h>
+#include <tqstringlist.h>
#include "account_input.h"
-void QMail_Protocol::configFillGroupBoxes( QStringList* groupBoxes ) const
+void QMail_Protocol::configFillGroupBoxes( TQStringList* groupBoxes ) const
{
groupBoxes->append( "Maildir" );
}
-void QMail_Protocol::configFields( QPtrVector< QWidget >* vector, const QObject*, QPtrList< AccountInput > *result ) const
+void QMail_Protocol::configFields( TQPtrVector< TQWidget >* vector, const TQObject*, TQPtrList< AccountInput > *result ) const
{
- result->append( new URLInput( (QWidget*)vector->at( 0 ), i18n( "Path:" ), "", "mailbox" ) );
+ result->append( new URLInput( (TQWidget*)vector->at( 0 ), i18n( "Path:" ), "", "mailbox" ) );
dynamic_cast<KURLRequester*>(result->last()->rightWidget())->setMode( KFile::Directory );
}
-void QMail_Protocol::readEntries( QMap< QString, QString >*, QMap< QString, QString >* ) const
+void QMail_Protocol::readEntries( TQMap< TQString, TQString >*, TQMap< TQString, TQString >* ) const
{
}
-void QMail_Protocol::writeEntries( QMap< QString, QString >* map ) const
+void QMail_Protocol::writeEntries( TQMap< TQString, TQString >* map ) const
{
clearFields( map, (KIO_Protocol::Fields)( server | port | username | password | save_password | metadata ) );
}
diff --git a/korn/qmail_proto.h b/korn/qmail_proto.h
index 90c1bc381..aaa722ee2 100644
--- a/korn/qmail_proto.h
+++ b/korn/qmail_proto.h
@@ -31,8 +31,8 @@ public:
virtual bool connectionBased() const { return false; }
- virtual QString protocol() const { return "file"; }
- virtual QString configName() const { return "qmail"; }
+ virtual TQString protocol() const { return "file"; }
+ virtual TQString configName() const { return "qmail"; }
virtual bool canReadSubjects() const { return true; }
virtual bool canDeleteMail() const { return true; }
@@ -47,12 +47,12 @@ public:
}
- virtual QString mailboxName() const { return i18n( "Path:" ); }
+ virtual TQString mailboxName() const { return i18n( "Path:" ); }
- virtual void configFillGroupBoxes( QStringList* ) const;
- virtual void configFields( QPtrVector< QWidget >* vector, const QObject*, QPtrList< AccountInput >* ) const;
- virtual void readEntries( QMap< QString, QString >*, QMap< QString, QString >* ) const;
- virtual void writeEntries( QMap< QString, QString >* ) const;
+ virtual void configFillGroupBoxes( TQStringList* ) const;
+ virtual void configFields( TQPtrVector< TQWidget >* vector, const TQObject*, TQPtrList< AccountInput >* ) const;
+ virtual void readEntries( TQMap< TQString, TQString >*, TQMap< TQString, TQString >* ) const;
+ virtual void writeEntries( TQMap< TQString, TQString >* ) const;
};
#endif
diff --git a/korn/sortedmailsubject.cpp b/korn/sortedmailsubject.cpp
index 5b9da297b..8b1e20bde 100644
--- a/korn/sortedmailsubject.cpp
+++ b/korn/sortedmailsubject.cpp
@@ -18,7 +18,7 @@
#include "sortedmailsubject.h"
-int SortedMailSubject::compareItems ( QPtrCollection::Item item1, QPtrCollection::Item item2 )
+int SortedMailSubject::compareItems ( TQPtrCollection::Item item1, TQPtrCollection::Item item2 )
{
int date1, date2;
date1 = ( (KornMailSubject*)item1 )->getDate();
diff --git a/korn/sortedmailsubject.h b/korn/sortedmailsubject.h
index e0011c122..7699fa6e0 100644
--- a/korn/sortedmailsubject.h
+++ b/korn/sortedmailsubject.h
@@ -20,21 +20,21 @@
#define MK_SORTEDMAILSUBJECT_H
#include "mailsubject.h"
-#include <qptrlist.h>
+#include <tqptrlist.h>
/*
- * This class is a normal QPtrList with an overloaded function compareItems.
+ * This class is a normal TQPtrList with an overloaded function compareItems.
* This way, it is possible to sort this list on date.
*/
-class SortedMailSubject : public QPtrList< KornMailSubject >
+class SortedMailSubject : public TQPtrList< KornMailSubject >
{
public:
- SortedMailSubject() : QPtrList< KornMailSubject >() {}
- SortedMailSubject( const SortedMailSubject& sms ) : QPtrList< KornMailSubject >( sms ) {}
+ SortedMailSubject() : TQPtrList< KornMailSubject >() {}
+ SortedMailSubject( const SortedMailSubject& sms ) : TQPtrList< KornMailSubject >( sms ) {}
~SortedMailSubject() {}
- virtual int compareItems ( QPtrCollection::Item item1, QPtrCollection::Item item2 );
+ virtual int compareItems ( TQPtrCollection::Item item1, TQPtrCollection::Item item2 );
};
#endif //MK_SORTEDMAILSUBJECT_H
diff --git a/korn/stringid.cpp b/korn/stringid.cpp
index 43f5ea4a1..e28411ac0 100644
--- a/korn/stringid.cpp
+++ b/korn/stringid.cpp
@@ -23,7 +23,7 @@
#include "stringid.h"
-KornStringId::KornStringId( const QString & id ) : _id( id )
+KornStringId::KornStringId( const TQString & id ) : _id( id )
{
}
diff --git a/korn/stringid.h b/korn/stringid.h
index 871f97ec2..f60b21d21 100644
--- a/korn/stringid.h
+++ b/korn/stringid.h
@@ -25,20 +25,20 @@
* Author Mart Kelder
*/
-#include<qstring.h>
+#include<tqstring.h>
#include"mailid.h"
class KornStringId : public KornMailId
{
private:
- QString _id;
+ TQString _id;
public:
- KornStringId( const QString & id );
+ KornStringId( const TQString & id );
KornStringId( const KornStringId & src );
~KornStringId() {}
- QString getId() const { return _id; }
- virtual QString toString() const { return _id; }
+ TQString getId() const { return _id; }
+ virtual TQString toString() const { return _id; }
virtual KornMailId *clone() const;
};
diff --git a/korn/subjectsdlg.cpp b/korn/subjectsdlg.cpp
index 9b675e0bf..f16d3a913 100644
--- a/korn/subjectsdlg.cpp
+++ b/korn/subjectsdlg.cpp
@@ -1,25 +1,25 @@
#include "subjectsdlg.h"
#include "maildrop.h"
-#include <qapplication.h>
+#include <tqapplication.h>
#include <kcursor.h>
#include <kdebug.h>
-#include <qlayout.h>
-#include <qdatetime.h>
-#include <qtimer.h>
+#include <tqlayout.h>
+#include <tqdatetime.h>
+#include <tqtimer.h>
#include "mailsubject.h"
#include <klocale.h>
-#include <qprogressdialog.h>
+#include <tqprogressdialog.h>
#include <kmessagebox.h>
#include "maildlg.h"
#include "progress_dialog.h"
-KornSubjectsDlg::SubjectListViewItem::SubjectListViewItem( QListView *parent, KornMailSubject * item)
+KornSubjectsDlg::SubjectListViewItem::SubjectListViewItem( TQListView *parent, KornMailSubject * item)
// set the column strings except column 2 (date)
: KListViewItem(parent, item->getSender(), item->getSubject(), "", KGlobal::locale()->formatNumber(item->getSize(), 0))
, _mailSubject( new KornMailSubject( *item ) )
{
// convert the date according to the user settings and show it in column 2
- QDateTime date;
+ TQDateTime date;
date.setTime_t(_mailSubject->getDate());
setText(2, KGlobal::locale()->formatDateTime(date, true, true));
}
@@ -29,12 +29,12 @@ KornSubjectsDlg::SubjectListViewItem::~SubjectListViewItem()
delete _mailSubject;
}
-int KornSubjectsDlg::SubjectListViewItem::compare( QListViewItem* item, int column, bool ascending ) const
+int KornSubjectsDlg::SubjectListViewItem::compare( TQListViewItem* item, int column, bool ascending ) const
{
if ( column == 2 )
{
// if column 2 was clicked, compare the dates.
- QDateTime d, e;
+ TQDateTime d, e;
d.setTime_t(_mailSubject->getDate());
e.setTime_t(((SubjectListViewItem *)item)->_mailSubject->getDate());
return e.secsTo( d );
@@ -53,8 +53,8 @@ int KornSubjectsDlg::SubjectListViewItem::compare( QListViewItem* item, int colu
}
}
-KornSubjectsDlg::KornSubjectsDlg( QWidget *parent )
- : KDialogBase( parent, "urldialog", true, "test", Close, Close, true), _mailDrop( new QPtrList< KMailDrop > ),
+KornSubjectsDlg::KornSubjectsDlg( TQWidget *parent )
+ : KDialogBase( parent, "urldialog", true, "test", Close, Close, true), _mailDrop( new TQPtrList< KMailDrop > ),
_subjects(0), _delete(0), mailDlg(0), _canDeleteMaildrop( true )
{
_loadSubjectsCanceled = false;
@@ -62,7 +62,7 @@ KornSubjectsDlg::KornSubjectsDlg( QWidget *parent )
// The dialog contains a list view and several buttons.
// Two box layouts hol dthem.
- QWidget * page = new QWidget( this );
+ TQWidget * page = new TQWidget( this );
setMainWidget(page);
invertSelButton = new KPushButton(i18n("&Invert Selection"), page);
clearSelButton = new KPushButton(i18n("&Remove Selection"), page);
@@ -70,8 +70,8 @@ KornSubjectsDlg::KornSubjectsDlg( QWidget *parent )
showButton = new KPushButton(i18n("&Show"), page);
deleteButton->setEnabled(false);
showButton->setEnabled(false);
- QVBoxLayout * topLayout = new QVBoxLayout( page, 0, spacingHint() );
- QHBoxLayout * buttons = new QHBoxLayout();
+ TQVBoxLayout * topLayout = new TQVBoxLayout( page, 0, spacingHint() );
+ TQHBoxLayout * buttons = new TQHBoxLayout();
_list = new KListView(page);
topLayout->addWidget(_list, 10);
topLayout->addLayout(buttons, 0);
@@ -82,7 +82,7 @@ KornSubjectsDlg::KornSubjectsDlg( QWidget *parent )
buttons->addStretch(10);
// feed the list view with its colums
- _list->setSelectionMode(QListView::Multi);
+ _list->setSelectionMode(TQListView::Multi);
_list->addColumn(i18n("From"));
_list->addColumn(i18n("Subject"));
_list->addColumn(i18n("Date"));
@@ -93,15 +93,15 @@ KornSubjectsDlg::KornSubjectsDlg( QWidget *parent )
_list->setItemMargin(3);
// connect the selection changed and double click events of the list view
- connect(_list, SIGNAL(selectionChanged()), this, SLOT(listSelectionChanged()));
- connect(_list, SIGNAL(executed(QListViewItem *)), this, SLOT(doubleClicked(QListViewItem *)));
+ connect(_list, TQT_SIGNAL(selectionChanged()), this, TQT_SLOT(listSelectionChanged()));
+ connect(_list, TQT_SIGNAL(executed(TQListViewItem *)), this, TQT_SLOT(doubleClicked(TQListViewItem *)));
// connect the buttons
- connect(invertSelButton, SIGNAL(clicked()), this, SLOT(invertSelection()));
- connect(clearSelButton, SIGNAL(clicked()), this, SLOT(removeSelection()));
- connect(showButton, SIGNAL(clicked()), this, SLOT(showMessage()));
- connect(deleteButton, SIGNAL(clicked()), this, SLOT(deleteMessage()));
- setInitialSize(QSize(QApplication::desktop()->width(), QApplication::desktop()->height()));
+ connect(invertSelButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(invertSelection()));
+ connect(clearSelButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(removeSelection()));
+ connect(showButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(showMessage()));
+ connect(deleteButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(deleteMessage()));
+ setInitialSize(TQSize(TQApplication::desktop()->width(), TQApplication::desktop()->height()));
}
void KornSubjectsDlg::clear()
@@ -122,7 +122,7 @@ void KornSubjectsDlg::loadMessages()
void KornSubjectsDlg::listSelectionChanged()
{
- QPtrList< QListViewItem > list( _list->selectedItems() );
+ TQPtrList< TQListViewItem > list( _list->selectedItems() );
if (!_mailDrop)
return;
@@ -147,7 +147,7 @@ void KornSubjectsDlg::listSelectionChanged()
deleteButton->setEnabled(enableDelete);
}
-void KornSubjectsDlg::doubleClicked(QListViewItem * item)
+void KornSubjectsDlg::doubleClicked(TQListViewItem * item)
{
// show the message
showMessage(item);
@@ -181,14 +181,14 @@ void KornSubjectsDlg::showMessage()
return;
// get selcted item
- QPtrList<QListViewItem> messages = _list->selectedItems();
- QListViewItem * item = messages.first();
+ TQPtrList<TQListViewItem> messages = _list->selectedItems();
+ TQListViewItem * item = messages.first();
// and show it
showMessage(item);
}
-void KornSubjectsDlg::showMessage(QListViewItem * item )
+void KornSubjectsDlg::showMessage(TQListViewItem * item )
{
if (!item)
return;
@@ -202,7 +202,7 @@ void KornSubjectsDlg::showMessage(QListViewItem * item )
mailDlg->exec();
}
-void KornSubjectsDlg::showSubjectsDlg( const QString& name )
+void KornSubjectsDlg::showSubjectsDlg( const TQString& name )
{
setCaption( i18n("Mails in Box: %1").arg( name ) );
@@ -215,7 +215,7 @@ void KornSubjectsDlg::showSubjectsDlg( const QString& name )
void KornSubjectsDlg::closeDialog( )
{
- disconnect( this, SIGNAL( finished() ), this, SLOT( closeDialog() ) );
+ disconnect( this, TQT_SIGNAL( finished() ), this, TQT_SLOT( closeDialog() ) );
}
//----------------------------
@@ -253,13 +253,13 @@ void KornSubjectsDlg::prepareStep1Subjects( KMailDrop *drop )
_subjects->progress->setProgress( 0 );
_subjects->atRechecking = true;
- connect( drop, SIGNAL( rechecked() ), this, SLOT( slotReloadRechecked() ) );
+ connect( drop, TQT_SIGNAL( rechecked() ), this, TQT_SLOT( slotReloadRechecked() ) );
drop->recheck();
}
void KornSubjectsDlg::removeStep1Subjects( KMailDrop *drop )
{
- disconnect( drop, SIGNAL( rechecked() ), this, SLOT( slotReloadRechecked() ) );
+ disconnect( drop, TQT_SIGNAL( rechecked() ), this, TQT_SLOT( slotReloadRechecked() ) );
}
void KornSubjectsDlg::prepareStep2Subjects( KMailDrop *drop )
@@ -267,11 +267,11 @@ void KornSubjectsDlg::prepareStep2Subjects( KMailDrop *drop )
_subjects->progress->setText( i18n( "Fetching messages..." ) );
_subjects->atRechecking = false;
- connect( drop, SIGNAL( readSubject( KornMailSubject* ) ), this, SLOT( subjectAvailable( KornMailSubject* ) ) );
- connect( drop, SIGNAL( readSubjectsReady( bool ) ), this, SLOT( subjectsReady( bool ) ) );
- connect( drop, SIGNAL( readSubjectsTotalSteps( int ) ), _subjects->progress, SLOT( setNumberOfSteps( int ) ) );
- connect( drop, SIGNAL( readSubjectsProgress( int ) ), _subjects->progress, SLOT( setProgress( int ) ) );
- connect( _subjects->progress, SIGNAL( cancelPressed() ), drop, SLOT( readSubjectsCanceled() ) );
+ connect( drop, TQT_SIGNAL( readSubject( KornMailSubject* ) ), this, TQT_SLOT( subjectAvailable( KornMailSubject* ) ) );
+ connect( drop, TQT_SIGNAL( readSubjectsReady( bool ) ), this, TQT_SLOT( subjectsReady( bool ) ) );
+ connect( drop, TQT_SIGNAL( readSubjectsTotalSteps( int ) ), _subjects->progress, TQT_SLOT( setNumberOfSteps( int ) ) );
+ connect( drop, TQT_SIGNAL( readSubjectsProgress( int ) ), _subjects->progress, TQT_SLOT( setProgress( int ) ) );
+ connect( _subjects->progress, TQT_SIGNAL( cancelPressed() ), drop, TQT_SLOT( readSubjectsCanceled() ) );
if( _subjects->it->current()->canReadSubjects() )
_subjects->it->current()->readSubjects( 0 );
@@ -281,11 +281,11 @@ void KornSubjectsDlg::prepareStep2Subjects( KMailDrop *drop )
void KornSubjectsDlg::removeStep2Subjects( KMailDrop *drop )
{
- disconnect( drop, SIGNAL( readSubject( KornMailSubject* ) ), this, SLOT( subjectAvailable( KornMailSubject* ) ) );
- disconnect( drop, SIGNAL( readSubjectsReady( bool ) ), this, SLOT( subjectsReady( bool ) ) );
- disconnect( drop, SIGNAL( readSubjectsTotalSteps( int ) ), _subjects->progress, SLOT( setNumberOfSteps( int ) ) );
- disconnect( drop, SIGNAL( readSubjectsProgress( int ) ), _subjects->progress, SLOT( setProgress( int ) ) );
- disconnect( _subjects->progress, SIGNAL( cancelPressed() ), drop, SLOT( readSubjectsCanceled() ) );
+ disconnect( drop, TQT_SIGNAL( readSubject( KornMailSubject* ) ), this, TQT_SLOT( subjectAvailable( KornMailSubject* ) ) );
+ disconnect( drop, TQT_SIGNAL( readSubjectsReady( bool ) ), this, TQT_SLOT( subjectsReady( bool ) ) );
+ disconnect( drop, TQT_SIGNAL( readSubjectsTotalSteps( int ) ), _subjects->progress, TQT_SLOT( setNumberOfSteps( int ) ) );
+ disconnect( drop, TQT_SIGNAL( readSubjectsProgress( int ) ), _subjects->progress, TQT_SLOT( setProgress( int ) ) );
+ disconnect( _subjects->progress, TQT_SIGNAL( cancelPressed() ), drop, TQT_SLOT( readSubjectsCanceled() ) );
}
bool KornSubjectsDlg::makeSubjectsStruct()
@@ -294,12 +294,12 @@ bool KornSubjectsDlg::makeSubjectsStruct()
return false;
_subjects = new SubjectsData;
- _subjects->it = new QPtrListIterator< KMailDrop >( *_mailDrop );
- _subjects->subjects = new QValueVector< KornMailSubject >;
+ _subjects->it = new TQPtrListIterator< KMailDrop >( *_mailDrop );
+ _subjects->subjects = new TQValueVector< KornMailSubject >;
_subjects->progress = new DoubleProgressDialog( this, "progress" );
_subjects->atRechecking = true;
- connect( _subjects->progress, SIGNAL( cancelPressed() ), this, SLOT( slotSubjectsCanceled() ) );
+ connect( _subjects->progress, TQT_SIGNAL( cancelPressed() ), this, TQT_SLOT( slotSubjectsCanceled() ) );
return true;
}
@@ -309,7 +309,7 @@ void KornSubjectsDlg::deleteSubjectsStruct()
if( !_subjects )
return;
- disconnect( _subjects->progress, SIGNAL( cancelPressed() ), this, SLOT( slotSubjectsCanceled() ) );
+ disconnect( _subjects->progress, TQT_SIGNAL( cancelPressed() ), this, TQT_SLOT( slotSubjectsCanceled() ) );
this->unsetCursor();
@@ -325,7 +325,7 @@ void KornSubjectsDlg::slotReloadRechecked()
_subjects->progress->setText( i18n( "Downloading subjects..." ) ); //Progress message when fetching messages
removeStep1Subjects( _subjects->it->current() );
- _subjects->subjects->reserve( _subjects->it->current()->count() ); //enlarge QValueVector to speed adding up.
+ _subjects->subjects->reserve( _subjects->it->current()->count() ); //enlarge TQValueVector to speed adding up.
prepareStep2Subjects( _subjects->it->current() );
}
@@ -377,7 +377,7 @@ void KornSubjectsDlg::subjectsReady( bool success )
_list->clear();
//All subjects downloaded
- for( QValueVector<KornMailSubject>::iterator it = _subjects->subjects->begin(); it != _subjects->subjects->end();
+ for( TQValueVector<KornMailSubject>::iterator it = _subjects->subjects->begin(); it != _subjects->subjects->end();
++it )
{ //Draw entry's
new SubjectListViewItem(_list, &(*it));
@@ -415,7 +415,7 @@ void KornSubjectsDlg::deleteMessage()
_delete->totalNumberOfMessages = _delete->messages->count();
}
- QString confirmation = i18n( "Do you really want to delete %n message?",
+ TQString confirmation = i18n( "Do you really want to delete %n message?",
"Do you really want to delete %n messages?", _delete->messages->count() );
if( KMessageBox::questionYesNo( this, confirmation, i18n( "Confirmation" ), KStdGuiItem::del(), KStdGuiItem::cancel() ) != KMessageBox::Yes )
@@ -436,17 +436,17 @@ void KornSubjectsDlg::deleteMessage()
void KornSubjectsDlg::makeDeleteStruct()
{
_delete = new DeleteData;
- _delete->messages = new QPtrList< KornMailSubject >;
- _delete->ids = new QPtrList< const KornMailId >;
- _delete->progress = new QProgressDialog( this, "progress" );
+ _delete->messages = new TQPtrList< KornMailSubject >;
+ _delete->ids = new TQPtrList< const KornMailId >;
+ _delete->progress = new TQProgressDialog( this, "progress" );
_delete->totalNumberOfMessages = 0;
- connect( _delete->progress, SIGNAL( canceled() ), this, SLOT( slotDeleteCanceled() ) );
+ connect( _delete->progress, TQT_SIGNAL( canceled() ), this, TQT_SLOT( slotDeleteCanceled() ) );
}
void KornSubjectsDlg::deleteDeleteStruct()
{
- disconnect( _delete->progress, SIGNAL( canceled() ), this, SLOT( slotDeleteCanceled() ) );
+ disconnect( _delete->progress, TQT_SIGNAL( canceled() ), this, TQT_SLOT( slotDeleteCanceled() ) );
delete _delete->messages;
delete _delete->ids;
@@ -456,8 +456,8 @@ void KornSubjectsDlg::deleteDeleteStruct()
void KornSubjectsDlg::fillDeleteMessageList()
{
- QListViewItem *current;
- QPtrList< QListViewItem > list( _list->selectedItems() );
+ TQListViewItem *current;
+ TQPtrList< TQListViewItem > list( _list->selectedItems() );
for( current = list.first(); current; current = list.next() )
_delete->messages->append( ( ( KornSubjectsDlg::SubjectListViewItem * ) current )->getMailSubject() );
@@ -487,24 +487,24 @@ void KornSubjectsDlg::deleteNextMessage()
{
if( _delete->messages->count() == 0 ) //No more messages to delete
{
- QTimer::singleShot( 100, this, SLOT( reloadSubjects() ) );
+ TQTimer::singleShot( 100, this, TQT_SLOT( reloadSubjects() ) );
deleteDeleteStruct();
//reloadSubjects(); //Reload all subjects again
return;
}
- _delete->ids = new QPtrList< const KornMailId >;
+ _delete->ids = new TQPtrList< const KornMailId >;
_delete->drop = _delete->messages->getFirst()->getMailDrop();
fillDeleteIdList( _delete->drop );
// Connect the progress bar signals of the mail box
- connect( _delete->drop, SIGNAL( deleteMailsTotalSteps( int ) ), _delete->progress, SLOT( setTotalSteps( int ) ) );
- connect( _delete->drop, SIGNAL( deleteMailsProgress( int ) ), _delete->progress, SLOT( setProgress( int ) ) );
- connect( _delete->drop, SIGNAL( deleteMailsReady( bool ) ), this, SLOT( deleteMailsReady( bool ) ) );
+ connect( _delete->drop, TQT_SIGNAL( deleteMailsTotalSteps( int ) ), _delete->progress, TQT_SLOT( setTotalSteps( int ) ) );
+ connect( _delete->drop, TQT_SIGNAL( deleteMailsProgress( int ) ), _delete->progress, TQT_SLOT( setProgress( int ) ) );
+ connect( _delete->drop, TQT_SIGNAL( deleteMailsReady( bool ) ), this, TQT_SLOT( deleteMailsReady( bool ) ) );
// connect the cancel button of the progress bar
- connect( _delete->progress, SIGNAL( canceled() ), _delete->drop, SLOT( deleteMailsCanceled() ) );
+ connect( _delete->progress, TQT_SIGNAL( canceled() ), _delete->drop, TQT_SLOT( deleteMailsCanceled() ) );
// delete the mails
_delete->drop->deleteMails( _delete->ids, 0 );
@@ -515,12 +515,12 @@ void KornSubjectsDlg::deleteMailsReady( bool /*success*/ )
if( !_delete )
return;
- disconnect( _delete->drop, SIGNAL( deleteMailsTotalSteps( int ) ), _delete->progress, SLOT( setTotalSteps( int ) ) );
- disconnect( _delete->drop, SIGNAL( deleteMailsProgress( int ) ), _delete->progress, SLOT( setProgress( int ) ) );
- disconnect( _delete->drop, SIGNAL( deleteMailsReady( bool ) ), this, SLOT( deleteMailsReady( bool ) ) );
+ disconnect( _delete->drop, TQT_SIGNAL( deleteMailsTotalSteps( int ) ), _delete->progress, TQT_SLOT( setTotalSteps( int ) ) );
+ disconnect( _delete->drop, TQT_SIGNAL( deleteMailsProgress( int ) ), _delete->progress, TQT_SLOT( setProgress( int ) ) );
+ disconnect( _delete->drop, TQT_SIGNAL( deleteMailsReady( bool ) ), this, TQT_SLOT( deleteMailsReady( bool ) ) );
// disconnect the cancel button of the progress bar
- disconnect( _delete->progress, SIGNAL( canceled() ), _delete->drop, SLOT( deleteMailsCanceled() ) );
+ disconnect( _delete->progress, TQT_SIGNAL( canceled() ), _delete->drop, TQT_SLOT( deleteMailsCanceled() ) );
deleteNextMessage();
}
diff --git a/korn/subjectsdlg.h b/korn/subjectsdlg.h
index 064b6c8ef..02a3e0396 100644
--- a/korn/subjectsdlg.h
+++ b/korn/subjectsdlg.h
@@ -3,7 +3,7 @@
#include<kdialogbase.h>
#include <klistview.h>
-#include<qvaluevector.h>
+#include<tqvaluevector.h>
#include <kpushbutton.h>
class KMailDrop;
@@ -39,7 +39,7 @@ class KornSubjectsDlg: public KDialogBase
* @param item KornMailSubject this item should represent. It is NOT deleted
* if SubjectListViewItem is deleted.
*/
- SubjectListViewItem( QListView *parent, KornMailSubject * item);
+ SubjectListViewItem( TQListView *parent, KornMailSubject * item);
/**
* SubjectListViewItem Destructor
@@ -52,7 +52,7 @@ class KornSubjectsDlg: public KDialogBase
* @param column column to compare
* @param ascending search order
*/
- int compare( QListViewItem* item, int column, bool ascending ) const;
+ int compare( TQListViewItem* item, int column, bool ascending ) const;
/**
* Return the mail subject.
@@ -61,20 +61,20 @@ class KornSubjectsDlg: public KDialogBase
KornMailSubject * getMailSubject() const {return _mailSubject;}
};
- QPtrList< KMailDrop > *_mailDrop;
+ TQPtrList< KMailDrop > *_mailDrop;
struct SubjectsData
{
- QPtrListIterator< KMailDrop > *it;
- QValueVector< KornMailSubject > *subjects;
+ TQPtrListIterator< KMailDrop > *it;
+ TQValueVector< KornMailSubject > *subjects;
DoubleProgressDialog *progress;
bool atRechecking;
} *_subjects;
struct DeleteData
{
- QPtrList< KornMailSubject > *messages;
- QPtrList< const KornMailId > *ids;
- QProgressDialog *progress;
+ TQPtrList< KornMailSubject > *messages;
+ TQPtrList< const KornMailId > *ids;
+ TQProgressDialog *progress;
KMailDrop *drop;
int totalNumberOfMessages;
} *_delete;
@@ -99,13 +99,13 @@ class KornSubjectsDlg: public KDialogBase
* Show a message in a separate dialog
* @param item message to show
*/
- void showMessage(QListViewItem * item);
+ void showMessage(TQListViewItem * item);
public:
/**
* KornSubjectsDlg Constructor
* @param parent parent widget
*/
- KornSubjectsDlg( QWidget *parent=0 );
+ KornSubjectsDlg( TQWidget *parent=0 );
/**
* This functions clears all available KMailDrop's.
@@ -127,7 +127,7 @@ public:
* Show the KornSubjectsDlg as a modal dialog.
* @param name The name of the box
*/
- void showSubjectsDlg( const QString& name );
+ void showSubjectsDlg( const TQString& name );
/**
* KornSubjectsDlg Destructor
@@ -164,7 +164,7 @@ private slots:
/**
* called if a list view item was double clicked
*/
- void doubleClicked ( QListViewItem *item );
+ void doubleClicked ( TQListViewItem *item );
void closeDialog();
diff --git a/korn/systemtray.cpp b/korn/systemtray.cpp
index f3681d550..e7ca45f73 100644
--- a/korn/systemtray.cpp
+++ b/korn/systemtray.cpp
@@ -22,9 +22,9 @@
#include <kconfig.h>
#include <kdebug.h>
-#include <qmovie.h>
+#include <tqmovie.h>
-SystemTray::SystemTray( QWidget * parent, const char * name )
+SystemTray::SystemTray( TQWidget * parent, const char * name )
: KSystemTray( parent, name )
{
}
@@ -33,7 +33,7 @@ SystemTray::~SystemTray()
{
}
-void SystemTray::mousePressEvent( QMouseEvent* ee )
+void SystemTray::mousePressEvent( TQMouseEvent* ee )
{
//Use the general function to determe what must be done
emit mouseButtonPressed( ee->button() );
diff --git a/korn/systemtray.h b/korn/systemtray.h
index 4b8aa616f..4f9f70eda 100644
--- a/korn/systemtray.h
+++ b/korn/systemtray.h
@@ -37,7 +37,7 @@ public:
* @param parant The parent window
* @param name The name of the QObject's parents.
*/
- SystemTray( QWidget * parent = 0, const char * name = 0 );
+ SystemTray( TQWidget * parent = 0, const char * name = 0 );
/**
* Empty destructor; does nothing at the moment
*/
@@ -49,7 +49,7 @@ protected:
* In this implemention, the action depends on the settings.
* @param me An object which contains the mousebutton which is pressed.
*/
- virtual void mousePressEvent( QMouseEvent* me );
+ virtual void mousePressEvent( TQMouseEvent* me );
signals:
void mouseButtonPressed( Qt::ButtonState );
diff --git a/korn/utils.h b/korn/utils.h
index 4dc279556..fe64099a0 100644
--- a/korn/utils.h
+++ b/korn/utils.h
@@ -1,5 +1,5 @@
#ifndef KORN_UTILS_H
#define KORN_UTILS_H
-#include <qstring.h>
-inline QString fu(const char * s) { return QString::fromUtf8(s); }
+#include <tqstring.h>
+inline TQString fu(const char * s) { return TQString::fromUtf8(s); }
#endif
diff --git a/kpilot/Documentation/ConduitProgrammingTutorial/mal-factory.cc b/kpilot/Documentation/ConduitProgrammingTutorial/mal-factory.cc
index caa2ab20d..a55a0e647 100644
--- a/kpilot/Documentation/ConduitProgrammingTutorial/mal-factory.cc
+++ b/kpilot/Documentation/ConduitProgrammingTutorial/mal-factory.cc
@@ -40,7 +40,7 @@ const char *MALConduitFactory::fProxyPort = "Proxy Port";
const char *MALConduitFactory::fProxyUser = "Proxy User";
const char *MALConduitFactory::fProxyPassword = "Proxy Password";
-MALConduitFactory::MALConduitFactory(QObject *p, const char *n) :
+MALConduitFactory::MALConduitFactory(TQObject *p, const char *n) :
KLibFactory(p,n)
{
FUNCTIONSETUP;
@@ -70,10 +70,10 @@ MALConduitFactory::~MALConduitFactory()
KPILOT_DELETE(fAbout);
}
-/* virtual */ QObject *MALConduitFactory::createObject( QObject *p,
+/* virtual */ TQObject *MALConduitFactory::createObject( TQObject *p,
const char *n,
const char *c,
- const QStringList &a)
+ const TQStringList &a)
{
FUNCTIONSETUP;
@@ -86,7 +86,7 @@ MALConduitFactory::~MALConduitFactory()
if (qstrcmp(c,"ConduitConfig")==0)
{
- QWidget *w = dynamic_cast<QWidget *>(p);
+ TQWidget *w = dynamic_cast<TQWidget *>(p);
if (w)
{
diff --git a/kpilot/Documentation/ConduitProgrammingTutorial/mal-factory.h b/kpilot/Documentation/ConduitProgrammingTutorial/mal-factory.h
index b92b9cb9e..f38cb5c83 100644
--- a/kpilot/Documentation/ConduitProgrammingTutorial/mal-factory.h
+++ b/kpilot/Documentation/ConduitProgrammingTutorial/mal-factory.h
@@ -17,7 +17,7 @@ class MALConduitFactory : public KLibFactory
Q_OBJECT
public:
- MALConduitFactory(QObject * = 0L,const char * = 0L);
+ MALConduitFactory(TQObject * = 0L,const char * = 0L);
virtual ~MALConduitFactory();
static KAboutData *about() { return fAbout; } ;
@@ -34,10 +34,10 @@ public:
static const char *malPassword() {return fMALPassword;};
protected:
- virtual QObject* createObject( QObject* parent = 0,
+ virtual TQObject* createObject( TQObject* parent = 0,
const char* name = 0,
- const char* classname = "QObject",
- const QStringList &args = QStringList() );
+ const char* classname = "TQObject",
+ const TQStringList &args = TQStringList() );
private:
KInstance *fInstance;
static KAboutData *fAbout;
diff --git a/kpilot/conduits/abbrowserconduit/abbrowser-conduit.cc b/kpilot/conduits/abbrowserconduit/abbrowser-conduit.cc
index bf038bb21..11e25f2dd 100644
--- a/kpilot/conduits/abbrowserconduit/abbrowser-conduit.cc
+++ b/kpilot/conduits/abbrowserconduit/abbrowser-conduit.cc
@@ -33,10 +33,10 @@
#include "options.h"
-#include <qtimer.h>
-#include <qtextcodec.h>
-#include <qfile.h>
-#include <qregexp.h>
+#include <tqtimer.h>
+#include <tqtextcodec.h>
+#include <tqfile.h>
+#include <tqregexp.h>
#include <kabc/stdaddressbook.h>
#include <kabc/resourcefile.h>
@@ -110,7 +110,7 @@ using namespace KABC;
*********************************************************************/
-AbbrowserConduit::AbbrowserConduit(KPilotLink * o, const char *n, const QStringList & a):
+AbbrowserConduit::AbbrowserConduit(KPilotLink * o, const char *n, const TQStringList & a):
ConduitAction(o, n, a),
aBook(0L),
fAddressAppInfo(0L),
@@ -153,7 +153,7 @@ AbbrowserConduit::~AbbrowserConduit()
/* Builds the map which links record ids to uid's of Addressee
*/
-void AbbrowserConduit::_mapContactsToPilot(QMap < recordid_t, QString > &idContactMap)
+void AbbrowserConduit::_mapContactsToPilot(TQMap < recordid_t, TQString > &idContactMap)
{
FUNCTIONSETUP;
@@ -163,7 +163,7 @@ void AbbrowserConduit::_mapContactsToPilot(QMap < recordid_t, QString > &idConta
contactIter != aBook->end(); ++contactIter)
{
Addressee aContact = *contactIter;
- QString recid = aContact.custom(KABCSync::appString, KABCSync::idString);
+ TQString recid = aContact.custom(KABCSync::appString, KABCSync::idString);
if(!recid.isEmpty())
{
recordid_t id = recid.toULong();
@@ -400,7 +400,7 @@ bool AbbrowserConduit::_saveAddressBook()
else {
KIO::NetAccess::removeTempFile(fABookFile);
}
- QFile backup(fABookFile + CSL1("~"));
+ TQFile backup(fABookFile + CSL1("~"));
backup.remove();
}
@@ -524,13 +524,13 @@ void AbbrowserConduit::showAddresses(
// Local block
{
- QString dbpath = fLocalDatabase->dbPathName();
+ TQString dbpath = fLocalDatabase->dbPathName();
DEBUGKPILOT << fname << ": Local database path " << dbpath << endl;
}
if ( syncMode().isTest() )
{
- QTimer::singleShot(0, this, SLOT(slotTestRecord()));
+ TQTimer::singleShot(0, this, TQT_SLOT(slotTestRecord()));
return true;
}
@@ -561,7 +561,7 @@ void AbbrowserConduit::showAddresses(
allIds=fDatabase->idList();
}
- QValueVector<int> v(4);
+ TQValueVector<int> v(4);
v[0] = AbbrowserSettings::custom0();
v[1] = AbbrowserSettings::custom1();
v[2] = AbbrowserSettings::custom2();
@@ -580,7 +580,7 @@ void AbbrowserConduit::showAddresses(
for this, and no longer purge the whole addressbook before the sync to
prevent data loss in case of connection loss. */
- QTimer::singleShot(0, this, SLOT(slotPalmRecToPC()));
+ TQTimer::singleShot(0, this, TQT_SLOT(slotPalmRecToPC()));
return true;
}
@@ -596,7 +596,7 @@ void AbbrowserConduit::slotPalmRecToPC()
{
DEBUGKPILOT << fname << ": Done; change to PCtoHH phase." << endl;
abiter = aBook->begin();
- QTimer::singleShot(0, this, SLOT(slotPCRecToPalm()));
+ TQTimer::singleShot(0, this, TQT_SLOT(slotPCRecToPalm()));
return;
}
@@ -614,7 +614,7 @@ void AbbrowserConduit::slotPalmRecToPC()
if(!palmRec)
{
abiter = aBook->begin();
- QTimer::singleShot(0, this, SLOT(slotPCRecToPalm()));
+ TQTimer::singleShot(0, this, TQT_SLOT(slotPCRecToPalm()));
return;
}
@@ -622,7 +622,7 @@ void AbbrowserConduit::slotPalmRecToPC()
if(syncedIds.contains(palmRec->id()))
{
KPILOT_DELETE(palmRec);
- QTimer::singleShot(0, this, SLOT(slotPalmRecToPC()));
+ TQTimer::singleShot(0, this, TQT_SLOT(slotPalmRecToPC()));
return;
}
@@ -650,7 +650,7 @@ void AbbrowserConduit::slotPalmRecToPC()
KPILOT_DELETE(palmRec);
KPILOT_DELETE(backupRec);
- QTimer::singleShot(0, this, SLOT(slotPalmRecToPC()));
+ TQTimer::singleShot(0, this, TQT_SLOT(slotPalmRecToPC()));
}
@@ -664,7 +664,7 @@ void AbbrowserConduit::slotPCRecToPalm()
{
DEBUGKPILOT << fname << ": Done; change to delete records." << endl;
pilotindex = 0;
- QTimer::singleShot(0, this, SLOT(slotDeletedRecord()));
+ TQTimer::singleShot(0, this, TQT_SLOT(slotDeletedRecord()));
return;
}
@@ -678,12 +678,12 @@ void AbbrowserConduit::slotPCRecToPalm()
{
DEBUGKPILOT << fname << ": address with id " << ad.uid() <<
" marked archived, so don't sync." << endl;
- QTimer::singleShot(0, this, SLOT(slotPCRecToPalm()));
+ TQTimer::singleShot(0, this, TQT_SLOT(slotPCRecToPalm()));
return;
}
- QString recID(ad.custom(KABCSync::appString, KABCSync::idString));
+ TQString recID(ad.custom(KABCSync::appString, KABCSync::idString));
bool ok;
recordid_t rid = recID.toLong(&ok);
if (recID.isEmpty() || !ok || !rid)
@@ -691,7 +691,7 @@ void AbbrowserConduit::slotPCRecToPalm()
DEBUGKPILOT << fname << ": This is a new record." << endl;
// it's a new item(no record ID and not inserted by the Palm -> PC sync), so add it
syncAddressee(ad, 0L, 0L);
- QTimer::singleShot(0, this, SLOT(slotPCRecToPalm()));
+ TQTimer::singleShot(0, this, TQT_SLOT(slotPCRecToPalm()));
return;
}
@@ -699,7 +699,7 @@ void AbbrowserConduit::slotPCRecToPalm()
if (syncedIds.contains(rid))
{
DEBUGKPILOT << ": address with id " << rid << " already synced." << endl;
- QTimer::singleShot(0, this, SLOT(slotPCRecToPalm()));
+ TQTimer::singleShot(0, this, TQT_SLOT(slotPCRecToPalm()));
return;
}
@@ -742,7 +742,7 @@ void AbbrowserConduit::slotPCRecToPalm()
syncedIds.append(rid);
// done with the sync process, go on with the next one:
- QTimer::singleShot(0, this, SLOT(slotPCRecToPalm()));
+ TQTimer::singleShot(0, this, TQT_SLOT(slotPCRecToPalm()));
}
@@ -755,13 +755,13 @@ void AbbrowserConduit::slotDeletedRecord()
if(!backupRec || isFirstSync() )
{
KPILOT_DELETE(backupRec);
- QTimer::singleShot(0, this, SLOT(slotDeleteUnsyncedPCRecords()));
+ TQTimer::singleShot(0, this, TQT_SLOT(slotDeleteUnsyncedPCRecords()));
return;
}
recordid_t id = backupRec->id();
- QString uid = addresseeMap[id];
+ TQString uid = addresseeMap[id];
Addressee e = aBook->findByUid(uid);
DEBUGKPILOT << fname << ": now looking at palm id: ["
@@ -796,7 +796,7 @@ void AbbrowserConduit::slotDeletedRecord()
KPILOT_DELETE(palmRec);
KPILOT_DELETE(backupAddr);
KPILOT_DELETE(backupRec);
- QTimer::singleShot(0, this, SLOT(slotDeletedRecord()));
+ TQTimer::singleShot(0, this, TQT_SLOT(slotDeletedRecord()));
}
@@ -806,9 +806,9 @@ void AbbrowserConduit::slotDeleteUnsyncedPCRecords()
FUNCTIONSETUP;
if ( syncMode()==SyncMode::eCopyHHToPC )
{
- QStringList uids;
+ TQStringList uids;
RecordIDList::iterator it;
- QString uid;
+ TQString uid;
for ( it = syncedIds.begin(); it != syncedIds.end(); ++it)
{
uid=addresseeMap[*it];
@@ -829,7 +829,7 @@ void AbbrowserConduit::slotDeleteUnsyncedPCRecords()
}
}
}
- QTimer::singleShot(0, this, SLOT(slotDeleteUnsyncedHHRecords()));
+ TQTimer::singleShot(0, this, TQT_SLOT(slotDeleteUnsyncedHHRecords()));
}
@@ -852,7 +852,7 @@ void AbbrowserConduit::slotDeleteUnsyncedHHRecords()
}
}
}
- QTimer::singleShot(0, this, SLOT(slotCleanup()));
+ TQTimer::singleShot(0, this, TQT_SLOT(slotCleanup()));
}
@@ -874,7 +874,7 @@ void AbbrowserConduit::slotCleanup()
}
// Write out the sync maps
- QString syncFile = fLocalDatabase->dbPathName() + CSL1(".sync");
+ TQString syncFile = fLocalDatabase->dbPathName() + CSL1(".sync");
DEBUGKPILOT << fname << ": Writing sync map to " << syncFile << endl;
KSaveFile map( syncFile );
if ( map.status() == 0 )
@@ -1215,7 +1215,7 @@ bool AbbrowserConduit::_savePalmAddr(PilotAddress *palmAddr, Addressee &pcAddr)
abId = pcAddr.custom(KABCSync::appString, KABCSync::idString).toUInt();
if(abId != pilotId)
{
- pcAddr.insertCustom(KABCSync::appString, KABCSync::idString, QString::number(pilotId));
+ pcAddr.insertCustom(KABCSync::appString, KABCSync::idString, TQString::number(pilotId));
return true;
}
@@ -1230,16 +1230,16 @@ bool AbbrowserConduit::_savePCAddr(Addressee &pcAddr, PilotAddress*,
FUNCTIONSETUP;
DEBUGKPILOT<<"Before _savePCAddr, pcAddr.custom="<<pcAddr.custom(KABCSync::appString, KABCSync::idString)<<endl;
- QString pilotId = pcAddr.custom(KABCSync::appString, KABCSync::idString);
+ TQString pilotId = pcAddr.custom(KABCSync::appString, KABCSync::idString);
long pilotIdL = pilotId.toLong();
if(!pilotId.isEmpty())
{
// because we maintain a mapping between pilotId -> kabc uid, whenever we add
// a new relationship, we have to remove any old mapping that would tie a different
// pilot id -> this kabc uid
- QMap < recordid_t, QString>::iterator it;
+ TQMap < recordid_t, TQString>::iterator it;
for ( it = addresseeMap.begin(); it != addresseeMap.end(); ++it ) {
- QString kabcUid = it.data();
+ TQString kabcUid = it.data();
if (kabcUid == pcAddr.uid()) {
addresseeMap.remove(it);
break;
@@ -1317,8 +1317,8 @@ bool AbbrowserConduit::_equal(const PilotAddress *piAddress, const Addressee &ab
{
// Check that the name of the category of the HH record
// is one matching the PC record.
- QString addressCategoryLabel = fAddressAppInfo->categoryName(piAddress->category());
- QString cat = KABCSync::bestMatchedCategoryName(abEntry.categories(),
+ TQString addressCategoryLabel = fAddressAppInfo->categoryName(piAddress->category());
+ TQString cat = KABCSync::bestMatchedCategoryName(abEntry.categories(),
*fAddressAppInfo, piAddress->category());
if(!_equal(cat, addressCategoryLabel))
{
@@ -1330,22 +1330,22 @@ bool AbbrowserConduit::_equal(const PilotAddress *piAddress, const Addressee &ab
if (flags & eqFlagsPhones)
{
// first, look for missing e-mail addresses on either side
- QStringList abEmails(abEntry.emails());
- QStringList piEmails(piAddress->getEmails());
+ TQStringList abEmails(abEntry.emails());
+ TQStringList piEmails(piAddress->getEmails());
if (abEmails.count() != piEmails.count())
{
DEBUGKPILOT << fname << ": email count not equal" << endl;
return false;
}
- for (QStringList::Iterator it = abEmails.begin(); it != abEmails.end(); it++) {
+ for (TQStringList::Iterator it = abEmails.begin(); it != abEmails.end(); it++) {
if (!piEmails.contains(*it))
{
DEBUGKPILOT << fname << ": pilot e-mail missing" << endl;
return false;
}
}
- for (QStringList::Iterator it = piEmails.begin(); it != piEmails.end(); it++) {
+ for (TQStringList::Iterator it = piEmails.begin(); it != piEmails.end(); it++) {
if (!abEmails.contains(*it))
{
DEBUGKPILOT << fname << ": kabc e-mail missing" << endl;
@@ -1483,8 +1483,8 @@ bool AbbrowserConduit::_equal(const PilotAddress *piAddress, const Addressee &ab
@pc, @backup, @palm ... entries of the according databases
@returns string of the merged entries.
*/
-QString AbbrowserConduit::_smartMergeString(const QString &pc, const QString & backup,
- const QString & palm, ConflictResolution confRes)
+TQString AbbrowserConduit::_smartMergeString(const TQString &pc, const TQString & backup,
+ const TQString & palm, ConflictResolution confRes)
{
FUNCTIONSETUP;
@@ -1493,7 +1493,7 @@ QString AbbrowserConduit::_smartMergeString(const QString &pc, const QString & b
// If this is a first sync, we don't have a backup record, so
if(isFirstSync() || backup.isEmpty()) {
- if (pc.isEmpty() && palm.isEmpty() ) return QString::null;
+ if (pc.isEmpty() && palm.isEmpty() ) return TQString::null;
if(pc.isEmpty()) return palm;
if(palm.isEmpty()) return pc;
} else {
@@ -1512,7 +1512,7 @@ QString AbbrowserConduit::_smartMergeString(const QString &pc, const QString & b
case SyncAction::ePreviousSyncOverrides: return backup; break;
default: break;
}
- return QString::null;
+ return TQString::null;
}
@@ -1535,9 +1535,9 @@ bool AbbrowserConduit::_buildResolutionTable(ResolutionTable*tab, const Addresse
#define appendGen(desc, abfield, palmfield) \
tab->append(new ResolutionItem(desc, tab->fExistItems, \
- (!pcAddr.isEmpty())?(abfield):(QString::null), \
- (palmAddr)?(palmAddr->palmfield):(QString::null), \
- (backupAddr)?(backupAddr->palmfield):(QString::null) ))
+ (!pcAddr.isEmpty())?(abfield):(TQString::null), \
+ (palmAddr)?(palmAddr->palmfield):(TQString::null), \
+ (backupAddr)?(backupAddr->palmfield):(TQString::null) ))
#define appendAddr(desc, abfield, palmfield) \
appendGen(desc, abfield, getField(palmfield))
#define appendGenPhone(desc, abfield, palmfield) \
@@ -1572,12 +1572,12 @@ bool AbbrowserConduit::_buildResolutionTable(ResolutionTable*tab, const Addresse
appendAddr(i18n("Postal code"), abAddress.postalCode(), entryZip);
appendAddr(i18n("Country"), abAddress.country(), entryCountry);
- QString palmAddrCategoryLabel;
+ TQString palmAddrCategoryLabel;
if (palmAddr)
{
palmAddrCategoryLabel = fAddressAppInfo->categoryName(palmAddr->category());
}
- QString backupAddrCategoryLabel;
+ TQString backupAddrCategoryLabel;
if (backupAddr)
{
backupAddrCategoryLabel = fAddressAppInfo->categoryName(backupAddr->category());
@@ -1588,7 +1588,7 @@ bool AbbrowserConduit::_buildResolutionTable(ResolutionTable*tab, const Addresse
tab->fExistItems,
!pcAddr.isEmpty() ?
KABCSync::bestMatchedCategoryName(pcAddr.categories(), *fAddressAppInfo, category) :
- QString::null,
+ TQString::null,
palmAddrCategoryLabel,
backupAddrCategoryLabel));
#undef appendGen
@@ -1601,7 +1601,7 @@ bool AbbrowserConduit::_buildResolutionTable(ResolutionTable*tab, const Addresse
/// This function just sets the phone number of type "type" to "phone"
-static inline void setPhoneNumber(Addressee &abEntry, int type, const QString &nr)
+static inline void setPhoneNumber(Addressee &abEntry, int type, const TQString &nr)
{
PhoneNumber phone = abEntry.phoneNumber(type);
phone.setNumber(nr);
@@ -1746,7 +1746,7 @@ bool AbbrowserConduit::_smartMergeAddressee(Addressee &pcAddr,
if (!mergeOk)
{
- QString dlgText;
+ TQString dlgText;
if (!palmAddr)
{
dlgText=i18n("The following address entry was changed, but does no longer exist on the handheld. Please resolve this conflict:");
@@ -1839,7 +1839,7 @@ Addressee AbbrowserConduit::_findMatch(const PilotAddress & pilotAddress) const
// first, use the pilotID to UID map to find the appropriate record
if( !isFirstSync() && (pilotAddress.id() > 0) )
{
- QString id(addresseeMap[pilotAddress.id()]);
+ TQString id(addresseeMap[pilotAddress.id()]);
DEBUGKPILOT << fname << ": PilotRecord has id " << pilotAddress.id() << ", mapped to " << id << endl;
if(!id.isEmpty())
{
@@ -1852,7 +1852,7 @@ Addressee AbbrowserConduit::_findMatch(const PilotAddress & pilotAddress) const
for(AddressBook::Iterator iter = aBook->begin(); iter != aBook->end(); ++iter)
{
Addressee abEntry = *iter;
- QString recID(abEntry.custom(KABCSync::appString, KABCSync::idString));
+ TQString recID(abEntry.custom(KABCSync::appString, KABCSync::idString));
bool ok;
if (!recID.isEmpty() )
{
@@ -1893,5 +1893,5 @@ void AbbrowserConduit::slotTestRecord()
// Schedule more work.
++pilotindex;
- QTimer::singleShot(0, this, SLOT(slotTestRecord()));
+ TQTimer::singleShot(0, this, TQT_SLOT(slotTestRecord()));
}
diff --git a/kpilot/conduits/abbrowserconduit/abbrowser-conduit.h b/kpilot/conduits/abbrowserconduit/abbrowser-conduit.h
index 484f61292..22e94469a 100644
--- a/kpilot/conduits/abbrowserconduit/abbrowser-conduit.h
+++ b/kpilot/conduits/abbrowserconduit/abbrowser-conduit.h
@@ -49,14 +49,14 @@ class Ticket;
using namespace KABC;
-typedef QValueList<recordid_t> RecordIDList;
+typedef TQValueList<recordid_t> RecordIDList;
class AbbrowserConduit : public ConduitAction
{
Q_OBJECT
public:
AbbrowserConduit(KPilotLink *o,const char *n = 0L,
- const QStringList &a = QStringList() );
+ const TQStringList &a = TQStringList() );
virtual ~AbbrowserConduit();
/*********************************************************************
@@ -97,7 +97,7 @@ private:
/* Given a list of contacts, creates the pilot id to contact key map
* and a list of new contacts in O(n) time (single pass) */
- void _mapContactsToPilot( QMap < recordid_t, QString> &idContactMap);
+ void _mapContactsToPilot( TQMap < recordid_t, TQString> &idContactMap);
/* Do the preperations before doSync or doBackup.
* Load contacts, set the pilot */
bool _prepare();
@@ -141,7 +141,7 @@ private:
/*********************************************************************
C O P Y R E C O R D S
*********************************************************************/
- inline bool _equal(const QString & str1, const QString & str2) const
+ inline bool _equal(const TQString & str1, const TQString & str2) const
{
return (str1.isEmpty() && str2.isEmpty()) || (str1 == str2);
} ;
@@ -168,8 +168,8 @@ private:
* @pc, @backup, @palm ... entries of the according databases
* @returns string of the merged entries.
*/
- QString _smartMergeString(const QString &pc, const QString & backup,
- const QString & palm, ConflictResolution confRes);
+ TQString _smartMergeString(const TQString &pc, const TQString & backup,
+ const TQString & palm, ConflictResolution confRes);
bool _buildResolutionTable(ResolutionTable*tab, const Addressee &pcAddr,
PilotAddress *backupAddr, PilotAddress *palmAddr);
bool _applyResolutionTable(ResolutionTable*tab, Addressee &pcAddr,
@@ -200,9 +200,9 @@ private:
int pilotindex;
bool abChanged;
/** addresseeMap maps record ids to IDs of Addressees. This is used to speed up searching the local addressbook */
- QMap < recordid_t, QString> addresseeMap;
+ TQMap < recordid_t, TQString> addresseeMap;
RecordIDList syncedIds, allIds;
- QString fABookFile;
+ TQString fABookFile;
AddressBook::Iterator abiter;
/** For a local file resource, we need to obtain a saveTicket
* when opening the abook, just in case we want to modify it
diff --git a/kpilot/conduits/abbrowserconduit/abbrowser-setup.cc b/kpilot/conduits/abbrowserconduit/abbrowser-setup.cc
index 4a2aa4215..f4d80d2ce 100644
--- a/kpilot/conduits/abbrowserconduit/abbrowser-setup.cc
+++ b/kpilot/conduits/abbrowserconduit/abbrowser-setup.cc
@@ -29,9 +29,9 @@
#include "options.h"
-#include <qcheckbox.h>
-#include <qcombobox.h>
-#include <qbuttongroup.h>
+#include <tqcheckbox.h>
+#include <tqcombobox.h>
+#include <tqbuttongroup.h>
#include <kurlrequester.h>
#include <kaboutdata.h>
@@ -62,7 +62,7 @@ static KAboutData *createAbout()
return fAbout;
}
-AbbrowserWidgetSetup::AbbrowserWidgetSetup(QWidget *w, const char *n) :
+AbbrowserWidgetSetup::AbbrowserWidgetSetup(TQWidget *w, const char *n) :
ConduitConfigBase(w,n),
fConfigWidget(new AbbrowserWidget(w))
{
@@ -73,20 +73,20 @@ AbbrowserWidgetSetup::AbbrowserWidgetSetup(QWidget *w, const char *n) :
ConduitConfigBase::addAboutPage(fConfigWidget->tabWidget,fAbout);
fWidget=fConfigWidget;
fConfigWidget->fAbookFile->setMode(KFile::File);
-#define CM(a,b) connect(fConfigWidget->a,b,this,SLOT(modified()));
- CM(fSyncDestination,SIGNAL(clicked(int)));
- CM(fAbookFile,SIGNAL(textChanged(const QString &)));
- CM(fArchive,SIGNAL(toggled(bool)));
- CM(fConflictResolution,SIGNAL(activated(int)));
- CM(fOtherPhone,SIGNAL(activated(int)));
- CM(fAddress,SIGNAL(activated(int)));
- CM(fFax,SIGNAL(activated(int)));
- CM(fCustom0,SIGNAL(activated(int)));
- CM(fCustom1,SIGNAL(activated(int)));
- CM(fCustom2,SIGNAL(activated(int)));
- CM(fCustom3,SIGNAL(activated(int)));
- CM(fCustomDate, SIGNAL(activated(int)));
- CM(fCustomDate, SIGNAL(textChanged(const QString&)));
+#define CM(a,b) connect(fConfigWidget->a,b,this,TQT_SLOT(modified()));
+ CM(fSyncDestination,TQT_SIGNAL(clicked(int)));
+ CM(fAbookFile,TQT_SIGNAL(textChanged(const TQString &)));
+ CM(fArchive,TQT_SIGNAL(toggled(bool)));
+ CM(fConflictResolution,TQT_SIGNAL(activated(int)));
+ CM(fOtherPhone,TQT_SIGNAL(activated(int)));
+ CM(fAddress,TQT_SIGNAL(activated(int)));
+ CM(fFax,TQT_SIGNAL(activated(int)));
+ CM(fCustom0,TQT_SIGNAL(activated(int)));
+ CM(fCustom1,TQT_SIGNAL(activated(int)));
+ CM(fCustom2,TQT_SIGNAL(activated(int)));
+ CM(fCustom3,TQT_SIGNAL(activated(int)));
+ CM(fCustomDate, TQT_SIGNAL(activated(int)));
+ CM(fCustomDate, TQT_SIGNAL(textChanged(const TQString&)));
#undef CM
}
@@ -99,7 +99,7 @@ AbbrowserWidgetSetup::~AbbrowserWidgetSetup()
{
FUNCTIONSETUP;
- QButtonGroup*grp=fConfigWidget->fSyncDestination;
+ TQButtonGroup*grp=fConfigWidget->fSyncDestination;
AbbrowserSettings::setAddressbookType(grp->id(grp->selected()));
AbbrowserSettings::setFileName(fConfigWidget->fAbookFile->url());
AbbrowserSettings::setArchiveDeleted(fConfigWidget->fArchive->isChecked());
@@ -132,7 +132,7 @@ AbbrowserWidgetSetup::~AbbrowserWidgetSetup()
#endif
int fmtindex=fConfigWidget->fCustomDate->currentItem();
AbbrowserSettings::setCustomDateFormat(
- (fmtindex==0)?(QString::null):fConfigWidget->fCustomDate->currentText() );
+ (fmtindex==0)?(TQString::null):fConfigWidget->fCustomDate->currentText() );
AbbrowserSettings::self()->writeConfig();
unmodified();
@@ -175,7 +175,7 @@ AbbrowserWidgetSetup::~AbbrowserWidgetSetup()
fConfigWidget->fCustom1->setCurrentItem(AbbrowserSettings::custom1());
fConfigWidget->fCustom2->setCurrentItem(AbbrowserSettings::custom2());
fConfigWidget->fCustom3->setCurrentItem(AbbrowserSettings::custom3());
- QString datefmt=AbbrowserSettings::customDateFormat();
+ TQString datefmt=AbbrowserSettings::customDateFormat();
if (datefmt.isEmpty())
{
fConfigWidget->fCustomDate->setCurrentItem(0);
@@ -188,7 +188,7 @@ AbbrowserWidgetSetup::~AbbrowserWidgetSetup()
unmodified();
}
-/* static */ ConduitConfigBase *AbbrowserWidgetSetup::create(QWidget *w, const char *n)
+/* static */ ConduitConfigBase *AbbrowserWidgetSetup::create(TQWidget *w, const char *n)
{
return new AbbrowserWidgetSetup(w,n);
}
diff --git a/kpilot/conduits/abbrowserconduit/abbrowser-setup.h b/kpilot/conduits/abbrowserconduit/abbrowser-setup.h
index 71981dc09..47eff1cf1 100644
--- a/kpilot/conduits/abbrowserconduit/abbrowser-setup.h
+++ b/kpilot/conduits/abbrowserconduit/abbrowser-setup.h
@@ -38,11 +38,11 @@ class KAboutData;
class AbbrowserWidgetSetup : public ConduitConfigBase
{
public:
- AbbrowserWidgetSetup(QWidget *,const char *);
+ AbbrowserWidgetSetup(TQWidget *,const char *);
virtual ~AbbrowserWidgetSetup();
virtual void load();
virtual void commit();
- static ConduitConfigBase *create(QWidget *,const char *);
+ static ConduitConfigBase *create(TQWidget *,const char *);
private:
AbbrowserWidget *fConfigWidget;
KAboutData *fAbout;
diff --git a/kpilot/conduits/abbrowserconduit/kabcRecord.cc b/kpilot/conduits/abbrowserconduit/kabcRecord.cc
index b5d68121a..9b49a2cad 100644
--- a/kpilot/conduits/abbrowserconduit/kabcRecord.cc
+++ b/kpilot/conduits/abbrowserconduit/kabcRecord.cc
@@ -33,7 +33,7 @@
#include "options.h"
-#include <qregexp.h>
+#include <tqregexp.h>
#include <kglobal.h>
#include <kabc/addressee.h>
@@ -79,7 +79,7 @@ KABC::PhoneNumber::List KABCSync::getPhoneNumbers(const PilotAddress &a)
FUNCTIONSETUP;
KABC::PhoneNumber::List list;
- QString test;
+ TQString test;
PhoneSlot shownPhone = a.getShownPhone();
@@ -136,7 +136,7 @@ void KABCSync::setPhoneNumbers(const PilotAddressInfo &info,
const KABC::PhoneNumber::List &list)
{
FUNCTIONSETUP;
- QString test;
+ TQString test;
// clear all phone numbers (not e-mails) first
for ( PhoneSlot i = PhoneSlot::begin(); i.isValid() ; ++i )
@@ -144,7 +144,7 @@ void KABCSync::setPhoneNumbers(const PilotAddressInfo &info,
PilotAddressInfo::EPhoneType ind = a.getPhoneType( i );
if (ind != PilotAddressInfo::eEmail)
{
- a.setField(i, QString());
+ a.setField(i, TQString());
}
}
@@ -199,7 +199,7 @@ void KABCSync::setPhoneNumbers(const PilotAddressInfo &info,
// after setting the numbers, make sure that something sensible is set as the
// shownPhone on the Pilot if nothing is yet...
- QString pref = a.getField(a.getShownPhone());
+ TQString pref = a.getField(a.getShownPhone());
if (!a.getShownPhone().isValid() || pref.isEmpty())
{
DEBUGKPILOT << fname << ": Pilot's showPhone: ["
@@ -222,7 +222,7 @@ void KABCSync::setPhoneNumbers(const PilotAddressInfo &info,
}
}
-unsigned int KABCSync::bestMatchedCategory(const QStringList &pccategories,
+unsigned int KABCSync::bestMatchedCategory(const TQStringList &pccategories,
const PilotAddressInfo &info,
unsigned int hhcategory)
{
@@ -243,7 +243,7 @@ unsigned int KABCSync::bestMatchedCategory(const QStringList &pccategories,
// Look for the first category from the list which is available on
// the handheld as well.
- for(QStringList::ConstIterator it = pccategories.begin(); it != pccategories.end(); ++it)
+ for(TQStringList::ConstIterator it = pccategories.begin(); it != pccategories.end(); ++it)
{
// Do not map unknown to unfiled when looking for category
int c = info.findCategory( *it, false );
@@ -258,7 +258,7 @@ unsigned int KABCSync::bestMatchedCategory(const QStringList &pccategories,
return Pilot::Unfiled;
}
-void KABCSync::setCategory(KABC::Addressee & abEntry, const QString &cat)
+void KABCSync::setCategory(KABC::Addressee & abEntry, const TQString &cat)
{
if ( (!cat.isEmpty()))
{
@@ -267,24 +267,24 @@ void KABCSync::setCategory(KABC::Addressee & abEntry, const QString &cat)
}
-QString KABCSync::getFieldForHHCustom(
+TQString KABCSync::getFieldForHHCustom(
const unsigned int index,
const KABC::Addressee &abEntry,
const KABCSync::Settings &settings)
{
FUNCTIONSETUPL(4);
- QString retval;
+ TQString retval;
if (index>3)
{
WARNINGKPILOT << "Bad index number " << index << endl;
- retval = QString();
+ retval = TQString();
}
if (settings.customMapping().count() != 4)
{
WARNINGKPILOT << "Mapping does not have 4 elements." << index << endl;
- retval = QString();
+ retval = TQString();
}
switch (settings.custom(index))
@@ -296,9 +296,9 @@ QString KABCSync::getFieldForHHCustom(
}
else
{
- QString tmpfmt(KGlobal::locale()->dateFormat());
+ TQString tmpfmt(KGlobal::locale()->dateFormat());
KGlobal::locale()->setDateFormat(settings.dateFormat());
- QString ret(KGlobal::locale()->formatDate(abEntry.birthday().date()));
+ TQString ret(KGlobal::locale()->formatDate(abEntry.birthday().date()));
KGlobal::locale()->setDateFormat(tmpfmt);
retval = ret;
}
@@ -311,7 +311,7 @@ QString KABCSync::getFieldForHHCustom(
break;
case eCustomField:
default:
- retval = abEntry.custom(appString, CSL1("CUSTOM")+QString::number(index));
+ retval = abEntry.custom(appString, CSL1("CUSTOM")+TQString::number(index));
break;
}
@@ -321,7 +321,7 @@ QString KABCSync::getFieldForHHCustom(
void KABCSync::setFieldFromHHCustom(
const unsigned int index,
KABC::Addressee &abEntry,
- const QString &value,
+ const TQString &value,
const KABCSync::Settings &settings)
{
FUNCTIONSETUPL(4);
@@ -341,7 +341,7 @@ void KABCSync::setFieldFromHHCustom(
{
case eCustomBirthdate:
{
- QDate bdate;
+ TQDate bdate;
bool ok=false;
if (settings.dateFormat().isEmpty())
{
@@ -356,8 +356,8 @@ void KABCSync::setFieldFromHHCustom(
if (!ok)
{
- QString format = KGlobal::locale()->dateFormatShort();
- QRegExp re(CSL1("%[yY][^%]*"));
+ TQString format = KGlobal::locale()->dateFormatShort();
+ TQRegExp re(CSL1("%[yY][^%]*"));
format.remove(re); // Remove references to year and following punctuation
bdate = KGlobal::locale()->readDate(value, format, &ok);
}
@@ -382,7 +382,7 @@ void KABCSync::setFieldFromHHCustom(
break;
case eCustomField:
default:
- abEntry.insertCustom(appString, CSL1("CUSTOM")+QString::number(index), value);
+ abEntry.insertCustom(appString, CSL1("CUSTOM")+TQString::number(index), value);
break;
}
}
@@ -416,7 +416,7 @@ KABC::Address KABCSync::getAddress(const KABC::Addressee &abEntry, const KABCSyn
}
-QString KABCSync::getFieldForHHOtherPhone(const KABC::Addressee & abEntry, const KABCSync::Settings &s)
+TQString KABCSync::getFieldForHHOtherPhone(const KABC::Addressee & abEntry, const KABCSync::Settings &s)
{
switch(s.fieldForOtherPhone())
{
@@ -437,11 +437,11 @@ QString KABCSync::getFieldForHHOtherPhone(const KABC::Addressee & abEntry, const
case eTTYTTDPhone:
return abEntry.phoneNumber(KABC::PhoneNumber::Pcs).number();
default:
- return QString::null;
+ return TQString::null;
}
}
-void KABCSync::setFieldFromHHOtherPhone(KABC::Addressee & abEntry, const QString &nr, const KABCSync::Settings &s)
+void KABCSync::setFieldFromHHOtherPhone(KABC::Addressee & abEntry, const TQString &nr, const KABCSync::Settings &s)
{
int phoneType = 0;
switch (s.fieldForOtherPhone())
@@ -496,13 +496,13 @@ void KABCSync::setAddress(PilotAddress &toPilotAddr,
bool KABCSync::isArchived(const KABC::Addressee &addr)
{
- return addr.custom(KABCSync::appString, KABCSync::flagString) == QString::number(SYNCDEL);
+ return addr.custom(KABCSync::appString, KABCSync::flagString) == TQString::number(SYNCDEL);
}
void KABCSync::makeArchived(KABC::Addressee &addr)
{
FUNCTIONSETUP;
- addr.insertCustom(KABCSync::appString, KABCSync::flagString, QString::number(SYNCDEL));
+ addr.insertCustom(KABCSync::appString, KABCSync::flagString, TQString::number(SYNCDEL));
addr.removeCustom(KABCSync::appString, KABCSync::idString);
}
@@ -536,7 +536,7 @@ void KABCSync::copy(PilotAddress &toPilotAddr,
// Other field is an oddball and if the user has more than one field set
// as "Other" then only one will be carried over.
- QString oth = KABCSync::getFieldForHHOtherPhone(fromAbEntry,syncSettings);
+ TQString oth = KABCSync::getFieldForHHOtherPhone(fromAbEntry,syncSettings);
DEBUGKPILOT << fname << ": putting: ["<<oth<<"] into Palm's other"<<endl;
toPilotAddr.setPhoneField(PilotAddressInfo::eOther,
oth, PilotAddress::Replace);
@@ -650,7 +650,7 @@ void KABCSync::copy(KABC::Addressee &toAbEntry,
// pilot id may be zero(since it could be new) but couldn't hurt
// to even assign it to zero; let's us know what state the
// toAbEntry is in
- toAbEntry.insertCustom(KABCSync::appString, KABCSync::idString, QString::number(fromPiAddr.id()));
+ toAbEntry.insertCustom(KABCSync::appString, KABCSync::idString, TQString::number(fromPiAddr.id()));
KABCSync::setCategory(toAbEntry, appInfo.categoryName(fromPiAddr.category()));
diff --git a/kpilot/conduits/abbrowserconduit/kabcRecord.h b/kpilot/conduits/abbrowserconduit/kabcRecord.h
index 13a3e2694..f27f0b1a2 100644
--- a/kpilot/conduits/abbrowserconduit/kabcRecord.h
+++ b/kpilot/conduits/abbrowserconduit/kabcRecord.h
@@ -33,7 +33,7 @@
** Bug reports and questions can be sent to kde-pim@kde.org.
*/
-#include <qvaluevector.h>
+#include <tqvaluevector.h>
#include <kabc/phonenumber.h>
@@ -71,20 +71,20 @@ namespace KABCSync
{
public:
Settings();
- QString dateFormat() const
+ TQString dateFormat() const
{
return fDateFormat;
}
- void setDateFormat(const QString& s)
+ void setDateFormat(const TQString& s)
{
fDateFormat = s;
}
- const QValueVector<int> &customMapping() const
+ const TQValueVector<int> &customMapping() const
{
return fCustomMapping;
}
- void setCustomMapping(const QValueVector<int> &v)
+ void setCustomMapping(const TQValueVector<int> &v)
{
if (v.count()==4)
{
@@ -130,8 +130,8 @@ namespace KABCSync
fFaxTypeOnPC = v;
}
private:
- QString fDateFormat;
- QValueVector<int> fCustomMapping;
+ TQString fDateFormat;
+ TQValueVector<int> fCustomMapping;
int fOtherPhone;
bool fPreferHome;
int fFaxTypeOnPC;
@@ -165,12 +165,12 @@ namespace KABCSync
* @return Category index that best matches.
* @return Pilot::Unfiled if no best match.
*/
- unsigned int bestMatchedCategory(const QStringList &categorynames,
+ unsigned int bestMatchedCategory(const TQStringList &categorynames,
const PilotAddressInfo &info,
unsigned int category);
/** As above, but return the name of the category. */
- inline QString bestMatchedCategoryName(const QStringList &categorynames,
+ inline TQString bestMatchedCategoryName(const TQStringList &categorynames,
const PilotAddressInfo &info,
unsigned int category)
{
@@ -181,14 +181,14 @@ namespace KABCSync
/** Give the addressee @p abEntry the category @p cat (leaving
* existing category assignments intact).
*/
- void setCategory(KABC::Addressee &abEntry, const QString &cat);
+ void setCategory(KABC::Addressee &abEntry, const TQString &cat);
/* These are string identifiers used for custom properties in the addressees,
* used to store KPilot-specific settings.
*/
- const QString appString=CSL1("KPILOT"); ///< Identifier for the application
- const QString flagString=CSL1("Flag"); ///< Flags: synced or not
- const QString idString=CSL1("RecordID"); ///< Record ID on HH for this addressee
+ const TQString appString=CSL1("KPILOT"); ///< Identifier for the application
+ const TQString flagString=CSL1("Flag"); ///< Flags: synced or not
+ const TQString idString=CSL1("RecordID"); ///< Record ID on HH for this addressee
/** Get the string value for HH custom field @p index (0..3) from the addressee
@@ -199,9 +199,9 @@ namespace KABCSync
* string @p dateFormat. If this is empty, use the locale setting.
*
* @return String value for HH custom field @p index
- * @return Null QString on error (is also a valid return value)
+ * @return Null TQString on error (is also a valid return value)
*/
- QString getFieldForHHCustom(
+ TQString getFieldForHHCustom(
unsigned int index,
const KABC::Addressee &abEntry,
const Settings &settings);
@@ -215,7 +215,7 @@ namespace KABCSync
void setFieldFromHHCustom(
const unsigned int index,
KABC::Addressee &abEntry,
- const QString &value,
+ const TQString &value,
const Settings &settings);
/** The HH has a phone type "other" which may be mapped to any one of
@@ -223,7 +223,7 @@ namespace KABCSync
*
* @note @p mappingForOther should come from AbbrowserSettings::pilotOther()
*/
- QString getFieldForHHOtherPhone(const KABC::Addressee &abEntry, const Settings &s);
+ TQString getFieldForHHOtherPhone(const KABC::Addressee &abEntry, const Settings &s);
/** The HH has a phone type "other" which may be mapped to any one
* of several PC side phone numbers. Store the number @p nr in the
@@ -231,7 +231,7 @@ namespace KABCSync
*
* @note @p mappingForOther should come from AbbrowserSettings::pilotOther()
*/
- void setFieldFromHHOtherPhone(KABC::Addressee &abEntry, const QString &nr, const Settings &s);
+ void setFieldFromHHOtherPhone(KABC::Addressee &abEntry, const TQString &nr, const Settings &s);
/** Returns the address portion of an addressee. Since the HH can only store
* one address, we return the preferred address (if the Addressee @p abEntry
diff --git a/kpilot/conduits/abbrowserconduit/resolutionDialog.cc b/kpilot/conduits/abbrowserconduit/resolutionDialog.cc
index 2749074f8..aa8e2f148 100644
--- a/kpilot/conduits/abbrowserconduit/resolutionDialog.cc
+++ b/kpilot/conduits/abbrowserconduit/resolutionDialog.cc
@@ -28,11 +28,11 @@
#include "options.h"
-#include <qtimer.h>
-#include <qlabel.h>
-#include <qpushbutton.h>
-#include <qlistview.h>
-#include <qregexp.h>
+#include <tqtimer.h>
+#include <tqlabel.h>
+#include <tqpushbutton.h>
+#include <tqlistview.h>
+#include <tqregexp.h>
#include "resolutionTable.h"
#include "resolutionDialog_base.h"
@@ -46,16 +46,16 @@
* activated (stateChange), it sets the text of its parent (which is the
* controller, which is an instance of ResolutionCheckListItem, too).
**/
-class ResolutionCheckListItem : QCheckListItem {
+class ResolutionCheckListItem : TQCheckListItem {
public:
ResolutionCheckListItem(ResolutionItem*it, ResolutionTable*tb,
- QListView*parent);
- ResolutionCheckListItem(QString header, QString text,
+ TQListView*parent);
+ ResolutionCheckListItem(TQString header, TQString text,
ResolutionCheckListItem*parent);
~ResolutionCheckListItem() {};
virtual void stateChange(bool newstate);
- virtual void setValue(QString text);
- virtual void setCaption(QString caption);
+ virtual void setValue(TQString text);
+ virtual void setCaption(TQString caption);
protected:
void updateText();
@@ -65,20 +65,20 @@ protected:
/* The description of the entry, e.g. Backup, PC, Palm for the radio buttons,
* of the field name for the controllers
*/
- QString fCaption;
+ TQString fCaption;
/* The currrent value of the entry (for controllers this changes with the
* selected button */
- QString fText;
+ TQString fText;
};
ResolutionCheckListItem::ResolutionCheckListItem(ResolutionItem*it,
- ResolutionTable*tb, QListView*parent) :
- QCheckListItem(parent, QString::null, QCheckListItem::Controller),
+ ResolutionTable*tb, TQListView*parent) :
+ TQCheckListItem(parent, TQString::null, TQCheckListItem::Controller),
fResItem(it),
isController(true),
- fCaption(it?(it->fName):(QString::null)),
- fText(it?(it->fResolved):(QString::null))
+ fCaption(it?(it->fName):(TQString::null)),
+ fText(it?(it->fResolved):(TQString::null))
{
FUNCTIONSETUP;
if (it && tb)
@@ -86,7 +86,7 @@ ResolutionCheckListItem::ResolutionCheckListItem(ResolutionItem*it,
// If all three texts are identical, there is no need for
// resolution so don't show the radio items below
bool itemsEqual=true;
- QString testtext(QString::null);
+ TQString testtext(TQString::null);
const enum eExistItems its[3]={eExistsPC, eExistsPalm, eExistsBackup};
// get a valid text from a valid field, which will serve as the
// test text for the comparison
@@ -118,9 +118,9 @@ ResolutionCheckListItem::ResolutionCheckListItem(ResolutionItem*it,
setOpen(true);
}
-ResolutionCheckListItem::ResolutionCheckListItem(QString text, QString header,
+ResolutionCheckListItem::ResolutionCheckListItem(TQString text, TQString header,
ResolutionCheckListItem*parent) :
- QCheckListItem(parent, QString(), QCheckListItem::RadioButton),
+ TQCheckListItem(parent, TQString(), TQCheckListItem::RadioButton),
fResItem(0L),
isController(false),
fCaption(header),
@@ -140,7 +140,7 @@ void ResolutionCheckListItem::stateChange(bool newstate)
}
}
-void ResolutionCheckListItem::setValue(QString text)
+void ResolutionCheckListItem::setValue(TQString text)
{
FUNCTIONSETUP;
fText=text;
@@ -151,7 +151,7 @@ void ResolutionCheckListItem::setValue(QString text)
updateText();
}
-void ResolutionCheckListItem::setCaption(QString caption)
+void ResolutionCheckListItem::setCaption(TQString caption)
{
fCaption=caption;
updateText();
@@ -159,8 +159,8 @@ void ResolutionCheckListItem::setCaption(QString caption)
void ResolutionCheckListItem::updateText()
{
- QString newText(i18n("Entries in the resolution dialog. First the name of the field, then the entry from the Handheld or PC after the colon", "%1: %2").arg(fCaption).arg(fText));
- newText.replace(QRegExp(CSL1("\n")),
+ TQString newText(i18n("Entries in the resolution dialog. First the name of the field, then the entry from the Handheld or PC after the colon", "%1: %2").arg(fCaption).arg(fText));
+ newText.replace(TQRegExp(CSL1("\n")),
i18n("Denoting newlines in Address entries. No need to translate", " | "));
setText(0, newText);
}
@@ -171,8 +171,8 @@ void ResolutionCheckListItem::updateText()
*
*****************************************************************/
-ResolutionDlg::ResolutionDlg( QWidget* parent, KPilotLink*fH,
- const QString &caption, const QString &helpText, ResolutionTable*tab) :
+ResolutionDlg::ResolutionDlg( TQWidget* parent, KPilotLink*fH,
+ const TQString &caption, const TQString &helpText, ResolutionTable*tab) :
KDialogBase( parent, "ResolutionDlg", false, caption, Apply|Cancel, Apply),
tickleTimer(0L),
fHandle(fH),
@@ -189,20 +189,20 @@ ResolutionDlg::ResolutionDlg( QWidget* parent, KPilotLink*fH,
adjustSize();
resize(size());
- if (fHandle) tickleTimer=new QTimer(this, "TickleTimer");
+ if (fHandle) tickleTimer=new TQTimer(this, "TickleTimer");
if (tickleTimer)
{
- connect( tickleTimer, SIGNAL(timeout()), this, SLOT(_tickle()));
+ connect( tickleTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(_tickle()));
// tickle the palm every 10 seconds to prevent a timeout until the
// sync is really finished.
tickleTimer->start( 10000 );
}
- connect(fWidget->fKeepBoth, SIGNAL(clicked()), SLOT(slotKeepBoth()));
- connect(fWidget->fBackupValues, SIGNAL(clicked()), SLOT(slotUseBackup()));
- connect(fWidget->fPalmValues, SIGNAL(clicked()), SLOT(slotUsePalm()));
- connect(fWidget->fPCValues, SIGNAL(clicked()), SLOT(slotUsePC()));
+ connect(fWidget->fKeepBoth, TQT_SIGNAL(clicked()), TQT_SLOT(slotKeepBoth()));
+ connect(fWidget->fBackupValues, TQT_SIGNAL(clicked()), TQT_SLOT(slotUseBackup()));
+ connect(fWidget->fPalmValues, TQT_SIGNAL(clicked()), TQT_SLOT(slotUsePalm()));
+ connect(fWidget->fPCValues, TQT_SIGNAL(clicked()), TQT_SLOT(slotUsePC()));
}
void ResolutionDlg::adjustButtons(ResolutionTable*tab)
diff --git a/kpilot/conduits/abbrowserconduit/resolutionDialog.h b/kpilot/conduits/abbrowserconduit/resolutionDialog.h
index 5f41ba0f2..d0b8fd527 100644
--- a/kpilot/conduits/abbrowserconduit/resolutionDialog.h
+++ b/kpilot/conduits/abbrowserconduit/resolutionDialog.h
@@ -42,10 +42,10 @@ class ResolutionDlg : public KDialogBase
Q_OBJECT
public:
- ResolutionDlg( QWidget* parent=0,
+ ResolutionDlg( TQWidget* parent=0,
KPilotLink*fH=0L,
- const QString &caption=QString(),
- const QString &helpText=QString(),
+ const TQString &caption=TQString(),
+ const TQString &helpText=TQString(),
ResolutionTable *tab=0L );
~ResolutionDlg();
@@ -60,7 +60,7 @@ protected:
void fillListView();
void adjustButtons(ResolutionTable*tab);
- QTimer* tickleTimer;
+ TQTimer* tickleTimer;
KPilotLink* fHandle;
ResolutionTable*fTable;
diff --git a/kpilot/conduits/abbrowserconduit/resolutionTable.h b/kpilot/conduits/abbrowserconduit/resolutionTable.h
index 760f962e2..51c25190e 100644
--- a/kpilot/conduits/abbrowserconduit/resolutionTable.h
+++ b/kpilot/conduits/abbrowserconduit/resolutionTable.h
@@ -29,7 +29,7 @@
*/
-#include <qvaluelist.h>
+#include <tqvaluelist.h>
#include "syncAction.h"
typedef enum eExistItems {
@@ -41,12 +41,12 @@ class ResolutionItem
{
public:
enum eExistItems fExistItems;
- QString fEntries[3];
- QString fResolved;
- QString fName;
+ TQString fEntries[3];
+ TQString fResolved;
+ TQString fName;
public:
ResolutionItem() {}
- ResolutionItem(QString name, int ex, QString pc, QString palm, QString backup):fExistItems((eExistItems)ex),fName(name)
+ ResolutionItem(TQString name, int ex, TQString pc, TQString palm, TQString backup):fExistItems((eExistItems)ex),fName(name)
{fEntries[0]=pc;fEntries[1]=palm; fEntries[2]=backup; /*fExistItems=(eExistItems)ex;*/ }
~ResolutionItem() {}
};
@@ -54,15 +54,15 @@ public:
/**
@author Reinhold Kainhofer
*/
-class ResolutionTable : public QPtrList<ResolutionItem>
+class ResolutionTable : public TQPtrList<ResolutionItem>
{
public:
- ResolutionTable():QPtrList<ResolutionItem>() {fResolution=SyncAction::eAskUser;};
+ ResolutionTable():TQPtrList<ResolutionItem>() {fResolution=SyncAction::eAskUser;};
~ResolutionTable() {};
SyncAction::ConflictResolution fResolution;
- QString labels[3];
+ TQString labels[3];
enum eExistItems fExistItems;
};
diff --git a/kpilot/conduits/docconduit/DOC-converter.cc b/kpilot/conduits/docconduit/DOC-converter.cc
index c8d7ac02d..6502fe54e 100644
--- a/kpilot/conduits/docconduit/DOC-converter.cc
+++ b/kpilot/conduits/docconduit/DOC-converter.cc
@@ -30,10 +30,10 @@
#include "options.h"
#include "DOC-converter.moc"
-#include <qdir.h>
-#include <qfileinfo.h>
-#include <qregexp.h>
-#include <qsortedlist.h>
+#include <tqdir.h>
+#include <tqfileinfo.h>
+#include <tqregexp.h>
+#include <tqsortedlist.h>
#include <pilotDatabase.h>
#include <pilotLocalDatabase.h>
@@ -50,7 +50,7 @@
/****************************************************************************************************
- * various bookmark classes. Most important is the bmkList findMatches(QString) function,
+ * various bookmark classes. Most important is the bmkList findMatches(TQString) function,
* which needs to return a list of all bookmarks found for the given bookmark expression.
* A bookmark usually consists of a bookmark text and an offset into the text document.
****************************************************************************************************/
@@ -70,7 +70,7 @@ bool operator== ( const docBookmark &s1, const docBookmark &s2)
}
-int docMatchBookmark::findMatches(QString doctext, bmkList &fBookmarks) {
+int docMatchBookmark::findMatches(TQString doctext, bmkList &fBookmarks) {
FUNCTIONSETUP;
// bmkList res;
int pos = 0, nr=0, found=0;
@@ -99,11 +99,11 @@ int docMatchBookmark::findMatches(QString doctext, bmkList &fBookmarks) {
-int docRegExpBookmark::findMatches(QString doctext, bmkList &fBookmarks)
+int docRegExpBookmark::findMatches(TQString doctext, bmkList &fBookmarks)
{
FUNCTIONSETUP;
// bmkList res;
- QRegExp rx(pattern);
+ TQRegExp rx(pattern);
int pos = 0, nr=0, found=0;
while (pos>=0 && found<=to) {
@@ -118,7 +118,7 @@ int docRegExpBookmark::findMatches(QString doctext, bmkList &fBookmarks)
fBookmarks.append(new docBookmark(/*bmkName.left(16)*/rx.cap(capSubexpression), pos));
} else {
// TODO: use the subexpressions from the regexp for the bmk name ($1..$9) (given as separate regexp)
- QString bmkText(bmkName);
+ TQString bmkText(bmkName);
for (int i=0; i<=rx.numCaptures(); ++i) {
bmkText.replace(CSL1("$%1").arg(i), rx.cap(i));
bmkText.replace(CSL1("\\%1").arg(i), rx.cap(i));
@@ -145,7 +145,7 @@ int docRegExpBookmark::findMatches(QString doctext, bmkList &fBookmarks)
*********************************************************************/
-DOCConverter::DOCConverter(QObject *parent, const char *name):QObject(parent,name) {
+DOCConverter::DOCConverter(TQObject *parent, const char *name):TQObject(parent,name) {
FUNCTIONSETUP;
docdb=0L;
eSortBookmarks=eSortNone;
@@ -168,16 +168,16 @@ DOCConverter::~DOCConverter() {
-void DOCConverter::setTXTpath(QString path, QString file) {
- QDir dr(path);
- QFileInfo pth(dr, file);
+void DOCConverter::setTXTpath(TQString path, TQString file) {
+ TQDir dr(path);
+ TQFileInfo pth(dr, file);
if (!file.isEmpty())
txtfilename = pth.absFilePath();
}
-void DOCConverter::setTXTpath(QString filename) {
+void DOCConverter::setTXTpath(TQString filename) {
if (!filename.isEmpty()) txtfilename = filename;
}
@@ -189,26 +189,26 @@ void DOCConverter::setPDB(PilotDatabase * dbi) {
-QString DOCConverter::readText() {
+TQString DOCConverter::readText() {
FUNCTIONSETUP;
- if (txtfilename.isEmpty()) return QString();
- QFile docfile(txtfilename);
+ if (txtfilename.isEmpty()) return TQString();
+ TQFile docfile(txtfilename);
if (!docfile.open(IO_ReadOnly))
{
emit logError(i18n("Unable to open text file %1 for reading.").arg(txtfilename));
- return QString();
+ return TQString();
}
- QTextStream docstream(&docfile);
+ TQTextStream docstream(&docfile);
- QString doc = docstream.read();
+ TQString doc = docstream.read();
docfile.close();
return doc;
}
-int DOCConverter::findBmkEndtags(QString &text, bmkList&fBmks) {
+int DOCConverter::findBmkEndtags(TQString &text, bmkList&fBmks) {
FUNCTIONSETUP;
// Start from the end of the text
int pos = text.length() - 1, nr=0;
@@ -256,11 +256,11 @@ int DOCConverter::findBmkEndtags(QString &text, bmkList&fBmks) {
return nr;
}
-int DOCConverter::findBmkInline(QString &text, bmkList &fBmks) {
+int DOCConverter::findBmkInline(TQString &text, bmkList &fBmks) {
FUNCTIONSETUP;
// bmkList res;
int nr=0;
- QRegExp rx(CSL1("<\\*(.*)\\*>"));
+ TQRegExp rx(CSL1("<\\*(.*)\\*>"));
rx.setMinimal(TRUE);
int pos = 0;
@@ -275,17 +275,17 @@ int DOCConverter::findBmkInline(QString &text, bmkList &fBmks) {
return nr;
}
-int DOCConverter::findBmkFile(QString &, bmkList &fBmks) {
+int DOCConverter::findBmkFile(TQString &, bmkList &fBmks) {
FUNCTIONSETUP;
int nr=0;
- QString bmkfilename = txtfilename;
+ TQString bmkfilename = txtfilename;
if (bmkfilename.endsWith(CSL1(".txt"))){
bmkfilename.remove(bmkfilename.length()-4, 4);
}
- QString oldbmkfilename=bmkfilename;
+ TQString oldbmkfilename=bmkfilename;
bmkfilename+=CSL1(BMK_SUFFIX);
- QFile bmkfile(bmkfilename);
+ TQFile bmkfile(bmkfilename);
if (!bmkfile.open(IO_ReadOnly)) {
bmkfilename=oldbmkfilename+CSL1(PDBBMK_SUFFIX);
bmkfile.setName(bmkfilename);
@@ -297,11 +297,11 @@ int DOCConverter::findBmkFile(QString &, bmkList &fBmks) {
DEBUGKPILOT<<"Bookmark file: "<<bmkfilename<<endl;
- QTextStream bmkstream(&bmkfile);
- QString line;
+ TQTextStream bmkstream(&bmkfile);
+ TQString line;
while ( !(line=bmkstream.readLine()).isEmpty() ) {
if (!line.isEmpty() && !line.startsWith(CSL1("#")) ) {
- QStringList bmkinfo=QStringList::split(CSL1(","), line);
+ TQStringList bmkinfo=TQStringList::split(CSL1(","), line);
int fieldnr=bmkinfo.count();
// We use the same syntax for the entries as MakeDocJ bookmark files:
// <bookmark>,<string-to-search>,<bookmark-name-string>,<starting-bookmark>,<ending-bookmark>
@@ -309,19 +309,19 @@ int DOCConverter::findBmkFile(QString &, bmkList &fBmks) {
if (fieldnr>0){
DEBUGKPILOT<<"Working on bookmark \""<<line<<"\""<<endl;
docMatchBookmark*bmk=0L;
- QString bookmark=bmkinfo[0];
+ TQString bookmark=bmkinfo[0];
bool ok;
int pos=bookmark.toInt(&ok);
if (ok) {
if (fieldnr>1) {
- QString name(bmkinfo[1]);
+ TQString name(bmkinfo[1]);
DEBUGKPILOT<<"Bookmark \""<<name<<"\" set at position "<<pos<<endl;
fBmks.append(new docBookmark(name, pos));
}
} else if (bookmark==CSL1("-") || bookmark==CSL1("+")) {
if (fieldnr>1) {
- QString patt(bmkinfo[1]);
- QString name(patt);
+ TQString patt(bmkinfo[1]);
+ TQString name(patt);
if (fieldnr>2) {
int cap=bmkinfo[2].toInt(&ok);
if (ok) {
@@ -359,7 +359,7 @@ int DOCConverter::findBmkFile(QString &, bmkList &fBmks) {
DEBUGKPILOT<<"RegExp bookmark found with no other information (no bookmark pattern nor name)"<<endl;
}
} else {
- QString pattern(bookmark);
+ TQString pattern(bookmark);
if (fieldnr>1) pattern=bmkinfo[1];
if (fieldnr>2) bookmark=bmkinfo[2];
DEBUGKPILOT<<"RegExp Bookmark, pattern="<<pattern<<", name="<<bookmark<<endl;
@@ -384,7 +384,7 @@ bool DOCConverter::convertTXTtoPDB() {
return false;
}
- QString text = readText();
+ TQString text = readText();
if (fBmkTypes & eBmkEndtags) {
findBmkEndtags(text, fBookmarks);
@@ -537,14 +537,14 @@ bool DOCConverter::convertPDBtoTXT()
<<" version="<<header.version<<endl;
// next come the header.numRecords real document records (might be compressed, see the version flag in the header)
- QFile docfile(txtfilename);
+ TQFile docfile(txtfilename);
if (!docfile.open(IO_WriteOnly))
{
emit logError(i18n("Unable to open output file %1.").arg(txtfilename));
KPILOT_DELETE(docdb);
return false;
}
- QString doctext;
+ TQString doctext;
for (int i=1; i<header.numRecords+1; ++i)
{
PilotRecord*rec=docdb->readRecordByIndex(i);
@@ -570,7 +570,7 @@ bool DOCConverter::convertPDBtoTXT()
if (rec)
{
PilotDOCBookmark bookie(rec);
- docBookmark*bmk=new docBookmark(QString::fromLatin1(bookie.bookmarkName), bookie.pos);
+ docBookmark*bmk=new docBookmark(TQString::fromLatin1(bookie.bookmarkName), bookie.pos);
bmks.append(bmk);
KPILOT_DELETE(rec);
} else {
@@ -583,12 +583,12 @@ bool DOCConverter::convertPDBtoTXT()
if ((fBmkTypes & eBmkFile) && (bmks.count()>0))
{
- QString bmkfilename = docfile.name();
+ TQString bmkfilename = docfile.name();
if (bmkfilename.endsWith(CSL1(".txt"))){
bmkfilename.remove(bmkfilename.length()-4, 4);
}
bmkfilename+=CSL1(PDBBMK_SUFFIX);
- QFile bmkfile(bmkfilename);
+ TQFile bmkfile(bmkfilename);
if (!bmkfile.open(IO_WriteOnly))
{
emit logError(i18n("Unable to open file %1 for the bookmarks of %2.")
@@ -598,7 +598,7 @@ bool DOCConverter::convertPDBtoTXT()
{
DEBUGKPILOT<<"Writing "<<upperBmkRec-header.numRecords<<
"("<<upperBmkRec<<") bookmarks to file "<<bmkfilename<<endl;
- QTextStream bmkstream(&bmkfile);
+ TQTextStream bmkstream(&bmkfile);
for (docBookmark*bmk=bmks.first(); bmk; bmk=bmks.next())
{
bmkstream<<bmk->position<<", "<<bmk->bmkName<<endl;
@@ -611,14 +611,14 @@ bool DOCConverter::convertPDBtoTXT()
{
for (docBookmark*bmk=bmks.last(); bmk; bmk=bmks.prev())
{
- doctext.insert(bmk->position, QString(CSL1("<*") +
+ doctext.insert(bmk->position, TQString(CSL1("<*") +
bmk->bmkName +
CSL1("*>")));
}
}
// Finally, write the actual text out to the file.
- QTextStream docstream(&docfile);
+ TQTextStream docstream(&docfile);
docstream<<doctext;
//docstream.close();
docfile.close();
diff --git a/kpilot/conduits/docconduit/DOC-converter.h b/kpilot/conduits/docconduit/DOC-converter.h
index f3747ea1d..802d60f20 100644
--- a/kpilot/conduits/docconduit/DOC-converter.h
+++ b/kpilot/conduits/docconduit/DOC-converter.h
@@ -36,51 +36,51 @@
#define BMK_SUFFIX ".bmk"
#define PDBBMK_SUFFIX ".bm"
-#include <qptrlist.h>
-#include <qobject.h>
+#include <tqptrlist.h>
+#include <tqobject.h>
class PilotDatabase;
/****************************************************************************************************
- * various bookmark classes. Most important is the bmkList findMatches(QString, bmkList &) function,
+ * various bookmark classes. Most important is the bmkList findMatches(TQString, bmkList &) function,
* which needs to return a list of all bookmarks found for the given bookmark expression.
* A bookmark usually consists of a bookmark text and an offset into the text document.
****************************************************************************************************/
class docBookmark;
-#define bmkList QPtrList<docBookmark>
-#define bmkSortedList QSortedList<docBookmark>
+#define bmkList TQPtrList<docBookmark>
+#define bmkSortedList TQSortedList<docBookmark>
class docBookmark {
public:
static bool compare_pos;
docBookmark():bmkName(), position(0) { };
- docBookmark(QString name, long int pos):bmkName(name), position(pos) { };
+ docBookmark(TQString name, long int pos):bmkName(name), position(pos) { };
docBookmark(const docBookmark &bmk):bmkName(bmk.bmkName),position(bmk.position){};
virtual ~ docBookmark() { };
- virtual int findMatches(QString, bmkList &fBookmarks) {
+ virtual int findMatches(TQString, bmkList &fBookmarks) {
FUNCTIONSETUP;
fBookmarks.append(new docBookmark(*this));
return 1;
};
- QString bmkName;
+ TQString bmkName;
long int position;
};
class docMatchBookmark:public docBookmark {
public:
docMatchBookmark():docBookmark() { from=0; to=100;};
- docMatchBookmark(QString pattrn, int options=0):docBookmark(),
+ docMatchBookmark(TQString pattrn, int options=0):docBookmark(),
pattern(pattrn), opts(options) { from=0; to=100; };
- docMatchBookmark(QString pattrn, QString bmkname,
+ docMatchBookmark(TQString pattrn, TQString bmkname,
int options=0):docBookmark(bmkname, 0), pattern(pattrn),
opts(options) { from=0; to=100; };
virtual ~ docMatchBookmark() { };
- virtual int findMatches(QString, bmkList &fBookmarks);
- QString pattern;
+ virtual int findMatches(TQString, bmkList &fBookmarks);
+ TQString pattern;
int opts;
int from, to;
};
@@ -88,13 +88,13 @@ class docMatchBookmark:public docBookmark {
class docRegExpBookmark:public docMatchBookmark {
public:
docRegExpBookmark():docMatchBookmark() { capSubexpression=-1;};
- docRegExpBookmark(QString regexp, int cap=0,
+ docRegExpBookmark(TQString regexp, int cap=0,
int options=0):docMatchBookmark(regexp, options) {capSubexpression=cap; };
- docRegExpBookmark(QString pattrn, QString bmkname,
+ docRegExpBookmark(TQString pattrn, TQString bmkname,
int options=0):docMatchBookmark(pattrn, bmkname, options) { capSubexpression=-1; };
virtual ~ docRegExpBookmark() { };
- virtual int findMatches(QString, bmkList &fBookmarks);
+ virtual int findMatches(TQString, bmkList &fBookmarks);
int capSubexpression;
};
@@ -103,12 +103,12 @@ class docRegExpBookmark:public docMatchBookmark {
* The converter class that does the real work for us.
*************************************************************************************************************/
-class DOCConverter:public QObject {
+class DOCConverter:public TQObject {
Q_OBJECT
private:
PilotDatabase * docdb;
- QString txtfilename;
- QString bmkfilename;
+ TQString txtfilename;
+ TQString bmkfilename;
bool compress;
bmkList fBookmarks;
@@ -121,16 +121,16 @@ public:
} eSortBookmarks;
public:
- DOCConverter(QObject *parent=0L, const char *name=0L);
+ DOCConverter(TQObject *parent=0L, const char *name=0L);
virtual ~ DOCConverter();
- QString readText();
- void setTXTpath(QString path, QString file);
- void setTXTpath(QString filename);
+ TQString readText();
+ void setTXTpath(TQString path, TQString file);
+ void setTXTpath(TQString filename);
void setPDB(PilotDatabase * dbi);
- QString txtFilename() const {return txtfilename;}
- QString bmkFilename() const {return bmkfilename;}
- void setBmkFilename(QString bmkf) { bmkfilename=bmkf;}
+ TQString txtFilename() const {return txtfilename;}
+ TQString bmkFilename() const {return bmkfilename;}
+ void setBmkFilename(TQString bmkf) { bmkfilename=bmkf;}
bool getCompress() const { return compress; };
void setCompress(bool newcomp) {compress=newcomp;};
@@ -151,9 +151,9 @@ public:
return fBookmarks.count();
};
- int findBmkEndtags(QString &, bmkList&);
- int findBmkInline(QString &, bmkList&);
- int findBmkFile(QString &, bmkList&);
+ int findBmkEndtags(TQString &, bmkList&);
+ int findBmkInline(TQString &, bmkList&);
+ int findBmkFile(TQString &, bmkList&);
void setSort(enum eSortBookmarksEnum sort) {eSortBookmarks=sort;}
@@ -176,8 +176,8 @@ protected:
private:
void readConfig();
signals:
- void logMessage(const QString &);
- void logError(const QString &);
+ void logMessage(const TQString &);
+ void logError(const TQString &);
};
#endif
diff --git a/kpilot/conduits/docconduit/doc-conduit.cc b/kpilot/conduits/docconduit/doc-conduit.cc
index eee36080c..fbaa22f59 100644
--- a/kpilot/conduits/docconduit/doc-conduit.cc
+++ b/kpilot/conduits/docconduit/doc-conduit.cc
@@ -36,8 +36,8 @@
#include "options.h"
#include "doc-conduit.moc"
-#include <qtimer.h>
-#include <qdir.h>
+#include <tqtimer.h>
+#include <tqdir.h>
#include <kconfig.h>
#include <kmdcodec.h>
@@ -59,7 +59,7 @@ extern "C"
unsigned long version_conduit_doc = Pilot::PLUGIN_API;
}
-QString dirToString(eSyncDirectionEnum dir) {
+TQString dirToString(eSyncDirectionEnum dir) {
switch(dir) {
// case eSyncAll: return "eSyncAll";
case eSyncPDAToPC: return CSL1("eSyncPDAToPC");
@@ -78,7 +78,7 @@ QString dirToString(eSyncDirectionEnum dir) {
DOCConduit::DOCConduit(KPilotLink * o,
- const char *n, const QStringList & a):ConduitAction(o, n, a)
+ const char *n, const TQStringList & a):ConduitAction(o, n, a)
{
FUNCTIONSETUP;
fConduitName=i18n("DOC");
@@ -145,13 +145,13 @@ void DOCConduit::readConfig()
-bool DOCConduit::pcTextChanged(QString txtfn)
+bool DOCConduit::pcTextChanged(TQString txtfn)
{
FUNCTIONSETUP;
// How do I find out if a text file has changed shince we last synced it??
// Use KMD5 for now. If I realize it is too slow, then I have to go back to comparing modification times
// if there is no config setting yet, assume the file has been changed. the md5 sum will be written to the config file after the sync.
- QString oldDigest=DOCConduitSettings::self()->config()->readEntry(txtfn);
+ TQString oldDigest=DOCConduitSettings::self()->config()->readEntry(txtfn);
if (oldDigest.length()<=0)
{
return true;
@@ -161,10 +161,10 @@ bool DOCConduit::pcTextChanged(QString txtfn)
#endif
KMD5 docmd5;
- QFile txtfile(txtfn);
+ TQFile txtfile(txtfn);
if (txtfile.open(IO_ReadOnly)){
docmd5.update(txtfile);
- QString thisDigest(docmd5.hexDigest() /* .data() */);
+ TQString thisDigest(docmd5.hexDigest() /* .data() */);
#ifdef DEBUG
DEBUGKPILOT<<"New digest is "<<thisDigest<<endl;
#endif
@@ -233,19 +233,19 @@ bool DOCConduit::hhTextChanged(PilotDatabase*docdb)
* Helper functions
********************************************************************/
-QString DOCConduit::constructPDBFileName(QString name) {
+TQString DOCConduit::constructPDBFileName(TQString name) {
FUNCTIONSETUP;
- QString fn;
- QDir dr(DOCConduitSettings::pDBDirectory());
- QFileInfo pth(dr, name);
+ TQString fn;
+ TQDir dr(DOCConduitSettings::pDBDirectory());
+ TQFileInfo pth(dr, name);
if (!name.isEmpty()) fn=pth.absFilePath()+CSL1(".pdb");
return fn;
}
-QString DOCConduit::constructTXTFileName(QString name) {
+TQString DOCConduit::constructTXTFileName(TQString name) {
FUNCTIONSETUP;
- QString fn;
- QDir dr( DOCConduitSettings::tXTDirectory() );
- QFileInfo pth(dr, name);
+ TQString fn;
+ TQDir dr( DOCConduitSettings::tXTDirectory() );
+ TQFileInfo pth(dr, name);
if (!name.isEmpty()) fn=pth.absFilePath()+CSL1(".txt");
return fn;
}
@@ -271,7 +271,7 @@ QString DOCConduit::constructTXTFileName(QString name) {
emit logMessage(i18n("Searching for texts and databases to synchronize"));
- QTimer::singleShot(0, this, SLOT(syncNextDB()));
+ TQTimer::singleShot(0, this, TQT_SLOT(syncNextDB()));
return true;
}
@@ -284,15 +284,15 @@ bool DOCConduit::doSync(docSyncInfo &sinfo)
if (sinfo.direction==eSyncDelete) {
if (!sinfo.txtfilename.isEmpty()) {
- if (!QFile::remove(sinfo.txtfilename)) {
+ if (!TQFile::remove(sinfo.txtfilename)) {
WARNINGKPILOT << "Unable to delete the text file " << sinfo.txtfilename << " on the PC" << endl;
}
- QString bmkfilename = sinfo.txtfilename;
+ TQString bmkfilename = sinfo.txtfilename;
if (bmkfilename.endsWith(CSL1(".txt"))){
bmkfilename.remove(bmkfilename.length()-4, 4);
}
bmkfilename+=CSL1(PDBBMK_SUFFIX);
- if (!QFile::remove(bmkfilename)) {
+ if (!TQFile::remove(bmkfilename)) {
#ifdef DEBUG
DEBUGKPILOT<<"Could not remove bookmarks file "<<bmkfilename<<" for database "<<sinfo.handheldDB<<endl;
#endif
@@ -300,7 +300,7 @@ bool DOCConduit::doSync(docSyncInfo &sinfo)
}
if (!sinfo.pdbfilename.isEmpty() && DOCConduitSettings::keepPDBsLocally() ) {
PilotLocalDatabase*database=new PilotLocalDatabase(DOCConduitSettings::pDBDirectory(),
- QString::fromLatin1(sinfo.dbinfo.name), false);
+ TQString::fromLatin1(sinfo.dbinfo.name), false);
if (database) {
if ( database->deleteDatabase() !=0 ) {
WARNINGKPILOT << "Unable to delete database " << sinfo.dbinfo.name << " on the PC" << endl;
@@ -336,8 +336,8 @@ bool DOCConduit::doSync(docSyncInfo &sinfo)
if (database && database->isOpen()) {
DOCConverter docconverter;
- connect(&docconverter, SIGNAL(logError(const QString &)), SIGNAL(logError(const QString &)));
- connect(&docconverter, SIGNAL(logMessage(const QString &)), SIGNAL(logMessage(const QString &)));
+ connect(&docconverter, TQT_SIGNAL(logError(const TQString &)), TQT_SIGNAL(logError(const TQString &)));
+ connect(&docconverter, TQT_SIGNAL(logMessage(const TQString &)), TQT_SIGNAL(logMessage(const TQString &)));
docconverter.setTXTpath( DOCConduitSettings::tXTDirectory(), sinfo.txtfilename );
docconverter.setPDB(database);
@@ -360,10 +360,10 @@ bool DOCConduit::doSync(docSyncInfo &sinfo)
if (res)
{
KMD5 docmd5;
- QFile txtfile(docconverter.txtFilename());
+ TQFile txtfile(docconverter.txtFilename());
if (txtfile.open(IO_ReadOnly)) {
docmd5.update(txtfile);
- QString thisDigest(docmd5.hexDigest() /* .data() */);
+ TQString thisDigest(docmd5.hexDigest() /* .data() */);
DOCConduitSettings::self()->config()->writeEntry(docconverter.txtFilename(), thisDigest);
DOCConduitSettings::self()->config()->sync();
#ifdef DEBUG
@@ -378,18 +378,18 @@ bool DOCConduit::doSync(docSyncInfo &sinfo)
if (!postSyncAction(database, sinfo, res))
emit logError(i18n("Unable to install the locally created PalmDOC %1 to the handheld.")
- .arg(QString::fromLatin1(sinfo.dbinfo.name)));
+ .arg(TQString::fromLatin1(sinfo.dbinfo.name)));
if (!res)
emit logError(i18n("Conversion of PalmDOC \"%1\" failed.")
- .arg(QString::fromLatin1(sinfo.dbinfo.name)));
-// disconnect(&docconverter, SIGNAL(logError(const QString &)), SIGNAL(logError(const QString &)));
-// disconnect(&docconverter, SIGNAL(logMessage(const QString &)), SIGNAL(logMessage(const QString &)));
+ .arg(TQString::fromLatin1(sinfo.dbinfo.name)));
+// disconnect(&docconverter, TQT_SIGNAL(logError(const TQString &)), TQT_SIGNAL(logError(const TQString &)));
+// disconnect(&docconverter, TQT_SIGNAL(logMessage(const TQString &)), TQT_SIGNAL(logMessage(const TQString &)));
// KPILOT_DELETE(database);
}
else
{
emit logError(i18n("Unable to open or create the database %1.")
- .arg(QString::fromLatin1(sinfo.dbinfo.name)));
+ .arg(TQString::fromLatin1(sinfo.dbinfo.name)));
}
return res;
}
@@ -404,7 +404,7 @@ void DOCConduit::syncNextDB() {
if (eSyncDirection==eSyncPCToPDA || fHandle->findDatabase(NULL, &dbinfo, dbnr, dbtype(), dbcreator() /*, cardno */ ) < 0)
{
// no more databases available, so check for PC->Palm sync
- QTimer::singleShot(0, this, SLOT(syncNextTXT()));
+ TQTimer::singleShot(0, this, TQT_SLOT(syncNextTXT()));
return;
}
dbnr=dbinfo.index+1;
@@ -414,23 +414,23 @@ void DOCConduit::syncNextDB() {
// if creator and/or type don't match, go to next db
if (!isCorrectDBTypeCreator(dbinfo) ||
- fDBNames.contains(QString::fromLatin1(dbinfo.name)))
+ fDBNames.contains(TQString::fromLatin1(dbinfo.name)))
{
- QTimer::singleShot(0, this, SLOT(syncNextDB()));
+ TQTimer::singleShot(0, this, TQT_SLOT(syncNextDB()));
return;
}
- QString txtfilename=constructTXTFileName(QString::fromLatin1(dbinfo.name));
- QString pdbfilename=constructPDBFileName(QString::fromLatin1(dbinfo.name));
+ TQString txtfilename=constructTXTFileName(TQString::fromLatin1(dbinfo.name));
+ TQString pdbfilename=constructPDBFileName(TQString::fromLatin1(dbinfo.name));
- docSyncInfo syncInfo(QString::fromLatin1(dbinfo.name),
+ docSyncInfo syncInfo(TQString::fromLatin1(dbinfo.name),
txtfilename, pdbfilename, eSyncNone);
syncInfo.dbinfo=dbinfo;
needsSync(syncInfo);
fSyncInfoList.append(syncInfo);
- fDBNames.append(QString::fromLatin1(dbinfo.name));
+ fDBNames.append(TQString::fromLatin1(dbinfo.name));
- QTimer::singleShot(0, this, SLOT(syncNextDB()));
+ TQTimer::singleShot(0, this, TQT_SLOT(syncNextDB()));
return;
}
@@ -444,28 +444,28 @@ void DOCConduit::syncNextTXT()
{
// We don't sync from PC to PDB, so start the conflict resolution and then the actual sync process
docnames.clear();
- QTimer::singleShot(0, this, SLOT(checkPDBFiles()));
+ TQTimer::singleShot(0, this, TQT_SLOT(checkPDBFiles()));
return;
}
// if docnames isn't initialized, get a list of all *.txt files in DOCConduitSettings::tXTDirectory()
if (docnames.isEmpty()/* || dociterator==docnames.end() */) {
- docnames=QDir( DOCConduitSettings::tXTDirectory(), CSL1("*.txt")).entryList() ;
+ docnames=TQDir( DOCConduitSettings::tXTDirectory(), CSL1("*.txt")).entryList() ;
dociterator=docnames.begin();
}
if (dociterator==docnames.end()) {
// no more databases available, so start the conflict resolution and then the actual sync proces
docnames.clear();
- QTimer::singleShot(0, this, SLOT(checkPDBFiles()));
+ TQTimer::singleShot(0, this, TQT_SLOT(checkPDBFiles()));
return;
}
- QString fn=(*dociterator);
+ TQString fn=(*dociterator);
- QDir dr( DOCConduitSettings::tXTDirectory() );
- QFileInfo fl(dr, fn );
- QString txtfilename=fl.absFilePath();
- QString pdbfilename;
+ TQDir dr( DOCConduitSettings::tXTDirectory() );
+ TQFileInfo fl(dr, fn );
+ TQString txtfilename=fl.absFilePath();
+ TQString pdbfilename;
++dociterator;
DBInfo dbinfo;
@@ -476,19 +476,19 @@ void DOCConduit::syncNextTXT()
bool alreadySynced=fDBNames.contains(fl.baseName(TRUE));
if (!alreadySynced) {
- docSyncInfo syncInfo(QString::fromLatin1(dbinfo.name),
+ docSyncInfo syncInfo(TQString::fromLatin1(dbinfo.name),
txtfilename, pdbfilename, eSyncNone);
syncInfo.dbinfo=dbinfo;
needsSync(syncInfo);
fSyncInfoList.append(syncInfo);
- fDBNames.append(QString::fromLatin1(dbinfo.name));
+ fDBNames.append(TQString::fromLatin1(dbinfo.name));
} else {
#ifdef DEBUG
DEBUGKPILOT<<txtfilename<<" has already been synced, skipping it."<<endl;
#endif
}
- QTimer::singleShot(0, this, SLOT(syncNextTXT()));
+ TQTimer::singleShot(0, this, TQT_SLOT(syncNextTXT()));
return;
}
@@ -502,33 +502,33 @@ void DOCConduit::checkPDBFiles() {
if ( DOCConduitSettings::localSync() || !DOCConduitSettings::keepPDBsLocally() || eSyncDirection==eSyncPCToPDA )
{
// no more databases available, so check for PC->Palm sync
- QTimer::singleShot(0, this, SLOT(checkDeletedDocs()));
+ TQTimer::singleShot(0, this, TQT_SLOT(checkDeletedDocs()));
return;
}
// Walk through all files in the pdb directory and check if it has already been synced.
// if docnames isn't initialized, get a list of all *.pdb files in DOCConduitSettings::pDBDirectory()
if (docnames.isEmpty()/* || dociterator==docnames.end() */) {
- docnames=QDir(DOCConduitSettings::pDBDirectory(), CSL1("*.pdb")).entryList() ;
+ docnames=TQDir(DOCConduitSettings::pDBDirectory(), CSL1("*.pdb")).entryList() ;
dociterator=docnames.begin();
}
if (dociterator==docnames.end()) {
// no more databases available, so start the conflict resolution and then the actual sync proces
docnames.clear();
- QTimer::singleShot(0, this, SLOT(checkDeletedDocs()));
+ TQTimer::singleShot(0, this, TQT_SLOT(checkDeletedDocs()));
return;
}
- QString fn=(*dociterator);
+ TQString fn=(*dociterator);
- QDir dr(DOCConduitSettings::pDBDirectory());
- QFileInfo fl(dr, fn );
- QString pdbfilename=fl.absFilePath();
+ TQDir dr(DOCConduitSettings::pDBDirectory());
+ TQFileInfo fl(dr, fn );
+ TQString pdbfilename=fl.absFilePath();
++dociterator;
// Get the doc title and check if it has already been synced (in the synced docs list of in fDBNames to be synced)
// If the doc title doesn't appear in either list, install it to the Handheld, and add it to the list of dbs to be synced.
- QString dbname=fl.baseName(TRUE).left(30);
+ TQString dbname=fl.baseName(TRUE).left(30);
if (!fDBNames.contains(dbname) && !fDBListSynced.contains(dbname)) {
if (fHandle->installFiles(pdbfilename, false)) {
DBInfo dbinfo;
@@ -549,7 +549,7 @@ void DOCConduit::checkPDBFiles() {
}
}
- QTimer::singleShot(0, this, SLOT(checkPDBFiles()));
+ TQTimer::singleShot(0, this, TQT_SLOT(checkPDBFiles()));
}
@@ -558,12 +558,12 @@ void DOCConduit::checkDeletedDocs()
{
FUNCTIONSETUP;
- for (QStringList::Iterator it=fDBListSynced.begin(); it!=fDBListSynced.end(); ++it ) {
+ for (TQStringList::Iterator it=fDBListSynced.begin(); it!=fDBListSynced.end(); ++it ) {
if (!fDBNames.contains(*it)) {
// We need to delete this doc:
- QString dbname(*it);
- QString txtfilename=constructTXTFileName(dbname);
- QString pdbfilename=constructPDBFileName(dbname);
+ TQString dbname(*it);
+ TQString txtfilename=constructTXTFileName(dbname);
+ TQString pdbfilename=constructPDBFileName(dbname);
docSyncInfo syncInfo(dbname, txtfilename, pdbfilename, eSyncDelete);
DBInfo dbinfo;
@@ -574,7 +574,7 @@ void DOCConduit::checkDeletedDocs()
fSyncInfoList.append(syncInfo);
}
}
- QTimer::singleShot(0, this, SLOT(resolve()));
+ TQTimer::singleShot(0, this, TQT_SLOT(resolve()));
return;
}
@@ -628,7 +628,7 @@ void DOCConduit::resolve() {
if (!dlg || !dlg->exec() ) {
KPILOT_DELETE(dlg)
emit logMessage(i18n("Sync aborted by user."));
- QTimer::singleShot(0, this, SLOT(cleanup()));
+ TQTimer::singleShot(0, this, TQT_SLOT(cleanup()));
return;
}
}
@@ -638,7 +638,7 @@ void DOCConduit::resolve() {
// fDBNames will be filled with the names of the databases that are actually synced (not deleted), so I can write the list to the config file
fDBNames.clear();
fSyncInfoListIterator=fSyncInfoList.begin();
- QTimer::singleShot(0,this, SLOT(syncDatabases()));
+ TQTimer::singleShot(0,this, TQT_SLOT(syncDatabases()));
return;
}
@@ -648,7 +648,7 @@ void DOCConduit::syncDatabases() {
FUNCTIONSETUP;
if (fSyncInfoListIterator==fSyncInfoList.end()) {
// We're done, so clean up
- QTimer::singleShot(0, this, SLOT(cleanup()));
+ TQTimer::singleShot(0, this, TQT_SLOT(cleanup()));
return;
}
@@ -679,12 +679,12 @@ void DOCConduit::syncDatabases() {
}
if (sinfo.direction != eSyncDelete) fDBNames.append(sinfo.handheldDB);
- QTimer::singleShot(0,this, SLOT(syncDatabases()));
+ TQTimer::singleShot(0,this, TQT_SLOT(syncDatabases()));
return;
}
-PilotDatabase*DOCConduit::openDOCDatabase(const QString &dbname) {
+PilotDatabase*DOCConduit::openDOCDatabase(const TQString &dbname) {
if (DOCConduitSettings::localSync())
{
return new PilotLocalDatabase(DOCConduitSettings::pDBDirectory(), dbname, false);
@@ -701,7 +701,7 @@ bool DOCConduit::needsSync(docSyncInfo &sinfo)
FUNCTIONSETUP;
sinfo.direction = eSyncNone;
- PilotDatabase*docdb=openDOCDatabase(QString::fromLatin1(sinfo.dbinfo.name));
+ PilotDatabase*docdb=openDOCDatabase(TQString::fromLatin1(sinfo.dbinfo.name));
if (!fDBListSynced.contains(sinfo.handheldDB)) {
// the database wasn't included on last sync, so it has to be new.
#ifdef DEBUG
@@ -716,7 +716,7 @@ bool DOCConduit::needsSync(docSyncInfo &sinfo)
N N | C P H
*/
- if (QFile::exists(sinfo.txtfilename)) sinfo.fPCStatus=eStatNew;
+ if (TQFile::exists(sinfo.txtfilename)) sinfo.fPCStatus=eStatNew;
else sinfo.fPCStatus=eStatDoesntExist;
if (docdb && docdb->isOpen()) sinfo.fPalmStatus=eStatNew;
else sinfo.fPalmStatus=eStatDoesntExist;
@@ -756,7 +756,7 @@ bool DOCConduit::needsSync(docSyncInfo &sinfo)
}
// Text was included in the last sync
- if (!QFile::exists(sinfo.txtfilename)) sinfo.fPCStatus=eStatDeleted;
+ if (!TQFile::exists(sinfo.txtfilename)) sinfo.fPCStatus=eStatDeleted;
else if(pcTextChanged(sinfo.txtfilename)) {
sinfo.fPCStatus=eStatChanged;
#ifdef DEBUG
@@ -871,7 +871,7 @@ PilotDatabase *DOCConduit::preSyncAction(docSyncInfo &sinfo) const
{
// make sure the dir for the local texts really exists!
- QDir dir( DOCConduitSettings::tXTDirectory() );
+ TQDir dir( DOCConduitSettings::tXTDirectory() );
if (!dir.exists())
{
dir.mkdir(dir.absPath());
@@ -885,7 +885,7 @@ PilotDatabase *DOCConduit::preSyncAction(docSyncInfo &sinfo) const
if (DOCConduitSettings::keepPDBsLocally())
{
// make sure the dir for the local db really exists!
- QDir dir(DOCConduitSettings::pDBDirectory());
+ TQDir dir(DOCConduitSettings::pDBDirectory());
if (!dir.exists())
{
@@ -909,7 +909,7 @@ PilotDatabase *DOCConduit::preSyncAction(docSyncInfo &sinfo) const
if (DOCConduitSettings::keepPDBsLocally())
{
// make sure the dir for the local db really exists!
- QDir dir(DOCConduitSettings::pDBDirectory());
+ TQDir dir(DOCConduitSettings::pDBDirectory());
if (!dir.exists())
{
dir.mkdir(dir.absPath());
@@ -922,11 +922,11 @@ PilotDatabase *DOCConduit::preSyncAction(docSyncInfo &sinfo) const
if (DOCConduitSettings::keepPDBsLocally())
{
return new PilotLocalDatabase(DOCConduitSettings::pDBDirectory(),
- QString::fromLatin1(dbinfo.name), false);
+ TQString::fromLatin1(dbinfo.name), false);
}
else
{
- return deviceLink()->database(QString::fromLatin1(dbinfo.name));
+ return deviceLink()->database(TQString::fromLatin1(dbinfo.name));
}
}
@@ -950,7 +950,7 @@ bool DOCConduit::postSyncAction(PilotDatabase * database,
if (DOCConduitSettings::keepPDBsLocally() && !DOCConduitSettings::localSync())
{
PilotDatabase*db=deviceLink()->database(
- QString::fromLatin1(sinfo.dbinfo.name));
+ TQString::fromLatin1(sinfo.dbinfo.name));
#ifdef DEBUG
DEBUGKPILOT<<"Middle 1 Resetting sync flags for database "
<<sinfo.dbinfo.name<<endl;
@@ -977,7 +977,7 @@ bool DOCConduit::postSyncAction(PilotDatabase * database,
DEBUGKPILOT<<"Installing file "<<localdb->dbPathName()<<" ("
<<sinfo.handheldDB<<") to the handheld"<<endl;
#endif
- QString dbpathname=localdb->dbPathName();
+ TQString dbpathname=localdb->dbPathName();
// This deletes localdb as well, which is just a cast from database
KPILOT_DELETE(database);
if (!fHandle->installFiles(dbpathname, false))
diff --git a/kpilot/conduits/docconduit/doc-conduit.h b/kpilot/conduits/docconduit/doc-conduit.h
index 834002bea..aefb4264f 100644
--- a/kpilot/conduits/docconduit/doc-conduit.h
+++ b/kpilot/conduits/docconduit/doc-conduit.h
@@ -31,7 +31,7 @@
#include <plugin.h>
class docSyncInfo;
-typedef QValueList<docSyncInfo> syncInfoList;
+typedef TQValueList<docSyncInfo> syncInfoList;
typedef enum eSyncDirectionEnum {
eSyncNone,
@@ -51,7 +51,7 @@ typedef enum eTextStatus {
};
-QString dirToString(eSyncDirectionEnum dir);
+TQString dirToString(eSyncDirectionEnum dir);
class DOCConduit:public ConduitAction {
Q_OBJECT
@@ -60,11 +60,11 @@ public:
public:
DOCConduit(KPilotLink * o,
- const char *n = 0L, const QStringList & a = QStringList());
+ const char *n = 0L, const TQStringList & a = TQStringList());
virtual ~ DOCConduit();
- bool encode(QStringList fileName, PilotDatabase * db);
- bool decode(PilotDatabase * db, QString fileName);
+ bool encode(TQStringList fileName, PilotDatabase * db);
+ bool decode(PilotDatabase * db, TQString fileName);
virtual bool exec();
protected:
virtual bool isCorrectDBTypeCreator(DBInfo dbinfo);
@@ -106,33 +106,33 @@ public slots:
*/
bool postSyncAction(PilotDatabase * dbinfo, docSyncInfo &sinfo, bool res = true);
- bool pcTextChanged(QString txtfn);
+ bool pcTextChanged(TQString txtfn);
bool hhTextChanged(PilotDatabase*docdb);
/** Opens the database with name dbname. For a local sync, this will be a
* PilotLocalDatabase, otherwise it will be a database on the serial device
* (i.e. an object of class PilotSerialDatabase) */
- PilotDatabase *openDOCDatabase(const QString &dbname);
+ PilotDatabase *openDOCDatabase(const TQString &dbname);
- QString constructPDBFileName(QString name);
- QString constructTXTFileName(QString name);
+ TQString constructPDBFileName(TQString name);
+ TQString constructTXTFileName(TQString name);
eSyncDirectionEnum eConflictResolution;
int fTXTBookmarks, fPDBBookmarks;
- QStringList fDBListSynced;
- QStringList fDBNames;
+ TQStringList fDBListSynced;
+ TQStringList fDBNames;
syncInfoList fSyncInfoList;
syncInfoList::Iterator fSyncInfoListIterator;
long int dbnr;
- QStringList docnames;
- QStringList::Iterator dociterator;
+ TQStringList docnames;
+ TQStringList::Iterator dociterator;
};
class docSyncInfo
{
public:
- docSyncInfo(QString hhDB=QString(), QString txtfn=QString(), QString pdbfn=QString(), eSyncDirectionEnum dir=eSyncNone)
+ docSyncInfo(TQString hhDB=TQString(), TQString txtfn=TQString(), TQString pdbfn=TQString(), eSyncDirectionEnum dir=eSyncNone)
{
handheldDB=hhDB;
txtfilename=txtfn;
@@ -142,7 +142,7 @@ public:
fPalmStatus=eStatNone;
};
~docSyncInfo(){};
- QString handheldDB, txtfilename, pdbfilename;
+ TQString handheldDB, txtfilename, pdbfilename;
DBInfo dbinfo;
eSyncDirectionEnum direction;
eTextStatus fPCStatus, fPalmStatus;
diff --git a/kpilot/conduits/docconduit/doc-conflictdialog.cc b/kpilot/conduits/docconduit/doc-conflictdialog.cc
index 7dafd9b66..50ecbbd1e 100644
--- a/kpilot/conduits/docconduit/doc-conflictdialog.cc
+++ b/kpilot/conduits/docconduit/doc-conflictdialog.cc
@@ -28,54 +28,54 @@
#include "options.h"
#include "doc-conflictdialog.moc"
-#include <qlabel.h>
-#include <qpushbutton.h>
-#include <qlayout.h>
-#include <qbuttongroup.h>
+#include <tqlabel.h>
+#include <tqpushbutton.h>
+#include <tqlayout.h>
+#include <tqbuttongroup.h>
#include <kmessagebox.h>
-#include <qtimer.h>
-#include <qtable.h>
-#include <qcombobox.h>
-#include <qscrollview.h>
+#include <tqtimer.h>
+#include <tqtable.h>
+#include <tqcombobox.h>
+#include <tqscrollview.h>
-ResolutionDialog::ResolutionDialog( QWidget* parent, const QString& caption, syncInfoList*sinfo, KPilotLink*lnk )
+ResolutionDialog::ResolutionDialog( TQWidget* parent, const TQString& caption, syncInfoList*sinfo, KPilotLink*lnk )
: KDialogBase( parent, "resolutionDialog", true, caption, KDialogBase::Ok|KDialogBase::Cancel, KDialogBase::Ok, true), tickleTimer(0L), fHandle(lnk) {
FUNCTIONSETUP;
syncInfo=sinfo;
hasConflicts=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() );
// First, insert the texts on top:
- textLabel1 = new QLabel(i18n("Here is a list of all text files and DOC databases the conduit found. The conduit tried to determine the correct sync direction, but for databases in bold red letters a conflict occurred (i.e. the text was changed both on the desktop and on the handheld). For these databases please specify which version is the current one."), page);
- textLabel1->setAlignment( int( QLabel::WordBreak | QLabel::AlignVCenter ) );
+ textLabel1 = new TQLabel(i18n("Here is a list of all text files and DOC databases the conduit found. The conduit tried to determine the correct sync direction, but for databases in bold red letters a conflict occurred (i.e. the text was changed both on the desktop and on the handheld). For these databases please specify which version is the current one."), page);
+ textLabel1->setAlignment( int( TQLabel::WordBreak | TQLabel::AlignVCenter ) );
topLayout->addWidget(textLabel1);
- textLabel2 = new QLabel(i18n("You can also change the sync direction for databases without a conflict." ), page );
- textLabel2->setAlignment( int( QLabel::WordBreak | QLabel::AlignVCenter ) );
+ textLabel2 = new TQLabel(i18n("You can also change the sync direction for databases without a conflict." ), page );
+ textLabel2->setAlignment( int( TQLabel::WordBreak | TQLabel::AlignVCenter ) );
topLayout->addWidget(textLabel2);
- resolutionGroupBox = new QGroupBox(i18n("DOC Databases"), page );
- QVBoxLayout*playout = new QVBoxLayout(resolutionGroupBox);
- QScrollView* sv = new QScrollView(resolutionGroupBox);
+ resolutionGroupBox = new TQGroupBox(i18n("DOC Databases"), page );
+ TQVBoxLayout*playout = new TQVBoxLayout(resolutionGroupBox);
+ TQScrollView* sv = new TQScrollView(resolutionGroupBox);
playout->addWidget(sv);
- sv->setResizePolicy(QScrollView::AutoOneFit);
- sv->setHScrollBarMode(QScrollView::AlwaysOff);
+ sv->setResizePolicy(TQScrollView::AutoOneFit);
+ sv->setHScrollBarMode(TQScrollView::AlwaysOff);
sv->setMargin(5);
- QFrame* big_box = new QFrame(sv->viewport());
+ TQFrame* big_box = new TQFrame(sv->viewport());
sv->addChild(big_box);
- resolutionGroupBoxLayout = new QGridLayout( big_box, syncInfo->size(), 3 );
+ resolutionGroupBoxLayout = new TQGridLayout( big_box, syncInfo->size(), 3 );
resolutionGroupBoxLayout->setAlignment( Qt::AlignTop );
// Invisible button group for the information buttons to use the same slot for all of them (see Dallheimer's book, page 309f)
- QButtonGroup *bgroup = new QButtonGroup( this );
+ TQButtonGroup *bgroup = new TQButtonGroup( this );
bgroup->hide();
- QObject::connect(bgroup, SIGNAL(clicked(int)), this, SLOT(slotInfo(int)));
+ TQObject::connect(bgroup, TQT_SIGNAL(clicked(int)), this, TQT_SLOT(slotInfo(int)));
if (syncInfo) {
DEBUGKPILOT<<"Adding resolution options for the databases "<<endl;
@@ -89,18 +89,18 @@ ResolutionDialog::ResolutionDialog( QWidget* parent, const QString& caption, syn
cE.conflict=(si.direction==eSyncConflict);
DEBUGKPILOT<<"Adding "<<si.handheldDB<<" to the conflict resolution dialog"<<endl;
- QString text=si.handheldDB;
+ TQString text=si.handheldDB;
if (cE.conflict) {
text=CSL1("<qt><b><font color=red>")+text+CSL1("</font></b></qt>");
DEBUGKPILOT<<"We have a conflict for database "<<si.handheldDB<<endl;
hasConflicts=true;
}
- cE.dbname=new QLabel(text, big_box);
+ cE.dbname=new TQLabel(text, big_box);
resolutionGroupBoxLayout->addWidget( cE.dbname, cE.index, 0 );
- cE.resolution=new QComboBox( FALSE, big_box);
- cE.resolution->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7,
- (QSizePolicy::SizeType)0, 0, 0,
+ cE.resolution=new TQComboBox( FALSE, big_box);
+ cE.resolution->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7,
+ (TQSizePolicy::SizeType)0, 0, 0,
cE.resolution->sizePolicy().hasHeightForWidth() ) );
cE.resolution->clear();
cE.resolution->insertItem( i18n( "No Sync" ) );
@@ -110,7 +110,7 @@ ResolutionDialog::ResolutionDialog( QWidget* parent, const QString& caption, syn
cE.resolution->setCurrentItem((int)si.direction);
resolutionGroupBoxLayout->addWidget( cE.resolution, cE.index, 1);
- cE.info = new QPushButton( i18n("More Info..."), big_box );
+ cE.info = new TQPushButton( i18n("More Info..."), big_box );
resolutionGroupBoxLayout->addWidget(cE.info, cE.index, 2);
bgroup->insert(cE.info);
@@ -123,11 +123,11 @@ ResolutionDialog::ResolutionDialog( QWidget* parent, const QString& caption, syn
topLayout->addWidget( resolutionGroupBox );
- resize( QSize(600, 480).expandedTo(minimumSizeHint()) );
+ resize( TQSize(600, 480).expandedTo(minimumSizeHint()) );
- if (fHandle) tickleTimer=new QTimer(this, "TickleTimer");
+ if (fHandle) tickleTimer=new TQTimer(this, "TickleTimer");
if (tickleTimer) {
- connect( tickleTimer, SIGNAL(timeout()), this, SLOT(_tickle()) );
+ connect( tickleTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(_tickle()) );
tickleTimer->start( 10000 ); // tickle the palm every 10 seconds to prevent a timeout until the sync is really finished.
}
@@ -143,14 +143,14 @@ ResolutionDialog::~ResolutionDialog()
/* virtual slot */ void ResolutionDialog::slotOk() {
FUNCTIONSETUP;
- QValueList<conflictEntry>::Iterator ceIt;
+ TQValueList<conflictEntry>::Iterator ceIt;
for (ceIt=conflictEntries.begin(); ceIt!=conflictEntries.end(); ++ceIt) {
(*syncInfo)[(*ceIt).index].direction=(eSyncDirectionEnum)((*ceIt).resolution->currentItem());
}
KDialogBase::slotOk();
}
-QString eTextStatusToString(eTextStatus stat) {
+TQString eTextStatusToString(eTextStatus stat) {
switch(stat) {
case eStatNone: return i18n("unchanged");
case eStatNew: return i18n("new");
@@ -168,7 +168,7 @@ void ResolutionDialog::slotInfo(int index) {
int ix=cE.index;
if (!syncInfo) return;
docSyncInfo si=(*syncInfo)[ix];
- QString text=i18n("Status of the database %1:\n\n").arg(si.handheldDB);
+ TQString text=i18n("Status of the database %1:\n\n").arg(si.handheldDB);
text+=i18n("Handheld: %1\n").arg(eTextStatusToString(si.fPalmStatus));
text+=i18n("Desktop: %1\n").arg(eTextStatusToString(si.fPCStatus));
diff --git a/kpilot/conduits/docconduit/doc-conflictdialog.h b/kpilot/conduits/docconduit/doc-conflictdialog.h
index f8ad8caf7..00a3ef1a5 100644
--- a/kpilot/conduits/docconduit/doc-conflictdialog.h
+++ b/kpilot/conduits/docconduit/doc-conflictdialog.h
@@ -43,9 +43,9 @@ class KPilotLink;
typedef struct conflictEntry {
- QLabel*dbname;
- QComboBox* resolution;
- QPushButton*info;
+ TQLabel*dbname;
+ TQComboBox* resolution;
+ TQPushButton*info;
int index;
bool conflict;
};
@@ -56,23 +56,23 @@ class ResolutionDialog : public KDialogBase
Q_OBJECT
public:
- ResolutionDialog( QWidget* parent=0, const QString& caption=i18n("Resolution Dialog"), syncInfoList*sinfo=0L, KPilotLink*lnk=0L);
+ ResolutionDialog( TQWidget* parent=0, const TQString& caption=i18n("Resolution Dialog"), syncInfoList*sinfo=0L, KPilotLink*lnk=0L);
~ResolutionDialog();
bool hasConflicts;
public slots:
void _tickle();
protected:
- QTimer* tickleTimer;
+ TQTimer* tickleTimer;
KPilotLink* fHandle;
protected:
- QGroupBox* resolutionGroupBox;
- QGridLayout*resolutionGroupBoxLayout;
+ TQGroupBox* resolutionGroupBox;
+ TQGridLayout*resolutionGroupBoxLayout;
syncInfoList*syncInfo;
- QValueList<conflictEntry> conflictEntries;
- QLabel *textLabel1,*textLabel2;
+ TQValueList<conflictEntry> conflictEntries;
+ TQLabel *textLabel1,*textLabel2;
protected slots:
virtual void slotOk();
diff --git a/kpilot/conduits/docconduit/doc-factory.cc b/kpilot/conduits/docconduit/doc-factory.cc
index 3d2a16b11..cfab20f4d 100644
--- a/kpilot/conduits/docconduit/doc-factory.cc
+++ b/kpilot/conduits/docconduit/doc-factory.cc
@@ -54,7 +54,7 @@ const char *DOCConduitFactory::dbDOCcreator = "REAd";
-DOCConduitFactory::DOCConduitFactory(QObject * p, const char *n):
+DOCConduitFactory::DOCConduitFactory(TQObject * p, const char *n):
KLibFactory(p, n)
{
FUNCTIONSETUP;
@@ -77,8 +77,8 @@ DOCConduitFactory::~DOCConduitFactory()
}
-/* virtual */ QObject * DOCConduitFactory::createObject(QObject * p,
- const char *n, const char *c, const QStringList & a)
+/* virtual */ TQObject * DOCConduitFactory::createObject(TQObject * p,
+ const char *n, const char *c, const TQStringList & a)
{
FUNCTIONSETUP;
@@ -87,7 +87,7 @@ DOCConduitFactory::~DOCConduitFactory()
#endif
if (qstrcmp(c, "ConduitConfigBase") == 0)
{
- QWidget *w = dynamic_cast<QWidget *>(p);
+ TQWidget *w = dynamic_cast<TQWidget *>(p);
if (w)
{
return new DOCWidgetConfig(w,n);
diff --git a/kpilot/conduits/docconduit/doc-factory.h b/kpilot/conduits/docconduit/doc-factory.h
index c848777a0..312b9def9 100644
--- a/kpilot/conduits/docconduit/doc-factory.h
+++ b/kpilot/conduits/docconduit/doc-factory.h
@@ -41,7 +41,7 @@ class DOCConduitFactory:public KLibFactory
Q_OBJECT
public:
- DOCConduitFactory(QObject * = 0L, const char * = 0L);
+ DOCConduitFactory(TQObject * = 0L, const char * = 0L);
virtual ~ DOCConduitFactory();
static KAboutData *about() {
@@ -55,10 +55,10 @@ public:
protected:
- virtual QObject * createObject(QObject * parent = 0,
+ virtual TQObject * createObject(TQObject * parent = 0,
const char *name = 0,
- const char *classname = "QObject",
- const QStringList & args = QStringList());
+ const char *classname = "TQObject",
+ const TQStringList & args = TQStringList());
private:
KInstance * fInstance;
diff --git a/kpilot/conduits/docconduit/doc-setup.cc b/kpilot/conduits/docconduit/doc-setup.cc
index a6de2d2ad..6e6858a5c 100644
--- a/kpilot/conduits/docconduit/doc-setup.cc
+++ b/kpilot/conduits/docconduit/doc-setup.cc
@@ -28,10 +28,10 @@
#include "options.h"
-#include <qtabwidget.h>
-#include <qcheckbox.h>
-#include <qbuttongroup.h>
-#include <qcombobox.h>
+#include <tqtabwidget.h>
+#include <tqcheckbox.h>
+#include <tqbuttongroup.h>
+#include <tqcombobox.h>
#include <kconfig.h>
#include <kurlrequester.h>
@@ -43,7 +43,7 @@
#include "docconduitSettings.h"
-DOCWidgetConfig::DOCWidgetConfig(QWidget * w, const char *n):
+DOCWidgetConfig::DOCWidgetConfig(TQWidget * w, const char *n):
ConduitConfigBase(w, n),
fConfigWidget(new DOCWidget(w))
{
@@ -51,8 +51,8 @@ DOCWidgetConfig::DOCWidgetConfig(QWidget * w, const char *n):
fWidget=fConfigWidget;
- QStringList l = KGlobal::charsets()->descriptiveEncodingNames();
- for ( QStringList::Iterator it = l.begin(); it != l.end(); ++it)
+ TQStringList l = KGlobal::charsets()->descriptiveEncodingNames();
+ for ( TQStringList::Iterator it = l.begin(); it != l.end(); ++it)
{
fConfigWidget->fEncoding->insertItem(*it);
}
@@ -63,9 +63,9 @@ DOCWidgetConfig::DOCWidgetConfig(QWidget * w, const char *n):
fConduitName=i18n("Palm DOC");
-#define CMOD(a,b) connect(fConfigWidget->a,SIGNAL(b),this,SLOT(modified()))
- CMOD(fTXTDir,textChanged(const QString &));
- CMOD(fPDBDir,textChanged(const QString &));
+#define CMOD(a,b) connect(fConfigWidget->a,TQT_SIGNAL(b),this,TQT_SLOT(modified()))
+ CMOD(fTXTDir,textChanged(const TQString &));
+ CMOD(fPDBDir,textChanged(const TQString &));
CMOD(fkeepPDBLocally,clicked());
CMOD(fConflictResolution,clicked(int));
CMOD(fConvertBookmarks,stateChanged(int));
@@ -77,7 +77,7 @@ DOCWidgetConfig::DOCWidgetConfig(QWidget * w, const char *n):
CMOD(fNoConversionOfBmksOnly,stateChanged(int));
CMOD(fAlwaysUseResolution,stateChanged(int));
CMOD(fPCBookmarks,clicked(int));
- CMOD(fEncoding,textChanged(const QString &));
+ CMOD(fEncoding,textChanged(const TQString &));
#undef CMOD
fConfigWidget->adjustSize();
diff --git a/kpilot/conduits/docconduit/doc-setup.h b/kpilot/conduits/docconduit/doc-setup.h
index 470585e01..32d1b54bc 100644
--- a/kpilot/conduits/docconduit/doc-setup.h
+++ b/kpilot/conduits/docconduit/doc-setup.h
@@ -36,7 +36,7 @@ class DOCWidget;
class DOCWidgetConfig : public ConduitConfigBase
{
public:
- DOCWidgetConfig(QWidget *, const char *);
+ DOCWidgetConfig(TQWidget *, const char *);
virtual void commit();
virtual void load();
protected:
diff --git a/kpilot/conduits/docconduit/kpalmdoc_dlg.cc b/kpilot/conduits/docconduit/kpalmdoc_dlg.cc
index 5bdacba8c..29713ffae 100644
--- a/kpilot/conduits/docconduit/kpalmdoc_dlg.cc
+++ b/kpilot/conduits/docconduit/kpalmdoc_dlg.cc
@@ -31,12 +31,12 @@
#include <stdio.h>
#include <iostream>
-#include <qtabwidget.h>
-#include <qcheckbox.h>
-#include <qradiobutton.h>
-#include <qbuttongroup.h>
-#include <qlabel.h>
-#include <qcombobox.h>
+#include <tqtabwidget.h>
+#include <tqcheckbox.h>
+#include <tqradiobutton.h>
+#include <tqbuttongroup.h>
+#include <tqlabel.h>
+#include <tqcombobox.h>
#include <klocale.h>
#include <kconfig.h>
@@ -54,24 +54,24 @@
#include "kpalmdocSettings.h"
-ConverterDlg::ConverterDlg( QWidget *parent, const QString& caption)
+ConverterDlg::ConverterDlg( TQWidget *parent, const TQString& caption)
: KDialogBase( parent, "converterdialog", false, caption, KDialogBase::Close|KDialogBase::Help|KDialogBase::User1,
KDialogBase::Close, true, i18n("&About"))
{
- QWidget *page = makeHBoxMainWidget();
+ TQWidget *page = makeHBoxMainWidget();
dlg=new ConverterDlgBase(page);
- QStringList l = KGlobal::charsets()->descriptiveEncodingNames();
- for ( QStringList::Iterator it = l.begin(); it != l.end(); ++it)
+ TQStringList l = KGlobal::charsets()->descriptiveEncodingNames();
+ for ( TQStringList::Iterator it = l.begin(); it != l.end(); ++it)
{
dlg->fEncoding->insertItem(*it);
}
readSettings();
- connect(dlg->fDirectories, SIGNAL(toggled(bool)),
- this, SLOT(slotDirectories(bool)));
- connect(dlg->fTextToPDB, SIGNAL(clicked()), this, SLOT(slotToPDB()));
- connect(dlg->fPDBToText, SIGNAL(clicked()), this, SLOT(slotToText()));
+ connect(dlg->fDirectories, TQT_SIGNAL(toggled(bool)),
+ this, TQT_SLOT(slotDirectories(bool)));
+ connect(dlg->fTextToPDB, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotToPDB()));
+ connect(dlg->fPDBToText, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotToText()));
resize(minimumSize());
}
@@ -117,7 +117,7 @@ void ConverterDlg::readSettings()
slotDirectories(dir);
dlg->fAskOverwrite->setChecked( KPalmDocSettings::askOverwrite() );
dlg->fVerbose->setChecked( KPalmDocSettings::verboseMessages() );
- QString encoding = KPalmDocSettings::encoding();
+ TQString encoding = KPalmDocSettings::encoding();
#ifdef DEBUG
DEBUGKPILOT << fname << ": Encoding=" << encoding << endl;
#endif
@@ -162,11 +162,11 @@ void ConverterDlg::slotToText()
bool dir=dlg->fDirectories->isChecked();
- QString txturl=dlg->fTXTDir->url();
- QString pdburl=dlg->fPDBDir->url();
+ TQString txturl=dlg->fTXTDir->url();
+ TQString pdburl=dlg->fPDBDir->url();
- QFileInfo txtinfo(txturl);
- QFileInfo pdbinfo(pdburl);
+ TQFileInfo txtinfo(txturl);
+ TQFileInfo pdbinfo(pdburl);
if (dir)
{
@@ -176,7 +176,7 @@ void ConverterDlg::slotToText()
i18n("<qt>You selected to sync folders, "
"but gave a filename instead (<em>%1</em>)."
"<br>Use folder <em>%2</em> instead?</qt>").arg(pdburl)
- .arg(pdbinfo.dirPath(true)), QString::null, i18n("Use Folder"), KStdGuiItem::cancel());
+ .arg(pdbinfo.dirPath(true)), TQString::null, i18n("Use Folder"), KStdGuiItem::cancel());
if (res==KMessageBox::Yes)
{
pdburl=pdbinfo.dirPath(true);
@@ -212,7 +212,7 @@ void ConverterDlg::slotToText()
i18n("<qt>You selected to sync folders, "
"but gave a filename instead (<em>%1</em>)."
"<br>Use folder <em>%2</em> instead?</qt>").arg(txturl)
- .arg(txtinfo.dirPath(true)), QString::null, i18n("Use Folder"), KStdGuiItem::cancel());
+ .arg(txtinfo.dirPath(true)), TQString::null, i18n("Use Folder"), KStdGuiItem::cancel());
if (res==KMessageBox::Yes) {
txturl=txtinfo.dirPath(true);
txtinfo.setFile(txturl);
@@ -235,13 +235,13 @@ void ConverterDlg::slotToText()
// Now that we have both directories, create the converter object
DEBUGKPILOT<<"Pdbinfo.dir="<<pdbinfo.dir().absPath()<<endl;
DEBUGKPILOT<<"txtinfo.dir="<<txtinfo.dir().absPath()<<endl;
- QStringList pdbfiles(pdbinfo.dir().entryList(CSL1("*.pdb")));
- QStringList converted_Files;
+ TQStringList pdbfiles(pdbinfo.dir().entryList(CSL1("*.pdb")));
+ TQStringList converted_Files;
DEBUGKPILOT<<"Length of filename list: "<<pdbfiles.size()<<endl;
- for ( QStringList::Iterator it = pdbfiles.begin(); it != pdbfiles.end(); ++it )
+ for ( TQStringList::Iterator it = pdbfiles.begin(); it != pdbfiles.end(); ++it )
{
- QString txtfile=QFileInfo(*it).baseName(true)+CSL1(".txt");
+ TQString txtfile=TQFileInfo(*it).baseName(true)+CSL1(".txt");
DEBUGKPILOT<<"pdbfile="<<*it<<", pdbdir="<<pdburl<<", txtfile="<<txtfile<<", txtdir="<<txturl<<endl;
if (convertPDBtoTXT(pdburl, *it, txturl, txtfile, &conv))
{
@@ -311,11 +311,11 @@ void ConverterDlg::slotToPDB()
bool dir=dlg->fDirectories->isChecked();
- QString txturl=dlg->fTXTDir->url();
- QString pdburl=dlg->fPDBDir->url();
+ TQString txturl=dlg->fTXTDir->url();
+ TQString pdburl=dlg->fPDBDir->url();
- QFileInfo txtinfo(txturl);
- QFileInfo pdbinfo(pdburl);
+ TQFileInfo txtinfo(txturl);
+ TQFileInfo pdbinfo(pdburl);
if (dir)
{
@@ -325,7 +325,7 @@ void ConverterDlg::slotToPDB()
i18n("<qt>You selected to sync folders, "
"but gave a filename instead (<em>%1</em>)."
"<br>Use folder <em>%2</em> instead?</qt>").arg(txturl)
- .arg(txtinfo.dirPath(true)), QString::null, i18n("Use Folder"), KStdGuiItem::cancel());
+ .arg(txtinfo.dirPath(true)), TQString::null, i18n("Use Folder"), KStdGuiItem::cancel());
if (res==KMessageBox::Yes)
{
txturl=txtinfo.dirPath(true);
@@ -351,7 +351,7 @@ void ConverterDlg::slotToPDB()
"but gave a filename instead (<em>%1</em>)."
"<br>Use folder <em>%2</em> instead?</qt>")
.arg(pdburl)
- .arg(pdbinfo.dirPath(true)), QString::null, i18n("Use Folder"), KStdGuiItem::cancel());
+ .arg(pdbinfo.dirPath(true)), TQString::null, i18n("Use Folder"), KStdGuiItem::cancel());
if (res==KMessageBox::Yes) {
pdburl=pdbinfo.dirPath(true);
pdbinfo.setFile(pdburl);
@@ -373,13 +373,13 @@ void ConverterDlg::slotToPDB()
// Now that we have both directories, create the converter object
DEBUGKPILOT<<"Pdbinfo.dir="<<pdbinfo.dir().absPath()<<endl;
DEBUGKPILOT<<"txtinfo.dir="<<txtinfo.dir().absPath()<<endl;
- QStringList txtfiles(txtinfo.dir().entryList(CSL1("*.txt")));
- QStringList converted_Files;
+ TQStringList txtfiles(txtinfo.dir().entryList(CSL1("*.txt")));
+ TQStringList converted_Files;
DEBUGKPILOT<<"Length of filename list: "<<txtfiles.size()<<endl;
- for ( QStringList::Iterator it = txtfiles.begin(); it != txtfiles.end(); ++it )
+ for ( TQStringList::Iterator it = txtfiles.begin(); it != txtfiles.end(); ++it )
{
- QString pdbfile=QFileInfo(*it).baseName(true)+CSL1(".pdb");
+ TQString pdbfile=TQFileInfo(*it).baseName(true)+CSL1(".pdb");
DEBUGKPILOT<<"pdbfile="<<pdbfile<<", pdbdir="<<pdburl<<", txtfile="<<*it<<", txtdir="<<txturl<<endl;
if (convertTXTtoPDB(txturl, *it, pdburl, pdbfile, &conv))
{
@@ -444,19 +444,19 @@ void ConverterDlg::slotDirectories(bool dir)
}
}
-bool ConverterDlg::convertTXTtoPDB(QString txtdir, QString txtfile,
- QString pdbdir, QString pdbfile, DOCConverter*conv)
+bool ConverterDlg::convertTXTtoPDB(TQString txtdir, TQString txtfile,
+ TQString pdbdir, TQString pdbfile, DOCConverter*conv)
{
FUNCTIONSETUP;
bool res=false;
- QFileInfo dbfileinfo(pdbdir, pdbfile);
+ TQFileInfo dbfileinfo(pdbdir, pdbfile);
DEBUGKPILOT<<"Working on file "<<pdbfile<<endl;
if (!dbfileinfo.exists() || !askOverwrite ||
(KMessageBox::Yes==KMessageBox::questionYesNo(this,
i18n("<qt>The database file <em>%1</em> already exists. Overwrite it?</qt>")
- .arg(dbfileinfo.filePath()), QString::null, i18n("Overwrite"), KStdGuiItem::cancel() ) ))
+ .arg(dbfileinfo.filePath()), TQString::null, i18n("Overwrite"), KStdGuiItem::cancel() ) ))
{
- PilotLocalDatabase*pdbdb=new PilotLocalDatabase(pdbdir, QFileInfo(pdbfile).baseName(), false);
+ PilotLocalDatabase*pdbdb=new PilotLocalDatabase(pdbdir, TQFileInfo(pdbfile).baseName(), false);
if (pdbdb)
{
if (!pdbdb->isOpen())
@@ -489,19 +489,19 @@ bool ConverterDlg::convertTXTtoPDB(QString txtdir, QString txtfile,
return res;
}
-bool ConverterDlg::convertPDBtoTXT(QString pdbdir, QString pdbfile,
- QString txtdir, QString txtfile, DOCConverter*conv)
+bool ConverterDlg::convertPDBtoTXT(TQString pdbdir, TQString pdbfile,
+ TQString txtdir, TQString txtfile, DOCConverter*conv)
{
FUNCTIONSETUP;
bool res=false;
- QFileInfo txtfileinfo(txtdir, txtfile);
+ TQFileInfo txtfileinfo(txtdir, txtfile);
DEBUGKPILOT<<"Working on file "<<txtfile<<endl;
if (!txtfileinfo.exists() || !askOverwrite ||
(KMessageBox::Yes==KMessageBox::questionYesNo(this,
i18n("<qt>The text file <em>%1</em> already exists. Overwrite it?</qt>")
- .arg(txtfileinfo.filePath()), QString::null, i18n("Overwrite"), KStdGuiItem::cancel() ) ))
+ .arg(txtfileinfo.filePath()), TQString::null, i18n("Overwrite"), KStdGuiItem::cancel() ) ))
{
- PilotLocalDatabase*pdbdb=new PilotLocalDatabase(pdbdir, QFileInfo(pdbfile).baseName(), false);
+ PilotLocalDatabase*pdbdb=new PilotLocalDatabase(pdbdir, TQFileInfo(pdbfile).baseName(), false);
if (pdbdb)
{
if (pdbdb->isOpen())
diff --git a/kpilot/conduits/docconduit/kpalmdoc_dlg.h b/kpilot/conduits/docconduit/kpalmdoc_dlg.h
index 410b24568..5e9202b00 100644
--- a/kpilot/conduits/docconduit/kpalmdoc_dlg.h
+++ b/kpilot/conduits/docconduit/kpalmdoc_dlg.h
@@ -37,7 +37,7 @@ class ConverterDlg : public KDialogBase
Q_OBJECT
public:
- ConverterDlg( QWidget *parent=0, const QString& caption=0);
+ ConverterDlg( TQWidget *parent=0, const TQString& caption=0);
~ConverterDlg();
protected slots:
@@ -51,10 +51,10 @@ protected:
void readSettings();
// These two functions convert one single file to or from a pdb database
- bool convertTXTtoPDB(QString txtdir, QString txtfile,
- QString pdbdir, QString pdbfile, DOCConverter*conv);
- bool convertPDBtoTXT(QString pdbdir, QString pdbfile,
- QString txtdir, QString txtfile, DOCConverter*conv);
+ bool convertTXTtoPDB(TQString txtdir, TQString txtfile,
+ TQString pdbdir, TQString pdbfile, DOCConverter*conv);
+ bool convertPDBtoTXT(TQString pdbdir, TQString pdbfile,
+ TQString txtdir, TQString txtfile, DOCConverter*conv);
// The actual dialog widget (designer created) holding all controls
diff --git a/kpilot/conduits/docconduit/pilotDOCEntry.h b/kpilot/conduits/docconduit/pilotDOCEntry.h
index b1b9ba45b..4ecaf19a9 100644
--- a/kpilot/conduits/docconduit/pilotDOCEntry.h
+++ b/kpilot/conduits/docconduit/pilotDOCEntry.h
@@ -48,11 +48,11 @@ public:
PilotDOCEntry & operator=(const PilotDOCEntry & e);
- QString getText() {
+ TQString getText() {
fText.Decompress();
- return QString::fromLatin1((const char *) fText.text());
+ return TQString::fromLatin1((const char *) fText.text());
};
- void setText(QString newtext, bool compressed = false) {
+ void setText(TQString newtext, bool compressed = false) {
fText.setText((const unsigned char *) newtext.latin1(),
newtext.length(), compressed);
};
diff --git a/kpilot/conduits/knotes/knotes-action.cc b/kpilot/conduits/knotes/knotes-action.cc
index 905e5ef39..ca3291321 100644
--- a/kpilot/conduits/knotes/knotes-action.cc
+++ b/kpilot/conduits/knotes/knotes-action.cc
@@ -29,8 +29,8 @@
#include "options.h"
-#include <qmap.h>
-#include <qtimer.h>
+#include <tqmap.h>
+#include <tqtimer.h>
#include <kapplication.h>
@@ -63,8 +63,8 @@ unsigned long version_conduit_knotes = Pilot::PLUGIN_API;
}
-typedef QString KNoteID_t;
-typedef const QString &KNoteID_pt;
+typedef TQString KNoteID_t;
+typedef const TQString &KNoteID_pt;
class NoteAndMemo
{
@@ -79,21 +79,21 @@ public:
int memo() const { return memoId; } ;
KNoteID_t note() const { return noteId; } ;
inline bool valid() const { return (memoId>0) && (!noteId.isEmpty()) ; } ;
- QString toString() const { return CSL1("<%1,%2>").arg(noteId).arg(memoId); } ;
+ TQString toString() const { return CSL1("<%1,%2>").arg(noteId).arg(memoId); } ;
- static NoteAndMemo findNote(const QValueList<NoteAndMemo> &,KNoteID_pt note);
- static NoteAndMemo findMemo(const QValueList<NoteAndMemo> &,int memo);
+ static NoteAndMemo findNote(const TQValueList<NoteAndMemo> &,KNoteID_pt note);
+ static NoteAndMemo findMemo(const TQValueList<NoteAndMemo> &,int memo);
protected:
KNoteID_t noteId;
int memoId;
} ;
-NoteAndMemo NoteAndMemo::findNote(const QValueList<NoteAndMemo> &l ,KNoteID_pt note)
+NoteAndMemo NoteAndMemo::findNote(const TQValueList<NoteAndMemo> &l ,KNoteID_pt note)
{
FUNCTIONSETUP;
- for (QValueList<NoteAndMemo>::ConstIterator it = l.begin();
+ for (TQValueList<NoteAndMemo>::ConstIterator it = l.begin();
it != l.end();
++it)
{
@@ -103,11 +103,11 @@ NoteAndMemo NoteAndMemo::findNote(const QValueList<NoteAndMemo> &l ,KNoteID_pt n
return NoteAndMemo();
}
-NoteAndMemo NoteAndMemo::findMemo(const QValueList<NoteAndMemo> &l , int memo)
+NoteAndMemo NoteAndMemo::findMemo(const TQValueList<NoteAndMemo> &l , int memo)
{
FUNCTIONSETUP;
- for (QValueList<NoteAndMemo>::ConstIterator it =l.begin();
+ for (TQValueList<NoteAndMemo>::ConstIterator it =l.begin();
it != l.end();
++it)
{
@@ -158,7 +158,7 @@ public:
//KNotesIface_stub *fKNotes;
// The timer for invoking process() to do some more work.
- QTimer *fTimer;
+ TQTimer *fTimer;
// The database we're working with (MemoDB)
// PilotSerialDatabase *fDatabase;
@@ -175,7 +175,7 @@ public:
// We need to translate between the ids that KNotes uses and
// Pilot id's, so we make a list of pairs.
//
- QValueList<NoteAndMemo> fIdList;
+ TQValueList<NoteAndMemo> fIdList;
// Setting to delete a KNote when the corresponding memo
// has been deleted.
@@ -185,7 +185,7 @@ public:
KNotesAction::KNotesAction(KPilotLink *o,
- const char *n, const QStringList &a) :
+ const char *n, const TQStringList &a) :
ConduitAction(o,n ? n : "knotes-conduit",a),
fP(new KNotesActionPrivate)
{
@@ -220,7 +220,7 @@ KNotesAction::KNotesAction(KPilotLink *o,
return true;
}
- QString e;
+ TQString e;
if (!openKNotesResource()) return false;
// Database names seem to be latin1
@@ -233,13 +233,13 @@ KNotesAction::KNotesAction(KPilotLink *o,
return false;
}
- fP->fTimer = new QTimer(this);
+ fP->fTimer = new TQTimer(this);
fActionStatus = Init;
// this is not needed. As it is done in the initstate in process();
// resetIndexes();
- connect(fP->fTimer,SIGNAL(timeout()),SLOT(process()));
+ connect(fP->fTimer,TQT_SIGNAL(timeout()),TQT_SLOT(process()));
fP->fTimer->start(0,false);
return true;
@@ -257,7 +257,7 @@ bool KNotesAction::openKNotesResource()
KConfig korgcfg( locate( "config", CSL1("korganizerrc") ) );
korgcfg.setGroup( "Time & Date" );
- QString tz(korgcfg.readEntry( "TimeZoneId" ) );
+ TQString tz(korgcfg.readEntry( "TimeZoneId" ) );
fP->fNotesResource = new KCal::CalendarLocal(tz);
KURL mURL = KGlobal::dirs()->saveLocation( "data", "knotes/" ) + "notes.ics";
@@ -395,8 +395,8 @@ void KNotesAction::getConfigInfo()
fP->fDeleteNoteForMemo = KNotesConduitSettings::deleteNoteForMemo();
- QValueList<KNoteID_t> notes;
- QValueList<int> memos;
+ TQValueList<KNoteID_t> notes;
+ TQValueList<int> memos;
// Make this match the type of KNoteID_t !
notes=KNotesConduitSettings::noteIds();
@@ -416,8 +416,8 @@ void KNotesAction::getConfigInfo()
setFirstSync( true );
}
- QValueList<KNoteID_t>::ConstIterator iNotes = notes.begin();
- QValueList<int>::ConstIterator iMemos = memos.begin();
+ TQValueList<KNoteID_t>::ConstIterator iNotes = notes.begin();
+ TQValueList<int>::ConstIterator iMemos = memos.begin();
while((iNotes != notes.end()) && (iMemos != memos.end()))
{
@@ -465,7 +465,7 @@ bool KNotesAction::modifyNoteOnPilot()
if (nm.valid())
{
- QString text,title,body;
+ TQString text,title,body;
title = fP->fIndex.data();
body = fP->fKNotes->text(fP->fIndex.key());
if (body.startsWith(title))
@@ -517,7 +517,7 @@ bool KNotesAction::deleteNoteOnPilot()
FUNCTIONSETUP;
/*
- QValueList<NoteAndMemo>::Iterator i = fP->fIdList.begin();
+ TQValueList<NoteAndMemo>::Iterator i = fP->fIdList.begin();
while ( i != fP->fIdList.end() )
{
// TODO DCOP_REMOVE
@@ -732,7 +732,7 @@ int KNotesAction::addNoteToPilot()
<< endl;
#endif
- QString text = j->summary() + CSL1("\n");
+ TQString text = j->summary() + CSL1("\n");
text.append( j->description() );
//TODO DCOP_REMOVAL
//text.append(fP->fKNotes->text(fP->fIndex.key()));
@@ -775,10 +775,10 @@ void KNotesAction::cleanupMemos()
<< endl;
#endif
- QValueList<KNoteID_t> notes;
- QValueList<int> memos;
+ TQValueList<KNoteID_t> notes;
+ TQValueList<int> memos;
- for (QValueList<NoteAndMemo>::ConstIterator i =
+ for (TQValueList<NoteAndMemo>::ConstIterator i =
fP->fIdList.begin();
i!=fP->fIdList.end();
++i)
@@ -846,7 +846,7 @@ void KNotesAction::cleanupMemos()
}
-/* virtual */ QString KNotesAction::statusString() const
+/* virtual */ TQString KNotesAction::statusString() const
{
switch(fActionStatus)
{
diff --git a/kpilot/conduits/knotes/knotes-action.h b/kpilot/conduits/knotes/knotes-action.h
index 695e90747..eb490e0a7 100644
--- a/kpilot/conduits/knotes/knotes-action.h
+++ b/kpilot/conduits/knotes/knotes-action.h
@@ -41,7 +41,7 @@ public:
KNotesAction(
KPilotLink *o,
const char *n = 0L,
- const QStringList &a = QStringList() );
+ const TQStringList &a = TQStringList() );
virtual ~KNotesAction();
enum Status { Init,
@@ -51,7 +51,7 @@ public:
MemosToKNotes,
Cleanup,
Done } ;
- virtual QString statusString() const;
+ virtual TQString statusString() const;
protected:
virtual bool exec();
diff --git a/kpilot/conduits/knotes/knotes-factory.cc b/kpilot/conduits/knotes/knotes-factory.cc
index a919e1ed1..9601e81e5 100644
--- a/kpilot/conduits/knotes/knotes-factory.cc
+++ b/kpilot/conduits/knotes/knotes-factory.cc
@@ -57,7 +57,7 @@ void *init_conduit_knotes()
/* static */ KAboutData *KNotesConduitFactory::fAbout = 0L;
-KNotesConduitFactory::KNotesConduitFactory(QObject *p, const char *n) :
+KNotesConduitFactory::KNotesConduitFactory(TQObject *p, const char *n) :
KLibFactory(p,n)
{
FUNCTIONSETUP;
@@ -85,10 +85,10 @@ KNotesConduitFactory::~KNotesConduitFactory()
KPILOT_DELETE(fAbout);
}
-/* virtual */ QObject *KNotesConduitFactory::createObject( QObject *p,
+/* virtual */ TQObject *KNotesConduitFactory::createObject( TQObject *p,
const char *n,
const char *c,
- const QStringList &a)
+ const TQStringList &a)
{
FUNCTIONSETUP;
@@ -101,7 +101,7 @@ KNotesConduitFactory::~KNotesConduitFactory()
if (qstrcmp(c,"ConduitConfigBase")==0)
{
- QWidget *w = dynamic_cast<QWidget *>(p);
+ TQWidget *w = dynamic_cast<TQWidget *>(p);
if (w)
{
return new KNotesConfigBase(w,0L);
diff --git a/kpilot/conduits/knotes/knotes-factory.h b/kpilot/conduits/knotes/knotes-factory.h
index 94ad44429..02b0f6102 100644
--- a/kpilot/conduits/knotes/knotes-factory.h
+++ b/kpilot/conduits/knotes/knotes-factory.h
@@ -39,7 +39,7 @@ class KNotesConduitFactory : public KLibFactory
Q_OBJECT
public:
- KNotesConduitFactory(QObject * = 0L,const char * = 0L);
+ KNotesConduitFactory(TQObject * = 0L,const char * = 0L);
virtual ~KNotesConduitFactory();
static KAboutData *about() { return fAbout; } ;
@@ -50,10 +50,10 @@ public:
// break its value. We store group and entry keys in here.
protected:
- virtual QObject* createObject( QObject* parent = 0,
+ virtual TQObject* createObject( TQObject* parent = 0,
const char* name = 0,
- const char* classname = "QObject",
- const QStringList &args = QStringList() );
+ const char* classname = "TQObject",
+ const TQStringList &args = TQStringList() );
private:
KInstance *fInstance;
static KAboutData *fAbout;
diff --git a/kpilot/conduits/knotes/knotes-setup.cc b/kpilot/conduits/knotes/knotes-setup.cc
index da8b31c48..1127011ad 100644
--- a/kpilot/conduits/knotes/knotes-setup.cc
+++ b/kpilot/conduits/knotes/knotes-setup.cc
@@ -28,10 +28,10 @@
#include "options.h"
-#include <qtabwidget.h>
-#include <qcheckbox.h>
-#include <qmap.h>
-#include <qtimer.h>
+#include <tqtabwidget.h>
+#include <tqcheckbox.h>
+#include <tqmap.h>
+#include <tqtimer.h>
#include <kapplication.h>
#include <kconfig.h>
@@ -43,19 +43,19 @@
#include "knotesconduitSettings.h"
-KNotesConfigBase::KNotesConfigBase(QWidget *w, const char *n) :
+KNotesConfigBase::KNotesConfigBase(TQWidget *w, const char *n) :
ConduitConfigBase(w,n),
fConfigWidget(0L)
{
fConfigWidget = new KNotesWidget(w);
ConduitConfigBase::addAboutPage(fConfigWidget->tabWidget,KNotesConduitFactory::about());
fWidget = fConfigWidget;
- QObject::connect(fConfigWidget->fDeleteNoteForMemo,SIGNAL(clicked()),
- this,SLOT(modified()));
- QObject::connect(fConfigWidget->fSuppressConfirm,SIGNAL(clicked()),
- this,SLOT(modified()));
- QObject::connect(fConfigWidget->fDeleteNoteForMemo,SIGNAL(toggled(bool)),
- fConfigWidget->fSuppressConfirm,SLOT(setEnabled(bool)));
+ TQObject::connect(fConfigWidget->fDeleteNoteForMemo,TQT_SIGNAL(clicked()),
+ this,TQT_SLOT(modified()));
+ TQObject::connect(fConfigWidget->fSuppressConfirm,TQT_SIGNAL(clicked()),
+ this,TQT_SLOT(modified()));
+ TQObject::connect(fConfigWidget->fDeleteNoteForMemo,TQT_SIGNAL(toggled(bool)),
+ fConfigWidget->fSuppressConfirm,TQT_SLOT(setEnabled(bool)));
fConduitName=i18n("KNotes");
}
@@ -76,7 +76,7 @@ void KNotesConfigBase::load()
unmodified();
}
-/* static */ ConduitConfigBase *KNotesConfigBase::create(QWidget *w, const char *n)
+/* static */ ConduitConfigBase *KNotesConfigBase::create(TQWidget *w, const char *n)
{
return new KNotesConfigBase(w,n);
}
diff --git a/kpilot/conduits/knotes/knotes-setup.h b/kpilot/conduits/knotes/knotes-setup.h
index 9e7603df7..652f22238 100644
--- a/kpilot/conduits/knotes/knotes-setup.h
+++ b/kpilot/conduits/knotes/knotes-setup.h
@@ -36,12 +36,12 @@ class KNotesWidget;
class KNotesConfigBase : public ConduitConfigBase
{
public:
- KNotesConfigBase(QWidget *parent, const char *name);
+ KNotesConfigBase(TQWidget *parent, const char *name);
virtual void commit();
virtual void load();
- static ConduitConfigBase *create(QWidget *p, const char *n);
+ static ConduitConfigBase *create(TQWidget *p, const char *n);
private:
KNotesWidget *fConfigWidget;
} ;
diff --git a/kpilot/conduits/malconduit/mal-conduit.cc b/kpilot/conduits/malconduit/mal-conduit.cc
index 73a77a141..95c4d64b5 100644
--- a/kpilot/conduits/malconduit/mal-conduit.cc
+++ b/kpilot/conduits/malconduit/mal-conduit.cc
@@ -34,7 +34,7 @@
#include "options.h"
-#include <qregexp.h>
+#include <tqregexp.h>
#include <kconfig.h>
#include <kdebug.h>
@@ -109,7 +109,7 @@ static int32 cbItem (void */*out*/,
MALConduit::MALConduit(KPilotLink * o,
const char *n,
- const QStringList & a) :
+ const TQStringList & a) :
ConduitAction(o, n, a)
{
FUNCTIONSETUP;
@@ -144,7 +144,7 @@ void MALConduit::readConfig()
void MALConduit::saveConfig()
{
FUNCTIONSETUP;
- MALConduitSettings::setLastMALSync( QDateTime::currentDateTime() );
+ MALConduitSettings::setLastMALSync( TQDateTime::currentDateTime() );
MALConduitSettings::self()->writeConfig();
}
@@ -152,8 +152,8 @@ void MALConduit::saveConfig()
bool MALConduit::skip()
{
- QDateTime now=QDateTime::currentDateTime();
- QDateTime lastSync=MALConduitSettings::lastMALSync();
+ TQDateTime now=TQDateTime::currentDateTime();
+ TQDateTime lastSync=MALConduitSettings::lastMALSync();
if (!lastSync.isValid() || !now.isValid()) return false;
@@ -203,9 +203,9 @@ bool MALConduit::skip()
return false;
}
- QString proxyServer( MALConduitSettings::proxyServer() );
+ TQString proxyServer( MALConduitSettings::proxyServer() );
int proxyPort( MALConduitSettings::proxyPort() );
- QString syncMessage;
+ TQString syncMessage;
bool canContinue = true;
// Set all proxy settings
switch (MALConduitSettings::proxyType())
@@ -222,7 +222,7 @@ bool MALConduit::skip()
#ifdef DEBUG
DEBUGKPILOT<<" Using HTTP proxy server \""<<proxyServer<<
"\", Port "<<proxyPort<<", User "<<MALConduitSettings::proxyUser()<<
- ", Password "<<( (MALConduitSettings::proxyPassword().isEmpty())?QString("not "):QString())<<"set"
+ ", Password "<<( (MALConduitSettings::proxyPassword().isEmpty())?TQString("not "):TQString())<<"set"
<<endl;
#endif
#ifdef LIBMAL20
@@ -261,7 +261,7 @@ bool MALConduit::skip()
}
syncMessage = i18n("Using SOCKS proxy: %1").arg(proxyServer);
#ifdef DEBUG
- DEBUGKPILOT<<" Using SOCKS proxy server \""<<proxyServer<<"\", Port "<<proxyPort<<", User "<<MALConduitSettings::proxyUser()<<", Password "<<( (MALConduitSettings::proxyPassword().isEmpty())?QString("not "):QString() )<<"set"<<endl;
+ DEBUGKPILOT<<" Using SOCKS proxy server \""<<proxyServer<<"\", Port "<<proxyPort<<", User "<<MALConduitSettings::proxyUser()<<", Password "<<( (MALConduitSettings::proxyPassword().isEmpty())?TQString("not "):TQString() )<<"set"<<endl;
#endif
#ifdef LIBMAL20
setSocksProxy( const_cast<char *>(proxyServer.latin1()) );
@@ -304,13 +304,13 @@ bool MALConduit::skip()
return delayDone();
}
-void MALConduit::printLogMessage(QString msg)
+void MALConduit::printLogMessage(TQString msg)
{
FUNCTIONSETUP;
// Remove the pseudo-progressbar:
- QString newmsg(msg);
- newmsg.replace( QRegExp("^\\s*\\.*\\s*"), "");
- newmsg.replace( QRegExp("\\s*\\.*\\s*$"), "");
+ TQString newmsg(msg);
+ newmsg.replace( TQRegExp("^\\s*\\.*\\s*"), "");
+ newmsg.replace( TQRegExp("\\s*\\.*\\s*$"), "");
if (newmsg.length()>0)
{
emit logMessage(newmsg);
diff --git a/kpilot/conduits/malconduit/mal-conduit.h b/kpilot/conduits/malconduit/mal-conduit.h
index 83f72ace1..3f5c14a04 100644
--- a/kpilot/conduits/malconduit/mal-conduit.h
+++ b/kpilot/conduits/malconduit/mal-conduit.h
@@ -42,9 +42,9 @@ public:
MALConduit(
KPilotLink *o,
const char *n = 0L,
- const QStringList &a = QStringList() );
+ const TQStringList &a = TQStringList() );
virtual ~MALConduit();
- void printLogMessage(QString msg);
+ void printLogMessage(TQString msg);
virtual bool exec();
protected:
diff --git a/kpilot/conduits/malconduit/mal-factory.cc b/kpilot/conduits/malconduit/mal-factory.cc
index f9a8bcafb..3e363d269 100644
--- a/kpilot/conduits/malconduit/mal-factory.cc
+++ b/kpilot/conduits/malconduit/mal-factory.cc
@@ -60,7 +60,7 @@ unsigned long version_conduit_mal = Pilot::PLUGIN_API;
//
KAboutData *MALConduitFactory::fAbout = 0L;
-MALConduitFactory::MALConduitFactory(QObject *p, const char *n) :
+MALConduitFactory::MALConduitFactory(TQObject *p, const char *n) :
KLibFactory(p,n)
{
FUNCTIONSETUP;
@@ -90,10 +90,10 @@ MALConduitFactory::~MALConduitFactory()
KPILOT_DELETE(fAbout);
}
-/* virtual */ QObject *MALConduitFactory::createObject( QObject *p,
+/* virtual */ TQObject *MALConduitFactory::createObject( TQObject *p,
const char *n,
const char *c,
- const QStringList &a)
+ const TQStringList &a)
{
FUNCTIONSETUP;
@@ -106,7 +106,7 @@ MALConduitFactory::~MALConduitFactory()
if (qstrcmp(c,"ConduitConfigBase")==0)
{
- QWidget *w = dynamic_cast<QWidget *>(p);
+ TQWidget *w = dynamic_cast<TQWidget *>(p);
if (w)
{
diff --git a/kpilot/conduits/malconduit/mal-factory.h b/kpilot/conduits/malconduit/mal-factory.h
index 82631e1ac..a15316381 100644
--- a/kpilot/conduits/malconduit/mal-factory.h
+++ b/kpilot/conduits/malconduit/mal-factory.h
@@ -42,16 +42,16 @@ class MALConduitFactory : public KLibFactory
Q_OBJECT
public:
- MALConduitFactory(QObject * = 0L,const char * = 0L);
+ MALConduitFactory(TQObject * = 0L,const char * = 0L);
virtual ~MALConduitFactory();
static KAboutData *about() { return fAbout; } ;
protected:
- virtual QObject* createObject( QObject* parent = 0,
+ virtual TQObject* createObject( TQObject* parent = 0,
const char* name = 0,
- const char* classname = "QObject",
- const QStringList &args = QStringList() );
+ const char* classname = "TQObject",
+ const TQStringList &args = TQStringList() );
private:
KInstance *fInstance;
static KAboutData *fAbout;
diff --git a/kpilot/conduits/malconduit/mal-setup.cc b/kpilot/conduits/malconduit/mal-setup.cc
index d2652b035..1d1f89ff2 100644
--- a/kpilot/conduits/malconduit/mal-setup.cc
+++ b/kpilot/conduits/malconduit/mal-setup.cc
@@ -32,11 +32,11 @@
#include "options.h"
-#include <qtabwidget.h>
-#include <qradiobutton.h>
-#include <qbuttongroup.h>
-#include <qlineedit.h>
-#include <qcheckbox.h>
+#include <tqtabwidget.h>
+#include <tqradiobutton.h>
+#include <tqbuttongroup.h>
+#include <tqlineedit.h>
+#include <tqcheckbox.h>
#include <kcombobox.h>
#include <knuminput.h>
@@ -53,7 +53,7 @@
#include "malconduitSettings.h"
-MALWidgetSetup::MALWidgetSetup(QWidget *w, const char *n) :
+MALWidgetSetup::MALWidgetSetup(TQWidget *w, const char *n) :
ConduitConfigBase(w,n),
fConfigWidget(new MALWidget(w))
{
@@ -65,21 +65,21 @@ MALWidgetSetup::MALWidgetSetup(QWidget *w, const char *n) :
fConfigWidget->tabWidget->adjustSize();
fConfigWidget->resize(fConfigWidget->tabWidget->size());
-#define CM(a,b) connect(fConfigWidget->a,b,this,SLOT(modified()));
- CM( syncTime, SIGNAL(clicked(int)) );
- CM( proxyType, SIGNAL(clicked(int)) );
-
- CM( proxyServerName, SIGNAL(textChanged(const QString &)) );
- CM( proxyCustomPortCheck, SIGNAL(clicked()) );
- CM( proxyCustomPort, SIGNAL(valueChanged(int)) );
- CM( proxyUserName, SIGNAL(textChanged(const QString &)) );
- CM( proxyPassword, SIGNAL(textChanged(const QString &)) );
-
- CM( malServerName, SIGNAL(textChanged(const QString &)) );
- CM( malCustomPortCheck, SIGNAL(clicked()) );
- CM( malCustomPort, SIGNAL(valueChanged(int)) );
- CM( malUserName, SIGNAL(textChanged(const QString &)) );
- CM( malPassword, SIGNAL(textChanged(const QString &)) );
+#define CM(a,b) connect(fConfigWidget->a,b,this,TQT_SLOT(modified()));
+ CM( syncTime, TQT_SIGNAL(clicked(int)) );
+ CM( proxyType, TQT_SIGNAL(clicked(int)) );
+
+ CM( proxyServerName, TQT_SIGNAL(textChanged(const TQString &)) );
+ CM( proxyCustomPortCheck, TQT_SIGNAL(clicked()) );
+ CM( proxyCustomPort, TQT_SIGNAL(valueChanged(int)) );
+ CM( proxyUserName, TQT_SIGNAL(textChanged(const TQString &)) );
+ CM( proxyPassword, TQT_SIGNAL(textChanged(const TQString &)) );
+
+ CM( malServerName, TQT_SIGNAL(textChanged(const TQString &)) );
+ CM( malCustomPortCheck, TQT_SIGNAL(clicked()) );
+ CM( malCustomPort, TQT_SIGNAL(valueChanged(int)) );
+ CM( malUserName, TQT_SIGNAL(textChanged(const TQString &)) );
+ CM( malPassword, TQT_SIGNAL(textChanged(const TQString &)) );
#undef CM
}
@@ -150,7 +150,7 @@ MALWidgetSetup::~MALWidgetSetup()
fConfigWidget->proxyCustomPort->setValue(proxyPortNr);
}
fConfigWidget->proxyUserName->setText(MALConduitSettings::proxyUser());
- fConfigWidget->proxyPassword->setText(QString::null);
+ fConfigWidget->proxyPassword->setText(TQString::null);
fConfigWidget->proxyPassword->insert(MALConduitSettings::proxyPassword());
#ifdef DEBUG
@@ -178,7 +178,7 @@ MALWidgetSetup::~MALWidgetSetup()
unmodified();
}
-/* static */ ConduitConfigBase *MALWidgetSetup::create(QWidget *w, const char *n)
+/* static */ ConduitConfigBase *MALWidgetSetup::create(TQWidget *w, const char *n)
{
return new MALWidgetSetup(w,n);
}
diff --git a/kpilot/conduits/malconduit/mal-setup.h b/kpilot/conduits/malconduit/mal-setup.h
index 78b6a0ee2..6a6337496 100644
--- a/kpilot/conduits/malconduit/mal-setup.h
+++ b/kpilot/conduits/malconduit/mal-setup.h
@@ -41,11 +41,11 @@ class MALWidgetSetup : public ConduitConfigBase
{
Q_OBJECT
public:
- MALWidgetSetup(QWidget *,const char *);
+ MALWidgetSetup(TQWidget *,const char *);
virtual ~MALWidgetSetup();
virtual void load();
virtual void commit();
- static ConduitConfigBase *create(QWidget *, const char *);
+ static ConduitConfigBase *create(TQWidget *, const char *);
private:
MALWidget *fConfigWidget;
} ;
diff --git a/kpilot/conduits/memofileconduit/memofile-conduit.cc b/kpilot/conduits/memofileconduit/memofile-conduit.cc
index 1dc5fe386..7c2402eaf 100644
--- a/kpilot/conduits/memofileconduit/memofile-conduit.cc
+++ b/kpilot/conduits/memofileconduit/memofile-conduit.cc
@@ -41,9 +41,9 @@
#include "pilotMemo.h"
-#include <qfile.h>
-#include <qdir.h>
-#include <qtextcodec.h>
+#include <tqfile.h>
+#include <tqdir.h>
+#include <tqtextcodec.h>
#include <kconfig.h>
#include <kdebug.h>
@@ -60,9 +60,9 @@
*/
MemofileConduit::MemofileConduit(KPilotLink *d,
const char *n,
- const QStringList &l) :
+ const TQStringList &l) :
ConduitAction(d,n,l),
- _DEFAULT_MEMODIR(QDir::homeDirPath() + CSL1("/MyMemos")),
+ _DEFAULT_MEMODIR(TQDir::homeDirPath() + CSL1("/MyMemos")),
fMemoAppInfo(0L),
_memofiles(0L)
{
@@ -145,7 +145,7 @@ bool MemofileConduit::readConfig()
{
FUNCTIONSETUP;
- QString dir(MemofileConduitSettings::directory());
+ TQString dir(MemofileConduitSettings::directory());
if (dir.isEmpty()) {
dir = _DEFAULT_MEMODIR;
@@ -235,7 +235,7 @@ bool MemofileConduit::loadPilotCategories()
fCategories.clear();
- QString _category_name;
+ TQString _category_name;
int _category_id=0;
int _category_num=0;
@@ -378,7 +378,7 @@ void MemofileConduit::listPilotMemos()
PilotMemo *memo;
for ( memo = fMemoList.first(); memo; memo = fMemoList.next() ) {
- QString _category_name = fCategories[memo->category()];
+ TQString _category_name = fCategories[memo->category()];
DEBUGKPILOT << fConduitName
<< ": listing record id: [" << memo->id()
@@ -421,7 +421,7 @@ bool MemofileConduit::copyPCToHH()
_memofiles->load(true);
- QPtrList<Memofile> memofiles = _memofiles->getAll();
+ TQPtrList<Memofile> memofiles = _memofiles->getAll();
Memofile * memofile;
@@ -484,7 +484,7 @@ int MemofileConduit::writeToPilot(Memofile * memofile)
memofile->setID(newid);
- QString status;
+ TQString status;
if (oldid <=0) {
fCtrHH->created();
status = "new to pilot";
@@ -534,7 +534,7 @@ bool MemofileConduit::sync()
_memofiles->addModifiedMemo(memo);
}
- QPtrList<Memofile> memofiles = _memofiles->getModified();
+ TQPtrList<Memofile> memofiles = _memofiles->getModified();
Memofile *memofile;
for ( memofile = memofiles.first(); memofile; memofile = memofiles.next() ) {
diff --git a/kpilot/conduits/memofileconduit/memofile-conduit.h b/kpilot/conduits/memofileconduit/memofile-conduit.h
index 08fdbd0f7..c79506611 100644
--- a/kpilot/conduits/memofileconduit/memofile-conduit.h
+++ b/kpilot/conduits/memofileconduit/memofile-conduit.h
@@ -40,7 +40,7 @@ Q_OBJECT
public:
MemofileConduit(KPilotLink *,
const char *name=0L,
- const QStringList &args = QStringList());
+ const TQStringList &args = TQStringList());
virtual ~MemofileConduit();
protected:
@@ -57,7 +57,7 @@ private:
bool _sync_private;
PilotMemoInfo *fMemoAppInfo;
- QPtrList<PilotMemo> fMemoList;
+ TQPtrList<PilotMemo> fMemoList;
// our categories
MemoCategoryMap fCategories;
diff --git a/kpilot/conduits/memofileconduit/memofile-factory.cc b/kpilot/conduits/memofileconduit/memofile-factory.cc
index e373a0185..795edc33d 100644
--- a/kpilot/conduits/memofileconduit/memofile-factory.cc
+++ b/kpilot/conduits/memofileconduit/memofile-factory.cc
@@ -28,9 +28,9 @@
#include "options.h"
-#include <qtabwidget.h>
-#include <qlineedit.h>
-#include <qcheckbox.h>
+#include <tqtabwidget.h>
+#include <tqlineedit.h>
+#include <tqcheckbox.h>
#include <kconfig.h>
#include <kinstance.h>
@@ -46,14 +46,14 @@
class MemofileConduitConfig : public ConduitConfigBase
{
public:
- MemofileConduitConfig(QWidget *parent=0L, const char *n=0L);
+ MemofileConduitConfig(TQWidget *parent=0L, const char *n=0L);
virtual void commit();
virtual void load();
protected:
MemofileWidget *fConfigWidget;
} ;
-MemofileConduitConfig::MemofileConduitConfig(QWidget *p, const char *n) :
+MemofileConduitConfig::MemofileConduitConfig(TQWidget *p, const char *n) :
ConduitConfigBase(p,n),
fConfigWidget(new MemofileWidget(p))
{
@@ -72,10 +72,10 @@ MemofileConduitConfig::MemofileConduitConfig(QWidget *p, const char *n) :
ConduitConfigBase::addAboutPage(fConfigWidget->tabWidget,about);
fWidget=fConfigWidget;
- QObject::connect(fConfigWidget->fDirectory,SIGNAL(textChanged(const QString&)),
- this,SLOT(modified()));
- QObject::connect(fConfigWidget->fSyncPrivate,SIGNAL(toggled(bool)),
- this,SLOT(modified()));
+ TQObject::connect(fConfigWidget->fDirectory,TQT_SIGNAL(textChanged(const TQString&)),
+ this,TQT_SLOT(modified()));
+ TQObject::connect(fConfigWidget->fSyncPrivate,TQT_SIGNAL(toggled(bool)),
+ this,TQT_SLOT(modified()));
}
diff --git a/kpilot/conduits/memofileconduit/memofile.cc b/kpilot/conduits/memofileconduit/memofile.cc
index 1428c487d..3a7ff6c3a 100644
--- a/kpilot/conduits/memofileconduit/memofile.cc
+++ b/kpilot/conduits/memofileconduit/memofile.cc
@@ -27,7 +27,7 @@
#include "memofile.h"
-Memofile::Memofile(PilotMemo * memo, QString categoryName, QString fileName, QString baseDirectory) :
+Memofile::Memofile(PilotMemo * memo, TQString categoryName, TQString fileName, TQString baseDirectory) :
PilotMemo(memo,memo->text()), _categoryName(categoryName), _filename(fileName), _baseDirectory(baseDirectory)
{
_lastModified = 0;
@@ -36,7 +36,7 @@ Memofile::Memofile(PilotMemo * memo, QString categoryName, QString fileName, QSt
}
Memofile::Memofile(recordid_t id, int category, uint lastModifiedTime, uint size,
- QString categoryName, QString fileName, QString baseDirectory) :
+ TQString categoryName, TQString fileName, TQString baseDirectory) :
PilotMemo(), _categoryName(categoryName),
_filename(fileName),_baseDirectory(baseDirectory)
{
@@ -47,7 +47,7 @@ Memofile::Memofile(recordid_t id, int category, uint lastModifiedTime, uint size
_modified = _modifiedByPalm = false;
}
-Memofile::Memofile(int category, QString categoryName, QString fileName, QString baseDirectory) :
+Memofile::Memofile(int category, TQString categoryName, TQString fileName, TQString baseDirectory) :
PilotMemo(),
_categoryName(categoryName), _filename(fileName), _baseDirectory(baseDirectory)
{
@@ -70,7 +70,7 @@ bool Memofile::load()
return false;
}
- QFile f( filenameAbs() );
+ TQFile f( filenameAbs() );
if ( !f.open( IO_ReadOnly ) ) {
DEBUGKPILOT << fname
<< ": Couldn't open file: [" << filenameAbs() << "] to read. "
@@ -78,9 +78,9 @@ bool Memofile::load()
return false;
}
- QTextStream ts( &f );
+ TQTextStream ts( &f );
- QString text,title,body;
+ TQString text,title,body;
title = filename();
body = ts.read();
@@ -136,7 +136,7 @@ bool Memofile::deleteFile()
FUNCTIONSETUP;
DEBUGKPILOT << fname
<< ": deleting file: [" << filenameAbs() << "]." << endl;
- return QFile::remove(filenameAbs());
+ return TQFile::remove(filenameAbs());
}
@@ -156,7 +156,7 @@ bool Memofile::saveFile()
<< filenameAbs() << "]" << endl;
- QFile f( filenameAbs() );
+ TQFile f( filenameAbs() );
if ( !f.open( IO_WriteOnly ) ) {
DEBUGKPILOT << fname
<< ": Couldn't open file: [" << filenameAbs() << "] to write your memo to. "
@@ -164,7 +164,7 @@ bool Memofile::saveFile()
return false;
}
- QTextStream stream(&f);
+ TQTextStream stream(&f);
stream << text() << endl;
f.close();
@@ -226,14 +226,14 @@ bool Memofile::isModifiedBySize()
uint Memofile::getFileLastModified()
{
- QFileInfo f = QFileInfo(filenameAbs());
+ TQFileInfo f = TQFileInfo(filenameAbs());
uint lastModifiedTime = f.lastModified().toTime_t();
return lastModifiedTime;
}
uint Memofile::getFileSize()
{
- QFileInfo f = QFileInfo(filenameAbs());
+ TQFileInfo f = TQFileInfo(filenameAbs());
uint size = f.size();
return size;
}
diff --git a/kpilot/conduits/memofileconduit/memofile.h b/kpilot/conduits/memofileconduit/memofile.h
index 27931cdfe..4bd5fb776 100644
--- a/kpilot/conduits/memofileconduit/memofile.h
+++ b/kpilot/conduits/memofileconduit/memofile.h
@@ -40,10 +40,10 @@
#include <pi-memo.h>
-#include <qfile.h>
-#include <qdir.h>
-#include <qtextstream.h>
-#include <qtextcodec.h>
+#include <tqfile.h>
+#include <tqdir.h>
+#include <tqtextstream.h>
+#include <tqtextcodec.h>
#include "pilotMemo.h"
@@ -55,9 +55,9 @@
class Memofile : public PilotMemo
{
public:
- Memofile(PilotMemo * memo, QString categoryName, QString fileName, QString baseDirectory);
- Memofile(recordid_t id, int category, uint lastModifiedTime, uint size, QString categoryName, QString filename, QString baseDirectory);
- Memofile(int category, QString categoryName, QString fileName, QString baseDirectory);
+ Memofile(PilotMemo * memo, TQString categoryName, TQString fileName, TQString baseDirectory);
+ Memofile(recordid_t id, int category, uint lastModifiedTime, uint size, TQString categoryName, TQString filename, TQString baseDirectory);
+ Memofile(int category, TQString categoryName, TQString fileName, TQString baseDirectory);
uint lastModified() const { return _lastModified; } ;
uint size() const { return _size; } ;
@@ -72,30 +72,30 @@ class Memofile : public PilotMemo
bool load();
- bool fileExists() { return QFile::exists(filenameAbs()); } ;
+ bool fileExists() { return TQFile::exists(filenameAbs()); } ;
void setID(recordid_t id);
bool save();
bool deleteFile();
- QString toString() {
- return CSL1("id: [") + QString::number(id())
+ TQString toString() {
+ return CSL1("id: [") + TQString::number(id())
+ CSL1("], category:[") + _categoryName
+ CSL1("], filename: [") + _filename + CSL1("]");
} ;
- const QString & getCategoryName() { return _categoryName; } ;
- const QString & getFilename() { return _filename; } ;
- const QString & filename() { return _filename; } ;
+ const TQString & getCategoryName() { return _categoryName; } ;
+ const TQString & getFilename() { return _filename; } ;
+ const TQString & filename() { return _filename; } ;
private:
bool saveFile();
bool isModifiedByTimestamp();
bool isModifiedBySize();
- QString filenameAbs() { return dirName() + filename(); } ;
- QString dirName() { return _baseDirectory + QDir::separator() + _categoryName + QDir::separator(); } ;
- bool setCategory(const QString &label);
+ TQString filenameAbs() { return dirName() + filename(); } ;
+ TQString dirName() { return _baseDirectory + TQDir::separator() + _categoryName + TQDir::separator(); } ;
+ bool setCategory(const TQString &label);
uint getFileLastModified();
uint getFileSize();
@@ -105,9 +105,9 @@ class Memofile : public PilotMemo
uint _lastModified;
uint _size;
- QString _categoryName;
- QString _filename;
- QString _baseDirectory;
+ TQString _categoryName;
+ TQString _filename;
+ TQString _baseDirectory;
} ;
#endif
diff --git a/kpilot/conduits/memofileconduit/memofiles.cc b/kpilot/conduits/memofileconduit/memofiles.cc
index 2846d448b..db3d8cacc 100644
--- a/kpilot/conduits/memofileconduit/memofiles.cc
+++ b/kpilot/conduits/memofileconduit/memofiles.cc
@@ -30,17 +30,17 @@
#include "memofiles.h"
#include "memofile.h"
-QString Memofiles::FIELD_SEP = CSL1("\t");
+TQString Memofiles::FIELD_SEP = CSL1("\t");
Memofiles::Memofiles (MemoCategoryMap & categories, PilotMemoInfo &appInfo,
- QString & baseDirectory, CUDCounter &fCtrPC) :
+ TQString & baseDirectory, CUDCounter &fCtrPC) :
_categories(categories), _memoAppInfo(appInfo),
_baseDirectory(baseDirectory), _cudCounter(fCtrPC)
{
FUNCTIONSETUP;
_memofiles.clear();
- _memoMetadataFile = _baseDirectory + QDir::separator() + CSL1(".ids");
- _categoryMetadataFile = _baseDirectory + QDir::separator() + CSL1(".categories");
+ _memoMetadataFile = _baseDirectory + TQDir::separator() + CSL1(".ids");
+ _categoryMetadataFile = _baseDirectory + TQDir::separator() + CSL1(".categories");
_memofiles.setAutoDelete(true);
_ready = ensureDirectoryReady();
@@ -67,10 +67,10 @@ void Memofiles::load (bool loadAll)
for ( it = _categories.begin(); it != _categories.end(); ++it ) {
int category = it.key();
- QString categoryName = it.data();
- QString categoryDirname = _baseDirectory + QDir::separator() + categoryName;
+ TQString categoryName = it.data();
+ TQString categoryDirname = _baseDirectory + TQDir::separator() + categoryName;
- QDir dir = QDir(categoryDirname);
+ TQDir dir = TQDir(categoryDirname);
if (! dir.exists() ) {
DEBUGKPILOT << fname
<< ": category directory: [" << categoryDirname
@@ -79,11 +79,11 @@ void Memofiles::load (bool loadAll)
}
- QStringList entries = dir.entryList(QDir::Files);
- QString file;
- for(QStringList::Iterator it = entries.begin(); it != entries.end(); ++it) {
+ TQStringList entries = dir.entryList(TQDir::Files);
+ TQString file;
+ for(TQStringList::Iterator it = entries.begin(); it != entries.end(); ++it) {
file = *it;
- QFileInfo info(dir, file);
+ TQFileInfo info(dir, file);
if(info.isFile() && info.isReadable()) {
// DEBUGKPILOT << fname
@@ -151,13 +151,13 @@ bool Memofiles::ensureDirectoryReady()
int failures = 0;
// now make sure that a directory for each category exists.
- QString _category_name;
- QString dir;
+ TQString _category_name;
+ TQString dir;
MemoCategoryMap::Iterator it;
for ( it = _categories.begin(); it != _categories.end(); ++it ) {
_category_name = it.data();
- dir = _baseDirectory + QDir::separator() + _category_name;
+ dir = _baseDirectory + TQDir::separator() + _category_name;
DEBUGKPILOT << fname
<< ": checking directory: [" << dir << "]" << endl;
@@ -169,12 +169,12 @@ bool Memofiles::ensureDirectoryReady()
return failures == 0;
}
-bool Memofiles::checkDirectory(QString & dir)
+bool Memofiles::checkDirectory(TQString & dir)
{
FUNCTIONSETUP;
// make sure that the directory we're asked to write to exists
- QDir d(dir);
- QFileInfo fid( dir );
+ TQDir d(dir);
+ TQFileInfo fid( dir );
if ( ! fid.isDir() ) {
@@ -212,15 +212,15 @@ void Memofiles::eraseLocalMemos ()
MemoCategoryMap::Iterator it;
for ( it = _categories.begin(); it != _categories.end(); ++it ) {
- QString dir = _baseDirectory + QDir::separator() + it.data();
+ TQString dir = _baseDirectory + TQDir::separator() + it.data();
- if (!folderRemove(QDir(dir))) {
+ if (!folderRemove(TQDir(dir))) {
DEBUGKPILOT << fname
<< ": couldn't erase all local memos from: ["
<< dir << "]." << endl;
}
}
- QDir d(_baseDirectory);
+ TQDir d(_baseDirectory);
d.remove(_memoMetadataFile);
ensureDirectoryReady();
@@ -228,7 +228,7 @@ void Memofiles::eraseLocalMemos ()
_memofiles.clear();
}
-void Memofiles::setPilotMemos (QPtrList<PilotMemo> & memos)
+void Memofiles::setPilotMemos (TQPtrList<PilotMemo> & memos)
{
FUNCTIONSETUP;
@@ -252,7 +252,7 @@ bool Memofiles::loadFromMetadata ()
_memofiles.clear();
- QFile f( _memoMetadataFile );
+ TQFile f( _memoMetadataFile );
if ( !f.open( IO_ReadOnly ) ) {
DEBUGKPILOT << fname
<< ": ooh, bad. couldn't open your memo-id file for reading."
@@ -260,15 +260,15 @@ bool Memofiles::loadFromMetadata ()
return false;
}
- QTextStream t( &f );
+ TQTextStream t( &f );
Memofile * memofile;
while ( !t.atEnd() ) {
- QString data = t.readLine();
+ TQString data = t.readLine();
int errors = 0;
bool ok;
- QStringList fields = QStringList::split( FIELD_SEP, data );
+ TQStringList fields = TQStringList::split( FIELD_SEP, data );
if ( fields.count() >= 4 ) {
int id = fields[0].toInt( &ok );
if ( !ok )
@@ -282,7 +282,7 @@ bool Memofiles::loadFromMetadata ()
uint size = fields[3].toInt( &ok );
if ( !ok )
errors++;
- QString filename = fields[4];
+ TQString filename = fields[4];
if ( filename.isEmpty() )
errors++;
@@ -331,7 +331,7 @@ Memofile * Memofiles::find (recordid_t id)
}
-Memofile * Memofiles::find (const QString & category, const QString & filename)
+Memofile * Memofiles::find (const TQString & category, const TQString & filename)
{
Memofile * memofile;
@@ -371,8 +371,8 @@ void Memofiles::addModifiedMemo (PilotMemo * memo)
return;
}
- QString debug = CSL1(": adding a PilotMemo. id: [")
- + QString::number(memo->id()) + CSL1("], title: [")
+ TQString debug = CSL1(": adding a PilotMemo. id: [")
+ + TQString::number(memo->id()) + CSL1("], title: [")
+ memo->getTitle() + CSL1("]. ");
Memofile * memofile = find(memo->id());
@@ -400,11 +400,11 @@ void Memofiles::addModifiedMemo (PilotMemo * memo)
}
-QPtrList<Memofile> Memofiles::getModified ()
+TQPtrList<Memofile> Memofiles::getModified ()
{
FUNCTIONSETUP;
- QPtrList<Memofile> modList;
+ TQPtrList<Memofile> modList;
modList.clear();
Memofile * memofile;
@@ -441,8 +441,8 @@ bool Memofiles::saveMemoMetadata()
<< ": saving memo metadata to file: ["
<< _memoMetadataFile << "]" << endl;
- QFile f( _memoMetadataFile );
- QTextStream stream(&f);
+ TQFile f( _memoMetadataFile );
+ TQTextStream stream(&f);
if( !f.open(IO_WriteOnly) ) {
DEBUGKPILOT << fname
@@ -484,8 +484,8 @@ MemoCategoryMap Memofiles::readCategoryMetadata()
MemoCategoryMap map;
map.clear();
- QFile f( _categoryMetadataFile );
- QTextStream stream(&f);
+ TQFile f( _categoryMetadataFile );
+ TQTextStream stream(&f);
if( !f.open(IO_ReadOnly) ) {
DEBUGKPILOT << fname
@@ -496,16 +496,16 @@ MemoCategoryMap Memofiles::readCategoryMetadata()
while ( !stream.atEnd() ) {
- QString data = stream.readLine();
+ TQString data = stream.readLine();
int errors = 0;
bool ok;
- QStringList fields = QStringList::split( FIELD_SEP, data );
+ TQStringList fields = TQStringList::split( FIELD_SEP, data );
if ( fields.count() >= 2 ) {
int id = fields[0].toInt( &ok );
if ( !ok )
errors++;
- QString categoryName = fields[1];
+ TQString categoryName = fields[1];
if ( categoryName.isEmpty() )
errors++;
@@ -541,8 +541,8 @@ bool Memofiles::saveCategoryMetadata()
<< ": saving categories to file: ["
<< _categoryMetadataFile << "]" << endl;
- QFile f( _categoryMetadataFile );
- QTextStream stream(&f);
+ TQFile f( _categoryMetadataFile );
+ TQTextStream stream(&f);
if( !f.open(IO_WriteOnly) ) {
DEBUGKPILOT << fname
@@ -601,8 +601,8 @@ bool Memofiles::saveMemos()
bool Memofiles::isFirstSync()
{
FUNCTIONSETUP;
- bool metadataExists = QFile::exists(_memoMetadataFile) &&
- QFile::exists(_categoryMetadataFile);
+ bool metadataExists = TQFile::exists(_memoMetadataFile) &&
+ TQFile::exists(_categoryMetadataFile);
bool valid = metadataExists && _metadataLoaded;
@@ -615,19 +615,19 @@ bool Memofiles::isFirstSync()
-bool Memofiles::folderRemove(const QDir &_d)
+bool Memofiles::folderRemove(const TQDir &_d)
{
FUNCTIONSETUP;
- QDir d = _d;
+ TQDir d = _d;
- QStringList entries = d.entryList();
- for(QStringList::Iterator it = entries.begin(); it != entries.end(); ++it) {
+ TQStringList entries = d.entryList();
+ for(TQStringList::Iterator it = entries.begin(); it != entries.end(); ++it) {
if(*it == CSL1(".") || *it == CSL1(".."))
continue;
- QFileInfo info(d, *it);
+ TQFileInfo info(d, *it);
if(info.isDir()) {
- if(!folderRemove(QDir(info.filePath())))
+ if(!folderRemove(TQDir(info.filePath())))
return FALSE;
} else {
DEBUGKPILOT << fname
@@ -635,7 +635,7 @@ bool Memofiles::folderRemove(const QDir &_d)
d.remove(info.filePath());
}
}
- QString name = d.dirName();
+ TQString name = d.dirName();
if(!d.cdUp())
return FALSE;
DEBUGKPILOT << fname
@@ -645,14 +645,14 @@ bool Memofiles::folderRemove(const QDir &_d)
return TRUE;
}
-QString Memofiles::filename(PilotMemo * memo)
+TQString Memofiles::filename(PilotMemo * memo)
{
FUNCTIONSETUP;
- QString filename = memo->getTitle();
+ TQString filename = memo->getTitle();
if (filename.isEmpty()) {
- QString text = memo->text();
+ TQString text = memo->text();
int i = text.find(CSL1("\n"));
if (i > 1) {
filename = text.left(i);
@@ -664,7 +664,7 @@ QString Memofiles::filename(PilotMemo * memo)
filename = sanitizeName(filename);
- QString category = _categories[memo->category()];
+ TQString category = _categories[memo->category()];
Memofile * memofile = find(category, filename);
@@ -676,22 +676,22 @@ QString Memofiles::filename(PilotMemo * memo)
}
int uniq = 2;
- QString newfilename;
+ TQString newfilename;
// try to find a good filename, but only do this 20 times at the most.
// if our user has 20 memos with the same filename, he/she is asking
// for trouble.
while (NULL != memofile && uniq <=20) {
- newfilename = QString(filename + CSL1(".") + QString::number(uniq++) );
+ newfilename = TQString(filename + CSL1(".") + TQString::number(uniq++) );
memofile = find(category, newfilename);
}
return newfilename;
}
-QString Memofiles::sanitizeName(QString name)
+TQString Memofiles::sanitizeName(TQString name)
{
- QString clean = name;
+ TQString clean = name;
// safety net. we can't save a
// filesystem separator as part of a filename, now can we?
clean.replace('/', CSL1("-"));
diff --git a/kpilot/conduits/memofileconduit/memofiles.h b/kpilot/conduits/memofileconduit/memofiles.h
index ec0497d5b..72b6ed4a9 100644
--- a/kpilot/conduits/memofileconduit/memofiles.h
+++ b/kpilot/conduits/memofileconduit/memofiles.h
@@ -27,11 +27,11 @@
*/
#include "plugin.h"
-#include <qmap.h>
+#include <tqmap.h>
#include "memofile.h"
-typedef QMap<int, QString> MemoCategoryMap;
+typedef TQMap<int, TQString> MemoCategoryMap;
class Memofile;
@@ -40,29 +40,29 @@ class Memofiles {
public:
Memofiles (MemoCategoryMap & categories, PilotMemoInfo &appInfo,
- QString & baseDirectory, CUDCounter &fCtrHH);
+ TQString & baseDirectory, CUDCounter &fCtrHH);
~Memofiles();
void load(bool loadAll);
void save();
void eraseLocalMemos();
- void setPilotMemos (QPtrList<PilotMemo> & memos);
+ void setPilotMemos (TQPtrList<PilotMemo> & memos);
void addModifiedMemo (PilotMemo * memo);
void deleteMemo (PilotMemo * memo);
bool isFirstSync();
bool isReady() { return _ready; };
- QPtrList<Memofile> getModified();
- QPtrList<Memofile> getAll() { return _memofiles; } ;
- Memofile * find (const QString & category, const QString & filename);
+ TQPtrList<Memofile> getModified();
+ TQPtrList<Memofile> getAll() { return _memofiles; } ;
+ Memofile * find (const TQString & category, const TQString & filename);
Memofile * find (recordid_t id);
MemoCategoryMap readCategoryMetadata();
void setCategories(MemoCategoryMap map) { _categories = map; } ;
- static QString FIELD_SEP;
- static QString sanitizeName(QString name);
+ static TQString FIELD_SEP;
+ static TQString sanitizeName(TQString name);
int count() { return _memofiles.count(); }
@@ -70,23 +70,23 @@ private:
MemoCategoryMap _categories;
PilotMemoInfo &_memoAppInfo;
- QString & _baseDirectory;
+ TQString & _baseDirectory;
CUDCounter &_cudCounter;
- QPtrList<Memofile> _memofiles;
+ TQPtrList<Memofile> _memofiles;
bool loadFromMetadata();
bool ensureDirectoryReady();
- bool checkDirectory(QString & dir);
+ bool checkDirectory(TQString & dir);
bool saveMemoMetadata();
bool saveCategoryMetadata();
bool saveMemos();
- bool folderRemove(const QDir & dir);
+ bool folderRemove(const TQDir & dir);
- QString filename(PilotMemo * memo);
+ TQString filename(PilotMemo * memo);
- QString _categoryMetadataFile;
- QString _memoMetadataFile;
+ TQString _categoryMetadataFile;
+ TQString _memoMetadataFile;
bool _metadataLoaded;
bool _ready;
diff --git a/kpilot/conduits/notepadconduit/notepad-conduit.cc b/kpilot/conduits/notepadconduit/notepad-conduit.cc
index 763f3acd0..da6f085d5 100644
--- a/kpilot/conduits/notepadconduit/notepad-conduit.cc
+++ b/kpilot/conduits/notepadconduit/notepad-conduit.cc
@@ -40,12 +40,12 @@
#include <pi-notepad.h>
-#include <qthread.h>
-#include <qapplication.h>
-#include <qvaluelist.h>
-#include <qimage.h>
-#include <qdir.h>
-#include <qcstring.h>
+#include <tqthread.h>
+#include <tqapplication.h>
+#include <tqvaluelist.h>
+#include <tqimage.h>
+#include <tqdir.h>
+#include <tqcstring.h>
extern "C"
{
@@ -53,7 +53,7 @@ unsigned long version_conduit_notepad = Pilot::PLUGIN_API;
}
NotepadConduit::NotepadConduit(KPilotLink *d, const char *n,
- const QStringList &args) : ConduitAction(d, n, args)
+ const TQStringList &args) : ConduitAction(d, n, args)
{
FUNCTIONSETUP;
fConduitName=i18n("Notepad");
@@ -74,7 +74,7 @@ NotepadConduit::~NotepadConduit()
DEBUGKPILOT << fname << ": In exec() @" << (unsigned long) this << endl;
#endif
- QDir dir(NotepadConduitSettings::outputDirectory());
+ TQDir dir(NotepadConduitSettings::outputDirectory());
if(!dir.exists() && !dir.mkdir(dir.path())) {
emit logError(i18n("Unable to open %1").arg(dir.path()));
delayDone();
@@ -91,11 +91,11 @@ NotepadConduit::~NotepadConduit()
return true;
}
-bool NotepadConduit::event(QEvent *e)
+bool NotepadConduit::event(TQEvent *e)
{
FUNCTIONSETUP;
- if(e->type() == QEvent::User) {
+ if(e->type() == TQEvent::User) {
#ifdef DEBUG
DEBUGKPILOT << fname << ": Notepad thread done." << endl;
#endif
@@ -115,7 +115,7 @@ bool NotepadConduit::event(QEvent *e)
// NotepadActionThread
//-----------------------------------------------------------------------------
-NotepadActionThread::NotepadActionThread(QObject *parent, KPilotLink *link) :
+NotepadActionThread::NotepadActionThread(TQObject *parent, KPilotLink *link) :
fParent(parent), fLink(link), notSaved(0), saved(0)
{
FUNCTIONSETUP;
@@ -131,8 +131,8 @@ void NotepadActionThread::run()
if ( n > 0 )
{
- QValueList<recordid_t> vl = db->idList();
- QValueList<recordid_t>::iterator it;
+ TQValueList<recordid_t> vl = db->idList();
+ TQValueList<recordid_t>::iterator it;
struct NotePad a;
for ( it = vl.begin(); it != vl.end(); ++it )
{
@@ -146,10 +146,10 @@ void NotepadActionThread::run()
}
}
KPILOT_DELETE(db);
- QApplication::postEvent(fParent, new QEvent(QEvent::User));
+ TQApplication::postEvent(fParent, new TQEvent(TQEvent::User));
}
-static void saveImageFromBITS(QImage &image, struct NotePad *n, unsigned int width)
+static void saveImageFromBITS(TQImage &image, struct NotePad *n, unsigned int width)
{
FUNCTIONSETUP;
image.setColor(0, qRgb(0xaa, 0xc1 ,0x91));
@@ -175,7 +175,7 @@ static void saveImageFromBITS(QImage &image, struct NotePad *n, unsigned int wid
}
}
-static void saveImageFromUNCOMPRESSED(QImage &image, struct NotePad *n, unsigned int width)
+static void saveImageFromUNCOMPRESSED(TQImage &image, struct NotePad *n, unsigned int width)
{
FUNCTIONSETUP;
@@ -219,7 +219,7 @@ void NotepadActionThread::saveImage(struct NotePad *n)
int height = n->body.height;
- QImage image(width, height, 8, 2);
+ TQImage image(width, height, 8, 2);
switch (n->body.dataType)
{
@@ -240,7 +240,7 @@ void NotepadActionThread::saveImage(struct NotePad *n)
// TODO: Post a warning to the UI
}
- QString filename(n->name);
+ TQString filename(n->name);
if(filename.isEmpty())
{
filename.sprintf("%4d-%02d-%02d_%02d-%02d-%02d",
@@ -251,7 +251,7 @@ void NotepadActionThread::saveImage(struct NotePad *n)
n->changeDate.min,
n->changeDate.sec);
}
- QString imgname = QString("%1/%2.png").arg(NotepadConduitSettings::outputDirectory()).arg(filename);
+ TQString imgname = TQString("%1/%2.png").arg(NotepadConduitSettings::outputDirectory()).arg(filename);
#ifdef DEBUG
diff --git a/kpilot/conduits/notepadconduit/notepad-conduit.h b/kpilot/conduits/notepadconduit/notepad-conduit.h
index 5ba915e31..907a306a2 100644
--- a/kpilot/conduits/notepadconduit/notepad-conduit.h
+++ b/kpilot/conduits/notepadconduit/notepad-conduit.h
@@ -35,7 +35,7 @@
#include "plugin.h"
-#include <qthread.h>
+#include <tqthread.h>
struct NotePad;
class NotepadActionThread;
@@ -44,9 +44,9 @@ class NotepadConduit : public ConduitAction
public:
NotepadConduit(KPilotLink *,
const char *name=0L,
- const QStringList &args = QStringList());
+ const TQStringList &args = TQStringList());
virtual ~NotepadConduit();
- virtual bool event(QEvent *e);
+ virtual bool event(TQEvent *e);
protected:
virtual bool exec(); // From ConduitAction
@@ -62,14 +62,14 @@ private:
class NotepadActionThread : public QThread
{
public:
- NotepadActionThread(QObject *parent, KPilotLink *link);
+ NotepadActionThread(TQObject *parent, KPilotLink *link);
virtual void run();
int getFailed() { return notSaved; }
int getSaved() { return saved; }
private:
- QObject *fParent;
+ TQObject *fParent;
KPilotLink *fLink;
/**
diff --git a/kpilot/conduits/notepadconduit/notepad-factory.cc b/kpilot/conduits/notepadconduit/notepad-factory.cc
index f934a2cb1..0e1094b6f 100644
--- a/kpilot/conduits/notepadconduit/notepad-factory.cc
+++ b/kpilot/conduits/notepadconduit/notepad-factory.cc
@@ -33,7 +33,7 @@
#include <kaboutdata.h>
#include <kurlrequester.h>
#include <kmessagebox.h>
-#include <qlineedit.h>
+#include <tqlineedit.h>
#include "pluginfactory.h"
@@ -47,10 +47,10 @@
class NotepadConduitConfig : public ConduitConfigBase
{
public:
- NotepadConduitConfig(QWidget *parent=0L, const char *n=0L);
+ NotepadConduitConfig(TQWidget *parent=0L, const char *n=0L);
virtual void commit();
virtual void load();
- static ConduitConfigBase *create(QWidget *p, const char *n)
+ static ConduitConfigBase *create(TQWidget *p, const char *n)
{
return new NotepadConduitConfig(p, n);
};
@@ -80,7 +80,7 @@ static KAboutData *createAbout()
}
-NotepadConduitConfig::NotepadConduitConfig(QWidget *p, const char *n) :
+NotepadConduitConfig::NotepadConduitConfig(TQWidget *p, const char *n) :
ConduitConfigBase(p, n),
fConfigWidget(new NotepadWidget(p))
{
@@ -89,8 +89,8 @@ NotepadConduitConfig::NotepadConduitConfig(QWidget *p, const char *n) :
fConduitName = i18n("Notepad");
ConduitConfigBase::addAboutPage(fConfigWidget->tabWidget, createAbout());
fWidget=fConfigWidget;
- QObject::connect(fConfigWidget->fOutputDirectory, SIGNAL(textChanged(const QString&)),
- this, SLOT(modified()));
+ TQObject::connect(fConfigWidget->fOutputDirectory, TQT_SIGNAL(textChanged(const TQString&)),
+ this, TQT_SLOT(modified()));
fConfigWidget->fOutputDirectory->setMode(KFile::Directory |
KFile::LocalOnly);
}
diff --git a/kpilot/conduits/null/null-conduit.cc b/kpilot/conduits/null/null-conduit.cc
index 56599fec9..f04c7435c 100644
--- a/kpilot/conduits/null/null-conduit.cc
+++ b/kpilot/conduits/null/null-conduit.cc
@@ -54,7 +54,7 @@
//
NullConduit::NullConduit(KPilotLink *d,
const char *n,
- const QStringList &l) :
+ const TQStringList &l) :
ConduitAction(d,n,l),
fDatabase(0L),
fFailImmediately( l.contains( CSL1("--fail") ))
@@ -82,7 +82,7 @@ NullConduit::~NullConduit()
return false;
}
- QString m(NullConduitSettings::logMessage());
+ TQString m(NullConduitSettings::logMessage());
if (!m.isEmpty())
{
addSyncLogEntry(m);
diff --git a/kpilot/conduits/null/null-conduit.h b/kpilot/conduits/null/null-conduit.h
index 7bf1b67de..4cdbbdec4 100644
--- a/kpilot/conduits/null/null-conduit.h
+++ b/kpilot/conduits/null/null-conduit.h
@@ -51,7 +51,7 @@ public:
*/
NullConduit(KPilotLink *,
const char *name=0L,
- const QStringList &args = QStringList());
+ const TQStringList &args = TQStringList());
virtual ~NullConduit();
protected:
diff --git a/kpilot/conduits/null/null-factory.cc b/kpilot/conduits/null/null-factory.cc
index 2a829c6e3..c2d381de6 100644
--- a/kpilot/conduits/null/null-factory.cc
+++ b/kpilot/conduits/null/null-factory.cc
@@ -28,9 +28,9 @@
#include "options.h"
-#include <qtabwidget.h>
-#include <qlineedit.h>
-#include <qcheckbox.h>
+#include <tqtabwidget.h>
+#include <tqlineedit.h>
+#include <tqcheckbox.h>
#include <kconfig.h>
#include <kinstance.h>
@@ -47,7 +47,7 @@
class NullConduitConfig : public ConduitConfigBase
{
public:
- NullConduitConfig(QWidget *parent=0L, const char *n=0L);
+ NullConduitConfig(TQWidget *parent=0L, const char *n=0L);
virtual void commit();
virtual void load();
protected:
@@ -55,7 +55,7 @@ protected:
KAboutData *fAbout;
} ;
-NullConduitConfig::NullConduitConfig(QWidget *p, const char *n) :
+NullConduitConfig::NullConduitConfig(TQWidget *p, const char *n) :
ConduitConfigBase(p,n),
fConfigWidget(new NullWidget(p))
{
@@ -74,8 +74,8 @@ NullConduitConfig::NullConduitConfig(QWidget *p, const char *n) :
ConduitConfigBase::addAboutPage(fConfigWidget->tabWidget,fAbout);
fWidget=fConfigWidget;
- QObject::connect(fConfigWidget->fLogMessage,SIGNAL(textChanged(const QString&)),
- this,SLOT(modified()));
+ TQObject::connect(fConfigWidget->fLogMessage,TQT_SIGNAL(textChanged(const TQString&)),
+ this,TQT_SLOT(modified()));
}
/* virtual */ void NullConduitConfig::commit()
diff --git a/kpilot/conduits/popmail/popmail-conduit.cc b/kpilot/conduits/popmail/popmail-conduit.cc
index 47315edaa..8f51545cf 100644
--- a/kpilot/conduits/popmail/popmail-conduit.cc
+++ b/kpilot/conduits/popmail/popmail-conduit.cc
@@ -41,8 +41,8 @@ unsigned long version_conduit_popmail = Pilot::PLUGIN_API;
}
-#include <qsocket.h>
-#include <qregexp.h>
+#include <tqsocket.h>
+#include <tqregexp.h>
#include <sys/types.h>
@@ -60,9 +60,9 @@ unsigned long version_conduit_popmail = Pilot::PLUGIN_API;
#endif
#include <pi-mail.h>
-#include <qdir.h>
-#include <qtextstream.h>
-#include <qtextcodec.h>
+#include <tqdir.h>
+#include <tqtextstream.h>
+#include <tqtextcodec.h>
#include <kapplication.h>
#include <kmessagebox.h>
@@ -78,11 +78,11 @@ unsigned long version_conduit_popmail = Pilot::PLUGIN_API;
#include "popmailSettings.h"
#include "setupDialog.h"
-static QString DATE_FORMAT("ddd, d MMM yyyy hh:mm:ss");
+static TQString DATE_FORMAT("ddd, d MMM yyyy hh:mm:ss");
PopMailConduit::PopMailConduit(KPilotLink *d,
const char *n,
- const QStringList &l) :
+ const TQStringList &l) :
ConduitAction(d,n,l)
{
FUNCTIONSETUP;
@@ -157,7 +157,7 @@ int PopMailConduit::sendPendingMail(int mode)
}
-QString PopMailConduit::getKMailOutbox() const
+TQString PopMailConduit::getKMailOutbox() const
{
FUNCTIONSETUP;
@@ -165,7 +165,7 @@ QString PopMailConduit::getKMailOutbox() const
KSimpleConfig c(CSL1("kmailrc"),true);
c.setGroup("General");
- QString outbox = c.readEntry("outboxFolder");
+ TQString outbox = c.readEntry("outboxFolder");
if (outbox.isEmpty())
{
outbox = MailConduitSettings::outboxFolder();
@@ -184,7 +184,7 @@ int PopMailConduit::sendViaKMail()
{
FUNCTIONSETUP;
int count=0;
- QString kmailOutboxName = getKMailOutbox();
+ TQString kmailOutboxName = getKMailOutbox();
DCOPClient *dcopptr = KApplication::kApplication()->dcopClient();
if (!dcopptr)
@@ -252,15 +252,15 @@ int PopMailConduit::sendViaKMail()
writeMessageToFile(sendf, theMail);
- QByteArray data,returnValue;
- QCString returnType;
- QDataStream arg(data,IO_WriteOnly);
+ TQByteArray data,returnValue;
+ TQCString returnType;
+ TQDataStream arg(data,IO_WriteOnly);
arg << kmailOutboxName << t.name() << CSL1("N") ;
if (!dcopptr->call("kmail",
"KMailIface",
- "dcopAddMessage(QString,QString,QString)",
+ "dcopAddMessage(TQString,TQString,TQString)",
data,
returnType,
returnValue,
@@ -302,9 +302,9 @@ void PopMailConduit::writeMessageToFile(FILE* sendf, struct Mail& theMail)
{
FUNCTIONSETUP;
- QTextStream mailPipe(sendf, IO_WriteOnly);
+ TQTextStream mailPipe(sendf, IO_WriteOnly);
- QString fromAddress = MailConduitSettings::emailAddress();
+ TQString fromAddress = MailConduitSettings::emailAddress();
mailPipe << "From: " << fromAddress << "\r\n";
mailPipe << "To: " << theMail.to << "\r\n";
if(theMail.cc)
@@ -319,13 +319,13 @@ void PopMailConduit::writeMessageToFile(FILE* sendf, struct Mail& theMail)
// if our struct indicates that it's dated, then use the date it
// holds. otherwise, provide current date. either way, we need to
// have a date...
- QDateTime date = QDateTime::currentDateTime();
+ TQDateTime date = TQDateTime::currentDateTime();
if (theMail.dated)
{
date = readTm(theMail.date);
}
- QString dateString = date.toString(DATE_FORMAT);
+ TQString dateString = date.toString(DATE_FORMAT);
mailPipe << "Date: " << dateString << "\r\n";
@@ -343,16 +343,16 @@ void PopMailConduit::writeMessageToFile(FILE* sendf, struct Mail& theMail)
}
//insert the real signature file from disk
- QString signature = MailConduitSettings::signature();
+ TQString signature = MailConduitSettings::signature();
if(!signature.isEmpty())
{
DEBUGKPILOT << fname << ": Reading signature" << endl;
- QFile f(signature);
+ TQFile f(signature);
if ( f.open(IO_ReadOnly) )
{ // file opened successfully
mailPipe << "-- \r\n";
- QTextStream t( &f ); // use a text stream
+ TQTextStream t( &f ); // use a text stream
while ( !t.eof() )
{ // until end of file...
mailPipe << t.readLine() << "\r\n";
@@ -370,15 +370,15 @@ void PopMailConduit::writeMessageToFile(FILE* sendf, struct Mail& theMail)
{
FUNCTIONSETUP;
- QString outbox = getKMailOutbox();
+ TQString outbox = getKMailOutbox();
DEBUGKPILOT << fname
<< ": KMail's outbox is "
<< outbox
<< endl;
- QDateTime date = QDateTime::currentDateTime();
- QString dateString = date.toString(DATE_FORMAT);
+ TQDateTime date = TQDateTime::currentDateTime();
+ TQString dateString = date.toString(DATE_FORMAT);
DEBUGKPILOT << fname << ": Date format example: [" << dateString
<< "]" << endl;
diff --git a/kpilot/conduits/popmail/popmail-conduit.h b/kpilot/conduits/popmail/popmail-conduit.h
index 1df1a6912..52b5b9174 100644
--- a/kpilot/conduits/popmail/popmail-conduit.h
+++ b/kpilot/conduits/popmail/popmail-conduit.h
@@ -46,7 +46,7 @@ class PopMailConduit : public ConduitAction
public:
PopMailConduit(KPilotLink *d,
const char *n=0L,
- const QStringList &l=QStringList());
+ const TQStringList &l=TQStringList());
virtual ~PopMailConduit();
protected:
@@ -67,7 +67,7 @@ protected:
int sendViaKMail();
// int sendViaSMTP();
void writeMessageToFile(FILE* sendf, struct Mail& theMail);
- QString getKMailOutbox() const;
+ TQString getKMailOutbox() const;
};
diff --git a/kpilot/conduits/popmail/setupDialog.cc b/kpilot/conduits/popmail/setupDialog.cc
index 64553562b..b8d3db70b 100644
--- a/kpilot/conduits/popmail/setupDialog.cc
+++ b/kpilot/conduits/popmail/setupDialog.cc
@@ -42,9 +42,9 @@
#include <klineedit.h>
#include <kaboutdata.h>
-#include <qcheckbox.h>
-#include <qdir.h>
-#include <qcombobox.h>
+#include <tqcheckbox.h>
+#include <tqdir.h>
+#include <tqcombobox.h>
#include "kfiledialog.h"
@@ -58,7 +58,7 @@
-PopMailWidgetConfig::PopMailWidgetConfig(QWidget *p,const char *n) :
+PopMailWidgetConfig::PopMailWidgetConfig(TQWidget *p,const char *n) :
ConduitConfigBase(p,n),
fConfigWidget(new PopMailWidget(p,"PopMailWidget"))
{
@@ -86,14 +86,14 @@ PopMailWidgetConfig::PopMailWidgetConfig(QWidget *p,const char *n) :
ConduitConfigBase::addAboutPage(fConfigWidget->fTabWidget,fAbout);
fWidget=fConfigWidget;
-#define CM(a,b) connect(fConfigWidget->a,b,this,SLOT(modified()));
- CM(fSendMode,SIGNAL(activated(int)));
- CM(fEmailFrom,SIGNAL(textChanged(const QString &)));
- CM(fSignature,SIGNAL(textChanged(const QString &)));
+#define CM(a,b) connect(fConfigWidget->a,b,this,TQT_SLOT(modified()));
+ CM(fSendMode,TQT_SIGNAL(activated(int)));
+ CM(fEmailFrom,TQT_SIGNAL(textChanged(const TQString &)));
+ CM(fSignature,TQT_SIGNAL(textChanged(const TQString &)));
#undef CM
- connect(fConfigWidget->fSendMode,SIGNAL(activated(int)),
- this,SLOT(toggleSendMode(int)));
+ connect(fConfigWidget->fSendMode,TQT_SIGNAL(activated(int)),
+ this,TQT_SLOT(toggleSendMode(int)));
}
diff --git a/kpilot/conduits/popmail/setupDialog.h b/kpilot/conduits/popmail/setupDialog.h
index 248b4ecbf..76bf9afe5 100644
--- a/kpilot/conduits/popmail/setupDialog.h
+++ b/kpilot/conduits/popmail/setupDialog.h
@@ -41,11 +41,11 @@ class PopMailWidgetConfig : public ConduitConfigBase
{
Q_OBJECT
public:
- PopMailWidgetConfig(QWidget *, const char *);
+ PopMailWidgetConfig(TQWidget *, const char *);
virtual void load();
virtual void commit();
- static ConduitConfigBase *create(QWidget *w, const char *n)
+ static ConduitConfigBase *create(TQWidget *w, const char *n)
{ return new PopMailWidgetConfig(w,n); } ;
// These enums must follow the order of items in the combo box
diff --git a/kpilot/conduits/recordconduit/factory.cc b/kpilot/conduits/recordconduit/factory.cc
index 8015763d1..83377336a 100644
--- a/kpilot/conduits/recordconduit/factory.cc
+++ b/kpilot/conduits/recordconduit/factory.cc
@@ -28,9 +28,9 @@
#include "options.h"
-#include <qtabwidget.h>
-#include <qlineedit.h>
-#include <qcheckbox.h>
+#include <tqtabwidget.h>
+#include <tqlineedit.h>
+#include <tqcheckbox.h>
#include <kconfig.h>
#include <kinstance.h>
@@ -48,7 +48,7 @@
class ConduitConfig : public ConduitConfigBase
{
public:
- ConduitConfig(QWidget *parent=0L, const char *n=0L);
+ ConduitConfig(TQWidget *parent=0L, const char *n=0L);
virtual void commit();
virtual void load();
protected:
@@ -56,7 +56,7 @@ protected:
KAboutData *fAbout;
} ;
-ConduitConfig::ConduitConfig(QWidget *p, const char *n) :
+ConduitConfig::ConduitConfig(TQWidget *p, const char *n) :
ConduitConfigBase(p,n),
fConfigWidget(new RecordWidget(p))
{
@@ -75,12 +75,12 @@ ConduitConfig::ConduitConfig(QWidget *p, const char *n) :
ConduitConfigBase::addAboutPage(fConfigWidget->tabWidget,fAbout);
fWidget=fConfigWidget;
- QObject::connect(fConfigWidget->fLogMessage,SIGNAL(textChanged(const QString&)),
- this,SLOT(modified()));
- QObject::connect(fConfigWidget->fDatabases,SIGNAL(textChanged(const QString&)),
- this,SLOT(modified()));
- QObject::connect(fConfigWidget->fFailImmediately,SIGNAL(toggled(bool)),
- this,SLOT(modified()));
+ TQObject::connect(fConfigWidget->fLogMessage,TQT_SIGNAL(textChanged(const TQString&)),
+ this,TQT_SLOT(modified()));
+ TQObject::connect(fConfigWidget->fDatabases,TQT_SIGNAL(textChanged(const TQString&)),
+ this,TQT_SLOT(modified()));
+ TQObject::connect(fConfigWidget->fFailImmediately,TQT_SIGNAL(toggled(bool)),
+ this,TQT_SLOT(modified()));
}
/* virtual */ void ConduitConfig::commit()
diff --git a/kpilot/conduits/sysinfoconduit/sysinfo-conduit.cc b/kpilot/conduits/sysinfoconduit/sysinfo-conduit.cc
index b3e69b65c..86fc10752 100644
--- a/kpilot/conduits/sysinfoconduit/sysinfo-conduit.cc
+++ b/kpilot/conduits/sysinfoconduit/sysinfo-conduit.cc
@@ -29,10 +29,10 @@
#include <pi-version.h>
-#include <qtimer.h>
-#include <qdir.h>
-#include <qfileinfo.h>
-#include <qregexp.h>
+#include <tqtimer.h>
+#include <tqdir.h>
+#include <tqfileinfo.h>
+#include <tqregexp.h>
#include <kconfig.h>
#include <kdebug.h>
@@ -49,7 +49,7 @@
#include "sysinfo-conduit.moc"
#include "sysinfoSettings.h"
-const QString SysInfoConduit::defaultpage = CSL1("KPilot System Information Page\n"
+const TQString SysInfoConduit::defaultpage = CSL1("KPilot System Information Page\n"
"==============================\n"
"(Kpilot was unable to find the correct template file, \n"
"so this simple template was used.)\n\n"
@@ -156,7 +156,7 @@ unsigned long version_conduit_sysinfo = Pilot::PLUGIN_API;
SysInfoConduit::SysInfoConduit(KPilotLink * o,
const char *n,
- const QStringList & a) :
+ const TQStringList & a) :
ConduitAction(o, n, a)
{
FUNCTIONSETUP;
@@ -196,7 +196,7 @@ void SysInfoConduit::readConfig()
readConfig();
- QTimer::singleShot(0, this, SLOT(hardwareInfo()));
+ TQTimer::singleShot(0, this, TQT_SLOT(hardwareInfo()));
return true;
}
@@ -204,7 +204,7 @@ void SysInfoConduit::hardwareInfo()
{
FUNCTIONSETUP;
if (fHardwareInfo) {
- QString unknown = i18n("unknown");
+ TQString unknown = i18n("unknown");
/* Retrieve values for
* - #deviceid#
@@ -214,14 +214,14 @@ void SysInfoConduit::hardwareInfo()
* - #devicetype#
*/
KPilotSysInfo sysinfo = fHandle->getSysInfo();
- fValues[CSL1("deviceid")] = QString::fromLatin1(sysinfo.getProductID());
+ fValues[CSL1("deviceid")] = TQString::fromLatin1(sysinfo.getProductID());
const KPilotCard *device = fHandle->getCardInfo();
if (device)
{
- fValues[CSL1("devicename")] = QString::fromLatin1(device->getCardName());
+ fValues[CSL1("devicename")] = TQString::fromLatin1(device->getCardName());
fValues[CSL1("devicemodel")] = unknown; // TODO
- fValues[CSL1("manufacturer")] = QString::fromLatin1(device->getCardManufacturer());
+ fValues[CSL1("manufacturer")] = TQString::fromLatin1(device->getCardManufacturer());
}
else
{
@@ -235,7 +235,7 @@ void SysInfoConduit::hardwareInfo()
KPILOT_DELETE(device);
keepParts.append(CSL1("hardware"));
} else removeParts.append(CSL1("hardware"));
- QTimer::singleShot(0, this, SLOT(userInfo()));
+ TQTimer::singleShot(0, this, TQT_SLOT(userInfo()));
}
void SysInfoConduit::userInfo()
@@ -257,15 +257,15 @@ void SysInfoConduit::userInfo()
{
fValues[CSL1("pw")] = i18n("No password set");
}
- fValues[CSL1("uid")] = QString::number(user.data()->userID);
- fValues[CSL1("viewerid")] = QString::number(user.data()->viewerID);
+ fValues[CSL1("uid")] = TQString::number(user.data()->userID);
+ fValues[CSL1("viewerid")] = TQString::number(user.data()->viewerID);
keepParts.append(CSL1("user"));
}
else
{
removeParts.append(CSL1("user"));
}
- QTimer::singleShot(0, this, SLOT(memoryInfo()));
+ TQTimer::singleShot(0, this, TQT_SLOT(memoryInfo()));
}
void SysInfoConduit::memoryInfo()
@@ -280,13 +280,13 @@ void SysInfoConduit::memoryInfo()
const KPilotCard *device = fHandle->getCardInfo();
if (device)
{
- fValues[CSL1("rom")] = QString::number(device->getRomSize()/1024);
- fValues[CSL1("totalmem")] = QString::number(device->getRamSize()/1024);
- fValues[CSL1("freemem")] = QString::number(device->getRamFree()/1024);
+ fValues[CSL1("rom")] = TQString::number(device->getRomSize()/1024);
+ fValues[CSL1("totalmem")] = TQString::number(device->getRamSize()/1024);
+ fValues[CSL1("freemem")] = TQString::number(device->getRamFree()/1024);
}
keepParts.append(CSL1("memory"));
} else removeParts.append(CSL1("memory"));
- QTimer::singleShot(0, this, SLOT(storageInfo()));
+ TQTimer::singleShot(0, this, TQT_SLOT(storageInfo()));
}
void SysInfoConduit::storageInfo()
@@ -299,8 +299,8 @@ void SysInfoConduit::storageInfo()
const KPilotCard *device = fHandle->getCardInfo(1);
if (device) {
fValues[CSL1("cards")] = CSL1("%1 (%2, %3 kB of %3 kB free)")
- .arg(QString::fromLatin1(device->getCardName()))
- .arg(QString::fromLatin1(device->getCardManufacturer()))
+ .arg(TQString::fromLatin1(device->getCardName()))
+ .arg(TQString::fromLatin1(device->getCardManufacturer()))
.arg(device->getRamFree()/1024)
.arg(device->getRamSize()/1024);
KPILOT_DELETE(device);
@@ -309,7 +309,7 @@ void SysInfoConduit::storageInfo()
}
keepParts.append(CSL1("storage"));
} else removeParts.append(CSL1("storage"));
- QTimer::singleShot(0, this, SLOT(dbListInfo()));
+ TQTimer::singleShot(0, this, TQT_SLOT(dbListInfo()));
}
void SysInfoConduit::dbListInfo()
@@ -322,7 +322,7 @@ void SysInfoConduit::dbListInfo()
dblist=deviceLink()->getDBList();
keepParts.append(CSL1("dblist"));
} else removeParts.append(CSL1("dblist"));
- QTimer::singleShot(0, this, SLOT(recNumberInfo()));
+ TQTimer::singleShot(0, this, TQT_SLOT(recNumberInfo()));
}
void SysInfoConduit::recNumberInfo()
@@ -336,34 +336,34 @@ void SysInfoConduit::recNumberInfo()
* - #memos#
*/
PilotDatabase *fDatabase = 0L;
- QString ERROR = CSL1("ERROR");
+ TQString ERROR = CSL1("ERROR");
fValues[CSL1("addresses")] = ERROR;
fValues[CSL1("events")] = ERROR;
fValues[CSL1("todos")] = ERROR;
fValues[CSL1("memos")] = ERROR;
fDatabase = deviceLink()->database(CSL1("AddressDB"));
if (fDatabase) {
- fValues[CSL1("addresses")] = QString::number(fDatabase->recordCount());
+ fValues[CSL1("addresses")] = TQString::number(fDatabase->recordCount());
KPILOT_DELETE(fDatabase);
}
fDatabase = deviceLink()->database(CSL1("DatebookDB"));
if (fDatabase) {
- fValues[CSL1("events")] = QString::number(fDatabase->recordCount());
+ fValues[CSL1("events")] = TQString::number(fDatabase->recordCount());
KPILOT_DELETE(fDatabase);
}
fDatabase = deviceLink()->database(CSL1("ToDoDB"));
if (fDatabase) {
- fValues[CSL1("todos")] = QString::number(fDatabase->recordCount());
+ fValues[CSL1("todos")] = TQString::number(fDatabase->recordCount());
KPILOT_DELETE(fDatabase);
}
fDatabase = deviceLink()->database(CSL1("MemoDB"));
if (fDatabase) {
- fValues[CSL1("memos")] = QString::number(fDatabase->recordCount());
+ fValues[CSL1("memos")] = TQString::number(fDatabase->recordCount());
KPILOT_DELETE(fDatabase);
}
keepParts.append(CSL1("records"));
} else removeParts.append(CSL1("records"));
- QTimer::singleShot(0, this, SLOT(syncInfo()));
+ TQTimer::singleShot(0, this, TQT_SLOT(syncInfo()));
}
void SysInfoConduit::syncInfo()
@@ -377,16 +377,16 @@ void SysInfoConduit::syncInfo()
*/
KPilotUser user = deviceLink()->getPilotUser();
time_t lastsync = user.getLastSyncDate();
- QDateTime qlastsync;
+ TQDateTime qlastsync;
qlastsync.setTime_t(lastsync);
fValues[CSL1("lastsync")] = qlastsync.toString(Qt::LocalDate);
lastsync = user.getLastSuccessfulSyncDate();
qlastsync.setTime_t(lastsync);
fValues[CSL1("lastsuccsync")] = qlastsync.toString(Qt::LocalDate);
- fValues[CSL1("lastsyncpc")] = QString::number(user.getLastSyncPC());
+ fValues[CSL1("lastsyncpc")] = TQString::number(user.getLastSyncPC());
keepParts.append(CSL1("sync"));
} else removeParts.append(CSL1("sync"));
- QTimer::singleShot(0, this, SLOT(pcVersionInfo()));
+ TQTimer::singleShot(0, this, TQT_SLOT(pcVersionInfo()));
}
void SysInfoConduit::pcVersionInfo()
@@ -400,7 +400,7 @@ void SysInfoConduit::pcVersionInfo()
* - #kpilot#
* - #pilotlink#
*/
- fValues[CSL1("kpilot")] = QString::fromLatin1(KPILOT_VERSION);
+ fValues[CSL1("kpilot")] = TQString::fromLatin1(KPILOT_VERSION);
fValues[CSL1("kde")] = i18n("unknown");
fValues[CSL1("qt")] = i18n("unknown");
fValues[CSL1("os")] = i18n("unknown");
@@ -408,29 +408,29 @@ void SysInfoConduit::pcVersionInfo()
struct utsname name;
if (uname (&name) >= 0) {
fValues[CSL1("os")] = CSL1("%1 %3, %5")
- .arg(QString::fromLatin1(name.sysname))
- .arg(QString::fromLatin1(name.release))
- .arg(QString::fromLatin1(name.machine));
- fValues[CSL1("hostname")] = CSL1("%2").arg(QString::fromLatin1(name.nodename));
+ .arg(TQString::fromLatin1(name.sysname))
+ .arg(TQString::fromLatin1(name.release))
+ .arg(TQString::fromLatin1(name.machine));
+ fValues[CSL1("hostname")] = CSL1("%2").arg(TQString::fromLatin1(name.nodename));
}
#ifdef KDE_VERSION_STRING
- fValues[CSL1("kde")] = QString::fromLatin1(KDE_VERSION_STRING);
+ fValues[CSL1("kde")] = TQString::fromLatin1(KDE_VERSION_STRING);
#endif
#ifdef QT_VERSION_STR
- fValues[CSL1("qt")] = QString::fromLatin1(QT_VERSION_STR);
+ fValues[CSL1("qt")] = TQString::fromLatin1(QT_VERSION_STR);
#endif
fValues[CSL1("pilotlink")] = CSL1("%1.%2.%3%4")
.arg(PILOT_LINK_VERSION)
.arg(PILOT_LINK_MAJOR)
.arg(PILOT_LINK_MINOR)
#ifdef PILOT_LINK_PATCH
- .arg(QString::fromLatin1(PILOT_LINK_PATCH));
+ .arg(TQString::fromLatin1(PILOT_LINK_PATCH));
#else
- .arg(QString());
+ .arg(TQString());
#endif
keepParts.append(CSL1("pcversion"));
} else removeParts.append(CSL1("pcversion"));
- QTimer::singleShot(0, this, SLOT(palmVersionInfo()));
+ TQTimer::singleShot(0, this, TQT_SLOT(palmVersionInfo()));
}
void SysInfoConduit::palmVersionInfo()
@@ -440,7 +440,7 @@ void SysInfoConduit::palmVersionInfo()
/* Retrieve values for
* - #palmos#
*/
-/* fValues["palmos"] = QString("PalmOS %1.%2 (compat %3.%4)")
+/* fValues["palmos"] = TQString("PalmOS %1.%2 (compat %3.%4)")
.arg(fHandle->getSysInfo()->getMajorVersion())
.arg(fHandle->getSysInfo()->getMinorVersion())
.arg(fHandle->getSysInfo()->getCompatMajorVersion())
@@ -450,7 +450,7 @@ void SysInfoConduit::palmVersionInfo()
keepParts.append(CSL1("palmversion"));
} else removeParts.append(CSL1("palmversion"));
- QTimer::singleShot(0, this, SLOT(debugInfo()));
+ TQTimer::singleShot(0, this, TQT_SLOT(debugInfo()));
}
void SysInfoConduit::debugInfo()
@@ -463,18 +463,18 @@ void SysInfoConduit::debugInfo()
fValues[CSL1("debug")] = i18n("No debug data");
keepParts.append(CSL1("debug"));
} else removeParts.append(CSL1("debug"));
- QTimer::singleShot(0, this, SLOT(writeFile()));
+ TQTimer::singleShot(0, this, TQT_SLOT(writeFile()));
}
void SysInfoConduit::writeFile()
{
FUNCTIONSETUP;
- fValues[CSL1("date")] = QDateTime::currentDateTime().toString(Qt::LocalDate);
+ fValues[CSL1("date")] = TQDateTime::currentDateTime().toString(Qt::LocalDate);
- QString output;
+ TQString output;
// Open the template file
- QString templatefile;
+ TQString templatefile;
switch(fOutputType)
{
case eOutputText:
@@ -495,9 +495,9 @@ void SysInfoConduit::writeFile()
#ifdef DEBUG
DEBUGKPILOT<<"Loading template file "<<templatefile<<endl;
#endif
- QFile infile(templatefile);
+ TQFile infile(templatefile);
if (infile.open(IO_ReadOnly)) {
- QTextStream instream(&infile);
+ TQTextStream instream(&infile);
output = instream.read();
infile.close();
loaded=true;
@@ -512,32 +512,32 @@ void SysInfoConduit::writeFile()
}
// Remove all parts not extracted
- for ( QStringList::Iterator it = removeParts.begin(); it != removeParts.end(); ++it ) {
- QRegExp re(CSL1("<!--#if%1#.*#endif%1#-->").arg(*it).arg(*it));
+ for ( TQStringList::Iterator it = removeParts.begin(); it != removeParts.end(); ++it ) {
+ TQRegExp re(CSL1("<!--#if%1#.*#endif%1#-->").arg(*it).arg(*it));
re.setMinimal(true);
output.remove(re);
}
- for ( QStringList::Iterator it = keepParts.begin(); it != keepParts.end(); ++it ) {
- QRegExp re(CSL1("<!--#if%1#(.*)#endif%1#-->").arg(*it).arg(*it));
+ for ( TQStringList::Iterator it = keepParts.begin(); it != keepParts.end(); ++it ) {
+ TQRegExp re(CSL1("<!--#if%1#(.*)#endif%1#-->").arg(*it).arg(*it));
re.setMinimal(true);
output.replace(re, CSL1("\\1"));
}
// Do a loop through all keys in fValues
- QMap<QString,QString>::Iterator it;
+ TQMap<TQString,TQString>::Iterator it;
for ( it = fValues.begin(); it != fValues.end(); ++it ) {
output.replace(CSL1("#%1#").arg(it.key()), it.data());
}
// Insert the list of databases
- QRegExp re(CSL1("#dblist\\[(.*)\\]#"));
+ TQRegExp re(CSL1("#dblist\\[(.*)\\]#"));
re.setMinimal(true);
while (re.search(output)>=0){
- QString dbstring;
- QString subpatt=re.cap(1);
+ TQString dbstring;
+ TQString subpatt=re.cap(1);
for (KPilotLink::DBInfoList::ConstIterator i = dblist.begin(); i != dblist.end(); ++i ) {
DBInfo dbi = *i;
- QString newpatt(subpatt);
+ TQString newpatt(subpatt);
char tmpchr[5];
::memset(&tmpchr[0], 0, 5);
/* Patterns for the dblist argument:
@@ -552,16 +552,16 @@ void SysInfoConduit::writeFile()
* %8 .. modifyDate
* %9 .. backupDate
*/
- newpatt.replace(CSL1("%0"), QString::fromLatin1(dbi.name));
+ newpatt.replace(CSL1("%0"), TQString::fromLatin1(dbi.name));
set_long(&tmpchr[0],dbi.type);
- newpatt.replace(CSL1("%1"), QString::fromLatin1(tmpchr));
+ newpatt.replace(CSL1("%1"), TQString::fromLatin1(tmpchr));
set_long(&tmpchr[0],dbi.creator);
- newpatt.replace(CSL1("%2"), QString::fromLatin1(tmpchr));
- newpatt.replace(CSL1("%3"), QString::number(dbi.index));
- newpatt.replace(CSL1("%4"), QString::number(dbi.flags));
- newpatt.replace(CSL1("%5"), QString::number(dbi.miscFlags));
- newpatt.replace(CSL1("%6"), QString::number(dbi.version));
- QDateTime tm;
+ newpatt.replace(CSL1("%2"), TQString::fromLatin1(tmpchr));
+ newpatt.replace(CSL1("%3"), TQString::number(dbi.index));
+ newpatt.replace(CSL1("%4"), TQString::number(dbi.flags));
+ newpatt.replace(CSL1("%5"), TQString::number(dbi.miscFlags));
+ newpatt.replace(CSL1("%6"), TQString::number(dbi.version));
+ TQDateTime tm;
tm.setTime_t(dbi.createDate);
newpatt.replace(CSL1("%7"), tm.toString(Qt::LocalDate));
tm.setTime_t(dbi.modifyDate);
@@ -576,12 +576,12 @@ void SysInfoConduit::writeFile()
}
// Write out the result
- QFile outfile(fOutputFile);
+ TQFile outfile(fOutputFile);
#ifdef DEBUG
DEBUGKPILOT << fname << ": Writing file <" << fOutputFile << ">" << endl;
#endif
if (fOutputFile.isEmpty() || (!outfile.open(IO_WriteOnly)) ) {
- QFileInfo fi(QDir::home(), CSL1("KPilotSysInfo.")+QFileInfo(templatefile).extension() );
+ TQFileInfo fi(TQDir::home(), CSL1("KPilotSysInfo.")+TQFileInfo(templatefile).extension() );
fOutputFile=fi.absFilePath();
WARNINGKPILOT << "Unable to open output file, using " << fOutputFile << " instead." << endl;
emit logMessage(i18n("Unable to open output file, using %1 instead.").arg(fOutputFile));
@@ -589,18 +589,18 @@ void SysInfoConduit::writeFile()
if (!outfile.open(IO_WriteOnly)) {
WARNINGKPILOT<< "Unable to open " << fOutputFile << endl;
emit logError(i18n("Unable to open %1").arg(fOutputFile));
- QTimer::singleShot(0, this, SLOT(cleanup()));
+ TQTimer::singleShot(0, this, TQT_SLOT(cleanup()));
return;
}
}
// Finally, write the actual text out to the file.
- QTextStream outstream(&outfile);
+ TQTextStream outstream(&outfile);
outstream<<output;
outfile.close();
emit logMessage(i18n("Handheld system information written to the file %1").arg(fOutputFile));
- QTimer::singleShot(0, this, SLOT(cleanup()));
+ TQTimer::singleShot(0, this, TQT_SLOT(cleanup()));
}
void SysInfoConduit::cleanup()
diff --git a/kpilot/conduits/sysinfoconduit/sysinfo-conduit.h b/kpilot/conduits/sysinfoconduit/sysinfo-conduit.h
index 05bc395d3..803bc7370 100644
--- a/kpilot/conduits/sysinfoconduit/sysinfo-conduit.h
+++ b/kpilot/conduits/sysinfoconduit/sysinfo-conduit.h
@@ -37,7 +37,7 @@ public:
SysInfoConduit(
KPilotLink *o,
const char *n = 0L,
- const QStringList &a = QStringList() );
+ const TQStringList &a = TQStringList() );
virtual ~SysInfoConduit();
virtual bool exec();
@@ -58,12 +58,12 @@ public slots:
protected:
void readConfig();
private:
- QMap<QString,QString> fValues;
+ TQMap<TQString,TQString> fValues;
bool fHardwareInfo, fUserInfo, fMemoryInfo, fStorageInfo,
fDBList, fRecordNumber, fSyncInfo,
fKDEVersion, fPalmOSVersion, fDebugInfo;
- QString fOutputFile, fTemplateFile;
+ TQString fOutputFile, fTemplateFile;
enum eOutputTypeEnum {
eOutputHTML=0,
eOutputText,
@@ -71,9 +71,9 @@ private:
} fOutputType;
KPilotLink::DBInfoList dblist;
- QStringList removeParts;
- QStringList keepParts;
- static const QString defaultpage;
+ TQStringList removeParts;
+ TQStringList keepParts;
+ static const TQString defaultpage;
} ;
#endif
diff --git a/kpilot/conduits/sysinfoconduit/sysinfo-setup.cc b/kpilot/conduits/sysinfoconduit/sysinfo-setup.cc
index ed7419ab3..271db659b 100644
--- a/kpilot/conduits/sysinfoconduit/sysinfo-setup.cc
+++ b/kpilot/conduits/sysinfoconduit/sysinfo-setup.cc
@@ -28,11 +28,11 @@
#include "options.h"
-#include <qtabwidget.h>
-#include <qradiobutton.h>
-#include <qcheckbox.h>
-#include <qbuttongroup.h>
-#include <qlistview.h>
+#include <tqtabwidget.h>
+#include <tqradiobutton.h>
+#include <tqcheckbox.h>
+#include <tqbuttongroup.h>
+#include <tqlistview.h>
#include <kaboutdata.h>
#include <kapplication.h>
@@ -81,11 +81,11 @@ const sysinfoEntry_t sysinfoEntries[] =
/*
** This is a convenience define to update an item's "original setting".
*/
-#define updateSetting(i) { QCheckListItem *ubbu=(i); \
- ubbu->setText(PART_SETTING,(ubbu->isOn() ? CSL1("1") : QString::null)); }
+#define updateSetting(i) { TQCheckListItem *ubbu=(i); \
+ ubbu->setText(PART_SETTING,(ubbu->isOn() ? CSL1("1") : TQString::null)); }
-SysInfoWidgetConfig::SysInfoWidgetConfig(QWidget *w, const char *n) :
+SysInfoWidgetConfig::SysInfoWidgetConfig(TQWidget *w, const char *n) :
ConduitConfigBase(w,n),
fConfigWidget(new SysInfoWidget(w))
{
@@ -103,12 +103,12 @@ SysInfoWidgetConfig::SysInfoWidgetConfig(QWidget *w, const char *n) :
ConduitConfigBase::addAboutPage(fConfigWidget->tabWidget,fAbout);
fWidget=fConfigWidget;
- QObject::connect(fConfigWidget->fOutputFile,SIGNAL(textChanged(const QString&)),
- this,SLOT(modified()));
- QObject::connect(fConfigWidget->fTemplateFile,SIGNAL(textChanged(const QString&)),
- this,SLOT(modified()));
- QObject::connect(fConfigWidget->fOutputType,SIGNAL(clicked(int)),
- this,SLOT(modified()));
+ TQObject::connect(fConfigWidget->fOutputFile,TQT_SIGNAL(textChanged(const TQString&)),
+ this,TQT_SLOT(modified()));
+ TQObject::connect(fConfigWidget->fTemplateFile,TQT_SIGNAL(textChanged(const TQString&)),
+ this,TQT_SLOT(modified()));
+ TQObject::connect(fConfigWidget->fOutputType,TQT_SIGNAL(clicked(int)),
+ this,TQT_SLOT(modified()));
fConduitName=i18n("System Information");
}
@@ -123,8 +123,8 @@ void SysInfoWidgetConfig::commit()
SysinfoSettings::setOutputFormat(
fConfigWidget->fOutputType->id(fConfigWidget->fOutputType->selected()));
- QListViewItem *i = fConfigWidget->fPartsList->firstChild();
- QCheckListItem *ci = dynamic_cast<QCheckListItem *>(i);
+ TQListViewItem *i = fConfigWidget->fPartsList->firstChild();
+ TQCheckListItem *ci = dynamic_cast<TQCheckListItem *>(i);
while(ci)
{
#ifdef DEBUG
@@ -139,7 +139,7 @@ void SysInfoWidgetConfig::commit()
}
updateSetting(ci);
i=i->nextSibling();
- ci = dynamic_cast<QCheckListItem *>(i);
+ ci = dynamic_cast<TQCheckListItem *>(i);
}
SysinfoSettings::self()->writeConfig();
unmodified();
@@ -151,13 +151,13 @@ void SysInfoWidgetConfig::load()
SysinfoSettings::self()->readConfig();
const sysinfoEntry_t *p = sysinfoEntries;
- QCheckListItem *i = 0L;
+ TQCheckListItem *i = 0L;
while (p && p->name)
{
- i = new QCheckListItem(fConfigWidget->fPartsList,i18n(p->name),QCheckListItem::CheckBox);
+ i = new TQCheckListItem(fConfigWidget->fPartsList,i18n(p->name),TQCheckListItem::CheckBox);
// by default let the sysinfo conduit write out all available information
i->setOn( p->accessor() );
- i->setText(PART_KEY, QString::number(p-sysinfoEntries)); // store index there
+ i->setText(PART_KEY, TQString::number(p-sysinfoEntries)); // store index there
updateSetting(i);
#ifdef DEBUG
DEBUGKPILOT << fname << ": Loaded " << p->name
@@ -177,8 +177,8 @@ void SysInfoWidgetConfig::load()
FUNCTIONSETUP;
if (fModified) return true;
- QListViewItem *i = fConfigWidget->fPartsList->firstChild();
- QCheckListItem *ci = dynamic_cast<QCheckListItem *>(i);
+ TQListViewItem *i = fConfigWidget->fPartsList->firstChild();
+ TQCheckListItem *ci = dynamic_cast<TQCheckListItem *>(i);
while(ci)
{
@@ -192,7 +192,7 @@ void SysInfoWidgetConfig::load()
if (current!=original) return true;
i=i->nextSibling();
- ci = dynamic_cast<QCheckListItem *>(i);
+ ci = dynamic_cast<TQCheckListItem *>(i);
}
return false;
}
diff --git a/kpilot/conduits/sysinfoconduit/sysinfo-setup.h b/kpilot/conduits/sysinfoconduit/sysinfo-setup.h
index 41e55eb86..400dea3c1 100644
--- a/kpilot/conduits/sysinfoconduit/sysinfo-setup.h
+++ b/kpilot/conduits/sysinfoconduit/sysinfo-setup.h
@@ -36,7 +36,7 @@ class SysInfoWidget;
class SysInfoWidgetConfig : public ConduitConfigBase
{
public:
- SysInfoWidgetConfig(QWidget *parent, const char *);
+ SysInfoWidgetConfig(TQWidget *parent, const char *);
virtual void commit();
virtual void load();
virtual bool isModified() const;
diff --git a/kpilot/conduits/timeconduit/time-conduit.cc b/kpilot/conduits/timeconduit/time-conduit.cc
index c1455b359..76798dbed 100644
--- a/kpilot/conduits/timeconduit/time-conduit.cc
+++ b/kpilot/conduits/timeconduit/time-conduit.cc
@@ -50,7 +50,7 @@ unsigned long version_conduit_time = Pilot::PLUGIN_API ;
TimeConduit::TimeConduit(KPilotLink * o,
const char *n,
- const QStringList & a) :
+ const TQStringList & a) :
ConduitAction(o, n, a)
{
FUNCTIONSETUP;
@@ -83,7 +83,7 @@ void TimeConduit::readConfig()
{
#ifdef DEBUG
DEBUGKPILOT << fname << ": Would have set time to "
- << QDateTime::currentDateTime().toString() << endl;
+ << TQDateTime::currentDateTime().toString() << endl;
#endif
return delayDone();
}
diff --git a/kpilot/conduits/timeconduit/time-conduit.h b/kpilot/conduits/timeconduit/time-conduit.h
index 8a6a57a50..06b6b50e1 100644
--- a/kpilot/conduits/timeconduit/time-conduit.h
+++ b/kpilot/conduits/timeconduit/time-conduit.h
@@ -36,7 +36,7 @@ public:
TimeConduit(
KPilotLink *o,
const char *n = 0L,
- const QStringList &a = QStringList() );
+ const TQStringList &a = TQStringList() );
virtual ~TimeConduit();
virtual bool exec();
diff --git a/kpilot/conduits/timeconduit/time-setup.cc b/kpilot/conduits/timeconduit/time-setup.cc
index ce562d7dd..409cdc346 100644
--- a/kpilot/conduits/timeconduit/time-setup.cc
+++ b/kpilot/conduits/timeconduit/time-setup.cc
@@ -28,9 +28,9 @@
#include "options.h"
-#include <qtabwidget.h>
-#include <qradiobutton.h>
-#include <qbuttongroup.h>
+#include <tqtabwidget.h>
+#include <tqradiobutton.h>
+#include <tqbuttongroup.h>
#include <kapplication.h>
#include <kaboutdata.h>
@@ -57,7 +57,7 @@ static KAboutData *createAbout()
-TimeWidgetConfig::TimeWidgetConfig(QWidget *w, const char *n) :
+TimeWidgetConfig::TimeWidgetConfig(TQWidget *w, const char *n) :
ConduitConfigBase(w,n),
fConfigWidget(new TimeWidget(w))
{
diff --git a/kpilot/conduits/timeconduit/time-setup.h b/kpilot/conduits/timeconduit/time-setup.h
index 7552c12d6..b0bb2f0ae 100644
--- a/kpilot/conduits/timeconduit/time-setup.h
+++ b/kpilot/conduits/timeconduit/time-setup.h
@@ -38,10 +38,10 @@ class TimeWidgetConfig : public ConduitConfigBase
{
Q_OBJECT
public:
- TimeWidgetConfig(QWidget *parent, const char *);
+ TimeWidgetConfig(TQWidget *parent, const char *);
virtual void commit();
virtual void load();
- static ConduitConfigBase *create(QWidget *,const char *);
+ static ConduitConfigBase *create(TQWidget *,const char *);
protected:
TimeWidget *fConfigWidget;
KAboutData *fAbout;
diff --git a/kpilot/conduits/vcalconduit/cleanupstate.cc b/kpilot/conduits/vcalconduit/cleanupstate.cc
index 29b1f6ea5..209a0e918 100644
--- a/kpilot/conduits/vcalconduit/cleanupstate.cc
+++ b/kpilot/conduits/vcalconduit/cleanupstate.cc
@@ -29,7 +29,7 @@
#include <options.h>
#include <kio/netaccess.h>
-#include <qfile.h>
+#include <tqfile.h>
#include "pilotDatabase.h"
@@ -74,7 +74,7 @@ void CleanUpState::startSync( ConduitAction *ca )
}
KCal::Calendar *fCalendar = vccb->calendar();
- QString fCalendarFile = vccb->calendarFile();
+ TQString fCalendarFile = vccb->calendarFile();
if ( fCalendar )
{
@@ -96,7 +96,7 @@ void CleanUpState::startSync( ConduitAction *ca )
else {
KIO::NetAccess::removeTempFile( fCalendarFile );
}
- QFile backup( fCalendarFile + CSL1( "~" ) );
+ TQFile backup( fCalendarFile + CSL1( "~" ) );
backup.remove();
}
break;
diff --git a/kpilot/conduits/vcalconduit/hhtopcstate.cc b/kpilot/conduits/vcalconduit/hhtopcstate.cc
index 79089671d..82024f123 100644
--- a/kpilot/conduits/vcalconduit/hhtopcstate.cc
+++ b/kpilot/conduits/vcalconduit/hhtopcstate.cc
@@ -186,13 +186,13 @@ void VCalConduitBase::slotPalmRecToPC()
if ( syncMode()==SyncMode::eCopyHHToPC )
{
emit logMessage(i18n("Cleaning up ..."));
- QTimer::singleShot(0, this, SLOT(cleanup()));
+ TQTimer::singleShot(0, this, TQT_SLOT(cleanup()));
return;
}
else
{
emit logMessage(i18n("Copying records to Pilot ..."));
- QTimer::singleShot(0 ,this,SLOT(slotPCRecToPalm()));
+ TQTimer::singleShot(0 ,this,TQT_SLOT(slotPCRecToPalm()));
return;
}
}
@@ -244,6 +244,6 @@ void VCalConduitBase::slotPalmRecToPC()
KPILOT_DELETE(r);
KPILOT_DELETE(s);
- QTimer::singleShot(0,this,SLOT(slotPalmRecToPC()));
+ TQTimer::singleShot(0,this,TQT_SLOT(slotPalmRecToPC()));
}
*/
diff --git a/kpilot/conduits/vcalconduit/kcalRecord.cc b/kpilot/conduits/vcalconduit/kcalRecord.cc
index f12d9b8c3..598866dc5 100644
--- a/kpilot/conduits/vcalconduit/kcalRecord.cc
+++ b/kpilot/conduits/vcalconduit/kcalRecord.cc
@@ -49,8 +49,8 @@ void KCalSync::setCategory(PilotRecordBase *de,
return;
}
- QString deCategory;
- QStringList eventCategories = e->categories();
+ TQString deCategory;
+ TQStringList eventCategories = e->categories();
if (eventCategories.size() < 1)
{
// This event has no categories.
@@ -70,14 +70,14 @@ void KCalSync::setCategory(PilotRecordBase *de,
}
}
- QStringList availableHandheldCategories = Pilot::categoryNames(&info);
+ TQStringList availableHandheldCategories = Pilot::categoryNames(&info);
// Either the record is unfiled, and should be filed, or
// it has a category set which is not in the list of
// categories that the event has. So go looking for
// a category that is available both for the event
// and on the handheld.
- for ( QStringList::ConstIterator it = eventCategories.begin();
+ for ( TQStringList::ConstIterator it = eventCategories.begin();
it != eventCategories.end(); ++it )
{
// Odd, an empty category string.
@@ -113,9 +113,9 @@ void KCalSync::setCategory(KCal::Incidence *e,
return;
}
- QStringList cats=e->categories();
+ TQStringList cats=e->categories();
int cat = de->category();
- QString newcat = Pilot::categoryName(&info,cat);
+ TQString newcat = Pilot::categoryName(&info,cat);
DEBUGKPILOT << fname << ": palm category id: [" << cat <<
"], label: [" << newcat << "]" << endl;
diff --git a/kpilot/conduits/vcalconduit/pctohhstate.cc b/kpilot/conduits/vcalconduit/pctohhstate.cc
index b68771f13..d2866fd19 100644
--- a/kpilot/conduits/vcalconduit/pctohhstate.cc
+++ b/kpilot/conduits/vcalconduit/pctohhstate.cc
@@ -111,8 +111,8 @@ void PCToHHState::handleRecord( ConduitAction *ca )
DEBUGKPILOT << fname << ": found PC entry with pilotID " << id <<endl;
DEBUGKPILOT << fname << ": Description: " << e->summary() << endl;
- QDateTime start_time = e->dtStart();
- QDateTime end_time = e->dtEnd();
+ TQDateTime start_time = e->dtStart();
+ TQDateTime end_time = e->dtEnd();
DEBUGKPILOT << fname << ": Time: "<< start_time.toString() << " until "
<< end_time.toString() << endl;
diff --git a/kpilot/conduits/vcalconduit/teststate.cc b/kpilot/conduits/vcalconduit/teststate.cc
index d8c8e56cc..c762d32b4 100644
--- a/kpilot/conduits/vcalconduit/teststate.cc
+++ b/kpilot/conduits/vcalconduit/teststate.cc
@@ -28,8 +28,8 @@
#include <options.h>
-#include <qdatetime.h>
-#include <qfile.h>
+#include <tqdatetime.h>
+#include <tqfile.h>
#include "pilotSerialDatabase.h"
#include "pilotLocalDatabase.h"
@@ -38,7 +38,7 @@
#include "teststate.h"
#include "vcal-conduitbase.h"
-TestState::TestState() : fCalendar( QString::null )
+TestState::TestState() : fCalendar( TQString::null )
{
fState = eTest;
}
@@ -109,7 +109,7 @@ void TestState::finishSync( ConduitAction *ca )
// No more records present on the device so lets dump the
// readed records in a file.
- QFile f( CSL1("dump.ics") );
+ TQFile f( CSL1("dump.ics") );
if( !f.exists() )
{
f.open( IO_WriteOnly );
diff --git a/kpilot/conduits/vcalconduit/todo-conduit.cc b/kpilot/conduits/vcalconduit/todo-conduit.cc
index 302ada565..9b1007c20 100644
--- a/kpilot/conduits/vcalconduit/todo-conduit.cc
+++ b/kpilot/conduits/vcalconduit/todo-conduit.cc
@@ -34,8 +34,8 @@
#include "options.h"
-#include <qdatetime.h>
-#include <qtextcodec.h>
+#include <tqdatetime.h>
+#include <tqtextcodec.h>
#include <libkcal/calendar.h>
#include <libkcal/todo.h>
@@ -110,8 +110,8 @@ KCal::Incidence *TodoConduitPrivate::findIncidence(PilotRecordBase *tosearch)
PilotTodoEntry*entry=dynamic_cast<PilotTodoEntry*>(tosearch);
if (!entry) return 0L;
- QString title=entry->getDescription();
- QDateTime dt=readTm( entry->getDueDate() );
+ TQString title=entry->getDescription();
+ TQDateTime dt=readTm( entry->getDueDate() );
KCal::Todo::List::ConstIterator it;
for( it = fAllTodos.begin(); it != fAllTodos.end(); ++it ) {
@@ -176,7 +176,7 @@ KCal::Incidence *TodoConduitPrivate::getNextModifiedIncidence()
TodoConduit::TodoConduit(KPilotLink *d,
const char *n,
- const QStringList &a) : VCalConduitBase(d,n,a),
+ const TQStringList &a) : VCalConduitBase(d,n,a),
fTodoAppInfo( 0L )
{
FUNCTIONSETUP;
@@ -223,14 +223,14 @@ void TodoConduit::_getAppInfo()
-const QString TodoConduit::getTitle(PilotRecordBase *de)
+const TQString TodoConduit::getTitle(PilotRecordBase *de)
{
PilotTodoEntry*d=dynamic_cast<PilotTodoEntry*>(de);
if (d)
{
- return QString(d->getDescription());
+ return TQString(d->getDescription());
}
- return QString::null;
+ return TQString::null;
}
diff --git a/kpilot/conduits/vcalconduit/todo-conduit.h b/kpilot/conduits/vcalconduit/todo-conduit.h
index 3364d61f2..8d8780eba 100644
--- a/kpilot/conduits/vcalconduit/todo-conduit.h
+++ b/kpilot/conduits/vcalconduit/todo-conduit.h
@@ -67,13 +67,13 @@ Q_OBJECT
public:
TodoConduit(KPilotLink *,
const char *name=0L,
- const QStringList &args = QStringList());
+ const TQStringList &args = TQStringList());
virtual ~TodoConduit();
protected:
- virtual const QString getTitle(PilotRecordBase *de);
+ virtual const TQString getTitle(PilotRecordBase *de);
- virtual const QString dbname() { return CSL1("ToDoDB"); };
+ virtual const TQString dbname() { return CSL1("ToDoDB"); };
virtual void preSync();
virtual VCalConduitPrivateBase *createPrivateCalendarData(KCal::Calendar *fCalendar)
{
diff --git a/kpilot/conduits/vcalconduit/todo-setup.cc b/kpilot/conduits/vcalconduit/todo-setup.cc
index eb1c98c91..19a731c5a 100644
--- a/kpilot/conduits/vcalconduit/todo-setup.cc
+++ b/kpilot/conduits/vcalconduit/todo-setup.cc
@@ -29,7 +29,7 @@
#include "options.h"
-#include <qbuttongroup.h>
+#include <tqbuttongroup.h>
#include <kaboutdata.h>
#include "korganizerConduit.h"
@@ -38,7 +38,7 @@
-ToDoWidgetSetup::ToDoWidgetSetup(QWidget *w, const char *n) :
+ToDoWidgetSetup::ToDoWidgetSetup(TQWidget *w, const char *n) :
VCalWidgetSetupBase(w,n)
{
FUNCTIONSETUP;
@@ -74,7 +74,7 @@ ToDoWidgetSetup::~ToDoWidgetSetup()
FUNCTIONSETUP;
}
-/* static */ ConduitConfigBase *ToDoWidgetSetup::create(QWidget *w, const char *n)
+/* static */ ConduitConfigBase *ToDoWidgetSetup::create(TQWidget *w, const char *n)
{
return new ToDoWidgetSetup(w,n);
}
diff --git a/kpilot/conduits/vcalconduit/todo-setup.h b/kpilot/conduits/vcalconduit/todo-setup.h
index 9eebd3a3d..b9b919c92 100644
--- a/kpilot/conduits/vcalconduit/todo-setup.h
+++ b/kpilot/conduits/vcalconduit/todo-setup.h
@@ -34,11 +34,11 @@
class ToDoWidgetSetup : public VCalWidgetSetupBase
{
public:
- ToDoWidgetSetup(QWidget *,const char *);
+ ToDoWidgetSetup(TQWidget *,const char *);
virtual ~ToDoWidgetSetup();
virtual VCalConduitSettings*config();
- static ConduitConfigBase *create(QWidget *, const char *);
+ static ConduitConfigBase *create(TQWidget *, const char *);
} ;
#endif
diff --git a/kpilot/conduits/vcalconduit/todoRecord.cc b/kpilot/conduits/vcalconduit/todoRecord.cc
index 7db753fb5..7618df368 100644
--- a/kpilot/conduits/vcalconduit/todoRecord.cc
+++ b/kpilot/conduits/vcalconduit/todoRecord.cc
@@ -126,7 +126,7 @@ bool KCalSync::setTodo(KCal::Todo *e,
// COMPLETED? //
e->setCompleted(de->getComplete());
if ( de->getComplete() && !e->hasCompletedDate() ) {
- e->setCompleted( QDateTime::currentDateTime() );
+ e->setCompleted( TQDateTime::currentDateTime() );
}
e->setSummary(de->getDescription());
diff --git a/kpilot/conduits/vcalconduit/vcal-conduit.cc b/kpilot/conduits/vcalconduit/vcal-conduit.cc
index 0eea42733..d882cf8f8 100644
--- a/kpilot/conduits/vcalconduit/vcal-conduit.cc
+++ b/kpilot/conduits/vcalconduit/vcal-conduit.cc
@@ -104,8 +104,8 @@ KCal::Incidence *VCalConduitPrivate::findIncidence(PilotRecordBase *tosearch)
PilotDateEntry*entry=dynamic_cast<PilotDateEntry*>(tosearch);
if (!entry) return 0L;
- QString title=entry->getDescription();
- QDateTime dt=readTm( entry->getEventStart() );
+ TQString title=entry->getDescription();
+ TQDateTime dt=readTm( entry->getEventStart() );
KCal::Event::List::ConstIterator it;
for( it = fAllEvents.begin(); it != fAllEvents.end(); ++it ) {
@@ -170,7 +170,7 @@ KCal::Incidence *VCalConduitPrivate::getNextModifiedIncidence()
VCalConduit::VCalConduit(KPilotLink *d,
const char *n,
- const QStringList &a) :
+ const TQStringList &a) :
VCalConduitBase(d,n,a),
fAppointmentAppInfo( 0L )
{
@@ -196,11 +196,11 @@ void VCalConduit::_getAppInfo()
fAppointmentAppInfo = new PilotDateInfo( fDatabase );
}
-const QString VCalConduit::getTitle(PilotRecordBase *de)
+const TQString VCalConduit::getTitle(PilotRecordBase *de)
{
PilotDateEntry*d=dynamic_cast<PilotDateEntry*>(de);
- if (d) return QString(d->getDescription());
- return QString::null;
+ if (d) return TQString(d->getDescription());
+ return TQString::null;
}
diff --git a/kpilot/conduits/vcalconduit/vcal-conduit.h b/kpilot/conduits/vcalconduit/vcal-conduit.h
index c41ceb906..ed47d712f 100644
--- a/kpilot/conduits/vcalconduit/vcal-conduit.h
+++ b/kpilot/conduits/vcalconduit/vcal-conduit.h
@@ -70,11 +70,11 @@ Q_OBJECT
public:
VCalConduit(KPilotLink *,
const char *name=0L,
- const QStringList &args = QStringList());
+ const TQStringList &args = TQStringList());
virtual ~VCalConduit();
protected:
- virtual const QString dbname() { return CSL1("DatebookDB"); };
+ virtual const TQString dbname() { return CSL1("DatebookDB"); };
virtual void preSync() {VCalConduitBase::preSync(); _getAppInfo(); };
virtual VCalConduitPrivateBase *createPrivateCalendarData(KCal::Calendar *fCalendar);
@@ -84,7 +84,7 @@ protected:
virtual PilotRecordBase *newPilotEntry(PilotRecord*r);
virtual KCal::Incidence*newIncidence();
- virtual const QString getTitle(PilotRecordBase *de);
+ virtual const TQString getTitle(PilotRecordBase *de);
virtual VCalConduitSettings *config();
public:
static VCalConduitSettings *theConfig();
diff --git a/kpilot/conduits/vcalconduit/vcal-conduitbase.cc b/kpilot/conduits/vcalconduit/vcal-conduitbase.cc
index a9fc6376b..cd288ba59 100644
--- a/kpilot/conduits/vcalconduit/vcal-conduitbase.cc
+++ b/kpilot/conduits/vcalconduit/vcal-conduitbase.cc
@@ -33,8 +33,8 @@
#include <options.h>
-#include <qtimer.h>
-#include <qfile.h>
+#include <tqtimer.h>
+#include <tqfile.h>
#include <kmessagebox.h>
#include <kio/netaccess.h>
@@ -66,7 +66,7 @@
VCalConduitBase::VCalConduitBase(KPilotLink *d,
const char *n,
- const QStringList &a) :
+ const TQStringList &a) :
ConduitAction(d,n,a),
fCalendar(0L),
fP(0L)
@@ -176,7 +176,7 @@ VCalConduitBase::~VCalConduitBase()
if (!syncMode().isTest() && !openCalendar() ) goto error;
// Start processing the sync
- QTimer::singleShot(0, this, SLOT(slotProcess()));
+ TQTimer::singleShot(0, this, TQT_SLOT(slotProcess()));
return true;
error:
@@ -200,13 +200,13 @@ void VCalConduitBase::slotProcess() {
if( hasNextRecord )
{
fState->handleRecord( this );
- QTimer::singleShot( 0, this, SLOT( slotProcess() ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( slotProcess() ) );
}
// Else finish the current state if there is one
else if( fState )
{
fState->finishSync( this );
- QTimer::singleShot( 0, this, SLOT( slotProcess() ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( slotProcess() ) );
}
// No state so sync is finished
else
@@ -245,7 +245,7 @@ static void listResources( KCal::CalendarResources *p )
// this part taken from adcalendarbase.cpp:
korgcfg.setGroup( "Time & Date" );
- QString tz(korgcfg.readEntry( "TimeZoneId" ) );
+ TQString tz(korgcfg.readEntry( "TimeZoneId" ) );
DEBUGKPILOT << fname << ": KOrganizer's time zone = " << tz << endl;
@@ -312,7 +312,7 @@ static void listResources( KCal::CalendarResources *p )
// Try to create empty file. if it fails,
// no valid file name was given.
- QFile fl(fCalendarFile);
+ TQFile fl(fCalendarFile);
if (!fl.open(IO_WriteOnly | IO_Append))
{
DEBUGKPILOT << fname << "Invalid calendar file name "
@@ -422,7 +422,7 @@ int VCalConduitBase::resolveConflict( KCal::Incidence *e, PilotRecordBase *de )
if ( getConflictResolution() == SyncAction::eAskUser )
{
// TODO: This is messed up!!!
- QString query = i18n( "The following item was modified "
+ TQString query = i18n( "The following item was modified "
"both on the Handheld and on your PC:\nPC entry:\n\t" );
query += e->summary();
query += i18n( "\nHandheld entry:\n\t" );
@@ -433,7 +433,7 @@ int VCalConduitBase::resolveConflict( KCal::Incidence *e, PilotRecordBase *de )
return KMessageBox::No == questionYesNo(
query,
i18n( "Conflicting Entries" ),
- QString::null,
+ TQString::null,
0 /* Never timeout */,
i18n( "Handheld" ), i18n( "PC" ));
}
@@ -579,9 +579,9 @@ void VCalConduitBase::updateIncidenceOnPalm( KCal::Incidence *e,
}
}
-const QString VCalConduitBase::dbname()
+const TQString VCalConduitBase::dbname()
{
- return QString::null;
+ return TQString::null;
}
PilotRecord *VCalConduitBase::readRecordByIndex( int index )
diff --git a/kpilot/conduits/vcalconduit/vcal-conduitbase.h b/kpilot/conduits/vcalconduit/vcal-conduitbase.h
index 7d2fc6588..4e2f3ae10 100644
--- a/kpilot/conduits/vcalconduit/vcal-conduitbase.h
+++ b/kpilot/conduits/vcalconduit/vcal-conduitbase.h
@@ -30,7 +30,7 @@
*/
-#include <qstring.h>
+#include <tqstring.h>
#include <libkcal/calendarlocal.h>
@@ -78,7 +78,7 @@ class VCalConduitBase : public ConduitAction
public:
VCalConduitBase(KPilotLink *,
const char *name = 0L,
- const QStringList &args = QStringList());
+ const TQStringList &args = TQStringList());
virtual ~VCalConduitBase();
/*********************************************************************
@@ -86,13 +86,13 @@ public:
*********************************************************************/
protected:
KCal::Calendar *fCalendar;
- QString fCalendarFile;
+ TQString fCalendarFile;
VCalConduitPrivateBase *fP;
ConduitState *fState;
bool hasNextRecord;
- virtual const QString dbname() = 0;
- virtual const QString getTitle(PilotRecordBase *de) = 0;
+ virtual const TQString dbname() = 0;
+ virtual const TQString getTitle(PilotRecordBase *de) = 0;
virtual void readConfig();
virtual bool exec();
@@ -147,7 +147,7 @@ public:
// Getters
KCal::Calendar *calendar() const { return fCalendar; };
- QString calendarFile() const { return fCalendarFile; };
+ TQString calendarFile() const { return fCalendarFile; };
virtual VCalConduitSettings *config() = 0;
virtual PilotDatabase *database() const { return fDatabase; };
diff --git a/kpilot/conduits/vcalconduit/vcal-setup.cc b/kpilot/conduits/vcalconduit/vcal-setup.cc
index 666e9ee0a..0361c3255 100644
--- a/kpilot/conduits/vcalconduit/vcal-setup.cc
+++ b/kpilot/conduits/vcalconduit/vcal-setup.cc
@@ -29,7 +29,7 @@
#include "options.h"
-#include <qbuttongroup.h>
+#include <tqbuttongroup.h>
#include <kaboutdata.h>
#include "korganizerConduit.h"
@@ -37,7 +37,7 @@
#include "vcal-setup.h"
-VCalWidgetSetup::VCalWidgetSetup(QWidget *w, const char *n) :
+VCalWidgetSetup::VCalWidgetSetup(TQWidget *w, const char *n) :
VCalWidgetSetupBase(w,n)
{
KAboutData *fAbout = new KAboutData("vcalConduit",
@@ -71,7 +71,7 @@ VCalWidgetSetup::VCalWidgetSetup(QWidget *w, const char *n) :
}
-/* static */ ConduitConfigBase *VCalWidgetSetup::create(QWidget *w,const char *n)
+/* static */ ConduitConfigBase *VCalWidgetSetup::create(TQWidget *w,const char *n)
{
return new VCalWidgetSetup(w,n);
}
diff --git a/kpilot/conduits/vcalconduit/vcal-setup.h b/kpilot/conduits/vcalconduit/vcal-setup.h
index 407c0d99f..20723ceb8 100644
--- a/kpilot/conduits/vcalconduit/vcal-setup.h
+++ b/kpilot/conduits/vcalconduit/vcal-setup.h
@@ -37,8 +37,8 @@ class VCalConduitSettings;
class VCalWidgetSetup : public VCalWidgetSetupBase
{
public:
- VCalWidgetSetup(QWidget *, const char *);
- static ConduitConfigBase *create(QWidget *, const char *);
+ VCalWidgetSetup(TQWidget *, const char *);
+ static ConduitConfigBase *create(TQWidget *, const char *);
protected:
virtual VCalConduitSettings*config();
} ;
diff --git a/kpilot/conduits/vcalconduit/vcal-setupbase.cc b/kpilot/conduits/vcalconduit/vcal-setupbase.cc
index 3e97987fa..643dee645 100644
--- a/kpilot/conduits/vcalconduit/vcal-setupbase.cc
+++ b/kpilot/conduits/vcalconduit/vcal-setupbase.cc
@@ -29,9 +29,9 @@
#include "options.h"
-#include <qcheckbox.h>
-#include <qbuttongroup.h>
-#include <qcombobox.h>
+#include <tqcheckbox.h>
+#include <tqbuttongroup.h>
+#include <tqcombobox.h>
#include <kurlrequester.h>
@@ -39,7 +39,7 @@
#include "vcalconduitSettings.h"
#include "vcal-setupbase.h"
-VCalWidgetSetupBase::VCalWidgetSetupBase(QWidget *w, const char *n) :
+VCalWidgetSetupBase::VCalWidgetSetupBase(TQWidget *w, const char *n) :
ConduitConfigBase(w,n),
fConfigWidget(new VCalWidget(w))
{
@@ -49,11 +49,11 @@ VCalWidgetSetupBase::VCalWidgetSetupBase(QWidget *w, const char *n) :
fConfigWidget->fCalendarFile->setMode(KFile::File);
fConfigWidget->fCalendarFile->setFilter(CSL1("*.vcs *.ics|ICalendars\n*.*|All Files (*.*)"));
-#define CM(a,b) connect(fConfigWidget->a,b,this,SLOT(modified()));
- CM(fSyncDestination,SIGNAL(clicked(int)));
- CM(fCalendarFile,SIGNAL(textChanged(const QString &)));
- CM(fArchive,SIGNAL(toggled(bool)));
- CM(fConflictResolution,SIGNAL(activated(int)));
+#define CM(a,b) connect(fConfigWidget->a,b,this,TQT_SLOT(modified()));
+ CM(fSyncDestination,TQT_SIGNAL(clicked(int)));
+ CM(fCalendarFile,TQT_SIGNAL(textChanged(const TQString &)));
+ CM(fArchive,TQT_SIGNAL(toggled(bool)));
+ CM(fConflictResolution,TQT_SIGNAL(activated(int)));
#undef CM
}
diff --git a/kpilot/conduits/vcalconduit/vcal-setupbase.h b/kpilot/conduits/vcalconduit/vcal-setupbase.h
index 7863659bd..a14bf14d8 100644
--- a/kpilot/conduits/vcalconduit/vcal-setupbase.h
+++ b/kpilot/conduits/vcalconduit/vcal-setupbase.h
@@ -37,7 +37,7 @@ class VCalConduitSettings;
class VCalWidgetSetupBase : public ConduitConfigBase
{
public:
- VCalWidgetSetupBase(QWidget *, const char *);
+ VCalWidgetSetupBase(TQWidget *, const char *);
virtual ~VCalWidgetSetupBase();
virtual void load();
diff --git a/kpilot/conduits/vcalconduit/vcalRecord.cc b/kpilot/conduits/vcalconduit/vcalRecord.cc
index f9866d91a..898bc7986 100644
--- a/kpilot/conduits/vcalconduit/vcalRecord.cc
+++ b/kpilot/conduits/vcalconduit/vcalRecord.cc
@@ -70,7 +70,7 @@ static void setAlarms(KCal::Event *e, const PilotDateEntry *de)
e->clearAlarms();
if (!de->isAlarmEnabled()) return;
-// QDateTime alarmDT = readTm(de->getEventStart());
+// TQDateTime alarmDT = readTm(de->getEventStart());
int advanceUnits = de->getAdvanceUnits();
switch (advanceUnits)
@@ -117,7 +117,7 @@ static void setRecurrence(KCal::Event *event,const PilotDateEntry *dateEntry)
KCal::Recurrence *recur = event->recurrence();
int freq = dateEntry->getRepeatFrequency();
bool repeatsForever = dateEntry->getRepeatForever();
- QDate endDate, evt;
+ TQDate endDate, evt;
if (!repeatsForever)
{
@@ -131,7 +131,7 @@ static void setRecurrence(KCal::Event *event,const PilotDateEntry *dateEntry)
#endif
}
- QBitArray dayArray(7);
+ TQBitArray dayArray(7);
switch(dateEntry->getRepeatType())
{
@@ -326,7 +326,7 @@ static void setRecurrence(PilotDateEntry*dateEntry, const KCal::Event *event)
// first we have 'fake type of recurrence' when a multi-day event is passed to the pilot, it is converted to an event
// which recurs daily a number of times. if the event itself recurs, this will be overridden, and
// only the first day will be included in the event!!!!
- QDateTime startDt(readTm(dateEntry->getEventStart())), endDt(readTm(dateEntry->getEventEnd()));
+ TQDateTime startDt(readTm(dateEntry->getEventStart())), endDt(readTm(dateEntry->getEventEnd()));
if (startDt.daysTo(endDt))
{
isMultiDay=true;
@@ -350,7 +350,7 @@ static void setRecurrence(PilotDateEntry*dateEntry, const KCal::Event *event)
int freq=r->frequency();
- QDate endDate=r->endDate();
+ TQDate endDate=r->endDate();
if ( r->duration() < 0 || !endDate.isValid() )
{
@@ -366,7 +366,7 @@ static void setRecurrence(PilotDateEntry*dateEntry, const KCal::Event *event)
DEBUGKPILOT<< "duration: "<<r->duration() << ", endDate: "<<endDate.toString()<< ", ValidEndDate: "<<endDate.isValid()<<", NullEndDate: "<<endDate.isNull()<<endl;
#endif
- QBitArray dayArray(7), dayArrayPalm(7);
+ TQBitArray dayArray(7), dayArrayPalm(7);
switch(recType)
{
case KCal::Recurrence::rDaily:
@@ -392,7 +392,7 @@ static void setRecurrence(PilotDateEntry*dateEntry, const KCal::Event *event)
if (r->monthPositions().count()>0)
{
// Only take the first monthly position, as the palm allows only one
- QValueList<KCal::RecurrenceRule::WDayPos> mps=r->monthPositions();
+ TQValueList<KCal::RecurrenceRule::WDayPos> mps=r->monthPositions();
KCal::RecurrenceRule::WDayPos mp=mps.first();
int week = mp.pos();
int day = (mp.day()+1) % 7; // rotate because of different offset
diff --git a/kpilot/kpilot/addressEditor.cc b/kpilot/kpilot/addressEditor.cc
index 0ea0032bf..cfab322e9 100644
--- a/kpilot/kpilot/addressEditor.cc
+++ b/kpilot/kpilot/addressEditor.cc
@@ -33,13 +33,13 @@
#endif
#ifndef QLINEEDIT_H
-#include <qlineedit.h>
+#include <tqlineedit.h>
#endif
#ifndef QLAYOUT_H
-#include <qlayout.h>
+#include <tqlayout.h>
#endif
#ifndef QLABEL_H
-#include <qlabel.h>
+#include <tqlabel.h>
#endif
#ifndef _KDEBUG_H
#include <kdebug.h>
@@ -54,7 +54,7 @@
AddressEditor::AddressEditor(PilotAddress * p,
PilotAddressInfo *appInfo,
- QWidget * parent,
+ TQWidget * parent,
const char *name) :
KDialogBase(KDialogBase::Plain,
i18n("Address Editor"),
@@ -69,8 +69,8 @@ AddressEditor::AddressEditor(PilotAddress * p,
initLayout();
fillFields();
- connect(parent, SIGNAL(recordChanged(PilotAddress *)),
- this, SLOT(updateRecord(PilotAddress *)));
+ connect(parent, TQT_SIGNAL(recordChanged(PilotAddress *)),
+ this, TQT_SLOT(updateRecord(PilotAddress *)));
}
@@ -100,7 +100,7 @@ AddressEditor::~AddressEditor()
/*
* Return phone label from AddressAppInfo + some sanity checking
*/
-QString AddressEditor::phoneLabelText(PilotAddress * addr, const PhoneSlot &i)
+TQString AddressEditor::phoneLabelText(PilotAddress * addr, const PhoneSlot &i)
{
FUNCTIONSETUP;
if (!addr)
@@ -109,7 +109,7 @@ QString AddressEditor::phoneLabelText(PilotAddress * addr, const PhoneSlot &i)
}
PilotAddressInfo::EPhoneType idx = addr->getPhoneType(i);
- QString ret = fAppInfo->phoneLabel(idx) + CSL1(":");
+ TQString ret = fAppInfo->phoneLabel(idx) + CSL1(":");
return ret;
}
@@ -154,16 +154,16 @@ void AddressEditor::fillFields()
#define MakeField(text,field,row,column) \
- t=new QLabel(text,p); \
- field = new QLineEdit(p); \
+ t=new TQLabel(text,p); \
+ field = new TQLineEdit(p); \
field->setMinimumWidth(20*SPACING); \
t->setBuddy(field); \
grid->addWidget(t,row,column); \
grid->addWidget(field,row,column+1);
#define MakeFieldL(text,label,field,row,column) \
- label = new QLabel(text,p); \
- field = new QLineEdit(p); \
+ label = new TQLabel(text,p); \
+ field = new TQLineEdit(p); \
field->setMinimumWidth(20*SPACING); \
label->setBuddy(field); \
grid->addWidget(label,row,column); \
@@ -173,10 +173,10 @@ void AddressEditor::initLayout()
{
FUNCTIONSETUP;
- QFrame *p = plainPage();
- QGridLayout *grid = new QGridLayout(p, 10, 5, 0, SPACING);
+ TQFrame *p = plainPage();
+ TQGridLayout *grid = new TQGridLayout(p, 10, 5, 0, SPACING);
- QLabel *t;
+ TQLabel *t;
MakeField(i18n("Last name:"), fLastNameField, 0, 0);
MakeField(i18n("First name:"), fFirstNameField, 1, 0);
diff --git a/kpilot/kpilot/addressEditor.h b/kpilot/kpilot/addressEditor.h
index 67132b104..5e676c4c9 100644
--- a/kpilot/kpilot/addressEditor.h
+++ b/kpilot/kpilot/addressEditor.h
@@ -44,7 +44,7 @@ class AddressEditor : public KDialogBase
public:
AddressEditor(PilotAddress *address,
PilotAddressInfo *appInfo,
- QWidget *parent, const char *name=0L);
+ TQWidget *parent, const char *name=0L);
~AddressEditor();
@@ -62,26 +62,26 @@ private:
PilotAddress* fAddress;
PilotAddressInfo *fAppInfo;
// entry fields
- QLineEdit *fCustom4Field;
- QLineEdit *fCustom3Field;
- QLineEdit *fCustom2Field;
- QLineEdit *fCustom1Field;
- QLineEdit *fCountryField;
- QLineEdit *fZipField;
- QLineEdit *fStateField;
- QLineEdit *fCityField;
- QLineEdit *fAddressField;
- QLineEdit *fPhoneField[5];
- QLineEdit *fCompanyField;
- QLineEdit *fTitleField;
- QLineEdit *fFirstNameField;
- QLineEdit *fLastNameField;
+ TQLineEdit *fCustom4Field;
+ TQLineEdit *fCustom3Field;
+ TQLineEdit *fCustom2Field;
+ TQLineEdit *fCustom1Field;
+ TQLineEdit *fCountryField;
+ TQLineEdit *fZipField;
+ TQLineEdit *fStateField;
+ TQLineEdit *fCityField;
+ TQLineEdit *fAddressField;
+ TQLineEdit *fPhoneField[5];
+ TQLineEdit *fCompanyField;
+ TQLineEdit *fTitleField;
+ TQLineEdit *fFirstNameField;
+ TQLineEdit *fLastNameField;
// phone labels (changing!)
- QLabel *m_phoneLabel[5];
+ TQLabel *m_phoneLabel[5];
void initLayout();
void fillFields();
- QString phoneLabelText(PilotAddress *, const PhoneSlot &i);
+ TQString phoneLabelText(PilotAddress *, const PhoneSlot &i);
};
#endif
diff --git a/kpilot/kpilot/addressWidget.cc b/kpilot/kpilot/addressWidget.cc
index 4b900abb2..e72b33abf 100644
--- a/kpilot/kpilot/addressWidget.cc
+++ b/kpilot/kpilot/addressWidget.cc
@@ -38,19 +38,19 @@
#include <cstring>
#include <cstdlib>
-#include <qptrlist.h>
-#include <qlistbox.h>
-#include <qfile.h>
-#include <qpushbutton.h>
-#include <qtextstream.h>
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qmultilineedit.h>
-#include <qcombobox.h>
-#include <qwhatsthis.h>
-#include <qtextview.h>
-#include <qtextcodec.h>
-#include <qregexp.h>
+#include <tqptrlist.h>
+#include <tqlistbox.h>
+#include <tqfile.h>
+#include <tqpushbutton.h>
+#include <tqtextstream.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqmultilineedit.h>
+#include <tqcombobox.h>
+#include <tqwhatsthis.h>
+#include <tqtextview.h>
+#include <tqtextcodec.h>
+#include <tqregexp.h>
#include <kapplication.h>
#include <kmessagebox.h>
@@ -65,8 +65,8 @@
#include "addressWidget.moc"
-AddressWidget::AddressWidget(QWidget * parent,
- const QString & path) :
+AddressWidget::AddressWidget(TQWidget * parent,
+ const TQString & path) :
PilotComponent(parent, "component_address", path),
fAddrInfo(0L),
fAddressAppInfo(0L),
@@ -170,7 +170,7 @@ void AddressWidget::hideComponent()
}
}
-/* virtual */ bool AddressWidget::preHotSync(QString &s)
+/* virtual */ bool AddressWidget::preHotSync(TQString &s)
{
FUNCTIONSETUP;
@@ -185,7 +185,7 @@ void AddressWidget::hideComponent()
#if KDE_VERSION<220
s = i18n("There are still %1 address editing windows open.")
- .arg(QString::number(fPendingAddresses));
+ .arg(TQString::number(fPendingAddresses));
#else
s = i18n("There is still an address editing window open.",
"There are still %n address editing windows open.",
@@ -213,74 +213,74 @@ void AddressWidget::setupWidget()
{
FUNCTIONSETUP;
- QLabel *label;
- QGridLayout *grid = new QGridLayout(this, 6, 4, SPACING);
+ TQLabel *label;
+ TQGridLayout *grid = new TQGridLayout(this, 6, 4, SPACING);
- fCatList = new QComboBox(this);
+ fCatList = new TQComboBox(this);
grid->addWidget(fCatList, 0, 1);
- connect(fCatList, SIGNAL(activated(int)),
- this, SLOT(slotSetCategory(int)));
- QWhatsThis::add(fCatList,
+ connect(fCatList, TQT_SIGNAL(activated(int)),
+ this, TQT_SLOT(slotSetCategory(int)));
+ TQWhatsThis::add(fCatList,
i18n("<qt>Select the category of addresses to display here.</qt>"));
- label = new QLabel(i18n("Category:"), this);
+ label = new TQLabel(i18n("Category:"), this);
label->setBuddy(fCatList);
grid->addWidget(label, 0, 0);
- fListBox = new QListBox(this);
+ fListBox = new TQListBox(this);
grid->addMultiCellWidget(fListBox, 1, 1, 0, 1);
- connect(fListBox, SIGNAL(highlighted(int)),
- this, SLOT(slotShowAddress(int)));
- connect(fListBox, SIGNAL(selected(int)),
- this, SLOT(slotEditRecord()));
- QWhatsThis::add(fListBox,
+ connect(fListBox, TQT_SIGNAL(highlighted(int)),
+ this, TQT_SLOT(slotShowAddress(int)));
+ connect(fListBox, TQT_SIGNAL(selected(int)),
+ this, TQT_SLOT(slotEditRecord()));
+ TQWhatsThis::add(fListBox,
i18n("<qt>This list displays all the addresses "
"in the selected category. Click on "
"one to display it to the right.</qt>"));
- label = new QLabel(i18n("Address info:"), this);
+ label = new TQLabel(i18n("Address info:"), this);
grid->addWidget(label, 0, 2);
// address info text view
- fAddrInfo = new QTextView(this);
+ fAddrInfo = new TQTextView(this);
grid->addMultiCellWidget(fAddrInfo, 1, 4, 2, 2);
- QPushButton *button;
- QString wt;
+ TQPushButton *button;
+ TQString wt;
- fEditButton = new QPushButton(i18n("Edit Record..."), this);
+ fEditButton = new TQPushButton(i18n("Edit Record..."), this);
grid->addWidget(fEditButton, 2, 0);
- connect(fEditButton, SIGNAL(clicked()), this, SLOT(slotEditRecord()));
+ connect(fEditButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotEditRecord()));
wt = KPilotSettings::internalEditors() ?
i18n("<qt>You can edit an address when it is selected.</qt>") :
i18n("<qt><i>Editing is disabled by the 'internal editors' setting.</i></qt>");
- QWhatsThis::add(fEditButton,wt);
+ TQWhatsThis::add(fEditButton,wt);
- button = new QPushButton(i18n("New Record..."), this);
+ button = new TQPushButton(i18n("New Record..."), this);
grid->addWidget(button, 2, 1);
- connect(button, SIGNAL(clicked()), this, SLOT(slotCreateNewRecord()));
+ connect(button, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotCreateNewRecord()));
wt = KPilotSettings::internalEditors() ?
i18n("<qt>Add a new address to the address book.</qt>") :
i18n("<qt><i>Adding is disabled by the 'internal editors' setting.</i></qt>") ;
- QWhatsThis::add(button, wt);
+ TQWhatsThis::add(button, wt);
button->setEnabled(KPilotSettings::internalEditors());
- fDeleteButton = new QPushButton(i18n("Delete Record"), this);
+ fDeleteButton = new TQPushButton(i18n("Delete Record"), this);
grid->addWidget(fDeleteButton, 3, 0);
- connect(fDeleteButton, SIGNAL(clicked()),
- this, SLOT(slotDeleteRecord()));
+ connect(fDeleteButton, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotDeleteRecord()));
wt = KPilotSettings::internalEditors() ?
i18n("<qt>Delete the selected address from the address book.</qt>") :
i18n("<qt><i>Deleting is disabled by the 'internal editors' setting.</i></qt>") ;
- button = new QPushButton(i18n("Export addresses to file","Export..."), this);
+ button = new TQPushButton(i18n("Export addresses to file","Export..."), this);
grid->addWidget(button, 3,1);
- connect(button, SIGNAL(clicked()), this, SLOT(slotExport()));
- QWhatsThis::add(button,
+ connect(button, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotExport()));
+ TQWhatsThis::add(button,
i18n("<qt>Export all addresses in the selected category to CSV format.</qt>") );
- QWhatsThis::add(fDeleteButton,wt);
+ TQWhatsThis::add(fDeleteButton,wt);
}
void AddressWidget::updateWidget()
@@ -313,12 +313,12 @@ void AddressWidget::updateWidget()
if ((currentCatID == -1) ||
(fAddressList.current()->category() == currentCatID))
{
- QString title = createTitle(fAddressList.current(),
+ TQString title = createTitle(fAddressList.current(),
addressDisplayMode);
if (!title.isEmpty())
{
- title.remove(QRegExp(CSL1("\n.*")));
+ title.remove(TQRegExp(CSL1("\n.*")));
PilotListItem *p = new PilotListItem(title,
listIndex,
fAddressList.current());
@@ -340,11 +340,11 @@ void AddressWidget::updateWidget()
-QString AddressWidget::createTitle(PilotAddress * address, int displayMode)
+TQString AddressWidget::createTitle(PilotAddress * address, int displayMode)
{
// FUNCTIONSETUP;
- QString title;
+ TQString title;
switch (displayMode)
{
@@ -441,10 +441,10 @@ void AddressWidget::slotEditRecord()
AddressEditor *editor = new AddressEditor(selectedRecord,
fAddressAppInfo, this);
- connect(editor, SIGNAL(recordChangeComplete(PilotAddress *)),
- this, SLOT(slotUpdateRecord(PilotAddress *)));
- connect(editor, SIGNAL(cancelClicked()),
- this, SLOT(slotEditCancelled()));
+ connect(editor, TQT_SIGNAL(recordChangeComplete(PilotAddress *)),
+ this, TQT_SLOT(slotUpdateRecord(PilotAddress *)));
+ connect(editor, TQT_SIGNAL(cancelClicked()),
+ this, TQT_SLOT(slotEditCancelled()));
editor->show();
fPendingAddresses++;
@@ -491,10 +491,10 @@ void AddressWidget::slotCreateNewRecord()
AddressEditor *editor = new AddressEditor(0L,
fAddressAppInfo, this);
- connect(editor, SIGNAL(recordChangeComplete(PilotAddress *)),
- this, SLOT(slotAddRecord(PilotAddress *)));
- connect(editor, SIGNAL(cancelClicked()),
- this, SLOT(slotEditCancelled()));
+ connect(editor, TQT_SIGNAL(recordChangeComplete(PilotAddress *)),
+ this, TQT_SLOT(slotAddRecord(PilotAddress *)));
+ connect(editor, TQT_SIGNAL(cancelClicked()),
+ this, TQT_SLOT(slotEditCancelled()));
editor->show();
fPendingAddresses++;
@@ -605,7 +605,7 @@ void AddressWidget::slotShowAddress(int which)
<< endl;
#endif
- QString text(CSL1("<qt>"));
+ TQString text(CSL1("<qt>"));
text += addr->getTextRepresentation(fAddressAppInfo,Qt::RichText);
text += CSL1("</qt>\n");
fAddrInfo->setText(text);
@@ -673,13 +673,13 @@ void AddressWidget::slotExport()
int currentCatID = findSelectedCategory(fCatList,
fAddressAppInfo->categoryInfo());
- QString prompt = (currentCatID==-1) ?
+ TQString prompt = (currentCatID==-1) ?
i18n("Export All Addresses") :
i18n("Export Address Category %1").arg(fAddressAppInfo->categoryName(currentCatID)) ;
- QString saveFile = KFileDialog::getSaveFileName(
- QString::null,
+ TQString saveFile = KFileDialog::getSaveFileName(
+ TQString::null,
CSL1("*.csv|Comma Separated Values"),
this,
prompt
@@ -691,7 +691,7 @@ void AddressWidget::slotExport()
#endif
return;
}
- if (QFile::exists(saveFile) &&
+ if (TQFile::exists(saveFile) &&
KMessageBox::warningContinueCancel(this,
i18n("The file <i>%1</i> exists. Overwrite?").arg(saveFile),
i18n("Overwrite File?"),
@@ -703,7 +703,7 @@ void AddressWidget::slotExport()
return;
}
- FILE *f = fopen(QFile::encodeName(saveFile),"w");
+ FILE *f = fopen(TQFile::encodeName(saveFile),"w");
if (!f)
{
KMessageBox::sorry(this,
diff --git a/kpilot/kpilot/addressWidget.h b/kpilot/kpilot/addressWidget.h
index 289b49e33..1fa172b88 100644
--- a/kpilot/kpilot/addressWidget.h
+++ b/kpilot/kpilot/addressWidget.h
@@ -46,13 +46,13 @@ class AddressWidget : public PilotComponent
Q_OBJECT
public:
- AddressWidget(QWidget* parent,const QString& dbpath);
+ AddressWidget(TQWidget* parent,const TQString& dbpath);
~AddressWidget();
// Pilot Component Methods:
virtual void showComponent();
virtual void hideComponent();
- virtual bool preHotSync(QString &);
+ virtual bool preHotSync(TQString &);
virtual void postHotSync();
public slots:
@@ -107,13 +107,13 @@ private:
* Create a sensible "title" for an address, composed
* of first + last name if possible.
*/
- QString createTitle(PilotAddress *,int displayMode);
+ TQString createTitle(PilotAddress *,int displayMode);
/**
- * We use a QComboBox fCatList to hold the user-visible names
- * of all the categories. The QTextView fAddrInfo is for
+ * We use a TQComboBox fCatList to hold the user-visible names
+ * of all the categories. The TQTextView fAddrInfo is for
* displaying the currently selected address, if any.
- * The QListBox fListBox lists all the addresses in the
+ * The TQListBox fListBox lists all the addresses in the
* currently selected category.
*
* The entire address database is read into memory in the
@@ -123,11 +123,11 @@ private:
*
* The two buttons should speak for themselves.
*/
- QComboBox *fCatList;
- QTextView *fAddrInfo;
+ TQComboBox *fCatList;
+ TQTextView *fAddrInfo;
PilotAddressInfo *fAddressAppInfo;
- QPtrList<PilotAddress> fAddressList;
- QListBox *fListBox;
+ TQPtrList<PilotAddress> fAddressList;
+ TQListBox *fListBox;
QPushButton *fEditButton,*fDeleteButton;
protected:
diff --git a/kpilot/kpilot/conduitConfigDialog.cc b/kpilot/kpilot/conduitConfigDialog.cc
index 6e4f0fc94..3ea444d3f 100644
--- a/kpilot/kpilot/conduitConfigDialog.cc
+++ b/kpilot/kpilot/conduitConfigDialog.cc
@@ -30,18 +30,18 @@
#include "options.h"
-#include <qlistview.h>
-#include <qlabel.h>
-#include <qtooltip.h>
-#include <qfile.h>
-#include <qpushbutton.h>
-#include <qhbox.h>
-#include <qlayout.h>
-#include <qwidgetstack.h>
-#include <qvbox.h>
-#include <qsplitter.h>
-#include <qheader.h>
-#include <qtimer.h>
+#include <tqlistview.h>
+#include <tqlabel.h>
+#include <tqtooltip.h>
+#include <tqfile.h>
+#include <tqpushbutton.h>
+#include <tqhbox.h>
+#include <tqlayout.h>
+#include <tqwidgetstack.h>
+#include <tqvbox.h>
+#include <tqsplitter.h>
+#include <tqheader.h>
+#include <tqtimer.h>
#include <kservice.h>
#include <kservicetype.h>
@@ -72,13 +72,13 @@
extern "C"
{
- KDE_EXPORT KCModule *create_kpilotconfig( QWidget *parent, const char * )
+ KDE_EXPORT KCModule *create_kpilotconfig( TQWidget *parent, const char * )
{
FUNCTIONSETUP;
return new ConduitConfigWidget( parent, "kcmkpilotconfig" );
}
- KDE_EXPORT ConfigWizard *create_wizard(QWidget *parent, int m)
+ KDE_EXPORT ConfigWizard *create_wizard(TQWidget *parent, int m)
{
FUNCTIONSETUP;
return new ConfigWizard(parent,"Wizard", m);
@@ -89,18 +89,18 @@ extern "C"
class ConduitTip : public QToolTip
{
public:
- ConduitTip(QListView *parent);
+ ConduitTip(TQListView *parent);
virtual ~ConduitTip();
protected:
- virtual void maybeTip(const QPoint &);
+ virtual void maybeTip(const TQPoint &);
- QListView *fListView;
+ TQListView *fListView;
} ;
-ConduitTip::ConduitTip(QListView *p) :
- QToolTip(p->viewport(),0L),
+ConduitTip::ConduitTip(TQListView *p) :
+ TQToolTip(p->viewport(),0L),
fListView(p)
{
FUNCTIONSETUP;
@@ -111,11 +111,11 @@ ConduitTip::~ConduitTip()
FUNCTIONSETUP;
}
-/* virtual */ void ConduitTip::maybeTip(const QPoint &p)
+/* virtual */ void ConduitTip::maybeTip(const TQPoint &p)
{
FUNCTIONSETUP;
- QListViewItem *l = fListView->itemAt(p);
+ TQListViewItem *l = fListView->itemAt(p);
if (!l) return;
@@ -130,7 +130,7 @@ ConduitTip::~ConduitTip()
<< endl;
#endif
- QString s = l->text(CONDUIT_COMMENT);
+ TQString s = l->text(CONDUIT_COMMENT);
if (s.isEmpty()) return;
if (s.find(CSL1("<qt>"),0,false) == -1)
@@ -148,7 +148,7 @@ ConduitTip::~ConduitTip()
class KPilotCheckListItem : public QCheckListItem
{
public:
- KPilotCheckListItem ( QListViewItem * parent, const QString & text, Type tt = RadioButtonController ) : QCheckListItem(parent, text, tt),mOriginalState(false) {}
+ KPilotCheckListItem ( TQListViewItem * parent, const TQString & text, Type tt = RadioButtonController ) : TQCheckListItem(parent, text, tt),mOriginalState(false) {}
~KPilotCheckListItem() {}
void setOriginalState(bool state) { mOriginalState=state; setOn(state);}
@@ -174,23 +174,23 @@ protected:
** Create a page in the widget stack @p parent on page @p pageno,
** bearing the given @p text. The remainder of the parameters are
** for esoteric things like:
-** @p buttons set to non-null to include (and return) a QHBox suitable
+** @p buttons set to non-null to include (and return) a TQHBox suitable
** for displaying a row of buttons in on the page.
-** @p label set to non-null to return the QLabel used to display @p text.
+** @p label set to non-null to return the TQLabel used to display @p text.
*/
-static void addDescriptionPage(QWidgetStack *parent,
+static void addDescriptionPage(TQWidgetStack *parent,
int pageno,
- const QString &text,
- QHBox **buttons = 0L,
- QLabel **label = 0L)
+ const TQString &text,
+ TQHBox **buttons = 0L,
+ TQLabel **label = 0L)
{
- QVBox *v = new QVBox(parent);
- QLabel *l = 0L;
+ TQVBox *v = new TQVBox(parent);
+ TQLabel *l = 0L;
- v->setFrameShape(QLabel::NoFrame);
+ v->setFrameShape(TQLabel::NoFrame);
v->setMargin(SPACING);
- l = new QLabel(v);
+ l = new TQLabel(v);
l->setText(text);
l->setAlignment(Qt::AlignLeft | Qt::AlignVCenter | Qt::ExpandTabs | Qt::WordBreak);
@@ -198,15 +198,15 @@ static void addDescriptionPage(QWidgetStack *parent,
if (buttons)
{
- *buttons = new QHBox(v);
- l = new QLabel(v);
+ *buttons = new TQHBox(v);
+ l = new TQLabel(v);
}
parent->addWidget(v,pageno);
}
-ConduitConfigWidgetBase::ConduitConfigWidgetBase(QWidget *parent, const char *n) :
+ConduitConfigWidgetBase::ConduitConfigWidgetBase(TQWidget *parent, const char *n) :
KCModule(parent, n),
fConduitList(0L),
fStack(0L),
@@ -217,32 +217,32 @@ ConduitConfigWidgetBase::ConduitConfigWidgetBase(QWidget *parent, const char *n)
{
FUNCTIONSETUP;
- QWidget *w = 0L; // For spacing purposes only.
- QHBox *btns = 0L;
+ TQWidget *w = 0L; // For spacing purposes only.
+ TQHBox *btns = 0L;
- QHBoxLayout *mainLayout = new QHBoxLayout(this);
+ TQHBoxLayout *mainLayout = new TQHBoxLayout(this);
mainLayout->setSpacing(10);
// Create the left hand column
- fConduitList = new QListView(this ,"ConduitList");
- fConduitList->addColumn(QString::null);
+ fConduitList = new TQListView(this ,"ConduitList");
+ fConduitList->addColumn(TQString::null);
fConduitList->header()->hide();
fConduitList->setSizePolicy(
- QSizePolicy(QSizePolicy::Maximum, QSizePolicy::Preferred));
+ TQSizePolicy(TQSizePolicy::Maximum, TQSizePolicy::Preferred));
mainLayout->addWidget(fConduitList);
// Create the title
- QVBoxLayout *vbox = new QVBoxLayout(this, 0, KDialog::spacingHint());
+ TQVBoxLayout *vbox = new TQVBoxLayout(this, 0, KDialog::spacingHint());
// String below is just to make space; no need to translate.
- fTitleText = new QLabel(CSL1("Conduit Setup - Addressbook"), this);
- QFont titleFont(fTitleText->font());
+ fTitleText = new TQLabel(CSL1("Conduit Setup - Addressbook"), this);
+ TQFont titleFont(fTitleText->font());
titleFont.setBold(true);
fTitleText->setFont(titleFont);
vbox->addWidget(fTitleText, 0, AlignLeft);
- vbox->addWidget(new KSeparator(QFrame::HLine|QFrame::Plain, this));
+ vbox->addWidget(new KSeparator(TQFrame::HLine|TQFrame::Plain, this));
// Right hand column
- fStack = new QWidgetStack(this, "RightPart");
+ fStack = new TQWidgetStack(this, "RightPart");
vbox->addWidget(fStack, 10);
mainLayout->addLayout(vbox);
@@ -258,16 +258,16 @@ ConduitConfigWidgetBase::ConduitConfigWidgetBase(QWidget *parent, const char *n)
//
addDescriptionPage(fStack,OLD_CONDUIT,
i18n("<qt>This is an old-style conduit.</qt>"),&btns);
- w = new QWidget(btns);
+ w = new TQWidget(btns);
btns->setStretchFactor(w,50);
- fConfigureButton = new QPushButton(btns);
+ fConfigureButton = new TQPushButton(btns);
fConfigureButton->setText(i18n("Configure..."));
- w = new QWidget(btns);
+ w = new TQWidget(btns);
btns->setStretchFactor(w,50);
// Page 3
addDescriptionPage(fStack,INTERNAL_CONDUIT,
- QString::null,0L,&fActionDescription);
+ TQString::null,0L,&fActionDescription);
// Page 5 - explanation about conduits
addDescriptionPage(fStack,CONDUIT_EXPLN,
@@ -290,17 +290,17 @@ ConduitConfigWidgetBase::ConduitConfigWidgetBase(QWidget *parent, const char *n)
"Checked conduits will be run during a HotSync. "
"Select a conduit to configure it.</p>"
"</qt>"),&btns);
- w = new QWidget(btns);
+ w = new TQWidget(btns);
btns->setStretchFactor(w,50);
- fConfigureWizard = new QPushButton(i18n("Configuration Wizard"),btns);
- w = new QWidget(btns);
+ fConfigureWizard = new TQPushButton(i18n("Configuration Wizard"),btns);
+ w = new TQWidget(btns);
btns->setStretchFactor(w,50);
fStack->addWidget(ConduitConfigBase::aboutPage(fStack,0L),GENERAL_ABOUT);
}
-ConduitConfigWidget::ConduitConfigWidget(QWidget *parent, const char *n,
+ConduitConfigWidget::ConduitConfigWidget(TQWidget *parent, const char *n,
bool) :
ConduitConfigWidgetBase(parent,n),
fConfigure(0L),
@@ -319,25 +319,25 @@ ConduitConfigWidget::ConduitConfigWidget(QWidget *parent, const char *n,
fConduitList->resize(fConduitList->sizeHint());
fConduitList->setMinimumSize(fConduitList->sizeHint());
fConduitList->setColumnWidth(0, fConduitList->sizeHint().width());
- fConduitList->setResizeMode(QListView::AllColumns);
+ fConduitList->setResizeMode(TQListView::AllColumns);
- fStack->resize(fStack->sizeHint()+QSize(10,40));
- fStack->setMinimumSize(fStack->sizeHint()+QSize(10,40));
+ fStack->resize(fStack->sizeHint()+TQSize(10,40));
+ fStack->setMinimumSize(fStack->sizeHint()+TQSize(10,40));
- QObject::connect(fConduitList,
- SIGNAL(selectionChanged(QListViewItem *)),
- this,SLOT(selected(QListViewItem *)));
- QObject::connect(fConduitList,
- SIGNAL(clicked(QListViewItem*)),
- this, SLOT(conduitsChanged(QListViewItem*)));
+ TQObject::connect(fConduitList,
+ TQT_SIGNAL(selectionChanged(TQListViewItem *)),
+ this,TQT_SLOT(selected(TQListViewItem *)));
+ TQObject::connect(fConduitList,
+ TQT_SIGNAL(clicked(TQListViewItem*)),
+ this, TQT_SLOT(conduitsChanged(TQListViewItem*)));
// Deprecated?
- QObject::connect(fConfigureButton,
- SIGNAL(clicked()),
- this,SLOT(configure()));
+ TQObject::connect(fConfigureButton,
+ TQT_SIGNAL(clicked()),
+ this,TQT_SLOT(configure()));
- QObject::connect(fConfigureWizard,SIGNAL(clicked()),
- this,SLOT(configureWizard()));
+ TQObject::connect(fConfigureWizard,TQT_SIGNAL(clicked()),
+ this,TQT_SLOT(configureWizard()));
fGeneralPage->setSelected(true);
fConduitList->setCurrentItem(fGeneralPage);
@@ -359,19 +359,19 @@ void ConduitConfigWidget::fillLists()
FUNCTIONSETUP;
// 3 QListViewItems for the three headings in the list
- QListViewItem *general,*conduits;
+ TQListViewItem *general,*conduits;
// And two generic pointers for the rest.
- QListViewItem *q = 0L;
+ TQListViewItem *q = 0L;
KPilotCheckListItem *p = 0L;
- q = new QListViewItem(fConduitList, i18n("About"));
+ q = new TQListViewItem(fConduitList, i18n("About"));
q->setText(CONDUIT_COMMENT, i18n("About KPilot. Credits."));
q->setText(CONDUIT_LIBRARY, CSL1("general_about"));
- conduits = new QListViewItem(fConduitList, i18n("Conduits"));
+ conduits = new TQListViewItem(fConduitList, i18n("Conduits"));
- general = new QListViewItem( fConduitList, i18n("General Setup" ) );
+ general = new TQListViewItem( fConduitList, i18n("General Setup" ) );
fGeneralPage = general;
// Give them identifiers so they can be handled specially when selected.
@@ -388,7 +388,7 @@ void ConduitConfigWidget::fillLists()
// Create entries under general.
-#define CE(a,b,c) q = new QListViewItem(general,a) ; \
+#define CE(a,b,c) q = new TQListViewItem(general,a) ; \
q->setText(CONDUIT_COMMENT,b) ; \
q->setText(CONDUIT_LIBRARY,c) ;
@@ -402,13 +402,13 @@ void ConduitConfigWidget::fillLists()
// List of installed (enabled) actions and conduits.
- QStringList potentiallyInstalled = KPilotSettings::installedConduits();
+ TQStringList potentiallyInstalled = KPilotSettings::installedConduits();
// Create internal conduits.
//
//
-#define IC(a,b,c) p = new KPilotCheckListItem(conduits,i18n(a),QCheckListItem::CheckBox); \
+#define IC(a,b,c) p = new KPilotCheckListItem(conduits,i18n(a),TQCheckListItem::CheckBox); \
p->setText(CONDUIT_COMMENT,i18n(c)); \
p->setText(CONDUIT_LIBRARY,CSL1("internal_" b)); \
p->setText(CONDUIT_DESKTOP,CSL1("internal_" b)); \
@@ -424,7 +424,7 @@ void ConduitConfigWidget::fillLists()
KServiceTypeProfile::OfferList offers =
KServiceTypeProfile::offers(CSL1("KPilotConduit"));
- QValueListIterator < KServiceOffer > availList(offers.begin());
+ TQValueListIterator < KServiceOffer > availList(offers.begin());
while (availList != offers.end())
{
KSharedPtr < KService > o = (*availList).service();
@@ -444,7 +444,7 @@ void ConduitConfigWidget::fillLists()
p = new KPilotCheckListItem(conduits,
o->name(),
- QCheckListItem::CheckBox);
+ TQCheckListItem::CheckBox);
p->setMultiLinesEnabled(true);
p->setText(CONDUIT_COMMENT,o->comment());
p->setText(CONDUIT_DESKTOP,o->desktopEntryName());
@@ -472,11 +472,11 @@ static void dumpConduitInfo(const KLibrary *lib)
#endif
}
-static ConduitConfigBase *handleGeneralPages(QWidget *w, QListViewItem *p)
+static ConduitConfigBase *handleGeneralPages(TQWidget *w, TQListViewItem *p)
{
ConduitConfigBase *o = 0L;
- QString s = p->text(CONDUIT_LIBRARY) ;
+ TQString s = p->text(CONDUIT_LIBRARY) ;
if (s.startsWith(CSL1("general_setup")))
{
@@ -502,7 +502,7 @@ static ConduitConfigBase *handleGeneralPages(QWidget *w, QListViewItem *p)
return o;
}
-void ConduitConfigWidget::loadAndConfigure(QListViewItem *p) // ,bool exec)
+void ConduitConfigWidget::loadAndConfigure(TQListViewItem *p) // ,bool exec)
{
FUNCTIONSETUP;
@@ -517,7 +517,7 @@ void ConduitConfigWidget::loadAndConfigure(QListViewItem *p) // ,bool exec)
return;
}
- QString libraryName = p->text(CONDUIT_LIBRARY);
+ TQString libraryName = p->text(CONDUIT_LIBRARY);
#ifdef DEBUG
DEBUGKPILOT << fname
@@ -563,7 +563,7 @@ void ConduitConfigWidget::loadAndConfigure(QListViewItem *p) // ,bool exec)
return;
}
- QObject *o = 0L;
+ TQObject *o = 0L;
// Page 4: General setup
if (libraryName.startsWith(CSL1("general_")))
@@ -572,7 +572,7 @@ void ConduitConfigWidget::loadAndConfigure(QListViewItem *p) // ,bool exec)
}
else
{
- QCString library = QFile::encodeName(libraryName);
+ TQCString library = TQFile::encodeName(libraryName);
KLibFactory *f = KLibLoader::self()->factory(library);
if (!f)
@@ -593,7 +593,7 @@ void ConduitConfigWidget::loadAndConfigure(QListViewItem *p) // ,bool exec)
dumpConduitInfo(KLibLoader::self()->library(library));
- QStringList a;
+ TQStringList a;
a.append(CSL1("modal"));
o = f->create(fStack, 0L, "ConduitConfigBase", a);
@@ -629,7 +629,7 @@ void ConduitConfigWidget::loadAndConfigure(QListViewItem *p) // ,bool exec)
}
// Remove the config widget from the stack before we can add the new one
- QWidget *oldConfigWidget = fStack->widget( NEW_CONDUIT );
+ TQWidget *oldConfigWidget = fStack->widget( NEW_CONDUIT );
if ( oldConfigWidget )
{
fStack->removeWidget( oldConfigWidget );
@@ -651,7 +651,7 @@ void ConduitConfigWidget::loadAndConfigure(QListViewItem *p) // ,bool exec)
fCurrentConfig=d;
// make sure the changed signal is propagated to the KCM*Dialog
// and the apply button is enabled correspondingly.
- connect(d, SIGNAL(changed(bool)), this, SIGNAL(changed(bool)));
+ connect(d, TQT_SIGNAL(changed(bool)), this, TQT_SIGNAL(changed(bool)));
}
}
@@ -668,7 +668,7 @@ bool ConduitConfigWidget::release()
if (fCurrentConduit)
{
KLibLoader::self()->unloadLibrary(
- QFile::encodeName(fCurrentConduit->text(CONDUIT_LIBRARY)));
+ TQFile::encodeName(fCurrentConduit->text(CONDUIT_LIBRARY)));
}
fCurrentConduit=0L;
fCurrentConfig=0L;
@@ -681,7 +681,7 @@ void ConduitConfigWidget::unselect()
fConduitList->setCurrentItem( fCurrentConduit );
}
-void ConduitConfigWidget::selected(QListViewItem *p)
+void ConduitConfigWidget::selected(TQListViewItem *p)
{
FUNCTIONSETUP;
#ifdef DEBUG
@@ -694,7 +694,7 @@ void ConduitConfigWidget::selected(QListViewItem *p)
if (!release())
{
fConduitList->blockSignals(true);
- QTimer::singleShot(1,this,SLOT(unselect()));
+ TQTimer::singleShot(1,this,TQT_SLOT(unselect()));
return;
}
}
@@ -716,9 +716,9 @@ void ConduitConfigWidget::selected(QListViewItem *p)
#endif
// set the dialog title to the selected item
- QListViewItem *pParent = p->parent();
- QString title;
- title = pParent ? pParent->text(CONDUIT_NAME) + CSL1(" - ") : QString() ;
+ TQListViewItem *pParent = p->parent();
+ TQString title;
+ title = pParent ? pParent->text(CONDUIT_NAME) + CSL1(" - ") : TQString() ;
title += p ? p->text(CONDUIT_NAME) : i18n("KPilot Setup");
fTitleText->setText(title);
}
@@ -728,11 +728,11 @@ void ConduitConfigWidget::configure()
loadAndConfigure(fConduitList->selectedItem());
}
-void ConduitConfigWidget::warnNoExec(const QListViewItem * p)
+void ConduitConfigWidget::warnNoExec(const TQListViewItem * p)
{
FUNCTIONSETUP;
- QString msg = i18n("<qt>No library could be "
+ TQString msg = i18n("<qt>No library could be "
"found for the conduit %1. This means that the "
"conduit was not installed properly.</qt>")
.arg(p->text(CONDUIT_NAME));
@@ -745,11 +745,11 @@ void ConduitConfigWidget::warnNoExec(const QListViewItem * p)
KMessageBox::error(this, msg, i18n("Conduit Error"));
}
-void ConduitConfigWidget::warnNoLibrary(const QListViewItem *p)
+void ConduitConfigWidget::warnNoLibrary(const TQListViewItem *p)
{
FUNCTIONSETUP;
- QString msg = i18n("<qt>There was a problem loading the library "
+ TQString msg = i18n("<qt>There was a problem loading the library "
"for the conduit %1. This means that the "
"conduit was not installed properly.</qt>")
.arg(p->text(CONDUIT_NAME));
@@ -773,8 +773,8 @@ void ConduitConfigWidget::save()
if (fCurrentConfig) fCurrentConfig->commit();
}
- QStringList activeConduits;
- QListViewItemIterator it( fConduitList );
+ TQStringList activeConduits;
+ TQListViewItemIterator it( fConduitList );
while ( it.current() ) {
KPilotCheckListItem*p = dynamic_cast<KPilotCheckListItem*>(it.current());
if ( p )
@@ -795,14 +795,14 @@ void ConduitConfigWidget::load()
FUNCTIONSETUP;
KPilotSettings::self()->readConfig();
- QStringList potentiallyInstalled = KPilotSettings::installedConduits();
- QListViewItem*p = fConduitList->firstChild();
+ TQStringList potentiallyInstalled = KPilotSettings::installedConduits();
+ TQListViewItem*p = fConduitList->firstChild();
while (p)
{
- QListViewItem*q = p->firstChild();
+ TQListViewItem*q = p->firstChild();
while (q)
{
- QCheckListItem*qq=dynamic_cast<QCheckListItem*>(q);
+ TQCheckListItem*qq=dynamic_cast<TQCheckListItem*>(q);
if (qq)
{
qq->setOn(! (potentiallyInstalled.findIndex(qq->text(CONDUIT_DESKTOP))<0) );
@@ -822,7 +822,7 @@ void ConduitConfigWidget::load()
}
-void ConduitConfigWidget::conduitsChanged(QListViewItem*item)
+void ConduitConfigWidget::conduitsChanged(TQListViewItem*item)
{
KPilotCheckListItem*i=dynamic_cast<KPilotCheckListItem*>(item);
if (i)
@@ -831,7 +831,7 @@ void ConduitConfigWidget::conduitsChanged(QListViewItem*item)
}
}
-void ConduitConfigWidget::reopenItem(QListViewItem *i)
+void ConduitConfigWidget::reopenItem(TQListViewItem *i)
{
i->setOpen(true);
}
diff --git a/kpilot/kpilot/conduitConfigDialog.h b/kpilot/kpilot/conduitConfigDialog.h
index 697251fab..549f49831 100644
--- a/kpilot/kpilot/conduitConfigDialog.h
+++ b/kpilot/kpilot/conduitConfigDialog.h
@@ -46,31 +46,31 @@ class ConduitConfigWidgetBase : public KCModule
{
Q_OBJECT
public:
- ConduitConfigWidgetBase(QWidget *p=0L,const char *n=0L);
-
- QListView *fConduitList;
- QWidgetStack *fStack;
- QPushButton *fConfigureButton;
- QPushButton *fConfigureWizard,*fConfigureKontact;
- QLabel *fActionDescription;
- QLabel *fTitleText; // Dialog title above fStack
+ ConduitConfigWidgetBase(TQWidget *p=0L,const char *n=0L);
+
+ TQListView *fConduitList;
+ TQWidgetStack *fStack;
+ TQPushButton *fConfigureButton;
+ TQPushButton *fConfigureWizard,*fConfigureKontact;
+ TQLabel *fActionDescription;
+ TQLabel *fTitleText; // Dialog title above fStack
} ;
class ConduitConfigWidget : public ConduitConfigWidgetBase
{
Q_OBJECT
public:
- ConduitConfigWidget(QWidget *,
+ ConduitConfigWidget(TQWidget *,
const char *name=0L, bool ownButtons=false);
virtual ~ConduitConfigWidget();
protected:
void fillLists();
- void warnNoExec(const QListViewItem *);
- void warnNoLibrary(const QListViewItem *);
+ void warnNoExec(const TQListViewItem *);
+ void warnNoLibrary(const TQListViewItem *);
- void loadAndConfigure(QListViewItem *); // ,bool);
+ void loadAndConfigure(TQListViewItem *); // ,bool);
public:
/**
@@ -90,7 +90,7 @@ public slots:
// void slotApply();
signals:
- void selectionChanged(QListViewItem *);
+ void selectionChanged(TQListViewItem *);
void sizeChanged();
protected slots:
@@ -98,14 +98,14 @@ protected slots:
void configureWizard();
void unselect(); // Helper slot when cancelling a change in selection
- void selected(QListViewItem *);
- void conduitsChanged(QListViewItem*);
- void reopenItem(QListViewItem *);
+ void selected(TQListViewItem *);
+ void conduitsChanged(TQListViewItem*);
+ void reopenItem(TQListViewItem *);
private:
- QPushButton *fConfigure;
- QListViewItem *fCurrentConduit;
- QListViewItem *fGeneralPage;
+ TQPushButton *fConfigure;
+ TQListViewItem *fCurrentConduit;
+ TQListViewItem *fGeneralPage;
ConduitConfigBase *fCurrentConfig;
};
diff --git a/kpilot/kpilot/datebookWidget.cc b/kpilot/kpilot/datebookWidget.cc
index 64888560c..bc2dff5e9 100644
--- a/kpilot/kpilot/datebookWidget.cc
+++ b/kpilot/kpilot/datebookWidget.cc
@@ -31,9 +31,9 @@
#include "options.h"
-#include <qlayout.h>
-#include <qdir.h>
-#include <qpushbutton.h>
+#include <tqlayout.h>
+#include <tqdir.h>
+#include <tqpushbutton.h>
#include <klistview.h>
#include <kdatepicker.h>
@@ -41,27 +41,27 @@
#include "datebookWidget.moc"
-DatebookWidget::DatebookWidget(QWidget *parent, const QString &dbpath) :
+DatebookWidget::DatebookWidget(TQWidget *parent, const TQString &dbpath) :
PilotComponent(parent,"component_generic",dbpath)
{
FUNCTIONSETUP;
- QGridLayout *g = new QGridLayout(this,1,1,SPACING);
+ TQGridLayout *g = new TQGridLayout(this,1,1,SPACING);
fDatePicker = new KDatePicker( this, "fDatePicker" );
- fDatePicker->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)4, (QSizePolicy::SizeType)5, 0, 0, fDatePicker->sizePolicy().hasHeightForWidth() ) );
+ fDatePicker->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)4, (TQSizePolicy::SizeType)5, 0, 0, fDatePicker->sizePolicy().hasHeightForWidth() ) );
g->addMultiCellWidget(fDatePicker,0,0,0,2);
- QSpacerItem* spacer = new QSpacerItem( 20, 180, QSizePolicy::Minimum, QSizePolicy::Expanding );
+ TQSpacerItem* spacer = new TQSpacerItem( 20, 180, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
g->addItem( spacer, 1, 1 );
- fAddButton = new QPushButton( i18n( "&Add..." ), this, "pushButton1" );
+ fAddButton = new TQPushButton( i18n( "&Add..." ), this, "pushButton1" );
g->addWidget( fAddButton, 2, 0 );
- fEditButton = new QPushButton( i18n( "&Edit..." ), this, "pushButton2" );
+ fEditButton = new TQPushButton( i18n( "&Edit..." ), this, "pushButton2" );
g->addWidget( fEditButton, 2, 1 );
- fDeleteButton = new QPushButton( i18n( "&Delete..." ), this, "pushButton3" );
+ fDeleteButton = new TQPushButton( i18n( "&Delete..." ), this, "pushButton3" );
g->addWidget( fDeleteButton, 2, 2 );
fEventList = new KListView( this, "kListView1" );
@@ -69,18 +69,18 @@ DatebookWidget::DatebookWidget(QWidget *parent, const QString &dbpath) :
fEventList->addColumn( i18n( "Al" ) );
fEventList->addColumn( i18n( "Rec" ) );
fEventList->addColumn( i18n( "Description" ) );
-// fEventList->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)7, 0, 0, fEventList->sizePolicy().hasHeightForWidth() ) );
+// fEventList->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)7, 0, 0, fEventList->sizePolicy().hasHeightForWidth() ) );
fEventList->setAllColumnsShowFocus( TRUE );
fEventList->setShowSortIndicator( TRUE );
fEventList->setResizeMode( KListView::/*LastColumn*/AllColumns );
fEventList->setFullWidth( TRUE );
-// fEventList->setAlternateBackground( QColor( 221, 146, 240 ) );
+// fEventList->setAlternateBackground( TQColor( 221, 146, 240 ) );
g->addMultiCellWidget(fEventList, 0, 2, 3, 3);
- connect(fDatePicker, SIGNAL(dateChanged()), SLOT(slotDayChanged()));
- connect(fAddButton, SIGNAL(clicked()), SLOT(slotAddEvent()));
- connect(fEditButton, SIGNAL(clicked()), SLOT(slotEditEvent()));
- connect(fDeleteButton, SIGNAL(clicked()), SLOT(slotDeleteEvent()));
+ connect(fDatePicker, TQT_SIGNAL(dateChanged()), TQT_SLOT(slotDayChanged()));
+ connect(fAddButton, TQT_SIGNAL(clicked()), TQT_SLOT(slotAddEvent()));
+ connect(fEditButton, TQT_SIGNAL(clicked()), TQT_SLOT(slotEditEvent()));
+ connect(fDeleteButton, TQT_SIGNAL(clicked()), TQT_SLOT(slotDeleteEvent()));
}
DatebookWidget::~DatebookWidget()
diff --git a/kpilot/kpilot/datebookWidget.h b/kpilot/kpilot/datebookWidget.h
index 28ff0799a..9a144cc3c 100644
--- a/kpilot/kpilot/datebookWidget.h
+++ b/kpilot/kpilot/datebookWidget.h
@@ -41,7 +41,7 @@ class DatebookWidget : public PilotComponent
Q_OBJECT
public:
- DatebookWidget(QWidget* parent, const QString& dbpath);
+ DatebookWidget(TQWidget* parent, const TQString& dbpath);
virtual ~DatebookWidget();
// Pilot component methods
@@ -56,9 +56,9 @@ protected slots:
private:
KDatePicker*fDatePicker;
- QPushButton*fAddButton;
- QPushButton*fEditButton;
- QPushButton*fDeleteButton;
+ TQPushButton*fAddButton;
+ TQPushButton*fEditButton;
+ TQPushButton*fDeleteButton;
KListView*fEventList;
};
diff --git a/kpilot/kpilot/dbAppInfoEditor.cc b/kpilot/kpilot/dbAppInfoEditor.cc
index ab5516fca..2e9e4b5fd 100644
--- a/kpilot/kpilot/dbAppInfoEditor.cc
+++ b/kpilot/kpilot/dbAppInfoEditor.cc
@@ -27,8 +27,8 @@
#include "options.h"
-#include <qtextedit.h>
-#include <qlabel.h>
+#include <tqtextedit.h>
+#include <tqlabel.h>
#include <kdialogbase.h>
#include <kmessagebox.h>
@@ -41,7 +41,7 @@ using namespace KHE;
/*************************************************
**************************************************/
-DBAppInfoEditor::DBAppInfoEditor(char*appInfoData, int l, QWidget *parent) :
+DBAppInfoEditor::DBAppInfoEditor(char*appInfoData, int l, TQWidget *parent) :
KDialogBase(parent, "AppBlock Editor",false,
i18n("Edit AppInfo Block"),
Ok|Cancel),
@@ -65,11 +65,11 @@ DBAppInfoEditor::DBAppInfoEditor(char*appInfoData, int l, QWidget *parent) :
}
else
{
- QLabel*tmpW = new QLabel( i18n("To view the Application info block data, please install a hex editor (e.g. khexedit from kdeutils)."), this );
+ TQLabel*tmpW = new TQLabel( i18n("To view the Application info block data, please install a hex editor (e.g. khexedit from kdeutils)."), this );
tmpW->setBackgroundMode( Qt::PaletteMid );
tmpW->setAlignment( Qt::AlignHCenter | Qt::AlignVCenter | Qt::WordBreak);
- tmpW->setFrameShape( QFrame::Panel );
- tmpW->setFrameShadow( QFrame::Sunken );
+ tmpW->setFrameShape( TQFrame::Panel );
+ tmpW->setFrameShadow( TQFrame::Sunken );
fAppInfoEdit = tmpW;
}
setMainWidget( fAppInfoEdit );
diff --git a/kpilot/kpilot/dbAppInfoEditor.h b/kpilot/kpilot/dbAppInfoEditor.h
index 5a0896d82..692cd251a 100644
--- a/kpilot/kpilot/dbAppInfoEditor.h
+++ b/kpilot/kpilot/dbAppInfoEditor.h
@@ -36,13 +36,13 @@ class DBAppInfoEditor : public KDialogBase
{
Q_OBJECT
public:
- DBAppInfoEditor(char*appInfoData, int l, QWidget *parent = 0);
+ DBAppInfoEditor(char*appInfoData, int l, TQWidget *parent = 0);
~DBAppInfoEditor();
char*appInfo;
int len;
protected:
void fillWidgets();
- QWidget*fAppInfoEdit;
+ TQWidget*fAppInfoEdit;
protected slots:
virtual void slotOk();
};
diff --git a/kpilot/kpilot/dbFlagsEditor.cc b/kpilot/kpilot/dbFlagsEditor.cc
index 0d6adeb99..89f14d03a 100644
--- a/kpilot/kpilot/dbFlagsEditor.cc
+++ b/kpilot/kpilot/dbFlagsEditor.cc
@@ -29,8 +29,8 @@
#include <pi-dlp.h>
-#include <qlineedit.h>
-#include <qcheckbox.h>
+#include <tqlineedit.h>
+#include <tqcheckbox.h>
#include <kdatewidget.h>
#include <ktimewidget.h>
#include <kmessagebox.h>
@@ -40,7 +40,7 @@
#include "dbFlagsEditor_base.h"
-DBFlagsEditor::DBFlagsEditor(DBInfo*dbinfo, QWidget *parent) :
+DBFlagsEditor::DBFlagsEditor(DBInfo*dbinfo, TQWidget *parent) :
KDialogBase(parent, "FlagsEditor",false,
i18n("Edit Database Flags"), Ok|Cancel),
dbi(dbinfo)
@@ -83,7 +83,7 @@ void DBFlagsEditor::slotOk()
dbi->miscFlags |= dlpDBMiscFlagExcludeFromSync;
else dbi->miscFlags &= ~dlpDBMiscFlagExcludeFromSync;
- QDateTime ttime;
+ TQDateTime ttime;
ttime.setDate(widget->fCreationDate->date());
#if KDE_IS_VERSION(3,1,9)
ttime.setTime(widget->fCreationTime->time());
@@ -115,15 +115,15 @@ void DBFlagsEditor::fillWidgets()
{
// FUNCTIONSETUP
- widget->fDBName->setText(QString::fromLatin1(dbi->name));
+ widget->fDBName->setText(TQString::fromLatin1(dbi->name));
char buff[5];
set_long(buff, dbi->type);
buff[4]='\0';
- widget->fType->setText(QString::fromLatin1(buff));
+ widget->fType->setText(TQString::fromLatin1(buff));
set_long(buff, dbi->creator);
buff[4]='\0';
- widget->fCreator->setText(QString::fromLatin1(buff));
+ widget->fCreator->setText(TQString::fromLatin1(buff));
widget->fRessourceDB->setChecked(dbi->flags & dlpDBFlagResource);
widget->fReadOnly->setChecked(dbi->flags & dlpDBFlagReadOnly);
@@ -133,7 +133,7 @@ void DBFlagsEditor::fillWidgets()
widget->fReset->setChecked(dbi->flags & dlpDBFlagReset);
widget->fExcludeDB->setChecked(dbi->miscFlags & dlpDBMiscFlagExcludeFromSync);
- QDateTime ttime;
+ TQDateTime ttime;
ttime.setTime_t(dbi->createDate);
widget->fCreationDate->setDate(ttime.date());
#if KDE_IS_VERSION(3,1,9)
diff --git a/kpilot/kpilot/dbFlagsEditor.h b/kpilot/kpilot/dbFlagsEditor.h
index d4c7c6948..c5ad3c080 100644
--- a/kpilot/kpilot/dbFlagsEditor.h
+++ b/kpilot/kpilot/dbFlagsEditor.h
@@ -39,7 +39,7 @@ class DBFlagsEditor : public KDialogBase
{
Q_OBJECT
public:
- DBFlagsEditor(DBInfo*dbinfo=0L, QWidget *parent = 0);
+ DBFlagsEditor(DBInfo*dbinfo=0L, TQWidget *parent = 0);
~DBFlagsEditor();
protected:
diff --git a/kpilot/kpilot/dbFlagsEditor_base.ui.h b/kpilot/kpilot/dbFlagsEditor_base.ui.h
index 0186648c0..189f09d15 100644
--- a/kpilot/kpilot/dbFlagsEditor_base.ui.h
+++ b/kpilot/kpilot/dbFlagsEditor_base.ui.h
@@ -17,7 +17,7 @@
class KTimeWidget : public QWidget
{
public:
- KTimeWidget(QWidget *p, const char *n) : QWidget(p,n) {};
+ KTimeWidget(TQWidget *p, const char *n) : TQWidget(p,n) {};
} ;
diff --git a/kpilot/kpilot/dbRecordEditor.cc b/kpilot/kpilot/dbRecordEditor.cc
index 2b2d5b39a..b3dfd8f70 100644
--- a/kpilot/kpilot/dbRecordEditor.cc
+++ b/kpilot/kpilot/dbRecordEditor.cc
@@ -27,14 +27,14 @@
#include "options.h"
-#include <qlineedit.h>
-#include <qcheckbox.h>
-#include <qtooltip.h>
-#include <qwhatsthis.h>
-#include <qbuttongroup.h>
-#include <qlabel.h>
-#include <qpushbutton.h>
-#include <qlayout.h>
+#include <tqlineedit.h>
+#include <tqcheckbox.h>
+#include <tqtooltip.h>
+#include <tqwhatsthis.h>
+#include <tqbuttongroup.h>
+#include <tqlabel.h>
+#include <tqpushbutton.h>
+#include <tqlayout.h>
#include <kmessagebox.h>
@@ -49,12 +49,12 @@ using namespace KHE;
-DBRecordEditor::DBRecordEditor(PilotRecord*r, int n, QWidget *parent)
+DBRecordEditor::DBRecordEditor(PilotRecord*r, int n, TQWidget *parent)
: KDialogBase(parent, "RecordEditor",false,i18n("Edit Record"),
Ok|Cancel), rec(r), nr(n)
{
// fWidget=new DBRecordEditorBase(this);
- fWidget=new QWidget(this);
+ fWidget=new TQWidget(this);
setMainWidget(fWidget);
fBuffer = new char[4096];
@@ -119,46 +119,46 @@ void DBRecordEditor::initWidgets()
{
// FUNCTIONSETUP
- DBRecordEditorBaseLayout = new QGridLayout( fWidget, 1, 1, 11, 6, "DBRecordEditorBaseLayout");
+ DBRecordEditorBaseLayout = new TQGridLayout( fWidget, 1, 1, 11, 6, "DBRecordEditorBaseLayout");
- fRecordIndexLabel = new QLabel( fWidget, "fRecordIndexLabel" );
+ fRecordIndexLabel = new TQLabel( fWidget, "fRecordIndexLabel" );
DBRecordEditorBaseLayout->addWidget( fRecordIndexLabel, 0, 0 );
- fRecordIDLabel = new QLabel( fWidget, "fRecordIDLabel" );
+ fRecordIDLabel = new TQLabel( fWidget, "fRecordIDLabel" );
DBRecordEditorBaseLayout->addWidget( fRecordIDLabel, 0, 2 );
- fRecordIndex = new QLineEdit( fWidget, "fRecordIndex" );
+ fRecordIndex = new TQLineEdit( fWidget, "fRecordIndex" );
fRecordIndex->setReadOnly( TRUE );
DBRecordEditorBaseLayout->addWidget( fRecordIndex, 0, 1 );
- fRecordID = new QLineEdit( fWidget, "fRecordID" );
+ fRecordID = new TQLineEdit( fWidget, "fRecordID" );
fRecordID->setReadOnly( TRUE );
DBRecordEditorBaseLayout->addWidget( fRecordID, 0, 3 );
- fFlagsGroup = new QButtonGroup( fWidget, "fFlagsGroup" );
- fFlagsGroup->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5,
- (QSizePolicy::SizeType)4, 0, 0, fFlagsGroup->sizePolicy().hasHeightForWidth() ) );
+ fFlagsGroup = new TQButtonGroup( fWidget, "fFlagsGroup" );
+ fFlagsGroup->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5,
+ (TQSizePolicy::SizeType)4, 0, 0, fFlagsGroup->sizePolicy().hasHeightForWidth() ) );
fFlagsGroup->setColumnLayout(0, Qt::Vertical );
fFlagsGroup->layout()->setSpacing( 6 );
fFlagsGroup->layout()->setMargin( 11 );
- fFlagsGroupLayout = new QGridLayout( fFlagsGroup->layout() );
+ fFlagsGroupLayout = new TQGridLayout( fFlagsGroup->layout() );
fFlagsGroupLayout->setAlignment( Qt::AlignTop );
- fDirty = new QCheckBox( fFlagsGroup, "fDirty" );
+ fDirty = new TQCheckBox( fFlagsGroup, "fDirty" );
fFlagsGroupLayout->addWidget( fDirty, 0, 0 );
- fDeleted = new QCheckBox( fFlagsGroup, "fDeleted" );
+ fDeleted = new TQCheckBox( fFlagsGroup, "fDeleted" );
fFlagsGroupLayout->addWidget( fDeleted, 1, 0 );
- fBusy = new QCheckBox( fFlagsGroup, "fBusy" );
+ fBusy = new TQCheckBox( fFlagsGroup, "fBusy" );
fFlagsGroupLayout->addWidget( fBusy, 0, 1 );
- fSecret = new QCheckBox( fFlagsGroup, "fSecret" );
+ fSecret = new TQCheckBox( fFlagsGroup, "fSecret" );
fFlagsGroupLayout->addMultiCellWidget( fSecret, 1, 1, 1, 2 );
- fArchived = new QCheckBox( fFlagsGroup, "fArchived" );
+ fArchived = new TQCheckBox( fFlagsGroup, "fArchived" );
fFlagsGroupLayout->addWidget( fArchived, 0, 2 );
DBRecordEditorBaseLayout->addMultiCellWidget( fFlagsGroup, 1, 1, 0, 3 );
@@ -190,11 +190,11 @@ void DBRecordEditor::initWidgets()
}
else
{
- QLabel*tmpW = new QLabel( i18n("To view and edit the record data, please install a hex editor (e.g. kbytesedit from kdeutils)."), fWidget );
+ TQLabel*tmpW = new TQLabel( i18n("To view and edit the record data, please install a hex editor (e.g. kbytesedit from kdeutils)."), fWidget );
tmpW->setBackgroundMode( Qt::PaletteMid );
tmpW->setAlignment( Qt::AlignHCenter | Qt::AlignVCenter | Qt::WordBreak);
- tmpW->setFrameShape( QFrame::Panel );
- tmpW->setFrameShadow( QFrame::Sunken );
+ tmpW->setFrameShape( TQFrame::Panel );
+ tmpW->setFrameShadow( TQFrame::Sunken );
fRecordData = tmpW;
fRecordDataIf = 0;
}
@@ -202,15 +202,15 @@ void DBRecordEditor::initWidgets()
DBRecordEditorBaseLayout->addMultiCellWidget( fRecordData, 2, 2, 0, 3 );
languageChange();
- resize( QSize(600, 561).expandedTo(minimumSizeHint()) );
+ resize( TQSize(600, 561).expandedTo(minimumSizeHint()) );
}
void DBRecordEditor::fillWidgets()
{
// FUNCTIONSETUP
- fRecordIndex->setText(QString::number(nr));
- fRecordID->setText(QString::number(rec->id()));
+ fRecordIndex->setText(TQString::number(nr));
+ fRecordID->setText(TQString::number(rec->id()));
int att=rec->attributes();
fDirty->setChecked(att & dlpRecAttrDirty);
diff --git a/kpilot/kpilot/dbRecordEditor.h b/kpilot/kpilot/dbRecordEditor.h
index 97bea4ed6..a6c3ff555 100644
--- a/kpilot/kpilot/dbRecordEditor.h
+++ b/kpilot/kpilot/dbRecordEditor.h
@@ -54,30 +54,30 @@ class DBRecordEditor : public KDialogBase
{
Q_OBJECT
public:
- DBRecordEditor(PilotRecord*r=0L, int n=-1, QWidget *parent = 0);
+ DBRecordEditor(PilotRecord*r=0L, int n=-1, TQWidget *parent = 0);
~DBRecordEditor();
protected:
- QLabel* fRecordIndexLabel;
- QLabel* fRecordIDLabel;
- QLineEdit* fRecordIndex;
- QLineEdit* fRecordID;
- QButtonGroup* fFlagsGroup;
- QCheckBox* fDirty;
- QCheckBox* fDeleted;
- QCheckBox* fBusy;
- QCheckBox* fSecret;
- QCheckBox* fArchived;
- QWidget* fRecordData;
+ TQLabel* fRecordIndexLabel;
+ TQLabel* fRecordIDLabel;
+ TQLineEdit* fRecordIndex;
+ TQLineEdit* fRecordID;
+ TQButtonGroup* fFlagsGroup;
+ TQCheckBox* fDirty;
+ TQCheckBox* fDeleted;
+ TQCheckBox* fBusy;
+ TQCheckBox* fSecret;
+ TQCheckBox* fArchived;
+ TQWidget* fRecordData;
KHE::BytesEditInterface*fRecordDataIf;
protected:
- QGridLayout* DBRecordEditorBaseLayout;
- QGridLayout* fFlagsGroupLayout;
+ TQGridLayout* DBRecordEditorBaseLayout;
+ TQGridLayout* fFlagsGroupLayout;
protected:
// DBRecordEditorBase*fWidget;
- QWidget*fWidget;
+ TQWidget*fWidget;
char*fBuffer;
protected slots:
virtual void languageChange();
diff --git a/kpilot/kpilot/dbSelectionDialog.cc b/kpilot/kpilot/dbSelectionDialog.cc
index 7a875515f..683b8a8ca 100644
--- a/kpilot/kpilot/dbSelectionDialog.cc
+++ b/kpilot/kpilot/dbSelectionDialog.cc
@@ -30,8 +30,8 @@
#include "options.h"
-#include <qlistview.h>
-#include <qpushbutton.h>
+#include <tqlistview.h>
+#include <tqpushbutton.h>
#include <klistview.h>
#include <kmessagebox.h>
#include <kpushbutton.h>
@@ -41,9 +41,9 @@
#include "dbSelectionDialog.moc"
-KPilotDBSelectionDialog::KPilotDBSelectionDialog(QStringList &selectedDBs, QStringList &deviceDBs,
- QStringList &addedDBs, QWidget *w, const char *n) :
- KDialogBase(w, n, true, QString::null, KDialogBase::Ok | KDialogBase::Cancel,
+KPilotDBSelectionDialog::KPilotDBSelectionDialog(TQStringList &selectedDBs, TQStringList &deviceDBs,
+ TQStringList &addedDBs, TQWidget *w, const char *n) :
+ KDialogBase(w, n, true, TQString::null, KDialogBase::Ok | KDialogBase::Cancel,
KDialogBase::Ok, false),
fSelectedDBs(selectedDBs),
fAddedDBs(addedDBs),
@@ -55,27 +55,27 @@ KPilotDBSelectionDialog::KPilotDBSelectionDialog(QStringList &selectedDBs, QStri
setMainWidget(fSelectionWidget);
// Fill the encodings list
- QStringList items(deviceDBs);
- for ( QStringList::Iterator it = fAddedDBs.begin(); it != fAddedDBs.end(); ++it ) {
+ TQStringList items(deviceDBs);
+ for ( TQStringList::Iterator it = fAddedDBs.begin(); it != fAddedDBs.end(); ++it ) {
if (items.contains(*it)==0) items << (*it);
}
- for ( QStringList::Iterator it = fSelectedDBs.begin(); it != fSelectedDBs.end(); ++it ) {
+ for ( TQStringList::Iterator it = fSelectedDBs.begin(); it != fSelectedDBs.end(); ++it ) {
if (items.contains(*it)==0) items << (*it);
}
items.sort();
- for ( QStringList::Iterator it = items.begin(); it != items.end(); ++it ) {
- QCheckListItem*checkitem=new QCheckListItem(fSelectionWidget->fDatabaseList,
- *it, QCheckListItem::CheckBox);
+ for ( TQStringList::Iterator it = items.begin(); it != items.end(); ++it ) {
+ TQCheckListItem*checkitem=new TQCheckListItem(fSelectionWidget->fDatabaseList,
+ *it, TQCheckListItem::CheckBox);
if (fSelectedDBs.contains(*it)) checkitem->setOn(true);
}
- connect(fSelectionWidget->fNameEdit, SIGNAL(textChanged( const QString & )),
- this, SLOT(slotTextChanged( const QString &)));
- connect(fSelectionWidget->fAddButton, SIGNAL(clicked()),
- this, SLOT(addDB()));
- connect(fSelectionWidget->fRemoveButton, SIGNAL(clicked()),
- this, SLOT(removeDB()));
+ connect(fSelectionWidget->fNameEdit, TQT_SIGNAL(textChanged( const TQString & )),
+ this, TQT_SLOT(slotTextChanged( const TQString &)));
+ connect(fSelectionWidget->fAddButton, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(addDB()));
+ connect(fSelectionWidget->fRemoveButton, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(removeDB()));
}
KPilotDBSelectionDialog::~KPilotDBSelectionDialog()
@@ -86,12 +86,12 @@ KPilotDBSelectionDialog::~KPilotDBSelectionDialog()
void KPilotDBSelectionDialog::addDB()
{
FUNCTIONSETUP;
- QString dbname(fSelectionWidget->fNameEdit->text());
+ TQString dbname(fSelectionWidget->fNameEdit->text());
if (!dbname.isEmpty())
{
fSelectionWidget->fNameEdit->clear();
- new QCheckListItem(fSelectionWidget->fDatabaseList, dbname,
- QCheckListItem::CheckBox);
+ new TQCheckListItem(fSelectionWidget->fDatabaseList, dbname,
+ TQCheckListItem::CheckBox);
fAddedDBs << dbname;
}
}
@@ -99,10 +99,10 @@ void KPilotDBSelectionDialog::addDB()
void KPilotDBSelectionDialog::removeDB()
{
FUNCTIONSETUP;
- QListViewItem*item(fSelectionWidget->fDatabaseList->selectedItem());
+ TQListViewItem*item(fSelectionWidget->fDatabaseList->selectedItem());
if (item)
{
- QString dbname=item->text(0);
+ TQString dbname=item->text(0);
if (fDeviceDBs.contains(dbname))
{
KMessageBox::error(this, i18n("This is a database that exists on the device. It was not added manually, so it can not removed from the list."), i18n("Database on Device"));
@@ -120,14 +120,14 @@ void KPilotDBSelectionDialog::removeDB()
}
}
-QStringList KPilotDBSelectionDialog::getSelectedDBs()
+TQStringList KPilotDBSelectionDialog::getSelectedDBs()
{
fSelectedDBs.clear();
// update the list of selected databases
- QListViewItemIterator it( fSelectionWidget->fDatabaseList );
+ TQListViewItemIterator it( fSelectionWidget->fDatabaseList );
while ( it.current() ) {
- QCheckListItem *item = dynamic_cast<QCheckListItem*>(it.current());
+ TQCheckListItem *item = dynamic_cast<TQCheckListItem*>(it.current());
++it;
if ( item && item->isOn() )
@@ -137,7 +137,7 @@ QStringList KPilotDBSelectionDialog::getSelectedDBs()
return fSelectedDBs;
}
-void KPilotDBSelectionDialog::slotTextChanged( const QString& dbname)
+void KPilotDBSelectionDialog::slotTextChanged( const TQString& dbname)
{
FUNCTIONSETUP;
fSelectionWidget->fAddButton->setDisabled(dbname.isEmpty());
diff --git a/kpilot/kpilot/dbSelectionDialog.h b/kpilot/kpilot/dbSelectionDialog.h
index 5be8a85b8..ee0df63d3 100644
--- a/kpilot/kpilot/dbSelectionDialog.h
+++ b/kpilot/kpilot/dbSelectionDialog.h
@@ -38,20 +38,20 @@ class KPilotDBSelectionDialog : public KDialogBase
{
Q_OBJECT
public:
- KPilotDBSelectionDialog(QStringList &selectedDBs, QStringList &deviceDBs,
- QStringList &addedDBs, QWidget *, const char *);
+ KPilotDBSelectionDialog(TQStringList &selectedDBs, TQStringList &deviceDBs,
+ TQStringList &addedDBs, TQWidget *, const char *);
virtual ~KPilotDBSelectionDialog();
- QStringList getSelectedDBs();
- QStringList getAddedDBs() const {return fAddedDBs; };
+ TQStringList getSelectedDBs();
+ TQStringList getAddedDBs() const {return fAddedDBs; };
private:
- QStringList fSelectedDBs;
- QStringList fAddedDBs;
- QStringList fDeviceDBs;
+ TQStringList fSelectedDBs;
+ TQStringList fAddedDBs;
+ TQStringList fDeviceDBs;
protected slots:
void addDB();
void removeDB();
- void slotTextChanged( const QString& dbname);
+ void slotTextChanged( const TQString& dbname);
private:
KPilotDBSelectionWidget *fSelectionWidget;
diff --git a/kpilot/kpilot/dbviewerWidget.cc b/kpilot/kpilot/dbviewerWidget.cc
index fa7a5ab23..b5f046320 100644
--- a/kpilot/kpilot/dbviewerWidget.cc
+++ b/kpilot/kpilot/dbviewerWidget.cc
@@ -37,10 +37,10 @@
#include <pi-file.h>
#include <pi-dlp.h>
-#include <qlayout.h>
-#include <qdir.h>
-#include <qregexp.h>
-#include <qlistview.h>
+#include <tqlayout.h>
+#include <tqdir.h>
+#include <tqregexp.h>
+#include <tqlistview.h>
#include <klistbox.h>
#include <ktextedit.h>
@@ -64,7 +64,7 @@
#include "dbviewerWidget.moc"
-GenericDBWidget::GenericDBWidget(QWidget *parent, const QString &dbpath) :
+GenericDBWidget::GenericDBWidget(TQWidget *parent, const TQString &dbpath) :
PilotComponent(parent,"component_generic",dbpath), fDB(0L)
{
FUNCTIONSETUP;
@@ -75,7 +75,7 @@ GenericDBWidget::GenericDBWidget(QWidget *parent, const QString &dbpath) :
void GenericDBWidget::setupWidget()
{
- QGridLayout *g = new QGridLayout( this, 1, 1, SPACING);
+ TQGridLayout *g = new TQGridLayout( this, 1, 1, SPACING);
fDBList = new KListBox( this );
g->addWidget( fDBList, 0, 0 );
@@ -85,9 +85,9 @@ void GenericDBWidget::setupWidget()
fDBType->insertItem( i18n( "Only Applications (*.prc)" ) );
fDBType->insertItem( i18n( "Only Databases (*.pdb)" ) );
- QGridLayout *g1 = new QGridLayout( 0, 1, 1);
+ TQGridLayout *g1 = new TQGridLayout( 0, 1, 1);
fDBInfo = new KTextEdit( this );
- fDBInfo->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)3, (QSizePolicy::SizeType)0, 0, 0, fDBInfo->sizePolicy().hasHeightForWidth() ) );
+ fDBInfo->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)3, (TQSizePolicy::SizeType)0, 0, 0, fDBInfo->sizePolicy().hasHeightForWidth() ) );
fDBInfo->setReadOnly( TRUE );
g1->addWidget( fDBInfo, 0, 0 );
fDBInfoButton = new KPushButton( i18n( "General Database &Information" ), this );
@@ -95,7 +95,7 @@ void GenericDBWidget::setupWidget()
fAppInfoButton = new KPushButton( i18n( "&Application Info Block (Categories etc.)" ), this );
g1->addWidget( fAppInfoButton, 2, 0 );
- QGridLayout *g2 = new QGridLayout( 0, 1, 1);
+ TQGridLayout *g2 = new TQGridLayout( 0, 1, 1);
fRecordList = new KListView( this );
g2->addMultiCellWidget( fRecordList, 0, 0, 0, 2 );
fRecordList->addColumn(i18n("Rec. Nr."));
@@ -117,24 +117,24 @@ void GenericDBWidget::setupWidget()
g->addMultiCellLayout( g1, 0, 1, 1, 1 );
- resize( QSize(682, 661).expandedTo(minimumSizeHint()) );
-
- connect(fDBList, SIGNAL(highlighted(const QString &)),
- this, SLOT(slotSelected(const QString &)));
- connect(fDBType, SIGNAL(activated(int)),
- this, SLOT(slotDBType(int)));
- connect(fDBInfoButton, SIGNAL(clicked()),
- this, SLOT(slotShowDBInfo()));
- connect(fAppInfoButton, SIGNAL(clicked()),
- this, SLOT(slotShowAppInfo()));
- connect(fAddRecord, SIGNAL(clicked()),
- this, SLOT(slotAddRecord()));
- connect(fEditRecord, SIGNAL(clicked()),
- this, SLOT(slotEditRecord()));
- connect(fDeleteRecord, SIGNAL(clicked()),
- this, SLOT(slotDeleteRecord()));
- connect(fRecordList, SIGNAL(executed(QListViewItem*)),
- this, SLOT(slotEditRecord(QListViewItem*)));
+ resize( TQSize(682, 661).expandedTo(minimumSizeHint()) );
+
+ connect(fDBList, TQT_SIGNAL(highlighted(const TQString &)),
+ this, TQT_SLOT(slotSelected(const TQString &)));
+ connect(fDBType, TQT_SIGNAL(activated(int)),
+ this, TQT_SLOT(slotDBType(int)));
+ connect(fDBInfoButton, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotShowDBInfo()));
+ connect(fAppInfoButton, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotShowAppInfo()));
+ connect(fAddRecord, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotAddRecord()));
+ connect(fEditRecord, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotEditRecord()));
+ connect(fDeleteRecord, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotDeleteRecord()));
+ connect(fRecordList, TQT_SIGNAL(executed(TQListViewItem*)),
+ this, TQT_SLOT(slotEditRecord(TQListViewItem*)));
}
@@ -148,7 +148,7 @@ GenericDBWidget::~GenericDBWidget()
void GenericDBWidget::showComponent()
{
FUNCTIONSETUP;
- fDBInfo->setText(QString::null);
+ fDBInfo->setText(TQString::null);
slotDBType(0);
fDBList->show();
@@ -160,14 +160,14 @@ void GenericDBWidget::hideComponent()
reset();
}
-void GenericDBWidget::slotSelected(const QString &dbname)
+void GenericDBWidget::slotSelected(const TQString &dbname)
{
FUNCTIONSETUP;
#ifdef DEBUG
DEBUGKPILOT << fname << ": Selected DB " << dbname << endl;
#endif
struct DBInfo dbinfo;
- QString display;
+ TQString display;
fRecList.clear();
fRecordList->clear();
@@ -181,7 +181,7 @@ void GenericDBWidget::slotSelected(const QString &dbname)
// We are dealing with a database
currentDBtype=eDatabase;
- currentDB.remove( QRegExp(CSL1(".(pdb|PDB)$")) );
+ currentDB.remove( TQRegExp(CSL1(".(pdb|PDB)$")) );
fDB=new PilotLocalDatabase(dbPath(), currentDB, false);
if (!fDB || !fDB->isOpen())
@@ -192,14 +192,14 @@ void GenericDBWidget::slotSelected(const QString &dbname)
}
dbinfo=fDB->getDBInfo();
display.append(i18n("<B>Database:</B> %1, %2 records<BR>")
- .arg(QString::fromLatin1(dbinfo.name)).arg(fDB->recordCount()));
+ .arg(TQString::fromLatin1(dbinfo.name)).arg(fDB->recordCount()));
char buff[5];
set_long(buff, dbinfo.type);
buff[4]='\0';
- QString tp = QString::fromLatin1(buff);
+ TQString tp = TQString::fromLatin1(buff);
set_long(buff, dbinfo.creator);
buff[4]='\0';
- QString cr = QString::fromLatin1(buff);
+ TQString cr = TQString::fromLatin1(buff);
display.append(i18n("<B>Type:</B> %1, <B>Creator:</B> %2<br><br>").arg(tp).arg(cr));
int currentRecord = 0;
@@ -214,9 +214,9 @@ void GenericDBWidget::slotSelected(const QString &dbname)
// if (!(pilotRec->isDeleted()) )
{
PilotListViewItem*item=new PilotListViewItem(fRecordList,
- QString::number(currentRecord), QString::number(pilotRec->size()),
- QString::number(pilotRec->id()),
- QString::null,
+ TQString::number(currentRecord), TQString::number(pilotRec->size()),
+ TQString::number(pilotRec->id()),
+ TQString::null,
pilotRec->id(), pilotRec);
item->setNumericCol(0, true);
item->setNumericCol(1, true);
@@ -238,7 +238,7 @@ void GenericDBWidget::slotSelected(const QString &dbname)
// we are dealing with an application
currentDBtype=eApplication;
- QCString filename = QFile::encodeName(dbPath() + CSL1("/") + dbname);
+ TQCString filename = TQFile::encodeName(dbPath() + CSL1("/") + dbname);
const char *s = filename;
struct pi_file *pf = pi_file_open(const_cast<char *>(s));
if (!pf)
@@ -261,7 +261,7 @@ void GenericDBWidget::slotSelected(const QString &dbname)
}
enableWidgets(currentDBtype==eDatabase);
- QDateTime ttime;
+ TQDateTime ttime;
ttime.setTime_t(dbinfo.createDate);
display.append(i18n("Created: %1<BR>").arg(ttime.toString()));
@@ -282,7 +282,7 @@ void GenericDBWidget::slotDBType(int mode)
reset();
- QDir dir(dbPath());
+ TQDir dir(dbPath());
switch (mode)
{
case 1:
@@ -293,7 +293,7 @@ void GenericDBWidget::slotDBType(int mode)
default:
dir.setNameFilter(CSL1("*.pdb;*.prc")); break;
}
- QStringList l = dir.entryList();
+ TQStringList l = dir.entryList();
fDBList->insertStringList(l);
}
@@ -304,7 +304,7 @@ void GenericDBWidget::reset()
fDBInfo->clear();
fRecordList->clear();
if (fDB) KPILOT_DELETE(fDB);
- currentDB=QString::null;
+ currentDB=TQString::null;
}
void GenericDBWidget::slotAddRecord()
@@ -313,8 +313,8 @@ void GenericDBWidget::slotAddRecord()
pi_buffer_t *b = pi_buffer_new(0);
PilotRecord *rec=new PilotRecord(b, 0, 0, 0);
PilotListViewItem*item=new PilotListViewItem(fRecordList,
- QString::number(-1), QString::number(rec->size()),
- QString::number(rec->id()), QString::null,
+ TQString::number(-1), TQString::number(rec->size()),
+ TQString::number(rec->id()), TQString::null,
rec->id(), rec);
if (slotEditRecord(item))
{
@@ -327,7 +327,7 @@ void GenericDBWidget::slotAddRecord()
}
}
-bool GenericDBWidget::slotEditRecord(QListViewItem*item)
+bool GenericDBWidget::slotEditRecord(TQListViewItem*item)
{
FUNCTIONSETUP;
PilotListViewItem*currRecItem=dynamic_cast<PilotListViewItem*>(item);
@@ -338,8 +338,8 @@ bool GenericDBWidget::slotEditRecord(QListViewItem*item)
DBRecordEditor*dlg=new DBRecordEditor(rec, nr, this);
if (dlg->exec())
{
- currRecItem->setText(1, QString::number(rec->size()));
- currRecItem->setText(2, QString::number(rec->id()));
+ currRecItem->setText(1, TQString::number(rec->size()));
+ currRecItem->setText(2, TQString::number(rec->id()));
fRecordList->triggerUpdate();
writeRecord(rec);
KPILOT_DELETE(dlg);
diff --git a/kpilot/kpilot/dbviewerWidget.h b/kpilot/kpilot/dbviewerWidget.h
index 9ef3ad8da..877a8699b 100644
--- a/kpilot/kpilot/dbviewerWidget.h
+++ b/kpilot/kpilot/dbviewerWidget.h
@@ -45,24 +45,24 @@ class GenericDBWidget : public PilotComponent
Q_OBJECT
public:
- GenericDBWidget(QWidget* parent, const QString& dbpath);
+ GenericDBWidget(TQWidget* parent, const TQString& dbpath);
virtual ~GenericDBWidget();
// Pilot component methods
/* virtual */ void showComponent();
/* virtual */ void hideComponent();
- QString getCurrentDB() const { return currentDB; }
+ TQString getCurrentDB() const { return currentDB; }
protected:
void setupWidget();
protected slots:
- void slotSelected(const QString &dbname);
+ void slotSelected(const TQString &dbname);
void slotDBType(int mode);
void reset();
void slotAddRecord();
void slotEditRecord();
- bool slotEditRecord(QListViewItem*);
+ bool slotEditRecord(TQListViewItem*);
void slotDeleteRecord();
void slotShowAppInfo();
void slotShowDBInfo();
@@ -83,8 +83,8 @@ private:
} currentDBtype;
PilotLocalDatabase*fDB;
- QString currentDB;
- QPtrList<PilotRecord> fRecList;
+ TQString currentDB;
+ TQPtrList<PilotRecord> fRecList;
};
diff --git a/kpilot/kpilot/fileInstallWidget.cc b/kpilot/kpilot/fileInstallWidget.cc
index e8111ce87..69909302d 100644
--- a/kpilot/kpilot/fileInstallWidget.cc
+++ b/kpilot/kpilot/fileInstallWidget.cc
@@ -35,15 +35,15 @@
#include <unistd.h>
-#include <qlistbox.h>
-#include <qstring.h>
-#include <qlabel.h>
-#include <qpushbutton.h>
-#include <qlayout.h>
-#include <qwhatsthis.h>
-#include <qmultilineedit.h>
-#include <qpixmap.h>
-#include <qpopupmenu.h>
+#include <tqlistbox.h>
+#include <tqstring.h>
+#include <tqlabel.h>
+#include <tqpushbutton.h>
+#include <tqlayout.h>
+#include <tqwhatsthis.h>
+#include <tqmultilineedit.h>
+#include <tqpixmap.h>
+#include <tqpopupmenu.h>
#include <kfiledialog.h>
#include <kurldrag.h>
@@ -58,43 +58,43 @@
#include "fileInstallWidget.moc"
-FileInstallWidget::FileInstallWidget(QWidget * parent,
- const QString & path) :
+FileInstallWidget::FileInstallWidget(TQWidget * parent,
+ const TQString & path) :
PilotComponent(parent, "component_files", path),
fSaveFileList(false),
fInstaller(0L)
{
FUNCTIONSETUP;
- QGridLayout *grid = new QGridLayout(this, 5, 5, SPACING);
+ TQGridLayout *grid = new TQGridLayout(this, 5, 5, SPACING);
- QLabel *label = new QLabel(i18n("Files to install:"), this);
+ TQLabel *label = new TQLabel(i18n("Files to install:"), this);
grid->addWidget(label, 1, 1);
- QPushButton *abutton;
+ TQPushButton *abutton;
- abutton = addButton = new QPushButton(i18n("Add File..."), this);
- connect(abutton, SIGNAL(clicked()), this, SLOT(slotAddFile()));
+ abutton = addButton = new TQPushButton(i18n("Add File..."), this);
+ connect(abutton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotAddFile()));
grid->addWidget(abutton, 3, 1);
- QWhatsThis::add(abutton,
+ TQWhatsThis::add(abutton,
i18n("<qt>Choose a file to add to the list of files to install.</qt>"));
- abutton = clearButton= new QPushButton(i18n("Clear List"), this);
- connect(abutton, SIGNAL(clicked()), this, SLOT(slotClearButton()));
+ abutton = clearButton= new TQPushButton(i18n("Clear List"), this);
+ connect(abutton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotClearButton()));
grid->addWidget(abutton, 4, 1);
- QWhatsThis::add(abutton,
+ TQWhatsThis::add(abutton,
i18n("<qt>Clear the list of files to install. No files will be installed.</qt>"));
fIconView = new KIconView(this);
- connect(fIconView, SIGNAL(dropped(QDropEvent *, const QValueList<QIconDragItem> &)),
- this, SLOT(slotDropEvent(QDropEvent *, const QValueList<QIconDragItem> &)));
+ connect(fIconView, TQT_SIGNAL(dropped(TQDropEvent *, const TQValueList<TQIconDragItem> &)),
+ this, TQT_SLOT(slotDropEvent(TQDropEvent *, const TQValueList<TQIconDragItem> &)));
grid->addMultiCellWidget(fIconView, 1, 4, 2, 3);
- QWhatsThis::add(fIconView,
+ TQWhatsThis::add(fIconView,
i18n
("<qt>This lists files that will be installed on the Pilot during the next HotSync. Drag files here or use the Add button.</qt>"));
fIconView->setAcceptDrops(true);
- fIconView->setSelectionMode(QIconView::Extended);
+ fIconView->setSelectionMode(TQIconView::Extended);
fIconView->viewport()->installEventFilter(this);
grid->setRowStretch(2, 100);
@@ -104,8 +104,8 @@ FileInstallWidget::FileInstallWidget(QWidget * parent,
grid->addRowSpacing(5, SPACING);
fInstaller = new FileInstaller;
- connect(fInstaller, SIGNAL(filesChanged()),
- this, SLOT(refreshFileInstallList()));
+ connect(fInstaller, TQT_SIGNAL(filesChanged()),
+ this, TQT_SLOT(refreshFileInstallList()));
}
@@ -114,12 +114,12 @@ FileInstallWidget::~FileInstallWidget()
KPILOT_DELETE(fInstaller);
}
-static inline bool pdbOrPrc(const QString &s)
+static inline bool pdbOrPrc(const TQString &s)
{
return s.endsWith(CSL1(".pdb"),false) || s.endsWith(CSL1(".prc"),false) ;
}
-void FileInstallWidget::dragEnterEvent(QDragEnterEvent *event)
+void FileInstallWidget::dragEnterEvent(TQDragEnterEvent *event)
{
FUNCTIONSETUP;
@@ -130,7 +130,7 @@ void FileInstallWidget::dragEnterEvent(QDragEnterEvent *event)
}
KURL::List::const_iterator it;
- QString filename;
+ TQString filename;
for ( it = urls.begin(); it != urls.end(); ++it ) {
filename = (*it).fileName();
if(!pdbOrPrc(filename)) {
@@ -141,32 +141,32 @@ void FileInstallWidget::dragEnterEvent(QDragEnterEvent *event)
event->accept(true);
}
-bool FileInstallWidget::eventFilter(QObject *watched, QEvent *event)
+bool FileInstallWidget::eventFilter(TQObject *watched, TQEvent *event)
{
FUNCTIONSETUP;
if(watched == fIconView->viewport())
{
- if(event->type() == QEvent::DragEnter) {
- dragEnterEvent(static_cast<QDragEnterEvent*>(event));
+ if(event->type() == TQEvent::DragEnter) {
+ dragEnterEvent(static_cast<TQDragEnterEvent*>(event));
return true;
}
// We have to skip the DragMove event, because it seems to override the
// accept state, when it is set to false by dragEnterEvent() (event->accept(false);)
- if(event->type() == QEvent::DragMove) {
+ if(event->type() == TQEvent::DragMove) {
return true;
}
- if(event->type() == QEvent::MouseButtonPress) {
- contextMenu(static_cast<QMouseEvent*>(event));
+ if(event->type() == TQEvent::MouseButtonPress) {
+ contextMenu(static_cast<TQMouseEvent*>(event));
}
}
return false;
}
-void FileInstallWidget::dropEvent(QDropEvent * drop)
+void FileInstallWidget::dropEvent(TQDropEvent * drop)
{
FUNCTIONSETUP;
if (!shown) return;
@@ -180,7 +180,7 @@ void FileInstallWidget::dropEvent(QDropEvent * drop)
DEBUGKPILOT << ": Got " << list.first().prettyURL() << endl;
#endif
- QStringList files;
+ TQStringList files;
for(KURL::List::ConstIterator it = list.begin(); it != list.end(); ++it)
{
if ((*it).isLocalFile())
@@ -190,7 +190,7 @@ void FileInstallWidget::dropEvent(QDropEvent * drop)
fInstaller->addFiles(files, this );
}
-void FileInstallWidget::slotDropEvent(QDropEvent * drop, const QValueList<QIconDragItem> & /*lst*/)
+void FileInstallWidget::slotDropEvent(TQDropEvent * drop, const TQValueList<TQIconDragItem> & /*lst*/)
{
FUNCTIONSETUP;
dropEvent(drop);
@@ -213,16 +213,16 @@ void FileInstallWidget::slotAddFile()
FUNCTIONSETUP;
if (!shown) return;
- QStringList fileNames = KFileDialog::getOpenFileNames(
- QString::null, i18n("*.pdb *.prc|PalmOS Databases (*.pdb *.prc)"));
+ TQStringList fileNames = KFileDialog::getOpenFileNames(
+ TQString::null, i18n("*.pdb *.prc|PalmOS Databases (*.pdb *.prc)"));
- for (QStringList::Iterator fileName = fileNames.begin(); fileName != fileNames.end(); ++fileName)
+ for (TQStringList::Iterator fileName = fileNames.begin(); fileName != fileNames.end(); ++fileName)
{
fInstaller->addFile(*fileName, this );
}
}
-bool FileInstallWidget::preHotSync(QString &)
+bool FileInstallWidget::preHotSync(TQString &)
{
FUNCTIONSETUP;
@@ -250,12 +250,12 @@ void FileInstallWidget::refreshFileInstallList()
{
FUNCTIONSETUP;
- QStringList fileNames = fInstaller->fileNames();
- QPixmap kpilotIcon = KGlobal::iconLoader()->loadIcon(CSL1("kpilot"), KIcon::Desktop);
+ TQStringList fileNames = fInstaller->fileNames();
+ TQPixmap kpilotIcon = KGlobal::iconLoader()->loadIcon(CSL1("kpilot"), KIcon::Desktop);
fIconView->clear();
- for (QStringList::Iterator fileName = fileNames.begin(); fileName != fileNames.end(); ++fileName)
+ for (TQStringList::Iterator fileName = fileNames.begin(); fileName != fileNames.end(); ++fileName)
{
if(pdbOrPrc(*fileName))
{
@@ -268,22 +268,22 @@ void FileInstallWidget::refreshFileInstallList()
}
}
-void FileInstallWidget::contextMenu(QMouseEvent *event)
+void FileInstallWidget::contextMenu(TQMouseEvent *event)
{
FUNCTIONSETUP;
if(event->button() == Qt::LeftButton)
return;
- QIconViewItem *item;
- QStringList files;
+ TQIconViewItem *item;
+ TQStringList files;
for(item = fIconView->firstItem(); item; item = item->nextItem())
{
if(item->isSelected())
files.append(item->text());
}
- QPopupMenu popup(fIconView);
+ TQPopupMenu popup(fIconView);
item = fIconView->findItem(event->pos());
if(item) {
diff --git a/kpilot/kpilot/fileInstallWidget.h b/kpilot/kpilot/fileInstallWidget.h
index b4bd205c9..6fff2c02b 100644
--- a/kpilot/kpilot/fileInstallWidget.h
+++ b/kpilot/kpilot/fileInstallWidget.h
@@ -47,12 +47,12 @@ class FileInstallWidget : public PilotComponent
Q_OBJECT
public:
- FileInstallWidget(QWidget* parent, const QString& dbPath);
+ FileInstallWidget(TQWidget* parent, const TQString& dbPath);
virtual ~FileInstallWidget();
// Pilot Component Methods:
void showComponent();
- bool preHotSync(QString &);
+ bool preHotSync(TQString &);
void postHotSync();
@@ -63,11 +63,11 @@ protected:
void setSaveFileList(bool saveIt) { fSaveFileList = saveIt; }
bool getSaveFileList() { return fSaveFileList; }
- /* virtual */ void dragEnterEvent(QDragEnterEvent* event);
- /* virtual */ void dropEvent(QDropEvent* drop);
- /* virtual */ bool eventFilter (QObject *watched, QEvent *event );
+ /* virtual */ void dragEnterEvent(TQDragEnterEvent* event);
+ /* virtual */ void dropEvent(TQDropEvent* drop);
+ /* virtual */ bool eventFilter (TQObject *watched, TQEvent *event );
- void contextMenu(QMouseEvent *event);
+ void contextMenu(TQMouseEvent *event);
KPilotInstaller* getPilotInstallerApp() { return fKPilotInstaller; }
@@ -77,13 +77,13 @@ private:
KPilotInstaller* fKPilotInstaller;
FileInstaller *fInstaller;
- QPushButton *clearButton,*addButton;
+ TQPushButton *clearButton,*addButton;
protected slots:
void slotClearButton();
void slotAddFile();
- void slotDropEvent(QDropEvent * drop, const QValueList<QIconDragItem> & lst);
+ void slotDropEvent(TQDropEvent * drop, const TQValueList<TQIconDragItem> & lst);
public slots:
void refreshFileInstallList();
diff --git a/kpilot/kpilot/fileInstaller.cc b/kpilot/kpilot/fileInstaller.cc
index 6c26a79f4..d46c67d23 100644
--- a/kpilot/kpilot/fileInstaller.cc
+++ b/kpilot/kpilot/fileInstaller.cc
@@ -34,9 +34,9 @@
#include <unistd.h>
-#include <qstring.h>
-#include <qstrlist.h>
-#include <qdir.h>
+#include <tqstring.h>
+#include <tqstrlist.h>
+#include <tqdir.h>
#include <kglobal.h>
#include <kstandarddirs.h>
@@ -69,13 +69,13 @@ void FileInstaller::clearPending()
unsigned int i;
- QDir installDir(fDirName);
+ TQDir installDir(fDirName);
// Start from 2 to skip . and ..
//
for (i = 2; i < installDir.count(); i++)
{
- QFile::remove(fDirName + installDir[i]);
+ TQFile::remove(fDirName + installDir[i]);
}
if (i > 2)
@@ -84,24 +84,24 @@ void FileInstaller::clearPending()
}
}
-void FileInstaller::deleteFile(const QString &file)
+void FileInstaller::deleteFile(const TQString &file)
{
- QFile::remove(fDirName + file);
+ TQFile::remove(fDirName + file);
emit filesChanged();
}
-void FileInstaller::deleteFiles(const QStringList &files)
+void FileInstaller::deleteFiles(const TQStringList &files)
{
if(files.empty())
return;
- for(QStringList::ConstIterator it = files.begin(); it != files.end(); ++it)
- QFile::remove(fDirName + *it);
+ for(TQStringList::ConstIterator it = files.begin(); it != files.end(); ++it)
+ TQFile::remove(fDirName + *it);
emit filesChanged();
}
-/* virtual */ bool FileInstaller::runCopy(const QString & s, QWidget* w )
+/* virtual */ bool FileInstaller::runCopy(const TQString & s, TQWidget* w )
{
FUNCTIONSETUP;
@@ -127,7 +127,7 @@ void FileInstaller::deleteFiles(const QStringList &files)
}
-void FileInstaller::addFiles(const QStringList & fileList, QWidget* w)
+void FileInstaller::addFiles(const TQStringList & fileList, TQWidget* w)
{
FUNCTIONSETUP;
@@ -135,7 +135,7 @@ void FileInstaller::addFiles(const QStringList & fileList, QWidget* w)
unsigned int succ = 0;
- for(QStringList::ConstIterator it = fileList.begin();
+ for(TQStringList::ConstIterator it = fileList.begin();
it != fileList.end(); ++it)
{
if (runCopy( *it, w ))
@@ -148,7 +148,7 @@ void FileInstaller::addFiles(const QStringList & fileList, QWidget* w)
}
}
-void FileInstaller::addFile( const QString & file, QWidget* w )
+void FileInstaller::addFile( const TQString & file, TQWidget* w )
{
FUNCTIONSETUP;
@@ -165,14 +165,14 @@ void FileInstaller::addFile( const QString & file, QWidget* w )
FUNCTIONSETUP;
}
-const QStringList FileInstaller::fileNames() const
+const TQStringList FileInstaller::fileNames() const
{
FUNCTIONSETUP;
- QDir installDir(fDirName);
+ TQDir installDir(fDirName);
- return installDir.entryList(QDir::Files |
- QDir::NoSymLinks | QDir::Readable);
+ return installDir.entryList(TQDir::Files |
+ TQDir::NoSymLinks | TQDir::Readable);
}
/* slot */ void FileInstaller::setEnabled(bool b)
diff --git a/kpilot/kpilot/fileInstaller.h b/kpilot/kpilot/fileInstaller.h
index 3c23f5712..367a6a2b9 100644
--- a/kpilot/kpilot/fileInstaller.h
+++ b/kpilot/kpilot/fileInstaller.h
@@ -33,7 +33,7 @@
#ifndef _KPILOT_FILEINSTALLER_H
#define _KPILOT_FILEINSTALLER_H
-#include <qobject.h>
+#include <tqobject.h>
class QStringList;
@@ -48,24 +48,24 @@ public:
void clearPending();
- void addFiles( const QStringList&, QWidget* w );
- void addFile( const QString&, QWidget* w );
+ void addFiles( const TQStringList&, TQWidget* w );
+ void addFile( const TQString&, TQWidget* w );
- void deleteFile(const QString &);
- void deleteFiles(const QStringList &);
+ void deleteFile(const TQString &);
+ void deleteFiles(const TQStringList &);
/**
* Returns information about this installer. Note particularly
* that fileNames() returns only filenames, not paths. In particular,
* you'll need to prepend dir()+"/" to get pathnames.
*/
- const QString &dir() const { return fDirName; } ;
- const QStringList fileNames() const ;
+ const TQString &dir() const { return fDirName; } ;
+ const TQStringList fileNames() const ;
protected:
- virtual bool runCopy( const QString &src, QWidget*w );
+ virtual bool runCopy( const TQString &src, TQWidget*w );
public slots:
void copyCompleted();
@@ -74,7 +74,7 @@ public slots:
signals:
void filesChanged();
private:
- QString fDirName;
+ TQString fDirName;
int fPendingCopies;
bool enabled;
} ;
diff --git a/kpilot/kpilot/hotSync.cc b/kpilot/kpilot/hotSync.cc
index 60bb9356b..7a4d3e44c 100644
--- a/kpilot/kpilot/hotSync.cc
+++ b/kpilot/kpilot/hotSync.cc
@@ -41,14 +41,14 @@
#include <pi-file.h>
#include <pi-util.h>
-#include <qtimer.h>
-#include <qfile.h>
-#include <qfileinfo.h>
-#include <qdir.h>
-#include <qvaluelist.h>
-#include <qregexp.h>
-#include <qstringlist.h>
-#include <qthread.h>
+#include <tqtimer.h>
+#include <tqfile.h>
+#include <tqfileinfo.h>
+#include <tqdir.h>
+#include <tqvaluelist.h>
+#include <tqregexp.h>
+#include <tqstringlist.h>
+#include <tqthread.h>
#include <kglobal.h>
#include <kstandarddirs.h>
@@ -70,11 +70,11 @@ class BackupAction::Thread : public QThread
public:
Thread( BackupAction *parent,
KPilotLink *link,
- const QString &filename,
+ const TQString &filename,
const DBInfo *info );
enum {
- TerminateOK = QEvent::User,
+ TerminateOK = TQEvent::User,
TerminateFailure
} ;
@@ -83,7 +83,7 @@ protected:
private:
BackupAction *fParent;
KPilotLink *fLink;
- QString fFilename;
+ TQString fFilename;
struct DBInfo fDBInfo;
} ;
@@ -91,16 +91,16 @@ class BackupAction::Private
{
public:
bool fFullBackup; ///< Is this a full backup (all DBs, not just changed ones)?
- QStringList fNoBackupDBs;
- QValueList<unsigned long> fNoBackupCreators;
- QStringList fDeviceDBs;
+ TQStringList fNoBackupDBs;
+ TQValueList<unsigned long> fNoBackupCreators;
+ TQStringList fDeviceDBs;
- QString fPreferBackupDir; ///< Directory to write backup in, overrides default
+ TQString fPreferBackupDir; ///< Directory to write backup in, overrides default
// Remainder is used to hand around info during sync
int fDBIndex; ///< Database number we're now doing
- QString fBackupDir; ///< Directory to write backup in.
+ TQString fBackupDir; ///< Directory to write backup in.
/**
* Add the database described by the info block to the list of
@@ -117,9 +117,9 @@ public:
set_long( &buff[1], info->creator );
buff[5] = ']';
buff[6] = '\0';
- QString creator = QString::fromLatin1( buff );
+ TQString creator = TQString::fromLatin1( buff );
- QString dbname = Pilot::fromPilot( info->name, 32 );
+ TQString dbname = Pilot::fromPilot( info->name, 32 );
if ( !fDeviceDBs.contains( creator ) )
{
@@ -157,11 +157,11 @@ public:
}
// Now take wildcards into account
- QString db = Pilot::fromPilot(info->name);
- for (QStringList::const_iterator i = fNoBackupDBs.begin();
+ TQString db = Pilot::fromPilot(info->name);
+ for (TQStringList::const_iterator i = fNoBackupDBs.begin();
i != fNoBackupDBs.end(); ++i)
{
- QRegExp re(*i,true,true); // Wildcard match
+ TQRegExp re(*i,true,true); // Wildcard match
if (re.exactMatch(db))
{
return false;
@@ -182,10 +182,10 @@ BackupAction::BackupAction(KPilotLink * p, bool full) :
fP->fFullBackup = full;
}
-/* virtual */ QString BackupAction::statusString() const
+/* virtual */ TQString BackupAction::statusString() const
{
FUNCTIONSETUP;
- QString s(CSL1("BackupAction="));
+ TQString s(CSL1("BackupAction="));
switch (status())
{
@@ -212,14 +212,14 @@ BackupAction::BackupAction(KPilotLink * p, bool full) :
break;
default:
s.append(CSL1("(unknown "));
- s.append(QString::number(status()));
+ s.append(TQString::number(status()));
s.append(CSL1(")"));
}
return s;
}
-void BackupAction::setDirectory( const QString &p )
+void BackupAction::setDirectory( const TQString &p )
{
fP->fPreferBackupDir = p;
if (!p.endsWith(CSL1("/")))
@@ -228,19 +228,19 @@ void BackupAction::setDirectory( const QString &p )
}
}
-static inline void initNoBackup(QStringList &dbnames,
- QValueList<unsigned long> &dbcreators)
+static inline void initNoBackup(TQStringList &dbnames,
+ TQValueList<unsigned long> &dbcreators)
{
FUNCTIONSETUP;
dbnames.clear();
dbcreators.clear();
- QStringList configuredSkip = KPilotSettings::skipBackupDB();
- QStringList::const_iterator e = configuredSkip.end();
- for (QStringList::const_iterator i = configuredSkip.begin();
+ TQStringList configuredSkip = KPilotSettings::skipBackupDB();
+ TQStringList::const_iterator e = configuredSkip.end();
+ for (TQStringList::const_iterator i = configuredSkip.begin();
i!= e; ++i)
{
- QString s = *i;
+ TQString s = *i;
if (s.startsWith(CSL1("[")) && s.endsWith(CSL1("]")))
{
if (s.length() != 6)
@@ -249,7 +249,7 @@ static inline void initNoBackup(QStringList &dbnames,
}
else
{
- QCString data = s.mid(1,4).latin1();
+ TQCString data = s.mid(1,4).latin1();
unsigned long creator = pi_mktag(data[0],data[1],data[2],data[3]);
dbcreators.append(creator);
}
@@ -262,9 +262,9 @@ static inline void initNoBackup(QStringList &dbnames,
DEBUGKPILOT << fname << ": Will skip databases "
<< dbnames.join(CSL1(",")) << endl;
- QString creatorids;
+ TQString creatorids;
char buf[5];
- for (QValueList<unsigned long>::const_iterator i = dbcreators.begin();
+ for (TQValueList<unsigned long>::const_iterator i = dbcreators.begin();
i != dbcreators.end(); ++i)
{
unsigned long tag = *i;
@@ -280,10 +280,10 @@ static inline void initNoBackup(QStringList &dbnames,
* if this is not the case. This method will try
* to create the directory if it doesn't exist yet.
*/
-static inline bool checkBackupDirectory( const QString &backupDir )
+static inline bool checkBackupDirectory( const TQString &backupDir )
{
FUNCTIONSETUP;
- QFileInfo fi(backupDir);
+ TQFileInfo fi(backupDir);
if (fi.exists() && fi.isDir())
{
@@ -313,7 +313,7 @@ static inline bool checkBackupDirectory( const QString &backupDir )
KStandardDirs::makeDir( backupDir );
- fi = QFileInfo(backupDir);
+ fi = TQFileInfo(backupDir);
return fi.exists() && fi.isDir();
}
@@ -369,7 +369,7 @@ static inline bool checkBackupDirectory( const QString &backupDir )
initNoBackup( fP->fNoBackupDBs, fP->fNoBackupCreators );
fP->fDBIndex = 0;
- QTimer::singleShot(0,this,SLOT(backupOneDB()));
+ TQTimer::singleShot(0,this,TQT_SLOT(backupOneDB()));
return true;
}
@@ -380,7 +380,7 @@ static inline bool checkBackupDirectory( const QString &backupDir )
struct DBInfo info;
// TODO: make the progress reporting more accurate
- emit logProgress(QString::null, fP->fDBIndex);
+ emit logProgress(TQString::null, fP->fDBIndex);
if (openConduit() < 0)
{
@@ -444,11 +444,11 @@ static inline bool checkBackupDirectory( const QString &backupDir )
{
DEBUGKPILOT << fname << ": Skipping database <" << info.name
<< "> (no-backup list)" << endl;
- QString s = i18n("Skipping %1")
+ TQString s = i18n("Skipping %1")
.arg(Pilot::fromPilot(info.name));
addSyncLogEntry(s);
}
- QTimer::singleShot(0,this,SLOT(backupOneDB()));
+ TQTimer::singleShot(0,this,TQT_SLOT(backupOneDB()));
}
/**
@@ -500,10 +500,10 @@ bool BackupAction::startBackupThread(DBInfo *info)
// if we're here then we are going to back this database up. do some basic sanity
// checks and proceed....
- QString databaseName(Pilot::fromPilot(info->name));
+ TQString databaseName(Pilot::fromPilot(info->name));
databaseName.replace('/', '_');
- QString fullBackupName = fP->fBackupDir + databaseName;
+ TQString fullBackupName = fP->fBackupDir + databaseName;
if (PilotDatabase::isResource(info))
{
@@ -531,22 +531,22 @@ bool BackupAction::startBackupThread(DBInfo *info)
return true;
}
-/* virtual */ bool BackupAction::event( QEvent *e )
+/* virtual */ bool BackupAction::event( TQEvent *e )
{
- if (e->type() == (QEvent::Type)Thread::TerminateOK)
+ if (e->type() == (TQEvent::Type)Thread::TerminateOK)
{
KPILOT_DELETE(fBackupThread);
// This was a successful termination.
addSyncLogEntry( i18n("... OK.\n"), false );
- QTimer::singleShot(0,this,SLOT(backupOneDB()));
+ TQTimer::singleShot(0,this,TQT_SLOT(backupOneDB()));
return true;
}
- if (e->type() == (QEvent::Type)Thread::TerminateFailure)
+ if (e->type() == (TQEvent::Type)Thread::TerminateFailure)
{
KPILOT_DELETE(fBackupThread);
// Unsuccessful termination.
addSyncLogEntry( i18n("Backup failed.") );
- QTimer::singleShot(0,this,SLOT(backupOneDB()));
+ TQTimer::singleShot(0,this,TQT_SLOT(backupOneDB()));
return true;
}
return SyncAction::event(e);
@@ -559,8 +559,8 @@ void BackupAction::endBackup()
fP->fDBIndex = (-1);
fActionStatus = BackupEnded;
fP->fDeviceDBs.sort();
- QString old( QString::null );
- QStringList::Iterator itr = fP->fDeviceDBs.begin();
+ TQString old( TQString::null );
+ TQStringList::Iterator itr = fP->fDeviceDBs.begin();
while ( itr != fP->fDeviceDBs.end() ) {
if ( old == *itr ) {
itr = fP->fDeviceDBs.remove( itr );
@@ -575,7 +575,7 @@ void BackupAction::endBackup()
}
FileInstallAction::FileInstallAction(KPilotLink * p,
- const QString & d) :
+ const TQString & d) :
SyncAction(p, "fileInstall"),
fDBIndex(-1),
fTimer(0L),
@@ -595,9 +595,9 @@ FileInstallAction::~FileInstallAction()
{
FUNCTIONSETUP;
- QDir installDir(fDir);
- fList = installDir.entryList(QDir::Files |
- QDir::NoSymLinks | QDir::Readable);
+ TQDir installDir(fDir);
+ fList = installDir.entryList(TQDir::Files |
+ TQDir::NoSymLinks | TQDir::Readable);
#ifdef DEBUG
DEBUGKPILOT << fname
<< ": Installing " << fList.count() << " files" << endl;
@@ -614,9 +614,9 @@ FileInstallAction::~FileInstallAction()
return true;
}
- fTimer = new QTimer(this);
- QObject::connect(fTimer, SIGNAL(timeout()),
- this, SLOT(installNextFile()));
+ fTimer = new TQTimer(this);
+ TQObject::connect(fTimer, TQT_SIGNAL(timeout()),
+ this, TQT_SLOT(installNextFile()));
fTimer->start(0, false);
@@ -651,8 +651,8 @@ FileInstallAction::~FileInstallAction()
return;
}
- const QString filePath = fDir + fList[fDBIndex];
- const QString fileName = fList[fDBIndex];
+ const TQString filePath = fDir + fList[fDBIndex];
+ const TQString fileName = fList[fDBIndex];
fDBIndex++;
@@ -660,7 +660,7 @@ FileInstallAction::~FileInstallAction()
DEBUGKPILOT << fname << ": Installing file " << filePath << endl;
#endif
- QString m = i18n("Installing %1").arg(fileName);
+ TQString m = i18n("Installing %1").arg(fileName);
emit logProgress(m,(100 * fDBIndex) / (fList.count()+1));
m+=CSL1("\n");
emit addSyncLogEntry(m,false /* Don't print in KPilot's log. */ );
@@ -671,7 +671,7 @@ FileInstallAction::~FileInstallAction()
if (!resourceOK(fileName,filePath)) goto nextFile;
f = pi_file_open(const_cast <char *>
- ((const char *) QFile::encodeName(filePath)));
+ ((const char *) TQFile::encodeName(filePath)));
#if PILOT_LINK_NUMBER < PILOT_LINK_0_12_0
@@ -688,7 +688,7 @@ FileInstallAction::~FileInstallAction()
}
else
{
- QFile::remove(filePath);
+ TQFile::remove(filePath);
}
@@ -704,11 +704,11 @@ nextFile:
// Check that the given file path is a good resource
// file - in particular that the resource name is ok.
-bool FileInstallAction::resourceOK(const QString &fileName, const QString &filePath)
+bool FileInstallAction::resourceOK(const TQString &fileName, const TQString &filePath)
{
FUNCTIONSETUP;
- if (!QFile::exists(filePath))
+ if (!TQFile::exists(filePath))
{
emit logError(i18n("Unable to open file &quot;%1&quot;.").
arg(fileName));
@@ -716,7 +716,7 @@ bool FileInstallAction::resourceOK(const QString &fileName, const QString &fileP
}
struct pi_file *f = pi_file_open(const_cast <char *>
- ((const char *) QFile::encodeName(filePath)));
+ ((const char *) TQFile::encodeName(filePath)));
if (!f)
{
@@ -754,27 +754,27 @@ bool FileInstallAction::resourceOK(const QString &fileName, const QString &fileP
return r;
}
-/* virtual */ QString FileInstallAction::statusString() const
+/* virtual */ TQString FileInstallAction::statusString() const
{
FUNCTIONSETUP;
if (fDBIndex < 0)
{
- return QString(CSL1("Idle"));
+ return TQString(CSL1("Idle"));
}
else
{
if ((unsigned) fDBIndex >= fList.count())
{
- return QString(CSL1("Index out of range"));
+ return TQString(CSL1("Index out of range"));
}
else
{
- return QString(CSL1("Installing %1")).arg(fList[fDBIndex]);
+ return TQString(CSL1("Installing %1")).arg(fList[fDBIndex]);
}
}
}
-CheckUser::CheckUser(KPilotLink * p, QWidget * vp):
+CheckUser::CheckUser(KPilotLink * p, TQWidget * vp):
SyncAction(p, vp, "userCheck")
{
FUNCTIONSETUP;
@@ -790,8 +790,8 @@ CheckUser::~CheckUser()
{
FUNCTIONSETUP;
- QString guiUserName = KPilotSettings::userName();
- QString pilotUserName = fHandle->getPilotUser().name();
+ TQString guiUserName = KPilotSettings::userName();
+ TQString pilotUserName = fHandle->getPilotUser().name();
bool pilotUserEmpty = pilotUserName.isEmpty();
// 4 cases to handle:
// guiUserName empty / not empty
@@ -802,10 +802,10 @@ CheckUser::~CheckUser()
{
if (pilotUserEmpty)
{
- QString defaultUserName =
+ TQString defaultUserName =
i18n("A common name", "John Doe");
- QString q = i18n("<qt>Neither KPilot nor the "
+ TQString q = i18n("<qt>Neither KPilot nor the "
"handheld have a username set. "
"They <i>should</i> be set. "
"Should KPilot set them to a default value "
@@ -823,7 +823,7 @@ CheckUser::~CheckUser()
}
else
{
- QString q = i18n("<qt>The handheld has a username set "
+ TQString q = i18n("<qt>The handheld has a username set "
"(<i>%1</i>) but KPilot does not. Should "
"KPilot use this username in future?</qt>").
arg(pilotUserName);
@@ -840,7 +840,7 @@ CheckUser::~CheckUser()
{
if (pilotUserEmpty)
{
- QString q = CSL1("<qt>");
+ TQString q = CSL1("<qt>");
q += i18n("KPilot has a username set "
"(<i>%1</i>) but the handheld does not. "
"Should KPilot's username be set in the "
@@ -874,7 +874,7 @@ CheckUser::~CheckUser()
{
if (guiUserName != pilotUserName)
{
- QString q = i18n("<qt>The handheld thinks that "
+ TQString q = i18n("<qt>The handheld thinks that "
"the username is %1; "
"however, KPilot says you are %2."
"Which of these is the correct name?\n"
@@ -885,7 +885,7 @@ CheckUser::~CheckUser()
int r = questionYesNoCancel(q,
i18n("User Mismatch"),
- QString::null,
+ TQString::null,
20,
i18n("Use KPilot Name"),
i18n("Use Handheld Name"));
@@ -923,7 +923,7 @@ CheckUser::~CheckUser()
// fix the database location for local databases.
//
//
- QString pathName = KGlobal::dirs()->saveLocation("data",
+ TQString pathName = KGlobal::dirs()->saveLocation("data",
CSL1("kpilot/DBBackup/"));
if (!guiUserName.isEmpty())
{
@@ -940,22 +940,22 @@ class RestoreInfo
{
public:
struct DBInfo DBInfo;
- QString path;
+ TQString path;
} ;
class RestoreAction::Private
{
public:
- QString fPreferRestoreDir; /**< Preference setting where to get data from. */
+ TQString fPreferRestoreDir; /**< Preference setting where to get data from. */
- QValueList<RestoreInfo> fDBList;
- QTimer fTimer;
- QValueList<RestoreInfo>::ConstIterator fDBIterator;
+ TQValueList<RestoreInfo> fDBList;
+ TQTimer fTimer;
+ TQValueList<RestoreInfo>::ConstIterator fDBIterator;
int fDBIndex;
};
-RestoreAction::RestoreAction(KPilotLink * p, QWidget * visible ) :
+RestoreAction::RestoreAction(KPilotLink * p, TQWidget * visible ) :
SyncAction(p, visible, "restoreAction")
{
FUNCTIONSETUP;
@@ -963,7 +963,7 @@ RestoreAction::RestoreAction(KPilotLink * p, QWidget * visible ) :
fP = new Private;
}
-void RestoreAction::setDirectory( const QString &path )
+void RestoreAction::setDirectory( const TQString &path )
{
fP->fPreferRestoreDir = path;
}
@@ -972,7 +972,7 @@ void RestoreAction::setDirectory( const QString &path )
{
FUNCTIONSETUP;
- QString dirname;
+ TQString dirname;
if (fP->fPreferRestoreDir.isEmpty())
{
dirname = PilotLocalDatabase::getDBPath();
@@ -986,8 +986,8 @@ void RestoreAction::setDirectory( const QString &path )
DEBUGKPILOT << fname << ": Restoring user " << dirname << endl;
#endif
- QDir dir(dirname, QString::null, QDir::Name,
- QDir::Files | QDir::Readable | QDir::NoSymLinks);
+ TQDir dir(dirname, TQString::null, TQDir::Name,
+ TQDir::Files | TQDir::Readable | TQDir::NoSymLinks);
if (!dir.exists())
{
@@ -1021,14 +1021,14 @@ void RestoreAction::setDirectory( const QString &path )
}
- emit logProgress(i18n("Restoring %1...").arg(QString::null),1);
+ emit logProgress(i18n("Restoring %1...").arg(TQString::null),1);
for (unsigned int i = 0; i < dir.count(); i++)
{
- QString s;
+ TQString s;
RestoreInfo info;
- s = dirname + QDir::separator() + dir[i];
+ s = dirname + TQDir::separator() + dir[i];
DEBUGKPILOT << fname
<< ": Adding " << s << " to restore list." << endl;
@@ -1049,8 +1049,8 @@ void RestoreAction::setDirectory( const QString &path )
fP->fDBIterator = fP->fDBList.begin();
fActionStatus = InstallingFiles;
- QObject::connect(&(fP->fTimer), SIGNAL(timeout()),
- this, SLOT(installNextFile()));
+ TQObject::connect(&(fP->fTimer), TQT_SIGNAL(timeout()),
+ this, TQT_SLOT(installNextFile()));
fP->fTimer.start(0, false);
return true;
@@ -1089,7 +1089,7 @@ void RestoreAction::setDirectory( const QString &path )
return;
}
- QFileInfo databaseInfo(dbi.path);
+ TQFileInfo databaseInfo(dbi.path);
addSyncLogEntry(databaseInfo.fileName());
emit logProgress(i18n("Restoring %1...").arg(databaseInfo.fileName()),
(100*fP->fDBIndex) / (fP->fDBList.count()+1)) ;
@@ -1102,21 +1102,21 @@ void RestoreAction::setDirectory( const QString &path )
}
}
-/* virtual */ QString RestoreAction::statusString() const
+/* virtual */ TQString RestoreAction::statusString() const
{
FUNCTIONSETUP;
- QString s;
+ TQString s;
switch (status())
{
case InstallingFiles:
s.append(CSL1("Installing Files ("));
- s.append(QString::number(fP->fDBIndex));
+ s.append(TQString::number(fP->fDBIndex));
s.append(CSL1(")"));
break;
case GettingFileInfo:
s.append(CSL1("Getting File Info ("));
- s.append(QString::number(fP->fDBIndex));
+ s.append(TQString::number(fP->fDBIndex));
s.append(CSL1(")"));
break;
default:
@@ -1130,7 +1130,7 @@ void RestoreAction::setDirectory( const QString &path )
BackupAction::Thread::Thread( BackupAction *parent,
KPilotLink *link,
- const QString &filename,
+ const TQString &filename,
const DBInfo *info )
{
fParent = parent;
@@ -1144,12 +1144,12 @@ void BackupAction::Thread::run()
if (fLink->retrieveDatabase(fFilename,&fDBInfo))
{
// Successful.
- QApplication::postEvent( fParent, new QEvent( (QEvent::Type)TerminateOK ) );
+ TQApplication::postEvent( fParent, new TQEvent( (TQEvent::Type)TerminateOK ) );
}
else
{
// Failed
- QApplication::postEvent( fParent, new QEvent( (QEvent::Type)TerminateFailure ) );
+ TQApplication::postEvent( fParent, new TQEvent( (TQEvent::Type)TerminateFailure ) );
}
}
diff --git a/kpilot/kpilot/hotSync.h b/kpilot/kpilot/hotSync.h
index 580c2d616..33ef55315 100644
--- a/kpilot/kpilot/hotSync.h
+++ b/kpilot/kpilot/hotSync.h
@@ -41,7 +41,7 @@ class QTimer;
class CheckUser : public SyncAction
{
public:
- CheckUser(KPilotLink *p,QWidget *w=0L);
+ CheckUser(KPilotLink *p,TQWidget *w=0L);
virtual ~CheckUser();
protected:
@@ -72,7 +72,7 @@ public:
BackupEnded,
BackupComplete
} ;
- virtual QString statusString() const;
+ virtual TQString statusString() const;
/** By default, a path based on the user name (either
* on the handheld or set in KPilot) is used to
@@ -83,10 +83,10 @@ public:
* @p path to restore the default behavior of using
* the username.
*/
- void setDirectory( const QString &path );
+ void setDirectory( const TQString &path );
// Reimplemented to support threaded backup.
- virtual bool event( QEvent *e );
+ virtual bool event( TQEvent *e );
protected:
virtual bool exec();
@@ -119,10 +119,10 @@ class FileInstallAction : public SyncAction
Q_OBJECT
public:
FileInstallAction(KPilotLink *,
- const QString &fileDir);
+ const TQString &fileDir);
virtual ~FileInstallAction();
- virtual QString statusString() const;
+ virtual TQString statusString() const;
protected:
virtual bool exec();
@@ -132,23 +132,23 @@ protected slots:
private:
int fDBIndex;
- QTimer *fTimer;
- QString fDir;
- QStringList fList;
+ TQTimer *fTimer;
+ TQString fDir;
+ TQStringList fList;
// TODO: not const because it calls logError(), which is
// non-const (but might be - can signals be const, anyway?)
- bool resourceOK(const QString &, const QString &) /* const */ ;
+ bool resourceOK(const TQString &, const TQString &) /* const */ ;
} ;
class RestoreAction : public SyncAction
{
Q_OBJECT
public:
- RestoreAction(KPilotLink *,QWidget *w=0L);
+ RestoreAction(KPilotLink *,TQWidget *w=0L);
typedef enum { InstallingFiles, GettingFileInfo,Done } Status;
- virtual QString statusString() const;
+ virtual TQString statusString() const;
/** By default, a path based on the user name (either
* on the handheld or set in KPilot) is used to
@@ -159,7 +159,7 @@ public:
* @p path to restore the default behavior of using
* the username.
*/
- void setDirectory( const QString &path );
+ void setDirectory( const TQString &path );
protected:
virtual bool exec();
diff --git a/kpilot/kpilot/internalEditorAction.cc b/kpilot/kpilot/internalEditorAction.cc
index cee58ba21..bc4bdb3ed 100644
--- a/kpilot/kpilot/internalEditorAction.cc
+++ b/kpilot/kpilot/internalEditorAction.cc
@@ -27,9 +27,9 @@
#include <options.h>
-#include <qtimer.h>
-#include <qlayout.h>
-#include <qlabel.h>
+#include <tqtimer.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
#include <kmessagebox.h>
#include <kdialog.h>
#include <ktextedit.h>
@@ -61,7 +61,7 @@ bool InternalEditorAction::exec()
FUNCTIONSETUP;
emit logMessage(i18n("[Internal Editors]"));
fInternalEditorSyncStatus=eSyncStarted;
- QTimer::singleShot(0, this, SLOT(syncDirtyDB()));
+ TQTimer::singleShot(0, this, TQT_SLOT(syncDirtyDB()));
return true;
}
@@ -82,9 +82,9 @@ void InternalEditorAction::syncDirtyDB()
}
if (dbIter==dirtyDBs.end())
{
- KPilotSettings::setDirtyDatabases(QStringList());
+ KPilotSettings::setDirtyDatabases(TQStringList());
KPilotConfig::sync();
- QTimer::singleShot(0, this, SLOT(syncFlagsChangedDB()));
+ TQTimer::singleShot(0, this, TQT_SLOT(syncFlagsChangedDB()));
return;
}
#ifdef DEBUG
@@ -146,14 +146,14 @@ nextDB:
localDB->resetSyncFlags();
KPILOT_DELETE(localDB);
KPILOT_DELETE(serialDB);
- QTimer::singleShot(0, this, SLOT(syncDirtyDB()));
+ TQTimer::singleShot(0, this, TQT_SLOT(syncDirtyDB()));
}
-bool InternalEditorAction::queryUseKPilotChanges(QString dbName, recordid_t id, PilotRecord*localrec, PilotRecord*serialrec, PilotDatabase*db)
+bool InternalEditorAction::queryUseKPilotChanges(TQString dbName, recordid_t id, PilotRecord*localrec, PilotRecord*serialrec, PilotDatabase*db)
{
FUNCTIONSETUP;
bool knownDB=true;
- QString localEntry, serialEntry, recType(i18n("record"));
+ TQString localEntry, serialEntry, recType(i18n("record"));
if (dbName==CSL1("AddressDB") && db)
{
@@ -201,7 +201,7 @@ bool InternalEditorAction::queryUseKPilotChanges(QString dbName, recordid_t id,
knownDB=false;
}
- QString dialogText(i18n("The %1 with ID %2 of the database \"%3\" was changed "
+ TQString dialogText(i18n("The %1 with ID %2 of the database \"%3\" was changed "
"on the handheld and in the internal editor. Shall the changes in KPilot be copied to the handheld, and so override the changes there?").
arg(recType).arg(id).arg(dbName));
@@ -212,40 +212,40 @@ bool InternalEditorAction::queryUseKPilotChanges(QString dbName, recordid_t id,
resdlg->setButtonText(KDialogBase::Ok, i18n("Use &KPilot"));
resdlg->setButtonText(KDialogBase::Cancel, i18n("Use &Handheld"));
- QWidget*page=new QWidget(resdlg);
+ TQWidget*page=new TQWidget(resdlg);
resdlg->setMainWidget(page);
- QGridLayout*layout = new QGridLayout( page, 1, 1);
+ TQGridLayout*layout = new TQGridLayout( page, 1, 1);
- QLabel *label=new QLabel(dialogText, page);
- label->setAlignment( QLabel::WordBreak );
+ TQLabel *label=new TQLabel(dialogText, page);
+ label->setAlignment( TQLabel::WordBreak );
layout->addMultiCellWidget( label, 0,0, 0,1 );
- layout->addItem( new QSpacerItem( 20, 10, QSizePolicy::Minimum,
- QSizePolicy::Fixed ), 1, 0 );
+ layout->addItem( new TQSpacerItem( 20, 10, TQSizePolicy::Minimum,
+ TQSizePolicy::Fixed ), 1, 0 );
if (knownDB)
{
- label=new QLabel(i18n("Entry in KPilot"), page);
+ label=new TQLabel(i18n("Entry in KPilot"), page);
layout->addWidget( label, 2,0);
- KTextEdit*textBrowser = new KTextEdit(CSL1("<qt>")+localEntry+CSL1("</qt>"), QString::null, page);
+ KTextEdit*textBrowser = new KTextEdit(CSL1("<qt>")+localEntry+CSL1("</qt>"), TQString::null, page);
textBrowser->setReadOnly(true);
layout->addWidget( textBrowser, 3,0);
- label=new QLabel(i18n("Entry on Handheld"), page);
+ label=new TQLabel(i18n("Entry on Handheld"), page);
layout->addWidget( label, 2,1);
- textBrowser = new KTextEdit(CSL1("<qt>")+serialEntry+CSL1("</qt>"), QString::null, page);
+ textBrowser = new KTextEdit(CSL1("<qt>")+serialEntry+CSL1("</qt>"), TQString::null, page);
textBrowser->setReadOnly(true);
layout->addWidget( textBrowser, 3,1);
}
else
{
- label=new QLabel(i18n("Entry in KPilot"), page);
+ label=new TQLabel(i18n("Entry in KPilot"), page);
layout->addMultiCellWidget( label, 2,2,0,1);
// directly display the record's data:
- QWidget *hexEdit = KHE::createBytesEditWidget( page, "LocalBufferEdit" );
+ TQWidget *hexEdit = KHE::createBytesEditWidget( page, "LocalBufferEdit" );
if( hexEdit )
{
KHE::BytesEditInterface* hexEditIf = KHE::bytesEditInterface( hexEdit );
@@ -260,16 +260,16 @@ bool InternalEditorAction::queryUseKPilotChanges(QString dbName, recordid_t id,
}
else
{
- QLabel*tmpW = new QLabel( i18n("To view and edit the record data, please install a hex editor (e.g. khexedit from kdeutils)."), page );
+ TQLabel*tmpW = new TQLabel( i18n("To view and edit the record data, please install a hex editor (e.g. khexedit from kdeutils)."), page );
tmpW->setBackgroundMode( Qt::PaletteMid );
tmpW->setAlignment( Qt::AlignHCenter | Qt::AlignVCenter | Qt::WordBreak);
- tmpW->setFrameShape( QFrame::Panel );
- tmpW->setFrameShadow( QFrame::Sunken );
+ tmpW->setFrameShape( TQFrame::Panel );
+ tmpW->setFrameShadow( TQFrame::Sunken );
hexEdit = tmpW;
}
layout->addMultiCellWidget( hexEdit, 3,3,0,1);
- label=new QLabel(i18n("Entry on Handheld"), page);
+ label=new TQLabel(i18n("Entry on Handheld"), page);
layout->addMultiCellWidget( label, 4,4,0,1);
// directly display the record's data:
@@ -288,11 +288,11 @@ bool InternalEditorAction::queryUseKPilotChanges(QString dbName, recordid_t id,
}
else
{
- QLabel*tmpW = new QLabel( i18n("To view and edit the record data, please install a hex editor (e.g. khexedit from kdeutils)."), page );
+ TQLabel*tmpW = new TQLabel( i18n("To view and edit the record data, please install a hex editor (e.g. khexedit from kdeutils)."), page );
tmpW->setBackgroundMode( Qt::PaletteMid );
tmpW->setAlignment( Qt::AlignHCenter | Qt::AlignVCenter | Qt::WordBreak);
- tmpW->setFrameShape( QFrame::Panel );
- tmpW->setFrameShadow( QFrame::Sunken );
+ tmpW->setFrameShape( TQFrame::Panel );
+ tmpW->setFrameShadow( TQFrame::Sunken );
hexEdit = tmpW;
}
layout->addMultiCellWidget( hexEdit, 5,5,0,1);
@@ -321,9 +321,9 @@ void InternalEditorAction::syncFlagsChangedDB()
}
if (dbIter==dirtyDBs.end())
{
- KPilotSettings::setFlagsChangedDatabases(QStringList());
+ KPilotSettings::setFlagsChangedDatabases(TQStringList());
KPilotConfig::sync();
- QTimer::singleShot(0, this, SLOT(syncAppBlockChangedDB()));
+ TQTimer::singleShot(0, this, TQT_SLOT(syncAppBlockChangedDB()));
return;
}
@@ -331,7 +331,7 @@ void InternalEditorAction::syncFlagsChangedDB()
DEBUGKPILOT<<"syncFlagsChangedDB for DB "<<(*dbIter)<<endl;
#endif
emit logError(i18n("Setting the database flags on the handheld is not yet supported."));
-QTimer::singleShot(0, this, SLOT(syncAppBlockChangedDB()));
+TQTimer::singleShot(0, this, TQT_SLOT(syncAppBlockChangedDB()));
return;
PilotLocalDatabase*localDB=new PilotLocalDatabase(*dbIter, false);
@@ -343,7 +343,7 @@ return;
KPILOT_DELETE(localDB);
KPILOT_DELETE(serialDB);
- QTimer::singleShot(0, this, SLOT(syncAppBlockChangedDB()));
+ TQTimer::singleShot(0, this, TQT_SLOT(syncAppBlockChangedDB()));
}
void InternalEditorAction::syncAppBlockChangedDB()
@@ -362,9 +362,9 @@ void InternalEditorAction::syncAppBlockChangedDB()
}
if (dbIter==dirtyDBs.end())
{
- KPilotSettings::setAppBlockChangedDatabases(QStringList());
+ KPilotSettings::setAppBlockChangedDatabases(TQStringList());
KPilotConfig::sync();
- QTimer::singleShot(0, this, SLOT(cleanup()));
+ TQTimer::singleShot(0, this, TQT_SLOT(cleanup()));
return;
}
#ifdef DEBUG
@@ -381,7 +381,7 @@ void InternalEditorAction::syncAppBlockChangedDB()
KPILOT_DELETE(localDB);
KPILOT_DELETE(serialDB);
- QTimer::singleShot(0, this, SLOT(syncAppBlockChangedDB()));
+ TQTimer::singleShot(0, this, TQT_SLOT(syncAppBlockChangedDB()));
}
void InternalEditorAction::cleanup()
diff --git a/kpilot/kpilot/internalEditorAction.h b/kpilot/kpilot/internalEditorAction.h
index 8e988348d..ed26cb35f 100644
--- a/kpilot/kpilot/internalEditorAction.h
+++ b/kpilot/kpilot/internalEditorAction.h
@@ -28,7 +28,7 @@
*/
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include "syncAction.h"
@@ -52,10 +52,10 @@ private slots:
void cleanup();
private:
- bool queryUseKPilotChanges(QString dbName, recordid_t id,
+ bool queryUseKPilotChanges(TQString dbName, recordid_t id,
PilotRecord*localrec, PilotRecord*serialrec, PilotDatabase*db);
- QStringList dirtyDBs;
- QStringList::Iterator dbIter;
+ TQStringList dirtyDBs;
+ TQStringList::Iterator dbIter;
enum eInternalEditorSyncStatus {
eSyncStarted,
eSyncDirtyDB,
diff --git a/kpilot/kpilot/kpilot.cc b/kpilot/kpilot/kpilot.cc
index 9207db02a..4b38c509a 100644
--- a/kpilot/kpilot/kpilot.cc
+++ b/kpilot/kpilot/kpilot.cc
@@ -31,11 +31,11 @@
#include "options.h"
-#include <qfile.h>
-#include <qptrlist.h>
-#include <qstring.h>
-#include <qvbox.h>
-#include <qtimer.h>
+#include <tqfile.h>
+#include <tqptrlist.h>
+#include <tqstring.h>
+#include <tqvbox.h>
+#include <tqtimer.h>
#include <kjanuswidget.h>
#include <kurl.h>
@@ -86,7 +86,7 @@
class KPilotInstaller::KPilotPrivate
{
public:
- typedef QPtrList<PilotComponent> ComponentList;
+ typedef TQPtrList<PilotComponent> ComponentList;
private:
ComponentList fPilotComponentList;
@@ -145,11 +145,11 @@ void KPilotInstaller::startDaemonIfNeeded()
fAppStatus=WaitingForDaemon;
- QString daemonError;
- QCString daemonDCOP;
+ TQString daemonError;
+ TQCString daemonDCOP;
int daemonPID;
- QString s = getDaemon().statusString();
+ TQString s = getDaemon().statusString();
DEBUGKPILOT << fname << ": Daemon status is "
<< ( s.isEmpty() ? CSL1("<none>") : s ) << endl;
@@ -169,7 +169,7 @@ void KPilotInstaller::startDaemonIfNeeded()
if (!fDaemonWasRunning && KApplication::startServiceByDesktopName(
CSL1("kpilotdaemon"),
- QString::null, &daemonError, &daemonDCOP, &daemonPID
+ TQString::null, &daemonError, &daemonDCOP, &daemonPID
, "0" /* no notify */
))
{
@@ -231,14 +231,14 @@ void KPilotInstaller::setupWidget()
fManagingWidget->setMinimumSize(fManagingWidget->sizeHint());
fManagingWidget->show();
setCentralWidget(fManagingWidget);
- connect( fManagingWidget, SIGNAL( aboutToShowPage ( QWidget* ) ),
- this, SLOT( slotAboutToShowComponent( QWidget* ) ) );
+ connect( fManagingWidget, TQT_SIGNAL( aboutToShowPage ( TQWidget* ) ),
+ this, TQT_SLOT( slotAboutToShowComponent( TQWidget* ) ) );
initIcons();
initMenu();
initComponents();
- setMinimumSize(sizeHint() + QSize(10,60));
+ setMinimumSize(sizeHint() + TQSize(10,60));
createGUI(CSL1("kpilotui.rc"), false);
setAutoSaveSettings();
@@ -248,15 +248,15 @@ void KPilotInstaller::initComponents()
{
FUNCTIONSETUP;
- QString defaultDBPath = KPilotConfig::getDefaultDBPath();
+ TQString defaultDBPath = KPilotConfig::getDefaultDBPath();
- QPixmap pixmap;
- QString pixfile;
- QWidget *w;
+ TQPixmap pixmap;
+ TQString pixfile;
+ TQWidget *w;
#define ADDICONPAGE(a,b) \
pixmap = KGlobal::iconLoader()->loadIcon(b, KIcon::Desktop, 64); \
- w = getManagingWidget()->addVBoxPage(a,QString::null, pixmap) ;
+ w = getManagingWidget()->addVBoxPage(a,TQString::null, pixmap) ;
ADDICONPAGE(i18n("HotSync"),CSL1("kpilotbhotsync"));
fLogWidget = new LogWidget(w);
@@ -286,7 +286,7 @@ void KPilotInstaller::initComponents()
#undef ADDICONPAGE
- QTimer::singleShot(500,this,SLOT(initializeComponents()));
+ TQTimer::singleShot(500,this,TQT_SLOT(initializeComponents()));
}
@@ -299,7 +299,7 @@ void KPilotInstaller::initIcons()
-void KPilotInstaller::slotAboutToShowComponent( QWidget *c )
+void KPilotInstaller::slotAboutToShowComponent( TQWidget *c )
{
FUNCTIONSETUP;
int ix = fManagingWidget->pageIndex( c );
@@ -320,14 +320,14 @@ void KPilotInstaller::slotSelectComponent(PilotComponent *c)
return;
}
- QObject *o = c->parent();
+ TQObject *o = c->parent();
if (!o)
{
WARNINGKPILOT << "Widget has no parent." << endl;
return;
}
- QWidget *parent = dynamic_cast<QWidget *>(o);
+ TQWidget *parent = dynamic_cast<TQWidget *>(o);
if (!parent)
{
WARNINGKPILOT << "Widget's parent is not a widget." << endl;
@@ -446,8 +446,8 @@ bool KPilotInstaller::componentPreSync()
{
FUNCTIONSETUP;
- QString reason;
- QString rprefix(i18n("Cannot start a Sync now. %1"));
+ TQString reason;
+ TQString rprefix(i18n("Cannot start a Sync now. %1"));
for (fP->list().first();
fP->list().current(); fP->list().next())
@@ -477,7 +477,7 @@ void KPilotInstaller::componentPostSync()
}
}
-void KPilotInstaller::setupSync(int kind, const QString & message)
+void KPilotInstaller::setupSync(int kind, const TQString & message)
{
FUNCTIONSETUP;
@@ -487,7 +487,7 @@ void KPilotInstaller::setupSync(int kind, const QString & message)
}
if (!message.isEmpty())
{
- QString m(message);
+ TQString m(message);
if (fLogWidget)
{
fLogWidget->logMessage(m);
@@ -496,7 +496,7 @@ void KPilotInstaller::setupSync(int kind, const QString & message)
getDaemon().requestSync(kind);
}
-void KPilotInstaller::closeEvent(QCloseEvent * e)
+void KPilotInstaller::closeEvent(TQCloseEvent * e)
{
FUNCTIONSETUP;
@@ -518,12 +518,12 @@ void KPilotInstaller::initMenu()
syncPopup->setWhatsThis(i18n("Select the kind of HotSync to perform next. "
"This applies only to the next HotSync; to change the default, use "
"the configuration dialog."));
- connect(syncPopup, SIGNAL(activated()),
- this, SLOT(slotHotSyncRequested()));
+ connect(syncPopup, TQT_SIGNAL(activated()),
+ this, TQT_SLOT(slotHotSyncRequested()));
// File actions, keep this list synced with kpilotui.rc and pilotDaemon.cc
a = new KAction(i18n("&HotSync"), CSL1("hotsync"), 0,
- this, SLOT(slotHotSyncRequested()),
+ this, TQT_SLOT(slotHotSyncRequested()),
actionCollection(), "file_hotsync");
a->setToolTip(i18n("Next HotSync will be normal HotSync."));
a->setWhatsThis(i18n("Tell the daemon that the next HotSync "
@@ -531,7 +531,7 @@ void KPilotInstaller::initMenu()
syncPopup->insert(a);
a = new KAction(i18n("Full&Sync"), CSL1("fullsync"), 0,
- this, SLOT(slotFullSyncRequested()),
+ this, TQT_SLOT(slotFullSyncRequested()),
actionCollection(), "file_fullsync");
a->setToolTip(i18n("Next HotSync will be a FullSync."));
a->setWhatsThis(i18n("Tell the daemon that the next HotSync "
@@ -539,7 +539,7 @@ void KPilotInstaller::initMenu()
syncPopup->insert(a);
a = new KAction(i18n("&Backup"), CSL1("backup"), 0,
- this, SLOT(slotBackupRequested()),
+ this, TQT_SLOT(slotBackupRequested()),
actionCollection(), "file_backup");
a->setToolTip(i18n("Next HotSync will be backup."));
a->setWhatsThis(i18n("Tell the daemon that the next HotSync "
@@ -547,15 +547,15 @@ void KPilotInstaller::initMenu()
syncPopup->insert(a);
a = new KAction(i18n("&Restore"), CSL1("restore"), 0,
- this, SLOT(slotRestoreRequested()),
+ this, TQT_SLOT(slotRestoreRequested()),
actionCollection(), "file_restore");
a->setToolTip(i18n("Next HotSync will be restore."));
a->setWhatsThis(i18n("Tell the daemon that the next HotSync "
"should restore the Handheld from data on the PC."));
syncPopup->insert(a);
- a = new KAction(i18n("Copy Handheld to PC"), QString::null, 0,
- this, SLOT(slotHHtoPCRequested()),
+ a = new KAction(i18n("Copy Handheld to PC"), TQString::null, 0,
+ this, TQT_SLOT(slotHHtoPCRequested()),
actionCollection(), "file_HHtoPC");
a->setToolTip(i18n("Next HotSync will be backup."));
a->setWhatsThis(i18n("Tell the daemon that the next HotSync "
@@ -563,8 +563,8 @@ void KPilotInstaller::initMenu()
"overwriting entries on the PC."));
syncPopup->insert(a);
- a = new KAction(i18n("Copy PC to Handheld"), QString::null, 0,
- this, SLOT(slotPCtoHHRequested()),
+ a = new KAction(i18n("Copy PC to Handheld"), TQString::null, 0,
+ this, TQT_SLOT(slotPCtoHHRequested()),
actionCollection(), "file_PCtoHH");
a->setToolTip(i18n("Next HotSync will copy PC to Handheld."));
a->setWhatsThis(i18n("Tell the daemon that the next HotSync "
@@ -575,7 +575,7 @@ void KPilotInstaller::initMenu()
#if 0
a = new KAction(i18n("&List Only"),CSL1("listsync"),0,
- this,SLOT(slotTestSyncRequested()),
+ this,TQT_SLOT(slotTestSyncRequested()),
actionCollection(), "file_list");
a->setToolTip(i18n("Next HotSync will list databases."));
a->setWhatsThis(i18n("Tell the daemon that the next HotSync "
@@ -586,14 +586,14 @@ void KPilotInstaller::initMenu()
a = new KAction(i18n("Rese&t Link"),CSL1("reload"), 0,
- this, SLOT(slotResetLink()),
+ this, TQT_SLOT(slotResetLink()),
actionCollection(),"file_reload");
a->setToolTip(i18n("Reset the device connection."));
a->setWhatsThis(i18n("Try to reset the daemon and its connection "
"to the Handheld."));
- a = KStdAction::quit(this, SLOT(quit()), actionCollection());
+ a = KStdAction::quit(this, TQT_SLOT(quit()), actionCollection());
a->setWhatsThis(i18n("Quit KPilot, (and stop the daemon "
"if configured that way)."));
@@ -603,15 +603,15 @@ void KPilotInstaller::initMenu()
createStandardStatusBarAction();
setStandardToolBarMenuEnabled(true);
- (void) KStdAction::keyBindings(this, SLOT(optionsConfigureKeys()),
+ (void) KStdAction::keyBindings(this, TQT_SLOT(optionsConfigureKeys()),
actionCollection());
- (void) KStdAction::configureToolbars(this, SLOT(optionsConfigureToolbars()),
+ (void) KStdAction::configureToolbars(this, TQT_SLOT(optionsConfigureToolbars()),
actionCollection());
- (void) KStdAction::preferences(this, SLOT(configure()),
+ (void) KStdAction::preferences(this, TQT_SLOT(configure()),
actionCollection());
a = new KAction(i18n("Configuration &Wizard..."), CSL1("wizard"), 0,
- this, SLOT(configureWizard()),
+ this, TQT_SLOT(configureWizard()),
actionCollection(), "options_configure_wizard");
a->setWhatsThis(i18n("Configure KPilot using the configuration wizard."));
@@ -629,7 +629,7 @@ void KPilotInstaller::quit()
for (fP->list().first();
fP->list().current(); fP->list().next())
{
- QString reason;
+ TQString reason;
if (!fP->list().current()->preHotSync(reason))
{
WARNINGKPILOT
@@ -644,7 +644,7 @@ void KPilotInstaller::quit()
}
void KPilotInstaller::addComponentPage(PilotComponent * p,
- const QString & name)
+ const TQString & name)
{
FUNCTIONSETUP;
@@ -685,13 +685,13 @@ void KPilotInstaller::addComponentPage(PilotComponent * p,
KToggleAction *pt =
new KToggleAction(name, /* "kpilot" -- component icon, */ 0,
- p, SLOT(slotShowComponent()),
+ p, TQT_SLOT(slotShowComponent()),
actionCollection(), actionname);
pt->setExclusiveGroup(CSL1("view_menu"));
- connect(p, SIGNAL(showComponent(PilotComponent *)),
- this, SLOT(slotSelectComponent(PilotComponent *)));
+ connect(p, TQT_SIGNAL(showComponent(PilotComponent *)),
+ this, TQT_SLOT(slotSelectComponent(PilotComponent *)));
}
/* slot */ void KPilotInstaller::initializeComponents()
@@ -719,7 +719,7 @@ void KPilotInstaller::optionsConfigureToolbars()
// This was added in KDE 3.1
saveMainWindowSettings( KGlobal::config(), autoSaveGroup() );
KEditToolbar dlg(actionCollection());
- connect(&dlg, SIGNAL(newToolbarConfig()), this, SLOT(slotNewToolbarConfig()));
+ connect(&dlg, TQT_SIGNAL(newToolbarConfig()), this, TQT_SLOT(slotNewToolbarConfig()));
dlg.exec();
}
@@ -741,7 +741,7 @@ void KPilotInstaller::slotResetLink()
/*
** Can't be a member function because it needs to be called even with no KPilotInstaller.
*/
-static bool runConfigure(PilotDaemonDCOP_stub &daemon,QWidget *parent)
+static bool runConfigure(PilotDaemonDCOP_stub &daemon,TQWidget *parent)
{
FUNCTIONSETUP;
bool ret = false;
@@ -796,7 +796,7 @@ static bool runConfigure(PilotDaemonDCOP_stub &daemon,QWidget *parent)
* canceled, though).
*/
typedef enum { Failed, OK, Cancel } WizardResult;
-static WizardResult runWizard(PilotDaemonDCOP_stub &daemon,QWidget *parent)
+static WizardResult runWizard(PilotDaemonDCOP_stub &daemon,TQWidget *parent)
{
FUNCTIONSETUP;
WizardResult ret = Failed ;
@@ -805,7 +805,7 @@ static WizardResult runWizard(PilotDaemonDCOP_stub &daemon,QWidget *parent)
KPilotSettings::self()->readConfig();
// Declarations at top because of goto's in this function
- ConfigWizard *(* f) (QWidget *, int) = 0L ;
+ ConfigWizard *(* f) (TQWidget *, int) = 0L ;
ConfigWizard *w = 0L;
KLibrary *l = KLibLoader::self()->library("kcm_kpilot");
@@ -817,7 +817,7 @@ static WizardResult runWizard(PilotDaemonDCOP_stub &daemon,QWidget *parent)
if (l->hasSymbol("create_wizard"))
{
- f = ( ConfigWizard * (*) (QWidget *, int) ) (l->symbol("create_wizard")) ;
+ f = ( ConfigWizard * (*) (TQWidget *, int) ) (l->symbol("create_wizard")) ;
}
if (!f)
@@ -869,7 +869,7 @@ void KPilotInstaller::componentUpdate()
{
FUNCTIONSETUP;
- QString defaultDBPath = KPilotConfig::getDefaultDBPath();
+ TQString defaultDBPath = KPilotConfig::getDefaultDBPath();
bool dbPathChanged = false;
for (fP->list().first();
@@ -1124,7 +1124,7 @@ int main(int argc, char **argv)
return 1;
}
- QTimer::singleShot(0,tp,SLOT(startDaemonIfNeeded()));
+ TQTimer::singleShot(0,tp,TQT_SLOT(startDaemonIfNeeded()));
KGlobal::dirs()->addResourceType("pilotdbs",
CSL1("share/apps/kpilot/DBBackup"));
diff --git a/kpilot/kpilot/kpilot.h b/kpilot/kpilot/kpilot.h
index 64bc770cb..998e087de 100644
--- a/kpilot/kpilot/kpilot.h
+++ b/kpilot/kpilot/kpilot.h
@@ -54,7 +54,7 @@ Q_OBJECT
public:
KPilotInstaller();
- KPilotInstaller(QStrList& fileList);
+ KPilotInstaller(TQStrList& fileList);
~KPilotInstaller();
/**
@@ -67,14 +67,14 @@ public:
// Adds 'name' to the pull down menu of components
- void addComponentPage(PilotComponent *, const QString &name);
+ void addComponentPage(PilotComponent *, const TQString &name);
KPilotStatus status() const { return fAppStatus; } ;
protected:
- void closeEvent(QCloseEvent *e);
+ void closeEvent(TQCloseEvent *e);
KJanusWidget *getManagingWidget() { return fManagingWidget; }
/**
@@ -141,7 +141,7 @@ protected:
* Run all the internal conduits' presync functions.
*/
bool componentPreSync();
- void setupSync(int kind,const QString& msg);
+ void setupSync(int kind,const TQString& msg);
void componentPostSync();
/**
* Run after a configuration change to force
@@ -196,7 +196,7 @@ protected slots:
* or activated through the signal mechanism.
* */
void slotSelectComponent( PilotComponent *c );
- void slotAboutToShowComponent( QWidget *c );
+ void slotAboutToShowComponent( TQWidget *c );
/**
* Delayed initialization of the components.
diff --git a/kpilot/kpilot/kpilotConfig.cc b/kpilot/kpilot/kpilotConfig.cc
index 72acdb9b4..285890262 100644
--- a/kpilot/kpilot/kpilotConfig.cc
+++ b/kpilot/kpilot/kpilotConfig.cc
@@ -31,9 +31,9 @@
#include <stdlib.h>
-#include <qlineedit.h>
-#include <qcombobox.h>
-#include <qcheckbox.h>
+#include <tqlineedit.h>
+#include <tqcombobox.h>
+#include <tqcheckbox.h>
#include <kstandarddirs.h>
#include <kconfig.h>
@@ -83,12 +83,12 @@
KPilotSettings::setConfigVersion( ConfigurationVersion );
}
-/* static */ QString KPilotConfig::getDefaultDBPath()
+/* static */ TQString KPilotConfig::getDefaultDBPath()
{
FUNCTIONSETUP;
- QString lastUser = KPilotSettings::userName();
- QString dbsubpath = CSL1("kpilot/DBBackup/");
- QString defaultDBPath = KGlobal::dirs()->
+ TQString lastUser = KPilotSettings::userName();
+ TQString dbsubpath = CSL1("kpilot/DBBackup/");
+ TQString defaultDBPath = KGlobal::dirs()->
saveLocation("data", dbsubpath + lastUser + CSL1("/"));
return defaultDBPath;
}
@@ -108,23 +108,23 @@
return debug_level;
}
-static QFont *thefont = 0L;
+static TQFont *thefont = 0L;
-/* static */ const QFont & KPilotConfig::fixed()
+/* static */ const TQFont & KPilotConfig::fixed()
{
FUNCTIONSETUP;
if (!thefont)
- thefont = new QFont(KGlobalSettings::fixedFont());
+ thefont = new TQFont(KGlobalSettings::fixedFont());
return *thefont;
}
-void KPilotConfig::addDirtyDatabase(QString db)
+void KPilotConfig::addDirtyDatabase(TQString db)
{
FUNCTIONSETUP;
- QStringList l(KPilotSettings::dirtyDatabases());
+ TQStringList l(KPilotSettings::dirtyDatabases());
if (!l.contains(db))
{
l.append(db);
@@ -133,9 +133,9 @@ void KPilotConfig::addDirtyDatabase(QString db)
}
-void KPilotConfig::addAppBlockChangedDatabase(QString db)
+void KPilotConfig::addAppBlockChangedDatabase(TQString db)
{
- QStringList l(KPilotSettings::appBlockChangedDatabases());
+ TQStringList l(KPilotSettings::appBlockChangedDatabases());
if (!l.contains(db))
{
l.append(db);
@@ -143,9 +143,9 @@ void KPilotConfig::addAppBlockChangedDatabase(QString db)
}
}
-void KPilotConfig::addFlagsChangedDatabase(QString db)
+void KPilotConfig::addFlagsChangedDatabase(TQString db)
{
- QStringList l(KPilotSettings::flagsChangedDatabases());
+ TQStringList l(KPilotSettings::flagsChangedDatabases());
if (!l.contains(db))
{
l.append(db);
@@ -156,10 +156,10 @@ void KPilotConfig::addFlagsChangedDatabase(QString db)
-/* static */ QString KPilotConfig::versionDetails(int fileversion, bool run)
+/* static */ TQString KPilotConfig::versionDetails(int fileversion, bool run)
{
FUNCTIONSETUP;
- QString s = CSL1("<qt><p>");
+ TQString s = CSL1("<qt><p>");
s += i18n("The configuration file is outdated.");
s += ' ';
s += i18n("The configuration file has version %1, while KPilot "
@@ -206,10 +206,10 @@ static void update440()
{
// Try to update conduit list
{
- QStringList conduits( KPilotSettings::installedConduits() );
+ TQStringList conduits( KPilotSettings::installedConduits() );
KConfig*c = KPilotSettings::self()->config();
/// c->resetGroup();
- c->setGroup( QString::null );
+ c->setGroup( TQString::null );
bool installFiles = c->readBoolEntry("SyncFiles",true);
if (installFiles) conduits.append( CSL1("internal_fileinstall") );
c->deleteEntry("SyncFiles");
@@ -228,14 +228,14 @@ static void update440()
// Search for old conduit libraries.
{
- QStringList foundlibs ;
+ TQStringList foundlibs ;
static const char *oldconduits[] = { "null", "address", "doc",
"knotes", "sysinfo", "time", "todo", "vcal", 0L } ;
const char **s = oldconduits;
while (*s)
{
- QString libname = CSL1("kde3/lib%1conduit.so").arg(QString::fromLatin1(*s));
- QString foundlib = ::locate("lib",libname);
+ TQString libname = CSL1("kde3/lib%1conduit.so").arg(TQString::fromLatin1(*s));
+ TQString foundlib = ::locate("lib",libname);
if (!foundlib.isEmpty())
{
foundlibs.append(foundlib);
@@ -258,15 +258,15 @@ static void update443()
{
FUNCTIONSETUP;
- QStringList skip = KPilotSettings::skipBackupDB();
- QStringList fixSkip;
+ TQStringList skip = KPilotSettings::skipBackupDB();
+ TQStringList fixSkip;
bool fixedSome = false;
#ifdef DEBUG
DEBUGKPILOT << fname << ": Skip databases are: "
<< skip.join(CSL1(",")) << endl;
#endif
- for (QStringList::const_iterator i = skip.begin(); i!=skip.end(); ++i)
+ for (TQStringList::const_iterator i = skip.begin(); i!=skip.end(); ++i)
{
if ((*i).length()==4)
{
diff --git a/kpilot/kpilot/kpilotConfig.h b/kpilot/kpilot/kpilotConfig.h
index 6b260bf7f..bc15c0aca 100644
--- a/kpilot/kpilot/kpilotConfig.h
+++ b/kpilot/kpilot/kpilotConfig.h
@@ -50,16 +50,16 @@ public:
} RunMode;
/**
- * @return QString of default path for the BackupDB files
+ * @return TQString of default path for the BackupDB files
* are located
*/
- static QString getDefaultDBPath();
+ static TQString getDefaultDBPath();
// Conduit configuration information
- static void addDirtyDatabase(QString db);
- static void addAppBlockChangedDatabase(QString db);
- static void addFlagsChangedDatabase(QString db);
+ static void addDirtyDatabase(TQString db);
+ static void addAppBlockChangedDatabase(TQString db);
+ static void addFlagsChangedDatabase(TQString db);
/**
* This number can be changed every time a new
@@ -89,7 +89,7 @@ public:
* admonition to run kpilot in config mode to fix this.
* sorryVersionOutdated() uses KMessageBox to display it.
*/
- static QString versionDetails(int fileversion, bool run);
+ static TQString versionDetails(int fileversion, bool run);
static void sorryVersionOutdated(int fileversion);
/**
* Update the config file as best we can, and inform the user.
@@ -116,7 +116,7 @@ public:
* Returns the user's preference for the system-wide
* fixed font.
*/
- static const QFont& fixed() ;
+ static const TQFont& fixed() ;
static void sync();
} ;
diff --git a/kpilot/kpilot/kpilotConfigDialog.cc b/kpilot/kpilot/kpilotConfigDialog.cc
index 1cb12c163..34cf82478 100644
--- a/kpilot/kpilot/kpilotConfigDialog.cc
+++ b/kpilot/kpilot/kpilotConfigDialog.cc
@@ -34,15 +34,15 @@
#include <pi-version.h>
-#include <qcombobox.h>
-#include <qcheckbox.h>
-#include <qradiobutton.h>
-#include <qpushbutton.h>
-#include <qbuttongroup.h>
-#include <qlineedit.h>
-#include <qtabwidget.h>
-#include <qspinbox.h>
-#include <qfile.h>
+#include <tqcombobox.h>
+#include <tqcheckbox.h>
+#include <tqradiobutton.h>
+#include <tqpushbutton.h>
+#include <tqbuttongroup.h>
+#include <tqlineedit.h>
+#include <tqtabwidget.h>
+#include <tqspinbox.h>
+#include <tqfile.h>
#include <kmessagebox.h>
#include <kcharsets.h>
@@ -63,21 +63,21 @@
#include "syncAction.h"
#include "dbSelectionDialog.h"
-/* virtual */ QString ConfigPage::maybeSaveText() const
+/* virtual */ TQString ConfigPage::maybeSaveText() const
{
return i18n("<qt>The settings for configuration page <i>%1</i> have been changed. Do you "
"want to save the changes before continuing?</qt>").arg(this->conduitName());
}
-DeviceConfigPage::DeviceConfigPage(QWidget * w, const char *n ) : ConfigPage( w, n )
+DeviceConfigPage::DeviceConfigPage(TQWidget * w, const char *n ) : ConfigPage( w, n )
{
FUNCTIONSETUP;
fConfigWidget = new DeviceConfigWidget( w );
// Fill the encodings list
{
- QStringList l = KGlobal::charsets()->descriptiveEncodingNames();
- for ( QStringList::Iterator it = l.begin(); it != l.end(); ++it )
+ TQStringList l = KGlobal::charsets()->descriptiveEncodingNames();
+ for ( TQStringList::Iterator it = l.begin(); it != l.end(); ++it )
{
fConfigWidget->fPilotEncoding->insertItem(*it);
}
@@ -91,12 +91,12 @@ DeviceConfigPage::DeviceConfigPage(QWidget * w, const char *n ) : ConfigPage( w,
#endif
-#define CM(a,b) connect(fConfigWidget->a,b,this,SLOT(modified()));
- CM(fPilotDevice, SIGNAL(textChanged(const QString &)));
- CM(fPilotSpeed, SIGNAL(activated(int)));
- CM(fPilotEncoding, SIGNAL(textChanged(const QString &)));
- CM(fUserName, SIGNAL(textChanged(const QString &)));
- CM(fWorkaround, SIGNAL(activated(int)));
+#define CM(a,b) connect(fConfigWidget->a,b,this,TQT_SLOT(modified()));
+ CM(fPilotDevice, TQT_SIGNAL(textChanged(const TQString &)));
+ CM(fPilotSpeed, TQT_SIGNAL(activated(int)));
+ CM(fPilotEncoding, TQT_SIGNAL(textChanged(const TQString &)));
+ CM(fUserName, TQT_SIGNAL(textChanged(const TQString &)));
+ CM(fWorkaround, TQT_SIGNAL(activated(int)));
#undef CM
fConduitName = i18n("Device");
@@ -136,7 +136,7 @@ void DeviceConfigPage::load()
int r = KMessageBox::Yes;
#if PILOT_LINK_NUMBER < PILOT_LINK_0_10_0
- QString d = fConfigWidget->fPilotDevice->text();
+ TQString d = fConfigWidget->fPilotDevice->text();
if (d.length() > 13)
{
@@ -202,7 +202,7 @@ void DeviceConfigPage::load()
void DeviceConfigPage::getEncoding()
{
FUNCTIONSETUP;
- QString e = KPilotSettings::encoding();
+ TQString e = KPilotSettings::encoding();
if (e.isEmpty())
fConfigWidget->fPilotEncoding->setCurrentText(CSL1("ISO8859-15"));
else
@@ -213,7 +213,7 @@ void DeviceConfigPage::setEncoding()
{
FUNCTIONSETUP;
- QString enc = fConfigWidget->fPilotEncoding->currentText();
+ TQString enc = fConfigWidget->fPilotEncoding->currentText();
if (enc.isEmpty())
{
WARNINGKPILOT << "Empty encoding. Will ignore it." << endl;
@@ -224,7 +224,7 @@ void DeviceConfigPage::setEncoding()
}
}
-SyncConfigPage::SyncConfigPage(QWidget * w, const char *n ) : ConfigPage( w, n )
+SyncConfigPage::SyncConfigPage(TQWidget * w, const char *n ) : ConfigPage( w, n )
{
FUNCTIONSETUP;
@@ -232,11 +232,11 @@ SyncConfigPage::SyncConfigPage(QWidget * w, const char *n ) : ConfigPage( w, n )
fConfigWidget->resize(fConfigWidget->size());
fWidget = fConfigWidget;
-#define CM(a,b) connect(fConfigWidget->a,b,this,SLOT(modified()));
- CM(fSpecialSync, SIGNAL(activated(int)));
- CM(fFullSyncCheck, SIGNAL(toggled(bool)));
- CM(fScreenlockSecure, SIGNAL(toggled(bool)));
- CM(fConflictResolution, SIGNAL(activated(int)));
+#define CM(a,b) connect(fConfigWidget->a,b,this,TQT_SLOT(modified()));
+ CM(fSpecialSync, TQT_SIGNAL(activated(int)));
+ CM(fFullSyncCheck, TQT_SIGNAL(toggled(bool)));
+ CM(fScreenlockSecure, TQT_SIGNAL(toggled(bool)));
+ CM(fConflictResolution, TQT_SIGNAL(activated(int)));
#undef CM
fConduitName = i18n("HotSync");
@@ -306,7 +306,7 @@ void SyncConfigPage::load()
}
-BackupConfigPage::BackupConfigPage(QWidget * w, const char *n ) : ConfigPage( w, n )
+BackupConfigPage::BackupConfigPage(TQWidget * w, const char *n ) : ConfigPage( w, n )
{
FUNCTIONSETUP;
@@ -314,15 +314,15 @@ BackupConfigPage::BackupConfigPage(QWidget * w, const char *n ) : ConfigPage( w,
fConfigWidget->resize(fConfigWidget->size());
fWidget = fConfigWidget;
- connect(fConfigWidget->fBackupOnlyChooser, SIGNAL( clicked() ),
- SLOT( slotSelectNoBackupDBs() ) );
- connect(fConfigWidget->fSkipDBChooser, SIGNAL(clicked()),
- SLOT(slotSelectNoRestoreDBs()));
+ connect(fConfigWidget->fBackupOnlyChooser, TQT_SIGNAL( clicked() ),
+ TQT_SLOT( slotSelectNoBackupDBs() ) );
+ connect(fConfigWidget->fSkipDBChooser, TQT_SIGNAL(clicked()),
+ TQT_SLOT(slotSelectNoRestoreDBs()));
-#define CM(a,b) connect(fConfigWidget->a,b,this,SLOT(modified()));
- CM(fBackupOnly, SIGNAL(textChanged(const QString &)));
- CM(fSkipDB, SIGNAL(textChanged(const QString &)));
- CM(fBackupFrequency, SIGNAL(activated(int)));
+#define CM(a,b) connect(fConfigWidget->a,b,this,TQT_SLOT(modified()));
+ CM(fBackupOnly, TQT_SIGNAL(textChanged(const TQString &)));
+ CM(fSkipDB, TQT_SIGNAL(textChanged(const TQString &)));
+ CM(fBackupFrequency, TQT_SIGNAL(activated(int)));
#undef CM
fConduitName = i18n("Backup");
@@ -351,9 +351,9 @@ void BackupConfigPage::load()
/* Backup tab */
KPilotSettings::setSkipBackupDB(
- QStringList::split(CSL1(","),fConfigWidget->fBackupOnly->text()));
+ TQStringList::split(CSL1(","),fConfigWidget->fBackupOnly->text()));
KPilotSettings::setSkipRestoreDB(
- QStringList::split(CSL1(","),fConfigWidget->fSkipDB->text()));
+ TQStringList::split(CSL1(","),fConfigWidget->fSkipDB->text()));
KPilotSettings::setRunConduitsWithBackup(fConfigWidget->fRunConduitsWithBackup->isChecked());
KPilotSettings::setBackupFrequency(fConfigWidget->fBackupFrequency->currentItem());
@@ -366,12 +366,12 @@ void BackupConfigPage::slotSelectNoBackupDBs()
{
FUNCTIONSETUP;
- QStringList selectedDBs(QStringList::split(',', fConfigWidget->fBackupOnly->text() ));
+ TQStringList selectedDBs(TQStringList::split(',', fConfigWidget->fBackupOnly->text() ));
- QStringList deviceDBs=KPilotSettings::deviceDBs();
- QStringList addedDBs=KPilotSettings::addedDBs();
+ TQStringList deviceDBs=KPilotSettings::deviceDBs();
+ TQStringList addedDBs=KPilotSettings::addedDBs();
KPilotDBSelectionDialog*dlg=new KPilotDBSelectionDialog(selectedDBs, deviceDBs, addedDBs, 0, "NoBackupDBs");
- if (dlg && (dlg->exec()==QDialog::Accepted) )
+ if (dlg && (dlg->exec()==TQDialog::Accepted) )
{
fConfigWidget->fBackupOnly->setText(
dlg->getSelectedDBs().join(CSL1(",")));
@@ -384,12 +384,12 @@ void BackupConfigPage::slotSelectNoRestoreDBs()
{
FUNCTIONSETUP;
- QStringList selectedDBs(QStringList::split(',', fConfigWidget->fSkipDB->text() ));
+ TQStringList selectedDBs(TQStringList::split(',', fConfigWidget->fSkipDB->text() ));
- QStringList deviceDBs=KPilotSettings::deviceDBs();
- QStringList addedDBs=KPilotSettings::addedDBs();
+ TQStringList deviceDBs=KPilotSettings::deviceDBs();
+ TQStringList addedDBs=KPilotSettings::addedDBs();
KPilotDBSelectionDialog*dlg=new KPilotDBSelectionDialog(selectedDBs, deviceDBs, addedDBs, 0, "NoRestoreDBs");
- if (dlg && (dlg->exec()==QDialog::Accepted) )
+ if (dlg && (dlg->exec()==TQDialog::Accepted) )
{
fConfigWidget->fSkipDB->setText(
dlg->getSelectedDBs().join(CSL1(",")));
@@ -400,7 +400,7 @@ void BackupConfigPage::slotSelectNoRestoreDBs()
-ViewersConfigPage::ViewersConfigPage(QWidget * w, const char *n ) : ConfigPage( w, n )
+ViewersConfigPage::ViewersConfigPage(TQWidget * w, const char *n ) : ConfigPage( w, n )
{
FUNCTIONSETUP;
@@ -408,11 +408,11 @@ ViewersConfigPage::ViewersConfigPage(QWidget * w, const char *n ) : ConfigPage(
fConfigWidget->resize(fConfigWidget->size());
fWidget = fConfigWidget;
-#define CM(a,b) connect(fConfigWidget->a,b,this,SLOT(modified()));
- CM(fInternalEditors, SIGNAL(toggled(bool)));
- CM(fUseSecret, SIGNAL(toggled(bool)));
- CM(fAddressGroup, SIGNAL(clicked(int)));
- CM(fUseKeyField, SIGNAL(toggled(bool)));
+#define CM(a,b) connect(fConfigWidget->a,b,this,TQT_SLOT(modified()));
+ CM(fInternalEditors, TQT_SIGNAL(toggled(bool)));
+ CM(fUseSecret, TQT_SIGNAL(toggled(bool)));
+ CM(fAddressGroup, TQT_SIGNAL(clicked(int)));
+ CM(fUseKeyField, TQT_SIGNAL(toggled(bool)));
#undef CM
fConduitName = i18n("Viewers");
@@ -452,7 +452,7 @@ void ViewersConfigPage::load()
-StartExitConfigPage::StartExitConfigPage(QWidget * w, const char *n ) : ConfigPage( w, n )
+StartExitConfigPage::StartExitConfigPage(TQWidget * w, const char *n ) : ConfigPage( w, n )
{
FUNCTIONSETUP;
@@ -460,11 +460,11 @@ StartExitConfigPage::StartExitConfigPage(QWidget * w, const char *n ) : ConfigPa
fConfigWidget->resize(fConfigWidget->size());
fWidget = fConfigWidget;
-#define CM(a,b) connect(fConfigWidget->a,b,this,SLOT(modified()));
- CM(fStartDaemonAtLogin, SIGNAL(toggled(bool)));
- CM(fKillDaemonOnExit, SIGNAL(toggled(bool)));
- CM(fDockDaemon, SIGNAL(toggled(bool)));
- CM(fQuitAfterSync, SIGNAL(toggled(bool)));
+#define CM(a,b) connect(fConfigWidget->a,b,this,TQT_SLOT(modified()));
+ CM(fStartDaemonAtLogin, TQT_SIGNAL(toggled(bool)));
+ CM(fKillDaemonOnExit, TQT_SIGNAL(toggled(bool)));
+ CM(fDockDaemon, TQT_SIGNAL(toggled(bool)));
+ CM(fQuitAfterSync, TQT_SIGNAL(toggled(bool)));
#undef CM
fConduitName = i18n("Startup and Exit");
@@ -487,10 +487,10 @@ void StartExitConfigPage::load()
{
FUNCTIONSETUP;
- QString autostart = KGlobalSettings::autostartPath();
- QString desktopfile = CSL1("kpilotdaemon.desktop");
- QString desktopcategory = CSL1("kde/");
- QString location = KGlobal::dirs()->findResource("xdgdata-apps",desktopcategory + desktopfile);
+ TQString autostart = KGlobalSettings::autostartPath();
+ TQString desktopfile = CSL1("kpilotdaemon.desktop");
+ TQString desktopcategory = CSL1("kde/");
+ TQString location = KGlobal::dirs()->findResource("xdgdata-apps",desktopcategory + desktopfile);
if (location.isEmpty()) // Fallback to KDE 3.0?
{
location = KGlobal::dirs()->findResource("apps",desktopfile);
@@ -516,7 +516,7 @@ void StartExitConfigPage::load()
}
else
{
- QFile::remove(autostart+desktopfile);
+ TQFile::remove(autostart+desktopfile);
}
KPilotSettings::setDockDaemon(fConfigWidget->fDockDaemon->isChecked());
KPilotSettings::setKillDaemonAtExit(fConfigWidget->fKillDaemonOnExit->isChecked());
diff --git a/kpilot/kpilot/kpilotConfigDialog.h b/kpilot/kpilot/kpilotConfigDialog.h
index 50a182dfa..11960f8df 100644
--- a/kpilot/kpilot/kpilotConfigDialog.h
+++ b/kpilot/kpilot/kpilotConfigDialog.h
@@ -44,17 +44,17 @@ class BackupConfigWidget;
class ConfigPage : public ConduitConfigBase
{
public:
- ConfigPage( QWidget *w, const char *n ) : ConduitConfigBase(w,n) { } ;
+ ConfigPage( TQWidget *w, const char *n ) : ConduitConfigBase(w,n) { } ;
protected:
// Override base class virtual function.
- virtual QString maybeSaveText() const;
+ virtual TQString maybeSaveText() const;
} ;
class DeviceConfigPage : public ConfigPage
{
Q_OBJECT
public:
- DeviceConfigPage( QWidget *, const char * );
+ DeviceConfigPage( TQWidget *, const char * );
protected:
virtual bool validate();
@@ -77,7 +77,7 @@ private:
class KDE_EXPORT SyncConfigPage : public ConfigPage
{
public:
- SyncConfigPage( QWidget *, const char * );
+ SyncConfigPage( TQWidget *, const char * );
protected:
virtual void load();
@@ -91,7 +91,7 @@ class BackupConfigPage : public ConfigPage
{
Q_OBJECT
public:
- BackupConfigPage( QWidget *, const char * );
+ BackupConfigPage( TQWidget *, const char * );
protected:
virtual void load();
@@ -108,7 +108,7 @@ private:
class StartExitConfigPage : public ConfigPage
{
public:
- StartExitConfigPage( QWidget *, const char * );
+ StartExitConfigPage( TQWidget *, const char * );
protected:
virtual void load();
@@ -121,7 +121,7 @@ private:
class ViewersConfigPage : public ConfigPage
{
public:
- ViewersConfigPage( QWidget *, const char * );
+ ViewersConfigPage( TQWidget *, const char * );
protected:
virtual void load();
diff --git a/kpilot/kpilot/kpilotConfigWizard.cc b/kpilot/kpilot/kpilotConfigWizard.cc
index d21ec5d81..9df81b412 100644
--- a/kpilot/kpilot/kpilotConfigWizard.cc
+++ b/kpilot/kpilot/kpilotConfigWizard.cc
@@ -28,10 +28,10 @@
//#include "options.h"
-#include <qpushbutton.h>
-#include <qbuttongroup.h>
-#include <qcheckbox.h>
-#include <qlineedit.h>
+#include <tqpushbutton.h>
+#include <tqbuttongroup.h>
+#include <tqcheckbox.h>
+#include <tqlineedit.h>
#include <kmessagebox.h>
#include <kglobal.h>
@@ -52,7 +52,7 @@
#include "kpilotProbeDialog.h"
-ConfigWizard::ConfigWizard(QWidget *parent, const char *n, int m) :
+ConfigWizard::ConfigWizard(TQWidget *parent, const char *n, int m) :
KWizard(parent, n),
fMode((Mode)m)
{
@@ -67,8 +67,8 @@ ConfigWizard::ConfigWizard(QWidget *parent, const char *n, int m) :
setHelpEnabled( page2, false );
setHelpEnabled( page3, false );
- connect( page2->fProbeButton, SIGNAL( pressed() ),
- this, SLOT( probeHandheld() ) );
+ connect( page2->fProbeButton, TQT_SIGNAL( pressed() ),
+ this, TQT_SLOT( probeHandheld() ) );
KPilotSettings::self()->readConfig();
page2->fUserName->setText( KPilotSettings::userName() );
@@ -84,8 +84,8 @@ ConfigWizard::~ConfigWizard()
void ConfigWizard::accept()
{
FUNCTIONSETUP;
- QString username( page2->fUserName->text() );
- QString devicename( page2->fDeviceName->text() );
+ TQString username( page2->fUserName->text() );
+ TQString devicename( page2->fDeviceName->text() );
// int devicetype( page1->fConnectionType->selectedId() );
enum eSyncApp {
eAppKDE=0,
@@ -121,10 +121,10 @@ void ConfigWizard::accept()
todoConfig->readConfig();
calendarConfig->readConfig();
- QStringList conduits = KPilotSettings::installedConduits();
+ TQStringList conduits = KPilotSettings::installedConduits();
int version(0);
#define APPEND_CONDUIT(a) if (!conduits.contains(a)) conduits.append(a)
- QString applicationName(i18n("general KDE-PIM"));
+ TQString applicationName(i18n("general KDE-PIM"));
APPEND_CONDUIT("internal_fileinstall");
APPEND_CONDUIT("todo-conduit");
APPEND_CONDUIT("vcal-conduit");
@@ -197,7 +197,7 @@ void ConfigWizard::accept()
KPilotSettings::setInstalledConduits( conduits );
#undef APPEND_CONDUIT
- QString finishMessage = i18n("KPilot is now configured to sync with %1.").arg(applicationName);
+ TQString finishMessage = i18n("KPilot is now configured to sync with %1.").arg(applicationName);
if (fMode == InDialog)
{
finishMessage.append(CSL1("\n"));
@@ -209,7 +209,7 @@ void ConfigWizard::accept()
KMessageBox::information(this, finishMessage,
i18n("Automatic Configuration Finished"));
KPilotSettings::self()->writeConfig();
- QDialog::accept();
+ TQDialog::accept();
}
void ConfigWizard::probeHandheld()
diff --git a/kpilot/kpilot/kpilotConfigWizard.h b/kpilot/kpilot/kpilotConfigWizard.h
index 3a448c4fa..742df3925 100644
--- a/kpilot/kpilot/kpilotConfigWizard.h
+++ b/kpilot/kpilot/kpilotConfigWizard.h
@@ -40,7 +40,7 @@ Q_OBJECT
public:
enum Mode { InDialog=0, Standalone=1 } ;
- ConfigWizard(QWidget *p=0L,const char *n=0L, int mode=(int)InDialog);
+ ConfigWizard(TQWidget *p=0L,const char *n=0L, int mode=(int)InDialog);
~ConfigWizard();
protected slots:
@@ -52,7 +52,7 @@ protected:
ConfigWizard_base3 *page3;
Mode fMode;
- QStringList mDBs;
+ TQStringList mDBs;
} ;
#endif
diff --git a/kpilot/kpilot/kpilotProbeDialog.cc b/kpilot/kpilot/kpilotProbeDialog.cc
index f7e04268b..fd7fcb3cd 100644
--- a/kpilot/kpilot/kpilotProbeDialog.cc
+++ b/kpilot/kpilot/kpilotProbeDialog.cc
@@ -28,14 +28,14 @@
#include "options.h"
-#include <qlayout.h>
-#include <qgroupbox.h>
-#include <qlabel.h>
-#include <qvbox.h>
-#include <qtimer.h>
-#include <qptrlist.h>
-#include <qmap.h>
-#include <qvaluelist.h>
+#include <tqlayout.h>
+#include <tqgroupbox.h>
+#include <tqlabel.h>
+#include <tqvbox.h>
+#include <tqtimer.h>
+#include <tqptrlist.h>
+#include <tqmap.h>
+#include <tqvaluelist.h>
#include <kmessagebox.h>
#include <kglobal.h>
@@ -86,23 +86,23 @@ and the module can't be unloaded.
*/
-ProbeDialog::ProbeDialog(QWidget *parent, const char *n) :
+ProbeDialog::ProbeDialog(TQWidget *parent, const char *n) :
KDialogBase(parent, n, true, i18n("Autodetecting Your Handheld"), KDialogBase::Ok|KDialogBase::Cancel|KDialogBase::User1, KDialogBase::Cancel, true, i18n("Restart Detection")),
mDetected(false), mUserName(), mDevice()
{
FUNCTIONSETUP;
- QVBox *mainWidget = makeVBoxMainWidget();
+ TQVBox *mainWidget = makeVBoxMainWidget();
- fInfoText = new QLabel( i18n( "KPilot is now trying to automatically detect the device of your handheld. Please press the hotsync button if you have not done so already." ), mainWidget, "fInfoText" );
- fInfoText->setAlignment( QLabel::WordBreak );
+ fInfoText = new TQLabel( i18n( "KPilot is now trying to automatically detect the device of your handheld. Please press the hotsync button if you have not done so already." ), mainWidget, "fInfoText" );
+ fInfoText->setAlignment( TQLabel::WordBreak );
- fStatusGroup = new QGroupBox( i18n("Status"), mainWidget, "fStatusGroup" );
+ fStatusGroup = new TQGroupBox( i18n("Status"), mainWidget, "fStatusGroup" );
fStatusGroup->setColumnLayout(0, Qt::Vertical );
- fStatusGroupLayout = new QGridLayout( fStatusGroup->layout() );
+ fStatusGroupLayout = new TQGridLayout( fStatusGroup->layout() );
- fStatus = new QLabel( i18n("Autodetection not yet started..."), fStatusGroup, "fStatus" );
- fStatus->setAlignment( QLabel::WordBreak );
+ fStatus = new TQLabel( i18n("Autodetection not yet started..."), fStatusGroup, "fStatus" );
+ fStatus->setAlignment( TQLabel::WordBreak );
fStatusGroupLayout->addWidget( fStatus, 0, 0 );
fProgress = new KProgress( 100, fStatusGroup, "fProgress" );
@@ -110,27 +110,27 @@ ProbeDialog::ProbeDialog(QWidget *parent, const char *n) :
- fResultsGroup = new QGroupBox( i18n( "Detected Values" ), mainWidget, "fResultsGroup" );
+ fResultsGroup = new TQGroupBox( i18n( "Detected Values" ), mainWidget, "fResultsGroup" );
fResultsGroup->setEnabled( FALSE );
fResultsGroup->setColumnLayout(0, Qt::Vertical );
- fResultsGroupLayout = new QGridLayout( fResultsGroup->layout() );
+ fResultsGroupLayout = new TQGridLayout( fResultsGroup->layout() );
fResultsGroupLayout->setAlignment( Qt::AlignTop );
- fUserLabel = new QLabel( i18n( "Handheld user:" ), fResultsGroup, "fUserLabel" );
- fUserLabel->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)4, (QSizePolicy::SizeType)5, 0, 0, fUserLabel->sizePolicy().hasHeightForWidth() ) );
+ fUserLabel = new TQLabel( i18n( "Handheld user:" ), fResultsGroup, "fUserLabel" );
+ fUserLabel->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)4, (TQSizePolicy::SizeType)5, 0, 0, fUserLabel->sizePolicy().hasHeightForWidth() ) );
fResultsGroupLayout->addWidget( fUserLabel, 0, 0 );
- fDeviceLabel = new QLabel( i18n( "Device:" ), fResultsGroup, "fDeviceLabel" );
+ fDeviceLabel = new TQLabel( i18n( "Device:" ), fResultsGroup, "fDeviceLabel" );
fResultsGroupLayout->addWidget( fDeviceLabel, 1, 0 );
- fUser = new QLabel( i18n("[Not yet known]"), fResultsGroup, "fUser" );
+ fUser = new TQLabel( i18n("[Not yet known]"), fResultsGroup, "fUser" );
fResultsGroupLayout->addWidget( fUser, 0, 1 );
- fDevice = new QLabel( i18n("[Not yet known]"), fResultsGroup, "fDevice" );
+ fDevice = new TQLabel( i18n("[Not yet known]"), fResultsGroup, "fDevice" );
fResultsGroupLayout->addWidget( fDevice, 1, 1 );
- resize( QSize(459, 298).expandedTo(minimumSizeHint()) );
+ resize( TQSize(459, 298).expandedTo(minimumSizeHint()) );
clearWState( WState_Polished );
enableButtonOK(false);
@@ -150,15 +150,15 @@ ProbeDialog::ProbeDialog(QWidget *parent, const char *n) :
<<"/dev/cuad1"<<"/dev/cuad3"
<<"/dev/ucom1"<<"/dev/ucom3";
- fProcessEventsTimer = new QTimer( this );
- fTimeoutTimer = new QTimer( this );
- fProgressTimer = new QTimer( this );
- fRotateLinksTimer = new QTimer( this );
- connect( fProcessEventsTimer, SIGNAL(timeout()), this, SLOT(processEvents()) );
- connect( fTimeoutTimer, SIGNAL(timeout()), this, SLOT(timeout()) );
- connect( fProgressTimer, SIGNAL(timeout()), this, SLOT( progress()) );
- connect( fRotateLinksTimer, SIGNAL(timeout()), this, SLOT( detect()) );
- connect( this, SIGNAL(finished()), this, SLOT(disconnectDevices()) );
+ fProcessEventsTimer = new TQTimer( this );
+ fTimeoutTimer = new TQTimer( this );
+ fProgressTimer = new TQTimer( this );
+ fRotateLinksTimer = new TQTimer( this );
+ connect( fProcessEventsTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(processEvents()) );
+ connect( fTimeoutTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(timeout()) );
+ connect( fProgressTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT( progress()) );
+ connect( fRotateLinksTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT( detect()) );
+ connect( this, TQT_SIGNAL(finished()), this, TQT_SLOT(disconnectDevices()) );
}
ProbeDialog::~ProbeDialog()
@@ -180,9 +180,9 @@ void ProbeDialog::progress()
int ProbeDialog::exec()
{
mDetected = false;
- mUserName = QString();
- mDevice = QString();
- QTimer::singleShot( 0, this, SLOT( startDetection() ) );
+ mUserName = TQString();
+ mDevice = TQString();
+ TQTimer::singleShot( 0, this, TQT_SLOT( startDetection() ) );
return KDialogBase::exec();
}
@@ -193,7 +193,7 @@ void ProbeDialog::startDetection()
disconnectDevices();
fProgress->setProgress(0);
fStatus->setText( i18n("Starting detection...") );
- QTimer::singleShot(0, this, SLOT(processEvents()) );
+ TQTimer::singleShot(0, this, TQT_SLOT(processEvents()) );
processEvents();
PilotDaemonDCOP_stub *daemonStub = new PilotDaemonDCOP_stub("kpilotDaemon", "KPilotDaemonIface");
if (daemonStub) {
@@ -217,8 +217,8 @@ void ProbeDialog::startDetection()
KPilotDeviceLink*link;
for (int i=0; i<3; i++)
{
- QStringList::iterator end(mDevicesToProbe[i].end());
- for (QStringList::iterator it=mDevicesToProbe[i].begin(); it!=end; ++it)
+ TQStringList::iterator end(mDevicesToProbe[i].end());
+ for (TQStringList::iterator it=mDevicesToProbe[i].begin(); it!=end; ++it)
{
link = new KPilotDeviceLink();
link->setDevice((*it));
@@ -226,7 +226,7 @@ void ProbeDialog::startDetection()
DEBUGKPILOT<<"new kpilotDeviceLink for "<<(*it)<<endl;
#endif
mDeviceLinks[i].append( link );
- connect( link, SIGNAL(deviceReady(KPilotDeviceLink*)), this, SLOT(connection(KPilotDeviceLink*)) );
+ connect( link, TQT_SIGNAL(deviceReady(KPilotDeviceLink*)), this, TQT_SLOT(connection(KPilotDeviceLink*)) );
processEvents();
}
}
@@ -293,7 +293,7 @@ void ProbeDialog::connection( KPilotDeviceLink*lnk)
fResultsGroup->setEnabled( true );
enableButtonOK(true);
- QTimer::singleShot(0, this, SLOT(retrieveDBList()));
+ TQTimer::singleShot(0, this, TQT_SLOT(retrieveDBList()));
}
void ProbeDialog::retrieveDBList()
@@ -309,14 +309,14 @@ void ProbeDialog::retrieveDBList()
set_long( &buff[1], (*i).creator );
buff[5] = ']';
buff[6] = '\0';
- QString cr( buff );
+ TQString cr( buff );
mDBs << cr;
- mDBs << QString( (*i).name );
+ mDBs << TQString( (*i).name );
}
mDBs.sort();
- QString old( QString::null );
- QStringList::Iterator itr = mDBs.begin();
+ TQString old( TQString::null );
+ TQStringList::Iterator itr = mDBs.begin();
while ( itr != mDBs.end() ) {
if ( old == *itr ) {
itr = mDBs.remove( itr );
@@ -329,7 +329,7 @@ void ProbeDialog::retrieveDBList()
// End sync gracefully, but don't change settings on the handheld.
mActiveLink->endSync( KPilotLink::NoUpdate );
- QTimer::singleShot(0, this, SLOT(disconnectDevices()));
+ TQTimer::singleShot(0, this, TQT_SLOT(disconnectDevices()));
}
void ProbeDialog::disconnectDevices()
{
diff --git a/kpilot/kpilot/kpilotProbeDialog.h b/kpilot/kpilot/kpilotProbeDialog.h
index be02dff6e..ccfa7fee3 100644
--- a/kpilot/kpilot/kpilotProbeDialog.h
+++ b/kpilot/kpilot/kpilotProbeDialog.h
@@ -39,21 +39,21 @@ class QGridLayout;
template <class T> class QValueList;
template<class Key, class T> class QMap;
-typedef QValueList<KPilotDeviceLink*> PilotLinkList;
+typedef TQValueList<KPilotDeviceLink*> PilotLinkList;
-typedef QMap<QString, KPilotDeviceLink*> PilotLinkMap;
+typedef TQMap<TQString, KPilotDeviceLink*> PilotLinkMap;
class ProbeDialog : public KDialogBase
{
Q_OBJECT
public:
- ProbeDialog(QWidget *p=0L,const char *n=0L);
+ ProbeDialog(TQWidget *p=0L,const char *n=0L);
~ProbeDialog();
bool detected() const { return mDetected; }
- QString userName() const { return mUserName; }
- QString device() const { return mDevice; }
- QStringList dbs() const { return mDBs; }
+ TQString userName() const { return mUserName; }
+ TQString device() const { return mDevice; }
+ TQStringList dbs() const { return mDBs; }
protected slots:
@@ -70,33 +70,33 @@ public slots:
int exec();
void slotUser1 () { startDetection(); }
protected:
- QLabel* fInfoText;
- QGroupBox* fResultsGroup;
- QLabel* fUserLabel;
- QLabel* fDeviceLabel;
- QLabel* fUser;
- QLabel* fDevice;
- QGroupBox* fStatusGroup;
- QLabel* fStatus;
+ TQLabel* fInfoText;
+ TQGroupBox* fResultsGroup;
+ TQLabel* fUserLabel;
+ TQLabel* fDeviceLabel;
+ TQLabel* fUser;
+ TQLabel* fDevice;
+ TQGroupBox* fStatusGroup;
+ TQLabel* fStatus;
KProgress* fProgress;
- QTimer* fProcessEventsTimer;
- QTimer* fTimeoutTimer;
- QTimer* fProgressTimer;
- QTimer* fRotateLinksTimer;
+ TQTimer* fProcessEventsTimer;
+ TQTimer* fTimeoutTimer;
+ TQTimer* fProgressTimer;
+ TQTimer* fRotateLinksTimer;
protected:
- QGridLayout* fResultsGroupLayout;
- QGridLayout* fStatusGroupLayout;
+ TQGridLayout* fResultsGroupLayout;
+ TQGridLayout* fStatusGroupLayout;
- QStringList mDevicesToProbe[3];
+ TQStringList mDevicesToProbe[3];
PilotLinkList mDeviceLinks[3];
int mProbeDevicesIndex;
KPilotDeviceLink *mActiveLink;
bool mDetected;
- QString mUserName;
- QString mDevice;
- QStringList mDBs;
+ TQString mUserName;
+ TQString mDevice;
+ TQStringList mDBs;
} ;
#endif
diff --git a/kpilot/kpilot/kroupware.cc b/kpilot/kpilot/kroupware.cc
index fc57b4b5c..212df17d1 100644
--- a/kpilot/kpilot/kroupware.cc
+++ b/kpilot/kpilot/kroupware.cc
@@ -30,7 +30,7 @@
#include "options.h"
-#include <qfile.h>
+#include <tqfile.h>
#include <dcopclient.h>
#include <ktempfile.h>
@@ -71,7 +71,7 @@ void KroupwareSync::cleanupConfig()
KConfig* c = KPilotSettings::self()->config();
c->setGroup("todoOptions");
if ( c->hasKey( "CalFileBackup") ) {
- QString fn = c->readPathEntry( "CalFileBackup" );
+ TQString fn = c->readPathEntry( "CalFileBackup" );
if ( fn != CSL1("empty") ) {
c->writePathEntry( "CalFile" ,fn );
c->writeEntry( "CalFileBackup" , "empty" );
@@ -79,7 +79,7 @@ void KroupwareSync::cleanupConfig()
}
c->setGroup("vcalOptions");
if ( c->hasKey( "CalFileBackup") ) {
- QString fn = c->readPathEntry( "CalFileBackup" );
+ TQString fn = c->readPathEntry( "CalFileBackup" );
if ( fn != CSL1("empty") ) {
c->writePathEntry( "CalFile" ,fn );
c->writeEntry( "CalFileBackup" , "empty" );
@@ -103,14 +103,14 @@ void KroupwareSync::start_syncCal_TodosWithKMail( bool cal, bool todos )
KConfig*c = KPilotSettings::self()->config();
DCOPClient *client = kapp->dcopClient();
KTempFile tempfile;
- QString filename = tempfile.name();
- QByteArray data, reply_data;
- QCString reply_type;
- QDataStream arg(data, IO_WriteOnly);
+ TQString filename = tempfile.name();
+ TQByteArray data, reply_data;
+ TQCString reply_type;
+ TQDataStream arg(data, IO_WriteOnly);
arg << filename;
if (!client->call( "kmail" ,
"KOrganizerSyncIface",
- "pullSyncData(QString)",
+ "pullSyncData(TQString)",
data,
reply_type,
reply_data)) {
@@ -125,7 +125,7 @@ void KroupwareSync::start_syncCal_TodosWithKMail( bool cal, bool todos )
if ( todos ) {
logMessage( i18n("Syncing to-dos with KMail" ));
c->setGroup("todoOptions");
- QString fn = c->readPathEntry( "CalFile" );
+ TQString fn = c->readPathEntry( "CalFile" );
c->writePathEntry( "CalFileBackup" ,fn );
c->writePathEntry( "CalFile" ,filename );
}
@@ -134,7 +134,7 @@ void KroupwareSync::start_syncCal_TodosWithKMail( bool cal, bool todos )
if ( cal ) {
logMessage( i18n("Syncing calendar with KMail" ));
c->setGroup("vcalOptions");
- QString fn = c->readPathEntry( "CalFile" );
+ TQString fn = c->readPathEntry( "CalFile" );
c->writePathEntry( "CalFileBackup" ,fn );
c->writePathEntry( "CalFile" ,filename );
}
@@ -149,14 +149,14 @@ void KroupwareSync::start_syncAddWithKMail()
logMessage( CSL1("Syncing Addresses with KMail" ));
DCOPClient *client = kapp->dcopClient();
KTempFile tempfile;
- QString filename = tempfile.name();
- QByteArray data, reply_data;
- QCString reply_type;
- QDataStream arg(data, IO_WriteOnly);
+ TQString filename = tempfile.name();
+ TQByteArray data, reply_data;
+ TQCString reply_type;
+ TQDataStream arg(data, IO_WriteOnly);
arg << filename;
if (!client->call( "kmail" ,
"KMailIface",
- "requestAddresses(QString)",
+ "requestAddresses(TQString)",
data,
reply_type,
reply_data)) {
@@ -182,7 +182,7 @@ void KroupwareSync::end_syncCal_TodosWithKMail( bool cal, bool todos)
{
if ( !cal && ! todos )
return;
- QString filename;
+ TQString filename;
KConfig*c=KPilotSettings::self()->config();
if ( todos ) {
logMessage( i18n("Rewriting to-dos to KMail..." ));
@@ -195,7 +195,7 @@ void KroupwareSync::end_syncCal_TodosWithKMail( bool cal, bool todos)
logMessage( i18n("Rewriting Calendar to KMail" ));
c->setGroup("vcalOptions");
filename = c->readPathEntry( "CalFile" );
- QString tf = c->readPathEntry( "CalFileBackup" ) ;
+ TQString tf = c->readPathEntry( "CalFileBackup" ) ;
c->writePathEntry( "CalFile" , tf );
c->writeEntry( "CalFileBackup" ,"empty");
}
@@ -204,13 +204,13 @@ void KroupwareSync::end_syncCal_TodosWithKMail( bool cal, bool todos)
logMessage(CSL1("Try to call KMail via DCOP to finish sync..."));
// try DCOP connection to KMail
DCOPClient *client = kapp->dcopClient();
- QByteArray data, reply_data;
- QCString reply_type;
- QDataStream arg(data, IO_WriteOnly);
+ TQByteArray data, reply_data;
+ TQCString reply_type;
+ TQDataStream arg(data, IO_WriteOnly);
arg << filename;
if (!client->call( "kmail" /*"korganizer" kmdcop */,
"KOrganizerSyncIface",
- "pushSyncData(QString)",
+ "pushSyncData(TQString)",
data,
reply_type,
reply_data)) {
@@ -222,7 +222,7 @@ void KroupwareSync::end_syncCal_TodosWithKMail( bool cal, bool todos)
logMessage(CSL1("Calling over DCOP succeeded"));
logMessage(CSL1("Sync to KMail has finished successfully"));
}
- QFile::remove( filename );
+ TQFile::remove( filename );
}
}
void KroupwareSync::end_syncAddWithKMail()
@@ -232,17 +232,17 @@ void KroupwareSync::end_syncAddWithKMail()
// TODO!! better config handling (KConfig XT)
KConfig*c = KPilotSettings::self()->config();
c->setGroup("Abbrowser-conduit");
- QString filename = c->readPathEntry( "KMailTempFile" );
+ TQString filename = c->readPathEntry( "KMailTempFile" );
c->writeEntry( "KMailTempFile" , "empty" );
KPilotSettings::writeConfig();
- QByteArray data, reply_data;
- QCString reply_type;
- QDataStream arg(data, IO_WriteOnly);
+ TQByteArray data, reply_data;
+ TQCString reply_type;
+ TQDataStream arg(data, IO_WriteOnly);
arg << filename;
- arg << QStringList();
+ arg << TQStringList();
if (!client->call( "kmail" ,
"KMailIface",
- "storeAddresses(QString, QStringList)",
+ "storeAddresses(TQString, TQStringList)",
data,
reply_type,
reply_data)) {
@@ -252,7 +252,7 @@ void KroupwareSync::end_syncAddWithKMail()
else {
logMessage(CSL1("Calling store addresses over DCOP succeeded"));
}
- //QFile::remove( filename );
+ //TQFile::remove( filename );
}
void KroupwareSync::end_syncNotesWithKMail()
{
@@ -262,16 +262,16 @@ void KroupwareSync::end_syncNotesWithKMail()
-/* static */ bool KroupwareSync::startKMail(QString *error)
+/* static */ bool KroupwareSync::startKMail(TQString *error)
{
FUNCTIONSETUP;
- QCString kmdcop;
- QString mess;
+ TQCString kmdcop;
+ TQString mess;
int pid;
return KApplication::startServiceByDesktopName(CSL1("kmail"),
- QString::null,
+ TQString::null,
error,
&kmdcop,
&pid
diff --git a/kpilot/kpilot/kroupware.h b/kpilot/kpilot/kroupware.h
index 8cce32eaf..f7be71802 100644
--- a/kpilot/kpilot/kroupware.h
+++ b/kpilot/kpilot/kroupware.h
@@ -80,7 +80,7 @@ private:
public:
/* Try to start KMail. Returns true on success. */
- static bool startKMail(QString *errormessage);
+ static bool startKMail(TQString *errormessage);
} ;
#endif
diff --git a/kpilot/kpilot/listCat.cc b/kpilot/kpilot/listCat.cc
index 281bfe001..6faa3efa1 100644
--- a/kpilot/kpilot/listCat.cc
+++ b/kpilot/kpilot/listCat.cc
@@ -30,13 +30,13 @@
#include "options.h"
-#include <qpainter.h>
+#include <tqpainter.h>
#include <klocale.h>
#include "listCat.moc"
-ListCategorizer::ListCategorizer(QWidget * parent,
+ListCategorizer::ListCategorizer(TQWidget * parent,
const char *name) :
KListView(parent, name),
fStartOpen(false)
@@ -45,9 +45,9 @@ ListCategorizer::ListCategorizer(QWidget * parent,
setupWidget();
}
-ListCategorizer::ListCategorizer(const QStringList & i,
+ListCategorizer::ListCategorizer(const TQStringList & i,
bool startOpen,
- QWidget * parent,
+ TQWidget * parent,
const char *name) :
KListView(parent, name),
fStartOpen(startOpen)
@@ -56,10 +56,10 @@ ListCategorizer::ListCategorizer(const QStringList & i,
addCategories(i);
}
-void ListCategorizer::addCategories(const QStringList & l)
+void ListCategorizer::addCategories(const TQStringList & l)
{
FUNCTIONSETUP;
- QStringList::ConstIterator i;
+ TQStringList::ConstIterator i;
for (i = l.begin(); i != l.end(); ++i)
{
@@ -67,11 +67,11 @@ void ListCategorizer::addCategories(const QStringList & l)
}
}
-QListViewItem *ListCategorizer::addCategory(const QString & name,
- const QString & desc)
+TQListViewItem *ListCategorizer::addCategory(const TQString & name,
+ const TQString & desc)
{
FUNCTIONSETUP;
- QListViewItem *m = new QListViewItem(this, name, desc);
+ TQListViewItem *m = new TQListViewItem(this, name, desc);
m->setSelectable(false);
m->setOpen(fStartOpen);
@@ -90,12 +90,12 @@ void ListCategorizer::setupWidget()
setRootIsDecorated(true);
}
-/* virtual */ bool ListCategorizer::acceptDrag(QDropEvent * event) const
+/* virtual */ bool ListCategorizer::acceptDrag(TQDropEvent * event) const
{
FUNCTIONSETUP;
if (!(event->source()))
return false;
- QListViewItem *p = itemAt(event->pos());
+ TQListViewItem *p = itemAt(event->pos());
if (!p)
return false;
@@ -103,7 +103,7 @@ void ListCategorizer::setupWidget()
return true;
}
-/* virtual */ void ListCategorizer::contentsDropEvent(QDropEvent * e)
+/* virtual */ void ListCategorizer::contentsDropEvent(TQDropEvent * e)
{
FUNCTIONSETUP;
cleanDropVisualizer();
@@ -112,8 +112,8 @@ void ListCategorizer::setupWidget()
return;
e->accept();
- QListViewItem *p = itemAt(e->pos());
- QListViewItem *selection = currentItem();
+ TQListViewItem *p = itemAt(e->pos());
+ TQListViewItem *selection = currentItem();
if (!p)
{
@@ -121,7 +121,7 @@ void ListCategorizer::setupWidget()
return;
}
- QListViewItem *category = p->parent();
+ TQListViewItem *category = p->parent();
if (!category)
{
@@ -134,7 +134,7 @@ void ListCategorizer::setupWidget()
/* virtual */ void ListCategorizer::startDrag()
{
FUNCTIONSETUP;
- QListViewItem *p = currentItem();
+ TQListViewItem *p = currentItem();
if (!p || !p->parent())
return;
@@ -142,10 +142,10 @@ void ListCategorizer::setupWidget()
KListView::startDrag();
}
-QStringList ListCategorizer::listSiblings(const QListViewItem * p, int column) const
+TQStringList ListCategorizer::listSiblings(const TQListViewItem * p, int column) const
{
FUNCTIONSETUP;
- QStringList l;
+ TQStringList l;
while (p)
{
@@ -156,10 +156,10 @@ QStringList ListCategorizer::listSiblings(const QListViewItem * p, int column) c
return l;
}
-QListViewItem *ListCategorizer::findCategory(const QString & category) const
+TQListViewItem *ListCategorizer::findCategory(const TQString & category) const
{
FUNCTIONSETUP;
- QListViewItem *p = firstChild();
+ TQListViewItem *p = firstChild();
while (p)
{
@@ -171,24 +171,24 @@ QListViewItem *ListCategorizer::findCategory(const QString & category) const
return 0L;
}
-QListViewItem *ListCategorizer::addItem(const QString & category,
- const QString & name, const QString & description)
+TQListViewItem *ListCategorizer::addItem(const TQString & category,
+ const TQString & name, const TQString & description)
{
FUNCTIONSETUP;
- QListViewItem *p = findCategory(category);
+ TQListViewItem *p = findCategory(category);
if (!p)
return 0L;
- return new QListViewItem(p, name, description);
+ return new TQListViewItem(p, name, description);
}
#define RVPAD (4)
-RichListViewItem::RichListViewItem(QListViewItem *p,
- QString l,
+RichListViewItem::RichListViewItem(TQListViewItem *p,
+ TQString l,
int c) :
- QListViewItem(p,l)
+ TQListViewItem(p,l)
{
FUNCTIONSETUP;
@@ -216,7 +216,7 @@ void RichListViewItem::computeHeight(int c)
if (!fIsRich[c]) return;
- QListView *v = listView();
+ TQListView *v = listView();
fRect[c] = v->fontMetrics().boundingRect(v->itemMargin()+RVPAD,0+RVPAD,
v->columnWidth(c)-v->itemMargin()-RVPAD,300,
@@ -229,7 +229,7 @@ void RichListViewItem::computeHeight(int c)
{
FUNCTIONSETUP;
- QListViewItem::setup();
+ TQListViewItem::setup();
int h = height();
@@ -243,8 +243,8 @@ void RichListViewItem::computeHeight(int c)
}
-/* virtual */ void RichListViewItem::paintCell(QPainter *p,
- const QColorGroup &gc,
+/* virtual */ void RichListViewItem::paintCell(TQPainter *p,
+ const TQColorGroup &gc,
int column,
int width,
int alignment)
@@ -253,11 +253,11 @@ void RichListViewItem::computeHeight(int c)
if ((!column) || (!fIsRich[column]))
{
- QListViewItem::paintCell(p,gc,column,width,alignment);
+ TQListViewItem::paintCell(p,gc,column,width,alignment);
return;
}
- QListView *v = listView();
+ TQListView *v = listView();
p->eraseRect(0,0,width,height());
p->setBackgroundColor(gc.background());
diff --git a/kpilot/kpilot/listCat.h b/kpilot/kpilot/listCat.h
index fd53413b7..e2063303f 100644
--- a/kpilot/kpilot/listCat.h
+++ b/kpilot/kpilot/listCat.h
@@ -51,8 +51,8 @@ class QStringList;
* ListCategorizer *lc = new ListCategorizer(this,colors);
* lc->setColumnText(0,i18n("Color"));
* lc->setColumnText(1,i18n("HTML"));
- * QListViewItem *stdKDE = lc->addCategory(i18n("Standard KDE"));
- * (void) new QListViewItem(stdKDE,i18n("red"),"#FF0000");
+ * TQListViewItem *stdKDE = lc->addCategory(i18n("Standard KDE"));
+ * (void) new TQListViewItem(stdKDE,i18n("red"),"#FF0000");
* @endcode
* to set sensible column headers for a list of colors
* and their HTML equivalents (although why you would want
@@ -73,7 +73,7 @@ public:
* startOpen set to false. The parameters
* @p parent and @p name are the usual Qt ones.
*/
- ListCategorizer(QWidget *parent,
+ ListCategorizer(TQWidget *parent,
const char *name = 0);
/**
* Constructor.
@@ -82,9 +82,9 @@ public:
* already inserted. In addition, this constructor lets you
* specify whether or not startOpen is set.
*/
- ListCategorizer(const QStringList& categories,
+ ListCategorizer(const TQStringList& categories,
bool startOpen,
- QWidget *parent,
+ TQWidget *parent,
const char *name = 0);
/**
@@ -92,7 +92,7 @@ public:
* All the categories are added without descriptions;
* use addCategory on a per-category basis for that.
*/
- void addCategories(const QStringList&);
+ void addCategories(const TQStringList&);
/**
* Add a category with name @p name and optional
* @p description. This can be useful if you want
@@ -100,15 +100,15 @@ public:
* refer to this category in the future without
* using findCategory().
*
- * @return the QListViewItem created for the category
+ * @return the TQListViewItem created for the category
*/
- QListViewItem *addCategory(const QString& name,
- const QString& description = QString::null);
+ TQListViewItem *addCategory(const TQString& name,
+ const TQString& description = TQString::null);
/**
* Returns the list of names of the categories in
* the ListCategorizer.
*/
- QStringList categories() const
+ TQStringList categories() const
{
return listSiblings(firstChild());
} ;
@@ -121,18 +121,18 @@ public:
* constructor. That way you can also hide more data in
* the remaining columns.
*/
- QListViewItem *addItem(const QString& category,
- const QString& name,
- const QString& description = QString::null);
+ TQListViewItem *addItem(const TQString& category,
+ const TQString& name,
+ const TQString& description = TQString::null);
/**
* Returns the list of strings in column @p column under
* category @p category. You can do this to get, for example
* the names of all the items categorized under a given
* category, or, more usefully, set @p column to something
* other that 0 (name) or 1 (description) to return the
- * QStringList hidden in the non-visible columns.
+ * TQStringList hidden in the non-visible columns.
*/
- QStringList items(const QString& category,int column=0) const
+ TQStringList items(const TQString& category,int column=0) const
{
return listSiblings(findCategory(category),column);
}
@@ -143,18 +143,18 @@ public:
* since just remembering the pointer addCategory gives
* you is faster and uses hardly any memory.
*/
- QListViewItem *findCategory(const QString& categoryName) const;
+ TQListViewItem *findCategory(const TQString& categoryName) const;
/**
* Return the list of strings in column @p column of all siblings
* of the given item @p p. If you remembered a pointer to a
* category, you can use
* @code
- * QStringList l = lc->listSiblings(stdKDE->firstChild(),2);
+ * TQStringList l = lc->listSiblings(stdKDE->firstChild(),2);
* @endcode
* to get the list of strings in hidden column 2 under
* the category you remembered.
*/
- QStringList listSiblings(const QListViewItem *p,int column=0) const;
+ TQStringList listSiblings(const TQListViewItem *p,int column=0) const;
/**
* @return whether new categories are inserted in an
@@ -174,7 +174,7 @@ protected:
/**
* Reimplemented to prevent categories from being dragged.
*/
- virtual bool acceptDrag (QDropEvent* event) const;
+ virtual bool acceptDrag (TQDropEvent* event) const;
/**
* Reimplemented to prevent categories from being dragged.
*/
@@ -182,7 +182,7 @@ protected:
/**
* Reimplemented to prevent categories from being dragged.
*/
- virtual void contentsDropEvent (QDropEvent*);
+ virtual void contentsDropEvent (TQDropEvent*);
@@ -200,13 +200,13 @@ private:
class RichListViewItem : public QListViewItem
{
public:
- RichListViewItem(QListViewItem *parent,
- QString,
+ RichListViewItem(TQListViewItem *parent,
+ TQString,
int);
virtual ~RichListViewItem();
- virtual void paintCell(QPainter *,
- const QColorGroup &,
+ virtual void paintCell(TQPainter *,
+ const TQColorGroup &,
int column,
int width,
int alignment);
@@ -221,7 +221,7 @@ protected:
protected:
bool *fIsRich;
- QRect *fRect;
+ TQRect *fRect;
int fColumns;
} ;
diff --git a/kpilot/kpilot/listItems.cc b/kpilot/kpilot/listItems.cc
index 1c8315b86..9984f0047 100644
--- a/kpilot/kpilot/listItems.cc
+++ b/kpilot/kpilot/listItems.cc
@@ -30,9 +30,9 @@
#include "options.h"
-#include <qstring.h>
-#include <qlistbox.h>
-#include <qlistview.h>
+#include <tqstring.h>
+#include <tqlistbox.h>
+#include <tqlistview.h>
#ifndef _KPILOT_LISTITEMS_H
@@ -52,9 +52,9 @@
}
#endif
-PilotListItem::PilotListItem(const QString & text,
+PilotListItem::PilotListItem(const TQString & text,
recordid_t pilotid, void *r) :
- QListBoxText(text),
+ TQListBoxText(text),
fid(pilotid),
fr(r)
{
@@ -94,8 +94,8 @@ PilotListItem::~PilotListItem()
}
#endif
-PilotCheckListItem::PilotCheckListItem(QListView * parent, const QString & text, recordid_t pilotid, void *r) :
- QCheckListItem(parent, text, QCheckListItem::CheckBox),
+PilotCheckListItem::PilotCheckListItem(TQListView * parent, const TQString & text, recordid_t pilotid, void *r) :
+ TQCheckListItem(parent, text, TQCheckListItem::CheckBox),
fid(pilotid),
fr(r)
{
@@ -122,7 +122,7 @@ PilotCheckListItem::~PilotCheckListItem()
void PilotCheckListItem::stateChange ( bool on)
{
// FUNCTIONSETUP;
- QCheckListItem::stateChange(on);
+ TQCheckListItem::stateChange(on);
}
@@ -142,11 +142,11 @@ void PilotCheckListItem::stateChange ( bool on)
}
#endif
-PilotListViewItem::PilotListViewItem( QListView * parent,
- QString label1, QString label2, QString label3, QString label4,
+PilotListViewItem::PilotListViewItem( TQListView * parent,
+ TQString label1, TQString label2, TQString label3, TQString label4,
recordid_t pilotid, void *r):
- QListViewItem(parent, label1, label2, label3, label4,
- QString::null, QString::null, QString::null, QString::null),
+ TQListViewItem(parent, label1, label2, label3, label4,
+ TQString::null, TQString::null, TQString::null, TQString::null),
fid(pilotid),
fr(r),
d(new PilotListViewItemData)
@@ -204,7 +204,7 @@ unsigned long PilotListViewItem::colValue(int col, bool *ok) const
return d->val;
}
-int PilotListViewItem::compare( QListViewItem *i, int col, bool ascending ) const
+int PilotListViewItem::compare( TQListViewItem *i, int col, bool ascending ) const
{
// FUNCTIONSETUP;
PilotListViewItem*item=dynamic_cast<PilotListViewItem*>(i);
@@ -237,6 +237,6 @@ int PilotListViewItem::compare( QListViewItem *i, int col, bool ascending ) cons
return res;
}
}
- return QListViewItem::compare(i, col, ascending);
+ return TQListViewItem::compare(i, col, ascending);
}
diff --git a/kpilot/kpilot/listItems.h b/kpilot/kpilot/listItems.h
index 914d4b006..4987219f8 100644
--- a/kpilot/kpilot/listItems.h
+++ b/kpilot/kpilot/listItems.h
@@ -3,7 +3,7 @@
** Copyright (C) 1998-2001 by Dan Pilone
** Copyright (C) 2003-2004 Reinhold Kainhofer <reinhold@kainhofer.com>
**
-** This file defines a subclasse of QListBoxText that carries
+** This file defines a subclasse of TQListBoxText that carries
** additional information useful for Pilot records. In particular it
** carries an int (for the pilot's uid?) and a void * (for pilotrecord?)
*/
@@ -32,13 +32,13 @@
#ifndef _KPILOT_LISTITEMS_H
#define _KPILOT_LISTITEMS_H
-#include <qlistview.h>
+#include <tqlistview.h>
#include <pi-dlp.h>
class PilotListItem : public QListBoxText
{
public:
- PilotListItem(const QString &text, recordid_t pilotid=0, void *r=0);
+ PilotListItem(const TQString &text, recordid_t pilotid=0, void *r=0);
virtual ~PilotListItem();
recordid_t id() const {return fid;};
const void *rec() const {return fr;};
@@ -59,7 +59,7 @@ private:
class PilotCheckListItem : public QCheckListItem
{
public:
- PilotCheckListItem( QListView * parent, const QString & text, recordid_t pilotid=0, void *r=0);
+ PilotCheckListItem( TQListView * parent, const TQString & text, recordid_t pilotid=0, void *r=0);
virtual ~PilotCheckListItem();
recordid_t id() const {return fid;};
const void *rec() const {return fr;};
@@ -85,18 +85,18 @@ struct PilotListViewItemData
class PilotListViewItem : public QListViewItem
{
public:
- PilotListViewItem( QListView * parent,
- QString label1, QString label2 = QString::null,
- QString label3 = QString::null, QString label4 = QString::null,
+ PilotListViewItem( TQListView * parent,
+ TQString label1, TQString label2 = TQString::null,
+ TQString label3 = TQString::null, TQString label4 = TQString::null,
recordid_t pilotid=0, void *r=0);
virtual ~PilotListViewItem();
recordid_t id() const {return fid;};
const void *rec() const {return fr;};
public:
void setNumericCol(int col, bool numeric);
- int compare( QListViewItem *i, int col, bool ascending ) const;
+ int compare( TQListViewItem *i, int col, bool ascending ) const;
protected:
- QValueList<int> numericCols;
+ TQValueList<int> numericCols;
recordid_t fid;
void *fr;
// Caching to make sorting faster:
diff --git a/kpilot/kpilot/logFile.cc b/kpilot/kpilot/logFile.cc
index b93b060ce..b7868bfda 100644
--- a/kpilot/kpilot/logFile.cc
+++ b/kpilot/kpilot/logFile.cc
@@ -30,9 +30,9 @@
#include "options.h"
-#include <qfile.h>
-#include <qtextstream.h>
-#include <qdatetime.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
+#include <tqdatetime.h>
#include <pi-version.h>
@@ -45,7 +45,7 @@
#include "logFile.moc"
-LogFile::LogFile() : DCOPObject("LogIface"), QObject(), fOutfile(0L), fSyncing(false)
+LogFile::LogFile() : DCOPObject("LogIface"), TQObject(), fOutfile(0L), fSyncing(false)
{
FUNCTIONSETUP;
}
@@ -57,7 +57,7 @@ LogFile::LogFile() : DCOPObject("LogIface"), QObject(), fOutfile(0L), fSyncing(f
// If a sync is already running (something went wrong then!), close that old log
if (fSyncing) logEndSync();
- fOutfile = new QFile(KPilotSettings::logFileName());
+ fOutfile = new TQFile(KPilotSettings::logFileName());
if (!fOutfile || !fOutfile->open(IO_WriteOnly))
{
@@ -70,21 +70,21 @@ LogFile::LogFile() : DCOPObject("LogIface"), QObject(), fOutfile(0L), fSyncing(f
fSyncing = true;
fLogStream.setDevice(fOutfile);
- fLogStream<<(CSL1("KPilot HotSync log, %1").arg(QDateTime::currentDateTime().toString()))<<endl<<endl<<endl;
- fLogStream<<(CSL1("Version: KPilot %1").arg(QString::fromLatin1(KPILOT_VERSION)))<<endl;
+ fLogStream<<(CSL1("KPilot HotSync log, %1").arg(TQDateTime::currentDateTime().toString()))<<endl<<endl<<endl;
+ fLogStream<<(CSL1("Version: KPilot %1").arg(TQString::fromLatin1(KPILOT_VERSION)))<<endl;
fLogStream<<(CSL1("Version: pilot-link %1.%2.%3%4" )
.arg(PILOT_LINK_VERSION).arg(PILOT_LINK_MAJOR).arg(PILOT_LINK_MINOR)
#ifdef PILOT_LINK_PATCH
- .arg(QString::fromLatin1(PILOT_LINK_PATCH))
+ .arg(TQString::fromLatin1(PILOT_LINK_PATCH))
#else
- .arg(QString())
+ .arg(TQString())
#endif
)<<endl;
#ifdef KDE_VERSION_STRING
- fLogStream<<(CSL1("Version: KDE %1" ).arg(QString::fromLatin1(KDE_VERSION_STRING)) )<<endl;
+ fLogStream<<(CSL1("Version: KDE %1" ).arg(TQString::fromLatin1(KDE_VERSION_STRING)) )<<endl;
#endif
#ifdef QT_VERSION_STR
- fLogStream<<(CSL1("Version: Qt %1" ).arg(QString::fromLatin1(QT_VERSION_STR)) )<<endl;
+ fLogStream<<(CSL1("Version: Qt %1" ).arg(TQString::fromLatin1(QT_VERSION_STR)) )<<endl;
#endif
fLogStream<<endl<<endl;
@@ -102,27 +102,27 @@ LogFile::LogFile() : DCOPObject("LogIface"), QObject(), fOutfile(0L), fSyncing(f
}
}
-/* DCOP */ ASYNC LogFile::logMessage(QString s)
+/* DCOP */ ASYNC LogFile::logMessage(TQString s)
{
addMessage(s);
}
-/* DCOP */ ASYNC LogFile::logError(QString s)
+/* DCOP */ ASYNC LogFile::logError(TQString s)
{
addMessage(s);
}
-/* DCOP */ ASYNC LogFile::logProgress(QString, int)
+/* DCOP */ ASYNC LogFile::logProgress(TQString, int)
{
}
-void LogFile::addMessage(const QString & s)
+void LogFile::addMessage(const TQString & s)
{
FUNCTIONSETUP;
if ( fSyncing && !s.isEmpty() )
{
- fLogStream<<QTime::currentTime().toString()<<" "<<s<<endl;
+ fLogStream<<TQTime::currentTime().toString()<<" "<<s<<endl;
}
}
diff --git a/kpilot/kpilot/logFile.h b/kpilot/kpilot/logFile.h
index 5ed93d43a..d710d7795 100644
--- a/kpilot/kpilot/logFile.h
+++ b/kpilot/kpilot/logFile.h
@@ -31,12 +31,12 @@
*/
#include "loggerDCOP.h"
-#include "qobject.h"
+#include "tqobject.h"
class QFile;
class QTextStream;
-class LogFile : public QObject, public LoggerDCOP
+class LogFile : public TQObject, public LoggerDCOP
{
Q_OBJECT
@@ -49,16 +49,16 @@ public:
*/
virtual ASYNC logStartSync();
virtual ASYNC logEndSync();
- virtual ASYNC logError(QString);
- virtual ASYNC logMessage(QString);
- virtual ASYNC logProgress(QString,int);
+ virtual ASYNC logError(TQString);
+ virtual ASYNC logMessage(TQString);
+ virtual ASYNC logProgress(TQString,int);
- void addMessage(const QString &);
+ void addMessage(const TQString &);
private:
- QFile*fOutfile;
+ TQFile*fOutfile;
bool fSyncing;
- QTextStream fLogStream;
+ TQTextStream fLogStream;
} ;
#endif
diff --git a/kpilot/kpilot/logWidget.cc b/kpilot/kpilot/logWidget.cc
index b64ed4a87..c7bddb617 100644
--- a/kpilot/kpilot/logWidget.cc
+++ b/kpilot/kpilot/logWidget.cc
@@ -29,18 +29,18 @@
#include "options.h"
-#include <qfile.h>
-#include <qlayout.h>
-#include <qtextedit.h>
-#include <qwhatsthis.h>
-#include <qdatetime.h>
-#include <qlabel.h>
-#include <qpixmap.h>
-#include <qtimer.h>
-#include <qpushbutton.h>
-#include <qhbox.h>
-#include <qtextstream.h>
-#include <qpainter.h>
+#include <tqfile.h>
+#include <tqlayout.h>
+#include <tqtextedit.h>
+#include <tqwhatsthis.h>
+#include <tqdatetime.h>
+#include <tqlabel.h>
+#include <tqpixmap.h>
+#include <tqtimer.h>
+#include <tqpushbutton.h>
+#include <tqhbox.h>
+#include <tqtextstream.h>
+#include <tqpainter.h>
#include <kglobal.h>
#include <kstandarddirs.h>
@@ -63,9 +63,9 @@
#endif
-LogWidget::LogWidget(QWidget * parent) :
+LogWidget::LogWidget(TQWidget * parent) :
DCOPObject("LogIface"),
- PilotComponent(parent, "component_log", QString::null),
+ PilotComponent(parent, "component_log", TQString::null),
fLog(0L),
fShowTime(false),
fSplash(0L),
@@ -74,7 +74,7 @@ LogWidget::LogWidget(QWidget * parent) :
fButtonBox(0L)
{
FUNCTIONSETUP;
- QGridLayout *grid = new QGridLayout(this, 4, 4, SPACING);
+ TQGridLayout *grid = new TQGridLayout(this, 4, 4, SPACING);
grid->addRowSpacing(0, SPACING);
grid->addRowSpacing(1, 100);
@@ -85,42 +85,42 @@ LogWidget::LogWidget(QWidget * parent) :
grid->setRowStretch(1, 50);
grid->setColStretch(2, 50);
- fLog = new QTextEdit(this);
+ fLog = new TQTextEdit(this);
fLog->setReadOnly(true);
- fLog->setWordWrap(QTextEdit::WidgetWidth);
- fLog->setWrapPolicy(QTextEdit::AtWordOrDocumentBoundary);
+ fLog->setWordWrap(TQTextEdit::WidgetWidth);
+ fLog->setWrapPolicy(TQTextEdit::AtWordOrDocumentBoundary);
#if QT_VERSION < 0x030100
/* nothing, use AutoText */
#else
fLog->setTextFormat(Qt::LogText);
#endif
- QWhatsThis::add(fLog, i18n("<qt>This lists all the messages received "
+ TQWhatsThis::add(fLog, i18n("<qt>This lists all the messages received "
"during the current HotSync</qt>"));
grid->addMultiCellWidget(fLog, 1, 1,1,2);
- QString initialText ;
+ TQString initialText ;
initialText.append(CSL1("<b>Version:</b> KPilot %1" TE_EOL)
- .arg(QString::fromLatin1(KPILOT_VERSION)));
+ .arg(TQString::fromLatin1(KPILOT_VERSION)));
initialText.append(CSL1("<b>Version:</b> pilot-link %1.%2.%3%4" TE_EOL)
.arg(PILOT_LINK_VERSION)
.arg(PILOT_LINK_MAJOR)
.arg(PILOT_LINK_MINOR)
#ifdef PILOT_LINK_PATCH
- .arg(QString::fromLatin1(PILOT_LINK_PATCH))
+ .arg(TQString::fromLatin1(PILOT_LINK_PATCH))
#else
- .arg(QString())
+ .arg(TQString())
#endif
);
#ifdef KDE_VERSION_STRING
initialText.append(CSL1("<b>Version:</b> KDE %1" TE_EOL)
- .arg(QString::fromLatin1(KDE_VERSION_STRING)));
+ .arg(TQString::fromLatin1(KDE_VERSION_STRING)));
#endif
#ifdef QT_VERSION_STR
initialText.append(CSL1("<b>Version:</b> Qt %1" TE_EOL)
- .arg(QString::fromLatin1(QT_VERSION_STR)));
+ .arg(TQString::fromLatin1(QT_VERSION_STR)));
#endif
initialText.append(CSL1(TE_EOL));
@@ -136,51 +136,51 @@ LogWidget::LogWidget(QWidget * parent) :
fLog->setText(initialText);
fLog->scrollToBottom();
- QHBox *h = new QHBox(this);
+ TQHBox *h = new TQHBox(this);
h->setSpacing(SPACING);
- QPushButton *b = new QPushButton(
+ TQPushButton *b = new TQPushButton(
i18n("Clear the text of HotSync messages","Clear Log"),
h);
- QWhatsThis::add(b,i18n("<qt>Clears the list of messages from the "
+ TQWhatsThis::add(b,i18n("<qt>Clears the list of messages from the "
"current HotSync.</qt>"));
- connect(b,SIGNAL(clicked()),this,SLOT(clearLog()));
+ connect(b,TQT_SIGNAL(clicked()),this,TQT_SLOT(clearLog()));
- b = new QPushButton(i18n("Save Log..."),h);
- QWhatsThis::add(b,i18n("<qt>You can save the list of messages received "
+ b = new TQPushButton(i18n("Save Log..."),h);
+ TQWhatsThis::add(b,i18n("<qt>You can save the list of messages received "
"during this HotSync to a file (for example for use in a "
"bug report) by clicking here.</qt>"));
- connect(b,SIGNAL(clicked()),this,SLOT(saveLog()));
+ connect(b,TQT_SIGNAL(clicked()),this,TQT_SLOT(saveLog()));
fButtonBox = h;
grid->addMultiCellWidget(h,2,2,1,2);
- fLabel = new QLabel(i18n("Sync progress:"),this);
+ fLabel = new TQLabel(i18n("Sync progress:"),this);
grid->addWidget(fLabel,3,1);
fProgress = new KProgress(this);
- QWhatsThis::add(fProgress,i18n("<qt>The (estimated) percentage "
+ TQWhatsThis::add(fProgress,i18n("<qt>The (estimated) percentage "
"completed in the current HotSync.</qt>"));
grid->addWidget(fProgress,3,2);
- QString splashPath =
+ TQString splashPath =
KGlobal::dirs()->findResource("data",
CSL1("kpilot/kpilot-splash.png"));
- if (!splashPath.isEmpty() && QFile::exists(splashPath))
+ if (!splashPath.isEmpty() && TQFile::exists(splashPath))
{
fLog->hide();
fLabel->hide();
fProgress->hide();
- QPixmap splash(splashPath);
- QPainter painter(&splash);
- painter.setPen(QColor(0, 255, 0));
+ TQPixmap splash(splashPath);
+ TQPainter painter(&splash);
+ painter.setPen(TQColor(0, 255, 0));
// This latin1() is ok; KPILOT_VERSION is a #define
// of a constant string.
int textWidth =fontMetrics().width(
- QString::fromLatin1(KPILOT_VERSION)) ;
+ TQString::fromLatin1(KPILOT_VERSION)) ;
int textHeight = fontMetrics().height();
#ifdef DEBUG
@@ -197,11 +197,11 @@ LogWidget::LogWidget(QWidget * parent) :
black);
painter.drawText(splash.width() - 25 - textWidth,
splash.height() - 8,
- QString::fromLatin1(KPILOT_VERSION));
- fSplash = new QLabel(this);
+ TQString::fromLatin1(KPILOT_VERSION));
+ fSplash = new TQLabel(this);
fSplash->setPixmap(splash);
fSplash->setAlignment(AlignCenter);
- QTimer::singleShot(3000,this,SLOT(hideSplash()));
+ TQTimer::singleShot(3000,this,TQT_SLOT(hideSplash()));
grid->addMultiCellWidget(fSplash,1,3,1,2);
grid->addColSpacing(0,10);
grid->setColStretch(1,50);
@@ -211,18 +211,18 @@ LogWidget::LogWidget(QWidget * parent) :
}
-void LogWidget::addMessage(const QString & s)
+void LogWidget::addMessage(const TQString & s)
{
FUNCTIONSETUP;
if (s.isEmpty()) return;
if (!fLog) return;
- QString t;
+ TQString t;
if (fShowTime)
{
t.append(CSL1("<b>"));
- t.append(QTime::currentTime().toString());
+ t.append(TQTime::currentTime().toString());
t.append(CSL1("</b> "));
}
@@ -237,7 +237,7 @@ void LogWidget::addMessage(const QString & s)
fLog->scrollToBottom();
}
-void LogWidget::addError(const QString & s)
+void LogWidget::addError(const TQString & s)
{
FUNCTIONSETUP;
@@ -247,7 +247,7 @@ void LogWidget::addError(const QString & s)
if (!fLog) return;
- QString t;
+ TQString t;
t.append(CSL1("<i>"));
t.append(s);
@@ -256,7 +256,7 @@ void LogWidget::addError(const QString & s)
addMessage(t);
}
-void LogWidget::addProgress(const QString &s,int i)
+void LogWidget::addProgress(const TQString &s,int i)
{
FUNCTIONSETUP;
@@ -299,17 +299,17 @@ void LogWidget::hideSplash()
}
-/* DCOP */ ASYNC LogWidget::logMessage(QString s)
+/* DCOP */ ASYNC LogWidget::logMessage(TQString s)
{
addMessage(s);
}
-/* DCOP */ ASYNC LogWidget::logError(QString s)
+/* DCOP */ ASYNC LogWidget::logError(TQString s)
{
addError(s);
}
-/* DCOP */ ASYNC LogWidget::logProgress(QString s, int i)
+/* DCOP */ ASYNC LogWidget::logProgress(TQString s, int i)
{
addProgress(s,i);
}
@@ -328,7 +328,7 @@ void LogWidget::hideSplash()
if (fLog)
{
- fLog->setText(QString::null);
+ fLog->setText(TQString::null);
}
}
@@ -340,14 +340,14 @@ void LogWidget::hideSplash()
while (!finished)
{
- QString saveFileName = KFileDialog::getSaveFileName(
- QString::null, /* default */
+ TQString saveFileName = KFileDialog::getSaveFileName(
+ TQString::null, /* default */
CSL1("*.log"), /* show log files by default */
this,
i18n("Save Log"));
if (saveFileName.isEmpty()) return;
- if (QFile::exists(saveFileName))
+ if (TQFile::exists(saveFileName))
{
int r = KMessageBox::warningYesNoCancel(
this,
@@ -369,11 +369,11 @@ void LogWidget::hideSplash()
}
-bool LogWidget::saveFile(const QString &saveFileName)
+bool LogWidget::saveFile(const TQString &saveFileName)
{
FUNCTIONSETUP;
- QFile f(saveFileName);
+ TQFile f(saveFileName);
if (!f.open(IO_WriteOnly))
{
int r = KMessageBox::questionYesNo(this,
@@ -386,7 +386,7 @@ bool LogWidget::saveFile(const QString &saveFileName)
}
else
{
- QTextStream t(&f);
+ TQTextStream t(&f);
t << fLog->text();
}
diff --git a/kpilot/kpilot/logWidget.h b/kpilot/kpilot/logWidget.h
index 4c89c7185..9d99ab53c 100644
--- a/kpilot/kpilot/logWidget.h
+++ b/kpilot/kpilot/logWidget.h
@@ -42,7 +42,7 @@ class LogWidget : public PilotComponent , public LoggerDCOP
Q_OBJECT
public:
- LogWidget(QWidget *);
+ LogWidget(TQWidget *);
~LogWidget() { } ;
// Pilot Component Methods:
@@ -53,21 +53,21 @@ public:
/**
* DCOP interface.
*/
- virtual ASYNC logError(QString);
- virtual ASYNC logMessage(QString);
- virtual ASYNC logProgress(QString,int);
+ virtual ASYNC logError(TQString);
+ virtual ASYNC logMessage(TQString);
+ virtual ASYNC logProgress(TQString,int);
virtual ASYNC logStartSync();
virtual ASYNC logEndSync();
// GUI customization hooks
//
//
- QHBox *buttonBox() const { return fButtonBox; } ;
+ TQHBox *buttonBox() const { return fButtonBox; } ;
public slots:
- void addMessage(const QString &);
- void addError(const QString &);
- void addProgress(const QString &,int);
+ void addMessage(const TQString &);
+ void addError(const TQString &);
+ void addProgress(const TQString &,int);
void syncDone();
private slots:
@@ -76,15 +76,15 @@ private slots:
void saveLog();
private:
- bool saveFile(const QString &);
+ bool saveFile(const TQString &);
private:
- QTextEdit *fLog;
+ TQTextEdit *fLog;
bool fShowTime;
- QLabel *fSplash;
- QLabel *fLabel;
+ TQLabel *fSplash;
+ TQLabel *fLabel;
KProgress *fProgress;
- QHBox *fButtonBox;
+ TQHBox *fButtonBox;
} ;
#endif
diff --git a/kpilot/kpilot/loggerDCOP.h b/kpilot/kpilot/loggerDCOP.h
index 9d8462343..3ea3101de 100644
--- a/kpilot/kpilot/loggerDCOP.h
+++ b/kpilot/kpilot/loggerDCOP.h
@@ -44,13 +44,13 @@ k_dcop:
virtual ASYNC logEndSync() = 0 ;
// Adds a single message to the log, with formatting
// showing it's an error message.
- virtual ASYNC logError(QString) = 0 ;
+ virtual ASYNC logError(TQString) = 0 ;
// Adds a regular message.
- virtual ASYNC logMessage(QString) = 0 ;
+ virtual ASYNC logMessage(TQString) = 0 ;
// Adds a message if the string is non-null, and
// sets the progress bar to @p n%. Limit @p n
// to the range 0 .. 100.
- virtual ASYNC logProgress(QString,int n) = 0 ;
+ virtual ASYNC logProgress(TQString,int n) = 0 ;
} ;
diff --git a/kpilot/kpilot/main-test.cc b/kpilot/kpilot/main-test.cc
index ad57bdabc..f9c9fe80a 100644
--- a/kpilot/kpilot/main-test.cc
+++ b/kpilot/kpilot/main-test.cc
@@ -36,9 +36,9 @@
#include <time.h>
#include <iostream>
-#include <qpushbutton.h>
-#include <qhbox.h>
-#include <qtimer.h>
+#include <tqpushbutton.h>
+#include <tqhbox.h>
+#include <tqtimer.h>
#include <kapplication.h>
#include <klocale.h>
@@ -137,32 +137,32 @@ void connectStack( KPilotLink *l, ActionQueue *a, bool loop = false )
if (l && a)
{
- QObject::connect(a, SIGNAL(syncDone(SyncAction *)),
- l, SLOT(close()));
+ TQObject::connect(a, TQT_SIGNAL(syncDone(SyncAction *)),
+ l, TQT_SLOT(close()));
if (!loop)
{
- QObject::connect(a, SIGNAL(syncDone(SyncAction *)),
- kapp, SLOT(quit()));
+ TQObject::connect(a, TQT_SIGNAL(syncDone(SyncAction *)),
+ kapp, TQT_SLOT(quit()));
}
else
{
- QObject::connect(a, SIGNAL(syncDone(SyncAction *)),
- l, SLOT(reset()));
+ TQObject::connect(a, TQT_SIGNAL(syncDone(SyncAction *)),
+ l, TQT_SLOT(reset()));
}
- QObject::connect(l, SIGNAL(deviceReady(KPilotLink*)),
- a, SLOT(execConduit()));
+ TQObject::connect(l, TQT_SIGNAL(deviceReady(KPilotLink*)),
+ a, TQT_SLOT(execConduit()));
}
}
-int exec(const QString &device, const QString &what, KCmdLineArgs *p)
+int exec(const TQString &device, const TQString &what, KCmdLineArgs *p)
{
FUNCTIONSETUP;
// get --exec-conduit value
if (what.isEmpty()) return 1;
- QStringList l;
+ TQStringList l;
l.append(what);
SyncAction::SyncMode::Mode syncMode = SyncAction::SyncMode::eHotSync;
@@ -181,7 +181,7 @@ int exec(const QString &device, const QString &what, KCmdLineArgs *p)
return kapp->exec();
}
-int backup(const QString &device, const QString &what, KCmdLineArgs *p)
+int backup(const TQString &device, const TQString &what, KCmdLineArgs *p)
{
FUNCTIONSETUP;
KPilotLink *link = createLink( p->isSet("local") );
@@ -196,7 +196,7 @@ int backup(const QString &device, const QString &what, KCmdLineArgs *p)
return kapp->exec();
}
-int restore(const QString &device, const QString &what, KCmdLineArgs *p)
+int restore(const TQString &device, const TQString &what, KCmdLineArgs *p)
{
FUNCTIONSETUP;
KPilotLink *link = createLink( p->isSet("local") );
@@ -211,7 +211,7 @@ int restore(const QString &device, const QString &what, KCmdLineArgs *p)
return kapp->exec();
}
-int listDB(const QString &device, KCmdLineArgs *p)
+int listDB(const TQString &device, KCmdLineArgs *p)
{
FUNCTIONSETUP;
KPilotLink *link = createLink( p->isSet("local") );
@@ -224,7 +224,7 @@ int listDB(const QString &device, KCmdLineArgs *p)
return kapp->exec();
}
-int check( const QString &device, const QString &what, KCmdLineArgs *p )
+int check( const TQString &device, const TQString &what, KCmdLineArgs *p )
{
FUNCTIONSETUP;
@@ -265,7 +265,7 @@ void listConduits()
// sure that nothing gets listed in both.
//
//
- QValueListIterator < KServiceOffer > availList(offers.begin());
+ TQValueListIterator < KServiceOffer > availList(offers.begin());
while (availList != offers.end())
{
KSharedPtr < KService > o = (*availList).service();
@@ -283,7 +283,7 @@ void listConduits()
}
}
-int show( const QString &what )
+int show( const TQString &what )
{
FUNCTIONSETUP;
@@ -377,7 +377,7 @@ int main(int argc, char **argv)
Pilot::setupPilotCodec(KPilotSettings::encoding());
- QString device( "/dev/pilot" );
+ TQString device( "/dev/pilot" );
if ( p->isSet("port") )
{
diff --git a/kpilot/kpilot/memoWidget.cc b/kpilot/kpilot/memoWidget.cc
index 0b5e16b42..143167aee 100644
--- a/kpilot/kpilot/memoWidget.cc
+++ b/kpilot/kpilot/memoWidget.cc
@@ -35,18 +35,18 @@
#include <pi-macros.h>
#include <pi-dlp.h>
-#include <qdir.h>
-#include <qptrlist.h>
-#include <qlistbox.h>
-#include <qfile.h>
-#include <qpushbutton.h>
-#include <qlayout.h>
-#include <qdom.h>
-#include <qtextstream.h>
-#include <qwhatsthis.h>
-#include <qlabel.h>
-#include <qdatetime.h>
-#include <qptrlist.h>
+#include <tqdir.h>
+#include <tqptrlist.h>
+#include <tqlistbox.h>
+#include <tqfile.h>
+#include <tqpushbutton.h>
+#include <tqlayout.h>
+#include <tqdom.h>
+#include <tqtextstream.h>
+#include <tqwhatsthis.h>
+#include <tqlabel.h>
+#include <tqdatetime.h>
+#include <tqptrlist.h>
#include <kapplication.h>
#include <kmessagebox.h>
@@ -70,12 +70,12 @@ public:
~Private() { KPILOT_DELETE(fMemoAppInfo); } ;
PilotMemoInfo *fMemoAppInfo;
- QPtrList<PilotMemo> fMemoList;
+ TQPtrList<PilotMemo> fMemoList;
} ;
-MemoWidget::MemoWidget(QWidget * parent,
- const QString & path) :
+MemoWidget::MemoWidget(TQWidget * parent,
+ const TQString & path) :
PilotComponent(parent, "component_memo", path),
fTextWidget(0L),
d(new Private()),
@@ -221,74 +221,74 @@ void MemoWidget::setupWidget()
{
FUNCTIONSETUP;
- QLabel *label = NULL;
- QPushButton *button = NULL;
- QGridLayout *grid = new QGridLayout(this, 5, 4, SPACING);
- QString wt;
+ TQLabel *label = NULL;
+ TQPushButton *button = NULL;
+ TQGridLayout *grid = new TQGridLayout(this, 5, 4, SPACING);
+ TQString wt;
- fCatList = new QComboBox(this);
+ fCatList = new TQComboBox(this);
grid->addWidget(fCatList, 0, 1);
- connect(fCatList, SIGNAL(activated(int)),
- this, SLOT(slotSetCategory(int)));
- QWhatsThis::add(fCatList,
+ connect(fCatList, TQT_SIGNAL(activated(int)),
+ this, TQT_SLOT(slotSetCategory(int)));
+ TQWhatsThis::add(fCatList,
i18n("Select the category of addresses\n"
"to display here."));
(void) i18n("Memos:");
- label = new QLabel(i18n("Category:"), this);
+ label = new TQLabel(i18n("Category:"), this);
label->setBuddy(fCatList);
grid->addWidget(label, 0, 0);
- fListBox = new QListBox(this);
+ fListBox = new TQListBox(this);
grid->addMultiCellWidget(fListBox, 1, 1, 0, 1);
- connect(fListBox, SIGNAL(highlighted(int)),
- this, SLOT(slotShowMemo(int)));
- connect(fListBox, SIGNAL(selectionChanged()),
- this,SLOT(slotUpdateButtons()));
- QWhatsThis::add(fListBox,
+ connect(fListBox, TQT_SIGNAL(highlighted(int)),
+ this, TQT_SLOT(slotShowMemo(int)));
+ connect(fListBox, TQT_SIGNAL(selectionChanged()),
+ this,TQT_SLOT(slotUpdateButtons()));
+ TQWhatsThis::add(fListBox,
i18n("This list displays all the memos\n"
"in the selected category. Click on\n"
"one to display it to the right."));
- label = new QLabel(i18n("Memo text:"), this);
+ label = new TQLabel(i18n("Memo text:"), this);
grid->addWidget(label, 0, 2);
fTextWidget = new KTextEdit(this, "textArea");
fTextWidget->setWordWrap(KTextEdit::WidgetWidth);
fTextWidget->setTextFormat(Qt::PlainText);
grid->addMultiCellWidget(fTextWidget, 1, 4, 2, 2);
- QWhatsThis::add(fTextWidget,
+ TQWhatsThis::add(fTextWidget,
i18n("The text of the selected memo appears here."));
fTextWidget->setReadOnly(!KPilotSettings::internalEditors());
- button = new QPushButton(i18n("Import Memo..."), this);
+ button = new TQPushButton(i18n("Import Memo..."), this);
grid->addWidget(button, 2, 0);
- connect(button, SIGNAL(clicked()), this, SLOT(slotImportMemo()));
+ connect(button, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotImportMemo()));
wt = KPilotSettings::internalEditors() ?
i18n ("Read a text file and add it to the Pilot's memo database.") :
i18n("<qt><i>Import is disabled by the 'internal editors' setting.</i></qt>");
- QWhatsThis::add(button,wt);
+ TQWhatsThis::add(button,wt);
- fExportButton = new QPushButton(i18n("Export Memo..."), this);
+ fExportButton = new TQPushButton(i18n("Export Memo..."), this);
grid->addWidget(fExportButton, 2, 1);
- connect(fExportButton, SIGNAL(clicked()), this,
- SLOT(slotExportMemo()));
- QWhatsThis::add(fExportButton,
+ connect(fExportButton, TQT_SIGNAL(clicked()), this,
+ TQT_SLOT(slotExportMemo()));
+ TQWhatsThis::add(fExportButton,
i18n("Write the selected memo to a file."));
- fDeleteButton = new QPushButton(i18n("Delete Memo"), this);
+ fDeleteButton = new TQPushButton(i18n("Delete Memo"), this);
grid->addWidget(fDeleteButton, 3, 1);
- connect(fDeleteButton, SIGNAL(clicked()), this,
- SLOT(slotDeleteMemo()));
+ connect(fDeleteButton, TQT_SIGNAL(clicked()), this,
+ TQT_SLOT(slotDeleteMemo()));
wt = KPilotSettings::internalEditors() ?
i18n("Delete the selected memo.") :
i18n("<qt><i>Deleting is disabled by the 'internal editors' setting.</i></qt>") ;
- QWhatsThis::add(fDeleteButton, wt);
+ TQWhatsThis::add(fDeleteButton, wt);
- button = new QPushButton(i18n("Add Memo"), this);
+ button = new TQPushButton(i18n("Add Memo"), this);
grid->addWidget(button, 3, 0);
- connect(button, SIGNAL(clicked()), this, SLOT(slotAddMemo()));
- QWhatsThis::add(button,i18n("Add a new memo to the database."));
+ connect(button, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotAddMemo()));
+ TQWhatsThis::add(button,i18n("Add a new memo to the database."));
}
void MemoWidget::slotUpdateButtons()
@@ -552,14 +552,14 @@ void MemoWidget::saveChangedMemo()
writeMemo(currentMemo);
}
-/* virtual */ bool MemoWidget::preHotSync(QString &)
+/* virtual */ bool MemoWidget::preHotSync(TQString &)
{
FUNCTIONSETUP;
saveChangedMemo();
return true;
}
-bool MemoWidget::addMemo(const QString &s, int category)
+bool MemoWidget::addMemo(const TQString &s, int category)
{
FUNCTIONSETUP;
@@ -591,7 +591,7 @@ void MemoWidget::slotAddMemo()
FUNCTIONSETUP;
int currentCatID = findSelectedCategory(fCatList,
d->fMemoAppInfo->categoryInfo(), true);
- addMemo(QDateTime::currentDateTime().toString(), currentCatID);
+ addMemo(TQDateTime::currentDateTime().toString(), currentCatID);
}
void MemoWidget::slotImportMemo()
@@ -602,11 +602,11 @@ void MemoWidget::slotImportMemo()
int currentCatID = findSelectedCategory(fCatList,
d->fMemoAppInfo->categoryInfo(), true);
- QString fileName = KFileDialog::getOpenFileName();
+ TQString fileName = KFileDialog::getOpenFileName();
if (!fileName.isEmpty())
{
- QFile importFile(fileName);
+ TQFile importFile(fileName);
if (importFile.open(IO_ReadOnly) == FALSE)
{
@@ -620,8 +620,8 @@ void MemoWidget::slotImportMemo()
return;
}
- QTextStream stream(&importFile);
- QString memoText = stream.read();
+ TQTextStream stream(&importFile);
+ TQString memoText = stream.read();
addMemo(memoText, currentCatID);
}
}
@@ -635,22 +635,22 @@ void MemoWidget::slotExportMemo()
if (index == 0)
return;
- QString data;
+ TQString data;
- const QString filter = CSL1("*|Plain text output\n*.xml|XML output");
- QString fileName;
+ const TQString filter = CSL1("*|Plain text output\n*.xml|XML output");
+ TQString fileName;
- KFileDialog kfile( QString::null , filter, fExportButton , "memoSave" , true );
+ KFileDialog kfile( TQString::null , filter, fExportButton , "memoSave" , true );
kfile.setOperationMode( KFileDialog::Saving );
- if ( kfile.exec() == QDialog::Accepted ) {
+ if ( kfile.exec() == TQDialog::Accepted ) {
fileName = kfile.selectedFile();
}
if (fileName.isEmpty())
return;
- QPtrList<PilotListItem> menu_items;
+ TQPtrList<PilotListItem> menu_items;
for (int x = 0; x < index; x++){
if (fListBox->item(x)->isSelected()){
@@ -671,12 +671,12 @@ void MemoWidget::slotExportMemo()
return;
}
-bool MemoWidget::saveAsText(const QString &fileName,const QPtrList<PilotListItem> &memo_list)
+bool MemoWidget::saveAsText(const TQString &fileName,const TQPtrList<PilotListItem> &memo_list)
{
- QFile f( fileName );
- QTextStream stream(&f);
+ TQFile f( fileName );
+ TQTextStream stream(&f);
- if ( QFile::exists( fileName ) )
+ if ( TQFile::exists( fileName ) )
{
if( !f.open(IO_ReadWrite | IO_Append) )
{
@@ -691,7 +691,7 @@ bool MemoWidget::saveAsText(const QString &fileName,const QPtrList<PilotListItem
}
}
- QPtrListIterator<PilotListItem> it(memo_list);
+ TQPtrListIterator<PilotListItem> it(memo_list);
for ( ; it.current(); ++it )
{
PilotListItem *p = it.current();
@@ -703,12 +703,12 @@ bool MemoWidget::saveAsText(const QString &fileName,const QPtrList<PilotListItem
return true;
}
-bool MemoWidget::saveAsXML(const QString &fileName,const QPtrList<PilotListItem> &memo_list)
+bool MemoWidget::saveAsXML(const TQString &fileName,const TQPtrList<PilotListItem> &memo_list)
{
- QDomDocument doc( CSL1("kpilotmemos") );
- QFile f( fileName );
- QTextStream stream( &f );
- QDomElement memos;
+ TQDomDocument doc( CSL1("kpilotmemos") );
+ TQFile f( fileName );
+ TQTextStream stream( &f );
+ TQDomElement memos;
int append = 0;
@@ -755,7 +755,7 @@ bool MemoWidget::saveAsXML(const QString &fileName,const QPtrList<PilotListItem>
f.close();
// These are temporary, and should be retrieved from the pilot stuff
- QString mpilotid;
+ TQString mpilotid;
mpilotid = "1";
// End of temp variables
@@ -769,31 +769,31 @@ bool MemoWidget::saveAsXML(const QString &fileName,const QPtrList<PilotListItem>
doc.appendChild ( memos );
}
- QPtrListIterator<PilotListItem> it(memo_list);
+ TQPtrListIterator<PilotListItem> it(memo_list);
for ( ; it.current(); ++it )
{
PilotListItem *p = it.current();
PilotMemo *theMemo = (PilotMemo *) p->rec();
- QDomElement memo = doc.createElement( CSL1("memo") );
+ TQDomElement memo = doc.createElement( CSL1("memo") );
memo.setAttribute ( CSL1("pilotid") , mpilotid );
memos.appendChild ( memo );
- //QDomElement category = doc.createElement( "category" );
+ //TQDomElement category = doc.createElement( "category" );
//head.appendChild ( category );
//
- //QDomText categorytext = doc.createTextNode( memo->category() );
+ //TQDomText categorytext = doc.createTextNode( memo->category() );
//category.appendChild ( categorytext );
//FIXME
- QDomElement title = doc.createElement(CSL1("title" ));
+ TQDomElement title = doc.createElement(CSL1("title" ));
memo.appendChild ( title );
- QDomText titletext = doc.createTextNode( theMemo->shortTitle() );
+ TQDomText titletext = doc.createTextNode( theMemo->shortTitle() );
title.appendChild ( titletext );
- QDomText body = doc.createTextNode( theMemo->text() );
+ TQDomText body = doc.createTextNode( theMemo->text() );
memo.appendChild ( body );
}
if ( !f.open(IO_WriteOnly ) ) return false;
diff --git a/kpilot/kpilot/memoWidget.h b/kpilot/kpilot/memoWidget.h
index 837d25cd8..99657df8c 100644
--- a/kpilot/kpilot/memoWidget.h
+++ b/kpilot/kpilot/memoWidget.h
@@ -44,18 +44,18 @@ class MemoWidget : public PilotComponent
Q_OBJECT
public:
- MemoWidget(QWidget* parent, const QString& dbpath);
+ MemoWidget(TQWidget* parent, const TQString& dbpath);
virtual ~MemoWidget();
// Pilot Component Methods:
/* virtual */ void showComponent();
/* virtual */ void hideComponent();
- /* virtual */ bool preHotSync(QString &);
+ /* virtual */ bool preHotSync(TQString &);
/* virtual */ void postHotSync();
// Added by David Bishop, please move to correct location!
- bool saveAsXML(const QString &fileName,const QPtrList<PilotListItem> &menu_item );
- bool saveAsText(const QString &fileName,const QPtrList<PilotListItem> &menu_item );
+ bool saveAsXML(const TQString &fileName,const TQPtrList<PilotListItem> &menu_item );
+ bool saveAsText(const TQString &fileName,const TQPtrList<PilotListItem> &menu_item );
typedef enum {
MAX_MEMO_LEN = 8192
@@ -67,7 +67,7 @@ protected:
void saveChangedMemo();
- bool addMemo(const QString &text, int category);
+ bool addMemo(const TQString &text, int category);
public slots:
/**
@@ -97,13 +97,13 @@ private:
class Private;
- QComboBox* fCatList;
+ TQComboBox* fCatList;
KTextEdit* fTextWidget;
Private *d;
- QListBox* fListBox;
+ TQListBox* fListBox;
- QPushButton *fExportButton,*fDeleteButton;
+ TQPushButton *fExportButton,*fDeleteButton;
int lastSelectedMemo;
};
diff --git a/kpilot/kpilot/pilotComponent.cc b/kpilot/kpilot/pilotComponent.cc
index 414db70e9..0172a44ea 100644
--- a/kpilot/kpilot/pilotComponent.cc
+++ b/kpilot/kpilot/pilotComponent.cc
@@ -35,8 +35,8 @@
#include <pi-appinfo.h>
-#include <qwidget.h>
-#include <qcombobox.h>
+#include <tqwidget.h>
+#include <tqcombobox.h>
#include <kdebug.h>
@@ -46,10 +46,10 @@
#include "pilotComponent.moc"
-PilotComponent::PilotComponent(QWidget * parent,
+PilotComponent::PilotComponent(TQWidget * parent,
const char *id,
- const QString & path) :
- QWidget(parent, id),
+ const TQString & path) :
+ TQWidget(parent, id),
fDBPath(path),
shown(false)
{
@@ -65,7 +65,7 @@ PilotComponent::PilotComponent(QWidget * parent,
-int PilotComponent::findSelectedCategory(QComboBox * fCatList,
+int PilotComponent::findSelectedCategory(TQComboBox * fCatList,
struct CategoryAppInfo *info, bool AllIsUnfiled)
{
FUNCTIONSETUP;
@@ -101,7 +101,7 @@ int PilotComponent::findSelectedCategory(QComboBox * fCatList,
}
else
{
- QString selectedCategory =
+ TQString selectedCategory =
fCatList->text(fCatList->currentItem());
currentCatID = Pilot::findCategory(info, selectedCategory, AllIsUnfiled);
}
@@ -112,7 +112,7 @@ int PilotComponent::findSelectedCategory(QComboBox * fCatList,
}
-void PilotComponent::populateCategories(QComboBox * c,
+void PilotComponent::populateCategories(TQComboBox * c,
struct CategoryAppInfo *info)
{
FUNCTIONSETUP;
@@ -165,14 +165,14 @@ void PilotComponent::slotShowComponent()
emit showComponent(this);
}
-/* virtual */ bool PilotComponent::preHotSync(QString &)
+/* virtual */ bool PilotComponent::preHotSync(TQString &)
{
FUNCTIONSETUP;
return true;
}
-void PilotComponent::markDBDirty(const QString db)
+void PilotComponent::markDBDirty(const TQString db)
{
FUNCTIONSETUP;
KPilotConfig::addDirtyDatabase(db);
diff --git a/kpilot/kpilot/pilotComponent.h b/kpilot/kpilot/pilotComponent.h
index f96093a2b..01c5a3f37 100644
--- a/kpilot/kpilot/pilotComponent.h
+++ b/kpilot/kpilot/pilotComponent.h
@@ -32,7 +32,7 @@
/**
* Base class for any module to KPilot
*/
-#include <qwidget.h>
+#include <tqwidget.h>
struct CategoryAppInfo;
class QComboBox;
@@ -44,9 +44,9 @@ Q_OBJECT
friend class KPilotInstaller;
public:
- PilotComponent(QWidget* parent,
+ PilotComponent(TQWidget* parent,
const char *id,
- const QString& dbPath);
+ const TQString& dbPath);
/**
* Called when the component is shown in kpilot. It should
@@ -83,7 +83,7 @@ public:
* "Can't start HotSync. %1"
* where %1 is replaced by s.
*/
- virtual bool preHotSync(QString &s) ;
+ virtual bool preHotSync(TQString &s) ;
/**
* Reload data (possibly changed by the hotsync) etc. etc.
@@ -105,7 +105,7 @@ protected:
* selected, their ID is returned. If nothing is selected,
* behave as if "All" is selected.
*/
- int findSelectedCategory(QComboBox *,
+ int findSelectedCategory(TQComboBox *,
CategoryAppInfo *,
bool AllIsUnfiled=false);
@@ -119,12 +119,12 @@ protected:
*
* If info is a NULL pointer, just put "All" in the combo box.
*/
- void populateCategories(QComboBox *,
+ void populateCategories(TQComboBox *,
CategoryAppInfo *info=0);
- void setDBPath(const QString &path) { fDBPath = path; } ;
- const QString& dbPath() const { return fDBPath; } ;
- void markDBDirty(const QString db);
+ void setDBPath(const TQString &path) { fDBPath = path; } ;
+ const TQString& dbPath() const { return fDBPath; } ;
+ void markDBDirty(const TQString db);
public slots:
void slotShowComponent();
@@ -133,7 +133,7 @@ signals:
void showComponent(PilotComponent *);
private:
- QString fDBPath;
+ TQString fDBPath;
protected:
bool shown;
} ;
diff --git a/kpilot/kpilot/pilotDaemon.cc b/kpilot/kpilot/pilotDaemon.cc
index 6eea2f7e8..6541365d2 100644
--- a/kpilot/kpilot/pilotDaemon.cc
+++ b/kpilot/kpilot/pilotDaemon.cc
@@ -33,9 +33,9 @@
#include <stdlib.h>
-#include <qtimer.h>
-#include <qtooltip.h>
-#include <qpixmap.h>
+#include <tqtimer.h>
+#include <tqtooltip.h>
+#include <tqpixmap.h>
#include <kuniqueapplication.h>
#include <kaboutapplication.h>
@@ -89,13 +89,13 @@ PilotDaemonTray::PilotDaemonTray(PilotDaemon * p) :
setAcceptDrops(true);
}
-/* virtual */ void PilotDaemonTray::dragEnterEvent(QDragEnterEvent * e)
+/* virtual */ void PilotDaemonTray::dragEnterEvent(TQDragEnterEvent * e)
{
FUNCTIONSETUP;
e->accept(KURLDrag::canDecode(e));
}
-/* virtual */ void PilotDaemonTray::dropEvent(QDropEvent * e)
+/* virtual */ void PilotDaemonTray::dropEvent(TQDropEvent * e)
{
FUNCTIONSETUP;
@@ -103,7 +103,7 @@ PilotDaemonTray::PilotDaemonTray(PilotDaemon * p) :
KURLDrag::decode(e, list);
- QStringList files;
+ TQStringList files;
for(KURL::List::ConstIterator it = list.begin(); it != list.end(); ++it)
{
if ((*it).isLocalFile())
@@ -113,7 +113,7 @@ PilotDaemonTray::PilotDaemonTray(PilotDaemon * p) :
daemon->addInstallFiles(files);
}
-/* virtual */ void PilotDaemonTray::mousePressEvent(QMouseEvent * e)
+/* virtual */ void PilotDaemonTray::mousePressEvent(TQMouseEvent * e)
{
FUNCTIONSETUP;
@@ -134,7 +134,7 @@ PilotDaemonTray::PilotDaemonTray(PilotDaemon * p) :
}
}
-/* virtual */ void PilotDaemonTray::closeEvent(QCloseEvent *)
+/* virtual */ void PilotDaemonTray::closeEvent(TQCloseEvent *)
{
FUNCTIONSETUP;
daemon->quitNow();
@@ -150,18 +150,18 @@ void PilotDaemonTray::setupWidget()
icons[NotListening] = loadIcon( CSL1("nosync") );
slotShowNotListening();
- QTimer::singleShot(2000,this,SLOT(slotShowNormal()));
+ TQTimer::singleShot(2000,this,TQT_SLOT(slotShowNormal()));
KPopupMenu *menu = contextMenu();
menuKPilotItem = menu->insertItem(i18n("Start &KPilot"), daemon,
- SLOT(slotRunKPilot()));
+ TQT_SLOT(slotRunKPilot()));
menuConfigureConduitsItem = menu->insertItem(i18n("&Configure KPilot..."),
- daemon, SLOT(slotRunConfig()));
+ daemon, TQT_SLOT(slotRunConfig()));
menu->insertSeparator();
fSyncTypeMenu = new KPopupMenu(menu,"sync_type_menu");
- QString once = i18n("Appended to names of sync types to indicate the sync will happen just one time"," (once)");
+ TQString once = i18n("Appended to names of sync types to indicate the sync will happen just one time"," (once)");
#define MI(a) fSyncTypeMenu->insertItem( \
SyncAction::SyncMode::name(SyncAction::SyncMode::a) + once, \
(int)(SyncAction::SyncMode::a));
@@ -181,7 +181,7 @@ void PilotDaemonTray::setupWidget()
fSyncTypeMenu->setCheckable(true);
fSyncTypeMenu->setItemChecked(0,true);
#undef MI
- connect(fSyncTypeMenu,SIGNAL(activated(int)),daemon,SLOT(requestSync(int)));
+ connect(fSyncTypeMenu,TQT_SIGNAL(activated(int)),daemon,TQT_SLOT(requestSync(int)));
menu->insertItem(i18n("Next &Sync"),fSyncTypeMenu);
KHelpMenu *help = new KHelpMenu(menu,aboutData);
@@ -257,12 +257,12 @@ void PilotDaemonTray::startHotSync()
changeIcon(Busy);
if (!fBlinkTimer)
{
- fBlinkTimer = new QTimer(this,"blink timer");
+ fBlinkTimer = new TQTimer(this,"blink timer");
}
if (fBlinkTimer)
{
- connect(fBlinkTimer,SIGNAL(timeout()),
- this,SLOT(slotBusyTimer()));
+ connect(fBlinkTimer,TQT_SIGNAL(timeout()),
+ this,TQT_SLOT(slotBusyTimer()));
fBlinkTimer->start(750,false);
}
}
@@ -290,7 +290,7 @@ PilotDaemon::PilotDaemon() :
fLogStub(new LoggerDCOP_stub("kpilot", "LogIface")),
fLogFileStub(new LoggerDCOP_stub("kpilotDaemon", "LogIface")),
fKPilotStub(new KPilotDCOP_stub("kpilot", "KPilotIface")),
- fTempDevice(QString::null)
+ fTempDevice(TQString::null)
{
FUNCTIONSETUP;
@@ -305,8 +305,8 @@ PilotDaemon::PilotDaemon() :
fInstaller = new FileInstaller;
fLogFile = new LogFile;
- connect(fInstaller, SIGNAL(filesChanged()),
- this, SLOT(slotFilesChanged()));
+ connect(fInstaller, TQT_SIGNAL(filesChanged()),
+ this, TQT_SLOT(slotFilesChanged()));
fNextSyncType.setMode( KPilotSettings::syncType() );
@@ -328,7 +328,7 @@ PilotDaemon::~PilotDaemon()
(void) PilotDatabase::instanceCount();
}
-void PilotDaemon::addInstallFiles(const QStringList &l)
+void PilotDaemon::addInstallFiles(const TQStringList &l)
{
FUNCTIONSETUP;
@@ -406,7 +406,7 @@ void PilotDaemon::showTray()
updateTrayStatus();
}
-/* DCOP ASYNC */ void PilotDaemon::setTempDevice(QString d)
+/* DCOP ASYNC */ void PilotDaemon::setTempDevice(TQString d)
{
if ( !d.isEmpty() ){
fTempDevice = d;
@@ -509,7 +509,7 @@ void PilotDaemon::showTray()
}
updateTrayStatus();
- logProgress(QString::null,0);
+ logProgress(TQString::null,0);
}
/* DCOP */ void PilotDaemon::stopListening()
@@ -528,11 +528,11 @@ void PilotDaemon::showTray()
fPilotLink->reset();
}
-/* DCOP */ QString PilotDaemon::statusString()
+/* DCOP */ TQString PilotDaemon::statusString()
{
FUNCTIONSETUP;
- QString s = CSL1("PilotDaemon=");
+ TQString s = CSL1("PilotDaemon=");
s.append(shortStatusString());
s.append(CSL1("; NextSync="));
@@ -548,9 +548,9 @@ void PilotDaemon::showTray()
return s;
}
-/* DCOP */ QString PilotDaemon::shortStatusString()
+/* DCOP */ TQString PilotDaemon::shortStatusString()
{
- QString s;
+ TQString s;
switch (status())
{
@@ -594,16 +594,16 @@ bool PilotDaemon::setupPilotLink()
return false;
}
- QObject::connect(fPilotLink, SIGNAL(deviceReady(KPilotLink*)),
- this, SLOT(startHotSync(KPilotLink*)));
+ TQObject::connect(fPilotLink, TQT_SIGNAL(deviceReady(KPilotLink*)),
+ this, TQT_SLOT(startHotSync(KPilotLink*)));
// connect the signals emitted by the pilotDeviceLink
- QObject::connect(fPilotLink, SIGNAL(logError(const QString &)),
- this, SLOT(logError(const QString &)));
- QObject::connect(fPilotLink, SIGNAL(logMessage(const QString &)),
- this, SLOT(logMessage(const QString &)));
- QObject::connect(fPilotLink,
- SIGNAL(logProgress(const QString &,int)),
- this, SLOT(logProgress(const QString &,int)));
+ TQObject::connect(fPilotLink, TQT_SIGNAL(logError(const TQString &)),
+ this, TQT_SLOT(logError(const TQString &)));
+ TQObject::connect(fPilotLink, TQT_SIGNAL(logMessage(const TQString &)),
+ this, TQT_SLOT(logMessage(const TQString &)));
+ TQObject::connect(fPilotLink,
+ TQT_SIGNAL(logProgress(const TQString &,int)),
+ this, TQT_SLOT(logProgress(const TQString &,int)));
return true;
@@ -631,7 +631,7 @@ bool PilotDaemon::setupPilotLink()
fPostSyncAction |= Quit;
break;
}
- emitDCOPSignal( "kpilotDaemonStatusChanged()", QByteArray() );
+ emitDCOPSignal( "kpilotDaemonStatusChanged()", TQByteArray() );
}
/* DCOP ASYNC */ void PilotDaemon::requestRegularSyncNext()
@@ -671,7 +671,7 @@ bool PilotDaemon::setupPilotLink()
i18n("Please press the HotSync button."));
}
-/* DCOP ASYNC */ void PilotDaemon::requestSyncType(QString s)
+/* DCOP ASYNC */ void PilotDaemon::requestSyncType(TQString s)
{
FUNCTIONSETUP;
@@ -712,36 +712,36 @@ bool PilotDaemon::setupPilotLink()
/**
* DCOP Functions reporting some status data, e.g. for the kontact plugin.
*/
-QDateTime PilotDaemon::lastSyncDate()
+TQDateTime PilotDaemon::lastSyncDate()
{
return KPilotSettings::lastSyncTime();
}
-static QDict<QString> *conduitNameMap = 0L;
+static TQDict<TQString> *conduitNameMap = 0L;
static void fillConduitNameMap()
{
if ( !conduitNameMap )
{
- conduitNameMap = new QDict<QString>;
+ conduitNameMap = new TQDict<TQString>;
conduitNameMap->setAutoDelete(true);
}
conduitNameMap->clear();
- QStringList l = KPilotSettings::installedConduits();
+ TQStringList l = KPilotSettings::installedConduits();
// Fill with internal settings.
if ( l.find( CSL1("internal_fileinstall") ) != l.end() ) {
conduitNameMap->insert( CSL1("internal_fileinstall"),
- new QString(i18n("File Installer")) );
+ new TQString(i18n("File Installer")) );
}
- QStringList::ConstIterator end = l.end();
- for (QStringList::ConstIterator i = l.begin(); i != end; ++i)
+ TQStringList::ConstIterator end = l.end();
+ for (TQStringList::ConstIterator i = l.begin(); i != end; ++i)
{
if (!conduitNameMap->find(*i))
{
- QString readableName = CSL1("<unknown>");
+ TQString readableName = CSL1("<unknown>");
KSharedPtr < KService > o = KService::serviceByDesktopName(*i);
if (!o)
{
@@ -751,28 +751,28 @@ static void fillConduitNameMap()
{
readableName = o->name();
}
- conduitNameMap->insert( *i, new QString(readableName) );
+ conduitNameMap->insert( *i, new TQString(readableName) );
}
}
}
-QStringList PilotDaemon::configuredConduitList()
+TQStringList PilotDaemon::configuredConduitList()
{
fillConduitNameMap();
- QStringList keys;
+ TQStringList keys;
- QDictIterator<QString> it(*conduitNameMap);
+ TQDictIterator<TQString> it(*conduitNameMap);
for ( ; *it; ++it)
{
keys << it.currentKey();
}
keys.sort();
- QStringList::ConstIterator end = keys.end();
- QStringList result;
- for (QStringList::ConstIterator i = keys.begin(); i != end; ++i)
+ TQStringList::ConstIterator end = keys.end();
+ TQStringList result;
+ for (TQStringList::ConstIterator i = keys.begin(); i != end; ++i)
{
result << *(conduitNameMap->find(*i));
}
@@ -780,16 +780,16 @@ QStringList PilotDaemon::configuredConduitList()
return result;
}
-QString PilotDaemon::logFileName()
+TQString PilotDaemon::logFileName()
{
return KPilotSettings::logFileName();
}
-QString PilotDaemon::userName()
+TQString PilotDaemon::userName()
{
return KPilotSettings::userName();
}
-QString PilotDaemon::pilotDevice()
+TQString PilotDaemon::pilotDevice()
{
return KPilotSettings::pilotDevice();
}
@@ -814,8 +814,8 @@ static KDesktopLockStatus isKDesktopLockRunning()
return DCOPError;
}
- QByteArray data,returnValue;
- QCString returnType;
+ TQByteArray data,returnValue;
+ TQCString returnType;
if (!dcopptr->call("kdesktop","KScreensaverIface","isBlanked()",
data,returnType,returnValue,true))
@@ -829,7 +829,7 @@ static KDesktopLockStatus isKDesktopLockRunning()
if (returnType == "bool")
{
bool b;
- QDataStream reply(returnValue,IO_ReadOnly);
+ TQDataStream reply(returnValue,IO_ReadOnly);
reply >> b;
return (b ? Locked : NotLocked);
}
@@ -918,7 +918,7 @@ static bool isSyncPossible(ActionQueue *fSyncStack,
static void queueInstaller(ActionQueue *fSyncStack,
KPilotLink *pilotLink,
FileInstaller *fInstaller,
- const QStringList &c)
+ const TQStringList &c)
{
if (c.findIndex(CSL1("internal_fileinstall")) >= 0)
{
@@ -935,13 +935,13 @@ static void queueEditors(ActionQueue *fSyncStack, KPilotLink *pilotLink)
}
static void queueConduits(ActionQueue *fSyncStack,
- const QStringList &conduits,
+ const TQStringList &conduits,
SyncAction::SyncMode e)
{
if (conduits.count() > 0)
{
fSyncStack->queueConduits(conduits,e);
- // QString s = i18n("Conduit flags: ");
+ // TQString s = i18n("Conduit flags: ");
// s.append(ConduitProxy::flagsForMode(e).join(CSL1(" ")));
// logMessage(s);
}
@@ -992,8 +992,8 @@ bool PilotDaemon::shouldBackup()
FUNCTIONSETUP;
bool pcchanged=false; // If last PC to sync was a different one (implies full sync, normally)
- QStringList conduits ; // list of conduits to run
- QString s; // a generic string for stuff
+ TQStringList conduits ; // list of conduits to run
+ TQString s; // a generic string for stuff
#ifdef DEBUG
DEBUGKPILOT << fname
@@ -1107,23 +1107,23 @@ bool PilotDaemon::shouldBackup()
launch:
fSyncStack->queueCleanup();
- QObject::connect(fSyncStack, SIGNAL(logError(const QString &)),
- this, SLOT(logError(const QString &)));
- QObject::connect(fSyncStack, SIGNAL(logMessage(const QString &)),
- this, SLOT(logMessage(const QString &)));
- QObject::connect(fSyncStack,
- SIGNAL(logProgress(const QString &,int)),
- this, SLOT(logProgress(const QString &,int)));
+ TQObject::connect(fSyncStack, TQT_SIGNAL(logError(const TQString &)),
+ this, TQT_SLOT(logError(const TQString &)));
+ TQObject::connect(fSyncStack, TQT_SIGNAL(logMessage(const TQString &)),
+ this, TQT_SLOT(logMessage(const TQString &)));
+ TQObject::connect(fSyncStack,
+ TQT_SIGNAL(logProgress(const TQString &,int)),
+ this, TQT_SLOT(logProgress(const TQString &,int)));
- QObject::connect(fSyncStack, SIGNAL(syncDone(SyncAction *)),
- this, SLOT(endHotSync()));
+ TQObject::connect(fSyncStack, TQT_SIGNAL(syncDone(SyncAction *)),
+ this, TQT_SLOT(endHotSync()));
- QTimer::singleShot(0,fSyncStack,SLOT(execConduit()));
+ TQTimer::singleShot(0,fSyncStack,TQT_SLOT(execConduit()));
updateTrayStatus();
}
-/* slot */ void PilotDaemon::logMessage(const QString & s)
+/* slot */ void PilotDaemon::logMessage(const TQString & s)
{
FUNCTIONSETUPL(2);
@@ -1132,7 +1132,7 @@ launch:
updateTrayStatus(s);
}
-/* slot */ void PilotDaemon::logError(const QString & s)
+/* slot */ void PilotDaemon::logError(const TQString & s)
{
FUNCTIONSETUP;
@@ -1141,7 +1141,7 @@ launch:
updateTrayStatus(s);
}
-/* slot */ void PilotDaemon::logProgress(const QString & s, int i)
+/* slot */ void PilotDaemon::logProgress(const TQString & s, int i)
{
FUNCTIONSETUPL(2);
@@ -1167,7 +1167,7 @@ launch:
getLogger().logEndSync();
getFileLogger().logEndSync();
getKPilot().daemonStatus(KPilotDCOP::EndOfHotSync);
- KPilotSettings::setLastSyncTime(QDateTime::currentDateTime());
+ KPilotSettings::setLastSyncTime(TQDateTime::currentDateTime());
KPilotSettings::self()->writeConfig();
fDaemonStatus = HOTSYNC_END;
@@ -1183,7 +1183,7 @@ launch:
}
else
{
- QTimer::singleShot(10000,fPilotLink,SLOT(reset()));
+ TQTimer::singleShot(10000,fPilotLink,TQT_SLOT(reset()));
}
fPostSyncAction = None;
@@ -1204,12 +1204,12 @@ void PilotDaemon::slotRunKPilot()
{
FUNCTIONSETUP;
- QString kpilotError;
- QCString kpilotDCOP;
+ TQString kpilotError;
+ TQCString kpilotDCOP;
int kpilotPID;
if (KApplication::startServiceByDesktopName(CSL1("kpilot"),
- QString::null, &kpilotError, &kpilotDCOP, &kpilotPID
+ TQString::null, &kpilotError, &kpilotDCOP, &kpilotPID
#if (KDE_VERSION >= 220)
// Startup notification added in 2.2
, ""
@@ -1251,8 +1251,8 @@ void PilotDaemon::slotRunConfig()
if ( client->isApplicationRegistered( "kpilot" ) )
{
- client->send("kpilot", "kpilot-mainwindow#1", "raise()",QString::null);
- client->send("kpilot", "KPilotIface", "configure()", QString::null);
+ client->send("kpilot", "kpilot-mainwindow#1", "raise()",TQString::null);
+ client->send("kpilot", "KPilotIface", "configure()", TQString::null);
}
else
{
@@ -1264,23 +1264,23 @@ void PilotDaemon::slotRunConfig()
}
}
-void PilotDaemon::updateTrayStatus(const QString &s)
+void PilotDaemon::updateTrayStatus(const TQString &s)
{
if (!fTray) return;
- QString tipText = CSL1("<qt>");
+ TQString tipText = CSL1("<qt>");
tipText.append( s );
tipText.append( CSL1(" ") );
tipText.append( i18n("Next sync is %1.")
.arg( fNextSyncType.name() ) );
tipText.append( CSL1("</qt>") );
- QToolTip::remove(fTray);
- QToolTip::add(fTray,tipText);
- emitDCOPSignal( "kpilotDaemonStatusChanged()", QByteArray() );
+ TQToolTip::remove(fTray);
+ TQToolTip::add(fTray,tipText);
+ emitDCOPSignal( "kpilotDaemonStatusChanged()", TQByteArray() );
// emit the same dcop signal but including the information needed by Kontact to update its kpilot summary widget
- QByteArray data;
- QDataStream arg(data, IO_WriteOnly);
+ TQByteArray data;
+ TQDataStream arg(data, IO_WriteOnly);
arg << lastSyncDate();
arg << shortStatusString();
arg << configuredConduitList();
@@ -1288,7 +1288,7 @@ void PilotDaemon::updateTrayStatus(const QString &s)
arg << userName();
arg << pilotDevice();
arg << killDaemonOnExit();
- emitDCOPSignal( "kpilotDaemonStatusDetails(QDateTime,QString,QStringList,QString,QString,QString,bool)", data );
+ emitDCOPSignal( "kpilotDaemonStatusDetails(TQDateTime,TQString,TQStringList,TQString,TQString,TQString,bool)", data );
}
static KCmdLineOptions daemonoptions[] = {
@@ -1342,12 +1342,12 @@ int main(int argc, char **argv)
// tell the running kpilotDaemon to use
// this device now
DCOPClient d;
- QString dev(p->getOption("device"));
- QByteArray data;
- QDataStream arg(data, IO_WriteOnly);
+ TQString dev(p->getOption("device"));
+ TQByteArray data;
+ TQDataStream arg(data, IO_WriteOnly);
arg << dev;
if (d.attach()){
- d.send("kpilotDaemon", "KPilotDaemonIface", "setTempDevice(QString)", data );
+ d.send("kpilotDaemon", "KPilotDaemonIface", "setTempDevice(TQString)", data );
d.detach();
}
}
diff --git a/kpilot/kpilot/pilotDaemon.h b/kpilot/kpilot/pilotDaemon.h
index c7ccd7eda..d50fa04cf 100644
--- a/kpilot/kpilot/pilotDaemon.h
+++ b/kpilot/kpilot/pilotDaemon.h
@@ -65,8 +65,8 @@ public:
void enableRunKPilot(bool);
- virtual void dragEnterEvent(QDragEnterEvent *);
- virtual void dropEvent(QDropEvent *);
+ virtual void dragEnterEvent(TQDragEnterEvent *);
+ virtual void dropEvent(TQDropEvent *);
protected:
@@ -74,7 +74,7 @@ protected:
/**
* Menu of sync types.
*/
- QPopupMenu *fSyncTypeMenu;
+ TQPopupMenu *fSyncTypeMenu;
protected slots:
void slotShowAbout();
@@ -86,15 +86,15 @@ protected slots:
// "Regular" QT actions
//
//
- virtual void mousePressEvent(QMouseEvent* e);
- virtual void closeEvent(QCloseEvent *e);
+ virtual void mousePressEvent(TQMouseEvent* e);
+ virtual void closeEvent(TQCloseEvent *e);
protected:
void startHotSync();
void endHotSync();
private:
- QPixmap icons[((int) NotListening) + 1];
+ TQPixmap icons[((int) NotListening) + 1];
IconShape fCurrentIcon;
PilotDaemon *daemon;
@@ -120,11 +120,11 @@ private:
/**
* Timer for blinking.
*/
- QTimer *fBlinkTimer;
+ TQTimer *fBlinkTimer;
} ;
-class PilotDaemon : public QObject, virtual public PilotDaemonDCOP
+class PilotDaemon : public TQObject, virtual public PilotDaemonDCOP
{
Q_OBJECT
@@ -148,8 +148,8 @@ public:
};
DaemonStatus status() const { return fDaemonStatus; } ;
- /* DCOP */ virtual QString statusString();
- /* DCOP */ virtual QString shortStatusString();
+ /* DCOP */ virtual TQString statusString();
+ /* DCOP */ virtual TQString shortStatusString();
/**
* Display the daemon's system tray icon
@@ -157,7 +157,7 @@ public:
* setting in the config file)
*/
void showTray();
- virtual void addInstallFiles(const QStringList &);
+ virtual void addInstallFiles(const TQStringList &);
// The next few functions are the DCOP interface.
// Some are also slots.
@@ -165,14 +165,14 @@ public:
public slots:
virtual ASYNC requestSync(int);
public:
- virtual ASYNC requestSyncType(QString);
+ virtual ASYNC requestSyncType(TQString);
virtual ASYNC requestRegularSyncNext();
virtual int nextSyncType() const;
virtual ASYNC requestSyncOptions(bool,bool);
virtual ASYNC quitNow();
virtual ASYNC reloadSettings();
- virtual ASYNC setTempDevice(QString d);
+ virtual ASYNC setTempDevice(TQString d);
virtual void stopListening();
virtual void startListening();
@@ -180,11 +180,11 @@ public:
/**
* Functions reporting same status data, e.g. for the kontact plugin.
*/
- virtual QDateTime lastSyncDate();
- virtual QStringList configuredConduitList();
- virtual QString logFileName();
- virtual QString userName();
- virtual QString pilotDevice();
+ virtual TQDateTime lastSyncDate();
+ virtual TQStringList configuredConduitList();
+ virtual TQString logFileName();
+ virtual TQString userName();
+ virtual TQString pilotDevice();
virtual bool killDaemonOnExit();
protected:
@@ -201,9 +201,9 @@ protected slots:
void startHotSync( KPilotLink* lnk );
void endHotSync();
- void logMessage(const QString &);
- void logError(const QString &);
- void logProgress(const QString &,int);
+ void logMessage(const TQString &);
+ void logError(const TQString &);
+ void logProgress(const TQString &,int);
private:
int getPilotSpeed();
@@ -234,7 +234,7 @@ private:
/**
* Set or change the tooltip displayed by the tray icon.
*/
- void updateTrayStatus(const QString &s=QString::null);
+ void updateTrayStatus(const TQString &s=TQString::null);
FileInstaller *fInstaller;
@@ -272,7 +272,7 @@ private:
LoggerDCOP_stub *fLogStub;
LoggerDCOP_stub *fLogFileStub;
KPilotDCOP_stub *fKPilotStub;
- QString fTempDevice;
+ TQString fTempDevice;
};
diff --git a/kpilot/kpilot/pilotDaemonDCOP.h b/kpilot/kpilot/pilotDaemonDCOP.h
index 07f92bf63..b56a245b9 100644
--- a/kpilot/kpilot/pilotDaemonDCOP.h
+++ b/kpilot/kpilot/pilotDaemonDCOP.h
@@ -33,8 +33,8 @@
#include <dcopobject.h>
-#include <qdatetime.h>
-#include <qstringlist.h>
+#include <tqdatetime.h>
+#include <tqstringlist.h>
class PilotDaemonDCOP : virtual public DCOPObject
{
@@ -53,7 +53,7 @@ k_dcop:
* Request a particular kind of sync next; pass in the name
* of a sync type instead.
*/
- virtual ASYNC requestSyncType(QString) = 0;
+ virtual ASYNC requestSyncType(TQString) = 0;
/** Shortcut for using requestSync(1) */
virtual ASYNC requestRegularSyncNext() = 0;
/** Query what type is set most recently. */
@@ -67,7 +67,7 @@ k_dcop:
*/
virtual ASYNC quitNow() = 0;
virtual ASYNC reloadSettings() = 0; // Indicate changed config file.
- virtual ASYNC setTempDevice(QString d) =0; // use this device
+ virtual ASYNC setTempDevice(TQString d) =0; // use this device
virtual void stopListening() = 0;
virtual void startListening() = 0;
virtual bool isListening() =0 ;
@@ -75,29 +75,29 @@ k_dcop:
/**
* Functions requesting the status of the daemon.
*/
- virtual QString statusString() = 0;
- virtual QString shortStatusString() = 0;
+ virtual TQString statusString() = 0;
+ virtual TQString shortStatusString() = 0;
/**
* Functions reporting same status data, e.g. for the kontact plugin.
*/
- virtual QDateTime lastSyncDate() = 0;
- virtual QStringList configuredConduitList() = 0;
- virtual QString logFileName() = 0;
- virtual QString userName() = 0;
- virtual QString pilotDevice() = 0;
+ virtual TQDateTime lastSyncDate() = 0;
+ virtual TQStringList configuredConduitList() = 0;
+ virtual TQString logFileName() = 0;
+ virtual TQString userName() = 0;
+ virtual TQString pilotDevice() = 0;
virtual bool killDaemonOnExit() = 0;
/**
* Some other useful functionality
*/
- virtual void addInstallFiles(const QStringList &) = 0;
+ virtual void addInstallFiles(const TQStringList &) = 0;
k_dcop_signals:
void kpilotDaemonStatusChanged();
// used to push status information
- void kpilotDaemonStatusDetails( QDateTime, QString, QStringList, QString, QString, QString, bool );
+ void kpilotDaemonStatusDetails( TQDateTime, TQString, TQStringList, TQString, TQString, TQString, bool );
} ;
#endif
diff --git a/kpilot/kpilot/syncCalendar.cc b/kpilot/kpilot/syncCalendar.cc
index 7587ddebc..802ee354b 100644
--- a/kpilot/kpilot/syncCalendar.cc
+++ b/kpilot/kpilot/syncCalendar.cc
@@ -43,7 +43,7 @@ public:
CalendarDumper() {}
KCal::CalendarLocal *retrieve(int fd);
- KCal::CalendarLocal *retrieve(const QString &filename);
+ KCal::CalendarLocal *retrieve(const TQString &filename);
protected:
KCal::CalendarLocal *retrieve(DatebookDB *db);
@@ -58,7 +58,7 @@ KCal::CalendarLocal *CalendarDumper::retrieve(int fd)
return retrieve(db);
}
-KCal::CalendarLocal *CalendarDumped::retrieve(const QString &fn)
+KCal::CalendarLocal *CalendarDumped::retrieve(const TQString &fn)
{
PilotLocalDatabase ldb( fn );
DatebookDB db(&ldb);
@@ -67,7 +67,7 @@ KCal::CalendarLocal *CalendarDumped::retrieve(const QString &fn)
KCal::CalendarLocal *retrieve(DatebookDB *db)
{
- KCal::CalendarLocal *cal = new CalendarLocal( QString::null );
+ KCal::CalendarLocal *cal = new CalendarLocal( TQString::null );
int count = db->db()->recordCount();
diff --git a/kpilot/kpilot/todoEditor.cc b/kpilot/kpilot/todoEditor.cc
index 34a3b65df..d7017bb9a 100644
--- a/kpilot/kpilot/todoEditor.cc
+++ b/kpilot/kpilot/todoEditor.cc
@@ -31,11 +31,11 @@
#include "options.h"
-#include <qcombobox.h>
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qtextedit.h>
-#include <qcheckbox.h>
+#include <tqcombobox.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqtextedit.h>
+#include <tqcheckbox.h>
#include <kdatewidget.h>
@@ -45,7 +45,7 @@
TodoEditor::TodoEditor(PilotTodoEntry * p, struct ToDoAppInfo *appInfo,
- QWidget * parent, const char *name) :
+ TQWidget * parent, const char *name) :
KDialogBase(parent, name, false, i18n("To-do Editor"), Ok|Cancel),
fDeleteOnCancel(p == 0L),
fTodo(p),
@@ -57,8 +57,8 @@ TodoEditor::TodoEditor(PilotTodoEntry * p, struct ToDoAppInfo *appInfo,
setMainWidget(fWidget);
fillFields();
- connect(parent, SIGNAL(recordChanged(PilotTodoEntry *)),
- this, SLOT(updateRecord(PilotTodoEntry *)));
+ connect(parent, TQT_SIGNAL(recordChanged(PilotTodoEntry *)),
+ this, TQT_SLOT(updateRecord(PilotTodoEntry *)));
}
diff --git a/kpilot/kpilot/todoEditor.h b/kpilot/kpilot/todoEditor.h
index d982e3f54..4036ac9b1 100644
--- a/kpilot/kpilot/todoEditor.h
+++ b/kpilot/kpilot/todoEditor.h
@@ -49,7 +49,7 @@ class TodoEditor : public KDialogBase
public:
TodoEditor(PilotTodoEntry *todo,
struct ToDoAppInfo *appInfo,
- QWidget *parent, const char *name=0L);
+ TQWidget *parent, const char *name=0L);
~TodoEditor();
diff --git a/kpilot/kpilot/todoWidget.cc b/kpilot/kpilot/todoWidget.cc
index 7f2ec137d..4e0e93944 100644
--- a/kpilot/kpilot/todoWidget.cc
+++ b/kpilot/kpilot/todoWidget.cc
@@ -29,15 +29,15 @@
#include "options.h"
-#include <qptrlist.h>
+#include <tqptrlist.h>
#include <klistview.h>
-#include <qpushbutton.h>
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qtextview.h>
-#include <qcombobox.h>
-#include <qwhatsthis.h>
-#include <qtextcodec.h>
+#include <tqpushbutton.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqtextview.h>
+#include <tqcombobox.h>
+#include <tqwhatsthis.h>
+#include <tqtextcodec.h>
#include <kmessagebox.h>
@@ -49,7 +49,7 @@
-TodoCheckListItem::TodoCheckListItem(QListView*parent, const QString&text,
+TodoCheckListItem::TodoCheckListItem(TQListView*parent, const TQString&text,
recordid_t pilotid, void*r):PilotCheckListItem(parent, text, pilotid, r)
{
@@ -63,8 +63,8 @@ void TodoCheckListItem::stateChange(bool state)
-TodoWidget::TodoWidget(QWidget * parent,
- const QString & path) :
+TodoWidget::TodoWidget(TQWidget * parent,
+ const TQString & path) :
PilotComponent(parent, "component_todo", path),
fTodoInfo(0L),
fTodoAppInfo(0L),
@@ -157,7 +157,7 @@ void TodoWidget::showComponent()
updateWidget();
}
-/* virtual */ bool TodoWidget::preHotSync(QString &s)
+/* virtual */ bool TodoWidget::preHotSync(TQString &s)
{
FUNCTIONSETUP;
@@ -172,7 +172,7 @@ void TodoWidget::showComponent()
#if KDE_VERSION<220
s = i18n("There are still %1 to-do editing windows open.")
- .arg(QString::number(fPendingTodos));
+ .arg(TQString::number(fPendingTodos));
#else
s = i18n("There is still a to-do editing window open.",
"There are still %n to-do editing windows open.",
@@ -207,17 +207,17 @@ void TodoWidget::setupWidget()
{
FUNCTIONSETUP;
- QLabel *label;
- QGridLayout *grid = new QGridLayout(this, 6, 4, SPACING);
+ TQLabel *label;
+ TQGridLayout *grid = new TQGridLayout(this, 6, 4, SPACING);
- fCatList = new QComboBox(this);
+ fCatList = new TQComboBox(this);
grid->addWidget(fCatList, 0, 1);
- connect(fCatList, SIGNAL(activated(int)),
- this, SLOT(slotSetCategory(int)));
- QWhatsThis::add(fCatList,
+ connect(fCatList, TQT_SIGNAL(activated(int)),
+ this, TQT_SLOT(slotSetCategory(int)));
+ TQWhatsThis::add(fCatList,
i18n("<qt>Select the category of to-dos to display here.</qt>"));
- label = new QLabel(i18n("Category:"), this);
+ label = new TQLabel(i18n("Category:"), this);
label->setBuddy(fCatList);
grid->addWidget(label, 0, 0);
@@ -229,57 +229,57 @@ void TodoWidget::setupWidget()
fListBox->setItemsMovable( FALSE );
fListBox->setItemsRenameable (TRUE);
grid->addMultiCellWidget(fListBox, 1, 1, 0, 1);
- connect(fListBox, SIGNAL(selectionChanged(QListViewItem*)),
- this, SLOT(slotShowTodo(QListViewItem*)));
- connect(fListBox, SIGNAL(doubleClicked(QListViewItem*)),
- this, SLOT(slotEditRecord(QListViewItem*)));
- connect(fListBox, SIGNAL(returnPressed(QListViewItem*)),
- this, SLOT(slotEditRecord(QListViewItem*)));
- connect(fListBox, SIGNAL(itemChecked(QCheckListItem*, bool)),
- this, SLOT(slotItemChecked(QCheckListItem*, bool)));
- connect(fListBox, SIGNAL(itemRenamed(QListViewItem*, const QString &, int)),
- this, SLOT(slotItemRenamed(QListViewItem*, const QString &, int)));
- QWhatsThis::add(fListBox,
+ connect(fListBox, TQT_SIGNAL(selectionChanged(TQListViewItem*)),
+ this, TQT_SLOT(slotShowTodo(TQListViewItem*)));
+ connect(fListBox, TQT_SIGNAL(doubleClicked(TQListViewItem*)),
+ this, TQT_SLOT(slotEditRecord(TQListViewItem*)));
+ connect(fListBox, TQT_SIGNAL(returnPressed(TQListViewItem*)),
+ this, TQT_SLOT(slotEditRecord(TQListViewItem*)));
+ connect(fListBox, TQT_SIGNAL(itemChecked(TQCheckListItem*, bool)),
+ this, TQT_SLOT(slotItemChecked(TQCheckListItem*, bool)));
+ connect(fListBox, TQT_SIGNAL(itemRenamed(TQListViewItem*, const TQString &, int)),
+ this, TQT_SLOT(slotItemRenamed(TQListViewItem*, const TQString &, int)));
+ TQWhatsThis::add(fListBox,
i18n("<qt>This list displays all the to-dos "
"in the selected category. Click on "
"one to display it to the right.</qt>"));
- label = new QLabel(i18n("To-do info:"), this);
+ label = new TQLabel(i18n("To-do info:"), this);
grid->addWidget(label, 0, 2);
// todo info text view
- fTodoInfo = new QTextView(this);
+ fTodoInfo = new TQTextView(this);
grid->addMultiCellWidget(fTodoInfo, 1, 4, 2, 2);
- QPushButton *button;
- QString wt;
+ TQPushButton *button;
+ TQString wt;
- fEditButton = new QPushButton(i18n("Edit Record..."), this);
+ fEditButton = new TQPushButton(i18n("Edit Record..."), this);
grid->addWidget(fEditButton, 2, 0);
- connect(fEditButton, SIGNAL(clicked()), this, SLOT(slotEditRecord()));
+ connect(fEditButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotEditRecord()));
wt = KPilotSettings::internalEditors() ?
i18n("<qt>You can edit a to-do when it is selected.</qt>") :
i18n("<qt><i>Editing is disabled by the 'internal editors' setting.</i></qt>");
- QWhatsThis::add(fEditButton,wt);
+ TQWhatsThis::add(fEditButton,wt);
- button = new QPushButton(i18n("New Record..."), this);
+ button = new TQPushButton(i18n("New Record..."), this);
grid->addWidget(button, 2, 1);
- connect(button, SIGNAL(clicked()), this, SLOT(slotCreateNewRecord()));
+ connect(button, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotCreateNewRecord()));
wt = KPilotSettings::internalEditors() ?
i18n("<qt>Add a new to-do to the to-do list.</qt>") :
i18n("<qt><i>Adding new to-dos is disabled by the 'internal editors' setting.</i></qt>");
- QWhatsThis::add(button, wt);
+ TQWhatsThis::add(button, wt);
button->setEnabled(KPilotSettings::internalEditors());
- fDeleteButton = new QPushButton(i18n("Delete Record"), this);
+ fDeleteButton = new TQPushButton(i18n("Delete Record"), this);
grid->addWidget(fDeleteButton, 3, 0);
- connect(fDeleteButton, SIGNAL(clicked()),
- this, SLOT(slotDeleteRecord()));
+ connect(fDeleteButton, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotDeleteRecord()));
wt = KPilotSettings::internalEditors() ?
i18n("<qt>Delete the selected to-do from the to-do list.</qt>") :
i18n("<qt><i>Deleting is disabled by the 'internal editors' setting.</i></qt>") ;
- QWhatsThis::add(fDeleteButton,wt);
+ TQWhatsThis::add(fDeleteButton,wt);
}
void TodoWidget::updateWidget()
@@ -306,7 +306,7 @@ void TodoWidget::updateWidget()
if ((currentCatID == -1) ||
(todo->category() == currentCatID))
{
- QString title = todo->getDescription();
+ TQString title = todo->getDescription();
TodoCheckListItem*item=new TodoCheckListItem(fListBox, title,
listIndex, todo);
@@ -348,7 +348,7 @@ void TodoWidget::slotEditRecord()
{
slotEditRecord(fListBox->currentItem());
}
-void TodoWidget::slotEditRecord(QListViewItem*item)
+void TodoWidget::slotEditRecord(TQListViewItem*item)
{
FUNCTIONSETUP;
if (!shown) return;
@@ -369,10 +369,10 @@ void TodoWidget::slotEditRecord(QListViewItem*item)
TodoEditor *editor = new TodoEditor(selectedRecord,
fTodoAppInfo->info(), this);
- connect(editor, SIGNAL(recordChangeComplete(PilotTodoEntry *)),
- this, SLOT(slotUpdateRecord(PilotTodoEntry *)));
- connect(editor, SIGNAL(cancelClicked()),
- this, SLOT(slotEditCancelled()));
+ connect(editor, TQT_SIGNAL(recordChangeComplete(PilotTodoEntry *)),
+ this, TQT_SLOT(slotUpdateRecord(PilotTodoEntry *)));
+ connect(editor, TQT_SIGNAL(cancelClicked()),
+ this, TQT_SLOT(slotEditCancelled()));
editor->show();
fPendingTodos++;
@@ -419,10 +419,10 @@ void TodoWidget::slotCreateNewRecord()
TodoEditor *editor = new TodoEditor(0L,
fTodoAppInfo->info(), this);
- connect(editor, SIGNAL(recordChangeComplete(PilotTodoEntry *)),
- this, SLOT(slotAddRecord(PilotTodoEntry *)));
- connect(editor, SIGNAL(cancelClicked()),
- this, SLOT(slotEditCancelled()));
+ connect(editor, TQT_SIGNAL(recordChangeComplete(PilotTodoEntry *)),
+ this, TQT_SLOT(slotAddRecord(PilotTodoEntry *)));
+ connect(editor, TQT_SIGNAL(cancelClicked()),
+ this, TQT_SLOT(slotEditCancelled()));
editor->show();
fPendingTodos++;
@@ -512,7 +512,7 @@ void TodoWidget::slotDeleteRecord()
-void TodoWidget::slotShowTodo(QListViewItem*item)
+void TodoWidget::slotShowTodo(TQListViewItem*item)
{
FUNCTIONSETUP;
if (!shown) return;
@@ -525,7 +525,7 @@ void TodoWidget::slotShowTodo(QListViewItem*item)
DEBUGKPILOT << fname << ": Showing "<< todo->getDescription()<<endl;
#endif
- QString text(CSL1("<qt>"));
+ TQString text(CSL1("<qt>"));
text += todo->getTextRepresentation(Qt::RichText);
text += CSL1("</qt>\n");
fTodoInfo->setText(text);
@@ -584,7 +584,7 @@ void TodoWidget::writeTodo(PilotTodoEntry * which,
}
}
-void TodoWidget::slotItemChecked(QCheckListItem*item, bool on)
+void TodoWidget::slotItemChecked(TQCheckListItem*item, bool on)
{
TodoCheckListItem*p = static_cast<TodoCheckListItem*>(item);
if (!p) return;
@@ -594,7 +594,7 @@ void TodoWidget::slotItemChecked(QCheckListItem*item, bool on)
slotShowTodo(item);
}
-void TodoWidget::slotItemRenamed(QListViewItem*item, const QString &txt, int nr)
+void TodoWidget::slotItemRenamed(TQListViewItem*item, const TQString &txt, int nr)
{
TodoCheckListItem*p = static_cast<TodoCheckListItem*>(item);
if (!p) return;
diff --git a/kpilot/kpilot/todoWidget.h b/kpilot/kpilot/todoWidget.h
index 14a139e51..18ea1f6d2 100644
--- a/kpilot/kpilot/todoWidget.h
+++ b/kpilot/kpilot/todoWidget.h
@@ -42,14 +42,14 @@ class TodoListView : public KListView
{
Q_OBJECT
public:
- TodoListView(QWidget * parent = 0, const char * name = 0 ):KListView(parent, name){};
+ TodoListView(TQWidget * parent = 0, const char * name = 0 ):KListView(parent, name){};
~TodoListView() {};
signals:
- void itemChecked(QCheckListItem*item);
- void itemChecked(QCheckListItem*item, bool on);
+ void itemChecked(TQCheckListItem*item);
+ void itemChecked(TQCheckListItem*item, bool on);
//protected:
public:
- void itemWasChecked(QCheckListItem*item, bool on) {
+ void itemWasChecked(TQCheckListItem*item, bool on) {
emit itemChecked(item);
emit itemChecked(item, on);
}
@@ -58,7 +58,7 @@ public:
class TodoCheckListItem : public PilotCheckListItem
{
public:
- TodoCheckListItem(QListView*parent, const QString&text, recordid_t pilotid, void*r);
+ TodoCheckListItem(TQListView*parent, const TQString&text, recordid_t pilotid, void*r);
~TodoCheckListItem() {};
virtual void stateChange(bool state);
};
@@ -68,11 +68,11 @@ class TodoWidget : public PilotComponent
Q_OBJECT
public:
- TodoWidget(QWidget* parent,const QString& dbpath);
+ TodoWidget(TQWidget* parent,const TQString& dbpath);
~TodoWidget();
// Pilot Component Methods:
- virtual bool preHotSync(QString &);
+ virtual bool preHotSync(TQString &);
virtual void postHotSync();
virtual void showComponent();
virtual void hideComponent();
@@ -82,8 +82,8 @@ public slots:
* Called when a particular todo is selected. This slot displays
* it in the viewer widget.
*/
- void slotShowTodo(QListViewItem*);
- void slotEditRecord(QListViewItem*item);
+ void slotShowTodo(TQListViewItem*);
+ void slotEditRecord(TQListViewItem*item);
void slotEditRecord();
void slotCreateNewRecord();
void slotDeleteRecord();
@@ -113,8 +113,8 @@ protected slots:
void slotSetCategory(int);
- void slotItemChecked(QCheckListItem*item, bool on);
- void slotItemRenamed(QListViewItem*item, const QString &txt, int nr);
+ void slotItemChecked(TQCheckListItem*item, bool on);
+ void slotItemRenamed(TQListViewItem*item, const TQString &txt, int nr);
private:
void setupWidget();
void updateWidget(); // Called with the lists have changed..
@@ -132,13 +132,13 @@ private:
* Create a sensible "title" for an todo, composed
* of first + last name if possible.
*/
- QString createTitle(PilotTodoEntry *,int displayMode);
+ TQString createTitle(PilotTodoEntry *,int displayMode);
/**
- * We use a QComboBox fCatList to hold the user-visible names
- * of all the categories. The QTextView fTodoInfo is for
+ * We use a TQComboBox fCatList to hold the user-visible names
+ * of all the categories. The TQTextView fTodoInfo is for
* displaying the currently selected todo, if any.
- * The QListView fListBox lists all the todoes in the
+ * The TQListView fListBox lists all the todoes in the
* currently selected category.
*
* The entire todo database is read into memory in the
@@ -151,7 +151,7 @@ private:
QComboBox *fCatList;
QTextView *fTodoInfo;
PilotToDoInfo *fTodoAppInfo;
- QPtrList<PilotTodoEntry> fTodoList;
+ TQPtrList<PilotTodoEntry> fTodoList;
TodoListView *fListBox;
QPushButton *fEditButton,*fDeleteButton;
PilotDatabase *fTodoDB;
diff --git a/kpilot/lib/actionQueue.cc b/kpilot/lib/actionQueue.cc
index e4770d369..693629731 100644
--- a/kpilot/lib/actionQueue.cc
+++ b/kpilot/lib/actionQueue.cc
@@ -29,7 +29,7 @@
*/
#include "options.h"
-#include <qtimer.h>
+#include <tqtimer.h>
#include "actions.h"
#include "plugin.h"
@@ -70,7 +70,7 @@ void ActionQueue::queueInit()
addAction(new WelcomeAction(fHandle));
}
-void ActionQueue::queueConduits(const QStringList &l,
+void ActionQueue::queueConduits(const TQStringList &l,
const SyncAction::SyncMode &m)
{
FUNCTIONSETUP;
@@ -78,7 +78,7 @@ void ActionQueue::queueConduits(const QStringList &l,
// Add conduits here ...
//
//
- for (QStringList::ConstIterator it = l.begin();
+ for (TQStringList::ConstIterator it = l.begin();
it != l.end();
++it)
{
@@ -156,17 +156,17 @@ void ActionQueue::actionCompleted(SyncAction *b)
<< endl;
#endif
- QObject::connect(a, SIGNAL(logMessage(const QString &)),
- this, SIGNAL(logMessage(const QString &)));
- QObject::connect(a, SIGNAL(logError(const QString &)),
- this, SIGNAL(logMessage(const QString &)));
- QObject::connect(a, SIGNAL(logProgress(const QString &, int)),
- this, SIGNAL(logProgress(const QString &, int)));
- QObject::connect(a, SIGNAL(syncDone(SyncAction *)),
- this, SLOT(actionCompleted(SyncAction *)));
+ TQObject::connect(a, TQT_SIGNAL(logMessage(const TQString &)),
+ this, TQT_SIGNAL(logMessage(const TQString &)));
+ TQObject::connect(a, TQT_SIGNAL(logError(const TQString &)),
+ this, TQT_SIGNAL(logMessage(const TQString &)));
+ TQObject::connect(a, TQT_SIGNAL(logProgress(const TQString &, int)),
+ this, TQT_SIGNAL(logProgress(const TQString &, int)));
+ TQObject::connect(a, TQT_SIGNAL(syncDone(SyncAction *)),
+ this, TQT_SLOT(actionCompleted(SyncAction *)));
// Run the action picked from the queue when we get back
// to the event loop.
- QTimer::singleShot(0,a,SLOT(execConduit()));
+ TQTimer::singleShot(0,a,TQT_SLOT(execConduit()));
}
diff --git a/kpilot/lib/actionQueue.h b/kpilot/lib/actionQueue.h
index bc8b11560..057b4beb0 100644
--- a/kpilot/lib/actionQueue.h
+++ b/kpilot/lib/actionQueue.h
@@ -28,7 +28,7 @@
** Bug reports and questions can be sent to kde-pim@kde.org
*/
-#include <qptrqueue.h>
+#include <tqptrqueue.h>
#include "syncAction.h"
@@ -116,7 +116,7 @@ public:
* ignored since those names are used by KPilot internally
* for administrative purposes.
*/
- void queueConduits(const QStringList &conduits,
+ void queueConduits(const TQStringList &conduits,
const SyncAction::SyncMode &mode);
/**
@@ -155,7 +155,7 @@ protected slots:
private:
/** A queue of actions to take. */
- QPtrQueue < SyncAction > SyncActionQueue;
+ TQPtrQueue < SyncAction > SyncActionQueue;
};
diff --git a/kpilot/lib/actions.cc b/kpilot/lib/actions.cc
index 6cd88273b..212540f7f 100644
--- a/kpilot/lib/actions.cc
+++ b/kpilot/lib/actions.cc
@@ -28,9 +28,9 @@
*/
#include "options.h"
-#include <qapplication.h>
-#include <qdir.h>
-#include <qfile.h>
+#include <tqapplication.h>
+#include <tqdir.h>
+#include <tqfile.h>
#include <ksavefile.h>
@@ -52,13 +52,13 @@ WelcomeAction::WelcomeAction(KPilotLink *p) :
FUNCTIONSETUP;
addSyncLogEntry(i18n("KPilot %1 HotSync starting...\n")
- .arg(QString::fromLatin1(KPILOT_VERSION)));
+ .arg(TQString::fromLatin1(KPILOT_VERSION)));
emit logMessage( i18n("Using encoding %1 on the handheld.").arg(Pilot::codecName()) );
emit syncDone(this);
return true;
}
-SorryAction::SorryAction(KPilotLink *p, const QString &s) :
+SorryAction::SorryAction(KPilotLink *p, const TQString &s) :
SyncAction(p,"sorryAction"),
fMessage(s)
{
diff --git a/kpilot/lib/actions.h b/kpilot/lib/actions.h
index ee353551f..2e3b9b20c 100644
--- a/kpilot/lib/actions.h
+++ b/kpilot/lib/actions.h
@@ -67,14 +67,14 @@ public:
* print that message (it must be i18n()ed already) instead of
* the standard message.
*/
- SorryAction(KPilotLink *device, const QString &s=QString::null);
+ SorryAction(KPilotLink *device, const TQString &s=TQString::null);
protected:
/** Reimplemented from SyncAction. */
virtual bool exec();
/** Message to print to the sync log. */
- QString fMessage;
+ TQString fMessage;
} ;
/**
diff --git a/kpilot/lib/idmapper.cc b/kpilot/lib/idmapper.cc
index 6e1031efe..f4fc38c5c 100644
--- a/kpilot/lib/idmapper.cc
+++ b/kpilot/lib/idmapper.cc
@@ -27,8 +27,8 @@
#include "idmapperxml.h"
#include "options.h"
-#include <qsqldatabase.h>
-#include <qfile.h>
+#include <tqsqldatabase.h>
+#include <tqfile.h>
#include <kglobal.h>
#include <kstandarddirs.h>
@@ -57,9 +57,9 @@ IDMapper::IDMapper()
fP = new IDMapperPrivate();
- QString dbPath = KGlobal::dirs()->
+ TQString dbPath = KGlobal::dirs()->
saveLocation("data", CSL1("kpilot/") );
- QString dbFile = dbPath + CSL1("mapping.xml");
+ TQString dbFile = dbPath + CSL1("mapping.xml");
if( !openDatasource( dbFile ) )
{
@@ -67,7 +67,7 @@ IDMapper::IDMapper()
}
}
-IDMapper::IDMapper( const QString &file)
+IDMapper::IDMapper( const TQString &file)
{
FUNCTIONSETUP;
@@ -84,7 +84,7 @@ IDMapper::~IDMapper()
KPILOT_DELETE(fP);
}
-bool IDMapper::openDatasource( const QString &file )
+bool IDMapper::openDatasource( const TQString &file )
{
FUNCTIONSETUP;
@@ -92,7 +92,7 @@ bool IDMapper::openDatasource( const QString &file )
return fP->fXmlSource->open();
}
-void IDMapper::registerPCObjectId( const QString &conduit, const QString &uid )
+void IDMapper::registerPCObjectId( const TQString &conduit, const TQString &uid )
{
FUNCTIONSETUP;
@@ -103,7 +103,7 @@ void IDMapper::registerPCObjectId( const QString &conduit, const QString &uid )
fP->fXmlSource->save();
}
-void IDMapper::registerHHObjectId( const QString &conduit, recordid_t pid )
+void IDMapper::registerHHObjectId( const TQString &conduit, recordid_t pid )
{
FUNCTIONSETUP;
@@ -114,13 +114,13 @@ void IDMapper::registerHHObjectId( const QString &conduit, recordid_t pid )
fP->fXmlSource->save();
}
-QValueList<QString> IDMapper::getPCObjectIds( const QString &conduit )
+TQValueList<TQString> IDMapper::getPCObjectIds( const TQString &conduit )
{
FUNCTIONSETUP;
- QValueList<IDMapping> &mappings = fP->fXmlSource->mappings();
- QValueList<IDMapping>::iterator it;
- QValueList<QString> uids;
+ TQValueList<IDMapping> &mappings = fP->fXmlSource->mappings();
+ TQValueList<IDMapping>::iterator it;
+ TQValueList<TQString> uids;
DEBUGKPILOT << fname << ": total " << mappings.count() << endl;
@@ -141,13 +141,13 @@ QValueList<QString> IDMapper::getPCObjectIds( const QString &conduit )
return uids;
}
-QValueList<recordid_t> IDMapper::getHHObjectIds( const QString &conduit )
+TQValueList<recordid_t> IDMapper::getHHObjectIds( const TQString &conduit )
{
FUNCTIONSETUP;
- QValueList<IDMapping> &mappings = fP->fXmlSource->mappings();
- QValueList<IDMapping>::iterator it;
- QValueList<recordid_t> pids;
+ TQValueList<IDMapping> &mappings = fP->fXmlSource->mappings();
+ TQValueList<IDMapping>::iterator it;
+ TQValueList<recordid_t> pids;
for ( it = mappings.begin(); it != mappings.end(); ++it )
{
@@ -164,12 +164,12 @@ QValueList<recordid_t> IDMapper::getHHObjectIds( const QString &conduit )
return pids;
}
-bool IDMapper::hasPCId( const QString &conduit, recordid_t pid )
+bool IDMapper::hasPCId( const TQString &conduit, recordid_t pid )
{
FUNCTIONSETUP;
- QValueList<IDMapping> &mappings = fP->fXmlSource->mappings();
- QValueList<IDMapping>::iterator it;
+ TQValueList<IDMapping> &mappings = fP->fXmlSource->mappings();
+ TQValueList<IDMapping>::iterator it;
for ( it = mappings.begin(); it != mappings.end(); ++it )
{
@@ -183,12 +183,12 @@ bool IDMapper::hasPCId( const QString &conduit, recordid_t pid )
return false;
}
-bool IDMapper::hasHHId( const QString &conduit, const QString &uid )
+bool IDMapper::hasHHId( const TQString &conduit, const TQString &uid )
{
FUNCTIONSETUP;
- QValueList<IDMapping> &mappings = fP->fXmlSource->mappings();
- QValueList<IDMapping>::iterator it;
+ TQValueList<IDMapping> &mappings = fP->fXmlSource->mappings();
+ TQValueList<IDMapping>::iterator it;
for ( it = mappings.begin(); it != mappings.end(); ++it )
{
@@ -202,15 +202,15 @@ bool IDMapper::hasHHId( const QString &conduit, const QString &uid )
return false;
}
-void IDMapper::setHHObjectId( const QString &conduit, const QString &uid
+void IDMapper::setHHObjectId( const TQString &conduit, const TQString &uid
, recordid_t pid )
{
FUNCTIONSETUP;
bool modified = false;
- QValueList<IDMapping> &mappings = fP->fXmlSource->mappings();
- QValueList<IDMapping>::iterator it;
+ TQValueList<IDMapping> &mappings = fP->fXmlSource->mappings();
+ TQValueList<IDMapping>::iterator it;
for ( it = mappings.begin(); it != mappings.end(); ++it )
{
@@ -224,15 +224,15 @@ void IDMapper::setHHObjectId( const QString &conduit, const QString &uid
}
}
-void IDMapper::setPCObjectId( const QString &conduit, recordid_t pid
- , const QString &uid )
+void IDMapper::setPCObjectId( const TQString &conduit, recordid_t pid
+ , const TQString &uid )
{
FUNCTIONSETUP;
bool modified = false;
- QValueList<IDMapping> &mappings = fP->fXmlSource->mappings();
- QValueList<IDMapping>::iterator it;
+ TQValueList<IDMapping> &mappings = fP->fXmlSource->mappings();
+ TQValueList<IDMapping>::iterator it;
for ( it = mappings.begin(); it != mappings.end(); ++it )
{
diff --git a/kpilot/lib/idmapper.h b/kpilot/lib/idmapper.h
index 0364dbc93..b2ff0efe5 100644
--- a/kpilot/lib/idmapper.h
+++ b/kpilot/lib/idmapper.h
@@ -25,9 +25,9 @@
** Bug reports and questions can be sent to kde-pim@kde.org
*/
-#include <qstring.h>
-#include <qdatetime.h>
-#include <qvaluelist.h>
+#include <tqstring.h>
+#include <tqdatetime.h>
+#include <tqvaluelist.h>
#include "pi-macros.h"
@@ -51,85 +51,85 @@ public:
/**
* Creates a new IDMapper with file as datasource.
*/
- IDMapper( const QString &file );
+ IDMapper( const TQString &file );
~IDMapper();
/**
* Adds an uid for PC objects to the database.
*/
- void registerPCObjectId( const QString &conduit, const QString &uid );
+ void registerPCObjectId( const TQString &conduit, const TQString &uid );
/**
* Returns all known uid's for given conduit.
*/
- QValueList<QString> getPCObjectIds( const QString &conduit );
+ TQValueList<TQString> getPCObjectIds( const TQString &conduit );
/**
* Adds a pid for HH objects to the database.
*/
- void registerHHObjectId( const QString &conduit, recordid_t pid );
+ void registerHHObjectId( const TQString &conduit, recordid_t pid );
/**
* Returns all know pids for given conduit.
*/
- QValueList<recordid_t> getHHObjectIds( const QString &conduit );
+ TQValueList<recordid_t> getHHObjectIds( const TQString &conduit );
/**
* Sets the PC uid for the handheld record with pid. Does nothing when
* there is no handheld record with pid.
*/
- void setPCObjectId( const QString &conduit, recordid_t pid
- , const QString &uid );
+ void setPCObjectId( const TQString &conduit, recordid_t pid
+ , const TQString &uid );
/**
* Sets the PC uid for the handheld record with pid. Does nothing when
* there is no handheld record with pid.
*/
- void setHHObjectId( const QString &conduit, const QString &uid
+ void setHHObjectId( const TQString &conduit, const TQString &uid
, recordid_t pid );
/**
* Returns the PC uid for the handheld record with pid. Returns 0 when no
* pid exists for given uid.
*/
- recordid_t getHHObjectId( const QString &conduit, const QString &uid );
+ recordid_t getHHObjectId( const TQString &conduit, const TQString &uid );
/**
* Returns the HH pid for the PC record with uid. Returns an empty string
* when no uid exists for given pid.
*/
- QString getHHObjectId( const QString &conduit, recordid_t pid );
+ TQString getHHObjectId( const TQString &conduit, recordid_t pid );
/**
* Returns true when there is a uid set for given pid. The conduit itself
* must determine if the two objects are in sync if this function returns
* true.
*/
- bool hasPCId( const QString &conduit, recordid_t pid );
+ bool hasPCId( const TQString &conduit, recordid_t pid );
/**
* Returns true when there is a pid set for given uid. The conduit itself
* must determine if the two objects are in sync if this function returns
* true.
*/
- bool hasHHId( const QString &conduit, const QString &uid );
+ bool hasHHId( const TQString &conduit, const TQString &uid );
/**
* Sets the time that the two objects where last synced. The conduits
* should call this method (or the pid version) when two objects are synced.
* When the uid does not exist nothing happens.
*/
- void setLastSyncTime( const QString &conduit, const QString &uid,
- const QDateTime &date );
+ void setLastSyncTime( const TQString &conduit, const TQString &uid,
+ const TQDateTime &date );
/**
* Sets the time that the two objects where last synced. The conduits
* should call this (or the uid version) method when two objects are synced.
* When the pid does not exist nothing happens.
*/
- void setLastSyncTime( const QString &conduit, recordid_t pid
- , const QDateTime &date );
+ void setLastSyncTime( const TQString &conduit, recordid_t pid
+ , const TQDateTime &date );
/**
* Returns the date/time for the last time that the item with uid was
@@ -138,7 +138,7 @@ public:
*
* Returns a null datetime when the pid does not excist.
*/
- QDateTime lastTimeSynced( const QString &conduit, const QString &uid );
+ TQDateTime lastTimeSynced( const TQString &conduit, const TQString &uid );
/**
* Returns the date/time for the last time that the item with pid was
@@ -147,10 +147,10 @@ public:
*
* Returns a null datetime when the pid does not excist.
*/
- QDateTime lastTimeSynced( const QString &conduit, recordid_t pid );
+ TQDateTime lastTimeSynced( const TQString &conduit, recordid_t pid );
protected:
- bool openDatasource( const QString &file );
+ bool openDatasource( const TQString &file );
private:
IDMapperPrivate *fP;
diff --git a/kpilot/lib/idmapperxml.cc b/kpilot/lib/idmapperxml.cc
index a2a78a0c9..89fe51d91 100644
--- a/kpilot/lib/idmapperxml.cc
+++ b/kpilot/lib/idmapperxml.cc
@@ -27,7 +27,7 @@
#include "options.h"
-IDMapperXml::IDMapperXml( const QString &file ) : fFile(file)
+IDMapperXml::IDMapperXml( const TQString &file ) : fFile(file)
, fCurrentMapping( 0l )
{
}
@@ -42,7 +42,7 @@ bool IDMapperXml::open()
FUNCTIONSETUP;
root = doc.createElement( CSL1("mappings") );
- QDomNode node = doc.createProcessingInstruction(CSL1("xml")
+ TQDomNode node = doc.createProcessingInstruction(CSL1("xml")
,CSL1("version=\"1.0\" encoding=\"UTF-8\""));
doc.appendChild( node );
@@ -54,7 +54,7 @@ bool IDMapperXml::open()
if( fFile.open( IO_ReadWrite ) )
{
- QTextStream out( &fFile );
+ TQTextStream out( &fFile );
doc.save( out, 4 );
fFile.close();
return true;
@@ -68,7 +68,7 @@ bool IDMapperXml::open()
else
{
DEBUGKPILOT << fname << ": Parsing file " << fFile.name() << endl;
- QXmlSimpleReader reader;
+ TQXmlSimpleReader reader;
reader.setContentHandler( this );
// Make sure that the file is closed after parsing.
@@ -87,7 +87,7 @@ void IDMapperXml::save()
<< " mappings..." << endl;
DEBUGKPILOT << fname << ": ";
- QValueList<IDMapping>::const_iterator it;
+ TQValueList<IDMapping>::const_iterator it;
for ( it = fMappings.begin(); it != fMappings.end(); ++it )
{
DEBUGKPILOT << ".";
@@ -96,27 +96,27 @@ void IDMapperXml::save()
DEBUGKPILOT << fname << ": " << mapping.conduit();
- QDomElement mappingElement = doc.createElement( CSL1("mapping") );
+ TQDomElement mappingElement = doc.createElement( CSL1("mapping") );
mappingElement.setAttribute( CSL1("conduit"), mapping.conduit() );
if( !mapping.uid().isNull() )
{
- QDomElement uidElement = doc.createElement( CSL1("uid") );
+ TQDomElement uidElement = doc.createElement( CSL1("uid") );
uidElement.setAttribute( CSL1("value"), mapping.uid() );
mappingElement.appendChild( uidElement );
}
if( mapping.pid() != 0 )
{
- QDomElement uidElement = doc.createElement( CSL1("pid") );
+ TQDomElement uidElement = doc.createElement( CSL1("pid") );
uidElement.setAttribute( CSL1("value"), mapping.pid() );
mappingElement.appendChild( uidElement );
}
if( !mapping.lastSyncTime().isNull() )
{
- QDomElement uidElement = doc.createElement( CSL1("pid") );
- uidElement.setAttribute( CSL1("value"), QString::number( mapping.pid() ) );
+ TQDomElement uidElement = doc.createElement( CSL1("pid") );
+ uidElement.setAttribute( CSL1("value"), TQString::number( mapping.pid() ) );
mappingElement.appendChild( uidElement );
}
@@ -125,7 +125,7 @@ void IDMapperXml::save()
if( fFile.open( IO_ReadWrite ) )
{
- QTextStream out( &fFile );
+ TQTextStream out( &fFile );
doc.save( out, 4 );
fFile.close();
@@ -144,14 +144,14 @@ void IDMapperXml::addMapping( const IDMapping &mapping )
DEBUGKPILOT << fname << ": " << fMappings.first().conduit() << endl;
}
-QValueList<IDMapping>& IDMapperXml::mappings()
+TQValueList<IDMapping>& IDMapperXml::mappings()
{
return fMappings;
}
-bool IDMapperXml::startElement( const QString &namespaceURI
- , const QString &localName, const QString &qName
- , const QXmlAttributes &attribs )
+bool IDMapperXml::startElement( const TQString &namespaceURI
+ , const TQString &localName, const TQString &qName
+ , const TQXmlAttributes &attribs )
{
FUNCTIONSETUP;
Q_UNUSED(namespaceURI);
@@ -159,7 +159,7 @@ bool IDMapperXml::startElement( const QString &namespaceURI
if( qName == CSL1("mapping") )
{
- QString conduit( attribs.value( CSL1("conduit") ) );
+ TQString conduit( attribs.value( CSL1("conduit") ) );
fCurrentMapping = new IDMapping( conduit );
}
@@ -175,7 +175,7 @@ bool IDMapperXml::startElement( const QString &namespaceURI
{
// NOTE: this isn't very robuust!
// Parses only dates in the form: dd-mm-yyyy hh:mm:ss
- QString date = attribs.value( CSL1("value") );
+ TQString date = attribs.value( CSL1("value") );
int day = date.left(2).toInt();
int month = date.mid(3,2).toInt();
int year = date.mid(6, 4).toInt();
@@ -184,17 +184,17 @@ bool IDMapperXml::startElement( const QString &namespaceURI
int minute = date.mid(14,2).toInt();
int second = date.mid(17,2).toInt();
- QDate tmpDate = QDate( year, month, day );
- QTime tmpTime = QTime( hour, minute, second );
+ TQDate tmpDate = TQDate( year, month, day );
+ TQTime tmpTime = TQTime( hour, minute, second );
- fCurrentMapping->setLastSyncTime( QDateTime( tmpDate, tmpTime ) );
+ fCurrentMapping->setLastSyncTime( TQDateTime( tmpDate, tmpTime ) );
}
return true;
}
-bool IDMapperXml::endElement( const QString &namespaceURI
- , const QString &localName, const QString &qName )
+bool IDMapperXml::endElement( const TQString &namespaceURI
+ , const TQString &localName, const TQString &qName )
{
FUNCTIONSETUP;
diff --git a/kpilot/lib/idmapperxml.h b/kpilot/lib/idmapperxml.h
index 455673888..87c912379 100644
--- a/kpilot/lib/idmapperxml.h
+++ b/kpilot/lib/idmapperxml.h
@@ -27,15 +27,15 @@
#include "idmapping.h"
-#include <qxml.h>
-#include <qdom.h>
-#include <qstring.h>
-#include <qptrcollection.h>
+#include <tqxml.h>
+#include <tqdom.h>
+#include <tqstring.h>
+#include <tqptrcollection.h>
class IDMapperXml : public QXmlDefaultHandler
{
public:
- IDMapperXml( const QString &file );
+ IDMapperXml( const TQString &file );
~IDMapperXml();
@@ -59,26 +59,26 @@ public:
/**
* Returns the collection of mappings.
*/
- QValueList<IDMapping> &mappings();
+ TQValueList<IDMapping> &mappings();
/**
* Overloaded function to parse the xml file.
*/
- bool startElement( const QString &namespaceURI, const QString &localName
- , const QString &qName, const QXmlAttributes &attribs );
+ bool startElement( const TQString &namespaceURI, const TQString &localName
+ , const TQString &qName, const TQXmlAttributes &attribs );
/**
* Overloaded function to parse the xml file.
*/
- bool endElement( const QString &namespaceURI, const QString &localName
- , const QString &qName );
+ bool endElement( const TQString &namespaceURI, const TQString &localName
+ , const TQString &qName );
private:
- QFile fFile;
- QDomDocument doc;
- QDomElement root;
+ TQFile fFile;
+ TQDomDocument doc;
+ TQDomElement root;
IDMapping *fCurrentMapping;
- QValueList<IDMapping> fMappings;
+ TQValueList<IDMapping> fMappings;
};
#endif
diff --git a/kpilot/lib/idmapping.cc b/kpilot/lib/idmapping.cc
index 7a49e9e3e..49a1e334e 100644
--- a/kpilot/lib/idmapping.cc
+++ b/kpilot/lib/idmapping.cc
@@ -29,7 +29,7 @@ IDMapping::IDMapping()
{
}
-IDMapping::IDMapping( const QString &conduit )
+IDMapping::IDMapping( const TQString &conduit )
{
fConduit = conduit;
fPid = 0;
@@ -53,7 +53,7 @@ IDMapping IDMapping::operator=( const IDMapping &m )
return local;
}
-void IDMapping::setUid( const QString &uid )
+void IDMapping::setUid( const TQString &uid )
{
fUid = uid;
}
@@ -63,17 +63,17 @@ void IDMapping::setPid( recordid_t pid )
fPid = pid;
}
-void IDMapping::setLastSyncTime( const QDateTime &datetime )
+void IDMapping::setLastSyncTime( const TQDateTime &datetime )
{
fLastSync = datetime;
}
-QString IDMapping::conduit() const
+TQString IDMapping::conduit() const
{
return fConduit;
}
-QString IDMapping::uid() const
+TQString IDMapping::uid() const
{
return fUid;
}
@@ -83,7 +83,7 @@ recordid_t IDMapping::pid() const
return fPid;
}
-QDateTime IDMapping::lastSyncTime() const
+TQDateTime IDMapping::lastSyncTime() const
{
return fLastSync;
}
diff --git a/kpilot/lib/idmapping.h b/kpilot/lib/idmapping.h
index acb17dc8a..b8ed4d5e4 100644
--- a/kpilot/lib/idmapping.h
+++ b/kpilot/lib/idmapping.h
@@ -28,39 +28,39 @@
#include "pi-macros.h"
-#include <qstring.h>
-#include <qdatetime.h>
+#include <tqstring.h>
+#include <tqdatetime.h>
class IDMapping
{
public:
IDMapping();
- IDMapping( const QString &conduit );
+ IDMapping( const TQString &conduit );
IDMapping( const IDMapping &m );
IDMapping operator=( const IDMapping &m );
- void setUid( const QString &uid );
+ void setUid( const TQString &uid );
void setPid( recordid_t uid );
- void setLastSyncTime( const QDateTime &datetime );
+ void setLastSyncTime( const TQDateTime &datetime );
- QString conduit() const;
+ TQString conduit() const;
- QString uid() const;
+ TQString uid() const;
recordid_t pid() const;
- QDateTime lastSyncTime() const;
+ TQDateTime lastSyncTime() const;
private:
- QString fConduit;
- QString fUid;
+ TQString fConduit;
+ TQString fUid;
recordid_t fPid;
- QDateTime fLastSync;
+ TQDateTime fLastSync;
};
#endif
diff --git a/kpilot/lib/kpilotdevicelink.cc b/kpilot/lib/kpilotdevicelink.cc
index 55027d763..5fed7961a 100644
--- a/kpilot/lib/kpilotdevicelink.cc
+++ b/kpilot/lib/kpilotdevicelink.cc
@@ -45,11 +45,11 @@
#include <pi-file.h>
#include <pi-buffer.h>
-#include <qdir.h>
-#include <qtimer.h>
-#include <qdatetime.h>
-#include <qthread.h>
-#include <qsocketnotifier.h>
+#include <tqdir.h>
+#include <tqtimer.h>
+#include <tqdatetime.h>
+#include <tqthread.h>
+#include <tqsocketnotifier.h>
#include <kconfig.h>
#include <kmessagebox.h>
@@ -71,19 +71,19 @@
DeviceMap *DeviceMap::mThis = 0L;
-static inline void startOpenTimer(DeviceCommThread *dev, QTimer *&t)
+static inline void startOpenTimer(DeviceCommThread *dev, TQTimer *&t)
{
if ( !t)
{
- t = new QTimer(dev);
- QObject::connect(t, SIGNAL(timeout()), dev, SLOT(openDevice()));
+ t = new TQTimer(dev);
+ TQObject::connect(t, TQT_SIGNAL(timeout()), dev, TQT_SLOT(openDevice()));
}
// just a single-shot timer. we'll know when to start it again...
t->start(1000, true);
}
DeviceCommThread::DeviceCommThread(KPilotDeviceLink *d) :
- QThread(),
+ TQThread(),
fDone(true),
fHandle(d),
fOpenTimer(0L),
@@ -144,7 +144,7 @@ void DeviceCommThread::reset()
if (link()->fMessages->shouldPrint(Messages::OpenFailMessage))
{
- QApplication::postEvent(link(), new DeviceCommEvent(EventLogMessage,
+ TQApplication::postEvent(link(), new DeviceCommEvent(EventLogMessage,
i18n("Could not open device: %1 (will retry)")
.arg(link()->pilotPath() )));
}
@@ -163,7 +163,7 @@ void DeviceCommThread::reset()
* and then bind to it (in open()). If we're able to do those 2 things, then
* we do 2 things: we set a timeout timer (which will tell us that X amount of
* time has transpired before we get into the meat of the sync transaction), and
- * we also set up a QSocketNotifier, which will tell us when data is available
+ * we also set up a TQSocketNotifier, which will tell us when data is available
* to be read from the Palm socket. If we were unable to create a socket
* and/or bind to the Palm in this method, we'll start our timer again.
*/
@@ -183,7 +183,7 @@ void DeviceCommThread::openDevice()
if (link()->fMessages->shouldPrint(Messages::OpenMessage))
{
- QApplication::postEvent(link(), new DeviceCommEvent(EventLogMessage,
+ TQApplication::postEvent(link(), new DeviceCommEvent(EventLogMessage,
i18n("Trying to open device %1...")
.arg(link()->fPilotPath)));
}
@@ -219,13 +219,13 @@ void DeviceCommThread::openDevice()
}
}
-bool DeviceCommThread::open(const QString &device)
+bool DeviceCommThread::open(const TQString &device)
{
FUNCTIONSETUPL(2);
int ret;
int e = 0;
- QString msg;
+ TQString msg;
if (fTempSocket != -1)
{
@@ -246,7 +246,7 @@ bool DeviceCommThread::open(const QString &device)
link()->fLinkStatus = PilotLinkError;
- QApplication::postEvent(link(), new DeviceCommEvent(EventLogError, msg));
+ TQApplication::postEvent(link(), new DeviceCommEvent(EventLogError, msg));
return false;
}
@@ -265,7 +265,7 @@ bool DeviceCommThread::open(const QString &device)
link()->fLinkStatus = PilotLinkError;
- QApplication::postEvent(link(), new DeviceCommEvent(EventLogError, msg));
+ TQApplication::postEvent(link(), new DeviceCommEvent(EventLogError, msg));
return false;
}
@@ -277,7 +277,7 @@ bool DeviceCommThread::open(const QString &device)
DEBUGKPILOT << fname << ": Binding to path: ["
<< link()->fRealPilotPath << "]" << endl;
- ret = pi_bind(fTempSocket, QFile::encodeName(link()->fRealPilotPath));
+ ret = pi_bind(fTempSocket, TQFile::encodeName(link()->fRealPilotPath));
if (ret < 0)
{
@@ -295,7 +295,7 @@ bool DeviceCommThread::open(const QString &device)
if (link()->fMessages->shouldPrint(Messages::OpenFailMessage))
{
- QApplication::postEvent(link(), new DeviceCommEvent(EventLogError, msg));
+ TQApplication::postEvent(link(), new DeviceCommEvent(EventLogError, msg));
}
return false;
@@ -304,10 +304,10 @@ bool DeviceCommThread::open(const QString &device)
link()->fLinkStatus = DeviceOpen;
DeviceMap::self()->bindDevice(link()->fRealPilotPath);
- fSocketNotifier = new QSocketNotifier(fTempSocket,
- QSocketNotifier::Read, this);
- QObject::connect(fSocketNotifier, SIGNAL(activated(int)),
- this, SLOT(acceptDevice()));
+ fSocketNotifier = new TQSocketNotifier(fTempSocket,
+ TQSocketNotifier::Read, this);
+ TQObject::connect(fSocketNotifier, TQT_SIGNAL(activated(int)),
+ this, TQT_SLOT(acceptDevice()));
fSocketNotifierActive=true;
/**
@@ -322,15 +322,15 @@ bool DeviceCommThread::open(const QString &device)
timeout=5000;
}
- fWorkaroundUSBTimer = new QTimer(this);
- connect(fWorkaroundUSBTimer, SIGNAL(timeout()), this, SLOT(workaroundUSB()));
+ fWorkaroundUSBTimer = new TQTimer(this);
+ connect(fWorkaroundUSBTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(workaroundUSB()));
fWorkaroundUSBTimer->start(timeout, true);
return true;
}
/**
- * We've been notified by our QSocketNotifier that we have data available on the
+ * We've been notified by our TQSocketNotifier that we have data available on the
* socket. Try to go through the remaining steps of the connnection process.
* Note: If we return at all from this before the very end without a successful
* connection, we need to make sure we restart our connection open timer, otherwise
@@ -387,14 +387,14 @@ void DeviceCommThread::acceptDevice()
// Presumably, strerror() returns things in
// local8Bit and not latin1.
- QApplication::postEvent(link(), new DeviceCommEvent(EventLogError,
+ TQApplication::postEvent(link(), new DeviceCommEvent(EventLogError,
i18n("Cannot listen on Pilot socket (%1)").
- arg(QString::fromLocal8Bit(s))));
+ arg(TQString::fromLocal8Bit(s))));
reset();
return;
}
- QApplication::postEvent(link(), new DeviceCommEvent(EventLogProgress, QString::null, 10));
+ TQApplication::postEvent(link(), new DeviceCommEvent(EventLogProgress, TQString::null, 10));
DEBUGKPILOT << fname <<
": Listening to pilot. Now trying accept..." << endl;
@@ -408,8 +408,8 @@ void DeviceCommThread::acceptDevice()
WARNINGKPILOT << "pi_accept returned: [" << s << "]" << endl;
- QApplication::postEvent(link(), new DeviceCommEvent(EventLogError, i18n("Cannot accept Pilot (%1)")
- .arg(QString::fromLocal8Bit(s))));
+ TQApplication::postEvent(link(), new DeviceCommEvent(EventLogError, i18n("Cannot accept Pilot (%1)")
+ .arg(TQString::fromLocal8Bit(s))));
link()->fLinkStatus = PilotLinkError;
reset();
@@ -423,21 +423,21 @@ void DeviceCommThread::acceptDevice()
link()->fLinkStatus = PilotLinkError;
WARNINGKPILOT << "Already connected or unable to connect!" << endl;
- QApplication::postEvent(link(), new DeviceCommEvent(EventLogError, i18n("Cannot accept Pilot (%1)")
+ TQApplication::postEvent(link(), new DeviceCommEvent(EventLogError, i18n("Cannot accept Pilot (%1)")
.arg(i18n("already connected"))));
reset();
return;
}
- QApplication::postEvent(link(), new DeviceCommEvent(EventLogProgress, QString::null, 30));
+ TQApplication::postEvent(link(), new DeviceCommEvent(EventLogProgress, TQString::null, 30));
DEBUGKPILOT << fname << ": doing dlp_ReadSysInfo..." << endl;
struct SysInfo sys_info;
if (dlp_ReadSysInfo(fPilotSocket, &sys_info) < 0)
{
- QApplication::postEvent(link(), new DeviceCommEvent(EventLogError,
+ TQApplication::postEvent(link(), new DeviceCommEvent(EventLogError,
i18n("Unable to read system information from Pilot")));
link()->fLinkStatus=PilotLinkError;
@@ -461,7 +461,7 @@ void DeviceCommThread::acceptDevice()
fWorkaroundUSBTimer->stop();
KPILOT_DELETE(fWorkaroundUSBTimer);
- QApplication::postEvent(link(), new DeviceCommEvent(EventLogProgress, QString::null, 60));
+ TQApplication::postEvent(link(), new DeviceCommEvent(EventLogProgress, TQString::null, 60));
KPILOT_DELETE(link()->fPilotUser);
link()->fPilotUser = new KPilotUser;
@@ -471,11 +471,11 @@ void DeviceCommThread::acceptDevice()
/* Ask the pilot who it is. And see if it's who we think it is. */
dlp_ReadUserInfo(fPilotSocket, link()->fPilotUser->data());
- QString n = link()->getPilotUser().name();
+ TQString n = link()->getPilotUser().name();
DEBUGKPILOT << fname
<< ": Read user name: [" << n << "]" << endl;
- QApplication::postEvent(link(), new DeviceCommEvent(EventLogProgress, i18n("Checking last PC..."), 90));
+ TQApplication::postEvent(link(), new DeviceCommEvent(EventLogProgress, i18n("Checking last PC..."), 90));
/* Tell user (via Pilot) that we are starting things up */
if ((ret=dlp_OpenConduit(fPilotSocket)) < 0)
@@ -483,18 +483,18 @@ void DeviceCommThread::acceptDevice()
DEBUGKPILOT << fname
<< ": dlp_OpenConduit returned: [" << ret << "]" << endl;
- QApplication::postEvent(link(), new DeviceCommEvent(EventLogError,
+ TQApplication::postEvent(link(), new DeviceCommEvent(EventLogError,
i18n("Could not read user information from the Pilot. "
"Perhaps you have a password set on the device?")));
}
link()->fLinkStatus = AcceptedDevice;
- QApplication::postEvent(link(), new DeviceCommEvent(EventLogProgress, QString::null, 100));
+ TQApplication::postEvent(link(), new DeviceCommEvent(EventLogProgress, TQString::null, 100));
DeviceCommEvent * ev = new DeviceCommEvent(EventDeviceReady);
ev->setCurrentSocket(fPilotSocket);
- QApplication::postEvent(link(), ev);
+ TQApplication::postEvent(link(), ev);
}
@@ -516,19 +516,19 @@ void DeviceCommThread::run()
// keep the thread alive until we're supposed to be done
while (!fDone)
{
- QThread::sleep(sleepBetweenPoll);
+ TQThread::sleep(sleepBetweenPoll);
}
close();
// now sleep one last bit to make sure the pthread inside
// pilot-link (potentially, if it's libusb) is done before we exit
- QThread::sleep(1);
+ TQThread::sleep(1);
DEBUGKPILOT << fname << ": comm thread now done..." << endl;
}
-KPilotDeviceLink::KPilotDeviceLink(QObject * parent, const char *name,
- const QString &tempDevice) :
+KPilotDeviceLink::KPilotDeviceLink(TQObject * parent, const char *name,
+ const TQString &tempDevice) :
KPilotLink(parent, name), fLinkStatus(Init), fWorkaroundUSB(false),
fPilotSocket(-1), fTempDevice(tempDevice), fMessages(new Messages(this)), fDeviceCommThread(0L)
{
@@ -553,7 +553,7 @@ KPilotDeviceLink::~KPilotDeviceLink()
return fLinkStatus == AcceptedDevice;
}
-/* virtual */bool KPilotDeviceLink::event(QEvent *e)
+/* virtual */bool KPilotDeviceLink::event(TQEvent *e)
{
FUNCTIONSETUP;
@@ -636,7 +636,7 @@ void KPilotDeviceLink::close()
fPilotSocket = (-1);
}
-void KPilotDeviceLink::reset(const QString & dP)
+void KPilotDeviceLink::reset(const TQString & dP)
{
FUNCTIONSETUP;
@@ -645,7 +645,7 @@ void KPilotDeviceLink::reset(const QString & dP)
// Release all resources
//
close();
- fPilotPath = QString::null;
+ fPilotPath = TQString::null;
fPilotPath = dP;
if (fPilotPath.isEmpty())
@@ -667,7 +667,7 @@ void KPilotDeviceLink::startCommThread()
WARNINGKPILOT << "No point in trying empty device."
<< endl;
- QString msg = i18n("The Pilot device is not configured yet.");
+ TQString msg = i18n("The Pilot device is not configured yet.");
WARNINGKPILOT << msg << endl;
fLinkStatus = PilotLinkError;
@@ -699,7 +699,7 @@ void KPilotDeviceLink::checkDevice()
// If the device exists yet doesn't have the right
// permissions, complain and then continue anyway.
//
- QFileInfo fi(fPilotPath);
+ TQFileInfo fi(fPilotPath);
if (fi.exists())
{
// If it exists, it ought to be RW already.
@@ -725,7 +725,7 @@ void KPilotDeviceLink::checkDevice()
}
}
-void KPilotDeviceLink::setTempDevice(const QString &d)
+void KPilotDeviceLink::setTempDevice(const TQString &d)
{
fTempDevice = d;
DeviceMap::self()->bindDevice(fTempDevice);
@@ -738,24 +738,24 @@ void KPilotDeviceLink::setTempDevice(const QString &d)
return pi_tickle(pilotSocket()) >= 0;
}
-/* virtual */void KPilotDeviceLink::addSyncLogEntryImpl(const QString &entry)
+/* virtual */void KPilotDeviceLink::addSyncLogEntryImpl(const TQString &entry)
{
dlp_AddSyncLogEntry(fPilotSocket,
const_cast<char *>((const char *)Pilot::toPilot(entry)));
}
-bool KPilotDeviceLink::installFile(const QString & f, const bool deleteFile)
+bool KPilotDeviceLink::installFile(const TQString & f, const bool deleteFile)
{
FUNCTIONSETUP;
DEBUGKPILOT << fname << ": Installing file " << f << endl;
- if (!QFile::exists(f))
+ if (!TQFile::exists(f))
return false;
char buffer[PATH_MAX];
memset(buffer, 0, PATH_MAX);
- strlcpy(buffer, QFile::encodeName(f), PATH_MAX);
+ strlcpy(buffer, TQFile::encodeName(f), PATH_MAX);
struct pi_file *pf = pi_file_open(buffer);
if (!f)
@@ -778,7 +778,7 @@ bool KPilotDeviceLink::installFile(const QString & f, const bool deleteFile)
pi_file_close(pf);
if (deleteFile)
- QFile::remove(f);
+ TQFile::remove(f);
return true;
}
@@ -788,9 +788,9 @@ int KPilotDeviceLink::openConduit()
return dlp_OpenConduit(fPilotSocket);
}
-QString KPilotDeviceLink::statusString(LinkStatus l)
+TQString KPilotDeviceLink::statusString(LinkStatus l)
{
- QString s= CSL1("KPilotDeviceLink=");
+ TQString s= CSL1("KPilotDeviceLink=");
switch (l)
{
@@ -826,7 +826,7 @@ QString KPilotDeviceLink::statusString(LinkStatus l)
return s;
}
-QString KPilotDeviceLink::statusString() const
+TQString KPilotDeviceLink::statusString() const
{
return statusString(status() );
}
@@ -872,7 +872,7 @@ int KPilotDeviceLink::findDatabase(const char *name, struct DBInfo *dbinfo,
type, creator, dbinfo);
}
-bool KPilotDeviceLink::retrieveDatabase(const QString &fullBackupName,
+bool KPilotDeviceLink::retrieveDatabase(const TQString &fullBackupName,
DBInfo *info)
{
FUNCTIONSETUP;
@@ -886,7 +886,7 @@ bool KPilotDeviceLink::retrieveDatabase(const QString &fullBackupName,
DEBUGKPILOT << fname << ": Writing DB <" << info->name << "> "
<< " to " << fullBackupName << endl;
- QCString encodedName = QFile::encodeName(fullBackupName);
+ TQCString encodedName = TQFile::encodeName(fullBackupName);
struct pi_file *f = pi_file_create(encodedName, info);
if (!f)
@@ -954,7 +954,7 @@ const KPilotCard *KPilotDeviceLink::getCardInfo(int card)
return cardinfo;
}
-PilotDatabase *KPilotDeviceLink::database(const QString &name)
+PilotDatabase *KPilotDeviceLink::database(const TQString &name)
{
return new PilotSerialDatabase( this, name );
}
diff --git a/kpilot/lib/kpilotdevicelink.h b/kpilot/lib/kpilotdevicelink.h
index d2527aee4..2f29a5877 100644
--- a/kpilot/lib/kpilotdevicelink.h
+++ b/kpilot/lib/kpilotdevicelink.h
@@ -58,7 +58,7 @@ enum LinkStatus {
* Custom events we can be handling...
*/
enum DeviceCustomEvents {
- EventLogMessage = QEvent::User + 777,
+ EventLogMessage = TQEvent::User + 777,
EventLogError,
EventLogProgress,
EventDeviceReady
@@ -86,9 +86,9 @@ public:
* @param tempDevice Path to device node to use as an alternative
* to the "normal" one set by KPilot.
*/
- KPilotDeviceLink( QObject *parent = 0,
+ KPilotDeviceLink( TQObject *parent = 0,
const char *name = 0,
- const QString &tempDevice = QString::null );
+ const TQString &tempDevice = TQString::null );
/**
* Destructor. This rudely ends the communication with the handheld.
@@ -107,17 +107,17 @@ public:
}
/** Get a human-readable string for the given status @p l. */
- static QString statusString(LinkStatus l);
+ static TQString statusString(LinkStatus l);
// The following API is the actual implementation of
// the KPilotLink API, for documentation see that file.
//
- virtual QString statusString() const;
+ virtual TQString statusString() const;
virtual bool isConnected() const;
- virtual void reset( const QString & );
+ virtual void reset( const TQString & );
virtual void close();
virtual void reset();
- virtual bool event(QEvent *e);
+ virtual bool event(TQEvent *e);
virtual bool tickle();
virtual const KPilotCard *getCardInfo(int card);
virtual void endSync( EndOfSyncFlags f );
@@ -125,14 +125,14 @@ public:
virtual int getNextDatabase(int index,struct DBInfo *);
virtual int findDatabase(const char *name, struct DBInfo*,
int index=0, unsigned long type=0, unsigned long creator=0);
- virtual bool retrieveDatabase(const QString &path, struct DBInfo *db);
+ virtual bool retrieveDatabase(const TQString &path, struct DBInfo *db);
virtual DBInfoList getDBList(int cardno=0, int flags=dlpDBListRAM);
- virtual PilotDatabase *database( const QString &name );
+ virtual PilotDatabase *database( const TQString &name );
virtual PilotDatabase *database( const DBInfo *info );
protected:
- virtual bool installFile(const QString &, const bool deleteFile);
- virtual void addSyncLogEntryImpl( const QString &s );
+ virtual bool installFile(const TQString &, const bool deleteFile);
+ virtual void addSyncLogEntryImpl( const TQString &s );
virtual int pilotSocket() const
{
return fPilotSocket;
@@ -161,14 +161,14 @@ public:
* Useful for hotplug enviroments, this device is used @em once
* for accepting a connection.
*/
- void setTempDevice( const QString &device );
+ void setTempDevice( const TQString &device );
/**
* Sets the device to use. Used by probe dialog, since we know
* what device to use, but we don't want to start the detection
* immediately.
*/
- void setDevice( const QString &device )
+ void setDevice( const TQString &device )
{
fPilotPath = device;
}
@@ -191,13 +191,13 @@ protected:
* Path with resolved symlinks, to prevent double binding
* to the same device.
*/
- QString fRealPilotPath;
+ TQString fRealPilotPath;
/**
* Pilot-link library handles for the device once it's opened.
*/
int fPilotSocket;
- QString fTempDevice;
+ TQString fTempDevice;
/**
* Handle cases where we can't accept or open the device,
diff --git a/kpilot/lib/kpilotdevicelinkPrivate.h b/kpilot/lib/kpilotdevicelinkPrivate.h
index be2bbda35..d451e75c5 100644
--- a/kpilot/lib/kpilotdevicelinkPrivate.h
+++ b/kpilot/lib/kpilotdevicelinkPrivate.h
@@ -29,8 +29,8 @@
#include <errno.h>
-#include <qstringlist.h>
-#include <qthread.h>
+#include <tqstringlist.h>
+#include <tqthread.h>
#include "kpilotdevicelink.h"
#include "options.h"
@@ -49,7 +49,7 @@ public:
return mThis;
}
- bool canBind(const QString &device)
+ bool canBind(const TQString &device)
{
FUNCTIONSETUPL(5);
DEBUGKPILOT << fname << ": device: ["
@@ -59,7 +59,7 @@ public:
return !mBoundDevices.contains(device);
}
- void bindDevice(const QString &device)
+ void bindDevice(const TQString &device)
{
FUNCTIONSETUPL(5);
DEBUGKPILOT << fname << ": device: ["
@@ -69,7 +69,7 @@ public:
showList();
}
- void unbindDevice(const QString &device)
+ void unbindDevice(const TQString &device)
{
FUNCTIONSETUPL(5);
DEBUGKPILOT << fname << ": device: ["
@@ -88,7 +88,7 @@ protected:
{
}
- QStringList mBoundDevices;
+ TQStringList mBoundDevices;
static DeviceMap *mThis;
private:
@@ -173,13 +173,13 @@ protected:
class DeviceCommEvent : public QEvent
{
public:
- DeviceCommEvent(DeviceCustomEvents type, QString msg = QString::null,
+ DeviceCommEvent(DeviceCustomEvents type, TQString msg = TQString::null,
int progress = 0) :
- QEvent( (QEvent::Type)type ), fMessage(msg), fProgress(progress),
+ TQEvent( (TQEvent::Type)type ), fMessage(msg), fProgress(progress),
fPilotSocket(-1)
{
}
- QString message() const
+ TQString message() const
{
return fMessage;
}
@@ -198,7 +198,7 @@ public:
return fPilotSocket;
}
private:
- QString fMessage;
+ TQString fMessage;
int fProgress;
/**
* Pilot-link library handles for the device once it's opened.
@@ -211,7 +211,7 @@ private:
Event thread (similar to Swing's AWT event dispatch thread).
*/
-class DeviceCommThread : public QObject, public QThread
+class DeviceCommThread : public TQObject, public QThread
{
friend class KPilotDeviceLink;
@@ -239,7 +239,7 @@ protected:
* Does the low-level opening of the device and handles the
* pilot-link library initialisation.
*/
- bool open(const QString &device = QString::null);
+ bool open(const TQString &device = TQString::null);
protected slots:
/**
@@ -277,7 +277,7 @@ private:
WARNINGKPILOT << "Link asked for, but either I'm "
<< "done or I don't have a valid handle. "
<< "Shutting down comm thread." << endl;
- QThread::exit();
+ TQThread::exit();
return 0;
}
}
@@ -285,12 +285,12 @@ private:
/**
* Timers and Notifiers for detecting activity on the device.
*/
- QTimer *fOpenTimer;
- QSocketNotifier *fSocketNotifier;
+ TQTimer *fOpenTimer;
+ TQSocketNotifier *fSocketNotifier;
bool fSocketNotifierActive;
/** Timer used to check for a badly-connected Z31/72 */
- QTimer *fWorkaroundUSBTimer;
+ TQTimer *fWorkaroundUSBTimer;
/**
* Pilot-link library handles for the device once it's opened.
@@ -298,7 +298,7 @@ private:
int fPilotSocket;
int fTempSocket;
- inline QString errorMessage(int e)
+ inline TQString errorMessage(int e)
{
switch (e)
{
diff --git a/kpilot/lib/kpilotlink.cc b/kpilot/lib/kpilotlink.cc
index 9c0b85ee9..da85d489d 100644
--- a/kpilot/lib/kpilotlink.cc
+++ b/kpilot/lib/kpilotlink.cc
@@ -47,10 +47,10 @@
#include <pi-file.h>
#include <pi-buffer.h>
-#include <qdir.h>
-#include <qtimer.h>
-#include <qdatetime.h>
-#include <qthread.h>
+#include <tqdir.h>
+#include <tqtimer.h>
+#include <tqdatetime.h>
+#include <tqthread.h>
#include <kconfig.h>
#include <kmessagebox.h>
@@ -74,7 +74,7 @@ class TickleThread : public QThread
{
public:
TickleThread(KPilotLink *d, bool *done, int timeout) :
- QThread(),
+ TQThread(),
fHandle(d),
fDone(done),
fTimeout(timeout)
@@ -108,14 +108,14 @@ void TickleThread::run()
while (!(*fDone))
{
- QThread::msleep(1000/ChecksPerSecond);
+ TQThread::msleep(1000/ChecksPerSecond);
if (!(--subseconds))
{
if (timeout)
{
if (!(--timeout))
{
- QApplication::postEvent(fHandle, new QEvent(static_cast<QEvent::Type>(KPilotLink::EventTickleTimeout)));
+ TQApplication::postEvent(fHandle, new TQEvent(static_cast<TQEvent::Type>(KPilotLink::EventTickleTimeout)));
break;
}
}
@@ -137,9 +137,9 @@ void TickleThread::run()
-KPilotLink::KPilotLink( QObject *parent, const char *name ) :
- QObject( parent, name ),
- fPilotPath(QString::null),
+KPilotLink::KPilotLink( TQObject *parent, const char *name ) :
+ TQObject( parent, name ),
+ fPilotPath(TQString::null),
fPilotUser(0L),
fPilotSysInfo(0L),
fTickleDone(true),
@@ -169,7 +169,7 @@ KPilotLink::~KPilotLink()
KPILOT_DELETE(fPilotSysInfo);
}
-/* virtual */ bool KPilotLink::event(QEvent *e)
+/* virtual */ bool KPilotLink::event(TQEvent *e)
{
if ((int)e->type() == EventTickleTimeout)
{
@@ -177,7 +177,7 @@ KPilotLink::~KPilotLink()
emit timeout();
return true;
}
- else return QObject::event(e);
+ else return TQObject::event(e);
}
/*
@@ -218,30 +218,30 @@ void KPilotLink::stopTickle()
}
}
-unsigned int KPilotLink::installFiles(const QStringList & l, const bool deleteFiles)
+unsigned int KPilotLink::installFiles(const TQStringList & l, const bool deleteFiles)
{
FUNCTIONSETUP;
- QStringList::ConstIterator i,e;
+ TQStringList::ConstIterator i,e;
unsigned int k = 0;
unsigned int n = 0;
unsigned int total = l.count();
for (i = l.begin(), e = l.end(); i != e; ++i)
{
- emit logProgress(QString::null,
+ emit logProgress(TQString::null,
(int) ((100.0 / total) * (float) n));
if (installFile(*i, deleteFiles))
k++;
n++;
}
- emit logProgress(QString::null, 100);
+ emit logProgress(TQString::null, 100);
return k;
}
-void KPilotLink::addSyncLogEntry(const QString & entry, bool log)
+void KPilotLink::addSyncLogEntry(const TQString & entry, bool log)
{
FUNCTIONSETUP;
if (entry.isEmpty()) return;
diff --git a/kpilot/lib/kpilotlink.h b/kpilot/lib/kpilotlink.h
index 5c3865c3e..b0c97de0f 100644
--- a/kpilot/lib/kpilotlink.h
+++ b/kpilot/lib/kpilotlink.h
@@ -31,8 +31,8 @@
#include <pi-dlp.h>
-#include <qobject.h>
-#include <qvaluelist.h>
+#include <tqobject.h>
+#include <tqvaluelist.h>
/** @file
* Encapsulates all the communication with the handheld. Also
@@ -96,7 +96,7 @@ class PilotDatabase;
* The life-cycle of a KPilotLink object is as follows:
*
* # Object is created (one of the concrete subclasses, anyway)
-* # Object gets a location assigned through reset(const QString &)
+* # Object gets a location assigned through reset(const TQString &)
* # Object is connected to the handheld device (somehow, depends on subclass)
* # Object emits signal deviceReady()
*
@@ -104,7 +104,7 @@ class PilotDatabase;
* the handheld. When the device connection is no longer needed, call either
* endOfSync() or finishSync() to wrap up the communications. The object remains
* alive and may be re-used by calling reset() to use the same location or
-* reset(const QString &) to give it a new location.
+* reset(const TQString &) to give it a new location.
*
* @section Tickle handling.
*
@@ -174,10 +174,10 @@ Q_OBJECT
friend class SyncAction;
public:
/** A list of DBInfo structures. */
- typedef QValueList<struct DBInfo> DBInfoList;
+ typedef TQValueList<struct DBInfo> DBInfoList;
/** Constructor. Use reset() to start looking for a device. */
- KPilotLink( QObject *parent = 0, const char *name = 0 );
+ KPilotLink( TQObject *parent = 0, const char *name = 0 );
/** Destructor. This rudely interrupts any communication in progress.
* It is best to call endOfSync() or finishSync() before destroying
@@ -187,7 +187,7 @@ public:
/** Provides a human-readable status string. */
- virtual QString statusString() const = 0;
+ virtual TQString statusString() const = 0;
/**
* True if HotSync has been started but not finished yet
@@ -204,7 +204,7 @@ public:
* Whichever is being used, this function returns its
* name in a human-readable form.
*/
- QString pilotPath() const
+ TQString pilotPath() const
{
return fPilotPath;
}
@@ -217,13 +217,13 @@ public:
* @see reset()
* @see pilotPath()
*/
- virtual void reset(const QString &pilotPath) = 0;
+ virtual void reset(const TQString &pilotPath) = 0;
/** Allows our class to receive custom events that our threads
* will be giving to us, including tickle timeouts and
* device communication events.
*/
- virtual bool event(QEvent *e);
+ virtual bool event(TQEvent *e);
/**
* Install the list of files (full paths!) named by @p l
@@ -232,7 +232,7 @@ public:
*
* @return the number of files successfully installed.
*/
- unsigned int installFiles(const QStringList &l, const bool deleteFiles);
+ unsigned int installFiles(const TQStringList &l, const bool deleteFiles);
/**
* Write a log entry to the handheld. If @p log is true,
@@ -241,7 +241,7 @@ public:
* log (with a physical device, that is what appears on
* screen at the end of a sync).
*/
- void addSyncLogEntry(const QString &entry,bool log=true);
+ void addSyncLogEntry(const TQString &entry,bool log=true);
/**
* Find a database with the given @p name (and optionally,
@@ -266,7 +266,7 @@ public:
*
* @return @c true on success
*/
- virtual bool retrieveDatabase(const QString &path, struct DBInfo *db) = 0;
+ virtual bool retrieveDatabase(const TQString &path, struct DBInfo *db) = 0;
/**
* Fill the DBInfo structure @p db with information about
@@ -300,12 +300,12 @@ public:
* @note ownership of the database object is given to the caller,
* who must delete the object in time.
*/
- virtual PilotDatabase *database( const QString &name ) = 0;
+ virtual PilotDatabase *database( const TQString &name ) = 0;
/**
* Return a database object for manipulating the database with
* the name stored in the DBInfo structure @p info . The default
- * version goes through method database( const QString & ), above.
+ * version goes through method database( const TQString & ), above.
*
* @return pointer to database object, or 0 on error.
* @note ownership of the database object is given to the caller.
@@ -387,17 +387,17 @@ signals:
void timeout();
/** Signal that a message has been written to the sync log. */
- void logMessage(const QString &);
+ void logMessage(const TQString &);
/** Signal that an error has occurred, for logging. */
- void logError(const QString &);
+ void logError(const TQString &);
/**
* Signal that progress has been made, for logging purposes.
* @p p is the percentage completed (0 <= s <= 100).
* The string @p s is logged as well, if non-Null.
*/
- void logProgress(const QString &s, int p);
+ void logProgress(const TQString &s, int p);
/**
* Emitted once the user information has been read and
@@ -429,7 +429,7 @@ protected:
* Usually /dev/pilot, /dev/ttySx, or /dev/usb/x. May be
* a filesystem path for local links.
*/
- QString fPilotPath;
+ TQString fPilotPath;
/**
* Start tickling the Handheld (every few seconds). This
@@ -453,7 +453,7 @@ protected:
* @p f is used; in addition, if @p deleteFile is true remove
* the source file. Returns @c true if the install succeeded.
*/
- virtual bool installFile( const QString &f, const bool deleteFile ) = 0;
+ virtual bool installFile( const TQString &f, const bool deleteFile ) = 0;
/**
* Notify the Pilot user that a conduit is running now.
@@ -477,7 +477,7 @@ protected:
* Actually write an entry to the device link. The message
* @p s must be guaranteed non-empty.
*/
- virtual void addSyncLogEntryImpl( const QString &s ) = 0;
+ virtual void addSyncLogEntryImpl( const TQString &s ) = 0;
/**
* User information structure. Should be filled in when a sync
@@ -494,7 +494,7 @@ protected:
private:
bool fTickleDone;
- QThread *fTickleThread;
+ TQThread *fTickleThread;
} ;
diff --git a/kpilot/lib/kpilotlocallink.cc b/kpilot/lib/kpilotlocallink.cc
index c3af1d342..8834b4a81 100644
--- a/kpilot/lib/kpilotlocallink.cc
+++ b/kpilot/lib/kpilotlocallink.cc
@@ -47,10 +47,10 @@
#include <pi-file.h>
#include <pi-buffer.h>
-#include <qdir.h>
-#include <qtimer.h>
-#include <qdatetime.h>
-#include <qthread.h>
+#include <tqdir.h>
+#include <tqtimer.h>
+#include <tqdatetime.h>
+#include <tqthread.h>
#include <kconfig.h>
#include <kmessagebox.h>
@@ -65,8 +65,8 @@
#include "kpilotlocallink.moc"
-typedef QPair<QString, struct DBInfo> DatabaseDescriptor;
-typedef QValueList<DatabaseDescriptor> DatabaseDescriptorList;
+typedef QPair<TQString, struct DBInfo> DatabaseDescriptor;
+typedef TQValueList<DatabaseDescriptor> DatabaseDescriptorList;
class KPilotLocalLink::Private
{
@@ -74,13 +74,13 @@ public:
DatabaseDescriptorList fDBs;
} ;
-unsigned int KPilotLocalLink::findAvailableDatabases( KPilotLocalLink::Private &info, const QString &path )
+unsigned int KPilotLocalLink::findAvailableDatabases( KPilotLocalLink::Private &info, const TQString &path )
{
FUNCTIONSETUP;
info.fDBs.clear();
- QDir d(path);
+ TQDir d(path);
if (!d.exists())
{
// Perhaps return an error?
@@ -90,16 +90,16 @@ unsigned int KPilotLocalLink::findAvailableDatabases( KPilotLocalLink::Private &
// Use this to fake indexes in the list of DBInfo structs
unsigned int counter = 0;
- QStringList dbs = d.entryList( CSL1("*.pdb"), QDir::Files | QDir::NoSymLinks | QDir::Readable );
- for ( QStringList::ConstIterator i = dbs.begin(); i != dbs.end() ; ++i)
+ TQStringList dbs = d.entryList( CSL1("*.pdb"), TQDir::Files | TQDir::NoSymLinks | TQDir::Readable );
+ for ( TQStringList::ConstIterator i = dbs.begin(); i != dbs.end() ; ++i)
{
struct DBInfo dbi;
// Remove the trailing 4 characters
- QString dbname = (*i);
+ TQString dbname = (*i);
dbname.remove(dbname.length()-4,4);
- QString dbnamecheck = (*i).left((*i).findRev(CSL1(".pdb")));
+ TQString dbnamecheck = (*i).left((*i).findRev(CSL1(".pdb")));
Q_ASSERT(dbname == dbnamecheck);
if (PilotLocalDatabase::infoFromFile( path + CSL1("/") + (*i), &dbi))
@@ -118,7 +118,7 @@ unsigned int KPilotLocalLink::findAvailableDatabases( KPilotLocalLink::Private &
}
-KPilotLocalLink::KPilotLocalLink( QObject *parent, const char *name ) :
+KPilotLocalLink::KPilotLocalLink( TQObject *parent, const char *name ) :
KPilotLink(parent,name),
fReady(false),
d( new Private )
@@ -132,7 +132,7 @@ KPilotLocalLink::~KPilotLocalLink()
KPILOT_DELETE(d);
}
-/* virtual */ QString KPilotLocalLink::statusString() const
+/* virtual */ TQString KPilotLocalLink::statusString() const
{
return fReady ? CSL1("Ready") : CSL1("Waiting") ;
}
@@ -142,7 +142,7 @@ KPilotLocalLink::~KPilotLocalLink()
return fReady;
}
-/* virtual */ void KPilotLocalLink::reset( const QString &p )
+/* virtual */ void KPilotLocalLink::reset( const TQString &p )
{
FUNCTIONSETUP;
fPath = p;
@@ -152,12 +152,12 @@ KPilotLocalLink::~KPilotLocalLink()
/* virtual */ void KPilotLocalLink::reset()
{
FUNCTIONSETUP;
- QFileInfo info( fPath );
+ TQFileInfo info( fPath );
fReady = !fPath.isEmpty() && info.exists() && info.isDir() ;
if (fReady)
{
findAvailableDatabases(*d, fPath);
- QTimer::singleShot(500,this,SLOT(ready()));
+ TQTimer::singleShot(500,this,TQT_SLOT(ready()));
}
else
{
@@ -235,7 +235,7 @@ KPilotLocalLink::~KPilotLocalLink()
return -1;
}
- QString desiredName = Pilot::fromPilot(name);
+ TQString desiredName = Pilot::fromPilot(name);
DEBUGKPILOT << fname << ": Looking for DB " << desiredName << endl;
for ( DatabaseDescriptorList::ConstIterator i = d->fDBs.at(index);
i != d->fDBs.end(); ++i)
@@ -260,19 +260,19 @@ KPilotLocalLink::~KPilotLocalLink()
return -1;
}
-/* virtual */ void KPilotLocalLink::addSyncLogEntryImpl(QString const &s)
+/* virtual */ void KPilotLocalLink::addSyncLogEntryImpl(TQString const &s)
{
FUNCTIONSETUP;
DEBUGKPILOT << fname << ": " << s << endl ;
}
-/* virtual */ bool KPilotLocalLink::installFile(QString const &path, bool deletefile)
+/* virtual */ bool KPilotLocalLink::installFile(TQString const &path, bool deletefile)
{
FUNCTIONSETUP;
- QFileInfo srcInfo(path);
- QString canonicalSrcPath = srcInfo.dir().canonicalPath() + CSL1("/") + srcInfo.fileName() ;
- QString canonicalDstPath = fPath + CSL1("/") + srcInfo.fileName();
+ TQFileInfo srcInfo(path);
+ TQString canonicalSrcPath = srcInfo.dir().canonicalPath() + CSL1("/") + srcInfo.fileName() ;
+ TQString canonicalDstPath = fPath + CSL1("/") + srcInfo.fileName();
if (canonicalSrcPath == canonicalDstPath)
{
@@ -293,18 +293,18 @@ KPilotLocalLink::~KPilotLocalLink()
return true;
}
-/* virtual */ bool KPilotLocalLink::retrieveDatabase( const QString &path, struct DBInfo *db )
+/* virtual */ bool KPilotLocalLink::retrieveDatabase( const TQString &path, struct DBInfo *db )
{
FUNCTIONSETUP;
- QString dbname = Pilot::fromPilot(db->name) + CSL1(".pdb") ;
- QString sourcefile = fPath + CSL1("/") + dbname ;
- QString destfile = path ;
+ TQString dbname = Pilot::fromPilot(db->name) + CSL1(".pdb") ;
+ TQString sourcefile = fPath + CSL1("/") + dbname ;
+ TQString destfile = path ;
DEBUGKPILOT << fname << ": src=" << sourcefile << endl;
DEBUGKPILOT << fname << ": dst=" << destfile << endl;
- QFile in( sourcefile );
+ TQFile in( sourcefile );
if ( !in.exists() )
{
WARNINGKPILOT << "Source file " << sourcefile << " doesn't exist." << endl;
@@ -316,7 +316,7 @@ KPilotLocalLink::~KPilotLocalLink()
return false;
}
- QFile out( destfile );
+ TQFile out( destfile );
if ( !out.open( IO_WriteOnly | IO_Truncate | IO_Raw ) )
{
WARNINGKPILOT << "Can't write destination file " << destfile << endl;
@@ -350,7 +350,7 @@ KPilotLink::DBInfoList KPilotLocalLink::getDBList( int, int )
}
-/* virtual */ PilotDatabase *KPilotLocalLink::database( const QString &name )
+/* virtual */ PilotDatabase *KPilotLocalLink::database( const TQString &name )
{
FUNCTIONSETUP;
return new PilotLocalDatabase( fPath, name );
diff --git a/kpilot/lib/kpilotlocallink.h b/kpilot/lib/kpilotlocallink.h
index f18556b3c..ca37bb57d 100644
--- a/kpilot/lib/kpilotlocallink.h
+++ b/kpilot/lib/kpilotlocallink.h
@@ -44,12 +44,12 @@ class KDE_EXPORT KPilotLocalLink : public KPilotLink
{
Q_OBJECT
public:
- KPilotLocalLink( QObject *parent=0L, const char *name=0L );
+ KPilotLocalLink( TQObject *parent=0L, const char *name=0L );
virtual ~KPilotLocalLink();
- virtual QString statusString() const;
+ virtual TQString statusString() const;
virtual bool isConnected() const;
- virtual void reset( const QString & );
+ virtual void reset( const TQString & );
virtual void close();
virtual void reset();
virtual bool tickle();
@@ -59,16 +59,16 @@ public:
virtual int getNextDatabase(int index,struct DBInfo *);
virtual int findDatabase(const char *name, struct DBInfo*,
int index=0, unsigned long type=0, unsigned long creator=0);
- virtual bool retrieveDatabase(const QString &path, struct DBInfo *db);
+ virtual bool retrieveDatabase(const TQString &path, struct DBInfo *db);
virtual DBInfoList getDBList(int cardno=0, int flags=dlpDBListRAM);
- virtual PilotDatabase *database( const QString &name );
+ virtual PilotDatabase *database( const TQString &name );
public slots:
void ready();
protected:
- virtual bool installFile(const QString &, const bool deleteFile);
- virtual void addSyncLogEntryImpl( const QString &s );
+ virtual bool installFile(const TQString &, const bool deleteFile);
+ virtual void addSyncLogEntryImpl( const TQString &s );
virtual int pilotSocket() const
{
return -1;
@@ -76,7 +76,7 @@ protected:
protected:
bool fReady;
- QString fPath;
+ TQString fPath;
class Private;
Private *d;
@@ -87,7 +87,7 @@ protected:
*
* @return Number of database in @p path.
*/
- unsigned int findAvailableDatabases( Private &, const QString &path );
+ unsigned int findAvailableDatabases( Private &, const TQString &path );
} ;
diff --git a/kpilot/lib/options.cc b/kpilot/lib/options.cc
index 0eb1babf7..be2b5e6e2 100644
--- a/kpilot/lib/options.cc
+++ b/kpilot/lib/options.cc
@@ -33,7 +33,7 @@
#include <iostream>
-#include <qsize.h>
+#include <tqsize.h>
#include <kconfig.h>
#include <kdebug.h>
@@ -55,11 +55,11 @@ static const char debug_spaces[61] =
" ";
-QString rtExpand(const QString &s, Qt::TextFormat richText)
+TQString rtExpand(const TQString &s, Qt::TextFormat richText)
{
if (richText == Qt::RichText)
{
- QString t(s);
+ TQString t(s);
return t.replace(CSL1("\n"), CSL1("<br/>\n"));
}
else
@@ -69,17 +69,17 @@ QString rtExpand(const QString &s, Qt::TextFormat richText)
}
-QDateTime readTm(const struct tm &t)
+TQDateTime readTm(const struct tm &t)
{
- QDateTime dt;
- dt.setDate(QDate(1900 + t.tm_year, t.tm_mon + 1, t.tm_mday));
- dt.setTime(QTime(t.tm_hour, t.tm_min, t.tm_sec));
+ TQDateTime dt;
+ dt.setDate(TQDate(1900 + t.tm_year, t.tm_mon + 1, t.tm_mday));
+ dt.setTime(TQTime(t.tm_hour, t.tm_min, t.tm_sec));
return dt;
}
-struct tm writeTm(const QDateTime &dt)
+struct tm writeTm(const TQDateTime &dt)
{
struct tm t;
@@ -102,9 +102,9 @@ struct tm writeTm(const QDateTime &dt)
-struct tm writeTm(const QDate &d)
+struct tm writeTm(const TQDate &d)
{
- QDateTime dt(d);
+ TQDateTime dt(d);
return writeTm(dt);
}
diff --git a/kpilot/lib/options.h b/kpilot/lib/options.h
index 6e036e82d..9fe0f8be2 100644
--- a/kpilot/lib/options.h
+++ b/kpilot/lib/options.h
@@ -36,9 +36,9 @@
#include "config.h"
-#include <qglobal.h>
-#include <qnamespace.h>
-#include <qstring.h>
+#include <tqglobal.h>
+#include <tqnamespace.h>
+#include <tqstring.h>
#if (QT_VERSION < 0x030300)
#error "This is KPilot for KDE3.5 and won't compile with Qt < 3.3.0"
@@ -61,9 +61,9 @@
#include <iostream>
using namespace std;
-inline std::ostream& operator <<(std::ostream &o, const QString &s)
+inline std::ostream& operator <<(std::ostream &o, const TQString &s)
{ if (s.isEmpty()) return o<<"<empty>"; else return o<<s.latin1(); }
-inline std::ostream& operator <<(std::ostream &o, const QCString &s)
+inline std::ostream& operator <<(std::ostream &o, const TQCString &s)
{ if (s.isEmpty()) return o<<"<empty>"; else return o << *s; }
@@ -144,19 +144,19 @@ inline std::ostream& operator <<(std::ostream &o, const KPilotDepthCount &d)
// Function to expand newlines in rich text to <br>\n
-QString rtExpand(const QString &s, Qt::TextFormat richText);
+TQString rtExpand(const TQString &s, Qt::TextFormat richText);
/**
* Convert a struct tm from the pilot-link package to a QDateTime
*/
-KDE_EXPORT QDateTime readTm(const struct tm &t);
+KDE_EXPORT TQDateTime readTm(const struct tm &t);
/**
- * Convert a QDateTime to a struct tm for use with the pilot-link package
+ * Convert a TQDateTime to a struct tm for use with the pilot-link package
*/
-KDE_EXPORT struct tm writeTm(const QDateTime &dt);
-KDE_EXPORT struct tm writeTm(const QDate &dt);
+KDE_EXPORT struct tm writeTm(const TQDateTime &dt);
+KDE_EXPORT struct tm writeTm(const TQDate &dt);
// Some layout macros
@@ -180,7 +180,7 @@ KDE_EXPORT struct tm writeTm(const QDate &dt);
// variant is to handle plurals and is wrong, but unavoidable.
//
//
-#define TODO_I18N(a) QString::fromLatin1(a)
+#define TODO_I18N(a) TQString::fromLatin1(a)
#define TODO_I18N_P(a,b,c) ((c>1) ? a : b)
// Handle some cases for QT_NO_CAST_ASCII and NO_ASCII_CAST.
@@ -194,6 +194,6 @@ KDE_EXPORT struct tm writeTm(const QDate &dt);
// with constant strings.
//
//
-#define CSL1(a) QString::fromLatin1(a "")
+#define CSL1(a) TQString::fromLatin1(a "")
#endif
diff --git a/kpilot/lib/pilot.cc b/kpilot/lib/pilot.cc
index 2585445c1..6a1267a9b 100644
--- a/kpilot/lib/pilot.cc
+++ b/kpilot/lib/pilot.cc
@@ -31,8 +31,8 @@
#include "options.h"
-#include <qtextcodec.h>
-#include <qmutex.h>
+#include <tqtextcodec.h>
+#include <tqmutex.h>
#include <kcharsets.h>
#include <kglobal.h>
@@ -44,41 +44,41 @@
namespace Pilot
{
-static QTextCodec *codec = 0L;
-static QMutex* mutex = 0L;
+static TQTextCodec *codec = 0L;
+static TQMutex* mutex = 0L;
-QString fromPilot( const char *c, int len )
+TQString fromPilot( const char *c, int len )
{
mutex->lock();
- QString str = codec->toUnicode(c,len);
+ TQString str = codec->toUnicode(c,len);
mutex->unlock();
return str;
}
-QString fromPilot( const char *c )
+TQString fromPilot( const char *c )
{
mutex->lock();
- QString str = codec->toUnicode(c);
+ TQString str = codec->toUnicode(c);
mutex->unlock();
return str;
}
-QCString toPilot( const QString &s )
+TQCString toPilot( const TQString &s )
{
mutex->lock();
- QCString str = codec->fromUnicode(s);
+ TQCString str = codec->fromUnicode(s);
mutex->unlock();
return str;
}
-int toPilot( const QString &s, char *buf, int len)
+int toPilot( const TQString &s, char *buf, int len)
{
mutex->lock();
// See toPilot() below.
memset( buf, 0, len );
int used = len;
- QCString cbuf = codec->fromUnicode(s,used);
+ TQCString cbuf = codec->fromUnicode(s,used);
if (used > len)
{
used=len;
@@ -88,7 +88,7 @@ int toPilot( const QString &s, char *buf, int len)
return used;
}
-int toPilot( const QString &s, unsigned char *buf, int len)
+int toPilot( const TQString &s, unsigned char *buf, int len)
{
mutex->lock();
// Clear the buffer
@@ -96,7 +96,7 @@ int toPilot( const QString &s, unsigned char *buf, int len)
// Convert to 8-bit encoding
int used = len;
- QCString cbuf = codec->fromUnicode(s,used);
+ TQCString cbuf = codec->fromUnicode(s,used);
// Will it fit in the buffer?
if (used > len)
@@ -113,12 +113,12 @@ int toPilot( const QString &s, unsigned char *buf, int len)
return used;
}
-bool setupPilotCodec(const QString &s)
+bool setupPilotCodec(const TQString &s)
{
FUNCTIONSETUP;
- mutex = new QMutex();
+ mutex = new TQMutex();
mutex->lock();
- QString encoding(KGlobal::charsets()->encodingForName(s));
+ TQString encoding(KGlobal::charsets()->encodingForName(s));
DEBUGKPILOT << fname << ": Using codec name " << s << endl;
DEBUGKPILOT << fname << ": Creating codec " << encoding << endl;
@@ -135,20 +135,20 @@ bool setupPilotCodec(const QString &s)
return codec;
}
-QString codecName()
+TQString codecName()
{
- return QString::fromLatin1(codec->name());
+ return TQString::fromLatin1(codec->name());
}
-QString category(const struct CategoryAppInfo *info, unsigned int i)
+TQString category(const struct CategoryAppInfo *info, unsigned int i)
{
if (!info || (i>=CATEGORY_COUNT))
{
- return QString::null;
+ return TQString::null;
}
mutex->lock();
- QString str = codec->toUnicode(info->name[i],
+ TQString str = codec->toUnicode(info->name[i],
MIN(strlen(info->name[i]), CATEGORY_SIZE-1));
mutex->unlock();
return str;
@@ -156,7 +156,7 @@ QString category(const struct CategoryAppInfo *info, unsigned int i)
int findCategory(const struct CategoryAppInfo *info,
- const QString &selectedCategory,
+ const TQString &selectedCategory,
bool unknownIsUnfiled)
{
FUNCTIONSETUP;
@@ -194,7 +194,7 @@ int findCategory(const struct CategoryAppInfo *info,
}
int insertCategory(struct CategoryAppInfo *info,
- const QString &label,
+ const TQString &label,
bool unknownIsUnfiled)
{
FUNCTIONSETUP;
diff --git a/kpilot/lib/pilot.h b/kpilot/lib/pilot.h
index d4fec82b2..3ac2918bd 100644
--- a/kpilot/lib/pilot.h
+++ b/kpilot/lib/pilot.h
@@ -35,9 +35,9 @@
#include <pi-buffer.h>
#include <pi-dlp.h>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qvaluelist.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqvaluelist.h>
#include "pilotLinkVersion.h"
@@ -77,38 +77,38 @@ namespace Pilot
/** Maximum size (in bytes) of a record's data */
static const int MAX_RECORD_SIZE = 65535;
- typedef QValueList<recordid_t> RecordIDList;
+ typedef TQValueList<recordid_t> RecordIDList;
/** Static translation function that maps handheld native (8 bit,
* usually latin1 but sometimes someting else) encoded data to
* a Unicode string. Converts the @p len characters in @p c
* to a Unicode string.
*/
- QString fromPilot( const char *c, int len );
+ TQString fromPilot( const char *c, int len );
/** Static translation function mapping a NUL-terminated
* string from the handheld's encoding to UTF-8.
* @param c the NUL-terminated string to decode
- * @return QString (UTF-8) value of @p c
+ * @return TQString (UTF-8) value of @p c
* @note NUL-terminated strings are rare on the handheld.
*/
- QString fromPilot( const char *c );
+ TQString fromPilot( const char *c );
- /** Static translation function that maps a QString onto the
+ /** Static translation function that maps a TQString onto the
* native 8 bit encoding of the handheld. Writes the result into
* the buffer @p buf which has size @p len. Returns the length
* of the result. Zero-fills the buffer as needed.
*/
- int toPilot( const QString &s, char *buf, int len);
- int toPilot( const QString &s, unsigned char *buf, int len);
+ int toPilot( const TQString &s, char *buf, int len);
+ int toPilot( const TQString &s, unsigned char *buf, int len);
- /** Static translation function that maps a QString onto the
+ /** Static translation function that maps a TQString onto the
* native 8 bit encoding of the handheld.
*
* @param s String to encode
* @return Encoded string in a QCString
*/
- QCString toPilot( const QString &s );
+ TQCString toPilot( const TQString &s );
/** Create a codec for translating handheld native 8 bit to Unicode,
* using the given codec @p name -- this will often be latin1, but
@@ -117,10 +117,10 @@ namespace Pilot
*
* @return @c true on success, @c false otherwise
*/
- bool setupPilotCodec(const QString &name);
+ bool setupPilotCodec(const TQString &name);
/** Returns the name of the codec being used. */
- QString codecName();
+ TQString codecName();
/** For debugging, display category names for the given AppInfo
* structure. Called by dump(). You must pass a valid reference.
@@ -140,12 +140,12 @@ namespace Pilot
return ((unsigned int)c<CATEGORY_COUNT);
}
- /** Returns the QString for the requested category @p i
- * in the category structure @p info. Returns @c QString::null
+ /** Returns the TQString for the requested category @p i
+ * in the category structure @p info. Returns @c TQString::null
* on error (bad pointer or bad category number). May also
- * return @c QString::null if the category name is empty.
+ * return @c TQString::null if the category name is empty.
*/
- inline QString categoryName(const struct CategoryAppInfo *info, unsigned int i)
+ inline TQString categoryName(const struct CategoryAppInfo *info, unsigned int i)
{
if ( ( i < CATEGORY_COUNT ) && ( info->name[i][0] ) )
{
@@ -157,7 +157,7 @@ namespace Pilot
}
else
{
- return QString::null;
+ return TQString::null;
}
}
@@ -166,16 +166,16 @@ namespace Pilot
* all sixteen categories -- empty category names on the
* handheld are skipped.
*/
- inline QStringList categoryNames(const struct CategoryAppInfo *info)
+ inline TQStringList categoryNames(const struct CategoryAppInfo *info)
{
- QStringList l;
+ TQStringList l;
if (!info)
{
return l;
}
for (unsigned int i=0; i<CATEGORY_COUNT; ++i)
{
- QString s = categoryName(info,i);
+ TQString s = categoryName(info,i);
if (!s.isEmpty())
{
l.append(s);
@@ -198,7 +198,7 @@ namespace Pilot
* @p unknownIsUnfiled is true.
*
*/
- int findCategory(const struct CategoryAppInfo *info, const QString &name, bool unknownIsUnfiled);
+ int findCategory(const struct CategoryAppInfo *info, const TQString &name, bool unknownIsUnfiled);
/** Search for the given category @p name in the list
* of categories; returns the category number. If @p unknownIsUnfiled
@@ -218,7 +218,7 @@ namespace Pilot
* are all full.
*
*/
- int insertCategory(struct CategoryAppInfo *info, const QString &label, bool unknownIsUnfiled);
+ int insertCategory(struct CategoryAppInfo *info, const TQString &label, bool unknownIsUnfiled);
/** The handheld also holds data about each database
* in a DBInfo structure; check if the database described
diff --git a/kpilot/lib/pilotAddress.cc b/kpilot/lib/pilotAddress.cc
index 418c705b4..f12e9cc50 100644
--- a/kpilot/lib/pilotAddress.cc
+++ b/kpilot/lib/pilotAddress.cc
@@ -35,8 +35,8 @@
#include <stdlib.h>
#include <assert.h>
-#include <qnamespace.h>
-#include <qstringlist.h>
+#include <tqnamespace.h>
+#include <tqstringlist.h>
#include "pilotAddress.h"
@@ -91,7 +91,7 @@ void PilotAddressInfo::resetToDefault()
}
}
-QString PilotAddressInfo::phoneLabel(EPhoneType i) const
+TQString PilotAddressInfo::phoneLabel(EPhoneType i) const
{
if (i<=eMobile)
{
@@ -99,7 +99,7 @@ QString PilotAddressInfo::phoneLabel(EPhoneType i) const
}
else
{
- return QString();
+ return TQString();
}
}
@@ -169,9 +169,9 @@ unsigned int PhoneSlot::toField() const
}
}
-PhoneSlot::operator QString() const
+PhoneSlot::operator TQString() const
{
- return QString("%1,%2").arg(toOffset()).arg(toField());
+ return TQString("%1,%2").arg(toOffset()).arg(toField());
}
#define MAXFIELDS 19
@@ -273,13 +273,13 @@ PilotAddress::~PilotAddress()
free_Address(&fAddressInfo);
}
-QString PilotAddress::getTextRepresentation(const PilotAddressInfo *info, Qt::TextFormat richText) const
+TQString PilotAddress::getTextRepresentation(const PilotAddressInfo *info, Qt::TextFormat richText) const
{
- QString text, tmp;
+ TQString text, tmp;
- QString par = (richText==Qt::RichText) ?CSL1("<p>"): QString();
- QString ps = (richText==Qt::RichText) ?CSL1("</p>"):CSL1("\n");
- QString br = (richText==Qt::RichText) ?CSL1("<br/>"):CSL1("\n");
+ TQString par = (richText==Qt::RichText) ?CSL1("<p>"): TQString();
+ TQString ps = (richText==Qt::RichText) ?CSL1("</p>"):CSL1("\n");
+ TQString br = (richText==Qt::RichText) ?CSL1("<br/>"):CSL1("\n");
// title + name
text += par;
@@ -290,11 +290,11 @@ QString PilotAddress::getTextRepresentation(const PilotAddressInfo *info, Qt::Te
}
tmp = richText ? CSL1("<b><big>%1 %2</big></b>") : CSL1("%1 %2");
- QString firstName = getField(entryFirstname);
+ TQString firstName = getField(entryFirstname);
if (firstName.isEmpty())
{
// So replace placeholder for first name (%1) with empty
- tmp = tmp.arg(QString());
+ tmp = tmp.arg(TQString());
}
else
{
@@ -392,7 +392,7 @@ QString PilotAddress::getTextRepresentation(const PilotAddressInfo *info, Qt::Te
// category
if (info)
{
- QString categoryName = info->categoryName( category() );
+ TQString categoryName = info->categoryName( category() );
if (!categoryName.isEmpty())
{
text += par;
@@ -413,16 +413,16 @@ QString PilotAddress::getTextRepresentation(const PilotAddressInfo *info, Qt::Te
return text;
}
-QStringList PilotAddress::getEmails() const
+TQStringList PilotAddress::getEmails() const
{
- QStringList list;
+ TQStringList list;
for ( PhoneSlot i = PhoneSlot::begin(); i.isValid(); ++i)
{
PilotAddressInfo::EPhoneType t = getPhoneType( i );
if ( t == PilotAddressInfo::eEmail )
{
- QString s = getField(i.toField());
+ TQString s = getField(i.toField());
if (!s.isEmpty())
{
list.append(s);
@@ -433,10 +433,10 @@ QStringList PilotAddress::getEmails() const
return list;
}
-void PilotAddress::setEmails(const QStringList &list)
+void PilotAddress::setEmails(const TQStringList &list)
{
FUNCTIONSETUPL(4);
- QString test;
+ TQString test;
// clear all e-mails first
for ( PhoneSlot i = PhoneSlot::begin(); i.isValid(); ++i )
@@ -444,14 +444,14 @@ void PilotAddress::setEmails(const QStringList &list)
PilotAddressInfo::EPhoneType t = getPhoneType( i );
if (t == PilotAddressInfo::eEmail)
{
- setField(i.toField(), QString() );
+ setField(i.toField(), TQString() );
}
}
- for(QStringList::ConstIterator listIter = list.begin();
+ for(TQStringList::ConstIterator listIter = list.begin();
listIter != list.end(); ++listIter)
{
- QString email = *listIter;
+ TQString email = *listIter;
if (!setPhoneField(PilotAddressInfo::eEmail, email, NoFlags).isValid())
{
WARNINGKPILOT << "Email accounts overflowed, silently dropped." << endl;
@@ -459,7 +459,7 @@ void PilotAddress::setEmails(const QStringList &list)
}
}
-QString PilotAddress::getField(int field) const
+TQString PilotAddress::getField(int field) const
{
if ( (entryLastname <= field) && (field <= entryNote) )
{
@@ -467,7 +467,7 @@ QString PilotAddress::getField(int field) const
}
else
{
- return QString();
+ return TQString();
}
}
@@ -487,7 +487,7 @@ PhoneSlot PilotAddress::_getNextEmptyPhoneSlot() const
}
PhoneSlot PilotAddress::setPhoneField(PilotAddressInfo::EPhoneType type,
- const QString &field,
+ const TQString &field,
PhoneHandlingFlags flags)
{
FUNCTIONSETUPL(4);
@@ -531,7 +531,7 @@ PhoneSlot PilotAddress::_findPhoneFieldSlot(PilotAddressInfo::EPhoneType t) cons
return PhoneSlot();
}
-QString PilotAddress::getPhoneField(PilotAddressInfo::EPhoneType type) const
+TQString PilotAddress::getPhoneField(PilotAddressInfo::EPhoneType type) const
{
FUNCTIONSETUPL(4);
PhoneSlot fieldSlot = _findPhoneFieldSlot(type);
@@ -541,7 +541,7 @@ QString PilotAddress::getPhoneField(PilotAddressInfo::EPhoneType type) const
return getField(fieldSlot.toField());
}
- return QString();
+ return TQString();
}
PhoneSlot PilotAddress::getShownPhone() const
@@ -599,7 +599,7 @@ PilotAddressInfo::EPhoneType PilotAddress::getPhoneType( const PhoneSlot &field
}
}
-void PilotAddress::setField(int field, const QString &text)
+void PilotAddress::setField(int field, const TQString &text)
{
FUNCTIONSETUPL(4);
// This will have either been created with unpack_Address, and/or will
diff --git a/kpilot/lib/pilotAddress.h b/kpilot/lib/pilotAddress.h
index d6dd20e45..5bd0a1e0c 100644
--- a/kpilot/lib/pilotAddress.h
+++ b/kpilot/lib/pilotAddress.h
@@ -33,7 +33,7 @@
#include <pi-macros.h>
#include <pi-address.h>
-#include <qnamespace.h>
+#include <tqnamespace.h>
#include "pilotRecord.h"
#include "pilotAppInfo.h"
@@ -119,7 +119,7 @@ public:
return (entryPhone1 <= i) && (i <= entryPhone5);
}
- operator QString() const;
+ operator TQString() const;
private:
int i;
} ;
@@ -150,7 +150,7 @@ public:
eNone=-1
} ;
- QString phoneLabel(EPhoneType i) const;
+ TQString phoneLabel(EPhoneType i) const;
} ;
/** @brief A wrapper class around the Address struct provided by pi-address.h
@@ -202,7 +202,7 @@ public:
* is used to figure out the phone labels; if it is NULL then bogus labels are
* used to identify phone types.
*/
- QString getTextRepresentation(const PilotAddressInfo *info, Qt::TextFormat richText) const;
+ TQString getTextRepresentation(const PilotAddressInfo *info, Qt::TextFormat richText) const;
/**
* @param text set the field value
@@ -215,9 +215,9 @@ public:
* entryTitle, entryCustom1, entryCustom2, entryCustom3, entryCustom4,
* entryNote };
*/
- void setField(int field, const QString &text);
+ void setField(int field, const TQString &text);
/** Set a field @p i to a given text value. Uses the phone slots only. */
- void setField(const PhoneSlot &i, const QString &t)
+ void setField(const PhoneSlot &i, const TQString &t)
{
if (i.isValid())
{
@@ -225,22 +225,22 @@ public:
}
}
- /** Returns the text value of a given field @p field (or QString::null
+ /** Returns the text value of a given field @p field (or TQString::null
* if there is no such field).
*/
- QString getField(int field) const;
+ TQString getField(int field) const;
/** Returns the value of the phone field @p i . */
- QString getField(const PhoneSlot &i) const
+ TQString getField(const PhoneSlot &i) const
{
- return i.isValid() ? getField(i.toField()) : QString();
+ return i.isValid() ? getField(i.toField()) : TQString();
}
/**
* Return list of all email addresses. This will search through our "phone"
* fields and will return only those which are e-mail addresses.
*/
- QStringList getEmails() const;
- void setEmails(const QStringList &emails);
+ TQStringList getEmails() const;
+ void setEmails(const TQStringList &emails);
enum PhoneHandlingFlags
{
@@ -254,7 +254,7 @@ public:
* for extra phone fields
* @return the field associated with the type
*/
- QString getPhoneField(PilotAddressInfo::EPhoneType type) const;
+ TQString getPhoneField(PilotAddressInfo::EPhoneType type) const;
/**
* @param type is the type of phone
@@ -265,7 +265,7 @@ public:
* with the field, else it will always search for the first available slot
* @return index of the field that this information was set to
*/
- PhoneSlot setPhoneField(PilotAddressInfo::EPhoneType type, const QString &value, PhoneHandlingFlags flags);
+ PhoneSlot setPhoneField(PilotAddressInfo::EPhoneType type, const TQString &value, PhoneHandlingFlags flags);
/**
* Returns the slot of the phone number
diff --git a/kpilot/lib/pilotAppInfo.cc b/kpilot/lib/pilotAppInfo.cc
index e8caf6234..5edc57160 100644
--- a/kpilot/lib/pilotAppInfo.cc
+++ b/kpilot/lib/pilotAppInfo.cc
@@ -62,7 +62,7 @@ PilotAppInfoBase::~PilotAppInfoBase()
}
}
-bool PilotAppInfoBase::setCategoryName(unsigned int i, const QString &s)
+bool PilotAppInfoBase::setCategoryName(unsigned int i, const TQString &s)
{
if ( (i>=Pilot::CATEGORY_COUNT) || // bad category number
(!categoryInfo())) // Nowhere to write to
diff --git a/kpilot/lib/pilotAppInfo.h b/kpilot/lib/pilotAppInfo.h
index d5db9e358..b14cf0ace 100644
--- a/kpilot/lib/pilotAppInfo.h
+++ b/kpilot/lib/pilotAppInfo.h
@@ -96,15 +96,15 @@ public:
return fLen;
} ;
- /** @see findCategory(const QString &name, bool unknownIsUnfiled, struct CategoryAppInfo *info). */
- inline int findCategory(const QString &name, bool unknownIsUnfiled = false) const
+ /** @see findCategory(const TQString &name, bool unknownIsUnfiled, struct CategoryAppInfo *info). */
+ inline int findCategory(const TQString &name, bool unknownIsUnfiled = false) const
{
return Pilot::findCategory(fC,name,unknownIsUnfiled);
} ;
- /** Gets a single category name. Returns QString::null if there is no
+ /** Gets a single category name. Returns TQString::null if there is no
* such category number @p i . */
- inline QString categoryName(unsigned int i) const
+ inline TQString categoryName(unsigned int i) const
{
return Pilot::categoryName(fC,i);
}
@@ -113,7 +113,7 @@ public:
* on failure, e.g. the index @p i was out of range or the category name
* was invalid. Category names that are too long are truncated to 15 characters.
*/
- bool setCategoryName(unsigned int i, const QString &s);
+ bool setCategoryName(unsigned int i, const TQString &s);
/** For debugging, display all the category names */
inline void dump() const
diff --git a/kpilot/lib/pilotDatabase.cc b/kpilot/lib/pilotDatabase.cc
index fd568b703..cc65895e7 100644
--- a/kpilot/lib/pilotDatabase.cc
+++ b/kpilot/lib/pilotDatabase.cc
@@ -34,7 +34,7 @@
#include <time.h> // Needed by pilot-link include
#include <pi-appinfo.h>
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include <kglobal.h>
@@ -42,9 +42,9 @@
#include "pilotRecord.h"
static int creationCount = 0;
-static QStringList *createdNames = 0L;
+static TQStringList *createdNames = 0L;
-PilotDatabase::PilotDatabase(const QString &s) :
+PilotDatabase::PilotDatabase(const TQString &s) :
fDBOpen(false),
fName(s)
{
@@ -52,7 +52,7 @@ PilotDatabase::PilotDatabase(const QString &s) :
creationCount++;
if (!createdNames)
{
- createdNames = new QStringList();
+ createdNames = new TQStringList();
}
createdNames->append(s.isEmpty() ? CSL1("<empty>") : s);
}
diff --git a/kpilot/lib/pilotDatabase.h b/kpilot/lib/pilotDatabase.h
index 84c922ed4..82a6431d7 100644
--- a/kpilot/lib/pilotDatabase.h
+++ b/kpilot/lib/pilotDatabase.h
@@ -50,11 +50,11 @@
class KDE_EXPORT PilotDatabase
{
public:
- PilotDatabase(const QString &name = QString::null);
+ PilotDatabase(const TQString &name = TQString::null);
virtual ~PilotDatabase();
- QString name() const { return fName; } ;
+ TQString name() const { return fName; } ;
/**
* Debugging information: tally how many databases are created
@@ -90,7 +90,7 @@ public:
*/
virtual unsigned int recordCount() const=0;
- /** Returns a QValueList of all record ids in the database.
+ /** Returns a TQValueList of all record ids in the database.
This implementation is really bad. */
virtual Pilot::RecordIDList idList();
@@ -146,7 +146,7 @@ public:
* the database. Serial databases get Pilot:, local
* databases return the full path.
*/
- virtual QString dbPathName() const = 0;
+ virtual TQString dbPathName() const = 0;
/**
* Use this instead of RTTI to determine the type of a
@@ -170,7 +170,7 @@ protected:
private:
bool fDBOpen;
- QString fName;
+ TQString fName;
};
/** A template class for reading and interpreting a database. This removes
diff --git a/kpilot/lib/pilotDateEntry.cc b/kpilot/lib/pilotDateEntry.cc
index 4fa93eac6..d7844b897 100644
--- a/kpilot/lib/pilotDateEntry.cc
+++ b/kpilot/lib/pilotDateEntry.cc
@@ -31,9 +31,9 @@
#include <stdlib.h>
-#include <qdatetime.h>
-#include <qnamespace.h>
-#include <qregexp.h>
+#include <tqdatetime.h>
+#include <tqnamespace.h>
+#include <tqregexp.h>
#include <kglobal.h>
@@ -160,12 +160,12 @@ PilotDateEntry & PilotDateEntry::operator = (const PilotDateEntry & e)
} // end of assignment operator
-QString PilotDateEntry::getTextRepresentation(Qt::TextFormat richText)
+TQString PilotDateEntry::getTextRepresentation(Qt::TextFormat richText)
{
- QString text, tmp;
- QString par = (richText==Qt::RichText) ?CSL1("<p>"):QString::null;
- QString ps = (richText==Qt::RichText) ?CSL1("</p>"):CSL1("\n");
- QString br = (richText==Qt::RichText) ?CSL1("<br/>"):CSL1("\n");
+ TQString text, tmp;
+ TQString par = (richText==Qt::RichText) ?CSL1("<p>"):TQString::null;
+ TQString ps = (richText==Qt::RichText) ?CSL1("</p>"):CSL1("\n");
+ TQString br = (richText==Qt::RichText) ?CSL1("<br/>"):CSL1("\n");
// title + name
text += par;
@@ -173,8 +173,8 @@ QString PilotDateEntry::getTextRepresentation(Qt::TextFormat richText)
text += tmp.arg(rtExpand(getDescription(), richText));
text += ps;
- QDateTime dt(readTm(getEventStart()));
- QString startDate(dt.toString(Qt::LocalDate));
+ TQDateTime dt(readTm(getEventStart()));
+ TQString startDate(dt.toString(Qt::LocalDate));
text+=par;
text+=i18n("Start date: %1").arg(startDate);
text+=ps;
@@ -188,7 +188,7 @@ QString PilotDateEntry::getTextRepresentation(Qt::TextFormat richText)
else
{
dt=readTm(getEventEnd());
- QString endDate(dt.toString(Qt::LocalDate));
+ TQString endDate(dt.toString(Qt::LocalDate));
text+=par;
text+=i18n("End date: %1").arg(endDate);
text+=ps;
@@ -204,7 +204,7 @@ QString PilotDateEntry::getTextRepresentation(Qt::TextFormat richText)
case advMinutes: tmp=tmp.arg(i18n("minutes")); break;
case advHours: tmp=tmp.arg(i18n("hours")); break;
case advDays: tmp=tmp.arg(i18n("days")); break;
- default: tmp=tmp.arg(QString::null); break;;
+ default: tmp=tmp.arg(TQString::null); break;;
}
text+=tmp;
text+=ps;
@@ -224,7 +224,7 @@ QString PilotDateEntry::getTextRepresentation(Qt::TextFormat richText)
case repeatMonthlyByDay:
case repeatMonthlyByDate: tmp=tmp.arg(i18n("month(s)")); break;
case repeatYearly: tmp=tmp.arg(i18n("year(s)")); break;
- default: tmp=tmp.arg(QString::null); break;
+ default: tmp=tmp.arg(TQString::null); break;
}
text+=tmp;
text+=br;
@@ -244,7 +244,7 @@ QString PilotDateEntry::getTextRepresentation(Qt::TextFormat richText)
if (getRepeatType()==repeatMonthlyByDay) text+=i18n("Repeating on the i-th day of week j")+br;
if (getRepeatType()==repeatMonthlyByDate) text+=i18n("Repeating on the n-th day of the month")+br;
// TODO: show the dayArray when repeating weekly
- /*QBitArray dayArray(7);
+ /*TQBitArray dayArray(7);
if (getRepeatType()==repeatWeekly) text+=i18n("Repeat day flags: %1").arg(getRepeatDays
const int *days = dateEntry->getRepeatDays();
// Rotate the days of the week, since day numbers on the Pilot and
@@ -263,7 +263,7 @@ QString PilotDateEntry::getTextRepresentation(Qt::TextFormat richText)
text+=i18n("Exceptions:")+br;
for (int i = 0; i < getExceptionCount(); i++)
{
- QDate exdt=readTm(getExceptions()[i]).date();
+ TQDate exdt=readTm(getExceptions()[i]).date();
text+=exdt.toString(Qt::LocalDate);
text+=br;
}
@@ -282,19 +282,19 @@ QString PilotDateEntry::getTextRepresentation(Qt::TextFormat richText)
return text;
}
-QDateTime PilotDateEntry::dtStart() const
+TQDateTime PilotDateEntry::dtStart() const
{
FUNCTIONSETUP;
return readTm( getEventStart() );
}
-QDateTime PilotDateEntry::dtEnd() const
+TQDateTime PilotDateEntry::dtEnd() const
{
FUNCTIONSETUP;
return readTm( getEventEnd() );
}
-QDateTime PilotDateEntry::dtRepeatEnd() const
+TQDateTime PilotDateEntry::dtRepeatEnd() const
{
FUNCTIONSETUP;
return readTm( getRepeatEnd() );
@@ -402,25 +402,25 @@ void PilotDateEntry::setNoteP(const char *note, int l)
}
}
-void PilotDateEntry::setNote(const QString &s)
+void PilotDateEntry::setNote(const TQString &s)
{
- QCString t = Pilot::toPilot(s);
+ TQCString t = Pilot::toPilot(s);
setNoteP( t.data(),t.length() );
}
-void PilotDateEntry::setLocation(const QString &s)
+void PilotDateEntry::setLocation(const TQString &s)
{
- QString note = Pilot::fromPilot(getNoteP());
- QRegExp rxp = QRegExp("^[Ll]ocation:[^\n]+\n");
+ TQString note = Pilot::fromPilot(getNoteP());
+ TQRegExp rxp = TQRegExp("^[Ll]ocation:[^\n]+\n");
- // per QString docs, this covers null and 0 length
+ // per TQString docs, this covers null and 0 length
if( s.isEmpty() )
{
note.replace(rxp,"");
}
else
{
- QString location = "Location: " + s + "\n";
+ TQString location = "Location: " + s + "\n";
int pos = note.find(rxp);
if(pos >= 0)
@@ -435,18 +435,18 @@ void PilotDateEntry::setLocation(const QString &s)
}
}
-QString PilotDateEntry::getLocation() const
+TQString PilotDateEntry::getLocation() const
{
// Read the complete note here and not the filtered
// one from PilotDateEntry::getNote();
- QString note = Pilot::fromPilot(getNoteP());
- QRegExp rxp = QRegExp("^[Ll]ocation:[^\n]+\n");
+ TQString note = Pilot::fromPilot(getNoteP());
+ TQRegExp rxp = TQRegExp("^[Ll]ocation:[^\n]+\n");
int pos = note.find(rxp, 0);
if(pos >= 0)
{
- QString location = rxp.capturedTexts().first();
- rxp = QRegExp("^[Ll]ocation:[\\s|\t]*");
+ TQString location = rxp.capturedTexts().first();
+ rxp = TQRegExp("^[Ll]ocation:[\\s|\t]*");
location.replace(rxp,"");
location.replace("\n", "");
return location;
@@ -457,21 +457,21 @@ QString PilotDateEntry::getLocation() const
}
}
-void PilotDateEntry::setDescription(const QString &s)
+void PilotDateEntry::setDescription(const TQString &s)
{
- QCString t = Pilot::toPilot(s);
+ TQCString t = Pilot::toPilot(s);
setDescriptionP( t.data(),t.length() );
}
-QString PilotDateEntry::getNote() const
+TQString PilotDateEntry::getNote() const
{
- QString note = Pilot::fromPilot(getNoteP());
- QRegExp rxp = QRegExp("^[Ll]ocation:[^\n]+\n");
+ TQString note = Pilot::fromPilot(getNoteP());
+ TQRegExp rxp = TQRegExp("^[Ll]ocation:[^\n]+\n");
note.replace(rxp, "" );
return note;
}
-QString PilotDateEntry::getDescription() const
+TQString PilotDateEntry::getDescription() const
{
return Pilot::fromPilot(getDescriptionP());
}
diff --git a/kpilot/lib/pilotDateEntry.h b/kpilot/lib/pilotDateEntry.h
index d9d5db2a6..43601013d 100644
--- a/kpilot/lib/pilotDateEntry.h
+++ b/kpilot/lib/pilotDateEntry.h
@@ -34,9 +34,9 @@
#include <pi-macros.h>
#include <pi-datebook.h>
-#include <qbitarray.h>
-#include <qdatetime.h>
-#include <qnamespace.h>
+#include <tqbitarray.h>
+#include <tqdatetime.h>
+#include <tqnamespace.h>
#include "pilotRecord.h"
#include "pilotAppInfo.h"
@@ -94,7 +94,7 @@ public:
* If @p richText is true, then the text representation uses qt style
* tags as well.
*/
- QString getTextRepresentation(Qt::TextFormat richText);
+ TQString getTextRepresentation(Qt::TextFormat richText);
/** Is this appointment a "floating" appointment?
*
@@ -151,7 +151,7 @@ public:
* Floating appointments are those that have a day assigned, but no time
* in that day (birthday appointments are like that).
*/
- QDateTime dtStart() const;
+ TQDateTime dtStart() const;
/** Get the end time of this appointment. See dtEnd() for caveats. */
inline struct tm getEventEnd() const
@@ -177,7 +177,7 @@ public:
* Floating appointments are those that have a day assigned, but no time
* in that day (birthday appointments are like that).
*/
- QDateTime dtEnd() const;
+ TQDateTime dtEnd() const;
/** Does this appointment have an alarm set? On the Pilot, an event
* may have an alarm (or not). If it has one, it is also enabled and
@@ -235,7 +235,7 @@ public:
/** Returns the absolute date and time that the alarm should sound for
* this appointment.
*/
- inline QDateTime dtAlarm() const
+ inline TQDateTime dtAlarm() const
{
return dtStart().addSecs(-alarmLeadTime());
}
@@ -271,7 +271,7 @@ public:
/** Returns the date and time that the repeat ends. If there is no repeat,
* returns an invalid date and time.
*/
- QDateTime dtRepeatEnd() const;
+ TQDateTime dtRepeatEnd() const;
inline int getRepeatFrequency() const
{
@@ -302,7 +302,7 @@ public:
fAppointmentInfo.repeatDays[i] = rd[i];
}
}
- inline void setRepeatDays(QBitArray rba)
+ inline void setRepeatDays(TQBitArray rba)
{
for (int i = 0; i < 7; i++)
{
@@ -329,17 +329,17 @@ public:
* entered in the day view on the handheld, and it is called the summary
* in libkcal.
*/
- void setDescription(const QString &);
+ void setDescription(const TQString &);
/** Gets the description of the appointment. See setDescription for meaning. */
- QString getDescription() const;
+ TQString getDescription() const;
/** Sets the note for the appointment. The note is the long text entry
* that is possible - but clumsy - on the handheld. It is called the
* description in libkcal.
*/
- void setNote(const QString &);
+ void setNote(const TQString &);
/** Gets the note for this appointment. See setNote for meaning. */
- QString getNote() const;
+ TQString getNote() const;
/**
* Sets the location for the appointment. For now it will be placed within
@@ -348,10 +348,10 @@ public:
* TODO: Make distinguish between handhelds that support the location field
* and the ones that don't. (Shouldn't this be done in the pilot-link lib?)
*/
- void setLocation(const QString &);
+ void setLocation(const TQString &);
/** Gets the location for this appointment. See setNote for meaning. */
- QString getLocation() const;
+ TQString getLocation() const;
protected:
void setDescriptionP(const char* desc, int l=-1);
diff --git a/kpilot/lib/pilotLocalDatabase.cc b/kpilot/lib/pilotLocalDatabase.cc
index 9f2d5e8a4..735632de7 100644
--- a/kpilot/lib/pilotLocalDatabase.cc
+++ b/kpilot/lib/pilotLocalDatabase.cc
@@ -38,11 +38,11 @@
#include <pi-file.h>
-#include <qstring.h>
-#include <qfile.h>
-#include <qregexp.h>
-#include <qdatetime.h>
-#include <qvaluevector.h>
+#include <tqstring.h>
+#include <tqfile.h>
+#include <tqregexp.h>
+#include <tqdatetime.h>
+#include <tqvaluevector.h>
#include <kdebug.h>
#include <kglobal.h>
@@ -52,7 +52,7 @@
#include "pilotRecord.h"
#include "pilotLocalDatabase.h"
-typedef QValueVector<PilotRecord *> Records;
+typedef TQValueVector<PilotRecord *> Records;
class PilotLocalDatabase::Private : public Records
{
@@ -81,8 +81,8 @@ public:
int pending;
} ;
-PilotLocalDatabase::PilotLocalDatabase(const QString & path,
- const QString & dbName, bool useDefaultPath) :
+PilotLocalDatabase::PilotLocalDatabase(const TQString & path,
+ const TQString & dbName, bool useDefaultPath) :
PilotDatabase(dbName),
fPathName(path),
fDBName(dbName),
@@ -115,10 +115,10 @@ PilotLocalDatabase::PilotLocalDatabase(const QString & path,
}
-PilotLocalDatabase::PilotLocalDatabase(const QString &dbName) :
- PilotDatabase( QString() ),
- fPathName( QString() ),
- fDBName( QString() ),
+PilotLocalDatabase::PilotLocalDatabase(const TQString &dbName) :
+ PilotDatabase( TQString() ),
+ fPathName( TQString() ),
+ fDBName( TQString() ),
fAppInfo(0L),
fAppLen(0),
d(0L)
@@ -182,9 +182,9 @@ bool PilotLocalDatabase::createDatabase(long creator, long type, int, int flags,
fDBInfo.version=version;
fDBInfo.modnum=0;
fDBInfo.index=0;
- fDBInfo.createDate=(QDateTime::currentDateTime()).toTime_t();
- fDBInfo.modifyDate=(QDateTime::currentDateTime()).toTime_t();
- fDBInfo.backupDate=(QDateTime::currentDateTime()).toTime_t();
+ fDBInfo.createDate=(TQDateTime::currentDateTime()).toTime_t();
+ fDBInfo.modifyDate=(TQDateTime::currentDateTime()).toTime_t();
+ fDBInfo.backupDate=(TQDateTime::currentDateTime()).toTime_t();
delete[] fAppInfo;
fAppInfo=0L;
@@ -205,9 +205,9 @@ int PilotLocalDatabase::deleteDatabase()
closeDatabase();
}
- QString dbpath=dbPathName();
- QFile fl(dbpath);
- if (QFile::remove(dbPathName()))
+ TQString dbpath=dbPathName();
+ TQFile fl(dbpath);
+ if (TQFile::remove(dbPathName()))
{
return 0;
}
@@ -269,11 +269,11 @@ unsigned int PilotLocalDatabase::recordCount() const
}
-// Returns a QValueList of all record ids in the database.
-QValueList<recordid_t> PilotLocalDatabase::idList()
+// Returns a TQValueList of all record ids in the database.
+TQValueList<recordid_t> PilotLocalDatabase::idList()
{
int idlen=recordCount();
- QValueList<recordid_t> idlist;
+ TQValueList<recordid_t> idlist;
if (idlen<=0)
{
return idlist;
@@ -588,11 +588,11 @@ int PilotLocalDatabase::cleanup()
return 0;
}
-QString PilotLocalDatabase::dbPathName() const
+TQString PilotLocalDatabase::dbPathName() const
{
FUNCTIONSETUP;
- QString tempName(fPathName);
- QString slash = CSL1("/");
+ TQString tempName(fPathName);
+ TQString slash = CSL1("/");
if (!tempName.endsWith(slash)) tempName += slash;
tempName += getDBName();
@@ -608,10 +608,10 @@ void PilotLocalDatabase::openDatabase()
setDBOpen(false);
- dbFile = pi_file_open( QFile::encodeName(dbPathName()) );
+ dbFile = pi_file_open( TQFile::encodeName(dbPathName()) );
if (dbFile == 0L)
{
- QString path = dbPathName();
+ TQString path = dbPathName();
DEBUGKPILOT << fname << ": Failed to open " << path << endl;
return;
}
@@ -665,13 +665,13 @@ void PilotLocalDatabase::closeDatabase()
return;
}
- QString newName = dbPathName() + CSL1(".new");
- QString path = dbPathName();
+ TQString newName = dbPathName() + CSL1(".new");
+ TQString path = dbPathName();
DEBUGKPILOT << fname
<< ": Creating temp file " << newName
<< " for the database file " << path << endl;
- dbFile = pi_file_create(QFile::encodeName(newName),&fDBInfo);
+ dbFile = pi_file_create(TQFile::encodeName(newName),&fDBInfo);
pi_file_set_app_info(dbFile, fAppInfo, fAppLen);
for (unsigned int i = 0; i < d->size(); i++)
@@ -697,16 +697,16 @@ void PilotLocalDatabase::closeDatabase()
}
pi_file_close(dbFile);
- QFile::remove(dbPathName());
- rename((const char *) QFile::encodeName(newName),
- (const char *) QFile::encodeName(dbPathName()));
+ TQFile::remove(dbPathName());
+ rename((const char *) TQFile::encodeName(newName),
+ (const char *) TQFile::encodeName(dbPathName()));
setDBOpen(false);
}
-QString *PilotLocalDatabase::fPathBase = 0L;
+TQString *PilotLocalDatabase::fPathBase = 0L;
-void PilotLocalDatabase::setDBPath(const QString &s)
+void PilotLocalDatabase::setDBPath(const TQString &s)
{
FUNCTIONSETUP;
@@ -717,7 +717,7 @@ void PilotLocalDatabase::setDBPath(const QString &s)
if (!fPathBase)
{
- fPathBase = new QString(s);
+ fPathBase = new TQString(s);
}
else
{
@@ -731,7 +731,7 @@ void PilotLocalDatabase::setDBPath(const QString &s)
}
-/* static */ bool PilotLocalDatabase::infoFromFile( const QString &path, DBInfo *d )
+/* static */ bool PilotLocalDatabase::infoFromFile( const TQString &path, DBInfo *d )
{
FUNCTIONSETUP;
@@ -741,12 +741,12 @@ void PilotLocalDatabase::setDBPath(const QString &s)
{
return false;
}
- if (!QFile::exists(path))
+ if (!TQFile::exists(path))
{
return false;
}
- QCString fileName = QFile::encodeName( path );
+ TQCString fileName = TQFile::encodeName( path );
f = pi_file_open( fileName );
if (!f)
{
diff --git a/kpilot/lib/pilotLocalDatabase.h b/kpilot/lib/pilotLocalDatabase.h
index c33455800..e5d11a63a 100644
--- a/kpilot/lib/pilotLocalDatabase.h
+++ b/kpilot/lib/pilotLocalDatabase.h
@@ -54,14 +54,14 @@ public:
* the database cannot be found, no database is opened. It can then be
* created explicitly at the specified location.
*/
- PilotLocalDatabase( const QString& path,
- const QString& name, bool useDefaultPath=true);
+ PilotLocalDatabase( const TQString& path,
+ const TQString& name, bool useDefaultPath=true);
/**
* Opens the local database. This is primarily for testing
* purposes; only tries the given path.
*/
- PilotLocalDatabase(const QString &name);
+ PilotLocalDatabase(const TQString &name);
virtual ~PilotLocalDatabase();
@@ -85,8 +85,8 @@ public:
virtual int writeAppBlock(unsigned char* buffer, int len);
// returns the number of records in the database, 0 if not open
virtual unsigned int recordCount() const;
- // Returns a QValueList of all record ids in the database.
- virtual QValueList<recordid_t> idList();
+ // Returns a TQValueList of all record ids in the database.
+ virtual TQValueList<recordid_t> idList();
// Reads a record from database by id, returns record
virtual PilotRecord* readRecordById(recordid_t id);
// Reads a record from database, returns the record
@@ -134,14 +134,14 @@ public:
/** Return the name of the database (as it would be on the handheld). */
- QString getDBName() const { return fDBName; }
+ TQString getDBName() const { return fDBName; }
/**
* Returns the full path of the current database, based on
* the path and dbname passed to the constructor, and including
* the .pdb extension.
*/
- virtual QString dbPathName() const;
+ virtual TQString dbPathName() const;
/**
* Accessor functions for the application info block.
@@ -166,7 +166,7 @@ public:
* library doesn't provide a cheap way of getting this
* information.
*/
- static bool infoFromFile( const QString &path, DBInfo *d );
+ static bool infoFromFile( const TQString &path, DBInfo *d );
protected:
// Changes any forward slashes to underscores
@@ -176,7 +176,7 @@ protected:
private:
struct DBInfo fDBInfo;
- QString fPathName,fDBName;
+ TQString fPathName,fDBName;
char* fAppInfo;
size_t fAppLen;
@@ -189,13 +189,13 @@ public:
* preferred one, too) try this path first before the default path.
* Set statically so it's shared for all local databases.
*/
- static void setDBPath(const QString &);
+ static void setDBPath(const TQString &);
/**
* Accessor for the extra search path.
*/
- static const QString &getDBPath() { return *fPathBase; } ;
+ static const TQString &getDBPath() { return *fPathBase; } ;
private:
- static QString *fPathBase;
+ static TQString *fPathBase;
};
#endif
diff --git a/kpilot/lib/pilotMemo.cc b/kpilot/lib/pilotMemo.cc
index 0ce09f8a7..946a995b1 100644
--- a/kpilot/lib/pilotMemo.cc
+++ b/kpilot/lib/pilotMemo.cc
@@ -28,7 +28,7 @@
#include "options.h"
-#include <qnamespace.h>
+#include <tqnamespace.h>
#include "pilotMemo.h"
#include "pilotDatabase.h"
@@ -74,7 +74,7 @@ PilotRecord *PilotMemo::pack()
}
-QString PilotMemo::getTextRepresentation(Qt::TextFormat richText)
+TQString PilotMemo::getTextRepresentation(Qt::TextFormat richText)
{
if (richText==Qt::RichText)
{
@@ -88,19 +88,19 @@ QString PilotMemo::getTextRepresentation(Qt::TextFormat richText)
}
-QString PilotMemo::getTitle() const
+TQString PilotMemo::getTitle() const
{
- if (fText.isEmpty()) return QString::null;
+ if (fText.isEmpty()) return TQString::null;
int memoTitleLen = fText.find('\n');
if (-1 == memoTitleLen) memoTitleLen=fText.length();
return fText.left(memoTitleLen);
}
-QString PilotMemo::shortTitle() const
+TQString PilotMemo::shortTitle() const
{
FUNCTIONSETUP;
- QString t = QString(getTitle()).simplifyWhiteSpace();
+ TQString t = TQString(getTitle()).simplifyWhiteSpace();
if (t.length() < 32)
return t;
@@ -118,10 +118,10 @@ QString PilotMemo::shortTitle() const
return t;
}
-QString PilotMemo::sensibleTitle() const
+TQString PilotMemo::sensibleTitle() const
{
FUNCTIONSETUP;
- QString s = getTitle();
+ TQString s = getTitle();
if (!s.isEmpty())
{
diff --git a/kpilot/lib/pilotMemo.h b/kpilot/lib/pilotMemo.h
index 6897a0417..f4436ab75 100644
--- a/kpilot/lib/pilotMemo.h
+++ b/kpilot/lib/pilotMemo.h
@@ -28,8 +28,8 @@
** Bug reports and questions can be sent to kde-pim@kde.org
*/
-#include <qnamespace.h>
-#include <qstring.h>
+#include <tqnamespace.h>
+#include <tqstring.h>
#include <pi-memo.h>
@@ -48,7 +48,7 @@ public:
* Constructor. Create a memo in the Unfiled category with
* text @p s .
*/
- PilotMemo(const QString &s) : PilotRecordBase()
+ PilotMemo(const TQString &s) : PilotRecordBase()
{
setText(s);
} ;
@@ -65,7 +65,7 @@ public:
* attributes from the argument @p r, and set the
* text of the memo from string @p s.
*/
- PilotMemo(const PilotRecordBase *r, const QString &s) :
+ PilotMemo(const PilotRecordBase *r, const TQString &s) :
PilotRecordBase(r)
{
setText(s);
@@ -73,10 +73,10 @@ public:
~PilotMemo() { } ;
- virtual QString getTextRepresentation(Qt::TextFormat richText);
- QString text(void) const { return fText; } ;
- void setText(const QString &text) { fText = text.left(MAX_MEMO_LEN); } ;
- QString getTitle(void) const ;
+ virtual TQString getTextRepresentation(Qt::TextFormat richText);
+ TQString text(void) const { return fText; } ;
+ void setText(const TQString &text) { fText = text.left(MAX_MEMO_LEN); } ;
+ TQString getTitle(void) const ;
PilotRecord* pack();
static const int MAX_MEMO_LEN=8192;
@@ -87,16 +87,16 @@ public:
* and inconvenient. shortTitle() returns about 30
* characters.
*/
- QString shortTitle() const;
+ TQString shortTitle() const;
/**
* Returns a (complete) title if there is one and [unknown]
* otherwise.
*/
- QString sensibleTitle() const;
+ TQString sensibleTitle() const;
private:
- QString fText;
+ TQString fText;
};
diff --git a/kpilot/lib/pilotRecord.cc b/kpilot/lib/pilotRecord.cc
index 44ae4f7be..59f055c3c 100644
--- a/kpilot/lib/pilotRecord.cc
+++ b/kpilot/lib/pilotRecord.cc
@@ -36,7 +36,7 @@
#include <string.h>
-#include <qregexp.h>
+#include <tqregexp.h>
#include <kglobal.h>
#include <kcharsets.h>
@@ -46,12 +46,12 @@
-/* virtual */ QString PilotRecordBase::textRepresentation() const
+/* virtual */ TQString PilotRecordBase::textRepresentation() const
{
return CSL1("[ %1,%2,%3 ]") . arg(attributes(),category(),id());
}
-/* virtual */ QString PilotRecord::textRepresentation() const
+/* virtual */ TQString PilotRecord::textRepresentation() const
{
return CSL1("[ %1,%2 ]")
.arg(PilotRecordBase::textRepresentation())
diff --git a/kpilot/lib/pilotRecord.h b/kpilot/lib/pilotRecord.h
index a3812b333..fdf8a33e1 100644
--- a/kpilot/lib/pilotRecord.h
+++ b/kpilot/lib/pilotRecord.h
@@ -130,7 +130,7 @@ public:
*
* @return @c true on success, @c false on failure
*/
- bool setCategory(const struct CategoryAppInfo *info, const QString &label)
+ bool setCategory(const struct CategoryAppInfo *info, const TQString &label)
{
if (!info)
{
@@ -221,7 +221,7 @@ public:
#undef SETTER
/** Returns a text representation of this record. */
- virtual QString textRepresentation() const;
+ virtual TQString textRepresentation() const;
private:
int fAttrib, fCat;
@@ -334,7 +334,7 @@ public:
void setData(const char* data, int len);
/** Returns a text representation of this record. */
- virtual QString textRepresentation() const;
+ virtual TQString textRepresentation() const;
private:
char* fData;
diff --git a/kpilot/lib/pilotSerialDatabase.cc b/kpilot/lib/pilotSerialDatabase.cc
index a38898d1d..f57cac934 100644
--- a/kpilot/lib/pilotSerialDatabase.cc
+++ b/kpilot/lib/pilotSerialDatabase.cc
@@ -34,7 +34,7 @@
#include <pi-dlp.h>
-#include <qfile.h>
+#include <tqfile.h>
#include <klocale.h>
#include <kdebug.h>
@@ -45,7 +45,7 @@
#include "kpilotdevicelink.h"
PilotSerialDatabase::PilotSerialDatabase(KPilotDeviceLink *l,
- const QString &dbName) :
+ const TQString &dbName) :
PilotDatabase(dbName),
fDBName( dbName ),
fDBHandle(-1),
@@ -56,8 +56,8 @@ PilotSerialDatabase::PilotSerialDatabase(KPilotDeviceLink *l,
}
PilotSerialDatabase::PilotSerialDatabase( KPilotDeviceLink *l, const DBInfo *info ) :
- PilotDatabase( info ? Pilot::fromPilot( info->name ) : QString::null ),
- fDBName( QString::null ),
+ PilotDatabase( info ? Pilot::fromPilot( info->name ) : TQString::null ),
+ fDBName( TQString::null ),
fDBHandle( -1 ),
fDBSocket( l->pilotSocket() )
{
@@ -86,9 +86,9 @@ PilotSerialDatabase::~PilotSerialDatabase()
closeDatabase();
}
-QString PilotSerialDatabase::dbPathName() const
+TQString PilotSerialDatabase::dbPathName() const
{
- QString s = CSL1("Pilot:");
+ TQString s = CSL1("Pilot:");
s.append(fDBName);
return s;
}
@@ -140,10 +140,10 @@ unsigned int PilotSerialDatabase::recordCount() const
}
-// Returns a QValueList of all record ids in the database.
-QValueList<recordid_t> PilotSerialDatabase::idList()
+// Returns a TQValueList of all record ids in the database.
+TQValueList<recordid_t> PilotSerialDatabase::idList()
{
- QValueList<recordid_t> idlist;
+ TQValueList<recordid_t> idlist;
int idlen=recordCount();
if (idlen<=0) return idlist;
@@ -346,14 +346,14 @@ void PilotSerialDatabase::openDatabase()
setDBOpen(false);
- QString s = getDBName();
+ TQString s = getDBName();
if (s.isEmpty())
{
WARNINGKPILOT << "Bad DB name, " << s << " string given." << endl;
return;
}
- QCString encodedName = QFile::encodeName(s);
+ TQCString encodedName = TQFile::encodeName(s);
if (encodedName.isEmpty())
{
WARNINGKPILOT << "Bad DB name, "
diff --git a/kpilot/lib/pilotSerialDatabase.h b/kpilot/lib/pilotSerialDatabase.h
index 51a6ba26d..1da2aaacb 100644
--- a/kpilot/lib/pilotSerialDatabase.h
+++ b/kpilot/lib/pilotSerialDatabase.h
@@ -49,7 +49,7 @@ class KDE_EXPORT PilotSerialDatabase : public PilotDatabase
{
friend class KPilotDeviceLink;
protected:
- PilotSerialDatabase( KPilotDeviceLink *l, const QString &dbName );
+ PilotSerialDatabase( KPilotDeviceLink *l, const TQString &dbName );
PilotSerialDatabase( KPilotDeviceLink *l, const DBInfo *info );
public:
@@ -61,8 +61,8 @@ public:
virtual int writeAppBlock(unsigned char* buffer, int len);
/** returns the number of records in the database, 0 if not open */
virtual unsigned int recordCount() const;
- /** Returns a QValueList of all record ids in the database. */
- virtual QValueList<recordid_t> idList();
+ /** Returns a TQValueList of all record ids in the database. */
+ virtual TQValueList<recordid_t> idList();
/** Reads a record from database by id, returns record length */
virtual PilotRecord* readRecordById(recordid_t id);
/** Reads a record from database, returns the record length */
@@ -95,7 +95,7 @@ public:
/** Purges all Archived/Deleted records from Palm Pilot database */
virtual int cleanup();
- virtual QString dbPathName() const;
+ virtual TQString dbPathName() const;
/**
* Deletes the database (by name, as given in the constructor and
@@ -110,7 +110,7 @@ public:
*/
virtual bool createDatabase(long creator=0,
long type=0, int cardno=0, int flags=0, int version=0);
- QString getDBName() { return fDBName; }
+ TQString getDBName() { return fDBName; }
virtual DBType dbType() const;
@@ -130,7 +130,7 @@ protected:
private:
void setDBHandle(int handle) { fDBHandle = handle; }
- QString fDBName;
+ TQString fDBName;
int fDBHandle;
int fDBSocket;
// Pilot-link 0.12 allocates buffers as needed and resizes them.
diff --git a/kpilot/lib/pilotTodoEntry.cc b/kpilot/lib/pilotTodoEntry.cc
index f4c5596fb..1ed9dfa76 100644
--- a/kpilot/lib/pilotTodoEntry.cc
+++ b/kpilot/lib/pilotTodoEntry.cc
@@ -31,8 +31,8 @@
#include <stdlib.h>
-#include <qdatetime.h>
-#include <qnamespace.h>
+#include <tqdatetime.h>
+#include <tqnamespace.h>
#include <kglobal.h>
#include <kdebug.h>
@@ -115,12 +115,12 @@ PilotTodoEntry & PilotTodoEntry::operator = (const PilotTodoEntry & e)
return *this;
}
-QString PilotTodoEntry::getTextRepresentation(Qt::TextFormat richText)
+TQString PilotTodoEntry::getTextRepresentation(Qt::TextFormat richText)
{
- QString text, tmp;
- QString par = (richText==Qt::RichText) ?CSL1("<p>"): QString();
- QString ps = (richText==Qt::RichText) ?CSL1("</p>"):CSL1("\n");
- QString br = (richText==Qt::RichText) ?CSL1("<br/>"):CSL1("\n");
+ TQString text, tmp;
+ TQString par = (richText==Qt::RichText) ?CSL1("<p>"): TQString();
+ TQString ps = (richText==Qt::RichText) ?CSL1("</p>"):CSL1("\n");
+ TQString br = (richText==Qt::RichText) ?CSL1("<br/>"):CSL1("\n");
// title + name
text += par;
@@ -137,8 +137,8 @@ QString PilotTodoEntry::getTextRepresentation(Qt::TextFormat richText)
if (!getIndefinite())
{
- QDate dt(readTm(getDueDate()).date());
- QString dueDate(dt.toString(Qt::LocalDate));
+ TQDate dt(readTm(getDueDate()).date());
+ TQString dueDate(dt.toString(Qt::LocalDate));
text+=par;
text+=i18n("Due date: %1").arg(dueDate);
text+=ps;
@@ -177,7 +177,7 @@ PilotRecord *PilotTodoEntry::pack() const
return new PilotRecord( b, this );
}
-void PilotTodoEntry::setDescription(const QString &desc)
+void PilotTodoEntry::setDescription(const TQString &desc)
{
if (desc.length() < fDescriptionSize)
{
@@ -218,12 +218,12 @@ void PilotTodoEntry::setDescriptionP(const char *desc, int len)
}
}
-QString PilotTodoEntry::getDescription() const
+TQString PilotTodoEntry::getDescription() const
{
return Pilot::fromPilot(getDescriptionP());
}
-void PilotTodoEntry::setNote(const QString &note)
+void PilotTodoEntry::setNote(const TQString &note)
{
if (note.length() < fNoteSize)
{
@@ -263,7 +263,7 @@ void PilotTodoEntry::setNoteP(const char *note, int len)
}
}
-QString PilotTodoEntry::getNote() const
+TQString PilotTodoEntry::getNote() const
{
return Pilot::fromPilot(getNoteP());
}
diff --git a/kpilot/lib/pilotTodoEntry.h b/kpilot/lib/pilotTodoEntry.h
index 3735771b6..020912f9c 100644
--- a/kpilot/lib/pilotTodoEntry.h
+++ b/kpilot/lib/pilotTodoEntry.h
@@ -35,8 +35,8 @@
#include <pi-macros.h>
#include <pi-todo.h>
-#include <qnamespace.h>
-#include <qstring.h>
+#include <tqnamespace.h>
+#include <tqstring.h>
#include "pilotRecord.h"
#include "pilotAppInfo.h"
@@ -72,7 +72,7 @@ public:
/** Return a string for the ToDo item. If @param richText is true, then
* use qt style markup to make the string clearer when displayed.
*/
- QString getTextRepresentation(Qt::TextFormat richText);
+ TQString getTextRepresentation(Qt::TextFormat richText);
/** Assign an existing ToDo item to this one. */
PilotTodoEntry& operator=(const PilotTodoEntry &e);
@@ -131,20 +131,20 @@ public:
/** Get the ToDo item's description (which is the title shown on
* the handheld, and the item's Title in KDE). This uses the default codec.
*/
- QString getDescription() const;
+ TQString getDescription() const;
/** Set the ToDo item's description. */
- void setDescription(const QString &);
+ void setDescription(const TQString &);
/** Get the ToDo item's note (the longer text, not immediately accessible
* on the handheld). This uses the default codec.
*/
- QString getNote() const;
+ TQString getNote() const;
/** Set the ToDo item's note. */
- void setNote(const QString &note);
+ void setNote(const TQString &note);
/** Returns the label for the category this ToDo item is in. */
- QString getCategoryLabel() const;
+ TQString getCategoryLabel() const;
PilotRecord *pack() const;
diff --git a/kpilot/lib/pilotUser.h b/kpilot/lib/pilotUser.h
index 6ba46b007..f7e17489a 100644
--- a/kpilot/lib/pilotUser.h
+++ b/kpilot/lib/pilotUser.h
@@ -60,14 +60,14 @@ public:
}
/** @return The username set on the handheld. */
- QString name() const
+ TQString name() const
{
return Pilot::fromPilot( fUser.username );
}
/** Set the user name to the given @p name , truncated
* if necessary to the size of the field on the handheld.
*/
- void setName( const QString &name )
+ void setName( const TQString &name )
{
Pilot::toPilot( name, fUser.username, sizeof(fUser.username) );
}
diff --git a/kpilot/lib/plugin.cc b/kpilot/lib/plugin.cc
index e9bcc9221..128c8ba99 100644
--- a/kpilot/lib/plugin.cc
+++ b/kpilot/lib/plugin.cc
@@ -35,17 +35,17 @@
#include <stdlib.h>
-#include <qdir.h>
-#include <qfileinfo.h>
-#include <qhbox.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qpushbutton.h>
-#include <qregexp.h>
-#include <qstringlist.h>
-#include <qtabwidget.h>
-#include <qtextview.h>
-#include <qtimer.h>
+#include <tqdir.h>
+#include <tqfileinfo.h>
+#include <tqhbox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqpushbutton.h>
+#include <tqregexp.h>
+#include <tqstringlist.h>
+#include <tqtabwidget.h>
+#include <tqtextview.h>
+#include <tqtimer.h>
#include <dcopclient.h>
#include <kaboutapplication.h>
@@ -65,9 +65,9 @@
#include "plugin.moc"
-ConduitConfigBase::ConduitConfigBase(QWidget *parent,
+ConduitConfigBase::ConduitConfigBase(TQWidget *parent,
const char *name) :
- QObject(parent,name),
+ TQObject(parent,name),
fModified(false),
fWidget(0L),
fConduitName(i18n("Unnamed"))
@@ -86,7 +86,7 @@ ConduitConfigBase::~ConduitConfigBase()
emit changed(true);
}
-/* virtual */ QString ConduitConfigBase::maybeSaveText() const
+/* virtual */ TQString ConduitConfigBase::maybeSaveText() const
{
FUNCTIONSETUP;
@@ -108,36 +108,36 @@ ConduitConfigBase::~ConduitConfigBase()
return true;
}
-QWidget *ConduitConfigBase::aboutPage(QWidget *parent, KAboutData *ad)
+TQWidget *ConduitConfigBase::aboutPage(TQWidget *parent, KAboutData *ad)
{
FUNCTIONSETUP;
- QWidget *w = new QWidget(parent, "aboutpage");
+ TQWidget *w = new TQWidget(parent, "aboutpage");
- QString s;
- QLabel *text;
+ TQString s;
+ TQLabel *text;
KIconLoader *l = KGlobal::iconLoader();
const KAboutData *p = ad ? ad : KGlobal::instance()->aboutData();
- QGridLayout *grid = new QGridLayout(w, 5, 4, SPACING);
+ TQGridLayout *grid = new TQGridLayout(w, 5, 4, SPACING);
grid->addColSpacing(0, SPACING);
grid->addColSpacing(4, SPACING);
- QPixmap applicationIcon =
- l->loadIcon(QString::fromLatin1(p->appName()),
+ TQPixmap applicationIcon =
+ l->loadIcon(TQString::fromLatin1(p->appName()),
KIcon::Desktop,
64, KIcon::DefaultState, 0L,
true);
if (applicationIcon.isNull())
{
- applicationIcon = l->loadIcon(QString::fromLatin1("kpilot"),
+ applicationIcon = l->loadIcon(TQString::fromLatin1("kpilot"),
KIcon::Desktop);
}
- text = new QLabel(w);
+ text = new TQLabel(w);
// Experiment with a long non-<qt> string. Use that to find
// sensible widths for the columns.
//
@@ -148,7 +148,7 @@ QWidget *ConduitConfigBase::aboutPage(QWidget *parent, KAboutData *ad)
int lineheight = text->size().height();
// Use the label to display the applciation icon
- text->setText(QString::null);
+ text->setText(TQString::null);
text->setPixmap(applicationIcon);
text->adjustSize();
grid->addWidget(text, 0, 1);
@@ -165,8 +165,8 @@ QWidget *ConduitConfigBase::aboutPage(QWidget *parent, KAboutData *ad)
grid->setColStretch(3,50);
linktext->setMinimumSize(linewidth,kMax(260,60+12*lineheight));
linktext->setFixedHeight(kMax(260,60+12*lineheight));
- linktext->setVScrollBarMode(QScrollView::Auto/*AlwaysOn*/);
- text = new QLabel(w);
+ linktext->setVScrollBarMode(TQScrollView::Auto/*AlwaysOn*/);
+ text = new TQLabel(w);
grid->addMultiCellWidget(text,0,0,2,3);
grid->addMultiCellWidget(linktext,1,2,1,3);
@@ -183,14 +183,14 @@ QWidget *ConduitConfigBase::aboutPage(QWidget *parent, KAboutData *ad)
if (!p->homepage().isEmpty())
{
- s = QString::null;
+ s = TQString::null;
s += CSL1("<a href=\"%1\">").arg(p->homepage());
s += p->homepage();
s += CSL1("</a><br>");
linktext->append(s);
}
- s = QString::null;
+ s = TQString::null;
s += i18n("Send questions and comments to <a href=\"mailto:%1\">%2</a>.")
.arg( CSL1("kdepim-users@kde.org") )
.arg( CSL1("kdepim-users@kde.org") );
@@ -203,16 +203,16 @@ QWidget *ConduitConfigBase::aboutPage(QWidget *parent, KAboutData *ad)
"<a href=\"help:/kpilot/trademarks.html\">KPilot User's Guide</a>.");
s += CSL1("<br>");
linktext->append(s);
- linktext->append(QString::null);
+ linktext->append(TQString::null);
- QValueList<KAboutPerson> pl = p->authors();
- QValueList<KAboutPerson>::ConstIterator i;
+ TQValueList<KAboutPerson> pl = p->authors();
+ TQValueList<KAboutPerson>::ConstIterator i;
s = i18n("<b>Authors:</b> ");
- QString comma = CSL1(", ");
+ TQString comma = CSL1(", ");
unsigned int count=1;
for (i=pl.begin(); i!=pl.end(); ++i)
@@ -220,13 +220,13 @@ QWidget *ConduitConfigBase::aboutPage(QWidget *parent, KAboutData *ad)
s.append(CSL1("%1 (<i>%2</i>)%3")
.arg((*i).name())
.arg((*i).task())
- .arg(count<pl.count() ? comma : QString::null)
+ .arg(count<pl.count() ? comma : TQString::null)
);
count++;
}
linktext->append(s);
- s = QString::null;
+ s = TQString::null;
pl = p->credits();
if (pl.count()>0)
{
@@ -237,7 +237,7 @@ QWidget *ConduitConfigBase::aboutPage(QWidget *parent, KAboutData *ad)
s.append(CSL1("%1 (<i>%2</i>)%3")
.arg((*i).name())
.arg((*i).task())
- .arg(count<pl.count() ? comma : QString::null)
+ .arg(count<pl.count() ? comma : TQString::null)
);
count++;
}
@@ -250,15 +250,15 @@ QWidget *ConduitConfigBase::aboutPage(QWidget *parent, KAboutData *ad)
return w;
}
-/* static */ void ConduitConfigBase::addAboutPage(QTabWidget *tw,
+/* static */ void ConduitConfigBase::addAboutPage(TQTabWidget *tw,
KAboutData *ad)
{
FUNCTIONSETUP;
Q_ASSERT(tw);
- QWidget *w = aboutPage(tw,ad);
- QSize sz = w->size();
+ TQWidget *w = aboutPage(tw,ad);
+ TQSize sz = w->size();
if (sz.width() < tw->size().width())
{
@@ -278,7 +278,7 @@ QWidget *ConduitConfigBase::aboutPage(QWidget *parent, KAboutData *ad)
ConduitAction::ConduitAction(KPilotLink *p,
const char *name,
- const QStringList &args) :
+ const TQStringList &args) :
SyncAction(p,name),
fDatabase(0L),
fLocalDatabase(0L),
@@ -290,14 +290,14 @@ ConduitAction::ConduitAction(KPilotLink *p,
{
FUNCTIONSETUP;
- QString cResolution(args.grep(QRegExp(CSL1("--conflictResolution \\d*"))).first());
+ TQString cResolution(args.grep(TQRegExp(CSL1("--conflictResolution \\d*"))).first());
if (cResolution.isEmpty())
{
fConflictResolution=(SyncAction::ConflictResolution)
- cResolution.replace(QRegExp(CSL1("--conflictResolution (\\d*)")), CSL1("\\1")).toInt();
+ cResolution.replace(TQRegExp(CSL1("--conflictResolution (\\d*)")), CSL1("\\1")).toInt();
}
- for (QStringList::ConstIterator it = args.begin();
+ for (TQStringList::ConstIterator it = args.begin();
it != args.end();
++it)
{
@@ -320,7 +320,7 @@ ConduitAction::ConduitAction(KPilotLink *p,
KPILOT_DELETE(fCtrPC);
}
-bool ConduitAction::openDatabases(const QString &name, bool *retrieved)
+bool ConduitAction::openDatabases(const TQString &name, bool *retrieved)
{
FUNCTIONSETUP;
@@ -335,7 +335,7 @@ bool ConduitAction::openDatabases(const QString &name, bool *retrieved)
KPILOT_DELETE(fLocalDatabase);
- QString localPathName = PilotLocalDatabase::getDBPath() + name;
+ TQString localPathName = PilotLocalDatabase::getDBPath() + name;
// we always want to use the conduits/ directory for our local
// databases. this keeps our backups and data that our conduits use
@@ -359,7 +359,7 @@ bool ConduitAction::openDatabases(const QString &name, bool *retrieved)
// if there is no backup db yet, fetch it from the palm, open it and set the full sync flag.
if (!localDB->isOpen() )
{
- QString dbpath(localDB->dbPathName());
+ TQString dbpath(localDB->dbPathName());
KPILOT_DELETE(localDB);
DEBUGKPILOT << fname
<< ": Backup database " << dbpath
@@ -383,8 +383,8 @@ bool ConduitAction::openDatabases(const QString &name, bool *retrieved)
dbinfo.flags &= ~dlpDBFlagOpen;
// make sure the dir for the backup db really exists!
- QFileInfo fi(dbpath);
- QString path(QFileInfo(dbpath).dir(true).absPath());
+ TQFileInfo fi(dbpath);
+ TQString path(TQFileInfo(dbpath).dir(true).absPath());
if (!path.endsWith(CSL1("/"))) path.append(CSL1("/"));
if (!KStandardDirs::exists(path))
{
@@ -477,9 +477,9 @@ void ConduitAction::finished()
// this is a percentage...
int allowedVolatility = 70;
- QString caption = i18n("Large Changes Detected");
+ TQString caption = i18n("Large Changes Detected");
// args are already i18n'd
- QString query = i18n("The %1 conduit has made a "
+ TQString query = i18n("The %1 conduit has made a "
"large number of changes to your %2. Do you want "
"to allow this change?\nDetails:\n\t%3");
@@ -494,7 +494,7 @@ void ConduitAction::finished()
/*
int rc = questionYesNo(query, caption,
- QString::null, 0 );
+ TQString::null, 0 );
if (rc == KMessageBox::Yes)
{
// TODO: add commit and rollback code.
@@ -514,7 +514,7 @@ void ConduitAction::finished()
ConduitProxy::ConduitProxy(KPilotLink *p,
- const QString &name,
+ const TQString &name,
const SyncAction::SyncMode &m) :
ConduitAction(p,name.latin1(),m.list()),
fDesktopName(name)
@@ -548,7 +548,7 @@ ConduitProxy::ConduitProxy(KPilotLink *p,
<< endl;
KLibrary *library = KLibLoader::self()->library(
- QFile::encodeName(fLibraryName));
+ TQFile::encodeName(fLibraryName));
if (!library)
{
WARNINGKPILOT << "Can't load library "
@@ -582,11 +582,11 @@ ConduitProxy::ConduitProxy(KPilotLink *p,
return false;
}
- QStringList l = syncMode().list();
+ TQStringList l = syncMode().list();
DEBUGKPILOT << fname << ": Flags: " << syncMode().name() << endl;
- QObject *object = factory->create(fHandle,name(),"SyncAction",l);
+ TQObject *object = factory->create(fHandle,name(),"SyncAction",l);
if (!object)
{
@@ -607,17 +607,17 @@ ConduitProxy::ConduitProxy(KPilotLink *p,
addSyncLogEntry(i18n("[Conduit %1]").arg(fDesktopName));
// Handle the syncDone signal properly & unload the conduit.
- QObject::connect(fConduit,SIGNAL(syncDone(SyncAction *)),
- this,SLOT(execDone(SyncAction *)));
+ TQObject::connect(fConduit,TQT_SIGNAL(syncDone(SyncAction *)),
+ this,TQT_SLOT(execDone(SyncAction *)));
// Proxy all the log and error messages.
- QObject::connect(fConduit,SIGNAL(logMessage(const QString &)),
- this,SIGNAL(logMessage(const QString &)));
- QObject::connect(fConduit,SIGNAL(logError(const QString &)),
- this,SIGNAL(logError(const QString &)));
- QObject::connect(fConduit,SIGNAL(logProgress(const QString &,int)),
- this,SIGNAL(logProgress(const QString &,int)));
-
- QTimer::singleShot(0,fConduit,SLOT(execConduit()));
+ TQObject::connect(fConduit,TQT_SIGNAL(logMessage(const TQString &)),
+ this,TQT_SIGNAL(logMessage(const TQString &)));
+ TQObject::connect(fConduit,TQT_SIGNAL(logError(const TQString &)),
+ this,TQT_SIGNAL(logError(const TQString &)));
+ TQObject::connect(fConduit,TQT_SIGNAL(logProgress(const TQString &,int)),
+ this,TQT_SIGNAL(logProgress(const TQString &,int)));
+
+ TQTimer::singleShot(0,fConduit,TQT_SLOT(execConduit()));
return true;
}
@@ -649,11 +649,11 @@ void ConduitProxy::execDone(SyncAction *p)
namespace PluginUtility
{
-QString findArgument(const QStringList &a, const QString &arg)
+TQString findArgument(const TQStringList &a, const TQString &arg)
{
FUNCTIONSETUP;
- QString search;
+ TQString search;
if (arg.startsWith( CSL1("--") ))
{
@@ -666,20 +666,20 @@ QString findArgument(const QStringList &a, const QString &arg)
search.append( CSL1("=") );
- QStringList::ConstIterator end = a.end();
- for (QStringList::ConstIterator i = a.begin(); i != end; ++i)
+ TQStringList::ConstIterator end = a.end();
+ for (TQStringList::ConstIterator i = a.begin(); i != end; ++i)
{
if ((*i).startsWith( search ))
{
- QString s = (*i).mid(search.length());
+ TQString s = (*i).mid(search.length());
return s;
}
}
- return QString::null;
+ return TQString::null;
}
-/* static */ bool isRunning(const QCString &n)
+/* static */ bool isRunning(const TQCString &n)
{
DCOPClient *dcop = KApplication::kApplication()->dcopClient();
QCStringList apps = dcop->registeredApplications();
@@ -689,7 +689,7 @@ QString findArgument(const QStringList &a, const QString &arg)
/* static */ unsigned long pluginVersion(const KLibrary *lib)
{
- QString symbol = CSL1("version_");
+ TQString symbol = CSL1("version_");
symbol.append(lib->name());
if (!lib->hasSymbol(symbol.latin1())) return 0;
@@ -699,21 +699,21 @@ QString findArgument(const QStringList &a, const QString &arg)
}
-/* static */ QString pluginVersionString(const KLibrary *lib)
+/* static */ TQString pluginVersionString(const KLibrary *lib)
{
- QString symbol= CSL1("id_");
+ TQString symbol= CSL1("id_");
symbol.append(lib->name());
- if (!lib->hasSymbol(symbol.latin1())) return QString::null;
+ if (!lib->hasSymbol(symbol.latin1())) return TQString::null;
- return QString::fromLatin1(*((const char **)(lib->symbol(symbol.latin1()))));
+ return TQString::fromLatin1(*((const char **)(lib->symbol(symbol.latin1()))));
}
}
-CUDCounter::CUDCounter(QString s) :
+CUDCounter::CUDCounter(TQString s) :
fC(0),fU(0),fD(0),fStart(0),fEnd(0),fType(s)
{
}
@@ -743,9 +743,9 @@ void CUDCounter::setEndCount(unsigned int t)
fEnd = t;
}
-QString CUDCounter::moo() const
+TQString CUDCounter::moo() const
{
- QString result = fType + ": " +
+ TQString result = fType + ": " +
i18n("Start: %1. End: %2. ").arg(fStart).arg(fEnd);
if (fC > 0) result += i18n("%1 new. ").arg(fC);
diff --git a/kpilot/lib/plugin.h b/kpilot/lib/plugin.h
index b825b899f..d768b6015 100644
--- a/kpilot/lib/plugin.h
+++ b/kpilot/lib/plugin.h
@@ -29,7 +29,7 @@
** Bug reports and questions can be sent to kde-pim@kde.org
*/
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include "syncAction.h"
@@ -67,11 +67,11 @@ namespace Pilot
* and it's what is used in the KPilot conduit configuration dialog.
* The factory is asked for a "ConduitConfigBase" object.
*
-* NB. The reason that this is a QObject which needs to create a
-* separate widget - instead of a QWidget subclass - has to do with
+* NB. The reason that this is a TQObject which needs to create a
+* separate widget - instead of a TQWidget subclass - has to do with
* layouting. If you make the widget with designer then the easiest
* thing to do is to use a grid layout there. Making ConduitConfigBase
-* a QWidget subclass would require an additional layout here, which
+* a TQWidget subclass would require an additional layout here, which
* seems a little foolish.
*
*/
@@ -83,7 +83,7 @@ public:
* Constructor. Creates a conduit configuration support object
* with the given parent @p parent and name (optional) @p n.
*/
- ConduitConfigBase(QWidget *parent=0L, const char *n=0L);
+ ConduitConfigBase(TQWidget *parent=0L, const char *n=0L);
/** Destructor. */
virtual ~ConduitConfigBase();
@@ -100,7 +100,7 @@ public:
} ;
/** Accessor for the actual widget for the configuration. */
- QWidget *widget() const
+ TQWidget *widget() const
{
return fWidget;
} ;
@@ -124,7 +124,7 @@ public:
*/
virtual bool maybeSave();
- QString conduitName() const { return fConduitName; } ;
+ TQString conduitName() const { return fConduitName; } ;
/**
* This is the function that does the work of adding an about
@@ -139,7 +139,7 @@ public:
* @param data The KAboutData that is used.
*
*/
- static void addAboutPage(QTabWidget *w,
+ static void addAboutPage(TQTabWidget *w,
KAboutData *data=0L);
/**
@@ -154,20 +154,20 @@ public:
* @param parent The widget that holds the about widget.
* @param data The KAboutData that is used to populate the widget.
*/
- static QWidget *aboutPage(QWidget *parent, KAboutData *data=0L);
+ static TQWidget *aboutPage(TQWidget *parent, KAboutData *data=0L);
protected:
/**
* This function provides the string for the prompt used
* in maybeSave(). Override it to change the text.
*/
- virtual QString maybeSaveText() const;
+ virtual TQString maybeSaveText() const;
void unmodified() { fModified=false; } ;
bool fModified;
- QWidget *fWidget;
- QString fConduitName;
+ TQWidget *fWidget;
+ TQString fConduitName;
protected slots:
@@ -196,7 +196,7 @@ class KDE_EXPORT CUDCounter
public:
/** Create new counter initialized to 0, and be told what
* kind of CUD we're counting (PC or Handheld, etc.) */
- CUDCounter(QString s);
+ CUDCounter(TQString s);
/** Track the creation of @p c items */
void created(unsigned int c=1);
@@ -227,12 +227,12 @@ public:
* objects created, updated, deleted. This
* string is already i18n()ed.
*/
- QString moo() const;
+ TQString moo() const;
/** Type of counter(Handheld or PC). This string is already
* i18n()ed.
*/
- QString type() const { return fType; }
+ TQString type() const { return fType; }
private:
/** keep track of Creates, Updates, Deletes, and Total
* number of records so we can detect abnormal behavior and
@@ -243,7 +243,7 @@ private:
/** What kind of CUD are we keeping track of so we can
* moo() it out later? (PC, Handheld, etc.)
*/
- QString fType;
+ TQString fType;
} ;
@@ -264,7 +264,7 @@ Q_OBJECT
public:
ConduitAction(KPilotLink *,
const char *name=0L,
- const QStringList &args = QStringList());
+ const TQStringList &args = TQStringList());
virtual ~ConduitAction();
/** ConduitAction is done doing work. Allow it to sanity-check the
@@ -272,7 +272,7 @@ public:
*/
void finished();
- QString conduitName() const { return fConduitName; } ;
+ TQString conduitName() const { return fConduitName; } ;
/** Retrieve the sync mode set for this action. */
const SyncMode &syncMode() const { return fSyncDirection; };
@@ -338,13 +338,13 @@ protected:
* @param retrieved indicator whether the database had to be loaded
* from the handheld.
*/
- bool openDatabases(const QString &dbName, bool*retrieved=0L);
+ bool openDatabases(const TQString &dbName, bool*retrieved=0L);
/**
* Name of the conduit; might be changed by subclasses. Should
* normally be set in the constructor.
*/
- QString fConduitName;
+ TQString fConduitName;
/** Every plugin has 2 CUDCounters--one for keeping track of
* changes made to PC data and one for keeping track of Palm data. */
@@ -370,7 +370,7 @@ Q_OBJECT
public:
ConduitProxy(KPilotLink *,
- const QString &desktopName,
+ const TQString &desktopName,
const SyncAction::SyncMode &m);
protected:
@@ -379,17 +379,17 @@ protected slots:
void execDone(SyncAction *);
protected:
- QString fDesktopName;
- QString fLibraryName;
+ TQString fDesktopName;
+ TQString fLibraryName;
ConduitAction *fConduit;
} ;
/** A namespace containing only static helper methods. */
namespace PluginUtility
{
- /** Searches the argument list for --foo=bar and returns bar, QString::null if not found.
+ /** Searches the argument list for --foo=bar and returns bar, TQString::null if not found.
* Don't include the -- in the argname. */
- QString findArgument(const QStringList &a, const QString argname);
+ TQString findArgument(const TQStringList &a, const TQString argname);
/**
* This function attempts to detect whether or not the given
@@ -399,14 +399,14 @@ namespace PluginUtility
* The current approach is to ask the DCOP server if the application
* has registered.
*/
- bool isRunning(const QCString &appName);
+ bool isRunning(const TQCString &appName);
/**
* Check a given library for its version, returning 0 if no
* version symbol is found.
*/
unsigned long pluginVersion(const KLibrary *);
- QString pluginVersionString(const KLibrary *);
+ TQString pluginVersionString(const KLibrary *);
}
/**
@@ -420,7 +420,7 @@ namespace PluginUtility
* Q_OBJECT
*
* public:
-* KPilotPlugin(QObject * = 0L,const char * = 0L) ;
+* KPilotPlugin(TQObject * = 0L,const char * = 0L) ;
* virtual ~KPilotPlugin();
* </pre>
*
@@ -440,10 +440,10 @@ namespace PluginUtility
*
* <pre>
* protected:
-* virtual QObject* createObject( QObject* parent = 0,
+* virtual TQObject* createObject( TQObject* parent = 0,
* const char* name = 0,
-* const char* classname = "QObject",
-* const QStringList &args = QStringList() );
+* const char* classname = "TQObject",
+* const TQStringList &args = TQStringList() );
* </pre>
*
* More boilerplate, and support for an instance and about data, used
diff --git a/kpilot/lib/pluginfactory.h b/kpilot/lib/pluginfactory.h
index 8eecc5584..f43c706db 100644
--- a/kpilot/lib/pluginfactory.h
+++ b/kpilot/lib/pluginfactory.h
@@ -27,7 +27,7 @@
** Bug reports and questions can be sent to kde-pim@kde.org
*/
-#include <qwidget.h>
+#include <tqwidget.h>
#include <kdebug.h>
#include <klibloader.h>
@@ -45,22 +45,22 @@ class KPilotLink;
template <class Widget, class Action> class ConduitFactory : public KLibFactory
{
public:
- ConduitFactory(QObject *parent = 0, const char *name = 0) :
+ ConduitFactory(TQObject *parent = 0, const char *name = 0) :
KLibFactory(parent,name)
{ fInstance = new KInstance(name); } ;
virtual ~ConduitFactory()
{ delete fInstance; } ;
protected:
- virtual QObject *createObject(
- QObject* parent = 0,
+ virtual TQObject *createObject(
+ TQObject* parent = 0,
const char* name = 0,
- const char* classname = "QObject",
- const QStringList &args = QStringList() )
+ const char* classname = "TQObject",
+ const TQStringList &args = TQStringList() )
{
if (qstrcmp(classname,"ConduitConfigBase")==0)
{
- QWidget *w = dynamic_cast<QWidget *>(parent);
+ TQWidget *w = dynamic_cast<TQWidget *>(parent);
if (w) return new Widget(w,name);
else
{
diff --git a/kpilot/lib/recordConduit.cc b/kpilot/lib/recordConduit.cc
index f11b3b573..f7692de47 100644
--- a/kpilot/lib/recordConduit.cc
+++ b/kpilot/lib/recordConduit.cc
@@ -37,8 +37,8 @@
#include "options.h"
-#include <qtimer.h>
-#include <qfile.h>
+#include <tqtimer.h>
+#include <tqfile.h>
#include "pilotAppCategory.h"
#include "pilotSerialDatabase.h"
@@ -75,8 +75,8 @@ long version_record_conduit = Pilot::PLUGIN_API;
else fIDList=fDatabase->modifiedIDList();
fIDListIterator = fIDList.begin();
- fTimer = new QTimer(this);
- connect(fTimer,SIGNAL(timeout()),this,SLOT(process()));
+ fTimer = new TQTimer(this);
+ connect(fTimer,TQT_SIGNAL(timeout()),this,TQT_SLOT(process()));
fTimer->start(0,false); // Fire as often as possible to prompt processing
return true;
}
@@ -170,7 +170,7 @@ long version_record_conduit = Pilot::PLUGIN_API;
}
-QString RecordConduitBase::name(RecordConduitBase::SyncProgress s)
+TQString RecordConduitBase::name(RecordConduitBase::SyncProgress s)
{
switch(s)
{
@@ -184,7 +184,7 @@ QString RecordConduitBase::name(RecordConduitBase::SyncProgress s)
}
-QString RecordConduitBase::name(RecordConduitBase::States s)
+TQString RecordConduitBase::name(RecordConduitBase::States s)
{
switch(s)
{
@@ -216,7 +216,7 @@ bool RecordConduit::PCData::makeArchived( RecordConduit::PCEntry *pcEntry )
/* Builds the map which links record ids to uid's of PCEntry. This is the slow implementation,
* that should always work. subclasses should reimplement it to speed things up.
*/
-bool RecordConduit::PCData::mapContactsToPilot( QMap<recordid_t,QString> &idContactMap )
+bool RecordConduit::PCData::mapContactsToPilot( TQMap<recordid_t,TQString> &idContactMap )
{
FUNCTIONSETUP;
@@ -249,7 +249,7 @@ bool RecordConduit::PCData::mapContactsToPilot( QMap<recordid_t,QString> &idCont
bool RecordConduit::mArchiveDeleted = false;
-RecordConduit::RecordConduit(QString name, KPilotDeviceLink * o, const char *n, const QStringList & a):
+RecordConduit::RecordConduit(TQString name, KPilotDeviceLink * o, const char *n, const TQStringList & a):
ConduitAction(o, n, a),
mPCData(0), mPalmIndex(0),
mEntryMap(), mSyncedIds(), mAllIds()
@@ -327,7 +327,7 @@ RecordConduit::~RecordConduit()
for this, and no longer purge the whole addressbook before the sync to
prevent data loss in case of connection loss. */
- QTimer::singleShot(0, this, SLOT(slotPalmRecToPC()));
+ TQTimer::singleShot(0, this, TQT_SLOT(slotPalmRecToPC()));
return true;
}
@@ -342,7 +342,7 @@ void RecordConduit::slotPalmRecToPC()
if ( getSyncDirection() == SyncAction::eCopyPCToHH )
{
mPCIter = mPCData->begin();
- QTimer::singleShot(0, this, SLOT(slotPCRecToPalm()));
+ TQTimer::singleShot(0, this, TQT_SLOT(slotPCRecToPalm()));
return;
}
@@ -354,7 +354,7 @@ void RecordConduit::slotPalmRecToPC()
if ( !palmRec )
{
mPCIter = mPCData->begin();
- QTimer::singleShot( 0, this, SLOT( slotPCRecToPalm() ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( slotPCRecToPalm() ) );
return;
}
@@ -362,7 +362,7 @@ void RecordConduit::slotPalmRecToPC()
if ( mSyncedIds.contains( palmRec->id() ) )
{
KPILOT_DELETE( palmRec );
- QTimer::singleShot( 0, this, SLOT( slotPalmRecToPC() ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( slotPalmRecToPC() ) );
return;
}
@@ -389,7 +389,7 @@ void RecordConduit::slotPalmRecToPC()
KPILOT_DELETE( palmRec );
KPILOT_DELETE( backupRec );
- QTimer::singleShot(0, this, SLOT(slotPalmRecToPC()));
+ TQTimer::singleShot(0, this, TQT_SLOT(slotPalmRecToPC()));
}
@@ -402,7 +402,7 @@ void RecordConduit::slotPCRecToPalm()
mPCData->atEnd( mPCIter ) )
{
mPalmIndex = 0;
- QTimer::singleShot( 0, this, SLOT( slotDeletedRecord() ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( slotDeletedRecord() ) );
return;
}
@@ -418,7 +418,7 @@ void RecordConduit::slotPCRecToPalm()
" marked archived, so don't sync." << endl;
#endif
KPILOT_DELETE( pcEntry );
- QTimer::singleShot( 0, this, SLOT( slotPCRecToPalm() ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( slotPCRecToPalm() ) );
return;
}
@@ -428,7 +428,7 @@ void RecordConduit::slotPCRecToPalm()
// it's a new item(no record ID and not inserted by the Palm -> PC sync), so add it
syncEntry( pcEntry, 0L, 0L );
KPILOT_DELETE( pcEntry );
- QTimer::singleShot( 0, this, SLOT( slotPCRecToPalm() ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( slotPCRecToPalm() ) );
return;
}
@@ -439,7 +439,7 @@ void RecordConduit::slotPCRecToPalm()
DEBUGKPILOT << ": address with id " << recID << " already synced." << endl;
#endif
KPILOT_DELETE( pcEntry );
- QTimer::singleShot( 0, this, SLOT( slotPCRecToPalm() ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( slotPCRecToPalm() ) );
return;
}
@@ -470,7 +470,7 @@ void RecordConduit::slotPCRecToPalm()
mSyncedIds.append( recID );
// done with the sync process, go on with the next one:
- QTimer::singleShot( 0, this, SLOT( slotPCRecToPalm() ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( slotPCRecToPalm() ) );
}
@@ -483,7 +483,7 @@ void RecordConduit::slotDeletedRecord()
if( !backupRec || isFirstSync() )
{
KPILOT_DELETE(backupRec);
- QTimer::singleShot( 0, this, SLOT( slotDeleteUnsyncedPCRecords() ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( slotDeleteUnsyncedPCRecords() ) );
return;
}
@@ -491,11 +491,11 @@ void RecordConduit::slotDeletedRecord()
if ( mSyncedIds.contains( backupRec->id() ) )
{
KPILOT_DELETE( backupRec );
- QTimer::singleShot( 0, this, SLOT( slotDeletedRecord() ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( slotDeletedRecord() ) );
return;
}
- QString uid = mEntryMap[ backupRec->id() ];
+ TQString uid = mEntryMap[ backupRec->id() ];
PCEntry *pcEntry = mPCData->findByUid( uid );
PilotRecord *palmRec = fDatabase->readRecordById( backupRec->id() );
PilotAppCategory *backupEntry = 0L;
@@ -513,7 +513,7 @@ void RecordConduit::slotDeletedRecord()
KPILOT_DELETE( backupEntry );
KPILOT_DELETE( palmRec );
KPILOT_DELETE( backupRec );
- QTimer::singleShot( 0, this, SLOT( slotDeletedRecord() ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( slotDeletedRecord() ) );
}
@@ -523,9 +523,9 @@ void RecordConduit::slotDeleteUnsyncedPCRecords()
FUNCTIONSETUP;
if ( getSyncDirection() == SyncAction::eCopyHHToPC )
{
- QStringList uids;
+ TQStringList uids;
RecordIDList::iterator it;
- QString uid;
+ TQString uid;
for ( it = mSyncedIds.begin(); it != mSyncedIds.end(); ++it)
{
uid = mEntryMap[ *it ];
@@ -533,8 +533,8 @@ void RecordConduit::slotDeleteUnsyncedPCRecords()
}
// TODO: Does this speed up anything?
// qHeapSort( uids );
- const QStringList alluids( mPCData->uids() );
- QStringList::ConstIterator uidit;
+ const TQStringList alluids( mPCData->uids() );
+ TQStringList::ConstIterator uidit;
for ( uidit = alluids.constBegin(); uidit != alluids.constEnd(); ++uidit )
{
if ( !uids.contains( *uidit ) )
@@ -546,7 +546,7 @@ void RecordConduit::slotDeleteUnsyncedPCRecords()
}
}
}
- QTimer::singleShot(0, this, SLOT(slotDeleteUnsyncedHHRecords()));
+ TQTimer::singleShot(0, this, TQT_SLOT(slotDeleteUnsyncedHHRecords()));
}
@@ -570,7 +570,7 @@ void RecordConduit::slotDeleteUnsyncedHHRecords()
}
}
}
- QTimer::singleShot( 0, this, SLOT( slotCleanup() ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( slotCleanup() ) );
}
@@ -602,11 +602,11 @@ void RecordConduit::slotCleanup()
/** Return the list of category names on the handheld
*/
-const QStringList RecordConduit::categories() const
+const TQStringList RecordConduit::categories() const
{
- QStringList cats;
+ TQStringList cats;
for ( unsigned int j = 0; j < Pilot::CATEGORY_COUNT; j++ ) {
- QString catName( category( j ) );
+ TQString catName( category( j ) );
if ( !catName.isEmpty() ) cats << catName;
}
return cats;
@@ -684,7 +684,7 @@ void RecordConduit::_setAppInfo()
}
-int RecordConduit::compareStr( const QString & str1, const QString & str2 )
+int RecordConduit::compareStr( const TQString & str1, const TQString & str2 )
{
// FUNCTIONSETUP;
if ( str1.isEmpty() && str2.isEmpty() )
@@ -696,23 +696,23 @@ int RecordConduit::compareStr( const QString & str1, const QString & str2 )
/**
* _getCat returns the id of the category from the given categories list.
- * If the address has no categories on the PC, QString::null is returned.
+ * If the address has no categories on the PC, TQString::null is returned.
* If the current category exists in the list of cats, it is returned
* Otherwise the first cat in the list that exists on the HH is returned
- * If none of the categories exists on the palm, QString::null is returned
+ * If none of the categories exists on the palm, TQString::null is returned
*/
-QString RecordConduit::getCatForHH( const QStringList cats, const QString curr ) const
+TQString RecordConduit::getCatForHH( const TQStringList cats, const TQString curr ) const
{
FUNCTIONSETUP;
if ( cats.size() < 1 )
- return QString::null;
+ return TQString::null;
if ( cats.contains( curr ) )
return curr;
- for ( QStringList::ConstIterator it = cats.begin(); it != cats.end(); ++it)
+ for ( TQStringList::ConstIterator it = cats.begin(); it != cats.end(); ++it)
{
for ( unsigned int j = 0; j < Pilot::CATEGORY_COUNT; j++ )
{
- QString catnm( category( j ) );
+ TQString catnm( category( j ) );
if ( !(*it).isEmpty() && ( (*it)==catnm ) )
{
return catnm;
@@ -720,11 +720,11 @@ QString RecordConduit::getCatForHH( const QStringList cats, const QString curr )
}
}
// If we have a free label, return the first possible cat
- QString lastCat( category( Pilot::CATEGORY_COUNT-1 ) );
- return ( lastCat.isEmpty() ) ? ( cats.first() ) : ( QString::null );
+ TQString lastCat( category( Pilot::CATEGORY_COUNT-1 ) );
+ return ( lastCat.isEmpty() ) ? ( cats.first() ) : ( TQString::null );
}
-void RecordConduit::setCategory(PCEntry * pcEntry, QString cat)
+void RecordConduit::setCategory(PCEntry * pcEntry, TQString cat)
{
if ( !cat.isEmpty() && cat!=category( 0 ) )
pcEntry->insertCategory(cat);
@@ -1096,7 +1096,7 @@ RecordConduit::PCEntry *RecordConduit::findMatch( PilotAppCategory *palmEntry )
// first, use the pilotID to UID map to find the appropriate record
if( !isFirstSync() && ( palmEntry->id() > 0) )
{
- QString id( mEntryMap[palmEntry->id()] );
+ TQString id( mEntryMap[palmEntry->id()] );
#ifdef DEBUG
DEBUGKPILOT << fname << ": PilotRecord has id " << palmEntry->id() << ", mapped to " << id << endl;
#endif
@@ -1131,7 +1131,7 @@ RecordConduit::PCEntry *RecordConduit::findMatch( PilotAppCategory *palmEntry )
KPILOT_DELETE( abEntry );
}
#ifdef DEBUG
- DEBUGKPILOT << fname << ": Could not find any entry matching Palm record with id " << QString::number( palmEntry->id() ) << endl;
+ DEBUGKPILOT << fname << ": Could not find any entry matching Palm record with id " << TQString::number( palmEntry->id() ) << endl;
#endif
return 0;
}
diff --git a/kpilot/lib/recordConduit.h b/kpilot/lib/recordConduit.h
index d12ceef2e..743e326d2 100644
--- a/kpilot/lib/recordConduit.h
+++ b/kpilot/lib/recordConduit.h
@@ -27,7 +27,7 @@
** Bug reports and questions can be sent to kde-pim@kde.org
*/
-#include <qtimer.h>
+#include <tqtimer.h>
#include <klocale.h>
#include "plugin.h"
@@ -57,11 +57,11 @@ class RecordConduitBase : public ConduitAction
{
Q_OBJECT
public:
- /** Constructor. The QStringList @p a sets flags for the ConduitAction.
+ /** Constructor. The TQStringList @p a sets flags for the ConduitAction.
*/
RecordConduitBase(KPilotDeviceLink *o,
const char *n,
- const QStringList a = QStringList()) :
+ const TQStringList a = TQStringList()) :
ConduitAction(o,n,a),
fTimer(0L)
{
@@ -80,12 +80,12 @@ public:
enum SyncProgress { NotDone=0, Done=1, Error=2 } ;
/** Returns a human-readable name for the progress indicator @p s */
- static QString name(SyncProgress s);
+ static TQString name(SyncProgress s);
/** State of the conduit's sync. This is changed by process(). */
enum States { Initialize, PalmToPC, PCToPalm, Cleanup } ;
- static QString name(States s);
+ static TQString name(States s);
protected:
/** Function called at the beginning of a sync to load data from the PC.
@@ -129,14 +129,14 @@ protected:
private:
/** Timer to signal the process() slot. Used to keep the UI responsive. */
- QTimer *fTimer;
+ TQTimer *fTimer;
States fState;
Pilot::RecordIDList fIDList;
Pilot::RecordIDList::Iterator fIDListIterator;
- QString fDBName;
+ TQString fDBName;
} ;
template <class PCEntry, class PCContainer, class HHEntry, class HHAppInfo, class Syncer>
@@ -146,8 +146,8 @@ public:
/** Construct a record conduit on a given device link. */
RecordConduit(
KPilotDeviceLink *o /**< Connection to HH */,
- const char *n /**< Name for QObject */,
- const QStringList a = QStringList() /**< Flags */) :
+ const char *n /**< Name for TQObject */,
+ const TQStringList a = TQStringList() /**< Flags */) :
RecordConduitBase(o,n,a)
{
} ;
diff --git a/kpilot/lib/syncAction.cc b/kpilot/lib/syncAction.cc
index 818503807..d9f539559 100644
--- a/kpilot/lib/syncAction.cc
+++ b/kpilot/lib/syncAction.cc
@@ -34,17 +34,17 @@
#include <pi-socket.h>
#include <pi-dlp.h>
-#include <qtimer.h>
-#include <qvbox.h>
-#include <qlayout.h>
-#include <qcheckbox.h>
-#include <qlabel.h>
-#include <qmessagebox.h>
-#include <qdir.h>
-#include <qfile.h>
-#include <qfileinfo.h>
-#include <qtl.h>
-#include <qstyle.h>
+#include <tqtimer.h>
+#include <tqvbox.h>
+#include <tqlayout.h>
+#include <tqcheckbox.h>
+#include <tqlabel.h>
+#include <tqmessagebox.h>
+#include <tqdir.h>
+#include <tqfile.h>
+#include <tqfileinfo.h>
+#include <tqtl.h>
+#include <tqstyle.h>
#include <kdialogbase.h>
#include <kglobal.h>
@@ -57,7 +57,7 @@
SyncAction::SyncAction(KPilotLink *p,
const char *name) :
- QObject(p, name),
+ TQObject(p, name),
fHandle(p),
fParent(0L)
{
@@ -65,9 +65,9 @@ SyncAction::SyncAction(KPilotLink *p,
}
SyncAction::SyncAction(KPilotLink *p,
- QWidget * visibleparent,
+ TQWidget * visibleparent,
const char *name) :
- QObject(p, name),
+ TQObject(p, name),
fHandle(p),
fParent(visibleparent)
{
@@ -78,12 +78,12 @@ SyncAction::~SyncAction()
{
}
-/* virtual */ QString SyncAction::statusString() const
+/* virtual */ TQString SyncAction::statusString() const
{
FUNCTIONSETUP;
- QString s = CSL1("status=");
+ TQString s = CSL1("status=");
- s.append(QString::number(status()));
+ s.append(TQString::number(status()));
return s;
}
@@ -101,7 +101,7 @@ SyncAction::~SyncAction()
if (!r)
{
emit logError(i18n("The conduit %1 could not be executed.")
- .arg(QString::fromLatin1(name())));
+ .arg(TQString::fromLatin1(name())));
delayDone();
}
}
@@ -113,7 +113,7 @@ SyncAction::~SyncAction()
bool SyncAction::delayDone()
{
- QTimer::singleShot(0,this,SLOT(delayedDoneSlot()));
+ TQTimer::singleShot(0,this,TQT_SLOT(delayedDoneSlot()));
return true;
}
@@ -134,7 +134,7 @@ static struct
}
;
-SyncAction::SyncMode::SyncMode(const QStringList &args) :
+SyncAction::SyncMode::SyncMode(const TQStringList &args) :
fMode(eHotSync),
fTest(args.contains("--test")),
fLocal(args.contains("--local"))
@@ -142,7 +142,7 @@ SyncAction::SyncMode::SyncMode(const QStringList &args) :
int i = 0;
while(maps[i].name)
{
- if (args.contains(QString::fromLatin1(maps[i].name)))
+ if (args.contains(TQString::fromLatin1(maps[i].name)))
{
fMode = maps[i].mode;
break;
@@ -170,18 +170,18 @@ SyncAction::SyncMode::SyncMode(Mode m, bool test, bool local) :
}
}
-QStringList SyncAction::SyncMode::list() const
+TQStringList SyncAction::SyncMode::list() const
{
FUNCTIONSETUPL(3);
- QStringList l;
+ TQStringList l;
int i=0;
while(maps[i].name)
{
if ( fMode == maps[i].mode )
{
- l.append(QString::fromLatin1(maps[i].name));
+ l.append(TQString::fromLatin1(maps[i].name));
break;
}
i++;
@@ -189,7 +189,7 @@ QStringList SyncAction::SyncMode::list() const
if ( !maps[i].name )
{
WARNINGKPILOT << "Mode " << fMode << " does not have a name." << endl;
- l.append(QString::fromLatin1(maps[0].name));
+ l.append(TQString::fromLatin1(maps[0].name));
}
if (isTest()) l.append(CSL1("--test"));
@@ -197,7 +197,7 @@ QStringList SyncAction::SyncMode::list() const
return l;
}
-/* static */ QString SyncAction::SyncMode::name(SyncAction::SyncMode::Mode e)
+/* static */ TQString SyncAction::SyncMode::name(SyncAction::SyncMode::Mode e)
{
switch(e)
{
@@ -211,9 +211,9 @@ QStringList SyncAction::SyncMode::list() const
return CSL1("<unknown>");
}
-QString SyncAction::SyncMode::name() const
+TQString SyncAction::SyncMode::name() const
{
- QString s = name(fMode);
+ TQString s = name(fMode);
if (isTest())
{
@@ -272,7 +272,7 @@ void SyncAction::startTickle(unsigned timeout)
}
else
{
- connect(deviceLink(),SIGNAL(timeout()),this,SIGNAL(timeout()));
+ connect(deviceLink(),TQT_SIGNAL(timeout()),this,TQT_SIGNAL(timeout()));
deviceLink()->startTickle(timeout);
}
}
@@ -286,18 +286,18 @@ void SyncAction::stopTickle()
}
else
{
- disconnect(deviceLink(),SIGNAL(timeout()),this,SIGNAL(timeout()));
+ disconnect(deviceLink(),TQT_SIGNAL(timeout()),this,TQT_SIGNAL(timeout()));
deviceLink()->stopTickle();
}
}
-int SyncAction::questionYesNo(const QString & text,
- const QString & caption,
- const QString & key,
+int SyncAction::questionYesNo(const TQString & text,
+ const TQString & caption,
+ const TQString & key,
unsigned timeout,
- const QString & yes,
- const QString &no )
+ const TQString & yes,
+ const TQString &no )
{
FUNCTIONSETUP;
@@ -322,17 +322,17 @@ int SyncAction::questionYesNo(const QString & text,
if ( (timeout > 0) && ( deviceLink() ) )
{
- QObject::connect(deviceLink(), SIGNAL(timeout()),
- dialog, SLOT(slotCancel()));
+ TQObject::connect(deviceLink(), TQT_SIGNAL(timeout()),
+ dialog, TQT_SLOT(slotCancel()));
startTickle(timeout);
}
#if KDE_IS_VERSION(3,3,0)
r = (KMessageBox::ButtonCode) KMessageBox::createKMessageBox(dialog,
- QMessageBox::Question,
+ TQMessageBox::Question,
text,
- QStringList(),
- (key.isEmpty() ? QString::null : i18n("&Do not ask again")),
+ TQStringList(),
+ (key.isEmpty() ? TQString::null : i18n("&Do not ask again")),
&checkboxReturn,
0);
@@ -342,32 +342,32 @@ int SyncAction::questionYesNo(const QString & text,
// by Waldo Bastian.
//
//
- QVBox *topcontents = new QVBox(dialog);
+ TQVBox *topcontents = new TQVBox(dialog);
topcontents->setSpacing(KDialog::spacingHint() * 2);
topcontents->setMargin(KDialog::marginHint() * 2);
- QWidget *contents = new QWidget(topcontents);
- QHBoxLayout *lay = new QHBoxLayout(contents);
+ TQWidget *contents = new TQWidget(topcontents);
+ TQHBoxLayout *lay = new TQHBoxLayout(contents);
lay->setSpacing(KDialog::spacingHint() * 2);
lay->addStretch(1);
- QLabel *label1 = new QLabel( contents);
- label1->setPixmap(QMessageBox::standardIcon(QMessageBox::Information));
+ TQLabel *label1 = new TQLabel( contents);
+ label1->setPixmap(TQMessageBox::standardIcon(TQMessageBox::Information));
lay->add( label1 );
- QLabel *label2 = new QLabel( text, contents);
+ TQLabel *label2 = new TQLabel( text, contents);
label2->setMinimumSize(label2->sizeHint());
lay->add(label2);
lay->addStretch(1);
- QSize extraSize = QSize(50, 30);
+ TQSize extraSize = TQSize(50, 30);
- QCheckBox *checkbox = 0L;
+ TQCheckBox *checkbox = 0L;
if (!key.isEmpty())
{
- checkbox = new QCheckBox(i18n("Do not ask again"),topcontents);
- extraSize = QSize(50,0);
+ checkbox = new TQCheckBox(i18n("Do not ask again"),topcontents);
+ extraSize = TQSize(50,0);
}
dialog->setMainWidget(topcontents);
@@ -400,12 +400,12 @@ int SyncAction::questionYesNo(const QString & text,
}
-int SyncAction::questionYesNoCancel(const QString & text,
- const QString & caption,
- const QString & key,
+int SyncAction::questionYesNoCancel(const TQString & text,
+ const TQString & caption,
+ const TQString & key,
unsigned timeout,
- const QString &yes,
- const QString &no)
+ const TQString &yes,
+ const TQString &no)
{
FUNCTIONSETUP;
@@ -435,17 +435,17 @@ int SyncAction::questionYesNoCancel(const QString & text,
if ( (timeout > 0) && (deviceLink()) )
{
- QObject::connect(deviceLink(), SIGNAL(timeout()),
- dialog, SLOT(slotCancel()));
+ TQObject::connect(deviceLink(), TQT_SIGNAL(timeout()),
+ dialog, TQT_SLOT(slotCancel()));
startTickle(timeout);
}
#if KDE_IS_VERSION(3,3,0)
r = KMessageBox::createKMessageBox(dialog,
- QMessageBox::Question,
+ TQMessageBox::Question,
text,
- QStringList(),
- (key.isEmpty() ? QString::null : i18n("&Do not ask again")),
+ TQStringList(),
+ (key.isEmpty() ? TQString::null : i18n("&Do not ask again")),
&checkboxReturn,
0);
#else
@@ -454,32 +454,32 @@ int SyncAction::questionYesNoCancel(const QString & text,
// by Waldo Bastian.
//
//
- QVBox *topcontents = new QVBox(dialog);
+ TQVBox *topcontents = new TQVBox(dialog);
topcontents->setSpacing(KDialog::spacingHint() * 2);
topcontents->setMargin(KDialog::marginHint() * 2);
- QWidget *contents = new QWidget(topcontents);
- QHBoxLayout *lay = new QHBoxLayout(contents);
+ TQWidget *contents = new TQWidget(topcontents);
+ TQHBoxLayout *lay = new TQHBoxLayout(contents);
lay->setSpacing(KDialog::spacingHint() * 2);
lay->addStretch(1);
- QLabel *label1 = new QLabel( contents);
- label1->setPixmap(QMessageBox::standardIcon(QMessageBox::Information));
+ TQLabel *label1 = new TQLabel( contents);
+ label1->setPixmap(TQMessageBox::standardIcon(TQMessageBox::Information));
lay->add( label1 );
- QLabel *label2 = new QLabel( text, contents);
+ TQLabel *label2 = new TQLabel( text, contents);
label2->setMinimumSize(label2->sizeHint());
lay->add(label2);
lay->addStretch(1);
- QSize extraSize = QSize(50, 30);
+ TQSize extraSize = TQSize(50, 30);
- QCheckBox *checkbox = 0L;
+ TQCheckBox *checkbox = 0L;
if (!key.isEmpty())
{
- checkbox = new QCheckBox(i18n("Do not ask again"),topcontents);
- extraSize = QSize(50,0);
+ checkbox = new TQCheckBox(i18n("Do not ask again"),topcontents);
+ extraSize = TQSize(50,0);
}
dialog->setMainWidget(topcontents);
diff --git a/kpilot/lib/syncAction.h b/kpilot/lib/syncAction.h
index a93bff99c..4643e7c6e 100644
--- a/kpilot/lib/syncAction.h
+++ b/kpilot/lib/syncAction.h
@@ -33,9 +33,9 @@
#include <pi-dlp.h>
-#include <qobject.h>
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqobject.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
#include "kpilotlink.h"
@@ -55,7 +55,7 @@ public:
SyncAction(KPilotLink *p,
const char *name=0L);
SyncAction(KPilotLink *p,
- QWidget *visibleparent,
+ TQWidget *visibleparent,
const char *name=0L);
~SyncAction();
@@ -70,7 +70,7 @@ public:
return fActionStatus;
}
/** Return a human-readable representation of the status. */
- virtual QString statusString() const;
+ virtual TQString statusString() const;
protected:
/**
@@ -97,9 +97,9 @@ public slots:
signals:
void syncDone(SyncAction *);
- void logMessage(const QString &);
- void logError(const QString &);
- void logProgress(const QString &,int);
+ void logMessage(const TQString &);
+ void logError(const TQString &);
+ void logProgress(const TQString &,int);
protected slots:
/** This slot emits syncDone(), and does nothing else. This
@@ -128,7 +128,7 @@ public:
* @note Having messages appear on the handheld but not in KPilot
* should be a @em very rare occurrence.
*/
- void addSyncLogEntry(const QString &e,bool log=true)
+ void addSyncLogEntry(const TQString &e,bool log=true)
{
if (deviceLink())
{
@@ -138,17 +138,17 @@ public:
/** Public API for adding a message to the log in KPilot.
* Adds @p msg to the synclog maintained on the PC.
*/
- void addLogMessage( const QString &msg )
+ void addLogMessage( const TQString &msg )
{
emit logMessage( msg );
}
/** Log an error message in KPilot (the PC side of things). */
- void addLogError( const QString &msg )
+ void addLogError( const TQString &msg )
{
emit logError( msg );
}
/** Log progress in KPilot (the PC side of things). */
- void addLogProgress( const QString &msg, int prog )
+ void addLogProgress( const TQString &msg, int prog )
{
emit logProgress( msg, prog );
}
@@ -217,7 +217,7 @@ public:
* a string list to pass aparameters to the shared
* library loader.
*/
- SyncMode(const QStringList &l);
+ SyncMode(const TQStringList &l);
/** Returns the kind of sync; this is just incomplete
* information, since a test hot sync is very different from
@@ -311,20 +311,20 @@ public:
/**
* Returns a standard name for each of the sync modes.
*/
- static QString name(Mode);
+ static TQString name(Mode);
/**
* Returns a (human readable) name for this particular mode,
* including extra information about test and local mode.
*/
- QString name() const;
+ TQString name() const;
/**
- * Returns a QStringList that, when passed to the constructor
+ * Returns a TQStringList that, when passed to the constructor
* of SyncMode, will re-create it. Used to pass modes into
* shared library factories.
*/
- QStringList list() const;
+ TQStringList list() const;
private:
Mode fMode;
@@ -378,7 +378,7 @@ signals:
protected:
- QWidget *fParent;
+ TQWidget *fParent;
/**
* Ask a yes-no question of the user. This has a timeout so that
@@ -392,18 +392,18 @@ protected:
* @p key Key for the "Don't ask again" code.
* @p timeout Timeout, in seconds.
*/
- int questionYesNo(const QString &question ,
- const QString &caption = QString::null,
- const QString &key = QString::null,
+ int questionYesNo(const TQString &question ,
+ const TQString &caption = TQString::null,
+ const TQString &key = TQString::null,
unsigned timeout = 20,
- const QString &yes = QString::null,
- const QString &no = QString::null );
- int questionYesNoCancel(const QString &question ,
- const QString &caption = QString::null,
- const QString &key = QString::null,
+ const TQString &yes = TQString::null,
+ const TQString &no = TQString::null );
+ int questionYesNoCancel(const TQString &question ,
+ const TQString &caption = TQString::null,
+ const TQString &key = TQString::null,
unsigned timeout = 20,
- const QString &yes = QString::null,
- const QString &no = QString::null ) ;
+ const TQString &yes = TQString::null,
+ const TQString &no = TQString::null ) ;
};
diff --git a/kpilot/tests/conduits/vcalconduit/exampletest.cc b/kpilot/tests/conduits/vcalconduit/exampletest.cc
index 5d6ba40d5..b16a6c3e5 100644
--- a/kpilot/tests/conduits/vcalconduit/exampletest.cc
+++ b/kpilot/tests/conduits/vcalconduit/exampletest.cc
@@ -8,7 +8,7 @@ CPPUNIT_TEST_SUITE_REGISTRATION( VCalConduitTest );
void VCalConduitTest::setUp()
{
- device = QString("testdevice");
+ device = TQString("testdevice");
link = new KPilotLocalLink(0, "localLink");
syncMode = SyncAction::SyncMode::eHotSync;
}
diff --git a/kpilot/tests/conduits/vcalconduit/exampletest.h b/kpilot/tests/conduits/vcalconduit/exampletest.h
index 137c31326..f98c14c58 100644
--- a/kpilot/tests/conduits/vcalconduit/exampletest.h
+++ b/kpilot/tests/conduits/vcalconduit/exampletest.h
@@ -2,7 +2,7 @@
#define EXAMPLETEST_H
#include <cppunit/extensions/HelperMacros.h>
-#include <qstring.h>
+#include <tqstring.h>
#include "kpilotlocallink.h"
#include "syncAction.h"
@@ -14,7 +14,7 @@ class VCalConduitTest : public CppUnit::TestFixture
CPPUNIT_TEST_SUITE_END();
private:
- QString device;
+ TQString device;
KPilotLocalLink *link;
SyncAction::SyncMode::Mode syncMode;
diff --git a/kpilot/tests/exportdatebook.cc b/kpilot/tests/exportdatebook.cc
index fcc236cca..d4cf8c53e 100644
--- a/kpilot/tests/exportdatebook.cc
+++ b/kpilot/tests/exportdatebook.cc
@@ -70,8 +70,8 @@ int main(int argc, char **argv)
debug_level= (args->isSet("verbose")) ? 4 : 0;
- QString datadir = args->getOption("data-dir");
- QString vcalfile = args->getOption("vcal-file");
+ TQString datadir = args->getOption("data-dir");
+ TQString vcalfile = args->getOption("vcal-file");
if (datadir.isEmpty())
{
@@ -91,13 +91,13 @@ int main(int argc, char **argv)
// this part taken from adcalendarbase.cpp:
korgcfg.setGroup( "Time & Date" );
- QString tz(korgcfg.readEntry( "TimeZoneId" ) );
+ TQString tz(korgcfg.readEntry( "TimeZoneId" ) );
DEBUGKPILOT << fname << ": KOrganizer's time zone = " << tz << endl;
KCal::CalendarLocal *calendar = new KCal::CalendarLocal( tz );
*/
- KCal::CalendarLocal *calendar = new KCal::CalendarLocal( QString() );
+ KCal::CalendarLocal *calendar = new KCal::CalendarLocal( TQString() );
if (!calendar)
{
diff --git a/kpilot/tests/importaddresses.cc b/kpilot/tests/importaddresses.cc
index 34250b2c1..61cc513a3 100644
--- a/kpilot/tests/importaddresses.cc
+++ b/kpilot/tests/importaddresses.cc
@@ -67,8 +67,8 @@ int main(int argc, char **argv)
#ifdef DEBUG
debug_level= (args->isSet("verbose")) ? 4 : 0;
#endif
- QString datadir = args->getOption("data-dir");
- QString addressfile = args->getOption("address-file");
+ TQString datadir = args->getOption("data-dir");
+ TQString addressfile = args->getOption("address-file");
if (datadir.isEmpty())
{
diff --git a/kpilot/tests/importdatebook.cc b/kpilot/tests/importdatebook.cc
index b7a66080d..ebbb70122 100644
--- a/kpilot/tests/importdatebook.cc
+++ b/kpilot/tests/importdatebook.cc
@@ -67,8 +67,8 @@ int main(int argc, char **argv)
debug_level= (args->isSet("verbose")) ? 4 : 0;
- QString datadir = args->getOption("data-dir");
- QString vcalfile = args->getOption("vcal-file");
+ TQString datadir = args->getOption("data-dir");
+ TQString vcalfile = args->getOption("vcal-file");
if (datadir.isEmpty())
{
@@ -87,7 +87,7 @@ int main(int argc, char **argv)
<< "], creating DatebookDB in: [" << datadir
<< "]" << endl;
- KCal::CalendarLocal *calendar = new KCal::CalendarLocal( QString::fromLatin1("UTC") );
+ KCal::CalendarLocal *calendar = new KCal::CalendarLocal( TQString::fromLatin1("UTC") );
if (!calendar || !calendar->load( vcalfile ))
{
return 1;
diff --git a/kpilot/tests/mergecalendars.cc b/kpilot/tests/mergecalendars.cc
index 221da26b0..898eb8c06 100644
--- a/kpilot/tests/mergecalendars.cc
+++ b/kpilot/tests/mergecalendars.cc
@@ -63,9 +63,9 @@ int main(int argc, char **argv)
int debug_level= (args->isSet("verbose")) ? 4 : 0;
- QString korgfile = args->getOption("korgfile");
- QString newfile = args->getOption("newfile");
- QString category = args->getOption("category");
+ TQString korgfile = args->getOption("korgfile");
+ TQString newfile = args->getOption("newfile");
+ TQString category = args->getOption("category");
if (korgfile.isEmpty())
{
@@ -84,8 +84,8 @@ int main(int argc, char **argv)
return 1;
}
- QString korgsave = QString("%1.updated").arg(korgfile);
- QString newfilesave = QString("%1.updated").arg(newfile);
+ TQString korgsave = TQString("%1.updated").arg(korgfile);
+ TQString newfilesave = TQString("%1.updated").arg(newfile);
DEBUGKPILOT << "Using korgfile: [" << korgfile
<< "]" << endl;
@@ -96,8 +96,8 @@ int main(int argc, char **argv)
DEBUGKPILOT << "Will save newfile to: [" << newfilesave
<< "]" << endl << endl;
- KCal::CalendarLocal *calkorg = new KCal::CalendarLocal( QString::fromLatin1("UTC") );
- KCal::CalendarLocal *calnew = new KCal::CalendarLocal( QString::fromLatin1("UTC") );
+ KCal::CalendarLocal *calkorg = new KCal::CalendarLocal( TQString::fromLatin1("UTC") );
+ KCal::CalendarLocal *calnew = new KCal::CalendarLocal( TQString::fromLatin1("UTC") );
if (!calkorg || !calnew)
{
WARNINGKPILOT << "Unable to create base calendar objects." << endl;
@@ -137,7 +137,7 @@ int main(int argc, char **argv)
for (newIt = newEvents.begin(); newIt != newEvents.end(); ++newIt )
{
ev = *newIt;
- QString uid = ev->uid();
+ TQString uid = ev->uid();
if (debug_level)
DEBUGKPILOT << " - Looking at event: ["
<< ev->summary() << "], uid: ["
@@ -168,7 +168,7 @@ int main(int argc, char **argv)
// that matches up with this external event's UID
unsigned int numkorgremoved = 0;
- QString categoryToken = category;
+ TQString categoryToken = category;
// careful iterating and removing...
KCal::Event *next = 0;
diff --git a/kpilot/tests/testaddress.cc b/kpilot/tests/testaddress.cc
index 0919b8c0e..5da0c4474 100644
--- a/kpilot/tests/testaddress.cc
+++ b/kpilot/tests/testaddress.cc
@@ -62,7 +62,7 @@ int main(int argc, char **argv)
#ifdef DEBUG
debug_level= (args->isSet("verbose")) ? 4 : 0;
#endif
- QString datadir = args->getOption("data-dir");
+ TQString datadir = args->getOption("data-dir");
DEBUGKPILOT << "### testaddresses\n#\n#" << endl;
diff --git a/kpilot/tests/testcategories.cc b/kpilot/tests/testcategories.cc
index 1ecfebf66..aefb8b944 100644
--- a/kpilot/tests/testcategories.cc
+++ b/kpilot/tests/testcategories.cc
@@ -44,16 +44,16 @@
// Name of an actual DB
#define MEMO_NAME "MemoDB"
-QStringList categories( const PilotAppInfoBase *appinfo )
+TQStringList categories( const PilotAppInfoBase *appinfo )
{
- QStringList cats;
+ TQStringList cats;
for (unsigned int i=0; i<Pilot::CATEGORY_COUNT; i++)
{
- QString cat = appinfo->categoryName(i);
+ TQString cat = appinfo->categoryName(i);
if (!cat.isEmpty())
{
- QString s = CSL1("(%1:%2)").arg(i).arg(cat);
+ TQString s = CSL1("(%1:%2)").arg(i).arg(cat);
cats.append(s);
}
}
@@ -61,9 +61,9 @@ QStringList categories( const PilotAppInfoBase *appinfo )
return cats;
}
-QStringList listCategories( const QString &dir, const char *dbname )
+TQStringList listCategories( const TQString &dir, const char *dbname )
{
- QStringList cats;
+ TQStringList cats;
PilotLocalDatabase *database = new PilotLocalDatabase( dir, dbname );
if (!database->isOpen()) return cats;
@@ -90,7 +90,7 @@ void badAppInfoCreation()
KPILOT_DELETE( appinfo );
}
-void categoryNames( const QString &dir )
+void categoryNames( const TQString &dir )
{
PilotLocalDatabase *database = new PilotLocalDatabase( dir, MEMO_NAME );
if (!database->isOpen())
@@ -123,14 +123,14 @@ void categoryNames( const QString &dir )
DEBUGKPILOT << "# Expect three truncation errors and two bad category numbers." << endl;
for (unsigned int i=0; i<Pilot::CATEGORY_COUNT+2; i++)
{
- QString name = QString::fromLatin1(funnyname+funnyname_length-i-3);
+ TQString name = TQString::fromLatin1(funnyname+funnyname_length-i-3);
if (!appinfo->setCategoryName(i,name))
{
WARNINGKPILOT << "Failed to set category " << i << " name to <" << name << ">" << endl;
}
else
{
- QString categoryname = appinfo->categoryName(i);
+ TQString categoryname = appinfo->categoryName(i);
if (categoryname != name)
{
WARNINGKPILOT << "Category name " << i
@@ -179,7 +179,7 @@ int main(int argc, char **argv)
0L
};
- QString datadir = args->getOption("data-dir");
+ TQString datadir = args->getOption("data-dir");
DEBUGKPILOT << "### testcategories\n#\n#" << endl;
DEBUGKPILOT << "# Listing categories from database files.\n#" << endl;
diff --git a/kpilot/tests/testdatabase.cc b/kpilot/tests/testdatabase.cc
index b1a4ddbe0..02b43c6be 100644
--- a/kpilot/tests/testdatabase.cc
+++ b/kpilot/tests/testdatabase.cc
@@ -105,7 +105,7 @@ int checkDatabase(const char *path, recordInfo *info)
{
FUNCTIONSETUP;
- PilotLocalDatabase db(QString::fromLatin1(path));
+ PilotLocalDatabase db(TQString::fromLatin1(path));
if (!db.isOpen())
{
kdDebug() << "No database " << path << endl;
@@ -166,9 +166,9 @@ const char *categoryNames[4] =
"impersonal"
} ;
-QStringList listCategories()
+TQStringList listCategories()
{
- QStringList cats;
+ TQStringList cats;
PilotLocalDatabase *l = new PilotLocalDatabase("./data/MemoDB");
PilotMemoInfo *m = new PilotMemoInfo(l);
@@ -186,12 +186,12 @@ QStringList listCategories()
for (int i=0; i<4; i++)
{
- QString s = m->category(i);
+ TQString s = m->category(i);
kdDebug() << "Category " << i << ": " << (s.isEmpty() ? CSL1("<empty>") : s) << endl;
cats.append(s);
/*
if (i<((sizeof(categoryNames) / sizeof(categoryNames[0]))))
- m->setCategoryName(i,QString::fromLatin1(categoryNames[i]));
+ m->setCategoryName(i,TQString::fromLatin1(categoryNames[i]));
*/
}
@@ -205,8 +205,8 @@ QStringList listCategories()
int checkCategories()
{
- QStringList l = listCategories();
- QStringList m = listCategories();
+ TQStringList l = listCategories();
+ TQStringList m = listCategories();
if (l.isEmpty() || m.isEmpty()) return ERR;
if (l!=m) return ERR;
@@ -221,7 +221,7 @@ int checkMemo()
PilotMemoInfo *m = new PilotMemoInfo(l);
m->dump();
- QString c = m->category(1);
+ TQString c = m->category(1);
if (c != CSL1("Business"))
{
kdDebug() << "* Category 1 is not 'Business' but " << c << endl;
diff --git a/kpilot/tests/testdatebook.cc b/kpilot/tests/testdatebook.cc
index 5c1da9d21..8e6cc5569 100644
--- a/kpilot/tests/testdatebook.cc
+++ b/kpilot/tests/testdatebook.cc
@@ -62,7 +62,7 @@ int main(int argc, char **argv)
#ifdef DEBUG
debug_level= (args->isSet("verbose")) ? 4 : 0;
#endif
- QString datadir = args->getOption("data-dir");
+ TQString datadir = args->getOption("data-dir");
DEBUGKPILOT << "### testdatebook\n#\n#" << endl;
diff --git a/kpilot/tests/testidmapper.cc b/kpilot/tests/testidmapper.cc
index a694a4c38..8d60afc5b 100644
--- a/kpilot/tests/testidmapper.cc
+++ b/kpilot/tests/testidmapper.cc
@@ -33,8 +33,8 @@
#include <kapplication.h>
#include <kcmdlineargs.h>
-#include <qdir.h>
-#include <qfile.h>
+#include <tqdir.h>
+#include <tqfile.h>
#define TESTFILE "Testing/mapping.xml"
#define CONDUIT CSL1("knotes")
@@ -51,7 +51,7 @@ bool test1()
delete mapper;
mapper = 0l;
- QFile f( TESTFILE );
+ TQFile f( TESTFILE );
bool result = f.exists();
if( result )
@@ -293,15 +293,15 @@ int main(int argc, char **argv)
KApplication app( false, false );
// Remove file from previous test run
- QDir test( "Testing" );
+ TQDir test( "Testing" );
if( !test.exists() ) {
- QDir current;
+ TQDir current;
current.mkdir( "Testing" );
}
- QFile f( TESTFILE );
+ TQFile f( TESTFILE );
if( f.exists() )
- QFile::remove( TESTFILE );
+ TQFile::remove( TESTFILE );
if( test1() && test2() && test3() &&
test4() && test5() && test6() &&
diff --git a/kresources/birthdays/resourcekabc.cpp b/kresources/birthdays/resourcekabc.cpp
index 9d86aa3dd..dc902c5bf 100644
--- a/kresources/birthdays/resourcekabc.cpp
+++ b/kresources/birthdays/resourcekabc.cpp
@@ -22,9 +22,9 @@
#include <typeinfo>
#include <stdlib.h>
-#include <qdatetime.h>
-#include <qstring.h>
-#include <qptrlist.h>
+#include <tqdatetime.h>
+#include <tqstring.h>
+#include <tqptrlist.h>
#include <klocale.h>
#include <kdebug.h>
@@ -65,7 +65,7 @@ extern "C"
}
ResourceKABC::ResourceKABC( const KConfig* config )
- : ResourceCalendar( config ), mCalendar( QString::fromLatin1( "UTC" ) ),
+ : ResourceCalendar( config ), mCalendar( TQString::fromLatin1( "UTC" ) ),
mAlarmDays( 0 ), mAlarm( true ), mUseCategories( false )
{
if ( config ) {
@@ -76,7 +76,7 @@ ResourceKABC::ResourceKABC( const KConfig* config )
}
ResourceKABC::ResourceKABC()
- : ResourceCalendar( 0 ), mCalendar( QString::fromLatin1( "UTC" ) ),
+ : ResourceCalendar( 0 ), mCalendar( TQString::fromLatin1( "UTC" ) ),
mAlarmDays( 0 ), mAlarm( true ), mUseCategories( false )
{
init();
@@ -121,7 +121,7 @@ bool ResourceKABC::doOpen()
kdDebug(5800) << "ResourceKABC::doOpen()" << endl;
mAddressbook = KABC::StdAddressBook::self( true );
- connect( mAddressbook, SIGNAL(addressBookChanged(AddressBook*)), SLOT( reload() ) );
+ connect( mAddressbook, TQT_SIGNAL(addressBookChanged(AddressBook*)), TQT_SLOT( reload() ) );
return true;
}
@@ -133,9 +133,9 @@ bool ResourceKABC::doLoad()
mCalendar.close();
// import from kabc
- QString summary;
- QStringList::ConstIterator strIt;
- const QStringList::ConstIterator endStrIt = mCategories.end();
+ TQString summary;
+ TQStringList::ConstIterator strIt;
+ const TQStringList::ConstIterator endStrIt = mCategories.end();
KABC::Addressee::List anniversaries;
KABC::Addressee::List::Iterator addrIt;
@@ -145,7 +145,7 @@ bool ResourceKABC::doLoad()
if ( mUseCategories ) {
bool hasCategory = false;
- QStringList categories = (*it).categories();
+ TQStringList categories = (*it).categories();
for ( strIt = mCategories.begin(); strIt != endStrIt; ++strIt )
if ( categories.contains( *strIt ) ) {
hasCategory = true;
@@ -156,8 +156,8 @@ bool ResourceKABC::doLoad()
continue;
}
- QDate birthdate = (*it).birthday().date();
- QString name_1, email_1, uid_1;
+ TQDate birthdate = (*it).birthday().date();
+ TQString name_1, email_1, uid_1;
if ( birthdate.isValid() ) {
kdDebug(5800) << "found a birthday " << birthdate.toString() << endl;
@@ -213,21 +213,21 @@ bool ResourceKABC::doLoad()
kdDebug(5800) << "imported " << birthdate.toString() << endl;
}
- QString anniversary_string = (*it).custom( "KADDRESSBOOK", "X-Anniversary" );
+ TQString anniversary_string = (*it).custom( "KADDRESSBOOK", "X-Anniversary" );
if (anniversary_string.isEmpty() )
continue;
- QDateTime anniversary = QDate::fromString( anniversary_string, Qt::ISODate );
+ TQDateTime anniversary = TQDate::fromString( anniversary_string, Qt::ISODate );
if ( !anniversary.isValid() )
continue;
- QString name = (*it).custom( "KADDRESSBOOK", "X-SpousesName" );
+ TQString name = (*it).custom( "KADDRESSBOOK", "X-SpousesName" );
if ( name.isEmpty() )
anniversaries.append( *it );
else {
bool found = false;
for ( addrIt = anniversaries.begin(); addrIt != anniversaries.end(); ++addrIt ) {
if ( name == (*addrIt).realName() ) {
- QDateTime spouseAnniversary = QDate::fromString( (*addrIt).custom( "KADDRESSBOOK", "X-Anniversary" ), Qt::ISODate );
+ TQDateTime spouseAnniversary = TQDate::fromString( (*addrIt).custom( "KADDRESSBOOK", "X-Anniversary" ), Qt::ISODate );
if ( anniversary == spouseAnniversary ) {
found = true;
break;
@@ -242,21 +242,21 @@ bool ResourceKABC::doLoad()
}
for ( addrIt = anniversaries.begin(); addrIt != anniversaries.end(); ++addrIt ) {
- QDate anniversary = QDate::fromString( (*addrIt).custom( "KADDRESSBOOK", "X-Anniversary" ), Qt::ISODate );
+ TQDate anniversary = TQDate::fromString( (*addrIt).custom( "KADDRESSBOOK", "X-Anniversary" ), Qt::ISODate );
kdDebug(5800) << "found a anniversary " << anniversary.toString() << endl;
- QString name;
- QString name_1 = (*addrIt).nickName();
- QString uid_1 = (*addrIt).uid();
- QString email_1 = (*addrIt).fullEmail();
+ TQString name;
+ TQString name_1 = (*addrIt).nickName();
+ TQString uid_1 = (*addrIt).uid();
+ TQString email_1 = (*addrIt).fullEmail();
if ( name_1.isEmpty() )
name_1 = (*addrIt).realName();
- QString spouseName = (*addrIt).custom( "KADDRESSBOOK", "X-SpousesName" );
- QString name_2,email_2,uid_2;
+ TQString spouseName = (*addrIt).custom( "KADDRESSBOOK", "X-SpousesName" );
+ TQString name_2,email_2,uid_2;
if ( !spouseName.isEmpty() ) {
//TODO: find a KABC:Addressee of the spouse
- // Probably easiest would be to use a QMap (as the spouse's entry was already searched above!
+ // Probably easiest would be to use a TQMap (as the spouse's entry was already searched above!
KABC::Addressee spouse;
spouse.setNameFromString( spouseName );
uid_2 = spouse.uid();
@@ -341,12 +341,12 @@ int ResourceKABC::alarmDays()
return mAlarmDays;
}
-void ResourceKABC::setCategories( const QStringList &categories )
+void ResourceKABC::setCategories( const TQStringList &categories )
{
mCategories = categories;
}
-QStringList ResourceKABC::categories() const
+TQStringList ResourceKABC::categories() const
{
return mCategories;
}
@@ -389,25 +389,25 @@ bool ResourceKABC::deleteEvent(Event*)
}
-Event *ResourceKABC::event( const QString &uid )
+Event *ResourceKABC::event( const TQString &uid )
{
return mCalendar.event( uid );
}
-Event::List ResourceKABC::rawEventsForDate( const QDate &date,
+Event::List ResourceKABC::rawEventsForDate( const TQDate &date,
EventSortField sortField,
SortDirection sortDirection )
{
return mCalendar.rawEventsForDate( date, sortField, sortDirection );
}
-Event::List ResourceKABC::rawEvents( const QDate &start, const QDate &end,
+Event::List ResourceKABC::rawEvents( const TQDate &start, const TQDate &end,
bool inclusive )
{
return mCalendar.rawEvents( start, end, inclusive );
}
-Event::List ResourceKABC::rawEventsForDate(const QDateTime &qdt)
+Event::List ResourceKABC::rawEventsForDate(const TQDateTime &qdt)
{
return mCalendar.rawEventsForDate( qdt.date() );
}
@@ -433,12 +433,12 @@ Todo::List ResourceKABC::rawTodos( TodoSortField sortField, SortDirection sortDi
return mCalendar.rawTodos( sortField, sortDirection );
}
-Todo *ResourceKABC::todo( const QString &uid )
+Todo *ResourceKABC::todo( const TQString &uid )
{
return mCalendar.todo( uid );
}
-Todo::List ResourceKABC::rawTodosForDate( const QDate &date )
+Todo::List ResourceKABC::rawTodosForDate( const TQDate &date )
{
return mCalendar.rawTodosForDate( date );
}
@@ -454,7 +454,7 @@ bool ResourceKABC::deleteJournal(Journal*)
return false;
}
-Journal *ResourceKABC::journal(const QString &uid)
+Journal *ResourceKABC::journal(const TQString &uid)
{
return mCalendar.journal( uid );
}
@@ -464,17 +464,17 @@ Journal::List ResourceKABC::rawJournals( JournalSortField sortField, SortDirecti
return mCalendar.rawJournals( sortField, sortDirection );
}
-Journal::List ResourceKABC::rawJournalsForDate( const QDate &date )
+Journal::List ResourceKABC::rawJournalsForDate( const TQDate &date )
{
return mCalendar.rawJournalsForDate( date );
}
-Alarm::List ResourceKABC::alarmsTo( const QDateTime &to )
+Alarm::List ResourceKABC::alarmsTo( const TQDateTime &to )
{
return mCalendar.alarmsTo( to );
}
-Alarm::List ResourceKABC::alarms( const QDateTime &from, const QDateTime &to )
+Alarm::List ResourceKABC::alarms( const TQDateTime &from, const TQDateTime &to )
{
// kdDebug(5800) << "ResourceKABC::alarms(" << from.toString() << " - " << to.toString() << ")\n";
@@ -492,7 +492,7 @@ void ResourceKABC::reload()
emit resourceChanged( this );
}
-void ResourceKABC::setTimeZoneId( const QString& tzid )
+void ResourceKABC::setTimeZoneId( const TQString& tzid )
{
mCalendar.setTimeZoneId( tzid );
}
diff --git a/kresources/birthdays/resourcekabc.h b/kresources/birthdays/resourcekabc.h
index 9f9a75994..eebe087e9 100644
--- a/kresources/birthdays/resourcekabc.h
+++ b/kresources/birthdays/resourcekabc.h
@@ -21,9 +21,9 @@
#ifndef KCAL_RESOURCEKABC_H
#define KCAL_RESOURCEKABC_H
-#include <qptrlist.h>
-#include <qstring.h>
-#include <qdatetime.h>
+#include <tqptrlist.h>
+#include <tqstring.h>
+#include <tqdatetime.h>
#include <kconfig.h>
@@ -65,8 +65,8 @@ class KDE_EXPORT ResourceKABC : public ResourceCalendar
void setAlarmDays( int );
int alarmDays();
- void setCategories( const QStringList &categories );
- QStringList categories() const;
+ void setCategories( const TQStringList &categories );
+ TQStringList categories() const;
void setUseCategories( bool useCategories );
bool useCategories() const;
@@ -83,7 +83,7 @@ class KDE_EXPORT ResourceKABC : public ResourceCalendar
/**
Retrieves an event on the basis of the unique string ID.
*/
- Event *event(const QString &UniqueStr);
+ Event *event(const TQString &UniqueStr);
/**
Return unfiltered list of all events in calendar.
*/
@@ -92,16 +92,16 @@ class KDE_EXPORT ResourceKABC : public ResourceCalendar
Builds and then returns a list of all events that match for the
date specified. useful for dayView, etc. etc.
*/
- Event::List rawEventsForDate( const QDate &date, EventSortField sortField = EventSortUnsorted, SortDirection sortDirection = SortDirectionAscending );
+ Event::List rawEventsForDate( const TQDate &date, EventSortField sortField = EventSortUnsorted, SortDirection sortDirection = SortDirectionAscending );
/**
Get unfiltered events for date \a qdt.
*/
- Event::List rawEventsForDate( const QDateTime &qdt );
+ Event::List rawEventsForDate( const TQDateTime &qdt );
/**
Get unfiltered events in a range of dates. If inclusive is set to true,
only events are returned, which are completely included in the range.
*/
- Event::List rawEvents( const QDate &start, const QDate &end,
+ Event::List rawEvents( const TQDate &start, const TQDate &end,
bool inclusive = false );
/**
@@ -116,7 +116,7 @@ class KDE_EXPORT ResourceKABC : public ResourceCalendar
Searches todolist for an event with this unique string identifier,
returns a pointer or null.
*/
- Todo *todo( const QString &uid );
+ Todo *todo( const TQString &uid );
/**
Return list of all todos.
*/
@@ -124,13 +124,13 @@ class KDE_EXPORT ResourceKABC : public ResourceCalendar
/**
Returns list of todos due on the specified date.
*/
- Todo::List rawTodosForDate( const QDate &date );
+ Todo::List rawTodosForDate( const TQDate &date );
/** Add a Journal entry to calendar */
virtual bool addJournal(Journal *);
/** Remove journal from the calendar. */
bool deleteJournal( Journal * );
/** Return Journal with given UID */
- virtual Journal *journal(const QString &uid);
+ virtual Journal *journal(const TQString &uid);
/**
Return list of all journals.
*/
@@ -138,17 +138,17 @@ class KDE_EXPORT ResourceKABC : public ResourceCalendar
/**
Returns list of journals for the given date.
*/
- Journal::List rawJournalsForDate( const QDate &date );
+ Journal::List rawJournalsForDate( const TQDate &date );
/** Return all alarms, which ocur in the given time interval. */
- Alarm::List alarms( const QDateTime &from, const QDateTime &to );
+ Alarm::List alarms( const TQDateTime &from, const TQDateTime &to );
/** Return all alarms, which ocur before given date. */
- Alarm::List alarmsTo( const QDateTime &to );
+ Alarm::List alarmsTo( const TQDateTime &to );
void dump() const;
- void setTimeZoneId( const QString &timeZoneId );
+ void setTimeZoneId( const TQString &timeZoneId );
protected:
bool doOpen();
@@ -165,7 +165,7 @@ class KDE_EXPORT ResourceKABC : public ResourceCalendar
int mAlarmDays;
bool mAlarm;
- QStringList mCategories;
+ TQStringList mCategories;
bool mUseCategories;
KABC::AddressBook *mAddressbook;
diff --git a/kresources/birthdays/resourcekabcconfig.cpp b/kresources/birthdays/resourcekabcconfig.cpp
index 9fcbdcb61..2f7671dc7 100644
--- a/kresources/birthdays/resourcekabcconfig.cpp
+++ b/kresources/birthdays/resourcekabcconfig.cpp
@@ -21,8 +21,8 @@
#include <typeinfo>
-#include <qheader.h>
-#include <qlayout.h>
+#include <tqheader.h>
+#include <tqlayout.h>
#include <kabprefs.h>
#include <kdebug.h>
@@ -33,26 +33,26 @@
using namespace KCal;
-ResourceKABCConfig::ResourceKABCConfig( QWidget* parent, const char* name )
+ResourceKABCConfig::ResourceKABCConfig( TQWidget* parent, const char* name )
: KRES::ConfigWidget( parent, name )
{
- QGridLayout *topLayout = new QGridLayout( this, 5, 1, 11, 6 );
+ TQGridLayout *topLayout = new TQGridLayout( this, 5, 1, 11, 6 );
- mAlarm = new QCheckBox(i18n("Set reminder"), this);
+ mAlarm = new TQCheckBox(i18n("Set reminder"), this);
topLayout->addWidget(mAlarm, 0, 0);
- QBoxLayout *alarmLayout = new QHBoxLayout(topLayout);
+ TQBoxLayout *alarmLayout = new TQHBoxLayout(topLayout);
- mALabel = new QLabel(i18n("Reminder before (in days):"), this);
+ mALabel = new TQLabel(i18n("Reminder before (in days):"), this);
alarmLayout->addWidget(mALabel);
mAlarmTimeEdit = new KRestrictedLine(this, "alarmTimeEdit", "1234567890");
mAlarmTimeEdit->setText("0");
alarmLayout->addWidget(mAlarmTimeEdit);
- QFrame *line = new QFrame( this );
- line->setFrameStyle( QFrame::Sunken | QFrame::HLine );
+ TQFrame *line = new TQFrame( this );
+ line->setFrameStyle( TQFrame::Sunken | TQFrame::HLine );
topLayout->addMultiCellWidget( line, 2, 2, 0, 1 );
- mUseCategories = new QCheckBox( i18n( "Filter by categories" ), this );
+ mUseCategories = new TQCheckBox( i18n( "Filter by categories" ), this );
topLayout->addMultiCellWidget( mUseCategories, 3, 3, 0, 1 );
mCategoryView = new KListView( this );
@@ -61,21 +61,21 @@ ResourceKABCConfig::ResourceKABCConfig( QWidget* parent, const char* name )
mCategoryView->setEnabled( false );
topLayout->addMultiCellWidget( mCategoryView, 4, 4, 0, 1 );
- connect( mUseCategories, SIGNAL( toggled( bool ) ),
- mCategoryView, SLOT( setEnabled( bool ) ) );
+ connect( mUseCategories, TQT_SIGNAL( toggled( bool ) ),
+ mCategoryView, TQT_SLOT( setEnabled( bool ) ) );
mAlarmTimeEdit->setDisabled(true);
mALabel->setDisabled(true);
- connect(mAlarm, SIGNAL(clicked()), SLOT(alarmClicked()));
+ connect(mAlarm, TQT_SIGNAL(clicked()), TQT_SLOT(alarmClicked()));
setReadOnly( true );
KABPrefs *prefs = KABPrefs::instance();
- const QStringList categories = prefs->customCategories();
- QStringList::ConstIterator it;
+ const TQStringList categories = prefs->customCategories();
+ TQStringList::ConstIterator it;
for ( it = categories.begin(); it != categories.end(); ++it )
- new QCheckListItem( mCategoryView, *it, QCheckListItem::CheckBox );
+ new TQCheckListItem( mCategoryView, *it, TQCheckListItem::CheckBox );
}
void ResourceKABCConfig::loadSettings( KRES::Resource *resource )
@@ -83,17 +83,17 @@ void ResourceKABCConfig::loadSettings( KRES::Resource *resource )
ResourceKABC *res = static_cast<ResourceKABC *>( resource );
if ( res ) {
mAlarm->setChecked( res->alarm() );
- QString days;
+ TQString days;
mAlarmTimeEdit->setText( days.setNum(res->alarmDays()) );
mAlarmTimeEdit->setEnabled( res->alarm() );
mALabel->setEnabled( res->alarm() );
- const QStringList categories = res->categories();
- QListViewItemIterator it( mCategoryView );
+ const TQStringList categories = res->categories();
+ TQListViewItemIterator it( mCategoryView );
while ( it.current() ) {
if ( categories.contains( it.current()->text( 0 ) ) ) {
- QCheckListItem *item = static_cast<QCheckListItem*>( it.current() );
+ TQCheckListItem *item = static_cast<TQCheckListItem*>( it.current() );
item->setOn( true );
}
++it;
@@ -113,8 +113,8 @@ void ResourceKABCConfig::saveSettings( KRES::Resource *resource )
res->setAlarmDays( mAlarmTimeEdit->text().toInt() );
setReadOnly( true );
- QStringList categories;
- QListViewItemIterator it( mCategoryView, QListViewItemIterator::Checked );
+ TQStringList categories;
+ TQListViewItemIterator it( mCategoryView, TQListViewItemIterator::Checked );
while ( it.current() ) {
categories.append( it.current()->text( 0 ) );
++it;
diff --git a/kresources/birthdays/resourcekabcconfig.h b/kresources/birthdays/resourcekabcconfig.h
index b67d38847..7d3ddf098 100644
--- a/kresources/birthdays/resourcekabcconfig.h
+++ b/kresources/birthdays/resourcekabcconfig.h
@@ -23,8 +23,8 @@
#ifndef KCAL_RESOURCEKABCCONFIG_H
#define KCAL_RESOURCEKABCCONFIG_H
-#include <qcheckbox.h>
-#include <qlabel.h>
+#include <tqcheckbox.h>
+#include <tqlabel.h>
#include <klistview.h>
#include <krestrictedline.h>
@@ -42,7 +42,7 @@ class ResourceKABCConfig : public KRES::ConfigWidget
{
Q_OBJECT
public:
- ResourceKABCConfig( QWidget* parent = 0, const char* name = 0 );
+ ResourceKABCConfig( TQWidget* parent = 0, const char* name = 0 );
public slots:
virtual void loadSettings( KRES::Resource *resource);
@@ -52,10 +52,10 @@ class ResourceKABCConfig : public KRES::ConfigWidget
void alarmClicked();
private:
- QCheckBox *mAlarm;
+ TQCheckBox *mAlarm;
KRestrictedLine *mAlarmTimeEdit;
- QLabel *mALabel;
- QCheckBox *mUseCategories;
+ TQLabel *mALabel;
+ TQCheckBox *mUseCategories;
KListView *mCategoryView;
class Private;
diff --git a/kresources/blogging/API_Blog.cpp b/kresources/blogging/API_Blog.cpp
index 670cd1661..b6ac3752b 100644
--- a/kresources/blogging/API_Blog.cpp
+++ b/kresources/blogging/API_Blog.cpp
@@ -8,13 +8,13 @@
***************************************************************************/
#include "API_Blog.h"
#include <kdebug.h>
-#include <qvariant.h>
+#include <tqvariant.h>
using namespace KBlog;
-APIBlog::APIBlog( const KURL &url, QObject *parent, const char *name ) :
- QObject( parent, name ),
- mServerURL( url ), mAppID( QString::null ), mDownloadCount( 20 )
+APIBlog::APIBlog( const KURL &url, TQObject *parent, const char *name ) :
+ TQObject( parent, name ),
+ mServerURL( url ), mAppID( TQString::null ), mDownloadCount( 20 )
{}
APIBlog::~APIBlog()
@@ -42,7 +42,7 @@ BlogTemplate APIBlog::templateTags() const
return mTemplate;
}*/
-/*void APIBlog::deletePost( const QString &postID )
+/*void APIBlog::deletePost( const TQString &postID )
{
BlogPosting *post = new BlogPosting();
post->setPostID( postID );
@@ -50,15 +50,15 @@ BlogTemplate APIBlog::templateTags() const
delete post;
}*/
-QValueList<QVariant> APIBlog::defaultArgs( const QString &id )
+TQValueList<TQVariant> APIBlog::defaultArgs( const TQString &id )
{
- QValueList<QVariant> args;
- args << QVariant( mAppID );
+ TQValueList<TQVariant> args;
+ args << TQVariant( mAppID );
if ( !id.isNull() ) {
- args << QVariant( id );
+ args << TQVariant( id );
}
- args << QVariant( mUsername )
- << QVariant( mPassword );
+ args << TQVariant( mUsername )
+ << TQVariant( mPassword );
return args;
}
@@ -67,9 +67,9 @@ KCal::Journal *APIBlog::journalFromPosting( KBlog::BlogPosting *blog )
{
if ( !blog ) return 0;
KCal::Journal *j = new KCal::Journal();
- QDateTime dt = blog->dateTime();
- QDateTime creationDt = blog->creationDateTime();
- QDateTime modificationDt = blog->modificationDateTime();
+ TQDateTime dt = blog->dateTime();
+ TQDateTime creationDt = blog->creationDateTime();
+ TQDateTime modificationDt = blog->modificationDateTime();
kdDebug() << "dt ="<<dt.toString( Qt::ISODate ) << endl;
kdDebug() << "creationDt ="<<creationDt.toString( Qt::ISODate ) << endl;
kdDebug() << "modificationDt="<<modificationDt.toString( Qt::ISODate ) << endl;
@@ -88,7 +88,7 @@ kdDebug() << "modificationDt="<<modificationDt.toString( Qt::ISODate ) << endl;
<< blog->dateTime().toString()<<endl;
j->setSummary( blog->title() );
j->setDescription( blog->content() );
- j->setCategories( QStringList( blog->category() ) );
+ j->setCategories( TQStringList( blog->category() ) );
j->setOrganizer( blog->userID() );
j->setCustomProperty( "KCalBloggerRes", "UserID", blog->userID() );
j->setCustomProperty( "KCalBloggerRes", "BlogID", blog->blogID() );
diff --git a/kresources/blogging/API_Blog.h b/kresources/blogging/API_Blog.h
index 77c27d68b..18bc1be0f 100644
--- a/kresources/blogging/API_Blog.h
+++ b/kresources/blogging/API_Blog.h
@@ -13,10 +13,10 @@
#include <kio/job.h>
#include <libkcal/journal.h>
-#include <qobject.h>
-#include <qstring.h>
-#include <qvaluelist.h>
-#include <qdatetime.h>
+#include <tqobject.h>
+#include <tqstring.h>
+#include <tqvaluelist.h>
+#include <tqdatetime.h>
/**
This is the main interface for blog backends
@@ -31,53 +31,53 @@ public:
BlogPosting() {}
virtual ~BlogPosting() {}
- QString userID() const { return mUserID; }
- void setUserID( const QString &userID ) { mUserID = userID; }
+ TQString userID() const { return mUserID; }
+ void setUserID( const TQString &userID ) { mUserID = userID; }
- QString blogID() const { return mBlogID; }
- void setBlogID( const QString &blogID ) { mBlogID = blogID; }
+ TQString blogID() const { return mBlogID; }
+ void setBlogID( const TQString &blogID ) { mBlogID = blogID; }
- QString postID() const { return mPostID; }
- void setPostID( const QString &postID ) { assignPostID( postID ); mPostID = postID; }
+ TQString postID() const { return mPostID; }
+ void setPostID( const TQString &postID ) { assignPostID( postID ); mPostID = postID; }
- QString title() const { return mTitle; }
- void setTitle( const QString &title ) { mTitle = title; }
+ TQString title() const { return mTitle; }
+ void setTitle( const TQString &title ) { mTitle = title; }
- QString content() const { return mContent; }
- void setContent( const QString &content ) { mContent = content; }
+ TQString content() const { return mContent; }
+ void setContent( const TQString &content ) { mContent = content; }
- QString category() const { return mCategory; }
- void setCategory( const QString &category ) { mCategory = category; }
+ TQString category() const { return mCategory; }
+ void setCategory( const TQString &category ) { mCategory = category; }
- QString fingerprint() const { return mFingerprint; }
- void setFingerprint( const QString &fp ) { mFingerprint = fp; }
+ TQString fingerprint() const { return mFingerprint; }
+ void setFingerprint( const TQString &fp ) { mFingerprint = fp; }
- QDateTime dateTime() const { return mDateTime; }
- void setDateTime( const QDateTime &datetime ) { mDateTime = datetime; }
+ TQDateTime dateTime() const { return mDateTime; }
+ void setDateTime( const TQDateTime &datetime ) { mDateTime = datetime; }
- QDateTime creationDateTime() const { return mCreationDateTime; }
- void setCreationDateTime( const QDateTime &datetime ) { mCreationDateTime = datetime; }
+ TQDateTime creationDateTime() const { return mCreationDateTime; }
+ void setCreationDateTime( const TQDateTime &datetime ) { mCreationDateTime = datetime; }
- QDateTime modificationDateTime() const { return mModificationDateTime; }
- void setModificationDateTime( const QDateTime &datetime ) { mModificationDateTime = datetime; }
+ TQDateTime modificationDateTime() const { return mModificationDateTime; }
+ void setModificationDateTime( const TQDateTime &datetime ) { mModificationDateTime = datetime; }
virtual void wasDeleted( bool ) {}
virtual void wasUploaded( bool ) {}
- virtual void error( int /*code*/, const QString &/*error*/ ) {}
+ virtual void error( int /*code*/, const TQString &/*error*/ ) {}
protected:
// Override this method to detect the new postID assigned when adding a new post
- virtual void assignPostID( const QString &/*postID*/ ) {}
- QString mUserID;
- QString mBlogID;
- QString mPostID;
- QString mTitle;
- QString mContent;
- QString mCategory;
- QString mFingerprint;
- QDateTime mDateTime;
- QDateTime mCreationDateTime;
- QDateTime mModificationDateTime;
+ virtual void assignPostID( const TQString &/*postID*/ ) {}
+ TQString mUserID;
+ TQString mBlogID;
+ TQString mPostID;
+ TQString mTitle;
+ TQString mContent;
+ TQString mCategory;
+ TQString mFingerprint;
+ TQDateTime mDateTime;
+ TQDateTime mCreationDateTime;
+ TQDateTime mModificationDateTime;
};
@@ -85,18 +85,18 @@ class APIBlog : public QObject
{
Q_OBJECT
public:
- APIBlog( const KURL &server, QObject *parent = 0L, const char *name = 0L );
+ APIBlog( const KURL &server, TQObject *parent = 0L, const char *name = 0L );
virtual ~APIBlog();
- virtual QString interfaceName() const = 0;
+ virtual TQString interfaceName() const = 0;
- void setAppID( const QString &appID ) { mAppID = appID; }
- QString appID() const { return mAppID; }
+ void setAppID( const TQString &appID ) { mAppID = appID; }
+ TQString appID() const { return mAppID; }
- void setPassword( const QString &pass ) { mPassword = pass; }
- QString password() const { return mPassword; }
+ void setPassword( const TQString &pass ) { mPassword = pass; }
+ TQString password() const { return mPassword; }
- void setUsername( const QString &uname ) { mUsername = uname; }
- QString username() const { return mUsername; }
+ void setUsername( const TQString &uname ) { mUsername = uname; }
+ TQString username() const { return mUsername; }
void setURL( const KURL& url ) { mServerURL = url; }
KURL url() const { return mServerURL; }
@@ -119,8 +119,8 @@ class APIBlog : public QObject
bloggerSetTemplate
};
- virtual QString getFunctionName( blogFunctions type ) = 0;
- virtual QValueList<QVariant> defaultArgs( const QString &id = QString::null );
+ virtual TQString getFunctionName( blogFunctions type ) = 0;
+ virtual TQValueList<TQVariant> defaultArgs( const TQString &id = TQString::null );
virtual KIO::Job *createUserInfoJob() = 0;
virtual KIO::Job *createListFoldersJob() = 0;
@@ -128,7 +128,7 @@ class APIBlog : public QObject
virtual KIO::TransferJob *createDownloadJob( const KURL &url ) = 0;
virtual KIO::TransferJob *createUploadJob( const KURL &url, KBlog::BlogPosting *posting ) = 0;
virtual KIO::TransferJob *createUploadNewJob( KBlog::BlogPosting *posting ) = 0;
- virtual KIO::Job *createRemoveJob( const KURL &url, const QString &postid ) = 0;
+ virtual KIO::Job *createRemoveJob( const KURL &url, const TQString &postid ) = 0;
virtual bool interpretUserInfoJob( KIO::Job *job ) = 0;
virtual void interpretListFoldersJob( KIO::Job *job ) = 0;
@@ -140,21 +140,21 @@ class APIBlog : public QObject
signals:
// TODO: Connect these
- void userInfoRetrieved( const QString &nickname, const QString &userid, const QString &email );
- void folderInfoRetrieved( const QString &id, const QString &name );
+ void userInfoRetrieved( const TQString &nickname, const TQString &userid, const TQString &email );
+ void folderInfoRetrieved( const TQString &id, const TQString &name );
void itemOnServer( const KURL &remoteURL );
- void itemDownloaded( KCal::Incidence *j, const QString &localID,
- const KURL &remoteURL, const QString &fingerprint,
- const QString &storageLocation );
+ void itemDownloaded( KCal::Incidence *j, const TQString &localID,
+ const KURL &remoteURL, const TQString &fingerprint,
+ const TQString &storageLocation );
protected:
KURL mServerURL;
- QString mPassword;
- QString mUsername;
- QString mAppID;
+ TQString mPassword;
+ TQString mUsername;
+ TQString mAppID;
int mDownloadCount;
};
diff --git a/kresources/blogging/API_Blogger.cpp b/kresources/blogging/API_Blogger.cpp
index f30c56206..5cca14e1a 100644
--- a/kresources/blogging/API_Blogger.cpp
+++ b/kresources/blogging/API_Blogger.cpp
@@ -25,7 +25,7 @@
using namespace KBlog;
-QString APIBlogger::getFunctionName( blogFunctions type )
+TQString APIBlogger::getFunctionName( blogFunctions type )
{
switch ( type ) {
case bloggerGetUserInfo: return "blogger.getUserInfo";
@@ -37,7 +37,7 @@ QString APIBlogger::getFunctionName( blogFunctions type )
case bloggerGetPost: return "blogger.getPost";
case bloggerGetTemplate: return "blogger.getTemplate";
case bloggerSetTemplate: return "blogger.setTemplate";
- default: return QString::null;
+ default: return TQString::null;
}
}
@@ -47,7 +47,7 @@ QString APIBlogger::getFunctionName( blogFunctions type )
KIO::Job *APIBlogger::createUserInfoJob()
{
kdDebug() << "read user info..." << endl;
- QValueList<QVariant> args( defaultArgs() );
+ TQValueList<TQVariant> args( defaultArgs() );
return KIO::xmlrpcCall( mServerURL, getFunctionName( bloggerGetUserInfo ), args, false );
}
@@ -56,7 +56,7 @@ KIO::Job *APIBlogger::createListFoldersJob()
// TODO: Check if we're already authenticated. If not, do it!
// if ( isValid() ) {
kdDebug() << "Fetch List of Blogs..." << endl;
- QValueList<QVariant> args( defaultArgs() );
+ TQValueList<TQVariant> args( defaultArgs() );
return KIO::xmlrpcCall( mServerURL, getFunctionName( bloggerGetUsersBlogs ), args, false );
// } else {
// warningNotInitialized();
@@ -69,8 +69,8 @@ KIO::TransferJob *APIBlogger::createListItemsJob( const KURL &url )
// TODO: Check if we're already authenticated. If not, do it!
// if ( isValid() ) {
kdDebug() << "Fetch List of Posts..." << endl;
- QValueList<QVariant> args( defaultArgs( url.url() ) );
- args << QVariant( mDownloadCount );
+ TQValueList<TQVariant> args( defaultArgs( url.url() ) );
+ args << TQVariant( mDownloadCount );
return KIO::xmlrpcCall( mServerURL, getFunctionName( bloggerGetRecentPosts ), args, false );
// } else {
// warningNotInitialized();
@@ -82,7 +82,7 @@ KIO::TransferJob *APIBlogger::createDownloadJob( const KURL &url )
{
// if ( isValid() ){
kdDebug() << "Fetch Posting with url " << url.url() << endl;
- QValueList<QVariant> args( defaultArgs( url.url() ) );
+ TQValueList<TQVariant> args( defaultArgs( url.url() ) );
return KIO::xmlrpcCall( mServerURL, getFunctionName( bloggerGetPost ), args, false );
// } else {
// warningNotInitialized();
@@ -98,9 +98,9 @@ KIO::TransferJob *APIBlogger::createUploadJob( const KURL &url, KBlog::BlogPosti
}
// if ( isValid() ){
kdDebug() << "Uploading Posting with url " << url.url() << endl;
- QValueList<QVariant> args( defaultArgs( posting->postID() ) );
- args << QVariant( posting->content() );
- args << QVariant( /*publish=*/true, 0 );
+ TQValueList<TQVariant> args( defaultArgs( posting->postID() ) );
+ args << TQVariant( posting->content() );
+ args << TQVariant( /*publish=*/true, 0 );
return KIO::xmlrpcCall( mServerURL, getFunctionName( bloggerEditPost ), args, false );
// } else {
// warningNotInitialized();
@@ -116,9 +116,9 @@ KIO::TransferJob *APIBlogger::createUploadNewJob( KBlog::BlogPosting *posting )
}
// if ( isValid() ){
kdDebug() << "Creating new Posting with blogid " << posting->blogID() << " at url " << mServerURL << endl;
- QValueList<QVariant> args( defaultArgs( posting->blogID() ) );
- args << QVariant( posting->content() );
- args << QVariant( /*publish=*/true, 0 );
+ TQValueList<TQVariant> args( defaultArgs( posting->blogID() ) );
+ args << TQVariant( posting->content() );
+ args << TQVariant( /*publish=*/true, 0 );
return KIO::xmlrpcCall( mServerURL, getFunctionName( bloggerNewPost ), args, false );
// } else {
// warningNotInitialized();
@@ -126,12 +126,12 @@ KIO::TransferJob *APIBlogger::createUploadNewJob( KBlog::BlogPosting *posting )
// }
}
-KIO::Job *APIBlogger::createRemoveJob( const KURL &/*url*/, const QString &postid )
+KIO::Job *APIBlogger::createRemoveJob( const KURL &/*url*/, const TQString &postid )
{
kdDebug() << "APIBlogger::createRemoveJob: postid=" << postid << endl;
// if ( isValid() ){
- QValueList<QVariant> args( defaultArgs( postid ) );
- args << QVariant( /*publish=*/true, 0 );
+ TQValueList<TQVariant> args( defaultArgs( postid ) );
+ args << TQVariant( /*publish=*/true, 0 );
return KIO::xmlrpcCall( mServerURL, getFunctionName( bloggerDeletePost ), args, false );
// } else {
// warningNotInitialized();
@@ -151,18 +151,18 @@ bool APIBlogger::interpretUserInfoJob( KIO::Job *job )
// TODO: Error handling
return false;
} else if ( trfjob ) {
- QValueList<QVariant> message( trfjob->response() );
+ TQValueList<TQVariant> message( trfjob->response() );
kdDebug () << "TOP: " << message[ 0 ].typeName() << endl;
- const QValueList<QVariant> posts = message;
- QValueList<QVariant>::ConstIterator it = posts.begin();
- QValueList<QVariant>::ConstIterator end = posts.end();
+ const TQValueList<TQVariant> posts = message;
+ TQValueList<TQVariant>::ConstIterator it = posts.begin();
+ TQValueList<TQVariant>::ConstIterator end = posts.end();
for ( ; it != end; ++it ) {
kdDebug () << "MIDDLE: " << ( *it ).typeName() << endl;
- const QMap<QString, QVariant> postInfo = ( *it ).toMap();
- const QString nickname = postInfo[ "nickname" ].toString();
- const QString userid = postInfo[ "userid" ].toString();
- const QString email = postInfo[ "email" ].toString();
+ const TQMap<TQString, TQVariant> postInfo = ( *it ).toMap();
+ const TQString nickname = postInfo[ "nickname" ].toString();
+ const TQString userid = postInfo[ "userid" ].toString();
+ const TQString email = postInfo[ "email" ].toString();
kdDebug() << "Post " << nickname << " " << userid << " " << email << endl;
// FIXME: How about a BlogUserInfo class???
emit userInfoRetrieved( nickname, userid, email );
@@ -180,19 +180,19 @@ kdDebug() << "APIBlogger::interpretListFoldersJob" << endl;
// TODO: Error handling
} else {
kdDebug() << "APIBlogger::interpretListFoldersJob, no error!" << endl;
- QValueList<QVariant> message( trfjob->response() );
+ TQValueList<TQVariant> message( trfjob->response() );
kdDebug () << "TOP: " << message[ 0 ].typeName() << endl;
- const QValueList<QVariant> posts = message[ 0 ].toList();
- QValueList<QVariant>::ConstIterator it = posts.begin();
- QValueList<QVariant>::ConstIterator end = posts.end();
+ const TQValueList<TQVariant> posts = message[ 0 ].toList();
+ TQValueList<TQVariant>::ConstIterator it = posts.begin();
+ TQValueList<TQVariant>::ConstIterator end = posts.end();
for ( ; it != end; ++it ) {
kdDebug () << "MIDDLE: " << ( *it ).typeName() << endl;
- const QMap<QString, QVariant> postInfo = ( *it ).toMap();
+ const TQMap<TQString, TQVariant> postInfo = ( *it ).toMap();
- const QString id( postInfo[ "blogid" ].toString() );
- const QString name( postInfo[ "blogName" ].toString() );
- const QString url( postInfo[ "url" ].toString() );
+ const TQString id( postInfo[ "blogid" ].toString() );
+ const TQString name( postInfo[ "blogName" ].toString() );
+ const TQString url( postInfo[ "url" ].toString() );
// Use the Blog ID instead of the URL. The ID already indicates the correct blog, and the
// URL for all calls will be the XML-RPC interface, anyway.
@@ -220,17 +220,17 @@ bool APIBlogger::interpretDownloadItemsJob( KIO::Job *job )
} else {
//array of structs containing ISO.8601 dateCreated, String userid, String postid, String content;
// TODO: Time zone for the dateCreated!
- QValueList<QVariant> message( trfjob->response() );
+ TQValueList<TQVariant> message( trfjob->response() );
kdDebug () << "TOP: " << message[ 0 ].typeName() << endl;
- const QValueList<QVariant> postReceived = message[ 0 ].toList();
- QValueList<QVariant>::ConstIterator it = postReceived.begin();
- QValueList<QVariant>::ConstIterator end = postReceived.end();
+ const TQValueList<TQVariant> postReceived = message[ 0 ].toList();
+ TQValueList<TQVariant>::ConstIterator it = postReceived.begin();
+ TQValueList<TQVariant>::ConstIterator end = postReceived.end();
success = true;
for ( ; it != end; ++it ) {
BlogPosting posting;
kdDebug () << "MIDDLE: " << ( *it ).typeName() << endl;
- const QMap<QString, QVariant> postInfo = ( *it ).toMap();
+ const TQMap<TQString, TQVariant> postInfo = ( *it ).toMap();
if ( readPostingFromMap( &posting, postInfo ) ) {
KCal::Journal *j = journalFromPosting( &posting );
// dumpBlog( &posting );
@@ -252,19 +252,19 @@ bool APIBlogger::interpretDownloadItemsJob( KIO::Job *job )
}
-bool APIBlogger::readPostingFromMap( BlogPosting *post, const QMap<QString, QVariant> &postInfo )
+bool APIBlogger::readPostingFromMap( BlogPosting *post, const TQMap<TQString, TQVariant> &postInfo )
{
// FIXME:
if ( !post ) return false;
- QStringList mapkeys = postInfo.keys();
+ TQStringList mapkeys = postInfo.keys();
kdDebug() << endl << "Keys: " << mapkeys.join(", ") << endl << endl;
- QString fp( QString::null );
+ TQString fp( TQString::null );
- QDateTime dt( postInfo[ "dateCreated" ].toDateTime() );
+ TQDateTime dt( postInfo[ "dateCreated" ].toDateTime() );
if ( dt.isValid() && !dt.isNull() ) {
post->setCreationDateTime( dt );
- QString fp = dt.toString( Qt::ISODate );
+ TQString fp = dt.toString( Qt::ISODate );
}
dt = postInfo[ "postDate" ].toDateTime();
if ( dt.isValid() && !dt.isNull() ) {
@@ -281,10 +281,10 @@ bool APIBlogger::readPostingFromMap( BlogPosting *post, const QMap<QString, QVar
post->setUserID( postInfo[ "userid" ].toString() );
post->setPostID( postInfo[ "postid" ].toString() );
- QString title( postInfo[ "title" ].toString() );
- QString description( postInfo[ "description" ].toString() );
- QString contents( postInfo[ "content" ].toString() );
- QString category;
+ TQString title( postInfo[ "title" ].toString() );
+ TQString description( postInfo[ "description" ].toString() );
+ TQString contents( postInfo[ "content" ].toString() );
+ TQString category;
// TODO: Extract title and cats from the old-style blogger api without extensions
/*
@@ -294,10 +294,10 @@ bool APIBlogger::readPostingFromMap( BlogPosting *post, const QMap<QString, QVar
kdDebug() << "No title and description given, so it's an old-style "
"Blogger API without extensions" << endl;
- QString catTagOpen = mTemplate.categoryTagOpen();
- QString catTagClose = mTemplate.categoryTagClose();
- QString titleTagOpen = mTemplate.titleTagOpen();
- QString titleTagClose = mTemplate.titleTagClose();
+ TQString catTagOpen = mTemplate.categoryTagOpen();
+ TQString catTagClose = mTemplate.categoryTagClose();
+ TQString titleTagOpen = mTemplate.titleTagOpen();
+ TQString titleTagClose = mTemplate.titleTagClose();
int catStart = contents.find( catTagOpen, 0, false ) + catTagOpen.length();
int catEnd = contents.find( catTagClose, 0, false );
diff --git a/kresources/blogging/API_Blogger.h b/kresources/blogging/API_Blogger.h
index 3195b472e..32610bf60 100644
--- a/kresources/blogging/API_Blogger.h
+++ b/kresources/blogging/API_Blogger.h
@@ -23,18 +23,18 @@
#include "API_Blog.h"
-#include <qstring.h>
-#include <qvariant.h>
-#include <qvaluelist.h>
+#include <tqstring.h>
+#include <tqvariant.h>
+#include <tqvaluelist.h>
namespace KBlog {
class APIBlogger : public APIBlog
{
public:
- APIBlogger( const KURL &server, QObject *parent = 0L, const char *name = 0L ) : APIBlog( server, parent, name ) {}
- QString getFunctionName( blogFunctions type );
- QString interfaceName() const { return "Blogger API 1.0"; }
+ APIBlogger( const KURL &server, TQObject *parent = 0L, const char *name = 0L ) : APIBlog( server, parent, name ) {}
+ TQString getFunctionName( blogFunctions type );
+ TQString interfaceName() const { return "Blogger API 1.0"; }
KIO::Job *createUserInfoJob();
@@ -43,14 +43,14 @@ class APIBlogger : public APIBlog
KIO::TransferJob *createDownloadJob( const KURL &url );
KIO::TransferJob *createUploadJob( const KURL &url, KBlog::BlogPosting *posting );
KIO::TransferJob *createUploadNewJob( KBlog::BlogPosting *posting );
- KIO::Job *createRemoveJob( const KURL &url, const QString &postid );
+ KIO::Job *createRemoveJob( const KURL &url, const TQString &postid );
bool interpretUserInfoJob( KIO::Job *job );
void interpretListFoldersJob( KIO::Job *job );
bool interpretListItemsJob( KIO::Job *job );
bool interpretDownloadItemsJob( KIO::Job *job );
protected:
- bool readPostingFromMap( BlogPosting *post, const QMap<QString, QVariant> &postInfo );
+ bool readPostingFromMap( BlogPosting *post, const TQMap<TQString, TQVariant> &postInfo );
};
}
diff --git a/kresources/blogging/bloggingcalendaradaptor.cpp b/kresources/blogging/bloggingcalendaradaptor.cpp
index 252452788..1255cab38 100644
--- a/kresources/blogging/bloggingcalendaradaptor.cpp
+++ b/kresources/blogging/bloggingcalendaradaptor.cpp
@@ -36,8 +36,8 @@ using namespace KCal;
// http://www.blogger.com/developers/api/1_docs/register.html
// for the "KDE-Pim libkcal blogging resource".
// TODO:
-/*QString BloggingCalendarAdaptor::mAppID =
- QString("20ffffffd7ffffffc5ffffffbdffffff87ffffffb72d39fffffffe5c4bfffff"
+/*TQString BloggingCalendarAdaptor::mAppID =
+ TQString("20ffffffd7ffffffc5ffffffbdffffff87ffffffb72d39fffffffe5c4bfffff"
"fcfffffff80ffffffd4665cfffffff375ffffff88ffffff871a0cffffff8029");
*/
@@ -102,18 +102,18 @@ void BloggingCalendarAdaptor::setAPI( KBlog::APIBlog *api )
delete mAPI;
mAPI = api;
mAuthenticated = false;
- connect( api, SIGNAL( userInfoRetrieved( const QString &, const QString &,
- const QString & ) ),
- SLOT( slotUserInfoRetrieved( const QString &, const QString &,
- const QString & ) ) );
- connect( api, SIGNAL( folderInfoRetrieved( const QString &, const QString & ) ),
- SLOT( slotFolderInfoRetrieved( const QString&, const QString & ) ) );
- connect( api, SIGNAL( itemOnServer( const KURL & ) ),
- SIGNAL( itemOnServer( const KURL & ) ) );
- connect( api, SIGNAL( itemDownloaded( KCal::Incidence *, const QString &,
- const KURL &, const QString &, const QString & ) ),
- SLOT( calendarItemDownloaded( KCal::Incidence *, const QString &,
- const KURL &, const QString &, const QString & ) ) );
+ connect( api, TQT_SIGNAL( userInfoRetrieved( const TQString &, const TQString &,
+ const TQString & ) ),
+ TQT_SLOT( slotUserInfoRetrieved( const TQString &, const TQString &,
+ const TQString & ) ) );
+ connect( api, TQT_SIGNAL( folderInfoRetrieved( const TQString &, const TQString & ) ),
+ TQT_SLOT( slotFolderInfoRetrieved( const TQString&, const TQString & ) ) );
+ connect( api, TQT_SIGNAL( itemOnServer( const KURL & ) ),
+ TQT_SIGNAL( itemOnServer( const KURL & ) ) );
+ connect( api, TQT_SIGNAL( itemDownloaded( KCal::Incidence *, const TQString &,
+ const KURL &, const TQString &, const TQString & ) ),
+ TQT_SLOT( calendarItemDownloaded( KCal::Incidence *, const TQString &,
+ const KURL &, const TQString &, const TQString & ) ) );
}
@@ -125,13 +125,13 @@ KPIM::GroupwareUploadItem *BloggingCalendarAdaptor::newUploadItem( KCal::Inciden
-void BloggingCalendarAdaptor::slotFolderInfoRetrieved( const QString &id, const QString &name )
+void BloggingCalendarAdaptor::slotFolderInfoRetrieved( const TQString &id, const TQString &name )
{
emit folderInfoRetrieved( KURL(id), name, KPIM::FolderLister::Journal );
}
-void BloggingCalendarAdaptor::slotUserInfoRetrieved( const QString &/*nick*/,
- const QString &/*user*/, const QString &/*email*/ )
+void BloggingCalendarAdaptor::slotUserInfoRetrieved( const TQString &/*nick*/,
+ const TQString &/*user*/, const TQString &/*email*/ )
{
kdDebug() << "BloggingCalendarAdaptor::slotUserInfoRetrieved"<<endl;
mAuthenticated = true;
@@ -144,7 +144,7 @@ void BloggingCalendarAdaptor::setBaseURL( const KURL &url )
}
}
-void BloggingCalendarAdaptor::setUser( const QString &user )
+void BloggingCalendarAdaptor::setUser( const TQString &user )
{
CalendarAdaptor::setUser( user );
if ( mAPI ) {
@@ -152,7 +152,7 @@ void BloggingCalendarAdaptor::setUser( const QString &user )
}
}
-void BloggingCalendarAdaptor::setPassword( const QString &password )
+void BloggingCalendarAdaptor::setPassword( const TQString &password )
{
CalendarAdaptor::setPassword( password );
if ( mAPI ) {
@@ -168,8 +168,8 @@ void BloggingCalendarAdaptor::setUserPassword( KURL & )
KIO::Job *BloggingCalendarAdaptor::createLoginJob( const KURL &url,
- const QString &user,
- const QString &password )
+ const TQString &user,
+ const TQString &password )
{
if ( mAPI ) {
mAPI->setURL( url );
@@ -236,7 +236,7 @@ kdDebug() << "BloggingCalendarAdaptor::interpretListFoldersJob" << endl;
bool BloggingCalendarAdaptor::interpretListItemsJob( KIO::Job *job,
- const QString &/*jobData*/ )
+ const TQString &/*jobData*/ )
{
if ( mAPI ) {
return mAPI->interpretListItemsJob( job );
@@ -247,7 +247,7 @@ bool BloggingCalendarAdaptor::interpretListItemsJob( KIO::Job *job,
bool BloggingCalendarAdaptor::interpretDownloadItemsJob( KIO::Job *job,
- const QString &/*jobData*/ )
+ const TQString &/*jobData*/ )
{
if ( mAPI ) {
return mAPI->interpretDownloadItemsJob( job );
diff --git a/kresources/blogging/bloggingcalendaradaptor.h b/kresources/blogging/bloggingcalendaradaptor.h
index b078a744a..2b7a4899b 100644
--- a/kresources/blogging/bloggingcalendaradaptor.h
+++ b/kresources/blogging/bloggingcalendaradaptor.h
@@ -53,27 +53,27 @@ class BloggingCalendarAdaptor : public CalendarAdaptor
Q_OBJECT
public:
BloggingCalendarAdaptor();
- QValueList<KPIM::FolderLister::ContentType> supportedTypes()
+ TQValueList<KPIM::FolderLister::ContentType> supportedTypes()
{
- QValueList<KPIM::FolderLister::ContentType> types;
+ TQValueList<KPIM::FolderLister::ContentType> types;
types << KPIM::FolderLister::Journal;
return types;
}
- QCString identifier() const { return "KCalResourceBlogging"; }
+ TQCString identifier() const { return "KCalResourceBlogging"; }
long flags() const { return GWResNeedsLogon; }
void setBaseURL( const KURL &url );
- void setUser( const QString &user );
- void setPassword( const QString &password );
+ void setUser( const TQString &user );
+ void setPassword( const TQString &password );
// We don't want to set the username / pw for the URL!
void setUserPassword( KURL &url );
KBlog::APIBlog *api() const;
void setAPI( KBlog::APIBlog *api );
- KIO::Job *createLoginJob( const KURL &url, const QString &user,
- const QString &password );
+ KIO::Job *createLoginJob( const KURL &url, const TQString &user,
+ const TQString &password );
KIO::Job *createListFoldersJob( const KURL &url );
KIO::TransferJob *createListItemsJob( const KURL &url );
KIO::TransferJob *createDownloadJob( const KURL &url,
@@ -82,13 +82,13 @@ Q_OBJECT
bool interpretLoginJob( KIO::Job *job );
void interpretListFoldersJob( KIO::Job *job, KPIM::FolderLister * );
- bool interpretListItemsJob( KIO::Job *job, const QString &jobData );
- bool interpretDownloadItemsJob( KIO::Job *job, const QString &jobData );
+ bool interpretListItemsJob( KIO::Job *job, const TQString &jobData );
+ bool interpretDownloadItemsJob( KIO::Job *job, const TQString &jobData );
public slots:
- void slotFolderInfoRetrieved( const QString &id, const QString &name );
- void slotUserInfoRetrieved( const QString &nick, const QString &user,
- const QString &email );
+ void slotFolderInfoRetrieved( const TQString &id, const TQString &name );
+ void slotUserInfoRetrieved( const TQString &nick, const TQString &user,
+ const TQString &email );
protected:
KPIM::GroupwareUploadItem *newUploadItem( KCal::Incidence*it,
@@ -96,7 +96,7 @@ Q_OBJECT
KBlog::APIBlog *mAPI;
bool mAuthenticated;
- static QString mAppID;
+ static TQString mAppID;
};
}
diff --git a/kresources/blogging/bloggingglobals.cpp b/kresources/blogging/bloggingglobals.cpp
index fae91610f..247ed9014 100644
--- a/kresources/blogging/bloggingglobals.cpp
+++ b/kresources/blogging/bloggingglobals.cpp
@@ -21,9 +21,9 @@
#include "bloggingglobals.h"
-QString BloggingGlobals::mAppID = QString("20ffffffd7ffffffc5ffffffbdffffff87ffffffb72d39fffffffe5c4bffffffcfffffff80ffffffd4665cfffffff375ffffff88ffffff871a0cffffff8029");
+TQString BloggingGlobals::mAppID = TQString("20ffffffd7ffffffc5ffffffbdffffff87ffffffb72d39fffffffe5c4bffffffcfffffff80ffffffd4665cfffffff375ffffff88ffffff871a0cffffff8029");
-QString BloggingGlobals::getFunctionName( blogFunctions type )
+TQString BloggingGlobals::getFunctionName( blogFunctions type )
{
switch ( type ) {
case bloggerGetUserInfo: return "blogger.getUserInfo";
@@ -35,19 +35,19 @@ QString BloggingGlobals::getFunctionName( blogFunctions type )
case bloggerGetPost: return "blogger.getPost";
case bloggerGetTemplate: return "blogger.getTemplate";
case bloggerSetTemplate: return "blogger.setTemplate";
- default: return QString::null;
+ default: return TQString::null;
}
}
-QValueList<QVariant> BloggingGlobals::defaultArgs( const QString &user, const QString &pw, const QString &id )
+TQValueList<TQVariant> BloggingGlobals::defaultArgs( const TQString &user, const TQString &pw, const TQString &id )
{
- QValueList<QVariant> args;
- args << QVariant( mAppID );
+ TQValueList<TQVariant> args;
+ args << TQVariant( mAppID );
if ( !id.isNull() ) {
- args << QVariant( id );
+ args << TQVariant( id );
}
- args << QVariant( user )
- << QVariant( pw );
+ args << TQVariant( user )
+ << TQVariant( pw );
return args;
}
diff --git a/kresources/blogging/bloggingglobals.h b/kresources/blogging/bloggingglobals.h
index 7d6ed786b..b55029f1a 100644
--- a/kresources/blogging/bloggingglobals.h
+++ b/kresources/blogging/bloggingglobals.h
@@ -21,9 +21,9 @@
#ifndef BLOGGINGGLOBALS_H
#define BLOGGINGGLOBALS_H
-#include <qstring.h>
-#include <qvariant.h>
-#include <qvaluelist.h>
+#include <tqstring.h>
+#include <tqvariant.h>
+#include <tqvaluelist.h>
class BloggingGlobals
{
@@ -42,9 +42,9 @@ class BloggingGlobals
bloggerSetTemplate
};
- static QString getFunctionName( blogFunctions type );
- static QValueList<QVariant> defaultArgs( const QString &user, const QString &pw, const QString &id = QString::null );
- static QString mAppID;
+ static TQString getFunctionName( blogFunctions type );
+ static TQValueList<TQVariant> defaultArgs( const TQString &user, const TQString &pw, const TQString &id = TQString::null );
+ static TQString mAppID;
};
#endif
diff --git a/kresources/blogging/kcal_resourceblogging.cpp b/kresources/blogging/kcal_resourceblogging.cpp
index bffce10d3..6f7ed46ec 100644
--- a/kresources/blogging/kcal_resourceblogging.cpp
+++ b/kresources/blogging/kcal_resourceblogging.cpp
@@ -62,7 +62,7 @@ void ResourceBlogging::readConfig( const KConfig *config )
ad->setPassword( prefs()->password() );
ad->setBaseURL( prefs()->url() );
}
-// QString url = config->readEntry( "URL" );
+// TQString url = config->readEntry( "URL" );
// mUrl = KURL( url );
// mServerAPI = config->readNumEntry( "ServerAPI" );
diff --git a/kresources/blogging/kcal_resourcebloggingconfig.cpp b/kresources/blogging/kcal_resourcebloggingconfig.cpp
index 6e2348288..d68584a2b 100644
--- a/kresources/blogging/kcal_resourcebloggingconfig.cpp
+++ b/kresources/blogging/kcal_resourcebloggingconfig.cpp
@@ -25,7 +25,7 @@
using namespace KCal;
-ResourceBloggingConfig::ResourceBloggingConfig( QWidget *parent, const char *name ) : ResourceGroupwareBaseConfig( parent, name )
+ResourceBloggingConfig::ResourceBloggingConfig( TQWidget *parent, const char *name ) : ResourceGroupwareBaseConfig( parent, name )
{
}
diff --git a/kresources/blogging/kcal_resourcebloggingconfig.h b/kresources/blogging/kcal_resourcebloggingconfig.h
index a7a7a4b00..8495595b6 100644
--- a/kresources/blogging/kcal_resourcebloggingconfig.h
+++ b/kresources/blogging/kcal_resourcebloggingconfig.h
@@ -29,7 +29,7 @@ class KDE_EXPORT ResourceBloggingConfig : public ResourceGroupwareBaseConfig
{
Q_OBJECT
public:
- ResourceBloggingConfig( QWidget *parent = 0, const char *name = 0 );
+ ResourceBloggingConfig( TQWidget *parent = 0, const char *name = 0 );
public slots:
virtual void saveSettings( KRES::Resource *resource );
diff --git a/kresources/blogging/xmlrpcjob.cpp b/kresources/blogging/xmlrpcjob.cpp
index 76bee44f8..d99e8add8 100644
--- a/kresources/blogging/xmlrpcjob.cpp
+++ b/kresources/blogging/xmlrpcjob.cpp
@@ -26,8 +26,8 @@
#include "xmlrpcjob.h"
-#include <qvariant.h>
-#include <qregexp.h>
+#include <tqvariant.h>
+#include <tqregexp.h>
#include <kdebug.h>
#include <klocale.h>
@@ -36,8 +36,8 @@
#include <kio/davjob.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;
@@ -49,32 +49,32 @@ namespace KIO {
XMLRPCResult() {}
bool success() const { return m_success; }
int errorCode() const { return m_errorCode; }
- QString errorString() const { return m_errorString; }
- QValueList<QVariant> data() const { return m_data; }
+ TQString errorString() const { return m_errorString; }
+ TQValueList<TQVariant> data() const { return m_data; }
private:
bool m_success;
int m_errorCode;
- QString m_errorString;
- QValueList<QVariant> m_data;
+ TQString m_errorString;
+ TQValueList<TQVariant> m_data;
};
}
class XmlrpcJob::XmlrpcJobPrivate
{
public:
-// QByteArray savedStaticData;
+// TQByteArray savedStaticData;
};
-XmlrpcJob::XmlrpcJob( const KURL& url, const QString& method,
- const QValueList<QVariant> &params, bool showProgressInfo)
- : TransferJob( url, KIO::CMD_SPECIAL, QByteArray(), QByteArray(),
+XmlrpcJob::XmlrpcJob( const KURL& url, const TQString& method,
+ const TQValueList<TQVariant> &params, bool showProgressInfo)
+ : TransferJob( url, KIO::CMD_SPECIAL, TQByteArray(), TQByteArray(),
showProgressInfo )
{
d = new XmlrpcJobPrivate;
// 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)1 << url;
kdDebug()<<"XMLrpcJob::url="<<url.url()<<endl;
kdDebug()<<"XmlrpcJob::XmlrpcJob, method="<<method<<endl;
@@ -82,7 +82,7 @@ kdDebug()<<"XmlrpcJob::XmlrpcJob, method="<<method<<endl;
if ( ! method.isEmpty() ) {
kdDebug()<<"XmlrpcJob::XmlrpcJob, method not empty."<<endl;
- QString call = markupCall( method, params );
+ TQString call = markupCall( method, params );
staticData = call.utf8();
staticData.truncate( staticData.size() - 1 );
kdDebug() << "Message: " << call << endl;
@@ -99,19 +99,19 @@ XmlrpcJob::~XmlrpcJob()
d = 0;
}
-QString XmlrpcJob::markupCall( const QString &cmd,
- const QValueList<QVariant> &args )
+TQString XmlrpcJob::markupCall( const TQString &cmd,
+ const TQValueList<TQVariant> &args )
{
kdDebug()<<"XmlrpcJob::markupCall, cmd="<<cmd<<endl;
- QString markup = "<?xml version=\"1.0\" ?>\r\n<methodCall>\r\n";
+ TQString markup = "<?xml version=\"1.0\" ?>\r\n<methodCall>\r\n";
markup += "<methodName>" + cmd + "</methodName>\r\n";
if ( !args.isEmpty() )
{
markup += "<params>\r\n";
- QValueList<QVariant>::ConstIterator it = args.begin();
- QValueList<QVariant>::ConstIterator end = args.end();
+ TQValueList<TQVariant>::ConstIterator it = args.begin();
+ TQValueList<TQVariant>::ConstIterator end = args.end();
for ( ; it != end; ++it )
markup += "<param>\r\n" + marshal( *it ) + "</param>\r\n";
markup += "</params>\r\n";
@@ -126,11 +126,11 @@ kdDebug()<<"XmlrpcJob::markupCall, cmd="<<cmd<<endl;
-void XmlrpcJob::slotData( const QByteArray& data )
+void XmlrpcJob::slotData( const TQByteArray& data )
{
kdDebug()<<"XmlrpcJob::slotData()"<<endl;
if ( m_redirectionURL.isEmpty() || !m_redirectionURL.isValid() || m_error )
- m_str_response.append( QString( data ) );
+ m_str_response.append( TQString( data ) );
}
void XmlrpcJob::slotFinished()
@@ -140,7 +140,7 @@ kdDebug() << m_str_response << endl;
// TODO: Redirection with XML-RPC??
/* if (! m_redirectionURL.isEmpty() && m_redirectionURL.isValid() ) {
- QDataStream istream( m_packedArgs, IO_ReadOnly );
+ TQDataStream istream( m_packedArgs, IO_ReadOnly );
int s_cmd, s_method;
KURL s_url;
istream >> s_cmd;
@@ -149,14 +149,14 @@ kdDebug() << m_str_response << endl;
// PROPFIND
if ( (s_cmd == 7) && (s_method == (int)KIO::HTTP_POST) ) {
m_packedArgs.truncate(0);
- QDataStream stream( m_packedArgs, IO_WriteOnly );
+ TQDataStream stream( m_packedArgs, IO_WriteOnly );
stream << (int)7 << m_redirectionURL << (int)KIO::HTTP_POST;
}
} else */
kdDebug() << "\033[35;40mResult: " << m_str_response << "\033[0;0m" << endl;
- QDomDocument doc;
- QString errMsg;
+ TQDomDocument doc;
+ TQString errMsg;
int errLine, errCol;
if ( doc.setContent( m_str_response, false, &errMsg, &errLine, &errCol ) ) {
if ( isMessageResponse( doc ) ) {
@@ -165,12 +165,12 @@ kdDebug() << m_str_response << endl;
} else if ( isFaultResponse( doc ) ) {
// TODO: Set the error of the job
m_response.clear();
- m_response << QVariant( parseFaultResponse( doc ).errorString() );
+ m_response << TQVariant( parseFaultResponse( doc ).errorString() );
m_responseType = XMLRPCFaultResponse;
} else {
// TODO: Set the error of the job
m_response.clear();
- m_response << QVariant( i18n( "Unknown type of XML markup received. "
+ m_response << TQVariant( i18n( "Unknown type of XML markup received. "
"Markup: \n %1" ).arg( m_str_response ) );
m_responseType = XMLRPCUnknownResponse;
}
@@ -190,18 +190,18 @@ kdDebug() << m_str_response << endl;
-bool XmlrpcJob::isMessageResponse( const QDomDocument &doc )
+bool XmlrpcJob::isMessageResponse( const TQDomDocument &doc )
{
return doc.documentElement().firstChild().toElement()
.tagName().lower() == "params";
}
-XMLRPCResult XmlrpcJob::parseMessageResponse( const QDomDocument &doc )
+XMLRPCResult XmlrpcJob::parseMessageResponse( const TQDomDocument &doc )
{
XMLRPCResult response;
response.m_success = true;
- QDomNode paramNode = doc.documentElement().firstChild().firstChild();
+ TQDomNode paramNode = doc.documentElement().firstChild().firstChild();
while ( !paramNode.isNull() ) {
response.m_data << demarshal( paramNode.firstChild().toElement() );
paramNode = paramNode.nextSibling();
@@ -214,19 +214,19 @@ XMLRPCResult XmlrpcJob::parseMessageResponse( const QDomDocument &doc )
-bool XmlrpcJob::isFaultResponse( const QDomDocument &doc )
+bool XmlrpcJob::isFaultResponse( const TQDomDocument &doc )
{
return doc.documentElement().firstChild().toElement()
.tagName().lower() == "fault";
}
-XMLRPCResult XmlrpcJob::parseFaultResponse( const QDomDocument &doc )
+XMLRPCResult XmlrpcJob::parseFaultResponse( const TQDomDocument &doc )
{
XMLRPCResult response;
response.m_success = false;
- QDomNode errorNode = doc.documentElement().firstChild().firstChild();
- const QVariant errorVariant = demarshal( errorNode.toElement() );
+ TQDomNode errorNode = doc.documentElement().firstChild().firstChild();
+ const TQVariant errorVariant = demarshal( errorNode.toElement() );
response.m_errorCode = errorVariant.toMap() [ "faultCode" ].toInt();
response.m_errorString = errorVariant.toMap() [ "faultString" ].toString();
@@ -237,50 +237,50 @@ XMLRPCResult XmlrpcJob::parseFaultResponse( const QDomDocument &doc )
-QString XmlrpcJob::marshal( const QVariant &arg )
+TQString XmlrpcJob::marshal( const TQVariant &arg )
{
switch ( arg.type() )
{
- case QVariant::String:
- case QVariant::CString:
+ case TQVariant::String:
+ case TQVariant::CString:
return "<value><string>" + arg.toString() + "</string></value>\r\n";
- case QVariant::Int:
- return "<value><int>" + QString::number( arg.toInt() ) +
+ case TQVariant::Int:
+ return "<value><int>" + TQString::number( arg.toInt() ) +
"</int></value>\r\n";
- case QVariant::Double:
- return "<value><double>" + QString::number( arg.toDouble() ) +
+ case TQVariant::Double:
+ return "<value><double>" + TQString::number( arg.toDouble() ) +
"</double></value>\r\n";
- case QVariant::Bool:
+ case TQVariant::Bool:
{
- QString markup = "<value><boolean>";
+ TQString markup = "<value><boolean>";
markup += arg.toBool() ? "1" : "0";
markup += "</boolean></value>\r\n";
return markup;
}
- case QVariant::ByteArray:
+ case TQVariant::ByteArray:
return "<value><base64>" + KCodecs::base64Encode( arg.toByteArray() ) +
"</base64></value>\r\n";
- case QVariant::DateTime:
+ case TQVariant::DateTime:
return "<value><datetime.iso8601>" +
arg.toDateTime().toString( Qt::ISODate ) +
"</datetime.iso8601></value>\r\n";
- case QVariant::List:
+ case TQVariant::List:
{
- QString markup = "<value><array><data>\r\n";
- const QValueList<QVariant> args = arg.toList();
- QValueList<QVariant>::ConstIterator it = args.begin();
- QValueList<QVariant>::ConstIterator end = args.end();
+ TQString markup = "<value><array><data>\r\n";
+ const TQValueList<TQVariant> args = arg.toList();
+ TQValueList<TQVariant>::ConstIterator it = args.begin();
+ TQValueList<TQVariant>::ConstIterator end = args.end();
for ( ; it != end; ++it )
markup += marshal( *it );
markup += "</data></array></value>\r\n";
return markup;
}
- case QVariant::Map:
+ case TQVariant::Map:
{
- QString markup = "<value><struct>\r\n";
- QMap<QString, QVariant> map = arg.toMap();
- QMap<QString, QVariant>::ConstIterator it = map.begin();
- QMap<QString, QVariant>::ConstIterator end = map.end();
+ TQString markup = "<value><struct>\r\n";
+ TQMap<TQString, TQVariant> map = arg.toMap();
+ TQMap<TQString, TQVariant>::ConstIterator it = map.begin();
+ TQMap<TQString, TQVariant>::ConstIterator end = map.end();
for ( ; it != end; ++it )
{
markup += "<member>\r\n";
@@ -295,10 +295,10 @@ QString XmlrpcJob::marshal( const QVariant &arg )
kdWarning() << "Failed to marshal unknown variant type: "
<< arg.type() << endl;
};
- return QString::null;
+ return TQString::null;
}
-QVariant XmlrpcJob::demarshal( const QDomElement &elem )
+TQVariant XmlrpcJob::demarshal( const TQDomElement &elem )
{
Q_ASSERT( elem.tagName().lower() == "value" );
@@ -310,71 +310,71 @@ QVariant XmlrpcJob::demarshal( const QDomElement &elem )
// Actually, the element will still have a child node, so this will not help here.
// The dirty hack is at the end of this method.
kdDebug()<<"XmlrpcJob::demarshal: No child nodes, assume type=string. Text: "<<elem.text()<<endl;
- return QVariant( elem.text() );
+ return TQVariant( elem.text() );
}
kdDebug()<<"Demarshalling element \"" << elem.text() <<"\"" << endl;
- const QDomElement typeElement = elem.firstChild().toElement();
- const QString typeName = typeElement.tagName().lower();
+ const TQDomElement typeElement = elem.firstChild().toElement();
+ const TQString typeName = typeElement.tagName().lower();
if ( typeName == "string" )
- return QVariant( typeElement.text() );
+ return TQVariant( typeElement.text() );
else if ( typeName == "i4" || typeName == "int" )
- return QVariant( typeElement.text().toInt() );
+ return TQVariant( typeElement.text().toInt() );
else if ( typeName == "double" )
- return QVariant( typeElement.text().toDouble() );
+ return TQVariant( typeElement.text().toDouble() );
else if ( typeName == "boolean" )
{
if ( typeElement.text().lower() == "true" || typeElement.text() == "1" )
- return QVariant( true );
+ return TQVariant( true );
else
- return QVariant( false );
+ return TQVariant( false );
}
else if ( typeName == "base64" )
- return QVariant( KCodecs::base64Decode( typeElement.text().latin1() ) );
+ return TQVariant( KCodecs::base64Decode( typeElement.text().latin1() ) );
else if ( typeName == "datetime" || typeName == "datetime.iso8601" ) {
- QString text( typeElement.text() );
- if ( text.find( QRegExp("^[0-9]{8,8}T") ) >= 0 ) {
+ TQString text( typeElement.text() );
+ if ( text.find( TQRegExp("^[0-9]{8,8}T") ) >= 0 ) {
// It's in the format 20041120T...., so adjust it to correct
- // ISO 8601 Format 2004-11-20T..., else QDateTime::fromString won't work:
+ // ISO 8601 Format 2004-11-20T..., else TQDateTime::fromString won't work:
text = text.insert( 6, '-' );
text = text.insert( 4, '-' );
}
- return QVariant( QDateTime::fromString( text, Qt::ISODate ) );
+ return TQVariant( TQDateTime::fromString( text, Qt::ISODate ) );
} else if ( typeName == "array" ) {
- QValueList<QVariant> values;
- QDomNode valueNode = typeElement.firstChild().firstChild();
+ TQValueList<TQVariant> values;
+ TQDomNode valueNode = typeElement.firstChild().firstChild();
while ( !valueNode.isNull() ) {
values << demarshal( valueNode.toElement() );
valueNode = valueNode.nextSibling();
}
- return QVariant( values );
+ return TQVariant( values );
} else if ( typeName == "struct" ) {
- QMap<QString, QVariant> map;
- QDomNode memberNode = typeElement.firstChild();
+ TQMap<TQString, TQVariant> map;
+ TQDomNode memberNode = typeElement.firstChild();
while ( !memberNode.isNull() ) {
- const QString key = memberNode.toElement().elementsByTagName( "name" ).item( 0 ).toElement().text();
- const QVariant data = demarshal( memberNode.toElement().elementsByTagName( "value" ).item( 0 ).toElement() );
+ const TQString key = memberNode.toElement().elementsByTagName( "name" ).item( 0 ).toElement().text();
+ const TQVariant data = demarshal( memberNode.toElement().elementsByTagName( "value" ).item( 0 ).toElement() );
map[ key ] = data;
memberNode = memberNode.nextSibling();
}
- return QVariant( map );
+ return TQVariant( map );
} else {
kdWarning() << "Cannot demarshal unknown type " << typeName << ", text= " << typeElement.text() << endl;
// FIXME: This is just a workaround, for the issue mentioned at the beginning of this method.
- return QVariant( elem.text() );
+ return TQVariant( elem.text() );
}
- return QVariant();
+ return TQVariant();
}
@@ -383,7 +383,7 @@ kdDebug()<<"Demarshalling element \"" << elem.text() <<"\"" << endl;
/* Convenience methods */
-XmlrpcJob* KIO::xmlrpcCall( const KURL& url, const QString &method, const QValueList<QVariant> &params, bool showProgressInfo )
+XmlrpcJob* KIO::xmlrpcCall( const KURL& url, const TQString &method, const TQValueList<TQVariant> &params, bool showProgressInfo )
{
if ( url.isEmpty() ) {
kdWarning() << "Cannot execute call to " << method << ": empty server URL" << endl;
@@ -395,35 +395,35 @@ XmlrpcJob* KIO::xmlrpcCall( const KURL& url, const QString &method, const QValue
return job;
}
-XmlrpcJob* KIO::xmlrpcCall( const KURL& url, const QString &method,
- const QVariant &arg, bool showProgressInfo )
+XmlrpcJob* KIO::xmlrpcCall( const KURL& url, const TQString &method,
+ const TQVariant &arg, bool showProgressInfo )
{
- QValueList<QVariant> args;
+ TQValueList<TQVariant> args;
args << arg;
return KIO::xmlrpcCall( url, method, args, showProgressInfo );
}
-XmlrpcJob* KIO::xmlrpcCall( const KURL& url, const QString &method,
- const QStringList &arg, bool showProgressInfo )
+XmlrpcJob* KIO::xmlrpcCall( const KURL& url, const TQString &method,
+ const TQStringList &arg, bool showProgressInfo )
{
- QValueList<QVariant> args;
- QStringList::ConstIterator it = arg.begin();
- QStringList::ConstIterator end = arg.end();
+ TQValueList<TQVariant> args;
+ TQStringList::ConstIterator it = arg.begin();
+ TQStringList::ConstIterator end = arg.end();
for ( ; it != end; ++it )
- args << QVariant( *it );
+ args << TQVariant( *it );
return KIO::xmlrpcCall( url, method, args, showProgressInfo );
}
template <typename T>
-XmlrpcJob* KIO::xmlrpcCall( const KURL& url, const QString &method,
- const QValueList<T>&arg, bool showProgressInfo )
+XmlrpcJob* KIO::xmlrpcCall( const KURL& url, const TQString &method,
+ const TQValueList<T>&arg, bool showProgressInfo )
{
- QValueList<QVariant> args;
+ TQValueList<TQVariant> args;
- typename QValueList<T>::ConstIterator it = arg.begin();
- typename QValueList<T>::ConstIterator end = arg.end();
+ typename TQValueList<T>::ConstIterator it = arg.begin();
+ typename TQValueList<T>::ConstIterator end = arg.end();
for ( ; it != end; ++it )
- args << QVariant( *it );
+ args << TQVariant( *it );
return KIO::xmlrpcCall( url, method, args, showProgressInfo );
}
diff --git a/kresources/blogging/xmlrpcjob.h b/kresources/blogging/xmlrpcjob.h
index cd657aa3b..7bb18b159 100644
--- a/kresources/blogging/xmlrpcjob.h
+++ b/kresources/blogging/xmlrpcjob.h
@@ -25,9 +25,9 @@
#include <kurl.h>
-#include <qstring.h>
-#include <qvaluelist.h>
-#include <qdom.h>
+#include <tqstring.h>
+#include <tqvaluelist.h>
+#include <tqdom.h>
#include <kio/jobclasses.h>
#include <kio/global.h>
@@ -59,42 +59,42 @@ Q_OBJECT
* Use KIO::xmlrpcPropFind(), KIO::xmlrpcPropPatch() and
* KIO::xmlrpcSearch() to create a new XmlrpcJob.
*/
- XmlrpcJob( const KURL& url, const QString& method,
- const QValueList<QVariant> &params, bool showProgressInfo );
+ XmlrpcJob( const KURL& url, const TQString& method,
+ const TQValueList<TQVariant> &params, bool showProgressInfo );
virtual ~XmlrpcJob();
/**
- * Returns the response as a QDomDocument.
+ * Returns the response as a TQDomDocument.
* @return the response document
*/
- QValueList<QVariant> &response() { return m_response; }
+ TQValueList<TQVariant> &response() { return m_response; }
/**
* Returns the type of the response.
* @return the type of the response
*/
XMLRPCResponseType responseType() const { return m_responseType; }
- static QString markupCall( const QString &cmd,
- const QValueList<QVariant> &args );
+ static TQString markupCall( const TQString &cmd,
+ const TQValueList<TQVariant> &args );
protected slots:
virtual void slotFinished();
- virtual void slotData( const QByteArray &data);
+ virtual void slotData( const TQByteArray &data);
protected:
- static QString marshal( const QVariant &arg );
- static QVariant demarshal( const QDomElement &e );
+ static TQString marshal( const TQVariant &arg );
+ static TQVariant demarshal( const TQDomElement &e );
- static bool isMessageResponse( const QDomDocument &doc );
- static bool isFaultResponse( const QDomDocument &doc );
+ static bool isMessageResponse( const TQDomDocument &doc );
+ static bool isFaultResponse( const TQDomDocument &doc );
- static XMLRPCResult parseMessageResponse( const QDomDocument &doc );
- static XMLRPCResult parseFaultResponse( const QDomDocument &doc );
+ static XMLRPCResult parseMessageResponse( const TQDomDocument &doc );
+ static XMLRPCResult parseFaultResponse( const TQDomDocument &doc );
private:
class XmlrpcJobPrivate;
XmlrpcJobPrivate *d;
- QString m_str_response;
- QValueList<QVariant> m_response;
+ TQString m_str_response;
+ TQValueList<TQVariant> m_response;
XMLRPCResponseType m_responseType;
};
@@ -103,21 +103,21 @@ Q_OBJECT
*
* @param url the URL of the XML-RPC Interface of the server
* @param method the name of the method to call
- * @param params the arguments (as QValueList<QVariant>) for the method call.
+ * @param params the arguments (as TQValueList<TQVariant>) for the method call.
* @param showProgressInfo true to show progress information
* @return the new XmlrpcJob
*/
-XmlrpcJob* xmlrpcCall( const KURL& url, const QString &method,
- const QValueList<QVariant> &params,
+XmlrpcJob* xmlrpcCall( const KURL& url, const TQString &method,
+ const TQValueList<TQVariant> &params,
bool showProgressInfo = true );
-XmlrpcJob* xmlrpcCall( const KURL& url, const QString &method,
- const QVariant &arg, bool showProgressInfo = true );
-XmlrpcJob* xmlrpcCall( const KURL& url, const QString &method,
- const QStringList &arg, bool showProgressInfo = true );
+XmlrpcJob* xmlrpcCall( const KURL& url, const TQString &method,
+ const TQVariant &arg, bool showProgressInfo = true );
+XmlrpcJob* xmlrpcCall( const KURL& url, const TQString &method,
+ const TQStringList &arg, bool showProgressInfo = true );
template <typename T>
-XmlrpcJob* xmlrpcCall( const KURL& url, const QString &method,
- const QValueList<T>&arg,bool showProgressInfo = true );
+XmlrpcJob* xmlrpcCall( const KURL& url, const TQString &method,
+ const TQValueList<T>&arg,bool showProgressInfo = true );
}
#endif
diff --git a/kresources/caldav/config.cpp b/kresources/caldav/config.cpp
index 681faa1c7..da9bd8473 100644
--- a/kresources/caldav/config.cpp
+++ b/kresources/caldav/config.cpp
@@ -26,9 +26,9 @@
#include <klistview.h>
#include <kurlrequester.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qcheckbox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqcheckbox.h>
/*=========================================================================
| NAMESPACE
@@ -70,7 +70,7 @@ CalDavPrefs* ResourceCalDavConfig::getPrefs(ResourceCalDav* res) {
| CONSTRUCTOR / DESTRUCTOR
========================================================================*/
-ResourceCalDavConfig::ResourceCalDavConfig( QWidget *parent )
+ResourceCalDavConfig::ResourceCalDavConfig( TQWidget *parent )
: KRES::ConfigWidget( parent )
{
setupUI();
@@ -111,35 +111,35 @@ void ResourceCalDavConfig::saveSettings( KRES::Resource *resource ) {
}
void ResourceCalDavConfig::setupUI() {
- QVBoxLayout *vertical = new QVBoxLayout(this);
+ TQVBoxLayout *vertical = new TQVBoxLayout(this);
- QGridLayout *mainLayout = new QGridLayout( this );
+ TQGridLayout *mainLayout = new TQGridLayout( this );
// URL
- QLabel *label = new QLabel( i18n( "URL:" ), this );
- mUrl = new QLineEdit( this );
+ TQLabel *label = new TQLabel( i18n( "URL:" ), this );
+ mUrl = new TQLineEdit( this );
mainLayout->addWidget( label, 1, 0 );
mainLayout->addWidget( mUrl, 1, 1 );
// Username
- label = new QLabel( i18n( "Username:" ), this );
- mUsername = new QLineEdit( this );
+ label = new TQLabel( i18n( "Username:" ), this );
+ mUsername = new TQLineEdit( this );
mainLayout->addWidget( label, 2, 0 );
mainLayout->addWidget( mUsername, 2, 1 );
// Password
- label = new QLabel( i18n( "Password:" ), this );
- mPassword = new QLineEdit( this );
- mPassword->setEchoMode( QLineEdit::Password );
+ label = new TQLabel( i18n( "Password:" ), this );
+ mPassword = new TQLineEdit( this );
+ mPassword->setEchoMode( TQLineEdit::Password );
mainLayout->addWidget( label, 3, 0 );
mainLayout->addWidget( mPassword, 3, 1 );
// Remember password checkbox
- mRememberPassword = new QCheckBox( i18n("Remember password"), this );
+ mRememberPassword = new TQCheckBox( i18n("Remember password"), this );
mainLayout->addWidget(mRememberPassword, 4, 1);
// configs
- QHBoxLayout* horizontal = new QHBoxLayout(this);
+ TQHBoxLayout* horizontal = new TQHBoxLayout(this);
// Reload config
mReloadConfig = new CalDavReloadConfig(this);
diff --git a/kresources/caldav/config.h b/kresources/caldav/config.h
index 5b0325994..bd748db91 100644
--- a/kresources/caldav/config.h
+++ b/kresources/caldav/config.h
@@ -43,7 +43,7 @@ class KDE_EXPORT ResourceCalDavConfig : public KRES::ConfigWidget
public:
- ResourceCalDavConfig(QWidget *parent = 0);
+ ResourceCalDavConfig(TQWidget *parent = 0);
public slots:
@@ -56,10 +56,10 @@ protected:
private:
- QLineEdit *mUrl;
- QLineEdit *mUsername;
- QLineEdit *mPassword;
- QCheckBox *mRememberPassword;
+ TQLineEdit *mUrl;
+ TQLineEdit *mUsername;
+ TQLineEdit *mPassword;
+ TQCheckBox *mRememberPassword;
CalDavReloadConfig* mReloadConfig;
CalDavSaveConfig* mSaveConfig;
diff --git a/kresources/caldav/configwidgets.cpp b/kresources/caldav/configwidgets.cpp
index 64eb1a279..b5ef0f496 100644
--- a/kresources/caldav/configwidgets.cpp
+++ b/kresources/caldav/configwidgets.cpp
@@ -40,14 +40,14 @@
#include <klocale.h>
#include <kdebug.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qcheckbox.h>
-#include <qradiobutton.h>
-#include <qspinbox.h>
-#include <qbuttongroup.h>
-#include <qgroupbox.h>
-#include <qhbox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqcheckbox.h>
+#include <tqradiobutton.h>
+#include <tqspinbox.h>
+#include <tqbuttongroup.h>
+#include <tqgroupbox.h>
+#include <tqhbox.h>
using namespace KCal;
@@ -59,8 +59,8 @@ class CalDavConfigPrivate
: mGroup( 0 ),
mIntervalSpin( 0 ) {}
- QButtonGroup *mGroup;
- QSpinBox *mIntervalSpin;
+ TQButtonGroup *mGroup;
+ TQSpinBox *mIntervalSpin;
};
class CalDavReloadConfig::Private
@@ -74,47 +74,47 @@ class CalDavSaveConfig::Private
};
//@endcond
-CalDavReloadConfig::CalDavReloadConfig( QWidget *parent )
- : QWidget( parent ), d( new KCal::CalDavReloadConfig::Private() )
+CalDavReloadConfig::CalDavReloadConfig( TQWidget *parent )
+ : TQWidget( parent ), d( new KCal::CalDavReloadConfig::Private() )
{
- QBoxLayout *topLayout = new QVBoxLayout( this );
+ TQBoxLayout *topLayout = new TQVBoxLayout( this );
- //QGroupBox *groupBox = new QGroupBox( i18nc( "@title:group", "Automatic Reload" ), this );
- QGroupBox *groupBox = new QGroupBox( i18n( "Automatic Reload" ), this );
+ //TQGroupBox *groupBox = new TQGroupBox( i18nc( "@title:group", "Automatic Reload" ), this );
+ TQGroupBox *groupBox = new TQGroupBox( i18n( "Automatic Reload" ), this );
topLayout->addWidget( groupBox );
- QRadioButton *noAutomaticReload =
- new QRadioButton(
+ TQRadioButton *noAutomaticReload =
+ new TQRadioButton(
//i18nc( "@option:radio never reload the cache", "Never" ), groupBox );
i18n( "Never" ), groupBox );
- QRadioButton *automaticReloadOnStartup =
- new QRadioButton(
+ TQRadioButton *automaticReloadOnStartup =
+ new TQRadioButton(
//i18nc( "@option:radio reload the cache on startup", "Only on startup" ), groupBox );
i18n( "Only on startup" ), groupBox );
- QRadioButton *intervalRadio =
- new QRadioButton(
+ TQRadioButton *intervalRadio =
+ new TQRadioButton(
// i18nc( "@option:radio reload the cache at regular intervals",
// "Regular interval" ), groupBox );
i18n( "Regular interval" ), groupBox );
- d->mGroup = new QButtonGroup( this );
+ d->mGroup = new TQButtonGroup( this );
d->mGroup->hide();
d->mGroup->insert( intervalRadio, 2 );
d->mGroup->insert( automaticReloadOnStartup, 1 );
d->mGroup->insert( noAutomaticReload, 0 );
- connect( intervalRadio, SIGNAL( toggled( bool ) ),
- SLOT( slotIntervalToggled( bool ) ) );
+ connect( intervalRadio, TQT_SIGNAL( toggled( bool ) ),
+ TQT_SLOT( slotIntervalToggled( bool ) ) );
- QHBox *intervalBox = new QHBox( groupBox );
- //new QLabel( i18nc( "@label:spinbox", "Interval in minutes:" ), intervalBox );
- new QLabel( i18n( "Interval in minutes:" ), intervalBox );
- d->mIntervalSpin = new QSpinBox( intervalBox );
+ TQHBox *intervalBox = new TQHBox( groupBox );
+ //new TQLabel( i18nc( "@label:spinbox", "Interval in minutes:" ), intervalBox );
+ new TQLabel( i18n( "Interval in minutes:" ), intervalBox );
+ d->mIntervalSpin = new TQSpinBox( intervalBox );
d->mIntervalSpin->setRange( 1, 900 );
d->mIntervalSpin->setEnabled( false );
groupBox->setColumnLayout(1, Qt::Vertical);
- QVBoxLayout *vbox = new QVBoxLayout(groupBox->layout());
+ TQVBoxLayout *vbox = new TQVBoxLayout(groupBox->layout());
vbox->addWidget(intervalRadio);
vbox->addWidget(intervalBox);
vbox->addWidget(automaticReloadOnStartup);
@@ -148,54 +148,54 @@ void CalDavReloadConfig::slotIntervalToggled( bool checked )
}
}
-CalDavSaveConfig::CalDavSaveConfig( QWidget *parent )
- : QWidget( parent ), d( new KCal::CalDavSaveConfig::Private() )
+CalDavSaveConfig::CalDavSaveConfig( TQWidget *parent )
+ : TQWidget( parent ), d( new KCal::CalDavSaveConfig::Private() )
{
- QBoxLayout *topLayout = new QVBoxLayout( this );
+ TQBoxLayout *topLayout = new TQVBoxLayout( this );
- //QGroupBox *groupBox = new QGroupBox( i18nc( "@title:group", "Automatic Save" ), this );
- QGroupBox *groupBox = new QGroupBox( i18n( "Automatic Save" ), this );
- d->mGroup = new QButtonGroup( this );
+ //TQGroupBox *groupBox = new TQGroupBox( i18nc( "@title:group", "Automatic Save" ), this );
+ TQGroupBox *groupBox = new TQGroupBox( i18n( "Automatic Save" ), this );
+ d->mGroup = new TQButtonGroup( this );
d->mGroup->hide();
topLayout->addWidget( groupBox );
- QRadioButton *never =
- new QRadioButton(
+ TQRadioButton *never =
+ new TQRadioButton(
//i18nc( "@option:radio never save the cache automatically", "Never" ), groupBox );
i18n( "Never" ), groupBox );
- QRadioButton *onExit =
- new QRadioButton(
+ TQRadioButton *onExit =
+ new TQRadioButton(
//i18nc( "@option:radio save the cache on exit", "Only on exit" ), groupBox );
i18n( "Only on exit" ), groupBox );
- QRadioButton *intervalRadio =
- new QRadioButton(
+ TQRadioButton *intervalRadio =
+ new TQRadioButton(
//i18nc( "@option:radio save the cache at regular intervals", "Regular interval" ), groupBox );
i18n( "Regular interval" ), groupBox );
- d->mGroup = new QButtonGroup( this );
+ d->mGroup = new TQButtonGroup( this );
d->mGroup->hide();
d->mGroup->insert( never, 0 );
d->mGroup->insert( onExit, 1 );
d->mGroup->insert( intervalRadio, 2 );
- connect( intervalRadio, SIGNAL( toggled( bool ) ),
- SLOT( slotIntervalToggled( bool ) ) );
+ connect( intervalRadio, TQT_SIGNAL( toggled( bool ) ),
+ TQT_SLOT( slotIntervalToggled( bool ) ) );
- QHBox *intervalBox = new QHBox( groupBox );
- //new QLabel( i18nc( "@label:spinbox", "Interval in minutes:" ), intervalBox );
- new QLabel( i18n( "Interval in minutes:" ), intervalBox );
- d->mIntervalSpin = new QSpinBox( intervalBox );
+ TQHBox *intervalBox = new TQHBox( groupBox );
+ //new TQLabel( i18nc( "@label:spinbox", "Interval in minutes:" ), intervalBox );
+ new TQLabel( i18n( "Interval in minutes:" ), intervalBox );
+ d->mIntervalSpin = new TQSpinBox( intervalBox );
d->mIntervalSpin->setRange( 1, 900 );
d->mIntervalSpin->setEnabled( false );
- QRadioButton *delay =
- new QRadioButton(
+ TQRadioButton *delay =
+ new TQRadioButton(
// i18nc( "@option:radio save the cache after some delay",
// "Delayed after changes" ), groupBox );
i18n( "Delayed after changes" ), groupBox );
- QRadioButton *every =
- new QRadioButton(
+ TQRadioButton *every =
+ new TQRadioButton(
// i18nc( "@option:radio save the cache after every modification",
// "Immediately after changes" ), groupBox );
i18n( "Immediately after changes" ), groupBox );
@@ -207,7 +207,7 @@ CalDavSaveConfig::CalDavSaveConfig( QWidget *parent )
intervalBox->hide();
groupBox->setColumnLayout(1, Qt::Vertical);
- QVBoxLayout *vbox = new QVBoxLayout(groupBox->layout());
+ TQVBoxLayout *vbox = new TQVBoxLayout(groupBox->layout());
vbox->addWidget(delay);
vbox->addWidget(every);
vbox->addWidget(intervalRadio);
diff --git a/kresources/caldav/configwidgets.h b/kresources/caldav/configwidgets.h
index 6a44d482a..64ae78323 100644
--- a/kresources/caldav/configwidgets.h
+++ b/kresources/caldav/configwidgets.h
@@ -35,7 +35,7 @@
#ifndef KCALDAV_AUTOWIDGETS_H
#define KCALDAV_AUTOWIDGETS_H
-#include <qwidget.h>
+#include <tqwidget.h>
#include <kdemacros.h>
namespace KCal {
@@ -51,7 +51,7 @@ class KDE_EXPORT CalDavReloadConfig : public QWidget
{
Q_OBJECT
public:
- explicit CalDavReloadConfig( QWidget *parent = 0 );
+ explicit CalDavReloadConfig( TQWidget *parent = 0 );
~CalDavReloadConfig();
public slots:
void loadSettings( ResourceCached *resource );
@@ -77,7 +77,7 @@ class KDE_EXPORT CalDavSaveConfig : public QWidget
{
Q_OBJECT
public:
- explicit CalDavSaveConfig( QWidget *parent = 0 );
+ explicit CalDavSaveConfig( TQWidget *parent = 0 );
~CalDavSaveConfig();
public slots:
diff --git a/kresources/caldav/job.cpp b/kresources/caldav/job.cpp
index 9d317d131..1f6c38c49 100644
--- a/kresources/caldav/job.cpp
+++ b/kresources/caldav/job.cpp
@@ -18,7 +18,7 @@
#include <kdebug.h>
#include <klocale.h>
-#include <qmutex.h>
+#include <tqmutex.h>
#define log(s) kdDebug() << s;
@@ -36,7 +36,7 @@ using namespace KCal;
| CONSTRUCTOR AND DESTRUCTOR
========================================================================*/
-CalDavJob::CalDavJob(const QString& url) {
+CalDavJob::CalDavJob(const TQString& url) {
cleanJob();
setUrl(url);
}
@@ -56,14 +56,14 @@ void CalDavJob::enableCaldavDebug(runtime_info* rt) {
}
}
-void CalDavJob::setErrorString(const QString& err, const long number) {
+void CalDavJob::setErrorString(const TQString& err, const long number) {
mError = true;
mErrorString = err;
mErrorNumber = number;
}
void CalDavJob::processError(const caldav_error* err) {
- QString error_string;
+ TQString error_string;
long code = err->code;
@@ -104,8 +104,8 @@ void CalDavJob::run() {
// Signal done
// 1000 is read, 1001 is write
- if (type() == 0) QApplication::postEvent ( parent(), new QEvent( static_cast<QEvent::Type>(1000) ) );
- if (type() == 1) QApplication::postEvent ( parent(), new QEvent( static_cast<QEvent::Type>(1001) ) );
+ if (type() == 0) TQApplication::postEvent ( parent(), new TQEvent( static_cast<TQEvent::Type>(1000) ) );
+ if (type() == 1) TQApplication::postEvent ( parent(), new TQEvent( static_cast<TQEvent::Type>(1001) ) );
}
// EOF ========================================================================
diff --git a/kresources/caldav/job.h b/kresources/caldav/job.h
index 4f3430c90..254a0a104 100644
--- a/kresources/caldav/job.h
+++ b/kresources/caldav/job.h
@@ -17,10 +17,10 @@
#ifndef KCALDAV_JOB_H
#define KCALDAV_JOB_H
-#include <qthread.h>
-#include <qstring.h>
-#include <qdatetime.h>
-#include <qapplication.h>
+#include <tqthread.h>
+#include <tqstring.h>
+#include <tqdatetime.h>
+#include <tqapplication.h>
extern "C" {
#include <libcaldav/caldav.h>
@@ -35,28 +35,28 @@ namespace KCal {
/**
* Calendar job.
*/
-class CalDavJob : public QThread {
+class CalDavJob : public TQThread {
public:
/**
* @param url URL to load.
*/
- CalDavJob(const QString& url = QString());
+ CalDavJob(const TQString& url = TQString());
virtual ~CalDavJob();
/**
* Sets a new URL to load.
*/
- virtual void setUrl(const QString& s) {
+ virtual void setUrl(const TQString& s) {
mUrl = s;
}
/**
* Sets the parent qobject.
*/
- virtual void setParent(QObject *s) {
+ virtual void setParent(TQObject *s) {
mParent = s;
}
@@ -70,14 +70,14 @@ public:
/**
* @return URL to load.
*/
- virtual QString url() const {
+ virtual TQString url() const {
return mUrl;
}
/**
* @return parent object
*/
- virtual QObject *parent() {
+ virtual TQObject *parent() {
return mParent;
}
@@ -98,7 +98,7 @@ public:
/**
* @return an error string.
*/
- virtual QString errorString() const {
+ virtual TQString errorString() const {
return mErrorString;
}
@@ -134,7 +134,7 @@ protected:
/**
* Sets an error string to @p err. Also sets an error flag.
*/
- void setErrorString(const QString& str, const long number);
+ void setErrorString(const TQString& str, const long number);
/**
* Process an error.
@@ -146,11 +146,11 @@ protected:
private:
- QString mUrl;
+ TQString mUrl;
bool mError;
- QString mErrorString;
+ TQString mErrorString;
long mErrorNumber;
- QObject *mParent;
+ TQObject *mParent;
int mType;
void enableCaldavDebug(runtime_info*);
diff --git a/kresources/caldav/preferences.cpp b/kresources/caldav/preferences.cpp
index 4be55e509..8e27b9df0 100644
--- a/kresources/caldav/preferences.cpp
+++ b/kresources/caldav/preferences.cpp
@@ -17,8 +17,8 @@
#include "preferences.h"
#include <kwallet.h>
-#include <qstring.h>
-#include <qurl.h>
+#include <tqstring.h>
+#include <tqurl.h>
#include <kdebug.h>
/*=========================================================================
@@ -32,15 +32,15 @@ using namespace KWallet;
| CONSTANTS
========================================================================*/
-const QString CalDavPrefs::NO_PASSWORD = "";
-const QString CalDavPrefs::WALLET_FOLDER = "CalDAV resource";
-const QString CalDavPrefs::WALLET_PWD_SUFFIX = ":caldav_password";
+const TQString CalDavPrefs::NO_PASSWORD = "";
+const TQString CalDavPrefs::WALLET_FOLDER = "CalDAV resource";
+const TQString CalDavPrefs::WALLET_PWD_SUFFIX = ":caldav_password";
/*=========================================================================
| METHODS
========================================================================*/
-bool CalDavPrefs::setWalletFolder(const QString& folder) {
+bool CalDavPrefs::setWalletFolder(const TQString& folder) {
bool ret = true;
if (!mNoWallet && NULL != mWallet) {
@@ -98,7 +98,7 @@ void CalDavPrefs::removeWallet(bool noWallet) {
mNoWallet = noWallet;
}
-void CalDavPrefs::addPrefix(const QString& prefix) {
+void CalDavPrefs::addPrefix(const TQString& prefix) {
KConfigSkeletonItem::List itemList = items();
KConfigSkeletonItem::List::Iterator it;
@@ -107,7 +107,7 @@ void CalDavPrefs::addPrefix(const QString& prefix) {
}
}
-bool CalDavPrefs::writePasswordToWallet(const QString& password) {
+bool CalDavPrefs::writePasswordToWallet(const TQString& password) {
Wallet* w = getWallet();
@@ -124,12 +124,12 @@ bool CalDavPrefs::writePasswordToWallet(const QString& password) {
return ret;
}
-bool CalDavPrefs::readPasswordFromWallet(QString& password) {
+bool CalDavPrefs::readPasswordFromWallet(TQString& password) {
Wallet* w = getWallet();
bool ret = false;
if (NULL != w) {
- QString p;
+ TQString p;
int rc = w->readPassword(mPrefix + WALLET_PWD_SUFFIX, p);
if (0 == rc) {
//CalDavPrefsSkel::setPassword(p);
@@ -161,7 +161,7 @@ bool CalDavPrefs::removePasswordFromWallet() {
return ret;
}
-void CalDavPrefs::setPassword(const QString& p) {
+void CalDavPrefs::setPassword(const TQString& p) {
mPassword = p;
@@ -170,14 +170,14 @@ void CalDavPrefs::setPassword(const QString& p) {
}
}
-QString CalDavPrefs::password() {
+TQString CalDavPrefs::password() {
if (NO_PASSWORD == mPassword) {
readPasswordFromWallet(mPassword);
}
return mPassword;
}
-QString CalDavPrefs::getusername() {
+TQString CalDavPrefs::getusername() {
return username();
}
@@ -207,10 +207,10 @@ void CalDavPrefs::readConfig() {
}*/
}
-QString CalDavPrefs::getFullUrl() {
+TQString CalDavPrefs::getFullUrl() {
- QUrl t(url());
- QString safeURL;
+ TQUrl t(url());
+ TQString safeURL;
int firstAt;
t.setUser(username());
diff --git a/kresources/caldav/preferences.h b/kresources/caldav/preferences.h
index b8c3bb191..3e1bc0f9c 100644
--- a/kresources/caldav/preferences.h
+++ b/kresources/caldav/preferences.h
@@ -44,7 +44,7 @@ public:
/**
* @param prefix Unique prefix of the resource instance (use identifier() method).
*/
- CalDavPrefs(const QString& prefix)
+ CalDavPrefs(const TQString& prefix)
: mWallet(NULL)
, mNoWallet(false)
, mPrefix(prefix)
@@ -67,25 +67,25 @@ public:
* to be properly saved, call this method after ensuring the remember flag
* is set.
*/
- void setPassword(const QString& p);
+ void setPassword(const TQString& p);
/**
* Returns password. The password is taken from the wallet.
* May return an empty string, if there is no password available.
*/
- QString password();
+ TQString password();
/**
* Returns the username.
*/
- QString getusername();
+ TQString getusername();
void setRememberPassword(bool v);
/**
* @return A full URL to connect to CalDAV server (including username and password).
*/
- QString getFullUrl();
+ TQString getFullUrl();
protected:
@@ -94,7 +94,7 @@ protected:
* can use the same config file.
* @param prefix Unique prefix of the resource instance.
*/
- void addPrefix(const QString& prefix);
+ void addPrefix(const TQString& prefix);
/**
* Returns the wallet or NULL, if the wallet can't be obtained.
@@ -106,7 +106,7 @@ protected:
* @param folder the wallet working folder
* @return true, if the folder has been set, and false otherwise.
*/
- bool setWalletFolder(const QString& folder);
+ bool setWalletFolder(const TQString& folder);
/**
* Removes the wallet. If @p noWallet is set, the wallet has been marked inaccessible, so that subsequent
@@ -119,14 +119,14 @@ protected:
* @param password password to write
* @return true on success, false on failure
*/
- bool writePasswordToWallet(const QString& password);
+ bool writePasswordToWallet(const TQString& password);
/**
* Extracts password from the wallet.
* @param password a variable to save read password to.
* @return true on success, false on failure
*/
- bool readPasswordFromWallet(QString& password);
+ bool readPasswordFromWallet(TQString& password);
/**
* Clears password in the wallet.
@@ -136,15 +136,15 @@ protected:
private:
- static const QString NO_PASSWORD;
- static const QString WALLET_FOLDER;
- static const QString WALLET_PWD_SUFFIX;
+ static const TQString NO_PASSWORD;
+ static const TQString WALLET_FOLDER;
+ static const TQString WALLET_PWD_SUFFIX;
KWallet::Wallet* mWallet;
bool mNoWallet;
- QString mPrefix;
- QString mPassword;
+ TQString mPrefix;
+ TQString mPassword;
};
} // namespace KCal
diff --git a/kresources/caldav/reader.h b/kresources/caldav/reader.h
index 070239fdd..191d28bad 100644
--- a/kresources/caldav/reader.h
+++ b/kresources/caldav/reader.h
@@ -19,8 +19,8 @@
#include "job.h"
-#include <qstring.h>
-#include <qdatetime.h>
+#include <tqstring.h>
+#include <tqdatetime.h>
namespace KCal {
@@ -38,7 +38,7 @@ public:
/**
* @param url URL to load.
*/
- CalDavReader(const QString& url = QString()) :
+ CalDavReader(const TQString& url = TQString()) :
CalDavJob(url)
, mGetAll(true)
{
@@ -49,7 +49,7 @@ public:
* This method call disables the effect of setGetAll() call.
* setGetAll() call disables the effect of this method.
*/
- void setRange(const QDateTime& start, const QDateTime& end) {
+ void setRange(const TQDateTime& start, const TQDateTime& end) {
mGetAll = false;
mTimeStart = start;
mTimeEnd = end;
@@ -67,7 +67,7 @@ public:
/**
* @return downloaded calendar data in iCal format.
*/
- QString data() const {
+ TQString data() const {
return mData;
}
@@ -79,10 +79,10 @@ protected:
private:
- QString mData;
+ TQString mData;
bool mGetAll;
- QDateTime mTimeStart;
- QDateTime mTimeEnd;
+ TQDateTime mTimeStart;
+ TQDateTime mTimeEnd;
};
diff --git a/kresources/caldav/resource.cpp b/kresources/caldav/resource.cpp
index e5571ab99..1e52b3ec5 100644
--- a/kresources/caldav/resource.cpp
+++ b/kresources/caldav/resource.cpp
@@ -16,10 +16,10 @@
#include <string.h>
-#include <qurl.h>
-#include <qmessagebox.h>
-#include <qapplication.h>
-#include <qeventloop.h>
+#include <tqurl.h>
+#include <tqmessagebox.h>
+#include <tqapplication.h>
+#include <tqeventloop.h>
#include <libkcal/calendarlocal.h>
#include <libkcal/icalformat.h>
@@ -27,12 +27,12 @@
#include <klocale.h>
#include <kpassdlg.h>
-#include <qdatetime.h>
-#include <qmutex.h>
-#include <qthread.h>
+#include <tqdatetime.h>
+#include <tqmutex.h>
+#include <tqthread.h>
#ifdef KCALDAV_DEBUG
- #include <qfile.h>
+ #include <tqfile.h>
#endif
#include "resource.h"
@@ -105,7 +105,7 @@ ResourceCalDav::~ResourceCalDav() {
while ((mWriter->running() == true) || (mWritingQueue.isEmpty() == false) || !mWritingQueueReady) {
readLockout = true;
sleep(1);
- qApp->processEvents(QEventLoop::ExcludeUserInput);
+ qApp->processEvents(TQEventLoop::ExcludeUserInput);
}
if (mWriter) {
@@ -147,7 +147,7 @@ bool ResourceCalDav::doLoad() {
return true; // Silently fail; the user has obviously not responded to a dialog and we don't need to pop up more of them!
}
- log(QString("doLoad(%1)").arg(syncCache));
+ log(TQString("doLoad(%1)").arg(syncCache));
clearCache();
@@ -168,7 +168,7 @@ bool ResourceCalDav::doLoad() {
bool ResourceCalDav::doSave() {
bool syncCache = true;
- log(QString("doSave(%1)").arg(syncCache));
+ log(TQString("doSave(%1)").arg(syncCache));
if (!hasChanges()) {
log("no changes");
@@ -196,7 +196,7 @@ bool ResourceCalDav::doSave() {
clearChanges();
if (mWriteRetryTimer != NULL) {
if (mWriteRetryTimer->isActive() == false) {
- disconnect( mWriteRetryTimer, SIGNAL(timeout()), this, SLOT(doSave()) );
+ disconnect( mWriteRetryTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(doSave()) );
delete mWriteRetryTimer;
mWriteRetryTimer = NULL;
}
@@ -253,8 +253,8 @@ void ResourceCalDav::init() {
// creating jobs
// Qt4 handles this quite differently, as shown below,
// whereas Qt3 needs events (see ::event())
-// connect(mLoader, SIGNAL(finished()), this, SLOT(loadFinished()));
-// connect(mWriter, SIGNAL(finished()), this, SLOT(writingFinished()));
+// connect(mLoader, TQT_SIGNAL(finished()), this, TQT_SLOT(loadFinished()));
+// connect(mWriter, TQT_SIGNAL(finished()), this, TQT_SLOT(writingFinished()));
setType("ResourceCalDav");
}
@@ -341,14 +341,14 @@ void ResourceCalDav::loadingQueuePop() {
mLoader->setParent(this);
mLoader->setType(0);
- QDateTime dt(QDate::currentDate());
+ TQDateTime dt(TQDate::currentDate());
mLoader->setRange(dt.addDays(-CACHE_DAYS), dt.addDays(CACHE_DAYS));
//mLoader->setGetAll();
mLoadingQueueReady = false;
log("starting actual download job");
- mLoader->start(QThread::LowestPriority);
+ mLoader->start(TQThread::LowestPriority);
// if all ok, removing the task from the queue
mLoadingQueue.dequeue();
@@ -357,7 +357,7 @@ void ResourceCalDav::loadingQueuePop() {
delete t;
}
-void ResourceCalDav::startLoading(const QString& url) {
+void ResourceCalDav::startLoading(const TQString& url) {
LoadingTask *t = new LoadingTask;
t->url = url;
loadingQueuePush(t);
@@ -376,29 +376,29 @@ void ResourceCalDav::loadFinished() {
if (loader->error()) {
if (loader->errorNumber() == -401) {
if (NULL != mPrefs) {
- QCString newpass;
- if (KPasswordDialog::getPassword (newpass, QString("<b>") + i18n("Remote authorization required") + QString("</b><p>") + i18n("Please input the password for") + QString(" ") + mPrefs->getusername(), NULL) != 1) {
+ TQCString newpass;
+ if (KPasswordDialog::getPassword (newpass, TQString("<b>") + i18n("Remote authorization required") + TQString("</b><p>") + i18n("Please input the password for") + TQString(" ") + mPrefs->getusername(), NULL) != 1) {
log("load error: " + loader->errorString() );
- loadError(QString("[%1] ").arg(abs(loader->errorNumber())) + loader->errorString());
+ loadError(TQString("[%1] ").arg(abs(loader->errorNumber())) + loader->errorString());
}
else {
// Set new password and try again
- mPrefs->setPassword(QString(newpass));
+ mPrefs->setPassword(TQString(newpass));
startLoading(mPrefs->getFullUrl());
}
}
else {
log("load error: " + loader->errorString() );
- loadError(QString("[%1] ").arg(abs(loader->errorNumber())) + loader->errorString());
+ loadError(TQString("[%1] ").arg(abs(loader->errorNumber())) + loader->errorString());
}
}
else {
log("load error: " + loader->errorString() );
- loadError(QString("[%1] ").arg(abs(loader->errorNumber())) + loader->errorString());
+ loadError(TQString("[%1] ").arg(abs(loader->errorNumber())) + loader->errorString());
}
} else {
log("successful load");
- QString data = loader->data();
+ TQString data = loader->data();
if (!data.isNull() && !data.isEmpty()) {
// TODO: I don't know why, but some schedules on http://caldav-test.ioda.net/ (I used it for testing)
@@ -430,7 +430,7 @@ void ResourceCalDav::loadFinished() {
loadingQueuePop();
}
-bool ResourceCalDav::checkData(const QString& data) {
+bool ResourceCalDav::checkData(const TQString& data) {
log("checking the data");
ICalFormat ical;
@@ -443,7 +443,7 @@ bool ResourceCalDav::checkData(const QString& data) {
return ret;
}
-bool ResourceCalDav::parseData(const QString& data) {
+bool ResourceCalDav::parseData(const TQString& data) {
log("parseData()");
bool ret = true;
@@ -470,11 +470,11 @@ bool ResourceCalDav::parseData(const QString& data) {
// debug code here -------------------------------------------------------
#ifdef KCALDAV_DEBUG
- const QString fout_path = "/tmp/kcaldav_download_" + identifier() + ".tmp";
+ const TQString fout_path = "/tmp/kcaldav_download_" + identifier() + ".tmp";
- QFile fout(fout_path);
+ TQFile fout(fout_path);
if (fout.open(IO_WriteOnly | IO_Append)) {
- QTextStream sout(&fout);
+ TQTextStream sout(&fout);
sout << "---------- " << resourceName() << ": --------------------------------\n";
sout << data << "\n";
fout.close();
@@ -504,13 +504,13 @@ bool ResourceCalDav::parseData(const QString& data) {
| WRITING METHODS
========================================================================*/
-QString ResourceCalDav::getICalString(const Incidence::List& inc) {
+TQString ResourceCalDav::getICalString(const Incidence::List& inc) {
if (inc.isEmpty()) {
return "";
}
CalendarLocal loc(timeZoneId());
- QString data = "";
+ TQString data = "";
ICalFormat ical;
// NOTE: This is very susceptible to invalid entries in added/changed/deletedIncidences
@@ -555,11 +555,11 @@ void ResourceCalDav::writingQueuePop() {
mWriter->setType(1);
#ifdef KCALDAV_DEBUG
- const QString fout_path = "/tmp/kcaldav_upload_" + identifier() + ".tmp";
+ const TQString fout_path = "/tmp/kcaldav_upload_" + identifier() + ".tmp";
- QFile fout(fout_path);
+ TQFile fout(fout_path);
if (fout.open(IO_WriteOnly | IO_Append)) {
- QTextStream sout(&fout);
+ TQTextStream sout(&fout);
sout << "---------- " << resourceName() << ": --------------------------------\n";
sout << "================== Added:\n" << t->added << "\n";
sout << "================== Changed:\n" << t->changed << "\n";
@@ -577,7 +577,7 @@ void ResourceCalDav::writingQueuePop() {
mWritingQueueReady = false;
log("starting actual write job");
- mWriter->start(QThread::LowestPriority);
+ mWriter->start(TQThread::LowestPriority);
// if all ok, remove the task from the queue
mWritingQueue.dequeue();
@@ -586,7 +586,7 @@ void ResourceCalDav::writingQueuePop() {
delete t;
}
-bool ResourceCalDav::event ( QEvent * e ) {
+bool ResourceCalDav::event ( TQEvent * e ) {
if (e->type() == 1000) {
// Read done
loadFinished();
@@ -604,7 +604,7 @@ void ResourceCalDav::releaseReadLockout() {
readLockout = false;
}
-bool ResourceCalDav::startWriting(const QString& url) {
+bool ResourceCalDav::startWriting(const TQString& url) {
log("startWriting: url = " + url);
// WARNING: This will segfault if a separate read or write thread
@@ -612,8 +612,8 @@ bool ResourceCalDav::startWriting(const QString& url) {
// Before these calls are made any existing read (and maybe write) threads should be finished
if ((mLoader->running() == true) || (mLoadingQueue.isEmpty() == false) || (mWriter->running() == true) || (mWritingQueue.isEmpty() == false)) {
if (mWriteRetryTimer == NULL) {
- mWriteRetryTimer = new QTimer(this);
- connect( mWriteRetryTimer, SIGNAL(timeout()), SLOT(doSave()) );
+ mWriteRetryTimer = new TQTimer(this);
+ connect( mWriteRetryTimer, TQT_SIGNAL(timeout()), TQT_SLOT(doSave()) );
}
mWriteRetryTimer->start(1000, TRUE);
return false;
@@ -690,25 +690,25 @@ void ResourceCalDav::writingFinished() {
if (mWriter->error() && (abs(mWriter->errorNumber()) != 207)) {
if (mWriter->errorNumber() == -401) {
if (NULL != mPrefs) {
- QCString newpass;
- if (KPasswordDialog::getPassword (newpass, QString("<b>") + i18n("Remote authorization required") + QString("</b><p>") + i18n("Please input the password for") + QString(" ") + mPrefs->getusername(), NULL) != 1) {
+ TQCString newpass;
+ if (KPasswordDialog::getPassword (newpass, TQString("<b>") + i18n("Remote authorization required") + TQString("</b><p>") + i18n("Please input the password for") + TQString(" ") + mPrefs->getusername(), NULL) != 1) {
log("write error: " + mWriter->errorString());
- saveError(QString("[%1] ").arg(abs(mWriter->errorNumber())) + mWriter->errorString());
+ saveError(TQString("[%1] ").arg(abs(mWriter->errorNumber())) + mWriter->errorString());
}
else {
// Set new password and try again
- mPrefs->setPassword(QString(newpass));
+ mPrefs->setPassword(TQString(newpass));
startWriting(mPrefs->getFullUrl());
}
}
else {
log("write error: " + mWriter->errorString());
- saveError(QString("[%1] ").arg(abs(mWriter->errorNumber())) + mWriter->errorString());
+ saveError(TQString("[%1] ").arg(abs(mWriter->errorNumber())) + mWriter->errorString());
}
}
else {
log("write error: " + mWriter->errorString());
- saveError(QString("[%1] ").arg(abs(mWriter->errorNumber())) + mWriter->errorString());
+ saveError(TQString("[%1] ").arg(abs(mWriter->errorNumber())) + mWriter->errorString());
}
} else {
log("success");
@@ -716,7 +716,7 @@ void ResourceCalDav::writingFinished() {
}
// Give the remote system a few seconds to process the data before we allow any read operations
- QTimer::singleShot( 3000, this, SLOT(releaseReadLockout()) );
+ TQTimer::singleShot( 3000, this, TQT_SLOT(releaseReadLockout()) );
// Writing queue and mWritingQueueReady flag are not shared resources, i.e. only one thread has an access to them.
// That's why no mutexes are required.
diff --git a/kresources/caldav/resource.h b/kresources/caldav/resource.h
index b81e555c5..deba22b72 100644
--- a/kresources/caldav/resource.h
+++ b/kresources/caldav/resource.h
@@ -18,8 +18,8 @@
#define KCAL_RESOURCECALDAV_H
#include "preferences.h"
-#include <qthread.h>
-#include <qptrqueue.h>
+#include <tqthread.h>
+#include <tqptrqueue.h>
#include <libkcal/resourcecached.h>
#include <libkdepim/progressmanager.h>
@@ -84,14 +84,14 @@ protected slots:
protected:
struct LoadingTask {
- QString url;
+ TQString url;
};
struct WritingTask {
- QString url;
- QString added;
- QString changed;
- QString deleted;
+ TQString url;
+ TQString added;
+ TQString changed;
+ TQString deleted;
};
@@ -127,35 +127,35 @@ protected:
* Initiates calendar loading process.
* @param url URL to load calendar data from.
*/
- void startLoading(const QString& url);
+ void startLoading(const TQString& url);
/**
* Checks if the data is correct and can be parsed.
* @param data ical string to check.
* @return true if the data is correct, false otherwise.
*/
- bool checkData(const QString& data);
+ bool checkData(const TQString& data);
/**
* Parses the data and adds events to the calendar.
* @param data calendar data.
* @return true on success, false on fail.
*/
- bool parseData(const QString& data);
+ bool parseData(const TQString& data);
/**
* Initiates calendar writing process.
* @param url URL to save calendar data to.
* @return true if write was queued successfully, false if not
*/
- bool startWriting(const QString& url);
+ bool startWriting(const TQString& url);
/**
* Returns a list of incidences as a valid iCalendar string.
* @param inc list of incidences.
* @return a string in iCalendar format which describes the given incidences.
*/
- QString getICalString(const Incidence::List& inc);
+ TQString getICalString(const Incidence::List& inc);
/**
* Changes read-only status of incidences from a given list.
@@ -193,7 +193,7 @@ protected:
*/
void writingQueuePush(const WritingTask *task);
- virtual bool event ( QEvent * e );
+ virtual bool event ( TQEvent * e );
private:
@@ -224,12 +224,12 @@ private:
KPIM::ProgressItem *mProgress;
bool mLoadingQueueReady;
- QPtrQueue<LoadingTask> mLoadingQueue;
+ TQPtrQueue<LoadingTask> mLoadingQueue;
bool mWritingQueueReady;
- QPtrQueue<WritingTask> mWritingQueue;
+ TQPtrQueue<WritingTask> mWritingQueue;
- QTimer *mWriteRetryTimer;
+ TQTimer *mWriteRetryTimer;
};
diff --git a/kresources/caldav/writer.h b/kresources/caldav/writer.h
index 841fc4477..2d1d2d7bb 100644
--- a/kresources/caldav/writer.h
+++ b/kresources/caldav/writer.h
@@ -20,8 +20,8 @@
#include "job.h"
#include <string>
-#include <qstring.h>
-#include <qdatetime.h>
+#include <tqstring.h>
+#include <tqdatetime.h>
namespace KCal {
@@ -39,7 +39,7 @@ public:
/**
* @param url URL to load.
*/
- CalDavWriter(const QString& url = QString()) :
+ CalDavWriter(const TQString& url = TQString()) :
CalDavJob(url)
{
clearObjects();
@@ -50,7 +50,7 @@ public:
* @param s icalendar-formatted string consists of all added incidences plus necessary calendar info.
* May be an empty string, which means there is no added incidences to send.
*/
- void setAddedObjects(const QString& s) {
+ void setAddedObjects(const TQString& s) {
mAdded = s;
}
@@ -59,7 +59,7 @@ public:
* @param s icalendar-formatted string consists of all changed incidences plus necessary calendar info.
* May be an empty string, which means there is no changed incidences to send.
*/
- void setChangedObjects(const QString& s) {
+ void setChangedObjects(const TQString& s) {
mChanged = s;
}
@@ -68,7 +68,7 @@ public:
* @param s icalendar-formatted string consists of all deleted incidences plus necessary calendar info.
* May be an empty string, which means there is no deleted incidences to send.
*/
- void setDeletedObjects(const QString& s) {
+ void setDeletedObjects(const TQString& s) {
mDeleted = s;
}
@@ -89,7 +89,7 @@ protected:
/// Just a wrapper above libcaldav functions.
template<typename Operation>
- int pushObjects(const QString& data, Operation op, int okCode, runtime_info* RT) {
+ int pushObjects(const TQString& data, Operation op, int okCode, runtime_info* RT) {
int r = okCode;
if (!data.isNull() && !data.isEmpty()) {
r = op(std::string(data.ascii()).c_str(), std::string(url().ascii()).c_str(), RT);
@@ -99,9 +99,9 @@ protected:
private:
- QString mAdded;
- QString mChanged;
- QString mDeleted;
+ TQString mAdded;
+ TQString mChanged;
+ TQString mDeleted;
};
} // namespace KCal
diff --git a/kresources/carddav/config.cpp b/kresources/carddav/config.cpp
index 2fd583837..fb1ade761 100644
--- a/kresources/carddav/config.cpp
+++ b/kresources/carddav/config.cpp
@@ -25,9 +25,9 @@
#include <klistview.h>
#include <kurlrequester.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qcheckbox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqcheckbox.h>
/*=========================================================================
| NAMESPACE
@@ -69,7 +69,7 @@ CardDavPrefs* ResourceCardDavConfig::getPrefs(ResourceCardDav* res) {
| CONSTRUCTOR / DESTRUCTOR
========================================================================*/
-ResourceCardDavConfig::ResourceCardDavConfig( QWidget *parent )
+ResourceCardDavConfig::ResourceCardDavConfig( TQWidget *parent )
: KRES::ConfigWidget( parent )
{
setupUI();
@@ -112,38 +112,38 @@ void ResourceCardDavConfig::saveSettings( KRES::Resource *resource ) {
}
void ResourceCardDavConfig::setupUI() {
- QVBoxLayout *vertical = new QVBoxLayout(this);
+ TQVBoxLayout *vertical = new TQVBoxLayout(this);
- QGridLayout *mainLayout = new QGridLayout( this );
+ TQGridLayout *mainLayout = new TQGridLayout( this );
// URL
- QLabel *label = new QLabel( i18n( "URL:" ), this );
- mUrl = new QLineEdit( this );
+ TQLabel *label = new TQLabel( i18n( "URL:" ), this );
+ mUrl = new TQLineEdit( this );
mainLayout->addWidget( label, 1, 0 );
mainLayout->addWidget( mUrl, 1, 1 );
// Username
- label = new QLabel( i18n( "Username:" ), this );
- mUsername = new QLineEdit( this );
+ label = new TQLabel( i18n( "Username:" ), this );
+ mUsername = new TQLineEdit( this );
mainLayout->addWidget( label, 2, 0 );
mainLayout->addWidget( mUsername, 2, 1 );
// Password
- label = new QLabel( i18n( "Password:" ), this );
- mPassword = new QLineEdit( this );
- mPassword->setEchoMode( QLineEdit::Password );
+ label = new TQLabel( i18n( "Password:" ), this );
+ mPassword = new TQLineEdit( this );
+ mPassword->setEchoMode( TQLineEdit::Password );
mainLayout->addWidget( label, 3, 0 );
mainLayout->addWidget( mPassword, 3, 1 );
// Remember password checkbox
- mRememberPassword = new QCheckBox( i18n("Remember password"), this );
+ mRememberPassword = new TQCheckBox( i18n("Remember password"), this );
mainLayout->addWidget(mRememberPassword, 4, 1);
- mUseUriNotUID = new QCheckBox( i18n( "Use URI instead of UID when modifying existing contacts" ), this );
+ mUseUriNotUID = new TQCheckBox( i18n( "Use URI instead of UID when modifying existing contacts" ), this );
mainLayout->addWidget( mUseUriNotUID, 5, 1 );
// configs
- QHBoxLayout* horizontal = new QHBoxLayout(this);
+ TQHBoxLayout* horizontal = new TQHBoxLayout(this);
// Reload config
mReloadConfig = new CardDavReloadConfig(this);
diff --git a/kresources/carddav/config.h b/kresources/carddav/config.h
index f74cb07f9..05b190f4f 100644
--- a/kresources/carddav/config.h
+++ b/kresources/carddav/config.h
@@ -42,7 +42,7 @@ class KDE_EXPORT ResourceCardDavConfig : public KRES::ConfigWidget
public:
- ResourceCardDavConfig(QWidget *parent = 0);
+ ResourceCardDavConfig(TQWidget *parent = 0);
public slots:
@@ -55,11 +55,11 @@ protected:
private:
- QLineEdit *mUrl;
- QLineEdit *mUsername;
- QLineEdit *mPassword;
- QCheckBox *mRememberPassword;
- QCheckBox *mUseUriNotUID;
+ TQLineEdit *mUrl;
+ TQLineEdit *mUsername;
+ TQLineEdit *mPassword;
+ TQCheckBox *mRememberPassword;
+ TQCheckBox *mUseUriNotUID;
CardDavReloadConfig* mReloadConfig;
CardDavSaveConfig* mSaveConfig;
diff --git a/kresources/carddav/configwidgets.cpp b/kresources/carddav/configwidgets.cpp
index e97a0a88d..baa70b403 100644
--- a/kresources/carddav/configwidgets.cpp
+++ b/kresources/carddav/configwidgets.cpp
@@ -39,14 +39,14 @@
#include <klocale.h>
#include <kdebug.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qcheckbox.h>
-#include <qradiobutton.h>
-#include <qspinbox.h>
-#include <qbuttongroup.h>
-#include <qgroupbox.h>
-#include <qhbox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqcheckbox.h>
+#include <tqradiobutton.h>
+#include <tqspinbox.h>
+#include <tqbuttongroup.h>
+#include <tqgroupbox.h>
+#include <tqhbox.h>
using namespace KABC;
@@ -58,8 +58,8 @@ class CardDavConfigPrivate
: mGroup( 0 ),
mIntervalSpin( 0 ) {}
- QButtonGroup *mGroup;
- QSpinBox *mIntervalSpin;
+ TQButtonGroup *mGroup;
+ TQSpinBox *mIntervalSpin;
};
class CardDavReloadConfig::Private
@@ -73,47 +73,47 @@ class CardDavSaveConfig::Private
};
//@endcond
-CardDavReloadConfig::CardDavReloadConfig( QWidget *parent )
- : QWidget( parent ), d( new KABC::CardDavReloadConfig::Private() )
+CardDavReloadConfig::CardDavReloadConfig( TQWidget *parent )
+ : TQWidget( parent ), d( new KABC::CardDavReloadConfig::Private() )
{
- QBoxLayout *topLayout = new QVBoxLayout( this );
+ TQBoxLayout *topLayout = new TQVBoxLayout( this );
- //QGroupBox *groupBox = new QGroupBox( i18nc( "@title:group", "Automatic Reload" ), this );
- QGroupBox *groupBox = new QGroupBox( i18n( "Automatic Reload" ), this );
+ //TQGroupBox *groupBox = new TQGroupBox( i18nc( "@title:group", "Automatic Reload" ), this );
+ TQGroupBox *groupBox = new TQGroupBox( i18n( "Automatic Reload" ), this );
topLayout->addWidget( groupBox );
- QRadioButton *noAutomaticReload =
- new QRadioButton(
+ TQRadioButton *noAutomaticReload =
+ new TQRadioButton(
//i18nc( "@option:radio never reload the cache", "Never" ), groupBox );
i18n( "Never" ), groupBox );
- QRadioButton *automaticReloadOnStartup =
- new QRadioButton(
+ TQRadioButton *automaticReloadOnStartup =
+ new TQRadioButton(
//i18nc( "@option:radio reload the cache on startup", "Only on startup" ), groupBox );
i18n( "Only on startup" ), groupBox );
- QRadioButton *intervalRadio =
- new QRadioButton(
+ TQRadioButton *intervalRadio =
+ new TQRadioButton(
// i18nc( "@option:radio reload the cache at regular intervals",
// "Regular interval" ), groupBox );
i18n( "Regular interval" ), groupBox );
- d->mGroup = new QButtonGroup( this );
+ d->mGroup = new TQButtonGroup( this );
d->mGroup->hide();
d->mGroup->insert( intervalRadio, 2 );
d->mGroup->insert( automaticReloadOnStartup, 1 );
d->mGroup->insert( noAutomaticReload, 0 );
- connect( intervalRadio, SIGNAL( toggled( bool ) ),
- SLOT( slotIntervalToggled( bool ) ) );
+ connect( intervalRadio, TQT_SIGNAL( toggled( bool ) ),
+ TQT_SLOT( slotIntervalToggled( bool ) ) );
- QHBox *intervalBox = new QHBox( groupBox );
- //new QLabel( i18nc( "@label:spinbox", "Interval in minutes:" ), intervalBox );
- new QLabel( i18n( "Interval in minutes:" ), intervalBox );
- d->mIntervalSpin = new QSpinBox( intervalBox );
+ TQHBox *intervalBox = new TQHBox( groupBox );
+ //new TQLabel( i18nc( "@label:spinbox", "Interval in minutes:" ), intervalBox );
+ new TQLabel( i18n( "Interval in minutes:" ), intervalBox );
+ d->mIntervalSpin = new TQSpinBox( intervalBox );
d->mIntervalSpin->setRange( 1, 900 );
d->mIntervalSpin->setEnabled( false );
groupBox->setColumnLayout(1, Qt::Vertical);
- QVBoxLayout *vbox = new QVBoxLayout(groupBox->layout());
+ TQVBoxLayout *vbox = new TQVBoxLayout(groupBox->layout());
vbox->addWidget(intervalRadio);
vbox->addWidget(intervalBox);
vbox->addWidget(automaticReloadOnStartup);
@@ -152,54 +152,54 @@ void CardDavReloadConfig::slotIntervalToggled( bool checked )
}
}
-CardDavSaveConfig::CardDavSaveConfig( QWidget *parent )
- : QWidget( parent ), d( new KABC::CardDavSaveConfig::Private() )
+CardDavSaveConfig::CardDavSaveConfig( TQWidget *parent )
+ : TQWidget( parent ), d( new KABC::CardDavSaveConfig::Private() )
{
- QBoxLayout *topLayout = new QVBoxLayout( this );
+ TQBoxLayout *topLayout = new TQVBoxLayout( this );
- //QGroupBox *groupBox = new QGroupBox( i18nc( "@title:group", "Automatic Save" ), this );
- QGroupBox *groupBox = new QGroupBox( i18n( "Automatic Save" ), this );
- d->mGroup = new QButtonGroup( this );
+ //TQGroupBox *groupBox = new TQGroupBox( i18nc( "@title:group", "Automatic Save" ), this );
+ TQGroupBox *groupBox = new TQGroupBox( i18n( "Automatic Save" ), this );
+ d->mGroup = new TQButtonGroup( this );
d->mGroup->hide();
topLayout->addWidget( groupBox );
- QRadioButton *never =
- new QRadioButton(
+ TQRadioButton *never =
+ new TQRadioButton(
//i18nc( "@option:radio never save the cache automatically", "Never" ), groupBox );
i18n( "Never" ), groupBox );
- QRadioButton *onExit =
- new QRadioButton(
+ TQRadioButton *onExit =
+ new TQRadioButton(
//i18nc( "@option:radio save the cache on exit", "Only on exit" ), groupBox );
i18n( "Only on exit" ), groupBox );
- QRadioButton *intervalRadio =
- new QRadioButton(
+ TQRadioButton *intervalRadio =
+ new TQRadioButton(
//i18nc( "@option:radio save the cache at regular intervals", "Regular interval" ), groupBox );
i18n( "Regular interval" ), groupBox );
- d->mGroup = new QButtonGroup( this );
+ d->mGroup = new TQButtonGroup( this );
d->mGroup->hide();
d->mGroup->insert( never, 0 );
d->mGroup->insert( onExit, 1 );
d->mGroup->insert( intervalRadio, 2 );
- connect( intervalRadio, SIGNAL( toggled( bool ) ),
- SLOT( slotIntervalToggled( bool ) ) );
+ connect( intervalRadio, TQT_SIGNAL( toggled( bool ) ),
+ TQT_SLOT( slotIntervalToggled( bool ) ) );
- QHBox *intervalBox = new QHBox( groupBox );
- //new QLabel( i18nc( "@label:spinbox", "Interval in minutes:" ), intervalBox );
- new QLabel( i18n( "Interval in minutes:" ), intervalBox );
- d->mIntervalSpin = new QSpinBox( intervalBox );
+ TQHBox *intervalBox = new TQHBox( groupBox );
+ //new TQLabel( i18nc( "@label:spinbox", "Interval in minutes:" ), intervalBox );
+ new TQLabel( i18n( "Interval in minutes:" ), intervalBox );
+ d->mIntervalSpin = new TQSpinBox( intervalBox );
d->mIntervalSpin->setRange( 1, 900 );
d->mIntervalSpin->setEnabled( false );
- QRadioButton *delay =
- new QRadioButton(
+ TQRadioButton *delay =
+ new TQRadioButton(
// i18nc( "@option:radio save the cache after some delay",
// "Delayed after changes" ), groupBox );
i18n( "Delayed after changes" ), groupBox );
- QRadioButton *every =
- new QRadioButton(
+ TQRadioButton *every =
+ new TQRadioButton(
// i18nc( "@option:radio save the cache after every modification",
// "Immediately after changes" ), groupBox );
i18n( "Immediately after changes" ), groupBox );
@@ -211,7 +211,7 @@ CardDavSaveConfig::CardDavSaveConfig( QWidget *parent )
intervalBox->hide();
groupBox->setColumnLayout(1, Qt::Vertical);
- QVBoxLayout *vbox = new QVBoxLayout(groupBox->layout());
+ TQVBoxLayout *vbox = new TQVBoxLayout(groupBox->layout());
vbox->addWidget(delay);
vbox->addWidget(every);
vbox->addWidget(intervalRadio);
diff --git a/kresources/carddav/configwidgets.h b/kresources/carddav/configwidgets.h
index 3cfd8a699..f50c58dd5 100644
--- a/kresources/carddav/configwidgets.h
+++ b/kresources/carddav/configwidgets.h
@@ -34,7 +34,7 @@
#ifndef KCARDDAV_AUTOWIDGETS_H
#define KCARDDAV_AUTOWIDGETS_H
-#include <qwidget.h>
+#include <tqwidget.h>
#include <kdemacros.h>
namespace KABC {
@@ -50,7 +50,7 @@ class KDE_EXPORT CardDavReloadConfig : public QWidget
{
Q_OBJECT
public:
- explicit CardDavReloadConfig( QWidget *parent = 0 );
+ explicit CardDavReloadConfig( TQWidget *parent = 0 );
~CardDavReloadConfig();
public slots:
void loadSettings( ResourceCached *resource );
@@ -76,7 +76,7 @@ class KDE_EXPORT CardDavSaveConfig : public QWidget
{
Q_OBJECT
public:
- explicit CardDavSaveConfig( QWidget *parent = 0 );
+ explicit CardDavSaveConfig( TQWidget *parent = 0 );
~CardDavSaveConfig();
public slots:
diff --git a/kresources/carddav/job.cpp b/kresources/carddav/job.cpp
index ce5141f06..994964afb 100644
--- a/kresources/carddav/job.cpp
+++ b/kresources/carddav/job.cpp
@@ -17,7 +17,7 @@
#include <kdebug.h>
#include <klocale.h>
-#include <qmutex.h>
+#include <tqmutex.h>
#define log(s) kdDebug() << s;
@@ -35,7 +35,7 @@ using namespace KABC;
| CONSTRUCTOR AND DESTRUCTOR
========================================================================*/
-CardDavJob::CardDavJob(const QString& url) : mUseURI(false) {
+CardDavJob::CardDavJob(const TQString& url) : mUseURI(false) {
cleanJob();
setUrl(url);
}
@@ -55,14 +55,14 @@ void CardDavJob::enableCarddavDebug(runtime_info* rt) {
}
}
-void CardDavJob::setErrorString(const QString& err, const long number) {
+void CardDavJob::setErrorString(const TQString& err, const long number) {
mError = true;
mErrorString = err;
mErrorNumber = number;
}
void CardDavJob::processError(const carddav_error* err) {
- QString error_string;
+ TQString error_string;
long code = err->code;
@@ -103,8 +103,8 @@ void CardDavJob::run() {
// Signal done
// 1000 is read, 1001 is write
- if (type() == 0) QApplication::postEvent ( parent(), new QEvent( static_cast<QEvent::Type>(1000) ) );
- if (type() == 1) QApplication::postEvent ( parent(), new QEvent( static_cast<QEvent::Type>(1001) ) );
+ if (type() == 0) TQApplication::postEvent ( parent(), new TQEvent( static_cast<TQEvent::Type>(1000) ) );
+ if (type() == 1) TQApplication::postEvent ( parent(), new TQEvent( static_cast<TQEvent::Type>(1001) ) );
}
// EOF ========================================================================
diff --git a/kresources/carddav/job.h b/kresources/carddav/job.h
index 79e12f828..75626abf3 100644
--- a/kresources/carddav/job.h
+++ b/kresources/carddav/job.h
@@ -16,10 +16,10 @@
#ifndef KABCDAV_JOB_H
#define KABCDAV_JOB_H
-#include <qthread.h>
-#include <qstring.h>
-#include <qdatetime.h>
-#include <qapplication.h>
+#include <tqthread.h>
+#include <tqstring.h>
+#include <tqdatetime.h>
+#include <tqapplication.h>
extern "C" {
#include <libcarddav/carddav.h>
@@ -34,21 +34,21 @@ namespace KABC {
/**
* Calendar job.
*/
-class CardDavJob : public QThread {
+class CardDavJob : public TQThread {
public:
/**
* @param url URL to load.
*/
- CardDavJob(const QString& url = QString());
+ CardDavJob(const TQString& url = TQString());
virtual ~CardDavJob();
/**
* Sets a new URL to load.
*/
- virtual void setUrl(const QString& s) {
+ virtual void setUrl(const TQString& s) {
mUrl = s;
}
@@ -62,7 +62,7 @@ public:
/**
* Sets the parent qobject.
*/
- virtual void setParent(QObject *s) {
+ virtual void setParent(TQObject *s) {
mParent = s;
}
@@ -76,7 +76,7 @@ public:
/**
* @return URL to load.
*/
- virtual QString url() const {
+ virtual TQString url() const {
return mUrl;
}
@@ -90,7 +90,7 @@ public:
/**
* @return parent object
*/
- virtual QObject *parent() {
+ virtual TQObject *parent() {
return mParent;
}
@@ -111,7 +111,7 @@ public:
/**
* @return an error string.
*/
- virtual QString errorString() const {
+ virtual TQString errorString() const {
return mErrorString;
}
@@ -147,7 +147,7 @@ protected:
/**
* Sets an error string to @p err. Also sets an error flag.
*/
- void setErrorString(const QString& str, const long number);
+ void setErrorString(const TQString& str, const long number);
/**
* Process an error.
@@ -159,11 +159,11 @@ protected:
private:
- QString mUrl;
+ TQString mUrl;
bool mError;
- QString mErrorString;
+ TQString mErrorString;
long mErrorNumber;
- QObject *mParent;
+ TQObject *mParent;
int mType;
bool mUseURI;
diff --git a/kresources/carddav/preferences.cpp b/kresources/carddav/preferences.cpp
index e95041195..cf2cdbc5a 100644
--- a/kresources/carddav/preferences.cpp
+++ b/kresources/carddav/preferences.cpp
@@ -16,8 +16,8 @@
#include "preferences.h"
#include <kwallet.h>
-#include <qstring.h>
-#include <qurl.h>
+#include <tqstring.h>
+#include <tqurl.h>
#include <kdebug.h>
/*=========================================================================
@@ -31,15 +31,15 @@ using namespace KWallet;
| CONSTANTS
========================================================================*/
-const QString CardDavPrefs::NO_PASSWORD = "";
-const QString CardDavPrefs::WALLET_FOLDER = "CardDAV resource";
-const QString CardDavPrefs::WALLET_PWD_SUFFIX = ":carddav_password";
+const TQString CardDavPrefs::NO_PASSWORD = "";
+const TQString CardDavPrefs::WALLET_FOLDER = "CardDAV resource";
+const TQString CardDavPrefs::WALLET_PWD_SUFFIX = ":carddav_password";
/*=========================================================================
| METHODS
========================================================================*/
-bool CardDavPrefs::setWalletFolder(const QString& folder) {
+bool CardDavPrefs::setWalletFolder(const TQString& folder) {
bool ret = true;
if (!mNoWallet && NULL != mWallet) {
@@ -97,7 +97,7 @@ void CardDavPrefs::removeWallet(bool noWallet) {
mNoWallet = noWallet;
}
-void CardDavPrefs::addPrefix(const QString& prefix) {
+void CardDavPrefs::addPrefix(const TQString& prefix) {
KConfigSkeletonItem::List itemList = items();
KConfigSkeletonItem::List::Iterator it;
@@ -106,7 +106,7 @@ void CardDavPrefs::addPrefix(const QString& prefix) {
}
}
-bool CardDavPrefs::writePasswordToWallet(const QString& password) {
+bool CardDavPrefs::writePasswordToWallet(const TQString& password) {
Wallet* w = getWallet();
@@ -123,12 +123,12 @@ bool CardDavPrefs::writePasswordToWallet(const QString& password) {
return ret;
}
-bool CardDavPrefs::readPasswordFromWallet(QString& password) {
+bool CardDavPrefs::readPasswordFromWallet(TQString& password) {
Wallet* w = getWallet();
bool ret = false;
if (NULL != w) {
- QString p;
+ TQString p;
int rc = w->readPassword(mPrefix + WALLET_PWD_SUFFIX, p);
if (0 == rc) {
//CardDavPrefsSkel::setPassword(p);
@@ -160,7 +160,7 @@ bool CardDavPrefs::removePasswordFromWallet() {
return ret;
}
-void CardDavPrefs::setPassword(const QString& p) {
+void CardDavPrefs::setPassword(const TQString& p) {
mPassword = p;
@@ -169,14 +169,14 @@ void CardDavPrefs::setPassword(const QString& p) {
}
}
-QString CardDavPrefs::password() {
+TQString CardDavPrefs::password() {
if (NO_PASSWORD == mPassword) {
readPasswordFromWallet(mPassword);
}
return mPassword;
}
-QString CardDavPrefs::getusername() {
+TQString CardDavPrefs::getusername() {
return username();
}
@@ -210,10 +210,10 @@ bool CardDavPrefs::getUseURI() {
return useURI();
}
-QString CardDavPrefs::getFullUrl() {
+TQString CardDavPrefs::getFullUrl() {
- QUrl t(url());
- QString safeURL;
+ TQUrl t(url());
+ TQString safeURL;
int firstAt;
t.setUser(username());
diff --git a/kresources/carddav/preferences.h b/kresources/carddav/preferences.h
index 6035efe2d..a01ee041b 100644
--- a/kresources/carddav/preferences.h
+++ b/kresources/carddav/preferences.h
@@ -43,7 +43,7 @@ public:
/**
* @param prefix Unique prefix of the resource instance (use identifier() method).
*/
- CardDavPrefs(const QString& prefix)
+ CardDavPrefs(const TQString& prefix)
: mWallet(NULL)
, mNoWallet(false)
, mPrefix(prefix)
@@ -66,25 +66,25 @@ public:
* to be properly saved, call this method after ensuring the remember flag
* is set.
*/
- void setPassword(const QString& p);
+ void setPassword(const TQString& p);
/**
* Returns password. The password is taken from the wallet.
* May return an empty string, if there is no password available.
*/
- QString password();
+ TQString password();
/**
* Returns the username.
*/
- QString getusername();
+ TQString getusername();
void setRememberPassword(bool v);
/**
* @return A full URL to connect to CardDAV server (including username and password).
*/
- QString getFullUrl();
+ TQString getFullUrl();
bool getUseURI();
@@ -95,7 +95,7 @@ protected:
* can use the same config file.
* @param prefix Unique prefix of the resource instance.
*/
- void addPrefix(const QString& prefix);
+ void addPrefix(const TQString& prefix);
/**
* Returns the wallet or NULL, if the wallet can't be obtained.
@@ -107,7 +107,7 @@ protected:
* @param folder the wallet working folder
* @return true, if the folder has been set, and false otherwise.
*/
- bool setWalletFolder(const QString& folder);
+ bool setWalletFolder(const TQString& folder);
/**
* Removes the wallet. If @p noWallet is set, the wallet has been marked inaccessible, so that subsequent
@@ -120,14 +120,14 @@ protected:
* @param password password to write
* @return true on success, false on failure
*/
- bool writePasswordToWallet(const QString& password);
+ bool writePasswordToWallet(const TQString& password);
/**
* Extracts password from the wallet.
* @param password a variable to save read password to.
* @return true on success, false on failure
*/
- bool readPasswordFromWallet(QString& password);
+ bool readPasswordFromWallet(TQString& password);
/**
* Clears password in the wallet.
@@ -137,15 +137,15 @@ protected:
private:
- static const QString NO_PASSWORD;
- static const QString WALLET_FOLDER;
- static const QString WALLET_PWD_SUFFIX;
+ static const TQString NO_PASSWORD;
+ static const TQString WALLET_FOLDER;
+ static const TQString WALLET_PWD_SUFFIX;
KWallet::Wallet* mWallet;
bool mNoWallet;
- QString mPrefix;
- QString mPassword;
+ TQString mPrefix;
+ TQString mPassword;
};
} // namespace KABC
diff --git a/kresources/carddav/reader.h b/kresources/carddav/reader.h
index f4c1eb84d..181d4eb6a 100644
--- a/kresources/carddav/reader.h
+++ b/kresources/carddav/reader.h
@@ -18,8 +18,8 @@
#include "job.h"
-#include <qstring.h>
-#include <qdatetime.h>
+#include <tqstring.h>
+#include <tqdatetime.h>
namespace KABC {
@@ -37,7 +37,7 @@ public:
/**
* @param url URL to load.
*/
- CardDavReader(const QString& url = QString()) :
+ CardDavReader(const TQString& url = TQString()) :
CardDavJob(url)
, mGetAll(true)
{
@@ -48,7 +48,7 @@ public:
* This method call disables the effect of setGetAll() call.
* setGetAll() call disables the effect of this method.
*/
- void setRange(const QDateTime& start, const QDateTime& end) {
+ void setRange(const TQDateTime& start, const TQDateTime& end) {
mGetAll = false;
mTimeStart = start;
mTimeEnd = end;
@@ -66,7 +66,7 @@ public:
/**
* @return downloaded calendar data in iCal format.
*/
- QString data() const {
+ TQString data() const {
return mData;
}
@@ -78,10 +78,10 @@ protected:
private:
- QString mData;
+ TQString mData;
bool mGetAll;
- QDateTime mTimeStart;
- QDateTime mTimeEnd;
+ TQDateTime mTimeStart;
+ TQDateTime mTimeEnd;
};
diff --git a/kresources/carddav/resource.cpp b/kresources/carddav/resource.cpp
index f79d82235..315b6270d 100644
--- a/kresources/carddav/resource.cpp
+++ b/kresources/carddav/resource.cpp
@@ -15,10 +15,10 @@
#include <string.h>
-#include <qurl.h>
-#include <qmessagebox.h>
-#include <qapplication.h>
-#include <qeventloop.h>
+#include <tqurl.h>
+#include <tqmessagebox.h>
+#include <tqapplication.h>
+#include <tqeventloop.h>
#include <kabc/addressee.h>
#include <kabc/vcardconverter.h>
@@ -26,13 +26,13 @@
#include <klocale.h>
#include <kpassdlg.h>
-#include <qdatetime.h>
-#include <qmutex.h>
-#include <qthread.h>
-#include <qtimer.h>
+#include <tqdatetime.h>
+#include <tqmutex.h>
+#include <tqthread.h>
+#include <tqtimer.h>
#ifdef KCARDDAV_DEBUG
- #include <qfile.h>
+ #include <tqfile.h>
#endif
#include "resource.h"
@@ -105,7 +105,7 @@ ResourceCardDav::~ResourceCardDav() {
while ((mWriter->running() == true) || (mWritingQueue.isEmpty() == false) || !mWritingQueueReady) {
readLockout = true;
sleep(1);
- qApp->processEvents(QEventLoop::ExcludeUserInput);
+ qApp->processEvents(TQEventLoop::ExcludeUserInput);
}
if (mWriter) {
@@ -144,7 +144,7 @@ bool ResourceCardDav::load() {
return true; // Silently fail; the user has obviously not responded to a dialog and we don't need to pop up more of them!
}
- log(QString("doLoad(%1)").arg(syncCache));
+ log(TQString("doLoad(%1)").arg(syncCache));
// FIXME KABC
//clearCache();
@@ -166,7 +166,7 @@ bool ResourceCardDav::load() {
bool ResourceCardDav::doSave() {
bool syncCache = true;
- log(QString("doSave(%1)").arg(syncCache));
+ log(TQString("doSave(%1)").arg(syncCache));
if (!hasChanges()) {
log("no changes");
@@ -194,7 +194,7 @@ bool ResourceCardDav::doSave() {
clearChanges();
if (mWriteRetryTimer != NULL) {
if (mWriteRetryTimer->isActive() == false) {
- disconnect( mWriteRetryTimer, SIGNAL(timeout()), this, SLOT(doSave()) );
+ disconnect( mWriteRetryTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(doSave()) );
delete mWriteRetryTimer;
mWriteRetryTimer = NULL;
}
@@ -253,8 +253,8 @@ void ResourceCardDav::init() {
// creating jobs
// Qt4 handles this quite differently, as shown below,
// whereas Qt3 needs events (see ::event())
-// connect(mLoader, SIGNAL(finished()), this, SLOT(loadFinished()));
-// connect(mWriter, SIGNAL(finished()), this, SLOT(writingFinished()));
+// connect(mLoader, TQT_SIGNAL(finished()), this, TQT_SLOT(loadFinished()));
+// connect(mWriter, TQT_SIGNAL(finished()), this, TQT_SLOT(writingFinished()));
setType("ResourceCardDav");
}
@@ -338,14 +338,14 @@ void ResourceCardDav::loadingQueuePop() {
mLoader->setType(0);
mLoader->setUseURI(mPrefs->getUseURI());
- //QDateTime dt(QDate::currentDate());
+ //TQDateTime dt(TQDate::currentDate());
//mLoader->setRange(dt.addDays(-CACHE_DAYS), dt.addDays(CACHE_DAYS));
//mLoader->setGetAll();
mLoadingQueueReady = false;
log("starting actual download job");
- mLoader->start(QThread::LowestPriority);
+ mLoader->start(TQThread::LowestPriority);
// if all ok, removing the task from the queue
mLoadingQueue.dequeue();
@@ -354,7 +354,7 @@ void ResourceCardDav::loadingQueuePop() {
delete t;
}
-void ResourceCardDav::startLoading(const QString& url) {
+void ResourceCardDav::startLoading(const TQString& url) {
LoadingTask *t = new LoadingTask;
t->url = url;
loadingQueuePush(t);
@@ -373,29 +373,29 @@ void ResourceCardDav::loadFinished() {
if (loader->error()) {
if (loader->errorNumber() == -401) {
if (NULL != mPrefs) {
- QCString newpass;
- if (KPasswordDialog::getPassword (newpass, QString("<b>") + i18n("Remote authorization required") + QString("</b><p>") + i18n("Please input the password for") + QString(" ") + mPrefs->getusername(), NULL) != 1) {
+ TQCString newpass;
+ if (KPasswordDialog::getPassword (newpass, TQString("<b>") + i18n("Remote authorization required") + TQString("</b><p>") + i18n("Please input the password for") + TQString(" ") + mPrefs->getusername(), NULL) != 1) {
log("load error: " + loader->errorString() );
- addressBook()->error(QString("[%1] ").arg(abs(loader->errorNumber())) + loader->errorString());
+ addressBook()->error(TQString("[%1] ").arg(abs(loader->errorNumber())) + loader->errorString());
}
else {
// Set new password and try again
- mPrefs->setPassword(QString(newpass));
+ mPrefs->setPassword(TQString(newpass));
startLoading(mPrefs->getFullUrl());
}
}
else {
log("load error: " + loader->errorString() );
- addressBook()->error(QString("[%1] ").arg(abs(loader->errorNumber())) + loader->errorString());
+ addressBook()->error(TQString("[%1] ").arg(abs(loader->errorNumber())) + loader->errorString());
}
}
else {
log("load error: " + loader->errorString() );
- addressBook()->error(QString("[%1] ").arg(abs(loader->errorNumber())) + loader->errorString());
+ addressBook()->error(TQString("[%1] ").arg(abs(loader->errorNumber())) + loader->errorString());
}
} else {
log("successful load");
- QString data = loader->data();
+ TQString data = loader->data();
if (!data.isNull() && !data.isEmpty()) {
data.replace("\r\n", "\n"); // to avoid \r\n becomes \n\n after the next line
@@ -422,7 +422,7 @@ void ResourceCardDav::loadFinished() {
loadingQueuePop();
}
-bool ResourceCardDav::checkData(const QString& data) {
+bool ResourceCardDav::checkData(const TQString& data) {
log("checking the data");
KABC::VCardConverter converter;
@@ -436,7 +436,7 @@ bool ResourceCardDav::checkData(const QString& data) {
return ret;
}
-bool ResourceCardDav::parseData(const QString& data) {
+bool ResourceCardDav::parseData(const TQString& data) {
log("parseData()");
bool ret = true;
@@ -471,11 +471,11 @@ bool ResourceCardDav::parseData(const QString& data) {
// debug code here -------------------------------------------------------
#ifdef KCARDDAV_DEBUG
- const QString fout_path = "/tmp/kcarddav_download_" + identifier() + ".tmp";
+ const TQString fout_path = "/tmp/kcarddav_download_" + identifier() + ".tmp";
- QFile fout(fout_path);
+ TQFile fout(fout_path);
if (fout.open(IO_WriteOnly | IO_Append)) {
- QTextStream sout(&fout);
+ TQTextStream sout(&fout);
sout << "---------- " << resourceName() << ": --------------------------------\n";
sout << data << "\n";
fout.close();
@@ -553,11 +553,11 @@ void ResourceCardDav::writingQueuePop() {
mWriter->setUseURI(mPrefs->getUseURI());
#ifdef KCARDDAV_DEBUG
- const QString fout_path = "/tmp/kcarddav_upload_" + identifier() + ".tmp";
+ const TQString fout_path = "/tmp/kcarddav_upload_" + identifier() + ".tmp";
- QFile fout(fout_path);
+ TQFile fout(fout_path);
if (fout.open(IO_WriteOnly | IO_Append)) {
- QTextStream sout(&fout);
+ TQTextStream sout(&fout);
sout << "---------- " << resourceName() << ": --------------------------------\n";
sout << "================== Added:\n" << t->added << "\n";
sout << "================== Changed:\n" << t->changed << "\n";
@@ -575,7 +575,7 @@ void ResourceCardDav::writingQueuePop() {
mWritingQueueReady = false;
log("starting actual write job");
- mWriter->start(QThread::LowestPriority);
+ mWriter->start(TQThread::LowestPriority);
// if all ok, remove the task from the queue
mWritingQueue.dequeue();
@@ -584,7 +584,7 @@ void ResourceCardDav::writingQueuePop() {
delete t;
}
-bool ResourceCardDav::event ( QEvent * e ) {
+bool ResourceCardDav::event ( TQEvent * e ) {
if (e->type() == 1000) {
// Read done
loadFinished();
@@ -598,7 +598,7 @@ bool ResourceCardDav::event ( QEvent * e ) {
else return FALSE;
}
-bool ResourceCardDav::startWriting(const QString& url) {
+bool ResourceCardDav::startWriting(const TQString& url) {
log("startWriting: url = " + url);
WritingTask *t = new WritingTask;
@@ -609,8 +609,8 @@ bool ResourceCardDav::startWriting(const QString& url) {
// Before these calls are made any existing read (and maybe write) threads should be finished
if ((mLoader->running() == true) || (mLoadingQueue.isEmpty() == false) || (mWriter->running() == true) || (mWritingQueue.isEmpty() == false)) {
if (mWriteRetryTimer == NULL) {
- mWriteRetryTimer = new QTimer(this);
- connect( mWriteRetryTimer, SIGNAL(timeout()), SLOT(doSave()) );
+ mWriteRetryTimer = new TQTimer(this);
+ connect( mWriteRetryTimer, TQT_SIGNAL(timeout()), TQT_SLOT(doSave()) );
}
mWriteRetryTimer->start(1000, TRUE);
return false;
@@ -642,25 +642,25 @@ void ResourceCardDav::writingFinished() {
if (mWriter->error() && (abs(mWriter->errorNumber()) != 207)) {
if (mWriter->errorNumber() == -401) {
if (NULL != mPrefs) {
- QCString newpass;
- if (KPasswordDialog::getPassword (newpass, QString("<b>") + i18n("Remote authorization required") + QString("</b><p>") + i18n("Please input the password for") + QString(" ") + mPrefs->getusername(), NULL) != 1) {
+ TQCString newpass;
+ if (KPasswordDialog::getPassword (newpass, TQString("<b>") + i18n("Remote authorization required") + TQString("</b><p>") + i18n("Please input the password for") + TQString(" ") + mPrefs->getusername(), NULL) != 1) {
log("write error: " + mWriter->errorString());
- addressBook()->error(QString("[%1] ").arg(abs(mWriter->errorNumber())) + mWriter->errorString());
+ addressBook()->error(TQString("[%1] ").arg(abs(mWriter->errorNumber())) + mWriter->errorString());
}
else {
// Set new password and try again
- mPrefs->setPassword(QString(newpass));
+ mPrefs->setPassword(TQString(newpass));
startWriting(mPrefs->getFullUrl());
}
}
else {
log("write error: " + mWriter->errorString());
- addressBook()->error(QString("[%1] ").arg(abs(mWriter->errorNumber())) + mWriter->errorString());
+ addressBook()->error(TQString("[%1] ").arg(abs(mWriter->errorNumber())) + mWriter->errorString());
}
}
else {
log("write error: " + mWriter->errorString());
- addressBook()->error(QString("[%1] ").arg(abs(mWriter->errorNumber())) + mWriter->errorString());
+ addressBook()->error(TQString("[%1] ").arg(abs(mWriter->errorNumber())) + mWriter->errorString());
}
} else {
log("success");
diff --git a/kresources/carddav/resource.h b/kresources/carddav/resource.h
index d855f6529..b23008132 100644
--- a/kresources/carddav/resource.h
+++ b/kresources/carddav/resource.h
@@ -17,8 +17,8 @@
#define KABC_RESOURCECARDDAV_H
#include "preferences.h"
-#include <qthread.h>
-#include <qptrqueue.h>
+#include <tqthread.h>
+#include <tqptrqueue.h>
#include <kabcresourcecached.h>
#include <libkdepim/progressmanager.h>
@@ -84,14 +84,14 @@ protected slots:
protected:
struct LoadingTask {
- QString url;
+ TQString url;
};
struct WritingTask {
- QString url;
- QString added;
- QString changed;
- QString deleted;
+ TQString url;
+ TQString added;
+ TQString changed;
+ TQString deleted;
};
@@ -126,28 +126,28 @@ protected:
* Initiates calendar loading process.
* @param url URL to load calendar data from.
*/
- void startLoading(const QString& url);
+ void startLoading(const TQString& url);
/**
* Checks if the data is correct and can be parsed.
* @param data ical string to check.
* @return true if the data is correct, false otherwise.
*/
- bool checkData(const QString& data);
+ bool checkData(const TQString& data);
/**
* Parses the data and adds events to the calendar.
* @param data calendar data.
* @return true on success, false on fail.
*/
- bool parseData(const QString& data);
+ bool parseData(const TQString& data);
/**
* Initiates calendar writing process.
* @param url URL to save calendar data to.
* @return true if write was queued successfully, false if not
*/
- bool startWriting(const QString& url);
+ bool startWriting(const TQString& url);
/**
* Ensures incidences' read-only states are the same as the calendar's read-only state.
@@ -178,7 +178,7 @@ protected:
*/
void writingQueuePush(const WritingTask *task);
- virtual bool event ( QEvent * e );
+ virtual bool event ( TQEvent * e );
private:
@@ -209,12 +209,12 @@ private:
KPIM::ProgressItem *mProgress;
bool mLoadingQueueReady;
- QPtrQueue<LoadingTask> mLoadingQueue;
+ TQPtrQueue<LoadingTask> mLoadingQueue;
bool mWritingQueueReady;
- QPtrQueue<WritingTask> mWritingQueue;
+ TQPtrQueue<WritingTask> mWritingQueue;
- QTimer *mWriteRetryTimer;
+ TQTimer *mWriteRetryTimer;
};
diff --git a/kresources/carddav/writer.h b/kresources/carddav/writer.h
index c35e185a8..4af3fe36b 100644
--- a/kresources/carddav/writer.h
+++ b/kresources/carddav/writer.h
@@ -19,8 +19,8 @@
#include "job.h"
#include <string>
-#include <qstring.h>
-#include <qdatetime.h>
+#include <tqstring.h>
+#include <tqdatetime.h>
namespace KABC {
@@ -38,7 +38,7 @@ public:
/**
* @param url URL to load.
*/
- CardDavWriter(const QString& url = QString()) :
+ CardDavWriter(const TQString& url = TQString()) :
CardDavJob(url)
{
clearObjects();
@@ -49,7 +49,7 @@ public:
* @param s icalendar-formatted string consists of all added incidences plus necessary calendar info.
* May be an empty string, which means there is no added incidences to send.
*/
- void setAddedObjects(const QString& s) {
+ void setAddedObjects(const TQString& s) {
mAdded = s;
}
@@ -58,7 +58,7 @@ public:
* @param s icalendar-formatted string consists of all changed incidences plus necessary calendar info.
* May be an empty string, which means there is no changed incidences to send.
*/
- void setChangedObjects(const QString& s) {
+ void setChangedObjects(const TQString& s) {
mChanged = s;
}
@@ -67,7 +67,7 @@ public:
* @param s icalendar-formatted string consists of all deleted incidences plus necessary calendar info.
* May be an empty string, which means there is no deleted incidences to send.
*/
- void setDeletedObjects(const QString& s) {
+ void setDeletedObjects(const TQString& s) {
mDeleted = s;
}
@@ -88,7 +88,7 @@ protected:
/// Just a wrapper above libcaldav functions.
template<typename Operation>
- int pushObjects(const QString& data, Operation op, int okCode, runtime_info* RT) {
+ int pushObjects(const TQString& data, Operation op, int okCode, runtime_info* RT) {
int r = okCode;
if (!data.isNull() && !data.isEmpty()) {
r = op(std::string(data.ascii()).c_str(), std::string(url().ascii()).c_str(), RT);
@@ -98,9 +98,9 @@ protected:
private:
- QString mAdded;
- QString mChanged;
- QString mDeleted;
+ TQString mAdded;
+ TQString mChanged;
+ TQString mDeleted;
};
} // namespace KABC
diff --git a/kresources/egroupware/debugdialog.cpp b/kresources/egroupware/debugdialog.cpp
index 117db3243..9d45dab75 100644
--- a/kresources/egroupware/debugdialog.cpp
+++ b/kresources/egroupware/debugdialog.cpp
@@ -18,9 +18,9 @@
Boston, MA 02110-1301, USA.
*/
-#include <qfile.h>
-#include <qfiledialog.h>
-#include <qlayout.h>
+#include <tqfile.h>
+#include <tqfiledialog.h>
+#include <tqlayout.h>
#include <ktextbrowser.h>
#include <kstaticdeleter.h>
@@ -37,8 +37,8 @@ DebugDialog::DebugDialog()
"Debug Dialog", false, i18n("Debug Dialog"),
User1 | User2 | Ok, Ok, true )
{
- QWidget *page = plainPage();
- QVBoxLayout *layout = new QVBoxLayout( page, marginHint(), spacingHint() );
+ TQWidget *page = plainPage();
+ TQVBoxLayout *layout = new TQVBoxLayout( page, marginHint(), spacingHint() );
mView = new KTextBrowser( page );
layout->addWidget( mView );
@@ -68,7 +68,7 @@ DebugDialog::~DebugDialog()
mSelf = 0;
}
-void DebugDialog::addMessage( const QString &msg, Type type )
+void DebugDialog::addMessage( const TQString &msg, Type type )
{
if ( mSelf )
mSelf->addText( msg, type );
@@ -82,11 +82,11 @@ void DebugDialog::clear()
void DebugDialog::save()
{
- QString fileName = QFileDialog::getSaveFileName();
+ TQString fileName = TQFileDialog::getSaveFileName();
if ( fileName.isEmpty() )
return;
- QFile file( fileName );
+ TQFile file( fileName );
if ( !file.open( IO_WriteOnly ) ) {
qWarning( "Couldn't open file %s", file.name().latin1() );
return;
@@ -106,9 +106,9 @@ void DebugDialog::slotUser2()
clear();
}
-void DebugDialog::addText( const QString &text, Type type )
+void DebugDialog::addText( const TQString &text, Type type )
{
- QString htmlCode( text );
+ TQString htmlCode( text );
htmlCode.replace( "<", "&lt;" );
htmlCode.replace( ">", "&gt;" );
htmlCode.replace( "\n", "<br>" );
diff --git a/kresources/egroupware/debugdialog.h b/kresources/egroupware/debugdialog.h
index c5f91377f..c28987711 100644
--- a/kresources/egroupware/debugdialog.h
+++ b/kresources/egroupware/debugdialog.h
@@ -53,7 +53,7 @@ class DebugDialog : public KDialogBase
/**
Adds a message, which will be shown by the dialog.
*/
- static void addMessage( const QString &msg, Type type );
+ static void addMessage( const TQString &msg, Type type );
private slots:
void clear();
@@ -67,10 +67,10 @@ class DebugDialog : public KDialogBase
DebugDialog();
static DebugDialog *mSelf;
- void addText( const QString&, Type );
+ void addText( const TQString&, Type );
- QStringList mMessages;
- QStringList mHTMLMessages;
+ TQStringList mMessages;
+ TQStringList mHTMLMessages;
KTextBrowser *mView;
};
diff --git a/kresources/egroupware/kabc_resourcexmlrpc.cpp b/kresources/egroupware/kabc_resourcexmlrpc.cpp
index eba630cc3..ee1e74bea 100644
--- a/kresources/egroupware/kabc_resourcexmlrpc.cpp
+++ b/kresources/egroupware/kabc_resourcexmlrpc.cpp
@@ -18,7 +18,7 @@
Boston, MA 02110-1301, USA.
*/
-#include <qapplication.h>
+#include <tqapplication.h>
#include <kabc/addressee.h>
#include <kabprefs.h>
@@ -41,15 +41,15 @@
using namespace KABC;
-static const QString SearchContactsCommand = "addressbook.boaddressbook.search";
-static const QString AddContactCommand = "addressbook.boaddressbook.write";
-static const QString DeleteContactCommand = "addressbook.boaddressbook.delete";
-static const QString LoadCategoriesCommand = "addressbook.boaddressbook.categories";
-static const QString LoadCustomFieldsCommand = "addressbook.boaddressbook.customfields";
+static const TQString SearchContactsCommand = "addressbook.boaddressbook.search";
+static const TQString AddContactCommand = "addressbook.boaddressbook.write";
+static const TQString DeleteContactCommand = "addressbook.boaddressbook.delete";
+static const TQString LoadCategoriesCommand = "addressbook.boaddressbook.categories";
+static const TQString LoadCustomFieldsCommand = "addressbook.boaddressbook.customfields";
static void setRights( KABC::Addressee &addr, int rights )
{
- addr.insertCustom( "EGWRESOURCE", "RIGHTS", QString::number( rights ) );
+ addr.insertCustom( "EGWRESOURCE", "RIGHTS", TQString::number( rights ) );
}
static int rights( const KABC::Addressee &addr )
@@ -70,8 +70,8 @@ ResourceXMLRPC::ResourceXMLRPC( const KConfig *config )
initEGroupware();
}
-ResourceXMLRPC::ResourceXMLRPC( const QString &url, const QString &domain,
- const QString &user, const QString &password )
+ResourceXMLRPC::ResourceXMLRPC( const TQString &url, const TQString &domain,
+ const TQString &user, const TQString &password )
: ResourceCached( 0 ), mServer( 0 )
{
init();
@@ -150,14 +150,14 @@ bool ResourceXMLRPC::doOpen()
mServer->setUrl( KURL( mPrefs->url() ) );
mServer->setUserAgent( "KDE-AddressBook" );
- QMap<QString, QVariant> args;
+ TQMap<TQString, TQVariant> args;
args.insert( "domain", mPrefs->domain() );
args.insert( "username", mPrefs->user() );
args.insert( "password", mPrefs->password() );
- mServer->call( "system.login", QVariant( args ),
- this, SLOT( loginFinished( const QValueList<QVariant>&, const QVariant& ) ),
- this, SLOT( fault( int, const QString&, const QVariant& ) ) );
+ mServer->call( "system.login", TQVariant( args ),
+ this, TQT_SLOT( loginFinished( const TQValueList<TQVariant>&, const TQVariant& ) ),
+ this, TQT_SLOT( fault( int, const TQString&, const TQVariant& ) ) );
mSynchronizer->start();
@@ -166,13 +166,13 @@ bool ResourceXMLRPC::doOpen()
void ResourceXMLRPC::doClose()
{
- QMap<QString, QVariant> args;
+ TQMap<TQString, TQVariant> args;
args.insert( "sessionid", mSessionID );
args.insert( "kp3", mKp3 );
- mServer->call( "system.logout", QVariant( args ),
- this, SLOT( logoutFinished( const QValueList<QVariant>&, const QVariant& ) ),
- this, SLOT( fault( int, const QString&, const QVariant& ) ) );
+ mServer->call( "system.logout", TQVariant( args ),
+ this, TQT_SLOT( logoutFinished( const TQValueList<TQVariant>&, const TQVariant& ) ),
+ this, TQT_SLOT( fault( int, const TQString&, const TQVariant& ) ) );
mSynchronizer->start();
}
@@ -193,7 +193,7 @@ bool ResourceXMLRPC::asyncLoad()
loadCache();
- QMap<QString, QVariant> args;
+ TQMap<TQString, TQVariant> args;
args.insert( "start", "0" );
args.insert( "query", "" );
args.insert( "filter", "" );
@@ -202,16 +202,16 @@ bool ResourceXMLRPC::asyncLoad()
args.insert( "include_users", "calendar" );
mServer->call( SearchContactsCommand, args,
- this, SLOT( listContactsFinished( const QValueList<QVariant>&, const QVariant& ) ),
- this, SLOT( fault( int, const QString&, const QVariant& ) ) );
+ this, TQT_SLOT( listContactsFinished( const TQValueList<TQVariant>&, const TQVariant& ) ),
+ this, TQT_SLOT( fault( int, const TQString&, const TQVariant& ) ) );
- mServer->call( LoadCategoriesCommand, QVariant( false, 0 ),
- this, SLOT( loadCategoriesFinished( const QValueList<QVariant>&, const QVariant& ) ),
- this, SLOT( fault( int, const QString&, const QVariant& ) ) );
+ mServer->call( LoadCategoriesCommand, TQVariant( false, 0 ),
+ this, TQT_SLOT( loadCategoriesFinished( const TQValueList<TQVariant>&, const TQVariant& ) ),
+ this, TQT_SLOT( fault( int, const TQString&, const TQVariant& ) ) );
- mServer->call( LoadCustomFieldsCommand, QVariant( QValueList<QVariant>() ),
- this, SLOT( loadCustomFieldsFinished( const QValueList<QVariant>&, const QVariant& ) ),
- this, SLOT( fault( int, const QString&, const QVariant& ) ) );
+ mServer->call( LoadCustomFieldsCommand, TQVariant( TQValueList<TQVariant>() ),
+ this, TQT_SLOT( loadCustomFieldsFinished( const TQValueList<TQVariant>&, const TQVariant& ) ),
+ this, TQT_SLOT( fault( int, const TQString&, const TQVariant& ) ) );
return true;
}
@@ -246,13 +246,13 @@ bool ResourceXMLRPC::asyncSave( Ticket* )
void ResourceXMLRPC::addContact( const Addressee& addr )
{
- QMap<QString, QVariant> args;
+ TQMap<TQString, TQVariant> args;
writeContact( addr, args );
mServer->call( AddContactCommand, args,
- this, SLOT( addContactFinished( const QValueList<QVariant>&, const QVariant& ) ),
- this, SLOT( addContactFault( int, const QString&, const QVariant& ) ),
- QVariant( addr.uid() ) );
+ this, TQT_SLOT( addContactFinished( const TQValueList<TQVariant>&, const TQVariant& ) ),
+ this, TQT_SLOT( addContactFault( int, const TQString&, const TQVariant& ) ),
+ TQVariant( addr.uid() ) );
}
void ResourceXMLRPC::updateContact( const Addressee& addr )
@@ -262,14 +262,14 @@ void ResourceXMLRPC::updateContact( const Addressee& addr )
return;
}
- QMap<QString, QVariant> args;
+ TQMap<TQString, TQVariant> args;
writeContact( addr, args );
args.insert( "id", idMapper().remoteId( addr.uid() ) );
mServer->call( AddContactCommand, args,
- this, SLOT( updateContactFinished( const QValueList<QVariant>&, const QVariant& ) ),
- this, SLOT( updateContactFault( int, const QString&, const QVariant& ) ),
- QVariant( addr.uid() ) );
+ this, TQT_SLOT( updateContactFinished( const TQValueList<TQVariant>&, const TQVariant& ) ),
+ this, TQT_SLOT( updateContactFault( int, const TQString&, const TQVariant& ) ),
+ TQVariant( addr.uid() ) );
}
void ResourceXMLRPC::deleteContact( const Addressee& addr )
@@ -281,15 +281,15 @@ void ResourceXMLRPC::deleteContact( const Addressee& addr )
}
mServer->call( DeleteContactCommand, idMapper().remoteId( addr.uid() ),
- this, SLOT( deleteContactFinished( const QValueList<QVariant>&, const QVariant& ) ),
- this, SLOT( deleteContactFault( int, const QString&, const QVariant& ) ),
- QVariant( addr.uid() ) );
+ this, TQT_SLOT( deleteContactFinished( const TQValueList<TQVariant>&, const TQVariant& ) ),
+ this, TQT_SLOT( deleteContactFault( int, const TQString&, const TQVariant& ) ),
+ TQVariant( addr.uid() ) );
}
-void ResourceXMLRPC::loginFinished( const QValueList<QVariant> &variant,
- const QVariant& )
+void ResourceXMLRPC::loginFinished( const TQValueList<TQVariant> &variant,
+ const TQVariant& )
{
- QMap<QString, QVariant> map = variant[0].toMap();
+ TQMap<TQString, TQVariant> map = variant[0].toMap();
KURL url( mPrefs->url() );
if ( map[ "GOAWAY" ].toString() == "XOXO" ) { // failed
@@ -307,10 +307,10 @@ void ResourceXMLRPC::loginFinished( const QValueList<QVariant> &variant,
mSynchronizer->stop();
}
-void ResourceXMLRPC::logoutFinished( const QValueList<QVariant> &variant,
- const QVariant& )
+void ResourceXMLRPC::logoutFinished( const TQValueList<TQVariant> &variant,
+ const TQVariant& )
{
- QMap<QString, QVariant> map = variant[0].toMap();
+ TQMap<TQString, TQVariant> map = variant[0].toMap();
if ( map[ "GOODBYE" ].toString() != "XOXO" )
addressBook()->error( i18n( "Logout failed, please check your username and password." ) );
@@ -324,18 +324,18 @@ void ResourceXMLRPC::logoutFinished( const QValueList<QVariant> &variant,
mSynchronizer->stop();
}
-void ResourceXMLRPC::listContactsFinished( const QValueList<QVariant> &mapList,
- const QVariant& )
+void ResourceXMLRPC::listContactsFinished( const TQValueList<TQVariant> &mapList,
+ const TQVariant& )
{
- const QValueList<QVariant> contactList = mapList[ 0 ].toList();
- QValueList<QVariant>::ConstIterator contactIt;
+ const TQValueList<TQVariant> contactList = mapList[ 0 ].toList();
+ TQValueList<TQVariant>::ConstIterator contactIt;
KABC::Addressee::List serverContacts;
for ( contactIt = contactList.begin(); contactIt != contactList.end(); ++contactIt ) {
- const QMap<QString, QVariant> map = (*contactIt).toMap();
+ const TQMap<TQString, TQVariant> map = (*contactIt).toMap();
Addressee addr;
- QString uid;
+ TQString uid;
readContact( map, addr, uid );
@@ -343,7 +343,7 @@ void ResourceXMLRPC::listContactsFinished( const QValueList<QVariant> &mapList,
addr.setResource( this );
addr.setChanged( false );
- QString local = idMapper().localId( uid );
+ TQString local = idMapper().localId( uid );
if ( local.isEmpty() ) { // new entry
idMapper().setRemoteId( addr.uid(), uid );
} else {
@@ -361,8 +361,8 @@ void ResourceXMLRPC::listContactsFinished( const QValueList<QVariant> &mapList,
emit loadingFinished( this );
}
-void ResourceXMLRPC::addContactFinished( const QValueList<QVariant> &list,
- const QVariant &id )
+void ResourceXMLRPC::addContactFinished( const TQValueList<TQVariant> &list,
+ const TQVariant &id )
{
clearChange( id.toString() );
idMapper().setRemoteId( id.toString(), list[ 0 ].toString() );
@@ -370,16 +370,16 @@ void ResourceXMLRPC::addContactFinished( const QValueList<QVariant> &list,
saveCache();
}
-void ResourceXMLRPC::updateContactFinished( const QValueList<QVariant>&,
- const QVariant &id )
+void ResourceXMLRPC::updateContactFinished( const TQValueList<TQVariant>&,
+ const TQVariant &id )
{
clearChange( id.toString() );
saveCache();
}
-void ResourceXMLRPC::deleteContactFinished( const QValueList<QVariant>&,
- const QVariant &id )
+void ResourceXMLRPC::deleteContactFinished( const TQValueList<TQVariant>&,
+ const TQVariant &id )
{
clearChange( id.toString() );
idMapper().removeRemoteId( idMapper().remoteId( id.toString() ) );
@@ -387,38 +387,38 @@ void ResourceXMLRPC::deleteContactFinished( const QValueList<QVariant>&,
saveCache();
}
-void ResourceXMLRPC::fault( int error, const QString &errorMsg,
- const QVariant& )
+void ResourceXMLRPC::fault( int error, const TQString &errorMsg,
+ const TQVariant& )
{
- QString msg = i18n( "<qt>Server sent error %1: <b>%2</b></qt>" ).arg( error ).arg( errorMsg );
+ TQString msg = i18n( "<qt>Server sent error %1: <b>%2</b></qt>" ).arg( error ).arg( errorMsg );
if ( addressBook() )
addressBook()->error( msg );
mSynchronizer->stop();
}
-void ResourceXMLRPC::addContactFault( int, const QString &errorMsg,
- const QVariant &id )
+void ResourceXMLRPC::addContactFault( int, const TQString &errorMsg,
+ const TQVariant &id )
{
KABC::Addressee addr = mAddrMap[ id.toString() ];
mAddrMap.remove( addr.uid() );
- QString msg = i18n( "Unable to add contact %1 to server. (%2)" );
+ TQString msg = i18n( "Unable to add contact %1 to server. (%2)" );
addressBook()->error( msg.arg( addr.formattedName(), errorMsg ) );
}
-void ResourceXMLRPC::updateContactFault( int, const QString &errorMsg,
- const QVariant &id )
+void ResourceXMLRPC::updateContactFault( int, const TQString &errorMsg,
+ const TQVariant &id )
{
KABC::Addressee addr = mAddrMap[ id.toString() ];
- QString msg = i18n( "Unable to update contact %1 on server. (%2)" );
+ TQString msg = i18n( "Unable to update contact %1 on server. (%2)" );
addressBook()->error( msg.arg( addr.formattedName(), errorMsg ) );
}
-void ResourceXMLRPC::deleteContactFault( int, const QString &errorMsg,
- const QVariant &id )
+void ResourceXMLRPC::deleteContactFault( int, const TQString &errorMsg,
+ const TQVariant &id )
{
KABC::Addressee addr;
@@ -433,14 +433,14 @@ void ResourceXMLRPC::deleteContactFault( int, const QString &errorMsg,
mAddrMap.insert( addr.uid(), addr );
- QString msg = i18n( "Unable to delete contact %1 from server. (%2)" );
+ TQString msg = i18n( "Unable to delete contact %1 from server. (%2)" );
addressBook()->error( msg.arg( addr.formattedName(), errorMsg ) );
}
-QString ResourceXMLRPC::addrTypesToTypeStr( int typeMask )
+TQString ResourceXMLRPC::addrTypesToTypeStr( int typeMask )
{
- QStringList types;
- QMap<QString, int>::ConstIterator it;
+ TQStringList types;
+ TQMap<TQString, int>::ConstIterator it;
for ( it = mAddrTypes.begin(); it != mAddrTypes.end(); ++it )
if ( it.data() & typeMask )
types.append( it.key() );
@@ -448,7 +448,7 @@ QString ResourceXMLRPC::addrTypesToTypeStr( int typeMask )
return types.join( ";" );
}
-void ResourceXMLRPC::writeContact( const Addressee &addr, QMap<QString, QVariant> &args )
+void ResourceXMLRPC::writeContact( const Addressee &addr, TQMap<TQString, TQVariant> &args )
{
args.insert( "access", ( addr.secrecy().type() == Secrecy::Private ? "private" : "public" ) );
args.insert( "fn", addr.formattedName() );
@@ -470,17 +470,17 @@ void ResourceXMLRPC::writeContact( const Addressee &addr, QMap<QString, QVariant
args.insert( "title", addr.title() );
// CATEGORIES
- QStringList::ConstIterator catIt;
- const QStringList categories = addr.categories();
+ TQStringList::ConstIterator catIt;
+ const TQStringList categories = addr.categories();
- QMap<QString, QVariant> catMap;
+ TQMap<TQString, TQVariant> catMap;
int counter = 0;
for ( catIt = categories.begin(); catIt != categories.end(); ++catIt ) {
- QMap<QString, int>::ConstIterator it = mCategoryMap.find( *catIt );
+ TQMap<TQString, int>::ConstIterator it = mCategoryMap.find( *catIt );
if ( it == mCategoryMap.end() ) // new category
- catMap.insert( QString::number( counter-- ), *catIt );
+ catMap.insert( TQString::number( counter-- ), *catIt );
else
- catMap.insert( QString::number( it.data() ), *catIt );
+ catMap.insert( TQString::number( it.data() ), *catIt );
}
args.insert( "cat_id", catMap );
@@ -569,15 +569,15 @@ void ResourceXMLRPC::writeContact( const Addressee &addr, QMap<QString, QVariant
}
- const QStringList customFields = addr.customs();
- QStringList::ConstIterator it;
+ const TQStringList customFields = addr.customs();
+ TQStringList::ConstIterator it;
for ( it = customFields.begin(); it != customFields.end(); ++it ) {
int colon = (*it).find( ":" );
- QString identifier = (*it).left( colon );
+ TQString identifier = (*it).left( colon );
int dash = identifier.find( "-" );
- QString app = identifier.left( dash );
- QString name = identifier.mid( dash + 1 );
- QString value = (*it).mid( colon + 1 );
+ TQString app = identifier.left( dash );
+ TQString name = identifier.mid( dash + 1 );
+ TQString value = (*it).mid( colon + 1 );
if ( value.isEmpty() )
continue;
@@ -585,16 +585,16 @@ void ResourceXMLRPC::writeContact( const Addressee &addr, QMap<QString, QVariant
args.insert( name, value );
}
- QString url = KCal::FreeBusyUrlStore::self()->readUrl( addr.preferredEmail() );
+ TQString url = KCal::FreeBusyUrlStore::self()->readUrl( addr.preferredEmail() );
if ( !url.isEmpty() )
args.insert( "freebusy_url", url );
}
-void ResourceXMLRPC::readContact( const QMap<QString, QVariant> &args, Addressee &addr, QString &uid )
+void ResourceXMLRPC::readContact( const TQMap<TQString, TQVariant> &args, Addressee &addr, TQString &uid )
{
Address addrOne, addrTwo;
- QMap<QString, QVariant>::ConstIterator it;
+ TQMap<TQString, TQVariant>::ConstIterator it;
for ( it = args.begin(); it != args.end(); ++it ) {
if ( it.key() == "id" ) {
uid = it.data().toString();
@@ -647,7 +647,7 @@ void ResourceXMLRPC::readContact( const QMap<QString, QVariant> &args, Addressee
} else if ( it.key() == "adr_one_countryname" ) {
addrOne.setCountry( it.data().toString() );
} else if ( it.key() == "adr_one_type" ) {
- QStringList types = QStringList::split( ';', it.data().toString() );
+ TQStringList types = TQStringList::split( ';', it.data().toString() );
int type = Address::Work;
for ( uint i = 0; i < types.count(); ++i )
@@ -667,7 +667,7 @@ void ResourceXMLRPC::readContact( const QMap<QString, QVariant> &args, Addressee
} else if ( it.key() == "adr_two_countryname" ) {
addrTwo.setCountry( it.data().toString() );
} else if ( it.key() == "adr_two_type" ) {
- QStringList types = QStringList::split( ';', it.data().toString() );
+ TQStringList types = TQStringList::split( ';', it.data().toString() );
int type = Address::Home;
for ( uint i = 0; i < types.count(); ++i )
@@ -707,8 +707,8 @@ void ResourceXMLRPC::readContact( const QMap<QString, QVariant> &args, Addressee
addr.insertEmail( it.data().toString(), false );
} else if ( it.key() == "email_home_type" ) {
} else if ( it.key() == "cat_id" ) {
- const QMap<QString, QVariant> categories = it.data().toMap();
- QMap<QString, QVariant>::ConstIterator it;
+ const TQMap<TQString, TQVariant> categories = it.data().toMap();
+ TQMap<TQString, TQVariant>::ConstIterator it;
for ( it = categories.begin(); it != categories.end(); ++it )
addr.insertCategory( it.data().toString() );
@@ -717,7 +717,7 @@ void ResourceXMLRPC::readContact( const QMap<QString, QVariant> &args, Addressee
}
}
- QMap<QString, QString>::ConstIterator cfIt;
+ TQMap<TQString, TQString>::ConstIterator cfIt;
for ( cfIt = mCustomFieldsMap.begin(); cfIt != mCustomFieldsMap.end(); ++cfIt ) {
if ( args[ cfIt.key() ].toString().isEmpty() )
continue;
@@ -736,19 +736,19 @@ void ResourceXMLRPC::readContact( const QMap<QString, QVariant> &args, Addressee
addr.insertAddress( addrTwo );
}
-void ResourceXMLRPC::loadCategoriesFinished( const QValueList<QVariant> &mapList,
- const QVariant& )
+void ResourceXMLRPC::loadCategoriesFinished( const TQValueList<TQVariant> &mapList,
+ const TQVariant& )
{
mCategoryMap.clear();
- const QMap<QString, QVariant> map = mapList[ 0 ].toMap();
- QMap<QString, QVariant>::ConstIterator it;
+ const TQMap<TQString, TQVariant> map = mapList[ 0 ].toMap();
+ TQMap<TQString, TQVariant>::ConstIterator it;
KABPrefs *prefs = KABPrefs::instance();
for ( it = map.begin(); it != map.end(); ++it ) {
mCategoryMap.insert( it.data().toString(), it.key().toInt() );
- QStringList categories = prefs->customCategories();
+ TQStringList categories = prefs->customCategories();
if ( categories.find( it.data().toString() ) == categories.end() )
categories.append( it.data().toString() );
@@ -756,13 +756,13 @@ void ResourceXMLRPC::loadCategoriesFinished( const QValueList<QVariant> &mapList
}
}
-void ResourceXMLRPC::loadCustomFieldsFinished( const QValueList<QVariant> &mapList,
- const QVariant& )
+void ResourceXMLRPC::loadCustomFieldsFinished( const TQValueList<TQVariant> &mapList,
+ const TQVariant& )
{
mCustomFieldsMap.clear();
- const QMap<QString, QVariant> map = mapList[ 0 ].toMap();
- QMap<QString, QVariant>::ConstIterator it;
+ const TQMap<TQString, TQVariant> map = mapList[ 0 ].toMap();
+ TQMap<TQString, TQVariant>::ConstIterator it;
for ( it = map.begin(); it != map.end(); ++it )
mCustomFieldsMap.insert( it.key(), it.data().toString() );
diff --git a/kresources/egroupware/kabc_resourcexmlrpc.h b/kresources/egroupware/kabc_resourcexmlrpc.h
index 57bbd903a..0ce56a038 100644
--- a/kresources/egroupware/kabc_resourcexmlrpc.h
+++ b/kresources/egroupware/kabc_resourcexmlrpc.h
@@ -21,7 +21,7 @@
#ifndef KABC_RESOURCEXMLRPC_H
#define KABC_RESOURCEXMLRPC_H
-#include <qmap.h>
+#include <tqmap.h>
#include <kdepimmacros.h>
#include "libkdepim/kabcresourcecached.h"
@@ -43,8 +43,8 @@ class KDE_EXPORT ResourceXMLRPC : public ResourceCached
public:
ResourceXMLRPC( const KConfig* );
- ResourceXMLRPC( const QString &url, const QString &domain,
- const QString &user, const QString &password );
+ ResourceXMLRPC( const TQString &url, const TQString &domain,
+ const TQString &user, const TQString &password );
~ResourceXMLRPC();
virtual void writeConfig( KConfig* );
@@ -66,20 +66,20 @@ class KDE_EXPORT ResourceXMLRPC : public ResourceCached
void init();
protected slots:
- void loginFinished( const QValueList<QVariant>&, const QVariant& );
- void logoutFinished( const QValueList<QVariant>&, const QVariant& );
+ void loginFinished( const TQValueList<TQVariant>&, const TQVariant& );
+ void logoutFinished( const TQValueList<TQVariant>&, const TQVariant& );
- void listContactsFinished( const QValueList<QVariant>&, const QVariant& );
- void addContactFinished( const QValueList<QVariant>&, const QVariant& );
- void updateContactFinished( const QValueList<QVariant>&, const QVariant& );
- void deleteContactFinished( const QValueList<QVariant>&, const QVariant& );
- void loadCategoriesFinished( const QValueList<QVariant>&, const QVariant& );
- void loadCustomFieldsFinished( const QValueList<QVariant>&, const QVariant& );
+ void listContactsFinished( const TQValueList<TQVariant>&, const TQVariant& );
+ void addContactFinished( const TQValueList<TQVariant>&, const TQVariant& );
+ void updateContactFinished( const TQValueList<TQVariant>&, const TQVariant& );
+ void deleteContactFinished( const TQValueList<TQVariant>&, const TQVariant& );
+ void loadCategoriesFinished( const TQValueList<TQVariant>&, const TQVariant& );
+ void loadCustomFieldsFinished( const TQValueList<TQVariant>&, const TQVariant& );
- void fault( int, const QString&, const QVariant& );
- void addContactFault( int, const QString&, const QVariant& );
- void updateContactFault( int, const QString&, const QVariant& );
- void deleteContactFault( int, const QString&, const QVariant& );
+ void fault( int, const TQString&, const TQVariant& );
+ void addContactFault( int, const TQString&, const TQVariant& );
+ void updateContactFault( int, const TQString&, const TQVariant& );
+ void deleteContactFault( int, const TQString&, const TQVariant& );
void addContact( const KABC::Addressee& );
void updateContact( const KABC::Addressee& );
@@ -88,19 +88,19 @@ class KDE_EXPORT ResourceXMLRPC : public ResourceCached
private:
void initEGroupware();
- QString addrTypesToTypeStr( int );
+ TQString addrTypesToTypeStr( int );
- void writeContact( const Addressee&, QMap<QString, QVariant>& );
- void readContact( const QMap<QString, QVariant>&, Addressee &addr, QString& );
+ void writeContact( const Addressee&, TQMap<TQString, TQVariant>& );
+ void readContact( const TQMap<TQString, TQVariant>&, Addressee &addr, TQString& );
EGroupwarePrefs *mPrefs;
- QString mSessionID;
- QString mKp3;
+ TQString mSessionID;
+ TQString mKp3;
- QMap<QString, int> mCategoryMap;
- QMap<QString, int> mAddrTypes;
- QMap<QString, QString> mCustomFieldsMap;
+ TQMap<TQString, int> mCategoryMap;
+ TQMap<TQString, int> mAddrTypes;
+ TQMap<TQString, TQString> mCustomFieldsMap;
KXMLRPC::Server *mServer;
Synchronizer *mSynchronizer;
diff --git a/kresources/egroupware/kabc_resourcexmlrpcconfig.cpp b/kresources/egroupware/kabc_resourcexmlrpcconfig.cpp
index cd2075c71..02a2f1ad3 100644
--- a/kresources/egroupware/kabc_resourcexmlrpcconfig.cpp
+++ b/kresources/egroupware/kabc_resourcexmlrpcconfig.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 <kdialog.h>
@@ -33,32 +33,32 @@
using namespace KABC;
-ResourceXMLRPCConfig::ResourceXMLRPCConfig( QWidget* parent, const char* name )
+ResourceXMLRPCConfig::ResourceXMLRPCConfig( TQWidget* parent, const char* name )
: KRES::ConfigWidget( parent, name )
{
- QGridLayout *mainLayout = new QGridLayout( this, 4, 2, 0, KDialog::spacingHint() );
+ TQGridLayout *mainLayout = new TQGridLayout( this, 4, 2, 0, KDialog::spacingHint() );
- QLabel *label = new QLabel( i18n( "URL:" ), this );
+ TQLabel *label = new TQLabel( i18n( "URL:" ), this );
mURL = new KURLRequester( this );
mainLayout->addWidget( label, 0, 0 );
mainLayout->addWidget( mURL, 0, 1 );
- label = new QLabel( i18n( "Domain:" ), this );
+ label = new TQLabel( i18n( "Domain:" ), this );
mDomain = new KLineEdit( this );
mainLayout->addWidget( label, 1, 0 );
mainLayout->addWidget( mDomain, 1, 1 );
- label = new QLabel( i18n( "User:" ), this );
+ label = new TQLabel( i18n( "User:" ), this );
mUser = new KLineEdit( this );
mainLayout->addWidget( label, 2, 0 );
mainLayout->addWidget( mUser, 2, 1 );
- label = new QLabel( i18n( "Password:" ), this );
+ label = new TQLabel( i18n( "Password:" ), this );
mPassword = new KLineEdit( this );
- mPassword->setEchoMode( QLineEdit::Password );
+ mPassword->setEchoMode( TQLineEdit::Password );
mainLayout->addWidget( label, 3, 0 );
mainLayout->addWidget( mPassword, 3, 1 );
diff --git a/kresources/egroupware/kabc_resourcexmlrpcconfig.h b/kresources/egroupware/kabc_resourcexmlrpcconfig.h
index 6e0ddfdb8..f73b2e0aa 100644
--- a/kresources/egroupware/kabc_resourcexmlrpcconfig.h
+++ b/kresources/egroupware/kabc_resourcexmlrpcconfig.h
@@ -34,7 +34,7 @@ class KDE_EXPORT ResourceXMLRPCConfig : public KRES::ConfigWidget
Q_OBJECT
public:
- ResourceXMLRPCConfig( QWidget* parent = 0, const char* name = 0 );
+ ResourceXMLRPCConfig( TQWidget* parent = 0, const char* name = 0 );
public slots:
void loadSettings( KRES::Resource* );
diff --git a/kresources/egroupware/kcal_resourcexmlrpc.cpp b/kresources/egroupware/kcal_resourcexmlrpc.cpp
index af4f019c1..bb92b2d5f 100644
--- a/kresources/egroupware/kcal_resourcexmlrpc.cpp
+++ b/kresources/egroupware/kcal_resourcexmlrpc.cpp
@@ -22,11 +22,11 @@
#include <stdlib.h>
#include <typeinfo>
-#include <qapplication.h>
-#include <qdatetime.h>
-#include <qptrlist.h>
-#include <qstringlist.h>
-#include <qtimer.h>
+#include <tqapplication.h>
+#include <tqdatetime.h>
+#include <tqptrlist.h>
+#include <tqstringlist.h>
+#include <tqtimer.h>
#include <kabc/locknull.h>
#include <kdebug.h>
@@ -83,19 +83,19 @@ typedef KRES::PluginFactory<ResourceXMLRPC, ResourceXMLRPCConfig> XMLRPCFactory;
K_EXPORT_COMPONENT_FACTORY( kcal_xmlrpc, XMLRPCFactory )
-static const QString SearchEventsCommand = "calendar.bocalendar.search";
-static const QString AddEventCommand = "calendar.bocalendar.write";
-static const QString DeleteEventCommand = "calendar.bocalendar.delete";
-static const QString LoadEventCategoriesCommand = "calendar.bocalendar.categories";
+static const TQString SearchEventsCommand = "calendar.bocalendar.search";
+static const TQString AddEventCommand = "calendar.bocalendar.write";
+static const TQString DeleteEventCommand = "calendar.bocalendar.delete";
+static const TQString LoadEventCategoriesCommand = "calendar.bocalendar.categories";
-static const QString SearchTodosCommand = "infolog.boinfolog.search";
-static const QString AddTodoCommand = "infolog.boinfolog.write";
-static const QString DeleteTodoCommand = "infolog.boinfolog.delete";
-static const QString LoadTodoCategoriesCommand = "infolog.boinfolog.categories";
+static const TQString SearchTodosCommand = "infolog.boinfolog.search";
+static const TQString AddTodoCommand = "infolog.boinfolog.write";
+static const TQString DeleteTodoCommand = "infolog.boinfolog.delete";
+static const TQString LoadTodoCategoriesCommand = "infolog.boinfolog.categories";
static void setRights( Incidence *incidence, int rights )
{
- incidence->setCustomProperty( "EGWRESOURCE", "RIGHTS", QString::number( rights ) );
+ incidence->setCustomProperty( "EGWRESOURCE", "RIGHTS", TQString::number( rights ) );
}
static int rights( Incidence *incidence )
@@ -188,14 +188,14 @@ bool ResourceXMLRPC::doOpen()
mServer->setUrl( KURL( mPrefs->url() ) );
mServer->setUserAgent( "KDE-Calendar" );
- QMap<QString, QVariant> args;
+ TQMap<TQString, TQVariant> args;
args.insert( "domain", mPrefs->domain() );
args.insert( "username", mPrefs->user() );
args.insert( "password", mPrefs->password() );
- mServer->call( "system.login", QVariant( args ),
- this, SLOT( loginFinished( const QValueList<QVariant>&, const QVariant& ) ),
- this, SLOT( fault( int, const QString&, const QVariant& ) ) );
+ mServer->call( "system.login", TQVariant( args ),
+ this, TQT_SLOT( loginFinished( const TQValueList<TQVariant>&, const TQVariant& ) ),
+ this, TQT_SLOT( fault( int, const TQString&, const TQVariant& ) ) );
mSynchronizer->start();
@@ -206,13 +206,13 @@ void ResourceXMLRPC::doClose()
{
kdDebug(5800) << "ResourceXMLRPC::doClose()" << endl;
- QMap<QString, QVariant> args;
+ TQMap<TQString, TQVariant> args;
args.insert( "sessionid", mSessionID );
args.insert( "kp3", mKp3 );
- mServer->call( "system.logout", QVariant( args ),
- this, SLOT( logoutFinished( const QValueList<QVariant>&, const QVariant& ) ),
- this, SLOT( fault( int, const QString&, const QVariant& ) ) );
+ mServer->call( "system.logout", TQVariant( args ),
+ this, TQT_SLOT( logoutFinished( const TQValueList<TQVariant>&, const TQVariant& ) ),
+ this, TQT_SLOT( fault( int, const TQString&, const TQVariant& ) ) );
mSynchronizer->start();
}
@@ -235,13 +235,13 @@ bool ResourceXMLRPC::doLoad()
mTodoStateMapper.setIdentifier( type() + "_" + identifier() );
mTodoStateMapper.load();
- QMap<QString, QVariant> args, columns;
- args.insert( "start", QDateTime( QDate::currentDate().addDays( -12 ) ) );
- args.insert( "end", QDateTime( QDate::currentDate().addDays( 2000 ) ) );
+ TQMap<TQString, TQVariant> args, columns;
+ args.insert( "start", TQDateTime( TQDate::currentDate().addDays( -12 ) ) );
+ args.insert( "end", TQDateTime( TQDate::currentDate().addDays( 2000 ) ) );
mServer->call( SearchEventsCommand, args,
- this, SLOT( listEventsFinished( const QValueList<QVariant>&, const QVariant& ) ),
- this, SLOT( fault( int, const QString&, const QVariant& ) ) );
+ this, TQT_SLOT( listEventsFinished( const TQValueList<TQVariant>&, const TQVariant& ) ),
+ this, TQT_SLOT( fault( int, const TQString&, const TQVariant& ) ) );
args.clear();
columns.insert( "type", "task" );
@@ -250,16 +250,16 @@ bool ResourceXMLRPC::doLoad()
args.insert( "order", "id_parent" );
mServer->call( SearchTodosCommand, args,
- this, SLOT( listTodosFinished( const QValueList<QVariant>&, const QVariant& ) ),
- this, SLOT( fault( int, const QString&, const QVariant& ) ) );
+ this, TQT_SLOT( listTodosFinished( const TQValueList<TQVariant>&, const TQVariant& ) ),
+ this, TQT_SLOT( fault( int, const TQString&, const TQVariant& ) ) );
- mServer->call( LoadEventCategoriesCommand, QVariant( QMap<QString, QVariant>() ),
- this, SLOT( loadEventCategoriesFinished( const QValueList<QVariant>&, const QVariant& ) ),
- this, SLOT( fault( int, const QString&, const QVariant& ) ) );
+ mServer->call( LoadEventCategoriesCommand, TQVariant( TQMap<TQString, TQVariant>() ),
+ this, TQT_SLOT( loadEventCategoriesFinished( const TQValueList<TQVariant>&, const TQVariant& ) ),
+ this, TQT_SLOT( fault( int, const TQString&, const TQVariant& ) ) );
- mServer->call( LoadTodoCategoriesCommand, QVariant( false, 0 ),
- this, SLOT( loadTodoCategoriesFinished( const QValueList<QVariant>&, const QVariant& ) ),
- this, SLOT( fault( int, const QString&, const QVariant& ) ) );
+ mServer->call( LoadTodoCategoriesCommand, TQVariant( false, 0 ),
+ this, TQT_SLOT( loadTodoCategoriesFinished( const TQValueList<TQVariant>&, const TQVariant& ) ),
+ this, TQT_SLOT( fault( int, const TQString&, const TQVariant& ) ) );
return true;
}
@@ -278,13 +278,13 @@ bool ResourceXMLRPC::doSave()
uint counter = 0;
for ( evIt = events.begin(); evIt != events.end(); ++evIt ) {
if ( !(*evIt)->isReadOnly() ) {
- QMap<QString, QVariant> args;
+ TQMap<TQString, TQVariant> args;
writeEvent( (*evIt), args );
args.insert( "id", idMapper().remoteId( (*evIt)->uid() ).toInt() );
- mServer->call( AddEventCommand, QVariant( args ),
- this, SLOT( updateEventFinished( const QValueList<QVariant>&, const QVariant& ) ),
- this, SLOT( fault( int, const QString&, const QVariant& ) ) );
+ mServer->call( AddEventCommand, TQVariant( args ),
+ this, TQT_SLOT( updateEventFinished( const TQValueList<TQVariant>&, const TQVariant& ) ),
+ this, TQT_SLOT( fault( int, const TQString&, const TQVariant& ) ) );
counter++;
}
}
@@ -294,13 +294,13 @@ bool ResourceXMLRPC::doSave()
for ( todoIt = todos.begin(); todoIt != todos.end(); ++todoIt ) {
if ( !(*todoIt)->isReadOnly() ) {
- QMap<QString, QVariant> args;
+ TQMap<TQString, TQVariant> args;
writeTodo( (*todoIt), args );
args.insert( "id", idMapper().remoteId( (*todoIt)->uid() ).toInt() );
- mServer->call( AddTodoCommand, QVariant( args ),
- this, SLOT( updateTodoFinished( const QValueList<QVariant>&, const QVariant& ) ),
- this, SLOT( fault( int, const QString&, const QVariant& ) ) );
+ mServer->call( AddTodoCommand, TQVariant( args ),
+ this, TQT_SLOT( updateTodoFinished( const TQValueList<TQVariant>&, const TQVariant& ) ),
+ this, TQT_SLOT( fault( int, const TQString&, const TQVariant& ) ) );
counter++;
}
}
@@ -326,7 +326,7 @@ KABC::Lock *ResourceXMLRPC::lock()
bool ResourceXMLRPC::addEvent( Event* ev )
{
- QMap<QString, QVariant> args;
+ TQMap<TQString, TQVariant> args;
disableChangeNotification();
@@ -336,9 +336,9 @@ bool ResourceXMLRPC::addEvent( Event* ev )
if ( !oldEvent->isReadOnly() ) {
writeEvent( ev, args );
args.insert( "id", idMapper().remoteId( ev->uid() ).toInt() );
- mServer->call( AddEventCommand, QVariant( args ),
- this, SLOT( updateEventFinished( const QValueList<QVariant>&, const QVariant& ) ),
- this, SLOT( fault( int, const QString&, const QVariant& ) ) );
+ mServer->call( AddEventCommand, TQVariant( args ),
+ this, TQT_SLOT( updateEventFinished( const TQValueList<TQVariant>&, const TQVariant& ) ),
+ this, TQT_SLOT( fault( int, const TQString&, const TQVariant& ) ) );
mCalendar.deleteIncidence( oldEvent );
mCalendar.addIncidence( ev );
@@ -346,10 +346,10 @@ bool ResourceXMLRPC::addEvent( Event* ev )
}
} else { // new event
writeEvent( ev, args );
- mServer->call( AddEventCommand, QVariant( args ),
- this, SLOT( addEventFinished( const QValueList<QVariant>&, const QVariant& ) ),
- this, SLOT( fault( int, const QString&, const QVariant& ) ),
- QVariant( ev->uid() ) );
+ mServer->call( AddEventCommand, TQVariant( args ),
+ this, TQT_SLOT( addEventFinished( const TQValueList<TQVariant>&, const TQVariant& ) ),
+ this, TQT_SLOT( fault( int, const TQString&, const TQVariant& ) ),
+ TQVariant( ev->uid() ) );
mCalendar.addEvent( ev );
saveCache();
@@ -366,20 +366,20 @@ bool ResourceXMLRPC::deleteEvent( Event* ev )
return false;
mServer->call( DeleteEventCommand, idMapper().remoteId( ev->uid() ).toInt(),
- this, SLOT( deleteEventFinished( const QValueList<QVariant>&,
- const QVariant& ) ),
- this, SLOT( fault( int, const QString&, const QVariant& ) ),
- QVariant( ev->uid() ) );
+ this, TQT_SLOT( deleteEventFinished( const TQValueList<TQVariant>&,
+ const TQVariant& ) ),
+ this, TQT_SLOT( fault( int, const TQString&, const TQVariant& ) ),
+ TQVariant( ev->uid() ) );
return true;
}
-Event *ResourceXMLRPC::event( const QString& uid )
+Event *ResourceXMLRPC::event( const TQString& uid )
{
return mCalendar.event( uid );
}
-Event::List ResourceXMLRPC::rawEventsForDate( const QDate& qd,
+Event::List ResourceXMLRPC::rawEventsForDate( const TQDate& qd,
EventSortField sortField,
SortDirection sortDirection )
{
@@ -387,13 +387,13 @@ Event::List ResourceXMLRPC::rawEventsForDate( const QDate& qd,
}
-Event::List ResourceXMLRPC::rawEvents( const QDate& start, const QDate& end,
+Event::List ResourceXMLRPC::rawEvents( const TQDate& start, const TQDate& end,
bool inclusive )
{
return mCalendar.rawEvents( start, end, inclusive );
}
-Event::List ResourceXMLRPC::rawEventsForDate( const QDateTime& qdt )
+Event::List ResourceXMLRPC::rawEventsForDate( const TQDateTime& qdt )
{
return mCalendar.rawEventsForDate( qdt.date() );
}
@@ -406,7 +406,7 @@ Event::List ResourceXMLRPC::rawEvents()
bool ResourceXMLRPC::addTodo( Todo *todo )
{
- QMap<QString, QVariant> args;
+ TQMap<TQString, TQVariant> args;
disableChangeNotification();
@@ -416,9 +416,9 @@ bool ResourceXMLRPC::addTodo( Todo *todo )
if ( !oldTodo->isReadOnly() ) {
writeTodo( todo, args );
args.insert( "id", idMapper().remoteId( todo->uid() ).toInt() );
- mServer->call( AddTodoCommand, QVariant( args ),
- this, SLOT( updateTodoFinished( const QValueList<QVariant>&, const QVariant& ) ),
- this, SLOT( fault( int, const QString&, const QVariant& ) ) );
+ mServer->call( AddTodoCommand, TQVariant( args ),
+ this, TQT_SLOT( updateTodoFinished( const TQValueList<TQVariant>&, const TQVariant& ) ),
+ this, TQT_SLOT( fault( int, const TQString&, const TQVariant& ) ) );
mCalendar.deleteIncidence( oldTodo );
mCalendar.addIncidence( todo );
@@ -426,10 +426,10 @@ bool ResourceXMLRPC::addTodo( Todo *todo )
}
} else { // new todo
writeTodo( todo, args );
- mServer->call( AddTodoCommand, QVariant( args ),
- this, SLOT( addTodoFinished( const QValueList<QVariant>&, const QVariant& ) ),
- this, SLOT( fault( int, const QString&, const QVariant& ) ),
- QVariant( todo->uid() ) );
+ mServer->call( AddTodoCommand, TQVariant( args ),
+ this, TQT_SLOT( addTodoFinished( const TQValueList<TQVariant>&, const TQVariant& ) ),
+ this, TQT_SLOT( fault( int, const TQString&, const TQVariant& ) ),
+ TQVariant( todo->uid() ) );
mCalendar.addTodo( todo );
saveCache();
@@ -446,10 +446,10 @@ bool ResourceXMLRPC::deleteTodo( Todo *todo )
return false;
mServer->call( DeleteTodoCommand, idMapper().remoteId( todo->uid() ).toInt(),
- this, SLOT( deleteTodoFinished( const QValueList<QVariant>&,
- const QVariant& ) ),
- this, SLOT( fault( int, const QString&, const QVariant& ) ),
- QVariant( todo->uid() ) );
+ this, TQT_SLOT( deleteTodoFinished( const TQValueList<TQVariant>&,
+ const TQVariant& ) ),
+ this, TQT_SLOT( fault( int, const TQString&, const TQVariant& ) ),
+ TQVariant( todo->uid() ) );
return true;
}
@@ -458,12 +458,12 @@ Todo::List ResourceXMLRPC::rawTodos()
return mCalendar.rawTodos();
}
-Todo *ResourceXMLRPC::todo( const QString& uid )
+Todo *ResourceXMLRPC::todo( const TQString& uid )
{
return mCalendar.todo( uid );
}
-Todo::List ResourceXMLRPC::rawTodosForDate( const QDate& date )
+Todo::List ResourceXMLRPC::rawTodosForDate( const TQDate& date )
{
return mCalendar.rawTodosForDate( date );
}
@@ -478,23 +478,23 @@ bool ResourceXMLRPC::deleteJournal( Journal* journal )
return mCalendar.deleteJournal( journal );
}
-Journal::List ResourceXMLRPC::journals( const QDate& date )
+Journal::List ResourceXMLRPC::journals( const TQDate& date )
{
return mCalendar.journals( date );
}
-Journal *ResourceXMLRPC::journal( const QString& uid )
+Journal *ResourceXMLRPC::journal( const TQString& uid )
{
return mCalendar.journal( uid );
}
-Alarm::List ResourceXMLRPC::alarmsTo( const QDateTime& to )
+Alarm::List ResourceXMLRPC::alarmsTo( const TQDateTime& to )
{
return mCalendar.alarmsTo( to );
}
-Alarm::List ResourceXMLRPC::alarms( const QDateTime& from, const QDateTime& to )
+Alarm::List ResourceXMLRPC::alarms( const TQDateTime& from, const TQDateTime& to )
{
return mCalendar.alarms( from, to );
}
@@ -510,10 +510,10 @@ void ResourceXMLRPC::reload()
}
-void ResourceXMLRPC::loginFinished( const QValueList<QVariant>& variant,
- const QVariant& )
+void ResourceXMLRPC::loginFinished( const TQValueList<TQVariant>& variant,
+ const TQVariant& )
{
- QMap<QString, QVariant> map = variant[ 0 ].toMap();
+ TQMap<TQString, TQVariant> map = variant[ 0 ].toMap();
KURL url = KURL( mPrefs->url() );
if ( map[ "GOAWAY" ].toString() == "XOXO" ) { // failed
@@ -530,10 +530,10 @@ void ResourceXMLRPC::loginFinished( const QValueList<QVariant>& variant,
mSynchronizer->stop();
}
-void ResourceXMLRPC::logoutFinished( const QValueList<QVariant>& variant,
- const QVariant& )
+void ResourceXMLRPC::logoutFinished( const TQValueList<TQVariant>& variant,
+ const TQVariant& )
{
- QMap<QString, QVariant> map = variant[ 0 ].toMap();
+ TQMap<TQString, TQVariant> map = variant[ 0 ].toMap();
if ( map[ "GOODBYE" ].toString() != "XOXO" )
kdError() << "logout failed" << endl;
@@ -547,11 +547,11 @@ void ResourceXMLRPC::logoutFinished( const QValueList<QVariant>& variant,
mSynchronizer->stop();
}
-void ResourceXMLRPC::listEventsFinished( const QValueList<QVariant>& list,
- const QVariant& )
+void ResourceXMLRPC::listEventsFinished( const TQValueList<TQVariant>& list,
+ const TQVariant& )
{
- const QValueList<QVariant> eventList = list[ 0 ].toList();
- QValueList<QVariant>::ConstIterator eventIt;
+ const TQValueList<TQVariant> eventList = list[ 0 ].toList();
+ TQValueList<TQVariant>::ConstIterator eventIt;
disableChangeNotification();
@@ -559,17 +559,17 @@ void ResourceXMLRPC::listEventsFinished( const QValueList<QVariant>& list,
bool changed = false;
for ( eventIt = eventList.begin(); eventIt != eventList.end(); ++eventIt ) {
- QMap<QString, QVariant> map = (*eventIt).toMap();
+ TQMap<TQString, TQVariant> map = (*eventIt).toMap();
Event *event = new Event;
event->setFloats( false );
- QString uid;
+ TQString uid;
readEvent( map, event, uid );
// do we already have this event?
Event *oldEvent = 0;
- QString localUid = idMapper().localId( uid );
+ TQString localUid = idMapper().localId( uid );
if ( !localUid.isEmpty() )
oldEvent = mCalendar.event( localUid );
@@ -608,8 +608,8 @@ void ResourceXMLRPC::listEventsFinished( const QValueList<QVariant>& list,
checkLoadingFinished();
}
-void ResourceXMLRPC::deleteEventFinished( const QValueList<QVariant>&,
- const QVariant& id )
+void ResourceXMLRPC::deleteEventFinished( const TQValueList<TQVariant>&,
+ const TQVariant& id )
{
idMapper().removeRemoteId( idMapper().remoteId( id.toString() ) );
@@ -623,26 +623,26 @@ void ResourceXMLRPC::deleteEventFinished( const QValueList<QVariant>&,
emit resourceChanged( this );
}
-void ResourceXMLRPC::updateEventFinished( const QValueList<QVariant>&,
- const QVariant& )
+void ResourceXMLRPC::updateEventFinished( const TQValueList<TQVariant>&,
+ const TQVariant& )
{
mSynchronizer->stop();
}
-void ResourceXMLRPC::addEventFinished( const QValueList<QVariant>& list,
- const QVariant& id )
+void ResourceXMLRPC::addEventFinished( const TQValueList<TQVariant>& list,
+ const TQVariant& id )
{
idMapper().setRemoteId( id.toString(), list[ 0 ].toString() );
emit resourceChanged( this );
}
-void ResourceXMLRPC::loadEventCategoriesFinished( const QValueList<QVariant> &mapList, const QVariant& )
+void ResourceXMLRPC::loadEventCategoriesFinished( const TQValueList<TQVariant> &mapList, const TQVariant& )
{
mEventCategoryMap.clear();
- const QMap<QString, QVariant> map = mapList[ 0 ].toMap();
- QMap<QString, QVariant>::ConstIterator it;
+ const TQMap<TQString, TQVariant> map = mapList[ 0 ].toMap();
+ TQMap<TQString, TQVariant>::ConstIterator it;
KPimPrefs prefs( "korganizerrc" );
for ( it = map.begin(); it != map.end(); ++it ) {
@@ -658,11 +658,11 @@ void ResourceXMLRPC::loadEventCategoriesFinished( const QValueList<QVariant> &ma
checkLoadingFinished();
}
-void ResourceXMLRPC::listTodosFinished( const QValueList<QVariant>& list,
- const QVariant& )
+void ResourceXMLRPC::listTodosFinished( const TQValueList<TQVariant>& list,
+ const TQVariant& )
{
- const QValueList<QVariant> todoList = list[ 0 ].toList();
- QValueList<QVariant>::ConstIterator todoIt;
+ const TQValueList<TQVariant> todoList = list[ 0 ].toList();
+ TQValueList<TQVariant>::ConstIterator todoIt;
disableChangeNotification();
@@ -670,16 +670,16 @@ void ResourceXMLRPC::listTodosFinished( const QValueList<QVariant>& list,
bool changed = false;
for ( todoIt = todoList.begin(); todoIt != todoList.end(); ++todoIt ) {
- QMap<QString, QVariant> map = (*todoIt).toMap();
+ TQMap<TQString, TQVariant> map = (*todoIt).toMap();
Todo *todo = new Todo;
- QString uid;
+ TQString uid;
readTodo( map, todo, uid );
// do we already have this todo?
Todo *oldTodo = 0;
- QString localUid = idMapper().localId( uid );
+ TQString localUid = idMapper().localId( uid );
if ( !localUid.isEmpty() )
oldTodo = mCalendar.todo( localUid );
@@ -713,8 +713,8 @@ void ResourceXMLRPC::listTodosFinished( const QValueList<QVariant>& list,
checkLoadingFinished();
}
-void ResourceXMLRPC::deleteTodoFinished( const QValueList<QVariant>&,
- const QVariant& id )
+void ResourceXMLRPC::deleteTodoFinished( const TQValueList<TQVariant>&,
+ const TQVariant& id )
{
idMapper().removeRemoteId( idMapper().remoteId( id.toString() ) );
mTodoStateMapper.remove( idMapper().remoteId( id.toString() ) );
@@ -728,26 +728,26 @@ void ResourceXMLRPC::deleteTodoFinished( const QValueList<QVariant>&,
emit resourceChanged( this );
}
-void ResourceXMLRPC::addTodoFinished( const QValueList<QVariant>& list,
- const QVariant& id )
+void ResourceXMLRPC::addTodoFinished( const TQValueList<TQVariant>& list,
+ const TQVariant& id )
{
idMapper().setRemoteId( id.toString(), list[ 0 ].toString() );
emit resourceChanged( this );
}
-void ResourceXMLRPC::updateTodoFinished( const QValueList<QVariant>&,
- const QVariant& )
+void ResourceXMLRPC::updateTodoFinished( const TQValueList<TQVariant>&,
+ const TQVariant& )
{
mSynchronizer->stop();
}
-void ResourceXMLRPC::loadTodoCategoriesFinished( const QValueList<QVariant> &mapList, const QVariant& )
+void ResourceXMLRPC::loadTodoCategoriesFinished( const TQValueList<TQVariant> &mapList, const TQVariant& )
{
mTodoCategoryMap.clear();
- const QMap<QString, QVariant> map = mapList[ 0 ].toMap();
- QMap<QString, QVariant>::ConstIterator it;
+ const TQMap<TQString, TQVariant> map = mapList[ 0 ].toMap();
+ TQMap<TQString, TQVariant>::ConstIterator it;
KPimPrefs prefs( "korganizerrc" );
for ( it = map.begin(); it != map.end(); ++it ) {
@@ -763,25 +763,25 @@ void ResourceXMLRPC::loadTodoCategoriesFinished( const QValueList<QVariant> &map
checkLoadingFinished();
}
-void ResourceXMLRPC::fault( int error, const QString& errorMsg,
- const QVariant& )
+void ResourceXMLRPC::fault( int error, const TQString& errorMsg,
+ const TQVariant& )
{
kdError() << "Server send error " << error << ": " << errorMsg << endl;
mSynchronizer->stop();
}
-void ResourceXMLRPC::readEvent( const QMap<QString, QVariant> &args, Event *event,
- QString &uid )
+void ResourceXMLRPC::readEvent( const TQMap<TQString, TQVariant> &args, Event *event,
+ TQString &uid )
{
// for recurrence
int rType = CAL_RECUR_NONE;
int rInterval = 1;
int rData = 0;
int rights = 0;
- QDateTime rEndDate;
- QValueList<QDateTime> rExceptions;
+ TQDateTime rEndDate;
+ TQValueList<TQDateTime> rExceptions;
- QMap<QString, QVariant>::ConstIterator it;
+ TQMap<TQString, TQVariant>::ConstIterator it;
for ( it = args.begin(); it != args.end(); ++it ) {
if ( it.key() == "id" ) {
uid = it.data().toString();
@@ -790,8 +790,8 @@ void ResourceXMLRPC::readEvent( const QMap<QString, QVariant> &args, Event *even
} else if ( it.key() == "start" ) {
event->setDtStart( it.data().toDateTime() );
} else if ( it.key() == "end" ) {
- QDateTime start = args[ "start" ].toDateTime();
- QDateTime end = it.data().toDateTime();
+ TQDateTime start = args[ "start" ].toDateTime();
+ TQDateTime end = it.data().toDateTime();
if ( start.time() == end.time() &&
start.time().hour() == 0 && start.time().minute() == 0 &&
start.time().second() == 0 ) {
@@ -813,10 +813,10 @@ void ResourceXMLRPC::readEvent( const QMap<QString, QVariant> &args, Event *even
event->setSecrecy( (it.data().toString() == "public" ?
Incidence::SecrecyPublic : Incidence::SecrecyPrivate) );
} else if ( it.key() == "category" ) {
- const QMap<QString, QVariant> categories = it.data().toMap();
- QMap<QString, QVariant>::ConstIterator catIt;
+ const TQMap<TQString, TQVariant> categories = it.data().toMap();
+ TQMap<TQString, TQVariant>::ConstIterator catIt;
- QStringList eventCategories;
+ TQStringList eventCategories;
for ( catIt = categories.begin(); catIt != categories.end(); ++catIt ) {
mEventCategoryMap.insert( catIt.data().toString(), catIt.key().toInt() );
eventCategories.append( catIt.data().toString() );
@@ -847,17 +847,17 @@ void ResourceXMLRPC::readEvent( const QMap<QString, QVariant> &args, Event *even
} else if ( it.key() == "recur_data" ) {
rData = it.data().toInt();
} else if ( it.key() == "recur_exception" ) {
- const QMap<QString, QVariant> dateList = it.data().toMap();
- QMap<QString, QVariant>::ConstIterator dateIt;
+ const TQMap<TQString, TQVariant> dateList = it.data().toMap();
+ TQMap<TQString, TQVariant>::ConstIterator dateIt;
for ( dateIt = dateList.begin(); dateIt != dateList.end(); ++dateIt )
rExceptions.append( (*dateIt).toDateTime() );
} else if ( it.key() == "participants" ) {
- const QMap<QString, QVariant> persons = it.data().toMap();
- QMap<QString, QVariant>::ConstIterator personsIt;
+ const TQMap<TQString, TQVariant> persons = it.data().toMap();
+ TQMap<TQString, TQVariant>::ConstIterator personsIt;
for ( personsIt = persons.begin(); personsIt != persons.end(); ++personsIt ) {
- QMap<QString, QVariant> person = (*personsIt).toMap();
+ TQMap<TQString, TQVariant> person = (*personsIt).toMap();
Attendee::PartStat status = Attendee::InProcess;
if ( person[ "status" ] == "A" )
status = Attendee::Accepted;
@@ -875,11 +875,11 @@ void ResourceXMLRPC::readEvent( const QMap<QString, QVariant> &args, Event *even
event->addAttendee( attendee );
}
} else if ( it.key() == "alarm" ) {
- const QMap<QString, QVariant> alarmList = it.data().toMap();
- QMap<QString, QVariant>::ConstIterator alarmIt;
+ const TQMap<TQString, TQVariant> alarmList = it.data().toMap();
+ TQMap<TQString, TQVariant>::ConstIterator alarmIt;
for ( alarmIt = alarmList.begin(); alarmIt != alarmList.end(); ++alarmIt ) {
- QMap<QString, QVariant> alarm = (*alarmIt).toMap();
+ TQMap<TQString, TQVariant> alarm = (*alarmIt).toMap();
Alarm *vAlarm = event->newAlarm();
vAlarm->setText( event->summary() );
@@ -903,7 +903,7 @@ void ResourceXMLRPC::readEvent( const QMap<QString, QVariant> &args, Event *even
re->setDaily( rInterval );
break;
case CAL_RECUR_WEEKLY: {
- QBitArray weekMask( 7 );
+ TQBitArray weekMask( 7 );
weekMask.setBit( 0, rData & CAL_MONDAY );
weekMask.setBit( 1, rData & CAL_TUESDAY );
weekMask.setBit( 2, rData & CAL_WEDNESDAY );
@@ -928,7 +928,7 @@ void ResourceXMLRPC::readEvent( const QMap<QString, QVariant> &args, Event *even
if ( rEndDate.date().isValid() )
re->setEndDate( rEndDate.date() );
- QValueList<QDateTime>::ConstIterator exIt;
+ TQValueList<TQDateTime>::ConstIterator exIt;
for ( exIt = rExceptions.begin(); exIt != rExceptions.end(); ++exIt )
re->addExDateTime( *exIt );
}
@@ -937,7 +937,7 @@ void ResourceXMLRPC::readEvent( const QMap<QString, QVariant> &args, Event *even
setRights( event, rights );
}
-void ResourceXMLRPC::writeEvent( Event *event, QMap<QString, QVariant> &args )
+void ResourceXMLRPC::writeEvent( Event *event, TQMap<TQString, TQVariant> &args )
{
args.insert( "start", event->dtStart() );
@@ -956,16 +956,16 @@ void ResourceXMLRPC::writeEvent( Event *event, QMap<QString, QVariant> &args )
args.insert( "access", (event->secrecy() == Incidence::SecrecyPublic ? "public" : "private") );
// CATEGORY
- const QStringList categories = event->categories();
- QStringList::ConstIterator catIt;
- QMap<QString, QVariant> catMap;
+ const TQStringList categories = event->categories();
+ TQStringList::ConstIterator catIt;
+ TQMap<TQString, TQVariant> catMap;
int counter = 0;
for ( catIt = categories.begin(); catIt != categories.end(); ++catIt ) {
- QMap<QString, int>::Iterator it = mEventCategoryMap.find( *catIt );
+ TQMap<TQString, int>::Iterator it = mEventCategoryMap.find( *catIt );
if ( it == mEventCategoryMap.end() ) // new category
- catMap.insert( QString::number( counter-- ), *catIt );
+ catMap.insert( TQString::number( counter-- ), *catIt );
else
- catMap.insert( QString::number( it.data() ), *catIt );
+ catMap.insert( TQString::number( it.data() ), *catIt );
}
args.insert( "category", catMap );
@@ -985,9 +985,9 @@ void ResourceXMLRPC::writeEvent( Event *event, QMap<QString, QVariant> &args )
if ( !rec->doesRecur() ) {
args.insert( "recur_type", int( 0 ) );
args.insert( "recur_interval", int( 0 ) );
- args.insert( "recur_enddate", QDateTime() );
+ args.insert( "recur_enddate", TQDateTime() );
args.insert( "recur_data", int( 0 ) );
- args.insert( "recur_exception", QMap<QString, QVariant>() );
+ args.insert( "recur_exception", TQMap<TQString, TQVariant>() );
} else {
switch ( rec->recurrenceType() ) {
case Recurrence::rDaily:
@@ -1031,12 +1031,12 @@ void ResourceXMLRPC::writeEvent( Event *event, QMap<QString, QVariant> &args )
args.insert( "recur_enddate", rec->endDateTime() );
// TODO: Also use exception dates!
- const QValueList<QDateTime> dates = event->recurrence()->exDateTimes();
- QValueList<QDateTime>::ConstIterator dateIt;
- QMap<QString, QVariant> exMap;
+ const TQValueList<TQDateTime> dates = event->recurrence()->exDateTimes();
+ TQValueList<TQDateTime>::ConstIterator dateIt;
+ TQMap<TQString, TQVariant> exMap;
int counter = 0;
for ( dateIt = dates.begin(); dateIt != dates.end(); ++dateIt, ++counter )
- exMap.insert( QString::number( counter ), *dateIt );
+ exMap.insert( TQString::number( counter ), *dateIt );
args.insert( "recur_exception", exMap );
}
@@ -1044,10 +1044,10 @@ void ResourceXMLRPC::writeEvent( Event *event, QMap<QString, QVariant> &args )
// PARTICIPANTS
const Attendee::List attendees = event->attendees();
Attendee::List::ConstIterator attIt;
- QMap<QString, QVariant> persons;
+ TQMap<TQString, TQVariant> persons;
for ( attIt = attendees.begin(); attIt != attendees.end(); ++attIt ) {
- QMap<QString, QVariant> person;
- QString status;
+ TQMap<TQString, TQVariant> person;
+ TQString status;
if ( (*attIt)->status() == Attendee::Accepted )
status = "A";
@@ -1069,9 +1069,9 @@ void ResourceXMLRPC::writeEvent( Event *event, QMap<QString, QVariant> &args )
// ALARMS
const Alarm::List alarms = event->alarms();
Alarm::List::ConstIterator alarmIt;
- QMap<QString, QVariant> alarmMap;
+ TQMap<TQString, TQVariant> alarmMap;
for ( alarmIt = alarms.begin(); alarmIt != alarms.end(); ++alarmIt ) {
- QMap<QString, QVariant> alarm;
+ TQMap<TQString, TQVariant> alarm;
alarm.insert( "time", (*alarmIt)->time() );
alarm.insert( "offset", (*alarmIt)->startOffset().asSeconds() );
alarm.insert( "enabled", ( (*alarmIt)->enabled() ? int( 1 ) : int( 0 ) ) );
@@ -1082,7 +1082,7 @@ void ResourceXMLRPC::writeEvent( Event *event, QMap<QString, QVariant> &args )
args.insert( "alarm", alarmMap );
}
-void ResourceXMLRPC::writeTodo( Todo* todo, QMap<QString, QVariant>& args )
+void ResourceXMLRPC::writeTodo( Todo* todo, TQMap<TQString, TQVariant>& args )
{
args.insert( "subject", todo->summary() );
args.insert( "des", todo->description() );
@@ -1090,17 +1090,17 @@ void ResourceXMLRPC::writeTodo( Todo* todo, QMap<QString, QVariant>& args )
(todo->secrecy() == Todo::SecrecyPublic ? "public" : "private" ) );
// CATEGORIES
- QMap<QString, QVariant> catMap;
+ TQMap<TQString, TQVariant> catMap;
- const QStringList categories = todo->categories();
- QStringList::ConstIterator catIt;
+ const TQStringList categories = todo->categories();
+ TQStringList::ConstIterator catIt;
int counter = 0;
for ( catIt = categories.begin(); catIt != categories.end(); ++catIt ) {
- QMap<QString, int>::Iterator it = mTodoCategoryMap.find( *catIt );
+ TQMap<TQString, int>::Iterator it = mTodoCategoryMap.find( *catIt );
if ( it == mTodoCategoryMap.end() )
- catMap.insert( QString::number( counter-- ), *catIt );
+ catMap.insert( TQString::number( counter-- ), *catIt );
else
- catMap.insert( QString::number( it.data() ), *catIt );
+ catMap.insert( TQString::number( it.data() ), *catIt );
}
args.insert( "category", catMap );
@@ -1111,17 +1111,17 @@ void ResourceXMLRPC::writeTodo( Todo* todo, QMap<QString, QVariant>& args )
// SUBTODO
Incidence *inc = todo->relatedTo();
if ( inc ) {
- QString parentUid = idMapper().remoteId( inc->uid() );
+ TQString parentUid = idMapper().remoteId( inc->uid() );
args.insert( "id_parent", parentUid );
}
// STATE
- QString remoteId = idMapper().remoteId( todo->uid() );
- QString status = mTodoStateMapper.remoteState( remoteId, todo->percentComplete() );
+ TQString remoteId = idMapper().remoteId( todo->uid() );
+ TQString status = mTodoStateMapper.remoteState( remoteId, todo->percentComplete() );
args.insert( "status", status );
}
-void ResourceXMLRPC::readTodo( const QMap<QString, QVariant>& args, Todo *todo, QString &uid )
+void ResourceXMLRPC::readTodo( const TQMap<TQString, TQVariant>& args, Todo *todo, TQString &uid )
{
uid = args[ "id" ].toString();
@@ -1138,10 +1138,10 @@ void ResourceXMLRPC::readTodo( const QMap<QString, QVariant>& args, Todo *todo,
todo->setSecrecy( args[ "access" ].toString() == "public" ? Todo::SecrecyPublic : Todo::SecrecyPrivate );
// CATEGORIES
- const QMap<QString, QVariant> categories = args[ "category" ].toMap();
- QMap<QString, QVariant>::ConstIterator it;
+ const TQMap<TQString, TQVariant> categories = args[ "category" ].toMap();
+ TQMap<TQString, TQVariant>::ConstIterator it;
- QStringList todoCategories;
+ TQStringList todoCategories;
for ( it = categories.begin(); it != categories.end(); ++it ) {
mTodoCategoryMap.insert( it.data().toString(), it.key().toInt() );
todoCategories.append( it.data().toString() );
@@ -1152,7 +1152,7 @@ void ResourceXMLRPC::readTodo( const QMap<QString, QVariant>& args, Todo *todo,
todo->setLastModified( args[ "datemodified" ].toDateTime() );
todo->setFloats( true );
- QDateTime dateTime = args[ "startdate" ].toDateTime();
+ TQDateTime dateTime = args[ "startdate" ].toDateTime();
if ( dateTime.isValid() ) {
todo->setDtStart( dateTime );
todo->setHasStartDate( true );
@@ -1169,9 +1169,9 @@ void ResourceXMLRPC::readTodo( const QMap<QString, QVariant>& args, Todo *todo,
}
// SUBTODO
- QString parentId = args[ "id_parent" ].toString();
+ TQString parentId = args[ "id_parent" ].toString();
if ( parentId != "0" ) { // we are a sub todo
- QString localParentUid = idMapper().localId( parentId );
+ TQString localParentUid = idMapper().localId( parentId );
if ( !localParentUid.isEmpty() ) { // found parent todo
Todo *parent = mCalendar.todo( localParentUid );
if ( parent )
@@ -1180,7 +1180,7 @@ void ResourceXMLRPC::readTodo( const QMap<QString, QVariant>& args, Todo *todo,
}
// STATE
- QString status = args[ "status" ].toString();
+ TQString status = args[ "status" ].toString();
int state = TodoStateMapper::toLocal( status );
mTodoStateMapper.addTodoState( uid, state, status );
diff --git a/kresources/egroupware/kcal_resourcexmlrpc.h b/kresources/egroupware/kcal_resourcexmlrpc.h
index fd9ad6826..a28202ed5 100644
--- a/kresources/egroupware/kcal_resourcexmlrpc.h
+++ b/kresources/egroupware/kcal_resourcexmlrpc.h
@@ -22,9 +22,9 @@
#ifndef KCAL_RESOURCEXMLRPC_H
#define KCAL_RESOURCEXMLRPC_H
-#include <qdatetime.h>
-#include <qptrlist.h>
-#include <qstring.h>
+#include <tqdatetime.h>
+#include <tqptrlist.h>
+#include <tqstring.h>
#include <kconfig.h>
#include <kurl.h>
@@ -81,7 +81,7 @@ class KDE_EXPORT ResourceXMLRPC : public ResourceCached
/**
Retrieves an event on the basis of the unique string ID.
*/
- Event *event( const QString& uid );
+ Event *event( const TQString& uid );
/**
Return unfiltered list of all events in calendar.
@@ -93,20 +93,20 @@ class KDE_EXPORT ResourceXMLRPC : public ResourceCached
date specified. useful for dayView, etc. etc.
*/
Event::List rawEventsForDate(
- const QDate& date,
+ const TQDate& date,
EventSortField sortField=EventSortUnsorted,
SortDirection sortDirection=SortDirectionAscending );
/**
Get unfiltered events for date \a qdt.
*/
- Event::List rawEventsForDate( const QDateTime& qdt );
+ Event::List rawEventsForDate( const TQDateTime& qdt );
/**
Get unfiltered events in a range of dates. If inclusive is set to true,
only events are returned, which are completely included in the range.
*/
- Event::List rawEvents( const QDate& start, const QDate& end,
+ Event::List rawEvents( const TQDate& start, const TQDate& end,
bool inclusive = false );
@@ -124,7 +124,7 @@ class KDE_EXPORT ResourceXMLRPC : public ResourceCached
Searches todolist for an event with this unique string identifier,
returns a pointer or null.
*/
- Todo *todo( const QString& uid );
+ Todo *todo( const TQString& uid );
/**
Return list of all todos.
@@ -134,7 +134,7 @@ class KDE_EXPORT ResourceXMLRPC : public ResourceCached
/**
Returns list of todos due on the specified date.
*/
- Todo::List rawTodosForDate( const QDate& date );
+ Todo::List rawTodosForDate( const TQDate& date );
/**
Add a Journal entry to calendar
@@ -149,22 +149,22 @@ class KDE_EXPORT ResourceXMLRPC : public ResourceCached
/**
Return Journals for given date
*/
- virtual Journal::List journals( const QDate& );
+ virtual Journal::List journals( const TQDate& );
/**
Return Journal with given UID
*/
- virtual Journal *journal( const QString& uid );
+ virtual Journal *journal( const TQString& uid );
/**
Return all alarms, which ocur in the given time interval.
*/
- Alarm::List alarms( const QDateTime& from, const QDateTime& to );
+ Alarm::List alarms( const TQDateTime& from, const TQDateTime& to );
/**
Return all alarms, which ocur before given date.
*/
- Alarm::List alarmsTo( const QDateTime& to );
+ Alarm::List alarmsTo( const TQDateTime& to );
/**
Public because needed in MultiCalendar::load()
@@ -174,25 +174,25 @@ class KDE_EXPORT ResourceXMLRPC : public ResourceCached
void dump() const;
- void setTimeZoneId( const QString& ) {}
+ void setTimeZoneId( const TQString& ) {}
protected slots:
- void loginFinished( const QValueList<QVariant>&, const QVariant& );
- void logoutFinished( const QValueList<QVariant>&, const QVariant& );
+ void loginFinished( const TQValueList<TQVariant>&, const TQVariant& );
+ void logoutFinished( const TQValueList<TQVariant>&, const TQVariant& );
- void listEventsFinished( const QValueList<QVariant>&, const QVariant& );
- void addEventFinished( const QValueList<QVariant>&, const QVariant& );
- void updateEventFinished( const QValueList<QVariant>&, const QVariant& );
- void deleteEventFinished( const QValueList<QVariant>&, const QVariant& );
- void loadEventCategoriesFinished( const QValueList<QVariant>&, const QVariant& );
+ void listEventsFinished( const TQValueList<TQVariant>&, const TQVariant& );
+ void addEventFinished( const TQValueList<TQVariant>&, const TQVariant& );
+ void updateEventFinished( const TQValueList<TQVariant>&, const TQVariant& );
+ void deleteEventFinished( const TQValueList<TQVariant>&, const TQVariant& );
+ void loadEventCategoriesFinished( const TQValueList<TQVariant>&, const TQVariant& );
- void listTodosFinished( const QValueList<QVariant>&, const QVariant& );
- void addTodoFinished( const QValueList<QVariant>&, const QVariant& );
- void updateTodoFinished( const QValueList<QVariant>&, const QVariant& );
- void deleteTodoFinished( const QValueList<QVariant>&, const QVariant& );
- void loadTodoCategoriesFinished( const QValueList<QVariant>&, const QVariant& );
+ void listTodosFinished( const TQValueList<TQVariant>&, const TQVariant& );
+ void addTodoFinished( const TQValueList<TQVariant>&, const TQVariant& );
+ void updateTodoFinished( const TQValueList<TQVariant>&, const TQVariant& );
+ void deleteTodoFinished( const TQValueList<TQVariant>&, const TQVariant& );
+ void loadTodoCategoriesFinished( const TQValueList<TQVariant>&, const TQVariant& );
- void fault( int, const QString&, const QVariant& );
+ void fault( int, const TQString&, const TQVariant& );
protected:
bool doLoad();
@@ -205,11 +205,11 @@ class KDE_EXPORT ResourceXMLRPC : public ResourceCached
void init();
void initEGroupware();
- void writeEvent( Event*, QMap<QString, QVariant>& );
- void readEvent( const QMap<QString, QVariant>&, Event*, QString& );
+ void writeEvent( Event*, TQMap<TQString, TQVariant>& );
+ void readEvent( const TQMap<TQString, TQVariant>&, Event*, TQString& );
- void writeTodo( Todo*, QMap<QString, QVariant>& );
- void readTodo( const QMap<QString, QVariant>&, Todo*, QString& );
+ void writeTodo( Todo*, TQMap<TQString, TQVariant>& );
+ void readTodo( const TQMap<TQString, TQVariant>&, Todo*, TQString& );
void checkLoadingFinished();
@@ -217,11 +217,11 @@ class KDE_EXPORT ResourceXMLRPC : public ResourceCached
EGroupwarePrefs *mPrefs;
- QString mSessionID;
- QString mKp3;
+ TQString mSessionID;
+ TQString mKp3;
- QMap<QString, int> mEventCategoryMap;
- QMap<QString, int> mTodoCategoryMap;
+ TQMap<TQString, int> mEventCategoryMap;
+ TQMap<TQString, int> mTodoCategoryMap;
TodoStateMapper mTodoStateMapper;
diff --git a/kresources/egroupware/kcal_resourcexmlrpcconfig.cpp b/kresources/egroupware/kcal_resourcexmlrpcconfig.cpp
index 450519aa4..36e3b9486 100644
--- a/kresources/egroupware/kcal_resourcexmlrpcconfig.cpp
+++ b/kresources/egroupware/kcal_resourcexmlrpcconfig.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 <kdialog.h>
@@ -34,32 +34,32 @@
using namespace KCal;
-ResourceXMLRPCConfig::ResourceXMLRPCConfig( QWidget* parent, const char* name )
+ResourceXMLRPCConfig::ResourceXMLRPCConfig( TQWidget* parent, const char* name )
: KRES::ConfigWidget( parent, name )
{
- QGridLayout *mainLayout = new QGridLayout( this, 4, 2, 0, KDialog::spacingHint() );
+ TQGridLayout *mainLayout = new TQGridLayout( this, 4, 2, 0, KDialog::spacingHint() );
- QLabel *label = new QLabel( i18n( "URL:" ), this );
+ TQLabel *label = new TQLabel( i18n( "URL:" ), this );
mURL = new KURLRequester( this );
mainLayout->addWidget( label, 0, 0 );
mainLayout->addWidget( mURL, 0, 1 );
- label = new QLabel( i18n( "Domain:" ), this );
+ label = new TQLabel( i18n( "Domain:" ), this );
mDomain = new KLineEdit( this );
mainLayout->addWidget( label, 1, 0 );
mainLayout->addWidget( mDomain, 1, 1 );
- label = new QLabel( i18n( "User:" ), this );
+ label = new TQLabel( i18n( "User:" ), this );
mUser = new KLineEdit( this );
mainLayout->addWidget( label, 2, 0 );
mainLayout->addWidget( mUser, 2, 1 );
- label = new QLabel( i18n( "Password:" ), this );
+ label = new TQLabel( i18n( "Password:" ), this );
mPassword = new KLineEdit( this );
- mPassword->setEchoMode( QLineEdit::Password );
+ mPassword->setEchoMode( TQLineEdit::Password );
mainLayout->addWidget( label, 3, 0 );
mainLayout->addWidget( mPassword, 3, 1 );
diff --git a/kresources/egroupware/kcal_resourcexmlrpcconfig.h b/kresources/egroupware/kcal_resourcexmlrpcconfig.h
index c6a918f84..f71359aa3 100644
--- a/kresources/egroupware/kcal_resourcexmlrpcconfig.h
+++ b/kresources/egroupware/kcal_resourcexmlrpcconfig.h
@@ -35,7 +35,7 @@ class KDE_EXPORT ResourceXMLRPCConfig : public KRES::ConfigWidget
Q_OBJECT
public:
- ResourceXMLRPCConfig( QWidget* parent = 0, const char* name = 0 );
+ ResourceXMLRPCConfig( TQWidget* parent = 0, const char* name = 0 );
public slots:
void loadSettings( KRES::Resource* );
diff --git a/kresources/egroupware/knotes_resourcexmlrpc.cpp b/kresources/egroupware/knotes_resourcexmlrpc.cpp
index c30da41f0..b0bdb5b0d 100644
--- a/kresources/egroupware/knotes_resourcexmlrpc.cpp
+++ b/kresources/egroupware/knotes_resourcexmlrpc.cpp
@@ -19,8 +19,8 @@
Boston, MA 02110-1301, USA.
*/
-#include <qapplication.h>
-#include <qstringlist.h>
+#include <tqapplication.h>
+#include <tqstringlist.h>
#include <kdebug.h>
#include <klocale.h>
@@ -44,13 +44,13 @@ using namespace KNotes;
typedef KRES::PluginFactory< ResourceXMLRPC, ResourceXMLRPCConfig> XMLRPCFactory;
K_EXPORT_COMPONENT_FACTORY( knotes_xmlrpc, XMLRPCFactory )
-static const QString SearchNotesCommand = "infolog.boinfolog.search";
-static const QString AddNoteCommand = "infolog.boinfolog.write";
-static const QString DeleteNoteCommand = "infolog.boinfolog.delete";
-static const QString LoadNoteCategoriesCommand = "infolog.boinfolog.categories";
+static const TQString SearchNotesCommand = "infolog.boinfolog.search";
+static const TQString AddNoteCommand = "infolog.boinfolog.write";
+static const TQString DeleteNoteCommand = "infolog.boinfolog.delete";
+static const TQString LoadNoteCategoriesCommand = "infolog.boinfolog.categories";
ResourceXMLRPC::ResourceXMLRPC( const KConfig* config )
- : ResourceNotes( config ), mCalendar( QString::fromLatin1("UTC") ),
+ : ResourceNotes( config ), mCalendar( TQString::fromLatin1("UTC") ),
mServer( 0 )
{
init();
@@ -62,7 +62,7 @@ ResourceXMLRPC::ResourceXMLRPC( const KConfig* config )
}
ResourceXMLRPC::ResourceXMLRPC( )
- : ResourceNotes( 0 ), mCalendar( QString::fromLatin1("UTC") ),
+ : ResourceNotes( 0 ), mCalendar( TQString::fromLatin1("UTC") ),
mServer( 0 )
{
init();
@@ -114,14 +114,14 @@ bool ResourceXMLRPC::load()
mServer->setUrl( KURL( mPrefs->url() ) );
mServer->setUserAgent( "KDE-Notes" );
- QMap<QString, QVariant> args, columns;
+ TQMap<TQString, TQVariant> args, columns;
args.insert( "domain", mPrefs->domain() );
args.insert( "username", mPrefs->user() );
args.insert( "password", mPrefs->password() );
- mServer->call( "system.login", QVariant( args ),
- this, SLOT( loginFinished( const QValueList<QVariant>&, const QVariant& ) ),
- this, SLOT( fault( int, const QString&, const QVariant& ) ) );
+ mServer->call( "system.login", TQVariant( args ),
+ this, TQT_SLOT( loginFinished( const TQValueList<TQVariant>&, const TQVariant& ) ),
+ this, TQT_SLOT( fault( int, const TQString&, const TQVariant& ) ) );
mSynchronizer->start();
@@ -132,8 +132,8 @@ bool ResourceXMLRPC::load()
args.insert( "order", "id_parent" );
mServer->call( SearchNotesCommand, args,
- this, SLOT( listNotesFinished( const QValueList<QVariant>&, const QVariant& ) ),
- this, SLOT( fault( int, const QString&, const QVariant& ) ) );
+ this, TQT_SLOT( listNotesFinished( const TQValueList<TQVariant>&, const TQVariant& ) ),
+ this, TQT_SLOT( fault( int, const TQString&, const TQVariant& ) ) );
mSynchronizer->start();
@@ -149,7 +149,7 @@ bool ResourceXMLRPC::save()
bool ResourceXMLRPC::addNote( KCal::Journal *journal )
{
- QMap<QString, QVariant> args;
+ TQMap<TQString, TQVariant> args;
writeNote( journal, args );
KCal::Journal *oldJournal = mCalendar.journal( journal->uid() );
@@ -159,17 +159,17 @@ bool ResourceXMLRPC::addNote( KCal::Journal *journal )
if ( !oldJournal->isReadOnly() ) {
writeNote( journal, args );
args.insert( "id", mUidMap[ journal->uid() ].toInt() );
- mServer->call( AddNoteCommand, QVariant( args ),
- this, SLOT( updateNoteFinished( const QValueList<QVariant>&, const QVariant& ) ),
- this, SLOT( fault( int, const QString&, const QVariant& ) ) );
+ mServer->call( AddNoteCommand, TQVariant( args ),
+ this, TQT_SLOT( updateNoteFinished( const TQValueList<TQVariant>&, const TQVariant& ) ),
+ this, TQT_SLOT( fault( int, const TQString&, const TQVariant& ) ) );
mCalendar.addJournal( journal );
added = true;
}
} else {
- mServer->call( AddNoteCommand, QVariant( args ),
- this, SLOT( addNoteFinished( const QValueList<QVariant>&, const QVariant& ) ),
- this, SLOT( fault( int, const QString&, const QVariant& ) ),
- QVariant( journal->uid() ) );
+ mServer->call( AddNoteCommand, TQVariant( args ),
+ this, TQT_SLOT( addNoteFinished( const TQValueList<TQVariant>&, const TQVariant& ) ),
+ this, TQT_SLOT( fault( int, const TQString&, const TQVariant& ) ),
+ TQVariant( journal->uid() ) );
mCalendar.addJournal( journal );
added = true;
@@ -186,28 +186,28 @@ bool ResourceXMLRPC::deleteNote( KCal::Journal *journal )
int id = mUidMap[ journal->uid() ].toInt();
mServer->call( DeleteNoteCommand, id,
- this, SLOT( deleteNoteFinished( const QValueList<QVariant>&, const QVariant& ) ),
- this, SLOT( fault( int, const QString&, const QVariant& ) ),
- QVariant( journal->uid() ) );
+ this, TQT_SLOT( deleteNoteFinished( const TQValueList<TQVariant>&, const TQVariant& ) ),
+ this, TQT_SLOT( fault( int, const TQString&, const TQVariant& ) ),
+ TQVariant( journal->uid() ) );
mSynchronizer->start();
return true;
}
-KCal::Alarm::List ResourceXMLRPC::alarms( const QDateTime& from, const QDateTime& to )
+KCal::Alarm::List ResourceXMLRPC::alarms( const TQDateTime& from, const TQDateTime& to )
{
KCal::Alarm::List alarms;
KCal::Journal::List notes = mCalendar.journals();
KCal::Journal::List::ConstIterator note;
for ( note = notes.begin(); note != notes.end(); ++note )
{
- QDateTime preTime = from.addSecs( -1 );
+ TQDateTime preTime = from.addSecs( -1 );
KCal::Alarm::List::ConstIterator it;
for( it = (*note)->alarms().begin(); it != (*note)->alarms().end(); ++it )
{
if ( (*it)->enabled() )
{
- QDateTime dt = (*it)->nextRepetition( preTime );
+ TQDateTime dt = (*it)->nextRepetition( preTime );
if ( dt.isValid() && dt <= to )
alarms.append( *it );
}
@@ -217,10 +217,10 @@ KCal::Alarm::List ResourceXMLRPC::alarms( const QDateTime& from, const QDateTime
return alarms;
}
-void ResourceXMLRPC::loginFinished( const QValueList<QVariant>& variant,
- const QVariant& )
+void ResourceXMLRPC::loginFinished( const TQValueList<TQVariant>& variant,
+ const TQVariant& )
{
- QMap<QString, QVariant> map = variant[ 0 ].toMap();
+ TQMap<TQString, TQVariant> map = variant[ 0 ].toMap();
KURL url = KURL( mPrefs->url() );
if ( map[ "GOAWAY" ].toString() == "XOXO" ) { // failed
@@ -237,10 +237,10 @@ void ResourceXMLRPC::loginFinished( const QValueList<QVariant>& variant,
mSynchronizer->stop();
}
-void ResourceXMLRPC::logoutFinished( const QValueList<QVariant>& variant,
- const QVariant& )
+void ResourceXMLRPC::logoutFinished( const TQValueList<TQVariant>& variant,
+ const TQVariant& )
{
- QMap<QString, QVariant> map = variant[ 0 ].toMap();
+ TQMap<TQString, TQVariant> map = variant[ 0 ].toMap();
if ( map[ "GOODBYE" ].toString() != "XOXO" )
kdError() << "logout failed" << endl;
@@ -254,9 +254,9 @@ void ResourceXMLRPC::logoutFinished( const QValueList<QVariant>& variant,
mSynchronizer->stop();
}
-void ResourceXMLRPC::listNotesFinished( const QValueList<QVariant> &list, const QVariant& )
+void ResourceXMLRPC::listNotesFinished( const TQValueList<TQVariant> &list, const TQVariant& )
{
- QMap<QString, QString>::Iterator uidIt;
+ TQMap<TQString, TQString>::Iterator uidIt;
for ( uidIt = mUidMap.begin(); uidIt != mUidMap.end(); ++uidIt ) {
KCal::Journal *journal = mCalendar.journal( uidIt.key() );
mCalendar.deleteJournal( journal );
@@ -264,15 +264,15 @@ void ResourceXMLRPC::listNotesFinished( const QValueList<QVariant> &list, const
mUidMap.clear();
- QValueList<QVariant> noteList = list[ 0 ].toList();
- QValueList<QVariant>::Iterator noteIt;
+ TQValueList<TQVariant> noteList = list[ 0 ].toList();
+ TQValueList<TQVariant>::Iterator noteIt;
for ( noteIt = noteList.begin(); noteIt != noteList.end(); ++noteIt ) {
- QMap<QString, QVariant> map = (*noteIt).toMap();
+ TQMap<TQString, TQVariant> map = (*noteIt).toMap();
KCal::Journal *journal = new KCal::Journal();
- QString uid;
+ TQString uid;
readNote( map, journal, uid );
mUidMap.insert( journal->uid(), uid );
@@ -283,20 +283,20 @@ void ResourceXMLRPC::listNotesFinished( const QValueList<QVariant> &list, const
mSynchronizer->stop();
}
-void ResourceXMLRPC::addNoteFinished( const QValueList<QVariant> &list, const QVariant &id )
+void ResourceXMLRPC::addNoteFinished( const TQValueList<TQVariant> &list, const TQVariant &id )
{
int uid = list[ 0 ].toInt();
- mUidMap.insert( id.toString(), QString::number( uid ) );
+ mUidMap.insert( id.toString(), TQString::number( uid ) );
mSynchronizer->stop();
}
-void ResourceXMLRPC::updateNoteFinished( const QValueList<QVariant>&, const QVariant& )
+void ResourceXMLRPC::updateNoteFinished( const TQValueList<TQVariant>&, const TQVariant& )
{
mSynchronizer->stop();
}
-void ResourceXMLRPC::deleteNoteFinished( const QValueList<QVariant>&, const QVariant &id )
+void ResourceXMLRPC::deleteNoteFinished( const TQValueList<TQVariant>&, const TQVariant &id )
{
mUidMap.erase( id.toString() );
@@ -306,13 +306,13 @@ void ResourceXMLRPC::deleteNoteFinished( const QValueList<QVariant>&, const QVar
mSynchronizer->stop();
}
-void ResourceXMLRPC::fault( int error, const QString& errorMsg, const QVariant& )
+void ResourceXMLRPC::fault( int error, const TQString& errorMsg, const TQVariant& )
{
kdError() << "Server send error " << error << ": " << errorMsg << endl;
mSynchronizer->stop();
}
-void ResourceXMLRPC::writeNote( KCal::Journal* journal, QMap<QString, QVariant>& args )
+void ResourceXMLRPC::writeNote( KCal::Journal* journal, TQMap<TQString, TQVariant>& args )
{
args.insert( "subject", journal->summary() );
args.insert( "des", journal->description() );
@@ -320,7 +320,7 @@ void ResourceXMLRPC::writeNote( KCal::Journal* journal, QMap<QString, QVariant>&
(journal->secrecy() == KCal::Journal::SecrecyPublic ? "public" : "private" ) );
}
-void ResourceXMLRPC::readNote( const QMap<QString, QVariant>& args, KCal::Journal *journal, QString &uid )
+void ResourceXMLRPC::readNote( const TQMap<TQString, TQVariant>& args, KCal::Journal *journal, TQString &uid )
{
uid = args[ "id" ].toString();
diff --git a/kresources/egroupware/knotes_resourcexmlrpc.h b/kresources/egroupware/knotes_resourcexmlrpc.h
index 2f2934320..7301ef902 100644
--- a/kresources/egroupware/knotes_resourcexmlrpc.h
+++ b/kresources/egroupware/knotes_resourcexmlrpc.h
@@ -22,8 +22,8 @@
#ifndef KNOTES_RESOURCEXMLRPC_H
#define KNOTES_RESOURCEXMLRPC_H
-#include <qptrlist.h>
-#include <qstring.h>
+#include <tqptrlist.h>
+#include <tqstring.h>
#include <kconfig.h>
#include <kurl.h>
@@ -66,34 +66,34 @@ class KDE_EXPORT ResourceXMLRPC : public ResourceNotes
bool addNote( KCal::Journal* );
bool deleteNote( KCal::Journal* );
- KCal::Alarm::List alarms( const QDateTime& from, const QDateTime& to );
+ KCal::Alarm::List alarms( const TQDateTime& from, const TQDateTime& to );
protected slots:
- void loginFinished( const QValueList<QVariant>&, const QVariant& );
- void logoutFinished( const QValueList<QVariant>&, const QVariant& );
+ void loginFinished( const TQValueList<TQVariant>&, const TQVariant& );
+ void logoutFinished( const TQValueList<TQVariant>&, const TQVariant& );
- void listNotesFinished( const QValueList<QVariant>&, const QVariant& );
- void addNoteFinished( const QValueList<QVariant>&, const QVariant& );
- void updateNoteFinished( const QValueList<QVariant>&, const QVariant& );
- void deleteNoteFinished( const QValueList<QVariant>&, const QVariant& );
+ void listNotesFinished( const TQValueList<TQVariant>&, const TQVariant& );
+ void addNoteFinished( const TQValueList<TQVariant>&, const TQVariant& );
+ void updateNoteFinished( const TQValueList<TQVariant>&, const TQVariant& );
+ void deleteNoteFinished( const TQValueList<TQVariant>&, const TQVariant& );
- void fault( int, const QString&, const QVariant& );
+ void fault( int, const TQString&, const TQVariant& );
private:
void init();
void initEGroupware();
- void writeNote( KCal::Journal*, QMap<QString, QVariant>& );
- void readNote( const QMap<QString, QVariant>&, KCal::Journal*, QString& );
+ void writeNote( KCal::Journal*, TQMap<TQString, TQVariant>& );
+ void readNote( const TQMap<TQString, TQVariant>&, KCal::Journal*, TQString& );
KCal::CalendarLocal mCalendar;
KXMLRPC::Server *mServer;
EGroupwarePrefs *mPrefs;
- QString mSessionID;
- QString mKp3;
- QMap<QString, QString> mUidMap;
+ TQString mSessionID;
+ TQString mKp3;
+ TQMap<TQString, TQString> mUidMap;
Synchronizer *mSynchronizer;
};
diff --git a/kresources/egroupware/knotes_resourcexmlrpcconfig.cpp b/kresources/egroupware/knotes_resourcexmlrpcconfig.cpp
index 6eee548ce..224cb9914 100644
--- a/kresources/egroupware/knotes_resourcexmlrpcconfig.cpp
+++ b/kresources/egroupware/knotes_resourcexmlrpcconfig.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 <kdialog.h>
@@ -34,32 +34,32 @@
using namespace KNotes;
-ResourceXMLRPCConfig::ResourceXMLRPCConfig( QWidget* parent, const char* name )
+ResourceXMLRPCConfig::ResourceXMLRPCConfig( TQWidget* parent, const char* name )
: KRES::ConfigWidget( parent, name )
{
- QGridLayout *mainLayout = new QGridLayout( this, 4, 2, 0, KDialog::spacingHint() );
+ TQGridLayout *mainLayout = new TQGridLayout( this, 4, 2, 0, KDialog::spacingHint() );
- QLabel *label = new QLabel( i18n( "URL:" ), this );
+ TQLabel *label = new TQLabel( i18n( "URL:" ), this );
mURL = new KURLRequester( this );
mainLayout->addWidget( label, 0, 0 );
mainLayout->addWidget( mURL, 0, 1 );
- label = new QLabel( i18n( "Domain:" ), this );
+ label = new TQLabel( i18n( "Domain:" ), this );
mDomain = new KLineEdit( this );
mainLayout->addWidget( label, 1, 0 );
mainLayout->addWidget( mDomain, 1, 1 );
- label = new QLabel( i18n( "User:" ), this );
+ label = new TQLabel( i18n( "User:" ), this );
mUser = new KLineEdit( this );
mainLayout->addWidget( label, 2, 0 );
mainLayout->addWidget( mUser, 2, 1 );
- label = new QLabel( i18n( "Password:" ), this );
+ label = new TQLabel( i18n( "Password:" ), this );
mPassword = new KLineEdit( this );
- mPassword->setEchoMode( QLineEdit::Password );
+ mPassword->setEchoMode( TQLineEdit::Password );
mainLayout->addWidget( label, 3, 0 );
mainLayout->addWidget( mPassword, 3, 1 );
diff --git a/kresources/egroupware/knotes_resourcexmlrpcconfig.h b/kresources/egroupware/knotes_resourcexmlrpcconfig.h
index 7b3edab2e..63119ab72 100644
--- a/kresources/egroupware/knotes_resourcexmlrpcconfig.h
+++ b/kresources/egroupware/knotes_resourcexmlrpcconfig.h
@@ -35,7 +35,7 @@ class KDE_EXPORT ResourceXMLRPCConfig : public KRES::ConfigWidget
Q_OBJECT
public:
- ResourceXMLRPCConfig( QWidget* parent = 0, const char* name = 0 );
+ ResourceXMLRPCConfig( TQWidget* parent = 0, const char* name = 0 );
public slots:
void loadSettings( KRES::Resource* );
diff --git a/kresources/egroupware/synchronizer.cpp b/kresources/egroupware/synchronizer.cpp
index 928fc7e1d..f48542467 100644
--- a/kresources/egroupware/synchronizer.cpp
+++ b/kresources/egroupware/synchronizer.cpp
@@ -20,7 +20,7 @@
*/
#include <kapplication.h>
-#include <qeventloop.h>
+#include <tqeventloop.h>
#include <unistd.h>
@@ -36,7 +36,7 @@ void Synchronizer::start()
mBlocked = true;
while ( mBlocked ) {
- QApplication::eventLoop()->processEvents( QEventLoop::ExcludeUserInput );
+ TQApplication::eventLoop()->processEvents( TQEventLoop::ExcludeUserInput );
// use sleep here to reduce cpu usage
usleep( 100 );
diff --git a/kresources/egroupware/synchronizer.h b/kresources/egroupware/synchronizer.h
index feac6bf31..ccb34d7cb 100644
--- a/kresources/egroupware/synchronizer.h
+++ b/kresources/egroupware/synchronizer.h
@@ -22,7 +22,7 @@
#ifndef SYNCHRONIZER_H
#define SYNCHRONIZER_H
-#include <qobject.h>
+#include <tqobject.h>
/**
A small helper class which blocks an asynchronous operation (e.g. a KIO request)
@@ -37,8 +37,8 @@
...
job = KIO::file_copy( url, file, -1, true );
- connect( job, SIGNAL( result( KIO::Job * ) ),
- SLOT( slotResult( KIO::Job * ) ) );
+ connect( job, TQT_SIGNAL( result( KIO::Job * ) ),
+ TQT_SLOT( slotResult( KIO::Job * ) ) );
mSynchronizer.start(); // will block here until the slot was called
...
diff --git a/kresources/egroupware/todostatemapper.cpp b/kresources/egroupware/todostatemapper.cpp
index 6c81ded33..e983c3c99 100644
--- a/kresources/egroupware/todostatemapper.cpp
+++ b/kresources/egroupware/todostatemapper.cpp
@@ -19,22 +19,22 @@
Boston, MA 02110-1301, USA.
*/
-#include <qdatastream.h>
-#include <qfile.h>
+#include <tqdatastream.h>
+#include <tqfile.h>
#include <kdebug.h>
#include <kstandarddirs.h>
#include "todostatemapper.h"
-QDataStream& operator<<( QDataStream &stream, const TodoStateMapper::TodoStateMapEntry &entry )
+TQDataStream& operator<<( TQDataStream &stream, const TodoStateMapper::TodoStateMapEntry &entry )
{
stream << entry.uid << entry.localState << entry.remoteState;
return stream;
}
-QDataStream& operator>>( QDataStream &stream, TodoStateMapper::TodoStateMapEntry &entry )
+TQDataStream& operator>>( TQDataStream &stream, TodoStateMapper::TodoStateMapEntry &entry )
{
stream >> entry.uid >> entry.localState >> entry.remoteState;
@@ -49,19 +49,19 @@ TodoStateMapper::~TodoStateMapper()
{
}
-void TodoStateMapper::setPath( const QString &path )
+void TodoStateMapper::setPath( const TQString &path )
{
mPath = path;
}
-void TodoStateMapper::setIdentifier( const QString &identifier )
+void TodoStateMapper::setIdentifier( const TQString &identifier )
{
mIdentifier = identifier;
}
bool TodoStateMapper::load()
{
- QFile file( filename() );
+ TQFile file( filename() );
if ( !file.open( IO_ReadOnly ) ) {
kdError() << "Can't read uid map file '" << filename() << "'" << endl;
return false;
@@ -69,7 +69,7 @@ bool TodoStateMapper::load()
clear();
- QDataStream stream;
+ TQDataStream stream;
stream.setVersion( 6 );
stream.setDevice( &file );
stream >> mTodoStateMap;
@@ -81,13 +81,13 @@ bool TodoStateMapper::load()
bool TodoStateMapper::save()
{
- QFile file( filename() );
+ TQFile file( filename() );
if ( !file.open( IO_WriteOnly ) ) {
kdError() << "Can't write uid map file '" << filename() << "'" << endl;
return false;
}
- QDataStream stream;
+ TQDataStream stream;
stream.setVersion( 6 );
stream.setDevice( &file );
stream << mTodoStateMap;
@@ -102,7 +102,7 @@ void TodoStateMapper::clear()
mTodoStateMap.clear();
}
-void TodoStateMapper::addTodoState( const QString &uid, int localState, const QString &remoteState )
+void TodoStateMapper::addTodoState( const TQString &uid, int localState, const TQString &remoteState )
{
TodoStateMapEntry entry;
entry.uid = uid;
@@ -112,7 +112,7 @@ void TodoStateMapper::addTodoState( const QString &uid, int localState, const QS
mTodoStateMap.insert( uid, entry );
}
-QString TodoStateMapper::remoteState( const QString &uid, int localState )
+TQString TodoStateMapper::remoteState( const TQString &uid, int localState )
{
if ( mTodoStateMap.find( uid ) == mTodoStateMap.end() )
kdError() << "TodoStateMapper: no entry for " << uid << " found" << endl;
@@ -124,12 +124,12 @@ QString TodoStateMapper::remoteState( const QString &uid, int localState )
return toRemote( localState );
}
-void TodoStateMapper::remove( const QString &uid )
+void TodoStateMapper::remove( const TQString &uid )
{
mTodoStateMap.remove( uid );
}
-int TodoStateMapper::toLocal( const QString &remoteState )
+int TodoStateMapper::toLocal( const TQString &remoteState )
{
if ( remoteState == "offer" )
return 0;
@@ -138,13 +138,13 @@ int TodoStateMapper::toLocal( const QString &remoteState )
else if ( remoteState == "done" || remoteState == "billed" )
return 100;
else {
- QString number( remoteState );
+ TQString number( remoteState );
number.replace( "%", "" );
return number.toInt();
}
}
-QString TodoStateMapper::toRemote( int localState )
+TQString TodoStateMapper::toRemote( int localState )
{
if ( localState == 0 )
return "offer";
@@ -153,12 +153,12 @@ QString TodoStateMapper::toRemote( int localState )
else if ( localState == 100 )
return "done";
else
- return QString( "%1%" ).arg( localState );
+ return TQString( "%1%" ).arg( localState );
}
-QString TodoStateMapper::filename()
+TQString TodoStateMapper::filename()
{
- QString file = mPath;
+ TQString file = mPath;
if ( !file.endsWith( "/" ) ) file += "/";
file += mIdentifier;
diff --git a/kresources/egroupware/todostatemapper.h b/kresources/egroupware/todostatemapper.h
index c5590ef25..46c531cfc 100644
--- a/kresources/egroupware/todostatemapper.h
+++ b/kresources/egroupware/todostatemapper.h
@@ -22,8 +22,8 @@
#ifndef TODOSTATEMAPPER_H
#define TODOSTATEMAPPER_H
-#include <qdatastream.h>
-#include <qmap.h>
+#include <tqdatastream.h>
+#include <tqmap.h>
class TodoStateMapper
{
@@ -35,41 +35,41 @@ class TodoStateMapper
TodoStateMapper();
~TodoStateMapper();
- void setPath( const QString &path );
- void setIdentifier( const QString &identifier );
+ void setPath( const TQString &path );
+ void setIdentifier( const TQString &identifier );
bool load();
bool save();
void clear();
- void addTodoState( const QString &uid, int localState, const QString &remoteState );
+ void addTodoState( const TQString &uid, int localState, const TQString &remoteState );
- QString remoteState( const QString &uid, int localState );
+ TQString remoteState( const TQString &uid, int localState );
- void remove( const QString &uid );
+ void remove( const TQString &uid );
- static int toLocal( const QString &remoteState );
- static QString toRemote( int localState );
+ static int toLocal( const TQString &remoteState );
+ static TQString toRemote( int localState );
protected:
- QString filename();
+ TQString filename();
private:
- QString mPath;
- QString mIdentifier;
+ TQString mPath;
+ TQString mIdentifier;
typedef struct {
- QString uid;
+ TQString uid;
int localState;
- QString remoteState;
+ TQString remoteState;
} TodoStateMapEntry;
- typedef QMap<QString, TodoStateMapEntry> TodoStateMap;
+ typedef TQMap<TQString, TodoStateMapEntry> TodoStateMap;
TodoStateMap mTodoStateMap;
- friend QDataStream &operator<<( QDataStream&, const TodoStateMapEntry& );
- friend QDataStream &operator>>( QDataStream&, TodoStateMapEntry& );
+ friend TQDataStream &operator<<( TQDataStream&, const TodoStateMapEntry& );
+ friend TQDataStream &operator>>( TQDataStream&, TodoStateMapEntry& );
};
#endif
diff --git a/kresources/egroupware/xmlrpciface.cpp b/kresources/egroupware/xmlrpciface.cpp
index 0158e23d1..2d91edbde 100644
--- a/kresources/egroupware/xmlrpciface.cpp
+++ b/kresources/egroupware/xmlrpciface.cpp
@@ -8,7 +8,7 @@
* (at your option) any later version. *
***************************************************************************/
-#include <qfile.h>
+#include <tqfile.h>
#include <kdebug.h>
#include <kio/job.h>
@@ -37,11 +37,11 @@ namespace KXMLRPC
{
return m_errorCode;
}
- QString errorString() const
+ TQString errorString() const
{
return m_errorString;
}
- QValueList<QVariant> data() const
+ TQValueList<TQVariant> data() const
{
return m_data;
}
@@ -49,24 +49,24 @@ namespace KXMLRPC
private:
bool m_success;
int m_errorCode;
- QString m_errorString;
- QValueList<QVariant> m_data;
+ TQString m_errorString;
+ TQValueList<TQVariant> m_data;
};
}
-Query *Query::create( const QVariant &id, QObject *parent, const char *name )
+Query *Query::create( const TQVariant &id, TQObject *parent, const char *name )
{
return new Query( id, parent, name );
}
-void Query::call( const QString &server, const QString &method,
- const QValueList<QVariant> &args, const QString &userAgent )
+void Query::call( const TQString &server, const TQString &method,
+ const TQValueList<TQVariant> &args, const TQString &userAgent )
{
- const QString xmlMarkup = markupCall( method, args );
+ const TQString xmlMarkup = markupCall( method, args );
DebugDialog::addMessage( xmlMarkup, DebugDialog::Output );
- QByteArray postData;
- QDataStream stream( postData, IO_WriteOnly );
+ TQByteArray postData;
+ TQDataStream stream( postData, IO_WriteOnly );
stream.writeRawBytes( xmlMarkup.utf8(), xmlMarkup.utf8().length() );
KIO::TransferJob *job = KIO::http_post( KURL( server ), postData, false );
@@ -78,15 +78,15 @@ void Query::call( const QString &server, const QString &method,
job->addMetaData( "content-type", "Content-Type: text/xml; charset=utf-8" );
job->addMetaData( "ConnectTimeout", "50" );
- connect( job, SIGNAL( data( KIO::Job *, const QByteArray & ) ),
- this, SLOT( slotData( KIO::Job *, const QByteArray & ) ) );
- connect( job, SIGNAL( result( KIO::Job * ) ),
- this, SLOT( slotResult( KIO::Job * ) ) );
+ connect( job, TQT_SIGNAL( data( KIO::Job *, const TQByteArray & ) ),
+ this, TQT_SLOT( slotData( KIO::Job *, const TQByteArray & ) ) );
+ connect( job, TQT_SIGNAL( result( KIO::Job * ) ),
+ this, TQT_SLOT( slotResult( KIO::Job * ) ) );
m_pendingJobs.append( job );
}
-void Query::slotData( KIO::Job *, const QByteArray &data )
+void Query::slotData( KIO::Job *, const TQByteArray &data )
{
unsigned int oldSize = m_buffer.size();
m_buffer.resize( oldSize + data.size() );
@@ -104,11 +104,11 @@ void Query::slotResult( KIO::Job *job )
return ;
}
- QString data = QString::fromUtf8( m_buffer.data(), m_buffer.size() );
+ TQString data = TQString::fromUtf8( m_buffer.data(), m_buffer.size() );
DebugDialog::addMessage( data, DebugDialog::Input );
- QDomDocument doc;
- QString errMsg;
+ TQDomDocument doc;
+ TQString errMsg;
int errLine, errCol;
if ( !doc.setContent( data, false, &errMsg, &errLine, &errCol ) )
{
@@ -134,17 +134,17 @@ void Query::slotResult( KIO::Job *job )
emit finished( this );
}
-bool Query::isMessageResponse( const QDomDocument &doc ) const
+bool Query::isMessageResponse( const TQDomDocument &doc ) const
{
return doc.documentElement().firstChild().toElement().tagName().lower() == "params";
}
-Result Query::parseMessageResponse( const QDomDocument &doc ) const
+Result Query::parseMessageResponse( const TQDomDocument &doc ) const
{
Result response;
response.m_success = true;
- QDomNode paramNode = doc.documentElement().firstChild().firstChild();
+ TQDomNode paramNode = doc.documentElement().firstChild().firstChild();
while ( !paramNode.isNull() )
{
response.m_data << demarshal( paramNode.firstChild().toElement() );
@@ -154,36 +154,36 @@ Result Query::parseMessageResponse( const QDomDocument &doc ) const
return response;
}
-bool Query::isFaultResponse( const QDomDocument &doc ) const
+bool Query::isFaultResponse( const TQDomDocument &doc ) const
{
return doc.documentElement().firstChild().toElement().tagName().lower() == "fault";
}
-Result Query::parseFaultResponse( const QDomDocument &doc ) const
+Result Query::parseFaultResponse( const TQDomDocument &doc ) const
{
Result response;
response.m_success = false;
- QDomNode errorNode = doc.documentElement().firstChild().firstChild();
- const QVariant errorVariant = demarshal( errorNode.toElement() );
+ TQDomNode errorNode = doc.documentElement().firstChild().firstChild();
+ const TQVariant errorVariant = demarshal( errorNode.toElement() );
response.m_errorCode = errorVariant.toMap() [ "faultCode" ].toInt();
response.m_errorString = errorVariant.toMap() [ "faultString" ].toString();
return response;
}
-QString Query::markupCall( const QString &cmd,
- const QValueList<QVariant> &args ) const
+TQString Query::markupCall( const TQString &cmd,
+ const TQValueList<TQVariant> &args ) const
{
- QString markup = "<?xml version=\"1.0\" ?>\r\n<methodCall>\r\n";
+ TQString markup = "<?xml version=\"1.0\" ?>\r\n<methodCall>\r\n";
markup += "<methodName>" + cmd + "</methodName>\r\n";
if ( !args.isEmpty() )
{
markup += "<params>\r\n";
- QValueList<QVariant>::ConstIterator it = args.begin();
- QValueList<QVariant>::ConstIterator end = args.end();
+ TQValueList<TQVariant>::ConstIterator it = args.begin();
+ TQValueList<TQVariant>::ConstIterator end = args.end();
for ( ; it != end; ++it )
markup += "<param>\r\n" + marshal( *it ) + "</param>\r\n";
markup += "</params>\r\n";
@@ -194,52 +194,52 @@ QString Query::markupCall( const QString &cmd,
return markup;
}
-QString Query::marshal( const QVariant &arg ) const
+TQString Query::marshal( const TQVariant &arg ) const
{
switch ( arg.type() )
{
- case QVariant::String:
- case QVariant::CString:
+ case TQVariant::String:
+ case TQVariant::CString:
{
- QString result = arg.toString();
+ TQString result = arg.toString();
result = result.replace( "&", "&amp;" );
result = result.replace( "\"", "&quot;" );
result = result.replace( "<", "&lt;" );
result = result.replace( ">", "&gt;" );
return "<value><string>" + result + "</string></value>\r\n";
}
- case QVariant::Int:
- return "<value><int>" + QString::number( arg.toInt() ) + "</int></value>\r\n";
- case QVariant::Double:
- return "<value><double>" + QString::number( arg.toDouble() ) + "</double></value>\r\n";
- case QVariant::Bool:
+ case TQVariant::Int:
+ return "<value><int>" + TQString::number( arg.toInt() ) + "</int></value>\r\n";
+ case TQVariant::Double:
+ return "<value><double>" + TQString::number( arg.toDouble() ) + "</double></value>\r\n";
+ case TQVariant::Bool:
{
- QString markup = "<value><boolean>";
+ TQString markup = "<value><boolean>";
markup += arg.toBool() ? "1" : "0";
markup += "</boolean></value>\r\n";
return markup;
}
- case QVariant::ByteArray:
+ case TQVariant::ByteArray:
return "<value><base64>" + KCodecs::base64Encode( arg.toByteArray() ) + "</base64></value>\r\n";
- case QVariant::DateTime:
+ case TQVariant::DateTime:
return "<value><datetime.iso8601>" + arg.toDateTime().toString( Qt::ISODate ) + "</datetime.iso8601></value>\r\n";
- case QVariant::List:
+ case TQVariant::List:
{
- QString markup = "<value><array><data>\r\n";
- const QValueList<QVariant> args = arg.toList();
- QValueList<QVariant>::ConstIterator it = args.begin();
- QValueList<QVariant>::ConstIterator end = args.end();
+ TQString markup = "<value><array><data>\r\n";
+ const TQValueList<TQVariant> args = arg.toList();
+ TQValueList<TQVariant>::ConstIterator it = args.begin();
+ TQValueList<TQVariant>::ConstIterator end = args.end();
for ( ; it != end; ++it )
markup += marshal( *it );
markup += "</data></array></value>\r\n";
return markup;
}
- case QVariant::Map:
+ case TQVariant::Map:
{
- QString markup = "<value><struct>\r\n";
- QMap<QString, QVariant> map = arg.toMap();
- QMap<QString, QVariant>::ConstIterator it = map.begin();
- QMap<QString, QVariant>::ConstIterator end = map.end();
+ TQString markup = "<value><struct>\r\n";
+ TQMap<TQString, TQVariant> map = arg.toMap();
+ TQMap<TQString, TQVariant>::ConstIterator it = map.begin();
+ TQMap<TQString, TQVariant>::ConstIterator end = map.end();
for ( ; it != end; ++it )
{
markup += "<member>\r\n";
@@ -253,76 +253,76 @@ QString Query::marshal( const QVariant &arg ) const
default:
kdWarning() << "Failed to marshal unknown variant type: " << arg.type() << endl;
};
- return QString::null;
+ return TQString::null;
}
-QVariant Query::demarshal( const QDomElement &elem ) const
+TQVariant Query::demarshal( const TQDomElement &elem ) const
{
Q_ASSERT( elem.tagName().lower() == "value" );
- const QDomElement typeElement = elem.firstChild().toElement();
- const QString typeName = typeElement.tagName().lower();
+ const TQDomElement typeElement = elem.firstChild().toElement();
+ const TQString typeName = typeElement.tagName().lower();
if ( typeName == "string" )
- return QVariant( typeElement.text() );
+ return TQVariant( typeElement.text() );
else if ( typeName == "i4" || typeName == "int" )
- return QVariant( typeElement.text().toInt() );
+ return TQVariant( typeElement.text().toInt() );
else if ( typeName == "double" )
- return QVariant( typeElement.text().toDouble() );
+ return TQVariant( typeElement.text().toDouble() );
else if ( typeName == "boolean" )
{
if ( typeElement.text().lower() == "true" || typeElement.text() == "1" )
- return QVariant( true );
+ return TQVariant( true );
else
- return QVariant( false );
+ return TQVariant( false );
}
else if ( typeName == "base64" )
- return QVariant( KCodecs::base64Decode( typeElement.text().latin1() ) );
+ return TQVariant( KCodecs::base64Decode( typeElement.text().latin1() ) );
else if ( typeName == "datetime" || typeName == "datetime.iso8601" )
- return QVariant( QDateTime::fromString( typeElement.text(), Qt::ISODate ) );
+ return TQVariant( TQDateTime::fromString( typeElement.text(), Qt::ISODate ) );
else if ( typeName == "array" )
{
- QValueList<QVariant> values;
- QDomNode valueNode = typeElement.firstChild().firstChild();
+ TQValueList<TQVariant> values;
+ TQDomNode valueNode = typeElement.firstChild().firstChild();
while ( !valueNode.isNull() )
{
values << demarshal( valueNode.toElement() );
valueNode = valueNode.nextSibling();
}
- return QVariant( values );
+ return TQVariant( values );
}
else if ( typeName == "struct" )
{
- QMap<QString, QVariant> map;
- QDomNode memberNode = typeElement.firstChild();
+ TQMap<TQString, TQVariant> map;
+ TQDomNode memberNode = typeElement.firstChild();
while ( !memberNode.isNull() )
{
- const QString key = memberNode.toElement().elementsByTagName( "name" ).item( 0 ).toElement().text();
- const QVariant data = demarshal( memberNode.toElement().elementsByTagName( "value" ).item( 0 ).toElement() );
+ const TQString key = memberNode.toElement().elementsByTagName( "name" ).item( 0 ).toElement().text();
+ const TQVariant data = demarshal( memberNode.toElement().elementsByTagName( "value" ).item( 0 ).toElement() );
map[ key ] = data;
memberNode = memberNode.nextSibling();
}
- return QVariant( map );
+ return TQVariant( map );
}
else
kdWarning() << "Cannot demarshal unknown type " << typeName << endl;
- return QVariant();
+ return TQVariant();
}
-Query::Query( const QVariant &id, QObject *parent, const char *name )
- : QObject( parent, name ), m_id( id )
+Query::Query( const TQVariant &id, TQObject *parent, const char *name )
+ : TQObject( parent, name ), m_id( id )
{}
Query::~Query()
{
- QValueList<KIO::Job*>::Iterator it;
+ TQValueList<KIO::Job*>::Iterator it;
for ( it = m_pendingJobs.begin(); it != m_pendingJobs.end(); ++it )
(*it)->kill();
}
-Server::Server( const KURL &url, QObject *parent, const char *name )
- : QObject( parent, name )
+Server::Server( const KURL &url, TQObject *parent, const char *name )
+ : TQObject( parent, name )
{
if ( url.isValid() )
m_url = url;
@@ -334,7 +334,7 @@ Server::Server( const KURL &url, QObject *parent, const char *name )
Server::~Server()
{
- QValueList<Query*>::Iterator it;
+ TQValueList<Query*>::Iterator it;
for ( it = mPendingQueries.begin(); it !=mPendingQueries.end(); ++it )
(*it)->deleteLater();
@@ -352,112 +352,112 @@ void Server::setUrl( const KURL &url )
m_url = url.isValid() ? url : KURL();
}
-void Server::call( const QString &method, const QValueList<QVariant> &args,
- QObject* msgObj, const char* messageSlot,
- QObject* faultObj, const char* faultSlot, const QVariant &id )
+void Server::call( const TQString &method, const TQValueList<TQVariant> &args,
+ TQObject* msgObj, const char* messageSlot,
+ TQObject* faultObj, const char* faultSlot, const TQVariant &id )
{
if ( m_url.isEmpty() )
kdWarning() << "Cannot execute call to " << method << ": empty server URL" << endl;
Query *query = Query::create( id, this );
- connect( query, SIGNAL( message( const QValueList<QVariant> &, const QVariant& ) ), msgObj, messageSlot );
- connect( query, SIGNAL( fault( int, const QString&, const QVariant& ) ), faultObj, faultSlot );
- connect( query, SIGNAL( finished( Query* ) ), this, SLOT( queryFinished( Query* ) ) );
+ connect( query, TQT_SIGNAL( message( const TQValueList<TQVariant> &, const TQVariant& ) ), msgObj, messageSlot );
+ connect( query, TQT_SIGNAL( fault( int, const TQString&, const TQVariant& ) ), faultObj, faultSlot );
+ connect( query, TQT_SIGNAL( finished( Query* ) ), this, TQT_SLOT( queryFinished( Query* ) ) );
mPendingQueries.append( query );
query->call( m_url.url(), method, args, m_userAgent );
}
-void Server::call( const QString &method, const QVariant &arg,
- QObject* msgObj, const char* messageSlot,
- QObject* faultObj, const char* faultSlot,
- const QVariant &id )
+void Server::call( const TQString &method, const TQVariant &arg,
+ TQObject* msgObj, const char* messageSlot,
+ TQObject* faultObj, const char* faultSlot,
+ const TQVariant &id )
{
- QValueList<QVariant> args;
+ TQValueList<TQVariant> args;
args << arg ;
call( method, args, msgObj, messageSlot, faultObj, faultSlot, id );
}
-void Server::call( const QString &method, int arg,
- QObject* msgObj, const char* messageSlot,
- QObject* faultObj, const char* faultSlot,
- const QVariant &id )
+void Server::call( const TQString &method, int arg,
+ TQObject* msgObj, const char* messageSlot,
+ TQObject* faultObj, const char* faultSlot,
+ const TQVariant &id )
{
- QValueList<QVariant> args;
- args << QVariant( arg );
+ TQValueList<TQVariant> args;
+ args << TQVariant( arg );
call( method, args, msgObj, messageSlot, faultObj, faultSlot, id );
}
-void Server::call( const QString &method, bool arg,
- QObject* msgObj, const char* messageSlot,
- QObject* faultObj, const char* faultSlot,
- const QVariant &id )
+void Server::call( const TQString &method, bool arg,
+ TQObject* msgObj, const char* messageSlot,
+ TQObject* faultObj, const char* faultSlot,
+ const TQVariant &id )
{
- QValueList<QVariant> args;
- args << QVariant( arg );
+ TQValueList<TQVariant> args;
+ args << TQVariant( arg );
call( method, args, msgObj, messageSlot, faultObj, faultSlot, id );
}
-void Server::call( const QString &method, double arg ,
- QObject* msgObj, const char* messageSlot,
- QObject* faultObj, const char* faultSlot,
- const QVariant &id )
+void Server::call( const TQString &method, double arg ,
+ TQObject* msgObj, const char* messageSlot,
+ TQObject* faultObj, const char* faultSlot,
+ const TQVariant &id )
{
- QValueList<QVariant> args;
- args << QVariant( arg );
+ TQValueList<TQVariant> args;
+ args << TQVariant( arg );
call( method, args, msgObj, messageSlot, faultObj, faultSlot, id );
}
-void Server::call( const QString &method, const QString &arg ,
- QObject* msgObj, const char* messageSlot,
- QObject* faultObj, const char* faultSlot,
- const QVariant &id )
+void Server::call( const TQString &method, const TQString &arg ,
+ TQObject* msgObj, const char* messageSlot,
+ TQObject* faultObj, const char* faultSlot,
+ const TQVariant &id )
{
- QValueList<QVariant> args;
- args << QVariant( arg );
+ TQValueList<TQVariant> args;
+ args << TQVariant( arg );
call( method, args, msgObj, messageSlot, faultObj, faultSlot, id );
}
-void Server::call( const QString &method, const QCString &arg,
- QObject* msgObj, const char* messageSlot,
- QObject* faultObj, const char* faultSlot,
- const QVariant &id )
+void Server::call( const TQString &method, const TQCString &arg,
+ TQObject* msgObj, const char* messageSlot,
+ TQObject* faultObj, const char* faultSlot,
+ const TQVariant &id )
{
- QValueList<QVariant> args;
- args << QVariant( arg );
+ TQValueList<TQVariant> args;
+ args << TQVariant( arg );
call( method, args, msgObj, messageSlot, faultObj, faultSlot, id );
}
-void Server::call( const QString &method, const QByteArray &arg ,
- QObject* msgObj, const char* messageSlot,
- QObject* faultObj, const char* faultSlot,
- const QVariant &id )
+void Server::call( const TQString &method, const TQByteArray &arg ,
+ TQObject* msgObj, const char* messageSlot,
+ TQObject* faultObj, const char* faultSlot,
+ const TQVariant &id )
{
- QValueList<QVariant> args;
- args << QVariant( arg );
+ TQValueList<TQVariant> args;
+ args << TQVariant( arg );
call( method, args, faultObj, faultSlot, msgObj, messageSlot, id );
}
-void Server::call( const QString &method, const QDateTime &arg,
- QObject* msgObj, const char* messageSlot,
- QObject* faultObj, const char* faultSlot,
- const QVariant &id )
+void Server::call( const TQString &method, const TQDateTime &arg,
+ TQObject* msgObj, const char* messageSlot,
+ TQObject* faultObj, const char* faultSlot,
+ const TQVariant &id )
{
- QValueList<QVariant> args;
- args << QVariant( arg );
+ TQValueList<TQVariant> args;
+ args << TQVariant( arg );
call( method, args, msgObj, messageSlot, faultObj, faultSlot, id );
}
-void Server::call( const QString &method, const QStringList &arg,
- QObject* msgObj, const char* messageSlot,
- QObject* faultObj, const char* faultSlot,
- const QVariant &id )
+void Server::call( const TQString &method, const TQStringList &arg,
+ TQObject* msgObj, const char* messageSlot,
+ TQObject* faultObj, const char* faultSlot,
+ const TQVariant &id )
{
- QValueList<QVariant> args;
- QStringList::ConstIterator it = arg.begin();
- QStringList::ConstIterator end = arg.end();
+ TQValueList<TQVariant> args;
+ TQStringList::ConstIterator it = arg.begin();
+ TQStringList::ConstIterator end = arg.end();
for ( ; it != end; ++it )
- args << QVariant( *it );
+ args << TQVariant( *it );
call( method, args, msgObj, messageSlot, faultObj, faultSlot, id );
}
diff --git a/kresources/egroupware/xmlrpciface.h b/kresources/egroupware/xmlrpciface.h
index 0e5f6c927..a1460c21c 100644
--- a/kresources/egroupware/xmlrpciface.h
+++ b/kresources/egroupware/xmlrpciface.h
@@ -12,11 +12,11 @@
#include <kurl.h>
-#include <qbuffer.h>
-#include <qdom.h>
-#include <qobject.h>
-#include <qvariant.h>
-#include <qvaluelist.h>
+#include <tqbuffer.h>
+#include <tqdom.h>
+#include <tqobject.h>
+#include <tqvariant.h>
+#include <tqvaluelist.h>
namespace KIO
{
@@ -36,42 +36,42 @@ namespace KXMLRPC
public:
- static Query *create( const QVariant &id = QVariant(),
- QObject *parent = 0, const char *name = 0 );
+ static Query *create( const TQVariant &id = TQVariant(),
+ TQObject *parent = 0, const char *name = 0 );
public slots:
- void call( const QString &server, const QString &method,
- const QValueList<QVariant> &args = QValueList<QVariant>(),
- const QString &userAgent = "KDE-XMLRPC" );
+ void call( const TQString &server, const TQString &method,
+ const TQValueList<TQVariant> &args = TQValueList<TQVariant>(),
+ const TQString &userAgent = "KDE-XMLRPC" );
signals:
- void message( const QValueList<QVariant> &result, const QVariant &id );
- void fault( int, const QString&, const QVariant &id );
+ void message( const TQValueList<TQVariant> &result, const TQVariant &id );
+ void fault( int, const TQString&, const TQVariant &id );
void finished( Query* );
private slots:
- void slotData( KIO::Job *job, const QByteArray &data );
+ void slotData( KIO::Job *job, const TQByteArray &data );
void slotResult( KIO::Job *job );
private:
- bool isMessageResponse( const QDomDocument &doc ) const;
- bool isFaultResponse( const QDomDocument &doc ) const;
+ bool isMessageResponse( const TQDomDocument &doc ) const;
+ bool isFaultResponse( const TQDomDocument &doc ) const;
- Result parseMessageResponse( const QDomDocument &doc ) const;
- Result parseFaultResponse( const QDomDocument &doc ) const;
+ Result parseMessageResponse( const TQDomDocument &doc ) const;
+ Result parseFaultResponse( const TQDomDocument &doc ) const;
- QString markupCall( const QString &method,
- const QValueList<QVariant> &args ) const;
- QString marshal( const QVariant &v ) const;
- QVariant demarshal( const QDomElement &e ) const;
+ TQString markupCall( const TQString &method,
+ const TQValueList<TQVariant> &args ) const;
+ TQString marshal( const TQVariant &v ) const;
+ TQVariant demarshal( const TQDomElement &e ) const;
- Query( const QVariant &id, QObject *parent = 0, const char *name = 0 );
+ Query( const TQVariant &id, TQObject *parent = 0, const char *name = 0 );
~Query();
- QByteArray m_buffer;
- QVariant m_id;
+ TQByteArray m_buffer;
+ TQVariant m_id;
- QValueList<KIO::Job*> m_pendingJobs;
+ TQValueList<KIO::Job*> m_pendingJobs;
};
class Server : public QObject
@@ -79,85 +79,85 @@ namespace KXMLRPC
Q_OBJECT
public:
Server( const KURL &url = KURL(),
- QObject *parent = 0, const char *name = 0 );
+ TQObject *parent = 0, const char *name = 0 );
~Server();
const KURL &url() const { return m_url; }
void setUrl( const KURL &url );
- QString userAgent() const { return m_userAgent; }
- void setUserAgent( const QString &userAgent ) { m_userAgent = userAgent; }
+ TQString userAgent() const { return m_userAgent; }
+ void setUserAgent( const TQString &userAgent ) { m_userAgent = userAgent; }
template <typename T>
- void call( const QString &method, const QValueList<T> &arg,
- QObject* obj1, const char* faultSlot,
- QObject* obj2, const char* messageSlot, const QVariant &id = QVariant() );
+ void call( const TQString &method, const TQValueList<T> &arg,
+ TQObject* obj1, const char* faultSlot,
+ TQObject* obj2, const char* messageSlot, const TQVariant &id = TQVariant() );
public slots:
- void call( const QString &method, const QValueList<QVariant> &args,
- QObject* faultObj, const char* faultSlot,
- QObject* msgObj, const char* messageSlot,
- const QVariant &id = QVariant() );
- void call( const QString &method, const QVariant &arg,
- QObject* faultObj, const char* faultSlot,
- QObject* msgObj, const char* messageSlot,
- const QVariant &id = QVariant() );
- void call( const QString &method, int arg ,
- QObject* faultObj, const char* faultSlot,
- QObject* msgObj, const char* messageSlot,
- const QVariant &id = QVariant() );
- void call( const QString &method, bool arg,
- QObject* faultObj, const char* faultSlot,
- QObject* msgObj, const char* messageSlot,
- const QVariant &id = QVariant() );
- void call( const QString &method, double arg,
- QObject* faultObj, const char* faultSlot,
- QObject* msgObj, const char* messageSlot,
- const QVariant &id = QVariant() );
- void call( const QString &method, const QString &arg,
- QObject* faultObj, const char* faultSlot,
- QObject* msgObj, const char* messageSlot,
- const QVariant &id = QVariant() );
- void call( const QString &method, const QCString &arg ,
- QObject* faultObj, const char* faultSlot,
- QObject* msgObj, const char* messageSlot,
- const QVariant &id = QVariant() );
- void call( const QString &method, const QByteArray &arg,
- QObject* faultObj, const char* faultSlot,
- QObject* msgObj, const char* messageSlot,
- const QVariant &id = QVariant() );
- void call( const QString &method, const QDateTime &arg,
- QObject* faultObj, const char* faultSlot,
- QObject* msgObj, const char* messageSlot,
- const QVariant &id = QVariant() );
- void call( const QString &method, const QStringList &arg,
- QObject* faultObj, const char* faultSlot,
- QObject* msgObj, const char* messageSlot,
- const QVariant &id = QVariant() );
+ void call( const TQString &method, const TQValueList<TQVariant> &args,
+ TQObject* faultObj, const char* faultSlot,
+ TQObject* msgObj, const char* messageSlot,
+ const TQVariant &id = TQVariant() );
+ void call( const TQString &method, const TQVariant &arg,
+ TQObject* faultObj, const char* faultSlot,
+ TQObject* msgObj, const char* messageSlot,
+ const TQVariant &id = TQVariant() );
+ void call( const TQString &method, int arg ,
+ TQObject* faultObj, const char* faultSlot,
+ TQObject* msgObj, const char* messageSlot,
+ const TQVariant &id = TQVariant() );
+ void call( const TQString &method, bool arg,
+ TQObject* faultObj, const char* faultSlot,
+ TQObject* msgObj, const char* messageSlot,
+ const TQVariant &id = TQVariant() );
+ void call( const TQString &method, double arg,
+ TQObject* faultObj, const char* faultSlot,
+ TQObject* msgObj, const char* messageSlot,
+ const TQVariant &id = TQVariant() );
+ void call( const TQString &method, const TQString &arg,
+ TQObject* faultObj, const char* faultSlot,
+ TQObject* msgObj, const char* messageSlot,
+ const TQVariant &id = TQVariant() );
+ void call( const TQString &method, const TQCString &arg ,
+ TQObject* faultObj, const char* faultSlot,
+ TQObject* msgObj, const char* messageSlot,
+ const TQVariant &id = TQVariant() );
+ void call( const TQString &method, const TQByteArray &arg,
+ TQObject* faultObj, const char* faultSlot,
+ TQObject* msgObj, const char* messageSlot,
+ const TQVariant &id = TQVariant() );
+ void call( const TQString &method, const TQDateTime &arg,
+ TQObject* faultObj, const char* faultSlot,
+ TQObject* msgObj, const char* messageSlot,
+ const TQVariant &id = TQVariant() );
+ void call( const TQString &method, const TQStringList &arg,
+ TQObject* faultObj, const char* faultSlot,
+ TQObject* msgObj, const char* messageSlot,
+ const TQVariant &id = TQVariant() );
private slots:
void queryFinished( Query* );
private:
KURL m_url;
- QString m_userAgent;
+ TQString m_userAgent;
- QValueList<Query*> mPendingQueries;
+ TQValueList<Query*> mPendingQueries;
};
}
template <typename T>
-void KXMLRPC::Server::call( const QString &method, const QValueList<T> &arg,
- QObject* faultObj, const char* faultSlot,
- QObject* msgObj, const char* messageSlot, const QVariant &id )
+void KXMLRPC::Server::call( const TQString &method, const TQValueList<T> &arg,
+ TQObject* faultObj, const char* faultSlot,
+ TQObject* msgObj, const char* messageSlot, const TQVariant &id )
{
- QValueList<QVariant> args;
+ TQValueList<TQVariant> args;
- typename QValueList<T>::ConstIterator it = arg.begin();
- typename QValueList<T>::ConstIterator end = arg.end();
+ typename TQValueList<T>::ConstIterator it = arg.begin();
+ typename TQValueList<T>::ConstIterator end = arg.end();
for ( ; it != end; ++it )
- args << QVariant( *it );
+ args << TQVariant( *it );
return call( method, args, faultObj, faultSlot, msgObj, messageSlot, id );
}
diff --git a/kresources/exchange/dateset.cpp b/kresources/exchange/dateset.cpp
index f79810960..a2372c874 100644
--- a/kresources/exchange/dateset.cpp
+++ b/kresources/exchange/dateset.cpp
@@ -20,9 +20,9 @@
// $Id$
-#include <qptrlist.h>
-#include <qdatetime.h>
-#include <qpair.h>
+#include <tqptrlist.h>
+#include <tqdatetime.h>
+#include <tqpair.h>
#include <kdebug.h>
@@ -42,34 +42,34 @@ DateSet::~DateSet()
delete mDates;
}
-void DateSet::add( QDate const& date )
+void DateSet::add( TQDate const& date )
{
if (mDates->isEmpty()) {
- mDates->insert( 0, new QPair<QDate,QDate>( date, date ) );
+ mDates->insert( 0, new QPair<TQDate,TQDate>( date, date ) );
return;
}
int i = find( date );
- mDates->insert( i, new QPair<QDate,QDate>( date, date ) );
+ mDates->insert( i, new QPair<TQDate,TQDate>( date, date ) );
tryMerge( i );
tryMerge( i-1 );
}
-void DateSet::add( QDate const& from, QDate const& to )
+void DateSet::add( TQDate const& from, TQDate const& to )
{
if (mDates->isEmpty()) {
- mDates->insert( 0, new QPair<QDate,QDate>( from, to ) );
+ mDates->insert( 0, new QPair<TQDate,TQDate>( from, to ) );
return;
}
uint i = find( from );
kdDebug() << "Adding range at position " << i << endl;
- mDates->insert( i, new QPair<QDate,QDate>( from, to ) );
+ mDates->insert( i, new QPair<TQDate,TQDate>( from, to ) );
do {
} while ( tryMerge( i ) );
do {
} while ( tryMerge( i-1 ) );
/*
- QPair<QDate,QDate>* item = mDates->at( i );
+ QPair<TQDate,TQDate>* item = mDates->at( i );
if (to >= item->first)
return;
@@ -77,11 +77,11 @@ void DateSet::add( QDate const& from, QDate const& to )
if (to.daysTo( item->first ) == 1 )
item->first = from;
else
- mDates->insert( i, new QPair<QDate,QDate>( from, to ) );
+ mDates->insert( i, new QPair<TQDate,TQDate>( from, to ) );
*/
}
-void DateSet::remove( QDate const& date )
+void DateSet::remove( TQDate const& date )
{
if (mDates->isEmpty()) {
return;
@@ -91,7 +91,7 @@ void DateSet::remove( QDate const& date )
if ( i == mDates->count() )
return;
- QPair<QDate,QDate>* item = mDates->at( i );
+ QPair<TQDate,TQDate>* item = mDates->at( i );
if ( date < item->first )
return;
if ( date == item->first ) {
@@ -106,12 +106,12 @@ void DateSet::remove( QDate const& date )
if ( date == item->second ) {
item->second = item->second.addDays( -1 );
} else {
- mDates->insert( i, new QPair<QDate,QDate>(item->first, date.addDays( -1 ) ) );
+ mDates->insert( i, new QPair<TQDate,TQDate>(item->first, date.addDays( -1 ) ) );
item->first = date.addDays( 1 );
}
}
-void DateSet::remove( QDate const& from, QDate const& to )
+void DateSet::remove( TQDate const& from, TQDate const& to )
{
if (mDates->isEmpty()) {
return;
@@ -122,7 +122,7 @@ void DateSet::remove( QDate const& from, QDate const& to )
return;
while( i < mDates->count() ) {
- QPair<QDate,QDate>* item = mDates->at( i );
+ QPair<TQDate,TQDate>* item = mDates->at( i );
// Check if we're done: next item is later dan removal period
if ( to < item->first )
break;
@@ -136,7 +136,7 @@ void DateSet::remove( QDate const& from, QDate const& to )
// Check if we should take a slice out of the middle of the item
if ( from > item->first && to < item->second ) {
- mDates->insert( i, new QPair<QDate,QDate>( item->first, from.addDays( -1 ) ) );
+ mDates->insert( i, new QPair<TQDate,TQDate>( item->first, from.addDays( -1 ) ) );
item->first = to.addDays( 1 );
break; // We're done
}
@@ -155,7 +155,7 @@ void DateSet::remove( QDate const& from, QDate const& to )
}
}
-bool DateSet::contains( QDate const& date )
+bool DateSet::contains( TQDate const& date )
{
if (mDates->isEmpty()) {
return false;
@@ -166,13 +166,13 @@ bool DateSet::contains( QDate const& date )
if ( i == mDates->count() )
return false;
- QPair<QDate,QDate>* item = mDates->at( i );
+ QPair<TQDate,TQDate>* item = mDates->at( i );
// kdDebug() << "contains looking at range " << item->first.toString() << " -- " << item->second.toString() << endl;
return ( item->first <= date );
}
// returns true if and only if the whole range is in the set
-bool DateSet::contains( QDate const& from, QDate const& to )
+bool DateSet::contains( TQDate const& from, TQDate const& to )
{
if (mDates->isEmpty()) {
return false;
@@ -182,7 +182,7 @@ bool DateSet::contains( QDate const& from, QDate const& to )
if ( i == mDates->count() )
return false;
- QPair<QDate,QDate>* item = mDates->at( i );
+ QPair<TQDate,TQDate>* item = mDates->at( i );
return ( from >= item->first && to <= item->second );
}
@@ -192,7 +192,7 @@ bool DateSet::contains( QDate const& from, QDate const& to )
// If mDates is empty, return 0.
// If date is later than the last item in mDates, return mDates->count()
-int DateSet::find( QDate const& date )
+int DateSet::find( TQDate const& date )
{
if ( mDates->isEmpty() )
return 0;
@@ -202,7 +202,7 @@ int DateSet::find( QDate const& date )
while ( start < end ) {
int i = start + (end-start) / 2;
// kdDebug() << start << ", " << i << ", " << end << endl;
- QPair<QDate,QDate> *item = mDates->at( i );
+ QPair<TQDate,TQDate> *item = mDates->at( i );
if ( item->first <= date && date <= item->second )
return i;
if ( date > item->second ) {
@@ -229,8 +229,8 @@ void DateSet::print()
{
for( uint i=0; i<mDates->count(); i++ )
{
- QDate start = mDates->at( i )->first;
- QDate end = mDates->at( i )->second;
+ TQDate start = mDates->at( i )->first;
+ TQDate end = mDates->at( i )->second;
if (start == end)
kdDebug() << start.toString() << endl;
else
@@ -246,8 +246,8 @@ bool DateSet::tryMerge( int i )
if ( i < 0 || i+1 >= (int)(mDates->count()) )
return false;
- QPair<QDate,QDate>* item1 = mDates->at( i );
- QPair<QDate,QDate>* item2 = mDates->at( i+1 );
+ QPair<TQDate,TQDate>* item1 = mDates->at( i );
+ QPair<TQDate,TQDate>* item2 = mDates->at( i+1 );
// First case: item1 starts before or on the same date as item2
if ( item1->first <= item2->first ) {
diff --git a/kresources/exchange/dateset.h b/kresources/exchange/dateset.h
index 5041f0d58..989d774cb 100644
--- a/kresources/exchange/dateset.h
+++ b/kresources/exchange/dateset.h
@@ -23,34 +23,34 @@
#ifndef _DATESET_H
#define _DATESET_H
-#include <qdatetime.h>
-#include <qpair.h>
-#include <qptrlist.h>
+#include <tqdatetime.h>
+#include <tqpair.h>
+#include <tqptrlist.h>
/*
class DateRange {
public:
DateRange() { }
- DateRange( QDate const& from, QDate const& to )
+ DateRange( TQDate const& from, TQDate const& to )
: mFrom( from ), mTo( to ) { }
bool operator< ( const DateRange& r ) { return mFrom < r.from(); }
- bool contains( QDate const& d ) { return ( mFrom <= d && d <= mTo ); }
- bool contains( QDate const& from, QDate const& to ) { return ( mFrom <= from && to <= mTo ); }
+ bool contains( TQDate const& d ) { return ( mFrom <= d && d <= mTo ); }
+ bool contains( TQDate const& from, TQDate const& to ) { return ( mFrom <= from && to <= mTo ); }
- QDate from() { return mFrom; }
- QDate to() { return mTo; }
+ TQDate from() { return mFrom; }
+ TQDate to() { return mTo; }
private:
- QDate mFrom;
- QDate mTo;
+ TQDate mFrom;
+ TQDate mTo;
}
*/
-class RangeList : public QPtrList< QPair<QDate, QDate> > {
+class RangeList : public TQPtrList< QPair<TQDate, TQDate> > {
protected:
- virtual int compareItems(QPtrCollection::Item item1, QPtrCollection::Item item2) {
- QPair<QDate,QDate> *i1 = static_cast<QPair<QDate,QDate> *> (item1);
- QPair<QDate,QDate> *i2 = static_cast<QPair<QDate,QDate> *> (item2);
+ virtual int compareItems(TQPtrCollection::Item item1, TQPtrCollection::Item item2) {
+ QPair<TQDate,TQDate> *i1 = static_cast<QPair<TQDate,TQDate> *> (item1);
+ QPair<TQDate,TQDate> *i2 = static_cast<QPair<TQDate,TQDate> *> (item2);
if ( *i1 < *i2 ) return -1;
if ( *i2 < *i1 ) return 1;
return 0;
@@ -62,17 +62,17 @@ class DateSet {
DateSet();
~DateSet();
- void add( QDate const& date );
- void add( QDate const& from, QDate const& to );
+ void add( TQDate const& date );
+ void add( TQDate const& from, TQDate const& to );
- void remove( QDate const& date );
- void remove( QDate const& from, QDate const& to );
+ void remove( TQDate const& date );
+ void remove( TQDate const& from, TQDate const& to );
- bool contains( QDate const& date );
+ bool contains( TQDate const& date );
// returns true if and only if the whole range is in the set
- bool contains( QDate const& from, QDate const& to );
+ bool contains( TQDate const& from, TQDate const& to );
- int find( QDate const &date );
+ int find( TQDate const &date );
void print();
protected:
@@ -80,8 +80,8 @@ class DateSet {
bool tryMerge( int i );
RangeList *mDates;
- QDate mOldestDate;
- QDate mNewestDate;
+ TQDate mOldestDate;
+ TQDate mNewestDate;
};
#endif
diff --git a/kresources/exchange/resourceexchange.cpp b/kresources/exchange/resourceexchange.cpp
index 355244922..8e877f9b0 100644
--- a/kresources/exchange/resourceexchange.cpp
+++ b/kresources/exchange/resourceexchange.cpp
@@ -20,11 +20,11 @@
#include <stdlib.h>
-#include <qdatetime.h>
-#include <qstring.h>
-#include <qptrlist.h>
-#include <qwidgetlist.h>
-#include <qwidget.h>
+#include <tqdatetime.h>
+#include <tqstring.h>
+#include <tqptrlist.h>
+#include <tqwidgetlist.h>
+#include <tqwidget.h>
#include <kdebug.h>
#include <kapplication.h>
@@ -78,7 +78,7 @@ ResourceExchange::ResourceExchange( const KConfig *config )
{
mLock = new KABC::LockNull( true );
- mTimeZoneId = QString::fromLatin1( "UTC" );
+ mTimeZoneId = TQString::fromLatin1( "UTC" );
kdDebug() << "Creating ResourceExchange" << endl;
if (config ) {
@@ -122,31 +122,31 @@ bool ResourceExchange::doOpen()
kdDebug() << "ResourceExchange::doOpen()" << endl;
mClient = new ExchangeClient( mAccount, mTimeZoneId );
- connect( mClient, SIGNAL( downloadFinished( int, const QString & ) ),
- SLOT( slotDownloadFinished( int, const QString & ) ) );
- connect( mClient, SIGNAL( event( KCal::Event *, const KURL & ) ),
- SLOT( downloadedEvent( KCal::Event *, const KURL & ) ) );
+ connect( mClient, TQT_SIGNAL( downloadFinished( int, const TQString & ) ),
+ TQT_SLOT( slotDownloadFinished( int, const TQString & ) ) );
+ connect( mClient, TQT_SIGNAL( event( KCal::Event *, const KURL & ) ),
+ TQT_SLOT( downloadedEvent( KCal::Event *, const KURL & ) ) );
#if 0
kdDebug() << "Creating monitor" << endl;
- QHostAddress ip;
+ TQHostAddress ip;
ip.setAddress( mAccount->host() );
mMonitor = new ExchangeMonitor( mAccount, ExchangeMonitor::CallBack, ip );
- connect( mMonitor, SIGNAL(notify( const QValueList<long>& , const QValueList<KURL>& )), this, SLOT(slotMonitorNotify( const QValueList<long>& , const QValueList<KURL>& )) );
- connect( mMonitor, SIGNAL(error(int , const QString&)), this, SLOT(slotMonitorError(int , const QString&)) );
+ connect( mMonitor, TQT_SIGNAL(notify( const TQValueList<long>& , const TQValueList<KURL>& )), this, TQT_SLOT(slotMonitorNotify( const TQValueList<long>& , const TQValueList<KURL>& )) );
+ connect( mMonitor, TQT_SIGNAL(error(int , const TQString&)), this, TQT_SLOT(slotMonitorError(int , const TQString&)) );
mMonitor->addWatch( mAccount->calendarURL(), ExchangeMonitor::UpdateNewMember, 1 );
#endif
- QWidgetList* widgets = QApplication::topLevelWidgets();
+ TQWidgetList* widgets = TQApplication::topLevelWidgets();
if ( !widgets->isEmpty() )
mClient->setWindow( widgets->first() );
delete widgets;
mDates = new DateSet();
- mEventDates = new QMap<Event,QDateTime>();
- mCacheDates = new QMap<QDate, QDateTime>();
+ mEventDates = new TQMap<Event,TQDateTime>();
+ mCacheDates = new TQMap<TQDate, TQDateTime>();
mCache = new CalendarLocal( mTimeZoneId );
// mOldestDate = 0L;
@@ -207,20 +207,20 @@ KABC::Lock *ResourceExchange::lock()
return mLock;
}
-void ResourceExchange::slotMonitorNotify( const QValueList<long>& IDs, const QValueList<KURL>& urls )
+void ResourceExchange::slotMonitorNotify( const TQValueList<long>& IDs, const TQValueList<KURL>& urls )
{
kdDebug() << "ResourceExchange::slotMonitorNotify()" << endl;
- QString result;
+ TQString result;
KPIM::ExchangeMonitor::IDList::ConstIterator it;
for ( it = IDs.begin(); it != IDs.end(); ++it ) {
if ( it == IDs.begin() )
- result += QString::number( (*it) );
+ result += TQString::number( (*it) );
else
- result += "," + QString::number( (*it) );
+ result += "," + TQString::number( (*it) );
}
kdDebug() << "Got signals for " << result << endl;
- QValueList<KURL>::ConstIterator it2;
+ TQValueList<KURL>::ConstIterator it2;
for ( it2 = urls.begin(); it2 != urls.end(); ++it2 ) {
kdDebug() << "URL: " << (*it2).prettyURL() << endl;
}
@@ -242,7 +242,7 @@ void ResourceExchange::slotMonitorNotify( const QValueList<long>& IDs, const QVa
*/
}
-void ResourceExchange::slotMonitorError( int errorCode, const QString& moreInfo )
+void ResourceExchange::slotMonitorError( int errorCode, const TQString& moreInfo )
{
kdError() << "Ignoring error from Exchange monitor, code=" << errorCode << "; more info: " << moreInfo << endl;
}
@@ -295,7 +295,7 @@ void ResourceExchange::changeIncidence( Incidence *incidence )
}
}
-Event *ResourceExchange::event( const QString &uid )
+Event *ResourceExchange::event( const TQString &uid )
{
kdDebug(5800) << "ResourceExchange::event(): " << uid << endl;
@@ -306,7 +306,7 @@ Event *ResourceExchange::event( const QString &uid )
return event;
}
-void ResourceExchange::subscribeEvents( const QDate &start, const QDate &end )
+void ResourceExchange::subscribeEvents( const TQDate &start, const TQDate &end )
{
kdDebug(5800) << "ResourceExchange::subscribeEvents()" << endl;
// FIXME: possible race condition if several subscribe events are run close
@@ -325,7 +325,7 @@ void ResourceExchange::downloadedEvent( KCal::Event *event, const KURL &url )
}
void ResourceExchange::slotDownloadFinished( int result,
- const QString &moreinfo )
+ const TQString &moreinfo )
{
kdDebug() << "ResourceExchange::downloadFinished" << endl;
@@ -336,7 +336,7 @@ void ResourceExchange::slotDownloadFinished( int result,
}
}
-void ResourceExchange::unsubscribeEvents( const QDate &/*start*/, const QDate &/*end*/ )
+void ResourceExchange::unsubscribeEvents( const TQDate &/*start*/, const TQDate &/*end*/ )
{
kdDebug() << "ResourceExchange::unsubscribeEvents()" << endl;
}
@@ -376,7 +376,7 @@ Todo::List ResourceExchange::rawTodos( TodoSortField /*sortField*/, SortDirectio
return list;*/
}
-Todo *ResourceExchange::todo( const QString &/*uid*/ )
+Todo *ResourceExchange::todo( const TQString &/*uid*/ )
{
// We don't handle todos yet
return 0;
@@ -386,7 +386,7 @@ Todo *ResourceExchange::todo( const QString &/*uid*/ )
return mCache->todo( uid );*/
}
-Todo::List ResourceExchange::rawTodosForDate( const QDate &/*date*/ )
+Todo::List ResourceExchange::rawTodosForDate( const TQDate &/*date*/ )
{
Todo::List list;
// We don't handle todos yet
@@ -395,7 +395,7 @@ Todo::List ResourceExchange::rawTodosForDate( const QDate &/*date*/ )
return list;
}
-Alarm::List ResourceExchange::alarmsTo( const QDateTime &to )
+Alarm::List ResourceExchange::alarmsTo( const TQDateTime &to )
{
Alarm::List list;
if ( mCache )
@@ -404,13 +404,13 @@ Alarm::List ResourceExchange::alarmsTo( const QDateTime &to )
}
/* Invoked by korgac when checking alarms. Always updates the cache. */
-Alarm::List ResourceExchange::alarms( const QDateTime &from, const QDateTime &to )
+Alarm::List ResourceExchange::alarms( const TQDateTime &from, const TQDateTime &to )
{
kdDebug(5800) << "ResourceExchange::alarms(" << from.toString() << " - " << to.toString() << ")\n";
Alarm::List list;
- QDate start = from.date();
- QDate end = to.date();
+ TQDate start = from.date();
+ TQDate end = to.date();
if ( mCache ) {
@@ -453,22 +453,22 @@ void ResourceExchange::insertEvent(const Event *anEvent)
}
*/
-// taking a QDate, this function will look for an eventlist in the dict
+// taking a TQDate, this function will look for an eventlist in the dict
// with that date attached -
-Event::List ResourceExchange::rawEventsForDate( const QDate &qd,
+Event::List ResourceExchange::rawEventsForDate( const TQDate &qd,
EventSortField sortField,
SortDirection sortDirection )
{
if (!mCache) return Event::List();
// If the events for this date are not in the cache, or if they are old,
// get them again
- QDateTime now = QDateTime::currentDateTime();
+ TQDateTime now = TQDateTime::currentDateTime();
// kdDebug() << "Now is " << now.toString() << endl;
// kdDebug() << "mDates: " << mDates << endl;
- QDate start = QDate( qd.year(), qd.month(), 1 ); // First day of month
+ TQDate start = TQDate( qd.year(), qd.month(), 1 ); // First day of month
if ( mDates && ( !mDates->contains( start ) ||
(*mCacheDates)[start].secsTo( now ) > mCachedSeconds ) ) {
- QDate end = start.addMonths( 1 ).addDays( -1 ); // Last day of month
+ TQDate end = start.addMonths( 1 ).addDays( -1 ); // Last day of month
// Get events that occur in this period from the cache
Event::List oldEvents = mCache->rawEvents( start, end, false );
// And remove them all
@@ -509,7 +509,7 @@ Event::List ResourceExchange::rawEventsForDate( const QDate &qd,
}
-Event::List ResourceExchange::rawEvents( const QDate &start, const QDate &end,
+Event::List ResourceExchange::rawEvents( const TQDate &start, const TQDate &end,
bool inclusive )
{
kdDebug() << "ResourceExchange::rawEvents(start,end,inclusive)" << endl;
@@ -517,7 +517,7 @@ Event::List ResourceExchange::rawEvents( const QDate &start, const QDate &end,
return mCache->rawEvents( start, end, inclusive );
}
-Event::List ResourceExchange::rawEventsForDate(const QDateTime &qdt)
+Event::List ResourceExchange::rawEventsForDate(const TQDateTime &qdt)
{
kdDebug() << "ResourceExchange::rawEventsForDate(qdt)" << endl;
return rawEventsForDate( qdt.date() );
@@ -556,7 +556,7 @@ bool ResourceExchange::deleteJournal(Journal */*journal*/)
// setModified( true );
}
-Journal::List ResourceExchange::journals(const QDate &/*date*/)
+Journal::List ResourceExchange::journals(const TQDate &/*date*/)
{
// We don't handle journals yet
return Journal::List();
@@ -566,7 +566,7 @@ Journal::List ResourceExchange::journals(const QDate &/*date*/)
return list;*/
}
-Journal *ResourceExchange::journal(const QString &/*uid*/)
+Journal *ResourceExchange::journal(const TQString &/*uid*/)
{
// We don't handle journals yet
return 0;
@@ -585,7 +585,7 @@ Journal::List ResourceExchange::rawJournals( JournalSortField /*sortField*/, Sor
return list;*/
}
-Journal::List ResourceExchange::rawJournalsForDate( const QDate &/*date*/ )
+Journal::List ResourceExchange::rawJournalsForDate( const TQDate &/*date*/ )
{
// We don't handle journals yet
return Journal::List();
@@ -595,7 +595,7 @@ Journal::List ResourceExchange::rawJournalsForDate( const QDate &/*date*/ )
return list;*/
}
-void ResourceExchange::setTimeZoneId( const QString &tzid )
+void ResourceExchange::setTimeZoneId( const TQString &tzid )
{
mTimeZoneId = tzid;
if ( mCache ) mCache->setTimeZoneId( tzid );
diff --git a/kresources/exchange/resourceexchange.h b/kresources/exchange/resourceexchange.h
index 721e36660..d3492cf00 100644
--- a/kresources/exchange/resourceexchange.h
+++ b/kresources/exchange/resourceexchange.h
@@ -20,9 +20,9 @@
#ifndef KPIM_EXCHANGECALENDAR_H
#define KPIM_EXCHANGECALENDAR_H
-#include <qmap.h>
-#include <qdict.h>
-#include <qintdict.h>
+#include <tqmap.h>
+#include <tqdict.h>
+#include <tqintdict.h>
#include <libkcal/calendar.h>
#include <libkcal/calendarlocal.h>
@@ -60,7 +60,7 @@ class ResourceExchange : public ResourceCalendar, public IncidenceBase::Observer
/** constructs a new calendar, with variables initialized to sane values. */
// ExchangeCalendar( KPIM::ExchangeAccount* account );
/** constructs a new calendar, with variables initialized to sane values. */
-// ExchangeCalendar( KPIM::ExchangeAccount* account, const QString &timeZoneId );
+// ExchangeCalendar( KPIM::ExchangeAccount* account, const TQString &timeZoneId );
// virtual ~ExchangeCalendar();
/**
@@ -70,14 +70,14 @@ class ResourceExchange : public ResourceCalendar, public IncidenceBase::Observer
@return true, if successful, false on error.
@param fileName the name of the calendar on disk.
*/
-// bool load( const QString &fileName );
+// bool load( const TQString &fileName );
/**
Writes out the calendar to disk in the specified \a format.
ExchangeCalendar takes ownership of the CalFormat object.
@return true, if successful, false on error.
@param fileName the name of the file
*/
-// bool save( const QString &fileName, CalFormat *format = 0 );
+// bool save( const TQString &fileName, CalFormat *format = 0 );
/** clears out the current calendar, freeing all used memory etc. etc. */
// void close();
@@ -93,7 +93,7 @@ class ResourceExchange : public ResourceCalendar, public IncidenceBase::Observer
/**
Retrieves an event on the basis of the unique string ID.
*/
- Event *event(const QString &UniqueStr);
+ Event *event(const TQString &UniqueStr);
/**
Return filtered list of all events in calendar.
*/
@@ -104,7 +104,7 @@ class ResourceExchange : public ResourceCalendar, public IncidenceBase::Observer
*/
Event::List rawEvents();
- virtual void subscribeEvents( const QDate& start, const QDate& end );
+ virtual void subscribeEvents( const TQDate& start, const TQDate& end );
/**
Stop receiving event signals for the given period (inclusive). After this call,
@@ -113,7 +113,7 @@ class ResourceExchange : public ResourceCalendar, public IncidenceBase::Observer
MAY delete the Events objects. The application MUST NOT dereference pointers
to the relevant Events after this call.
*/
- virtual void unsubscribeEvents( const QDate& start, const QDate& end );
+ virtual void unsubscribeEvents( const TQDate& start, const TQDate& end );
/**
Add a todo to the todolist.
@@ -127,7 +127,7 @@ class ResourceExchange : public ResourceCalendar, public IncidenceBase::Observer
Searches todolist for an event with this unique string identifier,
returns a pointer or null.
*/
- Todo *todo( const QString &uid );
+ Todo *todo( const TQString &uid );
/**
Return list of all todos.
*/
@@ -135,26 +135,26 @@ class ResourceExchange : public ResourceCalendar, public IncidenceBase::Observer
/**
Returns list of todos due on the specified date.
*/
- Todo::List rawTodosForDate( const QDate &date );
+ Todo::List rawTodosForDate( const TQDate &date );
/** Add a Journal entry to calendar */
virtual bool addJournal(Journal *);
/** deletes an event from this calendar. */
virtual bool deleteJournal(Journal *);
/** Return Journals for given date */
- virtual Journal::List journals(const QDate &);
+ virtual Journal::List journals(const TQDate &);
/** Return Journal with given UID */
- virtual Journal *journal(const QString &UID);
+ virtual Journal *journal(const TQString &UID);
/** Return list of all Journals stored in calendar */
Journal::List rawJournals( JournalSortField sortField = JournalSortUnsorted, SortDirection sortDirection = SortDirectionAscending );
/** Return journals for the given date. */
- Journal::List rawJournalsForDate( const QDate & );
+ Journal::List rawJournalsForDate( const TQDate & );
/** Return all alarms, which ocur in the given time interval. */
- Alarm::List alarms( const QDateTime &from, const QDateTime &to );
+ Alarm::List alarms( const TQDateTime &from, const TQDateTime &to );
/** Return all alarms, which ocur before given date. */
- Alarm::List alarmsTo( const QDateTime &to );
+ Alarm::List alarmsTo( const TQDateTime &to );
friend class ResourceExchangeConfig;
@@ -178,19 +178,19 @@ class ResourceExchange : public ResourceCalendar, public IncidenceBase::Observer
date specified. useful for dayView, etc. etc.
*/
Event::List rawEventsForDate(
- const QDate &date,
+ const TQDate &date,
EventSortField sortField=EventSortUnsorted,
SortDirection sortDirection=SortDirectionAscending );
/**
Get unfiltered events for date \a qdt.
*/
- Event::List rawEventsForDate( const QDateTime &qdt );
+ Event::List rawEventsForDate( const TQDateTime &qdt );
/**
Get unfiltered events in a range of dates. If inclusive is set to true,
only events are returned, which are completely included in the range.
*/
- Event::List rawEvents( const QDate &start, const QDate &end,
+ Event::List rawEvents( const TQDate &start, const TQDate &end,
bool inclusive = false );
/**
Get unfiltered events in sorted order.
@@ -206,20 +206,20 @@ class ResourceExchange : public ResourceCalendar, public IncidenceBase::Observer
/** Append alarms of incidence in interval to list of alarms. */
// void appendAlarms( Alarm::List &alarms, Incidence *incidence,
-// const QDateTime &from, const QDateTime &to );
+// const TQDateTime &from, const TQDateTime &to );
/** Append alarms of recurring events in interval to list of alarms. */
// void appendRecurringAlarms( Alarm::List &alarms, Incidence *incidence,
-// const QDateTime &from, const QDateTime &to );
+// const TQDateTime &from, const TQDateTime &to );
bool uploadEvent( Event *event );
- void setTimeZoneId( const QString &tzid );
+ void setTimeZoneId( const TQString &tzid );
protected slots:
- void slotMonitorNotify( const QValueList<long>& IDs, const QValueList<KURL>& urls);
- void slotMonitorError( int errorCode, const QString& moreInfo );
- void slotDownloadFinished( int result, const QString& moreinfo );
+ void slotMonitorNotify( const TQValueList<long>& IDs, const TQValueList<KURL>& urls);
+ void slotMonitorError( int errorCode, const TQString& moreInfo );
+ void slotDownloadFinished( int result, const TQString& moreinfo );
void downloadedEvent( KCal::Event*, const KURL& );
private:
@@ -228,14 +228,14 @@ class ResourceExchange : public ResourceCalendar, public IncidenceBase::Observer
KPIM::ExchangeClient* mClient;
KPIM::ExchangeMonitor* mMonitor;
CalendarLocal* mCache;
- QDict<EventInfo> mEventDict; // maps UIDS to EventInfo records
- QIntDict<EventInfo> mWatchDict; // maps Watch IDs to EventInfo records
+ TQDict<EventInfo> mEventDict; // maps UIDS to EventInfo records
+ TQIntDict<EventInfo> mWatchDict; // maps Watch IDs to EventInfo records
DateSet* mDates;
- QMap<Event, QDateTime>* mEventDates;
- QMap<QDate, QDateTime>* mCacheDates;
+ TQMap<Event, TQDateTime>* mEventDates;
+ TQMap<TQDate, TQDateTime>* mCacheDates;
int mCachedSeconds;
bool mAutoMailbox;
- QString mTimeZoneId;
+ TQString mTimeZoneId;
KABC::Lock *mLock;
diff --git a/kresources/exchange/resourceexchangeconfig.cpp b/kresources/exchange/resourceexchangeconfig.cpp
index e2277fa05..5bb9677b6 100644
--- a/kresources/exchange/resourceexchangeconfig.cpp
+++ b/kresources/exchange/resourceexchangeconfig.cpp
@@ -19,8 +19,8 @@
Boston, MA 02110-1301, USA.
*/
-#include <qlabel.h>
-#include <qlayout.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
#include <klocale.h>
#include <kdebug.h>
@@ -33,48 +33,48 @@
using namespace KCal;
-ResourceExchangeConfig::ResourceExchangeConfig( QWidget* parent, const char* name )
+ResourceExchangeConfig::ResourceExchangeConfig( TQWidget* parent, const char* name )
: KRES::ConfigWidget( parent, name )
{
resize( 245, 115 );
- QGridLayout *mainLayout = new QGridLayout( this, 8, 3 );
+ TQGridLayout *mainLayout = new TQGridLayout( this, 8, 3 );
- QLabel *label = new QLabel( i18n( "Host:" ), this );
+ TQLabel *label = new TQLabel( i18n( "Host:" ), this );
mHostEdit = new KLineEdit( this );
mainLayout->addWidget( label, 1, 0 );
mainLayout->addWidget( mHostEdit, 1, 1 );
- label = new QLabel( i18n( "Port:" ), this );
+ label = new TQLabel( i18n( "Port:" ), this );
mPortEdit = new KLineEdit( this );
mainLayout->addWidget( label, 2, 0 );
mainLayout->addWidget( mPortEdit, 2, 1 );
- label = new QLabel( i18n( "Account:" ), this );
+ label = new TQLabel( i18n( "Account:" ), this );
mAccountEdit = new KLineEdit( this );
mainLayout->addWidget( label, 3, 0 );
mainLayout->addWidget( mAccountEdit, 3, 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, 4, 0 );
mainLayout->addWidget( mPasswordEdit, 4, 1 );
- mAutoMailbox = new QCheckBox( i18n( "Determine mailbox &automatically" ), this );
+ mAutoMailbox = new TQCheckBox( i18n( "Determine mailbox &automatically" ), this );
mainLayout->addMultiCellWidget( mAutoMailbox, 5, 5, 0, 1 );
- connect( mAutoMailbox, SIGNAL(toggled(bool)), this, SLOT(slotToggleAuto(bool)) );
+ connect( mAutoMailbox, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotToggleAuto(bool)) );
mMailboxEdit = new KLineEdit( this );
- mainLayout->addWidget( new QLabel( i18n( "Mailbox URL:" ), this ), 6, 0 );
+ mainLayout->addWidget( new TQLabel( i18n( "Mailbox URL:" ), this ), 6, 0 );
mainLayout->addWidget( mMailboxEdit, 6, 1 );
- mTryFindMailbox = new QPushButton( i18n( "&Find" ), this );
+ mTryFindMailbox = new TQPushButton( i18n( "&Find" ), this );
mainLayout->addWidget( mTryFindMailbox, 6, 2 );
- connect( mTryFindMailbox, SIGNAL(clicked()), this, SLOT(slotFindClicked()) );
+ connect( mTryFindMailbox, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotFindClicked()) );
- label = new QLabel( i18n( "Cache timeout:" ), this );
+ label = new TQLabel( i18n( "Cache timeout:" ), this );
mCacheEdit = new KIntNumInput( this );
- connect(mCacheEdit, SIGNAL(valueChanged( int )), SLOT(slotCacheEditChanged( int )));
+ connect(mCacheEdit, TQT_SIGNAL(valueChanged( int )), TQT_SLOT(slotCacheEditChanged( int )));
mCacheEdit->setMinValue( 0 );
mainLayout->addWidget( label, 7, 0 );
mainLayout->addWidget( mCacheEdit, 7, 1 );
@@ -101,7 +101,7 @@ void ResourceExchangeConfig::saveSettings( KRES::Resource *resource )
ResourceExchange* res = dynamic_cast<ResourceExchange*>( resource );
if (res) {
if ( mAutoMailbox->isChecked() ) {
- mMailboxEdit->setText( QString::null );
+ mMailboxEdit->setText( TQString::null );
slotFindClicked();
if ( mMailboxEdit->text().isNull() ) {
kdWarning() << "Could not find Exchange mailbox URL, incomplete settings!" << endl;
@@ -125,7 +125,7 @@ void ResourceExchangeConfig::slotToggleAuto( bool on )
// mTryFindMailbox->setEnabled( ! on );
}
-void ResourceExchangeConfig::slotUserChanged( const QString& /*text*/ )
+void ResourceExchangeConfig::slotUserChanged( const TQString& /*text*/ )
{
// if ( mMailboxEqualsUser->isChecked() ) {
// mMailboxEdit->setText( "webdav://" + mHostEdit->text() + "/exchange/" + text );
@@ -134,7 +134,7 @@ void ResourceExchangeConfig::slotUserChanged( const QString& /*text*/ )
void ResourceExchangeConfig::slotFindClicked()
{
- QString mailbox = KPIM::ExchangeAccount::tryFindMailbox(
+ TQString mailbox = KPIM::ExchangeAccount::tryFindMailbox(
mHostEdit->text(), mPortEdit->text(),
mAccountEdit->text(), mPasswordEdit->text() );
diff --git a/kresources/exchange/resourceexchangeconfig.h b/kresources/exchange/resourceexchangeconfig.h
index 59adf02bc..870317afb 100644
--- a/kresources/exchange/resourceexchangeconfig.h
+++ b/kresources/exchange/resourceexchangeconfig.h
@@ -22,7 +22,7 @@
#ifndef KDEPIM_RESOURCECALENDAREXCHANGECONFIG_H
#define KDEPIM_RESOURCECALENDAREXCHANGECONFIG_H
-#include <qcheckbox.h>
+#include <tqcheckbox.h>
#include <kcombobox.h>
#include <kurlrequester.h>
@@ -39,7 +39,7 @@ class ResourceExchangeConfig : public KRES::ConfigWidget
Q_OBJECT
public:
- ResourceExchangeConfig( QWidget* parent = 0, const char* name = 0 );
+ ResourceExchangeConfig( TQWidget* parent = 0, const char* name = 0 );
public slots:
virtual void loadSettings( KRES::Resource *resource);
@@ -47,7 +47,7 @@ public slots:
protected slots:
void slotToggleAuto( bool on );
- void slotUserChanged( const QString& text );
+ void slotUserChanged( const TQString& text );
void slotFindClicked();
void slotCacheEditChanged( int value );
@@ -56,9 +56,9 @@ private:
KLineEdit* mPortEdit;
KLineEdit* mAccountEdit;
KLineEdit* mPasswordEdit;
- QCheckBox *mAutoMailbox;
+ TQCheckBox *mAutoMailbox;
KLineEdit* mMailboxEdit;
- QPushButton* mTryFindMailbox;
+ TQPushButton* mTryFindMailbox;
KIntNumInput* mCacheEdit;
};
diff --git a/kresources/featureplan/benchmarkfeaturelist.cpp b/kresources/featureplan/benchmarkfeaturelist.cpp
index d814a8a21..2ae4432a0 100644
--- a/kresources/featureplan/benchmarkfeaturelist.cpp
+++ b/kresources/featureplan/benchmarkfeaturelist.cpp
@@ -27,8 +27,8 @@
#include <kaboutdata.h>
#include <kdebug.h>
-#include <qfile.h>
-#include <qtextstream.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
#include <iostream>
@@ -51,7 +51,7 @@ void displayFeature( Feature *f )
std::cout << " STATUS: " << f->status().local8Bit() << std::endl;
}
-void displayCategory( const QValueList<Category *> categories )
+void displayCategory( const TQValueList<Category *> categories )
{
Category::List::ConstIterator it;
for( it = categories.begin(); it != categories.end(); ++it ) {
@@ -83,7 +83,7 @@ int main( int argc, char **argv )
args->usage( "Wrong number of arguments." );
}
- QString filename = QFile::decodeName( args->arg( 0 ) );
+ TQString filename = TQFile::decodeName( args->arg( 0 ) );
for( int i = 0; i < 1; ++i ) {
FeaturesParser parser;
diff --git a/kresources/featureplan/dumpfeaturelist.cpp b/kresources/featureplan/dumpfeaturelist.cpp
index 9fbbe0084..fd5a5a01a 100644
--- a/kresources/featureplan/dumpfeaturelist.cpp
+++ b/kresources/featureplan/dumpfeaturelist.cpp
@@ -27,8 +27,8 @@
#include <kaboutdata.h>
#include <kdebug.h>
-#include <qfile.h>
-#include <qtextstream.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
#include <iostream>
@@ -51,7 +51,7 @@ void displayFeature( Feature *f )
std::cout << " STATUS: " << f->status().local8Bit() << std::endl;
}
-void displayCategory( const QValueList<Category *> categories )
+void displayCategory( const TQValueList<Category *> categories )
{
Category::List::ConstIterator it;
for( it = categories.begin(); it != categories.end(); ++it ) {
@@ -82,7 +82,7 @@ int main( int argc, char **argv )
args->usage( "Wrong number of arguments." );
}
- QString filename = QFile::decodeName( args->arg( 0 ) );
+ TQString filename = TQFile::decodeName( args->arg( 0 ) );
FeaturesParser parser;
@@ -91,10 +91,10 @@ int main( int argc, char **argv )
if ( !features ) {
kdError() << "Parse error" << endl;
} else {
- QValueList<Category *> categories = features->categoryList();
+ TQValueList<Category *> categories = features->categoryList();
displayCategory( categories );
- QString out = filename + ".out";
+ TQString out = filename + ".out";
if ( !features->writeFile( out ) ) {
kdError() << "Write error" << endl;
}
diff --git a/kresources/featureplan/kcal_resourcefeatureplan.cpp b/kresources/featureplan/kcal_resourcefeatureplan.cpp
index 84c198216..cce884955 100644
--- a/kresources/featureplan/kcal_resourcefeatureplan.cpp
+++ b/kresources/featureplan/kcal_resourcefeatureplan.cpp
@@ -26,11 +26,11 @@
#include "kde-features.h"
#include "kde-features_parser.h"
-#include <qapplication.h>
-#include <qdatetime.h>
-#include <qptrlist.h>
-#include <qstringlist.h>
-#include <qtimer.h>
+#include <tqapplication.h>
+#include <tqdatetime.h>
+#include <tqptrlist.h>
+#include <tqstringlist.h>
+#include <tqtimer.h>
#include <kabc/locknull.h>
#include <kdebug.h>
@@ -118,7 +118,7 @@ void ResourceFeaturePlan::insertCategories( const Category::List &categories,
Feature *f = *it2;
Todo *todo = new Todo;
- QString summary = f->summary();
+ TQString summary = f->summary();
int pos = summary.find( '\n' );
if ( pos > 0 ) summary = summary.left( pos ) + "...";
todo->setSummary( summary );
diff --git a/kresources/featureplan/kcal_resourcefeatureplanconfig.cpp b/kresources/featureplan/kcal_resourcefeatureplanconfig.cpp
index c72915d0a..42043a5dd 100644
--- a/kresources/featureplan/kcal_resourcefeatureplanconfig.cpp
+++ b/kresources/featureplan/kcal_resourcefeatureplanconfig.cpp
@@ -19,9 +19,9 @@
Boston, MA 02110-1301, USA.
*/
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qcheckbox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqcheckbox.h>
#include <kdebug.h>
#include <kdialog.h>
@@ -35,26 +35,26 @@
using namespace KCal;
-ResourceFeaturePlanConfig::ResourceFeaturePlanConfig( QWidget *parent,
+ResourceFeaturePlanConfig::ResourceFeaturePlanConfig( TQWidget *parent,
const char *name )
: KRES::ConfigWidget( parent, name )
{
- QGridLayout *topLayout = new QGridLayout( this, 3, 2, 0,
+ TQGridLayout *topLayout = new TQGridLayout( this, 3, 2, 0,
KDialog::spacingHint() );
- QLabel *label = new QLabel( i18n( "Filename:" ), this );
+ TQLabel *label = new TQLabel( i18n( "Filename:" ), this );
mFilename = new KURLRequester( this );
topLayout->addWidget( label, 0, 0 );
topLayout->addWidget( mFilename, 0, 1 );
- label = new QLabel( i18n( "Filter email:" ), this );
+ label = new TQLabel( i18n( "Filter email:" ), this );
mFilterEmail = new KLineEdit( this );
topLayout->addWidget( label, 1, 0 );
topLayout->addWidget( mFilterEmail, 1, 1 );
- mCvsCheck = new QCheckBox( i18n("Use CVS"), this );
+ mCvsCheck = new TQCheckBox( i18n("Use CVS"), this );
topLayout->addMultiCellWidget( mCvsCheck, 2, 2, 0, 1 );
}
diff --git a/kresources/featureplan/kcal_resourcefeatureplanconfig.h b/kresources/featureplan/kcal_resourcefeatureplanconfig.h
index dcba4684c..21dcf8f8d 100644
--- a/kresources/featureplan/kcal_resourcefeatureplanconfig.h
+++ b/kresources/featureplan/kcal_resourcefeatureplanconfig.h
@@ -36,7 +36,7 @@ class KDE_EXPORT ResourceFeaturePlanConfig : public KRES::ConfigWidget
Q_OBJECT
public:
- ResourceFeaturePlanConfig( QWidget *parent = 0, const char *name = 0 );
+ ResourceFeaturePlanConfig( TQWidget *parent = 0, const char *name = 0 );
public slots:
void loadSettings( KRES::Resource * );
@@ -45,7 +45,7 @@ class KDE_EXPORT ResourceFeaturePlanConfig : public KRES::ConfigWidget
private:
KURLRequester *mFilename;
KLineEdit *mFilterEmail;
- QCheckBox *mCvsCheck;
+ TQCheckBox *mCvsCheck;
};
}
diff --git a/kresources/groupdav/groupdavaddressbookadaptor.h b/kresources/groupdav/groupdavaddressbookadaptor.h
index 377b71622..f66d7b863 100644
--- a/kresources/groupdav/groupdavaddressbookadaptor.h
+++ b/kresources/groupdav/groupdavaddressbookadaptor.h
@@ -29,7 +29,7 @@
#include <kabc/addressee.h>
#include <kurl.h>
-#include <qdom.h>
+#include <tqdom.h>
namespace KABC {
@@ -40,9 +40,9 @@ class GroupDavAddressBookAdaptor : public DavAddressBookAdaptor
void customAdaptDownloadUrl( KURL &url );
void customAdaptUploadUrl( KURL &url );
- QString mimeType() const { return "text/x-vcard"; }
- QCString identifier() const { return "KABCResourceGroupDAV"; }
- QString defaultNewItemName( KPIM::GroupwareUploadItem */*item*/ ) { return "new.vcf"; }
+ TQString mimeType() const { return "text/x-vcard"; }
+ TQCString identifier() const { return "KABCResourceGroupDAV"; }
+ TQString defaultNewItemName( KPIM::GroupwareUploadItem */*item*/ ) { return "new.vcf"; }
long flags() const { return 0; }
@@ -58,16 +58,16 @@ class GroupDavAddressBookAdaptor : public DavAddressBookAdaptor
// Interpreting Jobs
- bool interpretListItemsJob( KIO::Job *job, const QString &/*jobData*/ )
+ bool interpretListItemsJob( KIO::Job *job, const TQString &/*jobData*/ )
{ return GroupDavGlobals::interpretListItemsJob( this, job ); }
- bool interpretDownloadItemsJob( KIO::Job *job, const QString &jobData )
+ bool interpretDownloadItemsJob( KIO::Job *job, const TQString &jobData )
{ return GroupDavGlobals::interpretAddressBookDownloadItemsJob(
this, job, jobData ); }
- bool getFolderHasSubs( const QDomNode &folderNode )
+ bool getFolderHasSubs( const TQDomNode &folderNode )
{ return GroupDavGlobals::getFolderHasSubs( folderNode ); }
- KPIM::FolderLister::ContentType getContentType( const QDomNode &folderNode )
+ KPIM::FolderLister::ContentType getContentType( const TQDomNode &folderNode )
{ return GroupDavGlobals::getContentType( folderNode ); }
};
diff --git a/kresources/groupdav/groupdavcalendaradaptor.h b/kresources/groupdav/groupdavcalendaradaptor.h
index c4434d064..64e8e86ed 100644
--- a/kresources/groupdav/groupdavcalendaradaptor.h
+++ b/kresources/groupdav/groupdavcalendaradaptor.h
@@ -41,17 +41,17 @@ class GroupDavCalendarAdaptor : public DavCalendarAdaptor
public:
GroupDavCalendarAdaptor();
- QValueList<KPIM::FolderLister::ContentType> supportedTypes()
+ TQValueList<KPIM::FolderLister::ContentType> supportedTypes()
{
- QValueList<KPIM::FolderLister::ContentType> types;
+ TQValueList<KPIM::FolderLister::ContentType> types;
types << KPIM::FolderLister::Event;
types << KPIM::FolderLister::Todo;
return types;
}
void customAdaptDownloadUrl( KURL &url );
void customAdaptUploadUrl( KURL &url );
- QCString identifier() const { return "KCalResourceGroupDAV"; }
- QString defaultNewItemName( KPIM::GroupwareUploadItem */*item*/ ) { return "new.ics"; }
+ TQCString identifier() const { return "KCalResourceGroupDAV"; }
+ TQString defaultNewItemName( KPIM::GroupwareUploadItem */*item*/ ) { return "new.ics"; }
long flags() const { return 0; }
@@ -67,15 +67,15 @@ class GroupDavCalendarAdaptor : public DavCalendarAdaptor
// Interpreting Jobs
- bool interpretListItemsJob( KIO::Job *job, const QString &/*jobData*/ )
+ bool interpretListItemsJob( KIO::Job *job, const TQString &/*jobData*/ )
{ return GroupDavGlobals::interpretListItemsJob( this, job ); }
- bool interpretDownloadItemsJob( KIO::Job *job, const QString &jobData )
+ bool interpretDownloadItemsJob( KIO::Job *job, const TQString &jobData )
{ return GroupDavGlobals::interpretCalendarDownloadItemsJob( this, job, jobData ); }
- bool getFolderHasSubs( const QDomNode &folderNode )
+ bool getFolderHasSubs( const TQDomNode &folderNode )
{ return GroupDavGlobals::getFolderHasSubs( folderNode ); }
- KPIM::FolderLister::ContentType getContentType( const QDomNode &folderNode )
+ KPIM::FolderLister::ContentType getContentType( const TQDomNode &folderNode )
{ return GroupDavGlobals::getContentType( folderNode ); }
};
}
diff --git a/kresources/groupdav/groupdavglobals.cpp b/kresources/groupdav/groupdavglobals.cpp
index f94180195..17b6f443a 100644
--- a/kresources/groupdav/groupdavglobals.cpp
+++ b/kresources/groupdav/groupdavglobals.cpp
@@ -37,31 +37,31 @@
#include <kio/davjob.h>
#include <kio/job.h>
-QString GroupDavGlobals::extractFingerprint( KIO::Job *job, const QString &/*jobData*/ )
+TQString GroupDavGlobals::extractFingerprint( KIO::Job *job, const TQString &/*jobData*/ )
{
- const QString& headers = job->queryMetaData( "HTTP-Headers" );
+ const TQString& headers = job->queryMetaData( "HTTP-Headers" );
return WebdavHandler::getEtagFromHeaders( headers );
}
-KPIM::FolderLister::ContentType GroupDavGlobals::getContentType( const QDomElement &prop )
+KPIM::FolderLister::ContentType GroupDavGlobals::getContentType( const TQDomElement &prop )
{
- QDomElement ctype = prop.namedItem("getcontenttype").toElement();
+ TQDomElement ctype = prop.namedItem("getcontenttype").toElement();
if ( ctype.isNull() ) return KPIM::FolderLister::Unknown;
- const QString &type = ctype.text();
+ const TQString &type = ctype.text();
kdDebug()<<"Found content type: "<<type<<endl;
/// TODO: Not yet implemented in GroupDav!
return KPIM::FolderLister::Unknown;
}
-KPIM::FolderLister::ContentType GroupDavGlobals::getContentType( const QDomNode &folderNode )
+KPIM::FolderLister::ContentType GroupDavGlobals::getContentType( const TQDomNode &folderNode )
{
- QDomNode n4;
+ TQDomNode n4;
kdDebug()<<"GroupDavGlobals::getContentType(...)"<<endl;
int type = KPIM::FolderLister::Unknown;
for( n4 = folderNode.firstChild(); !n4.isNull(); n4 = n4.nextSibling() ) {
- QDomElement e = n4.toElement();
+ TQDomElement e = n4.toElement();
if ( e.tagName() == "resourcetype" ) {
if ( !e.namedItem( "vevent-collection" ).isNull() )
@@ -80,11 +80,11 @@ kdDebug()<<"GroupDavGlobals::getContentType(...)"<<endl;
return (KPIM::FolderLister::ContentType)type;
}
-bool GroupDavGlobals::getFolderHasSubs( const QDomNode &folderNode )
+bool GroupDavGlobals::getFolderHasSubs( const TQDomNode &folderNode )
{
// a folder is identified by the collection item in the resourcetype:
// <a:resourcetype xmlns:a="DAV:"><a:collection xmlns:a="DAV:"/>...</a:resourcetype>
- QDomElement e = folderNode.namedItem("resourcetype").toElement();
+ TQDomElement e = folderNode.namedItem("resourcetype").toElement();
if ( !e.namedItem( "collection" ).isNull() )
return true;
else return false;
@@ -95,9 +95,9 @@ bool GroupDavGlobals::getFolderHasSubs( const QDomNode &folderNode )
KIO::Job *GroupDavGlobals::createListFoldersJob( const KURL &url )
{
- QDomDocument doc;
- QDomElement root = WebdavHandler::addDavElement( doc, doc, "d:propfind" );
- QDomElement prop = WebdavHandler::addElement( doc, root, "d:prop" );
+ TQDomDocument doc;
+ TQDomElement root = WebdavHandler::addDavElement( doc, doc, "d:propfind" );
+ TQDomElement prop = WebdavHandler::addElement( doc, root, "d:prop" );
WebdavHandler::addElement( doc, prop, "d:displayname" );
WebdavHandler::addElement( doc, prop, "d:resourcetype" );
// WebdavHandler::addElement( doc, prop, "d:hassubs" );
@@ -109,9 +109,9 @@ KIO::Job *GroupDavGlobals::createListFoldersJob( const KURL &url )
KIO::TransferJob *GroupDavGlobals::createListItemsJob( const KURL &url )
{
- QDomDocument doc;
- QDomElement root = WebdavHandler::addDavElement( doc, doc, "propfind" );
- QDomElement prop = WebdavHandler::addDavElement( doc, root, "prop" );
+ TQDomDocument doc;
+ TQDomElement root = WebdavHandler::addDavElement( doc, doc, "propfind" );
+ TQDomElement prop = WebdavHandler::addDavElement( doc, root, "prop" );
WebdavHandler::addDavElement( doc, prop, "getetag" );
// WebdavHandler::addDavElement( doc, prop, "getcontenttype" );
kdDebug(5800) << "props = "<< doc.toString() << endl;
@@ -130,7 +130,7 @@ KIO::TransferJob *GroupDavGlobals::createDownloadJob( KPIM::GroupwareDataAdaptor
kdDebug()<<"GroupDavGlobals::createDownloadJob, url="<<url.url()<<endl;
KIO::TransferJob *job = KIO::get( url, false, false );
if ( adaptor ) {
- QString mt = adaptor->mimeType();
+ TQString mt = adaptor->mimeType();
job->addMetaData( "accept", mt );
}
job->addMetaData( "PropagateHttpHeader", "true" );
@@ -158,7 +158,7 @@ KIO::Job *GroupDavGlobals::createRemoveJob( KPIM::GroupwareDataAdaptor *adaptor,
}
return delJob;
-/* QStringList urls;
+/* TQStringList urls;
KPIM::GroupwareUploadItem::List::const_iterator it;
kdDebug(5800) << " GroupDavGlobals::createRemoveJob, BaseURL="<<uploadurl.url()<<endl;
for ( it = deletedItems.constBegin(); it != deletedItems.constEnd(); ++it ) {
@@ -190,28 +190,28 @@ bool GroupDavGlobals::interpretListItemsJob( KPIM::GroupwareDataAdaptor *adaptor
if ( !davjob ) {
return false;
}
- QDomDocument doc = davjob->response();
+ TQDomDocument doc = davjob->response();
kdDebug(7000) << " Doc: " << doc.toString() << endl;
kdDebug(7000) << " IdMapper: " << adaptor->idMapper()->asString() << endl;
- QDomElement docElem = doc.documentElement();
- QDomNode n = docElem.firstChild();
+ TQDomElement docElem = doc.documentElement();
+ 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.
n = n.nextSibling();
if ( e.isNull() )
continue;
const KURL &entry( e.namedItem("href").toElement().text() );
- QDomElement propstat = e.namedItem("propstat").toElement();
+ TQDomElement propstat = e.namedItem("propstat").toElement();
if ( propstat.isNull() )
continue;
- QDomElement prop = propstat.namedItem( "prop" ).toElement();
+ TQDomElement prop = propstat.namedItem( "prop" ).toElement();
if ( prop.isNull() )
continue;
- QDomElement elem = prop.namedItem("getetag").toElement();
- const QString &newFingerprint = elem.text();
+ TQDomElement elem = prop.namedItem("getetag").toElement();
+ const TQString &newFingerprint = elem.text();
if ( elem.isNull() || newFingerprint.isEmpty() )
continue;
@@ -225,12 +225,12 @@ bool GroupDavGlobals::interpretListItemsJob( KPIM::GroupwareDataAdaptor *adaptor
bool GroupDavGlobals::interpretCalendarDownloadItemsJob( KCal::CalendarAdaptor *adaptor,
- KIO::Job *job, const QString &jobData )
+ KIO::Job *job, const TQString &jobData )
{
kdDebug(5800) << "GroupDavGlobals::interpretCalendarDownloadItemsJob, iCalendar=" << endl;
kdDebug(5800) << jobData << endl;
if ( !adaptor || !job ) return false;
- KCal::CalendarLocal calendar( QString::fromLatin1("UTC") );
+ KCal::CalendarLocal calendar( TQString::fromLatin1("UTC") );
KCal::ICalFormat ical;
calendar.setTimeZoneId( adaptor->resource()->timeZoneId() );
KCal::Incidence::List incidences;
@@ -247,7 +247,7 @@ kdDebug(5800) << jobData << endl;
KIO::SimpleJob *sjob = dynamic_cast<KIO::SimpleJob *>(job);
KURL remoteId;
if ( sjob ) remoteId = sjob->url();
- QString fingerprint = extractFingerprint( job, jobData );
+ TQString fingerprint = extractFingerprint( job, jobData );
adaptor->calendarItemDownloaded( inc, inc->uid(), remoteId, fingerprint,
remoteId.prettyURL() );
return true;
@@ -259,7 +259,7 @@ kdDebug(5800) << jobData << endl;
bool GroupDavGlobals::interpretAddressBookDownloadItemsJob(
- KABC::AddressBookAdaptor *adaptor, KIO::Job *job, const QString &jobData )
+ KABC::AddressBookAdaptor *adaptor, KIO::Job *job, const TQString &jobData )
{
kdDebug(5800) << "GroupDavGlobals::interpretAddressBookDownloadItemsJob, vCard=" << endl;
kdDebug(5800) << jobData << endl;
@@ -278,7 +278,7 @@ kdDebug(5800) << jobData << endl;
KIO::SimpleJob *sjob = dynamic_cast<KIO::SimpleJob*>(job);
KURL remoteId;
if ( sjob ) remoteId = sjob->url();
- QString fingerprint = extractFingerprint( job, jobData );
+ TQString fingerprint = extractFingerprint( job, jobData );
adaptor->addressbookItemDownloaded( a, a.uid(), remoteId, fingerprint,
remoteId.prettyURL() );
return true;
diff --git a/kresources/groupdav/groupdavglobals.h b/kresources/groupdav/groupdavglobals.h
index dc379f94e..7a89f1def 100644
--- a/kresources/groupdav/groupdavglobals.h
+++ b/kresources/groupdav/groupdavglobals.h
@@ -26,7 +26,7 @@
#include <groupwareuploadjob.h>
#include <folderlister.h>
#include <kurl.h>
-#include <qdom.h>
+#include <tqdom.h>
namespace KPIM {
class GroupwareDataAdaptor;
@@ -47,10 +47,10 @@ class GroupDavGlobals
{
public:
GroupDavGlobals() {}
- static QString extractFingerprint( KIO::Job *job, const QString &/*jobData*/ );
- static KPIM::FolderLister::ContentType getContentType( const QDomElement &prop );
- static KPIM::FolderLister::ContentType getContentType( const QDomNode &folderNode );
- static bool getFolderHasSubs( const QDomNode &folderNode );
+ static TQString extractFingerprint( KIO::Job *job, const TQString &/*jobData*/ );
+ static KPIM::FolderLister::ContentType getContentType( const TQDomElement &prop );
+ static KPIM::FolderLister::ContentType getContentType( const TQDomNode &folderNode );
+ static bool getFolderHasSubs( const TQDomNode &folderNode );
static KIO::Job *createListFoldersJob( const KURL &url );
@@ -64,9 +64,9 @@ class GroupDavGlobals
static bool interpretListItemsJob( KPIM::GroupwareDataAdaptor *adaptor,
KIO::Job *job );
static bool interpretCalendarDownloadItemsJob( KCal::CalendarAdaptor *adaptor,
- KIO::Job *job, const QString &jobData );
+ KIO::Job *job, const TQString &jobData );
static bool interpretAddressBookDownloadItemsJob( KABC::AddressBookAdaptor *adaptor,
- KIO::Job *job, const QString &jobData );
+ KIO::Job *job, const TQString &jobData );
};
diff --git a/kresources/groupdav/kabc_resourcegroupdav.h b/kresources/groupdav/kabc_resourcegroupdav.h
index 807e0ec3a..e6765758c 100644
--- a/kresources/groupdav/kabc_resourcegroupdav.h
+++ b/kresources/groupdav/kabc_resourcegroupdav.h
@@ -34,7 +34,7 @@ class KDE_EXPORT ResourceGroupDav : public ResourceGroupwareBase
public:
ResourceGroupDav( const KConfig * );
// ResourceGroupDav( const KURL &url,
-// const QString &user, const QString &password );
+// const TQString &user, const TQString &password );
protected:
void init();
};
diff --git a/kresources/groupware/kabc_resourcegroupware.cpp b/kresources/groupware/kabc_resourcegroupware.cpp
index 722024adf..c04988aa0 100644
--- a/kresources/groupware/kabc_resourcegroupware.cpp
+++ b/kresources/groupware/kabc_resourcegroupware.cpp
@@ -18,7 +18,7 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#include <qapplication.h>
+#include <tqapplication.h>
#include <kabc/addressee.h>
#include <kabc/vcardconverter.h>
@@ -47,8 +47,8 @@ ResourceGroupware::ResourceGroupware( const KConfig *config )
}
ResourceGroupware::ResourceGroupware( const KURL &url,
- const QString &user,
- const QString &password )
+ const TQString &user,
+ const TQString &password )
: ResourceCached( 0 )
{
init();
@@ -95,10 +95,10 @@ void ResourceGroupware::writeConfig( KConfig *config )
void ResourceGroupware::readAddressBooks()
{
#if 0
- QStringList ids = prefs()->ids();
- QStringList names = prefs()->names();
- QStringList personals = prefs()->personals();
- QStringList frequents = prefs()->frequents();
+ TQStringList ids = prefs()->ids();
+ TQStringList names = prefs()->names();
+ TQStringList personals = prefs()->personals();
+ TQStringList frequents = prefs()->frequents();
if ( ids.count() != names.count() || ids.count() != personals.count() ||
ids.count() != frequents.count() ) {
@@ -123,10 +123,10 @@ void ResourceGroupware::readAddressBooks()
void ResourceGroupware::writeAddressBooks()
{
#if 0
- QStringList ids;
- QStringList names;
- QStringList personals;
- QStringList frequents;
+ TQStringList ids;
+ TQStringList names;
+ TQStringList personals;
+ TQStringList frequents;
Groupware::AddressBook::List::ConstIterator it;
for( it = mAddressBooks.begin(); it != mAddressBooks.end(); ++it ) {
ids.append( (*it).id );
@@ -155,8 +155,8 @@ void ResourceGroupware::retrieveAddressBooks()
server.logout();
if ( firstRetrieve ) {
- QStringList reads;
- QString write;
+ TQStringList reads;
+ TQString write;
Groupware::AddressBook::List::ConstIterator it;
for( it = mAddressBooks.begin(); it != mAddressBooks.end(); ++it ) {
@@ -227,9 +227,9 @@ bool ResourceGroupware::asyncLoad()
url.setPass( prefs()->password() );
#if 0
- QString query = "?";
- QStringList ids = mPrefs->readAddressBooks();
- QStringList::ConstIterator it;
+ TQString query = "?";
+ TQStringList ids = mPrefs->readAddressBooks();
+ TQStringList::ConstIterator it;
for( it = ids.begin(); it != ids.end(); ++it ) {
if ( it != ids.begin() ) query += "&";
query += "addressbookid=" + *it;
@@ -239,21 +239,21 @@ bool ResourceGroupware::asyncLoad()
kdDebug() << "Download URL: " << url << endl;
- mJobData = QString::null;
+ mJobData = TQString::null;
mDownloadJob = KPIM::GroupwareJob::getAddressBook( url );
- connect( mDownloadJob, SIGNAL( result( KIO::Job * ) ),
- SLOT( slotJobResult( KIO::Job * ) ) );
- connect( mDownloadJob, SIGNAL( data( KIO::Job *, const QByteArray & ) ),
- SLOT( slotJobData( KIO::Job *, const QByteArray & ) ) );
- connect( mDownloadJob, SIGNAL( percent( KIO::Job *, unsigned long ) ),
- SLOT( slotJobPercent( KIO::Job *, unsigned long ) ) );
+ connect( mDownloadJob, TQT_SIGNAL( result( KIO::Job * ) ),
+ TQT_SLOT( slotJobResult( KIO::Job * ) ) );
+ connect( mDownloadJob, TQT_SIGNAL( data( KIO::Job *, const TQByteArray & ) ),
+ TQT_SLOT( slotJobData( KIO::Job *, const TQByteArray & ) ) );
+ connect( mDownloadJob, TQT_SIGNAL( percent( KIO::Job *, unsigned long ) ),
+ TQT_SLOT( slotJobPercent( KIO::Job *, unsigned long ) ) );
mProgress = KPIM::ProgressManager::instance()->createProgressItem(
KPIM::ProgressManager::getUniqueID(), i18n("Downloading addressbook") );
connect( mProgress,
- SIGNAL( progressItemCanceled( KPIM::ProgressItem * ) ),
- SLOT( cancelLoad() ) );
+ TQT_SIGNAL( progressItemCanceled( KPIM::ProgressItem * ) ),
+ TQT_SLOT( cancelLoad() ) );
return true;
}
@@ -316,8 +316,8 @@ void ResourceGroupware::slotJobResult( KIO::Job *job )
if ( !addr.isEmpty() ) {
addr.setResource( this );
- QString remote = addr.custom( "GWRESOURCE", "UID" );
- QString local = idMapper().localId( remote );
+ TQString remote = addr.custom( "GWRESOURCE", "UID" );
+ TQString local = idMapper().localId( remote );
if ( local.isEmpty() ) {
idMapper().setRemoteId( addr.uid(), remote );
} else {
@@ -339,7 +339,7 @@ void ResourceGroupware::slotJobResult( KIO::Job *job )
mProgress = 0;
}
-void ResourceGroupware::slotJobData( KIO::Job *, const QByteArray &data )
+void ResourceGroupware::slotJobData( KIO::Job *, const TQByteArray &data )
{
// kdDebug() << "ResourceGroupware::slotJobData()" << endl;
diff --git a/kresources/groupware/kabc_resourcegroupware.h b/kresources/groupware/kabc_resourcegroupware.h
index cea679f39..46547fc60 100644
--- a/kresources/groupware/kabc_resourcegroupware.h
+++ b/kresources/groupware/kabc_resourcegroupware.h
@@ -39,7 +39,7 @@ class ResourceGroupware : public ResourceCached
public:
ResourceGroupware( const KConfig * );
ResourceGroupware( const KURL &url,
- const QString &user, const QString &password );
+ const TQString &user, const TQString &password );
~ResourceGroupware();
void readConfig( const KConfig * );
@@ -68,7 +68,7 @@ class ResourceGroupware : public ResourceCached
private slots:
void slotJobResult( KIO::Job * );
- void slotJobData( KIO::Job *, const QByteArray & );
+ void slotJobData( KIO::Job *, const TQByteArray & );
void slotJobPercent( KIO::Job *job, unsigned long percent );
void cancelLoad();
@@ -78,7 +78,7 @@ class ResourceGroupware : public ResourceCached
KIO::TransferJob *mDownloadJob;
KPIM::ProgressItem *mProgress;
- QString mJobData;
+ TQString mJobData;
};
}
diff --git a/kresources/groupware/kabc_resourcegroupwareconfig.cpp b/kresources/groupware/kabc_resourcegroupwareconfig.cpp
index 8cb656a93..cfe6ba98c 100644
--- a/kresources/groupware/kabc_resourcegroupwareconfig.cpp
+++ b/kresources/groupware/kabc_resourcegroupwareconfig.cpp
@@ -31,16 +31,16 @@
#include <klistview.h>
#include <kurlrequester.h>
-#include <qlabel.h>
-#include <qlayout.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
using namespace KABC;
class AddressBookItem : public QCheckListItem
{
public:
- AddressBookItem( KListView *parent, const QString &id )
- : QCheckListItem( parent, "", CheckBox ),
+ AddressBookItem( KListView *parent, const TQString &id )
+ : TQCheckListItem( parent, "", CheckBox ),
mId( id )
{
setText( 0, mId );
@@ -52,42 +52,42 @@ class AddressBookItem : public QCheckListItem
#endif
}
- QString id() const { return mId; }
+ TQString id() const { return mId; }
private:
- QString mId;
+ TQString mId;
};
-ResourceGroupwareConfig::ResourceGroupwareConfig( QWidget* parent, const char* name )
+ResourceGroupwareConfig::ResourceGroupwareConfig( TQWidget* parent, const char* name )
: KRES::ConfigWidget( parent, name )
{
- QGridLayout *mainLayout = new QGridLayout( this, 7, 2, 0, KDialog::spacingHint() );
+ TQGridLayout *mainLayout = new TQGridLayout( this, 7, 2, 0, KDialog::spacingHint() );
- QLabel *label = new QLabel( i18n( "URL:" ), this );
+ TQLabel *label = new TQLabel( i18n( "URL:" ), this );
mURL = new KURLRequester( this );
mainLayout->addWidget( label, 0, 0 );
mainLayout->addWidget( mURL, 0, 1 );
- label = new QLabel( i18n( "User:" ), this );
+ label = new TQLabel( i18n( "User:" ), this );
mUser = new KLineEdit( this );
mainLayout->addWidget( label, 1, 0 );
mainLayout->addWidget( mUser, 1, 1 );
- label = new QLabel( i18n( "Password:" ), this );
+ label = new TQLabel( i18n( "Password:" ), this );
mPassword = new KLineEdit( this );
- mPassword->setEchoMode( QLineEdit::Password );
+ mPassword->setEchoMode( TQLineEdit::Password );
mainLayout->addWidget( label, 2, 0 );
mainLayout->addWidget( mPassword, 2, 1 );
- QFrame *hline = new QFrame( this );
- hline->setFrameStyle( QFrame::HLine | QFrame::Sunken );
+ TQFrame *hline = new TQFrame( this );
+ hline->setFrameStyle( TQFrame::HLine | TQFrame::Sunken );
mainLayout->addMultiCellWidget( hline, 3, 3, 0, 1 );
- QPushButton *updateButton = new QPushButton( i18n( "Retrieve Address Book List From Server" ), this );
+ TQPushButton *updateButton = new TQPushButton( i18n( "Retrieve Address Book List From Server" ), this );
mainLayout->addMultiCellWidget( updateButton, 4, 4, 0, 1 );
mAddressBookView = new KListView( this );
@@ -100,13 +100,13 @@ ResourceGroupwareConfig::ResourceGroupwareConfig( QWidget* parent, const char*
mainLayout->addMultiCellWidget( mAddressBookView, 5, 5, 0, 1 );
- label = new QLabel( i18n( "Address book for new contacts:" ), this );
+ label = new TQLabel( i18n( "Address book for new contacts:" ), this );
mAddressBookBox = new KComboBox( this );
mainLayout->addWidget( label, 6, 0 );
mainLayout->addWidget( mAddressBookBox, 6, 1 );
- connect( updateButton, SIGNAL( clicked() ), SLOT( updateAddressBookList() ) );
+ connect( updateButton, TQT_SIGNAL( clicked() ), TQT_SLOT( updateAddressBookList() ) );
}
void ResourceGroupwareConfig::loadSettings( KRES::Resource *res )
@@ -158,10 +158,10 @@ void ResourceGroupwareConfig::updateAddressBookList()
void ResourceGroupwareConfig::saveAddressBookSettings()
{
#if 0
- QStringList selectedRead;
- QString selectedWrite;
+ TQStringList selectedRead;
+ TQString selectedWrite;
- QListViewItemIterator it2( mAddressBookView );
+ TQListViewItemIterator it2( mAddressBookView );
while ( it2.current() ) {
AddressBookItem *item = static_cast<AddressBookItem*>( it2.current() );
if ( item->isOn() )
@@ -187,7 +187,7 @@ void ResourceGroupwareConfig::updateAddressBookView()
mWriteAddressBookIds.clear();
#if 0
- QStringList selectedRead = mResource->prefs()->readAddressBooks();
+ TQStringList selectedRead = mResource->prefs()->readAddressBooks();
Groupware::AddressBook::List addressBooks = mResource->addressBooks();
Groupware::AddressBook::List::ConstIterator abIt;
diff --git a/kresources/groupware/kabc_resourcegroupwareconfig.h b/kresources/groupware/kabc_resourcegroupwareconfig.h
index f8df15bc4..32bcfa710 100644
--- a/kresources/groupware/kabc_resourcegroupwareconfig.h
+++ b/kresources/groupware/kabc_resourcegroupwareconfig.h
@@ -22,7 +22,7 @@
#include <kresources/configwidget.h>
-#include <qmap.h>
+#include <tqmap.h>
class KComboBox;
class KLineEdit;
@@ -38,7 +38,7 @@ class ResourceGroupwareConfig : public KRES::ConfigWidget
Q_OBJECT
public:
- ResourceGroupwareConfig( QWidget* parent = 0, const char* name = 0 );
+ ResourceGroupwareConfig( TQWidget* parent = 0, const char* name = 0 );
public slots:
void loadSettings( KRES::Resource* );
@@ -60,7 +60,7 @@ class ResourceGroupwareConfig : public KRES::ConfigWidget
KListView *mAddressBookView;
KComboBox *mAddressBookBox;
- QStringList mWriteAddressBookIds;
+ TQStringList mWriteAddressBookIds;
ResourceGroupware *mResource;
};
diff --git a/kresources/groupware/kcal_resourcegroupware.cpp b/kresources/groupware/kcal_resourcegroupware.cpp
index 9adbffdd7..b651d7390 100644
--- a/kresources/groupware/kcal_resourcegroupware.cpp
+++ b/kresources/groupware/kcal_resourcegroupware.cpp
@@ -28,11 +28,11 @@
#include <libkcal/icalformat.h>
#include <libkcal/calendarlocal.h>
-#include <qapplication.h>
-#include <qdatetime.h>
-#include <qptrlist.h>
-#include <qstringlist.h>
-#include <qtimer.h>
+#include <tqapplication.h>
+#include <tqdatetime.h>
+#include <tqptrlist.h>
+#include <tqstringlist.h>
+#include <tqtimer.h>
#include <kabc/locknull.h>
#include <kdebug.h>
@@ -152,19 +152,19 @@ bool ResourceGroupware::doLoad()
kdDebug() << "Download URL: " << url << endl;
- mJobData = QString::null;
+ mJobData = TQString::null;
mDownloadJob = KPIM::GroupwareJob::getCalendar( url );
- connect( mDownloadJob, SIGNAL( result( KIO::Job * ) ),
- SLOT( slotJobResult( KIO::Job * ) ) );
- connect( mDownloadJob, SIGNAL( data( KIO::Job *, const QByteArray & ) ),
- SLOT( slotJobData( KIO::Job *, const QByteArray & ) ) );
+ connect( mDownloadJob, TQT_SIGNAL( result( KIO::Job * ) ),
+ TQT_SLOT( slotJobResult( KIO::Job * ) ) );
+ connect( mDownloadJob, TQT_SIGNAL( data( KIO::Job *, const TQByteArray & ) ),
+ TQT_SLOT( slotJobData( KIO::Job *, const TQByteArray & ) ) );
mProgress = KPIM::ProgressManager::instance()->createProgressItem(
KPIM::ProgressManager::getUniqueID(), i18n("Downloading calendar") );
connect( mProgress,
- SIGNAL( progressItemCanceled( KPIM::ProgressItem * ) ),
- SLOT( cancelLoad() ) );
+ TQT_SIGNAL( progressItemCanceled( KPIM::ProgressItem * ) ),
+ TQT_SLOT( cancelLoad() ) );
return true;
}
@@ -193,8 +193,8 @@ void ResourceGroupware::slotJobResult( KIO::Job *job )
for( it = incidences.begin(); it != incidences.end(); ++it ) {
// kdDebug() << "INCIDENCE: " << (*it)->summary() << endl;
Incidence *i = (*it)->clone();
- QString remote = (*it)->customProperty( "GWRESOURCE", "UID" );
- QString local = idMapper().localId( remote );
+ TQString remote = (*it)->customProperty( "GWRESOURCE", "UID" );
+ TQString local = idMapper().localId( remote );
if ( local.isEmpty() ) {
idMapper().setRemoteId( i->uid(), remote );
} else {
@@ -217,7 +217,7 @@ void ResourceGroupware::slotJobResult( KIO::Job *job )
mProgress = 0;
}
-void ResourceGroupware::slotJobData( KIO::Job *, const QByteArray &data )
+void ResourceGroupware::slotJobData( KIO::Job *, const TQByteArray &data )
{
// kdDebug() << "ResourceGroupware::slotJobData()" << endl;
@@ -281,7 +281,7 @@ bool ResourceGroupware::confirmSave()
dlg.addIncidences( deletedIncidences(), i18n("Deleted") );
int result = dlg.exec();
- return result == QDialog::Accepted;
+ return result == TQDialog::Accepted;
}
KABC::Lock *ResourceGroupware::lock()
diff --git a/kresources/groupware/kcal_resourcegroupware.h b/kresources/groupware/kcal_resourcegroupware.h
index 7ddece926..610203fc3 100644
--- a/kresources/groupware/kcal_resourcegroupware.h
+++ b/kresources/groupware/kcal_resourcegroupware.h
@@ -70,7 +70,7 @@ class ResourceGroupware : public ResourceCached
void loadFinished();
void slotJobResult( KIO::Job * );
- void slotJobData( KIO::Job *, const QByteArray & );
+ void slotJobData( KIO::Job *, const TQByteArray & );
void cancelLoad();
@@ -80,7 +80,7 @@ class ResourceGroupware : public ResourceCached
KIO::TransferJob *mDownloadJob;
KPIM::ProgressItem *mProgress;
- QString mJobData;
+ TQString mJobData;
bool mIsShowingError;
};
diff --git a/kresources/groupware/kcal_resourcegroupwareconfig.cpp b/kresources/groupware/kcal_resourcegroupwareconfig.cpp
index d0581182d..2d5cffe00 100644
--- a/kresources/groupware/kcal_resourcegroupwareconfig.cpp
+++ b/kresources/groupware/kcal_resourcegroupwareconfig.cpp
@@ -20,9 +20,9 @@
#include <typeinfo>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qcheckbox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqcheckbox.h>
#include <klocale.h>
#include <kdebug.h>
@@ -38,23 +38,23 @@
using namespace KCal;
-ResourceGroupwareConfig::ResourceGroupwareConfig( QWidget* parent, const char* name )
+ResourceGroupwareConfig::ResourceGroupwareConfig( TQWidget* parent, const char* name )
: KRES::ConfigWidget( parent, name )
{
resize( 245, 115 );
- QGridLayout *mainLayout = new QGridLayout( this, 2, 2 );
+ TQGridLayout *mainLayout = new TQGridLayout( this, 2, 2 );
- QLabel *label = new QLabel( i18n("URL:"), this );
+ TQLabel *label = new TQLabel( i18n("URL:"), this );
mainLayout->addWidget( label, 1, 0 );
mUrl = new KLineEdit( this );
mainLayout->addWidget( mUrl, 1, 1 );
- label = new QLabel( i18n("User:"), this );
+ label = new TQLabel( i18n("User:"), this );
mainLayout->addWidget( label, 2, 0 );
mUserEdit = new KLineEdit( this );
mainLayout->addWidget( mUserEdit, 2, 1 );
- label = new QLabel( i18n("Password:"), this );
+ label = new TQLabel( i18n("Password:"), this );
mainLayout->addWidget( label, 3, 0 );
mPasswordEdit = new KLineEdit( this );
mainLayout->addWidget( mPasswordEdit, 3, 1 );
diff --git a/kresources/groupware/kcal_resourcegroupwareconfig.h b/kresources/groupware/kcal_resourcegroupwareconfig.h
index ab2fd424d..10115f7e7 100644
--- a/kresources/groupware/kcal_resourcegroupwareconfig.h
+++ b/kresources/groupware/kcal_resourcegroupwareconfig.h
@@ -42,7 +42,7 @@ class ResourceGroupwareConfig : public KRES::ConfigWidget
{
Q_OBJECT
public:
- ResourceGroupwareConfig( QWidget *parent = 0, const char *name = 0 );
+ ResourceGroupwareConfig( TQWidget *parent = 0, const char *name = 0 );
public slots:
virtual void loadSettings( KRES::Resource *resource );
diff --git a/kresources/groupwise/groupwisesettingswidget.cpp b/kresources/groupwise/groupwisesettingswidget.cpp
index 1a758f3bc..60d047123 100644
--- a/kresources/groupwise/groupwisesettingswidget.cpp
+++ b/kresources/groupwise/groupwisesettingswidget.cpp
@@ -24,20 +24,20 @@
#include "groupwisesettingswidget.h"
-GroupWiseSettingsWidget::GroupWiseSettingsWidget( QWidget * parent )
+GroupWiseSettingsWidget::GroupWiseSettingsWidget( TQWidget * parent )
: GroupWiseSettingsWidgetBase( parent )
{
- connect( m_settingsList, SIGNAL( itemRenamed( QListViewItem *, int ) ),
- this, SLOT( slotItemRenamed( QListViewItem *, int ) ) );
+ connect( m_settingsList, TQT_SIGNAL( itemRenamed( TQListViewItem *, int ) ),
+ this, TQT_SLOT( slotItemRenamed( TQListViewItem *, int ) ) );
}
-void GroupWiseSettingsWidget::slotItemRenamed( QListViewItem * item, int )
+void GroupWiseSettingsWidget::slotItemRenamed( TQListViewItem * item, int )
{
kdDebug() << "GroupWiseSettingsWidget::slotItemRenamed() - " << item->text( 1 ) << " changed to " << item->text( 2 ) << endl;
m_dirtySettings.insert( item->text( 1 ), item->text( 2 ) );
}
-QMap<QString, QString> GroupWiseSettingsWidget::dirtySettings()
+TQMap<TQString, TQString> GroupWiseSettingsWidget::dirtySettings()
{
return m_dirtySettings;
}
diff --git a/kresources/groupwise/groupwisesettingswidget.h b/kresources/groupwise/groupwisesettingswidget.h
index a46deb7bf..aa2d3df57 100644
--- a/kresources/groupwise/groupwisesettingswidget.h
+++ b/kresources/groupwise/groupwisesettingswidget.h
@@ -22,7 +22,7 @@
#ifndef GROUPWISE_SETTINGS_WIDGET_H
#define GROUPWISE_SETTINGS_WIDGET_H
-#include <qmap.h>
+#include <tqmap.h>
class QListViewItem;
@@ -32,16 +32,16 @@ class GroupWiseSettingsWidget : public GroupWiseSettingsWidgetBase
{
Q_OBJECT
public:
- GroupWiseSettingsWidget( QWidget * parent );
- QMap<QString, QString> dirtySettings();
+ GroupWiseSettingsWidget( TQWidget * parent );
+ TQMap<TQString, TQString> dirtySettings();
void reset();
protected slots:
/**
* Add the renamed item to the list of dirty (changed) settings
*/
- void slotItemRenamed( QListViewItem *Item, int ColumnRenamed );
+ void slotItemRenamed( TQListViewItem *Item, int ColumnRenamed );
private:
- QMap<QString, QString> m_dirtySettings;
+ TQMap<TQString, TQString> m_dirtySettings;
};
#endif
diff --git a/kresources/groupwise/kabc_resourcegroupwise.cpp b/kresources/groupwise/kabc_resourcegroupwise.cpp
index e37a4d65c..9aa33ac7f 100644
--- a/kresources/groupwise/kabc_resourcegroupwise.cpp
+++ b/kresources/groupwise/kabc_resourcegroupwise.cpp
@@ -18,8 +18,8 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#include <qapplication.h>
-#include <qfile.h>
+#include <tqapplication.h>
+#include <tqfile.h>
#include <kabc/addressee.h>
#include <kabc/vcardconverter.h>
@@ -47,10 +47,10 @@ ResourceGroupwise::ResourceGroupwise( const KConfig *config )
}
ResourceGroupwise::ResourceGroupwise( const KURL &url,
- const QString &user,
- const QString &password,
- const QStringList &readAddressBooks,
- const QString &writeAddressBook )
+ const TQString &user,
+ const TQString &password,
+ const TQStringList &readAddressBooks,
+ const TQString &writeAddressBook )
: ResourceCached( 0 )
{
init();
@@ -115,16 +115,16 @@ void ResourceGroupwise::clearCache()
{
idMapper().clear();
mAddrMap.clear();
- QFile file( cacheFile() );
+ TQFile file( cacheFile() );
file.remove();
}
void ResourceGroupwise::readAddressBooks()
{
- QStringList ids = prefs()->ids();
- QStringList names = prefs()->names();
- QStringList personals = prefs()->personals();
- QStringList frequents = prefs()->frequents();
+ TQStringList ids = prefs()->ids();
+ TQStringList names = prefs()->names();
+ TQStringList personals = prefs()->personals();
+ TQStringList frequents = prefs()->frequents();
if ( ids.count() != names.count() || ids.count() != personals.count() ||
ids.count() != frequents.count() ) {
@@ -147,10 +147,10 @@ void ResourceGroupwise::readAddressBooks()
void ResourceGroupwise::writeAddressBooks()
{
- QStringList ids;
- QStringList names;
- QStringList personals;
- QStringList frequents;
+ TQStringList ids;
+ TQStringList names;
+ TQStringList personals;
+ TQStringList frequents;
GroupWise::AddressBook::List::ConstIterator it;
for( it = mAddressBooks.begin(); it != mAddressBooks.end(); ++it ) {
ids.append( (*it).id );
@@ -177,8 +177,8 @@ void ResourceGroupwise::retrieveAddressBooks()
mAddressBooks = server.addressBookList();
server.logout();
- QStringList reads;
- QString write;
+ TQStringList reads;
+ TQString write;
GroupWise::AddressBook::List::ConstIterator it;
for( it = mAddressBooks.begin(); it != mAddressBooks.end(); ++it ) {
@@ -287,9 +287,9 @@ bool ResourceGroupwise::asyncLoad()
if ( !mProgress )
{
mProgress = KPIM::ProgressManager::instance()->createProgressItem(
- KPIM::ProgressManager::getUniqueID(), i18n( "Loading GroupWise resource %1" ).arg( resourceName() ), QString::null, true /*CanBeCancelled*/, mPrefs->url().startsWith("https" ) );
- connect( mProgress, SIGNAL( progressItemCanceled( KPIM::ProgressItem * ) ),
- SLOT( cancelLoad() ) );
+ KPIM::ProgressManager::getUniqueID(), i18n( "Loading GroupWise resource %1" ).arg( resourceName() ), TQString::null, true /*CanBeCancelled*/, mPrefs->url().startsWith("https" ) );
+ connect( mProgress, TQT_SIGNAL( progressItemCanceled( KPIM::ProgressItem * ) ),
+ TQT_SLOT( cancelLoad() ) );
}
if ( addressBooks().isEmpty() ) {
@@ -338,7 +338,7 @@ void ResourceGroupwise::fetchAddressBooks( const BookType bookType )
}
mState = ( bookType == System ? FetchingSAB : FetchingUAB );
- mJobData = QString::null;
+ mJobData = TQString::null;
if ( mJob )
{
@@ -349,28 +349,28 @@ void ResourceGroupwise::fetchAddressBooks( const BookType bookType )
mJob = KIO::get( url, false, false ); // TODO: make the GW jobs call finished if the URL
// contains no address book IDs
kdDebug() << " Job address: " << mJob << endl;
- connect( mJob, SIGNAL( data( KIO::Job *, const QByteArray & ) ),
- SLOT( slotReadJobData( KIO::Job *, const QByteArray & ) ) );
- connect( mJob, SIGNAL( percent( KIO::Job *, unsigned long ) ),
- SLOT( slotJobPercent( KIO::Job *, unsigned long ) ) );
+ connect( mJob, TQT_SIGNAL( data( KIO::Job *, const TQByteArray & ) ),
+ TQT_SLOT( slotReadJobData( KIO::Job *, const TQByteArray & ) ) );
+ connect( mJob, TQT_SIGNAL( percent( KIO::Job *, unsigned long ) ),
+ TQT_SLOT( slotJobPercent( KIO::Job *, unsigned long ) ) );
if ( bookType == System )
{
- connect( mJob, SIGNAL( result( KIO::Job * ) ),
- SLOT( fetchSABResult( KIO::Job * ) ) );
+ connect( mJob, TQT_SIGNAL( result( KIO::Job * ) ),
+ TQT_SLOT( fetchSABResult( KIO::Job * ) ) );
mSABProgress = KPIM::ProgressManager::instance()->createProgressItem(
mProgress, KPIM::ProgressManager::getUniqueID(),
- i18n( "Fetching System Address Book" ), QString::null,
+ i18n( "Fetching System Address Book" ), TQString::null,
false /*CannotBeCancelled*/,
mPrefs->url().startsWith("https" ) );
}
else
{
- connect( mJob, SIGNAL( result( KIO::Job * ) ),
- SLOT( fetchUABResult( KIO::Job * ) ) );
+ connect( mJob, TQT_SIGNAL( result( KIO::Job * ) ),
+ TQT_SLOT( fetchUABResult( KIO::Job * ) ) );
mUABProgress = KPIM::ProgressManager::instance()->createProgressItem(
mProgress, KPIM::ProgressManager::getUniqueID(),
- i18n( "Fetching User Address Books" ), QString::null,
+ i18n( "Fetching User Address Books" ), TQString::null,
false /*CannotBeCancelled*/,
mPrefs->url().startsWith("https" ) );
}
@@ -437,21 +437,21 @@ void ResourceGroupwise::updateSystemAddressBook()
KURL url = createAccessUrl( System, Update, mPrefs->lastSequenceNumber(), mPrefs->lastTimePORebuild() );
kdDebug() << " Update URL: " << url << endl;
- mJobData = QString::null;
+ mJobData = TQString::null;
mSABProgress = KPIM::ProgressManager::instance()->createProgressItem(
mProgress, KPIM::ProgressManager::getUniqueID(),
- i18n( "Updating System Address Book" ), QString::null,
+ i18n( "Updating System Address Book" ), TQString::null,
false /*CannotBeCancelled*/,
mPrefs->url().startsWith("https" ) );
mJob = KIO::get( url, false, false );
mJob->setInteractive( false );
- connect( mJob, SIGNAL( result( KIO::Job * ) ),
- SLOT( updateSABResult( KIO::Job * ) ) );
- connect( mJob, SIGNAL( data( KIO::Job *, const QByteArray & ) ),
- SLOT( slotUpdateJobData( KIO::Job *, const QByteArray & ) ) );
- connect( mJob, SIGNAL( percent( KIO::Job *, unsigned long ) ),
- SLOT( slotJobPercent( KIO::Job *, unsigned long ) ) );
+ connect( mJob, TQT_SIGNAL( result( KIO::Job * ) ),
+ TQT_SLOT( updateSABResult( KIO::Job * ) ) );
+ connect( mJob, TQT_SIGNAL( data( KIO::Job *, const TQByteArray & ) ),
+ TQT_SLOT( slotUpdateJobData( KIO::Job *, const TQByteArray & ) ) );
+ connect( mJob, TQT_SIGNAL( percent( KIO::Job *, unsigned long ) ),
+ TQT_SLOT( slotJobPercent( KIO::Job *, unsigned long ) ) );
return;
}
@@ -486,7 +486,7 @@ void ResourceGroupwise::updateSABResult( KIO::Job *job )
loadCompleted();
}
-void ResourceGroupwise::slotReadJobData( KIO::Job *job , const QByteArray &data )
+void ResourceGroupwise::slotReadJobData( KIO::Job *job , const TQByteArray &data )
{
kdDebug() << "ResourceGroupwise::slotReadJobData()" << endl;
Q_UNUSED( job );
@@ -494,7 +494,7 @@ void ResourceGroupwise::slotReadJobData( KIO::Job *job , const QByteArray &data
mJobData.append( data.data() );
KABC::VCardConverter conv;
- QTime profile;
+ TQTime profile;
profile.start();
Addressee::List addressees = conv.parseVCards( mJobData );
// kdDebug() << " parsed " << addressees.count() << " contacts in " << profile.elapsed() << "ms, now adding to resource..." << endl;
@@ -505,8 +505,8 @@ void ResourceGroupwise::slotReadJobData( KIO::Job *job , const QByteArray &data
if ( !addr.isEmpty() ) {
addr.setResource( this );
- QString remote = addr.custom( "GWRESOURCE", "UID" );
- QString local = idMapper().localId( remote );
+ TQString remote = addr.custom( "GWRESOURCE", "UID" );
+ TQString local = idMapper().localId( remote );
if ( local.isEmpty() ) {
idMapper().setRemoteId( addr.uid(), remote );
} else {
@@ -517,10 +517,10 @@ void ResourceGroupwise::slotReadJobData( KIO::Job *job , const QByteArray &data
clearChange( addr );
}
}
- mJobData = QString::null;
+ mJobData = TQString::null;
}
-void ResourceGroupwise::slotUpdateJobData( KIO::Job *job, const QByteArray &data )
+void ResourceGroupwise::slotUpdateJobData( KIO::Job *job, const TQByteArray &data )
{
kdDebug() << "ResourceGroupwise::slotUpdateJobData()" << endl;
kdDebug() << " Job address: " << job << endl;
@@ -534,9 +534,9 @@ void ResourceGroupwise::slotUpdateJobData( KIO::Job *job, const QByteArray &data
KABC::Addressee addr = *it;
if ( !addr.isEmpty() ) {
// if added or changed
- QString syncType = addr.custom( "GWRESOURCE", "SYNC" );
- QString remote = addr.custom( "GWRESOURCE", "UID" );
- QString local = idMapper().localId( remote );
+ TQString syncType = addr.custom( "GWRESOURCE", "SYNC" );
+ TQString remote = addr.custom( "GWRESOURCE", "UID" );
+ TQString local = idMapper().localId( remote );
if ( syncType == "ADD" || syncType == "UPD" )
{
@@ -567,7 +567,7 @@ void ResourceGroupwise::slotUpdateJobData( KIO::Job *job, const QByteArray &data
}
}
}
- mJobData = QString::null;
+ mJobData = TQString::null;
}
void ResourceGroupwise::loadCompleted()
@@ -664,20 +664,20 @@ ResourceGroupwise::SABState ResourceGroupwise::systemAddressBookState()
bool ResourceGroupwise::shouldFetchSystemAddressBook()
{
- QStringList ids = mPrefs->readAddressBooks();
+ TQStringList ids = mPrefs->readAddressBooks();
return ( appIsWhiteListedForSAB() && ids.find( mPrefs->systemAddressBook() ) != ids.end() );
}
bool ResourceGroupwise::shouldFetchUserAddressBooks()
{
- QStringList ids = mPrefs->readAddressBooks();
+ TQStringList ids = mPrefs->readAddressBooks();
return ( ids.count() > 1 || ids.find( mPrefs->systemAddressBook() ) == ids.end() );
}
KURL ResourceGroupwise::createAccessUrl( BookType bookType, AccessMode mode, unsigned long lastSequenceNumber, unsigned long lastPORebuildTime )
{
// set up list of address book IDs to fetch
- QStringList ids;
+ TQStringList ids;
if ( bookType == System )
ids.append( mPrefs->systemAddressBook() );
else
@@ -699,8 +699,8 @@ KURL ResourceGroupwise::createAccessUrl( BookType bookType, AccessMode mode, uns
url.setUser( prefs()->user() );
url.setPass( prefs()->password() );
- QString query = "?";
- QStringList::ConstIterator it;
+ TQString query = "?";
+ TQStringList::ConstIterator it;
for( it = ids.begin(); it != ids.end(); ++it ) {
if ( it != ids.begin() ) query += "&";
query += "addressbookid=" + *it;
@@ -708,7 +708,7 @@ KURL ResourceGroupwise::createAccessUrl( BookType bookType, AccessMode mode, uns
if ( mode == Update && lastSequenceNumber > 0 && lastPORebuildTime > 0 )
{
- query += QString::fromLatin1( "&update=true&lastSeqNo=%1&PORebuildTime=%2" ).arg( lastSequenceNumber ).arg( lastPORebuildTime );;
+ query += TQString::fromLatin1( "&update=true&lastSeqNo=%1&PORebuildTime=%2" ).arg( lastSequenceNumber ).arg( lastPORebuildTime );;
}
url.setQuery( query );
return url;
diff --git a/kresources/groupwise/kabc_resourcegroupwise.h b/kresources/groupwise/kabc_resourcegroupwise.h
index 8fad2a67d..cd634a010 100644
--- a/kresources/groupwise/kabc_resourcegroupwise.h
+++ b/kresources/groupwise/kabc_resourcegroupwise.h
@@ -46,9 +46,9 @@ class KDE_EXPORT ResourceGroupwise : public ResourceCached
public:
ResourceGroupwise( const KConfig * );
ResourceGroupwise( const KURL &url,
- const QString &user, const QString &password,
- const QStringList &readAddressBooks,
- const QString &writeAddressBook );
+ const TQString &user, const TQString &password,
+ const TQStringList &readAddressBooks,
+ const TQString &writeAddressBook );
~ResourceGroupwise();
void readConfig( const KConfig * );
@@ -140,9 +140,9 @@ class KDE_EXPORT ResourceGroupwise : public ResourceCached
void fetchUABResult( KIO::Job * );
void updateSABResult( KIO::Job * );
/** DATA PROCESSING SLOTS **/
- void slotReadJobData( KIO::Job *, const QByteArray & );
- void slotUpdateJobData( KIO::Job *, const QByteArray & );
- /** HELPER SLOT **/
+ void slotReadJobData( KIO::Job *, const TQByteArray & );
+ void slotUpdateJobData( KIO::Job *, const TQByteArray & );
+ /** HELPER TQT_SLOT **/
void slotJobPercent( KIO::Job *job, unsigned long percent );
void cancelLoad();
@@ -156,7 +156,7 @@ class KDE_EXPORT ResourceGroupwise : public ResourceCached
KPIM::ProgressItem *mProgress;
KPIM::ProgressItem *mSABProgress;
KPIM::ProgressItem *mUABProgress;
- QString mJobData;
+ TQString mJobData;
ResourceState mState;
unsigned long mServerFirstSequence, mServerLastSequence, mServerLastPORebuildTime;
diff --git a/kresources/groupwise/kabc_resourcegroupwiseconfig.cpp b/kresources/groupwise/kabc_resourcegroupwiseconfig.cpp
index daa1008ac..f195700c8 100644
--- a/kresources/groupwise/kabc_resourcegroupwiseconfig.cpp
+++ b/kresources/groupwise/kabc_resourcegroupwiseconfig.cpp
@@ -31,8 +31,8 @@
#include <klistview.h>
#include <kurlrequester.h>
-#include <qlabel.h>
-#include <qlayout.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
using namespace KABC;
@@ -40,7 +40,7 @@ class AddressBookItem : public QCheckListItem
{
public:
AddressBookItem( KListView *parent, GroupWise::AddressBook ab )
- : QCheckListItem( parent, "", CheckBox ),
+ : TQCheckListItem( parent, "", CheckBox ),
mId( ab.id )
{
setText( 0, ab.name );
@@ -50,42 +50,42 @@ class AddressBookItem : public QCheckListItem
else setText( 2, i18n("No") );
}
- QString id() const { return mId; }
+ TQString id() const { return mId; }
private:
- QString mId;
+ TQString mId;
};
-ResourceGroupwiseConfig::ResourceGroupwiseConfig( QWidget* parent, const char* name )
+ResourceGroupwiseConfig::ResourceGroupwiseConfig( TQWidget* parent, const char* name )
: KRES::ConfigWidget( parent, name )
{
- QGridLayout *mainLayout = new QGridLayout( this, 7, 2, 0, KDialog::spacingHint() );
+ TQGridLayout *mainLayout = new TQGridLayout( this, 7, 2, 0, KDialog::spacingHint() );
- QLabel *label = new QLabel( i18n( "URL:" ), this );
+ TQLabel *label = new TQLabel( i18n( "URL:" ), this );
mURL = new KURLRequester( this );
mainLayout->addWidget( label, 0, 0 );
mainLayout->addWidget( mURL, 0, 1 );
- label = new QLabel( i18n( "User:" ), this );
+ label = new TQLabel( i18n( "User:" ), this );
mUser = new KLineEdit( this );
mainLayout->addWidget( label, 1, 0 );
mainLayout->addWidget( mUser, 1, 1 );
- label = new QLabel( i18n( "Password:" ), this );
+ label = new TQLabel( i18n( "Password:" ), this );
mPassword = new KLineEdit( this );
- mPassword->setEchoMode( QLineEdit::Password );
+ mPassword->setEchoMode( TQLineEdit::Password );
mainLayout->addWidget( label, 2, 0 );
mainLayout->addWidget( mPassword, 2, 1 );
- QFrame *hline = new QFrame( this );
- hline->setFrameStyle( QFrame::HLine | QFrame::Sunken );
+ TQFrame *hline = new TQFrame( this );
+ hline->setFrameStyle( TQFrame::HLine | TQFrame::Sunken );
mainLayout->addMultiCellWidget( hline, 3, 3, 0, 1 );
- QPushButton *updateButton = new QPushButton( i18n( "Retrieve Address Book List From Server" ), this );
+ TQPushButton *updateButton = new TQPushButton( i18n( "Retrieve Address Book List From Server" ), this );
mainLayout->addMultiCellWidget( updateButton, 4, 4, 0, 1 );
mAddressBookView = new KListView( this );
@@ -96,13 +96,13 @@ ResourceGroupwiseConfig::ResourceGroupwiseConfig( QWidget* parent, const char*
mainLayout->addMultiCellWidget( mAddressBookView, 5, 5, 0, 1 );
- label = new QLabel( i18n( "Address book for new contacts:" ), this );
+ label = new TQLabel( i18n( "Address book for new contacts:" ), this );
mAddressBookBox = new KComboBox( this );
mainLayout->addWidget( label, 6, 0 );
mainLayout->addWidget( mAddressBookBox, 6, 1 );
- connect( updateButton, SIGNAL( clicked() ), SLOT( updateAddressBookList() ) );
+ connect( updateButton, TQT_SIGNAL( clicked() ), TQT_SLOT( updateAddressBookList() ) );
}
void ResourceGroupwiseConfig::loadSettings( KRES::Resource *res )
@@ -153,10 +153,10 @@ void ResourceGroupwiseConfig::updateAddressBookList()
void ResourceGroupwiseConfig::saveAddressBookSettings()
{
- QStringList selectedRead;
- QString selectedWrite;
+ TQStringList selectedRead;
+ TQString selectedWrite;
- QListViewItemIterator it2( mAddressBookView );
+ TQListViewItemIterator it2( mAddressBookView );
while ( it2.current() ) {
AddressBookItem *item = static_cast<AddressBookItem*>( it2.current() );
if ( item->isOn() )
@@ -167,7 +167,7 @@ void ResourceGroupwiseConfig::saveAddressBookSettings()
// check if the SAB was selected when the settings were loaded and is not selected now,
// if so, clear the resource to clear the SAB data that is no longer required.
// also, set the sequence numbers to 0 so that we know the SAB should be re-fetched in its entirety the next time we do load it
- QString sab = mResource->prefs()->systemAddressBook();
+ TQString sab = mResource->prefs()->systemAddressBook();
if ( ( mReadAddressBookIds.find( sab ) != mReadAddressBookIds.end() ) && ( selectedRead.find( sab ) == selectedRead.end() ) )
{
mResource->clearCache();
@@ -189,7 +189,7 @@ void ResourceGroupwiseConfig::updateAddressBookView()
mAddressBookBox->clear();
mWriteAddressBookIds.clear();
- QStringList selectedRead = mResource->prefs()->readAddressBooks();
+ TQStringList selectedRead = mResource->prefs()->readAddressBooks();
GroupWise::AddressBook::List addressBooks = mResource->addressBooks();
GroupWise::AddressBook::List::ConstIterator abIt;
diff --git a/kresources/groupwise/kabc_resourcegroupwiseconfig.h b/kresources/groupwise/kabc_resourcegroupwiseconfig.h
index 13b336acc..d5bec19a9 100644
--- a/kresources/groupwise/kabc_resourcegroupwiseconfig.h
+++ b/kresources/groupwise/kabc_resourcegroupwiseconfig.h
@@ -25,7 +25,7 @@
#include <kresources/configwidget.h>
#include <kdepimmacros.h>
-#include <qmap.h>
+#include <tqmap.h>
class KComboBox;
class KLineEdit;
@@ -41,7 +41,7 @@ class KDE_EXPORT ResourceGroupwiseConfig : public KRES::ConfigWidget
Q_OBJECT
public:
- ResourceGroupwiseConfig( QWidget* parent = 0, const char* name = 0 );
+ ResourceGroupwiseConfig( TQWidget* parent = 0, const char* name = 0 );
public slots:
void loadSettings( KRES::Resource* );
@@ -63,8 +63,8 @@ class KDE_EXPORT ResourceGroupwiseConfig : public KRES::ConfigWidget
KListView *mAddressBookView;
KComboBox *mAddressBookBox;
- QStringList mWriteAddressBookIds;
- QStringList mReadAddressBookIds;
+ TQStringList mWriteAddressBookIds;
+ TQStringList mReadAddressBookIds;
ResourceGroupwise *mResource;
};
diff --git a/kresources/groupwise/kcal_groupwiseprefs.cpp b/kresources/groupwise/kcal_groupwiseprefs.cpp
index fab0fc457..c2e9ffc0c 100644
--- a/kresources/groupwise/kcal_groupwiseprefs.cpp
+++ b/kresources/groupwise/kcal_groupwiseprefs.cpp
@@ -27,7 +27,7 @@ GroupwisePrefs::GroupwisePrefs()
{
}
-QString GroupwisePrefs::serverUrl() const
+TQString GroupwisePrefs::serverUrl() const
{
return url();
}
diff --git a/kresources/groupwise/kcal_groupwiseprefs.h b/kresources/groupwise/kcal_groupwiseprefs.h
index bfac6ece2..fdc958685 100644
--- a/kresources/groupwise/kcal_groupwiseprefs.h
+++ b/kresources/groupwise/kcal_groupwiseprefs.h
@@ -29,7 +29,7 @@ class GroupwisePrefs : public GroupwisePrefsBase
public:
GroupwisePrefs();
- QString serverUrl() const;
+ TQString serverUrl() const;
};
}
diff --git a/kresources/groupwise/kcal_resourcegroupwise.cpp b/kresources/groupwise/kcal_resourcegroupwise.cpp
index 1467116d1..678ad63e4 100644
--- a/kresources/groupwise/kcal_resourcegroupwise.cpp
+++ b/kresources/groupwise/kcal_resourcegroupwise.cpp
@@ -30,11 +30,11 @@
#include <libkcal/calendarlocal.h>
#include <libkcal/confirmsavedialog.h>
-#include <qapplication.h>
-#include <qdatetime.h>
-#include <qptrlist.h>
-#include <qstringlist.h>
-#include <qtimer.h>
+#include <tqapplication.h>
+#include <tqdatetime.h>
+#include <tqptrlist.h>
+#include <tqstringlist.h>
+#include <tqtimer.h>
#include <kabc/locknull.h>
#include <kdebug.h>
@@ -155,19 +155,19 @@ bool ResourceGroupwise::doLoad()
kdDebug() << "Download URL: " << url << endl;
- mJobData = QString::null;
+ mJobData = TQString::null;
mDownloadJob = KIO::get( url, false, false );
- connect( mDownloadJob, SIGNAL( result( KIO::Job * ) ),
- SLOT( slotJobResult( KIO::Job * ) ) );
- connect( mDownloadJob, SIGNAL( data( KIO::Job *, const QByteArray & ) ),
- SLOT( slotJobData( KIO::Job *, const QByteArray & ) ) );
+ connect( mDownloadJob, TQT_SIGNAL( result( KIO::Job * ) ),
+ TQT_SLOT( slotJobResult( KIO::Job * ) ) );
+ connect( mDownloadJob, TQT_SIGNAL( data( KIO::Job *, const TQByteArray & ) ),
+ TQT_SLOT( slotJobData( KIO::Job *, const TQByteArray & ) ) );
mProgress = KPIM::ProgressManager::instance()->createProgressItem(
KPIM::ProgressManager::getUniqueID(), i18n("Downloading calendar") );
connect( mProgress,
- SIGNAL( progressItemCanceled( KPIM::ProgressItem * ) ),
- SLOT( cancelLoad() ) );
+ TQT_SIGNAL( progressItemCanceled( KPIM::ProgressItem * ) ),
+ TQT_SLOT( cancelLoad() ) );
return true;
}
@@ -186,7 +186,7 @@ void ResourceGroupwise::slotJobResult( KIO::Job *job )
clearCache();
// FIXME: This does not take into account the time zone!
- CalendarLocal calendar( QString::fromLatin1("UTC") );
+ CalendarLocal calendar( TQString::fromLatin1("UTC") );
ICalFormat ical;
if ( !ical.fromString( &calendar, mJobData ) ) {
loadError( i18n("Error parsing calendar data.") );
@@ -196,8 +196,8 @@ void ResourceGroupwise::slotJobResult( KIO::Job *job )
for( it = incidences.begin(); it != incidences.end(); ++it ) {
// kdDebug() << "INCIDENCE: " << (*it)->summary() << endl;
Incidence *i = (*it)->clone();
- QString remote = (*it)->customProperty( "GWRESOURCE", "UID" );
- QString local = idMapper().localId( remote );
+ TQString remote = (*it)->customProperty( "GWRESOURCE", "UID" );
+ TQString local = idMapper().localId( remote );
if ( local.isEmpty() ) {
idMapper().setRemoteId( i->uid(), remote );
} else {
@@ -220,7 +220,7 @@ void ResourceGroupwise::slotJobResult( KIO::Job *job )
mProgress = 0;
}
-void ResourceGroupwise::slotJobData( KIO::Job *, const QByteArray &data )
+void ResourceGroupwise::slotJobData( KIO::Job *, const TQByteArray &data )
{
// kdDebug() << "ResourceGroupwise::slotJobData()" << endl;
@@ -284,7 +284,7 @@ bool ResourceGroupwise::confirmSave()
dlg.addIncidences( deletedIncidences(), i18n("Deleted") );
int result = dlg.exec();
- return result == QDialog::Accepted;
+ return result == TQDialog::Accepted;
}
KABC::Lock *ResourceGroupwise::lock()
@@ -315,7 +315,7 @@ bool ResourceGroupwise::userSettings( ngwt__Settings *&settings )
return success;
}
-bool ResourceGroupwise::modifyUserSettings( QMap<QString, QString> & settings )
+bool ResourceGroupwise::modifyUserSettings( TQMap<TQString, TQString> & settings )
{
kdDebug() << "ResourceGroupwise::modifyUserSettings()" << endl;
diff --git a/kresources/groupwise/kcal_resourcegroupwise.h b/kresources/groupwise/kcal_resourcegroupwise.h
index cf5d6bb17..e808da0e8 100644
--- a/kresources/groupwise/kcal_resourcegroupwise.h
+++ b/kresources/groupwise/kcal_resourcegroupwise.h
@@ -65,7 +65,7 @@ class KDE_EXPORT ResourceGroupwise : public ResourceCached
KABC::Lock *lock();
bool userSettings( ngwt__Settings * &settings );
- bool modifyUserSettings( QMap<QString, QString> & settings );
+ bool modifyUserSettings( TQMap<TQString, TQString> & settings );
protected:
void init();
@@ -73,7 +73,7 @@ class KDE_EXPORT ResourceGroupwise : public ResourceCached
protected slots:
void slotJobResult( KIO::Job * );
- void slotJobData( KIO::Job *, const QByteArray & );
+ void slotJobData( KIO::Job *, const TQByteArray & );
void cancelLoad();
@@ -83,7 +83,7 @@ class KDE_EXPORT ResourceGroupwise : public ResourceCached
KIO::TransferJob *mDownloadJob;
KPIM::ProgressItem *mProgress;
- QString mJobData;
+ TQString mJobData;
bool mIsShowingError;
};
diff --git a/kresources/groupwise/kcal_resourcegroupwiseconfig.cpp b/kresources/groupwise/kcal_resourcegroupwiseconfig.cpp
index 29741d201..04e1affd9 100644
--- a/kresources/groupwise/kcal_resourcegroupwiseconfig.cpp
+++ b/kresources/groupwise/kcal_resourcegroupwiseconfig.cpp
@@ -20,9 +20,9 @@
#include <typeinfo>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qcheckbox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqcheckbox.h>
#include <klocale.h>
#include <klistview.h>
@@ -41,29 +41,29 @@
using namespace KCal;
-ResourceGroupwiseConfig::ResourceGroupwiseConfig( QWidget* parent, const char* name )
+ResourceGroupwiseConfig::ResourceGroupwiseConfig( TQWidget* parent, const char* name )
: KRES::ConfigWidget( parent, name )
{
resize( 245, 115 );
- QGridLayout *mainLayout = new QGridLayout( this, 2, 2 );
+ TQGridLayout *mainLayout = new TQGridLayout( this, 2, 2 );
- QLabel *label = new QLabel( i18n("URL:"), this );
+ TQLabel *label = new TQLabel( i18n("URL:"), this );
mainLayout->addWidget( label, 1, 0 );
mUrl = new KLineEdit( this );
mainLayout->addWidget( mUrl, 1, 1 );
- label = new QLabel( i18n("User:"), this );
+ label = new TQLabel( i18n("User:"), this );
mainLayout->addWidget( label, 2, 0 );
mUserEdit = new KLineEdit( this );
mainLayout->addWidget( mUserEdit, 2, 1 );
- label = new QLabel( i18n("Password:"), this );
+ label = new TQLabel( i18n("Password:"), this );
mainLayout->addWidget( label, 3, 0 );
mPasswordEdit = new KLineEdit( this );
mainLayout->addWidget( mPasswordEdit, 3, 1 );
mPasswordEdit->setEchoMode( KLineEdit::Password );
- QPushButton *settingsButton = new QPushButton( i18n( "View User Settings" ), this );
+ TQPushButton *settingsButton = new TQPushButton( i18n( "View User Settings" ), this );
mainLayout->addMultiCellWidget( settingsButton, 4, 4, 0, 1 );
mReloadConfig = new KCal::ResourceCachedReloadConfig( this );
@@ -73,7 +73,7 @@ ResourceGroupwiseConfig::ResourceGroupwiseConfig( QWidget* parent, const char*
mainLayout->addMultiCellWidget( mSaveConfig, 6, 6, 0, 1 );
settingsButton->hide();
- // connect( settingsButton, SIGNAL( clicked() ), SLOT( slotViewUserSettings() ) );
+ // connect( settingsButton, TQT_SIGNAL( clicked() ), TQT_SLOT( slotViewUserSettings() ) );
}
@@ -123,8 +123,8 @@ void ResourceGroupwiseConfig::slotViewUserSettings()
if ( s )
{
- KDialogBase * dialog = new KDialogBase( ::qt_cast<QWidget*>(parent() ), "gwsettingswidget", true, i18n( "GroupWise Settings" ) );
-// QVBoxLayout * layout = new QVBoxLayout( dialog );
+ KDialogBase * dialog = new KDialogBase( ::qt_cast<TQWidget*>(parent() ), "gwsettingswidget", true, i18n( "GroupWise Settings" ) );
+// TQVBoxLayout * layout = new TQVBoxLayout( dialog );
GroupWiseSettingsWidget * settingsWidget = new GroupWiseSettingsWidget( dialog );
dialog->setMainWidget( settingsWidget );
// populate dialog
@@ -133,10 +133,10 @@ void ResourceGroupwiseConfig::slotViewUserSettings()
for( it = s->group.begin(); it != s->group.end(); ++it )
{
ngwt__SettingsGroup * group = *it;
- QString groupName;
+ TQString groupName;
if ( group->type )
{
- groupName = QString::fromUtf8( group->type->c_str() );
+ groupName = TQString::fromUtf8( group->type->c_str() );
kdDebug() << "GROUP: " << groupName << endl;;
}
KListViewItem * groupLVI = new KListViewItem( settingsWidget->m_settingsList, groupName );
@@ -144,27 +144,27 @@ void ResourceGroupwiseConfig::slotViewUserSettings()
std::vector<class ngwt__Custom *>::const_iterator it2;
for( it2 = setting.begin(); it2 != setting.end(); ++it2 )
{
- QString setting, value;
+ TQString setting, value;
bool locked = false;
- setting = QString::fromUtf8( (*it2)->field.c_str() );
+ setting = TQString::fromUtf8( (*it2)->field.c_str() );
if ( (*it2)->value )
{
- value = QString::fromUtf8( (*it2)->value->c_str() );
+ value = TQString::fromUtf8( (*it2)->value->c_str() );
}
if ( (*it2)->locked )
locked = *((*it2)->locked);
kdDebug() << " SETTING: " << setting << " value : " << value << (locked ? "locked" : " not locked " ) << endl;
- KListViewItem * settingLVI = new KListViewItem( groupLVI, QString::null, setting, value, (locked ? "locked" : " not locked " ) );
+ KListViewItem * settingLVI = new KListViewItem( groupLVI, TQString::null, setting, value, (locked ? "locked" : " not locked " ) );
if ( !locked )
settingLVI->setRenameEnabled( 2, true );
}
}
dialog->show();
- if ( dialog->exec() == QDialog::Accepted )
+ if ( dialog->exec() == TQDialog::Accepted )
{
- QMap<QString, QString> settings = settingsWidget->dirtySettings();
+ TQMap<TQString, TQString> settings = settingsWidget->dirtySettings();
mResource->modifyUserSettings( settings );
}
}
diff --git a/kresources/groupwise/kcal_resourcegroupwiseconfig.h b/kresources/groupwise/kcal_resourcegroupwiseconfig.h
index 18ead1d3a..bc6f81c74 100644
--- a/kresources/groupwise/kcal_resourcegroupwiseconfig.h
+++ b/kresources/groupwise/kcal_resourcegroupwiseconfig.h
@@ -43,7 +43,7 @@ class KDE_EXPORT ResourceGroupwiseConfig : public KRES::ConfigWidget
{
Q_OBJECT
public:
- ResourceGroupwiseConfig( QWidget *parent = 0, const char *name = 0 );
+ ResourceGroupwiseConfig( TQWidget *parent = 0, const char *name = 0 );
public slots:
virtual void loadSettings( KRES::Resource *resource );
diff --git a/kresources/groupwise/kioslave/groupwise.cpp b/kresources/groupwise/kioslave/groupwise.cpp
index 60e768e2e..44178fe61 100644
--- a/kresources/groupwise/kioslave/groupwise.cpp
+++ b/kresources/groupwise/kioslave/groupwise.cpp
@@ -21,7 +21,7 @@
#include "groupwiseserver.h"
-#include <qregexp.h>
+#include <tqregexp.h>
#include <libkdepim/kabcresourcecached.h>
@@ -84,8 +84,8 @@ int kdemain( int argc, char **argv )
return 0;
}
-Groupwise::Groupwise( const QCString &protocol, const QCString &pool,
- const QCString &app )
+Groupwise::Groupwise( const TQCString &protocol, const TQCString &pool,
+ const TQCString &app )
: SlaveBase( protocol, pool, app )
{
}
@@ -103,7 +103,7 @@ void Groupwise::get( const KURL &url )
mimeType( "text/plain" );
- QString path = url.path();
+ TQString path = url.path();
debugMessage( "Path: " + path );
if ( path.contains( "/freebusy" ) ) {
@@ -116,26 +116,26 @@ void Groupwise::get( const KURL &url )
else
getAddressbook( url );
} else {
- QString error = i18n("Unknown path. Known paths are '/freebusy/', "
- "'/calendar/' and '/addressbook/'.") + QString(" path was %1" ).arg( url.url() );
+ TQString error = i18n("Unknown path. Known paths are '/freebusy/', "
+ "'/calendar/' and '/addressbook/'.") + TQString(" path was %1" ).arg( url.url() );
errorMessage( error );
}
kdDebug(7000) << "Groupwise::get() done" << endl;
}
-QString Groupwise::soapUrl( const KURL &url )
+TQString Groupwise::soapUrl( const KURL &url )
{
// FIXME: Get SSL from parameter
bool useSsl = url.protocol() == "groupwises";
- QString u;
+ TQString u;
if ( useSsl ) u = "https";
else u = "http";
u += "://" + url.host() + ":";
if ( url.port() )
- u += QString::number( url.port() );
+ u += TQString::number( url.port() );
else {
u += "7191";
}
@@ -148,7 +148,7 @@ QString Groupwise::soapUrl( const KURL &url )
url.path().startsWith("/calendar/") ||
url.path().startsWith("/addressbook/" ) ) )
{
- QString soapPath = QString("/") + QStringList::split('/', url.path())[0];
+ TQString soapPath = TQString("/") + TQStringList::split('/', url.path())[0];
u += soapPath;
}
else
@@ -159,24 +159,24 @@ QString Groupwise::soapUrl( const KURL &url )
void Groupwise::getFreeBusy( const KURL &url )
{
- QString file = url.filename();
+ TQString file = url.filename();
if ( file.right( 4 ) != ".ifb" ) {
- QString error = i18n("Illegal filename. File has to have '.ifb' suffix.");
+ TQString error = i18n("Illegal filename. File has to have '.ifb' suffix.");
errorMessage( error );
} else {
- QString email = file.left( file.length() - 4 );
+ TQString email = file.left( file.length() - 4 );
debugMessage( "Email: " + email );
// Sanitise local Nuernberg email addresses
kdDebug() << "Email before sanitizing: " << email << endl;
- email = email.replace(QRegExp("\\.EMEA5-1\\.EMEA5" ), "" );
- email = email.replace(QRegExp("\\.Suse.INTERNET" ), "" );
+ email = email.replace(TQRegExp("\\.EMEA5-1\\.EMEA5" ), "" );
+ email = email.replace(TQRegExp("\\.Suse.INTERNET" ), "" );
kdDebug() << "Email after sanitizing: " << email << endl;
- QString u = soapUrl( url );
+ TQString u = soapUrl( url );
- QString user = url.user();
- QString pass = url.pass();
+ TQString user = url.user();
+ TQString pass = url.pass();
debugMessage( "URL: " + u );
debugMessage( "User: " + user );
@@ -190,8 +190,8 @@ void Groupwise::getFreeBusy( const KURL &url )
GroupwiseServer server( u, user, pass, 0 );
// FIXME: Read range from configuration or URL parameters.
- QDate start = QDate::currentDate().addDays( -3 );
- QDate end = QDate::currentDate().addDays( 60 );
+ TQDate start = TQDate::currentDate().addDays( -3 );
+ TQDate end = TQDate::currentDate().addDays( 60 );
fb->setDtStart( start );
fb->setDtEnd( end );
@@ -211,8 +211,8 @@ void Groupwise::getFreeBusy( const KURL &url )
}
#if 0
- QDateTime s = QDateTime( QDate( 2004, 9, 27 ), QTime( 10, 0 ) );
- QDateTime e = QDateTime( QDate( 2004, 9, 27 ), QTime( 11, 0 ) );
+ TQDateTime s = TQDateTime( TQDate( 2004, 9, 27 ), TQTime( 10, 0 ) );
+ TQDateTime e = TQDateTime( TQDate( 2004, 9, 27 ), TQTime( 11, 0 ) );
fb->addPeriod( s, e );
#endif
@@ -220,7 +220,7 @@ void Groupwise::getFreeBusy( const KURL &url )
// FIXME: This does not take into account the time zone!
KCal::ICalFormat format;
- QString ical = format.createScheduleMessage( fb, KCal::Scheduler::Publish );
+ TQString ical = format.createScheduleMessage( fb, KCal::Scheduler::Publish );
data( ical.utf8() );
@@ -230,10 +230,10 @@ void Groupwise::getFreeBusy( const KURL &url )
void Groupwise::getCalendar( const KURL &url )
{
- QString u = soapUrl( url );
+ TQString u = soapUrl( url );
- QString user = url.user();
- QString pass = url.pass();
+ TQString user = url.user();
+ TQString pass = url.pass();
debugMessage( "URL: " + u );
debugMessage( "User: " + user );
@@ -241,7 +241,7 @@ void Groupwise::getCalendar( const KURL &url )
GroupwiseServer server( u, user, pass, 0 );
- KCal::CalendarLocal calendar( QString::fromLatin1("UTC"));
+ KCal::CalendarLocal calendar( TQString::fromLatin1("UTC"));
kdDebug() << "Login" << endl;
if ( !server.login() ) {
@@ -257,7 +257,7 @@ void Groupwise::getCalendar( const KURL &url )
KCal::ICalFormat format;
- QString ical = format.toString( &calendar );
+ TQString ical = format.toString( &calendar );
data( ical.utf8() );
@@ -266,26 +266,26 @@ void Groupwise::getCalendar( const KURL &url )
void Groupwise::getAddressbook( const KURL &url )
{
- QString u = soapUrl( url );
+ TQString u = soapUrl( url );
- QString user = url.user();
- QString pass = url.pass();
+ TQString user = url.user();
+ TQString pass = url.pass();
debugMessage( "URL: " + u );
debugMessage( "User: " + user );
debugMessage( "Password: " + pass );
- QString query = url.query();
+ TQString query = url.query();
if ( query.isEmpty() || query == "?" ) {
errorMessage( i18n("No addressbook IDs given.") );
} else {
- QStringList ids;
+ TQStringList ids;
query = query.mid( 1 );
- QStringList queryItems = QStringList::split( "&", query );
- QStringList::ConstIterator it;
+ TQStringList queryItems = TQStringList::split( "&", query );
+ TQStringList::ConstIterator it;
for( it = queryItems.begin(); it != queryItems.end(); ++it ) {
- QStringList item = QStringList::split( "=", (*it) );
+ TQStringList item = TQStringList::split( "=", (*it) );
if ( item.count() == 2 && item[ 0 ] == "addressbookid" ) {
ids.append( item[ 1 ] );
}
@@ -295,14 +295,14 @@ void Groupwise::getAddressbook( const KURL &url )
GroupwiseServer server( u, user, pass, 0 );
- connect( &server, SIGNAL( readAddressBookTotalSize( int ) ),
- SLOT( slotReadAddressBookTotalSize( int ) ) );
- connect( &server, SIGNAL( readAddressBookProcessedSize( int ) ),
- SLOT( slotReadAddressBookProcessedSize( int ) ) );
- connect( &server, SIGNAL( errorMessage( const QString &, bool ) ),
- SLOT( slotServerErrorMessage( const QString &, bool ) ) );
- connect( &server, SIGNAL( gotAddressees( const KABC::Addressee::List ) ),
- SLOT( slotReadReceiveAddressees( const KABC::Addressee::List ) ) );
+ connect( &server, TQT_SIGNAL( readAddressBookTotalSize( int ) ),
+ TQT_SLOT( slotReadAddressBookTotalSize( int ) ) );
+ connect( &server, TQT_SIGNAL( readAddressBookProcessedSize( int ) ),
+ TQT_SLOT( slotReadAddressBookProcessedSize( int ) ) );
+ connect( &server, TQT_SIGNAL( errorMessage( const TQString &, bool ) ),
+ TQT_SLOT( slotServerErrorMessage( const TQString &, bool ) ) );
+ connect( &server, TQT_SIGNAL( gotAddressees( const KABC::Addressee::List ) ),
+ TQT_SLOT( slotReadReceiveAddressees( const KABC::Addressee::List ) ) );
kdDebug() << "Login" << endl;
if ( !server.login() ) {
@@ -324,7 +324,7 @@ void Groupwise::slotReadReceiveAddressees( const KABC::Addressee::List addressee
kdDebug() << "Groupwise::slotReadReceiveAddressees() - passing " << addressees.count() << " contacts back to application" << endl;
KABC::VCardConverter conv;
- QString vcard = conv.createVCards( addressees );
+ TQString vcard = conv.createVCards( addressees );
data( vcard.utf8() );
}
@@ -332,16 +332,16 @@ void Groupwise::slotReadReceiveAddressees( const KABC::Addressee::List addressee
void Groupwise::updateAddressbook( const KURL &url )
{
kdDebug() << "Groupwise::updateAddressbook() " << url << endl;
- QString u = soapUrl( url );
+ TQString u = soapUrl( url );
- QString user = url.user();
- QString pass = url.pass();
+ TQString user = url.user();
+ TQString pass = url.pass();
debugMessage( "update AB URL: " + u );
debugMessage( "update AB User: " + user );
debugMessage( "update AB Password: " + pass );
- QString query = url.query();
+ TQString query = url.query();
unsigned long lastSequenceNumber = 0;
unsigned long lastPORebuildTime = 0;
@@ -350,13 +350,13 @@ void Groupwise::updateAddressbook( const KURL &url )
errorMessage( i18n("No addressbook IDs given.") );
return;
} else {
- QStringList ids;
+ TQStringList ids;
query = query.mid( 1 );
- QStringList queryItems = QStringList::split( "&", query );
- QStringList::ConstIterator it;
+ TQStringList queryItems = TQStringList::split( "&", query );
+ TQStringList::ConstIterator it;
for( it = queryItems.begin(); it != queryItems.end(); ++it ) {
- QStringList item = QStringList::split( "=", (*it) );
+ TQStringList item = TQStringList::split( "=", (*it) );
if ( item.count() == 2 && item[ 0 ] == "addressbookid" ) {
ids.append( item[ 1 ] );
}
@@ -369,10 +369,10 @@ void Groupwise::updateAddressbook( const KURL &url )
debugMessage( "update IDs: " + ids.join( "," ) );
GroupwiseServer server( u, user, pass, 0 );
- connect( &server, SIGNAL( errorMessage( const QString &, bool ) ),
- SLOT( slotServerErrorMessage( const QString &, bool ) ) );
- connect( &server, SIGNAL( gotAddressees( const KABC::Addressee::List ) ),
- SLOT( slotReadReceiveAddressees( const KABC::Addressee::List ) ) );
+ connect( &server, TQT_SIGNAL( errorMessage( const TQString &, bool ) ),
+ TQT_SLOT( slotServerErrorMessage( const TQString &, bool ) ) );
+ connect( &server, TQT_SIGNAL( gotAddressees( const KABC::Addressee::List ) ),
+ TQT_SLOT( slotReadReceiveAddressees( const KABC::Addressee::List ) ) );
kdDebug() << " Login" << endl;
if ( !server.login() ) {
@@ -391,12 +391,12 @@ void Groupwise::updateAddressbook( const KURL &url )
}
}
-void Groupwise::errorMessage( const QString &msg )
+void Groupwise::errorMessage( const TQString &msg )
{
error( KIO::ERR_SLAVE_DEFINED, msg );
}
-void Groupwise::debugMessage( const QString &msg )
+void Groupwise::debugMessage( const TQString &msg )
{
#if 0
data( ( msg + "\n" ).utf8() );
@@ -416,7 +416,7 @@ void Groupwise::slotReadAddressBookProcessedSize( int size )
processedSize( size );
}
-void Groupwise::slotServerErrorMessage( const QString & serverErrorMessage, bool fatal )
+void Groupwise::slotServerErrorMessage( const TQString & serverErrorMessage, bool fatal )
{
kdDebug() << "Groupwise::slotJobErrorMessage()" << serverErrorMessage << ( fatal ? ", FATAL!" : ", proceeding" ) << endl;
errorMessage( i18n( "An error occurred while communicating with the GroupWise server:\n%1" ).arg( serverErrorMessage ) );
diff --git a/kresources/groupwise/kioslave/groupwise.h b/kresources/groupwise/kioslave/groupwise.h
index c4362d634..9a816ad85 100644
--- a/kresources/groupwise/kioslave/groupwise.h
+++ b/kresources/groupwise/kioslave/groupwise.h
@@ -22,31 +22,31 @@
#include <kio/slavebase.h>
-#include <qobject.h>
+#include <tqobject.h>
-class Groupwise : public QObject, public KIO::SlaveBase
+class Groupwise : public TQObject, public KIO::SlaveBase
{
Q_OBJECT
public:
void get( const KURL &url );
- Groupwise( const QCString &protocol, const QCString &pool,
- const QCString &app );
+ Groupwise( const TQCString &protocol, const TQCString &pool,
+ const TQCString &app );
protected:
- void debugMessage( const QString & );
- void errorMessage( const QString & );
+ void debugMessage( const TQString & );
+ void errorMessage( const TQString & );
void getFreeBusy( const KURL &url );
void getCalendar( const KURL &url );
void getAddressbook( const KURL &url );
void updateAddressbook( const KURL &url );
- QString soapUrl( const KURL &url );
+ TQString soapUrl( const KURL &url );
protected slots:
void slotReadAddressBookTotalSize( int );
void slotReadAddressBookProcessedSize( int );
- void slotServerErrorMessage( const QString &, bool );
+ void slotServerErrorMessage( const TQString &, bool );
void slotReadReceiveAddressees( const KABC::Addressee::List );
};
diff --git a/kresources/groupwise/soap/contactconverter.cpp b/kresources/groupwise/soap/contactconverter.cpp
index a971e56a1..2abb8f452 100644
--- a/kresources/groupwise/soap/contactconverter.cpp
+++ b/kresources/groupwise/soap/contactconverter.cpp
@@ -110,10 +110,10 @@ ngwt__Contact* ContactConverter::convertToContact( const KABC::Addressee &addr )
ngwt__EmailAddressList* emailList = soap_new_ngwt__EmailAddressList( soap(), -1 );
std::vector<std::string>* list = soap_new_std__vectorTemplateOfstd__string( soap(), -1 );
- QStringList emails = addr.emails();
+ TQStringList emails = addr.emails();
emailList->primary = qStringToString( emails.first() );
- QStringList::Iterator it;
+ TQStringList::Iterator it;
for ( it = emails.begin(); it != emails.end(); ++it )
list->push_back( std::string( (*it).utf8() ) );
@@ -284,7 +284,7 @@ KABC::Addressee ContactConverter::convertFromContact( ngwt__Contact* contact )
if ( fullName->displayName )
addr.setFormattedName( stringToQString( fullName->displayName ) );
else
- addr.setFormattedName( QString::null );
+ addr.setFormattedName( TQString::null );
if ( fullName->namePrefix )
addr.setPrefix( stringToQString( fullName->namePrefix ) );
@@ -304,7 +304,7 @@ KABC::Addressee ContactConverter::convertFromContact( ngwt__Contact* contact )
// Emails
if ( contact->emailList ) {
- QStringList emails;
+ TQStringList emails;
if ( contact->emailList->primary )
emails.append( stringToQString( contact->emailList->primary ) );
@@ -324,7 +324,7 @@ KABC::Addressee ContactConverter::convertFromContact( ngwt__Contact* contact )
// Phone numbers
if ( contact->phoneList && !contact->phoneList->phone.empty() ) {
- QString defaultNumber = stringToQString( contact->phoneList->default_ );
+ TQString defaultNumber = stringToQString( contact->phoneList->default_ );
std::vector<class ngwt__PhoneNumber*> list = contact->phoneList->phone;
std::vector<class ngwt__PhoneNumber*>::const_iterator it;
@@ -371,7 +371,7 @@ KABC::Addressee ContactConverter::convertFromContact( ngwt__Contact* contact )
ngwt__PersonalInfo* info = contact->personalInfo;
if ( info->birthday ) {
- QDate date = stringToQDate( info->birthday );
+ TQDate date = stringToQDate( info->birthday );
if ( date.isValid() )
addr.setBirthday( date );
}
@@ -383,28 +383,28 @@ KABC::Addressee ContactConverter::convertFromContact( ngwt__Contact* contact )
// IM addresses
if ( contact->imList ) {
// put all the im addresses on the same service into the same qstringlist
- QMap<QString, QStringList> addressMap;
+ TQMap<TQString, TQStringList> addressMap;
std::vector<ngwt__ImAddress*> list = contact->imList->im;
std::vector<ngwt__ImAddress*>::const_iterator it;
for ( it = list.begin(); it != list.end(); ++it ) {
- QStringList addressesForService = addressMap[ stringToQString( (*it)->service ) ];
+ TQStringList addressesForService = addressMap[ stringToQString( (*it)->service ) ];
addressesForService.append( stringToQString( (*it)->address ) );
addressMap.insert( stringToQString( (*it)->service ), addressesForService );
}
// then construct a custom field from each qstringlist
- QMap<QString, QStringList>::Iterator addrIt;
+ TQMap<TQString, TQStringList>::Iterator addrIt;
for ( addrIt = addressMap.begin(); addrIt != addressMap.end(); ++addrIt )
{
- QString protocol = addrIt.key();
- QStringList addresses = addrIt.data();
+ TQString protocol = addrIt.key();
+ TQStringList addresses = addrIt.data();
//kdDebug() << "got IM addresses for '" << protocol << "' : " << addresses << endl;
// TODO: map protocol to KDE's set of known protocol names (need to know the set of services in use elsewhere)
if ( protocol == "nov" )
protocol = "groupwise";
- addr.insertCustom( QString::fromLatin1("messaging/%1").arg( protocol ),
- QString::fromLatin1( "All" ),
- addresses.join( QChar( 0xE000 ) ) );
+ addr.insertCustom( TQString::fromLatin1("messaging/%1").arg( protocol ),
+ TQString::fromLatin1( "All" ),
+ addresses.join( TQChar( 0xE000 ) ) );
}
}
@@ -576,23 +576,23 @@ ngwt__ImAddressList* ContactConverter::convertImAddresses( const KABC::Addressee
// if it contains IM addresses
// extract each one and add it to imList
- const QStringList customs = addr.customs();
- QStringList::ConstIterator it;
+ const TQStringList customs = addr.customs();
+ TQStringList::ConstIterator it;
bool isSet = false;
for ( it = customs.begin(); it != customs.end(); ++it ) {
- QString app, name, value;
+ TQString app, name, value;
splitField( *it, app, name, value );
- if ( app.startsWith( QString::fromLatin1( "messaging/" ) ) && name == QString::fromLatin1( "All" ) ) {
+ if ( app.startsWith( TQString::fromLatin1( "messaging/" ) ) && name == TQString::fromLatin1( "All" ) ) {
// get the protocol for this field
- QString protocol = app.section( '/', 1, 1 );
+ TQString protocol = app.section( '/', 1, 1 );
if ( !protocol.isEmpty() ) {
if ( protocol == "groupwise" )
protocol = "novell";
- QStringList addresses = QStringList::split( QChar( 0xE000 ), value );
- QStringList::iterator end = addresses.end();
+ TQStringList addresses = TQStringList::split( TQChar( 0xE000 ), value );
+ TQStringList::iterator end = addresses.end();
// extract each address for this protocol, and create an ngwt__ImAddress for it, and append it to list.
- for ( QStringList::ConstIterator it = addresses.begin(); it != end; ++it ) {
+ for ( TQStringList::ConstIterator it = addresses.begin(); it != end; ++it ) {
ngwt__ImAddress* address = soap_new_ngwt__ImAddress( soap(), -1 );
address->service = soap_new_std__string( soap(), -1 );
address->address = soap_new_std__string( soap(), -1 );
@@ -616,11 +616,11 @@ ngwt__ImAddressList* ContactConverter::convertImAddresses( const KABC::Addressee
}
}
-void ContactConverter::splitField( const QString &str, QString &app, QString &name, QString &value )
+void ContactConverter::splitField( const TQString &str, TQString &app, TQString &name, TQString &value )
{
int colon = str.find( ':' );
if ( colon != -1 ) {
- QString tmp = str.left( colon );
+ TQString tmp = str.left( colon );
value = str.mid( colon + 1 );
int dash = tmp.find( '-' );
diff --git a/kresources/groupwise/soap/contactconverter.h b/kresources/groupwise/soap/contactconverter.h
index b4376713f..6594c6d0e 100644
--- a/kresources/groupwise/soap/contactconverter.h
+++ b/kresources/groupwise/soap/contactconverter.h
@@ -47,8 +47,8 @@ class ContactConverter : public GWConverter
which is a different structure to that used for phone numbers, email addresses etc */
ngwt__ImAddressList* convertImAddresses( const KABC::Addressee& );
// splits up an arbitrary custom field
- void splitField( const QString &str, QString &app, QString &name, QString &value );
- static QMap<QString, QString > mIMProtocolMap;
+ void splitField( const TQString &str, TQString &app, TQString &name, TQString &value );
+ static TQMap<TQString, TQString > mIMProtocolMap;
};
#endif
diff --git a/kresources/groupwise/soap/groupwiseserver.cpp b/kresources/groupwise/soap/groupwiseserver.cpp
index 8445be9ff..28c73b68d 100644
--- a/kresources/groupwise/soap/groupwiseserver.cpp
+++ b/kresources/groupwise/soap/groupwiseserver.cpp
@@ -38,8 +38,8 @@
#include <kdebug.h>
#include <klocale.h>
-#include <qnamespace.h>
-#include <qfile.h>
+#include <tqnamespace.h>
+#include <tqfile.h>
#include "ksslsocket.h"
#include "contactconverter.h"
@@ -55,11 +55,11 @@
#include "groupwiseserver.h"
-static QMap<struct soap *,GroupwiseServer *> mServerMap;
+static TQMap<struct soap *,GroupwiseServer *> mServerMap;
int myOpen( struct soap *soap, const char *endpoint, const char *host, int port )
{
- QMap<struct soap *,GroupwiseServer *>::ConstIterator it;
+ TQMap<struct soap *,GroupwiseServer *>::ConstIterator it;
it = mServerMap.find( soap );
if ( it == mServerMap.end() ) {
soap->error = SOAP_FAULT;
@@ -71,7 +71,7 @@ int myOpen( struct soap *soap, const char *endpoint, const char *host, int port
int myClose( struct soap *soap )
{
- QMap<struct soap *,GroupwiseServer *>::ConstIterator it;
+ TQMap<struct soap *,GroupwiseServer *>::ConstIterator it;
it = mServerMap.find( soap );
if ( it == mServerMap.end() ) return SOAP_FAULT;
@@ -80,7 +80,7 @@ int myClose( struct soap *soap )
int mySendCallback( struct soap *soap, const char *s, size_t n )
{
- QMap<struct soap *,GroupwiseServer *>::ConstIterator it;
+ TQMap<struct soap *,GroupwiseServer *>::ConstIterator it;
it = mServerMap.find( soap );
if ( it == mServerMap.end() ) return SOAP_FAULT;
@@ -89,7 +89,7 @@ int mySendCallback( struct soap *soap, const char *s, size_t n )
size_t myReceiveCallback( struct soap *soap, char *s, size_t n )
{
- QMap<struct soap *,GroupwiseServer *>::ConstIterator it;
+ TQMap<struct soap *,GroupwiseServer *>::ConstIterator it;
it = mServerMap.find( soap );
if ( it == mServerMap.end() ) {
kdDebug() << "No soap object found" << endl;
@@ -114,11 +114,11 @@ int GroupwiseServer::gSoapOpen( struct soap *soap, const char *,
// kdDebug() << "Creating KSSLSocket()" << endl;
m_sock = new KSSLSocket();
m_sock->setTimeout( KProtocolManager::connectTimeout() );
- connect( m_sock, SIGNAL( sslFailure() ), SLOT( slotSslError() ) );
+ connect( m_sock, TQT_SIGNAL( sslFailure() ), TQT_SLOT( slotSslError() ) );
} else {
m_sock = new KExtendedSocket();
}
- mErrorText = QString::null;
+ mErrorText = TQString::null;
m_sock->reset();
m_sock->setBlockingMode( false );
@@ -128,8 +128,8 @@ int GroupwiseServer::gSoapOpen( struct soap *soap, const char *,
int rc = m_sock->lookup();
if (rc != 0 ) {
kdError() << "gSoapOpen: lookup of " << host << " failed " << rc << endl;
- QString errorMessage;
- errorMessage = QString::fromLatin1( strerror( errno ) );
+ TQString errorMessage;
+ errorMessage = TQString::fromLatin1( strerror( errno ) );
perror( 0 );
soap->error = SOAP_TCP_ERROR;
mErrorText = i18n("Connect failed: %1.").arg( errorMessage );
@@ -139,15 +139,15 @@ int GroupwiseServer::gSoapOpen( struct soap *soap, const char *,
rc = m_sock->connect();
if ( rc != 0 ) {
kdError() << "gSoapOpen: connect failed " << rc << endl;
- QString errorMessage;
+ TQString errorMessage;
if ( rc == -1 ) {
- errorMessage = QString::fromLatin1( strerror( errno ) );
+ errorMessage = TQString::fromLatin1( strerror( errno ) );
perror( 0 );
}
//set the soap struct's error here!
else {
if ( rc == -3 )
- errorMessage = QString::fromLatin1( "Connection timed out. Check host and port number" );
+ errorMessage = TQString::fromLatin1( "Connection timed out. Check host and port number" );
}
mErrorText = i18n("Connect failed: %1.").arg( errorMessage );
soap->error =SOAP_TCP_ERROR;
@@ -263,9 +263,9 @@ size_t GroupwiseServer::gSoapReceiveCallback( struct soap *soap, char *s,
return ret;
}
-GroupwiseServer::GroupwiseServer( const QString &url, const QString &user,
- const QString &password, QObject *parent )
- : QObject( parent, "GroupwiseServer" ),
+GroupwiseServer::GroupwiseServer( const TQString &url, const TQString &user,
+ const TQString &password, TQObject *parent )
+ : TQObject( parent, "GroupwiseServer" ),
mUrl( url ), mUser( user ), mPassword( password ),
mSSL( url.left(6)=="https:" ), m_sock( 0 ),
mError( 0 )
@@ -644,7 +644,7 @@ bool GroupwiseServer::logout()
return true;
}
-GroupWise::DeltaInfo GroupwiseServer::getDeltaInfo( const QStringList & addressBookIds )
+GroupWise::DeltaInfo GroupwiseServer::getDeltaInfo( const TQStringList & addressBookIds )
{
GroupWise::DeltaInfo info;
info.count = 0;
@@ -719,7 +719,7 @@ GroupWise::AddressBook::List GroupwiseServer::addressBookList()
return books;
}
-bool GroupwiseServer::readAddressBooksSynchronous( const QStringList &addrBookIds )
+bool GroupwiseServer::readAddressBooksSynchronous( const TQStringList &addrBookIds )
{
if ( mSession.empty() ) {
kdError() << "GroupwiseServer::readAddressBooksSynchronous(): no session." << endl;
@@ -735,7 +735,7 @@ bool GroupwiseServer::readAddressBooksSynchronous( const QStringList &addrBookId
return true;
}
-bool GroupwiseServer::updateAddressBooks( const QStringList &addrBookIds, const unsigned long startSequenceNumber, const unsigned long lastPORebuildTime )
+bool GroupwiseServer::updateAddressBooks( const TQStringList &addrBookIds, const unsigned long startSequenceNumber, const unsigned long lastPORebuildTime )
{
if ( mSession.empty() ) {
kdError() << "GroupwiseServer::updateAddressBooks(): no session." << endl;
@@ -757,7 +757,7 @@ bool GroupwiseServer::updateAddressBooks( const QStringList &addrBookIds, const
return true;
}
-std::string GroupwiseServer::getFullIDFor( const QString & gwRecordIDFromIcal )
+std::string GroupwiseServer::getFullIDFor( const TQString & gwRecordIDFromIcal )
{
// first get the ID of the calendar folder - because we don't store this in the resource we have to fetch it manually
std::string calendarFolderID;
@@ -847,12 +847,12 @@ bool GroupwiseServer::acceptIncidence( KCal::Incidence *incidence )
GWConverter conv( mSoap );
- QString qGwUid = incidence->customProperty( "GWRESOURCE", "UID" );
+ TQString qGwUid = incidence->customProperty( "GWRESOURCE", "UID" );
std::string gwUID;
if ( qGwUid.isEmpty() )
{
- QString gwRecordIDFromIcal = incidence->nonKDECustomProperty( "X-GWRECORDID" );
+ TQString gwRecordIDFromIcal = incidence->nonKDECustomProperty( "X-GWRECORDID" );
// we need to do a getItem to get the item's complete ID, including the container portion
// this is only necessary because the Ical GWRECORDID property is incomplete
gwUID = getFullIDFor( gwRecordIDFromIcal );
@@ -899,7 +899,7 @@ bool GroupwiseServer::declineIncidence( KCal::Incidence *incidence )
if ( gwUID.empty() )
{
- QString gwRecordIDFromIcal = incidence->nonKDECustomProperty( "X-GWRECORDID" );
+ TQString gwRecordIDFromIcal = incidence->nonKDECustomProperty( "X-GWRECORDID" );
// we need to do a getItem to get the item's complete ID, including the container portion
// this is only necessary because the Ical GWRECORDID property is incomplete
gwUID = getFullIDFor( gwRecordIDFromIcal );
@@ -941,7 +941,7 @@ bool GroupwiseServer::addIncidence( KCal::Incidence *incidence,
kdDebug() << "GroupwiseServer::addIncidence() " << incidence->summary()
<< endl;
- QString gwRecordIDFromIcal = incidence->nonKDECustomProperty( "X-GWRECORDID" );
+ TQString gwRecordIDFromIcal = incidence->nonKDECustomProperty( "X-GWRECORDID" );
if( !gwRecordIDFromIcal.isEmpty() || !incidence->customProperty( "GWRESOURCE", "UID" ).isEmpty() ) {
kdDebug() << "Incidence has GroupWise ID already: (" << gwRecordIDFromIcal << "ical|" << incidence->customProperty( "GWRESOURCE", "UID" ) << "soap) and organizer : " << incidence->organizer().email() << endl;
return acceptIncidence( incidence );
@@ -985,7 +985,7 @@ bool GroupwiseServer::addIncidence( KCal::Incidence *incidence,
{
std::string firstId = *(response.id.begin() );
incidence->setCustomProperty( "GWRESOURCE", "UID",
- QString::fromUtf8( firstId.c_str() ) );
+ TQString::fromUtf8( firstId.c_str() ) );
}
return true;
}
@@ -1106,7 +1106,7 @@ bool GroupwiseServer::checkResponse( int result, ngwt__Status *status )
kdDebug() << "SOAP call succeeded" << endl;
}
if ( status && status->code != 0 ) {
- QString msg = "SOAP Response Status: " + QString::number( status->code );
+ TQString msg = "SOAP Response Status: " + TQString::number( status->code );
if ( status->description ) {
msg += " ";
msg += status->description->c_str();
@@ -1130,11 +1130,11 @@ bool GroupwiseServer::deleteIncidence( KCal::Incidence *incidence )
<< endl;
// decline if necessary on the server
- QString gwRecordIDFromIcal = incidence->nonKDECustomProperty( "X-GWRECORDID" );
+ TQString gwRecordIDFromIcal = incidence->nonKDECustomProperty( "X-GWRECORDID" );
// debug contents of message custom properties
kdDebug() << "incidence custom properties BEGIN" << endl;
- typedef QMap<QCString, QString> PropMap;
+ typedef TQMap<TQCString, TQString> PropMap;
PropMap customs = incidence->customProperties();
PropMap::Iterator it;
for ( it = customs.begin(); it != customs.end(); ++it )
@@ -1219,7 +1219,7 @@ bool GroupwiseServer::retractRequest( KCal::Incidence *incidence, RetractCause c
return checkResponse( result, response.status );
}
-bool GroupwiseServer::insertAddressee( const QString &addrBookId, KABC::Addressee &addr )
+bool GroupwiseServer::insertAddressee( const TQString &addrBookId, KABC::Addressee &addr )
{
if ( mSession.empty() ) {
kdError() << "GroupwiseServer::insertAddressee(): no session." << endl;
@@ -1244,7 +1244,7 @@ bool GroupwiseServer::insertAddressee( const QString &addrBookId, KABC::Addresse
&request, &response );
if ( !checkResponse( result, response.status ) ) return false;
- addr.insertCustom( "GWRESOURCE", "UID", QString::fromUtf8( response.id.front().c_str() ) );
+ addr.insertCustom( "GWRESOURCE", "UID", TQString::fromUtf8( response.id.front().c_str() ) );
addr.setChanged( false );
return true;
@@ -1325,8 +1325,8 @@ bool GroupwiseServer::readCalendarSynchronous( KCal::Calendar *cal )
return true;
}
-bool GroupwiseServer::readFreeBusy( const QString &email,
- const QDate &start, const QDate &end, KCal::FreeBusy *freeBusy )
+bool GroupwiseServer::readFreeBusy( const TQString &email,
+ const TQDate &start, const TQDate &end, KCal::FreeBusy *freeBusy )
{
if ( mSession.empty() ) {
kdError() << "GroupwiseServer::readFreeBusy(): no session." << endl;
@@ -1370,7 +1370,7 @@ bool GroupwiseServer::readFreeBusy( const QString &email,
// Get free/busy data
_ngwm__getFreeBusyRequest getFreeBusyRequest;
- getFreeBusyRequest.freeBusySessionId = QString::number( fbSessionId ).utf8();
+ getFreeBusyRequest.freeBusySessionId = TQString::number( fbSessionId ).utf8();
_ngwm__getFreeBusyResponse getFreeBusyResponse;
@@ -1408,8 +1408,8 @@ bool GroupwiseServer::readFreeBusy( const QString &email,
if ( blocks ) {
std::vector<class ngwt__FreeBusyBlock *>::const_iterator it2;
for( it2 = blocks->begin(); it2 != blocks->end(); ++it2 ) {
- QDateTime blockStart = conv.charToQDateTime( (*it2)->startDate );
- QDateTime blockEnd = conv.charToQDateTime( (*it2)->endDate );
+ TQDateTime blockStart = conv.charToQDateTime( (*it2)->startDate );
+ TQDateTime blockEnd = conv.charToQDateTime( (*it2)->endDate );
ngwt__AcceptLevel acceptLevel = *(*it2)->acceptLevel;
/* TODO: show Free/Busy subject in diagram - we need to support these as people use it for checking others' calendars */
@@ -1458,7 +1458,7 @@ void GroupwiseServer::emitReadAddressBookProcessedSize( int s )
emit readAddressBookProcessedSize( s );
}
-void GroupwiseServer::emitErrorMessage( const QString & msg, bool fatal )
+void GroupwiseServer::emitErrorMessage( const TQString & msg, bool fatal )
{
emit errorMessage( msg, fatal );
}
@@ -1468,16 +1468,16 @@ void GroupwiseServer::emitGotAddressees( const KABC::Addressee::List addressees
emit gotAddressees( addressees );
}
-void GroupwiseServer::log( const QString &prefix, const char *s, size_t n )
+void GroupwiseServer::log( const TQString &prefix, const char *s, size_t n )
{
if ( mLogFile.isEmpty() ) return;
kdDebug() << "GroupwiseServer::log() " << prefix << " " << n << " bytes"
<< endl;
- QString log = mLogFile + "_" + QString::number( getpid() ) +
+ TQString log = mLogFile + "_" + TQString::number( getpid() ) +
"_" + prefix + ".log";
- QFile f( log );
+ TQFile f( log );
if ( !f.open( IO_WriteOnly | IO_Append ) ) {
kdError() << "Unable to open log file '" << log << "'" << endl;
} else {
@@ -1564,7 +1564,7 @@ bool GroupwiseServer::readUserSettings( ngwt__Settings *&returnedSettings )
return true; /** FIXME return false if no settings fetched */
}
-bool GroupwiseServer::modifyUserSettings( QMap<QString, QString> & settings )
+bool GroupwiseServer::modifyUserSettings( TQMap<TQString, TQString> & settings )
{
kdDebug() << "GroupwiseServer::userSettings()" << endl;
@@ -1575,7 +1575,7 @@ bool GroupwiseServer::modifyUserSettings( QMap<QString, QString> & settings )
_ngwm__modifySettingsRequest request;
_ngwm__modifySettingsResponse response;
request.settings = soap_new_ngwt__SettingsList( mSoap, -1 );
- QMap<QString, QString>::Iterator it;
+ TQMap<TQString, TQString>::Iterator it;
for ( it = settings.begin(); it != settings.end(); ++it )
{
kdDebug() << " creating Custom for " << it.key() << ", " << it.data() << endl;
@@ -1610,7 +1610,7 @@ bool GroupwiseServer::setCompleted( KCal::Todo * todo )
if ( todo )
{
GWConverter conv( mSoap );
- QString id = todo->customProperty( "GWRESOURCE", "UID" );
+ TQString id = todo->customProperty( "GWRESOURCE", "UID" );
ngwt__ItemRefList * items = soap_new_ngwt__ItemRefList( mSoap, 1 );
items->item.push_back( *( conv.qStringToString( id ) ) );
if ( todo->isCompleted() )
diff --git a/kresources/groupwise/soap/groupwiseserver.h b/kresources/groupwise/soap/groupwiseserver.h
index 8197ba5cd..8117ebb2b 100644
--- a/kresources/groupwise/soap/groupwiseserver.h
+++ b/kresources/groupwise/soap/groupwiseserver.h
@@ -23,12 +23,12 @@
#include <kio/job.h>
#include <kio/jobclasses.h>
-#include <qapplication.h>
-#include <qmap.h>
-#include <qobject.h>
-#include <qstring.h>
-#include <qthread.h>
-#include <qvaluelist.h>
+#include <tqapplication.h>
+#include <tqmap.h>
+#include <tqobject.h>
+#include <tqstring.h>
+#include <tqthread.h>
+#include <tqvaluelist.h>
#include <string>
@@ -69,13 +69,13 @@ enum ErrorCode { NoError, RefreshNeeded };
class AddressBook
{
public:
- typedef QValueList<AddressBook> List;
+ typedef TQValueList<AddressBook> List;
AddressBook() : isPersonal( false ), isFrequentContacts( false ), isSystemAddressBook( false ) {}
- QString id;
- QString name;
- QString description;
+ TQString id;
+ TQString name;
+ TQString description;
bool isPersonal;
bool isFrequentContacts;
bool isSystemAddressBook;
@@ -98,12 +98,12 @@ class GroupwiseServer : public QObject
public:
bool checkResponse( int result, ngwt__Status *status );
enum RetractCause { DueToResend, Other };
- GroupwiseServer( const QString &url, const QString &user,
- const QString &password, QObject *parent );
+ GroupwiseServer( const TQString &url, const TQString &user,
+ const TQString &password, TQObject *parent );
~GroupwiseServer();
int error() const { return mError; }
- QString errorText() const { return mErrorText; }
+ TQString errorText() const { return mErrorText; }
bool login();
bool logout();
@@ -149,22 +149,22 @@ class GroupwiseServer : public QObject
GroupWise::AddressBook::List addressBookList();
- bool readAddressBooksSynchronous( const QStringList &addrBookIds );
- bool updateAddressBooks( const QStringList &addrBookIds,
+ bool readAddressBooksSynchronous( const TQStringList &addrBookIds );
+ bool updateAddressBooks( const TQStringList &addrBookIds,
const unsigned long startSequenceNumber, const unsigned long lastPORebuildTime );
- bool insertAddressee( const QString &addrBookId, KABC::Addressee& );
+ bool insertAddressee( const TQString &addrBookId, KABC::Addressee& );
bool changeAddressee( const KABC::Addressee& );
bool removeAddressee( const KABC::Addressee& );
- bool readFreeBusy( const QString &email, const QDate &start,
- const QDate &end, KCal::FreeBusy * );
+ bool readFreeBusy( const TQString &email, const TQDate &start,
+ const TQDate &end, KCal::FreeBusy * );
bool dumpData();
void dumpFolderList();
// bool getDelta();
- GroupWise::DeltaInfo getDeltaInfo( const QStringList & addressBookIds );
+ GroupWise::DeltaInfo getDeltaInfo( const TQStringList & addressBookIds );
bool getCategoryList();
@@ -176,20 +176,20 @@ class GroupwiseServer : public QObject
void emitReadAddressBookTotalSize( int );
void emitReadAddressBookProcessedSize( int );
- void emitErrorMessage( const QString &, bool );
+ void emitErrorMessage( const TQString &, bool );
void emitGotAddressees( const KABC::Addressee::List );
bool readUserSettings( ngwt__Settings *&settings );
- bool modifyUserSettings( QMap<QString, QString> & );
+ bool modifyUserSettings( TQMap<TQString, TQString> & );
- QString userEmail() const { return mUserEmail; }
- QString userName() const { return mUserName; }
- QString userUuid() const { return mUserUuid; }
+ TQString userEmail() const { return mUserEmail; }
+ TQString userName() const { return mUserName; }
+ TQString userUuid() const { return mUserUuid; }
signals:
void readAddressBookTotalSize( int );
void readAddressBookProcessedSize( int );
- void errorMessage( const QString &, bool );
+ void errorMessage( const TQString &, bool );
void gotAddressees( const KABC::Addressee::List );
protected:
@@ -205,29 +205,29 @@ class GroupwiseServer : public QObject
/**
* Given a partial record ID, query the server for the full version from the calendar folder
*/
- std::string getFullIDFor( const QString & );
+ std::string getFullIDFor( const TQString & );
/**
* Check if an incidence involves other people
*/
bool iAmTheOrganizer( KCal::Incidence * );
- void log( const QString &prefix, const char *s, size_t n );
+ void log( const TQString &prefix, const char *s, size_t n );
protected slots:
void slotSslError();
private:
- QString mUrl;
- QString mUser;
- QString mPassword;
+ TQString mUrl;
+ TQString mUser;
+ TQString mPassword;
bool mSSL;
std::string mSession;
- QString mUserName;
- QString mUserEmail;
- QString mUserUuid;
+ TQString mUserName;
+ TQString mUserEmail;
+ TQString mUserUuid;
std::string mCalendarFolder;
std::string mCheckListFolder;
@@ -238,9 +238,9 @@ class GroupwiseServer : public QObject
KExtendedSocket *m_sock;
int mError;
- QString mErrorText;
+ TQString mErrorText;
- QString mLogFile;
+ TQString mLogFile;
};
#endif
diff --git a/kresources/groupwise/soap/gwconverter.cpp b/kresources/groupwise/soap/gwconverter.cpp
index e005974e6..ba64cff9a 100644
--- a/kresources/groupwise/soap/gwconverter.cpp
+++ b/kresources/groupwise/soap/gwconverter.cpp
@@ -35,7 +35,7 @@ struct soap* GWConverter::soap() const
return mSoap;
}
-std::string* GWConverter::qStringToString( const QString &string )
+std::string* GWConverter::qStringToString( const TQString &string )
{
std::string *str = soap_new_std__string( mSoap, -1 );
str->append( string.utf8() );
@@ -43,20 +43,20 @@ std::string* GWConverter::qStringToString( const QString &string )
return str;
}
-QString GWConverter::stringToQString( const std::string &str )
+TQString GWConverter::stringToQString( const std::string &str )
{
- return QString::fromUtf8( str.c_str() );
+ return TQString::fromUtf8( str.c_str() );
}
-QString GWConverter::stringToQString( std::string *str )
+TQString GWConverter::stringToQString( std::string *str )
{
- if ( !str ) return QString::null;
- return QString::fromUtf8( str->c_str() );
+ if ( !str ) return TQString::null;
+ return TQString::fromUtf8( str->c_str() );
}
-char* GWConverter::qStringToChar( const QString &string )
+char* GWConverter::qStringToChar( const TQString &string )
{
- QCString str = string.utf8();
+ TQCString str = string.utf8();
char* charStr = (char*)soap_malloc( mSoap, str.length() + 1 );
memcpy( charStr, str, str.length() );
@@ -65,80 +65,80 @@ char* GWConverter::qStringToChar( const QString &string )
return charStr;
}
-QDate GWConverter::charToQDate( const char *str )
+TQDate GWConverter::charToQDate( const char *str )
{
- if ( !str ) return QDate(); // FIXME: Qt::ISODate is probably no good here because it expects yyyy-MM-dd not yyyyMMdd
- return QDate::fromString( QString::fromUtf8( str ), Qt::ISODate );
+ if ( !str ) return TQDate(); // FIXME: Qt::ISODate is probably no good here because it expects yyyy-MM-dd not yyyyMMdd
+ return TQDate::fromString( TQString::fromUtf8( str ), Qt::ISODate );
}
-char *GWConverter::qDateTimeToChar( const QDateTime &dt,
- const QString &timezone )
+char *GWConverter::qDateTimeToChar( const TQDateTime &dt,
+ const TQString &timezone )
{
return qDateTimeToChar( KPimPrefs::localTimeToUtc( dt, timezone ) );
}
-char *GWConverter::qDateTimeToChar( const QDateTime &dt )
+char *GWConverter::qDateTimeToChar( const TQDateTime &dt )
{
return qStringToChar( dt.toString( "yyyyMMddThhmmZ" ) );
}
-std::string* GWConverter::qDateTimeToString( const QDateTime &dt, const QString &timezone )
+std::string* GWConverter::qDateTimeToString( const TQDateTime &dt, const TQString &timezone )
{
return qDateTimeToString( KPimPrefs::localTimeToUtc( dt, timezone ) );
}
-std::string* GWConverter::qDateTimeToString( const QDateTime &dt )
+std::string* GWConverter::qDateTimeToString( const TQDateTime &dt )
{
return qStringToString( dt.toString( "yyyyMMddThhmmZ" ) );
}
-QDateTime GWConverter::stringToQDateTime( const std::string* str )
+TQDateTime GWConverter::stringToQDateTime( const std::string* str )
{
- QDateTime dt = QDateTime::fromString( QString::fromUtf8( str->c_str() ), Qt::ISODate );
+ TQDateTime dt = TQDateTime::fromString( TQString::fromUtf8( str->c_str() ), Qt::ISODate );
return dt;
}
-char* GWConverter::qDateToChar( const QDate &date )
+char* GWConverter::qDateToChar( const TQDate &date )
{
return qStringToChar( date.toString( "yyyyMMdd" ) );
}
-std::string* GWConverter::qDateToString( const QDate &date )
+std::string* GWConverter::qDateToString( const TQDate &date )
{
return qStringToString( date.toString( "yyyyMMdd" ) );
}
-QDate GWConverter::stringToQDate( std::string* str )
+TQDate GWConverter::stringToQDate( std::string* str )
{
//NB this ISODate may become unnecessary, if GW stops sending in yyyy-mm-dd format again
- return QDate::fromString( QString::fromLatin1( str->c_str() ), Qt::ISODate );
+ return TQDate::fromString( TQString::fromLatin1( str->c_str() ), Qt::ISODate );
}
-QDateTime GWConverter::charToQDateTime( const char *str )
+TQDateTime GWConverter::charToQDateTime( const char *str )
{
- if ( !str ) return QDateTime();
+ if ( !str ) return TQDateTime();
// kdDebug() << "charToQDateTime(): " << str << endl;
// as above re Qt::ISODate
- QDateTime dt = QDateTime::fromString( QString::fromUtf8( str ), Qt::ISODate );
+ TQDateTime dt = TQDateTime::fromString( TQString::fromUtf8( str ), Qt::ISODate );
// kdDebug() << " " << dt.toString() << endl;
return dt;
}
-QDateTime GWConverter::charToQDateTime( const char *str,
- const QString &timezone )
+TQDateTime GWConverter::charToQDateTime( const char *str,
+ const TQString &timezone )
{
- if ( !str ) return QDateTime();
- QDateTime utc = charToQDateTime( str );
+ if ( !str ) return TQDateTime();
+ TQDateTime utc = charToQDateTime( str );
return KPimPrefs::utcToLocalTime( utc, timezone );
}
-bool GWConverter::emailsMatch( const QString & email1, const QString & email2 )
+bool GWConverter::emailsMatch( const TQString & email1, const TQString & email2 )
{
// eg demo3.po1.dom1@dmz1.provo.novell.com == demo3@dmz1.provo.novell.com
if ( email1 == email2 )
return true;
- QString shorter, longer;
+ TQString shorter, longer;
if ( email1.length() < email2.length() )
{
shorter = email1;
@@ -150,12 +150,12 @@ bool GWConverter::emailsMatch( const QString & email1, const QString & email2 )
longer = email1;
}
- QString shortStem = shorter.section( '@', 0, 0 );
- QString longStem = longer.section( '@', 0, 0 );
- QString shortHost = shorter.section( '@', 1, 1 );
- QString longHost = longer.section( '@', 1, 1 );
+ TQString shortStem = shorter.section( '@', 0, 0 );
+ TQString longStem = longer.section( '@', 0, 0 );
+ TQString shortHost = shorter.section( '@', 1, 1 );
+ TQString longHost = longer.section( '@', 1, 1 );
- QString extension = longStem.right( longStem.length() - shortStem.length() );
+ TQString extension = longStem.right( longStem.length() - shortStem.length() );
kdDebug() << "gwconverter::emailsMatch(): " << shorter << " = " << longer << endl;
kdDebug() << "shortStem: " << shortStem << ", longStem: " << longStem << ", extension: " << extension << endl;
diff --git a/kresources/groupwise/soap/gwconverter.h b/kresources/groupwise/soap/gwconverter.h
index be8a8dd61..08d5220fc 100644
--- a/kresources/groupwise/soap/gwconverter.h
+++ b/kresources/groupwise/soap/gwconverter.h
@@ -21,8 +21,8 @@
#ifndef KABC_GW_CONVERTER_H
#define KABC_GW_CONVERTER_H
-#include <qdatetime.h>
-#include <qstring.h>
+#include <tqdatetime.h>
+#include <tqstring.h>
#include "soapH.h"
@@ -33,30 +33,30 @@ class GWConverter
struct soap* soap() const;
- static QString stringToQString( const std::string& );
- static QString stringToQString( std::string* );
+ static TQString stringToQString( const std::string& );
+ static TQString stringToQString( std::string* );
- std::string* qStringToString( const QString& );
- char* qStringToChar( const QString& );
+ std::string* qStringToString( const TQString& );
+ char* qStringToChar( const TQString& );
- char* qDateToChar( const QDate& );
- QDate charToQDate( const char * );
+ char* qDateToChar( const TQDate& );
+ TQDate charToQDate( const char * );
- std::string* qDateToString( const QDate &string );
- QDate stringToQDate( std::string* );
+ std::string* qDateToString( const TQDate &string );
+ TQDate stringToQDate( std::string* );
- char *qDateTimeToChar( const QDateTime &dt, const QString &timezone );
- char *qDateTimeToChar( const QDateTime &dt );
+ char *qDateTimeToChar( const TQDateTime &dt, const TQString &timezone );
+ char *qDateTimeToChar( const TQDateTime &dt );
- QDateTime charToQDateTime( const char *str );
- QDateTime charToQDateTime( const char *str, const QString &timezone );
+ TQDateTime charToQDateTime( const char *str );
+ TQDateTime charToQDateTime( const char *str, const TQString &timezone );
- std::string* qDateTimeToString( const QDateTime &string, const QString &timezone );
- std::string* qDateTimeToString( const QDateTime &string );
+ std::string* qDateTimeToString( const TQDateTime &string, const TQString &timezone );
+ std::string* qDateTimeToString( const TQDateTime &string );
- QDateTime stringToQDateTime( const std::string* );
+ TQDateTime stringToQDateTime( const std::string* );
- bool emailsMatch( const QString & email1, const QString & email2 );
+ bool emailsMatch( const TQString & email1, const TQString & email2 );
private:
struct soap* mSoap;
};
diff --git a/kresources/groupwise/soap/gwjobs.cpp b/kresources/groupwise/soap/gwjobs.cpp
index f1cdd049a..43d5d58df 100644
--- a/kresources/groupwise/soap/gwjobs.cpp
+++ b/kresources/groupwise/soap/gwjobs.cpp
@@ -26,7 +26,7 @@
#include <libkcal/incidence.h>
#include <libkcal/resourcecached.h>
-#include <qtimer.h>
+#include <tqtimer.h>
#include "contactconverter.h"
#include "incidenceconverter.h"
@@ -38,19 +38,19 @@
#define READ_ADDRESS_FOLDER_CHUNK_SIZE 50
#define READ_CALENDAR_FOLDER_CHUNK_SIZE 50
-GWJob::GWJob( GroupwiseServer *server, struct soap *soap, const QString &url,
+GWJob::GWJob( GroupwiseServer *server, struct soap *soap, const TQString &url,
const std::string &session )
: mServer( server ), mSoap( soap ), mUrl( url ), mSession( session ), mError( GroupWise::NoError )
{
}
ReadAddressBooksJob::ReadAddressBooksJob( GroupwiseServer *server,
- struct soap *soap, const QString &url, const std::string &session )
+ struct soap *soap, const TQString &url, const std::string &session )
: GWJob( server, soap, url, session )
{
}
-void ReadAddressBooksJob::setAddressBookIds( const QStringList &ids )
+void ReadAddressBooksJob::setAddressBookIds( const TQStringList &ids )
{
mAddressBookIds = ids;
@@ -82,7 +82,7 @@ void ReadAddressBooksJob::run()
if ( !(*it)->id ) {
kdError() << "No addressbook id" << endl;
} else {
- QString id = GWConverter::stringToQString( (*it)->id );
+ TQString id = GWConverter::stringToQString( (*it)->id );
kdDebug() << "Reading ID: " << id << endl;
if ( mAddressBookIds.find( id ) != mAddressBookIds.end() ) {
readAddressBook( *(*it)->id );
@@ -93,8 +93,8 @@ void ReadAddressBooksJob::run()
}
#else
GWConverter conv( mSoap );
- QStringList::Iterator it = mAddressBookIds.begin();
- const QStringList::Iterator end = mAddressBookIds.end();
+ TQStringList::Iterator it = mAddressBookIds.begin();
+ const TQStringList::Iterator end = mAddressBookIds.end();
for ( ; it != end; ++it )
{
std::string* id = conv.qStringToString( *it );
@@ -158,7 +158,7 @@ void ReadAddressBooksJob::readAddressBook( std::string &id )
addr.insertCustom( "GWRESOURCE", "CONTAINER", converter.stringToQString( id ) );
- QString remoteUid = converter.stringToQString( (*it)->id );
+ TQString remoteUid = converter.stringToQString( (*it)->id );
KABC::Addressee oldAddressee = mResource->findByUid( mResource->idMapper().localId( remoteUid ) );
if ( oldAddressee.isEmpty() ) // new addressee
@@ -323,7 +323,7 @@ void ReadAddressBooksJob::readAddressBook( std::string &id )
#endif
}
-ReadCalendarJob::ReadCalendarJob( GroupwiseServer *server, struct soap *soap, const QString &url,
+ReadCalendarJob::ReadCalendarJob( GroupwiseServer *server, struct soap *soap, const TQString &url,
const std::string &session )
: GWJob( server, soap, url, session ), mCalendar( 0 )
{
@@ -475,8 +475,8 @@ void ReadCalendarJob::readCalendarFolder( const std::string &id, ReadItemCounts
ngwt__Filter *filter = soap_new_ngwm__Filter( mSoap, -1 );
ngwt__FilterEntry *filterEntry = soap_new_ngwm__FilterEntry( mSoap, -1 );
filterEntry->op = gte;
- filterEntry->field = QString::fromLatin1( "startDate" ).utf8();
- filterEntry->value = QDateTime::currentDateTime().toString( "yyyyMMddThhmmZ" ).utf8();
+ filterEntry->field = TQString::fromLatin1( "startDate" ).utf8();
+ filterEntry->value = TQDateTime::currentDateTime().toString( "yyyyMMddThhmmZ" ).utf8();
filter->element = filterEntry;
@@ -636,12 +636,12 @@ void ReadCalendarJob::readCalendarFolder( const std::string &id, ReadItemCounts
}
UpdateAddressBooksJob::UpdateAddressBooksJob( GroupwiseServer *server,
- struct soap *soap, const QString &url, const std::string &session )
+ struct soap *soap, const TQString &url, const std::string &session )
: GWJob( server, soap, url, session )
{
}
-void UpdateAddressBooksJob::setAddressBookIds( const QStringList &ids )
+void UpdateAddressBooksJob::setAddressBookIds( const TQStringList &ids )
{
mAddressBookIds = ids;
diff --git a/kresources/groupwise/soap/gwjobs.h b/kresources/groupwise/soap/gwjobs.h
index 3cf47c095..815e6261e 100644
--- a/kresources/groupwise/soap/gwjobs.h
+++ b/kresources/groupwise/soap/gwjobs.h
@@ -20,7 +20,7 @@
#ifndef GROUPWISE_JOBS_H
#define GROUPWISE_JOBS_H
-#include <qobject.h>
+#include <tqobject.h>
#include <string>
@@ -45,12 +45,12 @@ class GroupwiseServer;
class GWJob
{
public:
- GWJob( GroupwiseServer *server, struct soap *soap, const QString &url, const std::string &session );
+ GWJob( GroupwiseServer *server, struct soap *soap, const TQString &url, const std::string &session );
int error() const { return mError; }
protected:
GroupwiseServer *mServer;
struct soap *mSoap;
- QString mUrl;
+ TQString mUrl;
const std::string mSession;
int mError;
};
@@ -59,10 +59,10 @@ class ReadAddressBooksJob : public GWJob
{
public:
ReadAddressBooksJob( GroupwiseServer *server, struct soap *soap,
- const QString &url,
+ const TQString &url,
const std::string &session );
- void setAddressBookIds( const QStringList& );
+ void setAddressBookIds( const TQStringList& );
void run();
@@ -70,7 +70,7 @@ class ReadAddressBooksJob : public GWJob
void readAddressBook( std::string& );
private:
- QStringList mAddressBookIds;
+ TQStringList mAddressBookIds;
KABC::Resource *mResource;
int mProgress;
};
@@ -78,7 +78,7 @@ class ReadAddressBooksJob : public GWJob
class ReadCalendarJob : public GWJob
{
public:
- ReadCalendarJob( GroupwiseServer *server, struct soap *soap, const QString &url,
+ ReadCalendarJob( GroupwiseServer *server, struct soap *soap, const TQString &url,
const std::string &session );
void setCalendarFolder( std::string* );
@@ -101,11 +101,11 @@ class UpdateAddressBooksJob : public GWJob
{
public:
UpdateAddressBooksJob( GroupwiseServer *server, struct soap *soap,
- const QString &url,
+ const TQString &url,
const std::string &session );
/** set the address book IDs to update - at the moment this is only the System Address Book (SAB) */
- void setAddressBookIds( const QStringList& );
+ void setAddressBookIds( const TQStringList& );
/**
* set the sequence number to start reading deltas from (usually the last sequenec number
@@ -122,7 +122,7 @@ class UpdateAddressBooksJob : public GWJob
void updateAddressBook( std::string& );
private:
- QStringList mAddressBookIds;
+ TQStringList mAddressBookIds;
KABC::Resource *mResource;
int mProgress;
unsigned long mLastPORebuildTime;
diff --git a/kresources/groupwise/soap/incidenceconverter.cpp b/kresources/groupwise/soap/incidenceconverter.cpp
index 051f00655..5e5e4c404 100644
--- a/kresources/groupwise/soap/incidenceconverter.cpp
+++ b/kresources/groupwise/soap/incidenceconverter.cpp
@@ -39,8 +39,8 @@ IncidenceConverter::IncidenceConverter( struct soap* soap )
mTimezone = KPimPrefs::timezone();
}
-void IncidenceConverter::setFrom( const QString &name,
- const QString &email, const QString &uuid )
+void IncidenceConverter::setFrom( const TQString &name,
+ const TQString &email, const TQString &uuid )
{
mFromName = name;
mFromEmail = email;
@@ -135,8 +135,8 @@ ngwt__Appointment* IncidenceConverter::convertToAppointment( KCal::Event* event
if ( event->dtStart().isValid() ) {
/* kdDebug() << " convertToAppointment() raw start date: " << event->dtStart().toString() << endl;*/
- QDateTime start = event->dtStart();
- start.setTime( QTime( 0, 0, 0 ) );
+ TQDateTime start = event->dtStart();
+ start.setTime( TQTime( 0, 0, 0 ) );
appointment->startDate = qDateTimeToChar( start, mTimezone );
//appointment->startDay = qDateToString( event->dtStart().date()/*.addDays( -1 )*/ );
/* kdDebug() << " converted start date: " << appointment->startDate << endl;*/
@@ -145,9 +145,9 @@ ngwt__Appointment* IncidenceConverter::convertToAppointment( KCal::Event* event
kdDebug() << " event start date not valid " << endl;
if ( event->hasEndDate() ) {
// kdDebug() << " convertToAppointment() raw end date: " << event->dtEnd().toString() << endl;
- QDateTime end = event->dtEnd();
+ TQDateTime end = event->dtEnd();
end = end.addDays( 1 );
- end.setTime( QTime( 0, 0, 0 ) );
+ end.setTime( TQTime( 0, 0, 0 ) );
appointment->endDate = qDateTimeToChar( end, mTimezone );
//appointment->endDay = qDateToString( event->dtEnd().date() );
// kdDebug() << " converted end date:" << appointment->endDate << endl;
@@ -215,7 +215,7 @@ KCal::Todo* IncidenceConverter::convertFromTask( ngwt__Task* task )
}
if ( task->taskPriority ) {
- QString priority = stringToQString( task->taskPriority );
+ TQString priority = stringToQString( task->taskPriority );
// FIXME: Store priority string somewhere
@@ -256,7 +256,7 @@ ngwt__Task* IncidenceConverter::convertToTask( KCal::Todo* todo )
}
// FIXME: Restore custom priorities
- QString priority = QString::number( todo->priority() );
+ TQString priority = TQString::number( todo->priority() );
task->taskPriority = qStringToString( priority );
task->completed = (bool*)soap_malloc( soap(), 1 );
@@ -311,7 +311,7 @@ ngwt__Note* IncidenceConverter::convertToNote( KCal::Journal* journal )
}
if ( !note->subject )
- note->subject = qStringToString( QString("NO SUBJECT") );
+ note->subject = qStringToString( TQString("NO SUBJECT") );
return note;
}
@@ -362,7 +362,7 @@ bool IncidenceConverter::convertToCalendarItem( KCal::Incidence* incidence, ngwt
item->modified = 0;
item->changes = 0;
- QString id = incidence->customProperty( "GWRESOURCE", "UID" );
+ TQString id = incidence->customProperty( "GWRESOURCE", "UID" );
if ( !id.isEmpty() ) item->id = qStringToString( id );
// Container
@@ -449,7 +449,7 @@ void IncidenceConverter::setAttendees( KCal::Incidence *incidence,
if ( !mFromEmail.isEmpty() ) item->distribution->from->email = qStringToString( mFromEmail );
if ( !mFromUuid.isEmpty() ) item->distribution->from->uuid = qStringToString( mFromUuid );
- QString to; // To list consists of display names of organizer and attendees separated by "; "
+ TQString to; // To list consists of display names of organizer and attendees separated by "; "
to += incidence->organizer().name();
item->distribution->sendoptions = soap_new_ngwt__SendOptions( soap(), -1 );
@@ -470,11 +470,11 @@ void IncidenceConverter::setAttendees( KCal::Incidence *incidence,
KCal::Attendee::List::ConstIterator it;
for( it = attendees.begin(); it != attendees.end(); ++it ) {
if ( !to.isEmpty() )
- to += QString::fromLatin1( "; %1" ).arg( (*it)->name() );
+ to += TQString::fromLatin1( "; %1" ).arg( (*it)->name() );
kdDebug() << "IncidenceConverter::setAttendees(), adding " << (*it)->fullName()
<< endl;
- QString uuid;
- QValueList<KABC::Addressee> addList = KABC::StdAddressBook::self()->findByEmail( (*it)->email() );
+ TQString uuid;
+ TQValueList<KABC::Addressee> addList = KABC::StdAddressBook::self()->findByEmail( (*it)->email() );
if ( !addList.first().isEmpty() )
uuid = addList.first().custom( "GWRESOURCE", "UUID" ); //uuid may be mandatory for the recipients list to be stored on the server...
item->distribution->recipients->recipient.push_back( createRecipient( (*it)->name(), (*it)->email(), uuid ) );
@@ -484,8 +484,8 @@ void IncidenceConverter::setAttendees( KCal::Incidence *incidence,
item->distribution->bc = 0;
}
-ngwt__Recipient *IncidenceConverter::createRecipient( const QString &name,
- const QString &email, const QString &uuid )
+ngwt__Recipient *IncidenceConverter::createRecipient( const TQString &name,
+ const TQString &email, const TQString &uuid )
{
ngwt__Recipient *recipient = soap_new_ngwt__Recipient( soap(), -1 );
@@ -534,7 +534,7 @@ bool IncidenceConverter::convertFromCalendarItem( ngwt__CalendarItem* item,
getAttendees( item, incidence );
if ( item->recurrenceKey )
- incidence->setCustomProperty( "GWRESOURCE", "RECURRENCEKEY", QString::number( *item->recurrenceKey ) );
+ incidence->setCustomProperty( "GWRESOURCE", "RECURRENCEKEY", TQString::number( *item->recurrenceKey ) );
/*
// This must just be a very early cut at recurrence
@@ -543,7 +543,7 @@ bool IncidenceConverter::convertFromCalendarItem( ngwt__CalendarItem* item,
std::vector<xsd__date>::const_iterator it;
for ( it = dateList->begin(); it != dateList->end(); ++it ) {
- QDate date = QDate::fromString( s2q( *it ), Qt::ISODate );
+ TQDate date = TQDate::fromString( s2q( *it ), Qt::ISODate );
if ( date.isValid() )
}
}
@@ -568,7 +568,7 @@ void IncidenceConverter::getItemDescription( ngwt__CalendarItem *item, KCal::Inc
// text/plain should be the description
if ( stringToQString( (*it)->contentType ) == "text/plain" ) {
- QString description = QString::fromUtf8( (char*)data.__ptr, data.__size );
+ TQString description = TQString::fromUtf8( (char*)data.__ptr, data.__size );
incidence->setDescription( description );
kdDebug() << "Incidence description decodes to: " << description << endl;
return;
@@ -731,7 +731,7 @@ void IncidenceConverter::setRecurrence( KCal::Incidence * incidence, ngwt__Calen
*freq = Weekly;
item->rrule->frequency = freq;
// now change the bitArray of the days of the week that it recurs on to a ngwt__DayOfWeekList *
- QBitArray ba = recur->days();
+ TQBitArray ba = recur->days();
ngwt__DayOfYearWeekList * weeklyDays = soap_new_ngwt__DayOfYearWeekList( soap(), -1 );
for ( int i = 0; i < 7; ++i )
{
@@ -795,11 +795,11 @@ void IncidenceConverter::setRecurrence( KCal::Incidence * incidence, ngwt__Calen
// TODO: translate '1st sunday in may'
ngwt__DayOfYearList * daysOfYear = soap_new_ngwt__DayOfYearList( soap(), -1 );
#if LIBKCAL_IS_VERSION( 1, 3, 0 )
- QValueList<int> rmd;
+ TQValueList<int> rmd;
rmd = recur->yearMonths();
daysOfYear->day.push_back( rmd.first() );
#else
- QPtrList<int> rmd;
+ TQPtrList<int> rmd;
rmd = recur->yearNums();
daysOfYear->day.push_back( *rmd.first() );
#endif
diff --git a/kresources/groupwise/soap/incidenceconverter.h b/kresources/groupwise/soap/incidenceconverter.h
index 8d7b6844e..6f2ced84a 100644
--- a/kresources/groupwise/soap/incidenceconverter.h
+++ b/kresources/groupwise/soap/incidenceconverter.h
@@ -35,8 +35,8 @@ class IncidenceConverter : public GWConverter
public:
IncidenceConverter( struct soap* );
- void setFrom( const QString &name, const QString &email,
- const QString &uuid );
+ void setFrom( const TQString &name, const TQString &email,
+ const TQString &uuid );
KCal::Event* convertFromAppointment( ngwt__Appointment* );
ngwt__Appointment* convertToAppointment( KCal::Event* );
@@ -61,16 +61,16 @@ class IncidenceConverter : public GWConverter
void setRecurrence( KCal::Incidence *, ngwt__CalendarItem * );
// used for converting weekly recurrences from GW
-// QBitArray getDayBitArray( ngwt__DayOfWeekList * );
+// TQBitArray getDayBitArray( ngwt__DayOfWeekList * );
- ngwt__Recipient *createRecipient( const QString &name,
- const QString &email, const QString &uuid = QString::null );
+ ngwt__Recipient *createRecipient( const TQString &name,
+ const TQString &email, const TQString &uuid = TQString::null );
- QString mTimezone;
+ TQString mTimezone;
- QString mFromName;
- QString mFromEmail;
- QString mFromUuid;
+ TQString mFromName;
+ TQString mFromEmail;
+ TQString mFromUuid;
};
#endif
diff --git a/kresources/groupwise/soap/ksslsocket.cpp b/kresources/groupwise/soap/ksslsocket.cpp
index 4fdc3f5f6..653a55317 100644
--- a/kresources/groupwise/soap/ksslsocket.cpp
+++ b/kresources/groupwise/soap/ksslsocket.cpp
@@ -17,7 +17,7 @@
*************************************************************************
*/
-#include <qsocketnotifier.h>
+#include <tqsocketnotifier.h>
#include <dcopclient.h>
#include <klocale.h>
@@ -39,8 +39,8 @@ struct KSSLSocketPrivate
mutable KSSL *kssl;
KSSLCertificateCache *cc;
DCOPClient *dcc;
- QMap<QString,QString> metaData;
- QSocketNotifier *socketNotifier;
+ TQMap<TQString,TQString> metaData;
+ TQSocketNotifier *socketNotifier;
};
KSSLSocket::KSSLSocket() : KExtendedSocket()
@@ -57,9 +57,9 @@ KSSLSocket::KSSLSocket() : KExtendedSocket()
setBlockingMode(false);
//Connect internal slots
- QObject::connect( this, SIGNAL(connectionSuccess()), this, SLOT(slotConnected()) );
- QObject::connect( this, SIGNAL(closed(int)), this, SLOT(slotDisconnected()) );
- QObject::connect( this, SIGNAL(connectionFailed(int)), this, SLOT(slotDisconnected()));
+ TQObject::connect( this, TQT_SIGNAL(connectionSuccess()), this, TQT_SLOT(slotConnected()) );
+ TQObject::connect( this, TQT_SIGNAL(closed(int)), this, TQT_SLOT(slotDisconnected()) );
+ TQObject::connect( this, TQT_SIGNAL(connectionFailed(int)), this, TQT_SLOT(slotDisconnected()));
}
KSSLSocket::~KSSLSocket()
@@ -142,22 +142,22 @@ void KSSLSocket::slotDisconnected()
readNotifier()->setEnabled(false);
}
-void KSSLSocket::setMetaData( const QString &key, const QVariant &data )
+void KSSLSocket::setMetaData( const TQString &key, const TQVariant &data )
{
- QVariant v = data;
+ TQVariant v = data;
d->metaData[key] = v.asString();
}
-bool KSSLSocket::hasMetaData( const QString &key )
+bool KSSLSocket::hasMetaData( const TQString &key )
{
return d->metaData.contains(key);
}
-QString KSSLSocket::metaData( const QString &key )
+TQString KSSLSocket::metaData( const TQString &key )
{
if( d->metaData.contains(key) )
return d->metaData[key];
- return QString::null;
+ return TQString::null;
}
/*
@@ -168,13 +168,13 @@ I basically copied the below from tcpKIO::SlaveBase.hpp, with some modificaions
* Copyright (C) 2001 Dawit Alemayehu <adawit@kde.org>
*/
-int KSSLSocket::messageBox( KIO::SlaveBase::MessageBoxType type, const QString &text, const QString &caption,
- const QString &buttonYes, const QString &buttonNo )
+int KSSLSocket::messageBox( KIO::SlaveBase::MessageBoxType type, const TQString &text, const TQString &caption,
+ const TQString &buttonYes, const TQString &buttonNo )
{
kdDebug(0) << "messageBox " << type << " " << text << " - " << caption << buttonYes << buttonNo << endl;
- QByteArray data, result;
- QCString returnType;
- QDataStream arg(data, IO_WriteOnly);
+ TQByteArray data, result;
+ TQCString returnType;
+ TQDataStream arg(data, IO_WriteOnly);
arg << (int)1 << (int)type << text << caption << buttonYes << buttonNo;
if ( ! d->dcc ){
@@ -183,16 +183,16 @@ int KSSLSocket::messageBox( KIO::SlaveBase::MessageBoxType type, const QString &
}
if (!d->dcc->isApplicationRegistered("kio_uiserver"))
{
- KApplication::startServiceByDesktopPath("kio_uiserver.desktop",QStringList());
+ KApplication::startServiceByDesktopPath("kio_uiserver.desktop",TQStringList());
}
d->dcc->call("kio_uiserver", "UIServer",
- "messageBox(int,int,QString,QString,QString,QString)", data, returnType, result);
+ "messageBox(int,int,TQString,TQString,TQString,TQString)", data, returnType, result);
if( returnType == "int" )
{
int res;
- QDataStream r(result, IO_ReadOnly);
+ TQDataStream r(result, IO_ReadOnly);
r >> res;
return res;
}
@@ -209,10 +209,10 @@ int KSSLSocket::verifyCertificate()
bool _IPmatchesCN = false;
int result;
bool doAddHost = false;
- QString ourHost = host();
- QString ourIp = peerAddress()->pretty();
+ TQString ourHost = host();
+ TQString ourIp = peerAddress()->pretty();
- QString theurl = "https://" + ourHost + ":" + port();
+ TQString theurl = "https://" + ourHost + ":" + port();
if (!d->cc)
d->cc = new KSSLCertificateCache;
@@ -241,15 +241,15 @@ int KSSLSocket::verifyCertificate()
setMetaData("ssl_cipher", d->kssl->connectionInfo().getCipher());
setMetaData("ssl_cipher_desc", d->kssl->connectionInfo().getCipherDescription());
setMetaData("ssl_cipher_version", d->kssl->connectionInfo().getCipherVersion());
- setMetaData("ssl_cipher_used_bits", QString::number(d->kssl->connectionInfo().getCipherUsedBits()));
- setMetaData("ssl_cipher_bits", QString::number(d->kssl->connectionInfo().getCipherBits()));
+ setMetaData("ssl_cipher_used_bits", TQString::number(d->kssl->connectionInfo().getCipherUsedBits()));
+ setMetaData("ssl_cipher_bits", TQString::number(d->kssl->connectionInfo().getCipherBits()));
setMetaData("ssl_peer_ip", ourIp );
- 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);
@@ -257,8 +257,8 @@ int KSSLSocket::verifyCertificate()
if (pc.chain().isValid() && pc.chain().depth() > 1)
{
- QString theChain;
- QPtrList<KSSLCertificate> chain = pc.chain().getChain();
+ TQString theChain;
+ TQPtrList<KSSLCertificate> chain = pc.chain().getChain();
for (KSSLCertificate *c = chain.first(); c; c = chain.next())
{
theChain += c->toString();
@@ -271,7 +271,7 @@ int KSSLSocket::verifyCertificate()
setMetaData("ssl_peer_chain", "");
}
- setMetaData("ssl_cert_state", QString::number(ksv));
+ setMetaData("ssl_cert_state", TQString::number(ksv));
if (ksv == KSSLCertificate::Ok)
{
@@ -321,7 +321,7 @@ int KSSLSocket::verifyCertificate()
{
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( KIO::SlaveBase::WarningYesNoCancel,
@@ -332,7 +332,7 @@ int KSSLSocket::verifyCertificate()
}
else
{
- QString msg = i18n("The server certificate failed the "
+ TQString msg = i18n("The server certificate failed the "
"authenticity test (%1).");
result = messageBox( KIO::SlaveBase::WarningYesNoCancel,
msg.arg(ourHost),
diff --git a/kresources/groupwise/soap/ksslsocket.h b/kresources/groupwise/soap/ksslsocket.h
index 47874e0d5..d58b41918 100644
--- a/kresources/groupwise/soap/ksslsocket.h
+++ b/kresources/groupwise/soap/ksslsocket.h
@@ -19,7 +19,7 @@
*************************************************************************
*/
-#include <qvariant.h>
+#include <tqvariant.h>
#include <kextsock.h>
#include <kio/slavebase.h>
@@ -45,14 +45,14 @@ class KSSLSocket : public KExtendedSocket
private:
int verifyCertificate();
- int messageBox( KIO::SlaveBase::MessageBoxType type, const QString &text,
- const QString &caption, const QString &buttonYes, const QString &buttonNo );
+ int messageBox( KIO::SlaveBase::MessageBoxType type, const TQString &text,
+ const TQString &caption, const TQString &buttonYes, const TQString &buttonNo );
//Copied frm tcpslavebase to simply integrating their dialog function
- void setMetaData( const QString &, const QVariant & );
- bool hasMetaData( const QString & );
- QString metaData( const QString & );
+ void setMetaData( const TQString &, const TQVariant & );
+ bool hasMetaData( const TQString & );
+ TQString metaData( const TQString & );
KSSLSocketPrivate *d;
};
diff --git a/kresources/groupwise/soap/soapdebug.cpp b/kresources/groupwise/soap/soapdebug.cpp
index 3d0e3f223..caa56e5b5 100644
--- a/kresources/groupwise/soap/soapdebug.cpp
+++ b/kresources/groupwise/soap/soapdebug.cpp
@@ -56,9 +56,9 @@ int main( int argc, char **argv )
KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
- QString user = args->getOption( "user" );
- QString pass = args->getOption( "password" );
- QString url = args->getOption( "server" );
+ TQString user = args->getOption( "user" );
+ TQString pass = args->getOption( "password" );
+ TQString url = args->getOption( "server" );
#if 1
if ( user.isEmpty() ) {
@@ -97,7 +97,7 @@ int main( int argc, char **argv )
#endif
#if 0
- QString fbUser = args->getOption( "freebusy-user" );
+ TQString fbUser = args->getOption( "freebusy-user" );
if ( fbUser.isEmpty() ) {
kdError() << "Need user for which the freebusy data should be retrieved."
<< endl;
@@ -105,7 +105,7 @@ int main( int argc, char **argv )
KCal::FreeBusy *fb = new KCal::FreeBusy;
server.readFreeBusy( "user1",
- QDate( 2004, 9, 1 ), QDate( 2004, 10, 31 ), fb );
+ TQDate( 2004, 9, 1 ), TQDate( 2004, 10, 31 ), fb );
}
#endif
@@ -129,17 +129,17 @@ int main( int argc, char **argv )
}
KCal::ICalFormat format;
- QString ical = format.toString( &calendar );
+ TQString ical = format.toString( &calendar );
kdDebug() << "ICALENDAR: " << ical << endl;
#endif
#if 0
- QString id = args->getOption( "addressbook-id" );
+ TQString id = args->getOption( "addressbook-id" );
kdDebug() << "ADDRESSBOOK ID: " << id << endl;
- QStringList ids;
+ TQStringList ids;
ids.append( id );
KABC::ResourceMemory resource;
diff --git a/kresources/groupwise/soap/stdsoap2.h b/kresources/groupwise/soap/stdsoap2.h
index a7f6e3299..af603d801 100644
--- a/kresources/groupwise/soap/stdsoap2.h
+++ b/kresources/groupwise/soap/stdsoap2.h
@@ -1294,7 +1294,7 @@ struct soap
int send_timeout; /* when > 0, gives socket send timeout in seconds, < 0 in usec */
int connect_timeout; /* when > 0, gives socket connect() timeout in seconds, < 0 in usec */
int accept_timeout; /* when > 0, gives socket accept() timeout in seconds, < 0 in usec */
- int socket_flags; /* socket recv() and send() flags, e.g. set to MSG_NOSIGNAL to disable sigpipe */
+ int socket_flags; /* socket recv() and send() flags, e.g. set to MSG_NOQT_SIGNAL to disable sigpipe */
int connect_flags; /* connect() SOL_SOCKET sockopt flags, e.g. set to SO_DEBUG to debug socket */
int bind_flags; /* bind() SOL_SOCKET sockopt flags, e.g. set to SO_REUSEADDR to enable reuse */
int accept_flags; /* accept() SOL_SOCKET sockopt flags */
diff --git a/kresources/kolab/kabc/contact.cpp b/kresources/kolab/kabc/contact.cpp
index c5e819b3f..fc9087316 100644
--- a/kresources/kolab/kabc/contact.cpp
+++ b/kresources/kolab/kabc/contact.cpp
@@ -38,7 +38,7 @@
#include <libkdepim/distributionlist.h>
#include <kio/netaccess.h>
#include <kdebug.h>
-#include <qfile.h>
+#include <tqfile.h>
#include <float.h>
using namespace Kolab;
@@ -56,7 +56,7 @@ Contact::Contact( const KABC::Addressee* addr )
}
// loading (xml->addressee)
-Contact::Contact( const QString& xml, KABC::ResourceKolab* resource, const QString& subResource, Q_UINT32 sernum )
+Contact::Contact( const TQString& xml, KABC::ResourceKolab* resource, const TQString& subResource, Q_UINT32 sernum )
: mHasGeo( false )
{
load( xml );
@@ -72,252 +72,252 @@ Contact::~Contact()
{
}
-void Contact::setGivenName( const QString& name )
+void Contact::setGivenName( const TQString& name )
{
mGivenName = name;
}
-QString Contact::givenName() const
+TQString Contact::givenName() const
{
return mGivenName;
}
-void Contact::setMiddleNames( const QString& names )
+void Contact::setMiddleNames( const TQString& names )
{
mMiddleNames = names;
}
-QString Contact::middleNames() const
+TQString Contact::middleNames() const
{
return mMiddleNames;
}
-void Contact::setLastName( const QString& name )
+void Contact::setLastName( const TQString& name )
{
mLastName = name;
}
-QString Contact::lastName() const
+TQString Contact::lastName() const
{
return mLastName;
}
-void Contact::setFullName( const QString& name )
+void Contact::setFullName( const TQString& name )
{
mFullName = name;
}
-QString Contact::fullName() const
+TQString Contact::fullName() const
{
return mFullName;
}
-void Contact::setInitials( const QString& initials )
+void Contact::setInitials( const TQString& initials )
{
mInitials = initials;
}
-QString Contact::initials() const
+TQString Contact::initials() const
{
return mInitials;
}
-void Contact::setPrefix( const QString& prefix )
+void Contact::setPrefix( const TQString& prefix )
{
mPrefix = prefix;
}
-QString Contact::prefix() const
+TQString Contact::prefix() const
{
return mPrefix;
}
-void Contact::setSuffix( const QString& suffix )
+void Contact::setSuffix( const TQString& suffix )
{
mSuffix = suffix;
}
-QString Contact::suffix() const
+TQString Contact::suffix() const
{
return mSuffix;
}
-void Contact::setRole( const QString& role )
+void Contact::setRole( const TQString& role )
{
mRole = role;
}
-QString Contact::role() const
+TQString Contact::role() const
{
return mRole;
}
-void Contact::setFreeBusyUrl( const QString& fbUrl )
+void Contact::setFreeBusyUrl( const TQString& fbUrl )
{
mFreeBusyUrl = fbUrl;
}
-QString Contact::freeBusyUrl() const
+TQString Contact::freeBusyUrl() const
{
return mFreeBusyUrl;
}
-void Contact::setOrganization( const QString& organization )
+void Contact::setOrganization( const TQString& organization )
{
mOrganization = organization;
}
-QString Contact::organization() const
+TQString Contact::organization() const
{
return mOrganization;
}
-void Contact::setWebPage( const QString& url )
+void Contact::setWebPage( const TQString& url )
{
mWebPage = url;
}
-QString Contact::webPage() const
+TQString Contact::webPage() const
{
return mWebPage;
}
-void Contact::setIMAddress( const QString& imAddress )
+void Contact::setIMAddress( const TQString& imAddress )
{
mIMAddress = imAddress;
}
-QString Contact::imAddress() const
+TQString Contact::imAddress() const
{
return mIMAddress;
}
-void Contact::setDepartment( const QString& department )
+void Contact::setDepartment( const TQString& department )
{
mDepartment = department;
}
-QString Contact::department() const
+TQString Contact::department() const
{
return mDepartment;
}
-void Contact::setOfficeLocation( const QString& location )
+void Contact::setOfficeLocation( const TQString& location )
{
mOfficeLocation = location;
}
-QString Contact::officeLocation() const
+TQString Contact::officeLocation() const
{
return mOfficeLocation;
}
-void Contact::setProfession( const QString& profession )
+void Contact::setProfession( const TQString& profession )
{
mProfession = profession;
}
-QString Contact::profession() const
+TQString Contact::profession() const
{
return mProfession;
}
-// void Contact::setJobTitle( const QString& title )
+// void Contact::setJobTitle( const TQString& title )
// {
// mJobTitle = title;
// }
-// QString Contact::jobTitle() const
+// TQString Contact::jobTitle() const
// {
// return mJobTitle;
// }
-void Contact::setManagerName( const QString& name )
+void Contact::setManagerName( const TQString& name )
{
mManagerName = name;
}
-QString Contact::managerName() const
+TQString Contact::managerName() const
{
return mManagerName;
}
-void Contact::setAssistant( const QString& name )
+void Contact::setAssistant( const TQString& name )
{
mAssistant = name;
}
-QString Contact::assistant() const
+TQString Contact::assistant() const
{
return mAssistant;
}
-void Contact::setNickName( const QString& name )
+void Contact::setNickName( const TQString& name )
{
mNickName = name;
}
-QString Contact::nickName() const
+TQString Contact::nickName() const
{
return mNickName;
}
-void Contact::setSpouseName( const QString& name )
+void Contact::setSpouseName( const TQString& name )
{
mSpouseName = name;
}
-QString Contact::spouseName() const
+TQString Contact::spouseName() const
{
return mSpouseName;
}
-void Contact::setBirthday( const QDate& date )
+void Contact::setBirthday( const TQDate& date )
{
mBirthday = date;
}
-QDate Contact::birthday() const
+TQDate Contact::birthday() const
{
return mBirthday;
}
-void Contact::setAnniversary( const QDate& date )
+void Contact::setAnniversary( const TQDate& date )
{
mAnniversary = date;
}
-QDate Contact::anniversary() const
+TQDate Contact::anniversary() const
{
return mAnniversary;
}
-void Contact::setChildren( const QString& children )
+void Contact::setChildren( const TQString& children )
{
mChildren = children;
}
-QString Contact::children() const
+TQString Contact::children() const
{
return mChildren;
}
-void Contact::setGender( const QString& gender )
+void Contact::setGender( const TQString& gender )
{
mGender = gender;
}
-QString Contact::gender() const
+TQString Contact::gender() const
{
return mGender;
}
-void Contact::setLanguage( const QString& language )
+void Contact::setLanguage( const TQString& language )
{
mLanguage = language;
}
-QString Contact::language() const
+TQString Contact::language() const
{
return mLanguage;
}
@@ -327,12 +327,12 @@ void Contact::addPhoneNumber( const PhoneNumber& number )
mPhoneNumbers.append( number );
}
-QValueList<Contact::PhoneNumber>& Contact::phoneNumbers()
+TQValueList<Contact::PhoneNumber>& Contact::phoneNumbers()
{
return mPhoneNumbers;
}
-const QValueList<Contact::PhoneNumber>& Contact::phoneNumbers() const
+const TQValueList<Contact::PhoneNumber>& Contact::phoneNumbers() const
{
return mPhoneNumbers;
}
@@ -342,12 +342,12 @@ void Contact::addEmail( const Email& email )
mEmails.append( email );
}
-QValueList<Contact::Email>& Contact::emails()
+TQValueList<Contact::Email>& Contact::emails()
{
return mEmails;
}
-const QValueList<Contact::Email>& Contact::emails() const
+const TQValueList<Contact::Email>& Contact::emails() const
{
return mEmails;
}
@@ -357,34 +357,34 @@ void Contact::addAddress( const Contact::Address& address )
mAddresses.append( address );
}
-QValueList<Contact::Address>& Contact::addresses()
+TQValueList<Contact::Address>& Contact::addresses()
{
return mAddresses;
}
-const QValueList<Contact::Address>& Contact::addresses() const
+const TQValueList<Contact::Address>& Contact::addresses() const
{
return mAddresses;
}
-void Contact::setPreferredAddress( const QString& address )
+void Contact::setPreferredAddress( const TQString& address )
{
mPreferredAddress = address;
}
-QString Contact::preferredAddress() const
+TQString Contact::preferredAddress() const
{
return mPreferredAddress;
}
-bool Contact::loadNameAttribute( QDomElement& element )
+bool Contact::loadNameAttribute( TQDomElement& element )
{
- for ( QDomNode n = element.firstChild(); !n.isNull(); n = n.nextSibling() ) {
+ for ( TQDomNode n = element.firstChild(); !n.isNull(); n = n.nextSibling() ) {
if ( n.isComment() )
continue;
if ( n.isElement() ) {
- QDomElement e = n.toElement();
- QString tagName = e.tagName();
+ TQDomElement e = n.toElement();
+ TQString tagName = e.tagName();
if ( tagName == "given-name" )
setGivenName( e.text() );
@@ -410,9 +410,9 @@ bool Contact::loadNameAttribute( QDomElement& element )
return true;
}
-void Contact::saveNameAttribute( QDomElement& element ) const
+void Contact::saveNameAttribute( TQDomElement& element ) const
{
- QDomElement e = element.ownerDocument().createElement( "name" );
+ TQDomElement e = element.ownerDocument().createElement( "name" );
element.appendChild( e );
writeString( e, "given-name", givenName() );
@@ -424,15 +424,15 @@ void Contact::saveNameAttribute( QDomElement& element ) const
writeString( e, "suffix", suffix() );
}
-bool Contact::loadPhoneAttribute( QDomElement& element )
+bool Contact::loadPhoneAttribute( TQDomElement& element )
{
PhoneNumber number;
- for ( QDomNode n = element.firstChild(); !n.isNull(); n = n.nextSibling() ) {
+ for ( TQDomNode n = element.firstChild(); !n.isNull(); n = n.nextSibling() ) {
if ( n.isComment() )
continue;
if ( n.isElement() ) {
- QDomElement e = n.toElement();
- QString tagName = e.tagName();
+ TQDomElement e = n.toElement();
+ TQString tagName = e.tagName();
if ( tagName == "type" )
number.type = e.text();
@@ -449,11 +449,11 @@ bool Contact::loadPhoneAttribute( QDomElement& element )
return true;
}
-void Contact::savePhoneAttributes( QDomElement& element ) const
+void Contact::savePhoneAttributes( TQDomElement& element ) const
{
- QValueList<PhoneNumber>::ConstIterator it = mPhoneNumbers.begin();
+ TQValueList<PhoneNumber>::ConstIterator it = mPhoneNumbers.begin();
for ( ; it != mPhoneNumbers.end(); ++it ) {
- QDomElement e = element.ownerDocument().createElement( "phone" );
+ TQDomElement e = element.ownerDocument().createElement( "phone" );
element.appendChild( e );
const PhoneNumber& p = *it;
writeString( e, "type", p.type );
@@ -461,14 +461,14 @@ void Contact::savePhoneAttributes( QDomElement& element ) const
}
}
-void Contact::saveEmailAttributes( QDomElement& element ) const
+void Contact::saveEmailAttributes( TQDomElement& element ) const
{
- QValueList<Email>::ConstIterator it = mEmails.begin();
+ TQValueList<Email>::ConstIterator it = mEmails.begin();
for ( ; it != mEmails.end(); ++it )
saveEmailAttribute( element, *it );
}
-void Contact::loadCustomAttributes( QDomElement& element )
+void Contact::loadCustomAttributes( TQDomElement& element )
{
Custom custom;
custom.app = element.attribute( "app" );
@@ -477,16 +477,16 @@ void Contact::loadCustomAttributes( QDomElement& element )
mCustomList.append( custom );
}
-void Contact::saveCustomAttributes( QDomElement& element ) const
+void Contact::saveCustomAttributes( TQDomElement& element ) const
{
- QValueList<Custom>::ConstIterator it = mCustomList.begin();
+ TQValueList<Custom>::ConstIterator it = mCustomList.begin();
for ( ; it != mCustomList.end(); ++it ) {
Q_ASSERT( !(*it).name.isEmpty() );
if ( (*it).app == s_unhandledTagAppName ) {
writeString( element, (*it).name, (*it).value );
} else {
// Let's use attributes so that other tag-preserving-code doesn't need sub-elements
- QDomElement e = element.ownerDocument().createElement( "x-custom" );
+ TQDomElement e = element.ownerDocument().createElement( "x-custom" );
element.appendChild( e );
e.setAttribute( "app", (*it).app );
e.setAttribute( "name", (*it).name );
@@ -495,16 +495,16 @@ void Contact::saveCustomAttributes( QDomElement& element ) const
}
}
-bool Contact::loadAddressAttribute( QDomElement& element )
+bool Contact::loadAddressAttribute( TQDomElement& element )
{
Address address;
- for ( QDomNode n = element.firstChild(); !n.isNull(); n = n.nextSibling() ) {
+ for ( TQDomNode n = element.firstChild(); !n.isNull(); n = n.nextSibling() ) {
if ( n.isComment() )
continue;
if ( n.isElement() ) {
- QDomElement e = n.toElement();
- QString tagName = e.tagName();
+ TQDomElement e = n.toElement();
+ TQString tagName = e.tagName();
if ( tagName == "type" )
address.type = e.text();
@@ -533,15 +533,15 @@ bool Contact::loadAddressAttribute( QDomElement& element )
return true;
}
-void Contact::saveAddressAttributes( QDomElement& element ) const
+void Contact::saveAddressAttributes( TQDomElement& element ) const
{
- QValueList<Address>::ConstIterator it = mAddresses.begin();
+ TQValueList<Address>::ConstIterator it = mAddresses.begin();
for ( ; it != mAddresses.end(); ++it ) {
- QDomElement e = element.ownerDocument().createElement( "address" );
+ TQDomElement e = element.ownerDocument().createElement( "address" );
element.appendChild( e );
const Address& a = *it;
writeString( e, "type", a.type );
- writeString( e, "x-kde-type", QString::number( a.kdeAddressType ) );
+ writeString( e, "x-kde-type", TQString::number( a.kdeAddressType ) );
if ( !a.street.isEmpty() )
writeString( e, "street", a.street );
if ( !a.pobox.isEmpty() )
@@ -558,15 +558,15 @@ void Contact::saveAddressAttributes( QDomElement& element ) const
}
-void Kolab::Contact::loadDistrListMember( const QDomElement& element )
+void Kolab::Contact::loadDistrListMember( const TQDomElement& element )
{
Member member;
- for ( QDomNode n = element.firstChild(); !n.isNull(); n = n.nextSibling() ) {
+ for ( TQDomNode n = element.firstChild(); !n.isNull(); n = n.nextSibling() ) {
if ( n.isComment() )
continue;
if ( n.isElement() ) {
- QDomElement e = n.toElement();
- QString tagName = e.tagName();
+ TQDomElement e = n.toElement();
+ TQString tagName = e.tagName();
if ( tagName == "display-name" )
member.displayName = e.text();
else if ( tagName == "smtp-address" )
@@ -576,11 +576,11 @@ void Kolab::Contact::loadDistrListMember( const QDomElement& element )
mDistrListMembers.append( member );
}
-void Contact::saveDistrListMembers( QDomElement& element ) const
+void Contact::saveDistrListMembers( TQDomElement& element ) const
{
- QValueList<Member>::ConstIterator it = mDistrListMembers.begin();
+ TQValueList<Member>::ConstIterator it = mDistrListMembers.begin();
for( ; it != mDistrListMembers.end(); ++it ) {
- QDomElement e = element.ownerDocument().createElement( "member" );
+ TQDomElement e = element.ownerDocument().createElement( "member" );
element.appendChild( e );
const Member& m = *it;
writeString( e, "display-name", m.displayName );
@@ -588,9 +588,9 @@ void Contact::saveDistrListMembers( QDomElement& element ) const
}
}
-bool Contact::loadAttribute( QDomElement& element )
+bool Contact::loadAttribute( TQDomElement& element )
{
- const QString tagName = element.tagName();
+ const TQString tagName = element.tagName();
switch ( tagName[0].latin1() ) {
case 'a':
if ( tagName == "address" )
@@ -762,7 +762,7 @@ bool Contact::loadAttribute( QDomElement& element )
return KolabBase::loadAttribute( element );
}
-bool Contact::saveAttributes( QDomElement& element ) const
+bool Contact::saveAttributes( TQDomElement& element ) const
{
// Save the base class elements
KolabBase::saveAttributes( element );
@@ -804,8 +804,8 @@ bool Contact::saveAttributes( QDomElement& element ) const
saveAddressAttributes( element );
writeString( element, "preferred-address", preferredAddress() );
if ( mHasGeo ) {
- writeString( element, "latitude", QString::number( latitude(), 'g', DBL_DIG ) );
- writeString( element, "longitude", QString::number( longitude(), 'g', DBL_DIG ) );
+ writeString( element, "latitude", TQString::number( latitude(), 'g', DBL_DIG ) );
+ writeString( element, "longitude", TQString::number( longitude(), 'g', DBL_DIG ) );
}
}
saveCustomAttributes( element );
@@ -813,9 +813,9 @@ bool Contact::saveAttributes( QDomElement& element ) const
return true;
}
-bool Contact::loadXML( const QDomDocument& document )
+bool Contact::loadXML( const TQDomDocument& document )
{
- QDomElement top = document.documentElement();
+ TQDomElement top = document.documentElement();
mIsDistributionList = top.tagName() == "distribution-list";
if ( top.tagName() != "contact" && !mIsDistributionList ) {
@@ -825,11 +825,11 @@ bool Contact::loadXML( const QDomDocument& document )
}
- for ( QDomNode n = top.firstChild(); !n.isNull(); n = n.nextSibling() ) {
+ for ( TQDomNode n = top.firstChild(); !n.isNull(); n = n.nextSibling() ) {
if ( n.isComment() )
continue;
if ( n.isElement() ) {
- QDomElement e = n.toElement();
+ TQDomElement e = n.toElement();
if ( !loadAttribute( e ) ) {
// Unhandled tag - save for later storage
//kdDebug() << "Saving unhandled tag " << e.tagName() << endl;
@@ -846,10 +846,10 @@ bool Contact::loadXML( const QDomDocument& document )
return true;
}
-QString Contact::saveXML() const
+TQString Contact::saveXML() const
{
- QDomDocument document = domTree();
- QDomElement element = document.createElement(
+ TQDomDocument document = domTree();
+ TQDomElement element = document.createElement(
mIsDistributionList ? "distribution-list" : "contact" );
element.setAttribute( "version", "1.0" );
saveAttributes( element );
@@ -857,7 +857,7 @@ QString Contact::saveXML() const
return document.toString();
}
-static QString addressTypeToString( int /*KABC::Address::Type*/ type )
+static TQString addressTypeToString( int /*KABC::Address::Type*/ type )
{
if ( type & KABC::Address::Home )
return "home";
@@ -866,7 +866,7 @@ static QString addressTypeToString( int /*KABC::Address::Type*/ type )
return "other";
}
-static int addressTypeFromString( const QString& type )
+static int addressTypeFromString( const TQString& type )
{
if ( type == "home" )
return KABC::Address::Home;
@@ -876,12 +876,12 @@ static int addressTypeFromString( const QString& type )
return KABC::Address::Dom | KABC::Address::Intl | KABC::Address::Postal | KABC::Address::Parcel;
}
-static QStringList phoneTypeToString( int /*KABC::PhoneNumber::Types*/ type )
+static TQStringList phoneTypeToString( int /*KABC::PhoneNumber::Types*/ type )
{
// KABC has a bitfield, i.e. the same phone number can be used for work and home
// and fax and cellphone etc. etc.
// So when saving we need to create as many tags as bits that were set.
- QStringList types;
+ TQStringList types;
if ( type & KABC::PhoneNumber::Fax ) {
if ( type & KABC::PhoneNumber::Home )
types << "homefax";
@@ -936,7 +936,7 @@ static QStringList phoneTypeToString( int /*KABC::PhoneNumber::Types*/ type )
return types;
}
-static int /*KABC::PhoneNumber::Types*/ phoneTypeFromString( const QString& type )
+static int /*KABC::PhoneNumber::Types*/ phoneTypeFromString( const TQString& type )
{
if ( type == "homefax" )
return KABC::PhoneNumber::Home | KABC::PhoneNumber::Fax;
@@ -1030,15 +1030,15 @@ void Contact::setFields( const KABC::Addressee* addressee )
setSpouseName( addressee->custom( "KADDRESSBOOK", "X-SpousesName" ) );
if ( !addressee->birthday().isNull() )
setBirthday( addressee->birthday().date() );
- const QString& anniversary = addressee->custom( "KADDRESSBOOK", "X-Anniversary" );
+ const TQString& anniversary = addressee->custom( "KADDRESSBOOK", "X-Anniversary" );
if ( !anniversary.isEmpty() )
setAnniversary( stringToDate( anniversary ) );
- const QStringList emails = addressee->emails();
+ const TQStringList emails = addressee->emails();
// Conversion problem here:
// KABC::Addressee has only one full name and N addresses, but the XML format
// has N times (fullname+address). So we just copy the fullname over and ignore it on loading.
- for ( QStringList::ConstIterator it = emails.begin(); it != emails.end(); ++it ) {
+ for ( TQStringList::ConstIterator it = emails.begin(); it != emails.end(); ++it ) {
Email email;
email.displayName = fullName();
email.smtpAddress = *it;
@@ -1046,7 +1046,7 @@ void Contact::setFields( const KABC::Addressee* addressee )
}
// Now the real-world addresses
- QString preferredAddress = "home";
+ TQString preferredAddress = "home";
const KABC::Address::List addresses = addressee->addresses();
for ( KABC::Address::List::ConstIterator it = addresses.begin() ; it != addresses.end(); ++it ) {
Address address;
@@ -1070,8 +1070,8 @@ void Contact::setFields( const KABC::Addressee* addressee )
const KABC::PhoneNumber::List phones = addressee->phoneNumbers();
for ( KABC::PhoneNumber::List::ConstIterator it = phones.begin(); it != phones.end(); ++it ) {
// Create a tag per phone type set in the bitfield
- QStringList types = phoneTypeToString( (*it).type() );
- for( QStringList::Iterator typit = types.begin(); typit != types.end(); ++typit ) {
+ TQStringList types = phoneTypeToString( (*it).type() );
+ for( TQStringList::Iterator typit = types.begin(); typit != types.end(); ++typit ) {
PhoneNumber phoneNumber;
phoneNumber.type = *typit;
phoneNumber.number = (*it).number();
@@ -1102,21 +1102,21 @@ void Contact::setFields( const KABC::Addressee* addressee )
// Other KADDRESSBOOK custom fields than those already handled
// (includes e.g. crypto settings, and extra im addresses)
- QStringList knownCustoms;
+ TQStringList knownCustoms;
for ( const char** p = s_knownCustomFields; *p; ++p )
- knownCustoms << QString::fromLatin1( *p );
- QStringList customs = addressee->customs();
- for( QStringList::Iterator it = customs.begin(); it != customs.end(); ++it ) {
+ knownCustoms << TQString::fromLatin1( *p );
+ TQStringList customs = addressee->customs();
+ for( TQStringList::Iterator it = customs.begin(); it != customs.end(); ++it ) {
// KABC::Addressee doesn't offer a real way to iterate over customs, other than splitting strings ourselves
// The format is "app-name:value".
int pos = (*it).find( '-' );
if ( pos == -1 ) continue;
- QString app = (*it).left( pos );
+ TQString app = (*it).left( pos );
if ( app == "KOLAB" ) continue;
- QString name = (*it).mid( pos + 1 );
+ TQString name = (*it).mid( pos + 1 );
pos = name.find( ':' );
if ( pos == -1 ) continue;
- QString value = name.mid( pos + 1 );
+ TQString value = name.mid( pos + 1 );
name = name.left( pos );
if ( !knownCustoms.contains( name ) ) {
//kdDebug() << k_funcinfo << "app=" << app << " name=" << name << " value=" << value << endl;
@@ -1150,9 +1150,9 @@ void Contact::saveTo( KABC::Addressee* addressee )
if ( mIsDistributionList ) {
KPIM::DistributionList distrList( *addressee );
distrList.setName( fullName() );
- QValueList<Member>::ConstIterator mit = mDistrListMembers.begin();
+ TQValueList<Member>::ConstIterator mit = mDistrListMembers.begin();
for ( ; mit != mDistrListMembers.end(); ++mit ) {
- QString displayName = (*mit).displayName;
+ TQString displayName = (*mit).displayName;
// fixup the display name DistributionList::assumes neither ',' nor ';' is present
displayName.replace( ',', ' ' );
displayName.replace( ';', ' ' );
@@ -1183,7 +1183,7 @@ void Contact::saveTo( KABC::Addressee* addressee )
addressee->setNickName( nickName() );
addressee->insertCustom( "KADDRESSBOOK", "X-SpousesName", spouseName() );
if ( birthday().isValid() )
- addressee->setBirthday( QDateTime( birthday() ) );
+ addressee->setBirthday( TQDateTime( birthday() ) );
if ( anniversary().isValid() )
addressee->insertCustom( "KADDRESSBOOK", "X-Anniversary",
@@ -1208,14 +1208,14 @@ void Contact::saveTo( KABC::Addressee* addressee )
if ( mHasGeo )
addressee->setGeo( KABC::Geo( mLatitude, mLongitude ) );
- QStringList emailAddresses;
- for ( QValueList<Email>::ConstIterator it = mEmails.begin(); it != mEmails.end(); ++it ) {
+ TQStringList emailAddresses;
+ for ( TQValueList<Email>::ConstIterator it = mEmails.begin(); it != mEmails.end(); ++it ) {
// we can't do anything with (*it).displayName
emailAddresses.append( (*it).smtpAddress );
}
addressee->setEmails( emailAddresses );
- for ( QValueList<Address>::ConstIterator it = mAddresses.begin(); it != mAddresses.end(); ++it ) {
+ for ( TQValueList<Address>::ConstIterator it = mAddresses.begin(); it != mAddresses.end(); ++it ) {
KABC::Address address;
int type = (*it).kdeAddressType;
if ( type == -1 ) { // no kde-specific type available
@@ -1233,37 +1233,37 @@ void Contact::saveTo( KABC::Addressee* addressee )
addressee->insertAddress( address );
}
- for ( QValueList<PhoneNumber>::ConstIterator it = mPhoneNumbers.begin(); it != mPhoneNumbers.end(); ++it ) {
+ for ( TQValueList<PhoneNumber>::ConstIterator it = mPhoneNumbers.begin(); it != mPhoneNumbers.end(); ++it ) {
KABC::PhoneNumber number;
number.setType( phoneTypeFromString( (*it).type ) );
number.setNumber( (*it).number );
addressee->insertPhoneNumber( number );
}
- for( QValueList<Custom>::ConstIterator it = mCustomList.begin(); it != mCustomList.end(); ++it ) {
- QString app = (*it).app.isEmpty() ? QString::fromLatin1( "KADDRESSBOOK" ) : (*it).app;
+ for( TQValueList<Custom>::ConstIterator it = mCustomList.begin(); it != mCustomList.end(); ++it ) {
+ TQString app = (*it).app.isEmpty() ? TQString::fromLatin1( "KADDRESSBOOK" ) : (*it).app;
addressee->insertCustom( app, (*it).name, (*it).value );
}
//kdDebug(5006) << addressee->customs() << endl;
}
-QImage Contact::loadPictureFromKMail( const QString& attachmentName, KABC::ResourceKolab* resource, const QString& subResource, Q_UINT32 sernum )
+TQImage Contact::loadPictureFromKMail( const TQString& attachmentName, KABC::ResourceKolab* resource, const TQString& subResource, Q_UINT32 sernum )
{
- QImage img;
+ TQImage img;
KURL url;
if ( resource->kmailGetAttachment( url, subResource, sernum, attachmentName ) && !url.isEmpty() ) {
- const QString path = url.path();
+ const TQString path = url.path();
img.load( path );
- QFile::remove(path);
+ TQFile::remove(path);
}
return img;
}
-QImage Contact::loadPictureFromAddressee( const KABC::Picture& picture )
+TQImage Contact::loadPictureFromAddressee( const KABC::Picture& picture )
{
- QImage img;
+ TQImage img;
if ( !picture.isIntern() && !picture.url().isEmpty() ) {
- QString tmpFile;
+ TQString tmpFile;
if ( KIO::NetAccess::download( picture.url(), tmpFile, 0 /*no widget known*/ ) ) {
img.load( tmpFile );
KIO::NetAccess::removeTempFile( tmpFile );
@@ -1273,12 +1273,12 @@ QImage Contact::loadPictureFromAddressee( const KABC::Picture& picture )
return img;
}
-QByteArray Kolab::Contact::loadDataFromKMail( const QString& attachmentName, KABC::ResourceKolab* resource, const QString& subResource, Q_UINT32 sernum )
+TQByteArray Kolab::Contact::loadDataFromKMail( const TQString& attachmentName, KABC::ResourceKolab* resource, const TQString& subResource, Q_UINT32 sernum )
{
- QByteArray data;
+ TQByteArray data;
KURL url;
if ( resource->kmailGetAttachment( url, subResource, sernum, attachmentName ) && !url.isEmpty() ) {
- QFile f( url.path() );
+ TQFile f( url.path() );
if ( f.open( IO_ReadOnly ) ) {
data = f.readAll();
f.close();
@@ -1288,13 +1288,13 @@ QByteArray Kolab::Contact::loadDataFromKMail( const QString& attachmentName, KAB
return data;
}
-QByteArray Kolab::Contact::loadSoundFromAddressee( const KABC::Sound& sound )
+TQByteArray Kolab::Contact::loadSoundFromAddressee( const KABC::Sound& sound )
{
- QByteArray data;
+ TQByteArray data;
if ( !sound.isIntern() && !sound.url().isEmpty() ) {
- QString tmpFile;
+ TQString tmpFile;
if ( KIO::NetAccess::download( sound.url(), tmpFile, 0 /*no widget known*/ ) ) {
- QFile f( tmpFile );
+ TQFile f( tmpFile );
if ( f.open( IO_ReadOnly ) ) {
data = f.readAll();
f.close();
@@ -1306,7 +1306,7 @@ QByteArray Kolab::Contact::loadSoundFromAddressee( const KABC::Sound& sound )
return data;
}
-QString Kolab::Contact::productID() const
+TQString Kolab::Contact::productID() const
{
// TODO: When KAB has the version number in a header file, don't hardcode (Bo)
// Or we could use Addressee::productID? (David)
diff --git a/kresources/kolab/kabc/contact.h b/kresources/kolab/kabc/contact.h
index 0c06dfb8a..39a235cc2 100644
--- a/kresources/kolab/kabc/contact.h
+++ b/kresources/kolab/kabc/contact.h
@@ -34,7 +34,7 @@
#define KOLABCONTACT_H
#include <kolabbase.h>
-#include <qimage.h>
+#include <tqimage.h>
namespace KABC {
class Addressee;
@@ -49,8 +49,8 @@ class Contact : public KolabBase {
public:
struct PhoneNumber {
public:
- QString type;
- QString number;
+ TQString type;
+ TQString number;
};
struct Address {
@@ -59,126 +59,126 @@ public:
{
}
int kdeAddressType; // KABC::Address::Type
- QString type; // kolab-compliant address type: home, work or other
- QString street;
- QString pobox;
- QString locality;
- QString region;
- QString postalCode;
- QString country;
+ TQString type; // kolab-compliant address type: home, work or other
+ TQString street;
+ TQString pobox;
+ TQString locality;
+ TQString region;
+ TQString postalCode;
+ TQString country;
};
explicit Contact( const KABC::Addressee* address );
- Contact( const QString& xml, KABC::ResourceKolab* resource, const QString& subResource, Q_UINT32 sernum );
+ Contact( const TQString& xml, KABC::ResourceKolab* resource, const TQString& subResource, Q_UINT32 sernum );
~Contact();
void saveTo( KABC::Addressee* address );
- QString type() const { return "Contact"; }
+ TQString type() const { return "Contact"; }
- void setGivenName( const QString& name );
- QString givenName() const;
+ void setGivenName( const TQString& name );
+ TQString givenName() const;
- void setMiddleNames( const QString& names );
- QString middleNames() const;
+ void setMiddleNames( const TQString& names );
+ TQString middleNames() const;
- void setLastName( const QString& name );
- QString lastName() const;
+ void setLastName( const TQString& name );
+ TQString lastName() const;
- void setFullName( const QString& name );
- QString fullName() const;
+ void setFullName( const TQString& name );
+ TQString fullName() const;
- void setInitials( const QString& initials );
- QString initials() const;
+ void setInitials( const TQString& initials );
+ TQString initials() const;
- void setPrefix( const QString& prefix );
- QString prefix() const;
+ void setPrefix( const TQString& prefix );
+ TQString prefix() const;
- void setSuffix( const QString& suffix );
- QString suffix() const;
+ void setSuffix( const TQString& suffix );
+ TQString suffix() const;
- void setRole( const QString& role );
- QString role() const;
+ void setRole( const TQString& role );
+ TQString role() const;
- void setFreeBusyUrl( const QString& fbUrl );
- QString freeBusyUrl() const;
+ void setFreeBusyUrl( const TQString& fbUrl );
+ TQString freeBusyUrl() const;
- void setOrganization( const QString& organization );
- QString organization() const;
+ void setOrganization( const TQString& organization );
+ TQString organization() const;
- void setWebPage( const QString& url );
- QString webPage() const;
+ void setWebPage( const TQString& url );
+ TQString webPage() const;
- void setIMAddress( const QString& imAddress );
- QString imAddress() const;
+ void setIMAddress( const TQString& imAddress );
+ TQString imAddress() const;
- void setDepartment( const QString& department );
- QString department() const;
+ void setDepartment( const TQString& department );
+ TQString department() const;
- void setOfficeLocation( const QString& location );
- QString officeLocation() const;
+ void setOfficeLocation( const TQString& location );
+ TQString officeLocation() const;
- void setProfession( const QString& profession );
- QString profession() const;
+ void setProfession( const TQString& profession );
+ TQString profession() const;
// not shown in the kaddressbook GUI
- //void setJobTitle( const QString& title );
- //QString jobTitle() const;
+ //void setJobTitle( const TQString& title );
+ //TQString jobTitle() const;
- void setManagerName( const QString& name );
- QString managerName() const;
+ void setManagerName( const TQString& name );
+ TQString managerName() const;
- void setAssistant( const QString& name );
- QString assistant() const;
+ void setAssistant( const TQString& name );
+ TQString assistant() const;
- void setNickName( const QString& name );
- QString nickName() const;
+ void setNickName( const TQString& name );
+ TQString nickName() const;
- void setSpouseName( const QString& name );
- QString spouseName() const;
+ void setSpouseName( const TQString& name );
+ TQString spouseName() const;
- void setBirthday( const QDate& date );
- QDate birthday() const;
+ void setBirthday( const TQDate& date );
+ TQDate birthday() const;
- void setAnniversary( const QDate& date );
- QDate anniversary() const;
+ void setAnniversary( const TQDate& date );
+ TQDate anniversary() const;
- void setPicture( const QImage& image) { mPicture = image; }
- QString pictureAttachmentName() const { return mPictureAttachmentName; }
- QImage picture() const { return mPicture; }
+ void setPicture( const TQImage& image) { mPicture = image; }
+ TQString pictureAttachmentName() const { return mPictureAttachmentName; }
+ TQImage picture() const { return mPicture; }
- void setLogo( const QImage& image ) { mLogo = image; }
- QString logoAttachmentName() const { return mLogoAttachmentName; }
- QImage logo() const { return mLogo; }
+ void setLogo( const TQImage& image ) { mLogo = image; }
+ TQString logoAttachmentName() const { return mLogoAttachmentName; }
+ TQImage logo() const { return mLogo; }
- void setSound( const QByteArray& sound ) { mSound = sound; }
- QString soundAttachmentName() const { return mSoundAttachmentName; }
- QByteArray sound() const { return mSound; }
+ void setSound( const TQByteArray& sound ) { mSound = sound; }
+ TQString soundAttachmentName() const { return mSoundAttachmentName; }
+ TQByteArray sound() const { return mSound; }
- void setChildren( const QString& children );
- QString children() const;
+ void setChildren( const TQString& children );
+ TQString children() const;
- void setGender( const QString& gender );
- QString gender() const;
+ void setGender( const TQString& gender );
+ TQString gender() const;
- void setLanguage( const QString& language );
- QString language() const;
+ void setLanguage( const TQString& language );
+ TQString language() const;
void addPhoneNumber( const PhoneNumber& number );
- QValueList<PhoneNumber>& phoneNumbers();
- const QValueList<PhoneNumber>& phoneNumbers() const;
+ TQValueList<PhoneNumber>& phoneNumbers();
+ const TQValueList<PhoneNumber>& phoneNumbers() const;
void addEmail( const Email& email );
- QValueList<Email>& emails();
- const QValueList<Email>& emails() const;
+ TQValueList<Email>& emails();
+ const TQValueList<Email>& emails() const;
void addAddress( const Address& address );
- QValueList<Address>& addresses();
- const QValueList<Address>& addresses() const;
+ TQValueList<Address>& addresses();
+ const TQValueList<Address>& addresses() const;
// which address is preferred: home or business or other
- void setPreferredAddress( const QString& address );
- QString preferredAddress() const;
+ void setPreferredAddress( const TQString& address );
+ TQString preferredAddress() const;
float latitude() const { return mLatitude; }
void setLatitude( float latitude ) { mLatitude = latitude; }
@@ -187,16 +187,16 @@ public:
void setLongitude( float longitude ) { mLongitude = longitude; }
// Load the attributes of this class
- bool loadAttribute( QDomElement& );
+ bool loadAttribute( TQDomElement& );
// Save the attributes of this class
- bool saveAttributes( QDomElement& ) const;
+ bool saveAttributes( TQDomElement& ) const;
// Load this note by reading the XML file
- bool loadXML( const QDomDocument& xml );
+ bool loadXML( const TQDomDocument& xml );
// Serialize this note to an XML string
- QString saveXML() const;
+ TQString saveXML() const;
// Return true if this contact is a distr list
bool isDistributionList() const { return mIsDistributionList; }
@@ -205,81 +205,81 @@ protected:
void setFields( const KABC::Addressee* );
private:
- bool loadNameAttribute( QDomElement& element );
- void saveNameAttribute( QDomElement& element ) const;
-
- bool loadPhoneAttribute( QDomElement& element );
- void savePhoneAttributes( QDomElement& element ) const;
-
- void saveEmailAttributes( QDomElement& element ) const;
-
- bool loadAddressAttribute( QDomElement& element );
- void saveAddressAttributes( QDomElement& element ) const;
-
- void loadCustomAttributes( QDomElement& element );
- void saveCustomAttributes( QDomElement& element ) const;
-
- void loadDistrListMember( const QDomElement& element );
- void saveDistrListMembers( QDomElement& element ) const;
-
- QImage loadPictureFromKMail( const QString& attachmentName, KABC::ResourceKolab* resource, const QString& subResource, Q_UINT32 sernum );
- QImage loadPictureFromAddressee( const KABC::Picture& picture );
-
- QByteArray loadDataFromKMail( const QString& attachmentName, KABC::ResourceKolab* resource, const QString& subResource, Q_UINT32 sernum );
- QByteArray loadSoundFromAddressee( const KABC::Sound& sound );
-
- QString productID() const;
-
- QString mGivenName;
- QString mMiddleNames;
- QString mLastName;
- QString mFullName;
- QString mInitials;
- QString mPrefix;
- QString mSuffix;
- QString mRole;
- QString mFreeBusyUrl;
- QString mOrganization;
- QString mWebPage;
- QString mIMAddress;
- QString mDepartment;
- QString mOfficeLocation;
- QString mProfession;
- //QString mJobTitle;
- QString mManagerName;
- QString mAssistant;
- QString mNickName;
- QString mSpouseName;
- QDate mBirthday;
- QDate mAnniversary;
- QImage mPicture;
- QImage mLogo;
- QByteArray mSound;
- QString mPictureAttachmentName;
- QString mLogoAttachmentName;
- QString mSoundAttachmentName;
- QString mChildren;
- QString mGender;
- QString mLanguage;
- QValueList<PhoneNumber> mPhoneNumbers;
- QValueList<Email> mEmails;
- QValueList<Address> mAddresses;
- QString mPreferredAddress;
+ bool loadNameAttribute( TQDomElement& element );
+ void saveNameAttribute( TQDomElement& element ) const;
+
+ bool loadPhoneAttribute( TQDomElement& element );
+ void savePhoneAttributes( TQDomElement& element ) const;
+
+ void saveEmailAttributes( TQDomElement& element ) const;
+
+ bool loadAddressAttribute( TQDomElement& element );
+ void saveAddressAttributes( TQDomElement& element ) const;
+
+ void loadCustomAttributes( TQDomElement& element );
+ void saveCustomAttributes( TQDomElement& element ) const;
+
+ void loadDistrListMember( const TQDomElement& element );
+ void saveDistrListMembers( TQDomElement& element ) const;
+
+ TQImage loadPictureFromKMail( const TQString& attachmentName, KABC::ResourceKolab* resource, const TQString& subResource, Q_UINT32 sernum );
+ TQImage loadPictureFromAddressee( const KABC::Picture& picture );
+
+ TQByteArray loadDataFromKMail( const TQString& attachmentName, KABC::ResourceKolab* resource, const TQString& subResource, Q_UINT32 sernum );
+ TQByteArray loadSoundFromAddressee( const KABC::Sound& sound );
+
+ TQString productID() const;
+
+ TQString mGivenName;
+ TQString mMiddleNames;
+ TQString mLastName;
+ TQString mFullName;
+ TQString mInitials;
+ TQString mPrefix;
+ TQString mSuffix;
+ TQString mRole;
+ TQString mFreeBusyUrl;
+ TQString mOrganization;
+ TQString mWebPage;
+ TQString mIMAddress;
+ TQString mDepartment;
+ TQString mOfficeLocation;
+ TQString mProfession;
+ //TQString mJobTitle;
+ TQString mManagerName;
+ TQString mAssistant;
+ TQString mNickName;
+ TQString mSpouseName;
+ TQDate mBirthday;
+ TQDate mAnniversary;
+ TQImage mPicture;
+ TQImage mLogo;
+ TQByteArray mSound;
+ TQString mPictureAttachmentName;
+ TQString mLogoAttachmentName;
+ TQString mSoundAttachmentName;
+ TQString mChildren;
+ TQString mGender;
+ TQString mLanguage;
+ TQValueList<PhoneNumber> mPhoneNumbers;
+ TQValueList<Email> mEmails;
+ TQValueList<Address> mAddresses;
+ TQString mPreferredAddress;
float mLatitude;
float mLongitude;
bool mHasGeo;
bool mIsDistributionList;
struct Custom {
- QString app;
- QString name;
- QString value;
+ TQString app;
+ TQString name;
+ TQString value;
};
- QValueList<Custom> mCustomList;
+ TQValueList<Custom> mCustomList;
struct Member {
- QString displayName;
- QString email;
+ TQString displayName;
+ TQString email;
};
- QValueList<Member> mDistrListMembers;
+ TQValueList<Member> mDistrListMembers;
};
}
diff --git a/kresources/kolab/kabc/resourcekolab.cpp b/kresources/kolab/kabc/resourcekolab.cpp
index 464c9c610..034c32d78 100644
--- a/kresources/kolab/kabc/resourcekolab.cpp
+++ b/kresources/kolab/kabc/resourcekolab.cpp
@@ -45,11 +45,11 @@
#include <kapplication.h>
#include <dcopclient.h>
-#include <qobject.h>
-#include <qtimer.h>
-#include <qstring.h>
-#include <qfile.h>
-#include <qapplication.h>
+#include <tqobject.h>
+#include <tqtimer.h>
+#include <tqstring.h>
+#include <tqfile.h>
+#include <tqapplication.h>
#include <assert.h>
@@ -63,7 +63,7 @@ class KolabFactory : public KRES::PluginFactoryBase
return new KABC::ResourceKolab( config );
}
- KRES::ConfigWidget *configWidget( QWidget* )
+ KRES::ConfigWidget *configWidget( TQWidget* )
{
return 0;
}
@@ -79,7 +79,7 @@ static const char* s_inlineMimeType = "text/x-vcard";
KABC::ResourceKolab::ResourceKolab( const KConfig *config )
: KPIM::ResourceABC( config ),
Kolab::ResourceKolabBase( "ResourceKolab-KABC" ),
- mCachedSubresource( QString::null ), mLocked( false )
+ mCachedSubresource( TQString::null ), mLocked( false )
{
setType( "imap" );
}
@@ -94,8 +94,8 @@ KABC::ResourceKolab::~ResourceKolab()
}
void KABC::ResourceKolab::loadSubResourceConfig( KConfig& config,
- const QString& name,
- const QString& label,
+ const TQString& name,
+ const TQString& label,
bool writable )
{
KConfigGroup group( &config, name );
@@ -110,11 +110,11 @@ bool KABC::ResourceKolab::doOpen()
KConfig config( configFile() );
// Read the calendar entries
- QValueList<KMailICalIface::SubResource> subResources;
+ TQValueList<KMailICalIface::SubResource> subResources;
if ( !kmailSubresources( subResources, s_kmailContentsType ) )
return false;
mSubResources.clear();
- QValueList<KMailICalIface::SubResource>::ConstIterator it;
+ TQValueList<KMailICalIface::SubResource>::ConstIterator it;
for ( it = subResources.begin(); it != subResources.end(); ++it ) {
loadSubResourceConfig( config, (*it).location, (*it).label, (*it).writable );
}
@@ -148,12 +148,12 @@ KABC::Ticket * KABC::ResourceKolab::requestSaveTicket()
void KABC::ResourceKolab::releaseSaveTicket( Ticket* ticket )
{
mLocked = false;
- mCachedSubresource = QString::null;
+ mCachedSubresource = TQString::null;
delete ticket;
}
-QString KABC::ResourceKolab::loadContact( const QString& contactData,
- const QString& subResource,
+TQString KABC::ResourceKolab::loadContact( const TQString& contactData,
+ const TQString& subResource,
Q_UINT32 sernum,
KMailICalIface::StorageFormat format )
{
@@ -181,10 +181,10 @@ static const struct { const char* mimetype; KMailICalIface::StorageFormat format
{ s_inlineMimeType, KMailICalIface::StorageIcalVcard }
};
-bool KABC::ResourceKolab::loadSubResource( const QString& subResource )
+bool KABC::ResourceKolab::loadSubResource( const TQString& subResource )
{
int count = 0;
- if ( !kmailIncidencesCount( count, QString::null, subResource ) ) {
+ if ( !kmailIncidencesCount( count, TQString::null, subResource ) ) {
kdError() << "Communication problem in KABC::ResourceKolab::loadSubResource()\n";
return false;
}
@@ -210,11 +210,11 @@ bool KABC::ResourceKolab::loadSubResource( const QString& subResource )
// TODO it would be faster to pass the s_formats array to kmail and let it load
// all events - to avoid loading each mail 3 times. But then we need to extend the returned
- // QMap to also tell us the StorageFormat of each found contact...
+ // TQMap to also tell us the StorageFormat of each found contact...
for ( int indexFormat = 0; indexFormat < 3; ++indexFormat ) {
const char* mimetype = s_formats[indexFormat].mimetype;
KMailICalIface::StorageFormat format = s_formats[indexFormat].format;
- QMap<Q_UINT32, QString> lst;
+ TQMap<Q_UINT32, TQString> lst;
if ( !kmailIncidences( lst, mimetype, subResource, startIndex, nbMessages ) ) {
kdError() << "Communication problem in KABC::ResourceKolab::loadSubResource()\n";
if ( progressId )
@@ -222,7 +222,7 @@ bool KABC::ResourceKolab::loadSubResource( const QString& subResource )
return false;
}
- for( QMap<Q_UINT32, QString>::ConstIterator it = lst.begin(); it != lst.end(); ++it ) {
+ for( TQMap<Q_UINT32, TQString>::ConstIterator it = lst.begin(); it != lst.end(); ++it ) {
loadContact( it.data(), subResource, it.key(), format );
}
@@ -280,24 +280,24 @@ bool KABC::ResourceKolab::save( Ticket* )
namespace Kolab {
struct AttachmentList {
- QStringList attachmentURLs;
- QStringList attachmentNames;
- QStringList attachmentMimeTypes;
- QStringList deletedAttachments;
- QValueList<KTempFile *> tempFiles;
+ TQStringList attachmentURLs;
+ TQStringList attachmentNames;
+ TQStringList attachmentMimeTypes;
+ TQStringList deletedAttachments;
+ TQValueList<KTempFile *> tempFiles;
- void addAttachment( const QString& url, const QString& name, const QString& mimetype ) {
+ void addAttachment( const TQString& url, const TQString& name, const TQString& mimetype ) {
attachmentURLs.append( url );
attachmentNames.append( name );
attachmentMimeTypes.append( mimetype );
}
- void updatePictureAttachment( const QImage& image, const QString& name );
- void updateAttachment( const QByteArray& data, const QString& name, const char* mimetype );
+ void updatePictureAttachment( const TQImage& image, const TQString& name );
+ void updateAttachment( const TQByteArray& data, const TQString& name, const char* mimetype );
};
} // namespace
-void AttachmentList::updatePictureAttachment( const QImage& image, const QString& name )
+void AttachmentList::updatePictureAttachment( const TQImage& image, const TQString& name )
{
assert( !name.isEmpty() );
if ( !image.isNull() ) {
@@ -313,7 +313,7 @@ void AttachmentList::updatePictureAttachment( const QImage& image, const QString
}
}
-void AttachmentList::updateAttachment( const QByteArray& data, const QString& name, const char* mimetype )
+void AttachmentList::updateAttachment( const TQByteArray& data, const TQString& name, const char* mimetype )
{
assert( !name.isEmpty() );
if ( !data.isNull() ) {
@@ -331,8 +331,8 @@ void AttachmentList::updateAttachment( const QByteArray& data, const QString& na
bool KABC::ResourceKolab::kmailUpdateAddressee( const Addressee& addr )
{
- const QString uid = addr.uid();
- QString subResource;
+ const TQString uid = addr.uid();
+ TQString subResource;
Q_UINT32 sernum;
if ( mUidMap.find( uid ) != mUidMap.end() ) {
subResource = mUidMap[ uid ].resource();
@@ -355,11 +355,11 @@ bool KABC::ResourceKolab::kmailUpdateAddressee( const Addressee& addr )
return false;
sernum = 0;
}
- QString data;
- QString mimetype;
+ TQString data;
+ TQString mimetype;
AttachmentList att;
bool isXMLStorageFormat = kmailStorageFormat( subResource ) == KMailICalIface::StorageXML;
- QString subject = uid; // as per kolab2 spec
+ TQString subject = uid; // as per kolab2 spec
if ( isXMLStorageFormat ) {
Contact contact( &addr );
// The addressee is converted to: 1) the xml 2) the optional picture 3) the optional logo 4) the optional sound
@@ -393,7 +393,7 @@ bool KABC::ResourceKolab::kmailUpdateAddressee( const Addressee& addr )
const_cast<Addressee&>(addr).setChanged( false );
}
- for( QValueList<KTempFile *>::Iterator it = att.tempFiles.begin(); it != att.tempFiles.end(); ++it ) {
+ for( TQValueList<KTempFile *>::Iterator it = att.tempFiles.begin(); it != att.tempFiles.end(); ++it ) {
(*it)->setAutoDelete( true );
delete (*it);
}
@@ -402,7 +402,7 @@ bool KABC::ResourceKolab::kmailUpdateAddressee( const Addressee& addr )
void KABC::ResourceKolab::insertAddressee( const Addressee& addr )
{
- const QString uid = addr.uid();
+ const TQString uid = addr.uid();
//kdDebug(5650) << k_funcinfo << uid << endl;
bool ok = false;
if ( mUidMap.contains( uid ) ) {
@@ -419,10 +419,10 @@ void KABC::ResourceKolab::insertAddressee( const Addressee& addr )
void KABC::ResourceKolab::removeAddressee( const Addressee& addr )
{
- const QString uid = addr.uid();
+ const TQString uid = addr.uid();
if ( mUidMap.find( uid ) == mUidMap.end() ) return;
//kdDebug(5650) << k_funcinfo << uid << endl;
- const QString resource = mUidMap[ uid ].resource();
+ const TQString resource = mUidMap[ uid ].resource();
if ( !subresourceWritable( resource ) ) {
kdWarning() << "Wow! Something tried to delete a non-writable addressee! Fix this caller: " << kdBacktrace() << endl;
return;
@@ -440,18 +440,18 @@ void KABC::ResourceKolab::removeAddressee( const Addressee& addr )
* These are the DCOP slots that KMail call to notify when something
* changed.
*/
-bool KABC::ResourceKolab::fromKMailAddIncidence( const QString& type,
- const QString& subResource,
+bool KABC::ResourceKolab::fromKMailAddIncidence( const TQString& type,
+ const TQString& subResource,
Q_UINT32 sernum,
int format,
- const QString& contactXML )
+ const TQString& contactXML )
{
// Check if this is a contact
if( type != s_kmailContentsType || !subresourceActive( subResource ) )
return false;
// Load contact to find the UID
- const QString uid = loadContact( contactXML, subResource, sernum,
+ const TQString uid = loadContact( contactXML, subResource, sernum,
( KMailICalIface::StorageFormat )format );
//kdDebug(5650) << k_funcinfo << uid << endl;
@@ -468,9 +468,9 @@ bool KABC::ResourceKolab::fromKMailAddIncidence( const QString& type,
return true;
}
-void KABC::ResourceKolab::fromKMailDelIncidence( const QString& type,
- const QString& subResource,
- const QString& uid )
+void KABC::ResourceKolab::fromKMailDelIncidence( const TQString& type,
+ const TQString& subResource,
+ const TQString& uid )
{
// Check if this is a contact
if( type != s_kmailContentsType || !subresourceActive( subResource ) )
@@ -492,8 +492,8 @@ void KABC::ResourceKolab::fromKMailDelIncidence( const QString& type,
}
}
-void KABC::ResourceKolab::fromKMailRefresh( const QString& type,
- const QString& /*subResource*/ )
+void KABC::ResourceKolab::fromKMailRefresh( const TQString& type,
+ const TQString& /*subResource*/ )
{
// Check if this is a contact
if( type != s_kmailContentsType ) return;
@@ -504,9 +504,9 @@ void KABC::ResourceKolab::fromKMailRefresh( const QString& type,
addressBook()->emitAddressBookChanged();
}
-void KABC::ResourceKolab::fromKMailAddSubresource( const QString& type,
- const QString& subResource,
- const QString& label,
+void KABC::ResourceKolab::fromKMailAddSubresource( const TQString& type,
+ const TQString& subResource,
+ const TQString& label,
bool writable,
bool )
{
@@ -524,8 +524,8 @@ void KABC::ResourceKolab::fromKMailAddSubresource( const QString& type,
emit signalSubresourceAdded( this, type, subResource );
}
-void KABC::ResourceKolab::fromKMailDelSubresource( const QString& type,
- const QString& subResource )
+void KABC::ResourceKolab::fromKMailDelSubresource( const TQString& type,
+ const TQString& subResource )
{
if( type != s_kmailContentsType ) return;
@@ -542,7 +542,7 @@ void KABC::ResourceKolab::fromKMailDelSubresource( const QString& type,
// Make a list of all uids to remove
Kolab::UidMap::ConstIterator mapIt;
- QStringList uids;
+ TQStringList uids;
for ( mapIt = mUidMap.begin(); mapIt != mUidMap.end(); ++mapIt )
if ( mapIt.data().resource() == subResource )
// We have a match
@@ -550,7 +550,7 @@ void KABC::ResourceKolab::fromKMailDelSubresource( const QString& type,
// Finally delete all the incidences
if ( !uids.isEmpty() ) {
- QStringList::ConstIterator it;
+ TQStringList::ConstIterator it;
for ( it = uids.begin(); it != uids.end(); ++it ) {
mAddrMap.remove( *it );
mUidMap.remove( *it );
@@ -564,13 +564,13 @@ void KABC::ResourceKolab::fromKMailDelSubresource( const QString& type,
-void KABC::ResourceKolab::fromKMailAsyncLoadResult( const QMap<Q_UINT32, QString>& map,
- const QString& /* type */,
- const QString& folder )
+void KABC::ResourceKolab::fromKMailAsyncLoadResult( const TQMap<Q_UINT32, TQString>& map,
+ const TQString& /* type */,
+ const TQString& folder )
{
// FIXME
KMailICalIface::StorageFormat format = KMailICalIface::StorageXML;
- for( QMap<Q_UINT32, QString>::ConstIterator it = map.begin(); it != map.end(); ++it ) {
+ for( TQMap<Q_UINT32, TQString>::ConstIterator it = map.begin(); it != map.end(); ++it ) {
loadContact( it.data(), folder, it.key(), format );
}
if ( !addressBook() ){
@@ -579,12 +579,12 @@ void KABC::ResourceKolab::fromKMailAsyncLoadResult( const QMap<Q_UINT32, QString
addressBook()->emitAddressBookChanged();
}
-QStringList KABC::ResourceKolab::subresources() const
+TQStringList KABC::ResourceKolab::subresources() const
{
return mSubResources.keys();
}
-bool KABC::ResourceKolab::subresourceActive( const QString& subresource ) const
+bool KABC::ResourceKolab::subresourceActive( const TQString& subresource ) const
{
if ( mSubResources.contains( subresource ) ) {
return mSubResources[ subresource ].active();
@@ -596,7 +596,7 @@ bool KABC::ResourceKolab::subresourceActive( const QString& subresource ) const
return true;
}
-bool KABC::ResourceKolab::subresourceWritable( const QString& subresource ) const
+bool KABC::ResourceKolab::subresourceWritable( const TQString& subresource ) const
{
if ( mSubResources.contains( subresource ) ) {
return mSubResources[ subresource ].writable();
@@ -604,7 +604,7 @@ bool KABC::ResourceKolab::subresourceWritable( const QString& subresource ) cons
return false; //better a safe default
}
-int KABC::ResourceKolab::subresourceCompletionWeight( const QString& subresource ) const
+int KABC::ResourceKolab::subresourceCompletionWeight( const TQString& subresource ) const
{
if ( mSubResources.contains( subresource ) ) {
return mSubResources[ subresource ].completionWeight();
@@ -615,17 +615,17 @@ int KABC::ResourceKolab::subresourceCompletionWeight( const QString& subresource
return 80;
}
-QString KABC::ResourceKolab::subresourceLabel( const QString& subresource ) const
+TQString KABC::ResourceKolab::subresourceLabel( const TQString& subresource ) const
{
if ( mSubResources.contains( subresource ) ) {
return mSubResources[ subresource ].label();
}
kdDebug(5650) << "subresourceLabel( " << subresource << " ): not found!\n";
- return QString::null;
+ return TQString::null;
}
-void KABC::ResourceKolab::setSubresourceCompletionWeight( const QString& subresource, int completionWeight )
+void KABC::ResourceKolab::setSubresourceCompletionWeight( const TQString& subresource, int completionWeight )
{
if ( mSubResources.contains( subresource ) ) {
mSubResources[ subresource ].setCompletionWeight( completionWeight );
@@ -634,17 +634,17 @@ void KABC::ResourceKolab::setSubresourceCompletionWeight( const QString& subreso
}
}
-QMap<QString, QString> KABC::ResourceKolab::uidToResourceMap() const
+TQMap<TQString, TQString> KABC::ResourceKolab::uidToResourceMap() const
{
// TODO: Couldn't this be made simpler?
- QMap<QString, QString> map;
+ TQMap<TQString, TQString> map;
Kolab::UidMap::ConstIterator mapIt;
for ( mapIt = mUidMap.begin(); mapIt != mUidMap.end(); ++mapIt )
map[ mapIt.key() ] = mapIt.data().resource();
return map;
}
-void KABC::ResourceKolab::setSubresourceActive( const QString &subresource, bool active )
+void KABC::ResourceKolab::setSubresourceActive( const TQString &subresource, bool active )
{
if ( mSubResources.contains( subresource ) ) {
mSubResources[ subresource ].setActive( active );
@@ -656,13 +656,13 @@ void KABC::ResourceKolab::setSubresourceActive( const QString &subresource, bool
/*virtual*/
-bool KABC::ResourceKolab::addSubresource( const QString& label, const QString& parent )
+bool KABC::ResourceKolab::addSubresource( const TQString& label, const TQString& parent )
{
return kmailAddSubresource( label, parent, s_kmailContentsType );
}
/*virtual*/
-bool KABC::ResourceKolab::removeSubresource( const QString& id )
+bool KABC::ResourceKolab::removeSubresource( const TQString& id )
{
return kmailRemoveSubresource( id );
}
diff --git a/kresources/kolab/kabc/resourcekolab.h b/kresources/kolab/kabc/resourcekolab.h
index e01922681..1da472015 100644
--- a/kresources/kolab/kabc/resourcekolab.h
+++ b/kresources/kolab/kabc/resourcekolab.h
@@ -106,67 +106,67 @@ public:
virtual void removeAddressee( const Addressee& addr );
// Listen to KMail changes in the amount of sub resources
- void fromKMailAddSubresource( const QString& type, const QString& id,
- const QString& label, bool writable,
+ void fromKMailAddSubresource( const TQString& type, const TQString& id,
+ const TQString& label, bool writable,
bool alarmRelevant );
- void fromKMailDelSubresource( const QString& type, const QString& id );
+ void fromKMailDelSubresource( const TQString& type, const TQString& id );
- bool fromKMailAddIncidence( const QString& type, const QString& resource,
- Q_UINT32 sernum, int format, const QString& contact );
- void fromKMailDelIncidence( const QString& type, const QString& resource,
- const QString& contact );
- void fromKMailRefresh( const QString& type, const QString& resource );
+ bool fromKMailAddIncidence( const TQString& type, const TQString& resource,
+ Q_UINT32 sernum, int format, const TQString& contact );
+ void fromKMailDelIncidence( const TQString& type, const TQString& resource,
+ const TQString& contact );
+ void fromKMailRefresh( const TQString& type, const TQString& resource );
- void fromKMailAsyncLoadResult( const QMap<Q_UINT32, QString>& map,
- const QString& type,
- const QString& folder );
+ void fromKMailAsyncLoadResult( const TQMap<Q_UINT32, TQString>& map,
+ const TQString& type,
+ const TQString& folder );
/// Return the list of subresources.
- QStringList subresources() const;
+ TQStringList subresources() const;
/// Is this subresource active?
- bool subresourceActive( const QString& ) const;
+ bool subresourceActive( const TQString& ) const;
/// Is this subresource writable?
- virtual bool subresourceWritable( const QString& ) const;
+ virtual bool subresourceWritable( const TQString& ) const;
- virtual void setSubresourceActive( const QString &, bool );
+ virtual void setSubresourceActive( const TQString &, bool );
- virtual bool addSubresource( const QString&, const QString& );
+ virtual bool addSubresource( const TQString&, const TQString& );
- virtual bool removeSubresource( const QString& );
+ virtual bool removeSubresource( const TQString& );
virtual bool canHaveSubresources() const { return true; }
/// Completion weight for a given subresource
- virtual int subresourceCompletionWeight( const QString& ) const;
+ virtual int subresourceCompletionWeight( const TQString& ) const;
/// Label for a given subresource
- virtual QString subresourceLabel( const QString& ) const;
+ virtual TQString subresourceLabel( const TQString& ) const;
/// Set completion weight for a given subresource
- virtual void setSubresourceCompletionWeight( const QString&, int );
+ virtual void setSubresourceCompletionWeight( const TQString&, int );
/// Give the uidmap. Used for ordered searching
- QMap<QString, QString> uidToResourceMap() const;
+ TQMap<TQString, TQString> uidToResourceMap() const;
protected:
bool kmailUpdateAddressee( const Addressee& );
void doClose();
- void loadSubResourceConfig( KConfig& config, const QString& name,
- const QString& label, bool writable );
- bool loadSubResource( const QString& subResource );
- QString loadContact( const QString& contactData, const QString& subResource,
+ void loadSubResourceConfig( KConfig& config, const TQString& name,
+ const TQString& label, bool writable );
+ bool loadSubResource( const TQString& subResource );
+ TQString loadContact( const TQString& contactData, const TQString& subResource,
Q_UINT32 sernum, const KMailICalIface::StorageFormat format );
- QString configFile() const {
+ TQString configFile() const {
return Kolab::ResourceKolabBase::configFile( "kabc" );
}
// The list of subresources
Kolab::ResourceMap mSubResources;
- QString mCachedSubresource;
+ TQString mCachedSubresource;
bool mLocked;
};
diff --git a/kresources/kolab/kabc/resourcekolab_plugin.cpp b/kresources/kolab/kabc/resourcekolab_plugin.cpp
index be87772b3..c4f1b3333 100644
--- a/kresources/kolab/kabc/resourcekolab_plugin.cpp
+++ b/kresources/kolab/kabc/resourcekolab_plugin.cpp
@@ -42,7 +42,7 @@ class KolabFactory : public KRES::PluginFactoryBase
return new KABC::ResourceKolab( config );
}
- KRES::ConfigWidget *configWidget( QWidget* )
+ KRES::ConfigWidget *configWidget( TQWidget* )
{
return 0;
}
diff --git a/kresources/kolab/kcal/event.cpp b/kresources/kolab/kcal/event.cpp
index a53ca4162..0f25eb73d 100644
--- a/kresources/kolab/kcal/event.cpp
+++ b/kresources/kolab/kcal/event.cpp
@@ -39,8 +39,8 @@
using namespace Kolab;
-KCal::Event* Event::xmlToEvent( const QString& xml, const QString& tz, KCal::ResourceKolab* res,
- const QString& subResource, Q_UINT32 sernum )
+KCal::Event* Event::xmlToEvent( const TQString& xml, const TQString& tz, KCal::ResourceKolab* res,
+ const TQString& subResource, Q_UINT32 sernum )
{
Event event( res, subResource, sernum, tz );
event.load( xml );
@@ -49,14 +49,14 @@ KCal::Event* Event::xmlToEvent( const QString& xml, const QString& tz, KCal::Res
return kcalEvent;
}
-QString Event::eventToXML( KCal::Event* kcalEvent, const QString& tz )
+TQString Event::eventToXML( KCal::Event* kcalEvent, const TQString& tz )
{
- Event event( 0, QString::null, 0, tz, kcalEvent );
+ Event event( 0, TQString::null, 0, tz, kcalEvent );
return event.saveXML();
}
-Event::Event( KCal::ResourceKolab *res, const QString &subResource, Q_UINT32 sernum,
- const QString& tz, KCal::Event* event )
+Event::Event( KCal::ResourceKolab *res, const TQString &subResource, Q_UINT32 sernum,
+ const TQString& tz, KCal::Event* event )
: Incidence( res, subResource, sernum, tz ),
mShowTimeAs( KCal::Event::Opaque ), mHasEndDate( false )
{
@@ -78,7 +78,7 @@ KCal::Event::Transparency Event::transparency() const
return mShowTimeAs;
}
-void Event::setEndDate( const QDateTime& date )
+void Event::setEndDate( const TQDateTime& date )
{
mEndDate = date;
mHasEndDate = true;
@@ -87,7 +87,7 @@ void Event::setEndDate( const QDateTime& date )
mFloatingStatus = HasTime;
}
-void Event::setEndDate( const QDate& date )
+void Event::setEndDate( const TQDate& date )
{
mEndDate = date;
mHasEndDate = true;
@@ -96,7 +96,7 @@ void Event::setEndDate( const QDate& date )
mFloatingStatus = AllDay;
}
-void Event::setEndDate( const QString& endDate )
+void Event::setEndDate( const TQString& endDate )
{
if ( endDate.length() > 10 )
// This is a date + time
@@ -106,15 +106,15 @@ void Event::setEndDate( const QString& endDate )
setEndDate( stringToDate( endDate ) );
}
-QDateTime Event::endDate() const
+TQDateTime Event::endDate() const
{
return mEndDate;
}
-bool Event::loadAttribute( QDomElement& element )
+bool Event::loadAttribute( TQDomElement& element )
{
// This method doesn't handle the color-label tag yet
- QString tagName = element.tagName();
+ TQString tagName = element.tagName();
if ( tagName == "show-time-as" ) {
// TODO: Support tentative and outofoffice
@@ -131,7 +131,7 @@ bool Event::loadAttribute( QDomElement& element )
return true;
}
-bool Event::saveAttributes( QDomElement& element ) const
+bool Event::saveAttributes( TQDomElement& element ) const
{
// Save the base class elements
Incidence::saveAttributes( element );
@@ -152,9 +152,9 @@ bool Event::saveAttributes( QDomElement& element ) const
}
-bool Event::loadXML( const QDomDocument& document )
+bool Event::loadXML( const TQDomDocument& document )
{
- QDomElement top = document.documentElement();
+ TQDomElement top = document.documentElement();
if ( top.tagName() != "event" ) {
qWarning( "XML error: Top tag was %s instead of the expected event",
@@ -162,11 +162,11 @@ bool Event::loadXML( const QDomDocument& document )
return false;
}
- for ( QDomNode n = top.firstChild(); !n.isNull(); n = n.nextSibling() ) {
+ for ( TQDomNode n = top.firstChild(); !n.isNull(); n = n.nextSibling() ) {
if ( n.isComment() )
continue;
if ( n.isElement() ) {
- QDomElement e = n.toElement();
+ TQDomElement e = n.toElement();
loadAttribute( e );
} else
kdDebug() << "Node is not a comment or an element???" << endl;
@@ -176,10 +176,10 @@ bool Event::loadXML( const QDomDocument& document )
return true;
}
-QString Event::saveXML() const
+TQString Event::saveXML() const
{
- QDomDocument document = domTree();
- QDomElement element = document.createElement( "event" );
+ TQDomDocument document = domTree();
+ TQDomElement element = document.createElement( "event" );
element.setAttribute( "version", "1.0" );
saveAttributes( element );
document.appendChild( element );
diff --git a/kresources/kolab/kcal/event.h b/kresources/kolab/kcal/event.h
index ad33db520..879bda2da 100644
--- a/kresources/kolab/kcal/event.h
+++ b/kresources/kolab/kcal/event.h
@@ -53,47 +53,47 @@ class Event : public Incidence {
public:
/// Use this to parse an xml string to a event entry
/// The caller is responsible for deleting the returned event
- static KCal::Event* xmlToEvent( const QString& xml, const QString& tz, KCal::ResourceKolab* res = 0,
- const QString& subResource = QString::null, Q_UINT32 sernum = 0 );
+ static KCal::Event* xmlToEvent( const TQString& xml, const TQString& tz, KCal::ResourceKolab* res = 0,
+ const TQString& subResource = TQString::null, Q_UINT32 sernum = 0 );
/// Use this to get an xml string describing this event entry
- static QString eventToXML( KCal::Event*, const QString& tz );
+ static TQString eventToXML( KCal::Event*, const TQString& tz );
/// Create a event object and
- explicit Event( KCal::ResourceKolab *res, const QString &subResource, Q_UINT32 sernum,
- const QString& tz, KCal::Event* event = 0 );
+ explicit Event( KCal::ResourceKolab *res, const TQString &subResource, Q_UINT32 sernum,
+ const TQString& tz, KCal::Event* event = 0 );
virtual ~Event();
void saveTo( KCal::Event* event );
- virtual QString type() const { return "Event"; }
+ virtual TQString type() const { return "Event"; }
virtual void setTransparency( KCal::Event::Transparency transparency );
virtual KCal::Event::Transparency transparency() const;
- virtual void setEndDate( const QDateTime& date );
- virtual void setEndDate( const QDate& date );
- virtual void setEndDate( const QString& date );
- virtual QDateTime endDate() const;
+ virtual void setEndDate( const TQDateTime& date );
+ virtual void setEndDate( const TQDate& date );
+ virtual void setEndDate( const TQString& date );
+ virtual TQDateTime endDate() const;
// Load the attributes of this class
- virtual bool loadAttribute( QDomElement& );
+ virtual bool loadAttribute( TQDomElement& );
// Save the attributes of this class
- virtual bool saveAttributes( QDomElement& ) const;
+ virtual bool saveAttributes( TQDomElement& ) const;
// Load this event by reading the XML file
- virtual bool loadXML( const QDomDocument& xml );
+ virtual bool loadXML( const TQDomDocument& xml );
// Serialize this event to an XML string
- virtual QString saveXML() const;
+ virtual TQString saveXML() const;
protected:
// Read all known fields from this ical incidence
void setFields( const KCal::Event* );
KCal::Event::Transparency mShowTimeAs;
- QDateTime mEndDate;
+ TQDateTime mEndDate;
bool mHasEndDate;
};
diff --git a/kresources/kolab/kcal/incidence.cpp b/kresources/kolab/kcal/incidence.cpp
index 8c74e3bdf..74f41fd8d 100644
--- a/kresources/kolab/kcal/incidence.cpp
+++ b/kresources/kolab/kcal/incidence.cpp
@@ -34,8 +34,8 @@
#include "incidence.h"
#include "resourcekolab.h"
-#include <qfile.h>
-#include <qvaluelist.h>
+#include <tqfile.h>
+#include <tqvaluelist.h>
#include <libkcal/journal.h>
#include <korganizer/version.h>
@@ -47,8 +47,8 @@
using namespace Kolab;
-Incidence::Incidence( KCal::ResourceKolab *res, const QString &subResource, Q_UINT32 sernum,
- const QString& tz )
+Incidence::Incidence( KCal::ResourceKolab *res, const TQString &subResource, Q_UINT32 sernum,
+ const TQString& tz )
: KolabBase( tz ), mFloatingStatus( Unset ), mHasAlarm( false ),
mRevision( 0 ),
mResource( res ),
@@ -61,22 +61,22 @@ Incidence::~Incidence()
{
}
-void Incidence::setSummary( const QString& summary )
+void Incidence::setSummary( const TQString& summary )
{
mSummary = summary;
}
-QString Incidence::summary() const
+TQString Incidence::summary() const
{
return mSummary;
}
-void Incidence::setLocation( const QString& location )
+void Incidence::setLocation( const TQString& location )
{
mLocation = location;
}
-QString Incidence::location() const
+TQString Incidence::location() const
{
return mLocation;
}
@@ -91,7 +91,7 @@ KolabBase::Email Incidence::organizer() const
return mOrganizer;
}
-void Incidence::setStartDate( const QDateTime& startDate )
+void Incidence::setStartDate( const TQDateTime& startDate )
{
mStartDate = startDate;
if ( mFloatingStatus == AllDay )
@@ -99,7 +99,7 @@ void Incidence::setStartDate( const QDateTime& startDate )
mFloatingStatus = HasTime;
}
-void Incidence::setStartDate( const QDate& startDate )
+void Incidence::setStartDate( const TQDate& startDate )
{
mStartDate = startDate;
if ( mFloatingStatus == HasTime )
@@ -107,7 +107,7 @@ void Incidence::setStartDate( const QDate& startDate )
mFloatingStatus = AllDay;
}
-void Incidence::setStartDate( const QString& startDate )
+void Incidence::setStartDate( const TQString& startDate )
{
if ( startDate.length() > 10 )
// This is a date + time
@@ -117,7 +117,7 @@ void Incidence::setStartDate( const QString& startDate )
setStartDate( stringToDate( startDate ) );
}
-QDateTime Incidence::startDate() const
+TQDateTime Incidence::startDate() const
{
return mStartDate;
}
@@ -143,22 +143,22 @@ void Incidence::addAttendee( const Attendee& attendee )
mAttendees.append( attendee );
}
-QValueList<Incidence::Attendee>& Incidence::attendees()
+TQValueList<Incidence::Attendee>& Incidence::attendees()
{
return mAttendees;
}
-const QValueList<Incidence::Attendee>& Incidence::attendees() const
+const TQValueList<Incidence::Attendee>& Incidence::attendees() const
{
return mAttendees;
}
-void Incidence::setInternalUID( const QString& iuid )
+void Incidence::setInternalUID( const TQString& iuid )
{
mInternalUID = iuid;
}
-QString Incidence::internalUID() const
+TQString Incidence::internalUID() const
{
return mInternalUID;
}
@@ -173,15 +173,15 @@ int Incidence::revision() const
return mRevision;
}
-bool Incidence::loadAttendeeAttribute( QDomElement& element,
+bool Incidence::loadAttendeeAttribute( TQDomElement& element,
Attendee& attendee )
{
- for ( QDomNode n = element.firstChild(); !n.isNull(); n = n.nextSibling() ) {
+ for ( TQDomNode n = element.firstChild(); !n.isNull(); n = n.nextSibling() ) {
if ( n.isComment() )
continue;
if ( n.isElement() ) {
- QDomElement e = n.toElement();
- QString tagName = e.tagName();
+ TQDomElement e = n.toElement();
+ TQString tagName = e.tagName();
if ( tagName == "display-name" )
attendee.displayName = e.text();
@@ -212,10 +212,10 @@ bool Incidence::loadAttendeeAttribute( QDomElement& element,
return true;
}
-void Incidence::saveAttendeeAttribute( QDomElement& element,
+void Incidence::saveAttendeeAttribute( TQDomElement& element,
const Attendee& attendee ) const
{
- QDomElement e = element.ownerDocument().createElement( "attendee" );
+ TQDomElement e = element.ownerDocument().createElement( "attendee" );
element.appendChild( e );
writeString( e, "display-name", attendee.displayName );
writeString( e, "smtp-address", attendee.smtpAddress );
@@ -229,14 +229,14 @@ void Incidence::saveAttendeeAttribute( QDomElement& element,
writeString( e, "delegated-from", attendee.delegator );
}
-void Incidence::saveAttendees( QDomElement& element ) const
+void Incidence::saveAttendees( TQDomElement& element ) const
{
- QValueList<Attendee>::ConstIterator it = mAttendees.begin();
+ TQValueList<Attendee>::ConstIterator it = mAttendees.begin();
for ( ; it != mAttendees.end(); ++it )
saveAttendeeAttribute( element, *it );
}
-void Incidence::saveAttachments( QDomElement& element ) const
+void Incidence::saveAttachments( TQDomElement& element ) const
{
KCal::Attachment::List::ConstIterator it = mAttachments.begin();
for ( ; it != mAttachments.end(); ++it ) {
@@ -249,15 +249,15 @@ void Incidence::saveAttachments( QDomElement& element ) const
}
}
-void Incidence::saveRecurrence( QDomElement& element ) const
+void Incidence::saveRecurrence( TQDomElement& element ) const
{
- QDomElement e = element.ownerDocument().createElement( "recurrence" );
+ TQDomElement e = element.ownerDocument().createElement( "recurrence" );
element.appendChild( e );
e.setAttribute( "cycle", mRecurrence.cycle );
if ( !mRecurrence.type.isEmpty() )
e.setAttribute( "type", mRecurrence.type );
- writeString( e, "interval", QString::number( mRecurrence.interval ) );
- for( QStringList::ConstIterator it = mRecurrence.days.begin(); it != mRecurrence.days.end(); ++it ) {
+ writeString( e, "interval", TQString::number( mRecurrence.interval ) );
+ for( TQStringList::ConstIterator it = mRecurrence.days.begin(); it != mRecurrence.days.end(); ++it ) {
writeString( e, "day", *it );
}
if ( !mRecurrence.dayNumber.isEmpty() )
@@ -265,29 +265,29 @@ void Incidence::saveRecurrence( QDomElement& element ) const
if ( !mRecurrence.month.isEmpty() )
writeString( e, "month", mRecurrence.month );
if ( !mRecurrence.rangeType.isEmpty() ) {
- QDomElement range = element.ownerDocument().createElement( "range" );
+ TQDomElement range = element.ownerDocument().createElement( "range" );
e.appendChild( range );
range.setAttribute( "type", mRecurrence.rangeType );
- QDomText t = element.ownerDocument().createTextNode( mRecurrence.range );
+ TQDomText t = element.ownerDocument().createTextNode( mRecurrence.range );
range.appendChild( t );
}
- for( QValueList<QDate>::ConstIterator it = mRecurrence.exclusions.begin();
+ for( TQValueList<TQDate>::ConstIterator it = mRecurrence.exclusions.begin();
it != mRecurrence.exclusions.end(); ++it ) {
writeString( e, "exclusion", dateToString( *it ) );
}
}
-void Incidence::loadRecurrence( const QDomElement& element )
+void Incidence::loadRecurrence( const TQDomElement& element )
{
mRecurrence.interval = 0;
mRecurrence.cycle = element.attribute( "cycle" );
mRecurrence.type = element.attribute( "type" );
- for ( QDomNode n = element.firstChild(); !n.isNull(); n = n.nextSibling() ) {
+ for ( TQDomNode n = element.firstChild(); !n.isNull(); n = n.nextSibling() ) {
if ( n.isComment() )
continue;
if ( n.isElement() ) {
- QDomElement e = n.toElement();
- QString tagName = e.tagName();
+ TQDomElement e = n.toElement();
+ TQString tagName = e.tagName();
if ( tagName == "interval" )
mRecurrence.interval = e.text().toInt();
@@ -309,9 +309,9 @@ void Incidence::loadRecurrence( const QDomElement& element )
}
}
-bool Incidence::loadAttribute( QDomElement& element )
+bool Incidence::loadAttribute( TQDomElement& element )
{
- QString tagName = element.tagName();
+ TQString tagName = element.tagName();
if ( tagName == "summary" )
setSummary( element.text() );
@@ -355,7 +355,7 @@ bool Incidence::loadAttribute( QDomElement& element )
// Unhandled tag - save for later storage
kdDebug() << "Saving unhandled tag " << element.tagName() << endl;
Custom c;
- c.key = QCString( "X-KDE-KolabUnhandled-" ) + element.tagName().latin1();
+ c.key = TQCString( "X-KDE-KolabUnhandled-" ) + element.tagName().latin1();
c.value = element.text();
mCustomList.append( c );
}
@@ -364,7 +364,7 @@ bool Incidence::loadAttribute( QDomElement& element )
return true;
}
-bool Incidence::saveAttributes( QDomElement& element ) const
+bool Incidence::saveAttributes( TQDomElement& element ) const
{
// Save the base class elements
KolabBase::saveAttributes( element );
@@ -383,26 +383,26 @@ bool Incidence::saveAttributes( QDomElement& element ) const
if ( mHasAlarm ) {
// Alarms should be minutes before. Libkcal uses event time + alarm time
int alarmTime = qRound( -alarm() );
- writeString( element, "alarm", QString::number( alarmTime ) );
+ writeString( element, "alarm", TQString::number( alarmTime ) );
}
writeString( element, "x-kde-internaluid", internalUID() );
- writeString( element, "revision", QString::number( revision() ) );
+ writeString( element, "revision", TQString::number( revision() ) );
saveCustomAttributes( element );
return true;
}
-void Incidence::saveCustomAttributes( QDomElement& element ) const
+void Incidence::saveCustomAttributes( TQDomElement& element ) const
{
- QValueList<Custom>::ConstIterator it = mCustomList.begin();
+ TQValueList<Custom>::ConstIterator it = mCustomList.begin();
for ( ; it != mCustomList.end(); ++it ) {
- QString key = (*it).key;
+ TQString key = (*it).key;
Q_ASSERT( !key.isEmpty() );
if ( key.startsWith( "X-KDE-KolabUnhandled-" ) ) {
key = key.mid( strlen( "X-KDE-KolabUnhandled-" ) );
writeString( element, key, (*it).value );
} else {
// Let's use attributes so that other tag-preserving-code doesn't need sub-elements
- QDomElement e = element.ownerDocument().createElement( "x-custom" );
+ TQDomElement e = element.ownerDocument().createElement( "x-custom" );
element.appendChild( e );
e.setAttribute( "key", key );
e.setAttribute( "value", (*it).value );
@@ -410,7 +410,7 @@ void Incidence::saveCustomAttributes( QDomElement& element ) const
}
}
-void Incidence::loadCustomAttributes( QDomElement& element )
+void Incidence::loadCustomAttributes( TQDomElement& element )
{
Custom custom;
custom.key = element.attribute( "key" ).latin1();
@@ -418,7 +418,7 @@ void Incidence::loadCustomAttributes( QDomElement& element )
mCustomList.append( custom );
}
-static KCal::Attendee::PartStat attendeeStringToStatus( const QString& s )
+static KCal::Attendee::PartStat attendeeStringToStatus( const TQString& s )
{
if ( s == "none" )
return KCal::Attendee::NeedsAction;
@@ -433,7 +433,7 @@ static KCal::Attendee::PartStat attendeeStringToStatus( const QString& s )
return KCal::Attendee::Accepted;
}
-static QString attendeeStatusToString( KCal::Attendee::PartStat status )
+static TQString attendeeStatusToString( KCal::Attendee::PartStat status )
{
switch( status ) {
case KCal::Attendee::NeedsAction:
@@ -456,7 +456,7 @@ static QString attendeeStatusToString( KCal::Attendee::PartStat status )
return "accepted";
}
-static KCal::Attendee::Role attendeeStringToRole( const QString& s )
+static KCal::Attendee::Role attendeeStringToRole( const TQString& s )
{
if ( s == "optional" )
return KCal::Attendee::OptParticipant;
@@ -465,7 +465,7 @@ static KCal::Attendee::Role attendeeStringToRole( const QString& s )
return KCal::Attendee::ReqParticipant;
}
-static QString attendeeRoleToString( KCal::Attendee::Role role )
+static TQString attendeeRoleToString( KCal::Attendee::Role role )
{
switch( role ) {
case KCal::Attendee::ReqParticipant:
@@ -511,7 +511,7 @@ void Incidence::setRecurrence( KCal::Recurrence* recur )
case KCal::Recurrence::rWeekly: // every X weeks
mRecurrence.cycle = "weekly";
{
- QBitArray arr = recur->days();
+ TQBitArray arr = recur->days();
for ( uint idx = 0 ; idx < 7 ; ++idx )
if ( arr.testBit( idx ) )
mRecurrence.days.append( s_weekDayName[idx] );
@@ -520,11 +520,11 @@ void Incidence::setRecurrence( KCal::Recurrence* recur )
case KCal::Recurrence::rMonthlyPos: {
mRecurrence.cycle = "monthly";
mRecurrence.type = "weekday";
- QValueList<KCal::RecurrenceRule::WDayPos> monthPositions = recur->monthPositions();
+ TQValueList<KCal::RecurrenceRule::WDayPos> monthPositions = recur->monthPositions();
if ( !monthPositions.isEmpty() ) {
KCal::RecurrenceRule::WDayPos monthPos = monthPositions.first();
// TODO: Handle multiple days in the same week
- mRecurrence.dayNumber = QString::number( monthPos.pos() );
+ mRecurrence.dayNumber = TQString::number( monthPos.pos() );
mRecurrence.days.append( s_weekDayName[ monthPos.day()-1 ] );
// Not (properly) handled(?): monthPos.negative (nth days before end of month)
}
@@ -533,20 +533,20 @@ void Incidence::setRecurrence( KCal::Recurrence* recur )
case KCal::Recurrence::rMonthlyDay: {
mRecurrence.cycle = "monthly";
mRecurrence.type = "daynumber";
- QValueList<int> monthDays = recur->monthDays();
+ TQValueList<int> monthDays = recur->monthDays();
// ####### Kolab XML limitation: only the first month day is used
if ( !monthDays.isEmpty() )
- mRecurrence.dayNumber = QString::number( monthDays.first() );
+ mRecurrence.dayNumber = TQString::number( monthDays.first() );
break;
}
case KCal::Recurrence::rYearlyMonth: // (day n of Month Y)
{
mRecurrence.cycle = "yearly";
mRecurrence.type = "monthday";
- QValueList<int> rmd = recur->yearDates();
+ TQValueList<int> rmd = recur->yearDates();
int day = !rmd.isEmpty() ? rmd.first() : recur->startDate().day();
- mRecurrence.dayNumber = QString::number( day );
- QValueList<int> months = recur->yearMonths();
+ mRecurrence.dayNumber = TQString::number( day );
+ TQValueList<int> months = recur->yearMonths();
if ( !months.isEmpty() )
mRecurrence.month = s_monthName[ months.first() - 1 ]; // #### Kolab XML limitation: only one month specified
break;
@@ -554,22 +554,22 @@ void Incidence::setRecurrence( KCal::Recurrence* recur )
case KCal::Recurrence::rYearlyDay: // YearlyDay (day N of the year). Not supported by Outlook
mRecurrence.cycle = "yearly";
mRecurrence.type = "yearday";
- mRecurrence.dayNumber = QString::number( recur->yearDays().first() );
+ mRecurrence.dayNumber = TQString::number( recur->yearDays().first() );
break;
case KCal::Recurrence::rYearlyPos: // (weekday X of week N of month Y)
mRecurrence.cycle = "yearly";
mRecurrence.type = "weekday";
- QValueList<int> months = recur->yearMonths();
+ TQValueList<int> months = recur->yearMonths();
if ( !months.isEmpty() )
mRecurrence.month = s_monthName[ months.first() - 1 ]; // #### Kolab XML limitation: only one month specified
- QValueList<KCal::RecurrenceRule::WDayPos> monthPositions = recur->yearPositions();
+ TQValueList<KCal::RecurrenceRule::WDayPos> monthPositions = recur->yearPositions();
if ( !monthPositions.isEmpty() ) {
KCal::RecurrenceRule::WDayPos monthPos = monthPositions.first();
// TODO: Handle multiple days in the same week
- mRecurrence.dayNumber = QString::number( monthPos.pos() );
+ mRecurrence.dayNumber = TQString::number( monthPos.pos() );
mRecurrence.days.append( s_weekDayName[ monthPos.day()-1 ] );
- //mRecurrence.dayNumber = QString::number( *recur->yearNums().getFirst() );
+ //mRecurrence.dayNumber = TQString::number( *recur->yearNums().getFirst() );
// Not handled: monthPos.negative (nth days before end of month)
}
break;
@@ -577,7 +577,7 @@ void Incidence::setRecurrence( KCal::Recurrence* recur )
int howMany = recur->duration();
if ( howMany > 0 ) {
mRecurrence.rangeType = "number";
- mRecurrence.range = QString::number( howMany );
+ mRecurrence.range = TQString::number( howMany );
} else if ( howMany == 0 ) {
mRecurrence.rangeType = "date";
mRecurrence.range = dateToString( recur->endDate() );
@@ -657,7 +657,7 @@ void Incidence::setFields( const KCal::Incidence* incidence )
// Handle the scheduling ID
if ( incidence->schedulingID() == incidence->uid() ) {
// There is no scheduling ID
- setInternalUID( QString::null );
+ setInternalUID( TQString::null );
} else {
// We've internally been using a different uid, so save that as the
// temporary (internal) uid and restore the original uid, the one that
@@ -672,8 +672,8 @@ void Incidence::setFields( const KCal::Incidence* incidence )
setPilotSyncStatus( incidence->syncStatus() );
// Unhandled tags and other custom properties (see libkcal/customproperties.h)
- const QMap<QCString, QString> map = incidence->customProperties();
- QMap<QCString, QString>::ConstIterator cit = map.begin();
+ const TQMap<TQCString, TQString> map = incidence->customProperties();
+ TQMap<TQCString, TQString>::ConstIterator cit = map.begin();
for ( ; cit != map.end() ; ++cit ) {
Custom c;
c.key = cit.key();
@@ -682,11 +682,11 @@ void Incidence::setFields( const KCal::Incidence* incidence )
}
}
-static QBitArray daysListToBitArray( const QStringList& days )
+static TQBitArray daysListToBitArray( const TQStringList& days )
{
- QBitArray arr( 7 );
+ TQBitArray arr( 7 );
arr.fill( false );
- for( QStringList::ConstIterator it = days.begin(); it != days.end(); ++it ) {
+ for( TQStringList::ConstIterator it = days.begin(); it != days.end(); ++it ) {
for ( uint i = 0; i < 7 ; ++i )
if ( *it == s_weekDayName[i] )
arr.setBit( i, true );
@@ -724,7 +724,7 @@ void Incidence::saveTo( KCal::Incidence* incidence )
+ organizer().smtpAddress + ">" );
incidence->clearAttendees();
- QValueList<Attendee>::ConstIterator it;
+ TQValueList<Attendee>::ConstIterator it;
for ( it = mAttendees.begin(); it != mAttendees.end(); ++it ) {
KCal::Attendee::PartStat status = attendeeStringToStatus( (*it).status );
KCal::Attendee::Role role = attendeeStringToRole( (*it).role );
@@ -755,7 +755,7 @@ void Incidence::saveTo( KCal::Incidence* incidence )
} else if ( mRecurrence.cycle == "daily" ) {
recur->setDaily( mRecurrence.interval );
} else if ( mRecurrence.cycle == "weekly" ) {
- QBitArray rDays = daysListToBitArray( mRecurrence.days );
+ TQBitArray rDays = daysListToBitArray( mRecurrence.days );
recur->setWeekly( mRecurrence.interval, rDays );
} else if ( mRecurrence.cycle == "monthly" ) {
recur->setMonthly( mRecurrence.interval );
@@ -803,7 +803,7 @@ void Incidence::saveTo( KCal::Incidence* incidence )
if ( hasPilotSyncStatus() )
incidence->setSyncStatus( pilotSyncStatus() );
- for( QValueList<Custom>::ConstIterator it = mCustomList.begin(); it != mCustomList.end(); ++it ) {
+ for( TQValueList<Custom>::ConstIterator it = mCustomList.begin(); it != mCustomList.end(); ++it ) {
incidence->setNonKDECustomProperty( (*it).key, (*it).value );
}
@@ -811,16 +811,16 @@ void Incidence::saveTo( KCal::Incidence* incidence )
void Incidence::loadAttachments()
{
- QStringList attachments;
+ TQStringList attachments;
if ( mResource->kmailListAttachments( attachments, mSubResource, mSernum ) ) {
- for ( QStringList::ConstIterator it = attachments.constBegin(); it != attachments.constEnd(); ++it ) {
- QByteArray data;
+ for ( TQStringList::ConstIterator it = attachments.constBegin(); it != attachments.constEnd(); ++it ) {
+ TQByteArray data;
KURL url;
if ( mResource->kmailGetAttachment( url, mSubResource, mSernum, *it ) && !url.isEmpty() ) {
- QFile f( url.path() );
+ TQFile f( url.path() );
if ( f.open( IO_ReadOnly ) ) {
data = f.readAll();
- QString mimeType;
+ TQString mimeType;
if ( !mResource->kmailAttachmentMimetype( mimeType, mSubResource, mSernum, *it ) )
mimeType = "application/octet-stream";
KCal::Attachment *a = new KCal::Attachment( KCodecs::base64Encode( data ).data(), mimeType );
@@ -834,9 +834,9 @@ void Incidence::loadAttachments()
}
}
-QString Incidence::productID() const
+TQString Incidence::productID() const
{
- return QString( "KOrganizer " ) + korgVersion + ", Kolab resource";
+ return TQString( "KOrganizer " ) + korgVersion + ", Kolab resource";
}
// Unhandled KCal::Incidence fields:
diff --git a/kresources/kolab/kcal/incidence.h b/kresources/kolab/kcal/incidence.h
index de549328e..e8f8b9fa8 100644
--- a/kresources/kolab/kcal/incidence.h
+++ b/kresources/kolab/kcal/incidence.h
@@ -55,46 +55,46 @@ namespace Kolab {
class Incidence : public KolabBase {
public:
struct Recurrence {
- QString cycle;
- QString type;
+ TQString cycle;
+ TQString type;
int interval;
- QStringList days; // list of days-of-the-week
- QString dayNumber;
- QString month;
- QString rangeType;
- QString range; // date or number or nothing
- QValueList<QDate> exclusions;
+ TQStringList days; // list of days-of-the-week
+ TQString dayNumber;
+ TQString month;
+ TQString rangeType;
+ TQString range; // date or number or nothing
+ TQValueList<TQDate> exclusions;
};
struct Attendee : Email {
Attendee() : requestResponse( true ), invitationSent( false ) {}
- QString status;
+ TQString status;
bool requestResponse;
bool invitationSent;
- QString role;
- QString delegate;
- QString delegator;
+ TQString role;
+ TQString delegate;
+ TQString delegator;
};
- explicit Incidence( KCal::ResourceKolab *res, const QString &subResource, Q_UINT32 sernum,
- const QString& tz );
+ explicit Incidence( KCal::ResourceKolab *res, const TQString &subResource, Q_UINT32 sernum,
+ const TQString& tz );
virtual ~Incidence();
void saveTo( KCal::Incidence* incidence );
- virtual void setSummary( const QString& summary );
- virtual QString summary() const;
+ virtual void setSummary( const TQString& summary );
+ virtual TQString summary() const;
- virtual void setLocation( const QString& location );
- virtual QString location() const;
+ virtual void setLocation( const TQString& location );
+ virtual TQString location() const;
virtual void setOrganizer( const Email& organizer );
virtual Email organizer() const;
- virtual void setStartDate( const QDateTime& startDate );
- virtual void setStartDate( const QDate& startDate );
- virtual void setStartDate( const QString& startDate );
- virtual QDateTime startDate() const;
+ virtual void setStartDate( const TQDateTime& startDate );
+ virtual void setStartDate( const TQDate& startDate );
+ virtual void setStartDate( const TQString& startDate );
+ virtual TQDateTime startDate() const;
virtual void setAlarm( float alarm );
virtual float alarm() const;
@@ -103,8 +103,8 @@ public:
virtual Recurrence recurrence() const;
virtual void addAttendee( const Attendee& attendee );
- QValueList<Attendee>& attendees();
- const QValueList<Attendee>& attendees() const;
+ TQValueList<Attendee>& attendees();
+ const TQValueList<Attendee>& attendees() const;
/**
* The internal uid is used as the uid inside KOrganizer whenever
@@ -112,17 +112,17 @@ public:
* can't handle. To avoid keep that interal uid from changing all the
* time, it is persisted in the XML between a save and the next load.
*/
- void setInternalUID( const QString& iuid );
- QString internalUID() const;
+ void setInternalUID( const TQString& iuid );
+ TQString internalUID() const;
virtual void setRevision( int );
virtual int revision() const;
// Load the attributes of this class
- virtual bool loadAttribute( QDomElement& );
+ virtual bool loadAttribute( TQDomElement& );
// Save the attributes of this class
- virtual bool saveAttributes( QDomElement& ) const;
+ virtual bool saveAttributes( TQDomElement& ) const;
protected:
enum FloatingStatus { Unset, AllDay, HasTime };
@@ -130,42 +130,42 @@ protected:
// Read all known fields from this ical incidence
void setFields( const KCal::Incidence* );
- bool loadAttendeeAttribute( QDomElement&, Attendee& );
- void saveAttendeeAttribute( QDomElement& element,
+ bool loadAttendeeAttribute( TQDomElement&, Attendee& );
+ void saveAttendeeAttribute( TQDomElement& element,
const Attendee& attendee ) const;
- void saveAttendees( QDomElement& element ) const;
- void saveAttachments( QDomElement& element ) const;
+ void saveAttendees( TQDomElement& element ) const;
+ void saveAttachments( TQDomElement& element ) const;
- void loadRecurrence( const QDomElement& element );
- void saveRecurrence( QDomElement& element ) const;
- void saveCustomAttributes( QDomElement& element ) const;
- void loadCustomAttributes( QDomElement& element );
+ void loadRecurrence( const TQDomElement& element );
+ void saveRecurrence( TQDomElement& element ) const;
+ void saveCustomAttributes( TQDomElement& element ) const;
+ void loadCustomAttributes( TQDomElement& element );
void loadAttachments();
- QString productID() const;
+ TQString productID() const;
- QString mSummary;
- QString mLocation;
+ TQString mSummary;
+ TQString mLocation;
Email mOrganizer;
- QDateTime mStartDate;
+ TQDateTime mStartDate;
FloatingStatus mFloatingStatus;
float mAlarm;
bool mHasAlarm;
Recurrence mRecurrence;
- QValueList<Attendee> mAttendees;
- QValueList<KCal::Attachment*> mAttachments;
- QString mInternalUID;
+ TQValueList<Attendee> mAttendees;
+ TQValueList<KCal::Attachment*> mAttachments;
+ TQString mInternalUID;
int mRevision;
struct Custom {
- QCString key;
- QString value;
+ TQCString key;
+ TQString value;
};
- QValueList<Custom> mCustomList;
+ TQValueList<Custom> mCustomList;
KCal::ResourceKolab *mResource;
- QString mSubResource;
+ TQString mSubResource;
Q_UINT32 mSernum;
};
diff --git a/kresources/kolab/kcal/journal.cpp b/kresources/kolab/kcal/journal.cpp
index 45b91587d..462cfe3ca 100644
--- a/kresources/kolab/kcal/journal.cpp
+++ b/kresources/kolab/kcal/journal.cpp
@@ -40,7 +40,7 @@
using namespace Kolab;
-KCal::Journal* Journal::xmlToJournal( const QString& xml, const QString& tz )
+KCal::Journal* Journal::xmlToJournal( const TQString& xml, const TQString& tz )
{
Journal journal( tz );
journal.load( xml );
@@ -49,13 +49,13 @@ KCal::Journal* Journal::xmlToJournal( const QString& xml, const QString& tz )
return kcalJournal;
}
-QString Journal::journalToXML( KCal::Journal* kcalJournal, const QString& tz )
+TQString Journal::journalToXML( KCal::Journal* kcalJournal, const TQString& tz )
{
Journal journal( tz, kcalJournal );
return journal.saveXML();
}
-Journal::Journal( const QString& tz, KCal::Journal* journal )
+Journal::Journal( const TQString& tz, KCal::Journal* journal )
: KolabBase( tz )
{
if ( journal )
@@ -66,39 +66,39 @@ Journal::~Journal()
{
}
-void Journal::setSummary( const QString& summary )
+void Journal::setSummary( const TQString& summary )
{
mSummary = summary;
}
-QString Journal::summary() const
+TQString Journal::summary() const
{
return mSummary;
}
-void Journal::setStartDate( const QDateTime& startDate )
+void Journal::setStartDate( const TQDateTime& startDate )
{
mStartDate = startDate;
}
-QDateTime Journal::startDate() const
+TQDateTime Journal::startDate() const
{
return mStartDate;
}
-void Journal::setEndDate( const QDateTime& endDate )
+void Journal::setEndDate( const TQDateTime& endDate )
{
mEndDate = endDate;
}
-QDateTime Journal::endDate() const
+TQDateTime Journal::endDate() const
{
return mEndDate;
}
-bool Journal::loadAttribute( QDomElement& element )
+bool Journal::loadAttribute( TQDomElement& element )
{
- QString tagName = element.tagName();
+ TQString tagName = element.tagName();
if ( tagName == "summary" )
setSummary( element.text() );
@@ -112,7 +112,7 @@ bool Journal::loadAttribute( QDomElement& element )
return true;
}
-bool Journal::saveAttributes( QDomElement& element ) const
+bool Journal::saveAttributes( TQDomElement& element ) const
{
// Save the base class elements
KolabBase::saveAttributes( element );
@@ -124,9 +124,9 @@ bool Journal::saveAttributes( QDomElement& element ) const
}
-bool Journal::loadXML( const QDomDocument& document )
+bool Journal::loadXML( const TQDomDocument& document )
{
- QDomElement top = document.documentElement();
+ TQDomElement top = document.documentElement();
if ( top.tagName() != "journal" ) {
qWarning( "XML error: Top tag was %s instead of the expected Journal",
@@ -134,11 +134,11 @@ bool Journal::loadXML( const QDomDocument& document )
return false;
}
- for ( QDomNode n = top.firstChild(); !n.isNull(); n = n.nextSibling() ) {
+ for ( TQDomNode n = top.firstChild(); !n.isNull(); n = n.nextSibling() ) {
if ( n.isComment() )
continue;
if ( n.isElement() ) {
- QDomElement e = n.toElement();
+ TQDomElement e = n.toElement();
if ( !loadAttribute( e ) ) {
// Unhandled tag - save for later storage
//qDebug( "Unhandled tag: %s", e.toCString().data() );
@@ -150,10 +150,10 @@ bool Journal::loadXML( const QDomDocument& document )
return true;
}
-QString Journal::saveXML() const
+TQString Journal::saveXML() const
{
- QDomDocument document = domTree();
- QDomElement element = document.createElement( "journal" );
+ TQDomDocument document = domTree();
+ TQDomElement element = document.createElement( "journal" );
element.setAttribute( "version", "1.0" );
saveAttributes( element );
document.appendChild( element );
@@ -178,7 +178,7 @@ void Journal::setFields( const KCal::Journal* journal )
setStartDate( localToUTC( journal->dtStart() ) );
}
-QString Journal::productID() const
+TQString Journal::productID() const
{
- return QString( "KOrganizer " ) + korgVersion + ", Kolab resource";
+ return TQString( "KOrganizer " ) + korgVersion + ", Kolab resource";
}
diff --git a/kresources/kolab/kcal/journal.h b/kresources/kolab/kcal/journal.h
index d8b09bb96..7505e0703 100644
--- a/kresources/kolab/kcal/journal.h
+++ b/kresources/kolab/kcal/journal.h
@@ -54,48 +54,48 @@ class Journal : public KolabBase {
public:
/// Use this to parse an xml string to a journal entry
/// The caller is responsible for deleting the returned journal
- static KCal::Journal* xmlToJournal( const QString& xml, const QString& tz );
+ static KCal::Journal* xmlToJournal( const TQString& xml, const TQString& tz );
/// Use this to get an xml string describing this journal entry
- static QString journalToXML( KCal::Journal*, const QString& tz );
+ static TQString journalToXML( KCal::Journal*, const TQString& tz );
- explicit Journal( const QString& tz, KCal::Journal* journal = 0 );
+ explicit Journal( const TQString& tz, KCal::Journal* journal = 0 );
virtual ~Journal();
- virtual QString type() const { return "Journal"; }
+ virtual TQString type() const { return "Journal"; }
void saveTo( KCal::Journal* journal );
- virtual void setSummary( const QString& summary );
- virtual QString summary() const;
+ virtual void setSummary( const TQString& summary );
+ virtual TQString summary() const;
- virtual void setStartDate( const QDateTime& startDate );
- virtual QDateTime startDate() const;
+ virtual void setStartDate( const TQDateTime& startDate );
+ virtual TQDateTime startDate() const;
- virtual void setEndDate( const QDateTime& endDate );
- virtual QDateTime endDate() const;
+ virtual void setEndDate( const TQDateTime& endDate );
+ virtual TQDateTime endDate() const;
// Load the attributes of this class
- virtual bool loadAttribute( QDomElement& );
+ virtual bool loadAttribute( TQDomElement& );
// Save the attributes of this class
- virtual bool saveAttributes( QDomElement& ) const;
+ virtual bool saveAttributes( TQDomElement& ) const;
// Load this journal by reading the XML file
- virtual bool loadXML( const QDomDocument& xml );
+ virtual bool loadXML( const TQDomDocument& xml );
// Serialize this journal to an XML string
- virtual QString saveXML() const;
+ virtual TQString saveXML() const;
protected:
// Read all known fields from this ical journal
void setFields( const KCal::Journal* );
- QString productID() const;
+ TQString productID() const;
- QString mSummary;
- QDateTime mStartDate;
- QDateTime mEndDate;
+ TQString mSummary;
+ TQDateTime mStartDate;
+ TQDateTime mEndDate;
};
}
diff --git a/kresources/kolab/kcal/resourcekolab.cpp b/kresources/kolab/kcal/resourcekolab.cpp
index 3c1c80e10..b61b12110 100644
--- a/kresources/kolab/kcal/resourcekolab.cpp
+++ b/kresources/kolab/kcal/resourcekolab.cpp
@@ -50,10 +50,10 @@
#include <ktempfile.h>
#include <kmdcodec.h>
-#include <qfile.h>
-#include <qobject.h>
-#include <qtimer.h>
-#include <qapplication.h>
+#include <tqfile.h>
+#include <tqobject.h>
+#include <tqtimer.h>
+#include <tqapplication.h>
#include <assert.h>
@@ -71,12 +71,12 @@ static const char* incidenceInlineMimeType = "text/calendar";
ResourceKolab::ResourceKolab( const KConfig *config )
: ResourceCalendar( config ), ResourceKolabBase( "ResourceKolab-libkcal" ),
- mCalendar( QString::fromLatin1("UTC") ), mOpen( false ),mResourceChangedTimer( 0,
+ mCalendar( TQString::fromLatin1("UTC") ), mOpen( false ),mResourceChangedTimer( 0,
"mResourceChangedTimer" )
{
setType( "imap" );
- connect( &mResourceChangedTimer, SIGNAL( timeout() ),
- this, SLOT( slotEmitResourceChanged() ) );
+ connect( &mResourceChangedTimer, TQT_SIGNAL( timeout() ),
+ this, TQT_SLOT( slotEmitResourceChanged() ) );
}
ResourceKolab::~ResourceKolab()
@@ -89,8 +89,8 @@ ResourceKolab::~ResourceKolab()
}
void ResourceKolab::loadSubResourceConfig( KConfig& config,
- const QString& name,
- const QString& label,
+ const TQString& name,
+ const TQString& label,
bool writable,
bool alarmRelevant,
ResourceMap& subResource )
@@ -105,11 +105,11 @@ bool ResourceKolab::openResource( KConfig& config, const char* contentType,
ResourceMap& map )
{
// Read the subresource entries from KMail
- QValueList<KMailICalIface::SubResource> subResources;
+ TQValueList<KMailICalIface::SubResource> subResources;
if ( !kmailSubresources( subResources, contentType ) )
return false;
map.clear();
- QValueList<KMailICalIface::SubResource>::ConstIterator it;
+ TQValueList<KMailICalIface::SubResource>::ConstIterator it;
for ( it = subResources.begin(); it != subResources.end(); ++it )
loadSubResourceConfig( config, (*it).location, (*it).label, (*it).writable,
(*it).alarmRelevant, map );
@@ -154,7 +154,7 @@ void ResourceKolab::doClose()
closeResource( config, mJournalSubResources );
}
-bool ResourceKolab::loadSubResource( const QString& subResource,
+bool ResourceKolab::loadSubResource( const TQString& subResource,
const char* mimetype )
{
int count = 0;
@@ -168,10 +168,10 @@ bool ResourceKolab::loadSubResource( const QString& subResource,
const int nbMessages = 200; // read 200 mails at a time (see kabc resource)
- const QString labelTxt = !strcmp(mimetype, "application/x-vnd.kolab.task") ? i18n( "Loading tasks..." )
+ const TQString labelTxt = !strcmp(mimetype, "application/x-vnd.kolab.task") ? i18n( "Loading tasks..." )
: !strcmp(mimetype, "application/x-vnd.kolab.journal") ? i18n( "Loading journals..." )
: i18n( "Loading events..." );
- const bool useProgress = qApp && qApp->type() != QApplication::Tty && count > mProgressDialogIncidenceLimit;
+ const bool useProgress = qApp && qApp->type() != TQApplication::Tty && count > mProgressDialogIncidenceLimit;
if ( useProgress )
(void)::Observer::self(); // ensure kio_uiserver is running
UIServer_stub uiserver( "kio_uiserver", "UIServer" );
@@ -184,7 +184,7 @@ bool ResourceKolab::loadSubResource( const QString& subResource,
}
for ( int startIndex = 0; startIndex < count; startIndex += nbMessages ) {
- QMap<Q_UINT32, QString> lst;
+ TQMap<Q_UINT32, TQString> lst;
if ( !kmailIncidences( lst, mimetype, subResource, startIndex, nbMessages ) ) {
kdError(5650) << "Communication problem in ResourceKolab::load()\n";
if ( progressId )
@@ -194,7 +194,7 @@ bool ResourceKolab::loadSubResource( const QString& subResource,
{ // for RAII scoping below
TemporarySilencer t( this );
- for( QMap<Q_UINT32, QString>::ConstIterator it = lst.begin(); it != lst.end(); ++it ) {
+ for( TQMap<Q_UINT32, TQString>::ConstIterator it = lst.begin(); it != lst.end(); ++it ) {
addIncidence( mimetype, it.data(), subResource, it.key() );
}
}
@@ -266,7 +266,7 @@ bool ResourceKolab::loadAllJournals()
return kolabStyle && icalStyle;
}
-void ResourceKolab::removeIncidences( const QCString& incidenceType )
+void ResourceKolab::removeIncidences( const TQCString& incidenceType )
{
Kolab::UidMap::Iterator mapIt = mUidMap.begin();
while ( mapIt != mUidMap.end() )
@@ -278,7 +278,7 @@ void ResourceKolab::removeIncidences( const QCString& incidenceType )
// A faster but hackish way would probably be to check the type of the resource,
// like mEventSubResources.find( it.data().resource() ) != mEventSubResources.end() ?
- const QString& uid = it.key();
+ const TQString& uid = it.key();
if ( incidenceType == "Event" && mCalendar.event( uid ) )
mUidMap.remove( it );
else if ( incidenceType == "Todo" && mCalendar.todo( uid ) )
@@ -299,7 +299,7 @@ bool ResourceKolab::doSave()
}
void ResourceKolab::incidenceUpdatedSilent( KCal::IncidenceBase* incidencebase)
{
- const QString uid = incidencebase->uid();
+ const TQString uid = incidencebase->uid();
//kdDebug() << k_funcinfo << uid << endl;
if ( mUidsPendingUpdate.contains( uid ) || mUidsPendingAdding.contains( uid ) ) {
@@ -310,7 +310,7 @@ void ResourceKolab::incidenceUpdatedSilent( KCal::IncidenceBase* incidencebase)
return;
}
- QString subResource;
+ TQString subResource;
Q_UINT32 sernum = 0;
if ( mUidMap.contains( uid ) ) {
subResource = mUidMap[ uid ].resource();
@@ -324,7 +324,7 @@ void ResourceKolab::incidenceUpdated( KCal::IncidenceBase* incidencebase )
{
if ( incidencebase->isReadOnly() ) return;
incidencebase->setSyncStatusSilent( KCal::Event::SYNCMOD );
- incidencebase->setLastModified( QDateTime::currentDateTime() );
+ incidencebase->setLastModified( TQDateTime::currentDateTime() );
// we should probably update the revision number here,
// or internally in the Event itself when certain things change.
// need to verify with ical documentation.
@@ -332,7 +332,7 @@ void ResourceKolab::incidenceUpdated( KCal::IncidenceBase* incidencebase )
}
-void ResourceKolab::resolveConflict( KCal::Incidence* inc, const QString& subresource, Q_UINT32 sernum )
+void ResourceKolab::resolveConflict( KCal::Incidence* inc, const TQString& subresource, Q_UINT32 sernum )
{
if ( ! inc )
return;
@@ -341,7 +341,7 @@ void ResourceKolab::resolveConflict( KCal::Incidence* inc, const QString& subres
delete inc;
return;
}
- const QString origUid = inc->uid();
+ const TQString origUid = inc->uid();
Incidence* local = mCalendar.incidence( origUid );
Incidence* localIncidence = 0;
Incidence* addedIncidence = 0;
@@ -354,7 +354,7 @@ void ResourceKolab::resolveConflict( KCal::Incidence* inc, const QString& subres
KIncidenceChooser* ch = new KIncidenceChooser();
ch->setIncidence( local ,inc );
if ( KIncidenceChooser::chooseMode == KIncidenceChooser::ask ) {
- connect ( this, SIGNAL( useGlobalMode() ), ch, SLOT ( useGlobalMode() ) );
+ connect ( this, TQT_SIGNAL( useGlobalMode() ), ch, TQT_SLOT ( useGlobalMode() ) );
if ( ch->exec() )
if ( KIncidenceChooser::chooseMode != KIncidenceChooser::ask )
emit useGlobalMode() ;
@@ -390,8 +390,8 @@ void ResourceKolab::resolveConflict( KCal::Incidence* inc, const QString& subres
}
mSilent = silent;
}
-void ResourceKolab::addIncidence( const char* mimetype, const QString& data,
- const QString& subResource, Q_UINT32 sernum )
+void ResourceKolab::addIncidence( const char* mimetype, const TQString& data,
+ const TQString& subResource, Q_UINT32 sernum )
{
// This uses pointer comparison, so it only works if we use the static
// objects defined in the top of the file
@@ -408,12 +408,12 @@ void ResourceKolab::addIncidence( const char* mimetype, const QString& data,
}
-bool ResourceKolab::sendKMailUpdate( KCal::IncidenceBase* incidencebase, const QString& subresource,
+bool ResourceKolab::sendKMailUpdate( KCal::IncidenceBase* incidencebase, const TQString& subresource,
Q_UINT32 sernum )
{
- const QString& type = incidencebase->type();
+ const TQString& type = incidencebase->type();
const char* mimetype = 0;
- QString data;
+ TQString data;
bool isXMLStorageFormat = kmailStorageFormat( subresource ) == KMailICalIface::StorageXML;
if ( type == "Event" ) {
if( isXMLStorageFormat ) {
@@ -454,11 +454,11 @@ bool ResourceKolab::sendKMailUpdate( KCal::IncidenceBase* incidencebase, const Q
KCal::Incidence* incidence = static_cast<KCal::Incidence *>( incidencebase );
KCal::Attachment::List atts = incidence->attachments();
- QStringList attURLs, attMimeTypes, attNames;
- QValueList<KTempFile*> tmpFiles;
+ TQStringList attURLs, attMimeTypes, attNames;
+ TQValueList<KTempFile*> tmpFiles;
for ( KCal::Attachment::List::ConstIterator it = atts.constBegin(); it != atts.constEnd(); ++it ) {
KTempFile* tempFile = new KTempFile;
- QCString decoded = KCodecs::base64Decode( QCString( (*it)->data() ) );
+ TQCString decoded = KCodecs::base64Decode( TQCString( (*it)->data() ) );
tempFile->file()->writeBlock( decoded.data(), decoded.length() );
tempFile->close();
KURL url;
@@ -467,9 +467,9 @@ bool ResourceKolab::sendKMailUpdate( KCal::IncidenceBase* incidencebase, const Q
attMimeTypes.append( (*it)->mimeType() );
attNames.append( (*it)->label() );
}
- QStringList deletedAtts;
+ TQStringList deletedAtts;
if ( kmailListAttachments( deletedAtts, subresource, sernum ) ) {
- for ( QStringList::ConstIterator it = attNames.constBegin(); it != attNames.constEnd(); ++it ) {
+ for ( TQStringList::ConstIterator it = attNames.constBegin(); it != attNames.constEnd(); ++it ) {
deletedAtts.remove( *it );
}
}
@@ -477,7 +477,7 @@ bool ResourceKolab::sendKMailUpdate( KCal::IncidenceBase* incidencebase, const Q
if ( incidence->schedulingID() != incidence->uid() )
customHeaders.insert( "X-Kolab-SchedulingID", incidence->schedulingID() );
- QString subject = incidencebase->uid();
+ TQString subject = incidencebase->uid();
if ( !isXMLStorageFormat ) subject.prepend( "iCal " ); // conform to the old style
// behold, sernum is an in-parameter
@@ -487,7 +487,7 @@ bool ResourceKolab::sendKMailUpdate( KCal::IncidenceBase* incidencebase, const Q
mUidMap[ incidencebase->uid() ].setSerialNumber( sernum );
}
- for( QValueList<KTempFile *>::Iterator it = tmpFiles.begin(); it != tmpFiles.end(); ++it ) {
+ for( TQValueList<KTempFile *>::Iterator it = tmpFiles.begin(); it != tmpFiles.end(); ++it ) {
(*it)->setAutoDelete( true );
delete (*it);
}
@@ -495,17 +495,17 @@ bool ResourceKolab::sendKMailUpdate( KCal::IncidenceBase* incidencebase, const Q
return rc;
}
-bool ResourceKolab::addIncidence( KCal::Incidence* incidence, const QString& _subresource,
+bool ResourceKolab::addIncidence( KCal::Incidence* incidence, const TQString& _subresource,
Q_UINT32 sernum )
{
Q_ASSERT( incidence );
if ( !incidence ) return false;
- QString uid = incidence->uid();
- QString subResource = _subresource;
+ TQString uid = incidence->uid();
+ TQString subResource = _subresource;
Kolab::ResourceMap *map = &mEventSubResources; // don't use a ref here!
- const QString& type = incidence->type();
+ const TQString& type = incidence->type();
if ( type == "Event" )
map = &mEventSubResources;
else if ( type == "Todo" )
@@ -520,7 +520,7 @@ bool ResourceKolab::addIncidence( KCal::Incidence* incidence, const QString& _su
bool newIncidence = _subresource.isEmpty();
if ( newIncidence ) {
// Add a description of the incidence
- QString text = "<b><font size=\"+1\">";
+ TQString text = "<b><font size=\"+1\">";
if ( incidence->type() == "Event" )
text += i18n( "Choose the folder where you want to store this event" );
else if ( incidence->type() == "Todo" )
@@ -642,10 +642,10 @@ bool ResourceKolab::addEvent( KCal::Event* event )
if ( mUidMap.contains( event->uid() ) )
return true; //noop
else
- return addIncidence( event, QString::null, 0 );
+ return addIncidence( event, TQString::null, 0 );
}
-void ResourceKolab::addEvent( const QString& xml, const QString& subresource,
+void ResourceKolab::addEvent( const TQString& xml, const TQString& subresource,
Q_UINT32 sernum )
{
KCal::Event* event = Kolab::Event::xmlToEvent( xml, mCalendar.timeZoneId(), this, subresource, sernum );
@@ -659,7 +659,7 @@ bool ResourceKolab::deleteIncidence( KCal::Incidence* incidence )
{
if ( incidence->isReadOnly() ) return false;
- const QString uid = incidence->uid();
+ const TQString uid = incidence->uid();
if( !mUidMap.contains( uid ) ) return false; // Odd
/* The user told us to delete, tell KMail */
if ( !mSilent ) {
@@ -680,7 +680,7 @@ bool ResourceKolab::deleteEvent( KCal::Event* event )
return deleteIncidence( event );
}
-KCal::Event* ResourceKolab::event( const QString& uid )
+KCal::Event* ResourceKolab::event( const TQString& uid )
{
return mCalendar.event(uid);
}
@@ -690,20 +690,20 @@ KCal::Event::List ResourceKolab::rawEvents( EventSortField sortField, SortDirect
return mCalendar.rawEvents( sortField, sortDirection );
}
-KCal::Event::List ResourceKolab::rawEventsForDate( const QDate& date,
+KCal::Event::List ResourceKolab::rawEventsForDate( const TQDate& date,
EventSortField sortField,
SortDirection sortDirection )
{
return mCalendar.rawEventsForDate( date, sortField, sortDirection );
}
-KCal::Event::List ResourceKolab::rawEventsForDate( const QDateTime& qdt )
+KCal::Event::List ResourceKolab::rawEventsForDate( const TQDateTime& qdt )
{
return mCalendar.rawEventsForDate( qdt );
}
-KCal::Event::List ResourceKolab::rawEvents( const QDate& start,
- const QDate& end,
+KCal::Event::List ResourceKolab::rawEvents( const TQDate& start,
+ const TQDate& end,
bool inclusive )
{
return mCalendar.rawEvents( start, end, inclusive );
@@ -714,10 +714,10 @@ bool ResourceKolab::addTodo( KCal::Todo* todo )
if ( mUidMap.contains( todo->uid() ) )
return true; //noop
else
- return addIncidence( todo, QString::null, 0 );
+ return addIncidence( todo, TQString::null, 0 );
}
-void ResourceKolab::addTodo( const QString& xml, const QString& subresource,
+void ResourceKolab::addTodo( const TQString& xml, const TQString& subresource,
Q_UINT32 sernum )
{
KCal::Todo* todo = Kolab::Task::xmlToTask( xml, mCalendar.timeZoneId(), this, subresource, sernum );
@@ -731,7 +731,7 @@ bool ResourceKolab::deleteTodo( KCal::Todo* todo )
return deleteIncidence( todo );
}
-KCal::Todo* ResourceKolab::todo( const QString& uid )
+KCal::Todo* ResourceKolab::todo( const TQString& uid )
{
return mCalendar.todo( uid );
}
@@ -741,7 +741,7 @@ KCal::Todo::List ResourceKolab::rawTodos( TodoSortField sortField, SortDirection
return mCalendar.rawTodos( sortField, sortDirection );
}
-KCal::Todo::List ResourceKolab::rawTodosForDate( const QDate& date )
+KCal::Todo::List ResourceKolab::rawTodosForDate( const TQDate& date )
{
return mCalendar.rawTodosForDate( date );
}
@@ -751,10 +751,10 @@ bool ResourceKolab::addJournal( KCal::Journal* journal )
if ( mUidMap.contains( journal->uid() ) )
return true; //noop
else
- return addIncidence( journal, QString::null, 0 );
+ return addIncidence( journal, TQString::null, 0 );
}
-void ResourceKolab::addJournal( const QString& xml, const QString& subresource,
+void ResourceKolab::addJournal( const TQString& xml, const TQString& subresource,
Q_UINT32 sernum )
{
KCal::Journal* journal =
@@ -770,7 +770,7 @@ bool ResourceKolab::deleteJournal( KCal::Journal* journal )
return deleteIncidence( journal );
}
-KCal::Journal* ResourceKolab::journal( const QString& uid )
+KCal::Journal* ResourceKolab::journal( const TQString& uid )
{
return mCalendar.journal(uid);
}
@@ -780,7 +780,7 @@ KCal::Journal::List ResourceKolab::rawJournals( JournalSortField sortField, Sort
return mCalendar.rawJournals( sortField, sortDirection );
}
-KCal::Journal::List ResourceKolab::rawJournalsForDate( const QDate &date )
+KCal::Journal::List ResourceKolab::rawJournalsForDate( const TQDate &date )
{
return mCalendar.rawJournalsForDate( date );
}
@@ -792,9 +792,9 @@ KCal::Alarm::List ResourceKolab::relevantAlarms( const KCal::Alarm::List &alarms
while ( it != alarms.end() ) {
KCal::Alarm *a = (*it);
++it;
- const QString &uid = a->parent()->uid();
+ const TQString &uid = a->parent()->uid();
if ( mUidMap.contains( uid ) ) {
- const QString &sr = mUidMap[ uid ].resource();
+ const TQString &sr = mUidMap[ uid ].resource();
Kolab::SubResource *subResource = 0;
if ( mEventSubResources.contains( sr ) )
subResource = &( mEventSubResources[ sr ] );
@@ -813,28 +813,28 @@ KCal::Alarm::List ResourceKolab::relevantAlarms( const KCal::Alarm::List &alarms
-KCal::Alarm::List ResourceKolab::alarms( const QDateTime& from,
- const QDateTime& to )
+KCal::Alarm::List ResourceKolab::alarms( const TQDateTime& from,
+ const TQDateTime& to )
{
return relevantAlarms( mCalendar.alarms( from, to ) );
}
-KCal::Alarm::List ResourceKolab::alarmsTo( const QDateTime& to )
+KCal::Alarm::List ResourceKolab::alarmsTo( const TQDateTime& to )
{
return relevantAlarms( mCalendar.alarmsTo(to) );
}
-void ResourceKolab::setTimeZoneId( const QString& tzid )
+void ResourceKolab::setTimeZoneId( const TQString& tzid )
{
mCalendar.setTimeZoneId( tzid );
mFormat.setTimeZone( mCalendar.timeZoneId(), !mCalendar.isLocalTime() );
}
-bool ResourceKolab::fromKMailAddIncidence( const QString& type,
- const QString& subResource,
+bool ResourceKolab::fromKMailAddIncidence( const TQString& type,
+ const TQString& subResource,
Q_UINT32 sernum,
int format,
- const QString& data )
+ const TQString& data )
{
bool rc = true;
TemporarySilencer t( this ); // RAII
@@ -864,9 +864,9 @@ bool ResourceKolab::fromKMailAddIncidence( const QString& type,
return rc;
}
-void ResourceKolab::fromKMailDelIncidence( const QString& type,
- const QString& subResource,
- const QString& uid )
+void ResourceKolab::fromKMailDelIncidence( const TQString& type,
+ const TQString& subResource,
+ const TQString& uid )
{
if ( type != kmailCalendarContentsType && type != kmailTodoContentsType
&& type != kmailJournalContentsType )
@@ -892,8 +892,8 @@ void ResourceKolab::fromKMailDelIncidence( const QString& type,
}
}
-void ResourceKolab::fromKMailRefresh( const QString& type,
- const QString& /*subResource*/ )
+void ResourceKolab::fromKMailRefresh( const TQString& type,
+ const TQString& /*subResource*/ )
{
// TODO: Only load the specified subResource
if ( type == "Calendar" )
@@ -907,9 +907,9 @@ void ResourceKolab::fromKMailRefresh( const QString& type,
mResourceChangedTimer.changeInterval( 100 );
}
-void ResourceKolab::fromKMailAddSubresource( const QString& type,
- const QString& subResource,
- const QString& label,
+void ResourceKolab::fromKMailAddSubresource( const TQString& type,
+ const TQString& subResource,
+ const TQString& label,
bool writable, bool alarmRelevant )
{
ResourceMap* map = 0;
@@ -941,8 +941,8 @@ void ResourceKolab::fromKMailAddSubresource( const QString& type,
emit signalSubresourceAdded( this, type, subResource, label );
}
-void ResourceKolab::fromKMailDelSubresource( const QString& type,
- const QString& subResource )
+void ResourceKolab::fromKMailDelSubresource( const TQString& type,
+ const TQString& subResource )
{
ResourceMap* map = subResourceMap( type );
if ( !map ) // not ours
@@ -963,7 +963,7 @@ void ResourceKolab::fromKMailDelSubresource( const QString& type,
emit signalSubresourceRemoved( this, type, subResource );
}
-QStringList ResourceKolab::subresources() const
+TQStringList ResourceKolab::subresources() const
{
// Workaround: The ResourceView in KOrganizer wants to know this
// before it opens the resource :-( Make sure we are open
@@ -974,7 +974,7 @@ QStringList ResourceKolab::subresources() const
}
const QString
-ResourceKolab::labelForSubresource( const QString& subresource ) const
+ResourceKolab::labelForSubresource( const TQString& subresource ) const
{
if ( mEventSubResources.contains( subresource ) )
return mEventSubResources[ subresource ].label();
@@ -985,16 +985,16 @@ ResourceKolab::labelForSubresource( const QString& subresource ) const
return subresource;
}
-void ResourceKolab::fromKMailAsyncLoadResult( const QMap<Q_UINT32, QString>& map,
- const QString& type,
- const QString& folder )
+void ResourceKolab::fromKMailAsyncLoadResult( const TQMap<Q_UINT32, TQString>& map,
+ const TQString& type,
+ const TQString& folder )
{
TemporarySilencer t( this );
- for( QMap<Q_UINT32, QString>::ConstIterator it = map.begin(); it != map.end(); ++it )
+ for( TQMap<Q_UINT32, TQString>::ConstIterator it = map.begin(); it != map.end(); ++it )
addIncidence( type.latin1(), it.data(), folder, it.key() );
}
-bool ResourceKolab::subresourceActive( const QString& subresource ) const
+bool ResourceKolab::subresourceActive( const TQString& subresource ) const
{
// Workaround: The ResourceView in KOrganizer wants to know this
// before it opens the resource :-( Make sure we are open
@@ -1013,7 +1013,7 @@ bool ResourceKolab::subresourceActive( const QString& subresource ) const
return true;
}
-void ResourceKolab::setSubresourceActive( const QString &subresource, bool v )
+void ResourceKolab::setSubresourceActive( const TQString &subresource, bool v )
{
ResourceMap *map = 0;
const char* mimeType = 0;
@@ -1054,7 +1054,7 @@ KABC::Lock* ResourceKolab::lock()
}
-Kolab::ResourceMap* ResourceKolab::subResourceMap( const QString& contentsType )
+Kolab::ResourceMap* ResourceKolab::subResourceMap( const TQString& contentsType )
{
if ( contentsType == kmailCalendarContentsType ) {
return &mEventSubResources;
@@ -1069,10 +1069,10 @@ Kolab::ResourceMap* ResourceKolab::subResourceMap( const QString& contentsType )
/*virtual*/
-bool ResourceKolab::addSubresource( const QString& resource, const QString& parent )
+bool ResourceKolab::addSubresource( const TQString& resource, const TQString& parent )
{
kdDebug(5650) << "KCal Kolab resource - adding subresource: " << resource << endl;
- QString contentsType = kmailCalendarContentsType;
+ TQString contentsType = kmailCalendarContentsType;
if ( !parent.isEmpty() ) {
if ( mEventSubResources.contains( parent ) )
contentsType = kmailCalendarContentsType;
@@ -1081,10 +1081,10 @@ bool ResourceKolab::addSubresource( const QString& resource, const QString& pare
else if ( mJournalSubResources.contains( parent ) )
contentsType = kmailJournalContentsType;
} else {
- QStringList contentTypeChoices;
+ TQStringList contentTypeChoices;
contentTypeChoices << i18n("Calendar") << i18n("Tasks") << i18n("Journals");
- const QString caption = i18n("Which kind of subresource should this be?");
- const QString choice = KInputDialog::getItem( caption, QString::null, contentTypeChoices );
+ const TQString caption = i18n("Which kind of subresource should this be?");
+ const TQString choice = KInputDialog::getItem( caption, TQString::null, contentTypeChoices );
if ( choice == contentTypeChoices[0] )
contentsType = kmailCalendarContentsType;
else if ( choice == contentTypeChoices[1] )
@@ -1097,27 +1097,27 @@ bool ResourceKolab::addSubresource( const QString& resource, const QString& pare
}
/*virtual*/
-bool ResourceKolab::removeSubresource( const QString& resource )
+bool ResourceKolab::removeSubresource( const TQString& resource )
{
kdDebug(5650) << "KCal Kolab resource - removing subresource: " << resource << endl;
return kmailRemoveSubresource( resource );
}
/*virtual*/
-QString ResourceKolab::subresourceIdentifier( Incidence *incidence )
+TQString ResourceKolab::subresourceIdentifier( Incidence *incidence )
{
- QString uid = incidence->uid();
+ TQString uid = incidence->uid();
if ( mUidMap.contains( uid ) )
return mUidMap[ uid ].resource();
else
if ( mNewIncidencesMap.contains( uid ) )
return mNewIncidencesMap[ uid ];
else
- return QString();
+ return TQString();
}
-bool ResourceKolab::unloadSubResource( const QString& subResource )
+bool ResourceKolab::unloadSubResource( const TQString& subResource )
{
const bool silent = mSilent;
mSilent = true;
@@ -1139,7 +1139,7 @@ bool ResourceKolab::unloadSubResource( const QString& subResource )
return true;
}
-QString ResourceKolab::subresourceType( const QString &resource )
+TQString ResourceKolab::subresourceType( const TQString &resource )
{
if ( mEventSubResources.contains( resource ) )
return "event";
@@ -1147,7 +1147,7 @@ QString ResourceKolab::subresourceType( const QString &resource )
return "todo";
if ( mJournalSubResources.contains( resource ) )
return "journal";
- return QString();
+ return TQString();
}
#include "resourcekolab.moc"
diff --git a/kresources/kolab/kcal/resourcekolab.h b/kresources/kolab/kcal/resourcekolab.h
index 0974e4ada..e68c2c6bf 100644
--- a/kresources/kolab/kcal/resourcekolab.h
+++ b/kresources/kolab/kcal/resourcekolab.h
@@ -35,7 +35,7 @@
#ifndef KCAL_RESOURCEKOLAB_H
#define KCAL_RESOURCEKOLAB_H
-#include <qtimer.h>
+#include <tqtimer.h>
#include <kdepimmacros.h>
#include <libkcal/calendarlocal.h>
@@ -72,71 +72,71 @@ public:
// The libkcal functions. See the resource for descriptions
bool addEvent( KCal::Event* anEvent );
bool deleteEvent( KCal::Event* );
- KCal::Event* event( const QString &UniqueStr );
+ KCal::Event* event( const TQString &UniqueStr );
KCal::Event::List rawEvents( EventSortField sortField = EventSortUnsorted, SortDirection sortDirection = SortDirectionAscending );
KCal::Event::List rawEventsForDate(
- const QDate& date,
+ const TQDate& date,
EventSortField sortField=EventSortUnsorted,
SortDirection sortDirection=SortDirectionAscending );
- KCal::Event::List rawEventsForDate( const QDateTime& qdt );
- KCal::Event::List rawEvents( const QDate& start, const QDate& end,
+ KCal::Event::List rawEventsForDate( const TQDateTime& qdt );
+ KCal::Event::List rawEvents( const TQDate& start, const TQDate& end,
bool inclusive = false );
bool addTodo( KCal::Todo* todo );
bool deleteTodo( KCal::Todo* );
- KCal::Todo* todo( const QString& uid );
+ KCal::Todo* todo( const TQString& uid );
KCal::Todo::List rawTodos( TodoSortField sortField = TodoSortUnsorted, SortDirection sortDirection = SortDirectionAscending );
- KCal::Todo::List rawTodosForDate( const QDate& date );
+ KCal::Todo::List rawTodosForDate( const TQDate& date );
bool addJournal( KCal::Journal* );
bool deleteJournal( KCal::Journal* );
- KCal::Journal* journal( const QString& uid );
+ KCal::Journal* journal( const TQString& uid );
KCal::Journal::List rawJournals( JournalSortField sortField = JournalSortUnsorted, SortDirection sortDirection = SortDirectionAscending );
- KCal::Journal::List rawJournalsForDate( const QDate &date );
+ KCal::Journal::List rawJournalsForDate( const TQDate &date );
- KCal::Alarm::List alarms( const QDateTime& from, const QDateTime& to );
- KCal::Alarm::List alarmsTo( const QDateTime& to );
+ KCal::Alarm::List alarms( const TQDateTime& from, const TQDateTime& to );
+ KCal::Alarm::List alarmsTo( const TQDateTime& to );
- void setTimeZoneId( const QString& tzid );
+ void setTimeZoneId( const TQString& tzid );
bool deleteIncidence( KCal::Incidence* i );
/// The ResourceKolabBase methods called by KMail
- bool fromKMailAddIncidence( const QString& type, const QString& subResource,
- Q_UINT32 sernum, int format, const QString& data );
- void fromKMailDelIncidence( const QString& type, const QString& subResource,
- const QString& uid );
- void fromKMailRefresh( const QString& type, const QString& subResource );
+ bool fromKMailAddIncidence( const TQString& type, const TQString& subResource,
+ Q_UINT32 sernum, int format, const TQString& data );
+ void fromKMailDelIncidence( const TQString& type, const TQString& subResource,
+ const TQString& uid );
+ void fromKMailRefresh( const TQString& type, const TQString& subResource );
/// Listen to KMail changes in the amount of sub resources
- void fromKMailAddSubresource( const QString& type, const QString& subResource,
- const QString& label, bool writable,
+ void fromKMailAddSubresource( const TQString& type, const TQString& subResource,
+ const TQString& label, bool writable,
bool alarmRelevant );
- void fromKMailDelSubresource( const QString& type, const QString& subResource );
+ void fromKMailDelSubresource( const TQString& type, const TQString& subResource );
- void fromKMailAsyncLoadResult( const QMap<Q_UINT32, QString>& map,
- const QString& type,
- const QString& folder );
+ void fromKMailAsyncLoadResult( const TQMap<Q_UINT32, TQString>& map,
+ const TQString& type,
+ const TQString& folder );
/** Return the list of subresources. */
- QStringList subresources() const;
+ TQStringList subresources() const;
bool canHaveSubresources() const { return true; }
/** Is this subresource active? */
- bool subresourceActive( const QString& ) const;
+ bool subresourceActive( const TQString& ) const;
/** (De)activate the subresource */
- virtual void setSubresourceActive( const QString &, bool );
+ virtual void setSubresourceActive( const TQString &, bool );
/** What is the label for this subresource? */
- virtual const QString labelForSubresource( const QString& resource ) const;
+ virtual const TQString labelForSubresource( const TQString& resource ) const;
- virtual QString subresourceIdentifier( Incidence *incidence );
+ virtual TQString subresourceIdentifier( Incidence *incidence );
- virtual bool addSubresource( const QString& resource, const QString& parent );
- virtual bool removeSubresource( const QString& resource );
+ virtual bool addSubresource( const TQString& resource, const TQString& parent );
+ virtual bool removeSubresource( const TQString& resource );
- virtual QString subresourceType( const QString &resource );
+ virtual TQString subresourceType( const TQString &resource );
KABC::Lock* lock();
@@ -152,19 +152,19 @@ protected:
KCal::Alarm::List relevantAlarms( const KCal::Alarm::List &alarms );
private:
- void removeIncidences( const QCString& incidenceType );
- void resolveConflict( KCal::Incidence*, const QString& subresource, Q_UINT32 sernum );
- void addIncidence( const char* mimetype, const QString& xml,
- const QString& subResource, Q_UINT32 sernum );
+ void removeIncidences( const TQCString& incidenceType );
+ void resolveConflict( KCal::Incidence*, const TQString& subresource, Q_UINT32 sernum );
+ void addIncidence( const char* mimetype, const TQString& xml,
+ const TQString& subResource, Q_UINT32 sernum );
- bool addIncidence( KCal::Incidence* i, const QString& subresource,
+ bool addIncidence( KCal::Incidence* i, const TQString& subresource,
Q_UINT32 sernum );
- void addEvent( const QString& xml, const QString& subresource,
+ void addEvent( const TQString& xml, const TQString& subresource,
Q_UINT32 sernum );
- void addTodo( const QString& xml, const QString& subresource,
+ void addTodo( const TQString& xml, const TQString& subresource,
Q_UINT32 sernum );
- void addJournal( const QString& xml, const QString& subresource,
+ void addJournal( const TQString& xml, const TQString& subresource,
Q_UINT32 sernum );
@@ -180,19 +180,19 @@ private:
bool openResource( KConfig& config, const char* contentType,
Kolab::ResourceMap& map );
- void loadSubResourceConfig( KConfig& config, const QString& name,
- const QString& label, bool writable,
+ void loadSubResourceConfig( KConfig& config, const TQString& name,
+ const TQString& label, bool writable,
bool alarmRelevant, Kolab::ResourceMap& subResource );
- bool loadSubResource( const QString& subResource, const char* mimetype );
- bool unloadSubResource( const QString& subResource );
+ bool loadSubResource( const TQString& subResource, const char* mimetype );
+ bool unloadSubResource( const TQString& subResource );
- QString configFile() const {
+ TQString configFile() const {
return ResourceKolabBase::configFile( "kcal" );
}
- Kolab::ResourceMap* subResourceMap( const QString& contentsType );
+ Kolab::ResourceMap* subResourceMap( const TQString& contentsType );
- bool sendKMailUpdate( KCal::IncidenceBase* incidence, const QString& _subresource,
+ bool sendKMailUpdate( KCal::IncidenceBase* incidence, const TQString& _subresource,
Q_UINT32 sernum );
@@ -202,8 +202,8 @@ private:
Kolab::ResourceMap mEventSubResources, mTodoSubResources, mJournalSubResources;
bool mOpen; // If the resource is open, this is true
- QDict<KCal::IncidenceBase> mPendingUpdates;
- QTimer mResourceChangedTimer;
+ TQDict<KCal::IncidenceBase> mPendingUpdates;
+ TQTimer mResourceChangedTimer;
ICalFormat mFormat;
/**
@@ -213,7 +213,7 @@ private:
We can't trust on mUidMap here, because it contains only non-pending uids.
*/
- QMap<QString, QString> mNewIncidencesMap;
+ TQMap<TQString, TQString> mNewIncidencesMap;
int mProgressDialogIncidenceLimit;
};
diff --git a/kresources/kolab/kcal/resourcekolab_plugin.cpp b/kresources/kolab/kcal/resourcekolab_plugin.cpp
index afc83e1d6..14d09465a 100644
--- a/kresources/kolab/kcal/resourcekolab_plugin.cpp
+++ b/kresources/kolab/kcal/resourcekolab_plugin.cpp
@@ -40,7 +40,7 @@ public:
return new KCal::ResourceKolab( config );
}
- KRES::ConfigWidget *configWidget( QWidget* )
+ KRES::ConfigWidget *configWidget( TQWidget* )
{
return 0;
}
diff --git a/kresources/kolab/kcal/task.cpp b/kresources/kolab/kcal/task.cpp
index b66c9827b..7bbdba978 100644
--- a/kresources/kolab/kcal/task.cpp
+++ b/kresources/kolab/kcal/task.cpp
@@ -39,8 +39,8 @@
using namespace Kolab;
-KCal::Todo* Task::xmlToTask( const QString& xml, const QString& tz, KCal::ResourceKolab *res,
- const QString& subResource, Q_UINT32 sernum )
+KCal::Todo* Task::xmlToTask( const TQString& xml, const TQString& tz, KCal::ResourceKolab *res,
+ const TQString& subResource, Q_UINT32 sernum )
{
Task task( res, subResource, sernum, tz );
task.load( xml );
@@ -49,14 +49,14 @@ KCal::Todo* Task::xmlToTask( const QString& xml, const QString& tz, KCal::Resour
return todo;
}
-QString Task::taskToXML( KCal::Todo* todo, const QString& tz )
+TQString Task::taskToXML( KCal::Todo* todo, const TQString& tz )
{
- Task task( 0, QString::null, 0, tz, todo );
+ Task task( 0, TQString::null, 0, tz, todo );
return task.saveXML();
}
-Task::Task( KCal::ResourceKolab *res, const QString &subResource, Q_UINT32 sernum,
- const QString& tz, KCal::Todo* task )
+Task::Task( KCal::ResourceKolab *res, const TQString &subResource, Q_UINT32 sernum,
+ const TQString& tz, KCal::Todo* task )
: Incidence( res, subResource, sernum, tz ),
mPriority( 5 ), mPercentCompleted( 0 ),
mStatus( KCal::Incidence::StatusNone ),
@@ -101,23 +101,23 @@ KCal::Incidence::Status Task::status() const
return mStatus;
}
-void Task::setParent( const QString& parentUid )
+void Task::setParent( const TQString& parentUid )
{
mParent = parentUid;
}
-QString Task::parent() const
+TQString Task::parent() const
{
return mParent;
}
-void Task::setDueDate( const QDateTime& date )
+void Task::setDueDate( const TQDateTime& date )
{
mDueDate = date;
mHasDueDate = true;
}
-QDateTime Task::dueDate() const
+TQDateTime Task::dueDate() const
{
return mDueDate;
}
@@ -137,13 +137,13 @@ bool Task::hasDueDate() const
return mHasDueDate;
}
-void Task::setCompletedDate( const QDateTime& date )
+void Task::setCompletedDate( const TQDateTime& date )
{
mCompletedDate = date;
mHasCompletedDate = true;
}
-QDateTime Task::completedDate() const
+TQDateTime Task::completedDate() const
{
return mCompletedDate;
}
@@ -153,9 +153,9 @@ bool Task::hasCompletedDate() const
return mHasCompletedDate;
}
-bool Task::loadAttribute( QDomElement& element )
+bool Task::loadAttribute( TQDomElement& element )
{
- QString tagName = element.tagName();
+ TQString tagName = element.tagName();
if ( tagName == "priority" ) {
bool ok;
@@ -198,13 +198,13 @@ bool Task::loadAttribute( QDomElement& element )
return true;
}
-bool Task::saveAttributes( QDomElement& element ) const
+bool Task::saveAttributes( TQDomElement& element ) const
{
// Save the base class elements
Incidence::saveAttributes( element );
- writeString( element, "priority", QString::number( priority() ) );
- writeString( element, "completed", QString::number( percentCompleted() ) );
+ writeString( element, "priority", TQString::number( priority() ) );
+ writeString( element, "completed", TQString::number( percentCompleted() ) );
switch( status() ) {
case KCal::Incidence::StatusInProcess:
@@ -245,9 +245,9 @@ bool Task::saveAttributes( QDomElement& element ) const
}
-bool Task::loadXML( const QDomDocument& document )
+bool Task::loadXML( const TQDomDocument& document )
{
- QDomElement top = document.documentElement();
+ TQDomElement top = document.documentElement();
if ( top.tagName() != "task" ) {
qWarning( "XML error: Top tag was %s instead of the expected task",
@@ -256,11 +256,11 @@ bool Task::loadXML( const QDomDocument& document )
}
setHasStartDate( false ); // todo's don't necessarily have one
- for ( QDomNode n = top.firstChild(); !n.isNull(); n = n.nextSibling() ) {
+ for ( TQDomNode n = top.firstChild(); !n.isNull(); n = n.nextSibling() ) {
if ( n.isComment() )
continue;
if ( n.isElement() ) {
- QDomElement e = n.toElement();
+ TQDomElement e = n.toElement();
if ( !loadAttribute( e ) )
// TODO: Unhandled tag - save for later storage
kdDebug() << "Warning: Unhandled tag " << e.tagName() << endl;
@@ -272,17 +272,17 @@ bool Task::loadXML( const QDomDocument& document )
return true;
}
-QString Task::saveXML() const
+TQString Task::saveXML() const
{
- QDomDocument document = domTree();
- QDomElement element = document.createElement( "task" );
+ TQDomDocument document = domTree();
+ TQDomElement element = document.createElement( "task" );
element.setAttribute( "version", "1.0" );
saveAttributes( element );
if ( !hasStartDate() ) {
// events and journals always have a start date, but tasks don't.
// Remove the entry done by the inherited save above, because we
// don't have one.
- QDomNodeList l = element.elementsByTagName( "start-date" );
+ TQDomNodeList l = element.elementsByTagName( "start-date" );
Q_ASSERT( l.count() == 1 );
element.removeChild( l.item( 0 ) );
}
@@ -308,7 +308,7 @@ void Task::setFields( const KCal::Todo* task )
else if ( !task->relatedToUid().isEmpty() )
setParent( task->relatedToUid() );
else
- setParent( QString::null );
+ setParent( TQString::null );
if ( task->hasCompletedDate() && task->percentComplete() == 100 )
setCompletedDate( localToUTC( task->completed() ) );
diff --git a/kresources/kolab/kcal/task.h b/kresources/kolab/kcal/task.h
index 96bcafd96..32095bcab 100644
--- a/kresources/kolab/kcal/task.h
+++ b/kresources/kolab/kcal/task.h
@@ -57,17 +57,17 @@ class Task : public Incidence {
public:
/// Use this to parse an xml string to a task entry
/// The caller is responsible for deleting the returned task
- static KCal::Todo* xmlToTask( const QString& xml, const QString& tz, KCal::ResourceKolab *res = 0,
- const QString& subResource = QString::null, Q_UINT32 sernum = 0 );
+ static KCal::Todo* xmlToTask( const TQString& xml, const TQString& tz, KCal::ResourceKolab *res = 0,
+ const TQString& subResource = TQString::null, Q_UINT32 sernum = 0 );
/// Use this to get an xml string describing this task entry
- static QString taskToXML( KCal::Todo*, const QString& tz );
+ static TQString taskToXML( KCal::Todo*, const TQString& tz );
- explicit Task( KCal::ResourceKolab *res, const QString& subResource, Q_UINT32 sernum,
- const QString& tz, KCal::Todo* todo = 0 );
+ explicit Task( KCal::ResourceKolab *res, const TQString& subResource, Q_UINT32 sernum,
+ const TQString& tz, KCal::Todo* todo = 0 );
virtual ~Task();
- virtual QString type() const { return "Task"; }
+ virtual TQString type() const { return "Task"; }
void saveTo( KCal::Todo* todo );
@@ -80,31 +80,31 @@ public:
virtual void setStatus( KCal::Incidence::Status status );
virtual KCal::Incidence::Status status() const;
- virtual void setParent( const QString& parentUid );
- virtual QString parent() const;
+ virtual void setParent( const TQString& parentUid );
+ virtual TQString parent() const;
virtual void setHasStartDate( bool );
virtual bool hasStartDate() const;
- virtual void setDueDate( const QDateTime& date );
- virtual QDateTime dueDate() const;
+ virtual void setDueDate( const TQDateTime& date );
+ virtual TQDateTime dueDate() const;
virtual bool hasDueDate() const;
- virtual void setCompletedDate( const QDateTime& date );
- virtual QDateTime completedDate() const;
+ virtual void setCompletedDate( const TQDateTime& date );
+ virtual TQDateTime completedDate() const;
virtual bool hasCompletedDate() const;
// Load the attributes of this class
- virtual bool loadAttribute( QDomElement& );
+ virtual bool loadAttribute( TQDomElement& );
// Save the attributes of this class
- virtual bool saveAttributes( QDomElement& ) const;
+ virtual bool saveAttributes( TQDomElement& ) const;
// Load this task by reading the XML file
- virtual bool loadXML( const QDomDocument& xml );
+ virtual bool loadXML( const TQDomDocument& xml );
// Serialize this task to an XML string
- virtual QString saveXML() const;
+ virtual TQString saveXML() const;
protected:
// Read all known fields from this ical todo
@@ -113,15 +113,15 @@ protected:
int mPriority;
int mPercentCompleted;
KCal::Incidence::Status mStatus;
- QString mParent;
+ TQString mParent;
bool mHasStartDate;
bool mHasDueDate;
- QDateTime mDueDate;
+ TQDateTime mDueDate;
bool mHasCompletedDate;
- QDateTime mCompletedDate;
+ TQDateTime mCompletedDate;
};
}
diff --git a/kresources/kolab/knotes/note.cpp b/kresources/kolab/knotes/note.cpp
index 76ecdd9db..66556aaf8 100644
--- a/kresources/kolab/knotes/note.cpp
+++ b/kresources/kolab/knotes/note.cpp
@@ -40,7 +40,7 @@
using namespace Kolab;
-KCal::Journal* Note::xmlToJournal( const QString& xml )
+KCal::Journal* Note::xmlToJournal( const TQString& xml )
{
Note note;
note.load( xml );
@@ -49,7 +49,7 @@ KCal::Journal* Note::xmlToJournal( const QString& xml )
return journal;
}
-QString Note::journalToXML( KCal::Journal* journal )
+TQString Note::journalToXML( KCal::Journal* journal )
{
Note note( journal );
return note.saveXML();
@@ -65,32 +65,32 @@ Note::~Note()
{
}
-void Note::setSummary( const QString& summary )
+void Note::setSummary( const TQString& summary )
{
mSummary = summary;
}
-QString Note::summary() const
+TQString Note::summary() const
{
return mSummary;
}
-void Note::setBackgroundColor( const QColor& bgColor )
+void Note::setBackgroundColor( const TQColor& bgColor )
{
mBackgroundColor = bgColor;
}
-QColor Note::backgroundColor() const
+TQColor Note::backgroundColor() const
{
return mBackgroundColor;
}
-void Note::setForegroundColor( const QColor& fgColor )
+void Note::setForegroundColor( const TQColor& fgColor )
{
mForegroundColor = fgColor;
}
-QColor Note::foregroundColor() const
+TQColor Note::foregroundColor() const
{
return mForegroundColor;
}
@@ -105,9 +105,9 @@ bool Note::richText() const
return mRichText;
}
-bool Note::loadAttribute( QDomElement& element )
+bool Note::loadAttribute( TQDomElement& element )
{
- QString tagName = element.tagName();
+ TQString tagName = element.tagName();
if ( tagName == "summary" )
setSummary( element.text() );
@@ -124,14 +124,14 @@ bool Note::loadAttribute( QDomElement& element )
return true;
}
-bool Note::saveAttributes( QDomElement& element ) const
+bool Note::saveAttributes( TQDomElement& element ) const
{
// Save the base class elements
KolabBase::saveAttributes( element );
// Save the elements
#if 0
- QDomComment c = element.ownerDocument().createComment( "Note specific attributes" );
+ TQDomComment c = element.ownerDocument().createComment( "Note specific attributes" );
element.appendChild( c );
#endif
@@ -144,9 +144,9 @@ bool Note::saveAttributes( QDomElement& element ) const
}
-bool Note::loadXML( const QDomDocument& document )
+bool Note::loadXML( const TQDomDocument& document )
{
- QDomElement top = document.documentElement();
+ TQDomElement top = document.documentElement();
if ( top.tagName() != "note" ) {
qWarning( "XML error: Top tag was %s instead of the expected note",
@@ -154,11 +154,11 @@ bool Note::loadXML( const QDomDocument& document )
return false;
}
- for ( QDomNode n = top.firstChild(); !n.isNull(); n = n.nextSibling() ) {
+ for ( TQDomNode n = top.firstChild(); !n.isNull(); n = n.nextSibling() ) {
if ( n.isComment() )
continue;
if ( n.isElement() ) {
- QDomElement e = n.toElement();
+ TQDomElement e = n.toElement();
if ( !loadAttribute( e ) )
// TODO: Unhandled tag - save for later storage
kdDebug() << "Warning: Unhandled tag " << e.tagName() << endl;
@@ -169,10 +169,10 @@ bool Note::loadXML( const QDomDocument& document )
return true;
}
-QString Note::saveXML() const
+TQString Note::saveXML() const
{
- QDomDocument document = domTree();
- QDomElement element = document.createElement( "note" );
+ TQDomDocument document = domTree();
+ TQDomElement element = document.createElement( "note" );
element.setAttribute( "version", "1.0" );
saveAttributes( element );
document.appendChild( element );
@@ -204,7 +204,7 @@ void Note::saveTo( KCal::Journal* journal )
richText() ? "true" : "false" );
}
-QString Note::productID() const
+TQString Note::productID() const
{
- return QString( "KNotes %1, Kolab resource" ).arg( KNOTES_VERSION );
+ return TQString( "KNotes %1, Kolab resource" ).arg( KNOTES_VERSION );
}
diff --git a/kresources/kolab/knotes/note.h b/kresources/kolab/knotes/note.h
index 45769f97b..7a1c42407 100644
--- a/kresources/kolab/knotes/note.h
+++ b/kresources/kolab/knotes/note.h
@@ -54,10 +54,10 @@ class Note : public KolabBase {
public:
/// Use this to parse an xml string to a journal entry
/// The caller is responsible for deleting the returned journal
- static KCal::Journal* xmlToJournal( const QString& xml );
+ static KCal::Journal* xmlToJournal( const TQString& xml );
/// Use this to get an xml string describing this journal entry
- static QString journalToXML( KCal::Journal* );
+ static TQString journalToXML( KCal::Journal* );
/// Create a note object and
explicit Note( KCal::Journal* journal = 0 );
@@ -65,31 +65,31 @@ public:
void saveTo( KCal::Journal* journal );
- virtual QString type() const { return "Note"; }
+ virtual TQString type() const { return "Note"; }
- virtual void setSummary( const QString& summary );
- virtual QString summary() const;
+ virtual void setSummary( const TQString& summary );
+ virtual TQString summary() const;
- virtual void setBackgroundColor( const QColor& bgColor );
- virtual QColor backgroundColor() const;
+ virtual void setBackgroundColor( const TQColor& bgColor );
+ virtual TQColor backgroundColor() const;
- virtual void setForegroundColor( const QColor& fgColor );
- virtual QColor foregroundColor() const;
+ virtual void setForegroundColor( const TQColor& fgColor );
+ virtual TQColor foregroundColor() const;
virtual void setRichText( bool richText );
virtual bool richText() const;
// Load the attributes of this class
- virtual bool loadAttribute( QDomElement& );
+ virtual bool loadAttribute( TQDomElement& );
// Save the attributes of this class
- virtual bool saveAttributes( QDomElement& ) const;
+ virtual bool saveAttributes( TQDomElement& ) const;
// Load this note by reading the XML file
- virtual bool loadXML( const QDomDocument& xml );
+ virtual bool loadXML( const TQDomDocument& xml );
// Serialize this note to an XML string
- virtual QString saveXML() const;
+ virtual TQString saveXML() const;
protected:
// Read all known fields from this ical incidence
@@ -98,11 +98,11 @@ protected:
// Save all known fields into this ical incidence
void saveTo( KCal::Incidence* ) const;
- QString productID() const;
+ TQString productID() const;
- QString mSummary;
- QColor mBackgroundColor;
- QColor mForegroundColor;
+ TQString mSummary;
+ TQColor mBackgroundColor;
+ TQColor mForegroundColor;
bool mRichText;
};
diff --git a/kresources/kolab/knotes/resourcekolab.cpp b/kresources/kolab/knotes/resourcekolab.cpp
index b5cad153a..1d633b62a 100644
--- a/kresources/kolab/knotes/resourcekolab.cpp
+++ b/kresources/kolab/knotes/resourcekolab.cpp
@@ -51,7 +51,7 @@ static const char* inlineMimeType = "text/calendar";
ResourceKolab::ResourceKolab( const KConfig *config )
: ResourceNotes( config ), ResourceKolabBase( "ResourceKolab-KNotes" ),
- mCalendar( QString::fromLatin1("UTC") )
+ mCalendar( TQString::fromLatin1("UTC") )
{
setType( "imap" );
}
@@ -66,15 +66,15 @@ bool ResourceKolab::doOpen()
config.setGroup( configGroupName );
// Get the list of Notes folders from KMail
- QValueList<KMailICalIface::SubResource> subResources;
+ TQValueList<KMailICalIface::SubResource> subResources;
if ( !kmailSubresources( subResources, kmailContentsType ) )
return false;
// Make the resource map from the folder list
- QValueList<KMailICalIface::SubResource>::ConstIterator it;
+ TQValueList<KMailICalIface::SubResource>::ConstIterator it;
mSubResources.clear();
for ( it = subResources.begin(); it != subResources.end(); ++it ) {
- const QString subResource = (*it).location;
+ const TQString subResource = (*it).location;
const bool active = config.readBoolEntry( subResource, true );
mSubResources[ subResource ] = Kolab::SubResource( active, (*it).writable, (*it).label );
}
@@ -91,8 +91,8 @@ void ResourceKolab::doClose()
config.writeEntry( it.key(), it.data().active() );
}
-bool ResourceKolab::loadSubResource( const QString& subResource,
- const QString &mimetype )
+bool ResourceKolab::loadSubResource( const TQString& subResource,
+ const TQString &mimetype )
{
// Get the list of journals
int count = 0;
@@ -101,7 +101,7 @@ bool ResourceKolab::loadSubResource( const QString& subResource,
return false;
}
- QMap<Q_UINT32, QString> lst;
+ TQMap<Q_UINT32, TQString> lst;
if( !kmailIncidences( lst, mimetype, subResource, 0, count ) ) {
kdError(5500) << "Communication problem in "
<< "ResourceKolab::getIncidenceList()\n";
@@ -113,7 +113,7 @@ bool ResourceKolab::loadSubResource( const QString& subResource,
// Populate with the new entries
const bool silent = mSilent;
mSilent = true;
- QMap<Q_UINT32, QString>::Iterator it;
+ TQMap<Q_UINT32, TQString>::Iterator it;
for ( it = lst.begin(); it != lst.end(); ++it ) {
KCal::Journal* journal = addNote( it.data(), subResource, it.key(), mimetype );
if ( !journal )
@@ -139,7 +139,7 @@ bool ResourceKolab::load()
// This subResource is disabled
continue;
- QString mimetype = inlineMimeType;
+ TQString mimetype = inlineMimeType;
rc &= loadSubResource( itR.key(), mimetype );
mimetype = attachmentMimeType;
rc &= loadSubResource( itR.key(), mimetype );
@@ -156,11 +156,11 @@ bool ResourceKolab::save()
bool ResourceKolab::addNote( KCal::Journal* journal )
{
- return addNote( journal, QString::null, 0 );
+ return addNote( journal, TQString::null, 0 );
}
-KCal::Journal* ResourceKolab::addNote( const QString& data, const QString& subresource,
- Q_UINT32 sernum, const QString &mimetype )
+KCal::Journal* ResourceKolab::addNote( const TQString& data, const TQString& subresource,
+ Q_UINT32 sernum, const TQString &mimetype )
{
KCal::Journal* journal = 0;
// FIXME: This does not take into account the time zone!
@@ -180,7 +180,7 @@ KCal::Journal* ResourceKolab::addNote( const QString& data, const QString& subre
}
bool ResourceKolab::addNote( KCal::Journal* journal,
- const QString& subresource, Q_UINT32 sernum )
+ const TQString& subresource, Q_UINT32 sernum )
{
kdDebug(5500) << "ResourceKolab::addNote( KCal::Journal*, '" << subresource << "', " << sernum << " )\n";
@@ -190,13 +190,13 @@ bool ResourceKolab::addNote( KCal::Journal* journal,
bool newNote = subresource.isEmpty();
mCalendar.addJournal( journal );
- QString resource =
+ TQString resource =
newNote ? findWritableResource( mSubResources ) : subresource;
if ( resource.isEmpty() ) // canceled
return false;
if ( !mSilent ) {
- QString xml = Note::journalToXML( journal );
+ TQString xml = Note::journalToXML( journal );
kdDebug(5500) << k_funcinfo << "XML string:\n" << xml << endl;
if( !kmailUpdate( resource, sernum, xml, attachmentMimeType, journal->uid() ) ) {
@@ -215,7 +215,7 @@ bool ResourceKolab::addNote( KCal::Journal* journal,
bool ResourceKolab::deleteNote( KCal::Journal* journal )
{
- const QString uid = journal->uid();
+ const TQString uid = journal->uid();
if ( !mUidMap.contains( uid ) )
// Odd
return false;
@@ -230,20 +230,20 @@ bool ResourceKolab::deleteNote( KCal::Journal* journal )
return true;
}
-KCal::Alarm::List ResourceKolab::alarms( const QDateTime& from, const QDateTime& to )
+KCal::Alarm::List ResourceKolab::alarms( const TQDateTime& from, const TQDateTime& to )
{
KCal::Alarm::List alarms;
KCal::Journal::List notes = mCalendar.journals();
KCal::Journal::List::ConstIterator note;
for ( note = notes.begin(); note != notes.end(); ++note )
{
- QDateTime preTime = from.addSecs( -1 );
+ TQDateTime preTime = from.addSecs( -1 );
KCal::Alarm::List::ConstIterator it;
for( it = (*note)->alarms().begin(); it != (*note)->alarms().end(); ++it )
{
if ( (*it)->enabled() )
{
- QDateTime dt = (*it)->nextRepetition( preTime );
+ TQDateTime dt = (*it)->nextRepetition( preTime );
if ( dt.isValid() && dt <= to )
alarms.append( *it );
}
@@ -255,7 +255,7 @@ KCal::Alarm::List ResourceKolab::alarms( const QDateTime& from, const QDateTime&
void ResourceKolab::incidenceUpdated( KCal::IncidenceBase* i )
{
- QString subResource;
+ TQString subResource;
Q_UINT32 sernum;
if ( mUidMap.contains( i->uid() ) ) {
subResource = mUidMap[ i->uid() ].resource();
@@ -268,7 +268,7 @@ void ResourceKolab::incidenceUpdated( KCal::IncidenceBase* i )
}
KCal::Journal* journal = dynamic_cast<KCal::Journal*>( i );
- QString xml = Note::journalToXML( journal );
+ TQString xml = Note::journalToXML( journal );
if( !xml.isEmpty() && kmailUpdate( subResource, sernum, xml, attachmentMimeType, journal->uid() ) )
mUidMap[ i->uid() ] = StorageReference( subResource, sernum );
}
@@ -277,18 +277,18 @@ void ResourceKolab::incidenceUpdated( KCal::IncidenceBase* i )
* These are the DCOP slots that KMail call to notify when something
* changed.
*/
-bool ResourceKolab::fromKMailAddIncidence( const QString& type,
- const QString& subResource,
+bool ResourceKolab::fromKMailAddIncidence( const TQString& type,
+ const TQString& subResource,
Q_UINT32 sernum,
int format,
- const QString& note )
+ const TQString& note )
{
// Check if this is a note
if( type != kmailContentsType ) return false;
const bool silent = mSilent;
mSilent = true;
- QString mimetype;
+ TQString mimetype;
if ( format == KMailICalIface::StorageXML )
mimetype = attachmentMimeType;
else
@@ -300,9 +300,9 @@ bool ResourceKolab::fromKMailAddIncidence( const QString& type,
return true;
}
-void ResourceKolab::fromKMailDelIncidence( const QString& type,
- const QString& /*subResource*/,
- const QString& uid )
+void ResourceKolab::fromKMailDelIncidence( const TQString& type,
+ const TQString& /*subResource*/,
+ const TQString& uid )
{
// Check if this is a note
if( type != kmailContentsType ) return;
@@ -318,16 +318,16 @@ void ResourceKolab::fromKMailDelIncidence( const QString& type,
mSilent = silent;
}
-void ResourceKolab::fromKMailRefresh( const QString& type,
- const QString& /*subResource*/ )
+void ResourceKolab::fromKMailRefresh( const TQString& type,
+ const TQString& /*subResource*/ )
{
if ( type == kmailContentsType )
load(); // ### should call loadSubResource(subResource) probably
}
-void ResourceKolab::fromKMailAddSubresource( const QString& type,
- const QString& subResource,
- const QString& /*label*/,
+void ResourceKolab::fromKMailAddSubresource( const TQString& type,
+ const TQString& subResource,
+ const TQString& /*label*/,
bool writable,
bool /*alarmRelevant*/ )
{
@@ -348,8 +348,8 @@ void ResourceKolab::fromKMailAddSubresource( const QString& type,
emit signalSubresourceAdded( this, type, subResource );
}
-void ResourceKolab::fromKMailDelSubresource( const QString& type,
- const QString& subResource )
+void ResourceKolab::fromKMailDelSubresource( const TQString& type,
+ const TQString& subResource )
{
if ( type != configGroupName )
// Not ours
@@ -369,7 +369,7 @@ void ResourceKolab::fromKMailDelSubresource( const QString& type,
// Make a list of all uids to remove
Kolab::UidMap::ConstIterator mapIt;
- QStringList uids;
+ TQStringList uids;
for ( mapIt = mUidMap.begin(); mapIt != mUidMap.end(); ++mapIt )
if ( mapIt.data().resource() == subResource )
// We have a match
@@ -379,7 +379,7 @@ void ResourceKolab::fromKMailDelSubresource( const QString& type,
if ( !uids.isEmpty() ) {
const bool silent = mSilent;
mSilent = true;
- QStringList::ConstIterator it;
+ TQStringList::ConstIterator it;
for ( it = uids.begin(); it != uids.end(); ++it ) {
KCal::Journal* j = mCalendar.journal( *it );
if( j )
@@ -391,21 +391,21 @@ void ResourceKolab::fromKMailDelSubresource( const QString& type,
emit signalSubresourceRemoved( this, type, subResource );
}
-void ResourceKolab::fromKMailAsyncLoadResult( const QMap<Q_UINT32, QString>& map,
- const QString& type,
- const QString& folder )
+void ResourceKolab::fromKMailAsyncLoadResult( const TQMap<Q_UINT32, TQString>& map,
+ const TQString& type,
+ const TQString& folder )
{
// We are only interested in notes
if ( ( type != attachmentMimeType ) && ( type != inlineMimeType ) ) return;
// Populate with the new entries
const bool silent = mSilent;
mSilent = true;
- QString mimetype;
+ TQString mimetype;
if ( kmailStorageFormat( folder ) == KMailICalIface::StorageXML )
mimetype = attachmentMimeType;
else
mimetype = inlineMimeType;
- for( QMap<Q_UINT32, QString>::ConstIterator it = map.begin(); it != map.end(); ++it ) {
+ for( TQMap<Q_UINT32, TQString>::ConstIterator it = map.begin(); it != map.end(); ++it ) {
KCal::Journal* journal = addNote( it.data(), folder, it.key(), mimetype );
if ( !journal )
kdDebug(5500) << "loading note " << it.key() << " failed" << endl;
@@ -416,12 +416,12 @@ void ResourceKolab::fromKMailAsyncLoadResult( const QMap<Q_UINT32, QString>& map
}
-QStringList ResourceKolab::subresources() const
+TQStringList ResourceKolab::subresources() const
{
return mSubResources.keys();
}
-bool ResourceKolab::subresourceActive( const QString& res ) const
+bool ResourceKolab::subresourceActive( const TQString& res ) const
{
if ( mSubResources.contains( res ) ) {
return mSubResources[ res ].active();
diff --git a/kresources/kolab/knotes/resourcekolab.h b/kresources/kolab/knotes/resourcekolab.h
index 44ce480b7..a738a30a5 100644
--- a/kresources/kolab/knotes/resourcekolab.h
+++ b/kresources/kolab/knotes/resourcekolab.h
@@ -74,47 +74,47 @@ public:
bool deleteNote( KCal::Journal* );
- KCal::Alarm::List alarms( const QDateTime& from, const QDateTime& to );
+ KCal::Alarm::List alarms( const TQDateTime& from, const TQDateTime& to );
/// Reimplemented from IncidenceBase::Observer to know when a note was changed
void incidenceUpdated( KCal::IncidenceBase* );
/// The ResourceKolabBase methods called by KMail
- bool fromKMailAddIncidence( const QString& type, const QString& resource,
- Q_UINT32 sernum, int format, const QString& note );
- void fromKMailDelIncidence( const QString& type, const QString& resource,
- const QString& uid );
- void fromKMailRefresh( const QString& type, const QString& resource );
+ bool fromKMailAddIncidence( const TQString& type, const TQString& resource,
+ Q_UINT32 sernum, int format, const TQString& note );
+ void fromKMailDelIncidence( const TQString& type, const TQString& resource,
+ const TQString& uid );
+ void fromKMailRefresh( const TQString& type, const TQString& resource );
/// Listen to KMail changes in the amount of sub resources
- void fromKMailAddSubresource( const QString& type, const QString& resource,
- const QString& label, bool writable,
+ void fromKMailAddSubresource( const TQString& type, const TQString& resource,
+ const TQString& label, bool writable,
bool alarmRelevant );
- void fromKMailDelSubresource( const QString& type, const QString& resource );
+ void fromKMailDelSubresource( const TQString& type, const TQString& resource );
- void fromKMailAsyncLoadResult( const QMap<Q_UINT32, QString>& map,
- const QString& type,
- const QString& folder );
+ void fromKMailAsyncLoadResult( const TQMap<Q_UINT32, TQString>& map,
+ const TQString& type,
+ const TQString& folder );
/** Return the list of subresources. */
- QStringList subresources() const;
+ TQStringList subresources() const;
/** Is this subresource active? */
- bool subresourceActive( const QString& ) const;
+ bool subresourceActive( const TQString& ) const;
signals:
- void signalSubresourceAdded( Resource*, const QString&, const QString& );
- void signalSubresourceRemoved( Resource*, const QString&, const QString& );
+ void signalSubresourceAdded( Resource*, const TQString&, const TQString& );
+ void signalSubresourceRemoved( Resource*, const TQString&, const TQString& );
private:
- bool addNote( KCal::Journal* journal, const QString& resource,
+ bool addNote( KCal::Journal* journal, const TQString& resource,
Q_UINT32 sernum );
- KCal::Journal* addNote( const QString& data, const QString& subresource,
- Q_UINT32 sernum, const QString &mimetype );
+ KCal::Journal* addNote( const TQString& data, const TQString& subresource,
+ Q_UINT32 sernum, const TQString &mimetype );
- bool loadSubResource( const QString& resource, const QString& mimetype );
+ bool loadSubResource( const TQString& resource, const TQString& mimetype );
- QString configFile() const {
+ TQString configFile() const {
return ResourceKolabBase::configFile( "knotes" );
}
diff --git a/kresources/kolab/knotes/resourcekolab_plugin.cpp b/kresources/kolab/knotes/resourcekolab_plugin.cpp
index cd97ecf6c..772184982 100644
--- a/kresources/kolab/knotes/resourcekolab_plugin.cpp
+++ b/kresources/kolab/knotes/resourcekolab_plugin.cpp
@@ -40,7 +40,7 @@ public:
return new Kolab::ResourceKolab( config );
}
- KRES::ConfigWidget *configWidget( QWidget* )
+ KRES::ConfigWidget *configWidget( TQWidget* )
{
return 0;
}
diff --git a/kresources/kolab/shared/kmailconnection.cpp b/kresources/kolab/shared/kmailconnection.cpp
index 6db9f3dab..9135e16db 100644
--- a/kresources/kolab/shared/kmailconnection.cpp
+++ b/kresources/kolab/shared/kmailconnection.cpp
@@ -47,7 +47,7 @@ using namespace Kolab;
KMailConnection::KMailConnection( ResourceKolabBase* resource,
- const QCString& objId )
+ const TQCString& objId )
: DCOPObject( objId ), mResource( resource ), mKMailIcalIfaceStub( 0 )
{
// Make the connection to KMail ready
@@ -56,8 +56,8 @@ KMailConnection::KMailConnection( ResourceKolabBase* resource,
mDCOPClient->registerAs( objId, true );
kapp->dcopClient()->setNotifications( true );
- connect( kapp->dcopClient(), SIGNAL( applicationRemoved( const QCString& ) ),
- this, SLOT( unregisteredFromDCOP( const QCString& ) ) );
+ connect( kapp->dcopClient(), TQT_SIGNAL( applicationRemoved( const TQCString& ) ),
+ this, TQT_SLOT( unregisteredFromDCOP( const TQCString& ) ) );
}
KMailConnection::~KMailConnection()
@@ -69,15 +69,15 @@ KMailConnection::~KMailConnection()
mDCOPClient = 0;
}
-static const QCString dcopObjectId = "KMailICalIface";
+static const TQCString dcopObjectId = "KMailICalIface";
bool KMailConnection::connectToKMail()
{
if ( !mKMailIcalIfaceStub ) {
- QString error;
- QCString dcopService;
+ TQString error;
+ TQCString dcopService;
int result = KDCOPServiceStarter::self()->
- findServiceFor( "DCOP/ResourceBackend/IMAP", QString::null,
- QString::null, &error, &dcopService );
+ findServiceFor( "DCOP/ResourceBackend/IMAP", TQString::null,
+ TQString::null, &error, &dcopService );
if ( result != 0 ) {
kdError(5650) << "Couldn't connect to the IMAP resource backend\n";
// TODO: You might want to show "error" (if not empty) here,
@@ -89,34 +89,34 @@ bool KMailConnection::connectToKMail()
dcopService, dcopObjectId );
// Attach to the KMail signals
- if ( !connectKMailSignal( "incidenceAdded(QString,QString,Q_UINT32,int,QString)",
- "fromKMailAddIncidence(QString,QString,Q_UINT32,int,QString)" ) )
+ if ( !connectKMailSignal( "incidenceAdded(TQString,TQString,Q_UINT32,int,TQString)",
+ "fromKMailAddIncidence(TQString,TQString,Q_UINT32,int,TQString)" ) )
kdError(5650) << "DCOP connection to incidenceAdded failed" << endl;
- if ( !connectKMailSignal( "incidenceDeleted(QString,QString,QString)",
- "fromKMailDelIncidence(QString,QString,QString)" ) )
+ if ( !connectKMailSignal( "incidenceDeleted(TQString,TQString,TQString)",
+ "fromKMailDelIncidence(TQString,TQString,TQString)" ) )
kdError(5650) << "DCOP connection to incidenceDeleted failed" << endl;
- if ( !connectKMailSignal( "signalRefresh(QString,QString)",
- "fromKMailRefresh(QString,QString)" ) )
+ if ( !connectKMailSignal( "signalRefresh(TQString,TQString)",
+ "fromKMailRefresh(TQString,TQString)" ) )
kdError(5650) << "DCOP connection to signalRefresh failed" << endl;
- if ( !connectKMailSignal( "subresourceAdded( QString, QString, QString, bool, bool )",
- "fromKMailAddSubresource( QString, QString, QString, bool, bool )" ) )
+ if ( !connectKMailSignal( "subresourceAdded( TQString, TQString, TQString, bool, bool )",
+ "fromKMailAddSubresource( TQString, TQString, TQString, bool, bool )" ) )
kdError(5650) << "DCOP connection to subresourceAdded failed" << endl;
- if ( !connectKMailSignal( "subresourceDeleted(QString,QString)",
- "fromKMailDelSubresource(QString,QString)" ) )
+ if ( !connectKMailSignal( "subresourceDeleted(TQString,TQString)",
+ "fromKMailDelSubresource(TQString,TQString)" ) )
kdError(5650) << "DCOP connection to subresourceDeleted failed" << endl;
- if ( !connectKMailSignal( "asyncLoadResult(QMap<Q_UINT32, QString>, QString, QString)",
- "fromKMailAsyncLoadResult(QMap<Q_UINT32, QString>, QString, QString)" ) )
+ if ( !connectKMailSignal( "asyncLoadResult(TQMap<Q_UINT32, TQString>, TQString, TQString)",
+ "fromKMailAsyncLoadResult(TQMap<Q_UINT32, TQString>, TQString, TQString)" ) )
kdError(5650) << "DCOP connection to asyncLoadResult failed" << endl;
}
return ( mKMailIcalIfaceStub != 0 );
}
-bool KMailConnection::fromKMailAddIncidence( const QString& type,
- const QString& folder,
+bool KMailConnection::fromKMailAddIncidence( const TQString& type,
+ const TQString& folder,
Q_UINT32 sernum,
int format,
- const QString& data )
+ const TQString& data )
{
if ( format != KMailICalIface::StorageXML
&& format != KMailICalIface::StorageIcalVcard )
@@ -126,25 +126,25 @@ bool KMailConnection::fromKMailAddIncidence( const QString& type,
return mResource->fromKMailAddIncidence( type, folder, sernum, format, data );
}
-void KMailConnection::fromKMailDelIncidence( const QString& type,
- const QString& folder,
- const QString& xml )
+void KMailConnection::fromKMailDelIncidence( const TQString& type,
+ const TQString& folder,
+ const TQString& xml )
{
// kdDebug(5650) << "KMailConnection::fromKMailDelIncidence( " << type << ", "
// << folder << ", " << uid << " )\n";
mResource->fromKMailDelIncidence( type, folder, xml );
}
-void KMailConnection::fromKMailRefresh( const QString& type, const QString& folder )
+void KMailConnection::fromKMailRefresh( const TQString& type, const TQString& folder )
{
// kdDebug(5650) << "KMailConnection::fromKMailRefresh( " << type << ", "
// << folder << " )\n";
mResource->fromKMailRefresh( type, folder );
}
-void KMailConnection::fromKMailAddSubresource( const QString& type,
- const QString& resource,
- const QString& label,
+void KMailConnection::fromKMailAddSubresource( const TQString& type,
+ const TQString& resource,
+ const TQString& label,
bool writable,
bool alarmRelevant )
{
@@ -154,30 +154,30 @@ void KMailConnection::fromKMailAddSubresource( const QString& type,
writable, alarmRelevant );
}
-void KMailConnection::fromKMailDelSubresource( const QString& type,
- const QString& resource )
+void KMailConnection::fromKMailDelSubresource( const TQString& type,
+ const TQString& resource )
{
// kdDebug(5650) << "KMailConnection::fromKMailDelSubresource( " << type << ", "
// << resource << " )\n";
mResource->fromKMailDelSubresource( type, resource );
}
-void KMailConnection::fromKMailAsyncLoadResult( const QMap<Q_UINT32, QString>& map,
- const QString& type,
- const QString& folder )
+void KMailConnection::fromKMailAsyncLoadResult( const TQMap<Q_UINT32, TQString>& map,
+ const TQString& type,
+ const TQString& folder )
{
mResource->fromKMailAsyncLoadResult( map, type, folder );
}
-bool KMailConnection::connectKMailSignal( const QCString& signal,
- const QCString& method )
+bool KMailConnection::connectKMailSignal( const TQCString& signal,
+ const TQCString& method )
{
return connectDCOPSignal( "kmail", dcopObjectId, signal, method, false )
&& connectDCOPSignal( "kontact", dcopObjectId, signal, method, false );
}
-bool KMailConnection::kmailSubresources( QValueList<KMailICalIface::SubResource>& lst,
- const QString& contentsType )
+bool KMailConnection::kmailSubresources( TQValueList<KMailICalIface::SubResource>& lst,
+ const TQString& contentsType )
{
if ( !connectToKMail() )
return false;
@@ -187,8 +187,8 @@ bool KMailConnection::kmailSubresources( QValueList<KMailICalIface::SubResource>
}
bool KMailConnection::kmailIncidencesCount( int& count,
- const QString& mimetype,
- const QString& resource )
+ const TQString& mimetype,
+ const TQString& resource )
{
if ( !connectToKMail() )
return false;
@@ -197,9 +197,9 @@ bool KMailConnection::kmailIncidencesCount( int& count,
return mKMailIcalIfaceStub->ok();
}
-bool KMailConnection::kmailIncidences( QMap<Q_UINT32, QString>& lst,
- const QString& mimetype,
- const QString& resource,
+bool KMailConnection::kmailIncidences( TQMap<Q_UINT32, TQString>& lst,
+ const TQString& mimetype,
+ const TQString& resource,
int startIndex,
int nbMessages )
{
@@ -212,9 +212,9 @@ bool KMailConnection::kmailIncidences( QMap<Q_UINT32, QString>& lst,
bool KMailConnection::kmailGetAttachment( KURL& url,
- const QString& resource,
+ const TQString& resource,
Q_UINT32 sernum,
- const QString& filename )
+ const TQString& filename )
{
if ( !connectToKMail() )
return false;
@@ -223,10 +223,10 @@ bool KMailConnection::kmailGetAttachment( KURL& url,
return mKMailIcalIfaceStub->ok();
}
-bool KMailConnection::kmailAttachmentMimetype( QString & mimeType,
- const QString & resource,
+bool KMailConnection::kmailAttachmentMimetype( TQString & mimeType,
+ const TQString & resource,
Q_UINT32 sernum,
- const QString & filename )
+ const TQString & filename )
{
if ( !connectToKMail() )
return false;
@@ -234,8 +234,8 @@ bool KMailConnection::kmailAttachmentMimetype( QString & mimeType,
return mKMailIcalIfaceStub->ok();
}
-bool KMailConnection::kmailListAttachments(QStringList &list,
- const QString & resource, Q_UINT32 sernum)
+bool KMailConnection::kmailListAttachments(TQStringList &list,
+ const TQString & resource, Q_UINT32 sernum)
{
if ( !connectToKMail() )
return false;
@@ -244,7 +244,7 @@ bool KMailConnection::kmailListAttachments(QStringList &list,
return mKMailIcalIfaceStub->ok();
}
-bool KMailConnection::kmailDeleteIncidence( const QString& resource,
+bool KMailConnection::kmailDeleteIncidence( const TQString& resource,
Q_UINT32 sernum )
{
return connectToKMail()
@@ -252,15 +252,15 @@ bool KMailConnection::kmailDeleteIncidence( const QString& resource,
&& mKMailIcalIfaceStub->ok();
}
-bool KMailConnection::kmailUpdate( const QString& resource,
+bool KMailConnection::kmailUpdate( const TQString& resource,
Q_UINT32& sernum,
- const QString& subject,
- const QString& plainTextBody,
- const QMap<QCString, QString>& customHeaders,
- const QStringList& attachmentURLs,
- const QStringList& attachmentMimetypes,
- const QStringList& attachmentNames,
- const QStringList& deletedAttachments )
+ const TQString& subject,
+ const TQString& plainTextBody,
+ const TQMap<TQCString, TQString>& customHeaders,
+ const TQStringList& attachmentURLs,
+ const TQStringList& attachmentMimetypes,
+ const TQStringList& attachmentNames,
+ const TQStringList& deletedAttachments )
{
//kdDebug(5006) << kdBacktrace() << endl;
if ( connectToKMail() ) {
@@ -272,16 +272,16 @@ bool KMailConnection::kmailUpdate( const QString& resource,
return false;
}
-bool KMailConnection::kmailAddSubresource( const QString& resource,
- const QString& parent,
- const QString& contentsType )
+bool KMailConnection::kmailAddSubresource( const TQString& resource,
+ const TQString& parent,
+ const TQString& contentsType )
{
return connectToKMail()
&& mKMailIcalIfaceStub->addSubresource( resource, parent, contentsType )
&& mKMailIcalIfaceStub->ok();
}
-bool KMailConnection::kmailRemoveSubresource( const QString& resource )
+bool KMailConnection::kmailRemoveSubresource( const TQString& resource )
{
return connectToKMail()
&& mKMailIcalIfaceStub->removeSubresource( resource )
@@ -290,7 +290,7 @@ bool KMailConnection::kmailRemoveSubresource( const QString& resource )
bool KMailConnection::kmailStorageFormat( KMailICalIface::StorageFormat& type,
- const QString& folder )
+ const TQString& folder )
{
bool ok = connectToKMail();
type = mKMailIcalIfaceStub->storageFormat( folder );
@@ -298,13 +298,13 @@ bool KMailConnection::kmailStorageFormat( KMailICalIface::StorageFormat& type,
}
-bool KMailConnection::kmailTriggerSync( const QString &contentsType )
+bool KMailConnection::kmailTriggerSync( const TQString &contentsType )
{
bool ok = connectToKMail();
return ok && mKMailIcalIfaceStub->triggerSync( contentsType );
}
-void KMailConnection::unregisteredFromDCOP( const QCString& appId )
+void KMailConnection::unregisteredFromDCOP( const TQCString& appId )
{
if ( mKMailIcalIfaceStub && mKMailIcalIfaceStub->app() == appId ) {
// Delete the stub so that the next time we need to talk to kmail,
diff --git a/kresources/kolab/shared/kmailconnection.h b/kresources/kolab/shared/kmailconnection.h
index cbb69a155..16b80bfb0 100644
--- a/kresources/kolab/shared/kmailconnection.h
+++ b/kresources/kolab/shared/kmailconnection.h
@@ -48,26 +48,26 @@ class ResourceKolabBase;
/**
This class provides the kmail connectivity for IMAP resources.
*/
-class KMailConnection : public QObject, public DCOPObject {
+class KMailConnection : public TQObject, public DCOPObject {
Q_OBJECT
K_DCOP
// These are the methods called by KMail when the resource changes
k_dcop:
- bool fromKMailAddIncidence( const QString& type, const QString& resource,
- Q_UINT32 sernum, int format, const QString& xml );
- void fromKMailDelIncidence( const QString& type, const QString& resource,
- const QString& xml );
- void fromKMailRefresh( const QString& type, const QString& resource );
- void fromKMailAddSubresource( const QString& type, const QString& resource,
- const QString& label, bool writable,
+ bool fromKMailAddIncidence( const TQString& type, const TQString& resource,
+ Q_UINT32 sernum, int format, const TQString& xml );
+ void fromKMailDelIncidence( const TQString& type, const TQString& resource,
+ const TQString& xml );
+ void fromKMailRefresh( const TQString& type, const TQString& resource );
+ void fromKMailAddSubresource( const TQString& type, const TQString& resource,
+ const TQString& label, bool writable,
bool alarmRelevant );
- void fromKMailDelSubresource( const QString& type, const QString& resource );
- void fromKMailAsyncLoadResult( const QMap<Q_UINT32, QString>& map, const QString& type,
- const QString& folder );
+ void fromKMailDelSubresource( const TQString& type, const TQString& resource );
+ void fromKMailAsyncLoadResult( const TQMap<Q_UINT32, TQString>& map, const TQString& type,
+ const TQString& folder );
public:
- KMailConnection( ResourceKolabBase* resource, const QCString& objId );
+ KMailConnection( ResourceKolabBase* resource, const TQCString& objId );
virtual ~KMailConnection();
/**
@@ -76,47 +76,47 @@ public:
bool connectToKMail();
// Call the DCOP methods
- bool kmailSubresources( QValueList<KMailICalIface::SubResource>& lst,
- const QString& contentsType );
+ bool kmailSubresources( TQValueList<KMailICalIface::SubResource>& lst,
+ const TQString& contentsType );
bool kmailIncidencesCount( int& count,
- const QString& mimetype,
- const QString& resource );
- bool kmailIncidences( QMap<Q_UINT32, QString>& lst, const QString& mimetype,
- const QString& resource,
+ const TQString& mimetype,
+ const TQString& resource );
+ bool kmailIncidences( TQMap<Q_UINT32, TQString>& lst, const TQString& mimetype,
+ const TQString& resource,
int startIndex,
int nbMessages );
- bool kmailGetAttachment( KURL& url, const QString& resource, Q_UINT32 sernum,
- const QString& filename );
- bool kmailAttachmentMimetype( QString &mimeType, const QString &resource,
- Q_UINT32 sernum, const QString &filename );
- bool kmailListAttachments( QStringList &list, const QString &resource,
+ bool kmailGetAttachment( KURL& url, const TQString& resource, Q_UINT32 sernum,
+ const TQString& filename );
+ bool kmailAttachmentMimetype( TQString &mimeType, const TQString &resource,
+ Q_UINT32 sernum, const TQString &filename );
+ bool kmailListAttachments( TQStringList &list, const TQString &resource,
Q_UINT32 sernum );
- bool kmailDeleteIncidence( const QString& resource, Q_UINT32 sernum );
- bool kmailUpdate( const QString& resource,
+ bool kmailDeleteIncidence( const TQString& resource, Q_UINT32 sernum );
+ bool kmailUpdate( const TQString& resource,
Q_UINT32& sernum,
- const QString& subject,
- const QString& plainTextBody,
- const QMap<QCString, QString>& customHeaders,
- const QStringList& attachmentURLs,
- const QStringList& attachmentMimetypes,
- const QStringList& attachmentNames,
- const QStringList& deletedAttachments );
-
- bool kmailStorageFormat( KMailICalIface::StorageFormat& type, const QString& folder);
-
- bool kmailTriggerSync( const QString& contentsType );
- bool kmailAddSubresource( const QString& resource,
- const QString& parent,
- const QString& contentsType );
- bool kmailRemoveSubresource( const QString& resource );
+ const TQString& subject,
+ const TQString& plainTextBody,
+ const TQMap<TQCString, TQString>& customHeaders,
+ const TQStringList& attachmentURLs,
+ const TQStringList& attachmentMimetypes,
+ const TQStringList& attachmentNames,
+ const TQStringList& deletedAttachments );
+
+ bool kmailStorageFormat( KMailICalIface::StorageFormat& type, const TQString& folder);
+
+ bool kmailTriggerSync( const TQString& contentsType );
+ bool kmailAddSubresource( const TQString& resource,
+ const TQString& parent,
+ const TQString& contentsType );
+ bool kmailRemoveSubresource( const TQString& resource );
private slots:
- virtual void unregisteredFromDCOP( const QCString& );
+ virtual void unregisteredFromDCOP( const TQCString& );
private:
/** Connect a signal from KMail to a local slot. */
- bool connectKMailSignal( const QCString&, const QCString& );
+ bool connectKMailSignal( const TQCString&, const TQCString& );
ResourceKolabBase* mResource;
DCOPClient* mDCOPClient;
diff --git a/kresources/kolab/shared/kolabbase.cpp b/kresources/kolab/shared/kolabbase.cpp
index 44c44ead2..9a4a17f7c 100644
--- a/kresources/kolab/shared/kolabbase.cpp
+++ b/kresources/kolab/shared/kolabbase.cpp
@@ -37,14 +37,14 @@
#include <libkcal/journal.h>
#include <libkdepim/kpimprefs.h>
#include <kdebug.h>
-#include <qfile.h>
+#include <tqfile.h>
using namespace Kolab;
-KolabBase::KolabBase( const QString& tz )
- : mCreationDate( QDateTime::currentDateTime() ),
- mLastModified( QDateTime::currentDateTime() ),
+KolabBase::KolabBase( const TQString& tz )
+ : mCreationDate( TQDateTime::currentDateTime() ),
+ mLastModified( TQDateTime::currentDateTime() ),
mSensitivity( Public ), mTimeZoneId( tz ),
mHasPilotSyncId( false ), mHasPilotSyncStatus( false )
{
@@ -89,20 +89,20 @@ void KolabBase::setFields( const KABC::Addressee* addressee )
setCategories( addressee->categories().join( "," ) );
// Set creation-time and last-modification-time
- const QString creationString = addressee->custom( "KOLAB", "CreationDate" );
+ const TQString creationString = addressee->custom( "KOLAB", "CreationDate" );
kdDebug(5006) << "Creation time string: " << creationString << endl;
- QDateTime creationDate;
+ TQDateTime creationDate;
if ( creationString.isEmpty() ) {
- creationDate = QDateTime::currentDateTime();
+ creationDate = TQDateTime::currentDateTime();
kdDebug(5006) << "Creation date set to current time\n";
}
else {
creationDate = stringToDateTime( creationString );
kdDebug(5006) << "Creation date loaded\n";
}
- QDateTime modified = addressee->revision();
+ TQDateTime modified = addressee->revision();
if ( !modified.isValid() )
- modified = QDateTime::currentDateTime();
+ modified = TQDateTime::currentDateTime();
setLastModified( modified );
if ( modified < creationDate ) {
// It's not possible that the modification date is earlier than creation
@@ -110,7 +110,7 @@ void KolabBase::setFields( const KABC::Addressee* addressee )
kdDebug(5006) << "Creation date set to modification date\n";
}
setCreationDate( creationDate );
- const QString newCreationDate = dateTimeToString( creationDate );
+ const TQString newCreationDate = dateTimeToString( creationDate );
if ( creationString != newCreationDate ) {
// We modified the creation date, so store it for future reference
const_cast<KABC::Addressee*>( addressee )
@@ -136,7 +136,7 @@ void KolabBase::saveTo( KABC::Addressee* addressee ) const
{
addressee->setUid( uid() );
addressee->setNote( body() );
- addressee->setCategories( QStringList::split( ',', categories() ) );
+ addressee->setCategories( TQStringList::split( ',', categories() ) );
addressee->setRevision( lastModified() );
addressee->insertCustom( "KOLAB", "CreationDate",
dateTimeToString( creationDate() ) );
@@ -156,52 +156,52 @@ void KolabBase::saveTo( KABC::Addressee* addressee ) const
// TODO: Attachments
}
-void KolabBase::setUid( const QString& uid )
+void KolabBase::setUid( const TQString& uid )
{
mUid = uid;
}
-QString KolabBase::uid() const
+TQString KolabBase::uid() const
{
return mUid;
}
-void KolabBase::setBody( const QString& body )
+void KolabBase::setBody( const TQString& body )
{
mBody = body;
}
-QString KolabBase::body() const
+TQString KolabBase::body() const
{
return mBody;
}
-void KolabBase::setCategories( const QString& categories )
+void KolabBase::setCategories( const TQString& categories )
{
mCategories = categories;
}
-QString KolabBase::categories() const
+TQString KolabBase::categories() const
{
return mCategories;
}
-void KolabBase::setCreationDate( const QDateTime& date )
+void KolabBase::setCreationDate( const TQDateTime& date )
{
mCreationDate = date;
}
-QDateTime KolabBase::creationDate() const
+TQDateTime KolabBase::creationDate() const
{
return mCreationDate;
}
-void KolabBase::setLastModified( const QDateTime& date )
+void KolabBase::setLastModified( const TQDateTime& date )
{
mLastModified = date;
}
-QDateTime KolabBase::lastModified() const
+TQDateTime KolabBase::lastModified() const
{
return mLastModified;
}
@@ -248,14 +248,14 @@ int KolabBase::pilotSyncStatus() const
return mPilotSyncStatus;
}
-bool KolabBase::loadEmailAttribute( QDomElement& element, Email& email )
+bool KolabBase::loadEmailAttribute( TQDomElement& element, Email& email )
{
- for ( QDomNode n = element.firstChild(); !n.isNull(); n = n.nextSibling() ) {
+ for ( TQDomNode n = element.firstChild(); !n.isNull(); n = n.nextSibling() ) {
if ( n.isComment() )
continue;
if ( n.isElement() ) {
- QDomElement e = n.toElement();
- const QString tagName = e.tagName();
+ TQDomElement e = n.toElement();
+ const TQString tagName = e.tagName();
if ( tagName == "display-name" )
email.displayName = e.text();
@@ -271,18 +271,18 @@ bool KolabBase::loadEmailAttribute( QDomElement& element, Email& email )
return true;
}
-void KolabBase::saveEmailAttribute( QDomElement& element, const Email& email,
- const QString& tagName ) const
+void KolabBase::saveEmailAttribute( TQDomElement& element, const Email& email,
+ const TQString& tagName ) const
{
- QDomElement e = element.ownerDocument().createElement( tagName );
+ TQDomElement e = element.ownerDocument().createElement( tagName );
element.appendChild( e );
writeString( e, "display-name", email.displayName );
writeString( e, "smtp-address", email.smtpAddress );
}
-bool KolabBase::loadAttribute( QDomElement& element )
+bool KolabBase::loadAttribute( TQDomElement& element )
{
- const QString tagName = element.tagName();
+ const TQString tagName = element.tagName();
switch ( tagName[0].latin1() ) {
case 'u':
if ( tagName == "uid" ) {
@@ -336,7 +336,7 @@ bool KolabBase::loadAttribute( QDomElement& element )
return false;
}
-bool KolabBase::saveAttributes( QDomElement& element ) const
+bool KolabBase::saveAttributes( TQDomElement& element ) const
{
writeString( element, "product-id", productID() );
writeString( element, "uid", uid() );
@@ -347,17 +347,17 @@ bool KolabBase::saveAttributes( QDomElement& element ) const
dateTimeToString( lastModified() ) );
writeString( element, "sensitivity", sensitivityToString( sensitivity() ) );
if ( hasPilotSyncId() )
- writeString( element, "pilot-sync-id", QString::number( pilotSyncId() ) );
+ writeString( element, "pilot-sync-id", TQString::number( pilotSyncId() ) );
if ( hasPilotSyncStatus() )
- writeString( element, "pilot-sync-status", QString::number( pilotSyncStatus() ) );
+ writeString( element, "pilot-sync-status", TQString::number( pilotSyncStatus() ) );
return true;
}
-bool KolabBase::load( const QString& xml )
+bool KolabBase::load( const TQString& xml )
{
- QString errorMsg;
+ TQString errorMsg;
int errorLine, errorColumn;
- QDomDocument document;
+ TQDomDocument document;
bool ok = document.setContent( xml, &errorMsg, &errorLine, &errorColumn );
if ( !ok ) {
@@ -370,11 +370,11 @@ bool KolabBase::load( const QString& xml )
return loadXML( document );
}
-bool KolabBase::load( QFile& xml )
+bool KolabBase::load( TQFile& xml )
{
- QString errorMsg;
+ TQString errorMsg;
int errorLine, errorColumn;
- QDomDocument document;
+ TQDomDocument document;
bool ok = document.setContent( &xml, &errorMsg, &errorLine, &errorColumn );
if ( !ok ) {
@@ -387,41 +387,41 @@ bool KolabBase::load( QFile& xml )
return loadXML( document );
}
-QDomDocument KolabBase::domTree()
+TQDomDocument KolabBase::domTree()
{
- QDomDocument document;
+ TQDomDocument document;
- QString p = "version=\"1.0\" encoding=\"UTF-8\"";
+ TQString p = "version=\"1.0\" encoding=\"UTF-8\"";
document.appendChild(document.createProcessingInstruction( "xml", p ) );
return document;
}
-QString KolabBase::dateTimeToString( const QDateTime& time )
+TQString KolabBase::dateTimeToString( const TQDateTime& time )
{
return time.toString( Qt::ISODate ) + 'Z';
}
-QString KolabBase::dateToString( const QDate& date )
+TQString KolabBase::dateToString( const TQDate& date )
{
return date.toString( Qt::ISODate );
}
-QDateTime KolabBase::stringToDateTime( const QString& _date )
+TQDateTime KolabBase::stringToDateTime( const TQString& _date )
{
- QString date( _date );
+ TQString date( _date );
if ( date.endsWith( "Z" ) )
date.truncate( date.length() - 1 );
- return QDateTime::fromString( date, Qt::ISODate );
+ return TQDateTime::fromString( date, Qt::ISODate );
}
-QDate KolabBase::stringToDate( const QString& date )
+TQDate KolabBase::stringToDate( const TQString& date )
{
- return QDate::fromString( date, Qt::ISODate );
+ return TQDate::fromString( date, Qt::ISODate );
}
-QString KolabBase::sensitivityToString( Sensitivity s )
+TQString KolabBase::sensitivityToString( Sensitivity s )
{
switch( s ) {
case Private: return "private";
@@ -432,7 +432,7 @@ QString KolabBase::sensitivityToString( Sensitivity s )
return "What what what???";
}
-KolabBase::Sensitivity KolabBase::stringToSensitivity( const QString& s )
+KolabBase::Sensitivity KolabBase::stringToSensitivity( const TQString& s )
{
if ( s == "private" )
return Private;
@@ -441,34 +441,34 @@ KolabBase::Sensitivity KolabBase::stringToSensitivity( const QString& s )
return Public;
}
-QString KolabBase::colorToString( const QColor& color )
+TQString KolabBase::colorToString( const TQColor& color )
{
// Color is in the format "#RRGGBB"
return color.name();
}
-QColor KolabBase::stringToColor( const QString& s )
+TQColor KolabBase::stringToColor( const TQString& s )
{
- return QColor( s );
+ return TQColor( s );
}
-void KolabBase::writeString( QDomElement& element, const QString& tag,
- const QString& tagString )
+void KolabBase::writeString( TQDomElement& element, const TQString& tag,
+ const TQString& tagString )
{
if ( !tagString.isEmpty() ) {
- QDomElement e = element.ownerDocument().createElement( tag );
- QDomText t = element.ownerDocument().createTextNode( tagString );
+ TQDomElement e = element.ownerDocument().createElement( tag );
+ TQDomText t = element.ownerDocument().createTextNode( tagString );
e.appendChild( t );
element.appendChild( e );
}
}
-QDateTime KolabBase::localToUTC( const QDateTime& time ) const
+TQDateTime KolabBase::localToUTC( const TQDateTime& time ) const
{
return KPimPrefs::localTimeToUtc( time, mTimeZoneId );
}
-QDateTime KolabBase::utcToLocal( const QDateTime& time ) const
+TQDateTime KolabBase::utcToLocal( const TQDateTime& time ) const
{
return KPimPrefs::utcToLocalTime( time, mTimeZoneId );
}
diff --git a/kresources/kolab/shared/kolabbase.h b/kresources/kolab/shared/kolabbase.h
index 053683989..ac34eb884 100644
--- a/kresources/kolab/shared/kolabbase.h
+++ b/kresources/kolab/shared/kolabbase.h
@@ -34,9 +34,9 @@
#ifndef KOLABBASE_H
#define KOLABBASE_H
-#include <qdom.h>
-#include <qdatetime.h>
-#include <qcolor.h>
+#include <tqdom.h>
+#include <tqdatetime.h>
+#include <tqcolor.h>
class QFile;
@@ -54,38 +54,38 @@ class KolabBase {
public:
struct Email {
public:
- Email( const QString& name = QString::null,
- const QString& email = QString::null )
+ Email( const TQString& name = TQString::null,
+ const TQString& email = TQString::null )
: displayName( name ), smtpAddress( email )
{
}
- QString displayName;
- QString smtpAddress;
+ TQString displayName;
+ TQString smtpAddress;
};
enum Sensitivity { Public = 0, Private = 1, Confidential = 2 };
- explicit KolabBase( const QString& timezone = QString::null );
+ explicit KolabBase( const TQString& timezone = TQString::null );
virtual ~KolabBase();
// Return a string identifying this type
- virtual QString type() const = 0;
+ virtual TQString type() const = 0;
- virtual void setUid( const QString& uid );
- virtual QString uid() const;
+ virtual void setUid( const TQString& uid );
+ virtual TQString uid() const;
- virtual void setBody( const QString& body );
- virtual QString body() const;
+ virtual void setBody( const TQString& body );
+ virtual TQString body() const;
- virtual void setCategories( const QString& categories );
- virtual QString categories() const;
+ virtual void setCategories( const TQString& categories );
+ virtual TQString categories() const;
- virtual void setCreationDate( const QDateTime& date );
- virtual QDateTime creationDate() const;
+ virtual void setCreationDate( const TQDateTime& date );
+ virtual TQDateTime creationDate() const;
- virtual void setLastModified( const QDateTime& date );
- virtual QDateTime lastModified() const;
+ virtual void setLastModified( const TQDateTime& date );
+ virtual TQDateTime lastModified() const;
virtual void setSensitivity( Sensitivity sensitivity );
virtual Sensitivity sensitivity() const;
@@ -99,28 +99,28 @@ public:
virtual int pilotSyncStatus() const;
// String - Date conversion methods
- static QString dateTimeToString( const QDateTime& time );
- static QString dateToString( const QDate& date );
- static QDateTime stringToDateTime( const QString& time );
- static QDate stringToDate( const QString& date );
+ static TQString dateTimeToString( const TQDateTime& time );
+ static TQString dateToString( const TQDate& date );
+ static TQDateTime stringToDateTime( const TQString& time );
+ static TQDate stringToDate( const TQString& date );
// String - Sensitivity conversion methods
- static QString sensitivityToString( Sensitivity );
- static Sensitivity stringToSensitivity( const QString& );
+ static TQString sensitivityToString( Sensitivity );
+ static Sensitivity stringToSensitivity( const TQString& );
// String - Color conversion methods
- static QString colorToString( const QColor& );
- static QColor stringToColor( const QString& );
+ static TQString colorToString( const TQColor& );
+ static TQColor stringToColor( const TQString& );
// Load this object by reading the XML file
- bool load( const QString& xml );
- bool load( QFile& xml );
+ bool load( const TQString& xml );
+ bool load( TQFile& xml );
// Load this QDomDocument
- virtual bool loadXML( const QDomDocument& xml ) = 0;
+ virtual bool loadXML( const TQDomDocument& xml ) = 0;
// Serialize this object to an XML string
- virtual QString saveXML() const = 0;
+ virtual TQString saveXML() const = 0;
protected:
/// Read all known fields from this ical incidence
@@ -136,35 +136,35 @@ protected:
void saveTo( KABC::Addressee* ) const;
// This just makes the initial dom tree with version and doctype
- static QDomDocument domTree();
+ static TQDomDocument domTree();
- bool loadEmailAttribute( QDomElement& element, Email& email );
+ bool loadEmailAttribute( TQDomElement& element, Email& email );
- void saveEmailAttribute( QDomElement& element, const Email& email,
- const QString& tagName = "email" ) const;
+ void saveEmailAttribute( TQDomElement& element, const Email& email,
+ const TQString& tagName = "email" ) const;
// Load the attributes of this class
- virtual bool loadAttribute( QDomElement& );
+ virtual bool loadAttribute( TQDomElement& );
// Save the attributes of this class
- virtual bool saveAttributes( QDomElement& ) const;
+ virtual bool saveAttributes( TQDomElement& ) const;
// Return the product ID
- virtual QString productID() const = 0;
+ virtual TQString productID() const = 0;
// Write a string tag
- static void writeString( QDomElement&, const QString&, const QString& );
+ static void writeString( TQDomElement&, const TQString&, const TQString& );
- QDateTime localToUTC( const QDateTime& time ) const;
- QDateTime utcToLocal( const QDateTime& time ) const;
+ TQDateTime localToUTC( const TQDateTime& time ) const;
+ TQDateTime utcToLocal( const TQDateTime& time ) const;
- QString mUid;
- QString mBody;
- QString mCategories;
- QDateTime mCreationDate;
- QDateTime mLastModified;
+ TQString mUid;
+ TQString mBody;
+ TQString mCategories;
+ TQDateTime mCreationDate;
+ TQDateTime mLastModified;
Sensitivity mSensitivity;
- QString mTimeZoneId;
+ TQString mTimeZoneId;
// KPilot synchronization stuff
bool mHasPilotSyncId, mHasPilotSyncStatus;
diff --git a/kresources/kolab/shared/resourcekolabbase.cpp b/kresources/kolab/shared/resourcekolabbase.cpp
index d62a5bb54..291910fb9 100644
--- a/kresources/kolab/shared/resourcekolabbase.cpp
+++ b/kresources/kolab/shared/resourcekolabbase.cpp
@@ -42,19 +42,19 @@
#include <kurl.h>
#include <ktempfile.h>
#include <kmessagebox.h>
-#include <qtextstream.h>
+#include <tqtextstream.h>
#include <kdebug.h>
using namespace Kolab;
static unsigned int uniquifier = 0;
-ResourceKolabBase::ResourceKolabBase( const QCString& objId )
+ResourceKolabBase::ResourceKolabBase( const TQCString& objId )
: mSilent( false )
{
KGlobal::locale()->insertCatalogue( "kres_kolab" );
KGlobal::locale()->insertCatalogue( "libkcal" );
- QString uniqueObjId = QString( objId ) + QString::number( uniquifier++ );
+ TQString uniqueObjId = TQString( objId ) + TQString::number( uniquifier++ );
mConnection = new KMailConnection( this, uniqueObjId.utf8() );
}
@@ -64,61 +64,61 @@ ResourceKolabBase::~ResourceKolabBase()
}
-bool ResourceKolabBase::kmailSubresources( QValueList<KMailICalIface::SubResource>& lst,
- const QString& contentsType ) const
+bool ResourceKolabBase::kmailSubresources( TQValueList<KMailICalIface::SubResource>& lst,
+ const TQString& contentsType ) const
{
return mConnection->kmailSubresources( lst, contentsType );
}
-bool ResourceKolabBase::kmailTriggerSync( const QString& contentsType ) const
+bool ResourceKolabBase::kmailTriggerSync( const TQString& contentsType ) const
{
return mConnection->kmailTriggerSync( contentsType );
}
bool ResourceKolabBase::kmailIncidencesCount( int &count,
- const QString& mimetype,
- const QString& resource ) const
+ const TQString& mimetype,
+ const TQString& resource ) const
{
return mConnection->kmailIncidencesCount( count, mimetype, resource );
}
-bool ResourceKolabBase::kmailIncidences( QMap<Q_UINT32, QString>& lst,
- const QString& mimetype,
- const QString& resource,
+bool ResourceKolabBase::kmailIncidences( TQMap<Q_UINT32, TQString>& lst,
+ const TQString& mimetype,
+ const TQString& resource,
int startIndex,
int nbMessages ) const
{
return mConnection->kmailIncidences( lst, mimetype, resource, startIndex, nbMessages );
}
-bool ResourceKolabBase::kmailGetAttachment( KURL& url, const QString& resource,
+bool ResourceKolabBase::kmailGetAttachment( KURL& url, const TQString& resource,
Q_UINT32 sernum,
- const QString& filename ) const
+ const TQString& filename ) const
{
return mConnection->kmailGetAttachment( url, resource, sernum, filename );
}
-bool ResourceKolabBase::kmailAttachmentMimetype( QString & mimeType, QString & resource,
- Q_UINT32 sernum, const QString & filename ) const
+bool ResourceKolabBase::kmailAttachmentMimetype( TQString & mimeType, TQString & resource,
+ Q_UINT32 sernum, const TQString & filename ) const
{
return mConnection->kmailAttachmentMimetype( mimeType, resource, sernum, filename );
}
-bool ResourceKolabBase::kmailListAttachments( QStringList &list,
- const QString & resource,
+bool ResourceKolabBase::kmailListAttachments( TQStringList &list,
+ const TQString & resource,
Q_UINT32 sernum ) const
{
return mConnection->kmailListAttachments( list, resource, sernum );
}
-bool ResourceKolabBase::kmailDeleteIncidence( const QString& resource,
+bool ResourceKolabBase::kmailDeleteIncidence( const TQString& resource,
Q_UINT32 sernum )
{
return mSilent || mConnection->kmailDeleteIncidence( resource, sernum );
}
-static QString plainTextBody()
+static TQString plainTextBody()
{
const char * firstPartTextToTranslate = I18N_NOOP(
"This is a Kolab Groupware object.\nTo view this object you"
@@ -126,8 +126,8 @@ static QString plainTextBody()
" Groupware format.\nFor a list of such email clients please"
" visit\n%1" );
const char * url = "http://www.kolab.org/kolab2-clients.html";
- QString firstPartTextUntranslated = QString::fromLatin1( firstPartTextToTranslate ).arg( url );
- QString firstPartText = i18n( firstPartTextToTranslate ).arg( url );
+ TQString firstPartTextUntranslated = TQString::fromLatin1( firstPartTextToTranslate ).arg( url );
+ TQString firstPartText = i18n( firstPartTextToTranslate ).arg( url );
if ( firstPartText != firstPartTextUntranslated ) {
firstPartText.append("\n\n-----------------------------------------------------\n\n");
firstPartText.append( firstPartTextUntranslated );
@@ -135,21 +135,21 @@ static QString plainTextBody()
return firstPartText;
}
-bool ResourceKolabBase::kmailUpdate( const QString& resource,
+bool ResourceKolabBase::kmailUpdate( const TQString& resource,
Q_UINT32& sernum,
- const QString& xml,
- const QString& mimetype,
- const QString& subject,
+ const TQString& xml,
+ const TQString& mimetype,
+ const TQString& subject,
const CustomHeaderMap& _customHeaders,
- const QStringList& _attachmentURLs,
- const QStringList& _attachmentMimetypes,
- const QStringList& _attachmentNames,
- const QStringList& deletedAttachments )
+ const TQStringList& _attachmentURLs,
+ const TQStringList& _attachmentMimetypes,
+ const TQStringList& _attachmentNames,
+ const TQStringList& deletedAttachments )
{
if ( mSilent )
return true;
- QString subj = subject;
+ TQString subj = subject;
if ( subj.isEmpty() )
subj = i18n("Internal kolab data: Do not delete this mail.");
@@ -158,15 +158,15 @@ bool ResourceKolabBase::kmailUpdate( const QString& resource,
// Save the xml file. Will be deleted at the end of this method
KTempFile file;
file.setAutoDelete( true );
- QTextStream* stream = file.textStream();
- stream->setEncoding( QTextStream::UnicodeUTF8 );
+ TQTextStream* stream = file.textStream();
+ stream->setEncoding( TQTextStream::UnicodeUTF8 );
*stream << xml;
file.close();
// Add the xml file as an attachment
- QStringList attachmentURLs = _attachmentURLs;
- QStringList attachmentMimeTypes = _attachmentMimetypes;
- QStringList attachmentNames = _attachmentNames;
+ TQStringList attachmentURLs = _attachmentURLs;
+ TQStringList attachmentMimeTypes = _attachmentMimetypes;
+ TQStringList attachmentNames = _attachmentNames;
KURL url;
url.setPath( file.name() );
url.setFileEncoding( "UTF-8" );
@@ -187,10 +187,10 @@ bool ResourceKolabBase::kmailUpdate( const QString& resource,
}
}
-QString ResourceKolabBase::configFile( const QString& type ) const
+TQString ResourceKolabBase::configFile( const TQString& type ) const
{
return locateLocal( "config",
- QString( "kresources/kolab/%1rc" ).arg( type ) );
+ TQString( "kresources/kolab/%1rc" ).arg( type ) );
}
bool ResourceKolabBase::connectToKMail() const
@@ -198,25 +198,25 @@ bool ResourceKolabBase::connectToKMail() const
return mConnection->connectToKMail();
}
-bool ResourceKolabBase::kmailAddSubresource( const QString& resource,
- const QString& parent,
- const QString& contentsType )
+bool ResourceKolabBase::kmailAddSubresource( const TQString& resource,
+ const TQString& parent,
+ const TQString& contentsType )
{
return mConnection->kmailAddSubresource( resource, parent, contentsType );
}
-bool ResourceKolabBase::kmailRemoveSubresource( const QString& resource )
+bool ResourceKolabBase::kmailRemoveSubresource( const TQString& resource )
{
return mConnection->kmailRemoveSubresource( resource );
}
-QString ResourceKolabBase::findWritableResource( const ResourceMap& resources,
- const QString& text )
+TQString ResourceKolabBase::findWritableResource( const ResourceMap& resources,
+ const TQString& text )
{
// I have to use the label (shown in the dialog) as key here. But given how the
// label is made up, it should be unique. If it's not, well the dialog would suck anyway...
- QMap<QString, QString> possible;
- QStringList labels;
+ TQMap<TQString, TQString> possible;
+ TQStringList labels;
ResourceMap::ConstIterator it;
for ( it = resources.begin(); it != resources.end(); ++it ) {
if ( it.data().writable() && it.data().active() ) {
@@ -228,26 +228,26 @@ QString ResourceKolabBase::findWritableResource( const ResourceMap& resources,
if ( possible.isEmpty() ) { // None found!!
kdWarning(5650) << "No writable resource found!" << endl;
KMessageBox::error( 0, i18n( "No writable resource was found, saving will not be possible. Reconfigure KMail first." ) );
- return QString::null;
+ return TQString::null;
}
if ( possible.count() == 1 )
// Just one found
return possible.begin().data(); // yes this is the subresource key, i.e. location
- QString t = text;
+ TQString t = text;
if ( t.isEmpty() )
i18n( "You have more than one writable resource folder. "
"Please select the one you want to write to." );
// Several found, ask the user
- QString chosenLabel = KPIM::FolderSelectDialog::getItem( i18n( "Select Resource Folder" ),
+ TQString chosenLabel = KPIM::FolderSelectDialog::getItem( i18n( "Select Resource Folder" ),
t, possible.keys() );
if ( chosenLabel.isEmpty() ) // cancelled
- return QString::null;
+ return TQString::null;
return possible[chosenLabel];
}
-KMailICalIface::StorageFormat ResourceKolabBase::kmailStorageFormat( const QString &folder ) const
+KMailICalIface::StorageFormat ResourceKolabBase::kmailStorageFormat( const TQString &folder ) const
{
KMailICalIface::StorageFormat format = (KMailICalIface::StorageFormat) 3;
mConnection->kmailStorageFormat( format, folder );
diff --git a/kresources/kolab/shared/resourcekolabbase.h b/kresources/kolab/shared/resourcekolabbase.h
index 806220189..eca5cc80b 100644
--- a/kresources/kolab/shared/resourcekolabbase.h
+++ b/kresources/kolab/shared/resourcekolabbase.h
@@ -34,9 +34,9 @@
#ifndef RESOURCEKOLABBASE_H
#define RESOURCEKOLABBASE_H
-#include <qstring.h>
-#include <qmap.h>
-#include <qstringlist.h>
+#include <tqstring.h>
+#include <tqmap.h>
+#include <tqstringlist.h>
#include "subresource.h"
#include <kmail/kmailicalIface.h>
@@ -73,31 +73,31 @@ class KMailConnection;
*/
class ResourceKolabBase {
public:
- ResourceKolabBase( const QCString& objId );
+ ResourceKolabBase( const TQCString& objId );
virtual ~ResourceKolabBase();
// These are the methods called by KMail when the resource changes
- virtual bool fromKMailAddIncidence( const QString& type,
- const QString& resource,
+ virtual bool fromKMailAddIncidence( const TQString& type,
+ const TQString& resource,
Q_UINT32 sernum,
int format,
- const QString& data ) = 0;
- virtual void fromKMailDelIncidence( const QString& type,
- const QString& resource,
- const QString& xml ) = 0;
- virtual void fromKMailRefresh( const QString& type,
- const QString& resource ) = 0;
- virtual void fromKMailAddSubresource( const QString& type,
- const QString& resource,
- const QString& label,
+ const TQString& data ) = 0;
+ virtual void fromKMailDelIncidence( const TQString& type,
+ const TQString& resource,
+ const TQString& xml ) = 0;
+ virtual void fromKMailRefresh( const TQString& type,
+ const TQString& resource ) = 0;
+ virtual void fromKMailAddSubresource( const TQString& type,
+ const TQString& resource,
+ const TQString& label,
bool writable,
bool alarmRelevant ) = 0;
- virtual void fromKMailDelSubresource( const QString& type,
- const QString& resource ) = 0;
+ virtual void fromKMailDelSubresource( const TQString& type,
+ const TQString& resource ) = 0;
- virtual void fromKMailAsyncLoadResult( const QMap<Q_UINT32, QString>& map,
- const QString& type,
- const QString& folder ) = 0;
+ virtual void fromKMailAsyncLoadResult( const TQMap<Q_UINT32, TQString>& map,
+ const TQString& type,
+ const TQString& folder ) = 0;
protected:
/// Do the connection to KMail.
bool connectToKMail() const;
@@ -105,71 +105,71 @@ protected:
// These are the KMail dcop function connections. The docs here say
// "Get", which here means that the first argument is the return arg
- /// List all folders with a certain contentsType. Returns a QMap with
+ /// List all folders with a certain contentsType. Returns a TQMap with
/// resourcename/writable pairs
- bool kmailSubresources( QValueList<KMailICalIface::SubResource>& lst,
- const QString& contentsType ) const;
+ bool kmailSubresources( TQValueList<KMailICalIface::SubResource>& lst,
+ const TQString& contentsType ) const;
/// Get the number of messages in this folder.
/// Used to iterate over kmailIncidences by chunks
- bool kmailIncidencesCount( int& count, const QString& mimetype,
- const QString& resource ) const;
+ bool kmailIncidencesCount( int& count, const TQString& mimetype,
+ const TQString& resource ) const;
/// Get the mimetype attachments from a chunk of messages from this folder.
- /// Returns a QMap with serialNumber/attachment pairs.
- bool kmailIncidences( QMap<Q_UINT32, QString>& lst, const QString& mimetype,
- const QString& resource,
+ /// Returns a TQMap with serialNumber/attachment pairs.
+ bool kmailIncidences( TQMap<Q_UINT32, TQString>& lst, const TQString& mimetype,
+ const TQString& resource,
int startIndex,
int nbMessages ) const;
- bool kmailTriggerSync( const QString& contentType ) const;
+ bool kmailTriggerSync( const TQString& contentType ) const;
public: // for Contact
/// Get an attachment from a mail. Returns a URL to it. This can
/// be called by the resource after obtaining the incidence.
/// The resource must delete the temp file.
- bool kmailGetAttachment( KURL& url, const QString& resource,
+ bool kmailGetAttachment( KURL& url, const TQString& resource,
Q_UINT32 sernum,
- const QString& filename ) const;
+ const TQString& filename ) const;
/** Get the mimetype of the specified attachment. */
- bool kmailAttachmentMimetype( QString &mimeType, QString &resource,
- Q_UINT32 sernum, const QString &filename ) const;
+ bool kmailAttachmentMimetype( TQString &mimeType, TQString &resource,
+ Q_UINT32 sernum, const TQString &filename ) const;
/// List all attachments of a mail.
- bool kmailListAttachments( QStringList &list, const QString &resource,
+ bool kmailListAttachments( TQStringList &list, const TQString &resource,
Q_UINT32 sernum ) const;
protected:
/// Delete an incidence.
- bool kmailDeleteIncidence( const QString& resource, Q_UINT32 sernum );
+ bool kmailDeleteIncidence( const TQString& resource, Q_UINT32 sernum );
- KMailICalIface::StorageFormat kmailStorageFormat( const QString& folder ) const;
+ KMailICalIface::StorageFormat kmailStorageFormat( const TQString& folder ) const;
- typedef QMap<QCString, QString> CustomHeaderMap;
+ typedef TQMap<TQCString, TQString> CustomHeaderMap;
/// Update an incidence. The list of attachments are URLs.
/// The parameter sernum is updated with the right KMail serial number
- bool kmailUpdate( const QString& resource, Q_UINT32& sernum,
- const QString& xml,
- const QString& mimetype,
- const QString& subject,
+ bool kmailUpdate( const TQString& resource, Q_UINT32& sernum,
+ const TQString& xml,
+ const TQString& mimetype,
+ const TQString& subject,
const CustomHeaderMap& customHeaders = CustomHeaderMap(),
- const QStringList& attachmentURLs = QStringList(),
- const QStringList& attachmentMimetypes = QStringList(),
- const QStringList& attachmentNames = QStringList(),
- const QStringList& deletedAttachments = QStringList() );
+ const TQStringList& attachmentURLs = TQStringList(),
+ const TQStringList& attachmentMimetypes = TQStringList(),
+ const TQStringList& attachmentNames = TQStringList(),
+ const TQStringList& deletedAttachments = TQStringList() );
- bool kmailAddSubresource( const QString& resource, const QString& parent,
- const QString& contentsType );
- bool kmailRemoveSubresource( const QString& resource );
+ bool kmailAddSubresource( const TQString& resource, const TQString& parent,
+ const TQString& contentsType );
+ bool kmailRemoveSubresource( const TQString& resource );
/// Get the full path of the config file.
- QString configFile( const QString& type ) const;
+ TQString configFile( const TQString& type ) const;
/// If only one of these is writable, return that. Otherwise return null.
- QString findWritableResource( const ResourceMap& resources,
- const QString& text = QString::null );
+ TQString findWritableResource( const ResourceMap& resources,
+ const TQString& text = TQString::null );
bool mSilent;
@@ -182,9 +182,9 @@ protected:
/// This is used to distinguish operations triggered by the user,
/// from operations triggered by KMail
- QStringList mUidsPendingAdding;
- QStringList mUidsPendingDeletion;
- QStringList mUidsPendingUpdate;
+ TQStringList mUidsPendingAdding;
+ TQStringList mUidsPendingDeletion;
+ TQStringList mUidsPendingUpdate;
private:
mutable KMailConnection* mConnection;
diff --git a/kresources/kolab/shared/subresource.cpp b/kresources/kolab/shared/subresource.cpp
index 67216913a..de4048fc7 100644
--- a/kresources/kolab/shared/subresource.cpp
+++ b/kresources/kolab/shared/subresource.cpp
@@ -35,7 +35,7 @@
using namespace Kolab;
SubResource::SubResource( bool active, bool writable,
- bool alarmRelevant, const QString& label,
+ bool alarmRelevant, const TQString& label,
int completionWeight )
: mActive( active ), mWritable( writable ), mAlarmRelevant( alarmRelevant ),
mLabel( label ), mCompletionWeight( completionWeight )
@@ -43,7 +43,7 @@ SubResource::SubResource( bool active, bool writable,
}
SubResource::SubResource( bool active, bool writable,
- const QString& label, int completionWeight )
+ const TQString& label, int completionWeight )
: mActive( active ), mWritable( writable ), mAlarmRelevant( false ),
mLabel( label ), mCompletionWeight( completionWeight )
{
@@ -83,12 +83,12 @@ bool SubResource::writable() const
return mWritable;
}
-void SubResource::setLabel( const QString& label )
+void SubResource::setLabel( const TQString& label )
{
mLabel = label;
}
-QString SubResource::label() const
+TQString SubResource::label() const
{
return mLabel;
}
@@ -103,7 +103,7 @@ int SubResource::completionWeight() const
return mCompletionWeight;
}
-StorageReference::StorageReference( const QString& resource, Q_UINT32 sernum )
+StorageReference::StorageReference( const TQString& resource, Q_UINT32 sernum )
: mResource( resource ), mSerialNumber( sernum )
{
}
@@ -112,12 +112,12 @@ StorageReference::~StorageReference()
{
}
-void StorageReference::setResource( const QString& resource )
+void StorageReference::setResource( const TQString& resource )
{
mResource = resource;
}
-QString StorageReference::resource() const
+TQString StorageReference::resource() const
{
return mResource;
}
diff --git a/kresources/kolab/shared/subresource.h b/kresources/kolab/shared/subresource.h
index 1bdd98cd5..87f98e6dd 100644
--- a/kresources/kolab/shared/subresource.h
+++ b/kresources/kolab/shared/subresource.h
@@ -33,8 +33,8 @@
#ifndef SUBRESOURCE_H
#define SUBRESOURCE_H
-#include <qstring.h>
-#include <qmap.h>
+#include <tqstring.h>
+#include <tqmap.h>
namespace Kolab {
@@ -48,11 +48,11 @@ public:
// This is just for QMap
SubResource() {}
- SubResource( bool active, bool writable, const QString& label,
+ SubResource( bool active, bool writable, const TQString& label,
int completionWeight = 100 );
SubResource( bool active, bool writable, bool alarmRelevant,
- const QString& label, int completionWeight = 100 );
+ const TQString& label, int completionWeight = 100 );
virtual ~SubResource();
virtual void setActive( bool active );
@@ -64,8 +64,8 @@ public:
virtual void setAlarmRelevant( bool active );
virtual bool alarmRelevant() const;
- virtual void setLabel( const QString& label );
- virtual QString label() const;
+ virtual void setLabel( const TQString& label );
+ virtual TQString label() const;
virtual void setCompletionWeight( int completionWeight );
virtual int completionWeight() const;
@@ -75,7 +75,7 @@ private:
bool mWritable; // Set if the KMail folder is writable
bool mAlarmRelevant; // Set if the alarms from this resource are of
// interest to the user, as per folder acls
- QString mLabel; // The GUI name of this resource
+ TQString mLabel; // The GUI name of this resource
// This is just for the abc plugin. But as long as only this is here,
// it's just as cheap to have it in here as making a d-pointer that
@@ -84,7 +84,7 @@ private:
int mCompletionWeight;
};
-typedef QMap<QString, SubResource> ResourceMap;
+typedef TQMap<TQString, SubResource> ResourceMap;
/**
* This class is used to store a mapping from the XML UID to the KMail
@@ -96,21 +96,21 @@ public:
// Just for QMap
StorageReference() {}
- StorageReference( const QString& resource, Q_UINT32 sernum );
+ StorageReference( const TQString& resource, Q_UINT32 sernum );
virtual ~StorageReference();
- virtual void setResource( const QString& resource );
- virtual QString resource() const;
+ virtual void setResource( const TQString& resource );
+ virtual TQString resource() const;
virtual void setSerialNumber( Q_UINT32 serialNumber );
virtual Q_UINT32 serialNumber() const;
private:
- QString mResource;
+ TQString mResource;
Q_UINT32 mSerialNumber;
};
-typedef QMap<QString, StorageReference> UidMap;
+typedef TQMap<TQString, StorageReference> UidMap;
}
diff --git a/kresources/lib/addressbookadaptor.cpp b/kresources/lib/addressbookadaptor.cpp
index f698e5430..900772e56 100644
--- a/kresources/lib/addressbookadaptor.cpp
+++ b/kresources/lib/addressbookadaptor.cpp
@@ -51,18 +51,18 @@ AddressBookAdaptor::AddressBookAdaptor()
{
}
-QString AddressBookAdaptor::mimeType() const
+TQString AddressBookAdaptor::mimeType() const
{
return "text/x-vcard";
}
-bool AddressBookAdaptor::localItemExists( const QString &localId )
+bool AddressBookAdaptor::localItemExists( const TQString &localId )
{
KABC::Addressee a = mResource->findByUid( localId );
return !a.isEmpty();
}
-bool AddressBookAdaptor::localItemHasChanged( const QString &localId )
+bool AddressBookAdaptor::localItemHasChanged( const TQString &localId )
{
KABC::Addressee::List addressees = mResource->deletedAddressees();
KABC::Addressee::List::ConstIterator it;
@@ -79,7 +79,7 @@ bool AddressBookAdaptor::localItemHasChanged( const QString &localId )
}
-void AddressBookAdaptor::deleteItem( const QString &localId )
+void AddressBookAdaptor::deleteItem( const TQString &localId )
{
KABC::Addressee a = mResource->findByUid( localId );
if ( !a.isEmpty() ) {
@@ -98,12 +98,12 @@ void AddressBookAdaptor::addItem( KABC::Addressee addr )
}
void AddressBookAdaptor::addressbookItemDownloaded( KABC::Addressee addr,
- const QString &newLocalId, const KURL &remoteId, const QString &fingerprint,
- const QString &storagelocation )
+ const TQString &newLocalId, const KURL &remoteId, const TQString &fingerprint,
+ const TQString &storagelocation )
{
// remove the currently existing item from the cache
deleteItem( newLocalId );
- QString localId = idMapper()->localId( remoteId.path() );
+ TQString localId = idMapper()->localId( remoteId.path() );
if ( !localId.isEmpty() ) deleteItem( localId );
// add the new item
@@ -118,7 +118,7 @@ void AddressBookAdaptor::addressbookItemDownloaded( KABC::Addressee addr,
}
-void AddressBookAdaptor::clearChange( const QString &uid )
+void AddressBookAdaptor::clearChange( const TQString &uid )
{
mResource->clearChange( uid );
}
diff --git a/kresources/lib/addressbookadaptor.h b/kresources/lib/addressbookadaptor.h
index fb9f2971d..fb4408eca 100644
--- a/kresources/lib/addressbookadaptor.h
+++ b/kresources/lib/addressbookadaptor.h
@@ -48,9 +48,9 @@ class KDE_EXPORT AddressBookAdaptor : public KPIM::GroupwareDataAdaptor
public:
AddressBookAdaptor();
- QValueList<KPIM::FolderLister::ContentType> supportedTypes()
+ TQValueList<KPIM::FolderLister::ContentType> supportedTypes()
{
- QValueList<KPIM::FolderLister::ContentType> types;
+ TQValueList<KPIM::FolderLister::ContentType> types;
types << KPIM::FolderLister::Contact;
return types;
}
@@ -70,18 +70,18 @@ class KDE_EXPORT AddressBookAdaptor : public KPIM::GroupwareDataAdaptor
return mResource;
}
- QString mimeType() const;
- bool localItemExists( const QString &localId );
- bool localItemHasChanged( const QString &localId );
- void deleteItem( const QString &localId );
+ TQString mimeType() const;
+ bool localItemExists( const TQString &localId );
+ bool localItemHasChanged( const TQString &localId );
+ void deleteItem( const TQString &localId );
void addItem( KABC::Addressee addr );
- void clearChange( const QString &uid );
+ void clearChange( const TQString &uid );
virtual KPIM::GroupwareUploadItem *newUploadItem( KABC::Addressee addr,
KPIM::GroupwareUploadItem::UploadType type );
virtual void addressbookItemDownloaded( KABC::Addressee addr,
- const QString &newLocalId, const KURL &remoteId,
- const QString &fingerprint, const QString &storagelocation );
+ const TQString &newLocalId, const KURL &remoteId,
+ const TQString &fingerprint, const TQString &storagelocation );
private:
KABC::ResourceCached *mResource;
diff --git a/kresources/lib/calendaradaptor.cpp b/kresources/lib/calendaradaptor.cpp
index ddba9961c..88685bdfe 100644
--- a/kresources/lib/calendaradaptor.cpp
+++ b/kresources/lib/calendaradaptor.cpp
@@ -58,18 +58,18 @@ CalendarAdaptor::CalendarAdaptor()
{
}
-QString CalendarAdaptor::mimeType() const
+TQString CalendarAdaptor::mimeType() const
{
return "text/calendar";
}
-bool CalendarAdaptor::localItemExists( const QString &localId )
+bool CalendarAdaptor::localItemExists( const TQString &localId )
{
KCal::Incidence *i = mResource->incidence( localId );
return i;
}
-bool CalendarAdaptor::localItemHasChanged( const QString &localId )
+bool CalendarAdaptor::localItemHasChanged( const TQString &localId )
{
KCal::Incidence *i = mResource->incidence( localId );
if ( !i ) return false;
@@ -86,7 +86,7 @@ bool CalendarAdaptor::localItemHasChanged( const QString &localId )
return false;
}
-void CalendarAdaptor::deleteItem( const QString &localId )
+void CalendarAdaptor::deleteItem( const TQString &localId )
{
mResource->disableChangeNotification();
KCal::Incidence *i = mResource->incidence( localId );
@@ -113,13 +113,13 @@ void CalendarAdaptor::addItem( KCal::Incidence *i)
void CalendarAdaptor::calendarItemDownloaded( KCal::Incidence *inc,
- const QString &newLocalId, const KURL &remoteId, const QString &fingerprint,
- const QString &storagelocation )
+ const TQString &newLocalId, const KURL &remoteId, const TQString &fingerprint,
+ const TQString &storagelocation )
{
kdDebug() << "CalendarAdaptor::calendarItemDownloaded, inc=" << inc->summary() << ", local=" << newLocalId << ", remote=" << remoteId.url() << ", fpr=" << fingerprint << ", storagelocation="<< storagelocation << endl;
// remove the currently existing item from the cache
deleteItem( newLocalId );
- QString localId = idMapper()->localId( remoteId.path() );
+ TQString localId = idMapper()->localId( remoteId.path() );
if ( !localId.isEmpty() ) deleteItem( localId );
// add the new item
@@ -135,7 +135,7 @@ kdDebug() << "CalendarAdaptor::calendarItemDownloaded, inc=" << inc->summary() <
}
-void CalendarAdaptor::clearChange( const QString &uid )
+void CalendarAdaptor::clearChange( const TQString &uid )
{
KCal::Incidence *i = mResource->incidence( uid );
mResource->clearChange( i );
diff --git a/kresources/lib/calendaradaptor.h b/kresources/lib/calendaradaptor.h
index 6ef338d18..fddcfd7aa 100644
--- a/kresources/lib/calendaradaptor.h
+++ b/kresources/lib/calendaradaptor.h
@@ -55,9 +55,9 @@ class KDE_EXPORT CalendarAdaptor : public KPIM::GroupwareDataAdaptor
public:
CalendarAdaptor();
- QValueList<KPIM::FolderLister::ContentType> supportedTypes()
+ TQValueList<KPIM::FolderLister::ContentType> supportedTypes()
{
- QValueList<KPIM::FolderLister::ContentType> types;
+ TQValueList<KPIM::FolderLister::ContentType> types;
types << KPIM::FolderLister::Event;
types << KPIM::FolderLister::Todo;
types << KPIM::FolderLister::Journal;
@@ -79,11 +79,11 @@ class KDE_EXPORT CalendarAdaptor : public KPIM::GroupwareDataAdaptor
return mResource;
}
- virtual QString mimeType() const;
- bool localItemExists( const QString &localId );
- bool localItemHasChanged( const QString &localId );
- void deleteItem( const QString &localId );
- void clearChange( const QString &uid );
+ virtual TQString mimeType() const;
+ bool localItemExists( const TQString &localId );
+ bool localItemHasChanged( const TQString &localId );
+ void deleteItem( const TQString &localId );
+ void clearChange( const TQString &uid );
virtual KPIM::GroupwareUploadItem *newUploadItem( KCal::Incidence*it,
KPIM::GroupwareUploadItem::UploadType type );
@@ -91,17 +91,17 @@ class KDE_EXPORT CalendarAdaptor : public KPIM::GroupwareDataAdaptor
public slots:
/** newLocalId is the new id that was (randomly) assigned to the item */
virtual void calendarItemDownloaded( KCal::Incidence *inc,
- const QString &newLocalId, const KURL &remoteId,
- const QString &fingerprint, const QString &storagelocation );
+ const TQString &newLocalId, const KURL &remoteId,
+ const TQString &fingerprint, const TQString &storagelocation );
protected:
void addItem( KCal::Incidence *i );
private:
KCal::ResourceCached *mResource;
- QStringList mAddedItems;
- QStringList mChangedItems;
- QStringList mDeletedItems;
+ TQStringList mAddedItems;
+ TQStringList mChangedItems;
+ TQStringList mDeletedItems;
};
}
diff --git a/kresources/lib/davaddressbookadaptor.cpp b/kresources/lib/davaddressbookadaptor.cpp
index 1ce009654..b6f54c1e1 100644
--- a/kresources/lib/davaddressbookadaptor.cpp
+++ b/kresources/lib/davaddressbookadaptor.cpp
@@ -42,17 +42,17 @@ void DavAddressBookAdaptor::interpretListFoldersJob( KIO::Job *job, KPIM::Folder
Q_ASSERT( davjob );
if ( !davjob ) return;
- QDomDocument doc = davjob->response();
+ TQDomDocument doc = davjob->response();
kdDebug(7000) << " Doc: " << doc.toString() << endl;
- QDomElement docElement = doc.documentElement();
- QDomNode n;
+ TQDomElement docElement = doc.documentElement();
+ TQDomNode n;
for( n = docElement.firstChild(); !n.isNull(); n = n.nextSibling() ) {
- QDomNode n2 = n.namedItem( "propstat" );
- QDomNode n3 = n2.namedItem( "prop" );
+ TQDomNode n2 = n.namedItem( "propstat" );
+ TQDomNode n3 = n2.namedItem( "prop" );
KURL href( n.namedItem( "href" ).toElement().text() );
- QString displayName = n3.namedItem( "displayname" ).toElement().text();
+ TQString displayName = n3.namedItem( "displayname" ).toElement().text();
KPIM::FolderLister::ContentType type = getContentType( n3 );
emit folderInfoRetrieved( href, displayName, type );
diff --git a/kresources/lib/davaddressbookadaptor.h b/kresources/lib/davaddressbookadaptor.h
index ef5c04077..bdf9e35b8 100644
--- a/kresources/lib/davaddressbookadaptor.h
+++ b/kresources/lib/davaddressbookadaptor.h
@@ -23,7 +23,7 @@
#include "addressbookadaptor.h"
#include "folderlister.h"
-#include <qdom.h>
+#include <tqdom.h>
#include <kdepimmacros.h>
namespace KABC {
@@ -41,10 +41,10 @@ class KDE_EXPORT DavAddressBookAdaptor : public AddressBookAdaptor
virtual void interpretListFoldersJob( KIO::Job *job, KPIM::FolderLister *folderLister );
/** Returns the type of folder retrieved in the dom node. Typically, you'll
compare the DAV:resourcetype property with some values. */
- virtual KPIM::FolderLister::ContentType getContentType( const QDomNode &folderNode ) = 0;
+ virtual KPIM::FolderLister::ContentType getContentType( const TQDomNode &folderNode ) = 0;
/** Extract from the dav response whether the folder has subitems that need
to be examined */
- virtual bool getFolderHasSubs( const QDomNode &folderNode ) = 0;
+ virtual bool getFolderHasSubs( const TQDomNode &folderNode ) = 0;
};
}
diff --git a/kresources/lib/davcalendaradaptor.cpp b/kresources/lib/davcalendaradaptor.cpp
index 541b12bb8..a950e405c 100644
--- a/kresources/lib/davcalendaradaptor.cpp
+++ b/kresources/lib/davcalendaradaptor.cpp
@@ -25,7 +25,7 @@
#include <kio/davjob.h>
// #include <folderlister.h>
-// #include <qdom.h>
+// #include <tqdom.h>
using namespace KCal;
@@ -37,17 +37,17 @@ void DavCalendarAdaptor::interpretListFoldersJob( KIO::Job *job, KPIM::FolderLis
Q_ASSERT( davjob );
if ( !davjob ) return;
- QDomDocument doc = davjob->response();
+ TQDomDocument doc = davjob->response();
kdDebug(7000) << " Doc: " << doc.toString() << endl;
- QDomElement docElement = doc.documentElement();
- QDomNode n;
+ TQDomElement docElement = doc.documentElement();
+ TQDomNode n;
for( n = docElement.firstChild(); !n.isNull(); n = n.nextSibling() ) {
- QDomNode n2 = n.namedItem( "propstat" );
- QDomNode n3 = n2.namedItem( "prop" );
+ TQDomNode n2 = n.namedItem( "propstat" );
+ TQDomNode n3 = n2.namedItem( "prop" );
KURL href( n.namedItem( "href" ).toElement().text() );
- QString displayName = n3.namedItem( "displayname" ).toElement().text();
+ TQString displayName = n3.namedItem( "displayname" ).toElement().text();
KPIM::FolderLister::ContentType type = getContentType( n3 );
emit folderInfoRetrieved( href, displayName, type );
diff --git a/kresources/lib/davcalendaradaptor.h b/kresources/lib/davcalendaradaptor.h
index 3c4a7bc4f..b7aba04ea 100644
--- a/kresources/lib/davcalendaradaptor.h
+++ b/kresources/lib/davcalendaradaptor.h
@@ -23,7 +23,7 @@
#include "calendaradaptor.h"
#include "folderlister.h"
-#include <qdom.h>
+#include <tqdom.h>
#include <kdepimmacros.h>
namespace KCal {
@@ -41,10 +41,10 @@ class KDE_EXPORT DavCalendarAdaptor : public CalendarAdaptor
virtual void interpretListFoldersJob( KIO::Job *job, KPIM::FolderLister *folderLister );
/** Returns the type of folder retrieved in the dom node. Typically, you'll
compare the DAV:resourcetype property with some values. */
- virtual KPIM::FolderLister::ContentType getContentType( const QDomNode &folderNode ) = 0;
+ virtual KPIM::FolderLister::ContentType getContentType( const TQDomNode &folderNode ) = 0;
/** Extract from the dav response whether the folder has subitems that need
to be examined */
- virtual bool getFolderHasSubs( const QDomNode &folderNode ) = 0;
+ virtual bool getFolderHasSubs( const TQDomNode &folderNode ) = 0;
};
}
diff --git a/kresources/lib/folderconfig.cpp b/kresources/lib/folderconfig.cpp
index b02654945..25fd7d826 100644
--- a/kresources/lib/folderconfig.cpp
+++ b/kresources/lib/folderconfig.cpp
@@ -32,35 +32,35 @@
#include <kdebug.h>
#include <kdialog.h>
-#include <qlayout.h>
-#include <qgroupbox.h>
-#include <qpushbutton.h>
-#include <qcombobox.h>
-#include <qhbox.h>
-#include <qlabel.h>
+#include <tqlayout.h>
+#include <tqgroupbox.h>
+#include <tqpushbutton.h>
+#include <tqcombobox.h>
+#include <tqhbox.h>
+#include <tqlabel.h>
using namespace KPIM;
-FolderConfig::FolderConfig( QWidget *parent )
- : QWidget( parent ), mFolderLister( 0 )
+FolderConfig::FolderConfig( TQWidget *parent )
+ : TQWidget( parent ), mFolderLister( 0 )
{
- QBoxLayout *topLayout = new QVBoxLayout( this );
+ TQBoxLayout *topLayout = new TQVBoxLayout( this );
topLayout->addSpacing( KDialog::spacingHint() );
- QGroupBox *topBox = new QGroupBox( 1, Horizontal, i18n("Folder Selection"),
+ TQGroupBox *topBox = new TQGroupBox( 1, Horizontal, i18n("Folder Selection"),
this );
topLayout->addWidget( topBox );
- QPushButton *button = new QPushButton( i18n("Update Folder List"), topBox );
- connect( button, SIGNAL( clicked() ), SIGNAL( updateFoldersClicked() ) );
+ TQPushButton *button = new TQPushButton( i18n("Update Folder List"), topBox );
+ connect( button, TQT_SIGNAL( clicked() ), TQT_SIGNAL( updateFoldersClicked() ) );
mFolderList = new FolderListView( topBox );
-/* QHBox *writeBox = new QHBox( topBox );
+/* TQHBox *writeBox = new TQHBox( topBox );
- new QLabel( i18n("Write to:"), writeBox );
+ new TQLabel( i18n("Write to:"), writeBox );
- mWriteCombo = new QComboBox( writeBox );*/
+ mWriteCombo = new TQComboBox( writeBox );*/
}
FolderConfig::~FolderConfig()
@@ -71,8 +71,8 @@ void FolderConfig::setFolderLister( FolderLister *f )
{
mFolderLister = f;
- QValueList<FolderListView::Property> types;
- QValueList<FolderLister::ContentType> suptypes( mFolderLister->supportedTypes() );
+ TQValueList<FolderListView::Property> types;
+ TQValueList<FolderLister::ContentType> suptypes( mFolderLister->supportedTypes() );
if ( suptypes.contains( FolderLister::Event ) ) types << FolderListView::Event;
if ( suptypes.contains( FolderLister::Todo ) ) types << FolderListView::Todo;
if ( suptypes.contains( FolderLister::Journal ) ) types << FolderListView::Journal;
@@ -81,7 +81,7 @@ void FolderConfig::setFolderLister( FolderLister *f )
if ( suptypes.contains( FolderLister::Unknown ) ) types << FolderListView::Unknown;
mFolderList->setEnabledTypes( types );
- connect( mFolderLister, SIGNAL( foldersRead() ), SLOT( updateFolderList() ) );
+ connect( mFolderLister, TQT_SIGNAL( foldersRead() ), TQT_SLOT( updateFolderList() ) );
}
void FolderConfig::retrieveFolderList( const KURL &url )
@@ -100,7 +100,7 @@ void FolderConfig::updateFolderList()
{
mFolderList->clear();
- QStringList write;
+ TQStringList write;
if ( !mOldFolderListerURL.isEmpty() && mFolderLister->adaptor() ) {
mFolderLister->adaptor()->setBaseURL( mOldFolderListerURL );
@@ -134,11 +134,11 @@ void FolderConfig::updateFolderList()
void FolderConfig::saveSettings()
{
- QPtrList<QListViewItem> lst;
+ TQPtrList<TQListViewItem> lst;
FolderLister::Entry::List folders;
- QListViewItemIterator it( mFolderList );
+ TQListViewItemIterator it( mFolderList );
while ( it.current() ) {
FolderListItem *item = dynamic_cast<FolderListItem *>( it.current() );
if ( item ) {
diff --git a/kresources/lib/folderconfig.h b/kresources/lib/folderconfig.h
index 5926392cc..c27d8fdf6 100644
--- a/kresources/lib/folderconfig.h
+++ b/kresources/lib/folderconfig.h
@@ -25,7 +25,7 @@
#include <kurl.h>
#include <kdepimmacros.h>
-#include <qwidget.h>
+#include <tqwidget.h>
// class KListView;
class QComboBox;
@@ -39,7 +39,7 @@ class KDE_EXPORT FolderConfig : public QWidget
{
Q_OBJECT
public:
- FolderConfig( QWidget *parent );
+ FolderConfig( TQWidget *parent );
~FolderConfig();
void setFolderLister( FolderLister * );
diff --git a/kresources/lib/folderlister.cpp b/kresources/lib/folderlister.cpp
index faf2204f7..cd203463c 100644
--- a/kresources/lib/folderlister.cpp
+++ b/kresources/lib/folderlister.cpp
@@ -29,7 +29,7 @@
#include <kdebug.h>
#include <kconfig.h>
-#include <qstringlist.h>
+#include <tqstringlist.h>
using namespace KPIM;
@@ -43,12 +43,12 @@ void FolderLister::setFolders( const FolderLister::Entry::List &folders )
mFolders = folders;
}
-void FolderLister::setWriteDestinationId( KPIM::FolderLister::ContentType type, const QString &id )
+void FolderLister::setWriteDestinationId( KPIM::FolderLister::ContentType type, const TQString &id )
{
mWriteDestinationId[ type ] = id;
}
-QString FolderLister::writeDestinationId( KPIM::FolderLister::ContentType type ) const
+TQString FolderLister::writeDestinationId( KPIM::FolderLister::ContentType type ) const
{
if ( mWriteDestinationId.contains( type ) ) {
return mWriteDestinationId[type];
@@ -56,7 +56,7 @@ QString FolderLister::writeDestinationId( KPIM::FolderLister::ContentType type )
return mWriteDestinationId[ KPIM::FolderLister::All ];
} else if ( mWriteDestinationId.contains( KPIM::FolderLister::Unknown ) ) {
return mWriteDestinationId[ KPIM::FolderLister::Unknown ];
- } else return QString::null;
+ } else return TQString::null;
}
@@ -74,7 +74,7 @@ KURL::List FolderLister::activeFolderIds() const
return ids;
}
-bool FolderLister::isActive( const QString &id ) const
+bool FolderLister::isActive( const TQString &id ) const
{
FolderLister::Entry::List::ConstIterator it;
for( it = mFolders.begin(); it != mFolders.end(); ++it ) {
@@ -83,10 +83,10 @@ bool FolderLister::isActive( const QString &id ) const
return false;
}
-QStringList FolderLister::contentTypeToStrings( ContentType type )
+TQStringList FolderLister::contentTypeToStrings( ContentType type )
{
kdDebug() << "FolderLister::contentTypeToStrings( type=" << type << ")" << endl;
- QStringList cont;
+ TQStringList cont;
if ( type == All ) {
cont << "All";
} else if ( type == Unknown ) {
@@ -103,7 +103,7 @@ kdDebug() << "FolderLister::contentTypeToStrings( type=" << type << ")" << endl;
return cont;
}
-FolderLister::ContentType FolderLister::contentTypeFromString( const QString &type )
+FolderLister::ContentType FolderLister::contentTypeFromString( const TQString &type )
{
if ( type == "All" ) return All;
if ( type == "Contact" ) return Contact;
@@ -116,12 +116,12 @@ FolderLister::ContentType FolderLister::contentTypeFromString( const QString &ty
return Unknown;
}
-QValueList<FolderLister::ContentType> FolderLister::supportedTypes()
+TQValueList<FolderLister::ContentType> FolderLister::supportedTypes()
{
if ( adaptor() ) {
return adaptor()->supportedTypes();
} else {
- return QValueList<ContentType>();
+ return TQValueList<ContentType>();
}
}
@@ -132,12 +132,12 @@ void FolderLister::readConfig( KPIM::GroupwarePrefsBase *newprefs )
kdDebug(7000) << "FolderLister::readConfig()" << endl;
mFolders.clear();
- QStringList active = newprefs->activeFolders();
+ TQStringList active = newprefs->activeFolders();
int nr = newprefs->folderNumber();
for ( int i=0; i<nr; ++i ) {
- QStringList l( newprefs->folder( i ) );
-// QStringList l( cfgg.readListEntry( QString("Folder%1").arg( i ) ) );
+ TQStringList l( newprefs->folder( i ) );
+// TQStringList l( cfgg.readListEntry( TQString("Folder%1").arg( i ) ) );
Entry e;
if ( l.count()>0 ) {
e.id = l.first();
@@ -148,14 +148,14 @@ void FolderLister::readConfig( KPIM::GroupwarePrefsBase *newprefs )
l.pop_front();
}
e.type = Unknown;
- for ( QStringList::Iterator it = l.begin(); it != l.end(); ++it ) {
+ for ( TQStringList::Iterator it = l.begin(); it != l.end(); ++it ) {
e.type = (FolderLister::ContentType)( e.type | contentTypeFromString( *it ) );
}
if ( active.find( e.id ) != active.end() ) e.active = true;
mFolders.append( e );
}
- QStringList destinations( newprefs->defaultDestinations() );
+ TQStringList destinations( newprefs->defaultDestinations() );
#define readDestination(type) \
if ( destinations.count()>0 ) { \
@@ -173,20 +173,20 @@ void FolderLister::readConfig( KPIM::GroupwarePrefsBase *newprefs )
void FolderLister::writeConfig( GroupwarePrefsBase *newprefs )
{
- QStringList ids;
- QStringList names;
- QStringList active;
+ TQStringList ids;
+ TQStringList names;
+ TQStringList active;
// KConfigGroup cfgg( newprefs->config(), "Folders" );
int nr = 0;
Entry::List::ConstIterator it;
for( it = mFolders.begin(); it != mFolders.end(); ++it ) {
- QStringList lst;
+ TQStringList lst;
lst << (*it).id;
lst << (*it).name;
lst += contentTypeToStrings( (*it).type );
newprefs->setFolder( nr, lst );
-// cfgg.writeEntry( QString("Folder%1").arg( nr ), lst );
+// cfgg.writeEntry( TQString("Folder%1").arg( nr ), lst );
if ( (*it).active ) active.append( (*it).id );
nr++;
}
@@ -194,11 +194,11 @@ void FolderLister::writeConfig( GroupwarePrefsBase *newprefs )
newprefs->setActiveFolders( active );
- QStringList defaultFolders;
+ TQStringList defaultFolders;
#define writeDestination(type) \
if ( mWriteDestinationId.contains( type ) ) \
defaultFolders << mWriteDestinationId[type]; \
- else defaultFolders << QString::null;
+ else defaultFolders << TQString::null;
writeDestination( KPIM::FolderLister::Event );
writeDestination( KPIM::FolderLister::Todo );
writeDestination( KPIM::FolderLister::Journal );
@@ -216,12 +216,12 @@ void FolderLister::setAdaptor( KPIM::GroupwareDataAdaptor *adaptor )
disconnect( mAdaptor, 0, this, 0 );
}
mAdaptor = adaptor;
- connect( mAdaptor, SIGNAL( folderInfoRetrieved( const KURL &,
- const QString &, KPIM::FolderLister::ContentType ) ),
- this, SLOT( processFolderResult( const KURL &, const QString &,
+ connect( mAdaptor, TQT_SIGNAL( folderInfoRetrieved( const KURL &,
+ const TQString &, KPIM::FolderLister::ContentType ) ),
+ this, TQT_SLOT( processFolderResult( const KURL &, const TQString &,
KPIM::FolderLister::ContentType ) ) );
- connect( mAdaptor, SIGNAL( folderSubitemRetrieved( const KURL &, bool ) ),
- this, SLOT( folderSubitemRetrieved( const KURL &, bool ) ) );
+ connect( mAdaptor, TQT_SIGNAL( folderSubitemRetrieved( const KURL &, bool ) ),
+ this, TQT_SLOT( folderSubitemRetrieved( const KURL &, bool ) ) );
}
void FolderLister::folderSubitemRetrieved( const KURL &url, bool isFolder )
@@ -230,8 +230,8 @@ void FolderLister::folderSubitemRetrieved( const KURL &url, bool isFolder )
doRetrieveFolder( url );
else {
KURL u( url ) ;
- u.setUser( QString::null );
- u.setPass( QString::null );
+ u.setUser( TQString::null );
+ u.setPass( TQString::null );
mProcessedPathes.append( url.path(-1) );
}
}
@@ -272,8 +272,8 @@ void FolderLister::doRetrieveFolder( const KURL &u )
kdDebug(7000) << "FolderLister::retrieveFolders: adjustedURL="
<< url.prettyURL() << endl;
- connect( listjob, SIGNAL( result( KIO::Job * ) ),
- SLOT( slotListJobResult( KIO::Job * ) ) );
+ connect( listjob, TQT_SIGNAL( result( KIO::Job * ) ),
+ TQT_SLOT( slotListJobResult( KIO::Job * ) ) );
} else {
// TODO: Indicate a problem to the user!
kdWarning() << "Unable to create the folder list job for the url "
@@ -296,7 +296,7 @@ FolderLister::Entry::List FolderLister::defaultFolders()
}
void FolderLister::processFolderResult( const KURL &href,
- const QString &displayName,
+ const TQString &displayName,
ContentType type )
{
kdDebug() << "FolderLister::processFolderResult( href=" << href.url() << ", displayName=" << displayName << ", type=" << int(type) << endl;
diff --git a/kresources/lib/folderlister.h b/kresources/lib/folderlister.h
index c8a70ef10..f2f19d10e 100644
--- a/kresources/lib/folderlister.h
+++ b/kresources/lib/folderlister.h
@@ -28,10 +28,10 @@
#include <kurl.h>
#include <kdepimmacros.h>
-#include <qvaluelist.h>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qobject.h>
+#include <tqvaluelist.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqobject.h>
namespace KIO {
class Job;
@@ -62,17 +62,17 @@ class KDE_EXPORT FolderLister : public QObject
public:
Entry() : active( false ) {}
- typedef QValueList<Entry> List;
+ typedef TQValueList<Entry> List;
- QString id;
- QString name;
+ TQString id;
+ TQString name;
ContentType type;
bool active;
};
- static QStringList contentTypeToStrings( ContentType );
- ContentType contentTypeFromString( const QString &type );
+ static TQStringList contentTypeToStrings( ContentType );
+ ContentType contentTypeFromString( const TQString &type );
- QValueList<ContentType> supportedTypes();
+ TQValueList<ContentType> supportedTypes();
FolderLister( Type );
@@ -86,10 +86,10 @@ class KDE_EXPORT FolderLister : public QObject
GroupwareDataAdaptor* adaptor() const { return mAdaptor; }
KURL::List activeFolderIds() const;
- bool isActive( const QString &id ) const;
+ bool isActive( const TQString &id ) const;
- void setWriteDestinationId( KPIM::FolderLister::ContentType type, const QString &dest );
- QString writeDestinationId( KPIM::FolderLister::ContentType type ) const;
+ void setWriteDestinationId( KPIM::FolderLister::ContentType type, const TQString &dest );
+ TQString writeDestinationId( KPIM::FolderLister::ContentType type ) const;
void readConfig( KPIM::GroupwarePrefsBase *newprefs );
void writeConfig( KPIM::GroupwarePrefsBase *newprefs );
@@ -103,7 +103,7 @@ class KDE_EXPORT FolderLister : public QObject
/** Adds the folder with the given url and display name to the folder
* tree (if is has an appropriate type) */
virtual void processFolderResult( const KURL &href,
- const QString &displayName,
+ const TQString &displayName,
KPIM::FolderLister::ContentType type );
/** Retrieve information about the folder u. If it has sub-folders, it
descends into the hierarchy */
@@ -136,12 +136,12 @@ class KDE_EXPORT FolderLister : public QObject
protected:
Type mType;
KURL::List mUrls;
- QStringList mProcessedPathes;
+ TQStringList mProcessedPathes;
Entry::List mFolders;
GroupwareDataAdaptor *mAdaptor;
private:
// TODO: We need multiple destinations for Events, Tasks and Journals
- QMap<KPIM::FolderLister::ContentType, QString> mWriteDestinationId;
+ TQMap<KPIM::FolderLister::ContentType, TQString> mWriteDestinationId;
KURL mOldURL;
};
diff --git a/kresources/lib/folderlistview.cpp b/kresources/lib/folderlistview.cpp
index 1ab593553..b29e61c9d 100644
--- a/kresources/lib/folderlistview.cpp
+++ b/kresources/lib/folderlistview.cpp
@@ -30,26 +30,26 @@
#include <kpopupmenu.h>
#include <kdebug.h>
-#include <qlistview.h>
-#include <qheader.h>
-#include <qpainter.h>
+#include <tqlistview.h>
+#include <tqheader.h>
+#include <tqpainter.h>
static const int BoxSize = 16;
//BEGIN FolderListView
-FolderListView::FolderListView( QWidget *parent, const QValueList<Property> &types )
+FolderListView::FolderListView( TQWidget *parent, const TQValueList<Property> &types )
: KListView( parent )
{
setEnabledTypes( types );
- connect( this, SIGNAL(mouseButtonPressed(int, QListViewItem*, const QPoint&, int)),
- this, SLOT(slotMousePressed(int, QListViewItem*, const QPoint&, int)) );
- connect( this, SIGNAL(spacePressed(QListViewItem*)),
- this, SLOT(showPopupMenu(QListViewItem*)) );
+ connect( this, TQT_SIGNAL(mouseButtonPressed(int, TQListViewItem*, const TQPoint&, int)),
+ this, TQT_SLOT(slotMousePressed(int, TQListViewItem*, const TQPoint&, int)) );
+ connect( this, TQT_SIGNAL(spacePressed(TQListViewItem*)),
+ this, TQT_SLOT(showPopupMenu(TQListViewItem*)) );
}
-void FolderListView::setEnabledTypes( const QValueList<Property> &types )
+void FolderListView::setEnabledTypes( const TQValueList<Property> &types )
{
kdDebug() << "FolderListView::setEnabledTypes" << endl;
for ( int i = 0; i< columns(); ++i ) removeColumn( i );
@@ -90,7 +90,7 @@ kdDebug() << "FolderListView::setEnabledTypes" << endl;
} else mColumnMap[Unknown] = -1;
}
-void FolderListView::showPopupMenu( FolderListItem *i, const QPoint &globalPos )
+void FolderListView::showPopupMenu( FolderListItem *i, const TQPoint &globalPos )
{
if ( !i ) return;
KPIM::FolderLister::Entry folder( i->folder() );
@@ -99,39 +99,39 @@ void FolderListView::showPopupMenu( FolderListItem *i, const QPoint &globalPos )
int id;
m.insertTitle( folder.name, 9999 );
- id = m.insertItem( i18n("&Enabled"), this, SLOT(slotPopupHandler(int)), 0, FolderName );
+ id = m.insertItem( i18n("&Enabled"), this, TQT_SLOT(slotPopupHandler(int)), 0, FolderName );
m.setItemChecked( id, i->isOn() );
m.insertSeparator();
if ( ( folder.type & KPIM::FolderLister::Event ) && (mTypes.contains( Event ) ) ) {
- id = m.insertItem( i18n("Default for New &Events"), this, SLOT(slotPopupHandler(int)), 0, Event );
+ id = m.insertItem( i18n("Default for New &Events"), this, TQT_SLOT(slotPopupHandler(int)), 0, Event );
m.setItemChecked( id, i->isDefault( Event ) );
}
if ( ( folder.type & KPIM::FolderLister::Todo ) && (mTypes.contains( Todo ) ) ) {
- id = m.insertItem( i18n("Default for New &Todos"), this, SLOT(slotPopupHandler(int)), 0, Todo );
+ id = m.insertItem( i18n("Default for New &Todos"), this, TQT_SLOT(slotPopupHandler(int)), 0, Todo );
m.setItemChecked( id, i->isDefault( Todo ) );
}
if ( ( folder.type & KPIM::FolderLister::Journal ) && (mTypes.contains( Journal ) ) ) {
- id = m.insertItem( i18n("Default for New &Journals"), this, SLOT(slotPopupHandler(int)), 0, Journal );
+ id = m.insertItem( i18n("Default for New &Journals"), this, TQT_SLOT(slotPopupHandler(int)), 0, Journal );
m.setItemChecked( id, i->isDefault( Journal ) );
}
if ( ( folder.type & KPIM::FolderLister::Contact ) && (mTypes.contains( Contact ) ) ) {
- id = m.insertItem( i18n("Default for New &Contacts"), this, SLOT(slotPopupHandler(int)), 0, Contact );
+ id = m.insertItem( i18n("Default for New &Contacts"), this, TQT_SLOT(slotPopupHandler(int)), 0, Contact );
m.setItemChecked( id, i->isDefault( Contact ) );
}
if ( ( folder.type == KPIM::FolderLister::All ) && (mTypes.contains( All ) ) ) {
- id = m.insertItem( i18n("Default for All New &Items"), this, SLOT(slotPopupHandler(int)), 0, All );
+ id = m.insertItem( i18n("Default for All New &Items"), this, TQT_SLOT(slotPopupHandler(int)), 0, All );
m.setItemChecked( id, i->isDefault( All ) );
}
if ( ( folder.type == KPIM::FolderLister::Unknown ) && (mTypes.contains( Unknown ) ) ) {
- id = m.insertItem( i18n("Default for &Unknown New Items"), this, SLOT(slotPopupHandler(int)), 0, Unknown );
+ id = m.insertItem( i18n("Default for &Unknown New Items"), this, TQT_SLOT(slotPopupHandler(int)), 0, Unknown );
m.setItemChecked( id, i->isDefault( Unknown ) );
}
m.exec( globalPos );
}
-void FolderListView::showPopupMenu( QListViewItem *i )
+void FolderListView::showPopupMenu( TQListViewItem *i )
{
if ( dynamic_cast<FolderListItem*>(i) )
showPopupMenu( (FolderListItem*)i, viewport()->mapToGlobal(itemRect(i).topLeft()) );
@@ -142,9 +142,9 @@ void FolderListView::slotPopupHandler( int z )
((FolderListItem*)currentItem())->changeProperty( (Property)z );
}
-// 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 FolderListView::slotMousePressed(int btn, QListViewItem* i, const QPoint& pos, int c)
+void FolderListView::slotMousePressed(int btn, TQListViewItem* i, const TQPoint& pos, int c)
{
if ( dynamic_cast<FolderListItem*>(i) ) {
if ( btn == Qt::RightButton ) {
@@ -152,7 +152,7 @@ void FolderListView::slotMousePressed(int btn, QListViewItem* i, const QPoint& p
}
else if ( btn == Qt::LeftButton && c > 0 ) {
// map pos to item/column and call FolderListItem::activate(col, pos)
- ((FolderListItem*)i)->activate( c, viewport()->mapFromGlobal( pos ) - QPoint( 0, itemRect(i).top() ) );
+ ((FolderListItem*)i)->activate( c, viewport()->mapFromGlobal( pos ) - TQPoint( 0, itemRect(i).top() ) );
// } else {
// KListView::slotMousePressed( btn, i, pos, c );
}
@@ -163,10 +163,10 @@ void FolderListView::slotMousePressed(int btn, QListViewItem* i, const QPoint& p
//BEGIN FolderListItem
-void FolderListItem::activate( int column, const QPoint &localPos )
+void FolderListItem::activate( int column, const TQPoint &localPos )
{
if ( !mFolderListView ) return;
- QListView *lv = listView();
+ TQListView *lv = listView();
int x = 0;
for( int c = 0; c < column-1; c++ )
x += lv->columnWidth( c );
@@ -184,7 +184,7 @@ void FolderListItem::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( prop );
}
@@ -195,7 +195,7 @@ kdDebug() << "FolderListItem::changeProperty( " << p << ")" << endl;
kdDebug() << "it's folderName" << endl;
setOn( !isOn() );
} else if ( typeSupported( p ) ) {
- QListViewItemIterator it( listView() );
+ TQListViewItemIterator it( listView() );
while ( it.current() ) {
FolderListItem *item = dynamic_cast<FolderListItem*>( it.current() );
if ( item ) {
@@ -233,16 +233,16 @@ void FolderListItem::setDefault( FolderListView::Property prop, bool def )
}
-void FolderListItem::paintCell( QPainter *p, const QColorGroup &cg, int col, int width, int align )
+void FolderListItem::paintCell( TQPainter *p, const TQColorGroup &cg, int col, int width, int align )
{
if ( !p ) return;
- QListView *lv = listView();
+ TQListView *lv = listView();
Q_ASSERT( lv ); //###
if ( !lv ) return;
// use a private color group and set the text/highlighted text colors
-// QColorGroup mcg = lv->viewport()->colorGroup();
+// TQColorGroup mcg = lv->viewport()->colorGroup();
FolderListView::Property prop( mFolderListView->typeForColumn(col) );
if ( prop == FolderListView::FolderName ) {
@@ -250,11 +250,11 @@ void FolderListItem::paintCell( QPainter *p, const QColorGroup &cg, int col, int
super::paintCell( p, cg, col, width, align );
return;
} else {
- p->fillRect( 0, 0, width, height(), QBrush( cg.base() ) );
+ p->fillRect( 0, 0, width, height(), TQBrush( cg.base() ) );
}
int marg = lv->itemMargin();
- QColor c;
+ TQColor c;
switch ( prop )
{
@@ -271,9 +271,9 @@ void FolderListItem::paintCell( QPainter *p, const QColorGroup &cg, int col, int
int y = (height() - BoxSize) / 2;
if ( isEnabled() )
- p->setPen( QPen( cg.text(), 1 ) );
+ p->setPen( TQPen( cg.text(), 1 ) );
else
- p->setPen( QPen( lv->palette().color( QPalette::Disabled, QColorGroup::Text ), 1 ) );
+ p->setPen( TQPen( lv->palette().color( TQPalette::Disabled, TQColorGroup::Text ), 1 ) );
p->drawEllipse( x+marg, y+2, BoxSize-4, BoxSize-4 );
@@ -281,7 +281,7 @@ void FolderListItem::paintCell( QPainter *p, const QColorGroup &cg, int col, int
if ( isEnabled() )
p->setBrush( cg.text() );
else
- p->setBrush( lv->palette().color( QPalette::Disabled, QColorGroup::Text ) );
+ p->setBrush( lv->palette().color( TQPalette::Disabled, TQColorGroup::Text ) );
p->drawEllipse( x + marg + 3, y + 5, BoxSize-10, BoxSize-10 );
}
break;
diff --git a/kresources/lib/folderlistview.h b/kresources/lib/folderlistview.h
index d933402a3..e7b634ef6 100644
--- a/kresources/lib/folderlistview.h
+++ b/kresources/lib/folderlistview.h
@@ -32,7 +32,7 @@ class FolderListCaption;
/*
- QListView that automatically adds columns for FolderListItems for selecting
+ TQListView that automatically adds columns for FolderListItems for selecting
the default destination and a slot to edit the destinations using the keyboard.
*/
class FolderListView : public KListView
@@ -45,51 +45,51 @@ class FolderListView : public KListView
/* mainly for readability */
enum Property { FolderName, Event, Todo, Journal, Contact, All, Unknown, PROP_MAX };
- FolderListView( QWidget *parent, const QValueList<Property> &types = QValueList<Property>() );
+ FolderListView( TQWidget *parent, const TQValueList<Property> &types = TQValueList<Property>() );
~FolderListView() {};
/* Display a popupmenu for item i at the specified global position, eventually with a title,
promoting the context name of that item */
- void showPopupMenu( FolderListItem *i, const QPoint &globalPos );
+ void showPopupMenu( FolderListItem *i, const TQPoint &globalPos );
void emitChanged() { emit changed(); };
- void setEnabledTypes( const QValueList<Property> &types );
+ void setEnabledTypes( const TQValueList<Property> &types );
int columnForType( Property prop ) const { if ( mColumnMap.contains(prop) ) return mColumnMap[prop]; else return -1;}
Property typeForColumn( int col ) const { if ( mTypeMap.contains( col ) ) return mTypeMap[col]; else return Unknown; }
private slots:
/* Display a popupmenu for item i at item position */
- void showPopupMenu( QListViewItem *i );
+ void showPopupMenu( TQListViewItem *i );
/* 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 slotPopupHandler( int z );
signals:
void changed();
private:
- QValueList<Property> mTypes;
- QMap<Property,int> mColumnMap;
- QMap<int,Property> mTypeMap;
+ TQValueList<Property> mTypes;
+ TQMap<Property,int> mColumnMap;
+ TQMap<int,Property> mTypeMap;
};
/*
- QListViewItem subclass to display/edit a folder on a groupware server.
+ TQListViewItem subclass to display/edit a folder on a groupware server.
Selection of default destinations will be done via radio items.
*/
class FolderListItem : public QCheckListItem
{
- typedef QCheckListItem super;
+ typedef TQCheckListItem super;
public:
FolderListItem( FolderListItem *parent, const KPIM::FolderLister::Entry &folder )
- : QCheckListItem( parent, folder.name, QCheckListItem::CheckBoxController ),
+ : TQCheckListItem( parent, folder.name, TQCheckListItem::CheckBoxController ),
mFolder( folder ), mFolderListView( parent?(parent->folderListView()):0 )
{
setOn( mFolder.active );
}
FolderListItem( FolderListView *listView, const KPIM::FolderLister::Entry &folder )
- : QCheckListItem( listView, folder.name,
- QCheckListItem::CheckBoxController ), mFolder( folder ), mFolderListView( listView )
+ : TQCheckListItem( listView, folder.name,
+ TQCheckListItem::CheckBoxController ), mFolder( folder ), mFolderListView( listView )
{
setOn( mFolder.active );
}
@@ -100,14 +100,14 @@ class FolderListItem : public QCheckListItem
}
/* reimp */
-// int width ( const QFontMetrics & fm, const QListView * lv, int c ) const;
+// int width ( const TQFontMetrics & fm, const TQListView * lv, int c ) const;
bool typeSupported( FolderListView::Property prop );
bool isDefault( FolderListView::Property prop );
void setDefault( FolderListView::Property prop, bool def = true );
/* calls changeProperty() if it makes sense considering pos. */
- void activate( int column, const QPoint &localPos );
+ void activate( int column, const TQPoint &localPos );
/* Sets this item as default for property p a */
void changeProperty( FolderListView::Property p );
@@ -115,7 +115,7 @@ class FolderListItem : public QCheckListItem
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:
KPIM::FolderLister::Entry mFolder;
diff --git a/kresources/lib/folderselectdialog.cpp b/kresources/lib/folderselectdialog.cpp
index 07b8bc8fe..0942f8223 100644
--- a/kresources/lib/folderselectdialog.cpp
+++ b/kresources/lib/folderselectdialog.cpp
@@ -32,19 +32,19 @@
#include "folderselectdialog.h"
-#include <qlayout.h>
-#include <qlabel.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
using namespace KPIM;
-FolderSelectDialog::FolderSelectDialog( const QString& caption, const QString& label,
- const QStringList& list )
+FolderSelectDialog::FolderSelectDialog( const TQString& caption, const TQString& label,
+ const TQStringList& list )
: KDialogBase(0, 0, true, caption, Ok, Ok, true)
{
- QFrame* frame = makeMainWidget();
- QVBoxLayout* layout = new QVBoxLayout( frame, 0, spacingHint() );
+ TQFrame* frame = makeMainWidget();
+ TQVBoxLayout* layout = new TQVBoxLayout( frame, 0, spacingHint() );
- QLabel* labelWidget = new QLabel( label, frame );
+ TQLabel* labelWidget = new TQLabel( label, frame );
layout->addWidget( labelWidget );
mListBox = new KListBox( frame );
@@ -53,10 +53,10 @@ FolderSelectDialog::FolderSelectDialog( const QString& caption, const QString& l
mListBox->ensureCurrentVisible();
layout->addWidget( mListBox, 10 );
- connect( mListBox, SIGNAL( doubleClicked( QListBoxItem * ) ),
- SLOT( slotOk() ) );
- connect( mListBox, SIGNAL( returnPressed( QListBoxItem * ) ),
- SLOT( slotOk() ) );
+ connect( mListBox, TQT_SIGNAL( doubleClicked( TQListBoxItem * ) ),
+ TQT_SLOT( slotOk() ) );
+ connect( mListBox, TQT_SIGNAL( returnPressed( TQListBoxItem * ) ),
+ TQT_SLOT( slotOk() ) );
mListBox->setFocus();
@@ -65,19 +65,19 @@ FolderSelectDialog::FolderSelectDialog( const QString& caption, const QString& l
setMinimumWidth( 320 );
}
-QString FolderSelectDialog::getItem( const QString &caption, const QString &label,
- const QStringList& list )
+TQString FolderSelectDialog::getItem( const TQString &caption, const TQString &label,
+ const TQStringList& list )
{
FolderSelectDialog dlg( caption, label, list );
- QString result;
+ TQString result;
if ( dlg.exec() == Accepted )
result = dlg.mListBox->currentText();
return result;
}
-void FolderSelectDialog::closeEvent(QCloseEvent *event)
+void FolderSelectDialog::closeEvent(TQCloseEvent *event)
{
event->ignore();
}
diff --git a/kresources/lib/folderselectdialog.h b/kresources/lib/folderselectdialog.h
index 2211b6f8f..a7879f9a0 100644
--- a/kresources/lib/folderselectdialog.h
+++ b/kresources/lib/folderselectdialog.h
@@ -40,15 +40,15 @@ namespace KPIM {
class FolderSelectDialog : public KDialogBase
{
private:
- FolderSelectDialog( const QString& caption, const QString& label,
- const QStringList& list );
+ FolderSelectDialog( const TQString& caption, const TQString& label,
+ const TQStringList& list );
public:
- static QString getItem( const QString& caption, const QString& label,
- const QStringList& list );
+ static TQString getItem( const TQString& caption, const TQString& label,
+ const TQStringList& list );
protected:
- virtual void closeEvent(QCloseEvent *event);
+ virtual void closeEvent(TQCloseEvent *event);
private:
KListBox* mListBox;
};
diff --git a/kresources/lib/groupwaredataadaptor.cpp b/kresources/lib/groupwaredataadaptor.cpp
index aa83f4674..033ea81de 100644
--- a/kresources/lib/groupwaredataadaptor.cpp
+++ b/kresources/lib/groupwaredataadaptor.cpp
@@ -37,7 +37,7 @@ KURL GroupwareUploadItem::adaptNewItemUrl( GroupwareDataAdaptor *adaptor,
{
kdDebug()<<"GroupwareUploadItem::adaptNewItemUrl, baseurl=" << baseurl.url() << endl;
if ( adaptor ) {
- QString path( adaptor->defaultNewItemName( this ) );
+ TQString path( adaptor->defaultNewItemName( this ) );
kdDebug() << "path=" << path << endl;
KURL u( baseurl );
if ( path.isEmpty() ) return u;
@@ -54,7 +54,7 @@ KIO::TransferJob *GroupwareUploadItem::createRawUploadJob(
{
Q_ASSERT( adaptor );
if ( !adaptor ) return 0;
- const QString dta = data();
+ const TQString dta = data();
//kdDebug(7000) << "Uploading: " << data << endl;
KURL upUrl( url() );
if ( adaptor )
@@ -77,7 +77,7 @@ kdDebug()<<"GroupwareUploadItem::createUploadNewJob, baseurl=" << baseurl.url()
KIO::TransferJob *job = createRawUploadJob( adaptor, baseurl );
if ( job ) {
kdDebug() << "Adding If-None-Match " << endl;
- QString header;
+ TQString header;
if ( job->outgoingMetaData().contains("customHTTPHeader") ) {
header = job->outgoingMetaData()["customHTTPHeader"];
header += "\r\n";
@@ -95,7 +95,7 @@ kdDebug()<<"GroupwareUploadItem::createUploadJob" << endl;
KIO::TransferJob *job = createRawUploadJob( adaptor, baseurl );
if ( job && adaptor ) {
kdDebug()<<"Adding If-Match header: " << adaptor->idMapper()->fingerprint( uid() ) << endl;
- QString header;
+ TQString header;
if ( job->outgoingMetaData().contains("customHTTPHeader") ) {
header = job->outgoingMetaData()["customHTTPHeader"];
header += "\r\n";
@@ -110,7 +110,7 @@ kdDebug()<<"new HEADER: " << header << endl;
GroupwareDataAdaptor::GroupwareDataAdaptor()
- : QObject(), mFolderLister( 0 ), mIdMapper( 0 )
+ : TQObject(), mFolderLister( 0 ), mIdMapper( 0 )
{
}
@@ -153,14 +153,14 @@ kdDebug()<<"GroupwareDataAdaptor::createUploadNewJob, url=" << url.url() << endl
}
void GroupwareDataAdaptor::processDownloadListItem( const KURL &entry,
- const QString &newFingerprint, KPIM::FolderLister::ContentType type )
+ const TQString &newFingerprint, KPIM::FolderLister::ContentType type )
{
bool download = false;
- const QString &location = entry.path();
+ const TQString &location = entry.path();
emit itemOnServer( entry );
// if not locally present, download
- const QString &localId = idMapper()->localId( location );
+ const TQString &localId = idMapper()->localId( location );
kdDebug(5800) << "Looking up remote: " << location
<< " found: " << localId << endl;
if ( localId.isEmpty() || !localItemExists( localId ) ) {
@@ -169,7 +169,7 @@ void GroupwareDataAdaptor::processDownloadListItem( const KURL &entry,
} else {
kdDebug(5800) << "Locally present " << endl;
// locally present, let's check if it's newer than what we have
- const QString &oldFingerprint = idMapper()->fingerprint( localId );
+ const TQString &oldFingerprint = idMapper()->fingerprint( localId );
if ( oldFingerprint != newFingerprint ) {
kdDebug(5800) << "Fingerprint changed old: " << oldFingerprint <<
" new: " << newFingerprint << endl;
@@ -190,12 +190,12 @@ void GroupwareDataAdaptor::processDownloadListItem( const KURL &entry,
}
}
-bool GroupwareDataAdaptor::interpretRemoveJob( KIO::Job *job, const QString &/*jobData*/ )
+bool GroupwareDataAdaptor::interpretRemoveJob( KIO::Job *job, const TQString &/*jobData*/ )
{
if ( !job ) return false;
KIO::DeleteJob *deljob = dynamic_cast<KIO::DeleteJob*>(job);
bool error = job->error();
- const QString err = job->errorString();
+ const TQString err = job->errorString();
if ( deljob ) {
KURL::List urls( deljob->urls() );
@@ -203,8 +203,8 @@ bool GroupwareDataAdaptor::interpretRemoveJob( KIO::Job *job, const QString &/*j
if ( error ) {
emit itemDeletionError( *it, err );
} else {
- // FIXME: Don't use QString::null here
- emit itemDeleted( QString::null, *it );
+ // FIXME: Don't use TQString::null here
+ emit itemDeleted( TQString::null, *it );
}
}
return true;
@@ -214,12 +214,12 @@ bool GroupwareDataAdaptor::interpretRemoveJob( KIO::Job *job, const QString &/*j
}
-bool GroupwareDataAdaptor::interpretUploadJob( KIO::Job *job, const QString &/*jobData*/ )
+bool GroupwareDataAdaptor::interpretUploadJob( KIO::Job *job, const TQString &/*jobData*/ )
{
kdDebug(7000) << "GroupwareDataAdaptor::interpretUploadJob " << endl;
KIO::TransferJob *trfjob = dynamic_cast<KIO::TransferJob*>(job);
bool error = job->error();
- const QString err = job->errorString();
+ const TQString err = job->errorString();
if ( trfjob ) {
KURL url( trfjob->url() );
@@ -236,13 +236,13 @@ bool GroupwareDataAdaptor::interpretUploadJob( KIO::Job *job, const QString &/*j
}
}
-bool GroupwareDataAdaptor::interpretUploadNewJob( KIO::Job *job, const QString &/*jobData*/ )
+bool GroupwareDataAdaptor::interpretUploadNewJob( KIO::Job *job, const TQString &/*jobData*/ )
{
// TODO: How does the incidence mapper know the old/new ids???
kdDebug(7000) << "GroupwareDataAdaptor::interpretUploadNewJob " << endl;
KIO::TransferJob *trfjob = dynamic_cast<KIO::TransferJob*>(job);
bool error = job->error();
- const QString err = job->errorString();
+ const TQString err = job->errorString();
if ( trfjob ) {
KURL url( trfjob->url() );
@@ -259,18 +259,18 @@ bool GroupwareDataAdaptor::interpretUploadNewJob( KIO::Job *job, const QString &
}
}
-QString GroupwareDataAdaptor::uidFromJob( KIO::Job *job ) const
+TQString GroupwareDataAdaptor::uidFromJob( KIO::Job *job ) const
{
kdDebug()<<"GroupwareDataAdaptor::uidFromJob( "<<job<<")"<<endl;
if ( mJobUIDMap.contains( job ) ) {
kdDebug()<<" Contained: "<< mJobUIDMap[job] << endl;
return mJobUIDMap[ job ];
} else {
- return QString::null;
+ return TQString::null;
}
}
-void GroupwareDataAdaptor::setUidForJob( KIO::Job *job, const QString &uid )
+void GroupwareDataAdaptor::setUidForJob( KIO::Job *job, const TQString &uid )
{
if ( uid.isEmpty() ) {
mJobUIDMap.remove( job );
diff --git a/kresources/lib/groupwaredataadaptor.h b/kresources/lib/groupwaredataadaptor.h
index 5e7aec49e..52021a07b 100644
--- a/kresources/lib/groupwaredataadaptor.h
+++ b/kresources/lib/groupwaredataadaptor.h
@@ -26,9 +26,9 @@
#include <groupwareresourcejob.h>
#include <folderlister.h>
#include <kurl.h>
-#include <qstring.h>
+#include <tqstring.h>
#include <libkcal/listbase.h>
-#include <qobject.h>
+#include <tqobject.h>
#include <kdepimmacros.h>
@@ -59,14 +59,14 @@ class KDE_EXPORT GroupwareUploadItem
KURL url() const { return mUrl; }
void setUrl( const KURL &url ) { mUrl = url; }
- QString uid() const { return mUid; }
- void setUid( const QString &uid ) { mUid = uid; }
+ TQString uid() const { return mUid; }
+ void setUid( const TQString &uid ) { mUid = uid; }
- QString fingerprint() const { return mFingerprint; }
- void setFingerprint( const QString &fpr ) { mFingerprint = fpr; }
+ TQString fingerprint() const { return mFingerprint; }
+ void setFingerprint( const TQString &fpr ) { mFingerprint = fpr; }
- virtual QString data() const { return mData; }
- virtual void setData( const QString &data ) { mData = data; }
+ virtual TQString data() const { return mData; }
+ virtual void setData( const TQString &data ) { mData = data; }
virtual KURL adaptNewItemUrl( GroupwareDataAdaptor *adaptor,
const KURL &url );
@@ -81,9 +81,9 @@ class KDE_EXPORT GroupwareUploadItem
KPIM::FolderLister::ContentType mItemType;
private:
KURL mUrl;
- QString mUid;
- QString mData;
- QString mFingerprint;
+ TQString mUid;
+ TQString mData;
+ TQString mFingerprint;
UploadType mType;
};
@@ -108,14 +108,14 @@ Q_OBJECT
Set progress message shown by progress manager during download. It will
be interpreted as rich text, so it might have to be escaped.
*/
- void setDownloadProgressMessage( const QString &v )
+ void setDownloadProgressMessage( const TQString &v )
{
mDownloadProgressMessage = v;
}
/**
Get download progress message. See setDownloadProgressMessage().
*/
- QString downloadProgressMessage() const
+ TQString downloadProgressMessage() const
{
return mDownloadProgressMessage;
}
@@ -124,14 +124,14 @@ Q_OBJECT
Set progress message shown by progress manager during upload. It will
be interpreted as rich text, so it might have to be escaped.
*/
- void setUploadProgressMessage( const QString &v )
+ void setUploadProgressMessage( const TQString &v )
{
mUploadProgressMessage = v;
}
/**
Get upload progress message. See setUploadProgressMessage().
*/
- QString uploadProgressMessage() const
+ TQString uploadProgressMessage() const
{
return mUploadProgressMessage;
}
@@ -154,14 +154,14 @@ Q_OBJECT
/**
Set user name.
*/
- void setUser( const QString &v )
+ void setUser( const TQString &v )
{
mUser = v;
}
/**
Get user. See setUser().
*/
- QString user() const
+ TQString user() const
{
return mUser;
}
@@ -169,14 +169,14 @@ Q_OBJECT
/**
Set password of user.
*/
- void setPassword( const QString &v )
+ void setPassword( const TQString &v )
{
mPassword = v;
}
/**
Get password. See setPassword().
*/
- QString password() const
+ TQString password() const
{
return mPassword;
}
@@ -221,24 +221,24 @@ Q_OBJECT
virtual void customAdaptUploadUrl( KURL &/*url*/ ) {}
/** Return the mime-type expected by the resource. */
- virtual QString mimeType() const = 0;
+ virtual TQString mimeType() const = 0;
/** Identifier of the Resource. Used for the custom fields where
resource-specific information is stored. */
- virtual QCString identifier() const = 0;
+ virtual TQCString identifier() const = 0;
/** Returns whether the item with the given localId exists locally. */
- virtual bool localItemExists( const QString &localId ) = 0;
+ virtual bool localItemExists( const TQString &localId ) = 0;
/** Returns whether the item was changed locally since the last download
from the server. */
- virtual bool localItemHasChanged( const QString &localId ) = 0;
+ virtual bool localItemHasChanged( const TQString &localId ) = 0;
/** Remove the item from the local cache. */
- virtual void deleteItem( const QString &localId ) = 0;
+ virtual void deleteItem( const TQString &localId ) = 0;
/** Removed the changed flag for the item with the given uid. */
- virtual void clearChange( const QString &uid ) = 0;
+ virtual void clearChange( const TQString &uid ) = 0;
virtual FolderLister::Entry::List defaultFolders();
- virtual QValueList<FolderLister::ContentType> supportedTypes() = 0;
+ virtual TQValueList<FolderLister::ContentType> supportedTypes() = 0;
virtual bool supports( FolderLister::ContentType type ) {
return supportedTypes().contains( type );
}
@@ -248,13 +248,13 @@ Q_OBJECT
/** Creates the KIO::Job for logging in to the server. This is only
* called if the GroupwareDataAdaptor::GWResNeedsLogin flag is set
* for the resource. */
- virtual KIO::Job *createLoginJob( const KURL &, const QString &/*user*/,
- const QString &/*password*/ ) { return 0; }
+ virtual KIO::Job *createLoginJob( const KURL &, const TQString &/*user*/,
+ const TQString &/*password*/ ) { return 0; }
/** Creates the KIO::Job for logging off the server. This is only
* called if the GroupwareDataAdaptor::GWResNeedsLogoff flag is set
* for the resource. */
- virtual KIO::Job *createLogoffJob( const KURL &, const QString &/*user*/,
- const QString &/*password*/ ) { return 0; }
+ virtual KIO::Job *createLogoffJob( const KURL &, const TQString &/*user*/,
+ const TQString &/*password*/ ) { return 0; }
/** Creates the KIO::Job for listing all subfolders of the given url. */
virtual KIO::Job *createListFoldersJob ( const KURL & ) = 0;
/** Creates the KIO::TransferJob for listing all items in the given url. */
@@ -263,7 +263,7 @@ Q_OBJECT
virtual KIO::TransferJob *createDownloadJob( const KURL &,
FolderLister::ContentType ) = 0;
/** Creates the KIO::TransferJob for downloading a list of items items. */
- virtual KIO::TransferJob *createDownloadJob( const QMap<KURL,FolderLister::ContentType> & ) { return 0; }
+ virtual KIO::TransferJob *createDownloadJob( const TQMap<KURL,FolderLister::ContentType> & ) { return 0; }
/** Create the job to remove the deletedItems from the server. The base
URL of the server is passed as uploadurl. */
virtual KIO::Job *createRemoveJob( const KURL &,
@@ -298,21 +298,21 @@ Q_OBJECT
/** Extract the list of items on the server and the list of items to be
downloaded from the results of the job (the job was created by
createListitemsJob). */
- virtual bool interpretListItemsJob( KIO::Job *, const QString &jobData ) = 0;
- virtual bool interpretDownloadItemsJob( KIO::Job *job, const QString &jobData ) = 0;
- virtual bool interpretRemoveJob( KIO::Job *job, const QString &jobData );
- virtual bool interpretUploadJob( KIO::Job *job, const QString &/*jobData*/ );
- virtual bool interpretUploadNewJob( KIO::Job *job, const QString &/*jobData*/ );
+ virtual bool interpretListItemsJob( KIO::Job *, const TQString &jobData ) = 0;
+ virtual bool interpretDownloadItemsJob( KIO::Job *job, const TQString &jobData ) = 0;
+ virtual bool interpretRemoveJob( KIO::Job *job, const TQString &jobData );
+ virtual bool interpretUploadJob( KIO::Job *job, const TQString &/*jobData*/ );
+ virtual bool interpretUploadNewJob( KIO::Job *job, const TQString &/*jobData*/ );
virtual void processDownloadListItem( const KURL &entry,
- const QString &newFingerprint, KPIM::FolderLister::ContentType type );
+ const TQString &newFingerprint, KPIM::FolderLister::ContentType type );
/** Return the default file name for a new item. */
- virtual QString defaultNewItemName( GroupwareUploadItem * )
+ virtual TQString defaultNewItemName( GroupwareUploadItem * )
{
- return QString::null;
+ return TQString::null;
}
- virtual QString uidFromJob( KIO::Job *job ) const;
- virtual void setUidForJob( KIO::Job *job, const QString &uid );
+ virtual TQString uidFromJob( KIO::Job *job ) const;
+ virtual void setUidForJob( KIO::Job *job, const TQString &uid );
enum {
@@ -328,7 +328,7 @@ Q_OBJECT
signals:
- void folderInfoRetrieved( const KURL &href, const QString &name,
+ void folderInfoRetrieved( const KURL &href, const TQString &name,
KPIM::FolderLister::ContentType );
void folderSubitemRetrieved( const KURL &, bool isFolder );
@@ -336,26 +336,26 @@ Q_OBJECT
/** passed the whole remote url (including hostname) to the receiver */
void itemOnServer( const KURL &remoteURL );
- void itemDownloaded( const QString &localID, const KURL &remoteURL,
- const QString &fingerprint );
- void itemDeleted( const QString &localID, const KURL &remoteURL );
- void itemUploaded( const QString &localID, const KURL &remoteURL );
- void itemUploadedNew( const QString &localID, const KURL &remoteURL );
+ void itemDownloaded( const TQString &localID, const KURL &remoteURL,
+ const TQString &fingerprint );
+ void itemDeleted( const TQString &localID, const KURL &remoteURL );
+ void itemUploaded( const TQString &localID, const KURL &remoteURL );
+ void itemUploadedNew( const TQString &localID, const KURL &remoteURL );
- void itemDownloadError( const KURL &remoteURL, const QString &error );
- void itemDeletionError( const KURL &remoteURL, const QString &error );
- void itemUploadError( const KURL &remoteURL, const QString &error );
- void itemUploadNewError( const QString &localID, const QString &error );
+ void itemDownloadError( const KURL &remoteURL, const TQString &error );
+ void itemDeletionError( const KURL &remoteURL, const TQString &error );
+ void itemUploadError( const KURL &remoteURL, const TQString &error );
+ void itemUploadNewError( const TQString &localID, const TQString &error );
private:
FolderLister *mFolderLister;
- QString mDownloadProgressMessage;
- QString mUploadProgressMessage;
+ TQString mDownloadProgressMessage;
+ TQString mUploadProgressMessage;
KURL mBaseURL;
- QString mUser;
- QString mPassword;
+ TQString mUser;
+ TQString mPassword;
KPIM::IdMapper *mIdMapper;
- QMap<KIO::Job*,QString> mJobUIDMap;
+ TQMap<KIO::Job*,TQString> mJobUIDMap;
};
}
diff --git a/kresources/lib/groupwaredownloadjob.cpp b/kresources/lib/groupwaredownloadjob.cpp
index 7acc1cd03..7bfa804a7 100644
--- a/kresources/lib/groupwaredownloadjob.cpp
+++ b/kresources/lib/groupwaredownloadjob.cpp
@@ -59,21 +59,21 @@ void GroupwareDownloadJob::run()
mItemsForDownload.clear();
mCurrentlyOnServer.clear();
- connect( adaptor(), SIGNAL( itemToDownload( const KURL &, KPIM::FolderLister::ContentType ) ),
- SLOT( slotItemToDownload( const KURL &, KPIM::FolderLister::ContentType ) ) );
- connect( adaptor(), SIGNAL( itemOnServer( const KURL & ) ),
- SLOT( slotItemOnServer( const KURL & ) ) );
- connect( adaptor(), SIGNAL( itemDownloaded( const QString &, const KURL &, const QString & ) ),
- SLOT( slotItemDownloaded( const QString &, const KURL &, const QString & ) ) );
- connect( adaptor(), SIGNAL( itemDownloadError( const KURL &, const QString & ) ),
- SLOT( slotItemDownloadError( const KURL &, const QString & ) ) );
+ connect( adaptor(), TQT_SIGNAL( itemToDownload( const KURL &, KPIM::FolderLister::ContentType ) ),
+ TQT_SLOT( slotItemToDownload( const KURL &, KPIM::FolderLister::ContentType ) ) );
+ connect( adaptor(), TQT_SIGNAL( itemOnServer( const KURL & ) ),
+ TQT_SLOT( slotItemOnServer( const KURL & ) ) );
+ connect( adaptor(), TQT_SIGNAL( itemDownloaded( const TQString &, const KURL &, const TQString & ) ),
+ TQT_SLOT( slotItemDownloaded( const TQString &, const KURL &, const TQString & ) ) );
+ connect( adaptor(), TQT_SIGNAL( itemDownloadError( const KURL &, const TQString & ) ),
+ TQT_SLOT( slotItemDownloadError( const KURL &, const TQString & ) ) );
mProgress = KPIM::ProgressManager::instance()->createProgressItem(
KPIM::ProgressManager::getUniqueID(),
adaptor()->downloadProgressMessage() );
connect( mProgress,
- SIGNAL( progressItemCanceled( KPIM::ProgressItem * ) ),
- SLOT( cancelLoad() ) );
+ TQT_SIGNAL( progressItemCanceled( KPIM::ProgressItem * ) ),
+ TQT_SLOT( cancelLoad() ) );
listItems();
}
@@ -102,18 +102,18 @@ void GroupwareDownloadJob::listItems()
kdDebug(5800) << "OpenGroupware::listIncidences(): " << url << endl;
- mListItemsData = QString::null;
+ mListItemsData = TQString::null;
mListEventsJob = adaptor()->createListItemsJob( url );
- connect( mListEventsJob, SIGNAL( result( KIO::Job * ) ),
- SLOT( slotListItemsResult( KIO::Job * ) ) );
- connect( mListEventsJob, SIGNAL( data( KIO::Job *, const QByteArray & ) ),
- SLOT( slotListItemsData( KIO::Job *, const QByteArray & ) ) );
+ connect( mListEventsJob, TQT_SIGNAL( result( KIO::Job * ) ),
+ TQT_SLOT( slotListItemsResult( KIO::Job * ) ) );
+ connect( mListEventsJob, TQT_SIGNAL( data( KIO::Job *, const TQByteArray & ) ),
+ TQT_SLOT( slotListItemsData( KIO::Job *, const TQByteArray & ) ) );
}
}
-void GroupwareDownloadJob::slotListItemsData( KIO::Job *, const QByteArray &data )
+void GroupwareDownloadJob::slotListItemsData( KIO::Job *, const TQByteArray &data )
{
kdDebug(5800) << "OpenGroupware::slotListItemsData()" << endl;
@@ -135,7 +135,7 @@ void GroupwareDownloadJob::slotListItemsResult( KIO::Job *job )
adaptor()->interpretListItemsJob( job, mListItemsData );
}
- mListItemsData = QString::null;
+ mListItemsData = TQString::null;
mListEventsJob = 0;
listItems();
@@ -143,13 +143,13 @@ void GroupwareDownloadJob::slotListItemsResult( KIO::Job *job )
void GroupwareDownloadJob::deleteIncidencesGoneFromServer()
{
- QMap<QString, QString> remoteIds( adaptor()->idMapper()->remoteIdMap() );
+ TQMap<TQString, TQString> remoteIds( adaptor()->idMapper()->remoteIdMap() );
KURL::List::ConstIterator it = mCurrentlyOnServer.begin();
while ( it != mCurrentlyOnServer.end() ) {
remoteIds.remove( (*it).path() );
++it;
}
- QMap<QString, QString>::ConstIterator it2;
+ TQMap<TQString, TQString>::ConstIterator it2;
for (it2 = remoteIds.begin(); it2 != remoteIds.end(); ++it2) {
adaptor()->deleteItem( remoteIds[ it2.key() ] );
}
@@ -170,27 +170,27 @@ void GroupwareDownloadJob::downloadItem()
success();
} else {
if ( adaptor()->flags() & KPIM::GroupwareDataAdaptor::GWResBatchRequest ) {
- mDownloadItemsData = QString::null;
+ mDownloadItemsData = TQString::null;
mDownloadJob = adaptor()->createDownloadJob( mItemsForDownload );
mItemsDownloading = mItemsForDownload;
mItemsForDownload.clear();
} else {
// Download the first item of the list
- QMap<KURL,KPIM::FolderLister::ContentType>::Iterator it = mItemsForDownload.begin();
+ TQMap<KURL,KPIM::FolderLister::ContentType>::Iterator it = mItemsForDownload.begin();
KURL href( it.key() );
KPIM::FolderLister::ContentType ctype = it.data();
mItemsDownloading.insert( it.key(), it.data() );
mItemsForDownload.remove( it.key() );
adaptor()->adaptDownloadUrl( href );
- mDownloadItemsData = QString::null;
+ mDownloadItemsData = TQString::null;
mDownloadJob = adaptor()->createDownloadJob( href, ctype );
}
- connect( mDownloadJob, SIGNAL( result( KIO::Job * ) ),
- SLOT( slotDownloadItemResult( KIO::Job * ) ) );
- connect( mDownloadJob, SIGNAL( data( KIO::Job *, const QByteArray & ) ),
- SLOT( slotDownloadItemData( KIO::Job *, const QByteArray & ) ) );
+ connect( mDownloadJob, TQT_SIGNAL( result( KIO::Job * ) ),
+ TQT_SLOT( slotDownloadItemResult( KIO::Job * ) ) );
+ connect( mDownloadJob, TQT_SIGNAL( data( KIO::Job *, const TQByteArray & ) ),
+ TQT_SLOT( slotDownloadItemData( KIO::Job *, const TQByteArray & ) ) );
}
}
@@ -211,17 +211,17 @@ void GroupwareDownloadJob::slotDownloadItemResult( KIO::Job *job )
mProgress->incCompletedItems();
mProgress->updateProgress();
}
- mDownloadItemsData = QString::null;
+ mDownloadItemsData = TQString::null;
mDownloadJob = 0;
downloadItem();
}
-void GroupwareDownloadJob::slotDownloadItemData( KIO::Job *, const QByteArray &data )
+void GroupwareDownloadJob::slotDownloadItemData( KIO::Job *, const TQByteArray &data )
{
kdDebug(5800) << "OpenGroupware::slotDownloadItemData()" << endl;
- mDownloadItemsData.append( QString::fromUtf8( data.data(), data.size() ) );
+ mDownloadItemsData.append( TQString::fromUtf8( data.data(), data.size() ) );
}
void GroupwareDownloadJob::slotItemToDownload( const KURL &remoteURL,
@@ -246,7 +246,7 @@ kdDebug()<<"GroupwareDownloadJob::slotItemOnServer( " << remoteURL.url() << ")"
}
-void GroupwareDownloadJob::slotItemDownloadError( const KURL &remoteURL, const QString &/*error*/ )
+void GroupwareDownloadJob::slotItemDownloadError( const KURL &remoteURL, const TQString &/*error*/ )
{
// TODO: Error handling!
if ( mItemsDownloading.contains( remoteURL ) ) {
@@ -257,8 +257,8 @@ void GroupwareDownloadJob::slotItemDownloadError( const KURL &remoteURL, const Q
}
-void GroupwareDownloadJob::slotItemDownloaded( const QString &localID,
- const KURL &remoteURL, const QString &fingerprint )
+void GroupwareDownloadJob::slotItemDownloaded( const TQString &localID,
+ const KURL &remoteURL, const TQString &fingerprint )
{
kdDebug()<<"GroupwareDownloadJob::slotItemDownloaded( " << localID << ", " << remoteURL.url() << ", " << fingerprint << ")" << endl;
if ( mItemsForDownload.contains( remoteURL ) ) {
diff --git a/kresources/lib/groupwaredownloadjob.h b/kresources/lib/groupwaredownloadjob.h
index 236ed3d56..a52413bd2 100644
--- a/kresources/lib/groupwaredownloadjob.h
+++ b/kresources/lib/groupwaredownloadjob.h
@@ -24,7 +24,7 @@
#define KPIM_GROUPWAREDOWNLOADJOB_H
#include "groupwareresourcejob.h"
-#include <qstringlist.h>
+#include <tqstringlist.h>
namespace KIO {
class Job;
@@ -58,16 +58,16 @@ class GroupwareDownloadJob : public GroupwareJob
void cancelLoad();
void slotListItemsResult( KIO::Job * );
- void slotListItemsData( KIO::Job *, const QByteArray & );
+ void slotListItemsData( KIO::Job *, const TQByteArray & );
void slotDownloadItemResult( KIO::Job * );
- void slotDownloadItemData( KIO::Job *, const QByteArray & );
+ void slotDownloadItemData( KIO::Job *, const TQByteArray & );
void slotItemToDownload( const KURL &remoteURL,
KPIM::FolderLister::ContentType type );
void slotItemOnServer( const KURL &remoteURL );
- void slotItemDownloaded( const QString &localID, const KURL &remoteURL,
- const QString &fingerprint );
- void slotItemDownloadError( const KURL &remoteURL, const QString &error );
+ void slotItemDownloaded( const TQString &localID, const KURL &remoteURL,
+ const TQString &fingerprint );
+ void slotItemDownloadError( const KURL &remoteURL, const TQString &error );
private:
KURL::List mFoldersForDownload;
@@ -75,18 +75,18 @@ class GroupwareDownloadJob : public GroupwareJob
These pathes don't contain the server name! */
KURL::List mCurrentlyOnServer;
- QMap<KURL,KPIM::FolderLister::ContentType> mItemsForDownload;
- QMap<KURL,KPIM::FolderLister::ContentType> mItemsDownloading;
- QMap<KURL,KPIM::FolderLister::ContentType> mItemsDownloaded;
- QMap<KURL,KPIM::FolderLister::ContentType> mItemsDownloadError;
+ TQMap<KURL,KPIM::FolderLister::ContentType> mItemsForDownload;
+ TQMap<KURL,KPIM::FolderLister::ContentType> mItemsDownloading;
+ TQMap<KURL,KPIM::FolderLister::ContentType> mItemsDownloaded;
+ TQMap<KURL,KPIM::FolderLister::ContentType> mItemsDownloadError;
KPIM::ProgressItem *mProgress;
KIO::TransferJob *mDownloadJob;
KIO::TransferJob *mListEventsJob;
- QString mListItemsData;
- QString mDownloadItemsData;
+ TQString mListItemsData;
+ TQString mDownloadItemsData;
};
}
diff --git a/kresources/lib/groupwareresourcejob.cpp b/kresources/lib/groupwareresourcejob.cpp
index 73c102c88..a0094f6a1 100644
--- a/kresources/lib/groupwareresourcejob.cpp
+++ b/kresources/lib/groupwareresourcejob.cpp
@@ -23,14 +23,14 @@
#include "groupwareresourcejob.h"
-#include <qtimer.h>
+#include <tqtimer.h>
using namespace KPIM;
GroupwareJob::GroupwareJob( GroupwareDataAdaptor *adaptor )
: mAdaptor( adaptor )
{
- QTimer::singleShot( 0, this, SLOT( run() ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( run() ) );
}
bool GroupwareJob::error() const
@@ -38,18 +38,18 @@ bool GroupwareJob::error() const
return !mErrorString.isNull();
}
-QString GroupwareJob::errorString() const
+TQString GroupwareJob::errorString() const
{
return mErrorString;
}
void GroupwareJob::success()
{
- mErrorString = QString::null;
+ mErrorString = TQString::null;
emit( result( this ) );
}
-void GroupwareJob::error( const QString &errorString )
+void GroupwareJob::error( const TQString &errorString )
{
mErrorString = errorString;
emit( result( this ) );
diff --git a/kresources/lib/groupwareresourcejob.h b/kresources/lib/groupwareresourcejob.h
index 2520466ea..76cd2bbcd 100644
--- a/kresources/lib/groupwareresourcejob.h
+++ b/kresources/lib/groupwareresourcejob.h
@@ -23,8 +23,8 @@
#ifndef KPIM_GROUPWAREJOB_H
#define KPIM_GROUPWAREJOB_H
-#include <qobject.h>
-#include <qstring.h>
+#include <tqobject.h>
+#include <tqstring.h>
#include "folderlister.h"
namespace KPIM {
@@ -42,7 +42,7 @@ class GroupwareJob : public QObject
GroupwareJob( GroupwareDataAdaptor *adaptor );
bool error() const;
- QString errorString() const;
+ TQString errorString() const;
virtual void kill() = 0;
@@ -51,7 +51,7 @@ class GroupwareJob : public QObject
protected:
void success();
- void error( const QString & );
+ void error( const TQString & );
GroupwareDataAdaptor *adaptor() { return mAdaptor; }
const GroupwareDataAdaptor *adaptor() const { return mAdaptor; }
@@ -59,7 +59,7 @@ class GroupwareJob : public QObject
virtual void run() = 0;
private:
- QString mErrorString;
+ TQString mErrorString;
GroupwareDataAdaptor *mAdaptor;
};
diff --git a/kresources/lib/groupwareuploadjob.cpp b/kresources/lib/groupwareuploadjob.cpp
index bb3098fc2..e4d6cb131 100644
--- a/kresources/lib/groupwareuploadjob.cpp
+++ b/kresources/lib/groupwareuploadjob.cpp
@@ -33,8 +33,8 @@
#include <kurl.h>
#include <kio/job.h>
-#include <qstringlist.h>
-#include <qtimer.h>
+#include <tqstringlist.h>
+#include <tqtimer.h>
#include <klocale.h>
using namespace KPIM;
@@ -52,22 +52,22 @@ void GroupwareUploadJob::run()
KPIM::ProgressManager::getUniqueID(),
adaptor()->uploadProgressMessage() );
connect( mUploadProgress,
- SIGNAL( progressItemCanceled( KPIM::ProgressItem * ) ),
- SLOT( cancelSave() ) );
+ TQT_SIGNAL( progressItemCanceled( KPIM::ProgressItem * ) ),
+ TQT_SLOT( cancelSave() ) );
- connect( adaptor(), SIGNAL( itemDeletionError( const KURL &, const QString & ) ),
- SLOT( slotItemDeleteError( const KURL &, const QString & ) ) );
- connect( adaptor(), SIGNAL( itemUploadError( const KURL &, const QString & ) ),
- SLOT( slotItemUploadError( const KURL &, const QString & ) ) );
- connect( adaptor(), SIGNAL( itemUploadNewError( const QString &, const QString & ) ),
- SLOT( slotItemUploadNewError( const QString &, const QString & ) ) );
+ connect( adaptor(), TQT_SIGNAL( itemDeletionError( const KURL &, const TQString & ) ),
+ TQT_SLOT( slotItemDeleteError( const KURL &, const TQString & ) ) );
+ connect( adaptor(), TQT_SIGNAL( itemUploadError( const KURL &, const TQString & ) ),
+ TQT_SLOT( slotItemUploadError( const KURL &, const TQString & ) ) );
+ connect( adaptor(), TQT_SIGNAL( itemUploadNewError( const TQString &, const TQString & ) ),
+ TQT_SLOT( slotItemUploadNewError( const TQString &, const TQString & ) ) );
- connect( adaptor(), SIGNAL( itemDeleted( const QString &, const KURL & ) ),
- SLOT( slotItemDeleted( const QString &, const KURL & ) ) );
- connect( adaptor(), SIGNAL( itemUploaded( const QString &, const KURL & ) ),
- SLOT( slotItemUploaded( const QString &, const KURL & ) ) );
- connect( adaptor(), SIGNAL( itemUploadedNew( const QString &, const KURL& ) ),
- SLOT( slotItemUploadedNew( const QString &, const KURL & ) ) );
+ connect( adaptor(), TQT_SIGNAL( itemDeleted( const TQString &, const KURL & ) ),
+ TQT_SLOT( slotItemDeleted( const TQString &, const KURL & ) ) );
+ connect( adaptor(), TQT_SIGNAL( itemUploaded( const TQString &, const KURL & ) ),
+ TQT_SLOT( slotItemUploaded( const TQString &, const KURL & ) ) );
+ connect( adaptor(), TQT_SIGNAL( itemUploadedNew( const TQString &, const KURL& ) ),
+ TQT_SLOT( slotItemUploadedNew( const TQString &, const KURL & ) ) );
mUploadProgress->setTotalItems( mAddedItems.size() + mChangedItems.size() +
@@ -81,7 +81,7 @@ void GroupwareUploadJob::deleteItem()
{
kdDebug(5800)<<"GroupwareUploadJob::deleteItem()"<<endl;
if ( mDeletedItems.isEmpty() ) {
- QTimer::singleShot( 0, this, SLOT( uploadItem() ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( uploadItem() ) );
} else {
kdDebug(7000) << " Deleting " << mDeletedItems.size() << " items from the server " << endl;
@@ -101,11 +101,11 @@ kdDebug() << "Not using batch delete " << endl;
}
if ( mDeletionJob ) {
- mDeletionJobData = QString::null;
- connect( mDeletionJob, SIGNAL( result( KIO::Job* ) ),
- SLOT( slotDeletionJobResult( KIO::Job* ) ) );
-// connect( mDeletionJob, SIGNAL( data( KIO::Job *, const QByteArray & ) ),
-// SLOT( slotDeletionJobData( KIO::Job *, const QByteArray & ) ) );
+ mDeletionJobData = TQString::null;
+ connect( mDeletionJob, TQT_SIGNAL( result( KIO::Job* ) ),
+ TQT_SLOT( slotDeletionJobResult( KIO::Job* ) ) );
+// connect( mDeletionJob, TQT_SIGNAL( data( KIO::Job *, const TQByteArray & ) ),
+// TQT_SLOT( slotDeletionJobData( KIO::Job *, const TQByteArray & ) ) );
} else {
deleteItem();
}
@@ -114,7 +114,7 @@ kdDebug() << "Not using batch delete " << endl;
-void GroupwareUploadJob::slotDeletionJobData( KIO::Job *, const QByteArray &data )
+void GroupwareUploadJob::slotDeletionJobData( KIO::Job *, const TQByteArray &data )
{
kdDebug(5800) << "OpenGroupware::slotDeletionData()" << endl;
@@ -129,7 +129,7 @@ void GroupwareUploadJob::slotDeletionJobResult( KIO::Job *job )
adaptor()->interpretRemoveJob( job, mDeletionJobData );
}
mDeletionJob = 0;
- QTimer::singleShot( 0, this, SLOT( deleteItem() ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( deleteItem() ) );
}
@@ -138,7 +138,7 @@ void GroupwareUploadJob::uploadItem()
{
kdDebug(5800)<<"GroupwareUploadJob::uploadItem()"<<endl;
if ( mChangedItems.isEmpty() ) {
- QTimer::singleShot( 0, this, SLOT( uploadNewItem() ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( uploadNewItem() ) );
} else {
kdDebug(5800)<<"We still have "<<mChangedItems.count()<<" changed items to upload"<<endl;
@@ -158,11 +158,11 @@ kdDebug() << "Not using batch upload " << endl;
}
if ( mUploadJob ) {
- mUploadJobData = QString::null;
- connect( mUploadJob, SIGNAL( result( KIO::Job* ) ),
- SLOT( slotUploadJobResult( KIO::Job* ) ) );
- connect( mUploadJob, SIGNAL( data( KIO::Job *, const QByteArray & ) ),
- SLOT( slotUploadJobData( KIO::Job *, const QByteArray & ) ) );
+ mUploadJobData = TQString::null;
+ connect( mUploadJob, TQT_SIGNAL( result( KIO::Job* ) ),
+ TQT_SLOT( slotUploadJobResult( KIO::Job* ) ) );
+ connect( mUploadJob, TQT_SIGNAL( data( KIO::Job *, const TQByteArray & ) ),
+ TQT_SLOT( slotUploadJobData( KIO::Job *, const TQByteArray & ) ) );
} else {
uploadItem();
}
@@ -170,7 +170,7 @@ kdDebug() << "Not using batch upload " << endl;
}
-void GroupwareUploadJob::slotUploadJobData( KIO::Job *, const QByteArray &data )
+void GroupwareUploadJob::slotUploadJobData( KIO::Job *, const TQByteArray &data )
{
kdDebug(5800) << "OpenGroupware::slotUploadData()" << endl;
@@ -185,7 +185,7 @@ void GroupwareUploadJob::slotUploadJobResult( KIO::Job *job )
adaptor()->interpretUploadJob( job, mUploadJobData );
}
mUploadJob = 0;
- QTimer::singleShot( 0, this, SLOT( uploadItem() ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( uploadItem() ) );
}
@@ -216,11 +216,11 @@ kdDebug() << "Not using batch create to " << url.url() << " for item of type " <
}
if ( mUploadJob ) {
- mUploadNewJobData = QString::null;
- connect( mUploadJob, SIGNAL( result( KIO::Job* ) ),
- SLOT( slotUploadNewJobResult( KIO::Job* ) ) );
- connect( mUploadJob, SIGNAL( data( KIO::Job *, const QByteArray & ) ),
- SLOT( slotUploadNewJobData( KIO::Job *, const QByteArray & ) ) );
+ mUploadNewJobData = TQString::null;
+ connect( mUploadJob, TQT_SIGNAL( result( KIO::Job* ) ),
+ TQT_SLOT( slotUploadNewJobResult( KIO::Job* ) ) );
+ connect( mUploadJob, TQT_SIGNAL( data( KIO::Job *, const TQByteArray & ) ),
+ TQT_SLOT( slotUploadNewJobData( KIO::Job *, const TQByteArray & ) ) );
} else {
uploadNewItem();
}
@@ -231,7 +231,7 @@ kdDebug() << "Not using batch create to " << url.url() << " for item of type " <
}
}
-void GroupwareUploadJob::slotUploadNewJobData( KIO::Job *, const QByteArray &data )
+void GroupwareUploadJob::slotUploadNewJobData( KIO::Job *, const TQByteArray &data )
{
kdDebug(5800) << "OpenGroupware::slotUploadNewJobData()" << endl;
@@ -246,7 +246,7 @@ void GroupwareUploadJob::slotUploadNewJobResult( KIO::Job *job )
adaptor()->interpretUploadNewJob( job, mUploadNewJobData );
}
mUploadJob = 0;
- QTimer::singleShot( 0, this, SLOT( uploadNewItem() ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( uploadNewItem() ) );
}
@@ -255,12 +255,12 @@ void GroupwareUploadJob::kill()
cancelSave();
}
-void GroupwareUploadJob::slotItemDeleted( const QString &/*localId*/, const KURL &remoteURL )
+void GroupwareUploadJob::slotItemDeleted( const TQString &/*localId*/, const KURL &remoteURL )
{
kdDebug() << "GroupwareUploadJob::slotItemDeleted, removal successful: "<< remoteURL.url() << endl;
- const QString &remote = remoteURL.path();
- const QString &local = adaptor()->idMapper()->localId( remote );
+ const TQString &remote = remoteURL.path();
+ const TQString &local = adaptor()->idMapper()->localId( remote );
if ( !local.isEmpty() ) {
// TODO: Is the deleted status reset in the resource?
adaptor()->deleteItem( local );
@@ -290,12 +290,12 @@ kdDebug()<<"Found it in the list!"<<endl;
-void GroupwareUploadJob::slotItemUploaded( const QString &/*localId*/, const KURL &remoteURL )
+void GroupwareUploadJob::slotItemUploaded( const TQString &/*localId*/, const KURL &remoteURL )
{
kdDebug() << "GroupwareUploadJob::slotItemUploaded, upload successful: "<< remoteURL.url() << endl;
- const QString &remote = remoteURL.path();
- const QString &local = adaptor()->idMapper()->localId( remote );
+ const TQString &remote = remoteURL.path();
+ const TQString &local = adaptor()->idMapper()->localId( remote );
if ( !local.isEmpty() ) {
// TODO: Is the deleted status reset in the resource?
// adaptor()->itemUploaded( local, remoteURL );
@@ -327,14 +327,14 @@ kdDebug()<<"Found it in the list!"<<endl;
}
-void GroupwareUploadJob::slotItemUploadedNew( const QString &localId, const KURL &remoteURL )
+void GroupwareUploadJob::slotItemUploadedNew( const TQString &localId, const KURL &remoteURL )
{
kdDebug() << "GroupwareUploadJob::slotItemUploadedNew, upload successful: "<< remoteURL.url() << endl;
- const QString &remote = remoteURL.path();
+ const TQString &remote = remoteURL.path();
// TODO: For a new item this won't return anything, so we need to insert the
// local<=>remote id map when creating the upload job... And maybe
- const QString &local = adaptor()->idMapper()->localId( remote );
+ const TQString &local = adaptor()->idMapper()->localId( remote );
if ( !localId.isEmpty() ) {
adaptor()->deleteItem( localId );
}
@@ -367,7 +367,7 @@ kdDebug()<<"Found it in the list!"<<endl;
}
}
-void GroupwareUploadJob::slotItemDeleteError( const KURL &remoteURL, const QString &/*error*/ )
+void GroupwareUploadJob::slotItemDeleteError( const KURL &remoteURL, const TQString &/*error*/ )
{
// TODO: Add to error list, remove from uploading and toUpload list
kdDebug() << "GroupwareUploadJob::slotItemDeleteError, removal not successful: "<< remoteURL.url() << endl;
@@ -393,7 +393,7 @@ kdDebug()<<"Found it in the list!"<<endl;
}
}
-void GroupwareUploadJob::slotItemUploadError( const KURL &remoteURL, const QString &/*error*/ )
+void GroupwareUploadJob::slotItemUploadError( const KURL &remoteURL, const TQString &/*error*/ )
{
// TODO: Add to error list, remove from uploading and toUpload list
kdDebug() << "GroupwareUploadJob::slotItemUploadError, removal not successful: "<< remoteURL.url() << endl;
@@ -419,7 +419,7 @@ kdDebug()<<"Found it in the list!"<<endl;
}
}
-void GroupwareUploadJob::slotItemUploadNewError( const QString &/*localID*/, const QString &remoteURL )
+void GroupwareUploadJob::slotItemUploadNewError( const TQString &/*localID*/, const TQString &remoteURL )
{
kdDebug(5006) << "GroupwareUploadJob::slotItemUploadNewError, removal not successful: "<< remoteURL << endl;
KPIM::GroupwareUploadItem::List allit( mAddedItems );
diff --git a/kresources/lib/groupwareuploadjob.h b/kresources/lib/groupwareuploadjob.h
index de87680f4..5edbca9b4 100644
--- a/kresources/lib/groupwareuploadjob.h
+++ b/kresources/lib/groupwareuploadjob.h
@@ -26,7 +26,7 @@
#include "groupwareresourcejob.h"
#include <kurl.h>
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include <groupwaredataadaptor.h>
namespace KIO {
@@ -88,19 +88,19 @@ class GroupwareUploadJob : public GroupwareJob
void cancelSave();
void slotDeletionJobResult( KIO::Job *job );
- void slotDeletionJobData( KIO::Job *, const QByteArray & );
+ void slotDeletionJobData( KIO::Job *, const TQByteArray & );
void slotUploadJobResult( KIO::Job *job );
- void slotUploadJobData( KIO::Job *, const QByteArray & );
+ void slotUploadJobData( KIO::Job *, const TQByteArray & );
void slotUploadNewJobResult( KIO::Job *job );
- void slotUploadNewJobData( KIO::Job *, const QByteArray & );
+ void slotUploadNewJobData( KIO::Job *, const TQByteArray & );
- void slotItemDeleted( const QString &localID, const KURL &remoteURL );
- void slotItemUploaded( const QString &localID, const KURL &remoteURL );
- void slotItemUploadedNew( const QString &localID, const KURL &remoteURL );
+ void slotItemDeleted( const TQString &localID, const KURL &remoteURL );
+ void slotItemUploaded( const TQString &localID, const KURL &remoteURL );
+ void slotItemUploadedNew( const TQString &localID, const KURL &remoteURL );
- void slotItemDeleteError( const KURL &remoteURL, const QString &error );
- void slotItemUploadError( const KURL &remoteURL, const QString &error );
- void slotItemUploadNewError( const QString &localID, const QString &error );
+ void slotItemDeleteError( const KURL &remoteURL, const TQString &error );
+ void slotItemUploadError( const KURL &remoteURL, const TQString &error );
+ void slotItemUploadNewError( const TQString &localID, const TQString &error );
void uploadCompleted();
@@ -113,9 +113,9 @@ class GroupwareUploadJob : public GroupwareJob
KPIM::GroupwareUploadItem::List mItemsUploaded;
KPIM::GroupwareUploadItem::List mItemsUploadError;
- QString mDeletionJobData;
- QString mUploadJobData;
- QString mUploadNewJobData;
+ TQString mDeletionJobData;
+ TQString mUploadJobData;
+ TQString mUploadNewJobData;
KIO::TransferJob *mUploadJob;
KIO::Job *mDeletionJob;
diff --git a/kresources/lib/kabc_resourcegroupwarebase.cpp b/kresources/lib/kabc_resourcegroupwarebase.cpp
index f087f4849..8af4cf837 100644
--- a/kresources/lib/kabc_resourcegroupwarebase.cpp
+++ b/kresources/lib/kabc_resourcegroupwarebase.cpp
@@ -177,8 +177,8 @@ bool ResourceGroupwareBase::asyncLoad()
loadCache();
mDownloadJob = createDownloadJob( mAdaptor );
- connect( mDownloadJob, SIGNAL( result( KPIM::GroupwareJob * ) ),
- SLOT( slotDownloadJobResult( KPIM::GroupwareJob * ) ) );
+ connect( mDownloadJob, TQT_SIGNAL( result( KPIM::GroupwareJob * ) ),
+ TQT_SLOT( slotDownloadJobResult( KPIM::GroupwareJob * ) ) );
return true;
}
@@ -212,8 +212,8 @@ bool ResourceGroupwareBase::asyncSave( Ticket* )
}
mUploadJob = createUploadJob( mAdaptor );
- connect( mUploadJob, SIGNAL( result( KPIM::GroupwareJob * ) ),
- SLOT( slotUploadJobResult( KPIM::GroupwareJob * ) ) );
+ connect( mUploadJob, TQT_SIGNAL( result( KPIM::GroupwareJob * ) ),
+ TQT_SLOT( slotUploadJobResult( KPIM::GroupwareJob * ) ) );
KABC::Addressee::List addr;
KABC::Addressee::List::Iterator it;
diff --git a/kresources/lib/kabc_resourcegroupwarebaseconfig.cpp b/kresources/lib/kabc_resourcegroupwarebaseconfig.cpp
index 47b17ced5..803037342 100644
--- a/kresources/lib/kabc_resourcegroupwarebaseconfig.cpp
+++ b/kresources/lib/kabc_resourcegroupwarebaseconfig.cpp
@@ -32,43 +32,43 @@
#include <klineedit.h>
#include <kurlrequester.h>
-#include <qlabel.h>
-#include <qlayout.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
using namespace KABC;
-ResourceGroupwareBaseConfig::ResourceGroupwareBaseConfig( QWidget* parent, const char* name )
+ResourceGroupwareBaseConfig::ResourceGroupwareBaseConfig( TQWidget* parent, const char* name )
: KRES::ConfigWidget( parent, name )
{
- QGridLayout *mainLayout = new QGridLayout( this, 7, 2, 0, KDialog::spacingHint() );
+ TQGridLayout *mainLayout = new TQGridLayout( this, 7, 2, 0, KDialog::spacingHint() );
- QLabel *label = new QLabel( i18n( "URL:" ), this );
+ TQLabel *label = new TQLabel( i18n( "URL:" ), this );
mURL = new KURLRequester( this );
mainLayout->addWidget( label, 0, 0 );
mainLayout->addWidget( mURL, 0, 1 );
- label = new QLabel( i18n( "User:" ), this );
+ label = new TQLabel( i18n( "User:" ), this );
mUser = new KLineEdit( this );
mainLayout->addWidget( label, 1, 0 );
mainLayout->addWidget( mUser, 1, 1 );
- label = new QLabel( i18n( "Password:" ), this );
+ label = new TQLabel( i18n( "Password:" ), this );
mPassword = new KLineEdit( this );
- mPassword->setEchoMode( QLineEdit::Password );
+ mPassword->setEchoMode( TQLineEdit::Password );
mainLayout->addWidget( label, 2, 0 );
mainLayout->addWidget( mPassword, 2, 1 );
- QFrame *hline = new QFrame( this );
- hline->setFrameStyle( QFrame::HLine | QFrame::Sunken );
+ TQFrame *hline = new TQFrame( this );
+ hline->setFrameStyle( TQFrame::HLine | TQFrame::Sunken );
mainLayout->addMultiCellWidget( hline, 3, 3, 0, 1 );
mFolderConfig = new KPIM::FolderConfig( this );
- connect( mFolderConfig, SIGNAL( updateFoldersClicked() ),
- SLOT( updateFolders() ) );
+ connect( mFolderConfig, TQT_SIGNAL( updateFoldersClicked() ),
+ TQT_SLOT( updateFolders() ) );
mainLayout->addMultiCellWidget( mFolderConfig, 4, 4, 0, 1 );
}
diff --git a/kresources/lib/kabc_resourcegroupwarebaseconfig.h b/kresources/lib/kabc_resourcegroupwarebaseconfig.h
index ba2ae1715..68e8fc0af 100644
--- a/kresources/lib/kabc_resourcegroupwarebaseconfig.h
+++ b/kresources/lib/kabc_resourcegroupwarebaseconfig.h
@@ -41,7 +41,7 @@ class KDE_EXPORT ResourceGroupwareBaseConfig : public KRES::ConfigWidget
Q_OBJECT
public:
- ResourceGroupwareBaseConfig( QWidget* parent = 0, const char* name = 0 );
+ ResourceGroupwareBaseConfig( TQWidget* parent = 0, const char* name = 0 );
public slots:
void loadSettings( KRES::Resource* );
diff --git a/kresources/lib/kcal_cachesettingsdlg.cpp b/kresources/lib/kcal_cachesettingsdlg.cpp
index ea89dfa5d..808a16734 100644
--- a/kresources/lib/kcal_cachesettingsdlg.cpp
+++ b/kresources/lib/kcal_cachesettingsdlg.cpp
@@ -32,19 +32,19 @@
#include <klineedit.h>
#include <kdialog.h>
-#include <qlabel.h>
-#include <qlayout.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
using namespace KCal;
-CacheSettingsDialog::CacheSettingsDialog( QWidget* parent, const char* name )
+CacheSettingsDialog::CacheSettingsDialog( TQWidget* parent, const char* name )
: KDialogBase( parent, name, true, i18n("Resource Cache Settings"), KDialogBase::Close )
{
- QWidget *mainWidget = new QWidget( this );
+ TQWidget *mainWidget = new TQWidget( this );
setMainWidget( mainWidget );
- QGridLayout *mainLayout = new QGridLayout( mainWidget, 2, 2 );
+ TQGridLayout *mainLayout = new TQGridLayout( mainWidget, 2, 2 );
mainLayout->setSpacing( KDialog::spacingHint() );
mReloadConfig = new KCal::ResourceCachedReloadConfig( mainWidget );
diff --git a/kresources/lib/kcal_cachesettingsdlg.h b/kresources/lib/kcal_cachesettingsdlg.h
index 71ec6de28..e50b2cad4 100644
--- a/kresources/lib/kcal_cachesettingsdlg.h
+++ b/kresources/lib/kcal_cachesettingsdlg.h
@@ -43,7 +43,7 @@ class KDE_EXPORT CacheSettingsDialog : public KDialogBase
{
Q_OBJECT
public:
- CacheSettingsDialog( QWidget *parent = 0, const char *name = 0 );
+ CacheSettingsDialog( TQWidget *parent = 0, const char *name = 0 );
public slots:
virtual void loadSettings( KRES::Resource *resource );
diff --git a/kresources/lib/kcal_resourcegroupwarebase.cpp b/kresources/lib/kcal_resourcegroupwarebase.cpp
index aaf471218..7499b224d 100644
--- a/kresources/lib/kcal_resourcegroupwarebase.cpp
+++ b/kresources/lib/kcal_resourcegroupwarebase.cpp
@@ -34,7 +34,7 @@
#include <kio/job.h>
#include <klocale.h>
-#include <qapplication.h>
+#include <tqapplication.h>
using namespace KCal;
@@ -195,8 +195,8 @@ bool ResourceGroupwareBase::doOpen()
return false;
} else {
mLoginFinished = false;
- connect( loginJob, SIGNAL( result( KIO::Job * ) ),
- SLOT( slotLoginJobResult( KIO::Job* ) ) );
+ connect( loginJob, TQT_SIGNAL( result( KIO::Job * ) ),
+ TQT_SLOT( slotLoginJobResult( KIO::Job* ) ) );
enter_loop();
return mLoginFinished;
}
@@ -211,13 +211,13 @@ bool ResourceGroupwareBase::doOpen()
// Copyright (C) 1998 Matthias Ettrich (ettrich@kde.org)
// Copyright (C) 1999 David Faure (faure@kde.org)
// 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 ResourceGroupwareBase::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);
@@ -239,8 +239,8 @@ void ResourceGroupwareBase::doClose()
if ( adaptor() &&
adaptor()->flags() & KPIM::GroupwareDataAdaptor::GWResNeedsLogoff ) {
KIO::Job *logoffJob = adaptor()->createLogoffJob( prefs()->url(), prefs()->user(), prefs()->password() );
- connect( logoffJob, SIGNAL( result( KIO::Job * ) ),
- SLOT( slotLogoffJobResult( KIO::Job* ) ) );
+ connect( logoffJob, TQT_SIGNAL( result( KIO::Job * ) ),
+ TQT_SLOT( slotLogoffJobResult( KIO::Job* ) ) );
// TODO: Do we really need to block while waiting for the job to return?
enter_loop();
}
@@ -276,8 +276,8 @@ bool ResourceGroupwareBase::doLoad()
emit resourceChanged( this );
mDownloadJob = createDownloadJob( adaptor() );
- connect( mDownloadJob, SIGNAL( result( KPIM::GroupwareJob * ) ),
- SLOT( slotDownloadJobResult( KPIM::GroupwareJob * ) ) );
+ connect( mDownloadJob, TQT_SIGNAL( result( KPIM::GroupwareJob * ) ),
+ TQT_SLOT( slotDownloadJobResult( KPIM::GroupwareJob * ) ) );
return true;
}
@@ -322,8 +322,8 @@ bool ResourceGroupwareBase::doSave()
if ( !confirmSave() ) return false;
mUploadJob = createUploadJob( adaptor() );
- connect( mUploadJob, SIGNAL( result( KPIM::GroupwareJob * ) ),
- SLOT( slotUploadJobResult( KPIM::GroupwareJob * ) ) );
+ connect( mUploadJob, TQT_SIGNAL( result( KPIM::GroupwareJob * ) ),
+ TQT_SLOT( slotUploadJobResult( KPIM::GroupwareJob * ) ) );
Incidence::List inc;
Incidence::List::Iterator it;
@@ -376,8 +376,8 @@ void ResourceGroupwareBase::slotUploadJobResult( KPIM::GroupwareJob *job )
if ( !mDownloadJob ) {
mDownloadJob = createDownloadJob( adaptor() );
- connect( mDownloadJob, SIGNAL( result( KPIM::GroupwareJob * ) ),
- SLOT( slotDownloadJobResult( KPIM::GroupwareJob * ) ) );
+ connect( mDownloadJob, TQT_SIGNAL( result( KPIM::GroupwareJob * ) ),
+ TQT_SLOT( slotDownloadJobResult( KPIM::GroupwareJob * ) ) );
} else {
kdWarning() << k_funcinfo << "Download still in progress. "
"Can't happen. (TM)" << endl;
@@ -399,7 +399,7 @@ bool ResourceGroupwareBase::confirmSave()
dlg.addIncidences( deletedIncidences(), i18n("Deleted") );
int result = dlg.exec();
- return result == QDialog::Accepted;
+ return result == TQDialog::Accepted;
}
KABC::Lock *ResourceGroupwareBase::lock()
diff --git a/kresources/lib/kcal_resourcegroupwarebaseconfig.cpp b/kresources/lib/kcal_resourcegroupwarebaseconfig.cpp
index 2b4bc81be..9ae91a0d8 100644
--- a/kresources/lib/kcal_resourcegroupwarebaseconfig.cpp
+++ b/kresources/lib/kcal_resourcegroupwarebaseconfig.cpp
@@ -35,48 +35,48 @@
#include <kdialog.h>
#include <kpushbutton.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qhbox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqhbox.h>
using namespace KCal;
-ResourceGroupwareBaseConfig::ResourceGroupwareBaseConfig( QWidget* parent,
+ResourceGroupwareBaseConfig::ResourceGroupwareBaseConfig( TQWidget* parent,
const char* name )
: KRES::ConfigWidget( parent, name )
{
resize( 245, 115 );
- QGridLayout *mainLayout = new QGridLayout( this, 2, 2 );
+ TQGridLayout *mainLayout = new TQGridLayout( this, 2, 2 );
mainLayout->setSpacing( KDialog::spacingHint() );
- QLabel *label = new QLabel( i18n("URL:"), this );
+ TQLabel *label = new TQLabel( i18n("URL:"), this );
mainLayout->addWidget( label, 1, 0 );
mUrl = new KLineEdit( this );
mainLayout->addWidget( mUrl, 1, 1 );
- label = new QLabel( i18n("User:"), this );
+ label = new TQLabel( i18n("User:"), this );
mainLayout->addWidget( label, 2, 0 );
mUserEdit = new KLineEdit( this );
mainLayout->addWidget( mUserEdit, 2, 1 );
- label = new QLabel( i18n("Password:"), this );
+ label = new TQLabel( i18n("Password:"), this );
mainLayout->addWidget( label, 3, 0 );
mPasswordEdit = new KLineEdit( this );
mainLayout->addWidget( mPasswordEdit, 3, 1 );
mPasswordEdit->setEchoMode( KLineEdit::Password );
mFolderConfig = new KPIM::FolderConfig( this );
- connect( mFolderConfig, SIGNAL( updateFoldersClicked() ),
- SLOT( updateFolders() ) );
+ connect( mFolderConfig, TQT_SIGNAL( updateFoldersClicked() ),
+ TQT_SLOT( updateFolders() ) );
mainLayout->addMultiCellWidget( mFolderConfig, 4, 4, 0, 1 );
- QHBox *hBox = new QHBox( this );
+ TQHBox *hBox = new TQHBox( this );
mCacheSettingsButton = new KPushButton( i18n("Configure Cache Settings..."), hBox );
mainLayout->addMultiCellWidget( hBox, 5, 5, 0, 1 );
- connect( mCacheSettingsButton, SIGNAL( clicked() ),
- SLOT( showCacheSettings() ) );
+ connect( mCacheSettingsButton, TQT_SIGNAL( clicked() ),
+ TQT_SLOT( showCacheSettings() ) );
mCacheDialog = new CacheSettingsDialog( this );
}
diff --git a/kresources/lib/kcal_resourcegroupwarebaseconfig.h b/kresources/lib/kcal_resourcegroupwarebaseconfig.h
index a88afbc56..61e71b370 100644
--- a/kresources/lib/kcal_resourcegroupwarebaseconfig.h
+++ b/kresources/lib/kcal_resourcegroupwarebaseconfig.h
@@ -48,7 +48,7 @@ class KDE_EXPORT ResourceGroupwareBaseConfig : public KRES::ConfigWidget
{
Q_OBJECT
public:
- ResourceGroupwareBaseConfig( QWidget *parent = 0, const char *name = 0 );
+ ResourceGroupwareBaseConfig( TQWidget *parent = 0, const char *name = 0 );
public slots:
virtual void loadSettings( KRES::Resource *resource );
diff --git a/kresources/lib/webdavhandler.cpp b/kresources/lib/webdavhandler.cpp
index e6c0a4937..fcf99a145 100644
--- a/kresources/lib/webdavhandler.cpp
+++ b/kresources/lib/webdavhandler.cpp
@@ -23,7 +23,7 @@
#include <kdebug.h>
-#include <qdatetime.h>
+#include <tqdatetime.h>
extern "C" {
#include <ical.h>
@@ -56,39 +56,39 @@ KURL WebdavHandler::toDAV( const KURL& url )
-QDomElement WebdavHandler::addElement( QDomDocument &doc, QDomNode &node,
- const QString &tag, const QString &value )
+TQDomElement WebdavHandler::addElement( TQDomDocument &doc, TQDomNode &node,
+ const TQString &tag, const TQString &value )
{
- QDomElement el = doc.createElement( tag );
+ TQDomElement el = doc.createElement( tag );
node.appendChild( el );
if ( !value.isNull() ) {
- QDomText txt = doc.createTextNode( value );
+ TQDomText txt = doc.createTextNode( value );
el.appendChild( txt );
}
return el;
}
-QDomElement WebdavHandler::addElementNS( QDomDocument &doc, QDomNode &node,
- const QString &ns, const QString &tag, const QString &value )
+TQDomElement WebdavHandler::addElementNS( TQDomDocument &doc, TQDomNode &node,
+ const TQString &ns, const TQString &tag, const TQString &value )
{
- QDomElement el = doc.createElementNS( ns, tag );
+ TQDomElement el = doc.createElementNS( ns, tag );
node.appendChild( el );
if ( !value.isNull() ) {
- QDomText txt = doc.createTextNode( value );
+ TQDomText txt = doc.createTextNode( value );
el.appendChild( txt );
}
return el;
}
-QDomElement WebdavHandler::addDavElement( QDomDocument &doc, QDomNode &node,
- const QString &tag, const QString &value )
+TQDomElement WebdavHandler::addDavElement( TQDomDocument &doc, TQDomNode &node,
+ const TQString &tag, const TQString &value )
{
return addElementNS( doc, node, "DAV:", tag, value );
}
-bool WebdavHandler::extractBool( const QDomElement &node, const QString &entry, bool &value )
+bool WebdavHandler::extractBool( const TQDomElement &node, const TQString &entry, bool &value )
{
- QDomElement element = node.namedItem( entry ).toElement();
+ TQDomElement element = node.namedItem( entry ).toElement();
if ( !element.isNull() ) {
value = (element.text() != "0");
return true;
@@ -96,9 +96,9 @@ bool WebdavHandler::extractBool( const QDomElement &node, const QString &entry,
return false;
}
-bool WebdavHandler::extractLong( const QDomElement &node, const QString &entry, long &value )
+bool WebdavHandler::extractLong( const TQDomElement &node, const TQString &entry, long &value )
{
- QDomElement element = node.namedItem( entry ).toElement();
+ TQDomElement element = node.namedItem( entry ).toElement();
if ( !element.isNull() ) {
value = element.text().toLong();
return true;
@@ -106,9 +106,9 @@ bool WebdavHandler::extractLong( const QDomElement &node, const QString &entry,
return false;
}
-bool WebdavHandler::extractFloat( const QDomElement &node, const QString &entry, float &value )
+bool WebdavHandler::extractFloat( const TQDomElement &node, const TQString &entry, float &value )
{
- QDomElement element = node.namedItem( entry ).toElement();
+ TQDomElement element = node.namedItem( entry ).toElement();
if ( !element.isNull() ) {
value = element.text().toFloat();
return true;
@@ -116,19 +116,19 @@ bool WebdavHandler::extractFloat( const QDomElement &node, const QString &entry,
return false;
}
-bool WebdavHandler::extractDateTime( const QDomElement &node, const QString &entry, QDateTime &value )
+bool WebdavHandler::extractDateTime( const TQDomElement &node, const TQString &entry, TQDateTime &value )
{
- QDomElement element = node.namedItem( entry ).toElement();
+ TQDomElement element = node.namedItem( entry ).toElement();
if ( !element.isNull() && !element.text().isEmpty() ) {
- value = QDateTime::fromString( element.text(), Qt::ISODate );
+ value = TQDateTime::fromString( element.text(), Qt::ISODate );
return true;
}
return false;
}
-bool WebdavHandler::extractString( const QDomElement &node, const QString &entry, QString &value )
+bool WebdavHandler::extractString( const TQDomElement &node, const TQString &entry, TQString &value )
{
- QDomElement element = node.namedItem( entry ).toElement();
+ TQDomElement element = node.namedItem( entry ).toElement();
if ( !element.isNull() ) {
value = element.text();
return true;
@@ -136,14 +136,14 @@ bool WebdavHandler::extractString( const QDomElement &node, const QString &entry
return false;
}
-bool WebdavHandler::extractStringList( const QDomElement &node, const QString &entry, QStringList &value )
+bool WebdavHandler::extractStringList( const TQDomElement &node, const TQString &entry, TQStringList &value )
{
- QDomElement element = node.namedItem( entry ).toElement();
+ TQDomElement element = node.namedItem( entry ).toElement();
if ( !element.isNull() ) {
value.clear();
- QDomNodeList list = element.elementsByTagNameNS( "xml:", "v" );
+ TQDomNodeList list = element.elementsByTagNameNS( "xml:", "v" );
for( uint i=0; i < list.count(); i++ ) {
- QDomElement item = list.item(i).toElement();
+ TQDomElement item = list.item(i).toElement();
value.append( item.text() );
}
return true;
@@ -152,20 +152,20 @@ bool WebdavHandler::extractStringList( const QDomElement &node, const QString &e
}
-const QString WebdavHandler::getEtagFromHeaders( const QString& headers )
+const TQString WebdavHandler::getEtagFromHeaders( const TQString& headers )
{
int start = headers.find( "etag:", 0, false );
- if ( start < 0 ) return QString();
+ if ( start < 0 ) return TQString();
start += 6;
return headers.mid( start, headers.find( "\n", start ) - start );
}
//TODO: should not call libical functions directly -- better to make
// a new libkcal abstraction method.
-QDateTime WebdavHandler::utcAsZone( const QDateTime& utc, const QString& timeZoneId )
+TQDateTime WebdavHandler::utcAsZone( const TQDateTime& utc, const TQString& timeZoneId )
{
int daylight;
- QDateTime epoch;
+ TQDateTime epoch;
epoch.setTime_t( 0 );
time_t v = epoch.secsTo( utc );
struct icaltimetype tt =
@@ -180,10 +180,10 @@ kdDebug() << "Calculated offset of: " << offset << " of timezone: " << timeZoneI
//TODO: should not call libical functions directly -- better to make
// a new libkcal abstraction method.
-QDateTime WebdavHandler::zoneAsUtc( const QDateTime& zone, const QString& timeZoneId )
+TQDateTime WebdavHandler::zoneAsUtc( const TQDateTime& zone, const TQString& timeZoneId )
{
int daylight;
- QDateTime epoch;
+ TQDateTime epoch;
epoch.setTime_t( 0 );
time_t v = epoch.secsTo( zone );
struct icaltimetype tt = icaltime_from_timet( v, 0 ); // 0: is_date=false
diff --git a/kresources/lib/webdavhandler.h b/kresources/lib/webdavhandler.h
index cdf616e9c..668f99fdd 100644
--- a/kresources/lib/webdavhandler.h
+++ b/kresources/lib/webdavhandler.h
@@ -22,10 +22,10 @@
#ifndef WEBDAVHANDLER_H
#define WEBDAVHANDLER_H
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qdom.h>
-#include <qdatetime.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqdom.h>
+#include <tqdatetime.h>
#include <kurl.h>
#include <kdepimmacros.h>
@@ -37,42 +37,42 @@ class KDE_EXPORT WebdavHandler
static KURL toDAV( const KURL& url );
- static QDomElement addElementNS( QDomDocument &doc, QDomNode &node,
- const QString &ns, const QString &tag,
- const QString &value = QString::null );
- static QDomElement addElement( QDomDocument &, QDomNode &,
- const QString &tag, const QString &value = QString::null );
- static QDomElement addDavElement( QDomDocument &, QDomNode &,
- const QString &tag, const QString &value = QString::null );
+ static TQDomElement addElementNS( TQDomDocument &doc, TQDomNode &node,
+ const TQString &ns, const TQString &tag,
+ const TQString &value = TQString::null );
+ static TQDomElement addElement( TQDomDocument &, TQDomNode &,
+ const TQString &tag, const TQString &value = TQString::null );
+ static TQDomElement addDavElement( TQDomDocument &, TQDomNode &,
+ const TQString &tag, const TQString &value = TQString::null );
- static bool extractBool( const QDomElement &node,
- const QString &entry, bool &value );
- static bool extractLong( const QDomElement &node,
- const QString &entry, long &value );
- static bool extractFloat( const QDomElement &node,
- const QString &entry, float &value );
- static bool extractDateTime( const QDomElement &node,
- const QString &entry, QDateTime &value );
- static bool extractString( const QDomElement &node,
- const QString &entry, QString &value );
- static bool extractStringList( const QDomElement &node,
- const QString &entry, QStringList &value );
+ static bool extractBool( const TQDomElement &node,
+ const TQString &entry, bool &value );
+ static bool extractLong( const TQDomElement &node,
+ const TQString &entry, long &value );
+ static bool extractFloat( const TQDomElement &node,
+ const TQString &entry, float &value );
+ static bool extractDateTime( const TQDomElement &node,
+ const TQString &entry, TQDateTime &value );
+ static bool extractString( const TQDomElement &node,
+ const TQString &entry, TQString &value );
+ static bool extractStringList( const TQDomElement &node,
+ const TQString &entry, TQStringList &value );
/**
* Returns the value of the "etag" header if it can be found in the headers.
*/
- static const QString getEtagFromHeaders( const QString& );
+ static const TQString getEtagFromHeaders( const TQString& );
/**
* Return the representation of utc time in the time zone indicated by timeZoneId
*/
- static QDateTime utcAsZone( const QDateTime& utc, const QString& timeZoneId );
+ static TQDateTime utcAsZone( const TQDateTime& utc, const TQString& timeZoneId );
/**
* Return the UTC representation of local time in the time zone indicated by timeZoneId
*/
- static QDateTime zoneAsUtc( const QDateTime& zone, const QString& timeZoneId );
+ static TQDateTime zoneAsUtc( const TQDateTime& zone, const TQString& timeZoneId );
};
#endif
diff --git a/kresources/newexchange/exchangeaddressbookadaptor.cpp b/kresources/newexchange/exchangeaddressbookadaptor.cpp
index 469d15c36..423ac75a7 100644
--- a/kresources/newexchange/exchangeaddressbookadaptor.cpp
+++ b/kresources/newexchange/exchangeaddressbookadaptor.cpp
@@ -82,9 +82,9 @@ void ExchangeAddressBookAdaptor::customAdaptUploadUrl( KURL &url )
// url.setPath( url.path() + "/NewItem.EML" );
}
-QString ExchangeAddressBookAdaptor::defaultNewItemName( KPIM::GroupwareUploadItem *item ) {
+TQString ExchangeAddressBookAdaptor::defaultNewItemName( KPIM::GroupwareUploadItem *item ) {
if ( item ) return item->uid()+".EML";
- else return QString::null;
+ else return TQString::null;
}
diff --git a/kresources/newexchange/exchangeaddressbookadaptor.h b/kresources/newexchange/exchangeaddressbookadaptor.h
index 7d340bfb9..2d3df7420 100644
--- a/kresources/newexchange/exchangeaddressbookadaptor.h
+++ b/kresources/newexchange/exchangeaddressbookadaptor.h
@@ -31,7 +31,7 @@
#include <kabc/addressee.h>
#include <kurl.h>
-#include <qdom.h>
+#include <tqdom.h>
namespace KABC {
@@ -47,7 +47,7 @@ class ExchangeAddressBookUploadItem : public KPIM::GroupwareUploadItem
protected:
ExchangeAddressBookUploadItem( UploadType type ) : KPIM::GroupwareUploadItem( type ) {}
- QDomDocument mDavData;
+ TQDomDocument mDavData;
};
class ExchangeAddressBookAdaptor : public DavAddressBookAdaptor
@@ -57,9 +57,9 @@ class ExchangeAddressBookAdaptor : public DavAddressBookAdaptor
void customAdaptDownloadUrl( KURL &url );
void customAdaptUploadUrl( KURL &url );
- QString mimeType() const { return "message/rfc822"; }
- QCString identifier() const { return "KABCResourceExchange"; }
- QString defaultNewItemName( KPIM::GroupwareUploadItem *item );
+ TQString mimeType() const { return "message/rfc822"; }
+ TQCString identifier() const { return "KABCResourceExchange"; }
+ TQString defaultNewItemName( KPIM::GroupwareUploadItem *item );
long flags() const { return GWResBatchDelete; }
@@ -77,9 +77,9 @@ class ExchangeAddressBookAdaptor : public DavAddressBookAdaptor
// Interpreting Jobs
- bool interpretListItemsJob( KIO::Job *job, const QString &jobData )
+ bool interpretListItemsJob( KIO::Job *job, const TQString &jobData )
{ return ExchangeGlobals::interpretListItemsJob( this, job, jobData ); }
- bool interpretDownloadItemsJob( KIO::Job *job, const QString &jobData )
+ bool interpretDownloadItemsJob( KIO::Job *job, const TQString &jobData )
{ return ExchangeGlobals::interpretAddressBookDownloadItemsJob( this, job, jobData ); }
@@ -91,9 +91,9 @@ class ExchangeAddressBookAdaptor : public DavAddressBookAdaptor
- bool getFolderHasSubs( const QDomNode &folderNode )
+ bool getFolderHasSubs( const TQDomNode &folderNode )
{ return ExchangeGlobals::getFolderHasSubs( folderNode ); }
- KPIM::FolderLister::ContentType getContentType( const QDomNode &folderNode )
+ KPIM::FolderLister::ContentType getContentType( const TQDomNode &folderNode )
{ return ExchangeGlobals::getContentType( folderNode ); }
};
diff --git a/kresources/newexchange/exchangecalendaradaptor.cpp b/kresources/newexchange/exchangecalendaradaptor.cpp
index 254eb4da1..ceec4412b 100644
--- a/kresources/newexchange/exchangecalendaradaptor.cpp
+++ b/kresources/newexchange/exchangecalendaradaptor.cpp
@@ -98,9 +98,9 @@ void ExchangeCalendarAdaptor::customAdaptUploadUrl( KURL &url )
/* Removing items: old version of the exchange resource: If the event is part
of a sequence of recurring event, we need to delete the master!
-void ExchangeDelete::findUidSingleMaster( QString const& uid )
+void ExchangeDelete::findUidSingleMaster( TQString const& uid )
{
- QString query =
+ TQString query =
"SELECT \"DAV:href\", \"urn:schemas:calendar:uid\"\r\n"
"FROM Scope('shallow traversal of \"\"')\r\n"
"WHERE \"urn:schemas:calendar:uid\" = '" + uid + "'\r\n"
@@ -109,15 +109,15 @@ void ExchangeDelete::findUidSingleMaster( QString const& uid )
KIO::DavJob* job = KIO::davSearch( mAccount->calendarURL(), "DAV:", "sql", query, false );
job->setWindow( mWindow );
- connect(job, SIGNAL(result( KIO::Job * )), this, SLOT(slotFindUidResult(KIO::Job *)));
+ connect(job, TQT_SIGNAL(result( KIO::Job * )), this, TQT_SLOT(slotFindUidResult(KIO::Job *)));
}
*/
-QString ExchangeCalendarAdaptor::defaultNewItemName( KPIM::GroupwareUploadItem *item ) {
+TQString ExchangeCalendarAdaptor::defaultNewItemName( KPIM::GroupwareUploadItem *item ) {
if ( item ) return item->uid()+".EML";
- else return QString::null;
+ else return TQString::null;
}
KPIM::GroupwareUploadItem *ExchangeCalendarAdaptor::newUploadItem( KCal::Incidence*it,
@@ -126,19 +126,19 @@ KPIM::GroupwareUploadItem *ExchangeCalendarAdaptor::newUploadItem( KCal::Inciden
return new ExchangeCalendarUploadItem( this, it, type );
}
-bool ExchangeCalendarAdaptor::interpretUploadJob( KIO::Job *job, const QString &/*jobData*/ )
+bool ExchangeCalendarAdaptor::interpretUploadJob( KIO::Job *job, const TQString &/*jobData*/ )
{
kdDebug(7000) << "ExchangeCalendarAdaptor::interpretUploadJob " << endl;
KIO::DavJob *davjob = dynamic_cast<KIO::DavJob*>(job);
bool error = job->error();
- const QString err = job->errorString();
+ const TQString err = job->errorString();
if ( davjob ) {
if ( error ) {
emit itemUploadError( davjob->url(), err );
return false;
} else {
- QDomDocument doc( davjob->response() );
+ TQDomDocument doc( davjob->response() );
// TODO: extract the href and the items that got a 404. If there's
// something important among them, issue the "usual" not-all-settings-uploaded
// warning to the user.
@@ -153,20 +153,20 @@ bool ExchangeCalendarAdaptor::interpretUploadJob( KIO::Job *job, const QString &
}
}
-bool ExchangeCalendarAdaptor::interpretUploadNewJob( KIO::Job *job, const QString &/*jobData*/ )
+bool ExchangeCalendarAdaptor::interpretUploadNewJob( KIO::Job *job, const TQString &/*jobData*/ )
{
// TODO: How does the incidence mapper know the old/new ids???
kdDebug(7000) << "ExchangeCalendarAdaptor::interpretUploadNewJob " << endl;
KIO::DavJob *davjob = dynamic_cast<KIO::DavJob*>(job);
bool error = job->error();
- const QString err = job->errorString();
+ const TQString err = job->errorString();
if ( davjob ) {
if ( error ) {
emit itemUploadNewError( idMapper()->localId( davjob->url().path() ), err );
return false;
} else {
- QDomDocument doc( davjob->response() );
+ TQDomDocument doc( davjob->response() );
// TODO: extract the href and the items that got a 404. If there's
// something important among them, issue the "usual" not-all-settings-uploaded
// warning to the user.
diff --git a/kresources/newexchange/exchangecalendaradaptor.h b/kresources/newexchange/exchangecalendaradaptor.h
index 7e772302d..08bad45f0 100644
--- a/kresources/newexchange/exchangecalendaradaptor.h
+++ b/kresources/newexchange/exchangecalendaradaptor.h
@@ -27,7 +27,7 @@
#include <groupwareresourcejob.h>
#include <davcalendaradaptor.h>
#include <kurl.h>
-#include <qdom.h>
+#include <tqdom.h>
namespace KCal {
@@ -45,7 +45,7 @@ class ExchangeCalendarUploadItem : public KPIM::GroupwareUploadItem
protected:
ExchangeCalendarUploadItem( UploadType type ) : KPIM::GroupwareUploadItem( type ) {}
- QDomDocument mDavData;
+ TQDomDocument mDavData;
};
class ExchangeCalendarAdaptor : public DavCalendarAdaptor
@@ -55,9 +55,9 @@ class ExchangeCalendarAdaptor : public DavCalendarAdaptor
void customAdaptDownloadUrl( KURL &url );
void customAdaptUploadUrl( KURL &url );
- QString mimeType() const { return "message/rfc822"; }
- QCString identifier() const { return "KCalResourceExchange"; }
- QString defaultNewItemName( KPIM::GroupwareUploadItem *item );
+ TQString mimeType() const { return "message/rfc822"; }
+ TQCString identifier() const { return "KCalResourceExchange"; }
+ TQString defaultNewItemName( KPIM::GroupwareUploadItem *item );
long flags() const { return GWResBatchDelete; }
@@ -74,12 +74,12 @@ class ExchangeCalendarAdaptor : public DavCalendarAdaptor
// Interpreting Jobs
- bool interpretListItemsJob( KIO::Job *job, const QString &jobData )
+ bool interpretListItemsJob( KIO::Job *job, const TQString &jobData )
{ return ExchangeGlobals::interpretListItemsJob( this, job, jobData ); }
- bool interpretDownloadItemsJob( KIO::Job *job, const QString &jobData )
+ bool interpretDownloadItemsJob( KIO::Job *job, const TQString &jobData )
{ return ExchangeGlobals::interpretCalendarDownloadItemsJob( this, job, jobData ); }
- bool interpretUploadJob( KIO::Job *job, const QString &/*jobData*/ );
- bool interpretUploadNewJob( KIO::Job *job, const QString &/*jobData*/ );
+ bool interpretUploadJob( KIO::Job *job, const TQString &/*jobData*/ );
+ bool interpretUploadNewJob( KIO::Job *job, const TQString &/*jobData*/ );
@@ -88,9 +88,9 @@ class ExchangeCalendarAdaptor : public DavCalendarAdaptor
- bool getFolderHasSubs( const QDomNode &folderNode )
+ bool getFolderHasSubs( const TQDomNode &folderNode )
{ return ExchangeGlobals::getFolderHasSubs( folderNode ); }
- KPIM::FolderLister::ContentType getContentType( const QDomNode &folderNode )
+ KPIM::FolderLister::ContentType getContentType( const TQDomNode &folderNode )
{ return ExchangeGlobals::getContentType( folderNode ); }
};
diff --git a/kresources/newexchange/exchangeconvertercalendar.cpp b/kresources/newexchange/exchangeconvertercalendar.cpp
index bc0481daf..be32291be 100644
--- a/kresources/newexchange/exchangeconvertercalendar.cpp
+++ b/kresources/newexchange/exchangeconvertercalendar.cpp
@@ -56,7 +56,7 @@ ExchangeConverterCalendar::ExchangeConverterCalendar()
{
}
-void ExchangeConverterCalendar::setTimeZone( const QString &id )
+void ExchangeConverterCalendar::setTimeZone( const TQString &id )
{
// kdDebug() << "Setting timezone to: " << id << endl;
mFormat.setTimeZone( id, true );
@@ -75,7 +75,7 @@ void ExchangeConverterCalendar::setTimeZone( const QString &id )
#define property( prop ) \
WebdavHandler::addElement( doc, root, prop )
-void ExchangeConverterCalendar::createRequestIncidence( QDomDocument &doc, QDomElement &root )
+void ExchangeConverterCalendar::createRequestIncidence( TQDomDocument &doc, TQDomElement &root )
{
propertyDAV( "contentclass" );
propertyDAV( "getcontenttype" );
@@ -98,10 +98,10 @@ void ExchangeConverterCalendar::createRequestIncidence( QDomDocument &doc, QDomE
propertyHTTPMail( "hasattachment" );
}
-void ExchangeConverterCalendar::createRequestAppointment( QDomDocument &doc, QDomElement &root )
+void ExchangeConverterCalendar::createRequestAppointment( TQDomDocument &doc, TQDomElement &root )
{
createRequestIncidence( doc, root );
- QDomAttr att_c = doc.createAttribute( "xmlns:c" );
+ TQDomAttr att_c = doc.createAttribute( "xmlns:c" );
att_c.setValue( "urn:schemas:calendar:" );
doc.documentElement().setAttributeNode( att_c );
propertyCalendar( "uid" );
@@ -132,17 +132,17 @@ void ExchangeConverterCalendar::createRequestAppointment( QDomDocument &doc, QDo
#define propertyTask2( prop ) \
WebdavHandler::addElement( doc, props, "t2:"prop )
-void ExchangeConverterCalendar::createRequestTask( QDomDocument &doc, QDomElement &props )
+void ExchangeConverterCalendar::createRequestTask( TQDomDocument &doc, TQDomElement &props )
{
createRequestIncidence( doc, props );
- QDomElement root = doc.documentElement();
+ TQDomElement root = doc.documentElement();
- QDomAttr att_t1 = doc.createAttribute( "xmlns:t1" );
+ TQDomAttr att_t1 = doc.createAttribute( "xmlns:t1" );
att_t1.setValue( TaskNamespace1 );
root.setAttributeNode( att_t1 );
- QDomAttr att_t2 = doc.createAttribute( "xmlns:t2" );
+ TQDomAttr att_t2 = doc.createAttribute( "xmlns:t2" );
att_t2.setValue( TaskNamespace2 );
root.setAttributeNode( att_t2 );
@@ -169,7 +169,7 @@ void ExchangeConverterCalendar::createRequestTask( QDomDocument &doc, QDomElemen
#undef propertyTask1
#undef propertyTask2
-void ExchangeConverterCalendar::createRequestJournal( QDomDocument &doc, QDomElement &root )
+void ExchangeConverterCalendar::createRequestJournal( TQDomDocument &doc, TQDomElement &root )
{
createRequestIncidence( doc, root );
propertyDAV( "uid" );
@@ -183,21 +183,21 @@ void ExchangeConverterCalendar::createRequestJournal( QDomDocument &doc, QDomEle
#undef propertyMailHeader
#undef property
-bool ExchangeConverterCalendar::readTZ( const QDomElement &node, Incidence */*incidence*/ )
+bool ExchangeConverterCalendar::readTZ( const TQDomElement &node, Incidence */*incidence*/ )
{
- QString timezoneid;
+ TQString timezoneid;
if ( WebdavHandler::extractString( node, "timezoneid", timezoneid ) ) {
// kdDebug() << "DEBUG: timezoneid = " << timezoneid << endl;
}
- QString timezone;
+ TQString timezone;
if ( WebdavHandler::extractString( node, "timezone", timezone ) ) {
// kdDebug() << "DEBUG: timezone = " << timezone << endl;
}
// TODO:
/* // mFormat is used for parsing recurrence rules.
- QString localTimeZoneId;
+ TQString localTimeZoneId;
if ( mCalendar ) {
mFormat.setTimeZone( mCalendar->timeZoneId(), !mCalendar->isLocalTime() );
localTimeZoneId = mCalendar->timeZoneId();
@@ -209,14 +209,14 @@ bool ExchangeConverterCalendar::readTZ( const QDomElement &node, Incidence */*in
return true;
}
-bool ExchangeConverterCalendar::readIncidence( const QDomElement &node, Incidence *incidence )
+bool ExchangeConverterCalendar::readIncidence( const TQDomElement &node, Incidence *incidence )
{
kdDebug()<<"ExchangeConverterCalendar::readIncidencd"<<endl;
- QDateTime tmpdt;
+ TQDateTime tmpdt;
bool tmpbool;
- QString tmpstr;
+ TQString tmpstr;
long tmplng;
- QStringList tmplst;
+ TQStringList tmplst;
readTZ( node, incidence );
@@ -264,9 +264,9 @@ kdDebug()<<"ExchangeConverterCalendar::readIncidencd"<<endl;
if ( WebdavHandler::extractString( node, "from", tmpstr ) )
incidence->setOrganizer( tmpstr );
if ( WebdavHandler::extractString( node, "to", tmpstr ) ) {
- QStringList atts( KPIM::splitEmailAddrList( tmpstr ) );
- for ( QStringList::Iterator it = atts.begin(); it != atts.end(); ++it ) {
- QString name, email;
+ TQStringList atts( KPIM::splitEmailAddrList( tmpstr ) );
+ for ( TQStringList::Iterator it = atts.begin(); it != atts.end(); ++it ) {
+ TQString name, email;
KPIM::getNameAndMail( *it, name, email );
Attendee *att = new Attendee( name, email );
att->setRole( KCal::Attendee::ReqParticipant );
@@ -279,9 +279,9 @@ kdDebug()<<"ExchangeConverterCalendar::readIncidencd"<<endl;
}
}
if ( WebdavHandler::extractString( node, "cc", tmpstr ) ) {
- QStringList atts( KPIM::splitEmailAddrList( tmpstr ) );
- for ( QStringList::Iterator it = atts.begin(); it != atts.end(); ++it ) {
- QString name, email;
+ TQStringList atts( KPIM::splitEmailAddrList( tmpstr ) );
+ for ( TQStringList::Iterator it = atts.begin(); it != atts.end(); ++it ) {
+ TQString name, email;
KPIM::getNameAndMail( *it, name, email );
Attendee *att = new Attendee( name, email );
att->setRole( KCal::Attendee::OptParticipant );
@@ -298,10 +298,10 @@ kdDebug()<<"ExchangeConverterCalendar::readIncidencd"<<endl;
}
/* FIXME: Handle recurrences
-void ExchangeDownload::handleRecurrence( QString uid )
+void ExchangeDownload::handleRecurrence( TQString uid )
{
// kdDebug() << "Handling recurrence info for uid=" << uid << endl;
- QString query =
+ TQString query =
"SELECT \"DAV:href\", \"urn:schemas:calendar:instancetype\"\r\n"
"FROM Scope('shallow traversal of \"\"')\r\n"
"WHERE \"urn:schemas:calendar:uid\" = '" + uid + "'\r\n"
@@ -314,18 +314,18 @@ void ExchangeDownload::handleRecurrence( QString uid )
query, false );
KIO::Scheduler::scheduleJob( job );
job->setWindow( mWindow );
- connect( job, SIGNAL( result( KIO::Job * ) ),
- SLOT( slotMasterResult( KIO::Job * ) ) );
+ connect( job, TQT_SIGNAL( result( KIO::Job * ) ),
+ TQT_SLOT( slotMasterResult( KIO::Job * ) ) );
}
*/
-bool ExchangeConverterCalendar::readEvent( const QDomElement &node, Event *event )
+bool ExchangeConverterCalendar::readEvent( const TQDomElement &node, Event *event )
{
if ( !readIncidence( node, event ) ) return false;
kdDebug()<<"ExchangeConverterCalendar::readEvent"<<endl;
- QDateTime tmpdt;
- QString tmpstr;
+ TQDateTime tmpdt;
+ TQString tmpstr;
long tmplng;
bool tmpbool;
@@ -405,19 +405,19 @@ kdDebug()<<"ExchangeConverterCalendar::readIncidence: ERROR: No UID given"<<endl
}
}
- QStringList tmplst;
+ TQStringList tmplst;
if ( WebdavHandler::extractStringList( node, "exdate", tmplst ) ) {
- QStringList::Iterator it = tmplst.begin();
+ TQStringList::Iterator it = tmplst.begin();
KCal::DateList exdates;
for ( ; it != tmplst.end(); ++it ) {
- exdates.append( /*utcAsZone(*/ QDateTime::fromString( *it, Qt::ISODate )/*,
+ exdates.append( /*utcAsZone(*/ TQDateTime::fromString( *it, Qt::ISODate )/*,
localTimeZoneId )*/.date() );
}
event->recurrence()->setExDates( exdates );
}
// FIXME: use rdate and exrule!
/* FIXME: Recurring events, they are split up
- QDomElement instancetypeElement = prop.namedItem( "instancetype" ).toElement();
+ TQDomElement instancetypeElement = prop.namedItem( "instancetype" ).toElement();
if ( instancetypeElement.isNull() ) {
kdError() << "Error: no instance type in Exchange server reply" << endl;
continue;
@@ -426,12 +426,12 @@ kdDebug()<<"ExchangeConverterCalendar::readIncidence: ERROR: No UID given"<<endl
//kdDebug() << "Instance type: " << instanceType << endl;
if ( recurrence && instanceType > 0 ) {
- QDomElement uidElement = prop.namedItem( "uid" ).toElement();
+ TQDomElement uidElement = prop.namedItem( "uid" ).toElement();
if ( uidElement.isNull() ) {
kdError() << "Error: no uid in Exchange server reply" << endl;
continue;
}
- QString uid = uidElement.text();
+ TQString uid = uidElement.text();
if ( ! m_uids.contains( uid ) ) {
m_uids[uid] = 1;
handleRecurrence(uid);
@@ -448,7 +448,7 @@ kdDebug()<<"ExchangeConverterCalendar::readIncidence: ERROR: No UID given"<<endl
return true;
}
-bool ExchangeConverterCalendar::readTodo( const QDomElement &node, Todo *todo )
+bool ExchangeConverterCalendar::readTodo( const TQDomElement &node, Todo *todo )
{
if ( !readIncidence( node, todo ) ) return false;
kdDebug()<<"ExchangeConverterCalendar::readTodo"<<endl;
@@ -456,11 +456,11 @@ kdDebug()<<"ExchangeConverterCalendar::readTodo"<<endl;
// FIXME: Retrieve time zone: "timezone"
// FIXME: What to with TaskProp_Owner and TaskProp_ContactNames?
- QDateTime tmpdt;
+ TQDateTime tmpdt;
float tmpfloat;
long tmplong;
bool tmpbool;
- QString tmpstr;
+ TQString tmpstr;
// The UID is absolutely required!
// FIXME: Which field shall be used as uid???
@@ -503,12 +503,12 @@ kdDebug()<<"ExchangeConverterCalendar::readIncidence: ERROR: No UID given"<<endl
return true;
}
-bool ExchangeConverterCalendar::readJournal( const QDomElement &node, Journal *journal )
+bool ExchangeConverterCalendar::readJournal( const TQDomElement &node, Journal *journal )
{
if ( !readIncidence( node, journal ) ) return false;
kdDebug()<<"ExchangeConverterCalendar::readJournal"<<endl;
- QDateTime tmpdt;
- QString tmpstr;
+ TQDateTime tmpdt;
+ TQString tmpstr;
// The UID is absolutely required!
// FIXME: Which field shall be used as UID?
if ( WebdavHandler::extractString( node, "uid", tmpstr ) ) {
@@ -528,13 +528,13 @@ kdDebug()<<"ExchangeConverterCalendar::readJournal: ERROR: No UID given"<<endl;
return true;
}
-Incidence::List ExchangeConverterCalendar::parseWebDAV( const QDomDocument& davdata )
+Incidence::List ExchangeConverterCalendar::parseWebDAV( const TQDomDocument& davdata )
{
- QDomElement prop = davdata.documentElement().namedItem( "response" )
+ TQDomElement prop = davdata.documentElement().namedItem( "response" )
.namedItem( "propstat" ).namedItem( "prop" ).toElement();
if ( prop.isNull() ) return Incidence::List();
- QString contentclass;
+ TQString contentclass;
bool success = WebdavHandler::extractString( prop, "contentclass", contentclass );
if ( !success ) return Incidence::List();
@@ -581,7 +581,7 @@ class ExchangeConverterCalendar::createWebDAVVisitor : public IncidenceBase::Vis
{
public:
createWebDAVVisitor() : Visitor() {}
- bool act( QDomDocument doc, QDomElement el, IncidenceBase *incidence, const QString &timeZoneId )
+ bool act( TQDomDocument doc, TQDomElement el, IncidenceBase *incidence, const TQString &timeZoneId )
{
mDoc = doc;
mElement = el;
@@ -589,15 +589,15 @@ class ExchangeConverterCalendar::createWebDAVVisitor : public IncidenceBase::Vis
return incidence->accept( *this );
}
protected:
- void addBoolProp( QDomElement &el ) { el.setAttribute( "b:dt", "boolean" ); }
- void addDateProp( QDomElement &el ) { el.setAttribute( "b:dt", "dateTime.tz" ); }
- void addFloatProp( QDomElement &el ) { el.setAttribute( "b:dt", "float" ); }
- void addIntProp( QDomElement &el ) { el.setAttribute( "b:dt", "int" ); }
- QString timePropString( const QDateTime &dt ) { return dt.toString( Qt::ISODate )+"Z"; }
+ void addBoolProp( TQDomElement &el ) { el.setAttribute( "b:dt", "boolean" ); }
+ void addDateProp( TQDomElement &el ) { el.setAttribute( "b:dt", "dateTime.tz" ); }
+ void addFloatProp( TQDomElement &el ) { el.setAttribute( "b:dt", "float" ); }
+ void addIntProp( TQDomElement &el ) { el.setAttribute( "b:dt", "int" ); }
+ TQString timePropString( const TQDateTime &dt ) { return dt.toString( Qt::ISODate )+"Z"; }
bool visitIncidence( Incidence *incidence )
{
- QString tmpstr;
+ TQString tmpstr;
domDavProperty( "isreadonly", (incidence->isReadOnly())?"1":"0" );
// FIXME: scheduling ID
// domProperty( "http://schemas.microsoft.com/repl/", "repl-uid", ??? );
@@ -607,7 +607,7 @@ class ExchangeConverterCalendar::createWebDAVVisitor : public IncidenceBase::Vis
// domHTTPMailProperty( "date", ??? ); // timestamp not available in libkcal
// domDavProperty( "comment", incidence->comments() ); // libkcal has a QStringlist, not one string
// domProperty( "urn:schemas-microsoft-com:office:office", "Keywords", ??? ); // It's a <v>entyr1</v><v>entry2</v> String list!
- tmpstr = QString::null;
+ tmpstr = TQString::null;
switch ( incidence->secrecy() ) {
case KCal::Incidence::SecrecyPublic: tmpstr = "0"; break;
case KCal::Incidence::SecrecyPrivate: tmpstr = "2"; break;
@@ -617,14 +617,14 @@ class ExchangeConverterCalendar::createWebDAVVisitor : public IncidenceBase::Vis
if ( !tmpstr.isEmpty() )
domProperty( "http://schemas.microsoft.com/exchange/", "sensitivity", tmpstr );
- domHTTPMailProperty( "priority", QString::number(incidence->priority()) );
+ domHTTPMailProperty( "priority", TQString::number(incidence->priority()) );
domMailHeaderProperty( "from", incidence->organizer().fullName() );
// Attendees:
- tmpstr = QString::null;
- QStringList reqattnames;
- QStringList optattnames;
+ tmpstr = TQString::null;
+ TQStringList reqattnames;
+ TQStringList optattnames;
Attendee::List atts = incidence->attendees();
for ( Attendee::List::Iterator it = atts.begin(); it != atts.end(); ++it ) {
switch ( (*it)->role() ) {
@@ -652,7 +652,7 @@ class ExchangeConverterCalendar::createWebDAVVisitor : public IncidenceBase::Vis
{
if ( !visitIncidence(event) ) return false;
- QDomAttr att_c = mDoc.createAttribute( "xmlns:c" );
+ TQDomAttr att_c = mDoc.createAttribute( "xmlns:c" );
att_c.setValue( "urn:schemas:calendar:" );
mDoc.documentElement().setAttributeNode( att_c );
@@ -660,7 +660,7 @@ class ExchangeConverterCalendar::createWebDAVVisitor : public IncidenceBase::Vis
domProperty( "http://schemas.microsoft.com/exchange/",
"outlookmessageclass", "IPM.Appointment" );
domCalendarProperty( "uid", event->uid() );
- QDomElement el = domCalendarProperty( "created", timePropString( WebdavHandler::zoneAsUtc( event->created(), mTimeZoneId ) ) );
+ TQDomElement el = domCalendarProperty( "created", timePropString( WebdavHandler::zoneAsUtc( event->created(), mTimeZoneId ) ) );
addDateProp( el );
el = domCalendarProperty( "lastmodified", timePropString( WebdavHandler::zoneAsUtc( event->lastModified(), mTimeZoneId ) ) );
addDateProp( el );
@@ -668,7 +668,7 @@ class ExchangeConverterCalendar::createWebDAVVisitor : public IncidenceBase::Vis
// FIXME: domCalendarProperty( "sequence", event->sequence() );
domCalendarProperty( "location", event->location() );
- QString tmpstr( QString::null );
+ TQString tmpstr( TQString::null );
switch ( event->transparency() ) {
case KCal::Event::Transparent: tmpstr = "FREE"; break;
case KCal::Event::Opaque: tmpstr = "BUSY"; break;
@@ -684,7 +684,7 @@ class ExchangeConverterCalendar::createWebDAVVisitor : public IncidenceBase::Vis
el = domCalendarProperty( "dtend", timePropString( WebdavHandler::zoneAsUtc( event->dtEnd(), mTimeZoneId ) ) );
addDateProp( el );
} else {
- domCalendarProperty( "duration", QString::number( event->duration() ) );
+ domCalendarProperty( "duration", TQString::number( event->duration() ) );
}
// FIXME: Convert the recurrence rule to a string:
if ( event->doesRecur() ) {
@@ -703,7 +703,7 @@ class ExchangeConverterCalendar::createWebDAVVisitor : public IncidenceBase::Vis
Alarm::List alarms = event->alarms();
for( it = alarms.begin(); it != alarms.end(); ++it ) {
if ((*it)->hasStartOffset()) {
- domCalendarProperty( "reminderoffset", QString::number( (*it)->startOffset().asSeconds() * -1 ) );
+ domCalendarProperty( "reminderoffset", TQString::number( (*it)->startOffset().asSeconds() * -1 ) );
} else {
kdDebug() << "ExchangeConverterCalendar::createWebDAVVisitor: Alarm type not supported\n";
}
@@ -715,11 +715,11 @@ class ExchangeConverterCalendar::createWebDAVVisitor : public IncidenceBase::Vis
{
if ( !visitIncidence(todo) ) return false;
- QDomAttr att_t1 = mDoc.createAttribute( "xmlns:t1" );
+ TQDomAttr att_t1 = mDoc.createAttribute( "xmlns:t1" );
att_t1.setValue( TaskNamespace1 );
mDoc.documentElement().setAttributeNode( att_t1 );
- QDomAttr att_t2 = mDoc.createAttribute( "xmlns:t2" );
+ TQDomAttr att_t2 = mDoc.createAttribute( "xmlns:t2" );
att_t2.setValue( TaskNamespace2 );
mDoc.documentElement().setAttributeNode( att_t2 );
@@ -765,9 +765,9 @@ class ExchangeConverterCalendar::createWebDAVVisitor : public IncidenceBase::Vis
}
protected:
- QDomDocument mDoc;
- QDomElement mElement;
- QString mTimeZoneId;
+ TQDomDocument mDoc;
+ TQDomElement mElement;
+ TQString mTimeZoneId;
};
// Prefixes for the namespaces:
@@ -780,27 +780,27 @@ class ExchangeConverterCalendar::createWebDAVVisitor : public IncidenceBase::Vis
// o... office
//
-QDomDocument ExchangeConverterCalendar::createWebDAV( Incidence *incidence )
+TQDomDocument ExchangeConverterCalendar::createWebDAV( Incidence *incidence )
{
// TODO
- QDomDocument doc;
- QDomElement root = WebdavHandler::addDavElement( doc, doc, "d:propertyupdate" );
- QDomElement set = WebdavHandler::addElement( doc, root, "d:set" );
- QDomElement prop = WebdavHandler::addElement( doc, set, "d:prop" );
+ TQDomDocument doc;
+ TQDomElement root = WebdavHandler::addDavElement( doc, doc, "d:propertyupdate" );
+ TQDomElement set = WebdavHandler::addElement( doc, root, "d:set" );
+ TQDomElement prop = WebdavHandler::addElement( doc, set, "d:prop" );
- QDomAttr att_b = doc.createAttribute( "xmlns:b" );
+ TQDomAttr att_b = doc.createAttribute( "xmlns:b" );
att_b.setValue( "urn:schemas-microsoft-com:datatypes" );
root.setAttributeNode( att_b );
- QDomAttr att_h = doc.createAttribute( "xmlns:h" );
+ TQDomAttr att_h = doc.createAttribute( "xmlns:h" );
att_h.setValue( "urn:schemas:mailheader:" );
root.setAttributeNode( att_h );
- QDomAttr att_m = doc.createAttribute( "xmlns:m" );
+ TQDomAttr att_m = doc.createAttribute( "xmlns:m" );
att_m.setValue( "urn:schemas:httpmail:" );
root.setAttributeNode( att_m );
-// QDomAttr att1 = doc.createAttributeNS( "do:whatever:you:like", "x:attname");
+// TQDomAttr att1 = doc.createAttributeNS( "do:whatever:you:like", "x:attname");
// att1.setValue( "value" );
// prop.setAttributeNodeNS( att1 );
// root.setAttributeNodeNS( att1 );
diff --git a/kresources/newexchange/exchangeconvertercalendar.h b/kresources/newexchange/exchangeconvertercalendar.h
index 346b2a954..a561d0cdf 100644
--- a/kresources/newexchange/exchangeconvertercalendar.h
+++ b/kresources/newexchange/exchangeconvertercalendar.h
@@ -21,8 +21,8 @@
#ifndef KCal_EXCHANGECONVERTERCONTACT_H
#define KCal_EXCHANGECONVERTERCONTACT_H
-#include <qstring.h>
-#include <qdom.h>
+#include <tqstring.h>
+#include <tqdom.h>
#include <libkcal/incidence.h>
#include <libkcal/icalformat.h>
@@ -36,23 +36,23 @@ class ExchangeConverterCalendar
ExchangeConverterCalendar();
- void setTimeZone( const QString &id );
+ void setTimeZone( const TQString &id );
- static void createRequestAppointment( QDomDocument &doc, QDomElement &root );
- static void createRequestTask( QDomDocument &doc, QDomElement &root );
- static void createRequestJournal( QDomDocument &doc, QDomElement &root );
+ static void createRequestAppointment( TQDomDocument &doc, TQDomElement &root );
+ static void createRequestTask( TQDomDocument &doc, TQDomElement &root );
+ static void createRequestJournal( TQDomDocument &doc, TQDomElement &root );
- QDomDocument createWebDAV( Incidence *incidence );
+ TQDomDocument createWebDAV( Incidence *incidence );
- Incidence::List parseWebDAV( const QDomDocument& davdata );
- bool readIncidence( const QDomElement &node, Incidence *incidence );
+ Incidence::List parseWebDAV( const TQDomDocument& davdata );
+ bool readIncidence( const TQDomElement &node, Incidence *incidence );
protected:
- static void createRequestIncidence( QDomDocument &doc, QDomElement &root );
- bool readEvent( const QDomElement &node, Event *event );
- bool readTodo( const QDomElement &node, Todo *todo );
- bool readJournal( const QDomElement &node, Journal *journal );
- bool readTZ( const QDomElement &node, Incidence *incidence );
+ static void createRequestIncidence( TQDomDocument &doc, TQDomElement &root );
+ bool readEvent( const TQDomElement &node, Event *event );
+ bool readTodo( const TQDomElement &node, Todo *todo );
+ bool readJournal( const TQDomElement &node, Journal *journal );
+ bool readTZ( const TQDomElement &node, Incidence *incidence );
KCal::ICalFormat mFormat;
class createWebDAVVisitor;
diff --git a/kresources/newexchange/exchangeconvertercontact.cpp b/kresources/newexchange/exchangeconvertercontact.cpp
index 1e756574f..0764d3101 100644
--- a/kresources/newexchange/exchangeconvertercontact.cpp
+++ b/kresources/newexchange/exchangeconvertercontact.cpp
@@ -44,12 +44,12 @@ ExchangeConverterContact::ExchangeConverterContact()
#define property( prop ) \
Webdavhandler::addElement( doc, props, prop )
-void ExchangeConverterContact::createRequest( QDomDocument &doc, QDomElement &props )
+void ExchangeConverterContact::createRequest( TQDomDocument &doc, TQDomElement &props )
{
- QDomAttr att_c = doc.createAttribute( "xmlns:c" );
+ TQDomAttr att_c = doc.createAttribute( "xmlns:c" );
att_c.setValue( "urn:schemas:contacts:" );
doc.documentElement().setAttributeNode( att_c );
- QDomAttr att_cal = doc.createAttribute( "xmlns:cal" );
+ TQDomAttr att_cal = doc.createAttribute( "xmlns:cal" );
att_cal.setValue( "urn:schemas:calendar:" );
doc.documentElement().setAttributeNode( att_cal );
@@ -160,15 +160,15 @@ void ExchangeConverterContact::createRequest( QDomDocument &doc, QDomElement &pr
#undef property
-bool ExchangeConverterContact::extractAddress( const QDomElement &node,
+bool ExchangeConverterContact::extractAddress( const TQDomElement &node,
Addressee &addressee, int type,
- const QString &street, const QString &pobox, const QString &location,
- const QString &postalcode, const QString &state, const QString &country,
- const QString &/*countycode*/ )
+ const TQString &street, const TQString &pobox, const TQString &location,
+ const TQString &postalcode, const TQString &state, const TQString &country,
+ const TQString &/*countycode*/ )
{
bool haveAddr = false;
Address addr( type );
- QString tmpstr;
+ TQString tmpstr;
if ( WebdavHandler::extractString( node, street, tmpstr ) ) {
addr.setStreet( tmpstr );
@@ -208,9 +208,9 @@ bool ExchangeConverterContact::extractAddress( const QDomElement &node,
/**
For the complete list of Exchange <=> KABC field mappings see the file
Person.mapping */
-bool ExchangeConverterContact::readAddressee( const QDomElement &node, Addressee &addressee )
+bool ExchangeConverterContact::readAddressee( const TQDomElement &node, Addressee &addressee )
{
- QString tmpstr;
+ TQString tmpstr;
long tmplng;
// The UID is absolutely required!
@@ -283,7 +283,7 @@ bool ExchangeConverterContact::readAddressee( const QDomElement &node, Addressee
// General stuff:
- QStringList tmplst;
+ TQStringList tmplst;
if ( WebdavHandler::extractStringList( node, "Keywords", tmplst ) )
addressee.setCategories( tmplst );
// Exchange sentitivity values:
@@ -345,7 +345,7 @@ bool ExchangeConverterContact::readAddressee( const QDomElement &node, Addressee
if ( WebdavHandler::extractString( node, "spousecn", tmpstr ) )
addressee.insertCustom( "KADDRESSBOOK", "X-SpousesName", tmpstr );
- QDateTime tmpdt;
+ TQDateTime tmpdt;
if ( WebdavHandler::extractDateTime( node, "bday", tmpdt ) )
addressee.setBirthday( tmpdt.date() );
if ( WebdavHandler::extractString( node, "weddinganniversary", tmpstr ) )
@@ -369,19 +369,19 @@ bool ExchangeConverterContact::readAddressee( const QDomElement &node, Addressee
return true;
}
-Addressee::List ExchangeConverterContact::parseWebDAV( const QDomDocument& davdata )
+Addressee::List ExchangeConverterContact::parseWebDAV( const TQDomDocument& davdata )
{
// TODO: Handle multiple addressees per reply!
Addressee::List list;
- QDomElement prop = davdata.documentElement().namedItem( "response" )
+ TQDomElement prop = davdata.documentElement().namedItem( "response" )
.namedItem( "propstat" ).namedItem( "prop" ).toElement();
if ( prop.isNull() ) {
kdDebug()<<"ExchangeConverterContact::parseWebDAV, no response->propstat->prop element!"<<endl;
return list;
}
- QString contentclass;
+ TQString contentclass;
bool success = WebdavHandler::extractString( prop, "contentclass", contentclass );
if ( !success ) {
kdDebug()<<"ExchangeConverterContact::parseWebDAV, No contentclass entry"<<endl;
@@ -414,18 +414,18 @@ kdDebug()<<"ExchangeConverterContact::parseWebDAV, No contentclass entry"<<endl;
domContactProperty( name, addr.phoneNumber( type ).number() );
-QDomDocument ExchangeConverterContact::createWebDAV( Addressee addr )
+TQDomDocument ExchangeConverterContact::createWebDAV( Addressee addr )
{
- QDomDocument doc;
- QDomElement root = WebdavHandler::addDavElement( doc, doc, "d:propertyupdate" );
- QDomElement set = WebdavHandler::addElement( doc, root, "d:set" );
- QDomElement prop = WebdavHandler::addElement( doc, set, "d:prop" );
+ TQDomDocument doc;
+ TQDomElement root = WebdavHandler::addDavElement( doc, doc, "d:propertyupdate" );
+ TQDomElement set = WebdavHandler::addElement( doc, root, "d:set" );
+ TQDomElement prop = WebdavHandler::addElement( doc, set, "d:prop" );
- QDomAttr att_c = doc.createAttribute( "xmlns:c" );
+ TQDomAttr att_c = doc.createAttribute( "xmlns:c" );
att_c.setValue( "urn:schemas:contacts:" );
doc.documentElement().setAttributeNode( att_c );
- QDomAttr att_b = doc.createAttribute( "xmlns:b" );
+ TQDomAttr att_b = doc.createAttribute( "xmlns:b" );
att_b.setValue( "urn:schemas-microsoft-com:datatypes" );
root.setAttributeNode( att_b );
@@ -449,8 +449,8 @@ QDomDocument ExchangeConverterContact::createWebDAV( Addressee addr )
domContactProperty( "manager", addr.custom( "KADDRESSBOOK", "X-ManagersName" ) );
domContactProperty( "secretarycn", addr.custom( "KADDRESSBOOK", "X-AssistantsName" ) );
- QStringList emails = addr.emails();
- QString prefemail = addr.preferredEmail();
+ TQStringList emails = addr.emails();
+ TQString prefemail = addr.preferredEmail();
if ( emails.contains( prefemail ) )
emails.remove( prefemail );
emails.prepend( prefemail );
@@ -467,27 +467,27 @@ QDomDocument ExchangeConverterContact::createWebDAV( Addressee addr )
// No value for "personalHomePage"
domContactProperty( "businesshomepage", addr.url().url() );
- QString fburl = KCal::FreeBusyUrlStore::self()->readUrl( addr.preferredEmail() );
+ TQString fburl = KCal::FreeBusyUrlStore::self()->readUrl( addr.preferredEmail() );
if ( !fburl.isEmpty() ) {
domContactProperty( "fburl", fburl );
}
/* FIXME: This doesn't work!
- QStringList cats = addr.categories();
+ TQStringList cats = addr.categories();
if ( cats.isEmpty() ) {
- QDomElement catsnode = WebdavHandler::addElementNS( doc, prop,
+ TQDomElement catsnode = WebdavHandler::addElementNS( doc, prop,
"urn:schemas-microsoft-com:office:office", "Keywords" );
- for ( QStringList::Iterator it = cats.begin(); it != cats.end(); ++it ) {
+ for ( TQStringList::Iterator it = cats.begin(); it != cats.end(); ++it ) {
WebdavHandler::addElementNS( doc, catsnode, "xml:", "v", *it );
}
} else {
-// QDomElement catsnode = addProperty( doc, prop,
+// TQDomElement catsnode = addProperty( doc, prop,
// "urn:schemas-microsoft-com:office:office", "Keywords", "" );
}*/
// Exchange sentitivity values:
// 0 None, 1 Personal, 2 Private, 3 Company Confidential
- QString value;
+ TQString value;
switch ( addr.secrecy().type() ) {
case KABC::Secrecy::Private: value = "2"; break;
case KABC::Secrecy::Confidential: value = "3"; break;
@@ -574,16 +574,16 @@ QDomDocument ExchangeConverterContact::createWebDAV( Addressee addr )
// TODO: Birthday and Anniversary:
// FIXME: Exchange uses the date in the form 8/13, i.e. possibly without a
// year! How shall I deal with this?
-/* QDate dt = addr.birthday().date();
- QString str = (dt.isValid())?(dt.toString( Qt::ISODate )):(QString::null);
+/* TQDate dt = addr.birthday().date();
+ TQString str = (dt.isValid())?(dt.toString( Qt::ISODate )):(TQString::null);
if ( !str.isEmpty() ) {
- QDomElement el = domContactProperty( "bday", str );
+ TQDomElement el = domContactProperty( "bday", str );
el.setAttribute( "b:dt", "date" );
}
- dt = QDate::fromString( addr.custom( "KADDRESSBOOK", "X-Anniversary" ), Qt::ISODate );
- str = (dt.isValid())?(dt.toString( Qt::ISODate )):(QString::null);
+ dt = TQDate::fromString( addr.custom( "KADDRESSBOOK", "X-Anniversary" ), Qt::ISODate );
+ str = (dt.isValid())?(dt.toString( Qt::ISODate )):(TQString::null);
if ( !str.isEmpty() ) {
- QDomElement el = domContactProperty( "weddinganniversary", str );
+ TQDomElement el = domContactProperty( "weddinganniversary", str );
el.setAttribute( "b:dt", "date" );
}*/
@@ -592,12 +592,12 @@ QDomDocument ExchangeConverterContact::createWebDAV( Addressee addr )
KABC::Geo geo = addr.geo();
if ( geo.isValid() ) {
// TODO: Do we need to set any other attribute to make it a float?
- QDomAttr att_cal = doc.createAttribute( "xmlns:cal" );
+ TQDomAttr att_cal = doc.createAttribute( "xmlns:cal" );
att_cal.setValue( "urn:schemas:calendar:" );
doc.documentElement().setAttributeNode( att_cal );
- QDomElement el = domCalendarProperty( "geolatitude", QString::number( geo.latitude() ) );
+ TQDomElement el = domCalendarProperty( "geolatitude", TQString::number( geo.latitude() ) );
el.setAttribute( "b:dt", "float" );
- el = domCalendarProperty( "geolongitude", QString::number( geo.longitude() ) );
+ el = domCalendarProperty( "geolongitude", TQString::number( geo.longitude() ) );
el.setAttribute( "b:dt", "float" );
}
*/
diff --git a/kresources/newexchange/exchangeconvertercontact.h b/kresources/newexchange/exchangeconvertercontact.h
index 45ee7c7ca..191abccb7 100644
--- a/kresources/newexchange/exchangeconvertercontact.h
+++ b/kresources/newexchange/exchangeconvertercontact.h
@@ -21,8 +21,8 @@
#ifndef KABC_EXCHANGECONVERTERCONTACT_H
#define KABC_EXCHANGECONVERTERCONTACT_H
-#include <qstring.h>
-#include <qdom.h>
+#include <tqstring.h>
+#include <tqdom.h>
#include <kabc/addressee.h>
@@ -34,18 +34,18 @@ class ExchangeConverterContact
ExchangeConverterContact();
- static void createRequest( QDomDocument &doc, QDomElement &root );
+ static void createRequest( TQDomDocument &doc, TQDomElement &root );
- QDomDocument createWebDAV( Addressee addr );
+ TQDomDocument createWebDAV( Addressee addr );
- Addressee::List parseWebDAV( const QDomDocument& davdata );
- bool readAddressee( const QDomElement &node, Addressee &addressee );
+ Addressee::List parseWebDAV( const TQDomDocument& davdata );
+ bool readAddressee( const TQDomElement &node, Addressee &addressee );
protected:
- bool extractAddress( const QDomElement &node, Addressee &addressee, int type,
- const QString &street, const QString &pobox, const QString &location,
- const QString &postalcode, const QString &state, const QString &country,
- const QString &countycode );
+ bool extractAddress( const TQDomElement &node, Addressee &addressee, int type,
+ const TQString &street, const TQString &pobox, const TQString &location,
+ const TQString &postalcode, const TQString &state, const TQString &country,
+ const TQString &countycode );
};
}
diff --git a/kresources/newexchange/exchangeglobals.cpp b/kresources/newexchange/exchangeglobals.cpp
index 7cca837df..544051667 100644
--- a/kresources/newexchange/exchangeglobals.cpp
+++ b/kresources/newexchange/exchangeglobals.cpp
@@ -33,14 +33,14 @@
#include <kio/davjob.h>
#include <kdebug.h>
-KPIM::FolderLister::ContentType ExchangeGlobals::getContentType( const QDomElement &prop )
+KPIM::FolderLister::ContentType ExchangeGlobals::getContentType( const TQDomElement &prop )
{
- const QString &contentclass = prop.namedItem("contentclass").toElement().text();
+ const TQString &contentclass = prop.namedItem("contentclass").toElement().text();
kdDebug()<<"contentclass: "<<contentclass<<endl;
return getContentType( contentclass );
}
-KPIM::FolderLister::ContentType ExchangeGlobals::getContentType( const QString &contentclass )
+KPIM::FolderLister::ContentType ExchangeGlobals::getContentType( const TQString &contentclass )
{
if ( contentclass == "urn:content-classes:appointment" )
return KPIM::FolderLister::Event;
@@ -54,15 +54,15 @@ KPIM::FolderLister::ContentType ExchangeGlobals::getContentType( const QString &
}
-KPIM::FolderLister::ContentType ExchangeGlobals::getContentType( const QDomNode &folderNode )
+KPIM::FolderLister::ContentType ExchangeGlobals::getContentType( const TQDomNode &folderNode )
{
kdDebug()<<"ExchangeGlobals::getContentType(...)"<<endl;
- QDomNode n4;
+ TQDomNode n4;
for( n4 = folderNode.firstChild(); !n4.isNull(); n4 = n4.nextSibling() ) {
- QDomElement e = n4.toElement();
+ TQDomElement e = n4.toElement();
if ( e.tagName() == "contentclass" ) {
- QString contentclass( e.text() );
+ TQString contentclass( e.text() );
if ( contentclass == "urn:content-classes:contactfolder" )
return KPIM::FolderLister::Contact;
if ( contentclass == "urn:content-classes:calendarfolder" )
@@ -78,9 +78,9 @@ kdDebug()<<"ExchangeGlobals::getContentType(...)"<<endl;
return KPIM::FolderLister::Unknown;
}
-bool ExchangeGlobals::getFolderHasSubs( const QDomNode &folderNode )
+bool ExchangeGlobals::getFolderHasSubs( const TQDomNode &folderNode )
{
- QString hassubs = folderNode.namedItem( "hassubs" ).toElement().text();
+ TQString hassubs = folderNode.namedItem( "hassubs" ).toElement().text();
return hassubs == "1";
}
@@ -89,9 +89,9 @@ bool ExchangeGlobals::getFolderHasSubs( const QDomNode &folderNode )
KIO::Job *ExchangeGlobals::createListFoldersJob( const KURL &url )
{
- QDomDocument doc;
- QDomElement root = WebdavHandler::addDavElement( doc, doc, "d:propfind" );
- QDomElement prop = WebdavHandler::addElement( doc, root, "d:prop" );
+ TQDomDocument doc;
+ TQDomElement root = WebdavHandler::addDavElement( doc, doc, "d:propfind" );
+ TQDomElement prop = WebdavHandler::addElement( doc, root, "d:prop" );
WebdavHandler::addElement( doc, prop, "d:displayname" );
WebdavHandler::addElement( doc, prop, "d:contentclass" );
WebdavHandler::addElement( doc, prop, "d:hassubs" );
@@ -103,9 +103,9 @@ KIO::Job *ExchangeGlobals::createListFoldersJob( const KURL &url )
KIO::TransferJob *ExchangeGlobals::createListItemsJob( const KURL &url )
{
- QDomDocument doc;
- QDomElement root = WebdavHandler::addDavElement( doc, doc, "d:propfind" );
- QDomElement prop = WebdavHandler::addElement( doc, root, "d:prop" );
+ TQDomDocument doc;
+ TQDomElement root = WebdavHandler::addDavElement( doc, doc, "d:propfind" );
+ TQDomElement prop = WebdavHandler::addElement( doc, root, "d:prop" );
WebdavHandler::addElement( doc, prop, "d:getetag" );
WebdavHandler::addElement( doc, prop, "d:contentclass" );
kdDebug(5800) << "props = "<< doc.toString() << endl;
@@ -125,14 +125,14 @@ kdDebug() << "Person=" << KPIM::FolderLister::Contact << ", "
<< "Message=" << KPIM::FolderLister::Message << endl;
// Don't use an <allprop/> request!
- QDomDocument doc;
- QDomElement root = WebdavHandler::addDavElement( doc, doc, "d:propfind" );
- QDomElement prop = WebdavHandler::addElement( doc, root, "d:prop" );
- QDomAttr att_h = doc.createAttribute( "xmlns:h" );
+ TQDomDocument doc;
+ TQDomElement root = WebdavHandler::addDavElement( doc, doc, "d:propfind" );
+ TQDomElement prop = WebdavHandler::addElement( doc, root, "d:prop" );
+ TQDomAttr att_h = doc.createAttribute( "xmlns:h" );
att_h.setValue( "urn:schemas:mailheader:" );
root.setAttributeNode( att_h );
- QDomAttr att_m = doc.createAttribute( "xmlns:m" );
+ TQDomAttr att_m = doc.createAttribute( "xmlns:m" );
att_m.setValue( "urn:schemas:httpmail:" );
root.setAttributeNode( att_m );
@@ -158,7 +158,7 @@ kdDebug() << "Person=" << KPIM::FolderLister::Contact << ", "
KURL authURL = url;
KIO::DavJob *job = KIO::davPropFind( authURL, doc, "0", false );
/* KURL httpurl( url );
- QString proto("http");
+ TQString proto("http");
httpurl.setProtocol( proto );
KIO::TransferJob *job = KIO::get(httpurl, false, false);
job->addMetaData("customHTTPHeader", "Translate: f");
@@ -170,7 +170,7 @@ kdDebug() << "Person=" << KPIM::FolderLister::Contact << ", "
KIO::Job *ExchangeGlobals::createRemoveJob( const KURL &uploadurl,
const KPIM::GroupwareUploadItem::List &deletedItems )
{
- QStringList urls;
+ TQStringList urls;
KPIM::GroupwareUploadItem::List::const_iterator it;
kdDebug() << " ExchangeGlobals::createRemoveJob: , URL="<<uploadurl.url()<<endl;
for ( it = deletedItems.begin(); it != deletedItems.end(); ++it ) {
@@ -192,7 +192,7 @@ KIO::Job *ExchangeGlobals::createRemoveJob( const KURL &uploadurl,
// it calls getContentType of the ExchangeGlobals class, instead of the one
// from OGoGlobals!!!!
bool ExchangeGlobals::interpretListItemsJob( KPIM::GroupwareDataAdaptor *adaptor,
- KIO::Job *job, const QString &/*jobData*/ )
+ KIO::Job *job, const TQString &/*jobData*/ )
{
kdDebug()<<"ExchangeGlobals::interpretListItemsJob"<<endl;
KIO::DavJob *davjob = dynamic_cast<KIO::DavJob *>(job);
@@ -200,28 +200,28 @@ kdDebug()<<"ExchangeGlobals::interpretListItemsJob"<<endl;
if ( !davjob ) {
return false;
}
- QDomDocument doc = davjob->response();
+ TQDomDocument doc = davjob->response();
kdDebug(7000) << " Doc: " << doc.toString() << endl;
kdDebug(7000) << " IdMapper: " << adaptor->idMapper()->asString() << endl;
- QDomElement docElem = doc.documentElement();
- QDomNode n = docElem.firstChild();
+ TQDomElement docElem = doc.documentElement();
+ 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.
n = n.nextSibling();
if ( e.isNull() )
continue;
const KURL &entry( e.namedItem("href").toElement().text() );
- QDomElement propstat = e.namedItem("propstat").toElement();
+ TQDomElement propstat = e.namedItem("propstat").toElement();
if ( propstat.isNull() )
continue;
- QDomElement prop = propstat.namedItem( "prop" ).toElement();
+ TQDomElement prop = propstat.namedItem( "prop" ).toElement();
if ( prop.isNull() )
continue;
- QDomElement elem = prop.namedItem("getetag").toElement();
- const QString &newFingerprint = elem.text();
+ TQDomElement elem = prop.namedItem("getetag").toElement();
+ const TQString &newFingerprint = elem.text();
if ( elem.isNull() || newFingerprint.isEmpty() )
continue;
@@ -237,7 +237,7 @@ kdDebug()<<"ExchangeGlobals::interpretListItemsJob"<<endl;
bool ExchangeGlobals::interpretCalendarDownloadItemsJob( KCal::CalendarAdaptor *adaptor,
- KIO::Job *job, const QString &/*jobData*/ )
+ KIO::Job *job, const TQString &/*jobData*/ )
{
KIO::DavJob *davjob = dynamic_cast<KIO::DavJob*>(job);
if ( !davjob || !adaptor ) return false;
@@ -251,7 +251,7 @@ kdDebug() << "ExchangeGlobals::interpretCalendarDownloadItemsJob(): QDomDocument
bool res = false;
KCal::Incidence::List::Iterator it = incidences.begin();
for ( ; it != incidences.end(); ++it ) {
- QString fpr = (*it)->customProperty( "KDEPIM-Exchange-Resource", "fingerprint" );
+ TQString fpr = (*it)->customProperty( "KDEPIM-Exchange-Resource", "fingerprint" );
KURL href( (*it)->customProperty( "KDEPIM-Exchange-Resource", "href" ) );
adaptor->calendarItemDownloaded( (*it), (*it)->uid(), href, fpr, href.prettyURL() );
res = true;
@@ -261,7 +261,7 @@ kdDebug() << "ExchangeGlobals::interpretCalendarDownloadItemsJob(): QDomDocument
bool ExchangeGlobals::interpretAddressBookDownloadItemsJob(
- KABC::AddressBookAdaptor *adaptor, KIO::Job *job, const QString &/*jobData*/ )
+ KABC::AddressBookAdaptor *adaptor, KIO::Job *job, const TQString &/*jobData*/ )
{
KIO::DavJob *davjob = dynamic_cast<KIO::DavJob*>(job);
if ( !davjob || !adaptor ) return false;
@@ -274,7 +274,7 @@ kdDebug() << "ExchangeGlobals::interpretAddressBookDownloadItemsJob(): QDomDocum
bool res = false;
KABC::Addressee::List::Iterator it = addressees.begin();
for ( ; it != addressees.end(); ++it ) {
- QString fpr = (*it).custom( "KDEPIM-Exchange-Resource", "fingerprint" );
+ TQString fpr = (*it).custom( "KDEPIM-Exchange-Resource", "fingerprint" );
KURL href( (*it).custom( "KDEPIM-Exchange-Resource", "href" ) );
adaptor->addressbookItemDownloaded( (*it), (*it).uid(), href, fpr, href.prettyURL() );
res = true;
diff --git a/kresources/newexchange/exchangeglobals.h b/kresources/newexchange/exchangeglobals.h
index ba56830d7..f8ad33178 100644
--- a/kresources/newexchange/exchangeglobals.h
+++ b/kresources/newexchange/exchangeglobals.h
@@ -23,7 +23,7 @@
#include <kurl.h>
#include <groupwareuploadjob.h>
-#include <qdom.h>
+#include <tqdom.h>
namespace KIO {
class Job;
@@ -45,10 +45,10 @@ class ExchangeGlobals
{
public:
ExchangeGlobals() {}
- static KPIM::FolderLister::ContentType getContentType( const QDomElement &prop );
- static KPIM::FolderLister::ContentType getContentType( const QString &contentclass );
- static KPIM::FolderLister::ContentType getContentType( const QDomNode &folderNode );
- static bool getFolderHasSubs( const QDomNode &folderNode );
+ static KPIM::FolderLister::ContentType getContentType( const TQDomElement &prop );
+ static KPIM::FolderLister::ContentType getContentType( const TQString &contentclass );
+ static KPIM::FolderLister::ContentType getContentType( const TQDomNode &folderNode );
+ static bool getFolderHasSubs( const TQDomNode &folderNode );
static KIO::Job *createListFoldersJob( const KURL &url );
@@ -60,11 +60,11 @@ class ExchangeGlobals
static bool interpretListItemsJob( KPIM::GroupwareDataAdaptor *adaptor,
- KIO::Job *job, const QString &jobData );
+ KIO::Job *job, const TQString &jobData );
static bool interpretCalendarDownloadItemsJob( KCal::CalendarAdaptor *adaptor,
- KIO::Job *job, const QString &jobData );
+ KIO::Job *job, const TQString &jobData );
static bool interpretAddressBookDownloadItemsJob( KABC::AddressBookAdaptor *adaptor,
- KIO::Job *job, const QString &jobData );
+ KIO::Job *job, const TQString &jobData );
};
#endif
diff --git a/kresources/newexchange/kabc_resourceexchange.h b/kresources/newexchange/kabc_resourceexchange.h
index 542b79955..36f3ca2eb 100644
--- a/kresources/newexchange/kabc_resourceexchange.h
+++ b/kresources/newexchange/kabc_resourceexchange.h
@@ -32,7 +32,7 @@ class KDE_EXPORT ResourceExchange : public ResourceGroupwareBase
public:
ResourceExchange( const KConfig * );
/* ResourceExchange( const KURL &url,
- const QString &user, const QString &password );*/
+ const TQString &user, const TQString &password );*/
protected:
void init();
};
diff --git a/kresources/remote/resourceremote.cpp b/kresources/remote/resourceremote.cpp
index 68d484c01..2aceaad0c 100644
--- a/kresources/remote/resourceremote.cpp
+++ b/kresources/remote/resourceremote.cpp
@@ -22,9 +22,9 @@
#include <typeinfo>
#include <stdlib.h>
-#include <qdatetime.h>
-#include <qstring.h>
-#include <qptrlist.h>
+#include <tqdatetime.h>
+#include <tqstring.h>
+#include <tqptrlist.h>
#include <kdebug.h>
#include <kurl.h>
@@ -101,7 +101,7 @@ void ResourceRemote::init()
void ResourceRemote::readConfig( const KConfig *config )
{
- QString url = config->readEntry( "DownloadUrl" );
+ TQString url = config->readEntry( "DownloadUrl" );
mDownloadUrl = KURL( url );
url = config->readEntry( "UploadUrl" );
@@ -195,11 +195,11 @@ bool ResourceRemote::doLoad()
mDownloadJob = KIO::file_copy( mDownloadUrl, KURL( cacheFile() ), -1, true,
false, !mUseProgressManager );
- connect( mDownloadJob, SIGNAL( result( KIO::Job * ) ),
- SLOT( slotLoadJobResult( KIO::Job * ) ) );
+ connect( mDownloadJob, TQT_SIGNAL( result( KIO::Job * ) ),
+ TQT_SLOT( slotLoadJobResult( KIO::Job * ) ) );
if ( mUseProgressManager ) {
- connect( mDownloadJob, SIGNAL( percent( KIO::Job *, unsigned long ) ),
- SLOT( slotPercent( KIO::Job *, unsigned long ) ) );
+ connect( mDownloadJob, TQT_SIGNAL( percent( KIO::Job *, unsigned long ) ),
+ TQT_SLOT( slotPercent( KIO::Job *, unsigned long ) ) );
mProgress = KPIM::ProgressManager::createProgressItem(
KPIM::ProgressManager::getUniqueID(), i18n("Downloading Calendar") );
@@ -222,8 +222,8 @@ void ResourceRemote::slotLoadJobResult( KIO::Job *job )
{
if ( job->error() ) {
// TODO: Should detect 404, 401 etc. vs host not found and prompt to create new resource only when 404 is returned
- QString warningString = QString("<b>") + i18n("Remote data access failure") + QString("</b><p>") + i18n("Detailed information") \
- + QString(":<br>") + job->errorString() + QString("<p>") + i18n("What would you like to do?");
+ TQString warningString = TQString("<b>") + i18n("Remote data access failure") + TQString("</b><p>") + i18n("Detailed information") \
+ + TQString(":<br>") + job->errorString() + TQString("<p>") + i18n("What would you like to do?");
int rc = KMessageBox::warningContinueCancel(0,
warningString, i18n("Remote Data Access Failure"), i18n("&Continue with cached resource"));
if ( rc == KMessageBox::Continue ) {
@@ -281,8 +281,8 @@ bool ResourceRemote::doSave()
saveCache();
mUploadJob = KIO::file_copy( KURL( cacheFile() ), mUploadUrl, -1, true );
- connect( mUploadJob, SIGNAL( result( KIO::Job * ) ),
- SLOT( slotSaveJobResult( KIO::Job * ) ) );
+ connect( mUploadJob, TQT_SIGNAL( result( KIO::Job * ) ),
+ TQT_SLOT( slotSaveJobResult( KIO::Job * ) ) );
return true;
}
@@ -325,13 +325,13 @@ void ResourceRemote::dump() const
kdDebug(5800) << " ReloadPolicy: " << reloadPolicy() << endl;
}
-void ResourceRemote::addInfoText( QString &txt ) const
+void ResourceRemote::addInfoText( TQString &txt ) const
{
txt += "<br>";
txt += i18n("URL: %1").arg( mDownloadUrl.prettyURL() );
}
-bool ResourceRemote::setValue( const QString &key, const QString &value )
+bool ResourceRemote::setValue( const TQString &key, const TQString &value )
{
if ( key == "URL" ) {
setUploadUrl( KURL( value ) );
diff --git a/kresources/remote/resourceremote.h b/kresources/remote/resourceremote.h
index 5d32b0fc6..3cea7ef1f 100644
--- a/kresources/remote/resourceremote.h
+++ b/kresources/remote/resourceremote.h
@@ -21,9 +21,9 @@
#ifndef KCAL_RESOURCEREMOTEDIR_H
#define KCAL_RESOURCEREMOTEDIR_H
-#include <qptrlist.h>
-#include <qstring.h>
-#include <qdatetime.h>
+#include <tqptrlist.h>
+#include <tqstring.h>
+#include <tqdatetime.h>
#include <kurl.h>
#include <kconfig.h>
@@ -89,7 +89,7 @@ class KDE_EXPORT ResourceRemote : public ResourceCached
void dump() const;
- bool setValue( const QString &key, const QString &value );
+ bool setValue( const TQString &key, const TQString &value );
protected slots:
@@ -102,7 +102,7 @@ class KDE_EXPORT ResourceRemote : public ResourceCached
bool doLoad();
bool doSave();
- void addInfoText( QString & ) const;
+ void addInfoText( TQString & ) const;
private:
void init();
diff --git a/kresources/remote/resourceremoteconfig.cpp b/kresources/remote/resourceremoteconfig.cpp
index 3128eaade..67d7f4b94 100644
--- a/kresources/remote/resourceremoteconfig.cpp
+++ b/kresources/remote/resourceremoteconfig.cpp
@@ -21,8 +21,8 @@
#include <typeinfo>
-#include <qlabel.h>
-#include <qlayout.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
#include <klocale.h>
#include <kdebug.h>
@@ -38,21 +38,21 @@
using namespace KCal;
-ResourceRemoteConfig::ResourceRemoteConfig( QWidget* parent, const char* name )
+ResourceRemoteConfig::ResourceRemoteConfig( TQWidget* parent, const char* name )
: KRES::ConfigWidget( parent, name )
{
resize( 245, 115 );
- QGridLayout *mainLayout = new QGridLayout( this, 2, 2 );
+ TQGridLayout *mainLayout = new TQGridLayout( this, 2, 2 );
mainLayout->setSpacing( KDialog::spacingHint() );
- QLabel *label = new QLabel( i18n( "Download from:" ), this );
+ TQLabel *label = new TQLabel( i18n( "Download from:" ), this );
mDownloadUrl = new KURLRequester( this );
mDownloadUrl->setMode( KFile::File );
mainLayout->addWidget( label, 1, 0 );
mainLayout->addWidget( mDownloadUrl, 1, 1 );
- label = new QLabel( i18n( "Upload to:" ), this );
+ label = new TQLabel( i18n( "Upload to:" ), this );
mUploadUrl = new KURLRequester( this );
mUploadUrl->setMode( KFile::File );
mainLayout->addWidget( label, 2, 0 );
diff --git a/kresources/remote/resourceremoteconfig.h b/kresources/remote/resourceremoteconfig.h
index a102bd0bd..20ab3fcf0 100644
--- a/kresources/remote/resourceremoteconfig.h
+++ b/kresources/remote/resourceremoteconfig.h
@@ -23,8 +23,8 @@
#ifndef KCAL_RESOURCEREMOTECONFIG_H
#define KCAL_RESOURCEREMOTECONFIG_H
-#include <qradiobutton.h>
-#include <qbuttongroup.h>
+#include <tqradiobutton.h>
+#include <tqbuttongroup.h>
#include <kurlrequester.h>
#include <kresources/resource.h>
@@ -46,7 +46,7 @@ class KDE_EXPORT ResourceRemoteConfig : public KRES::ConfigWidget
{
Q_OBJECT
public:
- ResourceRemoteConfig( QWidget *parent = 0, const char *name = 0 );
+ ResourceRemoteConfig( TQWidget *parent = 0, const char *name = 0 );
public slots:
virtual void loadSettings( KRES::Resource *resource );
diff --git a/kresources/scalix/kabc/contact.cpp b/kresources/scalix/kabc/contact.cpp
index 156ae01af..06c67442e 100644
--- a/kresources/scalix/kabc/contact.cpp
+++ b/kresources/scalix/kabc/contact.cpp
@@ -18,7 +18,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#include <qdom.h>
+#include <tqdom.h>
#include <libkdepim/distributionlist.h>
#include <kstaticdeleter.h>
@@ -27,24 +27,24 @@
using namespace Scalix;
-static QMap<QString, QString> *s_distListMap = 0;
-static KStaticDeleter< QMap<QString, QString> > sd;
+static TQMap<TQString, TQString> *s_distListMap = 0;
+static KStaticDeleter< TQMap<TQString, TQString> > sd;
-static QString custom( const QString &name, const KABC::Addressee &addr, const QString &defaultValue = QString() )
+static TQString custom( const TQString &name, const KABC::Addressee &addr, const TQString &defaultValue = TQString() )
{
- const QString value = addr.custom( "Scalix", name );
+ const TQString value = addr.custom( "Scalix", name );
if ( value.isEmpty() )
return defaultValue;
else
return value;
}
-static void setCustom( const QString &name, const QString &value, KABC::Addressee &addr )
+static void setCustom( const TQString &name, const TQString &value, KABC::Addressee &addr )
{
addr.insertCustom( "Scalix", name, value );
}
-QString Contact::toXml( const KABC::Addressee &addr )
+TQString Contact::toXml( const KABC::Addressee &addr )
{
/**
* Handle distribution lists.
@@ -53,13 +53,13 @@ QString Contact::toXml( const KABC::Addressee &addr )
if ( s_distListMap )
return (*s_distListMap)[ addr.uid() ];
else
- return QString();
+ return TQString();
}
/**
* Handle normal contacts.
*/
- QString xml;
+ TQString xml;
xml += "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
xml += "<contact>\n";
@@ -86,9 +86,9 @@ QString Contact::toXml( const KABC::Addressee &addr )
xml += "<company_name>" + addr.organization() + "</company_name>\n";
xml += "<job_title>" + addr.title() + "</job_title>\n";
- QStringList emails = addr.emails();
+ TQStringList emails = addr.emails();
for ( uint i = 0; i < 3; ++i ) {
- QString type, address, comment, display;
+ TQString type, address, comment, display;
if ( i < emails.count() ) {
type = "SMTP";
@@ -103,19 +103,19 @@ QString Contact::toXml( const KABC::Addressee &addr )
comment = addr.formattedName();
display = emails[ i ];
} else {
- comment = custom( QString( "email%1_address_with_comment" ).arg( i + 1 ), addr );
- display = custom( QString( "email%1_display_name" ).arg( i + 1 ), addr );
+ comment = custom( TQString( "email%1_address_with_comment" ).arg( i + 1 ), addr );
+ display = custom( TQString( "email%1_display_name" ).arg( i + 1 ), addr );
}
}
- xml += QString( "<email%1_address_type>" ).arg( i + 1 ) + type +
- QString( "</email%1_address_type>" ).arg( i + 1 ) +"\n";
- xml += QString( "<email%1_address>" ).arg( i + 1 ) + address +
- QString( "</email%1_address>" ).arg( i + 1 ) +"\n";
- xml += QString( "<email%1_address_with_comment>" ).arg( i + 1 ) + comment +
- QString( "</email%1_address_with_comment>" ).arg( i + 1 ) + "\n";
- xml += QString( "<email%1_display_name>" ).arg( i + 1 ) + display +
- QString( "</email%1_display_name>" ).arg( i + 1 ) + "\n";
+ xml += TQString( "<email%1_address_type>" ).arg( i + 1 ) + type +
+ TQString( "</email%1_address_type>" ).arg( i + 1 ) +"\n";
+ xml += TQString( "<email%1_address>" ).arg( i + 1 ) + address +
+ TQString( "</email%1_address>" ).arg( i + 1 ) +"\n";
+ xml += TQString( "<email%1_address_with_comment>" ).arg( i + 1 ) + comment +
+ TQString( "</email%1_address_with_comment>" ).arg( i + 1 ) + "\n";
+ xml += TQString( "<email%1_display_name>" ).arg( i + 1 ) + display +
+ TQString( "</email%1_display_name>" ).arg( i + 1 ) + "\n";
}
KABC::PhoneNumber phone = addr.phoneNumber( KABC::PhoneNumber::Home );
@@ -176,22 +176,22 @@ QString Contact::toXml( const KABC::Addressee &addr )
return xml;
}
-KABC::Addressee Contact::fromXml( const QString &xml )
+KABC::Addressee Contact::fromXml( const TQString &xml )
{
- QDomDocument document;
+ TQDomDocument document;
- QString errorMsg;
+ TQString errorMsg;
int errorLine, errorColumn;
if ( !document.setContent( xml, true, &errorMsg, &errorLine, &errorColumn ) ) {
qDebug( "Error parsing XML in Scalix::Contact::fromXml: %s (%d,%d)", errorMsg.latin1(), errorLine, errorColumn );
return KABC::Addressee();
}
- QDomElement contactElement = document.documentElement();
+ TQDomElement contactElement = document.documentElement();
if ( contactElement.tagName() != "contact" ) {
if ( contactElement.tagName() == "distlist" ) {
- const QDomNodeList names = contactElement.elementsByTagName( "display_name" );
- const QString listName = ( names.count() == 1 ? names.item( 0 ).toElement().text() : "Scalix Dummy List" );
+ const TQDomNodeList names = contactElement.elementsByTagName( "display_name" );
+ const TQString listName = ( names.count() == 1 ? names.item( 0 ).toElement().text() : "Scalix Dummy List" );
/**
* As we can't provide distribution list functionality we store the entry
@@ -201,7 +201,7 @@ KABC::Addressee Contact::fromXml( const QString &xml )
list.setName( listName );
if ( !s_distListMap )
- sd.setObject( s_distListMap, new QMap<QString, QString>() );
+ sd.setObject( s_distListMap, new TQMap<TQString, TQString>() );
s_distListMap->insert( list.uid(), xml );
@@ -212,7 +212,7 @@ KABC::Addressee Contact::fromXml( const QString &xml )
}
}
- QString emails[ 3 ];
+ TQString emails[ 3 ];
KABC::Address homeAddress( KABC::Address::Home );
KABC::Address workAddress( KABC::Address::Work );
KABC::Address otherAddress( KABC::Address::Dom );
@@ -220,9 +220,9 @@ KABC::Addressee Contact::fromXml( const QString &xml )
KABC::Addressee addr;
setCustom( "comes_from_scalix", "true", addr );
- QDomNode node = contactElement.firstChild();
+ TQDomNode node = contactElement.firstChild();
while ( !node.isNull() ) {
- QDomElement element = node.toElement();
+ TQDomElement element = node.toElement();
if ( !element.isNull() ) {
if ( element.tagName() == "direct_ref" )
addr.setUid( element.text() );
@@ -235,7 +235,7 @@ KABC::Addressee Contact::fromXml( const QString &xml )
else if ( element.tagName() == "send_rich_info" )
setCustom( "send_rich_info", element.text(), addr );
else if ( element.tagName() == "last_modification_time" )
- addr.setRevision( QDateTime::fromString( element.text(), Qt::ISODate ) );
+ addr.setRevision( TQDateTime::fromString( element.text(), Qt::ISODate ) );
// name
else if ( element.tagName() == "display_name_prefix" )
@@ -352,7 +352,7 @@ KABC::Addressee Contact::fromXml( const QString &xml )
addr.insertCustom( "KADDRESSBOOK", "X-SpousesName", element.text() );
else if ( element.tagName() == "bday" )
- addr.setBirthday( QDateTime::fromString( element.text(), Qt::ISODate ) );
+ addr.setBirthday( TQDateTime::fromString( element.text(), Qt::ISODate ) );
else if ( element.tagName() == "anniversary" )
addr.insertCustom( "KADDRESSBOOK", "X-Anniversary", element.text() );
else
diff --git a/kresources/scalix/kabc/contact.h b/kresources/scalix/kabc/contact.h
index d73765ede..ad095a8d0 100644
--- a/kresources/scalix/kabc/contact.h
+++ b/kresources/scalix/kabc/contact.h
@@ -28,8 +28,8 @@ namespace Scalix {
class Contact
{
public:
- static QString toXml( const KABC::Addressee &addr );
- static KABC::Addressee fromXml( const QString &xml );
+ static TQString toXml( const KABC::Addressee &addr );
+ static KABC::Addressee fromXml( const TQString &xml );
};
}
diff --git a/kresources/scalix/kabc/resourcescalix.cpp b/kresources/scalix/kabc/resourcescalix.cpp
index 6cbf10832..31ccdf2c9 100644
--- a/kresources/scalix/kabc/resourcescalix.cpp
+++ b/kresources/scalix/kabc/resourcescalix.cpp
@@ -44,11 +44,11 @@
#include <kapplication.h>
#include <dcopclient.h>
-#include <qobject.h>
-#include <qtimer.h>
-#include <qstring.h>
-#include <qfile.h>
-#include <qapplication.h>
+#include <tqobject.h>
+#include <tqtimer.h>
+#include <tqstring.h>
+#include <tqfile.h>
+#include <tqapplication.h>
#include <assert.h>
@@ -64,7 +64,7 @@ class ScalixFactory : public KRES::PluginFactoryBase
return new KABC::ResourceScalix( config );
}
- KRES::ConfigWidget *configWidget( QWidget* )
+ KRES::ConfigWidget *configWidget( TQWidget* )
{
return 0;
}
@@ -80,7 +80,7 @@ static const char* s_inlineMimeType = "application/scalix-properties";
KABC::ResourceScalix::ResourceScalix( const KConfig *config )
: KPIM::ResourceABC( config ),
Scalix::ResourceScalixBase( "ResourceScalix-KABC" ),
- mCachedSubresource( QString::null ), mLocked( false )
+ mCachedSubresource( TQString::null ), mLocked( false )
{
setType( "scalix" );
}
@@ -95,8 +95,8 @@ KABC::ResourceScalix::~ResourceScalix()
}
void KABC::ResourceScalix::loadSubResourceConfig( KConfig& config,
- const QString& name,
- const QString& label,
+ const TQString& name,
+ const TQString& label,
bool writable )
{
KConfigGroup group( &config, name );
@@ -111,11 +111,11 @@ bool KABC::ResourceScalix::doOpen()
KConfig config( configFile() );
// Read the calendar entries
- QValueList<KMailICalIface::SubResource> subResources;
+ TQValueList<KMailICalIface::SubResource> subResources;
if ( !kmailSubresources( subResources, s_kmailContentsType ) )
return false;
mSubResources.clear();
- QValueList<KMailICalIface::SubResource>::ConstIterator it;
+ TQValueList<KMailICalIface::SubResource>::ConstIterator it;
for ( it = subResources.begin(); it != subResources.end(); ++it ) {
loadSubResourceConfig( config, (*it).location, (*it).label, (*it).writable );
}
@@ -149,12 +149,12 @@ KABC::Ticket * KABC::ResourceScalix::requestSaveTicket()
void KABC::ResourceScalix::releaseSaveTicket( Ticket* ticket )
{
mLocked = false;
- mCachedSubresource = QString::null;
+ mCachedSubresource = TQString::null;
delete ticket;
}
-QString KABC::ResourceScalix::loadContact( const QString& contactData,
- const QString& subResource,
+TQString KABC::ResourceScalix::loadContact( const TQString& contactData,
+ const TQString& subResource,
Q_UINT32 sernum,
KMailICalIface::StorageFormat )
{
@@ -168,7 +168,7 @@ QString KABC::ResourceScalix::loadContact( const QString& contactData,
return addr.uid();
}
-bool KABC::ResourceScalix::loadSubResource( const QString& subResource )
+bool KABC::ResourceScalix::loadSubResource( const TQString& subResource )
{
bool scalixcontacts = loadSubResourceHelper( subResource, s_attachmentMimeTypeContact, KMailICalIface::StorageXML );
bool scalixdistlists = loadSubResourceHelper( subResource, s_attachmentMimeTypeDistList, KMailICalIface::StorageXML );
@@ -176,7 +176,7 @@ bool KABC::ResourceScalix::loadSubResource( const QString& subResource )
return scalixcontacts && scalixdistlists && vcardstyle;
}
-bool KABC::ResourceScalix::loadSubResourceHelper( const QString& subResource,
+bool KABC::ResourceScalix::loadSubResourceHelper( const TQString& subResource,
const char* mimetype,
KMailICalIface::StorageFormat format )
{
@@ -204,7 +204,7 @@ bool KABC::ResourceScalix::loadSubResourceHelper( const QString& subResource,
}
for ( int startIndex = 0; startIndex < count; startIndex += nbMessages ) {
- QMap<Q_UINT32, QString> lst;
+ TQMap<Q_UINT32, TQString> lst;
if ( !kmailIncidences( lst, mimetype, subResource, startIndex, nbMessages ) ) {
kdError() << "Communication problem in ResourceScalix::load()\n";
@@ -213,7 +213,7 @@ bool KABC::ResourceScalix::loadSubResourceHelper( const QString& subResource,
return false;
}
- for( QMap<Q_UINT32, QString>::ConstIterator it = lst.begin(); it != lst.end(); ++it ) {
+ for( TQMap<Q_UINT32, TQString>::ConstIterator it = lst.begin(); it != lst.end(); ++it ) {
loadContact( it.data(), subResource, it.key(), format );
}
if ( progressId ) {
@@ -263,24 +263,24 @@ bool KABC::ResourceScalix::save( Ticket* )
namespace Scalix {
struct AttachmentList {
- QStringList attachmentURLs;
- QStringList attachmentNames;
- QStringList attachmentMimeTypes;
- QStringList deletedAttachments;
- QValueList<KTempFile *> tempFiles;
+ TQStringList attachmentURLs;
+ TQStringList attachmentNames;
+ TQStringList attachmentMimeTypes;
+ TQStringList deletedAttachments;
+ TQValueList<KTempFile *> tempFiles;
- void addAttachment( const QString& url, const QString& name, const QString& mimetype ) {
+ void addAttachment( const TQString& url, const TQString& name, const TQString& mimetype ) {
attachmentURLs.append( url );
attachmentNames.append( name );
attachmentMimeTypes.append( mimetype );
}
- void updatePictureAttachment( const QImage& image, const QString& name );
- void updateAttachment( const QByteArray& data, const QString& name, const char* mimetype );
+ void updatePictureAttachment( const TQImage& image, const TQString& name );
+ void updateAttachment( const TQByteArray& data, const TQString& name, const char* mimetype );
};
} // namespace
-void AttachmentList::updatePictureAttachment( const QImage& image, const QString& name )
+void AttachmentList::updatePictureAttachment( const TQImage& image, const TQString& name )
{
assert( !name.isEmpty() );
if ( !image.isNull() ) {
@@ -296,7 +296,7 @@ void AttachmentList::updatePictureAttachment( const QImage& image, const QString
}
}
-void AttachmentList::updateAttachment( const QByteArray& data, const QString& name, const char* mimetype )
+void AttachmentList::updateAttachment( const TQByteArray& data, const TQString& name, const char* mimetype )
{
assert( !name.isEmpty() );
if ( !data.isNull() ) {
@@ -314,8 +314,8 @@ void AttachmentList::updateAttachment( const QByteArray& data, const QString& na
bool KABC::ResourceScalix::kmailUpdateAddressee( const Addressee& addr )
{
- const QString uid = addr.uid();
- QString subResource;
+ const TQString uid = addr.uid();
+ TQString subResource;
Q_UINT32 sernum;
if ( mUidMap.find( uid ) != mUidMap.end() ) {
subResource = mUidMap[ uid ].resource();
@@ -340,11 +340,11 @@ bool KABC::ResourceScalix::kmailUpdateAddressee( const Addressee& addr )
}
AttachmentList att;
- QString subject = addr.formattedName();
+ TQString subject = addr.formattedName();
- QString mimetype = s_inlineMimeType;
+ TQString mimetype = s_inlineMimeType;
- QString data = Contact::toXml( addr );
+ TQString data = Contact::toXml( addr );
CustomHeaderMap customHeaders;
customHeaders.insert( "X-Scalix-Class", "IPM.Contact" );
@@ -365,7 +365,7 @@ bool KABC::ResourceScalix::kmailUpdateAddressee( const Addressee& addr )
const_cast<Addressee&>(addr).setChanged( false );
}
- for( QValueList<KTempFile *>::Iterator it = att.tempFiles.begin(); it != att.tempFiles.end(); ++it ) {
+ for( TQValueList<KTempFile *>::Iterator it = att.tempFiles.begin(); it != att.tempFiles.end(); ++it ) {
(*it)->setAutoDelete( true );
delete (*it);
}
@@ -374,7 +374,7 @@ bool KABC::ResourceScalix::kmailUpdateAddressee( const Addressee& addr )
void KABC::ResourceScalix::insertAddressee( const Addressee& addr )
{
- const QString uid = addr.uid();
+ const TQString uid = addr.uid();
//kdDebug(5650) << k_funcinfo << uid << endl;
bool ok = false;
if ( mUidMap.contains( uid ) ) {
@@ -391,10 +391,10 @@ void KABC::ResourceScalix::insertAddressee( const Addressee& addr )
void KABC::ResourceScalix::removeAddressee( const Addressee& addr )
{
- const QString uid = addr.uid();
+ const TQString uid = addr.uid();
if ( mUidMap.find( uid ) == mUidMap.end() ) return;
//kdDebug(5650) << k_funcinfo << uid << endl;
- const QString resource = mUidMap[ uid ].resource();
+ const TQString resource = mUidMap[ uid ].resource();
if ( !subresourceWritable( resource ) ) {
kdWarning() << "Wow! Something tried to delete a non-writable addressee! Fix this caller: " << kdBacktrace() << endl;
return;
@@ -412,18 +412,18 @@ void KABC::ResourceScalix::removeAddressee( const Addressee& addr )
* These are the DCOP slots that KMail call to notify when something
* changed.
*/
-bool KABC::ResourceScalix::fromKMailAddIncidence( const QString& type,
- const QString& subResource,
+bool KABC::ResourceScalix::fromKMailAddIncidence( const TQString& type,
+ const TQString& subResource,
Q_UINT32 sernum,
int format,
- const QString& contactXML )
+ const TQString& contactXML )
{
// Check if this is a contact
if( type != s_kmailContentsType || !subresourceActive( subResource ) )
return false;
// Load contact to find the UID
- const QString uid = loadContact( contactXML, subResource, sernum,
+ const TQString uid = loadContact( contactXML, subResource, sernum,
( KMailICalIface::StorageFormat )format );
//kdDebug(5650) << k_funcinfo << uid << endl;
@@ -440,9 +440,9 @@ bool KABC::ResourceScalix::fromKMailAddIncidence( const QString& type,
return true;
}
-void KABC::ResourceScalix::fromKMailDelIncidence( const QString& type,
- const QString& subResource,
- const QString& uid )
+void KABC::ResourceScalix::fromKMailDelIncidence( const TQString& type,
+ const TQString& subResource,
+ const TQString& uid )
{
// Check if this is a contact
if( type != s_kmailContentsType || !subresourceActive( subResource ) )
@@ -464,8 +464,8 @@ void KABC::ResourceScalix::fromKMailDelIncidence( const QString& type,
}
}
-void KABC::ResourceScalix::fromKMailRefresh( const QString& type,
- const QString& /*subResource*/ )
+void KABC::ResourceScalix::fromKMailRefresh( const TQString& type,
+ const TQString& /*subResource*/ )
{
// Check if this is a contact
if( type != s_kmailContentsType ) return;
@@ -476,9 +476,9 @@ void KABC::ResourceScalix::fromKMailRefresh( const QString& type,
addressBook()->emitAddressBookChanged();
}
-void KABC::ResourceScalix::fromKMailAddSubresource( const QString& type,
- const QString& subResource,
- const QString& label,
+void KABC::ResourceScalix::fromKMailAddSubresource( const TQString& type,
+ const TQString& subResource,
+ const TQString& label,
bool writable )
{
if( type != s_kmailContentsType ) return;
@@ -495,8 +495,8 @@ void KABC::ResourceScalix::fromKMailAddSubresource( const QString& type,
emit signalSubresourceAdded( this, type, subResource );
}
-void KABC::ResourceScalix::fromKMailDelSubresource( const QString& type,
- const QString& subResource )
+void KABC::ResourceScalix::fromKMailDelSubresource( const TQString& type,
+ const TQString& subResource )
{
if( type != s_kmailContentsType ) return;
@@ -513,7 +513,7 @@ void KABC::ResourceScalix::fromKMailDelSubresource( const QString& type,
// Make a list of all uids to remove
Scalix::UidMap::ConstIterator mapIt;
- QStringList uids;
+ TQStringList uids;
for ( mapIt = mUidMap.begin(); mapIt != mUidMap.end(); ++mapIt )
if ( mapIt.data().resource() == subResource )
// We have a match
@@ -521,7 +521,7 @@ void KABC::ResourceScalix::fromKMailDelSubresource( const QString& type,
// Finally delete all the incidences
if ( !uids.isEmpty() ) {
- QStringList::ConstIterator it;
+ TQStringList::ConstIterator it;
for ( it = uids.begin(); it != uids.end(); ++it ) {
mAddrMap.remove( *it );
mUidMap.remove( *it );
@@ -535,13 +535,13 @@ void KABC::ResourceScalix::fromKMailDelSubresource( const QString& type,
-void KABC::ResourceScalix::fromKMailAsyncLoadResult( const QMap<Q_UINT32, QString>& map,
- const QString& /* type */,
- const QString& folder )
+void KABC::ResourceScalix::fromKMailAsyncLoadResult( const TQMap<Q_UINT32, TQString>& map,
+ const TQString& /* type */,
+ const TQString& folder )
{
// FIXME
KMailICalIface::StorageFormat format = KMailICalIface::StorageXML;
- for( QMap<Q_UINT32, QString>::ConstIterator it = map.begin(); it != map.end(); ++it ) {
+ for( TQMap<Q_UINT32, TQString>::ConstIterator it = map.begin(); it != map.end(); ++it ) {
loadContact( it.data(), folder, it.key(), format );
}
if ( !addressBook() ){
@@ -550,12 +550,12 @@ void KABC::ResourceScalix::fromKMailAsyncLoadResult( const QMap<Q_UINT32, QStrin
addressBook()->emitAddressBookChanged();
}
-QStringList KABC::ResourceScalix::subresources() const
+TQStringList KABC::ResourceScalix::subresources() const
{
return mSubResources.keys();
}
-bool KABC::ResourceScalix::subresourceActive( const QString& subresource ) const
+bool KABC::ResourceScalix::subresourceActive( const TQString& subresource ) const
{
if ( mSubResources.contains( subresource ) ) {
return mSubResources[ subresource ].active();
@@ -567,7 +567,7 @@ bool KABC::ResourceScalix::subresourceActive( const QString& subresource ) const
return true;
}
-bool KABC::ResourceScalix::subresourceWritable( const QString& subresource ) const
+bool KABC::ResourceScalix::subresourceWritable( const TQString& subresource ) const
{
if ( mSubResources.contains( subresource ) ) {
return mSubResources[ subresource ].writable();
@@ -575,7 +575,7 @@ bool KABC::ResourceScalix::subresourceWritable( const QString& subresource ) con
return false; //better a safe default
}
-int KABC::ResourceScalix::subresourceCompletionWeight( const QString& subresource ) const
+int KABC::ResourceScalix::subresourceCompletionWeight( const TQString& subresource ) const
{
if ( mSubResources.contains( subresource ) ) {
return mSubResources[ subresource ].completionWeight();
@@ -586,17 +586,17 @@ int KABC::ResourceScalix::subresourceCompletionWeight( const QString& subresourc
return 80;
}
-QString KABC::ResourceScalix::subresourceLabel( const QString& subresource ) const
+TQString KABC::ResourceScalix::subresourceLabel( const TQString& subresource ) const
{
if ( mSubResources.contains( subresource ) ) {
return mSubResources[ subresource ].label();
}
kdDebug(5650) << "subresourceLabel( " << subresource << " ): not found!\n";
- return QString::null;
+ return TQString::null;
}
-void KABC::ResourceScalix::setSubresourceCompletionWeight( const QString& subresource, int completionWeight )
+void KABC::ResourceScalix::setSubresourceCompletionWeight( const TQString& subresource, int completionWeight )
{
if ( mSubResources.contains( subresource ) ) {
mSubResources[ subresource ].setCompletionWeight( completionWeight );
@@ -605,17 +605,17 @@ void KABC::ResourceScalix::setSubresourceCompletionWeight( const QString& subres
}
}
-QMap<QString, QString> KABC::ResourceScalix::uidToResourceMap() const
+TQMap<TQString, TQString> KABC::ResourceScalix::uidToResourceMap() const
{
// TODO: Couldn't this be made simpler?
- QMap<QString, QString> map;
+ TQMap<TQString, TQString> map;
Scalix::UidMap::ConstIterator mapIt;
for ( mapIt = mUidMap.begin(); mapIt != mUidMap.end(); ++mapIt )
map[ mapIt.key() ] = mapIt.data().resource();
return map;
}
-void KABC::ResourceScalix::setSubresourceActive( const QString &subresource, bool active )
+void KABC::ResourceScalix::setSubresourceActive( const TQString &subresource, bool active )
{
if ( mSubResources.contains( subresource ) ) {
mSubResources[ subresource ].setActive( active );
diff --git a/kresources/scalix/kabc/resourcescalix.h b/kresources/scalix/kabc/resourcescalix.h
index 10d3d8aa5..25eca7e49 100644
--- a/kresources/scalix/kabc/resourcescalix.h
+++ b/kresources/scalix/kabc/resourcescalix.h
@@ -107,61 +107,61 @@ public:
virtual void removeAddressee( const Addressee& addr );
// Listen to KMail changes in the amount of sub resources
- void fromKMailAddSubresource( const QString& type, const QString& id,
- const QString& label, bool writable );
- void fromKMailDelSubresource( const QString& type, const QString& id );
+ void fromKMailAddSubresource( const TQString& type, const TQString& id,
+ const TQString& label, bool writable );
+ void fromKMailDelSubresource( const TQString& type, const TQString& id );
- bool fromKMailAddIncidence( const QString& type, const QString& resource,
- Q_UINT32 sernum, int format, const QString& contact );
- void fromKMailDelIncidence( const QString& type, const QString& resource,
- const QString& contact );
- void fromKMailRefresh( const QString& type, const QString& resource );
+ bool fromKMailAddIncidence( const TQString& type, const TQString& resource,
+ Q_UINT32 sernum, int format, const TQString& contact );
+ void fromKMailDelIncidence( const TQString& type, const TQString& resource,
+ const TQString& contact );
+ void fromKMailRefresh( const TQString& type, const TQString& resource );
- void fromKMailAsyncLoadResult( const QMap<Q_UINT32, QString>& map,
- const QString& type,
- const QString& folder );
+ void fromKMailAsyncLoadResult( const TQMap<Q_UINT32, TQString>& map,
+ const TQString& type,
+ const TQString& folder );
/// Return the list of subresources.
- QStringList subresources() const;
+ TQStringList subresources() const;
/// Is this subresource active?
- bool subresourceActive( const QString& ) const;
+ bool subresourceActive( const TQString& ) const;
/// Is this subresource writabel?
- bool subresourceWritable( const QString& ) const;
+ bool subresourceWritable( const TQString& ) const;
- virtual void setSubresourceActive( const QString &, bool );
+ virtual void setSubresourceActive( const TQString &, bool );
/// Completion weight for a given subresource
- virtual int subresourceCompletionWeight( const QString& ) const;
+ virtual int subresourceCompletionWeight( const TQString& ) const;
/// Label for a given subresource
- virtual QString subresourceLabel( const QString& ) const;
+ virtual TQString subresourceLabel( const TQString& ) const;
/// Set completion weight for a given subresource
- virtual void setSubresourceCompletionWeight( const QString&, int );
+ virtual void setSubresourceCompletionWeight( const TQString&, int );
/// Give the uidmap. Used for ordered searching
- QMap<QString, QString> uidToResourceMap() const;
+ TQMap<TQString, TQString> uidToResourceMap() const;
protected:
bool kmailUpdateAddressee( const Addressee& );
void doClose();
- void loadSubResourceConfig( KConfig& config, const QString& name,
- const QString& label, bool writable );
- bool loadSubResource( const QString& subResource );
- bool loadSubResourceHelper( const QString& subResource, const char* mimetype, KMailICalIface::StorageFormat format );
- QString loadContact( const QString& contactData, const QString& subResource,
+ void loadSubResourceConfig( KConfig& config, const TQString& name,
+ const TQString& label, bool writable );
+ bool loadSubResource( const TQString& subResource );
+ bool loadSubResourceHelper( const TQString& subResource, const char* mimetype, KMailICalIface::StorageFormat format );
+ TQString loadContact( const TQString& contactData, const TQString& subResource,
Q_UINT32 sernum, const KMailICalIface::StorageFormat format );
- QString configFile() const {
+ TQString configFile() const {
return Scalix::ResourceScalixBase::configFile( "kabc" );
}
// The list of subresources
Scalix::ResourceMap mSubResources;
- QString mCachedSubresource;
+ TQString mCachedSubresource;
bool mLocked;
};
diff --git a/kresources/scalix/kabc/resourcescalix_plugin.cpp b/kresources/scalix/kabc/resourcescalix_plugin.cpp
index 95bc28beb..a5f289a78 100644
--- a/kresources/scalix/kabc/resourcescalix_plugin.cpp
+++ b/kresources/scalix/kabc/resourcescalix_plugin.cpp
@@ -43,7 +43,7 @@ class ScalixFactory : public KRES::PluginFactoryBase
return new KABC::ResourceScalix( config );
}
- KRES::ConfigWidget *configWidget( QWidget* )
+ KRES::ConfigWidget *configWidget( TQWidget* )
{
return 0;
}
diff --git a/kresources/scalix/kcal/resourcescalix.cpp b/kresources/scalix/kcal/resourcescalix.cpp
index 9a8beeb9e..d2849e862 100644
--- a/kresources/scalix/kcal/resourcescalix.cpp
+++ b/kresources/scalix/kcal/resourcescalix.cpp
@@ -43,9 +43,9 @@
#include <kmainwindow.h>
#include <klocale.h>
-#include <qobject.h>
-#include <qtimer.h>
-#include <qapplication.h>
+#include <tqobject.h>
+#include <tqtimer.h>
+#include <tqapplication.h>
#include <assert.h>
@@ -63,11 +63,11 @@ static const char* incidenceInlineMimeType = "text/calendar";
ResourceScalix::ResourceScalix( const KConfig *config )
: ResourceCalendar( config ), ResourceScalixBase( "ResourceScalix-libkcal" ),
- mCalendar( QString::fromLatin1("UTC") ), mOpen( false )
+ mCalendar( TQString::fromLatin1("UTC") ), mOpen( false )
{
setType( "scalix" );
- connect( &mResourceChangedTimer, SIGNAL( timeout() ),
- this, SLOT( slotEmitResourceChanged() ) );
+ connect( &mResourceChangedTimer, TQT_SIGNAL( timeout() ),
+ this, TQT_SLOT( slotEmitResourceChanged() ) );
}
ResourceScalix::~ResourceScalix()
@@ -80,8 +80,8 @@ ResourceScalix::~ResourceScalix()
}
void ResourceScalix::loadSubResourceConfig( KConfig& config,
- const QString& name,
- const QString& label,
+ const TQString& name,
+ const TQString& label,
bool writable,
ResourceMap& subResource )
{
@@ -94,11 +94,11 @@ bool ResourceScalix::openResource( KConfig& config, const char* contentType,
ResourceMap& map )
{
// Read the subresource entries from KMail
- QValueList<KMailICalIface::SubResource> subResources;
+ TQValueList<KMailICalIface::SubResource> subResources;
if ( !kmailSubresources( subResources, contentType ) )
return false;
map.clear();
- QValueList<KMailICalIface::SubResource>::ConstIterator it;
+ TQValueList<KMailICalIface::SubResource>::ConstIterator it;
for ( it = subResources.begin(); it != subResources.end(); ++it )
loadSubResourceConfig( config, (*it).location, (*it).label, (*it).writable, map );
return true;
@@ -142,7 +142,7 @@ void ResourceScalix::doClose()
closeResource( config, mJournalSubResources );
}
-bool ResourceScalix::loadSubResource( const QString& subResource,
+bool ResourceScalix::loadSubResource( const TQString& subResource,
const char* mimetype )
{
int count = 0;
@@ -156,10 +156,10 @@ bool ResourceScalix::loadSubResource( const QString& subResource,
const int nbMessages = 200; // read 200 mails at a time (see kabc resource)
- const QString labelTxt = !strcmp(mimetype, "application/x-vnd.kolab.task") ? i18n( "Loading tasks..." )
+ const TQString labelTxt = !strcmp(mimetype, "application/x-vnd.kolab.task") ? i18n( "Loading tasks..." )
: !strcmp(mimetype, "application/x-vnd.kolab.journal") ? i18n( "Loading journals..." )
: i18n( "Loading events..." );
- const bool useProgress = qApp && qApp->type() != QApplication::Tty && count > mProgressDialogIncidenceLimit;
+ const bool useProgress = qApp && qApp->type() != TQApplication::Tty && count > mProgressDialogIncidenceLimit;
if ( useProgress )
(void)::Observer::self(); // ensure kio_uiserver is running
UIServer_stub uiserver( "kio_uiserver", "UIServer" );
@@ -172,7 +172,7 @@ bool ResourceScalix::loadSubResource( const QString& subResource,
}
for ( int startIndex = 0; startIndex < count; startIndex += nbMessages ) {
- QMap<Q_UINT32, QString> lst;
+ TQMap<Q_UINT32, TQString> lst;
if ( !kmailIncidences( lst, mimetype, subResource, startIndex, nbMessages ) ) {
kdError(5650) << "Communication problem in ResourceScalix::load()\n";
if ( progressId )
@@ -182,7 +182,7 @@ bool ResourceScalix::loadSubResource( const QString& subResource,
{ // for RAII scoping below
TemporarySilencer t( this );
- for( QMap<Q_UINT32, QString>::ConstIterator it = lst.begin(); it != lst.end(); ++it ) {
+ for( TQMap<Q_UINT32, TQString>::ConstIterator it = lst.begin(); it != lst.end(); ++it ) {
addIncidence( mimetype, it.data(), subResource, it.key() );
}
}
@@ -238,7 +238,7 @@ bool ResourceScalix::loadAllJournals()
return doLoadAll( mJournalSubResources, incidenceInlineMimeType );
}
-void ResourceScalix::removeIncidences( const QCString& incidenceType )
+void ResourceScalix::removeIncidences( const TQCString& incidenceType )
{
Scalix::UidMap::Iterator mapIt = mUidMap.begin();
while ( mapIt != mUidMap.end() )
@@ -250,7 +250,7 @@ void ResourceScalix::removeIncidences( const QCString& incidenceType )
// A faster but hackish way would probably be to check the type of the resource,
// like mEventSubResources.find( it.data().resource() ) != mEventSubResources.end() ?
- const QString& uid = it.key();
+ const TQString& uid = it.key();
if ( incidenceType == "Event" && mCalendar.event( uid ) )
mUidMap.remove( it );
else if ( incidenceType == "Todo" && mCalendar.todo( uid ) )
@@ -269,12 +269,12 @@ void ResourceScalix::incidenceUpdated( KCal::IncidenceBase* incidencebase )
{
if ( incidencebase->isReadOnly() ) return; // Should not happen (TM)
incidencebase->setSyncStatus( KCal::Event::SYNCMOD );
- incidencebase->setLastModified( QDateTime::currentDateTime() );
+ incidencebase->setLastModified( TQDateTime::currentDateTime() );
// we should probably update the revision number here,
// or internally in the Event itself when certain things change.
// need to verify with ical documentation.
- const QString uid = incidencebase->uid();
+ const TQString uid = incidencebase->uid();
if ( mUidsPendingUpdate.contains( uid ) || mUidsPendingAdding.contains( uid ) ) {
/* We are currently processing this event ( removing and readding or
@@ -284,7 +284,7 @@ void ResourceScalix::incidenceUpdated( KCal::IncidenceBase* incidencebase )
return;
}
- QString subResource;
+ TQString subResource;
Q_UINT32 sernum = 0;
if ( mUidMap.contains( uid ) ) {
subResource = mUidMap[ uid ].resource();
@@ -294,7 +294,7 @@ void ResourceScalix::incidenceUpdated( KCal::IncidenceBase* incidencebase )
sendKMailUpdate( incidencebase, subResource, sernum );
}
-void ResourceScalix::resolveConflict( KCal::Incidence* inc, const QString& subresource, Q_UINT32 sernum )
+void ResourceScalix::resolveConflict( KCal::Incidence* inc, const TQString& subresource, Q_UINT32 sernum )
{
if ( ! inc )
return;
@@ -310,7 +310,7 @@ void ResourceScalix::resolveConflict( KCal::Incidence* inc, const QString& subre
KIncidenceChooser* ch = new KIncidenceChooser();
ch->setIncidence( local ,inc );
if ( KIncidenceChooser::chooseMode == KIncidenceChooser::ask ) {
- connect ( this, SIGNAL( useGlobalMode() ), ch, SLOT ( useGlobalMode() ) );
+ connect ( this, TQT_SIGNAL( useGlobalMode() ), ch, TQT_SLOT ( useGlobalMode() ) );
if ( ch->exec() )
if ( KIncidenceChooser::chooseMode != KIncidenceChooser::ask )
emit useGlobalMode() ;
@@ -343,8 +343,8 @@ void ResourceScalix::resolveConflict( KCal::Incidence* inc, const QString& subre
mSilent = silent;
}
}
-void ResourceScalix::addIncidence( const char* mimetype, const QString& data,
- const QString& subResource, Q_UINT32 sernum )
+void ResourceScalix::addIncidence( const char* mimetype, const TQString& data,
+ const TQString& subResource, Q_UINT32 sernum )
{
// This uses pointer comparison, so it only works if we use the static
// objects defined in the top of the file
@@ -353,12 +353,12 @@ void ResourceScalix::addIncidence( const char* mimetype, const QString& data,
}
-bool ResourceScalix::sendKMailUpdate( KCal::IncidenceBase* incidencebase, const QString& subresource,
+bool ResourceScalix::sendKMailUpdate( KCal::IncidenceBase* incidencebase, const TQString& subresource,
Q_UINT32 sernum )
{
- const QString& type = incidencebase->type();
+ const TQString& type = incidencebase->type();
const char* mimetype = 0;
- QString data;
+ TQString data;
if ( type == "Event" ) {
mimetype = incidenceInlineMimeType;
data = mFormat.createScheduleMessage( static_cast<KCal::Event *>(incidencebase),
@@ -385,7 +385,7 @@ bool ResourceScalix::sendKMailUpdate( KCal::IncidenceBase* incidencebase, const
else if ( type == "Todo" )
customHeaders.insert( "X-Scalix-Class", "IPM.Task" );
- QString subject = incidence->summary();
+ TQString subject = incidence->summary();
// behold, sernum is an in-parameter
const bool rc = kmailUpdate( subresource, sernum, data, mimetype, subject, customHeaders );
@@ -396,17 +396,17 @@ bool ResourceScalix::sendKMailUpdate( KCal::IncidenceBase* incidencebase, const
return rc;
}
-bool ResourceScalix::addIncidence( KCal::Incidence* incidence, const QString& _subresource,
+bool ResourceScalix::addIncidence( KCal::Incidence* incidence, const TQString& _subresource,
Q_UINT32 sernum )
{
Q_ASSERT( incidence );
if ( !incidence ) return false;
- const QString &uid = incidence->uid();
- QString subResource = _subresource;
+ const TQString &uid = incidence->uid();
+ TQString subResource = _subresource;
Scalix::ResourceMap *map = &mEventSubResources; // don't use a ref here!
- const QString& type = incidence->type();
+ const TQString& type = incidence->type();
if ( type == "Event" )
map = &mEventSubResources;
else if ( type == "Todo" )
@@ -507,14 +507,14 @@ bool ResourceScalix::addEvent( KCal::Event* event )
if ( mUidMap.contains( event->uid() ) )
return true; //noop
else
- return addIncidence( event, QString::null, 0 );
+ return addIncidence( event, TQString::null, 0 );
}
bool ResourceScalix::deleteIncidence( KCal::Incidence* incidence )
{
if ( incidence->isReadOnly() ) return false;
- const QString uid = incidence->uid();
+ const TQString uid = incidence->uid();
if( !mUidMap.contains( uid ) ) return false; // Odd
/* The user told us to delete, tell KMail */
if ( !mSilent ) {
@@ -535,7 +535,7 @@ bool ResourceScalix::deleteEvent( KCal::Event* event )
return deleteIncidence( event );
}
-KCal::Event* ResourceScalix::event( const QString& uid )
+KCal::Event* ResourceScalix::event( const TQString& uid )
{
return mCalendar.event(uid);
}
@@ -545,20 +545,20 @@ KCal::Event::List ResourceScalix::rawEvents( EventSortField sortField, SortDirec
return mCalendar.rawEvents( sortField, sortDirection );
}
-KCal::Event::List ResourceScalix::rawEventsForDate( const QDate& date,
+KCal::Event::List ResourceScalix::rawEventsForDate( const TQDate& date,
EventSortField sortField,
SortDirection sortDirection )
{
return mCalendar.rawEventsForDate( date, sortField, sortDirection );
}
-KCal::Event::List ResourceScalix::rawEventsForDate( const QDateTime& qdt )
+KCal::Event::List ResourceScalix::rawEventsForDate( const TQDateTime& qdt )
{
return mCalendar.rawEventsForDate( qdt );
}
-KCal::Event::List ResourceScalix::rawEvents( const QDate& start,
- const QDate& end,
+KCal::Event::List ResourceScalix::rawEvents( const TQDate& start,
+ const TQDate& end,
bool inclusive )
{
return mCalendar.rawEvents( start, end, inclusive );
@@ -569,7 +569,7 @@ bool ResourceScalix::addTodo( KCal::Todo* todo )
if ( mUidMap.contains( todo->uid() ) )
return true; //noop
else
- return addIncidence( todo, QString::null, 0 );
+ return addIncidence( todo, TQString::null, 0 );
}
bool ResourceScalix::deleteTodo( KCal::Todo* todo )
@@ -577,7 +577,7 @@ bool ResourceScalix::deleteTodo( KCal::Todo* todo )
return deleteIncidence( todo );
}
-KCal::Todo* ResourceScalix::todo( const QString& uid )
+KCal::Todo* ResourceScalix::todo( const TQString& uid )
{
return mCalendar.todo( uid );
}
@@ -587,7 +587,7 @@ KCal::Todo::List ResourceScalix::rawTodos( TodoSortField sortField, SortDirectio
return mCalendar.rawTodos( sortField, sortDirection );
}
-KCal::Todo::List ResourceScalix::rawTodosForDate( const QDate& date )
+KCal::Todo::List ResourceScalix::rawTodosForDate( const TQDate& date )
{
return mCalendar.rawTodosForDate( date );
}
@@ -597,7 +597,7 @@ bool ResourceScalix::addJournal( KCal::Journal* journal )
if ( mUidMap.contains( journal->uid() ) )
return true; //noop
else
- return addIncidence( journal, QString::null, 0 );
+ return addIncidence( journal, TQString::null, 0 );
}
bool ResourceScalix::deleteJournal( KCal::Journal* journal )
@@ -605,7 +605,7 @@ bool ResourceScalix::deleteJournal( KCal::Journal* journal )
return deleteIncidence( journal );
}
-KCal::Journal* ResourceScalix::journal( const QString& uid )
+KCal::Journal* ResourceScalix::journal( const TQString& uid )
{
return mCalendar.journal(uid);
}
@@ -615,33 +615,33 @@ KCal::Journal::List ResourceScalix::rawJournals( JournalSortField sortField, Sor
return mCalendar.rawJournals( sortField, sortDirection );
}
-KCal::Journal::List ResourceScalix::rawJournalsForDate( const QDate &date )
+KCal::Journal::List ResourceScalix::rawJournalsForDate( const TQDate &date )
{
return mCalendar.rawJournalsForDate( date );
}
-KCal::Alarm::List ResourceScalix::alarms( const QDateTime& from,
- const QDateTime& to )
+KCal::Alarm::List ResourceScalix::alarms( const TQDateTime& from,
+ const TQDateTime& to )
{
return mCalendar.alarms( from, to );
}
-KCal::Alarm::List ResourceScalix::alarmsTo( const QDateTime& to )
+KCal::Alarm::List ResourceScalix::alarmsTo( const TQDateTime& to )
{
return mCalendar.alarmsTo(to);
}
-void ResourceScalix::setTimeZoneId( const QString& tzid )
+void ResourceScalix::setTimeZoneId( const TQString& tzid )
{
mCalendar.setTimeZoneId( tzid );
mFormat.setTimeZone( mCalendar.timeZoneId(), !mCalendar.isLocalTime() );
}
-bool ResourceScalix::fromKMailAddIncidence( const QString& type,
- const QString& subResource,
+bool ResourceScalix::fromKMailAddIncidence( const TQString& type,
+ const TQString& subResource,
Q_UINT32 sernum,
int /*format*/,
- const QString& data )
+ const TQString& data )
{
bool rc = true;
TemporarySilencer t( this ); // RAII
@@ -660,9 +660,9 @@ bool ResourceScalix::fromKMailAddIncidence( const QString& type,
return rc;
}
-void ResourceScalix::fromKMailDelIncidence( const QString& type,
- const QString& subResource,
- const QString& uid )
+void ResourceScalix::fromKMailDelIncidence( const TQString& type,
+ const TQString& subResource,
+ const TQString& uid )
{
if ( type != kmailCalendarContentsType && type != kmailTodoContentsType
&& type != kmailJournalContentsType )
@@ -688,8 +688,8 @@ void ResourceScalix::fromKMailDelIncidence( const QString& type,
}
}
-void ResourceScalix::fromKMailRefresh( const QString& type,
- const QString& /*subResource*/ )
+void ResourceScalix::fromKMailRefresh( const TQString& type,
+ const TQString& /*subResource*/ )
{
// TODO: Only load the specified subResource
if ( type == "Calendar" )
@@ -703,9 +703,9 @@ void ResourceScalix::fromKMailRefresh( const QString& type,
mResourceChangedTimer.changeInterval( 100 );
}
-void ResourceScalix::fromKMailAddSubresource( const QString& type,
- const QString& subResource,
- const QString& label,
+void ResourceScalix::fromKMailAddSubresource( const TQString& type,
+ const TQString& subResource,
+ const TQString& label,
bool writable )
{
ResourceMap* map = 0;
@@ -736,8 +736,8 @@ void ResourceScalix::fromKMailAddSubresource( const QString& type,
emit signalSubresourceAdded( this, type, subResource, label );
}
-void ResourceScalix::fromKMailDelSubresource( const QString& type,
- const QString& subResource )
+void ResourceScalix::fromKMailDelSubresource( const TQString& type,
+ const TQString& subResource )
{
ResourceMap* map = subResourceMap( type );
if ( !map ) // not ours
@@ -755,7 +755,7 @@ void ResourceScalix::fromKMailDelSubresource( const QString& type,
// Make a list of all uids to remove
Scalix::UidMap::ConstIterator mapIt;
- QStringList uids;
+ TQStringList uids;
for ( mapIt = mUidMap.begin(); mapIt != mUidMap.end(); ++mapIt )
if ( mapIt.data().resource() == subResource )
// We have a match
@@ -764,7 +764,7 @@ void ResourceScalix::fromKMailDelSubresource( const QString& type,
// Finally delete all the incidences
if ( !uids.isEmpty() ) {
TemporarySilencer t( this );
- QStringList::ConstIterator it;
+ TQStringList::ConstIterator it;
for ( it = uids.begin(); it != uids.end(); ++it ) {
KCal::Incidence* incidence = mCalendar.incidence( *it );
if( incidence )
@@ -776,7 +776,7 @@ void ResourceScalix::fromKMailDelSubresource( const QString& type,
emit signalSubresourceRemoved( this, type, subResource );
}
-QStringList ResourceScalix::subresources() const
+TQStringList ResourceScalix::subresources() const
{
// Workaround: The ResourceView in KOrganizer wants to know this
// before it opens the resource :-( Make sure we are open
@@ -787,7 +787,7 @@ QStringList ResourceScalix::subresources() const
}
const QString
-ResourceScalix::labelForSubresource( const QString& subresource ) const
+ResourceScalix::labelForSubresource( const TQString& subresource ) const
{
if ( mEventSubResources.contains( subresource ) )
return mEventSubResources[ subresource ].label();
@@ -798,28 +798,28 @@ ResourceScalix::labelForSubresource( const QString& subresource ) const
return subresource;
}
-QString ResourceScalix::subresourceIdentifier( Incidence *incidence )
+TQString ResourceScalix::subresourceIdentifier( Incidence *incidence )
{
- QString uid = incidence->uid();
+ TQString uid = incidence->uid();
if ( mUidMap.contains( uid ) )
return mUidMap[ uid ].resource();
else
if ( mNewIncidencesMap.contains( uid ) )
return mNewIncidencesMap[ uid ];
else
- return QString();
+ return TQString();
}
-void ResourceScalix::fromKMailAsyncLoadResult( const QMap<Q_UINT32, QString>& map,
- const QString& type,
- const QString& folder )
+void ResourceScalix::fromKMailAsyncLoadResult( const TQMap<Q_UINT32, TQString>& map,
+ const TQString& type,
+ const TQString& folder )
{
TemporarySilencer t( this );
- for( QMap<Q_UINT32, QString>::ConstIterator it = map.begin(); it != map.end(); ++it )
+ for( TQMap<Q_UINT32, TQString>::ConstIterator it = map.begin(); it != map.end(); ++it )
addIncidence( type.latin1(), it.data(), folder, it.key() );
}
-bool ResourceScalix::subresourceActive( const QString& subresource ) const
+bool ResourceScalix::subresourceActive( const TQString& subresource ) const
{
// Workaround: The ResourceView in KOrganizer wants to know this
// before it opens the resource :-( Make sure we are open
@@ -838,7 +838,7 @@ bool ResourceScalix::subresourceActive( const QString& subresource ) const
return true;
}
-void ResourceScalix::setSubresourceActive( const QString &subresource, bool v )
+void ResourceScalix::setSubresourceActive( const TQString &subresource, bool v )
{
ResourceMap *map = 0;
@@ -869,7 +869,7 @@ KABC::Lock* ResourceScalix::lock()
}
-Scalix::ResourceMap* ResourceScalix::subResourceMap( const QString& contentsType )
+Scalix::ResourceMap* ResourceScalix::subResourceMap( const TQString& contentsType )
{
if ( contentsType == kmailCalendarContentsType ) {
return &mEventSubResources;
diff --git a/kresources/scalix/kcal/resourcescalix.h b/kresources/scalix/kcal/resourcescalix.h
index 0c845a6ce..223161b4b 100644
--- a/kresources/scalix/kcal/resourcescalix.h
+++ b/kresources/scalix/kcal/resourcescalix.h
@@ -34,7 +34,7 @@
#ifndef KCAL_RESOURCESCALIX_H
#define KCAL_RESOURCESCALIX_H
-#include <qtimer.h>
+#include <tqtimer.h>
#include <kdepimmacros.h>
#include <libkcal/calendarlocal.h>
@@ -71,63 +71,63 @@ public:
// The libkcal functions. See the resource for descriptions
bool addEvent( KCal::Event* anEvent );
bool deleteEvent( KCal::Event* );
- KCal::Event* event( const QString &UniqueStr );
+ KCal::Event* event( const TQString &UniqueStr );
KCal::Event::List rawEvents( EventSortField sortField = EventSortUnsorted, SortDirection sortDirection = SortDirectionAscending );
KCal::Event::List rawEventsForDate(
- const QDate& date,
+ const TQDate& date,
EventSortField sortField=EventSortUnsorted,
SortDirection sortDirection=SortDirectionAscending );
- KCal::Event::List rawEventsForDate( const QDateTime& qdt );
- KCal::Event::List rawEvents( const QDate& start, const QDate& end,
+ KCal::Event::List rawEventsForDate( const TQDateTime& qdt );
+ KCal::Event::List rawEvents( const TQDate& start, const TQDate& end,
bool inclusive = false );
bool addTodo( KCal::Todo* todo );
bool deleteTodo( KCal::Todo* );
- KCal::Todo* todo( const QString& uid );
+ KCal::Todo* todo( const TQString& uid );
KCal::Todo::List rawTodos( TodoSortField sortField = TodoSortUnsorted, SortDirection sortDirection = SortDirectionAscending );
- KCal::Todo::List rawTodosForDate( const QDate& date );
+ KCal::Todo::List rawTodosForDate( const TQDate& date );
bool addJournal( KCal::Journal* );
bool deleteJournal( KCal::Journal* );
- KCal::Journal* journal( const QString& uid );
+ KCal::Journal* journal( const TQString& uid );
KCal::Journal::List rawJournals( JournalSortField sortField = JournalSortUnsorted, SortDirection sortDirection = SortDirectionAscending );
- KCal::Journal::List rawJournalsForDate( const QDate &date );
+ KCal::Journal::List rawJournalsForDate( const TQDate &date );
- KCal::Alarm::List alarms( const QDateTime& from, const QDateTime& to );
- KCal::Alarm::List alarmsTo( const QDateTime& to );
+ KCal::Alarm::List alarms( const TQDateTime& from, const TQDateTime& to );
+ KCal::Alarm::List alarmsTo( const TQDateTime& to );
- void setTimeZoneId( const QString& tzid );
+ void setTimeZoneId( const TQString& tzid );
bool deleteIncidence( KCal::Incidence* i );
/// The ResourceScalixBase methods called by KMail
- bool fromKMailAddIncidence( const QString& type, const QString& subResource,
- Q_UINT32 sernum, int format, const QString& data );
- void fromKMailDelIncidence( const QString& type, const QString& subResource,
- const QString& uid );
- void fromKMailRefresh( const QString& type, const QString& subResource );
+ bool fromKMailAddIncidence( const TQString& type, const TQString& subResource,
+ Q_UINT32 sernum, int format, const TQString& data );
+ void fromKMailDelIncidence( const TQString& type, const TQString& subResource,
+ const TQString& uid );
+ void fromKMailRefresh( const TQString& type, const TQString& subResource );
/// Listen to KMail changes in the amount of sub resources
- void fromKMailAddSubresource( const QString& type, const QString& subResource,
- const QString& label, bool writable );
- void fromKMailDelSubresource( const QString& type, const QString& subResource );
+ void fromKMailAddSubresource( const TQString& type, const TQString& subResource,
+ const TQString& label, bool writable );
+ void fromKMailDelSubresource( const TQString& type, const TQString& subResource );
- void fromKMailAsyncLoadResult( const QMap<Q_UINT32, QString>& map,
- const QString& type,
- const QString& folder );
+ void fromKMailAsyncLoadResult( const TQMap<Q_UINT32, TQString>& map,
+ const TQString& type,
+ const TQString& folder );
/** Return the list of subresources. */
- QStringList subresources() const;
+ TQStringList subresources() const;
/** Is this subresource active? */
- bool subresourceActive( const QString& ) const;
+ bool subresourceActive( const TQString& ) const;
/** (De)activate the subresource */
- virtual void setSubresourceActive( const QString &, bool );
+ virtual void setSubresourceActive( const TQString &, bool );
/** What is the label for this subresource? */
- virtual const QString labelForSubresource( const QString& resource ) const;
+ virtual const TQString labelForSubresource( const TQString& resource ) const;
- virtual QString subresourceIdentifier( Incidence *incidence );
+ virtual TQString subresourceIdentifier( Incidence *incidence );
KABC::Lock* lock();
@@ -137,20 +137,20 @@ protected slots:
void slotEmitResourceChanged();
private:
- void removeIncidences( const QCString& incidenceType );
- void resolveConflict( KCal::Incidence*, const QString& subresource, Q_UINT32 sernum );
+ void removeIncidences( const TQCString& incidenceType );
+ void resolveConflict( KCal::Incidence*, const TQString& subresource, Q_UINT32 sernum );
- void addIncidence( const char* mimetype, const QString& xml,
- const QString& subResource, Q_UINT32 sernum );
+ void addIncidence( const char* mimetype, const TQString& xml,
+ const TQString& subResource, Q_UINT32 sernum );
- bool addIncidence( KCal::Incidence* i, const QString& subresource,
+ bool addIncidence( KCal::Incidence* i, const TQString& subresource,
Q_UINT32 sernum );
/*
- void addEvent( const QString& xml, const QString& subresource,
+ void addEvent( const TQString& xml, const TQString& subresource,
Q_UINT32 sernum );
- void addTodo( const QString& xml, const QString& subresource,
+ void addTodo( const TQString& xml, const TQString& subresource,
Q_UINT32 sernum );
- void addJournal( const QString& xml, const QString& subresource,
+ void addJournal( const TQString& xml, const TQString& subresource,
Q_UINT32 sernum );
*/
@@ -165,18 +165,18 @@ private:
bool openResource( KConfig& config, const char* contentType,
Scalix::ResourceMap& map );
- void loadSubResourceConfig( KConfig& config, const QString& name,
- const QString& label, bool writable,
+ void loadSubResourceConfig( KConfig& config, const TQString& name,
+ const TQString& label, bool writable,
Scalix::ResourceMap& subResource );
- bool loadSubResource( const QString& subResource, const char* mimetype );
+ bool loadSubResource( const TQString& subResource, const char* mimetype );
- QString configFile() const {
+ TQString configFile() const {
return ResourceScalixBase::configFile( "kcal" );
}
- Scalix::ResourceMap* subResourceMap( const QString& contentsType );
+ Scalix::ResourceMap* subResourceMap( const TQString& contentsType );
- bool sendKMailUpdate( KCal::IncidenceBase* incidence, const QString& _subresource,
+ bool sendKMailUpdate( KCal::IncidenceBase* incidence, const TQString& _subresource,
Q_UINT32 sernum );
@@ -186,8 +186,8 @@ private:
Scalix::ResourceMap mEventSubResources, mTodoSubResources, mJournalSubResources;
bool mOpen; // If the resource is open, this is true
- QDict<KCal::IncidenceBase> mPendingUpdates;
- QTimer mResourceChangedTimer;
+ TQDict<KCal::IncidenceBase> mPendingUpdates;
+ TQTimer mResourceChangedTimer;
ICalFormat mFormat;
/**
@@ -197,7 +197,7 @@ private:
We can't trust on mUidMap here, because it contains only non-pending uids.
*/
- QMap<QString, QString> mNewIncidencesMap;
+ TQMap<TQString, TQString> mNewIncidencesMap;
int mProgressDialogIncidenceLimit;
};
diff --git a/kresources/scalix/kcal/resourcescalix_plugin.cpp b/kresources/scalix/kcal/resourcescalix_plugin.cpp
index 53ac6705f..a36f5bf2c 100644
--- a/kresources/scalix/kcal/resourcescalix_plugin.cpp
+++ b/kresources/scalix/kcal/resourcescalix_plugin.cpp
@@ -41,7 +41,7 @@ public:
return new KCal::ResourceScalix( config );
}
- KRES::ConfigWidget *configWidget( QWidget* )
+ KRES::ConfigWidget *configWidget( TQWidget* )
{
return 0;
}
diff --git a/kresources/scalix/kioslave/scalix.cpp b/kresources/scalix/kioslave/scalix.cpp
index 199bd0980..043b0f4a1 100644
--- a/kresources/scalix/kioslave/scalix.cpp
+++ b/kresources/scalix/kioslave/scalix.cpp
@@ -18,8 +18,8 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#include <qapplication.h>
-#include <qeventloop.h>
+#include <tqapplication.h>
+#include <tqeventloop.h>
#include <kapplication.h>
#include <kcmdlineargs.h>
@@ -62,7 +62,7 @@ int kdemain( int argc, char **argv )
return 0;
}
-Scalix::Scalix( const QCString &protocol, const QCString &pool, const QCString &app )
+Scalix::Scalix( const TQCString &protocol, const TQCString &pool, const TQCString &app )
: SlaveBase( protocol, pool, app )
{
}
@@ -71,7 +71,7 @@ void Scalix::get( const KURL &url )
{
mimeType( "text/plain" );
- QString path = url.path();
+ TQString path = url.path();
if ( path.contains( "/freebusy/" ) ) {
retrieveFreeBusy( url );
@@ -82,7 +82,7 @@ void Scalix::get( const KURL &url )
void Scalix::put( const KURL& url, int, bool, bool )
{
- QString path = url.path();
+ TQString path = url.path();
if ( path.contains( "/freebusy/" ) ) {
publishFreeBusy( url );
@@ -99,27 +99,27 @@ void Scalix::retrieveFreeBusy( const KURL &url )
*/
// Extract user@domain (e.g. everything between '/freebusy/' and '.ifb')
- const QString requestUser = url.path().mid( 10, url.path().length() - 14 );
+ const TQString requestUser = url.path().mid( 10, url.path().length() - 14 );
- QByteArray packedArgs;
- QDataStream stream( packedArgs, IO_WriteOnly );
+ TQByteArray packedArgs;
+ TQDataStream stream( packedArgs, IO_WriteOnly );
- const QString argument = QString( "BEGIN:VFREEBUSY\nATTENDEE:MAILTO:%1\nEND:VFREEBUSY" ).arg( requestUser );
- const QString command = QString( "X-GET-ICAL-FREEBUSY {%1}" ).arg( argument.length() );
+ const TQString argument = TQString( "BEGIN:VFREEBUSY\nATTENDEE:MAILTO:%1\nEND:VFREEBUSY" ).arg( requestUser );
+ const TQString command = TQString( "X-GET-ICAL-FREEBUSY {%1}" ).arg( argument.length() );
stream << (int) 'X' << 'E' << command << argument;
- QString imapUrl = QString( "imap://%1@%3/" ).arg( url.pass().isEmpty() ?
+ TQString imapUrl = TQString( "imap://%1@%3/" ).arg( url.pass().isEmpty() ?
url.user() : url.user() + ":" + url.pass() )
.arg( url.host() );
- mFreeBusyData = QString();
+ mFreeBusyData = TQString();
KIO::SimpleJob *job = KIO::special( imapUrl, packedArgs, false );
- connect( job, SIGNAL( infoMessage( KIO::Job*, const QString& ) ),
- this, SLOT( slotInfoMessage( KIO::Job*, const QString& ) ) );
- connect( job, SIGNAL( result( KIO::Job* ) ),
- this, SLOT( slotRetrieveResult( KIO::Job* ) ) );
+ connect( job, TQT_SIGNAL( infoMessage( KIO::Job*, const TQString& ) ),
+ this, TQT_SLOT( slotInfoMessage( KIO::Job*, const TQString& ) ) );
+ connect( job, TQT_SIGNAL( result( KIO::Job* ) ),
+ this, TQT_SLOT( slotRetrieveResult( KIO::Job* ) ) );
qApp->eventLoop()->enterLoop();
}
@@ -130,8 +130,8 @@ void Scalix::publishFreeBusy( const KURL &url )
* The url is of the following form:
* scalix://user:password@host/freebusy/path/to/calendar/user@domain
*/
- QString requestUser, calendar;
- QString path = url.path();
+ TQString requestUser, calendar;
+ TQString path = url.path();
// extract user name
int lastSlash = path.findRev( '/' );
@@ -149,11 +149,11 @@ void Scalix::publishFreeBusy( const KURL &url )
};
// read freebusy information
- QByteArray data;
+ TQByteArray data;
while ( true ) {
dataReq();
- QByteArray buffer;
+ TQByteArray buffer;
const int newSize = readData(buffer);
if ( newSize < 0 ) {
// read error: network in unknown state so disconnect
@@ -169,26 +169,26 @@ void Scalix::publishFreeBusy( const KURL &url )
memcpy( data.data() + oldSize, buffer.data(), buffer.size() );
}
- QByteArray packedArgs;
- QDataStream stream( packedArgs, IO_WriteOnly );
+ TQByteArray packedArgs;
+ TQDataStream stream( packedArgs, IO_WriteOnly );
- const QString argument = QString::fromUtf8( data );
- const QString command = QString( "X-PUT-ICAL-FREEBUSY Calendar {%1}" ).arg( argument.length() );
+ const TQString argument = TQString::fromUtf8( data );
+ const TQString command = TQString( "X-PUT-ICAL-FREEBUSY Calendar {%1}" ).arg( argument.length() );
stream << (int) 'X' << 'E' << command << argument;
- QString imapUrl = QString( "imap://%1@%3/" ).arg( url.pass().isEmpty() ?
+ TQString imapUrl = TQString( "imap://%1@%3/" ).arg( url.pass().isEmpty() ?
url.user() : url.user() + ":" + url.pass() )
.arg( url.host() );
KIO::SimpleJob *job = KIO::special( imapUrl, packedArgs, false );
- connect( job, SIGNAL( result( KIO::Job* ) ),
- this, SLOT( slotPublishResult( KIO::Job* ) ) );
+ connect( job, TQT_SIGNAL( result( KIO::Job* ) ),
+ this, TQT_SLOT( slotPublishResult( KIO::Job* ) ) );
qApp->eventLoop()->enterLoop();
}
-void Scalix::slotInfoMessage( KIO::Job *job, const QString &data )
+void Scalix::slotInfoMessage( KIO::Job *job, const TQString &data )
{
if ( job->error() ) {
// error is handled in slotResult
diff --git a/kresources/scalix/kioslave/scalix.h b/kresources/scalix/kioslave/scalix.h
index 3697c49d7..25a2fdeac 100644
--- a/kresources/scalix/kioslave/scalix.h
+++ b/kresources/scalix/kioslave/scalix.h
@@ -24,14 +24,14 @@
#include <kio/job.h>
#include <kio/slavebase.h>
-#include <qobject.h>
+#include <tqobject.h>
-class Scalix : public QObject, public KIO::SlaveBase
+class Scalix : public TQObject, public KIO::SlaveBase
{
Q_OBJECT
public:
- Scalix( const QCString &protocol, const QCString &pool, const QCString &app );
+ Scalix( const TQCString &protocol, const TQCString &pool, const TQCString &app );
void get( const KURL &url );
void put( const KURL &url, int permissions, bool overwrite, bool resume );
@@ -39,13 +39,13 @@ class Scalix : public QObject, public KIO::SlaveBase
private slots:
void slotRetrieveResult( KIO::Job* );
void slotPublishResult( KIO::Job* );
- void slotInfoMessage( KIO::Job*, const QString& );
+ void slotInfoMessage( KIO::Job*, const TQString& );
private:
void retrieveFreeBusy( const KURL& );
void publishFreeBusy( const KURL& );
- QString mFreeBusyData;
+ TQString mFreeBusyData;
};
#endif
diff --git a/kresources/scalix/knotes/resourcescalix.cpp b/kresources/scalix/knotes/resourcescalix.cpp
index e43a9a912..2b7895282 100644
--- a/kresources/scalix/knotes/resourcescalix.cpp
+++ b/kresources/scalix/knotes/resourcescalix.cpp
@@ -49,7 +49,7 @@ static const char* inlineMimeType = "text/calendar";
ResourceScalix::ResourceScalix( const KConfig *config )
: ResourceNotes( config ), ResourceScalixBase( "ResourceScalix-KNotes" ),
- mCalendar( QString::fromLatin1("UTC") )
+ mCalendar( TQString::fromLatin1("UTC") )
{
setType( "scalix" );
}
@@ -64,15 +64,15 @@ bool ResourceScalix::doOpen()
config.setGroup( configGroupName );
// Get the list of Notes folders from KMail
- QValueList<KMailICalIface::SubResource> subResources;
+ TQValueList<KMailICalIface::SubResource> subResources;
if ( !kmailSubresources( subResources, kmailContentsType ) )
return false;
// Make the resource map from the folder list
- QValueList<KMailICalIface::SubResource>::ConstIterator it;
+ TQValueList<KMailICalIface::SubResource>::ConstIterator it;
mSubResources.clear();
for ( it = subResources.begin(); it != subResources.end(); ++it ) {
- const QString subResource = (*it).location;
+ const TQString subResource = (*it).location;
const bool active = config.readBoolEntry( subResource, true );
mSubResources[ subResource ] = Scalix::SubResource( active, (*it).writable, (*it).label );
}
@@ -89,8 +89,8 @@ void ResourceScalix::doClose()
config.writeEntry( it.key(), it.data().active() );
}
-bool ResourceScalix::loadSubResource( const QString& subResource,
- const QString &mimetype )
+bool ResourceScalix::loadSubResource( const TQString& subResource,
+ const TQString &mimetype )
{
// Get the list of journals
int count = 0;
@@ -99,7 +99,7 @@ bool ResourceScalix::loadSubResource( const QString& subResource,
return false;
}
- QMap<Q_UINT32, QString> lst;
+ TQMap<Q_UINT32, TQString> lst;
if( !kmailIncidences( lst, mimetype, subResource, 0, count ) ) {
kdError(5500) << "Communication problem in "
<< "ResourceScalix::getIncidenceList()\n";
@@ -111,7 +111,7 @@ bool ResourceScalix::loadSubResource( const QString& subResource,
// Populate with the new entries
const bool silent = mSilent;
mSilent = true;
- QMap<Q_UINT32, QString>::Iterator it;
+ TQMap<Q_UINT32, TQString>::Iterator it;
for ( it = lst.begin(); it != lst.end(); ++it ) {
KCal::Journal* journal = addNote( it.data(), subResource, it.key(), mimetype );
if ( !journal )
@@ -137,7 +137,7 @@ bool ResourceScalix::load()
// This subResource is disabled
continue;
- QString mimetype = inlineMimeType;
+ TQString mimetype = inlineMimeType;
rc &= loadSubResource( itR.key(), mimetype );
mimetype = attachmentMimeType;
rc &= loadSubResource( itR.key(), mimetype );
@@ -154,11 +154,11 @@ bool ResourceScalix::save()
bool ResourceScalix::addNote( KCal::Journal* journal )
{
- return addNote( journal, QString::null, 0 );
+ return addNote( journal, TQString::null, 0 );
}
-KCal::Journal* ResourceScalix::addNote( const QString& data, const QString& subresource,
- Q_UINT32 sernum, const QString& )
+KCal::Journal* ResourceScalix::addNote( const TQString& data, const TQString& subresource,
+ Q_UINT32 sernum, const TQString& )
{
KCal::Journal* journal = 0;
// FIXME: This does not take into account the time zone!
@@ -175,7 +175,7 @@ KCal::Journal* ResourceScalix::addNote( const QString& data, const QString& subr
}
bool ResourceScalix::addNote( KCal::Journal* journal,
- const QString& subresource, Q_UINT32 sernum )
+ const TQString& subresource, Q_UINT32 sernum )
{
kdDebug(5500) << "ResourceScalix::addNote( KCal::Journal*, '" << subresource << "', " << sernum << " )\n";
@@ -185,14 +185,14 @@ bool ResourceScalix::addNote( KCal::Journal* journal,
bool newNote = subresource.isEmpty();
mCalendar.addJournal( journal );
- QString resource =
+ TQString resource =
newNote ? findWritableResource( mSubResources ) : subresource;
if ( resource.isEmpty() ) // canceled
return false;
if ( !mSilent ) {
KCal::ICalFormat formatter;
- const QString xml = formatter.toString( journal );
+ const TQString xml = formatter.toString( journal );
kdDebug(5500) << k_funcinfo << "XML string:\n" << xml << endl;
if( !kmailUpdate( resource, sernum, xml, attachmentMimeType, journal->uid() ) ) {
@@ -211,7 +211,7 @@ bool ResourceScalix::addNote( KCal::Journal* journal,
bool ResourceScalix::deleteNote( KCal::Journal* journal )
{
- const QString uid = journal->uid();
+ const TQString uid = journal->uid();
if ( !mUidMap.contains( uid ) )
// Odd
return false;
@@ -226,20 +226,20 @@ bool ResourceScalix::deleteNote( KCal::Journal* journal )
return true;
}
-KCal::Alarm::List ResourceScalix::alarms( const QDateTime& from, const QDateTime& to )
+KCal::Alarm::List ResourceScalix::alarms( const TQDateTime& from, const TQDateTime& to )
{
KCal::Alarm::List alarms;
KCal::Journal::List notes = mCalendar.journals();
KCal::Journal::List::ConstIterator note;
for ( note = notes.begin(); note != notes.end(); ++note )
{
- QDateTime preTime = from.addSecs( -1 );
+ TQDateTime preTime = from.addSecs( -1 );
KCal::Alarm::List::ConstIterator it;
for( it = (*note)->alarms().begin(); it != (*note)->alarms().end(); ++it )
{
if ( (*it)->enabled() )
{
- QDateTime dt = (*it)->nextRepetition( preTime );
+ TQDateTime dt = (*it)->nextRepetition( preTime );
if ( dt.isValid() && dt <= to )
alarms.append( *it );
}
@@ -251,7 +251,7 @@ KCal::Alarm::List ResourceScalix::alarms( const QDateTime& from, const QDateTime
void ResourceScalix::incidenceUpdated( KCal::IncidenceBase* i )
{
- QString subResource;
+ TQString subResource;
Q_UINT32 sernum;
if ( mUidMap.contains( i->uid() ) ) {
subResource = mUidMap[ i->uid() ].resource();
@@ -265,7 +265,7 @@ void ResourceScalix::incidenceUpdated( KCal::IncidenceBase* i )
KCal::Journal* journal = dynamic_cast<KCal::Journal*>( i );
KCal::ICalFormat formatter;
- const QString xml = formatter.toString( journal );
+ const TQString xml = formatter.toString( journal );
if( !xml.isEmpty() && kmailUpdate( subResource, sernum, xml, attachmentMimeType, journal->uid() ) )
mUidMap[ i->uid() ] = StorageReference( subResource, sernum );
}
@@ -274,18 +274,18 @@ void ResourceScalix::incidenceUpdated( KCal::IncidenceBase* i )
* These are the DCOP slots that KMail call to notify when something
* changed.
*/
-bool ResourceScalix::fromKMailAddIncidence( const QString& type,
- const QString& subResource,
+bool ResourceScalix::fromKMailAddIncidence( const TQString& type,
+ const TQString& subResource,
Q_UINT32 sernum,
int,
- const QString& note )
+ const TQString& note )
{
// Check if this is a note
if( type != kmailContentsType ) return false;
const bool silent = mSilent;
mSilent = true;
- QString mimetype = inlineMimeType;
+ TQString mimetype = inlineMimeType;
KCal::Journal* journal = addNote( note, subResource, sernum, mimetype );
if ( journal )
manager()->registerNote( this, journal );
@@ -293,9 +293,9 @@ bool ResourceScalix::fromKMailAddIncidence( const QString& type,
return true;
}
-void ResourceScalix::fromKMailDelIncidence( const QString& type,
- const QString& /*subResource*/,
- const QString& uid )
+void ResourceScalix::fromKMailDelIncidence( const TQString& type,
+ const TQString& /*subResource*/,
+ const TQString& uid )
{
// Check if this is a note
if( type != kmailContentsType ) return;
@@ -311,16 +311,16 @@ void ResourceScalix::fromKMailDelIncidence( const QString& type,
mSilent = silent;
}
-void ResourceScalix::fromKMailRefresh( const QString& type,
- const QString& /*subResource*/ )
+void ResourceScalix::fromKMailRefresh( const TQString& type,
+ const TQString& /*subResource*/ )
{
if ( type == kmailContentsType )
load(); // ### should call loadSubResource(subResource) probably
}
-void ResourceScalix::fromKMailAddSubresource( const QString& type,
- const QString& subResource,
- const QString& mimetype,
+void ResourceScalix::fromKMailAddSubresource( const TQString& type,
+ const TQString& subResource,
+ const TQString& mimetype,
bool writable )
{
if ( type != kmailContentsType )
@@ -340,8 +340,8 @@ void ResourceScalix::fromKMailAddSubresource( const QString& type,
emit signalSubresourceAdded( this, type, subResource );
}
-void ResourceScalix::fromKMailDelSubresource( const QString& type,
- const QString& subResource )
+void ResourceScalix::fromKMailDelSubresource( const TQString& type,
+ const TQString& subResource )
{
if ( type != configGroupName )
// Not ours
@@ -361,7 +361,7 @@ void ResourceScalix::fromKMailDelSubresource( const QString& type,
// Make a list of all uids to remove
Scalix::UidMap::ConstIterator mapIt;
- QStringList uids;
+ TQStringList uids;
for ( mapIt = mUidMap.begin(); mapIt != mUidMap.end(); ++mapIt )
if ( mapIt.data().resource() == subResource )
// We have a match
@@ -371,7 +371,7 @@ void ResourceScalix::fromKMailDelSubresource( const QString& type,
if ( !uids.isEmpty() ) {
const bool silent = mSilent;
mSilent = true;
- QStringList::ConstIterator it;
+ TQStringList::ConstIterator it;
for ( it = uids.begin(); it != uids.end(); ++it ) {
KCal::Journal* j = mCalendar.journal( *it );
if( j )
@@ -383,17 +383,17 @@ void ResourceScalix::fromKMailDelSubresource( const QString& type,
emit signalSubresourceRemoved( this, type, subResource );
}
-void ResourceScalix::fromKMailAsyncLoadResult( const QMap<Q_UINT32, QString>& map,
- const QString& type,
- const QString& folder )
+void ResourceScalix::fromKMailAsyncLoadResult( const TQMap<Q_UINT32, TQString>& map,
+ const TQString& type,
+ const TQString& folder )
{
// We are only interested in notes
if ( ( type != attachmentMimeType ) && ( type != inlineMimeType ) ) return;
// Populate with the new entries
const bool silent = mSilent;
mSilent = true;
- QString mimetype = inlineMimeType;
- for( QMap<Q_UINT32, QString>::ConstIterator it = map.begin(); it != map.end(); ++it ) {
+ TQString mimetype = inlineMimeType;
+ for( TQMap<Q_UINT32, TQString>::ConstIterator it = map.begin(); it != map.end(); ++it ) {
KCal::Journal* journal = addNote( it.data(), folder, it.key(), mimetype );
if ( !journal )
kdDebug(5500) << "loading note " << it.key() << " failed" << endl;
@@ -404,12 +404,12 @@ void ResourceScalix::fromKMailAsyncLoadResult( const QMap<Q_UINT32, QString>& ma
}
-QStringList ResourceScalix::subresources() const
+TQStringList ResourceScalix::subresources() const
{
return mSubResources.keys();
}
-bool ResourceScalix::subresourceActive( const QString& res ) const
+bool ResourceScalix::subresourceActive( const TQString& res ) const
{
if ( mSubResources.contains( res ) ) {
return mSubResources[ res ].active();
diff --git a/kresources/scalix/knotes/resourcescalix.h b/kresources/scalix/knotes/resourcescalix.h
index a26bd1973..cb0c50fbf 100644
--- a/kresources/scalix/knotes/resourcescalix.h
+++ b/kresources/scalix/knotes/resourcescalix.h
@@ -73,46 +73,46 @@ public:
bool deleteNote( KCal::Journal* );
- KCal::Alarm::List alarms( const QDateTime& from, const QDateTime& to );
+ KCal::Alarm::List alarms( const TQDateTime& from, const TQDateTime& to );
/// Reimplemented from IncidenceBase::Observer to know when a note was changed
void incidenceUpdated( KCal::IncidenceBase* );
/// The ResourceScalixBase methods called by KMail
- bool fromKMailAddIncidence( const QString& type, const QString& resource,
- Q_UINT32 sernum, int format, const QString& note );
- void fromKMailDelIncidence( const QString& type, const QString& resource,
- const QString& uid );
- void fromKMailRefresh( const QString& type, const QString& resource );
+ bool fromKMailAddIncidence( const TQString& type, const TQString& resource,
+ Q_UINT32 sernum, int format, const TQString& note );
+ void fromKMailDelIncidence( const TQString& type, const TQString& resource,
+ const TQString& uid );
+ void fromKMailRefresh( const TQString& type, const TQString& resource );
/// Listen to KMail changes in the amount of sub resources
- void fromKMailAddSubresource( const QString& type, const QString& resource,
- const QString& label, bool writable );
- void fromKMailDelSubresource( const QString& type, const QString& resource );
+ void fromKMailAddSubresource( const TQString& type, const TQString& resource,
+ const TQString& label, bool writable );
+ void fromKMailDelSubresource( const TQString& type, const TQString& resource );
- void fromKMailAsyncLoadResult( const QMap<Q_UINT32, QString>& map,
- const QString& type,
- const QString& folder );
+ void fromKMailAsyncLoadResult( const TQMap<Q_UINT32, TQString>& map,
+ const TQString& type,
+ const TQString& folder );
/** Return the list of subresources. */
- QStringList subresources() const;
+ TQStringList subresources() const;
/** Is this subresource active? */
- bool subresourceActive( const QString& ) const;
+ bool subresourceActive( const TQString& ) const;
signals:
- void signalSubresourceAdded( Resource*, const QString&, const QString& );
- void signalSubresourceRemoved( Resource*, const QString&, const QString& );
+ void signalSubresourceAdded( Resource*, const TQString&, const TQString& );
+ void signalSubresourceRemoved( Resource*, const TQString&, const TQString& );
private:
- bool addNote( KCal::Journal* journal, const QString& resource,
+ bool addNote( KCal::Journal* journal, const TQString& resource,
Q_UINT32 sernum );
- KCal::Journal* addNote( const QString& data, const QString& subresource,
- Q_UINT32 sernum, const QString &mimetype );
+ KCal::Journal* addNote( const TQString& data, const TQString& subresource,
+ Q_UINT32 sernum, const TQString &mimetype );
- bool loadSubResource( const QString& resource, const QString& mimetype );
+ bool loadSubResource( const TQString& resource, const TQString& mimetype );
- QString configFile() const {
+ TQString configFile() const {
return ResourceScalixBase::configFile( "knotes" );
}
diff --git a/kresources/scalix/knotes/resourcescalix_plugin.cpp b/kresources/scalix/knotes/resourcescalix_plugin.cpp
index a83bbd746..222d5ed68 100644
--- a/kresources/scalix/knotes/resourcescalix_plugin.cpp
+++ b/kresources/scalix/knotes/resourcescalix_plugin.cpp
@@ -41,7 +41,7 @@ public:
return new Scalix::ResourceScalix( config );
}
- KRES::ConfigWidget *configWidget( QWidget* )
+ KRES::ConfigWidget *configWidget( TQWidget* )
{
return 0;
}
diff --git a/kresources/scalix/scalixadmin/delegatedialog.cpp b/kresources/scalix/scalixadmin/delegatedialog.cpp
index 3dc0412a4..661f57430 100644
--- a/kresources/scalix/scalixadmin/delegatedialog.cpp
+++ b/kresources/scalix/scalixadmin/delegatedialog.cpp
@@ -18,11 +18,11 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#include <qcheckbox.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qlineedit.h>
-#include <qtoolbutton.h>
+#include <tqcheckbox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqlineedit.h>
+#include <tqtoolbutton.h>
#include <klocale.h>
@@ -31,24 +31,24 @@
#include "delegatedialog.h"
-DelegateDialog::DelegateDialog( QWidget *parent )
+DelegateDialog::DelegateDialog( TQWidget *parent )
: KDialogBase( parent, "", true, "", Ok | Cancel, Ok, true )
{
- QWidget *page = new QWidget( this );
- QGridLayout *layout = new QGridLayout( page, 5, 3, 11, 6 );
+ TQWidget *page = new TQWidget( this );
+ TQGridLayout *layout = new TQGridLayout( page, 5, 3, 11, 6 );
- QLabel *label = new QLabel( i18n( "User:" ), page );
+ TQLabel *label = new TQLabel( i18n( "User:" ), page );
layout->addWidget( label, 0, 0 );
- mEmail = new QLineEdit( page );
+ mEmail = new TQLineEdit( page );
layout->addWidget( mEmail, 0, 1 );
- QToolButton *emailSelector = new QToolButton( page );
+ TQToolButton *emailSelector = new TQToolButton( page );
emailSelector->setUsesTextLabel( true );
emailSelector->setTextLabel( i18n( "..." ) );
layout->addWidget( emailSelector, 0, 2 );
- QValueList<Scalix::DelegateTypes> types;
+ TQValueList<Scalix::DelegateTypes> types;
types << Scalix::SendOnBehalfOf;
types << Scalix::SeePrivate;
types << Scalix::GetMeetings;
@@ -56,14 +56,14 @@ DelegateDialog::DelegateDialog( QWidget *parent )
int row = 1;
for ( uint i = 0; i < types.count(); ++i ) {
- QCheckBox *box = new QCheckBox( Scalix::Delegate::rightsAsString( types[ i ] ), page );
+ TQCheckBox *box = new TQCheckBox( Scalix::Delegate::rightsAsString( types[ i ] ), page );
layout->addMultiCellWidget( box, row, row, 1, 2 );
mRights.insert( types[ i ], box );
row++;
}
- connect( emailSelector, SIGNAL( clicked() ), SLOT( selectEmail() ) );
+ connect( emailSelector, TQT_SIGNAL( clicked() ), TQT_SLOT( selectEmail() ) );
setMainWidget( page );
}
@@ -72,7 +72,7 @@ void DelegateDialog::setDelegate( const Scalix::Delegate &delegate )
{
mEmail->setText( delegate.email() );
- QMap<int, QCheckBox*>::Iterator it;
+ TQMap<int, TQCheckBox*>::Iterator it;
for ( it = mRights.begin(); it != mRights.end(); ++it )
it.data()->setChecked( delegate.rights() & it.key() );
}
@@ -81,7 +81,7 @@ Scalix::Delegate DelegateDialog::delegate() const
{
int rights = 0;
- QMap<int, QCheckBox*>::ConstIterator it;
+ TQMap<int, TQCheckBox*>::ConstIterator it;
for ( it = mRights.begin(); it != mRights.end(); ++it )
if ( it.data()->isChecked() )
rights |= it.key();
@@ -95,7 +95,7 @@ void DelegateDialog::selectEmail()
if ( !dlg.exec() )
return;
- const QString email = dlg.selectedUser();
+ const TQString email = dlg.selectedUser();
if ( email.isEmpty() )
return;
diff --git a/kresources/scalix/scalixadmin/delegatedialog.h b/kresources/scalix/scalixadmin/delegatedialog.h
index b5503a4f3..3d712d8e2 100644
--- a/kresources/scalix/scalixadmin/delegatedialog.h
+++ b/kresources/scalix/scalixadmin/delegatedialog.h
@@ -21,7 +21,7 @@
#ifndef DELEGATEDIALOG_H
#define DELEGATEDIALOG_H
-#include <qmap.h>
+#include <tqmap.h>
#include <kdialogbase.h>
@@ -37,7 +37,7 @@ class DelegateDialog : public KDialogBase
Q_OBJECT
public:
- DelegateDialog( QWidget *parent = 0 );
+ DelegateDialog( TQWidget *parent = 0 );
void setDelegate( const Scalix::Delegate &delegate );
Scalix::Delegate delegate() const;
@@ -46,8 +46,8 @@ class DelegateDialog : public KDialogBase
void selectEmail();
private:
- QLineEdit *mEmail;
- QMap<int, QCheckBox*> mRights;
+ TQLineEdit *mEmail;
+ TQMap<int, TQCheckBox*> mRights;
};
#endif
diff --git a/kresources/scalix/scalixadmin/delegatemanager.h b/kresources/scalix/scalixadmin/delegatemanager.h
index f27b79a1b..7f5e2e5a7 100644
--- a/kresources/scalix/scalixadmin/delegatemanager.h
+++ b/kresources/scalix/scalixadmin/delegatemanager.h
@@ -21,8 +21,8 @@
#ifndef DELEGATEMANAGER_H
#define DELEGATEMANAGER_H
-#include <qobject.h>
-#include <qstringlist.h>
+#include <tqobject.h>
+#include <tqstringlist.h>
#include "jobs.h"
diff --git a/kresources/scalix/scalixadmin/delegatepage.cpp b/kresources/scalix/scalixadmin/delegatepage.cpp
index f9a9b8e7a..033472901 100644
--- a/kresources/scalix/scalixadmin/delegatepage.cpp
+++ b/kresources/scalix/scalixadmin/delegatepage.cpp
@@ -18,8 +18,8 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#include <qlayout.h>
-#include <qpushbutton.h>
+#include <tqlayout.h>
+#include <tqpushbutton.h>
#include <kinputdialog.h>
#include <klocale.h>
@@ -34,29 +34,29 @@
#include "delegatepage.h"
-DelegatePage::DelegatePage( QWidget *parent )
- : QWidget( parent )
+DelegatePage::DelegatePage( TQWidget *parent )
+ : TQWidget( parent )
{
- QGridLayout *layout = new QGridLayout( this, 2, 3, 11, 6 );
+ TQGridLayout *layout = new TQGridLayout( this, 2, 3, 11, 6 );
mView = new DelegateView( &mManager, this );
layout->addMultiCellWidget( mView, 0, 0, 0, 2 );
- mAddButton = new QPushButton( i18n( "Add Delegate..." ), this );
+ mAddButton = new TQPushButton( i18n( "Add Delegate..." ), this );
layout->addWidget( mAddButton, 1, 0 );
- mEditButton = new QPushButton( i18n( "Edit Delegate..." ), this );
+ mEditButton = new TQPushButton( i18n( "Edit Delegate..." ), this );
mEditButton->setEnabled( false );
layout->addWidget( mEditButton, 1, 1 );
- mRemoveButton = new QPushButton( i18n( "Remove Delegate" ), this );
+ mRemoveButton = new TQPushButton( i18n( "Remove Delegate" ), this );
mRemoveButton->setEnabled( false );
layout->addWidget( mRemoveButton, 1, 2 );
- connect( mView, SIGNAL( selectionChanged() ), SLOT( selectionChanged() ) );
- connect( mAddButton, SIGNAL( clicked() ), SLOT( addDelegate() ) );
- connect( mEditButton, SIGNAL( clicked() ), SLOT( editDelegate() ) );
- connect( mRemoveButton, SIGNAL( clicked() ), SLOT( removeDelegate() ) );
+ connect( mView, TQT_SIGNAL( selectionChanged() ), TQT_SLOT( selectionChanged() ) );
+ connect( mAddButton, TQT_SIGNAL( clicked() ), TQT_SLOT( addDelegate() ) );
+ connect( mEditButton, TQT_SIGNAL( clicked() ), TQT_SLOT( editDelegate() ) );
+ connect( mRemoveButton, TQT_SIGNAL( clicked() ), TQT_SLOT( removeDelegate() ) );
loadAllDelegates();
}
@@ -69,7 +69,7 @@ void DelegatePage::loadAllDelegates()
{
Scalix::GetDelegatesJob *job = Scalix::getDelegates( Settings::self()->globalSlave(),
Settings::self()->accountUrl() );
- connect( job, SIGNAL( result( KIO::Job* ) ), SLOT( allDelegates( KIO::Job* ) ) );
+ connect( job, TQT_SIGNAL( result( KIO::Job* ) ), TQT_SLOT( allDelegates( KIO::Job* ) ) );
}
void DelegatePage::addDelegate()
@@ -88,7 +88,7 @@ void DelegatePage::addDelegate()
Scalix::SetDelegateJob *job = Scalix::setDelegate( Settings::self()->globalSlave(),
Settings::self()->accountUrl(),
delegate.email(), delegate.rights() );
- connect( job, SIGNAL( result( KIO::Job* ) ), SLOT( delegateAdded( KIO::Job* ) ) );
+ connect( job, TQT_SIGNAL( result( KIO::Job* ) ), TQT_SLOT( delegateAdded( KIO::Job* ) ) );
}
void DelegatePage::editDelegate()
@@ -113,7 +113,7 @@ void DelegatePage::editDelegate()
Scalix::SetDelegateJob *job = Scalix::setDelegate( Settings::self()->globalSlave(),
Settings::self()->accountUrl(),
delegate.email(), delegate.rights() );
- connect( job, SIGNAL( result( KIO::Job* ) ), SLOT( delegateAdded( KIO::Job* ) ) );
+ connect( job, TQT_SIGNAL( result( KIO::Job* ) ), TQT_SLOT( delegateAdded( KIO::Job* ) ) );
}
void DelegatePage::removeDelegate()
@@ -124,7 +124,7 @@ void DelegatePage::removeDelegate()
Scalix::DeleteDelegateJob *job = Scalix::deleteDelegate( Settings::self()->globalSlave(),
Settings::self()->accountUrl(), delegate.email() );
- connect( job, SIGNAL( result( KIO::Job* ) ), SLOT( delegateRemoved( KIO::Job* ) ) );
+ connect( job, TQT_SIGNAL( result( KIO::Job* ) ), TQT_SLOT( delegateRemoved( KIO::Job* ) ) );
}
void DelegatePage::allDelegates( KIO::Job *job )
diff --git a/kresources/scalix/scalixadmin/delegatepage.h b/kresources/scalix/scalixadmin/delegatepage.h
index 243c0f0d3..edaad8e78 100644
--- a/kresources/scalix/scalixadmin/delegatepage.h
+++ b/kresources/scalix/scalixadmin/delegatepage.h
@@ -21,7 +21,7 @@
#ifndef DELEGATEPAGE_H
#define DELEGATEPAGE_H
-#include <qwidget.h>
+#include <tqwidget.h>
#include "delegatemanager.h"
@@ -33,7 +33,7 @@ class DelegatePage : public QWidget
Q_OBJECT
public:
- DelegatePage( QWidget *parent = 0 );
+ DelegatePage( TQWidget *parent = 0 );
~DelegatePage();
private slots:
@@ -49,9 +49,9 @@ class DelegatePage : public QWidget
void selectionChanged();
private:
- QPushButton *mAddButton;
- QPushButton *mEditButton;
- QPushButton *mRemoveButton;
+ TQPushButton *mAddButton;
+ TQPushButton *mEditButton;
+ TQPushButton *mRemoveButton;
DelegateManager mManager;
DelegateView *mView;
diff --git a/kresources/scalix/scalixadmin/delegateview.cpp b/kresources/scalix/scalixadmin/delegateview.cpp
index 9ea16cf1a..e253f1f36 100644
--- a/kresources/scalix/scalixadmin/delegateview.cpp
+++ b/kresources/scalix/scalixadmin/delegateview.cpp
@@ -27,8 +27,8 @@
class DelegateItem : public QListViewItem
{
public:
- DelegateItem( QListView *parent, const Scalix::Delegate &delegate )
- : QListViewItem( parent ), mDelegate( delegate )
+ DelegateItem( TQListView *parent, const Scalix::Delegate &delegate )
+ : TQListViewItem( parent ), mDelegate( delegate )
{
setText( 0, mDelegate.email() );
setText( 1, Scalix::Delegate::rightsAsString( mDelegate.rights() ) );
@@ -40,7 +40,7 @@ class DelegateItem : public QListViewItem
Scalix::Delegate mDelegate;
};
-DelegateView::DelegateView( DelegateManager *manager, QWidget *parent )
+DelegateView::DelegateView( DelegateManager *manager, TQWidget *parent )
: KListView( parent ), mManager( manager )
{
addColumn( i18n( "Delegate" ) );
@@ -48,7 +48,7 @@ DelegateView::DelegateView( DelegateManager *manager, QWidget *parent )
setFullWidth( true );
setAllColumnsShowFocus( true );
- connect( mManager, SIGNAL( changed() ), SLOT( delegateChanged() ) );
+ connect( mManager, TQT_SIGNAL( changed() ), TQT_SLOT( delegateChanged() ) );
delegateChanged();
}
diff --git a/kresources/scalix/scalixadmin/delegateview.h b/kresources/scalix/scalixadmin/delegateview.h
index 61725be29..1e9e6300f 100644
--- a/kresources/scalix/scalixadmin/delegateview.h
+++ b/kresources/scalix/scalixadmin/delegateview.h
@@ -34,7 +34,7 @@ class DelegateView : public KListView
Q_OBJECT
public:
- DelegateView( DelegateManager *manager, QWidget *parent = 0 );
+ DelegateView( DelegateManager *manager, TQWidget *parent = 0 );
Scalix::Delegate selectedDelegate() const;
diff --git a/kresources/scalix/scalixadmin/jobs.cpp b/kresources/scalix/scalixadmin/jobs.cpp
index c463463d2..f1bce9f2c 100644
--- a/kresources/scalix/scalixadmin/jobs.cpp
+++ b/kresources/scalix/scalixadmin/jobs.cpp
@@ -30,7 +30,7 @@ Delegate::Delegate()
{
}
-Delegate::Delegate( const QString &email, int rights )
+Delegate::Delegate( const TQString &email, int rights )
: mEmail( email ), mRights( rights )
{
}
@@ -40,7 +40,7 @@ bool Delegate::isValid() const
return ( !mEmail.isEmpty() && mRights != -1 );
}
-QString Delegate::email() const
+TQString Delegate::email() const
{
return mEmail;
}
@@ -50,9 +50,9 @@ int Delegate::rights() const
return mRights;
}
-QString Delegate::rightsAsString( int rights )
+TQString Delegate::rightsAsString( int rights )
{
- QStringList rightNames;
+ TQStringList rightNames;
if ( rights & SendOnBehalfOf )
rightNames.append( i18n( "Send on behalf of" ) );
@@ -68,21 +68,21 @@ QString Delegate::rightsAsString( int rights )
SetPasswordJob* Scalix::setPassword( KIO::Slave* slave, const KURL& url,
- const QString &oldPassword, const QString& newPassword )
+ const TQString &oldPassword, const TQString& newPassword )
{
- QByteArray packedArgs;
- QDataStream stream( packedArgs, IO_WriteOnly );
+ TQByteArray packedArgs;
+ TQDataStream stream( packedArgs, IO_WriteOnly );
stream << (int)'X' << (int)'N'
- << QString( "X-SCALIX-PASSWORD" ) << QString( "%1 %2" ).arg( oldPassword ).arg( newPassword );
+ << TQString( "X-SCALIX-PASSWORD" ) << TQString( "%1 %2" ).arg( oldPassword ).arg( newPassword );
SetPasswordJob* job = new SetPasswordJob( url, packedArgs, false );
KIO::Scheduler::assignJobToSlave( slave, job );
return job;
}
-SetDelegateJob* Scalix::setDelegate( KIO::Slave* slave, const KURL& url, const QString& email, int params )
+SetDelegateJob* Scalix::setDelegate( KIO::Slave* slave, const KURL& url, const TQString& email, int params )
{
- QStringList types;
+ TQStringList types;
if ( params & SendOnBehalfOf )
types.append( "SOBO" );
if ( params & SeePrivate )
@@ -92,22 +92,22 @@ SetDelegateJob* Scalix::setDelegate( KIO::Slave* slave, const KURL& url, const Q
if ( params & InsteadOfMe )
types.append( "INSTEADOFME" );
- QByteArray packedArgs;
- QDataStream stream( packedArgs, IO_WriteOnly );
+ TQByteArray packedArgs;
+ TQDataStream stream( packedArgs, IO_WriteOnly );
stream << (int)'X' << (int)'N'
- << QString( "X-SET-DELEGATE" ) << QString( "%1 %2" ).arg( email ).arg( types.join( " " ) );
+ << TQString( "X-SET-DELEGATE" ) << TQString( "%1 %2" ).arg( email ).arg( types.join( " " ) );
SetDelegateJob* job = new SetDelegateJob( url, packedArgs, false );
KIO::Scheduler::assignJobToSlave( slave, job );
return job;
}
-DeleteDelegateJob* Scalix::deleteDelegate( KIO::Slave* slave, const KURL& url, const QString& email )
+DeleteDelegateJob* Scalix::deleteDelegate( KIO::Slave* slave, const KURL& url, const TQString& email )
{
- QByteArray packedArgs;
- QDataStream stream( packedArgs, IO_WriteOnly );
+ TQByteArray packedArgs;
+ TQDataStream stream( packedArgs, IO_WriteOnly );
stream << (int)'X' << (int)'N'
- << QString( "X-DELETE-DELEGATE" ) << email;
+ << TQString( "X-DELETE-DELEGATE" ) << email;
DeleteDelegateJob* job = new DeleteDelegateJob( url, packedArgs, false );
KIO::Scheduler::assignJobToSlave( slave, job );
@@ -116,33 +116,33 @@ DeleteDelegateJob* Scalix::deleteDelegate( KIO::Slave* slave, const KURL& url, c
GetDelegatesJob* Scalix::getDelegates( KIO::Slave* slave, const KURL& url )
{
- QByteArray packedArgs;
- QDataStream stream( packedArgs, IO_WriteOnly );
- stream << (int)'X' << (int)'N' << QString( "X-GET-DELEGATES" ) << QString();
+ TQByteArray packedArgs;
+ TQDataStream stream( packedArgs, IO_WriteOnly );
+ stream << (int)'X' << (int)'N' << TQString( "X-GET-DELEGATES" ) << TQString();
GetDelegatesJob* job = new GetDelegatesJob( url, packedArgs, false );
KIO::Scheduler::assignJobToSlave( slave, job );
return job;
}
-AddOtherUserJob* Scalix::addOtherUser( KIO::Slave* slave, const KURL& url, const QString& email )
+AddOtherUserJob* Scalix::addOtherUser( KIO::Slave* slave, const KURL& url, const TQString& email )
{
- QByteArray packedArgs;
- QDataStream stream( packedArgs, IO_WriteOnly );
+ TQByteArray packedArgs;
+ TQDataStream stream( packedArgs, IO_WriteOnly );
stream << (int)'X' << (int)'N'
- << QString( "X-ADD-OTHER-USER" ) << email;
+ << TQString( "X-ADD-OTHER-USER" ) << email;
AddOtherUserJob* job = new AddOtherUserJob( url, packedArgs, false );
KIO::Scheduler::assignJobToSlave( slave, job );
return job;
}
-DeleteOtherUserJob* Scalix::deleteOtherUser( KIO::Slave* slave, const KURL& url, const QString& email )
+DeleteOtherUserJob* Scalix::deleteOtherUser( KIO::Slave* slave, const KURL& url, const TQString& email )
{
- QByteArray packedArgs;
- QDataStream stream( packedArgs, IO_WriteOnly );
+ TQByteArray packedArgs;
+ TQDataStream stream( packedArgs, IO_WriteOnly );
stream << (int)'X' << (int)'N'
- << QString( "X-DELETE-OTHER-USER" ) << email;
+ << TQString( "X-DELETE-OTHER-USER" ) << email;
DeleteOtherUserJob* job = new DeleteOtherUserJob( url, packedArgs, false );
KIO::Scheduler::assignJobToSlave( slave, job );
@@ -151,25 +151,25 @@ DeleteOtherUserJob* Scalix::deleteOtherUser( KIO::Slave* slave, const KURL& url,
GetOtherUsersJob* Scalix::getOtherUsers( KIO::Slave* slave, const KURL& url )
{
- QByteArray packedArgs;
- QDataStream stream( packedArgs, IO_WriteOnly );
+ TQByteArray packedArgs;
+ TQDataStream stream( packedArgs, IO_WriteOnly );
stream << (int)'X' << (int)'N'
- << QString( "X-GET-OTHER-USERS" ) << QString();
+ << TQString( "X-GET-OTHER-USERS" ) << TQString();
GetOtherUsersJob* job = new GetOtherUsersJob( url, packedArgs, false );
KIO::Scheduler::assignJobToSlave( slave, job );
return job;
}
-SetOutOfOfficeJob* Scalix::setOutOfOffice( KIO::Slave* slave, const KURL& url, bool enabled, const QString& msg )
+SetOutOfOfficeJob* Scalix::setOutOfOffice( KIO::Slave* slave, const KURL& url, bool enabled, const TQString& msg )
{
- const QString argument = msg;
- const QString command = QString( "X-SET-OUT-OF-OFFICE %1 %2 {%3}" ).arg( enabled ? "ENABLED" : "DISABLED" )
+ const TQString argument = msg;
+ const TQString command = TQString( "X-SET-OUT-OF-OFFICE %1 %2 {%3}" ).arg( enabled ? "ENABLED" : "DISABLED" )
.arg( "UTF-8" )
.arg( msg.utf8().length() );
- QByteArray packedArgs;
- QDataStream stream( packedArgs, IO_WriteOnly );
+ TQByteArray packedArgs;
+ TQDataStream stream( packedArgs, IO_WriteOnly );
stream << (int) 'X' << (int)'E' << command << argument;
SetOutOfOfficeJob* job = new SetOutOfOfficeJob( url, packedArgs, false );
@@ -179,36 +179,36 @@ SetOutOfOfficeJob* Scalix::setOutOfOffice( KIO::Slave* slave, const KURL& url, b
GetOutOfOfficeJob* Scalix::getOutOfOffice( KIO::Slave* slave, const KURL& url )
{
- QByteArray packedArgs;
- QDataStream stream( packedArgs, IO_WriteOnly );
+ TQByteArray packedArgs;
+ TQDataStream stream( packedArgs, IO_WriteOnly );
stream << (int)'X' << (int)'N'
- << QString( "X-GET-OUT-OF-OFFICE" ) << QString();
+ << TQString( "X-GET-OUT-OF-OFFICE" ) << TQString();
GetOutOfOfficeJob* job = new GetOutOfOfficeJob( url, packedArgs, false );
KIO::Scheduler::assignJobToSlave( slave, job );
return job;
}
-SetPasswordJob::SetPasswordJob( const KURL& url, const QByteArray &packedArgs, bool showProgressInfo )
+SetPasswordJob::SetPasswordJob( const KURL& url, const TQByteArray &packedArgs, bool showProgressInfo )
: KIO::SimpleJob( url, KIO::CMD_SPECIAL, packedArgs, showProgressInfo )
{
}
-SetDelegateJob::SetDelegateJob( const KURL& url, const QByteArray &packedArgs, bool showProgressInfo )
+SetDelegateJob::SetDelegateJob( const KURL& url, const TQByteArray &packedArgs, bool showProgressInfo )
: KIO::SimpleJob( url, KIO::CMD_SPECIAL, packedArgs, showProgressInfo )
{
}
-DeleteDelegateJob::DeleteDelegateJob( const KURL& url, const QByteArray &packedArgs, bool showProgressInfo )
+DeleteDelegateJob::DeleteDelegateJob( const KURL& url, const TQByteArray &packedArgs, bool showProgressInfo )
: KIO::SimpleJob( url, KIO::CMD_SPECIAL, packedArgs, showProgressInfo )
{
}
-GetDelegatesJob::GetDelegatesJob( const KURL& url, const QByteArray &packedArgs, bool showProgressInfo )
+GetDelegatesJob::GetDelegatesJob( const KURL& url, const TQByteArray &packedArgs, bool showProgressInfo )
: KIO::SimpleJob( url, KIO::CMD_SPECIAL, packedArgs, showProgressInfo )
{
- connect( this, SIGNAL( infoMessage( KIO::Job*, const QString& ) ),
- this, SLOT( slotInfoMessage( KIO::Job*, const QString& ) ) );
+ connect( this, TQT_SIGNAL( infoMessage( KIO::Job*, const TQString& ) ),
+ this, TQT_SLOT( slotInfoMessage( KIO::Job*, const TQString& ) ) );
}
Delegate::List GetDelegatesJob::delegates() const
@@ -216,21 +216,21 @@ Delegate::List GetDelegatesJob::delegates() const
return mDelegates;
}
-void GetDelegatesJob::slotInfoMessage( KIO::Job*, const QString &data )
+void GetDelegatesJob::slotInfoMessage( KIO::Job*, const TQString &data )
{
/**
* The passed data have the following form:
*
* "user1@host.com:right1,right2,right4 user2@host.com:right3,right5"
*/
- QStringList delegates = QStringList::split( ' ', data );
+ TQStringList delegates = TQStringList::split( ' ', data );
for ( uint i = 0; i < delegates.count(); ++i ) {
- QStringList delegate = QStringList::split( ':', delegates[ i ] );
+ TQStringList delegate = TQStringList::split( ':', delegates[ i ] );
- const QString email = delegate[ 0 ];
+ const TQString email = delegate[ 0 ];
int rights = 0;
- QStringList rightsList = QStringList::split( ',', delegate[ 1 ] );
+ TQStringList rightsList = TQStringList::split( ',', delegate[ 1 ] );
for ( uint j = 0; j < rightsList.count(); ++j ) {
if ( rightsList[ j ] == "SOBO" )
rights |= SendOnBehalfOf;
@@ -246,43 +246,43 @@ void GetDelegatesJob::slotInfoMessage( KIO::Job*, const QString &data )
}
}
-AddOtherUserJob::AddOtherUserJob( const KURL& url, const QByteArray &packedArgs, bool showProgressInfo )
+AddOtherUserJob::AddOtherUserJob( const KURL& url, const TQByteArray &packedArgs, bool showProgressInfo )
: KIO::SimpleJob( url, KIO::CMD_SPECIAL, packedArgs, showProgressInfo )
{
}
-DeleteOtherUserJob::DeleteOtherUserJob( const KURL& url, const QByteArray &packedArgs, bool showProgressInfo )
+DeleteOtherUserJob::DeleteOtherUserJob( const KURL& url, const TQByteArray &packedArgs, bool showProgressInfo )
: KIO::SimpleJob( url, KIO::CMD_SPECIAL, packedArgs, showProgressInfo )
{
}
-GetOtherUsersJob::GetOtherUsersJob( const KURL& url, const QByteArray &packedArgs, bool showProgressInfo )
+GetOtherUsersJob::GetOtherUsersJob( const KURL& url, const TQByteArray &packedArgs, bool showProgressInfo )
: KIO::SimpleJob( url, KIO::CMD_SPECIAL, packedArgs, showProgressInfo )
{
- connect( this, SIGNAL( infoMessage( KIO::Job*, const QString& ) ),
- this, SLOT( slotInfoMessage( KIO::Job*, const QString& ) ) );
+ connect( this, TQT_SIGNAL( infoMessage( KIO::Job*, const TQString& ) ),
+ this, TQT_SLOT( slotInfoMessage( KIO::Job*, const TQString& ) ) );
}
-QStringList GetOtherUsersJob::otherUsers() const
+TQStringList GetOtherUsersJob::otherUsers() const
{
return mOtherUsers;
}
-void GetOtherUsersJob::slotInfoMessage( KIO::Job*, const QString &data )
+void GetOtherUsersJob::slotInfoMessage( KIO::Job*, const TQString &data )
{
- mOtherUsers = QStringList::split( ' ', data );
+ mOtherUsers = TQStringList::split( ' ', data );
}
-SetOutOfOfficeJob::SetOutOfOfficeJob( const KURL& url, const QByteArray &packedArgs, bool showProgressInfo )
+SetOutOfOfficeJob::SetOutOfOfficeJob( const KURL& url, const TQByteArray &packedArgs, bool showProgressInfo )
: KIO::SimpleJob( url, KIO::CMD_SPECIAL, packedArgs, showProgressInfo )
{
}
-GetOutOfOfficeJob::GetOutOfOfficeJob( const KURL& url, const QByteArray &packedArgs, bool showProgressInfo )
+GetOutOfOfficeJob::GetOutOfOfficeJob( const KURL& url, const TQByteArray &packedArgs, bool showProgressInfo )
: KIO::SimpleJob( url, KIO::CMD_SPECIAL, packedArgs, showProgressInfo )
{
- connect( this, SIGNAL( infoMessage( KIO::Job*, const QString& ) ),
- this, SLOT( slotInfoMessage( KIO::Job*, const QString& ) ) );
+ connect( this, TQT_SIGNAL( infoMessage( KIO::Job*, const TQString& ) ),
+ this, TQT_SLOT( slotInfoMessage( KIO::Job*, const TQString& ) ) );
}
bool GetOutOfOfficeJob::enabled() const
@@ -290,14 +290,14 @@ bool GetOutOfOfficeJob::enabled() const
return mEnabled;
}
-QString GetOutOfOfficeJob::message() const
+TQString GetOutOfOfficeJob::message() const
{
return mMessage;
}
-void GetOutOfOfficeJob::slotInfoMessage( KIO::Job*, const QString &data )
+void GetOutOfOfficeJob::slotInfoMessage( KIO::Job*, const TQString &data )
{
- const QStringList fields = QStringList::split( '^', data );
+ const TQStringList fields = TQStringList::split( '^', data );
mEnabled = ( fields[ 0 ] == "ENABLED" );
mMessage = fields[ 1 ];
diff --git a/kresources/scalix/scalixadmin/jobs.h b/kresources/scalix/scalixadmin/jobs.h
index 3b5a1b81f..24ce1c020 100644
--- a/kresources/scalix/scalixadmin/jobs.h
+++ b/kresources/scalix/scalixadmin/jobs.h
@@ -46,37 +46,37 @@ namespace Scalix {
class Delegate
{
public:
- typedef QValueList<Delegate> List;
+ typedef TQValueList<Delegate> List;
Delegate();
- Delegate( const QString &email, int rights );
+ Delegate( const TQString &email, int rights );
bool isValid() const;
- QString email() const;
+ TQString email() const;
int rights() const;
- static QString rightsAsString( int rights );
+ static TQString rightsAsString( int rights );
private:
- QString mEmail;
+ TQString mEmail;
int mRights;
};
/**
* Sets/Changes the password of the user encoded in @p url.
*/
- SetPasswordJob* setPassword( KIO::Slave* slave, const KURL& url, const QString& oldPassword, const QString& newPassword );
+ SetPasswordJob* setPassword( KIO::Slave* slave, const KURL& url, const TQString& oldPassword, const TQString& newPassword );
/**
* Adds a delegate represented by @p email with the given @p params for the user encoded in @p url.
*/
- SetDelegateJob* setDelegate( KIO::Slave* slave, const KURL& url, const QString& email, int params );
+ SetDelegateJob* setDelegate( KIO::Slave* slave, const KURL& url, const TQString& email, int params );
/**
* Deletes the delegate represented by @p email for the user encoded in @p url.
*/
- DeleteDelegateJob* deleteDelegate( KIO::Slave* slave, const KURL& url, const QString& email );
+ DeleteDelegateJob* deleteDelegate( KIO::Slave* slave, const KURL& url, const TQString& email );
/**
* Retrieves the delegates for the user encoded in @p url.
@@ -86,12 +86,12 @@ namespace Scalix {
/**
* Adds the mailbox of another user represented by @p email to the users 'Other Users' namespace.
*/
- AddOtherUserJob* addOtherUser( KIO::Slave* slave, const KURL& url, const QString& email );
+ AddOtherUserJob* addOtherUser( KIO::Slave* slave, const KURL& url, const TQString& email );
/**
* Deletes the mailbox of another user represented by @p email from the users 'Other Users' namespace.
*/
- DeleteOtherUserJob* deleteOtherUser( KIO::Slave* slave, const KURL& url, const QString& email );
+ DeleteOtherUserJob* deleteOtherUser( KIO::Slave* slave, const KURL& url, const TQString& email );
/**
* Retrieves the list of all other users.
@@ -104,7 +104,7 @@ namespace Scalix {
* @param enabled Whether the out-of-office functionality is enabled.
* @param msg The out-of-office message.
*/
- SetOutOfOfficeJob* setOutOfOffice( KIO::Slave* slave, const KURL& url, bool enabled, const QString& msg );
+ SetOutOfOfficeJob* setOutOfOffice( KIO::Slave* slave, const KURL& url, bool enabled, const TQString& msg );
/**
* Retrieves the out-of-office data.
@@ -115,19 +115,19 @@ namespace Scalix {
class SetPasswordJob : public KIO::SimpleJob
{
public:
- SetPasswordJob( const KURL& url, const QByteArray &packedArgs, bool showProgressInfo );
+ SetPasswordJob( const KURL& url, const TQByteArray &packedArgs, bool showProgressInfo );
};
class SetDelegateJob : public KIO::SimpleJob
{
public:
- SetDelegateJob( const KURL& url, const QByteArray &packedArgs, bool showProgressInfo );
+ SetDelegateJob( const KURL& url, const TQByteArray &packedArgs, bool showProgressInfo );
};
class DeleteDelegateJob : public KIO::SimpleJob
{
public:
- DeleteDelegateJob( const KURL& url, const QByteArray &packedArgs, bool showProgressInfo );
+ DeleteDelegateJob( const KURL& url, const TQByteArray &packedArgs, bool showProgressInfo );
};
class GetDelegatesJob : public KIO::SimpleJob
@@ -135,12 +135,12 @@ namespace Scalix {
Q_OBJECT
public:
- GetDelegatesJob( const KURL& url, const QByteArray &packedArgs, bool showProgressInfo );
+ GetDelegatesJob( const KURL& url, const TQByteArray &packedArgs, bool showProgressInfo );
Delegate::List delegates() const;
private slots:
- void slotInfoMessage( KIO::Job*, const QString& );
+ void slotInfoMessage( KIO::Job*, const TQString& );
private:
Delegate::List mDelegates;
@@ -149,13 +149,13 @@ namespace Scalix {
class AddOtherUserJob : public KIO::SimpleJob
{
public:
- AddOtherUserJob( const KURL& url, const QByteArray &packedArgs, bool showProgressInfo );
+ AddOtherUserJob( const KURL& url, const TQByteArray &packedArgs, bool showProgressInfo );
};
class DeleteOtherUserJob : public KIO::SimpleJob
{
public:
- DeleteOtherUserJob( const KURL& url, const QByteArray &packedArgs, bool showProgressInfo );
+ DeleteOtherUserJob( const KURL& url, const TQByteArray &packedArgs, bool showProgressInfo );
};
class GetOtherUsersJob : public KIO::SimpleJob
@@ -163,21 +163,21 @@ namespace Scalix {
Q_OBJECT
public:
- GetOtherUsersJob( const KURL& url, const QByteArray &packedArgs, bool showProgressInfo );
+ GetOtherUsersJob( const KURL& url, const TQByteArray &packedArgs, bool showProgressInfo );
- QStringList otherUsers() const;
+ TQStringList otherUsers() const;
private slots:
- void slotInfoMessage( KIO::Job*, const QString& );
+ void slotInfoMessage( KIO::Job*, const TQString& );
private:
- QStringList mOtherUsers;
+ TQStringList mOtherUsers;
};
class SetOutOfOfficeJob : public KIO::SimpleJob
{
public:
- SetOutOfOfficeJob( const KURL& url, const QByteArray &packedArgs, bool showProgressInfo );
+ SetOutOfOfficeJob( const KURL& url, const TQByteArray &packedArgs, bool showProgressInfo );
};
class GetOutOfOfficeJob : public KIO::SimpleJob
@@ -185,17 +185,17 @@ namespace Scalix {
Q_OBJECT
public:
- GetOutOfOfficeJob( const KURL& url, const QByteArray &packedArgs, bool showProgressInfo );
+ GetOutOfOfficeJob( const KURL& url, const TQByteArray &packedArgs, bool showProgressInfo );
bool enabled() const;
- QString message() const;
+ TQString message() const;
private slots:
- void slotInfoMessage( KIO::Job*, const QString& );
+ void slotInfoMessage( KIO::Job*, const TQString& );
private:
bool mEnabled;
- QString mMessage;
+ TQString mMessage;
};
}
diff --git a/kresources/scalix/scalixadmin/ldapdialog.cpp b/kresources/scalix/scalixadmin/ldapdialog.cpp
index be624f131..6af08c4d7 100644
--- a/kresources/scalix/scalixadmin/ldapdialog.cpp
+++ b/kresources/scalix/scalixadmin/ldapdialog.cpp
@@ -24,7 +24,7 @@
#include "ldapdialog.h"
-LdapDialog::LdapDialog( QWidget *parent )
+LdapDialog::LdapDialog( TQWidget *parent )
: KDialogBase( parent, "", true, "", Ok | Cancel, Ok, true )
{
setCaption( i18n( "User Account Selection" ) );
@@ -37,7 +37,7 @@ LdapDialog::LdapDialog( QWidget *parent )
resize( 400, 250 );
}
-QString LdapDialog::selectedUser() const
+TQString LdapDialog::selectedUser() const
{
return mView->selectedUser();
}
diff --git a/kresources/scalix/scalixadmin/ldapdialog.h b/kresources/scalix/scalixadmin/ldapdialog.h
index 6b326f550..9d822af19 100644
--- a/kresources/scalix/scalixadmin/ldapdialog.h
+++ b/kresources/scalix/scalixadmin/ldapdialog.h
@@ -27,9 +27,9 @@ class LdapView;
class LdapDialog : public KDialogBase
{
public:
- LdapDialog( QWidget *parent = 0 );
+ LdapDialog( TQWidget *parent = 0 );
- QString selectedUser() const;
+ TQString selectedUser() const;
private:
diff --git a/kresources/scalix/scalixadmin/ldapview.cpp b/kresources/scalix/scalixadmin/ldapview.cpp
index 660f1944a..0e40f3ae6 100644
--- a/kresources/scalix/scalixadmin/ldapview.cpp
+++ b/kresources/scalix/scalixadmin/ldapview.cpp
@@ -29,8 +29,8 @@
class LdapItem : public QListViewItem
{
public:
- LdapItem( QListView *parent, const QString &text, const QString &email )
- : QListViewItem( parent )
+ LdapItem( TQListView *parent, const TQString &text, const TQString &email )
+ : TQListViewItem( parent )
{
setText( 0, text );
setText( 1, email );
@@ -38,7 +38,7 @@ class LdapItem : public QListViewItem
};
-LdapView::LdapView( QWidget *parent )
+LdapView::LdapView( TQWidget *parent )
: KListView( parent )
{
addColumn( i18n( "User" ) );
@@ -52,14 +52,14 @@ LdapView::LdapView( QWidget *parent )
mClient->setBindDN( Settings::self()->ldapBindDn() );
mClient->setPwdBindDN( Settings::self()->ldapPassword() );
- QStringList attrs;
+ TQStringList attrs;
attrs << "surname" << "mail";
mClient->setAttrs( attrs );
- connect( mClient, SIGNAL( result( const KABC::LdapObject& ) ),
- this, SLOT( entryAdded( const KABC::LdapObject& ) ) );
- connect( mClient, SIGNAL( error( const QString& ) ),
- this, SLOT( error( const QString& ) ) );
+ connect( mClient, TQT_SIGNAL( result( const KABC::LdapObject& ) ),
+ this, TQT_SLOT( entryAdded( const KABC::LdapObject& ) ) );
+ connect( mClient, TQT_SIGNAL( error( const TQString& ) ),
+ this, TQT_SLOT( error( const TQString& ) ) );
}
LdapView::~LdapView()
@@ -68,16 +68,16 @@ LdapView::~LdapView()
delete mClient;
}
-QString LdapView::selectedUser() const
+TQString LdapView::selectedUser() const
{
- QListViewItem *item = selectedItem();
+ TQListViewItem *item = selectedItem();
if ( !item )
- return QString();
+ return TQString();
else
return item->text( 1 );
}
-void LdapView::setQuery( const QString &query )
+void LdapView::setQuery( const TQString &query )
{
clear();
mClient->startQuery( query );
@@ -85,13 +85,13 @@ void LdapView::setQuery( const QString &query )
void LdapView::entryAdded( const KABC::LdapObject &obj )
{
- const QString text = QString( "%1 (%2)" ).arg( obj.attrs[ "surname" ].first() )
+ const TQString text = TQString( "%1 (%2)" ).arg( obj.attrs[ "surname" ].first() )
.arg( obj.attrs[ "mail" ].first() );
new LdapItem( this, text, obj.attrs[ "mail" ].first() );
}
-void LdapView::error( const QString &msg )
+void LdapView::error( const TQString &msg )
{
KMessageBox::error( this, msg );
}
diff --git a/kresources/scalix/scalixadmin/ldapview.h b/kresources/scalix/scalixadmin/ldapview.h
index 0acb3602c..4616e11ce 100644
--- a/kresources/scalix/scalixadmin/ldapview.h
+++ b/kresources/scalix/scalixadmin/ldapview.h
@@ -32,17 +32,17 @@ class LdapView : public KListView
Q_OBJECT
public:
- LdapView( QWidget *parent = 0 );
+ LdapView( TQWidget *parent = 0 );
~LdapView();
- QString selectedUser() const;
+ TQString selectedUser() const;
public slots:
- void setQuery( const QString &query );
+ void setQuery( const TQString &query );
private slots:
void entryAdded( const KABC::LdapObject& );
- void error( const QString& );
+ void error( const TQString& );
private:
KABC::LdapClient *mClient;
diff --git a/kresources/scalix/scalixadmin/mainwindow.cpp b/kresources/scalix/scalixadmin/mainwindow.cpp
index e6cac550d..4f3dbf94b 100644
--- a/kresources/scalix/scalixadmin/mainwindow.cpp
+++ b/kresources/scalix/scalixadmin/mainwindow.cpp
@@ -18,7 +18,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#include <qvbox.h>
+#include <tqvbox.h>
#include <kglobal.h>
#include <kiconloader.h>
@@ -37,8 +37,8 @@ MainWindow::MainWindow()
{
KJanusWidget *wdg = new KJanusWidget( this, "", KJanusWidget::IconList );
- QPixmap icon = KGlobal::iconLoader()->loadIcon( "folder_yellow", KIcon::Desktop );
- QVBox *page = wdg->addVBoxPage( i18n( "Other Accounts" ), i18n( "Register other accounts" ), icon );
+ TQPixmap icon = KGlobal::iconLoader()->loadIcon( "folder_yellow", KIcon::Desktop );
+ TQVBox *page = wdg->addVBoxPage( i18n( "Other Accounts" ), i18n( "Register other accounts" ), icon );
new OtherUserPage( page );
icon = KGlobal::iconLoader()->loadIcon( "edu_languages", KIcon::Desktop );
diff --git a/kresources/scalix/scalixadmin/otherusermanager.cpp b/kresources/scalix/scalixadmin/otherusermanager.cpp
index b5b3d3ccf..a3c19de12 100644
--- a/kresources/scalix/scalixadmin/otherusermanager.cpp
+++ b/kresources/scalix/scalixadmin/otherusermanager.cpp
@@ -28,7 +28,7 @@ OtherUserManager::~OtherUserManager()
{
}
-void OtherUserManager::addOtherUser( const QString &email )
+void OtherUserManager::addOtherUser( const TQString &email )
{
if ( !mOtherUsers.contains( email ) ) {
mOtherUsers.append( email );
@@ -43,7 +43,7 @@ void OtherUserManager::clear()
emit changed();
}
-QStringList OtherUserManager::otherUsers() const
+TQStringList OtherUserManager::otherUsers() const
{
return mOtherUsers;
}
diff --git a/kresources/scalix/scalixadmin/otherusermanager.h b/kresources/scalix/scalixadmin/otherusermanager.h
index 6f7f9ac77..90d7195a4 100644
--- a/kresources/scalix/scalixadmin/otherusermanager.h
+++ b/kresources/scalix/scalixadmin/otherusermanager.h
@@ -21,8 +21,8 @@
#ifndef OTHERUSERMANAGER_H
#define OTHERUSERMANAGER_H
-#include <qobject.h>
-#include <qstringlist.h>
+#include <tqobject.h>
+#include <tqstringlist.h>
class OtherUserManager : public QObject
{
@@ -32,16 +32,16 @@ class OtherUserManager : public QObject
OtherUserManager();
~OtherUserManager();
- void addOtherUser( const QString &email );
+ void addOtherUser( const TQString &email );
void clear();
- QStringList otherUsers() const;
+ TQStringList otherUsers() const;
signals:
void changed();
private:
- QStringList mOtherUsers;
+ TQStringList mOtherUsers;
};
#endif
diff --git a/kresources/scalix/scalixadmin/otheruserpage.cpp b/kresources/scalix/scalixadmin/otheruserpage.cpp
index ae12290c7..8570cab06 100644
--- a/kresources/scalix/scalixadmin/otheruserpage.cpp
+++ b/kresources/scalix/scalixadmin/otheruserpage.cpp
@@ -18,9 +18,9 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#include <qapplication.h>
-#include <qlayout.h>
-#include <qpushbutton.h>
+#include <tqapplication.h>
+#include <tqlayout.h>
+#include <tqpushbutton.h>
#include <dcopref.h>
#include <kdcopservicestarter.h>
@@ -37,24 +37,24 @@
#include "otheruserpage.h"
-OtherUserPage::OtherUserPage( QWidget *parent )
- : QWidget( parent )
+OtherUserPage::OtherUserPage( TQWidget *parent )
+ : TQWidget( parent )
{
- QGridLayout *layout = new QGridLayout( this, 2, 2, 11, 6 );
+ TQGridLayout *layout = new TQGridLayout( this, 2, 2, 11, 6 );
mView = new OtherUserView( &mManager, this );
layout->addMultiCellWidget( mView, 0, 0, 0, 1 );
- mAddButton = new QPushButton( i18n( "Add Account..." ), this );
+ mAddButton = new TQPushButton( i18n( "Add Account..." ), this );
layout->addWidget( mAddButton, 1, 0 );
- mDeleteButton = new QPushButton( i18n( "Remove Account" ), this );
+ mDeleteButton = new TQPushButton( i18n( "Remove Account" ), this );
mDeleteButton->setEnabled( false );
layout->addWidget( mDeleteButton, 1, 1 );
- connect( mView, SIGNAL( selectionChanged() ), SLOT( selectionChanged() ) );
- connect( mAddButton, SIGNAL( clicked() ), SLOT( addUser() ) );
- connect( mDeleteButton, SIGNAL( clicked() ), SLOT( removeUser() ) );
+ connect( mView, TQT_SIGNAL( selectionChanged() ), TQT_SLOT( selectionChanged() ) );
+ connect( mAddButton, TQT_SIGNAL( clicked() ), TQT_SLOT( addUser() ) );
+ connect( mDeleteButton, TQT_SIGNAL( clicked() ), TQT_SLOT( removeUser() ) );
loadAllUsers();
}
@@ -67,7 +67,7 @@ void OtherUserPage::loadAllUsers()
{
Scalix::GetOtherUsersJob *job = Scalix::getOtherUsers( Settings::self()->globalSlave(),
Settings::self()->accountUrl() );
- connect( job, SIGNAL( result( KIO::Job* ) ), SLOT( allUsers( KIO::Job* ) ) );
+ connect( job, TQT_SIGNAL( result( KIO::Job* ) ), TQT_SLOT( allUsers( KIO::Job* ) ) );
}
void OtherUserPage::addUser()
@@ -76,24 +76,24 @@ void OtherUserPage::addUser()
if ( !dlg.exec() )
return;
- const QString email = dlg.selectedUser();
+ const TQString email = dlg.selectedUser();
if ( email.isEmpty() )
return;
Scalix::AddOtherUserJob *job = Scalix::addOtherUser( Settings::self()->globalSlave(),
Settings::self()->accountUrl(), email );
- connect( job, SIGNAL( result( KIO::Job* ) ), SLOT( userAdded( KIO::Job* ) ) );
+ connect( job, TQT_SIGNAL( result( KIO::Job* ) ), TQT_SLOT( userAdded( KIO::Job* ) ) );
}
void OtherUserPage::removeUser()
{
- const QString email = mView->selectedUser();
+ const TQString email = mView->selectedUser();
if ( email.isEmpty() )
return;
Scalix::DeleteOtherUserJob *job = Scalix::deleteOtherUser( Settings::self()->globalSlave(),
Settings::self()->accountUrl(), email );
- connect( job, SIGNAL( result( KIO::Job* ) ), SLOT( userRemoved( KIO::Job* ) ) );
+ connect( job, TQT_SIGNAL( result( KIO::Job* ) ), TQT_SLOT( userRemoved( KIO::Job* ) ) );
}
void OtherUserPage::allUsers( KIO::Job *job )
@@ -105,7 +105,7 @@ void OtherUserPage::allUsers( KIO::Job *job )
mManager.clear();
- const QStringList users = userJob->otherUsers();
+ const TQStringList users = userJob->otherUsers();
for ( uint i = 0; i < users.count(); ++i )
mManager.addOtherUser( users[ i ] );
@@ -139,18 +139,18 @@ void OtherUserPage::selectionChanged()
void OtherUserPage::updateKmail()
{
- QMessageBox *msg = new QMessageBox( qApp->mainWidget() );
+ TQMessageBox *msg = new TQMessageBox( qApp->mainWidget() );
msg->setText( i18n( "Updating account..." ) );
msg->show();
qApp->processEvents();
sleep( 1 );
qApp->processEvents();
- QString error;
- QCString dcopService;
+ TQString error;
+ TQCString dcopService;
int result = KDCOPServiceStarter::self()->
- findServiceFor( "DCOP/ResourceBackend/IMAP", QString::null,
- QString::null, &error, &dcopService );
+ findServiceFor( "DCOP/ResourceBackend/IMAP", TQString::null,
+ TQString::null, &error, &dcopService );
if ( result != 0 ) {
KMessageBox::error( 0, i18n( "Unable to start KMail to trigger account update with Scalix server" ) );
delete msg;
@@ -160,12 +160,12 @@ void OtherUserPage::updateKmail()
DCOPRef ref( dcopService, "KMailIface" );
// loop until dcop iface is set up correctly
- QStringList list;
+ TQStringList list;
while ( list.isEmpty() ) {
ref.call( "accounts()" ).get( list );
}
- ref.call( "checkAccount(QString)", i18n( "Scalix Server" ) );
+ ref.call( "checkAccount(TQString)", i18n( "Scalix Server" ) );
delete msg;
}
diff --git a/kresources/scalix/scalixadmin/otheruserpage.h b/kresources/scalix/scalixadmin/otheruserpage.h
index f847a05d3..50e9292ca 100644
--- a/kresources/scalix/scalixadmin/otheruserpage.h
+++ b/kresources/scalix/scalixadmin/otheruserpage.h
@@ -21,7 +21,7 @@
#ifndef OTHERUSERPAGE_H
#define OTHERUSERPAGE_H
-#include <qwidget.h>
+#include <tqwidget.h>
#include "otherusermanager.h"
@@ -33,7 +33,7 @@ class OtherUserPage : public QWidget
Q_OBJECT
public:
- OtherUserPage( QWidget *parent = 0 );
+ OtherUserPage( TQWidget *parent = 0 );
~OtherUserPage();
private slots:
@@ -50,8 +50,8 @@ class OtherUserPage : public QWidget
private:
void updateKmail();
- QPushButton *mAddButton;
- QPushButton *mDeleteButton;
+ TQPushButton *mAddButton;
+ TQPushButton *mDeleteButton;
OtherUserManager mManager;
OtherUserView *mView;
diff --git a/kresources/scalix/scalixadmin/otheruserview.cpp b/kresources/scalix/scalixadmin/otheruserview.cpp
index 70bc9e3d5..19b9c3b65 100644
--- a/kresources/scalix/scalixadmin/otheruserview.cpp
+++ b/kresources/scalix/scalixadmin/otheruserview.cpp
@@ -27,43 +27,43 @@
class OtherUserItem : public QListViewItem
{
public:
- OtherUserItem( QListView *parent, const QString &user )
- : QListViewItem( parent ), mUser( user )
+ OtherUserItem( TQListView *parent, const TQString &user )
+ : TQListViewItem( parent ), mUser( user )
{
setText( 0, mUser );
}
- QString user() const { return mUser; }
+ TQString user() const { return mUser; }
private:
- QString mUser;
+ TQString mUser;
};
-OtherUserView::OtherUserView( OtherUserManager *manager, QWidget *parent )
+OtherUserView::OtherUserView( OtherUserManager *manager, TQWidget *parent )
: KListView( parent ), mManager( manager )
{
addColumn( i18n( "Registered Accounts" ) );
setFullWidth( true );
- connect( mManager, SIGNAL( changed() ), SLOT( userChanged() ) );
+ connect( mManager, TQT_SIGNAL( changed() ), TQT_SLOT( userChanged() ) );
userChanged();
}
-QString OtherUserView::selectedUser() const
+TQString OtherUserView::selectedUser() const
{
OtherUserItem *item = dynamic_cast<OtherUserItem*>( selectedItem() );
if ( item )
return item->user();
- return QString();
+ return TQString();
}
void OtherUserView::userChanged()
{
clear();
- QStringList users = mManager->otherUsers();
+ TQStringList users = mManager->otherUsers();
for ( uint i = 0; i < users.count(); ++i )
new OtherUserItem( this, users[ i ] );
}
diff --git a/kresources/scalix/scalixadmin/otheruserview.h b/kresources/scalix/scalixadmin/otheruserview.h
index 6eacc93c9..def14a84b 100644
--- a/kresources/scalix/scalixadmin/otheruserview.h
+++ b/kresources/scalix/scalixadmin/otheruserview.h
@@ -30,9 +30,9 @@ class OtherUserView : public KListView
Q_OBJECT
public:
- OtherUserView( OtherUserManager *manager, QWidget *parent = 0 );
+ OtherUserView( OtherUserManager *manager, TQWidget *parent = 0 );
- QString selectedUser() const;
+ TQString selectedUser() const;
private slots:
void userChanged();
diff --git a/kresources/scalix/scalixadmin/outofofficepage.cpp b/kresources/scalix/scalixadmin/outofofficepage.cpp
index 0b8d3f803..e1e331fc4 100644
--- a/kresources/scalix/scalixadmin/outofofficepage.cpp
+++ b/kresources/scalix/scalixadmin/outofofficepage.cpp
@@ -18,12 +18,12 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#include <qbuttongroup.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qpushbutton.h>
-#include <qradiobutton.h>
-#include <qtextedit.h>
+#include <tqbuttongroup.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqpushbutton.h>
+#include <tqradiobutton.h>
+#include <tqtextedit.h>
#include <klocale.h>
#include <kmessagebox.h>
@@ -33,20 +33,20 @@
#include "outofofficepage.h"
-OutOfOfficePage::OutOfOfficePage( QWidget *parent )
- : QWidget( parent )
+OutOfOfficePage::OutOfOfficePage( TQWidget *parent )
+ : TQWidget( parent )
{
- QGridLayout *layout = new QGridLayout( this, 4, 2, 11, 6 );
+ TQGridLayout *layout = new TQGridLayout( this, 4, 2, 11, 6 );
- QButtonGroup *group = new QButtonGroup( 1, Qt::Vertical, this );
+ TQButtonGroup *group = new TQButtonGroup( 1, Qt::Vertical, this );
- mDisabled = new QRadioButton( i18n( "I am in the office" ), group );
+ mDisabled = new TQRadioButton( i18n( "I am in the office" ), group );
mDisabled->setChecked( true );
- mEnabled = new QRadioButton( i18n( "I am out of the office" ), group );
+ mEnabled = new TQRadioButton( i18n( "I am out of the office" ), group );
- mLabel = new QLabel( i18n( "Auto-reply once to each sender with the following text:" ), this );
- mMessage = new QTextEdit( this );
- mSaveButton = new QPushButton( i18n( "Save" ), this );
+ mLabel = new TQLabel( i18n( "Auto-reply once to each sender with the following text:" ), this );
+ mMessage = new TQTextEdit( this );
+ mSaveButton = new TQPushButton( i18n( "Save" ), this );
layout->addMultiCellWidget( group, 0, 0, 0, 1 );
layout->addMultiCellWidget( mLabel, 1, 1, 0, 1 );
@@ -55,10 +55,10 @@ OutOfOfficePage::OutOfOfficePage( QWidget *parent )
statusChanged();
- connect( mEnabled, SIGNAL( toggled( bool ) ), this, SLOT( statusChanged() ) );
- connect( mEnabled, SIGNAL( toggled( bool ) ), this, SLOT( changed() ) );
- connect( mSaveButton, SIGNAL( clicked() ), this, SLOT( store() ) );
- connect( mMessage, SIGNAL( textChanged() ), this, SLOT( changed() ) );
+ connect( mEnabled, TQT_SIGNAL( toggled( bool ) ), this, TQT_SLOT( statusChanged() ) );
+ connect( mEnabled, TQT_SIGNAL( toggled( bool ) ), this, TQT_SLOT( changed() ) );
+ connect( mSaveButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( store() ) );
+ connect( mMessage, TQT_SIGNAL( textChanged() ), this, TQT_SLOT( changed() ) );
load();
}
@@ -71,7 +71,7 @@ void OutOfOfficePage::load()
{
Scalix::GetOutOfOfficeJob *job = Scalix::getOutOfOffice( Settings::self()->globalSlave(),
Settings::self()->accountUrl() );
- connect( job, SIGNAL( result( KIO::Job* ) ), SLOT( loaded( KIO::Job* ) ) );
+ connect( job, TQT_SIGNAL( result( KIO::Job* ) ), TQT_SLOT( loaded( KIO::Job* ) ) );
}
void OutOfOfficePage::loaded( KIO::Job* job )
@@ -98,7 +98,7 @@ void OutOfOfficePage::store()
mEnabled->isChecked(),
mMessage->text() );
- connect( job, SIGNAL( result( KIO::Job* ) ), SLOT( stored( KIO::Job* ) ) );
+ connect( job, TQT_SIGNAL( result( KIO::Job* ) ), TQT_SLOT( stored( KIO::Job* ) ) );
mSaveButton->setEnabled( false );
}
diff --git a/kresources/scalix/scalixadmin/outofofficepage.h b/kresources/scalix/scalixadmin/outofofficepage.h
index cc5b2591a..cd5f04915 100644
--- a/kresources/scalix/scalixadmin/outofofficepage.h
+++ b/kresources/scalix/scalixadmin/outofofficepage.h
@@ -21,7 +21,7 @@
#ifndef OUTOFOFFICEPAGE_H
#define OUTOFOFFICEPAGE_H
-#include <qwidget.h>
+#include <tqwidget.h>
class QLabel;
class QPushButton;
@@ -33,7 +33,7 @@ class OutOfOfficePage : public QWidget
Q_OBJECT
public:
- OutOfOfficePage( QWidget *parent = 0 );
+ OutOfOfficePage( TQWidget *parent = 0 );
~OutOfOfficePage();
private slots:
@@ -45,11 +45,11 @@ class OutOfOfficePage : public QWidget
void changed();
private:
- QRadioButton *mEnabled;
- QRadioButton *mDisabled;
- QLabel *mLabel;
- QTextEdit *mMessage;
- QPushButton *mSaveButton;
+ TQRadioButton *mEnabled;
+ TQRadioButton *mDisabled;
+ TQLabel *mLabel;
+ TQTextEdit *mMessage;
+ TQPushButton *mSaveButton;
bool mChanged;
};
diff --git a/kresources/scalix/scalixadmin/passwordpage.cpp b/kresources/scalix/scalixadmin/passwordpage.cpp
index 7d4182348..facc29170 100644
--- a/kresources/scalix/scalixadmin/passwordpage.cpp
+++ b/kresources/scalix/scalixadmin/passwordpage.cpp
@@ -18,11 +18,11 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#include <qapplication.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qlineedit.h>
-#include <qpushbutton.h>
+#include <tqapplication.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqlineedit.h>
+#include <tqpushbutton.h>
#include <kconfig.h>
#include <klocale.h>
@@ -35,36 +35,36 @@
#include "passwordpage.h"
-PasswordPage::PasswordPage( QWidget *parent )
- : QWidget( parent ), mJob( 0 )
+PasswordPage::PasswordPage( TQWidget *parent )
+ : TQWidget( parent ), mJob( 0 )
{
- QGridLayout *layout = new QGridLayout( this, 2, 3, 11, 6 );
+ TQGridLayout *layout = new TQGridLayout( this, 2, 3, 11, 6 );
- QLabel *label = new QLabel( i18n( "New password:" ), this );
+ TQLabel *label = new TQLabel( i18n( "New password:" ), this );
layout->addWidget( label, 0, 0 );
- mPassword = new QLineEdit( this );
- mPassword->setEchoMode( QLineEdit::Password );
+ mPassword = new TQLineEdit( this );
+ mPassword->setEchoMode( TQLineEdit::Password );
label->setBuddy( mPassword );
layout->addWidget( mPassword, 0, 1 );
- label = new QLabel( i18n( "Retype new password:" ), this );
+ label = new TQLabel( i18n( "Retype new password:" ), this );
layout->addWidget( label, 1, 0 );
- mPasswordRetype = new QLineEdit( this );
- mPasswordRetype->setEchoMode( QLineEdit::Password );
+ mPasswordRetype = new TQLineEdit( this );
+ mPasswordRetype->setEchoMode( TQLineEdit::Password );
label->setBuddy( mPasswordRetype );
layout->addWidget( mPasswordRetype, 1, 1 );
- mButton = new QPushButton( i18n( "Change" ), this );
+ mButton = new TQPushButton( i18n( "Change" ), this );
mButton->setEnabled( false );
layout->addWidget( mButton, 2, 1 );
layout->setRowSpacing( 3, 1 );
- connect( mPassword, SIGNAL( textChanged( const QString& ) ), this, SLOT( textChanged() ) );
- connect( mPasswordRetype, SIGNAL( textChanged( const QString& ) ), this, SLOT( textChanged() ) );
- connect( mButton, SIGNAL( clicked() ), this, SLOT( buttonClicked() ) );
+ connect( mPassword, TQT_SIGNAL( textChanged( const TQString& ) ), this, TQT_SLOT( textChanged() ) );
+ connect( mPasswordRetype, TQT_SIGNAL( textChanged( const TQString& ) ), this, TQT_SLOT( textChanged() ) );
+ connect( mButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( buttonClicked() ) );
}
void PasswordPage::buttonClicked()
@@ -77,7 +77,7 @@ void PasswordPage::buttonClicked()
mJob = Scalix::setPassword( Settings::self()->globalSlave(), Settings::self()->accountUrl(),
Settings::self()->accountPassword(), mPassword->text() );
- connect( mJob, SIGNAL( result( KIO::Job* ) ), this, SLOT( finished( KIO::Job* ) ) );
+ connect( mJob, TQT_SIGNAL( result( KIO::Job* ) ), this, TQT_SLOT( finished( KIO::Job* ) ) );
updateState( true );
} else {
@@ -120,7 +120,7 @@ void PasswordPage::finished( KIO::Job* job )
// Update configuration files to the new password as well
- const QString newPassword = mPassword->text();
+ const TQString newPassword = mPassword->text();
{ // ScalixAdmin config
KConfig config( "scalixadminrc" );
@@ -138,8 +138,8 @@ void PasswordPage::finished( KIO::Job* job )
KConfig config( "kmailrc" );
// Try to find account group for Scalix
- QString scalixAccount;
- const QStringList groupList = config.groupList();
+ TQString scalixAccount;
+ const TQStringList groupList = config.groupList();
for ( uint i = 0; i < groupList.count(); ++i ) {
if ( groupList[ i ].startsWith( "Account " ) ) {
KConfigGroup group( &config, groupList[ i ] );
@@ -173,13 +173,13 @@ void PasswordPage::finished( KIO::Job* job )
if ( !wallet->hasFolder( "kmail" ) )
wallet->createFolder( "kmail" );
wallet->setFolder( "kmail" );
- wallet->writePassword( "account-" + QString::number( accountId ), newPassword );
+ wallet->writePassword( "account-" + TQString::number( accountId ), newPassword );
}
} else {
group.writeEntry( "pass", KStringHandler::obscure( newPassword ) );
}
- KConfigGroup fileGroup( &config, QString( "Folder-%1" ).arg( group.readNumEntry( "Folder" ) ) );
+ KConfigGroup fileGroup( &config, TQString( "Folder-%1" ).arg( group.readNumEntry( "Folder" ) ) );
fileGroup.writeEntry( "pass", KStringHandler::obscure( newPassword ) );
}
}
diff --git a/kresources/scalix/scalixadmin/passwordpage.h b/kresources/scalix/scalixadmin/passwordpage.h
index a397be416..b4cf3da00 100644
--- a/kresources/scalix/scalixadmin/passwordpage.h
+++ b/kresources/scalix/scalixadmin/passwordpage.h
@@ -21,7 +21,7 @@
#ifndef PASSWORDPAGE_H
#define PASSWORDPAGE_H
-#include <qwidget.h>
+#include <tqwidget.h>
class QLineEdit;
class QPushButton;
@@ -35,7 +35,7 @@ class PasswordPage : public QWidget
Q_OBJECT
public:
- PasswordPage( QWidget *parent = 0 );
+ PasswordPage( TQWidget *parent = 0 );
private slots:
void buttonClicked();
@@ -45,9 +45,9 @@ class PasswordPage : public QWidget
private:
void updateState( bool );
- QLineEdit *mPassword;
- QLineEdit *mPasswordRetype;
- QPushButton *mButton;
+ TQLineEdit *mPassword;
+ TQLineEdit *mPasswordRetype;
+ TQPushButton *mButton;
KIO::Job *mJob;
};
diff --git a/kresources/scalix/scalixadmin/settings.cpp b/kresources/scalix/scalixadmin/settings.cpp
index 2f6b49bad..52f72296f 100644
--- a/kresources/scalix/scalixadmin/settings.cpp
+++ b/kresources/scalix/scalixadmin/settings.cpp
@@ -71,7 +71,7 @@ KURL Settings::accountUrl() const
return url;
}
-QString Settings::accountPassword() const
+TQString Settings::accountPassword() const
{
KConfig config( "scalixadminrc" );
KConfigGroup group( &config, "Account" );
@@ -84,50 +84,50 @@ KIO::Slave* Settings::globalSlave() const
return mSlave;
}
-QString Settings::rulesWizardUrl() const
+TQString Settings::rulesWizardUrl() const
{
KConfig config( "scalixadminrc" );
KConfigGroup group( &config, "Misc" );
- QString url = group.readEntry( "rulesWizardUrl" );
+ TQString url = group.readEntry( "rulesWizardUrl" );
if ( url.isEmpty() ) {
KConfigGroup group( &config, "Account" );
- url = QString( "http://%1/Scalix/rw/?username=%2" ).arg( group.readEntry( "host" ) )
+ url = TQString( "http://%1/Scalix/rw/?username=%2" ).arg( group.readEntry( "host" ) )
.arg( group.readEntry( "user" ) );
}
return url;
}
-QString Settings::ldapHost() const
+TQString Settings::ldapHost() const
{
KConfig config( "scalixadminrc" );
KConfigGroup group( &config, "LDAP" );
return group.readEntry( "host" );
}
-QString Settings::ldapPort() const
+TQString Settings::ldapPort() const
{
KConfig config( "scalixadminrc" );
KConfigGroup group( &config, "LDAP" );
return group.readEntry( "port" );
}
-QString Settings::ldapBase() const
+TQString Settings::ldapBase() const
{
KConfig config( "scalixadminrc" );
KConfigGroup group( &config, "LDAP" );
return group.readEntry( "base" );
}
-QString Settings::ldapBindDn() const
+TQString Settings::ldapBindDn() const
{
KConfig config( "scalixadminrc" );
KConfigGroup group( &config, "LDAP" );
return group.readEntry( "bindDn" );
}
-QString Settings::ldapPassword() const
+TQString Settings::ldapPassword() const
{
KConfig config( "scalixadminrc" );
KConfigGroup group( &config, "LDAP" );
diff --git a/kresources/scalix/scalixadmin/settings.h b/kresources/scalix/scalixadmin/settings.h
index 17ed9a2c9..1e36833ad 100644
--- a/kresources/scalix/scalixadmin/settings.h
+++ b/kresources/scalix/scalixadmin/settings.h
@@ -34,17 +34,17 @@ class Settings
KIO::MetaData accountData() const;
KURL accountUrl() const;
- QString accountPassword() const;
+ TQString accountPassword() const;
KIO::Slave *globalSlave() const;
- QString rulesWizardUrl() const;
+ TQString rulesWizardUrl() const;
- QString ldapHost() const;
- QString ldapPort() const;
- QString ldapBase() const;
- QString ldapBindDn() const;
- QString ldapPassword() const;
+ TQString ldapHost() const;
+ TQString ldapPort() const;
+ TQString ldapBase() const;
+ TQString ldapBindDn() const;
+ TQString ldapPassword() const;
private:
Settings();
diff --git a/kresources/scalix/shared/kmailconnection.cpp b/kresources/scalix/shared/kmailconnection.cpp
index af32cd74b..b4b4b9ebf 100644
--- a/kresources/scalix/shared/kmailconnection.cpp
+++ b/kresources/scalix/shared/kmailconnection.cpp
@@ -46,7 +46,7 @@ using namespace Scalix;
KMailConnection::KMailConnection( ResourceScalixBase* resource,
- const QCString& objId )
+ const TQCString& objId )
: DCOPObject( objId ), mResource( resource ), mKMailIcalIfaceStub( 0 )
{
// Make the connection to KMail ready
@@ -55,8 +55,8 @@ KMailConnection::KMailConnection( ResourceScalixBase* resource,
mDCOPClient->registerAs( objId, true );
kapp->dcopClient()->setNotifications( true );
- connect( kapp->dcopClient(), SIGNAL( applicationRemoved( const QCString& ) ),
- this, SLOT( unregisteredFromDCOP( const QCString& ) ) );
+ connect( kapp->dcopClient(), TQT_SIGNAL( applicationRemoved( const TQCString& ) ),
+ this, TQT_SLOT( unregisteredFromDCOP( const TQCString& ) ) );
}
KMailConnection::~KMailConnection()
@@ -68,15 +68,15 @@ KMailConnection::~KMailConnection()
mDCOPClient = 0;
}
-static const QCString dcopObjectId = "KMailICalIface";
+static const TQCString dcopObjectId = "KMailICalIface";
bool KMailConnection::connectToKMail()
{
if ( !mKMailIcalIfaceStub ) {
- QString error;
- QCString dcopService;
+ TQString error;
+ TQCString dcopService;
int result = KDCOPServiceStarter::self()->
- findServiceFor( "DCOP/ResourceBackend/IMAP", QString::null,
- QString::null, &error, &dcopService );
+ findServiceFor( "DCOP/ResourceBackend/IMAP", TQString::null,
+ TQString::null, &error, &dcopService );
if ( result != 0 ) {
kdError(5650) << "Couldn't connect to the IMAP resource backend\n";
// TODO: You might want to show "error" (if not empty) here,
@@ -88,34 +88,34 @@ bool KMailConnection::connectToKMail()
dcopService, dcopObjectId );
// Attach to the KMail signals
- if ( !connectKMailSignal( "incidenceAdded(QString,QString,Q_UINT32,int,QString)",
- "fromKMailAddIncidence(QString,QString,Q_UINT32,int,QString)" ) )
+ if ( !connectKMailSignal( "incidenceAdded(TQString,TQString,Q_UINT32,int,TQString)",
+ "fromKMailAddIncidence(TQString,TQString,Q_UINT32,int,TQString)" ) )
kdError(5650) << "DCOP connection to incidenceAdded failed" << endl;
- if ( !connectKMailSignal( "incidenceDeleted(QString,QString,QString)",
- "fromKMailDelIncidence(QString,QString,QString)" ) )
+ if ( !connectKMailSignal( "incidenceDeleted(TQString,TQString,TQString)",
+ "fromKMailDelIncidence(TQString,TQString,TQString)" ) )
kdError(5650) << "DCOP connection to incidenceDeleted failed" << endl;
- if ( !connectKMailSignal( "signalRefresh(QString,QString)",
- "fromKMailRefresh(QString,QString)" ) )
+ if ( !connectKMailSignal( "signalRefresh(TQString,TQString)",
+ "fromKMailRefresh(TQString,TQString)" ) )
kdError(5650) << "DCOP connection to signalRefresh failed" << endl;
- if ( !connectKMailSignal( "subresourceAdded( QString, QString, QString )",
- "fromKMailAddSubresource( QString, QString, QString )" ) )
+ if ( !connectKMailSignal( "subresourceAdded( TQString, TQString, TQString )",
+ "fromKMailAddSubresource( TQString, TQString, TQString )" ) )
kdError(5650) << "DCOP connection to subresourceAdded failed" << endl;
- if ( !connectKMailSignal( "subresourceDeleted(QString,QString)",
- "fromKMailDelSubresource(QString,QString)" ) )
+ if ( !connectKMailSignal( "subresourceDeleted(TQString,TQString)",
+ "fromKMailDelSubresource(TQString,TQString)" ) )
kdError(5650) << "DCOP connection to subresourceDeleted failed" << endl;
- if ( !connectKMailSignal( "asyncLoadResult(QMap<Q_UINT32, QString>, QString, QString)",
- "fromKMailAsyncLoadResult(QMap<Q_UINT32, QString>, QString, QString)" ) )
+ if ( !connectKMailSignal( "asyncLoadResult(TQMap<Q_UINT32, TQString>, TQString, TQString)",
+ "fromKMailAsyncLoadResult(TQMap<Q_UINT32, TQString>, TQString, TQString)" ) )
kdError(5650) << "DCOP connection to asyncLoadResult failed" << endl;
}
return ( mKMailIcalIfaceStub != 0 );
}
-bool KMailConnection::fromKMailAddIncidence( const QString& type,
- const QString& folder,
+bool KMailConnection::fromKMailAddIncidence( const TQString& type,
+ const TQString& folder,
Q_UINT32 sernum,
int format,
- const QString& data )
+ const TQString& data )
{
if ( format != KMailICalIface::StorageXML
&& format != KMailICalIface::StorageIcalVcard )
@@ -125,25 +125,25 @@ bool KMailConnection::fromKMailAddIncidence( const QString& type,
return mResource->fromKMailAddIncidence( type, folder, sernum, format, data );
}
-void KMailConnection::fromKMailDelIncidence( const QString& type,
- const QString& folder,
- const QString& xml )
+void KMailConnection::fromKMailDelIncidence( const TQString& type,
+ const TQString& folder,
+ const TQString& xml )
{
// kdDebug(5650) << "KMailConnection::fromKMailDelIncidence( " << type << ", "
// << folder << ", " << uid << " )\n";
mResource->fromKMailDelIncidence( type, folder, xml );
}
-void KMailConnection::fromKMailRefresh( const QString& type, const QString& folder )
+void KMailConnection::fromKMailRefresh( const TQString& type, const TQString& folder )
{
// kdDebug(5650) << "KMailConnection::fromKMailRefresh( " << type << ", "
// << folder << " )\n";
mResource->fromKMailRefresh( type, folder );
}
-void KMailConnection::fromKMailAddSubresource( const QString& type,
- const QString& resource,
- const QString& label )
+void KMailConnection::fromKMailAddSubresource( const TQString& type,
+ const TQString& resource,
+ const TQString& label )
{
// kdDebug(5650) << "KMailConnection::fromKMailAddSubresource( " << type << ", "
// << resource << " )\n";
@@ -156,30 +156,30 @@ void KMailConnection::fromKMailAddSubresource( const QString& type,
mResource->fromKMailAddSubresource( type, resource, label, writable );
}
-void KMailConnection::fromKMailDelSubresource( const QString& type,
- const QString& resource )
+void KMailConnection::fromKMailDelSubresource( const TQString& type,
+ const TQString& resource )
{
// kdDebug(5650) << "KMailConnection::fromKMailDelSubresource( " << type << ", "
// << resource << " )\n";
mResource->fromKMailDelSubresource( type, resource );
}
-void KMailConnection::fromKMailAsyncLoadResult( const QMap<Q_UINT32, QString>& map,
- const QString& type,
- const QString& folder )
+void KMailConnection::fromKMailAsyncLoadResult( const TQMap<Q_UINT32, TQString>& map,
+ const TQString& type,
+ const TQString& folder )
{
mResource->fromKMailAsyncLoadResult( map, type, folder );
}
-bool KMailConnection::connectKMailSignal( const QCString& signal,
- const QCString& method )
+bool KMailConnection::connectKMailSignal( const TQCString& signal,
+ const TQCString& method )
{
return connectDCOPSignal( "kmail", dcopObjectId, signal, method, false )
&& connectDCOPSignal( "kontact", dcopObjectId, signal, method, false );
}
-bool KMailConnection::kmailSubresources( QValueList<KMailICalIface::SubResource>& lst,
- const QString& contentsType )
+bool KMailConnection::kmailSubresources( TQValueList<KMailICalIface::SubResource>& lst,
+ const TQString& contentsType )
{
if ( !connectToKMail() )
return false;
@@ -189,8 +189,8 @@ bool KMailConnection::kmailSubresources( QValueList<KMailICalIface::SubResource>
}
bool KMailConnection::kmailIncidencesCount( int& count,
- const QString& mimetype,
- const QString& resource )
+ const TQString& mimetype,
+ const TQString& resource )
{
if ( !connectToKMail() )
return false;
@@ -199,9 +199,9 @@ bool KMailConnection::kmailIncidencesCount( int& count,
return mKMailIcalIfaceStub->ok();
}
-bool KMailConnection::kmailIncidences( QMap<Q_UINT32, QString>& lst,
- const QString& mimetype,
- const QString& resource,
+bool KMailConnection::kmailIncidences( TQMap<Q_UINT32, TQString>& lst,
+ const TQString& mimetype,
+ const TQString& resource,
int startIndex,
int nbMessages )
{
@@ -214,9 +214,9 @@ bool KMailConnection::kmailIncidences( QMap<Q_UINT32, QString>& lst,
bool KMailConnection::kmailGetAttachment( KURL& url,
- const QString& resource,
+ const TQString& resource,
Q_UINT32 sernum,
- const QString& filename )
+ const TQString& filename )
{
if ( !connectToKMail() )
return false;
@@ -225,7 +225,7 @@ bool KMailConnection::kmailGetAttachment( KURL& url,
return mKMailIcalIfaceStub->ok();
}
-bool KMailConnection::kmailDeleteIncidence( const QString& resource,
+bool KMailConnection::kmailDeleteIncidence( const TQString& resource,
Q_UINT32 sernum )
{
return connectToKMail()
@@ -233,15 +233,15 @@ bool KMailConnection::kmailDeleteIncidence( const QString& resource,
&& mKMailIcalIfaceStub->ok();
}
-bool KMailConnection::kmailUpdate( const QString& resource,
+bool KMailConnection::kmailUpdate( const TQString& resource,
Q_UINT32& sernum,
- const QString& subject,
- const QString& plainTextBody,
- const QMap<QCString, QString>& customHeaders,
- const QStringList& attachmentURLs,
- const QStringList& attachmentMimetypes,
- const QStringList& attachmentNames,
- const QStringList& deletedAttachments )
+ const TQString& subject,
+ const TQString& plainTextBody,
+ const TQMap<TQCString, TQString>& customHeaders,
+ const TQStringList& attachmentURLs,
+ const TQStringList& attachmentMimetypes,
+ const TQStringList& attachmentNames,
+ const TQStringList& deletedAttachments )
{
//kdDebug(5006) << kdBacktrace() << endl;
if ( connectToKMail() ) {
@@ -254,7 +254,7 @@ bool KMailConnection::kmailUpdate( const QString& resource,
}
bool KMailConnection::kmailStorageFormat( KMailICalIface::StorageFormat& type,
- const QString& folder )
+ const TQString& folder )
{
bool ok = connectToKMail();
type = mKMailIcalIfaceStub->storageFormat( folder );
@@ -262,13 +262,13 @@ bool KMailConnection::kmailStorageFormat( KMailICalIface::StorageFormat& type,
}
-bool KMailConnection::kmailTriggerSync( const QString &contentsType )
+bool KMailConnection::kmailTriggerSync( const TQString &contentsType )
{
bool ok = connectToKMail();
return ok && mKMailIcalIfaceStub->triggerSync( contentsType );
}
-void KMailConnection::unregisteredFromDCOP( const QCString& appId )
+void KMailConnection::unregisteredFromDCOP( const TQCString& appId )
{
if ( mKMailIcalIfaceStub && mKMailIcalIfaceStub->app() == appId ) {
// Delete the stub so that the next time we need to talk to kmail,
diff --git a/kresources/scalix/shared/kmailconnection.h b/kresources/scalix/shared/kmailconnection.h
index ea57857a8..bd02d7bb0 100644
--- a/kresources/scalix/shared/kmailconnection.h
+++ b/kresources/scalix/shared/kmailconnection.h
@@ -47,24 +47,24 @@ class ResourceScalixBase;
/**
This class provides the kmail connectivity for IMAP resources.
*/
-class KMailConnection : public QObject, public DCOPObject {
+class KMailConnection : public TQObject, public DCOPObject {
Q_OBJECT
K_DCOP
// These are the methods called by KMail when the resource changes
k_dcop:
- bool fromKMailAddIncidence( const QString& type, const QString& resource,
- Q_UINT32 sernum, int format, const QString& xml );
- void fromKMailDelIncidence( const QString& type, const QString& resource,
- const QString& xml );
- void fromKMailRefresh( const QString& type, const QString& resource );
- void fromKMailAddSubresource( const QString& type, const QString& resource, const QString& label );
- void fromKMailDelSubresource( const QString& type, const QString& resource );
- void fromKMailAsyncLoadResult( const QMap<Q_UINT32, QString>& map, const QString& type,
- const QString& folder );
+ bool fromKMailAddIncidence( const TQString& type, const TQString& resource,
+ Q_UINT32 sernum, int format, const TQString& xml );
+ void fromKMailDelIncidence( const TQString& type, const TQString& resource,
+ const TQString& xml );
+ void fromKMailRefresh( const TQString& type, const TQString& resource );
+ void fromKMailAddSubresource( const TQString& type, const TQString& resource, const TQString& label );
+ void fromKMailDelSubresource( const TQString& type, const TQString& resource );
+ void fromKMailAsyncLoadResult( const TQMap<Q_UINT32, TQString>& map, const TQString& type,
+ const TQString& folder );
public:
- KMailConnection( ResourceScalixBase* resource, const QCString& objId );
+ KMailConnection( ResourceScalixBase* resource, const TQCString& objId );
virtual ~KMailConnection();
/**
@@ -73,39 +73,39 @@ public:
bool connectToKMail();
// Call the DCOP methods
- bool kmailSubresources( QValueList<KMailICalIface::SubResource>& lst,
- const QString& contentsType );
+ bool kmailSubresources( TQValueList<KMailICalIface::SubResource>& lst,
+ const TQString& contentsType );
bool kmailIncidencesCount( int& count,
- const QString& mimetype,
- const QString& resource );
- bool kmailIncidences( QMap<Q_UINT32, QString>& lst, const QString& mimetype,
- const QString& resource,
+ const TQString& mimetype,
+ const TQString& resource );
+ bool kmailIncidences( TQMap<Q_UINT32, TQString>& lst, const TQString& mimetype,
+ const TQString& resource,
int startIndex,
int nbMessages );
- bool kmailGetAttachment( KURL& url, const QString& resource, Q_UINT32 sernum,
- const QString& filename );
- bool kmailDeleteIncidence( const QString& resource, Q_UINT32 sernum );
- bool kmailUpdate( const QString& resource,
+ bool kmailGetAttachment( KURL& url, const TQString& resource, Q_UINT32 sernum,
+ const TQString& filename );
+ bool kmailDeleteIncidence( const TQString& resource, Q_UINT32 sernum );
+ bool kmailUpdate( const TQString& resource,
Q_UINT32& sernum,
- const QString& subject,
- const QString& plainTextBody,
- const QMap<QCString, QString>& customHeaders,
- const QStringList& attachmentURLs,
- const QStringList& attachmentMimetypes,
- const QStringList& attachmentNames,
- const QStringList& deletedAttachments );
+ const TQString& subject,
+ const TQString& plainTextBody,
+ const TQMap<TQCString, TQString>& customHeaders,
+ const TQStringList& attachmentURLs,
+ const TQStringList& attachmentMimetypes,
+ const TQStringList& attachmentNames,
+ const TQStringList& deletedAttachments );
- bool kmailStorageFormat( KMailICalIface::StorageFormat& type, const QString& folder);
+ bool kmailStorageFormat( KMailICalIface::StorageFormat& type, const TQString& folder);
- bool kmailTriggerSync( const QString& contentsType );
+ bool kmailTriggerSync( const TQString& contentsType );
private slots:
- virtual void unregisteredFromDCOP( const QCString& );
+ virtual void unregisteredFromDCOP( const TQCString& );
private:
/** Connect a signal from KMail to a local slot. */
- bool connectKMailSignal( const QCString&, const QCString& );
+ bool connectKMailSignal( const TQCString&, const TQCString& );
ResourceScalixBase* mResource;
DCOPClient* mDCOPClient;
diff --git a/kresources/scalix/shared/resourcescalixbase.cpp b/kresources/scalix/shared/resourcescalixbase.cpp
index e91e58787..e239bfb3e 100644
--- a/kresources/scalix/shared/resourcescalixbase.cpp
+++ b/kresources/scalix/shared/resourcescalixbase.cpp
@@ -41,19 +41,19 @@
#include <kurl.h>
#include <ktempfile.h>
#include <kmessagebox.h>
-#include <qtextstream.h>
+#include <tqtextstream.h>
#include <kdebug.h>
using namespace Scalix;
static unsigned int uniquifier = 0;
-ResourceScalixBase::ResourceScalixBase( const QCString& objId )
+ResourceScalixBase::ResourceScalixBase( const TQCString& objId )
: mSilent( false )
{
KGlobal::locale()->insertCatalogue( "kres_scalix" );
KGlobal::locale()->insertCatalogue( "libkcal" );
- QString uniqueObjId = QString( objId ) + QString::number( uniquifier++ );
+ TQString uniqueObjId = TQString( objId ) + TQString::number( uniquifier++ );
mConnection = new KMailConnection( this, uniqueObjId.utf8() );
}
@@ -63,62 +63,62 @@ ResourceScalixBase::~ResourceScalixBase()
}
-bool ResourceScalixBase::kmailSubresources( QValueList<KMailICalIface::SubResource>& lst,
- const QString& contentsType ) const
+bool ResourceScalixBase::kmailSubresources( TQValueList<KMailICalIface::SubResource>& lst,
+ const TQString& contentsType ) const
{
return mConnection->kmailSubresources( lst, contentsType );
}
-bool ResourceScalixBase::kmailTriggerSync( const QString& contentsType ) const
+bool ResourceScalixBase::kmailTriggerSync( const TQString& contentsType ) const
{
return mConnection->kmailTriggerSync( contentsType );
}
bool ResourceScalixBase::kmailIncidencesCount( int &count,
- const QString& mimetype,
- const QString& resource ) const
+ const TQString& mimetype,
+ const TQString& resource ) const
{
return mConnection->kmailIncidencesCount( count, mimetype, resource );
}
-bool ResourceScalixBase::kmailIncidences( QMap<Q_UINT32, QString>& lst,
- const QString& mimetype,
- const QString& resource,
+bool ResourceScalixBase::kmailIncidences( TQMap<Q_UINT32, TQString>& lst,
+ const TQString& mimetype,
+ const TQString& resource,
int startIndex,
int nbMessages ) const
{
return mConnection->kmailIncidences( lst, mimetype, resource, startIndex, nbMessages );
}
-bool ResourceScalixBase::kmailGetAttachment( KURL& url, const QString& resource,
+bool ResourceScalixBase::kmailGetAttachment( KURL& url, const TQString& resource,
Q_UINT32 sernum,
- const QString& filename ) const
+ const TQString& filename ) const
{
return mConnection->kmailGetAttachment( url, resource, sernum, filename );
}
-bool ResourceScalixBase::kmailDeleteIncidence( const QString& resource,
+bool ResourceScalixBase::kmailDeleteIncidence( const TQString& resource,
Q_UINT32 sernum )
{
return mSilent || mConnection->kmailDeleteIncidence( resource, sernum );
}
-bool ResourceScalixBase::kmailUpdate( const QString& resource,
+bool ResourceScalixBase::kmailUpdate( const TQString& resource,
Q_UINT32& sernum,
- const QString& xml,
- const QString& mimetype,
- const QString& subject,
+ const TQString& xml,
+ const TQString& mimetype,
+ const TQString& subject,
const CustomHeaderMap& _customHeaders,
- const QStringList& _attachmentURLs,
- const QStringList& _attachmentMimetypes,
- const QStringList& _attachmentNames,
- const QStringList& deletedAttachments )
+ const TQStringList& _attachmentURLs,
+ const TQStringList& _attachmentMimetypes,
+ const TQStringList& _attachmentNames,
+ const TQStringList& deletedAttachments )
{
if ( mSilent )
return true;
- QString subj = subject;
+ TQString subj = subject;
if ( subj.isEmpty() )
subj = i18n("Internal kolab data: Do not delete this mail.");
@@ -127,10 +127,10 @@ bool ResourceScalixBase::kmailUpdate( const QString& resource,
_attachmentURLs, _attachmentMimetypes, _attachmentNames, deletedAttachments );
}
-QString ResourceScalixBase::configFile( const QString& type ) const
+TQString ResourceScalixBase::configFile( const TQString& type ) const
{
return locateLocal( "config",
- QString( "kresources/scalix/%1rc" ).arg( type ) );
+ TQString( "kresources/scalix/%1rc" ).arg( type ) );
}
bool ResourceScalixBase::connectToKMail() const
@@ -138,12 +138,12 @@ bool ResourceScalixBase::connectToKMail() const
return mConnection->connectToKMail();
}
-QString ResourceScalixBase::findWritableResource( const ResourceMap& resources )
+TQString ResourceScalixBase::findWritableResource( const ResourceMap& resources )
{
// I have to use the label (shown in the dialog) as key here. But given how the
// label is made up, it should be unique. If it's not, well the dialog would suck anyway...
- QMap<QString, QString> possible;
- QStringList labels;
+ TQMap<TQString, TQString> possible;
+ TQStringList labels;
ResourceMap::ConstIterator it;
for ( it = resources.begin(); it != resources.end(); ++it ) {
if ( it.data().writable() && it.data().active() ) {
@@ -155,23 +155,23 @@ QString ResourceScalixBase::findWritableResource( const ResourceMap& resources )
if ( possible.isEmpty() ) { // None found!!
kdWarning(5650) << "No writable resource found!" << endl;
KMessageBox::error( 0, i18n( "No writable resource was found, saving will not be possible. Reconfigure KMail first." ) );
- return QString::null;
+ return TQString::null;
}
if ( possible.count() == 1 )
// Just one found
return possible.begin().data(); // yes this is the subresource key, i.e. location
// Several found, ask the user
- QString chosenLabel = KPIM::FolderSelectDialog::getItem( i18n( "Select Resource Folder" ),
+ TQString chosenLabel = KPIM::FolderSelectDialog::getItem( i18n( "Select Resource Folder" ),
i18n( "You have more than one writable resource folder. "
"Please select the one you want to write to." ),
possible.keys() );
if ( chosenLabel.isEmpty() ) // cancelled
- return QString::null;
+ return TQString::null;
return possible[chosenLabel];
}
-KMailICalIface::StorageFormat ResourceScalixBase::kmailStorageFormat( const QString &folder ) const
+KMailICalIface::StorageFormat ResourceScalixBase::kmailStorageFormat( const TQString &folder ) const
{
KMailICalIface::StorageFormat format = (KMailICalIface::StorageFormat) 3;
mConnection->kmailStorageFormat( format, folder );
diff --git a/kresources/scalix/shared/resourcescalixbase.h b/kresources/scalix/shared/resourcescalixbase.h
index 3c32c1dfd..f1aefc19e 100644
--- a/kresources/scalix/shared/resourcescalixbase.h
+++ b/kresources/scalix/shared/resourcescalixbase.h
@@ -33,9 +33,9 @@
#ifndef RESOURCESCALIXBASE_H
#define RESOURCESCALIXBASE_H
-#include <qstring.h>
-#include <qmap.h>
-#include <qstringlist.h>
+#include <tqstring.h>
+#include <tqmap.h>
+#include <tqstringlist.h>
#include "subresource.h"
#include <kmail/kmailicalIface.h>
@@ -72,30 +72,30 @@ class KMailConnection;
*/
class ResourceScalixBase {
public:
- ResourceScalixBase( const QCString& objId );
+ ResourceScalixBase( const TQCString& objId );
virtual ~ResourceScalixBase();
// These are the methods called by KMail when the resource changes
- virtual bool fromKMailAddIncidence( const QString& type,
- const QString& resource,
+ virtual bool fromKMailAddIncidence( const TQString& type,
+ const TQString& resource,
Q_UINT32 sernum,
int format,
- const QString& data ) = 0;
- virtual void fromKMailDelIncidence( const QString& type,
- const QString& resource,
- const QString& xml ) = 0;
- virtual void fromKMailRefresh( const QString& type,
- const QString& resource ) = 0;
- virtual void fromKMailAddSubresource( const QString& type,
- const QString& resource,
- const QString& label,
+ const TQString& data ) = 0;
+ virtual void fromKMailDelIncidence( const TQString& type,
+ const TQString& resource,
+ const TQString& xml ) = 0;
+ virtual void fromKMailRefresh( const TQString& type,
+ const TQString& resource ) = 0;
+ virtual void fromKMailAddSubresource( const TQString& type,
+ const TQString& resource,
+ const TQString& label,
bool writable ) = 0;
- virtual void fromKMailDelSubresource( const QString& type,
- const QString& resource ) = 0;
+ virtual void fromKMailDelSubresource( const TQString& type,
+ const TQString& resource ) = 0;
- virtual void fromKMailAsyncLoadResult( const QMap<Q_UINT32, QString>& map,
- const QString& type,
- const QString& folder ) = 0;
+ virtual void fromKMailAsyncLoadResult( const TQMap<Q_UINT32, TQString>& map,
+ const TQString& type,
+ const TQString& folder ) = 0;
protected:
/// Do the connection to KMail.
bool connectToKMail() const;
@@ -103,58 +103,58 @@ protected:
// These are the KMail dcop function connections. The docs here say
// "Get", which here means that the first argument is the return arg
- /// List all folders with a certain contentsType. Returns a QMap with
+ /// List all folders with a certain contentsType. Returns a TQMap with
/// resourcename/writable pairs
- bool kmailSubresources( QValueList<KMailICalIface::SubResource>& lst,
- const QString& contentsType ) const;
+ bool kmailSubresources( TQValueList<KMailICalIface::SubResource>& lst,
+ const TQString& contentsType ) const;
/// Get the number of messages in this folder.
/// Used to iterate over kmailIncidences by chunks
- bool kmailIncidencesCount( int& count, const QString& mimetype,
- const QString& resource ) const;
+ bool kmailIncidencesCount( int& count, const TQString& mimetype,
+ const TQString& resource ) const;
/// Get the mimetype attachments from a chunk of messages from this folder.
- /// Returns a QMap with serialNumber/attachment pairs.
- bool kmailIncidences( QMap<Q_UINT32, QString>& lst, const QString& mimetype,
- const QString& resource,
+ /// Returns a TQMap with serialNumber/attachment pairs.
+ bool kmailIncidences( TQMap<Q_UINT32, TQString>& lst, const TQString& mimetype,
+ const TQString& resource,
int startIndex,
int nbMessages ) const;
- bool kmailTriggerSync( const QString& contentType ) const;
+ bool kmailTriggerSync( const TQString& contentType ) const;
public: // for Contact
/// Get an attachment from a mail. Returns a URL to it. This can
/// be called by the resource after obtaining the incidence.
/// The resource must delete the temp file.
- bool kmailGetAttachment( KURL& url, const QString& resource,
+ bool kmailGetAttachment( KURL& url, const TQString& resource,
Q_UINT32 sernum,
- const QString& filename ) const;
+ const TQString& filename ) const;
protected:
/// Delete an incidence.
- bool kmailDeleteIncidence( const QString& resource, Q_UINT32 sernum );
+ bool kmailDeleteIncidence( const TQString& resource, Q_UINT32 sernum );
- KMailICalIface::StorageFormat kmailStorageFormat( const QString& folder ) const;
+ KMailICalIface::StorageFormat kmailStorageFormat( const TQString& folder ) const;
- typedef QMap<QCString, QString> CustomHeaderMap;
+ typedef TQMap<TQCString, TQString> CustomHeaderMap;
/// Update an incidence. The list of attachments are URLs.
/// The parameter sernum is updated with the right KMail serial number
- bool kmailUpdate( const QString& resource, Q_UINT32& sernum,
- const QString& xml,
- const QString& mimetype,
- const QString& subject,
+ bool kmailUpdate( const TQString& resource, Q_UINT32& sernum,
+ const TQString& xml,
+ const TQString& mimetype,
+ const TQString& subject,
const CustomHeaderMap& customHeaders = CustomHeaderMap(),
- const QStringList& attachmentURLs = QStringList(),
- const QStringList& attachmentMimetypes = QStringList(),
- const QStringList& attachmentNames = QStringList(),
- const QStringList& deletedAttachments = QStringList() );
+ const TQStringList& attachmentURLs = TQStringList(),
+ const TQStringList& attachmentMimetypes = TQStringList(),
+ const TQStringList& attachmentNames = TQStringList(),
+ const TQStringList& deletedAttachments = TQStringList() );
/// Get the full path of the config file.
- QString configFile( const QString& type ) const;
+ TQString configFile( const TQString& type ) const;
/// If only one of these is writable, return that. Otherwise return null.
- QString findWritableResource( const ResourceMap& resources );
+ TQString findWritableResource( const ResourceMap& resources );
bool mSilent;
@@ -167,9 +167,9 @@ protected:
/// This is used to distinguish operations triggered by the user,
/// from operations triggered by KMail
- QStringList mUidsPendingAdding;
- QStringList mUidsPendingDeletion;
- QStringList mUidsPendingUpdate;
+ TQStringList mUidsPendingAdding;
+ TQStringList mUidsPendingDeletion;
+ TQStringList mUidsPendingUpdate;
private:
mutable KMailConnection* mConnection;
diff --git a/kresources/scalix/shared/scalixbase.cpp b/kresources/scalix/shared/scalixbase.cpp
index ab38500e2..8fb5177b7 100644
--- a/kresources/scalix/shared/scalixbase.cpp
+++ b/kresources/scalix/shared/scalixbase.cpp
@@ -36,14 +36,14 @@
#include <libkcal/journal.h>
#include <libkdepim/kpimprefs.h>
#include <kdebug.h>
-#include <qfile.h>
+#include <tqfile.h>
using namespace Scalix;
-ScalixBase::ScalixBase( const QString& tz )
- : mCreationDate( QDateTime::currentDateTime() ),
- mLastModified( QDateTime::currentDateTime() ),
+ScalixBase::ScalixBase( const TQString& tz )
+ : mCreationDate( TQDateTime::currentDateTime() ),
+ mLastModified( TQDateTime::currentDateTime() ),
mSensitivity( Public ), mTimeZoneId( tz ),
mHasPilotSyncId( false ), mHasPilotSyncStatus( false )
{
@@ -88,20 +88,20 @@ void ScalixBase::setFields( const KABC::Addressee* addressee )
setCategories( addressee->categories().join( "," ) );
// Set creation-time and last-modification-time
- const QString creationString = addressee->custom( "KOLAB", "CreationDate" );
+ const TQString creationString = addressee->custom( "KOLAB", "CreationDate" );
kdDebug(5006) << "Creation time string: " << creationString << endl;
- QDateTime creationDate;
+ TQDateTime creationDate;
if ( creationString.isEmpty() ) {
- creationDate = QDateTime::currentDateTime();
+ creationDate = TQDateTime::currentDateTime();
kdDebug(5006) << "Creation date set to current time\n";
}
else {
creationDate = stringToDateTime( creationString );
kdDebug(5006) << "Creation date loaded\n";
}
- QDateTime modified = addressee->revision();
+ TQDateTime modified = addressee->revision();
if ( !modified.isValid() )
- modified = QDateTime::currentDateTime();
+ modified = TQDateTime::currentDateTime();
setLastModified( modified );
if ( modified < creationDate ) {
// It's not possible that the modification date is earlier than creation
@@ -109,7 +109,7 @@ void ScalixBase::setFields( const KABC::Addressee* addressee )
kdDebug(5006) << "Creation date set to modification date\n";
}
setCreationDate( creationDate );
- const QString newCreationDate = dateTimeToString( creationDate );
+ const TQString newCreationDate = dateTimeToString( creationDate );
if ( creationString != newCreationDate ) {
// We modified the creation date, so store it for future reference
const_cast<KABC::Addressee*>( addressee )
@@ -135,7 +135,7 @@ void ScalixBase::saveTo( KABC::Addressee* addressee ) const
{
addressee->setUid( uid() );
addressee->setNote( body() );
- addressee->setCategories( QStringList::split( ',', categories() ) );
+ addressee->setCategories( TQStringList::split( ',', categories() ) );
addressee->setRevision( lastModified() );
addressee->insertCustom( "KOLAB", "CreationDate",
dateTimeToString( creationDate() ) );
@@ -155,52 +155,52 @@ void ScalixBase::saveTo( KABC::Addressee* addressee ) const
// TODO: Attachments
}
-void ScalixBase::setUid( const QString& uid )
+void ScalixBase::setUid( const TQString& uid )
{
mUid = uid;
}
-QString ScalixBase::uid() const
+TQString ScalixBase::uid() const
{
return mUid;
}
-void ScalixBase::setBody( const QString& body )
+void ScalixBase::setBody( const TQString& body )
{
mBody = body;
}
-QString ScalixBase::body() const
+TQString ScalixBase::body() const
{
return mBody;
}
-void ScalixBase::setCategories( const QString& categories )
+void ScalixBase::setCategories( const TQString& categories )
{
mCategories = categories;
}
-QString ScalixBase::categories() const
+TQString ScalixBase::categories() const
{
return mCategories;
}
-void ScalixBase::setCreationDate( const QDateTime& date )
+void ScalixBase::setCreationDate( const TQDateTime& date )
{
mCreationDate = date;
}
-QDateTime ScalixBase::creationDate() const
+TQDateTime ScalixBase::creationDate() const
{
return mCreationDate;
}
-void ScalixBase::setLastModified( const QDateTime& date )
+void ScalixBase::setLastModified( const TQDateTime& date )
{
mLastModified = date;
}
-QDateTime ScalixBase::lastModified() const
+TQDateTime ScalixBase::lastModified() const
{
return mLastModified;
}
@@ -247,14 +247,14 @@ int ScalixBase::pilotSyncStatus() const
return mPilotSyncStatus;
}
-bool ScalixBase::loadEmailAttribute( QDomElement& element, Email& email )
+bool ScalixBase::loadEmailAttribute( TQDomElement& element, Email& email )
{
- for ( QDomNode n = element.firstChild(); !n.isNull(); n = n.nextSibling() ) {
+ for ( TQDomNode n = element.firstChild(); !n.isNull(); n = n.nextSibling() ) {
if ( n.isComment() )
continue;
if ( n.isElement() ) {
- QDomElement e = n.toElement();
- QString tagName = e.tagName();
+ TQDomElement e = n.toElement();
+ TQString tagName = e.tagName();
if ( tagName == "display-name" )
email.displayName = e.text();
@@ -270,18 +270,18 @@ bool ScalixBase::loadEmailAttribute( QDomElement& element, Email& email )
return true;
}
-void ScalixBase::saveEmailAttribute( QDomElement& element, const Email& email,
- const QString& tagName ) const
+void ScalixBase::saveEmailAttribute( TQDomElement& element, const Email& email,
+ const TQString& tagName ) const
{
- QDomElement e = element.ownerDocument().createElement( tagName );
+ TQDomElement e = element.ownerDocument().createElement( tagName );
element.appendChild( e );
writeString( e, "display-name", email.displayName );
writeString( e, "smtp-address", email.smtpAddress );
}
-bool ScalixBase::loadAttribute( QDomElement& element )
+bool ScalixBase::loadAttribute( TQDomElement& element )
{
- QString tagName = element.tagName();
+ TQString tagName = element.tagName();
if ( tagName == "uid" )
setUid( element.text() );
@@ -308,7 +308,7 @@ bool ScalixBase::loadAttribute( QDomElement& element )
return true;
}
-bool ScalixBase::saveAttributes( QDomElement& element ) const
+bool ScalixBase::saveAttributes( TQDomElement& element ) const
{
writeString( element, "product-id", productID() );
writeString( element, "uid", uid() );
@@ -319,17 +319,17 @@ bool ScalixBase::saveAttributes( QDomElement& element ) const
dateTimeToString( lastModified() ) );
writeString( element, "sensitivity", sensitivityToString( sensitivity() ) );
if ( hasPilotSyncId() )
- writeString( element, "pilot-sync-id", QString::number( pilotSyncId() ) );
+ writeString( element, "pilot-sync-id", TQString::number( pilotSyncId() ) );
if ( hasPilotSyncStatus() )
- writeString( element, "pilot-sync-status", QString::number( pilotSyncStatus() ) );
+ writeString( element, "pilot-sync-status", TQString::number( pilotSyncStatus() ) );
return true;
}
-bool ScalixBase::load( const QString& xml )
+bool ScalixBase::load( const TQString& xml )
{
- QString errorMsg;
+ TQString errorMsg;
int errorLine, errorColumn;
- QDomDocument document;
+ TQDomDocument document;
bool ok = document.setContent( xml, &errorMsg, &errorLine, &errorColumn );
if ( !ok ) {
@@ -342,11 +342,11 @@ bool ScalixBase::load( const QString& xml )
return loadXML( document );
}
-bool ScalixBase::load( QFile& xml )
+bool ScalixBase::load( TQFile& xml )
{
- QString errorMsg;
+ TQString errorMsg;
int errorLine, errorColumn;
- QDomDocument document;
+ TQDomDocument document;
bool ok = document.setContent( &xml, &errorMsg, &errorLine, &errorColumn );
if ( !ok ) {
@@ -359,41 +359,41 @@ bool ScalixBase::load( QFile& xml )
return loadXML( document );
}
-QDomDocument ScalixBase::domTree()
+TQDomDocument ScalixBase::domTree()
{
- QDomDocument document;
+ TQDomDocument document;
- QString p = "version=\"1.0\" encoding=\"UTF-8\"";
+ TQString p = "version=\"1.0\" encoding=\"UTF-8\"";
document.appendChild(document.createProcessingInstruction( "xml", p ) );
return document;
}
-QString ScalixBase::dateTimeToString( const QDateTime& time )
+TQString ScalixBase::dateTimeToString( const TQDateTime& time )
{
return time.toString( Qt::ISODate ) + 'Z';
}
-QString ScalixBase::dateToString( const QDate& date )
+TQString ScalixBase::dateToString( const TQDate& date )
{
return date.toString( Qt::ISODate );
}
-QDateTime ScalixBase::stringToDateTime( const QString& _date )
+TQDateTime ScalixBase::stringToDateTime( const TQString& _date )
{
- QString date( _date );
+ TQString date( _date );
if ( date.endsWith( "Z" ) )
date.truncate( date.length() - 1 );
- return QDateTime::fromString( date, Qt::ISODate );
+ return TQDateTime::fromString( date, Qt::ISODate );
}
-QDate ScalixBase::stringToDate( const QString& date )
+TQDate ScalixBase::stringToDate( const TQString& date )
{
- return QDate::fromString( date, Qt::ISODate );
+ return TQDate::fromString( date, Qt::ISODate );
}
-QString ScalixBase::sensitivityToString( Sensitivity s )
+TQString ScalixBase::sensitivityToString( Sensitivity s )
{
switch( s ) {
case Private: return "private";
@@ -404,7 +404,7 @@ QString ScalixBase::sensitivityToString( Sensitivity s )
return "What what what???";
}
-ScalixBase::Sensitivity ScalixBase::stringToSensitivity( const QString& s )
+ScalixBase::Sensitivity ScalixBase::stringToSensitivity( const TQString& s )
{
if ( s == "private" )
return Private;
@@ -413,34 +413,34 @@ ScalixBase::Sensitivity ScalixBase::stringToSensitivity( const QString& s )
return Public;
}
-QString ScalixBase::colorToString( const QColor& color )
+TQString ScalixBase::colorToString( const TQColor& color )
{
// Color is in the format "#RRGGBB"
return color.name();
}
-QColor ScalixBase::stringToColor( const QString& s )
+TQColor ScalixBase::stringToColor( const TQString& s )
{
- return QColor( s );
+ return TQColor( s );
}
-void ScalixBase::writeString( QDomElement& element, const QString& tag,
- const QString& tagString )
+void ScalixBase::writeString( TQDomElement& element, const TQString& tag,
+ const TQString& tagString )
{
if ( !tagString.isEmpty() ) {
- QDomElement e = element.ownerDocument().createElement( tag );
- QDomText t = element.ownerDocument().createTextNode( tagString );
+ TQDomElement e = element.ownerDocument().createElement( tag );
+ TQDomText t = element.ownerDocument().createTextNode( tagString );
e.appendChild( t );
element.appendChild( e );
}
}
-QDateTime ScalixBase::localToUTC( const QDateTime& time ) const
+TQDateTime ScalixBase::localToUTC( const TQDateTime& time ) const
{
return KPimPrefs::localTimeToUtc( time, mTimeZoneId );
}
-QDateTime ScalixBase::utcToLocal( const QDateTime& time ) const
+TQDateTime ScalixBase::utcToLocal( const TQDateTime& time ) const
{
return KPimPrefs::utcToLocalTime( time, mTimeZoneId );
}
diff --git a/kresources/scalix/shared/scalixbase.h b/kresources/scalix/shared/scalixbase.h
index efed7e27a..739a2615c 100644
--- a/kresources/scalix/shared/scalixbase.h
+++ b/kresources/scalix/shared/scalixbase.h
@@ -33,9 +33,9 @@
#ifndef SCALIXBASE_H
#define SCALIXBASE_H
-#include <qdom.h>
-#include <qdatetime.h>
-#include <qcolor.h>
+#include <tqdom.h>
+#include <tqdatetime.h>
+#include <tqcolor.h>
class QFile;
@@ -53,38 +53,38 @@ class ScalixBase {
public:
struct Email {
public:
- Email( const QString& name = QString::null,
- const QString& email = QString::null )
+ Email( const TQString& name = TQString::null,
+ const TQString& email = TQString::null )
: displayName( name ), smtpAddress( email )
{
}
- QString displayName;
- QString smtpAddress;
+ TQString displayName;
+ TQString smtpAddress;
};
enum Sensitivity { Public = 0, Private = 1, Confidential = 2 };
- explicit ScalixBase( const QString& timezone = QString::null );
+ explicit ScalixBase( const TQString& timezone = TQString::null );
virtual ~ScalixBase();
// Return a string identifying this type
- virtual QString type() const = 0;
+ virtual TQString type() const = 0;
- virtual void setUid( const QString& uid );
- virtual QString uid() const;
+ virtual void setUid( const TQString& uid );
+ virtual TQString uid() const;
- virtual void setBody( const QString& body );
- virtual QString body() const;
+ virtual void setBody( const TQString& body );
+ virtual TQString body() const;
- virtual void setCategories( const QString& categories );
- virtual QString categories() const;
+ virtual void setCategories( const TQString& categories );
+ virtual TQString categories() const;
- virtual void setCreationDate( const QDateTime& date );
- virtual QDateTime creationDate() const;
+ virtual void setCreationDate( const TQDateTime& date );
+ virtual TQDateTime creationDate() const;
- virtual void setLastModified( const QDateTime& date );
- virtual QDateTime lastModified() const;
+ virtual void setLastModified( const TQDateTime& date );
+ virtual TQDateTime lastModified() const;
virtual void setSensitivity( Sensitivity sensitivity );
virtual Sensitivity sensitivity() const;
@@ -98,28 +98,28 @@ public:
virtual int pilotSyncStatus() const;
// String - Date conversion methods
- static QString dateTimeToString( const QDateTime& time );
- static QString dateToString( const QDate& date );
- static QDateTime stringToDateTime( const QString& time );
- static QDate stringToDate( const QString& date );
+ static TQString dateTimeToString( const TQDateTime& time );
+ static TQString dateToString( const TQDate& date );
+ static TQDateTime stringToDateTime( const TQString& time );
+ static TQDate stringToDate( const TQString& date );
// String - Sensitivity conversion methods
- static QString sensitivityToString( Sensitivity );
- static Sensitivity stringToSensitivity( const QString& );
+ static TQString sensitivityToString( Sensitivity );
+ static Sensitivity stringToSensitivity( const TQString& );
// String - Color conversion methods
- static QString colorToString( const QColor& );
- static QColor stringToColor( const QString& );
+ static TQString colorToString( const TQColor& );
+ static TQColor stringToColor( const TQString& );
// Load this object by reading the XML file
- bool load( const QString& xml );
- bool load( QFile& xml );
+ bool load( const TQString& xml );
+ bool load( TQFile& xml );
// Load this QDomDocument
- virtual bool loadXML( const QDomDocument& xml ) = 0;
+ virtual bool loadXML( const TQDomDocument& xml ) = 0;
// Serialize this object to an XML string
- virtual QString saveXML() const = 0;
+ virtual TQString saveXML() const = 0;
protected:
/// Read all known fields from this ical incidence
@@ -135,35 +135,35 @@ protected:
void saveTo( KABC::Addressee* ) const;
// This just makes the initial dom tree with version and doctype
- static QDomDocument domTree();
+ static TQDomDocument domTree();
- bool loadEmailAttribute( QDomElement& element, Email& email );
+ bool loadEmailAttribute( TQDomElement& element, Email& email );
- void saveEmailAttribute( QDomElement& element, const Email& email,
- const QString& tagName = "email" ) const;
+ void saveEmailAttribute( TQDomElement& element, const Email& email,
+ const TQString& tagName = "email" ) const;
// Load the attributes of this class
- virtual bool loadAttribute( QDomElement& );
+ virtual bool loadAttribute( TQDomElement& );
// Save the attributes of this class
- virtual bool saveAttributes( QDomElement& ) const;
+ virtual bool saveAttributes( TQDomElement& ) const;
// Return the product ID
- virtual QString productID() const = 0;
+ virtual TQString productID() const = 0;
// Write a string tag
- static void writeString( QDomElement&, const QString&, const QString& );
+ static void writeString( TQDomElement&, const TQString&, const TQString& );
- QDateTime localToUTC( const QDateTime& time ) const;
- QDateTime utcToLocal( const QDateTime& time ) const;
+ TQDateTime localToUTC( const TQDateTime& time ) const;
+ TQDateTime utcToLocal( const TQDateTime& time ) const;
- QString mUid;
- QString mBody;
- QString mCategories;
- QDateTime mCreationDate;
- QDateTime mLastModified;
+ TQString mUid;
+ TQString mBody;
+ TQString mCategories;
+ TQDateTime mCreationDate;
+ TQDateTime mLastModified;
Sensitivity mSensitivity;
- QString mTimeZoneId;
+ TQString mTimeZoneId;
// KPilot synchronization stuff
bool mHasPilotSyncId, mHasPilotSyncStatus;
diff --git a/kresources/scalix/shared/subresource.cpp b/kresources/scalix/shared/subresource.cpp
index 6653e0f06..0acfb0816 100644
--- a/kresources/scalix/shared/subresource.cpp
+++ b/kresources/scalix/shared/subresource.cpp
@@ -35,7 +35,7 @@
using namespace Scalix;
-SubResource::SubResource( bool active, bool writable, const QString& label,
+SubResource::SubResource( bool active, bool writable, const TQString& label,
int completionWeight )
: mActive( active ), mWritable( writable ), mLabel( label ),
mCompletionWeight( completionWeight )
@@ -66,12 +66,12 @@ bool SubResource::writable() const
return mWritable;
}
-void SubResource::setLabel( const QString& label )
+void SubResource::setLabel( const TQString& label )
{
mLabel = label;
}
-QString SubResource::label() const
+TQString SubResource::label() const
{
return mLabel;
}
@@ -86,7 +86,7 @@ int SubResource::completionWeight() const
return mCompletionWeight;
}
-StorageReference::StorageReference( const QString& resource, Q_UINT32 sernum )
+StorageReference::StorageReference( const TQString& resource, Q_UINT32 sernum )
: mResource( resource ), mSerialNumber( sernum )
{
}
@@ -95,12 +95,12 @@ StorageReference::~StorageReference()
{
}
-void StorageReference::setResource( const QString& resource )
+void StorageReference::setResource( const TQString& resource )
{
mResource = resource;
}
-QString StorageReference::resource() const
+TQString StorageReference::resource() const
{
return mResource;
}
diff --git a/kresources/scalix/shared/subresource.h b/kresources/scalix/shared/subresource.h
index 3cfc4429e..f7898c14f 100644
--- a/kresources/scalix/shared/subresource.h
+++ b/kresources/scalix/shared/subresource.h
@@ -34,8 +34,8 @@
#ifndef SUBRESOURCE_H
#define SUBRESOURCE_H
-#include <qstring.h>
-#include <qmap.h>
+#include <tqstring.h>
+#include <tqmap.h>
namespace Scalix {
@@ -49,7 +49,7 @@ public:
// This is just for QMap
SubResource() {}
- SubResource( bool active, bool writable, const QString& label,
+ SubResource( bool active, bool writable, const TQString& label,
int completionWeight = 100 );
virtual ~SubResource();
@@ -59,8 +59,8 @@ public:
virtual void setWritable( bool writable );
virtual bool writable() const;
- virtual void setLabel( const QString& label );
- virtual QString label() const;
+ virtual void setLabel( const TQString& label );
+ virtual TQString label() const;
virtual void setCompletionWeight( int completionWeight );
virtual int completionWeight() const;
@@ -68,7 +68,7 @@ public:
private:
bool mActive; // Controlled by the applications
bool mWritable; // Set if the KMail folder is writable
- QString mLabel; // The GUI name of this resource
+ TQString mLabel; // The GUI name of this resource
// This is just for the abc plugin. But as long as only this is here,
// it's just as cheap to have it in here as making a d-pointer that
@@ -77,7 +77,7 @@ private:
int mCompletionWeight;
};
-typedef QMap<QString, SubResource> ResourceMap;
+typedef TQMap<TQString, SubResource> ResourceMap;
/**
* This class is used to store a mapping from the XML UID to the KMail
@@ -89,21 +89,21 @@ public:
// Just for QMap
StorageReference() {}
- StorageReference( const QString& resource, Q_UINT32 sernum );
+ StorageReference( const TQString& resource, Q_UINT32 sernum );
virtual ~StorageReference();
- virtual void setResource( const QString& resource );
- virtual QString resource() const;
+ virtual void setResource( const TQString& resource );
+ virtual TQString resource() const;
virtual void setSerialNumber( Q_UINT32 serialNumber );
virtual Q_UINT32 serialNumber() const;
private:
- QString mResource;
+ TQString mResource;
Q_UINT32 mSerialNumber;
};
-typedef QMap<QString, StorageReference> UidMap;
+typedef TQMap<TQString, StorageReference> UidMap;
}
diff --git a/kresources/slox/kabcresourceslox.cpp b/kresources/slox/kabcresourceslox.cpp
index e6bf326c3..757bfae08 100644
--- a/kresources/slox/kabcresourceslox.cpp
+++ b/kresources/slox/kabcresourceslox.cpp
@@ -19,7 +19,7 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#include <qapplication.h>
+#include <tqapplication.h>
#include <kabc/picture.h>
#include <kconfig.h>
@@ -53,7 +53,7 @@ ResourceSlox::ResourceSlox( const KConfig *config )
}
ResourceSlox::ResourceSlox( const KURL &url,
- const QString &user, const QString &password )
+ const TQString &user, const TQString &password )
: ResourceCached( 0 ), SloxBase( this )
{
init();
@@ -184,16 +184,16 @@ bool ResourceSlox::asyncLoad()
url.setUser( mPrefs->user() );
url.setPass( mPrefs->password() );
- QString lastsync = "0";
+ TQString lastsync = "0";
if ( mPrefs->useLastSync() ) {
- QDateTime dt = mPrefs->lastSync();
+ TQDateTime dt = mPrefs->lastSync();
if ( dt.isValid() )
lastsync = WebdavHandler::qDateTimeToSlox( dt.addDays( -1 ) );
}
- QDomDocument doc;
- QDomElement root = WebdavHandler::addDavElement( doc, doc, "propfind" );
- QDomElement prop = WebdavHandler::addDavElement( doc, root, "prop" );
+ TQDomDocument doc;
+ TQDomElement root = WebdavHandler::addDavElement( doc, doc, "propfind" );
+ TQDomElement prop = WebdavHandler::addDavElement( doc, root, "prop" );
WebdavHandler::addSloxElement( this, doc, prop, fieldName( LastSync ), lastsync );
WebdavHandler::addSloxElement( this, doc, prop, fieldName( FolderId ), mPrefs->folderId() );
if ( type() == "ox" ) {
@@ -205,18 +205,18 @@ bool ResourceSlox::asyncLoad()
kdDebug() << "REQUEST CONTACTS: \n" << doc.toString( 2 ) << endl;
mDownloadJob = KIO::davPropFind( url, doc, "0", false );
- connect( mDownloadJob, SIGNAL( result( KIO::Job * ) ),
- SLOT( slotResult( KIO::Job * ) ) );
- connect( mDownloadJob, SIGNAL( percent( KIO::Job *, unsigned long ) ),
- SLOT( slotProgress( KIO::Job *, unsigned long ) ) );
+ connect( mDownloadJob, TQT_SIGNAL( result( KIO::Job * ) ),
+ TQT_SLOT( slotResult( KIO::Job * ) ) );
+ connect( mDownloadJob, TQT_SIGNAL( percent( KIO::Job *, unsigned long ) ),
+ TQT_SLOT( slotProgress( KIO::Job *, unsigned long ) ) );
mDownloadProgress = KPIM::ProgressManager::instance()->createProgressItem(
KPIM::ProgressManager::getUniqueID(), i18n("Downloading contacts") );
connect( mDownloadProgress,
- SIGNAL( progressItemCanceled( KPIM::ProgressItem * ) ),
- SLOT( cancelDownload() ) );
+ TQT_SIGNAL( progressItemCanceled( KPIM::ProgressItem * ) ),
+ TQT_SLOT( cancelDownload() ) );
- mPrefs->setLastSync( QDateTime::currentDateTime() );
+ mPrefs->setLastSync( TQDateTime::currentDateTime() );
return true;
}
@@ -230,20 +230,20 @@ void ResourceSlox::slotResult( KIO::Job *job )
} else {
kdDebug() << "ResourceSlox::slotResult() success" << endl;
- QDomDocument doc = mDownloadJob->response();
+ TQDomDocument doc = mDownloadJob->response();
mWebdavHandler.log( doc.toString( 2 ) );
- QValueList<SloxItem> items = WebdavHandler::getSloxItems( this, doc );
+ TQValueList<SloxItem> items = WebdavHandler::getSloxItems( this, doc );
bool changed = false;
- QValueList<SloxItem>::ConstIterator it;
+ TQValueList<SloxItem>::ConstIterator it;
for( it = items.begin(); it != items.end(); ++it ) {
SloxItem item = *it;
- QString uid = "kresources_slox_kabc_" + item.sloxId;
+ TQString uid = "kresources_slox_kabc_" + item.sloxId;
if ( item.status == SloxItem::Delete ) {
- QMap<QString,Addressee>::Iterator it;
+ TQMap<TQString,Addressee>::Iterator it;
it = mAddrMap.find( uid );
if ( it != mAddrMap.end() ) {
mAddrMap.remove( it );
@@ -255,9 +255,9 @@ void ResourceSlox::slotResult( KIO::Job *job )
mWebdavHandler.clearSloxAttributeStatus();
- QDomNode n;
+ TQDomNode n;
for( n = item.domNode.firstChild(); !n.isNull(); n = n.nextSibling() ) {
- QDomElement e = n.toElement();
+ TQDomElement e = n.toElement();
mWebdavHandler.parseSloxAttribute( e );
parseContactAttribute( e, a );
}
@@ -295,13 +295,13 @@ void ResourceSlox::slotUploadResult( KIO::Job *job )
} else {
kdDebug() << "ResourceSlox::slotUploadResult() success" << endl;
- QDomDocument doc = mUploadJob->response();
+ TQDomDocument doc = mUploadJob->response();
kdDebug() << k_funcinfo << "Upload result: " << endl;
kdDebug() << doc.toString() << endl;
- QValueList<SloxItem> items = WebdavHandler::getSloxItems( this, doc );
+ TQValueList<SloxItem> items = WebdavHandler::getSloxItems( this, doc );
- QValueList<SloxItem>::ConstIterator it;
+ TQValueList<SloxItem>::ConstIterator it;
for( it = items.begin(); it != items.end(); ++it ) {
SloxItem item = *it;
if ( !item.response.contains( "200" ) ) {
@@ -309,7 +309,7 @@ void ResourceSlox::slotUploadResult( KIO::Job *job )
continue;
}
if ( item.status == SloxItem::New ) {
- QMap<QString,Addressee>::Iterator search_res;
+ TQMap<TQString,Addressee>::Iterator search_res;
search_res = mAddrMap.find( item.clientId );
if ( search_res != mAddrMap.end() ) {
// use the id provided by the server
@@ -334,15 +334,15 @@ void ResourceSlox::slotUploadResult( KIO::Job *job )
uploadContacts();
}
-void ResourceSlox::parseContactAttribute( const QDomElement &e, Addressee &a )
+void ResourceSlox::parseContactAttribute( const TQDomElement &e, Addressee &a )
{
- QString text = decodeText( e.text() );
+ TQString text = decodeText( e.text() );
if ( text.isEmpty() ) return;
- QString tag = e.tagName();
+ TQString tag = e.tagName();
int pnType = 0;
if ( tag == fieldName( Birthday ) ) {
- QDateTime dt = WebdavHandler::sloxToQDateTime( text );
+ TQDateTime dt = WebdavHandler::sloxToQDateTime( text );
a.setBirthday( dt.date() );
} else if ( tag == fieldName( Role ) ) {
a.setRole( text );
@@ -376,9 +376,9 @@ void ResourceSlox::parseContactAttribute( const QDomElement &e, Addressee &a )
} else if ( tag == fieldName( Url ) ) {
a.setUrl( text );
} else if ( tag == fieldName( Image ) ) {
- QByteArray decodedPicture;
+ TQByteArray decodedPicture;
KCodecs::base64Decode( text.utf8(), decodedPicture );
- a.setPhoto( Picture( QImage( decodedPicture ) ) );
+ a.setPhoto( Picture( TQImage( decodedPicture ) ) );
} else if ( tag == fieldName( NickName ) ) {
a.setNickName( text );
} else if ( tag == fieldName( InstantMsg ) ) {
@@ -394,10 +394,10 @@ void ResourceSlox::parseContactAttribute( const QDomElement &e, Addressee &a )
} else if ( tag == fieldName( SpousesName ) ) {
a.insertCustom( "KADDRESSBOOK", "X-SpousesName", text );
} else if ( tag == fieldName( Anniversary ) ) {
- QDateTime dt = WebdavHandler::sloxToQDateTime( text );
+ TQDateTime dt = WebdavHandler::sloxToQDateTime( text );
a.insertCustom( "KADDRESSBOOK", "X-Anniversary", dt.toString( Qt::ISODate ) );
} else if ( tag == fieldName( Categories ) ) {
- a.setCategories( QStringList::split( QRegExp(",\\s*"), text ) );
+ a.setCategories( TQStringList::split( TQRegExp(",\\s*"), text ) );
} else if ( type() == "ox" ) { // FIXME: Address reading is missing for SLOX
// read addresses
Address addr;
@@ -423,17 +423,17 @@ void ResourceSlox::parseContactAttribute( const QDomElement &e, Addressee &a )
}
}
-int ResourceSlox::phoneNumberType( const QString &fieldName ) const
+int ResourceSlox::phoneNumberType( const TQString &fieldName ) const
{
- QMap<int, QStringList> pnmap;
+ TQMap<int, TQStringList> pnmap;
if ( type() == "ox" )
pnmap = mPhoneNumberOxMap;
else
pnmap = mPhoneNumberSloxMap;
- QMap<int, QStringList>::ConstIterator it;
+ TQMap<int, TQStringList>::ConstIterator it;
for ( it = pnmap.begin(); it != pnmap.end(); ++it ) {
- QStringList l = it.data();
- QStringList::ConstIterator it2;
+ TQStringList l = it.data();
+ TQStringList::ConstIterator it2;
for ( it2 = l.begin(); it2 != l.end(); ++it2 )
if ( (*it2) == fieldName )
return it.key();
@@ -471,10 +471,10 @@ bool ResourceSlox::asyncSave( Ticket* )
void ResourceSlox::uploadContacts()
{
- QDomDocument doc;
- QDomElement root = WebdavHandler::addDavElement( doc, doc, "propertyupdate" );
- QDomElement set = WebdavHandler::addDavElement( doc, root, "set" );
- QDomElement prop = WebdavHandler::addDavElement( doc, set, "prop" );
+ TQDomDocument doc;
+ TQDomElement root = WebdavHandler::addDavElement( doc, doc, "propertyupdate" );
+ TQDomElement set = WebdavHandler::addDavElement( doc, root, "set" );
+ TQDomElement prop = WebdavHandler::addDavElement( doc, set, "prop" );
bool isDelete = false;
@@ -501,7 +501,7 @@ void ResourceSlox::uploadContacts()
if ( !isDelete ) {
createAddresseeFields( doc, prop, mUploadAddressee );
} else {
- QString tmp_uid = mUploadAddressee.uid().remove( 0, sizeof("kresources_slox_kabc_") - 1); // remove prefix from uid
+ TQString tmp_uid = mUploadAddressee.uid().remove( 0, sizeof("kresources_slox_kabc_") - 1); // remove prefix from uid
WebdavHandler::addSloxElement( this, doc, prop, fieldName( ObjectId ), tmp_uid );
WebdavHandler::addSloxElement( this, doc, prop, "method", "DELETE" );
}
@@ -514,19 +514,19 @@ void ResourceSlox::uploadContacts()
url.setPass( mPrefs->password() );
mUploadJob = KIO::davPropPatch( url, doc, false );
- connect( mUploadJob, SIGNAL( result( KIO::Job * ) ),
- SLOT( slotUploadResult( KIO::Job * ) ) );
- connect( mUploadJob, SIGNAL( percent( KIO::Job *, unsigned long ) ),
- SLOT( slotProgress( KIO::Job *, unsigned long ) ) );
+ connect( mUploadJob, TQT_SIGNAL( result( KIO::Job * ) ),
+ TQT_SLOT( slotUploadResult( KIO::Job * ) ) );
+ connect( mUploadJob, TQT_SIGNAL( percent( KIO::Job *, unsigned long ) ),
+ TQT_SLOT( slotProgress( KIO::Job *, unsigned long ) ) );
mUploadProgress = KPIM::ProgressManager::instance()->createProgressItem(
KPIM::ProgressManager::getUniqueID(), i18n("Uploading contacts") );
connect( mUploadProgress,
- SIGNAL( progressItemCanceled( KPIM::ProgressItem * ) ),
- SLOT( cancelUpload() ) );
+ TQT_SIGNAL( progressItemCanceled( KPIM::ProgressItem * ) ),
+ TQT_SLOT( cancelUpload() ) );
}
-void ResourceSlox::createAddresseeFields( QDomDocument &doc, QDomElement &prop,
+void ResourceSlox::createAddresseeFields( TQDomDocument &doc, TQDomElement &prop,
const Addressee &a )
{
// choose addressbook
@@ -562,10 +562,10 @@ void ResourceSlox::createAddresseeFields( QDomDocument &doc, QDomElement &prop,
a.custom( "KADDRESSBOOK", "X-AssistantsName" ) );
WebdavHandler::addSloxElement( this, doc, prop, fieldName( SpousesName ),
a.custom( "KADDRESSBOOK", "X-SpousesName" ) );
- QString anniversary = a.custom( "KADDRESSBOOK", "X-Anniversary" );
+ TQString anniversary = a.custom( "KADDRESSBOOK", "X-Anniversary" );
if ( !anniversary.isEmpty() )
WebdavHandler::addSloxElement( this, doc, prop, fieldName( Anniversary ),
- WebdavHandler::qDateTimeToSlox( QDateTime::fromString( anniversary, Qt::ISODate ).date() ) );
+ WebdavHandler::qDateTimeToSlox( TQDateTime::fromString( anniversary, Qt::ISODate ).date() ) );
else
WebdavHandler::addSloxElement( this, doc, prop, fieldName( Anniversary ) );
}
@@ -575,8 +575,8 @@ void ResourceSlox::createAddresseeFields( QDomDocument &doc, QDomElement &prop,
WebdavHandler::addSloxElement( this, doc, prop, fieldName( Categories ), a.categories().join( ", " ) );
// emails
- QStringList email_list = a.emails();
- QStringList::const_iterator emails_it = email_list.begin();
+ TQStringList email_list = a.emails();
+ TQStringList::const_iterator emails_it = email_list.begin();
if ( emails_it != email_list.end() )
WebdavHandler::addSloxElement( this, doc, prop, fieldName( PrimaryEmail ), *(emails_it++) );
if ( emails_it != email_list.end() )
@@ -586,15 +586,15 @@ void ResourceSlox::createAddresseeFields( QDomDocument &doc, QDomElement &prop,
// phone numbers
PhoneNumber::List pnlist = a.phoneNumbers();
- QMap<int, QStringList> pnSaveMap;
+ TQMap<int, TQStringList> pnSaveMap;
if ( type() == "ox" )
pnSaveMap = mPhoneNumberOxMap;
else
pnSaveMap = mPhoneNumberSloxMap;
for ( PhoneNumber::List::ConstIterator it = pnlist.begin() ; it != pnlist.end(); ++it ) {
if ( pnSaveMap.contains( (*it).type() ) ) {
- QStringList l = pnSaveMap[(*it).type()];
- QString fn = l.first();
+ TQStringList l = pnSaveMap[(*it).type()];
+ TQString fn = l.first();
l.remove( l.begin() );
if ( !l.isEmpty() )
pnSaveMap[(*it).type()] = l;
@@ -606,9 +606,9 @@ void ResourceSlox::createAddresseeFields( QDomDocument &doc, QDomElement &prop,
}
// send empty fields for the remaining ohone number fields
// it's not possible to delete phone numbers otherwise
- for ( QMap<int, QStringList>::ConstIterator it = pnSaveMap.begin(); it != pnSaveMap.end(); ++it ) {
- QStringList l = it.data();
- for ( QStringList::ConstIterator it2 = l.begin(); it2 != l.end(); ++it2 )
+ for ( TQMap<int, TQStringList>::ConstIterator it = pnSaveMap.begin(); it != pnSaveMap.end(); ++it ) {
+ TQStringList l = it.data();
+ for ( TQStringList::ConstIterator it2 = l.begin(); it2 != l.end(); ++it2 )
WebdavHandler::addSloxElement( this, doc, prop, (*it2) );
}
@@ -620,8 +620,8 @@ void ResourceSlox::createAddresseeFields( QDomDocument &doc, QDomElement &prop,
}
}
-void KABC::ResourceSlox::createAddressFields( QDomDocument &doc, QDomElement &parent,
- const QString &prefix, const KABC::Address &addr )
+void KABC::ResourceSlox::createAddressFields( TQDomDocument &doc, TQDomElement &parent,
+ const TQString &prefix, const KABC::Address &addr )
{
WebdavHandler::addSloxElement( this, doc, parent, prefix + fieldName( Street ), addr.street() );
WebdavHandler::addSloxElement( this, doc, parent, prefix + fieldName( PostalCode ), addr.postalCode() );
diff --git a/kresources/slox/kabcresourceslox.h b/kresources/slox/kabcresourceslox.h
index 066fdeaa4..5815acd4a 100644
--- a/kresources/slox/kabcresourceslox.h
+++ b/kresources/slox/kabcresourceslox.h
@@ -27,8 +27,8 @@
#include <kdepimmacros.h>
#include <kabc/addressee.h>
-#include <qmap.h>
-#include <qdom.h>
+#include <tqmap.h>
+#include <tqdom.h>
namespace KIO {
class DavJob;
@@ -51,7 +51,7 @@ class KDE_EXPORT ResourceSlox : public ResourceCached, public SloxBase
public:
ResourceSlox( const KConfig * );
ResourceSlox( const KURL &url,
- const QString &user, const QString &password );
+ const TQString &user, const TQString &password );
~ResourceSlox();
void readConfig( const KConfig * );
@@ -76,12 +76,12 @@ class KDE_EXPORT ResourceSlox : public ResourceCached, public SloxBase
protected:
void init();
- int phoneNumberType( const QString &fieldName ) const;
- void parseContactAttribute( const QDomElement &e, Addressee &a );
+ int phoneNumberType( const TQString &fieldName ) const;
+ void parseContactAttribute( const TQDomElement &e, Addressee &a );
- void createAddresseeFields( QDomDocument &doc, QDomElement &prop, const Addressee &a );
- void createAddressFields( QDomDocument &doc, QDomElement &parent,
- const QString &prefix, const KABC::Address &addr );
+ void createAddresseeFields( TQDomDocument &doc, TQDomElement &prop, const Addressee &a );
+ void createAddressFields( TQDomDocument &doc, TQDomElement &parent,
+ const TQString &prefix, const KABC::Address &addr );
void uploadContacts();
@@ -105,7 +105,7 @@ class KDE_EXPORT ResourceSlox : public ResourceCached, public SloxBase
KABC::Addressee mUploadAddressee;
- QMap<int, QStringList> mPhoneNumberSloxMap, mPhoneNumberOxMap;
+ TQMap<int, TQStringList> mPhoneNumberSloxMap, mPhoneNumberOxMap;
};
}
diff --git a/kresources/slox/kabcresourcesloxconfig.cpp b/kresources/slox/kabcresourcesloxconfig.cpp
index 3df5636be..abacaf718 100644
--- a/kresources/slox/kabcresourcesloxconfig.cpp
+++ b/kresources/slox/kabcresourcesloxconfig.cpp
@@ -33,43 +33,43 @@
#include <klineedit.h>
#include <kurlrequester.h>
-#include <qcheckbox.h>
-#include <qlabel.h>
-#include <qlayout.h>
+#include <tqcheckbox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
using namespace KABC;
-ResourceSloxConfig::ResourceSloxConfig( QWidget* parent, const char* name )
+ResourceSloxConfig::ResourceSloxConfig( TQWidget* parent, const char* name )
: KRES::ConfigWidget( parent, name ), mRes( 0 )
{
- QGridLayout *mainLayout = new QGridLayout( this, 5, 2, 0, KDialog::spacingHint() );
+ TQGridLayout *mainLayout = new TQGridLayout( this, 5, 2, 0, KDialog::spacingHint() );
- QLabel *label = new QLabel( i18n( "URL:" ), this );
+ TQLabel *label = new TQLabel( i18n( "URL:" ), this );
mURL = new KURLRequester( this );
mainLayout->addWidget( label, 0, 0 );
mainLayout->addWidget( mURL, 0, 1 );
- label = new QLabel( i18n( "User:" ), this );
+ label = new TQLabel( i18n( "User:" ), this );
mUser = new KLineEdit( this );
mainLayout->addWidget( label, 1, 0 );
mainLayout->addWidget( mUser, 1, 1 );
- label = new QLabel( i18n( "Password:" ), this );
+ label = new TQLabel( i18n( "Password:" ), this );
mPassword = new KLineEdit( this );
- mPassword->setEchoMode( QLineEdit::Password );
+ mPassword->setEchoMode( TQLineEdit::Password );
mainLayout->addWidget( label, 2, 0 );
mainLayout->addWidget( mPassword, 2, 1 );
- mLastSyncCheck = new QCheckBox( i18n("Only load data since last sync"),
+ mLastSyncCheck = new TQCheckBox( i18n("Only load data since last sync"),
this );
mainLayout->addMultiCellWidget( mLastSyncCheck, 3, 3, 0, 1 );
mFolderButton = new KPushButton( i18n("Select Folder..."), this );
mainLayout->addMultiCellWidget( mFolderButton, 4, 4, 0, 1 );
- connect( mFolderButton, SIGNAL( clicked() ), SLOT( selectAddressFolder() ) );
+ connect( mFolderButton, TQT_SIGNAL( clicked() ), TQT_SLOT( selectAddressFolder() ) );
}
@@ -114,7 +114,7 @@ void KABC::ResourceSloxConfig::selectAddressFolder( )
SloxFolderManager *manager = new SloxFolderManager( mRes, mURL->url() );
SloxFolderDialog *dialog = new SloxFolderDialog( manager, Contacts, this );
dialog->setSelectedFolder( mFolderId );
- if ( dialog->exec() == QDialog::Accepted )
+ if ( dialog->exec() == TQDialog::Accepted )
mFolderId = dialog->selectedFolder();
}
diff --git a/kresources/slox/kabcresourcesloxconfig.h b/kresources/slox/kabcresourcesloxconfig.h
index b55282a85..6aedf83b3 100644
--- a/kresources/slox/kabcresourcesloxconfig.h
+++ b/kresources/slox/kabcresourcesloxconfig.h
@@ -37,7 +37,7 @@ class KDE_EXPORT ResourceSloxConfig : public KRES::ConfigWidget
Q_OBJECT
public:
- ResourceSloxConfig( QWidget* parent = 0, const char* name = 0 );
+ ResourceSloxConfig( TQWidget* parent = 0, const char* name = 0 );
public slots:
void loadSettings( KRES::Resource* );
@@ -50,9 +50,9 @@ class KDE_EXPORT ResourceSloxConfig : public KRES::ConfigWidget
KURLRequester *mURL;
KLineEdit *mUser;
KLineEdit *mPassword;
- QCheckBox *mLastSyncCheck;
+ TQCheckBox *mLastSyncCheck;
KPushButton *mFolderButton;
- QString mFolderId;
+ TQString mFolderId;
SloxBase *mRes;
};
diff --git a/kresources/slox/kcalresourceslox.cpp b/kresources/slox/kcalresourceslox.cpp
index d446494f6..2fcb0baa3 100644
--- a/kresources/slox/kcalresourceslox.cpp
+++ b/kresources/slox/kcalresourceslox.cpp
@@ -22,11 +22,11 @@
#include <typeinfo>
#include <stdlib.h>
-#include <qdatetime.h>
-#include <qstring.h>
-#include <qptrlist.h>
-#include <qfile.h>
-#include <qregexp.h>
+#include <tqdatetime.h>
+#include <tqstring.h>
+#include <tqptrlist.h>
+#include <tqfile.h>
+#include <tqregexp.h>
#include <kdebug.h>
#include <kurl.h>
@@ -173,9 +173,9 @@ bool KCalResourceSlox::doLoad()
clearChanges();
- QString p = KURL( mPrefs->url() ).protocol();
+ TQString p = KURL( mPrefs->url() ).protocol();
if ( p != "http" && p != "https" && p != "webdav" && p != "webdavs" ) {
- QString err = i18n("Non-http protocol: '%1'").arg( p );
+ TQString err = i18n("Non-http protocol: '%1'").arg( p );
kdDebug() << "KCalResourceSlox::load(): " << err << endl;
loadError( err );
return false;
@@ -202,17 +202,17 @@ void KCalResourceSlox::requestEvents()
kdDebug() << "KCalResourceSlox::requestEvents(): " << url << endl;
- QString lastsync = "0";
+ TQString lastsync = "0";
if ( mPrefs->useLastSync() ) {
- QDateTime dt = mPrefs->lastEventSync();
+ TQDateTime dt = mPrefs->lastEventSync();
if ( dt.isValid() ) {
lastsync = WebdavHandler::qDateTimeToSlox( dt.addDays( -1 ) );
}
}
- QDomDocument doc;
- QDomElement root = WebdavHandler::addDavElement( doc, doc, "propfind" );
- QDomElement prop = WebdavHandler::addDavElement( doc, root, "prop" );
+ TQDomDocument doc;
+ TQDomElement root = WebdavHandler::addDavElement( doc, doc, "propfind" );
+ TQDomElement prop = WebdavHandler::addDavElement( doc, root, "prop" );
WebdavHandler::addSloxElement( this, doc, prop, fieldName( LastSync ), lastsync );
WebdavHandler::addSloxElement( this, doc, prop, fieldName( FolderId ), mPrefs->calendarFolderId() );
if ( type() == "ox" ) {
@@ -224,18 +224,18 @@ void KCalResourceSlox::requestEvents()
kdDebug() << "REQUEST CALENDAR: \n" << doc.toString( 2 ) << endl;
mLoadEventsJob = KIO::davPropFind( url, doc, "0", false );
- connect( mLoadEventsJob, SIGNAL( result( KIO::Job * ) ),
- SLOT( slotLoadEventsResult( KIO::Job * ) ) );
- connect( mLoadEventsJob, SIGNAL( percent( KIO::Job *, unsigned long ) ),
- SLOT( slotEventsProgress( KIO::Job *, unsigned long ) ) );
+ connect( mLoadEventsJob, TQT_SIGNAL( result( KIO::Job * ) ),
+ TQT_SLOT( slotLoadEventsResult( KIO::Job * ) ) );
+ connect( mLoadEventsJob, TQT_SIGNAL( percent( KIO::Job *, unsigned long ) ),
+ TQT_SLOT( slotEventsProgress( KIO::Job *, unsigned long ) ) );
mLoadEventsProgress = KPIM::ProgressManager::instance()->createProgressItem(
KPIM::ProgressManager::getUniqueID(), i18n("Downloading events") );
connect( mLoadEventsProgress,
- SIGNAL( progressItemCanceled( KPIM::ProgressItem * ) ),
- SLOT( cancelLoadEvents() ) );
+ TQT_SIGNAL( progressItemCanceled( KPIM::ProgressItem * ) ),
+ TQT_SLOT( cancelLoadEvents() ) );
- mPrefs->setLastEventSync( QDateTime::currentDateTime() );
+ mPrefs->setLastEventSync( TQDateTime::currentDateTime() );
}
void KCalResourceSlox::requestTodos()
@@ -247,17 +247,17 @@ void KCalResourceSlox::requestTodos()
kdDebug() << "KCalResourceSlox::requestTodos(): " << url << endl;
- QString lastsync = "0";
+ TQString lastsync = "0";
if ( mPrefs->useLastSync() ) {
- QDateTime dt = mPrefs->lastTodoSync();
+ TQDateTime dt = mPrefs->lastTodoSync();
if ( dt.isValid() ) {
lastsync = WebdavHandler::qDateTimeToSlox( dt.addDays( -1 ) );
}
}
- QDomDocument doc;
- QDomElement root = WebdavHandler::addDavElement( doc, doc, "propfind" );
- QDomElement prop = WebdavHandler::addDavElement( doc, root, "prop" );
+ TQDomDocument doc;
+ TQDomElement root = WebdavHandler::addDavElement( doc, doc, "propfind" );
+ TQDomElement prop = WebdavHandler::addDavElement( doc, root, "prop" );
WebdavHandler::addSloxElement( this, doc, prop, fieldName( LastSync ), lastsync );
WebdavHandler::addSloxElement( this, doc, prop, fieldName( FolderId ), mPrefs->taskFolderId() );
if ( type() == "ox" ) {
@@ -269,27 +269,27 @@ void KCalResourceSlox::requestTodos()
kdDebug() << "REQUEST TASKS: \n" << doc.toString( 2 ) << endl;
mLoadTodosJob = KIO::davPropFind( url, doc, "0", false );
- connect( mLoadTodosJob, SIGNAL( result( KIO::Job * ) ),
- SLOT( slotLoadTodosResult( KIO::Job * ) ) );
- connect( mLoadTodosJob, SIGNAL( percent( KIO::Job *, unsigned long ) ),
- SLOT( slotTodosProgress( KIO::Job *, unsigned long ) ) );
+ connect( mLoadTodosJob, TQT_SIGNAL( result( KIO::Job * ) ),
+ TQT_SLOT( slotLoadTodosResult( KIO::Job * ) ) );
+ connect( mLoadTodosJob, TQT_SIGNAL( percent( KIO::Job *, unsigned long ) ),
+ TQT_SLOT( slotTodosProgress( KIO::Job *, unsigned long ) ) );
mLoadTodosProgress = KPIM::ProgressManager::instance()->createProgressItem(
KPIM::ProgressManager::getUniqueID(), i18n("Downloading to-dos") );
connect( mLoadTodosProgress,
- SIGNAL( progressItemCanceled( KPIM::ProgressItem * ) ),
- SLOT( cancelLoadTodos() ) );
+ TQT_SIGNAL( progressItemCanceled( KPIM::ProgressItem * ) ),
+ TQT_SLOT( cancelLoadTodos() ) );
- mPrefs->setLastTodoSync( QDateTime::currentDateTime() );
+ mPrefs->setLastTodoSync( TQDateTime::currentDateTime() );
}
void KCalResourceSlox::uploadIncidences()
{
- QDomDocument doc;
- QDomElement ms = WebdavHandler::addDavElement( doc, doc, "multistatus" );
- QDomElement pu = WebdavHandler::addDavElement( doc, ms, "propertyupdate" );
- QDomElement set = WebdavHandler::addElement( doc, pu, "D:set" );
- QDomElement prop = WebdavHandler::addElement( doc, set, "D:prop" );
+ TQDomDocument doc;
+ TQDomElement ms = WebdavHandler::addDavElement( doc, doc, "multistatus" );
+ TQDomElement pu = WebdavHandler::addDavElement( doc, ms, "propertyupdate" );
+ TQDomElement set = WebdavHandler::addElement( doc, pu, "D:set" );
+ TQDomElement prop = WebdavHandler::addElement( doc, set, "D:prop" );
mUploadIsDelete = false;
Incidence::List added = addedIncidences();
@@ -320,7 +320,7 @@ void KCalResourceSlox::uploadIncidences()
KURL url = mPrefs->url();
- QString sloxId = mUploadedIncidence->customProperty( "SLOX", "ID" );
+ TQString sloxId = mUploadedIncidence->customProperty( "SLOX", "ID" );
if ( !sloxId.isEmpty() ) {
WebdavHandler::addSloxElement( this, doc, prop, fieldName( ObjectId ), sloxId );
} else {
@@ -348,8 +348,8 @@ void KCalResourceSlox::uploadIncidences()
if ( type() == "ox" ) {
WebdavHandler::addSloxElement( this, doc, prop, "method", "DELETE" );
} else {
- QDomElement remove = WebdavHandler::addElement( doc, pu, "D:remove" );
- QDomElement prop = WebdavHandler::addElement( doc, remove, "D:prop" );
+ TQDomElement remove = WebdavHandler::addElement( doc, pu, "D:remove" );
+ TQDomElement prop = WebdavHandler::addElement( doc, remove, "D:prop" );
WebdavHandler::addSloxElement( this, doc, prop, "sloxid", sloxId );
}
} else {
@@ -378,20 +378,20 @@ void KCalResourceSlox::uploadIncidences()
kdDebug() << "UPLOAD: \n" << doc.toString( 2 ) << endl;
mUploadJob = KIO::davPropPatch( url, doc, false );
- connect( mUploadJob, SIGNAL( result( KIO::Job * ) ),
- SLOT( slotUploadResult( KIO::Job * ) ) );
- connect( mUploadJob, SIGNAL( percent( KIO::Job *, unsigned long ) ),
- SLOT( slotUploadProgress( KIO::Job *, unsigned long ) ) );
+ connect( mUploadJob, TQT_SIGNAL( result( KIO::Job * ) ),
+ TQT_SLOT( slotUploadResult( KIO::Job * ) ) );
+ connect( mUploadJob, TQT_SIGNAL( percent( KIO::Job *, unsigned long ) ),
+ TQT_SLOT( slotUploadProgress( KIO::Job *, unsigned long ) ) );
mUploadProgress = KPIM::ProgressManager::instance()->createProgressItem(
KPIM::ProgressManager::getUniqueID(), i18n("Uploading incidence") );
connect( mUploadProgress,
- SIGNAL( progressItemCanceled( KPIM::ProgressItem * ) ),
- SLOT( cancelUpload() ) );
+ TQT_SIGNAL( progressItemCanceled( KPIM::ProgressItem * ) ),
+ TQT_SLOT( cancelUpload() ) );
}
-void KCalResourceSlox::createIncidenceAttributes( QDomDocument &doc,
- QDomElement &parent,
+void KCalResourceSlox::createIncidenceAttributes( TQDomDocument &doc,
+ TQDomElement &parent,
Incidence *incidence )
{
WebdavHandler::addSloxElement( this, doc, parent, fieldName( IncidenceTitle ),
@@ -401,20 +401,20 @@ void KCalResourceSlox::createIncidenceAttributes( QDomDocument &doc,
incidence->description() );
if ( incidence->attendeeCount() > 0 ) {
- QDomElement members = WebdavHandler::addSloxElement( this, doc, parent,
+ TQDomElement members = WebdavHandler::addSloxElement( this, doc, parent,
fieldName( Participants ) );
Attendee::List attendees = incidence->attendees();
Attendee::List::ConstIterator it;
for( it = attendees.begin(); it != attendees.end(); ++it ) {
if ( mAccounts ) {
- QString userId = mAccounts->lookupId( (*it)->email() );
- QString status;
+ TQString userId = mAccounts->lookupId( (*it)->email() );
+ TQString status;
switch ( (*it)->status() ) {
case Attendee::Accepted: status = "accept"; break;
case Attendee::Declined: status = "decline"; break;
default: status = "none"; break;
}
- QDomElement el = WebdavHandler::addSloxElement( this, doc, members, fieldName( Participant ), userId );
+ TQDomElement el = WebdavHandler::addSloxElement( this, doc, members, fieldName( Participant ), userId );
el.setAttribute( "confirm", status );
} else {
kdError() << "KCalResourceSlox: No accounts set." << endl;
@@ -426,7 +426,7 @@ void KCalResourceSlox::createIncidenceAttributes( QDomDocument &doc,
// TODO OX support
if ( incidence->secrecy() == Incidence::SecrecyPublic && type() != "ox" )
{
- QDomElement rights = WebdavHandler::addSloxElement( this, doc, parent, "readrights" );
+ TQDomElement rights = WebdavHandler::addSloxElement( this, doc, parent, "readrights" );
WebdavHandler::addSloxElement( this, doc, rights, "group", "users" );
}
@@ -434,7 +434,7 @@ void KCalResourceSlox::createIncidenceAttributes( QDomDocument &doc,
KCal::Alarm::List alarms = incidence->alarms();
if ( !alarms.isEmpty() && alarms.first()->hasStartOffset() && alarms.first()->enabled() )
WebdavHandler::addSloxElement( this, doc, parent, fieldName( Reminder ),
- QString::number( (-1) * alarms.first()->startOffset().asSeconds() / 60 ) );
+ TQString::number( (-1) * alarms.first()->startOffset().asSeconds() / 60 ) );
else
WebdavHandler::addSloxElement( this, doc, parent, fieldName( Reminder ), "0" );
@@ -442,11 +442,11 @@ void KCalResourceSlox::createIncidenceAttributes( QDomDocument &doc,
WebdavHandler::addSloxElement( this, doc, parent, fieldName( Categories ), incidence->categories().join( ", " ) );
}
-void KCalResourceSlox::createEventAttributes( QDomDocument &doc,
- QDomElement &parent,
+void KCalResourceSlox::createEventAttributes( TQDomDocument &doc,
+ TQDomElement &parent,
Event *event )
{
- QString folderId = mPrefs->calendarFolderId();
+ TQString folderId = mPrefs->calendarFolderId();
if ( folderId.isEmpty() && type() == "ox" ) // SLOX and OX use diffrent default folders
folderId = "-1";
WebdavHandler::addSloxElement( this, doc, parent, fieldName( FolderId ), folderId );
@@ -466,11 +466,11 @@ void KCalResourceSlox::createEventAttributes( QDomDocument &doc,
}
}
-void KCalResourceSlox::createTodoAttributes( QDomDocument &doc,
- QDomElement &parent,
+void KCalResourceSlox::createTodoAttributes( TQDomDocument &doc,
+ TQDomElement &parent,
Todo *todo )
{
- QString folderId = mPrefs->taskFolderId();
+ TQString folderId = mPrefs->taskFolderId();
if ( folderId.isEmpty() && type() == "ox" ) // SLOX and OX use diffrent default folders
folderId = "-1";
WebdavHandler::addSloxElement( this, doc, parent, fieldName( FolderId ), folderId );
@@ -486,7 +486,7 @@ void KCalResourceSlox::createTodoAttributes( QDomDocument &doc,
}
int priority = todo->priority();
- QString txt;
+ TQString txt;
switch ( priority ) {
case 9:
case 8:
@@ -503,11 +503,11 @@ void KCalResourceSlox::createTodoAttributes( QDomDocument &doc,
WebdavHandler::addSloxElement( this, doc, parent, fieldName( Priority ), txt );
WebdavHandler::addSloxElement( this, doc, parent, fieldName( PercentComplete ),
- QString::number( todo->percentComplete() ) );
+ TQString::number( todo->percentComplete() ) );
}
-void KCalResourceSlox::createRecurrenceAttributes( QDomDocument &doc,
- QDomElement &parent,
+void KCalResourceSlox::createRecurrenceAttributes( TQDomDocument &doc,
+ TQDomElement &parent,
KCal::Incidence *incidence )
{
if ( !incidence->doesRecur() ) {
@@ -521,12 +521,12 @@ void KCalResourceSlox::createRecurrenceAttributes( QDomDocument &doc,
case Recurrence::rDaily:
WebdavHandler::addSloxElement( this, doc, parent, fieldName( RecurrenceType ), "daily" );
WebdavHandler::addSloxElement( this, doc, parent, fieldName( RecurrenceDailyFreq ),
- QString::number( r->frequency() ) );
+ TQString::number( r->frequency() ) );
break;
case Recurrence::rWeekly: {
WebdavHandler::addSloxElement( this, doc, parent, fieldName( RecurrenceType ), "weekly" );
WebdavHandler::addSloxElement( this, doc, parent, fieldName( RecurrenceWeeklyFreq ),
- QString::number( r->frequency() ) );
+ TQString::number( r->frequency() ) );
// TODO: SLOX support
int oxDays = 0;
for ( int i = 0; i < 7; ++i ) {
@@ -534,33 +534,33 @@ void KCalResourceSlox::createRecurrenceAttributes( QDomDocument &doc,
oxDays += 1 << ( ( i + 1 ) % 7 );
}
if ( type() == "ox" )
- WebdavHandler::addSloxElement( this, doc, parent, "days", QString::number( oxDays ) );
+ WebdavHandler::addSloxElement( this, doc, parent, "days", TQString::number( oxDays ) );
break; }
case Recurrence::rMonthlyDay:
WebdavHandler::addSloxElement( this, doc, parent, fieldName( RecurrenceType ), "monthly" );
WebdavHandler::addSloxElement( this, doc, parent, fieldName( RecurrenceMonthlyFreq ),
- QString::number( r->frequency() ) );
+ TQString::number( r->frequency() ) );
WebdavHandler::addSloxElement( this, doc, parent, fieldName( RecurrenceMonthlyDay ),
- QString::number( r->monthDays().first() ) );
+ TQString::number( r->monthDays().first() ) );
break;
case Recurrence::rMonthlyPos: {
WebdavHandler::addSloxElement( this, doc, parent, fieldName( RecurrenceType ),
type() == "ox" ? "monthly" : "monthly2" );
WebdavHandler::addSloxElement( this, doc, parent, fieldName( RecurrenceMonthly2Freq ),
- QString::number( r->frequency() ) );
+ TQString::number( r->frequency() ) );
RecurrenceRule::WDayPos wdp = r->monthPositions().first();
// TODO: SLOX support
WebdavHandler::addSloxElement( this, doc, parent, fieldName( RecurrenceMonthly2Day ),
- QString::number( 1 << wdp.day() ) );
+ TQString::number( 1 << wdp.day() ) );
WebdavHandler::addSloxElement( this, doc, parent, fieldName( RecurrenceMonthly2Pos ),
- QString::number( wdp.pos() ) );
+ TQString::number( wdp.pos() ) );
break; }
case Recurrence::rYearlyMonth:
WebdavHandler::addSloxElement( this, doc, parent, fieldName( RecurrenceType ), "yearly" );
WebdavHandler::addSloxElement( this, doc, parent, fieldName( RecurrenceYearlyDay ),
- QString::number( r->yearDates().first() ) );
+ TQString::number( r->yearDates().first() ) );
WebdavHandler::addSloxElement( this, doc, parent, fieldName( RecurrenceYearlyMonth ),
- QString::number( r->yearMonths().first() + monthOffset ) );
+ TQString::number( r->yearMonths().first() + monthOffset ) );
if ( type() == "ox" )
WebdavHandler::addSloxElement( this, doc, parent, "interval", "1" );
break;
@@ -570,11 +570,11 @@ void KCalResourceSlox::createRecurrenceAttributes( QDomDocument &doc,
RecurrenceRule::WDayPos wdp = r->monthPositions().first();
// TODO: SLOX support
WebdavHandler::addSloxElement( this, doc, parent, fieldName( RecurrenceYearly2Day ),
- QString::number( 1 << wdp.day() ) );
+ TQString::number( 1 << wdp.day() ) );
WebdavHandler::addSloxElement( this, doc, parent, fieldName( RecurrenceYearly2Pos ),
- QString::number( wdp.pos() ) );
+ TQString::number( wdp.pos() ) );
WebdavHandler::addSloxElement( this, doc, parent, fieldName( RecurrenceYearly2Month ),
- QString::number( r->yearMonths().first() + monthOffset ) );
+ TQString::number( r->yearMonths().first() + monthOffset ) );
if ( type() == "ox" )
WebdavHandler::addSloxElement( this, doc, parent, "interval", "1" );
break; }
@@ -585,27 +585,27 @@ void KCalResourceSlox::createRecurrenceAttributes( QDomDocument &doc,
WebdavHandler::qDateTimeToSlox( r->endDateTime() ) );
// delete exceptions
DateList exlist = r->exDates();
- QStringList res;
+ TQStringList res;
for ( DateList::Iterator it = exlist.begin(); it != exlist.end(); ++it )
res.append( WebdavHandler::qDateTimeToSlox( *it ) );
WebdavHandler::addSloxElement( this, doc, parent, fieldName( RecurrenceDelEx ), res.join( "," ) );
}
-void KCalResourceSlox::parseMembersAttribute( const QDomElement &e,
+void KCalResourceSlox::parseMembersAttribute( const TQDomElement &e,
Incidence *incidence )
{
incidence->clearAttendees();
- QDomNode n;
+ TQDomNode n;
for( n = e.firstChild(); !n.isNull(); n = n.nextSibling() ) {
- QDomElement memberElement = n.toElement();
+ TQDomElement memberElement = n.toElement();
if ( memberElement.tagName() == fieldName( Participant ) ) {
- QString member = memberElement.text();
+ TQString member = memberElement.text();
KABC::Addressee account;
if ( mAccounts ) account = mAccounts->lookupUser( member );
else kdError() << "KCalResourceSlox: no accounts set" << endl;
- QString name;
- QString email;
+ TQString name;
+ TQString email;
Attendee *a = incidence->attendeeByUid( member );
if ( account.isEmpty() ) {
if ( a ) continue;
@@ -624,7 +624,7 @@ void KCalResourceSlox::parseMembersAttribute( const QDomElement &e,
a->setUid( member );
incidence->addAttendee( a );
}
- QString status = memberElement.attribute( "confirm" );
+ TQString status = memberElement.attribute( "confirm" );
if ( !status.isEmpty() ) {
if ( status == "accept" ) {
a->setStatus( Attendee::Accepted );
@@ -641,25 +641,25 @@ void KCalResourceSlox::parseMembersAttribute( const QDomElement &e,
}
}
-void KCalResourceSlox::parseReadRightsAttribute( const QDomElement &e,
+void KCalResourceSlox::parseReadRightsAttribute( const TQDomElement &e,
Incidence *incidence )
{
- QDomNode n;
+ TQDomNode n;
for( n = e.firstChild(); !n.isNull(); n = n.nextSibling() ) {
- QDomElement rightElement = n.toElement();
+ TQDomElement rightElement = n.toElement();
if ( rightElement.tagName() == "group" ) {
- QString groupName = rightElement.text();
+ TQString groupName = rightElement.text();
if ( groupName == "users" )
incidence->setSecrecy( Incidence::SecrecyPublic );
}
}
}
-void KCalResourceSlox::parseIncidenceAttribute( const QDomElement &e,
+void KCalResourceSlox::parseIncidenceAttribute( const TQDomElement &e,
Incidence *incidence )
{
- QString tag = e.tagName();
- QString text = decodeText( e.text() );
+ TQString tag = e.tagName();
+ TQString text = decodeText( e.text() );
if ( text.isEmpty() ) return;
if ( tag == fieldName( IncidenceTitle ) ) {
@@ -693,19 +693,19 @@ void KCalResourceSlox::parseIncidenceAttribute( const QDomElement &e,
} else if ( tag == "readrights" ) {
parseReadRightsAttribute( e, incidence );
} else if ( tag == fieldName( Categories ) ) {
- incidence->setCategories( QStringList::split( QRegExp(",\\s*"), text ) );
+ incidence->setCategories( TQStringList::split( TQRegExp(",\\s*"), text ) );
}
}
-void KCalResourceSlox::parseEventAttribute( const QDomElement &e,
+void KCalResourceSlox::parseEventAttribute( const TQDomElement &e,
Event *event )
{
- QString tag = e.tagName();
- QString text = decodeText( e.text() );
+ TQString tag = e.tagName();
+ TQString text = decodeText( e.text() );
if ( text.isEmpty() ) return;
if ( tag == fieldName( EventBegin ) ) {
- QDateTime dt;
+ TQDateTime dt;
if ( event->doesFloat() ) {
if ( type() == "ox" )
dt = WebdavHandler::sloxToQDateTime( text, timeZoneId() );
@@ -715,7 +715,7 @@ void KCalResourceSlox::parseEventAttribute( const QDomElement &e,
dt = WebdavHandler::sloxToQDateTime( text, timeZoneId() );
event->setDtStart( dt );
} else if ( tag == fieldName( EventEnd ) ) {
- QDateTime dt;
+ TQDateTime dt;
if ( event->doesFloat() ) {
dt = WebdavHandler::sloxToQDateTime( text );
dt = dt.addSecs( -1 );
@@ -727,15 +727,15 @@ void KCalResourceSlox::parseEventAttribute( const QDomElement &e,
}
}
-void KCalResourceSlox::parseRecurrence( const QDomNode &node, Event *event )
+void KCalResourceSlox::parseRecurrence( const TQDomNode &node, Event *event )
{
- QString type;
+ TQString type;
int dailyValue = -1;
- QDateTime end;
+ TQDateTime end;
int weeklyValue = -1;
- QBitArray days( 7 ); // days, starting with monday
+ TQBitArray days( 7 ); // days, starting with monday
bool daysSet = false;
int monthlyValueDay = -1;
@@ -754,12 +754,12 @@ void KCalResourceSlox::parseRecurrence( const QDomNode &node, Event *event )
DateList deleteExceptions;
- QDomNode n;
+ TQDomNode n;
for( n = node.firstChild(); !n.isNull(); n = n.nextSibling() ) {
- QDomElement e = n.toElement();
- QString tag = e.tagName();
- QString text = decodeText( e.text() );
+ TQDomElement e = n.toElement();
+ TQString tag = e.tagName();
+ TQString text = decodeText( e.text() );
kdDebug() << k_funcinfo << tag << ": " << text << endl;
if ( tag == fieldName( RecurrenceType ) ) {
@@ -818,8 +818,8 @@ void KCalResourceSlox::parseRecurrence( const QDomNode &node, Event *event )
yearlyMonth = text.toInt() + 1; // starts at 0
yearly2Month = text.toInt() + 1;
} else if ( tag == fieldName( RecurrenceDelEx ) ) {
- QStringList exdates = QStringList::split( ",", text );
- QStringList::Iterator it;
+ TQStringList exdates = TQStringList::split( ",", text );
+ TQStringList::Iterator it;
for ( it = exdates.begin(); it != exdates.end(); ++it )
deleteExceptions.append( WebdavHandler::sloxToQDateTime( *it ).date() );
}
@@ -845,7 +845,7 @@ void KCalResourceSlox::parseRecurrence( const QDomNode &node, Event *event )
r->addYearlyMonth( yearlyMonth );
} else if ( type == "monthly2" ) {
r->setMonthly( monthly2ValueMonth );
- QBitArray _days( 7 );
+ TQBitArray _days( 7 );
if ( daysSet )
_days = days;
else
@@ -854,7 +854,7 @@ void KCalResourceSlox::parseRecurrence( const QDomNode &node, Event *event )
} else if ( type == "yearly2" ) {
r->setYearly( 1 );
r->addYearlyMonth( yearly2Month );
- QBitArray _days( 7 );
+ TQBitArray _days( 7 );
if ( daysSet )
_days = days;
else
@@ -865,21 +865,21 @@ void KCalResourceSlox::parseRecurrence( const QDomNode &node, Event *event )
r->setExDates( deleteExceptions );
}
-void KCalResourceSlox::parseTodoAttribute( const QDomElement &e,
+void KCalResourceSlox::parseTodoAttribute( const TQDomElement &e,
Todo *todo )
{
- QString tag = e.tagName();
- QString text = decodeText( e.text() );
+ TQString tag = e.tagName();
+ TQString text = decodeText( e.text() );
if ( text.isEmpty() ) return;
if ( tag == fieldName( TaskBegin ) ) {
- QDateTime dt = WebdavHandler::sloxToQDateTime( text );
+ TQDateTime dt = WebdavHandler::sloxToQDateTime( text );
if ( dt.isValid() ) {
todo->setDtStart( dt );
todo->setHasStartDate( true );
}
} else if ( tag == fieldName( TaskEnd ) ) {
- QDateTime dt = WebdavHandler::sloxToQDateTime( text );
+ TQDateTime dt = WebdavHandler::sloxToQDateTime( text );
if ( dt.isValid() ) {
todo->setDtDue( dt );
todo->setHasDueDate( true );
@@ -919,20 +919,20 @@ void KCalResourceSlox::slotLoadTodosResult( KIO::Job *job )
} else {
kdDebug() << "KCalResourceSlox::slotLoadTodosJobResult() success" << endl;
- QDomDocument doc = mLoadTodosJob->response();
+ TQDomDocument doc = mLoadTodosJob->response();
mWebdavHandler.log( doc.toString( 2 ) );
- QValueList<SloxItem> items = WebdavHandler::getSloxItems( this, doc );
+ TQValueList<SloxItem> items = WebdavHandler::getSloxItems( this, doc );
bool changed = false;
disableChangeNotification();
- QValueList<SloxItem>::ConstIterator it;
+ TQValueList<SloxItem>::ConstIterator it;
for( it = items.begin(); it != items.end(); ++it ) {
SloxItem item = *it;
- QString uid = sloxIdToTodoUid( item.sloxId );
+ TQString uid = sloxIdToTodoUid( item.sloxId );
if ( item.status == SloxItem::Delete ) {
Todo *todo = mCalendar.todo( uid );
if ( todo ) {
@@ -953,9 +953,9 @@ void KCalResourceSlox::slotLoadTodosResult( KIO::Job *job )
mWebdavHandler.clearSloxAttributeStatus();
- QDomNode n;
+ TQDomNode n;
for( n = item.domNode.firstChild(); !n.isNull(); n = n.nextSibling() ) {
- QDomElement e = n.toElement();
+ TQDomElement e = n.toElement();
mWebdavHandler.parseSloxAttribute( e );
parseIncidenceAttribute( e, todo );
parseTodoAttribute( e, todo );
@@ -993,20 +993,20 @@ void KCalResourceSlox::slotLoadEventsResult( KIO::Job *job )
} else {
kdDebug() << "KCalResourceSlox::slotLoadEventsResult() success" << endl;
- QDomDocument doc = mLoadEventsJob->response();
+ TQDomDocument doc = mLoadEventsJob->response();
mWebdavHandler.log( doc.toString( 2 ) );
- QValueList<SloxItem> items = WebdavHandler::getSloxItems( this, doc );
+ TQValueList<SloxItem> items = WebdavHandler::getSloxItems( this, doc );
bool changed = false;
disableChangeNotification();
- QValueList<SloxItem>::ConstIterator it;
+ TQValueList<SloxItem>::ConstIterator it;
for( it = items.begin(); it != items.end(); ++it ) {
SloxItem item = *it;
- QString uid = sloxIdToEventUid( item.sloxId );
+ TQString uid = sloxIdToEventUid( item.sloxId );
if ( item.status == SloxItem::Delete ) {
Event *event = mCalendar.event( uid );
if ( event ) {
@@ -1025,7 +1025,7 @@ void KCalResourceSlox::slotLoadEventsResult( KIO::Job *job )
event->setCustomProperty( "SLOX", "ID", item.sloxId );
- QDomNode n = item.domNode.namedItem( fieldName( FullTime ) );
+ TQDomNode n = item.domNode.namedItem( fieldName( FullTime ) );
event->setFloats( n.toElement().text() == boolToStr( true ) );
bool doesRecur = false;
@@ -1033,7 +1033,7 @@ void KCalResourceSlox::slotLoadEventsResult( KIO::Job *job )
mWebdavHandler.clearSloxAttributeStatus();
for( n = item.domNode.firstChild(); !n.isNull(); n = n.nextSibling() ) {
- QDomElement e = n.toElement();
+ TQDomElement e = n.toElement();
mWebdavHandler.parseSloxAttribute( e );
parseIncidenceAttribute( e, event );
parseEventAttribute( e, event );
@@ -1089,69 +1089,69 @@ void KCalResourceSlox::slotUploadResult( KIO::Job *job )
return;
}
- QDomDocument doc = mUploadJob->response();
+ TQDomDocument doc = mUploadJob->response();
kdDebug() << "UPLOAD RESULT:" << endl;
kdDebug() << doc.toString( 2 ) << endl;
- QDomElement docElement = doc.documentElement();
+ TQDomElement docElement = doc.documentElement();
- QDomNode responseNode;
+ TQDomNode responseNode;
for( responseNode = docElement.firstChild(); !responseNode.isNull();
responseNode = responseNode.nextSibling() ) {
- QDomElement responseElement = responseNode.toElement();
+ TQDomElement responseElement = responseNode.toElement();
if ( responseElement.tagName() == "response" ) {
- QDomNode propstat = responseElement.namedItem( "propstat" );
+ TQDomNode propstat = responseElement.namedItem( "propstat" );
if ( propstat.isNull() ) {
kdError() << "Unable to find propstat tag." << endl;
continue;
}
- QDomNode status = propstat.namedItem( "status" );
+ TQDomNode status = propstat.namedItem( "status" );
if ( !status.isNull() ) {
- QDomElement statusElement = status.toElement();
- QString response = statusElement.text();
+ TQDomElement statusElement = status.toElement();
+ TQString response = statusElement.text();
if ( !response.contains( "200" ) ) {
- QString error = "'" + mUploadedIncidence->summary() + "'\n";
+ TQString error = "'" + mUploadedIncidence->summary() + "'\n";
error += response;
- QDomNode dn = propstat.namedItem( "responsedescription" );
- QString d = dn.toElement().text();
+ TQDomNode dn = propstat.namedItem( "responsedescription" );
+ TQString d = dn.toElement().text();
if ( !d.isEmpty() ) error += "\n" + d;
saveError( error );
continue;
}
}
- QDomNode prop = propstat.namedItem( "prop" );
+ TQDomNode prop = propstat.namedItem( "prop" );
if ( prop.isNull() ) {
kdError() << "Unable to find WebDAV property" << endl;
continue;
}
- QDomNode sloxIdNode = prop.namedItem( fieldName( ObjectId ) );
+ TQDomNode sloxIdNode = prop.namedItem( fieldName( ObjectId ) );
if ( sloxIdNode.isNull() ) {
kdError() << "Unable to find SLOX id." << endl;
continue;
}
- QDomElement sloxIdElement = sloxIdNode.toElement();
- QString sloxId = sloxIdElement.text();
+ TQDomElement sloxIdElement = sloxIdNode.toElement();
+ TQString sloxId = sloxIdElement.text();
kdDebug() << "SLOXID: " << sloxId << endl;
if ( mUploadIsDelete ) {
kdDebug() << "Incidence deleted" << endl;
} else {
- QDomNode clientIdNode = prop.namedItem( fieldName( ClientId ) );
+ TQDomNode clientIdNode = prop.namedItem( fieldName( ClientId ) );
if ( clientIdNode.isNull() ) {
kdError() << "Unable to find client id." << endl;
continue;
}
- QDomElement clientidElement = clientIdNode.toElement();
- QString clientId = clientidElement.text();
+ TQDomElement clientidElement = clientIdNode.toElement();
+ TQString clientId = clientidElement.text();
kdDebug() << "CLIENTID: " << clientId << endl;
Incidence *i = mUploadedIncidence->clone();
- QString uid;
+ TQString uid;
if ( i->type() == "Event" ) uid = sloxIdToEventUid( sloxId );
else if ( i->type() == "Todo" ) uid = sloxIdToTodoUid( sloxId );
else {
@@ -1228,7 +1228,7 @@ bool KCalResourceSlox::confirmSave()
dlg.addIncidences( deletedIncidences(), i18n("Deleted") );
int result = dlg.exec();
- return result == QDialog::Accepted;
+ return result == TQDialog::Accepted;
}
bool KCalResourceSlox::doSave()
@@ -1313,12 +1313,12 @@ void KCalResourceSlox::cancelUpload()
if ( mUploadProgress ) mUploadProgress->setComplete();
}
-QString KCalResourceSlox::sloxIdToEventUid( const QString &sloxId )
+TQString KCalResourceSlox::sloxIdToEventUid( const TQString &sloxId )
{
return "KResources_SLOX_Event_" + sloxId;
}
-QString KCalResourceSlox::sloxIdToTodoUid( const QString &sloxId )
+TQString KCalResourceSlox::sloxIdToTodoUid( const TQString &sloxId )
{
return "KResources_SLOX_Todo_" + sloxId;
}
diff --git a/kresources/slox/kcalresourceslox.h b/kresources/slox/kcalresourceslox.h
index 2d0022cc7..0f9b289dd 100644
--- a/kresources/slox/kcalresourceslox.h
+++ b/kresources/slox/kcalresourceslox.h
@@ -23,10 +23,10 @@
#include "sloxbase.h"
#include "webdavhandler.h"
-#include <qptrlist.h>
-#include <qstring.h>
-#include <qdatetime.h>
-#include <qdom.h>
+#include <tqptrlist.h>
+#include <tqstring.h>
+#include <tqdatetime.h>
+#include <tqdom.h>
#include <kurl.h>
#include <kconfig.h>
@@ -113,33 +113,33 @@ class KDE_EXPORT KCalResourceSlox : public KCal::ResourceCached, public SloxBase
void uploadIncidences();
- void parseMembersAttribute( const QDomElement &e,
+ void parseMembersAttribute( const TQDomElement &e,
KCal::Incidence *incidence );
- void parseReadRightsAttribute( const QDomElement &e,
+ void parseReadRightsAttribute( const TQDomElement &e,
KCal::Incidence *incidence );
- void parseIncidenceAttribute( const QDomElement &e,
+ void parseIncidenceAttribute( const TQDomElement &e,
KCal::Incidence *incidence );
- void parseTodoAttribute( const QDomElement &e, KCal::Todo *todo );
- void parseEventAttribute( const QDomElement &e, KCal::Event *event );
- void parseRecurrence( const QDomNode &n, KCal::Event *event );
+ void parseTodoAttribute( const TQDomElement &e, KCal::Todo *todo );
+ void parseEventAttribute( const TQDomElement &e, KCal::Event *event );
+ void parseRecurrence( const TQDomNode &n, KCal::Event *event );
- void createIncidenceAttributes( QDomDocument &doc,
- QDomElement &parent,
+ void createIncidenceAttributes( TQDomDocument &doc,
+ TQDomElement &parent,
KCal::Incidence *incidence );
- void createEventAttributes( QDomDocument &doc,
- QDomElement &parent,
+ void createEventAttributes( TQDomDocument &doc,
+ TQDomElement &parent,
KCal::Event *event );
- void createTodoAttributes( QDomDocument &doc,
- QDomElement &parent,
+ void createTodoAttributes( TQDomDocument &doc,
+ TQDomElement &parent,
KCal::Todo *todo );
- void createRecurrenceAttributes( QDomDocument &doc,
- QDomElement &parent,
+ void createRecurrenceAttributes( TQDomDocument &doc,
+ TQDomElement &parent,
KCal::Incidence *incidence );
bool confirmSave();
- QString sloxIdToEventUid( const QString &sloxId );
- QString sloxIdToTodoUid( const QString &sloxId );
+ TQString sloxIdToEventUid( const TQString &sloxId );
+ TQString sloxIdToTodoUid( const TQString &sloxId );
private:
void init();
diff --git a/kresources/slox/kcalresourcesloxconfig.cpp b/kresources/slox/kcalresourcesloxconfig.cpp
index 403a5e518..441ea5336 100644
--- a/kresources/slox/kcalresourcesloxconfig.cpp
+++ b/kresources/slox/kcalresourcesloxconfig.cpp
@@ -20,9 +20,9 @@
#include <typeinfo>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qcheckbox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqcheckbox.h>
#include <klocale.h>
#include <kdebug.h>
@@ -40,43 +40,43 @@
#include "kcalresourcesloxconfig.h"
-KCalResourceSloxConfig::KCalResourceSloxConfig( QWidget* parent, const char* name ) :
+KCalResourceSloxConfig::KCalResourceSloxConfig( TQWidget* parent, const char* name ) :
KRES::ConfigWidget( parent, name ), mRes( 0 )
{
resize( 245, 115 );
- QGridLayout *mainLayout = new QGridLayout( this, 6, 2, KDialog::spacingHint(), KDialog::spacingHint() );
+ TQGridLayout *mainLayout = new TQGridLayout( this, 6, 2, KDialog::spacingHint(), KDialog::spacingHint() );
- QLabel *label = new QLabel( i18n( "Download from:" ), this );
+ TQLabel *label = new TQLabel( i18n( "Download from:" ), this );
mDownloadUrl = new KURLRequester( this );
mDownloadUrl->setMode( KFile::File );
mainLayout->addWidget( label, 1, 0 );
mainLayout->addWidget( mDownloadUrl, 1, 1 );
- label = new QLabel( i18n("User:"), this );
+ label = new TQLabel( i18n("User:"), this );
mainLayout->addWidget( label, 2, 0 );
mUserEdit = new KLineEdit( this );
mainLayout->addWidget( mUserEdit, 2, 1 );
- label = new QLabel( i18n("Password:"), this );
+ label = new TQLabel( i18n("Password:"), this );
mainLayout->addWidget( label, 3, 0 );
mPasswordEdit = new KLineEdit( this );
mainLayout->addWidget( mPasswordEdit, 3, 1 );
mPasswordEdit->setEchoMode( KLineEdit::Password );
- mLastSyncCheck = new QCheckBox( i18n("Only load data since last sync"),
+ mLastSyncCheck = new TQCheckBox( i18n("Only load data since last sync"),
this );
mainLayout->addMultiCellWidget( mLastSyncCheck, 4, 4, 0, 1 );
mCalButton = new KPushButton( i18n("Calendar Folder..."), this );
mainLayout->addWidget( mCalButton, 5, 0 );
- connect( mCalButton, SIGNAL( clicked() ), SLOT( selectCalendarFolder() ) );
+ connect( mCalButton, TQT_SIGNAL( clicked() ), TQT_SLOT( selectCalendarFolder() ) );
mTaskButton = new KPushButton( i18n("Task Folder..."), this );
mainLayout->addWidget( mTaskButton, 5, 1 );
- connect( mTaskButton, SIGNAL( clicked() ), SLOT( selectTaskFolder() ) );
+ connect( mTaskButton, TQT_SIGNAL( clicked() ), TQT_SLOT( selectTaskFolder() ) );
mReloadConfig = new KCal::ResourceCachedReloadConfig( this );
mainLayout->addMultiCellWidget( mReloadConfig, 6, 6, 0, 1 );
@@ -129,7 +129,7 @@ void KCalResourceSloxConfig::selectCalendarFolder()
SloxFolderManager *manager = new SloxFolderManager( mRes, mDownloadUrl->url() );
SloxFolderDialog *dialog = new SloxFolderDialog( manager, ::Calendar, this );
dialog->setSelectedFolder( mCalendarFolderId );
- if ( dialog->exec() == QDialog::Accepted )
+ if ( dialog->exec() == TQDialog::Accepted )
mCalendarFolderId = dialog->selectedFolder();
}
@@ -138,7 +138,7 @@ void KCalResourceSloxConfig::selectTaskFolder( )
SloxFolderManager *manager = new SloxFolderManager( mRes, mDownloadUrl->url() );
SloxFolderDialog *dialog = new SloxFolderDialog( manager, Tasks, this );
dialog->setSelectedFolder( mTaskFolderId );
- if ( dialog->exec() == QDialog::Accepted )
+ if ( dialog->exec() == TQDialog::Accepted )
mTaskFolderId = dialog->selectedFolder();
}
diff --git a/kresources/slox/kcalresourcesloxconfig.h b/kresources/slox/kcalresourcesloxconfig.h
index a656478d2..370948c08 100644
--- a/kresources/slox/kcalresourcesloxconfig.h
+++ b/kresources/slox/kcalresourcesloxconfig.h
@@ -46,7 +46,7 @@ class KDE_EXPORT KCalResourceSloxConfig : public KRES::ConfigWidget
{
Q_OBJECT
public:
- KCalResourceSloxConfig( QWidget *parent = 0, const char *name = 0 );
+ KCalResourceSloxConfig( TQWidget *parent = 0, const char *name = 0 );
public slots:
virtual void loadSettings( KRES::Resource *resource );
@@ -60,11 +60,11 @@ class KDE_EXPORT KCalResourceSloxConfig : public KRES::ConfigWidget
KURLRequester *mDownloadUrl;
KLineEdit *mUserEdit;
KLineEdit *mPasswordEdit;
- QCheckBox *mLastSyncCheck;
+ TQCheckBox *mLastSyncCheck;
KPushButton *mCalButton;
KPushButton *mTaskButton;
- QString mCalendarFolderId;
- QString mTaskFolderId;
+ TQString mCalendarFolderId;
+ TQString mTaskFolderId;
KCal::ResourceCachedReloadConfig *mReloadConfig;
KCal::ResourceCachedSaveConfig *mSaveConfig;
diff --git a/kresources/slox/sloxaccounts.cpp b/kresources/slox/sloxaccounts.cpp
index 35203b06f..a32df5fa2 100644
--- a/kresources/slox/sloxaccounts.cpp
+++ b/kresources/slox/sloxaccounts.cpp
@@ -33,9 +33,9 @@
#include <kstringhandler.h>
#include <kconfig.h>
-#include <qfile.h>
-#include <qdom.h>
-#include <qstring.h>
+#include <tqfile.h>
+#include <tqdom.h>
+#include <tqstring.h>
SloxAccounts::SloxAccounts( SloxBase *res, const KURL &baseUrl )
: mBaseUrl( baseUrl ), mRes( res )
@@ -44,9 +44,9 @@ SloxAccounts::SloxAccounts( SloxBase *res, const KURL &baseUrl )
mDownloadJob = 0;
- QString server = mBaseUrl.host();
+ TQString server = mBaseUrl.host();
- QStringList l = QStringList::split( '.', server );
+ TQStringList l = TQStringList::split( '.', server );
if ( l.count() < 2 ) mDomain = server;
else mDomain = l[ l.count() - 2 ] + "." + l[ l.count() - 1 ];
@@ -61,23 +61,23 @@ SloxAccounts::~SloxAccounts()
if ( mDownloadJob ) mDownloadJob->kill();
}
-void SloxAccounts::insertUser( const QString &id, const KABC::Addressee &a )
+void SloxAccounts::insertUser( const TQString &id, const KABC::Addressee &a )
{
kdDebug() << "SloxAccount::insertUser() " << id << endl;
mUsers.replace( id, a );
- QString email = a.preferredEmail();
+ TQString email = a.preferredEmail();
- QString url = "http://" + mBaseUrl.host() + "/servlet/webdav.freebusy?username=";
+ TQString url = "http://" + mBaseUrl.host() + "/servlet/webdav.freebusy?username=";
url += id + "&server=" + mDomain;
KCal::FreeBusyUrlStore::self()->writeUrl( email, url );
}
-KABC::Addressee SloxAccounts::lookupUser( const QString &id )
+KABC::Addressee SloxAccounts::lookupUser( const TQString &id )
{
- QMap<QString, KABC::Addressee>::ConstIterator it;
+ TQMap<TQString, KABC::Addressee>::ConstIterator it;
it = mUsers.find( id );
if ( it == mUsers.end() ) {
requestAccounts();
@@ -87,11 +87,11 @@ KABC::Addressee SloxAccounts::lookupUser( const QString &id )
}
}
-QString SloxAccounts::lookupId( const QString &email )
+TQString SloxAccounts::lookupId( const TQString &email )
{
kdDebug() << "SloxAccounts::lookupId() " << email << endl;
- QMap<QString, KABC::Addressee>::ConstIterator it;
+ TQMap<TQString, KABC::Addressee>::ConstIterator it;
for( it = mUsers.begin(); it != mUsers.end(); ++it ) {
kdDebug() << "PREF: " << (*it).preferredEmail() << endl;
kdDebug() << "KEY: " << it.key() << endl;
@@ -126,9 +126,9 @@ void SloxAccounts::requestAccounts()
KURL url = mBaseUrl;
url.setPath( "/servlet/webdav.groupuser/" );
- QDomDocument doc;
- QDomElement root = WebdavHandler::addDavElement( doc, doc, "propfind" );
- QDomElement prop = WebdavHandler::addDavElement( doc, root, "prop" );
+ TQDomDocument doc;
+ TQDomElement root = WebdavHandler::addDavElement( doc, doc, "propfind" );
+ TQDomElement prop = WebdavHandler::addDavElement( doc, root, "prop" );
WebdavHandler::addSloxElement( mRes, doc, prop, "user", "*" );
WebdavHandler::addSloxElement( mRes, doc, prop, "group", "*" );
WebdavHandler::addSloxElement( mRes, doc, prop, "resource", "*" );
@@ -139,8 +139,8 @@ void SloxAccounts::requestAccounts()
mDownloadJob = KIO::davPropFind( url, doc, "0", false );
}
- connect( mDownloadJob, SIGNAL( result( KIO::Job * ) ),
- SLOT( slotResult( KIO::Job * ) ) );
+ connect( mDownloadJob, TQT_SIGNAL( result( KIO::Job * ) ),
+ TQT_SLOT( slotResult( KIO::Job * ) ) );
}
void SloxAccounts::slotResult( KIO::Job *job )
@@ -151,12 +151,12 @@ void SloxAccounts::slotResult( KIO::Job *job )
job->showErrorDialog( 0 );
} else {
if ( mRes->resType() == "ox" ) {
- QFile f( cacheFile() );
+ TQFile f( cacheFile() );
if ( !f.open( IO_WriteOnly ) ) {
kdWarning() << "Unable to open '" << cacheFile() << "'" << endl;
return;
}
- QTextStream stream ( &f );
+ TQTextStream stream ( &f );
stream << static_cast<KIO::DavJob*>( mDownloadJob )->response();
f.close();
}
@@ -166,11 +166,11 @@ void SloxAccounts::slotResult( KIO::Job *job )
mDownloadJob = 0;
}
-QString SloxAccounts::cacheFile() const
+TQString SloxAccounts::cacheFile() const
{
- QString host = mBaseUrl.host();
+ TQString host = mBaseUrl.host();
- QString file = locateLocal( "cache", "slox/accounts_" + host );
+ TQString file = locateLocal( "cache", "slox/accounts_" + host );
kdDebug() << "SloxAccounts::cacheFile(): " << file << endl;
@@ -181,34 +181,34 @@ void SloxAccounts::readAccounts()
{
kdDebug() << "SloxAccounts::readAccounts()" << endl;
- QFile f( cacheFile() );
+ TQFile f( cacheFile() );
if ( !f.open( IO_ReadOnly ) ) {
kdDebug() << "Unable to open '" << cacheFile() << "'" << endl;
requestAccounts();
return;
}
- QDomDocument doc;
+ TQDomDocument doc;
doc.setContent( &f );
// kdDebug() << "SLOX ACCOUNTS: " << doc.toString( 2 ) << endl;
- QDomElement docElement = doc.documentElement();
+ TQDomElement docElement = doc.documentElement();
mUsers.clear();
- QDomNodeList nodes = doc.elementsByTagName( mRes->resType() == "ox" ? "ox:user" : "user" );
+ TQDomNodeList nodes = doc.elementsByTagName( mRes->resType() == "ox" ? "ox:user" : "user" );
for( uint i = 0; i < nodes.count(); ++i ) {
- QDomElement element = nodes.item(i).toElement();
- QString id;
+ TQDomElement element = nodes.item(i).toElement();
+ TQString id;
KABC::Addressee a;
- 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();
// remove XML namespace
tag = tag.right( tag.length() - ( tag.find( ':' ) + 1 ) );
- QString value = e.text();
+ TQString value = e.text();
if ( tag == "uid" ) id = value;
else if ( tag == "mail" ) a.insertEmail( value, true );
else if ( tag == "forename" ) a.setGivenName( value );
diff --git a/kresources/slox/sloxaccounts.h b/kresources/slox/sloxaccounts.h
index ea3e664e2..bda5c4492 100644
--- a/kresources/slox/sloxaccounts.h
+++ b/kresources/slox/sloxaccounts.h
@@ -22,7 +22,7 @@
#include <kabc/addressee.h>
#include <kdepimmacros.h>
-#include <qobject.h>
+#include <tqobject.h>
namespace KIO {
class Job;
@@ -37,27 +37,27 @@ class KDE_EXPORT SloxAccounts : public QObject
SloxAccounts( SloxBase *res, const KURL &baseUrl );
~SloxAccounts();
- void insertUser( const QString &id, const KABC::Addressee &a );
+ void insertUser( const TQString &id, const KABC::Addressee &a );
- KABC::Addressee lookupUser( const QString &id );
+ KABC::Addressee lookupUser( const TQString &id );
- QString lookupId( const QString &email );
+ TQString lookupId( const TQString &email );
protected:
void requestAccounts();
void readAccounts();
- QString cacheFile() const;
+ TQString cacheFile() const;
protected slots:
void slotResult( KIO::Job * );
private:
- QString mDomain;
+ TQString mDomain;
KIO::Job *mDownloadJob;
- QMap<QString, KABC::Addressee> mUsers; // map users ids to addressees.
+ TQMap<TQString, KABC::Addressee> mUsers; // map users ids to addressees.
KURL mBaseUrl;
SloxBase *mRes;
diff --git a/kresources/slox/sloxbase.cpp b/kresources/slox/sloxbase.cpp
index c58990593..3871a2c7a 100644
--- a/kresources/slox/sloxbase.cpp
+++ b/kresources/slox/sloxbase.cpp
@@ -22,7 +22,7 @@
#include <kdebug.h>
#include <kresources/resource.h>
-static QString mFieldNameMap[][2] =
+static TQString mFieldNameMap[][2] =
{
// SLOX, OX
{"sloxid", "object_id"}, // system fields
@@ -106,14 +106,14 @@ SloxBase::SloxBase( KRES::Resource * res ) :
{
}
-QString SloxBase::decodeText( const QString & text )
+TQString SloxBase::decodeText( const TQString & text )
{
if ( mRes->type() == "ox" )
return text;
- return QString::fromUtf8( text.latin1() );
+ return TQString::fromUtf8( text.latin1() );
}
-QString SloxBase::fieldName( Field f )
+TQString SloxBase::fieldName( Field f )
{
int t = 0;
if ( mRes->type() == "ox" )
@@ -121,12 +121,12 @@ QString SloxBase::fieldName( Field f )
return mFieldNameMap[f][t];
}
-QString SloxBase::resType( ) const
+TQString SloxBase::resType( ) const
{
return mRes->type();
}
-QString SloxBase::boolToStr( bool b )
+TQString SloxBase::boolToStr( bool b )
{
if ( mRes->type() == "ox" ) {
if ( b )
diff --git a/kresources/slox/sloxbase.h b/kresources/slox/sloxbase.h
index 90afb16fa..7047ed28d 100644
--- a/kresources/slox/sloxbase.h
+++ b/kresources/slox/sloxbase.h
@@ -20,7 +20,7 @@
#ifndef SLOXUTILS_H
#define SLOXUTILS_H
-#include <qstring.h>
+#include <tqstring.h>
#include <kdepimmacros.h>
namespace KRES {
@@ -103,10 +103,10 @@ class KDE_EXPORT SloxBase {
SloxBase( KRES::Resource *res );
- QString decodeText( const QString &text );
- QString fieldName( Field f );
- QString resType() const;
- QString boolToStr( bool b );
+ TQString decodeText( const TQString &text );
+ TQString fieldName( Field f );
+ TQString resType() const;
+ TQString boolToStr( bool b );
private:
KRES::Resource *mRes;
diff --git a/kresources/slox/sloxfolder.cpp b/kresources/slox/sloxfolder.cpp
index 157463149..fbfb9f051 100644
--- a/kresources/slox/sloxfolder.cpp
+++ b/kresources/slox/sloxfolder.cpp
@@ -21,7 +21,7 @@
#include "sloxfolder.h"
-SloxFolder::SloxFolder( const QString &id, const QString &parentId, const QString &type, const QString &name, bool def ) :
+SloxFolder::SloxFolder( const TQString &id, const TQString &parentId, const TQString &type, const TQString &name, bool def ) :
item( 0 ),
mId( id ),
mParentId( parentId ),
@@ -38,7 +38,7 @@ SloxFolder::SloxFolder( const QString &id, const QString &parentId, const QStrin
mType = Unbound;
}
-QString SloxFolder::name( ) const
+TQString SloxFolder::name( ) const
{
// special cases for system folders
if ( mName == "system_global" )
diff --git a/kresources/slox/sloxfolder.h b/kresources/slox/sloxfolder.h
index bda529ba4..e27399a66 100644
--- a/kresources/slox/sloxfolder.h
+++ b/kresources/slox/sloxfolder.h
@@ -20,7 +20,7 @@
#ifndef SLOXFOLDER_H
#define SLOXFOLDER_H
-#include <qstring.h>
+#include <tqstring.h>
#include <kdepimmacros.h>
class KListViewItem;
@@ -35,20 +35,20 @@ enum FolderType {
class KDE_EXPORT SloxFolder
{
public:
- SloxFolder( const QString &id, const QString &parentId, const QString &type, const QString &name, bool def = false );
+ SloxFolder( const TQString &id, const TQString &parentId, const TQString &type, const TQString &name, bool def = false );
- QString id() const { return mId; }
- QString parentId() const { return mParentId; }
+ TQString id() const { return mId; }
+ TQString parentId() const { return mParentId; }
FolderType type() const { return mType; }
- QString name() const;
+ TQString name() const;
bool isDefault() const { return mDefault; }
KListViewItem *item;
private:
- QString mId, mParentId;
+ TQString mId, mParentId;
FolderType mType;
- QString mName;
+ TQString mName;
bool mDefault;
};
diff --git a/kresources/slox/sloxfolderdialog.cpp b/kresources/slox/sloxfolderdialog.cpp
index b188fb2fa..4f17ea893 100644
--- a/kresources/slox/sloxfolderdialog.cpp
+++ b/kresources/slox/sloxfolderdialog.cpp
@@ -25,7 +25,7 @@
#include "sloxfolderdialog.h"
#include "sloxfoldermanager.h"
-SloxFolderDialog::SloxFolderDialog( SloxFolderManager *manager, FolderType type, QWidget *parent, const char *name ) :
+SloxFolderDialog::SloxFolderDialog( SloxFolderManager *manager, FolderType type, TQWidget *parent, const char *name ) :
KDialogBase( parent, name, true, i18n("Select Folder"), Ok|Cancel|User1, Ok, false, KGuiItem( i18n("Reload"), "reload" ) ),
mManager( manager ),
mFolderType( type )
@@ -37,23 +37,23 @@ SloxFolderDialog::SloxFolderDialog( SloxFolderManager *manager, FolderType type,
mListView->addColumn( i18n("Folder ID"), 0 );
setMainWidget( mListView );
updateFolderView();
- connect( manager, SIGNAL( foldersUpdated() ), SLOT( updateFolderView() ) );
+ connect( manager, TQT_SIGNAL( foldersUpdated() ), TQT_SLOT( updateFolderView() ) );
}
SloxFolderDialog::~SloxFolderDialog()
{
- QMap<QString, SloxFolder*> folders = mManager->folders();
- QMap<QString, SloxFolder*>::Iterator it;
+ TQMap<TQString, SloxFolder*> folders = mManager->folders();
+ TQMap<TQString, SloxFolder*>::Iterator it;
for ( it = folders.begin(); it != folders.end(); ++it )
(*it)->item = 0;
}
void SloxFolderDialog::updateFolderView()
{
- QString selected = selectedFolder();
+ TQString selected = selectedFolder();
mListView->clear();
- QMap<QString, SloxFolder*> folders = mManager->folders();
- QMap<QString, SloxFolder*>::Iterator it;
+ TQMap<TQString, SloxFolder*> folders = mManager->folders();
+ TQMap<TQString, SloxFolder*>::Iterator it;
for ( it = folders.begin(); it != folders.end(); ++it )
createFolderViewItem( *it );
setSelectedFolder( selected );
@@ -99,18 +99,18 @@ void SloxFolderDialog::createFolderViewItem( SloxFolder *folder )
}
}
-QString SloxFolderDialog::selectedFolder() const
+TQString SloxFolderDialog::selectedFolder() const
{
- QListViewItem *item = mListView->selectedItem();
+ TQListViewItem *item = mListView->selectedItem();
if ( item )
return item->text( 1 );
return "-1"; // OX default folder
}
-void SloxFolderDialog::setSelectedFolder( const QString &id )
+void SloxFolderDialog::setSelectedFolder( const TQString &id )
{
- QMap<QString, SloxFolder*> folders = mManager->folders();
- QMap<QString, SloxFolder*>::Iterator it;
+ TQMap<TQString, SloxFolder*> folders = mManager->folders();
+ TQMap<TQString, SloxFolder*>::Iterator it;
for ( it = folders.begin(); it != folders.end(); ++it ) {
if ( !(*it)->item )
continue;
diff --git a/kresources/slox/sloxfolderdialog.h b/kresources/slox/sloxfolderdialog.h
index 37287d1b1..6432a6495 100644
--- a/kresources/slox/sloxfolderdialog.h
+++ b/kresources/slox/sloxfolderdialog.h
@@ -19,7 +19,7 @@
#ifndef SLOXFOLDERDIALOG_H
#define SLOXFOLDERDIALOG_H
-#include <qstring.h>
+#include <tqstring.h>
#include <kdialogbase.h>
#include "sloxfolder.h"
@@ -32,11 +32,11 @@ class SloxFolderDialog : public KDialogBase
{
Q_OBJECT
public:
- SloxFolderDialog( SloxFolderManager *manager, FolderType type, QWidget* parent = 0, const char *name = 0 );
+ SloxFolderDialog( SloxFolderManager *manager, FolderType type, TQWidget* parent = 0, const char *name = 0 );
~SloxFolderDialog();
- QString selectedFolder() const;
- void setSelectedFolder( const QString &id );
+ TQString selectedFolder() const;
+ void setSelectedFolder( const TQString &id );
protected slots:
virtual void slotUser1();
@@ -48,7 +48,7 @@ class SloxFolderDialog : public KDialogBase
private:
KListView *mListView;
SloxFolderManager *mManager;
- QString mFolderId;
+ TQString mFolderId;
FolderType mFolderType;
};
diff --git a/kresources/slox/sloxfoldermanager.cpp b/kresources/slox/sloxfoldermanager.cpp
index b693767ca..41864caf8 100644
--- a/kresources/slox/sloxfoldermanager.cpp
+++ b/kresources/slox/sloxfoldermanager.cpp
@@ -17,9 +17,9 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#include <qfile.h>
-#include <qdom.h>
-#include <qstring.h>
+#include <tqfile.h>
+#include <tqdom.h>
+#include <tqstring.h>
#include <kdebug.h>
#include <kio/job.h>
@@ -46,7 +46,7 @@ SloxFolderManager::~SloxFolderManager()
{
if ( mDownloadJob )
mDownloadJob->kill();
- QMap<QString, SloxFolder*>::Iterator it;
+ TQMap<TQString, SloxFolder*>::Iterator it;
for ( it = mFolders.begin(); it != mFolders.end(); ++it )
delete *it;
mFolders.clear();
@@ -64,9 +64,9 @@ void SloxFolderManager::requestFolders()
KURL url = mBaseUrl;
url.setPath( "/servlet/webdav.folders/file.xml" );
- QDomDocument doc;
- QDomElement root = WebdavHandler::addDavElement( doc, doc, "propfind" );
- QDomElement prop = WebdavHandler::addDavElement( doc, root, "prop" );
+ TQDomDocument doc;
+ TQDomElement root = WebdavHandler::addDavElement( doc, doc, "propfind" );
+ TQDomElement prop = WebdavHandler::addDavElement( doc, root, "prop" );
WebdavHandler::addSloxElement( mRes, doc, prop, "objectmode", "NEW_AND_MODIFIED" );
WebdavHandler::addSloxElement( mRes, doc, prop, "lastsync", "0" );
WebdavHandler::addSloxElement( mRes, doc, prop, "foldertype", "PRIVATE" );
@@ -79,8 +79,8 @@ void SloxFolderManager::requestFolders()
mDownloadJob = KIO::davPropFind( url, doc, "0", false );
- connect( mDownloadJob, SIGNAL( result( KIO::Job * ) ),
- SLOT( slotResult( KIO::Job * ) ) );
+ connect( mDownloadJob, TQT_SIGNAL( result( KIO::Job * ) ),
+ TQT_SLOT( slotResult( KIO::Job * ) ) );
}
void SloxFolderManager::slotResult( KIO::Job *job )
@@ -91,12 +91,12 @@ void SloxFolderManager::slotResult( KIO::Job *job )
job->showErrorDialog( 0 );
} else {
kdDebug() << k_funcinfo << " success, writing to " << cacheFile() << endl;
- QFile f( cacheFile() );
+ TQFile f( cacheFile() );
if ( !f.open( IO_WriteOnly ) ) {
kdDebug() << "Unable to open '" << cacheFile() << "'" << endl;
return;
}
- QTextStream stream ( &f );
+ TQTextStream stream ( &f );
stream << mDownloadJob->response();
f.close();
readFolders();
@@ -106,11 +106,11 @@ void SloxFolderManager::slotResult( KIO::Job *job )
emit foldersUpdated();
}
-QString SloxFolderManager::cacheFile() const
+TQString SloxFolderManager::cacheFile() const
{
- QString host = mBaseUrl.host();
+ TQString host = mBaseUrl.host();
- QString file = locateLocal( "cache", "slox/folders_" + host );
+ TQString file = locateLocal( "cache", "slox/folders_" + host );
kdDebug() << k_funcinfo << file << endl;
@@ -121,29 +121,29 @@ void SloxFolderManager::readFolders()
{
kdDebug() << k_funcinfo << endl;
- QFile f( cacheFile() );
+ TQFile f( cacheFile() );
if ( !f.open( IO_ReadOnly ) ) {
kdDebug() << "Unable to open '" << cacheFile() << "'" << endl;
requestFolders();
return;
}
- QDomDocument doc;
+ TQDomDocument doc;
doc.setContent( &f );
mFolders.clear();
- QDomNodeList nodes = doc.elementsByTagName( "D:prop" );
+ TQDomNodeList nodes = doc.elementsByTagName( "D:prop" );
for( uint i = 0; i < nodes.count(); ++i ) {
- QDomElement element = nodes.item(i).toElement();
- QString id = "-1", parentId = "-1"; // OX default folder
+ TQDomElement element = nodes.item(i).toElement();
+ TQString id = "-1", parentId = "-1"; // OX default folder
bool def = false;
- QString name, type;
- QDomNode n;
+ TQString name, type;
+ TQDomNode n;
for( n = element.firstChild(); !n.isNull(); n = n.nextSibling() ) {
- QDomElement e = n.toElement();
- QString tag = e.tagName();
- QString value = e.text();
+ TQDomElement e = n.toElement();
+ TQString tag = e.tagName();
+ TQString value = e.text();
if ( tag == "ox:object_id" ) id = value;
else if ( tag == "ox:folder_id" ) parentId = value;
else if ( tag == "ox:title" ) name = value;
diff --git a/kresources/slox/sloxfoldermanager.h b/kresources/slox/sloxfoldermanager.h
index 3adac2061..832c70675 100644
--- a/kresources/slox/sloxfoldermanager.h
+++ b/kresources/slox/sloxfoldermanager.h
@@ -20,8 +20,8 @@
#ifndef SLOXFOLDERMANAGER_H
#define SLOXFOLDERMANAGER_H
-#include <qmap.h>
-#include <qobject.h>
+#include <tqmap.h>
+#include <tqobject.h>
#include <kurl.h>
@@ -42,7 +42,7 @@ class KDE_EXPORT SloxFolderManager : public QObject
SloxFolderManager( SloxBase *res, const KURL &baseUrl );
~SloxFolderManager();
- QMap<QString, SloxFolder*> folders() const { return mFolders; }
+ TQMap<TQString, SloxFolder*> folders() const { return mFolders; }
void requestFolders();
signals:
@@ -51,7 +51,7 @@ class KDE_EXPORT SloxFolderManager : public QObject
protected:
void readFolders();
- QString cacheFile() const;
+ TQString cacheFile() const;
protected slots:
void slotResult( KIO::Job * );
@@ -59,7 +59,7 @@ class KDE_EXPORT SloxFolderManager : public QObject
private:
KIO::DavJob *mDownloadJob;
KURL mBaseUrl;
- QMap<QString, SloxFolder*> mFolders;
+ TQMap<TQString, SloxFolder*> mFolders;
SloxBase *mRes;
};
diff --git a/kresources/slox/testsloxaccounts.cpp b/kresources/slox/testsloxaccounts.cpp
index c1cc75d3e..6ad10c1b1 100644
--- a/kresources/slox/testsloxaccounts.cpp
+++ b/kresources/slox/testsloxaccounts.cpp
@@ -25,7 +25,7 @@
#include <kdebug.h>
#include <kcmdlineargs.h>
-#include <qpushbutton.h>
+#include <tqpushbutton.h>
static const KCmdLineOptions options[] =
{
@@ -48,14 +48,14 @@ int main(int argc,char **argv)
bool verbose = false;
if ( args->isSet( "verbose" ) ) verbose = true;
- QPushButton button( "Close", 0 );
+ TQPushButton button( "Close", 0 );
SloxAccounts::setServer( "f85.suse.de" );
SloxAccounts::self();
app.setMainWidget( &button );
button.show();
- QObject::connect( &button, SIGNAL( clicked() ), &app, SLOT( quit() ) );
+ TQObject::connect( &button, TQT_SIGNAL( clicked() ), &app, TQT_SLOT( quit() ) );
app.exec();
}
diff --git a/kresources/slox/webdavhandler.cpp b/kresources/slox/webdavhandler.cpp
index 511373d51..3f1b6be86 100644
--- a/kresources/slox/webdavhandler.cpp
+++ b/kresources/slox/webdavhandler.cpp
@@ -39,7 +39,7 @@
#include <kdebug.h>
#include <kconfig.h>
-#include <qfile.h>
+#include <tqfile.h>
SloxItem::SloxItem()
: status( Invalid )
@@ -57,81 +57,81 @@ WebdavHandler::WebdavHandler()
kdDebug() << "LOG FILE: " << mLogFile << endl;
}
-void WebdavHandler::setUserId( const QString &id )
+void WebdavHandler::setUserId( const TQString &id )
{
mUserId = id;
}
-QString WebdavHandler::userId() const
+TQString WebdavHandler::userId() const
{
return mUserId;
}
-void WebdavHandler::log( const QString &text )
+void WebdavHandler::log( const TQString &text )
{
if ( mLogFile.isEmpty() ) return;
- QString filename = mLogFile + "-" + QString::number( mLogCount );
- QFile file( filename );
+ TQString filename = mLogFile + "-" + TQString::number( mLogCount );
+ TQFile file( filename );
if ( !file.open( IO_WriteOnly ) ) {
kdWarning() << "Unable to open log file '" << filename << "'" << endl;
return;
}
- QCString textUtf8 = text.utf8();
+ TQCString textUtf8 = text.utf8();
file.writeBlock( textUtf8.data(), textUtf8.size() - 1 );
if ( ++mLogCount > 5 ) mLogCount = 0;
}
-QValueList<SloxItem> WebdavHandler::getSloxItems( SloxBase *res, const QDomDocument &doc )
+TQValueList<SloxItem> WebdavHandler::getSloxItems( SloxBase *res, const TQDomDocument &doc )
{
kdDebug() << "getSloxItems" << endl;
- QValueList<SloxItem> items;
+ TQValueList<SloxItem> items;
- QDomElement docElement = doc.documentElement();
+ TQDomElement docElement = doc.documentElement();
- QDomNode responseNode;
+ TQDomNode responseNode;
for( responseNode = docElement.firstChild(); !responseNode.isNull();
responseNode = responseNode.nextSibling() ) {
- QDomElement responseElement = responseNode.toElement();
+ TQDomElement responseElement = responseNode.toElement();
if ( responseElement.tagName() == "response" ) {
SloxItem item;
- QDomNode propstat = responseElement.namedItem( "propstat" );
+ TQDomNode propstat = responseElement.namedItem( "propstat" );
if ( propstat.isNull() ) {
kdError() << "Unable to find propstat tag." << endl;
continue;
}
- QDomNode prop = propstat.namedItem( "prop" );
+ TQDomNode prop = propstat.namedItem( "prop" );
if ( prop.isNull() ) {
kdError() << "Unable to find WebDAV property" << endl;
continue;
}
item.domNode = prop;
- QDomNode sloxIdNode = prop.namedItem( res->fieldName( SloxBase::ObjectId ) );
+ TQDomNode sloxIdNode = prop.namedItem( res->fieldName( SloxBase::ObjectId ) );
if ( sloxIdNode.isNull() ) {
kdError() << "Unable to find SLOX id." << endl;
continue;
}
- QDomElement sloxIdElement = sloxIdNode.toElement();
+ TQDomElement sloxIdElement = sloxIdNode.toElement();
item.sloxId = sloxIdElement.text();
- QDomNode clientIdNode = prop.namedItem( res->fieldName( SloxBase::ClientId ) );
+ TQDomNode clientIdNode = prop.namedItem( res->fieldName( SloxBase::ClientId ) );
if ( !clientIdNode.isNull() ) {
- QDomElement clientIdElement = clientIdNode.toElement();
+ TQDomElement clientIdElement = clientIdNode.toElement();
item.clientId = clientIdElement.text();
if ( item.clientId != item.sloxId )
item.status = SloxItem::New;
}
- QDomNode sloxStatus = prop.namedItem( res->fieldName( SloxBase::ObjectStatus ) );
+ TQDomNode sloxStatus = prop.namedItem( res->fieldName( SloxBase::ObjectStatus ) );
if ( !sloxStatus.isNull() ) {
- QDomElement sloxStatusElement = sloxStatus.toElement();
+ TQDomElement sloxStatusElement = sloxStatus.toElement();
if ( sloxStatusElement.text() == "DELETE" ) {
item.status = SloxItem::Delete;
} else if ( sloxStatusElement.text() == "CREATE" ) {
@@ -139,14 +139,14 @@ QValueList<SloxItem> WebdavHandler::getSloxItems( SloxBase *res, const QDomDocum
}
}
- QDomNode status = propstat.namedItem( "status" );
+ TQDomNode status = propstat.namedItem( "status" );
if ( status.isNull() ) {
kdError() << "Unable to find WebDAV status" << endl;
continue;
}
item.response = status.toElement().text();
- QDomNode desc = propstat.namedItem( "responsedescription" );
+ TQDomNode desc = propstat.namedItem( "responsedescription" );
if ( desc.isNull() ) {
kdError() << "Unable to find WebDAV responsedescription" << endl;
continue;
@@ -160,22 +160,22 @@ QValueList<SloxItem> WebdavHandler::getSloxItems( SloxBase *res, const QDomDocum
return items;
}
-QString WebdavHandler::qDateTimeToSlox( const QDateTime &dt )
+TQString WebdavHandler::qDateTimeToSlox( const TQDateTime &dt )
{
- uint ticks = -dt.secsTo( QDateTime( QDate( 1970, 1, 1 ), QTime( 0, 0 ) ) );
+ uint ticks = -dt.secsTo( TQDateTime( TQDate( 1970, 1, 1 ), TQTime( 0, 0 ) ) );
- return QString::number( ticks ) + "000";
+ return TQString::number( ticks ) + "000";
}
-QString WebdavHandler::qDateTimeToSlox( const QDateTime &dt,
- const QString &timeZoneId )
+TQString WebdavHandler::qDateTimeToSlox( const TQDateTime &dt,
+ const TQString &timeZoneId )
{
- QDateTime utc = KPimPrefs::localTimeToUtc( dt, timeZoneId );
+ TQDateTime utc = KPimPrefs::localTimeToUtc( dt, timeZoneId );
// secsTo and toTime_t etc also perform a timezone conversion using the system timezone,
// but we want to use the calendar timezone, so we have to convert ourself and spoof the tz to UTC before
// converting to ticks to prevent this
- QCString origTz = getenv("TZ");
+ TQCString origTz = getenv("TZ");
setenv( "TZ", "UTC", 1 );
uint ticks = utc.toTime_t();
if ( origTz.isNull() )
@@ -183,12 +183,12 @@ QString WebdavHandler::qDateTimeToSlox( const QDateTime &dt,
else
setenv( "TZ", origTz, 1 );
- return QString::number( ticks ) + "000";
+ return TQString::number( ticks ) + "000";
}
-QDateTime WebdavHandler::sloxToQDateTime( const QString &str )
+TQDateTime WebdavHandler::sloxToQDateTime( const TQString &str )
{
- QString s = str.mid( 0, str.length() - 3 );
+ TQString s = str.mid( 0, str.length() - 3 );
bool preEpoch = s.startsWith("-");
if (preEpoch)
@@ -196,7 +196,7 @@ QDateTime WebdavHandler::sloxToQDateTime( const QString &str )
unsigned long ticks = s.toULong();
- QDateTime dt;
+ TQDateTime dt;
if (preEpoch) {
dt.setTime_t( 0, Qt::UTC );
@@ -214,60 +214,60 @@ QDateTime WebdavHandler::sloxToQDateTime( const QString &str )
return dt;
}
-QDateTime WebdavHandler::sloxToQDateTime( const QString &str,
- const QString &timeZoneId )
+TQDateTime WebdavHandler::sloxToQDateTime( const TQString &str,
+ const TQString &timeZoneId )
{
return KPimPrefs::utcToLocalTime( sloxToQDateTime(str), timeZoneId );
}
-QDomElement WebdavHandler::addElement( QDomDocument &doc, QDomNode &node,
- const QString &tag )
+TQDomElement WebdavHandler::addElement( TQDomDocument &doc, TQDomNode &node,
+ const TQString &tag )
{
- QDomElement el = doc.createElement( tag );
+ TQDomElement el = doc.createElement( tag );
node.appendChild( el );
return el;
}
-QDomElement WebdavHandler::addDavElement( QDomDocument &doc, QDomNode &node,
- const QString &tag )
+TQDomElement WebdavHandler::addDavElement( TQDomDocument &doc, TQDomNode &node,
+ const TQString &tag )
{
- QDomElement el = doc.createElementNS( "DAV:", "D:" + tag );
+ TQDomElement el = doc.createElementNS( "DAV:", "D:" + tag );
node.appendChild( el );
return el;
}
-QDomElement WebdavHandler::addSloxElement( SloxBase *res,
- QDomDocument &doc, QDomNode &node,
- const QString &tag,
- const QString &text )
+TQDomElement WebdavHandler::addSloxElement( SloxBase *res,
+ TQDomDocument &doc, TQDomNode &node,
+ const TQString &tag,
+ const TQString &text )
{
- QDomElement el;
+ TQDomElement el;
if ( res->resType() == "ox" )
el = doc.createElementNS( "http://www.open-xchange.org", "ox:" + tag );
else
el = doc.createElementNS( "SLOX", "S:" + tag );
if ( !text.isEmpty() ) {
- QDomText textnode = doc.createTextNode( text );
+ TQDomText textnode = doc.createTextNode( text );
el.appendChild( textnode );
}
node.appendChild( el );
return el;
}
-void WebdavHandler::parseSloxAttribute( const QDomElement &e )
+void WebdavHandler::parseSloxAttribute( const TQDomElement &e )
{
// kdDebug() << "parseSloxAttribute" << endl;
- QString tag = e.tagName();
- QString text = QString::fromUtf8( e.text().latin1() );
+ TQString tag = e.tagName();
+ TQString text = TQString::fromUtf8( e.text().latin1() );
if ( text.isEmpty() ) return;
if ( tag == "owner" ) {
if ( text == mUserId ) mWritable = true;
} else if ( tag == "writerights" ) {
- QDomNode n;
+ TQDomNode n;
for( n = e.firstChild(); !n.isNull(); n = n.nextSibling() ) {
- QDomElement e2 = n.toElement();
+ TQDomElement e2 = n.toElement();
if ( e2.tagName() == "member" ) {
if ( e2.text() == mUserId ) mWritable = true;
}
diff --git a/kresources/slox/webdavhandler.h b/kresources/slox/webdavhandler.h
index b41499a4a..2d4286193 100644
--- a/kresources/slox/webdavhandler.h
+++ b/kresources/slox/webdavhandler.h
@@ -20,10 +20,10 @@
#ifndef WEBDAVHANDLER_H
#define WEBDAVHANDLER_H
-#include <qvaluelist.h>
-#include <qstring.h>
-#include <qdatetime.h>
-#include <qdom.h>
+#include <tqvaluelist.h>
+#include <tqstring.h>
+#include <tqdatetime.h>
+#include <tqdom.h>
#include <kdepimmacros.h>
#include <kabc/addressee.h>
@@ -41,12 +41,12 @@ class KDE_EXPORT SloxItem
SloxItem();
- QDomNode domNode;
- QString sloxId;
- QString clientId;
+ TQDomNode domNode;
+ TQString sloxId;
+ TQString clientId;
Status status;
- QString response;
- QString responseDescription;
+ TQString response;
+ TQString responseDescription;
};
class KDE_EXPORT WebdavHandler
@@ -54,41 +54,41 @@ class KDE_EXPORT WebdavHandler
public:
WebdavHandler();
- void setUserId( const QString & );
- QString userId() const;
+ void setUserId( const TQString & );
+ TQString userId() const;
void setResource( SloxBase *res ) { mRes = res; }
- void log( const QString & );
+ void log( const TQString & );
- static QDomElement addElement( QDomDocument &, QDomNode &,
- const QString &tag );
- static QDomElement addDavElement( QDomDocument &, QDomNode &,
- const QString &tag );
- static QDomElement addSloxElement( SloxBase *res,
- QDomDocument &, QDomNode &,
- const QString &tag,
- const QString &text = QString::null );
+ static TQDomElement addElement( TQDomDocument &, TQDomNode &,
+ const TQString &tag );
+ static TQDomElement addDavElement( TQDomDocument &, TQDomNode &,
+ const TQString &tag );
+ static TQDomElement addSloxElement( SloxBase *res,
+ TQDomDocument &, TQDomNode &,
+ const TQString &tag,
+ const TQString &text = TQString::null );
- static QDateTime sloxToQDateTime( const QString &str );
- static QDateTime sloxToQDateTime( const QString &str,
- const QString &timeZoneId );
- static QString qDateTimeToSlox( const QDateTime &dt );
- static QString qDateTimeToSlox( const QDateTime &dt,
- const QString &timeZoneId );
+ static TQDateTime sloxToQDateTime( const TQString &str );
+ static TQDateTime sloxToQDateTime( const TQString &str,
+ const TQString &timeZoneId );
+ static TQString qDateTimeToSlox( const TQDateTime &dt );
+ static TQString qDateTimeToSlox( const TQDateTime &dt,
+ const TQString &timeZoneId );
- static QValueList<SloxItem> getSloxItems( SloxBase *res, const QDomDocument &doc );
+ static TQValueList<SloxItem> getSloxItems( SloxBase *res, const TQDomDocument &doc );
void clearSloxAttributeStatus();
- void parseSloxAttribute( const QDomElement & );
+ void parseSloxAttribute( const TQDomElement & );
void setSloxAttributes( KCal::Incidence * );
void setSloxAttributes( KABC::Addressee & );
private:
- QString mLogFile;
+ TQString mLogFile;
int mLogCount;
SloxBase *mRes;
- QString mUserId;
+ TQString mUserId;
bool mWritable;
};
diff --git a/kresources/tvanytime/kcal_resourcetvanytime.cpp b/kresources/tvanytime/kcal_resourcetvanytime.cpp
index 51cfa5d22..83ae49bb9 100644
--- a/kresources/tvanytime/kcal_resourcetvanytime.cpp
+++ b/kresources/tvanytime/kcal_resourcetvanytime.cpp
@@ -30,13 +30,13 @@
#include <libkdepim/kpimprefs.h>
-#include <qapplication.h>
-#include <qdom.h>
-#include <qdatetime.h>
-#include <qptrlist.h>
-#include <qregexp.h>
-#include <qstringlist.h>
-#include <qtimer.h>
+#include <tqapplication.h>
+#include <tqdom.h>
+#include <tqdatetime.h>
+#include <tqptrlist.h>
+#include <tqregexp.h>
+#include <tqstringlist.h>
+#include <tqtimer.h>
#include <kabc/locknull.h>
#include <karchive.h>
@@ -93,8 +93,8 @@ void ResourceTVAnytime::init()
//setReadOnly( true );
- connect( &mResourceChangedTimer, SIGNAL( timeout() ),
- this, SLOT( slotEmitResourceChanged() ) );
+ connect( &mResourceChangedTimer, TQT_SIGNAL( timeout() ),
+ this, TQT_SLOT( slotEmitResourceChanged() ) );
}
TVAnytimePrefsBase *ResourceTVAnytime::prefs()
@@ -110,7 +110,7 @@ void ResourceTVAnytime::readConfig( const KConfig *config )
ResourceCached::readConfig( config );
- QStringList defaultActive;
+ TQStringList defaultActive;
defaultActive << "BBCOne" << "BBCTwo" << "BBCThree" << "BBCROne" << "BBCRTwo" << "BBCRThree" << "BBCRFour";
mActiveServices = config->readListEntry( "ActiveServices", defaultActive );
@@ -125,7 +125,7 @@ void ResourceTVAnytime::writeConfig( KConfig *config )
mPrefs->writeConfig();
ResourceCached::writeConfig( config );
- QStringList activeServices;
+ TQStringList activeServices;
ServiceMap::ConstIterator it;
for ( it = mServiceMap.begin(); it != mServiceMap.end(); ++it )
if ( it.data().active() )
@@ -179,15 +179,15 @@ bool ResourceTVAnytime::doLoad()
// TODO: find out if the file to download is fresh. if not, just work with the cache.
mDownloadJob = KIO::file_copy( url, destination, -1, true );
- connect( mDownloadJob, SIGNAL( result( KIO::Job * ) ),
- SLOT( slotJobResult( KIO::Job * ) ) );
+ connect( mDownloadJob, TQT_SIGNAL( result( KIO::Job * ) ),
+ TQT_SLOT( slotJobResult( KIO::Job * ) ) );
mProgress = KPIM::ProgressManager::instance()->createProgressItem(
KPIM::ProgressManager::getUniqueID(), i18n("Downloading program schedule") );
connect( mProgress,
- SIGNAL( progressItemCanceled( KPIM::ProgressItem * ) ),
- SLOT( cancelLoad() ) );
+ TQT_SIGNAL( progressItemCanceled( KPIM::ProgressItem * ) ),
+ TQT_SLOT( cancelLoad() ) );
return true;
}
@@ -228,9 +228,9 @@ void ResourceTVAnytime::slotJobResult( KIO::Job *job )
mDestination = 0;
}
-QDomDocument ResourceTVAnytime::archiveFileXml( const QString & name )
+TQDomDocument ResourceTVAnytime::archiveFileXml( const TQString & name )
{
- QDomDocument result;
+ TQDomDocument result;
const KArchiveDirectory *dir = mScheduleArchive->directory();
const KArchiveEntry * entry = dir->entry( name );
if ( entry && entry->isFile() )
@@ -243,11 +243,11 @@ QDomDocument ResourceTVAnytime::archiveFileXml( const QString & name )
bool ResourceTVAnytime::readSchedule()
{
- QString uncompress = "application/x-gzip";
+ TQString uncompress = "application/x-gzip";
mScheduleArchive = new KTar( mDestination->name(), uncompress );
mScheduleArchive->open( IO_ReadOnly );
- QDomDocument serviceInfo = archiveFileXml( "ServiceInformation.xml" );
+ TQDomDocument serviceInfo = archiveFileXml( "ServiceInformation.xml" );
if ( !serviceInfo.isNull() )
readServiceInformation( serviceInfo );
@@ -261,7 +261,7 @@ bool ResourceTVAnytime::readSchedule()
readService( it.key() );
}
#else
- QString serviceId = "BBCOne";
+ TQString serviceId = "BBCOne";
Service s = mServiceMap[ serviceId ];
if ( s.active() )
readService( serviceId );
@@ -271,22 +271,22 @@ bool ResourceTVAnytime::readSchedule()
return true;
}
-bool ResourceTVAnytime::readServiceInformation( const QDomDocument & serviceInfo )
+bool ResourceTVAnytime::readServiceInformation( const TQDomDocument & serviceInfo )
{
kdDebug() << k_funcinfo << endl;
- QDomElement docElem = serviceInfo.documentElement();
+ TQDomElement docElem = serviceInfo.documentElement();
- QDomNode n = docElem.firstChild();
+ TQDomNode n = docElem.firstChild();
while( !n.isNull() ) {
- QDomElement e = n.toElement(); // try to convert the node to an element.
+ TQDomElement e = n.toElement(); // try to convert the node to an element.
if( !e.isNull() && e.tagName() == "ProgramDescription" ) {
- QDomNode n2 = e.firstChild();
- QDomElement e2 = n2.toElement();
+ TQDomNode n2 = e.firstChild();
+ TQDomElement e2 = n2.toElement();
if( !e2.isNull() && e2.tagName() == "ServiceInformationTable" ) {
- QDomNode n3 = e2.firstChild();
+ TQDomNode n3 = e2.firstChild();
while ( !n3.isNull() ) {
Service s;
- QDomElement e3 = n3.toElement();
+ TQDomElement e3 = n3.toElement();
if (s.loadXML( e3 ) ) {
s.setActive( mActiveServices.contains( s.id() ) );
bool newService = !mServiceMap.contains( s.id() );
@@ -311,24 +311,24 @@ bool ResourceTVAnytime::readServiceInformation( const QDomDocument & serviceInfo
return true;
}
-bool ResourceTVAnytime::readService( const QString & serviceId )
+bool ResourceTVAnytime::readService( const TQString & serviceId )
{
kdDebug() << k_funcinfo << endl;
// open programme information table
Service service = mServiceMap[ serviceId ];
- QStringList entries = mScheduleArchive->directory()->entries();
- QRegExp re( "^(\\d{8})" + serviceId );
- QStringList dates;
- QString todaysDate = QDate::currentDate().toString( "yyyyMMdd" );
- for( QStringList::Iterator it = entries.begin(); it != entries.end(); ++it )
+ TQStringList entries = mScheduleArchive->directory()->entries();
+ TQRegExp re( "^(\\d{8})" + serviceId );
+ TQStringList dates;
+ TQString todaysDate = TQDate::currentDate().toString( "yyyyMMdd" );
+ for( TQStringList::Iterator it = entries.begin(); it != entries.end(); ++it )
{
if ( re.search( *it ) != -1 ) // this entry belongs to the requested service
{
- QString entry = re.cap( 1 );
+ TQString entry = re.cap( 1 );
// handle this date according to user preferences
- QDate entryDate( entry.left( 4 ).toInt(), entry.mid( 4, 2 ).toInt(), entry.right( 2 ).toInt() );
- if ( entryDate < QDate::currentDate() || ( entryDate > QDate::currentDate().addDays( prefs()->days() - 1 ) ) )
+ TQDate entryDate( entry.left( 4 ).toInt(), entry.mid( 4, 2 ).toInt(), entry.right( 2 ).toInt() );
+ if ( entryDate < TQDate::currentDate() || ( entryDate > TQDate::currentDate().addDays( prefs()->days() - 1 ) ) )
continue;
if ( !dates.contains( re.cap( 1 ) ) )
@@ -338,23 +338,23 @@ bool ResourceTVAnytime::readService( const QString & serviceId )
kdDebug() << "reading schedule for " << serviceId << " on " << dates << endl;
- for( QStringList::Iterator it = dates.begin(); it != dates.end(); ++it )
+ for( TQStringList::Iterator it = dates.begin(); it != dates.end(); ++it )
{
ProgramInformationMap progInfoMap = service.programmeInformation();
- QString programInfoFileName = QString( *it + serviceId + "_pi.xml" );
- QDomDocument programInfo = archiveFileXml( programInfoFileName );
+ TQString programInfoFileName = TQString( *it + serviceId + "_pi.xml" );
+ TQDomDocument programInfo = archiveFileXml( programInfoFileName );
if ( !programInfo.isNull() ) {
- QDomElement docElem = programInfo.documentElement();
- QDomNode n = docElem.firstChild();
+ TQDomElement docElem = programInfo.documentElement();
+ 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() && e.tagName() == "ProgramDescription" ) {
- QDomNode n2 = e.firstChild();
- QDomElement e2 = n2.toElement();
+ TQDomNode n2 = e.firstChild();
+ TQDomElement e2 = n2.toElement();
if( !e2.isNull() && e2.tagName() == "ProgramInformationTable" ) {
- QDomNode n3 = e2.firstChild();
+ TQDomNode n3 = e2.firstChild();
while ( !n3.isNull() ) {
- QDomElement e3 = n3.toElement();
+ TQDomElement e3 = n3.toElement();
ProgramInformation pi;
if ( pi.loadXML( e3 ) ) {
//kdDebug() << "Found programme: " << pi.id() << "," << pi.title() << "," << pi.synopsis() << endl;
@@ -372,25 +372,25 @@ bool ResourceTVAnytime::readService( const QString & serviceId )
kdDebug() << "Service file: " << programInfoFileName << " not found in archive" << endl;
// open programme location table, iterate and create incidences
- QString programLocationFileName = QString( *it + serviceId + "_pl.xml" );
- QDomDocument programLocation = archiveFileXml( programLocationFileName );
+ TQString programLocationFileName = TQString( *it + serviceId + "_pl.xml" );
+ TQDomDocument programLocation = archiveFileXml( programLocationFileName );
if ( !programLocation.isNull() ) {
- QDomElement docElem = programLocation.documentElement();
- QDomNode n = docElem.firstChild();
+ TQDomElement docElem = programLocation.documentElement();
+ 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() && e.tagName() == "ProgramDescription" ) {
- QDomNode n2 = e.firstChild();
- QDomElement e2 = n2.toElement();
+ TQDomNode n2 = e.firstChild();
+ TQDomElement e2 = n2.toElement();
if( !e2.isNull() && e2.tagName() == "ProgramLocationTable" ) {
- QDomNode n3 = e2.firstChild();
- QDomElement e3 = n3.toElement();
+ TQDomNode n3 = e2.firstChild();
+ TQDomElement e3 = n3.toElement();
if( !e3.isNull() && e3.tagName() == "Schedule" ) {
- QString foundServiceId = e3.attribute( "serviceIDRef" );
+ TQString foundServiceId = e3.attribute( "serviceIDRef" );
if ( serviceId == foundServiceId ) {
- QDomNode n4 = e3.firstChild();
+ TQDomNode n4 = e3.firstChild();
while ( !n4.isNull() ) {
- QDomElement e4 = n4.toElement();
+ TQDomElement e4 = n4.toElement();
ScheduleEvent se;
if ( se.loadXML( e4 ) ) {
ProgramInformation pi = progInfoMap[ se.crid() ];
@@ -428,31 +428,31 @@ bool ResourceTVAnytime::readService( const QString & serviceId )
return true;
}
-QStringList ResourceTVAnytime::subresources() const
+TQStringList ResourceTVAnytime::subresources() const
{
//const_cast<ResourceTVAnytime*>( this )->doLoad();
return mServiceMap.keys();
}
const QString
-ResourceTVAnytime::labelForSubresource( const QString& subresource ) const
+ResourceTVAnytime::labelForSubresource( const TQString& subresource ) const
{
Service s = mServiceMap[ subresource ];
return s.name();
}
-QString ResourceTVAnytime::subresourceIdentifier( Incidence *incidence )
+TQString ResourceTVAnytime::subresourceIdentifier( Incidence *incidence )
{
return incidence->customProperty( "TVANYWHERE", "SERVICEID" );
}
-bool ResourceTVAnytime::subresourceActive( const QString & subresource ) const
+bool ResourceTVAnytime::subresourceActive( const TQString & subresource ) const
{
Service s = mServiceMap[ subresource ];
return s.active();
}
-void ResourceTVAnytime::setSubresourceActive( const QString & subresource, bool active )
+void ResourceTVAnytime::setSubresourceActive( const TQString & subresource, bool active )
{
if ( mServiceMap.contains( subresource ) )
{
diff --git a/kresources/tvanytime/kcal_resourcetvanytime.h b/kresources/tvanytime/kcal_resourcetvanytime.h
index 227ff4f10..bad3f2206 100644
--- a/kresources/tvanytime/kcal_resourcetvanytime.h
+++ b/kresources/tvanytime/kcal_resourcetvanytime.h
@@ -21,7 +21,7 @@
#ifndef KCAL_RESOURCETVANYTIME_H
#define KCAL_RESOURCETVANYTIME_H
-#include <qtimer.h>
+#include <tqtimer.h>
#include <libkdepim/progressmanager.h>
@@ -38,8 +38,8 @@ class QDomDocument;
class KTar;
class KTempFile;
-typedef QMap< QString, Service > ServiceMap;
-typedef QMap< QString, QString > UidMap;
+typedef TQMap< TQString, Service > ServiceMap;
+typedef TQMap< TQString, TQString > UidMap;
namespace KCal {
@@ -63,13 +63,13 @@ class KDE_EXPORT ResourceTVAnytime : public ResourceCached
TVAnytimePrefsBase *prefs();
- QStringList subresources() const;
- const QString labelForSubresource( const QString& subresource ) const;
- QString subresourceIdentifier( Incidence *incidence );
+ TQStringList subresources() const;
+ const TQString labelForSubresource( const TQString& subresource ) const;
+ TQString subresourceIdentifier( Incidence *incidence );
/** Is this subresource active? */
- bool subresourceActive( const QString& ) const;
+ bool subresourceActive( const TQString& ) const;
/** (De)activate the subresource */
- virtual void setSubresourceActive( const QString &, bool );
+ virtual void setSubresourceActive( const TQString &, bool );
bool doOpen();
void doClose();
@@ -84,7 +84,7 @@ class KDE_EXPORT ResourceTVAnytime : public ResourceCached
/**
* Extract the XML from the given filename within the schedule archive
*/
- QDomDocument archiveFileXml( const QString & name );
+ TQDomDocument archiveFileXml( const TQString & name );
/**
* Read the tv schedule from the tarball downloaded to mDestination
@@ -94,10 +94,10 @@ class KDE_EXPORT ResourceTVAnytime : public ResourceCached
/**
* Read the service information map from the supplied xml
*/
- bool readServiceInformation( const QDomDocument & );
+ bool readServiceInformation( const TQDomDocument & );
bool readServices() { return true; }
- bool readService( const QString & serviceId );
- bool readProgrammeInformation( const QDomDocument & );
+ bool readService( const TQString & serviceId );
+ bool readProgrammeInformation( const TQDomDocument & );
protected slots:
void slotJobResult( KIO::Job * );
@@ -113,14 +113,14 @@ class KDE_EXPORT ResourceTVAnytime : public ResourceCached
bool mIsShowingError;
- QTimer mResourceChangedTimer;
+ TQTimer mResourceChangedTimer;
KTempFile * mDestination;
KTar * mScheduleArchive;
ServiceMap mServiceMap;
UidMap mUidMap;
//TODO: read this from subresource config
- QStringList mActiveServices;
+ TQStringList mActiveServices;
};
diff --git a/kresources/tvanytime/kcal_resourcetvanytimeconfig.cpp b/kresources/tvanytime/kcal_resourcetvanytimeconfig.cpp
index a910a4f60..47d62d376 100644
--- a/kresources/tvanytime/kcal_resourcetvanytimeconfig.cpp
+++ b/kresources/tvanytime/kcal_resourcetvanytimeconfig.cpp
@@ -20,10 +20,10 @@
#include <typeinfo>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qspinbox.h>
-#include <qwhatsthis.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqspinbox.h>
+#include <tqwhatsthis.h>
#include <kconfigskeleton.h>
#include <klocale.h>
@@ -40,19 +40,19 @@
using namespace KCal;
-ResourceTVAnytimeConfig::ResourceTVAnytimeConfig( QWidget* parent, const char* name )
+ResourceTVAnytimeConfig::ResourceTVAnytimeConfig( TQWidget* parent, const char* name )
: KRES::ConfigWidget( parent, name )
{
resize( 245, 115 );
- QGridLayout *mainLayout = new QGridLayout( this, 2, 2 );
+ TQGridLayout *mainLayout = new TQGridLayout( this, 2, 2 );
- QLabel *label = new QLabel( i18n( "Schedule tarball URL:" ), this );
+ TQLabel *label = new TQLabel( i18n( "Schedule tarball URL:" ), this );
mainLayout->addWidget( label, 1, 0 );
mUrl = new KLineEdit( this );
mainLayout->addWidget( mUrl, 1, 1 );
- label = new QLabel( i18n( "Retrieve how many days?" ), this );
+ label = new TQLabel( i18n( "Retrieve how many days?" ), this );
mainLayout->addWidget( label, 2, 0 );
- mDays = new QSpinBox( this );
+ mDays = new TQSpinBox( this );
mainLayout->addWidget( mDays, 2, 1 );
mReloadConfig = new KCal::ResourceCachedReloadConfig( this );
mainLayout->addMultiCellWidget( mReloadConfig, 3, 3, 0, 1 );
@@ -73,7 +73,7 @@ void ResourceTVAnytimeConfig::loadSettings( KRES::Resource *resource )
KConfigSkeleton::ItemInt * daysItem = res->prefs()->daysItem();
mDays->setMinValue( daysItem->minValue().toInt() );
mDays->setMaxValue( daysItem->maxValue().toInt() );
- QWhatsThis::add( mDays, daysItem->whatsThis() );
+ TQWhatsThis::add( mDays, daysItem->whatsThis() );
mUrl->setText( res->prefs()->url() );
mDays->setValue( res->prefs()->days() );
mReloadConfig->loadSettings( res );
diff --git a/kresources/tvanytime/kcal_resourcetvanytimeconfig.h b/kresources/tvanytime/kcal_resourcetvanytimeconfig.h
index 248b386d5..cd3701858 100644
--- a/kresources/tvanytime/kcal_resourcetvanytimeconfig.h
+++ b/kresources/tvanytime/kcal_resourcetvanytimeconfig.h
@@ -42,7 +42,7 @@ class KDE_EXPORT ResourceTVAnytimeConfig : public KRES::ConfigWidget
{
Q_OBJECT
public:
- ResourceTVAnytimeConfig( QWidget *parent = 0, const char *name = 0 );
+ ResourceTVAnytimeConfig( TQWidget *parent = 0, const char *name = 0 );
public slots:
virtual void loadSettings( KRES::Resource *resource );
@@ -50,7 +50,7 @@ Q_OBJECT
private:
KLineEdit *mUrl;
- QSpinBox *mDays;
+ TQSpinBox *mDays;
ResourceCachedReloadConfig *mReloadConfig;
ResourceCachedSaveConfig *mSaveConfig;
ResourceTVAnytime *mResource;
diff --git a/kresources/tvanytime/kcal_tvanytimeprefs.cpp b/kresources/tvanytime/kcal_tvanytimeprefs.cpp
index a6b503c05..26f3f7ef3 100644
--- a/kresources/tvanytime/kcal_tvanytimeprefs.cpp
+++ b/kresources/tvanytime/kcal_tvanytimeprefs.cpp
@@ -27,7 +27,7 @@ TVAnytimePrefs::TVAnytimePrefs()
{
}
-QString TVAnytimePrefs::scheduleUrl() const
+TQString TVAnytimePrefs::scheduleUrl() const
{
return url();
}
diff --git a/kresources/tvanytime/kcal_tvanytimeprefs.h b/kresources/tvanytime/kcal_tvanytimeprefs.h
index 52bb31152..2ab10802e 100644
--- a/kresources/tvanytime/kcal_tvanytimeprefs.h
+++ b/kresources/tvanytime/kcal_tvanytimeprefs.h
@@ -29,7 +29,7 @@ class TVAnytimePrefs : public TVAnytimePrefsBase
public:
TVAnytimePrefs();
- QString scheduleUrl() const;
+ TQString scheduleUrl() const;
};
}
diff --git a/kresources/tvanytime/service.cpp b/kresources/tvanytime/service.cpp
index 9c92f4f2b..ecf34fc44 100644
--- a/kresources/tvanytime/service.cpp
+++ b/kresources/tvanytime/service.cpp
@@ -25,7 +25,7 @@ Service::Service() : mActive( true )
}
-Service::Service( bool active, const QString & name, const QString & owner, const KURL & serviceUrl, const KURL & logo, const QStringList & genres )
+Service::Service( bool active, const TQString & name, const TQString & owner, const KURL & serviceUrl, const KURL & logo, const TQStringList & genres )
: mActive( active ), mName( name ), mOwner( owner ), mServiceUrl( serviceUrl ), mLogo( logo ), mGenres( genres )
{
}
@@ -35,7 +35,7 @@ void Service::setActive( bool active )
mActive = active;
}
-void Service::setName( const QString & name )
+void Service::setName( const TQString & name )
{
mName = name;
}
@@ -50,12 +50,12 @@ bool Service::active() const
return mActive;
}
-QString Service::name() const
+TQString Service::name() const
{
return mName;
}
-bool Service::loadXML( const QDomElement & top )
+bool Service::loadXML( const TQDomElement & top )
{
if ( top.tagName() != "ServiceInformation" ) {
qWarning( "XML error: Top tag was %s instead of the expected service information",
@@ -65,11 +65,11 @@ bool Service::loadXML( const QDomElement & top )
setId( top.attribute( "serviceId" ) );
- for ( QDomNode n = top.firstChild(); !n.isNull(); n = n.nextSibling() ) {
+ for ( TQDomNode n = top.firstChild(); !n.isNull(); n = n.nextSibling() ) {
if ( n.isComment() )
continue;
if ( n.isElement() ) {
- QDomElement e = n.toElement();
+ TQDomElement e = n.toElement();
loadAttribute( e );
} else
qWarning( "Node is not a comment or an element???" );
@@ -77,22 +77,22 @@ bool Service::loadXML( const QDomElement & top )
return true;
}
-bool Service::loadAttribute( const QDomElement& element )
+bool Service::loadAttribute( const TQDomElement& element )
{
- QString tagName = element.tagName();
+ TQString tagName = element.tagName();
if ( tagName == "Name" ) {
- QDomNode cn = element.firstChild();
- QDomText t = cn.toText();
+ TQDomNode cn = element.firstChild();
+ TQDomText t = cn.toText();
mName = t.data();
}
else if ( tagName == "Owner" ) {
- QDomNode cn = element.firstChild();
- QDomText t = cn.toText();
+ TQDomNode cn = element.firstChild();
+ TQDomText t = cn.toText();
mOwner = t.data();
}
else if ( tagName == "ServiceURL" ) {
- QDomNode cn = element.firstChild();
- QDomText t = cn.toText();
+ TQDomNode cn = element.firstChild();
+ TQDomText t = cn.toText();
mServiceUrl = t.data();
}
// TODO: parse logo data
@@ -100,9 +100,9 @@ bool Service::loadAttribute( const QDomElement& element )
return true;
}
-QRegExp ScheduleEvent::sRegExp( "PT(\\d{2})H(\\d{2})M(\\d{2})S" );
+TQRegExp ScheduleEvent::sRegExp( "PT(\\d{2})H(\\d{2})M(\\d{2})S" );
-bool ScheduleEvent::loadXML( const QDomElement & top )
+bool ScheduleEvent::loadXML( const TQDomElement & top )
{
if ( top.tagName() != "ScheduleEvent" ) {
qWarning( "XML error: Top tag was %s instead of the expected event",
@@ -112,11 +112,11 @@ bool ScheduleEvent::loadXML( const QDomElement & top )
mCrid = top.attribute( "serviceId" );
- for ( QDomNode n = top.firstChild(); !n.isNull(); n = n.nextSibling() ) {
+ for ( TQDomNode n = top.firstChild(); !n.isNull(); n = n.nextSibling() ) {
if ( n.isComment() )
continue;
if ( n.isElement() ) {
- QDomElement e = n.toElement();
+ TQDomElement e = n.toElement();
loadAttribute( e );
} else
qWarning( "Node is not a comment or an element???" );
@@ -124,26 +124,26 @@ bool ScheduleEvent::loadXML( const QDomElement & top )
return true;
}
-bool ScheduleEvent::loadAttribute( const QDomElement& element )
+bool ScheduleEvent::loadAttribute( const TQDomElement& element )
{
- QString tagName = element.tagName();
+ TQString tagName = element.tagName();
if ( tagName == "ProgramURL" ) {
- QDomNode cn = element.firstChild();
- QDomText t = cn.toText();
+ TQDomNode cn = element.firstChild();
+ TQDomText t = cn.toText();
mUrl = t.data();
}
else if ( tagName == "Program" ) {
mCrid = element.attribute( "crid" );
}
else if ( tagName == "PublishedStartTime" ) {
- QDomNode cn = element.firstChild();
- QDomText t = cn.toText();
- mStartTime = QDateTime::fromString( t.data(), Qt::ISODate );
+ TQDomNode cn = element.firstChild();
+ TQDomText t = cn.toText();
+ mStartTime = TQDateTime::fromString( t.data(), Qt::ISODate );
}
else if ( tagName == "PublishedDuration" ) {
- QDomNode cn = element.firstChild();
- QDomText t = cn.toText();
- QString duration = t.data();
+ TQDomNode cn = element.firstChild();
+ TQDomText t = cn.toText();
+ TQString duration = t.data();
if ( sRegExp.search( duration ) != -1 )
{
mDuration = 0;
@@ -160,13 +160,13 @@ ProgramInformationMap Service::programmeInformation() const
return mProgInfo;
}
-ProgramInformation::ProgramInformation( const QString & title, const QString &synopsis )
+ProgramInformation::ProgramInformation( const TQString & title, const TQString &synopsis )
: mTitle( title ), mSynopsis( synopsis )
{
}
-bool ProgramInformation::loadXML( const QDomElement & top )
+bool ProgramInformation::loadXML( const TQDomElement & top )
{
if ( top.tagName() != "ProgramInformation" ) {
qWarning( "XML error: Top tag was %s instead of the expected program information",
@@ -176,18 +176,18 @@ bool ProgramInformation::loadXML( const QDomElement & top )
setId( top.attribute( "programId" ) );
- for ( QDomNode n = top.firstChild(); !n.isNull(); n = n.nextSibling() ) {
+ for ( TQDomNode n = top.firstChild(); !n.isNull(); n = n.nextSibling() ) {
if ( n.isComment() )
continue;
if ( n.isElement() ) {
- QDomElement e = n.toElement();
+ TQDomElement e = n.toElement();
if ( e.tagName() == "BasicDescription" )
{
- for ( QDomNode n = e.firstChild(); !n.isNull(); n = n.nextSibling() ) {
+ for ( TQDomNode n = e.firstChild(); !n.isNull(); n = n.nextSibling() ) {
if ( n.isComment() )
continue;
if ( n.isElement() ) {
- QDomElement e = n.toElement();
+ TQDomElement e = n.toElement();
loadAttribute( e );
}
}
@@ -198,25 +198,25 @@ bool ProgramInformation::loadXML( const QDomElement & top )
return true;
}
-bool ProgramInformation::loadAttribute( const QDomElement& element )
+bool ProgramInformation::loadAttribute( const TQDomElement& element )
{
- QString tagName = element.tagName();
+ TQString tagName = element.tagName();
if ( tagName == "Title" ) {
- QDomNode cn = element.firstChild();
- QDomText t = cn.toText();
+ TQDomNode cn = element.firstChild();
+ TQDomText t = cn.toText();
mTitle = t.data();
}
else if ( tagName == "Synopsis" ) {
- QDomNode cn = element.firstChild();
- QDomText t = cn.toText();
+ TQDomNode cn = element.firstChild();
+ TQDomText t = cn.toText();
mSynopsis = t.data();
}
else if ( tagName == "Genre" ) {
- QDomNode name = element.firstChild();
- QDomElement nameElem = name.toElement();
+ TQDomNode name = element.firstChild();
+ TQDomElement nameElem = name.toElement();
if ( nameElem.tagName() == "Name" ) {
- QDomNode cn = nameElem.firstChild();
- QDomText t = cn.toText();
+ TQDomNode cn = nameElem.firstChild();
+ TQDomText t = cn.toText();
mGenres.append( t.data() );
}
}
diff --git a/kresources/tvanytime/service.h b/kresources/tvanytime/service.h
index 4df8841da..78570fe1f 100644
--- a/kresources/tvanytime/service.h
+++ b/kresources/tvanytime/service.h
@@ -21,90 +21,90 @@
#ifndef SERVICE_H
#define SERVICE_H
-#include <qdatetime.h>
-#include <qdom.h>
-#include <qmap.h>
-#include <qregexp.h>
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqdatetime.h>
+#include <tqdom.h>
+#include <tqmap.h>
+#include <tqregexp.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
#include <kurl.h>
class ProgramInformation {
public:
ProgramInformation() {}
- ProgramInformation( const QString & title, const QString &synopsis );
+ ProgramInformation( const TQString & title, const TQString &synopsis );
virtual ~ProgramInformation() {}
- QString id() const { return mId; }
- QString title() const { return mTitle; }
- QString synopsis() const { return mSynopsis; }
- QStringList genres() const { return mGenres; }
+ TQString id() const { return mId; }
+ TQString title() const { return mTitle; }
+ TQString synopsis() const { return mSynopsis; }
+ TQStringList genres() const { return mGenres; }
- void setId ( const QString & id ) { mId = id; }
- void setGenres( const QStringList & genres ) { mGenres = genres; }
- bool loadXML( const QDomElement & );
- bool loadAttribute( const QDomElement& element );
+ void setId ( const TQString & id ) { mId = id; }
+ void setGenres( const TQStringList & genres ) { mGenres = genres; }
+ bool loadXML( const TQDomElement & );
+ bool loadAttribute( const TQDomElement& element );
private:
- QString mId;
- QString mTitle;
- QString mSynopsis;
- QStringList mGenres;
+ TQString mId;
+ TQString mTitle;
+ TQString mSynopsis;
+ TQStringList mGenres;
};
-typedef QMap< QString, ProgramInformation > ProgramInformationMap;
+typedef TQMap< TQString, ProgramInformation > ProgramInformationMap;
class ScheduleEvent {
public:
ScheduleEvent() {}
virtual ~ScheduleEvent() {}
- QString crid() const { return mCrid; }
- QDateTime startTime() const { return mStartTime; }
+ TQString crid() const { return mCrid; }
+ TQDateTime startTime() const { return mStartTime; }
uint duration() const { return mDuration; }
- QString programUrl() const { return mUrl; }
+ TQString programUrl() const { return mUrl; }
- bool loadXML( const QDomElement & );
- bool loadAttribute( const QDomElement& element );
+ bool loadXML( const TQDomElement & );
+ bool loadAttribute( const TQDomElement& element );
private:
- QString mCrid;
- QString mUrl;
- QDateTime mStartTime;
+ TQString mCrid;
+ TQString mUrl;
+ TQDateTime mStartTime;
uint mDuration;
- static QRegExp sRegExp;
+ static TQRegExp sRegExp;
};
class Service {
public:
Service();
- Service( bool active, const QString & name, const QString & owner, const KURL & serviceUrl, const KURL & logo, const QStringList & genres );
+ Service( bool active, const TQString & name, const TQString & owner, const KURL & serviceUrl, const KURL & logo, const TQStringList & genres );
virtual ~Service() {}
- void setId( const QString & id ) { mId = id; }
+ void setId( const TQString & id ) { mId = id; }
void setActive( bool active );
- void setName( const QString& name );
+ void setName( const TQString& name );
void setProgramInformation( const ProgramInformationMap & map );
- QString id() const { return mId; }
+ TQString id() const { return mId; }
bool active() const;
- QString name() const;
+ TQString name() const;
ProgramInformationMap programmeInformation() const;
- bool loadXML( const QDomElement & );
- bool loadDescription( const QDomElement & );
- bool loadAttribute( const QDomElement& element );
+ bool loadXML( const TQDomElement & );
+ bool loadDescription( const TQDomElement & );
+ bool loadAttribute( const TQDomElement& element );
private:
- QString mId;
+ TQString mId;
bool mActive;
- QString mName;
- QString mOwner;
+ TQString mName;
+ TQString mOwner;
KURL mServiceUrl;
KURL mLogo;
- QStringList mGenres;
+ TQStringList mGenres;
ProgramInformationMap mProgInfo;
};
diff --git a/ktnef/gui/attachpropertydialog.cpp b/ktnef/gui/attachpropertydialog.cpp
index 8675b6baa..35cd65848 100644
--- a/ktnef/gui/attachpropertydialog.cpp
+++ b/ktnef/gui/attachpropertydialog.cpp
@@ -22,18 +22,18 @@
#include <ktnef/ktnefdefs.h>
#include "qwmf.h"
-#include <qlabel.h>
+#include <tqlabel.h>
#include <klistview.h>
#include <kmimetype.h>
#include <kdebug.h>
#include <klocale.h>
#include <kmessagebox.h>
#include <kfiledialog.h>
-#include <qbuffer.h>
-#include <qdatastream.h>
-#include <qpicture.h>
+#include <tqbuffer.h>
+#include <tqdatastream.h>
+#include <tqpicture.h>
-AttachPropertyDialog::AttachPropertyDialog(QWidget *parent, const char *name)
+AttachPropertyDialog::AttachPropertyDialog(TQWidget *parent, const char *name)
: AttachPropertyDialogBase(parent, name, true)
{
}
@@ -53,7 +53,7 @@ void AttachPropertyDialog::setAttachment(KTNEFAttach *attach)
s.append(" bytes");
size_->setText(s);
KMimeType::Ptr mimetype = KMimeType::mimeType(attach->mimeTag());
- QPixmap pix = loadRenderingPixmap( attach, colorGroup().background() );
+ TQPixmap pix = loadRenderingPixmap( attach, colorGroup().background() );
if ( !pix.isNull() )
icon_->setPixmap( pix );
else
@@ -71,74 +71,74 @@ void AttachPropertyDialog::saveClicked()
saveProperty( properties_, m_attach, this );
}
-void formatProperties( const QMap<int,KTNEFProperty*>& props, QListView *lv, QListViewItem *item, const QString& prefix )
+void formatProperties( const TQMap<int,KTNEFProperty*>& props, TQListView *lv, TQListViewItem *item, const TQString& prefix )
{
- for ( QMap<int,KTNEFProperty*>::ConstIterator it=props.begin(); it!=props.end(); ++it )
+ for ( TQMap<int,KTNEFProperty*>::ConstIterator it=props.begin(); it!=props.end(); ++it )
{
- QListViewItem *newItem = 0;
+ TQListViewItem *newItem = 0;
if ( lv )
- newItem = new QListViewItem( lv, ( *it )->keyString() );
+ newItem = new TQListViewItem( lv, ( *it )->keyString() );
else if ( item )
- newItem = new QListViewItem( item, ( *it )->keyString() );
+ newItem = new TQListViewItem( item, ( *it )->keyString() );
else
{
kdWarning() << "formatProperties() called with no listview and no item" << endl;
return;
}
- QVariant value = ( *it )->value();
- if ( value.type() == QVariant::List )
+ TQVariant value = ( *it )->value();
+ if ( value.type() == TQVariant::List )
{
newItem->setOpen( true );
- newItem->setText( 0, newItem->text( 0 ) + " [" + QString::number( value.asList().count() ) + "]" );
+ newItem->setText( 0, newItem->text( 0 ) + " [" + TQString::number( value.asList().count() ) + "]" );
int i = 0;
- for ( QValueList<QVariant>::ConstIterator lit=value.listBegin(); lit!=value.listEnd(); ++lit, i++ )
- new QListViewItem( newItem, "[" + QString::number( i ) + "]", KTNEFProperty::formatValue( *lit ) );
+ for ( TQValueList<TQVariant>::ConstIterator lit=value.listBegin(); lit!=value.listEnd(); ++lit, i++ )
+ new TQListViewItem( newItem, "[" + TQString::number( i ) + "]", KTNEFProperty::formatValue( *lit ) );
}
- else if ( value.type() == QVariant::DateTime )
+ else if ( value.type() == TQVariant::DateTime )
newItem->setText( 1, value.asDateTime().toString() );
else
{
newItem->setText( 1, ( *it )->valueString() );
- newItem->setText( 2, prefix + "_" + QString::number( it.key() ) );
+ newItem->setText( 2, prefix + "_" + TQString::number( it.key() ) );
}
}
}
-void formatPropertySet( KTNEFPropertySet *pSet, QListView *lv )
+void formatPropertySet( KTNEFPropertySet *pSet, TQListView *lv )
{
formatProperties( pSet->properties(), lv, 0, "prop" );
- QListViewItem *item = new QListViewItem( lv, i18n( "TNEF Attributes" ) );
+ TQListViewItem *item = new TQListViewItem( lv, i18n( "TNEF Attributes" ) );
item->setOpen( true );
formatProperties( pSet->attributes(), 0, item, "attr" );
}
-void saveProperty( QListView *lv, KTNEFPropertySet *pSet, QWidget *parent )
+void saveProperty( TQListView *lv, KTNEFPropertySet *pSet, TQWidget *parent )
{
- QListViewItem *item = lv->selectedItem();
+ TQListViewItem *item = lv->selectedItem();
if ( !item )
KMessageBox::error( parent, i18n( "Select an item." ) );
else if ( item->text( 2 ).isEmpty() )
KMessageBox::error( parent, i18n( "The selected item cannot be saved." ) );
else
{
- QString tag = item->text( 2 );
+ TQString tag = item->text( 2 );
int key = tag.mid( 5 ).toInt();
- QVariant prop = ( tag.startsWith( "attr_" ) ? pSet->attribute( key ) : pSet->property( key ) );
- QString filename = KFileDialog::getSaveFileName( tag, QString::null, parent );
+ TQVariant prop = ( tag.startsWith( "attr_" ) ? pSet->attribute( key ) : pSet->property( key ) );
+ TQString filename = KFileDialog::getSaveFileName( tag, TQString::null, parent );
if ( !filename.isEmpty() )
{
- QFile f( filename );
+ TQFile f( filename );
if ( f.open( IO_WriteOnly ) )
{
switch ( prop.type() )
{
- case QVariant::ByteArray:
+ case TQVariant::ByteArray:
f.writeBlock( prop.asByteArray().data(), prop.asByteArray().size() );
break;
default:
{
- QTextStream t( &f );
+ TQTextStream t( &f );
t << prop.toString();
break;
}
@@ -151,17 +151,17 @@ void saveProperty( QListView *lv, KTNEFPropertySet *pSet, QWidget *parent )
}
}
-QPixmap loadRenderingPixmap( KTNEFPropertySet *pSet, const QColor& bgColor )
+TQPixmap loadRenderingPixmap( KTNEFPropertySet *pSet, const TQColor& bgColor )
{
- QPixmap pix;
- QVariant rendData = pSet->attribute( attATTACHRENDDATA ), wmf = pSet->attribute( attATTACHMETAFILE );
+ TQPixmap pix;
+ TQVariant rendData = pSet->attribute( attATTACHRENDDATA ), wmf = pSet->attribute( attATTACHMETAFILE );
if ( !rendData.isNull() && !wmf.isNull() )
{
// Get rendering size
- QBuffer rendBuffer( rendData.asByteArray() );
+ TQBuffer rendBuffer( rendData.asByteArray() );
rendBuffer.open( IO_ReadOnly );
- QDataStream rendStream( &rendBuffer );
- rendStream.setByteOrder( QDataStream::LittleEndian );
+ TQDataStream rendStream( &rendBuffer );
+ rendStream.setByteOrder( TQDataStream::LittleEndian );
Q_UINT16 type, w, h;
rendStream >> type >> w >> w; // read type and skip 4 bytes
rendStream >> w >> h;
@@ -171,9 +171,9 @@ QPixmap loadRenderingPixmap( KTNEFPropertySet *pSet, const QColor& bgColor )
{
// Load WMF data
QWinMetaFile wmfLoader;
- QBuffer wmfBuffer( wmf.asByteArray() );
+ TQBuffer wmfBuffer( wmf.asByteArray() );
wmfBuffer.open( IO_ReadOnly );
- wmfLoader.setBbox( QRect( 0, 0, w, h ) );
+ wmfLoader.setBbox( TQRect( 0, 0, w, h ) );
if ( wmfLoader.load( wmfBuffer ) )
{
pix.resize( w, h );
diff --git a/ktnef/gui/attachpropertydialog.h b/ktnef/gui/attachpropertydialog.h
index a731572eb..b7a78bbc1 100644
--- a/ktnef/gui/attachpropertydialog.h
+++ b/ktnef/gui/attachpropertydialog.h
@@ -19,8 +19,8 @@
#define ATTACHPROPERTYDLG_H
#include "attachpropertydialogbase.h"
-#include <qmap.h>
-#include <qpixmap.h>
+#include <tqmap.h>
+#include <tqpixmap.h>
class KTNEFAttach;
class KTNEFProperty;
@@ -31,7 +31,7 @@ class QListViewItem;
class AttachPropertyDialog : public AttachPropertyDialogBase
{
public:
- AttachPropertyDialog(QWidget *parent = 0, const char *name = 0);
+ AttachPropertyDialog(TQWidget *parent = 0, const char *name = 0);
~AttachPropertyDialog();
void setAttachment(KTNEFAttach *attach);
@@ -43,9 +43,9 @@ private:
KTNEFAttach *m_attach;
};
-void formatProperties( const QMap<int,KTNEFProperty*>&, QListView*, QListViewItem*, const QString& = "prop" );
-void formatPropertySet( KTNEFPropertySet*, QListView* );
-void saveProperty( QListView*, KTNEFPropertySet*, QWidget* );
-QPixmap loadRenderingPixmap( KTNEFPropertySet*, const QColor& );
+void formatProperties( const TQMap<int,KTNEFProperty*>&, TQListView*, TQListViewItem*, const TQString& = "prop" );
+void formatPropertySet( KTNEFPropertySet*, TQListView* );
+void saveProperty( TQListView*, KTNEFPropertySet*, TQWidget* );
+TQPixmap loadRenderingPixmap( KTNEFPropertySet*, const TQColor& );
#endif
diff --git a/ktnef/gui/ktnefmain.cpp b/ktnef/gui/ktnefmain.cpp
index a31d40161..4c158a21d 100644
--- a/ktnef/gui/ktnefmain.cpp
+++ b/ktnef/gui/ktnefmain.cpp
@@ -25,16 +25,16 @@
#include "attachpropertydialog.h"
#include "messagepropertydialog.h"
-#include <qpopupmenu.h>
+#include <tqpopupmenu.h>
#include <klistview.h>
#include <klocale.h>
#include <kapplication.h>
#include <kiconloader.h>
-#include <qpixmap.h>
+#include <tqpixmap.h>
#include <kstdaccel.h>
-#include <qmessagebox.h>
+#include <tqmessagebox.h>
#include <kfiledialog.h>
-#include <qdir.h>
+#include <tqdir.h>
#include <kprocess.h>
#include <kglobal.h>
#include <kstandarddirs.h>
@@ -55,9 +55,9 @@
#include <kurldrag.h>
-#define NOT_IMPLEMENTED QMessageBox::information(this, "ktnef", "Not implemented yet", QMessageBox::Ok|QMessageBox::Default, 0)
+#define NOT_IMPLEMENTED TQMessageBox::information(this, "ktnef", "Not implemented yet", TQMessageBox::Ok|TQMessageBox::Default, 0)
-KTNEFMain::KTNEFMain(QWidget *parent, const char *name)
+KTNEFMain::KTNEFMain(TQWidget *parent, const char *name)
: KMainWindow(parent, name)
{
setupActions();
@@ -85,19 +85,19 @@ KTNEFMain::~KTNEFMain()
void KTNEFMain::setupActions()
{
// File menu
- KStdAction::open(this, SLOT(openFile()), actionCollection());
- KStdAction::quit(kapp, SLOT(quit()), actionCollection());
+ KStdAction::open(this, TQT_SLOT(openFile()), actionCollection());
+ KStdAction::quit(kapp, TQT_SLOT(quit()), actionCollection());
// Action menu
- new KAction(i18n("View"), QString("viewmag"), 0, this, SLOT(viewFile()), actionCollection(), "view_file");
- new KAction(i18n("View With..."), QString("package_applications"), 0, this, SLOT(viewFileAs()), actionCollection(), "view_file_as");
- new KAction(i18n("Extract"), 0, this, SLOT(extractFile()), actionCollection(), "extract_file");
- new KAction(i18n("Extract To..."), QString("ktnef_extract_to"), 0, this, SLOT(extractFileTo()), actionCollection(), "extract_file_to");
- new KAction(i18n("Extract All To..."), QString("ktnef_extract_all_to"), 0, this, SLOT(extractAllFiles()), actionCollection(), "extract_all_files");
- new KAction( i18n( "Message Properties" ), "help", 0, this, SLOT( slotShowMessageProperties() ), actionCollection(), "msg_properties" );
- new KAction(i18n("Properties"), QString("contents"), 0, this, SLOT(propertiesFile()), actionCollection(), "properties_file");
- new KAction( i18n( "Show Message Text" ), "mail_generic", 0, this, SLOT( slotShowMessageText() ), actionCollection(), "msg_text" );
- new KAction( i18n( "Save Message Text As..." ), "filesave", 0, this, SLOT( slotSaveMessageText() ), actionCollection(), "msg_save" );
+ new KAction(i18n("View"), TQString("viewmag"), 0, this, TQT_SLOT(viewFile()), actionCollection(), "view_file");
+ new KAction(i18n("View With..."), TQString("package_applications"), 0, this, TQT_SLOT(viewFileAs()), actionCollection(), "view_file_as");
+ new KAction(i18n("Extract"), 0, this, TQT_SLOT(extractFile()), actionCollection(), "extract_file");
+ new KAction(i18n("Extract To..."), TQString("ktnef_extract_to"), 0, this, TQT_SLOT(extractFileTo()), actionCollection(), "extract_file_to");
+ new KAction(i18n("Extract All To..."), TQString("ktnef_extract_all_to"), 0, this, TQT_SLOT(extractAllFiles()), actionCollection(), "extract_all_files");
+ new KAction( i18n( "Message Properties" ), "help", 0, this, TQT_SLOT( slotShowMessageProperties() ), actionCollection(), "msg_properties" );
+ new KAction(i18n("Properties"), TQString("contents"), 0, this, TQT_SLOT(propertiesFile()), actionCollection(), "properties_file");
+ new KAction( i18n( "Show Message Text" ), "mail_generic", 0, this, TQT_SLOT( slotShowMessageText() ), actionCollection(), "msg_text" );
+ new KAction( i18n( "Save Message Text As..." ), "filesave", 0, this, TQT_SLOT( slotSaveMessageText() ), actionCollection(), "msg_save" );
actionCollection()->action("view_file")->setEnabled(false);
actionCollection()->action("view_file_as")->setEnabled(false);
actionCollection()->action("extract_file")->setEnabled(false);
@@ -106,12 +106,12 @@ void KTNEFMain::setupActions()
actionCollection()->action("properties_file")->setEnabled(false);
// Option menu
- new KAction(i18n("Default Folder..."), QString("folder_open"), 0, this, SLOT(optionDefaultDir()), actionCollection(), "options_default_dir");
+ new KAction(i18n("Default Folder..."), TQString("folder_open"), 0, this, TQT_SLOT(optionDefaultDir()), actionCollection(), "options_default_dir");
createStandardStatusBarAction();
setStandardToolBarMenuEnabled(true);
- KStdAction::configureToolbars(this, SLOT(slotEditToolbars()), actionCollection());
- KStdAction::keyBindings( this, SLOT( slotConfigureKeys() ), actionCollection() );
+ KStdAction::configureToolbars(this, TQT_SLOT(slotEditToolbars()), actionCollection());
+ KStdAction::keyBindings( this, TQT_SLOT( slotConfigureKeys() ), actionCollection() );
createGUI();
}
@@ -135,25 +135,25 @@ void KTNEFMain::setupTNEF()
parser_ = new KTNEFParser;
setCentralWidget(view_);
- connect(view_, SIGNAL(selectionChanged()), SLOT(viewSelectionChanged()));
- connect(view_, SIGNAL(rightButtonPressed(QListViewItem*,const QPoint&,int)), SLOT(viewRightButtonPressed(QListViewItem*,const QPoint&,int)));
- connect(view_, SIGNAL(doubleClicked(QListViewItem*)), SLOT(viewDoubleClicked(QListViewItem*)));
- connect(view_, SIGNAL(dragRequested(const QValueList<KTNEFAttach*>&)), SLOT(viewDragRequested(const QValueList<KTNEFAttach*>&)));
+ connect(view_, TQT_SIGNAL(selectionChanged()), TQT_SLOT(viewSelectionChanged()));
+ connect(view_, TQT_SIGNAL(rightButtonPressed(TQListViewItem*,const TQPoint&,int)), TQT_SLOT(viewRightButtonPressed(TQListViewItem*,const TQPoint&,int)));
+ connect(view_, TQT_SIGNAL(doubleClicked(TQListViewItem*)), TQT_SLOT(viewDoubleClicked(TQListViewItem*)));
+ connect(view_, TQT_SIGNAL(dragRequested(const TQValueList<KTNEFAttach*>&)), TQT_SLOT(viewDragRequested(const TQValueList<KTNEFAttach*>&)));
}
-void KTNEFMain::loadFile(const QString& filename)
+void KTNEFMain::loadFile(const TQString& filename)
{
filename_ = filename;
setCaption(filename_);
if (!parser_->openFile(filename))
{
- QMessageBox::critical(this, i18n("Error"), i18n("Unable to open file."), QMessageBox::Ok|QMessageBox::Default, 0);
+ TQMessageBox::critical(this, i18n("Error"), i18n("Unable to open file."), TQMessageBox::Ok|TQMessageBox::Default, 0);
view_->setAttachments(0);
enableExtractAll(false);
}
else
{
- QPtrList<KTNEFAttach> list = parser_->message()->attachmentList();
+ TQPtrList<KTNEFAttach> list = parser_->message()->attachmentList();
QString msg;
msg = i18n( "%n attachment found", "%n attachments found", list.count() );
statusBar()->changeItem(msg, 0);
@@ -187,7 +187,7 @@ void KTNEFMain::viewFile()
KRun::runURL(url, mimename);
}
-QString KTNEFMain::extractTemp(KTNEFAttach *att)
+TQString KTNEFMain::extractTemp(KTNEFAttach *att)
{
QString dir = KGlobal::dirs()->localkdedir() + "/share/apps/ktnef/tmp/";
parser_->extractFileTo(att->name(), dir);
@@ -225,13 +225,13 @@ void KTNEFMain::extractAllFiles()
{
lastdir_ = dir;
dir.append("/");
- QPtrList<KTNEFAttach> list = parser_->message()->attachmentList();
- QPtrListIterator<KTNEFAttach> it(list);
+ TQPtrList<KTNEFAttach> list = parser_->message()->attachmentList();
+ TQPtrListIterator<KTNEFAttach> it(list);
for (;it.current();++it)
if (!parser_->extractFileTo(it.current()->name(), dir))
{
QString msg = i18n( "Unable to extract file \"%1\"" ).arg( it.current()->name() );
- QMessageBox::critical(this,i18n("Error"),msg,QMessageBox::Ok|QMessageBox::Default,0);
+ TQMessageBox::critical(this,i18n("Error"),msg,TQMessageBox::Ok|TQMessageBox::Default,0);
return;
}
}
@@ -258,7 +258,7 @@ void KTNEFMain::optionDefaultDir()
void KTNEFMain::viewSelectionChanged()
{
- QPtrList<KTNEFAttach> *list = view_->getSelection();
+ TQPtrList<KTNEFAttach> *list = view_->getSelection();
bool on1 = (list->count() == 1u), on2 = (list->count() > 0u);
actionCollection()->action("view_file")->setEnabled(on1);
actionCollection()->action("view_file_as")->setEnabled(on1);
@@ -286,51 +286,51 @@ void KTNEFMain::enableSingleAction(bool on)
void KTNEFMain::cleanup()
{
QDir d(KGlobal::dirs()->localkdedir() + "/share/apps/ktnef/tmp/");
- const QFileInfoList *list = d.entryInfoList(QDir::Files|QDir::Hidden,QDir::Unsorted);
+ const QFileInfoList *list = d.entryInfoList(TQDir::Files|TQDir::Hidden,TQDir::Unsorted);
QFileInfoListIterator it(*list);
for (;it.current();++it)
d.remove(it.current()->absFilePath());
}
-void KTNEFMain::extractTo(const QString& dirname)
+void KTNEFMain::extractTo(const TQString& dirname)
{
QString dir = dirname;
if (dir.right(1) != "/") dir.append("/");
- QPtrList<KTNEFAttach> *list = view_->getSelection();
- QPtrListIterator<KTNEFAttach> it(*list);
+ TQPtrList<KTNEFAttach> *list = view_->getSelection();
+ TQPtrListIterator<KTNEFAttach> it(*list);
for (;it.current();++it)
if (!parser_->extractFileTo(it.current()->name(), dir))
{
QString msg = i18n("Unable to extract file \"%1\"").arg( it.current()->name() );
- QMessageBox::critical(this,i18n("Error"),msg,QMessageBox::Ok|QMessageBox::Default,0);
+ TQMessageBox::critical(this,i18n("Error"),msg,TQMessageBox::Ok|TQMessageBox::Default,0);
return;
}
}
/* This breaks the saveMainWindowSettings stuff....
- void KTNEFMain::closeEvent(QCloseEvent *e)
+ void KTNEFMain::closeEvent(TQCloseEvent *e)
{
e->accept();
}*/
-void KTNEFMain::viewRightButtonPressed(QListViewItem*, const QPoint& p, int)
+void KTNEFMain::viewRightButtonPressed(TQListViewItem*, const TQPoint& p, int)
{
- QPtrList<KTNEFAttach> *list = view_->getSelection();
- QPopupMenu m;
+ TQPtrList<KTNEFAttach> *list = view_->getSelection();
+ TQPopupMenu m;
if (list->count() > 0u)
{
if (list->count() == 1u)
{
- m.insertItem(SmallIcon("viewmag"), i18n("View"), this, SLOT(viewFile()));
- m.insertItem(SmallIcon("package_applications"), i18n("View With..."), this, SLOT(viewFileAs()));
+ m.insertItem(SmallIcon("viewmag"), i18n("View"), this, TQT_SLOT(viewFile()));
+ m.insertItem(SmallIcon("package_applications"), i18n("View With..."), this, TQT_SLOT(viewFileAs()));
m.insertSeparator();
}
- m.insertItem(i18n("Extract"), this, SLOT(extractFile()));
- m.insertItem(SmallIcon("ktnef_extract_to"), i18n("Extract To..."), this, SLOT(extractFileTo()));
+ m.insertItem(i18n("Extract"), this, TQT_SLOT(extractFile()));
+ m.insertItem(SmallIcon("ktnef_extract_to"), i18n("Extract To..."), this, TQT_SLOT(extractFileTo()));
if (list->count() == 1u)
{
m.insertSeparator();
- m.insertItem(SmallIcon("contents"), i18n("Properties"), this, SLOT(propertiesFile()));
+ m.insertItem(SmallIcon("contents"), i18n("Properties"), this, TQT_SLOT(propertiesFile()));
}
}
else if ( list->count() == 0 )
@@ -338,16 +338,16 @@ void KTNEFMain::viewRightButtonPressed(QListViewItem*, const QPoint& p, int)
m.exec( p );
}
-void KTNEFMain::viewDoubleClicked(QListViewItem *item)
+void KTNEFMain::viewDoubleClicked(TQListViewItem *item)
{
if (item && item->isSelected())
viewFile();
}
-void KTNEFMain::viewDragRequested( const QValueList<KTNEFAttach*>& list )
+void KTNEFMain::viewDragRequested( const TQValueList<KTNEFAttach*>& list )
{
KURL::List urlList;
- for ( QValueList<KTNEFAttach*>::ConstIterator it=list.constBegin(); it!=list.constEnd(); ++it )
+ for ( TQValueList<KTNEFAttach*>::ConstIterator it=list.constBegin(); it!=list.constEnd(); ++it )
urlList << KURL( extractTemp( *it ) );
if ( !list.isEmpty() )
{
@@ -358,16 +358,16 @@ void KTNEFMain::viewDragRequested( const QValueList<KTNEFAttach*>& list )
void KTNEFMain::slotEditToolbars()
{
- saveMainWindowSettings( KGlobal::config(), QString::fromLatin1("MainWindow") );
+ saveMainWindowSettings( KGlobal::config(), TQString::fromLatin1("MainWindow") );
KEditToolbar dlg(actionCollection());
- connect(&dlg, SIGNAL( newToolbarConfig() ), this, SLOT( slotNewToolbarConfig() ));
+ connect(&dlg, TQT_SIGNAL( newToolbarConfig() ), this, TQT_SLOT( slotNewToolbarConfig() ));
dlg.exec();
}
void KTNEFMain::slotNewToolbarConfig()
{
createGUI();
- applyMainWindowSettings( KGlobal::config(), QString::fromLatin1("MainWindow") );
+ applyMainWindowSettings( KGlobal::config(), TQString::fromLatin1("MainWindow") );
}
void KTNEFMain::slotShowMessageProperties()
@@ -378,7 +378,7 @@ void KTNEFMain::slotShowMessageProperties()
void KTNEFMain::slotShowMessageText()
{
- QString rtf = parser_->message()->rtfString();
+ TQString rtf = parser_->message()->rtfString();
qDebug( "%s", rtf.latin1() );
KTempFile tmpFile( KGlobal::dirs()->localkdedir() + "/share/apps/ktnef/tmp/", "rtf");
*( tmpFile.textStream() ) << rtf;
@@ -389,20 +389,20 @@ void KTNEFMain::slotShowMessageText()
void KTNEFMain::slotSaveMessageText()
{
- QString rtf = parser_->message()->rtfString();
- QString filename = KFileDialog::getSaveFileName( QString::null, QString::null, this );
+ TQString rtf = parser_->message()->rtfString();
+ TQString filename = KFileDialog::getSaveFileName( TQString::null, TQString::null, this );
if ( !filename.isEmpty() )
{
- QFile f( filename );
+ TQFile f( filename );
if ( f.open( IO_WriteOnly ) )
{
- QTextStream t( &f );
+ TQTextStream t( &f );
t << rtf;
}
else
- QMessageBox::critical( this, i18n( "Error" ),
+ TQMessageBox::critical( this, i18n( "Error" ),
i18n( "Unable to open file for writing, check file permissions." ),
- QMessageBox::Ok|QMessageBox::Default, 0);
+ TQMessageBox::Ok|TQMessageBox::Default, 0);
}
}
diff --git a/ktnef/gui/ktnefmain.h b/ktnef/gui/ktnefmain.h
index 30f5a171f..5f15f3d95 100644
--- a/ktnef/gui/ktnefmain.h
+++ b/ktnef/gui/ktnefmain.h
@@ -19,8 +19,8 @@
#define KTNEFMAIN_H
#include <kmainwindow.h>
-#include <qstring.h>
-#include <qlistview.h>
+#include <tqstring.h>
+#include <tqlistview.h>
class KTNEFView;
class KTNEFParser;
@@ -31,10 +31,10 @@ class KTNEFMain : public KMainWindow
Q_OBJECT
public:
- KTNEFMain(QWidget *parent = 0, const char *name = 0);
+ KTNEFMain(TQWidget *parent = 0, const char *name = 0);
~KTNEFMain();
- void loadFile(const QString& filename);
+ void loadFile(const TQString& filename);
protected slots:
void openFile();
@@ -52,12 +52,12 @@ protected slots:
void slotSaveMessageText();
void viewSelectionChanged();
- void viewRightButtonPressed(QListViewItem *item, const QPoint& p, int c);
- void viewDoubleClicked(QListViewItem*);
- void viewDragRequested( const QValueList<KTNEFAttach*>& list );
+ void viewRightButtonPressed(TQListViewItem *item, const TQPoint& p, int c);
+ void viewDoubleClicked(TQListViewItem*);
+ void viewDragRequested( const TQValueList<KTNEFAttach*>& list );
void slotConfigureKeys();
//protected:
-// void closeEvent(QCloseEvent *e);
+// void closeEvent(TQCloseEvent *e);
private:
void setupStatusbar();
@@ -67,8 +67,8 @@ private:
void enableSingleAction(bool on = true);
void cleanup();
- void extractTo(const QString& dirname);
- QString extractTemp(KTNEFAttach *att);
+ void extractTo(const TQString& dirname);
+ TQString extractTemp(KTNEFAttach *att);
private:
KTNEFView *view_;
diff --git a/ktnef/gui/ktnefview.cpp b/ktnef/gui/ktnefview.cpp
index abee5a73b..a77098350 100644
--- a/ktnef/gui/ktnefview.cpp
+++ b/ktnef/gui/ktnefview.cpp
@@ -19,9 +19,9 @@
#include <ktnef/ktnefattach.h>
#include "attachpropertydialog.h"
-#include <qheader.h>
-#include <qpixmap.h>
-#include <qtimer.h>
+#include <tqheader.h>
+#include <tqpixmap.h>
+#include <tqtimer.h>
#include <kapplication.h>
#include <kiconloader.h>
@@ -33,7 +33,7 @@
class Attachment : public QListViewItem
{
public:
- Attachment(QListView *parent, KTNEFAttach *attach);
+ Attachment(TQListView *parent, KTNEFAttach *attach);
~Attachment();
KTNEFAttach* getAttachment() const { return attach_; }
@@ -42,14 +42,14 @@ private:
KTNEFAttach *attach_;
};
-Attachment::Attachment(QListView *parent, KTNEFAttach *attach)
- : QListViewItem(parent, attach->name()), attach_(attach)
+Attachment::Attachment(TQListView *parent, KTNEFAttach *attach)
+ : TQListViewItem(parent, attach->name()), attach_(attach)
{
- setText(2, QString::number( attach_->size() ));
+ setText(2, TQString::number( attach_->size() ));
if (!attach_->fileName().isEmpty()) setText(0, attach_->fileName());
KMimeType::Ptr mimeType = KMimeType::mimeType( attach_->mimeTag() );
setText(1, mimeType->comment());
- QPixmap pix = loadRenderingPixmap( attach, parent->colorGroup().base() );
+ TQPixmap pix = loadRenderingPixmap( attach, parent->colorGroup().base() );
if ( !pix.isNull() )
setPixmap( 0, pix );
else
@@ -63,44 +63,44 @@ Attachment::~Attachment()
//------------------------------------------------------------------------------------------------------
-KTNEFView::KTNEFView(QWidget *parent, const char *name)
+KTNEFView::KTNEFView(TQWidget *parent, const char *name)
: KListView(parent,name)
{
attachments_.setAutoDelete(false);
addColumn(i18n("File Name"));
addColumn(i18n("File Type"));
addColumn(i18n("Size"));
- setFrameStyle(QFrame::WinPanel|QFrame::Sunken);
+ setFrameStyle(TQFrame::WinPanel|TQFrame::Sunken);
setLineWidth(1);
- setSelectionMode(QListView::Extended);
- setHScrollBarMode(QScrollView::AlwaysOff);
- setVScrollBarMode(QScrollView::AlwaysOn);
- QTimer::singleShot( 0, this, SLOT(adjustColumnWidth()) );
+ setSelectionMode(TQListView::Extended);
+ setHScrollBarMode(TQScrollView::AlwaysOff);
+ setVScrollBarMode(TQScrollView::AlwaysOn);
+ TQTimer::singleShot( 0, this, TQT_SLOT(adjustColumnWidth()) );
}
KTNEFView::~KTNEFView()
{
}
-void KTNEFView::setAttachments(QPtrList<KTNEFAttach> *list)
+void KTNEFView::setAttachments(TQPtrList<KTNEFAttach> *list)
{
clear();
if (list)
{
- QPtrListIterator<KTNEFAttach> it(*list);
+ TQPtrListIterator<KTNEFAttach> it(*list);
for (;it.current();++it)
new Attachment(this, it.current());
}
}
-void KTNEFView::resizeEvent(QResizeEvent *e)
+void KTNEFView::resizeEvent(TQResizeEvent *e)
{
adjustColumnWidth();
resizeContents(visibleWidth(),visibleHeight());
- if (e) QListView::resizeEvent(e);
+ if (e) TQListView::resizeEvent(e);
}
-QPtrList<KTNEFAttach>* KTNEFView::getSelection()
+TQPtrList<KTNEFAttach>* KTNEFView::getSelection()
{
attachments_.clear();
QListViewItem *item = firstChild();
@@ -114,8 +114,8 @@ QPtrList<KTNEFAttach>* KTNEFView::getSelection()
void KTNEFView::startDrag()
{
- QListViewItemIterator it( this, QListViewItemIterator::Selected );
- QValueList<KTNEFAttach*> list;
+ TQListViewItemIterator it( this, TQListViewItemIterator::Selected );
+ TQValueList<KTNEFAttach*> list;
while ( it.current() )
{
list << static_cast<Attachment*>( it.current() )->getAttachment();
diff --git a/ktnef/gui/ktnefview.h b/ktnef/gui/ktnefview.h
index 00c49b7c7..faa3262ae 100644
--- a/ktnef/gui/ktnefview.h
+++ b/ktnef/gui/ktnefview.h
@@ -19,7 +19,7 @@
#define KTNEFWIDGET_H
#include <klistview.h>
-#include <qptrlist.h>
+#include <tqptrlist.h>
#include <kdepimmacros.h>
class KTNEFAttach;
@@ -29,24 +29,24 @@ class KDE_EXPORT KTNEFView : public KListView
Q_OBJECT
public:
- KTNEFView(QWidget *parent = 0, const char *name = 0);
+ KTNEFView(TQWidget *parent = 0, const char *name = 0);
~KTNEFView();
- void setAttachments(QPtrList<KTNEFAttach> *list);
- QPtrList<KTNEFAttach>* getSelection();
+ void setAttachments(TQPtrList<KTNEFAttach> *list);
+ TQPtrList<KTNEFAttach>* getSelection();
signals:
- void dragRequested( const QValueList<KTNEFAttach*>& list );
+ void dragRequested( const TQValueList<KTNEFAttach*>& list );
protected:
- void resizeEvent(QResizeEvent *e);
+ void resizeEvent(TQResizeEvent *e);
void startDrag();
private slots:
void adjustColumnWidth();
private:
- QPtrList<KTNEFAttach> attachments_;
+ TQPtrList<KTNEFAttach> attachments_;
};
#endif
diff --git a/ktnef/gui/messagepropertydialog.cpp b/ktnef/gui/messagepropertydialog.cpp
index 0e098c35c..a2b1f75f9 100644
--- a/ktnef/gui/messagepropertydialog.cpp
+++ b/ktnef/gui/messagepropertydialog.cpp
@@ -22,7 +22,7 @@
#include <klistview.h>
#include <klocale.h>
-MessagePropertyDialog::MessagePropertyDialog( QWidget *parent, KTNEFMessage *msg )
+MessagePropertyDialog::MessagePropertyDialog( TQWidget *parent, KTNEFMessage *msg )
: KDialogBase( parent, "MessagePropertyDialog", true, i18n( "Message Properties" ),
KDialogBase::Close|KDialogBase::User1, KDialogBase::Close, false,
KStdGuiItem::save() )
diff --git a/ktnef/gui/messagepropertydialog.h b/ktnef/gui/messagepropertydialog.h
index 7b357b716..7d1ee7aa6 100644
--- a/ktnef/gui/messagepropertydialog.h
+++ b/ktnef/gui/messagepropertydialog.h
@@ -27,7 +27,7 @@ class MessagePropertyDialog : public KDialogBase
{
Q_OBJECT
public:
- MessagePropertyDialog( QWidget *parent, KTNEFMessage *msg );
+ MessagePropertyDialog( TQWidget *parent, KTNEFMessage *msg );
protected slots:
void slotUser1();
diff --git a/ktnef/gui/qwmf.cpp b/ktnef/gui/qwmf.cpp
index 6a10cc006..41b908d1c 100644
--- a/ktnef/gui/qwmf.cpp
+++ b/ktnef/gui/qwmf.cpp
@@ -19,12 +19,12 @@
#include <math.h>
#include <assert.h>
-#include <qfileinfo.h>
-#include <qpixmap.h>
-#include <qpainter.h>
-#include <qdatastream.h>
-#include <qapplication.h>
-#include <qbuffer.h>
+#include <tqfileinfo.h>
+#include <tqpixmap.h>
+#include <tqpainter.h>
+#include <tqdatastream.h>
+#include <tqapplication.h>
+#include <tqbuffer.h>
#include <kdebug.h>
bool qwmfDebug = false;
@@ -50,59 +50,59 @@ public:
class WinObjHandle
{
public:
- virtual void apply( QPainter& p ) = 0;
+ virtual void apply( TQPainter& p ) = 0;
};
class WinObjBrushHandle: public WinObjHandle
{
public:
- virtual void apply( QPainter& p );
- QBrush brush;
+ virtual void apply( TQPainter& p );
+ TQBrush brush;
virtual ~WinObjBrushHandle() {};
};
class WinObjPenHandle: public WinObjHandle
{
public:
- virtual void apply( QPainter& p );
- QPen pen;
+ virtual void apply( TQPainter& p );
+ TQPen pen;
virtual ~WinObjPenHandle() {};
};
class WinObjPatternBrushHandle: public WinObjHandle
{
public:
- virtual void apply( QPainter& p );
- QBrush brush;
- QPixmap image;
+ virtual void apply( TQPainter& p );
+ TQBrush brush;
+ TQPixmap image;
virtual ~WinObjPatternBrushHandle() {};
};
class WinObjFontHandle: public WinObjHandle
{
public:
- virtual void apply( QPainter& p );
- QFont font;
+ virtual void apply( TQPainter& p );
+ TQFont font;
int rotation;
virtual ~WinObjFontHandle() {};
};
-void WinObjBrushHandle::apply( QPainter& p )
+void WinObjBrushHandle::apply( TQPainter& p )
{
p.setBrush( brush );
}
-void WinObjPenHandle::apply( QPainter& p )
+void WinObjPenHandle::apply( TQPainter& p )
{
p.setPen( pen );
}
-void WinObjPatternBrushHandle::apply( QPainter& p )
+void WinObjPatternBrushHandle::apply( TQPainter& p )
{
p.setBrush( brush );
}
-void WinObjFontHandle::apply( QPainter& p )
+void WinObjFontHandle::apply( TQPainter& p )
{
p.setFont( font );
}
@@ -130,34 +130,34 @@ QWinMetaFile::~QWinMetaFile()
//-----------------------------------------------------------------------------
-bool QWinMetaFile::load( const QString &filename )
+bool QWinMetaFile::load( const TQString &filename )
{
- QFile file( filename );
+ TQFile file( filename );
if ( !file.exists() )
{
- kdDebug() << "File " << QFile::encodeName(filename) << " does not exist" << endl;
+ kdDebug() << "File " << TQFile::encodeName(filename) << " does not exist" << endl;
return false;
}
if ( !file.open( IO_ReadOnly ) )
{
- kdDebug() << "Cannot open file " << QFile::encodeName(filename) << endl;
+ kdDebug() << "Cannot open file " << TQFile::encodeName(filename) << endl;
return false;
}
- QByteArray ba = file.readAll();
+ TQByteArray ba = file.readAll();
file.close();
- QBuffer buffer( ba );
+ TQBuffer buffer( ba );
buffer.open( IO_ReadOnly );
return load( buffer );
}
//-----------------------------------------------------------------------------
-bool QWinMetaFile::load( QBuffer &buffer )
+bool QWinMetaFile::load( TQBuffer &buffer )
{
- QDataStream st;
+ TQDataStream st;
WmfEnhMetaHeader eheader;
WmfMetaHeader header;
WmfPlaceableHeader pheader;
@@ -174,7 +174,7 @@ bool QWinMetaFile::load( QBuffer &buffer )
mFirstCmd = NULL;
st.setDevice( &buffer );
- st.setByteOrder( QDataStream::LittleEndian ); // Great, I love Qt !
+ st.setByteOrder( TQDataStream::LittleEndian ); // Great, I love Qt !
//----- Read placeable metafile header
st >> pheader.key;
@@ -329,7 +329,7 @@ bool QWinMetaFile::load( QBuffer &buffer )
//-----------------------------------------------------------------------------
-bool QWinMetaFile::paint( const QPaintDevice* aTarget, bool absolute )
+bool QWinMetaFile::paint( const TQPaintDevice* aTarget, bool absolute )
{
int idx, i;
WmfCmd* cmd;
@@ -365,7 +365,7 @@ bool QWinMetaFile::paint( const QPaintDevice* aTarget, bool absolute )
( this->*metaFuncTab[ idx ].method )( cmd->numParm, cmd->parm );
if ( QWMF_DEBUG ) {
- QString str = "", param;
+ TQString str = "", param;
if ( metaFuncTab[ idx ].name == NULL ) {
str += "UNKNOWN ";
}
@@ -384,8 +384,8 @@ bool QWinMetaFile::paint( const QPaintDevice* aTarget, bool absolute )
}
}
/*
- // TODO: cleanup this code when QPicture::setBoundingBox() is possible in KOClipart (QT31)
- // because actually QPicture::boundingBox() != mBBox()
+ // TODO: cleanup this code when TQPicture::setBoundingBox() is possible in KOClipart (QT31)
+ // because actually TQPicture::boundingBox() != mBBox()
mWindowsCoord += 1;
if ( mWindowsCoord == 2 ) {
kdDebug() << "DRAW ANGLES " << endl;
@@ -405,7 +405,7 @@ bool QWinMetaFile::paint( const QPaintDevice* aTarget, bool absolute )
void QWinMetaFile::setWindowOrg( long, short* parm )
{
if ( mAbsoluteCoord ) {
- QRect r = mPainter.window();
+ TQRect r = mPainter.window();
mPainter.setWindow( parm[ 1 ], parm[ 0 ], r.width(), r.height() );
}
else {
@@ -425,12 +425,12 @@ void QWinMetaFile::setWindowExt( long, short* parm )
{
// negative value allowed for width and height : QABS() forbidden
if ( mAbsoluteCoord ) {
- QRect r = mPainter.window();
+ TQRect r = mPainter.window();
mPainter.setWindow( r.left(), r.top(), parm[ 1 ], parm[ 0 ] );
}
else {
if ( (parm[ 0 ] != 0) && (parm[ 1 ] != 0) ) {
- QRect r = mPainter.window();
+ TQRect r = mPainter.window();
double dx = mInternalWorldMatrix.dx();
double dy = mInternalWorldMatrix.dy();
double sx = mInternalWorldMatrix.m11();
@@ -479,7 +479,7 @@ void QWinMetaFile::ellipse( long, short* parm )
//-----------------------------------------------------------------------------
void QWinMetaFile::polygon( long, short* parm )
{
- QPointArray* pa;
+ TQPointArray* pa;
pa = pointArray( parm[ 0 ], &parm[ 1 ] );
mPainter.drawPolygon( *pa, mWinding );
@@ -489,24 +489,24 @@ void QWinMetaFile::polygon( long, short* parm )
//-----------------------------------------------------------------------------
void QWinMetaFile::polyPolygon( long, short* parm )
{
- QRegion region;
+ TQRegion region;
int i, j, startPolygon;
mPainter.save();
// define clipping region
- QRect win = bbox();
+ TQRect win = bbox();
startPolygon = 1+parm[ 0 ];
for ( i=0 ; i < parm[ 0 ] ; i++ ) {
- QPointArray pa1( parm[ 1+i ] );
+ TQPointArray pa1( parm[ 1+i ] );
for ( j=0 ; j < parm[ 1+i ] ; j++) {
pa1.setPoint ( j, parm[ startPolygon ], parm[ startPolygon+1 ] );
startPolygon += 2;
}
- QRegion r( pa1 );
+ TQRegion r( pa1 );
region = region.eor( r );
}
- mPainter.setClipRegion( region, QPainter::CoordPainter );
+ mPainter.setClipRegion( region, TQPainter::CoordPainter );
// fill polygons
mPainter.fillRect( win.left(), win.top(), win.width(), win.height(), mPainter.brush() );
@@ -516,7 +516,7 @@ void QWinMetaFile::polyPolygon( long, short* parm )
mPainter.setClipping( false );
mPainter.setBrush( Qt::NoBrush );
- QPointArray* pa;
+ TQPointArray* pa;
int idxPolygon = 1 + parm[ 0 ];
for ( i=0 ; i < parm[ 0 ] ; i++ ) {
pa = pointArray( parm[ 1+i ], &parm[ idxPolygon ] );
@@ -532,7 +532,7 @@ void QWinMetaFile::polyPolygon( long, short* parm )
//-----------------------------------------------------------------------------
void QWinMetaFile::polyline( long, short* parm )
{
- QPointArray* pa;
+ TQPointArray* pa;
pa = pointArray( parm[ 0 ], &parm[ 1 ] );
mPainter.drawPolyline( *pa );
@@ -628,7 +628,7 @@ void QWinMetaFile::setBkMode( long, short* parm )
//-----------------------------------------------------------------------------
void QWinMetaFile::setPixel( long, short* parm )
{
- QPen pen = mPainter.pen();
+ TQPen pen = mPainter.pen();
mPainter.setPen( color( parm ) );
mPainter.drawPoint( parm[ 3 ], parm[ 2 ] );
mPainter.setPen( pen );
@@ -661,16 +661,16 @@ void QWinMetaFile::restoreDC( long, short *parm )
void QWinMetaFile::intersectClipRect( long, short* parm )
{
/* TODO: better implementation : need QT 3.0.2
- QRegion region = mPainter.clipRegion();
+ TQRegion region = mPainter.clipRegion();
if ( region.isEmpty() )
region = bbox();
*/
- QRegion region( bbox() );
+ TQRegion region( bbox() );
- QRegion newRegion( parm[ 3 ], parm[ 2 ], parm[ 1 ] - parm[ 3 ], parm[ 0 ] - parm[ 2 ] );
+ TQRegion newRegion( parm[ 3 ], parm[ 2 ], parm[ 1 ] - parm[ 3 ], parm[ 0 ] - parm[ 2 ] );
region = region.intersect( newRegion );
- mPainter.setClipRegion( region, QPainter::CoordPainter );
+ mPainter.setClipRegion( region, TQPainter::CoordPainter );
}
@@ -678,16 +678,16 @@ void QWinMetaFile::intersectClipRect( long, short* parm )
void QWinMetaFile::excludeClipRect( long, short* parm )
{
/* TODO: better implementation : need QT 3.0.2
- QRegion region = mPainter.clipRegion();
+ TQRegion region = mPainter.clipRegion();
if ( region.isEmpty() )
region = bbox();
*/
- QRegion region( bbox() );
+ TQRegion region( bbox() );
- QRegion newRegion( parm[ 3 ], parm[ 2 ], parm[ 1 ] - parm[ 3 ], parm[ 0 ] - parm[ 2 ] );
+ TQRegion newRegion( parm[ 3 ], parm[ 2 ], parm[ 1 ] - parm[ 3 ], parm[ 0 ] - parm[ 2 ] );
region = region.subtract( newRegion );
- mPainter.setClipRegion( region, QPainter::CoordPainter );
+ mPainter.setClipRegion( region, TQPainter::CoordPainter );
}
@@ -738,16 +738,16 @@ void QWinMetaFile::extTextOut( long num, short* parm )
else
ptStr = (char*)&parm[ 4 ];
- QCString text( ptStr, parm[ 2 ] + 1 );
+ TQCString text( ptStr, parm[ 2 ] + 1 );
- QFontMetrics fm( mPainter.font() );
+ TQFontMetrics fm( mPainter.font() );
width = fm.width( text ) + fm.descent(); // because fm.width(text) isn't rigth with Italic text
height = fm.height();
mPainter.save();
if ( mTextAlign & 0x01 ) { // (left, top) position = current logical position
- QPoint pos = mPainter.pos();
+ TQPoint pos = mPainter.pos();
x = pos.x();
y = pos.y();
}
@@ -795,7 +795,7 @@ void QWinMetaFile::extTextOut( long num, short* parm )
void QWinMetaFile::dibBitBlt( long num, short* parm )
{
if ( num > 9 ) { // DIB image
- QImage bmpSrc;
+ TQImage bmpSrc;
if ( dibToBmp( bmpSrc, (char*)&parm[ 8 ], (num - 8) * 2 ) ) {
long raster = toDWord( parm );
@@ -805,11 +805,11 @@ void QWinMetaFile::dibBitBlt( long num, short* parm )
// wmf file allow negative width or height
mPainter.save();
if ( parm[ 5 ] < 0 ) { // width < 0 => horizontal flip
- QWMatrix m( -1.0F, 0.0F, 0.0F, 1.0F, 0.0F, 0.0F );
+ TQWMatrix m( -1.0F, 0.0F, 0.0F, 1.0F, 0.0F, 0.0F );
mPainter.setWorldMatrix( m, true );
}
if ( parm[ 4 ] < 0 ) { // height < 0 => vertical flip
- QWMatrix m( 1.0F, 0.0F, 0.0F, -1.0F, 0.0F, 0.0F );
+ TQWMatrix m( 1.0F, 0.0F, 0.0F, -1.0F, 0.0F, 0.0F );
mPainter.setWorldMatrix( m, true );
}
mPainter.drawImage( parm[ 7 ], parm[ 6 ], bmpSrc, parm[ 3 ], parm[ 2 ], parm[ 5 ], parm[ 4 ] );
@@ -825,7 +825,7 @@ void QWinMetaFile::dibBitBlt( long num, short* parm )
//-----------------------------------------------------------------------------
void QWinMetaFile::dibStretchBlt( long num, short* parm )
{
- QImage bmpSrc;
+ TQImage bmpSrc;
if ( dibToBmp( bmpSrc, (char*)&parm[ 10 ], (num - 10) * 2 ) ) {
long raster = toDWord( parm );
@@ -835,15 +835,15 @@ void QWinMetaFile::dibStretchBlt( long num, short* parm )
// wmf file allow negative width or height
mPainter.save();
if ( parm[ 7 ] < 0 ) { // width < 0 => horizontal flip
- QWMatrix m( -1.0F, 0.0F, 0.0F, 1.0F, 0.0F, 0.0F );
+ TQWMatrix m( -1.0F, 0.0F, 0.0F, 1.0F, 0.0F, 0.0F );
mPainter.setWorldMatrix( m, true );
}
if ( parm[ 6 ] < 0 ) { // height < 0 => vertical flip
- QWMatrix m( 1.0F, 0.0F, 0.0F, -1.0F, 0.0F, 0.0F );
+ TQWMatrix m( 1.0F, 0.0F, 0.0F, -1.0F, 0.0F, 0.0F );
mPainter.setWorldMatrix( m, true );
}
bmpSrc = bmpSrc.copy( parm[ 5 ], parm[ 4 ], parm[ 3 ], parm[ 2 ] );
- // TODO: scale the bitmap ( QImage::scale(parm[ 7 ], parm[ 6 ]) is actually too slow )
+ // TODO: scale the bitmap ( TQImage::scale(parm[ 7 ], parm[ 6 ]) is actually too slow )
mPainter.drawImage( parm[ 9 ], parm[ 8 ], bmpSrc );
mPainter.restore();
@@ -854,7 +854,7 @@ void QWinMetaFile::dibStretchBlt( long num, short* parm )
//-----------------------------------------------------------------------------
void QWinMetaFile::stretchDib( long num, short* parm )
{
- QImage bmpSrc;
+ TQImage bmpSrc;
if ( dibToBmp( bmpSrc, (char*)&parm[ 11 ], (num - 11) * 2 ) ) {
long raster = toDWord( parm );
@@ -864,15 +864,15 @@ void QWinMetaFile::stretchDib( long num, short* parm )
// wmf file allow negative width or height
mPainter.save();
if ( parm[ 8 ] < 0 ) { // width < 0 => horizontal flip
- QWMatrix m( -1.0F, 0.0F, 0.0F, 1.0F, 0.0F, 0.0F );
+ TQWMatrix m( -1.0F, 0.0F, 0.0F, 1.0F, 0.0F, 0.0F );
mPainter.setWorldMatrix( m, true );
}
if ( parm[ 7 ] < 0 ) { // height < 0 => vertical flip
- QWMatrix m( 1.0F, 0.0F, 0.0F, -1.0F, 0.0F, 0.0F );
+ TQWMatrix m( 1.0F, 0.0F, 0.0F, -1.0F, 0.0F, 0.0F );
mPainter.setWorldMatrix( m, true );
}
bmpSrc = bmpSrc.copy( parm[ 6 ], parm[ 5 ], parm[ 4 ], parm[ 3 ] );
- // TODO: scale the bitmap ( QImage::scale(parm[ 8 ], parm[ 7 ]) is actually too slow )
+ // TODO: scale the bitmap ( TQImage::scale(parm[ 8 ], parm[ 7 ]) is actually too slow )
mPainter.drawImage( parm[ 10 ], parm[ 9 ], bmpSrc );
mPainter.restore();
@@ -885,7 +885,7 @@ void QWinMetaFile::dibCreatePatternBrush( long num, short* parm )
{
WinObjPatternBrushHandle* handle = new WinObjPatternBrushHandle;
addHandle( handle );
- QImage bmpSrc;
+ TQImage bmpSrc;
if ( dibToBmp( bmpSrc, (char*)&parm[ 2 ], (num - 2) * 2 ) ) {
handle->image = bmpSrc;
@@ -997,7 +997,7 @@ void QWinMetaFile::createPenIndirect( long, short* parm )
// TODO : width of pen proportional to device context width
// DOESN'T WORK
/*
- QRect devRec;
+ TQRect devRec;
devRec = mPainter.xForm( mBBox );
width = ( parm[ 0 ] * devRec.width() ) / mBBox.width() ;
kdDebug() << "CreatePenIndirect: " << endl;
@@ -1015,7 +1015,7 @@ void QWinMetaFile::createFontIndirect( long , short* parm)
WinObjFontHandle* handle = new WinObjFontHandle;
addHandle( handle );
- QString family( (const char*)&parm[ 9 ] );
+ TQString family( (const char*)&parm[ 9 ] );
mRotation = -parm[ 2 ] / 10; // text rotation (in 1/10 degree)
// TODO: memorisation of rotation in object Font
@@ -1074,7 +1074,7 @@ int QWinMetaFile::findFunc( unsigned short aFunc ) const
}
//-----------------------------------------------------------------------------
-QPointArray* QWinMetaFile::pointArray( short num, short* parm )
+TQPointArray* QWinMetaFile::pointArray( short num, short* parm )
{
int i;
@@ -1109,7 +1109,7 @@ unsigned int QWinMetaFile::toDWord( short* parm )
//-----------------------------------------------------------------------------
-QColor QWinMetaFile::color( short* parm )
+TQColor QWinMetaFile::color( short* parm )
{
unsigned int colorRef;
int red, green, blue;
@@ -1119,7 +1119,7 @@ QColor QWinMetaFile::color( short* parm )
green = ( colorRef>>8 ) & 255;
blue = ( colorRef>>16 ) & 255;
- return QColor( red, green, blue );
+ return TQColor( red, green, blue );
}
@@ -1222,7 +1222,7 @@ Qt::RasterOp QWinMetaFile::winToQtRaster( long parm ) const
}
//-----------------------------------------------------------------------------
-bool QWinMetaFile::dibToBmp( QImage& bmp, const char* dib, long size )
+bool QWinMetaFile::dibToBmp( TQImage& bmp, const char* dib, long size )
{
typedef struct _BMPFILEHEADER {
WORD bmType;
@@ -1234,7 +1234,7 @@ bool QWinMetaFile::dibToBmp( QImage& bmp, const char* dib, long size )
int sizeBmp = size + 14;
- QByteArray pattern( sizeBmp ); // BMP header and DIB data
+ TQByteArray pattern( sizeBmp ); // BMP header and DIB data
pattern.fill(0);
memcpy( &pattern[ 14 ], dib, size );
diff --git a/ktnef/gui/qwmf.h b/ktnef/gui/qwmf.h
index b655a3fd3..051979df3 100644
--- a/ktnef/gui/qwmf.h
+++ b/ktnef/gui/qwmf.h
@@ -19,14 +19,14 @@
#ifndef qwmf_h
#define qwmf_h
-#include <qstring.h>
-#include <qpainter.h>
-#include <qwmatrix.h>
-#include <qpointarray.h>
-#include <qpen.h>
-#include <qcolor.h>
-#include <qimage.h>
-#include <qrect.h>
+#include <tqstring.h>
+#include <tqpainter.h>
+#include <tqwmatrix.h>
+#include <tqpointarray.h>
+#include <tqpen.h>
+#include <tqcolor.h>
+#include <tqimage.h>
+#include <tqrect.h>
class QBuffer;
class QString;
@@ -41,7 +41,7 @@ struct WmfPlaceableHeader;
* How to use QWinMetaFile :
* #include "qwmf.h"
* QWinMetaFile wmf;
- * QPicture pic; // or QImage pic;
+ * TQPicture pic; // or TQImage pic;
* if ( wmf.load( filename )
*   wmf.paint( &pic );
*/
@@ -56,8 +56,8 @@ public:
/**
* Load WMF file. Returns true on success.
*/
- virtual bool load( const QString &fileName );
- virtual bool load( QBuffer &buffer );
+ virtual bool load( const TQString &fileName );
+ virtual bool load( TQBuffer &buffer );
/**
* Paint metafile to given paint-device using absolute or relative coordinate.
@@ -65,7 +65,7 @@ public:
* relative coord. use the existing world transfomation Matrix
* Returns true on success.
*/
- virtual bool paint( const QPaintDevice* target, bool absolute=false );
+ virtual bool paint( const TQPaintDevice* target, bool absolute=false );
/**
* Returns true if the metafile is placeable.
@@ -80,8 +80,8 @@ public:
/**
* Returns bounding rectangle
*/
- QRect bbox( void ) const { return mBBox; }
- void setBbox( QRect r ) { mBBox = r; }
+ TQRect bbox( void ) const { return mBBox; }
+ void setBbox( TQRect r ) { mBBox = r; }
public: // should be protected but cannot
/** Metafile painter methods */
@@ -182,10 +182,10 @@ protected:
virtual int findFunc( unsigned short aFunc ) const;
/** Fills given parms into mPoints. */
- QPointArray* pointArray( short num, short* parms );
+ TQPointArray* pointArray( short num, short* parms );
/** Returns color given by the two parameters */
- QColor color( short* parm );
+ TQColor color( short* parm );
/** Converts two parameters to long */
unsigned int toDWord( short* parm );
@@ -202,26 +202,26 @@ protected:
Qt::RasterOp winToQtRaster( long parm ) const;
/** Converts DIB to BMP */
- bool dibToBmp( QImage& bmp, const char* dib, long size);
+ bool dibToBmp( TQImage& bmp, const char* dib, long size);
protected:
- QPainter mPainter;
+ TQPainter mPainter;
bool mIsPlaceable, mIsEnhanced, mValid;
// coordinate system
bool mAbsoluteCoord;
- QWMatrix mInternalWorldMatrix; // memorisation of WMF matrix transformation
- QRect mHeaderBoundingBox;
- QRect mBBox;
+ TQWMatrix mInternalWorldMatrix; // memorisation of WMF matrix transformation
+ TQRect mHeaderBoundingBox;
+ TQRect mBBox;
// informtion shared between Metafile Functions
- QColor mTextColor;
+ TQColor mTextColor;
int mTextAlign, mRotation;
bool mWinding;
WmfCmd* mFirstCmd;
WinObjHandle** mObjHandleTab;
- QPointArray mPoints;
+ TQPointArray mPoints;
int mDpi;
};
diff --git a/ktnef/ktnef/ktnefattach.h b/ktnef/ktnef/ktnefattach.h
index 846c4a6b8..f7f9f0862 100644
--- a/ktnef/ktnef/ktnefattach.h
+++ b/ktnef/ktnef/ktnefattach.h
@@ -18,9 +18,9 @@
#ifndef KTNEFATTACH_H
#define KTNEFATTACH_H
-#include <qstring.h>
-#include <qmap.h>
-#include <qvariant.h>
+#include <tqstring.h>
+#include <tqmap.h>
+#include <tqvariant.h>
#include <ktnef/ktnefpropertyset.h>
#include <kdepimmacros.h>
@@ -49,18 +49,18 @@ public:
void setSize(int s);
int displaySize() const;
void setDisplaySize(int s);
- QString name() const;
- void setName(const QString& str);
+ TQString name() const;
+ void setName(const TQString& str);
int index() const;
void setIndex(int i);
- QString fileName() const;
- void setFileName(const QString& str);
- QString displayName() const;
- void setDisplayName(const QString& str);
- QString mimeTag() const;
- void setMimeTag(const QString& str);
- QString extension() const;
- void setExtension(const QString& str);
+ TQString fileName() const;
+ void setFileName(const TQString& str);
+ TQString displayName() const;
+ void setDisplayName(const TQString& str);
+ TQString mimeTag() const;
+ void setMimeTag(const TQString& str);
+ TQString extension() const;
+ void setExtension(const TQString& str);
private:
class AttachPrivate;
diff --git a/ktnef/ktnef/ktnefdefs.h b/ktnef/ktnef/ktnefdefs.h
index 6e9e96fd8..d2e57aa58 100644
--- a/ktnef/ktnef/ktnefdefs.h
+++ b/ktnef/ktnef/ktnefdefs.h
@@ -85,7 +85,7 @@
#define MAPI_TAG_DATA 0x3701
#define MAPI_TAG_ATTACHENCODING 0x3702
#define MAPI_TAG_EXTENSION 0x3703
-#define MAPI_TAG_ATTACHMETHOD 0x3705
+#define MAPI_TAG_ATTACHQT_METHOD 0x3705
#define MAPI_TAG_RENDERINGPOS 0x370b
#define MAPI_TAG_MIMETAG 0x370e
#define MAPI_TAG_ATTACHFLAGS 0x3714
diff --git a/ktnef/ktnef/ktnefmessage.h b/ktnef/ktnef/ktnefmessage.h
index efdc236a8..059c64f6d 100644
--- a/ktnef/ktnef/ktnefmessage.h
+++ b/ktnef/ktnef/ktnefmessage.h
@@ -19,7 +19,7 @@
#define KTNEFMESSAGE_H
#include <ktnef/ktnefpropertyset.h>
-#include <qptrlist.h>
+#include <tqptrlist.h>
#include <kdepimmacros.h>
class KTNEFAttach;
@@ -30,11 +30,11 @@ public:
KTNEFMessage();
~KTNEFMessage();
- const QPtrList<KTNEFAttach>& attachmentList() const;
- KTNEFAttach* attachment( const QString& filename ) const;
+ const TQPtrList<KTNEFAttach>& attachmentList() const;
+ KTNEFAttach* attachment( const TQString& filename ) const;
void addAttachment( KTNEFAttach* attach );
void clearAttachments();
- QString rtfString();
+ TQString rtfString();
private:
class MessagePrivate;
diff --git a/ktnef/ktnef/ktnefparser.h b/ktnef/ktnef/ktnefparser.h
index 3696cd17c..ff48ab083 100644
--- a/ktnef/ktnef/ktnefparser.h
+++ b/ktnef/ktnef/ktnefparser.h
@@ -18,9 +18,9 @@
#ifndef KTNEFPARSER_H
#define KTNEFPARSER_H
-#include <qptrlist.h>
-#include <qstring.h>
-#include <qmap.h>
+#include <tqptrlist.h>
+#include <tqstring.h>
+#include <tqmap.h>
#include <kdepimmacros.h>
class KTNEFAttach;
@@ -33,21 +33,21 @@ public:
KTNEFParser();
~KTNEFParser();
- bool openFile(const QString& filename);
- bool openDevice( QIODevice *device );
- bool extractFile(const QString& filename);
- bool extractFileTo(const QString& filename, const QString& dirname);
+ bool openFile(const TQString& filename);
+ bool openDevice( TQIODevice *device );
+ bool extractFile(const TQString& filename);
+ bool extractFileTo(const TQString& filename, const TQString& dirname);
bool extractAll();
- void setDefaultExtractDir(const QString& dirname);
+ void setDefaultExtractDir(const TQString& dirname);
KTNEFMessage* message() const;
private:
bool decodeAttachment();
bool decodeMessage();
- bool extractAttachmentTo(KTNEFAttach *att, const QString& dirname);
+ bool extractAttachmentTo(KTNEFAttach *att, const TQString& dirname);
bool parseDevice();
void checkCurrent(int state);
- bool readMAPIProperties(QMap<int,KTNEFProperty*>& pros, KTNEFAttach *attach = 0);
+ bool readMAPIProperties(TQMap<int,KTNEFProperty*>& pros, KTNEFAttach *attach = 0);
void deleteDevice();
private:
diff --git a/ktnef/ktnef/ktnefproperty.h b/ktnef/ktnef/ktnefproperty.h
index b56b9f802..bf5ab8a2e 100644
--- a/ktnef/ktnef/ktnefproperty.h
+++ b/ktnef/ktnef/ktnefproperty.h
@@ -18,8 +18,8 @@
#ifndef KTNEFPROPERTY_H
#define KTNEFPROPERTY_H
-#include <qvariant.h>
-#include <qstring.h>
+#include <tqvariant.h>
+#include <tqstring.h>
#include <kdepimmacros.h>
class KDE_EXPORT KTNEFProperty
@@ -40,24 +40,24 @@ public:
};
KTNEFProperty();
- KTNEFProperty( int key_, int type_, const QVariant& value_, const QVariant& name_ = QVariant() );
+ KTNEFProperty( int key_, int type_, const TQVariant& value_, const TQVariant& name_ = TQVariant() );
KTNEFProperty( const KTNEFProperty& p );
- QString keyString();
- QString valueString();
- static QString formatValue( const QVariant& v, bool beautify=true );
+ TQString keyString();
+ TQString valueString();
+ static TQString formatValue( const TQVariant& v, bool beautify=true );
int key() const;
int type() const;
- QVariant value() const;
- QVariant name() const;
+ TQVariant value() const;
+ TQVariant name() const;
bool isVector() const;
private:
int _key;
int _type;
- QVariant _value;
- QVariant _name;
+ TQVariant _value;
+ TQVariant _name;
};
#endif /* KTNEFPROPERTY_H */
diff --git a/ktnef/ktnef/ktnefpropertyset.h b/ktnef/ktnef/ktnefpropertyset.h
index 387acbd3a..841cf950b 100644
--- a/ktnef/ktnef/ktnefpropertyset.h
+++ b/ktnef/ktnef/ktnefpropertyset.h
@@ -18,8 +18,8 @@
#ifndef KTNEFPROPERTYSET_H
#define KTNEFPROPERTYSET_H
-#include <qmap.h>
-#include <qvariant.h>
+#include <tqmap.h>
+#include <tqvariant.h>
#include <kdepimmacros.h>
class KTNEFProperty;
@@ -31,24 +31,24 @@ public:
~KTNEFPropertySet();
/* MAPI properties interface */
- void addProperty( int key, int type, const QVariant& value, const QVariant& name = QVariant(), bool overwrite = false );
- QString findProp( int key, const QString& fallback=QString::null, bool convertToUpper=false);
- QString findNamedProp(const QString& name, const QString& fallback=QString::null, bool convertToUpper=false);
- QMap<int,KTNEFProperty*>& properties();
- const QMap<int,KTNEFProperty*>& properties() const;
- QVariant property( int key ) const;
+ void addProperty( int key, int type, const TQVariant& value, const TQVariant& name = TQVariant(), bool overwrite = false );
+ TQString findProp( int key, const TQString& fallback=TQString::null, bool convertToUpper=false);
+ TQString findNamedProp(const TQString& name, const TQString& fallback=TQString::null, bool convertToUpper=false);
+ TQMap<int,KTNEFProperty*>& properties();
+ const TQMap<int,KTNEFProperty*>& properties() const;
+ TQVariant property( int key ) const;
/* TNEF attributes interface */
- void addAttribute( int key, int type, const QVariant& value, bool overwrite = false );
- QMap<int,KTNEFProperty*>& attributes();
- const QMap<int,KTNEFProperty*>& attributes() const;
- QVariant attribute( int key ) const;
+ void addAttribute( int key, int type, const TQVariant& value, bool overwrite = false );
+ TQMap<int,KTNEFProperty*>& attributes();
+ const TQMap<int,KTNEFProperty*>& attributes() const;
+ TQVariant attribute( int key ) const;
void clear( bool deleteAll = false );
private:
- QMap<int,KTNEFProperty*> properties_; /* used to store MAPI properties */
- QMap<int,KTNEFProperty*> attributes_; /* used to store TNEF attributes */
+ TQMap<int,KTNEFProperty*> properties_; /* used to store MAPI properties */
+ TQMap<int,KTNEFProperty*> attributes_; /* used to store TNEF attributes */
};
#endif /* KTNEFPROPERTYSET_H */
diff --git a/ktnef/ktnef/ktnefwriter.h b/ktnef/ktnef/ktnefwriter.h
index ab04c0b37..29828c1f9 100644
--- a/ktnef/ktnef/ktnefwriter.h
+++ b/ktnef/ktnef/ktnefwriter.h
@@ -30,12 +30,12 @@ public:
KTNEFWriter();
~KTNEFWriter();
- void addProperty( int tag, int type, const QVariant& value );
+ void addProperty( int tag, int type, const TQVariant& value );
- bool writeFile( QIODevice &file );
- bool writeFile( QDataStream &stream );
+ bool writeFile( TQIODevice &file );
+ bool writeFile( TQDataStream &stream );
- bool writeProperty( QDataStream &stream, int &bytes, int type);
+ bool writeProperty( TQDataStream &stream, int &bytes, int type);
enum MessageType {
Appointment, MeetingCancelled, MeetingRequest,
@@ -64,24 +64,24 @@ public:
};
// This set of functions sets all properties on the file you want to save
- void setSender(const QString &name, const QString &email);
+ void setSender(const TQString &name, const TQString &email);
void setMessageType(MessageType m);
void setMethod( Method m );
void clearAttendees();
- void addAttendee( const QString& cn, Role r, PartStat p, bool rsvp,
- const QString& mailto );
- void setOrganizer( const QString& organizer ); // Is that the same as sender???
- void setDtStart( const QDateTime& dtStart );
- void setDtEnd( const QDateTime& dtEnd );
- void setLocation( const QString& location );
- void setUID( const QString& uid );
- void setDtStamp( const QDateTime& dtStamp );
- void setCategories( const QStringList& );
- void setDescription( const QString& );
- void setSummary( const QString& );
+ void addAttendee( const TQString& cn, Role r, PartStat p, bool rsvp,
+ const TQString& mailto );
+ void setOrganizer( const TQString& organizer ); // Is that the same as sender???
+ void setDtStart( const TQDateTime& dtStart );
+ void setDtEnd( const TQDateTime& dtEnd );
+ void setLocation( const TQString& location );
+ void setUID( const TQString& uid );
+ void setDtStamp( const TQDateTime& dtStamp );
+ void setCategories( const TQStringList& );
+ void setDescription( const TQString& );
+ void setSummary( const TQString& );
void setPriority( Priority p );
- void setAlarm( const QString& description, AlarmAction action,
- const QDateTime& wakeBefore );
+ void setAlarm( const TQString& description, AlarmAction action,
+ const TQDateTime& wakeBefore );
private:
class PrivateData;
diff --git a/ktnef/lib/ktnefattach.cpp b/ktnef/lib/ktnefattach.cpp
index 76b1aeef0..b6dad60d6 100644
--- a/ktnef/lib/ktnefattach.cpp
+++ b/ktnef/lib/ktnefattach.cpp
@@ -25,12 +25,12 @@ public:
int size_;
int offset_;
int displaysize_;
- QString name_;
+ TQString name_;
int index_;
- QString filename_;
- QString displayname_;
- QString mimetag_;
- QString extension_;
+ TQString filename_;
+ TQString displayname_;
+ TQString mimetag_;
+ TQString extension_;
};
KTNEFAttach::KTNEFAttach()
@@ -90,10 +90,10 @@ int KTNEFAttach::displaySize() const
void KTNEFAttach::setDisplaySize(int s)
{ d->displaysize_ = s; }
-QString KTNEFAttach::name() const
+TQString KTNEFAttach::name() const
{ return d->name_; }
-void KTNEFAttach::setName(const QString& str)
+void KTNEFAttach::setName(const TQString& str)
{ setTitleParsed(); d->name_ = str; }
int KTNEFAttach::index() const
@@ -102,26 +102,26 @@ int KTNEFAttach::index() const
void KTNEFAttach::setIndex(int i)
{ setInfoParsed(); d->index_ = i; }
-QString KTNEFAttach::fileName() const
+TQString KTNEFAttach::fileName() const
{ return d->filename_; }
-void KTNEFAttach::setFileName(const QString& str)
+void KTNEFAttach::setFileName(const TQString& str)
{ d->filename_ = str; }
-QString KTNEFAttach::displayName() const
+TQString KTNEFAttach::displayName() const
{ return d->displayname_; }
-void KTNEFAttach::setDisplayName(const QString& str)
+void KTNEFAttach::setDisplayName(const TQString& str)
{ d->displayname_ = str; }
-QString KTNEFAttach::mimeTag() const
+TQString KTNEFAttach::mimeTag() const
{ return d->mimetag_; }
-void KTNEFAttach::setMimeTag(const QString& str)
+void KTNEFAttach::setMimeTag(const TQString& str)
{ d->mimetag_ = str; }
-QString KTNEFAttach::extension() const
+TQString KTNEFAttach::extension() const
{ return d->extension_; }
-void KTNEFAttach::setExtension(const QString& str)
+void KTNEFAttach::setExtension(const TQString& str)
{ d->extension_ = str; }
diff --git a/ktnef/lib/ktnefmessage.cpp b/ktnef/lib/ktnefmessage.cpp
index d94efb6c4..8f2648c3a 100644
--- a/ktnef/lib/ktnefmessage.cpp
+++ b/ktnef/lib/ktnefmessage.cpp
@@ -19,7 +19,7 @@
#include "ktnef/ktnefattach.h"
#include "lzfu.h"
-#include <qbuffer.h>
+#include <tqbuffer.h>
class KTNEFMessage::MessagePrivate
{
@@ -29,7 +29,7 @@ public:
attachments_.setAutoDelete( true );
}
- QPtrList<KTNEFAttach> attachments_;
+ TQPtrList<KTNEFAttach> attachments_;
};
KTNEFMessage::KTNEFMessage()
@@ -42,14 +42,14 @@ KTNEFMessage::~KTNEFMessage()
delete d;
}
-const QPtrList<KTNEFAttach>& KTNEFMessage::attachmentList() const
+const TQPtrList<KTNEFAttach>& KTNEFMessage::attachmentList() const
{
return d->attachments_;
}
-KTNEFAttach* KTNEFMessage::attachment( const QString& filename ) const
+KTNEFAttach* KTNEFMessage::attachment( const TQString& filename ) const
{
- QPtrListIterator<KTNEFAttach> it( d->attachments_ );
+ TQPtrListIterator<KTNEFAttach> it( d->attachments_ );
for ( ; it.current(); ++it )
if ( it.current()->name() == filename )
return it.current();
@@ -66,17 +66,17 @@ void KTNEFMessage::clearAttachments()
d->attachments_.clear();
}
-QString KTNEFMessage::rtfString()
+TQString KTNEFMessage::rtfString()
{
- QVariant prop = property( 0x1009 );
- if ( prop.isNull() || prop.type() != QVariant::ByteArray)
- return QString::null;
+ TQVariant prop = property( 0x1009 );
+ if ( prop.isNull() || prop.type() != TQVariant::ByteArray)
+ return TQString::null;
else
{
- QByteArray rtf;
- QBuffer input( prop.asByteArray() ), output( rtf );
+ TQByteArray rtf;
+ TQBuffer input( prop.asByteArray() ), output( rtf );
if ( input.open( IO_ReadOnly ) && output.open( IO_WriteOnly ) )
lzfu_decompress( &input, &output );
- return QString( rtf );
+ return TQString( rtf );
}
}
diff --git a/ktnef/lib/ktnefparser.cpp b/ktnef/lib/ktnefparser.cpp
index 0c9881400..e97ec8128 100644
--- a/ktnef/lib/ktnefparser.cpp
+++ b/ktnef/lib/ktnefparser.cpp
@@ -24,10 +24,10 @@
#include "ktnef/ktnefproperty.h"
#include "ktnef/ktnefmessage.h"
-#include <qdatetime.h>
-#include <qdatastream.h>
-#include <qfile.h>
-#include <qvariant.h>
+#include <tqdatetime.h>
+#include <tqdatastream.h>
+#include <tqfile.h>
+#include <tqvariant.h>
#include <kdebug.h>
#include <kmimetype.h>
#include <ksavefile.h>
@@ -42,23 +42,23 @@
typedef struct {
Q_UINT16 type;
Q_UINT16 tag;
- QVariant value;
+ TQVariant value;
struct {
Q_UINT32 type;
- QVariant value;
+ TQVariant value;
} name;
} MAPI_value;
void clearMAPIName( MAPI_value& mapi );
void clearMAPIValue(MAPI_value& mapi, bool clearName = true);
-QString readMAPIString( QDataStream& stream, bool isUnicode = false, bool align = true, int len = -1 );
-Q_UINT16 readMAPIValue(QDataStream& stream, MAPI_value& mapi);
-QDateTime readTNEFDate( QDataStream& stream );
-QString readTNEFAddress( QDataStream& stream );
-QByteArray readTNEFData( QDataStream& stream, Q_UINT32 len );
-QVariant readTNEFAttribute( QDataStream& stream, Q_UINT16 type, Q_UINT32 len );
-QDateTime formatTime( Q_UINT32 lowB, Q_UINT32 highB );
-QString formatRecipient( const QMap<int,KTNEFProperty*>& props );
+TQString readMAPIString( TQDataStream& stream, bool isUnicode = false, bool align = true, int len = -1 );
+Q_UINT16 readMAPIValue(TQDataStream& stream, MAPI_value& mapi);
+TQDateTime readTNEFDate( TQDataStream& stream );
+TQString readTNEFAddress( TQDataStream& stream );
+TQByteArray readTNEFData( TQDataStream& stream, Q_UINT32 len );
+TQVariant readTNEFAttribute( TQDataStream& stream, Q_UINT16 type, Q_UINT32 len );
+TQDateTime formatTime( Q_UINT32 lowB, Q_UINT32 highB );
+TQString formatRecipient( const TQMap<int,KTNEFProperty*>& props );
//------------------------------------------------------------------------------------
@@ -78,10 +78,10 @@ public:
delete message_;
}
- QDataStream stream_;
- QIODevice *device_;
+ TQDataStream stream_;
+ TQIODevice *device_;
bool deleteDevice_;
- QString defaultdir_;
+ TQString defaultdir_;
KTNEFAttach *current_;
KTNEFMessage *message_;
};
@@ -114,7 +114,7 @@ bool KTNEFParser::decodeMessage()
{
Q_UINT32 i1, i2, off;
Q_UINT16 u, tag, type;
- QVariant value;
+ TQVariant value;
// read (type+name)
d->stream_ >> i1;
@@ -162,7 +162,7 @@ bool KTNEFParser::decodeMessage()
readMAPIProperties( d->message_->properties(), 0 );
d->device_->at( i2 );
kdDebug() << "Properties: " << d->message_->properties().count() << endl;
- value = QString( "< %1 properties >" ).arg( d->message_->properties().count() - nProps );
+ value = TQString( "< %1 properties >" ).arg( d->message_->properties().count() - nProps );
}
break;
case attTNEFVERSION:
@@ -203,11 +203,11 @@ bool KTNEFParser::decodeMessage()
case attRECIPTABLE:
{
Q_UINT32 rows;
- QValueList<QVariant> recipTable;
+ TQValueList<TQVariant> recipTable;
d->stream_ >> rows;
for ( uint i=0; i<rows; i++ )
{
- QMap<int,KTNEFProperty*> props;
+ TQMap<int,KTNEFProperty*> props;
readMAPIProperties( props, 0 );
recipTable << formatRecipient( props );
}
@@ -256,8 +256,8 @@ bool KTNEFParser::decodeAttachment()
{
Q_UINT32 i;
Q_UINT16 tag, type, u;
- QVariant value;
- QString str;
+ TQVariant value;
+ TQString str;
d->stream_ >> i; // i <- attribute type & name
tag = ( i & 0x0000FFFF );
@@ -275,7 +275,7 @@ bool KTNEFParser::decodeAttachment()
d->current_->setSize( i );
d->current_->setOffset( d->device_->at() );
d->device_->at( d->device_->at() + i );
- value = QString( "< size=%1 >" ).arg( i );
+ value = TQString( "< size=%1 >" ).arg( i );
kdDebug() << "Attachment Data: size=" << i << endl;
break;
case attATTACHMENT: // try to get attachment info
@@ -292,7 +292,7 @@ bool KTNEFParser::decodeAttachment()
if ( !str.isEmpty() )
d->current_->setMimeTag( str );
d->current_->setExtension( d->current_->property( MAPI_TAG_EXTENSION ).toString() );
- value = QString( "< %1 properties >" ).arg( d->current_->properties().count() );
+ value = TQString( "< %1 properties >" ).arg( d->current_->properties().count() );
break;
case attATTACHMODDATE:
value = readTNEFDate( d->stream_ );
@@ -304,7 +304,7 @@ bool KTNEFParser::decodeAttachment()
break;
case attATTACHMETAFILE:
kdDebug() << "Attachment Metafile: size=" << i << endl;
- //value = QString( "< size=%1 >" ).arg( i );
+ //value = TQString( "< size=%1 >" ).arg( i );
//d->device_->at( d->device_->at()+i );
value = readTNEFData( d->stream_, i );
break;
@@ -321,7 +321,7 @@ bool KTNEFParser::decodeAttachment()
return true;
}
-void KTNEFParser::setDefaultExtractDir(const QString& dirname)
+void KTNEFParser::setDefaultExtractDir(const TQString& dirname)
{
d->defaultdir_ = dirname;
}
@@ -345,7 +345,7 @@ bool KTNEFParser::parseDevice()
}
d->stream_.setDevice( d->device_ );
- d->stream_.setByteOrder( QDataStream::LittleEndian );
+ d->stream_.setByteOrder( TQDataStream::LittleEndian );
d->stream_ >> i;
if (i == TNEF_SIGNATURE)
{
@@ -386,14 +386,14 @@ end: d->device_->close();
}
}
-bool KTNEFParser::extractFile(const QString& filename)
+bool KTNEFParser::extractFile(const TQString& filename)
{
KTNEFAttach *att = d->message_->attachment(filename);
if (!att) return false;
return extractAttachmentTo(att, d->defaultdir_);
}
-bool KTNEFParser::extractAttachmentTo(KTNEFAttach *att, const QString& dirname)
+bool KTNEFParser::extractAttachmentTo(KTNEFAttach *att, const TQString& dirname)
{
QString filename = dirname + "/" + att->name();
if (!d->device_->isOpen())
@@ -401,7 +401,7 @@ bool KTNEFParser::extractAttachmentTo(KTNEFAttach *att, const QString& dirname)
if (!d->device_->at(att->offset()))
return false;
KSaveFile saveFile( filename );
- QFile *outfile = saveFile.file();
+ TQFile *outfile = saveFile.file();
if ( !outfile )
return false;
@@ -428,13 +428,13 @@ bool KTNEFParser::extractAttachmentTo(KTNEFAttach *att, const QString& dirname)
bool KTNEFParser::extractAll()
{
- QPtrListIterator<KTNEFAttach> it(d->message_->attachmentList());
+ TQPtrListIterator<KTNEFAttach> it(d->message_->attachmentList());
for (;it.current();++it)
if (!extractAttachmentTo(it.current(),d->defaultdir_)) return false;
return true;
}
-bool KTNEFParser::extractFileTo(const QString& filename, const QString& dirname)
+bool KTNEFParser::extractFileTo(const TQString& filename, const TQString& dirname)
{
kdDebug() << "Extracting attachment: filename=" << filename << ", dir=" << dirname << endl;
KTNEFAttach *att = d->message_->attachment(filename);
@@ -442,17 +442,17 @@ bool KTNEFParser::extractFileTo(const QString& filename, const QString& dirname)
return extractAttachmentTo(att, dirname);
}
-bool KTNEFParser::openFile(const QString& filename)
+bool KTNEFParser::openFile(const TQString& filename)
{
deleteDevice();
delete d->message_;
d->message_ = new KTNEFMessage();
- d->device_ = new QFile( filename );
+ d->device_ = new TQFile( filename );
d->deleteDevice_ = true;
return parseDevice();
}
-bool KTNEFParser::openDevice( QIODevice *device )
+bool KTNEFParser::openDevice( TQIODevice *device )
{
deleteDevice();
d->device_ = device;
@@ -483,7 +483,7 @@ void KTNEFParser::checkCurrent( int key )
if ( mimetype->name() == "application/octet-stream" && d->current_->size() > 0 )
{
int oldOffset = d->device_->at();
- QByteArray buffer( QMIN( 32, d->current_->size() ) );
+ TQByteArray buffer( QMIN( 32, d->current_->size() ) );
d->device_->at( d->current_->offset() );
d->device_->readBlock( buffer.data(), buffer.size() );
mimetype = KMimeType::findByContent( buffer );
@@ -521,9 +521,9 @@ void clearMAPIValue(MAPI_value& mapi, bool clearName)
clearMAPIName( mapi );
}
-QDateTime formatTime( Q_UINT32 lowB, Q_UINT32 highB )
+TQDateTime formatTime( Q_UINT32 lowB, Q_UINT32 highB )
{
- QDateTime dt;
+ TQDateTime dt;
#if ( SIZEOF_UINT64_T == 8 )
uint64_t u64;
#elif ( SIZEOF_UNSIGNED_LONG_LONG == 8 )
@@ -550,10 +550,10 @@ QDateTime formatTime( Q_UINT32 lowB, Q_UINT32 highB )
return dt;
}
-QString formatRecipient( const QMap<int,KTNEFProperty*>& props )
+TQString formatRecipient( const TQMap<int,KTNEFProperty*>& props )
{
- QString s, dn, addr, t;
- QMap<int,KTNEFProperty*>::ConstIterator it;
+ TQString s, dn, addr, t;
+ TQMap<int,KTNEFProperty*>::ConstIterator it;
if ( ( it = props.find( 0x3001 ) ) != props.end() )
dn = ( *it )->valueString();
if ( ( it = props.find( 0x3003 ) ) != props.end() )
@@ -577,18 +577,18 @@ QString formatRecipient( const QMap<int,KTNEFProperty*>& props )
return s.stripWhiteSpace();
}
-QDateTime readTNEFDate( QDataStream& stream )
+TQDateTime readTNEFDate( TQDataStream& stream )
{
// 14-bytes long
Q_UINT16 y, m, d, hh, mm, ss, dm;
stream >> y >> m >> d >> hh >> mm >> ss >> dm;
- return QDateTime( QDate( y, m, d ), QTime( hh, mm, ss ) );
+ return TQDateTime( TQDate( y, m, d ), TQTime( hh, mm, ss ) );
}
-QString readTNEFAddress( QDataStream& stream )
+TQString readTNEFAddress( TQDataStream& stream )
{
Q_UINT16 totalLen, strLen, addrLen;
- QString s;
+ TQString s;
stream >> totalLen >> totalLen >> strLen >> addrLen;
s.append( readMAPIString( stream, false, false, strLen ) );
s.append( " <" );
@@ -600,15 +600,15 @@ QString readTNEFAddress( QDataStream& stream )
return s;
}
-QByteArray readTNEFData( QDataStream& stream, Q_UINT32 len )
+TQByteArray readTNEFData( TQDataStream& stream, Q_UINT32 len )
{
- QByteArray array( len );
+ TQByteArray array( len );
if ( len > 0 )
stream.readRawBytes( array.data(), len );
return array;
}
-QVariant readTNEFAttribute( QDataStream& stream, Q_UINT16 type, Q_UINT32 len )
+TQVariant readTNEFAttribute( TQDataStream& stream, Q_UINT16 type, Q_UINT32 len )
{
switch ( type )
{
@@ -622,7 +622,7 @@ QVariant readTNEFAttribute( QDataStream& stream, Q_UINT16 type, Q_UINT32 len )
}
}
-QString readMAPIString( QDataStream& stream, bool isUnicode, bool align, int len_ )
+TQString readMAPIString( TQDataStream& stream, bool isUnicode, bool align, int len_ )
{
Q_UINT32 len;
char *buf = 0;
@@ -638,16 +638,16 @@ QString readMAPIString( QDataStream& stream, bool isUnicode, bool align, int len
Q_UINT8 c;
for ( uint i=len; i<fullLen; i++ )
stream >> c;
- QString res;
+ TQString res;
if ( isUnicode )
- res = QString::fromUcs2( ( const unsigned short* )buf );
+ res = TQString::fromUcs2( ( const unsigned short* )buf );
else
- res = QString::fromLocal8Bit( buf );
+ res = TQString::fromLocal8Bit( buf );
delete [] buf;
return res;
}
-Q_UINT16 readMAPIValue(QDataStream& stream, MAPI_value& mapi)
+Q_UINT16 readMAPIValue(TQDataStream& stream, MAPI_value& mapi)
{
Q_UINT32 d;
@@ -669,11 +669,11 @@ Q_UINT16 readMAPIValue(QDataStream& stream, MAPI_value& mapi)
}
int n = 1;
- QVariant value;
+ TQVariant value;
if ( ISVECTOR( mapi ) )
{
stream >> n;
- mapi.value = QValueList<QVariant>();
+ mapi.value = TQValueList<TQVariant>();
}
for ( int i=0; i<n; i++ )
{
@@ -728,7 +728,7 @@ Q_UINT16 readMAPIValue(QDataStream& stream, MAPI_value& mapi)
value.clear();
Q_UINT32 len;
stream >> len;
- value = QByteArray( len );
+ value = TQByteArray( len );
if (len > 0)
{
int fullLen = len;
@@ -752,12 +752,12 @@ Q_UINT16 readMAPIValue(QDataStream& stream, MAPI_value& mapi)
return mapi.tag;
}
-bool KTNEFParser::readMAPIProperties( QMap<int,KTNEFProperty*>& props, KTNEFAttach *attach )
+bool KTNEFParser::readMAPIProperties( TQMap<int,KTNEFProperty*>& props, KTNEFAttach *attach )
{
Q_UINT32 n;
MAPI_value mapi;
KTNEFProperty *p;
- QMap<int,KTNEFProperty*>::ConstIterator it;
+ TQMap<int,KTNEFProperty*>::ConstIterator it;
bool foundAttachment = false;
// some initializations
@@ -788,7 +788,7 @@ bool KTNEFParser::readMAPIProperties( QMap<int,KTNEFProperty*>& props, KTNEFAtta
{
if ( mapi.type == MAPI_TYPE_OBJECT && attach )
{
- QByteArray data = mapi.value.toByteArray();
+ TQByteArray data = mapi.value.toByteArray();
int len = data.size();
ALIGN( len, 4 );
d->device_->at( d->device_->at()-len );
@@ -814,20 +814,20 @@ bool KTNEFParser::readMAPIProperties( QMap<int,KTNEFProperty*>& props, KTNEFAtta
ALIGN( len, 4 )
attach->setSize( len );
attach->setOffset( d->device_->at() - len );
- attach->addAttribute( attATTACHDATA, atpBYTE, QString( "< size=%1 >" ).arg( len ), false );
+ attach->addAttribute( attATTACHDATA, atpBYTE, TQString( "< size=%1 >" ).arg( len ), false );
}
}
kdDebug().form( "MAPI data: size=%d\n", mapi.value.toByteArray().size() );
break;
default:
{
- QString mapiname = "";
+ TQString mapiname = "";
if ( mapi.tag >= 0x8000 && mapi.tag <= 0xFFFE )
{
if ( mapi.name.type == 0 )
- mapiname = QString().sprintf( " [name = 0x%04x]", mapi.name.value.toUInt() );
+ mapiname = TQString().sprintf( " [name = 0x%04x]", mapi.name.value.toUInt() );
else
- mapiname = QString( " [name = %1]" ).arg( mapi.name.value.toString() );
+ mapiname = TQString( " [name = %1]" ).arg( mapi.name.value.toString() );
}
switch ( mapi.type & 0x0FFF )
{
@@ -867,7 +867,7 @@ bool KTNEFParser::readMAPIProperties( QMap<int,KTNEFProperty*>& props, KTNEFAtta
{
attach->setIndex( attach->property( MAPI_TAG_INDEX ).toUInt() );
attach->setDisplaySize( attach->property( MAPI_TAG_SIZE ).toUInt() );
- QString str = attach->property( MAPI_TAG_DISPLAYNAME ).toString();
+ TQString str = attach->property( MAPI_TAG_DISPLAYNAME ).toString();
if ( !str.isEmpty() )
attach->setDisplayName( str );
attach->setFileName( attach->property( MAPI_TAG_FILENAME ).toString() );
diff --git a/ktnef/lib/ktnefproperty.cpp b/ktnef/lib/ktnefproperty.cpp
index 3845b8d88..df04a388d 100644
--- a/ktnef/lib/ktnefproperty.cpp
+++ b/ktnef/lib/ktnefproperty.cpp
@@ -17,14 +17,14 @@
#include "ktnef/ktnefproperty.h"
#include "mapi.h"
-#include <qdatetime.h>
+#include <tqdatetime.h>
#include <ctype.h>
KTNEFProperty::KTNEFProperty()
{
}
-KTNEFProperty::KTNEFProperty( int key_, int type_, const QVariant& value_, const QVariant& name_ )
+KTNEFProperty::KTNEFProperty( int key_, int type_, const TQVariant& value_, const TQVariant& name_ )
: _key( key_ ), _type( type_ ), _value( value_ ), _name( name_ )
{
}
@@ -34,11 +34,11 @@ KTNEFProperty::KTNEFProperty( const KTNEFProperty& p )
{
}
-QString KTNEFProperty::keyString()
+TQString KTNEFProperty::keyString()
{
if ( _name.isValid() )
{
- if ( _name.type() == QVariant::String )
+ if ( _name.type() == TQVariant::String )
return _name.asString();
else
return mapiNamedTagString( _name.asUInt(), _key );
@@ -47,38 +47,38 @@ QString KTNEFProperty::keyString()
return mapiTagString( _key );
}
-QString KTNEFProperty::formatValue( const QVariant& value, bool beautify )
+TQString KTNEFProperty::formatValue( const TQVariant& value, bool beautify )
{
- if ( value.type() == QVariant::ByteArray )
+ if ( value.type() == TQVariant::ByteArray )
{
// check the first bytes (up to 8) if they are
// printable characters
- QByteArray arr = value.toByteArray();
+ TQByteArray arr = value.toByteArray();
bool printable = true;
for ( int i=QMIN( arr.size(), 8 )-1; i>=0 && printable; i-- )
printable = ( isprint( arr[ i ] ) != 0 );
if ( !printable )
{
- QString s;
+ TQString s;
uint i;
uint txtCount = beautify ? QMIN( arr.size(), 32 ) : arr.size();
for ( i=0; i < txtCount; ++i )
{
- s.append( QString().sprintf( "%02X", ( uchar )arr[ i ] ) );
+ s.append( TQString().sprintf( "%02X", ( uchar )arr[ i ] ) );
if( beautify )
s.append( " " );
}
if ( i < arr.size() )
- s.append( "... (size=" + QString::number( arr.size() ) + ")" );
+ s.append( "... (size=" + TQString::number( arr.size() ) + ")" );
return s;
}
}
- //else if ( value.type() == QVariant::DateTime )
+ //else if ( value.type() == TQVariant::DateTime )
// return value.toDateTime().toString();
return value.toString();
}
-QString KTNEFProperty::valueString()
+TQString KTNEFProperty::valueString()
{
return formatValue( _value );
}
@@ -89,11 +89,11 @@ int KTNEFProperty::key() const
int KTNEFProperty::type() const
{ return _type; }
-QVariant KTNEFProperty::value() const
+TQVariant KTNEFProperty::value() const
{ return _value; }
-QVariant KTNEFProperty::name() const
+TQVariant KTNEFProperty::name() const
{ return _name; }
bool KTNEFProperty::isVector() const
-{ return ( _value.type() == QVariant::List ); }
+{ return ( _value.type() == TQVariant::List ); }
diff --git a/ktnef/lib/ktnefpropertyset.cpp b/ktnef/lib/ktnefpropertyset.cpp
index cf35362fe..ec3ee2b51 100644
--- a/ktnef/lib/ktnefpropertyset.cpp
+++ b/ktnef/lib/ktnefpropertyset.cpp
@@ -28,9 +28,9 @@ KTNEFPropertySet::~KTNEFPropertySet()
clear( true );
}
-void KTNEFPropertySet::addProperty( int key, int type, const QVariant& value, const QVariant& name, bool overwrite )
+void KTNEFPropertySet::addProperty( int key, int type, const TQVariant& value, const TQVariant& name, bool overwrite )
{
- QMap<int,KTNEFProperty*>::ConstIterator it = properties_.find( key );
+ TQMap<int,KTNEFProperty*>::ConstIterator it = properties_.find( key );
if ( it != properties_.end() )
{
if ( overwrite )
@@ -43,9 +43,9 @@ void KTNEFPropertySet::addProperty( int key, int type, const QVariant& value, co
}
-QString KTNEFPropertySet::findProp(int key, const QString& fallback, bool upper)
+TQString KTNEFPropertySet::findProp(int key, const TQString& fallback, bool upper)
{
- QMap<int,KTNEFProperty*>::Iterator it = properties_.find( key );
+ TQMap<int,KTNEFProperty*>::Iterator it = properties_.find( key );
if( properties_.end() != it )
return upper ? KTNEFProperty::formatValue( (*it)->value(), false ).upper()
: KTNEFProperty::formatValue( (*it)->value(), false );
@@ -54,23 +54,23 @@ QString KTNEFPropertySet::findProp(int key, const QString& fallback, bool upper)
}
-QString KTNEFPropertySet::findNamedProp(const QString& name, const QString& fallback, bool upper)
+TQString KTNEFPropertySet::findNamedProp(const TQString& name, const TQString& fallback, bool upper)
{
- for ( QMap<int,KTNEFProperty*>::Iterator it = properties_.begin();
+ for ( TQMap<int,KTNEFProperty*>::Iterator it = properties_.begin();
it != properties_.end();
++it ){
if ( (*it)->name().isValid() ){
- QString s;
- if ( (*it)->name().type() == QVariant::String )
+ TQString s;
+ if ( (*it)->name().type() == TQVariant::String )
s = (*it)->name().asString();
else
- s = QString().sprintf( "0X%04X", (*it)->name().asUInt() );
+ s = TQString().sprintf( "0X%04X", (*it)->name().asUInt() );
if( s.upper() == name.upper() ){
- QVariant value = ( *it )->value();
- if( value.type() == QVariant::List ){
+ TQVariant value = ( *it )->value();
+ if( value.type() == TQVariant::List ){
s = "";
- for ( QValueList<QVariant>::ConstIterator lit = value.listBegin();
+ for ( TQValueList<TQVariant>::ConstIterator lit = value.listBegin();
lit != value.listEnd();
++lit ){
if( !s.isEmpty() )
@@ -88,21 +88,21 @@ QString KTNEFPropertySet::findNamedProp(const QString& name, const QString& fall
}
-QMap<int,KTNEFProperty*>& KTNEFPropertySet::properties()
+TQMap<int,KTNEFProperty*>& KTNEFPropertySet::properties()
{
return properties_;
}
-const QMap<int,KTNEFProperty*>& KTNEFPropertySet::properties() const
+const TQMap<int,KTNEFProperty*>& KTNEFPropertySet::properties() const
{
return properties_;
}
-QVariant KTNEFPropertySet::property( int key ) const
+TQVariant KTNEFPropertySet::property( int key ) const
{
- QMap<int,KTNEFProperty*>::ConstIterator it = properties_.find( key );
+ TQMap<int,KTNEFProperty*>::ConstIterator it = properties_.find( key );
if ( it == properties_.end() )
- return QVariant();
+ return TQVariant();
else
return ( *it )->value();
}
@@ -111,18 +111,18 @@ void KTNEFPropertySet::clear( bool deleteAll )
{
if ( deleteAll )
{
- for ( QMap<int,KTNEFProperty*>::ConstIterator it=properties_.begin(); it!=properties_.end(); ++it )
+ for ( TQMap<int,KTNEFProperty*>::ConstIterator it=properties_.begin(); it!=properties_.end(); ++it )
delete ( *it );
- for ( QMap<int,KTNEFProperty*>::ConstIterator it=attributes_.begin(); it!=attributes_.end(); ++it )
+ for ( TQMap<int,KTNEFProperty*>::ConstIterator it=attributes_.begin(); it!=attributes_.end(); ++it )
delete ( *it );
}
properties_.clear();
attributes_.clear();
}
-void KTNEFPropertySet::addAttribute( int key, int type, const QVariant& value, bool overwrite )
+void KTNEFPropertySet::addAttribute( int key, int type, const TQVariant& value, bool overwrite )
{
- QMap<int,KTNEFProperty*>::ConstIterator it = attributes_.find( key );
+ TQMap<int,KTNEFProperty*>::ConstIterator it = attributes_.find( key );
if ( it != attributes_.end() )
{
if ( overwrite )
@@ -130,25 +130,25 @@ void KTNEFPropertySet::addAttribute( int key, int type, const QVariant& value, b
else
return;
}
- KTNEFProperty *p = new KTNEFProperty( key, type, value, QVariant() );
+ KTNEFProperty *p = new KTNEFProperty( key, type, value, TQVariant() );
attributes_[ p->key() ] = p;
}
-QMap<int,KTNEFProperty*>& KTNEFPropertySet::attributes()
+TQMap<int,KTNEFProperty*>& KTNEFPropertySet::attributes()
{
return attributes_;
}
-const QMap<int,KTNEFProperty*>& KTNEFPropertySet::attributes() const
+const TQMap<int,KTNEFProperty*>& KTNEFPropertySet::attributes() const
{
return attributes_;
}
-QVariant KTNEFPropertySet::attribute( int key ) const
+TQVariant KTNEFPropertySet::attribute( int key ) const
{
- QMap<int,KTNEFProperty*>::ConstIterator it = attributes_.find( key );
+ TQMap<int,KTNEFProperty*>::ConstIterator it = attributes_.find( key );
if ( it == attributes_.end() )
- return QVariant();
+ return TQVariant();
else
return ( *it )->value();
}
diff --git a/ktnef/lib/ktnefwriter.cpp b/ktnef/lib/ktnefwriter.cpp
index ce35dbd20..48734bebd 100644
--- a/ktnef/lib/ktnefwriter.cpp
+++ b/ktnef/lib/ktnefwriter.cpp
@@ -23,9 +23,9 @@
#include "ktnef/ktnefproperty.h"
#include "ktnef/ktnefpropertyset.h"
-#include <qfile.h>
-#include <qdatetime.h>
-#include <qdatastream.h>
+#include <tqfile.h>
+#include <tqdatetime.h>
+#include <tqdatastream.h>
#include <kdebug.h>
#include <assert.h>
@@ -34,7 +34,7 @@
class KTNEFWriter::PrivateData {
public:
- PrivateData() { mFirstAttachNum = QDateTime::currentDateTime().toTime_t(); }
+ PrivateData() { mFirstAttachNum = TQDateTime::currentDateTime().toTime_t(); }
KTNEFPropertySet properties;
Q_UINT16 mFirstAttachNum;
@@ -46,16 +46,16 @@ KTNEFWriter::KTNEFWriter() {
// This is not something the user should fiddle with
// First set the TNEF version
- QVariant v(0x00010000);
+ TQVariant v(0x00010000);
addProperty( attTNEFVERSION, atpDWORD, v );
// Now set the code page to something reasonable. TODO: Use the right one
- QVariant v1( (Q_UINT32)0x4e4 );
- QVariant v2( (Q_UINT32)0x0 );
- QValueList<QVariant> list;
+ TQVariant v1( (Q_UINT32)0x4e4 );
+ TQVariant v2( (Q_UINT32)0x0 );
+ TQValueList<TQVariant> list;
list << v1;
list << v2;
- v = QVariant( list );
+ v = TQVariant( list );
addProperty( attOEMCODEPAGE, atpBYTE, list );
}
@@ -64,7 +64,7 @@ KTNEFWriter::~KTNEFWriter() {
}
-void KTNEFWriter::addProperty( int tag, int type, const QVariant& value ) {
+void KTNEFWriter::addProperty( int tag, int type, const TQVariant& value ) {
mData->properties.addProperty( tag, type, value );
}
@@ -76,13 +76,13 @@ void addToChecksum( Q_UINT32 i, Q_UINT16 &checksum ) {
checksum += (i >> 24) & 0xff;
}
-void addToChecksum( QCString &cs, Q_UINT16 &checksum ) {
+void addToChecksum( TQCString &cs, Q_UINT16 &checksum ) {
int len = cs.length();
for (int i=0; i<len; i++)
checksum += (Q_UINT8)cs[i];
}
-void writeCString( QDataStream &stream, QCString &str ) {
+void writeCString( TQDataStream &stream, TQCString &str ) {
stream.writeRawBytes( str.data(), str.length() );
stream << (Q_UINT8)0;
}
@@ -98,9 +98,9 @@ Q_UINT32 mergeTagAndType( Q_UINT32 tag, Q_UINT32 type ) {
*
* The checksum is a 16 byte int with all bytes in the data added.
*/
-bool KTNEFWriter::writeProperty( QDataStream &stream, int &bytes, int tag) {
- QMap<int,KTNEFProperty*>& properties = mData->properties.properties();
- QMap<int,KTNEFProperty*>::Iterator it = properties.find( tag );
+bool KTNEFWriter::writeProperty( TQDataStream &stream, int &bytes, int tag) {
+ TQMap<int,KTNEFProperty*>& properties = mData->properties.properties();
+ TQMap<int,KTNEFProperty*>::Iterator it = properties.find( tag );
if ( it == properties.end() )
return false;
@@ -109,12 +109,12 @@ bool KTNEFWriter::writeProperty( QDataStream &stream, int &bytes, int tag) {
Q_UINT32 i;
Q_UINT16 checksum = 0;
- QValueList<QVariant> list;
- QString s;
- QCString cs, cs2;
- QDateTime dt;
- QDate date;
- QTime time;
+ TQValueList<TQVariant> list;
+ TQString s;
+ TQCString cs, cs2;
+ TQDateTime dt;
+ TQDate date;
+ TQTime time;
switch( tag ) {
case attMSGSTATUS:
// Q_UINT8
@@ -192,12 +192,12 @@ bool KTNEFWriter::writeProperty( QDataStream &stream, int &bytes, int tag) {
break;
case attFROM:
- // 2 QString encoded to a TRP structure
+ // 2 TQString encoded to a TRP structure
list = property->value().toList();
assert( list.count() == 2 );
cs = list[0].toString().local8Bit(); // Name
- cs2 = (QString("smtp:") + list[1].toString()).local8Bit(); // Email address
+ cs2 = (TQString("smtp:") + list[1].toString()).local8Bit(); // Email address
i = 18 + cs.length() + cs2.length(); // 2 * sizof(TRP) + strings + 2x'\0'
stream << (Q_UINT8)LVL_MESSAGE;
@@ -301,17 +301,17 @@ bool KTNEFWriter::writeProperty( QDataStream &stream, int &bytes, int tag) {
}
-bool KTNEFWriter::writeFile( QIODevice &file ) {
+bool KTNEFWriter::writeFile( TQIODevice &file ) {
if ( !file.open( IO_WriteOnly ) )
return false;
- QDataStream stream( &file );
+ TQDataStream stream( &file );
return writeFile( stream );
}
-bool KTNEFWriter::writeFile( QDataStream &stream ) {
- stream.setByteOrder( QDataStream::LittleEndian );
+bool KTNEFWriter::writeFile( TQDataStream &stream ) {
+ stream.setByteOrder( TQDataStream::LittleEndian );
// Start by writing the opening TNEF stuff
stream << TNEF_SIGNATURE;
@@ -341,18 +341,18 @@ bool KTNEFWriter::writeFile( QDataStream &stream ) {
}
-void KTNEFWriter::setSender(const QString &name, const QString &email) {
+void KTNEFWriter::setSender(const TQString &name, const TQString &email) {
assert( !name.isEmpty() );
assert( !email.isEmpty() );
- QVariant v1( name );
- QVariant v2( email );
+ TQVariant v1( name );
+ TQVariant v2( email );
- QValueList<QVariant> list;
+ TQValueList<TQVariant> list;
list << v1;
list << v2;
- QVariant v( list );
+ TQVariant v( list );
addProperty( attFROM, 0, list ); // What's up with the 0 here ??
}
@@ -360,31 +360,31 @@ void KTNEFWriter::setMessageType(MessageType m) {
// Note that the MessageType list here is probably not long enough,
// more entries are most likely needed later
- QVariant v;
+ TQVariant v;
switch( m ) {
case Appointment:
- v = QVariant( QString( "IPM.Appointment" ) );
+ v = TQVariant( TQString( "IPM.Appointment" ) );
break;
case MeetingCancelled:
- v = QVariant( QString( "IPM.Schedule.Meeting.Cancelled" ) );
+ v = TQVariant( TQString( "IPM.Schedule.Meeting.Cancelled" ) );
break;
case MeetingRequest:
- v = QVariant( QString( "IPM.Schedule.Meeting.Request" ) );
+ v = TQVariant( TQString( "IPM.Schedule.Meeting.Request" ) );
break;
case MeetingNo:
- v = QVariant( QString( "IPM.Schedule.Meeting.Resp.Neg" ) );
+ v = TQVariant( TQString( "IPM.Schedule.Meeting.Resp.Neg" ) );
break;
case MeetingYes:
- v = QVariant( QString( "IPM.Schedule.Meeting.Resp.Pos" ) );
+ v = TQVariant( TQString( "IPM.Schedule.Meeting.Resp.Pos" ) );
break;
case MeetingTent:
// Tent?
- v = QVariant( QString( "IPM.Schedule.Meeting.Resp.Tent" ) );
+ v = TQVariant( TQString( "IPM.Schedule.Meeting.Resp.Tent" ) );
break;
default:
@@ -407,8 +407,8 @@ void KTNEFWriter::clearAttendees()
}
-void KTNEFWriter::addAttendee( const QString& /*cn*/, Role /*r*/, PartStat /*p*/,
- bool /*rsvp*/, const QString& /*mailto*/ )
+void KTNEFWriter::addAttendee( const TQString& /*cn*/, Role /*r*/, PartStat /*p*/,
+ bool /*rsvp*/, const TQString& /*mailto*/ )
{
}
@@ -416,16 +416,16 @@ void KTNEFWriter::addAttendee( const QString& /*cn*/, Role /*r*/, PartStat /*p*/
// I assume this is the same as the sender?
// U also assume that this is like "Name <address>"
-void KTNEFWriter::setOrganizer( const QString& organizer ) {
+void KTNEFWriter::setOrganizer( const TQString& organizer ) {
int i = organizer.find( '<' );
if ( i == -1 )
return;
- QString name = organizer.left( i );
+ TQString name = organizer.left( i );
name.stripWhiteSpace();
- QString email = organizer.right( i+1 );
+ TQString email = organizer.right( i+1 );
email = email.left( email.length()-1 );
email.stripWhiteSpace();
@@ -433,65 +433,65 @@ void KTNEFWriter::setOrganizer( const QString& organizer ) {
}
-void KTNEFWriter::setDtStart( const QDateTime& dtStart ) {
- QVariant v( dtStart );
+void KTNEFWriter::setDtStart( const TQDateTime& dtStart ) {
+ TQVariant v( dtStart );
addProperty( attDATESTART, atpDATE, v );
}
-void KTNEFWriter::setDtEnd( const QDateTime& dtEnd ) {
- QVariant v( dtEnd );
+void KTNEFWriter::setDtEnd( const TQDateTime& dtEnd ) {
+ TQVariant v( dtEnd );
addProperty( attDATEEND, atpDATE, v );
}
-void KTNEFWriter::setLocation( const QString& /*location*/ )
+void KTNEFWriter::setLocation( const TQString& /*location*/ )
{
}
-void KTNEFWriter::setUID( const QString& uid ) {
- QVariant v( uid );
+void KTNEFWriter::setUID( const TQString& uid ) {
+ TQVariant v( uid );
addProperty( attMSGID, atpSTRING, v );
}
// Date sent
-void KTNEFWriter::setDtStamp( const QDateTime& dtStamp ) {
- QVariant v( dtStamp );
+void KTNEFWriter::setDtStamp( const TQDateTime& dtStamp ) {
+ TQVariant v( dtStamp );
addProperty( attDATESENT, atpDATE, v );
}
-void KTNEFWriter::setCategories( const QStringList& )
+void KTNEFWriter::setCategories( const TQStringList& )
{
}
// I hope this is the body
-void KTNEFWriter::setDescription( const QString &body ) {
- QVariant v( body );
+void KTNEFWriter::setDescription( const TQString &body ) {
+ TQVariant v( body );
addProperty( attBODY, atpTEXT, v );
}
-void KTNEFWriter::setSummary( const QString &s ) {
- QVariant v( s );
+void KTNEFWriter::setSummary( const TQString &s ) {
+ TQVariant v( s );
addProperty( attSUBJECT, atpSTRING, v );
}
// TNEF encoding: Normal = 3, high = 2, low = 1
// MAPI encoding: Normal = -1, high = 0, low = 1
void KTNEFWriter::setPriority( Priority p ) {
- QVariant v( (Q_UINT32)p );
+ TQVariant v( (Q_UINT32)p );
addProperty( attMSGPRIORITY, atpSHORT, v );
}
-void KTNEFWriter::setAlarm( const QString& /*description*/, AlarmAction /*action*/,
- const QDateTime& /*wakeBefore*/ )
+void KTNEFWriter::setAlarm( const TQString& /*description*/, AlarmAction /*action*/,
+ const TQDateTime& /*wakeBefore*/ )
{
}
diff --git a/ktnef/lib/lzfu.cpp b/ktnef/lib/lzfu.cpp
index ab4fa36a0..cc66cbbbd 100644
--- a/ktnef/lib/lzfu.cpp
+++ b/ktnef/lib/lzfu.cpp
@@ -24,7 +24,7 @@
#endif
#include <sys/types.h>
#include <string.h>
-#include <qiodevice.h>
+#include <tqiodevice.h>
#include <stdio.h>
//#define DO_DEBUG
@@ -57,7 +57,7 @@ typedef struct _lzfuheader {
#define OFFSET(b) (b>>4)&0xFFF
#define LENGTH(b) ((b&0xF)+2)
-int lzfu_decompress(QIODevice *input, QIODevice *output)
+int lzfu_decompress(TQIODevice *input, TQIODevice *output)
{
unsigned char window[4096];
unsigned int wlength = 0, cursor = 0, ocursor = 0;
diff --git a/ktnef/lib/lzfu.h b/ktnef/lib/lzfu.h
index 4f8365586..25aa65d3c 100644
--- a/ktnef/lib/lzfu.h
+++ b/ktnef/lib/lzfu.h
@@ -20,6 +20,6 @@
class QIODevice;
-int lzfu_decompress( QIODevice *input, QIODevice *output );
+int lzfu_decompress( TQIODevice *input, TQIODevice *output );
#endif /* LZFU_H */
diff --git a/ktnef/lib/mapi.cpp b/ktnef/lib/mapi.cpp
index 8122153ce..bf84f1fd7 100644
--- a/ktnef/lib/mapi.cpp
+++ b/ktnef/lib/mapi.cpp
@@ -16,7 +16,7 @@
*/
#include "mapi.h"
-#include <qmap.h>
+#include <tqmap.h>
#include <klocale.h>
static struct
@@ -187,36 +187,36 @@ MAPI_NamedTagStrings[] =
{ 0x8560, I18N_NOOP( "Reminder Next Time" ) },
{ 0, 0 }
};
-static QMap<int,QString> MAPI_TagMap;
-static QMap<int,QString> MAPI_NamedTagMap;
+static TQMap<int,TQString> MAPI_TagMap;
+static TQMap<int,TQString> MAPI_NamedTagMap;
-QString mapiTagString( int key )
+TQString mapiTagString( int key )
{
if ( MAPI_TagMap.count() == 0 )
{
for ( int i=0; MAPI_TagStrings[ i ].str; i++ )
MAPI_TagMap[ MAPI_TagStrings[ i ].tag ] = i18n(MAPI_TagStrings[ i ].str);
}
- QMap<int,QString>::ConstIterator it = MAPI_TagMap.find( key );
+ TQMap<int,TQString>::ConstIterator it = MAPI_TagMap.find( key );
if ( it == MAPI_TagMap.end() )
- return QString().sprintf( "0x%04X", key );
+ return TQString().sprintf( "0x%04X", key );
else
- return QString().sprintf( "0x%04X ________: ", key ) + *it;
+ return TQString().sprintf( "0x%04X ________: ", key ) + *it;
}
-QString mapiNamedTagString( int key, int tag )
+TQString mapiNamedTagString( int key, int tag )
{
if ( MAPI_NamedTagMap.count() == 0 )
{
for ( int i=0; MAPI_NamedTagStrings[ i ].str; i++ )
MAPI_NamedTagMap[ MAPI_NamedTagStrings[ i ].tag ] = i18n(MAPI_NamedTagStrings[ i ].str);
}
- QMap<int,QString>::ConstIterator it = MAPI_NamedTagMap.find( key );
+ TQMap<int,TQString>::ConstIterator it = MAPI_NamedTagMap.find( key );
if ( it == MAPI_NamedTagMap.end() )
if ( tag >= 0 )
- return QString().sprintf( "0x%04X [0x%04X]: ", tag, key ) + *it;
+ return TQString().sprintf( "0x%04X [0x%04X]: ", tag, key ) + *it;
else
- return QString().sprintf( "0x%04X ________:", key ) + *it;
+ return TQString().sprintf( "0x%04X ________:", key ) + *it;
else
return *it;
}
diff --git a/ktnef/lib/mapi.h b/ktnef/lib/mapi.h
index fe4a37bf1..829f7d62f 100644
--- a/ktnef/lib/mapi.h
+++ b/ktnef/lib/mapi.h
@@ -18,9 +18,9 @@
#ifndef MAPI_H
#define MAPI_H
-#include <qstring.h>
+#include <tqstring.h>
-QString mapiTagString( int key );
-QString mapiNamedTagString( int key, int tag = -1 );
+TQString mapiTagString( int key );
+TQString mapiNamedTagString( int key, int tag = -1 );
#endif
diff --git a/ktnef/tests/parsertest.cpp b/ktnef/tests/parsertest.cpp
index 2cbe11e91..9cbce6d52 100644
--- a/ktnef/tests/parsertest.cpp
+++ b/ktnef/tests/parsertest.cpp
@@ -33,13 +33,13 @@ void ParserTest::testSingleAttachment()
KTNEFMessage *msg = parser.message();
assert( msg != 0 );
- QPtrList<KTNEFAttach> atts = msg->attachmentList();
+ TQPtrList<KTNEFAttach> atts = msg->attachmentList();
assert( atts.count() == 1 );
KTNEFAttach* att = atts.first();
assert( att != 0 );
assert( att->size() == 244 );
- assert( att->name() == QString( "AUTHORS" ) );
+ assert( att->name() == TQString( "AUTHORS" ) );
}
void ParserTest::testTwoAttachments()
@@ -50,18 +50,18 @@ void ParserTest::testTwoAttachments()
KTNEFMessage *msg = parser.message();
assert( msg != 0 );
- QPtrList<KTNEFAttach> atts = msg->attachmentList();
+ TQPtrList<KTNEFAttach> atts = msg->attachmentList();
assert( atts.count() == 2 );
KTNEFAttach* att = atts.at( 0 );
assert( att != 0 );
assert( att->size() == 244 );
- assert( att->name() == QString( "AUTHORS" ) );
+ assert( att->name() == TQString( "AUTHORS" ) );
att = atts.at( 1 );
assert( att != 0 );
assert( att->size() == 893 );
- assert( att->name() == QString( "README" ) );
+ assert( att->name() == TQString( "README" ) );
}
void ParserTest::testMAPIAttachments()
@@ -72,23 +72,23 @@ void ParserTest::testMAPIAttachments()
KTNEFMessage *msg = parser.message();
assert( msg != 0 );
- QPtrList<KTNEFAttach> atts = msg->attachmentList();
+ TQPtrList<KTNEFAttach> atts = msg->attachmentList();
assert( atts.count() == 3 );
KTNEFAttach* att = atts.at( 0 );
assert( att != 0 );
assert( att->size() == 61952 );
- assert( att->name() == QString( "VIA_Nytt_1402.doc" ) );
+ assert( att->name() == TQString( "VIA_Nytt_1402.doc" ) );
att = atts.at( 1 );
assert( att != 0 );
assert( att->size() == 213688 );
- assert( att->name() == QString( "VIA_Nytt_1402.pdf" ) );
+ assert( att->name() == TQString( "VIA_Nytt_1402.pdf" ) );
att = atts.at( 2 );
assert( att != 0 );
assert( att->size() == 68920 );
- assert( att->name() == QString( "VIA_Nytt_14021.htm" ) );
+ assert( att->name() == TQString( "VIA_Nytt_14021.htm" ) );
}
#include <kinstance.h>
diff --git a/libemailfunctions/email.cpp b/libemailfunctions/email.cpp
index ec14800aa..b5148736f 100644
--- a/libemailfunctions/email.cpp
+++ b/libemailfunctions/email.cpp
@@ -25,10 +25,10 @@
#include <kidna.h>
#include <kmime_util.h>
-#include <qregexp.h>
+#include <tqregexp.h>
//-----------------------------------------------------------------------------
-QStringList KPIM::splitEmailAddrList(const QString& aStr)
+TQStringList KPIM::splitEmailAddrList(const TQString& aStr)
{
// Features:
// - always ignores quoted characters
@@ -38,12 +38,12 @@ QStringList KPIM::splitEmailAddrList(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;
@@ -101,10 +101,10 @@ QStringList KPIM::splitEmailAddrList(const QString& aStr)
//-----------------------------------------------------------------------------
// Used by KPIM::splitAddress(...) and KPIM::getFirstEmailAddress(...).
-KPIM::EmailParseResult splitAddressInternal( const QCString& address,
- QCString & displayName,
- QCString & addrSpec,
- QCString & comment,
+KPIM::EmailParseResult splitAddressInternal( const TQCString& address,
+ TQCString & displayName,
+ TQCString & addrSpec,
+ TQCString & comment,
bool allowMultipleAddresses )
{
// kdDebug() << "KMMessage::splitAddress( " << address << " )" << endl;
@@ -116,9 +116,9 @@ KPIM::EmailParseResult splitAddressInternal( const QCString& address,
// these strings are later copied to displayName resp. addrSpec resp. comment
// we don't operate directly on those variables, since as ByteArray deriverates
// they have a miserable performance on operator+
- QString dName;
- QString aSpec;
- QString cmmt;
+ TQString dName;
+ TQString aSpec;
+ TQString cmmt;
if ( address.isEmpty() )
return KPIM::AddressEmpty;
@@ -255,10 +255,10 @@ KPIM::EmailParseResult splitAddressInternal( const QCString& address,
//-----------------------------------------------------------------------------
-KPIM::EmailParseResult KPIM::splitAddress( const QCString& address,
- QCString & displayName,
- QCString & addrSpec,
- QCString & comment )
+KPIM::EmailParseResult KPIM::splitAddress( const TQCString& address,
+ TQCString & displayName,
+ TQCString & addrSpec,
+ TQCString & comment )
{
return splitAddressInternal( address, displayName, addrSpec, comment,
false /* don't allow multiple addresses */ );
@@ -266,24 +266,24 @@ KPIM::EmailParseResult KPIM::splitAddress( const QCString& address,
//-----------------------------------------------------------------------------
-KPIM::EmailParseResult KPIM::splitAddress( const QString & address,
- QString & displayName,
- QString & addrSpec,
- QString & comment )
+KPIM::EmailParseResult KPIM::splitAddress( const TQString & address,
+ TQString & displayName,
+ TQString & addrSpec,
+ TQString & comment )
{
- QCString d, a, c;
+ TQCString d, a, c;
KPIM::EmailParseResult result = splitAddress( address.utf8(), d, a, c );
if ( result == AddressOk ) {
- displayName = QString::fromUtf8( d );
- addrSpec = QString::fromUtf8( a );
- comment = QString::fromUtf8( c );
+ displayName = TQString::fromUtf8( d );
+ addrSpec = TQString::fromUtf8( a );
+ comment = TQString::fromUtf8( c );
}
return result;
}
//-----------------------------------------------------------------------------
-KPIM::EmailParseResult KPIM::isValidEmailAddress( const QString& aStr )
+KPIM::EmailParseResult KPIM::isValidEmailAddress( const TQString& aStr )
{
// If we are passed an empty string bail right away no need to process further
// and waste resources
@@ -458,7 +458,7 @@ KPIM::EmailParseResult KPIM::isValidEmailAddress( const QString& aStr )
}
//-----------------------------------------------------------------------------
-QString KPIM::emailParseResultToString( EmailParseResult errorCode )
+TQString KPIM::emailParseResultToString( EmailParseResult errorCode )
{
switch ( errorCode ) {
case TooManyAts :
@@ -516,7 +516,7 @@ QString KPIM::emailParseResultToString( EmailParseResult errorCode )
}
//-----------------------------------------------------------------------------
-bool KPIM::isValidSimpleEmailAddress( const QString& aStr )
+bool KPIM::isValidSimpleEmailAddress( const TQString& aStr )
{
// If we are passed an empty string bail right away no need to process further
// and waste resources
@@ -525,8 +525,8 @@ bool KPIM::isValidSimpleEmailAddress( const QString& aStr )
}
int atChar = aStr.findRev( '@' );
- QString domainPart = aStr.mid( atChar + 1);
- QString localPart = aStr.left( atChar );
+ TQString domainPart = aStr.mid( atChar + 1);
+ TQString localPart = aStr.left( atChar );
bool tooManyAtsFlag = false;
bool inQuotedString = false;
int atCount = localPart.contains( '@' );
@@ -547,7 +547,7 @@ bool KPIM::isValidSimpleEmailAddress( const QString& aStr )
}
}
- QString addrRx = "[a-zA-Z]*[~|{}`\\^?=/+*'&%$#!_\\w.-]*[~|{}`\\^?=/+*'&%$#!_a-zA-Z0-9-]@";
+ TQString addrRx = "[a-zA-Z]*[~|{}`\\^?=/+*'&%$#!_\\w.-]*[~|{}`\\^?=/+*'&%$#!_a-zA-Z0-9-]@";
if ( localPart[ 0 ] == '\"' || localPart[ localPart.length()-1 ] == '\"' ) {
addrRx = "\"[a-zA-Z@]*[\\w.@-]*[a-zA-Z0-9@]\"@";
}
@@ -556,26 +556,26 @@ bool KPIM::isValidSimpleEmailAddress( const QString& aStr )
} else {
addrRx += "[\\w-]+(\\.[\\w-]+)*";
}
- QRegExp rx( addrRx );
+ TQRegExp rx( addrRx );
return rx.exactMatch( aStr ) && !tooManyAtsFlag;
}
//-----------------------------------------------------------------------------
-QString KPIM::simpleEmailAddressErrorMsg()
+TQString KPIM::simpleEmailAddressErrorMsg()
{
return i18n("The email address you entered is not valid because it "
"does not seem to contain an actual email address, i.e. "
"something of the form joe@kde.org.");
}
//-----------------------------------------------------------------------------
-QCString KPIM::getEmailAddress( const QCString & address )
+TQCString KPIM::getEmailAddress( const TQCString & address )
{
- QCString dummy1, dummy2, addrSpec;
+ TQCString dummy1, dummy2, addrSpec;
KPIM::EmailParseResult result =
splitAddressInternal( address, dummy1, addrSpec, dummy2,
false /* don't allow multiple addresses */ );
if ( result != AddressOk ) {
- addrSpec = QCString();
+ addrSpec = TQCString();
kdDebug() // << k_funcinfo << "\n"
<< "Input: aStr\nError:"
<< emailParseResultToString( result ) << endl;
@@ -586,21 +586,21 @@ QCString KPIM::getEmailAddress( const QCString & address )
//-----------------------------------------------------------------------------
-QString KPIM::getEmailAddress( const QString & address )
+TQString KPIM::getEmailAddress( const TQString & address )
{
- return QString::fromUtf8( getEmailAddress( address.utf8() ) );
+ return TQString::fromUtf8( getEmailAddress( address.utf8() ) );
}
//-----------------------------------------------------------------------------
-QCString KPIM::getFirstEmailAddress( const QCString & addresses )
+TQCString KPIM::getFirstEmailAddress( const TQCString & addresses )
{
- QCString dummy1, dummy2, addrSpec;
+ TQCString dummy1, dummy2, addrSpec;
KPIM::EmailParseResult result =
splitAddressInternal( addresses, dummy1, addrSpec, dummy2,
true /* allow multiple addresses */ );
if ( result != AddressOk ) {
- addrSpec = QCString();
+ addrSpec = TQCString();
kdDebug() // << k_funcinfo << "\n"
<< "Input: aStr\nError:"
<< emailParseResultToString( result ) << endl;
@@ -611,17 +611,17 @@ QCString KPIM::getFirstEmailAddress( const QCString & addresses )
//-----------------------------------------------------------------------------
-QString KPIM::getFirstEmailAddress( const QString & addresses )
+TQString KPIM::getFirstEmailAddress( const TQString & addresses )
{
- return QString::fromUtf8( getFirstEmailAddress( addresses.utf8() ) );
+ return TQString::fromUtf8( getFirstEmailAddress( addresses.utf8() ) );
}
//-----------------------------------------------------------------------------
-bool KPIM::getNameAndMail(const QString& aStr, QString& name, QString& mail)
+bool KPIM::getNameAndMail(const TQString& aStr, TQString& name, TQString& mail)
{
- name = QString::null;
- mail = QString::null;
+ name = TQString::null;
+ mail = TQString::null;
const int len=aStr.length();
const char cQuotes = '"';
@@ -629,7 +629,7 @@ bool KPIM::getNameAndMail(const QString& aStr, QString& name, QString& mail)
bool bInComment = false;
bool bInQuotesOutsideOfEmail = false;
int i=0, iAd=0, iMailStart=0, iMailEnd=0;
- QChar c;
+ TQChar c;
unsigned int commentstack = 0;
// Find the '@' of the email address
@@ -791,10 +791,10 @@ bool KPIM::getNameAndMail(const QString& aStr, QString& name, QString& mail)
//-----------------------------------------------------------------------------
-bool KPIM::compareEmail( const QString& email1, const QString& email2,
+bool KPIM::compareEmail( const TQString& email1, const TQString& email2,
bool matchName )
{
- QString e1Name, e1Email, e2Name, e2Email;
+ TQString e1Name, e1Email, e2Name, e2Email;
getNameAndMail( email1, e1Name, e1Email );
getNameAndMail( email2, e2Name, e2Email );
@@ -805,16 +805,16 @@ bool KPIM::compareEmail( const QString& email1, const QString& email2,
//-----------------------------------------------------------------------------
-QString KPIM::normalizedAddress( const QString & displayName,
- const QString & addrSpec,
- const QString & comment )
+TQString KPIM::normalizedAddress( const TQString & displayName,
+ const TQString & addrSpec,
+ const TQString & comment )
{
if ( displayName.isEmpty() && comment.isEmpty() )
return addrSpec;
else if ( comment.isEmpty() )
return quoteNameIfNecessary( displayName ) + " <" + addrSpec + ">";
else if ( displayName.isEmpty() ) {
- QString commentStr = comment;
+ TQString commentStr = comment;
return quoteNameIfNecessary( commentStr ) + " <" + addrSpec + ">";
}
else
@@ -823,28 +823,28 @@ QString KPIM::normalizedAddress( const QString & displayName,
//-----------------------------------------------------------------------------
-QString KPIM::decodeIDN( const QString & addrSpec )
+TQString KPIM::decodeIDN( const TQString & addrSpec )
{
const int atPos = addrSpec.findRev( '@' );
if ( atPos == -1 )
return addrSpec;
- QString idn = KIDNA::toUnicode( addrSpec.mid( atPos + 1 ) );
+ TQString idn = KIDNA::toUnicode( addrSpec.mid( atPos + 1 ) );
if ( idn.isEmpty() )
- return QString::null;
+ return TQString::null;
return addrSpec.left( atPos + 1 ) + idn;
}
//-----------------------------------------------------------------------------
-QString KPIM::encodeIDN( const QString & addrSpec )
+TQString KPIM::encodeIDN( const TQString & addrSpec )
{
const int atPos = addrSpec.findRev( '@' );
if ( atPos == -1 )
return addrSpec;
- QString idn = KIDNA::toAscii( addrSpec.mid( atPos + 1 ) );
+ TQString idn = KIDNA::toAscii( addrSpec.mid( atPos + 1 ) );
if ( idn.isEmpty() )
return addrSpec;
@@ -853,19 +853,19 @@ QString KPIM::encodeIDN( const QString & addrSpec )
//-----------------------------------------------------------------------------
-QString KPIM::normalizeAddressesAndDecodeIDNs( const QString & str )
+TQString KPIM::normalizeAddressesAndDecodeIDNs( const TQString & str )
{
// kdDebug() << "KPIM::normalizeAddressesAndDecodeIDNs( \""
// << str << "\" )" << endl;
if( str.isEmpty() )
return str;
- const QStringList addressList = KPIM::splitEmailAddrList( str );
- QStringList normalizedAddressList;
+ const TQStringList addressList = KPIM::splitEmailAddrList( str );
+ TQStringList normalizedAddressList;
- QCString displayName, addrSpec, comment;
+ TQCString displayName, addrSpec, comment;
- for( QStringList::ConstIterator it = addressList.begin();
+ for( TQStringList::ConstIterator it = addressList.begin();
( it != addressList.end() );
++it ) {
if( !(*it).isEmpty() ) {
@@ -876,9 +876,9 @@ QString KPIM::normalizeAddressesAndDecodeIDNs( const QString & str )
comment = KMime::decodeRFC2047String(comment).utf8();
normalizedAddressList <<
- normalizedAddress( QString::fromUtf8( displayName ),
- decodeIDN( QString::fromUtf8( addrSpec ) ),
- QString::fromUtf8( comment ) );
+ normalizedAddress( TQString::fromUtf8( displayName ),
+ decodeIDN( TQString::fromUtf8( addrSpec ) ),
+ TQString::fromUtf8( comment ) );
}
else {
kdDebug() << "splitting address failed: " << *it << endl;
@@ -894,19 +894,19 @@ QString KPIM::normalizeAddressesAndDecodeIDNs( const QString & str )
}
//-----------------------------------------------------------------------------
-QString KPIM::normalizeAddressesAndEncodeIDNs( const QString & str )
+TQString KPIM::normalizeAddressesAndEncodeIDNs( const TQString & str )
{
//kdDebug() << "KPIM::normalizeAddressesAndEncodeIDNs( \""
// << str << "\" )" << endl;
if( str.isEmpty() )
return str;
- const QStringList addressList = KPIM::splitEmailAddrList( str );
- QStringList normalizedAddressList;
+ const TQStringList addressList = KPIM::splitEmailAddrList( str );
+ TQStringList normalizedAddressList;
- QCString displayName, addrSpec, comment;
+ TQCString displayName, addrSpec, comment;
- for( QStringList::ConstIterator it = addressList.begin();
+ for( TQStringList::ConstIterator it = addressList.begin();
( it != addressList.end() );
++it ) {
if( !(*it).isEmpty() ) {
@@ -914,9 +914,9 @@ QString KPIM::normalizeAddressesAndEncodeIDNs( const QString & str )
== AddressOk ) {
normalizedAddressList <<
- normalizedAddress( QString::fromUtf8( displayName ),
- encodeIDN( QString::fromUtf8( addrSpec ) ),
- QString::fromUtf8( comment ) );
+ normalizedAddress( TQString::fromUtf8( displayName ),
+ encodeIDN( TQString::fromUtf8( addrSpec ) ),
+ TQString::fromUtf8( comment ) );
}
else {
kdDebug() << "splitting address failed: " << *it << endl;
@@ -935,12 +935,12 @@ QString KPIM::normalizeAddressesAndEncodeIDNs( const QString & str )
//-----------------------------------------------------------------------------
// Escapes unescaped doublequotes in str.
-static QString escapeQuotes( const QString & str )
+static TQString escapeQuotes( const TQString & str )
{
if ( str.isEmpty() )
- return QString();
+ return TQString();
- QString escaped;
+ TQString escaped;
// reserve enough memory for the worst case ( """..."" -> \"\"\"...\"\" )
escaped.reserve( 2*str.length() );
unsigned int len = 0;
@@ -963,11 +963,11 @@ static QString escapeQuotes( const QString & str )
}
//-----------------------------------------------------------------------------
-QString KPIM::quoteNameIfNecessary( const QString &str )
+TQString KPIM::quoteNameIfNecessary( const TQString &str )
{
- QString quoted = str;
+ TQString quoted = str;
- QRegExp needQuotes( "[^ 0-9A-Za-z\\x0080-\\xFFFF]" );
+ TQRegExp needQuotes( "[^ 0-9A-Za-z\\x0080-\\xFFFF]" );
// avoid double quoting
if ( ( quoted[0] == '"' ) && ( quoted[quoted.length() - 1] == '"' ) ) {
quoted = "\"" + escapeQuotes( quoted.mid( 1, quoted.length() - 2 ) ) + "\"";
diff --git a/libemailfunctions/email.h b/libemailfunctions/email.h
index 493fa087c..5e5e665b9 100644
--- a/libemailfunctions/email.h
+++ b/libemailfunctions/email.h
@@ -22,8 +22,8 @@
#ifndef EMAIL_H
#define EMAIL_H
-#include <qstringlist.h>
-#include <qcstring.h>
+#include <tqstringlist.h>
+#include <tqcstring.h>
#include <kdepimmacros.h>
@@ -51,7 +51,7 @@ enum EmailParseResult { AddressOk, AddressEmpty, UnexpectedEnd,
// Helper functions
/** Split a comma separated list of email addresses. */
-KDE_EXPORT QStringList splitEmailAddrList(const QString& aStr);
+KDE_EXPORT TQStringList splitEmailAddrList(const TQString& aStr);
/** Splits the given address into display name, email address and comment.
Returns AddressOk if no error was encountered. Otherwise an appropriate
@@ -72,10 +72,10 @@ KDE_EXPORT QStringList splitEmailAddrList(const QString& aStr);
@return AddressOk if no error was encountered. Otherwise an
appropriate error code is returned.
*/
-KDE_EXPORT EmailParseResult splitAddress( const QCString & address,
- QCString & displayName,
- QCString & addrSpec,
- QCString & comment );
+KDE_EXPORT EmailParseResult splitAddress( const TQCString & address,
+ TQCString & displayName,
+ TQCString & addrSpec,
+ TQCString & comment );
/** This is an overloaded member function, provided for convenience. It behaves
essentially like the above function.
@@ -99,10 +99,10 @@ KDE_EXPORT EmailParseResult splitAddress( const QCString & address,
@return AddressOk if no error was encountered. Otherwise an
appropriate error code is returned.
*/
-KDE_EXPORT EmailParseResult splitAddress( const QString & address,
- QString & displayName,
- QString & addrSpec,
- QString & comment );
+KDE_EXPORT EmailParseResult splitAddress( const TQString & address,
+ TQString & displayName,
+ TQString & addrSpec,
+ TQString & comment );
/** Validates an email address in the form of "Joe User" <joe@example.org>.
Returns AddressOk if no error was encountered. Otherwise an appropriate
@@ -113,7 +113,7 @@ KDE_EXPORT EmailParseResult splitAddress( const QString & address,
@return AddressOk if no error was encountered. Otherwise an
appropriate error code is returned.
*/
-KDE_EXPORT EmailParseResult isValidEmailAddress( const QString& aStr );
+KDE_EXPORT EmailParseResult isValidEmailAddress( const TQString& aStr );
/** Translate the enum errorcodes from emailParseResult
into i18n'd strings that can be used for msg boxes.
@@ -122,7 +122,7 @@ KDE_EXPORT EmailParseResult isValidEmailAddress( const QString& aStr );
@return An i18n ready string for use in msgboxes.
*/
-KDE_EXPORT QString emailParseResultToString( EmailParseResult errorCode );
+KDE_EXPORT TQString emailParseResultToString( EmailParseResult errorCode );
/** Validates an email address in the form of joe@example.org.
Returns true if no error was encountered.
@@ -134,7 +134,7 @@ KDE_EXPORT QString emailParseResultToString( EmailParseResult errorCode );
example: joe.user@example.org
@return true if no error was encountered.
*/
-KDE_EXPORT bool isValidSimpleEmailAddress( const QString& aStr );
+KDE_EXPORT bool isValidSimpleEmailAddress( const TQString& aStr );
/** Returns a i18n string to be used in msgboxes
this allows for error messages to be the same
@@ -143,7 +143,7 @@ KDE_EXPORT bool isValidSimpleEmailAddress( const QString& aStr );
@return An i18n ready string for use in msgboxes.
*/
-KDE_EXPORT QString simpleEmailAddressErrorMsg();
+KDE_EXPORT TQString simpleEmailAddressErrorMsg();
/** Returns the pure email address (addr-spec in RFC2822) of the given address
(mailbox in RFC2822).
@@ -152,7 +152,7 @@ KDE_EXPORT QString simpleEmailAddressErrorMsg();
@return the addr-spec of @a address, i.e. joe.user@example.org in the
example
*/
-KDE_EXPORT QCString getEmailAddress( const QCString & address );
+KDE_EXPORT TQCString getEmailAddress( const TQCString & address );
/** This is an overloaded member function, provided for convenience. It behaves
essentially like the above function.
@@ -164,7 +164,7 @@ KDE_EXPORT QCString getEmailAddress( const QCString & address );
@return the addr-spec of @a address, i.e. joe.user@example.org in the
example
*/
-KDE_EXPORT QString getEmailAddress( const QString & address );
+KDE_EXPORT TQString getEmailAddress( const TQString & address );
/** Returns the pure email address (addr-spec in RFC2822) of the first
email address of a list of addresses.
@@ -173,7 +173,7 @@ KDE_EXPORT QString getEmailAddress( const QString & address );
@return the addr-spec of @a addresses, i.e. joe.user@example.org in the
example
*/
-KDE_EXPORT QCString getFirstEmailAddress( const QCString & addresses );
+KDE_EXPORT TQCString getFirstEmailAddress( const TQCString & addresses );
/** This is an overloaded member function, provided for convenience. It behaves
essentially like the above function.
@@ -185,7 +185,7 @@ KDE_EXPORT QCString getFirstEmailAddress( const QCString & addresses );
@return the addr-spec of @a addresses, i.e. joe.user@example.org in the
example
*/
-KDE_EXPORT QString getFirstEmailAddress( const QString & addresses );
+KDE_EXPORT TQString getFirstEmailAddress( const TQString & addresses );
/** Return email address and name from string. Examples:
* "Stefan Taferner <taferner@example.org>" returns "taferner@example.org"
@@ -195,14 +195,14 @@ KDE_EXPORT QString getFirstEmailAddress( const QString & addresses );
* mail are not empty: this does NOT tell you if mail contains a
* valid email address or just some rubbish.
*/
-KDE_EXPORT bool getNameAndMail(const QString& aStr, QString& name, QString& mail);
+KDE_EXPORT bool getNameAndMail(const TQString& aStr, TQString& name, TQString& mail);
/**
* Compare two email addresses. If matchName is false, it just checks
* the email address, and returns true if this matches. If matchName
* is true, both the name and the email must be the same.
*/
-KDE_EXPORT bool compareEmail( const QString& email1, const QString& email2,
+KDE_EXPORT bool compareEmail( const TQString& email1, const TQString& email2,
bool matchName );
/** Returns a normalized address built from the given parts. The normalized
@@ -217,16 +217,16 @@ KDE_EXPORT bool compareEmail( const QString& email1, const QString& email2,
@param comment a comment
@return a normalized address built from the given parts
*/
-KDE_EXPORT QString normalizedAddress( const QString & displayName,
- const QString & addrSpec,
- const QString & comment );
+KDE_EXPORT TQString normalizedAddress( const TQString & displayName,
+ const TQString & addrSpec,
+ const TQString & comment );
/** Decodes the punycode domain part of the given addr-spec if it's an IDN.
@param addrSpec a pure 7-bit email address (addr-spec in RFC2822)
@return the email address with Unicode domain
*/
-KDE_EXPORT QString decodeIDN( const QString & addrSpec );
+KDE_EXPORT TQString decodeIDN( const TQString & addrSpec );
/** Encodes the domain part of the given addr-spec in punycode if it's an
IDN.
@@ -234,7 +234,7 @@ KDE_EXPORT QString decodeIDN( const QString & addrSpec );
@param addrSpec a pure email address with Unicode domain
@return the email address with domain in punycode
*/
-KDE_EXPORT QString encodeIDN( const QString & addrSpec );
+KDE_EXPORT TQString encodeIDN( const TQString & addrSpec );
/** Normalizes all email addresses in the given list and decodes all IDNs.
@@ -242,17 +242,17 @@ KDE_EXPORT QString encodeIDN( const QString & addrSpec );
@return the email addresses in normalized form with Unicode IDNs
*/
-KDE_EXPORT QString normalizeAddressesAndDecodeIDNs( const QString & addresses );
+KDE_EXPORT TQString normalizeAddressesAndDecodeIDNs( const TQString & addresses );
/** Normalizes all email addresses in the given list and encodes all IDNs
in punycode.
*/
-KDE_EXPORT QString normalizeAddressesAndEncodeIDNs( const QString & str );
+KDE_EXPORT TQString normalizeAddressesAndEncodeIDNs( const TQString & str );
/** Add quote characters around the given string if it contains a
* character that makes that necessary, in an email name, such as ",".
*/
-KDE_EXPORT QString quoteNameIfNecessary( const QString& str );
+KDE_EXPORT TQString quoteNameIfNecessary( const TQString& str );
} // namespace
diff --git a/libemailfunctions/idmapper.cpp b/libemailfunctions/idmapper.cpp
index a44dc8c83..6250d41c0 100644
--- a/libemailfunctions/idmapper.cpp
+++ b/libemailfunctions/idmapper.cpp
@@ -25,7 +25,7 @@
#include <kstandarddirs.h>
#include <kdebug.h>
-#include <qfile.h>
+#include <tqfile.h>
using namespace KPIM;
@@ -33,7 +33,7 @@ IdMapper::IdMapper()
{
}
-IdMapper::IdMapper( const QString &path, const QString &identifier )
+IdMapper::IdMapper( const TQString &path, const TQString &identifier )
: mPath( path ), mIdentifier( identifier )
{
}
@@ -42,19 +42,19 @@ IdMapper::~IdMapper()
{
}
-void IdMapper::setPath( const QString &path )
+void IdMapper::setPath( const TQString &path )
{
mPath = path;
}
-void IdMapper::setIdentifier( const QString &identifier )
+void IdMapper::setIdentifier( const TQString &identifier )
{
mIdentifier = identifier;
}
-QString IdMapper::filename()
+TQString IdMapper::filename()
{
- QString file = mPath;
+ TQString file = mPath;
if ( !file.endsWith( "/" ) ) file += "/";
file += mIdentifier;
@@ -63,7 +63,7 @@ QString IdMapper::filename()
bool IdMapper::load()
{
- QFile file( filename() );
+ TQFile file( filename() );
if ( !file.open( IO_ReadOnly ) ) {
kdError(5800) << "Can't read uid map file '" << filename() << "'" << endl;
return false;
@@ -71,11 +71,11 @@ bool IdMapper::load()
clear();
- QString line;
+ TQString line;
while ( file.readLine( line, 1024 ) != -1 ) {
line.truncate( line.length() - 2 ); // strip newline
- QStringList parts = QStringList::split( "\x02\x02", line, true );
+ TQStringList parts = TQStringList::split( "\x02\x02", line, true );
mIdMap.insert( parts[ 0 ], parts[ 1 ] );
mFingerprintMap.insert( parts[ 0 ], parts[ 2 ] );
}
@@ -87,17 +87,17 @@ bool IdMapper::load()
bool IdMapper::save()
{
- QFile file( filename() );
+ TQFile file( filename() );
if ( !file.open( IO_WriteOnly ) ) {
kdError(5800) << "Can't write uid map file '" << filename() << "'" << endl;
return false;
}
- QString content;
+ TQString content;
- QMap<QString, QVariant>::Iterator it;
+ TQMap<TQString, TQVariant>::Iterator it;
for ( it = mIdMap.begin(); it != mIdMap.end(); ++it ) {
- QString fingerprint( "" );
+ TQString fingerprint( "" );
if ( mFingerprintMap.contains( it.key() ) )
fingerprint = mFingerprintMap[ it.key() ];
content += it.key() + "\x02\x02" + it.data().toString() + "\x02\x02" + fingerprint + "\r\n";
@@ -115,14 +115,14 @@ void IdMapper::clear()
mFingerprintMap.clear();
}
-void IdMapper::setRemoteId( const QString &localId, const QString &remoteId )
+void IdMapper::setRemoteId( const TQString &localId, const TQString &remoteId )
{
mIdMap.replace( localId, remoteId );
}
-void IdMapper::removeRemoteId( const QString &remoteId )
+void IdMapper::removeRemoteId( const TQString &remoteId )
{
- QMap<QString, QVariant>::Iterator it;
+ TQMap<TQString, TQVariant>::Iterator it;
for ( it = mIdMap.begin(); it != mIdMap.end(); ++it )
if ( it.data().toString() == remoteId ) {
mIdMap.remove( it );
@@ -131,34 +131,34 @@ void IdMapper::removeRemoteId( const QString &remoteId )
}
}
-QString IdMapper::remoteId( const QString &localId ) const
+TQString IdMapper::remoteId( const TQString &localId ) const
{
- QMap<QString, QVariant>::ConstIterator it;
+ TQMap<TQString, TQVariant>::ConstIterator it;
it = mIdMap.find( localId );
if ( it != mIdMap.end() )
return it.data().toString();
else
- return QString::null;
+ return TQString::null;
}
-QString IdMapper::localId( const QString &remoteId ) const
+TQString IdMapper::localId( const TQString &remoteId ) const
{
- QMap<QString, QVariant>::ConstIterator it;
+ TQMap<TQString, TQVariant>::ConstIterator it;
for ( it = mIdMap.begin(); it != mIdMap.end(); ++it )
if ( it.data().toString() == remoteId )
return it.key();
- return QString::null;
+ return TQString::null;
}
-QString IdMapper::asString() const
+TQString IdMapper::asString() const
{
- QString content;
+ TQString content;
- QMap<QString, QVariant>::ConstIterator it;
+ TQMap<TQString, TQVariant>::ConstIterator it;
for ( it = mIdMap.begin(); it != mIdMap.end(); ++it ) {
- QString fp;
+ TQString fp;
if ( mFingerprintMap.contains( it.key() ) )
fp = mFingerprintMap[ it.key() ];
content += it.key() + "\t" + it.data().toString() + "\t" + fp + "\r\n";
@@ -167,23 +167,23 @@ QString IdMapper::asString() const
return content;
}
-void IdMapper::setFingerprint( const QString &localId, const QString &fingerprint )
+void IdMapper::setFingerprint( const TQString &localId, const TQString &fingerprint )
{
mFingerprintMap.insert( localId, fingerprint );
}
-const QString& IdMapper::fingerprint( const QString &localId ) const
+const TQString& IdMapper::fingerprint( const TQString &localId ) const
{
if ( mFingerprintMap.contains( localId ) )
return mFingerprintMap[ localId ];
else
- return QString::null;
+ return TQString::null;
}
-QMap<QString, QString> IdMapper::remoteIdMap() const
+TQMap<TQString, TQString> IdMapper::remoteIdMap() const
{
- QMap<QString, QString> reverseMap;
- QMap<QString, QVariant>::ConstIterator it;
+ TQMap<TQString, TQString> reverseMap;
+ TQMap<TQString, TQVariant>::ConstIterator it;
for ( it = mIdMap.begin(); it != mIdMap.end(); ++it ) {
reverseMap.insert( it.data().toString(), it.key() );
}
diff --git a/libemailfunctions/idmapper.h b/libemailfunctions/idmapper.h
index e09587f4c..999c68ac3 100644
--- a/libemailfunctions/idmapper.h
+++ b/libemailfunctions/idmapper.h
@@ -22,8 +22,8 @@
#ifndef KPIM_IDMAPPER_H
#define KPIM_IDMAPPER_H
-#include <qmap.h>
-#include <qvariant.h>
+#include <tqmap.h>
+#include <tqvariant.h>
#include <kdepimmacros.h>
@@ -52,27 +52,27 @@ class KDE_EXPORT IdMapper
The current implementation stores the data at
$(KDEHOME)/share/apps/\<path\>/\<identifier\>.
*/
- IdMapper( const QString &path, const QString &identifier = QString::null );
+ IdMapper( const TQString &path, const TQString &identifier = TQString::null );
/** Destructor. */
~IdMapper();
/**
Set id map path.
*/
- void setPath( const QString &path );
+ void setPath( const TQString &path );
/**
Return id map path.
*/
- QString path() const { return mPath; }
+ TQString path() const { return mPath; }
/**
Set id map identifier.
*/
- void setIdentifier( const QString &identifier );
+ void setIdentifier( const TQString &identifier );
/**
Return id map identifier.
*/
- QString identifier() const { return mIdentifier; }
+ TQString identifier() const { return mIdentifier; }
/**
Loads the map.
@@ -92,22 +92,22 @@ class KDE_EXPORT IdMapper
/**
Stores the remote id for the given local id.
*/
- void setRemoteId( const QString &localId, const QString &remoteId );
+ void setRemoteId( const TQString &localId, const TQString &remoteId );
/**
Removes the remote id.
*/
- void removeRemoteId( const QString &remoteId );
+ void removeRemoteId( const TQString &remoteId );
/**
Returns the remote id of the given local id.
*/
- QString remoteId( const QString &localId ) const;
+ TQString remoteId( const TQString &localId ) const;
/**
Returns the local id for the given remote id.
*/
- QString localId( const QString &remoteId ) const;
+ TQString localId( const TQString &remoteId ) const;
/**
@@ -116,7 +116,7 @@ class KDE_EXPORT IdMapper
* This can be a sequence number of an md5 hash depending on what
* the server provides
*/
- void setFingerprint( const QString &localId, const QString &fingerprint );
+ void setFingerprint( const TQString &localId, const TQString &fingerprint );
/**
* Returns the fingerprint for the map.
@@ -124,7 +124,7 @@ class KDE_EXPORT IdMapper
* @todo Figure out if this applies to the last set fingerprint
* or if anything else can change it.
*/
- const QString &fingerprint( const QString &localId ) const;
+ const TQString &fingerprint( const TQString &localId ) const;
/**
@@ -132,26 +132,26 @@ class KDE_EXPORT IdMapper
*
* @todo Document what the map means.
*/
- QMap<QString, QString> remoteIdMap() const;
+ TQMap<TQString, TQString> remoteIdMap() const;
/**
* Returns a string representation of the id pairs, that's usefull
* for debugging.
*/
- QString asString() const;
+ TQString asString() const;
protected:
/**
* Returns the filename this mapper is (or will be) stored in.
*/
- QString filename();
+ TQString filename();
private:
- QMap<QString, QVariant> mIdMap;
- QMap<QString, QString> mFingerprintMap;
+ TQMap<TQString, TQVariant> mIdMap;
+ TQMap<TQString, TQString> mFingerprintMap;
- QString mPath;
- QString mIdentifier;
+ TQString mPath;
+ TQString mIdentifier;
};
}
diff --git a/libemailfunctions/networkstatus.cpp b/libemailfunctions/networkstatus.cpp
index fae385220..ce6fd2eb5 100644
--- a/libemailfunctions/networkstatus.cpp
+++ b/libemailfunctions/networkstatus.cpp
@@ -33,7 +33,7 @@ static KStaticDeleter<NetworkStatus> networkStatusDeleter;
NetworkStatus *NetworkStatus::mSelf = 0;
NetworkStatus::NetworkStatus()
- : QObject( 0, "NetworkStatus" ), DCOPObject( "NetworkStatus" )
+ : TQObject( 0, "NetworkStatus" ), DCOPObject( "NetworkStatus" )
{
KConfigGroup group( KGlobal::config(), "NetworkStatus" );
if ( group.readBoolEntry( "Online", true ) == true )
diff --git a/libemailfunctions/networkstatus.h b/libemailfunctions/networkstatus.h
index 6bc3b70a4..42ff0f922 100644
--- a/libemailfunctions/networkstatus.h
+++ b/libemailfunctions/networkstatus.h
@@ -22,7 +22,7 @@
#ifndef NETWORKSTATUS_H
#define NETWORKSTATUS_H
-#include <qobject.h>
+#include <tqobject.h>
#include <dcopobject.h>
namespace KPIM {
@@ -32,7 +32,7 @@ namespace KPIM {
the machine KDE is running on going from "online" mode to
offline. What this means is left as an exercise for the reader.
*/
-class NetworkStatus : public QObject, public DCOPObject
+class NetworkStatus : public TQObject, public DCOPObject
{
Q_OBJECT
diff --git a/libemailfunctions/tests/testemail.cpp b/libemailfunctions/tests/testemail.cpp
index ce2111db0..30908d83e 100644
--- a/libemailfunctions/tests/testemail.cpp
+++ b/libemailfunctions/tests/testemail.cpp
@@ -29,7 +29,7 @@
using namespace KPIM;
-static bool check(const QString& txt, const QString& a, const QString& b)
+static bool check(const TQString& txt, const TQString& a, const TQString& b)
{
if (a == b) {
kdDebug() << txt << " : checking '" << a << "' against expected value '" << b << "'... " << "ok" << endl;
@@ -41,7 +41,7 @@ static bool check(const QString& txt, const QString& a, const QString& b)
return true;
}
-static bool check(const QString& txt, const QStringList& a, const QStringList& b)
+static bool check(const TQString& txt, const TQStringList& a, const TQStringList& b)
{
if ( a.join("\n") == b.join("\n") ) {
kdDebug() << txt << " : checking list [ " << a.join( ", " ) << " ] against expected value [ " << b.join( ", " ) << " ]... " << "ok" << endl;
@@ -53,18 +53,18 @@ static bool check(const QString& txt, const QStringList& a, const QStringList& b
return true;
}
-static bool checkGetNameAndEmail(const QString& input, const QString& expName, const QString& expEmail, bool expRetVal)
+static bool checkGetNameAndEmail(const TQString& input, const TQString& expName, const TQString& expEmail, bool expRetVal)
{
- QString name, email;
+ TQString name, email;
bool retVal = KPIM::getNameAndMail(input, name, email);
- check( "getNameAndMail " + input + " retVal", retVal?QString::fromLatin1( "true" ):QString::fromLatin1( "false" ), expRetVal?QString::fromLatin1( "true" ):QString::fromLatin1( "false" ) );
+ check( "getNameAndMail " + input + " retVal", retVal?TQString::fromLatin1( "true" ):TQString::fromLatin1( "false" ), expRetVal?TQString::fromLatin1( "true" ):TQString::fromLatin1( "false" ) );
check( "getNameAndMail " + input + " name", name, expName );
check( "getNameAndMail " + input + " email", email, expEmail );
return true;
}
// convert this to a switch instead but hey, nothing speedy in here is needed but still.. it would be nice
-static QString emailTestParseResultToString( EmailParseResult errorCode )
+static TQString emailTestParseResultToString( EmailParseResult errorCode )
{
if( errorCode == TooManyAts ) {
return "TooManyAts";
@@ -98,7 +98,7 @@ static QString emailTestParseResultToString( EmailParseResult errorCode )
return "unknown error code";
}
-static QString simpleEmailTestParseResultToString( bool validEmail )
+static TQString simpleEmailTestParseResultToString( bool validEmail )
{
if ( validEmail ) {
return "true";
@@ -106,54 +106,54 @@ static QString simpleEmailTestParseResultToString( bool validEmail )
return "false";
}
-static bool checkIsValidEmailAddress( const QString& input, const QString& expErrorCode )
+static bool checkIsValidEmailAddress( const TQString& input, const TQString& expErrorCode )
{
EmailParseResult errorCode = KPIM::isValidEmailAddress( input );
- QString errorC = emailTestParseResultToString( errorCode );
+ TQString errorC = emailTestParseResultToString( errorCode );
check( "isValidEmailAddress " + input + " errorCode ", errorC , expErrorCode );
return true;
}
-static bool checkIsValidSimpleEmailAddress( const QString& input, const QString& expResult )
+static bool checkIsValidSimpleEmailAddress( const TQString& input, const TQString& expResult )
{
bool validEmail = KPIM::isValidSimpleEmailAddress( input );
- QString result = simpleEmailTestParseResultToString( validEmail );
+ TQString result = simpleEmailTestParseResultToString( validEmail );
check( "isValidSimpleEmailAddress " + input + " result ", result, expResult );
return true;
}
-static bool checkGetEmailAddress( const QString& input, const QString& expResult )
+static bool checkGetEmailAddress( const TQString& input, const TQString& expResult )
{
- QString emailAddress = KPIM::getEmailAddress( input );
- QString result = emailAddress;
+ TQString emailAddress = KPIM::getEmailAddress( input );
+ TQString result = emailAddress;
check( "getEmailAddress " + input + " result ", result, expResult );
return true;
}
-static bool checkSplitEmailAddrList( const QString& input, const QStringList& expResult )
+static bool checkSplitEmailAddrList( const TQString& input, const TQStringList& expResult )
{
- QStringList emailAddresses = KPIM::splitEmailAddrList( input );
+ TQStringList emailAddresses = KPIM::splitEmailAddrList( input );
check( "splitEmailAddrList( \"" + input + "\" ) result ", emailAddresses, expResult );
return true;
}
-static bool checkNormalizeAddressesAndEncodeIDNs( const QString& input, const QString& expResult )
+static bool checkNormalizeAddressesAndEncodeIDNs( const TQString& input, const TQString& expResult )
{
- QString result = KPIM::normalizeAddressesAndEncodeIDNs( input );
+ TQString result = KPIM::normalizeAddressesAndEncodeIDNs( input );
check( "normalizeAddressesAndEncodeIDNs( \"" + input + "\" ) result ", result, expResult );
return true;
}
-static bool checkNormalizeAddressesAndDecodeIDNs( const QString& input, const QString& expResult )
+static bool checkNormalizeAddressesAndDecodeIDNs( const TQString& input, const TQString& expResult )
{
- QString result = KPIM::normalizeAddressesAndDecodeIDNs( input );
+ TQString result = KPIM::normalizeAddressesAndDecodeIDNs( input );
check( "normalizeAddressesAndDecodeIDNs( \"" + input + "\" ) result ", result, expResult );
return true;
}
-static bool checkQuoteIfNecessary( const QString& input, const QString& expResult )
+static bool checkQuoteIfNecessary( const TQString& input, const TQString& expResult )
{
- QString result = quoteNameIfNecessary( input );
+ TQString result = quoteNameIfNecessary( input );
check( "quoteNameIfNecessary " + input + " result ", result, expResult );
return true;
}
@@ -166,10 +166,10 @@ int main(int argc, char *argv[])
KApplication app( false, false );
// Empty input
- checkGetNameAndEmail( QString::null, QString::null, QString::null, false );
+ checkGetNameAndEmail( TQString::null, TQString::null, TQString::null, false );
// Email only
- checkGetNameAndEmail( "faure@kde.org", QString::null, "faure@kde.org", false );
+ checkGetNameAndEmail( "faure@kde.org", TQString::null, "faure@kde.org", false );
// Normal case
checkGetNameAndEmail( "David Faure <faure@kde.org>", "David Faure", "faure@kde.org", true );
@@ -203,8 +203,8 @@ int main(int argc, char *argv[])
//checkGetNameAndEmail( "\"a@b\" <faure@kde.org>", "a@b", "faure@kde.org", true );
// While typing, when there's no '@' yet
- checkGetNameAndEmail( "foo", "foo", QString::null, false );
- checkGetNameAndEmail( "foo <", "foo", QString::null, false );
+ checkGetNameAndEmail( "foo", "foo", TQString::null, false );
+ checkGetNameAndEmail( "foo <", "foo", TQString::null, false );
checkGetNameAndEmail( "foo <b", "foo", "b", true );
// If multiple emails are there, only return the first one
@@ -226,7 +226,7 @@ int main(int argc, char *argv[])
checkIsValidEmailAddress( "mattfruitsalad.org", "TooFewAts" );
// An empty string
- checkIsValidEmailAddress( QString::null , "AddressEmpty" );
+ checkIsValidEmailAddress( TQString::null , "AddressEmpty" );
// email address starting with a @
checkIsValidEmailAddress( "@mattfruitsalad.org", "MissingLocalPart" );
@@ -385,9 +385,9 @@ int main(int argc, char *argv[])
// checks for "pure" email addresses in the form of xxx@yyy.tld
checkIsValidSimpleEmailAddress( "matt@fruitsalad.org", "true" );
- checkIsValidSimpleEmailAddress( QString::fromUtf8("test@täst.invalid"), "true" );
+ checkIsValidSimpleEmailAddress( TQString::fromUtf8("test@täst.invalid"), "true" );
// non-ASCII char as first char of IDN
- checkIsValidSimpleEmailAddress( QString::fromUtf8("i_want@øl.invalid"), "true" );
+ checkIsValidSimpleEmailAddress( TQString::fromUtf8("i_want@øl.invalid"), "true" );
checkIsValidSimpleEmailAddress( "matt@[123.123.123.123]", "true" );
checkIsValidSimpleEmailAddress( "matt@[3.3.3.3]", "true" );
checkIsValidSimpleEmailAddress( "matt@[4.4.4.4]", "true" );
@@ -433,7 +433,7 @@ int main(int argc, char *argv[])
checkIsValidSimpleEmailAddress( "matt@123.123.123.123]", "false" );
checkIsValidSimpleEmailAddress( "\"matt@fruitsalad.org", "false" );
checkIsValidSimpleEmailAddress( "matt\"@fruitsalad.org", "false" );
- checkIsValidSimpleEmailAddress( QString::null, "false" );
+ checkIsValidSimpleEmailAddress( TQString::null, "false" );
// and here some insane but still valid cases
checkIsValidSimpleEmailAddress( "\"m@tt\"@fruitsalad.org", "true" );
@@ -445,17 +445,17 @@ int main(int argc, char *argv[])
checkGetEmailAddress( "Matt Douhan <matt@fruitsalad.org>", "matt@fruitsalad.org" );
checkGetEmailAddress( "\"Matt Douhan <blah blah>\" <matt@fruitsalad.org>", "matt@fruitsalad.org" );
checkGetEmailAddress( "\"Matt <blah blah>\" <matt@fruitsalad.org>", "matt@fruitsalad.org" );
- checkGetEmailAddress( "Matt Douhan (jongel) <matt@fruitsalad.org", QString() );
+ checkGetEmailAddress( "Matt Douhan (jongel) <matt@fruitsalad.org", TQString() );
checkGetEmailAddress( "Matt Douhan (m@tt) <matt@fruitsalad.org>", "matt@fruitsalad.org" );
checkGetEmailAddress( "\"Douhan, Matt\" <matt@fruitsalad.org>", "matt@fruitsalad.org" );
checkGetEmailAddress( "\"Matt Douhan (m@tt)\" <matt@fruitsalad.org>", "matt@fruitsalad.org" );
- checkGetEmailAddress( "\"Matt Douhan\" (matt <matt@fruitsalad.org>", QString() );
+ checkGetEmailAddress( "\"Matt Douhan\" (matt <matt@fruitsalad.org>", TQString() );
checkGetEmailAddress( "Matt Douhan <matt@[123.123.123.123]>", "matt@[123.123.123.123]" );
// check the splitEmailAddrList method
- checkSplitEmailAddrList( "kloecker@kde.org (Kloecker, Ingo)", QStringList() << "kloecker@kde.org (Kloecker, Ingo)" );
- checkSplitEmailAddrList( "Matt Douhan <matt@fruitsalad.org>, Foo Bar <foo@bar.com>", QStringList() << "Matt Douhan <matt@fruitsalad.org>" << "Foo Bar <foo@bar.com>" );
- checkSplitEmailAddrList( "\"Matt, Douhan\" <matt@fruitsalad.org>, Foo Bar <foo@bar.com>", QStringList() << "\"Matt, Douhan\" <matt@fruitsalad.org>" << "Foo Bar <foo@bar.com>" );
+ checkSplitEmailAddrList( "kloecker@kde.org (Kloecker, Ingo)", TQStringList() << "kloecker@kde.org (Kloecker, Ingo)" );
+ checkSplitEmailAddrList( "Matt Douhan <matt@fruitsalad.org>, Foo Bar <foo@bar.com>", TQStringList() << "Matt Douhan <matt@fruitsalad.org>" << "Foo Bar <foo@bar.com>" );
+ checkSplitEmailAddrList( "\"Matt, Douhan\" <matt@fruitsalad.org>, Foo Bar <foo@bar.com>", TQStringList() << "\"Matt, Douhan\" <matt@fruitsalad.org>" << "Foo Bar <foo@bar.com>" );
// check checkNormalizeAddressesAndEncodeIDNs
checkNormalizeAddressesAndEncodeIDNs( "matt@fruitsalad.org", "matt@fruitsalad.org" );
@@ -467,7 +467,7 @@ int main(int argc, char *argv[])
// check checkNormalizeAddressesAndDecodeIDNs
checkNormalizeAddressesAndDecodeIDNs( "=?us-ascii?Q?Surname=2C=20Name?= <nobody@example.org>", "\"Surname, Name\" <nobody@example.org>" );
- checkNormalizeAddressesAndDecodeIDNs( "=?iso-8859-1?B?5Hf8b2xmLPZBbmRyZWFz?= <nobody@example.org>", QString::fromUtf8("\"äwüolf,öAndreas\" <nobody@example.org>") );
+ checkNormalizeAddressesAndDecodeIDNs( "=?iso-8859-1?B?5Hf8b2xmLPZBbmRyZWFz?= <nobody@example.org>", TQString::fromUtf8("\"äwüolf,öAndreas\" <nobody@example.org>") );
// check the "quote if necessary" method
checkQuoteIfNecessary( "Matt Douhan", "Matt Douhan");
diff --git a/libemailfunctions/tests/testidmapper.cpp b/libemailfunctions/tests/testidmapper.cpp
index 245895ec9..591ebce03 100644
--- a/libemailfunctions/tests/testidmapper.cpp
+++ b/libemailfunctions/tests/testidmapper.cpp
@@ -19,13 +19,13 @@
Boston, MA 02110-1301, USA.
*/
-#include <qapplication.h>
+#include <tqapplication.h>
#include "idmapper.h"
int main( int argc, char **argv )
{
- QApplication app( argc, argv );
+ TQApplication app( argc, argv );
KPIM::IdMapper mapper( "test.uidmap" ) ;
diff --git a/libkcal/alarm.cpp b/libkcal/alarm.cpp
index c4416fb7e..b5b9b515a 100644
--- a/libkcal/alarm.cpp
+++ b/libkcal/alarm.cpp
@@ -122,14 +122,14 @@ Alarm::Type Alarm::type() const
return mType;
}
-void Alarm::setAudioAlarm(const QString &audioFile)
+void Alarm::setAudioAlarm(const TQString &audioFile)
{
mType = Audio;
mFile = audioFile;
if ( mParent ) mParent->updated();
}
-void Alarm::setAudioFile(const QString &audioFile)
+void Alarm::setAudioFile(const TQString &audioFile)
{
if (mType == Audio) {
mFile = audioFile;
@@ -137,12 +137,12 @@ void Alarm::setAudioFile(const QString &audioFile)
}
}
-QString Alarm::audioFile() const
+TQString Alarm::audioFile() const
{
- return (mType == Audio) ? mFile : QString::null;
+ return (mType == Audio) ? mFile : TQString::null;
}
-void Alarm::setProcedureAlarm(const QString &programFile, const QString &arguments)
+void Alarm::setProcedureAlarm(const TQString &programFile, const TQString &arguments)
{
mType = Procedure;
mFile = programFile;
@@ -150,7 +150,7 @@ void Alarm::setProcedureAlarm(const QString &programFile, const QString &argumen
if ( mParent ) mParent->updated();
}
-void Alarm::setProgramFile(const QString &programFile)
+void Alarm::setProgramFile(const TQString &programFile)
{
if (mType == Procedure) {
mFile = programFile;
@@ -158,12 +158,12 @@ void Alarm::setProgramFile(const QString &programFile)
}
}
-QString Alarm::programFile() const
+TQString Alarm::programFile() const
{
- return (mType == Procedure) ? mFile : QString::null;
+ return (mType == Procedure) ? mFile : TQString::null;
}
-void Alarm::setProgramArguments(const QString &arguments)
+void Alarm::setProgramArguments(const TQString &arguments)
{
if (mType == Procedure) {
mDescription = arguments;
@@ -171,13 +171,13 @@ void Alarm::setProgramArguments(const QString &arguments)
}
}
-QString Alarm::programArguments() const
+TQString Alarm::programArguments() const
{
- return (mType == Procedure) ? mDescription : QString::null;
+ return (mType == Procedure) ? mDescription : TQString::null;
}
-void Alarm::setEmailAlarm(const QString &subject, const QString &text,
- const QValueList<Person> &addressees, const QStringList &attachments)
+void Alarm::setEmailAlarm(const TQString &subject, const TQString &text,
+ const TQValueList<Person> &addressees, const TQStringList &attachments)
{
mType = Email;
mMailSubject = subject;
@@ -196,7 +196,7 @@ void Alarm::setMailAddress(const Person &mailAddress)
}
}
-void Alarm::setMailAddresses(const QValueList<Person> &mailAddresses)
+void Alarm::setMailAddresses(const TQValueList<Person> &mailAddresses)
{
if (mType == Email) {
mMailAddresses = mailAddresses;
@@ -212,12 +212,12 @@ void Alarm::addMailAddress(const Person &mailAddress)
}
}
-QValueList<Person> Alarm::mailAddresses() const
+TQValueList<Person> Alarm::mailAddresses() const
{
- return (mType == Email) ? mMailAddresses : QValueList<Person>();
+ return (mType == Email) ? mMailAddresses : TQValueList<Person>();
}
-void Alarm::setMailSubject(const QString &mailAlarmSubject)
+void Alarm::setMailSubject(const TQString &mailAlarmSubject)
{
if (mType == Email) {
mMailSubject = mailAlarmSubject;
@@ -225,12 +225,12 @@ void Alarm::setMailSubject(const QString &mailAlarmSubject)
}
}
-QString Alarm::mailSubject() const
+TQString Alarm::mailSubject() const
{
- return (mType == Email) ? mMailSubject : QString::null;
+ return (mType == Email) ? mMailSubject : TQString::null;
}
-void Alarm::setMailAttachment(const QString &mailAttachFile)
+void Alarm::setMailAttachment(const TQString &mailAttachFile)
{
if (mType == Email) {
mMailAttachFiles.clear();
@@ -239,7 +239,7 @@ void Alarm::setMailAttachment(const QString &mailAttachFile)
}
}
-void Alarm::setMailAttachments(const QStringList &mailAttachFiles)
+void Alarm::setMailAttachments(const TQStringList &mailAttachFiles)
{
if (mType == Email) {
mMailAttachFiles = mailAttachFiles;
@@ -247,7 +247,7 @@ void Alarm::setMailAttachments(const QStringList &mailAttachFiles)
}
}
-void Alarm::addMailAttachment(const QString &mailAttachFile)
+void Alarm::addMailAttachment(const TQString &mailAttachFile)
{
if (mType == Email) {
mMailAttachFiles += mailAttachFile;
@@ -255,12 +255,12 @@ void Alarm::addMailAttachment(const QString &mailAttachFile)
}
}
-QStringList Alarm::mailAttachments() const
+TQStringList Alarm::mailAttachments() const
{
- return (mType == Email) ? mMailAttachFiles : QStringList();
+ return (mType == Email) ? mMailAttachFiles : TQStringList();
}
-void Alarm::setMailText(const QString &text)
+void Alarm::setMailText(const TQString &text)
{
if (mType == Email) {
mDescription = text;
@@ -268,12 +268,12 @@ void Alarm::setMailText(const QString &text)
}
}
-QString Alarm::mailText() const
+TQString Alarm::mailText() const
{
- return (mType == Email) ? mDescription : QString::null;
+ return (mType == Email) ? mDescription : TQString::null;
}
-void Alarm::setDisplayAlarm(const QString &text)
+void Alarm::setDisplayAlarm(const TQString &text)
{
mType = Display;
if ( !text.isNull() )
@@ -281,7 +281,7 @@ void Alarm::setDisplayAlarm(const QString &text)
if ( mParent ) mParent->updated();
}
-void Alarm::setText(const QString &text)
+void Alarm::setText(const TQString &text)
{
if (mType == Display) {
mDescription = text;
@@ -289,12 +289,12 @@ void Alarm::setText(const QString &text)
}
}
-QString Alarm::text() const
+TQString Alarm::text() const
{
- return (mType == Display) ? mDescription : QString::null;
+ return (mType == Display) ? mDescription : TQString::null;
}
-void Alarm::setTime(const QDateTime &alarmTime)
+void Alarm::setTime(const TQDateTime &alarmTime)
{
mAlarmTime = alarmTime;
mHasTime = true;
@@ -302,7 +302,7 @@ void Alarm::setTime(const QDateTime &alarmTime)
if ( mParent ) mParent->updated();
}
-QDateTime Alarm::time() const
+TQDateTime Alarm::time() const
{
if ( hasTime() )
return mAlarmTime;
@@ -316,7 +316,7 @@ QDateTime Alarm::time() const
} else {
return mOffset.end( mParent->dtStart() );
}
- } else return QDateTime();
+ } else return TQDateTime();
}
bool Alarm::hasTime() const
@@ -353,41 +353,41 @@ int Alarm::duration() const
return mAlarmRepeatCount * mAlarmSnoozeTime * 60;
}
-QDateTime Alarm::nextRepetition(const QDateTime& preTime) const
+TQDateTime Alarm::nextRepetition(const TQDateTime& preTime) const
{
// This method is coded to avoid 32-bit integer overflow using
- // QDateTime::secsTo(), which occurs with time spans > 68 years.
- QDateTime at = time();
+ // TQDateTime::secsTo(), which occurs with time spans > 68 years.
+ TQDateTime at = time();
if (at > preTime)
return at;
if (!mAlarmRepeatCount)
- return QDateTime(); // there isn't an occurrence after the specified time
+ return TQDateTime(); // there isn't an occurrence after the specified time
int snoozeSecs = mAlarmSnoozeTime * 60;
- QDateTime lastRepetition = at.addSecs(mAlarmRepeatCount * snoozeSecs);
+ TQDateTime lastRepetition = at.addSecs(mAlarmRepeatCount * snoozeSecs);
if (lastRepetition <= preTime)
- return QDateTime(); // all repetitions have finished before the specified time
+ return TQDateTime(); // all repetitions have finished before the specified time
int repetition = (at.secsTo(preTime) + snoozeSecs) / snoozeSecs;
return at.addSecs(repetition * snoozeSecs);
}
-QDateTime Alarm::previousRepetition(const QDateTime& afterTime) const
+TQDateTime Alarm::previousRepetition(const TQDateTime& afterTime) const
{
// This method is coded to avoid 32-bit integer overflow using
- // QDateTime::secsTo(), which occurs with time spans > 68 years.
- QDateTime at = time();
+ // TQDateTime::secsTo(), which occurs with time spans > 68 years.
+ TQDateTime at = time();
if (at >= afterTime)
- return QDateTime(); // alarm's first/only time is at/after the specified time
+ return TQDateTime(); // alarm's first/only time is at/after the specified time
if (!mAlarmRepeatCount)
return at;
int snoozeSecs = mAlarmSnoozeTime * 60;
- QDateTime lastRepetition = at.addSecs(mAlarmRepeatCount * snoozeSecs);
+ TQDateTime lastRepetition = at.addSecs(mAlarmRepeatCount * snoozeSecs);
if (lastRepetition < afterTime)
return lastRepetition; // all repetitions have finished before the specified time
int repetition = (at.secsTo(afterTime) - 1) / snoozeSecs;
return at.addSecs(repetition * snoozeSecs);
}
-QDateTime Alarm::endTime() const
+TQDateTime Alarm::endTime() const
{
if (mAlarmRepeatCount)
return time().addSecs(mAlarmRepeatCount * mAlarmSnoozeTime * 60);
diff --git a/libkcal/alarm.h b/libkcal/alarm.h
index 64970e639..7d82cf65d 100644
--- a/libkcal/alarm.h
+++ b/libkcal/alarm.h
@@ -22,9 +22,9 @@
#ifndef KCAL_ALARM_H
#define KCAL_ALARM_H
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qvaluelist.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqvaluelist.h>
#include "customproperties.h"
#include "duration.h"
@@ -81,34 +81,34 @@ class LIBKCAL_EXPORT Alarm : public CustomProperties
@param text text to display when the alarm is triggered.
*/
- void setDisplayAlarm( const QString &text = QString::null );
+ void setDisplayAlarm( const TQString &text = TQString::null );
/**
Set the text to be displayed when the alarm is triggered.
Ignored if the alarm is not a display alarm.
*/
- void setText( const QString &text );
+ void setText( const TQString &text );
/**
Return the text string that displays when the alarm is triggered.
*/
- QString text() const;
+ TQString text() const;
/**
Set the alarm to be an audio alarm.
@param audioFile optional file to play when the alarm is triggered.
*/
- void setAudioAlarm( const QString &audioFile = QString::null );
+ void setAudioAlarm( const TQString &audioFile = TQString::null );
/**
Set the file to play when the audio alarm is triggered.
Ignored if the alarm is not an audio alarm.
*/
- void setAudioFile( const QString &audioFile );
+ void setAudioFile( const TQString &audioFile );
/**
Return the name of the audio file for the alarm.
- @return The audio file for the alarm, or QString::null if not an audio alarm.
+ @return The audio file for the alarm, or TQString::null if not an audio alarm.
*/
- QString audioFile() const;
+ TQString audioFile() const;
/**
Set the alarm to be a procedure alarm.
@@ -116,30 +116,30 @@ class LIBKCAL_EXPORT Alarm : public CustomProperties
@param programFile program to execute when the alarm is triggered.
@param arguments arguments to supply to programFile.
*/
- void setProcedureAlarm( const QString &programFile,
- const QString &arguments = QString::null );
+ void setProcedureAlarm( const TQString &programFile,
+ const TQString &arguments = TQString::null );
/**
Set the program file to execute when the alarm is triggered.
Ignored if the alarm is not a procedure alarm.
*/
- void setProgramFile( const QString &programFile );
+ void setProgramFile( const TQString &programFile );
/**
Return the name of the program file to execute when the alarm is triggered.
- @return the program file name, or QString::null if not a procedure alarm.
+ @return the program file name, or TQString::null if not a procedure alarm.
*/
- QString programFile() const;
+ TQString programFile() const;
/**
Set the arguments to the program to execute when the alarm is triggered.
Ignored if the alarm is not a procedure alarm.
*/
- void setProgramArguments( const QString &arguments );
+ void setProgramArguments( const TQString &arguments );
/**
Return the arguments to the program to run when the alarm is triggered.
- @return the program arguments, or QString::null if not a procedure alarm.
+ @return the program arguments, or TQString::null if not a procedure alarm.
*/
- QString programArguments() const;
+ TQString programArguments() const;
/**
Set the alarm to be an email alarm.
@@ -149,9 +149,9 @@ class LIBKCAL_EXPORT Alarm : public CustomProperties
@param addressees email addresses of recipient(s).
@param attachments optional names of files to attach to the email.
*/
- void setEmailAlarm( const QString &subject, const QString &text,
- const QValueList<Person> &addressees,
- const QStringList &attachments = QStringList() );
+ void setEmailAlarm( const TQString &subject, const TQString &text,
+ const TQValueList<Person> &addressees,
+ const TQStringList &attachments = TQStringList() );
/**
Send mail to this address when the alarm is triggered.
@@ -162,7 +162,7 @@ class LIBKCAL_EXPORT Alarm : public CustomProperties
Send mail to these addresses when the alarm is triggered.
Ignored if the alarm is not an email alarm.
*/
- void setMailAddresses( const QValueList<Person> &mailAlarmAddresses );
+ void setMailAddresses( const TQValueList<Person> &mailAlarmAddresses );
/**
Add this address to the list of addresses to send mail to when the alarm is triggered.
Ignored if the alarm is not an email alarm.
@@ -171,63 +171,63 @@ class LIBKCAL_EXPORT Alarm : public CustomProperties
/**
Return the addresses to send mail to when an alarm goes off.
*/
- QValueList<Person> mailAddresses() const;
+ TQValueList<Person> mailAddresses() const;
/**
Set the subject line of the mail.
Ignored if the alarm is not an email alarm.
*/
- void setMailSubject( const QString &mailAlarmSubject );
+ void setMailSubject( const TQString &mailAlarmSubject );
/**
Return the subject line of the mail.
*/
- QString mailSubject() const;
+ TQString mailSubject() const;
/**
Attach this filename to the email.
Ignored if the alarm is not an email alarm.
*/
- void setMailAttachment( const QString &mailAttachFile );
+ void setMailAttachment( const TQString &mailAttachFile );
/**
Attach these filenames to the email.
Ignored if the alarm is not an email alarm.
*/
- void setMailAttachments( const QStringList &mailAttachFiles );
+ void setMailAttachments( const TQStringList &mailAttachFiles );
/**
Add this filename to the list of files to attach to the email.
Ignored if the alarm is not an email alarm.
*/
- void addMailAttachment( const QString &mailAttachFile );
+ void addMailAttachment( const TQString &mailAttachFile );
/**
Return the filenames to attach to the email.
*/
- QStringList mailAttachments() const;
+ TQStringList mailAttachments() const;
/**
Set the email body text.
Ignored if the alarm is not an email alarm.
*/
- void setMailText( const QString &text );
+ void setMailText( const TQString &text );
/**
Return the email body text.
- @return the body text, or QString::null if not an email alarm.
+ @return the body text, or TQString::null if not an email alarm.
*/
- QString mailText() const;
+ TQString mailText() const;
/**
Set the time to trigger an alarm.
*/
- void setTime( const QDateTime &alarmTime );
+ void setTime( const TQDateTime &alarmTime );
/**
Return the date/time when an alarm goes off.
*/
- QDateTime time() const;
+ TQDateTime time() const;
/**
Return the date/time when the last repetition of the alarm goes off.
If the alarm does not repeat, this is equivalent to calling time().
*/
- QDateTime endTime() const;
+ TQDateTime endTime() const;
/**
Return true, if the alarm has an explicit date/time.
*/
@@ -295,7 +295,7 @@ class LIBKCAL_EXPORT Alarm : public CustomProperties
@return the date and time of the next repetition, or an invalid date/time if
the specified time is at or after the alarm's last repetition.
*/
- QDateTime nextRepetition(const QDateTime& preTime) const;
+ TQDateTime nextRepetition(const TQDateTime& preTime) const;
/**
Get the time of the alarm's latest repetition, or its initial occurrence if
none, before a given time.
@@ -303,7 +303,7 @@ class LIBKCAL_EXPORT Alarm : public CustomProperties
@return the date and time of the latest repetition, or an invalid date/time if
the specified time is at or before the alarm's initial occurrence.
*/
- QDateTime previousRepetition(const QDateTime& afterTime) const;
+ TQDateTime previousRepetition(const TQDateTime& afterTime) const;
/**
Get how long between the alarm's initial occurrence and its final repetition.
@return the number of seconds between the initial occurrence and final repetition.
@@ -344,18 +344,18 @@ class LIBKCAL_EXPORT Alarm : public CustomProperties
private:
Incidence *mParent; // the incidence which this alarm belongs to
Type mType; // type of alarm
- QString mDescription; // text to display/email body/procedure arguments
- QString mFile; // procedure program to run/optional audio file to play
- QStringList mMailAttachFiles; // filenames to attach to email
- QValueList<Person> mMailAddresses; // who to mail for reminder
- QString mMailSubject; // subject of email
+ TQString mDescription; // text to display/email body/procedure arguments
+ TQString mFile; // procedure program to run/optional audio file to play
+ TQStringList mMailAttachFiles; // filenames to attach to email
+ TQValueList<Person> mMailAddresses; // who to mail for reminder
+ TQString mMailSubject; // subject of email
int mAlarmSnoozeTime; // number of minutes after alarm to
// snooze before ringing again
int mAlarmRepeatCount; // number of times for alarm to repeat
// after the initial time
- QDateTime mAlarmTime; // time at which to trigger the alarm
+ TQDateTime mAlarmTime; // time at which to trigger the alarm
Duration mOffset; // time relative to incidence DTSTART to trigger the alarm
bool mEndOffset; // if true, mOffset relates to DTEND, not DTSTART
bool mHasTime; // use mAlarmTime, not mOffset
diff --git a/libkcal/attachment.cpp b/libkcal/attachment.cpp
index 58a540062..fc319b735 100644
--- a/libkcal/attachment.cpp
+++ b/libkcal/attachment.cpp
@@ -32,22 +32,22 @@ Attachment::Attachment( const Attachment &attachment)
mLabel = attachment.mLabel;
}
-Attachment::Attachment(const QString& uri, const QString& mime)
+Attachment::Attachment(const TQString& uri, const TQString& mime)
{
mMimeType = mime;
mData = uri;
mBinary = false;
mShowInline = false;
- mLabel = QString::null;
+ mLabel = TQString::null;
}
-Attachment::Attachment(const char *base64, const QString& mime)
+Attachment::Attachment(const char *base64, const TQString& mime)
{
mMimeType = mime;
- mData = QString::fromUtf8(base64);
+ mData = TQString::fromUtf8(base64);
mBinary = true;
mShowInline = false;
- mLabel = QString::null;
+ mLabel = TQString::null;
}
bool Attachment::isUri() const
@@ -55,15 +55,15 @@ bool Attachment::isUri() const
return !mBinary;
}
-QString Attachment::uri() const
+TQString Attachment::uri() const
{
if (!mBinary)
return mData;
else
- return QString::null;
+ return TQString::null;
}
-void Attachment::setUri(const QString& uri)
+void Attachment::setUri(const TQString& uri)
{
mData = uri;
mBinary = false;
@@ -85,16 +85,16 @@ char *Attachment::data() const
void Attachment::setData(const char *base64)
{
- mData = QString::fromUtf8(base64);
+ mData = TQString::fromUtf8(base64);
mBinary = true;
}
-QString Attachment::mimeType() const
+TQString Attachment::mimeType() const
{
return mMimeType;
}
-void Attachment::setMimeType(const QString& mime)
+void Attachment::setMimeType(const TQString& mime)
{
mMimeType = mime;
}
@@ -109,12 +109,12 @@ void Attachment::setShowInline( bool showinline )
mShowInline = showinline;
}
-QString Attachment::label() const
+TQString Attachment::label() const
{
return mLabel;
}
-void Attachment::setLabel( const QString& label )
+void Attachment::setLabel( const TQString& label )
{
mLabel = label;
}
diff --git a/libkcal/attachment.h b/libkcal/attachment.h
index 6e3907099..416701850 100644
--- a/libkcal/attachment.h
+++ b/libkcal/attachment.h
@@ -24,7 +24,7 @@
#include "listbase.h"
#include "libkcal_export.h"
-#include <qstring.h>
+#include <tqstring.h>
namespace KCal {
@@ -49,7 +49,7 @@ class KDE_EXPORT Attachment
@param uri the uri this attachment refers to
@param mime the mime type of the resource being linked to
*/
- Attachment( const QString &uri, const QString &mime = QString::null );
+ Attachment( const TQString &uri, const TQString &mime = TQString::null );
/**
Create a binary attachment.
@@ -57,35 +57,35 @@ class KDE_EXPORT Attachment
@param base64 the attachment in base64 format
@param mime the mime type of the attachment
*/
- Attachment( const char *base64, const QString &mime = QString::null );
+ Attachment( const char *base64, const TQString &mime = TQString::null );
/* The VALUE parameter in iCal */
bool isUri() const;
- QString uri() const;
- void setUri( const QString &uri );
+ TQString uri() const;
+ void setUri( const TQString &uri );
bool isBinary() const;
char *data() const;
void setData( const char *base64 );
/* The optional FMTTYPE parameter in iCal */
- QString mimeType() const;
- void setMimeType( const QString &mime );
+ TQString mimeType() const;
+ void setMimeType( const TQString &mime );
/* The custom X-CONTENT-DISPOSITION parameter, used by OGo etc. */
bool showInline() const;
void setShowInline( bool showinline );
/* The custom X-LABEL parameter to show a human-readable title */
- QString label() const;
- void setLabel( const QString &label );
+ TQString label() const;
+ void setLabel( const TQString &label );
private:
- QString mMimeType;
- QString mData;
+ TQString mMimeType;
+ TQString mData;
bool mBinary;
bool mShowInline;
- QString mLabel;
+ TQString mLabel;
class Private;
Private *d;
diff --git a/libkcal/attendee.cpp b/libkcal/attendee.cpp
index 7594c8eb3..3cb2afedf 100644
--- a/libkcal/attendee.cpp
+++ b/libkcal/attendee.cpp
@@ -19,7 +19,7 @@
Boston, MA 02110-1301, USA.
*/
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include <kdebug.h>
#include <klocale.h>
@@ -28,8 +28,8 @@
using namespace KCal;
-Attendee::Attendee( const QString &name, const QString &email, bool _rsvp,
- Attendee::PartStat s, Attendee::Role r, const QString &u)
+Attendee::Attendee( const TQString &name, const TQString &email, bool _rsvp,
+ Attendee::PartStat s, Attendee::Role r, const TQString &u)
: Person( name, email )
{
mRSVP = _rsvp;
@@ -63,12 +63,12 @@ Attendee::PartStat Attendee::status() const
return mStatus;
}
-QString Attendee::statusStr() const
+TQString Attendee::statusStr() const
{
return statusName( mStatus );
}
-QString Attendee::statusName( Attendee::PartStat s )
+TQString Attendee::statusName( Attendee::PartStat s )
{
switch ( s ) {
default:
@@ -96,9 +96,9 @@ QString Attendee::statusName( Attendee::PartStat s )
}
}
-QStringList Attendee::statusList()
+TQStringList Attendee::statusList()
{
- QStringList list;
+ TQStringList list;
list << statusName( NeedsAction );
list << statusName( Accepted );
list << statusName( Declined );
@@ -121,22 +121,22 @@ Attendee::Role Attendee::role() const
return mRole;
}
-QString Attendee::roleStr() const
+TQString Attendee::roleStr() const
{
return roleName( mRole );
}
-void Attendee::setUid( const QString &uid )
+void Attendee::setUid( const TQString &uid )
{
mUid = uid;
}
-QString Attendee::uid() const
+TQString Attendee::uid() const
{
return mUid;
}
-QString Attendee::roleName( Attendee::Role r )
+TQString Attendee::roleName( Attendee::Role r )
{
switch ( r ) {
case Chair:
@@ -155,9 +155,9 @@ QString Attendee::roleName( Attendee::Role r )
}
}
-QStringList Attendee::roleList()
+TQStringList Attendee::roleList()
{
- QStringList list;
+ TQStringList list;
list << roleName( ReqParticipant );
list << roleName( OptParticipant );
list << roleName( NonParticipant );
diff --git a/libkcal/attendee.h b/libkcal/attendee.h
index 1cdc7b546..f460665b6 100644
--- a/libkcal/attendee.h
+++ b/libkcal/attendee.h
@@ -22,8 +22,8 @@
#ifndef KCAL_ATTENDEE_H
#define KCAL_ATTENDEE_H
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
#include "listbase.h"
#include "person.h"
@@ -52,9 +52,9 @@ class LIBKCAL_EXPORT Attendee : public Person
@param role Role
@param u the uid for the attendee
*/
- Attendee( const QString &name, const QString &email,
+ Attendee( const TQString &name, const TQString &email,
bool rsvp = false, PartStat status = NeedsAction,
- Role role = ReqParticipant, const QString &u = QString::null );
+ Role role = ReqParticipant, const TQString &u = TQString::null );
/**
Destruct Attendee.
*/
@@ -74,24 +74,24 @@ class LIBKCAL_EXPORT Attendee : public Person
/**
Return role as clear text string.
*/
- QString roleStr() const;
+ TQString roleStr() const;
/**
Return string represenation of role.
*/
- static QString roleName( Role );
+ static TQString roleName( Role );
/**
Return string representations of all available roles.
*/
- static QStringList roleList();
+ static TQStringList roleList();
/**
Return unique id of the attendee.
*/
- QString uid() const;
+ TQString uid() const;
/**
Set unique id of attendee.
*/
- void setUid ( const QString & );
+ void setUid ( const TQString & );
/**
Set status. See enum for definitions of possible values.
@@ -106,15 +106,15 @@ class LIBKCAL_EXPORT Attendee : public Person
/**
Return status as human-readable string.
*/
- QString statusStr() const;
+ TQString statusStr() const;
/**
Return string representation of attendee status.
*/
- static QString statusName( PartStat );
+ static TQString statusName( PartStat );
/**
Return string representations of all available attendee status values.
*/
- static QStringList statusList();
+ static TQStringList statusList();
/**
Set if Attendee is asked to reply.
@@ -128,28 +128,28 @@ class LIBKCAL_EXPORT Attendee : public Person
/**
Sets the delegate.
*/
- void setDelegate( const QString &delegate ) { mDelegate = delegate; }
+ void setDelegate( const TQString &delegate ) { mDelegate = delegate; }
/**
Returns the delegate.
*/
- QString delegate() const { return mDelegate; }
+ TQString delegate() const { return mDelegate; }
/**
Sets the delegator.
*/
- void setDelegator( const QString &delegator ) { mDelegator = delegator; }
+ void setDelegator( const TQString &delegator ) { mDelegator = delegator; }
/**
Returns the delegator.
*/
- QString delegator() const { return mDelegator; }
+ TQString delegator() const { return mDelegator; }
private:
bool mRSVP;
Role mRole;
PartStat mStatus;
- QString mUid;
- QString mDelegate;
- QString mDelegator;
+ TQString mUid;
+ TQString mDelegate;
+ TQString mDelegator;
class Private;
Private *d;
diff --git a/libkcal/calendar.cpp b/libkcal/calendar.cpp
index 4c9e568a3..3d57e7546 100644
--- a/libkcal/calendar.cpp
+++ b/libkcal/calendar.cpp
@@ -40,7 +40,7 @@
using namespace KCal;
-Calendar::Calendar( const QString &timeZoneId )
+Calendar::Calendar( const TQString &timeZoneId )
{
mTimeZoneId = timeZoneId;
mLocalTime = false;
@@ -81,7 +81,7 @@ void Calendar::setOwner( const Person &owner )
setModified( true );
}
-void Calendar::setTimeZoneId( const QString &timeZoneId )
+void Calendar::setTimeZoneId( const TQString &timeZoneId )
{
mTimeZoneId = timeZoneId;
mLocalTime = false;
@@ -90,7 +90,7 @@ void Calendar::setTimeZoneId( const QString &timeZoneId )
doSetTimeZoneId( timeZoneId );
}
-QString Calendar::timeZoneId() const
+TQString Calendar::timeZoneId() const
{
return mTimeZoneId;
}
@@ -122,16 +122,16 @@ CalFilter *Calendar::filter()
return mFilter;
}
-QStringList Calendar::categories()
+TQStringList Calendar::categories()
{
Incidence::List rawInc( rawIncidences() );
- QStringList cats, thisCats;
+ TQStringList cats, thisCats;
// @TODO: For now just iterate over all incidences. In the future,
// the list of categories should be built when reading the file.
for ( Incidence::List::ConstIterator i = rawInc.constBegin();
i != rawInc.constEnd(); ++i ) {
thisCats = (*i)->categories();
- for ( QStringList::ConstIterator si = thisCats.constBegin();
+ for ( TQStringList::ConstIterator si = thisCats.constBegin();
si != thisCats.constEnd(); ++si ) {
if ( cats.find( *si ) == cats.end() ) {
cats.append( *si );
@@ -141,7 +141,7 @@ QStringList Calendar::categories()
return cats;
}
-Incidence::List Calendar::incidences( const QDate &date )
+Incidence::List Calendar::incidences( const TQDate &date )
{
return mergeIncidenceList( events( date ), todos( date ), journals( date ) );
}
@@ -248,7 +248,7 @@ Event::List Calendar::sortEvents( Event::List *eventList,
}
-Event::List Calendar::events( const QDate &date,
+Event::List Calendar::events( const TQDate &date,
EventSortField sortField,
SortDirection sortDirection )
{
@@ -257,14 +257,14 @@ Event::List Calendar::events( const QDate &date,
return el;
}
-Event::List Calendar::events( const QDateTime &qdt )
+Event::List Calendar::events( const TQDateTime &qdt )
{
Event::List el = rawEventsForDate( qdt );
mFilter->apply( &el );
return el;
}
-Event::List Calendar::events( const QDate &start, const QDate &end,
+Event::List Calendar::events( const TQDate &start, const TQDate &end,
bool inclusive)
{
Event::List el = rawEvents( start, end, inclusive );
@@ -301,7 +301,7 @@ bool Calendar::deleteIncidence( Incidence *incidence )
/** Dissociate a single occurrence or all future occurrences from a recurring sequence.
The new incidence is returned, but not automatically inserted into the calendar,
which is left to the calling application */
-Incidence *Calendar::dissociateOccurrence( Incidence *incidence, QDate date,
+Incidence *Calendar::dissociateOccurrence( Incidence *incidence, TQDate date,
bool single )
{
if ( !incidence || !incidence->doesRecur() )
@@ -332,7 +332,7 @@ Incidence *Calendar::dissociateOccurrence( Incidence *incidence, QDate date,
// Adjust the date of the incidence
if ( incidence->type() == "Event" ) {
Event *ev = static_cast<Event *>( newInc );
- QDateTime start( ev->dtStart() );
+ TQDateTime start( ev->dtStart() );
int daysTo = start.date().daysTo( date );
ev->setDtStart( start.addDays( daysTo ) );
ev->setDtEnd( ev->dtEnd().addDays( daysTo ) );
@@ -341,13 +341,13 @@ Incidence *Calendar::dissociateOccurrence( Incidence *incidence, QDate date,
bool haveOffset = false;
int daysTo = 0;
if ( td->hasDueDate() ) {
- QDateTime due( td->dtDue() );
+ TQDateTime due( td->dtDue() );
daysTo = due.date().daysTo( date );
td->setDtDue( due.addDays( daysTo ), true );
haveOffset = true;
}
if ( td->hasStartDate() ) {
- QDateTime start( td->dtStart() );
+ TQDateTime start( td->dtStart() );
if ( !haveOffset )
daysTo = start.date().daysTo( date );
td->setDtStart( start.addDays( daysTo ) );
@@ -367,7 +367,7 @@ Incidence *Calendar::dissociateOccurrence( Incidence *incidence, QDate date,
return newInc;
}
-Incidence *Calendar::incidence( const QString &uid )
+Incidence *Calendar::incidence( const TQString &uid )
{
Incidence *i = event( uid );
if ( i )
@@ -379,7 +379,7 @@ Incidence *Calendar::incidence( const QString &uid )
return i;
}
-Incidence::List Calendar::incidencesFromSchedulingID( const QString &UID )
+Incidence::List Calendar::incidencesFromSchedulingID( const TQString &UID )
{
Incidence::List result;
Incidence::List incidences = rawIncidences();
@@ -390,7 +390,7 @@ Incidence::List Calendar::incidencesFromSchedulingID( const QString &UID )
return result;
}
-Incidence *Calendar::incidenceFromSchedulingID( const QString &UID )
+Incidence *Calendar::incidenceFromSchedulingID( const TQString &UID )
{
Incidence::List incidences = rawIncidences();
Incidence::List::iterator it = incidences.begin();
@@ -554,7 +554,7 @@ Todo::List Calendar::todos( TodoSortField sortField,
return tl;
}
-Todo::List Calendar::todos( const QDate &date )
+Todo::List Calendar::todos( const TQDate &date )
{
Todo::List el = rawTodosForDate( date );
mFilter->apply( &el );
@@ -622,7 +622,7 @@ Journal::List Calendar::journals( JournalSortField sortField,
return jl;
}
-Journal::List Calendar::journals( const QDate &date )
+Journal::List Calendar::journals( const TQDate &date )
{
Journal::List el = rawJournalsForDate( date );
mFilter->apply( &el );
@@ -635,7 +635,7 @@ void Calendar::setupRelations( Incidence *forincidence )
{
if ( !forincidence ) return;
// kdDebug(5850) << "Calendar::setupRelations for incidence " << forincidence << " with UID " << forincidence->uid() << ", summary: " << forincidence->summary() << endl;
- QString uid = forincidence->uid();
+ TQString uid = forincidence->uid();
// First, go over the list of orphans and see if this is their parent
while ( Incidence* i = mOrphans[ uid ] ) {
@@ -673,7 +673,7 @@ void Calendar::removeRelations( Incidence *incidence )
}
// kdDebug(5850) << "Calendar::removeRelations for incidence " << forincidence << " with UID " << forincidence->uid() << ", summary: " << forincidence->summary() << endl;
- QString uid = incidence->uid();
+ TQString uid = incidence->uid();
Incidence::List relations = incidence->relations();
Incidence::List::ConstIterator it;
@@ -702,17 +702,17 @@ void Calendar::removeRelations( Incidence *incidence )
// incidence (this might happen when the relatedTo of the item is
// changed before its parent is inserted. This might happen with
// groupware servers....). Remove them, too
- QStringList relatedToUids;
+ TQStringList relatedToUids;
// First get the list of all keys in the mOrphans list that point to the removed item
relatedToUids << incidence->relatedToUid();
- for ( QDictIterator<Incidence> it( mOrphans ); it.current(); ++it ) {
+ for ( TQDictIterator<Incidence> it( mOrphans ); it.current(); ++it ) {
if ( it.current()->uid() == uid ) {
relatedToUids << it.currentKey();
}
}
// now go through all uids that have one entry that point to the incidence
- for ( QStringList::Iterator uidit = relatedToUids.begin();
+ for ( TQStringList::Iterator uidit = relatedToUids.begin();
uidit != relatedToUids.end(); ++uidit ) {
Incidence::List tempList;
// Remove all to get access to the remaining entries
@@ -757,7 +757,7 @@ void Calendar::setModified( bool modified )
void Calendar::incidenceUpdated( IncidenceBase *incidence )
{
incidence->setSyncStatus( Event::SYNCMOD );
- incidence->setLastModified( QDateTime::currentDateTime() );
+ incidence->setLastModified( TQDateTime::currentDateTime() );
// we should probably update the revision number here,
// or internally in the Event itself when certain things change.
// need to verify with ical documentation.
@@ -809,12 +809,12 @@ void Calendar::customPropertyUpdated()
setModified( true );
}
-void Calendar::setProductId( const QString &productId )
+void Calendar::setProductId( const TQString &productId )
{
mProductId = productId;
}
-QString Calendar::productId()
+TQString Calendar::productId()
{
return mProductId;
}
diff --git a/libkcal/calendar.h b/libkcal/calendar.h
index bfcf4c8ad..4c6c0f988 100644
--- a/libkcal/calendar.h
+++ b/libkcal/calendar.h
@@ -31,11 +31,11 @@
#ifndef KCAL_CALENDAR_H
#define KCAL_CALENDAR_H
-#include <qobject.h>
-#include <qstring.h>
-#include <qdatetime.h>
-#include <qptrlist.h>
-#include <qdict.h>
+#include <tqobject.h>
+#include <tqstring.h>
+#include <tqdatetime.h>
+#include <tqptrlist.h>
+#include <tqdict.h>
#include <kdepimmacros.h>
#include "customproperties.h"
@@ -164,7 +164,7 @@ enum JournalSortField
- Depending on the LocalTime setting, all loaded Incidences are stored
either in UTC or without a time zone (floating time zone).
*/
-class LIBKCAL_EXPORT Calendar : public QObject, public CustomProperties,
+class LIBKCAL_EXPORT Calendar : public TQObject, public CustomProperties,
public IncidenceBase::Observer
{
Q_OBJECT
@@ -185,7 +185,7 @@ class LIBKCAL_EXPORT Calendar : public QObject, public CustomProperties,
Do Not pass an empty timeZoneId string as this may cause unintended
consequences when storing Incidences into the Calendar.
*/
- Calendar( const QString &timeZoneId );
+ Calendar( const TQString &timeZoneId );
/**
Destructor
@@ -195,16 +195,16 @@ class LIBKCAL_EXPORT Calendar : public QObject, public CustomProperties,
/**
Set the Calendar Product ID.
- @param productId is a QString containing the Product ID.
+ @param productId is a TQString containing the Product ID.
*/
- void setProductId( const QString &productId );
+ void setProductId( const TQString &productId );
/**
Get the Calendar's Product ID.
@return the string containing the Product ID
*/
- QString productId();
+ TQString productId();
/**
Set the owner of the Calendar.
@@ -234,7 +234,7 @@ class LIBKCAL_EXPORT Calendar : public QObject, public CustomProperties,
Do Not pass an empty timeZoneId string as this may cause unintended
consequences when storing Incidences into the Calendar.
*/
- void setTimeZoneId( const QString &timeZoneId );
+ void setTimeZoneId( const TQString &timeZoneId );
/**
* Set the timezone used for viewing the incidences in this calendar. In
@@ -242,14 +242,14 @@ class LIBKCAL_EXPORT Calendar : public QObject, public CustomProperties,
* retain their absolute time (in UTC).
* @ref setTimeZoneId
*/
- virtual void setTimeZoneIdViewOnly( const QString &timeZoneId ) = 0;
+ virtual void setTimeZoneIdViewOnly( const TQString &timeZoneId ) = 0;
/**
Get the Time Zone ID for the Calendar.
@return the string containg the Time Zone ID.
*/
- QString timeZoneId() const;
+ TQString timeZoneId() const;
/**
Set to store calendar Incidences without a time zone.
@@ -294,7 +294,7 @@ class LIBKCAL_EXPORT Calendar : public QObject, public CustomProperties,
* once before, in other words initialized.
* @par tz The timezone to use for loading.
*/
- virtual bool reload( const QString &tz ) = 0;
+ virtual bool reload( const TQString &tz ) = 0;
/**
Determine if the Calendar is currently being saved.
@@ -306,9 +306,9 @@ class LIBKCAL_EXPORT Calendar : public QObject, public CustomProperties,
/**
Return a list of all categories used by Incidences in this Calendar.
- @return a QStringList containing all the categories.
+ @return a TQStringList containing all the categories.
*/
- QStringList categories();
+ TQStringList categories();
// Incidence Specific Methods //
@@ -340,11 +340,11 @@ class LIBKCAL_EXPORT Calendar : public QObject, public CustomProperties,
/**
Return a filtered list of all Incidences which occur on the given date.
- @param date request filtered Incidence list for this QDate only.
+ @param date request filtered Incidence list for this TQDate only.
@return the list of filtered Incidences occurring on the specified date.
*/
- virtual Incidence::List incidences( const QDate &date );
+ virtual Incidence::List incidences( const TQDate &date );
/**
Return an unfiltered list of all Incidences for this Calendar.
@@ -361,7 +361,7 @@ class LIBKCAL_EXPORT Calendar : public QObject, public CustomProperties,
@return a pointer to the Incidence.
A null pointer is returned if no such Incidence exists.
*/
- Incidence *incidence( const QString &uid );
+ Incidence *incidence( const TQString &uid );
/**
Returns the Incidence associated with the given scheduling identifier.
@@ -371,13 +371,13 @@ class LIBKCAL_EXPORT Calendar : public QObject, public CustomProperties,
@return a pointer to the Incidence.
A null pointer is returned if no such Incidence exists.
*/
- Incidence *incidenceFromSchedulingID( const QString &sid );
+ Incidence *incidenceFromSchedulingID( const TQString &sid );
/**
* Searches all events and todos for (an incidence with this
* scheduling ID. Returns a list of matching results.
**/
- Incidence::List incidencesFromSchedulingID( const QString &UID );
+ Incidence::List incidencesFromSchedulingID( const TQString &UID );
/**
Create a merged list of Events, Todos, and Journals.
@@ -415,14 +415,14 @@ class LIBKCAL_EXPORT Calendar : public QObject, public CustomProperties,
will have all recurrences past the @a date.
@param incidence is a pointer to a recurring Incidence.
- @param date is the QDate within the recurring Incidence on which
+ @param date is the TQDate within the recurring Incidence on which
the dissociation will be performed.
@param single is a flag meaning that a new Incidence should be created
from the recurring Incidences after @a date.
@return a pointer to a new recurring Incidence if @a single is false.
*/
- Incidence *dissociateOccurrence( Incidence *incidence, QDate date,
+ Incidence *dissociateOccurrence( Incidence *incidence, TQDate date,
bool single = true );
// Event Specific Methods //
@@ -472,11 +472,11 @@ class LIBKCAL_EXPORT Calendar : public QObject, public CustomProperties,
/**
Return a filtered list of all Events which occur on the given timestamp.
- @param qdt request filtered Event list for this QDateTime only.
+ @param qdt request filtered Event list for this TQDateTime only.
@return the list of filtered Events occurring on the specified timestamp.
*/
- Event::List events( const QDateTime &qdt );
+ Event::List events( const TQDateTime &qdt );
/**
Return a filtered list of all Events occurring within a date range.
@@ -489,7 +489,7 @@ class LIBKCAL_EXPORT Calendar : public QObject, public CustomProperties,
@return the list of filtered Events occurring within the specified
date range.
*/
- Event::List events( const QDate &start, const QDate &end,
+ Event::List events( const TQDate &start, const TQDate &end,
bool inclusive = false);
/**
@@ -497,14 +497,14 @@ class LIBKCAL_EXPORT Calendar : public QObject, public CustomProperties,
date. The Events are sorted according to @a sortField and
@a sortDirection.
- @param date request filtered Event list for this QDate only.
+ @param date request filtered Event list for this TQDate only.
@param sortField specifies the EventSortField.
@param sortDirection specifies the SortDirection.
@return the list of sorted, filtered Events occurring on @a date.
*/
Event::List events(
- const QDate &date,
+ const TQDate &date,
EventSortField sortField = EventSortUnsorted,
SortDirection sortDirection = SortDirectionAscending );
@@ -524,12 +524,12 @@ class LIBKCAL_EXPORT Calendar : public QObject, public CustomProperties,
Return an unfiltered list of all Events which occur on the given
timestamp.
- @param qdt request unfiltered Event list for this QDateTime only.
+ @param qdt request unfiltered Event list for this TQDateTime only.
@return the list of unfiltered Events occurring on the specified
timestamp.
*/
- virtual Event::List rawEventsForDate( const QDateTime &qdt ) = 0;
+ virtual Event::List rawEventsForDate( const TQDateTime &qdt ) = 0;
/**
Return an unfiltered list of all Events occurring within a date range.
@@ -542,7 +542,7 @@ class LIBKCAL_EXPORT Calendar : public QObject, public CustomProperties,
@return the list of unfiltered Events occurring within the specified
date range.
*/
- virtual Event::List rawEvents( const QDate &start, const QDate &end,
+ virtual Event::List rawEvents( const TQDate &start, const TQDate &end,
bool inclusive = false ) = 0;
/**
@@ -550,14 +550,14 @@ class LIBKCAL_EXPORT Calendar : public QObject, public CustomProperties,
date. The Events are sorted according to @a sortField and
@a sortDirection.
- @param date request unfiltered Event list for this QDate only.
+ @param date request unfiltered Event list for this TQDate only.
@param sortField specifies the EventSortField.
@param sortDirection specifies the SortDirection.
@return the list of sorted, unfiltered Events occurring on @a date.
*/
virtual Event::List rawEventsForDate(
- const QDate &date,
+ const TQDate &date,
EventSortField sortField = EventSortUnsorted,
SortDirection sortDirection = SortDirectionAscending ) = 0;
@@ -569,7 +569,7 @@ class LIBKCAL_EXPORT Calendar : public QObject, public CustomProperties,
@return a pointer to the Event.
A null pointer is returned if no such Event exists.
*/
- virtual Event *event( const QString &uid ) = 0;
+ virtual Event *event( const TQString &uid ) = 0;
// Todo Specific Methods //
@@ -619,11 +619,11 @@ class LIBKCAL_EXPORT Calendar : public QObject, public CustomProperties,
/**
Return a filtered list of all Todos which are due on the specified date.
- @param date request filtered Todos due on this QDate.
+ @param date request filtered Todos due on this TQDate.
@return the list of filtered Todos due on the specified date.
*/
- virtual Todo::List todos( const QDate &date );
+ virtual Todo::List todos( const TQDate &date );
/**
Return a sorted, unfiltered list of all Todos for this Calendar.
@@ -640,11 +640,11 @@ class LIBKCAL_EXPORT Calendar : public QObject, public CustomProperties,
/**
Return an unfiltered list of all Todos which due on the specified date.
- @param date request unfiltered Todos due on this QDate.
+ @param date request unfiltered Todos due on this TQDate.
@return the list of unfiltered Todos due on the specified date.
*/
- virtual Todo::List rawTodosForDate( const QDate &date ) = 0;
+ virtual Todo::List rawTodosForDate( const TQDate &date ) = 0;
/**
Returns the Todo associated with the given unique identifier.
@@ -654,7 +654,7 @@ class LIBKCAL_EXPORT Calendar : public QObject, public CustomProperties,
@return a pointer to the Todo.
A null pointer is returned if no such Todo exists.
*/
- virtual Todo *todo( const QString &uid ) = 0;
+ virtual Todo *todo( const TQString &uid ) = 0;
// Journal Specific Methods //
@@ -703,11 +703,11 @@ class LIBKCAL_EXPORT Calendar : public QObject, public CustomProperties,
/**
Return a filtered list of all Journals for on the specifed date.
- @param date request filtered Journals for this QDate only.
+ @param date request filtered Journals for this TQDate only.
@return the list of filtered Journals for the specified date.
*/
- virtual Journal::List journals( const QDate &date );
+ virtual Journal::List journals( const TQDate &date );
/**
Return a sorted, unfiltered list of all Journals for this Calendar.
@@ -724,11 +724,11 @@ class LIBKCAL_EXPORT Calendar : public QObject, public CustomProperties,
/**
Return an unfiltered list of all Journals for on the specifed date.
- @param date request unfiltered Journals for this QDate only.
+ @param date request unfiltered Journals for this TQDate only.
@return the list of unfiltered Journals for the specified date.
*/
- virtual Journal::List rawJournalsForDate( const QDate &date ) = 0;
+ virtual Journal::List rawJournalsForDate( const TQDate &date ) = 0;
/**
Returns the Journal associated with the given unique identifier.
@@ -738,7 +738,7 @@ class LIBKCAL_EXPORT Calendar : public QObject, public CustomProperties,
@return a pointer to the Journal.
A null pointer is returned if no such Journal exists.
*/
- virtual Journal *journal( const QString &uid ) = 0;
+ virtual Journal *journal( const TQString &uid ) = 0;
// Relations Specific Methods //
@@ -786,8 +786,8 @@ class LIBKCAL_EXPORT Calendar : public QObject, public CustomProperties,
@return the list of Alarms for the for the specified time range.
*/
- virtual Alarm::List alarms( const QDateTime &from,
- const QDateTime &to ) = 0;
+ virtual Alarm::List alarms( const TQDateTime &from,
+ const TQDateTime &to ) = 0;
// Observer Specific Methods //
@@ -884,7 +884,7 @@ class LIBKCAL_EXPORT Calendar : public QObject, public CustomProperties,
Do Not pass an empty timeZoneId string as this may cause unintended
consequences when storing Incidences into the Calendar.
*/
- virtual void doSetTimeZoneId( const QString &/*timeZoneId*/ ) {}
+ virtual void doSetTimeZoneId( const TQString &/*timeZoneId*/ ) {}
/**
Let Calendar subclasses notify that they inserted an Incidence.
@@ -931,9 +931,9 @@ class LIBKCAL_EXPORT Calendar : public QObject, public CustomProperties,
*/
void init();
- QString mProductId;
+ TQString mProductId;
Person mOwner;
- QString mTimeZoneId;
+ TQString mTimeZoneId;
bool mLocalTime;
bool mModified;
@@ -941,13 +941,13 @@ class LIBKCAL_EXPORT Calendar : public QObject, public CustomProperties,
CalFilter *mFilter;
CalFilter *mDefaultFilter;
- QPtrList<Observer> mObservers;
+ TQPtrList<Observer> mObservers;
bool mNewObserver;
bool mObserversEnabled;
// This list is used to put together related Todos
- QDict<Incidence> mOrphans;
- QDict<Incidence> mOrphanUids;
+ TQDict<Incidence> mOrphans;
+ TQDict<Incidence> mOrphanUids;
class Private;
Private *d;
diff --git a/libkcal/calendarlocal.cpp b/libkcal/calendarlocal.cpp
index a37488f6f..39c48ae4b 100644
--- a/libkcal/calendarlocal.cpp
+++ b/libkcal/calendarlocal.cpp
@@ -21,9 +21,9 @@
Boston, MA 02110-1301, USA.
*/
-#include <qdatetime.h>
-#include <qstring.h>
-#include <qptrlist.h>
+#include <tqdatetime.h>
+#include <tqstring.h>
+#include <tqptrlist.h>
#include <kdebug.h>
#include <klocale.h>
@@ -41,7 +41,7 @@
using namespace KCal;
-CalendarLocal::CalendarLocal( const QString &timeZoneId )
+CalendarLocal::CalendarLocal( const TQString &timeZoneId )
: Calendar( timeZoneId ), mEvents( 47 )
{
init();
@@ -50,7 +50,7 @@ CalendarLocal::CalendarLocal( const QString &timeZoneId )
void CalendarLocal::init()
{
mDeletedIncidences.setAutoDelete( true );
- mFileName = QString::null;
+ mFileName = TQString::null;
}
@@ -59,16 +59,16 @@ CalendarLocal::~CalendarLocal()
close();
}
-bool CalendarLocal::load( const QString &fileName, CalFormat *format )
+bool CalendarLocal::load( const TQString &fileName, CalFormat *format )
{
mFileName = fileName;
FileStorage storage( this, fileName, format );
return storage.load();
}
-bool CalendarLocal::reload( const QString &tz )
+bool CalendarLocal::reload( const TQString &tz )
{
- const QString filename = mFileName;
+ const TQString filename = mFileName;
save();
close();
mFileName = filename;
@@ -77,7 +77,7 @@ bool CalendarLocal::reload( const QString &tz )
return storage.load();
}
-bool CalendarLocal::save( const QString &fileName, CalFormat *format )
+bool CalendarLocal::save( const TQString &fileName, CalFormat *format )
{
// Save only if the calendar is either modified, or saved to a
// different file than it was loaded from
@@ -92,7 +92,7 @@ bool CalendarLocal::save( const QString &fileName, CalFormat *format )
void CalendarLocal::close()
{
setObserversEnabled( false );
- mFileName = QString::null;
+ mFileName = TQString::null;
deleteAllEvents();
deleteAllTodos();
@@ -136,7 +136,7 @@ bool CalendarLocal::deleteEvent( Event *event )
void CalendarLocal::deleteAllEvents()
{
// kdDebug(5800) << "CalendarLocal::deleteAllEvents" << endl;
- QDictIterator<Event> it( mEvents );
+ TQDictIterator<Event> it( mEvents );
while( it.current() ) {
notifyIncidenceDeleted( it.current() );
++it;
@@ -147,7 +147,7 @@ void CalendarLocal::deleteAllEvents()
mEvents.setAutoDelete( false );
}
-Event *CalendarLocal::event( const QString &uid )
+Event *CalendarLocal::event( const TQString &uid )
{
// kdDebug(5800) << "CalendarLocal::event(): " << uid << endl;
return mEvents[ uid ];
@@ -204,7 +204,7 @@ Todo::List CalendarLocal::rawTodos( TodoSortField sortField,
return sortTodos( &mTodoList, sortField, sortDirection );
}
-Todo *CalendarLocal::todo( const QString &uid )
+Todo *CalendarLocal::todo( const TQString &uid )
{
Todo::List::ConstIterator it;
for ( it = mTodoList.begin(); it != mTodoList.end(); ++it ) {
@@ -214,7 +214,7 @@ Todo *CalendarLocal::todo( const QString &uid )
return 0;
}
-Todo::List CalendarLocal::rawTodosForDate( const QDate &date )
+Todo::List CalendarLocal::rawTodosForDate( const TQDate &date )
{
Todo::List todos;
@@ -229,12 +229,12 @@ Todo::List CalendarLocal::rawTodosForDate( const QDate &date )
return todos;
}
-Alarm::List CalendarLocal::alarmsTo( const QDateTime &to )
+Alarm::List CalendarLocal::alarmsTo( const TQDateTime &to )
{
- return alarms( QDateTime( QDate( 1900, 1, 1 ) ), to );
+ return alarms( TQDateTime( TQDate( 1900, 1, 1 ) ), to );
}
-Alarm::List CalendarLocal::alarms( const QDateTime &from, const QDateTime &to )
+Alarm::List CalendarLocal::alarms( const TQDateTime &from, const TQDateTime &to )
{
// kdDebug(5800) << "CalendarLocal::alarms(" << from.toString() << " - "
// << to.toString() << ")" << endl;
@@ -257,14 +257,14 @@ Alarm::List CalendarLocal::alarms( const QDateTime &from, const QDateTime &to )
}
void CalendarLocal::appendAlarms( Alarm::List &alarms, Incidence *incidence,
- const QDateTime &from, const QDateTime &to )
+ const TQDateTime &from, const TQDateTime &to )
{
- QDateTime preTime = from.addSecs(-1);
+ TQDateTime preTime = from.addSecs(-1);
Alarm::List::ConstIterator it;
for( it = incidence->alarms().begin(); it != incidence->alarms().end();
++it ) {
if ( (*it)->enabled() ) {
- QDateTime dt = (*it)->nextRepetition(preTime);
+ TQDateTime dt = (*it)->nextRepetition(preTime);
if ( dt.isValid() && dt <= to ) {
kdDebug(5800) << "CalendarLocal::appendAlarms() '"
<< incidence->summary() << "': "
@@ -277,10 +277,10 @@ void CalendarLocal::appendAlarms( Alarm::List &alarms, Incidence *incidence,
void CalendarLocal::appendRecurringAlarms( Alarm::List &alarms,
Incidence *incidence,
- const QDateTime &from,
- const QDateTime &to )
+ const TQDateTime &from,
+ const TQDateTime &to )
{
- QDateTime qdt;
+ TQDateTime qdt;
int endOffset = 0;
bool endOffsetValid = false;
int period = from.secsTo(to);
@@ -353,7 +353,7 @@ void CalendarLocal::appendRecurringAlarms( Alarm::List &alarms,
void CalendarLocal::incidenceUpdated( IncidenceBase *incidence )
{
incidence->setSyncStatusSilent( Event::SYNCMOD );
- incidence->setLastModified( QDateTime::currentDateTime() );
+ incidence->setLastModified( TQDateTime::currentDateTime() );
// we should probably update the revision number here,
// or internally in the Event itself when certain things change.
// need to verify with ical documentation.
@@ -366,7 +366,7 @@ void CalendarLocal::incidenceUpdated( IncidenceBase *incidence )
void CalendarLocal::insertEvent( Event *event )
{
- QString uid = event->uid();
+ TQString uid = event->uid();
if ( mEvents[ uid ] == 0 ) {
mEvents.insert( uid, event );
}
@@ -377,7 +377,7 @@ void CalendarLocal::insertEvent( Event *event )
#endif
}
-Event::List CalendarLocal::rawEventsForDate( const QDate &qd,
+Event::List CalendarLocal::rawEventsForDate( const TQDate &qd,
EventSortField sortField,
SortDirection sortDirection )
{
@@ -411,18 +411,18 @@ Event::List CalendarLocal::rawEventsForDate( const QDate &qd,
return sortEvents( &eventList, sortField, sortDirection );
}
-Event::List CalendarLocal::rawEvents( const QDate &start, const QDate &end,
+Event::List CalendarLocal::rawEvents( const TQDate &start, const TQDate &end,
bool inclusive )
{
Event::List eventList;
- QDate yesterStart = start.addDays(-1);
+ TQDate yesterStart = start.addDays(-1);
// Get non-recurring events
EventDictIterator it( mEvents );
for( ; it.current(); ++it ) {
Event *event = *it;
- QDate rStart = event->dtStart().date();
+ TQDate rStart = event->dtStart().date();
if (end < rStart) {
// kdDebug(5800) << "Skipping event starting after TOI" << endl;
continue;
@@ -433,7 +433,7 @@ Event::List CalendarLocal::rawEvents( const QDate &start, const QDate &end,
}
if ( ! event->doesRecur() ) { // non-recurring events
- QDate rEnd = event->dtEnd().date();
+ TQDate rEnd = event->dtEnd().date();
if (rEnd < start) {
// kdDebug(5800) << "Skipping event ending before TOI" << endl;
continue;
@@ -452,7 +452,7 @@ Event::List CalendarLocal::rawEvents( const QDate &start, const QDate &end,
break;
case 0: // end date given
default: // count given
- QDate rEnd = event->recurrence()->endDate();
+ TQDate rEnd = event->recurrence()->endDate();
if ( ! rEnd.isValid() ) {
// kdDebug(5800) << "Skipping recurring event without occurences" << endl;
continue;
@@ -465,10 +465,10 @@ Event::List CalendarLocal::rawEvents( const QDate &start, const QDate &end,
// kdDebug(5800) << "Skipping recurring event ending after TOI while inclusive" << endl;
continue;
}
- /* FIXME: too much conversion between QDate and QDateTime makes this useless:
- * freebusy(end=QDateTime(day, "00:00:00")) ->
- * rawEvents(end=QDate(day)) ->
- * durationTo(QDateTime(day, "23:59:59"))
+ /* FIXME: too much conversion between TQDate and TQDateTime makes this useless:
+ * freebusy(end=TQDateTime(day, "00:00:00")) ->
+ * rawEvents(end=TQDate(day)) ->
+ * durationTo(TQDateTime(day, "23:59:59"))
* so events repeating at the end day match and are included.
*/
#if 0
@@ -489,7 +489,7 @@ Event::List CalendarLocal::rawEvents( const QDate &start, const QDate &end,
return eventList;
}
-Event::List CalendarLocal::rawEventsForDate( const QDateTime &qdt )
+Event::List CalendarLocal::rawEventsForDate( const TQDateTime &qdt )
{
return rawEventsForDate( qdt.date() );
}
@@ -546,7 +546,7 @@ void CalendarLocal::deleteAllJournals()
mJournalList.setAutoDelete( false );
}
-Journal *CalendarLocal::journal( const QString &uid )
+Journal *CalendarLocal::journal( const TQString &uid )
{
Journal::List::ConstIterator it;
for ( it = mJournalList.begin(); it != mJournalList.end(); ++it )
@@ -561,7 +561,7 @@ Journal::List CalendarLocal::rawJournals( JournalSortField sortField, SortDirect
return sortJournals( &mJournalList, sortField, sortDirection );
}
-Journal::List CalendarLocal::rawJournalsForDate( const QDate &date )
+Journal::List CalendarLocal::rawJournalsForDate( const TQDate &date )
{
Journal::List journals;
@@ -576,9 +576,9 @@ Journal::List CalendarLocal::rawJournalsForDate( const QDate &date )
return journals;
}
-void CalendarLocal::setTimeZoneIdViewOnly( const QString& tz )
+void CalendarLocal::setTimeZoneIdViewOnly( const TQString& tz )
{
- const QString question( i18n("The timezone setting was changed. In order to display the calendar "
+ const TQString question( i18n("The timezone setting was changed. In order to display the calendar "
"you are looking at in the new timezone, it needs to be saved. Do you want to save the pending "
"changes or rather wait and apply the new timezone on the next reload?" ) );
int rc = KMessageBox::Yes;
diff --git a/libkcal/calendarlocal.h b/libkcal/calendarlocal.h
index 99bc76c2f..b76eb5ab4 100644
--- a/libkcal/calendarlocal.h
+++ b/libkcal/calendarlocal.h
@@ -23,7 +23,7 @@
#define KCAL_CALENDARLOCAL_H
#include "calendar.h"
-#include <qdict.h>
+#include <tqdict.h>
#include <kdepimmacros.h>
namespace KCal {
@@ -39,7 +39,7 @@ class LIBKCAL_EXPORT CalendarLocal : public Calendar
/**
Constructs a new calendar, with variables initialized to sane values.
*/
- CalendarLocal( const QString &timeZoneId );
+ CalendarLocal( const TQString &timeZoneId );
~CalendarLocal();
/**
@@ -55,14 +55,14 @@ class LIBKCAL_EXPORT CalendarLocal : public Calendar
@param fileName the name of the calendar on disk.
@param format the format to use. If 0, iCalendar and vCalendar will be used
*/
- bool load( const QString &fileName, CalFormat *format = 0 );
+ bool load( const TQString &fileName, CalFormat *format = 0 );
/**
* Reloads the contents of the storage into memory. The associated file name
* must be known, in other words a previous load() must have been executed.
* @return success or failure
*/
- bool reload( const QString &tz );
+ bool reload( const TQString &tz );
/**
Writes out the calendar to disk in the specified \a format.
@@ -71,7 +71,7 @@ class LIBKCAL_EXPORT CalendarLocal : public Calendar
@param format the format to use
@return true, if successful, false on error.
*/
- bool save( const QString &fileName, CalFormat *format = 0 );
+ bool save( const TQString &fileName, CalFormat *format = 0 );
/**
Clears out the current calendar, freeing all used memory etc. etc.
@@ -96,7 +96,7 @@ class LIBKCAL_EXPORT CalendarLocal : public Calendar
/**
Retrieves an event on the basis of the unique string ID.
*/
- Event *event( const QString &uid );
+ Event *event( const TQString &uid );
/**
Return unfiltered list of all events in calendar.
*/
@@ -118,7 +118,7 @@ class LIBKCAL_EXPORT CalendarLocal : public Calendar
Searches todolist for an event with this unique string identifier,
returns a pointer or null.
*/
- Todo *todo( const QString &uid );
+ Todo *todo( const TQString &uid );
/**
Return list of all todos.
*/
@@ -126,7 +126,7 @@ class LIBKCAL_EXPORT CalendarLocal : public Calendar
/**
Returns list of todos due on the specified date.
*/
- Todo::List rawTodosForDate( const QDate &date );
+ Todo::List rawTodosForDate( const TQDate &date );
/**
Add a Journal entry to calendar.
@@ -143,7 +143,7 @@ class LIBKCAL_EXPORT CalendarLocal : public Calendar
/**
Return Journal with given UID.
*/
- Journal *journal( const QString &uid );
+ Journal *journal( const TQString &uid );
/**
Return list of all journals.
*/
@@ -151,27 +151,27 @@ class LIBKCAL_EXPORT CalendarLocal : public Calendar
/**
Get unfiltered journals for a given date.
*/
- Journal::List rawJournalsForDate( const QDate &date );
+ Journal::List rawJournalsForDate( const TQDate &date );
/**
Return all alarms, which ocur in the given time interval.
*/
- Alarm::List alarms( const QDateTime &from, const QDateTime &to );
+ Alarm::List alarms( const TQDateTime &from, const TQDateTime &to );
/**
Return all alarms, which ocur before given date.
*/
- Alarm::List alarmsTo( const QDateTime &to );
+ Alarm::List alarmsTo( const TQDateTime &to );
/**
Builds and then returns a list of all events that match for the
date specified. useful for dayView, etc. etc.
*/
- Event::List rawEventsForDate( const QDate &date, EventSortField sortField = EventSortUnsorted, SortDirection sortDirection = SortDirectionAscending );
+ Event::List rawEventsForDate( const TQDate &date, EventSortField sortField = EventSortUnsorted, SortDirection sortDirection = SortDirectionAscending );
/**
Get unfiltered events for date \a qdt.
*/
- Event::List rawEventsForDate( const QDateTime &qdt );
+ Event::List rawEventsForDate( const TQDateTime &qdt );
/**
Get unfiltered events in a range of dates. If inclusive is set to true,
only events are returned, which are completely included in the range.
@@ -181,7 +181,7 @@ class LIBKCAL_EXPORT CalendarLocal : public Calendar
from its start to its end date. For a recurring event, its time span is
from its first to its last recurrence.
*/
- Event::List rawEvents( const QDate &start, const QDate &end,
+ Event::List rawEvents( const TQDate &start, const TQDate &end,
bool inclusive = false );
/**
@@ -189,7 +189,7 @@ class LIBKCAL_EXPORT CalendarLocal : public Calendar
* in the calendar. This requires that the calendar is saved first, so the
* user is asked whether he wants to do that, or keep the timezone as is.
*/
- void setTimeZoneIdViewOnly( const QString& tz );
+ void setTimeZoneIdViewOnly( const TQString& tz );
protected:
@@ -201,23 +201,23 @@ class LIBKCAL_EXPORT CalendarLocal : public Calendar
/** Append alarms of incidence in interval to list of alarms. */
void appendAlarms( Alarm::List &alarms, Incidence *incidence,
- const QDateTime &from, const QDateTime &to );
+ const TQDateTime &from, const TQDateTime &to );
/** Append alarms of recurring events in interval to list of alarms. */
void appendRecurringAlarms( Alarm::List &alarms, Incidence *incidence,
- const QDateTime &from, const QDateTime &to );
+ const TQDateTime &from, const TQDateTime &to );
private:
void init();
- typedef QDict<Event> EventDict;
- typedef QDictIterator<Event> EventDictIterator;
+ typedef TQDict<Event> EventDict;
+ typedef TQDictIterator<Event> EventDictIterator;
EventDict mEvents;
Todo::List mTodoList;
Journal::List mJournalList;
Incidence::List mDeletedIncidences;
- QString mFileName;
+ TQString mFileName;
class Private;
Private *d;
diff --git a/libkcal/calendarnull.cpp b/libkcal/calendarnull.cpp
index cef2588c0..f4b07789c 100644
--- a/libkcal/calendarnull.cpp
+++ b/libkcal/calendarnull.cpp
@@ -28,7 +28,7 @@
using namespace KCal;
-CalendarNull::CalendarNull( const QString &timeZoneId )
+CalendarNull::CalendarNull( const TQString &timeZoneId )
: Calendar( timeZoneId )
{}
@@ -36,7 +36,7 @@ CalendarNull *CalendarNull::mSelf = 0;
CalendarNull *CalendarNull::self()
{
- if ( !mSelf ) mSelf = new CalendarNull( QString::fromLatin1( "UTC" ) );
+ if ( !mSelf ) mSelf = new CalendarNull( TQString::fromLatin1( "UTC" ) );
return mSelf;
}
diff --git a/libkcal/calendarnull.h b/libkcal/calendarnull.h
index 6f27ed52a..d6c758442 100644
--- a/libkcal/calendarnull.h
+++ b/libkcal/calendarnull.h
@@ -53,7 +53,7 @@ class LIBKCAL_EXPORT CalendarNull : public Calendar
/**
Constructor.
*/
- CalendarNull( const QString &timeZoneId );
+ CalendarNull( const TQString &timeZoneId );
/**
Destructor.
@@ -76,7 +76,7 @@ class LIBKCAL_EXPORT CalendarNull : public Calendar
*/
void save() {}
- bool reload( const QString & ) { return true;}
+ bool reload( const TQString & ) { return true;}
// Event Specific Methods //
@@ -122,7 +122,7 @@ class LIBKCAL_EXPORT CalendarNull : public Calendar
Returns an empty Event List.
*/
- Event::List rawEvents( const QDate & /*start*/, const QDate & /*end*/,
+ Event::List rawEvents( const TQDate & /*start*/, const TQDate & /*end*/,
bool /*inclusive*/ )
{ return Event::List(); }
@@ -130,11 +130,11 @@ class LIBKCAL_EXPORT CalendarNull : public Calendar
Return an unfiltered list of all Events which occur on the given
timestamp.
- First parameter is a QDateTime to return unfiltered events for.
+ First parameter is a TQDateTime to return unfiltered events for.
Returns an empty Event List.
*/
- Event::List rawEventsForDate( const QDateTime & /*qdt*/ )
+ Event::List rawEventsForDate( const TQDateTime & /*qdt*/ )
{ return Event::List(); }
/**
@@ -142,14 +142,14 @@ class LIBKCAL_EXPORT CalendarNull : public Calendar
date. The Events are sorted according to @a sortField and
@a sortDirection.
- First parameter is a QDate to return unfiltered Events for.\n
+ First parameter is a TQDate to return unfiltered Events for.\n
Second parameter specifies the EventSortField.\n
Third parameter specifies the SortDirection.
Returns an empty Event List.
*/
Event::List rawEventsForDate(
- const QDate & /*date*/,
+ const TQDate & /*date*/,
EventSortField /*sortField=EventSortUnsorted*/,
SortDirection /*sortDirection=SortDirectionAscending*/ )
{ return Event::List(); }
@@ -161,7 +161,7 @@ class LIBKCAL_EXPORT CalendarNull : public Calendar
Return a null Event pointer.
*/
- Event *event( const QString & /*uid*/ )
+ Event *event( const TQString & /*uid*/ )
{ return 0; }
// Todo Specific Methods //
@@ -206,7 +206,7 @@ class LIBKCAL_EXPORT CalendarNull : public Calendar
Returns an empty Todo List.
*/
- Todo::List rawTodosForDate( const QDate & /*date*/ )
+ Todo::List rawTodosForDate( const TQDate & /*date*/ )
{ return Todo::List(); }
/**
@@ -216,7 +216,7 @@ class LIBKCAL_EXPORT CalendarNull : public Calendar
Returns a null Todo pointer.
*/
- Todo *todo( const QString & /*uid*/ )
+ Todo *todo( const TQString & /*uid*/ )
{ return 0; }
// Journal Specific Methods //
@@ -260,7 +260,7 @@ class LIBKCAL_EXPORT CalendarNull : public Calendar
Returns an empty Journal List.
*/
- Journal::List rawJournalsForDate( const QDate & /*date*/ )
+ Journal::List rawJournalsForDate( const TQDate & /*date*/ )
{ return Journal::List(); }
/**
@@ -270,7 +270,7 @@ class LIBKCAL_EXPORT CalendarNull : public Calendar
Returns an null Journal pointer.
*/
- Journal *journal( const QString & /*uid*/ )
+ Journal *journal( const TQString & /*uid*/ )
{ return 0; }
// Alarm Specific Methods //
@@ -284,7 +284,7 @@ class LIBKCAL_EXPORT CalendarNull : public Calendar
Returns an empty Alarm List.
*/
- Alarm::List alarms( const QDateTime & /*from*/, const QDateTime & /*to*/ )
+ Alarm::List alarms( const TQDateTime & /*from*/, const TQDateTime & /*to*/ )
{ return Alarm::List(); }
// Observer Specific Methods //
@@ -295,7 +295,7 @@ class LIBKCAL_EXPORT CalendarNull : public Calendar
*/
void incidenceUpdated( IncidenceBase * /*incidenceBase*/ ) {}
- void setTimeZoneIdViewOnly( const QString& ) {};
+ void setTimeZoneIdViewOnly( const TQString& ) {};
private:
static CalendarNull *mSelf;
diff --git a/libkcal/calendarresources.cpp b/libkcal/calendarresources.cpp
index d6ef5c796..94ce0ca31 100644
--- a/libkcal/calendarresources.cpp
+++ b/libkcal/calendarresources.cpp
@@ -28,9 +28,9 @@
*/
#include <stdlib.h>
-#include <qdatetime.h>
-#include <qstring.h>
-#include <qptrlist.h>
+#include <tqdatetime.h>
+#include <tqstring.h>
+#include <tqptrlist.h>
#include <kdebug.h>
#include <kstandarddirs.h>
@@ -64,7 +64,7 @@ ResourceCalendar
ResourceCalendar
*CalendarResources::AskDestinationPolicy::destination( Incidence * )
{
- QPtrList<KRES::Resource> list;
+ TQPtrList<KRES::Resource> list;
CalendarResourceManager::ActiveIterator it;
for ( it = resourceManager()->activeBegin();
@@ -83,14 +83,14 @@ ResourceCalendar
return static_cast<ResourceCalendar *>( r );
}
-CalendarResources::CalendarResources( const QString &timeZoneId,
- const QString &family )
+CalendarResources::CalendarResources( const TQString &timeZoneId,
+ const TQString &family )
: Calendar( timeZoneId )
{
init( family );
}
-void CalendarResources::init( const QString &family )
+void CalendarResources::init( const TQString &family )
{
kdDebug(5800) << "CalendarResources::init( " << family << " )" << endl;
@@ -135,7 +135,7 @@ void CalendarResources::load()
(*i1)->setTimeZoneId( timeZoneId() );
}
- QValueList<ResourceCalendar *> failed;
+ TQValueList<ResourceCalendar *> failed;
// Open all active resources
CalendarResourceManager::ActiveIterator it;
@@ -151,7 +151,7 @@ void CalendarResources::load()
}
}
- QValueList<ResourceCalendar *>::ConstIterator it2;
+ TQValueList<ResourceCalendar *>::ConstIterator it2;
for ( it2 = failed.begin(); it2 != failed.end(); ++it2 ) {
(*it2)->setActive( false );
emit signalResourceModified( *it2 );
@@ -160,7 +160,7 @@ void CalendarResources::load()
mOpen = true;
}
-bool CalendarResources::reload( const QString &tz )
+bool CalendarResources::reload( const TQString &tz )
{
save();
close();
@@ -179,12 +179,12 @@ void CalendarResources::setAskDestinationPolicy()
mDestinationPolicy = mAskPolicy;
}
-QWidget *CalendarResources::dialogParentWidget()
+TQWidget *CalendarResources::dialogParentWidget()
{
return mDestinationPolicy->parent();
}
-void CalendarResources::setDialogParentWidget( QWidget *parent )
+void CalendarResources::setDialogParentWidget( TQWidget *parent )
{
mDestinationPolicy->setParent( parent );
}
@@ -322,7 +322,7 @@ bool CalendarResources::deleteEvent( Event *event )
return status;
}
-Event *CalendarResources::event( const QString &uid )
+Event *CalendarResources::event( const TQString &uid )
{
CalendarResourceManager::ActiveIterator it;
for ( it = mManager->activeBegin(); it != mManager->activeEnd(); ++it ) {
@@ -386,7 +386,7 @@ Todo::List CalendarResources::rawTodos( TodoSortField sortField,
return sortTodos( &result, sortField, sortDirection );
}
-Todo *CalendarResources::todo( const QString &uid )
+Todo *CalendarResources::todo( const TQString &uid )
{
kdDebug(5800) << "CalendarResources::todo(uid)" << endl;
@@ -403,7 +403,7 @@ Todo *CalendarResources::todo( const QString &uid )
return 0;
}
-Todo::List CalendarResources::rawTodosForDate( const QDate &date )
+Todo::List CalendarResources::rawTodosForDate( const TQDate &date )
{
Todo::List result;
@@ -420,7 +420,7 @@ Todo::List CalendarResources::rawTodosForDate( const QDate &date )
return result;
}
-Alarm::List CalendarResources::alarmsTo( const QDateTime &to )
+Alarm::List CalendarResources::alarmsTo( const TQDateTime &to )
{
kdDebug(5800) << "CalendarResources::alarmsTo" << endl;
@@ -435,8 +435,8 @@ Alarm::List CalendarResources::alarmsTo( const QDateTime &to )
return result;
}
-Alarm::List CalendarResources::alarms( const QDateTime &from,
- const QDateTime &to )
+Alarm::List CalendarResources::alarms( const TQDateTime &from,
+ const TQDateTime &to )
{
Alarm::List result;
CalendarResourceManager::ActiveIterator resit;
@@ -451,7 +451,7 @@ Alarm::List CalendarResources::alarms( const QDateTime &from,
/****************************** PROTECTED METHODS ****************************/
-Event::List CalendarResources::rawEventsForDate( const QDate &date,
+Event::List CalendarResources::rawEventsForDate( const TQDate &date,
EventSortField sortField,
SortDirection sortDirection )
{
@@ -468,7 +468,7 @@ Event::List CalendarResources::rawEventsForDate( const QDate &date,
return sortEvents( &result, sortField, sortDirection );
}
-Event::List CalendarResources::rawEvents( const QDate &start, const QDate &end,
+Event::List CalendarResources::rawEvents( const TQDate &start, const TQDate &end,
bool inclusive )
{
kdDebug(5800) << "CalendarResources::rawEvents(start,end,inclusive)" << endl;
@@ -486,7 +486,7 @@ Event::List CalendarResources::rawEvents( const QDate &start, const QDate &end,
return result;
}
-Event::List CalendarResources::rawEventsForDate( const QDateTime &qdt )
+Event::List CalendarResources::rawEventsForDate( const TQDateTime &qdt )
{
kdDebug(5800) << "CalendarResources::rawEventsForDate(qdt)" << endl;
@@ -557,7 +557,7 @@ bool CalendarResources::addJournal( Journal *journal,
return addIncidence( journal, resource );
}
-Journal *CalendarResources::journal( const QString &uid )
+Journal *CalendarResources::journal( const TQString &uid )
{
kdDebug(5800) << "CalendarResources::journal(uid)" << endl;
@@ -592,7 +592,7 @@ Journal::List CalendarResources::rawJournals( JournalSortField sortField,
return sortJournals( &result, sortField, sortDirection );
}
-Journal::List CalendarResources::rawJournalsForDate( const QDate &date )
+Journal::List CalendarResources::rawJournalsForDate( const TQDate &date )
{
Journal::List result;
@@ -611,17 +611,17 @@ Journal::List CalendarResources::rawJournalsForDate( const QDate &date )
void CalendarResources::connectResource( ResourceCalendar *resource )
{
- connect( resource, SIGNAL( resourceChanged( ResourceCalendar * ) ),
- SIGNAL( calendarChanged() ) );
- connect( resource, SIGNAL( resourceSaved( ResourceCalendar * ) ),
- SIGNAL( calendarSaved() ) );
+ connect( resource, TQT_SIGNAL( resourceChanged( ResourceCalendar * ) ),
+ TQT_SIGNAL( calendarChanged() ) );
+ connect( resource, TQT_SIGNAL( resourceSaved( ResourceCalendar * ) ),
+ TQT_SIGNAL( calendarSaved() ) );
- connect( resource, SIGNAL( resourceLoadError( ResourceCalendar *,
- const QString & ) ),
- SLOT( slotLoadError( ResourceCalendar *, const QString & ) ) );
- connect( resource, SIGNAL( resourceSaveError( ResourceCalendar *,
- const QString & ) ),
- SLOT( slotSaveError( ResourceCalendar *, const QString & ) ) );
+ connect( resource, TQT_SIGNAL( resourceLoadError( ResourceCalendar *,
+ const TQString & ) ),
+ TQT_SLOT( slotLoadError( ResourceCalendar *, const TQString & ) ) );
+ connect( resource, TQT_SIGNAL( resourceSaveError( ResourceCalendar *,
+ const TQString & ) ),
+ TQT_SLOT( slotSaveError( ResourceCalendar *, const TQString & ) ) );
}
ResourceCalendar *CalendarResources::resource( Incidence *incidence )
@@ -662,7 +662,7 @@ void CalendarResources::resourceDeleted( ResourceCalendar *resource )
emit signalResourceDeleted( resource );
}
-void CalendarResources::doSetTimeZoneId( const QString &timeZoneId )
+void CalendarResources::doSetTimeZoneId( const TQString &timeZoneId )
{
// set the timezone for all resources. Otherwise we'll have those terrible
// tz troubles ;-((
@@ -672,7 +672,7 @@ void CalendarResources::doSetTimeZoneId( const QString &timeZoneId )
}
}
-void CalendarResources::setTimeZoneIdViewOnly( const QString &timeZoneId )
+void CalendarResources::setTimeZoneIdViewOnly( const TQString &timeZoneId )
{
reload( timeZoneId );
}
@@ -798,12 +798,12 @@ int CalendarResources::decrementChangeCount( ResourceCalendar *r )
return count;
}
-void CalendarResources::slotLoadError( ResourceCalendar *, const QString &err )
+void CalendarResources::slotLoadError( ResourceCalendar *, const TQString &err )
{
emit signalErrorMessage( err );
}
-void CalendarResources::slotSaveError( ResourceCalendar *, const QString &err )
+void CalendarResources::slotSaveError( ResourceCalendar *, const TQString &err )
{
emit signalErrorMessage( err );
}
diff --git a/libkcal/calendarresources.h b/libkcal/calendarresources.h
index a9e0fa808..ad6ace739 100644
--- a/libkcal/calendarresources.h
+++ b/libkcal/calendarresources.h
@@ -29,8 +29,8 @@
#ifndef KCAL_CALENDARRESOURCES_H
#define KCAL_CALENDARRESOURCES_H
-#include <qintdict.h>
-#include <qmap.h>
+#include <tqintdict.h>
+#include <tqmap.h>
#include "calendar.h"
#include "resourcecalendar.h"
@@ -74,12 +74,12 @@ class LIBKCAL_EXPORT CalendarResources :
{
public:
DestinationPolicy( CalendarResourceManager *manager,
- QWidget *parent = 0 ) :
+ TQWidget *parent = 0 ) :
mManager( manager ), mParent( parent ) {}
virtual ResourceCalendar *destination( Incidence *incidence ) = 0;
- virtual QWidget *parent() { return mParent; }
- virtual void setParent( QWidget *newparent ) { mParent = newparent; }
+ virtual TQWidget *parent() { return mParent; }
+ virtual void setParent( TQWidget *newparent ) { mParent = newparent; }
protected:
CalendarResourceManager *resourceManager()
@@ -87,7 +87,7 @@ class LIBKCAL_EXPORT CalendarResources :
private:
CalendarResourceManager *mManager;
- QWidget *mParent;
+ TQWidget *mParent;
};
/**
@@ -97,7 +97,7 @@ class LIBKCAL_EXPORT CalendarResources :
{
public:
StandardDestinationPolicy( CalendarResourceManager *manager,
- QWidget *parent = 0 ) :
+ TQWidget *parent = 0 ) :
DestinationPolicy( manager, parent ) {}
ResourceCalendar *destination( Incidence *incidence );
@@ -114,7 +114,7 @@ class LIBKCAL_EXPORT CalendarResources :
{
public:
AskDestinationPolicy( CalendarResourceManager *manager,
- QWidget *parent = 0 ) :
+ TQWidget *parent = 0 ) :
DestinationPolicy( manager, parent ) {}
ResourceCalendar *destination( Incidence *incidence );
@@ -157,11 +157,11 @@ class LIBKCAL_EXPORT CalendarResources :
Do Not pass an empty timeZoneId string as this may cause unintended
consequences when storing Incidences into the Calendar.
- @param family is any QString representing a unique name.
+ @param family is any TQString representing a unique name.
*/
CalendarResources(
- const QString &timeZoneId,
- const QString &family = QString::fromLatin1( "calendar" ) );
+ const TQString &timeZoneId,
+ const TQString &family = TQString::fromLatin1( "calendar" ) );
/**
Destructor
@@ -180,7 +180,7 @@ class LIBKCAL_EXPORT CalendarResources :
* @par tz The timezone to set.
* @return success or failure
*/
- bool reload( const QString &tz );
+ bool reload( const TQString &tz );
/**
Clear out the current Calendar, freeing all used memory etc.
@@ -262,14 +262,14 @@ class LIBKCAL_EXPORT CalendarResources :
Afterwards we need to reset it (to avoid pointers to widgets that are
already deleted) so we also need the accessor
*/
- QWidget *dialogParentWidget();
+ TQWidget *dialogParentWidget();
/**
Set the widget parent for new dialogs. This is a bad hack, but we need
to properly set the parent for the resource selection dialog. Otherwise
the dialog will not be modal to the editor dialog in korganizer and
the user can still work in the editor dialog (and thus crash korganizer).
*/
- void setDialogParentWidget( QWidget *parent );
+ void setDialogParentWidget( TQWidget *parent );
/**
Request ticket for saving the Calendar. If a ticket is returned the
@@ -390,12 +390,12 @@ class LIBKCAL_EXPORT CalendarResources :
Return an unfiltered list of all Events which occur on the given
timestamp.
- @param qdt request unfiltered Event list for this QDateTime only.
+ @param qdt request unfiltered Event list for this TQDateTime only.
@return the list of unfiltered Events occurring on the specified
timestamp.
*/
- Event::List rawEventsForDate( const QDateTime &qdt );
+ Event::List rawEventsForDate( const TQDateTime &qdt );
/**
Return an unfiltered list of all Events occurring within a date range.
@@ -408,7 +408,7 @@ class LIBKCAL_EXPORT CalendarResources :
@return the list of unfiltered Events occurring within the specified
date range.
*/
- Event::List rawEvents( const QDate &start, const QDate &end,
+ Event::List rawEvents( const TQDate &start, const TQDate &end,
bool inclusive = false );
/**
@@ -416,14 +416,14 @@ class LIBKCAL_EXPORT CalendarResources :
date. The Events are sorted according to @a sortField and
@a sortDirection.
- @param date request unfiltered Event list for this QDate only.
+ @param date request unfiltered Event list for this TQDate only.
@param sortField specifies the EventSortField.
@param sortDirection specifies the SortDirection.
@return the list of sorted, unfiltered Events occurring on @a date.
*/
Event::List rawEventsForDate(
- const QDate &date,
+ const TQDate &date,
EventSortField sortField = EventSortUnsorted,
SortDirection sortDirection = SortDirectionAscending );
@@ -435,7 +435,7 @@ class LIBKCAL_EXPORT CalendarResources :
@return a pointer to the Event.
A null pointer is returned if no such Event exists.
*/
- Event *event( const QString &uid );
+ Event *event( const TQString &uid );
// Todo Specific Methods //
@@ -491,11 +491,11 @@ class LIBKCAL_EXPORT CalendarResources :
Return an unfiltered list of all Todos which are due on the specified
date.
- @param date request unfiltered Todos due on this QDate.
+ @param date request unfiltered Todos due on this TQDate.
@return the list of unfiltered Todos due on the specified date.
*/
- Todo::List rawTodosForDate( const QDate &date );
+ Todo::List rawTodosForDate( const TQDate &date );
/**
Returns the Todo associated with the given unique identifier.
@@ -505,7 +505,7 @@ class LIBKCAL_EXPORT CalendarResources :
@return a pointer to the Todo.
A null pointer is returned if no such Todo exists.
*/
- Todo *todo( const QString &uid );
+ Todo *todo( const TQString &uid );
// Journal Specific Methods //
@@ -561,11 +561,11 @@ class LIBKCAL_EXPORT CalendarResources :
/**
Return an unfiltered list of all Journals for on the specifed date.
- @param date request unfiltered Journals for this QDate only.
+ @param date request unfiltered Journals for this TQDate only.
@return the list of unfiltered Journals for the specified date.
*/
- Journal::List rawJournalsForDate( const QDate &date );
+ Journal::List rawJournalsForDate( const TQDate &date );
/**
Returns the Journal associated with the given unique identifier.
@@ -575,7 +575,7 @@ class LIBKCAL_EXPORT CalendarResources :
@return a pointer to the Journal.
A null pointer is returned if no such Journal exists.
*/
- Journal *journal( const QString &uid );
+ Journal *journal( const TQString &uid );
// Alarm Specific Methods //
@@ -587,16 +587,16 @@ class LIBKCAL_EXPORT CalendarResources :
@return the list of Alarms for the for the specified time range.
*/
- Alarm::List alarms( const QDateTime &from, const QDateTime &to );
+ Alarm::List alarms( const TQDateTime &from, const TQDateTime &to );
/**
Return a list of Alarms that occur before the specified timestamp.
@param to is the ending timestamp.
- @return the list of Alarms occurring before the specified QDateTime.
+ @return the list of Alarms occurring before the specified TQDateTime.
*/
- Alarm::List alarmsTo( const QDateTime &to );
+ Alarm::List alarmsTo( const TQDateTime &to );
/**
* Set the viewing time zone, which requires that all resources are saved,
@@ -605,7 +605,7 @@ class LIBKCAL_EXPORT CalendarResources :
* If you want to change the times of the contents of the resources, use
* setTimeZoneId
*/
- void setTimeZoneIdViewOnly( const QString& tz );
+ void setTimeZoneIdViewOnly( const TQString& tz );
signals:
/**
@@ -626,7 +626,7 @@ class LIBKCAL_EXPORT CalendarResources :
/**
Signal an error message.
*/
- void signalErrorMessage( const QString &err );
+ void signalErrorMessage( const TQString &err );
protected:
void connectResource( ResourceCalendar *resource );
@@ -645,7 +645,7 @@ class LIBKCAL_EXPORT CalendarResources :
Do Not pass an empty timeZoneId string as this may cause unintended
consequences when storing Incidences into the Calendar.
*/
- virtual void doSetTimeZoneId( const QString &timeZoneId );
+ virtual void doSetTimeZoneId( const TQString &timeZoneId );
/**
Increment the number of times this Resource has been changed by 1.
@@ -666,26 +666,26 @@ class LIBKCAL_EXPORT CalendarResources :
int decrementChangeCount( ResourceCalendar *resource );
protected slots:
- void slotLoadError( ResourceCalendar *resource, const QString &err );
- void slotSaveError( ResourceCalendar *resource, const QString &err );
+ void slotLoadError( ResourceCalendar *resource, const TQString &err );
+ void slotSaveError( ResourceCalendar *resource, const TQString &err );
private:
/**
Initialize the Resource object with starting values.
*/
- void init( const QString &family );
+ void init( const TQString &family );
bool mOpen;
KRES::Manager<ResourceCalendar>* mManager;
- QMap <Incidence*, ResourceCalendar*> mResourceMap;
+ TQMap <Incidence*, ResourceCalendar*> mResourceMap;
DestinationPolicy *mDestinationPolicy;
StandardDestinationPolicy *mStandardPolicy;
AskDestinationPolicy *mAskPolicy;
- QMap<ResourceCalendar *, Ticket *> mTickets;
- QMap<ResourceCalendar *, int> mChangeCounts;
+ TQMap<ResourceCalendar *, Ticket *> mTickets;
+ TQMap<ResourceCalendar *, int> mChangeCounts;
class Private;
Private *d;
diff --git a/libkcal/calfilter.cpp b/libkcal/calfilter.cpp
index c1b66f094..898ec79cf 100644
--- a/libkcal/calfilter.cpp
+++ b/libkcal/calfilter.cpp
@@ -34,7 +34,7 @@ CalFilter::CalFilter()
mCompletedTimeSpan = 0;
}
-CalFilter::CalFilter(const QString &name)
+CalFilter::CalFilter(const TQString &name)
{
mName = name;
mEnabled = true;
@@ -108,14 +108,14 @@ bool CalFilter::filterIncidence(Incidence *incidence) const
if ( (mCriteria & HideCompleted) && todo->isCompleted() ) {
// Check if completion date is suffently long ago:
if ( todo->completed().addDays( mCompletedTimeSpan ) <
- QDateTime::currentDateTime() ) {
+ TQDateTime::currentDateTime() ) {
return false;
}
}
if( ( mCriteria & HideInactiveTodos ) &&
( todo->hasStartDate() &&
- QDateTime::currentDateTime() < todo->dtStart() ||
+ TQDateTime::currentDateTime() < todo->dtStart() ||
todo->isCompleted() ) )
return false;
@@ -145,10 +145,10 @@ bool CalFilter::filterIncidence(Incidence *incidence) const
}
if (mCriteria & ShowCategories) {
- for (QStringList::ConstIterator it = mCategoryList.constBegin();
+ for (TQStringList::ConstIterator it = mCategoryList.constBegin();
it != mCategoryList.constEnd(); ++it ) {
- QStringList incidenceCategories = incidence->categories();
- for (QStringList::ConstIterator it2 = incidenceCategories.constBegin();
+ TQStringList incidenceCategories = incidence->categories();
+ for (TQStringList::ConstIterator it2 = incidenceCategories.constBegin();
it2 != incidenceCategories.constEnd(); ++it2 ) {
if ((*it) == (*it2)) {
return true;
@@ -157,10 +157,10 @@ bool CalFilter::filterIncidence(Incidence *incidence) const
}
return false;
} else {
- for (QStringList::ConstIterator it = mCategoryList.constBegin();
+ for (TQStringList::ConstIterator it = mCategoryList.constBegin();
it != mCategoryList.constEnd(); ++it ) {
- QStringList incidenceCategories = incidence->categories();
- for (QStringList::ConstIterator it2 = incidenceCategories.constBegin();
+ TQStringList incidenceCategories = incidence->categories();
+ for (TQStringList::ConstIterator it2 = incidenceCategories.constBegin();
it2 != incidenceCategories.constEnd(); ++it2 ) {
if ((*it) == (*it2)) {
return false;
@@ -195,22 +195,22 @@ int CalFilter::criteria() const
return mCriteria;
}
-void CalFilter::setCategoryList(const QStringList &categoryList)
+void CalFilter::setCategoryList(const TQStringList &categoryList)
{
mCategoryList = categoryList;
}
-QStringList CalFilter::categoryList() const
+TQStringList CalFilter::categoryList() const
{
return mCategoryList;
}
-void CalFilter::setEmailList(const QStringList &emailList)
+void CalFilter::setEmailList(const TQStringList &emailList)
{
mEmailList = emailList;
}
-QStringList CalFilter::emailList() const
+TQStringList CalFilter::emailList() const
{
return mEmailList;
}
diff --git a/libkcal/calfilter.h b/libkcal/calfilter.h
index fb34454e6..80c0b2aff 100644
--- a/libkcal/calfilter.h
+++ b/libkcal/calfilter.h
@@ -22,8 +22,8 @@
#ifndef KCAL_CALFILTER_H
#define KCAL_CALFILTER_H
-#include <qstring.h>
-#include <qptrlist.h>
+#include <tqstring.h>
+#include <tqptrlist.h>
#include "event.h"
#include "todo.h"
@@ -41,18 +41,18 @@ class LIBKCAL_EXPORT CalFilter
/** Construct filter. */
CalFilter();
/** Construct filter with name */
- CalFilter( const QString &name );
+ CalFilter( const TQString &name );
/** Destruct filter. */
~CalFilter();
/**
Set name of filter.
*/
- void setName( const QString &name ) { mName = name; }
+ void setName( const TQString &name ) { mName = name; }
/**
Return name of filter.
*/
- QString name() const { return mName; }
+ TQString name() const { return mName; }
/**
Apply filter to eventlist, all events not matching filter criterias are
@@ -93,26 +93,26 @@ class LIBKCAL_EXPORT CalFilter
events.
See related functions.
*/
- void setCategoryList( const QStringList & );
+ void setCategoryList( const TQStringList & );
/**
Return category list, used for showing/hiding categories of events.
See related functions.
*/
- QStringList categoryList() const;
+ TQStringList categoryList() const;
/**
Set list of email addresses which are to be considered when finding
incidences which the current user is not a participant of. This is
normally the list used by KOPrefs::thatIsMe() as well.
*/
- void setEmailList( const QStringList & );
+ void setEmailList( const TQStringList & );
/**
Return list of email addresses which are to be considered when finding
incidences which the current user is not a participant of. This is
normally the list used by KOPrefs::thatIsMe() as well.
See related functions.
*/
- QStringList emailList() const;
+ TQStringList emailList() const;
enum { HideRecurring = 1, HideCompleted = 2, ShowCategories = 4,
HideInactiveTodos = 8, HideTodosWithoutAttendeeInEmailList = 16 };
@@ -139,14 +139,14 @@ class LIBKCAL_EXPORT CalFilter
int completedTimeSpan() const;
private:
- QString mName;
+ TQString mName;
int mCriteria;
bool mEnabled;
- QStringList mCategoryList;
- QStringList mEmailList;
+ TQStringList mCategoryList;
+ TQStringList mEmailList;
int mCompletedTimeSpan;
class Private;
diff --git a/libkcal/calformat.cpp b/libkcal/calformat.cpp
index 642eefeba..6ec0260cd 100644
--- a/libkcal/calformat.cpp
+++ b/libkcal/calformat.cpp
@@ -27,8 +27,8 @@
using namespace KCal;
-QString CalFormat::mApplication = QString::fromLatin1("libkcal");
-QString CalFormat::mProductId = QString::fromLatin1("-//K Desktop Environment//NONSGML libkcal 3.5//EN");
+TQString CalFormat::mApplication = TQString::fromLatin1("libkcal");
+TQString CalFormat::mProductId = TQString::fromLatin1("-//K Desktop Environment//NONSGML libkcal 3.5//EN");
CalFormat::CalFormat()
@@ -58,18 +58,18 @@ ErrorFormat *CalFormat::exception()
return mException;
}
-void CalFormat::setApplication(const QString& application, const QString& productID)
+void CalFormat::setApplication(const TQString& application, const TQString& productID)
{
mApplication = application;
mProductId = productID;
}
-QString CalFormat::createUniqueId()
+TQString CalFormat::createUniqueId()
{
- int hashTime = QTime::currentTime().hour() +
- QTime::currentTime().minute() + QTime::currentTime().second() +
- QTime::currentTime().msec();
- QString uidStr = QString("%1-%2.%3")
+ int hashTime = TQTime::currentTime().hour() +
+ TQTime::currentTime().minute() + TQTime::currentTime().second() +
+ TQTime::currentTime().msec();
+ TQString uidStr = TQString("%1-%2.%3")
.arg(mApplication)
.arg(KApplication::random())
.arg(hashTime);
diff --git a/libkcal/calformat.h b/libkcal/calformat.h
index 80c36a1fa..59c585538 100644
--- a/libkcal/calformat.h
+++ b/libkcal/calformat.h
@@ -21,9 +21,9 @@
#ifndef KCAL_CALFORMAT_H
#define KCAL_CALFORMAT_H
-#include <qstring.h>
-#include <qdatetime.h>
-#include <qevent.h>
+#include <tqstring.h>
+#include <tqdatetime.h>
+#include <tqevent.h>
#include "exceptions.h"
#include "event.h"
@@ -53,21 +53,21 @@ class LIBKCAL_EXPORT CalFormat
Returns TRUE if successful,else returns FALSE.
@param fileName the name of the calendar on disk.
*/
- virtual bool load(Calendar *, const QString &fileName) = 0;
+ virtual bool load(Calendar *, const TQString &fileName) = 0;
/** writes out the calendar to disk. Returns true if
* successful and false on error.
* @param fileName the name of the file
*/
- virtual bool save(Calendar *, const QString &fileName) = 0;
+ virtual bool save(Calendar *, const TQString &fileName) = 0;
/**
Parse string and populate calendar with that information.
*/
- virtual bool fromString(Calendar *, const QString & ) = 0;
+ virtual bool fromString(Calendar *, const TQString & ) = 0;
/**
Return calendar information as string.
*/
- virtual QString toString(Calendar *) = 0;
+ virtual TQString toString(Calendar *) = 0;
/** Clear exception status of this format object */
void clearException();
@@ -80,16 +80,16 @@ class LIBKCAL_EXPORT CalFormat
/** Set the application name for use in unique IDs and error messages,
* and product ID for incidence PRODID property
*/
- static void setApplication(const QString& app, const QString& productID);
+ static void setApplication(const TQString& app, const TQString& productID);
/** Return the application name used in unique IDs and error messages */
- static const QString& application() { return mApplication; }
+ static const TQString& application() { return mApplication; }
/** Return the PRODID string to write into calendar files */
- static const QString& productId() { return mProductId; }
+ static const TQString& productId() { return mProductId; }
/** Return the PRODID string loaded from calendar file */
- const QString &loadedProductId() { return mLoadedProductId; }
+ const TQString &loadedProductId() { return mLoadedProductId; }
/** Create a unique id string. */
- static QString createUniqueId();
+ static TQString createUniqueId();
/**
Set exception for this object. This is used by the functions of this
@@ -98,13 +98,13 @@ class LIBKCAL_EXPORT CalFormat
void setException(ErrorFormat *error);
protected:
- QString mLoadedProductId; // PRODID string loaded from calendar file
+ TQString mLoadedProductId; // PRODID string loaded from calendar file
private:
ErrorFormat *mException;
- static QString mApplication; // name of application for unique ID strings
- static QString mProductId; // PRODID string to write to calendar files
+ static TQString mApplication; // name of application for unique ID strings
+ static TQString mProductId; // PRODID string to write to calendar files
class Private;
Private *d;
diff --git a/libkcal/compat.cpp b/libkcal/compat.cpp
index a0de0d35a..8268f9785 100644
--- a/libkcal/compat.cpp
+++ b/libkcal/compat.cpp
@@ -24,13 +24,13 @@
#include <kdebug.h>
-#include <qregexp.h>
+#include <tqregexp.h>
#include "incidence.h"
using namespace KCal;
-Compat *CompatFactory::createCompat( const QString &productId )
+Compat *CompatFactory::createCompat( const TQString &productId )
{
// kdDebug(5800) << "CompatFactory::createCompat(): '" << productId << "'"
// << endl;
@@ -45,9 +45,9 @@ Compat *CompatFactory::createCompat( const QString &productId )
if ( korg >= 0 ) {
int versionStart = productId.find( " ", korg );
if ( versionStart >= 0 ) {
- int versionStop = productId.find( QRegExp( "[ /]" ), versionStart + 1 );
+ int versionStop = productId.find( TQRegExp( "[ /]" ), versionStart + 1 );
if ( versionStop >= 0 ) {
- QString version = productId.mid( versionStart + 1,
+ TQString version = productId.mid( versionStart + 1,
versionStop - versionStart - 1 );
// kdDebug(5800) << "Found KOrganizer version: " << version << endl;
@@ -55,7 +55,7 @@ Compat *CompatFactory::createCompat( const QString &productId )
version.section( ".", 1, 1 ).toInt() * 100 +
version.section( ".", 2, 2 ).toInt();
int releaseStop = productId.find( "/", versionStop );
- QString release;
+ TQString release;
if ( releaseStop > versionStop ) {
release = productId.mid( versionStop+1, releaseStop-versionStop-1 );
}
@@ -95,9 +95,9 @@ void Compat::fixEmptySummary( Incidence *incidence )
// line, move it)
if (incidence->summary().isEmpty() &&
!(incidence->description().isEmpty())) {
- QString oldDescription = incidence->description().stripWhiteSpace();
- QString newSummary( oldDescription );
- newSummary.remove( QRegExp("\n.*") );
+ TQString oldDescription = incidence->description().stripWhiteSpace();
+ TQString newSummary( oldDescription );
+ newSummary.remove( TQRegExp("\n.*") );
incidence->setSummary( newSummary );
if ( oldDescription == newSummary )
incidence->setDescription("");
@@ -119,7 +119,7 @@ void CompatPre35::fixRecurrence( Incidence *incidence )
{
Recurrence* recurrence = incidence->recurrence();
if (recurrence ) {
- QDateTime start( incidence->dtStart() );
+ TQDateTime start( incidence->dtStart() );
// kde < 3.5 only had one rrule, so no need to loop over all RRULEs.
RecurrenceRule *r = recurrence->defaultRRule();
if ( r && !r->dateMatchesRules( start ) ) {
@@ -164,7 +164,7 @@ void CompatPre32::fixRecurrence( Incidence *incidence )
However, as all other applications also got this wrong, we'll just leave it
as it is and use the wrong interpretation (was also discussed on
ietf-calsify)*/
-void CompatPre31::fixFloatingEnd( QDate &endDate )
+void CompatPre31::fixFloatingEnd( TQDate &endDate )
{
endDate = endDate.addDays( 1 );
}
@@ -184,7 +184,7 @@ void CompatPre31::fixRecurrence( Incidence *incidence )
// with week start always on a Monday.
// Convert this to the number of occurrences.
r->setDuration( -1 );
- QDate end( r->startDt().date() );
+ TQDate end( r->startDt().date() );
bool doNothing = false;
// # of periods:
int tmp = ( duration - 1 ) * r->frequency();
@@ -204,7 +204,7 @@ void CompatPre31::fixRecurrence( Incidence *incidence )
break;
}
if ( !doNothing ) {
- duration = r->durationTo( QDateTime( end, QTime( 0, 0, 0 ) ) );
+ duration = r->durationTo( TQDateTime( end, TQTime( 0, 0, 0 ) ) );
r->setDuration( duration );
}
}
@@ -212,11 +212,11 @@ void CompatPre31::fixRecurrence( Incidence *incidence )
/* addYearlyNum */
// Dates were stored as day numbers, with a fiddle to take account of leap years.
// Convert the day number to a month.
- QValueList<int> days = r->byYearDays();
+ TQValueList<int> days = r->byYearDays();
if ( !days.isEmpty() ) {
- QValueList<int> months = r->byMonths();
- for ( QValueListConstIterator<int> it = days.begin(); it != days.end(); ++it ) {
- int newmonth = QDate( r->startDt().date().year(), 1, 1).addDays( (*it) - 1 ).month();
+ TQValueList<int> months = r->byMonths();
+ for ( TQValueListConstIterator<int> it = days.begin(); it != days.end(); ++it ) {
+ int newmonth = TQDate( r->startDt().date().year(), 1, 1).addDays( (*it) - 1 ).month();
if ( !months.contains( newmonth ) )
months.append( newmonth );
}
diff --git a/libkcal/compat.h b/libkcal/compat.h
index dd2d9907f..70931ff53 100644
--- a/libkcal/compat.h
+++ b/libkcal/compat.h
@@ -22,8 +22,8 @@
#ifndef KCAL_COMPAT_H
#define KCAL_COMPAT_H
-#include <qstring.h>
-#include <qdatetime.h>
+#include <tqstring.h>
+#include <tqdatetime.h>
namespace KCal {
@@ -36,7 +36,7 @@ class Compat;
class CompatFactory
{
public:
- static Compat *createCompat( const QString &productId );
+ static Compat *createCompat( const TQString &productId );
};
/**
@@ -51,7 +51,7 @@ class Compat
virtual void fixRecurrence( Incidence * );
virtual void fixEmptySummary( Incidence * );
virtual void fixAlarms( Incidence * ) {}
- virtual void fixFloatingEnd( QDate & ) {}
+ virtual void fixFloatingEnd( TQDate & ) {}
virtual bool useTimeZoneShift() { return true; }
virtual int fixPriority( int prio ) { return prio; }
@@ -91,7 +91,7 @@ class CompatPre32 : public CompatPre34
class CompatPre31 : public CompatPre32
{
public:
- virtual void fixFloatingEnd( QDate & );
+ virtual void fixFloatingEnd( TQDate & );
virtual void fixRecurrence( Incidence *incidence );
private:
diff --git a/libkcal/confirmsavedialog.cpp b/libkcal/confirmsavedialog.cpp
index ce2bb0f40..9b7f4d31d 100644
--- a/libkcal/confirmsavedialog.cpp
+++ b/libkcal/confirmsavedialog.cpp
@@ -23,22 +23,22 @@
#include <klistview.h>
#include <klocale.h>
-#include <qlayout.h>
-#include <qframe.h>
-#include <qlabel.h>
+#include <tqlayout.h>
+#include <tqframe.h>
+#include <tqlabel.h>
using namespace KCal;
-ConfirmSaveDialog::ConfirmSaveDialog( const QString &destination,
- QWidget *parent, const char *name )
+ConfirmSaveDialog::ConfirmSaveDialog( const TQString &destination,
+ TQWidget *parent, const char *name )
: KDialogBase( parent, name, true, i18n("Confirm Save"), Ok | Cancel )
{
- QFrame *topFrame = makeMainWidget();
+ TQFrame *topFrame = makeMainWidget();
- QBoxLayout *topLayout = new QVBoxLayout( topFrame );
+ TQBoxLayout *topLayout = new TQVBoxLayout( topFrame );
topLayout->setSpacing( spacingHint() );
- QLabel *label = new QLabel(
+ TQLabel *label = new TQLabel(
i18n("You have requested to save the following objects to '%1':")
.arg( destination ), topFrame );
topLayout->addWidget( label );
@@ -52,7 +52,7 @@ ConfirmSaveDialog::ConfirmSaveDialog( const QString &destination,
}
void ConfirmSaveDialog::addIncidences( const Incidence::List &incidences,
- const QString &operation )
+ const TQString &operation )
{
Incidence::List::ConstIterator it;
for( it = incidences.begin(); it != incidences.end(); ++it ) {
diff --git a/libkcal/confirmsavedialog.h b/libkcal/confirmsavedialog.h
index 7d36ec671..c20a4951b 100644
--- a/libkcal/confirmsavedialog.h
+++ b/libkcal/confirmsavedialog.h
@@ -32,11 +32,11 @@ namespace KCal {
class KDE_EXPORT ConfirmSaveDialog : public KDialogBase
{
public:
- ConfirmSaveDialog( const QString &destination, QWidget *parent,
+ ConfirmSaveDialog( const TQString &destination, TQWidget *parent,
const char *name = 0 );
void addIncidences( const Incidence::List &incidences,
- const QString &operation );
+ const TQString &operation );
private:
KListView *mListView;
diff --git a/libkcal/convertqtopia.cpp b/libkcal/convertqtopia.cpp
index dd6824b39..be02fd66f 100644
--- a/libkcal/convertqtopia.cpp
+++ b/libkcal/convertqtopia.cpp
@@ -84,9 +84,9 @@ int main(int argc,char **argv)
KCmdLineArgs::usage( i18n("Error: No input file.") );
}
- QString inputFile = args->arg( 0 );
+ TQString inputFile = args->arg( 0 );
- QString outputFile;
+ TQString outputFile;
if ( args->isSet("output") ) outputFile = args->getOption( "output" );
kdDebug(5800) << "Input File: '" << inputFile << "'" << endl;
@@ -100,7 +100,7 @@ int main(int argc,char **argv)
ICalFormat icalendarFormat;
if ( outputFile.isEmpty() ) {
- QString out = icalendarFormat.toString( &cal );
+ TQString out = icalendarFormat.toString( &cal );
std::cout << out.local8Bit() << std::endl;
} else {
bool success = icalendarFormat.save( &cal, outputFile );
diff --git a/libkcal/customproperties.cpp b/libkcal/customproperties.cpp
index b64d9fee4..2d59fe912 100644
--- a/libkcal/customproperties.cpp
+++ b/libkcal/customproperties.cpp
@@ -41,9 +41,9 @@ CustomProperties::~CustomProperties()
bool CustomProperties::operator==( const CustomProperties &other ) const
{
if ( mProperties.count() != other.mProperties.count() ) return false;
- QMap<QCString, QString>::ConstIterator it;
+ TQMap<TQCString, TQString>::ConstIterator it;
for( it = mProperties.begin(); it != mProperties.end(); ++it ) {
- QMap<QCString, QString>::ConstIterator itOther =
+ TQMap<TQCString, TQString>::ConstIterator itOther =
other.mProperties.find( it.key() );
if ( itOther == other.mProperties.end() ) {
@@ -55,29 +55,29 @@ bool CustomProperties::operator==( const CustomProperties &other ) const
return true;
}
-void CustomProperties::setCustomProperty(const QCString &app, const QCString &key,
- const QString &value)
+void CustomProperties::setCustomProperty(const TQCString &app, const TQCString &key,
+ const TQString &value)
{
if (value.isNull() || key.isEmpty() || app.isEmpty())
return;
- QCString property = "X-KDE-" + app + "-" + key;
+ TQCString property = "X-KDE-" + app + "-" + key;
if (!checkName(property))
return;
mProperties[property] = value;
customPropertyUpdated();
}
-void CustomProperties::removeCustomProperty(const QCString &app, const QCString &key)
+void CustomProperties::removeCustomProperty(const TQCString &app, const TQCString &key)
{
- removeNonKDECustomProperty(QCString("X-KDE-" + app + "-" + key));
+ removeNonKDECustomProperty(TQCString("X-KDE-" + app + "-" + key));
}
-QString CustomProperties::customProperty(const QCString &app, const QCString &key) const
+TQString CustomProperties::customProperty(const TQCString &app, const TQCString &key) const
{
- return nonKDECustomProperty(QCString("X-KDE-" + app + "-" + key));
+ return nonKDECustomProperty(TQCString("X-KDE-" + app + "-" + key));
}
-void CustomProperties::setNonKDECustomProperty(const QCString &name, const QString &value)
+void CustomProperties::setNonKDECustomProperty(const TQCString &name, const TQString &value)
{
if (value.isNull() || !checkName(name))
return;
@@ -85,30 +85,30 @@ void CustomProperties::setNonKDECustomProperty(const QCString &name, const QStri
customPropertyUpdated();
}
-void CustomProperties::removeNonKDECustomProperty(const QCString &name)
+void CustomProperties::removeNonKDECustomProperty(const TQCString &name)
{
- QMap<QCString, QString>::Iterator it = mProperties.find(name);
+ TQMap<TQCString, TQString>::Iterator it = mProperties.find(name);
if (it != mProperties.end()) {
mProperties.remove(it);
customPropertyUpdated();
}
}
-QString CustomProperties::nonKDECustomProperty(const QCString &name) const
+TQString CustomProperties::nonKDECustomProperty(const TQCString &name) const
{
- QMap<QCString, QString>::ConstIterator it = mProperties.find(name);
+ TQMap<TQCString, TQString>::ConstIterator it = mProperties.find(name);
if (it == mProperties.end())
- return QString::null;
+ return TQString::null;
return it.data();
}
-void CustomProperties::setCustomProperties(const QMap<QCString, QString> &properties)
+void CustomProperties::setCustomProperties(const TQMap<TQCString, TQString> &properties)
{
bool changed = false;
- for (QMap<QCString, QString>::ConstIterator it = properties.begin(); it != properties.end(); ++it) {
+ for (TQMap<TQCString, TQString>::ConstIterator it = properties.begin(); it != properties.end(); ++it) {
// Validate the property name and convert any null string to empty string
if (checkName(it.key())) {
- mProperties[it.key()] = it.data().isNull() ? QString("") : it.data();
+ mProperties[it.key()] = it.data().isNull() ? TQString("") : it.data();
changed = true;
}
}
@@ -116,12 +116,12 @@ void CustomProperties::setCustomProperties(const QMap<QCString, QString> &proper
customPropertyUpdated();
}
-QMap<QCString, QString> CustomProperties::customProperties() const
+TQMap<TQCString, TQString> CustomProperties::customProperties() const
{
return mProperties;
}
-bool CustomProperties::checkName(const QCString &name)
+bool CustomProperties::checkName(const TQCString &name)
{
// Check that the property name starts with 'X-' and contains
// only the permitted characters
diff --git a/libkcal/customproperties.h b/libkcal/customproperties.h
index 5cafff2eb..46814ca05 100644
--- a/libkcal/customproperties.h
+++ b/libkcal/customproperties.h
@@ -22,8 +22,8 @@
#ifndef KCAL_CUSTOMPROPERTIES_H
#define KCAL_CUSTOMPROPERTIES_H
-#include <qstring.h>
-#include <qmap.h>
+#include <tqstring.h>
+#include <tqmap.h>
#include <kdepimmacros.h>
#include "libkcal_export.h"
@@ -56,60 +56,60 @@ class LIBKCAL_EXPORT CustomProperties
@param app Application name as it appears in the custom property name.
@param key Property identifier specific to the application.
- @param value The property's value. A call with a value of QString::null
+ @param value The property's value. A call with a value of TQString::null
will be ignored.
*/
- void setCustomProperty( const QCString &app, const QCString &key,
- const QString &value );
+ void setCustomProperty( const TQCString &app, const TQCString &key,
+ const TQString &value );
/**
Delete a custom calendar property.
@param app Application name as it appears in the custom property name.
@param key Property identifier specific to the application.
*/
- void removeCustomProperty( const QCString &app, const QCString &key );
+ void removeCustomProperty( const TQCString &app, const TQCString &key );
/**
Return the value of a custom calendar property.
@param app Application name as it appears in the custom property name.
@param key Property identifier specific to the application.
- @return Property value, or QString::null if (and only if) the property
+ @return Property value, or TQString::null if (and only if) the property
does not exist.
*/
- QString customProperty( const QCString &app, const QCString &key ) const;
+ TQString customProperty( const TQCString &app, const TQCString &key ) const;
/**
Create or modify a non-KDE or non-standard custom calendar property.
@param name Full property name
- @param value The property's value. A call with a value of QString::null
+ @param value The property's value. A call with a value of TQString::null
will be ignored.
*/
- void setNonKDECustomProperty( const QCString &name, const QString &value );
+ void setNonKDECustomProperty( const TQCString &name, const TQString &value );
/**
Delete a non-KDE or non-standard custom calendar property.
@param name Full property name
*/
- void removeNonKDECustomProperty( const QCString &name );
+ void removeNonKDECustomProperty( const TQCString &name );
/**
Return the value of a non-KDE or non-standard custom calendar property.
@param name Full property name
- @return Property value, or QString::null if (and only if) the property
+ @return Property value, or TQString::null if (and only if) the property
does not exist.
*/
- QString nonKDECustomProperty( const QCString& name ) const;
+ TQString nonKDECustomProperty( const TQCString& name ) const;
/**
Initialise the alarm's custom calendar properties to the specified
key/value pairs.
*/
- void setCustomProperties( const QMap<QCString, QString> &properties );
+ void setCustomProperties( const TQMap<TQCString, TQString> &properties );
/**
Return all custom calendar property key/value pairs.
*/
- QMap<QCString, QString> customProperties() const;
+ TQMap<TQCString, TQString> customProperties() const;
protected:
/**
@@ -120,9 +120,9 @@ class LIBKCAL_EXPORT CustomProperties
virtual void customPropertyUpdated() {}
private:
- static bool checkName(const QCString& name);
+ static bool checkName(const TQCString& name);
- QMap<QCString, QString> mProperties; // custom calendar properties
+ TQMap<TQCString, TQString> mProperties; // custom calendar properties
class Private;
Private *d;
diff --git a/libkcal/dndfactory.cpp b/libkcal/dndfactory.cpp
index 273c305b6..9f5292d1d 100644
--- a/libkcal/dndfactory.cpp
+++ b/libkcal/dndfactory.cpp
@@ -21,8 +21,8 @@
Boston, MA 02110-1301, USA.
*/
-#include <qapplication.h>
-#include <qclipboard.h>
+#include <tqapplication.h>
+#include <tqclipboard.h>
#include <kiconloader.h>
#include <kdebug.h>
@@ -45,7 +45,7 @@ DndFactory::DndFactory( Calendar *cal ) :
{
}
-ICalDrag *DndFactory::createDrag( Incidence *incidence, QWidget *owner )
+ICalDrag *DndFactory::createDrag( Incidence *incidence, TQWidget *owner )
{
CalendarLocal cal( mCalendar->timeZoneId() );
Incidence *i = incidence->clone();
@@ -60,7 +60,7 @@ ICalDrag *DndFactory::createDrag( Incidence *incidence, QWidget *owner )
return icd;
}
-Event *DndFactory::createDrop(QDropEvent *de)
+Event *DndFactory::createDrop(TQDropEvent *de)
{
kdDebug(5800) << "DndFactory::createDrop()" << endl;
@@ -79,7 +79,7 @@ Event *DndFactory::createDrop(QDropEvent *de)
return 0;
}
-Todo *DndFactory::createDropTodo(QDropEvent *de)
+Todo *DndFactory::createDropTodo(TQDropEvent *de)
{
kdDebug(5800) << "VCalFormat::createDropTodo()" << endl;
@@ -110,7 +110,7 @@ bool DndFactory::copyIncidence( Incidence *selectedInc )
{
if ( !selectedInc )
return false;
- QClipboard *cb = QApplication::clipboard();
+ QClipboard *cb = TQApplication::clipboard();
CalendarLocal cal( mCalendar->timeZoneId() );
Incidence *inc = selectedInc->clone();
@@ -120,13 +120,13 @@ bool DndFactory::copyIncidence( Incidence *selectedInc )
return true;
}
-Incidence *DndFactory::pasteIncidence(const QDate &newDate, const QTime *newTime)
+Incidence *DndFactory::pasteIncidence(const TQDate &newDate, const TQTime *newTime)
{
// kdDebug(5800) << "DnDFactory::pasteEvent()" << endl;
CalendarLocal cal( mCalendar->timeZoneId() );
- QClipboard *cb = QApplication::clipboard();
+ QClipboard *cb = TQApplication::clipboard();
if ( !ICalDrag::decode( cb->data(), &cal ) &&
!VCalDrag::decode( cb->data(), &cal ) ) {
@@ -149,31 +149,31 @@ Incidence *DndFactory::pasteIncidence(const QDate &newDate, const QTime *newTime
int daysOffset = anEvent->dtStart().date().daysTo(
anEvent->dtEnd().date() );
// new end date if event starts at the same time on the new day
- QDateTime endDate( newDate.addDays(daysOffset), anEvent->dtEnd().time() );
+ TQDateTime endDate( newDate.addDays(daysOffset), anEvent->dtEnd().time() );
if ( newTime ) {
// additional offset for new time of day
int addSecsOffset( anEvent->dtStart().time().secsTo( *newTime ));
endDate=endDate.addSecs( addSecsOffset );
- anEvent->setDtStart( QDateTime( newDate, *newTime ) );
+ anEvent->setDtStart( TQDateTime( newDate, *newTime ) );
} else {
- anEvent->setDtStart( QDateTime( newDate, anEvent->dtStart().time() ) );
+ anEvent->setDtStart( TQDateTime( newDate, anEvent->dtStart().time() ) );
}
anEvent->setDtEnd( endDate );
} else if ( inc->type() == "Todo" ) {
Todo *anTodo = static_cast<Todo*>( inc );
if ( newTime ) {
- anTodo->setDtDue( QDateTime( newDate, *newTime ) );
+ anTodo->setDtDue( TQDateTime( newDate, *newTime ) );
} else {
- anTodo->setDtDue( QDateTime( newDate, anTodo->dtDue().time() ) );
+ anTodo->setDtDue( TQDateTime( newDate, anTodo->dtDue().time() ) );
}
} else if ( inc->type() == "Journal" ) {
Journal *anJournal = static_cast<Journal*>( inc );
if ( newTime ) {
- anJournal->setDtStart( QDateTime( newDate, *newTime ) );
+ anJournal->setDtStart( TQDateTime( newDate, *newTime ) );
} else {
- anJournal->setDtStart( QDateTime( newDate ) );
+ anJournal->setDtStart( TQDateTime( newDate ) );
}
} else {
kdDebug(5850) << "Trying to paste unknown incidence of type " << inc->type() << endl;
diff --git a/libkcal/dndfactory.h b/libkcal/dndfactory.h
index c9e744ef2..441a0a405 100644
--- a/libkcal/dndfactory.h
+++ b/libkcal/dndfactory.h
@@ -47,19 +47,19 @@ class LIBKCAL_EXPORT DndFactory
/**
Create a drag object.
*/
- ICalDrag *createDrag( Incidence *incidence, QWidget *owner );
+ ICalDrag *createDrag( Incidence *incidence, TQWidget *owner );
/** Create Todo object from drop event */
- Todo *createDropTodo(QDropEvent *de);
+ Todo *createDropTodo(TQDropEvent *de);
/** Create Event object from drop event */
- Event *createDrop(QDropEvent *de);
+ Event *createDrop(TQDropEvent *de);
/** cut incidence to clipboard */
void cutIncidence( Incidence * );
/** copy the incidence to clipboard */
bool copyIncidence( Incidence * );
/** pastes the event or todo and returns a pointer to the new incidence pasted. */
- Incidence *pasteIncidence( const QDate &, const QTime *newTime = 0 );
+ Incidence *pasteIncidence( const TQDate &, const TQTime *newTime = 0 );
private:
Calendar *mCalendar;
diff --git a/libkcal/dummyscheduler.cpp b/libkcal/dummyscheduler.cpp
index eeeb73d79..7a824f08a 100644
--- a/libkcal/dummyscheduler.cpp
+++ b/libkcal/dummyscheduler.cpp
@@ -23,8 +23,8 @@
// DummyScheduler - iMIP implementation of iTIP methods
//
-#include <qfile.h>
-#include <qtextstream.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
#include <kdebug.h>
#include <kstandarddirs.h>
@@ -45,33 +45,33 @@ DummyScheduler::~DummyScheduler()
{
}
-bool DummyScheduler::publish (IncidenceBase *incidence,const QString &/*recipients*/)
+bool DummyScheduler::publish (IncidenceBase *incidence,const TQString &/*recipients*/)
{
- QString messageText = mFormat->createScheduleMessage(incidence,
+ TQString messageText = mFormat->createScheduleMessage(incidence,
Scheduler::Publish);
return saveMessage(messageText);
}
-bool DummyScheduler::performTransaction(IncidenceBase *incidence,Method method,const QString &/*recipients*/)
+bool DummyScheduler::performTransaction(IncidenceBase *incidence,Method method,const TQString &/*recipients*/)
{
- QString messageText = mFormat->createScheduleMessage(incidence,method);
+ TQString messageText = mFormat->createScheduleMessage(incidence,method);
return saveMessage(messageText);
}
bool DummyScheduler::performTransaction(IncidenceBase *incidence,Method method)
{
- QString messageText = mFormat->createScheduleMessage(incidence,method);
+ TQString messageText = mFormat->createScheduleMessage(incidence,method);
return saveMessage(messageText);
}
-bool DummyScheduler::saveMessage(const QString &message)
+bool DummyScheduler::saveMessage(const TQString &message)
{
- QFile f("dummyscheduler.store");
+ TQFile f("dummyscheduler.store");
if (f.open(IO_WriteOnly | IO_Append)) {
- QTextStream t(&f);
+ TQTextStream t(&f);
t << message << endl;
f.close();
return true;
@@ -80,18 +80,18 @@ bool DummyScheduler::saveMessage(const QString &message)
}
}
-QPtrList<ScheduleMessage> DummyScheduler::retrieveTransactions()
+TQPtrList<ScheduleMessage> DummyScheduler::retrieveTransactions()
{
- QPtrList<ScheduleMessage> messageList;
+ TQPtrList<ScheduleMessage> messageList;
- QFile f("dummyscheduler.store");
+ TQFile f("dummyscheduler.store");
if (!f.open(IO_ReadOnly)) {
kdDebug(5800) << "DummyScheduler::retrieveTransactions(): Can't open file"
<< endl;
} else {
- QTextStream t(&f);
- QString messageString;
- QString messageLine = t.readLine();
+ TQTextStream t(&f);
+ TQString messageString;
+ TQString messageLine = t.readLine();
while (!messageLine.isNull()) {
// kdDebug(5800) << "++++++++" << messageLine << endl;
messageString += messageLine + "\n";
@@ -103,7 +103,7 @@ QPtrList<ScheduleMessage> DummyScheduler::retrieveTransactions()
if (message) {
messageList.append(message);
} else {
- QString errorMessage;
+ TQString errorMessage;
if (mFormat->exception()) {
errorMessage = mFormat->exception()->message();
}
@@ -120,8 +120,8 @@ QPtrList<ScheduleMessage> DummyScheduler::retrieveTransactions()
return messageList;
}
-QString DummyScheduler::freeBusyDir()
+TQString DummyScheduler::freeBusyDir()
{
// the dummy scheduler should never handle freebusy stuff - so it's hardcoded
- return QString("");
+ return TQString("");
}
diff --git a/libkcal/dummyscheduler.h b/libkcal/dummyscheduler.h
index 93ca7e65c..8563eb7b3 100644
--- a/libkcal/dummyscheduler.h
+++ b/libkcal/dummyscheduler.h
@@ -37,15 +37,15 @@ class DummyScheduler : public Scheduler
DummyScheduler(Calendar *);
virtual ~DummyScheduler();
- bool publish (IncidenceBase *incidence,const QString &recipients);
+ bool publish (IncidenceBase *incidence,const TQString &recipients);
bool performTransaction(IncidenceBase *incidence,Method method);
- bool performTransaction(IncidenceBase *incidence,Method method,const QString &recipients);
- QPtrList<ScheduleMessage> retrieveTransactions();
+ bool performTransaction(IncidenceBase *incidence,Method method,const TQString &recipients);
+ TQPtrList<ScheduleMessage> retrieveTransactions();
- virtual QString freeBusyDir();
+ virtual TQString freeBusyDir();
protected:
- bool saveMessage(const QString &);
+ bool saveMessage(const TQString &);
private:
class Private;
diff --git a/libkcal/duration.cpp b/libkcal/duration.cpp
index 01ee7562a..0dfd8781c 100644
--- a/libkcal/duration.cpp
+++ b/libkcal/duration.cpp
@@ -31,7 +31,7 @@ Duration::Duration()
mSeconds = 0;
}
-Duration::Duration( const QDateTime &start, const QDateTime &end )
+Duration::Duration( const TQDateTime &start, const TQDateTime &end )
{
mSeconds = start.secsTo( end );
}
@@ -49,7 +49,7 @@ bool KCal::operator==( const Duration& d1, const Duration& d2 )
-QDateTime Duration::end( const QDateTime &start ) const
+TQDateTime Duration::end( const TQDateTime &start ) const
{
return start.addSecs( mSeconds );
}
diff --git a/libkcal/duration.h b/libkcal/duration.h
index 69c939789..b4655d6c0 100644
--- a/libkcal/duration.h
+++ b/libkcal/duration.h
@@ -21,7 +21,7 @@
#ifndef KCAL_DURATION_H
#define KCAL_DURATION_H
-#include <qdatetime.h>
+#include <tqdatetime.h>
#include "libkcal_export.h"
@@ -34,10 +34,10 @@ class LIBKCAL_EXPORT Duration
{
public:
Duration();
- Duration( const QDateTime &start, const QDateTime &end );
+ Duration( const TQDateTime &start, const TQDateTime &end );
Duration( int seconds );
- QDateTime end( const QDateTime &start ) const;
+ TQDateTime end( const TQDateTime &start ) const;
int asSeconds() const;
diff --git a/libkcal/event.cpp b/libkcal/event.cpp
index 077a43318..0f286e7f6 100644
--- a/libkcal/event.cpp
+++ b/libkcal/event.cpp
@@ -70,7 +70,7 @@ bool Event::operator==( const Event& e2 ) const
-void Event::setDtEnd(const QDateTime &dtEnd)
+void Event::setDtEnd(const TQDateTime &dtEnd)
{
if (mReadOnly) return;
@@ -82,7 +82,7 @@ void Event::setDtEnd(const QDateTime &dtEnd)
updated();
}
-QDateTime Event::dtEnd() const
+TQDateTime Event::dtEnd() const
{
if (hasEndDate()) return mDtEnd;
if (hasDuration()) return dtStart().addSecs(duration());
@@ -92,23 +92,23 @@ QDateTime Event::dtEnd() const
return dtStart();
}
-QDate Event::dateEnd() const
+TQDate Event::dateEnd() const
{
if ( doesFloat() ) return dtEnd().date();
else return dtEnd().addSecs(-1).date();
}
-QString Event::dtEndTimeStr() const
+TQString Event::dtEndTimeStr() const
{
return KGlobal::locale()->formatTime(dtEnd().time());
}
-QString Event::dtEndDateStr(bool shortfmt) const
+TQString Event::dtEndDateStr(bool shortfmt) const
{
return KGlobal::locale()->formatDate(dtEnd().date(),shortfmt);
}
-QString Event::dtEndStr() const
+TQString Event::dtEndStr() const
{
return KGlobal::locale()->formatDateTime(dtEnd());
}
@@ -126,8 +126,8 @@ bool Event::hasEndDate() const
bool Event::isMultiDay() const
{
// End date is non inclusive, so subtract 1 second...
- QDateTime start( dtStart() );
- QDateTime end( dtEnd() );
+ TQDateTime start( dtStart() );
+ TQDateTime end( dtEnd() );
if ( ! doesFloat() ) {
end = end.addSecs(-1);
}
diff --git a/libkcal/event.h b/libkcal/event.h
index 334c10392..39980556c 100644
--- a/libkcal/event.h
+++ b/libkcal/event.h
@@ -48,7 +48,7 @@ class LIBKCAL_EXPORT Event : public Incidence
Event& operator=( const Event &e );
bool operator==( const Event & ) const;
- QCString type() const { return "Event"; }
+ TQCString type() const { return "Event"; }
/**
Return copy of this Event. The caller owns the returned objet.
@@ -58,22 +58,22 @@ class LIBKCAL_EXPORT Event : public Incidence
/**
Set end date and time.
*/
- void setDtEnd(const QDateTime &dtEnd);
+ void setDtEnd(const TQDateTime &dtEnd);
/**
Return end date and time.
*/
- virtual QDateTime dtEnd() const;
+ virtual TQDateTime dtEnd() const;
/**
Returns the day when the event ends. This might be different from
dtEnd().date, since the end date/time is non-inclusive. So timed events
ending at 0:00 have their end date on the day before.
*/
- QDate dateEnd() const;
+ TQDate dateEnd() const;
/**
Return end time as string formatted according to the users locale
settings.
*/
- QString dtEndTimeStr() const;
+ TQString dtEndTimeStr() const;
/**
Return end date as string formatted according to the users locale
settings.
@@ -81,12 +81,12 @@ class LIBKCAL_EXPORT Event : public Incidence
@param shortfmt if true return string in short format, if false return
long format
*/
- QString dtEndDateStr( bool shortfmt = true ) const;
+ TQString dtEndDateStr( bool shortfmt = true ) const;
/**
Return end date and time as string formatted according to the users locale
settings.
*/
- QString dtEndStr() const;
+ TQString dtEndStr() const;
/**
Set whether the event has an end date/time.
@@ -118,11 +118,11 @@ class LIBKCAL_EXPORT Event : public Incidence
protected:
/** Return the end date/time of the base incidence. */
- virtual QDateTime endDateRecurrenceBase() const { return dtEnd(); }
+ virtual TQDateTime endDateRecurrenceBase() const { return dtEnd(); }
private:
bool accept( Visitor &v ) { return v.visit( this ); }
- QDateTime mDtEnd;
+ TQDateTime mDtEnd;
bool mHasEndDate;
Transparency mTransparency;
diff --git a/libkcal/exceptions.cpp b/libkcal/exceptions.cpp
index 677ec418a..98d7153eb 100644
--- a/libkcal/exceptions.cpp
+++ b/libkcal/exceptions.cpp
@@ -26,7 +26,7 @@
using namespace KCal;
-Exception::Exception(const QString &message)
+Exception::Exception(const TQString &message)
{
mMessage = message;
}
@@ -35,22 +35,22 @@ Exception::~Exception()
{
}
-QString Exception::message()
+TQString Exception::message()
{
if (mMessage.isEmpty()) return i18n("%1 Error").arg(CalFormat::application());
else return mMessage;
}
-ErrorFormat::ErrorFormat(ErrorCodeFormat code,const QString &message) :
+ErrorFormat::ErrorFormat(ErrorCodeFormat code,const TQString &message) :
Exception(message)
{
mCode = code;
}
-QString ErrorFormat::message()
+TQString ErrorFormat::message()
{
- QString message = "";
+ TQString message = "";
switch (mCode) {
case LoadError:
diff --git a/libkcal/exceptions.h b/libkcal/exceptions.h
index b86f513a6..1ae90d516 100644
--- a/libkcal/exceptions.h
+++ b/libkcal/exceptions.h
@@ -28,7 +28,7 @@
// returned by an error function, but we can build upon them, if we start
// to use C++ exceptions.
-#include <qstring.h>
+#include <tqstring.h>
namespace KCal {
@@ -42,16 +42,16 @@ class Exception
/**
Construct exception with descriptive message \a message.
*/
- Exception( const QString &message = QString::null );
+ Exception( const TQString &message = TQString::null );
virtual ~Exception();
/**
Return descriptive message of exception.
*/
- virtual QString message();
+ virtual TQString message();
protected:
- QString mMessage;
+ TQString mMessage;
private:
class Private;
@@ -74,12 +74,12 @@ class ErrorFormat : public Exception
/**
Create format error exception.
*/
- ErrorFormat( ErrorCodeFormat code, const QString &message = QString::null );
+ ErrorFormat( ErrorCodeFormat code, const TQString &message = TQString::null );
/**
Return format error message.
*/
- QString message();
+ TQString message();
/**
Return format error code.
*/
diff --git a/libkcal/filestorage.cpp b/libkcal/filestorage.cpp
index 5419a2541..51f4d80c9 100644
--- a/libkcal/filestorage.cpp
+++ b/libkcal/filestorage.cpp
@@ -21,9 +21,9 @@
#include <stdlib.h>
-#include <qdatetime.h>
-#include <qstring.h>
-#include <qptrlist.h>
+#include <tqdatetime.h>
+#include <tqstring.h>
+#include <tqptrlist.h>
#include <kdebug.h>
@@ -36,7 +36,7 @@
using namespace KCal;
-FileStorage::FileStorage( Calendar *cal, const QString &fileName,
+FileStorage::FileStorage( Calendar *cal, const TQString &fileName,
CalFormat *format )
: CalStorage( cal ),
mFileName( fileName ),
@@ -49,12 +49,12 @@ FileStorage::~FileStorage()
delete mSaveFormat;
}
-void FileStorage::setFileName( const QString &fileName )
+void FileStorage::setFileName( const TQString &fileName )
{
mFileName = fileName;
}
-QString FileStorage::fileName()const
+TQString FileStorage::fileName()const
{
return mFileName;
}
diff --git a/libkcal/filestorage.h b/libkcal/filestorage.h
index c4fc73917..1d12cc4e0 100644
--- a/libkcal/filestorage.h
+++ b/libkcal/filestorage.h
@@ -32,12 +32,12 @@ class CalFormat;
class LIBKCAL_EXPORT FileStorage : public CalStorage
{
public:
- FileStorage( Calendar *, const QString &fileName = QString::null,
+ FileStorage( Calendar *, const TQString &fileName = TQString::null,
CalFormat *format = 0 );
virtual ~FileStorage();
- void setFileName( const QString &mFileName );
- QString fileName() const;
+ void setFileName( const TQString &mFileName );
+ TQString fileName() const;
/**
FileStorage takes ownership of format object.
@@ -51,7 +51,7 @@ class LIBKCAL_EXPORT FileStorage : public CalStorage
bool close();
private:
- QString mFileName;
+ TQString mFileName;
CalFormat *mSaveFormat;
class Private;
diff --git a/libkcal/freebusy.cpp b/libkcal/freebusy.cpp
index 71f05b35b..75d0e7db4 100644
--- a/libkcal/freebusy.cpp
+++ b/libkcal/freebusy.cpp
@@ -30,13 +30,13 @@ FreeBusy::FreeBusy()
{
}
-FreeBusy::FreeBusy(const QDateTime &start, const QDateTime &end)
+FreeBusy::FreeBusy(const TQDateTime &start, const TQDateTime &end)
{
setDtStart(start);
setDtEnd(end);
}
-FreeBusy::FreeBusy( Calendar *calendar, const QDateTime &start, const QDateTime &end )
+FreeBusy::FreeBusy( Calendar *calendar, const TQDateTime &start, const TQDateTime &end )
{
kdDebug(5800) << "FreeBusy::FreeBusy" << endl;
mCalendar = calendar;
@@ -49,9 +49,9 @@ FreeBusy::FreeBusy( Calendar *calendar, const QDateTime &start, const QDateTime
int extraDays, i, x, duration;
duration = start.daysTo(end);
- QDate day;
- QDateTime tmpStart;
- QDateTime tmpEnd;
+ TQDate day;
+ TQDateTime tmpStart;
+ TQDateTime tmpEnd;
// Loops through every event in the calendar
Event::List::ConstIterator it;
for( it = eventList.begin(); it != eventList.end(); ++it ) {
@@ -68,8 +68,8 @@ FreeBusy::FreeBusy( Calendar *calendar, const QDateTime &start, const QDateTime
floatingEvent = new Event( *event );
// Set the start and end times to be on midnight
- QDateTime start( floatingEvent->dtStart().date(), QTime( 0, 0 ) );
- QDateTime end( floatingEvent->dtEnd().date(), QTime( 23, 59, 59, 999 ) );
+ TQDateTime start( floatingEvent->dtStart().date(), TQTime( 0, 0 ) );
+ TQDateTime end( floatingEvent->dtEnd().date(), TQTime( 23, 59, 59, 999 ) );
floatingEvent->setFloats( false );
floatingEvent->setDtStart( start );
floatingEvent->setDtEnd( end );
@@ -134,13 +134,13 @@ FreeBusy::~FreeBusy()
{
}
-bool FreeBusy::setDtEnd( const QDateTime &end )
+bool FreeBusy::setDtEnd( const TQDateTime &end )
{
mDtEnd = end;
return true;
}
-QDateTime FreeBusy::dtEnd() const
+TQDateTime FreeBusy::dtEnd() const
{
return mDtEnd;
}
@@ -150,9 +150,9 @@ PeriodList FreeBusy::busyPeriods() const
return mBusyPeriods;
}
-bool FreeBusy::addLocalPeriod(const QDateTime &eventStart, const QDateTime &eventEnd ) {
- QDateTime tmpStart;
- QDateTime tmpEnd;
+bool FreeBusy::addLocalPeriod(const TQDateTime &eventStart, const TQDateTime &eventEnd ) {
+ TQDateTime tmpStart;
+ TQDateTime tmpEnd;
//Check to see if the start *or* end of the event is
//between the start and end of the freebusy dates.
@@ -197,13 +197,13 @@ void FreeBusy::addPeriods(const PeriodList &list )
sortList();
}
-void FreeBusy::addPeriod(const QDateTime &start, const QDateTime &end)
+void FreeBusy::addPeriod(const TQDateTime &start, const TQDateTime &end)
{
mBusyPeriods.append( Period(start, end) );
sortList();
}
-void FreeBusy::addPeriod( const QDateTime &start, const Duration &dur )
+void FreeBusy::addPeriod( const TQDateTime &start, const Duration &dur )
{
mBusyPeriods.append( Period(start, dur) );
sortList();
@@ -217,8 +217,8 @@ void FreeBusy::merge( FreeBusy *freeBusy )
if ( freeBusy->dtEnd() > dtEnd() )
setDtEnd( freeBusy->dtEnd() );
- QValueList<Period> periods = freeBusy->busyPeriods();
- QValueList<Period>::ConstIterator it;
+ TQValueList<Period> periods = freeBusy->busyPeriods();
+ TQValueList<Period>::ConstIterator it;
for ( it = periods.begin(); it != periods.end(); ++it )
addPeriod( (*it).start(), (*it).end() );
}
diff --git a/libkcal/freebusy.h b/libkcal/freebusy.h
index 0ba1e2cd5..d87234f30 100644
--- a/libkcal/freebusy.h
+++ b/libkcal/freebusy.h
@@ -22,9 +22,9 @@
#ifndef KCAL_FREEBUSY_H
#define KCAL_FREEBUSY_H
-#include <qdatetime.h>
-#include <qvaluelist.h>
-#include <qptrlist.h>
+#include <tqdatetime.h>
+#include <tqvaluelist.h>
+#include <tqptrlist.h>
#include "period.h"
#include "calendar.h"
@@ -33,7 +33,7 @@
namespace KCal {
- typedef QValueList<Period> PeriodList;
+ typedef TQValueList<Period> PeriodList;
/**
This class provides information about free/busy time of a calendar user.
*/
@@ -41,23 +41,23 @@ class LIBKCAL_EXPORT FreeBusy : public IncidenceBase
{
public:
FreeBusy();
- FreeBusy( const QDateTime &start, const QDateTime &end );
- FreeBusy( Calendar *calendar, const QDateTime &start,
- const QDateTime &end );
+ FreeBusy( const TQDateTime &start, const TQDateTime &end );
+ FreeBusy( Calendar *calendar, const TQDateTime &start,
+ const TQDateTime &end );
FreeBusy( PeriodList busyPeriods );
~FreeBusy();
- QCString type() const { return "FreeBusy"; }
+ TQCString type() const { return "FreeBusy"; }
- virtual QDateTime dtEnd() const;
- bool setDtEnd( const QDateTime &end );
+ virtual TQDateTime dtEnd() const;
+ bool setDtEnd( const TQDateTime &end );
PeriodList busyPeriods() const;
/** Adds a period to the freebusy list and sorts the list. */
- void addPeriod( const QDateTime &start, const QDateTime &end );
- void addPeriod( const QDateTime &start, const Duration &dur );
+ void addPeriod( const TQDateTime &start, const TQDateTime &end );
+ void addPeriod( const TQDateTime &start, const Duration &dur );
/** Adds a list of periods to the freebusy object and then sorts
* that list. Use this if you are adding many items, instead of the
* addPeriod method, to avoid sorting repeatedly. */
@@ -69,9 +69,9 @@ class LIBKCAL_EXPORT FreeBusy : public IncidenceBase
private:
bool accept( Visitor &v ) { return v.visit( this ); }
//This is used for creating a freebusy object for the current user
- bool addLocalPeriod( const QDateTime &start, const QDateTime &end );
+ bool addLocalPeriod( const TQDateTime &start, const TQDateTime &end );
- QDateTime mDtEnd;
+ TQDateTime mDtEnd;
PeriodList mBusyPeriods;
Calendar *mCalendar;
diff --git a/libkcal/freebusycache.h b/libkcal/freebusycache.h
index 180c4e4a1..8e925ac18 100644
--- a/libkcal/freebusycache.h
+++ b/libkcal/freebusycache.h
@@ -21,7 +21,7 @@
#ifndef KCAL_FREEBUSYCACHE_H
#define KCAL_FREEBUSYCACHE_H
-#include <qstring.h>
+#include <tqstring.h>
namespace KCal {
@@ -34,12 +34,12 @@ class FreeBusyCache
Save freebusy information belonging to an email.
*/
virtual bool saveFreeBusy( FreeBusy *freebusy, const Person &person ) = 0;
-// virtual bool saveFreeBusy( FreeBusy *, const QString &email ) = 0;
+// virtual bool saveFreeBusy( FreeBusy *, const TQString &email ) = 0;
/**
Load freebusy information belonging to an email.
*/
- virtual FreeBusy *loadFreeBusy( const QString &email ) = 0;
+ virtual FreeBusy *loadFreeBusy( const TQString &email ) = 0;
};
}
diff --git a/libkcal/freebusyurlstore.cpp b/libkcal/freebusyurlstore.cpp
index d8f71ea43..2e913d56f 100644
--- a/libkcal/freebusyurlstore.cpp
+++ b/libkcal/freebusyurlstore.cpp
@@ -41,7 +41,7 @@ FreeBusyUrlStore *FreeBusyUrlStore::self()
FreeBusyUrlStore::FreeBusyUrlStore()
{
- QString configFile = locateLocal( "data", "korganizer/freebusyurls" );
+ TQString configFile = locateLocal( "data", "korganizer/freebusyurls" );
mConfig = new KConfig( configFile );
}
@@ -50,14 +50,14 @@ FreeBusyUrlStore::~FreeBusyUrlStore()
delete mConfig;
}
-void FreeBusyUrlStore::writeUrl( const QString &email, const QString &url )
+void FreeBusyUrlStore::writeUrl( const TQString &email, const TQString &url )
{
mConfig->setGroup( email );
mConfig->writeEntry( "url", url );
}
-QString FreeBusyUrlStore::readUrl( const QString &email )
+TQString FreeBusyUrlStore::readUrl( const TQString &email )
{
mConfig->setGroup( email );
diff --git a/libkcal/freebusyurlstore.h b/libkcal/freebusyurlstore.h
index 28355782b..6beb4d03a 100644
--- a/libkcal/freebusyurlstore.h
+++ b/libkcal/freebusyurlstore.h
@@ -21,7 +21,7 @@
#ifndef KCAL_FREEBUSYURLSTORE_H
#define KCAL_FREEBUSYURLSTORE_H
-#include <qstring.h>
+#include <tqstring.h>
#include "libkcal_export.h"
@@ -35,9 +35,9 @@ class LIBKCAL_EXPORT FreeBusyUrlStore
static FreeBusyUrlStore *self();
~FreeBusyUrlStore();
- void writeUrl( const QString &email, const QString &url );
+ void writeUrl( const TQString &email, const TQString &url );
- QString readUrl( const QString &email );
+ TQString readUrl( const TQString &email );
void sync();
diff --git a/libkcal/htmlexport.cpp b/libkcal/htmlexport.cpp
index 8d1570159..fd994fca2 100644
--- a/libkcal/htmlexport.cpp
+++ b/libkcal/htmlexport.cpp
@@ -20,11 +20,11 @@
Boston, MA 02110-1301, USA.
*/
-#include <qapplication.h>
-#include <qfile.h>
-#include <qtextstream.h>
-#include <qtextcodec.h>
-#include <qregexp.h>
+#include <tqapplication.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
+#include <tqtextcodec.h>
+#include <tqregexp.h>
#include <kcharsets.h>
#include <kglobal.h>
@@ -49,29 +49,29 @@ HtmlExport::HtmlExport( Calendar *calendar, HTMLExportSettings *settings ) :
{
}
-bool HtmlExport::save( const QString &fileName )
+bool HtmlExport::save( const TQString &fileName )
{
- QString fn( fileName );
+ TQString fn( fileName );
if ( fn.isEmpty() && mSettings ) {
fn = mSettings->outputFile();
}
if ( !mSettings || fn.isEmpty() ) {
return false;
}
- QFile f( fileName );
+ TQFile f( fileName );
if ( !f.open(IO_WriteOnly)) {
return false;
}
- QTextStream ts(&f);
+ TQTextStream ts(&f);
bool success = save(&ts);
f.close();
return success;
}
-bool HtmlExport::save(QTextStream *ts)
+bool HtmlExport::save(TQTextStream *ts)
{
if ( !mSettings ) return false;
- ts->setEncoding( QTextStream::UnicodeUTF8 );
+ ts->setEncoding( TQTextStream::UnicodeUTF8 );
// Write HTML header
*ts << "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" ";
@@ -134,12 +134,12 @@ bool HtmlExport::save(QTextStream *ts)
return true;
}
-void HtmlExport::createMonthView(QTextStream *ts)
+void HtmlExport::createMonthView(TQTextStream *ts)
{
- QDate start = fromDate();
+ TQDate start = fromDate();
start.setYMD( start.year(), start.month(), 1 ); // go back to first day in month
- QDate end( start.year(), start.month(), start.daysInMonth() );
+ TQDate end( start.year(), start.month(), start.daysInMonth() );
int startmonth = start.month();
int startyear = start.year();
@@ -176,7 +176,7 @@ void HtmlExport::createMonthView(QTextStream *ts)
} else {
*ts << "class=\"date\"";
}
- *ts << ">" << QString::number(start.day());
+ *ts << ">" << TQString::number(start.day());
if (mHolidayMap.contains(start)) {
*ts << " <em>" << mHolidayMap[start] << "</em>";
@@ -216,7 +216,7 @@ void HtmlExport::createMonthView(QTextStream *ts)
}
}
-void HtmlExport::createEventList (QTextStream *ts)
+void HtmlExport::createEventList (TQTextStream *ts)
{
int columns = 3;
*ts << "<table border=\"0\" cellpadding=\"3\" cellspacing=\"3\">\n";
@@ -239,7 +239,7 @@ void HtmlExport::createEventList (QTextStream *ts)
*ts << " </tr>\n";
- for ( QDate dt = fromDate(); dt <= toDate(); dt = dt.addDays(1) ) {
+ for ( TQDate dt = fromDate(); dt <= toDate(); dt = dt.addDays(1) ) {
kdDebug(5850) << "Getting events for " << dt.toString() << endl;
Event::List events = mCalendar->events(dt,
EventSortStartDate,
@@ -250,7 +250,7 @@ void HtmlExport::createEventList (QTextStream *ts)
for( it = events.begin(); it != events.end(); ++it ) {
if ( checkSecrecy( *it ) ) {
if ( first ) {
- *ts << " <tr><td colspan=\"" << QString::number(columns)
+ *ts << " <tr><td colspan=\"" << TQString::number(columns)
<< "\" class=\"datehead\"><i>"
<< KGlobal::locale()->formatDate(dt)
<< "</i></td></tr>\n";
@@ -265,8 +265,8 @@ void HtmlExport::createEventList (QTextStream *ts)
*ts << "</table>\n";
}
-void HtmlExport::createEvent (QTextStream *ts, Event *event,
- QDate date,bool withDescription)
+void HtmlExport::createEvent (TQTextStream *ts, Event *event,
+ TQDate date,bool withDescription)
{
kdDebug(5850) << "HtmlExport::createEvent(): " << event->summary() << endl;
*ts << " <tr>\n";
@@ -314,7 +314,7 @@ void HtmlExport::createEvent (QTextStream *ts, Event *event,
*ts << " </tr>\n";
}
-void HtmlExport::createTodoList ( QTextStream *ts )
+void HtmlExport::createTodoList ( TQTextStream *ts )
{
Todo::List rawTodoList = mCalendar->todos();
@@ -386,7 +386,7 @@ void HtmlExport::createTodoList ( QTextStream *ts )
// Generate sub-task list of event ev
*ts << " <tr>\n";
*ts << " <td class=\"subhead\" colspan=";
- *ts << "\"" << QString::number(columns) << "\"";
+ *ts << "\"" << TQString::number(columns) << "\"";
*ts << "><a name=\"sub" << (*it)->uid() << "\"></a>"
<< i18n("Sub-Tasks of: ") << "<a href=\"#"
<< (*it)->uid() << "\"><b>" << cleanChars( (*it)->summary())
@@ -419,7 +419,7 @@ void HtmlExport::createTodoList ( QTextStream *ts )
*ts << "</table>\n";
}
-void HtmlExport::createTodo (QTextStream *ts,Todo *todo)
+void HtmlExport::createTodo (TQTextStream *ts,Todo *todo)
{
kdDebug(5850) << "HtmlExport::createTodo()" << endl;
@@ -493,18 +493,18 @@ void HtmlExport::createTodo (QTextStream *ts,Todo *todo)
*ts << "</tr>\n";
}
-void HtmlExport::createWeekView( QTextStream */*ts*/ )
+void HtmlExport::createWeekView( TQTextStream */*ts*/ )
{
// FIXME: Implement this!
}
-void HtmlExport::createJournalView( QTextStream */*ts*/ )
+void HtmlExport::createJournalView( TQTextStream */*ts*/ )
{
// Journal::List rawJournalList = mCalendar->journals();
// FIXME: Implement this!
}
-void HtmlExport::createFreeBusyView( QTextStream */*ts*/ )
+void HtmlExport::createFreeBusyView( TQTextStream */*ts*/ )
{
// FIXME: Implement this!
}
@@ -525,7 +525,7 @@ bool HtmlExport::checkSecrecy( Incidence *incidence )
return false;
}
-void HtmlExport::formatLocation (QTextStream *ts,Incidence *event)
+void HtmlExport::formatLocation (TQTextStream *ts,Incidence *event)
{
if (!event->location().isEmpty()) {
*ts << " " << cleanChars(event->location()) << "\n";
@@ -534,7 +534,7 @@ void HtmlExport::formatLocation (QTextStream *ts,Incidence *event)
}
}
-void HtmlExport::formatCategories (QTextStream *ts,Incidence *event)
+void HtmlExport::formatCategories (TQTextStream *ts,Incidence *event)
{
if (!event->categoriesStr().isEmpty()) {
*ts << " " << cleanChars(event->categoriesStr()) << "\n";
@@ -543,7 +543,7 @@ void HtmlExport::formatCategories (QTextStream *ts,Incidence *event)
}
}
-void HtmlExport::formatAttendees( QTextStream *ts, Incidence *event )
+void HtmlExport::formatAttendees( TQTextStream *ts, Incidence *event )
{
Attendee::List attendees = event->attendees();
if (attendees.count()) {
@@ -579,16 +579,16 @@ void HtmlExport::formatAttendees( QTextStream *ts, Incidence *event )
}
}
-QString HtmlExport::breakString(const QString &text)
+TQString HtmlExport::breakString(const TQString &text)
{
int number = text.contains("\n");
if(number < 0) {
return text;
} else {
- QString out;
- QString tmpText = text;
+ TQString out;
+ TQString tmpText = text;
int pos = 0;
- QString tmp;
+ TQString tmp;
for(int i=0;i<=number;i++) {
pos = tmpText.find("\n");
tmp = tmpText.left(pos);
@@ -599,15 +599,15 @@ QString HtmlExport::breakString(const QString &text)
}
}
-void HtmlExport::createFooter( QTextStream *ts )
+void HtmlExport::createFooter( TQTextStream *ts )
{
// FIXME: Implement this in a translatable way!
- QString trailer = i18n("This page was created ");
+ TQString trailer = i18n("This page was created ");
/* bool hasPerson = false;
bool hasCredit = false;
bool hasCreditURL = false;
- QString mail, name, credit, creditURL;*/
+ TQString mail, name, credit, creditURL;*/
if (!mSettings->eMail().isEmpty()) {
if (!mSettings->name().isEmpty())
trailer += i18n("by <a href=\"mailto:%1\">%2</a> ").arg( mSettings->eMail() ).arg( mSettings->name() );
@@ -629,43 +629,43 @@ void HtmlExport::createFooter( QTextStream *ts )
}
-QString HtmlExport::cleanChars(const QString &text)
+TQString HtmlExport::cleanChars(const TQString &text)
{
- QString txt = text;
+ TQString txt = text;
txt = txt.replace( "&", "&amp;" );
txt = txt.replace( "<", "&lt;" );
txt = txt.replace( ">", "&gt;" );
txt = txt.replace( "\"", "&quot;" );
- txt = txt.replace( QString::fromUtf8("ä"), "&auml;" );
- txt = txt.replace( QString::fromUtf8("á"), "&aacute;" );
- txt = txt.replace( QString::fromUtf8("à"), "&agrave;" );
- txt = txt.replace( QString::fromUtf8("â"), "&acirc;" );
- txt = txt.replace( QString::fromUtf8("Ä"), "&Auml;" );
- txt = txt.replace( QString::fromUtf8("ó"), "&oacute;" );
- txt = txt.replace( QString::fromUtf8("ô"), "&ocirc;" );
- txt = txt.replace( QString::fromUtf8("ö"), "&ouml;" );
- txt = txt.replace( QString::fromUtf8("Ö"), "&Ouml;" );
- txt = txt.replace( QString::fromUtf8("ü"), "&uuml;" );
- txt = txt.replace( QString::fromUtf8("Ü"), "&Uuml;" );
- txt = txt.replace( QString::fromUtf8("ß"), "&szlig;" );
- txt = txt.replace( QString::fromUtf8("€"), "&euro;" );
- txt = txt.replace( QString::fromUtf8("é"), "&eacute;" );
- txt = txt.replace( QString::fromUtf8("ë"), "&euml;" );
- txt = txt.replace( QString::fromUtf8("è"), "&egrave;" );
- txt = txt.replace( QString::fromUtf8("ñ"), "&ntilde;" );
- txt = txt.replace( QString::fromUtf8("ç"), "&ccedil;" );
+ txt = txt.replace( TQString::fromUtf8("ä"), "&auml;" );
+ txt = txt.replace( TQString::fromUtf8("á"), "&aacute;" );
+ txt = txt.replace( TQString::fromUtf8("à"), "&agrave;" );
+ txt = txt.replace( TQString::fromUtf8("â"), "&acirc;" );
+ txt = txt.replace( TQString::fromUtf8("Ä"), "&Auml;" );
+ txt = txt.replace( TQString::fromUtf8("ó"), "&oacute;" );
+ txt = txt.replace( TQString::fromUtf8("ô"), "&ocirc;" );
+ txt = txt.replace( TQString::fromUtf8("ö"), "&ouml;" );
+ txt = txt.replace( TQString::fromUtf8("Ö"), "&Ouml;" );
+ txt = txt.replace( TQString::fromUtf8("ü"), "&uuml;" );
+ txt = txt.replace( TQString::fromUtf8("Ü"), "&Uuml;" );
+ txt = txt.replace( TQString::fromUtf8("ß"), "&szlig;" );
+ txt = txt.replace( TQString::fromUtf8("€"), "&euro;" );
+ txt = txt.replace( TQString::fromUtf8("é"), "&eacute;" );
+ txt = txt.replace( TQString::fromUtf8("ë"), "&euml;" );
+ txt = txt.replace( TQString::fromUtf8("è"), "&egrave;" );
+ txt = txt.replace( TQString::fromUtf8("ñ"), "&ntilde;" );
+ txt = txt.replace( TQString::fromUtf8("ç"), "&ccedil;" );
return txt;
}
-QString HtmlExport::styleSheet() const
+TQString HtmlExport::styleSheet() const
{
if ( !mSettings->styleSheet().isEmpty() )
return mSettings->styleSheet();
- QString css;
+ TQString css;
- if ( QApplication::reverseLayout() ) {
+ if ( TQApplication::reverseLayout() ) {
css += " body { background-color:white; color:black; direction: rtl }\n";
css += " td { text-align:center; background-color:#eee }\n";
css += " th { text-align:center; background-color:#228; color:white }\n";
@@ -693,7 +693,7 @@ QString HtmlExport::styleSheet() const
}
-void HtmlExport::addHoliday( const QDate &date, const QString &name)
+void HtmlExport::addHoliday( const TQDate &date, const TQString &name)
{
if ( mHolidayMap[date].isEmpty() ) {
mHolidayMap[date] = name;
@@ -702,12 +702,12 @@ void HtmlExport::addHoliday( const QDate &date, const QString &name)
}
}
-QDate HtmlExport::fromDate() const
+TQDate HtmlExport::fromDate() const
{
return mSettings->dateStart().date();
}
-QDate HtmlExport::toDate() const
+TQDate HtmlExport::toDate() const
{
return mSettings->dateEnd().date();
}
diff --git a/libkcal/htmlexport.h b/libkcal/htmlexport.h
index c1642590d..b411778df 100644
--- a/libkcal/htmlexport.h
+++ b/libkcal/htmlexport.h
@@ -22,9 +22,9 @@
#ifndef KCAL_HTMLEXPORT_H
#define KCAL_HTMLEXPORT_H
-#include <qstring.h>
-#include <qdatetime.h>
-#include <qmap.h>
+#include <tqstring.h>
+#include <tqdatetime.h>
+#include <tqmap.h>
#include <libkcal/calendar.h>
#include <libkcal/htmlexportsettings.h>
@@ -51,46 +51,46 @@ class KDE_EXPORT HtmlExport
/**
Writes out the calendar in HTML format.
*/
- bool save( const QString &fileName = QString::null );
+ bool save( const TQString &fileName = TQString::null );
/**
Writes out calendar to text stream.
*/
- bool save( QTextStream * );
+ bool save( TQTextStream * );
- void addHoliday( const QDate &date, const QString &name );
+ void addHoliday( const TQDate &date, const TQString &name );
protected:
- void createWeekView( QTextStream *ts );
- void createMonthView( QTextStream *ts );
- void createEventList( QTextStream *ts );
- void createTodoList( QTextStream *ts );
- void createJournalView( QTextStream *ts );
- void createFreeBusyView( QTextStream *ts );
-
- void createTodo( QTextStream *ts, Todo *todo);
- void createEvent( QTextStream *ts, Event *event, QDate date,
+ void createWeekView( TQTextStream *ts );
+ void createMonthView( TQTextStream *ts );
+ void createEventList( TQTextStream *ts );
+ void createTodoList( TQTextStream *ts );
+ void createJournalView( TQTextStream *ts );
+ void createFreeBusyView( TQTextStream *ts );
+
+ void createTodo( TQTextStream *ts, Todo *todo);
+ void createEvent( TQTextStream *ts, Event *event, TQDate date,
bool withDescription = true);
- void createFooter( QTextStream *ts );
+ void createFooter( TQTextStream *ts );
bool checkSecrecy( Incidence * );
- void formatLocation( QTextStream *ts, Incidence *event );
- void formatCategories( QTextStream *ts, Incidence *event );
- void formatAttendees( QTextStream *ts, Incidence *event );
+ void formatLocation( TQTextStream *ts, Incidence *event );
+ void formatCategories( TQTextStream *ts, Incidence *event );
+ void formatAttendees( TQTextStream *ts, Incidence *event );
- QString breakString( const QString &text );
+ TQString breakString( const TQString &text );
- QDate fromDate() const;
- QDate toDate() const;
- QString styleSheet() const;
+ TQDate fromDate() const;
+ TQDate toDate() const;
+ TQString styleSheet() const;
private:
- QString cleanChars( const QString &txt );
+ TQString cleanChars( const TQString &txt );
Calendar *mCalendar;
HTMLExportSettings *mSettings;
- QMap<QDate,QString> mHolidayMap;
+ TQMap<TQDate,TQString> mHolidayMap;
class Private;
Private *d;
diff --git a/libkcal/icaldrag.cpp b/libkcal/icaldrag.cpp
index ad7e9549c..39315f5a6 100644
--- a/libkcal/icaldrag.cpp
+++ b/libkcal/icaldrag.cpp
@@ -28,27 +28,27 @@
using namespace KCal;
-ICalDrag::ICalDrag( Calendar *cal, QWidget *parent, const char *name )
- : QStoredDrag( "text/calendar", parent, name )
+ICalDrag::ICalDrag( Calendar *cal, TQWidget *parent, const char *name )
+ : TQStoredDrag( "text/calendar", parent, name )
{
ICalFormat icf;
- QString scal = icf.toString( cal );
+ TQString scal = icf.toString( cal );
setEncodedData( scal.utf8() );
}
-bool ICalDrag::canDecode( QMimeSource *me )
+bool ICalDrag::canDecode( TQMimeSource *me )
{
return me->provides( "text/calendar" );
}
-bool ICalDrag::decode( QMimeSource *de, Calendar *cal )
+bool ICalDrag::decode( TQMimeSource *de, Calendar *cal )
{
bool success = false;
- QByteArray payload = de->encodedData( "text/calendar" );
+ TQByteArray payload = de->encodedData( "text/calendar" );
if ( payload.size() ) {
- QString txt = QString::fromUtf8( payload.data() );
+ TQString txt = TQString::fromUtf8( payload.data() );
ICalFormat icf;
success = icf.fromString( cal, txt );
diff --git a/libkcal/icaldrag.h b/libkcal/icaldrag.h
index cddc9894c..eecb03b9b 100644
--- a/libkcal/icaldrag.h
+++ b/libkcal/icaldrag.h
@@ -23,7 +23,7 @@
#ifndef KCAL_ICALDRAG_H
#define KCAL_ICALDRAG_H
-#include <qdragobject.h>
+#include <tqdragobject.h>
#include "calendar.h"
#include "libkcal_export.h"
@@ -38,17 +38,17 @@ class LIBKCAL_EXPORT ICalDrag : public QStoredDrag
/**
Create a drag&drop object for iCalendar component \a ical.
*/
- ICalDrag( Calendar *cal, QWidget *parent = 0, const char *name = 0 );
+ ICalDrag( Calendar *cal, TQWidget *parent = 0, const char *name = 0 );
~ICalDrag() {};
/**
Return, if drag&drop object can be decode to iCalendar.
*/
- static bool canDecode( QMimeSource * );
+ static bool canDecode( TQMimeSource * );
/**
Decode drag&drop object to iCalendar component \a cal.
*/
- static bool decode( QMimeSource *e, Calendar *cal );
+ static bool decode( TQMimeSource *e, Calendar *cal );
private:
class Private;
diff --git a/libkcal/icalformat.cpp b/libkcal/icalformat.cpp
index f1b75c5a5..4fae0eaf2 100644
--- a/libkcal/icalformat.cpp
+++ b/libkcal/icalformat.cpp
@@ -19,13 +19,13 @@
Boston, MA 02110-1301, USA.
*/
-#include <qdatetime.h>
-#include <qstring.h>
-#include <qptrlist.h>
-#include <qregexp.h>
-#include <qclipboard.h>
-#include <qfile.h>
-#include <qtextstream.h>
+#include <tqdatetime.h>
+#include <tqstring.h>
+#include <tqptrlist.h>
+#include <tqregexp.h>
+#include <tqclipboard.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
#include <kdebug.h>
#include <klocale.h>
@@ -75,21 +75,21 @@ void ICalFormat::setImplementation( ICalFormatImpl *impl )
#undef open
#endif
-bool ICalFormat::load( Calendar *calendar, const QString &fileName)
+bool ICalFormat::load( Calendar *calendar, const TQString &fileName)
{
kdDebug(5800) << "ICalFormat::load() " << fileName << endl;
clearException();
- QFile file( fileName );
+ TQFile file( fileName );
if (!file.open( IO_ReadOnly ) ) {
kdDebug(5800) << "ICalFormat::load() load error" << endl;
setException(new ErrorFormat(ErrorFormat::LoadError));
return false;
}
- QTextStream ts( &file );
- ts.setEncoding( QTextStream::Latin1 );
- QString text = ts.read();
+ TQTextStream ts( &file );
+ ts.setEncoding( TQTextStream::Latin1 );
+ TQString text = ts.read();
file.close();
if ( text.stripWhiteSpace().isEmpty() ) // empty files are valid
@@ -99,13 +99,13 @@ bool ICalFormat::load( Calendar *calendar, const QString &fileName)
}
-bool ICalFormat::save( Calendar *calendar, const QString &fileName )
+bool ICalFormat::save( Calendar *calendar, const TQString &fileName )
{
kdDebug(5800) << "ICalFormat::save(): " << fileName << endl;
clearException();
- QString text = toString( calendar );
+ TQString text = toString( calendar );
if ( text.isNull() ) return false;
@@ -122,7 +122,7 @@ bool ICalFormat::save( Calendar *calendar, const QString &fileName )
}
// Convert to UTF8 and save
- QCString textUtf8 = text.utf8();
+ TQCString textUtf8 = text.utf8();
file.file()->writeBlock( textUtf8.data(), textUtf8.size() - 1 );
if ( !file.close() ) {
@@ -135,12 +135,12 @@ bool ICalFormat::save( Calendar *calendar, const QString &fileName )
return true;
}
-bool ICalFormat::fromString( Calendar *cal, const QString &text )
+bool ICalFormat::fromString( Calendar *cal, const TQString &text )
{
return fromRawString( cal, text.utf8() );
}
-bool ICalFormat::fromRawString( Calendar *cal, const QCString &text )
+bool ICalFormat::fromRawString( Calendar *cal, const TQCString &text )
{
setTimeZone( cal->timeZoneId(), !cal->isLocalTime() );
@@ -197,7 +197,7 @@ bool ICalFormat::fromRawString( Calendar *cal, const QCString &text )
return success;
}
-Incidence *ICalFormat::fromString( const QString &text )
+Incidence *ICalFormat::fromString( const TQString &text )
{
CalendarLocal cal( mTimeZoneId );
fromString(&cal, text);
@@ -221,7 +221,7 @@ Incidence *ICalFormat::fromString( const QString &text )
return ical ? ical->clone() : 0;
}
-QString ICalFormat::toString( Calendar *cal )
+TQString ICalFormat::toString( Calendar *cal )
{
setTimeZone( cal->timeZoneId(), !cal->isLocalTime() );
@@ -259,7 +259,7 @@ QString ICalFormat::toString( Calendar *cal )
icalcomponent_add_component( calendar, component );
}
- QString text = QString::fromUtf8( icalcomponent_as_ical_string( calendar ) );
+ TQString text = TQString::fromUtf8( icalcomponent_as_ical_string( calendar ) );
icalcomponent_free( calendar );
icalmemory_free_ring();
@@ -267,42 +267,42 @@ QString ICalFormat::toString( Calendar *cal )
if (!text) {
setException(new ErrorFormat(ErrorFormat::SaveError,
i18n("libical error")));
- return QString::null;
+ return TQString::null;
}
return text;
}
-QString ICalFormat::toICalString( Incidence *incidence )
+TQString ICalFormat::toICalString( Incidence *incidence )
{
CalendarLocal cal( mTimeZoneId );
cal.addIncidence( incidence->clone() );
return toString( &cal );
}
-QString ICalFormat::toString( Incidence *incidence )
+TQString ICalFormat::toString( Incidence *incidence )
{
icalcomponent *component;
component = mImpl->writeIncidence( incidence );
- QString text = QString::fromUtf8( icalcomponent_as_ical_string( component ) );
+ TQString text = TQString::fromUtf8( icalcomponent_as_ical_string( component ) );
icalcomponent_free( component );
return text;
}
-QString ICalFormat::toString( RecurrenceRule *recurrence )
+TQString ICalFormat::toString( RecurrenceRule *recurrence )
{
icalproperty *property;
property = icalproperty_new_rrule( mImpl->writeRecurrenceRule( recurrence ) );
- QString text = QString::fromUtf8( icalproperty_as_ical_string( property ) );
+ TQString text = TQString::fromUtf8( icalproperty_as_ical_string( property ) );
icalproperty_free( property );
return text;
}
-bool ICalFormat::fromString( RecurrenceRule * recurrence, const QString& rrule )
+bool ICalFormat::fromString( RecurrenceRule * recurrence, const TQString& rrule )
{
if ( !recurrence ) return false;
bool success = true;
@@ -321,7 +321,7 @@ bool ICalFormat::fromString( RecurrenceRule * recurrence, const QString& rrule )
}
-QString ICalFormat::createScheduleMessage(IncidenceBase *incidence,
+TQString ICalFormat::createScheduleMessage(IncidenceBase *incidence,
Scheduler::Method method)
{
icalcomponent *message = 0;
@@ -333,7 +333,7 @@ QString ICalFormat::createScheduleMessage(IncidenceBase *incidence,
// We have a separation of scheduling ID and UID
i = i->clone();
i->setUid( i->schedulingID() );
- i->setSchedulingID( QString::null );
+ i->setSchedulingID( TQString::null );
// Build the message with the cloned incidence
message = mImpl->createScheduleComponent( i, method );
@@ -347,7 +347,7 @@ QString ICalFormat::createScheduleMessage(IncidenceBase *incidence,
message = mImpl->createScheduleComponent(incidence,method);
// FIXME TODO: Don't we have to free message? What about the ical_string? MEMLEAK
- QString messageText = QString::fromUtf8( icalcomponent_as_ical_string(message) );
+ TQString messageText = TQString::fromUtf8( icalcomponent_as_ical_string(message) );
#if 0
kdDebug(5800) << "ICalFormat::createScheduleMessage: message START\n"
@@ -358,7 +358,7 @@ QString ICalFormat::createScheduleMessage(IncidenceBase *incidence,
return messageText;
}
-FreeBusy *ICalFormat::parseFreeBusy( const QString &str )
+FreeBusy *ICalFormat::parseFreeBusy( const TQString &str )
{
clearException();
@@ -389,14 +389,14 @@ FreeBusy *ICalFormat::parseFreeBusy( const QString &str )
}
ScheduleMessage *ICalFormat::parseScheduleMessage( Calendar *cal,
- const QString &messageText )
+ const TQString &messageText )
{
setTimeZone( cal->timeZoneId(), !cal->isLocalTime() );
clearException();
if (messageText.isEmpty())
{
- setException( new ErrorFormat( ErrorFormat::ParseErrorKcal, QString::fromLatin1( "messageText was empty, unable to parse into a ScheduleMessage" ) ) );
+ setException( new ErrorFormat( ErrorFormat::ParseErrorKcal, TQString::fromLatin1( "messageText was empty, unable to parse into a ScheduleMessage" ) ) );
return 0;
}
// TODO FIXME: Don't we have to ical-free message??? MEMLEAK
@@ -405,7 +405,7 @@ ScheduleMessage *ICalFormat::parseScheduleMessage( Calendar *cal,
if (!message)
{
- setException( new ErrorFormat( ErrorFormat::ParseErrorKcal, QString::fromLatin1( "icalparser was unable to parse messageText into a ScheduleMessage" ) ) );
+ setException( new ErrorFormat( ErrorFormat::ParseErrorKcal, TQString::fromLatin1( "icalparser was unable to parse messageText into a ScheduleMessage" ) ) );
return 0;
}
@@ -413,7 +413,7 @@ ScheduleMessage *ICalFormat::parseScheduleMessage( Calendar *cal,
ICAL_METHOD_PROPERTY);
if (!m)
{
- setException( new ErrorFormat( ErrorFormat::ParseErrorKcal, QString::fromLatin1( "message didn't contain an ICAL_METHOD_PROPERTY" ) ) );
+ setException( new ErrorFormat( ErrorFormat::ParseErrorKcal, TQString::fromLatin1( "message didn't contain an ICAL_METHOD_PROPERTY" ) ) );
return 0;
}
@@ -451,7 +451,7 @@ ScheduleMessage *ICalFormat::parseScheduleMessage( Calendar *cal,
if (!incidence) {
kdDebug(5800) << "ICalFormat:parseScheduleMessage: object is not a freebusy, event, todo or journal" << endl;
- setException( new ErrorFormat( ErrorFormat::ParseErrorKcal, QString::fromLatin1( "object is not a freebusy, event, todo or journal" ) ) );
+ setException( new ErrorFormat( ErrorFormat::ParseErrorKcal, TQString::fromLatin1( "object is not a freebusy, event, todo or journal" ) ) );
return 0;
}
@@ -563,13 +563,13 @@ ScheduleMessage *ICalFormat::parseScheduleMessage( Calendar *cal,
return new ScheduleMessage(incidence,method,status);
}
-void ICalFormat::setTimeZone( const QString &id, bool utc )
+void ICalFormat::setTimeZone( const TQString &id, bool utc )
{
mTimeZoneId = id;
mUtc = utc;
}
-QString ICalFormat::timeZoneId() const
+TQString ICalFormat::timeZoneId() const
{
return mTimeZoneId;
}
diff --git a/libkcal/icalformat.h b/libkcal/icalformat.h
index b74600064..c35da5eb1 100644
--- a/libkcal/icalformat.h
+++ b/libkcal/icalformat.h
@@ -21,7 +21,7 @@
#ifndef KCAL_ICALFORMAT_H
#define KCAL_ICALFORMAT_H
-#include <qstring.h>
+#include <tqstring.h>
#include "scheduler.h"
@@ -54,7 +54,7 @@ class LIBKCAL_EXPORT ICalFormat : public CalFormat
@param calendar Calendar object to be filled.
@param fileName The name of the calendar file on disk.
*/
- bool load( Calendar * calendar, const QString &fileName );
+ bool load( Calendar * calendar, const TQString &fileName );
/**
Writes out the calendar to disk in iCalendar format. Returns true if
successful and false on error.
@@ -62,62 +62,62 @@ class LIBKCAL_EXPORT ICalFormat : public CalFormat
@param calendar The Calendar object to be written.
@param fileName The name of the calendar file on disk.
*/
- bool save( Calendar * calendar, const QString &fileName );
+ bool save( Calendar * calendar, const TQString &fileName );
/**
Parse string and populate calendar with that information.
*/
- bool fromString( Calendar * calendar, const QString & );
+ bool fromString( Calendar * calendar, const TQString & );
/**
Parse string and return first ical component.
*/
- Incidence *fromString( const QString & );
+ Incidence *fromString( const TQString & );
/**
Return calendar information as string.
*/
- QString toString( Calendar * );
+ TQString toString( Calendar * );
/**
Return incidence as full iCalendar formatted text.
*/
- QString toICalString( Incidence * );
+ TQString toICalString( Incidence * );
/**
Return incidence as iCalendar formatted text.
*/
- QString toString( Incidence * );
+ TQString toString( Incidence * );
/**
Return recurrence rule as iCalendar formatted text.
*/
- QString toString( RecurrenceRule * );
+ TQString toString( RecurrenceRule * );
/**
Parse string and fill recurrence object with
that information
*/
- bool fromString ( RecurrenceRule *, const QString& );
+ bool fromString ( RecurrenceRule *, const TQString& );
/**
Create a scheduling message for event @p e using method @p m.
*/
- QString createScheduleMessage(IncidenceBase *e,Scheduler::Method m);
+ TQString createScheduleMessage(IncidenceBase *e,Scheduler::Method m);
/**
Parse scheduling message provided as string @p s.
*/
- ScheduleMessage *parseScheduleMessage( Calendar *, const QString &s);
+ ScheduleMessage *parseScheduleMessage( Calendar *, const TQString &s);
/**
Parse FREEBUSY object.
*/
- FreeBusy *parseFreeBusy( const QString & );
+ FreeBusy *parseFreeBusy( const TQString & );
/**
Set id of used time zone and whether this time zone is UTC or not.
*/
- void setTimeZone( const QString &id, bool utc );
+ void setTimeZone( const TQString &id, bool utc );
/**
Return id string of timezone used.
*/
- QString timeZoneId() const;
+ TQString timeZoneId() const;
/**
Return true if timezone used is UTC, otherwise return false.
*/
@@ -129,13 +129,13 @@ class LIBKCAL_EXPORT ICalFormat : public CalFormat
a utf8 encoded string. This is an overload used for efficiency reading
to avoid utf8 conversions, which are expensive, when reading from disk.
*/
- bool fromRawString( Calendar * calendar, const QCString & );
+ bool fromRawString( Calendar * calendar, const TQCString & );
void setImplementation( ICalFormatImpl *impl );
private:
ICalFormatImpl *mImpl;
- QString mTimeZoneId;
+ TQString mTimeZoneId;
bool mUtc;
class Private;
diff --git a/libkcal/icalformatimpl.cpp b/libkcal/icalformatimpl.cpp
index d01d554e6..a52ec304c 100644
--- a/libkcal/icalformatimpl.cpp
+++ b/libkcal/icalformatimpl.cpp
@@ -20,10 +20,10 @@
Boston, MA 02110-1301, USA.
*/
-#include <qdatetime.h>
-#include <qstring.h>
-#include <qptrlist.h>
-#include <qfile.h>
+#include <tqdatetime.h>
+#include <tqstring.h>
+#include <tqptrlist.h>
+#include <tqfile.h>
#include <cstdlib>
#include <kdebug.h>
@@ -47,12 +47,12 @@ extern "C" {
using namespace KCal;
/* Static helpers */
-static QDateTime ICalDate2QDate(const icaltimetype& t)
+static TQDateTime ICalDate2TQDate(const icaltimetype& t)
{
- // Outlook sends dates starting from 1601-01-01, but QDate()
+ // Outlook sends dates starting from 1601-01-01, but TQDate()
// can only handle dates starting 1752-09-14.
const int year = (t.year>=1754) ? t.year : 1754;
- return QDateTime(QDate(year,t.month,t.day), QTime(t.hour,t.minute,t.second));
+ return TQDateTime(TQDate(year,t.month,t.day), TQTime(t.hour,t.minute,t.second));
}
static void _dumpIcaltime( const icaltimetype& t)
@@ -108,8 +108,8 @@ icalcomponent *ICalFormatImpl::writeIncidence( IncidenceBase *incidence, Schedul
icalcomponent *ICalFormatImpl::writeTodo(Todo *todo)
{
- QString tmpStr;
- QStringList tmpStrList;
+ TQString tmpStr;
+ TQStringList tmpStrList;
icalcomponent *vtodo = icalcomponent_new(ICAL_VTODO_COMPONENT);
@@ -144,7 +144,7 @@ icalcomponent *ICalFormatImpl::writeTodo(Todo *todo)
if (!todo->hasCompletedDate()) {
// If todo was created by KOrganizer <2.2 it has no correct completion
// date. Set it to now.
- todo->setCompleted(QDateTime::currentDateTime());
+ todo->setCompleted(TQDateTime::currentDateTime());
}
icaltimetype completed = writeICalDateTime(todo->completed());
icalcomponent_add_property(vtodo,icalproperty_new_completed(completed));
@@ -168,8 +168,8 @@ icalcomponent *ICalFormatImpl::writeEvent(Event *event)
<< ")" << endl;
#endif
- QString tmpStr;
- QStringList tmpStrList;
+ TQString tmpStr;
+ TQStringList tmpStrList;
icalcomponent *vevent = icalcomponent_new(ICAL_VEVENT_COMPONENT);
@@ -256,8 +256,8 @@ icalcomponent *ICalFormatImpl::writeFreeBusy(FreeBusy *freebusy,
}
//Loops through all the periods in the freebusy object
- QValueList<Period> list = freebusy->busyPeriods();
- QValueList<Period>::Iterator it;
+ TQValueList<Period> list = freebusy->busyPeriods();
+ TQValueList<Period>::Iterator it;
icalperiodtype period = icalperiodtype_null_period();
for (it = list.begin(); it!= list.end(); ++it) {
period.start = writeICalDateTime((*it).start());
@@ -301,15 +301,15 @@ void ICalFormatImpl::writeIncidence(icalcomponent *parent,Incidence *incidence)
if (incidence->pilotId()) {
// NOTE: we can't do setNonKDECustomProperty here because this changes
// data and triggers an updated() event...
- // incidence->setNonKDECustomProperty("X-PILOTSTAT", QString::number(incidence->syncStatus()));
- // incidence->setNonKDECustomProperty("X-PILOTID", QString::number(incidence->pilotId()));
+ // incidence->setNonKDECustomProperty("X-PILOTSTAT", TQString::number(incidence->syncStatus()));
+ // incidence->setNonKDECustomProperty("X-PILOTID", TQString::number(incidence->pilotId()));
icalproperty *p = 0;
- p = icalproperty_new_x(QString::number(incidence->syncStatus()).utf8());
+ p = icalproperty_new_x(TQString::number(incidence->syncStatus()).utf8());
icalproperty_set_x_name(p,"X-PILOTSTAT");
icalcomponent_add_property(parent,p);
- p = icalproperty_new_x(QString::number(incidence->pilotId()).utf8());
+ p = icalproperty_new_x(TQString::number(incidence->pilotId()).utf8());
icalproperty_set_x_name(p,"X-PILOTID");
icalcomponent_add_property(parent,p);
}
@@ -414,8 +414,8 @@ void ICalFormatImpl::writeIncidence(icalcomponent *parent,Incidence *incidence)
}
// categories
- QStringList categories = incidence->categories();
- QStringList::Iterator it;
+ TQStringList categories = incidence->categories();
+ TQStringList::Iterator it;
for(it = categories.begin(); it != categories.end(); ++it ) {
icalcomponent_add_property(parent,icalproperty_new_categories((*it).utf8()));
}
@@ -499,7 +499,7 @@ void ICalFormatImpl::writeIncidenceBase( icalcomponent *parent,
IncidenceBase * incidenceBase )
{
icalcomponent_add_property( parent, icalproperty_new_dtstamp(
- writeICalDateTime( QDateTime::currentDateTime() ) ) );
+ writeICalDateTime( TQDateTime::currentDateTime() ) ) );
// organizer stuff
if ( !incidenceBase->organizer().isEmpty() ) {
@@ -516,8 +516,8 @@ void ICalFormatImpl::writeIncidenceBase( icalcomponent *parent,
}
// comments
- QStringList comments = incidenceBase->comments();
- for (QStringList::Iterator it=comments.begin(); it!=comments.end(); ++it) {
+ TQStringList comments = incidenceBase->comments();
+ for (TQStringList::Iterator it=comments.begin(); it!=comments.end(); ++it) {
icalcomponent_add_property(parent, icalproperty_new_comment((*it).utf8()));
}
@@ -527,8 +527,8 @@ void ICalFormatImpl::writeIncidenceBase( icalcomponent *parent,
void ICalFormatImpl::writeCustomProperties(icalcomponent *parent,CustomProperties *properties)
{
- QMap<QCString, QString> custom = properties->customProperties();
- for (QMap<QCString, QString>::Iterator c = custom.begin(); c != custom.end(); ++c) {
+ TQMap<TQCString, TQString> custom = properties->customProperties();
+ for (TQMap<TQCString, TQString>::Iterator c = custom.begin(); c != custom.end(); ++c) {
icalproperty *p = icalproperty_new_x(c.data().utf8());
icalproperty_set_x_name(p,c.key());
icalcomponent_add_property(parent,p);
@@ -696,8 +696,8 @@ icalrecurrencetype ICalFormatImpl::writeRecurrenceRule( RecurrenceRule *recur )
}
int index = 0;
- QValueList<int> bys;
- QValueList<int>::ConstIterator it;
+ TQValueList<int> bys;
+ TQValueList<int>::ConstIterator it;
// Now write out the BY* parts:
bys = recur->bySeconds();
@@ -749,10 +749,10 @@ icalrecurrencetype ICalFormatImpl::writeRecurrenceRule( RecurrenceRule *recur )
}
- QValueList<RecurrenceRule::WDayPos> byd = recur->byDays();
+ TQValueList<RecurrenceRule::WDayPos> byd = recur->byDays();
int day;
index = 0;
- for ( QValueList<RecurrenceRule::WDayPos>::ConstIterator dit = byd.begin();
+ for ( TQValueList<RecurrenceRule::WDayPos>::ConstIterator dit = byd.begin();
dit != byd.end(); ++dit ) {
day = (*dit).day() % 7 + 1; // convert from Monday=1 to Sunday=1
if ( (*dit).pos() < 0 ) {
@@ -808,7 +808,7 @@ icalcomponent *ICalFormatImpl::writeAlarm(Alarm *alarm)
switch (alarm->type()) {
case Alarm::Procedure:
action = ICAL_ACTION_PROCEDURE;
- attach = icalattach_new_from_url(QFile::encodeName(alarm->programFile()).data());
+ attach = icalattach_new_from_url(TQFile::encodeName(alarm->programFile()).data());
icalcomponent_add_property(a,icalproperty_new_attach(attach));
if (!alarm->programArguments().isEmpty()) {
icalcomponent_add_property(a,icalproperty_new_description(alarm->programArguments().utf8()));
@@ -818,14 +818,14 @@ icalcomponent *ICalFormatImpl::writeAlarm(Alarm *alarm)
action = ICAL_ACTION_AUDIO;
// kdDebug(5800) << " It's an audio action, file: " << alarm->audioFile() << endl;
if (!alarm->audioFile().isEmpty()) {
- attach = icalattach_new_from_url(QFile::encodeName( alarm->audioFile() ).data());
+ attach = icalattach_new_from_url(TQFile::encodeName( alarm->audioFile() ).data());
icalcomponent_add_property(a,icalproperty_new_attach(attach));
}
break;
case Alarm::Email: {
action = ICAL_ACTION_EMAIL;
- QValueList<Person> addresses = alarm->mailAddresses();
- for (QValueList<Person>::Iterator ad = addresses.begin(); ad != addresses.end(); ++ad) {
+ TQValueList<Person> addresses = alarm->mailAddresses();
+ for (TQValueList<Person>::Iterator ad = addresses.begin(); ad != addresses.end(); ++ad) {
icalproperty *p = icalproperty_new_attendee("MAILTO:" + (*ad).email().utf8());
if (!(*ad).name().isEmpty()) {
icalproperty_add_parameter(p,icalparameter_new_cn((*ad).name().utf8()));
@@ -834,10 +834,10 @@ icalcomponent *ICalFormatImpl::writeAlarm(Alarm *alarm)
}
icalcomponent_add_property(a,icalproperty_new_summary(alarm->mailSubject().utf8()));
icalcomponent_add_property(a,icalproperty_new_description(alarm->mailText().utf8()));
- QStringList attachments = alarm->mailAttachments();
+ TQStringList attachments = alarm->mailAttachments();
if (attachments.count() > 0) {
- for (QStringList::Iterator at = attachments.begin(); at != attachments.end(); ++at) {
- attach = icalattach_new_from_url(QFile::encodeName( *at ).data());
+ for (TQStringList::Iterator at = attachments.begin(); at != attachments.end(); ++at) {
+ attach = icalattach_new_from_url(TQFile::encodeName( *at ).data());
icalcomponent_add_property(a,icalproperty_new_attach(attach));
}
}
@@ -882,8 +882,8 @@ icalcomponent *ICalFormatImpl::writeAlarm(Alarm *alarm)
}
// Custom properties
- QMap<QCString, QString> custom = alarm->customProperties();
- for (QMap<QCString, QString>::Iterator c = custom.begin(); c != custom.end(); ++c) {
+ TQMap<TQCString, TQString> custom = alarm->customProperties();
+ for (TQMap<TQCString, TQString>::Iterator c = custom.begin(); c != custom.end(); ++c) {
icalproperty *p = icalproperty_new_x(c.data().utf8());
icalproperty_set_x_name(p,c.key());
icalcomponent_add_property(a,p);
@@ -903,7 +903,7 @@ Todo *ICalFormatImpl::readTodo(icalcomponent *vtodo)
// int intvalue;
icaltimetype icaltime;
- QStringList categories;
+ TQStringList categories;
while (p) {
icalproperty_kind kind = icalproperty_isa(p);
@@ -912,7 +912,7 @@ Todo *ICalFormatImpl::readTodo(icalcomponent *vtodo)
case ICAL_DUE_PROPERTY: // due date
icaltime = icalproperty_get_due(p);
if (icaltime.is_date) {
- todo->setDtDue(QDateTime(readICalDate(icaltime),QTime(0,0,0)),true);
+ todo->setDtDue(TQDateTime(readICalDate(icaltime),TQTime(0,0,0)),true);
} else {
todo->setDtDue(readICalDateTime(p, icaltime),true);
todo->setFloats(false);
@@ -930,7 +930,7 @@ Todo *ICalFormatImpl::readTodo(icalcomponent *vtodo)
break;
case ICAL_RELATEDTO_PROPERTY: // related todo (parent)
- todo->setRelatedToUid(QString::fromUtf8(icalproperty_get_relatedto(p)));
+ todo->setRelatedToUid(TQString::fromUtf8(icalproperty_get_relatedto(p)));
mTodosRelate.append(todo);
break;
@@ -980,7 +980,7 @@ Event *ICalFormatImpl::readEvent( icalcomponent *vevent, icalcomponent *vtimezon
// int intvalue;
icaltimetype icaltime;
- QStringList categories;
+ TQStringList categories;
icalproperty_transp transparency;
bool dtEndProcessed = false;
@@ -993,12 +993,12 @@ Event *ICalFormatImpl::readEvent( icalcomponent *vevent, icalcomponent *vtimezon
icaltime = icalproperty_get_dtend(p);
if (icaltime.is_date) {
// End date is non-inclusive
- QDate endDate = readICalDate( icaltime ).addDays( -1 );
+ TQDate endDate = readICalDate( icaltime ).addDays( -1 );
if ( mCompat ) mCompat->fixFloatingEnd( endDate );
if ( endDate < event->dtStart().date() ) {
endDate = event->dtStart().date();
}
- event->setDtEnd( QDateTime( endDate, QTime( 0, 0, 0 ) ) );
+ event->setDtEnd( TQDateTime( endDate, TQTime( 0, 0, 0 ) ) );
} else {
event->setDtEnd(readICalDateTime(p, icaltime, tz));
event->setFloats( false );
@@ -1007,7 +1007,7 @@ Event *ICalFormatImpl::readEvent( icalcomponent *vevent, icalcomponent *vtimezon
break;
case ICAL_RELATEDTO_PROPERTY: // related event (parent)
- event->setRelatedToUid(QString::fromUtf8(icalproperty_get_relatedto(p)));
+ event->setRelatedToUid(TQString::fromUtf8(icalproperty_get_relatedto(p)));
mEventsRelate.append(event);
break;
@@ -1035,9 +1035,9 @@ Event *ICalFormatImpl::readEvent( icalcomponent *vevent, icalcomponent *vtimezon
event->setDtEnd( event->dtStart() );
}
- QString msade = event->nonKDECustomProperty("X-MICROSOFT-CDO-ALLDAYEVENT");
+ TQString msade = event->nonKDECustomProperty("X-MICROSOFT-CDO-ALLDAYEVENT");
if (!msade.isEmpty()) {
- bool floats = (msade == QString::fromLatin1("TRUE"));
+ bool floats = (msade == TQString::fromLatin1("TRUE"));
event->setFloats(floats);
}
@@ -1073,19 +1073,19 @@ FreeBusy *ICalFormatImpl::readFreeBusy(icalcomponent *vfreebusy)
case ICAL_FREEBUSY_PROPERTY: { //Any FreeBusy Times
icalperiodtype icalperiod = icalproperty_get_freebusy(p);
- QDateTime period_start = readICalDateTime(p, icalperiod.start);
+ TQDateTime period_start = readICalDateTime(p, icalperiod.start);
Period period;
if ( !icaltime_is_null_time(icalperiod.end) ) {
- QDateTime period_end = readICalDateTime(p, icalperiod.end);
+ TQDateTime period_end = readICalDateTime(p, icalperiod.end);
period = Period(period_start, period_end);
} else {
Duration duration = readICalDuration( icalperiod.duration );
period = Period(period_start, duration);
}
- QCString param = icalproperty_get_parameter_as_string( p, "X-SUMMARY" );
- period.setSummary( QString::fromUtf8( KCodecs::base64Decode( param ) ) );
+ TQCString param = icalproperty_get_parameter_as_string( p, "X-SUMMARY" );
+ period.setSummary( TQString::fromUtf8( KCodecs::base64Decode( param ) ) );
param = icalproperty_get_parameter_as_string( p, "X-LOCATION" );
- period.setLocation( QString::fromUtf8( KCodecs::base64Decode( param ) ) );
+ period.setLocation( TQString::fromUtf8( KCodecs::base64Decode( param ) ) );
periods.append( period );
break;}
@@ -1114,16 +1114,16 @@ Attendee *ICalFormatImpl::readAttendee(icalproperty *attendee)
{
icalparameter *p = 0;
- QString email = QString::fromUtf8(icalproperty_get_attendee(attendee));
+ TQString email = TQString::fromUtf8(icalproperty_get_attendee(attendee));
if ( email.startsWith( "mailto:", false ) ) {
email = email.mid( 7 );
}
- QString name;
- QString uid = QString::null;
+ TQString name;
+ TQString uid = TQString::null;
p = icalproperty_get_first_parameter(attendee,ICAL_CN_PARAMETER);
if (p) {
- name = QString::fromUtf8(icalparameter_get_cn(p));
+ name = TQString::fromUtf8(icalparameter_get_cn(p));
} else {
}
@@ -1210,17 +1210,17 @@ Attendee *ICalFormatImpl::readAttendee(icalproperty *attendee)
Person ICalFormatImpl::readOrganizer( icalproperty *organizer )
{
- QString email = QString::fromUtf8(icalproperty_get_organizer(organizer));
+ TQString email = TQString::fromUtf8(icalproperty_get_organizer(organizer));
if ( email.startsWith( "mailto:", false ) ) {
email = email.mid( 7 );
}
- QString cn;
+ TQString cn;
icalparameter *p = icalproperty_get_first_parameter(
organizer, ICAL_CN_PARAMETER );
if ( p ) {
- cn = QString::fromUtf8( icalparameter_get_cn( p ) );
+ cn = TQString::fromUtf8( icalparameter_get_cn( p ) );
}
Person org( cn, email );
// TODO: Treat sent-by, dir and language here, too
@@ -1240,16 +1240,16 @@ Attachment *ICalFormatImpl::readAttachment(icalproperty *attach)
if (isurl == 0)
attachment = new Attachment((const char*)icalattach_get_data(a));
else {
- attachment = new Attachment(QString::fromUtf8(icalattach_get_url(a)));
+ attachment = new Attachment(TQString::fromUtf8(icalattach_get_url(a)));
}
}
else if ( value_kind == ICAL_URI_VALUE ) {
- attachment = new Attachment(QString::fromUtf8(icalvalue_get_uri(icalproperty_get_value(attach))));
+ attachment = new Attachment(TQString::fromUtf8(icalvalue_get_uri(icalproperty_get_value(attach))));
}
icalparameter *p = icalproperty_get_first_parameter(attach, ICAL_FMTTYPE_PARAMETER);
if (p && attachment)
- attachment->setMimeType(QString(icalparameter_get_fmttype(p)));
+ attachment->setMimeType(TQString(icalparameter_get_fmttype(p)));
p = icalproperty_get_first_parameter(attach,ICAL_X_PARAMETER);
while (p) {
@@ -1272,7 +1272,7 @@ void ICalFormatImpl::readIncidence(icalcomponent *parent, icaltimezone *tz, Inci
icaltimetype icaltime;
icaldurationtype icalduration;
- QStringList categories;
+ TQStringList categories;
while (p) {
icalproperty_kind kind = icalproperty_isa(p);
@@ -1296,7 +1296,7 @@ void ICalFormatImpl::readIncidence(icalcomponent *parent, icaltimezone *tz, Inci
case ICAL_DTSTART_PROPERTY: // start date and time
icaltime = icalproperty_get_dtstart(p);
if (icaltime.is_date) {
- incidence->setDtStart(QDateTime(readICalDate(icaltime),QTime(0,0,0)));
+ incidence->setDtStart(TQDateTime(readICalDate(icaltime),TQTime(0,0,0)));
incidence->setFloats( true );
} else {
incidence->setDtStart(readICalDateTime(p, icaltime, tz));
@@ -1311,17 +1311,17 @@ void ICalFormatImpl::readIncidence(icalcomponent *parent, icaltimezone *tz, Inci
case ICAL_DESCRIPTION_PROPERTY: // description
text = icalproperty_get_description(p);
- incidence->setDescription(QString::fromUtf8(text));
+ incidence->setDescription(TQString::fromUtf8(text));
break;
case ICAL_SUMMARY_PROPERTY: // summary
text = icalproperty_get_summary(p);
- incidence->setSummary(QString::fromUtf8(text));
+ incidence->setSummary(TQString::fromUtf8(text));
break;
case ICAL_LOCATION_PROPERTY: // location
text = icalproperty_get_location(p);
- incidence->setLocation(QString::fromUtf8(text));
+ incidence->setLocation(TQString::fromUtf8(text));
break;
case ICAL_STATUS_PROPERTY: { // status
@@ -1336,7 +1336,7 @@ void ICalFormatImpl::readIncidence(icalcomponent *parent, icaltimezone *tz, Inci
case ICAL_STATUS_DRAFT: stat = Incidence::StatusDraft; break;
case ICAL_STATUS_FINAL: stat = Incidence::StatusFinal; break;
case ICAL_STATUS_X:
- incidence->setCustomStatus(QString::fromUtf8(icalvalue_get_x(icalproperty_get_value(p))));
+ incidence->setCustomStatus(TQString::fromUtf8(icalvalue_get_x(icalproperty_get_value(p))));
stat = Incidence::StatusX;
break;
case ICAL_STATUS_NONE:
@@ -1356,7 +1356,7 @@ void ICalFormatImpl::readIncidence(icalcomponent *parent, icaltimezone *tz, Inci
case ICAL_CATEGORIES_PROPERTY: // categories
text = icalproperty_get_categories(p);
- categories.append(QString::fromUtf8(text));
+ categories.append(TQString::fromUtf8(text));
break;
case ICAL_RRULE_PROPERTY:
@@ -1414,7 +1414,7 @@ void ICalFormatImpl::readIncidence(icalcomponent *parent, icaltimezone *tz, Inci
}
// Set the scheduling ID
- const QString uid = incidence->customProperty( "LIBKCAL", "ID" );
+ const TQString uid = incidence->customProperty( "LIBKCAL", "ID" );
if ( !uid.isNull() ) {
// The UID stored in incidencebase is actually the scheduling ID
// It has to be stored in the iCal UID component for compatibility
@@ -1451,7 +1451,7 @@ void ICalFormatImpl::readIncidenceBase(icalcomponent *parent,IncidenceBase *inci
switch (kind) {
case ICAL_UID_PROPERTY: // unique id
- incidenceBase->setUid(QString::fromUtf8(icalproperty_get_uid(p)));
+ incidenceBase->setUid(TQString::fromUtf8(icalproperty_get_uid(p)));
break;
case ICAL_ORGANIZER_PROPERTY: // organizer
@@ -1464,7 +1464,7 @@ void ICalFormatImpl::readIncidenceBase(icalcomponent *parent,IncidenceBase *inci
case ICAL_COMMENT_PROPERTY:
incidenceBase->addComment(
- QString::fromUtf8(icalproperty_get_comment(p)));
+ TQString::fromUtf8(icalproperty_get_comment(p)));
break;
default:
@@ -1489,8 +1489,8 @@ void ICalFormatImpl::readIncidenceBase(icalcomponent *parent,IncidenceBase *inci
next = icalcomponent_get_next_property(parent,ICAL_X_PROPERTY);
- QString value = QString::fromUtf8(icalproperty_get_x(p));
- QString name = icalproperty_get_x_name(p);
+ TQString value = TQString::fromUtf8(icalproperty_get_x(p));
+ TQString name = icalproperty_get_x_name(p);
if (name == "X-PILOTID" && !value.isEmpty()) {
incidenceBase->setPilotId(value.toInt());
@@ -1507,14 +1507,14 @@ void ICalFormatImpl::readIncidenceBase(icalcomponent *parent,IncidenceBase *inci
void ICalFormatImpl::readCustomProperties(icalcomponent *parent,CustomProperties *properties)
{
- QMap<QCString, QString> customProperties;
- QString lastProperty;
+ TQMap<TQCString, TQString> customProperties;
+ TQString lastProperty;
icalproperty *p = icalcomponent_get_first_property(parent,ICAL_X_PROPERTY);
while (p) {
- QString value = QString::fromUtf8(icalproperty_get_x(p));
+ TQString value = TQString::fromUtf8(icalproperty_get_x(p));
const char *name = icalproperty_get_x_name(p);
if ( lastProperty != name ) {
customProperties[name] = value;
@@ -1564,7 +1564,7 @@ void ICalFormatImpl::readExceptionRule( icalproperty *rrule, Incidence *incidenc
void ICalFormatImpl::readRecurrence( const struct icalrecurrencetype &r, RecurrenceRule* recur )
{
// Generate the RRULE string
- recur->mRRule = QString( icalrecurrencetype_as_string( const_cast<struct icalrecurrencetype*>(&r) ) );
+ recur->mRRule = TQString( icalrecurrencetype_as_string( const_cast<struct icalrecurrencetype*>(&r) ) );
// Period
switch ( r.freq ) {
case ICAL_SECONDLY_RECURRENCE: recur->setRecurrenceType( RecurrenceRule::rSecondly ); break;
@@ -1586,7 +1586,7 @@ void ICalFormatImpl::readRecurrence( const struct icalrecurrencetype &r, Recurre
icaltimetype t;
t = r.until;
// Convert to the correct time zone! it's in UTC by specification.
- QDateTime endDate( readICalDateTime(0, t) );
+ TQDateTime endDate( readICalDateTime(0, t) );
recur->setEndDt( endDate );
} else {
if (r.count == 0)
@@ -1600,7 +1600,7 @@ void ICalFormatImpl::readRecurrence( const struct icalrecurrencetype &r, Recurre
recur->setWeekStart( wkst );
// And now all BY*
- QValueList<int> lst;
+ TQValueList<int> lst;
int i;
int index = 0;
@@ -1625,7 +1625,7 @@ void ICalFormatImpl::readRecurrence( const struct icalrecurrencetype &r, Recurre
#undef readSetByList
// BYDAY is a special case, since it's not an int list
- QValueList<RecurrenceRule::WDayPos> wdlst;
+ TQValueList<RecurrenceRule::WDayPos> wdlst;
short day;
index=0;
while((day = r.by_day[index++]) != ICAL_RECURRENCE_ARRAY_MAX) {
@@ -1709,7 +1709,7 @@ void ICalFormatImpl::readAlarm(icalcomponent *alarm,Incidence *incidence)
// Only in DISPLAY and EMAIL and PROCEDURE alarms
case ICAL_DESCRIPTION_PROPERTY: {
- QString description = QString::fromUtf8(icalproperty_get_description(p));
+ TQString description = TQString::fromUtf8(icalproperty_get_description(p));
switch ( action ) {
case ICAL_ACTION_DISPLAY:
ialarm->setText( description );
@@ -1727,19 +1727,19 @@ void ICalFormatImpl::readAlarm(icalcomponent *alarm,Incidence *incidence)
}
// Only in EMAIL alarm
case ICAL_SUMMARY_PROPERTY:
- ialarm->setMailSubject(QString::fromUtf8(icalproperty_get_summary(p)));
+ ialarm->setMailSubject(TQString::fromUtf8(icalproperty_get_summary(p)));
break;
// Only in EMAIL alarm
case ICAL_ATTENDEE_PROPERTY: {
- QString email = QString::fromUtf8(icalproperty_get_attendee(p));
+ TQString email = TQString::fromUtf8(icalproperty_get_attendee(p));
if ( email.startsWith("mailto:", false ) ) {
email = email.mid( 7 );
}
- QString name;
+ TQString name;
icalparameter *param = icalproperty_get_first_parameter(p,ICAL_CN_PARAMETER);
if (param) {
- name = QString::fromUtf8(icalparameter_get_cn(param));
+ name = TQString::fromUtf8(icalparameter_get_cn(param));
}
ialarm->addMailAddress(Person(name, email));
break;
@@ -1781,7 +1781,7 @@ void ICalFormatImpl::readAlarm(icalcomponent *alarm,Incidence *incidence)
// TODO: check for consistency of alarm properties
}
-icaldatetimeperiodtype ICalFormatImpl::writeICalDatePeriod( const QDate &date )
+icaldatetimeperiodtype ICalFormatImpl::writeICalDatePeriod( const TQDate &date )
{
icaldatetimeperiodtype t;
t.time = writeICalDate( date );
@@ -1789,7 +1789,7 @@ icaldatetimeperiodtype ICalFormatImpl::writeICalDatePeriod( const QDate &date )
return t;
}
-icaldatetimeperiodtype ICalFormatImpl::writeICalDateTimePeriod( const QDateTime &date )
+icaldatetimeperiodtype ICalFormatImpl::writeICalDateTimePeriod( const TQDateTime &date )
{
icaldatetimeperiodtype t;
t.time = writeICalDateTime( date );
@@ -1797,7 +1797,7 @@ icaldatetimeperiodtype ICalFormatImpl::writeICalDateTimePeriod( const QDateTime
return t;
}
-icaltimetype ICalFormatImpl::writeICalDate(const QDate &date)
+icaltimetype ICalFormatImpl::writeICalDate(const TQDate &date)
{
icaltimetype t = icaltime_null_time();
@@ -1818,7 +1818,7 @@ icaltimetype ICalFormatImpl::writeICalDate(const QDate &date)
return t;
}
-icaltimetype ICalFormatImpl::writeICalDateTime(const QDateTime &datetime)
+icaltimetype ICalFormatImpl::writeICalDateTime(const TQDateTime &datetime)
{
icaltimetype t = icaltime_null_time();
@@ -1835,7 +1835,7 @@ icaltimetype ICalFormatImpl::writeICalDateTime(const QDateTime &datetime)
t.is_utc = 0;
// _dumpIcaltime( t );
- /* The QDateTime we get passed in is to be considered in the timezone of
+ /* The TQDateTime we get passed in is to be considered in the timezone of
* the current calendar (mParent's), or, if there is none, to be floating.
* In the later case store a floating time, in the former normalize to utc. */
if (mParent->timeZoneId().isEmpty())
@@ -1856,7 +1856,7 @@ icaltimetype ICalFormatImpl::writeICalDateTime(const QDateTime &datetime)
return t;
}
-QDateTime ICalFormatImpl::readICalDateTime( icalproperty *p, icaltimetype& t, icaltimezone* tz )
+TQDateTime ICalFormatImpl::readICalDateTime( icalproperty *p, icaltimetype& t, icaltimezone* tz )
{
// kdDebug(5800) << "ICalFormatImpl::readICalDateTime()" << endl;
if ( tz && t.is_utc == 0 ) { // Only use the TZ if time is not UTC.
@@ -1885,18 +1885,18 @@ QDateTime ICalFormatImpl::readICalDateTime( icalproperty *p, icaltimetype& t, ic
// Convert to view time
if ( !mParent->timeZoneId().isEmpty() && t.zone ) {
-// kdDebug(5800) << "--- Converting time from: " << icaltimezone_get_tzid( const_cast<icaltimezone*>( t.zone ) ) << " (" << ICalDate2QDate(t) << ")." << endl;
+// kdDebug(5800) << "--- Converting time from: " << icaltimezone_get_tzid( const_cast<icaltimezone*>( t.zone ) ) << " (" << ICalDate2TQDate(t) << ")." << endl;
icaltimezone* viewTimeZone = icaltimezone_get_builtin_timezone ( mParent->timeZoneId().latin1() );
icaltimezone_convert_time( &t, const_cast<icaltimezone*>(t.zone), viewTimeZone );
-// kdDebug(5800) << "--- Converted to zone " << mParent->timeZoneId() << " (" << ICalDate2QDate(t) << ")." << endl;
+// kdDebug(5800) << "--- Converted to zone " << mParent->timeZoneId() << " (" << ICalDate2TQDate(t) << ")." << endl;
}
- return ICalDate2QDate(t);
+ return ICalDate2TQDate(t);
}
-QDate ICalFormatImpl::readICalDate(icaltimetype t)
+TQDate ICalFormatImpl::readICalDate(icaltimetype t)
{
- return ICalDate2QDate(t).date();
+ return ICalDate2TQDate(t).date();
}
icaldurationtype ICalFormatImpl::writeICalDuration(int seconds)
@@ -1981,7 +1981,7 @@ bool ICalFormatImpl::populate( Calendar *cal, icalcomponent *calendar)
kdDebug(5800) << "No PRODID property found" << endl;
mLoadedProductId = "";
} else {
- mLoadedProductId = QString::fromUtf8(icalproperty_get_prodid(p));
+ mLoadedProductId = TQString::fromUtf8(icalproperty_get_prodid(p));
// kdDebug(5800) << "VCALENDAR prodid: '" << mLoadedProductId << "'" << endl;
delete mCompat;
@@ -2085,12 +2085,12 @@ bool ICalFormatImpl::populate( Calendar *cal, icalcomponent *calendar)
return true;
}
-QString ICalFormatImpl::extractErrorProperty(icalcomponent *c)
+TQString ICalFormatImpl::extractErrorProperty(icalcomponent *c)
{
// kdDebug(5800) << "ICalFormatImpl:extractErrorProperty: "
// << icalcomponent_as_ical_string(c) << endl;
- QString errorMessage;
+ TQString errorMessage;
icalproperty *error;
error = icalcomponent_get_first_property(c,ICAL_XLICERROR_PROPERTY);
@@ -2114,42 +2114,42 @@ void ICalFormatImpl::dumpIcalRecurrence(icalrecurrencetype r)
kdDebug(5800) << " Count: " << r.count << endl;
if (r.by_day[0] != ICAL_RECURRENCE_ARRAY_MAX) {
int index = 0;
- QString out = " By Day: ";
+ TQString out = " By Day: ";
while((i = r.by_day[index++]) != ICAL_RECURRENCE_ARRAY_MAX) {
- out.append(QString::number(i) + " ");
+ out.append(TQString::number(i) + " ");
}
kdDebug(5800) << out << endl;
}
if (r.by_month_day[0] != ICAL_RECURRENCE_ARRAY_MAX) {
int index = 0;
- QString out = " By Month Day: ";
+ TQString out = " By Month Day: ";
while((i = r.by_month_day[index++]) != ICAL_RECURRENCE_ARRAY_MAX) {
- out.append(QString::number(i) + " ");
+ out.append(TQString::number(i) + " ");
}
kdDebug(5800) << out << endl;
}
if (r.by_year_day[0] != ICAL_RECURRENCE_ARRAY_MAX) {
int index = 0;
- QString out = " By Year Day: ";
+ TQString out = " By Year Day: ";
while((i = r.by_year_day[index++]) != ICAL_RECURRENCE_ARRAY_MAX) {
- out.append(QString::number(i) + " ");
+ out.append(TQString::number(i) + " ");
}
kdDebug(5800) << out << endl;
}
if (r.by_month[0] != ICAL_RECURRENCE_ARRAY_MAX) {
int index = 0;
- QString out = " By Month: ";
+ TQString out = " By Month: ";
while((i = r.by_month[index++]) != ICAL_RECURRENCE_ARRAY_MAX) {
- out.append(QString::number(i) + " ");
+ out.append(TQString::number(i) + " ");
}
kdDebug(5800) << out << endl;
}
if (r.by_set_pos[0] != ICAL_RECURRENCE_ARRAY_MAX) {
int index = 0;
- QString out = " By Set Pos: ";
+ TQString out = " By Set Pos: ";
while((i = r.by_set_pos[index++]) != ICAL_RECURRENCE_ARRAY_MAX) {
kdDebug(5800) << "========= " << i << endl;
- out.append(QString::number(i) + " ");
+ out.append(TQString::number(i) + " ");
}
kdDebug(5800) << out << endl;
}
diff --git a/libkcal/icalformatimpl.h b/libkcal/icalformatimpl.h
index 75a3a5a19..9a2e9f623 100644
--- a/libkcal/icalformatimpl.h
+++ b/libkcal/icalformatimpl.h
@@ -22,8 +22,8 @@
#ifndef KCAL_ICALFORMATIMPL_H
#define KCAL_ICALFORMATIMPL_H
-#include <qstring.h>
-#include <qdict.h>
+#include <tqstring.h>
+#include <tqdict.h>
#include "scheduler.h"
#include "freebusy.h"
@@ -65,7 +65,7 @@ class ICalFormatImpl
icalrecurrencetype writeRecurrenceRule( RecurrenceRule *recur );
icalcomponent *writeAlarm(Alarm *alarm);
- QString extractErrorProperty(icalcomponent *);
+ TQString extractErrorProperty(icalcomponent *);
Todo *readTodo(icalcomponent *vtodo);
Event *readEvent(icalcomponent *vevent, icalcomponent *vtimezone);
FreeBusy *readFreeBusy(icalcomponent *vfreebusy);
@@ -79,16 +79,16 @@ class ICalFormatImpl
void readRecurrence( const struct icalrecurrencetype &r, RecurrenceRule* recur );
void readAlarm(icalcomponent *alarm,Incidence *incidence);
/** Return the PRODID string loaded from calendar file */
- const QString &loadedProductId() { return mLoadedProductId; }
+ const TQString &loadedProductId() { return mLoadedProductId; }
- static icaltimetype writeICalDate(const QDate &);
- static QDate readICalDate(icaltimetype);
- icaltimetype writeICalDateTime(const QDateTime &);
- QDateTime readICalDateTime( icalproperty*, icaltimetype&, icaltimezone* tz = 0 );
+ static icaltimetype writeICalDate(const TQDate &);
+ static TQDate readICalDate(icaltimetype);
+ icaltimetype writeICalDateTime(const TQDateTime &);
+ TQDateTime readICalDateTime( icalproperty*, icaltimetype&, icaltimezone* tz = 0 );
static icaldurationtype writeICalDuration(int seconds);
static int readICalDuration(icaldurationtype);
- static icaldatetimeperiodtype writeICalDatePeriod( const QDate &date );
- icaldatetimeperiodtype writeICalDateTimePeriod( const QDateTime &date );
+ static icaldatetimeperiodtype writeICalDatePeriod( const TQDate &date );
+ icaldatetimeperiodtype writeICalDateTimePeriod( const TQDateTime &date );
icalcomponent *createCalendarComponent(Calendar * = 0);
icalcomponent *createScheduleComponent(IncidenceBase *,Scheduler::Method);
@@ -105,7 +105,7 @@ class ICalFormatImpl
ICalFormat *mParent;
Calendar *mCalendar;
- QString mLoadedProductId; // PRODID string loaded from calendar file
+ TQString mLoadedProductId; // PRODID string loaded from calendar file
Event::List mEventsRelate; // events with relations
Todo::List mTodosRelate; // todos with relations
diff --git a/libkcal/imipscheduler.cpp b/libkcal/imipscheduler.cpp
index 2a83840ec..7a4f8feb3 100644
--- a/libkcal/imipscheduler.cpp
+++ b/libkcal/imipscheduler.cpp
@@ -39,7 +39,7 @@ IMIPScheduler::~IMIPScheduler()
{
}
-bool IMIPScheduler::publish (IncidenceBase * /*incidence*/,const QString &/*recipients*/)
+bool IMIPScheduler::publish (IncidenceBase * /*incidence*/,const TQString &/*recipients*/)
{
return false;
}
@@ -51,9 +51,9 @@ bool IMIPScheduler::performTransaction(IncidenceBase *incidence,Method method)
return false;
}
-QPtrList<ScheduleMessage> IMIPScheduler::retrieveTransactions()
+TQPtrList<ScheduleMessage> IMIPScheduler::retrieveTransactions()
{
- QPtrList<ScheduleMessage> messageList;
+ TQPtrList<ScheduleMessage> messageList;
return messageList;
}
diff --git a/libkcal/imipscheduler.h b/libkcal/imipscheduler.h
index 95535798e..59379403f 100644
--- a/libkcal/imipscheduler.h
+++ b/libkcal/imipscheduler.h
@@ -21,7 +21,7 @@
#ifndef KCAL_IMIPSCHEDULER_H
#define KCAL_IMIPSCHEDULER_H
-#include <qptrlist.h>
+#include <tqptrlist.h>
#include "libkcal_export.h"
#include "scheduler.h"
@@ -40,9 +40,9 @@ class KDE_EXPORT IMIPScheduler : public Scheduler
IMIPScheduler( Calendar * );
virtual ~IMIPScheduler();
- bool publish (IncidenceBase *incidence,const QString &recipients);
+ bool publish (IncidenceBase *incidence,const TQString &recipients);
bool performTransaction(IncidenceBase *incidence,Method method);
- QPtrList<ScheduleMessage> retrieveTransactions();
+ TQPtrList<ScheduleMessage> retrieveTransactions();
private:
class Private;
diff --git a/libkcal/incidence.cpp b/libkcal/incidence.cpp
index c4ee51083..94995b12c 100644
--- a/libkcal/incidence.cpp
+++ b/libkcal/incidence.cpp
@@ -60,7 +60,7 @@ Incidence::Incidence( const Incidence &i ) : IncidenceBase( i ),Recurrence::Obse
mPriority = i.mPriority;
mLocation = i.mLocation;
- // Alarms and Attachments are stored in ListBase<...>, which is a QValueList<...*>.
+ // Alarms and Attachments are stored in ListBase<...>, which is a TQValueList<...*>.
// We need to really duplicate the objects stored therein, otherwise deleting
// i will also delete all attachments from this object (setAutoDelete...)
Alarm::List::ConstIterator it;
@@ -100,7 +100,7 @@ Incidence::~Incidence()
}
// A string comparison that considers that null and empty are the same
-static bool stringCompare( const QString& s1, const QString& s2 )
+static bool stringCompare( const TQString& s1, const TQString& s2 )
{
return ( s1.isEmpty() && s2.isEmpty() ) || (s1 == s2);
}
@@ -199,14 +199,14 @@ bool Incidence::operator==( const Incidence& i2 ) const
void Incidence::recreate()
{
- setCreated(QDateTime::currentDateTime());
+ setCreated(TQDateTime::currentDateTime());
setUid(CalFormat::createUniqueId());
- setSchedulingID( QString::null );
+ setSchedulingID( TQString::null );
setRevision(0);
- setLastModified(QDateTime::currentDateTime());
+ setLastModified(TQDateTime::currentDateTime());
setPilotId( 0 );
setSyncStatus( SYNCNONE );
}
@@ -226,7 +226,7 @@ void Incidence::setFloats(bool f)
IncidenceBase::setFloats( f );
}
-void Incidence::setCreated( const QDateTime &created )
+void Incidence::setCreated( const TQDateTime &created )
{
if (mReadOnly) return;
mCreated = created;
@@ -235,7 +235,7 @@ void Incidence::setCreated( const QDateTime &created )
// updated();
}
-QDateTime Incidence::created() const
+TQDateTime Incidence::created() const
{
return mCreated;
}
@@ -253,7 +253,7 @@ int Incidence::revision() const
return mRevision;
}
-void Incidence::setDtStart(const QDateTime &dtStart)
+void Incidence::setDtStart(const TQDateTime &dtStart)
{
if ( mRecurrence ) {
mRecurrence->setStartDateTime( dtStart );
@@ -262,49 +262,49 @@ void Incidence::setDtStart(const QDateTime &dtStart)
IncidenceBase::setDtStart( dtStart );
}
-void Incidence::setDescription(const QString &description)
+void Incidence::setDescription(const TQString &description)
{
if (mReadOnly) return;
mDescription = description;
updated();
}
-QString Incidence::description() const
+TQString Incidence::description() const
{
return mDescription;
}
-void Incidence::setSummary(const QString &summary)
+void Incidence::setSummary(const TQString &summary)
{
if (mReadOnly) return;
mSummary = summary;
updated();
}
-QString Incidence::summary() const
+TQString Incidence::summary() const
{
return mSummary;
}
-void Incidence::setCategories(const QStringList &categories)
+void Incidence::setCategories(const TQStringList &categories)
{
if (mReadOnly) return;
mCategories = categories;
updated();
}
-// TODO: remove setCategories(QString) function
-void Incidence::setCategories(const QString &catStr)
+// TODO: remove setCategories(TQString) function
+void Incidence::setCategories(const TQString &catStr)
{
if (mReadOnly) return;
mCategories.clear();
if (catStr.isEmpty()) return;
- mCategories = QStringList::split(",",catStr);
+ mCategories = TQStringList::split(",",catStr);
- QStringList::Iterator it;
+ TQStringList::Iterator it;
for(it = mCategories.begin();it != mCategories.end(); ++it) {
*it = (*it).stripWhiteSpace();
}
@@ -312,24 +312,24 @@ void Incidence::setCategories(const QString &catStr)
updated();
}
-QStringList Incidence::categories() const
+TQStringList Incidence::categories() const
{
return mCategories;
}
-QString Incidence::categoriesStr() const
+TQString Incidence::categoriesStr() const
{
return mCategories.join(",");
}
-void Incidence::setRelatedToUid(const QString &relatedToUid)
+void Incidence::setRelatedToUid(const TQString &relatedToUid)
{
if ( mReadOnly || mRelatedToUid == relatedToUid ) return;
mRelatedToUid = relatedToUid;
updated();
}
-QString Incidence::relatedToUid() const
+TQString Incidence::relatedToUid() const
{
return mRelatedToUid;
}
@@ -345,7 +345,7 @@ void Incidence::setRelatedTo(Incidence *relatedTo)
if ( mRelatedTo->uid() != mRelatedToUid )
setRelatedToUid( mRelatedTo->uid() );
} else {
- setRelatedToUid( QString::null );
+ setRelatedToUid( TQString::null );
}
}
@@ -372,7 +372,7 @@ void Incidence::removeRelation(Incidence *event)
{
mRelations.removeRef(event);
// if (event->getRelatedTo() == this) event->setRelatedTo(0);
- mRelatedToUid=QString();
+ mRelatedToUid=TQString();
}
@@ -411,12 +411,12 @@ bool Incidence::doesRecur() const
else return false;
}
-bool Incidence::recursOn(const QDate &qd) const
+bool Incidence::recursOn(const TQDate &qd) const
{
return ( mRecurrence && mRecurrence->recursOn(qd) );
}
-bool Incidence::recursAt(const QDateTime &qdt) const
+bool Incidence::recursAt(const TQDateTime &qdt) const
{
return ( mRecurrence && mRecurrence->recursAt(qdt) );
}
@@ -429,13 +429,13 @@ bool Incidence::recursAt(const QDateTime &qdt) const
@return the start date/time of all occurences that overlap with the given
date. Empty list if the incidence does not overlap with the date at all
*/
-QValueList<QDateTime> Incidence::startDateTimesForDate( const QDate &date ) const
+TQValueList<TQDateTime> Incidence::startDateTimesForDate( const TQDate &date ) const
{
//kdDebug(5800) << "Incidence::startDateTimesForDate " << date << ", incidence=" << summary() << endl;
- QDateTime start = dtStart();
- QDateTime end = endDateRecurrenceBase();
+ TQDateTime start = dtStart();
+ TQDateTime end = endDateRecurrenceBase();
- QValueList<QDateTime> result;
+ TQValueList<TQDateTime> result;
// TODO_Recurrence: Also work if only due date is given...
if ( !start.isValid() && ! end.isValid() ) {
@@ -452,13 +452,13 @@ QValueList<QDateTime> Incidence::startDateTimesForDate( const QDate &date ) cons
int days = start.daysTo( end );
// Account for possible recurrences going over midnight, while the original event doesn't
- QDate tmpday( date.addDays( -days - 1 ) );
- QDateTime tmp;
+ TQDate tmpday( date.addDays( -days - 1 ) );
+ TQDateTime tmp;
while ( tmpday <= date ) {
if ( recurrence()->recursOn( tmpday ) ) {
- QValueList<QTime> times = recurrence()->recurTimesOn( tmpday );
- for ( QValueList<QTime>::ConstIterator it = times.begin(); it != times.end(); ++it ) {
- tmp = QDateTime( tmpday, *it );
+ TQValueList<TQTime> times = recurrence()->recurTimesOn( tmpday );
+ for ( TQValueList<TQTime>::ConstIterator it = times.begin(); it != times.end(); ++it ) {
+ tmp = TQDateTime( tmpday, *it );
if ( endDateForStart( tmp ).date() >= date )
result << tmp;
}
@@ -476,13 +476,13 @@ QValueList<QDateTime> Incidence::startDateTimesForDate( const QDate &date ) cons
date/time. Empty list if the incidence does not happen at the given
time at all.
*/
-QValueList<QDateTime> Incidence::startDateTimesForDateTime( const QDateTime &datetime ) const
+TQValueList<TQDateTime> Incidence::startDateTimesForDateTime( const TQDateTime &datetime ) const
{
// kdDebug(5800) << "Incidence::startDateTimesForDateTime " << datetime << ", incidence=" << summary() << endl;
- QDateTime start = dtStart();
- QDateTime end = endDateRecurrenceBase();
+ TQDateTime start = dtStart();
+ TQDateTime end = endDateRecurrenceBase();
- QValueList<QDateTime> result;
+ TQValueList<TQDateTime> result;
// TODO_Recurrence: Also work if only due date is given...
if ( !start.isValid() && ! end.isValid() ) {
@@ -499,13 +499,13 @@ QValueList<QDateTime> Incidence::startDateTimesForDateTime( const QDateTime &dat
int days = start.daysTo( end );
// Account for possible recurrences going over midnight, while the original event doesn't
- QDate tmpday( datetime.date().addDays( -days - 1 ) );
- QDateTime tmp;
+ TQDate tmpday( datetime.date().addDays( -days - 1 ) );
+ TQDateTime tmp;
while ( tmpday <= datetime.date() ) {
if ( recurrence()->recursOn( tmpday ) ) {
- QValueList<QTime> times = recurrence()->recurTimesOn( tmpday );
- for ( QValueList<QTime>::ConstIterator it = times.begin(); it != times.end(); ++it ) {
- tmp = QDateTime( tmpday, *it );
+ TQValueList<TQTime> times = recurrence()->recurTimesOn( tmpday );
+ for ( TQValueList<TQTime>::ConstIterator it = times.begin(); it != times.end(); ++it ) {
+ tmp = TQDateTime( tmpday, *it );
if ( !(tmp > datetime || endDateForStart( tmp ) < datetime ) )
result << tmp;
}
@@ -516,10 +516,10 @@ QValueList<QDateTime> Incidence::startDateTimesForDateTime( const QDateTime &dat
}
/** Return the end time of the occurrence if it starts at the given date/time */
-QDateTime Incidence::endDateForStart( const QDateTime &startDt ) const
+TQDateTime Incidence::endDateForStart( const TQDateTime &startDt ) const
{
- QDateTime start = dtStart();
- QDateTime end = endDateRecurrenceBase();
+ TQDateTime start = dtStart();
+ TQDateTime end = endDateRecurrenceBase();
if ( !end.isValid() ) return start;
if ( !start.isValid() ) return end;
@@ -536,7 +536,7 @@ QDateTime Incidence::endDateForStart( const QDateTime &startDt ) const
updated();
}
-void Incidence::addExDate( const QDate &date )
+void Incidence::addExDate( const TQDate &date )
{
if ( mReadOnly ) return;
recurrence()->addExDate( date );
@@ -558,7 +558,7 @@ void Incidence::setExDateTimes( const DateTimeList &exDates )
updated();
}
-void Incidence::addExDateTime( const QDateTime &date )
+void Incidence::addExDateTime( const TQDateTime &date )
{
if ( mReadOnly ) return;
recurrence()->addExDateTime( date );
@@ -580,7 +580,7 @@ void Incidence::setRDates(const DateList &exDates)
updated();
}
-void Incidence::addRDate( const QDate &date )
+void Incidence::addRDate( const TQDate &date )
{
if ( mReadOnly ) return;
recurrence()->addRDate( date );
@@ -602,7 +602,7 @@ void Incidence::setRDateTimes( const DateTimeList &exDates )
updated();
}
-void Incidence::addRDateTime( const QDateTime &date )
+void Incidence::addRDateTime( const TQDateTime &date )
{
if ( mReadOnly ) return;
recurrence()->addRDateTime( date );
@@ -629,7 +629,7 @@ void Incidence::deleteAttachment(Attachment *attachment)
mAttachments.removeRef(attachment);
}
-void Incidence::deleteAttachments( const QString &mime )
+void Incidence::deleteAttachments( const TQString &mime )
{
Attachment::List::Iterator it = mAttachments.begin();
while( it != mAttachments.end() ) {
@@ -643,7 +643,7 @@ Attachment::List Incidence::attachments() const
return mAttachments;
}
-Attachment::List Incidence::attachments(const QString& mime) const
+Attachment::List Incidence::attachments(const TQString& mime) const
{
Attachment::List attachments;
Attachment::List::ConstIterator it;
@@ -659,14 +659,14 @@ void Incidence::clearAttachments()
mAttachments.clearAll();
}
-void Incidence::setResources(const QStringList &resources)
+void Incidence::setResources(const TQStringList &resources)
{
if (mReadOnly) return;
mResources = resources;
updated();
}
-QStringList Incidence::resources() const
+TQStringList Incidence::resources() const
{
return mResources;
}
@@ -688,11 +688,11 @@ void Incidence::setStatus(Incidence::Status status)
{
if (mReadOnly || status == StatusX) return;
mStatus = status;
- mStatusString = QString::null;
+ mStatusString = TQString::null;
updated();
}
-void Incidence::setCustomStatus(const QString &status)
+void Incidence::setCustomStatus(const TQString &status)
{
if (mReadOnly) return;
mStatus = status.isEmpty() ? StatusNone : StatusX;
@@ -705,14 +705,14 @@ Incidence::Status Incidence::status() const
return mStatus;
}
-QString Incidence::statusStr() const
+TQString Incidence::statusStr() const
{
if (mStatus == StatusX)
return mStatusString;
return statusName(mStatus);
}
-QString Incidence::statusName(Incidence::Status status)
+TQString Incidence::statusName(Incidence::Status status)
{
switch (status) {
case StatusTentative: return i18n("incidence status", "Tentative");
@@ -725,7 +725,7 @@ QString Incidence::statusName(Incidence::Status status)
case StatusFinal: return i18n("Final");
case StatusX:
case StatusNone:
- default: return QString::null;
+ default: return TQString::null;
}
}
@@ -741,12 +741,12 @@ int Incidence::secrecy() const
return mSecrecy;
}
-QString Incidence::secrecyStr() const
+TQString Incidence::secrecyStr() const
{
return secrecyName(mSecrecy);
}
-QString Incidence::secrecyName(int secrecy)
+TQString Incidence::secrecyName(int secrecy)
{
switch (secrecy) {
case SecrecyPublic:
@@ -760,9 +760,9 @@ QString Incidence::secrecyName(int secrecy)
}
}
-QStringList Incidence::secrecyList()
+TQStringList Incidence::secrecyList()
{
- QStringList list;
+ TQStringList list;
list << secrecyName(SecrecyPublic);
list << secrecyName(SecrecyPrivate);
list << secrecyName(SecrecyConfidential);
@@ -811,24 +811,24 @@ bool Incidence::isAlarmEnabled() const
return false;
}
-void Incidence::setLocation(const QString &location)
+void Incidence::setLocation(const TQString &location)
{
if (mReadOnly) return;
mLocation = location;
updated();
}
-QString Incidence::location() const
+TQString Incidence::location() const
{
return mLocation;
}
-void Incidence::setSchedulingID( const QString& sid )
+void Incidence::setSchedulingID( const TQString& sid )
{
mSchedulingID = sid;
}
-QString Incidence::schedulingID() const
+TQString Incidence::schedulingID() const
{
if ( mSchedulingID.isNull() )
// Nothing set, so use the normal uid
diff --git a/libkcal/incidence.h b/libkcal/incidence.h
index 5c90fd910..268b2cede 100644
--- a/libkcal/incidence.h
+++ b/libkcal/incidence.h
@@ -22,9 +22,9 @@
#ifndef INCIDENCE_H
#define INCIDENCE_H
-#include <qdatetime.h>
-#include <qstringlist.h>
-#include <qvaluelist.h>
+#include <tqdatetime.h>
+#include <tqstringlist.h>
+#include <tqvaluelist.h>
#include "recurrence.h"
#include "alarm.h"
@@ -125,11 +125,11 @@ class LIBKCAL_EXPORT Incidence : public IncidenceBase, public Recurrence::Observ
/**
Set creation date.
*/
- void setCreated( const QDateTime & );
+ void setCreated( const TQDateTime & );
/**
Return time and date of creation.
*/
- QDateTime created() const;
+ TQDateTime created() const;
/**
Set the number of revisions this event has seen.
@@ -143,59 +143,59 @@ class LIBKCAL_EXPORT Incidence : public IncidenceBase, public Recurrence::Observ
/**
Set starting date/time.
*/
- virtual void setDtStart( const QDateTime &dtStart );
+ virtual void setDtStart( const TQDateTime &dtStart );
/**
- Return the incidence's ending date/time as a QDateTime.
+ Return the incidence's ending date/time as a TQDateTime.
*/
- virtual QDateTime dtEnd() const { return QDateTime(); }
+ virtual TQDateTime dtEnd() const { return TQDateTime(); }
/**
Set the long description.
*/
- void setDescription( const QString &description );
+ void setDescription( const TQString &description );
/**
Return long description.
*/
- QString description() const;
+ TQString description() const;
/**
Set short summary.
*/
- void setSummary( const QString &summary );
+ void setSummary( const TQString &summary );
/**
Return short summary.
*/
- QString summary() const;
+ TQString summary() const;
/**
Set categories.
*/
- void setCategories( const QStringList &categories );
+ void setCategories( const TQStringList &categories );
/**
Set categories based on a comma delimited string.
*/
- void setCategories(const QString &catStr);
+ void setCategories(const TQString &catStr);
/**
Return categories as a list of strings.
*/
- QStringList categories() const;
+ TQStringList categories() const;
/**
Return categories as a comma separated string.
*/
- QString categoriesStr() const;
+ TQString categoriesStr() const;
/**
Point at some other event to which the event relates. This function should
only be used when constructing a calendar before the related Incidence
exists.
*/
- void setRelatedToUid(const QString &);
+ void setRelatedToUid(const TQString &);
/**
What event does this one relate to? This function should
only be used when constructing a calendar before the related Incidence
exists.
*/
- QString relatedToUid() const;
+ TQString relatedToUid() const;
/**
Point at some other event to which the event relates
*/
@@ -241,12 +241,12 @@ class LIBKCAL_EXPORT Incidence : public IncidenceBase, public Recurrence::Observ
Returns true if the date specified is one on which the incidence will
recur.
*/
- virtual bool recursOn( const QDate &qd ) const;
+ virtual bool recursOn( const TQDate &qd ) const;
/**
Returns true if the date/time specified is one on which the incidence will
recur.
*/
- bool recursAt( const QDateTime &qdt ) const;
+ bool recursAt( const TQDateTime &qdt ) const;
/**
Calculates the start date/time for all recurrences that happen at some time
@@ -256,7 +256,7 @@ class LIBKCAL_EXPORT Incidence : public IncidenceBase, public Recurrence::Observ
@return the start date/time of all occurences that overlap with the given
date. Empty list if the incidence does not overlap with the date at all
*/
- virtual QValueList<QDateTime> startDateTimesForDate( const QDate &date ) const;
+ virtual TQValueList<TQDateTime> startDateTimesForDate( const TQDate &date ) const;
/**
Calculates the start date/time for all recurrences that happen at the given
@@ -266,10 +266,10 @@ class LIBKCAL_EXPORT Incidence : public IncidenceBase, public Recurrence::Observ
date/time. Empty list if the incidence does not happen at the given
time at all.
*/
- virtual QValueList<QDateTime> startDateTimesForDateTime( const QDateTime &datetime ) const;
+ virtual TQValueList<TQDateTime> startDateTimesForDateTime( const TQDateTime &datetime ) const;
/** Return the end time of the occurrence if it starts at the given date/time */
- virtual QDateTime endDateForStart( const QDateTime &startDt ) const;
+ virtual TQDateTime endDateForStart( const TQDateTime &startDt ) const;
// %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -287,7 +287,7 @@ class LIBKCAL_EXPORT Incidence : public IncidenceBase, public Recurrence::Observ
/**
Remove and delete all attachments with this mime type.
*/
- void deleteAttachments( const QString &mime );
+ void deleteAttachments( const TQString &mime );
/**
Return list of all associated attachments.
*/
@@ -295,7 +295,7 @@ class LIBKCAL_EXPORT Incidence : public IncidenceBase, public Recurrence::Observ
/**
Find a list of attachments with this mime type.
*/
- Attachment::List attachments( const QString &mime ) const;
+ Attachment::List attachments( const TQString &mime ) const;
/**
Remove and delete all attachments.
*/
@@ -318,15 +318,15 @@ class LIBKCAL_EXPORT Incidence : public IncidenceBase, public Recurrence::Observ
/**
Return secrecy as translated string.
*/
- QString secrecyStr() const;
+ TQString secrecyStr() const;
/**
Return list of all available secrecy states as list of translated strings.
*/
- static QStringList secrecyList();
+ static TQStringList secrecyList();
/**
Return human-readable translated name of secrecy class.
*/
- static QString secrecyName( int );
+ static TQString secrecyName( int );
/**
Sets the incidence status to a standard status value. See
@@ -338,7 +338,7 @@ class LIBKCAL_EXPORT Incidence : public IncidenceBase, public Recurrence::Observ
@param status non-standard status string. If empty,
the incidence status will be set to StatusNone.
*/
- void setCustomStatus( const QString &status );
+ void setCustomStatus( const TQString &status );
/**
Return the event's status.
*/
@@ -346,11 +346,11 @@ class LIBKCAL_EXPORT Incidence : public IncidenceBase, public Recurrence::Observ
/**
Return the event's status string.
*/
- QString statusStr() const;
+ TQString statusStr() const;
/**
Return human-readable translated name of status value.
*/
- static QString statusName( Status );
+ static TQString statusName( Status );
// %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -360,11 +360,11 @@ class LIBKCAL_EXPORT Incidence : public IncidenceBase, public Recurrence::Observ
/**
Set resources used, such as Office, Car, etc.
*/
- void setResources( const QStringList &resources );
+ void setResources( const TQStringList &resources );
/**
Return list of current resources.
*/
- QStringList resources() const;
+ TQStringList resources() const;
/**
Set the incidences priority. The priority has to be a value between 0 and
@@ -418,11 +418,11 @@ class LIBKCAL_EXPORT Incidence : public IncidenceBase, public Recurrence::Observ
/**
Set the event's/todo's location. Do _not_ use it with journal.
*/
- void setLocation(const QString &location);
+ void setLocation(const TQString &location);
/**
Return the event's/todo's location. Do _not_ use it with journal.
*/
- QString location() const;
+ TQString location() const;
/**
Set the event's/todo's scheduling ID. Does not make sense for journals.
@@ -433,12 +433,12 @@ class LIBKCAL_EXPORT Incidence : public IncidenceBase, public Recurrence::Observ
end up with more than one resource having events with the same UID,
if you have access to other peoples resources.
*/
- void setSchedulingID( const QString& sid );
+ void setSchedulingID( const TQString& sid );
/**
Return the event's/todo's scheduling ID. Does not make sense for journals
If this is not set, it will return uid().
*/
- QString schedulingID() const;
+ TQString schedulingID() const;
/** Observer interface for the recurrence class. If the recurrence is changed,
this method will be called for the incidence the recurrence object
@@ -448,23 +448,23 @@ class LIBKCAL_EXPORT Incidence : public IncidenceBase, public Recurrence::Observ
/** Return the end date/time of the base incidence (e.g. due date/time for
to-dos, end date/time for events).
This method needs to be reimplemented by derived classes. */
- virtual QDateTime endDateRecurrenceBase() const { return dtStart(); }
+ virtual TQDateTime endDateRecurrenceBase() const { return dtStart(); }
private:
int mRevision;
// base components of jounal, event and todo
- QDateTime mCreated;
- QString mDescription;
- QString mSummary;
- QStringList mCategories;
+ TQDateTime mCreated;
+ TQString mDescription;
+ TQString mSummary;
+ TQStringList mCategories;
Incidence *mRelatedTo;
- QString mRelatedToUid;
+ TQString mRelatedToUid;
Incidence::List mRelations;
Attachment::List mAttachments;
- QStringList mResources;
+ TQStringList mResources;
- QString mStatusString;
+ TQString mStatusString;
Status mStatus;
int mSecrecy;
int mPriority; // 1 = highest, 2 = less, etc.
@@ -472,10 +472,10 @@ class LIBKCAL_EXPORT Incidence : public IncidenceBase, public Recurrence::Observ
Alarm::List mAlarms;
Recurrence *mRecurrence;
- QString mLocation;
+ TQString mLocation;
// Scheduling ID - used only to identify between scheduling mails
- QString mSchedulingID;
+ TQString mSchedulingID;
class Private;
Private *d;
diff --git a/libkcal/incidencebase.cpp b/libkcal/incidencebase.cpp
index 4777e5c4f..2aeba830f 100644
--- a/libkcal/incidencebase.cpp
+++ b/libkcal/incidencebase.cpp
@@ -127,32 +127,32 @@ bool IncidenceBase::operator==( const IncidenceBase& i2 ) const
-void IncidenceBase::setUid(const QString &uid)
+void IncidenceBase::setUid(const TQString &uid)
{
mUid = uid;
updated();
}
-QString IncidenceBase::uid() const
+TQString IncidenceBase::uid() const
{
return mUid;
}
-void IncidenceBase::setLastModified(const QDateTime &lm)
+void IncidenceBase::setLastModified(const TQDateTime &lm)
{
// DON'T! updated() because we call this from
// Calendar::updateEvent().
// Remove milliseconds part.
- QDateTime current = lm;
- QTime t = current.time();
+ TQDateTime current = lm;
+ TQTime t = current.time();
t.setHMS( t.hour(), t.minute(), t.second(), 0 );
current.setTime( t );
mLastModified = current;
}
-QDateTime IncidenceBase::lastModified() const
+TQDateTime IncidenceBase::lastModified() const
{
return mLastModified;
}
@@ -167,9 +167,9 @@ void IncidenceBase::setOrganizer( const Person &o )
updated();
}
-void IncidenceBase::setOrganizer(const QString &o)
+void IncidenceBase::setOrganizer(const TQString &o)
{
- QString mail( o );
+ TQString mail( o );
if ( mail.startsWith("MAILTO:", false) )
mail = mail.remove( 0, 7 );
// split the string into full name plus email.
@@ -187,29 +187,29 @@ void IncidenceBase::setReadOnly( bool readOnly )
mReadOnly = readOnly;
}
-void IncidenceBase::setDtStart(const QDateTime &dtStart)
+void IncidenceBase::setDtStart(const TQDateTime &dtStart)
{
// if (mReadOnly) return;
mDtStart = dtStart;
updated();
}
-QDateTime IncidenceBase::dtStart() const
+TQDateTime IncidenceBase::dtStart() const
{
return mDtStart;
}
-QString IncidenceBase::dtStartTimeStr() const
+TQString IncidenceBase::dtStartTimeStr() const
{
return KGlobal::locale()->formatTime(dtStart().time());
}
-QString IncidenceBase::dtStartDateStr(bool shortfmt) const
+TQString IncidenceBase::dtStartDateStr(bool shortfmt) const
{
return KGlobal::locale()->formatDate(dtStart().date(),shortfmt);
}
-QString IncidenceBase::dtStartStr() const
+TQString IncidenceBase::dtStartStr() const
{
return KGlobal::locale()->formatDateTime(dtStart());
}
@@ -228,15 +228,15 @@ void IncidenceBase::setFloats(bool f)
}
-void IncidenceBase::addComment(const QString& comment)
+void IncidenceBase::addComment(const TQString& comment)
{
mComments += comment;
}
-bool IncidenceBase::removeComment( const QString& comment)
+bool IncidenceBase::removeComment( const TQString& comment)
{
bool found = false;
- QStringList::Iterator i;
+ TQStringList::Iterator i;
for ( i = mComments.begin(); !found && i != mComments.end(); ++i ) {
if ( (*i) == comment ) {
@@ -253,7 +253,7 @@ void IncidenceBase::clearComments()
mComments.clear();
}
-QStringList IncidenceBase::comments() const
+TQStringList IncidenceBase::comments() const
{
return mComments;
}
@@ -298,7 +298,7 @@ void IncidenceBase::clearAttendees()
mAttendees.clear();
}
-Attendee *IncidenceBase::attendeeByMail( const QString &email ) const
+Attendee *IncidenceBase::attendeeByMail( const TQString &email ) const
{
Attendee::List::ConstIterator it;
for( it = mAttendees.begin(); it != mAttendees.end(); ++it ) {
@@ -308,15 +308,15 @@ Attendee *IncidenceBase::attendeeByMail( const QString &email ) const
return 0;
}
-Attendee *IncidenceBase::attendeeByMails( const QStringList &emails,
- const QString &email) const
+Attendee *IncidenceBase::attendeeByMails( const TQStringList &emails,
+ const TQString &email) const
{
- QStringList mails = emails;
+ TQStringList mails = emails;
if ( !email.isEmpty() ) mails.append( email );
Attendee::List::ConstIterator itA;
for( itA = mAttendees.begin(); itA != mAttendees.end(); ++itA ) {
- for ( QStringList::Iterator it = mails.begin(); it != mails.end(); ++it ) {
+ for ( TQStringList::Iterator it = mails.begin(); it != mails.end(); ++it ) {
if ( (*itA)->email() == (*it) ) return *itA;
}
}
@@ -324,7 +324,7 @@ Attendee *IncidenceBase::attendeeByMails( const QStringList &emails,
return 0;
}
-Attendee *IncidenceBase::attendeeByUid( const QString &uid ) const
+Attendee *IncidenceBase::attendeeByUid( const TQString &uid ) const
{
Attendee::List::ConstIterator it;
for( it = mAttendees.begin(); it != mAttendees.end(); ++it ) {
@@ -400,7 +400,7 @@ void IncidenceBase::unRegisterObserver( IncidenceBase::Observer *observer )
void IncidenceBase::updated()
{
- QPtrListIterator<Observer> it(mObservers);
+ TQPtrListIterator<Observer> it(mObservers);
while( it.current() ) {
Observer *o = it.current();
++it;
@@ -415,7 +415,7 @@ void IncidenceBase::customPropertyUpdated()
void IncidenceBase::updatedSilent()
{
- QPtrListIterator<Observer> it(mObservers);
+ TQPtrListIterator<Observer> it(mObservers);
while( it.current() ) {
Observer *o = it.current();
++it;
diff --git a/libkcal/incidencebase.h b/libkcal/incidencebase.h
index 1cccb4dde..72455b432 100644
--- a/libkcal/incidencebase.h
+++ b/libkcal/incidencebase.h
@@ -22,18 +22,18 @@
#ifndef KCAL_INCIDENCEBASE_H
#define KCAL_INCIDENCEBASE_H
-#include <qdatetime.h>
-#include <qstringlist.h>
-#include <qvaluelist.h>
-#include <qptrlist.h>
+#include <tqdatetime.h>
+#include <tqstringlist.h>
+#include <tqvaluelist.h>
+#include <tqptrlist.h>
#include "customproperties.h"
#include "attendee.h"
namespace KCal {
-typedef QValueList<QDate> DateList;
-typedef QValueList<QDateTime> DateTimeList;
+typedef TQValueList<TQDate> DateList;
+typedef TQValueList<TQDateTime> DateTimeList;
class Event;
class Todo;
class Journal;
@@ -106,21 +106,21 @@ class LIBKCAL_EXPORT IncidenceBase : public CustomProperties
*/
virtual bool accept(Visitor &) { return false; }
- virtual QCString type() const = 0;
+ virtual TQCString type() const = 0;
/** Set the unique id for the event */
- void setUid( const QString & );
+ void setUid( const TQString & );
/** Return the unique id for the event */
- QString uid() const;
+ TQString uid() const;
/** Sets the time the incidence was last modified. */
- void setLastModified( const QDateTime &lm );
+ void setLastModified( const TQDateTime &lm );
/** Return the time the incidence was last modified. */
- QDateTime lastModified() const;
+ TQDateTime lastModified() const;
/** sets the organizer for the event */
void setOrganizer( const Person &o );
- void setOrganizer( const QString &o );
+ void setOrganizer( const TQString &o );
Person organizer() const;
/** Set readonly status. */
@@ -128,19 +128,19 @@ class LIBKCAL_EXPORT IncidenceBase : public CustomProperties
/** Return if the object is read-only. */
bool isReadOnly() const { return mReadOnly; }
- /** for setting the event's starting date/time with a QDateTime. */
- virtual void setDtStart( const QDateTime &dtStart );
- /** returns an event's starting date/time as a QDateTime. */
- virtual QDateTime dtStart() const;
+ /** for setting the event's starting date/time with a TQDateTime. */
+ virtual void setDtStart( const TQDateTime &dtStart );
+ /** returns an event's starting date/time as a TQDateTime. */
+ virtual TQDateTime dtStart() const;
/** returns an event's starting time as a string formatted according to the
users locale settings */
- virtual QString dtStartTimeStr() const;
+ virtual TQString dtStartTimeStr() const;
/** returns an event's starting date as a string formatted according to the
users locale settings */
- virtual QString dtStartDateStr( bool shortfmt = true ) const;
+ virtual TQString dtStartDateStr( bool shortfmt = true ) const;
/** returns an event's starting date and time as a string formatted according
to the users locale settings */
- virtual QString dtStartStr() const;
+ virtual TQString dtStartStr() const;
virtual void setDuration( int seconds );
int duration() const;
@@ -164,7 +164,7 @@ class LIBKCAL_EXPORT IncidenceBase : public CustomProperties
*
* @param comment The comment to add.
*/
- void addComment(const QString& comment);
+ void addComment(const TQString& comment);
/**
* Remove a comment from the event.
@@ -174,13 +174,13 @@ class LIBKCAL_EXPORT IncidenceBase : public CustomProperties
*
* @return true if match found, false otherwise.
*/
- bool removeComment( const QString& comment );
+ bool removeComment( const TQString& comment );
/** Delete all comments associated with this incidence. */
void clearComments();
/** Return all comments associated with this incidence. */
- QStringList comments() const;
+ TQStringList comments() const;
/**
Add Attendee to this incidence. IncidenceBase takes ownership of the
@@ -205,16 +205,16 @@ class LIBKCAL_EXPORT IncidenceBase : public CustomProperties
/**
Return the Attendee with this email address.
*/
- Attendee *attendeeByMail( const QString & ) const;
+ Attendee *attendeeByMail( const TQString & ) const;
/**
Return first Attendee with one of the given email addresses.
*/
- Attendee *attendeeByMails( const QStringList &,
- const QString &email = QString::null ) const;
+ Attendee *attendeeByMails( const TQStringList &,
+ const TQString &email = TQString::null ) const;
/**
Return attendee with given uid.
*/
- Attendee *attendeeByUid( const QString &uid ) const;
+ Attendee *attendeeByUid( const TQString &uid ) const;
/**
Pilot synchronization states
@@ -266,12 +266,12 @@ class LIBKCAL_EXPORT IncidenceBase : public CustomProperties
private:
// base components
- QDateTime mDtStart;
+ TQDateTime mDtStart;
Person mOrganizer;
- QString mUid;
- QDateTime mLastModified;
+ TQString mUid;
+ TQDateTime mLastModified;
Attendee::List mAttendees;
- QStringList mComments;
+ TQStringList mComments;
bool mFloats;
@@ -282,7 +282,7 @@ class LIBKCAL_EXPORT IncidenceBase : public CustomProperties
unsigned long mPilotId; // unique id for pilot sync
int mSyncStatus; // status (for sync)
- QPtrList<Observer> mObservers;
+ TQPtrList<Observer> mObservers;
class Private;
Private *d;
diff --git a/libkcal/incidenceformatter.cpp b/libkcal/incidenceformatter.cpp
index 766906fd8..877d8860d 100644
--- a/libkcal/incidenceformatter.cpp
+++ b/libkcal/incidenceformatter.cpp
@@ -48,9 +48,9 @@
#include <kglobal.h>
#include <kiconloader.h>
-#include <qbuffer.h>
-#include <qstylesheet.h>
-#include <qdatetime.h>
+#include <tqbuffer.h>
+#include <tqstylesheet.h>
+#include <tqdatetime.h>
#include <time.h>
@@ -62,24 +62,24 @@ using namespace KCal;
* Helper functions for the extensive display (event viewer)
*******************************************************************/
-static QString eventViewerAddLink( const QString &ref, const QString &text,
+static TQString eventViewerAddLink( const TQString &ref, const TQString &text,
bool newline = true )
{
- QString tmpStr( "<a href=\"" + ref + "\">" + text + "</a>" );
+ TQString tmpStr( "<a href=\"" + ref + "\">" + text + "</a>" );
if ( newline ) tmpStr += "\n";
return tmpStr;
}
-static QString eventViewerAddTag( const QString & tag, const QString & text )
+static TQString eventViewerAddTag( const TQString & tag, const TQString & text )
{
int numLineBreaks = text.contains( "\n" );
- QString str = "<" + tag + ">";
- QString tmpText = text;
- QString tmpStr = str;
+ TQString str = "<" + tag + ">";
+ TQString tmpText = text;
+ TQString tmpStr = str;
if( numLineBreaks >= 0 ) {
if ( numLineBreaks > 0) {
int pos = 0;
- QString tmp;
+ TQString tmp;
for( int i = 0; i <= numLineBreaks; i++ ) {
pos = tmpText.find( "\n" );
tmp = tmpText.left( pos );
@@ -94,7 +94,7 @@ static QString eventViewerAddTag( const QString & tag, const QString & text )
return tmpStr;
}
-static QString linkPerson( const QString& email, QString name, QString uid )
+static TQString linkPerson( const TQString& email, TQString name, TQString uid )
{
// Make the search, if there is an email address to search on,
// and either name or uid is missing
@@ -109,12 +109,12 @@ static QString linkPerson( const QString& email, QString name, QString uid )
uid = o.uid();
} else
// Email not found in the addressbook. Don't make a link
- uid = QString::null;
+ uid = TQString::null;
}
kdDebug(5850) << "formatAttendees: uid = " << uid << endl;
// Show the attendee
- QString tmpString = "<li>";
+ TQString tmpString = "<li>";
if ( !uid.isEmpty() ) {
// There is a UID, so make a link to the addressbook
if ( name.isEmpty() )
@@ -134,16 +134,16 @@ static QString linkPerson( const QString& email, QString name, QString uid )
KURL mailto;
mailto.setProtocol( "mailto" );
mailto.setPath( person.fullName() );
- tmpString += eventViewerAddLink( mailto.url(), QString::null );
+ tmpString += eventViewerAddLink( mailto.url(), TQString::null );
}
tmpString += "</li>\n";
return tmpString;
}
-static QString eventViewerFormatAttendees( Incidence *event )
+static TQString eventViewerFormatAttendees( Incidence *event )
{
- QString tmpStr;
+ TQString tmpStr;
Attendee::List attendees = event->attendees();
if ( attendees.count() ) {
@@ -151,7 +151,7 @@ static QString eventViewerFormatAttendees( Incidence *event )
tmpStr += eventViewerAddTag( "i", i18n("Organizer") );
tmpStr += "<ul>";
tmpStr += linkPerson( event->organizer().email(),
- event->organizer().name(), QString::null );
+ event->organizer().name(), TQString::null );
tmpStr += "</ul>";
// Add attendees links
@@ -173,15 +173,15 @@ static QString eventViewerFormatAttendees( Incidence *event )
return tmpStr;
}
-static QString eventViewerFormatAttachments( Incidence *i )
+static TQString eventViewerFormatAttachments( Incidence *i )
{
- QString tmpStr;
+ TQString tmpStr;
Attachment::List as = i->attachments();
if ( as.count() > 0 ) {
Attachment::List::ConstIterator it;
for( it = as.begin(); it != as.end(); ++it ) {
if ( (*it)->isUri() ) {
- QString name;
+ TQString name;
if ( (*it)->uri().startsWith( "kmail:" ) )
name = i18n( "Show mail" );
else
@@ -198,16 +198,16 @@ static QString eventViewerFormatAttachments( Incidence *i )
FIXME:This function depends of kaddressbook. Is necessary a new
type of event?
*/
-static QString eventViewerFormatBirthday( Event *event )
+static TQString eventViewerFormatBirthday( Event *event )
{
- if ( !event) return QString::null;
- if ( event->customProperty("KABC","BIRTHDAY") != "YES" ) return QString::null;
+ if ( !event) return TQString::null;
+ if ( event->customProperty("KABC","BIRTHDAY") != "YES" ) return TQString::null;
- QString uid = event->customProperty("KABC","UID-1");
- QString name = event->customProperty("KABC","NAME-1");
- QString email= event->customProperty("KABC","EMAIL-1");
+ TQString uid = event->customProperty("KABC","UID-1");
+ TQString name = event->customProperty("KABC","NAME-1");
+ TQString email= event->customProperty("KABC","EMAIL-1");
- QString tmpString = "<ul>";
+ TQString tmpString = "<ul>";
tmpString += linkPerson( email, name, uid );
if ( event->customProperty( "KABC", "ANNIVERSARY") == "YES" ) {
@@ -221,9 +221,9 @@ static QString eventViewerFormatBirthday( Event *event )
return tmpString;
}
-static QString eventViewerFormatHeader( Incidence *incidence )
+static TQString eventViewerFormatHeader( Incidence *incidence )
{
- QString tmpStr = "<table><tr>";
+ TQString tmpStr = "<table><tr>";
// show icons
{
@@ -272,10 +272,10 @@ static QString eventViewerFormatHeader( Incidence *incidence )
return tmpStr;
}
-static QString eventViewerFormatEvent( Event *event )
+static TQString eventViewerFormatEvent( Event *event )
{
- if ( !event ) return QString::null;
- QString tmpStr = eventViewerFormatHeader( event );
+ if ( !event ) return TQString::null;
+ TQString tmpStr = eventViewerFormatHeader( event );
tmpStr += "<table>";
@@ -344,8 +344,8 @@ static QString eventViewerFormatEvent( Event *event )
}
if ( event->doesRecur() ) {
- QDateTime dt =
- event->recurrence()->getNextDateTime( QDateTime::currentDateTime() );
+ TQDateTime dt =
+ event->recurrence()->getNextDateTime( TQDateTime::currentDateTime() );
tmpStr += "<tr>";
tmpStr += "<td align=\"right\"><b>" + i18n( "Next on" ) + "</b></td>";
if ( !event->doesFloat() ) {
@@ -379,10 +379,10 @@ static QString eventViewerFormatEvent( Event *event )
return tmpStr;
}
-static QString eventViewerFormatTodo( Todo *todo )
+static TQString eventViewerFormatTodo( Todo *todo )
{
- if ( !todo ) return QString::null;
- QString tmpStr = eventViewerFormatHeader( todo );
+ if ( !todo ) return TQString::null;
+ TQString tmpStr = eventViewerFormatHeader( todo );
tmpStr += "<table>";
@@ -425,7 +425,7 @@ static QString eventViewerFormatTodo( Todo *todo )
tmpStr += "<tr>";
tmpStr += "<td align=\"right\"><b>" + i18n( "Priority" ) + "</b></td>";
if ( todo->priority() > 0 ) {
- tmpStr += "<td>" + QString::number( todo->priority() ) + "</td>";
+ tmpStr += "<td>" + TQString::number( todo->priority() ) + "</td>";
} else {
tmpStr += "<td>" + i18n( "Unspecified" ) + "</td>";
}
@@ -437,8 +437,8 @@ static QString eventViewerFormatTodo( Todo *todo )
tmpStr += "</tr>";
if ( todo->doesRecur() ) {
- QDateTime dt =
- todo->recurrence()->getNextDateTime( QDateTime::currentDateTime() );
+ TQDateTime dt =
+ todo->recurrence()->getNextDateTime( TQDateTime::currentDateTime() );
tmpStr += "<tr>";
tmpStr += "<td align=\"right\"><b>" + i18n( "Next on" ) + "</b></td>";
if ( !todo->doesFloat() ) {
@@ -472,11 +472,11 @@ static QString eventViewerFormatTodo( Todo *todo )
return tmpStr;
}
-static QString eventViewerFormatJournal( Journal *journal )
+static TQString eventViewerFormatJournal( Journal *journal )
{
- if ( !journal ) return QString::null;
+ if ( !journal ) return TQString::null;
- QString tmpStr;
+ TQString tmpStr;
if ( !journal->summary().isEmpty() ) {
tmpStr += eventViewerAddTag( "u",
eventViewerAddTag( "b", journal->summary() ) );
@@ -487,11 +487,11 @@ static QString eventViewerFormatJournal( Journal *journal )
return tmpStr;
}
-static QString eventViewerFormatFreeBusy( FreeBusy *fb )
+static TQString eventViewerFormatFreeBusy( FreeBusy *fb )
{
- if ( !fb ) return QString::null;
+ if ( !fb ) return TQString::null;
- QString tmpStr =
+ TQString tmpStr =
eventViewerAddTag( "u",
eventViewerAddTag( "b", i18n("Free/Busy information for %1")
.arg( fb->organizer().fullName() ) ) );
@@ -499,15 +499,15 @@ static QString eventViewerFormatFreeBusy( FreeBusy *fb )
.arg( KGlobal::locale()->formatDate( fb->dtStart().date(), true ) )
.arg( KGlobal::locale()->formatDate( fb->dtEnd().date(), true ) ) );
- QValueList<Period> periods = fb->busyPeriods();
+ TQValueList<Period> periods = fb->busyPeriods();
- QString text = eventViewerAddTag( "em", eventViewerAddTag( "b", i18n("Busy:") ) );
- QValueList<Period>::iterator it;
+ TQString text = eventViewerAddTag( "em", eventViewerAddTag( "b", i18n("Busy:") ) );
+ TQValueList<Period>::iterator it;
for ( it = periods.begin(); it != periods.end(); ++it ) {
Period per = *it;
if ( per.hasDuration() ) {
int dur = per.duration().asSeconds();
- QString cont;
+ TQString cont;
if ( dur >= 3600 ) {
cont += i18n("1 hour ", "%n hours ", dur / 3600 );
dur %= 3600;
@@ -546,7 +546,7 @@ class IncidenceFormatter::EventViewerVisitor : public IncidenceBase::Visitor
public:
EventViewerVisitor() { mResult = ""; }
bool act( IncidenceBase *incidence ) { return incidence->accept( *this ); }
- QString result() const { return mResult; }
+ TQString result() const { return mResult; }
protected:
bool visit( Event *event )
{
@@ -570,17 +570,17 @@ class IncidenceFormatter::EventViewerVisitor : public IncidenceBase::Visitor
}
protected:
- QString mResult;
+ TQString mResult;
};
-QString IncidenceFormatter::extensiveDisplayString( IncidenceBase *incidence )
+TQString IncidenceFormatter::extensiveDisplayString( IncidenceBase *incidence )
{
- if ( !incidence ) return QString::null;
+ if ( !incidence ) return TQString::null;
EventViewerVisitor v;
if ( v.act( incidence ) ) {
return v.result();
} else
- return QString::null;
+ return TQString::null;
}
@@ -590,14 +590,14 @@ QString IncidenceFormatter::extensiveDisplayString( IncidenceBase *incidence )
* Helper functions for the body part formatter of kmail
*******************************************************************/
-static QString string2HTML( const QString& str )
+static TQString string2HTML( const TQString& str )
{
- return QStyleSheet::convertFromPlainText(str, QStyleSheetItem::WhiteSpaceNormal);
+ return TQStyleSheet::convertFromPlainText(str, TQStyleSheetItem::WhiteSpaceNormal);
}
-static QString eventStartTimeStr( Event *event )
+static TQString eventStartTimeStr( Event *event )
{
- QString tmp;
+ TQString tmp;
if ( ! event->doesFloat() ) {
tmp = i18n("%1: Start Date, %2: Start Time", "%1 %2")
.arg( event->dtStartDateStr(), event->dtStartTimeStr() );
@@ -608,9 +608,9 @@ static QString eventStartTimeStr( Event *event )
return tmp;
}
-static QString eventEndTimeStr( Event *event )
+static TQString eventEndTimeStr( Event *event )
{
- QString tmp;
+ TQString tmp;
if ( event->hasEndDate() ) {
if ( ! event->doesFloat() ) {
tmp = i18n("%1: End Date, %2: End Time", "%1 %2")
@@ -625,21 +625,21 @@ static QString eventEndTimeStr( Event *event )
return tmp;
}
-static QString invitationRow( const QString &cell1, const QString &cell2 )
+static TQString invitationRow( const TQString &cell1, const TQString &cell2 )
{
return "<tr><td>" + cell1 + "</td><td>" + cell2 + "</td></tr>\n";
}
-static QString invitationsDetailsIncidence( Incidence *incidence )
+static TQString invitationsDetailsIncidence( Incidence *incidence )
{
- QString html;
- QString descr = incidence->description();
+ TQString html;
+ TQString descr = incidence->description();
if( !descr.isEmpty() ) {
html += "<br/><u>" + i18n("Description:")
+ "</u><table border=\"0\"><tr><td>&nbsp;</td><td>";
html += string2HTML(descr) + "</td></tr></table>";
}
- QStringList comments = incidence->comments();
+ TQStringList comments = incidence->comments();
if ( !comments.isEmpty() ) {
html += "<br><u>" + i18n("Comments:")
+ "</u><table border=\"0\"><tr><td>&nbsp;</td><td><ul>";
@@ -650,27 +650,27 @@ static QString invitationsDetailsIncidence( Incidence *incidence )
return html;
}
-static QString invitationDetailsEvent( Event* event )
+static TQString invitationDetailsEvent( Event* event )
{
// Meeting details are formatted into an HTML table
if ( !event )
- return QString::null;
+ return TQString::null;
- QString html;
- QString tmp;
+ TQString html;
+ TQString tmp;
- QString sSummary = i18n( "Summary unspecified" );
+ TQString sSummary = i18n( "Summary unspecified" );
if ( ! event->summary().isEmpty() ) {
sSummary = string2HTML( event->summary() );
}
- QString sLocation = i18n( "Location unspecified" );
+ TQString sLocation = i18n( "Location unspecified" );
if ( ! event->location().isEmpty() ) {
sLocation = string2HTML( event->location() );
}
- QString dir = ( QApplication::reverseLayout() ? "rtl" : "ltr" );
- html = QString("<div dir=\"%1\">\n").arg(dir);
+ TQString dir = ( TQApplication::reverseLayout() ? "rtl" : "ltr" );
+ html = TQString("<div dir=\"%1\">\n").arg(dir);
html += "<table border=\"0\" cellpadding=\"1\" cellspacing=\"1\">\n";
@@ -686,8 +686,8 @@ static QString invitationDetailsEvent( Event* event )
// Meeting Duration Row
if ( !event->doesFloat() && event->hasEndDate() ) {
- tmp = QString::null;
- QTime sDuration(0,0,0), t;
+ tmp = TQString::null;
+ TQTime sDuration(0,0,0), t;
int secs = event->dtStart().secsTo( event->dtEnd() );
t = sDuration.addSecs( secs );
if ( t.hour() > 0 ) {
@@ -707,21 +707,21 @@ static QString invitationDetailsEvent( Event* event )
return html;
}
-static QString invitationDetailsTodo( Todo *todo )
+static TQString invitationDetailsTodo( Todo *todo )
{
// Task details are formatted into an HTML table
if ( !todo )
- return QString::null;
+ return TQString::null;
- QString sSummary = i18n( "Summary unspecified" );
- QString sDescr = i18n( "Description unspecified" );
+ TQString sSummary = i18n( "Summary unspecified" );
+ TQString sDescr = i18n( "Description unspecified" );
if ( ! todo->summary().isEmpty() ) {
sSummary = todo->summary();
}
if ( ! todo->description().isEmpty() ) {
sDescr = todo->description();
}
- QString html( "<table border=\"0\" cellpadding=\"1\" cellspacing=\"1\">\n" );
+ TQString html( "<table border=\"0\" cellpadding=\"1\" cellspacing=\"1\">\n" );
html += invitationRow( i18n( "Summary:" ), sSummary );
html += invitationRow( i18n( "Description:" ), sDescr );
html += "</table>\n";
@@ -730,20 +730,20 @@ static QString invitationDetailsTodo( Todo *todo )
return html;
}
-static QString invitationDetailsJournal( Journal *journal )
+static TQString invitationDetailsJournal( Journal *journal )
{
if ( !journal )
- return QString::null;
+ return TQString::null;
- QString sSummary = i18n( "Summary unspecified" );
- QString sDescr = i18n( "Description unspecified" );
+ TQString sSummary = i18n( "Summary unspecified" );
+ TQString sDescr = i18n( "Description unspecified" );
if ( ! journal->summary().isEmpty() ) {
sSummary = journal->summary();
}
if ( ! journal->description().isEmpty() ) {
sDescr = journal->description();
}
- QString html( "<table border=\"0\" cellpadding=\"1\" cellspacing=\"1\">\n" );
+ TQString html( "<table border=\"0\" cellpadding=\"1\" cellspacing=\"1\">\n" );
html += invitationRow( i18n( "Summary:" ), sSummary );
html += invitationRow( i18n( "Date:" ), journal->dtStartDateStr( false ) );
html += invitationRow( i18n( "Description:" ), sDescr );
@@ -753,11 +753,11 @@ static QString invitationDetailsJournal( Journal *journal )
return html;
}
-static QString invitationDetailsFreeBusy( FreeBusy *fb )
+static TQString invitationDetailsFreeBusy( FreeBusy *fb )
{
if ( !fb )
- return QString::null;
- QString html( "<table border=\"0\" cellpadding=\"1\" cellspacing=\"1\">\n" );
+ return TQString::null;
+ TQString html( "<table border=\"0\" cellpadding=\"1\" cellspacing=\"1\">\n" );
html += invitationRow( i18n("Person:"), fb->organizer().fullName() );
html += invitationRow( i18n("Start date:"), fb->dtStartDateStr() );
@@ -766,14 +766,14 @@ static QString invitationDetailsFreeBusy( FreeBusy *fb )
html += "<tr><td colspan=2><hr></td></tr>\n";
html += "<tr><td colspan=2>Busy periods given in this free/busy object:</td></tr>\n";
- QValueList<Period> periods = fb->busyPeriods();
+ TQValueList<Period> periods = fb->busyPeriods();
- QValueList<Period>::iterator it;
+ TQValueList<Period>::iterator it;
for ( it = periods.begin(); it != periods.end(); ++it ) {
Period per = *it;
if ( per.hasDuration() ) {
int dur = per.duration().asSeconds();
- QString cont;
+ TQString cont;
if ( dur >= 3600 ) {
cont += i18n("1 hour ", "%n hours ", dur / 3600);
dur %= 3600;
@@ -785,11 +785,11 @@ static QString invitationDetailsFreeBusy( FreeBusy *fb )
if ( dur > 0 ) {
cont += i18n("1 second", "%n seconds", dur);
}
- html += invitationRow( QString::null, i18n("startDate for duration", "%1 for %2")
+ html += invitationRow( TQString::null, i18n("startDate for duration", "%1 for %2")
.arg( KGlobal::locale()->formatDateTime( per.start(), false ) )
.arg(cont) );
} else {
- QString cont;
+ TQString cont;
if ( per.start().date() == per.end().date() ) {
cont = i18n("date, fromTime - toTime ", "%1, %2 - %3")
.arg( KGlobal::locale()->formatDate( per.start().date() ) )
@@ -801,7 +801,7 @@ static QString invitationDetailsFreeBusy( FreeBusy *fb )
.arg( KGlobal::locale()->formatDateTime( per.end(), false ) );
}
- html += invitationRow( QString::null, cont );
+ html += invitationRow( TQString::null, cont );
}
}
@@ -809,10 +809,10 @@ static QString invitationDetailsFreeBusy( FreeBusy *fb )
return html;
}
-static QString invitationHeaderEvent( Event *event, ScheduleMessage *msg )
+static TQString invitationHeaderEvent( Event *event, ScheduleMessage *msg )
{
if ( !msg || !event )
- return QString::null;
+ return TQString::null;
switch ( msg->method() ) {
case Scheduler::Publish:
return i18n("This event has been published");
@@ -830,19 +830,19 @@ static QString invitationHeaderEvent( Event *event, ScheduleMessage *msg )
Attendee::List attendees = event->attendees();
if( attendees.count() == 0 ) {
kdDebug(5850) << "No attendees in the iCal reply!\n";
- return QString::null;
+ return TQString::null;
}
if( attendees.count() != 1 )
kdDebug(5850) << "Warning: attendeecount in the reply should be 1 "
<< "but is " << attendees.count() << endl;
Attendee* attendee = *attendees.begin();
- QString attendeeName = attendee->name();
+ TQString attendeeName = attendee->name();
if ( attendeeName.isEmpty() )
attendeeName = attendee->email();
if ( attendeeName.isEmpty() )
attendeeName = i18n( "Sender" );
- QString delegatorName, dummy;
+ TQString delegatorName, dummy;
KPIM::getNameAndMail( attendee->delegator(), delegatorName, dummy );
if ( delegatorName.isEmpty() )
delegatorName = attendee->delegator();
@@ -866,7 +866,7 @@ static QString invitationHeaderEvent( Event *event, ScheduleMessage *msg )
return i18n( "%1 declines this meeting invitation on behalf of %2" )
.arg( attendeeName ).arg( delegatorName );
case Attendee::Delegated: {
- QString delegate, dummy;
+ TQString delegate, dummy;
KPIM::getNameAndMail( attendee->delegate(), delegate, dummy );
if ( delegate.isEmpty() )
delegate = attendee->delegate();
@@ -891,13 +891,13 @@ static QString invitationHeaderEvent( Event *event, ScheduleMessage *msg )
return i18n("Error: iMIP message with unknown method: '%1'")
.arg( msg->method() );
}
- return QString::null;
+ return TQString::null;
}
-static QString invitationHeaderTodo( Todo *todo, ScheduleMessage *msg )
+static TQString invitationHeaderTodo( Todo *todo, ScheduleMessage *msg )
{
if ( !msg || !todo )
- return QString::null;
+ return TQString::null;
switch ( msg->method() ) {
case Scheduler::Publish:
return i18n("This task has been published");
@@ -915,7 +915,7 @@ static QString invitationHeaderTodo( Todo *todo, ScheduleMessage *msg )
Attendee::List attendees = todo->attendees();
if( attendees.count() == 0 ) {
kdDebug(5850) << "No attendees in the iCal reply!\n";
- return QString::null;
+ return TQString::null;
}
if( attendees.count() != 1 )
kdDebug(5850) << "Warning: attendeecount in the reply should be 1 "
@@ -932,7 +932,7 @@ static QString invitationHeaderTodo( Todo *todo, ScheduleMessage *msg )
case Attendee::Declined:
return i18n( "Sender declines this task" );
case Attendee::Delegated: {
- QString delegate, dummy;
+ TQString delegate, dummy;
KPIM::getNameAndMail( attendee->delegate(), delegate, dummy );
if ( delegate.isEmpty() )
delegate = attendee->delegate();
@@ -956,14 +956,14 @@ static QString invitationHeaderTodo( Todo *todo, ScheduleMessage *msg )
return i18n("Error: iMIP message with unknown method: '%1'")
.arg( msg->method() );
}
- return QString::null;
+ return TQString::null;
}
-static QString invitationHeaderJournal( Journal *journal, ScheduleMessage *msg )
+static TQString invitationHeaderJournal( Journal *journal, ScheduleMessage *msg )
{
// TODO: Several of the methods are not allowed for journals, so remove them.
if ( !msg || !journal )
- return QString::null;
+ return TQString::null;
switch ( msg->method() ) {
case Scheduler::Publish:
return i18n("This journal has been published");
@@ -979,7 +979,7 @@ static QString invitationHeaderJournal( Journal *journal, ScheduleMessage *msg )
Attendee::List attendees = journal->attendees();
if( attendees.count() == 0 ) {
kdDebug(5850) << "No attendees in the iCal reply!\n";
- return QString::null;
+ return TQString::null;
}
if( attendees.count() != 1 )
kdDebug(5850) << "Warning: attendeecount in the reply should be 1 "
@@ -1013,13 +1013,13 @@ static QString invitationHeaderJournal( Journal *journal, ScheduleMessage *msg )
return i18n("Error: iMIP message with unknown method: '%1'")
.arg( msg->method() );
}
- return QString::null;
+ return TQString::null;
}
-static QString invitationHeaderFreeBusy( FreeBusy *fb, ScheduleMessage *msg )
+static TQString invitationHeaderFreeBusy( FreeBusy *fb, ScheduleMessage *msg )
{
if ( !msg || !fb )
- return QString::null;
+ return TQString::null;
switch ( msg->method() ) {
case Scheduler::Publish:
return i18n("This free/busy list has been published");
@@ -1043,10 +1043,10 @@ class IncidenceFormatter::ScheduleMessageVisitor : public IncidenceBase::Visitor
public:
ScheduleMessageVisitor() : mMessage(0) { mResult = ""; }
bool act( IncidenceBase *incidence, ScheduleMessage *msg ) { mMessage = msg; return incidence->accept( *this ); }
- QString result() const { return mResult; }
+ TQString result() const { return mResult; }
protected:
- QString mResult;
+ TQString mResult;
ScheduleMessage *mMessage;
};
@@ -1113,11 +1113,11 @@ class IncidenceFormatter::IncidenceCompareVisitor :
return incidence->accept( *this );
}
- QString result() const
+ TQString result() const
{
if ( mChanges.isEmpty() )
- return QString();
- QString html = "<div align=\"left\"><ul><li>";
+ return TQString();
+ TQString html = "<div align=\"left\"><ul><li>";
html += mChanges.join( "</li><li>" );
html += "</li><ul></div>";
return html;
@@ -1190,13 +1190,13 @@ class IncidenceFormatter::IncidenceCompareVisitor :
private:
Incidence* mExistingIncidence;
- QStringList mChanges;
+ TQStringList mChanges;
};
-QString InvitationFormatterHelper::makeLink( const QString &id, const QString &text )
+TQString InvitationFormatterHelper::makeLink( const TQString &id, const TQString &text )
{
- QString res( "<a href=\"%1\"><b>%2</b></a>" );
+ TQString res( "<a href=\"%1\"><b>%2</b></a>" );
return res.arg( generateLinkURL( id ) ).arg( text );
return res;
}
@@ -1211,16 +1211,16 @@ static bool incidenceOwnedByMe( Calendar* calendar, Incidence *incidence )
ResourceCalendar* res = cal->resource( incidence );
if ( !res )
return true;
- const QString subRes = res->subresourceIdentifier( incidence );
+ const TQString subRes = res->subresourceIdentifier( incidence );
if ( !subRes.contains( "/.INBOX.directory/" ) )
return false;
return true;
}
-QString IncidenceFormatter::formatICalInvitation( QString invitation, Calendar *mCalendar,
+TQString IncidenceFormatter::formatICalInvitation( TQString invitation, Calendar *mCalendar,
InvitationFormatterHelper *helper )
{
- if ( invitation.isEmpty() ) return QString::null;
+ if ( invitation.isEmpty() ) return TQString::null;
ICalFormat format;
// parseScheduleMessage takes the tz from the calendar, no need to set it manually here for the format!
@@ -1230,7 +1230,7 @@ QString IncidenceFormatter::formatICalInvitation( QString invitation, Calendar *
kdDebug( 5850 ) << "Failed to parse the scheduling message" << endl;
Q_ASSERT( format.exception() );
kdDebug( 5850 ) << format.exception()->message() << endl;
- return QString::null;
+ return TQString::null;
}
IncidenceBase *incBase = msg->event();
@@ -1252,11 +1252,11 @@ QString IncidenceFormatter::formatICalInvitation( QString invitation, Calendar *
}
// First make the text of the message
- QString html;
+ TQString html;
- QString tableStyle = QString::fromLatin1(
+ TQString tableStyle = TQString::fromLatin1(
"style=\"border: solid 1px; margin: 0em;\"" );
- QString tableHead = QString::fromLatin1(
+ TQString tableHead = TQString::fromLatin1(
"<div align=\"center\">"
"<table width=\"80%\" cellpadding=\"1\" cellspacing=\"0\" %1>"
"<tr><td>").arg(tableStyle);
@@ -1265,12 +1265,12 @@ QString IncidenceFormatter::formatICalInvitation( QString invitation, Calendar *
InvitationHeaderVisitor headerVisitor;
// The InvitationHeaderVisitor returns false if the incidence is somehow invalid, or not handled
if ( !headerVisitor.act( incBase, msg ) )
- return QString::null;
+ return TQString::null;
html += "<b>" + headerVisitor.result() + "</b>";
InvitationBodyVisitor bodyVisitor;
if ( !bodyVisitor.act( incBase, msg ) )
- return QString::null;
+ return TQString::null;
html += bodyVisitor.result();
if ( msg->method() == Scheduler::Request ) { // ### Scheduler::Publish/Refresh/Add as well?
@@ -1382,15 +1382,15 @@ QString IncidenceFormatter::formatICalInvitation( QString invitation, Calendar *
//-----------------------------------------------------------------------------
-static QString stringProp( KTNEFMessage* tnefMsg, const Q_UINT32& key,
- const QString& fallback = QString::null)
+static TQString stringProp( KTNEFMessage* tnefMsg, const Q_UINT32& key,
+ const TQString& fallback = TQString::null)
{
return tnefMsg->findProp( key < 0x10000 ? key & 0xFFFF : key >> 16,
fallback );
}
-static QString sNamedProp( KTNEFMessage* tnefMsg, const QString& name,
- const QString& fallback = QString::null )
+static TQString sNamedProp( KTNEFMessage* tnefMsg, const TQString& name,
+ const TQString& fallback = TQString::null )
{
return tnefMsg->findNamedProp( name, fallback );
}
@@ -1449,7 +1449,7 @@ static void unset_tz( struct save_tz old_tz )
if( old_tz.tz_env_str ) free( old_tz.tz_env_str );
}
-static QDateTime utc2Local( const QDateTime& utcdt )
+static TQDateTime utc2Local( const TQDateTime& utcdt )
{
struct tm tmL;
@@ -1458,16 +1458,16 @@ static QDateTime utc2Local( const QDateTime& utcdt )
unset_tz( tmp_tz );
localtime_r( &utc, &tmL );
- return QDateTime( QDate( tmL.tm_year+1900, tmL.tm_mon+1, tmL.tm_mday ),
- QTime( tmL.tm_hour, tmL.tm_min, tmL.tm_sec ) );
+ return TQDateTime( TQDate( tmL.tm_year+1900, tmL.tm_mon+1, tmL.tm_mday ),
+ TQTime( tmL.tm_hour, tmL.tm_min, tmL.tm_sec ) );
}
-static QDateTime pureISOToLocalQDateTime( const QString& dtStr,
+static TQDateTime pureISOToLocalQDateTime( const TQString& dtStr,
bool bDateOnly = false )
{
- QDate tmpDate;
- QTime tmpTime;
+ TQDate tmpDate;
+ TQTime tmpTime;
int year, month, day, hour, minute, second;
if( bDateOnly ) {
@@ -1489,7 +1489,7 @@ static QDateTime pureISOToLocalQDateTime( const QString& dtStr,
tmpTime.setHMS( hour, minute, second );
if( tmpDate.isValid() && tmpTime.isValid() ) {
- QDateTime dT = QDateTime( tmpDate, tmpTime );
+ TQDateTime dT = TQDateTime( tmpDate, tmpTime );
if( !bDateOnly ) {
// correct for GMT ( == Zulu time == UTC )
@@ -1501,18 +1501,18 @@ static QDateTime pureISOToLocalQDateTime( const QString& dtStr,
}
return dT;
} else
- return QDateTime();
+ return TQDateTime();
}
-QString IncidenceFormatter::msTNEFToVPart( const QByteArray& tnef )
+TQString IncidenceFormatter::msTNEFToVPart( const TQByteArray& tnef )
{
bool bOk = false;
KTNEFParser parser;
- QBuffer buf( tnef );
- CalendarLocal cal ( QString::fromLatin1( "UTC" ) );
+ TQBuffer buf( tnef );
+ CalendarLocal cal ( TQString::fromLatin1( "UTC" ) );
KABC::Addressee addressee;
KABC::VCardConverter cardConv;
ICalFormat calFormat;
@@ -1520,11 +1520,11 @@ QString IncidenceFormatter::msTNEFToVPart( const QByteArray& tnef )
if( parser.openDevice( &buf ) ) {
KTNEFMessage* tnefMsg = parser.message();
- //QMap<int,KTNEFProperty*> props = parser.message()->properties();
+ //TQMap<int,KTNEFProperty*> props = parser.message()->properties();
// Everything depends from property PR_MESSAGE_CLASS
// (this is added by KTNEFParser):
- QString msgClass = tnefMsg->findProp( 0x001A, QString::null, true )
+ TQString msgClass = tnefMsg->findProp( 0x001A, TQString::null, true )
.upper();
if( !msgClass.isEmpty() ) {
// Match the old class names that might be used by Outlook for
@@ -1553,7 +1553,7 @@ QString IncidenceFormatter::msTNEFToVPart( const QByteArray& tnef )
if( bCompatClassAppointment || "IPM.APPOINTMENT" == msgClass ) {
// Compose a vCal
bool bIsReply = false;
- QString prodID = "-//Microsoft Corporation//Outlook ";
+ TQString prodID = "-//Microsoft Corporation//Outlook ";
prodID += tnefMsg->findNamedProp( "0x8554", "9.0" );
prodID += "MIMEDIR/EN\n";
prodID += "VERSION:2.0\n";
@@ -1585,7 +1585,7 @@ QString IncidenceFormatter::msTNEFToVPart( const QByteArray& tnef )
/// ### FIXME Need to get this attribute written
ScheduleMessage schedMsg(event, method, ScheduleMessage::Unknown );
- QString sSenderSearchKeyEmail( tnefMsg->findProp( 0x0C1D ) );
+ TQString sSenderSearchKeyEmail( tnefMsg->findProp( 0x0C1D ) );
if( !sSenderSearchKeyEmail.isEmpty() ) {
int colon = sSenderSearchKeyEmail.find( ':' );
@@ -1594,10 +1594,10 @@ QString IncidenceFormatter::msTNEFToVPart( const QByteArray& tnef )
sSenderSearchKeyEmail.remove( 0, colon+1 );
}
- QString s( tnefMsg->findProp( 0x0e04 ) );
- QStringList attendees = QStringList::split( ';', s );
+ TQString s( tnefMsg->findProp( 0x0e04 ) );
+ TQStringList attendees = TQStringList::split( ';', s );
if( attendees.count() ) {
- for( QStringList::Iterator it = attendees.begin();
+ for( TQStringList::Iterator it = attendees.begin();
it != attendees.end(); ++it ) {
// Skip all entries that have no '@' since these are
// no mail addresses
@@ -1624,7 +1624,7 @@ QString IncidenceFormatter::msTNEFToVPart( const QByteArray& tnef )
// This must be old style, let us use the PR_SENDER_SEARCH_KEY.
s = sSenderSearchKeyEmail;
if( !s.isEmpty() ) {
- Attendee *attendee = new Attendee( QString::null, QString::null,
+ Attendee *attendee = new Attendee( TQString::null, TQString::null,
true );
if( bIsReply ) {
if( bCompatMethodAccepted )
@@ -1647,13 +1647,13 @@ QString IncidenceFormatter::msTNEFToVPart( const QByteArray& tnef )
if( !s.isEmpty() )
event->setOrganizer( s );
- s = tnefMsg->findProp( 0x8516 ).replace( QChar( '-' ), QString::null )
- .replace( QChar( ':' ), QString::null );
- event->setDtStart( QDateTime::fromString( s ) ); // ## Format??
+ s = tnefMsg->findProp( 0x8516 ).replace( TQChar( '-' ), TQString::null )
+ .replace( TQChar( ':' ), TQString::null );
+ event->setDtStart( TQDateTime::fromString( s ) ); // ## Format??
- s = tnefMsg->findProp( 0x8517 ).replace( QChar( '-' ), QString::null )
- .replace( QChar( ':' ), QString::null );
- event->setDtEnd( QDateTime::fromString( s ) );
+ s = tnefMsg->findProp( 0x8517 ).replace( TQChar( '-' ), TQString::null )
+ .replace( TQChar( ':' ), TQString::null );
+ event->setDtEnd( TQDateTime::fromString( s ) );
s = tnefMsg->findProp( 0x8208 );
event->setLocation( s );
@@ -1669,10 +1669,10 @@ QString IncidenceFormatter::msTNEFToVPart( const QByteArray& tnef )
// PENDING(khz): is this value in local timezone? Must it be
// adjusted? Most likely this is a bug in the server or in
// Outlook - we ignore it for now.
- s = tnefMsg->findProp( 0x8202 ).replace( QChar( '-' ), QString::null )
- .replace( QChar( ':' ), QString::null );
+ s = tnefMsg->findProp( 0x8202 ).replace( TQChar( '-' ), TQString::null )
+ .replace( TQChar( ':' ), TQString::null );
// ### libkcal always uses currentDateTime()
- // event->setDtStamp(QDateTime::fromString(s));
+ // event->setDtStamp(TQDateTime::fromString(s));
s = tnefMsg->findNamedProp( "Keywords" );
event->setCategories( s );
@@ -1689,14 +1689,14 @@ QString IncidenceFormatter::msTNEFToVPart( const QByteArray& tnef )
// is reminder flag set ?
if(!tnefMsg->findProp(0x8503).isEmpty()) {
Alarm *alarm = new Alarm(event);
- QDateTime highNoonTime =
+ TQDateTime highNoonTime =
pureISOToLocalQDateTime( tnefMsg->findProp( 0x8502 )
- .replace( QChar( '-' ), "" )
- .replace( QChar( ':' ), "" ) );
- QDateTime wakeMeUpTime =
+ .replace( TQChar( '-' ), "" )
+ .replace( TQChar( ':' ), "" ) );
+ TQDateTime wakeMeUpTime =
pureISOToLocalQDateTime( tnefMsg->findProp( 0x8560, "" )
- .replace( QChar( '-' ), "" )
- .replace( QChar( ':' ), "" ) );
+ .replace( TQChar( '-' ), "" )
+ .replace( TQChar( ':' ), "" ) );
alarm->setTime(wakeMeUpTime);
if( highNoonTime.isValid() && wakeMeUpTime.isValid() )
@@ -1727,9 +1727,9 @@ QString IncidenceFormatter::msTNEFToVPart( const QByteArray& tnef )
addressee.insertCustom( "KADDRESSBOOK", "X-Office", stringProp( tnefMsg, MAPI_TAG_PR_OFFICE_LOCATION ) );
addressee.insertCustom( "KADDRESSBOOK", "X-Profession", stringProp( tnefMsg, MAPI_TAG_PR_PROFESSION ) );
- QString s = tnefMsg->findProp( MAPI_TAG_PR_WEDDING_ANNIVERSARY )
- .replace( QChar( '-' ), QString::null )
- .replace( QChar( ':' ), QString::null );
+ TQString s = tnefMsg->findProp( MAPI_TAG_PR_WEDDING_ANNIVERSARY )
+ .replace( TQChar( '-' ), TQString::null )
+ .replace( TQChar( ':' ), TQString::null );
if( !s.isEmpty() )
addressee.insertCustom( "KADDRESSBOOK", "X-Anniversary", s );
@@ -1782,7 +1782,7 @@ QString IncidenceFormatter::msTNEFToVPart( const QByteArray& tnef )
// a line looking like the following one:
// vPart += "\nADR;TYPE=dom;TYPE=intl;TYPE=parcel;TYPE=postal;TYPE=work;TYPE=home:other_pobox;;other_str1\nother_str2;other_loc;other_region;other_pocode;other_country
- QString nr;
+ TQString nr;
nr = stringProp( tnefMsg, MAPI_TAG_PR_HOME_TELEPHONE_NUMBER );
addressee.insertPhoneNumber( KABC::PhoneNumber( nr, KABC::PhoneNumber::Home ) );
nr = stringProp( tnefMsg, MAPI_TAG_PR_BUSINESS_TELEPHONE_NUMBER );
@@ -1795,10 +1795,10 @@ QString IncidenceFormatter::msTNEFToVPart( const QByteArray& tnef )
addressee.insertPhoneNumber( KABC::PhoneNumber( nr, KABC::PhoneNumber::Fax | KABC::PhoneNumber::Work ) );
s = tnefMsg->findProp( MAPI_TAG_PR_BIRTHDAY )
- .replace( QChar( '-' ), QString::null )
- .replace( QChar( ':' ), QString::null );
+ .replace( TQChar( '-' ), TQString::null )
+ .replace( TQChar( ':' ), TQString::null );
if( !s.isEmpty() )
- addressee.setBirthday( QDateTime::fromString( s ) );
+ addressee.setBirthday( TQDateTime::fromString( s ) );
bOk = ( !addressee.isEmpty() );
} else if( "IPM.NOTE" == msgClass ) {
@@ -1808,7 +1808,7 @@ QString IncidenceFormatter::msTNEFToVPart( const QByteArray& tnef )
}
// Compose return string
- QString iCal = calFormat.toString( &cal );
+ TQString iCal = calFormat.toString( &cal );
if( !iCal.isEmpty() )
// This was an iCal
return iCal;
@@ -1819,11 +1819,11 @@ QString IncidenceFormatter::msTNEFToVPart( const QByteArray& tnef )
}
-QString IncidenceFormatter::formatTNEFInvitation( const QByteArray& tnef,
+TQString IncidenceFormatter::formatTNEFInvitation( const TQByteArray& tnef,
Calendar *mCalendar, InvitationFormatterHelper *helper )
{
- QString vPart = IncidenceFormatter::msTNEFToVPart( tnef );
- QString iCal = IncidenceFormatter::formatICalInvitation( vPart, mCalendar, helper );
+ TQString vPart = IncidenceFormatter::msTNEFToVPart( tnef );
+ TQString iCal = IncidenceFormatter::formatICalInvitation( vPart, mCalendar, helper );
if( !iCal.isEmpty() )
return iCal;
return vPart;
@@ -1847,7 +1847,7 @@ class IncidenceFormatter::ToolTipVisitor : public IncidenceBase::Visitor
mResult = "";
return incidence ? incidence->accept( *this ) : false;
}
- QString result() const { return mResult; }
+ TQString result() const { return mResult; }
protected:
bool visit( Event *event );
@@ -1855,22 +1855,22 @@ class IncidenceFormatter::ToolTipVisitor : public IncidenceBase::Visitor
bool visit( Journal *journal );
bool visit( FreeBusy *fb );
- QString dateRangeText( Event*event );
- QString dateRangeText( Todo *todo );
- QString dateRangeText( Journal *journal );
- QString dateRangeText( FreeBusy *fb );
+ TQString dateRangeText( Event*event );
+ TQString dateRangeText( Todo *todo );
+ TQString dateRangeText( Journal *journal );
+ TQString dateRangeText( FreeBusy *fb );
- QString generateToolTip( Incidence* incidence, QString dtRangeText );
+ TQString generateToolTip( Incidence* incidence, TQString dtRangeText );
protected:
bool mRichText;
- QString mResult;
+ TQString mResult;
};
-QString IncidenceFormatter::ToolTipVisitor::dateRangeText( Event*event )
+TQString IncidenceFormatter::ToolTipVisitor::dateRangeText( Event*event )
{
- QString ret;
- QString tmp;
+ TQString ret;
+ TQString tmp;
if ( event->isMultiDay() ) {
tmp = "<br>" + i18n("Event start", "<i>From:</i>&nbsp;%1");
@@ -1890,8 +1890,8 @@ QString IncidenceFormatter::ToolTipVisitor::dateRangeText( Event*event )
ret += "<br>"+i18n("<i>Date:</i>&nbsp;%1").
arg( event->dtStartDateStr().replace(" ", "&nbsp;") );
if ( !event->doesFloat() ) {
- const QString dtStartTime = event->dtStartTimeStr().replace( " ", "&nbsp;" );
- const QString dtEndTime = event->dtEndTimeStr().replace( " ", "&nbsp;" );
+ const TQString dtStartTime = event->dtStartTimeStr().replace( " ", "&nbsp;" );
+ const TQString dtEndTime = event->dtEndTimeStr().replace( " ", "&nbsp;" );
if ( dtStartTime == dtEndTime ) { // to prevent 'Time: 17:00 - 17:00'
tmp = "<br>" + i18n("time for event, &nbsp; to prevent ugly line breaks",
"<i>Time:</i>&nbsp;%1").
@@ -1908,9 +1908,9 @@ QString IncidenceFormatter::ToolTipVisitor::dateRangeText( Event*event )
return ret;
}
-QString IncidenceFormatter::ToolTipVisitor::dateRangeText( Todo*todo )
+TQString IncidenceFormatter::ToolTipVisitor::dateRangeText( Todo*todo )
{
- QString ret;
+ TQString ret;
bool floats( todo->doesFloat() );
if (todo->hasStartDate())
// No need to add <i> here. This is separated issue and each line
@@ -1933,19 +1933,19 @@ QString IncidenceFormatter::ToolTipVisitor::dateRangeText( Todo*todo )
return ret;
}
-QString IncidenceFormatter::ToolTipVisitor::dateRangeText( Journal*journal )
+TQString IncidenceFormatter::ToolTipVisitor::dateRangeText( Journal*journal )
{
- QString ret;
+ TQString ret;
if (journal->dtStart().isValid() ) {
ret += "<br>" + i18n("<i>Date:</i>&nbsp;%1").arg( journal->dtStartDateStr( false ) );
}
return ret;
}
-QString IncidenceFormatter::ToolTipVisitor::dateRangeText( FreeBusy *fb )
+TQString IncidenceFormatter::ToolTipVisitor::dateRangeText( FreeBusy *fb )
{
- QString tmp( "<br>" + i18n("<i>Period start:</i>&nbsp;%1") );
- QString ret = tmp.arg( KGlobal::locale()->formatDateTime( fb->dtStart() ) );
+ TQString tmp( "<br>" + i18n("<i>Period start:</i>&nbsp;%1") );
+ TQString ret = tmp.arg( KGlobal::locale()->formatDateTime( fb->dtStart() ) );
tmp = "<br>" + i18n("<i>Period start:</i>&nbsp;%1");
ret += tmp.arg( KGlobal::locale()->formatDateTime( fb->dtEnd() ) );
return ret;
@@ -1980,12 +1980,12 @@ bool IncidenceFormatter::ToolTipVisitor::visit( FreeBusy *fb )
return !mResult.isEmpty();
}
-QString IncidenceFormatter::ToolTipVisitor::generateToolTip( Incidence* incidence, QString dtRangeText )
+TQString IncidenceFormatter::ToolTipVisitor::generateToolTip( Incidence* incidence, TQString dtRangeText )
{
if ( !incidence )
- return QString::null;
+ return TQString::null;
- QString tmp = "<qt><b>"+ incidence->summary().replace("\n", "<br>")+"</b>";
+ TQString tmp = "<qt><b>"+ incidence->summary().replace("\n", "<br>")+"</b>";
tmp += dtRangeText;
@@ -1995,7 +1995,7 @@ QString IncidenceFormatter::ToolTipVisitor::generateToolTip( Incidence* incidenc
arg( incidence->location().replace("\n", "<br>") );
}
if (!incidence->description().isEmpty()) {
- QString desc(incidence->description());
+ TQString desc(incidence->description());
if (desc.length()>120) {
desc = desc.left(120) + "...";
}
@@ -2005,13 +2005,13 @@ QString IncidenceFormatter::ToolTipVisitor::generateToolTip( Incidence* incidenc
return tmp;
}
-QString IncidenceFormatter::toolTipString( IncidenceBase *incidence, bool richText )
+TQString IncidenceFormatter::toolTipString( IncidenceBase *incidence, bool richText )
{
ToolTipVisitor v;
if ( v.act( incidence, richText ) ) {
return v.result();
} else
- return QString::null;
+ return TQString::null;
}
@@ -2031,7 +2031,7 @@ class IncidenceFormatter::MailBodyVisitor : public IncidenceBase::Visitor
mResult = "";
return incidence ? incidence->accept( *this ) : false;
}
- QString result() const { return mResult; }
+ TQString result() const { return mResult; }
protected:
bool visit( Event *event );
@@ -2039,13 +2039,13 @@ class IncidenceFormatter::MailBodyVisitor : public IncidenceBase::Visitor
bool visit( Journal *journal );
bool visit( FreeBusy * ) { mResult = i18n("This is a Free Busy Object"); return !mResult.isEmpty(); }
protected:
- QString mResult;
+ TQString mResult;
};
-static QString mailBodyIncidence( Incidence *incidence )
+static TQString mailBodyIncidence( Incidence *incidence )
{
- QString body;
+ TQString body;
if ( !incidence->summary().isEmpty() ) {
body += i18n("Summary: %1\n").arg( incidence->summary() );
}
@@ -2060,7 +2060,7 @@ static QString mailBodyIncidence( Incidence *incidence )
bool IncidenceFormatter::MailBodyVisitor::visit( Event *event )
{
- QString recurrence[]= {i18n("no recurrence", "None"),
+ TQString recurrence[]= {i18n("no recurrence", "None"),
i18n("Minutely"), i18n("Hourly"), i18n("Daily"),
i18n("Weekly"), i18n("Monthly Same Day"), i18n("Monthly Same Position"),
i18n("Yearly"), i18n("Yearly"), i18n("Yearly")};
@@ -2090,7 +2090,7 @@ bool IncidenceFormatter::MailBodyVisitor::visit( Event *event )
} else {
if ( recur->duration() != -1 ) {
// TODO_Recurrence: What to do with floating
- QString endstr;
+ TQString endstr;
if ( event->doesFloat() ) {
endstr = KGlobal::locale()->formatDate( recur->endDate() );
} else {
@@ -2102,7 +2102,7 @@ bool IncidenceFormatter::MailBodyVisitor::visit( Event *event )
}
}
}
- QString details = event->description();
+ TQString details = event->description();
if ( !details.isEmpty() ) {
mResult += i18n("Details:\n%1\n").arg( details );
}
@@ -2125,7 +2125,7 @@ bool IncidenceFormatter::MailBodyVisitor::visit( Todo *todo )
mResult += i18n("Due Time: %1\n").arg( todo->dtDueTimeStr() );
}
}
- QString details = todo->description();
+ TQString details = todo->description();
if ( !details.isEmpty() ) {
mResult += i18n("Details:\n%1\n").arg( details );
}
@@ -2146,21 +2146,21 @@ bool IncidenceFormatter::MailBodyVisitor::visit( Journal *journal )
-QString IncidenceFormatter::mailBodyString( IncidenceBase *incidence )
+TQString IncidenceFormatter::mailBodyString( IncidenceBase *incidence )
{
if ( !incidence )
- return QString::null;
+ return TQString::null;
MailBodyVisitor v;
if ( v.act( incidence ) ) {
return v.result();
}
- return QString::null;
+ return TQString::null;
}
-static QString recurEnd( Incidence *incidence )
+static TQString recurEnd( Incidence *incidence )
{
- QString endstr;
+ TQString endstr;
if ( incidence->doesFloat() ) {
endstr = KGlobal::locale()->formatDate( incidence->recurrence()->endDate() );
} else {
@@ -2169,7 +2169,7 @@ static QString recurEnd( Incidence *incidence )
return endstr;
}
-QString IncidenceFormatter::recurrenceString(Incidence * incidence)
+TQString IncidenceFormatter::recurrenceString(Incidence * incidence)
{
if ( !incidence->doesRecur() )
return i18n( "No recurrence" );
diff --git a/libkcal/incidenceformatter.h b/libkcal/incidenceformatter.h
index 264bbd810..ce37b0164 100644
--- a/libkcal/incidenceformatter.h
+++ b/libkcal/incidenceformatter.h
@@ -22,7 +22,7 @@
#ifndef KCAL_INCIDENCEFORMATTER_H
#define KCAL_INCIDENCEFORMATTER_H
-#include <qstring.h>
+#include <tqstring.h>
#include "libkcal_export.h"
@@ -34,8 +34,8 @@ class IncidenceBase;
class LIBKCAL_EXPORT InvitationFormatterHelper
{
public:
- virtual QString generateLinkURL( const QString &id ) { return id; }
- virtual QString makeLink( const QString &id, const QString &text );
+ virtual TQString generateLinkURL( const TQString &id ) { return id; }
+ virtual TQString makeLink( const TQString &id, const TQString &text );
virtual Calendar* calendar() const { return 0; }
};
@@ -49,20 +49,20 @@ class LIBKCAL_EXPORT InvitationFormatterHelper
class LIBKCAL_EXPORT IncidenceFormatter
{
public:
- static QString toolTipString( IncidenceBase *incidence, bool richText = true );
- static QString mailBodyString( IncidenceBase *incidencebase );
- static QString extensiveDisplayString( IncidenceBase *incidence );
+ static TQString toolTipString( IncidenceBase *incidence, bool richText = true );
+ static TQString mailBodyString( IncidenceBase *incidencebase );
+ static TQString extensiveDisplayString( IncidenceBase *incidence );
- static QString formatICalInvitation( QString invitation, Calendar *mCalendar,
+ static TQString formatICalInvitation( TQString invitation, Calendar *mCalendar,
InvitationFormatterHelper *helper );
// Format a TNEF attachment to an HTML mail
- static QString formatTNEFInvitation( const QByteArray& tnef,
+ static TQString formatTNEFInvitation( const TQByteArray& tnef,
Calendar *mCalendar,
InvitationFormatterHelper *helper );
// Transform a TNEF attachment to an iCal or vCard
- static QString msTNEFToVPart( const QByteArray& tnef );
+ static TQString msTNEFToVPart( const TQByteArray& tnef );
- static QString recurrenceString( Incidence *incidence );
+ static TQString recurrenceString( Incidence *incidence );
private:
class EventViewerVisitor;
class ScheduleMessageVisitor;
diff --git a/libkcal/journal.h b/libkcal/journal.h
index 4307c2414..52d2d8dd3 100644
--- a/libkcal/journal.h
+++ b/libkcal/journal.h
@@ -40,7 +40,7 @@ class LIBKCAL_EXPORT Journal : public Incidence
bool accept( Visitor &v ) { return v.visit(this); }
bool operator==( const Journal& ) const;
- QCString type() const { return "Journal"; }
+ TQCString type() const { return "Journal"; }
/**
Return copy of this Journal. The caller owns the returned object.
diff --git a/libkcal/listbase.h b/libkcal/listbase.h
index 71a228168..2ce1dfa14 100644
--- a/libkcal/listbase.h
+++ b/libkcal/listbase.h
@@ -21,33 +21,33 @@
#ifndef KCAL_LISTBASE_H
#define KCAL_LISTBASE_H
-#include <qvaluelist.h>
+#include <tqvaluelist.h>
namespace KCal {
/**
This class provides a template for lists of pointers.
- It extends QValueList<T *> by auto delete funtionality known from QPtrList.
+ It extends TQValueList<T *> by auto delete funtionality known from TQPtrList.
*/
template<class T>
-class ListBase : public QValueList<T *>
+class ListBase : public TQValueList<T *>
{
public:
ListBase()
- : QValueList<T *>(), mAutoDelete( false )
+ : TQValueList<T *>(), mAutoDelete( false )
{
}
ListBase( const ListBase &l )
- : QValueList<T *>( l ), mAutoDelete( false )
+ : TQValueList<T *>( l ), mAutoDelete( false )
{
}
~ListBase()
{
if ( mAutoDelete ) {
- QValueListIterator<T *> it;
- for( it = QValueList<T*>::begin(); it != QValueList<T*>::end(); ++it ) {
+ TQValueListIterator<T *> it;
+ for( it = TQValueList<T*>::begin(); it != TQValueList<T*>::end(); ++it ) {
delete *it;
}
}
@@ -56,7 +56,7 @@ class ListBase : public QValueList<T *>
ListBase &operator=( const ListBase &l )
{
if ( this == &l ) return *this;
- QValueList<T *>::operator=( l );
+ TQValueList<T *>::operator=( l );
return *this;
}
@@ -67,8 +67,8 @@ class ListBase : public QValueList<T *>
bool removeRef( T *t )
{
- QValueListIterator<T *> it = find( t );
- if ( it == QValueList<T*>::end() ) {
+ TQValueListIterator<T *> it = find( t );
+ if ( it == TQValueList<T*>::end() ) {
return false;
} else {
if ( mAutoDelete ) delete t;
@@ -80,12 +80,12 @@ class ListBase : public QValueList<T *>
void clearAll()
{
if ( mAutoDelete ) {
- for ( QValueListIterator<T*> it = QValueList<T*>::begin();
- it != QValueList<T*>::end(); ++it ) {
+ for ( TQValueListIterator<T*> it = TQValueList<T*>::begin();
+ it != TQValueList<T*>::end(); ++it ) {
delete *it;
}
}
- QValueList<T*>::clear();
+ TQValueList<T*>::clear();
}
private:
diff --git a/libkcal/period.cpp b/libkcal/period.cpp
index 9d37aba48..be07d7d3b 100644
--- a/libkcal/period.cpp
+++ b/libkcal/period.cpp
@@ -31,14 +31,14 @@ Period::Period()
mHasDuration = false;
}
-Period::Period( const QDateTime &start, const QDateTime &end )
+Period::Period( const TQDateTime &start, const TQDateTime &end )
{
mStart = start;
mEnd = end;
mHasDuration = false;
}
-Period::Period( const QDateTime &start, const Duration &duration )
+Period::Period( const TQDateTime &start, const Duration &duration )
{
mStart = start;
mEnd = duration.end( start );
@@ -51,12 +51,12 @@ bool Period::operator<( const Period& other )
return start() < other.start();
}
-QDateTime Period::start() const
+TQDateTime Period::start() const
{
return mStart;
}
-QDateTime Period::end()const
+TQDateTime Period::end()const
{
return mEnd;
}
@@ -71,22 +71,22 @@ bool Period::hasDuration()const
return mHasDuration;
}
-QString KCal::Period::summary() const
+TQString KCal::Period::summary() const
{
return mSummary;
}
-void KCal::Period::setSummary(const QString & summary)
+void KCal::Period::setSummary(const TQString & summary)
{
mSummary = summary;
}
-QString KCal::Period::location() const
+TQString KCal::Period::location() const
{
return mLocation;
}
-void KCal::Period::setLocation(const QString & location)
+void KCal::Period::setLocation(const TQString & location)
{
mLocation = location;
}
diff --git a/libkcal/period.h b/libkcal/period.h
index aa87bfc9d..64dd24d9c 100644
--- a/libkcal/period.h
+++ b/libkcal/period.h
@@ -21,7 +21,7 @@
#ifndef KCAL_PERIOD_H
#define KCAL_PERIOD_H
-#include <qdatetime.h>
+#include <tqdatetime.h>
#include "libkcal_export.h"
#include "duration.h"
@@ -36,30 +36,30 @@ class KDE_EXPORT Period
{
public:
Period();
- Period( const QDateTime &start, const QDateTime &end );
- Period( const QDateTime &start, const Duration &duration );
+ Period( const TQDateTime &start, const TQDateTime &end );
+ Period( const TQDateTime &start, const Duration &duration );
/** Returns true if this element is smaller than the @param other one */
bool operator<( const Period& other );
- QDateTime start() const;
- QDateTime end() const;
+ TQDateTime start() const;
+ TQDateTime end() const;
Duration duration();
bool hasDuration()const;
- QString summary() const;
- void setSummary( const QString &summary );
- QString location() const;
- void setLocation( const QString &location );
+ TQString summary() const;
+ void setSummary( const TQString &summary );
+ TQString location() const;
+ void setLocation( const TQString &location );
private:
- QDateTime mStart;
- QDateTime mEnd;
+ TQDateTime mStart;
+ TQDateTime mEnd;
bool mHasDuration;
- QString mSummary;
- QString mLocation;
+ TQString mSummary;
+ TQString mLocation;
class Private;
Private *d;
diff --git a/libkcal/person.cpp b/libkcal/person.cpp
index 687ec6dbf..aad80f68f 100644
--- a/libkcal/person.cpp
+++ b/libkcal/person.cpp
@@ -27,19 +27,19 @@
#include <libemailfunctions/email.h>
-#include <qregexp.h>
+#include <tqregexp.h>
using namespace KCal;
-Person::Person( const QString &fullName )
+Person::Person( const TQString &fullName )
{
- QString name, email;
+ TQString name, email;
KPIM::getNameAndMail( fullName, name, email );
setName( name );
setEmail( email );
}
-Person::Person( const QString &name, const QString &email )
+Person::Person( const TQString &name, const TQString &email )
{
setName( name );
setEmail( email );
@@ -53,7 +53,7 @@ bool KCal::operator==( const Person& p1, const Person& p2 )
}
-QString Person::fullName() const
+TQString Person::fullName() const
{
if( mName.isEmpty() ) {
return mEmail;
@@ -62,8 +62,8 @@ QString Person::fullName() const
return mName;
else {
// Taken from KABC::Addressee::fullEmail
- QString name = mName;
- QRegExp needQuotes( "[^ 0-9A-Za-z\\x0080-\\xFFFF]" );
+ TQString name = mName;
+ TQRegExp needQuotes( "[^ 0-9A-Za-z\\x0080-\\xFFFF]" );
bool weNeedToQuote = name.find( needQuotes ) != -1;
if ( weNeedToQuote ) {
if ( name[0] != '"' )
@@ -81,12 +81,12 @@ bool Person::isEmpty() const
return mEmail.isEmpty() && mName.isEmpty();
}
-void Person::setName(const QString &name)
+void Person::setName(const TQString &name)
{
mName = name;
}
-void Person::setEmail(const QString &email)
+void Person::setEmail(const TQString &email)
{
if ( email.startsWith( "mailto:", false ) ) {
mEmail = email.mid(7);
diff --git a/libkcal/person.h b/libkcal/person.h
index 55b167070..e044f7308 100644
--- a/libkcal/person.h
+++ b/libkcal/person.h
@@ -22,7 +22,7 @@
#ifndef KCAL_PERSON_H
#define KCAL_PERSON_H
-#include <qstring.h>
+#include <tqstring.h>
#include "libkcal_export.h"
@@ -35,21 +35,21 @@ class LIBKCAL_EXPORT Person
{
public:
Person() {}
- Person( const QString &fullName );
- Person( const QString &name, const QString &email );
+ Person( const TQString &fullName );
+ Person( const TQString &name, const TQString &email );
bool isEmpty() const;
- QString fullName( ) const;
+ TQString fullName( ) const;
- void setName(const QString &);
- QString name() const { return mName; }
+ void setName(const TQString &);
+ TQString name() const { return mName; }
- void setEmail(const QString &);
- QString email() const { return mEmail; }
+ void setEmail(const TQString &);
+ TQString email() const { return mEmail; }
private:
- QString mName;
- QString mEmail;
+ TQString mName;
+ TQString mEmail;
class Private;
Private *d;
diff --git a/libkcal/qtopiaformat.cpp b/libkcal/qtopiaformat.cpp
index b7a7b3922..372c52308 100644
--- a/libkcal/qtopiaformat.cpp
+++ b/libkcal/qtopiaformat.cpp
@@ -19,14 +19,14 @@
Boston, MA 02110-1301, USA.
*/
-#include <qdatetime.h>
-#include <qstring.h>
-#include <qptrlist.h>
-#include <qregexp.h>
-#include <qclipboard.h>
-#include <qfile.h>
-#include <qtextstream.h>
-#include <qxml.h>
+#include <tqdatetime.h>
+#include <tqstring.h>
+#include <tqptrlist.h>
+#include <tqregexp.h>
+#include <tqclipboard.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
+#include <tqxml.h>
#include <kdebug.h>
#include <klocale.h>
@@ -43,12 +43,12 @@ class QtopiaParser : public QXmlDefaultHandler
public:
QtopiaParser( Calendar *calendar ) : mCalendar( calendar ) {}
- bool startElement( const QString &, const QString &, const QString & qName,
- const QXmlAttributes &attributes )
+ bool startElement( const TQString &, const TQString &, const TQString & qName,
+ const TQXmlAttributes &attributes )
{
if ( qName == "event" ) {
Event *event = new Event;
- QString uid = "Qtopia" + attributes.value( "uid" );
+ TQString uid = "Qtopia" + attributes.value( "uid" );
event->setUid( uid );
event->setSummary( attributes.value( "description" ) );
@@ -63,28 +63,28 @@ class QtopiaParser : public QXmlDefaultHandler
event->setFloats( false );
}
- QString rtype = attributes.value( "rtype" );
+ TQString rtype = attributes.value( "rtype" );
if ( !rtype.isEmpty() ) {
- QDate startDate = event->dtStart().date();
+ TQDate startDate = event->dtStart().date();
- QString freqStr = attributes.value( "rfreq" );
+ TQString freqStr = attributes.value( "rfreq" );
int freq = freqStr.toInt();
- QString hasEndDateStr = attributes.value( "rhasenddate" );
+ TQString hasEndDateStr = attributes.value( "rhasenddate" );
bool hasEndDate = hasEndDateStr == "1";
- QString endDateStr = attributes.value( "enddt" );
- QDate endDate = toDateTime( endDateStr ).date();
+ TQString endDateStr = attributes.value( "enddt" );
+ TQDate endDate = toDateTime( endDateStr ).date();
- QString weekDaysStr = attributes.value( "rweekdays" );
+ TQString weekDaysStr = attributes.value( "rweekdays" );
int weekDaysNum = weekDaysStr.toInt();
- QBitArray weekDays( 7 );
+ TQBitArray weekDays( 7 );
int i;
for( i = 1; i <= 7; ++i ) {
weekDays.setBit( i - 1, ( 2 << i ) & weekDaysNum );
}
- QString posStr = attributes.value( "rposition" );
+ TQString posStr = attributes.value( "rposition" );
int pos = posStr.toInt();
Recurrence *r = event->recurrence();
@@ -104,7 +104,7 @@ class QtopiaParser : public QXmlDefaultHandler
r->setMonthly( freq );
if ( hasEndDate )
r->setEndDate( endDate );
- QBitArray days( 7 );
+ TQBitArray days( 7 );
days.fill( false );
days.setBit( startDate.dayOfWeek() - 1 );
r->addMonthlyPos( pos, days );
@@ -115,10 +115,10 @@ class QtopiaParser : public QXmlDefaultHandler
}
}
- QString categoryList = attributes.value( "categories" );
+ TQString categoryList = attributes.value( "categories" );
event->setCategories( lookupCategories( categoryList ) );
- QString alarmStr = attributes.value( "alarm" );
+ TQString alarmStr = attributes.value( "alarm" );
if ( !alarmStr.isEmpty() ) {
kdDebug(5800) << "Alarm: " << alarmStr << endl;
Alarm *alarm = new Alarm( event );
@@ -136,13 +136,13 @@ class QtopiaParser : public QXmlDefaultHandler
} else if ( qName == "Task" ) {
Todo *todo = new Todo;
- QString uid = "Qtopia" + attributes.value( "Uid" );
+ TQString uid = "Qtopia" + attributes.value( "Uid" );
todo->setUid( uid );
- QString description = attributes.value( "Description" );
+ TQString description = attributes.value( "Description" );
int pos = description.find( '\n' );
if ( pos > 0 ) {
- QString summary = description.left( pos );
+ TQString summary = description.left( pos );
todo->setSummary( summary );
todo->setDescription( description );
} else {
@@ -153,19 +153,19 @@ class QtopiaParser : public QXmlDefaultHandler
// if ( priority == 0 ) priority = 3;
todo->setPriority( priority );
- QString categoryList = attributes.value( "Categories" );
+ TQString categoryList = attributes.value( "Categories" );
todo->setCategories( lookupCategories( categoryList ) );
- QString completedStr = attributes.value( "Completed" );
+ TQString completedStr = attributes.value( "Completed" );
if ( completedStr == "1" ) todo->setCompleted( true );
- QString hasDateStr = attributes.value( "HasDate" );
+ TQString hasDateStr = attributes.value( "HasDate" );
if ( hasDateStr == "1" ) {
int year = attributes.value( "DateYear" ).toInt();
int month = attributes.value( "DateMonth" ).toInt();
int day = attributes.value( "DateDay" ).toInt();
- todo->setDtDue( QDateTime( QDate( year, month, day ) ) );
+ todo->setDtDue( TQDateTime( TQDate( year, month, day ) ) );
todo->setHasDueDate( true );
}
@@ -174,42 +174,42 @@ class QtopiaParser : public QXmlDefaultHandler
mCalendar->addTodo( todo );
} else if ( qName == "Category" ) {
- QString id = attributes.value( "id" );
- QString name = attributes.value( "name" );
+ TQString id = attributes.value( "id" );
+ TQString name = attributes.value( "name" );
setCategory( id, name );
}
return true;
}
- bool warning ( const QXmlParseException &exception )
+ bool warning ( const TQXmlParseException &exception )
{
kdDebug(5800) << "WARNING" << endl;
printException( exception );
return true;
}
- bool error ( const QXmlParseException &exception )
+ bool error ( const TQXmlParseException &exception )
{
kdDebug(5800) << "ERROR" << endl;
printException( exception );
return false;
}
- bool fatalError ( const QXmlParseException &exception )
+ bool fatalError ( const TQXmlParseException &exception )
{
kdDebug(5800) << "FATALERROR" << endl;
printException( exception );
return false;
}
- QString errorString ()
+ TQString errorString ()
{
return "QtopiaParser: Error!";
}
protected:
- void printException( const QXmlParseException &exception )
+ void printException( const TQXmlParseException &exception )
{
kdError() << "XML Parse Error (line " << exception.lineNumber()
<< ", col " << exception.columnNumber() << "): "
@@ -218,19 +218,19 @@ class QtopiaParser : public QXmlDefaultHandler
<< exception.systemId() << "')" << endl;
}
- QDateTime toDateTime( const QString &value )
+ TQDateTime toDateTime( const TQString &value )
{
- QDateTime dt;
+ TQDateTime dt;
dt.setTime_t( value.toUInt() );
return dt;
}
- QStringList lookupCategories( const QString &categoryList )
+ TQStringList lookupCategories( const TQString &categoryList )
{
- QStringList categoryIds = QStringList::split( ";", categoryList );
- QStringList categories;
- QStringList::ConstIterator it;
+ TQStringList categoryIds = TQStringList::split( ";", categoryList );
+ TQStringList categories;
+ TQStringList::ConstIterator it;
for( it = categoryIds.begin(); it != categoryIds.end(); ++it ) {
categories.append( category( *it ) );
}
@@ -240,22 +240,22 @@ class QtopiaParser : public QXmlDefaultHandler
private:
Calendar *mCalendar;
- static QString category( const QString &id )
+ static TQString category( const TQString &id )
{
- QMap<QString,QString>::ConstIterator it = mCategoriesMap.find( id );
+ TQMap<TQString,TQString>::ConstIterator it = mCategoriesMap.find( id );
if ( it == mCategoriesMap.end() ) return id;
else return *it;
}
- static void setCategory( const QString &id, const QString &name )
+ static void setCategory( const TQString &id, const TQString &name )
{
mCategoriesMap.insert( id, name );
}
- static QMap<QString,QString> mCategoriesMap;
+ static TQMap<TQString,TQString> mCategoriesMap;
};
-QMap<QString,QString> QtopiaParser::mCategoriesMap;
+TQMap<TQString,TQString> QtopiaParser::mCategoriesMap;
QtopiaFormat::QtopiaFormat()
{
@@ -265,52 +265,52 @@ QtopiaFormat::~QtopiaFormat()
{
}
-bool QtopiaFormat::load( Calendar *calendar, const QString &fileName)
+bool QtopiaFormat::load( Calendar *calendar, const TQString &fileName)
{
kdDebug(5800) << "QtopiaFormat::load() " << fileName << endl;
clearException();
QtopiaParser handler( calendar );
- QFile xmlFile( fileName );
- QXmlInputSource source( xmlFile );
- QXmlSimpleReader reader;
+ TQFile xmlFile( fileName );
+ TQXmlInputSource source( xmlFile );
+ TQXmlSimpleReader reader;
reader.setContentHandler( &handler );
return reader.parse( source );
}
-bool QtopiaFormat::save( Calendar *calendar, const QString &fileName )
+bool QtopiaFormat::save( Calendar *calendar, const TQString &fileName )
{
kdDebug(5800) << "QtopiaFormat::save(): " << fileName << endl;
clearException();
- QString text = toString( calendar );
+ TQString text = toString( calendar );
if ( text.isNull() ) return false;
// TODO: write backup file
- QFile file( fileName );
+ TQFile file( fileName );
if (!file.open( IO_WriteOnly ) ) {
setException(new ErrorFormat(ErrorFormat::SaveError,
i18n("Could not open file '%1'").arg(fileName)));
return false;
}
- QTextStream ts( &file );
+ TQTextStream ts( &file );
ts << text;
file.close();
return true;
}
-bool QtopiaFormat::fromString( Calendar *, const QString & )
+bool QtopiaFormat::fromString( Calendar *, const TQString & )
{
kdDebug(5800) << "QtopiaFormat::fromString() not yet implemented." << endl;
return false;
}
-QString QtopiaFormat::toString( Calendar * )
+TQString QtopiaFormat::toString( Calendar * )
{
- return QString::null;
+ return TQString::null;
}
diff --git a/libkcal/qtopiaformat.h b/libkcal/qtopiaformat.h
index ed054d00b..a2950f19d 100644
--- a/libkcal/qtopiaformat.h
+++ b/libkcal/qtopiaformat.h
@@ -21,7 +21,7 @@
#ifndef KCAL_QTOPIAFORMAT_H
#define KCAL_QTOPIAFORMAT_H
-#include <qstring.h>
+#include <tqstring.h>
#include "scheduler.h"
@@ -39,11 +39,11 @@ class LIBKCAL_EXPORT QtopiaFormat : public CalFormat
QtopiaFormat();
virtual ~QtopiaFormat();
- bool load( Calendar *, const QString &fileName );
- bool save( Calendar *, const QString &fileName );
+ bool load( Calendar *, const TQString &fileName );
+ bool save( Calendar *, const TQString &fileName );
- bool fromString( Calendar *, const QString & );
- QString toString( Calendar * );
+ bool fromString( Calendar *, const TQString & );
+ TQString toString( Calendar * );
private:
class Private;
diff --git a/libkcal/recurrence.cpp b/libkcal/recurrence.cpp
index 5d1505df2..c2d7897a0 100644
--- a/libkcal/recurrence.cpp
+++ b/libkcal/recurrence.cpp
@@ -27,7 +27,7 @@
#include <kdebug.h>
#include <kglobal.h>
#include <klocale.h>
-#include <qbitarray.h>
+#include <tqbitarray.h>
#include "recurrence.h"
#include "recurrencerule.h"
@@ -124,10 +124,10 @@ void Recurrence::removeObserver( Observer *observer )
}
-QDateTime Recurrence::startDateTime() const
+TQDateTime Recurrence::startDateTime() const
{
if ( mFloating )
- return QDateTime( mStartDateTime.date(), QTime( 0, 0, 0 ) );
+ return TQDateTime( mStartDateTime.date(), TQTime( 0, 0, 0 ) );
else return mStartDateTime;
}
@@ -176,7 +176,7 @@ void Recurrence::updated()
{
// recurrenceType() re-calculates the type if it's rMax
mCachedType = rMax;
- for ( QValueList<Observer*>::ConstIterator it = mObservers.begin();
+ for ( TQValueList<Observer*>::ConstIterator it = mObservers.begin();
it != mObservers.end(); ++it ) {
if ( (*it) ) (*it)->recurrenceUpdated( this );
}
@@ -266,7 +266,7 @@ ushort Recurrence::recurrenceType( const RecurrenceRule *rrule )
return rOther;
}
-bool Recurrence::recursOn(const QDate &qd) const
+bool Recurrence::recursOn(const TQDate &qd) const
{
TimeList tms;
// First handle dates. Exrules override
@@ -327,7 +327,7 @@ bool Recurrence::recursOn(const QDate &qd) const
}
}
-bool Recurrence::recursAt( const QDateTime &dt ) const
+bool Recurrence::recursAt( const TQDateTime &dt ) const
{
// if it's excluded anyway, don't bother to check if it recurs at all.
if ( mExDateTimes.contains( dt )) return false;
@@ -350,42 +350,42 @@ bool Recurrence::recursAt( const QDateTime &dt ) const
/** Calculates the cumulative end of the whole recurrence (rdates and rrules).
If any rrule is infinite, or the recurrence doesn't have any rrules or
rdates, an invalid date is returned. */
-QDateTime Recurrence::endDateTime() const
+TQDateTime Recurrence::endDateTime() const
{
DateTimeList dts;
dts << startDateTime();
- if ( !mRDates.isEmpty() ) dts << QDateTime( mRDates.last(), QTime( 0, 0, 0 ) );
+ if ( !mRDates.isEmpty() ) dts << TQDateTime( mRDates.last(), TQTime( 0, 0, 0 ) );
if ( !mRDateTimes.isEmpty() ) dts << mRDateTimes.last();
for ( RecurrenceRule::List::ConstIterator rr = mRRules.begin(); rr != mRRules.end(); ++rr ) {
- QDateTime rl( (*rr)->endDt() );
+ TQDateTime rl( (*rr)->endDt() );
// if any of the rules is infinite, the whole recurrence is
- if ( !rl.isValid() ) return QDateTime();
+ if ( !rl.isValid() ) return TQDateTime();
dts << rl;
}
qSortUnique( dts );
- if ( dts.isEmpty() ) return QDateTime();
+ if ( dts.isEmpty() ) return TQDateTime();
else return dts.last();
}
/** Calculates the cumulative end of the whole recurrence (rdates and rrules).
If any rrule is infinite, or the recurrence doesn't have any rrules or
rdates, an invalid date is returned. */
-QDate Recurrence::endDate() const
+TQDate Recurrence::endDate() const
{
- QDateTime end( endDateTime() );
+ TQDateTime end( endDateTime() );
if ( end.isValid() ) { return end.date(); }
- else return QDate();
+ else return TQDate();
}
-void Recurrence::setEndDate( const QDate &date )
+void Recurrence::setEndDate( const TQDate &date )
{
if ( doesFloat() )
- setEndDateTime( QDateTime( date, QTime( 23, 59, 59 ) ) );
+ setEndDateTime( TQDateTime( date, TQTime( 23, 59, 59 ) ) );
else
- setEndDateTime( QDateTime( date, mStartDateTime.time() ) );
+ setEndDateTime( TQDateTime( date, mStartDateTime.time() ) );
}
-void Recurrence::setEndDateTime( const QDateTime &dateTime )
+void Recurrence::setEndDateTime( const TQDateTime &dateTime )
{
if ( mRecurReadOnly ) return;
RecurrenceRule *rrule = defaultRRule( true );
@@ -401,12 +401,12 @@ int Recurrence::duration() const
else return 0;
}
-// int Recurrence::durationTo( const QDate &/*date*/ ) const
+// int Recurrence::durationTo( const TQDate &/*date*/ ) const
// {
// return 0;
// }
-int Recurrence::durationTo( const QDateTime &datetime ) const
+int Recurrence::durationTo( const TQDateTime &datetime ) const
{
// Emulate old behavior: This is just an interface to the first rule!
RecurrenceRule *rrule = defaultRRuleConst();
@@ -443,7 +443,7 @@ void Recurrence::clear()
updated();
}
-void Recurrence::setStartDateTime( const QDateTime &start )
+void Recurrence::setStartDateTime( const TQDateTime &start )
{
if ( mRecurReadOnly ) return;
mStartDateTime = start;
@@ -458,9 +458,9 @@ void Recurrence::setStartDateTime( const QDateTime &start )
updated();
}
-void Recurrence::setStartDate( const QDate &start )
+void Recurrence::setStartDate( const TQDate &start )
{
- setStartDateTime( QDateTime( start, QTime(0,0,0) ) );
+ setStartDateTime( TQDateTime( start, TQTime(0,0,0) ) );
setFloats( true );
}
@@ -493,14 +493,14 @@ int Recurrence::weekStart() const
}
// Emulate the old behavior
-QBitArray Recurrence::days() const
+TQBitArray Recurrence::days() const
{
- QBitArray days( 7 );
+ TQBitArray days( 7 );
days.fill( 0 );
RecurrenceRule *rrule = defaultRRuleConst();
if ( rrule ) {
- QValueList<RecurrenceRule::WDayPos> bydays = rrule->byDays();
- for ( QValueListConstIterator<RecurrenceRule::WDayPos> it = bydays.begin();
+ TQValueList<RecurrenceRule::WDayPos> bydays = rrule->byDays();
+ for ( TQValueListConstIterator<RecurrenceRule::WDayPos> it = bydays.begin();
it != bydays.end(); ++it ) {
if ( (*it).pos() == 0 ) {
days.setBit( (*it).day() - 1 );
@@ -514,44 +514,44 @@ QBitArray Recurrence::days() const
// MONTHLY
// Emulate the old behavior
-QValueList<int> Recurrence::monthDays() const
+TQValueList<int> Recurrence::monthDays() const
{
RecurrenceRule *rrule = defaultRRuleConst();
if ( rrule ) return rrule->byMonthDays();
- else return QValueList<int>();
+ else return TQValueList<int>();
}
// Emulate the old behavior
-QValueList<RecurrenceRule::WDayPos> Recurrence::monthPositions() const
+TQValueList<RecurrenceRule::WDayPos> Recurrence::monthPositions() const
{
RecurrenceRule *rrule = defaultRRuleConst();
if ( rrule ) return rrule->byDays();
- else return QValueList<RecurrenceRule::WDayPos>();
+ else return TQValueList<RecurrenceRule::WDayPos>();
}
// YEARLY
-QValueList<int> Recurrence::yearDays() const
+TQValueList<int> Recurrence::yearDays() const
{
RecurrenceRule *rrule = defaultRRuleConst();
if ( rrule ) return rrule->byYearDays();
- else return QValueList<int>();
+ else return TQValueList<int>();
}
-QValueList<int> Recurrence::yearDates() const
+TQValueList<int> Recurrence::yearDates() const
{
return monthDays();
}
-QValueList<int> Recurrence::yearMonths() const
+TQValueList<int> Recurrence::yearMonths() const
{
RecurrenceRule *rrule = defaultRRuleConst();
if ( rrule ) return rrule->byMonths();
- else return QValueList<int>();
+ else return TQValueList<int>();
}
-QValueList<RecurrenceRule::WDayPos> Recurrence::yearPositions() const
+TQValueList<RecurrenceRule::WDayPos> Recurrence::yearPositions() const
{
return monthPositions();
}
@@ -597,13 +597,13 @@ void Recurrence::setWeekly( int freq, int weekStart )
updated();
}
-void Recurrence::setWeekly( int freq, const QBitArray &days, int weekStart )
+void Recurrence::setWeekly( int freq, const TQBitArray &days, int weekStart )
{
setWeekly( freq, weekStart );
addMonthlyPos( 0, days );
}
-void Recurrence::addWeeklyDays( const QBitArray &days )
+void Recurrence::addWeeklyDays( const TQBitArray &days )
{
addMonthlyPos( 0, days );
}
@@ -614,14 +614,14 @@ void Recurrence::setMonthly( int freq )
updated();
}
-void Recurrence::addMonthlyPos( short pos, const QBitArray &days )
+void Recurrence::addMonthlyPos( short pos, const TQBitArray &days )
{
// Allow 53 for yearly!
if ( mRecurReadOnly || pos > 53 || pos < -53 ) return;
RecurrenceRule *rrule = defaultRRule( false );
if ( !rrule ) return;
bool changed = false;
- QValueList<RecurrenceRule::WDayPos> positions = rrule->byDays();
+ TQValueList<RecurrenceRule::WDayPos> positions = rrule->byDays();
for ( int i = 0; i < 7; ++i ) {
if ( days.testBit(i) ) {
@@ -645,7 +645,7 @@ void Recurrence::addMonthlyPos( short pos, ushort day )
if ( mRecurReadOnly || pos > 53 || pos < -53 ) return;
RecurrenceRule *rrule = defaultRRule( false );
if ( !rrule ) return;
- QValueList<RecurrenceRule::WDayPos> positions = rrule->byDays();
+ TQValueList<RecurrenceRule::WDayPos> positions = rrule->byDays();
RecurrenceRule::WDayPos p( pos, day );
if ( !positions.contains( p ) ) {
@@ -662,7 +662,7 @@ void Recurrence::addMonthlyDate( short day )
RecurrenceRule *rrule = defaultRRule( true );
if ( !rrule ) return;
- QValueList<int> monthDays = rrule->byMonthDays();
+ TQValueList<int> monthDays = rrule->byMonthDays();
if ( !monthDays.contains( day ) ) {
monthDays.append( day );
rrule->setByMonthDays( monthDays );
@@ -683,7 +683,7 @@ void Recurrence::addYearlyDay( int day )
RecurrenceRule *rrule = defaultRRule( false ); // It must already exist!
if ( !rrule ) return;
- QValueList<int> days = rrule->byYearDays();
+ TQValueList<int> days = rrule->byYearDays();
if ( !days.contains( day ) ) {
days << day;
rrule->setByYearDays( days );
@@ -698,7 +698,7 @@ void Recurrence::addYearlyDate( int day )
}
// day part of date within year, given as position (n-th weekday)
-void Recurrence::addYearlyPos( short pos, const QBitArray &days )
+void Recurrence::addYearlyPos( short pos, const TQBitArray &days )
{
addMonthlyPos( pos, days );
}
@@ -711,7 +711,7 @@ void Recurrence::addYearlyMonth( short month )
RecurrenceRule *rrule = defaultRRule( false );
if ( !rrule ) return;
- QValueList<int> months = rrule->byMonths();
+ TQValueList<int> months = rrule->byMonths();
if ( !months.contains(month) ) {
months << month;
rrule->setByMonths( months );
@@ -720,7 +720,7 @@ void Recurrence::addYearlyMonth( short month )
}
-TimeList Recurrence::recurTimesOn( const QDate &date ) const
+TimeList Recurrence::recurTimesOn( const TQDate &date ) const
{
TimeList times;
// The whole day is excepted
@@ -771,10 +771,10 @@ TimeList Recurrence::recurTimesOn( const QDate &date ) const
}
-QDateTime Recurrence::getNextDateTime( const QDateTime &preDateTime ) const
+TQDateTime Recurrence::getNextDateTime( const TQDateTime &preDateTime ) const
{
//kdDebug(5800) << " Recurrence::getNextDateTime after " << preDateTime << endl;
- QDateTime nextDT = preDateTime;
+ TQDateTime nextDT = preDateTime;
// prevent infinite loops, e.g. when an exrule extinguishes an rrule (e.g.
// the exrule is identical to the rrule). If an occurrence is found, break
// out of the loop by returning that QDateTime
@@ -787,7 +787,7 @@ QDateTime Recurrence::getNextDateTime( const QDateTime &preDateTime ) const
// 1.0) Add the start date if it's after preDateTime
// 1.1) Use the next occurrence from the explicit RDATE lists
// 1.2) Add the next recurrence for each of the RRULEs
- // 2) Take the earliest recurrence of these = QDateTime nextDT
+ // 2) Take the earliest recurrence of these = TQDateTime nextDT
// 3) If that date/time is not excluded, either explicitly by an EXDATE or
// by an EXRULE, return nextDT as the next date/time of the recurrence
// 4) If it's excluded, start all at 1), but starting at nextDT (instead
@@ -804,12 +804,12 @@ QDateTime Recurrence::getNextDateTime( const QDateTime &preDateTime ) const
/*kdDebug(5800) << " nextDT: " << nextDT << ", startDT: " << startDateTime() << endl;
kdDebug(5800) << " getNextDateTime: found " << dates.count() << " RDATES and DTSTART in loop " << loop << endl;*/
DateList::ConstIterator dit = mRDates.begin();
- while ( dit != mRDates.end() && QDateTime( (*dit), startDateTime().time() ) <= nextDT ) ++dit;
- if ( dit != mRDates.end() ) dates << QDateTime( (*dit), startDateTime().time() );
+ while ( dit != mRDates.end() && TQDateTime( (*dit), startDateTime().time() ) <= nextDT ) ++dit;
+ if ( dit != mRDates.end() ) dates << TQDateTime( (*dit), startDateTime().time() );
// Add the next occurrences from all RRULEs.
for ( RecurrenceRule::List::ConstIterator rr = mRRules.begin(); rr != mRRules.end(); ++rr ) {
- QDateTime dt = (*rr)->getNextDate( nextDT );
+ TQDateTime dt = (*rr)->getNextDate( nextDT );
if ( dt.isValid() ) dates << dt;
}
@@ -817,7 +817,7 @@ kdDebug(5800) << " getNextDateTime: found " << dates.count() << " RDATES and D
qSortUnique( dates );
// kdDebug(5800) << " getNextDateTime: found " << dates.count() << " dates in loop " << loop << endl;
- if ( dates.isEmpty() ) return QDateTime();
+ if ( dates.isEmpty() ) return TQDateTime();
nextDT = dates.first();
// Check if that date/time is excluded explicitly or by an exrule:
@@ -833,12 +833,12 @@ kdDebug(5800) << " getNextDateTime: found " << dates.count() << " RDATES and D
}
// Couldn't find a valid occurrences in 1000 loops, something is wrong!
- return QDateTime();
+ return TQDateTime();
}
-QDateTime Recurrence::getPreviousDateTime( const QDateTime &afterDateTime ) const
+TQDateTime Recurrence::getPreviousDateTime( const TQDateTime &afterDateTime ) const
{
- QDateTime prevDT = afterDateTime;
+ TQDateTime prevDT = afterDateTime;
// prevent infinite loops, e.g. when an exrule extinguishes an rrule (e.g.
// the exrule is identical to the rrule). If an occurrence is found, break
// out of the loop by returning that QDateTime
@@ -848,7 +848,7 @@ QDateTime Recurrence::getPreviousDateTime( const QDateTime &afterDateTime ) cons
// 1) Find the next date/time after preDateTime when the event could recur
// 1.1) Use the next occurrence from the explicit RDATE lists
// 1.2) Add the next recurrence for each of the RRULEs
- // 2) Take the earliest recurrence of these = QDateTime nextDT
+ // 2) Take the earliest recurrence of these = TQDateTime nextDT
// 3) If that date/time is not excluded, either explicitly by an EXDATE or
// by an EXRULE, return nextDT as the next date/time of the recurrence
// 4) If it's excluded, start all at 1), but starting at nextDT (instead
@@ -870,21 +870,21 @@ QDateTime Recurrence::getPreviousDateTime( const QDateTime &afterDateTime ) cons
if ( dit != mRDates.begin() ) {
do {
--dit;
- } while ( dit != mRDates.begin() && QDateTime((*dit), startDateTime().time()) >= prevDT );
- if ( QDateTime((*dit), startDateTime().time()) < prevDT )
- dates << QDateTime( (*dit), startDateTime().time() );
+ } while ( dit != mRDates.begin() && TQDateTime((*dit), startDateTime().time()) >= prevDT );
+ if ( TQDateTime((*dit), startDateTime().time()) < prevDT )
+ dates << TQDateTime( (*dit), startDateTime().time() );
}
// Add the previous occurrences from all RRULEs.
for ( RecurrenceRule::List::ConstIterator rr = mRRules.begin(); rr != mRRules.end(); ++rr ) {
- QDateTime dt = (*rr)->getPreviousDate( prevDT );
+ TQDateTime dt = (*rr)->getPreviousDate( prevDT );
if ( dt.isValid() ) dates << dt;
}
//kdDebug(5800) << " getPreviousDateTime: found " << dates.count() << " dates in loop " << loop << endl;
// Take the last of these (all others can't be used later on)
qSortUnique( dates );
- if ( dates.isEmpty() ) return QDateTime();
+ if ( dates.isEmpty() ) return TQDateTime();
prevDT = dates.last();
// Check if that date/time is excluded explicitly or by an exrule:
@@ -898,7 +898,7 @@ QDateTime Recurrence::getPreviousDateTime( const QDateTime &afterDateTime ) cons
}
// Couldn't find a valid occurrences in 1000 loops, something is wrong!
- return QDateTime();
+ return TQDateTime();
}
@@ -963,7 +963,7 @@ void Recurrence::setRDateTimes( const DateTimeList &rdates )
updated();
}
-void Recurrence::addRDateTime( const QDateTime &rdate )
+void Recurrence::addRDateTime( const TQDateTime &rdate )
{
if ( mRecurReadOnly ) return;
mRDateTimes.append( rdate );
@@ -985,7 +985,7 @@ void Recurrence::setRDates( const DateList &rdates )
updated();
}
-void Recurrence::addRDate( const QDate &rdate )
+void Recurrence::addRDate( const TQDate &rdate )
{
if ( mRecurReadOnly ) return;
mRDates.append( rdate );
@@ -1006,7 +1006,7 @@ void Recurrence::setExDateTimes( const DateTimeList &exdates )
qSortUnique( mExDateTimes );
}
-void Recurrence::addExDateTime( const QDateTime &exdate )
+void Recurrence::addExDateTime( const TQDateTime &exdate )
{
if ( mRecurReadOnly ) return;
mExDateTimes.append( exdate );
@@ -1028,7 +1028,7 @@ void Recurrence::setExDates( const DateList &exdates )
updated();
}
-void Recurrence::addExDate( const QDate &exdate )
+void Recurrence::addExDate( const TQDate &exdate )
{
if ( mRecurReadOnly ) return;
mExDates.append( exdate );
diff --git a/libkcal/recurrence.h b/libkcal/recurrence.h
index 773a9d635..ec6965977 100644
--- a/libkcal/recurrence.h
+++ b/libkcal/recurrence.h
@@ -24,9 +24,9 @@
#ifndef KCAL_RECURRENCE_H
#define KCAL_RECURRENCE_H
-#include <qstring.h>
-#include <qbitarray.h>
-#include <qptrlist.h>
+#include <tqstring.h>
+#include <tqbitarray.h>
+#include <tqptrlist.h>
#include "libkcal_export.h"
#include "recurrencerule.h"
@@ -111,17 +111,17 @@ class LIBKCAL_EXPORT Recurrence : public RecurrenceRule::Observer
/** Return the start date/time of the recurrence (Time for floating incidences will be 0:00).
@return the current start/time of the recurrence. */
- QDateTime startDateTime() const;
+ TQDateTime startDateTime() const;
/** Return the start date/time of the recurrence */
- QDate startDate() const { return mStartDateTime.date(); }
+ TQDate startDate() const { return mStartDateTime.date(); }
/** Set start of recurrence, as a date and time. Also sets the incidence to non-floating.
@param start the new start date/time of the incidence.
*/
- void setStartDateTime( const QDateTime &start );
+ void setStartDateTime( const TQDateTime &start );
/** Set start of recurrence, as a date. Also sets the incidence to floating.
@param start The new start date of the incidence.
*/
- void setStartDate( const QDate &start );
+ void setStartDate( const TQDate &start );
/** Set whether the recurrence has no time, just a date.
* Floating means -- according to rfc2445 -- that the event has no time
@@ -150,10 +150,10 @@ class LIBKCAL_EXPORT Recurrence : public RecurrenceRule::Observer
static ushort recurrenceType( const RecurrenceRule *rrule );
/** Returns true if the date specified is one on which the event will
* recur. */
- bool recursOn( const QDate &qd ) const;
+ bool recursOn( const TQDate &qd ) const;
/** Returns true if the date/time specified is one at which the event will
* recur. Times are rounded down to the nearest minute to determine the result. */
- bool recursAt( const QDateTime & ) const;
+ bool recursAt( const TQDateTime & ) const;
/** Removes all recurrence rules. Recurrence dates and exceptions are
not removed. */
void unsetRecurs();
@@ -164,21 +164,21 @@ class LIBKCAL_EXPORT Recurrence : public RecurrenceRule::Observer
* recurrence will occur.
* @param date the date for which to find the recurrence times.
*/
- QValueList<QTime> recurTimesOn(const QDate &date) const;
+ TQValueList<TQTime> recurTimesOn(const TQDate &date) const;
/** Returns the date and time of the next recurrence, after the specified date/time.
* If the recurrence has no time, the next date after the specified date is returned.
* @param preDateTime the date/time after which to find the recurrence.
* @return date/time of next recurrence (strictly later than the given QDateTiem), or invalid date if none.
*/
- QDateTime getNextDateTime( const QDateTime& preDateTime ) const;
+ TQDateTime getNextDateTime( const TQDateTime& preDateTime ) const;
/** Returns the date and time of the last previous recurrence, before the specified date/time.
* If a time later than 00:00:00 is specified and the recurrence has no time, 00:00:00 on
* the specified date is returned if that date recurs.
* @param afterDateTime the date/time before which to find the recurrence.
- * @return date/time of previous recurrence (strictly earlier than the given QDateTime), or invalid date if none.
+ * @return date/time of previous recurrence (strictly earlier than the given TQDateTime), or invalid date if none.
*/
- QDateTime getPreviousDateTime( const QDateTime& afterDateTime ) const;
+ TQDateTime getPreviousDateTime( const TQDateTime& afterDateTime ) const;
/** Returns frequency of recurrence, in terms of the recurrence time period type. */
int frequency() const;
@@ -194,25 +194,25 @@ class LIBKCAL_EXPORT Recurrence : public RecurrenceRule::Observer
* first and last. */
void setDuration(int duration);
/** Returns the number of recurrences up to and including the date/time specified. */
- int durationTo(const QDateTime &) const;
+ int durationTo(const TQDateTime &) const;
/** Returns the number of recurrences up to and including the date specified. */
- int durationTo( const QDate &date ) const { return durationTo( QDateTime( date, QTime( 23, 59, 59 ) ) ); }
+ int durationTo( const TQDate &date ) const { return durationTo( TQDateTime( date, TQTime( 23, 59, 59 ) ) ); }
/** Returns the date/time of the last recurrence.
* An invalid date is returned if the recurrence has no end.
*/
- QDateTime endDateTime() const;
+ TQDateTime endDateTime() const;
/** Returns the date of the last recurrence.
* An invalid date is returned if the recurrence has no end.
*/
- QDate endDate() const;
+ TQDate endDate() const;
/** Sets the date of the last recurrence. The end time is set to the recurrence start time.
* @param endDate the ending date after which to stop recurring. If the
* incidence is not floating, the end time will be 23:59.*/
- void setEndDate( const QDate &endDate );
+ void setEndDate( const TQDate &endDate );
/** Sets the date and time of the last recurrence.
* @param endDateTime the ending date/time after which to stop recurring. */
- void setEndDateTime( const QDateTime &endDateTime );
+ void setEndDateTime( const TQDateTime &endDateTime );
@@ -282,11 +282,11 @@ class LIBKCAL_EXPORT Recurrence : public RecurrenceRule::Observer
* @param days a 7 bit array indicating which days on which to recur (bit 0 = Monday).
* @param weekStart the first day of the week (Monday=1 .. Sunday=7, default is Monday).
*/
- void setWeekly( int freq, const QBitArray &days, int weekStart = 1 );
+ void setWeekly( int freq, const TQBitArray &days, int weekStart = 1 );
/** Adds days to the weekly day recurrence list.
* @param days a 7 bit array indicating which days on which to recur (bit 0 = Monday).
*/
- void addWeeklyDays( const QBitArray &days );
+ void addWeeklyDays( const TQBitArray &days );
/** Returns the first day of the week. Uses only the
* first RRULE if present (i.e. a second RRULE as well as all EXRULES are
* ignored!
@@ -294,7 +294,7 @@ class LIBKCAL_EXPORT Recurrence : public RecurrenceRule::Observer
*/
int weekStart() const;
/** Returns week day mask (bit 0 = Monday). */
- QBitArray days() const; // Emulate the old behavior
+ TQBitArray days() const; // Emulate the old behavior
/** Sets an event to recur monthly. By default infinite recurrence is used.
The date of the monthly recurrence will be taken from the start date
@@ -318,7 +318,7 @@ class LIBKCAL_EXPORT Recurrence : public RecurrenceRule::Observer
* Example: pos = 2, and bits 0 and 2 are set in days:
* the rule is to repeat every 2nd Monday and Wednesday in the month.
*/
- void addMonthlyPos( short pos, const QBitArray &days );
+ void addMonthlyPos( short pos, const TQBitArray &days );
void addMonthlyPos( short pos, ushort day );
/** Adds a date (e.g. the 15th of each month) to the monthly day
* recurrence list.
@@ -326,10 +326,10 @@ class LIBKCAL_EXPORT Recurrence : public RecurrenceRule::Observer
*/
void addMonthlyDate( short day );
/** Returns list of day positions in months. */
- QValueList<RecurrenceRule::WDayPos> monthPositions() const;
+ TQValueList<RecurrenceRule::WDayPos> monthPositions() const;
/** Returns list of day numbers of a month. */
// Emulate old behavior
- QValueList<int> monthDays() const;
+ TQValueList<int> monthDays() const;
/** Sets an event to recur yearly. By default, this will recur every year
* on the same date (e.g. every year on April 15 if the start date was
@@ -392,14 +392,14 @@ class LIBKCAL_EXPORT Recurrence : public RecurrenceRule::Observer
* If no months are specified, the fule is to repeat every year on the
* 2nd Monday and Wednesday of the year.
*/
- void addYearlyPos( short pos, const QBitArray &days );
+ void addYearlyPos( short pos, const TQBitArray &days );
/** Returns the day numbers within a yearly recurrence.
* @return the days of the year for the event. E.g. if the list contains
* 60, this means the recurrence happens on day 60 of the year, i.e.
* on Feb 29 in leap years and March 1 in non-leap years.
*/
- QValueList<int> yearDays() const;
+ TQValueList<int> yearDays() const;
/** Returns the dates within a yearly recurrence.
* @return the days of the month for the event. E.g. if the list contains
* 13, this means the recurrence happens on the 13th of the month.
@@ -407,7 +407,7 @@ class LIBKCAL_EXPORT Recurrence : public RecurrenceRule::Observer
* yearlyMonths(). If this list is empty, the month of the start
* date is used.
*/
- QValueList<int> yearDates() const;
+ TQValueList<int> yearDates() const;
/** Returns the months within a yearly recurrence.
* @return the months for the event. E.g. if the list contains
* 11, this means the recurrence happens in November.
@@ -416,7 +416,7 @@ class LIBKCAL_EXPORT Recurrence : public RecurrenceRule::Observer
* through yearlyPositions() if they are given as positions within the
* month. If none is specified, the date of the start date is used.
*/
- QValueList<int> yearMonths() const;
+ TQValueList<int> yearMonths() const;
/** Returns the positions within a yearly recurrence.
* @return the positions for the event, either within a month (if months
* are set through addYearlyMonth()) or within the year.
@@ -426,10 +426,10 @@ class LIBKCAL_EXPORT Recurrence : public RecurrenceRule::Observer
* year.
*/
/** Returns list of day positions in months, for a recursYearlyPos recurrence rule. */
- QValueList<RecurrenceRule::WDayPos> yearPositions() const;
+ TQValueList<RecurrenceRule::WDayPos> yearPositions() const;
/** Upper date limit for recurrences */
- static const QDate MAX_DATE;
+ static const TQDate MAX_DATE;
/**
Debug output.
@@ -451,16 +451,16 @@ class LIBKCAL_EXPORT Recurrence : public RecurrenceRule::Observer
DateList rDates() const;
void setRDateTimes( const DateTimeList &rdates);
void setRDates( const DateList &rdates);
- void addRDateTime( const QDateTime &rdate );
- void addRDate( const QDate &rdate );
+ void addRDateTime( const TQDateTime &rdate );
+ void addRDate( const TQDate &rdate );
// ExDATE
DateTimeList exDateTimes() const;
DateList exDates() const;
void setExDateTimes( const DateTimeList &exdates);
void setExDates( const DateList &exdates);
- void addExDateTime( const QDateTime &exdate );
- void addExDate( const QDate &exdate );
+ void addExDateTime( const TQDateTime &exdate );
+ void addExDate( const TQDate &exdate );
RecurrenceRule *defaultRRule( bool create = false ) const;
RecurrenceRule *defaultRRuleConst() const;
@@ -490,19 +490,19 @@ class LIBKCAL_EXPORT Recurrence : public RecurrenceRule::Observer
private:
RecurrenceRule::List mExRules;
RecurrenceRule::List mRRules;
- QValueList<QDateTime>mRDateTimes;
- QValueList<QDate> mRDates;
- QValueList<QDateTime> mExDateTimes;
- QValueList<QDate> mExDates;
+ TQValueList<TQDateTime>mRDateTimes;
+ TQValueList<TQDate> mRDates;
+ TQValueList<TQDateTime> mExDateTimes;
+ TQValueList<TQDate> mExDates;
- QDateTime mStartDateTime; // date/time of first recurrence
+ TQDateTime mStartDateTime; // date/time of first recurrence
bool mFloating; // the recurrence has no time, just a date
bool mRecurReadOnly;
// Cache the type of the recurrence with the old system (e.g. MonthlyPos)
mutable ushort mCachedType;
- QValueList<Observer*> mObservers;
+ TQValueList<Observer*> mObservers;
class Private;
Private *d;
diff --git a/libkcal/recurrencerule.cpp b/libkcal/recurrencerule.cpp
index ef6f9ccd9..ce64aadc1 100644
--- a/libkcal/recurrencerule.cpp
+++ b/libkcal/recurrencerule.cpp
@@ -24,8 +24,8 @@
#include <kdebug.h>
#include <kglobal.h>
-#include <qdatetime.h>
-#include <qstringlist.h>
+#include <tqdatetime.h>
+#include <tqstringlist.h>
#include <limits.h>
#include <math.h>
@@ -33,14 +33,14 @@
using namespace KCal;
-// FIXME: If Qt is ever changed so that QDateTime:::addSecs takes into account
+// FIXME: If Qt is ever changed so that TQDateTime:::addSecs takes into account
// DST shifts, we need to use our own addSecs method, too, since we
// need to caalculate things in UTC!
-/** Workaround for broken QDateTime::secsTo (at least in Qt 3.3). While
- QDateTime::secsTo does take time zones into account, QDateTime::addSecs
+/** Workaround for broken TQDateTime::secsTo (at least in Qt 3.3). While
+ TQDateTime::secsTo does take time zones into account, TQDateTime::addSecs
does not, so we have a problem:
- QDateTime d1(QDate(2005, 10, 30), QTime(1, 30, 0) );
- QDateTime d2(QDate(2005, 10, 30), QTime(3, 30, 0) );
+ TQDateTime d1(TQDate(2005, 10, 30), TQTime(1, 30, 0) );
+ TQDateTime d2(TQDate(2005, 10, 30), TQTime(3, 30, 0) );
kdDebug(5800) << "d1=" << d1 << ", d2=" << d2 << endl;
kdDebug(5800) << "d1.secsTo(d2)=" << d1.secsTo(d2) << endl;
@@ -51,11 +51,11 @@ using namespace KCal;
libkcal: d1.addSecs(d1.secsTo(d2))=Son Okt 30 04:30:00 2005
Notice that secsTo counts the hour between 2:00 and 3:00 twice, while
adddSecs doesn't and so has one additional hour. This basically makes it
- impossible to use QDateTime for *any* calculations, in local time zone as
+ impossible to use TQDateTime for *any* calculations, in local time zone as
well as in UTC. Since we don't want to use
time zones anyway, but do all secondsly/minutely/hourly calculations in UTC,
we simply use our own secsTo, which ignores all time zone shifts. */
-long long ownSecsTo( const QDateTime &dt1, const QDateTime &dt2 )
+long long ownSecsTo( const TQDateTime &dt1, const TQDateTime &dt2 )
{
long long res = static_cast<long long>( dt1.date().daysTo( dt2.date() ) ) * 24*3600;
res += dt1.time().secsTo( dt2.time() );
@@ -72,17 +72,17 @@ long long ownSecsTo( const QDateTime &dt1, const QDateTime &dt2 )
class DateHelper {
public:
#ifndef NDEBUG
- static QString dayName( short day );
+ static TQString dayName( short day );
#endif
- static QDate getNthWeek( int year, int weeknumber, short weekstart = 1 );
+ static TQDate getNthWeek( int year, int weeknumber, short weekstart = 1 );
static int weekNumbersInYear( int year, short weekstart = 1 );
- static int getWeekNumber( const QDate &date, short weekstart, int *year = 0 );
- static int getWeekNumberNeg( const QDate &date, short weekstart, int *year = 0 );
+ static int getWeekNumber( const TQDate &date, short weekstart, int *year = 0 );
+ static int getWeekNumberNeg( const TQDate &date, short weekstart, int *year = 0 );
};
#ifndef NDEBUG
-QString DateHelper::dayName( short day )
+TQString DateHelper::dayName( short day )
{
switch ( day ) {
case 1: return "MO"; break;
@@ -98,11 +98,11 @@ QString DateHelper::dayName( short day )
#endif
-QDate DateHelper::getNthWeek( int year, int weeknumber, short weekstart )
+TQDate DateHelper::getNthWeek( int year, int weeknumber, short weekstart )
{
- if ( weeknumber == 0 ) return QDate();
+ if ( weeknumber == 0 ) return TQDate();
// Adjust this to the first day of week #1 of the year and add 7*weekno days.
- QDate dt( year, 1, 4 ); // Week #1 is the week that contains Jan 4
+ TQDate dt( year, 1, 4 ); // Week #1 is the week that contains Jan 4
int adjust = -(7 + dt.dayOfWeek() - weekstart) % 7;
if ( weeknumber > 0 ) {
dt = dt.addDays( 7 * (weeknumber-1) + adjust );
@@ -114,20 +114,20 @@ QDate DateHelper::getNthWeek( int year, int weeknumber, short weekstart )
}
-int DateHelper::getWeekNumber( const QDate &date, short weekstart, int *year )
+int DateHelper::getWeekNumber( const TQDate &date, short weekstart, int *year )
{
// kdDebug(5800) << "Getting week number for " << date << " with weekstart="<<weekstart<<endl;
if ( year ) *year = date.year();
- QDate dt( date.year(), 1, 4 ); // <= definitely in week #1
+ TQDate dt( date.year(), 1, 4 ); // <= definitely in week #1
dt = dt.addDays( -(7 + dt.dayOfWeek() - weekstart) % 7 ); // begin of week #1
- QDate dtn( date.year()+1, 1, 4 ); // <= definitely first week of next year
+ TQDate dtn( date.year()+1, 1, 4 ); // <= definitely first week of next year
dtn = dtn.addDays( -(7 + dtn.dayOfWeek() - weekstart) % 7 );
int daysto = dt.daysTo( date );
int dayston = dtn.daysTo( date );
if ( daysto < 0 ) {
if ( year ) *year = date.year()-1;
- dt = QDate( date.year()-1, 1, 4 );
+ dt = TQDate( date.year()-1, 1, 4 );
dt = dt.addDays( -(7 + dt.dayOfWeek() - weekstart) % 7 ); // begin of week #1
daysto = dt.daysTo( date );
} else if ( dayston >= 0 ) {
@@ -141,13 +141,13 @@ int DateHelper::getWeekNumber( const QDate &date, short weekstart, int *year )
int DateHelper::weekNumbersInYear( int year, short weekstart )
{
- QDate dt( year, 1, weekstart );
- QDate dt1( year + 1, 1, weekstart );
+ TQDate dt( year, 1, weekstart );
+ TQDate dt1( year + 1, 1, weekstart );
return dt.daysTo( dt1 ) / 7;
}
// Week number from the end of the year
-int DateHelper::getWeekNumberNeg( const QDate &date, short weekstart, int *year )
+int DateHelper::getWeekNumberNeg( const TQDate &date, short weekstart, int *year )
{
int weekpos = getWeekNumber( date, weekstart, year );
return weekNumbersInYear( *year, weekstart ) - weekpos - 1;
@@ -168,7 +168,7 @@ RecurrenceRule::Constraint::Constraint( int wkst )
clear();
}
-RecurrenceRule::Constraint::Constraint( const QDateTime &preDate, PeriodType type, int wkst )
+RecurrenceRule::Constraint::Constraint( const TQDateTime &preDate, PeriodType type, int wkst )
{
weekstart = wkst;
readDateTime( preDate, type );
@@ -188,7 +188,7 @@ void RecurrenceRule::Constraint::clear()
yearday = 0;
}
-bool RecurrenceRule::Constraint::matches( const QDate &dt, RecurrenceRule::PeriodType type ) const
+bool RecurrenceRule::Constraint::matches( const TQDate &dt, RecurrenceRule::PeriodType type ) const
{
// If the event recurs in week 53 or 1, the day might not belong to the same
// year as the week it is in. E.g. Jan 1, 2005 is in week 53 of year 2004.
@@ -233,7 +233,7 @@ bool RecurrenceRule::Constraint::matches( const QDate &dt, RecurrenceRule::Perio
return true;
}
-bool RecurrenceRule::Constraint::matches( const QDateTime &dt, RecurrenceRule::PeriodType type ) const
+bool RecurrenceRule::Constraint::matches( const TQDateTime &dt, RecurrenceRule::PeriodType type ) const
{
if ( !matches( dt.date(), type ) ) return false;
if ( hour >= 0 && hour != dt.time().hour() ) return false;
@@ -248,28 +248,28 @@ bool RecurrenceRule::Constraint::isConsistent( PeriodType /*period*/) const
return true;
}
-QDateTime RecurrenceRule::Constraint::intervalDateTime( RecurrenceRule::PeriodType type ) const
+TQDateTime RecurrenceRule::Constraint::intervalDateTime( RecurrenceRule::PeriodType type ) const
{
- QDateTime dt;
- dt.setTime( QTime( 0, 0, 0 ) );
- dt.setDate( QDate( year, (month>0)?month:1, (day>0)?day:1 ) );
+ TQDateTime dt;
+ dt.setTime( TQTime( 0, 0, 0 ) );
+ dt.setDate( TQDate( year, (month>0)?month:1, (day>0)?day:1 ) );
if ( day < 0 )
dt = dt.addDays( dt.date().daysInMonth() + day );
switch ( type ) {
case rSecondly:
- dt.setTime( QTime( hour, minute, second ) ); break;
+ dt.setTime( TQTime( hour, minute, second ) ); break;
case rMinutely:
- dt.setTime( QTime( hour, minute, 1 ) ); break;
+ dt.setTime( TQTime( hour, minute, 1 ) ); break;
case rHourly:
- dt.setTime( QTime( hour, 1, 1 ) ); break;
+ dt.setTime( TQTime( hour, 1, 1 ) ); break;
case rDaily:
break;
case rWeekly:
dt = DateHelper::getNthWeek( year, weeknumber, weekstart ); break;
case rMonthly:
- dt.setDate( QDate( year, month, 1 ) ); break;
+ dt.setDate( TQDate( year, month, 1 ) ); break;
case rYearly:
- dt.setDate( QDate( year, 1, 1 ) ); break;
+ dt.setDate( TQDate( year, 1, 1 ) ); break;
default:
break;
}
@@ -300,16 +300,16 @@ DateTimeList RecurrenceRule::Constraint::dateTimes( RecurrenceRule::PeriodType t
DateTimeList result;
bool done = false;
// TODO_Recurrence: Handle floating
- QTime tm( hour, minute, second );
+ TQTime tm( hour, minute, second );
if ( !isConsistent( type ) ) return result;
if ( !done && day > 0 && month > 0 ) {
- QDateTime dt( QDate( year, month, day ), tm );
+ TQDateTime dt( TQDate( year, month, day ), tm );
if ( dt.isValid() ) result.append( dt );
done = true;
}
if ( !done && day < 0 && month > 0 ) {
- QDateTime dt( QDate( year, month, 1 ), tm );
+ TQDateTime dt( TQDate( year, month, 1 ), tm );
dt = dt.addDays( dt.date().daysInMonth() + day );
if ( dt.isValid() ) result.append( dt );
done = true;
@@ -325,15 +325,15 @@ DateTimeList RecurrenceRule::Constraint::dateTimes( RecurrenceRule::PeriodType t
if ( day > 0 ) {
dstart = dend = day;
} else if ( day < 0 ) {
- QDate date( year, month, 1 );
+ TQDate date( year, month, 1 );
dstart = dend = date.daysInMonth() + day + 1;
} else {
- QDate date( year, month, 1 );
+ TQDate date( year, month, 1 );
dstart = 1;
dend = date.daysInMonth();
}
for ( uint d = dstart; d <= dend; ++d ) {
- QDateTime dt( QDate( year, m, d ), tm );
+ TQDateTime dt( TQDate( year, m, d ), tm );
if ( dt.isValid() ) result.append( dt );
}
}
@@ -344,21 +344,21 @@ DateTimeList RecurrenceRule::Constraint::dateTimes( RecurrenceRule::PeriodType t
// If we have a yearday (and of course a year), we know the exact date
if ( !done && yearday != 0 ) {
// yearday < 0 means from end of year, so we'll need Jan 1 of the next year
- QDate d( year + ((yearday>0)?0:1), 1, 1 );
+ TQDate d( year + ((yearday>0)?0:1), 1, 1 );
d = d.addDays( yearday - ((yearday>0)?1:0) );
- result.append( QDateTime( d, tm ) );
+ result.append( TQDateTime( d, tm ) );
done = true;
}
// Else: If we have a weeknumber, we have at most 7 possible dates, loop through them
if ( !done && weeknumber != 0 ) {
- QDate wst( DateHelper::getNthWeek( year, weeknumber, weekstart ) );
+ TQDate wst( DateHelper::getNthWeek( year, weeknumber, weekstart ) );
if ( weekday != 0 ) {
wst = wst.addDays( (7 + weekday - weekstart ) % 7 );
- result.append( QDateTime( wst, tm ) );
+ result.append( TQDateTime( wst, tm ) );
} else {
for ( int i = 0; i < 7; ++i ) {
- result.append( QDateTime( wst, tm ) );
+ result.append( TQDateTime( wst, tm ) );
wst = wst.addDays( 1 );
}
}
@@ -367,13 +367,13 @@ DateTimeList RecurrenceRule::Constraint::dateTimes( RecurrenceRule::PeriodType t
// weekday is given
if ( !done && weekday != 0 ) {
- QDate dt( year, 1, 1 );
+ TQDate dt( year, 1, 1 );
// If type == yearly and month is given, pos is still in month not year!
// TODO_Recurrence: Correct handling of n-th BYDAY...
int maxloop = 53;
bool inMonth = ( type == rMonthly) || ( type == rYearly && month > 0 );
if ( inMonth && month > 0 ) {
- dt = QDate( year, month, 1 );
+ dt = TQDate( year, month, 1 );
maxloop = 5;
}
if ( weekdaynr < 0 ) {
@@ -388,14 +388,14 @@ DateTimeList RecurrenceRule::Constraint::dateTimes( RecurrenceRule::PeriodType t
if ( weekdaynr > 0 ) {
dt = dt.addDays( ( weekdaynr - 1 ) * 7 );
- result.append( QDateTime( dt, tm ) );
+ result.append( TQDateTime( dt, tm ) );
} else if ( weekdaynr < 0 ) {
dt = dt.addDays( weekdaynr * 7 );
- result.append( QDateTime( dt, tm ) );
+ result.append( TQDateTime( dt, tm ) );
} else {
// loop through all possible weeks, non-matching will be filtered later
for ( int i = 0; i < maxloop; ++i ) {
- result.append( QDateTime( dt, tm ) );
+ result.append( TQDateTime( dt, tm ) );
dt = dt.addDays( 7 );
}
}
@@ -418,7 +418,7 @@ bool RecurrenceRule::Constraint::increase( RecurrenceRule::PeriodType type, int
{
// convert the first day of the interval to QDateTime
// Sub-daily types need to be converted to UTC to correctly handle DST shifts
- QDateTime dt( intervalDateTime( type ) );
+ TQDateTime dt( intervalDateTime( type ) );
// Now add the intervals
switch ( type ) {
@@ -439,13 +439,13 @@ bool RecurrenceRule::Constraint::increase( RecurrenceRule::PeriodType type, int
default:
break;
}
- // Convert back from QDateTime to the Constraint class
+ // Convert back from TQDateTime to the Constraint class
readDateTime( dt, type );
return true;
}
-bool RecurrenceRule::Constraint::readDateTime( const QDateTime &preDate, PeriodType type )
+bool RecurrenceRule::Constraint::readDateTime( const TQDateTime &preDate, PeriodType type )
{
clear();
switch ( type ) {
@@ -558,11 +558,11 @@ void RecurrenceRule::setRecurrenceType( PeriodType period )
setDirty();
}
-QDateTime RecurrenceRule::endDt( bool *result ) const
+TQDateTime RecurrenceRule::endDt( bool *result ) const
{
if ( result ) *result = false;
- if ( mPeriod == rNone ) return QDateTime();
- if ( mDuration < 0 ) return QDateTime();
+ if ( mPeriod == rNone ) return TQDateTime();
+ if ( mDuration < 0 ) return TQDateTime();
if ( mDuration == 0 ) {
if ( result ) *result = true;
return mDateEnd;
@@ -570,13 +570,13 @@ QDateTime RecurrenceRule::endDt( bool *result ) const
// N occurrences. Check if we have a full cache. If so, return the cached end date.
if ( ! mCached ) {
// If not enough occurrences can be found (i.e. inconsistent constraints)
- if ( !buildCache() ) return QDateTime();
+ if ( !buildCache() ) return TQDateTime();
}
if ( result ) *result = true;
return mCachedDateEnd;
}
-void RecurrenceRule::setEndDt( const QDateTime &dateTime )
+void RecurrenceRule::setEndDt( const TQDateTime &dateTime )
{
if ( isReadOnly() ) return;
mDateEnd = dateTime;
@@ -623,13 +623,13 @@ void RecurrenceRule::setDirty()
mDirty = true;
mCached = false;
mCachedDates.clear();
- for ( QValueList<Observer*>::ConstIterator it = mObservers.begin();
+ for ( TQValueList<Observer*>::ConstIterator it = mObservers.begin();
it != mObservers.end(); ++it ) {
if ( (*it) ) (*it)->recurrenceChanged( this );
}
}
-void RecurrenceRule::setStartDt( const QDateTime &start )
+void RecurrenceRule::setStartDt( const TQDateTime &start )
{
if ( isReadOnly() ) return;
mDateStart = start;
@@ -643,21 +643,21 @@ void RecurrenceRule::setFrequency(int freq)
setDirty();
}
-void RecurrenceRule::setBySeconds( const QValueList<int> bySeconds )
+void RecurrenceRule::setBySeconds( const TQValueList<int> bySeconds )
{
if ( isReadOnly() ) return;
mBySeconds = bySeconds;
setDirty();
}
-void RecurrenceRule::setByMinutes( const QValueList<int> byMinutes )
+void RecurrenceRule::setByMinutes( const TQValueList<int> byMinutes )
{
if ( isReadOnly() ) return;
mByMinutes = byMinutes;
setDirty();
}
-void RecurrenceRule::setByHours( const QValueList<int> byHours )
+void RecurrenceRule::setByHours( const TQValueList<int> byHours )
{
if ( isReadOnly() ) return;
mByHours = byHours;
@@ -665,42 +665,42 @@ void RecurrenceRule::setByHours( const QValueList<int> byHours )
}
-void RecurrenceRule::setByDays( const QValueList<WDayPos> byDays )
+void RecurrenceRule::setByDays( const TQValueList<WDayPos> byDays )
{
if ( isReadOnly() ) return;
mByDays = byDays;
setDirty();
}
-void RecurrenceRule::setByMonthDays( const QValueList<int> byMonthDays )
+void RecurrenceRule::setByMonthDays( const TQValueList<int> byMonthDays )
{
if ( isReadOnly() ) return;
mByMonthDays = byMonthDays;
setDirty();
}
-void RecurrenceRule::setByYearDays( const QValueList<int> byYearDays )
+void RecurrenceRule::setByYearDays( const TQValueList<int> byYearDays )
{
if ( isReadOnly() ) return;
mByYearDays = byYearDays;
setDirty();
}
-void RecurrenceRule::setByWeekNumbers( const QValueList<int> byWeekNumbers )
+void RecurrenceRule::setByWeekNumbers( const TQValueList<int> byWeekNumbers )
{
if ( isReadOnly() ) return;
mByWeekNumbers = byWeekNumbers;
setDirty();
}
-void RecurrenceRule::setByMonths( const QValueList<int> byMonths )
+void RecurrenceRule::setByMonths( const TQValueList<int> byMonths )
{
if ( isReadOnly() ) return;
mByMonths = byMonths;
setDirty();
}
-void RecurrenceRule::setBySetPos( const QValueList<int> bySetPos )
+void RecurrenceRule::setBySetPos( const TQValueList<int> bySetPos )
{
if ( isReadOnly() ) return;
mBySetPos = bySetPos;
@@ -781,7 +781,7 @@ void RecurrenceRule::buildConstraints()
Constraint::List tmp;
Constraint::List::const_iterator it;
- QValueList<int>::const_iterator intit;
+ TQValueList<int>::const_iterator intit;
#define intConstraint( list, element ) \
if ( !list.isEmpty() ) { \
@@ -807,7 +807,7 @@ void RecurrenceRule::buildConstraints()
if ( !mByDays.isEmpty() ) {
for ( it = mConstraints.constBegin(); it != mConstraints.constEnd(); ++it ) {
- QValueList<WDayPos>::const_iterator dayit;
+ TQValueList<WDayPos>::const_iterator dayit;
for ( dayit = mByDays.constBegin(); dayit != mByDays.constEnd(); ++dayit ) {
con = (*it);
con.weekday = (*dayit).day();
@@ -882,7 +882,7 @@ kdDebug(5800) << " RecurrenceRule::buildCache: " << endl;
// Build the list of all occurrences of this event (we need that to determine
// the end date!)
Constraint interval( getNextValidDateInterval( startDt(), recurrenceType() ) );
- QDateTime next;
+ TQDateTime next;
DateTimeList dts = datesForInterval( interval, recurrenceType() );
DateTimeList::Iterator it = dts.begin();
@@ -924,12 +924,12 @@ kdDebug(5800) << " Finished Building Cache, cache has " << dts.count() << " e
mCachedDateEnd = dts.last();
return true;
} else {
- mCachedDateEnd = QDateTime();
+ mCachedDateEnd = TQDateTime();
return false;
}
}
-bool RecurrenceRule::dateMatchesRules( const QDateTime &qdt ) const
+bool RecurrenceRule::dateMatchesRules( const TQDateTime &qdt ) const
{
bool match = false;
for ( Constraint::List::ConstIterator it = mConstraints.begin();
@@ -939,7 +939,7 @@ bool RecurrenceRule::dateMatchesRules( const QDateTime &qdt ) const
return match;
}
-bool RecurrenceRule::recursOn( const QDate &qd ) const
+bool RecurrenceRule::recursOn( const TQDate &qd ) const
{
// kdDebug(5800) << " RecurrenceRule::recursOn: " << qd << endl;
if ( qd < startDt().date() ) return false;
@@ -955,7 +955,7 @@ bool RecurrenceRule::recursOn( const QDate &qd ) const
match = match || ( (*it).matches( qd, recurrenceType() ) );
}
if ( !match ) return false;
- QDateTime tmp( qd, QTime( 0, 0, 0 ) );
+ TQDateTime tmp( qd, TQTime( 0, 0, 0 ) );
Constraint interval( getNextValidDateInterval( tmp, recurrenceType() ) );
// Constraint::matches is quite efficient, so first check if it can occur at
// all before we calculate all actual dates.
@@ -978,7 +978,7 @@ bool RecurrenceRule::recursOn( const QDate &qd ) const
}
-bool RecurrenceRule::recursAt( const QDateTime &qd ) const
+bool RecurrenceRule::recursAt( const TQDateTime &qd ) const
{
// kdDebug(5800) << " RecurrenceRule::recursAt: " << qd << endl;
if ( doesFloat() ) return recursOn( qd.date() );
@@ -1001,7 +1001,7 @@ bool RecurrenceRule::recursAt( const QDateTime &qd ) const
}
-TimeList RecurrenceRule::recurTimesOn( const QDate &date ) const
+TimeList RecurrenceRule::recurTimesOn( const TQDate &date ) const
{
// kdDebug(5800) << " RecurrenceRule::recurTimesOn: " << date << endl;
TimeList lst;
@@ -1009,7 +1009,7 @@ TimeList RecurrenceRule::recurTimesOn( const QDate &date ) const
if ( doesFloat() ) return lst;
- QDateTime dt( date, QTime( 0, 0, 0 ) );
+ TQDateTime dt( date, TQTime( 0, 0, 0 ) );
bool valid = dt.isValid() && ( dt.date() == date );
while ( valid ) {
// TODO: Add a flag so that the date is never increased!
@@ -1021,7 +1021,7 @@ TimeList RecurrenceRule::recurTimesOn( const QDate &date ) const
}
/** Returns the number of recurrences up to and including the date/time specified. */
-int RecurrenceRule::durationTo( const QDateTime &dt ) const
+int RecurrenceRule::durationTo( const TQDateTime &dt ) const
{
// kdDebug(5800) << " RecurrenceRule::durationTo: " << dt << endl;
// Easy cases: either before start, or after all recurrences and we know
@@ -1031,7 +1031,7 @@ int RecurrenceRule::durationTo( const QDateTime &dt ) const
// if ( dt == startDt() ) return 1;
if ( mDuration > 0 && dt >= endDt() ) return mDuration;
- QDateTime next( startDt() );
+ TQDateTime next( startDt() );
int found = 0;
while ( next.isValid() && next <= dt ) {
++found;
@@ -1041,15 +1041,15 @@ int RecurrenceRule::durationTo( const QDateTime &dt ) const
}
-QDateTime RecurrenceRule::getPreviousDate( const QDateTime& afterDate ) const
+TQDateTime RecurrenceRule::getPreviousDate( const TQDateTime& afterDate ) const
{
// kdDebug(5800) << " RecurrenceRule::getPreviousDate: " << afterDate << endl;
// Beyond end of recurrence
if ( afterDate < startDt() )
- return QDateTime();
+ return TQDateTime();
// If we have a cache (duration given), use that
- QDateTime prev;
+ TQDateTime prev;
if ( mDuration > 0 ) {
if ( !mCached ) buildCache();
DateTimeList::ConstIterator it = mCachedDates.begin();
@@ -1058,7 +1058,7 @@ QDateTime RecurrenceRule::getPreviousDate( const QDateTime& afterDate ) const
++it;
}
if ( prev.isValid() && prev < afterDate ) return prev;
- else return QDateTime();
+ else return TQDateTime();
}
// kdDebug(5800) << " getNext date after " << preDate << endl;
@@ -1077,7 +1077,7 @@ QDateTime RecurrenceRule::getPreviousDate( const QDateTime& afterDate ) const
} while ( dtit != dts.begin() && (*dtit) >= prev );
if ( (*dtit) < prev ) {
if ( (*dtit) >= startDt() ) return (*dtit);
- else return QDateTime();
+ else return TQDateTime();
}
}
@@ -1092,22 +1092,22 @@ QDateTime RecurrenceRule::getPreviousDate( const QDateTime& afterDate ) const
if ( dts.count() > 0 ) {
prev = dts.last();
if ( prev.isValid() && prev >= startDt() ) return prev;
- else return QDateTime();
+ else return TQDateTime();
}
}
- return QDateTime();
+ return TQDateTime();
}
-QDateTime RecurrenceRule::getNextDate( const QDateTime &preDate ) const
+TQDateTime RecurrenceRule::getNextDate( const TQDateTime &preDate ) const
{
// kdDebug(5800) << " RecurrenceRule::getNextDate: " << preDate << endl;
// Beyond end of recurrence
if ( mDuration >= 0 && endDt().isValid() && preDate >= endDt() )
- return QDateTime();
+ return TQDateTime();
// Start date is only included if it really matches
- QDateTime adjustedPreDate;
+ TQDateTime adjustedPreDate;
if ( preDate < startDt() )
adjustedPreDate = startDt().addSecs( -1 );
else
@@ -1129,7 +1129,7 @@ QDateTime RecurrenceRule::getNextDate( const QDateTime &preDate ) const
DateTimeList::Iterator dtit = dts.begin();
while ( dtit != dts.end() && (*dtit) <= adjustedPreDate ) ++dtit;
if ( dtit != dts.end() ) {
- if ( mDuration >= 0 && (*dtit) > endDt() ) return QDateTime();
+ if ( mDuration >= 0 && (*dtit) > endDt() ) return TQDateTime();
else return (*dtit);
}
@@ -1141,23 +1141,23 @@ QDateTime RecurrenceRule::getNextDate( const QDateTime &preDate ) const
interval.increase( recurrenceType(), frequency() );
DateTimeList dts = datesForInterval( interval, recurrenceType() );
if ( dts.count() > 0 ) {
- QDateTime ret( dts.first() );
- if ( mDuration >= 0 && ret > endDt() ) return QDateTime();
+ TQDateTime ret( dts.first() );
+ if ( mDuration >= 0 && ret > endDt() ) return TQDateTime();
else return ret;
}
++loopnr;
}
- return QDateTime();
+ return TQDateTime();
}
-RecurrenceRule::Constraint RecurrenceRule::getPreviousValidDateInterval( const QDateTime &preDate, PeriodType type ) const
+RecurrenceRule::Constraint RecurrenceRule::getPreviousValidDateInterval( const TQDateTime &preDate, PeriodType type ) const
{
// kdDebug(5800) << " (o) getPreviousValidDateInterval after " << preDate << ", type=" << type << endl;
long periods = 0;
- QDateTime nextValid = startDt();
- QDateTime start = startDt();
+ TQDateTime nextValid = startDt();
+ TQDateTime start = startDt();
int modifier = 1;
- QDateTime toDate( preDate );
+ TQDateTime toDate( preDate );
// for super-daily recurrences, don't care about the time part
// Find the #intervals since the dtstart and round to the next multiple of
@@ -1195,7 +1195,7 @@ RecurrenceRule::Constraint RecurrenceRule::getPreviousValidDateInterval( const Q
periods = ( periods / frequency() ) * frequency();
// set the day to the first day of the month, so we don't have problems
// with non-existent days like Feb 30 or April 31
- start.setDate( QDate( start.date().year(), start.date().month(), 1 ) );
+ start.setDate( TQDate( start.date().year(), start.date().month(), 1 ) );
nextValid.setDate( start.date().addMonths( periods ) );
break; }
case rYearly:
@@ -1212,15 +1212,15 @@ RecurrenceRule::Constraint RecurrenceRule::getPreviousValidDateInterval( const Q
return Constraint( nextValid, type, mWeekStart );
}
-RecurrenceRule::Constraint RecurrenceRule::getNextValidDateInterval( const QDateTime &preDate, PeriodType type ) const
+RecurrenceRule::Constraint RecurrenceRule::getNextValidDateInterval( const TQDateTime &preDate, PeriodType type ) const
{
// TODO: Simplify this!
kdDebug(5800) << " (o) getNextValidDateInterval after " << preDate << ", type=" << type << endl;
long periods = 0;
- QDateTime start = startDt();
- QDateTime nextValid( start );
+ TQDateTime start = startDt();
+ TQDateTime nextValid( start );
int modifier = 1;
- QDateTime toDate( preDate );
+ TQDateTime toDate( preDate );
// for super-daily recurrences, don't care about the time part
// Find the #intervals since the dtstart and round to the next multiple of
@@ -1262,7 +1262,7 @@ RecurrenceRule::Constraint RecurrenceRule::getNextValidDateInterval( const QDate
periods += (frequency() - 1 - ( (periods - 1) % frequency() ) );
// set the day to the first day of the month, so we don't have problems
// with non-existent days like Feb 30 or April 31
- start.setDate( QDate( start.date().year(), start.date().month(), 1 ) );
+ start.setDate( TQDate( start.date().year(), start.date().month(), 1 ) );
nextValid.setDate( start.date().addMonths( periods ) );
break; }
case rYearly:
@@ -1353,7 +1353,7 @@ DateTimeList RecurrenceRule::datesForInterval( const Constraint &interval, Perio
if ( !mBySetPos.isEmpty() ) {
DateTimeList tmplst = lst;
lst.clear();
- QValueList<int>::ConstIterator it;
+ TQValueList<int>::ConstIterator it;
for ( it = mBySetPos.begin(); it != mBySetPos.end(); ++it ) {
int pos = *it;
if ( pos > 0 ) --pos;
@@ -1385,10 +1385,10 @@ void RecurrenceRule::dump() const
#define dumpByIntList(list,label) \
if ( !list.isEmpty() ) {\
- QStringList lst;\
- for ( QValueList<int>::ConstIterator it = list.begin();\
+ TQStringList lst;\
+ for ( TQValueList<int>::ConstIterator it = list.begin();\
it != list.end(); ++it ) {\
- lst.append( QString::number( *it ) );\
+ lst.append( TQString::number( *it ) );\
}\
kdDebug(5800) << " " << label << lst.join(", ") << endl;\
}
@@ -1396,10 +1396,10 @@ void RecurrenceRule::dump() const
dumpByIntList( mByMinutes, "ByMinutes: " );
dumpByIntList( mByHours, "ByHours: " );
if ( !mByDays.isEmpty() ) {
- QStringList lst;
- for ( QValueList<WDayPos>::ConstIterator it = mByDays.begin();
+ TQStringList lst;
+ for ( TQValueList<WDayPos>::ConstIterator it = mByDays.begin();
it != mByDays.end(); ++it ) {
- lst.append( ( ((*it).pos()!=0) ? QString::number( (*it).pos() ) : "" ) +
+ lst.append( ( ((*it).pos()!=0) ? TQString::number( (*it).pos() ) : "" ) +
DateHelper::dayName( (*it).day() ) );
}
kdDebug(5800) << " ByDays: " << lst.join(", ") << endl;
diff --git a/libkcal/recurrencerule.h b/libkcal/recurrencerule.h
index ad72f2561..049d9c523 100644
--- a/libkcal/recurrencerule.h
+++ b/libkcal/recurrencerule.h
@@ -24,19 +24,19 @@
#ifndef KCAL_RECURRENCERULE_H
#define KCAL_RECURRENCERULE_H
-#include <qdatetime.h>
+#include <tqdatetime.h>
#include <libkcal/listbase.h>
#include "libkcal_export.h"
template <class T>
-Q_INLINE_TEMPLATES void qSortUnique( QValueList<T> &lst )
+Q_INLINE_TEMPLATES void qSortUnique( TQValueList<T> &lst )
{
qHeapSort( lst );
if ( lst.isEmpty() ) return;
// Remove all duplicates from the times list
// TODO: Make this more efficient!
- QValueListIterator<T> it = lst.begin();
+ TQValueListIterator<T> it = lst.begin();
T last = *it;
++it;
T newlast;
@@ -53,9 +53,9 @@ Q_INLINE_TEMPLATES void qSortUnique( QValueList<T> &lst )
namespace KCal {
-typedef QValueList<QDateTime> DateTimeList;
-typedef QValueList<QDate> DateList;
-typedef QValueList<QTime> TimeList;
+typedef TQValueList<TQDateTime> DateTimeList;
+typedef TQValueList<TQDate> DateList;
+typedef TQValueList<TQTime> TimeList;
@@ -129,9 +129,9 @@ class LIBKCAL_EXPORT RecurrenceRule
/** Return the start of the recurrence */
- QDateTime startDt() const { return mDateStart; }
+ TQDateTime startDt() const { return mDateStart; }
/** Set start of recurrence, as a date and time. */
- void setStartDt(const QDateTime &start);
+ void setStartDt(const TQDateTime &start);
/** Returns whether the start date has no time associated. Floating
means -- according to rfc2445 -- that the event has no time associate. */
@@ -145,10 +145,10 @@ class LIBKCAL_EXPORT RecurrenceRule
* @param result if non-null, *result is updated to true if successful,
* or false if there is no recurrence.
*/
- QDateTime endDt( bool* result = 0 ) const;
+ TQDateTime endDt( bool* result = 0 ) const;
/** Sets the date and time of the last recurrence.
* @param endDateTime the ending date/time after which to stop recurring. */
- void setEndDt(const QDateTime &endDateTime);
+ void setEndDt(const TQDateTime &endDateTime);
/**
@@ -160,33 +160,33 @@ class LIBKCAL_EXPORT RecurrenceRule
* first and last. */
void setDuration(int duration);
// /** Returns the number of recurrences up to and including the date specified. */
-// int durationTo(const QDate &) const;
+// int durationTo(const TQDate &) const;
/** Returns the number of recurrences up to and including the date/time specified. */
- int durationTo(const QDateTime &) const;
+ int durationTo(const TQDateTime &) const;
/** Returns the number of recurrences up to and including the date specified. */
- int durationTo( const QDate &date ) const { return durationTo( QDateTime( date, QTime( 23, 59, 59 ) ) ); }
+ int durationTo( const TQDate &date ) const { return durationTo( TQDateTime( date, TQTime( 23, 59, 59 ) ) ); }
/** Returns true if the date specified is one on which the event will
* recur. The start date returns true only if it actually matches the rule. */
- bool recursOn( const QDate &qd ) const;
+ bool recursOn( const TQDate &qd ) const;
/** Returns true if the date/time specified is one at which the event will
* recur. Times are rounded down to the nearest minute to determine the result.
* The start date/time returns true only if it actually matches the rule. */
- bool recursAt( const QDateTime & ) const;
+ bool recursAt( const TQDateTime & ) const;
/** Returns true if the date matches the rules. It does not necessarily
mean that this is an actual occurrence. In particular, the method does
not check if the date is after the end date, or if the frequency interval
matches */
- bool dateMatchesRules( const QDateTime &qdt ) const;
+ bool dateMatchesRules( const TQDateTime &qdt ) const;
/** Returns a list of the times on the specified date at which the
* recurrence will occur.
* @param date the date for which to find the recurrence times.
*/
- TimeList recurTimesOn( const QDate &date ) const;
+ TimeList recurTimesOn( const TQDate &date ) const;
/** Returns the date and time of the next recurrence, after the specified date/time.
@@ -194,40 +194,40 @@ class LIBKCAL_EXPORT RecurrenceRule
* @param preDateTime the date/time after which to find the recurrence.
* @return date/time of next recurrence, or invalid date if none.
*/
- QDateTime getNextDate( const QDateTime& preDateTime ) const;
+ TQDateTime getNextDate( const TQDateTime& preDateTime ) const;
/** Returns the date and time of the last previous recurrence, before the specified date/time.
* If a time later than 00:00:00 is specified and the recurrence has no time, 00:00:00 on
* the specified date is returned if that date recurs.
* @param afterDateTime the date/time before which to find the recurrence.
* @return date/time of previous recurrence, or invalid date if none.
*/
- QDateTime getPreviousDate( const QDateTime& afterDateTime ) const;
+ TQDateTime getPreviousDate( const TQDateTime& afterDateTime ) const;
- void setBySeconds( const QValueList<int> bySeconds );
- void setByMinutes( const QValueList<int> byMinutes );
- void setByHours( const QValueList<int> byHours );
+ void setBySeconds( const TQValueList<int> bySeconds );
+ void setByMinutes( const TQValueList<int> byMinutes );
+ void setByHours( const TQValueList<int> byHours );
- void setByDays( const QValueList<WDayPos> byDays );
- void setByMonthDays( const QValueList<int> byMonthDays );
- void setByYearDays( const QValueList<int> byYearDays );
- void setByWeekNumbers( const QValueList<int> byWeekNumbers );
- void setByMonths( const QValueList<int> byMonths );
- void setBySetPos( const QValueList<int> bySetPos );
+ void setByDays( const TQValueList<WDayPos> byDays );
+ void setByMonthDays( const TQValueList<int> byMonthDays );
+ void setByYearDays( const TQValueList<int> byYearDays );
+ void setByWeekNumbers( const TQValueList<int> byWeekNumbers );
+ void setByMonths( const TQValueList<int> byMonths );
+ void setBySetPos( const TQValueList<int> bySetPos );
void setWeekStart( short weekStart );
- const QValueList<int> &bySeconds() const { return mBySeconds; }
- const QValueList<int> &byMinutes() const { return mByMinutes; }
- const QValueList<int> &byHours() const { return mByHours; }
+ const TQValueList<int> &bySeconds() const { return mBySeconds; }
+ const TQValueList<int> &byMinutes() const { return mByMinutes; }
+ const TQValueList<int> &byHours() const { return mByHours; }
- const QValueList<WDayPos> &byDays() const { return mByDays; }
- const QValueList<int> &byMonthDays() const { return mByMonthDays; }
- const QValueList<int> &byYearDays() const { return mByYearDays; }
- const QValueList<int> &byWeekNumbers() const { return mByWeekNumbers; }
- const QValueList<int> &byMonths() const { return mByMonths; }
- const QValueList<int> &bySetPos() const { return mBySetPos; }
+ const TQValueList<WDayPos> &byDays() const { return mByDays; }
+ const TQValueList<int> &byMonthDays() const { return mByMonthDays; }
+ const TQValueList<int> &byYearDays() const { return mByYearDays; }
+ const TQValueList<int> &byWeekNumbers() const { return mByWeekNumbers; }
+ const TQValueList<int> &byMonths() const { return mByMonths; }
+ const TQValueList<int> &bySetPos() const { return mBySetPos; }
short weekStart() const { return mWeekStart; }
@@ -252,12 +252,12 @@ class LIBKCAL_EXPORT RecurrenceRule
Debug output.
*/
void dump() const;
- QString mRRule;
+ TQString mRRule;
private:
class Constraint {
public:
- typedef QValueList<Constraint> List;
+ typedef TQValueList<Constraint> List;
Constraint( int wkst = 1 );
/* Constraint( const Constraint &con ) :
@@ -265,7 +265,7 @@ class LIBKCAL_EXPORT RecurrenceRule
hour(con.hour), minute(con.minute), second(con.second),
weekday(con.weekday), weeknumber(con.weeknumber),
yearday(con.yearday), weekstart(con.weekstart) {}*/
- Constraint( const QDateTime &preDate, PeriodType type, int wkst );
+ Constraint( const TQDateTime &preDate, PeriodType type, int wkst );
void clear();
int year; // 0 means unspecified
@@ -280,19 +280,19 @@ class LIBKCAL_EXPORT RecurrenceRule
int yearday; // 0 means unspecified
int weekstart; // first day of week (1=monday, 7=sunday, 0=unspec.)
- bool readDateTime( const QDateTime &preDate, PeriodType type );
- bool matches( const QDate &dt, RecurrenceRule::PeriodType type ) const;
- bool matches( const QDateTime &dt, RecurrenceRule::PeriodType type ) const;
+ bool readDateTime( const TQDateTime &preDate, PeriodType type );
+ bool matches( const TQDate &dt, RecurrenceRule::PeriodType type ) const;
+ bool matches( const TQDateTime &dt, RecurrenceRule::PeriodType type ) const;
bool isConsistent() const;
bool isConsistent( PeriodType period ) const;
bool increase( PeriodType type, int freq );
- QDateTime intervalDateTime( PeriodType type ) const;
+ TQDateTime intervalDateTime( PeriodType type ) const;
DateTimeList dateTimes( PeriodType type ) const;
void dump() const;
};
- Constraint getNextValidDateInterval( const QDateTime &preDate, PeriodType type ) const;
- Constraint getPreviousValidDateInterval( const QDateTime &preDate, PeriodType type ) const;
+ Constraint getNextValidDateInterval( const TQDateTime &preDate, PeriodType type ) const;
+ Constraint getPreviousValidDateInterval( const TQDateTime &preDate, PeriodType type ) const;
DateTimeList datesForInterval( const Constraint &interval, PeriodType type ) const;
bool mergeIntervalConstraint( Constraint *merged, const Constraint &conit,
const Constraint &interval ) const;
@@ -300,39 +300,39 @@ class LIBKCAL_EXPORT RecurrenceRule
PeriodType mPeriod;
- QDateTime mDateStart;
+ TQDateTime mDateStart;
/** how often it recurs (including dtstart):
-1 means infinitely,
0 means an explicit end date,
positive values give the number of occurrences */
int mDuration;
- QDateTime mDateEnd;
+ TQDateTime mDateEnd;
uint mFrequency;
bool mIsReadOnly;
bool mFloating;
- QValueList<int> mBySeconds; // values: second 0-59
- QValueList<int> mByMinutes; // values: minute 0-59
- QValueList<int> mByHours; // values: hour 0-23
+ TQValueList<int> mBySeconds; // values: second 0-59
+ TQValueList<int> mByMinutes; // values: minute 0-59
+ TQValueList<int> mByHours; // values: hour 0-23
- QValueList<WDayPos> mByDays; // n-th weekday of the month or year
- QValueList<int> mByMonthDays; // values: day -31 to -1 and 1-31
- QValueList<int> mByYearDays; // values: day -366 to -1 and 1-366
- QValueList<int> mByWeekNumbers; // values: week -53 to -1 and 1-53
- QValueList<int> mByMonths; // values: month 1-12
- QValueList<int> mBySetPos; // values: position -366 to -1 and 1-366
+ TQValueList<WDayPos> mByDays; // n-th weekday of the month or year
+ TQValueList<int> mByMonthDays; // values: day -31 to -1 and 1-31
+ TQValueList<int> mByYearDays; // values: day -366 to -1 and 1-366
+ TQValueList<int> mByWeekNumbers; // values: week -53 to -1 and 1-53
+ TQValueList<int> mByMonths; // values: month 1-12
+ TQValueList<int> mBySetPos; // values: position -366 to -1 and 1-366
short mWeekStart; // first day of the week (1=Monday, 7=Sunday)
Constraint::List mConstraints;
void buildConstraints();
bool mDirty;
- QValueList<Observer*> mObservers;
+ TQValueList<Observer*> mObservers;
// Cache for duration
mutable DateTimeList mCachedDates;
mutable bool mCached;
- mutable QDateTime mCachedDateEnd;
+ mutable TQDateTime mCachedDateEnd;
class Private;
Private *d;
diff --git a/libkcal/resourcecached.cpp b/libkcal/resourcecached.cpp
index 09862b25a..22fa79bb9 100644
--- a/libkcal/resourcecached.cpp
+++ b/libkcal/resourcecached.cpp
@@ -19,11 +19,11 @@
Boston, MA 02110-1301, USA.
*/
-#include <qdatastream.h>
-#include <qdatetime.h>
-#include <qfile.h>
-#include <qstring.h>
-#include <qptrlist.h>
+#include <tqdatastream.h>
+#include <tqdatetime.h>
+#include <tqfile.h>
+#include <tqstring.h>
+#include <tqptrlist.h>
#include <kdebug.h>
#include <klocale.h>
@@ -43,14 +43,14 @@
using namespace KCal;
ResourceCached::ResourceCached( const KConfig* config )
- : ResourceCalendar( config ), mCalendar( QString::fromLatin1( "UTC" ) ),
+ : ResourceCalendar( config ), mCalendar( TQString::fromLatin1( "UTC" ) ),
mReloadPolicy( ReloadNever ), mReloadInterval( 10 ),
mReloadTimer( 0, "mReloadTimer" ), mReloaded( false ),
mSavePolicy( SaveNever ), mSaveInterval( 10 ),
mSaveTimer( 0, "mSaveTimer" ), mIdMapper( "kcal/uidmaps/" )
{
- connect( &mReloadTimer, SIGNAL( timeout() ), SLOT( slotReload() ) );
- connect( &mSaveTimer, SIGNAL( timeout() ), SLOT( slotSave() ) );
+ connect( &mReloadTimer, TQT_SIGNAL( timeout() ), TQT_SLOT( slotReload() ) );
+ connect( &mSaveTimer, TQT_SIGNAL( timeout() ), TQT_SLOT( slotSave() ) );
}
ResourceCached::~ResourceCached()
@@ -164,12 +164,12 @@ bool ResourceCached::deleteEvent( Event *event )
}
-Event *ResourceCached::event( const QString &uid )
+Event *ResourceCached::event( const TQString &uid )
{
return mCalendar.event( uid );
}
-Event::List ResourceCached::rawEventsForDate( const QDate &qd,
+Event::List ResourceCached::rawEventsForDate( const TQDate &qd,
EventSortField sortField,
SortDirection sortDirection )
{
@@ -178,13 +178,13 @@ Event::List ResourceCached::rawEventsForDate( const QDate &qd,
return list;
}
-Event::List ResourceCached::rawEvents( const QDate &start, const QDate &end,
+Event::List ResourceCached::rawEvents( const TQDate &start, const TQDate &end,
bool inclusive )
{
return mCalendar.rawEvents( start, end, inclusive );
}
-Event::List ResourceCached::rawEventsForDate( const QDateTime &qdt )
+Event::List ResourceCached::rawEventsForDate( const TQDateTime &qdt )
{
return mCalendar.rawEventsForDate( qdt.date() );
}
@@ -215,12 +215,12 @@ Todo::List ResourceCached::rawTodos( TodoSortField sortField, SortDirection sort
return mCalendar.rawTodos( sortField, sortDirection );
}
-Todo *ResourceCached::todo( const QString &uid )
+Todo *ResourceCached::todo( const TQString &uid )
{
return mCalendar.todo( uid );
}
-Todo::List ResourceCached::rawTodosForDate( const QDate &date )
+Todo::List ResourceCached::rawTodosForDate( const TQDate &date )
{
return mCalendar.rawTodosForDate( date );
}
@@ -233,7 +233,7 @@ bool ResourceCached::addJournal( Journal *journal )
return mCalendar.addJournal( journal );
}
-Journal *ResourceCached::journal( const QString &uid )
+Journal *ResourceCached::journal( const TQString &uid )
{
return mCalendar.journal( uid );
}
@@ -243,30 +243,30 @@ Journal::List ResourceCached::rawJournals( JournalSortField sortField, SortDirec
return mCalendar.rawJournals( sortField, sortDirection );
}
-Journal::List ResourceCached::rawJournalsForDate( const QDate &date )
+Journal::List ResourceCached::rawJournalsForDate( const TQDate &date )
{
return mCalendar.rawJournalsForDate( date );
}
-Alarm::List ResourceCached::alarmsTo( const QDateTime &to )
+Alarm::List ResourceCached::alarmsTo( const TQDateTime &to )
{
return mCalendar.alarmsTo( to );
}
-Alarm::List ResourceCached::alarms( const QDateTime &from, const QDateTime &to )
+Alarm::List ResourceCached::alarms( const TQDateTime &from, const TQDateTime &to )
{
// kdDebug(5800) << "ResourceCached::alarms(" << from.toString() << " - " << to.toString() << ")\n";
return mCalendar.alarms( from, to );
}
-void ResourceCached::setTimeZoneId( const QString& tzid )
+void ResourceCached::setTimeZoneId( const TQString& tzid )
{
mCalendar.setTimeZoneId( tzid );
}
-QString ResourceCached::timeZoneId() const
+TQString ResourceCached::timeZoneId() const
{
return mCalendar.timeZoneId();
}
@@ -317,7 +317,7 @@ void ResourceCached::clearCache()
void ResourceCached::cleanUpEventCache( const Event::List &eventList )
{
- CalendarLocal calendar ( QString::fromLatin1( "UTC" ) );
+ CalendarLocal calendar ( TQString::fromLatin1( "UTC" ) );
if ( KStandardDirs::exists( cacheFile() ) )
calendar.load( cacheFile() );
@@ -346,7 +346,7 @@ void ResourceCached::cleanUpEventCache( const Event::List &eventList )
void ResourceCached::cleanUpTodoCache( const Todo::List &todoList )
{
- CalendarLocal calendar ( QString::fromLatin1( "UTC" ) );
+ CalendarLocal calendar ( TQString::fromLatin1( "UTC" ) );
if ( KStandardDirs::exists( cacheFile() ) )
calendar.load( cacheFile() );
@@ -379,22 +379,22 @@ KPIM::IdMapper& ResourceCached::idMapper()
return mIdMapper;
}
-QString ResourceCached::cacheFile() const
+TQString ResourceCached::cacheFile() const
{
return locateLocal( "cache", "kcal/kresources/" + identifier() );
}
-QString ResourceCached::changesCacheFile( const QString &type ) const
+TQString ResourceCached::changesCacheFile( const TQString &type ) const
{
return locateLocal( "cache", "kcal/changescache/" + identifier() + "_" + type );
}
-void ResourceCached::saveChangesCache( const QMap<Incidence*, bool> &map, const QString &type )
+void ResourceCached::saveChangesCache( const TQMap<Incidence*, bool> &map, const TQString &type )
{
- CalendarLocal calendar ( QString::fromLatin1( "UTC" ) );
+ CalendarLocal calendar ( TQString::fromLatin1( "UTC" ) );
bool isEmpty = true;
- QMap<Incidence *,bool>::ConstIterator it;
+ TQMap<Incidence *,bool>::ConstIterator it;
for ( it = map.begin(); it != map.end(); ++it ) {
isEmpty = false;
calendar.addIncidence( it.key()->clone() );
@@ -403,7 +403,7 @@ void ResourceCached::saveChangesCache( const QMap<Incidence*, bool> &map, const
if ( !isEmpty ) {
calendar.save( changesCacheFile( type ) );
} else {
- QFile file( changesCacheFile( type ) );
+ TQFile file( changesCacheFile( type ) );
file.remove();
}
@@ -417,9 +417,9 @@ void ResourceCached::saveChangesCache()
saveChangesCache( mChangedIncidences, "changed" );
}
-void ResourceCached::loadChangesCache( QMap<Incidence*, bool> &map, const QString &type )
+void ResourceCached::loadChangesCache( TQMap<Incidence*, bool> &map, const TQString &type )
{
- CalendarLocal calendar ( QString::fromLatin1( "UTC" ) );
+ CalendarLocal calendar ( TQString::fromLatin1( "UTC" ) );
if ( KStandardDirs::exists( changesCacheFile( type ) ) )
calendar.load( changesCacheFile( type ) );
@@ -448,7 +448,7 @@ void ResourceCached::calendarIncidenceAdded( Incidence *i )
<< i->uid() << endl;
#endif
- QMap<Incidence *,bool>::ConstIterator it;
+ TQMap<Incidence *,bool>::ConstIterator it;
it = mAddedIncidences.find( i );
if ( it == mAddedIncidences.end() ) {
mAddedIncidences.insert( i, true );
@@ -464,7 +464,7 @@ void ResourceCached::calendarIncidenceChanged( Incidence *i )
<< i->uid() << endl;
#endif
- QMap<Incidence *,bool>::ConstIterator it;
+ TQMap<Incidence *,bool>::ConstIterator it;
it = mChangedIncidences.find( i );
// FIXME: If you modify an added incidence, there's no need to add it to mChangedIncidences!
if ( it == mChangedIncidences.end() ) {
@@ -481,7 +481,7 @@ void ResourceCached::calendarIncidenceDeleted( Incidence *i )
<< i->uid() << endl;
#endif
- QMap<Incidence *,bool>::ConstIterator it;
+ TQMap<Incidence *,bool>::ConstIterator it;
it = mDeletedIncidences.find( i );
if ( it == mDeletedIncidences.end() ) {
mDeletedIncidences.insert( i, true );
@@ -493,7 +493,7 @@ void ResourceCached::calendarIncidenceDeleted( Incidence *i )
Incidence::List ResourceCached::addedIncidences() const
{
Incidence::List added;
- QMap<Incidence *,bool>::ConstIterator it;
+ TQMap<Incidence *,bool>::ConstIterator it;
for( it = mAddedIncidences.begin(); it != mAddedIncidences.end(); ++it ) {
added.append( it.key() );
}
@@ -503,7 +503,7 @@ Incidence::List ResourceCached::addedIncidences() const
Incidence::List ResourceCached::changedIncidences() const
{
Incidence::List changed;
- QMap<Incidence *,bool>::ConstIterator it;
+ TQMap<Incidence *,bool>::ConstIterator it;
for( it = mChangedIncidences.begin(); it != mChangedIncidences.end(); ++it ) {
changed.append( it.key() );
}
@@ -513,7 +513,7 @@ Incidence::List ResourceCached::changedIncidences() const
Incidence::List ResourceCached::deletedIncidences() const
{
Incidence::List deleted;
- QMap<Incidence *,bool>::ConstIterator it;
+ TQMap<Incidence *,bool>::ConstIterator it;
for( it = mDeletedIncidences.begin(); it != mDeletedIncidences.end(); ++it ) {
deleted.append( it.key() );
}
@@ -523,7 +523,7 @@ Incidence::List ResourceCached::deletedIncidences() const
Incidence::List ResourceCached::allChanges() const
{
Incidence::List changes;
- QMap<Incidence *,bool>::ConstIterator it;
+ TQMap<Incidence *,bool>::ConstIterator it;
for( it = mAddedIncidences.begin(); it != mAddedIncidences.end(); ++it ) {
changes.append( it.key() );
}
@@ -547,9 +547,9 @@ void ResourceCached::clearChange( Incidence *incidence )
clearChange( incidence->uid() );
}
-void ResourceCached::clearChange( const QString &uid )
+void ResourceCached::clearChange( const TQString &uid )
{
- QMap<Incidence*, bool>::Iterator it;
+ TQMap<Incidence*, bool>::Iterator it;
for ( it = mAddedIncidences.begin(); it != mAddedIncidences.end(); ++it )
if ( it.key()->uid() == uid ) {
@@ -623,7 +623,7 @@ bool ResourceCached::checkForSave()
return true;
}
-void ResourceCached::addInfoText( QString &txt ) const
+void ResourceCached::addInfoText( TQString &txt ) const
{
if ( mLastLoad.isValid() ) {
txt += "<br>";
diff --git a/libkcal/resourcecached.h b/libkcal/resourcecached.h
index bd997da53..efda5a232 100644
--- a/libkcal/resourcecached.h
+++ b/libkcal/resourcecached.h
@@ -29,10 +29,10 @@
#include <kconfig.h>
-#include <qptrlist.h>
-#include <qstring.h>
-#include <qdatetime.h>
-#include <qtimer.h>
+#include <tqptrlist.h>
+#include <tqstring.h>
+#include <tqdatetime.h>
+#include <tqtimer.h>
#include <kdepimmacros.h>
@@ -123,12 +123,12 @@ class KDE_EXPORT ResourceCached : public ResourceCalendar,
/**
Return time of last load.
*/
- QDateTime lastLoad() const;
+ TQDateTime lastLoad() const;
/**
Return time of last save.
*/
- QDateTime lastSave() const;
+ TQDateTime lastSave() const;
/**
Add event to calendar.
@@ -142,7 +142,7 @@ class KDE_EXPORT ResourceCached : public ResourceCalendar,
/**
Retrieves an event on the basis of the unique string ID.
*/
- Event *event(const QString &UniqueStr);
+ Event *event(const TQString &UniqueStr);
/**
Return filtered list of all events in calendar.
*/
@@ -155,17 +155,17 @@ class KDE_EXPORT ResourceCached : public ResourceCalendar,
Builds and then returns a list of all events that match for the
date specified. useful for dayView, etc. etc.
*/
- Event::List rawEventsForDate( const QDate &date, EventSortField sortField = EventSortUnsorted, SortDirection sortDirection = SortDirectionAscending );
+ Event::List rawEventsForDate( const TQDate &date, EventSortField sortField = EventSortUnsorted, SortDirection sortDirection = SortDirectionAscending );
/**
Get unfiltered events for date \a qdt.
*/
- Event::List rawEventsForDate( const QDateTime &qdt );
+ Event::List rawEventsForDate( const TQDateTime &qdt );
/**
Get unfiltered events in a range of dates. If inclusive is set to true,
only events are returned, which are completely included in the range.
*/
- Event::List rawEvents( const QDate &start, const QDate &end,
+ Event::List rawEvents( const TQDate &start, const TQDate &end,
bool inclusive = false );
/**
@@ -180,7 +180,7 @@ class KDE_EXPORT ResourceCached : public ResourceCalendar,
Searches todolist for an event with this unique string identifier,
returns a pointer or null.
*/
- Todo *todo( const QString &uid );
+ Todo *todo( const TQString &uid );
/**
Return list of all todos.
*/
@@ -188,7 +188,7 @@ class KDE_EXPORT ResourceCached : public ResourceCalendar,
/**
Returns list of todos due on the specified date.
*/
- Todo::List rawTodosForDate( const QDate &date );
+ Todo::List rawTodosForDate( const TQDate &date );
/**
Add a Journal entry to calendar
*/
@@ -200,7 +200,7 @@ class KDE_EXPORT ResourceCached : public ResourceCalendar,
/**
Return Journal with given unique id.
*/
- virtual Journal *journal( const QString &uid );
+ virtual Journal *journal( const TQString &uid );
/**
Return list of all journals.
*/
@@ -208,24 +208,24 @@ class KDE_EXPORT ResourceCached : public ResourceCalendar,
/**
Return list of journals for the given date.
*/
- Journal::List rawJournalsForDate( const QDate &date );
+ Journal::List rawJournalsForDate( const TQDate &date );
/**
Return all alarms, which ocur in the given time interval.
*/
- Alarm::List alarms( const QDateTime &from, const QDateTime &to );
+ Alarm::List alarms( const TQDateTime &from, const TQDateTime &to );
/**
Return all alarms, which ocur before given date.
*/
- Alarm::List alarmsTo( const QDateTime &to );
+ Alarm::List alarmsTo( const TQDateTime &to );
/**
Set id of timezone, e.g. "Europe/Berlin"
*/
- void setTimeZoneId( const QString &timeZoneId );
+ void setTimeZoneId( const TQString &timeZoneId );
- QString timeZoneId() const;
+ TQString timeZoneId() const;
/**
Return the owner of the calendar's full name.
@@ -240,7 +240,7 @@ class KDE_EXPORT ResourceCached : public ResourceCalendar,
void disableChangeNotification();
void clearChange( Incidence * );
- void clearChange( const QString &uid );
+ void clearChange( const TQString &uid );
void clearChanges();
@@ -304,7 +304,7 @@ class KDE_EXPORT ResourceCached : public ResourceCalendar,
void checkForAutomaticSave();
- void addInfoText( QString & ) const;
+ void addInfoText( TQString & ) const;
void setupSaveTimer();
void setupReloadTimer();
@@ -313,15 +313,15 @@ class KDE_EXPORT ResourceCached : public ResourceCalendar,
This method is used by loadCache() and saveCache(), reimplement
it to change the location of the cache.
*/
- virtual QString cacheFile() const;
+ virtual TQString cacheFile() const;
/**
Functions for keeping the changes persistent.
*/
- virtual QString changesCacheFile( const QString& ) const;
- void loadChangesCache( QMap<Incidence*, bool>&, const QString& );
+ virtual TQString changesCacheFile( const TQString& ) const;
+ void loadChangesCache( TQMap<Incidence*, bool>&, const TQString& );
void loadChangesCache();
- void saveChangesCache( const QMap<Incidence*, bool>&, const QString& );
+ void saveChangesCache( const TQMap<Incidence*, bool>&, const TQString& );
void saveChangesCache();
protected slots:
@@ -333,19 +333,19 @@ class KDE_EXPORT ResourceCached : public ResourceCalendar,
private:
int mReloadPolicy;
int mReloadInterval;
- QTimer mReloadTimer;
+ TQTimer mReloadTimer;
bool mReloaded;
int mSavePolicy;
int mSaveInterval;
- QTimer mSaveTimer;
+ TQTimer mSaveTimer;
- QDateTime mLastLoad;
- QDateTime mLastSave;
+ TQDateTime mLastLoad;
+ TQDateTime mLastSave;
- QMap<KCal::Incidence *,bool> mAddedIncidences;
- QMap<KCal::Incidence *,bool> mChangedIncidences;
- QMap<KCal::Incidence *,bool> mDeletedIncidences;
+ TQMap<KCal::Incidence *,bool> mAddedIncidences;
+ TQMap<KCal::Incidence *,bool> mChangedIncidences;
+ TQMap<KCal::Incidence *,bool> mDeletedIncidences;
KPIM::IdMapper mIdMapper;
diff --git a/libkcal/resourcecachedconfig.cpp b/libkcal/resourcecachedconfig.cpp
index 4e701db3b..c1793c26a 100644
--- a/libkcal/resourcecachedconfig.cpp
+++ b/libkcal/resourcecachedconfig.cpp
@@ -19,12 +19,12 @@
Boston, MA 02110-1301, USA.
*/
-#include <qbuttongroup.h>
-#include <qlayout.h>
-#include <qradiobutton.h>
-#include <qspinbox.h>
-#include <qhbox.h>
-#include <qlabel.h>
+#include <tqbuttongroup.h>
+#include <tqlayout.h>
+#include <tqradiobutton.h>
+#include <tqspinbox.h>
+#include <tqhbox.h>
+#include <tqlabel.h>
#include <klocale.h>
#include <kdebug.h>
@@ -35,24 +35,24 @@
using namespace KCal;
-ResourceCachedReloadConfig::ResourceCachedReloadConfig( QWidget *parent,
+ResourceCachedReloadConfig::ResourceCachedReloadConfig( TQWidget *parent,
const char *name )
- : QWidget( parent, name )
+ : TQWidget( parent, name )
{
- QBoxLayout *topLayout = new QVBoxLayout( this );
+ TQBoxLayout *topLayout = new TQVBoxLayout( this );
- mGroup = new QButtonGroup( 1, Horizontal, i18n("Automatic Reload"), this );
+ mGroup = new TQButtonGroup( 1, Horizontal, i18n("Automatic Reload"), this );
topLayout->addWidget( mGroup );
- new QRadioButton( i18n("Never"), mGroup );
- new QRadioButton( i18n("On startup"), mGroup );
+ new TQRadioButton( i18n("Never"), mGroup );
+ new TQRadioButton( i18n("On startup"), mGroup );
- QRadioButton *intervalRadio = new QRadioButton( i18n("Regular interval"),
+ TQRadioButton *intervalRadio = new TQRadioButton( i18n("Regular interval"),
mGroup );
- connect( intervalRadio, SIGNAL( stateChanged( int ) ),
- SLOT( slotIntervalStateChanged( int ) ) );
- QHBox *intervalBox = new QHBox( mGroup );
- new QLabel( i18n("Interval in minutes"), intervalBox );
- mIntervalSpin = new QSpinBox( 1,900, 1,intervalBox );
+ connect( intervalRadio, TQT_SIGNAL( stateChanged( int ) ),
+ TQT_SLOT( slotIntervalStateChanged( int ) ) );
+ TQHBox *intervalBox = new TQHBox( mGroup );
+ new TQLabel( i18n("Interval in minutes"), intervalBox );
+ mIntervalSpin = new TQSpinBox( 1,900, 1,intervalBox );
mIntervalSpin->setEnabled( false );
}
@@ -70,33 +70,33 @@ void ResourceCachedReloadConfig::saveSettings( ResourceCached *resource )
void ResourceCachedReloadConfig::slotIntervalStateChanged( int state )
{
- if ( state == QButton::On ) mIntervalSpin->setEnabled( true );
+ if ( state == TQButton::On ) mIntervalSpin->setEnabled( true );
else mIntervalSpin->setEnabled( false );
}
-ResourceCachedSaveConfig::ResourceCachedSaveConfig( QWidget *parent,
+ResourceCachedSaveConfig::ResourceCachedSaveConfig( TQWidget *parent,
const char *name )
- : QWidget( parent, name )
+ : TQWidget( parent, name )
{
- QBoxLayout *topLayout = new QVBoxLayout( this );
+ TQBoxLayout *topLayout = new TQVBoxLayout( this );
- mGroup = new QButtonGroup( 1, Horizontal, i18n("Automatic Save"), this );
+ mGroup = new TQButtonGroup( 1, Horizontal, i18n("Automatic Save"), this );
topLayout->addWidget( mGroup );
- new QRadioButton( i18n("Never"), mGroup );
- new QRadioButton( i18n("On exit"), mGroup );
+ new TQRadioButton( i18n("Never"), mGroup );
+ new TQRadioButton( i18n("On exit"), mGroup );
- QRadioButton *intervalRadio = new QRadioButton( i18n("Regular interval"),
+ TQRadioButton *intervalRadio = new TQRadioButton( i18n("Regular interval"),
mGroup );
- connect( intervalRadio, SIGNAL( stateChanged( int ) ),
- SLOT( slotIntervalStateChanged( int ) ) );
- QHBox *intervalBox = new QHBox( mGroup );
- new QLabel( i18n("Interval in minutes"), intervalBox );
- mIntervalSpin = new QSpinBox( 1,900, 1,intervalBox );
+ connect( intervalRadio, TQT_SIGNAL( stateChanged( int ) ),
+ TQT_SLOT( slotIntervalStateChanged( int ) ) );
+ TQHBox *intervalBox = new TQHBox( mGroup );
+ new TQLabel( i18n("Interval in minutes"), intervalBox );
+ mIntervalSpin = new TQSpinBox( 1,900, 1,intervalBox );
mIntervalSpin->setEnabled( false );
- new QRadioButton( i18n("Delayed after changes"), mGroup );
- new QRadioButton( i18n("On every change"), mGroup );
+ new TQRadioButton( i18n("Delayed after changes"), mGroup );
+ new TQRadioButton( i18n("On every change"), mGroup );
}
void ResourceCachedSaveConfig::loadSettings( ResourceCached *resource )
@@ -113,7 +113,7 @@ void ResourceCachedSaveConfig::saveSettings( ResourceCached *resource )
void ResourceCachedSaveConfig::slotIntervalStateChanged( int state )
{
- if ( state == QButton::On ) mIntervalSpin->setEnabled( true );
+ if ( state == TQButton::On ) mIntervalSpin->setEnabled( true );
else mIntervalSpin->setEnabled( false );
}
diff --git a/libkcal/resourcecachedconfig.h b/libkcal/resourcecachedconfig.h
index 3eb05e054..5a227fe5e 100644
--- a/libkcal/resourcecachedconfig.h
+++ b/libkcal/resourcecachedconfig.h
@@ -21,7 +21,7 @@
#ifndef KCAL_RESOURCECACHEDCONFIG_H
#define KCAL_RESOURCECACHEDCONFIG_H
-#include <qwidget.h>
+#include <tqwidget.h>
#include <kdepimmacros.h>
class QButtonGroup;
@@ -40,7 +40,7 @@ class KDE_EXPORT ResourceCachedReloadConfig : public QWidget
{
Q_OBJECT
public:
- ResourceCachedReloadConfig( QWidget *parent = 0, const char *name = 0 );
+ ResourceCachedReloadConfig( TQWidget *parent = 0, const char *name = 0 );
public slots:
void loadSettings( ResourceCached *resource );
@@ -50,8 +50,8 @@ class KDE_EXPORT ResourceCachedReloadConfig : public QWidget
void slotIntervalStateChanged( int );
private:
- QButtonGroup *mGroup;
- QSpinBox *mIntervalSpin;
+ TQButtonGroup *mGroup;
+ TQSpinBox *mIntervalSpin;
class Private;
Private *d;
@@ -66,7 +66,7 @@ class KDE_EXPORT ResourceCachedSaveConfig : public QWidget
{
Q_OBJECT
public:
- ResourceCachedSaveConfig( QWidget *parent = 0, const char *name = 0 );
+ ResourceCachedSaveConfig( TQWidget *parent = 0, const char *name = 0 );
public slots:
void loadSettings( ResourceCached *resource );
@@ -76,8 +76,8 @@ class KDE_EXPORT ResourceCachedSaveConfig : public QWidget
void slotIntervalStateChanged( int );
private:
- QButtonGroup *mGroup;
- QSpinBox *mIntervalSpin;
+ TQButtonGroup *mGroup;
+ TQSpinBox *mIntervalSpin;
class Private;
Private *d;
diff --git a/libkcal/resourcecalendar.cpp b/libkcal/resourcecalendar.cpp
index 0b994a262..c008f0308 100644
--- a/libkcal/resourcecalendar.cpp
+++ b/libkcal/resourcecalendar.cpp
@@ -45,15 +45,15 @@ void ResourceCalendar::setResolveConflict( bool b)
{
mResolveConflict = b;
}
-QString ResourceCalendar::infoText() const
+TQString ResourceCalendar::infoText() const
{
- QString txt;
+ TQString txt;
txt += "<b>" + resourceName() + "</b>";
txt += "<br>";
KRES::Factory *factory = KRES::Factory::self( "calendar" );
- QString t = factory->typeName( type() );
+ TQString t = factory->typeName( type() );
txt += i18n("Type: %1").arg( t );
addInfoText( txt );
@@ -68,7 +68,7 @@ void ResourceCalendar::writeConfig( KConfig* config )
KRES::Resource::writeConfig( config );
}
-Incidence *ResourceCalendar::incidence( const QString &uid )
+Incidence *ResourceCalendar::incidence( const TQString &uid )
{
Incidence *i = event( uid );
if ( i ) return i;
@@ -95,16 +95,16 @@ Incidence::List ResourceCalendar::rawIncidences()
return Calendar::mergeIncidenceList( rawEvents(), rawTodos(), rawJournals() );
}
-void ResourceCalendar::setSubresourceActive( const QString &, bool )
+void ResourceCalendar::setSubresourceActive( const TQString &, bool )
{
}
-bool ResourceCalendar::addSubresource( const QString &, const QString & )
+bool ResourceCalendar::addSubresource( const TQString &, const TQString & )
{
return true;
}
-bool ResourceCalendar::removeSubresource( const QString & )
+bool ResourceCalendar::removeSubresource( const TQString & )
{
return true;
}
@@ -140,13 +140,13 @@ bool ResourceCalendar::load()
return success;
}
-void ResourceCalendar::loadError( const QString &err )
+void ResourceCalendar::loadError( const TQString &err )
{
kdDebug(5800) << "Error loading resource: " << err << endl;
mReceivedLoadError = true;
- QString msg = i18n("Error while loading %1.\n") .arg( resourceName() );
+ TQString msg = i18n("Error while loading %1.\n") .arg( resourceName() );
if ( !err.isEmpty() ) {
msg += err;
}
@@ -177,28 +177,28 @@ bool ResourceCalendar::doSave( Incidence * )
return doSave();
}
-void ResourceCalendar::saveError( const QString &err )
+void ResourceCalendar::saveError( const TQString &err )
{
kdDebug(5800) << "Error saving resource: " << err << endl;
mReceivedSaveError = true;
- QString msg = i18n("Error while saving %1.\n") .arg( resourceName() );
+ TQString msg = i18n("Error while saving %1.\n") .arg( resourceName() );
if ( !err.isEmpty() ) {
msg += err;
}
emit resourceSaveError( this, msg );
}
-bool ResourceCalendar::setValue( const QString &key, const QString &value )
+bool ResourceCalendar::setValue( const TQString &key, const TQString &value )
{
return false;
}
-QString ResourceCalendar::subresourceType( const QString &resource )
+TQString ResourceCalendar::subresourceType( const TQString &resource )
{
Q_UNUSED( resource );
- return QString();
+ return TQString();
}
diff --git a/libkcal/resourcecalendar.h b/libkcal/resourcecalendar.h
index 4cd4d91e7..3fea84a1b 100644
--- a/libkcal/resourcecalendar.h
+++ b/libkcal/resourcecalendar.h
@@ -25,9 +25,9 @@
#ifndef KCAL_RESOURCECALENDAR_H
#define KCAL_RESOURCECALENDAR_H
-#include <qstring.h>
-#include <qdatetime.h>
-#include <qptrlist.h>
+#include <tqstring.h>
+#include <tqdatetime.h>
+#include <tqptrlist.h>
#include <kconfig.h>
@@ -68,7 +68,7 @@ class LIBKCAL_EXPORT ResourceCalendar : public KRES::Resource
Return rich text with info about the resource. Adds standard info and
then calls addInfoText() to add info about concrete resources.
*/
- virtual QString infoText() const;
+ virtual TQString infoText() const;
/**
Load resource data. After calling this function all data is accessible by
@@ -135,7 +135,7 @@ class LIBKCAL_EXPORT ResourceCalendar : public KRES::Resource
Return incidence with given unique id. If there is no incidence with that
uid, return 0.
*/
- Incidence *incidence( const QString &uid );
+ Incidence *incidence( const TQString &uid );
/**
Add event to resource.
@@ -150,7 +150,7 @@ class LIBKCAL_EXPORT ResourceCalendar : public KRES::Resource
/**
Retrieves an event on the basis of the unique string ID.
*/
- virtual Event *event( const QString &uid ) = 0;
+ virtual Event *event( const TQString &uid ) = 0;
/**
Return unfiltered list of all events in calendar. Use with care,
@@ -162,18 +162,18 @@ class LIBKCAL_EXPORT ResourceCalendar : public KRES::Resource
Builds and then returns a list of all events that match the
date specified. Useful for dayView, etc. etc.
*/
- virtual Event::List rawEventsForDate( const QDate &date, EventSortField sortField = EventSortUnsorted, SortDirection sortDirection = SortDirectionAscending ) = 0;
+ virtual Event::List rawEventsForDate( const TQDate &date, EventSortField sortField = EventSortUnsorted, SortDirection sortDirection = SortDirectionAscending ) = 0;
/**
Get unfiltered events for date \a qdt.
*/
- virtual Event::List rawEventsForDate( const QDateTime &qdt ) = 0;
+ virtual Event::List rawEventsForDate( const TQDateTime &qdt ) = 0;
/**
Get unfiltered events in a range of dates. If inclusive is set to true,
only events which are completely included in the range are returned.
*/
- virtual Event::List rawEvents( const QDate &start, const QDate &end,
+ virtual Event::List rawEvents( const TQDate &start, const TQDate &end,
bool inclusive = false ) = 0;
/**
@@ -195,7 +195,7 @@ class LIBKCAL_EXPORT ResourceCalendar : public KRES::Resource
manager->add( res );
}
*/
- virtual bool setValue( const QString &key, const QString &value );
+ virtual bool setValue( const TQString &key, const TQString &value );
signals:
/**
@@ -220,23 +220,23 @@ class LIBKCAL_EXPORT ResourceCalendar : public KRES::Resource
/**
This signal is emitted when an error occurs during loading.
*/
- void resourceLoadError( ResourceCalendar *, const QString &error );
+ void resourceLoadError( ResourceCalendar *, const TQString &error );
/**
This signal is emitted when an error occurs during saving.
*/
- void resourceSaveError( ResourceCalendar *, const QString &error );
+ void resourceSaveError( ResourceCalendar *, const TQString &error );
/**
This signal is emitted when a subresource is added.
*/
- void signalSubresourceAdded( ResourceCalendar *, const QString& type,
- const QString& subresource, const QString& label );
+ void signalSubresourceAdded( ResourceCalendar *, const TQString& type,
+ const TQString& subresource, const TQString& label );
/**
This signal is emitted when a subresource is removed.
*/
- void signalSubresourceRemoved( ResourceCalendar *, const QString &,
- const QString & );
+ void signalSubresourceRemoved( ResourceCalendar *, const TQString &,
+ const TQString & );
public:
/**
@@ -252,7 +252,7 @@ class LIBKCAL_EXPORT ResourceCalendar : public KRES::Resource
@return pointer to todo or 0 if todo wasn't found
*/
- virtual Todo *todo( const QString &uid ) = 0;
+ virtual Todo *todo( const TQString &uid ) = 0;
/**
Return list of all todos.
*/
@@ -260,7 +260,7 @@ class LIBKCAL_EXPORT ResourceCalendar : public KRES::Resource
/**
Returns list of todos due on the specified date.
*/
- virtual Todo::List rawTodosForDate( const QDate &date ) = 0;
+ virtual Todo::List rawTodosForDate( const TQDate &date ) = 0;
/**
@@ -276,7 +276,7 @@ class LIBKCAL_EXPORT ResourceCalendar : public KRES::Resource
/**
Return Journal with given unique id.
*/
- virtual Journal *journal( const QString &uid ) = 0;
+ virtual Journal *journal( const TQString &uid ) = 0;
/**
Return list of all journals.
*/
@@ -284,18 +284,18 @@ class LIBKCAL_EXPORT ResourceCalendar : public KRES::Resource
/**
Returns list of journals for the given date.
*/
- virtual Journal::List rawJournalsForDate( const QDate &date ) = 0;
+ virtual Journal::List rawJournalsForDate( const TQDate &date ) = 0;
/**
Return all alarms which occur in the given time interval.
*/
- virtual Alarm::List alarms( const QDateTime &from,
- const QDateTime &to ) = 0;
+ virtual Alarm::List alarms( const TQDateTime &from,
+ const TQDateTime &to ) = 0;
/**
Return all alarms which occur before given date.
*/
- virtual Alarm::List alarmsTo( const QDateTime &to ) = 0;
+ virtual Alarm::List alarmsTo( const TQDateTime &to ) = 0;
/** Returns a list of all incideces */
@@ -304,14 +304,14 @@ class LIBKCAL_EXPORT ResourceCalendar : public KRES::Resource
/**
Set time zone id used by this resource, e.g. "Europe/Berlin".
*/
- virtual void setTimeZoneId( const QString &timeZoneId ) = 0;
+ virtual void setTimeZoneId( const TQString &timeZoneId ) = 0;
/**
- If this resource has subresources, return a QStringList of them.
+ If this resource has subresources, return a TQStringList of them.
In most cases, resources do not have subresources, so this is
by default just empty.
*/
- virtual QStringList subresources() const { return QStringList(); }
+ virtual TQStringList subresources() const { return TQStringList(); }
/**
Is this subresource capable of having subresources or not?
@@ -321,12 +321,12 @@ class LIBKCAL_EXPORT ResourceCalendar : public KRES::Resource
/**
Is this subresource active or not?
*/
- virtual bool subresourceActive( const QString& ) const { return true; }
+ virtual bool subresourceActive( const TQString& ) const { return true; }
/**
What is the label for this subresource?
*/
- virtual const QString labelForSubresource( const QString& resource ) const
+ virtual const TQString labelForSubresource( const TQString& resource ) const
{
// the resource identifier is a sane fallback
return resource;
@@ -338,33 +338,33 @@ class LIBKCAL_EXPORT ResourceCalendar : public KRES::Resource
@return the identifier of the subresource or an empty string.
*/
- virtual QString subresourceIdentifier( Incidence *incidence )
- { Q_UNUSED( incidence ); return QString(); }
+ virtual TQString subresourceIdentifier( Incidence *incidence )
+ { Q_UNUSED( incidence ); return TQString(); }
/**
* Remove a subresource with the id @param resource
*/
- virtual bool removeSubresource( const QString& resource );
+ virtual bool removeSubresource( const TQString& resource );
/**
* Add a subresource with the name @param resource and the parent
* id @param parent.
*/
- virtual bool addSubresource( const QString& resource, const QString& parent );
+ virtual bool addSubresource( const TQString& resource, const TQString& parent );
/**
* Returns the type of the subresource: "event", "todo" or "journal",
- * QString() if unknown/mixed.
+ * TQString() if unknown/mixed.
*/
- virtual QString subresourceType( const QString &resource );
+ virtual TQString subresourceType( const TQString &resource );
public slots:
/**
(De-)activate a subresource.
*/
- virtual void setSubresourceActive( const QString &, bool active );
+ virtual void setSubresourceActive( const TQString &, bool active );
protected:
@@ -387,16 +387,16 @@ class LIBKCAL_EXPORT ResourceCalendar : public KRES::Resource
/**
Add info text for concrete resources. Called by infoText().
*/
- virtual void addInfoText( QString & ) const {};
+ virtual void addInfoText( TQString & ) const {};
/**
A resource should call this function if a load error happens.
*/
- void loadError( const QString &errorMessage = QString::null );
+ void loadError( const TQString &errorMessage = TQString::null );
/**
A resource should call this function if a save error happens.
*/
- void saveError( const QString &errorMessage = QString::null );
+ void saveError( const TQString &errorMessage = TQString::null );
private:
bool mReceivedLoadError;
diff --git a/libkcal/resourcelocal.cpp b/libkcal/resourcelocal.cpp
index cb61cd1a6..2f10dce4b 100644
--- a/libkcal/resourcelocal.cpp
+++ b/libkcal/resourcelocal.cpp
@@ -23,9 +23,9 @@
#include <typeinfo>
#include <stdlib.h>
-#include <qdatetime.h>
-#include <qstring.h>
-#include <qptrlist.h>
+#include <tqdatetime.h>
+#include <tqstring.h>
+#include <tqptrlist.h>
#include <kdebug.h>
#include <klocale.h>
@@ -53,17 +53,17 @@ using namespace KCal;
class ResourceLocal::Private
{
public:
- QDateTime mLastModified;
+ TQDateTime mLastModified;
};
ResourceLocal::ResourceLocal( const KConfig* config )
: ResourceCached( config ), mLock( 0 )
{
if ( config ) {
- QString url = config->readPathEntry( "CalendarURL" );
+ TQString url = config->readPathEntry( "CalendarURL" );
mURL = KURL( url );
- QString format = config->readEntry( "Format" );
+ TQString format = config->readEntry( "Format" );
if ( format == "ical" )
mFormat = new ICalFormat();
else if ( format == "vcal" )
@@ -78,7 +78,7 @@ ResourceLocal::ResourceLocal( const KConfig* config )
init();
}
-ResourceLocal::ResourceLocal( const QString& fileName )
+ResourceLocal::ResourceLocal( const TQString& fileName )
: ResourceCached( 0 )
{
mURL = KURL( fileName );
@@ -93,7 +93,7 @@ void ResourceLocal::writeConfig( KConfig* config )
ResourceCalendar::writeConfig( config );
config->writePathEntry( "CalendarURL", mURL.prettyURL() );
- QString typeID = typeid( *mFormat ).name();
+ TQString typeID = typeid( *mFormat ).name();
if ( typeid( *mFormat ) == typeid( ICalFormat ) )
config->writeEntry( "Format", "ical" );
@@ -111,12 +111,12 @@ void ResourceLocal::init()
setSavePolicy( SaveDelayed );
- connect( &mDirWatch, SIGNAL( dirty( const QString & ) ),
- SLOT( reload() ) );
- connect( &mDirWatch, SIGNAL( created( const QString & ) ),
- SLOT( reload() ) );
- connect( &mDirWatch, SIGNAL( deleted( const QString & ) ),
- SLOT( reload() ) );
+ connect( &mDirWatch, TQT_SIGNAL( dirty( const TQString & ) ),
+ TQT_SLOT( reload() ) );
+ connect( &mDirWatch, TQT_SIGNAL( created( const TQString & ) ),
+ TQT_SLOT( reload() ) );
+ connect( &mDirWatch, TQT_SIGNAL( deleted( const TQString & ) ),
+ TQT_SLOT( reload() ) );
mLock = new KABC::Lock( mURL.path() );
@@ -136,9 +136,9 @@ ResourceLocal::~ResourceLocal()
delete d;
}
-QDateTime ResourceLocal::readLastModified()
+TQDateTime ResourceLocal::readLastModified()
{
- QFileInfo fi( mURL.path() );
+ TQFileInfo fi( mURL.path() );
return fi.lastModified();
}
@@ -200,12 +200,12 @@ void ResourceLocal::dump() const
kdDebug(5800) << " Url: " << mURL.url() << endl;
}
-QString ResourceLocal::fileName() const
+TQString ResourceLocal::fileName() const
{
return mURL.path();
}
-bool ResourceLocal::setFileName( const QString &fileName )
+bool ResourceLocal::setFileName( const TQString &fileName )
{
bool open = isOpen();
if ( open ) close();
@@ -219,7 +219,7 @@ bool ResourceLocal::setFileName( const QString &fileName )
return true;
}
-bool ResourceLocal::setValue( const QString &key, const QString &value )
+bool ResourceLocal::setValue( const TQString &key, const TQString &value )
{
if ( key == "File" ) {
return setFileName( value );
diff --git a/libkcal/resourcelocal.h b/libkcal/resourcelocal.h
index c5bf9c42f..ce0a112b7 100644
--- a/libkcal/resourcelocal.h
+++ b/libkcal/resourcelocal.h
@@ -22,8 +22,8 @@
#ifndef KCAL_RESOURCELOCAL_H
#define KCAL_RESOURCELOCAL_H
-#include <qstring.h>
-#include <qdatetime.h>
+#include <tqstring.h>
+#include <tqdatetime.h>
#include <kurl.h>
#include <kdirwatch.h>
@@ -56,16 +56,16 @@ class LIBKCAL_EXPORT ResourceLocal : public ResourceCached
/**
Create resource for file named @a fileName.
*/
- ResourceLocal( const QString& fileName );
+ ResourceLocal( const TQString& fileName );
virtual ~ResourceLocal();
virtual void writeConfig( KConfig* config );
KABC::Lock *lock();
- QString fileName() const;
- bool setFileName( const QString &fileName );
- bool setValue( const QString &key, const QString &value );
+ TQString fileName() const;
+ bool setFileName( const TQString &fileName );
+ bool setValue( const TQString &key, const TQString &value );
void dump() const;
@@ -83,7 +83,7 @@ class LIBKCAL_EXPORT ResourceLocal : public ResourceCached
*/
virtual bool doReload();
- QDateTime readLastModified();
+ TQDateTime readLastModified();
private:
void init();
diff --git a/libkcal/resourcelocalconfig.cpp b/libkcal/resourcelocalconfig.cpp
index cfeadf788..49728fe62 100644
--- a/libkcal/resourcelocalconfig.cpp
+++ b/libkcal/resourcelocalconfig.cpp
@@ -22,8 +22,8 @@
#include <typeinfo>
-#include <qlabel.h>
-#include <qlayout.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
#include <klocale.h>
#include <kmessagebox.h>
@@ -40,21 +40,21 @@
using namespace KCal;
-ResourceLocalConfig::ResourceLocalConfig( QWidget* parent, const char* name )
+ResourceLocalConfig::ResourceLocalConfig( TQWidget* parent, const char* name )
: KRES::ConfigWidget( parent, name )
{
resize( 245, 115 );
- 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 );
mURL = new KURLRequester( this );
mainLayout->addWidget( label, 1, 0 );
mainLayout->addWidget( mURL, 1, 1 );
- formatGroup = new QButtonGroup( 1, Horizontal, i18n( "Calendar Format" ), this );
+ formatGroup = new TQButtonGroup( 1, Horizontal, i18n( "Calendar Format" ), this );
- icalButton = new QRadioButton( i18n("iCalendar"), formatGroup );
- vcalButton = new QRadioButton( i18n("vCalendar"), formatGroup );
+ icalButton = new TQRadioButton( i18n("iCalendar"), formatGroup );
+ vcalButton = new TQRadioButton( i18n("vCalendar"), formatGroup );
mainLayout->addWidget( formatGroup, 2, 1 );
}
@@ -77,16 +77,16 @@ void ResourceLocalConfig::loadSettings( KRES::Resource *resource )
void ResourceLocalConfig::saveSettings( KRES::Resource *resource )
{
- QString url = mURL->url();
+ TQString url = mURL->url();
if( url.isEmpty() ) {
KStandardDirs dirs;
- QString saveFolder = dirs.saveLocation( "data", "korganizer" );
- QFile file( saveFolder + "/std.ics" );
+ TQString saveFolder = dirs.saveLocation( "data", "korganizer" );
+ TQFile file( saveFolder + "/std.ics" );
// find a non-existent name
for( int i = 0; file.exists(); ++i )
- file.setName( saveFolder + "/std" + QString::number(i) + ".ics" );
+ file.setName( saveFolder + "/std" + TQString::number(i) + ".ics" );
KMessageBox::information( this, i18n( "You did not specify a URL for this resource. Therefore, the resource will be saved in %1. It is still possible to change this location by editing the resource properties." ).arg( file.name() ) );
diff --git a/libkcal/resourcelocalconfig.h b/libkcal/resourcelocalconfig.h
index 4752b1310..796355bce 100644
--- a/libkcal/resourcelocalconfig.h
+++ b/libkcal/resourcelocalconfig.h
@@ -22,8 +22,8 @@
#ifndef KCAL_RESOURCELOCALCONFIG_H
#define KCAL_RESOURCELOCALCONFIG_H
-#include <qradiobutton.h>
-#include <qbuttongroup.h>
+#include <tqradiobutton.h>
+#include <tqbuttongroup.h>
#include <kurlrequester.h>
#include <kresources/resource.h>
@@ -43,7 +43,7 @@ class LIBKCAL_EXPORT ResourceLocalConfig : public KRES::ConfigWidget
{
Q_OBJECT
public:
- ResourceLocalConfig( QWidget* parent = 0, const char* name = 0 );
+ ResourceLocalConfig( TQWidget* parent = 0, const char* name = 0 );
public slots:
virtual void loadSettings( KRES::Resource *resource);
@@ -51,9 +51,9 @@ class LIBKCAL_EXPORT ResourceLocalConfig : public KRES::ConfigWidget
private:
KURLRequester *mURL;
- QButtonGroup *formatGroup;
- QRadioButton *icalButton;
- QRadioButton *vcalButton;
+ TQButtonGroup *formatGroup;
+ TQRadioButton *icalButton;
+ TQRadioButton *vcalButton;
class Private;
Private *d;
diff --git a/libkcal/resourcelocaldir.cpp b/libkcal/resourcelocaldir.cpp
index 5e6528e8d..1d5c9caa8 100644
--- a/libkcal/resourcelocaldir.cpp
+++ b/libkcal/resourcelocaldir.cpp
@@ -22,10 +22,10 @@
#include <typeinfo>
#include <stdlib.h>
-#include <qdatetime.h>
-#include <qfileinfo.h>
-#include <qstring.h>
-#include <qptrlist.h>
+#include <tqdatetime.h>
+#include <tqfileinfo.h>
+#include <tqstring.h>
+#include <tqptrlist.h>
#include <kdebug.h>
#include <klocale.h>
@@ -62,7 +62,7 @@ ResourceLocalDir::ResourceLocalDir( const KConfig* config )
init();
}
-ResourceLocalDir::ResourceLocalDir( const QString& dirName )
+ResourceLocalDir::ResourceLocalDir( const TQString& dirName )
: ResourceCached( 0 )
{
mURL = KURL( dirName );
@@ -73,7 +73,7 @@ ResourceLocalDir::ResourceLocalDir( const QString& dirName )
void ResourceLocalDir::readConfig( const KConfig *config )
{
- QString url = config->readPathEntry( "CalendarURL" );
+ TQString url = config->readPathEntry( "CalendarURL" );
mURL = KURL( url );
}
@@ -92,12 +92,12 @@ void ResourceLocalDir::init()
setSavePolicy( SaveDelayed );
- connect( &mDirWatch, SIGNAL( dirty( const QString & ) ),
- SLOT( reload( const QString & ) ) );
- connect( &mDirWatch, SIGNAL( created( const QString & ) ),
- SLOT( reload( const QString & ) ) );
- connect( &mDirWatch, SIGNAL( deleted( const QString & ) ),
- SLOT( reload( const QString & ) ) );
+ connect( &mDirWatch, TQT_SIGNAL( dirty( const TQString & ) ),
+ TQT_SLOT( reload( const TQString & ) ) );
+ connect( &mDirWatch, TQT_SIGNAL( created( const TQString & ) ),
+ TQT_SLOT( reload( const TQString & ) ) );
+ connect( &mDirWatch, TQT_SIGNAL( deleted( const TQString & ) ),
+ TQT_SLOT( reload( const TQString & ) ) );
mLock = new KABC::Lock( mURL.path() );
@@ -115,7 +115,7 @@ ResourceLocalDir::~ResourceLocalDir()
bool ResourceLocalDir::doOpen()
{
- QFileInfo dirInfo( mURL.path() );
+ TQFileInfo dirInfo( mURL.path() );
return dirInfo.isDir() && dirInfo.isReadable() &&
( dirInfo.isWritable() || readOnly() );
}
@@ -125,7 +125,7 @@ bool ResourceLocalDir::doLoad()
kdDebug(5800) << "ResourceLocalDir::load()" << endl;
mCalendar.close();
- QString dirName = mURL.path();
+ TQString dirName = mURL.path();
if ( !( KStandardDirs::exists( dirName ) || KStandardDirs::exists( dirName + "/") ) ) {
kdDebug(5800) << "ResourceLocalDir::load(): Directory '" << dirName
@@ -138,21 +138,21 @@ bool ResourceLocalDir::doLoad()
// The directory exists. Now try to open (the files in) it.
kdDebug(5800) << "ResourceLocalDir::load(): '" << dirName << "'" << endl;
- QFileInfo dirInfo( dirName );
+ TQFileInfo dirInfo( dirName );
if ( !( dirInfo.isDir() && dirInfo.isReadable() &&
( dirInfo.isWritable() || readOnly() ) ) )
return false;
- QDir dir( dirName );
- QStringList entries = dir.entryList( QDir::Files | QDir::Readable );
+ TQDir dir( dirName );
+ TQStringList entries = dir.entryList( TQDir::Files | TQDir::Readable );
bool success = true;
- QStringList::ConstIterator it;
+ TQStringList::ConstIterator it;
for( it = entries.constBegin(); it != entries.constEnd(); ++it ) {
if ( (*it).endsWith( "~" ) ) // is backup file, ignore it
continue;
- QString fileName = dirName + "/" + *it;
+ TQString fileName = dirName + "/" + *it;
kdDebug(5800) << " read '" << fileName << "'" << endl;
CalendarLocal cal( mCalendar.timeZoneId() );
if ( !doFileLoad( cal, fileName ) ) {
@@ -163,7 +163,7 @@ bool ResourceLocalDir::doLoad()
return success;
}
-bool ResourceLocalDir::doFileLoad( CalendarLocal &cal, const QString &fileName )
+bool ResourceLocalDir::doFileLoad( CalendarLocal &cal, const TQString &fileName )
{
if ( !cal.load( fileName ) )
return false;
@@ -195,7 +195,7 @@ bool ResourceLocalDir::doSave( Incidence *incidence )
{
mDirWatch.stopScan(); // do prohibit the dirty() signal and a following reload()
- QString fileName = mURL.path() + "/" + incidence->uid();
+ TQString fileName = mURL.path() + "/" + incidence->uid();
kdDebug(5800) << "writing '" << fileName << "'" << endl;
CalendarLocal cal( mCalendar.timeZoneId() );
@@ -212,7 +212,7 @@ KABC::Lock *ResourceLocalDir::lock()
return mLock;
}
-void ResourceLocalDir::reload( const QString &file )
+void ResourceLocalDir::reload( const TQString &file )
{
kdDebug(5800) << "ResourceLocalDir::reload()" << endl;
@@ -264,7 +264,7 @@ void ResourceLocalDir::dump() const
bool ResourceLocalDir::deleteIncidenceFile(Incidence *incidence)
{
- QFile file( mURL.path() + "/" + incidence->uid() );
+ TQFile file( mURL.path() + "/" + incidence->uid() );
if ( !file.exists() )
return true;
diff --git a/libkcal/resourcelocaldir.h b/libkcal/resourcelocaldir.h
index da498a8a1..4b9014bbb 100644
--- a/libkcal/resourcelocaldir.h
+++ b/libkcal/resourcelocaldir.h
@@ -50,7 +50,7 @@ class LIBKCAL_EXPORT ResourceLocalDir : public ResourceCached
public:
ResourceLocalDir( const KConfig * );
- ResourceLocalDir( const QString& fileName );
+ ResourceLocalDir( const TQString& fileName );
virtual ~ResourceLocalDir();
void readConfig( const KConfig *config );
@@ -74,14 +74,14 @@ class LIBKCAL_EXPORT ResourceLocalDir : public ResourceCached
void dump() const;
protected slots:
- void reload( const QString & );
+ void reload( const TQString & );
protected:
virtual bool doOpen();
virtual bool doLoad();
virtual bool doSave();
bool doSave( Incidence * );
- virtual bool doFileLoad( CalendarLocal &, const QString &fileName );
+ virtual bool doFileLoad( CalendarLocal &, const TQString &fileName );
private:
void init();
diff --git a/libkcal/resourcelocaldirconfig.cpp b/libkcal/resourcelocaldirconfig.cpp
index 5d0444540..2c8d89838 100644
--- a/libkcal/resourcelocaldirconfig.cpp
+++ b/libkcal/resourcelocaldirconfig.cpp
@@ -21,8 +21,8 @@
#include <typeinfo>
-#include <qlabel.h>
-#include <qlayout.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
#include <klocale.h>
#include <kdebug.h>
@@ -38,13 +38,13 @@
using namespace KCal;
-ResourceLocalDirConfig::ResourceLocalDirConfig( QWidget* parent, const char* name )
+ResourceLocalDirConfig::ResourceLocalDirConfig( TQWidget* parent, const char* name )
: KRES::ConfigWidget( parent, name )
{
resize( 245, 115 );
- 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 );
mURL = new KURLRequester( this );
mURL->setMode( KFile::Directory | KFile::LocalOnly );
mainLayout->addWidget( label, 1, 0 );
diff --git a/libkcal/resourcelocaldirconfig.h b/libkcal/resourcelocaldirconfig.h
index 3c88a9d92..5588d36ea 100644
--- a/libkcal/resourcelocaldirconfig.h
+++ b/libkcal/resourcelocaldirconfig.h
@@ -23,8 +23,8 @@
#ifndef KCAL_RESOURCELOCALDIRCONFIG_H
#define KCAL_RESOURCELOCALDIRCONFIG_H
-#include <qradiobutton.h>
-#include <qbuttongroup.h>
+#include <tqradiobutton.h>
+#include <tqbuttongroup.h>
#include <kurlrequester.h>
#include <kresources/resource.h>
@@ -45,7 +45,7 @@ class LIBKCAL_EXPORT ResourceLocalDirConfig : public KRES::ConfigWidget
{
Q_OBJECT
public:
- ResourceLocalDirConfig( QWidget *parent = 0, const char *name = 0 );
+ ResourceLocalDirConfig( TQWidget *parent = 0, const char *name = 0 );
public slots:
virtual void loadSettings( KRES::Resource *resource);
@@ -53,9 +53,9 @@ class LIBKCAL_EXPORT ResourceLocalDirConfig : public KRES::ConfigWidget
private:
KURLRequester *mURL;
- QButtonGroup *formatGroup;
- QRadioButton *icalButton;
- QRadioButton *vcalButton;
+ TQButtonGroup *formatGroup;
+ TQRadioButton *icalButton;
+ TQRadioButton *vcalButton;
class Private;
Private *d;
diff --git a/libkcal/scheduler.cpp b/libkcal/scheduler.cpp
index 5a29ad8c8..802c977f6 100644
--- a/libkcal/scheduler.cpp
+++ b/libkcal/scheduler.cpp
@@ -43,7 +43,7 @@ ScheduleMessage::ScheduleMessage(IncidenceBase *incidence,int method,ScheduleMes
mStatus = status;
}
-QString ScheduleMessage::statusName(ScheduleMessage::Status status)
+TQString ScheduleMessage::statusName(ScheduleMessage::Status status)
{
switch (status) {
case PublishUpdate:
@@ -57,7 +57,7 @@ QString ScheduleMessage::statusName(ScheduleMessage::Status status)
case RequestUpdate:
return i18n("Updated Request");
default:
- return i18n("Unknown Status: %1").arg(QString::number(status));
+ return i18n("Unknown Status: %1").arg(TQString::number(status));
}
}
@@ -123,31 +123,31 @@ bool Scheduler::acceptTransaction(IncidenceBase *incidence,Method method,Schedul
return false;
}
-QString Scheduler::methodName(Method method)
+TQString Scheduler::methodName(Method method)
{
switch (method) {
case Publish:
- return QString::fromLatin1("Publish");
+ return TQString::fromLatin1("Publish");
case Request:
- return QString::fromLatin1("Request");
+ return TQString::fromLatin1("Request");
case Refresh:
- return QString::fromLatin1("Refresh");
+ return TQString::fromLatin1("Refresh");
case Cancel:
- return QString::fromLatin1("Cancel");
+ return TQString::fromLatin1("Cancel");
case Add:
- return QString::fromLatin1("Add");
+ return TQString::fromLatin1("Add");
case Reply:
- return QString::fromLatin1("Reply");
+ return TQString::fromLatin1("Reply");
case Counter:
- return QString::fromLatin1("Counter");
+ return TQString::fromLatin1("Counter");
case Declinecounter:
- return QString::fromLatin1("Decline Counter");
+ return TQString::fromLatin1("Decline Counter");
default:
- return QString::fromLatin1("Unknown");
+ return TQString::fromLatin1("Unknown");
}
}
-QString Scheduler::translatedMethodName(Method method)
+TQString Scheduler::translatedMethodName(Method method)
{
switch (method) {
case Publish:
@@ -338,7 +338,7 @@ bool Scheduler::acceptReply(IncidenceBase *incidence,ScheduleMessage::Status /*
bool attendeeAdded = false;
for ( Attendee::List::ConstIterator it = attendeesNew.constBegin(); it != attendeesNew.constEnd(); ++it ) {
Attendee* attNew = *it;
- QString msg = i18n("%1 wants to attend %2 but was not invited.").arg( attNew->fullName() )
+ TQString msg = i18n("%1 wants to attend %2 but was not invited.").arg( attNew->fullName() )
.arg( ev ? ev->summary() : to->summary() );
if ( !attNew->delegator().isEmpty() )
msg = i18n("%1 wants to attend %2 on behalf of %3.").arg( attNew->fullName() )
diff --git a/libkcal/scheduler.h b/libkcal/scheduler.h
index 0aa4b366a..17e19ec47 100644
--- a/libkcal/scheduler.h
+++ b/libkcal/scheduler.h
@@ -21,8 +21,8 @@
#ifndef KCAL_SCHEDULER_H
#define KCAL_SCHEDULER_H
-#include <qstring.h>
-#include <qptrlist.h>
+#include <tqstring.h>
+#include <tqptrlist.h>
#include "libkcal_export.h"
@@ -72,18 +72,18 @@ class ScheduleMessage
/**
Return error message if there is any.
*/
- QString error() { return mError; }
+ TQString error() { return mError; }
/**
Return a human-readable name for an iTIP message status.
*/
- static QString statusName( Status status );
+ static TQString statusName( Status status );
private:
IncidenceBase *mIncidence;
int mMethod;
Status mStatus;
- QString mError;
+ TQString mError;
class Private;
Private *d;
@@ -113,7 +113,7 @@ class LIBKCAL_EXPORT Scheduler
iTIP publish action
*/
virtual bool publish( IncidenceBase *incidence,
- const QString &recipients ) = 0;
+ const TQString &recipients ) = 0;
/**
Perform iTIP transaction on incidence. The method is specified as the
method argument and can be any valid iTIP method.
@@ -126,11 +126,11 @@ class LIBKCAL_EXPORT Scheduler
method.
*/
virtual bool performTransaction( IncidenceBase *incidence, Method method,
- const QString &recipients ) = 0;
+ const TQString &recipients ) = 0;
/**
Retrieve incoming iTIP transactions.
*/
- virtual QPtrList<ScheduleMessage> retrieveTransactions() = 0;
+ virtual TQPtrList<ScheduleMessage> retrieveTransactions() = 0;
/**
Accept transaction. The incidence argument specifies the iCal compoennt
@@ -144,18 +144,18 @@ class LIBKCAL_EXPORT Scheduler
/**
Return a machine-readable name for a iTIP method.
*/
- static QString methodName( Method );
+ static TQString methodName( Method );
/**
Return a translated human-readable name for a iTIP method.
*/
- static QString translatedMethodName( Method );
+ static TQString translatedMethodName( Method );
virtual bool deleteTransaction( IncidenceBase *incidence );
/**
Returns the directory where the free-busy information is stored.
*/
- virtual QString freeBusyDir() = 0;
+ virtual TQString freeBusyDir() = 0;
/**
Set free/busy cache used to store free/busy information.
diff --git a/libkcal/tests/fbrecurring.cpp b/libkcal/tests/fbrecurring.cpp
index 3ea9a03aa..be70a7c8d 100644
--- a/libkcal/tests/fbrecurring.cpp
+++ b/libkcal/tests/fbrecurring.cpp
@@ -13,39 +13,39 @@ int main()
{
ICalFormat f;
- CalendarLocal cal( QString::fromLatin1("UTC") );
+ CalendarLocal cal( TQString::fromLatin1("UTC") );
Event *event1 = new Event;
event1->setSummary("A");
- event1->setDtStart( QDateTime(QDate(2006,1,1), QTime(12,0,0)) );
+ event1->setDtStart( TQDateTime(TQDate(2006,1,1), TQTime(12,0,0)) );
//event1->setDuration(60*60);
- event1->setDtEnd( QDateTime(QDate(2006,1,1), QTime(13,0,0)) );
+ event1->setDtEnd( TQDateTime(TQDate(2006,1,1), TQTime(13,0,0)) );
event1->setFloats(FALSE);
event1->recurrence()->setDaily( 1 );
//event1->recurrence()->setDuration( 2 );
- event1->recurrence()->setEndDateTime( QDateTime(QDate(2006,1,3), QTime(13,0,0)) );
+ event1->recurrence()->setEndDateTime( TQDateTime(TQDate(2006,1,3), TQTime(13,0,0)) );
cout << f.toICalString(event1).latin1() << endl;
cal.addEvent(event1);
Event *event2 = new Event;
event2->setSummary("B");
- event2->setDtStart( QDateTime(QDate(2006,1,1), QTime(13,0,0)) );
+ event2->setDtStart( TQDateTime(TQDate(2006,1,1), TQTime(13,0,0)) );
//event2->setDuration(60*60);
- event2->setDtEnd( QDateTime(QDate(2006,1,1), QTime(14,0,0)) );
+ event2->setDtEnd( TQDateTime(TQDate(2006,1,1), TQTime(14,0,0)) );
event2->setFloats(FALSE);
event2->recurrence()->setDaily( 1 );
//event2->recurrence()->setDuration( 3 );
- event2->recurrence()->setEndDateTime( QDateTime(QDate(2006,1,4), QTime(13,0,0)) );
+ event2->recurrence()->setEndDateTime( TQDateTime(TQDate(2006,1,4), TQTime(13,0,0)) );
cout << f.toICalString(event2).latin1() << endl;
cal.addEvent(event2);
Calendar *c = &cal;
- QDateTime start = QDateTime(QDate(2006,1,2), QTime(0,0,0));
- QDateTime end = QDateTime(QDate(2006,1,3), QTime(0,0,0));
+ TQDateTime start = TQDateTime(TQDate(2006,1,2), TQTime(0,0,0));
+ TQDateTime end = TQDateTime(TQDate(2006,1,3), TQTime(0,0,0));
FreeBusy *freebusy = new FreeBusy( c, start, end );
- QString result = f.createScheduleMessage( freebusy, Scheduler::Publish );
+ TQString result = f.createScheduleMessage( freebusy, Scheduler::Publish );
cout << result.latin1() << endl;
return 0;
diff --git a/libkcal/tests/readandwrite.cpp b/libkcal/tests/readandwrite.cpp
index 8922080a3..076f55cbf 100644
--- a/libkcal/tests/readandwrite.cpp
+++ b/libkcal/tests/readandwrite.cpp
@@ -31,8 +31,8 @@ extern "C" {
#include <klocale.h>
#include <kcmdlineargs.h>
-#include <qfile.h>
-#include <qfileinfo.h>
+#include <tqfile.h>
+#include <tqfileinfo.h>
using namespace KCal;
@@ -61,20 +61,20 @@ int main( int argc, char **argv )
// use zoneinfo data from source dir
set_zone_directory( KDETOPSRCDIR "/libkcal/libical/zoneinfo" );
- QString input = QFile::decodeName( args->arg( 0 ) );
- QString output = QFile::decodeName( args->arg( 1 ) );
+ TQString input = TQFile::decodeName( args->arg( 0 ) );
+ TQString output = TQFile::decodeName( args->arg( 1 ) );
- QFileInfo outputFileInfo( output );
+ TQFileInfo outputFileInfo( output );
output = outputFileInfo.absFilePath();
kdDebug(5800) << "Input file: " << input << endl;
kdDebug(5800) << "Output file: " << output << endl;
- CalendarLocal cal( QString::fromLatin1("UTC") );
+ CalendarLocal cal( TQString::fromLatin1("UTC") );
if ( !cal.load( input ) ) return 1;
- QString tz = cal.nonKDECustomProperty( "X-LibKCal-Testsuite-OutTZ" );
+ TQString tz = cal.nonKDECustomProperty( "X-LibKCal-Testsuite-OutTZ" );
if ( !tz.isEmpty() ) {
cal.setTimeZoneIdViewOnly( tz );
}
diff --git a/libkcal/tests/testcalendar.cpp b/libkcal/tests/testcalendar.cpp
index fe3c0d662..7d781fc54 100644
--- a/libkcal/tests/testcalendar.cpp
+++ b/libkcal/tests/testcalendar.cpp
@@ -48,7 +48,7 @@ int main(int argc,char **argv)
Q_UNUSED( args );
- CalendarLocal cal( QString::fromLatin1("UTC") );
+ CalendarLocal cal( TQString::fromLatin1("UTC") );
cal.save("mycal");
}
diff --git a/libkcal/tests/testfb.cpp b/libkcal/tests/testfb.cpp
index 9b44ebb76..c72d0071f 100644
--- a/libkcal/tests/testfb.cpp
+++ b/libkcal/tests/testfb.cpp
@@ -30,7 +30,7 @@ using namespace KCal;
int main( int, char ** )
{
- const QString fbString =
+ const TQString fbString =
"BEGIN:VCALENDAR\n"
"PRODID:-//proko2//freebusy 1.0//EN\n"
"METHOD:PUBLISH\n"
@@ -57,7 +57,7 @@ int main( int, char ** )
for ( PeriodList::ConstIterator it = l.begin(); it != l.end(); ++it )
kdDebug() << (*it).start() << " " << (*it).end() << "+ " << (*it).summary() << ":" << (*it).location() << endl;
- typedef QMap<QCString, QString> FooMap;
+ typedef TQMap<TQCString, TQString> FooMap;
const FooMap props = fb->customProperties();
for ( FooMap::ConstIterator it = props.begin(); it != props.end(); ++it )
kdDebug() << it.key() << ": " << it.data() << endl;
diff --git a/libkcal/tests/testfields.cpp b/libkcal/tests/testfields.cpp
index d0bcf0be1..6e63faa98 100644
--- a/libkcal/tests/testfields.cpp
+++ b/libkcal/tests/testfields.cpp
@@ -27,7 +27,7 @@
#include "calendarlocal.h"
-#include <qfile.h>
+#include <tqfile.h>
using namespace KCal;
@@ -50,9 +50,9 @@ int main(int argc,char **argv)
Q_UNUSED(args)
- CalendarLocal cal( QString::fromLatin1("UTC") );
+ CalendarLocal cal( TQString::fromLatin1("UTC") );
- QString file = QString::fromLatin1( INPUT );
+ TQString file = TQString::fromLatin1( INPUT );
if (!cal.load( file ) ) {
kdError() << "Can't load " << file << endl;
return 1;
@@ -60,8 +60,8 @@ int main(int argc,char **argv)
// 2 tests... first uid should result in a syncStatus of 0. second uid
// should have a new summary and a 1 for syncStatus.
- QString uid1 = QString::fromLatin1("KOrganizer-1345486115.965");
- QString uid2 = QString::fromLatin1("KOrganizer-1345486115.967");
+ TQString uid1 = TQString::fromLatin1("KOrganizer-1345486115.965");
+ TQString uid2 = TQString::fromLatin1("KOrganizer-1345486115.967");
Event *e = cal.event( uid1 );
if (!e) {
@@ -72,7 +72,7 @@ int main(int argc,char **argv)
kdDebug() << "Event description " << e->summary() << endl;
if (e->hasEndDate()) {
- QDateTime d = e->dtEnd();
+ TQDateTime d = e->dtEnd();
kdDebug() << "Event ends " << d << endl;
}
@@ -88,7 +88,7 @@ int main(int argc,char **argv)
e->setSyncStatus(KCal::Incidence::SYNCNONE);
- QString newSummary = QString::fromLatin1("Mooo summary");
+ TQString newSummary = TQString::fromLatin1("Mooo summary");
Event *f = new Event(*e);
@@ -102,7 +102,7 @@ int main(int argc,char **argv)
- QString filew = file +".out";
+ TQString filew = file +".out";
// weird, yes, I know, but we have a bug right now with saving the file
// twice which is corrupting X-PILOTSTAT
if ( !cal.save( filew ) || !cal.save( filew ) ) {
@@ -112,13 +112,13 @@ int main(int argc,char **argv)
// now try to read the file back in and see if our changes made it
- CalendarLocal cal2( QString::fromLatin1("UTC") );
+ CalendarLocal cal2( TQString::fromLatin1("UTC") );
if (!cal2.load( filew ) ) {
kdError() << "Can't load " << filew << endl;
return 1;
}
- QFile::remove( filew );
+ TQFile::remove( filew );
// check for uid1--should have syncStatus of 0
e = cal2.event( uid1 );
diff --git a/libkcal/tests/testincidence.cpp b/libkcal/tests/testincidence.cpp
index 1dd8c7379..9f84cc28c 100644
--- a/libkcal/tests/testincidence.cpp
+++ b/libkcal/tests/testincidence.cpp
@@ -57,13 +57,13 @@ int main(int argc,char **argv)
event1->recurrence()->setDaily( 2 );
event1->recurrence()->setDuration( 3 );
- QString eventString1 = f.toString( event1 );
+ TQString eventString1 = f.toString( event1 );
if ( verbose )
kdDebug(5800) << "EVENT1 START:" << eventString1 << "EVENT1 END" << endl;
Incidence *event2 = event1->clone();
- QString eventString2 = f.toString( event2 );
+ TQString eventString2 = f.toString( event2 );
if( verbose )
kdDebug(5800) << "EVENT2 START:" << eventString2 << "EVENT2 END" << endl;
@@ -75,12 +75,12 @@ int main(int argc,char **argv)
Todo *todo1 = new Todo;
todo1->setSummary("Test todo");
- QString todoString1 = f.toString( todo1 );
+ TQString todoString1 = f.toString( todo1 );
if( verbose )
kdDebug(5800) << "todo1 START:" << todoString1 << "todo1 END" << endl;
Incidence *todo2 = todo1->clone();
- QString todoString2 = f.toString( todo2 );
+ TQString todoString2 = f.toString( todo2 );
if( verbose )
kdDebug(5800) << "todo2 START:" << todoString2 << "todo2 END" << endl;
diff --git a/libkcal/tests/testrecurprevious.cpp b/libkcal/tests/testrecurprevious.cpp
index c0a90b8b0..2d127d49f 100644
--- a/libkcal/tests/testrecurprevious.cpp
+++ b/libkcal/tests/testrecurprevious.cpp
@@ -31,7 +31,7 @@ extern "C" {
#include <kdebug.h>
#include <kcmdlineargs.h>
-#include <qfile.h>
+#include <tqfile.h>
@@ -64,26 +64,26 @@ int main( int argc, char **argv )
// use zoneinfo data from source dir
set_zone_directory( KDETOPSRCDIR "/libkcal/libical/zoneinfo" );
- QString input = QFile::decodeName( args->arg( 0 ) );
+ TQString input = TQFile::decodeName( args->arg( 0 ) );
kdDebug(5800) << "Input file: " << input << endl;
- QTextStream *outstream;
+ TQTextStream *outstream;
outstream = 0;
- QString fn("");
+ TQString fn("");
if ( args->count() > 1 ) {
fn = args->arg( 1 );
kdDebug() << "We have a file name given: " << fn << endl;
}
- QFile outfile( fn );
+ TQFile outfile( fn );
if ( !fn.isEmpty() && outfile.open( IO_WriteOnly ) ) {
kdDebug() << "Opened output file!!!" << endl;
- outstream = new QTextStream( &outfile );
+ outstream = new TQTextStream( &outfile );
}
- CalendarLocal cal( QString::fromLatin1("UTC") );
+ CalendarLocal cal( TQString::fromLatin1("UTC") );
if ( !cal.load( input ) ) return 1;
- QString tz = cal.nonKDECustomProperty( "X-LibKCal-Testsuite-OutTZ" );
+ TQString tz = cal.nonKDECustomProperty( "X-LibKCal-Testsuite-OutTZ" );
if ( !tz.isEmpty() ) {
cal.setTimeZoneIdViewOnly( tz );
}
@@ -97,10 +97,10 @@ int main( int argc, char **argv )
incidence->recurrence()->dump();
- QDateTime dt( incidence->recurrence()->endDateTime() );
+ TQDateTime dt( incidence->recurrence()->endDateTime() );
int i=0;
if ( outstream ) {
- if ( !dt.isValid() ) dt = QDateTime( QDate( 2011, 1, 1 ), QTime( 0, 0, 1 ) );
+ if ( !dt.isValid() ) dt = TQDateTime( TQDate( 2011, 1, 1 ), TQTime( 0, 0, 1 ) );
else dt = dt.addYears( 2 );
kdDebug(5800) << "-------------------------------------------" << endl;
kdDebug(5800) << " *~*~*~*~ Starting with date: " << dt << endl;
@@ -112,7 +112,7 @@ int main( int argc, char **argv )
(*outstream) << dt.toString( Qt::ISODate ) << endl;
}
} else {
- if ( !dt.isValid() ) dt = QDateTime( QDate( 2005, 7, 31 ), QTime( 23, 59, 59 ) );
+ if ( !dt.isValid() ) dt = TQDateTime( TQDate( 2005, 7, 31 ), TQTime( 23, 59, 59 ) );
else dt = dt.addYears( 2 );
incidence->recurrence()->dump();
kdDebug(5800) << "-------------------------------------------" << endl;
diff --git a/libkcal/tests/testrecurrence.cpp b/libkcal/tests/testrecurrence.cpp
index c997e9a67..8fc1c5274 100644
--- a/libkcal/tests/testrecurrence.cpp
+++ b/libkcal/tests/testrecurrence.cpp
@@ -31,7 +31,7 @@ extern "C" {
#include <kdebug.h>
#include <kcmdlineargs.h>
-#include <qfile.h>
+#include <tqfile.h>
@@ -64,26 +64,26 @@ int main( int argc, char **argv )
// use zoneinfo data from source dir
set_zone_directory( KDETOPSRCDIR "/libkcal/libical/zoneinfo" );
- QString input = QFile::decodeName( args->arg( 0 ) );
+ TQString input = TQFile::decodeName( args->arg( 0 ) );
kdDebug(5800) << "Input file: " << input << endl;
- QTextStream *outstream;
+ TQTextStream *outstream;
outstream = 0;
- QString fn("");
+ TQString fn("");
if ( args->count() > 1 ) {
fn = args->arg( 1 );
kdDebug() << "We have a file name given: " << fn << endl;
}
- QFile outfile( fn );
+ TQFile outfile( fn );
if ( !fn.isEmpty() && outfile.open( IO_WriteOnly ) ) {
kdDebug() << "Opened output file!!!" << endl;
- outstream = new QTextStream( &outfile );
+ outstream = new TQTextStream( &outfile );
}
- CalendarLocal cal( QString::fromLatin1("UTC") );
+ CalendarLocal cal( TQString::fromLatin1("UTC") );
if ( !cal.load( input ) ) return 1;
- QString tz = cal.nonKDECustomProperty( "X-LibKCal-Testsuite-OutTZ" );
+ TQString tz = cal.nonKDECustomProperty( "X-LibKCal-Testsuite-OutTZ" );
if ( !tz.isEmpty() ) {
cal.setTimeZoneIdViewOnly( tz );
}
@@ -97,7 +97,7 @@ int main( int argc, char **argv )
incidence->recurrence()->dump();
- QDateTime dt( incidence->dtStart().addSecs(-2) );
+ TQDateTime dt( incidence->dtStart().addSecs(-2) );
int i=0;
if ( outstream ) {
// Output to file for testing purposes
diff --git a/libkcal/tests/testrecurrencetype.cpp b/libkcal/tests/testrecurrencetype.cpp
index c997e9a67..8fc1c5274 100644
--- a/libkcal/tests/testrecurrencetype.cpp
+++ b/libkcal/tests/testrecurrencetype.cpp
@@ -31,7 +31,7 @@ extern "C" {
#include <kdebug.h>
#include <kcmdlineargs.h>
-#include <qfile.h>
+#include <tqfile.h>
@@ -64,26 +64,26 @@ int main( int argc, char **argv )
// use zoneinfo data from source dir
set_zone_directory( KDETOPSRCDIR "/libkcal/libical/zoneinfo" );
- QString input = QFile::decodeName( args->arg( 0 ) );
+ TQString input = TQFile::decodeName( args->arg( 0 ) );
kdDebug(5800) << "Input file: " << input << endl;
- QTextStream *outstream;
+ TQTextStream *outstream;
outstream = 0;
- QString fn("");
+ TQString fn("");
if ( args->count() > 1 ) {
fn = args->arg( 1 );
kdDebug() << "We have a file name given: " << fn << endl;
}
- QFile outfile( fn );
+ TQFile outfile( fn );
if ( !fn.isEmpty() && outfile.open( IO_WriteOnly ) ) {
kdDebug() << "Opened output file!!!" << endl;
- outstream = new QTextStream( &outfile );
+ outstream = new TQTextStream( &outfile );
}
- CalendarLocal cal( QString::fromLatin1("UTC") );
+ CalendarLocal cal( TQString::fromLatin1("UTC") );
if ( !cal.load( input ) ) return 1;
- QString tz = cal.nonKDECustomProperty( "X-LibKCal-Testsuite-OutTZ" );
+ TQString tz = cal.nonKDECustomProperty( "X-LibKCal-Testsuite-OutTZ" );
if ( !tz.isEmpty() ) {
cal.setTimeZoneIdViewOnly( tz );
}
@@ -97,7 +97,7 @@ int main( int argc, char **argv )
incidence->recurrence()->dump();
- QDateTime dt( incidence->dtStart().addSecs(-2) );
+ TQDateTime dt( incidence->dtStart().addSecs(-2) );
int i=0;
if ( outstream ) {
// Output to file for testing purposes
diff --git a/libkcal/tests/testrecurson.cpp b/libkcal/tests/testrecurson.cpp
index 154cbe676..01dfb5f7a 100644
--- a/libkcal/tests/testrecurson.cpp
+++ b/libkcal/tests/testrecurson.cpp
@@ -31,7 +31,7 @@ extern "C" {
#include <kdebug.h>
#include <kcmdlineargs.h>
-#include <qfile.h>
+#include <tqfile.h>
@@ -64,26 +64,26 @@ int main( int argc, char **argv )
// use zoneinfo data from source dir
set_zone_directory( KDETOPSRCDIR "/libkcal/libical/zoneinfo" );
- QString input = QFile::decodeName( args->arg( 0 ) );
+ TQString input = TQFile::decodeName( args->arg( 0 ) );
kdDebug(5800) << "Input file: " << input << endl;
- QTextStream *outstream;
+ TQTextStream *outstream;
outstream = 0;
- QString fn("");
+ TQString fn("");
if ( args->count() > 1 ) {
fn = args->arg( 1 );
kdDebug() << "We have a file name given: " << fn << endl;
}
- QFile outfile( fn );
+ TQFile outfile( fn );
if ( !fn.isEmpty() && outfile.open( IO_WriteOnly ) ) {
kdDebug() << "Opened output file!!!" << endl;
- outstream = new QTextStream( &outfile );
+ outstream = new TQTextStream( &outfile );
}
- CalendarLocal cal( QString::fromLatin1("UTC") );
+ CalendarLocal cal( TQString::fromLatin1("UTC") );
if ( !cal.load( input ) ) return 1;
- QString tz = cal.nonKDECustomProperty( "X-LibKCal-Testsuite-OutTZ" );
+ TQString tz = cal.nonKDECustomProperty( "X-LibKCal-Testsuite-OutTZ" );
if ( !tz.isEmpty() ) {
cal.setTimeZoneIdViewOnly( tz );
}
@@ -97,7 +97,7 @@ int main( int argc, char **argv )
incidence->recurrence()->dump();
- QDate dt( 1996, 7, 1 );
+ TQDate dt( 1996, 7, 1 );
if ( outstream ) {
// Output to file for testing purposes
while ( dt.year() <= 2010 ) {
@@ -106,7 +106,7 @@ int main( int argc, char **argv )
dt = dt.addDays( 1 );
}
} else {
- dt = QDate( 2005, 1, 1 );
+ dt = TQDate( 2005, 1, 1 );
while ( dt.year() < 2007 ) {
if ( incidence->recursOn( dt ) )
kdDebug(5800) << dt.toString( Qt::ISODate ) << endl;
diff --git a/libkcal/tests/testresource.cpp b/libkcal/tests/testresource.cpp
index 25f6539d3..cd5174e2c 100644
--- a/libkcal/tests/testresource.cpp
+++ b/libkcal/tests/testresource.cpp
@@ -31,9 +31,9 @@
#include <kinputdialog.h>
#include <kresources/factory.h>
-#include <qdir.h>
-#include <qfileinfo.h>
-#include <qstringlist.h>
+#include <tqdir.h>
+#include <tqfileinfo.h>
+#include <tqstringlist.h>
#include <stdio.h>
#include <stdlib.h>
@@ -56,7 +56,7 @@ int main(int argc, char *argv[])
{
// Use another directory than the real one, just to keep things clean
// KDEHOME needs to be writable though, for a ksycoca database
- setenv( "KDEHOME", QFile::encodeName( QDir::homeDirPath() + "/.kde-testresource" ), true );
+ setenv( "KDEHOME", TQFile::encodeName( TQDir::homeDirPath() + "/.kde-testresource" ), true );
setenv( "KDE_FORK_SLAVES", "yes", true ); // simpler, for the final cleanup
KApplication::disableAutoDcopRegistration();
@@ -65,9 +65,9 @@ int main(int argc, char *argv[])
KApplication app;
KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
- QString type = QString::null;
+ TQString type = TQString::null;
if ( args->getOption( "resource" ) )
- type = QString::fromLocal8Bit( args->getOption( "resource" ) );
+ type = TQString::fromLocal8Bit( args->getOption( "resource" ) );
KConfig *config = 0;
if ( args->getOption( "configfile" ) )
config = new KConfig( KURL( args->getOption( "configfile" ) ).url() );
@@ -82,7 +82,7 @@ int main(int argc, char *argv[])
namespace KCal {
-TestResource::TestResource( const QString &type, KConfig *config )
+TestResource::TestResource( const TQString &type, KConfig *config )
:m_resource_type( type ), m_config( config ), m_res( 0 )
{}
@@ -91,11 +91,11 @@ void TestResource::setup()
CalendarResourceManager *manager = new CalendarResourceManager( "calendar" );
manager->readConfig();
- QStringList resources = manager->resourceTypeNames();
+ TQStringList resources = manager->resourceTypeNames();
if ( m_resource_type.isNull() ) {
- const QString & chosen = KInputDialog::getItem( "Select Resource",
+ const TQString & chosen = KInputDialog::getItem( "Select Resource",
"Select the resource you wish to test. Test data will be used.",
resources );
@@ -130,12 +130,12 @@ void TestResource::runAll()
m_res->close();
}
-bool TestResource::check(const QString& txt, QString a, QString b)
+bool TestResource::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;
}
@@ -190,11 +190,11 @@ void TestResource::testEventAddRemove()
int oldcount = m_res->rawIncidences().count();
Event *event = makeTestEvent();
- const QString origString = f.toString( event );
+ const TQString origString = f.toString( event );
m_res->addEvent( event );
Event *fromRes = m_res->event( event->uid() );
assert( fromRes == event );
- const QString fromResString = f.toString( fromRes );
+ const TQString fromResString = f.toString( fromRes );
check( "add", origString, fromResString );
m_res->deleteEvent( event );
assert( !m_res->event( event->uid() ) );
@@ -210,11 +210,11 @@ void TestResource::testTodoAddRemove()
int oldcount = m_res->rawIncidences().count();
Todo *todo = makeTestTodo();
- const QString origString = f.toString( todo );
+ const TQString origString = f.toString( todo );
m_res->addTodo( todo );
Todo *fromRes = m_res->todo( todo->uid() );
assert( fromRes == todo );
- const QString fromResString = f.toString( fromRes );
+ const TQString fromResString = f.toString( fromRes );
check( "add", origString, fromResString );
m_res->deleteTodo( todo );
assert( !m_res->todo( todo->uid() ) );
@@ -230,11 +230,11 @@ void TestResource::testJournalAddRemove()
int oldcount = m_res->rawIncidences().count();
Journal *journal = makeTestJournal();
- const QString origString = f.toString( journal );
+ const TQString origString = f.toString( journal );
m_res->addJournal( journal );
Journal *fromRes = m_res->journal( journal->uid() );
assert( fromRes == journal );
- const QString fromResString = f.toString( fromRes );
+ const TQString fromResString = f.toString( fromRes );
check( "add", origString, fromResString );
m_res->deleteJournal( journal );
assert( !m_res->journal( journal->uid() ) );
diff --git a/libkcal/tests/testresource.h b/libkcal/tests/testresource.h
index ae452dd23..30e61aeb5 100644
--- a/libkcal/tests/testresource.h
+++ b/libkcal/tests/testresource.h
@@ -19,7 +19,7 @@
#ifndef TESTRESOURCE_H
#define TESTRESOURCE_H
-#include <qobject.h>
+#include <tqobject.h>
class KConfig;
namespace KCal {
@@ -31,7 +31,7 @@ class TestResource : public QObject
Q_OBJECT
public:
- TestResource( const QString& type, KConfig *config );
+ TestResource( const TQString& type, KConfig *config );
void setup();
void runAll();
void cleanup();
@@ -46,8 +46,8 @@ public:
void testJournalAddRemove();
private:
- bool check(const QString& txt, QString a, QString b);
- QString m_resource_type;
+ bool check(const TQString& txt, TQString a, TQString b);
+ TQString m_resource_type;
KConfig *m_config;
ResourceCalendar *m_res;
};
diff --git a/libkcal/tests/testtostring.cpp b/libkcal/tests/testtostring.cpp
index 673b487a3..766bc064c 100644
--- a/libkcal/tests/testtostring.cpp
+++ b/libkcal/tests/testtostring.cpp
@@ -34,7 +34,7 @@ int main( int, char ** )
Event *ev = new Event;
ev->setSummary("Griazi");
ICalFormat iformat;
- QString icalstr = iformat.toICalString(ev);
+ TQString icalstr = iformat.toICalString(ev);
kdDebug(5800) << icalstr << endl;
Incidence *ev2 = iformat.fromString(icalstr);
kdDebug(5800) << "Event reread!" << endl ;
diff --git a/libkcal/tests/testvcalexport.cpp b/libkcal/tests/testvcalexport.cpp
index a6ca1cfdd..7f8b61c09 100644
--- a/libkcal/tests/testvcalexport.cpp
+++ b/libkcal/tests/testvcalexport.cpp
@@ -35,8 +35,8 @@ extern "C" {
#include <klocale.h>
#include <kcmdlineargs.h>
-#include <qfile.h>
-#include <qfileinfo.h>
+#include <tqfile.h>
+#include <tqfileinfo.h>
using namespace KCal;
@@ -65,20 +65,20 @@ int main( int argc, char **argv )
// use zoneinfo data from source dir
set_zone_directory( KDETOPSRCDIR "/libkcal/libical/zoneinfo" );
- QString input = QFile::decodeName( args->arg( 0 ) );
- QString output = QFile::decodeName( args->arg( 1 ) );
+ TQString input = TQFile::decodeName( args->arg( 0 ) );
+ TQString output = TQFile::decodeName( args->arg( 1 ) );
- QFileInfo outputFileInfo( output );
+ TQFileInfo outputFileInfo( output );
output = outputFileInfo.absFilePath();
kdDebug(5800) << "Input file: " << input << endl;
kdDebug(5800) << "Output file: " << output << endl;
- CalendarLocal cal( QString::fromLatin1("UTC") );
+ CalendarLocal cal( TQString::fromLatin1("UTC") );
if ( !cal.load( input ) ) return 1;
- QString tz = cal.nonKDECustomProperty( "X-LibKCal-Testsuite-OutTZ" );
+ TQString tz = cal.nonKDECustomProperty( "X-LibKCal-Testsuite-OutTZ" );
if ( !tz.isEmpty() ) {
cal.setTimeZoneIdViewOnly( tz );
}
diff --git a/libkcal/todo.cpp b/libkcal/todo.cpp
index 87d34c4b1..9787ff2ad 100644
--- a/libkcal/todo.cpp
+++ b/libkcal/todo.cpp
@@ -82,7 +82,7 @@ bool Todo::operator==( const Todo& t2 ) const
percentComplete() == t2.percentComplete();
}
-void Todo::setDtDue(const QDateTime &dtDue, bool first )
+void Todo::setDtDue(const TQDateTime &dtDue, bool first )
{
//int diffsecs = mDtDue.secsTo(dtDue);
@@ -114,7 +114,7 @@ void Todo::setDtDue(const QDateTime &dtDue, bool first )
updated();
}
-QDateTime Todo::dtDue( bool first ) const
+TQDateTime Todo::dtDue( bool first ) const
{
if ( doesRecur() && !first && mDtRecurrence.isValid() )
return mDtRecurrence;
@@ -122,18 +122,18 @@ QDateTime Todo::dtDue( bool first ) const
return mDtDue;
}
-QString Todo::dtDueTimeStr() const
+TQString Todo::dtDueTimeStr() const
{
return KGlobal::locale()->formatTime( dtDue(!doesRecur()).time() );
}
-QString Todo::dtDueDateStr(bool shortfmt) const
+TQString Todo::dtDueDateStr(bool shortfmt) const
{
return KGlobal::locale()->formatDate(dtDue( !doesRecur() ).date(),shortfmt);
}
// TODO: Add shortfmt param!!!
-QString Todo::dtDueStr() const
+TQString Todo::dtDueStr() const
{
return KGlobal::locale()->formatDateTime( dtDue( !doesRecur() ) );
}
@@ -164,14 +164,14 @@ void Todo::setHasStartDate(bool f)
if ( !comments().grep("NoStartDate").count() )
addComment("NoStartDate"); //TODO: --> custom flag?
} else {
- QString s("NoStartDate");
+ TQString s("NoStartDate");
removeComment(s);
}
mHasStartDate = f;
updated();
}
-QDateTime Todo::dtStart( bool first ) const
+TQDateTime Todo::dtStart( bool first ) const
{
if ( doesRecur() && !first )
return mDtRecurrence.addDays( dtDue( first ).daysTo( IncidenceBase::dtStart() ) );
@@ -179,7 +179,7 @@ QDateTime Todo::dtStart( bool first ) const
return IncidenceBase::dtStart();
}
-void Todo::setDtStart( const QDateTime &dtStart )
+void Todo::setDtStart( const TQDateTime &dtStart )
{
// TODO: This doesn't seem right (rfc 2445/6 says, recurrence is calculated from the dtstart...)
if ( doesRecur() ) {
@@ -189,17 +189,17 @@ void Todo::setDtStart( const QDateTime &dtStart )
IncidenceBase::setDtStart( dtStart );
}
-QString Todo::dtStartTimeStr( bool first ) const
+TQString Todo::dtStartTimeStr( bool first ) const
{
return KGlobal::locale()->formatTime(dtStart(first).time());
}
-QString Todo::dtStartDateStr(bool shortfmt, bool first) const
+TQString Todo::dtStartDateStr(bool shortfmt, bool first) const
{
return KGlobal::locale()->formatDate(dtStart(first).date(),shortfmt);
}
-QString Todo::dtStartStr(bool first) const
+TQString Todo::dtStartStr(bool first) const
{
return KGlobal::locale()->formatDateTime(dtStart(first));
}
@@ -217,25 +217,25 @@ void Todo::setCompleted(bool completed)
else {
mPercentComplete = 0;
mHasCompletedDate = false;
- mCompleted = QDateTime();
+ mCompleted = TQDateTime();
}
updated();
}
-QDateTime Todo::completed() const
+TQDateTime Todo::completed() const
{
if ( hasCompletedDate() )
return mCompleted;
else
- return QDateTime();
+ return TQDateTime();
}
-QString Todo::completedStr() const
+TQString Todo::completedStr() const
{
return KGlobal::locale()->formatDateTime(mCompleted);
}
-void Todo::setCompleted(const QDateTime &completed)
+void Todo::setCompleted(const TQDateTime &completed)
{
if( !recurTodo() ) {
mHasCompletedDate = true;
@@ -262,19 +262,19 @@ void Todo::setPercentComplete(int v)
updated();
}
-void Todo::setDtRecurrence( const QDateTime &dt )
+void Todo::setDtRecurrence( const TQDateTime &dt )
{
mDtRecurrence = dt;
}
-QDateTime Todo::dtRecurrence() const
+TQDateTime Todo::dtRecurrence() const
{
return mDtRecurrence.isValid() ? mDtRecurrence : mDtDue;
}
-bool Todo::recursOn( const QDate &date ) const
+bool Todo::recursOn( const TQDate &date ) const
{
- QDate today = QDate::currentDate();
+ TQDate today = TQDate::currentDate();
return ( Incidence::recursOn(date) &&
!( date < today && mDtRecurrence.date() < today &&
mDtRecurrence > recurrence()->startDateTime() ) );
@@ -284,13 +284,13 @@ bool Todo::recurTodo()
{
if ( doesRecur() ) {
Recurrence *r = recurrence();
- QDateTime endDateTime = r->endDateTime();
- QDateTime nextDate = r->getNextDateTime( dtDue() );
+ TQDateTime endDateTime = r->endDateTime();
+ TQDateTime nextDate = r->getNextDateTime( dtDue() );
if ( ( r->duration() == -1 || ( nextDate.isValid() && endDateTime.isValid()
&& nextDate <= endDateTime ) ) ) {
- while ( !recursAt( nextDate ) || nextDate <= QDateTime::currentDateTime() ) {
+ while ( !recursAt( nextDate ) || nextDate <= TQDateTime::currentDateTime() ) {
if ( !nextDate.isValid() || nextDate > endDateTime ) {
return false;
@@ -312,7 +312,7 @@ bool Todo::recurTodo()
bool Todo::isOverdue() const
{
- bool inPast = doesFloat() ? dtDue().date() < QDate::currentDate()
- : dtDue() < QDateTime::currentDateTime();
+ bool inPast = doesFloat() ? dtDue().date() < TQDate::currentDate()
+ : dtDue() < TQDateTime::currentDateTime();
return ( inPast && !isCompleted() );
}
diff --git a/libkcal/todo.h b/libkcal/todo.h
index d81576d55..1a7b050d4 100644
--- a/libkcal/todo.h
+++ b/libkcal/todo.h
@@ -39,7 +39,7 @@ class LIBKCAL_EXPORT Todo : public Incidence
Todo& operator=( const Todo& );
bool operator==( const Todo& ) const;
- QCString type() const { return "Todo"; }
+ TQCString type() const { return "Todo"; }
/**
Returns an exact copy of this todo. The returned object is owned by the
@@ -53,7 +53,7 @@ class LIBKCAL_EXPORT Todo : public Incidence
@param dtDue The due date/time.
@param first Set the date of the first occurrence (if the todo is recurrent).
*/
- void setDtDue(const QDateTime &dtDue, bool first = false);
+ void setDtDue(const TQDateTime &dtDue, bool first = false);
/**
Returns due date and time.
@@ -62,12 +62,12 @@ class LIBKCAL_EXPORT Todo : public Incidence
current occurrence will be returned. If non-recurrent, the normal due date
will be returned.
*/
- QDateTime dtDue( bool first = false ) const;
+ TQDateTime dtDue( bool first = false ) const;
/**
Returns due time as string formatted according to the users locale
settings.
*/
- QString dtDueTimeStr() const;
+ TQString dtDueTimeStr() const;
/**
Returns due date as string formatted according to the users locale
settings.
@@ -75,12 +75,12 @@ class LIBKCAL_EXPORT Todo : public Incidence
@param shortfmt If set to true, use short date format, if set to false use
long format.
*/
- QString dtDueDateStr( bool shortfmt = true ) const;
+ TQString dtDueDateStr( bool shortfmt = true ) const;
/**
Returns due date and time as string formatted according to the users locale
settings.
*/
- QString dtDueStr() const;
+ TQString dtDueStr() const;
/**
Returns true if the todo has a due date, otherwise return false.
@@ -111,12 +111,12 @@ class LIBKCAL_EXPORT Todo : public Incidence
If false and the todo recurs, the relative startdate will be returned,
based on the date returned by dtRecurrence().
*/
- QDateTime dtStart( bool first = false ) const;
+ TQDateTime dtStart( bool first = false ) const;
/**
Sets the startdate of the todo.
*/
- void setDtStart( const QDateTime &dtStart );
+ void setDtStart( const TQDateTime &dtStart );
/** Returns an todo's starting time as a string formatted according to the
users locale settings.
@@ -125,7 +125,7 @@ class LIBKCAL_EXPORT Todo : public Incidence
If false and the todo recurs, the relative startdate will be returned,
based on the date returned by dtRecurrence().
*/
- QString dtStartTimeStr( bool first = false ) const;
+ TQString dtStartTimeStr( bool first = false ) const;
/** Returns an todo's starting date as a string formatted according to the
users locale settings.
@param shortfmt If true, use short date format, if set to false use
@@ -135,7 +135,7 @@ class LIBKCAL_EXPORT Todo : public Incidence
If false and the todo recurs, the relative startdate will be returned,
based on the date returned by dtRecurrence().
*/
- QString dtStartDateStr( bool shortfmt = true, bool first = false ) const;
+ TQString dtStartDateStr( bool shortfmt = true, bool first = false ) const;
/** Returns an todo's starting date and time as a string formatted according
to the users locale settings.
@param first If true, the startdate of the todo will be returned. If the
@@ -143,7 +143,7 @@ class LIBKCAL_EXPORT Todo : public Incidence
If false and the todo recurs, the relative startdate will be returned,
based on the date returned by dtRecurrence().
*/
- QString dtStartStr( bool first = false ) const;
+ TQString dtStartStr( bool first = false ) const;
/**
Returns true if the todo is 100% completed, otherwise return false.
@@ -171,16 +171,16 @@ class LIBKCAL_EXPORT Todo : public Incidence
/**
Returns date and time when todo was completed.
*/
- QDateTime completed() const;
+ TQDateTime completed() const;
/**
Returns string contaiting date and time when the todo was completed
formatted according to the users locale settings.
*/
- QString completedStr() const;
+ TQString completedStr() const;
/**
Set date and time of completion.
*/
- void setCompleted( const QDateTime &completed );
+ void setCompleted( const TQDateTime &completed );
/**
Returns true, if todo has a date associated with completion, otherwise
@@ -191,12 +191,12 @@ class LIBKCAL_EXPORT Todo : public Incidence
/**
Sets the due date/time of the current occurrence if recurrent.
*/
- void setDtRecurrence( const QDateTime &dt );
+ void setDtRecurrence( const TQDateTime &dt );
/**
Returns the due date/time of the current occurrence if recurrent.
*/
- QDateTime dtRecurrence() const;
+ TQDateTime dtRecurrence() const;
/**
Returns true if the date specified is one on which the todo will
@@ -204,7 +204,7 @@ class LIBKCAL_EXPORT Todo : public Incidence
check, which make it return false if there's an occurrence between
the recurstart and today.
*/
- virtual bool recursOn( const QDate &date ) const;
+ virtual bool recursOn( const TQDate &date ) const;
/**
Returns true if this todo is overdue (e.g. due date is lower than today
@@ -214,21 +214,21 @@ class LIBKCAL_EXPORT Todo : public Incidence
protected:
/** Return the end date/time of the base incidence. */
- virtual QDateTime endDateRecurrenceBase() const { return dtDue(); }
+ virtual TQDateTime endDateRecurrenceBase() const { return dtDue(); }
private:
bool accept(Visitor &v) { return v.visit( this ); }
/** Returns true if the todo got a new date, else false will be returned. */
bool recurTodo();
- QDateTime mDtDue; // due date of todo
+ TQDateTime mDtDue; // due date of todo
// (first occurrence if recurrent)
- QDateTime mDtRecurrence; // due date of recurrence
+ TQDateTime mDtRecurrence; // due date of recurrence
bool mHasDueDate; // if todo has associated due date
bool mHasStartDate; // if todo has associated start date
- QDateTime mCompleted;
+ TQDateTime mCompleted;
bool mHasCompletedDate;
int mPercentComplete;
diff --git a/libkcal/vcaldrag.cpp b/libkcal/vcaldrag.cpp
index bbcc2447e..9bcfdb8d4 100644
--- a/libkcal/vcaldrag.cpp
+++ b/libkcal/vcaldrag.cpp
@@ -26,25 +26,25 @@
using namespace KCal;
-VCalDrag::VCalDrag( Calendar *cal, QWidget *parent, const char *name )
- : QStoredDrag( "text/x-vCalendar", parent, name )
+VCalDrag::VCalDrag( Calendar *cal, TQWidget *parent, const char *name )
+ : TQStoredDrag( "text/x-vCalendar", parent, name )
{
VCalFormat format;
setEncodedData( format.toString( cal ).utf8() );
}
-bool VCalDrag::canDecode( QMimeSource *me )
+bool VCalDrag::canDecode( TQMimeSource *me )
{
return me->provides( "text/x-vCalendar" );
}
-bool VCalDrag::decode( QMimeSource *de, Calendar *cal )
+bool VCalDrag::decode( TQMimeSource *de, Calendar *cal )
{
bool success = false;
- QByteArray payload = de->encodedData( "text/x-vCalendar" );
+ TQByteArray payload = de->encodedData( "text/x-vCalendar" );
if ( payload.size() ) {
- QString txt = QString::fromUtf8( payload.data() );
+ TQString txt = TQString::fromUtf8( payload.data() );
VCalFormat format;
success = format.fromString( cal, txt );
diff --git a/libkcal/vcaldrag.h b/libkcal/vcaldrag.h
index 4cb5f88ad..8855ed5ff 100644
--- a/libkcal/vcaldrag.h
+++ b/libkcal/vcaldrag.h
@@ -22,7 +22,7 @@
#ifndef KCAL_VCALDRAG_H
#define KCAL_VCALDRAG_H
-#include <qdragobject.h>
+#include <tqdragobject.h>
#include "libkcal_export.h"
namespace KCal {
@@ -38,17 +38,17 @@ class KDE_EXPORT VCalDrag : public QStoredDrag
/**
Create a drag&drop object for vCalendar component \a vcal.
*/
- VCalDrag( Calendar *vcal, QWidget *parent = 0, const char *name = 0 );
+ VCalDrag( Calendar *vcal, TQWidget *parent = 0, const char *name = 0 );
~VCalDrag() {}
/**
Return, if drag&drop object can be decode to vCalendar.
*/
- static bool canDecode( QMimeSource * );
+ static bool canDecode( TQMimeSource * );
/**
Decode drag&drop object to vCalendar component \a vcal.
*/
- static bool decode( QMimeSource *e, Calendar *cal );
+ static bool decode( TQMimeSource *e, Calendar *cal );
private:
class Private;
diff --git a/libkcal/vcalformat.cpp b/libkcal/vcalformat.cpp
index 3ed492d38..3e9e613b3 100644
--- a/libkcal/vcalformat.cpp
+++ b/libkcal/vcalformat.cpp
@@ -20,14 +20,14 @@
Boston, MA 02110-1301, USA.
*/
-#include <qapplication.h>
-#include <qdatetime.h>
-#include <qstring.h>
-#include <qptrlist.h>
-#include <qregexp.h>
-#include <qclipboard.h>
-#include <qdialog.h>
-#include <qfile.h>
+#include <tqapplication.h>
+#include <tqdatetime.h>
+#include <tqstring.h>
+#include <tqptrlist.h>
+#include <tqregexp.h>
+#include <tqclipboard.h>
+#include <tqdialog.h>
+#include <tqfile.h>
#include <kdebug.h>
#include <kmessagebox.h>
@@ -55,7 +55,7 @@ VCalFormat::~VCalFormat()
{
}
-bool VCalFormat::load(Calendar *calendar, const QString &fileName)
+bool VCalFormat::load(Calendar *calendar, const TQString &fileName)
{
mCalendar = calendar;
@@ -67,7 +67,7 @@ bool VCalFormat::load(Calendar *calendar, const QString &fileName)
// this is not necessarily only 1 vcal. Could be many vcals, or include
// a vcard...
- vcal = Parse_MIME_FromFileName(const_cast<char *>(QFile::encodeName(fileName).data()));
+ vcal = Parse_MIME_FromFileName(const_cast<char *>(TQFile::encodeName(fileName).data()));
if (!vcal) {
setException(new ErrorFormat(ErrorFormat::CalVersionUnknown));
@@ -87,11 +87,11 @@ bool VCalFormat::load(Calendar *calendar, const QString &fileName)
}
-bool VCalFormat::save(Calendar *calendar, const QString &fileName)
+bool VCalFormat::save(Calendar *calendar, const TQString &fileName)
{
mCalendar = calendar;
- QString tmpStr;
+ TQString tmpStr;
VObject *vcal, *vo;
kdDebug(5800) << "VCalFormat::save(): " << fileName << endl;
@@ -118,11 +118,11 @@ bool VCalFormat::save(Calendar *calendar, const QString &fileName)
addVObjectProp( vcal, vo );
}
- writeVObjectToFile(QFile::encodeName(fileName).data() ,vcal);
+ writeVObjectToFile(TQFile::encodeName(fileName).data() ,vcal);
cleanVObjects(vcal);
cleanStrTbl();
- if (QFile::exists(fileName)) {
+ if (TQFile::exists(fileName)) {
kdDebug(5800) << "No error" << endl;
return true;
} else {
@@ -133,12 +133,12 @@ bool VCalFormat::save(Calendar *calendar, const QString &fileName)
return false;
}
-bool VCalFormat::fromString( Calendar *calendar, const QString &text )
+bool VCalFormat::fromString( Calendar *calendar, const TQString &text )
{
// TODO: Factor out VCalFormat::fromString()
mCalendar = calendar;
- QCString data = text.utf8();
+ TQCString data = text.utf8();
if ( !data.size() ) return false;
@@ -169,7 +169,7 @@ bool VCalFormat::fromString( Calendar *calendar, const QString &text )
return true;
}
-QString VCalFormat::toString( Calendar *calendar )
+TQString VCalFormat::toString( Calendar *calendar )
{
// TODO: Factor out VCalFormat::asString()
mCalendar = calendar;
@@ -184,7 +184,7 @@ QString VCalFormat::toString( Calendar *calendar )
Event *event = events.first();
if ( !event ) {
cleanVObject( vcal );
- return QString::null;
+ return TQString::null;
}
VObject *vevent = eventToVEvent( event );
@@ -193,7 +193,7 @@ QString VCalFormat::toString( Calendar *calendar )
char *buf = writeMemVObject( 0, 0, vcal );
- QString result( buf );
+ TQString result( buf );
cleanVObject( vcal );
@@ -203,7 +203,7 @@ QString VCalFormat::toString( Calendar *calendar )
VObject *VCalFormat::eventToVTodo(const Todo *anEvent)
{
VObject *vtodo;
- QString tmpStr;
+ TQString tmpStr;
vtodo = newVObject(VCTodoProp);
@@ -304,10 +304,10 @@ VObject *VCalFormat::eventToVTodo(const Todo *anEvent)
}
// categories
- QStringList tmpStrList = anEvent->categories();
+ TQStringList tmpStrList = anEvent->categories();
tmpStr = "";
- QString catStr;
- for ( QStringList::Iterator it = tmpStrList.begin();
+ TQString catStr;
+ for ( TQStringList::Iterator it = tmpStrList.begin();
it != tmpStrList.end();
++it ) {
catStr = *it;
@@ -340,13 +340,13 @@ VObject *VCalFormat::eventToVTodo(const Todo *anEvent)
a = addProp(vtodo, VCAAlarmProp);
addPropValue(a, VCRunTimeProp, tmpStr.local8Bit());
addPropValue(a, VCRepeatCountProp, "1");
- addPropValue(a, VCAudioContentProp, QFile::encodeName(alarm->audioFile()));
+ addPropValue(a, VCAudioContentProp, TQFile::encodeName(alarm->audioFile()));
}
else if (alarm->type() == Alarm::Procedure) {
a = addProp(vtodo, VCPAlarmProp);
addPropValue(a, VCRunTimeProp, tmpStr.local8Bit());
addPropValue(a, VCRepeatCountProp, "1");
- addPropValue(a, VCProcedureNameProp, QFile::encodeName(alarm->programFile()));
+ addPropValue(a, VCProcedureNameProp, TQFile::encodeName(alarm->programFile()));
}
}
}
@@ -365,7 +365,7 @@ VObject *VCalFormat::eventToVTodo(const Todo *anEvent)
VObject* VCalFormat::eventToVEvent(const Event *anEvent)
{
VObject *vevent;
- QString tmpStr;
+ TQString tmpStr;
vevent = newVObject(VCEventProp);
@@ -430,7 +430,7 @@ VObject* VCalFormat::eventToVEvent(const Event *anEvent)
const Recurrence *recur = anEvent->recurrence();
if ( recur->doesRecur() ) {
bool validRecur = true;
- QString tmpStr2;
+ TQString tmpStr2;
switch ( recur->recurrenceType() ) {
case Recurrence::rDaily:
tmpStr.sprintf("D%i ",recur->frequency());
@@ -438,7 +438,7 @@ VObject* VCalFormat::eventToVEvent(const Event *anEvent)
case Recurrence::rWeekly:
tmpStr.sprintf("W%i ",recur->frequency());
for (int i = 0; i < 7; i++ ) {
- QBitArray days ( recur->days() );
+ TQBitArray days ( recur->days() );
if ( days.testBit(i) )
tmpStr += dayFromNum(i);
}
@@ -446,8 +446,8 @@ VObject* VCalFormat::eventToVEvent(const Event *anEvent)
case Recurrence::rMonthlyPos: {
tmpStr.sprintf("MP%i ", recur->frequency());
// write out all rMonthPos's
- QValueList<RecurrenceRule::WDayPos> tmpPositions = recur->monthPositions();
- for ( QValueListConstIterator<RecurrenceRule::WDayPos> posit = tmpPositions.begin();
+ TQValueList<RecurrenceRule::WDayPos> tmpPositions = recur->monthPositions();
+ for ( TQValueListConstIterator<RecurrenceRule::WDayPos> posit = tmpPositions.begin();
posit != tmpPositions.end(); ++posit ) {
int pos = (*posit).pos();
tmpStr2.sprintf("%i", (pos>0) ? pos : (-pos) );
@@ -462,8 +462,8 @@ VObject* VCalFormat::eventToVEvent(const Event *anEvent)
case Recurrence::rMonthlyDay: {
tmpStr.sprintf("MD%i ", recur->frequency());
// write out all rMonthDays;
- QValueList<int> tmpDays = recur->monthDays();
- for ( QValueListIterator<int> tmpDay = tmpDays.begin();
+ TQValueList<int> tmpDays = recur->monthDays();
+ for ( TQValueListIterator<int> tmpDay = tmpDays.begin();
tmpDay != tmpDays.end(); ++tmpDay ) {
tmpStr2.sprintf( "%i ", *tmpDay );
tmpStr += tmpStr2;
@@ -473,8 +473,8 @@ VObject* VCalFormat::eventToVEvent(const Event *anEvent)
tmpStr.sprintf("YM%i ", recur->frequency());
// write out all the months;'
// TODO: Any way to write out the day within the month???
- QValueList<int> months = recur->yearMonths();
- for ( QValueListIterator<int> mit = months.begin();
+ TQValueList<int> months = recur->yearMonths();
+ for ( TQValueListIterator<int> mit = months.begin();
mit != months.end(); ++mit ) {
tmpStr2.sprintf( "%i ", *mit );
tmpStr += tmpStr2;
@@ -483,8 +483,8 @@ VObject* VCalFormat::eventToVEvent(const Event *anEvent)
case Recurrence::rYearlyDay: {
tmpStr.sprintf("YD%i ", recur->frequency());
// write out all the rYearNums;
- QValueList<int> tmpDays = recur->yearDays();
- for ( QValueListIterator<int> tmpDay = tmpDays.begin();
+ TQValueList<int> tmpDays = recur->yearDays();
+ for ( TQValueListIterator<int> tmpDay = tmpDays.begin();
tmpDay != tmpDays.end(); ++tmpDay ) {
tmpStr2.sprintf( "%i ", *tmpDay );
tmpStr += tmpStr2;
@@ -515,7 +515,7 @@ VObject* VCalFormat::eventToVEvent(const Event *anEvent)
// exceptions to recurrence
DateList dateList = recur->exDates();
DateList::ConstIterator it;
- QString tmpStr2;
+ TQString tmpStr2;
for (it = dateList.begin(); it != dateList.end(); ++it) {
tmpStr = qDateToISO(*it) + ";";
@@ -564,10 +564,10 @@ VObject* VCalFormat::eventToVEvent(const Event *anEvent)
}
// categories
- QStringList tmpStrList = anEvent->categories();
+ TQStringList tmpStrList = anEvent->categories();
tmpStr = "";
- QString catStr;
- for ( QStringList::Iterator it = tmpStrList.begin();
+ TQString catStr;
+ for ( TQStringList::Iterator it = tmpStrList.begin();
it != tmpStrList.end();
++it ) {
catStr = *it;
@@ -612,13 +612,13 @@ VObject* VCalFormat::eventToVEvent(const Event *anEvent)
a = addProp(vevent, VCAAlarmProp);
addPropValue(a, VCRunTimeProp, tmpStr.local8Bit());
addPropValue(a, VCRepeatCountProp, "1");
- addPropValue(a, VCAudioContentProp, QFile::encodeName(alarm->audioFile()));
+ addPropValue(a, VCAudioContentProp, TQFile::encodeName(alarm->audioFile()));
}
if (alarm->type() == Alarm::Procedure) {
a = addProp(vevent, VCPAlarmProp);
addPropValue(a, VCRunTimeProp, tmpStr.local8Bit());
addPropValue(a, VCRepeatCountProp, "1");
- addPropValue(a, VCProcedureNameProp, QFile::encodeName(alarm->programFile()));
+ addPropValue(a, VCProcedureNameProp, TQFile::encodeName(alarm->programFile()));
}
}
}
@@ -677,8 +677,8 @@ Todo *VCalFormat::VTodoToEvent(VObject *vtodo)
deleteStr(s);
}
else
- anEvent->setLastModified(QDateTime(QDate::currentDate(),
- QTime::currentTime()));
+ anEvent->setLastModified(TQDateTime(TQDate::currentDate(),
+ TQTime::currentTime()));
// organizer
// if our extension property for the event's ORGANIZER exists, add it.
@@ -697,7 +697,7 @@ Todo *VCalFormat::VTodoToEvent(VObject *vtodo)
Attendee *a;
VObject *vp;
s = fakeCString(vObjectUStringZValue(vo));
- QString tmpStr = QString::fromLocal8Bit(s);
+ TQString tmpStr = TQString::fromLocal8Bit(s);
deleteStr(s);
tmpStr = tmpStr.simplifyWhiteSpace();
int emailPos1, emailPos2;
@@ -713,7 +713,7 @@ Todo *VCalFormat::VTodoToEvent(VObject *vtodo)
} else {
// just a name
// WTF??? Replacing the spaces of a name and using this as email?
- QString email = tmpStr.replace( ' ', '.' );
+ TQString email = tmpStr.replace( ' ', '.' );
a = new Attendee(tmpStr,email);
}
@@ -731,14 +731,14 @@ Todo *VCalFormat::VTodoToEvent(VObject *vtodo)
// description for todo
if ((vo = isAPropertyOf(vtodo, VCDescriptionProp)) != 0) {
s = fakeCString(vObjectUStringZValue(vo));
- anEvent->setDescription(QString::fromLocal8Bit(s));
+ anEvent->setDescription(TQString::fromLocal8Bit(s));
deleteStr(s);
}
// summary
if ((vo = isAPropertyOf(vtodo, VCSummaryProp))) {
s = fakeCString(vObjectUStringZValue(vo));
- anEvent->setSummary(QString::fromLocal8Bit(s));
+ anEvent->setSummary(TQString::fromLocal8Bit(s));
deleteStr(s);
}
@@ -746,7 +746,7 @@ Todo *VCalFormat::VTodoToEvent(VObject *vtodo)
// location
if ((vo = isAPropertyOf(vtodo, VCLocationProp)) != 0) {
s = fakeCString(vObjectUStringZValue(vo));
- anEvent->setLocation( QString::fromLocal8Bit(s) );
+ anEvent->setLocation( TQString::fromLocal8Bit(s) );
deleteStr(s);
}
// completed
@@ -807,14 +807,14 @@ Todo *VCalFormat::VTodoToEvent(VObject *vtodo)
if ((vo = isAPropertyOf(vtodo, VCPAlarmProp))) {
if ((a = isAPropertyOf(vo, VCProcedureNameProp))) {
s = fakeCString(vObjectUStringZValue(a));
- alarm->setProcedureAlarm(QFile::decodeName(s));
+ alarm->setProcedureAlarm(TQFile::decodeName(s));
deleteStr(s);
}
}
if ((vo = isAPropertyOf(vtodo, VCAAlarmProp))) {
if ((a = isAPropertyOf(vo, VCAudioContentProp))) {
s = fakeCString(vObjectUStringZValue(a));
- alarm->setAudioAlarm(QFile::decodeName(s));
+ alarm->setAudioAlarm(TQFile::decodeName(s));
deleteStr(s);
}
}
@@ -830,9 +830,9 @@ Todo *VCalFormat::VTodoToEvent(VObject *vtodo)
// categories
if ((vo = isAPropertyOf(vtodo, VCCategoriesProp)) != 0) {
s = fakeCString(vObjectUStringZValue(vo));
- QString categories = QString::fromLocal8Bit(s);
+ TQString categories = TQString::fromLocal8Bit(s);
deleteStr(s);
- QStringList tmpStrList = QStringList::split( ';', categories );
+ TQStringList tmpStrList = TQStringList::split( ';', categories );
anEvent->setCategories(tmpStrList);
}
@@ -892,8 +892,8 @@ Event* VCalFormat::VEventToEvent(VObject *vevent)
deleteStr(s);
}
else
- anEvent->setLastModified(QDateTime(QDate::currentDate(),
- QTime::currentTime()));
+ anEvent->setLastModified(TQDateTime(TQDate::currentDate(),
+ TQTime::currentTime()));
// organizer
// if our extension property for the event's ORGANIZER exists, add it.
@@ -913,7 +913,7 @@ Event* VCalFormat::VEventToEvent(VObject *vevent)
Attendee *a;
VObject *vp;
s = fakeCString(vObjectUStringZValue(vo));
- QString tmpStr = QString::fromLocal8Bit(s);
+ TQString tmpStr = TQString::fromLocal8Bit(s);
deleteStr(s);
tmpStr = tmpStr.simplifyWhiteSpace();
int emailPos1, emailPos2;
@@ -928,7 +928,7 @@ Event* VCalFormat::VEventToEvent(VObject *vevent)
a = new Attendee(0, tmpStr);
} else {
// just a name
- QString email = tmpStr.replace( ' ', '.' );
+ TQString email = tmpStr.replace( ' ', '.' );
a = new Attendee(tmpStr,email);
}
@@ -982,7 +982,7 @@ Event* VCalFormat::VEventToEvent(VObject *vevent)
// repeat stuff
if ((vo = isAPropertyOf(vevent, VCRRuleProp)) != 0) {
- QString tmpStr = (s = fakeCString(vObjectUStringZValue(vo)));
+ TQString tmpStr = (s = fakeCString(vObjectUStringZValue(vo)));
deleteStr(s);
tmpStr.simplifyWhiteSpace();
tmpStr = tmpStr.upper();
@@ -1024,8 +1024,8 @@ Event* VCalFormat::VEventToEvent(VObject *vevent)
break;
case Recurrence::rWeekly: {
- QBitArray qba(7);
- QString dayStr;
+ TQBitArray qba(7);
+ TQString dayStr;
if( index == last ) {
// e.g. W1 #0
qba.setBit(anEvent->dtStart().date().dayOfWeek() - 1);
@@ -1045,7 +1045,7 @@ Event* VCalFormat::VEventToEvent(VObject *vevent)
case Recurrence::rMonthlyPos: {
anEvent->recurrence()->setMonthly( rFreq );
- QBitArray qba(7);
+ TQBitArray qba(7);
short tmpPos;
if( index == last ) {
// e.g. MP1 #0
@@ -1147,7 +1147,7 @@ Event* VCalFormat::VEventToEvent(VObject *vevent)
if ( rDuration > 0 )
anEvent->recurrence()->setDuration( rDuration );
} else if ( tmpStr.find('T', index) != -1 ) {
- QDate rEndDate = (ISOToQDateTime(tmpStr.mid(index, tmpStr.length()-index))).date();
+ TQDate rEndDate = (ISOToQDateTime(tmpStr.mid(index, tmpStr.length()-index))).date();
anEvent->recurrence()->setEndDateTime( rEndDate );
}
// anEvent->recurrence()->dump();
@@ -1161,8 +1161,8 @@ Event* VCalFormat::VEventToEvent(VObject *vevent)
// recurrence exceptions
if ((vo = isAPropertyOf(vevent, VCExDateProp)) != 0) {
s = fakeCString(vObjectUStringZValue(vo));
- QStringList exDates = QStringList::split(",",s);
- QStringList::ConstIterator it;
+ TQStringList exDates = TQStringList::split(",",s);
+ TQStringList::ConstIterator it;
for(it = exDates.begin(); it != exDates.end(); ++it ) {
anEvent->recurrence()->addExDate(ISOToQDate(*it));
}
@@ -1172,7 +1172,7 @@ Event* VCalFormat::VEventToEvent(VObject *vevent)
// summary
if ((vo = isAPropertyOf(vevent, VCSummaryProp))) {
s = fakeCString(vObjectUStringZValue(vo));
- anEvent->setSummary(QString::fromLocal8Bit(s));
+ anEvent->setSummary(TQString::fromLocal8Bit(s));
deleteStr(s);
}
@@ -1181,9 +1181,9 @@ Event* VCalFormat::VEventToEvent(VObject *vevent)
s = fakeCString(vObjectUStringZValue(vo));
if (!anEvent->description().isEmpty()) {
anEvent->setDescription(anEvent->description() + "\n" +
- QString::fromLocal8Bit(s));
+ TQString::fromLocal8Bit(s));
} else {
- anEvent->setDescription(QString::fromLocal8Bit(s));
+ anEvent->setDescription(TQString::fromLocal8Bit(s));
}
deleteStr(s);
}
@@ -1191,7 +1191,7 @@ Event* VCalFormat::VEventToEvent(VObject *vevent)
// location
if ((vo = isAPropertyOf(vevent, VCLocationProp)) != 0) {
s = fakeCString(vObjectUStringZValue(vo));
- anEvent->setLocation( QString::fromLocal8Bit(s) );
+ anEvent->setLocation( TQString::fromLocal8Bit(s) );
deleteStr(s);
}
@@ -1199,7 +1199,7 @@ Event* VCalFormat::VEventToEvent(VObject *vevent)
// instead of Summary for the default field. Correct for this.
if (anEvent->summary().isEmpty() &&
!(anEvent->description().isEmpty())) {
- QString tmpStr = anEvent->description().simplifyWhiteSpace();
+ TQString tmpStr = anEvent->description().simplifyWhiteSpace();
anEvent->setDescription("");
anEvent->setSummary(tmpStr);
}
@@ -1207,7 +1207,7 @@ Event* VCalFormat::VEventToEvent(VObject *vevent)
#if 0
// status
if ((vo = isAPropertyOf(vevent, VCStatusProp)) != 0) {
- QString tmpStr(s = fakeCString(vObjectUStringZValue(vo)));
+ TQString tmpStr(s = fakeCString(vObjectUStringZValue(vo)));
deleteStr(s);
// TODO: Define Event status
// anEvent->setStatus(tmpStr);
@@ -1232,9 +1232,9 @@ Event* VCalFormat::VEventToEvent(VObject *vevent)
// categories
if ((vo = isAPropertyOf(vevent, VCCategoriesProp)) != 0) {
s = fakeCString(vObjectUStringZValue(vo));
- QString categories = QString::fromLocal8Bit(s);
+ TQString categories = TQString::fromLocal8Bit(s);
deleteStr(s);
- QStringList tmpStrList = QStringList::split( ',', categories );
+ TQStringList tmpStrList = TQStringList::split( ',', categories );
anEvent->setCategories(tmpStrList);
}
@@ -1244,16 +1244,16 @@ Event* VCalFormat::VEventToEvent(VObject *vevent)
vo = nextVObject(&voi);
if (strcmp(vObjectName(vo), VCAttachProp) == 0) {
s = fakeCString(vObjectUStringZValue(vo));
- anEvent->addAttachment(new Attachment(QString(s)));
+ anEvent->addAttachment(new Attachment(TQString(s)));
deleteStr(s);
}
}
// resources
if ((vo = isAPropertyOf(vevent, VCResourcesProp)) != 0) {
- QString resources = (s = fakeCString(vObjectUStringZValue(vo)));
+ TQString resources = (s = fakeCString(vObjectUStringZValue(vo)));
deleteStr(s);
- QStringList tmpStrList = QStringList::split( ';', resources );
+ TQStringList tmpStrList = TQStringList::split( ';', resources );
anEvent->setResources(tmpStrList);
}
@@ -1269,14 +1269,14 @@ Event* VCalFormat::VEventToEvent(VObject *vevent)
if ((vo = isAPropertyOf(vevent, VCPAlarmProp))) {
if ((a = isAPropertyOf(vo, VCProcedureNameProp))) {
s = fakeCString(vObjectUStringZValue(a));
- alarm->setProcedureAlarm(QFile::decodeName(s));
+ alarm->setProcedureAlarm(TQFile::decodeName(s));
deleteStr(s);
}
}
if ((vo = isAPropertyOf(vevent, VCAAlarmProp))) {
if ((a = isAPropertyOf(vo, VCAudioContentProp))) {
s = fakeCString(vObjectUStringZValue(a));
- alarm->setAudioAlarm(QFile::decodeName(s));
+ alarm->setAudioAlarm(TQFile::decodeName(s));
deleteStr(s);
}
}
@@ -1321,9 +1321,9 @@ Event* VCalFormat::VEventToEvent(VObject *vevent)
}
-QString VCalFormat::qDateToISO(const QDate &qd)
+TQString VCalFormat::qDateToISO(const TQDate &qd)
{
- QString tmpStr;
+ TQString tmpStr;
Q_ASSERT(qd.isValid());
@@ -1335,7 +1335,7 @@ QString VCalFormat::qDateToISO(const QDate &qd)
/* Return the offset of the named zone as seconds. tt is a time
indicating the date for which you want the offset */
-int vcaltime_utc_offset( QDateTime ictt, QString tzid )
+int vcaltime_utc_offset( TQDateTime ictt, TQString tzid )
{
// libical-0.23 stuff:
// struct icaltimetype tt = icaltime_from_timet( ictt.toTime_t(), false );
@@ -1349,14 +1349,14 @@ int vcaltime_utc_offset( QDateTime ictt, QString tzid )
&tt, &daylight );
}
-QString VCalFormat::qDateTimeToISO(const QDateTime &qdt, bool zulu)
+TQString VCalFormat::qDateTimeToISO(const TQDateTime &qdt, bool zulu)
{
- QString tmpStr;
+ TQString tmpStr;
Q_ASSERT(qdt.date().isValid());
Q_ASSERT(qdt.time().isValid());
if (zulu) {
- QDateTime tmpDT(qdt);
+ TQDateTime tmpDT(qdt);
// correct to GMT:
tmpDT = tmpDT.addSecs(-vcaltime_utc_offset( tmpDT, mCalendar->timeZoneId()));
tmpStr.sprintf( "%.2d%.2d%.2dT%.2d%.2d%.2dZ",
@@ -1372,11 +1372,11 @@ QString VCalFormat::qDateTimeToISO(const QDateTime &qdt, bool zulu)
return tmpStr;
}
-QDateTime VCalFormat::ISOToQDateTime(const QString & dtStr)
+TQDateTime VCalFormat::ISOToQDateTime(const TQString & dtStr)
{
- QDate tmpDate;
- QTime tmpTime;
- QString tmpStr;
+ TQDate tmpDate;
+ TQTime tmpTime;
+ TQString tmpStr;
int year, month, day, hour, minute, second;
tmpStr = dtStr;
@@ -1391,7 +1391,7 @@ QDateTime VCalFormat::ISOToQDateTime(const QString & dtStr)
Q_ASSERT(tmpDate.isValid());
Q_ASSERT(tmpTime.isValid());
- QDateTime tmpDT(tmpDate, tmpTime);
+ TQDateTime tmpDT(tmpDate, tmpTime);
// correct for GMT if string is in Zulu format
if (dtStr.at(dtStr.length()-1) == 'Z') {
tmpDT = tmpDT.addSecs(vcaltime_utc_offset( tmpDT, mCalendar->timeZoneId()));
@@ -1399,7 +1399,7 @@ QDateTime VCalFormat::ISOToQDateTime(const QString & dtStr)
return tmpDT;
}
-QDate VCalFormat::ISOToQDate(const QString &dateStr)
+TQDate VCalFormat::ISOToQDate(const TQString &dateStr)
{
int year, month, day;
@@ -1407,7 +1407,7 @@ QDate VCalFormat::ISOToQDate(const QString &dateStr)
month = dateStr.mid(4,2).toInt();
day = dateStr.mid(6,2).toInt();
- return(QDate(year, month, day));
+ return(TQDate(year, month, day));
}
// take a raw vcalendar (i.e. from a file on disk, clipboard, etc. etc.
@@ -1490,7 +1490,7 @@ void VCalFormat::populate(VObject *vcal)
// to be the case, we skip the event.
if ((curVOProp = isAPropertyOf(curVO, VCUniqueStringProp)) != 0) {
char *s = fakeCString(vObjectUStringZValue(curVOProp));
- QString tmpStr(s);
+ TQString tmpStr(s);
deleteStr(s);
if (mCalendar->incidence(tmpStr)) {
@@ -1552,7 +1552,7 @@ const char *VCalFormat::dayFromNum(int day)
return days[day];
}
-int VCalFormat::numFromDay(const QString &day)
+int VCalFormat::numFromDay(const TQString &day)
{
if (day == "MO ") return 0;
if (day == "TU ") return 1;
@@ -1567,7 +1567,7 @@ int VCalFormat::numFromDay(const QString &day)
Attendee::PartStat VCalFormat::readStatus(const char *s) const
{
- QString statStr = s;
+ TQString statStr = s;
statStr = statStr.upper();
Attendee::PartStat status;
@@ -1597,7 +1597,7 @@ Attendee::PartStat VCalFormat::readStatus(const char *s) const
return status;
}
-QCString VCalFormat::writeStatus(Attendee::PartStat status) const
+TQCString VCalFormat::writeStatus(Attendee::PartStat status) const
{
switch(status) {
default:
diff --git a/libkcal/vcalformat.h b/libkcal/vcalformat.h
index 039ecfc2d..cb51f4171 100644
--- a/libkcal/vcalformat.h
+++ b/libkcal/vcalformat.h
@@ -54,7 +54,7 @@ class LIBKCAL_EXPORT VCalFormat : public CalFormat
@param fileName Name of the vCalendar file on disk.
@return true on success, otherwise false
*/
- bool load( Calendar *calendar, const QString &fileName );
+ bool load( Calendar *calendar, const TQString &fileName );
/**
Writes out the given calendar to disk in vCalendar format.
@@ -62,16 +62,16 @@ class LIBKCAL_EXPORT VCalFormat : public CalFormat
@param fileName the name of the file
@return true on success, otherwise false
*/
- bool save(Calendar *calendar, const QString &fileName);
+ bool save(Calendar *calendar, const TQString &fileName);
/**
Parse string and populate calendar with that information.
*/
- bool fromString( Calendar *, const QString & );
+ bool fromString( Calendar *, const TQString & );
/**
Return calendar information as string.
*/
- QString toString( Calendar * );
+ TQString toString( Calendar * );
protected:
/** translates a VObject of the TODO type into a Event */
@@ -83,16 +83,16 @@ class LIBKCAL_EXPORT VCalFormat : public CalFormat
/** translate a Event into a VObject and returns a pointer to it. */
VObject* eventToVEvent(const Event *anEvent);
- /** takes a QDate and returns a string in the format YYYYMMDDTHHMMSS */
- QString qDateToISO(const QDate &);
- /** takes a QDateTime and returns a string in format YYYYMMDDTHHMMSS */
- QString qDateTimeToISO(const QDateTime &, bool zulu=TRUE);
+ /** takes a TQDate and returns a string in the format YYYYMMDDTHHMMSS */
+ TQString qDateToISO(const TQDate &);
+ /** takes a TQDateTime and returns a string in format YYYYMMDDTHHMMSS */
+ TQString qDateTimeToISO(const TQDateTime &, bool zulu=TRUE);
/** takes a string in the format YYYYMMDDTHHMMSS and returns a
- * valid QDateTime. */
- QDateTime ISOToQDateTime(const QString & dtStr);
+ * valid TQDateTime. */
+ TQDateTime ISOToQDateTime(const TQString & dtStr);
/** takes a string in the format YYYYMMDD and returns a
- * valid QDate. */
- QDate ISOToQDate(const QString & dtStr);
+ * valid TQDate. */
+ TQDate ISOToQDate(const TQString & dtStr);
/** takes a vCalendar tree of VObjects, and puts all of them that have
* the "event" property into the dictionary, todos in the todo-list, etc. */
void populate(VObject *vcal);
@@ -101,10 +101,10 @@ class LIBKCAL_EXPORT VCalFormat : public CalFormat
* i.e. MO, TU, WE, etc. */
const char *dayFromNum(int day);
/** the reverse of the above function. */
- int numFromDay(const QString &day);
+ int numFromDay(const TQString &day);
Attendee::PartStat readStatus(const char *s) const;
- QCString writeStatus(Attendee::PartStat status) const;
+ TQCString writeStatus(Attendee::PartStat status) const;
private:
Calendar *mCalendar;
diff --git a/libkdenetwork/gpgmepp/eventloopinteractor.h b/libkdenetwork/gpgmepp/eventloopinteractor.h
index fb0778489..5a07490da 100644
--- a/libkdenetwork/gpgmepp/eventloopinteractor.h
+++ b/libkdenetwork/gpgmepp/eventloopinteractor.h
@@ -67,11 +67,11 @@ namespace GpgME {
and return a tag identifying that particular watching process
uniquely. This could be the index into an array of objects you
use for that purpose or the address of such an object. E.g. in
- Qt, you'd essentially just create a new \c QSocketNotifier:
+ Qt, you'd essentially just create a new \c TQSocketNotifier:
\verbatim
void * registerWatcher( int fd, Direction dir ) {
- return new QSocketNotifier( fd, dir == Read ? QSocketNotifier::Read : QSocketNotifier::Write );
+ return new TQSocketNotifier( fd, dir == Read ? TQSocketNotifier::Read : TQSocketNotifier::Write );
// misses connecting to the activated() signal...
}
\endverbatim
@@ -84,7 +84,7 @@ namespace GpgME {
\verbatim
void unregisterWatcher( void * tag ) {
- delete static_cast<QSocketNotifier*>( tag );
+ delete static_cast<TQSocketNotifier*>( tag );
}
\endverbatim
diff --git a/libkdenetwork/qgpgme/dataprovider.cpp b/libkdenetwork/qgpgme/dataprovider.cpp
index 8b3ae2857..3fe991d95 100644
--- a/libkdenetwork/qgpgme/dataprovider.cpp
+++ b/libkdenetwork/qgpgme/dataprovider.cpp
@@ -28,7 +28,7 @@
#include <assert.h>
#include <unistd.h>
-static bool resizeAndInit( QByteArray & ba, size_t newSize ) {
+static bool resizeAndInit( TQByteArray & ba, size_t newSize ) {
const size_t oldSize = ba.size();
bool ok = ba.resize( newSize );
if ( ok )
@@ -39,7 +39,7 @@ static bool resizeAndInit( QByteArray & ba, size_t newSize ) {
QGpgME::QByteArrayDataProvider::QByteArrayDataProvider()
: GpgME::DataProvider(), mOff( 0 ) {}
-QGpgME::QByteArrayDataProvider::QByteArrayDataProvider( const QByteArray & initialData )
+QGpgME::QByteArrayDataProvider::QByteArrayDataProvider( const TQByteArray & initialData )
: GpgME::DataProvider(), mArray( initialData ), mOff( 0 ) {}
QGpgME::QByteArrayDataProvider::~QByteArrayDataProvider() {}
@@ -103,5 +103,5 @@ void QGpgME::QByteArrayDataProvider::release() {
#ifndef NDEBUG
qDebug( "QGpgME::QByteArrayDataProvider::release()" );
#endif
- mArray = QByteArray();
+ mArray = TQByteArray();
}
diff --git a/libkdenetwork/qgpgme/dataprovider.h b/libkdenetwork/qgpgme/dataprovider.h
index c784fa8d9..52957afa5 100644
--- a/libkdenetwork/qgpgme/dataprovider.h
+++ b/libkdenetwork/qgpgme/dataprovider.h
@@ -23,7 +23,7 @@
#include <gpgmepp/interfaces/dataprovider.h>
-#include <qcstring.h>
+#include <tqcstring.h>
#include <kdepimmacros.h>
namespace QGpgME {
@@ -31,10 +31,10 @@ namespace QGpgME {
class KDE_EXPORT QByteArrayDataProvider : public GpgME::DataProvider {
public:
QByteArrayDataProvider();
- QByteArrayDataProvider( const QByteArray & initialData );
+ QByteArrayDataProvider( const TQByteArray & initialData );
~QByteArrayDataProvider();
- const QByteArray & data() const { return mArray; }
+ const TQByteArray & data() const { return mArray; }
private:
// these shall only be accessed through the dataprovider
@@ -51,7 +51,7 @@ namespace QGpgME {
void release();
private:
- QByteArray mArray;
+ TQByteArray mArray;
off_t mOff;
};
diff --git a/libkdenetwork/qgpgme/eventloopinteractor.cpp b/libkdenetwork/qgpgme/eventloopinteractor.cpp
index 40b81664e..9396385b7 100644
--- a/libkdenetwork/qgpgme/eventloopinteractor.cpp
+++ b/libkdenetwork/qgpgme/eventloopinteractor.cpp
@@ -27,18 +27,18 @@
#include <gpgmepp/context.h>
-#include <qsocketnotifier.h>
-#include <qapplication.h>
+#include <tqsocketnotifier.h>
+#include <tqapplication.h>
using namespace GpgME;
-QGpgME::EventLoopInteractor::EventLoopInteractor( QObject * parent, const char * name )
- : QObject( parent, name ), GpgME::EventLoopInteractor()
+QGpgME::EventLoopInteractor::EventLoopInteractor( TQObject * parent, const char * name )
+ : TQObject( parent, name ), GpgME::EventLoopInteractor()
{
if ( !parent )
if ( qApp ) {
- connect( qApp, SIGNAL(aboutToQuit()), SLOT(deleteLater()) );
- connect( qApp, SIGNAL(aboutToQuit()), SIGNAL(aboutToDestroy()) );
+ connect( qApp, TQT_SIGNAL(aboutToQuit()), TQT_SLOT(deleteLater()) );
+ connect( qApp, TQT_SIGNAL(aboutToQuit()), TQT_SIGNAL(aboutToDestroy()) );
}
mSelf = this;
}
@@ -54,7 +54,7 @@ QGpgME::EventLoopInteractor * QGpgME::EventLoopInteractor::instance() {
if ( !mSelf )
#ifndef NDEBUG
if ( !qApp )
- qWarning( "QGpgME::EventLoopInteractor: Need a QApplication object before calling instance()!" );
+ qWarning( "QGpgME::EventLoopInteractor: Need a TQApplication object before calling instance()!" );
else
#endif
(void)new EventLoopInteractor( 0, "QGpgME::EventLoopInteractor::instance()" );
@@ -62,18 +62,18 @@ QGpgME::EventLoopInteractor * QGpgME::EventLoopInteractor::instance() {
}
void * QGpgME::EventLoopInteractor::registerWatcher( int fd, Direction dir, bool & ok ) {
- QSocketNotifier * sn = new QSocketNotifier( fd,
- dir == Read ? QSocketNotifier::Read : QSocketNotifier::Write );
+ TQSocketNotifier * sn = new TQSocketNotifier( fd,
+ dir == Read ? TQSocketNotifier::Read : TQSocketNotifier::Write );
if ( dir == Read )
- connect( sn, SIGNAL(activated(int)), SLOT(slotReadActivity(int)) );
+ connect( sn, TQT_SIGNAL(activated(int)), TQT_SLOT(slotReadActivity(int)) );
else
- connect( sn, SIGNAL(activated(int)), SLOT(slotWriteActivity(int)) );
+ connect( sn, TQT_SIGNAL(activated(int)), TQT_SLOT(slotWriteActivity(int)) );
ok = true; // Can above operations fails?
return sn;
}
void QGpgME::EventLoopInteractor::unregisterWatcher( void * tag ) {
- delete static_cast<QSocketNotifier*>( tag );
+ delete static_cast<TQSocketNotifier*>( tag );
}
void QGpgME::EventLoopInteractor::slotWriteActivity( int socket ) {
diff --git a/libkdenetwork/qgpgme/eventloopinteractor.h b/libkdenetwork/qgpgme/eventloopinteractor.h
index 7ac264eeb..73d9a1778 100644
--- a/libkdenetwork/qgpgme/eventloopinteractor.h
+++ b/libkdenetwork/qgpgme/eventloopinteractor.h
@@ -23,7 +23,7 @@
#include <gpgmepp/eventloopinteractor.h>
-#include <qobject.h>
+#include <tqobject.h>
#include <kdepimmacros.h>
namespace GpgME {
@@ -35,10 +35,10 @@ namespace GpgME {
namespace QGpgME {
- class KDE_EXPORT EventLoopInteractor : public QObject, public GpgME::EventLoopInteractor {
+ class KDE_EXPORT EventLoopInteractor : public TQObject, public GpgME::EventLoopInteractor {
Q_OBJECT
protected:
- EventLoopInteractor( QObject * parent, const char * name=0 );
+ EventLoopInteractor( TQObject * parent, const char * name=0 );
public:
virtual ~EventLoopInteractor();
diff --git a/libkdenetwork/qgpgme/tests/dataprovidertest.cpp b/libkdenetwork/qgpgme/tests/dataprovidertest.cpp
index da87b0300..2493c5860 100644
--- a/libkdenetwork/qgpgme/tests/dataprovidertest.cpp
+++ b/libkdenetwork/qgpgme/tests/dataprovidertest.cpp
@@ -69,7 +69,7 @@ int main( int, char** ) {
assertEqual( data.write( input, inputSize ), inputSize );
- const QByteArray ba1 = qba_dp.data();
+ const TQByteArray ba1 = qba_dp.data();
assertEqual( ba1.size(), inputSize );
assertEqual( memcmp( ba1.data(), input, inputSize ), 0 );
@@ -90,7 +90,7 @@ int main( int, char** ) {
// writing single char at end:
assertEqual( data.seek( 0, SEEK_END ), inputSize );
assertEqual( data.write( &ch, 1 ) , 1 );
- const QByteArray ba2 = qba_dp.data();
+ const TQByteArray ba2 = qba_dp.data();
assertEqual( ba2.size(), inputSize + 1 );
assertEqual( memcmp( ba2.data(), input, inputSize ), 0 );
assertEqual( ba2[inputSize], ch );
@@ -98,7 +98,7 @@ int main( int, char** ) {
// writing past end of buffer:
assertEqual( data.seek( 10, SEEK_END ), inputSize + 11 );
assertEqual( data.write( &ch, 1 ), 1 );
- const QByteArray ba3 = qba_dp.data();
+ const TQByteArray ba3 = qba_dp.data();
assertEqual( ba3.size(), inputSize + 12 );
assertEqual( memcmp( ba3.data(), input, inputSize ), 0 );
assertEqual( ba3[inputSize], ch );
@@ -110,14 +110,14 @@ int main( int, char** ) {
//
// QByteArrayDataProvider with initial data:
//
- QByteArray ba;
+ TQByteArray ba;
ba.duplicate( input, inputSize );
QGpgME::QByteArrayDataProvider qba_dp( ba );
Data data( &qba_dp );
assertEqual( data.seek( 0, SEEK_END ), inputSize );
assertEqual( data.seek( 0, SEEK_SET ), 0 );
- const QByteArray ba1 = qba_dp.data();
+ const TQByteArray ba1 = qba_dp.data();
assertEqual( ba1.size(), inputSize );
assertEqual( memcmp( ba1.data(), input, inputSize ), 0 );
}
diff --git a/libkdepim/addresseediffalgo.cpp b/libkdepim/addresseediffalgo.cpp
index 23970607a..361ec631f 100644
--- a/libkdepim/addresseediffalgo.cpp
+++ b/libkdepim/addresseediffalgo.cpp
@@ -23,7 +23,7 @@
using namespace KPIM;
-static bool compareString( const QString &left, const QString &right )
+static bool compareString( const TQString &left, const TQString &right )
{
if ( left.isEmpty() && right.isEmpty() )
return true;
@@ -120,19 +120,19 @@ void AddresseeDiffAlgo::run()
end();
}
-QString AddresseeDiffAlgo::toString( const KABC::PhoneNumber &number )
+TQString AddresseeDiffAlgo::toString( const KABC::PhoneNumber &number )
{
return number.number();
}
-QString AddresseeDiffAlgo::toString( const KABC::Address &addr )
+TQString AddresseeDiffAlgo::toString( const KABC::Address &addr )
{
return addr.formattedAddress();
}
template <class L>
-void AddresseeDiffAlgo::diffList( const QString &id,
- const QValueList<L> &left, const QValueList<L> &right )
+void AddresseeDiffAlgo::diffList( const TQString &id,
+ const TQValueList<L> &left, const TQValueList<L> &right )
{
for ( uint i = 0; i < left.count(); ++i ) {
if ( right.find( left[ i ] ) == right.end() )
diff --git a/libkdepim/addresseediffalgo.h b/libkdepim/addresseediffalgo.h
index fea5bab51..dbfac9a55 100644
--- a/libkdepim/addresseediffalgo.h
+++ b/libkdepim/addresseediffalgo.h
@@ -36,10 +36,10 @@ class KDE_EXPORT AddresseeDiffAlgo : public DiffAlgo
private:
template <class L>
- void diffList( const QString &id, const QValueList<L> &left, const QValueList<L> &right );
+ void diffList( const TQString &id, const TQValueList<L> &left, const TQValueList<L> &right );
- QString toString( const KABC::PhoneNumber &number );
- QString toString( const KABC::Address &address );
+ TQString toString( const KABC::PhoneNumber &number );
+ TQString toString( const KABC::Address &address );
KABC::Addressee mLeftAddressee;
KABC::Addressee mRightAddressee;
diff --git a/libkdepim/addresseeemailselection.cpp b/libkdepim/addresseeemailselection.cpp
index d5a8c02a3..f5d840c9c 100644
--- a/libkdepim/addresseeemailselection.cpp
+++ b/libkdepim/addresseeemailselection.cpp
@@ -40,7 +40,7 @@ uint AddresseeEmailSelection::fieldCount() const
return 3;
}
-QString AddresseeEmailSelection::fieldTitle( uint index ) const
+TQString AddresseeEmailSelection::fieldTitle( uint index ) const
{
switch ( index ) {
case 0:
@@ -53,21 +53,21 @@ QString AddresseeEmailSelection::fieldTitle( uint index ) const
return i18n( "Bcc" );
break;
default:
- return QString::null;
+ return TQString::null;
}
}
-QStringList AddresseeEmailSelection::to() const
+TQStringList AddresseeEmailSelection::to() const
{
return mToEmailList;
}
-QStringList AddresseeEmailSelection::cc() const
+TQStringList AddresseeEmailSelection::cc() const
{
return mCcEmailList;
}
-QStringList AddresseeEmailSelection::bcc() const
+TQStringList AddresseeEmailSelection::bcc() const
{
return mBccEmailList;
}
@@ -87,32 +87,32 @@ KABC::Addressee::List AddresseeEmailSelection::bccAddresses() const
return mBccAddresseeList;
}
-QStringList AddresseeEmailSelection::toDistributionLists() const
+TQStringList AddresseeEmailSelection::toDistributionLists() const
{
return mToDistributionList;
}
-QStringList AddresseeEmailSelection::ccDistributionLists() const
+TQStringList AddresseeEmailSelection::ccDistributionLists() const
{
return mCcDistributionList;
}
-QStringList AddresseeEmailSelection::bccDistributionLists() const
+TQStringList AddresseeEmailSelection::bccDistributionLists() const
{
return mBccDistributionList;
}
-void AddresseeEmailSelection::setSelectedTo( const QStringList &emails )
+void AddresseeEmailSelection::setSelectedTo( const TQStringList &emails )
{
setSelectedItem( 0, emails );
}
-void AddresseeEmailSelection::setSelectedCC( const QStringList &emails )
+void AddresseeEmailSelection::setSelectedCC( const TQStringList &emails )
{
setSelectedItem( 1, emails );
}
-void AddresseeEmailSelection::setSelectedBCC( const QStringList &emails )
+void AddresseeEmailSelection::setSelectedBCC( const TQStringList &emails )
{
setSelectedItem( 2, emails );
}
@@ -123,12 +123,12 @@ uint AddresseeEmailSelection::itemCount( const KABC::Addressee &addressee ) cons
return addressee.emails().count();
}
-QString AddresseeEmailSelection::itemText( const KABC::Addressee &addressee, uint index ) const
+TQString AddresseeEmailSelection::itemText( const KABC::Addressee &addressee, uint index ) const
{
return addressee.formattedName() + " " + email( addressee, index );
}
-QPixmap AddresseeEmailSelection::itemIcon( const KABC::Addressee &addressee, uint ) const
+TQPixmap AddresseeEmailSelection::itemIcon( const KABC::Addressee &addressee, uint ) const
{
if ( !addressee.photo().data().isNull() )
return addressee.photo().data().smoothScale( 16, 16 );
@@ -141,24 +141,24 @@ bool AddresseeEmailSelection::itemEnabled( const KABC::Addressee &addressee, uin
return addressee.emails().count() != 0;
}
-bool AddresseeEmailSelection::itemMatches( const KABC::Addressee &addressee, uint index, const QString &pattern ) const
+bool AddresseeEmailSelection::itemMatches( const KABC::Addressee &addressee, uint index, const TQString &pattern ) const
{
return addressee.formattedName().startsWith( pattern, false ) ||
email( addressee, index ).startsWith( pattern, false );
}
-bool AddresseeEmailSelection::itemEquals( const KABC::Addressee &addressee, uint index, const QString &pattern ) const
+bool AddresseeEmailSelection::itemEquals( const KABC::Addressee &addressee, uint index, const TQString &pattern ) const
{
return (pattern == addressee.formattedName() + " " + email( addressee, index )) ||
(addressee.emails().contains( pattern ));
}
-QString AddresseeEmailSelection::distributionListText( const KABC::DistributionList *distributionList ) const
+TQString AddresseeEmailSelection::distributionListText( const KABC::DistributionList *distributionList ) const
{
return distributionList->name();
}
-QPixmap AddresseeEmailSelection::distributionListIcon( const KABC::DistributionList* ) const
+TQPixmap AddresseeEmailSelection::distributionListIcon( const KABC::DistributionList* ) const
{
return KGlobal::iconLoader()->loadIcon( "kdmconfig", KIcon::Small );
}
@@ -169,7 +169,7 @@ bool AddresseeEmailSelection::distributionListEnabled( const KABC::DistributionL
}
bool AddresseeEmailSelection::distributionListMatches( const KABC::DistributionList *distributionList,
- const QString &pattern ) const
+ const TQString &pattern ) const
{
// check whether the name of the distribution list matches the pattern or one of its entries.
bool ok = distributionList->name().startsWith( pattern, false );
@@ -190,12 +190,12 @@ uint AddresseeEmailSelection::addressBookCount() const
return 1;
}
-QString AddresseeEmailSelection::addressBookTitle( uint index ) const
+TQString AddresseeEmailSelection::addressBookTitle( uint index ) const
{
if ( index == 0 )
return i18n( "Recent Addresses" );
else
- return QString::null;
+ return TQString::null;
}
KABC::Addressee::List AddresseeEmailSelection::addressBookContent( uint index ) const
@@ -208,14 +208,14 @@ KABC::Addressee::List AddresseeEmailSelection::addressBookContent( uint index )
}
}
-QString AddresseeEmailSelection::email( const KABC::Addressee &addressee, uint index ) const
+TQString AddresseeEmailSelection::email( const KABC::Addressee &addressee, uint index ) const
{
return addressee.emails()[ index ];
}
-void AddresseeEmailSelection::setSelectedItem( uint fieldIndex, const QStringList &emails )
+void AddresseeEmailSelection::setSelectedItem( uint fieldIndex, const TQStringList &emails )
{
- QStringList::ConstIterator it;
+ TQStringList::ConstIterator it;
for ( it = emails.begin(); it != emails.end(); ++it ) {
KABC::Addressee addr;
addr.insertEmail( *it, true );
diff --git a/libkdepim/addresseeemailselection.h b/libkdepim/addresseeemailselection.h
index ca96306f2..58acd8cb3 100644
--- a/libkdepim/addresseeemailselection.h
+++ b/libkdepim/addresseeemailselection.h
@@ -39,7 +39,7 @@ class KDE_EXPORT AddresseeEmailSelection : public Selection
/**
Returns the title for the field specified by index.
*/
- virtual QString fieldTitle( uint index ) const;
+ virtual TQString fieldTitle( uint index ) const;
/**
Returns the number of items for the given addressee.
@@ -49,12 +49,12 @@ class KDE_EXPORT AddresseeEmailSelection : public Selection
/**
Returns the text that's used for the item specified by index.
*/
- virtual QString itemText( const KABC::Addressee &addresse, uint index ) const;
+ virtual TQString itemText( const KABC::Addressee &addresse, uint index ) const;
/**
Returns the icon that's used for the item specified by index.
*/
- virtual QPixmap itemIcon( const KABC::Addressee &addresse, uint index ) const;
+ virtual TQPixmap itemIcon( const KABC::Addressee &addresse, uint index ) const;
/**
Returns whether the item specified by index is enabled.
@@ -64,22 +64,22 @@ class KDE_EXPORT AddresseeEmailSelection : public Selection
/**
Returns whether the item specified by index matches the passed pattern.
*/
- virtual bool itemMatches( const KABC::Addressee &addresse, uint index, const QString &pattern ) const;
+ virtual bool itemMatches( const KABC::Addressee &addresse, uint index, const TQString &pattern ) const;
/**
Returns whether the item specified by index equals the passed pattern.
*/
- virtual bool itemEquals( const KABC::Addressee &addresse, uint index, const QString &pattern ) const;
+ virtual bool itemEquals( const KABC::Addressee &addresse, uint index, const TQString &pattern ) const;
/**
Returns the text that's used for the given distribution list.
*/
- virtual QString distributionListText( const KABC::DistributionList *distributionList ) const;
+ virtual TQString distributionListText( const KABC::DistributionList *distributionList ) const;
/**
Returns the icon that's used for the given distribution list.
*/
- virtual QPixmap distributionListIcon( const KABC::DistributionList *distributionList ) const;
+ virtual TQPixmap distributionListIcon( const KABC::DistributionList *distributionList ) const;
/**
Returns whether the given distribution list is enabled.
@@ -90,7 +90,7 @@ class KDE_EXPORT AddresseeEmailSelection : public Selection
Returns whether the given distribution list matches the passed pattern.
*/
virtual bool distributionListMatches( const KABC::DistributionList *distributionList,
- const QString &pattern ) const;
+ const TQString &pattern ) const;
/**
Returns the number of additional address books.
@@ -100,47 +100,47 @@ class KDE_EXPORT AddresseeEmailSelection : public Selection
/**
Returns the title for an additional address book.
*/
- virtual QString addressBookTitle( uint index ) const;
+ virtual TQString addressBookTitle( uint index ) const;
/**
Returns the content for an additional address book.
*/
virtual KABC::Addressee::List addressBookContent( uint index ) const;
- QStringList to() const;
- QStringList cc() const;
- QStringList bcc() const;
+ TQStringList to() const;
+ TQStringList cc() const;
+ TQStringList bcc() const;
KABC::Addressee::List toAddresses() const;
KABC::Addressee::List ccAddresses() const;
KABC::Addressee::List bccAddresses() const;
- QStringList toDistributionLists() const;
- QStringList ccDistributionLists() const;
- QStringList bccDistributionLists() const;
+ TQStringList toDistributionLists() const;
+ TQStringList ccDistributionLists() const;
+ TQStringList bccDistributionLists() const;
- void setSelectedTo( const QStringList &emails );
- void setSelectedCC( const QStringList &emails );
- void setSelectedBCC( const QStringList &emails );
+ void setSelectedTo( const TQStringList &emails );
+ void setSelectedCC( const TQStringList &emails );
+ void setSelectedBCC( const TQStringList &emails );
private:
virtual void addSelectedAddressees( uint fieldIndex, const KABC::Addressee&, uint itemIndex );
virtual void addSelectedDistributionList( uint fieldIndex, const KABC::DistributionList* );
- QString email( const KABC::Addressee&, uint ) const;
- void setSelectedItem( uint fieldIndex, const QStringList& );
+ TQString email( const KABC::Addressee&, uint ) const;
+ void setSelectedItem( uint fieldIndex, const TQStringList& );
KABC::Addressee::List mToAddresseeList;
KABC::Addressee::List mCcAddresseeList;
KABC::Addressee::List mBccAddresseeList;
- QStringList mToEmailList;
- QStringList mCcEmailList;
- QStringList mBccEmailList;
+ TQStringList mToEmailList;
+ TQStringList mCcEmailList;
+ TQStringList mBccEmailList;
- QStringList mToDistributionList;
- QStringList mCcDistributionList;
- QStringList mBccDistributionList;
+ TQStringList mToDistributionList;
+ TQStringList mCcDistributionList;
+ TQStringList mBccDistributionList;
};
}
diff --git a/libkdepim/addresseelineedit.cpp b/libkdepim/addresseelineedit.cpp
index a40ad3551..7031a83eb 100644
--- a/libkdepim/addresseelineedit.cpp
+++ b/libkdepim/addresseelineedit.cpp
@@ -50,57 +50,57 @@
#include <kurldrag.h>
#include <klocale.h>
-#include <qpopupmenu.h>
-#include <qapplication.h>
-#include <qobject.h>
-#include <qptrlist.h>
-#include <qregexp.h>
-#include <qevent.h>
-#include <qdragobject.h>
-#include <qclipboard.h>
+#include <tqpopupmenu.h>
+#include <tqapplication.h>
+#include <tqobject.h>
+#include <tqptrlist.h>
+#include <tqregexp.h>
+#include <tqevent.h>
+#include <tqdragobject.h>
+#include <tqclipboard.h>
using namespace KPIM;
KMailCompletion * AddresseeLineEdit::s_completion = 0L;
KPIM::CompletionItemsMap* AddresseeLineEdit::s_completionItemMap = 0L;
-QStringList* AddresseeLineEdit::s_completionSources = 0L;
+TQStringList* AddresseeLineEdit::s_completionSources = 0L;
bool AddresseeLineEdit::s_addressesDirty = false;
-QTimer* AddresseeLineEdit::s_LDAPTimer = 0L;
+TQTimer* AddresseeLineEdit::s_LDAPTimer = 0L;
KPIM::LdapSearch* AddresseeLineEdit::s_LDAPSearch = 0L;
-QString* AddresseeLineEdit::s_LDAPText = 0L;
+TQString* AddresseeLineEdit::s_LDAPText = 0L;
AddresseeLineEdit* AddresseeLineEdit::s_LDAPLineEdit = 0L;
static KStaticDeleter<KMailCompletion> completionDeleter;
static KStaticDeleter<KPIM::CompletionItemsMap> completionItemsDeleter;
-static KStaticDeleter<QTimer> ldapTimerDeleter;
+static KStaticDeleter<TQTimer> ldapTimerDeleter;
static KStaticDeleter<KPIM::LdapSearch> ldapSearchDeleter;
-static KStaticDeleter<QString> ldapTextDeleter;
-static KStaticDeleter<QStringList> completionSourcesDeleter;
+static KStaticDeleter<TQString> ldapTextDeleter;
+static KStaticDeleter<TQStringList> completionSourcesDeleter;
// needs to be unique, but the actual name doesn't matter much
-static QCString newLineEditDCOPObjectName()
+static TQCString newLineEditDCOPObjectName()
{
static int s_count = 0;
- QCString name( "KPIM::AddresseeLineEdit" );
+ TQCString name( "KPIM::AddresseeLineEdit" );
if ( s_count++ ) {
name += '-';
- name += QCString().setNum( s_count );
+ name += TQCString().setNum( s_count );
}
return name;
}
-static const QString s_completionItemIndentString = " ";
+static const TQString s_completionItemIndentString = " ";
-static bool itemIsHeader( const QListBoxItem* item )
+static bool itemIsHeader( const TQListBoxItem* item )
{
return item && !item->text().startsWith( s_completionItemIndentString );
}
-AddresseeLineEdit::AddresseeLineEdit( QWidget* parent, bool useCompletion,
+AddresseeLineEdit::AddresseeLineEdit( TQWidget* parent, bool useCompletion,
const char *name )
- : ClickLineEdit( parent, QString::null, name ), DCOPObject( newLineEditDCOPObjectName() )
+ : ClickLineEdit( parent, TQString::null, name ), DCOPObject( newLineEditDCOPObjectName() )
{
m_useCompletion = useCompletion;
m_completionInitialized = false;
@@ -123,46 +123,46 @@ void AddresseeLineEdit::init()
s_completion->setIgnoreCase( true );
completionItemsDeleter.setObject( s_completionItemMap, new KPIM::CompletionItemsMap() );
- completionSourcesDeleter.setObject( s_completionSources, new QStringList() );
+ completionSourcesDeleter.setObject( s_completionSources, new TQStringList() );
}
-// connect( s_completion, SIGNAL( match( const QString& ) ),
-// this, SLOT( slotMatched( const QString& ) ) );
+// connect( s_completion, TQT_SIGNAL( match( const TQString& ) ),
+// this, TQT_SLOT( slotMatched( const TQString& ) ) );
if ( m_useCompletion ) {
if ( !s_LDAPTimer ) {
- ldapTimerDeleter.setObject( s_LDAPTimer, new QTimer( 0, "ldapTimerDeleter" ) );
+ ldapTimerDeleter.setObject( s_LDAPTimer, new TQTimer( 0, "ldapTimerDeleter" ) );
ldapSearchDeleter.setObject( s_LDAPSearch, new KPIM::LdapSearch );
- ldapTextDeleter.setObject( s_LDAPText, new QString );
+ ldapTextDeleter.setObject( s_LDAPText, new TQString );
/* Add completion sources for all ldap server, 0 to n. Added first so
* that they map to the ldapclient::clientNumber() */
- QValueList< LdapClient* > clients = s_LDAPSearch->clients();
- for ( QValueList<LdapClient*>::iterator it = clients.begin(); it != clients.end(); ++it ) {
+ TQValueList< LdapClient* > clients = s_LDAPSearch->clients();
+ for ( TQValueList<LdapClient*>::iterator it = clients.begin(); it != clients.end(); ++it ) {
addCompletionSource( "LDAP server: " + (*it)->server().host() );
}
}
if ( !m_completionInitialized ) {
setCompletionObject( s_completion, false );
- connect( this, SIGNAL( completion( const QString& ) ),
- this, SLOT( slotCompletion() ) );
- connect( this, SIGNAL( returnPressed( const QString& ) ),
- this, SLOT( slotReturnPressed( const QString& ) ) );
+ connect( this, TQT_SIGNAL( completion( const TQString& ) ),
+ this, TQT_SLOT( slotCompletion() ) );
+ connect( this, TQT_SIGNAL( returnPressed( const TQString& ) ),
+ this, TQT_SLOT( slotReturnPressed( const TQString& ) ) );
KCompletionBox *box = completionBox();
- connect( box, SIGNAL( highlighted( const QString& ) ),
- this, SLOT( slotPopupCompletion( const QString& ) ) );
- connect( box, SIGNAL( userCancelled( const QString& ) ),
- SLOT( slotUserCancelled( const QString& ) ) );
+ connect( box, TQT_SIGNAL( highlighted( const TQString& ) ),
+ this, TQT_SLOT( slotPopupCompletion( const TQString& ) ) );
+ connect( box, TQT_SIGNAL( userCancelled( const TQString& ) ),
+ TQT_SLOT( slotUserCancelled( const TQString& ) ) );
// The emitter is always called KPIM::IMAPCompletionOrder by contract
if ( !connectDCOPSignal( 0, "KPIM::IMAPCompletionOrder", "orderChanged()",
"slotIMAPCompletionOrderChanged()", false ) )
kdError() << "AddresseeLineEdit: connection to orderChanged() failed" << endl;
- connect( s_LDAPTimer, SIGNAL( timeout() ), SLOT( slotStartLDAPLookup() ) );
- connect( s_LDAPSearch, SIGNAL( searchData( const KPIM::LdapResultList& ) ),
- SLOT( slotLDAPSearchData( const KPIM::LdapResultList& ) ) );
+ connect( s_LDAPTimer, TQT_SIGNAL( timeout() ), TQT_SLOT( slotStartLDAPLookup() ) );
+ connect( s_LDAPSearch, TQT_SIGNAL( searchData( const KPIM::LdapResultList& ) ),
+ TQT_SLOT( slotLDAPSearchData( const KPIM::LdapResultList& ) ) );
m_completionInitialized = true;
}
@@ -175,7 +175,7 @@ AddresseeLineEdit::~AddresseeLineEdit()
stopLDAPLookup();
}
-void AddresseeLineEdit::setFont( const QFont& font )
+void AddresseeLineEdit::setFont( const TQFont& font )
{
KLineEdit::setFont( font );
if ( m_useCompletion )
@@ -187,7 +187,7 @@ void AddresseeLineEdit::allowSemiColonAsSeparator( bool useSemiColonAsSeparator
m_useSemiColonAsSeparator = useSemiColonAsSeparator;
}
-void AddresseeLineEdit::keyPressEvent( QKeyEvent *e )
+void AddresseeLineEdit::keyPressEvent( TQKeyEvent *e )
{
bool accept = false;
@@ -211,7 +211,7 @@ void AddresseeLineEdit::keyPressEvent( QKeyEvent *e )
if ( e->isAccepted() ) {
updateSearchString();
- QString searchString( m_searchString );
+ TQString searchString( m_searchString );
//LDAP does not know about our string manipulation, remove it
if ( m_searchExtended )
searchString = m_searchString.mid( 1 );
@@ -227,7 +227,7 @@ void AddresseeLineEdit::keyPressEvent( QKeyEvent *e )
}
}
-void AddresseeLineEdit::insert( const QString &t )
+void AddresseeLineEdit::insert( const TQString &t )
{
if ( !m_smartPaste ) {
KLineEdit::insert( t );
@@ -236,16 +236,16 @@ void AddresseeLineEdit::insert( const QString &t )
//kdDebug(5300) << " AddresseeLineEdit::insert( \"" << t << "\" )" << endl;
- QString newText = t.stripWhiteSpace();
+ TQString newText = t.stripWhiteSpace();
if ( newText.isEmpty() )
return;
// remove newlines in the to-be-pasted string
- QStringList lines = QStringList::split( QRegExp("\r?\n"), newText, false );
- for ( QStringList::iterator it = lines.begin();
+ TQStringList lines = TQStringList::split( TQRegExp("\r?\n"), newText, false );
+ for ( TQStringList::iterator it = lines.begin();
it != lines.end(); ++it ) {
// remove trailing commas and whitespace
- (*it).remove( QRegExp(",?\\s*$") );
+ (*it).remove( TQRegExp(",?\\s*$") );
}
newText = lines.join( ", " );
@@ -259,10 +259,10 @@ void AddresseeLineEdit::insert( const QString &t )
newText.replace( " dot ", "." );
}
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( );
@@ -278,7 +278,7 @@ void AddresseeLineEdit::insert( const QString &t )
int eot = contents.length();
while ((eot > 0) && contents[ eot - 1 ].isSpace() ) eot--;
if ( eot == 0 )
- contents = QString::null;
+ contents = TQString::null;
else if ( pos >= eot ) {
if ( contents[ eot - 1 ] == ',' )
eot--;
@@ -293,7 +293,7 @@ void AddresseeLineEdit::insert( const QString &t )
setCursorPosition( pos + newText.length() );
}
-void AddresseeLineEdit::setText( const QString & text )
+void AddresseeLineEdit::setText( const TQString & text )
{
ClickLineEdit::setText( text.stripWhiteSpace() );
}
@@ -307,11 +307,11 @@ void AddresseeLineEdit::paste()
m_smartPaste = false;
}
-void AddresseeLineEdit::mouseReleaseEvent( QMouseEvent *e )
+void AddresseeLineEdit::mouseReleaseEvent( TQMouseEvent *e )
{
- // reimplemented from QLineEdit::mouseReleaseEvent()
+ // reimplemented from TQLineEdit::mouseReleaseEvent()
if ( m_useCompletion
- && QApplication::clipboard()->supportsSelection()
+ && TQApplication::clipboard()->supportsSelection()
&& !isReadOnly()
&& e->button() == MidButton ) {
m_smartPaste = true;
@@ -321,18 +321,18 @@ void AddresseeLineEdit::mouseReleaseEvent( QMouseEvent *e )
m_smartPaste = false;
}
-void AddresseeLineEdit::dropEvent( QDropEvent *e )
+void AddresseeLineEdit::dropEvent( TQDropEvent *e )
{
KURL::List uriList;
if ( !isReadOnly()
&& KURLDrag::canDecode(e) && KURLDrag::decode( e, uriList ) ) {
- QString contents = text();
+ TQString contents = text();
// remove trailing white space and comma
int eot = contents.length();
while ( ( eot > 0 ) && contents[ eot - 1 ].isSpace() )
eot--;
if ( eot == 0 )
- contents = QString::null;
+ contents = TQString::null;
else if ( contents[ eot - 1 ] == ',' ) {
eot--;
contents.truncate( eot );
@@ -358,7 +358,7 @@ void AddresseeLineEdit::dropEvent( QDropEvent *e )
if ( m_useCompletion )
m_smartPaste = true;
- QLineEdit::dropEvent( e );
+ TQLineEdit::dropEvent( e );
m_smartPaste = false;
}
@@ -388,7 +388,7 @@ void AddresseeLineEdit::doCompletion( bool ctrlT )
// cursor at end of string - or Ctrl+T pressed for substring completion?
if ( ctrlT ) {
- const QStringList completions = getAdjustedCompletionItems( false );
+ const TQStringList completions = getAdjustedCompletionItems( false );
if ( completions.count() > 1 )
; //m_previousAddresses = prevAddr;
@@ -412,14 +412,14 @@ void AddresseeLineEdit::doCompletion( bool ctrlT )
case KGlobalSettings::CompletionPopup:
{
- const QStringList items = getAdjustedCompletionItems( true );
+ const TQStringList items = getAdjustedCompletionItems( true );
setCompletedItems( items, false );
break;
}
case KGlobalSettings::CompletionShell:
{
- QString match = s_completion->makeCompletion( m_searchString );
+ TQString match = s_completion->makeCompletion( m_searchString );
if ( !match.isNull() && match != m_searchString ) {
setText( m_previousAddresses + match );
setEdited( true );
@@ -439,16 +439,16 @@ void AddresseeLineEdit::doCompletion( bool ctrlT )
//if only our \" is left, remove it since user has not typed it either
if ( m_searchExtended && m_searchString == "\"" ){
m_searchExtended = false;
- m_searchString = QString::null;
+ m_searchString = TQString::null;
setText( m_previousAddresses );
break;
}
- QString match = s_completion->makeCompletion( m_searchString );
+ TQString match = s_completion->makeCompletion( m_searchString );
if ( !match.isEmpty() ) {
if ( match != m_searchString ) {
- QString adds = m_previousAddresses + match;
+ TQString adds = m_previousAddresses + match;
setCompletedText( adds );
}
} else {
@@ -469,7 +469,7 @@ void AddresseeLineEdit::doCompletion( bool ctrlT )
//now try again
match = s_completion->makeCompletion( m_searchString );
if ( !match.isEmpty() && match != m_searchString ) {
- QString adds = m_previousAddresses + match;
+ TQString adds = m_previousAddresses + match;
setCompletedText( adds );
}
}
@@ -484,7 +484,7 @@ void AddresseeLineEdit::doCompletion( bool ctrlT )
}
}
-void AddresseeLineEdit::slotPopupCompletion( const QString& completion )
+void AddresseeLineEdit::slotPopupCompletion( const TQString& completion )
{
setText( m_previousAddresses + completion.stripWhiteSpace() );
cursorAtEnd();
@@ -492,10 +492,10 @@ void AddresseeLineEdit::slotPopupCompletion( const QString& completion )
updateSearchString();
}
-void AddresseeLineEdit::slotReturnPressed( const QString& item )
+void AddresseeLineEdit::slotReturnPressed( const TQString& item )
{
Q_UNUSED( item );
- QListBoxItem* i = completionBox()->selectedItem();
+ TQListBoxItem* i = completionBox()->selectedItem();
if ( i != 0 )
slotPopupCompletion( i->text() );
}
@@ -507,7 +507,7 @@ void AddresseeLineEdit::loadContacts()
s_addressesDirty = false;
//m_contactMap.clear();
- QApplication::setOverrideCursor( KCursor::waitCursor() ); // loading might take a while
+ TQApplication::setOverrideCursor( KCursor::waitCursor() ); // loading might take a while
KConfig config( "kpimcompletionorder" ); // The weights for non-imap kabc resources is there.
config.setGroup( "CompletionWeights" );
@@ -515,17 +515,17 @@ void AddresseeLineEdit::loadContacts()
KABC::AddressBook *addressBook = KABC::StdAddressBook::self( true );
// Can't just use the addressbook's iterator, we need to know which subresource
// is behind which contact.
- QPtrList<KABC::Resource> resources( addressBook->resources() );
- for( QPtrListIterator<KABC::Resource> resit( resources ); *resit; ++resit ) {
+ TQPtrList<KABC::Resource> resources( addressBook->resources() );
+ for( TQPtrListIterator<KABC::Resource> resit( resources ); *resit; ++resit ) {
KABC::Resource* resource = *resit;
KPIM::ResourceABC* resabc = dynamic_cast<ResourceABC *>( resource );
if ( resabc ) { // IMAP KABC resource; need to associate each contact with the subresource
- const QMap<QString, QString> uidToResourceMap = resabc->uidToResourceMap();
+ const TQMap<TQString, TQString> uidToResourceMap = resabc->uidToResourceMap();
KABC::Resource::Iterator it;
for ( it = resource->begin(); it != resource->end(); ++it ) {
- QString uid = (*it).uid();
- QMap<QString, QString>::const_iterator wit = uidToResourceMap.find( uid );
- const QString subresourceLabel = resabc->subresourceLabel( *wit );
+ TQString uid = (*it).uid();
+ TQMap<TQString, TQString>::const_iterator wit = uidToResourceMap.find( uid );
+ const TQString subresourceLabel = resabc->subresourceLabel( *wit );
int idx = s_completionSources->findIndex( subresourceLabel );
if ( idx == -1 ) {
s_completionSources->append( subresourceLabel );
@@ -548,8 +548,8 @@ void AddresseeLineEdit::loadContacts()
int weight = config.readNumEntry( "DistributionLists", 60 );
KABC::DistributionListManager manager( addressBook );
manager.load();
- const QStringList distLists = manager.listNames();
- QStringList::const_iterator listIt;
+ const TQStringList distLists = manager.listNames();
+ TQStringList::const_iterator listIt;
int idx = addCompletionSource( i18n( "Distribution Lists" ) );
for ( listIt = distLists.begin(); listIt != distLists.end(); ++listIt ) {
@@ -557,16 +557,16 @@ void AddresseeLineEdit::loadContacts()
addCompletionItem( (*listIt).simplifyWhiteSpace(), weight, idx );
//for CompletionShell, CompletionPopup
- QStringList sl( (*listIt).simplifyWhiteSpace() );
+ TQStringList sl( (*listIt).simplifyWhiteSpace() );
addCompletionItem( (*listIt).simplifyWhiteSpace(), weight, idx, &sl );
}
#endif
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
if ( !m_addressBookConnected ) {
- connect( addressBook, SIGNAL( addressBookChanged( AddressBook* ) ), SLOT( loadContacts() ) );
+ connect( addressBook, TQT_SIGNAL( addressBookChanged( AddressBook* ) ), TQT_SLOT( loadContacts() ) );
m_addressBookConnected = true;
}
}
@@ -581,33 +581,33 @@ void AddresseeLineEdit::addContact( const KABC::Addressee& addr, int weight, int
addCompletionItem( addr.formattedName(), weight, source );
//for CompletionShell, CompletionPopup
- QStringList sl( addr.formattedName() );
+ TQStringList sl( addr.formattedName() );
addCompletionItem( addr.formattedName(), weight, source, &sl );
return;
}
#endif
//m_contactMap.insert( addr.realName(), addr );
- const QStringList emails = addr.emails();
- QStringList::ConstIterator it;
+ const TQStringList emails = addr.emails();
+ TQStringList::ConstIterator it;
const int prefEmailWeight = 1; //increment weight by prefEmailWeight
int isPrefEmail = prefEmailWeight; //first in list is preferredEmail
for ( it = emails.begin(); it != emails.end(); ++it ) {
//TODO: highlight preferredEmail
- const QString email( (*it) );
- const QString givenName = addr.givenName();
- const QString familyName= addr.familyName();
- const QString nickName = addr.nickName();
- const QString domain = email.mid( email.find( '@' ) + 1 );
- QString fullEmail = addr.fullEmail( email );
+ const TQString email( (*it) );
+ const TQString givenName = addr.givenName();
+ const TQString familyName= addr.familyName();
+ const TQString nickName = addr.nickName();
+ const TQString domain = email.mid( email.find( '@' ) + 1 );
+ TQString fullEmail = addr.fullEmail( email );
//TODO: let user decide what fields to use in lookup, e.g. company, city, ...
//for CompletionAuto
if ( givenName.isEmpty() && familyName.isEmpty() ) {
addCompletionItem( fullEmail, weight + isPrefEmail, source ); // use whatever is there
} else {
- const QString byFirstName= "\"" + givenName + " " + familyName + "\" <" + email + ">";
- const QString byLastName = "\"" + familyName + ", " + givenName + "\" <" + email + ">";
+ const TQString byFirstName= "\"" + givenName + " " + familyName + "\" <" + email + ">";
+ const TQString byLastName = "\"" + familyName + ", " + givenName + "\" <" + email + ">";
addCompletionItem( byFirstName, weight + isPrefEmail, source );
addCompletionItem( byLastName, weight + isPrefEmail, source );
}
@@ -615,18 +615,18 @@ void AddresseeLineEdit::addContact( const KABC::Addressee& addr, int weight, int
addCompletionItem( email, weight + isPrefEmail, source );
if ( !nickName.isEmpty() ){
- const QString byNick = "\"" + nickName + "\" <" + email + ">";
+ const TQString byNick = "\"" + nickName + "\" <" + email + ">";
addCompletionItem( byNick, weight + isPrefEmail, source );
}
if ( !domain.isEmpty() ){
- const QString byDomain = "\"" + domain + " " + familyName + " " + givenName + "\" <" + email + ">";
+ const TQString byDomain = "\"" + domain + " " + familyName + " " + givenName + "\" <" + email + ">";
addCompletionItem( byDomain, weight + isPrefEmail, source );
}
//for CompletionShell, CompletionPopup
- QStringList keyWords;
- const QString realName = addr.realName();
+ TQStringList keyWords;
+ const TQString realName = addr.realName();
if ( !givenName.isEmpty() && !familyName.isEmpty() ) {
keyWords.append( givenName + " " + familyName );
@@ -665,14 +665,14 @@ void AddresseeLineEdit::addContact( const KABC::Addressee& addr, int weight, int
if ( len == 0 ) continue;
if( '\0' == (*it)[len-1] )
--len;
- const QString tmp = (*it).left( len );
- const QString fullEmail = addr.fullEmail( tmp );
+ const TQString tmp = (*it).left( len );
+ const TQString fullEmail = addr.fullEmail( tmp );
//kdDebug(5300) << "AddresseeLineEdit::addContact() \"" << fullEmail << "\" weight=" << weight << endl;
addCompletionItem( fullEmail.simplifyWhiteSpace(), weight, source );
// Try to guess the last name: if found, we add an extra
// entry to the list to make sure completion works even
// if the user starts by typing in the last name.
- QString name( addr.realName().simplifyWhiteSpace() );
+ TQString name( addr.realName().simplifyWhiteSpace() );
if( name.endsWith("\"") )
name.truncate( name.length()-1 );
if( name.startsWith("\"") )
@@ -685,7 +685,7 @@ void AddresseeLineEdit::addContact( const KABC::Addressee& addr, int weight, int
bool bDone = false;
int i = -1;
while( ( i = name.findRev(' ') ) > 1 && !bDone ) {
- QString sLastName( name.mid( i+1 ) );
+ TQString sLastName( name.mid( i+1 ) );
if( ! sLastName.isEmpty() &&
2 <= sLastName.length() && // last names must be at least 2 chars long
! sLastName.endsWith(".") ) { // last names must not end with a dot (like "Jr." or "Sr.")
@@ -694,7 +694,7 @@ void AddresseeLineEdit::addContact( const KABC::Addressee& addr, int weight, int
sLastName.prepend( "\"" );
sLastName.append( ", " + name + "\" <" );
}
- QString sExtraEntry( sLastName );
+ TQString sExtraEntry( sLastName );
sExtraEntry.append( tmp.isEmpty() ? addr.preferredEmail() : tmp );
sExtraEntry.append( ">" );
//kdDebug(5300) << "AddresseeLineEdit::addContact() added extra \"" << sExtraEntry.simplifyWhiteSpace() << "\" weight=" << weight << endl;
@@ -711,7 +711,7 @@ void AddresseeLineEdit::addContact( const KABC::Addressee& addr, int weight, int
}
}
-void AddresseeLineEdit::addCompletionItem( const QString& string, int weight, int completionItemSource, const QStringList * keyWords )
+void AddresseeLineEdit::addCompletionItem( const TQString& string, int weight, int completionItemSource, const TQStringList * keyWords )
{
// Check if there is an exact match for item already, and use the max weight if so.
// Since there's no way to get the information from KCompletion, we have to keep our own QMap
@@ -747,9 +747,9 @@ void AddresseeLineEdit::stopLDAPLookup()
void AddresseeLineEdit::startLoadingLDAPEntries()
{
- QString s( *s_LDAPText );
+ TQString s( *s_LDAPText );
// TODO cache last?
- QString prevAddr;
+ TQString prevAddr;
int n = s.findRev( ',' );
if ( n >= 0 ) {
prevAddr = s.left( n + 1 ) + ' ';
@@ -784,18 +784,18 @@ void AddresseeLineEdit::slotLDAPSearchData( const KPIM::LdapResultList& adrs )
}
}
-void AddresseeLineEdit::setCompletedItems( const QStringList& items, bool autoSuggest )
+void AddresseeLineEdit::setCompletedItems( const TQStringList& items, bool autoSuggest )
{
KCompletionBox* completionBox = this->completionBox();
if ( !items.isEmpty() &&
!(items.count() == 1 && m_searchString == items.first()) )
{
- QString oldCurrentText = completionBox->currentText();
- QListBoxItem *itemUnderMouse = completionBox->itemAt(
- completionBox->viewport()->mapFromGlobal(QCursor::pos()) );
- QString oldTextUnderMouse;
- QPoint oldPosOfItemUnderMouse;
+ TQString oldCurrentText = completionBox->currentText();
+ TQListBoxItem *itemUnderMouse = completionBox->itemAt(
+ completionBox->viewport()->mapFromGlobal(TQCursor::pos()) );
+ TQString oldTextUnderMouse;
+ TQPoint oldPosOfItemUnderMouse;
if ( itemUnderMouse ) {
oldTextUnderMouse = itemUnderMouse->text();
oldPosOfItemUnderMouse = completionBox->itemRect( itemUnderMouse ).topLeft();
@@ -816,7 +816,7 @@ void AddresseeLineEdit::setCompletedItems( const QStringList& items, bool autoSu
// Try to re-select what was selected before, otherrwise use the first
// item, if there is one
- QListBoxItem* item = 0;
+ TQListBoxItem* item = 0;
if ( oldCurrentText.isEmpty()
|| ( item = completionBox->findItem( oldCurrentText ) ) == 0 ) {
item = completionBox->item( 1 );
@@ -824,15 +824,15 @@ void AddresseeLineEdit::setCompletedItems( const QStringList& items, bool autoSu
if ( item )
{
if ( itemUnderMouse ) {
- QListBoxItem *newItemUnderMouse = completionBox->findItem( oldTextUnderMouse );
+ TQListBoxItem *newItemUnderMouse = completionBox->findItem( oldTextUnderMouse );
// if the mouse was over an item, before, but now that's elsewhere,
// move the cursor, so folks don't accidently click the wrong item
if ( newItemUnderMouse ) {
- QRect r = completionBox->itemRect( newItemUnderMouse );
- QPoint target = r.topLeft();
+ TQRect r = completionBox->itemRect( newItemUnderMouse );
+ TQPoint target = r.topLeft();
if ( oldPosOfItemUnderMouse != target ) {
target.setX( target.x() + r.width()/2 );
- QCursor::setPos( completionBox->viewport()->mapToGlobal(target) );
+ TQCursor::setPos( completionBox->viewport()->mapToGlobal(target) );
}
}
}
@@ -847,7 +847,7 @@ void AddresseeLineEdit::setCompletedItems( const QStringList& items, bool autoSu
if ( autoSuggest )
{
int index = items.first().find( m_searchString );
- QString newText = items.first().mid( index );
+ TQString newText = items.first().mid( index );
setUserSelection(false);
setCompletedText(newText,true);
}
@@ -856,14 +856,14 @@ void AddresseeLineEdit::setCompletedItems( const QStringList& items, bool autoSu
{
if ( completionBox && completionBox->isVisible() ) {
completionBox->hide();
- completionBox->setItems( QStringList() );
+ completionBox->setItems( TQStringList() );
}
}
}
-QPopupMenu* AddresseeLineEdit::createPopupMenu()
+TQPopupMenu* AddresseeLineEdit::createPopupMenu()
{
- QPopupMenu *menu = KLineEdit::createPopupMenu();
+ TQPopupMenu *menu = KLineEdit::createPopupMenu();
if ( !menu )
return 0;
@@ -871,7 +871,7 @@ QPopupMenu* AddresseeLineEdit::createPopupMenu()
menu->setItemVisible( ShortAutoCompletion, false );
menu->setItemVisible( PopupAutoCompletion, false );
menu->insertItem( i18n( "Configure Completion Order..." ),
- this, SLOT( slotEditCompletionOrder() ) );
+ this, TQT_SLOT( slotEditCompletionOrder() ) );
}
return menu;
}
@@ -889,7 +889,7 @@ void KPIM::AddresseeLineEdit::slotIMAPCompletionOrderChanged()
s_addressesDirty = true;
}
-void KPIM::AddresseeLineEdit::slotUserCancelled( const QString& cancelText )
+void KPIM::AddresseeLineEdit::slotUserCancelled( const TQString& cancelText )
{
if ( s_LDAPSearch && s_LDAPLineEdit == this )
stopLDAPLookup();
@@ -927,7 +927,7 @@ void AddresseeLineEdit::updateSearchString()
}
else
{
- m_previousAddresses = QString::null;
+ m_previousAddresses = TQString::null;
}
}
@@ -946,7 +946,7 @@ KCompletion::CompOrder KPIM::AddresseeLineEdit::completionOrder()
{
KConfig config( "kpimcompletionorder" );
config.setGroup( "General" );
- const QString order = config.readEntry( "CompletionOrder", "Weighted" );
+ const TQString order = config.readEntry( "CompletionOrder", "Weighted" );
if ( order == "Weighted" )
return KCompletion::Weighted;
@@ -954,30 +954,30 @@ KCompletion::CompOrder KPIM::AddresseeLineEdit::completionOrder()
return KCompletion::Sorted;
}
-int KPIM::AddresseeLineEdit::addCompletionSource( const QString &source )
+int KPIM::AddresseeLineEdit::addCompletionSource( const TQString &source )
{
s_completionSources->append( source );
return s_completionSources->size()-1;
}
-bool KPIM::AddresseeLineEdit::eventFilter(QObject *obj, QEvent *e)
+bool KPIM::AddresseeLineEdit::eventFilter(TQObject *obj, TQEvent *e)
{
if ( obj == completionBox() ) {
- if ( e->type() == QEvent::MouseButtonPress
- || e->type() == QEvent::MouseMove
- || e->type() == QEvent::MouseButtonRelease ) {
- QMouseEvent* me = static_cast<QMouseEvent*>( e );
+ if ( e->type() == TQEvent::MouseButtonPress
+ || e->type() == TQEvent::MouseMove
+ || e->type() == TQEvent::MouseButtonRelease ) {
+ TQMouseEvent* me = static_cast<TQMouseEvent*>( e );
// find list box item at the event position
- QListBoxItem *item = completionBox()->itemAt( me->pos() );
+ TQListBoxItem *item = completionBox()->itemAt( me->pos() );
if ( !item ) {
// In the case of a mouse move outside of the box we don't want
// the parent to fuzzy select a header by mistake.
- bool eat = e->type() == QEvent::MouseMove;
+ bool eat = e->type() == TQEvent::MouseMove;
return eat;
}
// avoid selection of headers on button press, or move or release while
// a button is pressed
- if ( e->type() == QEvent::MouseButtonPress
+ if ( e->type() == TQEvent::MouseButtonPress
|| me->state() & LeftButton || me->state() & MidButton
|| me->state() & RightButton ) {
if ( itemIsHeader(item) ) {
@@ -988,30 +988,30 @@ bool KPIM::AddresseeLineEdit::eventFilter(QObject *obj, QEvent *e)
// to fuzzy auto-selection from QListBox
completionBox()->setCurrentItem( item );
completionBox()->setSelected( completionBox()->index( item ), true );
- if ( e->type() == QEvent::MouseMove )
+ if ( e->type() == TQEvent::MouseMove )
return true; // avoid fuzzy selection behavior
}
}
}
}
if ( ( obj == this ) &&
- ( e->type() == QEvent::AccelOverride ) ) {
- QKeyEvent *ke = static_cast<QKeyEvent*>( e );
+ ( e->type() == TQEvent::AccelOverride ) ) {
+ TQKeyEvent *ke = static_cast<TQKeyEvent*>( e );
if ( ke->key() == Key_Up || ke->key() == Key_Down || ke->key() == Key_Tab ) {
ke->accept();
return true;
}
}
if ( ( obj == this ) &&
- ( e->type() == QEvent::KeyPress ) &&
+ ( e->type() == TQEvent::KeyPress ) &&
completionBox()->isVisible() ) {
- QKeyEvent *ke = static_cast<QKeyEvent*>( e );
+ TQKeyEvent *ke = static_cast<TQKeyEvent*>( e );
unsigned int currentIndex = completionBox()->currentItem();
if ( ke->key() == Key_Up ) {
//kdDebug() << "EVENTFILTER: Key_Up currentIndex=" << currentIndex << endl;
// figure out if the item we would be moving to is one we want
// to ignore. If so, go one further
- QListBoxItem *itemAbove = completionBox()->item( currentIndex - 1 );
+ TQListBoxItem *itemAbove = completionBox()->item( currentIndex - 1 );
if ( itemAbove && itemIsHeader(itemAbove) ) {
// there is a header above us, check if there is even further up
// and if so go one up, so it'll be selected
@@ -1030,7 +1030,7 @@ bool KPIM::AddresseeLineEdit::eventFilter(QObject *obj, QEvent *e)
} else if ( ke->key() == Key_Down ) {
// same strategy for downwards
//kdDebug() << "EVENTFILTER: Key_Down. currentIndex=" << currentIndex << endl;
- QListBoxItem *itemBelow = completionBox()->item( currentIndex + 1 );
+ TQListBoxItem *itemBelow = completionBox()->item( currentIndex + 1 );
if ( itemBelow && itemIsHeader( itemBelow ) ) {
if ( completionBox()->item( currentIndex + 2 ) ) {
//kdDebug() << "EVENTFILTER: Key_Down -> skipping " << currentIndex+1 << endl;
@@ -1049,13 +1049,13 @@ bool KPIM::AddresseeLineEdit::eventFilter(QObject *obj, QEvent *e)
// special case of the initial selection, which is unfortunately a header.
// Setting it to selected tricks KCompletionBox into not treating is special
// and selecting making it current, instead of the one below.
- QListBoxItem *item = completionBox()->item( currentIndex );
+ TQListBoxItem *item = completionBox()->item( currentIndex );
if ( item && itemIsHeader(item) ) {
completionBox()->setSelected( currentIndex, true );
}
} else if ( ke->key() == Key_Tab || ke->key() == Key_Backtab ) {
/// first, find the header of teh current section
- QListBoxItem *myHeader = 0;
+ TQListBoxItem *myHeader = 0;
int i = currentIndex;
while ( i>=0 ) {
if ( itemIsHeader( completionBox()->item(i) ) ) {
@@ -1067,7 +1067,7 @@ bool KPIM::AddresseeLineEdit::eventFilter(QObject *obj, QEvent *e)
Q_ASSERT( myHeader ); // we should always be able to find a header
// find the next header (searching backwards, for Key_Backtab
- QListBoxItem *nextHeader = 0;
+ TQListBoxItem *nextHeader = 0;
const int iterationstep = ke->key() == Key_Tab ? 1 : -1;
// when iterating forward, start at the currentindex, when backwards,
// one up from our header, or at the end
@@ -1079,7 +1079,7 @@ bool KPIM::AddresseeLineEdit::eventFilter(QObject *obj, QEvent *e)
j = (j + iterationstep) % completionBox()->count();
}
if ( nextHeader && nextHeader != myHeader ) {
- QListBoxItem *item = completionBox()->item( j + 1 );
+ TQListBoxItem *item = completionBox()->item( j + 1 );
if ( item && !itemIsHeader(item) ) {
completionBox()->setSelected( j+1, true );
completionBox()->setCurrentItem( item );
@@ -1092,23 +1092,23 @@ bool KPIM::AddresseeLineEdit::eventFilter(QObject *obj, QEvent *e)
return ClickLineEdit::eventFilter( obj, e );
}
-const QStringList KPIM::AddresseeLineEdit::getAdjustedCompletionItems( bool fullSearch )
+const TQStringList KPIM::AddresseeLineEdit::getAdjustedCompletionItems( bool fullSearch )
{
- QStringList items = fullSearch ?
+ TQStringList items = fullSearch ?
s_completion->allMatches( m_searchString )
: s_completion->substringCompletion( m_searchString );
int lastSourceIndex = -1;
unsigned int i = 0;
- QMap<int, QStringList> sections;
- QStringList sortedItems;
- for ( QStringList::Iterator it = items.begin(); it != items.end(); ++it, ++i ) {
+ TQMap<int, TQStringList> sections;
+ TQStringList sortedItems;
+ for ( TQStringList::Iterator it = items.begin(); it != items.end(); ++it, ++i ) {
CompletionItemsMap::const_iterator cit = s_completionItemMap->find(*it);
if ( cit == s_completionItemMap->end() )continue;
int idx = (*cit).second;
if ( s_completion->order() == KCompletion::Weighted ) {
if ( lastSourceIndex == -1 || lastSourceIndex != idx ) {
- const QString sourceLabel( (*s_completionSources)[idx] );
+ const TQString sourceLabel( (*s_completionSources)[idx] );
if ( sections.find(idx) == sections.end() ) {
items.insert( it, sourceLabel );
}
@@ -1125,9 +1125,9 @@ const QStringList KPIM::AddresseeLineEdit::getAdjustedCompletionItems( bool full
}
}
if ( s_completion->order() == KCompletion::Weighted ) {
- for ( QMap<int, QStringList>::Iterator it( sections.begin() ), end( sections.end() ); it != end; ++it ) {
+ for ( TQMap<int, TQStringList>::Iterator it( sections.begin() ), end( sections.end() ); it != end; ++it ) {
sortedItems.append( (*s_completionSources)[it.key()] );
- for ( QStringList::Iterator sit( (*it).begin() ), send( (*it).end() ); sit != send; ++sit ) {
+ for ( TQStringList::Iterator sit( (*it).begin() ), send( (*it).end() ); sit != send; ++sit ) {
sortedItems.append( *sit );
}
}
diff --git a/libkdepim/addresseelineedit.h b/libkdepim/addresseelineedit.h
index dacfd96a3..5f8d2f496 100644
--- a/libkdepim/addresseelineedit.h
+++ b/libkdepim/addresseelineedit.h
@@ -26,11 +26,11 @@
#ifndef ADDRESSEELINEEDIT_H
#define ADDRESSEELINEEDIT_H
-#include <qobject.h>
-#include <qptrlist.h>
-#include <qtimer.h>
-#include <qpair.h>
-#include <qvaluelist.h>
+#include <tqobject.h>
+#include <tqptrlist.h>
+#include <tqtimer.h>
+#include <tqpair.h>
+#include <tqvaluelist.h>
#include <kabc/addressee.h>
@@ -44,8 +44,8 @@ class KConfig;
namespace KPIM {
class LdapSearch;
class LdapResult;
-typedef QValueList<LdapResult> LdapResultList;
-typedef QMap< QString, QPair<int,int> > CompletionItemsMap;
+typedef TQValueList<LdapResult> LdapResultList;
+typedef TQMap< TQString, QPair<int,int> > CompletionItemsMap;
}
namespace KPIM {
@@ -56,24 +56,24 @@ class KDE_EXPORT AddresseeLineEdit : public ClickLineEdit, public DCOPObject
Q_OBJECT
public:
- AddresseeLineEdit( QWidget* parent, bool useCompletion = true,
+ AddresseeLineEdit( TQWidget* parent, bool useCompletion = true,
const char *name = 0L);
virtual ~AddresseeLineEdit();
- virtual void setFont( const QFont& );
+ virtual void setFont( const TQFont& );
void allowSemiColonAsSeparator( bool );
public slots:
void cursorAtEnd();
void enableCompletion( bool enable );
/** Reimplemented for stripping whitespace after completion */
- virtual void setText( const QString& txt );
+ virtual void setText( const TQString& txt );
protected slots:
virtual void loadContacts();
protected:
void addContact( const KABC::Addressee&, int weight, int source = -1 );
- virtual void keyPressEvent( QKeyEvent* );
+ virtual void keyPressEvent( TQKeyEvent* );
/**
* Reimplemented for smart insertion of email addresses.
* Features:
@@ -82,22 +82,22 @@ class KDE_EXPORT AddresseeLineEdit : public ClickLineEdit, public DCOPObject
* - Recognizes email addresses which are protected against address
* harvesters, i.e. "name at kde dot org" and "name(at)kde.org"
*/
- virtual void insert( const QString &text );
+ virtual void insert( const TQString &text );
/** Reimplemented for smart insertion of pasted email addresses. */
virtual void paste();
/** Reimplemented for smart insertion with middle mouse button. */
- virtual void mouseReleaseEvent( QMouseEvent *e );
+ virtual void mouseReleaseEvent( TQMouseEvent *e );
/** Reimplemented for smart insertion of dragged email addresses. */
- virtual void dropEvent( QDropEvent *e );
+ virtual void dropEvent( TQDropEvent *e );
void doCompletion( bool ctrlT );
- virtual QPopupMenu *createPopupMenu();
+ virtual TQPopupMenu *createPopupMenu();
/**
* Adds the name of a completion source to the internal list of
* such sources and returns its index, such that that can be used
* for insertion of items associated with that source.
*/
- int addCompletionSource( const QString& );
+ int addCompletionSource( const TQString& );
/** return whether we are using sorted or weighted display */
static KCompletion::CompOrder completionOrder();
@@ -108,27 +108,27 @@ class KDE_EXPORT AddresseeLineEdit : public ClickLineEdit, public DCOPObject
private slots:
void slotCompletion();
- void slotPopupCompletion( const QString& );
- void slotReturnPressed( const QString& );
+ void slotPopupCompletion( const TQString& );
+ void slotReturnPressed( const TQString& );
void slotStartLDAPLookup();
void slotLDAPSearchData( const KPIM::LdapResultList& );
void slotEditCompletionOrder();
- void slotUserCancelled( const QString& );
+ void slotUserCancelled( const TQString& );
private:
- virtual bool eventFilter(QObject *o, QEvent *e);
+ virtual bool eventFilter(TQObject *o, TQEvent *e);
void init();
void startLoadingLDAPEntries();
void stopLDAPLookup();
- void setCompletedItems( const QStringList& items, bool autoSuggest );
- void addCompletionItem( const QString& string, int weight, int source, const QStringList * keyWords=0 );
- QString completionSearchText( QString& );
- const QStringList getAdjustedCompletionItems( bool fullSearch );
+ void setCompletedItems( const TQStringList& items, bool autoSuggest );
+ void addCompletionItem( const TQString& string, int weight, int source, const TQStringList * keyWords=0 );
+ TQString completionSearchText( TQString& );
+ const TQStringList getAdjustedCompletionItems( bool fullSearch );
void updateSearchString();
- QString m_previousAddresses;
- QString m_searchString;
+ TQString m_previousAddresses;
+ TQString m_searchString;
bool m_useCompletion;
bool m_completionInitialized;
bool m_smartPaste;
@@ -137,16 +137,16 @@ class KDE_EXPORT AddresseeLineEdit : public ClickLineEdit, public DCOPObject
bool m_searchExtended; //has \" been added?
bool m_useSemiColonAsSeparator;
- //QMap<QString, KABC::Addressee> m_contactMap;
+ //TQMap<TQString, KABC::Addressee> m_contactMap;
static bool s_addressesDirty;
static KMailCompletion *s_completion;
static CompletionItemsMap* s_completionItemMap;
- static QTimer *s_LDAPTimer;
+ static TQTimer *s_LDAPTimer;
static KPIM::LdapSearch *s_LDAPSearch;
- static QString *s_LDAPText;
+ static TQString *s_LDAPText;
static AddresseeLineEdit *s_LDAPLineEdit;
- static QStringList *s_completionSources;
+ static TQStringList *s_completionSources;
class AddresseeLineEditPrivate;
AddresseeLineEditPrivate *d;
diff --git a/libkdepim/addresseeselector.cpp b/libkdepim/addresseeselector.cpp
index 26562335f..5bd73b5d7 100644
--- a/libkdepim/addresseeselector.cpp
+++ b/libkdepim/addresseeselector.cpp
@@ -19,11 +19,11 @@
Boston, MA 02110-1301, USA.
*/
-#include <qheader.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qsignalmapper.h>
-#include <qtoolbutton.h>
+#include <tqheader.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqsignalmapper.h>
+#include <tqtoolbutton.h>
#include <kabc/stdaddressbook.h>
#include <kcombobox.h>
@@ -41,36 +41,36 @@ using namespace KPIM;
class AddresseeSelector::AddressBookManager
{
public:
- QStringList titles() const;
+ TQStringList titles() const;
void addResource( KABC::Resource* );
- void addAddressBook( const QString &title, SelectionItem::List &list );
+ void addAddressBook( const TQString &title, SelectionItem::List &list );
void clear();
bool contains( uint index, const SelectionItem& );
private:
struct AddressBookEntry {
- QString title;
+ TQString title;
SelectionItem::List list;
};
- QValueList<KABC::Resource*> mResources;
- QValueList<AddressBookEntry> mAddressBooks;
+ TQValueList<KABC::Resource*> mResources;
+ TQValueList<AddressBookEntry> mAddressBooks;
};
-QStringList AddresseeSelector::AddressBookManager::titles() const
+TQStringList AddresseeSelector::AddressBookManager::titles() const
{
- QStringList titles;
+ TQStringList titles;
// we've always an 'all' entry
titles.append( i18n( "All" ) );
- QValueList<KABC::Resource*>::ConstIterator resIt;
+ TQValueList<KABC::Resource*>::ConstIterator resIt;
for ( resIt = mResources.begin(); resIt != mResources.end(); ++resIt )
titles.append( (*resIt)->resourceName() );
- QValueList<AddressBookEntry>::ConstIterator abIt;
+ TQValueList<AddressBookEntry>::ConstIterator abIt;
for ( abIt = mAddressBooks.begin(); abIt != mAddressBooks.end(); ++abIt )
titles.append( (*abIt).title );
@@ -83,7 +83,7 @@ void AddresseeSelector::AddressBookManager::addResource( KABC::Resource *resourc
mResources.append( resource );
}
-void AddresseeSelector::AddressBookManager::addAddressBook( const QString &title,
+void AddresseeSelector::AddressBookManager::addAddressBook( const TQString &title,
SelectionItem::List &list )
{
AddressBookEntry entry;
@@ -187,9 +187,9 @@ uint SelectionItem::index() const
class SelectionViewItem : public QListViewItem
{
public:
- SelectionViewItem( QListView *parent, Selection *selection,
+ SelectionViewItem( TQListView *parent, Selection *selection,
SelectionItem *item )
- : QListViewItem( parent, "" ), mSelection( selection ), mItem( item )
+ : TQListViewItem( parent, "" ), mSelection( selection ), mItem( item )
{
if ( mItem->distributionList() == 0 )
mIcon = mSelection->itemIcon( mItem->addressee(), mItem->index() );
@@ -197,7 +197,7 @@ class SelectionViewItem : public QListViewItem
mIcon = mSelection->distributionListIcon( mItem->distributionList() );
}
- QString text( int column ) const
+ TQString text( int column ) const
{
if ( column == 0 ) {
if ( mItem->distributionList() == 0 )
@@ -205,10 +205,10 @@ class SelectionViewItem : public QListViewItem
else
return mSelection->distributionListText( mItem->distributionList() );
} else
- return QString::null;
+ return TQString::null;
}
- const QPixmap* pixmap( int column ) const
+ const TQPixmap* pixmap( int column ) const
{
if ( column == 0 ) {
return &mIcon;
@@ -221,14 +221,14 @@ class SelectionViewItem : public QListViewItem
private:
Selection *mSelection;
SelectionItem *mItem;
- QPixmap mIcon;
+ TQPixmap mIcon;
};
-AddresseeSelector::AddresseeSelector( Selection *selection, QWidget *parent, const char *name )
- : QWidget( parent, name ), mSelection( selection ), mManager( 0 )
+AddresseeSelector::AddresseeSelector( Selection *selection, TQWidget *parent, const char *name )
+ : TQWidget( parent, name ), mSelection( selection ), mManager( 0 )
{
- mMoveMapper = new QSignalMapper( this );
- mRemoveMapper = new QSignalMapper( this );
+ mMoveMapper = new TQSignalMapper( this );
+ mRemoveMapper = new TQSignalMapper( this );
mAddressBookManager = new AddressBookManager();
@@ -250,33 +250,33 @@ AddresseeSelector::~AddresseeSelector()
void AddresseeSelector::init()
{
- connect( KABC::StdAddressBook::self( true ), SIGNAL( addressBookChanged( AddressBook* ) ),
- this, SLOT( reloadAddressBook() ) );
- connect( mAddresseeFilter, SIGNAL( textChanged( const QString& ) ),
- this, SLOT( updateAddresseeView() ) );
- connect( mAddressBookCombo, SIGNAL( activated( int ) ),
- this, SLOT( updateAddresseeView() ) );
-
- connect( mMoveMapper, SIGNAL( mapped( int ) ),
- this, SLOT( move( int ) ) );
- connect( mRemoveMapper, SIGNAL( mapped( int ) ),
- this, SLOT( remove( int ) ) );
+ connect( KABC::StdAddressBook::self( true ), TQT_SIGNAL( addressBookChanged( AddressBook* ) ),
+ this, TQT_SLOT( reloadAddressBook() ) );
+ connect( mAddresseeFilter, TQT_SIGNAL( textChanged( const TQString& ) ),
+ this, TQT_SLOT( updateAddresseeView() ) );
+ connect( mAddressBookCombo, TQT_SIGNAL( activated( int ) ),
+ this, TQT_SLOT( updateAddresseeView() ) );
+
+ connect( mMoveMapper, TQT_SIGNAL( mapped( int ) ),
+ this, TQT_SLOT( move( int ) ) );
+ connect( mRemoveMapper, TQT_SIGNAL( mapped( int ) ),
+ this, TQT_SLOT( remove( int ) ) );
reloadAddressBook();
}
void AddresseeSelector::initGUI()
{
- QGridLayout *layout = new QGridLayout( this, 2, 3, KDialog::marginHint(), KDialog::spacingHint() );
- QGridLayout *topLayout = new QGridLayout( this, 2, 2, KDialog::marginHint() );
+ TQGridLayout *layout = new TQGridLayout( this, 2, 3, KDialog::marginHint(), KDialog::spacingHint() );
+ TQGridLayout *topLayout = new TQGridLayout( this, 2, 2, KDialog::marginHint() );
- QLabel *label = new QLabel( i18n( "Address book:" ), this );
+ TQLabel *label = new TQLabel( i18n( "Address book:" ), this );
mAddressBookCombo = new KComboBox( false, this );
topLayout->addWidget( label, 0, 0 );
topLayout->addWidget( mAddressBookCombo, 0, 1 );
- label = new QLabel( i18n( "Search:" ), this );
+ label = new TQLabel( i18n( "Search:" ), this );
mAddresseeFilter = new KLineEdit( this );
topLayout->addWidget( label, 1, 0 );
@@ -288,8 +288,8 @@ void AddresseeSelector::initGUI()
int row = 1;
- QIconSet moveSet = KGlobal::iconLoader()->loadIconSet( "next", KIcon::Small );
- QIconSet removeSet = KGlobal::iconLoader()->loadIconSet( "previous", KIcon::Small );
+ TQIconSet moveSet = KGlobal::iconLoader()->loadIconSet( "next", KIcon::Small );
+ TQIconSet removeSet = KGlobal::iconLoader()->loadIconSet( "previous", KIcon::Small );
uint count = mSelection->fieldCount();
for ( uint i = 0; i < count; ++i, ++row ) {
@@ -298,30 +298,30 @@ void AddresseeSelector::initGUI()
listView->setFullWidth( true );
mSelectionViews.append( listView );
- connect( listView, SIGNAL( doubleClicked( QListViewItem*, const QPoint&, int ) ),
- mRemoveMapper, SLOT( map() ) );
+ connect( listView, TQT_SIGNAL( doubleClicked( TQListViewItem*, const TQPoint&, int ) ),
+ mRemoveMapper, TQT_SLOT( map() ) );
mRemoveMapper->setMapping( listView, i );
- QVBoxLayout *buttonLayout = new QVBoxLayout( this );
+ TQVBoxLayout *buttonLayout = new TQVBoxLayout( this );
buttonLayout->setAlignment( Qt::AlignBottom );
layout->addLayout( buttonLayout, row, 1 );
// move button
- QToolButton *moveButton = new QToolButton( this );
+ TQToolButton *moveButton = new TQToolButton( this );
moveButton->setIconSet( moveSet );
moveButton->setFixedSize( 30, 30 );
- connect( moveButton, SIGNAL( clicked() ),
- mMoveMapper, SLOT( map() ) );
+ connect( moveButton, TQT_SIGNAL( clicked() ),
+ mMoveMapper, TQT_SLOT( map() ) );
mMoveMapper->setMapping( moveButton, i );
// remove button
- QToolButton *removeButton = new QToolButton( this );
+ TQToolButton *removeButton = new TQToolButton( this );
removeButton->setIconSet( removeSet );
removeButton->setFixedSize( 30, 30 );
- connect( removeButton, SIGNAL( clicked() ),
- mRemoveMapper, SLOT( map() ) );
+ connect( removeButton, TQT_SIGNAL( clicked() ),
+ mRemoveMapper, TQT_SLOT( map() ) );
mRemoveMapper->setMapping( removeButton, i );
buttonLayout->addWidget( moveButton );
@@ -423,7 +423,7 @@ void AddresseeSelector::setItemSelected( uint fieldIndex, const KABC::Addressee
}
void AddresseeSelector::setItemSelected( uint fieldIndex, const KABC::Addressee &addr,
- uint itemIndex, const QString &text )
+ uint itemIndex, const TQString &text )
{
bool found = false;
@@ -514,9 +514,9 @@ void AddresseeSelector::reloadAddressBook()
mManager->load();
- QStringList lists = mManager->listNames();
+ TQStringList lists = mManager->listNames();
- QStringList::Iterator listIt;
+ TQStringList::Iterator listIt;
for ( listIt = lists.begin(); listIt != lists.end(); ++listIt ) {
KABC::DistributionList *list = mManager->list( *listIt );
SelectionItem item( list, 0 );
@@ -528,8 +528,8 @@ void AddresseeSelector::reloadAddressBook()
// update address book combo
mAddressBookCombo->clear();
- QPtrList<KABC::Resource> resources = KABC::StdAddressBook::self( true )->resources();
- QPtrListIterator<KABC::Resource> resIt( resources );
+ TQPtrList<KABC::Resource> resources = KABC::StdAddressBook::self( true )->resources();
+ TQPtrListIterator<KABC::Resource> resIt( resources );
while ( resIt.current() ) {
if ( resIt.current()->isActive() )
mAddressBookManager->addResource( resIt );
@@ -561,11 +561,11 @@ void AddresseeSelector::reloadAddressBook()
AddresseeSelectorDialog::AddresseeSelectorDialog( Selection *selection,
- QWidget *parent, const char *name )
+ TQWidget *parent, const char *name )
: KDialogBase( Plain, "", Ok | Cancel, Ok, parent, name, true )
{
- QFrame *frame = plainPage();
- QVBoxLayout *layout = new QVBoxLayout( frame );
+ TQFrame *frame = plainPage();
+ TQVBoxLayout *layout = new TQVBoxLayout( frame );
mSelector = new KPIM::AddresseeSelector( selection, frame );
layout->addWidget( mSelector );
@@ -575,7 +575,7 @@ AddresseeSelectorDialog::AddresseeSelectorDialog( Selection *selection,
void AddresseeSelectorDialog::accept()
{
mSelector->finish();
- QDialog::accept();
+ TQDialog::accept();
}
#include "addresseeselector.moc"
diff --git a/libkdepim/addresseeselector.h b/libkdepim/addresseeselector.h
index 46481abdf..769447fff 100644
--- a/libkdepim/addresseeselector.h
+++ b/libkdepim/addresseeselector.h
@@ -28,9 +28,9 @@
#include <kdialogbase.h>
#include <kdepimmacros.h>
-#include <qbitarray.h>
-#include <qpixmap.h>
-#include <qwidget.h>
+#include <tqbitarray.h>
+#include <tqpixmap.h>
+#include <tqwidget.h>
class KComboBox;
class KLineEdit;
@@ -56,7 +56,7 @@ class KDE_EXPORT Selection
/**
Returns the title for the field specified by index.
*/
- virtual QString fieldTitle( uint index ) const = 0;
+ virtual TQString fieldTitle( uint index ) const = 0;
/**
Returns the number of items for the given addressee.
@@ -66,12 +66,12 @@ class KDE_EXPORT Selection
/**
Returns the text that's used for the item specified by index.
*/
- virtual QString itemText( const KABC::Addressee &addresse, uint index ) const = 0;
+ virtual TQString itemText( const KABC::Addressee &addresse, uint index ) const = 0;
/**
Returns the icon that's used for the item specified by index.
*/
- virtual QPixmap itemIcon( const KABC::Addressee &addresse, uint index ) const = 0;
+ virtual TQPixmap itemIcon( const KABC::Addressee &addresse, uint index ) const = 0;
/**
Returns whether the item specified by index is enabled.
@@ -81,22 +81,22 @@ class KDE_EXPORT Selection
/**
Returns whether the item specified by index matches the passed pattern.
*/
- virtual bool itemMatches( const KABC::Addressee &addresse, uint index, const QString &pattern ) const = 0;
+ virtual bool itemMatches( const KABC::Addressee &addresse, uint index, const TQString &pattern ) const = 0;
/**
Returns whether the item specified by index equals the passed pattern.
*/
- virtual bool itemEquals( const KABC::Addressee &addresse, uint index, const QString &pattern ) const = 0;
+ virtual bool itemEquals( const KABC::Addressee &addresse, uint index, const TQString &pattern ) const = 0;
/**
Returns the text that's used for the given distribution list.
*/
- virtual QString distributionListText( const KABC::DistributionList *distributionList ) const = 0;
+ virtual TQString distributionListText( const KABC::DistributionList *distributionList ) const = 0;
/**
Returns the icon that's used for the given distribution list.
*/
- virtual QPixmap distributionListIcon( const KABC::DistributionList *distributionList ) const = 0;
+ virtual TQPixmap distributionListIcon( const KABC::DistributionList *distributionList ) const = 0;
/**
Returns whether the given distribution list is enabled.
@@ -107,7 +107,7 @@ class KDE_EXPORT Selection
Returns whether the given distribution list matches the passed pattern.
*/
virtual bool distributionListMatches( const KABC::DistributionList *distributionList,
- const QString &pattern ) const = 0;
+ const TQString &pattern ) const = 0;
/**
Returns the number of additional address books.
@@ -117,7 +117,7 @@ class KDE_EXPORT Selection
/**
Returns the title for an additional address book.
*/
- virtual QString addressBookTitle( uint index ) const = 0;
+ virtual TQString addressBookTitle( uint index ) const = 0;
/**
Returns the content for an additional address book.
@@ -142,7 +142,7 @@ class KDE_EXPORT Selection
class SelectionItem
{
public:
- typedef QValueList<SelectionItem> List;
+ typedef TQValueList<SelectionItem> List;
SelectionItem( const KABC::Addressee &addressee, uint index );
SelectionItem( KABC::DistributionList *list, uint index );
@@ -160,7 +160,7 @@ class SelectionItem
KABC::Addressee mAddressee;
KABC::DistributionList *mDistributionList;
uint mIndex;
- QBitArray mField;
+ TQBitArray mField;
};
class KDE_EXPORT AddresseeSelector : public QWidget
@@ -169,7 +169,7 @@ class KDE_EXPORT AddresseeSelector : public QWidget
public:
AddresseeSelector( Selection *selection,
- QWidget *parent, const char *name = 0 );
+ TQWidget *parent, const char *name = 0 );
~AddresseeSelector();
/**
@@ -179,7 +179,7 @@ class KDE_EXPORT AddresseeSelector : public QWidget
void setItemSelected( uint fieldIndex, const KABC::Addressee&, uint itemIndex );
void setItemSelected( uint fieldIndex, const KABC::Addressee&,
- uint itemIndex, const QString& );
+ uint itemIndex, const TQString& );
private slots:
void move( int index );
@@ -202,9 +202,9 @@ class KDE_EXPORT AddresseeSelector : public QWidget
KListView *mAddresseeView;
SelectionItem::List mSelectionItems;
- QValueList<KListView*> mSelectionViews;
- QSignalMapper *mMoveMapper;
- QSignalMapper *mRemoveMapper;
+ TQValueList<KListView*> mSelectionViews;
+ TQSignalMapper *mMoveMapper;
+ TQSignalMapper *mRemoveMapper;
KABC::DistributionListManager *mManager;
@@ -218,7 +218,7 @@ class KDE_EXPORT AddresseeSelectorDialog : public KDialogBase
public:
AddresseeSelectorDialog( Selection *selection,
- QWidget *parent = 0, const char *name = 0 );
+ TQWidget *parent = 0, const char *name = 0 );
protected slots:
void accept();
diff --git a/libkdepim/addresseeview.cpp b/libkdepim/addresseeview.cpp
index 30aa3bef2..c250aa495 100644
--- a/libkdepim/addresseeview.cpp
+++ b/libkdepim/addresseeview.cpp
@@ -19,10 +19,10 @@
Boston, MA 02110-1301, USA.
*/
-#include <qbuffer.h>
-#include <qimage.h>
-#include <qpopupmenu.h>
-#include <qurl.h>
+#include <tqbuffer.h>
+#include <tqimage.h>
+#include <tqpopupmenu.h>
+#include <tqurl.h>
#include <kabc/address.h>
#include <kabc/addressee.h>
@@ -50,26 +50,26 @@
using namespace KPIM;
-AddresseeView::AddresseeView( QWidget *parent, const char *name,
+AddresseeView::AddresseeView( TQWidget *parent, const char *name,
KConfig *config )
: KTextBrowser( parent, name ), mDefaultConfig( false ), mImageJob( 0 ),
mLinkMask( AddressLinks | EmailLinks | PhoneLinks | URLLinks | IMLinks | CustomFields )
{
- setWrapPolicy( QTextEdit::AtWordBoundary );
+ setWrapPolicy( TQTextEdit::AtWordBoundary );
setLinkUnderline( false );
- setVScrollBarMode( QScrollView::AlwaysOff );
- setHScrollBarMode( QScrollView::AlwaysOff );
+ setVScrollBarMode( TQScrollView::AlwaysOff );
+ setHScrollBarMode( TQScrollView::AlwaysOff );
- QStyleSheet *sheet = styleSheet();
- QStyleSheetItem *link = sheet->item( "a" );
+ TQStyleSheet *sheet = styleSheet();
+ TQStyleSheetItem *link = sheet->item( "a" );
link->setColor( KGlobalSettings::linkColor() );
- connect( this, SIGNAL( mailClick( const QString&, const QString& ) ),
- this, SLOT( slotMailClicked( const QString&, const QString& ) ) );
- connect( this, SIGNAL( urlClick( const QString& ) ),
- this, SLOT( slotUrlClicked( const QString& ) ) );
- connect( this, SIGNAL( highlighted( const QString& ) ),
- this, SLOT( slotHighlighted( const QString& ) ) );
+ connect( this, TQT_SIGNAL( mailClick( const TQString&, const TQString& ) ),
+ this, TQT_SLOT( slotMailClicked( const TQString&, const TQString& ) ) );
+ connect( this, TQT_SIGNAL( urlClick( const TQString& ) ),
+ this, TQT_SLOT( slotUrlClicked( const TQString& ) ) );
+ connect( this, TQT_SIGNAL( highlighted( const TQString& ) ),
+ this, TQT_SLOT( slotHighlighted( const TQString& ) ) );
setNotifyClick( true );
@@ -88,13 +88,13 @@ AddresseeView::AddresseeView( QWidget *parent, const char *name,
mActionShowCustomFields = new KToggleAction( i18n( "Show Custom Fields" ) );
mActionShowCustomFields->setCheckedState( i18n( "Hide Custom Fields" ) );
- connect( mActionShowBirthday, SIGNAL( toggled( bool ) ), SLOT( configChanged() ) );
- connect( mActionShowAddresses, SIGNAL( toggled( bool ) ), SLOT( configChanged() ) );
- connect( mActionShowEmails, SIGNAL( toggled( bool ) ), SLOT( configChanged() ) );
- connect( mActionShowPhones, SIGNAL( toggled( bool ) ), SLOT( configChanged() ) );
- connect( mActionShowURLs, SIGNAL( toggled( bool ) ), SLOT( configChanged() ) );
- connect( mActionShowIMAddresses, SIGNAL( toggled( bool ) ), SLOT( configChanged() ) );
- connect( mActionShowCustomFields, SIGNAL( toggled( bool ) ), SLOT( configChanged() ) );
+ connect( mActionShowBirthday, TQT_SIGNAL( toggled( bool ) ), TQT_SLOT( configChanged() ) );
+ connect( mActionShowAddresses, TQT_SIGNAL( toggled( bool ) ), TQT_SLOT( configChanged() ) );
+ connect( mActionShowEmails, TQT_SIGNAL( toggled( bool ) ), TQT_SLOT( configChanged() ) );
+ connect( mActionShowPhones, TQT_SIGNAL( toggled( bool ) ), TQT_SLOT( configChanged() ) );
+ connect( mActionShowURLs, TQT_SIGNAL( toggled( bool ) ), TQT_SLOT( configChanged() ) );
+ connect( mActionShowIMAddresses, TQT_SIGNAL( toggled( bool ) ), TQT_SLOT( configChanged() ) );
+ connect( mActionShowCustomFields, TQT_SIGNAL( toggled( bool ) ), TQT_SLOT( configChanged() ) );
if ( !config ) {
mConfig = new KConfig( "kaddressbookrc" );
@@ -106,10 +106,10 @@ AddresseeView::AddresseeView( QWidget *parent, const char *name,
// set up IMProxy to display contacts' IM presence and make connections to keep the display live
mKIMProxy = ::KIMProxy::instance( kapp->dcopClient() );
- connect( mKIMProxy, SIGNAL( sigContactPresenceChanged( const QString& ) ),
- this, SLOT( slotPresenceChanged( const QString& ) ) );
- connect( mKIMProxy, SIGNAL( sigPresenceInfoExpired() ),
- this, SLOT( slotPresenceInfoExpired() ) );
+ connect( mKIMProxy, TQT_SIGNAL( sigContactPresenceChanged( const TQString& ) ),
+ this, TQT_SLOT( slotPresenceChanged( const TQString& ) ) );
+ connect( mKIMProxy, TQT_SIGNAL( sigPresenceInfoExpired() ),
+ this, TQT_SLOT( slotPresenceInfoExpired() ) );
}
AddresseeView::~AddresseeView()
@@ -148,10 +148,10 @@ void AddresseeView::enableLinks( int linkMask )
mLinkMask = linkMask;
}
-QString AddresseeView::vCardAsHTML( const KABC::Addressee& addr, ::KIMProxy *proxy, LinkMask linkMask,
+TQString AddresseeView::vCardAsHTML( const KABC::Addressee& addr, ::KIMProxy *proxy, LinkMask linkMask,
bool internalLoading, FieldMask fieldMask )
{
- QString image = QString( "contact_%1_image" ).arg( addr.uid() );
+ TQString image = TQString( "contact_%1_image" ).arg( addr.uid() );
// Style strings from Gentix; this is just an initial version.
//
@@ -160,18 +160,18 @@ QString AddresseeView::vCardAsHTML( const KABC::Addressee& addr, ::KIMProxy *pro
// placeholder where we fill in something else (in this case,
// the global background color).
//
- QString backgroundColor = KGlobalSettings::alternateBackgroundColor().name();
- QString cellStyle = QString::fromLatin1(
+ TQString backgroundColor = KGlobalSettings::alternateBackgroundColor().name();
+ TQString cellStyle = TQString::fromLatin1(
"style=\""
"padding-right: 2px; "
"border-right: #000 dashed 1px; "
"background: %1;\"").arg(backgroundColor);
- QString backgroundColor2 = KGlobalSettings::baseColor().name();
- QString cellStyle2 = QString::fromLatin1(
+ TQString backgroundColor2 = KGlobalSettings::baseColor().name();
+ TQString cellStyle2 = TQString::fromLatin1(
"style=\""
"padding-left: 2px; "
"background: %1;\"").arg(backgroundColor2);
- QString tableStyle = QString::fromLatin1(
+ TQString tableStyle = TQString::fromLatin1(
"style=\""
"border: solid 1px; "
"margin: 0em;\"");
@@ -179,17 +179,17 @@ QString AddresseeView::vCardAsHTML( const KABC::Addressee& addr, ::KIMProxy *pro
// We'll be building a table to display the vCard in.
// Each row of the table will be built using this string for its HTML.
//
- QString rowFmtStr = QString::fromLatin1(
+ TQString rowFmtStr = TQString::fromLatin1(
"<tr>"
"<td align=\"right\" valign=\"top\" width=\"30%\" "); // Tag unclosed
rowFmtStr.append( cellStyle );
- rowFmtStr.append( QString::fromLatin1(
+ rowFmtStr.append( TQString::fromLatin1(
">" // Close tag
"<b>%1</b>"
"</td>"
"<td align=\"left\" valign=\"top\" width=\"70%\" ") ); // Tag unclosed
rowFmtStr.append( cellStyle2 );
- rowFmtStr.append( QString::fromLatin1(
+ rowFmtStr.append( TQString::fromLatin1(
">" // Close tag
"%2"
"</td>"
@@ -197,7 +197,7 @@ QString AddresseeView::vCardAsHTML( const KABC::Addressee& addr, ::KIMProxy *pro
) );
// Build the table's rows here
- QString dynamicPart;
+ TQString dynamicPart;
if ( !internalLoading ) {
@@ -212,7 +212,7 @@ QString AddresseeView::vCardAsHTML( const KABC::Addressee& addr, ::KIMProxy *pro
}
if ( fieldMask & BirthdayFields ) {
- QDate date = addr.birthday().date();
+ TQDate date = addr.birthday().date();
if ( date.isValid() )
dynamicPart += rowFmtStr
@@ -224,22 +224,22 @@ QString AddresseeView::vCardAsHTML( const KABC::Addressee& addr, ::KIMProxy *pro
KABC::PhoneNumber::List phones = addr.phoneNumbers();
KABC::PhoneNumber::List::ConstIterator phoneIt;
for ( phoneIt = phones.begin(); phoneIt != phones.end(); ++phoneIt ) {
- QString number = QStyleSheet::escape( (*phoneIt).number() );
+ TQString number = TQStyleSheet::escape( (*phoneIt).number() );
- QString url;
+ TQString url;
if ( (*phoneIt).type() & KABC::PhoneNumber::Fax )
- url = QString::fromLatin1( "fax:" ) + number;
+ url = TQString::fromLatin1( "fax:" ) + number;
else
- url = QString::fromLatin1( "phone:" ) + number;
+ url = TQString::fromLatin1( "phone:" ) + number;
if ( linkMask & PhoneLinks ) {
- QString smsURL;
+ TQString smsURL;
if ( (*phoneIt).type() & KABC::PhoneNumber::Cell )
- smsURL = QString(" (<a href=\"sms:%1\">%2</a>)" ).arg( number ).arg( i18n( "SMS") );
+ smsURL = TQString(" (<a href=\"sms:%1\">%2</a>)" ).arg( number ).arg( i18n( "SMS") );
dynamicPart += rowFmtStr
.arg( (*phoneIt).typeLabel().replace( " ", "&nbsp;" ) )
- .arg( QString::fromLatin1( "<a href=\"%1\">%2</a>%3" ).arg( url ).arg( number ).arg( smsURL ) );
+ .arg( TQString::fromLatin1( "<a href=\"%1\">%2</a>%3" ).arg( url ).arg( number ).arg( smsURL ) );
} else {
dynamicPart += rowFmtStr
.arg( (*phoneIt).typeLabel().replace( " ", "&nbsp;" ) )
@@ -249,17 +249,17 @@ QString AddresseeView::vCardAsHTML( const KABC::Addressee& addr, ::KIMProxy *pro
}
if ( fieldMask & EmailFields ) {
- QStringList emails = addr.emails();
- QStringList::ConstIterator emailIt;
- QString type = i18n( "Email" );
+ TQStringList emails = addr.emails();
+ TQStringList::ConstIterator emailIt;
+ TQString type = i18n( "Email" );
for ( emailIt = emails.begin(); emailIt != emails.end(); ++emailIt ) {
- QString fullEmail = addr.fullEmail( *emailIt );
- QUrl::encode( fullEmail );
+ TQString fullEmail = addr.fullEmail( *emailIt );
+ TQUrl::encode( fullEmail );
if ( linkMask & EmailLinks ) {
dynamicPart += rowFmtStr.arg( type )
- .arg( QString::fromLatin1( "<a href=\"mailto:%1\">%2</a>" )
- .arg( fullEmail, QStyleSheet::escape( *emailIt ) ) );
+ .arg( TQString::fromLatin1( "<a href=\"mailto:%1\">%2</a>" )
+ .arg( fullEmail, TQStyleSheet::escape( *emailIt ) ) );
} else {
dynamicPart += rowFmtStr.arg( type ).arg( *emailIt );
}
@@ -268,7 +268,7 @@ QString AddresseeView::vCardAsHTML( const KABC::Addressee& addr, ::KIMProxy *pro
if ( fieldMask & URLFields ) {
if ( !addr.url().url().isEmpty() ) {
- QString url;
+ TQString url;
if ( linkMask & URLLinks ) {
url = (addr.url().url().startsWith( "http://" ) || addr.url().url().startsWith( "https://" ) ? addr.url().prettyURL() :
"http://" + addr.url().prettyURL());
@@ -279,7 +279,7 @@ QString AddresseeView::vCardAsHTML( const KABC::Addressee& addr, ::KIMProxy *pro
dynamicPart += rowFmtStr.arg( i18n("Homepage") ).arg( url );
}
- QString blog = addr.custom( "KADDRESSBOOK", "BlogFeed" );
+ TQString blog = addr.custom( "KADDRESSBOOK", "BlogFeed" );
if ( !blog.isEmpty() ) {
if ( linkMask & URLLinks ) {
blog = KStringHandler::tagURLs( blog );
@@ -293,12 +293,12 @@ QString AddresseeView::vCardAsHTML( const KABC::Addressee& addr, ::KIMProxy *pro
KABC::Address::List::ConstIterator addrIt;
for ( addrIt = addresses.begin(); addrIt != addresses.end(); ++addrIt ) {
if ( (*addrIt).label().isEmpty() ) {
- QString formattedAddress;
+ TQString formattedAddress;
- formattedAddress = QStyleSheet::escape( (*addrIt).formattedAddress().stripWhiteSpace() );
+ formattedAddress = TQStyleSheet::escape( (*addrIt).formattedAddress().stripWhiteSpace() );
formattedAddress = formattedAddress.replace( '\n', "<br>" );
- QString link = "<a href=\"addr:" + (*addrIt).id() + "\">" +
+ TQString link = "<a href=\"addr:" + (*addrIt).id() + "\">" +
formattedAddress + "</a>";
if ( linkMask & AddressLinks ) {
@@ -311,7 +311,7 @@ QString AddresseeView::vCardAsHTML( const KABC::Addressee& addr, ::KIMProxy *pro
.arg( formattedAddress );
}
} else {
- QString link = "<a href=\"addr:" + (*addrIt).id() + "\">" +
+ TQString link = "<a href=\"addr:" + (*addrIt).id() + "\">" +
(*addrIt).label().replace( '\n', "<br>" ) + "</a>";
if ( linkMask & AddressLinks ) {
@@ -327,18 +327,18 @@ QString AddresseeView::vCardAsHTML( const KABC::Addressee& addr, ::KIMProxy *pro
}
}
- QString notes;
+ TQString notes;
if ( !addr.note().isEmpty() ) {
// @STYLE@ - substitute the cell style in first, and append
// the data afterwards (keeps us safe from possible % signs
// in either one).
- notes = QStyleSheet::escape( addr.note() );
+ notes = TQStyleSheet::escape( addr.note() );
notes = rowFmtStr.arg( i18n( "Notes" ) ).arg( notes.replace( '\n', "<br>" ) ) ;
}
- QString customData;
+ TQString customData;
if ( fieldMask & CustomFields ) {
- static QMap<QString, QString> titleMap;
+ static TQMap<TQString, TQString> titleMap;
if ( titleMap.isEmpty() ) {
titleMap.insert( "Department", i18n( "Department" ) );
titleMap.insert( "Profession", i18n( "Profession" ) );
@@ -350,60 +350,60 @@ QString AddresseeView::vCardAsHTML( const KABC::Addressee& addr, ::KIMProxy *pro
}
if ( !addr.customs().empty() ) {
- QStringList customs = addr.customs();
- QStringList::Iterator it( customs.begin() );
- const QStringList::Iterator endIt( customs.end() );
+ TQStringList customs = addr.customs();
+ TQStringList::Iterator it( customs.begin() );
+ const TQStringList::Iterator endIt( customs.end() );
for ( ; it != endIt; ++it ) {
- QString customEntry = *it;
+ TQString customEntry = *it;
if ( customEntry.startsWith ( "KADDRESSBOOK-" ) ) {
customEntry.remove( "KADDRESSBOOK-X-" );
customEntry.remove( "KADDRESSBOOK-" );
int pos = customEntry.find( ':' );
- QString key = customEntry.left( pos );
- const QString value = customEntry.mid( pos + 1 );
+ TQString key = customEntry.left( pos );
+ const TQString value = customEntry.mid( pos + 1 );
// blog and im address is handled separated
if ( key == "BlogFeed" || key == "IMAddress" )
continue;
- const QMap<QString, QString>::ConstIterator keyIt = titleMap.find( key );
+ const TQMap<TQString, TQString>::ConstIterator keyIt = titleMap.find( key );
if ( keyIt != titleMap.end() )
key = keyIt.data();
- customData += rowFmtStr.arg( key ).arg( QStyleSheet::escape( value ) ) ;
+ customData += rowFmtStr.arg( key ).arg( TQStyleSheet::escape( value ) ) ;
}
}
}
}
- QString name( QStyleSheet::escape( addr.realName() ) );
- QString role( QStyleSheet::escape( addr.role() ) );
- QString organization( QStyleSheet::escape( addr.organization() ) );
+ TQString name( TQStyleSheet::escape( addr.realName() ) );
+ TQString role( TQStyleSheet::escape( addr.role() ) );
+ TQString organization( TQStyleSheet::escape( addr.organization() ) );
if ( fieldMask & IMFields ) {
- const QString imAddress = addr.custom( "KADDRESSBOOK", "X-IMAddress" );
+ const TQString imAddress = addr.custom( "KADDRESSBOOK", "X-IMAddress" );
if ( !imAddress.isEmpty() ) {
- customData += rowFmtStr.arg( i18n( "IM Address" ) ).arg( QStyleSheet::escape( imAddress ) ) ;
+ customData += rowFmtStr.arg( i18n( "IM Address" ) ).arg( TQStyleSheet::escape( imAddress ) ) ;
}
if ( proxy ) {
if ( proxy->isPresent( addr.uid() ) && proxy->presenceNumeric( addr.uid() ) > 0 ) {
- // set image source to either a QMimeSourceFactory key or a data:/ URL
- QString imgSrc;
+ // set image source to either a TQMimeSourceFactory key or a data:/ URL
+ TQString imgSrc;
if ( internalLoading ) {
- imgSrc = QString::fromLatin1( "im_status_%1_image").arg( addr.uid() );
- QMimeSourceFactory::defaultFactory()->setPixmap( imgSrc, proxy->presenceIcon( addr.uid() ) );
+ imgSrc = TQString::fromLatin1( "im_status_%1_image").arg( addr.uid() );
+ TQMimeSourceFactory::defaultFactory()->setPixmap( imgSrc, proxy->presenceIcon( addr.uid() ) );
} else
imgSrc = pixmapAsDataUrl( proxy->presenceIcon( addr.uid() ) );
// make the status a link, if required
- QString imStatus;
+ TQString imStatus;
if ( linkMask & IMLinks )
- imStatus = QString::fromLatin1( "<a href=\"im:\"><img src=\"%1\"> (%2)</a>" );
+ imStatus = TQString::fromLatin1( "<a href=\"im:\"><img src=\"%1\"> (%2)</a>" );
else
- imStatus = QString::fromLatin1( "<img src=\"%1\"> (%2)" );
+ imStatus = TQString::fromLatin1( "<img src=\"%1\"> (%2)" );
// append our status to the rest of the dynamic part of the addressee
dynamicPart += rowFmtStr
@@ -421,58 +421,58 @@ QString AddresseeView::vCardAsHTML( const KABC::Addressee& addr, ::KIMProxy *pro
// do it this way to avoid cases where the substituted string
// contains %1 and the like.
//
- QString strAddr = QString::fromLatin1(
+ TQString strAddr = TQString::fromLatin1(
"<div align=\"center\">"
"<table cellpadding=\"1\" cellspacing=\"0\" %1>"
"<tr>").arg(tableStyle);
- strAddr.append( QString::fromLatin1(
+ strAddr.append( TQString::fromLatin1(
"<td align=\"right\" valign=\"top\" width=\"30%\" rowspan=\"3\" %2>")
.arg( cellStyle ) );
- strAddr.append( QString::fromLatin1(
+ strAddr.append( TQString::fromLatin1(
"<img src=\"%1\" width=\"50\" vspace=\"1\">" // image
"</td>")
.arg( image ) );
- strAddr.append( QString::fromLatin1(
+ strAddr.append( TQString::fromLatin1(
"<td align=\"left\" width=\"70%\" %2>")
.arg( cellStyle2 ) );
- strAddr.append( QString::fromLatin1(
+ strAddr.append( TQString::fromLatin1(
"<font size=\"+2\"><b>%2</b></font></td>" // name
"</tr>")
.arg( name ) );
- strAddr.append( QString::fromLatin1(
+ strAddr.append( TQString::fromLatin1(
"<tr>"
"<td align=\"left\" width=\"70%\" %2>")
.arg( cellStyle2 ) );
- strAddr.append( QString::fromLatin1(
+ strAddr.append( TQString::fromLatin1(
"%3</td>" // role
"</tr>")
.arg( role ) );
- strAddr.append( QString::fromLatin1(
+ strAddr.append( TQString::fromLatin1(
"<tr>"
"<td align=\"left\" width=\"70%\" %2>")
.arg( cellStyle2 ) );
- strAddr.append( QString::fromLatin1(
+ strAddr.append( TQString::fromLatin1(
"%4</td>" // organization
"</tr>")
.arg( organization ) );
- strAddr.append( QString::fromLatin1(
+ strAddr.append( TQString::fromLatin1(
"<tr><td %2>")
.arg( cellStyle ) );
- strAddr.append( QString::fromLatin1(
+ strAddr.append( TQString::fromLatin1(
"&nbsp;</td><td %2>&nbsp;</td></tr>")
.arg( cellStyle2 ) );
strAddr.append( dynamicPart );
strAddr.append( notes );
strAddr.append( customData );
- strAddr.append( QString::fromLatin1( "</table></div>\n" ) );
+ strAddr.append( TQString::fromLatin1( "</table></div>\n" ) );
if ( addr.resource() ) {
- QString addrBookName = addr.resource()->resourceName();
+ TQString addrBookName = addr.resource()->resourceName();
ResourceABC *r = dynamic_cast<ResourceABC*>( addr.resource() );
if ( r && !r->subresources().isEmpty() ) {
- const QString subRes = r->uidToResourceMap()[ addr.uid() ];
- const QString label = r->subresourceLabel( subRes );
+ const TQString subRes = r->uidToResourceMap()[ addr.uid() ];
+ const TQString label = r->subresourceLabel( subRes );
if ( !label.isEmpty() )
addrBookName = label;
}
@@ -481,13 +481,13 @@ QString AddresseeView::vCardAsHTML( const KABC::Addressee& addr, ::KIMProxy *pro
return strAddr;
}
-QString AddresseeView::pixmapAsDataUrl( const QPixmap& pixmap )
+TQString AddresseeView::pixmapAsDataUrl( const TQPixmap& pixmap )
{
- QByteArray ba;
- QBuffer buffer( ba );
+ TQByteArray ba;
+ TQBuffer buffer( ba );
buffer.open( IO_WriteOnly );
pixmap.save( &buffer, "PNG" );
- QString encoded( "data:image/png;base64," );
+ TQString encoded( "data:image/png;base64," );
encoded.append( KCodecs::base64Encode( ba ) );
return encoded;
}
@@ -495,7 +495,7 @@ QString AddresseeView::pixmapAsDataUrl( const QPixmap& pixmap )
void AddresseeView::updateView()
{
// clear view
- setText( QString::null );
+ setText( TQString::null );
if ( mAddressee.isEmpty() )
return;
@@ -523,10 +523,10 @@ void AddresseeView::updateView()
if ( mActionShowCustomFields->isChecked() )
fieldMask |= CustomFields;
- QString strAddr = vCardAsHTML( mAddressee, mKIMProxy, (LinkMask)mLinkMask,
+ TQString strAddr = vCardAsHTML( mAddressee, mKIMProxy, (LinkMask)mLinkMask,
true, (FieldMask)fieldMask );
- strAddr = QString::fromLatin1(
+ strAddr = TQString::fromLatin1(
"<html>"
"<body text=\"%1\" bgcolor=\"%2\">" // text and background color
"%3" // dynamic part
@@ -536,24 +536,24 @@ void AddresseeView::updateView()
.arg( KGlobalSettings::baseColor().name() )
.arg( strAddr );
- QString imageURL = QString( "contact_%1_image" ).arg( mAddressee.uid() );
+ TQString imageURL = TQString( "contact_%1_image" ).arg( mAddressee.uid() );
KABC::Picture picture = mAddressee.photo();
if ( picture.isIntern() && !picture.data().isNull() )
- QMimeSourceFactory::defaultFactory()->setImage( imageURL, picture.data() );
+ TQMimeSourceFactory::defaultFactory()->setImage( imageURL, picture.data() );
else {
if ( !picture.url().isEmpty() ) {
if ( mImageData.count() > 0 )
- QMimeSourceFactory::defaultFactory()->setImage( imageURL, mImageData );
+ TQMimeSourceFactory::defaultFactory()->setImage( imageURL, mImageData );
else {
mImageJob = KIO::get( KURL( picture.url() ), false, false );
- connect( mImageJob, SIGNAL( data( KIO::Job*, const QByteArray& ) ),
- this, SLOT( data( KIO::Job*, const QByteArray& ) ) );
- connect( mImageJob, SIGNAL( result( KIO::Job* ) ),
- this, SLOT( result( KIO::Job* ) ) );
+ connect( mImageJob, TQT_SIGNAL( data( KIO::Job*, const TQByteArray& ) ),
+ this, TQT_SLOT( data( KIO::Job*, const TQByteArray& ) ) );
+ connect( mImageJob, TQT_SIGNAL( result( KIO::Job* ) ),
+ this, TQT_SLOT( result( KIO::Job* ) ) );
}
} else {
- QMimeSourceFactory::defaultFactory()->setPixmap( imageURL,
+ TQMimeSourceFactory::defaultFactory()->setPixmap( imageURL,
KGlobal::iconLoader()->loadIcon( "personal", KIcon::Desktop, 128 ) );
}
}
@@ -567,24 +567,24 @@ KABC::Addressee AddresseeView::addressee() const
return mAddressee;
}
-void AddresseeView::urlClicked( const QString &url )
+void AddresseeView::urlClicked( const TQString &url )
{
kapp->invokeBrowser( url );
}
-void AddresseeView::emailClicked( const QString &email )
+void AddresseeView::emailClicked( const TQString &email )
{
if ( email.startsWith( "mailto:" ) )
- kapp->invokeMailer( email.mid( 7 ), QString::null );
+ kapp->invokeMailer( email.mid( 7 ), TQString::null );
else
- kapp->invokeMailer( email, QString::null );
+ kapp->invokeMailer( email, TQString::null );
}
-void AddresseeView::phoneNumberClicked( const QString &number )
+void AddresseeView::phoneNumberClicked( const TQString &number )
{
KConfig config( "kaddressbookrc" );
config.setGroup( "General" );
- QString commandLine = config.readEntry( "PhoneHookApplication" );
+ TQString commandLine = config.readEntry( "PhoneHookApplication" );
if ( commandLine.isEmpty() ) {
KMessageBox::sorry( this, i18n( "There is no application set which could be executed. Please go to the settings dialog and configure one." ) );
@@ -595,11 +595,11 @@ void AddresseeView::phoneNumberClicked( const QString &number )
KRun::runCommand( commandLine );
}
-void AddresseeView::smsTextClicked( const QString &number )
+void AddresseeView::smsTextClicked( const TQString &number )
{
KConfig config( "kaddressbookrc" );
config.setGroup( "General" );
- QString commandLine = config.readEntry( "SMSHookApplication" );
+ TQString commandLine = config.readEntry( "SMSHookApplication" );
if ( commandLine.isEmpty() ) {
KMessageBox::sorry( this, i18n( "There is no application set which could be executed. Please go to the settings dialog and configure one." ) );
@@ -612,14 +612,14 @@ void AddresseeView::smsTextClicked( const QString &number )
sendSMS ( number, dlg.text() );
}
-void AddresseeView::sendSMS( const QString &number, const QString &text )
+void AddresseeView::sendSMS( const TQString &number, const TQString &text )
{
KConfig config( "kaddressbookrc" );
config.setGroup( "General" );
- QString commandLine = config.readEntry( "SMSHookApplication" );
+ TQString commandLine = config.readEntry( "SMSHookApplication" );
KTempFile file ;
- QTextStream* stream = file.textStream();
+ TQTextStream* stream = file.textStream();
*stream << text;
file.close();
@@ -629,11 +629,11 @@ void AddresseeView::sendSMS( const QString &number, const QString &text )
KRun::runCommand( commandLine );
}
-void AddresseeView::faxNumberClicked( const QString &number )
+void AddresseeView::faxNumberClicked( const TQString &number )
{
KConfig config( "kaddressbookrc" );
config.setGroup( "General" );
- QString commandLine = config.readEntry( "FaxHookApplication", "kdeprintfax --phone %N" );
+ TQString commandLine = config.readEntry( "FaxHookApplication", "kdeprintfax --phone %N" );
if ( commandLine.isEmpty() ) {
KMessageBox::sorry( this, i18n( "There is no application set which could be executed. Please go to the settings dialog and configure one." ) );
@@ -649,9 +649,9 @@ void AddresseeView::imAddressClicked()
mKIMProxy->chatWithContact( mAddressee.uid() );
}
-QPopupMenu *AddresseeView::createPopupMenu( const QPoint& )
+TQPopupMenu *AddresseeView::createPopupMenu( const TQPoint& )
{
- QPopupMenu *menu = new QPopupMenu( this );
+ TQPopupMenu *menu = new TQPopupMenu( this );
mActionShowBirthday->plug( menu );
mActionShowAddresses->plug( menu );
mActionShowEmails->plug( menu );
@@ -663,12 +663,12 @@ QPopupMenu *AddresseeView::createPopupMenu( const QPoint& )
return menu;
}
-void AddresseeView::slotMailClicked( const QString&, const QString &email )
+void AddresseeView::slotMailClicked( const TQString&, const TQString &email )
{
emailClicked( email );
}
-void AddresseeView::slotUrlClicked( const QString &url )
+void AddresseeView::slotUrlClicked( const TQString &url )
{
if ( url.startsWith( "phone:" ) )
phoneNumberClicked( strippedNumber( url.mid( 8 ) ) );
@@ -684,27 +684,27 @@ void AddresseeView::slotUrlClicked( const QString &url )
urlClicked( url );
}
-void AddresseeView::slotHighlighted( const QString &link )
+void AddresseeView::slotHighlighted( const TQString &link )
{
if ( link.startsWith( "mailto:" ) ) {
- QString email = link.mid( 7 );
+ TQString email = link.mid( 7 );
emit emailHighlighted( email );
emit highlightedMessage( i18n( "Send mail to '%1'" ).arg( email ) );
} else if ( link.startsWith( "phone:" ) ) {
- QString number = link.mid( 8 );
+ TQString number = link.mid( 8 );
emit phoneNumberHighlighted( strippedNumber( number ) );
emit highlightedMessage( i18n( "Call number %1" ).arg( number ) );
} else if ( link.startsWith( "fax:" ) ) {
- QString number = link.mid( 6 );
+ TQString number = link.mid( 6 );
emit faxNumberHighlighted( strippedNumber( number ) );
emit highlightedMessage( i18n( "Send fax to %1" ).arg( number ) );
} else if ( link.startsWith( "addr:" ) ) {
emit highlightedMessage( i18n( "Show address on map" ) );
} else if ( link.startsWith( "sms:" ) ) {
- QString number = link.mid( 6 );
+ TQString number = link.mid( 6 );
emit highlightedMessage( i18n( "Send SMS to %1" ).arg( number ) );
} else if ( link.startsWith( "http:" ) || link.startsWith( "https:" ) ) {
emit urlHighlighted( link );
@@ -715,7 +715,7 @@ void AddresseeView::slotHighlighted( const QString &link )
emit highlightedMessage( "" );
}
-void AddresseeView::slotPresenceChanged( const QString &uid )
+void AddresseeView::slotPresenceChanged( const TQString &uid )
{
kdDebug() << k_funcinfo << " uid is: " << uid << " mAddressee is: " << mAddressee.uid() << endl;
if ( uid == mAddressee.uid() )
@@ -734,7 +734,7 @@ void AddresseeView::configChanged()
updateView();
}
-void AddresseeView::data( KIO::Job*, const QByteArray &d )
+void AddresseeView::data( KIO::Job*, const TQByteArray &d )
{
unsigned int oldSize = mImageData.size();
mImageData.resize( oldSize + d.size() );
@@ -776,12 +776,12 @@ void AddresseeView::save()
mConfig->sync();
}
-QString AddresseeView::strippedNumber( const QString &number )
+TQString AddresseeView::strippedNumber( const TQString &number )
{
- QString retval;
+ TQString retval;
for ( uint i = 0; i < number.length(); ++i ) {
- QChar c = number[ i ];
+ TQChar c = number[ i ];
if ( c.isDigit() || c == '*' || c == '#' || c == '+' && i == 0 )
retval.append( c );
}
diff --git a/libkdepim/addresseeview.h b/libkdepim/addresseeview.h
index fe81226d4..97c6eebbb 100644
--- a/libkdepim/addresseeview.h
+++ b/libkdepim/addresseeview.h
@@ -22,7 +22,7 @@
#ifndef KPIM_ADDRESSEEVIEW_H
#define KPIM_ADDRESSEEVIEW_H
-#include <qcstring.h>
+#include <tqcstring.h>
#include <kabc/addressee.h>
#include <ktextbrowser.h>
@@ -50,7 +50,7 @@ class KDE_EXPORT AddresseeView : public KTextBrowser
@param config The config object where the settings are stored
which fields will be shown.
*/
- AddresseeView( QWidget *parent = 0, const char *name = 0,
+ AddresseeView( TQWidget *parent = 0, const char *name = 0,
KConfig *config = 0 );
~AddresseeView();
@@ -127,46 +127,46 @@ class KDE_EXPORT AddresseeView : public KTextBrowser
@param fieldMask The mask for which fields of the contact will
be displayed.
*/
- static QString vCardAsHTML( const KABC::Addressee& addr, ::KIMProxy *proxy, LinkMask linkMask = DefaultLinks,
+ static TQString vCardAsHTML( const KABC::Addressee& addr, ::KIMProxy *proxy, LinkMask linkMask = DefaultLinks,
bool internalLoading = true, FieldMask fieldMask = DefaultFields );
/**
- * Encodes a QPixmap as a PNG into a data: URL (rfc2397), readable by the data kio protocol
+ * Encodes a TQPixmap as a PNG into a data: URL (rfc2397), readable by the data kio protocol
* @param pixmap the pixmap to encode
* @return a data: URL
*/
- static QString pixmapAsDataUrl( const QPixmap& pixmap );
+ static TQString pixmapAsDataUrl( const TQPixmap& pixmap );
signals:
- void urlHighlighted( const QString &url );
- void emailHighlighted( const QString &email );
- void phoneNumberHighlighted( const QString &number );
- void faxNumberHighlighted( const QString &number );
+ void urlHighlighted( const TQString &url );
+ void emailHighlighted( const TQString &email );
+ void phoneNumberHighlighted( const TQString &number );
+ void faxNumberHighlighted( const TQString &number );
- void highlightedMessage( const QString &message );
+ void highlightedMessage( const TQString &message );
- void addressClicked( const QString &uid );
+ void addressClicked( const TQString &uid );
protected:
- virtual void urlClicked( const QString &url );
- virtual void emailClicked( const QString &mail );
- virtual void phoneNumberClicked( const QString &number );
- virtual void smsTextClicked( const QString &number );
- virtual void sendSMS( const QString &number, const QString &msg );
- virtual void faxNumberClicked( const QString &number );
+ virtual void urlClicked( const TQString &url );
+ virtual void emailClicked( const TQString &mail );
+ virtual void phoneNumberClicked( const TQString &number );
+ virtual void smsTextClicked( const TQString &number );
+ virtual void sendSMS( const TQString &number, const TQString &msg );
+ virtual void faxNumberClicked( const TQString &number );
virtual void imAddressClicked();
- virtual QPopupMenu *createPopupMenu( const QPoint& );
+ virtual TQPopupMenu *createPopupMenu( const TQPoint& );
private slots:
- void slotMailClicked( const QString&, const QString& );
- void slotUrlClicked( const QString& );
- void slotHighlighted( const QString& );
- void slotPresenceChanged( const QString & );
+ void slotMailClicked( const TQString&, const TQString& );
+ void slotUrlClicked( const TQString& );
+ void slotHighlighted( const TQString& );
+ void slotPresenceChanged( const TQString & );
void slotPresenceInfoExpired();
void configChanged();
- void data( KIO::Job*, const QByteArray& );
+ void data( KIO::Job*, const TQByteArray& );
void result( KIO::Job* );
private:
@@ -175,12 +175,12 @@ class KDE_EXPORT AddresseeView : public KTextBrowser
void updateView();
- QString strippedNumber( const QString &number );
+ TQString strippedNumber( const TQString &number );
KConfig *mConfig;
bool mDefaultConfig;
- QByteArray mImageData;
+ TQByteArray mImageData;
KIO::Job *mImageJob;
KToggleAction *mActionShowBirthday;
diff --git a/libkdepim/addressesdialog.cpp b/libkdepim/addressesdialog.cpp
index 3dc38920e..8a33d7999 100644
--- a/libkdepim/addressesdialog.cpp
+++ b/libkdepim/addressesdialog.cpp
@@ -52,10 +52,10 @@
#include <krun.h>
#include <kstandarddirs.h>
-#include <qdict.h>
-#include <qlayout.h>
-#include <qvbox.h>
-#include <qwidget.h>
+#include <tqdict.h>
+#include <tqlayout.h>
+#include <tqvbox.h>
+#include <tqwidget.h>
namespace KPIM {
@@ -82,7 +82,7 @@ struct AddressesDialog::AddressesDialogPrivate {
AddresseeViewItem *ccItem;
AddresseeViewItem *bccItem;
- QDict<AddresseeViewItem> groupDict;
+ TQDict<AddresseeViewItem> groupDict;
KABC::Addressee::List recentAddresses;
LDAPSearchDialog *ldapSearchDialog;
@@ -91,7 +91,7 @@ struct AddressesDialog::AddressesDialogPrivate {
AddresseeViewItem::AddresseeViewItem( AddresseeViewItem *parent, const KABC::Addressee& addr,
int emailIndex )
- : QObject( 0 ), KListViewItem( parent, addr.realName(),
+ : TQObject( 0 ), KListViewItem( parent, addr.realName(),
( emailIndex == 0 ? addr.preferredEmail() : addr.emails()[ emailIndex ] ) )
{
d = new AddresseeViewItemPrivate;
@@ -111,24 +111,24 @@ AddresseeViewItem::AddresseeViewItem( AddresseeViewItem *parent, const KABC::Add
}
}
-AddresseeViewItem::AddresseeViewItem( KListView *lv, const QString& name, Category cat )
- : QObject(0), KListViewItem( lv, name )
+AddresseeViewItem::AddresseeViewItem( KListView *lv, const TQString& name, Category cat )
+ : TQObject(0), KListViewItem( lv, name )
{
d = new AddresseeViewItemPrivate;
d->category = cat;
}
-AddresseeViewItem::AddresseeViewItem( AddresseeViewItem *parent, const QString& name,
+AddresseeViewItem::AddresseeViewItem( AddresseeViewItem *parent, const TQString& name,
const KABC::Addressee::List &lst )
- : QObject(0), KListViewItem( parent, name, i18n("<group>") )
+ : TQObject(0), KListViewItem( parent, name, i18n("<group>") )
{
d = new AddresseeViewItemPrivate;
d->category = FilledGroup;
d->addresses = lst;
}
-AddresseeViewItem::AddresseeViewItem( AddresseeViewItem *parent, const QString& name )
- : QObject(0), KListViewItem( parent, name, i18n("<group>") )
+AddresseeViewItem::AddresseeViewItem( AddresseeViewItem *parent, const TQString& name )
+ : TQObject(0), KListViewItem( parent, name, i18n("<group>") )
{
d = new AddresseeViewItemPrivate;
d->category = DistList;
@@ -172,7 +172,7 @@ AddresseeViewItem::email() const
return text(1);
}
-bool AddresseeViewItem::matches(const QString& txt) const
+bool AddresseeViewItem::matches(const TQString& txt) const
{
return d->address.realName().contains(txt, false) || d->address.preferredEmail().contains(txt, false);
}
@@ -185,11 +185,11 @@ void AddresseeViewItem::setSelected(bool selected)
}
emit addressSelected( this, selected );
- QListViewItem::setSelected(selected);
+ TQListViewItem::setSelected(selected);
}
int
-AddresseeViewItem::compare( QListViewItem * i, int col, bool ascending ) const
+AddresseeViewItem::compare( TQListViewItem * i, int col, bool ascending ) const
{
if ( category() == Group || category() == Entry )
return KListViewItem::compare( i , col, ascending );
@@ -210,11 +210,11 @@ AddresseeViewItem::compare( QListViewItem * i, int col, bool ascending ) const
return -1;
}
-AddressesDialog::AddressesDialog( QWidget *widget, const char *name )
+AddressesDialog::AddressesDialog( TQWidget *widget, const char *name )
: KDialogBase( widget, name, true, i18n("Address Selection"),
Ok|Cancel, Ok, true )
{
- QVBox *page = makeVBoxMainWidget();
+ TQVBox *page = makeVBoxMainWidget();
d = new AddressesDialogPrivate;
d->ui = new AddressPickerUI( page );
@@ -236,8 +236,8 @@ AddresseeViewItem* AddressesDialog::selectedToItem()
if ( !d->toItem )
{
d->toItem = new AddresseeViewItem( d->ui->mSelectedView, i18n("To"), AddresseeViewItem::To );
- connect(d->toItem, SIGNAL(addressSelected(AddresseeViewItem*, bool)),
- this, SLOT(selectedAddressSelected(AddresseeViewItem*, bool)));
+ connect(d->toItem, TQT_SIGNAL(addressSelected(AddresseeViewItem*, bool)),
+ this, TQT_SLOT(selectedAddressSelected(AddresseeViewItem*, bool)));
}
return d->toItem;
}
@@ -247,8 +247,8 @@ AddresseeViewItem* AddressesDialog::selectedCcItem()
if ( !d->ccItem )
{
d->ccItem = new AddresseeViewItem( d->ui->mSelectedView, i18n("CC"), AddresseeViewItem::CC );
- connect(d->ccItem, SIGNAL(addressSelected(AddresseeViewItem*, bool)),
- this, SLOT(selectedAddressSelected(AddresseeViewItem*, bool)));
+ connect(d->ccItem, TQT_SIGNAL(addressSelected(AddresseeViewItem*, bool)),
+ this, TQT_SLOT(selectedAddressSelected(AddresseeViewItem*, bool)));
}
return d->ccItem;
}
@@ -258,17 +258,17 @@ AddresseeViewItem* AddressesDialog::selectedBccItem()
if ( !d->bccItem )
{
d->bccItem = new AddresseeViewItem( d->ui->mSelectedView, i18n("BCC"), AddresseeViewItem::BCC );
- connect(d->bccItem, SIGNAL(addressSelected(AddresseeViewItem*, bool)),
- this, SLOT(selectedAddressSelected(AddresseeViewItem*, bool)));
+ connect(d->bccItem, TQT_SIGNAL(addressSelected(AddresseeViewItem*, bool)),
+ this, TQT_SLOT(selectedAddressSelected(AddresseeViewItem*, bool)));
}
return d->bccItem;
}
void
-AddressesDialog::setSelectedTo( const QStringList& l )
+AddressesDialog::setSelectedTo( const TQStringList& l )
{
- QString name, email;
- for ( QStringList::ConstIterator it = l.begin(); it != l.end(); ++it ) {
+ TQString name, email;
+ for ( TQStringList::ConstIterator it = l.begin(); it != l.end(); ++it ) {
KABC::Addressee addr;
KABC::Addressee::parseEmailAddress( *it, name, email );
addr.setNameFromString( name );
@@ -278,10 +278,10 @@ AddressesDialog::setSelectedTo( const QStringList& l )
}
void
-AddressesDialog::setSelectedCC( const QStringList& l )
+AddressesDialog::setSelectedCC( const TQStringList& l )
{
- QString name, email;
- for ( QStringList::ConstIterator it = l.begin(); it != l.end(); ++it ) {
+ TQString name, email;
+ for ( TQStringList::ConstIterator it = l.begin(); it != l.end(); ++it ) {
KABC::Addressee addr;
KABC::Addressee::parseEmailAddress( *it, name, email );
addr.setNameFromString( name );
@@ -291,10 +291,10 @@ AddressesDialog::setSelectedCC( const QStringList& l )
}
void
-AddressesDialog::setSelectedBCC( const QStringList& l )
+AddressesDialog::setSelectedBCC( const TQStringList& l )
{
- QString name, email;
- for ( QStringList::ConstIterator it = l.begin(); it != l.end(); ++it ) {
+ TQString name, email;
+ for ( TQStringList::ConstIterator it = l.begin(); it != l.end(); ++it ) {
KABC::Addressee addr;
KABC::Addressee::parseEmailAddress( *it, name, email );
addr.setNameFromString( name );
@@ -316,12 +316,12 @@ AddressesDialog::setRecentAddresses( const KABC::Addressee::List& list )
void
AddressesDialog::updateRecentAddresses()
{
- static const QString &recentGroup = KGlobal::staticQString( i18n( "Recent Addresses" ) );
+ static const TQString &recentGroup = KGlobal::staticQString( i18n( "Recent Addresses" ) );
if ( !d->recent ) {
d->recent = new AddresseeViewItem( d->ui->mAvailableView, recentGroup );
- connect(d->recent, SIGNAL(addressSelected(AddresseeViewItem*, bool)),
- this, SLOT(availableAddressSelected(AddresseeViewItem*, bool)));
+ connect(d->recent, TQT_SIGNAL(addressSelected(AddresseeViewItem*, bool)),
+ this, TQT_SLOT(availableAddressSelected(AddresseeViewItem*, bool)));
d->recent->setVisible( false );
d->groupDict.insert( recentGroup, d->recent );
}
@@ -350,7 +350,7 @@ AddressesDialog::setShowBCC( bool b )
QStringList
AddressesDialog::to() const
{
- QStringList emails = allDistributionLists( d->toItem );
+ TQStringList emails = allDistributionLists( d->toItem );
KABC::Addressee::List l = toAddresses();
emails += entryToString( l );
@@ -360,7 +360,7 @@ AddressesDialog::to() const
QStringList
AddressesDialog::cc() const
{
- QStringList emails = allDistributionLists( d->ccItem );
+ TQStringList emails = allDistributionLists( d->ccItem );
KABC::Addressee::List l = ccAddresses();
emails += entryToString( l );
@@ -370,7 +370,7 @@ AddressesDialog::cc() const
QStringList
AddressesDialog::bcc() const
{
- QStringList emails = allDistributionLists( d->bccItem );
+ TQStringList emails = allDistributionLists( d->bccItem );
KABC::Addressee::List l = bccAddresses();
emails += entryToString( l );
@@ -387,13 +387,13 @@ KABC::Addressee::List
AddressesDialog::allToAddressesNoDuplicates() const
{
KABC::Addressee::List aList = allAddressee( d->toItem );
- const QStringList dList = toDistributionLists();
+ const TQStringList dList = toDistributionLists();
KABC::AddressBook* abook = KABC::StdAddressBook::self( true );
#ifdef KDEPIM_NEW_DISTRLISTS
- for ( QStringList::ConstIterator it = dList.begin(); it != dList.end(); ++it ) {
- const QValueList<KPIM::DistributionList::Entry> eList
+ for ( TQStringList::ConstIterator it = dList.begin(); it != dList.end(); ++it ) {
+ const TQValueList<KPIM::DistributionList::Entry> eList
= KPIM::DistributionList::findByName(abook, *it).entries(abook);
- QValueList<KPIM::DistributionList::Entry>::ConstIterator eit;
+ TQValueList<KPIM::DistributionList::Entry>::ConstIterator eit;
for( eit = eList.begin(); eit != eList.end(); ++eit ) {
KABC::Addressee a = (*eit).addressee;
if ( !a.preferredEmail().isEmpty() && aList.find( a ) == aList.end() ) {
@@ -404,9 +404,9 @@ AddressesDialog::allToAddressesNoDuplicates() const
#else
KABC::DistributionListManager manager( abook );
manager.load();
- for ( QStringList::ConstIterator it = dList.begin(); it != dList.end(); ++it ) {
- const QValueList<KABC::DistributionList::Entry> eList = manager.list( *it )->entries();
- QValueList<KABC::DistributionList::Entry>::ConstIterator eit;
+ for ( TQStringList::ConstIterator it = dList.begin(); it != dList.end(); ++it ) {
+ const TQValueList<KABC::DistributionList::Entry> eList = manager.list( *it )->entries();
+ TQValueList<KABC::DistributionList::Entry>::ConstIterator eit;
for( eit = eList.begin(); eit != eList.end(); ++eit ) {
KABC::Addressee a = (*eit).addressee;
if ( !a.preferredEmail().isEmpty() && aList.find( a ) == aList.end() ) {
@@ -455,11 +455,11 @@ AddressesDialog::updateAvailableAddressees()
d->ui->mAvailableView->clear();
d->groupDict.clear();
- static const QString &personalGroup = KGlobal::staticQString( i18n( "Other Addresses" ) );
+ static const TQString &personalGroup = KGlobal::staticQString( i18n( "Other Addresses" ) );
d->ui->mAvailableView->setRootIsDecorated( true );
d->personal = new AddresseeViewItem( d->ui->mAvailableView, personalGroup );
- //connect(d->personal, SIGNAL(addressSelected(AddresseeViewItem*, bool)),
- // this, SLOT(selectedAddressSelected(AddresseeViewItem*, bool)));
+ //connect(d->personal, TQT_SIGNAL(addressSelected(AddresseeViewItem*, bool)),
+ // this, TQT_SLOT(selectedAddressSelected(AddresseeViewItem*, bool)));
d->personal->setVisible( false );
d->groupDict.insert( personalGroup, d->personal );
@@ -482,8 +482,8 @@ AddressesDialog::updateAvailableAddressees()
void AddressesDialog::checkForSingleAvailableGroup()
{
- QListViewItem* item = d->ui->mAvailableView->firstChild();
- QListViewItem* firstGroup = 0;
+ TQListViewItem* item = d->ui->mAvailableView->firstChild();
+ TQListViewItem* firstGroup = 0;
int found = 0;
while (item)
{
@@ -539,7 +539,7 @@ AddressesDialog::selectedAddressSelected( AddresseeViewItem* item, bool selected
// we have to avoid that a parent and a child is selected together
// because in this case we get a double object deletion ( program crashes )
// when removing the selected items from list
- AddresseeViewItem* parent = static_cast<AddresseeViewItem*>(((QListViewItem*)item)->parent());
+ AddresseeViewItem* parent = static_cast<AddresseeViewItem*>(((TQListViewItem*)item)->parent());
if ( parent && selected )
parent->setSelected( false );
if (selected)
@@ -562,36 +562,36 @@ AddressesDialog::selectedAddressSelected( AddresseeViewItem* item, bool selected
void
AddressesDialog::initConnections()
{
- connect( d->ui->mFilterEdit, SIGNAL(textChanged(const QString &)),
- SLOT(filterChanged(const QString &)) );
- connect( d->ui->mToButton, SIGNAL(clicked()),
- SLOT(addSelectedTo()) );
- connect( d->ui->mCCButton, SIGNAL(clicked()),
- SLOT(addSelectedCC()) );
- connect( d->ui->mBCCButton, SIGNAL(clicked()),
- SLOT(addSelectedBCC()) );
- connect( d->ui->mSaveAs, SIGNAL(clicked()),
- SLOT(saveAs()) );
- connect( d->ui->mLdapSearch, SIGNAL(clicked()),
- SLOT(searchLdap()) );
- connect( d->ui->mRemoveButton, SIGNAL(clicked()),
- SLOT(removeEntry()) );
- connect( d->ui->mAvailableView, SIGNAL(selectionChanged()),
- SLOT(availableSelectionChanged()) );
- connect( d->ui->mAvailableView, SIGNAL(doubleClicked(QListViewItem*)),
- SLOT(addSelectedTo()) );
- connect( d->ui->mSelectedView, SIGNAL(selectionChanged()),
- SLOT(selectedSelectionChanged()) );
- connect( d->ui->mSelectedView, SIGNAL(doubleClicked(QListViewItem*)),
- SLOT(removeEntry()) );
+ connect( d->ui->mFilterEdit, TQT_SIGNAL(textChanged(const TQString &)),
+ TQT_SLOT(filterChanged(const TQString &)) );
+ connect( d->ui->mToButton, TQT_SIGNAL(clicked()),
+ TQT_SLOT(addSelectedTo()) );
+ connect( d->ui->mCCButton, TQT_SIGNAL(clicked()),
+ TQT_SLOT(addSelectedCC()) );
+ connect( d->ui->mBCCButton, TQT_SIGNAL(clicked()),
+ TQT_SLOT(addSelectedBCC()) );
+ connect( d->ui->mSaveAs, TQT_SIGNAL(clicked()),
+ TQT_SLOT(saveAs()) );
+ connect( d->ui->mLdapSearch, TQT_SIGNAL(clicked()),
+ TQT_SLOT(searchLdap()) );
+ connect( d->ui->mRemoveButton, TQT_SIGNAL(clicked()),
+ TQT_SLOT(removeEntry()) );
+ connect( d->ui->mAvailableView, TQT_SIGNAL(selectionChanged()),
+ TQT_SLOT(availableSelectionChanged()) );
+ connect( d->ui->mAvailableView, TQT_SIGNAL(doubleClicked(TQListViewItem*)),
+ TQT_SLOT(addSelectedTo()) );
+ connect( d->ui->mSelectedView, TQT_SIGNAL(selectionChanged()),
+ TQT_SLOT(selectedSelectionChanged()) );
+ connect( d->ui->mSelectedView, TQT_SIGNAL(doubleClicked(TQListViewItem*)),
+ TQT_SLOT(removeEntry()) );
#ifndef KDEPIM_NEW_DISTRLISTS
- connect( KABC::DistributionListWatcher::self(), SIGNAL( changed() ),
- this, SLOT( updateAvailableAddressees() ) );
+ connect( KABC::DistributionListWatcher::self(), TQT_SIGNAL( changed() ),
+ this, TQT_SLOT( updateAvailableAddressees() ) );
#endif
- connect( KABC::StdAddressBook::self( true ), SIGNAL( addressBookChanged(AddressBook*) ),
- this, SLOT( updateAvailableAddressees() ) );
+ connect( KABC::StdAddressBook::self( true ), TQT_SIGNAL( addressBookChanged(AddressBook*) ),
+ this, TQT_SLOT( updateAvailableAddressees() ) );
}
void
@@ -601,9 +601,9 @@ AddressesDialog::addAddresseeToAvailable( const KABC::Addressee& addr, Addressee
return;
if ( useCategory ) {
- QStringList categories = addr.categories();
+ TQStringList categories = addr.categories();
- for ( QStringList::Iterator it = categories.begin(); it != categories.end(); ++it ) {
+ for ( TQStringList::Iterator it = categories.begin(); it != categories.end(); ++it ) {
if ( !d->groupDict[ *it ] ) { //we don't have the category yet
AddresseeViewItem* category = new AddresseeViewItem( d->ui->mAvailableView, *it );
d->groupDict.insert( *it, category );
@@ -611,8 +611,8 @@ AddressesDialog::addAddresseeToAvailable( const KABC::Addressee& addr, Addressee
for ( uint i = 0; i < addr.emails().count(); ++i ) {
AddresseeViewItem* addressee = new AddresseeViewItem( d->groupDict[ *it ], addr, i );
- connect(addressee, SIGNAL(addressSelected(AddresseeViewItem*, bool)),
- this, SLOT(availableAddressSelected(AddresseeViewItem*, bool)));
+ connect(addressee, TQT_SIGNAL(addressSelected(AddresseeViewItem*, bool)),
+ this, TQT_SLOT(availableAddressSelected(AddresseeViewItem*, bool)));
}
}
}
@@ -626,8 +626,8 @@ AddressesDialog::addAddresseeToAvailable( const KABC::Addressee& addr, Addressee
if ( defaultParent && noCategory ) { // only non-categorized items here
AddresseeViewItem* addressee = new AddresseeViewItem( defaultParent, addr );
- connect(addressee, SIGNAL(addressSelected(AddresseeViewItem*, bool)),
- this, SLOT(availableAddressSelected(AddresseeViewItem*, bool)));
+ connect(addressee, TQT_SIGNAL(addressSelected(AddresseeViewItem*, bool)),
+ this, TQT_SLOT(availableAddressSelected(AddresseeViewItem*, bool)));
}
}
@@ -645,8 +645,8 @@ AddressesDialog::addAddresseeToSelected( const KABC::Addressee& addr, AddresseeV
myChild = static_cast<AddresseeViewItem*>( myChild->nextSibling() );
}
AddresseeViewItem* addressee = new AddresseeViewItem( defaultParent, addr );
- connect(addressee, SIGNAL(addressSelected(AddresseeViewItem*, bool)),
- this, SLOT(selectedAddressSelected(AddresseeViewItem*, bool)));
+ connect(addressee, TQT_SIGNAL(addressSelected(AddresseeViewItem*, bool)),
+ this, TQT_SLOT(selectedAddressSelected(AddresseeViewItem*, bool)));
defaultParent->setOpen( true );
}
@@ -655,11 +655,11 @@ AddressesDialog::addAddresseeToSelected( const KABC::Addressee& addr, AddresseeV
void
AddressesDialog::addAddresseesToSelected( AddresseeViewItem *parent,
- const QPtrList<AddresseeViewItem>& addresses )
+ const TQPtrList<AddresseeViewItem>& addresses )
{
Q_ASSERT( parent );
- QPtrListIterator<AddresseeViewItem> itr( addresses );
+ TQPtrListIterator<AddresseeViewItem> itr( addresses );
if (itr.current())
{
@@ -693,8 +693,8 @@ AddressesDialog::addAddresseesToSelected( AddresseeViewItem *parent,
address->setVisible( false );
selectedToAvailableMapping.insert(address, newItem);
selectedToAvailableMapping.insert(newItem, address);
- connect(newItem, SIGNAL(addressSelected(AddresseeViewItem*, bool)),
- this, SLOT(selectedAddressSelected(AddresseeViewItem*, bool)));
+ connect(newItem, TQT_SIGNAL(addressSelected(AddresseeViewItem*, bool)),
+ this, TQT_SLOT(selectedAddressSelected(AddresseeViewItem*, bool)));
}
parent->setOpen( true );
@@ -703,7 +703,7 @@ AddressesDialog::addAddresseesToSelected( AddresseeViewItem *parent,
QStringList
AddressesDialog::entryToString( const KABC::Addressee::List& l ) const
{
- QStringList entries;
+ TQStringList entries;
for( KABC::Addressee::List::ConstIterator it = l.begin(); it != l.end(); ++it ) {
entries += (*it).fullEmail();
@@ -717,8 +717,8 @@ AddressesDialog::addSelectedTo()
if ( !d->toItem )
{
d->toItem = new AddresseeViewItem( d->ui->mSelectedView, i18n("To"), AddresseeViewItem::To );
- connect(d->toItem, SIGNAL(addressSelected(AddresseeViewItem*, bool)),
- this, SLOT(selectedAddressSelected(AddresseeViewItem*, bool)));
+ connect(d->toItem, TQT_SIGNAL(addressSelected(AddresseeViewItem*, bool)),
+ this, TQT_SLOT(selectedAddressSelected(AddresseeViewItem*, bool)));
}
addAddresseesToSelected( d->toItem, selectedAvailableAddresses );
@@ -739,8 +739,8 @@ AddressesDialog::addSelectedCC()
if ( !d->ccItem )
{
d->ccItem = new AddresseeViewItem( d->ui->mSelectedView, i18n("CC"), AddresseeViewItem::CC );
- connect(d->ccItem , SIGNAL(addressSelected(AddresseeViewItem*, bool)),
- this, SLOT(selectedAddressSelected(AddresseeViewItem*, bool)));
+ connect(d->ccItem , TQT_SIGNAL(addressSelected(AddresseeViewItem*, bool)),
+ this, TQT_SLOT(selectedAddressSelected(AddresseeViewItem*, bool)));
}
addAddresseesToSelected( d->ccItem, selectedAvailableAddresses );
@@ -761,8 +761,8 @@ AddressesDialog::addSelectedBCC()
if ( !d->bccItem )
{
d->bccItem = new AddresseeViewItem( d->ui->mSelectedView, i18n("BCC"), AddresseeViewItem::BCC );
- connect(d->bccItem , SIGNAL(addressSelected(AddresseeViewItem*, bool)),
- this, SLOT(selectedAddressSelected(AddresseeViewItem*, bool)));
+ connect(d->bccItem , TQT_SIGNAL(addressSelected(AddresseeViewItem*, bool)),
+ this, TQT_SLOT(selectedAddressSelected(AddresseeViewItem*, bool)));
}
addAddresseesToSelected( d->bccItem, selectedAvailableAddresses );
@@ -798,13 +798,13 @@ void AddressesDialog::unmapSelectedAddress(AddresseeViewItem* item)
void
AddressesDialog::removeEntry()
{
- QPtrList<AddresseeViewItem> lst;
+ TQPtrList<AddresseeViewItem> lst;
bool resetTo = false;
bool resetCC = false;
bool resetBCC = false;
lst.setAutoDelete( false );
- QPtrListIterator<AddresseeViewItem> it( selectedSelectedAddresses );
+ TQPtrListIterator<AddresseeViewItem> it( selectedSelectedAddresses );
while ( it.current() ) {
AddresseeViewItem* item = it.current();
++it;
@@ -849,12 +849,12 @@ AddressesDialog::removeEntry()
// copied from kabcore.cpp :(
// KDE4: should be in libkabc I think
-static KABC::Resource *requestResource( KABC::AddressBook* abook, QWidget *parent )
+static KABC::Resource *requestResource( KABC::AddressBook* abook, TQWidget *parent )
{
- QPtrList<KABC::Resource> kabcResources = abook->resources();
+ TQPtrList<KABC::Resource> kabcResources = abook->resources();
- QPtrList<KRES::Resource> kresResources;
- QPtrListIterator<KABC::Resource> resIt( kabcResources );
+ TQPtrList<KRES::Resource> kresResources;
+ TQPtrListIterator<KABC::Resource> resIt( kabcResources );
KABC::Resource *resource;
while ( ( resource = resIt.current() ) != 0 ) {
++resIt;
@@ -887,9 +887,9 @@ AddressesDialog::saveAs()
}
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,
+ TQString::null, &ok,
this );
if ( !ok || name.isEmpty() )
return;
@@ -941,8 +941,8 @@ AddressesDialog::searchLdap()
{
if ( !d->ldapSearchDialog ) {
d->ldapSearchDialog = new LDAPSearchDialog( this );
- connect( d->ldapSearchDialog, SIGNAL( addresseesAdded() ),
- SLOT(ldapSearchResult() ) );
+ connect( d->ldapSearchDialog, TQT_SIGNAL( addresseesAdded() ),
+ TQT_SLOT(ldapSearchResult() ) );
}
d->ldapSearchDialog->show();
}
@@ -950,12 +950,12 @@ AddressesDialog::searchLdap()
void
AddressesDialog::ldapSearchResult()
{
- QStringList emails = QStringList::split(',', d->ldapSearchDialog->selectedEMails() );
- QStringList::iterator it( emails.begin() );
- QStringList::iterator end( emails.end() );
+ TQStringList emails = TQStringList::split(',', d->ldapSearchDialog->selectedEMails() );
+ TQStringList::iterator it( emails.begin() );
+ TQStringList::iterator end( emails.end() );
for ( ; it != end; ++it ){
- QString name;
- QString email;
+ TQString name;
+ TQString email;
KPIM::getNameAndMail( (*it), name, email );
KABC::Addressee ad;
ad.setNameFromString( name );
@@ -967,13 +967,13 @@ AddressesDialog::ldapSearchResult()
void
AddressesDialog::launchAddressBook()
{
- kapp->startServiceByDesktopName( "kaddressbook", QString() );
+ kapp->startServiceByDesktopName( "kaddressbook", TQString() );
}
void
-AddressesDialog::filterChanged( const QString& txt )
+AddressesDialog::filterChanged( const TQString& txt )
{
- QListViewItemIterator it( d->ui->mAvailableView );
+ TQListViewItemIterator it( d->ui->mAvailableView );
bool showAll = false;
if ( txt.isEmpty() )
@@ -991,8 +991,8 @@ AddressesDialog::filterChanged( const QString& txt )
if ( item->category() == AddresseeViewItem::Entry ) {
bool matches = item->matches( txt ) ;
item->setVisible( matches );
- if ( matches && static_cast<QListViewItem*>(item)->parent() ) {
- static_cast<QListViewItem*>(item)->parent()->setOpen( true );//open the parents with found entries
+ if ( matches && static_cast<TQListViewItem*>(item)->parent() ) {
+ static_cast<TQListViewItem*>(item)->parent()->setOpen( true );//open the parents with found entries
}
}
}
@@ -1002,7 +1002,7 @@ KABC::Addressee::List
AddressesDialog::allAddressee( KListView* view, bool onlySelected ) const
{
KABC::Addressee::List lst;
- QListViewItemIterator it( view );
+ TQListViewItemIterator it( view );
while ( it.current() ) {
AddresseeViewItem* item = static_cast<AddresseeViewItem*>( it.current() );
if ( !onlySelected || item->isSelected() ) {
@@ -1050,10 +1050,10 @@ AddressesDialog::allAddressee( AddresseeViewItem* parent ) const
QStringList
AddressesDialog::allDistributionLists( AddresseeViewItem* parent ) const
{
- QStringList lists;
+ TQStringList lists;
if ( !parent )
- return QStringList();
+ return TQStringList();
AddresseeViewItem *item = static_cast<AddresseeViewItem*>( parent->firstChild() );
while ( item ) {
@@ -1072,13 +1072,13 @@ AddressesDialog::addDistributionLists()
KABC::AddressBook* abook = KABC::StdAddressBook::self( true );
#ifdef KDEPIM_NEW_DISTRLISTS
- const QValueList<KPIM::DistributionList> distLists =
+ const TQValueList<KPIM::DistributionList> distLists =
KPIM::DistributionList::allDistributionLists( abook );
#else
KABC::DistributionListManager manager( abook );
manager.load();
- QStringList distLists = manager.listNames();
+ TQStringList distLists = manager.listNames();
#endif
if ( distLists.isEmpty() )
@@ -1088,9 +1088,9 @@ AddressesDialog::addDistributionLists()
i18n( "Distribution Lists" ) );
#ifdef KDEPIM_NEW_DISTRLISTS
- QValueList<KPIM::DistributionList>::ConstIterator listIt;
+ TQValueList<KPIM::DistributionList>::ConstIterator listIt;
#else
- QStringList::Iterator listIt;
+ TQStringList::Iterator listIt;
#endif
for ( listIt = distLists.begin(); listIt != distLists.end(); ++listIt ) {
#ifdef KDEPIM_NEW_DISTRLISTS
@@ -1102,8 +1102,8 @@ AddressesDialog::addDistributionLists()
#endif
AddresseeViewItem *item = new AddresseeViewItem( topItem, dlist.name() );
- connect( item, SIGNAL( addressSelected( AddresseeViewItem*, bool ) ),
- this, SLOT( availableAddressSelected( AddresseeViewItem*, bool ) ) );
+ connect( item, TQT_SIGNAL( addressSelected( AddresseeViewItem*, bool ) ),
+ this, TQT_SLOT( availableAddressSelected( AddresseeViewItem*, bool ) ) );
#ifdef KDEPIM_NEW_DISTRLISTS
KPIM::DistributionList::Entry::List::Iterator itemIt;
diff --git a/libkdepim/addressesdialog.h b/libkdepim/addressesdialog.h
index 06e8305d3..4b3ea9dc9 100644
--- a/libkdepim/addressesdialog.h
+++ b/libkdepim/addressesdialog.h
@@ -28,14 +28,14 @@
#include <kabc/addressee.h>
#include <kdialogbase.h>
#include <klistview.h>
-#include <qstringlist.h>
-#include <qptrlist.h>
-#include <qptrdict.h>
+#include <tqstringlist.h>
+#include <tqptrlist.h>
+#include <tqptrdict.h>
#include <kdepimmacros.h>
namespace KPIM {
- class AddresseeViewItem : public QObject, public KListViewItem
+ class AddresseeViewItem : public TQObject, public KListViewItem
{
Q_OBJECT
@@ -50,21 +50,21 @@ namespace KPIM {
DistList =6
};
AddresseeViewItem( AddresseeViewItem *parent, const KABC::Addressee& addr, int emailIndex = 0 );
- AddresseeViewItem( KListView *lv, const QString& name, Category cat=Group );
- AddresseeViewItem( AddresseeViewItem *parent, const QString& name, const KABC::Addressee::List &lst );
- AddresseeViewItem( AddresseeViewItem *parent, const QString& name );
+ AddresseeViewItem( KListView *lv, const TQString& name, Category cat=Group );
+ AddresseeViewItem( AddresseeViewItem *parent, const TQString& name, const KABC::Addressee::List &lst );
+ AddresseeViewItem( AddresseeViewItem *parent, const TQString& name );
~AddresseeViewItem();
KABC::Addressee addressee() const;
KABC::Addressee::List addresses() const;
Category category() const;
- QString name() const;
- QString email() const;
+ TQString name() const;
+ TQString email() const;
- bool matches( const QString& ) const;
+ bool matches( const TQString& ) const;
- virtual int compare( QListViewItem * i, int col, bool ascending ) const;
+ virtual int compare( TQListViewItem * i, int col, bool ascending ) const;
virtual void setSelected( bool );
signals:
@@ -79,21 +79,21 @@ namespace KPIM {
{
Q_OBJECT
public:
- AddressesDialog( QWidget *widget=0, const char *name=0 );
+ AddressesDialog( TQWidget *widget=0, const char *name=0 );
~AddressesDialog();
/**
- * Returns the list of picked "To" addresses as a QStringList.
+ * Returns the list of picked "To" addresses as a TQStringList.
*/
- QStringList to() const;
+ TQStringList to() const;
/**
- * Returns the list of picked "CC" addresses as a QStringList.
+ * Returns the list of picked "CC" addresses as a TQStringList.
*/
- QStringList cc() const;
+ TQStringList cc() const;
/**
- * Returns the list of picked "BCC" addresses as a QStringList.
+ * Returns the list of picked "BCC" addresses as a TQStringList.
*/
- QStringList bcc() const;
+ TQStringList bcc() const;
/**
* Returns the list of picked "To" addresses as KABC::Addressee::List.
@@ -121,17 +121,17 @@ namespace KPIM {
* Returns the list of picked "To" distribution lists.
* This complements @ref toAddresses.
*/
- QStringList toDistributionLists() const;
+ TQStringList toDistributionLists() const;
/**
* Returns the list of picked "CC" distribution lists.
* This complements @ref ccAddresses.
*/
- QStringList ccDistributionLists() const;
+ TQStringList ccDistributionLists() const;
/**
* Returns the list of picked "BCC" distribution lists.
* This complements @ref bccAddresses.
*/
- QStringList bccDistributionLists() const;
+ TQStringList bccDistributionLists() const;
public slots:
/**
@@ -152,15 +152,15 @@ namespace KPIM {
/**
* Adds addresses in @p l to the selected "To" group.
*/
- void setSelectedTo( const QStringList& l );
+ void setSelectedTo( const TQStringList& l );
/**
* Adds addresses in @p l to the selected "CC" group.
*/
- void setSelectedCC( const QStringList& l );
+ void setSelectedCC( const TQStringList& l );
/**
* Adds addresses in @p l to the selected "BCC" group.
*/
- void setSelectedBCC( const QStringList& l );
+ void setSelectedBCC( const TQStringList& l );
protected slots:
void addSelectedTo();
@@ -173,7 +173,7 @@ namespace KPIM {
void ldapSearchResult();
void launchAddressBook();
- void filterChanged( const QString & );
+ void filterChanged( const TQString & );
void updateAvailableAddressees();
void availableSelectionChanged();
@@ -193,11 +193,11 @@ namespace KPIM {
void addAddresseeToSelected( const KABC::Addressee& addr,
AddresseeViewItem* defaultParent=0 );
void addAddresseesToSelected( AddresseeViewItem *parent,
- const QPtrList<AddresseeViewItem>& addresses );
- QStringList entryToString( const KABC::Addressee::List& l ) const;
+ const TQPtrList<AddresseeViewItem>& addresses );
+ TQStringList entryToString( const KABC::Addressee::List& l ) const;
KABC::Addressee::List allAddressee( AddresseeViewItem* parent ) const;
KABC::Addressee::List allAddressee( KListView* view, bool onlySelected = true ) const;
- QStringList allDistributionLists( AddresseeViewItem* parent ) const;
+ TQStringList allDistributionLists( AddresseeViewItem* parent ) const;
private:
// if there's only one group in the available list, open it
@@ -211,9 +211,9 @@ namespace KPIM {
struct AddressesDialogPrivate;
AddressesDialogPrivate *d;
- QPtrList<AddresseeViewItem> selectedAvailableAddresses;
- QPtrList<AddresseeViewItem> selectedSelectedAddresses;
- QPtrDict<AddresseeViewItem> selectedToAvailableMapping;
+ TQPtrList<AddresseeViewItem> selectedAvailableAddresses;
+ TQPtrList<AddresseeViewItem> selectedSelectedAddresses;
+ TQPtrDict<AddresseeViewItem> selectedToAvailableMapping;
};
}
diff --git a/libkdepim/alarmclient.cpp b/libkdepim/alarmclient.cpp
index b7250d490..5616cd029 100644
--- a/libkdepim/alarmclient.cpp
+++ b/libkdepim/alarmclient.cpp
@@ -42,13 +42,13 @@ void AlarmClient::startDaemon()
}
KGlobal::dirs()->addResourceType("autostart", "share/autostart");
- QString desktopFile = locate( "autostart", "korgac.desktop" );
+ TQString desktopFile = locate( "autostart", "korgac.desktop" );
if ( desktopFile.isEmpty() ) {
kdWarning() << "Couldn't find autostart/korgac.desktop!" << endl;
}
else {
- QString error;
- if ( kapp->startServiceByDesktopPath( desktopFile, QStringList(), &error ) != 0 )
+ TQString error;
+ if ( kapp->startServiceByDesktopPath( desktopFile, TQStringList(), &error ) != 0 )
kdWarning() << "Failure starting korgac:" << error << endl;
}
}
diff --git a/libkdepim/broadcaststatus.cpp b/libkdepim/broadcaststatus.cpp
index 5d0af0d13..b566bd4b2 100644
--- a/libkdepim/broadcaststatus.cpp
+++ b/libkdepim/broadcaststatus.cpp
@@ -14,7 +14,7 @@
#include <config.h>
#endif
-#include <qdatetime.h>
+#include <tqdatetime.h>
#include <klocale.h>
#include <kglobal.h>
@@ -46,18 +46,18 @@ BroadcastStatus::~BroadcastStatus()
instance_ = 0;
}
-void BroadcastStatus::setStatusMsg( const QString& message )
+void BroadcastStatus::setStatusMsg( const TQString& message )
{
mStatusMsg = message;
if( !mTransientActive )
emit statusMsg( message );
}
-void BroadcastStatus::setStatusMsgWithTimestamp( const QString& message )
+void BroadcastStatus::setStatusMsgWithTimestamp( const TQString& message )
{
KLocale* locale = KGlobal::locale();
setStatusMsg( i18n( "%1 is a time, %2 is a status message", "[%1] %2" )
- .arg( locale->formatTime( QTime::currentTime(),
+ .arg( locale->formatTime( TQTime::currentTime(),
true /* with seconds */ ) )
.arg( message ) );
}
@@ -69,7 +69,7 @@ void BroadcastStatus::setStatusMsgTransmissionCompleted( int numMessages,
bool mLeaveOnServer,
KPIM::ProgressItem* item )
{
- QString statusMsg;
+ TQString statusMsg;
if( numMessages > 0 ) {
if( numBytes != -1 ) {
if( ( numBytesToRead != numBytes ) && mLeaveOnServer )
@@ -99,7 +99,7 @@ void BroadcastStatus::setStatusMsgTransmissionCompleted( int numMessages,
item->setStatus( statusMsg );
}
-void BroadcastStatus::setStatusMsgTransmissionCompleted( const QString& account,
+void BroadcastStatus::setStatusMsgTransmissionCompleted( const TQString& account,
int numMessages,
int numBytes,
int numBytesRead,
@@ -107,7 +107,7 @@ void BroadcastStatus::setStatusMsgTransmissionCompleted( const QString& account,
bool mLeaveOnServer,
KPIM::ProgressItem* item )
{
- QString statusMsg;
+ TQString statusMsg;
if( numMessages > 0 ) {
if( numBytes != -1 ) {
if( ( numBytesToRead != numBytes ) && mLeaveOnServer )
@@ -147,7 +147,7 @@ void BroadcastStatus::setStatusMsgTransmissionCompleted( const QString& account,
item->setStatus( statusMsg );
}
-void BroadcastStatus::setTransientStatusMsg( const QString& msg )
+void BroadcastStatus::setTransientStatusMsg( const TQString& msg )
{
mTransientActive = true;
emit statusMsg( msg );
diff --git a/libkdepim/broadcaststatus.h b/libkdepim/broadcaststatus.h
index e15ca87db..ad5c11bc1 100644
--- a/libkdepim/broadcaststatus.h
+++ b/libkdepim/broadcaststatus.h
@@ -11,8 +11,8 @@
#ifndef __kpim_broadcast_status_h
#define __kpim_broadcast_status_h
-#include <qobject.h>
-#include <qmap.h>
+#include <tqobject.h>
+#include <tqmap.h>
#include <kdepimmacros.h>
@@ -41,9 +41,9 @@ public:
static BroadcastStatus *instance();
/** Return the last status message from setStatusMsg() */
- QString statusMsg() const { return mStatusMsg; }
+ TQString statusMsg() const { return mStatusMsg; }
/** Sets a status bar message with timestamp */
- void setStatusMsgWithTimestamp( const QString& message );
+ void setStatusMsgWithTimestamp( const TQString& message );
/** Sets a transmission completed status bar message */
void setStatusMsgTransmissionCompleted( int numMessages,
int numBytes = -1,
@@ -51,7 +51,7 @@ public:
int numBytesToRead = -1,
bool mLeaveOnServer = false,
KPIM::ProgressItem* progressItem = 0 ); // set the same status in this progress item
- void setStatusMsgTransmissionCompleted( const QString& account,
+ void setStatusMsgTransmissionCompleted( const TQString& account,
int numMessages,
int numBytes = -1,
int numBytesRead = -1,
@@ -62,13 +62,13 @@ public:
public slots:
/** Emit an update status bar signal. It's a slot so it can be hooked up
to other signals. */
- void setStatusMsg( const QString& message );
+ void setStatusMsg( const TQString& message );
/**
Set a status message that will go away again with the next call of
reset().
*/
- void setTransientStatusMsg( const QString& msg );
+ void setTransientStatusMsg( const TQString& msg );
/**
Reset the status message to what ever non-transient message was last
active or has since been set.
@@ -78,12 +78,12 @@ public slots:
signals:
/** Emitted when setStatusMsg is called. */
- void statusMsg( const QString& );
+ void statusMsg( const TQString& );
protected:
BroadcastStatus();
- QString mStatusMsg;
+ TQString mStatusMsg;
bool mTransientActive;
static BroadcastStatus* instance_;
};
diff --git a/libkdepim/calendardiffalgo.cpp b/libkdepim/calendardiffalgo.cpp
index 4550ef3b3..79676fb84 100644
--- a/libkdepim/calendardiffalgo.cpp
+++ b/libkdepim/calendardiffalgo.cpp
@@ -26,7 +26,7 @@
using namespace KPIM;
#ifndef KDE_USE_FINAL
-static bool compareString( const QString &left, const QString &right )
+static bool compareString( const TQString &left, const TQString &right )
{
if ( left.isEmpty() && right.isEmpty() )
return true;
@@ -35,42 +35,42 @@ static bool compareString( const QString &left, const QString &right )
}
#endif
-static QString toString( KCal::Attendee *attendee )
+static TQString toString( KCal::Attendee *attendee )
{
return attendee->name() + "<" + attendee->email() + ">";
}
-static QString toString( KCal::Alarm * )
+static TQString toString( KCal::Alarm * )
{
- return QString::null;
+ return TQString::null;
}
-static QString toString( KCal::Incidence * )
+static TQString toString( KCal::Incidence * )
{
- return QString::null;
+ return TQString::null;
}
-static QString toString( KCal::Attachment * )
+static TQString toString( KCal::Attachment * )
{
- return QString::null;
+ return TQString::null;
}
-static QString toString( const QDate &date )
+static TQString toString( const TQDate &date )
{
return date.toString();
}
-static QString toString( const QDateTime &dateTime )
+static TQString toString( const TQDateTime &dateTime )
{
return dateTime.toString();
}
-static QString toString( const QString str )
+static TQString toString( const TQString str )
{
return str;
}
-static QString toString( bool value )
+static TQString toString( bool value )
{
if ( value )
return i18n( "Yes" );
@@ -126,7 +126,7 @@ void CalendarDiffAlgo::diffIncidenceBase( KCal::IncidenceBase *left, KCal::Incid
conflictField( i18n( "Has duration" ), toString( left->hasDuration() ), toString( right->hasDuration() ) );
if ( left->duration() != right->duration() )
- conflictField( i18n( "Duration" ), QString::number( left->duration() ), QString::number( right->duration() ) );
+ conflictField( i18n( "Duration" ), TQString::number( left->duration() ), TQString::number( right->duration() ) );
}
void CalendarDiffAlgo::diffIncidence( KCal::Incidence *left, KCal::Incidence *right )
@@ -191,15 +191,15 @@ void CalendarDiffAlgo::diffTodo( KCal::Todo *left, KCal::Todo *right )
conflictField( i18n( "Has Complete Date" ), toString( left->hasCompletedDate() ), toString( right->hasCompletedDate() ) );
if ( left->percentComplete() != right->percentComplete() )
- conflictField( i18n( "Complete" ), QString::number( left->percentComplete() ), QString::number( right->percentComplete() ) );
+ conflictField( i18n( "Complete" ), TQString::number( left->percentComplete() ), TQString::number( right->percentComplete() ) );
if ( left->completed() != right->completed() )
conflictField( i18n( "Completed" ), toString( left->completed() ), toString( right->completed() ) );
}
template <class L>
-void CalendarDiffAlgo::diffList( const QString &id,
- const QValueList<L> &left, const QValueList<L> &right )
+void CalendarDiffAlgo::diffList( const TQString &id,
+ const TQValueList<L> &left, const TQValueList<L> &right )
{
for ( uint i = 0; i < left.count(); ++i ) {
if ( right.find( left[ i ] ) == right.end() )
diff --git a/libkdepim/calendardiffalgo.h b/libkdepim/calendardiffalgo.h
index 14fb4eba3..43d855134 100644
--- a/libkdepim/calendardiffalgo.h
+++ b/libkdepim/calendardiffalgo.h
@@ -37,7 +37,7 @@ class KDE_EXPORT CalendarDiffAlgo : public DiffAlgo
private:
template <class L>
- void diffList( const QString &id, const QValueList<L> &left, const QValueList<L> &right );
+ void diffList( const TQString &id, const TQValueList<L> &left, const TQValueList<L> &right );
void diffIncidenceBase( KCal::IncidenceBase*, KCal::IncidenceBase* );
void diffIncidence( KCal::Incidence*, KCal::Incidence* );
diff --git a/libkdepim/categoryeditdialog.cpp b/libkdepim/categoryeditdialog.cpp
index 757848b67..719bd9209 100644
--- a/libkdepim/categoryeditdialog.cpp
+++ b/libkdepim/categoryeditdialog.cpp
@@ -20,12 +20,12 @@
Boston, MA 02110-1301, USA.
*/
-#include <qstringlist.h>
-#include <qlineedit.h>
-#include <qlistview.h>
-#include <qlayout.h>
-#include <qheader.h>
-#include <qpushbutton.h>
+#include <tqstringlist.h>
+#include <tqlineedit.h>
+#include <tqlistview.h>
+#include <tqlayout.h>
+#include <tqheader.h>
+#include <tqpushbutton.h>
#include <klocale.h>
#include "kpimprefs.h"
@@ -37,59 +37,59 @@ using namespace KPIM;
class CategoryEditDialog::Private
{
public:
- QListView *mView;
- QPushButton *mAddButton;
- QPushButton *mEditButton;
- QPushButton *mDeleteButton;
+ TQListView *mView;
+ TQPushButton *mAddButton;
+ TQPushButton *mEditButton;
+ TQPushButton *mDeleteButton;
};
class CategoryListViewItem : public QListViewItem
{
public:
- CategoryListViewItem( QListView *view, const QString &text ) :
- QListViewItem( view, text )
+ CategoryListViewItem( TQListView *view, const TQString &text ) :
+ TQListViewItem( view, text )
{
}
void okRename ( int col ) // we need that public to explicitly accept renaming when closing the dialog
{
- QListViewItem::okRename( col );
+ TQListViewItem::okRename( col );
}
};
-CategoryEditDialog::CategoryEditDialog( KPimPrefs *prefs, QWidget* parent,
+CategoryEditDialog::CategoryEditDialog( KPimPrefs *prefs, TQWidget* parent,
const char* name, bool modal )
: KDialogBase::KDialogBase( parent, name, modal,
i18n("Edit Categories"), Ok|Apply|Cancel|Help, Ok, true ),
mPrefs( prefs ), d( new Private )
{
- QWidget *widget = new QWidget( this );
+ TQWidget *widget = new TQWidget( this );
setMainWidget( widget );
- QGridLayout *layout = new QGridLayout( widget, 4, 2, marginHint(), spacingHint() );
+ TQGridLayout *layout = new TQGridLayout( widget, 4, 2, marginHint(), spacingHint() );
- d->mView = new QListView( widget );
+ d->mView = new TQListView( widget );
d->mView->addColumn( "" );
d->mView->header()->hide();
- d->mView->setDefaultRenameAction( QListView::Accept );
+ d->mView->setDefaultRenameAction( TQListView::Accept );
layout->addMultiCellWidget( d->mView, 0, 3, 0, 0 );
- d->mAddButton = new QPushButton( i18n( "Add" ), widget );
+ d->mAddButton = new TQPushButton( i18n( "Add" ), widget );
layout->addWidget( d->mAddButton, 0, 1 );
- d->mEditButton = new QPushButton( i18n( "Edit" ), widget );
+ d->mEditButton = new TQPushButton( i18n( "Edit" ), widget );
layout->addWidget( d->mEditButton, 1, 1 );
- d->mDeleteButton = new QPushButton( i18n( "Remove" ), widget );
+ d->mDeleteButton = new TQPushButton( i18n( "Remove" ), widget );
layout->addWidget( d->mDeleteButton, 2, 1 );
fillList();
- connect( d->mAddButton, SIGNAL( clicked() ), this, SLOT( add() ) );
- connect( d->mEditButton, SIGNAL( clicked() ), this, SLOT( edit() ) );
- connect( d->mDeleteButton, SIGNAL( clicked() ), this, SLOT( remove() ) );
+ connect( d->mAddButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( add() ) );
+ connect( d->mEditButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( edit() ) );
+ connect( d->mDeleteButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( remove() ) );
}
/*
@@ -103,12 +103,12 @@ CategoryEditDialog::~CategoryEditDialog()
void CategoryEditDialog::fillList()
{
d->mView->clear();
- QStringList::Iterator it;
+ TQStringList::Iterator it;
bool categoriesExist=false;
for ( it = mPrefs->mCustomCategories.begin();
it != mPrefs->mCustomCategories.end(); ++it ) {
- QListViewItem *item = new CategoryListViewItem( d->mView, *it );
+ TQListViewItem *item = new CategoryListViewItem( d->mView, *it );
item->setRenameEnabled( 0, true );
categoriesExist = true;
@@ -124,7 +124,7 @@ void CategoryEditDialog::add()
if ( d->mView->firstChild() )
d->mView->setCurrentItem( d->mView->firstChild() );
- QListViewItem *item = new CategoryListViewItem( d->mView, i18n( "New category" ) );
+ TQListViewItem *item = new CategoryListViewItem( d->mView, i18n( "New category" ) );
item->setRenameEnabled( 0, true );
d->mView->setSelected( item, true );
@@ -168,7 +168,7 @@ void CategoryEditDialog::slotApply()
{
mPrefs->mCustomCategories.clear();
- QListViewItem *item = d->mView->firstChild();
+ TQListViewItem *item = d->mView->firstChild();
while ( item ) {
if ( !item->text( 0 ).isEmpty() )
mPrefs->mCustomCategories.append( item->text( 0 ) );
diff --git a/libkdepim/categoryeditdialog.h b/libkdepim/categoryeditdialog.h
index 5dc21fe1e..f8168b7af 100644
--- a/libkdepim/categoryeditdialog.h
+++ b/libkdepim/categoryeditdialog.h
@@ -33,7 +33,7 @@ class KDE_EXPORT CategoryEditDialog : public KDialogBase
{
Q_OBJECT
public:
- CategoryEditDialog( KPimPrefs *prefs, QWidget* parent = 0,
+ CategoryEditDialog( KPimPrefs *prefs, TQWidget* parent = 0,
const char* name = 0,
bool modal = false );
~CategoryEditDialog();
diff --git a/libkdepim/categoryselectdialog.cpp b/libkdepim/categoryselectdialog.cpp
index 51090290a..4eb072b12 100644
--- a/libkdepim/categoryselectdialog.cpp
+++ b/libkdepim/categoryselectdialog.cpp
@@ -20,9 +20,9 @@
Boston, MA 02110-1301, USA.
*/
-#include <qlistview.h>
-#include <qpushbutton.h>
-#include <qheader.h>
+#include <tqlistview.h>
+#include <tqpushbutton.h>
+#include <tqheader.h>
#include "categoryselectdialog_base.h"
#include <klocale.h>
@@ -32,7 +32,7 @@
using namespace KPIM;
-CategorySelectDialog::CategorySelectDialog( KPimPrefs *prefs, QWidget* parent,
+CategorySelectDialog::CategorySelectDialog( KPimPrefs *prefs, TQWidget* parent,
const char* name, bool modal )
: KDialogBase::KDialogBase( parent, name, modal,
i18n("Select Categories"), Ok|Apply|Cancel|Help, Ok, true ),
@@ -44,18 +44,18 @@ CategorySelectDialog::CategorySelectDialog( KPimPrefs *prefs, QWidget* parent,
setCategories();
- connect( mWidget->mButtonEdit, SIGNAL(clicked()),
- SIGNAL(editCategories()) );
- connect( mWidget->mButtonClear, SIGNAL(clicked()),
- SLOT(clear()) );
+ connect( mWidget->mButtonEdit, TQT_SIGNAL(clicked()),
+ TQT_SIGNAL(editCategories()) );
+ connect( mWidget->mButtonClear, TQT_SIGNAL(clicked()),
+ TQT_SLOT(clear()) );
}
-void CategorySelectDialog::setCategories( const QStringList &categoryList )
+void CategorySelectDialog::setCategories( const TQStringList &categoryList )
{
mWidget->mCategories->clear();
mCategoryList.clear();
- QStringList::ConstIterator it;
+ TQStringList::ConstIterator it;
for ( it = categoryList.begin(); it != categoryList.end(); ++it )
if ( mPrefs->mCustomCategories.find( *it ) == mPrefs->mCustomCategories.end() )
@@ -63,7 +63,7 @@ void CategorySelectDialog::setCategories( const QStringList &categoryList )
for ( it = mPrefs->mCustomCategories.begin();
it != mPrefs->mCustomCategories.end(); ++it ) {
- new QCheckListItem( mWidget->mCategories, *it, QCheckListItem::CheckBox );
+ new TQCheckListItem( mWidget->mCategories, *it, TQCheckListItem::CheckBox );
}
}
@@ -71,40 +71,40 @@ CategorySelectDialog::~CategorySelectDialog()
{
}
-void CategorySelectDialog::setSelected(const QStringList &selList)
+void CategorySelectDialog::setSelected(const TQStringList &selList)
{
clear();
- QStringList::ConstIterator it;
+ TQStringList::ConstIterator it;
for ( it = selList.begin(); it != selList.end(); ++it ) {
- QCheckListItem *item = (QCheckListItem *)mWidget->mCategories->firstChild();
+ TQCheckListItem *item = (TQCheckListItem *)mWidget->mCategories->firstChild();
while (item) {
if (item->text() == *it) {
item->setOn(true);
break;
}
- item = (QCheckListItem *)item->nextSibling();
+ item = (TQCheckListItem *)item->nextSibling();
}
}
}
-QStringList CategorySelectDialog::selectedCategories() const
+TQStringList CategorySelectDialog::selectedCategories() const
{
return mCategoryList;
}
void CategorySelectDialog::slotApply()
{
- QStringList categories;
- QCheckListItem *item = (QCheckListItem *)mWidget->mCategories->firstChild();
+ TQStringList categories;
+ TQCheckListItem *item = (TQCheckListItem *)mWidget->mCategories->firstChild();
while (item) {
if (item->isOn()) {
categories.append(item->text());
}
- item = (QCheckListItem *)item->nextSibling();
+ item = (TQCheckListItem *)item->nextSibling();
}
- QString categoriesStr = categories.join(", ");
+ TQString categoriesStr = categories.join(", ");
mCategoryList = categories;
@@ -120,22 +120,22 @@ void CategorySelectDialog::slotOk()
void CategorySelectDialog::clear()
{
- QCheckListItem *item = (QCheckListItem *)mWidget->mCategories->firstChild();
+ TQCheckListItem *item = (TQCheckListItem *)mWidget->mCategories->firstChild();
while (item) {
item->setOn(false);
- item = (QCheckListItem *)item->nextSibling();
+ item = (TQCheckListItem *)item->nextSibling();
}
}
void CategorySelectDialog::updateCategoryConfig()
{
- QStringList selected;
- QCheckListItem *item = (QCheckListItem *)mWidget->mCategories->firstChild();
+ TQStringList selected;
+ TQCheckListItem *item = (TQCheckListItem *)mWidget->mCategories->firstChild();
while (item) {
if (item->isOn()) {
selected.append(item->text());
}
- item = (QCheckListItem *)item->nextSibling();
+ item = (TQCheckListItem *)item->nextSibling();
}
setCategories();
diff --git a/libkdepim/categoryselectdialog.h b/libkdepim/categoryselectdialog.h
index e26a56013..dd5ad3b50 100644
--- a/libkdepim/categoryselectdialog.h
+++ b/libkdepim/categoryselectdialog.h
@@ -34,17 +34,17 @@ class KDE_EXPORT CategorySelectDialog : public KDialogBase
{
Q_OBJECT
public:
- CategorySelectDialog( KPimPrefs *prefs, QWidget *parent = 0,
+ CategorySelectDialog( KPimPrefs *prefs, TQWidget *parent = 0,
const char *name = 0, bool modal = false );
~CategorySelectDialog();
/**
Adds this categories to the default categories.
*/
- void setCategories( const QStringList &categoryList = QStringList() );
- void setSelected( const QStringList &selList );
+ void setCategories( const TQStringList &categoryList = TQStringList() );
+ void setSelected( const TQStringList &selList );
- QStringList selectedCategories() const;
+ TQStringList selectedCategories() const;
public slots:
void slotOk();
@@ -53,14 +53,14 @@ class KDE_EXPORT CategorySelectDialog : public KDialogBase
void updateCategoryConfig();
signals:
- void categoriesSelected( const QString & );
- void categoriesSelected( const QStringList & );
+ void categoriesSelected( const TQString & );
+ void categoriesSelected( const TQStringList & );
void editCategories();
private:
KPimPrefs *mPrefs;
CategorySelectDialog_base *mWidget;
- QStringList mCategoryList;
+ TQStringList mCategoryList;
class CategorySelectDialogPrivate;
CategorySelectDialogPrivate *d;
diff --git a/libkdepim/cfgc/autoexample.cpp b/libkdepim/cfgc/autoexample.cpp
index 52ab961f8..69d1e739e 100644
--- a/libkdepim/cfgc/autoexample.cpp
+++ b/libkdepim/cfgc/autoexample.cpp
@@ -34,7 +34,7 @@
#include <kstandarddirs.h>
#include <kautoconfigdialog.h>
-#include <qlabel.h>
+#include <tqlabel.h>
int main( int argc, char **argv )
{
diff --git a/libkdepim/cfgc/example.cfg b/libkdepim/cfgc/example.cfg
index 51071980f..28a2d06b1 100644
--- a/libkdepim/cfgc/example.cfg
+++ b/libkdepim/cfgc/example.cfg
@@ -27,12 +27,12 @@
</entry>
</group>
<group name="MyOptions">
- <entry type="QString">
+ <entry type="TQString">
<name>MyString</name>
<label>This is a string</label>
<default>Default String</default>
</entry>
- <entry type="QStringList">
+ <entry type="TQStringList">
<name>MyStringList</name>
<default>up,down</default>
</entry>
diff --git a/libkdepim/clicklineedit.cpp b/libkdepim/clicklineedit.cpp
index c53821639..dfe7cbadf 100644
--- a/libkdepim/clicklineedit.cpp
+++ b/libkdepim/clicklineedit.cpp
@@ -22,11 +22,11 @@
#include "clicklineedit.h"
-#include "qpainter.h"
+#include "tqpainter.h"
using namespace KPIM;
-ClickLineEdit::ClickLineEdit(QWidget *parent, const QString &msg, const char* name) :
+ClickLineEdit::ClickLineEdit(TQWidget *parent, const TQString &msg, const char* name) :
KLineEdit(parent, name)
{
mDrawClickMsg = true;
@@ -36,50 +36,50 @@ ClickLineEdit::ClickLineEdit(QWidget *parent, const QString &msg, const char* na
ClickLineEdit::~ClickLineEdit() {}
-void ClickLineEdit::setClickMessage( const QString &msg )
+void ClickLineEdit::setClickMessage( const TQString &msg )
{
mClickMessage = msg;
repaint();
}
-void ClickLineEdit::setText( const QString &txt )
+void ClickLineEdit::setText( const TQString &txt )
{
mDrawClickMsg = txt.isEmpty();
repaint();
KLineEdit::setText( txt );
}
-void ClickLineEdit::drawContents( QPainter *p )
+void ClickLineEdit::drawContents( TQPainter *p )
{
KLineEdit::drawContents( p );
if ( mDrawClickMsg == true && !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();
p->drawText( cr, AlignAuto|AlignVCenter, mClickMessage );
p->setPen( tmp );
}
}
-void ClickLineEdit::focusInEvent( QFocusEvent *ev )
+void ClickLineEdit::focusInEvent( TQFocusEvent *ev )
{
if ( mDrawClickMsg == true )
{
mDrawClickMsg = false;
repaint();
}
- QLineEdit::focusInEvent( ev );
+ TQLineEdit::focusInEvent( ev );
}
-void ClickLineEdit::focusOutEvent( QFocusEvent *ev )
+void ClickLineEdit::focusOutEvent( TQFocusEvent *ev )
{
if ( text().isEmpty() )
{
mDrawClickMsg = true;
repaint();
}
- QLineEdit::focusOutEvent( ev );
+ TQLineEdit::focusOutEvent( ev );
}
#include "clicklineedit.moc"
diff --git a/libkdepim/clicklineedit.h b/libkdepim/clicklineedit.h
index ba2e29580..0eb4c7a8d 100644
--- a/libkdepim/clicklineedit.h
+++ b/libkdepim/clicklineedit.h
@@ -36,23 +36,23 @@ namespace KPIM {
class KDE_EXPORT ClickLineEdit : public KLineEdit
{
Q_OBJECT
- Q_PROPERTY( QString clickMessage READ clickMessage WRITE setClickMessage )
+ Q_PROPERTY( TQString clickMessage READ clickMessage WRITE setClickMessage )
public:
- ClickLineEdit( QWidget *parent, const QString &msg = QString::null, const char* name = 0 );
+ ClickLineEdit( TQWidget *parent, const TQString &msg = TQString::null, const char* name = 0 );
~ClickLineEdit();
- void setClickMessage( const QString &msg );
- QString clickMessage() const { return mClickMessage; }
+ void setClickMessage( const TQString &msg );
+ TQString clickMessage() const { return mClickMessage; }
- virtual void setText( const QString& txt );
+ virtual void setText( const TQString& txt );
protected:
- virtual void drawContents( QPainter *p );
- virtual void focusInEvent( QFocusEvent *ev );
- virtual void focusOutEvent( QFocusEvent *ev );
+ virtual void drawContents( TQPainter *p );
+ virtual void focusInEvent( TQFocusEvent *ev );
+ virtual void focusOutEvent( TQFocusEvent *ev );
private:
- QString mClickMessage;
+ TQString mClickMessage;
bool mDrawClickMsg;
};
diff --git a/libkdepim/collectingprocess.cpp b/libkdepim/collectingprocess.cpp
index 5d2dc2496..2e1b61714 100644
--- a/libkdepim/collectingprocess.cpp
+++ b/libkdepim/collectingprocess.cpp
@@ -32,7 +32,7 @@
#include "collectingprocess.h"
-#include <qvaluelist.h>
+#include <tqvaluelist.h>
#include <string.h>
@@ -43,13 +43,13 @@ struct CollectingProcess::Private {
{}
uint stdoutSize;
- QValueList<QByteArray> stdoutBuffer;
+ TQValueList<TQByteArray> stdoutBuffer;
uint stderrSize;
- QValueList<QByteArray> stderrBuffer;
+ TQValueList<TQByteArray> stderrBuffer;
};
-CollectingProcess::CollectingProcess( QObject * parent, const char * name )
+CollectingProcess::CollectingProcess( TQObject * parent, const char * name )
: KProcess( parent, name )
{
d = new Private();
@@ -61,25 +61,25 @@ CollectingProcess::~CollectingProcess() {
bool CollectingProcess::start( RunMode runmode, Communication comm ) {
// prevent duplicate connection
- disconnect( this, SIGNAL( receivedStdout( KProcess *, char *, int ) ),
- this, SLOT( slotReceivedStdout( KProcess *, char *, int ) ) );
+ disconnect( this, TQT_SIGNAL( receivedStdout( KProcess *, char *, int ) ),
+ this, TQT_SLOT( slotReceivedStdout( KProcess *, char *, int ) ) );
if ( comm & Stdout ) {
- connect( this, SIGNAL( receivedStdout( KProcess *, char *, int ) ),
- this, SLOT( slotReceivedStdout( KProcess *, char *, int ) ) );
+ connect( this, TQT_SIGNAL( receivedStdout( KProcess *, char *, int ) ),
+ this, TQT_SLOT( slotReceivedStdout( KProcess *, char *, int ) ) );
}
// prevent duplicate connection
- disconnect( this, SIGNAL( receivedStderr( KProcess *, char *, int ) ),
- this, SLOT( slotReceivedStderr( KProcess *, char *, int ) ) );
+ disconnect( this, TQT_SIGNAL( receivedStderr( KProcess *, char *, int ) ),
+ this, TQT_SLOT( slotReceivedStderr( KProcess *, char *, int ) ) );
if ( comm & Stderr ) {
- connect( this, SIGNAL( receivedStderr( KProcess *, char *, int ) ),
- this, SLOT( slotReceivedStderr( KProcess *, char *, int ) ) );
+ connect( this, TQT_SIGNAL( receivedStderr( KProcess *, char *, int ) ),
+ this, TQT_SLOT( slotReceivedStderr( KProcess *, char *, int ) ) );
}
return KProcess::start( runmode, comm );
}
void CollectingProcess::slotReceivedStdout( KProcess *, char *buf, int len )
{
- QByteArray b;
+ TQByteArray b;
b.duplicate( buf, len );
d->stdoutBuffer.append( b );
d->stdoutSize += len;
@@ -87,21 +87,21 @@ void CollectingProcess::slotReceivedStdout( KProcess *, char *buf, int len )
void CollectingProcess::slotReceivedStderr( KProcess *, char *buf, int len )
{
- QByteArray b;
+ TQByteArray b;
b.duplicate( buf, len );
d->stderrBuffer.append( b );
d->stderrSize += len;
}
-QByteArray CollectingProcess::collectedStdout()
+TQByteArray CollectingProcess::collectedStdout()
{
if ( d->stdoutSize == 0 ) {
- return QByteArray();
+ return TQByteArray();
}
uint offset = 0;
- QByteArray b( d->stdoutSize );
- for ( QValueList<QByteArray>::const_iterator it = d->stdoutBuffer.begin();
+ TQByteArray b( d->stdoutSize );
+ for ( TQValueList<TQByteArray>::const_iterator it = d->stdoutBuffer.begin();
it != d->stdoutBuffer.end();
++it ) {
memcpy( b.data() + offset, (*it).data(), (*it).size() );
@@ -113,15 +113,15 @@ QByteArray CollectingProcess::collectedStdout()
return b;
}
-QByteArray CollectingProcess::collectedStderr()
+TQByteArray CollectingProcess::collectedStderr()
{
if ( d->stderrSize == 0 ) {
- return QByteArray();
+ return TQByteArray();
}
uint offset = 0;
- QByteArray b( d->stderrSize );
- for ( QValueList<QByteArray>::const_iterator it = d->stderrBuffer.begin();
+ TQByteArray b( d->stderrSize );
+ for ( TQValueList<TQByteArray>::const_iterator it = d->stderrBuffer.begin();
it != d->stderrBuffer.end();
++it ) {
memcpy( b.data() + offset, (*it).data(), (*it).size() );
diff --git a/libkdepim/collectingprocess.h b/libkdepim/collectingprocess.h
index 0bad28a85..aff8a8d32 100644
--- a/libkdepim/collectingprocess.h
+++ b/libkdepim/collectingprocess.h
@@ -49,7 +49,7 @@ namespace KPIM {
class KDE_EXPORT CollectingProcess : public KProcess {
Q_OBJECT
public:
- CollectingProcess( QObject * parent = 0, const char * name = 0 );
+ CollectingProcess( TQObject * parent = 0, const char * name = 0 );
~CollectingProcess();
/** Starts the process in NotifyOnExit mode and writes in to stdin of
@@ -58,9 +58,9 @@ public:
bool start( RunMode runmode, Communication comm );
/** Returns the contents of the stdout buffer and clears it afterwards. */
- QByteArray collectedStdout();
+ TQByteArray collectedStdout();
/** Returns the contents of the stderr buffer and clears it afterwards. */
- QByteArray collectedStderr();
+ TQByteArray collectedStderr();
private slots:
void slotReceivedStdout( KProcess *, char *, int );
diff --git a/libkdepim/completionordereditor.cpp b/libkdepim/completionordereditor.cpp
index 4f797c2c1..b507d9b97 100644
--- a/libkdepim/completionordereditor.cpp
+++ b/libkdepim/completionordereditor.cpp
@@ -41,10 +41,10 @@
#include <klistview.h>
#include <kpushbutton.h>
-#include <qhbox.h>
-#include <qvbox.h>
-#include <qheader.h>
-#include <qtoolbutton.h>
+#include <tqhbox.h>
+#include <tqvbox.h>
+#include <tqheader.h>
+#include <tqtoolbutton.h>
#include <kapplication.h>
#include <dcopclient.h>
@@ -75,7 +75,7 @@ using namespace KPIM;
namespace KPIM {
-int CompletionItemList::compareItems( QPtrCollection::Item s1, QPtrCollection::Item s2 )
+int CompletionItemList::compareItems( TQPtrCollection::Item s1, TQPtrCollection::Item s2 )
{
int w1 = ( (CompletionItem*)s1 )->completionWeight();
int w2 = ( (CompletionItem*)s2 )->completionWeight();
@@ -87,7 +87,7 @@ class LDAPCompletionItem : public CompletionItem
{
public:
LDAPCompletionItem( LdapClient* ldapClient ) : mLdapClient( ldapClient ) {}
- virtual QString label() const { return i18n( "LDAP server %1" ).arg( mLdapClient->server().host() ); }
+ virtual TQString label() const { return i18n( "LDAP server %1" ).arg( mLdapClient->server().host() ); }
virtual int completionWeight() const { return mLdapClient->completionWeight(); }
virtual void save( CompletionOrderEditor* );
protected:
@@ -101,7 +101,7 @@ void LDAPCompletionItem::save( CompletionOrderEditor* )
{
KConfig config( "kabldaprc" );
config.setGroup( "LDAP" );
- config.writeEntry( QString( "SelectedCompletionWeight%1" ).arg( mLdapClient->clientNumber() ),
+ config.writeEntry( TQString( "SelectedCompletionWeight%1" ).arg( mLdapClient->clientNumber() ),
mWeight );
config.sync();
}
@@ -110,18 +110,18 @@ void LDAPCompletionItem::save( CompletionOrderEditor* )
class SimpleCompletionItem : public CompletionItem
{
public:
- SimpleCompletionItem( CompletionOrderEditor* editor, const QString& label, const QString& identifier )
+ SimpleCompletionItem( CompletionOrderEditor* editor, const TQString& label, const TQString& identifier )
: mLabel( label ), mIdentifier( identifier ) {
KConfigGroup group( editor->configFile(), "CompletionWeights" );
mWeight = group.readNumEntry( mIdentifier, 60 );
}
- virtual QString label() const { return mLabel; }
+ virtual TQString label() const { return mLabel; }
virtual int completionWeight() const { return mWeight; }
virtual void save( CompletionOrderEditor* );
protected:
virtual void setCompletionWeight( int weight ) { mWeight = weight; }
private:
- QString mLabel, mIdentifier;
+ TQString mLabel, mIdentifier;
int mWeight;
};
@@ -137,10 +137,10 @@ void SimpleCompletionItem::save( CompletionOrderEditor* editor )
class KABCImapSubResCompletionItem : public CompletionItem
{
public:
- KABCImapSubResCompletionItem( ResourceABC* resource, const QString& subResource )
+ KABCImapSubResCompletionItem( ResourceABC* resource, const TQString& subResource )
: mResource( resource ), mSubResource( subResource ), mWeight( completionWeight() ) {}
- virtual QString label() const {
- return QString( "%1 %2" ).arg( mResource->resourceName() ).arg( mResource->subresourceLabel( mSubResource ) );
+ virtual TQString label() const {
+ return TQString( "%1 %2" ).arg( mResource->resourceName() ).arg( mResource->subresourceLabel( mSubResource ) );
}
virtual int completionWeight() const {
return mResource->subresourceCompletionWeight( mSubResource );
@@ -153,7 +153,7 @@ public:
}
private:
ResourceABC* mResource;
- QString mSubResource;
+ TQString mSubResource;
int mWeight;
};
@@ -162,8 +162,8 @@ private:
class CompletionViewItem : public QListViewItem
{
public:
- CompletionViewItem( QListView* lv, CompletionItem* item )
- : QListViewItem( lv, lv->lastItem(), item->label() ), mItem( item ) {}
+ CompletionViewItem( TQListView* lv, CompletionItem* item )
+ : TQListViewItem( lv, lv->lastItem(), item->label() ), mItem( item ) {}
CompletionItem* item() const { return mItem; }
void setItem( CompletionItem* i ) { mItem = i; setText( 0, mItem->label() ); }
@@ -172,25 +172,25 @@ private:
};
CompletionOrderEditor::CompletionOrderEditor( KPIM::LdapSearch* ldapSearch,
- QWidget* parent, const char* name )
+ TQWidget* parent, const char* name )
: KDialogBase( parent, name, true, i18n("Edit Completion Order"), Ok|Cancel, Ok, true ),
mConfig( "kpimcompletionorder" ), mDirty( false )
{
mItems.setAutoDelete( true );
// The first step is to gather all the data, creating CompletionItem objects
- QValueList< LdapClient* > ldapClients = ldapSearch->clients();
- for( QValueList<LdapClient*>::const_iterator it = ldapClients.begin(); it != ldapClients.end(); ++it ) {
+ TQValueList< LdapClient* > ldapClients = ldapSearch->clients();
+ for( TQValueList<LdapClient*>::const_iterator it = ldapClients.begin(); it != ldapClients.end(); ++it ) {
//kdDebug(5300) << "LDAP: host " << (*it)->host() << " weight " << (*it)->completionWeight() << endl;
mItems.append( new LDAPCompletionItem( *it ) );
}
KABC::AddressBook *addressBook = KABC::StdAddressBook::self( true );
- QPtrList<KABC::Resource> resources = addressBook->resources();
- for( QPtrListIterator<KABC::Resource> resit( resources ); *resit; ++resit ) {
+ TQPtrList<KABC::Resource> resources = addressBook->resources();
+ for( TQPtrListIterator<KABC::Resource> resit( resources ); *resit; ++resit ) {
//kdDebug(5300) << "KABC Resource: " << (*resit)->className() << endl;
ResourceABC* res = dynamic_cast<ResourceABC *>( *resit );
if ( res ) { // IMAP KABC resource
- const QStringList subresources = res->subresources();
- for( QStringList::const_iterator it = subresources.begin(); it != subresources.end(); ++it ) {
+ const TQStringList subresources = res->subresources();
+ for( TQStringList::const_iterator it = subresources.begin(); it != subresources.end(); ++it ) {
mItems.append( new KABCImapSubResCompletionItem( res, *it ) );
}
} else { // non-IMAP KABC resource
@@ -207,18 +207,18 @@ CompletionOrderEditor::CompletionOrderEditor( KPIM::LdapSearch* ldapSearch,
// Now sort the items, then create the GUI
mItems.sort();
- QHBox* page = makeHBoxMainWidget();
+ TQHBox* page = makeHBoxMainWidget();
mListView = new KListView( page );
mListView->setSorting( -1 );
- mListView->addColumn( QString::null );
+ mListView->addColumn( TQString::null );
mListView->header()->hide();
- for( QPtrListIterator<CompletionItem> compit( mItems ); *compit; ++compit ) {
+ for( TQPtrListIterator<CompletionItem> compit( mItems ); *compit; ++compit ) {
new CompletionViewItem( mListView, *compit );
kdDebug(5300) << " " << (*compit)->label() << " " << (*compit)->completionWeight() << endl;
}
- QVBox* upDownBox = new QVBox( page );
+ TQVBox* upDownBox = new TQVBox( page );
mUpButton = new KPushButton( upDownBox, "mUpButton" );
mUpButton->setIconSet( BarIconSet( "up", KIcon::SizeSmall ) );
mUpButton->setEnabled( false ); // b/c no item is selected yet
@@ -229,20 +229,20 @@ CompletionOrderEditor::CompletionOrderEditor( KPIM::LdapSearch* ldapSearch,
mDownButton->setEnabled( false ); // b/c no item is selected yet
mDownButton->setFocusPolicy( StrongFocus );
- QWidget* spacer = new QWidget( upDownBox );
+ TQWidget* spacer = new TQWidget( upDownBox );
upDownBox->setStretchFactor( spacer, 100 );
- connect( mListView, SIGNAL( selectionChanged( QListViewItem* ) ),
- SLOT( slotSelectionChanged( QListViewItem* ) ) );
- connect( mUpButton, SIGNAL( clicked() ), this, SLOT( slotMoveUp() ) );
- connect( mDownButton, SIGNAL( clicked() ), this, SLOT( slotMoveDown() ) );
+ connect( mListView, TQT_SIGNAL( selectionChanged( TQListViewItem* ) ),
+ TQT_SLOT( slotSelectionChanged( TQListViewItem* ) ) );
+ connect( mUpButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotMoveUp() ) );
+ connect( mDownButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotMoveDown() ) );
}
CompletionOrderEditor::~CompletionOrderEditor()
{
}
-void CompletionOrderEditor::slotSelectionChanged( QListViewItem *item )
+void CompletionOrderEditor::slotSelectionChanged( TQListViewItem *item )
{
mDownButton->setEnabled( item && item->itemBelow() );
mUpButton->setEnabled( item && item->itemAbove() );
@@ -283,7 +283,7 @@ void CompletionOrderEditor::slotOk()
{
if ( mDirty ) {
int w = 100;
- for ( QListViewItem* it = mListView->firstChild(); it; it = it->nextSibling() ) {
+ for ( TQListViewItem* it = mListView->firstChild(); it; it = it->nextSibling() ) {
CompletionViewItem *item = static_cast<CompletionViewItem *>( it );
item->item()->setCompletionWeight( w );
item->item()->save( this );
@@ -294,7 +294,7 @@ void CompletionOrderEditor::slotOk()
// Emit DCOP signal
// The emitter is always set to KPIM::IMAPCompletionOrder, so that the connect works
// This is why we can't use k_dcop_signals here, but need to use emitDCOPSignal
- kapp->dcopClient()->emitDCOPSignal( "KPIM::IMAPCompletionOrder", "orderChanged()", QByteArray() );
+ kapp->dcopClient()->emitDCOPSignal( "KPIM::IMAPCompletionOrder", "orderChanged()", TQByteArray() );
}
KDialogBase::slotOk();
}
diff --git a/libkdepim/completionordereditor.h b/libkdepim/completionordereditor.h
index e48f72728..0e17a5342 100644
--- a/libkdepim/completionordereditor.h
+++ b/libkdepim/completionordereditor.h
@@ -46,32 +46,32 @@ class CompletionItem
{
public:
virtual ~CompletionItem() {}
- virtual QString label() const = 0;
+ virtual TQString label() const = 0;
virtual int completionWeight() const = 0;
virtual void setCompletionWeight( int weight ) = 0;
virtual void save( CompletionOrderEditor* ) = 0;
};
-// I don't like QPtrList much, but it has compareItems, which QValueList doesn't
-class CompletionItemList : public QPtrList<CompletionItem>
+// I don't like TQPtrList much, but it has compareItems, which TQValueList doesn't
+class CompletionItemList : public TQPtrList<CompletionItem>
{
public:
CompletionItemList() {}
- virtual int compareItems( QPtrCollection::Item s1, QPtrCollection::Item s2 );
+ virtual int compareItems( TQPtrCollection::Item s1, TQPtrCollection::Item s2 );
};
class CompletionOrderEditor : public KDialogBase {
Q_OBJECT
public:
- CompletionOrderEditor( KPIM::LdapSearch* ldapSearch, QWidget* parent, const char* name = 0 );
+ CompletionOrderEditor( KPIM::LdapSearch* ldapSearch, TQWidget* parent, const char* name = 0 );
~CompletionOrderEditor();
KConfig* configFile() { return &mConfig; }
private slots:
- void slotSelectionChanged( QListViewItem* );
+ void slotSelectionChanged( TQListViewItem* );
void slotMoveUp();
void slotMoveDown();
virtual void slotOk();
diff --git a/libkdepim/configmanager.cpp b/libkdepim/configmanager.cpp
index ccf268242..64b4562fc 100644
--- a/libkdepim/configmanager.cpp
+++ b/libkdepim/configmanager.cpp
@@ -21,8 +21,8 @@
using namespace KPIM;
-ConfigManager::ConfigManager( QObject * parent, const char * name )
- : QObject( parent, name )
+ConfigManager::ConfigManager( TQObject * parent, const char * name )
+ : TQObject( parent, name )
{
}
diff --git a/libkdepim/configmanager.h b/libkdepim/configmanager.h
index ef3b9848b..44a170bcc 100644
--- a/libkdepim/configmanager.h
+++ b/libkdepim/configmanager.h
@@ -17,7 +17,7 @@
#ifndef _KMAIL_CONFIGMANAGER_H_
#define _KMAIL_CONFIGMANAGER_H_
-#include <qobject.h>
+#include <tqobject.h>
#include <kdepimmacros.h>
@@ -29,7 +29,7 @@ namespace KPIM {
* @short Class for managing a set of config options.
* @author Marc Mutz <mutz@kde.org>
**/
-class KDE_EXPORT ConfigManager : public QObject {
+class KDE_EXPORT ConfigManager : public TQObject {
Q_OBJECT
public:
/** Commit changes to disk and emit changed() if necessary. */
@@ -45,7 +45,7 @@ signals:
void changed();
protected:
- ConfigManager( QObject * parent=0, const char * name=0 );
+ ConfigManager( TQObject * parent=0, const char * name=0 );
virtual ~ConfigManager();
};
diff --git a/libkdepim/csshelper.cpp b/libkdepim/csshelper.cpp
index 2e2c11379..b65713dd2 100644
--- a/libkdepim/csshelper.cpp
+++ b/libkdepim/csshelper.cpp
@@ -36,61 +36,61 @@
#include <kdebug.h>
#include <kglobal.h>
-#include <qstring.h>
-#include <qapplication.h>
+#include <tqstring.h>
+#include <tqapplication.h>
namespace KPIM {
namespace {
- // some QColor manipulators that hide the ugly QColor API w.r.t. HSV:
- inline QColor darker( const QColor & c ) {
+ // some TQColor manipulators that hide the ugly TQColor API w.r.t. HSV:
+ inline TQColor darker( const TQColor & c ) {
int h, s, v;
c.hsv( &h, &s, &v );
- return QColor( h, s, v*4/5, QColor::Hsv );
+ return TQColor( h, s, v*4/5, TQColor::Hsv );
}
- inline QColor desaturate( const QColor & c ) {
+ inline TQColor desaturate( const TQColor & c ) {
int h, s, v;
c.hsv( &h, &s, &v );
- return QColor( h, s/8, v, QColor::Hsv );
+ return TQColor( h, s/8, v, TQColor::Hsv );
}
- inline QColor fixValue( const QColor & c, int newV ) {
+ inline TQColor fixValue( const TQColor & c, int newV ) {
int h, s, v;
c.hsv( &h, &s, &v );
- return QColor( h, s, newV, QColor::Hsv );
+ return TQColor( h, s, newV, TQColor::Hsv );
}
- inline int getValueOf( const QColor & c ) {
+ inline int getValueOf( const TQColor & c ) {
int h, s, v;
c.hsv( &h, &s, &v );
return v;
}
}
- CSSHelper::CSSHelper( const QPaintDeviceMetrics &pdm ) :
+ CSSHelper::CSSHelper( const TQPaintDeviceMetrics &pdm ) :
mShrinkQuotes( false ),
mMetrics( pdm )
{
// initialize with defaults - should match the corresponding application defaults
- mForegroundColor = QApplication::palette().active().text();
+ mForegroundColor = TQApplication::palette().active().text();
mLinkColor = KGlobalSettings::linkColor();
mVisitedLinkColor = KGlobalSettings::visitedLinkColor();
- mBackgroundColor = QApplication::palette().active().base();
- cHtmlWarning = QColor( 0xFF, 0x40, 0x40 ); // warning frame color: light red
+ mBackgroundColor = TQApplication::palette().active().base();
+ cHtmlWarning = TQColor( 0xFF, 0x40, 0x40 ); // warning frame color: light red
- cPgpEncrH = QColor( 0x00, 0x80, 0xFF ); // light blue
- cPgpOk1H = QColor( 0x40, 0xFF, 0x40 ); // light green
- cPgpOk0H = QColor( 0xFF, 0xFF, 0x40 ); // light yellow
- cPgpWarnH = QColor( 0xFF, 0xFF, 0x40 ); // light yellow
+ cPgpEncrH = TQColor( 0x00, 0x80, 0xFF ); // light blue
+ cPgpOk1H = TQColor( 0x40, 0xFF, 0x40 ); // light green
+ cPgpOk0H = TQColor( 0xFF, 0xFF, 0x40 ); // light yellow
+ cPgpWarnH = TQColor( 0xFF, 0xFF, 0x40 ); // light yellow
cPgpErrH = Qt::red;
for ( int i = 0 ; i < 3 ; ++i )
- mQuoteColor[i] = QColor( 0x00, 0x80 - i * 0x10, 0x00 ); // shades of green
+ mQuoteColor[i] = TQColor( 0x00, 0x80 - i * 0x10, 0x00 ); // shades of green
mRecycleQuoteColors = false;
- QFont defaultFont = KGlobalSettings::generalFont();
- QFont defaultFixedFont = KGlobalSettings::fixedFont();
+ TQFont defaultFont = KGlobalSettings::generalFont();
+ TQFont defaultFixedFont = KGlobalSettings::fixedFont();
mBodyFont = mPrintFont = defaultFont;
mFixedFont = mFixedPrintFont = defaultFixedFont;
defaultFont.setItalic( true );
@@ -153,7 +153,7 @@ namespace KPIM {
}
}
- QString CSSHelper::cssDefinitions( bool fixed ) const {
+ TQString CSSHelper::cssDefinitions( bool fixed ) const {
return
commonCssDefinitions()
+
@@ -169,14 +169,14 @@ namespace KPIM {
"}\n";
}
- QString CSSHelper::htmlHead( bool /*fixed*/ ) const {
+ TQString CSSHelper::htmlHead( bool /*fixed*/ ) const {
return
"<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">\n"
"<html><head><title></title></head>\n"
"<body>\n";
}
- QString CSSHelper::quoteFontTag( int level ) const {
+ TQString CSSHelper::quoteFontTag( int level ) const {
if ( level < 0 )
level = 0;
static const int numQuoteLevels = sizeof mQuoteFont / sizeof *mQuoteFont;
@@ -184,16 +184,16 @@ namespace KPIM {
? level % numQuoteLevels + 1
: kMin( level + 1, numQuoteLevels ) ;
if ( level >= numQuoteLevels )
- return QString( "<div class=\"deepquotelevel%1\">" ).arg( effectiveLevel );
+ return TQString( "<div class=\"deepquotelevel%1\">" ).arg( effectiveLevel );
else
- return QString( "<div class=\"quotelevel%1\">" ).arg( effectiveLevel );
+ return TQString( "<div class=\"quotelevel%1\">" ).arg( effectiveLevel );
}
- QString CSSHelper::nonQuotedFontTag() const {
+ TQString CSSHelper::nonQuotedFontTag() const {
return "<div class=\"noquote\">";
}
- QFont CSSHelper::bodyFont( bool fixed, bool print ) const {
+ TQFont CSSHelper::bodyFont( bool fixed, bool print ) const {
return fixed ? ( print ? mFixedPrintFont : mFixedFont )
: ( print ? mPrintFont : mBodyFont );
}
@@ -204,22 +204,22 @@ namespace KPIM {
namespace {
- int pointsToPixel( const QPaintDeviceMetrics & metrics, int pointSize ) {
+ int pointsToPixel( const TQPaintDeviceMetrics & metrics, int pointSize ) {
return ( pointSize * metrics.logicalDpiY() + 36 ) / 72 ;
}
}
static const char * const quoteFontSizes[] = { "85", "80", "75" };
- QString CSSHelper::printCssDefinitions( bool fixed ) const {
- const QString headerFont = QString( " font-family: \"%1\" ! important;\n"
+ TQString CSSHelper::printCssDefinitions( bool fixed ) const {
+ const TQString headerFont = TQString( " font-family: \"%1\" ! important;\n"
" font-size: %2pt ! important;\n" )
.arg( mPrintFont.family() )
.arg( mPrintFont.pointSize() );
- const QColorGroup & cg = QApplication::palette().active();
+ const TQColorGroup & cg = TQApplication::palette().active();
- const QFont printFont = bodyFont( fixed, true /* print */ );
- QString quoteCSS;
+ const TQFont printFont = bodyFont( fixed, true /* print */ );
+ TQString quoteCSS;
if ( printFont.italic() )
quoteCSS += " font-style: italic ! important;\n";
if ( printFont.bold() )
@@ -228,16 +228,16 @@ namespace KPIM {
quoteCSS = "div.noquote {\n" + quoteCSS + "}\n\n";
return
- QString( "body {\n"
+ TQString( "body {\n"
" font-family: \"%1\" ! important;\n"
" font-size: %2pt ! important;\n"
" color: #000000 ! important;\n"
" background-color: #ffffff ! important\n"
"}\n\n" )
.arg( printFont.family(),
- QString::number( printFont.pointSize() ) )
+ TQString::number( printFont.pointSize() ) )
+
- QString( "tr.textAtmH,\n"
+ TQString( "tr.textAtmH,\n"
"tr.rfc822H,\n"
"tr.encrH,\n"
"tr.signOkKeyOkH,\n"
@@ -293,23 +293,23 @@ namespace KPIM {
+ quoteCSS;
}
- QString CSSHelper::screenCssDefinitions( const CSSHelper * helper, bool fixed ) const {
- const QString fgColor = mForegroundColor.name();
- const QString bgColor = mBackgroundColor.name();
- const QString linkColor = mLinkColor.name();
- const QString headerFont = QString(" font-family: \"%1\" ! important;\n"
+ TQString CSSHelper::screenCssDefinitions( const CSSHelper * helper, bool fixed ) const {
+ const TQString fgColor = mForegroundColor.name();
+ const TQString bgColor = mBackgroundColor.name();
+ const TQString linkColor = mLinkColor.name();
+ const TQString headerFont = TQString(" font-family: \"%1\" ! important;\n"
" font-size: %2px ! important;\n")
.arg( mBodyFont.family() )
.arg( pointsToPixel( helper->mMetrics, mBodyFont.pointSize() ) );
- const QString background = ( mBackingPixmapOn
- ? QString( " background-image:url(file://%1) ! important;\n" )
+ const TQString background = ( mBackingPixmapOn
+ ? TQString( " background-image:url(file://%1) ! important;\n" )
.arg( mBackingPixmapStr )
- : QString( " background-color: %1 ! important;\n" )
+ : TQString( " background-color: %1 ! important;\n" )
.arg( bgColor ) );
- const QString bodyFontSize = QString::number( pointsToPixel( helper->mMetrics, fontSize( fixed ) ) ) + "px" ;
- const QColorGroup & cg = QApplication::palette().active();
+ const TQString bodyFontSize = TQString::number( pointsToPixel( helper->mMetrics, fontSize( fixed ) ) ) + "px" ;
+ const TQColorGroup & cg = TQApplication::palette().active();
- QString quoteCSS;
+ TQString quoteCSS;
if ( bodyFont( fixed ).italic() )
quoteCSS += " font-style: italic ! important;\n";
if ( bodyFont( fixed ).bold() )
@@ -319,24 +319,24 @@ namespace KPIM {
// CSS definitions for quote levels 1-3
for ( int i = 0 ; i < 3 ; ++i ) {
- quoteCSS += QString( "div.quotelevel%1 {\n"
+ quoteCSS += TQString( "div.quotelevel%1 {\n"
" color: %2 ! important;\n" )
- .arg( QString::number(i+1), mQuoteColor[i].name() );
+ .arg( TQString::number(i+1), mQuoteColor[i].name() );
if ( mQuoteFont[i].italic() )
quoteCSS += " font-style: italic ! important;\n";
if ( mQuoteFont[i].bold() )
quoteCSS += " font-weight: bold ! important;\n";
if ( mShrinkQuotes )
- quoteCSS += " font-size: " + QString::fromLatin1( quoteFontSizes[i] )
+ quoteCSS += " font-size: " + TQString::fromLatin1( quoteFontSizes[i] )
+ "% ! important;\n";
quoteCSS += "}\n\n";
}
// CSS definitions for quote levels 4+
for ( int i = 0 ; i < 3 ; ++i ) {
- quoteCSS += QString( "div.deepquotelevel%1 {\n"
+ quoteCSS += TQString( "div.deepquotelevel%1 {\n"
" color: %2 ! important;\n" )
- .arg( QString::number(i+1), mQuoteColor[i].name() );
+ .arg( TQString::number(i+1), mQuoteColor[i].name() );
if ( mQuoteFont[i].italic() )
quoteCSS += " font-style: italic ! important;\n";
if ( mQuoteFont[i].bold() )
@@ -347,7 +347,7 @@ namespace KPIM {
}
return
- QString( "body {\n"
+ TQString( "body {\n"
" font-family: \"%1\" ! important;\n"
" font-size: %2 ! important;\n"
" color: %3 ! important;\n"
@@ -358,7 +358,7 @@ namespace KPIM {
fgColor,
background )
+
- QString( "a {\n"
+ TQString( "a {\n"
" color: %1 ! important;\n"
" text-decoration: none ! important;\n"
"}\n\n"
@@ -387,7 +387,7 @@ namespace KPIM {
"}\n\n" )
.arg( linkColor, fgColor, bgColor, headerFont )
+
- QString( "table.encr {\n"
+ TQString( "table.encr {\n"
" background-color: %1 ! important;\n"
"}\n\n"
@@ -402,7 +402,7 @@ namespace KPIM {
headerFont,
cPgpEncrB.name() )
+
- QString( "table.signOkKeyOk {\n"
+ TQString( "table.signOkKeyOk {\n"
" background-color: %1 ! important;\n"
"}\n\n"
@@ -417,7 +417,7 @@ namespace KPIM {
headerFont,
cPgpOk1B.name() )
+
- QString( "table.signOkKeyBad {\n"
+ TQString( "table.signOkKeyBad {\n"
" background-color: %1 ! important;\n"
"}\n\n"
@@ -432,7 +432,7 @@ namespace KPIM {
headerFont,
cPgpOk0B.name() )
+
- QString( "table.signWarn {\n"
+ TQString( "table.signWarn {\n"
" background-color: %1 ! important;\n"
"}\n\n"
@@ -447,7 +447,7 @@ namespace KPIM {
headerFont,
cPgpWarnB.name() )
+
- QString( "table.signErr {\n"
+ TQString( "table.signErr {\n"
" background-color: %1 ! important;\n"
"}\n\n"
@@ -462,12 +462,12 @@ namespace KPIM {
headerFont,
cPgpErrB.name() )
+
- QString( "div.htmlWarn {\n"
+ TQString( "div.htmlWarn {\n"
" border: 2px solid %1 ! important;\n"
"}\n\n" )
.arg( cHtmlWarning.name() )
+
- QString( "div.header {\n"
+ TQString( "div.header {\n"
"%1"
"}\n\n"
@@ -521,7 +521,7 @@ namespace KPIM {
+ quoteCSS;
}
- QString CSSHelper::commonCssDefinitions() const {
+ TQString CSSHelper::commonCssDefinitions() const {
return
"div.header {\n"
" margin-bottom: 10pt ! important;\n"
@@ -620,12 +620,12 @@ namespace KPIM {
}
- void CSSHelper::setBodyFont( const QFont& font )
+ void CSSHelper::setBodyFont( const TQFont& font )
{
mBodyFont = font;
}
- void CSSHelper::setPrintFont( const QFont& font )
+ void CSSHelper::setPrintFont( const TQFont& font )
{
mPrintFont = font;
}
diff --git a/libkdepim/csshelper.h b/libkdepim/csshelper.h
index 93b8fc8d8..87455cd13 100644
--- a/libkdepim/csshelper.h
+++ b/libkdepim/csshelper.h
@@ -32,9 +32,9 @@
#ifndef KPIM_CSSHELPER_H
#define KPIM_CSSHELPER_H
-#include <qcolor.h>
-#include <qfont.h>
-#include <qpaintdevicemetrics.h>
+#include <tqcolor.h>
+#include <tqfont.h>
+#include <tqpaintdevicemetrics.h>
class QString;
@@ -46,26 +46,26 @@ class CSSHelper {
default values.
Sub-Classes should put their config loading here.
*/
- CSSHelper( const QPaintDeviceMetrics &pdm );
+ CSSHelper( const TQPaintDeviceMetrics &pdm );
/** @return HTML head including style sheet definitions and the
&gt;body&lt; tag */
- QString htmlHead( bool fixedFont = false ) const;
+ TQString htmlHead( bool fixedFont = false ) const;
/** @return The collected CSS definitions as a string */
- QString cssDefinitions( bool fixedFont = false ) const;
+ TQString cssDefinitions( bool fixedFont = false ) const;
/** @return a &lt;div&gt; start tag with embedded style
information suitable for quoted text with quote level @p level */
- QString quoteFontTag( int level ) const;
+ TQString quoteFontTag( int level ) const;
/** @return a &lt;div&gt; start tag with embedded style
information suitable for non-quoted text */
- QString nonQuotedFontTag() const;
+ TQString nonQuotedFontTag() const;
- QFont bodyFont( bool fixedFont = false, bool printing = false ) const;
+ TQFont bodyFont( bool fixedFont = false, bool printing = false ) const;
- void setBodyFont( const QFont& font );
- void setPrintFont( const QFont& font );
+ void setBodyFont( const TQFont& font );
+ void setPrintFont( const TQFont& font );
protected:
/** Recalculate PGP frame and body colors (should be called after changing
@@ -73,34 +73,34 @@ class CSSHelper {
void recalculatePGPColors();
protected:
- QFont mBodyFont, mPrintFont, mFixedFont, mFixedPrintFont;
- QFont mQuoteFont[3];
- QColor mQuoteColor[3];
+ TQFont mBodyFont, mPrintFont, mFixedFont, mFixedPrintFont;
+ TQFont mQuoteFont[3];
+ TQColor mQuoteColor[3];
bool mRecycleQuoteColors;
bool mBackingPixmapOn;
bool mShrinkQuotes;
- QString mBackingPixmapStr;
- QColor mForegroundColor, mLinkColor, mVisitedLinkColor, mBackgroundColor;
+ TQString mBackingPixmapStr;
+ TQColor mForegroundColor, mLinkColor, mVisitedLinkColor, mBackgroundColor;
// colors for PGP (Frame, Header, Body)
- QColor cPgpOk1F, cPgpOk1H, cPgpOk1B,
+ TQColor cPgpOk1F, cPgpOk1H, cPgpOk1B,
cPgpOk0F, cPgpOk0H, cPgpOk0B,
cPgpWarnF, cPgpWarnH, cPgpWarnB,
cPgpErrF, cPgpErrH, cPgpErrB,
cPgpEncrF, cPgpEncrH, cPgpEncrB;
// color of frame of warning preceding the source of HTML messages
- QColor cHtmlWarning;
+ TQColor cHtmlWarning;
private:
int fontSize( bool fixed, bool print = false ) const;
// returns CSS rules specific to the print media type
- QString printCssDefinitions( bool fixed ) const;
+ TQString printCssDefinitions( bool fixed ) const;
// returns CSS rules specific to the screen media type
- QString screenCssDefinitions( const CSSHelper * helper, bool fixed ) const;
+ TQString screenCssDefinitions( const CSSHelper * helper, bool fixed ) const;
// returns CSS rules common to both screen and print media types
- QString commonCssDefinitions() const;
+ TQString commonCssDefinitions() const;
private:
- const QPaintDeviceMetrics mMetrics;
+ const TQPaintDeviceMetrics mMetrics;
};
diff --git a/libkdepim/designerfields.cpp b/libkdepim/designerfields.cpp
index 8073bf885..ba78df0ea 100644
--- a/libkdepim/designerfields.cpp
+++ b/libkdepim/designerfields.cpp
@@ -20,15 +20,15 @@
Boston, MA 02110-1301, USA.
*/
-#include <qcheckbox.h>
-#include <qcombobox.h>
-#include <qdatetimeedit.h>
-#include <qlayout.h>
-#include <qobjectlist.h>
-#include <qspinbox.h>
-#include <qregexp.h>
-#include <qtextedit.h>
-#include <qwidgetfactory.h>
+#include <tqcheckbox.h>
+#include <tqcombobox.h>
+#include <tqdatetimeedit.h>
+#include <tqlayout.h>
+#include <tqobjectlist.h>
+#include <tqspinbox.h>
+#include <tqregexp.h>
+#include <tqtextedit.h>
+#include <tqwidgetfactory.h>
#include <kdatepicker.h>
#include <kdatetimewidget.h>
@@ -41,18 +41,18 @@
using namespace KPIM;
-DesignerFields::DesignerFields( const QString &uiFile, QWidget *parent,
+DesignerFields::DesignerFields( const TQString &uiFile, TQWidget *parent,
const char *name )
- : QWidget( parent, name )
+ : TQWidget( parent, name )
{
initGUI( uiFile );
}
-void DesignerFields::initGUI( const QString &uiFile )
+void DesignerFields::initGUI( const TQString &uiFile )
{
- QVBoxLayout *layout = new QVBoxLayout( this );
+ TQVBoxLayout *layout = new TQVBoxLayout( this );
- QWidget *wdg = QWidgetFactory::create( uiFile, 0, this );
+ TQWidget *wdg = TQWidgetFactory::create( uiFile, 0, this );
if ( !wdg ) {
kdError() << "No ui file found" << endl;
return;
@@ -63,15 +63,15 @@ void DesignerFields::initGUI( const QString &uiFile )
layout->addWidget( wdg );
- QObjectList *list = wdg->queryList( "QWidget" );
- QObjectListIt it( *list );
+ TQObjectList *list = wdg->queryList( "TQWidget" );
+ TQObjectListIt it( *list );
- QStringList allowedTypes;
- allowedTypes << "QLineEdit"
- << "QTextEdit"
- << "QSpinBox"
- << "QCheckBox"
- << "QComboBox"
+ TQStringList allowedTypes;
+ allowedTypes << "TQLineEdit"
+ << "TQTextEdit"
+ << "TQSpinBox"
+ << "TQCheckBox"
+ << "TQComboBox"
<< "QDateTimeEdit"
<< "KLineEdit"
<< "KDateTimeWidget"
@@ -79,38 +79,38 @@ void DesignerFields::initGUI( const QString &uiFile )
while ( it.current() ) {
if ( allowedTypes.contains( it.current()->className() ) ) {
- QString name = it.current()->name();
+ TQString name = it.current()->name();
if ( name.startsWith( "X_" ) ) {
name = name.mid( 2 );
- QWidget *widget = static_cast<QWidget*>( it.current() );
+ TQWidget *widget = static_cast<TQWidget*>( it.current() );
if ( !name.isEmpty() )
mWidgets.insert( name, widget );
- if ( it.current()->inherits( "QLineEdit" ) )
- connect( it.current(), SIGNAL( textChanged( const QString& ) ),
- SIGNAL( modified() ) );
- else if ( it.current()->inherits( "QSpinBox" ) )
- connect( it.current(), SIGNAL( valueChanged( int ) ),
- SIGNAL( modified() ) );
- else if ( it.current()->inherits( "QCheckBox" ) )
- connect( it.current(), SIGNAL( toggled( bool ) ),
- SIGNAL( modified() ) );
- else if ( it.current()->inherits( "QComboBox" ) )
- connect( it.current(), SIGNAL( activated( const QString& ) ),
- SIGNAL( modified() ) );
+ if ( it.current()->inherits( "TQLineEdit" ) )
+ connect( it.current(), TQT_SIGNAL( textChanged( const TQString& ) ),
+ TQT_SIGNAL( modified() ) );
+ else if ( it.current()->inherits( "TQSpinBox" ) )
+ connect( it.current(), TQT_SIGNAL( valueChanged( int ) ),
+ TQT_SIGNAL( modified() ) );
+ else if ( it.current()->inherits( "TQCheckBox" ) )
+ connect( it.current(), TQT_SIGNAL( toggled( bool ) ),
+ TQT_SIGNAL( modified() ) );
+ else if ( it.current()->inherits( "TQComboBox" ) )
+ connect( it.current(), TQT_SIGNAL( activated( const TQString& ) ),
+ TQT_SIGNAL( modified() ) );
else if ( it.current()->inherits( "QDateTimeEdit" ) )
- connect( it.current(), SIGNAL( valueChanged( const QDateTime& ) ),
- SIGNAL( modified() ) );
+ connect( it.current(), TQT_SIGNAL( valueChanged( const TQDateTime& ) ),
+ TQT_SIGNAL( modified() ) );
else if ( it.current()->inherits( "KDateTimeWidget" ) )
- connect( it.current(), SIGNAL( valueChanged( const QDateTime& ) ),
- SIGNAL( modified() ) );
+ connect( it.current(), TQT_SIGNAL( valueChanged( const TQDateTime& ) ),
+ TQT_SIGNAL( modified() ) );
else if ( it.current()->inherits( "KDatePicker" ) )
- connect( it.current(), SIGNAL( dateChanged( QDate ) ),
- SIGNAL( modified() ) );
- else if ( it.current()->inherits( "QTextEdit" ) )
- connect( it.current(), SIGNAL( textChanged() ),
- SIGNAL( modified() ) );
+ connect( it.current(), TQT_SIGNAL( dateChanged( TQDate ) ),
+ TQT_SIGNAL( modified() ) );
+ else if ( it.current()->inherits( "TQTextEdit" ) )
+ connect( it.current(), TQT_SIGNAL( textChanged() ),
+ TQT_SIGNAL( modified() ) );
if ( !widget->isEnabled() )
mDisabledWidgets.append( widget );
@@ -123,82 +123,82 @@ void DesignerFields::initGUI( const QString &uiFile )
delete list;
}
-QString DesignerFields::identifier() const
+TQString DesignerFields::identifier() const
{
return mIdentifier;
}
-QString DesignerFields::title() const
+TQString DesignerFields::title() const
{
return mTitle;
}
void DesignerFields::load( DesignerFields::Storage *storage )
{
- QStringList keys = storage->keys();
+ TQStringList keys = storage->keys();
// clear all custom page widgets
// we can't do this in the following loop, as it works on the
// custom fields of the vcard, which may not be set.
- QMap<QString, QWidget *>::ConstIterator widIt;
+ TQMap<TQString, TQWidget *>::ConstIterator widIt;
for ( widIt = mWidgets.begin(); widIt != mWidgets.end(); ++widIt ) {
- QString value;
- if ( widIt.data()->inherits( "QLineEdit" ) ) {
- QLineEdit *wdg = static_cast<QLineEdit*>( widIt.data() );
- wdg->setText( QString::null );
- } else if ( widIt.data()->inherits( "QSpinBox" ) ) {
- QSpinBox *wdg = static_cast<QSpinBox*>( widIt.data() );
+ TQString value;
+ if ( widIt.data()->inherits( "TQLineEdit" ) ) {
+ TQLineEdit *wdg = static_cast<TQLineEdit*>( widIt.data() );
+ wdg->setText( TQString::null );
+ } else if ( widIt.data()->inherits( "TQSpinBox" ) ) {
+ TQSpinBox *wdg = static_cast<TQSpinBox*>( widIt.data() );
wdg->setValue( wdg->minValue() );
- } else if ( widIt.data()->inherits( "QCheckBox" ) ) {
- QCheckBox *wdg = static_cast<QCheckBox*>( widIt.data() );
+ } else if ( widIt.data()->inherits( "TQCheckBox" ) ) {
+ TQCheckBox *wdg = static_cast<TQCheckBox*>( widIt.data() );
wdg->setChecked( false );
} else if ( widIt.data()->inherits( "QDateTimeEdit" ) ) {
QDateTimeEdit *wdg = static_cast<QDateTimeEdit*>( widIt.data() );
- wdg->setDateTime( QDateTime::currentDateTime() );
+ wdg->setDateTime( TQDateTime::currentDateTime() );
} else if ( widIt.data()->inherits( "KDateTimeWidget" ) ) {
KDateTimeWidget *wdg = static_cast<KDateTimeWidget*>( widIt.data() );
- wdg->setDateTime( QDateTime::currentDateTime() );
+ wdg->setDateTime( TQDateTime::currentDateTime() );
} else if ( widIt.data()->inherits( "KDatePicker" ) ) {
KDatePicker *wdg = static_cast<KDatePicker*>( widIt.data() );
- wdg->setDate( QDate::currentDate() );
- } else if ( widIt.data()->inherits( "QComboBox" ) ) {
- QComboBox *wdg = static_cast<QComboBox*>( widIt.data() );
+ wdg->setDate( TQDate::currentDate() );
+ } else if ( widIt.data()->inherits( "TQComboBox" ) ) {
+ TQComboBox *wdg = static_cast<TQComboBox*>( widIt.data() );
wdg->setCurrentItem( 0 );
- } else if ( widIt.data()->inherits( "QTextEdit" ) ) {
- QTextEdit *wdg = static_cast<QTextEdit*>( widIt.data() );
- wdg->setText( QString::null );
+ } else if ( widIt.data()->inherits( "TQTextEdit" ) ) {
+ TQTextEdit *wdg = static_cast<TQTextEdit*>( widIt.data() );
+ wdg->setText( TQString::null );
}
}
- QStringList::ConstIterator it2;
+ TQStringList::ConstIterator it2;
for ( it2 = keys.begin(); it2 != keys.end(); ++it2 ) {
- QString value = storage->read( *it2 );
+ TQString value = storage->read( *it2 );
- QMap<QString, QWidget *>::ConstIterator it = mWidgets.find( *it2 );
+ TQMap<TQString, TQWidget *>::ConstIterator it = mWidgets.find( *it2 );
if ( it != mWidgets.end() ) {
- if ( it.data()->inherits( "QLineEdit" ) ) {
- QLineEdit *wdg = static_cast<QLineEdit*>( it.data() );
+ if ( it.data()->inherits( "TQLineEdit" ) ) {
+ TQLineEdit *wdg = static_cast<TQLineEdit*>( it.data() );
wdg->setText( value );
- } else if ( it.data()->inherits( "QSpinBox" ) ) {
- QSpinBox *wdg = static_cast<QSpinBox*>( it.data() );
+ } else if ( it.data()->inherits( "TQSpinBox" ) ) {
+ TQSpinBox *wdg = static_cast<TQSpinBox*>( it.data() );
wdg->setValue( value.toInt() );
- } else if ( it.data()->inherits( "QCheckBox" ) ) {
- QCheckBox *wdg = static_cast<QCheckBox*>( it.data() );
+ } else if ( it.data()->inherits( "TQCheckBox" ) ) {
+ TQCheckBox *wdg = static_cast<TQCheckBox*>( it.data() );
wdg->setChecked( value == "true" || value == "1" );
} else if ( it.data()->inherits( "QDateTimeEdit" ) ) {
QDateTimeEdit *wdg = static_cast<QDateTimeEdit*>( it.data() );
- wdg->setDateTime( QDateTime::fromString( value, Qt::ISODate ) );
+ wdg->setDateTime( TQDateTime::fromString( value, Qt::ISODate ) );
} else if ( it.data()->inherits( "KDateTimeWidget" ) ) {
KDateTimeWidget *wdg = static_cast<KDateTimeWidget*>( it.data() );
- wdg->setDateTime( QDateTime::fromString( value, Qt::ISODate ) );
+ wdg->setDateTime( TQDateTime::fromString( value, Qt::ISODate ) );
} else if ( it.data()->inherits( "KDatePicker" ) ) {
KDatePicker *wdg = static_cast<KDatePicker*>( it.data() );
- wdg->setDate( QDate::fromString( value, Qt::ISODate ) );
- } else if ( it.data()->inherits( "QComboBox" ) ) {
- QComboBox *wdg = static_cast<QComboBox*>( it.data() );
+ wdg->setDate( TQDate::fromString( value, Qt::ISODate ) );
+ } else if ( it.data()->inherits( "TQComboBox" ) ) {
+ TQComboBox *wdg = static_cast<TQComboBox*>( it.data() );
wdg->setCurrentText( value );
- } else if ( it.data()->inherits( "QTextEdit" ) ) {
- QTextEdit *wdg = static_cast<QTextEdit*>( it.data() );
+ } else if ( it.data()->inherits( "TQTextEdit" ) ) {
+ TQTextEdit *wdg = static_cast<TQTextEdit*>( it.data() );
wdg->setText( value );
}
}
@@ -207,17 +207,17 @@ void DesignerFields::load( DesignerFields::Storage *storage )
void DesignerFields::save( DesignerFields::Storage *storage )
{
- QMap<QString, QWidget*>::Iterator it;
+ TQMap<TQString, TQWidget*>::Iterator it;
for ( it = mWidgets.begin(); it != mWidgets.end(); ++it ) {
- QString value;
- if ( it.data()->inherits( "QLineEdit" ) ) {
- QLineEdit *wdg = static_cast<QLineEdit*>( it.data() );
+ TQString value;
+ if ( it.data()->inherits( "TQLineEdit" ) ) {
+ TQLineEdit *wdg = static_cast<TQLineEdit*>( it.data() );
value = wdg->text();
- } else if ( it.data()->inherits( "QSpinBox" ) ) {
- QSpinBox *wdg = static_cast<QSpinBox*>( it.data() );
- value = QString::number( wdg->value() );
- } else if ( it.data()->inherits( "QCheckBox" ) ) {
- QCheckBox *wdg = static_cast<QCheckBox*>( it.data() );
+ } else if ( it.data()->inherits( "TQSpinBox" ) ) {
+ TQSpinBox *wdg = static_cast<TQSpinBox*>( it.data() );
+ value = TQString::number( wdg->value() );
+ } else if ( it.data()->inherits( "TQCheckBox" ) ) {
+ TQCheckBox *wdg = static_cast<TQCheckBox*>( it.data() );
value = ( wdg->isChecked() ? "true" : "false" );
} else if ( it.data()->inherits( "QDateTimeEdit" ) ) {
QDateTimeEdit *wdg = static_cast<QDateTimeEdit*>( it.data() );
@@ -228,11 +228,11 @@ void DesignerFields::save( DesignerFields::Storage *storage )
} else if ( it.data()->inherits( "KDatePicker" ) ) {
KDatePicker *wdg = static_cast<KDatePicker*>( it.data() );
value = wdg->date().toString( Qt::ISODate );
- } else if ( it.data()->inherits( "QComboBox" ) ) {
- QComboBox *wdg = static_cast<QComboBox*>( it.data() );
+ } else if ( it.data()->inherits( "TQComboBox" ) ) {
+ TQComboBox *wdg = static_cast<TQComboBox*>( it.data() );
value = wdg->currentText();
- } else if ( it.data()->inherits( "QTextEdit" ) ) {
- QTextEdit *wdg = static_cast<QTextEdit*>( it.data() );
+ } else if ( it.data()->inherits( "TQTextEdit" ) ) {
+ TQTextEdit *wdg = static_cast<TQTextEdit*>( it.data() );
value = wdg->text();
}
@@ -242,7 +242,7 @@ void DesignerFields::save( DesignerFields::Storage *storage )
void DesignerFields::setReadOnly( bool readOnly )
{
- QMap<QString, QWidget*>::Iterator it;
+ TQMap<TQString, TQWidget*>::Iterator it;
for ( it = mWidgets.begin(); it != mWidgets.end(); ++it )
if ( mDisabledWidgets.find( it.data() ) == mDisabledWidgets.end() )
it.data()->setEnabled( !readOnly );
diff --git a/libkdepim/designerfields.h b/libkdepim/designerfields.h
index 5cba78772..2d5db2b12 100644
--- a/libkdepim/designerfields.h
+++ b/libkdepim/designerfields.h
@@ -24,9 +24,9 @@
#include <klocale.h>
-#include <qmap.h>
-#include <qpair.h>
-#include <qstringlist.h>
+#include <tqmap.h>
+#include <tqpair.h>
+#include <tqstringlist.h>
#include <kdepimmacros.h>
@@ -36,7 +36,7 @@ class KDE_EXPORT DesignerFields : public QWidget
{
Q_OBJECT
public:
- DesignerFields( const QString &uiFile, QWidget *parent,
+ DesignerFields( const TQString &uiFile, TQWidget *parent,
const char *name = 0 );
class Storage
@@ -44,9 +44,9 @@ class KDE_EXPORT DesignerFields : public QWidget
public:
virtual ~Storage() {}
- virtual QStringList keys() = 0;
- virtual QString read( const QString &key ) = 0;
- virtual void write( const QString &key, const QString &value ) = 0;
+ virtual TQStringList keys() = 0;
+ virtual TQString read( const TQString &key ) = 0;
+ virtual void write( const TQString &key, const TQString &value ) = 0;
};
void load( Storage * );
@@ -54,19 +54,19 @@ class KDE_EXPORT DesignerFields : public QWidget
void setReadOnly( bool readOnly );
- QString identifier() const;
- QString title() const;
+ TQString identifier() const;
+ TQString title() const;
signals:
void modified();
private:
- void initGUI( const QString& );
+ void initGUI( const TQString& );
- QMap<QString, QWidget *> mWidgets;
- QValueList<QWidget *> mDisabledWidgets;
- QString mTitle;
- QString mIdentifier;
+ TQMap<TQString, TQWidget *> mWidgets;
+ TQValueList<TQWidget *> mDisabledWidgets;
+ TQString mTitle;
+ TQString mIdentifier;
};
}
diff --git a/libkdepim/diffalgo.cpp b/libkdepim/diffalgo.cpp
index 92d9db1f5..21c476861 100644
--- a/libkdepim/diffalgo.cpp
+++ b/libkdepim/diffalgo.cpp
@@ -25,50 +25,50 @@ using namespace KPIM;
void DiffAlgo::begin()
{
- QValueList<DiffAlgoDisplay*>::Iterator it;
+ TQValueList<DiffAlgoDisplay*>::Iterator it;
for ( it = mDisplays.begin(); it != mDisplays.end(); ++it )
(*it)->begin();
}
void DiffAlgo::end()
{
- QValueList<DiffAlgoDisplay*>::Iterator it;
+ TQValueList<DiffAlgoDisplay*>::Iterator it;
for ( it = mDisplays.begin(); it != mDisplays.end(); ++it )
(*it)->end();
}
-void DiffAlgo::setLeftSourceTitle( const QString &title )
+void DiffAlgo::setLeftSourceTitle( const TQString &title )
{
- QValueList<DiffAlgoDisplay*>::Iterator it;
+ TQValueList<DiffAlgoDisplay*>::Iterator it;
for ( it = mDisplays.begin(); it != mDisplays.end(); ++it )
(*it)->setLeftSourceTitle( title );
}
-void DiffAlgo::setRightSourceTitle( const QString &title )
+void DiffAlgo::setRightSourceTitle( const TQString &title )
{
- QValueList<DiffAlgoDisplay*>::Iterator it;
+ TQValueList<DiffAlgoDisplay*>::Iterator it;
for ( it = mDisplays.begin(); it != mDisplays.end(); ++it )
(*it)->setRightSourceTitle( title );
}
-void DiffAlgo::additionalLeftField( const QString &id, const QString &value )
+void DiffAlgo::additionalLeftField( const TQString &id, const TQString &value )
{
- QValueList<DiffAlgoDisplay*>::Iterator it;
+ TQValueList<DiffAlgoDisplay*>::Iterator it;
for ( it = mDisplays.begin(); it != mDisplays.end(); ++it )
(*it)->additionalLeftField( id, value );
}
-void DiffAlgo::additionalRightField( const QString &id, const QString &value )
+void DiffAlgo::additionalRightField( const TQString &id, const TQString &value )
{
- QValueList<DiffAlgoDisplay*>::Iterator it;
+ TQValueList<DiffAlgoDisplay*>::Iterator it;
for ( it = mDisplays.begin(); it != mDisplays.end(); ++it )
(*it)->additionalRightField( id, value );
}
-void DiffAlgo::conflictField( const QString &id, const QString &leftValue,
- const QString &rightValue )
+void DiffAlgo::conflictField( const TQString &id, const TQString &leftValue,
+ const TQString &rightValue )
{
- QValueList<DiffAlgoDisplay*>::Iterator it;
+ TQValueList<DiffAlgoDisplay*>::Iterator it;
for ( it = mDisplays.begin(); it != mDisplays.end(); ++it )
(*it)->conflictField( id, leftValue, rightValue );
}
diff --git a/libkdepim/diffalgo.h b/libkdepim/diffalgo.h
index cf341bfe8..927ba14f3 100644
--- a/libkdepim/diffalgo.h
+++ b/libkdepim/diffalgo.h
@@ -22,7 +22,7 @@
#ifndef DIFFALGO_H
#define DIFFALGO_H
-#include <qvaluelist.h>
+#include <tqvaluelist.h>
#include <kdepimmacros.h>
namespace KPIM {
@@ -51,28 +51,28 @@ class DiffAlgoDisplay
/**
Sets the title of the left data source.
*/
- virtual void setLeftSourceTitle( const QString &title ) = 0;
+ virtual void setLeftSourceTitle( const TQString &title ) = 0;
/**
Sets the title of the right data source.
*/
- virtual void setRightSourceTitle( const QString &title ) = 0;
+ virtual void setRightSourceTitle( const TQString &title ) = 0;
/**
Adds a field which is only available in the left data source.
*/
- virtual void additionalLeftField( const QString &id, const QString &value ) = 0;
+ virtual void additionalLeftField( const TQString &id, const TQString &value ) = 0;
/**
Adds a field which is only available in the right data source.
*/
- virtual void additionalRightField( const QString &id, const QString &value ) = 0;
+ virtual void additionalRightField( const TQString &id, const TQString &value ) = 0;
/**
Adds a conflict between two fields.
*/
- virtual void conflictField( const QString &id, const QString &leftValue,
- const QString &rightValue ) = 0;
+ virtual void conflictField( const TQString &id, const TQString &leftValue,
+ const TQString &rightValue ) = 0;
};
@@ -102,35 +102,35 @@ class KDE_EXPORT DiffAlgo
/**
Sets the title of the left data source.
*/
- void setLeftSourceTitle( const QString &title );
+ void setLeftSourceTitle( const TQString &title );
/**
Sets the title of the right data source.
*/
- void setRightSourceTitle( const QString &title );
+ void setRightSourceTitle( const TQString &title );
/**
Adds a field which is only available in the left data source.
*/
- void additionalLeftField( const QString &id, const QString &value );
+ void additionalLeftField( const TQString &id, const TQString &value );
/**
Adds a field which is only available in the right data source.
*/
- void additionalRightField( const QString &id, const QString &value );
+ void additionalRightField( const TQString &id, const TQString &value );
/**
Adds a conflict between two fields.
*/
- void conflictField( const QString &id, const QString &leftValue,
- const QString &rightValue );
+ void conflictField( const TQString &id, const TQString &leftValue,
+ const TQString &rightValue );
void addDisplay( DiffAlgoDisplay *display );
void removeDisplay( DiffAlgoDisplay *display );
private:
- QValueList<DiffAlgoDisplay*> mDisplays;
+ TQValueList<DiffAlgoDisplay*> mDisplays;
};
}
diff --git a/libkdepim/distributionlist.cpp b/libkdepim/distributionlist.cpp
index 64f56a209..e70b77b57 100644
--- a/libkdepim/distributionlist.cpp
+++ b/libkdepim/distributionlist.cpp
@@ -14,7 +14,7 @@ KPIM::DistributionList::DistributionList( const KABC::Addressee& addr )
{
}
-void KPIM::DistributionList::setName( const QString &name )
+void KPIM::DistributionList::setName( const TQString &name )
{
// We can't use Addressee::setName, the name isn't saved/loaded in the vcard (fixed in 3.4)
Addressee::setFormattedName( name );
@@ -28,21 +28,21 @@ void KPIM::DistributionList::setName( const QString &name )
// Helper function, to parse the contents of the custom field
// Returns a list of { uid, email }
-typedef QValueList<QPair<QString, QString> > ParseList;
-static ParseList parseCustom( const QString& str )
+typedef TQValueList<QPair<TQString, TQString> > ParseList;
+static ParseList parseCustom( const TQString& str )
{
ParseList res;
- const QStringList lst = QStringList::split( ';', str );
- for( QStringList::ConstIterator it = lst.begin(); it != lst.end(); ++it ) {
+ const TQStringList lst = TQStringList::split( ';', str );
+ for( TQStringList::ConstIterator it = lst.begin(); it != lst.end(); ++it ) {
if ( (*it).isEmpty() )
continue;
// parse "uid,email"
- QStringList helpList = QStringList::split( ',', (*it) );
+ TQStringList helpList = TQStringList::split( ',', (*it) );
Q_ASSERT( !helpList.isEmpty() );
if ( helpList.isEmpty() )
continue;
- const QString uid = helpList.first();
- QString email;
+ const TQString uid = helpList.first();
+ TQString email;
Q_ASSERT( helpList.count() < 3 ); // 1 or 2 items, but not more
if ( helpList.count() == 2 )
email = helpList.last();
@@ -51,38 +51,38 @@ static ParseList parseCustom( const QString& str )
return res;
}
-void KPIM::DistributionList::insertEntry( const Addressee& addr, const QString& email )
+void KPIM::DistributionList::insertEntry( const Addressee& addr, const TQString& email )
{
// insertEntry will removeEntry(uid), but not with formattedName
removeEntry( addr.formattedName(), email );
insertEntry( addr.uid(), email );
}
-void KPIM::DistributionList::insertEntry( const QString& uid, const QString& email )
+void KPIM::DistributionList::insertEntry( const TQString& uid, const TQString& email )
{
Q_ASSERT( !email.isEmpty() || email.isNull() ); // hopefully never called with "", would lead to confusion
removeEntry( uid, email ); // avoid duplicates
- QString str = custom( "KADDRESSBOOK", s_customFieldName );
+ TQString str = custom( "KADDRESSBOOK", s_customFieldName );
// Assumption: UIDs don't contain ; nor ,
str += ";" + uid + "," + email;
insertCustom( "KADDRESSBOOK", s_customFieldName, str ); // replace old value
}
-void KPIM::DistributionList::removeEntry( const Addressee& addr, const QString& email )
+void KPIM::DistributionList::removeEntry( const Addressee& addr, const TQString& email )
{
removeEntry( addr.uid(), email );
// Also remove entries with the full name as uid (for the kolab thing)
removeEntry( addr.formattedName(), email );
}
-void KPIM::DistributionList::removeEntry( const QString& uid, const QString& email )
+void KPIM::DistributionList::removeEntry( const TQString& uid, const TQString& email )
{
Q_ASSERT( !email.isEmpty() || email.isNull() ); // hopefully never called with "", would lead to confusion
ParseList parseList = parseCustom( custom( "KADDRESSBOOK", s_customFieldName ) );
- QString str;
+ TQString str;
for( ParseList::ConstIterator it = parseList.begin(); it != parseList.end(); ++it ) {
- const QString thisUid = (*it).first;
- const QString thisEmail = (*it).second;
+ const TQString thisUid = (*it).first;
+ const TQString thisEmail = (*it).second;
if ( thisUid == uid && thisEmail == email ) {
continue; // remove that one
}
@@ -95,13 +95,13 @@ void KPIM::DistributionList::removeEntry( const QString& uid, const QString& ema
bool KPIM::DistributionList::isDistributionList( const KABC::Addressee& addr )
{
- const QString str = addr.custom( "KADDRESSBOOK", s_customFieldName );
+ const TQString str = addr.custom( "KADDRESSBOOK", s_customFieldName );
return !str.isEmpty();
}
// ###### KDE4: add findByFormattedName to KABC::AddressBook
static KABC::Addressee::List findByFormattedName( KABC::AddressBook* book,
- const QString& name,
+ const TQString& name,
bool caseSensitive = true )
{
KABC::Addressee::List res;
@@ -117,7 +117,7 @@ static KABC::Addressee::List findByFormattedName( KABC::AddressBook* book,
}
KPIM::DistributionList KPIM::DistributionList::findByName( KABC::AddressBook* book,
- const QString& name,
+ const TQString& name,
bool caseSensitive )
{
KABC::AddressBook::Iterator abIt;
@@ -133,7 +133,7 @@ KPIM::DistributionList KPIM::DistributionList::findByName( KABC::AddressBook* bo
return DistributionList();
}
-static KABC::Addressee findByUidOrName( KABC::AddressBook* book, const QString& uidOrName, const QString& email )
+static KABC::Addressee findByUidOrName( KABC::AddressBook* book, const TQString& uidOrName, const TQString& email )
{
KABC::Addressee a = book->findByUid( uidOrName );
if ( a.isEmpty() ) {
@@ -166,11 +166,11 @@ static KABC::Addressee findByUidOrName( KABC::AddressBook* book, const QString&
KPIM::DistributionList::Entry::List KPIM::DistributionList::entries( KABC::AddressBook* book ) const
{
Entry::List res;
- const QString str = custom( "KADDRESSBOOK", s_customFieldName );
+ const TQString str = custom( "KADDRESSBOOK", s_customFieldName );
const ParseList parseList = parseCustom( str );
for( ParseList::ConstIterator it = parseList.begin(); it != parseList.end(); ++it ) {
- const QString uid = (*it).first;
- const QString email = (*it).second;
+ const TQString uid = (*it).first;
+ const TQString email = (*it).second;
// look up contact
KABC::Addressee a = findByUidOrName( book, uid, email );
if ( a.isEmpty() ) {
@@ -183,15 +183,15 @@ KPIM::DistributionList::Entry::List KPIM::DistributionList::entries( KABC::Addre
return res;
}
-QStringList KPIM::DistributionList::emails( KABC::AddressBook* book ) const
+TQStringList KPIM::DistributionList::emails( KABC::AddressBook* book ) const
{
- QStringList emails;
+ TQStringList emails;
- const QString str = custom( "KADDRESSBOOK", s_customFieldName );
+ const TQString str = custom( "KADDRESSBOOK", s_customFieldName );
ParseList parseList = parseCustom( str );
for( ParseList::ConstIterator it = parseList.begin(); it != parseList.end(); ++it ) {
- const QString thisUid = (*it).first;
- const QString thisEmail = (*it).second;
+ const TQString thisUid = (*it).first;
+ const TQString thisEmail = (*it).second;
// look up contact
KABC::Addressee a = findByUidOrName( book, thisUid, thisEmail );
@@ -200,7 +200,7 @@ QStringList KPIM::DistributionList::emails( KABC::AddressBook* book ) const
continue;
}
- const QString email = thisEmail.isEmpty() ? a.fullEmail() :
+ const TQString email = thisEmail.isEmpty() ? a.fullEmail() :
a.fullEmail( thisEmail );
if ( !email.isEmpty() ) {
emails.append( email );
@@ -210,10 +210,10 @@ QStringList KPIM::DistributionList::emails( KABC::AddressBook* book ) const
return emails;
}
-QValueList<KPIM::DistributionList>
+TQValueList<KPIM::DistributionList>
KPIM::DistributionList::allDistributionLists( KABC::AddressBook* book )
{
- QValueList<KPIM::DistributionList> lst;
+ TQValueList<KPIM::DistributionList> lst;
KABC::AddressBook::Iterator abIt;
for ( abIt = book->begin(); abIt != book->end(); ++abIt )
{
diff --git a/libkdepim/distributionlist.h b/libkdepim/distributionlist.h
index 74ba0b4a4..06b720b03 100644
--- a/libkdepim/distributionlist.h
+++ b/libkdepim/distributionlist.h
@@ -52,17 +52,17 @@ class DistributionList : public KABC::Addressee
*/
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;
};
- typedef QValueList<DistributionList> List;
+ typedef TQValueList<DistributionList> List;
/**
* Create a distribution list.
@@ -80,27 +80,27 @@ class DistributionList : public KABC::Addressee
~DistributionList() {}
/// HACK: reimplemented from Addressee, but it's NOT virtual there
- void setName( const QString &name );
+ void setName( const TQString &name );
/// HACK: reimplemented from Addressee, but it's NOT virtual there
- QString name() const { return formattedName(); }
+ TQString name() const { return formattedName(); }
/**
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 );
/// Overload, used by resources to avoid looking up the addressee
- void insertEntry( const QString& uid, const QString& email=QString::null );
+ void insertEntry( const TQString& uid, const TQString& email=TQString::null );
/// Overload, used by resources to avoid looking up the addressee
- void removeEntry( const QString& uid, const QString& email=QString::null );
+ void removeEntry( const TQString& uid, const TQString& email=TQString::null );
/**
@@ -108,7 +108,7 @@ class DistributionList : public KABC::Addressee
These addresses can be directly used by e.g. a mail client.
@param book necessary to look up entries
*/
- QStringList emails( KABC::AddressBook* book ) const;
+ TQStringList emails( KABC::AddressBook* book ) const;
/**
Return list of entries belonging to this distribution list. This function
@@ -122,12 +122,12 @@ class DistributionList : public KABC::Addressee
// KDE4: should be a method of AddressBook
static DistributionList findByName( KABC::AddressBook* book,
- const QString& name,
+ const TQString& name,
bool caseSensitive = true );
// KDE4: should be a method of AddressBook
// A bit slow (but no more than findByName).
// From KAddressbook, use Core::distributionLists() instead.
- static QValueList<DistributionList> allDistributionLists( KABC::AddressBook* book );
+ static TQValueList<DistributionList> allDistributionLists( KABC::AddressBook* book );
private:
diff --git a/libkdepim/embeddedurlpage.cpp b/libkdepim/embeddedurlpage.cpp
index 1a48b8666..d01205742 100644
--- a/libkdepim/embeddedurlpage.cpp
+++ b/libkdepim/embeddedurlpage.cpp
@@ -27,23 +27,23 @@
#include <kparts/part.h>
#include <kmimetype.h>
#include <klocale.h>
-#include <qlayout.h>
-#include <qlabel.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
using namespace KPIM;
-EmbeddedURLPage::EmbeddedURLPage( const QString &url, const QString &mimetype,
- QWidget *parent, const char *name )
- : QWidget( parent, name ), mUri(url), mMimeType( mimetype ), mPart( 0 )
+EmbeddedURLPage::EmbeddedURLPage( const TQString &url, const TQString &mimetype,
+ TQWidget *parent, const char *name )
+ : TQWidget( parent, name ), mUri(url), mMimeType( mimetype ), mPart( 0 )
{
initGUI( url, mimetype );
}
-void EmbeddedURLPage::initGUI( const QString &url, const QString &/*mimetype*/ )
+void EmbeddedURLPage::initGUI( const TQString &url, const TQString &/*mimetype*/ )
{
- QVBoxLayout *layout = new QVBoxLayout( this );
+ TQVBoxLayout *layout = new TQVBoxLayout( this );
layout->setAutoAdd( true );
- new QLabel( i18n("Showing URL %1").arg( url ), this );
+ new TQLabel( i18n("Showing URL %1").arg( url ), this );
}
void EmbeddedURLPage::loadContents()
@@ -51,20 +51,20 @@ void EmbeddedURLPage::loadContents()
if ( !mPart ) {
if ( mMimeType.isEmpty() || mUri.isEmpty() )
return;
- QString mimetype = mMimeType;
+ TQString mimetype = mMimeType;
if ( mimetype == "auto" )
mimetype == KMimeType::findByURL( mUri )->name();
// "this" is both the parent widget and the parent object
- mPart = KParts::ComponentFactory::createPartInstanceFromQuery<KParts::ReadOnlyPart>( mimetype, QString::null, this, 0, this, 0 );
+ mPart = KParts::ComponentFactory::createPartInstanceFromQuery<KParts::ReadOnlyPart>( mimetype, TQString::null, this, 0, this, 0 );
if ( mPart ) {
mPart->openURL( mUri );
mPart->widget()->show();
}
//void KParts::BrowserExtension::openURLRequestDelayed( const KURL &url, const KParts::URLArgs &args = KParts::URLArgs() )
KParts::BrowserExtension* be = KParts::BrowserExtension::childObject( mPart );
- connect( be, SIGNAL( openURLRequestDelayed( const KURL &, const KParts::URLArgs & ) ),
-// mPart, SLOT( openURL( const KURL & ) ) );
- this, SIGNAL( openURL( const KURL & ) ) );
+ connect( be, TQT_SIGNAL( openURLRequestDelayed( const KURL &, const KParts::URLArgs & ) ),
+// mPart, TQT_SLOT( openURL( const KURL & ) ) );
+ this, TQT_SIGNAL( openURL( const KURL & ) ) );
}
}
diff --git a/libkdepim/embeddedurlpage.h b/libkdepim/embeddedurlpage.h
index 4e79e966d..61f8933ad 100644
--- a/libkdepim/embeddedurlpage.h
+++ b/libkdepim/embeddedurlpage.h
@@ -21,7 +21,7 @@
#ifndef KPIM_EMBEDDEDURLPAGE_H
#define KPIM_EMBEDDEDURLPAGE_H
-#include <qwidget.h>
+#include <tqwidget.h>
#include <kdepimmacros.h>
#include <kurl.h>
@@ -33,18 +33,18 @@ class KDE_EXPORT EmbeddedURLPage : public QWidget
{
Q_OBJECT
public:
- EmbeddedURLPage( const QString &url, const QString &mimetype,
- QWidget *parent, const char *name = 0 );
+ EmbeddedURLPage( const TQString &url, const TQString &mimetype,
+ TQWidget *parent, const char *name = 0 );
public slots:
void loadContents();
signals:
void openURL( const KURL &url );
private:
- void initGUI( const QString &url, const QString &mimetype );
+ void initGUI( const TQString &url, const TQString &mimetype );
- QString mUri;
- QString mMimeType;
+ TQString mUri;
+ TQString mMimeType;
KParts::ReadOnlyPart* mPart;
};
diff --git a/libkdepim/htmldiffalgodisplay.cpp b/libkdepim/htmldiffalgodisplay.cpp
index 9ebfab51a..2c6af164b 100644
--- a/libkdepim/htmldiffalgodisplay.cpp
+++ b/libkdepim/htmldiffalgodisplay.cpp
@@ -25,17 +25,17 @@
using namespace KPIM;
-static QString textToHTML( const QString &text )
+static TQString textToHTML( const TQString &text )
{
- return QStyleSheet::convertFromPlainText( text );
+ return TQStyleSheet::convertFromPlainText( text );
}
-HTMLDiffAlgoDisplay::HTMLDiffAlgoDisplay( QWidget *parent )
+HTMLDiffAlgoDisplay::HTMLDiffAlgoDisplay( TQWidget *parent )
: KTextBrowser( parent )
{
- setWrapPolicy( QTextEdit::AtWordBoundary );
- setVScrollBarMode( QScrollView::AlwaysOff );
- setHScrollBarMode( QScrollView::AlwaysOff );
+ setWrapPolicy( TQTextEdit::AtWordBoundary );
+ setVScrollBarMode( TQScrollView::AlwaysOff );
+ setHScrollBarMode( TQScrollView::AlwaysOff );
}
void HTMLDiffAlgoDisplay::begin()
@@ -44,12 +44,12 @@ void HTMLDiffAlgoDisplay::begin()
mText = "";
mText.append( "<html>" );
- mText.append( QString( "<body text=\"%1\" bgcolor=\"%2\">" )
+ mText.append( TQString( "<body text=\"%1\" bgcolor=\"%2\">" )
.arg( KGlobalSettings::textColor().name() )
.arg( KGlobalSettings::baseColor().name() ) );
mText.append( "<center><table>" );
- mText.append( QString( "<tr><th></th><th align=\"center\">%1</th><td> </td><th align=\"center\">%2</th></tr>" )
+ mText.append( TQString( "<tr><th></th><th align=\"center\">%1</th><td> </td><th align=\"center\">%2</th></tr>" )
.arg( mLeftTitle )
.arg( mRightTitle ) );
}
@@ -63,34 +63,34 @@ void HTMLDiffAlgoDisplay::end()
setText( mText );
}
-void HTMLDiffAlgoDisplay::setLeftSourceTitle( const QString &title )
+void HTMLDiffAlgoDisplay::setLeftSourceTitle( const TQString &title )
{
mLeftTitle = title;
}
-void HTMLDiffAlgoDisplay::setRightSourceTitle( const QString &title )
+void HTMLDiffAlgoDisplay::setRightSourceTitle( const TQString &title )
{
mRightTitle = title;
}
-void HTMLDiffAlgoDisplay::additionalLeftField( const QString &id, const QString &value )
+void HTMLDiffAlgoDisplay::additionalLeftField( const TQString &id, const TQString &value )
{
- mText.append( QString( "<tr><td align=\"right\"><b>%1:</b></td><td bgcolor=\"#9cff83\">%2</td><td></td><td></td></tr>" )
+ mText.append( TQString( "<tr><td align=\"right\"><b>%1:</b></td><td bgcolor=\"#9cff83\">%2</td><td></td><td></td></tr>" )
.arg( id )
.arg( textToHTML( value ) ) );
}
-void HTMLDiffAlgoDisplay::additionalRightField( const QString &id, const QString &value )
+void HTMLDiffAlgoDisplay::additionalRightField( const TQString &id, const TQString &value )
{
- mText.append( QString( "<tr><td align=\"right\"><b>%1:</b></td><td></td><td></td><td bgcolor=\"#9cff83\">%2</td></tr>" )
+ mText.append( TQString( "<tr><td align=\"right\"><b>%1:</b></td><td></td><td></td><td bgcolor=\"#9cff83\">%2</td></tr>" )
.arg( id )
.arg( textToHTML( value ) ) );
}
-void HTMLDiffAlgoDisplay::conflictField( const QString &id, const QString &leftValue,
- const QString &rightValue )
+void HTMLDiffAlgoDisplay::conflictField( const TQString &id, const TQString &leftValue,
+ const TQString &rightValue )
{
- mText.append( QString( "<tr><td align=\"right\"><b>%1:</b></td><td bgcolor=\"#ff8686\">%2</td><td></td><td bgcolor=\"#ff8686\">%3</td></tr>" )
+ mText.append( TQString( "<tr><td align=\"right\"><b>%1:</b></td><td bgcolor=\"#ff8686\">%2</td><td></td><td bgcolor=\"#ff8686\">%3</td></tr>" )
.arg( id )
.arg( textToHTML( leftValue ) )
.arg( textToHTML( rightValue ) ) );
diff --git a/libkdepim/htmldiffalgodisplay.h b/libkdepim/htmldiffalgodisplay.h
index 3d34a7a46..23da21f4c 100644
--- a/libkdepim/htmldiffalgodisplay.h
+++ b/libkdepim/htmldiffalgodisplay.h
@@ -31,21 +31,21 @@ namespace KPIM {
class KDE_EXPORT HTMLDiffAlgoDisplay : virtual public DiffAlgoDisplay, public KTextBrowser
{
public:
- HTMLDiffAlgoDisplay( QWidget *parent );
+ HTMLDiffAlgoDisplay( TQWidget *parent );
void begin();
void end();
- void setLeftSourceTitle( const QString &title );
- void setRightSourceTitle( const QString &title );
- void additionalLeftField( const QString &id, const QString &value );
- void additionalRightField( const QString &id, const QString &value );
- void conflictField( const QString &id, const QString &leftValue,
- const QString &rightValue );
+ void setLeftSourceTitle( const TQString &title );
+ void setRightSourceTitle( const TQString &title );
+ void additionalLeftField( const TQString &id, const TQString &value );
+ void additionalRightField( const TQString &id, const TQString &value );
+ void conflictField( const TQString &id, const TQString &leftValue,
+ const TQString &rightValue );
private:
- QString mLeftTitle;
- QString mRightTitle;
- QString mText;
+ TQString mLeftTitle;
+ TQString mRightTitle;
+ TQString mText;
};
}
diff --git a/libkdepim/infoextension.cpp b/libkdepim/infoextension.cpp
index 9fb5e7e02..55cb35683 100644
--- a/libkdepim/infoextension.cpp
+++ b/libkdepim/infoextension.cpp
@@ -21,13 +21,13 @@
#include "infoextension.h"
-#include <qwidget.h>
+#include <tqwidget.h>
#include <kparts/part.h>
using namespace KParts;
InfoExtension::InfoExtension( KParts::ReadOnlyPart *parent, const char* name)
-: QObject(parent, name), d(0)
+: TQObject(parent, name), d(0)
{
}
diff --git a/libkdepim/infoextension.h b/libkdepim/infoextension.h
index a231edb54..752ad9913 100644
--- a/libkdepim/infoextension.h
+++ b/libkdepim/infoextension.h
@@ -22,7 +22,7 @@
#ifndef INFOEXTENSION_H
#define INFOEXTENSION_H
-#include <qobject.h>
+#include <tqobject.h>
#include <kdepimmacros.h>
class QWidget;
@@ -54,8 +54,8 @@ namespace KParts
InfoExtensionPrivate *d;
signals:
- void textChanged( const QString& );
- void iconChanged( const QPixmap& );
+ void textChanged( const TQString& );
+ void iconChanged( const TQPixmap& );
};
}
#endif // INFOEXTENSION_H
diff --git a/libkdepim/interfaces/AddressBookServiceIface.h b/libkdepim/interfaces/AddressBookServiceIface.h
index 5dae9da52..bff304322 100644
--- a/libkdepim/interfaces/AddressBookServiceIface.h
+++ b/libkdepim/interfaces/AddressBookServiceIface.h
@@ -25,8 +25,8 @@
#include <dcopobject.h>
#include <dcopref.h>
#include <kurl.h>
-#include <qstring.h>
-#include <qcstring.h>
+#include <tqstring.h>
+#include <tqcstring.h>
#include <kdepimmacros.h>
namespace KPIM {
@@ -43,7 +43,7 @@ namespace KPIM {
@param vCard The vCard in string representation.
*/
- virtual void importVCardFromData( const QString& vCard ) = 0;
+ virtual void importVCardFromData( const TQString& vCard ) = 0;
/**
This method will add a vcard to the address book.
diff --git a/libkdepim/interfaces/MailTransportServiceIface.h b/libkdepim/interfaces/MailTransportServiceIface.h
index d0ced70ae..99228d25a 100644
--- a/libkdepim/interfaces/MailTransportServiceIface.h
+++ b/libkdepim/interfaces/MailTransportServiceIface.h
@@ -25,8 +25,8 @@
#include <dcopobject.h>
#include <dcopref.h>
#include <kurl.h>
-#include <qstring.h>
-#include <qcstring.h>
+#include <tqstring.h>
+#include <tqcstring.h>
#include <kdepimmacros.h>
@@ -46,23 +46,23 @@ namespace KPim {
*
* @return true when the message was send successfully, false on failure.
**/
- virtual bool sendMessage( const QString& from, const QString& to,
- const QString& cc, const QString& bcc,
- const QString& subject, const QString& body,
+ virtual bool sendMessage( const TQString& from, const TQString& to,
+ const TQString& cc, const TQString& bcc,
+ const TQString& subject, const TQString& body,
const KURL::List& attachments ) = 0;
/**
* This method basically behaves like the one above, but takes only one
- * attachment as QByteArray. This is useful if you want to attach simple
+ * attachment as TQByteArray. This is useful if you want to attach simple
* text files (e.g. a vCalendar). The mimetype is determined using
* mime magic.
*
* @return true when the message was send successfully, false on failure.
**/
- virtual bool sendMessage( const QString& from, const QString& to,
- const QString& cc, const QString& bcc,
- const QString& subject, const QString& body,
- const QByteArray& attachment ) = 0;
+ virtual bool sendMessage( const TQString& from, const TQString& to,
+ const TQString& cc, const TQString& bcc,
+ const TQString& subject, const TQString& body,
+ const TQByteArray& attachment ) = 0;
k_dcop_hidden:
/**
@@ -70,9 +70,9 @@ namespace KPim {
* additional parameter from instead.
**/
// FIXME KDE 4.0: Remove this.
- virtual bool sendMessage( const QString& to,
- const QString& cc, const QString& bcc,
- const QString& subject, const QString& body,
+ virtual bool sendMessage( const TQString& to,
+ const TQString& cc, const TQString& bcc,
+ const TQString& subject, const TQString& body,
const KURL::List& attachments ) = 0;
/**
@@ -80,10 +80,10 @@ namespace KPim {
* additional parameter from instead.
**/
// FIXME KDE 4.0: Remove this.
- virtual bool sendMessage( const QString& to,
- const QString& cc, const QString& bcc,
- const QString& subject, const QString& body,
- const QByteArray& attachment ) = 0;
+ virtual bool sendMessage( const TQString& to,
+ const TQString& cc, const TQString& bcc,
+ const TQString& subject, const TQString& body,
+ const TQByteArray& attachment ) = 0;
};
diff --git a/libkdepim/kabcresourcecached.cpp b/libkdepim/kabcresourcecached.cpp
index 334ac4f22..88d83dcf8 100644
--- a/libkdepim/kabcresourcecached.cpp
+++ b/libkdepim/kabcresourcecached.cpp
@@ -18,7 +18,7 @@
Boston, MA 02110-1301, USA.
*/
-#include <qfile.h>
+#include <tqfile.h>
#include <kabc/vcardconverter.h>
#include <kdebug.h>
@@ -88,13 +88,13 @@ void ResourceCached::loadCache()
mIdMapper.load();
// load cache
- QFile file( cacheFile() );
+ TQFile file( cacheFile() );
if ( !file.open( IO_ReadOnly ) )
return;
KABC::VCardConverter converter;
- KABC::Addressee::List list = converter.parseVCards( QString::fromUtf8( file.readAll() ) );
+ KABC::Addressee::List list = converter.parseVCards( TQString::fromUtf8( file.readAll() ) );
KABC::Addressee::List::Iterator it;
for ( it = list.begin(); it != list.end(); ++it ) {
@@ -112,14 +112,14 @@ void ResourceCached::saveCache()
mIdMapper.save();
// save cache
- QFile file( cacheFile() );
+ TQFile file( cacheFile() );
if ( !file.open( IO_WriteOnly ) )
return;
KABC::Addressee::List list = mAddrMap.values();
KABC::VCardConverter converter;
- QString vCard = converter.createVCards( list );
+ TQString vCard = converter.createVCards( list );
file.writeBlock( vCard.utf8(), vCard.utf8().length() );
file.close();
}
@@ -133,13 +133,13 @@ void ResourceCached::clearCache()
void ResourceCached::cleanUpCache( const KABC::Addressee::List &addrList )
{
// load cache
- QFile file( cacheFile() );
+ TQFile file( cacheFile() );
if ( !file.open( IO_ReadOnly ) )
return;
KABC::VCardConverter converter;
- KABC::Addressee::List list = converter.parseVCards( QString::fromUtf8( file.readAll() ) );
+ KABC::Addressee::List list = converter.parseVCards( TQString::fromUtf8( file.readAll() ) );
KABC::Addressee::List::Iterator cacheIt;
KABC::Addressee::List::ConstIterator it;
@@ -185,7 +185,7 @@ void ResourceCached::clearChange( const KABC::Addressee &addr )
mDeletedAddressees.remove( addr.uid() );
}
-void ResourceCached::clearChange( const QString &uid )
+void ResourceCached::clearChange( const TQString &uid )
{
mAddedAddressees.remove( uid );
mChangedAddressees.remove( uid );
@@ -207,19 +207,19 @@ KABC::Addressee::List ResourceCached::deletedAddressees() const
return mDeletedAddressees.values();
}
-QString ResourceCached::cacheFile() const
+TQString ResourceCached::cacheFile() const
{
return locateLocal( "cache", "kabc/kresources/" + identifier() );
}
-QString ResourceCached::changesCacheFile( const QString &type ) const
+TQString ResourceCached::changesCacheFile( const TQString &type ) const
{
return locateLocal( "cache", "kabc/changescache/" + identifier() + "_" + type );
}
-void ResourceCached::saveChangesCache( const QMap<QString, KABC::Addressee> &map, const QString &type )
+void ResourceCached::saveChangesCache( const TQMap<TQString, KABC::Addressee> &map, const TQString &type )
{
- QFile file( changesCacheFile( type ) );
+ TQFile file( changesCacheFile( type ) );
const KABC::Addressee::List list = map.values();
if ( list.isEmpty() ) {
@@ -231,8 +231,8 @@ void ResourceCached::saveChangesCache( const QMap<QString, KABC::Addressee> &map
}
KABC::VCardConverter converter;
- const QString vCards = converter.createVCards( list );
- QCString content = vCards.utf8();
+ const TQString vCards = converter.createVCards( list );
+ TQCString content = vCards.utf8();
file.writeBlock( content, content.length() );
}
}
@@ -244,15 +244,15 @@ void ResourceCached::saveChangesCache()
saveChangesCache( mChangedAddressees, "changed" );
}
-void ResourceCached::loadChangesCache( QMap<QString, KABC::Addressee> &map, const QString &type )
+void ResourceCached::loadChangesCache( TQMap<TQString, KABC::Addressee> &map, const TQString &type )
{
- QFile file( changesCacheFile( type ) );
+ TQFile file( changesCacheFile( type ) );
if ( !file.open( IO_ReadOnly ) )
return;
KABC::VCardConverter converter;
- const KABC::Addressee::List list = converter.parseVCards( QString::fromUtf8( file.readAll() ) );
+ const KABC::Addressee::List list = converter.parseVCards( TQString::fromUtf8( file.readAll() ) );
KABC::Addressee::List::ConstIterator it;
for ( it = list.begin(); it != list.end(); ++it )
map.insert( (*it).uid(), *it );
diff --git a/libkdepim/kabcresourcecached.h b/libkdepim/kabcresourcecached.h
index e650eec6c..c7ea30fe4 100644
--- a/libkdepim/kabcresourcecached.h
+++ b/libkdepim/kabcresourcecached.h
@@ -64,22 +64,22 @@ class KDE_EXPORT ResourceCached : public Resource
bool hasChanges() const;
void clearChanges();
void clearChange( const KABC::Addressee& );
- void clearChange( const QString& );
+ void clearChange( const TQString& );
KABC::Addressee::List addedAddressees() const;
KABC::Addressee::List changedAddressees() const;
KABC::Addressee::List deletedAddressees() const;
protected:
- virtual QString cacheFile() const;
+ virtual TQString cacheFile() const;
/**
Functions for keeping the changes persistent.
*/
- virtual QString changesCacheFile( const QString& ) const;
- void loadChangesCache( QMap<QString, KABC::Addressee>&, const QString& );
+ virtual TQString changesCacheFile( const TQString& ) const;
+ void loadChangesCache( TQMap<TQString, KABC::Addressee>&, const TQString& );
void loadChangesCache();
- void saveChangesCache( const QMap<QString, KABC::Addressee>&, const QString& );
+ void saveChangesCache( const TQMap<TQString, KABC::Addressee>&, const TQString& );
void saveChangesCache();
void setIdMapperIdentifier();
@@ -87,9 +87,9 @@ class KDE_EXPORT ResourceCached : public Resource
private:
KPIM::IdMapper mIdMapper;
- QMap<QString, KABC::Addressee> mAddedAddressees;
- QMap<QString, KABC::Addressee> mChangedAddressees;
- QMap<QString, KABC::Addressee> mDeletedAddressees;
+ TQMap<TQString, KABC::Addressee> mAddedAddressees;
+ TQMap<TQString, KABC::Addressee> mChangedAddressees;
+ TQMap<TQString, KABC::Addressee> mDeletedAddressees;
class ResourceCachedPrivate;
ResourceCachedPrivate *d;
diff --git a/libkdepim/kaccount.cpp b/libkdepim/kaccount.cpp
index e15a85f6f..9aab7cfec 100644
--- a/libkdepim/kaccount.cpp
+++ b/libkdepim/kaccount.cpp
@@ -34,14 +34,14 @@
#include <kconfig.h>
-KAccount::KAccount( const uint id, const QString &name, const Type type )
+KAccount::KAccount( const uint id, const TQString &name, const Type type )
: mId( id ), mName( name ), mType( type )
{
}
-void KAccount::writeConfig( KConfig &config, const QString &group )
+void KAccount::writeConfig( KConfig &config, const TQString &group )
{
- QString oldGroup = config.group();
+ TQString oldGroup = config.group();
if (!group.isEmpty())
config.setGroup(group);
config.writeEntry("Id", mId);
@@ -50,9 +50,9 @@ void KAccount::writeConfig( KConfig &config, const QString &group )
config.setGroup(oldGroup);
}
-void KAccount::readConfig( KConfig &config, const QString &group )
+void KAccount::readConfig( KConfig &config, const TQString &group )
{
- QString oldGroup = config.group();
+ TQString oldGroup = config.group();
if (!group.isEmpty())
config.setGroup(group);
mId = config.readUnsignedNumEntry("Id", 0);
diff --git a/libkdepim/kaccount.h b/libkdepim/kaccount.h
index 765c5ae70..d81182767 100644
--- a/libkdepim/kaccount.h
+++ b/libkdepim/kaccount.h
@@ -32,7 +32,7 @@
#ifndef __KACCOUNT
#define __KACCOUNT
-#include <qstring.h>
+#include <tqstring.h>
#include <kdepimmacros.h>
class KConfig;
@@ -50,14 +50,14 @@ class KDE_EXPORT KAccount
Other
};
- KAccount( const uint id = 0, const QString &name = QString::null,
+ KAccount( const uint id = 0, const TQString &name = TQString::null,
const Type type = Other );
/**
* Get/Set name
*/
- QString name() const { return mName; }
- void setName( const QString& name ) { mName = name; }
+ TQString name() const { return mName; }
+ void setName( const TQString& name ) { mName = name; }
/**
* Get/Set id
@@ -75,17 +75,17 @@ class KDE_EXPORT KAccount
* Save the settings
* If the group is empty it must be preset in the KConfig
*/
- void writeConfig( KConfig &config, const QString &group = QString::null );
+ void writeConfig( KConfig &config, const TQString &group = TQString::null );
/**
* Read the settings
* If the group is empty it must be preset in the KConfig
*/
- void readConfig( KConfig &config, const QString &group = QString::null );
+ void readConfig( KConfig &config, const TQString &group = TQString::null );
protected:
uint mId;
- QString mName;
+ TQString mName;
Type mType;
};
diff --git a/libkdepim/kaddrbook.cpp b/libkdepim/kaddrbook.cpp
index 45c34863e..ade6ef706 100644
--- a/libkdepim/kaddrbook.cpp
+++ b/libkdepim/kaddrbook.cpp
@@ -26,15 +26,15 @@
#include <dcopref.h>
#include <dcopclient.h>
-#include <qeventloop.h>
-#include <qregexp.h>
+#include <tqeventloop.h>
+#include <tqregexp.h>
#include <unistd.h>
//-----------------------------------------------------------------------------
-void KAddrBookExternal::openEmail( const QString &addr, QWidget *parent ) {
- QString email;
- QString name;
+void KAddrBookExternal::openEmail( const TQString &addr, TQWidget *parent ) {
+ TQString email;
+ TQString name;
KABC::Addressee::parseEmailAddress( addr, name, email );
@@ -49,7 +49,7 @@ void KAddrBookExternal::openEmail( const QString &addr, QWidget *parent ) {
#if KDE_IS_VERSION(3,4,89)
// This ugly hack will be removed in 4.0
while ( !ab->loadingHasFinished() ) {
- QApplication::eventLoop()->processEvents( QEventLoop::ExcludeUserInput );
+ TQApplication::eventLoop()->processEvents( TQEventLoop::ExcludeUserInput );
// use sleep here to reduce cpu usage
usleep( 100 );
@@ -69,23 +69,23 @@ void KAddrBookExternal::openEmail( const QString &addr, QWidget *parent ) {
}
DCOPRef call( "kaddressbook", "KAddressBookIface" );
- call.send( "showContactEditor(QString)", addressees.first().uid() );
+ call.send( "showContactEditor(TQString)", addressees.first().uid() );
} else {
//TODO: Enable the better message at the next string unfreeze
#if 0
- QString text = i18n("<qt>The email address <b>%1</b> cannot be "
+ TQString text = i18n("<qt>The email address <b>%1</b> cannot be "
"found in your addressbook.</qt>").arg( email );
#else
- QString text = email + " " + i18n( "is not in address book" );
+ TQString text = email + " " + i18n( "is not in address book" );
#endif
- KMessageBox::information( parent, text, QString::null, "notInAddressBook" );
+ KMessageBox::information( parent, text, TQString::null, "notInAddressBook" );
}
}
//-----------------------------------------------------------------------------
-void KAddrBookExternal::addEmail( const QString& addr, QWidget *parent) {
- QString email;
- QString name;
+void KAddrBookExternal::addEmail( const TQString& addr, TQWidget *parent) {
+ TQString email;
+ TQString name;
KABC::Addressee::parseEmailAddress( addr, name, email );
@@ -102,7 +102,7 @@ void KAddrBookExternal::addEmail( const QString& addr, QWidget *parent) {
#if KDE_IS_VERSION(3,4,89)
// This ugly hack will be removed in 4.0
while ( !ab->loadingHasFinished() ) {
- QApplication::eventLoop()->processEvents( QEventLoop::ExcludeUserInput );
+ TQApplication::eventLoop()->processEvents( TQEventLoop::ExcludeUserInput );
// use sleep here to reduce cpu usage
usleep( 100 );
@@ -121,7 +121,7 @@ void KAddrBookExternal::addEmail( const QString& addr, QWidget *parent) {
config.setGroup( "General" );
int type = config.readNumEntry( "FormattedNameType", 1 );
- QString name;
+ TQString name;
switch ( type ) {
case 1:
name = a.givenName() + " " + a.familyName();
@@ -148,32 +148,32 @@ void KAddrBookExternal::addEmail( const QString& addr, QWidget *parent) {
}
if ( KAddrBookExternal::addAddressee( a ) ) {
- QString text = i18n("<qt>The email address <b>%1</b> was added to your "
+ TQString text = i18n("<qt>The email address <b>%1</b> was added to your "
"addressbook; you can add more information to this "
"entry by opening the addressbook.</qt>").arg( addr );
- KMessageBox::information( parent, text, QString::null, "addedtokabc" );
+ KMessageBox::information( parent, text, TQString::null, "addedtokabc" );
}
} else {
- QString text = i18n("<qt>The email address <b>%1</b> is already in your "
+ TQString text = i18n("<qt>The email address <b>%1</b> is already in your "
"addressbook.</qt>").arg( addr );
- KMessageBox::information( parent, text, QString::null,
+ KMessageBox::information( parent, text, TQString::null,
"alreadyInAddressBook" );
}
ab->setErrorHandler( 0 );
}
-void KAddrBookExternal::openAddressBook(QWidget *) {
+void KAddrBookExternal::openAddressBook(TQWidget *) {
kapp->startServiceByDesktopName( "kaddressbook" );
}
-void KAddrBookExternal::addNewAddressee( QWidget* )
+void KAddrBookExternal::addNewAddressee( TQWidget* )
{
kapp->startServiceByDesktopName("kaddressbook");
DCOPRef call("kaddressbook", "KAddressBookIface");
call.send("newContact()");
}
-bool KAddrBookExternal::addVCard( const KABC::Addressee& addressee, QWidget *parent )
+bool KAddrBookExternal::addVCard( const KABC::Addressee& addressee, TQWidget *parent )
{
KABC::AddressBook *ab = KABC::StdAddressBook::self( true );
bool inserted = false;
@@ -185,14 +185,14 @@ bool KAddrBookExternal::addVCard( const KABC::Addressee& addressee, QWidget *par
if ( addressees.isEmpty() ) {
if ( KAddrBookExternal::addAddressee( addressee ) ) {
- QString text = i18n("The VCard was added to your addressbook; "
+ TQString text = i18n("The VCard was added to your addressbook; "
"you can add more information to this "
"entry by opening the addressbook.");
- KMessageBox::information( parent, text, QString::null, "addedtokabc" );
+ KMessageBox::information( parent, text, TQString::null, "addedtokabc" );
inserted = true;
}
} else {
- QString text = i18n("The VCard's primary email address is already in "
+ TQString text = i18n("The VCard's primary email address is already in "
"your addressbook; however, you may save the VCard "
"into a file and import it into the addressbook "
"manually.");
@@ -211,7 +211,7 @@ bool KAddrBookExternal::addAddressee( const KABC::Addressee& addr )
#if KDE_IS_VERSION(3,4,89)
// This ugly hack will be removed in 4.0
while ( !addressBook->loadingHasFinished() ) {
- QApplication::eventLoop()->processEvents( QEventLoop::ExcludeUserInput );
+ TQApplication::eventLoop()->processEvents( TQEventLoop::ExcludeUserInput );
// use sleep here to reduce cpu usage
usleep( 100 );
@@ -219,10 +219,10 @@ bool KAddrBookExternal::addAddressee( const KABC::Addressee& addr )
#endif
// Select a resource
- QPtrList<KABC::Resource> kabcResources = addressBook->resources();
+ TQPtrList<KABC::Resource> kabcResources = addressBook->resources();
- QPtrList<KRES::Resource> kresResources;
- QPtrListIterator<KABC::Resource> resIt( kabcResources );
+ TQPtrList<KRES::Resource> kresResources;
+ TQPtrListIterator<KABC::Resource> resIt( kabcResources );
KABC::Resource *kabcResource;
while ( ( kabcResource = resIt.current() ) != 0 ) {
++resIt;
@@ -251,12 +251,12 @@ bool KAddrBookExternal::addAddressee( const KABC::Addressee& addr )
return saved;
}
-QString KAddrBookExternal::expandDistributionList( const QString& listName )
+TQString KAddrBookExternal::expandDistributionList( const TQString& listName )
{
if ( listName.isEmpty() )
- return QString::null;
+ return TQString::null;
- const QString lowerListName = listName.lower();
+ const TQString lowerListName = listName.lower();
KABC::AddressBook *addressBook = KABC::StdAddressBook::self( true );
#ifdef KDEPIM_NEW_DISTRLISTS
KPIM::DistributionList distrList = KPIM::DistributionList::findByName( addressBook, lowerListName, false );
@@ -266,15 +266,15 @@ QString KAddrBookExternal::expandDistributionList( const QString& listName )
#else
KABC::DistributionListManager manager( addressBook );
manager.load();
- const QStringList listNames = manager.listNames();
+ const TQStringList listNames = manager.listNames();
- for ( QStringList::ConstIterator it = listNames.begin();
+ for ( TQStringList::ConstIterator it = listNames.begin();
it != listNames.end(); ++it) {
if ( (*it).lower() == lowerListName ) {
- const QStringList addressList = manager.list( *it )->emails();
+ const TQStringList addressList = manager.list( *it )->emails();
return addressList.join( ", " );
}
}
#endif
- return QString::null;
+ return TQString::null;
}
diff --git a/libkdepim/kaddrbook.h b/libkdepim/kaddrbook.h
index 7c2666e0f..32adac1b5 100644
--- a/libkdepim/kaddrbook.h
+++ b/libkdepim/kaddrbook.h
@@ -5,7 +5,7 @@
#ifndef KAddrBook_h
#define KAddrBook_h
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include <kdeversion.h>
#include <kabc/addressee.h>
@@ -15,14 +15,14 @@ class QWidget;
class KDE_EXPORT KAddrBookExternal {
public:
- static void addEmail( const QString &addr, QWidget *parent );
- static void addNewAddressee( QWidget* );
- static void openEmail( const QString &addr, QWidget *parent );
- static void openAddressBook( QWidget *parent );
+ static void addEmail( const TQString &addr, TQWidget *parent );
+ static void addNewAddressee( TQWidget* );
+ static void openEmail( const TQString &addr, TQWidget *parent );
+ static void openAddressBook( TQWidget *parent );
- static bool addVCard( const KABC::Addressee& addressee, QWidget *parent );
+ static bool addVCard( const KABC::Addressee& addressee, TQWidget *parent );
- static QString expandDistributionList( const QString& listName );
+ static TQString expandDistributionList( const TQString& listName );
private:
static bool addAddressee( const KABC::Addressee& addressee );
};
diff --git a/libkdepim/kcmdesignerfields.cpp b/libkdepim/kcmdesignerfields.cpp
index 8e18efc47..79a570ae5 100644
--- a/libkdepim/kcmdesignerfields.cpp
+++ b/libkdepim/kcmdesignerfields.cpp
@@ -22,17 +22,17 @@
#include <unistd.h>
-#include <qimage.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qobjectlist.h>
-#include <qpixmap.h>
-#include <qpushbutton.h>
-#include <qwhatsthis.h>
-#include <qgroupbox.h>
-#include <qwidgetfactory.h>
-#include <qregexp.h>
-#include <qtimer.h>
+#include <tqimage.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqobjectlist.h>
+#include <tqpixmap.h>
+#include <tqpushbutton.h>
+#include <tqwhatsthis.h>
+#include <tqgroupbox.h>
+#include <tqwidgetfactory.h>
+#include <tqregexp.h>
+#include <tqtimer.h>
#include <kaboutdata.h>
#include <kdebug.h>
@@ -56,29 +56,29 @@ using namespace KPIM;
class PageItem : public QCheckListItem
{
public:
- PageItem( QListView *parent, const QString &path )
- : QCheckListItem( parent, "", QCheckListItem::CheckBox ),
+ PageItem( TQListView *parent, const TQString &path )
+ : TQCheckListItem( parent, "", TQCheckListItem::CheckBox ),
mPath( path ), mIsActive( false )
{
mName = path.mid( path.findRev( '/' ) + 1 );
- QWidget *wdg = QWidgetFactory::create( mPath, 0, 0 );
+ TQWidget *wdg = TQWidgetFactory::create( mPath, 0, 0 );
if ( wdg ) {
setText( 0, wdg->caption() );
- QPixmap pm = QPixmap::grabWidget( wdg );
- QImage img = pm.convertToImage().smoothScale( 300, 300, QImage::ScaleMin );
+ TQPixmap pm = TQPixmap::grabWidget( wdg );
+ TQImage img = pm.convertToImage().smoothScale( 300, 300, TQImage::ScaleMin );
mPreview = img;
- QObjectList *list = wdg->queryList( "QWidget" );
- QObjectListIt it( *list );
+ TQObjectList *list = wdg->queryList( "TQWidget" );
+ TQObjectListIt it( *list );
- QMap<QString, QString> allowedTypes;
- allowedTypes.insert( "QLineEdit", i18n( "Text" ) );
- allowedTypes.insert( "QTextEdit", i18n( "Text" ) );
- allowedTypes.insert( "QSpinBox", i18n( "Numeric Value" ) );
- allowedTypes.insert( "QCheckBox", i18n( "Boolean" ) );
- allowedTypes.insert( "QComboBox", i18n( "Selection" ) );
+ TQMap<TQString, TQString> allowedTypes;
+ allowedTypes.insert( "TQLineEdit", i18n( "Text" ) );
+ allowedTypes.insert( "TQTextEdit", i18n( "Text" ) );
+ allowedTypes.insert( "TQSpinBox", i18n( "Numeric Value" ) );
+ allowedTypes.insert( "TQCheckBox", i18n( "Boolean" ) );
+ allowedTypes.insert( "TQComboBox", i18n( "Selection" ) );
allowedTypes.insert( "QDateTimeEdit", i18n( "Date & Time" ) );
allowedTypes.insert( "KLineEdit", i18n( "Text" ) );
allowedTypes.insert( "KDateTimeWidget", i18n( "Date & Time" ) );
@@ -86,12 +86,12 @@ class PageItem : public QCheckListItem
while ( it.current() ) {
if ( allowedTypes.find( it.current()->className() ) != allowedTypes.end() ) {
- QString name = it.current()->name();
+ TQString name = it.current()->name();
if ( name.startsWith( "X_" ) ) {
- new QListViewItem( this, name,
+ new TQListViewItem( this, name,
allowedTypes[ it.current()->className() ],
it.current()->className(),
- QWhatsThis::textFor( static_cast<QWidget*>( it.current() ) ) );
+ TQWhatsThis::textFor( static_cast<TQWidget*>( it.current() ) ) );
}
}
@@ -102,10 +102,10 @@ class PageItem : public QCheckListItem
}
}
- QString name() const { return mName; }
- QString path() const { return mPath; }
+ TQString name() const { return mName; }
+ TQString path() const { return mPath; }
- QPixmap preview()
+ TQPixmap preview()
{
return mPreview;
}
@@ -114,22 +114,22 @@ class PageItem : public QCheckListItem
bool isActive() const { return mIsActive; }
protected:
- void paintBranches( QPainter *p, const QColorGroup & cg, int w, int y, int h )
+ void paintBranches( TQPainter *p, const TQColorGroup & cg, int w, int y, int h )
{
- QListViewItem::paintBranches( p, cg, w, y, h );
+ TQListViewItem::paintBranches( p, cg, w, y, h );
}
private:
- QString mName;
- QString mPath;
- QPixmap mPreview;
+ TQString mName;
+ TQString mPath;
+ TQPixmap mPreview;
bool mIsActive;
};
-KCMDesignerFields::KCMDesignerFields( QWidget *parent, const char *name )
+KCMDesignerFields::KCMDesignerFields( TQWidget *parent, const char *name )
: KCModule( parent, name )
{
- QTimer::singleShot( 0, this, SLOT( delayedInit() ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( delayedInit() ) );
KAboutData *about = new KAboutData( I18N_NOOP( "KCMDesignerfields" ),
I18N_NOOP( "Qt Designer Fields Dialog" ),
@@ -147,31 +147,31 @@ void KCMDesignerFields::delayedInit()
initGUI();
- connect( mPageView, SIGNAL( selectionChanged( QListViewItem* ) ),
- this, SLOT( updatePreview( QListViewItem* ) ) );
- connect( mPageView, SIGNAL( clicked( QListViewItem* ) ),
- this, SLOT( itemClicked( QListViewItem* ) ) );
+ connect( mPageView, TQT_SIGNAL( selectionChanged( TQListViewItem* ) ),
+ this, TQT_SLOT( updatePreview( TQListViewItem* ) ) );
+ connect( mPageView, TQT_SIGNAL( clicked( TQListViewItem* ) ),
+ this, TQT_SLOT( itemClicked( TQListViewItem* ) ) );
- connect( mDeleteButton, SIGNAL( clicked() ),
- this, SLOT( deleteFile() ) );
- connect( mImportButton, SIGNAL( clicked() ),
- this, SLOT( importFile() ) );
- connect( mDesignerButton, SIGNAL( clicked() ),
- this, SLOT( startDesigner() ) );
+ connect( mDeleteButton, TQT_SIGNAL( clicked() ),
+ this, TQT_SLOT( deleteFile() ) );
+ connect( mImportButton, TQT_SIGNAL( clicked() ),
+ this, TQT_SLOT( importFile() ) );
+ connect( mDesignerButton, TQT_SIGNAL( clicked() ),
+ this, TQT_SLOT( startDesigner() ) );
load();
// Install a dirwatcher that will detect newly created or removed designer files
KDirWatch *dw = new KDirWatch( this );
dw->addDir( localUiDir(), true );
- connect( dw, SIGNAL( created(const QString&) ), SLOT( rebuildList() ) );
- connect( dw, SIGNAL( deleted(const QString&) ), SLOT( rebuildList() ) );
- connect( dw, SIGNAL( dirty(const QString&) ), SLOT( rebuildList() ) );
+ connect( dw, TQT_SIGNAL( created(const TQString&) ), TQT_SLOT( rebuildList() ) );
+ connect( dw, TQT_SIGNAL( deleted(const TQString&) ), TQT_SLOT( rebuildList() ) );
+ connect( dw, TQT_SIGNAL( dirty(const TQString&) ), TQT_SLOT( rebuildList() ) );
}
void KCMDesignerFields::deleteFile()
{
- QListViewItem *item = mPageView->selectedItem();
+ TQListViewItem *item = mPageView->selectedItem();
if ( item ) {
PageItem *pageItem = static_cast<PageItem*>( item->parent() ? item->parent() : item );
if (KMessageBox::warningContinueCancel(this,
@@ -184,7 +184,7 @@ void KCMDesignerFields::deleteFile()
void KCMDesignerFields::importFile()
{
- KURL src = KFileDialog::getOpenFileName( QDir::homeDirPath(), i18n("*.ui|Designer Files"),
+ KURL src = KFileDialog::getOpenFileName( TQDir::homeDirPath(), i18n("*.ui|Designer Files"),
this, i18n("Import Page") );
KURL dest = localUiDir();
dest.setFileName(src.fileName());
@@ -195,24 +195,24 @@ void KCMDesignerFields::importFile()
void KCMDesignerFields::loadUiFiles()
{
- QStringList list = KGlobal::dirs()->findAllResources( "data", uiPath() + "/*.ui", true, true );
- for ( QStringList::iterator it = list.begin(); it != list.end(); ++it ) {
+ TQStringList list = KGlobal::dirs()->findAllResources( "data", uiPath() + "/*.ui", true, true );
+ for ( TQStringList::iterator it = list.begin(); it != list.end(); ++it ) {
new PageItem( mPageView, *it );
}
}
void KCMDesignerFields::rebuildList()
{
- QStringList ai = saveActivePages();
+ TQStringList ai = saveActivePages();
updatePreview( 0 );
mPageView->clear();
loadUiFiles();
loadActivePages(ai);
}
-void KCMDesignerFields::loadActivePages(const QStringList& ai)
+void KCMDesignerFields::loadActivePages(const TQStringList& ai)
{
- QListViewItemIterator it( mPageView );
+ TQListViewItemIterator it( mPageView );
while ( it.current() ) {
if ( it.current()->parent() == 0 ) {
PageItem *item = static_cast<PageItem*>( it.current() );
@@ -231,12 +231,12 @@ void KCMDesignerFields::load()
loadActivePages( readActivePages() );
}
-QStringList KCMDesignerFields::saveActivePages()
+TQStringList KCMDesignerFields::saveActivePages()
{
- QListViewItemIterator it( mPageView, QListViewItemIterator::Checked |
- QListViewItemIterator::Selectable );
+ TQListViewItemIterator it( mPageView, TQListViewItemIterator::Checked |
+ TQListViewItemIterator::Selectable );
- QStringList activePages;
+ TQStringList activePages;
while ( it.current() ) {
if ( it.current()->parent() == 0 ) {
PageItem *item = static_cast<PageItem*>( it.current() );
@@ -260,21 +260,21 @@ void KCMDesignerFields::defaults()
void KCMDesignerFields::initGUI()
{
- QVBoxLayout *layout = new QVBoxLayout( this, KDialog::marginHint(),
+ TQVBoxLayout *layout = new TQVBoxLayout( this, KDialog::marginHint(),
KDialog::spacingHint() );
bool noDesigner = KStandardDirs::findExe("designer").isEmpty();
if ( noDesigner )
{
- QString txt =
+ TQString txt =
i18n("<qt><b>Warning:</b> Qt Designer could not be found. It is probably not "
"installed. You will only be able to import existing designer files.</qt>");
- QLabel *lbl = new QLabel( txt, this );
+ TQLabel *lbl = new TQLabel( txt, this );
layout->addWidget( lbl );
}
- QHBoxLayout *hbox = new QHBoxLayout( layout, KDialog::spacingHint() );
+ TQHBoxLayout *hbox = new TQHBoxLayout( layout, KDialog::spacingHint() );
mPageView = new KListView( this );
mPageView->addColumn( i18n( "Available Pages" ) );
@@ -283,20 +283,20 @@ void KCMDesignerFields::initGUI()
mPageView->setFullWidth( true );
hbox->addWidget( mPageView );
- QGroupBox *box = new QGroupBox(1, Qt::Horizontal, i18n("Preview of Selected Page"), this );
+ TQGroupBox *box = new TQGroupBox(1, Qt::Horizontal, i18n("Preview of Selected Page"), this );
- mPagePreview = new QLabel( box );
+ mPagePreview = new TQLabel( box );
mPagePreview->setMinimumWidth( 300 );
- mPageDetails = new QLabel( box );
+ mPageDetails = new TQLabel( box );
hbox->addWidget( box );
loadUiFiles();
- hbox = new QHBoxLayout( layout, KDialog::spacingHint() );
+ hbox = new TQHBoxLayout( layout, KDialog::spacingHint() );
- QString cwHowto = i18n("<qt><p>This section allows you to add your own GUI"
+ TQString cwHowto = i18n("<qt><p>This section allows you to add your own GUI"
" Elements ('<i>Widgets</i>') to store your own values"
" into %1. Proceed as described below:</p>"
"<ol>"
@@ -322,16 +322,16 @@ void KCMDesignerFields::initGUI()
hbox->addWidget( activeLabel );
// ### why is this needed? Looks like a KActiveLabel bug...
- activeLabel->setSizePolicy( QSizePolicy::Preferred, QSizePolicy::Maximum );
+ activeLabel->setSizePolicy( TQSizePolicy::Preferred, TQSizePolicy::Maximum );
hbox->addStretch( 1 );
- mDeleteButton = new QPushButton( i18n( "Delete Page" ), this);
+ mDeleteButton = new TQPushButton( i18n( "Delete Page" ), this);
mDeleteButton->setEnabled( false );
hbox->addWidget( mDeleteButton );
- mImportButton = new QPushButton( i18n( "Import Page..." ), this);
+ mImportButton = new TQPushButton( i18n( "Import Page..." ), this);
hbox->addWidget( mImportButton );
- mDesignerButton = new QPushButton( i18n( "Edit with Qt Designer..." ), this );
+ mDesignerButton = new TQPushButton( i18n( "Edit with Qt Designer..." ), this );
hbox->addWidget( mDesignerButton );
if ( noDesigner )
@@ -347,13 +347,13 @@ void KCMDesignerFields::initGUI()
mDesignerButton->show();
}
-void KCMDesignerFields::updatePreview( QListViewItem *item )
+void KCMDesignerFields::updatePreview( TQListViewItem *item )
{
bool widgetItemSelected = false;
if ( item ) {
if ( item->parent() ) {
- QString details = QString( "<qt><table>"
+ TQString details = TQString( "<qt><table>"
"<tr><td align=\"right\"><b>%1</b></td><td>%2</td></tr>"
"<tr><td align=\"right\"><b>%3</b></td><td>%4</td></tr>"
"<tr><td align=\"right\"><b>%5</b></td><td>%6</td></tr>"
@@ -373,7 +373,7 @@ void KCMDesignerFields::updatePreview( QListViewItem *item )
PageItem *pageItem = static_cast<PageItem*>( item->parent() );
mPagePreview->setPixmap( pageItem->preview() );
} else {
- mPageDetails->setText( QString::null );
+ mPageDetails->setText( TQString::null );
PageItem *pageItem = static_cast<PageItem*>( item );
mPagePreview->setPixmap( pageItem->preview() );
@@ -381,17 +381,17 @@ void KCMDesignerFields::updatePreview( QListViewItem *item )
widgetItemSelected = true;
}
- mPagePreview->setFrameStyle( QFrame::Panel | QFrame::Sunken );
+ mPagePreview->setFrameStyle( TQFrame::Panel | TQFrame::Sunken );
} else {
- mPagePreview->setPixmap( QPixmap() );
+ mPagePreview->setPixmap( TQPixmap() );
mPagePreview->setFrameStyle( 0 );
- mPageDetails->setText( QString::null );
+ mPageDetails->setText( TQString::null );
}
mDeleteButton->setEnabled( widgetItemSelected );
}
-void KCMDesignerFields::itemClicked( QListViewItem *item )
+void KCMDesignerFields::itemClicked( TQListViewItem *item )
{
if ( !item || item->parent() != 0 )
return;
@@ -406,10 +406,10 @@ void KCMDesignerFields::itemClicked( QListViewItem *item )
void KCMDesignerFields::startDesigner()
{
- QString cmdLine = "designer";
+ TQString cmdLine = "designer";
// check if path exists and create one if not.
- QString cepPath = localUiDir();
+ TQString cepPath = localUiDir();
if( !KGlobal::dirs()->exists(cepPath) ) {
KIO::NetAccess::mkdir( cepPath, this );
}
@@ -417,7 +417,7 @@ void KCMDesignerFields::startDesigner()
// finally jump there
chdir(cepPath.local8Bit());
- QListViewItem *item = mPageView->selectedItem();
+ TQListViewItem *item = mPageView->selectedItem();
if ( item ) {
PageItem *pageItem = static_cast<PageItem*>( item->parent() ? item->parent() : item );
cmdLine += " " + KProcess::quote( pageItem->path() );
diff --git a/libkdepim/kcmdesignerfields.h b/libkdepim/kcmdesignerfields.h
index 20036a8ec..98c54b5c3 100644
--- a/libkdepim/kcmdesignerfields.h
+++ b/libkdepim/kcmdesignerfields.h
@@ -38,7 +38,7 @@ class KDE_EXPORT KCMDesignerFields : public KCModule
Q_OBJECT
public:
- KCMDesignerFields( QWidget *parent = 0, const char *name = 0 );
+ KCMDesignerFields( TQWidget *parent = 0, const char *name = 0 );
virtual void load();
virtual void save();
@@ -46,18 +46,18 @@ class KDE_EXPORT KCMDesignerFields : public KCModule
protected:
void loadUiFiles();
- void loadActivePages(const QStringList&);
- QStringList saveActivePages();
+ void loadActivePages(const TQStringList&);
+ TQStringList saveActivePages();
- virtual QString localUiDir() = 0;
- virtual QString uiPath() = 0;
- virtual void writeActivePages( const QStringList & ) = 0;
- virtual QStringList readActivePages() = 0;
- virtual QString applicationName() = 0;
+ virtual TQString localUiDir() = 0;
+ virtual TQString uiPath() = 0;
+ virtual void writeActivePages( const TQStringList & ) = 0;
+ virtual TQStringList readActivePages() = 0;
+ virtual TQString applicationName() = 0;
private slots:
- void updatePreview( QListViewItem* );
- void itemClicked( QListViewItem* );
+ void updatePreview( TQListViewItem* );
+ void itemClicked( TQListViewItem* );
void startDesigner();
void rebuildList();
void deleteFile();
@@ -68,11 +68,11 @@ class KDE_EXPORT KCMDesignerFields : public KCModule
void initGUI();
KListView *mPageView;
- QLabel *mPagePreview;
- QLabel *mPageDetails;
- QPushButton *mDeleteButton;
- QPushButton *mImportButton;
- QPushButton *mDesignerButton;
+ TQLabel *mPagePreview;
+ TQLabel *mPageDetails;
+ TQPushButton *mDeleteButton;
+ TQPushButton *mImportButton;
+ TQPushButton *mDesignerButton;
};
}
diff --git a/libkdepim/kconfigpropagator.cpp b/libkdepim/kconfigpropagator.cpp
index 81615b06e..0f59c2a00 100644
--- a/libkdepim/kconfigpropagator.cpp
+++ b/libkdepim/kconfigpropagator.cpp
@@ -28,8 +28,8 @@
#include <kstringhandler.h>
#include <klocale.h>
-#include <qfile.h>
-#include <qstringlist.h>
+#include <tqfile.h>
+#include <tqstringlist.h>
KConfigPropagator::Change::~Change()
{
@@ -41,12 +41,12 @@ KConfigPropagator::ChangeConfig::ChangeConfig()
{
}
-QString KConfigPropagator::ChangeConfig::arg1() const
+TQString KConfigPropagator::ChangeConfig::arg1() const
{
return file + "/" + group + "/" + name;
}
-QString KConfigPropagator::ChangeConfig::arg2() const
+TQString KConfigPropagator::ChangeConfig::arg2() const
{
if ( hideValue ) return "*";
else return value;
@@ -68,7 +68,7 @@ KConfigPropagator::KConfigPropagator()
}
KConfigPropagator::KConfigPropagator( KConfigSkeleton *skeleton,
- const QString &kcfgFile )
+ const TQString &kcfgFile )
: mSkeleton( skeleton ), mKcfgFile( kcfgFile )
{
init();
@@ -83,15 +83,15 @@ void KConfigPropagator::init()
void KConfigPropagator::readKcfgFile()
{
- QString filename = locate( "kcfg", mKcfgFile );
+ TQString filename = locate( "kcfg", mKcfgFile );
if ( filename.isEmpty() ) {
kdError() << "Unable to find kcfg file '" << mKcfgFile << "'" << endl;
return;
}
- QFile input( filename );
- QDomDocument doc;
- QString errorMsg;
+ TQFile input( filename );
+ TQDomDocument doc;
+ TQString errorMsg;
int errorRow;
int errorCol;
if ( !doc.setContent( &input, &errorMsg, &errorRow, &errorCol ) ) {
@@ -99,7 +99,7 @@ void KConfigPropagator::readKcfgFile()
return;
}
- QDomElement cfgElement = doc.documentElement();
+ TQDomElement cfgElement = doc.documentElement();
if ( cfgElement.isNull() ) {
kdError() << "No document in kcfg file" << endl;
@@ -108,20 +108,20 @@ void KConfigPropagator::readKcfgFile()
mRules.clear();
- 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 == "propagation" ) {
Rule rule = parsePropagation( e );
mRules.append( rule );
} else if ( tag == "condition" ) {
Condition condition = parseCondition( e );
- QDomNode n2;
+ TQDomNode n2;
for( n2 = e.firstChild(); !n2.isNull(); n2 = n2.nextSibling() ) {
- QDomElement e2 = n2.toElement();
+ TQDomElement e2 = n2.toElement();
if ( e2.tagName() == "propagation" ) {
Rule rule = parsePropagation( e2 );
rule.condition = condition;
@@ -134,14 +134,14 @@ void KConfigPropagator::readKcfgFile()
}
}
-KConfigPropagator::Rule KConfigPropagator::parsePropagation( const QDomElement &e )
+KConfigPropagator::Rule KConfigPropagator::parsePropagation( const TQDomElement &e )
{
Rule r;
- QString source = e.attribute( "source" );
+ TQString source = e.attribute( "source" );
parseConfigEntryPath( source, r.sourceFile, r.sourceGroup, r.sourceEntry );
- QString target = e.attribute( "target" );
+ TQString target = e.attribute( "target" );
parseConfigEntryPath( target, r.targetFile, r.targetGroup, r.targetEntry );
r.hideValue = e.hasAttribute( "hidevalue" ) &&
@@ -150,18 +150,18 @@ KConfigPropagator::Rule KConfigPropagator::parsePropagation( const QDomElement &
return r;
}
-void KConfigPropagator::parseConfigEntryPath( const QString &path,
- QString &file,
- QString &group,
- QString &entry )
+void KConfigPropagator::parseConfigEntryPath( const TQString &path,
+ TQString &file,
+ TQString &group,
+ TQString &entry )
{
- QStringList p = QStringList::split( "/", path );
+ TQStringList p = TQStringList::split( "/", path );
if ( p.count() != 3 ) {
kdError() << "Path has to be of form file/group/entry" << endl;
- file = QString::null;
- group = QString::null;
- entry = QString::null;
+ file = TQString::null;
+ group = TQString::null;
+ entry = TQString::null;
return;
}
@@ -172,11 +172,11 @@ void KConfigPropagator::parseConfigEntryPath( const QString &path,
return;
}
-KConfigPropagator::Condition KConfigPropagator::parseCondition( const QDomElement &e )
+KConfigPropagator::Condition KConfigPropagator::parseCondition( const TQDomElement &e )
{
Condition c;
- QString key = e.attribute( "key" );
+ TQString key = e.attribute( "key" );
parseConfigEntryPath( key, c.file, c.group, c.key );
@@ -197,8 +197,8 @@ void KConfigPropagator::commit()
}
}
-KConfigSkeletonItem *KConfigPropagator::findItem( const QString &group,
- const QString &name )
+KConfigSkeletonItem *KConfigPropagator::findItem( const TQString &group,
+ const TQString &name )
{
// kdDebug() << "KConfigPropagator::findItem()" << endl;
@@ -217,11 +217,11 @@ KConfigSkeletonItem *KConfigPropagator::findItem( const QString &group,
else return *it;
}
-QString KConfigPropagator::itemValueAsString( KConfigSkeletonItem *item )
+TQString KConfigPropagator::itemValueAsString( KConfigSkeletonItem *item )
{
- QVariant p = item->property();
+ TQVariant p = item->property();
- if ( p.type() == QVariant::Bool ) {
+ if ( p.type() == TQVariant::Bool ) {
if ( p.toBool() ) return "true";
else return "false";
}
@@ -243,7 +243,7 @@ void KConfigPropagator::updateChanges()
if ( !item ) {
kdError() << " Item not found." << endl;
} else {
- QString value = itemValueAsString( item );
+ TQString value = itemValueAsString( item );
kdDebug() << " Value: " << value << endl;
if ( value != c.value ) {
continue;
@@ -257,11 +257,11 @@ void KConfigPropagator::updateChanges()
<< " not found." << endl;
continue;
}
- QString value = itemValueAsString( item );
+ TQString value = itemValueAsString( item );
KConfig target( r.targetFile );
target.setGroup( r.targetGroup );
- QString targetValue = target.readEntry( r.targetEntry );
+ TQString targetValue = target.readEntry( r.targetEntry );
if ( r.hideValue ) targetValue = KStringHandler::obscure( targetValue );
if ( targetValue != value ) {
ChangeConfig *change = new ChangeConfig();
diff --git a/libkdepim/kconfigpropagator.h b/libkdepim/kconfigpropagator.h
index 7c5c92cc5..9b3c1a6f6 100644
--- a/libkdepim/kconfigpropagator.h
+++ b/libkdepim/kconfigpropagator.h
@@ -21,10 +21,10 @@
#ifndef KCONFIGPROPAGATOR_H
#define KCONFIGPROPAGATOR_H
-#include <qstring.h>
-#include <qvaluelist.h>
-#include <qdom.h>
-#include <qptrlist.h>
+#include <tqstring.h>
+#include <tqvaluelist.h>
+#include <tqdom.h>
+#include <tqptrlist.h>
#include <kdepimmacros.h>
@@ -45,7 +45,7 @@ class KDE_EXPORT KConfigPropagator
@param skeleton KConfigSkeleton object used as source for the propagation
@param kcfgFile file name of kcfg file containing the propagation rules
*/
- KConfigPropagator( KConfigSkeleton *skeleton, const QString &kcfgFile );
+ KConfigPropagator( KConfigSkeleton *skeleton, const TQString &kcfgFile );
virtual ~KConfigPropagator() {}
KConfigSkeleton *skeleton() { return mSkeleton; }
@@ -60,10 +60,10 @@ class KDE_EXPORT KConfigPropagator
public:
Condition() : isValid( false ) {}
- QString file;
- QString group;
- QString key;
- QString value;
+ TQString file;
+ TQString group;
+ TQString key;
+ TQString value;
bool isValid;
};
@@ -71,17 +71,17 @@ class KDE_EXPORT KConfigPropagator
class KDE_EXPORT Rule
{
public:
- typedef QValueList<Rule> List;
+ typedef TQValueList<Rule> List;
Rule() : hideValue( false ) {}
- QString sourceFile;
- QString sourceGroup;
- QString sourceEntry;
+ TQString sourceFile;
+ TQString sourceGroup;
+ TQString sourceEntry;
- QString targetFile;
- QString targetGroup;
- QString targetEntry;
+ TQString targetFile;
+ TQString targetGroup;
+ TQString targetEntry;
Condition condition;
@@ -91,21 +91,21 @@ class KDE_EXPORT KConfigPropagator
class KDE_EXPORT Change
{
public:
- typedef QPtrList<Change> List;
+ typedef TQPtrList<Change> List;
- Change( const QString &title ) : mTitle( title ) {}
+ Change( const TQString &title ) : mTitle( title ) {}
virtual ~Change();
- void setTitle( const QString &title ) { mTitle = title; }
- QString title() const { return mTitle; }
+ void setTitle( const TQString &title ) { mTitle = title; }
+ TQString title() const { return mTitle; }
- virtual QString arg1() const { return QString::null; }
- virtual QString arg2() const { return QString::null; }
+ virtual TQString arg1() const { return TQString::null; }
+ virtual TQString arg2() const { return TQString::null; }
virtual void apply() = 0;
private:
- QString mTitle;
+ TQString mTitle;
};
class KDE_EXPORT ChangeConfig : public Change
@@ -114,16 +114,16 @@ class KDE_EXPORT KConfigPropagator
ChangeConfig();
~ChangeConfig() {}
- QString arg1() const;
- QString arg2() const;
+ TQString arg1() const;
+ TQString arg2() const;
void apply();
- QString file;
- QString group;
- QString name;
- QString label;
- QString value;
+ TQString file;
+ TQString group;
+ TQString name;
+ TQString label;
+ TQString value;
bool hideValue;
};
@@ -142,21 +142,21 @@ class KDE_EXPORT KConfigPropagator
*/
virtual void addCustomChanges( Change::List & ) {}
- KConfigSkeletonItem *findItem( const QString &group, const QString &name );
+ KConfigSkeletonItem *findItem( const TQString &group, const TQString &name );
- QString itemValueAsString( KConfigSkeletonItem * );
+ TQString itemValueAsString( KConfigSkeletonItem * );
void readKcfgFile();
- Rule parsePropagation( const QDomElement &e );
- Condition parseCondition( const QDomElement &e );
+ Rule parsePropagation( const TQDomElement &e );
+ Condition parseCondition( const TQDomElement &e );
- void parseConfigEntryPath( const QString &path, QString &file,
- QString &group, QString &entry );
+ void parseConfigEntryPath( const TQString &path, TQString &file,
+ TQString &group, TQString &entry );
private:
KConfigSkeleton *mSkeleton;
- QString mKcfgFile;
+ TQString mKcfgFile;
Rule::List mRules;
Change::List mChanges;
diff --git a/libkdepim/kconfigwizard.cpp b/libkdepim/kconfigwizard.cpp
index 3e0a18b10..6db0f9992 100644
--- a/libkdepim/kconfigwizard.cpp
+++ b/libkdepim/kconfigwizard.cpp
@@ -27,11 +27,11 @@
#include <kmessagebox.h>
#include <kapplication.h>
-#include <qlistview.h>
-#include <qlayout.h>
-#include <qtimer.h>
+#include <tqlistview.h>
+#include <tqlayout.h>
+#include <tqtimer.h>
-KConfigWizard::KConfigWizard( QWidget *parent,
+KConfigWizard::KConfigWizard( TQWidget *parent,
char *name, bool modal )
: KDialogBase( TreeList, i18n("Configuration Wizard"), Ok|Cancel, Ok, parent,
name, modal ),
@@ -40,7 +40,7 @@ KConfigWizard::KConfigWizard( QWidget *parent,
init();
}
-KConfigWizard::KConfigWizard( KConfigPropagator *propagator, QWidget *parent,
+KConfigWizard::KConfigWizard( KConfigPropagator *propagator, TQWidget *parent,
char *name, bool modal )
: KDialogBase( TreeList, i18n("Configuration Wizard"), Ok|Cancel, Ok, parent,
name, modal ),
@@ -56,10 +56,10 @@ KConfigWizard::~KConfigWizard()
void KConfigWizard::init()
{
- connect( this, SIGNAL( aboutToShowPage( QWidget * ) ),
- SLOT( slotAboutToShowPage( QWidget * ) ) );
+ connect( this, TQT_SIGNAL( aboutToShowPage( TQWidget * ) ),
+ TQT_SLOT( slotAboutToShowPage( TQWidget * ) ) );
- QTimer::singleShot( 0, this, SLOT( readConfig() ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( readConfig() ) );
}
void KConfigWizard::setPropagator( KConfigPropagator *p )
@@ -67,24 +67,24 @@ void KConfigWizard::setPropagator( KConfigPropagator *p )
mPropagator = p;
}
-void KConfigWizard::slotAboutToShowPage( QWidget *page )
+void KConfigWizard::slotAboutToShowPage( TQWidget *page )
{
if ( page == mChangesPage ) {
updateChanges();
}
}
-QFrame *KConfigWizard::createWizardPage( const QString &title )
+TQFrame *KConfigWizard::createWizardPage( const TQString &title )
{
return addPage( title );
}
void KConfigWizard::setupRulesPage()
{
- QFrame *topFrame = addPage( i18n("Rules") );
- QVBoxLayout *topLayout = new QVBoxLayout( topFrame );
+ TQFrame *topFrame = addPage( i18n("Rules") );
+ TQVBoxLayout *topLayout = new TQVBoxLayout( topFrame );
- mRuleView = new QListView( topFrame );
+ mRuleView = new TQListView( topFrame );
topLayout->addWidget( mRuleView );
mRuleView->addColumn( i18n("Source") );
@@ -107,25 +107,25 @@ void KConfigWizard::updateRules()
KConfigPropagator::Rule::List::ConstIterator it;
for( it = rules.begin(); it != rules.end(); ++it ) {
KConfigPropagator::Rule r = *it;
- QString source = r.sourceFile + "/" + r.sourceGroup + "/" +
+ TQString source = r.sourceFile + "/" + r.sourceGroup + "/" +
r.sourceEntry;
- QString target = r.targetFile + "/" + r.targetGroup + "/" +
+ TQString target = r.targetFile + "/" + r.targetGroup + "/" +
r.targetEntry;
- QString condition;
+ TQString condition;
KConfigPropagator::Condition c = r.condition;
if ( c.isValid ) {
condition = c.file + "/" + c.group + "/" + c.key + " = " + c.value;
}
- new QListViewItem( mRuleView, source, target, condition );
+ new TQListViewItem( mRuleView, source, target, condition );
}
}
void KConfigWizard::setupChangesPage()
{
- QFrame *topFrame = addPage( i18n("Changes") );
- QVBoxLayout *topLayout = new QVBoxLayout( topFrame );
+ TQFrame *topFrame = addPage( i18n("Changes") );
+ TQVBoxLayout *topLayout = new TQVBoxLayout( topFrame );
- mChangeView = new QListView( topFrame );
+ mChangeView = new TQListView( topFrame );
topLayout->addWidget( mChangeView );
mChangeView->addColumn( i18n("Action") );
@@ -154,7 +154,7 @@ void KConfigWizard::updateChanges()
KConfigPropagator::Change::List changes = mPropagator->changes();
KConfigPropagator::Change *c;
for( c = changes.first(); c; c = changes.next() ) {
- new QListViewItem( mChangeView, mChangeView->lastItem(), c->title(), c->arg1(), c->arg2() );
+ new TQListViewItem( mChangeView, mChangeView->lastItem(), c->title(), c->arg1(), c->arg2() );
}
}
@@ -174,7 +174,7 @@ void KConfigWizard::readConfig()
void KConfigWizard::slotOk()
{
- QString error = validate();
+ TQString error = validate();
if ( error.isNull() ) {
usrWriteConfig();
diff --git a/libkdepim/kconfigwizard.h b/libkdepim/kconfigwizard.h
index 293c7b9a0..23dfb9ee8 100644
--- a/libkdepim/kconfigwizard.h
+++ b/libkdepim/kconfigwizard.h
@@ -37,12 +37,12 @@ class KDE_EXPORT KConfigWizard : public KDialogBase
/**
Create wizard. You have to set a propgator with setPropagator() later.
*/
- KConfigWizard( QWidget *parent = 0, char *name = 0, bool modal = false );
+ KConfigWizard( TQWidget *parent = 0, char *name = 0, bool modal = false );
/**
Create wizard for given KConfigPropagator. The wizard takes ownership of
the propagator.
*/
- KConfigWizard( KConfigPropagator *propagator, QWidget *parent = 0,
+ KConfigWizard( KConfigPropagator *propagator, TQWidget *parent = 0,
char *name = 0, bool modal = false );
/**
Destructor.
@@ -61,7 +61,7 @@ class KDE_EXPORT KConfigWizard : public KDialogBase
/**
Create wizard page with given title.
*/
- QFrame *createWizardPage( const QString &title );
+ TQFrame *createWizardPage( const TQString &title );
/**
Use this function to read the configuration from the KConfigSkeleton
@@ -78,16 +78,16 @@ class KDE_EXPORT KConfigWizard : public KDialogBase
/**
Validates the supplied data. Returns a appropiate error when some data
- is invalid. Return QString::null if all data is valid.
+ is invalid. Return TQString::null if all data is valid.
*/
- virtual QString validate() { return QString::null; }
+ virtual TQString validate() { return TQString::null; }
protected slots:
void readConfig();
void slotOk();
- void slotAboutToShowPage( QWidget *page );
+ void slotAboutToShowPage( TQWidget *page );
protected:
void init();
@@ -100,10 +100,10 @@ class KDE_EXPORT KConfigWizard : public KDialogBase
private:
KConfigPropagator *mPropagator;
- QListView *mRuleView;
- QListView *mChangeView;
+ TQListView *mRuleView;
+ TQListView *mChangeView;
- QWidget *mChangesPage;
+ TQWidget *mChangesPage;
};
#endif
diff --git a/libkdepim/kdateedit.cpp b/libkdepim/kdateedit.cpp
index 29b65279d..1791d4dab 100644
--- a/libkdepim/kdateedit.cpp
+++ b/libkdepim/kdateedit.cpp
@@ -22,10 +22,10 @@
Boston, MA 02110-1301, USA.
*/
-#include <qapplication.h>
-#include <qlineedit.h>
-#include <qlistbox.h>
-#include <qvalidator.h>
+#include <tqapplication.h>
+#include <tqlineedit.h>
+#include <tqlistbox.h>
+#include <tqvalidator.h>
#include <kcalendarsystem.h>
#include <kglobal.h>
@@ -37,11 +37,11 @@
class DateValidator : public QValidator
{
public:
- DateValidator( const QStringList &keywords, QWidget* parent, const char* name = 0 )
- : QValidator( parent, name ), mKeywords( keywords )
+ DateValidator( const TQStringList &keywords, TQWidget* parent, const char* name = 0 )
+ : TQValidator( parent, name ), mKeywords( keywords )
{}
- virtual State validate( QString &str, int& ) const
+ virtual State validate( TQString &str, int& ) const
{
int length = str.length();
@@ -61,36 +61,36 @@ class DateValidator : public QValidator
}
private:
- QStringList mKeywords;
+ TQStringList mKeywords;
};
-KDateEdit::KDateEdit( QWidget *parent, const char *name )
- : QComboBox( true, parent, name ),
+KDateEdit::KDateEdit( TQWidget *parent, const char *name )
+ : TQComboBox( true, parent, name ),
mReadOnly( false ),
mDiscardNextMousePress( false )
{
// need at least one entry for popup to work
setMaxCount( 1 );
- mDate = QDate::currentDate();
- QString today = KGlobal::locale()->formatDate( mDate, true );
+ mDate = TQDate::currentDate();
+ TQString today = KGlobal::locale()->formatDate( mDate, true );
insertItem( today );
setCurrentItem( 0 );
changeItem( today, 0 );
setMinimumSize( sizeHint() );
- connect( lineEdit(), SIGNAL( returnPressed() ),
- this, SLOT( lineEnterPressed() ) );
- connect( this, SIGNAL( textChanged( const QString& ) ),
- SLOT( slotTextChanged( const QString& ) ) );
+ connect( lineEdit(), TQT_SIGNAL( returnPressed() ),
+ this, TQT_SLOT( lineEnterPressed() ) );
+ connect( this, TQT_SIGNAL( textChanged( const TQString& ) ),
+ TQT_SLOT( slotTextChanged( const TQString& ) ) );
mPopup = new KDatePickerPopup( KDatePickerPopup::DatePicker | KDatePickerPopup::Words );
mPopup->hide();
mPopup->installEventFilter( this );
- connect( mPopup, SIGNAL( dateChanged( QDate ) ),
- SLOT( dateSelected( QDate ) ) );
+ connect( mPopup, TQT_SIGNAL( dateChanged( TQDate ) ),
+ TQT_SLOT( dateSelected( TQDate ) ) );
// handle keyword entry
setupKeywords();
@@ -107,13 +107,13 @@ KDateEdit::~KDateEdit()
mPopup = 0;
}
-void KDateEdit::setDate( const QDate& date )
+void KDateEdit::setDate( const TQDate& date )
{
assignDate( date );
updateView();
}
-QDate KDateEdit::date() const
+TQDate KDateEdit::date() const
{
return mDate;
}
@@ -134,9 +134,9 @@ void KDateEdit::popup()
if ( mReadOnly )
return;
- QRect desk = KGlobalSettings::desktopGeometry( this );
+ TQRect desk = KGlobalSettings::desktopGeometry( this );
- QPoint popupPoint = mapToGlobal( QPoint( 0,0 ) );
+ TQPoint popupPoint = mapToGlobal( TQPoint( 0,0 ) );
int dateFrameHeight = mPopup->sizeHint().height();
if ( popupPoint.y() + height() + dateFrameHeight > desk.bottom() )
@@ -157,26 +157,26 @@ void KDateEdit::popup()
if ( mDate.isValid() )
mPopup->setDate( mDate );
else
- mPopup->setDate( QDate::currentDate() );
+ mPopup->setDate( TQDate::currentDate() );
mPopup->popup( popupPoint );
// The combo box is now shown pressed. Make it show not pressed again
// by causing its (invisible) list box to emit a 'selected' signal.
// First, ensure that the list box contains the date currently displayed.
- QDate date = parseDate();
+ TQDate date = parseDate();
assignDate( date );
updateView();
// Now, simulate an Enter to unpress it
- QListBox *lb = listBox();
+ TQListBox *lb = listBox();
if (lb) {
lb->setCurrentItem(0);
- QKeyEvent* keyEvent = new QKeyEvent(QEvent::KeyPress, Qt::Key_Enter, 0, 0);
- QApplication::postEvent(lb, keyEvent);
+ TQKeyEvent* keyEvent = new TQKeyEvent(TQEvent::KeyPress, Qt::Key_Enter, 0, 0);
+ TQApplication::postEvent(lb, keyEvent);
}
}
-void KDateEdit::dateSelected( QDate date )
+void KDateEdit::dateSelected( TQDate date )
{
if (assignDate( date ) ) {
updateView();
@@ -193,7 +193,7 @@ void KDateEdit::lineEnterPressed()
{
bool replaced = false;
- QDate date = parseDate( &replaced );
+ TQDate date = parseDate( &replaced );
if (assignDate( date ) ) {
if ( replaced )
@@ -204,18 +204,18 @@ void KDateEdit::lineEnterPressed()
}
}
-QDate KDateEdit::parseDate( bool *replaced ) const
+TQDate KDateEdit::parseDate( bool *replaced ) const
{
- QString text = currentText();
- QDate result;
+ TQString text = currentText();
+ TQDate result;
if ( replaced )
(*replaced) = false;
if ( text.isEmpty() )
- result = QDate();
+ result = TQDate();
else if ( mKeywordMap.contains( text.lower() ) ) {
- QDate today = QDate::currentDate();
+ TQDate today = TQDate::currentDate();
int i = mKeywordMap[ text.lower() ];
if ( i >= 100 ) {
/* A day name has been entered. Convert to offset from today.
@@ -244,17 +244,17 @@ QDate KDateEdit::parseDate( bool *replaced ) const
return result;
}
-bool KDateEdit::eventFilter( QObject *object, QEvent *event )
+bool KDateEdit::eventFilter( TQObject *object, TQEvent *event )
{
if ( object == lineEdit() ) {
// We only process the focus out event if the text has changed
// since we got focus
- if ( (event->type() == QEvent::FocusOut) && mTextChanged ) {
+ if ( (event->type() == TQEvent::FocusOut) && mTextChanged ) {
lineEnterPressed();
mTextChanged = false;
- } else if ( event->type() == QEvent::KeyPress ) {
+ } else if ( event->type() == TQEvent::KeyPress ) {
// Up and down arrow keys step the date
- QKeyEvent* keyEvent = (QKeyEvent*)event;
+ TQKeyEvent* keyEvent = (TQKeyEvent*)event;
if ( keyEvent->key() == Qt::Key_Return ) {
lineEnterPressed();
@@ -268,7 +268,7 @@ bool KDateEdit::eventFilter( QObject *object, QEvent *event )
step = -1;
// TODO: If it's not an input key, but something like Return, Enter, Tab, etc..., don't eat the keypress, but handle it through to the default eventfilter!
if ( step && !mReadOnly ) {
- QDate date = parseDate();
+ TQDate date = parseDate();
if ( date.isValid() ) {
date = date.addDays( step );
if ( assignDate( date ) ) {
@@ -283,12 +283,12 @@ bool KDateEdit::eventFilter( QObject *object, QEvent *event )
} else {
// It's a date picker event
switch ( event->type() ) {
- case QEvent::MouseButtonDblClick:
- case QEvent::MouseButtonPress: {
- QMouseEvent *mouseEvent = (QMouseEvent*)event;
+ case TQEvent::MouseButtonDblClick:
+ case TQEvent::MouseButtonPress: {
+ TQMouseEvent *mouseEvent = (TQMouseEvent*)event;
if ( !mPopup->rect().contains( mouseEvent->pos() ) ) {
- QPoint globalPos = mPopup->mapToGlobal( mouseEvent->pos() );
- if ( QApplication::widgetAt( globalPos, true ) == this ) {
+ TQPoint globalPos = mPopup->mapToGlobal( mouseEvent->pos() );
+ if ( TQApplication::widgetAt( globalPos, true ) == this ) {
// The date picker is being closed by a click on the
// KDateEdit widget. Avoid popping it up again immediately.
mDiscardNextMousePress = true;
@@ -305,19 +305,19 @@ bool KDateEdit::eventFilter( QObject *object, QEvent *event )
return false;
}
-void KDateEdit::mousePressEvent( QMouseEvent *event )
+void KDateEdit::mousePressEvent( TQMouseEvent *event )
{
if ( event->button() == Qt::LeftButton && mDiscardNextMousePress ) {
mDiscardNextMousePress = false;
return;
}
- QComboBox::mousePressEvent( event );
+ TQComboBox::mousePressEvent( event );
}
-void KDateEdit::slotTextChanged( const QString& )
+void KDateEdit::slotTextChanged( const TQString& )
{
- QDate date = parseDate();
+ TQDate date = parseDate();
if ( assignDate( date ) )
emit dateChanged( date );
@@ -333,14 +333,14 @@ void KDateEdit::setupKeywords()
mKeywordMap.insert( i18n( "today" ), 0 );
mKeywordMap.insert( i18n( "yesterday" ), -1 );
- QString dayName;
+ TQString dayName;
for ( int i = 1; i <= 7; ++i ) {
dayName = KGlobal::locale()->calendar()->weekDayName( i ).lower();
mKeywordMap.insert( dayName, i + 100 );
}
}
-bool KDateEdit::assignDate( const QDate& date )
+bool KDateEdit::assignDate( const TQDate& date )
{
mDate = date;
mTextChanged = false;
@@ -349,7 +349,7 @@ bool KDateEdit::assignDate( const QDate& date )
void KDateEdit::updateView()
{
- QString dateString;
+ TQString dateString;
if ( mDate.isValid() )
dateString = KGlobal::locale()->formatDate( mDate, true );
diff --git a/libkdepim/kdateedit.h b/libkdepim/kdateedit.h
index 962e2a8a8..6fc04bd58 100644
--- a/libkdepim/kdateedit.h
+++ b/libkdepim/kdateedit.h
@@ -24,9 +24,9 @@
#ifndef KDATEEDIT_H
#define KDATEEDIT_H
-#include <qcombobox.h>
-#include <qdatetime.h>
-#include <qmap.h>
+#include <tqcombobox.h>
+#include <tqdatetime.h>
+#include <tqmap.h>
#include <kdepimmacros.h>
@@ -56,14 +56,14 @@ class KDE_EXPORT KDateEdit : public QComboBox
Q_OBJECT
public:
- KDateEdit( QWidget *parent = 0, const char *name = 0 );
+ KDateEdit( TQWidget *parent = 0, const char *name = 0 );
virtual ~KDateEdit();
/**
@return The date entered. This date could be invalid,
you have to check validity yourself.
*/
- QDate date() const;
+ TQDate date() const;
/**
Sets whether the widget is read-only for the user. If read-only,
@@ -87,13 +87,13 @@ class KDE_EXPORT KDateEdit : public QComboBox
the signal is not emitted until focus leaves the line edit field.
The passed date can be invalid.
*/
- void dateEntered( const QDate &date );
+ void dateEntered( const TQDate &date );
/**
This signal is emitted whenever the user modifies the date.
The passed date can be invalid.
*/
- void dateChanged( const QDate &date );
+ void dateChanged( const TQDate &date );
public slots:
/**
@@ -102,29 +102,29 @@ class KDE_EXPORT KDateEdit : public QComboBox
@param date The new date to display. This date must be valid or
it will not be set
*/
- void setDate( const QDate &date );
+ void setDate( const TQDate &date );
protected slots:
void lineEnterPressed();
- void slotTextChanged( const QString& );
- void dateSelected( QDate );
+ void slotTextChanged( const TQString& );
+ void dateSelected( TQDate );
protected:
- virtual bool eventFilter( QObject*, QEvent* );
- virtual void mousePressEvent( QMouseEvent* );
+ virtual bool eventFilter( TQObject*, TQEvent* );
+ virtual void mousePressEvent( TQMouseEvent* );
/**
Sets the date, without altering the display.
This method is used internally to set the widget's date value.
As a virtual method, it allows derived classes to perform additional validation
on the date value before it is set. Derived classes should return true if
- QDate::isValid(@p date) returns false.
+ TQDate::isValid(@p date) returns false.
@param date The new date to set.
@return True if the date was set, false if it was considered invalid and
remains unchanged.
*/
- virtual bool assignDate( const QDate &date );
+ virtual bool assignDate( const TQDate &date );
/**
Fills the keyword map. Reimplement it if you want additional
@@ -133,17 +133,17 @@ class KDE_EXPORT KDateEdit : public QComboBox
void setupKeywords();
private:
- QDate parseDate( bool* = 0 ) const;
+ TQDate parseDate( bool* = 0 ) const;
void updateView();
KDatePickerPopup *mPopup;
- QDate mDate;
+ TQDate mDate;
bool mReadOnly;
bool mTextChanged;
bool mDiscardNextMousePress;
- QMap<QString, int> mKeywordMap;
+ TQMap<TQString, int> mKeywordMap;
};
#endif
diff --git a/libkdepim/kdatepickerpopup.cpp b/libkdepim/kdatepickerpopup.cpp
index 55715a6a7..2e28dd831 100644
--- a/libkdepim/kdatepickerpopup.cpp
+++ b/libkdepim/kdatepickerpopup.cpp
@@ -19,26 +19,26 @@
Boston, MA 02110-1301, USA.
*/
-#include <qdatetime.h>
-#include <qpopupmenu.h>
+#include <tqdatetime.h>
+#include <tqpopupmenu.h>
#include <klocale.h>
#include "kdatepickerpopup.h"
-KDatePickerPopup::KDatePickerPopup( int items, const QDate &date, QWidget *parent,
+KDatePickerPopup::KDatePickerPopup( int items, const TQDate &date, TQWidget *parent,
const char *name )
- : QPopupMenu( parent, name )
+ : TQPopupMenu( parent, name )
{
mItems = items;
mDatePicker = new KDatePicker( this );
mDatePicker->setCloseButton( false );
- connect( mDatePicker, SIGNAL( dateEntered( QDate ) ),
- SLOT( slotDateChanged( QDate ) ) );
- connect( mDatePicker, SIGNAL( dateSelected( QDate ) ),
- SLOT( slotDateChanged( QDate ) ) );
+ connect( mDatePicker, TQT_SIGNAL( dateEntered( TQDate ) ),
+ TQT_SLOT( slotDateChanged( TQDate ) ) );
+ connect( mDatePicker, TQT_SIGNAL( dateSelected( TQDate ) ),
+ TQT_SLOT( slotDateChanged( TQDate ) ) );
mDatePicker->setDate( date );
@@ -58,17 +58,17 @@ void KDatePickerPopup::buildMenu()
}
if ( mItems & Words ) {
- insertItem( i18n("&Today"), this, SLOT( slotToday() ) );
- insertItem( i18n("To&morrow"), this, SLOT( slotTomorrow() ) );
- insertItem( i18n("Next &Week"), this, SLOT( slotNextWeek() ) );
- insertItem( i18n("Next M&onth"), this, SLOT( slotNextMonth() ) );
+ insertItem( i18n("&Today"), this, TQT_SLOT( slotToday() ) );
+ insertItem( i18n("To&morrow"), this, TQT_SLOT( slotTomorrow() ) );
+ insertItem( i18n("Next &Week"), this, TQT_SLOT( slotNextWeek() ) );
+ insertItem( i18n("Next M&onth"), this, TQT_SLOT( slotNextMonth() ) );
if ( mItems & NoDate )
insertSeparator();
}
if ( mItems & NoDate )
- insertItem( i18n("No Date"), this, SLOT( slotNoDate() ) );
+ insertItem( i18n("No Date"), this, TQT_SLOT( slotNoDate() ) );
}
KDatePicker *KDatePickerPopup::datePicker() const
@@ -76,7 +76,7 @@ KDatePicker *KDatePickerPopup::datePicker() const
return mDatePicker;
}
-void KDatePickerPopup::setDate( const QDate &date )
+void KDatePickerPopup::setDate( const TQDate &date )
{
mDatePicker->setDate( date );
}
@@ -89,7 +89,7 @@ void KDatePickerPopup::setItems( int items )
}
#endif
-void KDatePickerPopup::slotDateChanged( QDate date )
+void KDatePickerPopup::slotDateChanged( TQDate date )
{
emit dateChanged( date );
hide();
@@ -97,27 +97,27 @@ void KDatePickerPopup::slotDateChanged( QDate date )
void KDatePickerPopup::slotToday()
{
- emit dateChanged( QDate::currentDate() );
+ emit dateChanged( TQDate::currentDate() );
}
void KDatePickerPopup::slotTomorrow()
{
- emit dateChanged( QDate::currentDate().addDays( 1 ) );
+ emit dateChanged( TQDate::currentDate().addDays( 1 ) );
}
void KDatePickerPopup::slotNoDate()
{
- emit dateChanged( QDate() );
+ emit dateChanged( TQDate() );
}
void KDatePickerPopup::slotNextWeek()
{
- emit dateChanged( QDate::currentDate().addDays( 7 ) );
+ emit dateChanged( TQDate::currentDate().addDays( 7 ) );
}
void KDatePickerPopup::slotNextMonth()
{
- emit dateChanged( QDate::currentDate().addMonths( 1 ) );
+ emit dateChanged( TQDate::currentDate().addMonths( 1 ) );
}
#include "kdatepickerpopup.moc"
diff --git a/libkdepim/kdatepickerpopup.h b/libkdepim/kdatepickerpopup.h
index 5b5aefcbb..080bf4988 100644
--- a/libkdepim/kdatepickerpopup.h
+++ b/libkdepim/kdatepickerpopup.h
@@ -21,8 +21,8 @@
#ifndef KDATEPICKERPOPUP_H
#define KDATEPICKERPOPUP_H
-#include <qdatetime.h>
-#include <qpopupmenu.h>
+#include <tqdatetime.h>
+#include <tqpopupmenu.h>
#include <kdepimmacros.h>
#include <kdatepicker.h>
@@ -34,7 +34,7 @@
The available items are:
- @li NoDate: A menu-item with "No Date". If choosen, the datepicker will emit a null QDate.
+ @li NoDate: A menu-item with "No Date". If choosen, the datepicker will emit a null TQDate.
@li DatePicker: Show a KDatePicker-widget.
@li Words: Show items like "Today", "Tomorrow" or "Next Week".
@@ -56,8 +56,8 @@ class KDE_EXPORT KDatePickerPopup: public QPopupMenu
@param parent The object's parent.
@param name The object's name.
*/
- KDatePickerPopup( int items = DatePicker, const QDate &date = QDate::currentDate(),
- QWidget *parent = 0, const char *name = 0 );
+ KDatePickerPopup( int items = DatePicker, const TQDate &date = TQDate::currentDate(),
+ TQWidget *parent = 0, const char *name = 0 );
/**
@return A pointer to the private variable mDatePicker, an instance of
@@ -65,7 +65,7 @@ class KDE_EXPORT KDatePickerPopup: public QPopupMenu
*/
KDatePicker *datePicker() const;
- void setDate( const QDate &date );
+ void setDate( const TQDate &date );
#if 0
/** Set items which should be shown and rebuilds the menu afterwards. Only if the menu is not visible.
@@ -82,10 +82,10 @@ class KDE_EXPORT KDatePickerPopup: public QPopupMenu
This signal emits the new date (selected with datepicker or other
menu-items).
*/
- void dateChanged ( QDate );
+ void dateChanged ( TQDate );
protected slots:
- void slotDateChanged ( QDate );
+ void slotDateChanged ( TQDate );
void slotToday();
void slotTomorrow();
diff --git a/libkdepim/kfileio.cpp b/libkdepim/kfileio.cpp
index f601bc6d6..4d49c1148 100644
--- a/libkdepim/kfileio.cpp
+++ b/libkdepim/kfileio.cpp
@@ -10,14 +10,14 @@
#include <kdebug.h>
#include <assert.h>
-#include <qdir.h>
+#include <tqdir.h>
#include <klocale.h>
#include <kstdguiitem.h>
-#include <qwidget.h>
-#include <qfile.h>
-#include <qfileinfo.h>
+#include <tqwidget.h>
+#include <tqfile.h>
+#include <tqfileinfo.h>
#include <sys/stat.h>
#include <sys/types.h>
@@ -26,20 +26,20 @@
namespace KPIM {
//-----------------------------------------------------------------------------
-static void msgDialog(const QString &msg)
+static void msgDialog(const TQString &msg)
{
KMessageBox::sorry(0, msg, i18n("File I/O Error"));
}
//-----------------------------------------------------------------------------
-KDE_EXPORT QCString kFileToString(const QString &aFileName, bool aEnsureNL, bool aVerbose)
+KDE_EXPORT TQCString kFileToString(const TQString &aFileName, bool aEnsureNL, bool aVerbose)
{
- QCString result;
- QFileInfo info(aFileName);
+ TQCString result;
+ TQFileInfo info(aFileName);
unsigned int readLen;
unsigned int len = info.size();
- QFile file(aFileName);
+ TQFile file(aFileName);
//assert(aFileName!=0);
if( aFileName.isEmpty() )
@@ -49,22 +49,22 @@ KDE_EXPORT QCString kFileToString(const QString &aFileName, bool aEnsureNL, bool
{
if (aVerbose)
msgDialog(i18n("The specified file does not exist:\n%1").arg(aFileName));
- return QCString();
+ return TQCString();
}
if (info.isDir())
{
if (aVerbose)
msgDialog(i18n("This is a folder and not a file:\n%1").arg(aFileName));
- return QCString();
+ return TQCString();
}
if (!info.isReadable())
{
if (aVerbose)
msgDialog(i18n("You do not have read permissions "
"to the file:\n%1").arg(aFileName));
- return QCString();
+ return TQCString();
}
- if (len <= 0) return QCString();
+ if (len <= 0) return TQCString();
if (!file.open(IO_Raw|IO_ReadOnly))
{
@@ -79,7 +79,7 @@ KDE_EXPORT QCString kFileToString(const QString &aFileName, bool aEnsureNL, bool
default:
msgDialog(i18n("Error while reading file:\n%1").arg(aFileName));
}
- return QCString();
+ return TQCString();
}
result.resize(len + (int)aEnsureNL + 1);
@@ -93,10 +93,10 @@ KDE_EXPORT QCString kFileToString(const QString &aFileName, bool aEnsureNL, bool
if (readLen < len)
{
- QString msg = i18n("Could only read %1 bytes of %2.")
+ TQString msg = i18n("Could only read %1 bytes of %2.")
.arg(readLen).arg(len);
msgDialog(msg);
- return QCString();
+ return TQCString();
}
return result;
@@ -104,13 +104,13 @@ KDE_EXPORT QCString kFileToString(const QString &aFileName, bool aEnsureNL, bool
//-----------------------------------------------------------------------------
#if 0 // unused
-QByteArray kFileToBytes(const QString &aFileName, bool aVerbose)
+TQByteArray kFileToBytes(const TQString &aFileName, bool aVerbose)
{
- QByteArray result;
- QFileInfo info(aFileName);
+ TQByteArray result;
+ TQFileInfo info(aFileName);
unsigned int readLen;
unsigned int len = info.size();
- QFile file(aFileName);
+ TQFile file(aFileName);
//assert(aFileName!=0);
if( aFileName.isEmpty() )
@@ -157,11 +157,11 @@ QByteArray kFileToBytes(const QString &aFileName, bool aVerbose)
result.resize(len);
readLen = file.readBlock(result.data(), len);
- kdDebug(5300) << QString( "len %1" ).arg(len) << endl;
+ kdDebug(5300) << TQString( "len %1" ).arg(len) << endl;
if (readLen < len)
{
- QString msg;
+ TQString msg;
msg = i18n("Could only read %1 bytes of %2.")
.arg(readLen).arg(len);
msgDialog(msg);
@@ -174,11 +174,11 @@ QByteArray kFileToBytes(const QString &aFileName, bool aVerbose)
//-----------------------------------------------------------------------------
KDE_EXPORT bool kBytesToFile(const char* aBuffer, int len,
- const QString &aFileName,
+ const TQString &aFileName,
bool aAskIfExists, bool aBackup, bool aVerbose)
{
// TODO: use KSaveFile
- QFile file(aFileName);
+ TQFile file(aFileName);
int writeLen, rc;
//assert(aFileName!=0);
@@ -189,7 +189,7 @@ KDE_EXPORT bool kBytesToFile(const char* aBuffer, int len,
{
if (aAskIfExists)
{
- QString str;
+ TQString str;
str = i18n("File %1 exists.\nDo you want to replace it?")
.arg(aFileName);
rc = KMessageBox::warningContinueCancel(0,
@@ -200,10 +200,10 @@ KDE_EXPORT bool kBytesToFile(const char* aBuffer, int len,
{
// make a backup copy
// TODO: use KSaveFile::backupFile()
- QString bakName = aFileName;
+ TQString bakName = aFileName;
bakName += '~';
- QFile::remove(bakName);
- if( !QDir::current().rename(aFileName, bakName) )
+ TQFile::remove(bakName);
+ if( !TQDir::current().rename(aFileName, bakName) )
{
// failed to rename file
if (!aVerbose) return FALSE;
@@ -243,7 +243,7 @@ KDE_EXPORT bool kBytesToFile(const char* aBuffer, int len,
}
else if (writeLen < len)
{
- QString msg = i18n("Could only write %1 bytes of %2.")
+ TQString msg = i18n("Could only write %1 bytes of %2.")
.arg(writeLen).arg(len);
if (aVerbose)
msgDialog(msg);
@@ -253,14 +253,14 @@ KDE_EXPORT bool kBytesToFile(const char* aBuffer, int len,
return TRUE;
}
-KDE_EXPORT bool kCStringToFile(const QCString& aBuffer, const QString &aFileName,
+KDE_EXPORT bool kCStringToFile(const TQCString& aBuffer, const TQString &aFileName,
bool aAskIfExists, bool aBackup, bool aVerbose)
{
return kBytesToFile(aBuffer, aBuffer.length(), aFileName, aAskIfExists,
aBackup, aVerbose);
}
-KDE_EXPORT bool kByteArrayToFile(const QByteArray& aBuffer, const QString &aFileName,
+KDE_EXPORT bool kByteArrayToFile(const TQByteArray& aBuffer, const TQString &aFileName,
bool aAskIfExists, bool aBackup, bool aVerbose)
{
return kBytesToFile(aBuffer, aBuffer.size(), aFileName, aAskIfExists,
@@ -268,17 +268,17 @@ KDE_EXPORT bool kByteArrayToFile(const QByteArray& aBuffer, const QString &aFile
}
-QString checkAndCorrectPermissionsIfPossible( const QString &toCheck,
+TQString checkAndCorrectPermissionsIfPossible( const TQString &toCheck,
const bool recursive, const bool wantItReadable,
const bool wantItWritable )
{
// First we have to find out which type the toCheck is. This can be
// a directory (follow if recursive) or a file (check permissions).
// Symlinks are followed as expected.
- QFileInfo fiToCheck(toCheck);
+ TQFileInfo fiToCheck(toCheck);
fiToCheck.setCaching(false);
- QCString toCheckEnc = QFile::encodeName(toCheck);
- QString error;
+ TQCString toCheckEnc = TQFile::encodeName(toCheck);
+ TQString error;
struct stat statbuffer;
if ( !fiToCheck.exists() ) {
@@ -291,7 +291,7 @@ QString checkAndCorrectPermissionsIfPossible( const QString &toCheck,
if ( stat( toCheckEnc,&statbuffer ) != 0 ) {
kdDebug() << "wantItA: Can't read perms of " << toCheck << endl;
}
- QDir g( toCheck );
+ TQDir g( toCheck );
if ( !g.isReadable() ) {
if ( chmod( toCheckEnc, statbuffer.st_mode + S_IXUSR ) != 0 ) {
error.append( i18n("%1 is not accessible and that is "
@@ -342,7 +342,7 @@ QString checkAndCorrectPermissionsIfPossible( const QString &toCheck,
// If it is a folder and recursive is true, then we check the contents of
// the folder.
if ( fiToCheck.isDir() && recursive ){
- QDir g(toCheck);
+ TQDir g(toCheck);
// First check if the folder is readable for us. If not, we get
// some ugly crashes.
if ( !g.isReadable() ){
@@ -350,10 +350,10 @@ QString checkAndCorrectPermissionsIfPossible( const QString &toCheck,
} else {
const QFileInfoList *list = g.entryInfoList();
QFileInfoListIterator it( *list );
- QFileInfo *fi;
+ TQFileInfo *fi;
while ((fi = it.current()) != 0) {
- QString newToCheck = toCheck + "/" + fi->fileName();
- QFileInfo fiNewToCheck(newToCheck);
+ TQString newToCheck = toCheck + "/" + fi->fileName();
+ TQFileInfo fiNewToCheck(newToCheck);
if ( fi->fileName() != "." && fi->fileName() != ".." ) {
error.append ( checkAndCorrectPermissionsIfPossible( newToCheck,
recursive, wantItReadable, wantItWritable) );
@@ -365,11 +365,11 @@ QString checkAndCorrectPermissionsIfPossible( const QString &toCheck,
return error;
}
-bool checkAndCorrectPermissionsIfPossibleWithErrorHandling( QWidget *parent,
- const QString &toCheck, const bool recursive, const bool wantItReadable,
+bool checkAndCorrectPermissionsIfPossibleWithErrorHandling( TQWidget *parent,
+ const TQString &toCheck, const bool recursive, const bool wantItReadable,
const bool wantItWritable )
{
- QString error = checkAndCorrectPermissionsIfPossible(toCheck, recursive,
+ TQString error = checkAndCorrectPermissionsIfPossible(toCheck, recursive,
wantItReadable, wantItWritable);
// There is no KMessageBox with Retry, Cancel and Details.
// so, I can't provide a functionality to recheck. So it now
diff --git a/libkdepim/kfileio.h b/libkdepim/kfileio.h
index f6f17a1fa..e3dcc976a 100644
--- a/libkdepim/kfileio.h
+++ b/libkdepim/kfileio.h
@@ -8,8 +8,8 @@
#ifndef kpim_kfileio_h
#define kpim_kfileio_h
-#include <qcstring.h>
-#include <qwidget.h>
+#include <tqcstring.h>
+#include <tqwidget.h>
#include <kdepimmacros.h>
@@ -25,11 +25,11 @@ namespace KPIM {
* byte longer than the file itself.
* If ensureNewline is TRUE the string will always have a trailing newline.
*/
-QCString kFileToString(const QString &fileName, bool ensureNewline=true,
+TQCString kFileToString(const TQString &fileName, bool ensureNewline=true,
bool withDialogs=true) KDE_EXPORT;
// unused
-//QByteArray kFileToBytes(const QString &fileName, bool withDialogs=true);
+//TQByteArray kFileToBytes(const TQString &fileName, bool withDialogs=true);
/** Save a file. If withDialogs is FALSE no warning dialogs are opened if
@@ -38,14 +38,14 @@ QCString kFileToString(const QString &fileName, bool ensureNewline=true,
* Makes a copy if the file exists to filename~ if createBackup==TRUE.
*/
bool kBytesToFile(const char* aBuffer, int len,
- const QString &aFileName,
+ const TQString &aFileName,
bool aAskIfExists, bool aBackup, bool aVerbose) KDE_EXPORT;
-bool kCStringToFile(const QCString& buffer, const QString &fileName,
+bool kCStringToFile(const TQCString& buffer, const TQString &fileName,
bool askIfExists=false, bool createBackup=true,
bool withDialogs=true) KDE_EXPORT;
/** Does not stop at NUL */
-KDE_EXPORT bool kByteArrayToFile(const QByteArray& buffer, const QString &fileName,
+KDE_EXPORT bool kByteArrayToFile(const TQByteArray& buffer, const TQString &fileName,
bool askIfExists=false, bool createBackup=true,
bool withDialogs=true) KDE_EXPORT;
@@ -69,7 +69,7 @@ KDE_EXPORT bool kByteArrayToFile(const QByteArray& buffer, const QString &fileNa
* @return It will return a string with all files and folders which do not
* have the right permissions. If empty, then all permissions are ok.
*/
-QString checkAndCorrectPermissionsIfPossible( const QString &toCheck,
+TQString checkAndCorrectPermissionsIfPossible( const TQString &toCheck,
const bool recursive, const bool wantItReadable,
const bool wantItWritable );
@@ -97,8 +97,8 @@ QString checkAndCorrectPermissionsIfPossible( const QString &toCheck,
* then the permissions are not ok and it was not possible to correct
* all errors.
*/
-bool checkAndCorrectPermissionsIfPossibleWithErrorHandling( QWidget *parent,
- const QString &toCheck, const bool recursive, const bool wantItReadable,
+bool checkAndCorrectPermissionsIfPossibleWithErrorHandling( TQWidget *parent,
+ const TQString &toCheck, const bool recursive, const bool wantItReadable,
const bool wantItWritable );
}
diff --git a/libkdepim/kfoldertree.cpp b/libkdepim/kfoldertree.cpp
index 64c4457dc..5e2636738 100644
--- a/libkdepim/kfoldertree.cpp
+++ b/libkdepim/kfoldertree.cpp
@@ -6,13 +6,13 @@
#include <kiconloader.h>
#include <kdebug.h>
#include <kstringhandler.h>
-#include <qpainter.h>
-#include <qapplication.h>
-#include <qheader.h>
-#include <qstyle.h>
+#include <tqpainter.h>
+#include <tqapplication.h>
+#include <tqheader.h>
+#include <tqstyle.h>
//-----------------------------------------------------------------------------
-KFolderTreeItem::KFolderTreeItem( KFolderTree *parent, const QString & label,
+KFolderTreeItem::KFolderTreeItem( KFolderTree *parent, const TQString & label,
Protocol protocol, Type type )
: KListViewItem( parent, label ), mProtocol( protocol ), mType( type ),
mUnread(-1), mTotal(0), mSize(0), mFolderIsCloseToQuota( false )
@@ -21,7 +21,7 @@ KFolderTreeItem::KFolderTreeItem( KFolderTree *parent, const QString & label,
//-----------------------------------------------------------------------------
KFolderTreeItem::KFolderTreeItem( KFolderTreeItem *parent,
- const QString & label, Protocol protocol, Type type,
+ const TQString & label, Protocol protocol, Type type,
int unread, int total )
: KListViewItem( parent, label ), mProtocol( protocol ), mType( type ),
mUnread( unread ), mTotal( total ), mSize(0), mFolderIsCloseToQuota( false )
@@ -82,7 +82,7 @@ int KFolderTreeItem::typeSortingKey() const
}
//-----------------------------------------------------------------------------
-int KFolderTreeItem::compare( QListViewItem * i, int col, bool ) const
+int KFolderTreeItem::compare( TQListViewItem * i, int col, bool ) const
{
KFolderTreeItem* other = static_cast<KFolderTreeItem*>( i );
@@ -149,7 +149,7 @@ void KFolderTreeItem::setUnreadCount( int aUnread )
mUnread = aUnread;
- QString unread = QString::null;
+ TQString unread = TQString::null;
if (mUnread == 0)
unread = "- ";
else {
@@ -168,7 +168,7 @@ void KFolderTreeItem::setTotalCount( int aTotal )
mTotal = aTotal;
- QString total = QString::null;
+ TQString total = TQString::null;
if (mTotal == 0)
total = "- ";
else {
@@ -187,7 +187,7 @@ void KFolderTreeItem::setFolderSize( Q_INT64 aSize )
mSize = aSize;
- QString size;
+ TQString size;
if (mType != Root) {
if (mSize == 0 && (childCount() == 0 || isOpen() ) )
size = "- ";
@@ -198,7 +198,7 @@ void KFolderTreeItem::setFolderSize( Q_INT64 aSize )
Q_INT64 recursiveSize = recursiveFolderSize();
if ( recursiveSize != mSize ) {
if ( mType != Root )
- size += QString::fromLatin1(" + %1").arg( KIO::convertSize( recursiveSize - mSize ) );
+ size += TQString::fromLatin1(" + %1").arg( KIO::convertSize( recursiveSize - mSize ) );
else
size = KIO::convertSize( recursiveSize );
}
@@ -213,7 +213,7 @@ Q_INT64 KFolderTreeItem::recursiveFolderSize() const
{
Q_INT64 size = mSize;
- for ( QListViewItem *item = firstChild() ;
+ for ( TQListViewItem *item = firstChild() ;
item ; item = item->nextSibling() )
{
size += static_cast<KFolderTreeItem*>(item)->recursiveFolderSize();
@@ -228,7 +228,7 @@ int KFolderTreeItem::countUnreadRecursive()
{
int count = (mUnread > 0) ? mUnread : 0;
- for ( QListViewItem *item = firstChild() ;
+ for ( TQListViewItem *item = firstChild() ;
item ; item = item->nextSibling() )
{
count += static_cast<KFolderTreeItem*>(item)->countUnreadRecursive();
@@ -238,7 +238,7 @@ int KFolderTreeItem::countUnreadRecursive()
}
//-----------------------------------------------------------------------------
-void KFolderTreeItem::paintCell( QPainter * p, const QColorGroup & cg,
+void KFolderTreeItem::paintCell( TQPainter * p, const TQColorGroup & cg,
int column, int width, int align )
{
KFolderTree *ft = static_cast<KFolderTree*>(listView());
@@ -248,10 +248,10 @@ void KFolderTreeItem::paintCell( QPainter * p, const QColorGroup & cg,
// use a special color for folders which are close to their quota
- QColorGroup mycg = cg;
+ TQColorGroup mycg = cg;
if ( ( column == 0 || column == ft->sizeIndex() ) && folderIsCloseToQuota() )
{
- mycg.setColor( QColorGroup::Text, ft->paintInfo().colCloseToQuota );
+ mycg.setColor( TQColorGroup::Text, ft->paintInfo().colCloseToQuota );
}
// use a bold-font for the folder- and the unread-columns
@@ -259,8 +259,8 @@ void KFolderTreeItem::paintCell( QPainter * p, const QColorGroup & cg,
&& ( unreadCount > 0
|| ( !isOpen() && unreadRecursiveCount > 0 ) ) )
{
- QFont f = p->font();
- f.setWeight(QFont::Bold);
+ TQFont f = p->font();
+ f.setWeight(TQFont::Bold);
p->setFont(f);
}
@@ -276,8 +276,8 @@ void KFolderTreeItem::paintCell( QPainter * p, const QColorGroup & cg,
if ( ft->isUnreadActive() || column != 0 ) {
KListViewItem::paintCell( p, mycg, column, width, align );
} else {
- QListView *lv = listView();
- QString oldText = text(column);
+ TQListView *lv = listView();
+ TQString oldText = text(column);
// set an empty text so that we can have our own implementation (see further down)
// but still benefit from KListView::paintCell
@@ -285,7 +285,7 @@ void KFolderTreeItem::paintCell( QPainter * p, const QColorGroup & cg,
KListViewItem::paintCell( p, mycg, column, width, align );
- const QPixmap *icon = pixmap( column );
+ const TQPixmap *icon = pixmap( column );
int marg = lv ? lv->itemMargin() : 1;
int r = marg;
@@ -293,35 +293,35 @@ void KFolderTreeItem::paintCell( QPainter * p, const QColorGroup & cg,
if ( isSelected() )
p->setPen( mycg.highlightedText() );
else
- p->setPen( mycg.color( QColorGroup::Text ) );
+ p->setPen( mycg.color( TQColorGroup::Text ) );
if ( icon ) {
r += icon->width() + marg;
}
- QString t = text( column );
+ TQString t = text( column );
if (t.isEmpty())
return;
// draw the unread-count if the unread-column is not active
- QString unread;
+ TQString unread;
if ( unreadCount > 0 || ( !isOpen() && unreadRecursiveCount > 0 ) ) {
if ( isOpen() )
- unread = " (" + QString::number( unreadCount ) + ")";
+ unread = " (" + TQString::number( unreadCount ) + ")";
else if ( unreadRecursiveCount == unreadCount || mType == Root )
- unread = " (" + QString::number( unreadRecursiveCount ) + ")";
+ unread = " (" + TQString::number( unreadRecursiveCount ) + ")";
else
- unread = " (" + QString::number( unreadCount ) + " + " +
- QString::number( unreadRecursiveCount-unreadCount ) + ")";
+ unread = " (" + TQString::number( unreadCount ) + " + " +
+ TQString::number( unreadRecursiveCount-unreadCount ) + ")";
}
// check if the text needs to be squeezed
- QFontMetrics fm( p->fontMetrics() );
+ TQFontMetrics fm( p->fontMetrics() );
int unreadWidth = fm.width( unread );
if ( fm.width( t ) + marg + r + unreadWidth > width )
t = squeezeFolderName( t, fm, width - marg - r - unreadWidth );
- QRect br;
+ TQRect br;
p->drawText( r, 0, width-marg-r, height(),
align | AlignVCenter, t, -1, &br );
@@ -335,8 +335,8 @@ void KFolderTreeItem::paintCell( QPainter * p, const QColorGroup & cg,
}
-QString KFolderTreeItem::squeezeFolderName( const QString &text,
- const QFontMetrics &fm,
+TQString KFolderTreeItem::squeezeFolderName( const TQString &text,
+ const TQFontMetrics &fm,
uint width ) const
{
return KStringHandler::rPixelSqueeze( text, fm, width );
@@ -359,7 +359,7 @@ void KFolderTreeItem::setFolderIsCloseToQuota( bool v )
//=============================================================================
-KFolderTree::KFolderTree( QWidget *parent, const char* name )
+KFolderTree::KFolderTree( TQWidget *parent, const char* name )
: KListView( parent, name ), mUnreadIndex(-1), mTotalIndex(-1), mSizeIndex(-1)
{
// GUI-options
@@ -372,7 +372,7 @@ KFolderTree::KFolderTree( QWidget *parent, const char* name )
setItemsRenameable(false);
setRootIsDecorated(true);
setSelectionModeExt(Extended);
- setAlternateBackground(QColor());
+ setAlternateBackground(TQColor());
#if KDE_IS_VERSION( 3, 3, 90 )
setShadeSortColumn ( false );
#endif
@@ -380,9 +380,9 @@ KFolderTree::KFolderTree( QWidget *parent, const char* name )
disableAutoSelection();
setColumnWidth( 0, 120 ); //reasonable default size
- disconnect( header(), SIGNAL( sizeChange( int, int, int ) ) );
- connect( header(), SIGNAL( sizeChange( int, int, int ) ),
- SLOT( slotSizeChanged( int, int, int ) ) );
+ disconnect( header(), TQT_SIGNAL( sizeChange( int, int, int ) ) );
+ connect( header(), TQT_SIGNAL( sizeChange( int, int, int ) ),
+ TQT_SLOT( slotSizeChanged( int, int, int ) ) );
}
//-----------------------------------------------------------------------------
@@ -391,9 +391,9 @@ void KFolderTree::setStyleDependantFrameWidth()
// set the width of the frame to a reasonable value for the current GUI style
int frameWidth;
if( style().isA("KeramikStyle") )
- frameWidth = style().pixelMetric( QStyle::PM_DefaultFrameWidth ) - 1;
+ frameWidth = style().pixelMetric( TQStyle::PM_DefaultFrameWidth ) - 1;
else
- frameWidth = style().pixelMetric( QStyle::PM_DefaultFrameWidth );
+ frameWidth = style().pixelMetric( TQStyle::PM_DefaultFrameWidth );
if ( frameWidth < 0 )
frameWidth = 0;
if ( frameWidth != lineWidth() )
@@ -401,14 +401,14 @@ void KFolderTree::setStyleDependantFrameWidth()
}
//-----------------------------------------------------------------------------
-void KFolderTree::styleChange( QStyle& oldStyle )
+void KFolderTree::styleChange( TQStyle& oldStyle )
{
setStyleDependantFrameWidth();
KListView::styleChange( oldStyle );
}
//-----------------------------------------------------------------------------
-void KFolderTree::drawContentsOffset( QPainter * p, int ox, int oy,
+void KFolderTree::drawContentsOffset( TQPainter * p, int ox, int oy,
int cx, int cy, int cw, int ch )
{
bool oldUpdatesEnabled = isUpdatesEnabled();
@@ -418,14 +418,14 @@ void KFolderTree::drawContentsOffset( QPainter * p, int ox, int oy,
}
//-----------------------------------------------------------------------------
-void KFolderTree::contentsMousePressEvent( QMouseEvent *e )
+void KFolderTree::contentsMousePressEvent( TQMouseEvent *e )
{
setSelectionModeExt(Single);
KListView::contentsMousePressEvent(e);
}
//-----------------------------------------------------------------------------
-void KFolderTree::contentsMouseReleaseEvent( QMouseEvent *e )
+void KFolderTree::contentsMouseReleaseEvent( TQMouseEvent *e )
{
KListView::contentsMouseReleaseEvent(e);
setSelectionModeExt(Extended);
@@ -443,9 +443,9 @@ void KFolderTree::addAcceptableDropMimetype( const char *mimeType, bool outsideO
}
//-----------------------------------------------------------------------------
-bool KFolderTree::acceptDrag( QDropEvent* event ) const
+bool KFolderTree::acceptDrag( TQDropEvent* event ) const
{
- QListViewItem* item = itemAt(contentsToViewport(event->pos()));
+ TQListViewItem* item = itemAt(contentsToViewport(event->pos()));
for (uint i = 0; i < mAcceptableDropMimetypes.size(); i++)
{
@@ -461,7 +461,7 @@ bool KFolderTree::acceptDrag( QDropEvent* event ) const
}
//-----------------------------------------------------------------------------
-void KFolderTree::addUnreadColumn( const QString & name, int width )
+void KFolderTree::addUnreadColumn( const TQString & name, int width )
{
mUnreadIndex = addColumn( name, width );
setColumnAlignment( mUnreadIndex, qApp->reverseLayout() ? Qt::AlignLeft : Qt::AlignRight );
@@ -469,7 +469,7 @@ void KFolderTree::addUnreadColumn( const QString & name, int width )
}
//-----------------------------------------------------------------------------
-void KFolderTree::addTotalColumn( const QString & name, int width )
+void KFolderTree::addTotalColumn( const TQString & name, int width )
{
mTotalIndex = addColumn( name, width );
setColumnAlignment( mTotalIndex, qApp->reverseLayout() ? Qt::AlignLeft : Qt::AlignRight );
@@ -504,7 +504,7 @@ void KFolderTree::removeTotalColumn()
}
//-----------------------------------------------------------------------------
-void KFolderTree::addSizeColumn( const QString & name, int width )
+void KFolderTree::addSizeColumn( const TQString & name, int width )
{
mSizeIndex = addColumn( name, width );
setColumnAlignment( mSizeIndex, qApp->reverseLayout() ? Qt::AlignLeft : Qt::AlignRight );
diff --git a/libkdepim/kfoldertree.h b/libkdepim/kfoldertree.h
index 5946435b8..e09cd7833 100644
--- a/libkdepim/kfoldertree.h
+++ b/libkdepim/kfoldertree.h
@@ -22,10 +22,10 @@
#ifndef __KFOLDERTREE
#define __KFOLDERTREE
-#include <qpixmap.h>
-#include <qbitarray.h>
-#include <qdragobject.h>
-#include <qcolor.h>
+#include <tqpixmap.h>
+#include <tqbitarray.h>
+#include <tqdragobject.h>
+#include <tqcolor.h>
#include <klistview.h>
#include <kdepimmacros.h>
@@ -88,14 +88,14 @@ struct KPaintInfo {
{}
bool pixmapOn;
- QPixmap pixmap;
- QColor colFore;
- QColor colBack;
- QColor colNew;
- QColor colUnread;
- QColor colFlag;
- QColor colTodo;
- QColor colCloseToQuota;
+ TQPixmap pixmap;
+ TQColor colFore;
+ TQColor colBack;
+ TQColor colNew;
+ TQColor colUnread;
+ TQColor colFlag;
+ TQColor colTodo;
+ TQColor colCloseToQuota;
bool showSize;
bool showAttachment;
@@ -164,15 +164,15 @@ class KDE_EXPORT KFolderTreeItem : public KListViewItem
};
/** constructs a root-item */
- KFolderTreeItem( KFolderTree *parent, const QString & label=QString::null,
+ KFolderTreeItem( KFolderTree *parent, const TQString & label=TQString::null,
Protocol protocol=NONE, Type type=Root );
/** constructs a child-item */
- KFolderTreeItem( KFolderTreeItem *parent, const QString & label=QString::null,
+ KFolderTreeItem( KFolderTreeItem *parent, const TQString & label=TQString::null,
Protocol protocol=NONE, Type type=Other, int unread=0, int total=0 );
/** compare */
- virtual int compare( QListViewItem * i, int col,
+ virtual int compare( TQListViewItem * i, int col,
bool ascending ) const;
/** set/get the unread-count */
@@ -201,11 +201,11 @@ class KDE_EXPORT KFolderTreeItem : public KListViewItem
virtual Q_INT64 recursiveFolderSize() const;
/** paints the cell */
- virtual void paintCell( QPainter * p, const QColorGroup & cg,
+ virtual void paintCell( TQPainter * p, const TQColorGroup & cg,
int column, int width, int align );
/** dnd */
- virtual bool acceptDrag(QDropEvent* ) const { return true; }
+ virtual bool acceptDrag(TQDropEvent* ) const { return true; }
void setFolderIsCloseToQuota( bool );
bool folderIsCloseToQuota() const;
@@ -218,8 +218,8 @@ class KDE_EXPORT KFolderTreeItem : public KListViewItem
protected:
/** reimplement to use special squeezing algorithm for the folder name */
- virtual QString squeezeFolderName( const QString &text,
- const QFontMetrics &fm,
+ virtual TQString squeezeFolderName( const TQString &text,
+ const TQFontMetrics &fm,
uint width ) const;
Protocol mProtocol;
@@ -237,7 +237,7 @@ class KDE_EXPORT KFolderTree : public KListView
Q_OBJECT
public:
- KFolderTree( QWidget *parent, const char *name=0 );
+ KFolderTree( TQWidget *parent, const char *name=0 );
/** registers MIMETypes that are handled
@param mimeType the name of the MIMEType
@@ -246,17 +246,17 @@ class KDE_EXPORT KFolderTree : public KListView
virtual void addAcceptableDropMimetype( const char *mimeType, bool outsideOk );
/** checks if the drag is acceptable */
- virtual bool acceptDrag( QDropEvent* event ) const;
+ virtual bool acceptDrag( TQDropEvent* event ) const;
/** returns the KPaintInfo */
KPaintInfo paintInfo() const { return mPaintInfo; }
/** add/remove unread/total-columns */
- virtual void addUnreadColumn( const QString & name, int width=70 );
+ virtual void addUnreadColumn( const TQString & name, int width=70 );
virtual void removeUnreadColumn();
- virtual void addTotalColumn( const QString & name, int width=70 );
+ virtual void addTotalColumn( const TQString & name, int width=70 );
virtual void removeTotalColumn();
- virtual void addSizeColumn( const QString & name, int width=70 );
+ virtual void addSizeColumn( const TQString & name, int width=70 );
virtual void removeSizeColumn();
@@ -276,21 +276,21 @@ class KDE_EXPORT KFolderTree : public KListView
protected:
/** reimplemented in order to update the frame width in case of a changed
GUI style */
- void styleChange( QStyle& oldStyle );
+ void styleChange( TQStyle& oldStyle );
/** Set the width of the frame to a reasonable value for the current GUI
style */
void setStyleDependantFrameWidth();
- virtual void drawContentsOffset( QPainter * p, int ox, int oy,
+ virtual void drawContentsOffset( TQPainter * p, int ox, int oy,
int cx, int cy, int cw, int ch );
- virtual void contentsMousePressEvent( QMouseEvent *e );
- virtual void contentsMouseReleaseEvent( QMouseEvent *e );
+ virtual void contentsMousePressEvent( TQMouseEvent *e );
+ virtual void contentsMouseReleaseEvent( TQMouseEvent *e );
/** for mimetypes */
- QMemArray<const char*> mAcceptableDropMimetypes;
- QBitArray mAcceptOutside;
+ TQMemArray<const char*> mAcceptableDropMimetypes;
+ TQBitArray mAcceptOutside;
/** shared information */ // ### why isn't it then static? ;-)
KPaintInfo mPaintInfo;
@@ -303,7 +303,7 @@ class KDE_EXPORT KFolderTree : public KListView
private slots:
/** repaints the complete column (instead of only parts of it as done in
- QListView) if the size has changed */
+ TQListView) if the size has changed */
void slotSizeChanged( int section, int oldSize, int newSize );
};
diff --git a/libkdepim/kimportdialog.cpp b/libkdepim/kimportdialog.cpp
index d270ae6eb..ffccd5008 100644
--- a/libkdepim/kimportdialog.cpp
+++ b/libkdepim/kimportdialog.cpp
@@ -24,17 +24,17 @@
// class. Application specific code should go to a subclass provided by the
// application using this dialog.
-#include <qbuttongroup.h>
-#include <qfile.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qlineedit.h>
-#include <qlistview.h>
-#include <qradiobutton.h>
-#include <qregexp.h>
-#include <qtable.h>
-#include <qtextstream.h>
-#include <qvbox.h>
+#include <tqbuttongroup.h>
+#include <tqfile.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqlineedit.h>
+#include <tqlistview.h>
+#include <tqradiobutton.h>
+#include <tqregexp.h>
+#include <tqtable.h>
+#include <tqtextstream.h>
+#include <tqvbox.h>
#include <kapplication.h>
#include <kdebug.h>
@@ -51,7 +51,7 @@
#include "kimportdialog.h"
#include "kimportdialog.moc"
-KImportColumn::KImportColumn(KImportDialog *dlg,const QString &header, int count)
+KImportColumn::KImportColumn(KImportDialog *dlg,const TQString &header, int count)
: m_maxCount(count),
m_refCount(0),
m_header(header),
@@ -66,12 +66,12 @@ KImportColumn::KImportColumn(KImportDialog *dlg,const QString &header, int count
mDialog->addColumn(this);
}
-QValueList<int> KImportColumn::formats()
+TQValueList<int> KImportColumn::formats()
{
return mFormats;
}
-QString KImportColumn::formatName(int format)
+TQString KImportColumn::formatName(int format)
{
switch (format) {
case FormatPlain:
@@ -90,7 +90,7 @@ int KImportColumn::defaultFormat()
return mDefaultFormat;
}
-QString KImportColumn::preview(const QString &value, int format)
+TQString KImportColumn::preview(const TQString &value, int format)
{
if (format == FormatBracketed) {
return "(" + value + ")";
@@ -115,22 +115,22 @@ void KImportColumn::removeColId(int id)
mColIds.remove(id);
}
-QValueList<int> KImportColumn::colIdList()
+TQValueList<int> KImportColumn::colIdList()
{
return mColIds;
}
-QString KImportColumn::convert()
+TQString KImportColumn::convert()
{
- QValueList<int>::ConstIterator it = mColIds.begin();
+ TQValueList<int>::ConstIterator it = mColIds.begin();
if (it == mColIds.end()) return "";
else return mDialog->cell(*it);
}
-class ColumnItem : public QListViewItem {
+class ColumnItem : public TQListViewItem {
public:
- ColumnItem(KImportColumn *col,QListView *parent) : QListViewItem(parent), mColumn(col)
+ ColumnItem(KImportColumn *col,TQListView *parent) : TQListViewItem(parent), mColumn(col)
{
setText(0,mColumn->header());
}
@@ -148,36 +148,36 @@ class ColumnItem : public QListViewItem {
data objects, this class has to be inherited by a special class, which
reimplements the convertRow() function.
*/
-KImportDialog::KImportDialog(QWidget* parent)
+KImportDialog::KImportDialog(TQWidget* parent)
: KDialogBase(parent,"importdialog",true,i18n("Import Text File"),Ok|Cancel),
mSeparator(","),
mCurrentRow(0)
{
mData.setAutoDelete( true );
- QVBox *topBox = new QVBox(this);
+ TQVBox *topBox = new TQVBox(this);
setMainWidget(topBox);
topBox->setSpacing(spacingHint());
- QHBox *fileBox = new QHBox(topBox);
+ TQHBox *fileBox = new TQHBox(topBox);
fileBox->setSpacing(spacingHint());
- new QLabel(i18n("File to import:"),fileBox);
+ new TQLabel(i18n("File to import:"),fileBox);
KURLRequester *urlRequester = new KURLRequester(fileBox);
urlRequester->setFilter( "*.csv" );
- connect(urlRequester,SIGNAL(returnPressed(const QString &)),
- SLOT(setFile(const QString &)));
- connect(urlRequester,SIGNAL(urlSelected(const QString &)),
- SLOT(setFile(const QString &)));
- connect(urlRequester->lineEdit(),SIGNAL(textChanged ( const QString & )),
- SLOT(slotUrlChanged(const QString & )));
- mTable = new QTable(5,5,topBox);
+ connect(urlRequester,TQT_SIGNAL(returnPressed(const TQString &)),
+ TQT_SLOT(setFile(const TQString &)));
+ connect(urlRequester,TQT_SIGNAL(urlSelected(const TQString &)),
+ TQT_SLOT(setFile(const TQString &)));
+ connect(urlRequester->lineEdit(),TQT_SIGNAL(textChanged ( const TQString & )),
+ TQT_SLOT(slotUrlChanged(const TQString & )));
+ mTable = new TQTable(5,5,topBox);
mTable->setMinimumHeight( 150 );
- connect(mTable,SIGNAL(selectionChanged()),SLOT(tableSelected()));
+ connect(mTable,TQT_SIGNAL(selectionChanged()),TQT_SLOT(tableSelected()));
- QHBox *separatorBox = new QHBox( topBox );
+ TQHBox *separatorBox = new TQHBox( topBox );
separatorBox->setSpacing( spacingHint() );
- new QLabel( i18n( "Separator:" ), separatorBox );
+ new TQLabel( i18n( "Separator:" ), separatorBox );
mSeparatorCombo = new KComboBox( separatorBox );
mSeparatorCombo->insertItem( "," );
@@ -185,75 +185,75 @@ KImportDialog::KImportDialog(QWidget* parent)
mSeparatorCombo->insertItem( i18n( "Space" ) );
mSeparatorCombo->insertItem( "=" );
mSeparatorCombo->insertItem( ";" );
- connect(mSeparatorCombo, SIGNAL( activated(int) ),
- this, SLOT( separatorClicked(int) ) );
+ connect(mSeparatorCombo, TQT_SIGNAL( activated(int) ),
+ this, TQT_SLOT( separatorClicked(int) ) );
mSeparatorCombo->setCurrentItem( 0 );
- QHBox *rowsBox = new QHBox( topBox );
+ TQHBox *rowsBox = new TQHBox( topBox );
rowsBox->setSpacing( spacingHint() );
- new QLabel( i18n( "Import starts at row:" ), rowsBox );
- mStartRow = new QSpinBox( rowsBox );
+ new TQLabel( i18n( "Import starts at row:" ), rowsBox );
+ mStartRow = new TQSpinBox( rowsBox );
mStartRow->setMinValue( 1 );
/*
- new QLabel( i18n( "And ends at row:" ), rowsBox );
- mEndRow = new QSpinBox( rowsBox );
+ new TQLabel( i18n( "And ends at row:" ), rowsBox );
+ mEndRow = new TQSpinBox( rowsBox );
mEndRow->setMinValue( 1 );
*/
- QVBox *assignBox = new QVBox(topBox);
+ TQVBox *assignBox = new TQVBox(topBox);
assignBox->setSpacing(spacingHint());
- QHBox *listsBox = new QHBox(assignBox);
+ TQHBox *listsBox = new TQHBox(assignBox);
listsBox->setSpacing(spacingHint());
- mHeaderList = new QListView(listsBox);
+ mHeaderList = new TQListView(listsBox);
mHeaderList->addColumn(i18n("Header"));
- connect(mHeaderList, SIGNAL(selectionChanged(QListViewItem*)),
- this, SLOT(headerSelected(QListViewItem*)));
- connect(mHeaderList,SIGNAL(doubleClicked(QListViewItem*)),
- SLOT(assignColumn(QListViewItem *)));
+ connect(mHeaderList, TQT_SIGNAL(selectionChanged(TQListViewItem*)),
+ this, TQT_SLOT(headerSelected(TQListViewItem*)));
+ connect(mHeaderList,TQT_SIGNAL(doubleClicked(TQListViewItem*)),
+ TQT_SLOT(assignColumn(TQListViewItem *)));
mFormatCombo = new KComboBox( listsBox );
mFormatCombo->setDuplicatesEnabled( false );
- QPushButton *assignButton = new QPushButton(i18n("Assign to Selected Column"),
+ TQPushButton *assignButton = new TQPushButton(i18n("Assign to Selected Column"),
assignBox);
- connect(assignButton,SIGNAL(clicked()),SLOT(assignColumn()));
+ connect(assignButton,TQT_SIGNAL(clicked()),TQT_SLOT(assignColumn()));
- QPushButton *removeButton = new QPushButton(i18n("Remove Assignment From Selected Column"),
+ TQPushButton *removeButton = new TQPushButton(i18n("Remove Assignment From Selected Column"),
assignBox);
- connect(removeButton,SIGNAL(clicked()),SLOT(removeColumn()));
+ connect(removeButton,TQT_SIGNAL(clicked()),TQT_SLOT(removeColumn()));
- QPushButton *assignTemplateButton = new QPushButton(i18n("Assign with Template..."),
+ TQPushButton *assignTemplateButton = new TQPushButton(i18n("Assign with Template..."),
assignBox);
- connect(assignTemplateButton,SIGNAL(clicked()),SLOT(assignTemplate()));
+ connect(assignTemplateButton,TQT_SIGNAL(clicked()),TQT_SLOT(assignTemplate()));
- QPushButton *saveTemplateButton = new QPushButton(i18n("Save Current Template"),
+ TQPushButton *saveTemplateButton = new TQPushButton(i18n("Save Current Template"),
assignBox);
- connect(saveTemplateButton,SIGNAL(clicked()),SLOT(saveTemplate()));
+ connect(saveTemplateButton,TQT_SIGNAL(clicked()),TQT_SLOT(saveTemplate()));
resize(500,300);
- connect(this,SIGNAL(okClicked()),SLOT(applyConverter()));
- connect(this,SIGNAL(applyClicked()),SLOT(applyConverter()));
+ connect(this,TQT_SIGNAL(okClicked()),TQT_SLOT(applyConverter()));
+ connect(this,TQT_SIGNAL(applyClicked()),TQT_SLOT(applyConverter()));
enableButtonOK(!urlRequester->lineEdit()->text().isEmpty());
}
-void KImportDialog::slotUrlChanged(const QString & text)
+void KImportDialog::slotUrlChanged(const TQString & text)
{
enableButtonOK(!text.isEmpty());
}
-bool KImportDialog::setFile(const QString& file)
+bool KImportDialog::setFile(const TQString& file)
{
enableButtonOK(!file.isEmpty());
kdDebug(5300) << "KImportDialog::setFile(): " << file << endl;
- QFile f(file);
+ TQFile f(file);
if (f.open(IO_ReadOnly)) {
mFile = "";
- QTextStream t(&f);
+ TQTextStream t(&f);
mFile = t.read();
// while (!t.eof()) mFile.append(t.readLine());
f.close();
@@ -271,7 +271,7 @@ bool KImportDialog::setFile(const QString& file)
void KImportDialog::registerColumns()
{
- QPtrListIterator<KImportColumn> colIt(mColumns);
+ TQPtrListIterator<KImportColumn> colIt(mColumns);
for (; colIt.current(); ++colIt) {
new ColumnItem(*colIt,mHeaderList);
}
@@ -289,7 +289,7 @@ void KImportDialog::fillTable()
mTable->clearCell(row, column);
for ( row = 0; row < int(mData.count()); ++row ) {
- QValueVector<QString> *rowVector = mData[ row ];
+ TQValueVector<TQString> *rowVector = mData[ row ];
for( column = 0; column < int(rowVector->size()); ++column ) {
setCellText( row, column, rowVector->at( column ) );
}
@@ -306,15 +306,15 @@ void KImportDialog::readFile( int rows )
enum { S_START, S_QUOTED_FIELD, S_MAYBE_END_OF_QUOTED_FIELD, S_END_OF_QUOTED_FIELD,
S_MAYBE_NORMAL_FIELD, S_NORMAL_FIELD } state = S_START;
- QChar m_textquote = '"';
+ TQChar m_textquote = '"';
int m_startline = 0;
- QChar x;
- QString field = "";
+ TQChar x;
+ TQString field = "";
row = column = 0;
- QTextStream inputStream(mFile, IO_ReadOnly);
- inputStream.setEncoding(QTextStream::Locale);
+ TQTextStream inputStream(mFile, IO_ReadOnly);
+ inputStream.setEncoding(TQTextStream::Locale);
KProgressDialog pDialog(this, 0, i18n("Loading Progress"),
i18n("Please wait while the file is loaded."), true);
@@ -436,7 +436,7 @@ void KImportDialog::readFile( int rows )
fillTable();
}
-void KImportDialog::setCellText(int row, int col, const QString& text)
+void KImportDialog::setCellText(int row, int col, const TQString& text)
{
if (row < 0) return;
@@ -444,18 +444,18 @@ void KImportDialog::setCellText(int row, int col, const QString& text)
if ((mTable->numCols() - 1) < col) mTable->setNumCols(col + 1);
KImportColumn *c = mColumnDict.find(col);
- QString formattedText;
+ TQString formattedText;
if (c) formattedText = c->preview(text,findFormat(col));
else formattedText = text;
mTable->setText(row, col, formattedText);
}
-void KImportDialog::formatSelected(QListViewItem*)
+void KImportDialog::formatSelected(TQListViewItem*)
{
// kdDebug(5300) << "KImportDialog::formatSelected()" << endl;
}
-void KImportDialog::headerSelected(QListViewItem* item)
+void KImportDialog::headerSelected(TQListViewItem* item)
{
KImportColumn *col = ((ColumnItem *)item)->column();
@@ -463,16 +463,16 @@ void KImportDialog::headerSelected(QListViewItem* item)
mFormatCombo->clear();
- QValueList<int> formats = col->formats();
+ TQValueList<int> formats = col->formats();
- QValueList<int>::ConstIterator it = formats.begin();
- QValueList<int>::ConstIterator end = formats.end();
+ TQValueList<int>::ConstIterator it = formats.begin();
+ TQValueList<int>::ConstIterator end = formats.end();
while(it != end) {
mFormatCombo->insertItem( col->formatName(*it), *it - 1 );
++it;
}
- QTableSelection selection = mTable->selection(mTable->currentSelection());
+ TQTableSelection selection = mTable->selection(mTable->currentSelection());
updateFormatSelection(selection.leftCol());
}
@@ -489,9 +489,9 @@ void KImportDialog::updateFormatSelection(int column)
void KImportDialog::tableSelected()
{
- QTableSelection selection = mTable->selection(mTable->currentSelection());
+ TQTableSelection selection = mTable->selection(mTable->currentSelection());
- QListViewItem *item = mHeaderList->firstChild();
+ TQListViewItem *item = mHeaderList->firstChild();
KImportColumn *col = mColumnDict.find(selection.leftCol());
if (col) {
while(item) {
@@ -534,7 +534,7 @@ void KImportDialog::separatorClicked(int id)
readFile();
}
-void KImportDialog::assignColumn(QListViewItem *item)
+void KImportDialog::assignColumn(TQListViewItem *item)
{
if (!item) return;
@@ -543,7 +543,7 @@ void KImportDialog::assignColumn(QListViewItem *item)
ColumnItem *colItem = (ColumnItem *)item;
- QTableSelection selection = mTable->selection(mTable->currentSelection());
+ TQTableSelection selection = mTable->selection(mTable->currentSelection());
// kdDebug(5300) << " l: " << selection.leftCol() << " r: " << selection.rightCol() << endl;
@@ -567,15 +567,15 @@ void KImportDialog::assignColumn()
void KImportDialog::assignTemplate()
{
- QMap<uint,int> columnMap;
- QMap<QString, QString> fileMap;
- QStringList templates;
+ TQMap<uint,int> columnMap;
+ TQMap<TQString, TQString> fileMap;
+ TQStringList templates;
// load all template files
- QStringList list = KGlobal::dirs()->findAllResources( "data" , QString( kapp->name() ) +
+ TQStringList list = KGlobal::dirs()->findAllResources( "data" , TQString( kapp->name() ) +
"/csv-templates/*.desktop", true, true );
- for ( QStringList::iterator it = list.begin(); it != list.end(); ++it )
+ for ( TQStringList::iterator it = list.begin(); it != list.end(); ++it )
{
KSimpleConfig config( *it, true );
@@ -589,7 +589,7 @@ void KImportDialog::assignTemplate()
// let the user chose, what to take
bool ok = false;
- QString tmp;
+ TQString tmp;
tmp = KInputDialog::getItem( i18n( "Template Selection" ),
i18n( "Please select a template, that matches the CSV file:" ),
templates, 0, false, &ok, this );
@@ -605,7 +605,7 @@ void KImportDialog::assignTemplate()
// create the column map
config.setGroup( "csv column map" );
for ( uint i = 0; i < numColumns; ++i ) {
- int col = config.readNumEntry( QString::number( i ) );
+ int col = config.readNumEntry( TQString::number( i ) );
columnMap.insert( i, col );
}
@@ -626,13 +626,13 @@ void KImportDialog::assignTemplate()
void KImportDialog::removeColumn()
{
- QTableSelection selection = mTable->selection(mTable->currentSelection());
+ TQTableSelection selection = mTable->selection(mTable->currentSelection());
// kdDebug(5300) << " l: " << selection.leftCol() << " r: " << selection.rightCol() << endl;
for(int i=selection.leftCol();i<=selection.rightCol();++i) {
if (i >= 0) {
- mTable->horizontalHeader()->setLabel(i,QString::number(i+1));
+ mTable->horizontalHeader()->setLabel(i,TQString::number(i+1));
KImportColumn *col = mColumnDict.find(i);
if (col) {
mColumnDict.remove(i);
@@ -674,7 +674,7 @@ void KImportDialog::applyConverter()
int KImportDialog::findFormat(int column)
{
- QMap<int,int>::ConstIterator formatIt = mFormats.find(column);
+ TQMap<int,int>::ConstIterator formatIt = mFormats.find(column);
int format;
if (formatIt == mFormats.end()) format = KImportColumn::FormatUndefined;
else format = *formatIt;
@@ -684,7 +684,7 @@ int KImportDialog::findFormat(int column)
return format;
}
-QString KImportDialog::cell(uint col)
+TQString KImportDialog::cell(uint col)
{
if ( col >= mData[ mCurrentRow ]->size() ) return "";
else return data( mCurrentRow, col );
@@ -695,18 +695,18 @@ void KImportDialog::addColumn(KImportColumn *col)
mColumns.append(col);
}
-void KImportDialog::setData( uint row, uint col, const QString &value )
+void KImportDialog::setData( uint row, uint col, const TQString &value )
{
- QString val = value;
+ TQString val = value;
val.replace( "\\n", "\n" );
if ( row >= mData.count() ) {
mData.resize( row + 1 );
}
- QValueVector<QString> *rowVector = mData[ row ];
+ TQValueVector<TQString> *rowVector = mData[ row ];
if ( !rowVector ) {
- rowVector = new QValueVector<QString>;
+ rowVector = new TQValueVector<TQString>;
mData.insert( row, rowVector );
}
if ( col >= rowVector->size() ) {
@@ -720,15 +720,15 @@ void KImportDialog::setData( uint row, uint col, const QString &value )
rowVector->at( col ) = val;
}
-QString KImportDialog::data( uint row, uint col )
+TQString KImportDialog::data( uint row, uint col )
{
return mData[ row ]->at( col );
}
void KImportDialog::saveTemplate()
{
- QString fileName = KFileDialog::getSaveFileName(
- locateLocal( "data", QString( kapp->name() ) + "/csv-templates/" ),
+ TQString fileName = KFileDialog::getSaveFileName(
+ locateLocal( "data", TQString( kapp->name() ) + "/csv-templates/" ),
"*.desktop", this );
if ( fileName.isEmpty() )
@@ -737,7 +737,7 @@ void KImportDialog::saveTemplate()
if ( !fileName.contains( ".desktop" ) )
fileName += ".desktop";
- QString name = KInputDialog::getText( i18n( "Template Name" ), i18n( "Please enter a name for the template:" ) );
+ TQString name = KInputDialog::getText( i18n( "Template Name" ), i18n( "Please enter a name for the template:" ) );
if ( name.isEmpty() )
return;
@@ -755,11 +755,11 @@ void KImportDialog::saveTemplate()
KImportColumn *column;
uint counter = 0;
for ( column = mColumns.first(); column; column = mColumns.next() ) {
- QValueList<int> list = column->colIdList();
+ TQValueList<int> list = column->colIdList();
if ( list.count() > 0 )
- config.writeEntry( QString::number( counter ), list[ 0 ] );
+ config.writeEntry( TQString::number( counter ), list[ 0 ] );
else
- config.writeEntry( QString::number( counter ), -1 );
+ config.writeEntry( TQString::number( counter ), -1 );
counter++;
}
diff --git a/libkdepim/kimportdialog.h b/libkdepim/kimportdialog.h
index b372e6bfb..153da0347 100644
--- a/libkdepim/kimportdialog.h
+++ b/libkdepim/kimportdialog.h
@@ -22,11 +22,11 @@
#ifndef KIMPORTDIALOG_H
#define KIMPORTDIALOG_H
-#include <qintdict.h>
-#include <qstringlist.h>
-#include <qspinbox.h>
-#include <qptrvector.h>
-#include <qvaluevector.h>
+#include <tqintdict.h>
+#include <tqstringlist.h>
+#include <tqspinbox.h>
+#include <tqptrvector.h>
+#include <tqvaluevector.h>
#include <kdialogbase.h>
@@ -41,34 +41,34 @@ class KImportColumn
public:
enum { FormatUndefined = 0, FormatPlain, FormatUnquoted, FormatBracketed, FormatLast };
- KImportColumn(KImportDialog *dlg, const QString &header, int count = 0);
+ KImportColumn(KImportDialog *dlg, const TQString &header, int count = 0);
virtual ~KImportColumn() {}
- QString header() const { return m_header; }
+ TQString header() const { return m_header; }
- QValueList<int> formats();
- QString formatName(int format);
+ TQValueList<int> formats();
+ TQString formatName(int format);
int defaultFormat();
- QString convert();
-// virtual void convert(const QString &value,int format) = 0;
- QString preview(const QString &value,int format);
+ TQString convert();
+// virtual void convert(const TQString &value,int format) = 0;
+ TQString preview(const TQString &value,int format);
void addColId(int i);
void removeColId(int i);
- QValueList<int> colIdList();
+ TQValueList<int> colIdList();
protected:
private:
int m_maxCount, m_refCount;
- QString m_header;
- QValueList<int> mFormats;
+ TQString m_header;
+ TQValueList<int> mFormats;
int mDefaultFormat;
- QValueList<int> mColIds;
+ TQValueList<int> mColIds;
KImportDialog *mDialog;
};
@@ -77,12 +77,12 @@ class KImportDialog : public KDialogBase
{
Q_OBJECT
public:
- KImportDialog(QWidget* parent);
+ KImportDialog(TQWidget* parent);
public slots:
- bool setFile(const QString& file);
+ bool setFile(const TQString& file);
- QString cell(uint row);
+ TQString cell(uint row);
void addColumn(KImportColumn *);
@@ -97,40 +97,40 @@ class KImportDialog : public KDialogBase
protected slots:
void separatorClicked(int id);
- void formatSelected(QListViewItem* item);
- void headerSelected(QListViewItem* item);
- void assignColumn(QListViewItem *);
+ void formatSelected(TQListViewItem* item);
+ void headerSelected(TQListViewItem* item);
+ void assignColumn(TQListViewItem *);
void assignColumn();
void assignTemplate();
void removeColumn();
void applyConverter();
void tableSelected();
- void slotUrlChanged(const QString & );
+ void slotUrlChanged(const TQString & );
void saveTemplate();
private:
void updateFormatSelection(int column);
- void setCellText(int row, int col, const QString& text);
+ void setCellText(int row, int col, const TQString& text);
- void setData( uint row, uint col, const QString &text );
- QString data( uint row, uint col );
+ void setData( uint row, uint col, const TQString &text );
+ TQString data( uint row, uint col );
- QListView *mHeaderList;
- QSpinBox *mStartRow;
- QSpinBox *mEndRow;
- QTable *mTable;
+ TQListView *mHeaderList;
+ TQSpinBox *mStartRow;
+ TQSpinBox *mEndRow;
+ TQTable *mTable;
KComboBox *mFormatCombo;
KComboBox *mSeparatorCombo;
- QString mSeparator;
+ TQString mSeparator;
int mCurrentRow;
- QString mFile;
- QIntDict<KImportColumn> mColumnDict;
- QIntDict<uint> mTemplateDict;
- QMap<int,int> mFormats;
- QPtrList<KImportColumn> mColumns;
- QPtrVector<QValueVector<QString> > mData;
+ TQString mFile;
+ TQIntDict<KImportColumn> mColumnDict;
+ TQIntDict<uint> mTemplateDict;
+ TQMap<int,int> mFormats;
+ TQPtrList<KImportColumn> mColumns;
+ TQPtrVector<TQValueVector<TQString> > mData;
};
#endif
diff --git a/libkdepim/kincidencechooser.cpp b/libkdepim/kincidencechooser.cpp
index 0708cb4c4..53f72c886 100644
--- a/libkdepim/kincidencechooser.cpp
+++ b/libkdepim/kincidencechooser.cpp
@@ -22,17 +22,17 @@
without including the source code for Qt in the source distribution.
*/
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qbuttongroup.h>
-#include <qvbox.h>
-#include <qhbox.h>
-#include <qradiobutton.h>
-#include <qpushbutton.h>
-#include <qlayout.h>
-#include <qscrollview.h>
-#include <qtextbrowser.h>
-#include <qapplication.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqbuttongroup.h>
+#include <tqvbox.h>
+#include <tqhbox.h>
+#include <tqradiobutton.h>
+#include <tqpushbutton.h>
+#include <tqlayout.h>
+#include <tqscrollview.h>
+#include <tqtextbrowser.h>
+#include <tqapplication.h>
#include <klocale.h>
@@ -44,81 +44,81 @@
int KIncidenceChooser::chooseMode = KIncidenceChooser::ask ;
-KIncidenceChooser::KIncidenceChooser(QWidget *parent, char *name) :
+KIncidenceChooser::KIncidenceChooser(TQWidget *parent, char *name) :
KDialog(parent,name,true)
{
KDialog *topFrame = this;
- QGridLayout *topLayout = new QGridLayout(topFrame,5,3);
+ TQGridLayout *topLayout = new TQGridLayout(topFrame,5,3);
int iii = 0;
setCaption( i18n("Conflict Detected"));
- QLabel * lab;
- lab = new QLabel( i18n(
+ TQLabel * lab;
+ lab = new TQLabel( i18n(
"<qt>A conflict was detected. This probably means someone edited the same entry on the server while you changed it locally."
"<br/>NOTE: You have to check mail again to apply your changes to the server.</qt>"), topFrame);
topLayout->addMultiCellWidget(lab, iii,iii,0,2);
++iii;
- QHBox * b_box = new QHBox( topFrame );
+ TQHBox * b_box = new TQHBox( topFrame );
topLayout->addMultiCellWidget(b_box, iii,iii,0,2);
++iii;
- QPushButton* button = new QPushButton( i18n("Take Local"), b_box );
- connect ( button, SIGNAL( clicked()), this, SLOT (takeIncidence1() ) );
- button = new QPushButton( i18n("Take New"), b_box );
- connect ( button, SIGNAL( clicked()), this, SLOT (takeIncidence2() ) );
- button = new QPushButton( i18n("Take Both"), b_box );
- connect ( button, SIGNAL( clicked()), this, SLOT (takeBoth() ) );
+ TQPushButton* button = new TQPushButton( i18n("Take Local"), b_box );
+ connect ( button, TQT_SIGNAL( clicked()), this, TQT_SLOT (takeIncidence1() ) );
+ button = new TQPushButton( i18n("Take New"), b_box );
+ connect ( button, TQT_SIGNAL( clicked()), this, TQT_SLOT (takeIncidence2() ) );
+ button = new TQPushButton( i18n("Take Both"), b_box );
+ connect ( button, TQT_SIGNAL( clicked()), this, TQT_SLOT (takeBoth() ) );
topLayout->setSpacing(spacingHint());
topLayout->setMargin(marginHint());
// text is not translated, because text has to be set later
- mInc1lab = new QLabel ( i18n("Local incidence"), topFrame);
+ mInc1lab = new TQLabel ( i18n("Local incidence"), topFrame);
topLayout->addWidget(mInc1lab ,iii,0);
- mInc1Sumlab = new QLabel ( i18n("Local incidence summary"), topFrame);
+ mInc1Sumlab = new TQLabel ( i18n("Local incidence summary"), topFrame);
topLayout->addMultiCellWidget(mInc1Sumlab, iii,iii,1,2);
++iii;
- topLayout->addWidget( new QLabel ( i18n("Last modified:"), topFrame) ,iii,0);
- mMod1lab = new QLabel ( "Set Last modified", topFrame);
+ topLayout->addWidget( new TQLabel ( i18n("Last modified:"), topFrame) ,iii,0);
+ mMod1lab = new TQLabel ( "Set Last modified", topFrame);
topLayout->addWidget(mMod1lab,iii,1);
- showDetails1 = new QPushButton( i18n("Show Details"),topFrame );
- connect ( showDetails1, SIGNAL( clicked()), this, SLOT (showIncidence1() ) );
+ showDetails1 = new TQPushButton( i18n("Show Details"),topFrame );
+ connect ( showDetails1, TQT_SIGNAL( clicked()), this, TQT_SLOT (showIncidence1() ) );
topLayout->addWidget(showDetails1,iii,2);
++iii;
- mInc2lab = new QLabel ( "Local incidence", topFrame);
+ mInc2lab = new TQLabel ( "Local incidence", topFrame);
topLayout->addWidget(mInc2lab,iii,0);
- mInc2Sumlab = new QLabel ( "Local incidence summary", topFrame);
+ mInc2Sumlab = new TQLabel ( "Local incidence summary", topFrame);
topLayout->addMultiCellWidget(mInc2Sumlab, iii,iii,1,2);
++iii;
- topLayout->addWidget( new QLabel ( i18n("Last modified:"), topFrame) ,iii,0);
- mMod2lab = new QLabel ( "Set Last modified", topFrame);
+ topLayout->addWidget( new TQLabel ( i18n("Last modified:"), topFrame) ,iii,0);
+ mMod2lab = new TQLabel ( "Set Last modified", topFrame);
topLayout->addWidget(mMod2lab,iii,1);
- showDetails2 = new QPushButton( i18n("Show Details"), topFrame);
- connect ( showDetails2, SIGNAL( clicked()), this, SLOT (showIncidence2() ) );
+ showDetails2 = new TQPushButton( i18n("Show Details"), topFrame);
+ connect ( showDetails2, TQT_SIGNAL( clicked()), this, TQT_SLOT (showIncidence2() ) );
topLayout->addWidget(showDetails2,iii,2);
++iii;
//
#if 0
// commented out for now, because the diff code has too many bugs
- diffBut = new QPushButton( i18n("Show Differences"), topFrame );
- connect ( diffBut, SIGNAL( clicked()), this, SLOT ( showDiff() ) );
+ diffBut = new TQPushButton( i18n("Show Differences"), topFrame );
+ connect ( diffBut, TQT_SIGNAL( clicked()), this, TQT_SLOT ( showDiff() ) );
topLayout->addMultiCellWidget(diffBut, iii,iii,0,2);
++iii;
#else
diffBut = 0;
#endif
- mBg = new QButtonGroup ( 1, Qt::Horizontal, i18n("Sync Preferences"), topFrame);
+ mBg = new TQButtonGroup ( 1, Qt::Horizontal, i18n("Sync Preferences"), topFrame);
topLayout->addMultiCellWidget(mBg, iii,iii,0,2);
++iii;
- mBg->insert( new QRadioButton ( i18n("Take local entry on conflict"), mBg ), KIncidenceChooser::local);
- mBg->insert( new QRadioButton ( i18n("Take new (remote) entry on conflict"), mBg ), KIncidenceChooser::remote);
- mBg->insert( new QRadioButton ( i18n("Take newest entry on conflict"), mBg ), KIncidenceChooser::newest );
- mBg->insert( new QRadioButton ( i18n("Ask for every entry on conflict"), mBg ),KIncidenceChooser::ask );
- mBg->insert( new QRadioButton ( i18n("Take both on conflict"), mBg ), KIncidenceChooser::both );
+ mBg->insert( new TQRadioButton ( i18n("Take local entry on conflict"), mBg ), KIncidenceChooser::local);
+ mBg->insert( new TQRadioButton ( i18n("Take new (remote) entry on conflict"), mBg ), KIncidenceChooser::remote);
+ mBg->insert( new TQRadioButton ( i18n("Take newest entry on conflict"), mBg ), KIncidenceChooser::newest );
+ mBg->insert( new TQRadioButton ( i18n("Ask for every entry on conflict"), mBg ),KIncidenceChooser::ask );
+ mBg->insert( new TQRadioButton ( i18n("Take both on conflict"), mBg ), KIncidenceChooser::both );
mBg->setButton ( chooseMode );
mTbL = 0;
mTbN = 0;
mDisplayDiff = 0;
choosedIncidence = 0;
- button = new QPushButton( i18n("Apply This to All Conflicts of This Sync"), topFrame );
- connect ( button, SIGNAL( clicked()), this, SLOT ( setSyncMode() ) );
+ button = new TQPushButton( i18n("Apply This to All Conflicts of This Sync"), topFrame );
+ connect ( button, TQT_SIGNAL( clicked()), this, TQT_SLOT ( setSyncMode() ) );
topLayout->addMultiCellWidget(button, iii,iii,0,2);
}
@@ -165,21 +165,21 @@ void KIncidenceChooser::setSyncMode()
{
chooseMode = mBg->selectedId ();
if ( chooseMode != KIncidenceChooser::ask )
- QDialog::accept();
+ TQDialog::accept();
}
void KIncidenceChooser::useGlobalMode()
{
if ( chooseMode != KIncidenceChooser::ask )
- QDialog::reject();
+ TQDialog::reject();
}
void KIncidenceChooser::setLabels()
{
KCal::Incidence* inc = mInc1;
- QLabel* des = mInc1lab;
- QLabel * sum = mInc1Sumlab;
+ TQLabel* des = mInc1lab;
+ TQLabel * sum = mInc1Sumlab;
if ( inc->type() == "Event" ) {
@@ -237,8 +237,8 @@ void KIncidenceChooser::showIncidence1()
}
mTbL = new KDialogBase( this, "", false /*not modal*/, mInc1lab->text(), KDialogBase::Ok );
mTbL->setEscapeButton( KDialogBase::Ok );
- connect( mTbL, SIGNAL( okClicked() ), this, SLOT( detailsDialogClosed() ) );
- QTextBrowser* textBrowser = new QTextBrowser( mTbL );
+ connect( mTbL, TQT_SIGNAL( okClicked() ), this, TQT_SLOT( detailsDialogClosed() ) );
+ TQTextBrowser* textBrowser = new TQTextBrowser( mTbL );
mTbL->setMainWidget( textBrowser );
textBrowser->setText( KCal::IncidenceFormatter::extensiveDisplayString( mInc1 ) );
mTbL->setMinimumSize( 400, 400 );
@@ -249,7 +249,7 @@ void KIncidenceChooser::showIncidence1()
void KIncidenceChooser::detailsDialogClosed()
{
- KDialogBase* dialog = static_cast<KDialogBase *>( const_cast<QObject *>( sender() ) );
+ KDialogBase* dialog = static_cast<KDialogBase *>( const_cast<TQObject *>( sender() ) );
if ( dialog == mTbL )
showDetails1->setText( i18n( "Show details..." ) );
else
@@ -293,8 +293,8 @@ void KIncidenceChooser::showIncidence2()
}
mTbN = new KDialogBase( this, "", false /*not modal*/, mInc2lab->text(), KDialogBase::Ok );
mTbN->setEscapeButton( KDialogBase::Ok );
- connect( mTbN, SIGNAL( okClicked() ), this, SLOT( detailsDialogClosed() ) );
- QTextBrowser* textBrowser = new QTextBrowser( mTbN );
+ connect( mTbN, TQT_SIGNAL( okClicked() ), this, TQT_SLOT( detailsDialogClosed() ) );
+ TQTextBrowser* textBrowser = new TQTextBrowser( mTbN );
mTbN->setMainWidget( textBrowser );
textBrowser->setText( KCal::IncidenceFormatter::extensiveDisplayString( mInc2 ) );
mTbN->setMinimumSize( 400, 400 );
@@ -306,20 +306,20 @@ void KIncidenceChooser::showIncidence2()
void KIncidenceChooser::takeIncidence1()
{
choosedIncidence = mInc1;
- QDialog::accept();
+ TQDialog::accept();
}
void KIncidenceChooser::takeIncidence2()
{
choosedIncidence = mInc2;
- QDialog::accept();
+ TQDialog::accept();
}
void KIncidenceChooser::takeBoth()
{
choosedIncidence = 0;
- QDialog::accept();
+ TQDialog::accept();
}
diff --git a/libkdepim/kincidencechooser.h b/libkdepim/kincidencechooser.h
index 31ea47bb5..9ecf4cc58 100644
--- a/libkdepim/kincidencechooser.h
+++ b/libkdepim/kincidencechooser.h
@@ -26,8 +26,8 @@
#include <kdialogbase.h>
-#include <qptrlist.h>
-#include <qmutex.h>
+#include <tqptrlist.h>
+#include <tqmutex.h>
#include <kdepimmacros.h>
#include <libkcal/incidence.h>
@@ -51,9 +51,9 @@ class KDE_EXPORT KIncidenceChooser : public KDialog
public:
enum mode { local, remote, newest, ask, both };
/** Initialize dialog and pages */
- KIncidenceChooser(QWidget *parent=0,char *name=0);
+ KIncidenceChooser(TQWidget *parent=0,char *name=0);
~KIncidenceChooser();
- //void setChooseText( QString );
+ //void setChooseText( TQString );
void setIncidence( KCal::Incidence*,KCal::Incidence*);
KCal::Incidence* getIncidence();
static int chooseMode;
@@ -79,9 +79,9 @@ private:
KDialogBase* mTbL, *mTbN;
KCal::Incidence* choosedIncidence;
KCal::Incidence* mInc1, *mInc2;
- QButtonGroup *mBg;
- QPushButton *diffBut,*showDetails1,*showDetails2;
- QLabel* mInc1lab, *mInc2lab,* mInc1Sumlab, *mInc2Sumlab,*mMod1lab,*mMod2lab;
+ TQButtonGroup *mBg;
+ TQPushButton *diffBut,*showDetails1,*showDetails2;
+ TQLabel* mInc1lab, *mInc2lab,* mInc1Sumlab, *mInc2Sumlab,*mMod1lab,*mMod2lab;
};
diff --git a/libkdepim/kmailcompletion.cpp b/libkdepim/kmailcompletion.cpp
index 41d2f2ce8..b7c37852c 100644
--- a/libkdepim/kmailcompletion.cpp
+++ b/libkdepim/kmailcompletion.cpp
@@ -22,7 +22,7 @@
#include "kmailcompletion.h"
#include <kdebug.h>
-#include <qregexp.h>
+#include <tqregexp.h>
using namespace KPIM;
@@ -37,22 +37,22 @@ void KMailCompletion::clear()
KCompletion::clear();
}
-QString KMailCompletion::makeCompletion( const QString &string )
+TQString KMailCompletion::makeCompletion( const TQString &string )
{
- QString match = KCompletion::makeCompletion( string );
+ TQString match = KCompletion::makeCompletion( string );
// this should be in postProcessMatch, but postProcessMatch is const and will not allow nextMatch
if ( !match.isEmpty() ){
- const QString firstMatch( match );
- while ( match.find( QRegExp( "(@)|(<.*>)" ) ) == -1 ) {
+ const TQString firstMatch( match );
+ while ( match.find( TQRegExp( "(@)|(<.*>)" ) ) == -1 ) {
/* local email do not require @domain part, if match is an address we'll find
* last+first <match> in m_keyMap and we'll know that match is already a valid email.
*
* Distribution list do not have last+first <match> entry, they will be in mailAddr
*/
- const QStringList &mailAddr = m_keyMap[ match ]; //get all mailAddr for this keyword
+ const TQStringList &mailAddr = m_keyMap[ match ]; //get all mailAddr for this keyword
bool isEmail = false;
- for ( QStringList::ConstIterator sit ( mailAddr.begin() ), sEnd( mailAddr.end() ); sit != sEnd; ++sit )
+ for ( TQStringList::ConstIterator sit ( mailAddr.begin() ), sEnd( mailAddr.end() ); sit != sEnd; ++sit )
if ( (*sit).find( "<" + match + ">" ) != -1 || (*sit) == match ) {
isEmail = true;
break;
@@ -62,7 +62,7 @@ QString KMailCompletion::makeCompletion( const QString &string )
// match is a keyword, skip it and try to find match <email@domain>
match = nextMatch();
if ( firstMatch == match ){
- match = QString::null;
+ match = TQString::null;
break;
}
} else
@@ -72,29 +72,29 @@ QString KMailCompletion::makeCompletion( const QString &string )
return match;
}
-void KMailCompletion::addItemWithKeys( const QString& email, int weight, const QStringList* keyWords)
+void KMailCompletion::addItemWithKeys( const TQString& email, int weight, const TQStringList* keyWords)
{
Q_ASSERT( keyWords != 0 );
- for ( QStringList::ConstIterator it( keyWords->begin() ); it != keyWords->end(); ++it ) {
- QStringList &emailList = m_keyMap[ (*it) ]; //lookup email-list for given keyword
+ for ( TQStringList::ConstIterator it( keyWords->begin() ); it != keyWords->end(); ++it ) {
+ TQStringList &emailList = m_keyMap[ (*it) ]; //lookup email-list for given keyword
if ( emailList.find( email ) == emailList.end() ) //add email if not there
emailList.append( email );
addItem( (*it),weight ); //inform KCompletion about keyword
}
}
-void KMailCompletion::postProcessMatches( QStringList * pMatches )const
+void KMailCompletion::postProcessMatches( TQStringList * pMatches )const
{
Q_ASSERT( pMatches != 0 );
if ( pMatches->isEmpty() )
return;
//KCompletion has found the keywords for us, we can now map them to mail-addr
- QMap< QString, bool > mailAddrDistinct; //TODO replace with QSet in KDE4
- for ( QStringList::ConstIterator sit ( pMatches->begin() ), sEnd( pMatches->end() ); sit != sEnd; ++sit ) {
- const QStringList &mailAddr = m_keyMap[ (*sit) ]; //get all mailAddr for this keyword
- for ( QStringList::ConstIterator sit ( mailAddr.begin() ), sEnd( mailAddr.end() ); sit != sEnd; ++sit ) {
- mailAddrDistinct[ (*sit) ] = true; //store mailAddr, QMap will make them unique
+ TQMap< TQString, bool > mailAddrDistinct; //TODO replace with QSet in KDE4
+ for ( TQStringList::ConstIterator sit ( pMatches->begin() ), sEnd( pMatches->end() ); sit != sEnd; ++sit ) {
+ const TQStringList &mailAddr = m_keyMap[ (*sit) ]; //get all mailAddr for this keyword
+ for ( TQStringList::ConstIterator sit ( mailAddr.begin() ), sEnd( mailAddr.end() ); sit != sEnd; ++sit ) {
+ mailAddrDistinct[ (*sit) ] = true; //store mailAddr, TQMap will make them unique
}
}
pMatches->clear(); //delete keywords
diff --git a/libkdepim/kmailcompletion.h b/libkdepim/kmailcompletion.h
index c8db7bea3..e56eb77cd 100644
--- a/libkdepim/kmailcompletion.h
+++ b/libkdepim/kmailcompletion.h
@@ -22,8 +22,8 @@
#ifndef KPIM_KMAILCOMPLETION_H
#define KPIM_KMAILCOMPLETION_H
-#include <qmap.h>
-#include <qstringlist.h>
+#include <tqmap.h>
+#include <tqstringlist.h>
#include "kcompletion.h"
@@ -51,7 +51,7 @@ class KMailCompletion : public KCompletion
*
* @returns email address
*/
- QString makeCompletion( const QString &string );
+ TQString makeCompletion( const TQString &string );
/**
* Specify keywords for email.
@@ -62,15 +62,15 @@ class KMailCompletion : public KCompletion
* \li contains <email>
* or if they have also been added with this function.
*/
- void addItemWithKeys( const QString& email, int weight, const QStringList * keyWords);
+ void addItemWithKeys( const TQString& email, int weight, const TQStringList * keyWords);
/**
* Uses an internal map to replace all keywords in pMatches whith corrsesponding email addresses.
*/
- virtual void postProcessMatches( QStringList * pMatches )const;
+ virtual void postProcessMatches( TQStringList * pMatches )const;
private:
- QMap< QString, QStringList > m_keyMap;
+ TQMap< TQString, TQStringList > m_keyMap;
};
}
diff --git a/libkdepim/komposer/core/attachment.cpp b/libkdepim/komposer/core/attachment.cpp
index f5b936c0c..f8240380e 100644
--- a/libkdepim/komposer/core/attachment.cpp
+++ b/libkdepim/komposer/core/attachment.cpp
@@ -26,24 +26,24 @@ using namespace Komposer;
class Attachment::Private
{
public:
- QString name;
- QCString cte;
- QByteArray data;
- QCString type;
- QCString subType;
- QCString paramAttr;
- QString paramValue;
- QCString contDisp;
+ TQString name;
+ TQCString cte;
+ TQByteArray data;
+ TQCString type;
+ TQCString subType;
+ TQCString paramAttr;
+ TQString paramValue;
+ TQCString contDisp;
};
-Attachment::Attachment( const QString &name,
- const QCString &cte,
- const QByteArray &data,
- const QCString &type,
- const QCString &subType,
- const QCString &paramAttr,
- const QString &paramValue,
- const QCString &contDisp )
+Attachment::Attachment( const TQString &name,
+ const TQCString &cte,
+ const TQByteArray &data,
+ const TQCString &type,
+ const TQCString &subType,
+ const TQCString &paramAttr,
+ const TQString &paramValue,
+ const TQCString &contDisp )
: d( new Private )
{
d->name = name;
diff --git a/libkdepim/komposer/core/attachment.h b/libkdepim/komposer/core/attachment.h
index fc19fb2da..5c4e1ebf2 100644
--- a/libkdepim/komposer/core/attachment.h
+++ b/libkdepim/komposer/core/attachment.h
@@ -22,9 +22,9 @@
#ifndef KOMPOSER_ATTACHMENT_H
#define KOMPOSER_ATTACHMENT_H
-#include <qstring.h>
-#include <qcstring.h>
-#include <qvaluelist.h>
+#include <tqstring.h>
+#include <tqcstring.h>
+#include <tqvaluelist.h>
namespace Komposer
{
@@ -32,30 +32,30 @@ namespace Komposer
class Attachment
{
public:
- Attachment( const QString &name,
- const QCString &cte,
- const QByteArray &data,
- const QCString &type,
- const QCString &subType,
- const QCString &paramAttr,
- const QString &paramValue,
- const QCString &contDisp );
+ Attachment( const TQString &name,
+ const TQCString &cte,
+ const TQByteArray &data,
+ const TQCString &type,
+ const TQCString &subType,
+ const TQCString &paramAttr,
+ const TQString &paramValue,
+ const TQCString &contDisp );
~Attachment();
- QString name() const;
- QCString cte() const;
- QByteArray data() const;
- QCString type() const;
- QCString subType() const;
- QCString paramAttr() const;
- QString paramValue() const;
- QCString contentDisposition() const;
+ TQString name() const;
+ TQCString cte() const;
+ TQByteArray data() const;
+ TQCString type() const;
+ TQCString subType() const;
+ TQCString paramAttr() const;
+ TQString paramValue() const;
+ TQCString contentDisposition() const;
private:
class Private;
Private *d;
};
- typedef QValueList<Attachment> AttachmentList;
+ typedef TQValueList<Attachment> AttachmentList;
}
#endif
diff --git a/libkdepim/komposer/core/core.cpp b/libkdepim/komposer/core/core.cpp
index 6a14fdb38..f93e59cc9 100644
--- a/libkdepim/komposer/core/core.cpp
+++ b/libkdepim/komposer/core/core.cpp
@@ -47,13 +47,13 @@
#include <kstdaccel.h>
#include <kdebug.h>
-#include <qwidgetstack.h>
-#include <qhbox.h>
-#include <qwidget.h>
+#include <tqwidgetstack.h>
+#include <tqhbox.h>
+#include <tqwidget.h>
using namespace Komposer;
-Core::Core( QWidget *parent, const char *name )
+Core::Core( TQWidget *parent, const char *name )
: KomposerIface( "KomposerIface" ),
KMainWindow( parent, name ), m_currentEditor( 0 )
{
@@ -118,9 +118,9 @@ Core::slotPluginLoaded( Plugin *plugin )
void
Core::slotAllPluginsLoaded()
{
- QValueList<KPluginInfo*> plugins = m_pluginManager->availablePlugins();
+ TQValueList<KPluginInfo*> plugins = m_pluginManager->availablePlugins();
kdDebug()<<"Number of available plugins is "<< plugins.count() <<endl;
- for ( QValueList<KPluginInfo*>::iterator it = plugins.begin(); it != plugins.end(); ++it ) {
+ for ( TQValueList<KPluginInfo*>::iterator it = plugins.begin(); it != plugins.end(); ++it ) {
KPluginInfo *i = ( *it );
kdDebug()<<"\tAvailable plugin "<< i->pluginName()
<<", comment = "<< i->comment() <<endl;
@@ -156,13 +156,13 @@ Core::selectEditor( Komposer::Editor *editor )
editor->select();
- QPtrList<KParts::Part> *partList = const_cast<QPtrList<KParts::Part>*>(
+ TQPtrList<KParts::Part> *partList = const_cast<TQPtrList<KParts::Part>*>(
m_partManager->parts() );
if ( partList->find( part ) == -1 )
addPart( part );
m_partManager->setActivePart( part );
- QWidget *view = part->widget();
+ TQWidget *view = part->widget();
Q_ASSERT( view );
kdDebug()<<"Raising view "<<view<<endl;
@@ -176,7 +176,7 @@ Core::selectEditor( Komposer::Editor *editor )
}
void
-Core::selectEditor( const QString &editorName )
+Core::selectEditor( const TQString &editorName )
{
}
@@ -217,19 +217,19 @@ void
Core::initWidgets()
{
statusBar()->show();
- QHBox *topWidget = new QHBox( this );
+ TQHBox *topWidget = new TQHBox( this );
setCentralWidget( topWidget );
- m_stack = new QWidgetStack( topWidget );
+ m_stack = new TQWidgetStack( topWidget );
}
void
Core::initCore()
{
m_pluginManager = new PluginManager( this );
- connect( m_pluginManager, SIGNAL(pluginLoaded(Plugin*)),
- SLOT(slotPluginLoaded(Plugin*)) );
- connect( m_pluginManager, SIGNAL(allPluginsLoaded()),
- SLOT(slotAllPluginsLoaded()) );
+ connect( m_pluginManager, TQT_SIGNAL(pluginLoaded(Plugin*)),
+ TQT_SLOT(slotPluginLoaded(Plugin*)) );
+ connect( m_pluginManager, TQT_SIGNAL(allPluginsLoaded()),
+ TQT_SLOT(slotAllPluginsLoaded()) );
m_pluginManager->loadAllPlugins();
@@ -239,39 +239,39 @@ Core::initCore()
void
Core::initConnections()
{
- connect( kapp, SIGNAL(shutDown()),
- SLOT(slotQuit()) );
+ connect( kapp, TQT_SIGNAL(shutDown()),
+ TQT_SLOT(slotQuit()) );
}
void
Core::createActions()
{
- KStdAction::close( this, SLOT(slotClose()), actionCollection() );
+ KStdAction::close( this, TQT_SLOT(slotClose()), actionCollection() );
(void) new KAction( i18n( "&Send" ), "mail_send", CTRL+Key_Return,
- this, SLOT(slotSendNow()), actionCollection(),
+ this, TQT_SLOT(slotSendNow()), actionCollection(),
"send_default" );
(void) new KAction( i18n( "&Queue" ), "queue", 0,
- this, SLOT(slotSendLater()),
+ this, TQT_SLOT(slotSendLater()),
actionCollection(), "send_alternative" );
(void) new KAction( i18n( "Save in &Drafts Folder" ), "filesave", 0,
- this, SLOT(slotSaveDraft()),
+ this, TQT_SLOT(slotSaveDraft()),
actionCollection(), "save_in_drafts" );
(void) new KAction( i18n( "&Insert File..." ), "fileopen", 0,
- this, SLOT(slotInsertFile()),
+ this, TQT_SLOT(slotInsertFile()),
actionCollection(), "insert_file" );
(void) new KAction( i18n( "&Address Book" ), "contents",0,
- this, SLOT(slotAddrBook()),
+ this, TQT_SLOT(slotAddrBook()),
actionCollection(), "addressbook" );
(void) new KAction( i18n( "&New Composer" ), "mail_new",
KStdAccel::shortcut( KStdAccel::New ),
- this, SLOT(slotNewComposer()),
+ this, TQT_SLOT(slotNewComposer()),
actionCollection(), "new_composer" );
(void) new KAction( i18n( "&Attach File..." ), "attach",
- 0, this, SLOT(slotAttachFile()),
+ 0, this, TQT_SLOT(slotAttachFile()),
actionCollection(), "attach_file" );
}
@@ -330,26 +330,26 @@ Core::send( int how )
}
void
-Core::addAttachment( const KURL &url, const QString &comment )
+Core::addAttachment( const KURL &url, const TQString &comment )
{
}
void
-Core::setBody( const QString &body )
+Core::setBody( const TQString &body )
{
m_currentEditor->setText( body );
}
void
-Core::addAttachment( const QString &name,
- const QCString &cte,
- const QByteArray &data,
- const QCString &type,
- const QCString &subType,
- const QCString &paramAttr,
- const QString &paramValue,
- const QCString &contDisp )
+Core::addAttachment( const TQString &name,
+ const TQCString &cte,
+ const TQByteArray &data,
+ const TQCString &type,
+ const TQCString &subType,
+ const TQCString &paramAttr,
+ const TQString &paramValue,
+ const TQCString &contDisp )
{
}
diff --git a/libkdepim/komposer/core/core.h b/libkdepim/komposer/core/core.h
index 0c5149610..3719b912c 100644
--- a/libkdepim/komposer/core/core.h
+++ b/libkdepim/komposer/core/core.h
@@ -25,7 +25,7 @@
#include "komposerIface.h"
#include <kmainwindow.h>
-#include <qptrlist.h>
+#include <tqptrlist.h>
namespace KSettings {
class Dialog;
@@ -46,21 +46,21 @@ namespace Komposer
{
Q_OBJECT
public:
- Core( QWidget *parentWidget = 0, const char *name = 0 );
+ Core( TQWidget *parentWidget = 0, const char *name = 0 );
virtual ~Core();
public slots:
virtual void send( int how );
- virtual void addAttachment( const KURL &url, const QString &comment );
- virtual void setBody( const QString &body );
- virtual void addAttachment( const QString &name,
- const QCString &cte,
- const QByteArray &data,
- const QCString &type,
- const QCString &subType,
- const QCString &paramAttr,
- const QString &paramValue,
- const QCString &contDisp );
+ virtual void addAttachment( const KURL &url, const TQString &comment );
+ virtual void setBody( const TQString &body );
+ virtual void addAttachment( const TQString &name,
+ const TQCString &cte,
+ const TQByteArray &data,
+ const TQCString &type,
+ const TQCString &subType,
+ const TQCString &paramAttr,
+ const TQString &paramValue,
+ const TQCString &contDisp );
@@ -92,7 +92,7 @@ namespace Komposer
void addPlugin( Komposer::Plugin *plugin );
private:
- QWidgetStack *m_stack;
+ TQWidgetStack *m_stack;
Editor *m_currentEditor;
PluginManager *m_pluginManager;
diff --git a/libkdepim/komposer/core/corewidget.cpp b/libkdepim/komposer/core/corewidget.cpp
index 74fa92375..c65893766 100644
--- a/libkdepim/komposer/core/corewidget.cpp
+++ b/libkdepim/komposer/core/corewidget.cpp
@@ -24,8 +24,8 @@
using namespace Komposer;
-CoreWidget::CoreWidget( QWidget *parent, const char *name )
- : QWidget( parent, name )
+CoreWidget::CoreWidget( TQWidget *parent, const char *name )
+ : TQWidget( parent, name )
{
}
diff --git a/libkdepim/komposer/core/corewidget.h b/libkdepim/komposer/core/corewidget.h
index b4166d8a0..8b07a0a7a 100644
--- a/libkdepim/komposer/core/corewidget.h
+++ b/libkdepim/komposer/core/corewidget.h
@@ -24,7 +24,7 @@
#include "attachment.h"
-#include <qwidget.h>
+#include <tqwidget.h>
namespace Komposer
{
@@ -33,14 +33,14 @@ namespace Komposer
{
Q_OBJECT
public:
- CoreWidget( QWidget *parent, const char *name=0 );
+ CoreWidget( TQWidget *parent, const char *name=0 );
- virtual QString subject() const =0;
- virtual QStringList to() const =0;
- virtual QStringList cc() const =0;
- virtual QStringList bcc() const =0;
- virtual QString from() const =0;
- virtual QString replyTo() const =0;
+ virtual TQString subject() const =0;
+ virtual TQStringList to() const =0;
+ virtual TQStringList cc() const =0;
+ virtual TQStringList bcc() const =0;
+ virtual TQString from() const =0;
+ virtual TQString replyTo() const =0;
virtual AttachmentList attachments() const =0;
};
}
diff --git a/libkdepim/komposer/core/editor.cpp b/libkdepim/komposer/core/editor.cpp
index 2e3bfd51b..5dada393f 100644
--- a/libkdepim/komposer/core/editor.cpp
+++ b/libkdepim/komposer/core/editor.cpp
@@ -27,10 +27,10 @@ namespace Komposer {
class Editor::Private {
public:
- QString id;
+ TQString id;
};
-Editor::Editor( QObject *parent, const char *name, const QStringList &args )
+Editor::Editor( TQObject *parent, const char *name, const TQStringList &args )
: Plugin( parent, name, args ), d( new Private )
{
}
diff --git a/libkdepim/komposer/core/editor.h b/libkdepim/komposer/core/editor.h
index 3b8d601a5..a5b78915d 100644
--- a/libkdepim/komposer/core/editor.h
+++ b/libkdepim/komposer/core/editor.h
@@ -25,7 +25,7 @@
#include "plugin.h"
-#include <qstringlist.h>
+#include <tqstringlist.h>
namespace KParts {
class Part;
@@ -50,14 +50,14 @@ namespace Komposer {
* This is the magic function that all derivatives have to reimplement.
* It returns the actual editor component.
*/
- virtual QWidget *widget() =0;
+ virtual TQWidget *widget() =0;
int supportedTextFormats() const;
/**
* Returns the full text inside the editor.
*/
- virtual QString text() const =0;
+ virtual TQString text() const =0;
/**
* This function is called when the plugin is selected by the user before the
@@ -66,7 +66,7 @@ namespace Komposer {
virtual void select();
/**
- * Reimplement this method and return a @ref QStringList of all config
+ * Reimplement this method and return a @ref TQStringList of all config
* modules your application part should offer via Komposer. Note that the
* part and the module will have to take care for config syncing themselves.
* Usually @p DCOP used for that purpose.
@@ -74,7 +74,7 @@ namespace Komposer {
* @note Make sure you offer the modules in the form:
* <code>"pathrelativetosettings/mysettings.desktop"</code>
*/
- virtual QStringList configModules() const { return QStringList(); }
+ virtual TQStringList configModules() const { return TQStringList(); }
public slots:
@@ -83,16 +83,16 @@ namespace Komposer {
* Most commonly used on replaying.
* If any text is present if will be deleted.
*/
- virtual void setText( const QString &txt ) =0;
+ virtual void setText( const TQString &txt ) =0;
/**
* Changes currently used signature. If no signature is present
* a new one should be appened.
*/
- virtual void changeSignature( const QString &txt ) =0;
+ virtual void changeSignature( const TQString &txt ) =0;
protected:
- Editor( QObject *parent, const char *name, const QStringList &args );
+ Editor( TQObject *parent, const char *name, const TQStringList &args );
private:
class Private;
diff --git a/libkdepim/komposer/core/komposerIface.h b/libkdepim/komposer/core/komposerIface.h
index bf8877c6a..eecab2f3a 100644
--- a/libkdepim/komposer/core/komposerIface.h
+++ b/libkdepim/komposer/core/komposerIface.h
@@ -47,12 +47,12 @@ k_dcop:
/**
Add url as attachment with a user-defined comment.
*/
- virtual void addAttachment( const KURL &url, const QString &comment) = 0;
+ virtual void addAttachment( const KURL &url, const TQString &comment) = 0;
/**
Set message body.
*/
- virtual void setBody( const QString &body ) = 0;
+ virtual void setBody( const TQString &body ) = 0;
/**
Add attachment.
@@ -66,14 +66,14 @@ k_dcop:
@param paramValue Value of parameter of content type
@param contDisp Content disposition
*/
- virtual void addAttachment( const QString &name,
- const QCString &cte,
- const QByteArray &data,
- const QCString &type,
- const QCString &subType,
- const QCString &paramAttr,
- const QString &paramValue,
- const QCString &contDisp ) = 0;
+ virtual void addAttachment( const TQString &name,
+ const TQCString &cte,
+ const TQByteArray &data,
+ const TQCString &type,
+ const TQCString &subType,
+ const TQCString &paramAttr,
+ const TQString &paramValue,
+ const TQCString &contDisp ) = 0;
public:
KomposerIface( const char *name )
: DCOPObject( name )
diff --git a/libkdepim/komposer/core/plugin.cpp b/libkdepim/komposer/core/plugin.cpp
index 5706b0d08..41af47cd9 100644
--- a/libkdepim/komposer/core/plugin.cpp
+++ b/libkdepim/komposer/core/plugin.cpp
@@ -24,7 +24,7 @@
#include "core.h"
#include <kdebug.h>
-#include <qstring.h>
+#include <tqstring.h>
namespace Komposer
{
@@ -35,8 +35,8 @@ public:
//Core* core;
};
-Plugin::Plugin( QObject *parent, const char *name, const QStringList & )
- : QObject( parent, name ), d( new Private )
+Plugin::Plugin( TQObject *parent, const char *name, const TQStringList & )
+ : TQObject( parent, name ), d( new Private )
{
//d->core = core;
}
diff --git a/libkdepim/komposer/core/plugin.h b/libkdepim/komposer/core/plugin.h
index 402a7bc81..2dddd09f4 100644
--- a/libkdepim/komposer/core/plugin.h
+++ b/libkdepim/komposer/core/plugin.h
@@ -22,14 +22,14 @@
#ifndef KOMPOSER_PLUGIN_H
#define KOMPOSER_PLUGIN_H
-#include <qobject.h>
+#include <tqobject.h>
#include <kxmlguiclient.h>
namespace Komposer
{
class Core;
- class Plugin : public QObject,
+ class Plugin : public TQObject,
virtual public KXMLGUIClient
{
Q_OBJECT
@@ -37,7 +37,7 @@ namespace Komposer
virtual ~Plugin();
signals:
- void statusMessage( const QString & );
+ void statusMessage( const TQString & );
void readyForUnload();
protected slots:
@@ -63,7 +63,7 @@ namespace Komposer
Core *core() const;
protected:
friend class PluginManager;
- Plugin( QObject *parent, const char *name, const QStringList& args = QStringList() );
+ Plugin( TQObject *parent, const char *name, const TQStringList& args = TQStringList() );
private:
class Private;
diff --git a/libkdepim/komposer/core/pluginmanager.cpp b/libkdepim/komposer/core/pluginmanager.cpp
index 82e7f0e9b..c7cf74927 100644
--- a/libkdepim/komposer/core/pluginmanager.cpp
+++ b/libkdepim/komposer/core/pluginmanager.cpp
@@ -24,11 +24,11 @@
#include "plugin.h"
-#include <qapplication.h>
-#include <qfile.h>
-#include <qregexp.h>
-#include <qtimer.h>
-#include <qvaluestack.h>
+#include <tqapplication.h>
+#include <tqfile.h>
+#include <tqregexp.h>
+#include <tqtimer.h>
+#include <tqvaluestack.h>
#include <kapplication.h>
#include <kdebug.h>
@@ -48,11 +48,11 @@ class PluginManager::Private
{
public:
// All available plugins, regardless of category, and loaded or not
- QValueList<KPluginInfo*> plugins;
+ TQValueList<KPluginInfo*> plugins;
// Dict of all currently loaded plugins, mapping the KPluginInfo to
// a plugin
- QMap<KPluginInfo*, Plugin*> loadedPlugins;
+ TQMap<KPluginInfo*, Plugin*> loadedPlugins;
// The plugin manager's mode. The mode is StartingUp until loadAllPlugins()
// has finished loading the plugins, after which it is set to Running.
@@ -63,11 +63,11 @@ public:
KSharedConfig::Ptr config;
// Plugins pending for loading
- QValueStack<QString> pluginsToLoad;
+ TQValueStack<TQString> pluginsToLoad;
};
-PluginManager::PluginManager( QObject *parent )
- : QObject( parent )
+PluginManager::PluginManager( TQObject *parent )
+ : TQObject( parent )
{
d = new Private;
@@ -79,11 +79,11 @@ PluginManager::PluginManager( QObject *parent )
d->shutdownMode = Private::StartingUp;
KSettings::Dispatcher::self()->registerInstance( KGlobal::instance(),
- this, SLOT( loadAllPlugins() ) );
+ this, TQT_SLOT( loadAllPlugins() ) );
d->plugins = KPluginInfo::fromServices(
- KTrader::self()->query( QString::fromLatin1( "Komposer/Plugin" ),
- QString::fromLatin1( "[X-Komposer-Version] == 1" ) ) );
+ KTrader::self()->query( TQString::fromLatin1( "Komposer/Plugin" ),
+ TQString::fromLatin1( "[X-Komposer-Version] == 1" ) ) );
}
PluginManager::~PluginManager()
@@ -100,11 +100,11 @@ PluginManager::~PluginManager()
}
// Quick cleanup of the remaining plugins, hope it helps
- QMap<KPluginInfo*, Plugin*>::ConstIterator it;
+ TQMap<KPluginInfo*, Plugin*>::ConstIterator it;
for ( it = d->loadedPlugins.begin(); it != d->loadedPlugins.end(); /* EMPTY */ )
{
// Remove causes the iterator to become invalid, so pre-increment first
- QMap<KPluginInfo*, Plugin*>::ConstIterator nextIt( it );
+ TQMap<KPluginInfo*, Plugin*>::ConstIterator nextIt( it );
++nextIt;
kdWarning() << k_funcinfo << "Deleting stale plugin '"
<< it.data()->name() << "'" << endl;
@@ -115,14 +115,14 @@ PluginManager::~PluginManager()
delete d;
}
-QValueList<KPluginInfo*>
-PluginManager::availablePlugins( const QString &category ) const
+TQValueList<KPluginInfo*>
+PluginManager::availablePlugins( const TQString &category ) const
{
if ( category.isEmpty() )
return d->plugins;
- QValueList<KPluginInfo*> result;
- QValueList<KPluginInfo*>::ConstIterator it;
+ TQValueList<KPluginInfo*> result;
+ TQValueList<KPluginInfo*>::ConstIterator it;
for ( it = d->plugins.begin(); it != d->plugins.end(); ++it )
{
if ( ( *it )->category() == category )
@@ -132,11 +132,11 @@ PluginManager::availablePlugins( const QString &category ) const
return result;
}
-QMap<KPluginInfo*, Plugin*>
-PluginManager::loadedPlugins( const QString &category ) const
+TQMap<KPluginInfo*, Plugin*>
+PluginManager::loadedPlugins( const TQString &category ) const
{
- QMap<KPluginInfo*, Plugin*> result;
- QMap<KPluginInfo*, Plugin*>::ConstIterator it;
+ TQMap<KPluginInfo*, Plugin*> result;
+ TQMap<KPluginInfo*, Plugin*>::ConstIterator it;
for ( it = d->loadedPlugins.begin(); it != d->loadedPlugins.end(); ++it )
{
if ( category.isEmpty() || it.key()->category() == category )
@@ -158,27 +158,27 @@ PluginManager::shutdown()
if ( d->loadedPlugins.empty() ) {
d->shutdownMode = Private::DoneShutdown;
} else {
- QMap<KPluginInfo*, Plugin*>::ConstIterator it;
+ TQMap<KPluginInfo*, Plugin*>::ConstIterator it;
for ( it = d->loadedPlugins.begin(); it != d->loadedPlugins.end(); /* EMPTY */ )
{
// Remove causes the iterator to become invalid, so pre-increment first
- QMap<KPluginInfo*, Plugin*>::ConstIterator nextIt( it );
+ TQMap<KPluginInfo*, Plugin*>::ConstIterator nextIt( it );
++nextIt;
it.data()->aboutToUnload();
it = nextIt;
}
}
- QTimer::singleShot( 3000, this, SLOT(slotShutdownTimeout()) );
+ TQTimer::singleShot( 3000, this, TQT_SLOT(slotShutdownTimeout()) );
}
void
PluginManager::slotPluginReadyForUnload()
{
- // Using QObject::sender() is on purpose here, because otherwise all
+ // Using TQObject::sender() is on purpose here, because otherwise all
// plugins would have to pass 'this' as parameter, which makes the API
// less clean for plugin authors
- Plugin* plugin = dynamic_cast<Plugin*>( const_cast<QObject*>( sender() ) );
+ Plugin* plugin = dynamic_cast<Plugin*>( const_cast<TQObject*>( sender() ) );
if ( !plugin )
{
kdWarning() << k_funcinfo << "Calling object is not a plugin!" << endl;
@@ -198,14 +198,14 @@ PluginManager::slotShutdownTimeout()
return;
#ifndef NDEBUG
- QStringList remaining;
- for ( QMap<KPluginInfo*, Plugin*>::ConstIterator it = d->loadedPlugins.begin();
+ TQStringList remaining;
+ for ( TQMap<KPluginInfo*, Plugin*>::ConstIterator it = d->loadedPlugins.begin();
it != d->loadedPlugins.end(); ++it )
remaining.append( it.key()->pluginName() );
kdWarning() << k_funcinfo << "Some plugins didn't shutdown in time!" << endl
<< "Remaining plugins: "
- << remaining.join( QString::fromLatin1( ", " ) ) << endl
+ << remaining.join( TQString::fromLatin1( ", " ) ) << endl
<< "Forcing Komposer shutdown now." << endl;
#endif
@@ -228,19 +228,19 @@ PluginManager::loadAllPlugins()
if ( !d->config )
d->config = KSharedConfig::openConfig( "komposerrc" );
- QMap<QString, QString> entries = d->config->entryMap(
- QString::fromLatin1( "Plugins" ) );
+ TQMap<TQString, TQString> entries = d->config->entryMap(
+ TQString::fromLatin1( "Plugins" ) );
- QMap<QString, QString>::Iterator it;
+ TQMap<TQString, TQString>::Iterator it;
for ( it = entries.begin(); it != entries.end(); ++it )
{
- QString key = it.key();
- if ( key.endsWith( QString::fromLatin1( "Enabled" ) ) )
+ TQString key = it.key();
+ if ( key.endsWith( TQString::fromLatin1( "Enabled" ) ) )
{
key.setLength( key.length() - 7 );
//kdDebug() << k_funcinfo << "Set " << key << " to " << it.data() << endl;
- if ( it.data() == QString::fromLatin1( "true" ) )
+ if ( it.data() == TQString::fromLatin1( "true" ) )
{
if ( !plugin( key ) )
d->pluginsToLoad.push( key );
@@ -257,7 +257,7 @@ PluginManager::loadAllPlugins()
}
// Schedule the plugins to load
- QTimer::singleShot( 0, this, SLOT( slotLoadNextPlugin() ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( slotLoadNextPlugin() ) );
}
void PluginManager::slotLoadNextPlugin()
@@ -272,31 +272,31 @@ void PluginManager::slotLoadNextPlugin()
return;
}
- QString key = d->pluginsToLoad.pop();
+ TQString key = d->pluginsToLoad.pop();
loadPluginInternal( key );
// Schedule the next run unconditionally to avoid code duplication on the
// allPluginsLoaded() signal's handling. This has the added benefit that
// the signal is delayed one event loop, so the accounts are more likely
// to be instantiated.
- QTimer::singleShot( 0, this, SLOT( slotLoadNextPlugin() ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( slotLoadNextPlugin() ) );
}
Plugin*
-PluginManager::loadPlugin( const QString &pluginId,
+PluginManager::loadPlugin( const TQString &pluginId,
PluginLoadMode mode /* = LoadSync */ )
{
if ( mode == LoadSync ) {
return loadPluginInternal( pluginId );
} else {
d->pluginsToLoad.push( pluginId );
- QTimer::singleShot( 0, this, SLOT( slotLoadNextPlugin() ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( slotLoadNextPlugin() ) );
return 0;
}
}
Plugin*
-PluginManager::loadPluginInternal( const QString &pluginId )
+PluginManager::loadPluginInternal( const TQString &pluginId )
{
KPluginInfo* info = infoForPluginId( pluginId );
if ( !info ) {
@@ -310,18 +310,18 @@ PluginManager::loadPluginInternal( const QString &pluginId )
int error = 0;
Plugin *plugin = KParts::ComponentFactory::createInstanceFromQuery<Komposer::Plugin>(
- QString::fromLatin1( "Komposer/Plugin" ),
- QString::fromLatin1( "[X-KDE-PluginInfo-Name]=='%1'" ).arg( pluginId ),
- this, 0, QStringList(), &error );
+ TQString::fromLatin1( "Komposer/Plugin" ),
+ TQString::fromLatin1( "[X-KDE-PluginInfo-Name]=='%1'" ).arg( pluginId ),
+ this, 0, TQStringList(), &error );
if ( plugin ) {
d->loadedPlugins.insert( info, plugin );
info->setPluginEnabled( true );
- connect( plugin, SIGNAL(destroyed(QObject*)),
- this, SLOT(slotPluginDestroyed(QObject*)) );
- connect( plugin, SIGNAL(readyForUnload()),
- this, SLOT(slotPluginReadyForUnload()) );
+ connect( plugin, TQT_SIGNAL(destroyed(TQObject*)),
+ this, TQT_SLOT(slotPluginDestroyed(TQObject*)) );
+ connect( plugin, TQT_SIGNAL(readyForUnload()),
+ this, TQT_SLOT(slotPluginReadyForUnload()) );
kdDebug() << k_funcinfo << "Successfully loaded plugin '"
<< pluginId << "'" << endl;
@@ -365,9 +365,9 @@ PluginManager::loadPluginInternal( const QString &pluginId )
}
bool
-PluginManager::unloadPlugin( const QString &spec )
+PluginManager::unloadPlugin( const TQString &spec )
{
- QMap<KPluginInfo*, Plugin*>::ConstIterator it;
+ TQMap<KPluginInfo*, Plugin*>::ConstIterator it;
for ( it = d->loadedPlugins.begin(); it != d->loadedPlugins.end(); ++it )
{
if ( it.key()->pluginName() == spec )
@@ -381,9 +381,9 @@ PluginManager::unloadPlugin( const QString &spec )
}
void
-PluginManager::slotPluginDestroyed( QObject *plugin )
+PluginManager::slotPluginDestroyed( TQObject *plugin )
{
- QMap<KPluginInfo*, Plugin*>::Iterator it;
+ TQMap<KPluginInfo*, Plugin*>::Iterator it;
for ( it = d->loadedPlugins.begin(); it != d->loadedPlugins.end(); ++it )
{
if ( it.data() == plugin )
@@ -397,12 +397,12 @@ PluginManager::slotPluginDestroyed( QObject *plugin )
{
// Use a timer to make sure any pending deleteLater() calls have
// been handled first
- QTimer::singleShot( 0, this, SLOT(slotShutdownDone()) );
+ TQTimer::singleShot( 0, this, TQT_SLOT(slotShutdownDone()) );
}
}
Plugin*
-PluginManager::plugin( const QString &pluginId ) const
+PluginManager::plugin( const TQString &pluginId ) const
{
KPluginInfo *info = infoForPluginId( pluginId );
if ( !info )
@@ -417,46 +417,46 @@ PluginManager::plugin( const QString &pluginId ) const
QString
PluginManager::pluginName( const Plugin *plugin ) const
{
- QMap<KPluginInfo*, Plugin*>::ConstIterator it;
+ TQMap<KPluginInfo*, Plugin*>::ConstIterator it;
for ( it = d->loadedPlugins.begin(); it != d->loadedPlugins.end(); ++it )
{
if ( it.data() == plugin )
return it.key()->name();
}
- return QString::fromLatin1( "Unknown" );
+ return TQString::fromLatin1( "Unknown" );
}
QString
PluginManager::pluginId( const Plugin *plugin ) const
{
- QMap<KPluginInfo*, Plugin*>::ConstIterator it;
+ TQMap<KPluginInfo*, Plugin*>::ConstIterator it;
for ( it = d->loadedPlugins.begin(); it != d->loadedPlugins.end(); ++it )
{
if ( it.data() == plugin )
return it.key()->pluginName();
}
- return QString::fromLatin1( "unknown" );
+ return TQString::fromLatin1( "unknown" );
}
QString
PluginManager::pluginIcon( const Plugin *plugin ) const
{
- QMap<KPluginInfo*, Plugin*>::ConstIterator it;
+ TQMap<KPluginInfo*, Plugin*>::ConstIterator it;
for ( it = d->loadedPlugins.begin(); it != d->loadedPlugins.end(); ++it )
{
if ( it.data() == plugin )
return it.key()->icon();
}
- return QString::fromLatin1( "Unknown" );
+ return TQString::fromLatin1( "Unknown" );
}
KPluginInfo*
-PluginManager::infoForPluginId( const QString &pluginId ) const
+PluginManager::infoForPluginId( const TQString &pluginId ) const
{
- QValueList<KPluginInfo*>::ConstIterator it;
+ TQValueList<KPluginInfo*>::ConstIterator it;
for ( it = d->plugins.begin(); it != d->plugins.end(); ++it )
{
if ( ( *it )->pluginName() == pluginId )
@@ -467,7 +467,7 @@ PluginManager::infoForPluginId( const QString &pluginId ) const
}
bool
-PluginManager::setPluginEnabled( const QString &pluginId, bool enabled /* = true */ )
+PluginManager::setPluginEnabled( const TQString &pluginId, bool enabled /* = true */ )
{
if ( !d->config )
d->config = KSharedConfig::openConfig( "komposerrc" );
@@ -478,7 +478,7 @@ PluginManager::setPluginEnabled( const QString &pluginId, bool enabled /* = true
if ( !infoForPluginId( pluginId ) )
return false;
- d->config->writeEntry( pluginId + QString::fromLatin1( "Enabled" ), enabled );
+ d->config->writeEntry( pluginId + TQString::fromLatin1( "Enabled" ), enabled );
d->config->sync();
return true;
diff --git a/libkdepim/komposer/core/pluginmanager.h b/libkdepim/komposer/core/pluginmanager.h
index b19f8ad27..179cf48de 100644
--- a/libkdepim/komposer/core/pluginmanager.h
+++ b/libkdepim/komposer/core/pluginmanager.h
@@ -24,11 +24,11 @@
#ifndef KOMPOSER_PLUGINMANAGER_H
#define KOMPOSER_PLUGINMANAGER_H
-#include <qmap.h>
-#include <qobject.h>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qvaluelist.h>
+#include <tqmap.h>
+#include <tqobject.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqvaluelist.h>
class KPluginInfo;
@@ -42,7 +42,7 @@ namespace Komposer
Q_OBJECT
public:
- PluginManager( QObject * );
+ PluginManager( TQObject * );
~PluginManager();
@@ -56,16 +56,16 @@ namespace Komposer
* You can query all information on the plugins through the @ref KPluginInfo
* interface.
*/
- QValueList<KPluginInfo*> availablePlugins( const QString &category
- = QString::null ) const;
+ TQValueList<KPluginInfo*> availablePlugins( const TQString &category
+ = TQString::null ) const;
/**
* Returns a list of all plugins that are actually loaded.
* If you omit the category you get all, otherwise it's a filtered list.
* See also @ref availablePlugins().
*/
- QMap<KPluginInfo*, Plugin*> loadedPlugins( const QString &category
- = QString::null ) const;
+ TQMap<KPluginInfo*, Plugin*> loadedPlugins( const TQString &category
+ = TQString::null ) const;
/**
* @brief Search by plugin name. This is the key used as X-KDE-PluginInfo-Name
@@ -78,7 +78,7 @@ namespace Komposer
* which returns
* the pointer to the plugin if it's already loaded.
*/
- Plugin* plugin( const QString &pluginName ) const;
+ Plugin* plugin( const TQString &pluginName ) const;
/**
* @brief Return the short user-visible name of the plugin.
@@ -87,7 +87,7 @@ namespace Komposer
*
* @return The name of the protocol, in the user's locale.
*/
- QString pluginName( const Plugin *plugin ) const;
+ TQString pluginName( const Plugin *plugin ) const;
/**
* @brief Return the internal name of the plugin.
@@ -97,12 +97,12 @@ namespace Komposer
*
* @return The name of the protocol, in the user's locale.
*/
- QString pluginId( const Plugin *plugin ) const;
+ TQString pluginId( const Plugin *plugin ) const;
/**
* @brief Unload the plugin specified by @p pluginName
*/
- bool unloadPlugin( const QString &pluginName );
+ bool unloadPlugin( const TQString &pluginName );
/**
* @brief Retrieve the name of the icon for a @ref Plugin.
@@ -110,7 +110,7 @@ namespace Komposer
* @return An empty string if the given plugin is not loaded
* or the filename of the icon to use.
*/
- QString pluginIcon( const Plugin *plugin ) const;
+ TQString pluginIcon( const Plugin *plugin ) const;
/**
* Shuts down the plugin manager on Komposer shutdown, but first
@@ -138,7 +138,7 @@ namespace Komposer
*
* Returns false when no appropriate plugin can be found.
*/
- bool setPluginEnabled( const QString &name, bool enabled = true );
+ bool setPluginEnabled( const TQString &name, bool enabled = true );
/**
* Plugin loading mode. Used by @loadPlugin. Code that doesn't want to block
@@ -158,7 +158,7 @@ namespace Komposer
*
* See also @ref plugin().
*/
- Plugin* loadPlugin( const QString &pluginId, PluginLoadMode mode = LoadSync );
+ Plugin* loadPlugin( const TQString &pluginId, PluginLoadMode mode = LoadSync );
/**
* @brief Loads all the enabled plugins. Also used to reread the
@@ -197,7 +197,7 @@ namespace Komposer
/**
* @brief Cleans up some references if the plugin is destroyed
*/
- void slotPluginDestroyed( QObject *plugin );
+ void slotPluginDestroyed( TQObject *plugin );
/**
* shutdown() starts a timer, when it fires we force all plugins
@@ -231,7 +231,7 @@ namespace Komposer
* Called by @ref loadPlugin directly or through the queue for async plugin
* loading.
*/
- Plugin *loadPluginInternal( const QString &pluginId );
+ Plugin *loadPluginInternal( const TQString &pluginId );
/**
* @internal
@@ -240,7 +240,7 @@ namespace Komposer
*
* Returns a null pointer when no plugin info is found.
*/
- KPluginInfo *infoForPluginId( const QString &pluginId ) const;
+ KPluginInfo *infoForPluginId( const TQString &pluginId ) const;
private:
class Private;
Private *d;
diff --git a/libkdepim/komposer/core/prefsmodule.cpp b/libkdepim/komposer/core/prefsmodule.cpp
index b907154c4..7dd1673e9 100644
--- a/libkdepim/komposer/core/prefsmodule.cpp
+++ b/libkdepim/komposer/core/prefsmodule.cpp
@@ -27,24 +27,24 @@
#include <klocale.h>
#include <ktrader.h>
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qbuttongroup.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqbuttongroup.h>
#include <kdepimmacros.h>
extern "C"
{
- KDE_EXPORT KCModule *create_komposerconfig( QWidget *parent, const char * ) {
+ KDE_EXPORT KCModule *create_komposerconfig( TQWidget *parent, const char * ) {
return new Komposer::PrefsModule( parent, "komposerprefs" );
}
}
using namespace Komposer;
-PrefsModule::PrefsModule( QWidget *parent, const char *name )
+PrefsModule::PrefsModule( TQWidget *parent, const char *name )
: KPrefsModule( Komposer::Prefs::self(), parent, name )
{
- QVBoxLayout *topLayout = new QVBoxLayout( this );
+ TQVBoxLayout *topLayout = new TQVBoxLayout( this );
EditorSelection *editors = new EditorSelection( i18n( "Editors" ),
Komposer::Prefs::self()->m_activeEditor,
@@ -70,26 +70,26 @@ PrefsModule::aboutData() const
}
-EditorSelection::EditorSelection( const QString &text, QString &reference,
- QWidget *parent )
+EditorSelection::EditorSelection( const TQString &text, TQString &reference,
+ TQWidget *parent )
: m_reference( reference )
{
- m_box = new QGroupBox( 0, Qt::Vertical, text, parent );
- QVBoxLayout *boxLayout = new QVBoxLayout( m_box->layout() );
+ m_box = new TQGroupBox( 0, Qt::Vertical, text, parent );
+ TQVBoxLayout *boxLayout = new TQVBoxLayout( m_box->layout() );
boxLayout->setAlignment( Qt::AlignTop );
m_editorsCombo = new KComboBox( m_box );
boxLayout->addWidget( m_editorsCombo );
- connect( m_editorsCombo, SIGNAL(activated(const QString&)),
- SLOT(slotActivated(const QString&)) );
+ connect( m_editorsCombo, TQT_SIGNAL(activated(const TQString&)),
+ TQT_SLOT(slotActivated(const TQString&)) );
}
EditorSelection::~EditorSelection()
{
}
-QGroupBox*
+TQGroupBox*
EditorSelection::groupBox() const
{
return m_box;
@@ -101,14 +101,14 @@ EditorSelection::readConfig()
m_editorsCombo->clear();
KTrader::OfferList editors = KTrader::self()->query(
- QString::fromLatin1( "Komposer/Editor" ) );
+ TQString::fromLatin1( "Komposer/Editor" ) );
KTrader::OfferList::ConstIterator it;
int i = 0;
for ( it = editors.begin(); it != editors.end(); ++it, ++i ) {
- if ( !(*it)->hasServiceType( QString::fromLatin1( "Komposer/Editor" ) ) )
+ if ( !(*it)->hasServiceType( TQString::fromLatin1( "Komposer/Editor" ) ) )
continue;
- QString name = (*it)->property( "X-KDE-KomposerIdentifier" ).toString();
+ TQString name = (*it)->property( "X-KDE-KomposerIdentifier" ).toString();
m_editorsCombo->insertItem( name );
if ( m_reference.contains( name ) )
m_editorsCombo->setCurrentItem( i );
@@ -122,14 +122,14 @@ void EditorSelection::writeConfig()
}
void
-EditorSelection::slotActivated( const QString &editor )
+EditorSelection::slotActivated( const TQString &editor )
{
if ( !editor.isEmpty() )
emit changed();
}
void
-EditorSelection::setItem( const QString &str )
+EditorSelection::setItem( const TQString &str )
{
for ( int i = 0; i < m_editorsCombo->count(); ++i ) {
if ( m_editorsCombo->text( i ) == str ) {
diff --git a/libkdepim/komposer/core/prefsmodule.h b/libkdepim/komposer/core/prefsmodule.h
index 95ad3eef4..640bb0f10 100644
--- a/libkdepim/komposer/core/prefsmodule.h
+++ b/libkdepim/komposer/core/prefsmodule.h
@@ -23,7 +23,7 @@
#include <kprefsdialog.h>
#include <kservice.h>
-#include <qmap.h>
+#include <tqmap.h>
class QGroupBox;
class QListViewItem;
@@ -36,7 +36,7 @@ namespace Komposer {
{
Q_OBJECT
public:
- PrefsModule( QWidget *parent=0, const char *name=0 );
+ PrefsModule( TQWidget *parent=0, const char *name=0 );
virtual const KAboutData *aboutData() const;
};
@@ -45,25 +45,25 @@ namespace Komposer {
Q_OBJECT
public:
- EditorSelection( const QString &text, QString &reference, QWidget *parent );
+ EditorSelection( const TQString &text, TQString &reference, TQWidget *parent );
~EditorSelection();
void readConfig();
void writeConfig();
- QGroupBox *groupBox() const;
+ TQGroupBox *groupBox() const;
private slots:
- void slotActivated( const QString & );
+ void slotActivated( const TQString & );
private:
- void setItem( const QString & );
+ void setItem( const TQString & );
private:
- QString &m_reference;
+ TQString &m_reference;
- QGroupBox *m_box;
+ TQGroupBox *m_box;
KComboBox *m_editorsCombo;
- QMap<QString, KService::Ptr> m_services;
+ TQMap<TQString, KService::Ptr> m_services;
};
}
diff --git a/libkdepim/komposer/core/tests/managertest.cpp b/libkdepim/komposer/core/tests/managertest.cpp
index feec64599..487a84c59 100644
--- a/libkdepim/komposer/core/tests/managertest.cpp
+++ b/libkdepim/komposer/core/tests/managertest.cpp
@@ -23,8 +23,8 @@
#include "pluginmanager.h"
using namespace Komposer;
-ManagerTest::ManagerTest( QObject* parent )
- : QObject( parent )
+ManagerTest::ManagerTest( TQObject* parent )
+ : TQObject( parent )
{
m_manager = new PluginManager( this );
}
diff --git a/libkdepim/komposer/core/tests/managertest.h b/libkdepim/komposer/core/tests/managertest.h
index 0148b29a8..397bfaf01 100644
--- a/libkdepim/komposer/core/tests/managertest.h
+++ b/libkdepim/komposer/core/tests/managertest.h
@@ -21,19 +21,19 @@
#ifndef MANAGERTEST_H
#define MANAGERTEST_H
-#include <qobject.h>
+#include <tqobject.h>
#include "tester.h"
namespace Komposer {
class PluginManager;
}
-class ManagerTest : public QObject,
+class ManagerTest : public TQObject,
public Tester
{
Q_OBJECT
public:
- ManagerTest( QObject* parent = 0 );
+ ManagerTest( TQObject* parent = 0 );
public slots:
void allTests();
diff --git a/libkdepim/komposer/core/tests/tester.cpp b/libkdepim/komposer/core/tests/tester.cpp
index 7fe8a90b2..b32c89644 100644
--- a/libkdepim/komposer/core/tests/tester.cpp
+++ b/libkdepim/komposer/core/tests/tester.cpp
@@ -21,8 +21,8 @@
#include "tester.h"
-Tester::Tester( QObject* parent )
- : QObject( parent )
+Tester::Tester( TQObject* parent )
+ : TQObject( parent )
{
}
diff --git a/libkdepim/komposer/core/tests/tester.h b/libkdepim/komposer/core/tests/tester.h
index 74ebd80d0..5981d681d 100644
--- a/libkdepim/komposer/core/tests/tester.h
+++ b/libkdepim/komposer/core/tests/tester.h
@@ -22,7 +22,7 @@
#define TESTER_H
#include <kdebug.h>
-#include <qstringlist.h>
+#include <tqstringlist.h>
#define CHECK( x, y ) check( __FILE__, __LINE__, #x, x, y )
@@ -42,7 +42,7 @@ public:
int testsFailed() const {
return m_errorList.count();
}
- QStringList errorList() const {
+ TQStringList errorList() const {
return m_errorList;
}
@@ -52,8 +52,8 @@ protected:
const T& result, const T& expectedResult )
{
if ( result != expectedResult ) {
- QString error;
- QTextStream ts( &error, IO_WriteOnly );
+ TQString error;
+ TQTextStream ts( &error, IO_WriteOnly );
ts << file << "["<< line <<"]:"
<<" failed on \""<< str <<"\""
<< "\ntests:\t\t result = "
@@ -64,7 +64,7 @@ protected:
++m_tests;
}
private:
- QStringList m_errorList;
+ TQStringList m_errorList;
int m_tests;
};
diff --git a/libkdepim/komposer/core/tests/testfactory.h b/libkdepim/komposer/core/tests/testfactory.h
index 588941d8e..9354e52ad 100644
--- a/libkdepim/komposer/core/tests/testfactory.h
+++ b/libkdepim/komposer/core/tests/testfactory.h
@@ -23,7 +23,7 @@
#include "managertest.h"
-#include <qasciidict.h>
+#include <tqasciidict.h>
#define ADD_TEST(x) addTest( #x, new x )
@@ -40,15 +40,15 @@ public:
{
int result = 0;
kdDebug()<<"Running tests..."<<endl;
- QAsciiDictIterator<Tester> it( m_tests );
+ TQAsciiDictIterator<Tester> it( m_tests );
for( ; it.current(); ++it ) {
Tester* test = it.current();
test->allTests();
- QStringList errorList = test->errorList();
+ TQStringList errorList = test->errorList();
if ( !errorList.empty() ) {
++result;
kdDebug()<< it.currentKey() <<" errors:" << endl;
- for ( QStringList::Iterator itr = errorList.begin();
+ for ( TQStringList::Iterator itr = errorList.begin();
itr != errorList.end(); ++itr ) {
kdDebug()<< "\t" << (*itr).latin1() <<endl;;
}
@@ -65,7 +65,7 @@ public:
m_tests.insert( name, test );
}
private:
- QAsciiDict<Tester> m_tests;
+ TQAsciiDict<Tester> m_tests;
};
#endif
diff --git a/libkdepim/komposer/core/tests/testmanager.cpp b/libkdepim/komposer/core/tests/testmanager.cpp
index d73fb6e8c..8895cfe9e 100644
--- a/libkdepim/komposer/core/tests/testmanager.cpp
+++ b/libkdepim/komposer/core/tests/testmanager.cpp
@@ -11,19 +11,19 @@
using namespace Komposer;
-TestManager::TestManager( QObject *parent )
- : QObject( parent )
+TestManager::TestManager( TQObject *parent )
+ : TQObject( parent )
{
m_manager = new PluginManager( this );
- connect( m_manager, SIGNAL(pluginLoaded(Plugin*)),
- SLOT(slotPluginLoaded(Plugin*)) );
- connect( m_manager, SIGNAL(allPluginsLoaded()),
- SLOT(slotAllPluginsLoaded()) );
+ connect( m_manager, TQT_SIGNAL(pluginLoaded(Plugin*)),
+ TQT_SLOT(slotPluginLoaded(Plugin*)) );
+ connect( m_manager, TQT_SIGNAL(allPluginsLoaded()),
+ TQT_SLOT(slotAllPluginsLoaded()) );
m_manager->loadAllPlugins();
- QValueList<KPluginInfo*> plugins = m_manager->availablePlugins();
+ TQValueList<KPluginInfo*> plugins = m_manager->availablePlugins();
kdDebug()<<"Number of available plugins is "<< plugins.count() <<endl;
- for ( QValueList<KPluginInfo*>::iterator it = plugins.begin(); it != plugins.end(); ++it ) {
+ for ( TQValueList<KPluginInfo*>::iterator it = plugins.begin(); it != plugins.end(); ++it ) {
KPluginInfo *i = ( *it );
kdDebug()<<"\tAvailable plugin "<< i->name()
<<", comment = "<< i->comment() <<endl;
diff --git a/libkdepim/komposer/core/tests/testmanager.h b/libkdepim/komposer/core/tests/testmanager.h
index 3bb805966..c5ff8517d 100644
--- a/libkdepim/komposer/core/tests/testmanager.h
+++ b/libkdepim/komposer/core/tests/testmanager.h
@@ -1,7 +1,7 @@
#ifndef TESTMANAGER_H
#define TESTMANAGER_H
-#include <qobject.h>
+#include <tqobject.h>
namespace Komposer {
class Plugin;
@@ -13,7 +13,7 @@ class TestManager : public QObject
{
Q_OBJECT
public:
- TestManager( QObject *parent );
+ TestManager( TQObject *parent );
public slots:
void slotPluginLoaded( Plugin *plugin );
diff --git a/libkdepim/komposer/plugins/default/defaulteditor.cpp b/libkdepim/komposer/plugins/default/defaulteditor.cpp
index d08fbee5e..b8abf17be 100644
--- a/libkdepim/komposer/plugins/default/defaulteditor.cpp
+++ b/libkdepim/komposer/plugins/default/defaulteditor.cpp
@@ -39,19 +39,19 @@
#include <kreplacedialog.h>
#include <kreplace.h>
-#include <qtextedit.h>
-#include <qwidget.h>
+#include <tqtextedit.h>
+#include <tqwidget.h>
typedef KGenericFactory<DefaultEditor> DefaultEditorFactory;
K_EXPORT_COMPONENT_FACTORY( libkomposer_defaulteditor,
DefaultEditorFactory( "komposer_defaulteditor" ) )
-DefaultEditor::DefaultEditor( QObject *parent, const char *name, const QStringList &args )
+DefaultEditor::DefaultEditor( TQObject *parent, const char *name, const TQStringList &args )
: Editor( parent, name, args ), m_textEdit( 0 )
{
setInstance( DefaultEditorFactory::instance() );
- m_textEdit = new QTextEdit( 0 );
+ m_textEdit = new TQTextEdit( 0 );
createActions( actionCollection() );
@@ -63,7 +63,7 @@ DefaultEditor::~DefaultEditor()
}
-QWidget*
+TQWidget*
DefaultEditor::widget()
{
return m_textEdit;
@@ -76,18 +76,18 @@ DefaultEditor::text() const
}
void
-DefaultEditor::setText( const QString &text )
+DefaultEditor::setText( const TQString &text )
{
m_textEdit->setText( text );
}
void
-DefaultEditor::changeSignature( const QString &sig )
+DefaultEditor::changeSignature( const TQString &sig )
{
- QString text = m_textEdit->text();
+ TQString text = m_textEdit->text();
int sigStart = text.findRev( "-- " );
- QString sigText = QString( "-- \n%1" ).arg( sig );
+ TQString sigText = TQString( "-- \n%1" ).arg( sig );
text.replace( sigStart, text.length(), sigText );
}
@@ -98,71 +98,71 @@ DefaultEditor::createActions( KActionCollection *ac )
//
// File Actions
//
- (void) KStdAction::open( this, SLOT(open()), ac );
- (void) KStdAction::openRecent( this, SLOT(openURL(const KURL &)), ac );
- (void) KStdAction::save( this, SLOT(save()), ac );
- (void) KStdAction::saveAs( this, SLOT(saveAs()), ac );
+ (void) KStdAction::open( this, TQT_SLOT(open()), ac );
+ (void) KStdAction::openRecent( this, TQT_SLOT(openURL(const KURL &)), ac );
+ (void) KStdAction::save( this, TQT_SLOT(save()), ac );
+ (void) KStdAction::saveAs( this, TQT_SLOT(saveAs()), ac );
//
// Edit Actions
//
- KAction *actionUndo = KStdAction::undo( m_textEdit, SLOT(undo()), ac );
+ KAction *actionUndo = KStdAction::undo( m_textEdit, TQT_SLOT(undo()), ac );
actionUndo->setEnabled( false );
- connect( m_textEdit, SIGNAL(undoAvailable(bool)),
- actionUndo, SLOT(setEnabled(bool)) );
+ connect( m_textEdit, TQT_SIGNAL(undoAvailable(bool)),
+ actionUndo, TQT_SLOT(setEnabled(bool)) );
- KAction *actionRedo = KStdAction::redo( m_textEdit, SLOT(redo()), ac );
+ KAction *actionRedo = KStdAction::redo( m_textEdit, TQT_SLOT(redo()), ac );
actionRedo->setEnabled( false );
- connect( m_textEdit, SIGNAL(redoAvailable(bool)),
- actionRedo, SLOT(setEnabled(bool)) );
+ connect( m_textEdit, TQT_SIGNAL(redoAvailable(bool)),
+ actionRedo, TQT_SLOT(setEnabled(bool)) );
- KAction *action_cut = KStdAction::cut( m_textEdit, SLOT(cut()), ac );
+ KAction *action_cut = KStdAction::cut( m_textEdit, TQT_SLOT(cut()), ac );
action_cut->setEnabled( false );
- connect( m_textEdit, SIGNAL(copyAvailable(bool)),
- action_cut, SLOT(setEnabled(bool)) );
+ connect( m_textEdit, TQT_SIGNAL(copyAvailable(bool)),
+ action_cut, TQT_SLOT(setEnabled(bool)) );
- KAction *action_copy = KStdAction::copy( m_textEdit, SLOT(copy()), ac );
+ KAction *action_copy = KStdAction::copy( m_textEdit, TQT_SLOT(copy()), ac );
action_copy->setEnabled( false );
- connect( m_textEdit, SIGNAL(copyAvailable(bool)),
- action_copy, SLOT(setEnabled(bool)) );
+ connect( m_textEdit, TQT_SIGNAL(copyAvailable(bool)),
+ action_copy, TQT_SLOT(setEnabled(bool)) );
- (void) KStdAction::print( this, SLOT(print()), ac );
+ (void) KStdAction::print( this, TQT_SLOT(print()), ac );
- (void) KStdAction::paste( m_textEdit, SLOT(paste()), ac );
+ (void) KStdAction::paste( m_textEdit, TQT_SLOT(paste()), ac );
(void) new KAction( i18n( "C&lear" ), 0,
- m_textEdit, SLOT(removeSelectedText()),
+ m_textEdit, TQT_SLOT(removeSelectedText()),
ac, "edit_clear" );
- (void) KStdAction::selectAll( m_textEdit, SLOT(selectAll()), ac );
+ (void) KStdAction::selectAll( m_textEdit, TQT_SLOT(selectAll()), ac );
//
// View Actions
//
- (void) KStdAction::zoomIn( m_textEdit, SLOT(zoomIn()), ac );
- (void) KStdAction::zoomOut( m_textEdit, SLOT(zoomOut()), ac );
+ (void) KStdAction::zoomIn( m_textEdit, TQT_SLOT(zoomIn()), ac );
+ (void) KStdAction::zoomOut( m_textEdit, TQT_SLOT(zoomOut()), ac );
//
// Character Formatting
//
m_actionBold = new KToggleAction( i18n("&Bold"), "text_bold", CTRL+Key_B,
ac, "format_bold" );
- connect( m_actionBold, SIGNAL(toggled(bool)),
- m_textEdit, SLOT(setBold(bool)) );
+ connect( m_actionBold, TQT_SIGNAL(toggled(bool)),
+ m_textEdit, TQT_SLOT(setBold(bool)) );
m_actionItalic = new KToggleAction( i18n("&Italic"), "text_italic", CTRL+Key_I,
ac, "format_italic" );
- connect( m_actionItalic, SIGNAL(toggled(bool)),
- m_textEdit, SLOT(setItalic(bool) ));
+ connect( m_actionItalic, TQT_SIGNAL(toggled(bool)),
+ m_textEdit, TQT_SLOT(setItalic(bool) ));
m_actionUnderline = new KToggleAction( i18n("&Underline"), "text_under", CTRL+Key_U,
ac, "format_underline" );
- connect( m_actionUnderline, SIGNAL(toggled(bool)),
- m_textEdit, SLOT(setUnderline(bool)) );
+ connect( m_actionUnderline, TQT_SIGNAL(toggled(bool)),
+ m_textEdit, TQT_SLOT(setUnderline(bool)) );
(void) new KAction( i18n("Text &Color..."), "colorpicker", 0,
- this, SLOT(formatColor()),
+ this, TQT_SLOT(formatColor()),
ac, "format_color" );
//
@@ -170,37 +170,37 @@ DefaultEditor::createActions( KActionCollection *ac )
//
m_actionFont = new KFontAction( i18n("&Font"), 0,
ac, "format_font" );
- connect( m_actionFont, SIGNAL(activated(const QString &)),
- m_textEdit, SLOT(setFamily(const QString &)) );
+ connect( m_actionFont, TQT_SIGNAL(activated(const TQString &)),
+ m_textEdit, TQT_SLOT(setFamily(const TQString &)) );
m_actionFontSize = new KFontSizeAction( i18n("Font &Size"), 0,
ac, "format_font_size" );
- connect( m_actionFontSize, SIGNAL(fontSizeChanged(int)),
- m_textEdit, SLOT(setPointSize(int)) );
+ connect( m_actionFontSize, TQT_SIGNAL(fontSizeChanged(int)),
+ m_textEdit, TQT_SLOT(setPointSize(int)) );
//
// Alignment
//
m_actionAlignLeft = new KToggleAction( i18n("Align &Left"), "text_left", 0,
ac, "format_align_left" );
- connect( m_actionAlignLeft, SIGNAL(toggled(bool)),
- this, SLOT(setAlignLeft(bool)) );
+ connect( m_actionAlignLeft, TQT_SIGNAL(toggled(bool)),
+ this, TQT_SLOT(setAlignLeft(bool)) );
m_actionAlignCenter = new KToggleAction( i18n("Align &Center"), "text_center", 0,
ac, "format_align_center" );
- connect( m_actionAlignCenter, SIGNAL(toggled(bool)),
- this, SLOT(setAlignCenter(bool)) );
+ connect( m_actionAlignCenter, TQT_SIGNAL(toggled(bool)),
+ this, TQT_SLOT(setAlignCenter(bool)) );
m_actionAlignRight = new KToggleAction( i18n("Align &Right"), "text_right", 0,
ac, "format_align_right" );
- connect( m_actionAlignRight, SIGNAL(toggled(bool)),
- this, SLOT(setAlignRight(bool)) );
+ connect( m_actionAlignRight, TQT_SIGNAL(toggled(bool)),
+ this, TQT_SLOT(setAlignRight(bool)) );
m_actionAlignJustify = new KToggleAction( i18n("&Justify"), "text_block", 0,
ac, "format_align_justify" );
- connect( m_actionAlignJustify, SIGNAL(toggled(bool)),
- this, SLOT(setAlignJustify(bool)) );
+ connect( m_actionAlignJustify, TQT_SIGNAL(toggled(bool)),
+ this, TQT_SLOT(setAlignJustify(bool)) );
m_actionAlignLeft->setExclusiveGroup( "alignment" );
m_actionAlignCenter->setExclusiveGroup( "alignment" );
@@ -210,19 +210,19 @@ DefaultEditor::createActions( KActionCollection *ac )
//
// Tools
//
- (void) KStdAction::spelling( this, SLOT(checkSpelling()), ac );
+ (void) KStdAction::spelling( this, TQT_SLOT(checkSpelling()), ac );
//
// Setup enable/disable
//
updateActions();
- connect( m_textEdit, SIGNAL(currentFontChanged(const QFont &)),
- this, SLOT( updateFont() ) );
- connect( m_textEdit, SIGNAL(currentFontChanged(const QFont &)),
- this, SLOT(updateCharFmt()) );
- connect( m_textEdit, SIGNAL(cursorPositionChanged(int, int)),
- this, SLOT(updateAligment()) );
+ connect( m_textEdit, TQT_SIGNAL(currentFontChanged(const TQFont &)),
+ this, TQT_SLOT( updateFont() ) );
+ connect( m_textEdit, TQT_SIGNAL(currentFontChanged(const TQFont &)),
+ this, TQT_SLOT(updateCharFmt()) );
+ connect( m_textEdit, TQT_SIGNAL(cursorPositionChanged(int, int)),
+ this, TQT_SLOT(updateAligment()) );
}
void
@@ -275,10 +275,10 @@ DefaultEditor::updateFont()
void
DefaultEditor::formatColor()
{
- QColor col;
+ TQColor col;
int s = KColorDialog::getColor( col, m_textEdit->color(), m_textEdit );
- if ( s != QDialog::Accepted )
+ if ( s != TQDialog::Accepted )
return;
m_textEdit->setColor( col );
@@ -343,7 +343,7 @@ DefaultEditor::saveAs()
void
DefaultEditor::checkSpelling()
{
- QString s;
+ TQString s;
if ( m_textEdit->hasSelectedText() )
s = m_textEdit->selectedText();
else
diff --git a/libkdepim/komposer/plugins/default/defaulteditor.h b/libkdepim/komposer/plugins/default/defaulteditor.h
index 18f47d147..158109e1e 100644
--- a/libkdepim/komposer/plugins/default/defaulteditor.h
+++ b/libkdepim/komposer/plugins/default/defaulteditor.h
@@ -35,14 +35,14 @@ class DefaultEditor : public Komposer::Editor
{
Q_OBJECT
public:
- DefaultEditor( QObject *parent, const char *name, const QStringList &args );
+ DefaultEditor( TQObject *parent, const char *name, const TQStringList &args );
~DefaultEditor();
- virtual QWidget *widget();
- virtual QString text() const;
+ virtual TQWidget *widget();
+ virtual TQString text() const;
public slots:
- virtual void setText( const QString &txt );
- virtual void changeSignature( const QString &txt );
+ virtual void setText( const TQString &txt );
+ virtual void changeSignature( const TQString &txt );
/**
* Displays a file dialog and loads the selected file.
@@ -99,7 +99,7 @@ protected slots:
void updateAligment();
private:
- QTextEdit *m_textEdit;
+ TQTextEdit *m_textEdit;
KToggleAction *m_actionBold;
KToggleAction *m_actionItalic;
diff --git a/libkdepim/komposer/test/test.cpp b/libkdepim/komposer/test/test.cpp
index 28c3344ce..5d4544d2a 100644
--- a/libkdepim/komposer/test/test.cpp
+++ b/libkdepim/komposer/test/test.cpp
@@ -27,7 +27,7 @@
#include <klocale.h>
#include <kuniqueapplication.h>
-#include <qlabel.h>
+#include <tqlabel.h>
static const char description[] =
I18N_NOOP( "KDE mail editing manager" );
diff --git a/libkdepim/kpartsdesignerplugin/kpartsdesignerplugin.cpp b/libkdepim/kpartsdesignerplugin/kpartsdesignerplugin.cpp
index 834418d2c..b615c40b8 100644
--- a/libkdepim/kpartsdesignerplugin/kpartsdesignerplugin.cpp
+++ b/libkdepim/kpartsdesignerplugin/kpartsdesignerplugin.cpp
@@ -22,14 +22,14 @@
#include <kparts/componentfactory.h>
#include <kparts/part.h>
#include <kmimetype.h>
-#include <qlayout.h>
+#include <tqlayout.h>
#include <kapplication.h>
#include <kdepimmacros.h>
-KPartsGenericPart::KPartsGenericPart( QWidget* parentWidget, const char* name )
- : QWidget( parentWidget, name ), m_part( 0 )
+KPartsGenericPart::KPartsGenericPart( TQWidget* parentWidget, const char* name )
+ : TQWidget( parentWidget, name ), m_part( 0 )
{
- QVBoxLayout* layout = new QVBoxLayout( this );
+ TQVBoxLayout* layout = new TQVBoxLayout( this );
layout->setAutoAdd( true );
}
@@ -41,14 +41,14 @@ void KPartsGenericPart::load()
// Not sure why - but it's not really needed anyway.
if ( !kapp )
return;
- QString mimetype = m_mimetype;
+ TQString mimetype = m_mimetype;
if ( mimetype == "auto" )
mimetype == KMimeType::findByURL( m_url )->name();
if ( m_part ) {
delete m_part;
}
// "this" is both the parent widget and the parent object
- m_part = KParts::ComponentFactory::createPartInstanceFromQuery<KParts::ReadOnlyPart>( mimetype, QString::null, this, 0, this, 0 );
+ m_part = KParts::ComponentFactory::createPartInstanceFromQuery<KParts::ReadOnlyPart>( mimetype, TQString::null, this, 0, this, 0 );
if ( m_part ) {
m_part->openURL( m_url );
m_part->widget()->show();
@@ -59,47 +59,47 @@ void KPartsGenericPart::load()
static const char* mykey = "KPartsGenericPart";
-QStringList KPartsWidgetPlugin::keys() const {
- return QStringList() << mykey;
+TQStringList KPartsWidgetPlugin::keys() const {
+ return TQStringList() << mykey;
}
-QWidget * KPartsWidgetPlugin::create( const QString & key, QWidget * parent, const char * name ) {
+TQWidget * KPartsWidgetPlugin::create( const TQString & key, TQWidget * parent, const char * name ) {
if ( key == mykey )
return new KPartsGenericPart( parent, name );
return 0;
}
-QString KPartsWidgetPlugin::group( const QString & key ) const {
+TQString KPartsWidgetPlugin::group( const TQString & key ) const {
if ( key == mykey )
return "Display (KDE)";
- return QString::null;
+ return TQString::null;
}
#if 0
-QIconSet KPartsWidgetPlugin::iconSet( const QString & key ) const {
- return QIconSet();
+TQIconSet KPartsWidgetPlugin::iconSet( const TQString & key ) const {
+ return TQIconSet();
}
#endif
-QString KPartsWidgetPlugin::includeFile( const QString & key ) const {
+TQString KPartsWidgetPlugin::includeFile( const TQString & key ) const {
if ( key == mykey )
return "partplugin.h";
- return QString::null;
+ return TQString::null;
}
-QString KPartsWidgetPlugin::toolTip( const QString & key ) const {
+TQString KPartsWidgetPlugin::toolTip( const TQString & key ) const {
if ( key == mykey )
return "Generic KParts viewer";
- return QString::null;
+ return TQString::null;
}
-QString KPartsWidgetPlugin::whatsThis( const QString & key ) const {
+TQString KPartsWidgetPlugin::whatsThis( const TQString & key ) const {
if ( key == mykey )
return "A widget to embed any KParts viewer, given a url and optionally a mimetype";
- return QString::null;
+ return TQString::null;
}
-bool KPartsWidgetPlugin::isContainer( const QString & /*key*/ ) const {
+bool KPartsWidgetPlugin::isContainer( const TQString & /*key*/ ) const {
return false;
}
diff --git a/libkdepim/kpartsdesignerplugin/kpartsdesignerplugin.h b/libkdepim/kpartsdesignerplugin/kpartsdesignerplugin.h
index 798053cac..5df3db240 100644
--- a/libkdepim/kpartsdesignerplugin/kpartsdesignerplugin.h
+++ b/libkdepim/kpartsdesignerplugin/kpartsdesignerplugin.h
@@ -21,50 +21,50 @@
#ifndef DESIGNER_PARTPLUGIN_H
#define DESIGNER_PARTPLUGIN_H
-#include <qwidgetplugin.h>
-#include <qwidget.h>
+#include <tqwidgetplugin.h>
+#include <tqwidget.h>
namespace KParts { class ReadOnlyPart; }
/**
* Generic part loader, able to view any kind of file for which
* a KParts::ReadOnlyPart is available
*/
-class KPartsGenericPart : public QWidget {
+class KPartsGenericPart : public TQWidget {
Q_OBJECT
- Q_PROPERTY( QString url READ url WRITE setURL )
- Q_PROPERTY( QString mimetype READ mimetype WRITE setMimetype )
+ Q_PROPERTY( TQString url READ url WRITE setURL )
+ Q_PROPERTY( TQString mimetype READ mimetype WRITE setMimetype )
public:
- KPartsGenericPart( QWidget* parentWidget, const char* name );
+ KPartsGenericPart( TQWidget* parentWidget, const char* name );
- QString url() const { return m_url; }
- void setURL( const QString& url ) { m_url = url; load(); }
+ TQString url() const { return m_url; }
+ void setURL( const TQString& url ) { m_url = url; load(); }
// The mimetype, or "auto" if unknown
- QString mimetype() const { return m_mimetype; }
- void setMimetype( const QString& mimetype ) { m_mimetype = mimetype; load(); }
+ TQString mimetype() const { return m_mimetype; }
+ void setMimetype( const TQString& mimetype ) { m_mimetype = mimetype; load(); }
private:
void load();
private:
- QString m_mimetype;
- QString m_url;
+ TQString m_mimetype;
+ TQString m_url;
KParts::ReadOnlyPart* m_part;
};
/**
* Qt designer plugin for embedding a KParts using KPartsGenericPart
*/
-class KPartsWidgetPlugin : public QWidgetPlugin {
+class KPartsWidgetPlugin : public TQWidgetPlugin {
public:
- QStringList keys() const;
- QWidget * create( const QString & key, QWidget * parent, const char * name );
- QString group( const QString & key ) const;
- //QIconSet iconSet( const QString & key ) const;
- QString includeFile( const QString & key ) const;
- QString toolTip( const QString & key ) const;
- QString whatsThis( const QString & key ) const;
- bool isContainer( const QString & key ) const;
+ TQStringList keys() const;
+ TQWidget * create( const TQString & key, TQWidget * parent, const char * name );
+ TQString group( const TQString & key ) const;
+ //TQIconSet iconSet( const TQString & key ) const;
+ TQString includeFile( const TQString & key ) const;
+ TQString toolTip( const TQString & key ) const;
+ TQString whatsThis( const TQString & key ) const;
+ bool isContainer( const TQString & key ) const;
};
#endif
diff --git a/libkdepim/kpimprefs.cpp b/libkdepim/kpimprefs.cpp
index 1de00f921..730ed8f52 100644
--- a/libkdepim/kpimprefs.cpp
+++ b/libkdepim/kpimprefs.cpp
@@ -25,7 +25,7 @@
#include <unistd.h>
#include <stdlib.h>
-#include <qstring.h>
+#include <tqstring.h>
#include <kstandarddirs.h>
#include <kglobal.h>
@@ -35,7 +35,7 @@
#include "kpimprefs.h"
-KPimPrefs::KPimPrefs( const QString &name )
+KPimPrefs::KPimPrefs( const TQString &name )
: KConfigSkeleton( name )
{
}
@@ -59,14 +59,14 @@ void KPimPrefs::usrReadConfig()
mCustomCategories.sort();
}
-const QString KPimPrefs::timezone()
+const TQString KPimPrefs::timezone()
{
- QString zone = "";
+ TQString zone = "";
// Read TimeZoneId from korganizerrc.
KConfig korgcfg( locate( "config", "korganizerrc" ) );
korgcfg.setGroup( "Time & Date" );
- QString tz( korgcfg.readEntry( "TimeZoneId" ) );
+ TQString tz( korgcfg.readEntry( "TimeZoneId" ) );
if ( !tz.isEmpty() ) {
zone = tz;
kdDebug(5300) << "timezone from korganizerrc is " << zone << endl;
@@ -78,7 +78,7 @@ const QString KPimPrefs::timezone()
int len = readlink( "/etc/localtime", zonefilebuf, PATH_MAX );
if ( len > 0 && len < PATH_MAX ) {
- zone = QString::fromLocal8Bit( zonefilebuf, len );
+ zone = TQString::fromLocal8Bit( zonefilebuf, len );
zone = zone.mid( zone.find( "zoneinfo/" ) + 9 );
kdDebug(5300) << "system timezone from /etc/localtime is " << zone
<< endl;
@@ -92,10 +92,10 @@ const QString KPimPrefs::timezone()
return( zone );
}
-QDateTime KPimPrefs::utcToLocalTime( const QDateTime &_dt,
- const QString &timeZoneId )
+TQDateTime KPimPrefs::utcToLocalTime( const TQDateTime &_dt,
+ const TQString &timeZoneId )
{
- QDateTime dt(_dt);
+ TQDateTime dt(_dt);
// kdDebug() << "--- UTC: " << dt.toString() << endl;
int yearCorrection = 0;
@@ -112,7 +112,7 @@ QDateTime KPimPrefs::utcToLocalTime( const QDateTime &_dt,
// kdDebug() << "--- Adjusted UTC: " << dt.toString() << endl;
}
- QCString origTz = getenv("TZ");
+ TQCString origTz = getenv("TZ");
setenv( "TZ", "UTC", 1 );
time_t utcTime = dt.toTime_t();
@@ -127,18 +127,18 @@ QDateTime KPimPrefs::utcToLocalTime( const QDateTime &_dt,
}
tzset();
- QDateTime result( QDate( local->tm_year + 1900 - yearCorrection,
+ TQDateTime result( TQDate( local->tm_year + 1900 - yearCorrection,
local->tm_mon + 1, local->tm_mday ),
- QTime( local->tm_hour, local->tm_min, local->tm_sec ) );
+ TQTime( local->tm_hour, local->tm_min, local->tm_sec ) );
// kdDebug() << "--- LOCAL: " << result.toString() << endl;
return result;
}
-QDateTime KPimPrefs::localTimeToUtc( const QDateTime &_dt,
- const QString &timeZoneId )
+TQDateTime KPimPrefs::localTimeToUtc( const TQDateTime &_dt,
+ const TQString &timeZoneId )
{
- QDateTime dt(_dt);
+ TQDateTime dt(_dt);
// kdDebug() << "--- LOCAL: " << dt.toString() << endl;
int yearCorrection = 0;
@@ -156,7 +156,7 @@ QDateTime KPimPrefs::localTimeToUtc( const QDateTime &_dt,
// kdDebug() << "--- Adjusted LOCAL: " << dt.toString() << endl;
}
- QCString origTz = getenv("TZ");
+ TQCString origTz = getenv("TZ");
setenv( "TZ", timeZoneId.local8Bit(), 1 );
time_t localTime = dt.toTime_t();
@@ -171,9 +171,9 @@ QDateTime KPimPrefs::localTimeToUtc( const QDateTime &_dt,
}
tzset();
- QDateTime result( QDate( utc->tm_year + 1900 - yearCorrection,
+ TQDateTime result( TQDate( utc->tm_year + 1900 - yearCorrection,
utc->tm_mon + 1, utc->tm_mday ),
- QTime( utc->tm_hour, utc->tm_min, utc->tm_sec ) );
+ TQTime( utc->tm_hour, utc->tm_min, utc->tm_sec ) );
// kdDebug() << "--- UTC: " << result.toString() << endl;
diff --git a/libkdepim/kpimprefs.h b/libkdepim/kpimprefs.h
index 086c37524..7fcfbd0f8 100644
--- a/libkdepim/kpimprefs.h
+++ b/libkdepim/kpimprefs.h
@@ -21,7 +21,7 @@
#ifndef KPIMPREFS_H
#define KPIMPREFS_H
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include <kconfigskeleton.h>
#include <kdepimmacros.h>
@@ -31,7 +31,7 @@ class QString;
class KDE_EXPORT KPimPrefs : public KConfigSkeleton
{
public:
- KPimPrefs( const QString &name = QString::null );
+ KPimPrefs( const TQString &name = TQString::null );
virtual ~KPimPrefs();
@@ -60,24 +60,24 @@ class KDE_EXPORT KPimPrefs : public KConfigSkeleton
*
* @see Calendar
*/
- static const QString timezone();
+ static const TQString timezone();
/**
Convert time given in UTC to local time at timezone specified by given
timezone id.
*/
- static QDateTime utcToLocalTime( const QDateTime &dt,
- const QString &timeZoneId );
+ static TQDateTime utcToLocalTime( const TQDateTime &dt,
+ const TQString &timeZoneId );
/**
Convert time given in local time at timezone specified by given
timezone id to UTC.
*/
- static QDateTime localTimeToUtc( const QDateTime &dt,
- const QString &timeZoneId );
+ static TQDateTime localTimeToUtc( const TQDateTime &dt,
+ const TQString &timeZoneId );
public:
- QStringList mCustomCategories;
+ TQStringList mCustomCategories;
protected:
virtual void setCategoryDefaults() {}
diff --git a/libkdepim/kpimurlrequesterdlg.cpp b/libkdepim/kpimurlrequesterdlg.cpp
index 6982d1f51..553ca659f 100644
--- a/libkdepim/kpimurlrequesterdlg.cpp
+++ b/libkdepim/kpimurlrequesterdlg.cpp
@@ -24,8 +24,8 @@
#include <klocale.h>
// KDE3.4 or KDE4.0: FIXME: Move to kdelibs!
-KURL KPimURLRequesterDlg::getURL( const QString& dir, const QString &label,
- QWidget *parent, const QString& caption )
+KURL KPimURLRequesterDlg::getURL( const TQString& dir, const TQString &label,
+ TQWidget *parent, const TQString& caption )
{
KURLRequesterDlg dlg(dir, label, parent, "filedialog", true);
diff --git a/libkdepim/kpimurlrequesterdlg.h b/libkdepim/kpimurlrequesterdlg.h
index 714183cd7..c770fd24d 100644
--- a/libkdepim/kpimurlrequesterdlg.h
+++ b/libkdepim/kpimurlrequesterdlg.h
@@ -22,7 +22,7 @@
#include <kdepimmacros.h>
#include <kurl.h>
-#include <qstring.h>
+#include <tqstring.h>
class QWidget;
@@ -37,10 +37,10 @@ class KDE_EXPORT KPimURLRequesterDlg
* @param text The text to be shown on the label.
* @param parent The widget the dialog will be centered on initially.
*/
- static KURL getURL( const QString &url = QString::null,
- const QString &text = QString::null,
- QWidget *parent = 0,
- const QString &caption = QString::null );
+ static KURL getURL( const TQString &url = TQString::null,
+ const TQString &text = TQString::null,
+ TQWidget *parent = 0,
+ const TQString &caption = TQString::null );
};
#endif // KPIMURLREQUESTDLG_H_INCLUDED
diff --git a/libkdepim/kpixmapregionselectordialog.cpp b/libkdepim/kpixmapregionselectordialog.cpp
index e701566f3..4766a4521 100644
--- a/libkdepim/kpixmapregionselectordialog.cpp
+++ b/libkdepim/kpixmapregionselectordialog.cpp
@@ -21,18 +21,18 @@
#include "kpixmapregionselectordialog.h"
#include <kdialogbase.h>
-#include <qdialog.h>
-#include <qdesktopwidget.h>
+#include <tqdialog.h>
+#include <tqdesktopwidget.h>
#include <klocale.h>
#include <kdialog.h>
using namespace KPIM;
-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() );
@@ -44,86 +44,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/libkdepim/kpixmapregionselectordialog.h b/libkdepim/kpixmapregionselectordialog.h
index 1108d17ef..7cc08e32a 100644
--- a/libkdepim/kpixmapregionselectordialog.h
+++ b/libkdepim/kpixmapregionselectordialog.h
@@ -24,7 +24,7 @@
#include <kdialogbase.h>
#include <libkdepim/kpixmapregionselectorwidget.h>
-#include <qimage.h>
+#include <tqimage.h>
#include <kdepimmacros.h>
namespace KPIM {
@@ -51,7 +51,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
@@ -72,7 +72,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
@@ -82,7 +82,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
@@ -91,7 +91,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
@@ -101,7 +101,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:
KPIM::KPixmapRegionSelectorWidget *m_pixmapSelectorWidget;
diff --git a/libkdepim/kpixmapregionselectorwidget.cpp b/libkdepim/kpixmapregionselectorwidget.cpp
index e4806da89..918d3b84c 100644
--- a/libkdepim/kpixmapregionselectorwidget.cpp
+++ b/libkdepim/kpixmapregionselectorwidget.cpp
@@ -26,31 +26,31 @@
*/
#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>
using namespace KPIM;
-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 );
@@ -68,7 +68,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;
@@ -83,12 +83,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
@@ -96,7 +96,7 @@ void KPixmapRegionSelectorWidget::setSelectedRegion(const QRect &rect)
m_selectedRegion=rect;
updatePixmap();
- QRect r=unzoomedSelectedRegion();
+ TQRect r=unzoomedSelectedRegion();
}
}
@@ -106,7 +106,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;
@@ -114,21 +114,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, 0.4, QColor(0,0,0));
+ TQImage image=m_linedPixmap.convertToImage();
+ image=KImageEffect::fade(image, 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 );
@@ -144,12 +144,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);
@@ -164,7 +164,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);
@@ -172,7 +172,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();
@@ -211,12 +211,12 @@ void KPixmapRegionSelectorWidget::rotateCounterclockwise()
-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 )
{
@@ -226,30 +226,30 @@ bool KPixmapRegionSelectorWidget::eventFilter(QObject *obj, QEvent *ev)
return TRUE;
};
- QCursor cursor;
+ TQCursor cursor;
if ( m_selectedRegion.contains( mev->pos() )
&& m_selectedRegion!=m_originalPixmap.rect() )
{
m_state=Moving;
- cursor=QCursor(Qt::SizeAllCursor);
+ cursor=TQCursor(Qt::SizeAllCursor);
}
else
{
m_state=Resizing;
- cursor=QCursor(Qt::CrossCursor);
+ cursor=TQCursor(Qt::CrossCursor);
}
- QApplication::setOverrideCursor(cursor);
+ TQApplication::setOverrideCursor(cursor);
m_tempFirstClick=mev->pos();
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 )
{
@@ -303,26 +303,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);
@@ -385,20 +385,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());
}
@@ -418,18 +418,18 @@ 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 ) );
//m_originalPixmap.convertFromImage( KImageEffect::sample( image, width, height ) );
double oldZoomFactor = m_zoomFactor;
m_zoomFactor=m_originalPixmap.width()/(double)m_unzoomedPixmap.width();
@@ -437,7 +437,7 @@ void KPixmapRegionSelectorWidget::setMaximumWidgetSize(int width, int height)
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) );
@@ -446,7 +446,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/libkdepim/kpixmapregionselectorwidget.h b/libkdepim/kpixmapregionselectorwidget.h
index c9637bcec..4d92869da 100644
--- a/libkdepim/kpixmapregionselectorwidget.h
+++ b/libkdepim/kpixmapregionselectorwidget.h
@@ -22,10 +22,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;
@@ -52,7 +52,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
@@ -63,28 +63,28 @@ public:
* Sets the pixmap which will be shown for the user to select a region from.
* @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
@@ -92,10 +92,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
@@ -144,7 +144,7 @@ protected:
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,
@@ -152,18 +152,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/libkdepim/kprefsdialog.cpp b/libkdepim/kprefsdialog.cpp
index 5ab022c34..9aef645e6 100644
--- a/libkdepim/kprefsdialog.cpp
+++ b/libkdepim/kprefsdialog.cpp
@@ -21,19 +21,19 @@
Boston, MA 02110-1301, USA.
*/
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qbuttongroup.h>
-#include <qlineedit.h>
-#include <qfont.h>
-#include <qspinbox.h>
-#include <qframe.h>
-#include <qcombobox.h>
-#include <qcheckbox.h>
-#include <qradiobutton.h>
-#include <qpushbutton.h>
-#include <qdatetimeedit.h>
-#include <qwhatsthis.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqbuttongroup.h>
+#include <tqlineedit.h>
+#include <tqfont.h>
+#include <tqspinbox.h>
+#include <tqframe.h>
+#include <tqcombobox.h>
+#include <tqcheckbox.h>
+#include <tqradiobutton.h>
+#include <tqpushbutton.h>
+#include <tqdatetimeedit.h>
+#include <tqwhatsthis.h>
#include <kcolorbutton.h>
#include <kdebug.h>
@@ -50,7 +50,7 @@
namespace KPrefsWidFactory {
-KPrefsWid *create( KConfigSkeletonItem *item, QWidget *parent )
+KPrefsWid *create( KConfigSkeletonItem *item, TQWidget *parent )
{
KConfigSkeleton::ItemBool *boolItem =
dynamic_cast<KConfigSkeleton::ItemBool *>( item );
@@ -67,13 +67,13 @@ KPrefsWid *create( KConfigSkeletonItem *item, QWidget *parent )
KConfigSkeleton::ItemEnum *enumItem =
dynamic_cast<KConfigSkeleton::ItemEnum *>( item );
if ( enumItem ) {
- QValueList<KConfigSkeleton::ItemEnum::Choice> choices = enumItem->choices();
+ TQValueList<KConfigSkeleton::ItemEnum::Choice> choices = enumItem->choices();
if ( choices.isEmpty() ) {
kdError() << "KPrefsWidFactory::create(): Enum has no choices." << endl;
return 0;
} else {
KPrefsWidRadios *radios = new KPrefsWidRadios( enumItem, parent );
- QValueList<KConfigSkeleton::ItemEnum::Choice>::ConstIterator it;
+ TQValueList<KConfigSkeleton::ItemEnum::Choice>::ConstIterator it;
for( it = choices.begin(); it != choices.end(); ++it ) {
radios->addRadio( (*it).label );
}
@@ -93,19 +93,19 @@ KPrefsWid *create( KConfigSkeletonItem *item, QWidget *parent )
}
-QValueList<QWidget *> KPrefsWid::widgets() const
+TQValueList<TQWidget *> KPrefsWid::widgets() const
{
- return QValueList<QWidget *>();
+ return TQValueList<TQWidget *>();
}
-KPrefsWidBool::KPrefsWidBool( KConfigSkeleton::ItemBool *item, QWidget *parent )
+KPrefsWidBool::KPrefsWidBool( KConfigSkeleton::ItemBool *item, TQWidget *parent )
: mItem( item )
{
- mCheck = new QCheckBox( item->label(), parent);
- connect( mCheck, SIGNAL( clicked() ), SIGNAL( changed() ) );
+ mCheck = new TQCheckBox( item->label(), parent);
+ connect( mCheck, TQT_SIGNAL( clicked() ), TQT_SIGNAL( changed() ) );
if ( !item->whatsThis().isNull() ) {
- QWhatsThis::add( mCheck, item->whatsThis() );
+ TQWhatsThis::add( mCheck, item->whatsThis() );
}
}
@@ -119,37 +119,37 @@ void KPrefsWidBool::writeConfig()
mItem->setValue( mCheck->isChecked() );
}
-QCheckBox *KPrefsWidBool::checkBox()
+TQCheckBox *KPrefsWidBool::checkBox()
{
return mCheck;
}
-QValueList<QWidget *> KPrefsWidBool::widgets() const
+TQValueList<TQWidget *> KPrefsWidBool::widgets() const
{
- QValueList<QWidget *> widgets;
+ TQValueList<TQWidget *> widgets;
widgets.append( mCheck );
return widgets;
}
KPrefsWidInt::KPrefsWidInt( KConfigSkeleton::ItemInt *item,
- QWidget *parent )
+ TQWidget *parent )
: mItem( item )
{
- mLabel = new QLabel( mItem->label()+':', parent );
- mSpin = new QSpinBox( parent );
+ mLabel = new TQLabel( mItem->label()+':', parent );
+ mSpin = new TQSpinBox( parent );
if ( !item->minValue().isNull() ) {
mSpin->setMinValue( item->minValue().toInt() );
}
if ( !item->maxValue().isNull() ) {
mSpin->setMaxValue( item->maxValue().toInt() );
}
- connect( mSpin, SIGNAL( valueChanged( int ) ), SIGNAL( changed() ) );
+ connect( mSpin, TQT_SIGNAL( valueChanged( int ) ), TQT_SIGNAL( changed() ) );
mLabel->setBuddy( mSpin );
- QString whatsThis = mItem->whatsThis();
+ TQString whatsThis = mItem->whatsThis();
if ( !whatsThis.isEmpty() ) {
- QWhatsThis::add( mLabel, whatsThis );
- QWhatsThis::add( mSpin, whatsThis );
+ TQWhatsThis::add( mLabel, whatsThis );
+ TQWhatsThis::add( mSpin, whatsThis );
}
}
@@ -163,19 +163,19 @@ void KPrefsWidInt::writeConfig()
mItem->setValue( mSpin->value() );
}
-QLabel *KPrefsWidInt::label()
+TQLabel *KPrefsWidInt::label()
{
return mLabel;
}
-QSpinBox *KPrefsWidInt::spinBox()
+TQSpinBox *KPrefsWidInt::spinBox()
{
return mSpin;
}
-QValueList<QWidget *> KPrefsWidInt::widgets() const
+TQValueList<TQWidget *> KPrefsWidInt::widgets() const
{
- QValueList<QWidget *> widgets;
+ TQValueList<TQWidget *> widgets;
widgets.append( mLabel );
widgets.append( mSpin );
return widgets;
@@ -183,16 +183,16 @@ QValueList<QWidget *> KPrefsWidInt::widgets() const
KPrefsWidColor::KPrefsWidColor( KConfigSkeleton::ItemColor *item,
- QWidget *parent )
+ TQWidget *parent )
: mItem( item )
{
mButton = new KColorButton( parent );
- connect( mButton, SIGNAL( changed( const QColor & ) ), SIGNAL( changed() ) );
- mLabel = new QLabel( mButton, mItem->label()+':', parent );
+ connect( mButton, TQT_SIGNAL( changed( const TQColor & ) ), TQT_SIGNAL( changed() ) );
+ mLabel = new TQLabel( mButton, mItem->label()+':', parent );
mLabel->setBuddy( mButton );
- QString whatsThis = mItem->whatsThis();
+ TQString whatsThis = mItem->whatsThis();
if (!whatsThis.isNull()) {
- QWhatsThis::add(mButton, whatsThis);
+ TQWhatsThis::add(mButton, whatsThis);
}
}
@@ -211,7 +211,7 @@ void KPrefsWidColor::writeConfig()
mItem->setValue( mButton->color() );
}
-QLabel *KPrefsWidColor::label()
+TQLabel *KPrefsWidColor::label()
{
return mLabel;
}
@@ -223,20 +223,20 @@ KColorButton *KPrefsWidColor::button()
KPrefsWidFont::KPrefsWidFont( KConfigSkeleton::ItemFont *item,
- QWidget *parent, const QString &sampleText )
+ TQWidget *parent, const TQString &sampleText )
: mItem( item )
{
- mLabel = new QLabel( mItem->label()+':', parent );
+ mLabel = new TQLabel( mItem->label()+':', parent );
- mPreview = new QLabel( sampleText, parent );
- mPreview->setFrameStyle( QFrame::Panel | QFrame::Sunken );
+ mPreview = new TQLabel( sampleText, parent );
+ mPreview->setFrameStyle( TQFrame::Panel | TQFrame::Sunken );
- mButton = new QPushButton( i18n("Choose..."), parent );
- connect( mButton, SIGNAL( clicked() ), SLOT( selectFont() ) );
- QString whatsThis = mItem->whatsThis();
+ mButton = new TQPushButton( i18n("Choose..."), parent );
+ connect( mButton, TQT_SIGNAL( clicked() ), TQT_SLOT( selectFont() ) );
+ TQString whatsThis = mItem->whatsThis();
if (!whatsThis.isNull()) {
- QWhatsThis::add(mPreview, whatsThis);
- QWhatsThis::add(mButton, whatsThis);
+ TQWhatsThis::add(mPreview, whatsThis);
+ TQWhatsThis::add(mButton, whatsThis);
}
}
@@ -254,24 +254,24 @@ void KPrefsWidFont::writeConfig()
mItem->setValue( mPreview->font() );
}
-QLabel *KPrefsWidFont::label()
+TQLabel *KPrefsWidFont::label()
{
return mLabel;
}
-QFrame *KPrefsWidFont::preview()
+TQFrame *KPrefsWidFont::preview()
{
return mPreview;
}
-QPushButton *KPrefsWidFont::button()
+TQPushButton *KPrefsWidFont::button()
{
return mButton;
}
void KPrefsWidFont::selectFont()
{
- QFont myFont(mPreview->font());
+ TQFont myFont(mPreview->font());
int result = KFontDialog::getFont(myFont);
if (result == KFontDialog::Accepted) {
mPreview->setFont(myFont);
@@ -281,16 +281,16 @@ void KPrefsWidFont::selectFont()
KPrefsWidTime::KPrefsWidTime( KConfigSkeleton::ItemDateTime *item,
- QWidget *parent )
+ TQWidget *parent )
: mItem( item )
{
- mLabel = new QLabel( mItem->label()+':', parent );
+ mLabel = new TQLabel( mItem->label()+':', parent );
mTimeEdit = new KTimeEdit( parent );
mLabel->setBuddy( mTimeEdit );
- connect( mTimeEdit, SIGNAL( timeChanged( QTime ) ), SIGNAL( changed() ) );
- QString whatsThis = mItem->whatsThis();
+ connect( mTimeEdit, TQT_SIGNAL( timeChanged( TQTime ) ), TQT_SIGNAL( changed() ) );
+ TQString whatsThis = mItem->whatsThis();
if ( !whatsThis.isNull() ) {
- QWhatsThis::add( mTimeEdit, whatsThis );
+ TQWhatsThis::add( mTimeEdit, whatsThis );
}
}
@@ -301,14 +301,14 @@ void KPrefsWidTime::readConfig()
void KPrefsWidTime::writeConfig()
{
- // Don't overwrite the date value of the QDateTime, so we can use a
+ // Don't overwrite the date value of the TQDateTime, so we can use a
// KPrefsWidTime and a KPrefsWidDate on the same config entry!
- QDateTime dt( mItem->value() );
+ TQDateTime dt( mItem->value() );
dt.setTime( mTimeEdit->getTime() );
mItem->setValue( dt );
}
-QLabel *KPrefsWidTime::label()
+TQLabel *KPrefsWidTime::label()
{
return mLabel;
}
@@ -320,20 +320,20 @@ KTimeEdit *KPrefsWidTime::timeEdit()
KPrefsWidDuration::KPrefsWidDuration( KConfigSkeleton::ItemDateTime *item,
- QWidget *parent )
+ TQWidget *parent )
: mItem( item )
{
- mLabel = new QLabel( mItem->label()+':', parent );
+ mLabel = new TQLabel( mItem->label()+':', parent );
mTimeEdit = new QTimeEdit( parent );
mLabel->setBuddy( mTimeEdit );
mTimeEdit->setAutoAdvance( true );
mTimeEdit->setDisplay( QTimeEdit::Hours | QTimeEdit::Minutes );
- mTimeEdit->setRange( QTime( 0, 1 ), QTime( 24, 0 ) ); // [1min, 24hr]
+ mTimeEdit->setRange( TQTime( 0, 1 ), TQTime( 24, 0 ) ); // [1min, 24hr]
connect( mTimeEdit,
- SIGNAL( valueChanged( const QTime & ) ), SIGNAL( changed() ) );
- QString whatsThis = mItem->whatsThis();
+ TQT_SIGNAL( valueChanged( const TQTime & ) ), TQT_SIGNAL( changed() ) );
+ TQString whatsThis = mItem->whatsThis();
if ( !whatsThis.isNull() ) {
- QWhatsThis::add( mTimeEdit, whatsThis );
+ TQWhatsThis::add( mTimeEdit, whatsThis );
}
}
@@ -344,12 +344,12 @@ void KPrefsWidDuration::readConfig()
void KPrefsWidDuration::writeConfig()
{
- QDateTime dt( mItem->value() );
+ TQDateTime dt( mItem->value() );
dt.setTime( mTimeEdit->time() );
mItem->setValue( dt );
}
-QLabel *KPrefsWidDuration::label()
+TQLabel *KPrefsWidDuration::label()
{
return mLabel;
}
@@ -361,16 +361,16 @@ QTimeEdit *KPrefsWidDuration::timeEdit()
KPrefsWidDate::KPrefsWidDate( KConfigSkeleton::ItemDateTime *item,
- QWidget *parent )
+ TQWidget *parent )
: mItem( item )
{
- mLabel = new QLabel( mItem->label()+':', parent );
+ mLabel = new TQLabel( mItem->label()+':', parent );
mDateEdit = new KDateEdit( parent );
mLabel->setBuddy( mDateEdit );
- connect( mDateEdit, SIGNAL( dateChanged( const QDate& ) ), SIGNAL( changed() ) );
- QString whatsThis = mItem->whatsThis();
+ connect( mDateEdit, TQT_SIGNAL( dateChanged( const TQDate& ) ), TQT_SIGNAL( changed() ) );
+ TQString whatsThis = mItem->whatsThis();
if ( !whatsThis.isNull() ) {
- QWhatsThis::add( mDateEdit, whatsThis );
+ TQWhatsThis::add( mDateEdit, whatsThis );
}
}
@@ -381,12 +381,12 @@ void KPrefsWidDate::readConfig()
void KPrefsWidDate::writeConfig()
{
- QDateTime dt( mItem->value() );
+ TQDateTime dt( mItem->value() );
dt.setDate( mDateEdit->date() );
mItem->setValue( dt );
}
-QLabel *KPrefsWidDate::label()
+TQLabel *KPrefsWidDate::label()
{
return mLabel;
}
@@ -398,26 +398,26 @@ KDateEdit *KPrefsWidDate::dateEdit()
KPrefsWidRadios::KPrefsWidRadios( KConfigSkeleton::ItemEnum *item,
- QWidget *parent )
+ TQWidget *parent )
: mItem( item )
{
- mBox = new QButtonGroup( 1, Qt::Horizontal, mItem->label(), parent );
- connect( mBox, SIGNAL( clicked( int ) ), SIGNAL( changed() ) );
+ mBox = new TQButtonGroup( 1, Qt::Horizontal, mItem->label(), parent );
+ connect( mBox, TQT_SIGNAL( clicked( int ) ), TQT_SIGNAL( changed() ) );
}
KPrefsWidRadios::~KPrefsWidRadios()
{
}
-void KPrefsWidRadios::addRadio(const QString &text, const QString &whatsThis)
+void KPrefsWidRadios::addRadio(const TQString &text, const TQString &whatsThis)
{
- QRadioButton *r = new QRadioButton(text,mBox);
+ TQRadioButton *r = new TQRadioButton(text,mBox);
if (!whatsThis.isNull()) {
- QWhatsThis::add(r, whatsThis);
+ TQWhatsThis::add(r, whatsThis);
}
}
-QButtonGroup *KPrefsWidRadios::groupBox()
+TQButtonGroup *KPrefsWidRadios::groupBox()
{
return mBox;
}
@@ -432,21 +432,21 @@ void KPrefsWidRadios::writeConfig()
mItem->setValue( mBox->id( mBox->selected() ) );
}
-QValueList<QWidget *> KPrefsWidRadios::widgets() const
+TQValueList<TQWidget *> KPrefsWidRadios::widgets() const
{
- QValueList<QWidget *> w;
+ TQValueList<TQWidget *> w;
w.append( mBox );
return w;
}
KPrefsWidCombo::KPrefsWidCombo( KConfigSkeleton::ItemEnum *item,
- QWidget *parent )
+ TQWidget *parent )
: mItem( item )
{
- QHBox *hbox = new QHBox(parent);
- new QLabel( mItem->label(), hbox );
- mCombo = new QComboBox( hbox );
- connect( mCombo, SIGNAL( activated( int ) ), SIGNAL( changed() ) );
+ TQHBox *hbox = new TQHBox(parent);
+ new TQLabel( mItem->label(), hbox );
+ mCombo = new TQComboBox( hbox );
+ connect( mCombo, TQT_SIGNAL( activated( int ) ), TQT_SIGNAL( changed() ) );
}
KPrefsWidCombo::~KPrefsWidCombo()
@@ -463,32 +463,32 @@ void KPrefsWidCombo::writeConfig()
mItem->setValue( mCombo->currentItem() );
}
-QValueList<QWidget *> KPrefsWidCombo::widgets() const
+TQValueList<TQWidget *> KPrefsWidCombo::widgets() const
{
- QValueList<QWidget *> w;
+ TQValueList<TQWidget *> w;
w.append( mCombo );
return w;
}
-QComboBox* KPrefsWidCombo::comboBox()
+TQComboBox* KPrefsWidCombo::comboBox()
{
return mCombo;
}
KPrefsWidString::KPrefsWidString( KConfigSkeleton::ItemString *item,
- QWidget *parent,
- QLineEdit::EchoMode echomode )
+ TQWidget *parent,
+ TQLineEdit::EchoMode echomode )
: mItem( item )
{
- mLabel = new QLabel( mItem->label()+':', parent );
- mEdit = new QLineEdit( parent );
+ mLabel = new TQLabel( mItem->label()+':', parent );
+ mEdit = new TQLineEdit( parent );
mLabel->setBuddy( mEdit );
- connect( mEdit, SIGNAL( textChanged( const QString & ) ),
- SIGNAL( changed() ) );
+ connect( mEdit, TQT_SIGNAL( textChanged( const TQString & ) ),
+ TQT_SIGNAL( changed() ) );
mEdit->setEchoMode( echomode );
- QString whatsThis = mItem->whatsThis();
+ TQString whatsThis = mItem->whatsThis();
if ( !whatsThis.isNull() ) {
- QWhatsThis::add( mEdit, whatsThis );
+ TQWhatsThis::add( mEdit, whatsThis );
}
}
@@ -506,39 +506,39 @@ void KPrefsWidString::writeConfig()
mItem->setValue( mEdit->text() );
}
-QLabel *KPrefsWidString::label()
+TQLabel *KPrefsWidString::label()
{
return mLabel;
}
-QLineEdit *KPrefsWidString::lineEdit()
+TQLineEdit *KPrefsWidString::lineEdit()
{
return mEdit;
}
-QValueList<QWidget *> KPrefsWidString::widgets() const
+TQValueList<TQWidget *> KPrefsWidString::widgets() const
{
- QValueList<QWidget *> widgets;
+ TQValueList<TQWidget *> widgets;
widgets.append( mLabel );
widgets.append( mEdit );
return widgets;
}
-KPrefsWidPath::KPrefsWidPath( KConfigSkeleton::ItemPath *item, QWidget *parent,
- const QString &filter, uint mode )
+KPrefsWidPath::KPrefsWidPath( KConfigSkeleton::ItemPath *item, TQWidget *parent,
+ const TQString &filter, uint mode )
: mItem( item )
{
- mLabel = new QLabel( mItem->label()+':', parent );
+ mLabel = new TQLabel( mItem->label()+':', parent );
mURLRequester = new KURLRequester( parent );
mLabel->setBuddy( mURLRequester );
mURLRequester->setMode( mode );
mURLRequester->setFilter( filter );
- connect( mURLRequester, SIGNAL( textChanged( const QString & ) ),
- SIGNAL( changed() ) );
- QString whatsThis = mItem->whatsThis();
+ connect( mURLRequester, TQT_SIGNAL( textChanged( const TQString & ) ),
+ TQT_SIGNAL( changed() ) );
+ TQString whatsThis = mItem->whatsThis();
if ( !whatsThis.isNull() ) {
- QWhatsThis::add( mURLRequester, whatsThis );
+ TQWhatsThis::add( mURLRequester, whatsThis );
}
}
@@ -556,7 +556,7 @@ void KPrefsWidPath::writeConfig()
mItem->setValue( mURLRequester->url() );
}
-QLabel *KPrefsWidPath::label()
+TQLabel *KPrefsWidPath::label()
{
return mLabel;
}
@@ -566,9 +566,9 @@ KURLRequester *KPrefsWidPath::urlRequester()
return mURLRequester;
}
-QValueList<QWidget *> KPrefsWidPath::widgets() const
+TQValueList<TQWidget *> KPrefsWidPath::widgets() const
{
- QValueList<QWidget *> widgets;
+ TQValueList<TQWidget *> widgets;
widgets.append( mLabel );
widgets.append( mURLRequester );
return widgets;
@@ -590,7 +590,7 @@ void KPrefsWidManager::addWid( KPrefsWid *wid )
}
KPrefsWidBool *KPrefsWidManager::addWidBool( KConfigSkeleton::ItemBool *item,
- QWidget *parent )
+ TQWidget *parent )
{
KPrefsWidBool *w = new KPrefsWidBool( item, parent );
addWid( w );
@@ -598,7 +598,7 @@ KPrefsWidBool *KPrefsWidManager::addWidBool( KConfigSkeleton::ItemBool *item,
}
KPrefsWidTime *KPrefsWidManager::addWidTime( KConfigSkeleton::ItemDateTime *item,
- QWidget *parent )
+ TQWidget *parent )
{
KPrefsWidTime *w = new KPrefsWidTime( item, parent );
addWid( w );
@@ -606,7 +606,7 @@ KPrefsWidTime *KPrefsWidManager::addWidTime( KConfigSkeleton::ItemDateTime *item
}
KPrefsWidDuration *KPrefsWidManager::addWidDuration( KConfigSkeleton::ItemDateTime *item,
- QWidget *parent )
+ TQWidget *parent )
{
KPrefsWidDuration *w = new KPrefsWidDuration( item, parent );
addWid( w );
@@ -614,7 +614,7 @@ KPrefsWidDuration *KPrefsWidManager::addWidDuration( KConfigSkeleton::ItemDateTi
}
KPrefsWidDate *KPrefsWidManager::addWidDate( KConfigSkeleton::ItemDateTime *item,
- QWidget *parent )
+ TQWidget *parent )
{
KPrefsWidDate *w = new KPrefsWidDate( item, parent );
addWid( w );
@@ -622,7 +622,7 @@ KPrefsWidDate *KPrefsWidManager::addWidDate( KConfigSkeleton::ItemDateTime *item
}
KPrefsWidColor *KPrefsWidManager::addWidColor( KConfigSkeleton::ItemColor *item,
- QWidget *parent )
+ TQWidget *parent )
{
KPrefsWidColor *w = new KPrefsWidColor( item, parent );
addWid( w );
@@ -630,12 +630,12 @@ KPrefsWidColor *KPrefsWidManager::addWidColor( KConfigSkeleton::ItemColor *item,
}
KPrefsWidRadios *KPrefsWidManager::addWidRadios( KConfigSkeleton::ItemEnum *item,
- QWidget *parent )
+ TQWidget *parent )
{
KPrefsWidRadios *w = new KPrefsWidRadios( item, parent );
- QValueList<KConfigSkeleton::ItemEnum::Choice> choices;
+ TQValueList<KConfigSkeleton::ItemEnum::Choice> choices;
choices = item->choices();
- QValueList<KConfigSkeleton::ItemEnum::Choice>::ConstIterator it;
+ TQValueList<KConfigSkeleton::ItemEnum::Choice>::ConstIterator it;
for( it = choices.begin(); it != choices.end(); ++it ) {
w->addRadio( (*it).label, (*it).whatsThis );
}
@@ -644,12 +644,12 @@ KPrefsWidRadios *KPrefsWidManager::addWidRadios( KConfigSkeleton::ItemEnum *item
}
KPrefsWidCombo *KPrefsWidManager::addWidCombo( KConfigSkeleton::ItemEnum *item,
- QWidget* parent )
+ TQWidget* parent )
{
KPrefsWidCombo *w = new KPrefsWidCombo( item, parent );
- QValueList<KConfigSkeleton::ItemEnum::Choice> choices;
+ TQValueList<KConfigSkeleton::ItemEnum::Choice> choices;
choices = item->choices();
- QValueList<KConfigSkeleton::ItemEnum::Choice>::ConstIterator it;
+ TQValueList<KConfigSkeleton::ItemEnum::Choice>::ConstIterator it;
for( it = choices.begin(); it != choices.end(); ++it ) {
w->comboBox()->insertItem( (*it).label, -1 );
}
@@ -658,16 +658,16 @@ KPrefsWidCombo *KPrefsWidManager::addWidCombo( KConfigSkeleton::ItemEnum *item,
}
KPrefsWidString *KPrefsWidManager::addWidString( KConfigSkeleton::ItemString *item,
- QWidget *parent )
+ TQWidget *parent )
{
KPrefsWidString *w = new KPrefsWidString( item, parent,
- QLineEdit::Normal );
+ TQLineEdit::Normal );
addWid( w );
return w;
}
KPrefsWidPath *KPrefsWidManager::addWidPath( KConfigSkeleton::ItemPath *item,
- QWidget *parent, const QString &filter, uint mode )
+ TQWidget *parent, const TQString &filter, uint mode )
{
KPrefsWidPath *w = new KPrefsWidPath( item, parent, filter, mode );
addWid( w );
@@ -675,16 +675,16 @@ KPrefsWidPath *KPrefsWidManager::addWidPath( KConfigSkeleton::ItemPath *item,
}
KPrefsWidString *KPrefsWidManager::addWidPassword( KConfigSkeleton::ItemString *item,
- QWidget *parent )
+ TQWidget *parent )
{
- KPrefsWidString *w = new KPrefsWidString( item, parent, QLineEdit::Password );
+ KPrefsWidString *w = new KPrefsWidString( item, parent, TQLineEdit::Password );
addWid( w );
return w;
}
KPrefsWidFont *KPrefsWidManager::addWidFont( KConfigSkeleton::ItemFont *item,
- QWidget *parent,
- const QString &sampleText )
+ TQWidget *parent,
+ const TQString &sampleText )
{
KPrefsWidFont *w = new KPrefsWidFont( item, parent, sampleText );
addWid( w );
@@ -692,7 +692,7 @@ KPrefsWidFont *KPrefsWidManager::addWidFont( KConfigSkeleton::ItemFont *item,
}
KPrefsWidInt *KPrefsWidManager::addWidInt( KConfigSkeleton::ItemInt *item,
- QWidget *parent )
+ TQWidget *parent )
{
KPrefsWidInt *w = new KPrefsWidInt( item, parent );
addWid( w );
@@ -733,7 +733,7 @@ void KPrefsWidManager::writeWidConfig()
}
-KPrefsDialog::KPrefsDialog( KConfigSkeleton *prefs, QWidget *parent, char *name,
+KPrefsDialog::KPrefsDialog( KConfigSkeleton *prefs, TQWidget *parent, char *name,
bool modal )
: KDialogBase(IconList,i18n("Preferences"),Ok|Apply|Cancel|Default,Ok,parent,
name,modal,true),
@@ -742,8 +742,8 @@ KPrefsDialog::KPrefsDialog( KConfigSkeleton *prefs, QWidget *parent, char *name,
// TODO: This seems to cause a crash on exit. Investigate later.
// mPrefsWids.setAutoDelete(true);
-// connect(this,SIGNAL(defaultClicked()),SLOT(setDefaults()));
- connect(this,SIGNAL(cancelClicked()),SLOT(reject()));
+// connect(this,TQT_SIGNAL(defaultClicked()),TQT_SLOT(setDefaults()));
+ connect(this,TQT_SIGNAL(cancelClicked()),TQT_SLOT(reject()));
}
KPrefsDialog::~KPrefsDialog()
@@ -754,23 +754,23 @@ void KPrefsDialog::autoCreate()
{
KConfigSkeletonItem::List items = prefs()->items();
- QMap<QString,QWidget *> mGroupPages;
- QMap<QString,QGridLayout *> mGroupLayouts;
- QMap<QString,int> mCurrentRows;
+ TQMap<TQString,TQWidget *> mGroupPages;
+ TQMap<TQString,TQGridLayout *> mGroupLayouts;
+ TQMap<TQString,int> mCurrentRows;
KConfigSkeletonItem::List::ConstIterator it;
for( it = items.begin(); it != items.end(); ++it ) {
- QString group = (*it)->group();
- QString name = (*it)->name();
+ TQString group = (*it)->group();
+ TQString name = (*it)->name();
kdDebug() << "ITEMS: " << (*it)->name() << endl;
- QWidget *page;
- QGridLayout *layout;
+ TQWidget *page;
+ TQGridLayout *layout;
int currentRow;
if ( !mGroupPages.contains( group ) ) {
page = addPage( group );
- layout = new QGridLayout( page );
+ layout = new TQGridLayout( page );
mGroupPages.insert( group, page );
mGroupLayouts.insert( group, layout );
currentRow = 0;
@@ -784,7 +784,7 @@ void KPrefsDialog::autoCreate()
KPrefsWid *wid = KPrefsWidFactory::create( *it, page );
if ( wid ) {
- QValueList<QWidget *> widgets = wid->widgets();
+ TQValueList<TQWidget *> widgets = wid->widgets();
if ( widgets.count() == 1 ) {
layout->addMultiCellWidget( widgets[ 0 ],
currentRow, currentRow, 0, 1 );
@@ -796,7 +796,7 @@ void KPrefsDialog::autoCreate()
}
if ( (*it)->isImmutable() ) {
- QValueList<QWidget *>::Iterator it2;
+ TQValueList<TQWidget *>::Iterator it2;
for( it2 = widgets.begin(); it2 != widgets.end(); ++it2 ) {
(*it2)->setEnabled( false );
}
@@ -857,7 +857,7 @@ void KPrefsDialog::slotDefault()
}
-KPrefsModule::KPrefsModule( KConfigSkeleton *prefs, QWidget *parent,
+KPrefsModule::KPrefsModule( KConfigSkeleton *prefs, TQWidget *parent,
const char *name )
: KCModule( parent, name ),
KPrefsWidManager( prefs )
@@ -869,7 +869,7 @@ void KPrefsModule::addWid( KPrefsWid *wid )
{
KPrefsWidManager::addWid( wid );
- connect( wid, SIGNAL( changed() ), SLOT( slotWidChanged() ) );
+ connect( wid, TQT_SIGNAL( changed() ), TQT_SLOT( slotWidChanged() ) );
}
void KPrefsModule::slotWidChanged()
diff --git a/libkdepim/kprefsdialog.h b/libkdepim/kprefsdialog.h
index 7408d19eb..2b3d06c22 100644
--- a/libkdepim/kprefsdialog.h
+++ b/libkdepim/kprefsdialog.h
@@ -23,10 +23,10 @@
#ifndef KPREFSDIALOG_H
#define KPREFSDIALOG_H
-#include <qptrlist.h>
-#include <qlineedit.h>
-#include <qvaluelist.h>
-#include <qdatetimeedit.h>
+#include <tqptrlist.h>
+#include <tqlineedit.h>
+#include <tqvaluelist.h>
+#include <tqdatetimeedit.h>
#include <kdialogbase.h>
#include <kcmodule.h>
@@ -73,7 +73,7 @@ class KDE_EXPORT KPrefsWid : public QObject
/**
Return a list of widgets used by this control element.
*/
- virtual QValueList<QWidget *> widgets() const;
+ virtual TQValueList<TQWidget *> widgets() const;
signals:
/**
@@ -97,22 +97,22 @@ class KDE_EXPORT KPrefsWidBool : public KPrefsWid
@param item The KConfigSkeletonItem representing the preferences entry.
@param parent Parent widget.
*/
- KPrefsWidBool( KConfigSkeleton::ItemBool *item, QWidget *parent );
+ KPrefsWidBool( KConfigSkeleton::ItemBool *item, TQWidget *parent );
/**
Return the QCheckbox used by this control element.
*/
- QCheckBox *checkBox();
+ TQCheckBox *checkBox();
void readConfig();
void writeConfig();
- QValueList<QWidget *> widgets() const;
+ TQValueList<TQWidget *> widgets() const;
private:
KConfigSkeleton::ItemBool *mItem;
- QCheckBox *mCheck;
+ TQCheckBox *mCheck;
};
/**
@@ -132,28 +132,28 @@ class KDE_EXPORT KPrefsWidInt : public KPrefsWid
@param item The KConfigSkeletonItem representing the preferences entry.
@param parent Parent widget.
*/
- KPrefsWidInt( KConfigSkeleton::ItemInt *item, QWidget *parent );
+ KPrefsWidInt( KConfigSkeleton::ItemInt *item, TQWidget *parent );
/**
- Return QLabel used by this control element.
+ Return TQLabel used by this control element.
*/
- QLabel *label();
+ TQLabel *label();
/**
- Return the QSpinBox used by this control element.
+ Return the TQSpinBox used by this control element.
*/
- QSpinBox *spinBox();
+ TQSpinBox *spinBox();
void readConfig();
void writeConfig();
- QValueList<QWidget *> widgets() const;
+ TQValueList<TQWidget *> widgets() const;
private:
KConfigSkeleton::ItemInt *mItem;
- QLabel *mLabel;
- QSpinBox *mSpin;
+ TQLabel *mLabel;
+ TQSpinBox *mSpin;
};
/**
@@ -172,14 +172,14 @@ class KDE_EXPORT KPrefsWidTime : public KPrefsWid
@param item The KConfigSkeletonItem representing the preferences entry.
@param parent Parent widget.
*/
- KPrefsWidTime( KConfigSkeleton::ItemDateTime *item, QWidget *parent );
+ KPrefsWidTime( KConfigSkeleton::ItemDateTime *item, TQWidget *parent );
/**
- Return QLabel used by this widget.
+ Return TQLabel used by this widget.
*/
- QLabel *label();
+ TQLabel *label();
/**
- Return QSpinBox used by this widget.
+ Return TQSpinBox used by this widget.
*/
KTimeEdit *timeEdit();
@@ -189,7 +189,7 @@ class KDE_EXPORT KPrefsWidTime : public KPrefsWid
private:
KConfigSkeleton::ItemDateTime *mItem;
- QLabel *mLabel;
+ TQLabel *mLabel;
KTimeEdit *mTimeEdit;
};
@@ -210,14 +210,14 @@ class KDE_EXPORT KPrefsWidDuration : public KPrefsWid
@param item The KConfigSkeletonItem representing the preferences entry.
@param parent Parent widget.
*/
- KPrefsWidDuration( KConfigSkeleton::ItemDateTime *item, QWidget *parent );
+ KPrefsWidDuration( KConfigSkeleton::ItemDateTime *item, TQWidget *parent );
/**
- Return QLabel used by this widget.
+ Return TQLabel used by this widget.
*/
- QLabel *label();
+ TQLabel *label();
/**
- Return QSpinBox used by this widget.
+ Return TQSpinBox used by this widget.
*/
QTimeEdit *timeEdit();
@@ -227,7 +227,7 @@ class KDE_EXPORT KPrefsWidDuration : public KPrefsWid
private:
KConfigSkeleton::ItemDateTime *mItem;
- QLabel *mLabel;
+ TQLabel *mLabel;
QTimeEdit *mTimeEdit;
};
@@ -247,14 +247,14 @@ class KDE_EXPORT KPrefsWidDate : public KPrefsWid
@param item The KConfigSkeletonItem representing the preferences entry.
@param parent Parent widget.
*/
- KPrefsWidDate( KConfigSkeleton::ItemDateTime *item, QWidget *parent );
+ KPrefsWidDate( KConfigSkeleton::ItemDateTime *item, TQWidget *parent );
/**
- Return QLabel used by this widget.
+ Return TQLabel used by this widget.
*/
- QLabel *label();
+ TQLabel *label();
/**
- Return QSpinBox used by this widget.
+ Return TQSpinBox used by this widget.
*/
KDateEdit *dateEdit();
@@ -264,7 +264,7 @@ class KDE_EXPORT KPrefsWidDate : public KPrefsWid
private:
KConfigSkeleton::ItemDateTime *mItem;
- QLabel *mLabel;
+ TQLabel *mLabel;
KDateEdit *mDateEdit;
};
@@ -286,16 +286,16 @@ class KDE_EXPORT KPrefsWidColor : public KPrefsWid
@param item The KConfigSkeletonItem representing the preferences entry.
@param parent Parent widget.
*/
- KPrefsWidColor( KConfigSkeleton::ItemColor *item, QWidget *parent );
+ KPrefsWidColor( KConfigSkeleton::ItemColor *item, TQWidget *parent );
/**
Destruct color setting widget.
*/
~KPrefsWidColor();
/**
- Return QLabel for the button
+ Return TQLabel for the button
*/
- QLabel *label();
+ TQLabel *label();
/**
Return button opening the color dialog.
*/
@@ -307,7 +307,7 @@ class KDE_EXPORT KPrefsWidColor : public KPrefsWid
private:
KConfigSkeleton::ItemColor *mItem;
- QLabel *mLabel;
+ TQLabel *mLabel;
KColorButton *mButton;
};
@@ -330,24 +330,24 @@ class KDE_EXPORT KPrefsWidFont : public KPrefsWid
@param sampleText Sample text for previewing the selected font.
*/
KPrefsWidFont( KConfigSkeleton::ItemFont *item,
- QWidget *parent, const QString &sampleText );
+ TQWidget *parent, const TQString &sampleText );
/**
Destruct font setting widget.
*/
~KPrefsWidFont();
/**
- Return QLabel.
+ Return TQLabel.
*/
- QLabel *label();
+ TQLabel *label();
/**
- Return QFrame used as preview field.
+ Return TQFrame used as preview field.
*/
- QFrame *preview();
+ TQFrame *preview();
/**
Return button opening the font dialog.
*/
- QPushButton *button();
+ TQPushButton *button();
void readConfig();
void writeConfig();
@@ -358,9 +358,9 @@ class KDE_EXPORT KPrefsWidFont : public KPrefsWid
private:
KConfigSkeleton::ItemFont *mItem;
- QLabel *mLabel;
- QLabel *mPreview;
- QPushButton *mButton;
+ TQLabel *mLabel;
+ TQLabel *mPreview;
+ TQPushButton *mButton;
};
/**
@@ -384,7 +384,7 @@ class KDE_EXPORT KPrefsWidRadios : public KPrefsWid
@param item The KConfigSkeletonItem representing the preferences entry.
@param parent Parent widget.
*/
- KPrefsWidRadios( KConfigSkeleton::ItemEnum *item, QWidget *parent );
+ KPrefsWidRadios( KConfigSkeleton::ItemEnum *item, TQWidget *parent );
virtual ~KPrefsWidRadios();
/**
@@ -393,23 +393,23 @@ class KDE_EXPORT KPrefsWidRadios : public KPrefsWid
@param text Text of the button.
@param whatsThis What's This help for the button.
*/
- void addRadio( const QString &text,
- const QString &whatsThis = QString::null );
+ void addRadio( const TQString &text,
+ const TQString &whatsThis = TQString::null );
/**
Return the box widget used by this widget.
*/
- QButtonGroup *groupBox();
+ TQButtonGroup *groupBox();
void readConfig();
void writeConfig();
- QValueList<QWidget *> widgets() const;
+ TQValueList<TQWidget *> widgets() const;
private:
KConfigSkeleton::ItemEnum *mItem;
- QButtonGroup *mBox;
+ TQButtonGroup *mBox;
};
/**
@@ -432,18 +432,18 @@ class KDE_EXPORT KPrefsWidCombo : public KPrefsWid
@param item The KConfigSkeletonItem representing the preferences entry.
@param parent Parent widget.
*/
- KPrefsWidCombo( KConfigSkeleton::ItemEnum *item, QWidget *parent );
+ KPrefsWidCombo( KConfigSkeleton::ItemEnum *item, TQWidget *parent );
virtual ~KPrefsWidCombo();
void readConfig();
void writeConfig();
- QComboBox *comboBox();
- QValueList<QWidget *> widgets() const;
+ TQComboBox *comboBox();
+ TQValueList<TQWidget *> widgets() const;
private:
KConfigSkeleton::ItemEnum *mItem;
- QComboBox *mCombo;
+ TQComboBox *mCombo;
};
@@ -466,32 +466,32 @@ class KDE_EXPORT KPrefsWidString : public KPrefsWid
@param parent Parent widget.
@param echomode Describes how a line edit should display its contents.
*/
- KPrefsWidString( KConfigSkeleton::ItemString *item, QWidget *parent,
- QLineEdit::EchoMode echomode=QLineEdit::Normal );
+ KPrefsWidString( KConfigSkeleton::ItemString *item, TQWidget *parent,
+ TQLineEdit::EchoMode echomode=TQLineEdit::Normal );
/**
Destructor.
*/
virtual ~KPrefsWidString();
/**
- Return QLabel used by this widget.
+ Return TQLabel used by this widget.
*/
- QLabel *label();
+ TQLabel *label();
/**
- Return QLineEdit used by this widget.
+ Return TQLineEdit used by this widget.
*/
- QLineEdit *lineEdit();
+ TQLineEdit *lineEdit();
void readConfig();
void writeConfig();
- QValueList<QWidget *> widgets() const;
+ TQValueList<TQWidget *> widgets() const;
private:
KConfigSkeleton::ItemString *mItem;
- QLabel *mLabel;
- QLineEdit *mEdit;
+ TQLabel *mLabel;
+ TQLineEdit *mEdit;
};
@@ -514,31 +514,31 @@ class KDE_EXPORT KPrefsWidPath : public KPrefsWid
@param filter URLRequester filter
@param mode Describes how a line edit should display its contents.
*/
- KPrefsWidPath( KConfigSkeleton::ItemPath *item, QWidget *parent,
- const QString &filter = QString::null, uint mode = KFile::File );
+ KPrefsWidPath( KConfigSkeleton::ItemPath *item, TQWidget *parent,
+ const TQString &filter = TQString::null, uint mode = KFile::File );
/**
Destructor.
*/
virtual ~KPrefsWidPath();
/**
- Return QLabel used by this widget.
+ Return TQLabel used by this widget.
*/
- QLabel *label();
+ TQLabel *label();
/**
- Return QLineEdit used by this widget.
+ Return TQLineEdit used by this widget.
*/
KURLRequester *urlRequester();
void readConfig();
void writeConfig();
- QValueList<QWidget *> widgets() const;
+ TQValueList<TQWidget *> widgets() const;
private:
KConfigSkeleton::ItemPath *mItem;
- QLabel *mLabel;
+ TQLabel *mLabel;
KURLRequester *mURLRequester;
};
@@ -579,7 +579,7 @@ class KDE_EXPORT KPrefsWidManager
@param parent Parent widget.
*/
KPrefsWidBool *addWidBool( KConfigSkeleton::ItemBool *item,
- QWidget *parent );
+ TQWidget *parent );
/**
Register a @ref KPrefsWidInt object.
@@ -588,7 +588,7 @@ class KDE_EXPORT KPrefsWidManager
@param parent Parent widget.
*/
KPrefsWidInt *addWidInt( KConfigSkeleton::ItemInt *item,
- QWidget *parent );
+ TQWidget *parent );
/**
Register a @ref KPrefsWidDate object.
@@ -597,7 +597,7 @@ class KDE_EXPORT KPrefsWidManager
@param parent Parent widget.
*/
KPrefsWidDate *addWidDate( KConfigSkeleton::ItemDateTime *item,
- QWidget *parent );
+ TQWidget *parent );
/**
Register a @ref KPrefsWidTime object.
@@ -606,7 +606,7 @@ class KDE_EXPORT KPrefsWidManager
@param parent Parent widget.
*/
KPrefsWidTime *addWidTime( KConfigSkeleton::ItemDateTime *item,
- QWidget *parent );
+ TQWidget *parent );
/**
Register a @ref KPrefsWidDuration object.
@@ -615,7 +615,7 @@ class KDE_EXPORT KPrefsWidManager
@param parent Parent widget.
*/
KPrefsWidDuration *addWidDuration( KConfigSkeleton::ItemDateTime *item,
- QWidget *parent );
+ TQWidget *parent );
/**
Register a @ref KPrefsWidColor object.
@@ -624,7 +624,7 @@ class KDE_EXPORT KPrefsWidManager
@param parent Parent widget.
*/
KPrefsWidColor *addWidColor( KConfigSkeleton::ItemColor *item,
- QWidget *parent );
+ TQWidget *parent );
/**
Register a @ref KPrefsWidRadios object. The choices represented by the
@@ -634,7 +634,7 @@ class KDE_EXPORT KPrefsWidManager
@param parent Parent widget.
*/
KPrefsWidRadios *addWidRadios( KConfigSkeleton::ItemEnum *item,
- QWidget *parent );
+ TQWidget *parent );
/**
Register a @ref KPrefsWidCombo object. The choices represented by the
@@ -644,7 +644,7 @@ class KDE_EXPORT KPrefsWidManager
@param parent Parent widget.
*/
KPrefsWidCombo *addWidCombo( KConfigSkeleton::ItemEnum *item,
- QWidget *parent );
+ TQWidget *parent );
/**
Register a @ref KPrefsWidString object.
@@ -653,7 +653,7 @@ class KDE_EXPORT KPrefsWidManager
@param parent Parent widget.
*/
KPrefsWidString *addWidString( KConfigSkeleton::ItemString *item,
- QWidget *parent );
+ TQWidget *parent );
/**
Register a path @ref KPrefsWidPath object.
@@ -663,18 +663,18 @@ class KDE_EXPORT KPrefsWidManager
@param filter URLRequester filter
@param mode URLRequester mode
*/
- KPrefsWidPath *addWidPath ( KConfigSkeleton::ItemPath *item, QWidget *parent,
- const QString &filter = QString::null,
+ KPrefsWidPath *addWidPath ( KConfigSkeleton::ItemPath *item, TQWidget *parent,
+ const TQString &filter = TQString::null,
uint mode = KFile::File );
/**
- Register a password @ref KPrefsWidString object, with echomode set to QLineEdit::Password.
+ Register a password @ref KPrefsWidString object, with echomode set to TQLineEdit::Password.
@param item The KConfigSkeletonItem representing the preferences entry.
@param parent Parent widget.
*/
KPrefsWidString *addWidPassword ( KConfigSkeleton::ItemString *item,
- QWidget *parent );
+ TQWidget *parent );
/**
Register a @ref KPrefsWidFont object.
@@ -685,7 +685,7 @@ class KDE_EXPORT KPrefsWidManager
@param sampleText Sample text for previewing the selected font.
*/
KPrefsWidFont *addWidFont( KConfigSkeleton::ItemFont *item,
- QWidget *parent, const QString &sampleText );
+ TQWidget *parent, const TQString &sampleText );
/** Set all widgets to default values. */
void setWidDefaults();
@@ -699,7 +699,7 @@ class KDE_EXPORT KPrefsWidManager
private:
KConfigSkeleton *mPrefs;
- QPtrList<KPrefsWid> mPrefsWids;
+ TQPtrList<KPrefsWid> mPrefsWids;
};
@@ -727,7 +727,7 @@ class KDE_EXPORT KPrefsDialog : public KDialogBase, public KPrefsWidManager
@param name Widget name.
@param modal true, if dialog has to be modal, false for non-modal.
*/
- KPrefsDialog( KConfigSkeleton *prefs, QWidget *parent = 0, char *name = 0,
+ KPrefsDialog( KConfigSkeleton *prefs, TQWidget *parent = 0, char *name = 0,
bool modal = false );
/**
Destructor.
@@ -772,7 +772,7 @@ class KDE_EXPORT KPrefsModule : public KCModule, public KPrefsWidManager
{
Q_OBJECT
public:
- KPrefsModule( KConfigSkeleton *, QWidget *parent = 0, const char *name = 0 );
+ KPrefsModule( KConfigSkeleton *, TQWidget *parent = 0, const char *name = 0 );
virtual void addWid( KPrefsWid * );
diff --git a/libkdepim/kregexp3.cpp b/libkdepim/kregexp3.cpp
index a14b446f6..6bb519e56 100644
--- a/libkdepim/kregexp3.cpp
+++ b/libkdepim/kregexp3.cpp
@@ -37,22 +37,22 @@
#include <kdebug.h>
#endif
-QString KRegExp3::replace( const QString & str,
- const QString & replacementStr,
+TQString KRegExp3::replace( const TQString & str,
+ const TQString & replacementStr,
int start, bool global )
{
int oldpos, pos;
//-------- parsing the replacementStr into
//-------- literal parts and backreferences:
- QStringList literalStrs;
- QValueList<int> backRefs;
+ TQStringList literalStrs;
+ TQValueList<int> backRefs;
// Due to LTS: The regexp in unquoted form and with spaces:
// \\ (\d) | \$ (\d) | \$ \{ (\d+) \}
- QRegExp rx( "\\\\(\\d)|\\$(\\d)|\\$\\{(\\d+)\\}" );
- QRegExp bbrx("\\\\");
- QRegExp brx("\\");
+ TQRegExp rx( "\\\\(\\d)|\\$(\\d)|\\$\\{(\\d+)\\}" );
+ TQRegExp bbrx("\\\\");
+ TQRegExp brx("\\");
#ifdef DEBUG_KREGEXP3
kdDebug() << "Analyzing replacementStr: \"" + replacementStr + "\"" << endl;
@@ -64,7 +64,7 @@ QString KRegExp3::replace( const QString & str,
pos = rx.search( replacementStr, pos );
#ifdef DEBUG_KREGEXP3
- kdDebug() << QString(" Found match at pos %1").arg(pos) << endl;
+ kdDebug() << TQString(" Found match at pos %1").arg(pos) << endl;
#endif
if ( pos < 0 ) {
@@ -80,21 +80,21 @@ QString KRegExp3::replace( const QString & str,
.replace( bbrx, "\\" )
.replace( brx, "" );
#ifdef DEBUG_KREGEXP3
- kdDebug() << QString(" Inserting \"") + literalStrs.last() + "\" as literal." << endl;
+ kdDebug() << TQString(" Inserting \"") + literalStrs.last() + "\" as literal." << endl;
kdDebug() << " Searching for corresponding digit(s):" << endl;
#endif
for ( int i = 1 ; i < 4 ; i++ )
if ( !rx.cap(i).isEmpty() ) {
backRefs << rx.cap(i).toInt();
#ifdef DEBUG_KREGEXP3
- kdDebug() << QString(" Found %1 at position %2 in the capturedTexts.")
+ kdDebug() << TQString(" Found %1 at position %2 in the capturedTexts.")
.arg(backRefs.last()).arg(i) << endl;
#endif
break;
}
pos += rx.matchedLength();
#ifdef DEBUG_KREGEXP3
- kdDebug() << QString(" Setting new pos to %1.").arg(pos) << endl;
+ kdDebug() << TQString(" Setting new pos to %1.").arg(pos) << endl;
#endif
oldpos = pos;
}
@@ -107,12 +107,12 @@ QString KRegExp3::replace( const QString & str,
//-------- actual construction of the
//-------- resulting QString
- QString result = "";
+ TQString result = "";
oldpos = 0;
pos = start;
- QStringList::Iterator sIt;
- QValueList<int>::Iterator iIt;
+ TQStringList::Iterator sIt;
+ TQValueList<int>::Iterator iIt;
if ( start < 0 )
start += str.length();
@@ -125,7 +125,7 @@ QString KRegExp3::replace( const QString & str,
pos = search( str, pos );
#ifdef DEBUG_KREGEXP3
- kdDebug() << QString(" Found match at pos %1").arg(pos) << endl;
+ kdDebug() << TQString(" Found match at pos %1").arg(pos) << endl;
#endif
if ( pos < 0 ) {
@@ -168,7 +168,7 @@ QString KRegExp3::replace( const QString & str,
}
pos += matchedLength();
#ifdef DEBUG_KREGEXP3
- kdDebug() << QString(" Setting new pos to %1.").arg(pos) << endl;
+ kdDebug() << TQString(" Setting new pos to %1.").arg(pos) << endl;
#endif
oldpos = pos;
diff --git a/libkdepim/kregexp3.h b/libkdepim/kregexp3.h
index 34473029a..40c7681d3 100644
--- a/libkdepim/kregexp3.h
+++ b/libkdepim/kregexp3.h
@@ -29,17 +29,17 @@
your version.
*/
-#include <qglobal.h>
-#include <qregexp.h>
+#include <tqglobal.h>
+#include <tqregexp.h>
-#include <qstring.h>
+#include <tqstring.h>
#include <kdepimmacros.h>
-/** @short A QRegExp (Qt3.x) with a replace() method.
+/** @short A TQRegExp (Qt3.x) with a replace() method.
This class is simply there to provide a namespace for some nice
- enhancements of the mighty QRegExp (Qt3 version) regular
+ enhancements of the mighty TQRegExp (Qt3 version) regular
expression engine, namely the method replace(), which can be
used to do search-and-replace like one is used to from perl or sed.
@@ -80,15 +80,15 @@ class KDE_EXPORT KRegExp3 : public QRegExp
{
public:
KRegExp3()
- : QRegExp() {}
- KRegExp3( const QString & pattern,
+ : TQRegExp() {}
+ KRegExp3( const TQString & pattern,
bool caseSensitive = TRUE,
bool wildcard = FALSE )
- : QRegExp( pattern, caseSensitive, wildcard ) {}
- KRegExp3( const QRegExp & rx )
- : QRegExp( rx ) {}
+ : TQRegExp( pattern, caseSensitive, wildcard ) {}
+ KRegExp3( const TQRegExp & rx )
+ : TQRegExp( rx ) {}
KRegExp3( const KRegExp3 & rx )
- : QRegExp( (QRegExp)rx ) {}
+ : TQRegExp( (TQRegExp)rx ) {}
/** Replaces each matching subpattern in @p str with
@p replacementStr, inserting captured substrings for
@@ -105,7 +105,7 @@ public:
Equivalent to the /g switch to perl's s/// operator.
@return The modified string.
*/
- QString replace( const QString & str,
- const QString & replacementStr,
+ TQString replace( const TQString & str,
+ const TQString & replacementStr,
int start=0, bool global=TRUE );
};
diff --git a/libkdepim/kresourceprefs.cpp b/libkdepim/kresourceprefs.cpp
index 3a745ea41..2a79cf837 100644
--- a/libkdepim/kresourceprefs.cpp
+++ b/libkdepim/kresourceprefs.cpp
@@ -19,16 +19,16 @@
Boston, MA 02110-1301, USA.
*/
-#include <qstring.h>
+#include <tqstring.h>
#include "kresourceprefs.h"
-KResourcePrefs::KResourcePrefs( const QString &name )
+KResourcePrefs::KResourcePrefs( const TQString &name )
: KConfigSkeleton( name )
{
}
-void KResourcePrefs::addGroupPrefix( const QString &prefix )
+void KResourcePrefs::addGroupPrefix( const TQString &prefix )
{
KConfigSkeletonItem::List itemList = items();
KConfigSkeletonItem::List::Iterator it;
diff --git a/libkdepim/kresourceprefs.h b/libkdepim/kresourceprefs.h
index b42b4952a..d87a55aad 100644
--- a/libkdepim/kresourceprefs.h
+++ b/libkdepim/kresourceprefs.h
@@ -38,12 +38,12 @@ class QString;
class KDE_EXPORT KResourcePrefs : public KConfigSkeleton
{
public:
- KResourcePrefs( const QString &name = QString::null );
+ KResourcePrefs( const TQString &name = TQString::null );
/**
Adds a prefix to all groups of this prefs object.
*/
- void addGroupPrefix( const QString &prefix );
+ void addGroupPrefix( const TQString &prefix );
};
#endif
diff --git a/libkdepim/krsqueezedtextlabel.cpp b/libkdepim/krsqueezedtextlabel.cpp
index 00389a2a0..c61a706b2 100644
--- a/libkdepim/krsqueezedtextlabel.cpp
+++ b/libkdepim/krsqueezedtextlabel.cpp
@@ -20,57 +20,57 @@
#include "krsqueezedtextlabel.h"
#include "kstringhandler.h"
-#include <qtooltip.h>
+#include <tqtooltip.h>
-KRSqueezedTextLabel::KRSqueezedTextLabel( const QString &text , QWidget *parent, const char *name )
- : QLabel ( parent, name ) {
- setSizePolicy(QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ));
+KRSqueezedTextLabel::KRSqueezedTextLabel( const TQString &text , TQWidget *parent, const char *name )
+ : TQLabel ( parent, name ) {
+ setSizePolicy(TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Fixed ));
fullText = text;
squeezeTextToLabel();
}
-KRSqueezedTextLabel::KRSqueezedTextLabel( QWidget *parent, const char *name )
- : QLabel ( parent, name ) {
- setSizePolicy(QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ));
+KRSqueezedTextLabel::KRSqueezedTextLabel( TQWidget *parent, const char *name )
+ : TQLabel ( parent, name ) {
+ setSizePolicy(TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Fixed ));
}
-void KRSqueezedTextLabel::resizeEvent( QResizeEvent * ) {
+void KRSqueezedTextLabel::resizeEvent( TQResizeEvent * ) {
squeezeTextToLabel();
}
-QSize KRSqueezedTextLabel::minimumSizeHint() const
+TQSize KRSqueezedTextLabel::minimumSizeHint() const
{
- QSize sh = QLabel::minimumSizeHint();
+ TQSize sh = TQLabel::minimumSizeHint();
sh.setWidth(-1);
return sh;
}
-QSize KRSqueezedTextLabel::sizeHint() const
+TQSize KRSqueezedTextLabel::sizeHint() const
{
- return QSize(contentsRect().width(), QLabel::sizeHint().height());
+ return TQSize(contentsRect().width(), TQLabel::sizeHint().height());
}
-void KRSqueezedTextLabel::setText( const QString &text ) {
+void KRSqueezedTextLabel::setText( const TQString &text ) {
fullText = text;
squeezeTextToLabel();
}
void KRSqueezedTextLabel::squeezeTextToLabel() {
- QFontMetrics fm(fontMetrics());
+ TQFontMetrics fm(fontMetrics());
int labelWidth = size().width();
int textWidth = fm.width(fullText);
if (textWidth > labelWidth) {
- QString squeezedText = KStringHandler::rPixelSqueeze(fullText, fm, labelWidth);
- QLabel::setText(squeezedText);
+ TQString squeezedText = KStringHandler::rPixelSqueeze(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();
}
}
@@ -78,8 +78,8 @@ void KRSqueezedTextLabel::squeezeTextToLabel() {
void KRSqueezedTextLabel::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/libkdepim/krsqueezedtextlabel.h b/libkdepim/krsqueezedtextlabel.h
index 268c59fba..a5e4e7760 100644
--- a/libkdepim/krsqueezedtextlabel.h
+++ b/libkdepim/krsqueezedtextlabel.h
@@ -21,11 +21,11 @@
#ifndef KRSQUEEZEDTEXTLABEL_H
#define KRSQUEEZEDTEXTLABEL_H
-#include <qlabel.h>
+#include <tqlabel.h>
#include <kdepimmacros.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
*
@@ -38,36 +38,36 @@
/*
* QLabel
*/
-class KDE_EXPORT KRSqueezedTextLabel : public QLabel {
+class KDE_EXPORT KRSqueezedTextLabel : public TQLabel {
Q_OBJECT
public:
/**
* Default constructor.
*/
- KRSqueezedTextLabel( QWidget *parent, const char *name = 0 );
- KRSqueezedTextLabel( const QString &text, QWidget *parent, const char *name = 0 );
+ KRSqueezedTextLabel( TQWidget *parent, const char *name = 0 );
+ KRSqueezedTextLabel( 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;
};
diff --git a/libkdepim/kscoring.cpp b/libkdepim/kscoring.cpp
index 583133896..17dd1d439 100644
--- a/libkdepim/kscoring.cpp
+++ b/libkdepim/kscoring.cpp
@@ -22,12 +22,12 @@
#include <iostream>
-#include <qfile.h>
-#include <qdom.h>
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qcheckbox.h>
-#include <qtextview.h>
+#include <tqfile.h>
+#include <tqdom.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqcheckbox.h>
+#include <tqtextview.h>
#include <klocale.h>
#include <kstandarddirs.h>
@@ -40,9 +40,9 @@
//----------------------------------------------------------------------------
// a small function to encode attribute values, code stolen from QDom
-static QString toXml(const QString& str)
+static TQString toXml(const TQString& str)
{
- QString tmp(str);
+ TQString tmp(str);
uint len = tmp.length();
uint i = 0;
while ( i < len ) {
@@ -75,18 +75,18 @@ static QString toXml(const QString& str)
NotifyDialog* NotifyDialog::me = 0;
NotifyDialog::NotesMap NotifyDialog::dict;
-NotifyDialog::NotifyDialog(QWidget* p)
+NotifyDialog::NotifyDialog(TQWidget* p)
: KDialogBase(p,"notify action dialog",true,"Notify Message",Close,Close,true)
{
- QFrame *f = makeMainWidget();
- QVBoxLayout *topL = new QVBoxLayout(f);
- note = new QLabel(f);
+ TQFrame *f = makeMainWidget();
+ TQVBoxLayout *topL = new TQVBoxLayout(f);
+ note = new TQLabel(f);
note->setTextFormat(RichText);
topL->addWidget(note);
- QCheckBox *check = new QCheckBox(i18n("Do not show this message again"),f);
+ TQCheckBox *check = new TQCheckBox(i18n("Do not show this message again"),f);
check->setChecked(true);
topL->addWidget(check);
- connect(check,SIGNAL(toggled(bool)),SLOT(slotShowAgainToggled(bool)));
+ connect(check,TQT_SIGNAL(toggled(bool)),TQT_SLOT(slotShowAgainToggled(bool)));
}
void NotifyDialog::slotShowAgainToggled(bool flag)
@@ -95,7 +95,7 @@ void NotifyDialog::slotShowAgainToggled(bool flag)
kdDebug(5100) << "note \"" << note << "\" will popup again: " << flag << endl;
}
-void NotifyDialog::display(ScorableArticle& a, const QString& s)
+void NotifyDialog::display(ScorableArticle& a, const TQString& s)
{
kdDebug(5100) << "displaying message" << endl;
if (!me) me = new NotifyDialog();
@@ -103,7 +103,7 @@ void NotifyDialog::display(ScorableArticle& a, const QString& s)
NotesMap::Iterator i = dict.find(s);
if (i == dict.end() || i.data()) {
- QString msg = i18n("Article\n<b>%1</b><br><b>%2</b><br>caused the following"
+ TQString msg = i18n("Article\n<b>%1</b><br><b>%2</b><br>caused the following"
" note to appear:<br>%3").
arg(a.from()).
arg(a.subject()).
@@ -121,7 +121,7 @@ ScorableArticle::~ScorableArticle()
{
}
-void ScorableArticle::displayMessage(const QString& note)
+void ScorableArticle::displayMessage(const TQString& note)
{
NotifyDialog::display(*this,note);
}
@@ -143,9 +143,9 @@ ActionBase::~ActionBase()
}
-QStringList ActionBase::userNames()
+TQStringList ActionBase::userNames()
{
- QStringList l;
+ TQStringList l;
l << userName(SETSCORE);
l << userName(NOTIFY);
l << userName(COLOR);
@@ -153,7 +153,7 @@ QStringList ActionBase::userNames()
return l;
}
-ActionBase* ActionBase::factory(int type, const QString &value)
+ActionBase* ActionBase::factory(int type, const TQString &value)
{
switch (type) {
case SETSCORE: return new ActionSetScore(value);
@@ -166,7 +166,7 @@ ActionBase* ActionBase::factory(int type, const QString &value)
}
}
-QString ActionBase::userName(int type)
+TQString ActionBase::userName(int type)
{
switch (type) {
case SETSCORE: return i18n("Adjust Score");
@@ -179,7 +179,7 @@ QString ActionBase::userName(int type)
}
}
-int ActionBase::getTypeForName(const QString& name)
+int ActionBase::getTypeForName(const TQString& name)
{
if (name == "SETSCORE") return SETSCORE;
else if (name == "NOTIFY") return NOTIFY;
@@ -192,7 +192,7 @@ int ActionBase::getTypeForName(const QString& name)
}
}
-int ActionBase::getTypeForUserName(const QString& name)
+int ActionBase::getTypeForUserName(const TQString& name)
{
if (name == userName(SETSCORE)) return SETSCORE;
else if (name == userName(NOTIFY)) return NOTIFY;
@@ -211,7 +211,7 @@ ActionSetScore::ActionSetScore(short v)
{
}
-ActionSetScore::ActionSetScore(const QString& s)
+ActionSetScore::ActionSetScore(const TQString& s)
{
val = s.toShort();
}
@@ -226,10 +226,10 @@ ActionSetScore::~ActionSetScore()
{
}
-QString ActionSetScore::toString() const
+TQString ActionSetScore::toString() const
{
- QString a;
- a += "<Action type=\"SETSCORE\" value=\"" + QString::number(val) + "\" />";
+ TQString a;
+ a += "<Action type=\"SETSCORE\" value=\"" + TQString::number(val) + "\" />";
return a;
}
@@ -244,12 +244,12 @@ ActionSetScore* ActionSetScore::clone() const
}
// the color action
-ActionColor::ActionColor(const QColor& c)
+ActionColor::ActionColor(const TQColor& c)
: ActionBase(), color(c)
{
}
-ActionColor::ActionColor(const QString& s)
+ActionColor::ActionColor(const TQString& s)
: ActionBase()
{
setValue(s);
@@ -263,9 +263,9 @@ ActionColor::ActionColor(const ActionColor& a)
ActionColor::~ActionColor()
{}
-QString ActionColor::toString() const
+TQString ActionColor::toString() const
{
- QString a;
+ TQString a;
a += "<Action type=\"COLOR\" value=\"" + toXml(color.name()) + "\" />";
return a;
}
@@ -282,7 +282,7 @@ ActionColor* ActionColor::clone() const
// the notify action
-ActionNotify::ActionNotify(const QString& s)
+ActionNotify::ActionNotify(const TQString& s)
{
note = s;
}
@@ -293,7 +293,7 @@ ActionNotify::ActionNotify(const ActionNotify& an)
note = an.note;
}
-QString ActionNotify::toString() const
+TQString ActionNotify::toString() const
{
return "<Action type=\"NOTIFY\" value=\"" + toXml(note) + "\" />";
}
@@ -321,7 +321,7 @@ ActionMarkAsRead::ActionMarkAsRead( const ActionMarkAsRead &action ) :
Q_UNUSED( action );
}
-QString ActionMarkAsRead::toString() const
+TQString ActionMarkAsRead::toString() const
{
return "<Action type=\"MARKASREAD\"/>";
}
@@ -346,7 +346,7 @@ NotifyCollection::~NotifyCollection()
{
}
-void NotifyCollection::addNote(const ScorableArticle& a, const QString& note)
+void NotifyCollection::addNote(const ScorableArticle& a, const TQString& note)
{
article_list *l = notifyList.find(note);
if (!l) {
@@ -359,14 +359,14 @@ void NotifyCollection::addNote(const ScorableArticle& a, const QString& note)
l->append(i);
}
-QString NotifyCollection::collection() const
+TQString NotifyCollection::collection() const
{
- QString notifyCollection = i18n("<h1>List of collected notes</h1>");
+ TQString notifyCollection = i18n("<h1>List of collected notes</h1>");
notifyCollection += "<p><ul>";
// first look thru the notes and create one string
- QDictIterator<article_list> it(notifyList);
+ TQDictIterator<article_list> it(notifyList);
for(;it.current();++it) {
- const QString& note = it.currentKey();
+ const TQString& note = it.currentKey();
notifyCollection += "<li>" + note + "<ul>";
article_list* alist = it.current();
article_list::Iterator ait;
@@ -381,12 +381,12 @@ QString NotifyCollection::collection() const
return notifyCollection;
}
-void NotifyCollection::displayCollection(QWidget *p) const
+void NotifyCollection::displayCollection(TQWidget *p) const
{
//KMessageBox::information(p,collection(),i18n("Collected Notes"));
KDialogBase *dlg = new KDialogBase( p, 0, false, i18n("Collected Notes"),
KDialogBase::Close, KDialogBase::Close );
- QTextView *text = new QTextView(dlg);
+ TQTextView *text = new TQTextView(dlg);
text->setText(collection());
dlg->setMainWidget(text);
dlg->setMinimumWidth(300);
@@ -395,7 +395,7 @@ void NotifyCollection::displayCollection(QWidget *p) const
}
//----------------------------------------------------------------------------
-KScoringExpression::KScoringExpression(const QString& h, const QString& t, const QString& n, const QString& ng)
+KScoringExpression::KScoringExpression(const TQString& h, const TQString& t, const TQString& n, const TQString& ng)
: header(h), expr_str(n)
{
if (t == "MATCH" ) {
@@ -430,7 +430,7 @@ KScoringExpression::KScoringExpression(const QString& h, const QString& t, const
}
// static
-int KScoringExpression::getConditionForName(const QString& s)
+int KScoringExpression::getConditionForName(const TQString& s)
{
if (s == getNameForCondition(CONTAINS)) return CONTAINS;
else if (s == getNameForCondition(MATCH)) return MATCH;
@@ -446,7 +446,7 @@ int KScoringExpression::getConditionForName(const QString& s)
}
// static
-QString KScoringExpression::getNameForCondition(int cond)
+TQString KScoringExpression::getNameForCondition(int cond)
{
switch (cond) {
case CONTAINS: return i18n("Contains Substring");
@@ -463,9 +463,9 @@ QString KScoringExpression::getNameForCondition(int cond)
}
// static
-QStringList KScoringExpression::conditionNames()
+TQStringList KScoringExpression::conditionNames()
{
- QStringList l;
+ TQStringList l;
l << getNameForCondition(CONTAINS);
l << getNameForCondition(MATCH);
l << getNameForCondition(MATCHCS);
@@ -476,9 +476,9 @@ QStringList KScoringExpression::conditionNames()
}
// static
-QStringList KScoringExpression::headerNames()
+TQStringList KScoringExpression::headerNames()
{
- QStringList l;
+ TQStringList l;
l.append("From");
l.append("Message-ID");
l.append("Subject");
@@ -499,7 +499,7 @@ bool KScoringExpression::match(ScorableArticle& a) const
{
//kdDebug(5100) << "matching against header " << c_header << endl;
bool res = true;
- QString head;
+ TQString head;
if (header == "From")
head = a.from();
@@ -536,20 +536,20 @@ bool KScoringExpression::match(ScorableArticle& a) const
return (neg)?!res:res;
}
-void KScoringExpression::write(QTextStream& st) const
+void KScoringExpression::write(TQTextStream& st) const
{
st << toString();
}
-QString KScoringExpression::toString() const
+TQString KScoringExpression::toString() const
{
// kdDebug(5100) << "KScoringExpression::toString() starts" << endl;
// kdDebug(5100) << "header is " << header << endl;
// kdDebug(5100) << "expr is " << expr_str << endl;
// kdDebug(5100) << "neg is " << neg << endl;
// kdDebug(5100) << "type is " << getType() << endl;
- QString e;
- e += "<Expression neg=\"" + QString::number(neg?1:0)
+ TQString e;
+ e += "<Expression neg=\"" + TQString::number(neg?1:0)
+ "\" header=\"" + header
+ "\" type=\"" + getTypeString()
+ "\" expr=\"" + toXml(expr_str)
@@ -558,12 +558,12 @@ QString KScoringExpression::toString() const
return e;
}
-QString KScoringExpression::getTypeString() const
+TQString KScoringExpression::getTypeString() const
{
return KScoringExpression::getTypeString(cond);
}
-QString KScoringExpression::getTypeString(int cond)
+TQString KScoringExpression::getTypeString(int cond)
{
switch (cond) {
case CONTAINS: return "CONTAINS";
@@ -584,7 +584,7 @@ int KScoringExpression::getType() const
}
//----------------------------------------------------------------------------
-KScoringRule::KScoringRule(const QString& n )
+KScoringRule::KScoringRule(const TQString& n )
: name(n), link(AND)
{
expressions.setAutoDelete(true);
@@ -600,7 +600,7 @@ KScoringRule::KScoringRule(const KScoringRule& r)
// copy expressions
expressions.clear();
const ScoreExprList& rexpr = r.expressions;
- QPtrListIterator<KScoringExpression> it(rexpr);
+ TQPtrListIterator<KScoringExpression> it(rexpr);
for ( ; it.current(); ++it ) {
KScoringExpression *t = new KScoringExpression(**it);
expressions.append(t);
@@ -608,7 +608,7 @@ KScoringRule::KScoringRule(const KScoringRule& r)
// copy actions
actions.clear();
const ActionList& ract = r.actions;
- QPtrListIterator<ActionBase> ait(ract);
+ TQPtrListIterator<ActionBase> ait(ract);
for ( ; ait.current(); ++ait ) {
ActionBase *t = *ait;
actions.append(t->clone());
@@ -643,7 +643,7 @@ void KScoringRule::addExpression( KScoringExpression* expr)
expressions.append(expr);
}
-void KScoringRule::addAction(int type, const QString& val)
+void KScoringRule::addAction(int type, const TQString& val)
{
ActionBase *action = ActionBase::factory(type,val);
addAction(action);
@@ -655,16 +655,16 @@ void KScoringRule::addAction(ActionBase* a)
actions.append(a);
}
-void KScoringRule::setLinkMode(const QString& l)
+void KScoringRule::setLinkMode(const TQString& l)
{
if (l == "OR") link = OR;
else link = AND;
}
-void KScoringRule::setExpire(const QString& e)
+void KScoringRule::setExpire(const TQString& e)
{
if (e != "never") {
- QStringList l = QStringList::split("-",e);
+ TQStringList l = TQStringList::split("-",e);
Q_ASSERT( l.count() == 3 );
expires.setYMD( (*(l.at(0))).toInt(),
(*(l.at(1))).toInt(),
@@ -673,10 +673,10 @@ void KScoringRule::setExpire(const QString& e)
kdDebug(5100) << "Rule " << getName() << " expires at " << getExpireDateString() << endl;
}
-bool KScoringRule::matchGroup(const QString& group) const
+bool KScoringRule::matchGroup(const TQString& group) const
{
for(GroupList::ConstIterator i=groups.begin(); i!=groups.end();++i) {
- QRegExp e(*i);
+ TQRegExp e(*i);
if (e.search(group, 0) != -1 &&
(uint)e.matchedLength() == group.length())
return true;
@@ -686,7 +686,7 @@ bool KScoringRule::matchGroup(const QString& group) const
void KScoringRule::applyAction(ScorableArticle& a) const
{
- QPtrListIterator<ActionBase> it(actions);
+ TQPtrListIterator<ActionBase> it(actions);
for(; it.current(); ++it) {
it.current()->apply(a);
}
@@ -700,7 +700,7 @@ void KScoringRule::applyRule(ScorableArticle& a) const
// << endl;
bool oper_and = (link == AND);
bool res = true;
- QPtrListIterator<KScoringExpression> it(expressions);
+ TQPtrListIterator<KScoringExpression> it(expressions);
//kdDebug(5100) << "checking " << expressions.count() << " expressions" << endl;
for (; it.current(); ++it) {
Q_ASSERT( it.current() );
@@ -711,26 +711,26 @@ void KScoringRule::applyRule(ScorableArticle& a) const
if (res) applyAction(a);
}
-void KScoringRule::applyRule(ScorableArticle& a /*, const QString& s*/, const QString& g) const
+void KScoringRule::applyRule(ScorableArticle& a /*, const TQString& s*/, const TQString& g) const
{
// check if one of the groups match
- for (QStringList::ConstIterator i = groups.begin(); i != groups.end(); ++i) {
- if (QRegExp(*i).search(g) != -1) {
+ for (TQStringList::ConstIterator i = groups.begin(); i != groups.end(); ++i) {
+ if (TQRegExp(*i).search(g) != -1) {
applyRule(a);
return;
}
}
}
-void KScoringRule::write(QTextStream& s) const
+void KScoringRule::write(TQTextStream& s) const
{
s << toString();
}
-QString KScoringRule::toString() const
+TQString KScoringRule::toString() const
{
//kdDebug(5100) << "KScoringRule::toString() starts" << endl;
- QString r;
+ TQString r;
r += "<Rule name=\"" + toXml(name) + "\" linkmode=\"" + getLinkModeName();
r += "\" expires=\"" + getExpireDateString() + "\">";
//kdDebug(5100) << "building grouplist..." << endl;
@@ -738,12 +738,12 @@ QString KScoringRule::toString() const
r += "<Group name=\"" + toXml(*i) + "\" />";
}
//kdDebug(5100) << "building expressionlist..." << endl;
- QPtrListIterator<KScoringExpression> eit(expressions);
+ TQPtrListIterator<KScoringExpression> eit(expressions);
for (; eit.current(); ++eit) {
r += eit.current()->toString();
}
//kdDebug(5100) << "building actionlist..." << endl;
- QPtrListIterator<ActionBase> ait(actions);
+ TQPtrListIterator<ActionBase> ait(actions);
for (; ait.current(); ++ait) {
r += ait.current()->toString();
}
@@ -752,7 +752,7 @@ QString KScoringRule::toString() const
return r;
}
-QString KScoringRule::getLinkModeName() const
+TQString KScoringRule::getLinkModeName() const
{
switch (link) {
case AND: return "AND";
@@ -761,25 +761,25 @@ QString KScoringRule::getLinkModeName() const
}
}
-QString KScoringRule::getExpireDateString() const
+TQString KScoringRule::getExpireDateString() const
{
if (expires.isNull()) return "never";
else {
- return QString::number(expires.year()) + QString("-")
- + QString::number(expires.month()) + QString("-")
- + QString::number(expires.day());
+ return TQString::number(expires.year()) + TQString("-")
+ + TQString::number(expires.month()) + TQString("-")
+ + TQString::number(expires.day());
}
}
bool KScoringRule::isExpired() const
{
- return (expires.isValid() && (expires < QDate::currentDate()));
+ return (expires.isValid() && (expires < TQDate::currentDate()));
}
//----------------------------------------------------------------------------
-KScoringManager::KScoringManager(const QString& appName)
+KScoringManager::KScoringManager(const TQString& appName)
: cacheValid(false)//, _s(0)
{
allRules.setAutoDelete(true);
@@ -799,8 +799,8 @@ KScoringManager::~KScoringManager()
void KScoringManager::load()
{
- QDomDocument sdoc("Scorefile");
- QFile f( mFilename );
+ TQDomDocument sdoc("Scorefile");
+ TQFile f( mFilename );
if ( !f.open( IO_ReadOnly ) )
return;
if ( !sdoc.setContent( &f ) ) {
@@ -819,22 +819,22 @@ void KScoringManager::load()
void KScoringManager::save()
{
kdDebug(5100) << "KScoringManager::save() starts" << endl;
- QFile f( mFilename );
+ TQFile f( mFilename );
if ( !f.open( IO_WriteOnly ) )
return;
- QTextStream stream(&f);
- stream.setEncoding(QTextStream::Unicode);
+ TQTextStream stream(&f);
+ stream.setEncoding(TQTextStream::Unicode);
kdDebug(5100) << "KScoringManager::save() creating xml" << endl;
createXMLfromInternal().save(stream,2);
kdDebug(5100) << "KScoringManager::save() finished" << endl;
}
-QDomDocument KScoringManager::createXMLfromInternal()
+TQDomDocument KScoringManager::createXMLfromInternal()
{
- // I was'nt able to create a QDomDocument in memory:(
+ // I was'nt able to create a TQDomDocument in memory:(
// so I write the content into a string, which is really stupid
- QDomDocument sdoc("Scorefile");
- QString ss; // scorestring
+ TQDomDocument sdoc("Scorefile");
+ TQString ss; // scorestring
ss += "<?xml version = '1.0'?><!DOCTYPE Scorefile >";
ss += toString();
ss += "</Scorefile>\n";
@@ -843,11 +843,11 @@ QDomDocument KScoringManager::createXMLfromInternal()
return sdoc;
}
-QString KScoringManager::toString() const
+TQString KScoringManager::toString() const
{
- QString s;
+ TQString s;
s += "<Scorefile>\n";
- QPtrListIterator<KScoringRule> it(allRules);
+ TQPtrListIterator<KScoringRule> it(allRules);
for( ; it.current(); ++it) {
s += it.current()->toString();
}
@@ -864,7 +864,7 @@ void KScoringManager::expireRules()
}
}
-void KScoringManager::createInternalFromXML(QDomNode n)
+void KScoringManager::createInternalFromXML(TQDomNode n)
{
static KScoringRule *cR = 0; // the currentRule
// the XML file was parsed and now we simply traverse the resulting tree
@@ -873,16 +873,16 @@ void KScoringManager::createInternalFromXML(QDomNode n)
<< " named " << n.toElement().tagName() << endl;
switch (n.nodeType()) {
- case QDomNode::DocumentNode: {
+ case TQDomNode::DocumentNode: {
// the document itself
break;
}
- case QDomNode::ElementNode: {
+ case TQDomNode::ElementNode: {
// Server, Newsgroup, Rule, Expression, Action
- QDomElement e = n.toElement();
+ TQDomElement e = n.toElement();
//kdDebug(5100) << "The name of the element is "
//<< e.tagName().latin1() << endl;
- QString s = e.tagName();
+ TQString s = e.tagName();
if (s == "Rule") {
cR = new KScoringRule(e.attribute("name"));
cR->setLinkMode(e.attribute("linkmode"));
@@ -909,7 +909,7 @@ void KScoringManager::createInternalFromXML(QDomNode n)
default: // kdDebug(5100) << "unknown DomNode::type" << endl;
;
}
- QDomNodeList nodelist = n.childNodes();
+ TQDomNodeList nodelist = n.childNodes();
unsigned cnt = nodelist.count();
//kdDebug(5100) << "recursive checking " << cnt << " nodes" << endl;
for (unsigned i=0;i<cnt;++i)
@@ -917,7 +917,7 @@ void KScoringManager::createInternalFromXML(QDomNode n)
}
}
-KScoringRule* KScoringManager::addRule(const ScorableArticle& a, QString group, short score)
+KScoringRule* KScoringManager::addRule(const ScorableArticle& a, TQString group, short score)
{
KScoringRule *rule = new KScoringRule(findUniqueName());
rule->addGroup( group );
@@ -925,7 +925,7 @@ KScoringRule* KScoringManager::addRule(const ScorableArticle& a, QString group,
new KScoringExpression("From","CONTAINS",
a.from(),"0"));
if (score) rule->addAction(new ActionSetScore(score));
- rule->setExpireDate(QDate::currentDate().addDays(30));
+ rule->setExpireDate(TQDate::currentDate().addDays(30));
addRule(rule);
KScoringEditor *edit = KScoringEditor::createEditor(this);
edit->setRule(rule);
@@ -975,14 +975,14 @@ void KScoringManager::cancelNewRule(KScoringRule *r)
}
}
-void KScoringManager::setRuleName(KScoringRule *r, const QString& s)
+void KScoringManager::setRuleName(KScoringRule *r, const TQString& s)
{
bool cont = true;
- QString text = s;
- QString oldName = r->getName();
+ TQString text = s;
+ TQString oldName = r->getName();
while (cont) {
cont = false;
- QPtrListIterator<KScoringRule> it(allRules);
+ TQPtrListIterator<KScoringRule> it(allRules);
for (; it.current(); ++it) {
if ( it.current() != r && it.current()->getName() == text ) {
kdDebug(5100) << "rule name " << text << " is not unique" << endl;
@@ -1009,7 +1009,7 @@ void KScoringManager::deleteRule(KScoringRule *r)
}
}
-void KScoringManager::editRule(KScoringRule *e, QWidget *w)
+void KScoringManager::editRule(KScoringRule *e, TQWidget *w)
{
KScoringEditor *edit = KScoringEditor::createEditor(this, w);
edit->setRule(e);
@@ -1061,7 +1061,7 @@ void KScoringManager::applyRules(ScorableGroup* )
kdWarning(5100) << "KScoringManager::applyRules(ScorableGroup* ) isn't implemented" << endl;
}
-void KScoringManager::applyRules(ScorableArticle& article, const QString& group)
+void KScoringManager::applyRules(ScorableArticle& article, const TQString& group)
{
setGroup(group);
applyRules(article);
@@ -1069,17 +1069,17 @@ void KScoringManager::applyRules(ScorableArticle& article, const QString& group)
void KScoringManager::applyRules(ScorableArticle& a)
{
- QPtrListIterator<KScoringRule> it(isCacheValid()? ruleList : allRules);
+ TQPtrListIterator<KScoringRule> it(isCacheValid()? ruleList : allRules);
for( ; it.current(); ++it) {
it.current()->applyRule(a);
}
}
-void KScoringManager::initCache(const QString& g)
+void KScoringManager::initCache(const TQString& g)
{
group = g;
ruleList.clear();
- QPtrListIterator<KScoringRule> it(allRules);
+ TQPtrListIterator<KScoringRule> it(allRules);
for (; it.current(); ++it) {
if ( it.current()->matchGroup(group) ) {
ruleList.append(it.current());
@@ -1090,7 +1090,7 @@ void KScoringManager::initCache(const QString& g)
setCacheValid(true);
}
-void KScoringManager::setGroup(const QString& g)
+void KScoringManager::setGroup(const TQString& g)
{
if (group != g) initCache(g);
}
@@ -1101,19 +1101,19 @@ bool KScoringManager::hasRulesForCurrentGroup()
}
-QStringList KScoringManager::getRuleNames()
+TQStringList KScoringManager::getRuleNames()
{
- QStringList l;
- QPtrListIterator<KScoringRule> it(allRules);
+ TQStringList l;
+ TQPtrListIterator<KScoringRule> it(allRules);
for( ; it.current(); ++it) {
l << it.current()->getName();
}
return l;
}
-KScoringRule* KScoringManager::findRule(const QString& ruleName)
+KScoringRule* KScoringManager::findRule(const TQString& ruleName)
{
- QPtrListIterator<KScoringRule> it(allRules);
+ TQPtrListIterator<KScoringRule> it(allRules);
for (; it.current(); ++it) {
if ( it.current()->getName() == ruleName ) {
return it;
@@ -1129,10 +1129,10 @@ bool KScoringManager::setCacheValid(bool v)
return res;
}
-QString KScoringManager::findUniqueName() const
+TQString KScoringManager::findUniqueName() const
{
int nr = 0;
- QString ret;
+ TQString ret;
bool duplicated=false;
while (nr < 99999999) {
@@ -1140,7 +1140,7 @@ QString KScoringManager::findUniqueName() const
ret = i18n("rule %1").arg(nr);
duplicated=false;
- QPtrListIterator<KScoringRule> it(allRules);
+ TQPtrListIterator<KScoringRule> it(allRules);
for( ; it.current(); ++it) {
if (it.current()->getName() == ret) {
duplicated = true;
@@ -1166,9 +1166,9 @@ bool KScoringManager::hasFeature(int p)
}
}
-QStringList KScoringManager::getDefaultHeaders() const
+TQStringList KScoringManager::getDefaultHeaders() const
{
- QStringList l;
+ TQStringList l;
l.append("Subject");
l.append("From");
l.append("Date");
@@ -1198,7 +1198,7 @@ RuleStack::RuleStack()
RuleStack::~RuleStack()
{}
-void RuleStack::push(QPtrList<KScoringRule>& l)
+void RuleStack::push(TQPtrList<KScoringRule>& l)
{
kdDebug(5100) << "RuleStack::push pushing list with " << l.count() << " rules" << endl;
KScoringManager::ScoringRuleList *l1 = new KScoringManager::ScoringRuleList;
@@ -1209,7 +1209,7 @@ void RuleStack::push(QPtrList<KScoringRule>& l)
kdDebug(5100) << "now there are " << stack.count() << " lists on the stack" << endl;
}
-void RuleStack::pop(QPtrList<KScoringRule>& l)
+void RuleStack::pop(TQPtrList<KScoringRule>& l)
{
top(l);
drop();
@@ -1217,7 +1217,7 @@ void RuleStack::pop(QPtrList<KScoringRule>& l)
kdDebug(5100) << "now there are " << stack.count() << " lists on the stack" << endl;
}
-void RuleStack::top(QPtrList<KScoringRule>& l)
+void RuleStack::top(TQPtrList<KScoringRule>& l)
{
l.clear();
KScoringManager::ScoringRuleList *l1 = stack.top();
diff --git a/libkdepim/kscoring.h b/libkdepim/kscoring.h
index 3252a33ea..a0cdcf0b3 100644
--- a/libkdepim/kscoring.h
+++ b/libkdepim/kscoring.h
@@ -20,19 +20,19 @@
#include <unistd.h>
-#include <qglobal.h>
-#include <qptrlist.h>
-#include <qptrstack.h>
-#include <qregexp.h>
-
-#include <qobject.h>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qdatetime.h>
-#include <qcolor.h>
-#include <qtable.h>
-#include <qmap.h>
-#include <qdict.h>
+#include <tqglobal.h>
+#include <tqptrlist.h>
+#include <tqptrstack.h>
+#include <tqregexp.h>
+
+#include <tqobject.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqdatetime.h>
+#include <tqcolor.h>
+#include <tqtable.h>
+#include <tqmap.h>
+#include <tqdict.h>
#include <kdialogbase.h>
#include <klineedit.h>
@@ -67,12 +67,12 @@ public:
virtual ~ScorableArticle();
virtual void addScore(short) {}
- virtual void displayMessage(const QString&);
- virtual void changeColor(const QColor&) {}
+ virtual void displayMessage(const TQString&);
+ virtual void changeColor(const TQColor&) {}
virtual void markAsRead() {}
- virtual QString from() const = 0;
- virtual QString subject() const = 0;
- virtual QString getHeaderByType(const QString&) const = 0;
+ virtual TQString from() const = 0;
+ virtual TQString subject() const = 0;
+ virtual TQString getHeaderByType(const TQString&) const = 0;
//virtual ScorableGroup group() const =0;
};
@@ -85,49 +85,49 @@ class KDE_EXPORT ActionBase {
public:
ActionBase();
virtual ~ActionBase();
- virtual QString toString() const =0;
+ virtual TQString toString() const =0;
virtual void apply(ScorableArticle&) const =0;
virtual ActionBase* clone() const =0;
virtual int getType() const =0;
- virtual QString getValueString() const { return QString(); }
- virtual void setValue(const QString&) {}
- static ActionBase* factory(int type, const QString &value);
- static QStringList userNames();
- static QString userName(int type);
- static int getTypeForName(const QString& name);
- static int getTypeForUserName(const QString& name);
- QString userName() { return userName(getType()); }
+ virtual TQString getValueString() const { return TQString(); }
+ virtual void setValue(const TQString&) {}
+ static ActionBase* factory(int type, const TQString &value);
+ static TQStringList userNames();
+ static TQString userName(int type);
+ static int getTypeForName(const TQString& name);
+ static int getTypeForUserName(const TQString& name);
+ TQString userName() { return userName(getType()); }
enum ActionTypes { SETSCORE, NOTIFY, COLOR, MARKASREAD };
};
class KDE_EXPORT ActionColor : public ActionBase {
public:
- ActionColor(const QColor&);
- ActionColor(const QString&);
+ ActionColor(const TQColor&);
+ ActionColor(const TQString&);
ActionColor(const ActionColor&);
virtual ~ActionColor();
- virtual QString toString() const;
+ virtual TQString toString() const;
virtual int getType() const { return COLOR; }
- virtual QString getValueString() const { return color.name(); }
- virtual void setValue(const QString& s) { color.setNamedColor(s); }
- void setValue(const QColor& c) { color = c; }
- QColor value() const { return color; }
+ virtual TQString getValueString() const { return color.name(); }
+ virtual void setValue(const TQString& s) { color.setNamedColor(s); }
+ void setValue(const TQColor& c) { color = c; }
+ TQColor value() const { return color; }
virtual void apply(ScorableArticle&) const;
virtual ActionColor* clone() const;
private:
- QColor color;
+ TQColor color;
};
class KDE_EXPORT ActionSetScore : public ActionBase {
public:
ActionSetScore(short);
ActionSetScore(const ActionSetScore&);
- ActionSetScore(const QString&);
+ ActionSetScore(const TQString&);
virtual ~ActionSetScore();
- virtual QString toString() const;
+ virtual TQString toString() const;
virtual int getType() const { return SETSCORE; }
- virtual QString getValueString() const { return QString::number(val); }
- virtual void setValue(const QString& s) { val = s.toShort(); }
+ virtual TQString getValueString() const { return TQString::number(val); }
+ virtual void setValue(const TQString& s) { val = s.toShort(); }
void setValue(short v) { val = v; }
short value() const { return val; }
virtual void apply(ScorableArticle&) const;
@@ -138,17 +138,17 @@ class KDE_EXPORT ActionSetScore : public ActionBase {
class KDE_EXPORT ActionNotify : public ActionBase {
public:
- ActionNotify(const QString&);
+ ActionNotify(const TQString&);
ActionNotify(const ActionNotify&);
virtual ~ActionNotify() {}
- virtual QString toString() const;
+ virtual TQString toString() const;
virtual int getType() const { return NOTIFY; }
- virtual QString getValueString() const { return note; }
- virtual void setValue(const QString& s) { note = s; }
+ virtual TQString getValueString() const { return note; }
+ virtual void setValue(const TQString& s) { note = s; }
virtual void apply(ScorableArticle&) const;
virtual ActionNotify* clone() const;
private:
- QString note;
+ TQString note;
};
class KDE_EXPORT ActionMarkAsRead : public ActionBase {
@@ -156,7 +156,7 @@ class KDE_EXPORT ActionMarkAsRead : public ActionBase {
ActionMarkAsRead();
ActionMarkAsRead( const ActionMarkAsRead& );
virtual ~ActionMarkAsRead() {}
- virtual QString toString() const;
+ virtual TQString toString() const;
virtual int getType() const { return MARKASREAD; }
virtual void apply( ScorableArticle &article ) const;
virtual ActionMarkAsRead* clone() const;
@@ -167,16 +167,16 @@ class KDE_EXPORT NotifyCollection
public:
NotifyCollection();
~NotifyCollection();
- void addNote(const ScorableArticle&, const QString&);
- QString collection() const;
- void displayCollection(QWidget *p=0) const;
+ void addNote(const ScorableArticle&, const TQString&);
+ TQString collection() const;
+ void displayCollection(TQWidget *p=0) const;
private:
struct article_info {
- QString from;
- QString subject;
+ TQString from;
+ TQString subject;
};
- typedef QValueList<article_info> article_list;
- typedef QDict<article_list> note_list;
+ typedef TQValueList<article_info> article_list;
+ typedef TQDict<article_list> note_list;
note_list notifyList;
};
@@ -188,31 +188,31 @@ class KDE_EXPORT KScoringExpression
public:
enum Condition { CONTAINS, MATCH, EQUALS, SMALLER, GREATER, MATCHCS };
- KScoringExpression(const QString&,const QString&,const QString&, const QString&);
+ KScoringExpression(const TQString&,const TQString&,const TQString&, const TQString&);
~KScoringExpression();
bool match(ScorableArticle& a) const ;
- QString getTypeString() const;
- static QString getTypeString(int);
+ TQString getTypeString() const;
+ static TQString getTypeString(int);
int getType() const;
- QString toString() const;
- void write(QTextStream& ) const;
+ TQString toString() const;
+ void write(TQTextStream& ) const;
bool isNeg() const { return neg; }
Condition getCondition() const { return cond; }
- QString getExpression() const { return expr_str; }
- QString getHeader() const { return header; }
- static QStringList conditionNames();
- static QStringList headerNames();
- static int getConditionForName(const QString&);
- static QString getNameForCondition(int);
+ TQString getExpression() const { return expr_str; }
+ TQString getHeader() const { return header; }
+ static TQStringList conditionNames();
+ static TQStringList headerNames();
+ static int getConditionForName(const TQString&);
+ static TQString getNameForCondition(int);
private:
bool neg;
- QString header;
+ TQString header;
const char* c_header;
Condition cond;
- QRegExp expr;
- QString expr_str;
+ TQRegExp expr;
+ TQString expr_str;
int expr_int;
};
@@ -221,59 +221,59 @@ class KDE_EXPORT KScoringRule
{
friend class KScoringManager;
public:
- KScoringRule(const QString& name);
+ KScoringRule(const TQString& name);
KScoringRule(const KScoringRule& r);
~KScoringRule();
- typedef QPtrList<KScoringExpression> ScoreExprList;
- typedef QPtrList<ActionBase> ActionList;
- typedef QStringList GroupList;
+ typedef TQPtrList<KScoringExpression> ScoreExprList;
+ typedef TQPtrList<ActionBase> ActionList;
+ typedef TQStringList GroupList;
enum LinkMode { AND, OR };
- QString getName() const { return name; }
- QStringList getGroups() const { return groups; }
- void setGroups(const QStringList &l) { groups = l; }
+ TQString getName() const { return name; }
+ TQStringList getGroups() const { return groups; }
+ void setGroups(const TQStringList &l) { groups = l; }
LinkMode getLinkMode() const { return link; }
- QString getLinkModeName() const;
- QString getExpireDateString() const;
- QDate getExpireDate() const { return expires; }
- void setExpireDate(const QDate &d) { expires = d; }
+ TQString getLinkModeName() const;
+ TQString getExpireDateString() const;
+ TQDate getExpireDate() const { return expires; }
+ void setExpireDate(const TQDate &d) { expires = d; }
bool isExpired() const;
ScoreExprList getExpressions() const { return expressions; }
ActionList getActions() const { return actions; }
void cleanExpressions();
void cleanActions();
- bool matchGroup(const QString& group) const ;
+ bool matchGroup(const TQString& group) const ;
void applyRule(ScorableArticle& a) const;
- void applyRule(ScorableArticle& a, const QString& group) const;
+ void applyRule(ScorableArticle& a, const TQString& group) const;
void applyAction(ScorableArticle& a) const;
- void setLinkMode(const QString& link);
+ void setLinkMode(const TQString& link);
void setLinkMode(LinkMode m) { link = m; }
- void setExpire(const QString& exp);
+ void setExpire(const TQString& exp);
void addExpression( KScoringExpression* );
- void addGroup( const QString& group) { groups.append(group); }
- //void addServer(const QString& server) { servers.append(server); }
- void addAction(int, const QString& );
+ void addGroup( const TQString& group) { groups.append(group); }
+ //void addServer(const TQString& server) { servers.append(server); }
+ void addAction(int, const TQString& );
void addAction(ActionBase*);
- void updateXML(QDomElement& e, QDomDocument& d);
- QString toString() const;
+ void updateXML(TQDomElement& e, TQDomDocument& d);
+ TQString toString() const;
// writes the rule in XML format into the textstream
- void write(QTextStream& ) const;
+ void write(TQTextStream& ) const;
protected:
//! assert that the name is unique
- void setName(const QString &n) { name = n; }
+ void setName(const TQString &n) { name = n; }
private:
- QString name;
+ TQString name;
GroupList groups;
//ServerList servers;
LinkMode link;
ScoreExprList expressions;
ActionList actions;
- QDate expires;
+ TQDate expires;
};
/** this helper class implements a stack for lists of lists of rules.
@@ -286,16 +286,16 @@ public:
RuleStack();
~RuleStack();
//! puts the list on the stack, doesn't change the list
- void push(QPtrList<KScoringRule>&);
+ void push(TQPtrList<KScoringRule>&);
//! clears the argument list and copy the content of the TOS into it
//! after that the TOS gets dropped
- void pop(QPtrList<KScoringRule>&);
+ void pop(TQPtrList<KScoringRule>&);
//! like pop but without dropping the TOS
- void top(QPtrList<KScoringRule>&);
+ void top(TQPtrList<KScoringRule>&);
//! drops the TOS
void drop();
private:
- QPtrStack< QPtrList<KScoringRule> > stack;
+ TQPtrStack< TQPtrList<KScoringRule> > stack;
};
//----------------------------------------------------------------------------
@@ -306,20 +306,20 @@ class KDE_EXPORT KScoringManager : public QObject
public:
//* this is the container for all rules
- typedef QPtrList<KScoringRule> ScoringRuleList;
+ typedef TQPtrList<KScoringRule> ScoringRuleList;
- KScoringManager(const QString& appName = QString::null);
+ KScoringManager(const TQString& appName = TQString::null);
virtual ~KScoringManager();
//* returns a list of all available groups, must be overridden
- virtual QStringList getGroups() const =0;
+ virtual TQStringList getGroups() const =0;
//! returns a list of common (or available) headers
//! defaults to returning { Subject, From, Message-ID, Date }
- virtual QStringList getDefaultHeaders() const;
+ virtual TQStringList getDefaultHeaders() const;
//* setting current server and group and calling applyRules(ScorableArticle&)
- void applyRules(ScorableArticle& article, const QString& group/*, const QString& server*/);
+ void applyRules(ScorableArticle& article, const TQString& group/*, const TQString& server*/);
//* assuming a properly set group
void applyRules(ScorableArticle&);
//* same as above
@@ -335,33 +335,33 @@ class KDE_EXPORT KScoringManager : public QObject
void removeTOS();
KScoringRule* addRule(KScoringRule *);
- KScoringRule* addRule(const ScorableArticle&, QString group, short =0);
+ KScoringRule* addRule(const ScorableArticle&, TQString group, short =0);
KScoringRule* addRule();
void cancelNewRule(KScoringRule *);
void deleteRule(KScoringRule *);
- void editRule(KScoringRule *e, QWidget *w=0);
+ void editRule(KScoringRule *e, TQWidget *w=0);
KScoringRule* copyRule(KScoringRule *);
void moveRuleAbove( KScoringRule *above, KScoringRule *below );
void moveRuleBelow( KScoringRule *below, KScoringRule *above );
- void setGroup(const QString& g);
+ void setGroup(const TQString& g);
// has to be called after setGroup() or initCache()
bool hasRulesForCurrentGroup();
- QString findUniqueName() const;
+ TQString findUniqueName() const;
/** called from an editor whenever it finishes editing the rule base,
causes the finishedEditing signal to be emitted */
void editorReady();
ScoringRuleList getAllRules() const { return allRules; }
- KScoringRule *findRule(const QString&);
- QStringList getRuleNames();
- void setRuleName(KScoringRule *, const QString&);
+ KScoringRule *findRule(const TQString&);
+ TQStringList getRuleNames();
+ void setRuleName(KScoringRule *, const TQString&);
int getRuleCount() const { return allRules.count(); }
- QString toString() const;
+ TQString toString() const;
bool setCacheValid(bool v);
bool isCacheValid() { return cacheValid; }
- void initCache(const QString& group/*, const QString& server*/);
+ void initCache(const TQString& group/*, const TQString& server*/);
void load();
void save();
@@ -375,15 +375,15 @@ class KDE_EXPORT KScoringManager : public QObject
signals:
void changedRules();
- void changedRuleName(const QString& oldName, const QString& newName);
+ void changedRuleName(const TQString& oldName, const TQString& newName);
void finishedEditing();
private:
void addRuleInternal(KScoringRule *e);
void expireRules();
- QDomDocument createXMLfromInternal();
- void createInternalFromXML(QDomNode);
+ TQDomDocument createXMLfromInternal();
+ void createInternalFromXML(TQDomNode);
// list of all Rules
ScoringRuleList allRules;
@@ -395,13 +395,13 @@ class KDE_EXPORT KScoringManager : public QObject
bool cacheValid;
// current rule set, ie the cache
ScoringRuleList ruleList;
- //QString server;
- QString group;
+ //TQString server;
+ TQString group;
//ScorableServer* _s;
// filename of the scorefile
- QString mFilename;
+ TQString mFilename;
};
@@ -410,16 +410,16 @@ class KDE_EXPORT NotifyDialog : public KDialogBase
{
Q_OBJECT
public:
- static void display(ScorableArticle&,const QString&);
+ static void display(ScorableArticle&,const TQString&);
protected slots:
void slotShowAgainToggled(bool);
private:
- NotifyDialog(QWidget* p =0);
+ NotifyDialog(TQWidget* p =0);
static NotifyDialog *me;
- QLabel *note;
- QString msg;
- typedef QMap<QString,bool> NotesMap;
+ TQLabel *note;
+ TQString msg;
+ typedef TQMap<TQString,bool> NotesMap;
static NotesMap dict;
};
diff --git a/libkdepim/kscoringeditor.cpp b/libkdepim/kscoringeditor.cpp
index 4ead5b8d6..6c469f49a 100644
--- a/libkdepim/kscoringeditor.cpp
+++ b/libkdepim/kscoringeditor.cpp
@@ -30,20 +30,20 @@
#include <kparts/componentfactory.h>
-#include <qlabel.h>
-#include <qpushbutton.h>
-#include <qlayout.h>
-#include <qtooltip.h>
-#include <qcheckbox.h>
-#include <qbuttongroup.h>
-#include <qradiobutton.h>
-#include <qwidgetstack.h>
-#include <qapplication.h>
-#include <qtimer.h>
-#include <qhbox.h>
+#include <tqlabel.h>
+#include <tqpushbutton.h>
+#include <tqlayout.h>
+#include <tqtooltip.h>
+#include <tqcheckbox.h>
+#include <tqbuttongroup.h>
+#include <tqradiobutton.h>
+#include <tqwidgetstack.h>
+#include <tqapplication.h>
+#include <tqtimer.h>
+#include <tqhbox.h>
// works for both ListBox and ComboBox
-template <class T> static int setCurrentItem(T *box, const QString& s)
+template <class T> static int setCurrentItem(T *box, const TQString& s)
{
int cnt = box->count();
for (int i=0;i<cnt;++i) {
@@ -61,37 +61,37 @@ template <class T> static int setCurrentItem(T *box, const QString& s)
// class SingleConditionWidget (editor for one condition, used in ConditionEditWidget)
//
//============================================================================
-SingleConditionWidget::SingleConditionWidget(KScoringManager *m,QWidget *p, const char *n)
- : QFrame(p,n), manager(m)
+SingleConditionWidget::SingleConditionWidget(KScoringManager *m,TQWidget *p, const char *n)
+ : TQFrame(p,n), manager(m)
{
- QBoxLayout *topL = new QVBoxLayout(this,5);
- QBoxLayout *firstRow = new QHBoxLayout(topL);
- neg = new QCheckBox(i18n("Not"),this);
- QToolTip::add(neg,i18n("Negate this condition"));
+ TQBoxLayout *topL = new TQVBoxLayout(this,5);
+ TQBoxLayout *firstRow = new TQHBoxLayout(topL);
+ neg = new TQCheckBox(i18n("Not"),this);
+ TQToolTip::add(neg,i18n("Negate this condition"));
firstRow->addWidget(neg);
headers = new KComboBox(this);
headers->insertStringList(manager->getDefaultHeaders());
headers->setEditable( true );
- QToolTip::add(headers,i18n("Select the header to match this condition against"));
+ TQToolTip::add(headers,i18n("Select the header to match this condition against"));
firstRow->addWidget(headers,1);
matches = new KComboBox(this);
matches->insertStringList(KScoringExpression::conditionNames());
- QToolTip::add(matches,i18n("Select the type of match"));
+ TQToolTip::add(matches,i18n("Select the type of match"));
firstRow->addWidget(matches,1);
- connect( matches, SIGNAL( activated( int ) ), SLOT( toggleRegExpButton( int ) ) );
- QHBoxLayout *secondRow = new QHBoxLayout( topL );
+ connect( matches, TQT_SIGNAL( activated( int ) ), TQT_SLOT( toggleRegExpButton( int ) ) );
+ TQHBoxLayout *secondRow = new TQHBoxLayout( topL );
secondRow->setSpacing( 1 );
expr = new KLineEdit( this );
- QToolTip::add(expr,i18n("The condition for the match"));
+ TQToolTip::add(expr,i18n("The condition for the match"));
// reserve space for at least 20 characters
expr->setMinimumWidth(fontMetrics().maxWidth()*20);
secondRow->addWidget( expr );
- regExpButton = new QPushButton( i18n("Edit..."), this );
+ regExpButton = new TQPushButton( i18n("Edit..."), this );
secondRow->addWidget( regExpButton );
- connect( regExpButton, SIGNAL( clicked() ), SLOT( showRegExpDialog() ) );
+ connect( regExpButton, TQT_SIGNAL( clicked() ), TQT_SLOT( showRegExpDialog() ) );
// occupy at much width as possible
- setSizePolicy(QSizePolicy(QSizePolicy::Expanding,QSizePolicy::Fixed));
+ setSizePolicy(TQSizePolicy(TQSizePolicy::Expanding,TQSizePolicy::Fixed));
setFrameStyle(Box | Sunken);
setLineWidth(1);
}
@@ -110,12 +110,12 @@ void SingleConditionWidget::setCondition(KScoringExpression *e)
KScoringExpression* SingleConditionWidget::createCondition() const
{
- QString head = headers->currentText();
- QString match = matches->currentText();
+ TQString head = headers->currentText();
+ TQString match = matches->currentText();
int condType = KScoringExpression::getConditionForName(match);
match = KScoringExpression::getTypeString(condType);
- QString cond = expr->text();
- QString negs = (neg->isChecked())?"1":"0";
+ TQString cond = expr->text();
+ TQString negs = (neg->isChecked())?"1":"0";
return new KScoringExpression(head,match,cond,negs);
}
@@ -135,7 +135,7 @@ void SingleConditionWidget::toggleRegExpButton( int selected )
void SingleConditionWidget::showRegExpDialog()
{
- QDialog *editorDialog = KParts::ComponentFactory::createInstanceFromQuery<QDialog>( "KRegExpEditor/KRegExpEditor" );
+ TQDialog *editorDialog = KParts::ComponentFactory::createInstanceFromQuery<TQDialog>( "KRegExpEditor/KRegExpEditor" );
if ( editorDialog ) {
KRegExpEditorInterface *editor = static_cast<KRegExpEditorInterface *>( editorDialog->qt_cast( "KRegExpEditorInterface" ) );
Q_ASSERT( editor ); // This should not fail!
@@ -150,7 +150,7 @@ void SingleConditionWidget::showRegExpDialog()
// class ConditionEditWidget (the widget to edit the conditions of a rule)
//
//============================================================================
-ConditionEditWidget::ConditionEditWidget(KScoringManager *m, QWidget *p, const char *n)
+ConditionEditWidget::ConditionEditWidget(KScoringManager *m, TQWidget *p, const char *n)
: KWidgetLister(1,8,p,n), manager(m)
{
// create one initial widget
@@ -160,12 +160,12 @@ ConditionEditWidget::ConditionEditWidget(KScoringManager *m, QWidget *p, const c
ConditionEditWidget::~ConditionEditWidget()
{}
-QWidget* ConditionEditWidget::createWidget(QWidget *parent)
+TQWidget* ConditionEditWidget::createWidget(TQWidget *parent)
{
return new SingleConditionWidget(manager,parent);
}
-void ConditionEditWidget::clearWidget(QWidget *w)
+void ConditionEditWidget::clearWidget(TQWidget *w)
{
Q_ASSERT( w->isA("SingleConditionWidget") );
SingleConditionWidget *sw = dynamic_cast<SingleConditionWidget*>(w);
@@ -194,7 +194,7 @@ void ConditionEditWidget::slotEditRule(KScoringRule *rule)
void ConditionEditWidget::updateRule(KScoringRule *rule)
{
rule->cleanExpressions();
- for(QWidget *w = mWidgetList.first(); w; w = mWidgetList.next()) {
+ for(TQWidget *w = mWidgetList.first(); w; w = mWidgetList.next()) {
if (! w->isA("SingleConditionWidget")) {
kdWarning(5100) << "there is a widget in ConditionEditWidget "
<< "which isn't a SingleConditionWidget" << endl;
@@ -211,29 +211,29 @@ void ConditionEditWidget::updateRule(KScoringRule *rule)
// class SingleActionWidget (editor for one action, used in ActionEditWidget)
//
//============================================================================
-SingleActionWidget::SingleActionWidget(KScoringManager *m,QWidget *p, const char *n)
- : QWidget(p,n), notifyEditor(0), scoreEditor(0), colorEditor(0),manager(m)
+SingleActionWidget::SingleActionWidget(KScoringManager *m,TQWidget *p, const char *n)
+ : TQWidget(p,n), notifyEditor(0), scoreEditor(0), colorEditor(0),manager(m)
{
- QHBoxLayout *topL = new QHBoxLayout(this,0,5);
+ TQHBoxLayout *topL = new TQHBoxLayout(this,0,5);
types = new KComboBox(this);
types->setEditable(false);
topL->addWidget(types);
- stack = new QWidgetStack(this);
+ stack = new TQWidgetStack(this);
topL->addWidget(stack);
- dummyLabel = new QLabel(i18n("Select an action."), stack);
+ dummyLabel = new TQLabel(i18n("Select an action."), stack);
stack->addWidget(dummyLabel, 0);
// init widget stack and the types combo box
int index = 1;
- types->insertItem(QString::null);
- QStringList l = ActionBase::userNames();
- for ( QStringList::Iterator it = l.begin(); it != l.end(); ++it ) {
- QString name = *it;
+ types->insertItem(TQString::null);
+ TQStringList l = ActionBase::userNames();
+ for ( TQStringList::Iterator it = l.begin(); it != l.end(); ++it ) {
+ TQString name = *it;
int feature = ActionBase::getTypeForUserName(name);
if (manager->hasFeature(feature)) {
types->insertItem(name);
- QWidget *w=0;
+ TQWidget *w=0;
switch (feature) {
case ActionBase::SETSCORE:
w = scoreEditor = new KIntSpinBox(-99999,99999,1,0,10, stack);
@@ -245,7 +245,7 @@ SingleActionWidget::SingleActionWidget(KScoringManager *m,QWidget *p, const char
w = colorEditor = new KColorCombo(stack);
break;
case ActionBase::MARKASREAD:
- w = new QLabel( stack ); // empty dummy
+ w = new TQLabel( stack ); // empty dummy
break;
}
if ( w )
@@ -253,7 +253,7 @@ SingleActionWidget::SingleActionWidget(KScoringManager *m,QWidget *p, const char
}
}
- connect(types,SIGNAL(activated(int)),stack,SLOT(raiseWidget(int)));
+ connect(types,TQT_SIGNAL(activated(int)),stack,TQT_SLOT(raiseWidget(int)));
// raise the dummy label
types->setCurrentItem(0);
@@ -278,7 +278,7 @@ void SingleActionWidget::setAction(ActionBase *act)
notifyEditor->setText(act->getValueString());
break;
case ActionBase::COLOR:
- colorEditor->setColor(QColor(act->getValueString()));
+ colorEditor->setColor(TQColor(act->getValueString()));
break;
case ActionBase::MARKASREAD:
// nothing
@@ -324,7 +324,7 @@ void SingleActionWidget::clear()
// class ActionEditWidget (the widget to edit the actions of a rule)
//
//============================================================================
-ActionEditWidget::ActionEditWidget(KScoringManager *m,QWidget *p, const char *n)
+ActionEditWidget::ActionEditWidget(KScoringManager *m,TQWidget *p, const char *n)
: KWidgetLister(1,8,p,n), manager(m)
{
// create one initial widget
@@ -334,7 +334,7 @@ ActionEditWidget::ActionEditWidget(KScoringManager *m,QWidget *p, const char *n)
ActionEditWidget::~ActionEditWidget()
{}
-QWidget* ActionEditWidget::createWidget( QWidget *parent )
+TQWidget* ActionEditWidget::createWidget( TQWidget *parent )
{
return new SingleActionWidget(manager,parent);
}
@@ -360,7 +360,7 @@ void ActionEditWidget::slotEditRule(KScoringRule *rule)
void ActionEditWidget::updateRule(KScoringRule *rule)
{
rule->cleanActions();
- for(QWidget *w = mWidgetList.first(); w; w = mWidgetList.next()) {
+ for(TQWidget *w = mWidgetList.first(); w; w = mWidgetList.next()) {
if (! w->isA("SingleActionWidget")) {
kdWarning(5100) << "there is a widget in ActionEditWidget "
<< "which isn't a SingleActionWidget" << endl;
@@ -376,7 +376,7 @@ void ActionEditWidget::updateRule(KScoringRule *rule)
}
}
-void ActionEditWidget::clearWidget(QWidget *w)
+void ActionEditWidget::clearWidget(TQWidget *w)
{
Q_ASSERT( w->isA("SingleActionWidget") );
SingleActionWidget *sw = dynamic_cast<SingleActionWidget*>(w);
@@ -389,86 +389,86 @@ void ActionEditWidget::clearWidget(QWidget *w)
// class RuleEditWidget (the widget to edit one rule)
//
//============================================================================
-RuleEditWidget::RuleEditWidget(KScoringManager *m,QWidget *p, const char *n)
- : QWidget(p,n), dirty(false), manager(m), oldRuleName(QString::null)
+RuleEditWidget::RuleEditWidget(KScoringManager *m,TQWidget *p, const char *n)
+ : TQWidget(p,n), dirty(false), manager(m), oldRuleName(TQString::null)
{
kdDebug(5100) << "RuleEditWidget::RuleEditWidget()" << endl;
if ( !n ) setName( "RuleEditWidget" );
- QVBoxLayout *topLayout = new QVBoxLayout( this, 5, KDialog::spacingHint() );
+ TQVBoxLayout *topLayout = new TQVBoxLayout( this, 5, KDialog::spacingHint() );
//------------- Name, Servers, Groups ---------------------
- QGroupBox *groupB = new QGroupBox(i18n("Properties"),this);
+ TQGroupBox *groupB = new TQGroupBox(i18n("Properties"),this);
topLayout->addWidget(groupB);
- QGridLayout* groupL = new QGridLayout(groupB, 6,2, 8,5);
+ TQGridLayout* groupL = new TQGridLayout(groupB, 6,2, 8,5);
groupL->addRowSpacing(0, fontMetrics().lineSpacing()-4);
// name
ruleNameEdit = new KLineEdit( groupB, "ruleNameEdit" );
groupL->addWidget( ruleNameEdit, 1, 1 );
- QLabel *ruleNameLabel = new QLabel(ruleNameEdit, i18n("&Name:"), groupB, "ruleNameLabel");
+ TQLabel *ruleNameLabel = new TQLabel(ruleNameEdit, i18n("&Name:"), groupB, "ruleNameLabel");
groupL->addWidget( ruleNameLabel, 1, 0 );
// groups
groupsEdit = new KLineEdit( groupB, "groupsEdit" );
groupL->addWidget( groupsEdit, 2, 1 );
- QLabel *groupsLabel = new QLabel(groupsEdit, i18n("&Groups:"), groupB, "groupsLabel");
+ TQLabel *groupsLabel = new TQLabel(groupsEdit, i18n("&Groups:"), groupB, "groupsLabel");
groupL->addWidget( groupsLabel, 2, 0 );
- QPushButton *groupsBtn = new QPushButton(i18n("A&dd Group"), groupB);
- connect(groupsBtn,SIGNAL(clicked()),SLOT(slotAddGroup()));
+ TQPushButton *groupsBtn = new TQPushButton(i18n("A&dd Group"), groupB);
+ connect(groupsBtn,TQT_SIGNAL(clicked()),TQT_SLOT(slotAddGroup()));
groupL->addWidget( groupsBtn, 3, 0 );
groupsBox = new KComboBox( false, groupB, "groupsBox" );
groupsBox->setDuplicatesEnabled(false);
groupsBox->insertStringList(manager->getGroups());
- groupsBox->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed));
+ groupsBox->setSizePolicy(TQSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Fixed));
groupL->addWidget( groupsBox, 3, 1 );
// expires
- expireCheck = new QCheckBox(i18n("&Expire rule automatically"), groupB);
+ expireCheck = new TQCheckBox(i18n("&Expire rule automatically"), groupB);
groupL->addMultiCellWidget( expireCheck, 4,4, 0,1 );
expireEdit = new KIntSpinBox(1,99999,1,30,10, groupB, "expireWidget");
//Init suffix
slotExpireEditChanged(30);
- connect(expireEdit, SIGNAL(valueChanged(int)), SLOT(slotExpireEditChanged(int)));
+ connect(expireEdit, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(slotExpireEditChanged(int)));
groupL->addWidget( expireEdit, 5, 1 );
- expireLabel = new QLabel(expireEdit, i18n("&Rule is valid for:"), groupB, "expireLabel");
+ expireLabel = new TQLabel(expireEdit, i18n("&Rule is valid for:"), groupB, "expireLabel");
groupL->addWidget( expireLabel, 5, 0 );
expireLabel->setEnabled(false);
expireEdit->setEnabled(false);
- connect(expireCheck, SIGNAL(toggled(bool)), expireLabel, SLOT(setEnabled(bool)));
- connect(expireCheck, SIGNAL(toggled(bool)), expireEdit, SLOT(setEnabled(bool)));
+ connect(expireCheck, TQT_SIGNAL(toggled(bool)), expireLabel, TQT_SLOT(setEnabled(bool)));
+ connect(expireCheck, TQT_SIGNAL(toggled(bool)), expireEdit, TQT_SLOT(setEnabled(bool)));
//------------- Conditions ---------------------
- QGroupBox *groupConds = new QGroupBox(i18n("Conditions"), this);
+ TQGroupBox *groupConds = new TQGroupBox(i18n("Conditions"), this);
topLayout->addWidget(groupConds);
- QGridLayout *condL = new QGridLayout(groupConds, 3,2, 8,5);
+ TQGridLayout *condL = new TQGridLayout(groupConds, 3,2, 8,5);
condL->addRowSpacing(0, fontMetrics().lineSpacing()-4);
- QButtonGroup *buttonGroup = new QButtonGroup(groupConds);
+ TQButtonGroup *buttonGroup = new TQButtonGroup(groupConds);
buttonGroup->hide();
- linkModeAnd = new QRadioButton(i18n("Match a&ll conditions"), groupConds);
+ linkModeAnd = new TQRadioButton(i18n("Match a&ll conditions"), groupConds);
buttonGroup->insert(linkModeAnd);
condL->addWidget(linkModeAnd, 1,0);
- linkModeOr = new QRadioButton(i18n("Matc&h any condition"), groupConds);
+ linkModeOr = new TQRadioButton(i18n("Matc&h any condition"), groupConds);
buttonGroup->insert(linkModeOr);
condL->addWidget(linkModeOr, 1,1);
linkModeAnd->setChecked(true);
condEditor = new ConditionEditWidget(manager,groupConds);
condL->addMultiCellWidget(condEditor, 2,2, 0,1);
- connect(condEditor,SIGNAL(widgetRemoved()),this,SLOT(slotShrink()));
+ connect(condEditor,TQT_SIGNAL(widgetRemoved()),this,TQT_SLOT(slotShrink()));
//------------- Actions ---------------------
- QGroupBox *groupActions = new QGroupBox(i18n("Actions"), this);
+ TQGroupBox *groupActions = new TQGroupBox(i18n("Actions"), this);
topLayout->addWidget(groupActions);
- QBoxLayout *actionL = new QVBoxLayout(groupActions,8,5);
+ TQBoxLayout *actionL = new TQVBoxLayout(groupActions,8,5);
actionL->addSpacing(fontMetrics().lineSpacing()-4);
actionEditor = new ActionEditWidget(manager,groupActions);
actionL->addWidget(actionEditor);
- connect(actionEditor,SIGNAL(widgetRemoved()),this,SLOT(slotShrink()));
+ connect(actionEditor,TQT_SIGNAL(widgetRemoved()),this,TQT_SLOT(slotShrink()));
topLayout->addStretch(1);
@@ -479,7 +479,7 @@ RuleEditWidget::~RuleEditWidget()
{
}
-void RuleEditWidget::slotEditRule(const QString& ruleName)
+void RuleEditWidget::slotEditRule(const TQString& ruleName)
{
kdDebug(5100) << "RuleEditWidget::slotEditRule(" << ruleName << ")" << endl;
// // first update the old rule if there is one
@@ -508,7 +508,7 @@ void RuleEditWidget::slotEditRule(const QString& ruleName)
expireEdit->setEnabled(b);
expireLabel->setEnabled(b);
if (b)
- expireEdit->setValue(QDate::currentDate().daysTo(rule->getExpireDate()));
+ expireEdit->setValue(TQDate::currentDate().daysTo(rule->getExpireDate()));
else
expireEdit->setValue(30);
if (rule->getLinkMode() == KScoringRule::AND) {
@@ -533,22 +533,22 @@ void RuleEditWidget::clearContents()
expireEdit->setEnabled(false);
condEditor->slotEditRule(0);
actionEditor->slotEditRule(0);
- oldRuleName = QString::null;
+ oldRuleName = TQString::null;
}
void RuleEditWidget::updateRule(KScoringRule *rule)
{
- oldRuleName = QString::null;
- QString groups = groupsEdit->text();
+ oldRuleName = TQString::null;
+ TQString groups = groupsEdit->text();
if (groups.isEmpty())
- rule->setGroups(QStringList(".*"));
+ rule->setGroups(TQStringList(".*"));
else
- rule->setGroups(QStringList::split(";",groups));
+ rule->setGroups(TQStringList::split(";",groups));
bool b = expireCheck->isChecked();
if (b)
- rule->setExpireDate(QDate::currentDate().addDays(expireEdit->value()));
+ rule->setExpireDate(TQDate::currentDate().addDays(expireEdit->value()));
else
- rule->setExpireDate(QDate());
+ rule->setExpireDate(TQDate());
actionEditor->updateRule(rule);
rule->setLinkMode(linkModeAnd->isChecked()?KScoringRule::AND:KScoringRule::OR);
condEditor->updateRule(rule);
@@ -564,10 +564,10 @@ void RuleEditWidget::updateRule()
void RuleEditWidget::slotAddGroup()
{
- QString grp = groupsBox->currentText();
+ TQString grp = groupsBox->currentText();
if ( grp.isEmpty() )
return;
- QString txt = groupsEdit->text().stripWhiteSpace();
+ TQString txt = groupsEdit->text().stripWhiteSpace();
if ( txt == ".*" || txt.isEmpty() ) groupsEdit->setText(grp);
else groupsEdit->setText(txt + ";" + grp);
}
@@ -594,79 +594,79 @@ void RuleEditWidget::slotExpireEditChanged(int value)
// class RuleListWidget (the widget for managing a list of rules)
//
//============================================================================
-RuleListWidget::RuleListWidget(KScoringManager *m, bool standalone, QWidget *p, const char *n)
- : QWidget(p,n), alone(standalone), manager(m)
+RuleListWidget::RuleListWidget(KScoringManager *m, bool standalone, TQWidget *p, const char *n)
+ : TQWidget(p,n), alone(standalone), manager(m)
{
kdDebug(5100) << "RuleListWidget::RuleListWidget()" << endl;
if (!n) setName("RuleListWidget");
- QVBoxLayout *topL = new QVBoxLayout(this,standalone? 0:5,KDialog::spacingHint());
+ TQVBoxLayout *topL = new TQVBoxLayout(this,standalone? 0:5,KDialog::spacingHint());
ruleList = new KListBox(this);
if (standalone) {
- connect(ruleList,SIGNAL(doubleClicked(QListBoxItem*)),
- this,SLOT(slotEditRule(QListBoxItem*)));
- connect(ruleList,SIGNAL(returnPressed(QListBoxItem*)),
- this,SLOT(slotEditRule(QListBoxItem*)));
+ connect(ruleList,TQT_SIGNAL(doubleClicked(TQListBoxItem*)),
+ this,TQT_SLOT(slotEditRule(TQListBoxItem*)));
+ connect(ruleList,TQT_SIGNAL(returnPressed(TQListBoxItem*)),
+ this,TQT_SLOT(slotEditRule(TQListBoxItem*)));
}
- connect(ruleList, SIGNAL(currentChanged(QListBoxItem*)),
- this, SLOT(slotRuleSelected(QListBoxItem*)));
+ connect(ruleList, TQT_SIGNAL(currentChanged(TQListBoxItem*)),
+ this, TQT_SLOT(slotRuleSelected(TQListBoxItem*)));
topL->addWidget(ruleList);
- QHBoxLayout *btnL = new QHBoxLayout( topL, KDialog::spacingHint() );
- mRuleUp = new QPushButton( this );
+ TQHBoxLayout *btnL = new TQHBoxLayout( topL, KDialog::spacingHint() );
+ mRuleUp = new TQPushButton( this );
mRuleUp->setPixmap( BarIcon( "up", KIcon::SizeSmall ) );
- QToolTip::add( mRuleUp, i18n("Move rule up") );
+ TQToolTip::add( mRuleUp, i18n("Move rule up") );
btnL->addWidget( mRuleUp );
- connect( mRuleUp, SIGNAL( clicked() ), SLOT( slotRuleUp() ) );
- mRuleDown = new QPushButton( this );
+ connect( mRuleUp, TQT_SIGNAL( clicked() ), TQT_SLOT( slotRuleUp() ) );
+ mRuleDown = new TQPushButton( this );
mRuleDown->setPixmap( BarIcon( "down", KIcon::SizeSmall ) );
- QToolTip::add( mRuleDown, i18n("Move rule down") );
+ TQToolTip::add( mRuleDown, i18n("Move rule down") );
btnL->addWidget( mRuleDown );
- connect( mRuleDown, SIGNAL( clicked() ), SLOT( slotRuleDown() ) );
+ connect( mRuleDown, TQT_SIGNAL( clicked() ), TQT_SLOT( slotRuleDown() ) );
- btnL = new QHBoxLayout( topL, KDialog::spacingHint() );
+ btnL = new TQHBoxLayout( topL, KDialog::spacingHint() );
editRule=0L;
- newRule = new QPushButton(this);
+ newRule = new TQPushButton(this);
newRule->setPixmap( BarIcon( "filenew", KIcon::SizeSmall ) );
- QToolTip::add(newRule,i18n("New rule")),
+ TQToolTip::add(newRule,i18n("New rule")),
btnL->addWidget(newRule);
- connect(newRule, SIGNAL(clicked()), this, SLOT(slotNewRule()));
+ connect(newRule, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotNewRule()));
// if we're standalone, we need an additional edit button
if (standalone) {
- editRule = new QPushButton(this);
+ editRule = new TQPushButton(this);
editRule->setIconSet( BarIconSet("edit", KIcon::SizeSmall) );
- QToolTip::add(editRule,i18n("Edit rule"));
+ TQToolTip::add(editRule,i18n("Edit rule"));
btnL->addWidget(editRule);
- connect(editRule,SIGNAL(clicked()),this,SLOT(slotEditRule()));
+ connect(editRule,TQT_SIGNAL(clicked()),this,TQT_SLOT(slotEditRule()));
}
- delRule = new QPushButton(this);
+ delRule = new TQPushButton(this);
delRule->setIconSet( BarIconSet( "editdelete", KIcon::SizeSmall ) );
- QToolTip::add(delRule,i18n("Remove rule"));
+ TQToolTip::add(delRule,i18n("Remove rule"));
btnL->addWidget(delRule);
- connect(delRule, SIGNAL(clicked()), this, SLOT(slotDelRule()));
- copyRule = new QPushButton(this);
+ connect(delRule, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotDelRule()));
+ copyRule = new TQPushButton(this);
copyRule->setIconSet(BarIconSet("editcopy", KIcon::SizeSmall));
- QToolTip::add(copyRule,i18n("Copy rule"));
+ TQToolTip::add(copyRule,i18n("Copy rule"));
btnL->addWidget(copyRule);
- connect(copyRule, SIGNAL(clicked()), this, SLOT(slotCopyRule()));
+ connect(copyRule, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotCopyRule()));
// the group filter
- QBoxLayout *filterL = new QVBoxLayout(topL,KDialog::spacingHint());
+ TQBoxLayout *filterL = new TQVBoxLayout(topL,KDialog::spacingHint());
KComboBox *filterBox = new KComboBox(this);
- QStringList l = m->getGroups();
+ TQStringList l = m->getGroups();
filterBox->insertItem(i18n("<all groups>"));
filterBox->insertStringList(l);
- filterBox->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed));
- connect(filterBox,SIGNAL(activated(const QString&)),
- this,SLOT(slotGroupFilter(const QString&)));
+ filterBox->setSizePolicy(TQSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Fixed));
+ connect(filterBox,TQT_SIGNAL(activated(const TQString&)),
+ this,TQT_SLOT(slotGroupFilter(const TQString&)));
slotGroupFilter(i18n("<all groups>"));
- QLabel *lab = new QLabel(filterBox,i18n("Sho&w only rules for group:"),this);
+ TQLabel *lab = new TQLabel(filterBox,i18n("Sho&w only rules for group:"),this);
filterL->addWidget(lab);
filterL->addWidget(filterBox);
- connect(manager,SIGNAL(changedRules()),
- this,SLOT(updateRuleList()));
- connect(manager,SIGNAL(changedRuleName(const QString&,const QString&)),
- this,SLOT(slotRuleNameChanged(const QString&,const QString&)));
+ connect(manager,TQT_SIGNAL(changedRules()),
+ this,TQT_SLOT(updateRuleList()));
+ connect(manager,TQT_SIGNAL(changedRuleName(const TQString&,const TQString&)),
+ this,TQT_SLOT(slotRuleNameChanged(const TQString&,const TQString&)));
updateRuleList();
updateButton();
@@ -684,7 +684,7 @@ void RuleListWidget::updateButton()
delRule->setEnabled(state);
copyRule->setEnabled(state);
- QListBoxItem *item = ruleList->item( ruleList->currentItem() );
+ TQListBoxItem *item = ruleList->item( ruleList->currentItem() );
if ( item ) {
mRuleUp->setEnabled( item->prev() != 0 );
mRuleDown->setEnabled( item->next() != 0 );
@@ -695,10 +695,10 @@ void RuleListWidget::updateRuleList()
{
emit leavingRule();
kdDebug(5100) << "RuleListWidget::updateRuleList()" << endl;
- QString curr = ruleList->currentText();
+ TQString curr = ruleList->currentText();
ruleList->clear();
if (group == i18n("<all groups>")) {
- QStringList l = manager->getRuleNames();
+ TQStringList l = manager->getRuleNames();
ruleList->insertStringList(l);
} else {
KScoringManager::ScoringRuleList l = manager->getAllRules();
@@ -719,12 +719,12 @@ void RuleListWidget::updateRuleList()
void RuleListWidget::updateRuleList(const KScoringRule *rule)
{
kdDebug(5100) << "RuleListWidget::updateRuleList(" << rule->getName() << ")" << endl;
- QString name = rule->getName();
+ TQString name = rule->getName();
updateRuleList();
slotRuleSelected(name);
}
-void RuleListWidget::slotRuleNameChanged(const QString& oldName, const QString& newName)
+void RuleListWidget::slotRuleNameChanged(const TQString& oldName, const TQString& newName)
{
int ind = ruleList->currentItem();
for (uint i=0;i<ruleList->count();++i)
@@ -735,7 +735,7 @@ void RuleListWidget::slotRuleNameChanged(const QString& oldName, const QString&
}
}
-void RuleListWidget::slotEditRule(const QString& s)
+void RuleListWidget::slotEditRule(const TQString& s)
{
emit ruleEdited(s);
}
@@ -746,21 +746,21 @@ void RuleListWidget::slotEditRule()
emit ruleEdited(ruleList->currentText());
}
else if (ruleList->count() == 0)
- emit ruleEdited(QString::null);
+ emit ruleEdited(TQString::null);
}
-void RuleListWidget::slotEditRule(QListBoxItem* item)
+void RuleListWidget::slotEditRule(TQListBoxItem* item)
{
slotEditRule(item->text());
}
-void RuleListWidget::slotGroupFilter(const QString& s)
+void RuleListWidget::slotGroupFilter(const TQString& s)
{
group = s;
updateRuleList();
}
-void RuleListWidget::slotRuleSelected(const QString& ruleName)
+void RuleListWidget::slotRuleSelected(const TQString& ruleName)
{
emit leavingRule();
kdDebug(5100) << "RuleListWidget::slotRuleSelected(" << ruleName << ")" << endl;
@@ -771,10 +771,10 @@ void RuleListWidget::slotRuleSelected(const QString& ruleName)
emit ruleSelected(ruleName);
}
-void RuleListWidget::slotRuleSelected(QListBoxItem *item)
+void RuleListWidget::slotRuleSelected(TQListBoxItem *item)
{
if (!item) return;
- QString ruleName = item->text();
+ TQString ruleName = item->text();
slotRuleSelected(ruleName);
}
@@ -782,7 +782,7 @@ void RuleListWidget::slotRuleSelected(int index)
{
uint idx = index;
if (idx >= ruleList->count()) return;
- QString ruleName = ruleList->text(index);
+ TQString ruleName = ruleList->text(index);
slotRuleSelected(ruleName);
}
@@ -808,7 +808,7 @@ void RuleListWidget::slotDelRule()
void RuleListWidget::slotCopyRule()
{
emit leavingRule();
- QString ruleName = ruleList->currentText();
+ TQString ruleName = ruleList->currentText();
KScoringRule *rule = manager->findRule(ruleName);
if (rule) {
KScoringRule *nrule = manager->copyRule(rule);
@@ -821,7 +821,7 @@ void RuleListWidget::slotCopyRule()
void RuleListWidget::slotRuleUp()
{
KScoringRule *rule = 0, *below = 0;
- QListBoxItem *item = ruleList->item( ruleList->currentItem() );
+ TQListBoxItem *item = ruleList->item( ruleList->currentItem() );
if ( item ) {
rule = manager->findRule( item->text() );
item = item->prev();
@@ -837,7 +837,7 @@ void RuleListWidget::slotRuleUp()
void RuleListWidget::slotRuleDown()
{
KScoringRule *rule = 0, *above = 0;
- QListBoxItem *item = ruleList->item( ruleList->currentItem() );
+ TQListBoxItem *item = ruleList->item( ruleList->currentItem() );
if ( item ) {
rule = manager->findRule( item->text() );
item = item->next();
@@ -858,7 +858,7 @@ void RuleListWidget::slotRuleDown()
KScoringEditor* KScoringEditor::scoreEditor = 0;
KScoringEditor::KScoringEditor(KScoringManager* m,
- QWidget *parent, const char *name)
+ TQWidget *parent, const char *name)
: KDialogBase(parent,name,false,i18n("Rule Editor"),Ok|Apply|Cancel,Ok,true), manager(m)
{
manager->pushRuleList();
@@ -867,26 +867,26 @@ KScoringEditor::KScoringEditor(KScoringManager* m,
if (!name) setName("KScoringEditor");
// the left side gives an overview about all rules, the right side
// shows a detailed view of an selected rule
- QWidget *w = new QWidget(this);
+ TQWidget *w = new TQWidget(this);
setMainWidget(w);
- QHBoxLayout *hbl = new QHBoxLayout(w,0,spacingHint());
+ TQHBoxLayout *hbl = new TQHBoxLayout(w,0,spacingHint());
ruleLister = new RuleListWidget(manager,false,w);
hbl->addWidget(ruleLister);
ruleEditor = new RuleEditWidget(manager,w);
hbl->addWidget(ruleEditor);
- connect(ruleLister,SIGNAL(ruleSelected(const QString&)),
- ruleEditor, SLOT(slotEditRule(const QString&)));
- connect(ruleLister, SIGNAL(leavingRule()),
- ruleEditor, SLOT(updateRule()));
- connect(ruleEditor, SIGNAL(shrink()), SLOT(slotShrink()));
- connect(this,SIGNAL(finished()),SLOT(slotFinished()));
+ connect(ruleLister,TQT_SIGNAL(ruleSelected(const TQString&)),
+ ruleEditor, TQT_SLOT(slotEditRule(const TQString&)));
+ connect(ruleLister, TQT_SIGNAL(leavingRule()),
+ ruleEditor, TQT_SLOT(updateRule()));
+ connect(ruleEditor, TQT_SIGNAL(shrink()), TQT_SLOT(slotShrink()));
+ connect(this,TQT_SIGNAL(finished()),TQT_SLOT(slotFinished()));
ruleLister->slotRuleSelected(0);
resize(550, sizeHint().height());
}
void KScoringEditor::setDirty()
{
- QPushButton *applyBtn = actionButton(Apply);
+ TQPushButton *applyBtn = actionButton(Apply);
applyBtn->setEnabled(true);
}
@@ -896,7 +896,7 @@ KScoringEditor::~KScoringEditor()
}
KScoringEditor* KScoringEditor::createEditor(KScoringManager* m,
- QWidget *parent, const char *name)
+ TQWidget *parent, const char *name)
{
if (scoreEditor) return scoreEditor;
else return new KScoringEditor(m,parent,name);
@@ -905,25 +905,25 @@ KScoringEditor* KScoringEditor::createEditor(KScoringManager* m,
void KScoringEditor::setRule(KScoringRule* r)
{
kdDebug(5100) << "KScoringEditor::setRule(" << r->getName() << ")" << endl;
- QString ruleName = r->getName();
+ TQString ruleName = r->getName();
ruleLister->slotRuleSelected(ruleName);
}
void KScoringEditor::slotShrink()
{
- QTimer::singleShot(5, this, SLOT(slotDoShrink()));
+ TQTimer::singleShot(5, this, TQT_SLOT(slotDoShrink()));
}
void KScoringEditor::slotDoShrink()
{
updateGeometry();
- QApplication::sendPostedEvents();
+ TQApplication::sendPostedEvents();
resize(width(),sizeHint().height());
}
void KScoringEditor::slotApply()
{
- QString ruleName = ruleLister->currentRule();
+ TQString ruleName = ruleLister->currentRule();
KScoringRule *rule = manager->findRule(ruleName);
if (rule) {
ruleEditor->updateRule(rule);
@@ -957,16 +957,16 @@ void KScoringEditor::slotFinished()
// class KScoringEditorWidgetDialog (a dialog for the KScoringEditorWidget)
//
//============================================================================
-KScoringEditorWidgetDialog::KScoringEditorWidgetDialog(KScoringManager *m, const QString& r, QWidget *p, const char *n)
+KScoringEditorWidgetDialog::KScoringEditorWidgetDialog(KScoringManager *m, const TQString& r, TQWidget *p, const char *n)
: KDialogBase(p,n,true,i18n("Edit Rule"),
KDialogBase::Ok|KDialogBase::Apply|KDialogBase::Close,
KDialogBase::Ok,true),
manager(m), ruleName(r)
{
- QFrame *f = makeMainWidget();
- QBoxLayout *topL = new QVBoxLayout(f);
+ TQFrame *f = makeMainWidget();
+ TQBoxLayout *topL = new TQVBoxLayout(f);
ruleEditor = new RuleEditWidget(manager,f);
- connect(ruleEditor, SIGNAL(shrink()), SLOT(slotShrink()));
+ connect(ruleEditor, TQT_SIGNAL(shrink()), TQT_SLOT(slotShrink()));
topL->addWidget(ruleEditor);
ruleEditor->slotEditRule(ruleName);
resize(0,0);
@@ -989,13 +989,13 @@ void KScoringEditorWidgetDialog::slotOk()
void KScoringEditorWidgetDialog::slotShrink()
{
- QTimer::singleShot(5, this, SLOT(slotDoShrink()));
+ TQTimer::singleShot(5, this, TQT_SLOT(slotDoShrink()));
}
void KScoringEditorWidgetDialog::slotDoShrink()
{
updateGeometry();
- QApplication::sendPostedEvents();
+ TQApplication::sendPostedEvents();
resize(width(),sizeHint().height());
}
@@ -1004,14 +1004,14 @@ void KScoringEditorWidgetDialog::slotDoShrink()
// class KScoringEditorWidget (a reusable widget for config dialog...)
//
//============================================================================
-KScoringEditorWidget::KScoringEditorWidget(KScoringManager *m,QWidget *p, const char *n)
- : QWidget(p,n), manager(m)
+KScoringEditorWidget::KScoringEditorWidget(KScoringManager *m,TQWidget *p, const char *n)
+ : TQWidget(p,n), manager(m)
{
- QBoxLayout *topL = new QVBoxLayout(this);
+ TQBoxLayout *topL = new TQVBoxLayout(this);
ruleLister = new RuleListWidget(manager,true,this);
topL->addWidget(ruleLister);
- connect(ruleLister,SIGNAL(ruleEdited(const QString&)),
- this,SLOT(slotRuleEdited(const QString &)));
+ connect(ruleLister,TQT_SIGNAL(ruleEdited(const TQString&)),
+ this,TQT_SLOT(slotRuleEdited(const TQString &)));
}
KScoringEditorWidget::~KScoringEditorWidget()
@@ -1019,7 +1019,7 @@ KScoringEditorWidget::~KScoringEditorWidget()
manager->editorReady();
}
-void KScoringEditorWidget::slotRuleEdited(const QString& ruleName)
+void KScoringEditorWidget::slotRuleEdited(const TQString& ruleName)
{
KScoringEditorWidgetDialog dlg(manager,ruleName,this);
dlg.exec();
diff --git a/libkdepim/kscoringeditor.h b/libkdepim/kscoringeditor.h
index 5fc919f86..1f201be95 100644
--- a/libkdepim/kscoringeditor.h
+++ b/libkdepim/kscoringeditor.h
@@ -18,10 +18,10 @@
#ifndef SCOREEDITWIDGET_H
#define SCOREEDITWIDGET_H
-#include <qmap.h>
+#include <tqmap.h>
#include <kdialogbase.h>
-#include <qtable.h>
-#include <qframe.h>
+#include <tqtable.h>
+#include <tqframe.h>
#include "kwidgetlister.h"
@@ -54,7 +54,7 @@ class KDE_EXPORT SingleConditionWidget : public QFrame
Q_OBJECT
friend class ConditionEditWidget;
public:
- SingleConditionWidget(KScoringManager *,QWidget *p =0, const char *n =0);
+ SingleConditionWidget(KScoringManager *,TQWidget *p =0, const char *n =0);
~SingleConditionWidget();
void setCondition(KScoringExpression*);
KScoringExpression *createCondition() const;
@@ -66,7 +66,7 @@ protected slots:
private:
/** marks a condition as negated */
- QCheckBox *neg;
+ TQCheckBox *neg;
/** list of possible headers */
KComboBox *headers;
/** list of match types */
@@ -74,7 +74,7 @@ private:
/** the expression which will be matched */
KLineEdit *expr;
/** the button to open the regexp-editor */
- QPushButton *regExpButton;
+ TQPushButton *regExpButton;
KScoringManager *manager;
};
@@ -85,11 +85,11 @@ class ConditionEditWidget: public KWidgetLister
{
Q_OBJECT
public:
- ConditionEditWidget(KScoringManager *,QWidget *p =0, const char *n =0);
+ ConditionEditWidget(KScoringManager *,TQWidget *p =0, const char *n =0);
~ConditionEditWidget();
- QWidget* createWidget(QWidget*);
+ TQWidget* createWidget(TQWidget*);
void updateRule(KScoringRule*);
- void clearWidget(QWidget*);
+ void clearWidget(TQWidget*);
public slots:
void slotEditRule(KScoringRule*);
private:
@@ -104,7 +104,7 @@ class SingleActionWidget : public QWidget
Q_OBJECT
friend class ActionEditWidget;
public:
- SingleActionWidget(KScoringManager *m,QWidget *p =0, const char *n =0);
+ SingleActionWidget(KScoringManager *m,TQWidget *p =0, const char *n =0);
~SingleActionWidget();
void setAction(ActionBase*);
ActionBase *createAction() const;
@@ -113,7 +113,7 @@ private:
/** the list of available action */
KComboBox *types;
/** the stack of the edit widgets for each action type */
- QWidgetStack *stack;
+ TQWidgetStack *stack;
/** the notify action editor */
KLineEdit *notifyEditor;
/** the score acton editor */
@@ -121,7 +121,7 @@ private:
/** the color action editor */
KColorCombo *colorEditor;
/** the dummy label */
- QLabel *dummyLabel;
+ TQLabel *dummyLabel;
KScoringManager *manager;
};
@@ -132,11 +132,11 @@ class KDE_EXPORT ActionEditWidget : public KWidgetLister
{
Q_OBJECT
public:
- ActionEditWidget(KScoringManager *m,QWidget *p =0, const char *n =0);
+ ActionEditWidget(KScoringManager *m,TQWidget *p =0, const char *n =0);
~ActionEditWidget();
- QWidget* createWidget(QWidget *parent);
+ TQWidget* createWidget(TQWidget *parent);
void updateRule(KScoringRule*);
- void clearWidget(QWidget *);
+ void clearWidget(TQWidget *);
public slots:
void slotEditRule(KScoringRule *);
private:
@@ -149,11 +149,11 @@ class RuleEditWidget : public QWidget
{
Q_OBJECT
public:
- RuleEditWidget(KScoringManager *m,QWidget *p =0, const char *n =0);
+ RuleEditWidget(KScoringManager *m,TQWidget *p =0, const char *n =0);
~RuleEditWidget();
public slots:
void setDirty();
- void slotEditRule(const QString&);
+ void slotEditRule(const TQString&);
void updateRule(KScoringRule*);
void updateRule();
signals:
@@ -174,13 +174,13 @@ private:
/** list of all available groups */
KComboBox *groupsBox;
/** the expire enable */
- QCheckBox *expireCheck;
+ TQCheckBox *expireCheck;
/** the label to the expireCheck */
- QLabel *expireLabel;
+ TQLabel *expireLabel;
/** the expire delay */
KIntSpinBox *expireEdit;
/** the link modes of the conditions */
- QRadioButton *linkModeOr, *linkModeAnd;
+ TQRadioButton *linkModeOr, *linkModeAnd;
/** the actions editor */
ActionEditWidget *actionEditor;
/** the conditions editor */
@@ -189,7 +189,7 @@ private:
KScoringManager *manager;
// the old name of the current rule
- QString oldRuleName;
+ TQString oldRuleName;
};
/** This widget shows a list of rules with buttons for
@@ -199,27 +199,27 @@ class KDE_EXPORT RuleListWidget : public QWidget
{
Q_OBJECT
public:
- RuleListWidget(KScoringManager *m, bool =false, QWidget *p =0, const char *n =0);
+ RuleListWidget(KScoringManager *m, bool =false, TQWidget *p =0, const char *n =0);
~RuleListWidget();
- QString currentRule() const { return ruleList->currentText(); }
+ TQString currentRule() const { return ruleList->currentText(); }
protected:
void updateButton();
signals:
- void ruleSelected(const QString&);
- void ruleEdited(const QString&);
+ void ruleSelected(const TQString&);
+ void ruleEdited(const TQString&);
void leavingRule();
public slots:
- void slotRuleSelected(const QString&);
- void slotRuleSelected(QListBoxItem *);
+ void slotRuleSelected(const TQString&);
+ void slotRuleSelected(TQListBoxItem *);
void slotRuleSelected(int);
void updateRuleList();
void updateRuleList(const KScoringRule*);
- void slotRuleNameChanged(const QString&,const QString&);
+ void slotRuleNameChanged(const TQString&,const TQString&);
protected slots:
- void slotGroupFilter(const QString&);
- void slotEditRule(QListBoxItem*);
- void slotEditRule(const QString&);
+ void slotGroupFilter(const TQString&);
+ void slotEditRule(TQListBoxItem*);
+ void slotEditRule(const TQString&);
void slotEditRule();
void slotDelRule();
void slotNewRule();
@@ -231,18 +231,18 @@ private:
/** the list of rules */
KListBox *ruleList;
/** the current group */
- QString group;
+ TQString group;
/** marks if we're alone or together with the edit widget */
bool alone;
KScoringManager *manager;
- QPushButton *editRule;
- QPushButton *newRule;
- QPushButton *delRule;
- QPushButton *copyRule;
- QPushButton *mRuleUp;
- QPushButton *mRuleDown;
+ TQPushButton *editRule;
+ TQPushButton *newRule;
+ TQPushButton *delRule;
+ TQPushButton *copyRule;
+ TQPushButton *mRuleUp;
+ TQPushButton *mRuleDown;
};
class KDE_EXPORT KScoringEditor : public KDialogBase
@@ -251,11 +251,11 @@ class KDE_EXPORT KScoringEditor : public KDialogBase
public:
~KScoringEditor();
void setRule(KScoringRule*);
- static KScoringEditor *createEditor(KScoringManager* m, QWidget *parent=0, const char *name=0);
+ static KScoringEditor *createEditor(KScoringManager* m, TQWidget *parent=0, const char *name=0);
static KScoringEditor *editor() { return scoreEditor; }
void setDirty();
protected:
- KScoringEditor(KScoringManager* m, QWidget *parent=0, const char *name=0);
+ KScoringEditor(KScoringManager* m, TQWidget *parent=0, const char *name=0);
private:
/** the editor for the current rule */
RuleEditWidget* ruleEditor;
@@ -279,7 +279,7 @@ class KScoringEditorWidgetDialog : public KDialogBase
{
Q_OBJECT
public:
- KScoringEditorWidgetDialog(KScoringManager *m, const QString& rName, QWidget *parent=0, const char *name=0);
+ KScoringEditorWidgetDialog(KScoringManager *m, const TQString& rName, TQWidget *parent=0, const char *name=0);
protected slots:
void slotApply();
void slotOk();
@@ -288,17 +288,17 @@ protected slots:
private:
RuleEditWidget *ruleEditor;
KScoringManager *manager;
- QString ruleName;
+ TQString ruleName;
};
class KDE_EXPORT KScoringEditorWidget : public QWidget
{
Q_OBJECT
public:
- KScoringEditorWidget(KScoringManager *m,QWidget *p =0, const char *n =0);
+ KScoringEditorWidget(KScoringManager *m,TQWidget *p =0, const char *n =0);
~KScoringEditorWidget();
protected slots:
- void slotRuleEdited(const QString&);
+ void slotRuleEdited(const TQString&);
private:
RuleListWidget *ruleLister;
KScoringManager *manager;
diff --git a/libkdepim/ksubscription.cpp b/libkdepim/ksubscription.cpp
index c0745189e..f61b633ca 100644
--- a/libkdepim/ksubscription.cpp
+++ b/libkdepim/ksubscription.cpp
@@ -13,12 +13,12 @@
#include "ksubscription.h"
#include "kaccount.h"
-#include <qlayout.h>
-#include <qtimer.h>
-#include <qlabel.h>
-#include <qpushbutton.h>
-#include <qheader.h>
-#include <qtoolbutton.h>
+#include <tqlayout.h>
+#include <tqtimer.h>
+#include <tqlabel.h>
+#include <tqpushbutton.h>
+#include <tqheader.h>
+#include <tqtoolbutton.h>
#include <kseparator.h>
#include <kapplication.h>
@@ -30,9 +30,9 @@
//=============================================================================
-KGroupInfo::KGroupInfo(const QString &name, const QString &description,
+KGroupInfo::KGroupInfo(const TQString &name, const TQString &description,
bool newGroup, bool subscribed,
- Status status, QString path)
+ Status status, TQString path)
: name(name), description(description),
newGroup(newGroup), subscribed(subscribed),
status(status), path(path)
@@ -53,9 +53,9 @@ bool KGroupInfo::operator< (const KGroupInfo &gi2)
//=============================================================================
-GroupItem::GroupItem( QListView *v, const KGroupInfo &gi, KSubscription* browser,
+GroupItem::GroupItem( TQListView *v, const KGroupInfo &gi, KSubscription* browser,
bool isCheckItem )
- : QCheckListItem( v, gi.name, isCheckItem ? CheckBox : CheckBoxController ),
+ : TQCheckListItem( v, gi.name, isCheckItem ? CheckBox : CheckBoxController ),
mInfo( gi ), mBrowser( browser ), mIsCheckItem( isCheckItem ),
mIgnoreStateChange( false )
{
@@ -64,9 +64,9 @@ GroupItem::GroupItem( QListView *v, const KGroupInfo &gi, KSubscription* browser
}
//-----------------------------------------------------------------------------
-GroupItem::GroupItem( QListViewItem *i, const KGroupInfo &gi, KSubscription* browser,
+GroupItem::GroupItem( TQListViewItem *i, const KGroupInfo &gi, KSubscription* browser,
bool isCheckItem )
- : QCheckListItem( i, gi.name, isCheckItem ? CheckBox : CheckBoxController ),
+ : TQCheckListItem( i, gi.name, isCheckItem ? CheckBox : CheckBoxController ),
mInfo( gi ), mBrowser( browser ), mIsCheckItem( isCheckItem ),
mIgnoreStateChange( false )
{
@@ -99,7 +99,7 @@ void GroupItem::setOn( bool on )
mInfo.subscribed = on;
}
if (isCheckItem())
- QCheckListItem::setOn(on);
+ TQCheckListItem::setOn(on);
}
//------------------------------------------------------------------------------
@@ -115,7 +115,7 @@ void GroupItem::setVisible( bool b )
{
if (b)
{
- QListViewItem::setVisible(b);
+ TQListViewItem::setVisible(b);
setEnabled(true);
}
else
@@ -123,14 +123,14 @@ void GroupItem::setVisible( bool b )
if (isCheckItem())
{
bool setInvisible = true;
- for (QListViewItem * lvchild = firstChild(); lvchild != 0;
+ for (TQListViewItem * lvchild = firstChild(); lvchild != 0;
lvchild = lvchild->nextSibling())
{
if (lvchild->isVisible()) // item has a visible child
setInvisible = false;
}
if (setInvisible)
- QListViewItem::setVisible(b);
+ TQListViewItem::setVisible(b);
else
{
// leave it visible so that children remain visible
@@ -141,9 +141,9 @@ void GroupItem::setVisible( bool b )
else
{
// non-checkable item
- QPtrList<QListViewItem> moveItems;
+ TQPtrList<TQListViewItem> moveItems;
- for (QListViewItem * lvchild = firstChild(); lvchild != 0;
+ for (TQListViewItem * lvchild = firstChild(); lvchild != 0;
lvchild = lvchild->nextSibling())
{
if (static_cast<GroupItem*>(lvchild)->isCheckItem())
@@ -152,62 +152,62 @@ void GroupItem::setVisible( bool b )
moveItems.append(lvchild);
}
}
- QPtrListIterator<QListViewItem> it( moveItems );
+ TQPtrListIterator<TQListViewItem> it( moveItems );
for ( ; it.current(); ++it)
{
// move the checkitem to top
- QListViewItem* parent = it.current()->parent();
+ TQListViewItem* parent = it.current()->parent();
if (parent) parent->takeItem(it.current());
listView()->insertItem(it.current());
}
- QListViewItem::setVisible(false);
+ TQListViewItem::setVisible(false);
}
}
}
//-----------------------------------------------------------------------------
-void GroupItem::paintCell( QPainter * p, const QColorGroup & cg,
+void GroupItem::paintCell( TQPainter * p, const TQColorGroup & cg,
int column, int width, int align )
{
if (mIsCheckItem)
- return QCheckListItem::paintCell( p, cg, column, width, align );
+ return TQCheckListItem::paintCell( p, cg, column, width, align );
else
- return QListViewItem::paintCell( p, cg, column, width, align );
+ return TQListViewItem::paintCell( p, cg, column, width, align );
}
//-----------------------------------------------------------------------------
-void GroupItem::paintFocus( QPainter * p, const QColorGroup & cg,
- const QRect & r )
+void GroupItem::paintFocus( TQPainter * p, const TQColorGroup & cg,
+ const TQRect & r )
{
if (mIsCheckItem)
- QCheckListItem::paintFocus(p, cg, r);
+ TQCheckListItem::paintFocus(p, cg, r);
else
- QListViewItem::paintFocus(p, cg, r);
+ TQListViewItem::paintFocus(p, cg, r);
}
//-----------------------------------------------------------------------------
-int GroupItem::width( const QFontMetrics& fm, const QListView* lv, int column) const
+int GroupItem::width( const TQFontMetrics& fm, const TQListView* lv, int column) const
{
if (mIsCheckItem)
- return QCheckListItem::width(fm, lv, column);
+ return TQCheckListItem::width(fm, lv, column);
else
- return QListViewItem::width(fm, lv, column);
+ return TQListViewItem::width(fm, lv, column);
}
//-----------------------------------------------------------------------------
void GroupItem::setup()
{
if (mIsCheckItem)
- QCheckListItem::setup();
+ TQCheckListItem::setup();
else
- QListViewItem::setup();
+ TQListViewItem::setup();
}
//=============================================================================
-KSubscription::KSubscription( QWidget *parent, const QString &caption,
- KAccount * acct, int buttons, const QString &user1, bool descriptionColumn )
+KSubscription::KSubscription( TQWidget *parent, const TQString &caption,
+ KAccount * acct, int buttons, const TQString &user1, bool descriptionColumn )
: KDialogBase( parent, 0, true, caption, buttons | Help | Ok | Cancel, Ok,
true, i18n("Reload &List"), user1 ),
mAcct( acct )
@@ -216,35 +216,35 @@ KSubscription::KSubscription( QWidget *parent, const QString &caption,
setWFlags( getWFlags() | WDestructiveClose );
// create Widgets
- page = new QWidget(this);
+ page = new TQWidget(this);
setMainWidget(page);
- QLabel *comment = new QLabel("<p>"+
+ TQLabel *comment = new TQLabel("<p>"+
i18n("Manage which mail folders you want to see in your folder view") + "</p>", page);
- QToolButton *clearButton = new QToolButton( page );
+ TQToolButton *clearButton = new TQToolButton( page );
clearButton->setIconSet( KGlobal::iconLoader()->loadIconSet(
KApplication::reverseLayout() ? "clear_left":"locationbar_erase", KIcon::Small, 0 ) );
filterEdit = new KLineEdit(page);
- QLabel *l = new QLabel(filterEdit,i18n("S&earch:"), page);
- connect( clearButton, SIGNAL( clicked() ), filterEdit, SLOT( clear() ) );
+ TQLabel *l = new TQLabel(filterEdit,i18n("S&earch:"), page);
+ connect( clearButton, TQT_SIGNAL( clicked() ), filterEdit, TQT_SLOT( clear() ) );
// checkboxes
- noTreeCB = new QCheckBox(i18n("Disable &tree view"), page);
+ noTreeCB = new TQCheckBox(i18n("Disable &tree view"), page);
noTreeCB->setChecked(false);
- subCB = new QCheckBox(i18n("&Subscribed only"), page);
+ subCB = new TQCheckBox(i18n("&Subscribed only"), page);
subCB->setChecked(false);
- newCB = new QCheckBox(i18n("&New only"), page);
+ newCB = new TQCheckBox(i18n("&New only"), page);
newCB->setChecked(false);
KSeparator *sep = new KSeparator(KSeparator::HLine, page);
// init the labels
- QFont fnt = font();
+ TQFont fnt = font();
fnt.setBold(true);
- leftLabel = new QLabel(i18n("Loading..."), page);
- rightLabel = new QLabel(i18n("Current changes:"), page);
+ leftLabel = new TQLabel(i18n("Loading..."), page);
+ rightLabel = new TQLabel(i18n("Current changes:"), page);
leftLabel->setFont(fnt);
rightLabel->setFont(fnt);
@@ -252,9 +252,9 @@ KSubscription::KSubscription( QWidget *parent, const QString &caption,
pmRight = BarIconSet("forward");
pmLeft = BarIconSet("back");
- arrowBtn1 = new QPushButton(page);
+ arrowBtn1 = new TQPushButton(page);
arrowBtn1->setEnabled(false);
- arrowBtn2 = new QPushButton(page);
+ arrowBtn2 = new TQPushButton(page);
arrowBtn2->setEnabled(false);
arrowBtn1->setIconSet(pmRight);
arrowBtn2->setIconSet(pmRight);
@@ -262,7 +262,7 @@ KSubscription::KSubscription( QWidget *parent, const QString &caption,
arrowBtn2->setFixedSize(35,30);
// the main listview
- groupView = new QListView(page);
+ groupView = new TQListView(page);
groupView->setRootIsDecorated(true);
groupView->addColumn(i18n("Name"));
groupView->setAllColumnsShowFocus(true);
@@ -272,10 +272,10 @@ KSubscription::KSubscription( QWidget *parent, const QString &caption,
groupView->header()->setStretchEnabled(true, 0);
// layout
- QGridLayout *topL = new QGridLayout(page,4,1,0, KDialog::spacingHint());
- QHBoxLayout *filterL = new QHBoxLayout(KDialog::spacingHint());
- QVBoxLayout *arrL = new QVBoxLayout(KDialog::spacingHint());
- listL = new QGridLayout(2, 3, KDialog::spacingHint());
+ TQGridLayout *topL = new TQGridLayout(page,4,1,0, KDialog::spacingHint());
+ TQHBoxLayout *filterL = new TQHBoxLayout(KDialog::spacingHint());
+ TQVBoxLayout *arrL = new TQVBoxLayout(KDialog::spacingHint());
+ listL = new TQGridLayout(2, 3, KDialog::spacingHint());
topL->addWidget(comment, 0,0);
topL->addLayout(filterL, 1,0);
@@ -301,14 +301,14 @@ KSubscription::KSubscription( QWidget *parent, const QString &caption,
arrL->addWidget(arrowBtn2, AlignCenter);
// listviews
- subView = new QListView(page);
+ subView = new TQListView(page);
subView->addColumn(i18n("Subscribe To"));
subView->header()->setStretchEnabled(true, 0);
- unsubView = new QListView(page);
+ unsubView = new TQListView(page);
unsubView->addColumn(i18n("Unsubscribe From"));
unsubView->header()->setStretchEnabled(true, 0);
- QVBoxLayout *protL = new QVBoxLayout(3);
+ TQVBoxLayout *protL = new TQVBoxLayout(3);
listL->addLayout(protL, 1,2);
protL->addWidget(subView);
protL->addWidget(unsubView);
@@ -323,29 +323,29 @@ KSubscription::KSubscription( QWidget *parent, const QString &caption,
filterEdit->setFocus();
// items clicked
- connect(groupView, SIGNAL(clicked(QListViewItem *)),
- this, SLOT(slotChangeButtonState(QListViewItem*)));
- connect(subView, SIGNAL(clicked(QListViewItem *)),
- this, SLOT(slotChangeButtonState(QListViewItem*)));
- connect(unsubView, SIGNAL(clicked(QListViewItem *)),
- this, SLOT(slotChangeButtonState(QListViewItem*)));
+ connect(groupView, TQT_SIGNAL(clicked(TQListViewItem *)),
+ this, TQT_SLOT(slotChangeButtonState(TQListViewItem*)));
+ connect(subView, TQT_SIGNAL(clicked(TQListViewItem *)),
+ this, TQT_SLOT(slotChangeButtonState(TQListViewItem*)));
+ connect(unsubView, TQT_SIGNAL(clicked(TQListViewItem *)),
+ this, TQT_SLOT(slotChangeButtonState(TQListViewItem*)));
// connect buttons
- connect(arrowBtn1, SIGNAL(clicked()), SLOT(slotButton1()));
- connect(arrowBtn2, SIGNAL(clicked()), SLOT(slotButton2()));
- connect(this, SIGNAL(user1Clicked()), SLOT(slotLoadFolders()));
+ connect(arrowBtn1, TQT_SIGNAL(clicked()), TQT_SLOT(slotButton1()));
+ connect(arrowBtn2, TQT_SIGNAL(clicked()), TQT_SLOT(slotButton2()));
+ connect(this, TQT_SIGNAL(user1Clicked()), TQT_SLOT(slotLoadFolders()));
// connect checkboxes
- connect(subCB, SIGNAL(clicked()), SLOT(slotCBToggled()));
- connect(newCB, SIGNAL(clicked()), SLOT(slotCBToggled()));
- connect(noTreeCB, SIGNAL(clicked()), SLOT(slotCBToggled()));
+ connect(subCB, TQT_SIGNAL(clicked()), TQT_SLOT(slotCBToggled()));
+ connect(newCB, TQT_SIGNAL(clicked()), TQT_SLOT(slotCBToggled()));
+ connect(noTreeCB, TQT_SIGNAL(clicked()), TQT_SLOT(slotCBToggled()));
// connect textfield
- connect(filterEdit, SIGNAL(textChanged(const QString&)),
- SLOT(slotFilterTextChanged(const QString&)));
+ connect(filterEdit, TQT_SIGNAL(textChanged(const TQString&)),
+ TQT_SLOT(slotFilterTextChanged(const TQString&)));
// update status
- connect(this, SIGNAL(listChanged()), SLOT(slotUpdateStatusLabel()));
+ connect(this, TQT_SIGNAL(listChanged()), TQT_SLOT(slotUpdateStatusLabel()));
}
//-----------------------------------------------------------------------------
@@ -356,7 +356,7 @@ KSubscription::~KSubscription()
//-----------------------------------------------------------------------------
void KSubscription::setStartItem( const KGroupInfo &info )
{
- QListViewItemIterator it(groupView);
+ TQListViewItemIterator it(groupView);
for ( ; it.current(); ++it)
{
@@ -369,10 +369,10 @@ void KSubscription::setStartItem( const KGroupInfo &info )
}
//-----------------------------------------------------------------------------
-void KSubscription::removeListItem( QListView *view, const KGroupInfo &gi )
+void KSubscription::removeListItem( TQListView *view, const KGroupInfo &gi )
{
if(!view) return;
- QListViewItemIterator it(view);
+ TQListViewItemIterator it(view);
for ( ; it.current(); ++it)
{
@@ -387,10 +387,10 @@ void KSubscription::removeListItem( QListView *view, const KGroupInfo &gi )
}
//-----------------------------------------------------------------------------
-QListViewItem* KSubscription::getListItem( QListView *view, const KGroupInfo &gi )
+TQListViewItem* KSubscription::getListItem( TQListView *view, const KGroupInfo &gi )
{
if(!view) return 0;
- QListViewItemIterator it(view);
+ TQListViewItemIterator it(view);
for ( ; it.current(); ++it)
{
@@ -401,10 +401,10 @@ QListViewItem* KSubscription::getListItem( QListView *view, const KGroupInfo &gi
}
//-----------------------------------------------------------------------------
-bool KSubscription::itemInListView( QListView *view, const KGroupInfo &gi )
+bool KSubscription::itemInListView( TQListView *view, const KGroupInfo &gi )
{
if(!view) return false;
- QListViewItemIterator it(view);
+ TQListViewItemIterator it(view);
for ( ; it.current(); ++it)
if (static_cast<GroupItem*>(it.current())->info() == gi)
@@ -445,7 +445,7 @@ void KSubscription::changeItemState( GroupItem* item, bool on )
{
if (!itemInListView(unsubView, item->info()))
{
- QListViewItem *p = item->parent();
+ TQListViewItem *p = item->parent();
while (p)
{
// make sure all parents are subscribed
@@ -477,7 +477,7 @@ void KSubscription::changeItemState( GroupItem* item, bool on )
}
//------------------------------------------------------------------------------
-void KSubscription::filterChanged( QListViewItem* item, const QString & text )
+void KSubscription::filterChanged( TQListViewItem* item, const TQString & text )
{
if ( !item && groupView )
item = groupView->firstChild();
@@ -538,7 +538,7 @@ void KSubscription::filterChanged( QListViewItem* item, const QString & text )
//------------------------------------------------------------------------------
uint KSubscription::activeItemCount()
{
- QListViewItemIterator it(groupView);
+ TQListViewItemIterator it(groupView);
uint count = 0;
for ( ; it.current(); ++it)
@@ -554,11 +554,11 @@ uint KSubscription::activeItemCount()
//------------------------------------------------------------------------------
void KSubscription::restoreOriginalParent()
{
- QPtrList<QListViewItem> move;
- QListViewItemIterator it(groupView);
+ TQPtrList<TQListViewItem> move;
+ TQListViewItemIterator it(groupView);
for ( ; it.current(); ++it)
{
- QListViewItem* origParent = static_cast<GroupItem*>(it.current())->
+ TQListViewItem* origParent = static_cast<GroupItem*>(it.current())->
originalParent();
if (origParent && origParent != it.current()->parent())
{
@@ -566,11 +566,11 @@ void KSubscription::restoreOriginalParent()
move.append(it.current());
}
}
- QPtrListIterator<QListViewItem> it2( move );
+ TQPtrListIterator<TQListViewItem> it2( move );
for ( ; it2.current(); ++it2)
{
// restore the original parent
- QListViewItem* origParent = static_cast<GroupItem*>(it2.current())->
+ TQListViewItem* origParent = static_cast<GroupItem*>(it2.current())->
originalParent();
groupView->takeItem(it2.current());
origParent->insertItem(it2.current());
@@ -580,7 +580,7 @@ void KSubscription::restoreOriginalParent()
//-----------------------------------------------------------------------------
void KSubscription::saveOpenStates()
{
- QListViewItemIterator it(groupView);
+ TQListViewItemIterator it(groupView);
for ( ; it.current(); ++it)
{
@@ -592,7 +592,7 @@ void KSubscription::saveOpenStates()
//-----------------------------------------------------------------------------
void KSubscription::restoreOpenStates()
{
- QListViewItemIterator it(groupView);
+ TQListViewItemIterator it(groupView);
for ( ; it.current(); ++it)
{
@@ -613,7 +613,7 @@ void KSubscription::slotLoadingComplete()
subCB->setEnabled(true);
// remember the correct parent
- QListViewItemIterator it(groupView);
+ TQListViewItemIterator it(groupView);
for ( ; it.current(); ++it)
{
static_cast<GroupItem*>(it.current())->
@@ -624,7 +624,7 @@ void KSubscription::slotLoadingComplete()
}
//------------------------------------------------------------------------------
-void KSubscription::slotChangeButtonState( QListViewItem *item )
+void KSubscription::slotChangeButtonState( TQListViewItem *item )
{
if (!item ||
(item->listView() == groupView &&
@@ -636,7 +636,7 @@ void KSubscription::slotChangeButtonState( QListViewItem *item )
return;
}
// set the direction of the buttons and enable/disable them
- QListView* currentView = item->listView();
+ TQListView* currentView = item->listView();
if (currentView == groupView)
{
setDirectionButton1(Right);
@@ -686,7 +686,7 @@ void KSubscription::slotButton1()
{
GroupItem* item = static_cast<GroupItem*>(subView->currentItem());
// get the corresponding item from the groupView
- QListViewItem* listitem = getListItem(groupView, item->info());
+ TQListViewItem* listitem = getListItem(groupView, item->info());
if (listitem)
{
// deactivate
@@ -715,7 +715,7 @@ void KSubscription::slotButton2()
{
GroupItem* item = static_cast<GroupItem*>(unsubView->currentItem());
// get the corresponding item from the groupView
- QListViewItem* listitem = getListItem(groupView, item->info());
+ TQListViewItem* listitem = getListItem(groupView, item->info());
if (listitem)
{
// activate
@@ -739,7 +739,7 @@ void KSubscription::slotCBToggled()
}
//------------------------------------------------------------------------------
-void KSubscription::slotFilterTextChanged( const QString & text )
+void KSubscription::slotFilterTextChanged( const TQString & text )
{
// remember is the items are open
if (mLastText.isEmpty())
@@ -749,7 +749,7 @@ void KSubscription::slotFilterTextChanged( const QString & text )
{
// reset
restoreOriginalParent();
- QListViewItemIterator it(groupView);
+ TQListViewItemIterator it(groupView);
for ( ; it.current(); ++it)
{
it.current()->setVisible(true);
@@ -769,7 +769,7 @@ void KSubscription::slotFilterTextChanged( const QString & text )
//------------------------------------------------------------------------------
void KSubscription::slotUpdateStatusLabel()
{
- QString text;
+ TQString text;
if (mLoading)
text = i18n("Loading... (1 matching)", "Loading... (%n matching)",
activeItemCount());
diff --git a/libkdepim/ksubscription.h b/libkdepim/ksubscription.h
index 55ed5bd25..f72455b3f 100644
--- a/libkdepim/ksubscription.h
+++ b/libkdepim/ksubscription.h
@@ -25,8 +25,8 @@
#ifndef __KSUBSCRIPTION
#define __KSUBSCRIPTION
-#include <qlistview.h>
-#include <qcheckbox.h>
+#include <tqlistview.h>
+#include <tqcheckbox.h>
#include <kdialogbase.h>
#include <kdepimmacros.h>
@@ -52,14 +52,14 @@ class KDE_EXPORT KGroupInfo
moderated
};
- KGroupInfo( const QString &name, const QString &description = QString::null,
+ KGroupInfo( const TQString &name, const TQString &description = TQString::null,
bool newGroup = false, bool subscribed = false,
- Status status = unknown, QString path = QString::null );
+ Status status = unknown, TQString path = TQString::null );
- QString name, description;
+ TQString name, description;
bool newGroup, subscribed;
Status status;
- QString path;
+ TQString path;
bool operator== (const KGroupInfo &gi2);
bool operator< (const KGroupInfo &gi2);
@@ -72,9 +72,9 @@ class KDE_EXPORT KGroupInfo
class KDE_EXPORT GroupItem : public QCheckListItem
{
public:
- GroupItem( QListView *v, const KGroupInfo &gi, KSubscription* browser,
+ GroupItem( TQListView *v, const KGroupInfo &gi, KSubscription* browser,
bool isCheckItem = false );
- GroupItem( QListViewItem *i, const KGroupInfo &gi, KSubscription* browser,
+ GroupItem( TQListViewItem *i, const KGroupInfo &gi, KSubscription* browser,
bool isCheckItem = false );
/**
@@ -86,8 +86,8 @@ class KDE_EXPORT GroupItem : public QCheckListItem
/**
* Get/Set the original parent
*/
- QListViewItem* originalParent() { return mOriginalParent; }
- void setOriginalParent( QListViewItem* parent ) { mOriginalParent = parent; }
+ TQListViewItem* originalParent() { return mOriginalParent; }
+ void setOriginalParent( TQListViewItem* parent ) { mOriginalParent = parent; }
/**
* Get/Set the last open state
@@ -132,27 +132,27 @@ class KDE_EXPORT GroupItem : public QCheckListItem
/**
* Reimplemented
- * Calls QListViewItem or QCheckListItem
+ * Calls TQListViewItem or QCheckListItem
*/
- virtual void paintCell( QPainter * p, const QColorGroup & cg,
+ virtual void paintCell( TQPainter * p, const TQColorGroup & cg,
int column, int width, int align );
/**
* Reimplemented
- * Calls QListViewItem or QCheckListItem
+ * Calls TQListViewItem or QCheckListItem
*/
- virtual void paintFocus( QPainter *, const QColorGroup & cg,
- const QRect & r );
+ virtual void paintFocus( TQPainter *, const TQColorGroup & cg,
+ const TQRect & r );
/**
* Reimplemented
- * Calls QListViewItem or QCheckListItem
+ * Calls TQListViewItem or QCheckListItem
*/
- virtual int width( const QFontMetrics&, const QListView*, int column) const;
+ virtual int width( const TQFontMetrics&, const TQListView*, int column) const;
/**
* Reimplemented
- * Calls QListViewItem or QCheckListItem
+ * Calls TQListViewItem or QCheckListItem
*/
virtual void setup();
@@ -162,7 +162,7 @@ class KDE_EXPORT GroupItem : public QCheckListItem
protected:
KGroupInfo mInfo;
KSubscription* mBrowser;
- QListViewItem* mOriginalParent;
+ TQListViewItem* mOriginalParent;
// remember last open state
bool mLastOpenState;
// is this a checkable item
@@ -198,8 +198,8 @@ class KDE_EXPORT KSubscription : public KDialogBase
Right
};
- KSubscription( QWidget *parent, const QString &caption, KAccount* acct,
- int buttons = 0, const QString &user1 = QString::null,
+ KSubscription( TQWidget *parent, const TQString &caption, KAccount* acct,
+ int buttons = 0, const TQString &user1 = TQString::null,
bool descriptionColumn = true );
~KSubscription();
@@ -213,7 +213,7 @@ class KDE_EXPORT KSubscription : public KDialogBase
/**
* Access to the treewidget that holds the GroupItems
*/
- QListView* folderTree() { return groupView; }
+ TQListView* folderTree() { return groupView; }
/**
* Access to the searchfield
@@ -228,18 +228,18 @@ class KDE_EXPORT KSubscription : public KDialogBase
/**
* Removes the item from the listview
*/
- void removeListItem( QListView *view, const KGroupInfo &gi );
+ void removeListItem( TQListView *view, const KGroupInfo &gi );
/**
* Gets the item from the listview
* Returns 0 if the item can't be found
*/
- QListViewItem* getListItem( QListView *view, const KGroupInfo &gi );
+ TQListViewItem* getListItem( TQListView *view, const KGroupInfo &gi );
/**
* Is the item in the given listview
*/
- bool itemInListView( QListView *view, const KGroupInfo &gi );
+ bool itemInListView( TQListView *view, const KGroupInfo &gi );
/**
* Makes all changes after an item is toggled
@@ -279,8 +279,8 @@ class KDE_EXPORT KSubscription : public KDialogBase
* Update the item-states (visible, enabled) when a filter
* criteria changed
*/
- void filterChanged( QListViewItem* item = 0,
- const QString & text = QString::null );
+ void filterChanged( TQListViewItem* item = 0,
+ const TQString & text = TQString::null );
/**
* The amount of items that are visible and enabled
@@ -312,7 +312,7 @@ class KDE_EXPORT KSubscription : public KDialogBase
/**
* Changes the current state of the buttons
*/
- void slotChangeButtonState( QListViewItem* );
+ void slotChangeButtonState( TQListViewItem* );
/**
* Buttons are clicked
@@ -339,7 +339,7 @@ class KDE_EXPORT KSubscription : public KDialogBase
/**
* Filter text changed
*/
- void slotFilterTextChanged( const QString & text );
+ void slotFilterTextChanged( const TQString & text );
signals:
/**
@@ -354,15 +354,15 @@ class KDE_EXPORT KSubscription : public KDialogBase
KAccount* mAcct;
// widgets
- QWidget *page;
- QListView *groupView;
- QListView *subView, *unsubView;
+ TQWidget *page;
+ TQListView *groupView;
+ TQListView *subView, *unsubView;
KLineEdit *filterEdit;
- QCheckBox *noTreeCB, *subCB, *newCB;
- QPushButton *arrowBtn1, *arrowBtn2;
- QIconSet pmRight, pmLeft;
- QGridLayout *listL;
- QLabel *leftLabel, *rightLabel;
+ TQCheckBox *noTreeCB, *subCB, *newCB;
+ TQPushButton *arrowBtn1, *arrowBtn2;
+ TQIconSet pmRight, pmLeft;
+ TQGridLayout *listL;
+ TQLabel *leftLabel, *rightLabel;
// false if all items are loaded
bool mLoading;
@@ -372,7 +372,7 @@ class KDE_EXPORT KSubscription : public KDialogBase
Direction mDirButton2;
// remember last searchtext
- QString mLastText;
+ TQString mLastText;
// remember description column
int mDescrColumn;
diff --git a/libkdepim/ktimeedit.cpp b/libkdepim/ktimeedit.cpp
index e9758110b..15d318418 100644
--- a/libkdepim/ktimeedit.cpp
+++ b/libkdepim/ktimeedit.cpp
@@ -24,10 +24,10 @@
without including the source code for Qt in the source distribution.
*/
-#include <qkeycode.h>
-#include <qcombobox.h>
-#include <qdatetime.h>
-#include <qlineedit.h>
+#include <tqkeycode.h>
+#include <tqcombobox.h>
+#include <tqdatetime.h>
+#include <tqlineedit.h>
#include <kmessagebox.h>
#include <kglobal.h>
@@ -35,7 +35,7 @@
#include <klocale.h>
#include "ktimeedit.h"
-#include <qvalidator.h>
+#include <tqvalidator.h>
#include "ktimeedit.moc"
// Validator for a time value with only hours and minutes (no seconds)
@@ -43,9 +43,9 @@
class KOTimeValidator : public QValidator
{
public:
- KOTimeValidator(QWidget* parent, const char* name=0) : QValidator(parent, name) {}
+ KOTimeValidator(TQWidget* parent, const char* name=0) : TQValidator(parent, name) {}
- virtual State validate(QString& str, int& /*cursorPos*/) const
+ virtual State validate(TQString& str, int& /*cursorPos*/) const
{
int length = str.length();
// empty string is intermediate so one can clear the edit line and start from scratch
@@ -53,7 +53,7 @@ public:
return Intermediate;
bool ok = false;
- /*QTime time =*/ KGlobal::locale()->readTime(str, KLocale::WithoutSeconds, &ok);
+ /*TQTime time =*/ KGlobal::locale()->readTime(str, KLocale::WithoutSeconds, &ok);
if ( ok )
return Acceptable;
// kdDebug(5300)<<"Time "<<str<<" not directly acceptable, trying military format "<<endl;
@@ -69,19 +69,19 @@ public:
// readTime doesn't help knowing when the string is "Intermediate".
// HACK. Not fully locale aware etc. (esp. the separator is '.' in sv_SE...)
- QChar sep = ':';
+ TQChar sep = ':';
// I want to allow "HH:", ":MM" and ":" to make editing easier
if ( str[0] == sep )
{
if ( length == 1 ) // just ":"
return Intermediate;
- QString minutes = str.mid(1);
+ TQString minutes = str.mid(1);
int m = minutes.toInt(&ok);
if ( ok && m >= 0 && m < 60 )
return Intermediate;
} else if ( str[str.length()-1] == sep )
{
- QString hours = str.left(length-1);
+ TQString hours = str.left(length-1);
int h = hours.toInt(&ok);
if ( ok && h >= 0 && h < 24 )
return Intermediate;
@@ -89,14 +89,14 @@ public:
// return Invalid;
return Intermediate;
}
- virtual void fixup ( QString & input ) const {
+ virtual void fixup ( TQString & input ) const {
bool ok = false;
KGlobal::locale()->readTime( input, KLocale::WithoutSeconds, &ok );
if ( !ok ) {
// Also try to accept times in "military format", i.e. no delimiter, like 1200
int tm = input.toInt( &ok );
if ( ( 0 <= tm ) && ( tm < 2400 ) && ( tm%100 < 60 ) && ok ) {
- input = KGlobal::locale()->formatTime( QTime( tm / 100, tm % 100, 0 ) );
+ input = KGlobal::locale()->formatTime( TQTime( tm / 100, tm % 100, 0 ) );
}
}
}
@@ -104,9 +104,9 @@ public:
// KTimeWidget/QTimeEdit provide nicer editing, but don't provide a combobox.
// Difficult to get all in one...
-// But Qt-3.2 will offer QLineEdit::setMask, so a "99:99" mask would help.
-KTimeEdit::KTimeEdit( QWidget *parent, QTime qt, const char *name )
- : QComboBox( true, parent, name )
+// But Qt-3.2 will offer TQLineEdit::setMask, so a "99:99" mask would help.
+KTimeEdit::KTimeEdit( TQWidget *parent, TQTime qt, const char *name )
+ : TQComboBox( true, parent, name )
{
setInsertionPolicy( NoInsertion );
setValidator( new KOTimeValidator( this ) );
@@ -117,20 +117,20 @@ KTimeEdit::KTimeEdit( QWidget *parent, QTime qt, const char *name )
// insertItem( mNoTimeString );
// Fill combo box with selection of times in localized format.
- QTime timeEntry(0,0,0);
+ TQTime timeEntry(0,0,0);
do {
insertItem(KGlobal::locale()->formatTime(timeEntry));
timeEntry = timeEntry.addSecs(60*15);
} while (!timeEntry.isNull());
// Add end of day.
- insertItem( KGlobal::locale()->formatTime( QTime( 23, 59, 59 ) ) );
+ insertItem( KGlobal::locale()->formatTime( TQTime( 23, 59, 59 ) ) );
updateText();
- setFocusPolicy(QWidget::StrongFocus);
+ setFocusPolicy(TQWidget::StrongFocus);
- connect(this, SIGNAL(activated(int)), this, SLOT(active(int)));
- connect(this, SIGNAL(highlighted(int)), this, SLOT(hilit(int)));
- connect(this, SIGNAL(textChanged(const QString&)),this,SLOT(changedText()));
+ connect(this, TQT_SIGNAL(activated(int)), this, TQT_SLOT(active(int)));
+ connect(this, TQT_SIGNAL(highlighted(int)), this, TQT_SLOT(hilit(int)));
+ connect(this, TQT_SIGNAL(textChanged(const TQString&)),this,TQT_SLOT(changedText()));
}
KTimeEdit::~KTimeEdit()
@@ -146,12 +146,12 @@ bool KTimeEdit::hasTime() const
return true; // always
}
-QTime KTimeEdit::getTime() const
+TQTime KTimeEdit::getTime() const
{
//kdDebug(5300) << "KTimeEdit::getTime(), currentText() = " << currentText() << endl;
// TODO use KLocale::WithoutSeconds in HEAD
bool ok = false;
- QTime time = KGlobal::locale()->readTime( currentText(), KLocale::WithoutSeconds, &ok );
+ TQTime time = KGlobal::locale()->readTime( currentText(), KLocale::WithoutSeconds, &ok );
if ( !ok ) {
// Also try to accept times in "military format", i.e. no delimiter, like 1200
int tm = currentText().toInt( &ok );
@@ -165,16 +165,16 @@ QTime KTimeEdit::getTime() const
return time;
}
-QSizePolicy KTimeEdit::sizePolicy() const
+TQSizePolicy KTimeEdit::sizePolicy() const
{
// Set size policy to Fixed, because edit cannot contain more text than the
// string representing the time. It doesn't make sense to provide more space.
- QSizePolicy sizePolicy(QSizePolicy::Fixed,QSizePolicy::Fixed);
+ TQSizePolicy sizePolicy(TQSizePolicy::Fixed,TQSizePolicy::Fixed);
return sizePolicy;
}
-void KTimeEdit::setTime(QTime newTime)
+void KTimeEdit::setTime(TQTime newTime)
{
if ( mTime != newTime )
{
@@ -189,9 +189,9 @@ void KTimeEdit::active(int i)
{
// The last entry, 23:59, is a special case
if( i == count() - 1 )
- mTime = QTime( 23, 59, 0 );
+ mTime = TQTime( 23, 59, 0 );
else
- mTime = QTime(0,0,0).addSecs(i*15*60);
+ mTime = TQTime(0,0,0).addSecs(i*15*60);
emit timeChanged(mTime);
}
@@ -200,7 +200,7 @@ void KTimeEdit::hilit(int )
// we don't currently need to do anything here.
}
-void KTimeEdit::addTime(QTime qt)
+void KTimeEdit::addTime(TQTime qt)
{
// Calculate the new time.
mTime = qt.addSecs(mTime.minute()*60+mTime.hour()*3600);
@@ -208,12 +208,12 @@ void KTimeEdit::addTime(QTime qt)
emit timeChanged(mTime);
}
-void KTimeEdit::subTime(QTime qt)
+void KTimeEdit::subTime(TQTime qt)
{
int h, m;
// Note that we cannot use the same method for determining the new
- // time as we did in addTime, because QTime does not handle adding
+ // time as we did in addTime, because TQTime does not handle adding
// negative seconds well at all.
h = mTime.hour()-qt.hour();
m = mTime.minute()-qt.minute();
@@ -233,23 +233,23 @@ void KTimeEdit::subTime(QTime qt)
emit timeChanged(mTime);
}
-void KTimeEdit::keyPressEvent(QKeyEvent *qke)
+void KTimeEdit::keyPressEvent(TQKeyEvent *qke)
{
switch(qke->key()) {
case Key_Down:
- addTime(QTime(0,1,0));
+ addTime(TQTime(0,1,0));
break;
case Key_Up:
- subTime(QTime(0,1,0));
+ subTime(TQTime(0,1,0));
break;
case Key_Prior:
- subTime(QTime(1,0,0));
+ subTime(TQTime(1,0,0));
break;
case Key_Next:
- addTime(QTime(1,0,0));
+ addTime(TQTime(1,0,0));
break;
default:
- QComboBox::keyPressEvent(qke);
+ TQComboBox::keyPressEvent(qke);
break;
} // switch
}
@@ -257,9 +257,9 @@ void KTimeEdit::keyPressEvent(QKeyEvent *qke)
void KTimeEdit::updateText()
{
// kdDebug(5300) << "KTimeEdit::updateText() " << endl;
- QString s = KGlobal::locale()->formatTime(mTime);
+ TQString s = KGlobal::locale()->formatTime(mTime);
// Set the text but without emitting signals, nor losing the cursor position
- QLineEdit *line = lineEdit();
+ TQLineEdit *line = lineEdit();
line->blockSignals(true);
int pos = line->cursorPosition();
@@ -277,8 +277,8 @@ void KTimeEdit::updateText()
bool KTimeEdit::inputIsValid() const
{
int cursorPos = lineEdit()->cursorPosition();
- QString str = currentText();
- return validator()->validate( str, cursorPos ) == QValidator::Acceptable;
+ TQString str = currentText();
+ return validator()->validate( str, cursorPos ) == TQValidator::Acceptable;
}
void KTimeEdit::changedText()
diff --git a/libkdepim/ktimeedit.h b/libkdepim/ktimeedit.h
index be50a40b8..609c64007 100644
--- a/libkdepim/ktimeedit.h
+++ b/libkdepim/ktimeedit.h
@@ -25,11 +25,11 @@
#ifndef _KTIMEEDIT_H
#define _KTIMEEDIT_H
-#include <qevent.h>
-#include <qkeycode.h>
-#include <qstring.h>
-#include <qdatetime.h>
-#include <qcombobox.h>
+#include <tqevent.h>
+#include <tqkeycode.h>
+#include <tqstring.h>
+#include <tqdatetime.h>
+#include <tqcombobox.h>
#include <kapplication.h>
#include <kdepimmacros.h>
@@ -46,7 +46,7 @@ class KDE_EXPORT KTimeEdit : public QComboBox
Q_OBJECT
public:
/** constructs a new time edit. */
- KTimeEdit(QWidget *parent=0, QTime qt=QTime(12,0), const char *name=0);
+ KTimeEdit(TQWidget *parent=0, TQTime qt=TQTime(12,0), const char *name=0);
virtual ~KTimeEdit();
@@ -56,10 +56,10 @@ class KDE_EXPORT KTimeEdit : public QComboBox
bool hasTime() const;
/** returns the time that is currently set in the timeLineEdit. */
- QTime getTime() const;
+ TQTime getTime() const;
/** returns the preferred size policy of the KTimeEdit */
- QSizePolicy sizePolicy() const;
+ TQSizePolicy sizePolicy() const;
/** return true if input is a valid time and false if not */
bool inputIsValid() const;
@@ -69,11 +69,11 @@ class KDE_EXPORT KTimeEdit : public QComboBox
Emitted every time the time displayed changes. "newt" is the new
time.
*/
- void timeChanged(QTime newt);
+ void timeChanged(TQTime newt);
public slots:
/** used to set the time which is displayed to a specific value. */
- void setTime(QTime qt);
+ void setTime(TQTime qt);
protected slots:
void active(int);
@@ -81,15 +81,15 @@ class KDE_EXPORT KTimeEdit : public QComboBox
void changedText();
protected:
- virtual void keyPressEvent(QKeyEvent *qke);
- void addTime(QTime qt);
- void subTime(QTime qt);
+ virtual void keyPressEvent(TQKeyEvent *qke);
+ void addTime(TQTime qt);
+ void subTime(TQTime qt);
// Update the lineedit text from mTime
void updateText();
private:
- QTime mTime; // the widget's displayed time.
- //QString mNoTimeString;
+ TQTime mTime; // the widget's displayed time.
+ //TQString mNoTimeString;
};
#endif
diff --git a/libkdepim/kvcarddrag.cpp b/libkdepim/kvcarddrag.cpp
index 4a568451e..2008f7a92 100644
--- a/libkdepim/kvcarddrag.cpp
+++ b/libkdepim/kvcarddrag.cpp
@@ -25,36 +25,36 @@
static const char vcard_mime_string[] = "text/x-vcard";
-KVCardDrag::KVCardDrag( const QString &content, QWidget *dragsource,
+KVCardDrag::KVCardDrag( const TQString &content, TQWidget *dragsource,
const char *name )
- : QStoredDrag( vcard_mime_string, dragsource, name )
+ : TQStoredDrag( vcard_mime_string, dragsource, name )
{
setVCard( content );
}
-KVCardDrag::KVCardDrag( QWidget *dragsource, const char *name )
- : QStoredDrag( vcard_mime_string, dragsource, name )
+KVCardDrag::KVCardDrag( TQWidget *dragsource, const char *name )
+ : TQStoredDrag( vcard_mime_string, dragsource, name )
{
- setVCard( QString::null );
+ setVCard( TQString::null );
}
-void KVCardDrag::setVCard( const QString &content )
+void KVCardDrag::setVCard( const TQString &content )
{
setEncodedData( content.utf8() );
}
-bool KVCardDrag::canDecode( QMimeSource *e )
+bool KVCardDrag::canDecode( TQMimeSource *e )
{
return e->provides( vcard_mime_string );
}
-bool KVCardDrag::decode( QMimeSource *e, QString &content )
+bool KVCardDrag::decode( TQMimeSource *e, TQString &content )
{
- content = QString::fromUtf8( e->encodedData( vcard_mime_string ) );
+ content = TQString::fromUtf8( e->encodedData( vcard_mime_string ) );
return true;
}
-bool KVCardDrag::decode( QMimeSource *e, KABC::Addressee::List& addressees )
+bool KVCardDrag::decode( TQMimeSource *e, KABC::Addressee::List& addressees )
{
addressees = KABC::VCardConverter().parseVCards( e->encodedData( vcard_mime_string ) );
return true;
diff --git a/libkdepim/kvcarddrag.h b/libkdepim/kvcarddrag.h
index c97fd8aeb..55b3ef188 100644
--- a/libkdepim/kvcarddrag.h
+++ b/libkdepim/kvcarddrag.h
@@ -22,8 +22,8 @@
#ifndef KVCARDDRAG_H
#define KVCARDDRAG_H
-#include <qdragobject.h>
-#include <qstring.h>
+#include <tqdragobject.h>
+#include <tqstring.h>
#include <kabc/addressee.h>
#include <kdepimmacros.h>
@@ -44,33 +44,33 @@ class KDE_EXPORT KVCardDrag : public QStoredDrag
/**
* Constructs an empty vcard drag.
*/
- KVCardDrag( QWidget *dragsource = 0, const char *name = 0 );
+ KVCardDrag( TQWidget *dragsource = 0, const char *name = 0 );
/**
* Constructs a vcard drag with the @p addressee.
*/
- KVCardDrag( const QString &content, QWidget *dragsource = 0, const char *name = 0 );
+ KVCardDrag( const TQString &content, TQWidget *dragsource = 0, const char *name = 0 );
virtual ~KVCardDrag() {}
/**
* Sets the vcard of the drag to @p content.
*/
- void setVCard( const QString &content );
+ void setVCard( const TQString &content );
/**
* Returns true if the MIME source @p e contains a vcard object.
*/
- static bool canDecode( QMimeSource *e );
+ static bool canDecode( TQMimeSource *e );
/**
* Decodes the MIME source @p e and puts the resulting vcard into @p content.
*/
- static bool decode( QMimeSource *e, QString &content );
+ static bool decode( TQMimeSource *e, TQString &content );
/**
* Decodes the MIME source @p e and puts the resulting vcard into @p addresseess.
*/
- static bool decode( QMimeSource *e, KABC::Addressee::List& addressees );
+ static bool decode( TQMimeSource *e, KABC::Addressee::List& addressees );
protected:
virtual void virtual_hook( int id, void* data );
diff --git a/libkdepim/kwidgetlister.cpp b/libkdepim/kwidgetlister.cpp
index 6bee7def4..e26b05300 100644
--- a/libkdepim/kwidgetlister.cpp
+++ b/libkdepim/kwidgetlister.cpp
@@ -34,17 +34,17 @@
#include <klocale.h>
#include <kdebug.h>
-#include <qpushbutton.h>
-#include <qlayout.h>
-#include <qhbox.h>
+#include <tqpushbutton.h>
+#include <tqlayout.h>
+#include <tqhbox.h>
#include <assert.h>
#include <kguiitem.h>
#include <kpushbutton.h>
#include <kdialog.h>
-KWidgetLister::KWidgetLister( int minWidgets, int maxWidgets, QWidget *parent, const char* name )
- : QWidget( parent, name )
+KWidgetLister::KWidgetLister( int minWidgets, int maxWidgets, TQWidget *parent, const char* name )
+ : TQWidget( parent, name )
{
mWidgetList.setAutoDelete(TRUE);
@@ -52,8 +52,8 @@ KWidgetLister::KWidgetLister( int minWidgets, int maxWidgets, QWidget *parent, c
mMaxWidgets = QMAX( maxWidgets, mMinWidgets + 1 );
//--------- the button box
- mLayout = new QVBoxLayout(this, 0, 4);
- mButtonBox = new QHBox(this);
+ mLayout = new TQVBoxLayout(this, 0, 4);
+ mButtonBox = new TQHBox(this);
mButtonBox->setSpacing( KDialog::spacingHint() );
mLayout->addWidget( mButtonBox );
@@ -63,7 +63,7 @@ KWidgetLister::KWidgetLister( int minWidgets, int maxWidgets, QWidget *parent, c
mBtnFewer = new KPushButton( KGuiItem( i18n( "fewer widgets", "Fewer" ), "button_fewer" ), mButtonBox );
mButtonBox->setStretchFactor( mBtnFewer, 0 );
- QWidget *spacer = new QWidget( mButtonBox );
+ TQWidget *spacer = new TQWidget( mButtonBox );
mButtonBox->setStretchFactor( spacer, 1 );
// FIXME: We need a KStdGuiItem::clear here and in other locations to be automagically RTL aware - Martijn
@@ -71,12 +71,12 @@ KWidgetLister::KWidgetLister( int minWidgets, int maxWidgets, QWidget *parent, c
mButtonBox->setStretchFactor( mBtnClear, 0 );
//---------- connect everything
- connect( mBtnMore, SIGNAL(clicked()),
- this, SLOT(slotMore()) );
- connect( mBtnFewer, SIGNAL(clicked()),
- this, SLOT(slotFewer()) );
- connect( mBtnClear, SIGNAL(clicked()),
- this, SLOT(slotClear()) );
+ connect( mBtnMore, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotMore()) );
+ connect( mBtnFewer, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotFewer()) );
+ connect( mBtnClear, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotClear()) );
enableControls();
}
@@ -112,7 +112,7 @@ void KWidgetLister::slotClear()
setNumberOfShownWidgetsTo( mMinWidgets );
// clear remaining widgets
- QPtrListIterator<QWidget> it( mWidgetList );
+ TQPtrListIterator<TQWidget> it( mWidgetList );
for ( it.toFirst() ; it.current() ; ++it )
clearWidget( (*it) );
@@ -121,7 +121,7 @@ void KWidgetLister::slotClear()
emit clearWidgets();
}
-void KWidgetLister::addWidgetAtEnd(QWidget *w)
+void KWidgetLister::addWidgetAtEnd(TQWidget *w)
{
if (!w) w = this->createWidget(this);
@@ -142,13 +142,13 @@ void KWidgetLister::removeLastWidget()
emit widgetRemoved();
}
-void KWidgetLister::clearWidget( QWidget* /*aWidget*/ )
+void KWidgetLister::clearWidget( TQWidget* /*aWidget*/ )
{
}
-QWidget* KWidgetLister::createWidget( QWidget* parent )
+TQWidget* KWidgetLister::createWidget( TQWidget* parent )
{
- return new QWidget( parent );
+ return new TQWidget( parent );
}
void KWidgetLister::setNumberOfShownWidgetsTo( int aNum )
diff --git a/libkdepim/kwidgetlister.h b/libkdepim/kwidgetlister.h
index 86a3b68b9..472dfc8df 100644
--- a/libkdepim/kwidgetlister.h
+++ b/libkdepim/kwidgetlister.h
@@ -32,8 +32,8 @@
#ifndef _KWIDGETLISTER_H_
#define _KWIDGETLISTER_H_
-#include <qwidget.h>
-#include <qptrlist.h>
+#include <tqwidget.h>
+#include <tqptrlist.h>
#include <kdepimmacros.h>
class QPushButton;
@@ -66,7 +66,7 @@ class KDE_EXPORT KWidgetLister : public QWidget
{
Q_OBJECT
public:
- KWidgetLister( int minWidgets=1, int maxWidgets=8, QWidget* parent=0, const char* name=0 );
+ KWidgetLister( int minWidgets=1, int maxWidgets=8, TQWidget* parent=0, const char* name=0 );
virtual ~KWidgetLister();
protected slots:
@@ -99,8 +99,8 @@ protected:
when showing it on screen. Make sure you call this
implementaion, though, since you cannot put the widget on screen
from derived classes (@p mLayout is private).
- Make sure the parent of the QWidget to add is this KWidgetLister. */
- virtual void addWidgetAtEnd(QWidget *w =0);
+ Make sure the parent of the TQWidget to add is this KWidgetLister. */
+ virtual void addWidgetAtEnd(TQWidget *w =0);
/** Removes a single (always the last) widget. Doesn't care if there
are still only @ref mMinWidgets left on screen and whether it
should enable/disable any controls. It simply does what it is
@@ -111,12 +111,12 @@ protected:
virtual void removeLastWidget();
/** Called to clear a given widget. The default implementation does
nothing. */
- virtual void clearWidget( QWidget* );
+ virtual void clearWidget( TQWidget* );
/** Because QT 2.x does not support signals/slots in template
classes, we are forced to emulate this by forcing the
implementers of subclasses of KWidgetLister to reimplement this
function which replaces the "@p new @p T" call. */
- virtual QWidget* createWidget( QWidget *parent );
+ virtual TQWidget* createWidget( TQWidget *parent );
/** Sets the number of widgets on scrren to exactly @p aNum. Doesn't
check if @p aNum is inside the range @p
[mMinWidgets,mMaxWidgets]. */
@@ -124,7 +124,7 @@ protected:
/** The list of widgets. Note that this list is set to auto-delete,
meaning that widgets that are removed from the screen by either
@ref slotFewer or @ref slotClear will be destroyed! */
- QPtrList<QWidget> mWidgetList;
+ TQPtrList<TQWidget> mWidgetList;
/** The minimum number of widgets that are to stay on screen. */
int mMinWidgets;
/** The maximum number of widgets that are to be shown on screen. */
@@ -134,7 +134,7 @@ signals:
/** This signal is emitted whenever a widget was added */
void widgetAdded();
/** This signal is emitted whenever a widget was added */
- void widgetAdded(QWidget *);
+ void widgetAdded(TQWidget *);
/** This signal is emitted whenever a widget was removed */
void widgetRemoved();
/** This signal is emitted whenever the clear button is clicked */
@@ -143,9 +143,9 @@ signals:
private:
void enableControls();
- QPushButton *mBtnMore, *mBtnFewer, *mBtnClear;
- QVBoxLayout *mLayout;
- QHBox *mButtonBox;
+ TQPushButton *mBtnMore, *mBtnFewer, *mBtnClear;
+ TQVBoxLayout *mLayout;
+ TQHBox *mButtonBox;
};
diff --git a/libkdepim/kxface.cpp b/libkdepim/kxface.cpp
index 574a0aa9d..ecd24bc24 100644
--- a/libkdepim/kxface.cpp
+++ b/libkdepim/kxface.cpp
@@ -27,12 +27,12 @@
#include <kdebug.h>
-#include <qbuffer.h>
-#include <qcstring.h>
-#include <qimage.h>
-#include <qregexp.h>
-#include <qstring.h>
-#include <qpainter.h>
+#include <tqbuffer.h>
+#include <tqcstring.h>
+#include <tqimage.h>
+#include <tqregexp.h>
+#include <tqstring.h>
+#include <tqpainter.h>
#include <stdlib.h>
#include <string.h>
@@ -83,17 +83,17 @@ KXFace::~KXFace()
{
}
-QString KXFace::fromImage( const QImage &image )
+TQString KXFace::fromImage( const TQImage &image )
{
if( image.isNull() )
- return QString::null;
+ return TQString::null;
- QImage scaledImg = image.smoothScale( 48, 48 );
- QByteArray ba;
- QBuffer buffer( ba );
+ TQImage scaledImg = image.smoothScale( 48, 48 );
+ TQByteArray ba;
+ TQBuffer buffer( ba );
buffer.open( IO_WriteOnly );
scaledImg.save( &buffer, "XBM" );
- QString xbm( ba );
+ TQString xbm( ba );
xbm.remove( 0, xbm.find( "{" ) + 1 );
xbm.truncate( xbm.find( "}" ) );
xbm.remove( " " );
@@ -101,7 +101,7 @@ QString KXFace::fromImage( const QImage &image )
xbm.remove( "0x" );
xbm.remove( "\n" );
xbm.truncate( 576 );
- QCString tmp = QCString( xbm.latin1() );
+ TQCString tmp = TQCString( xbm.latin1() );
uint len = tmp.length();
for( uint i=0; i<len; ++i )
{
@@ -132,8 +132,8 @@ QString KXFace::fromImage( const QImage &image )
tmp[i-1] = t;
}
}
- tmp.replace( QRegExp( "(\\w{12})" ), "\\1\n" );
- tmp.replace( QRegExp( "(\\w{4})" ), "0x\\1," );
+ tmp.replace( TQRegExp( "(\\w{12})" ), "\\1\n" );
+ tmp.replace( TQRegExp( "(\\w{4})" ), "0x\\1," );
len = tmp.length();
char *fbuf = (char *)malloc( len + 1 );
strncpy( fbuf, (const char *)tmp, len );
@@ -144,21 +144,21 @@ QString KXFace::fromImage( const QImage &image )
GenFace();
CompAll( fbuf );
}
- QString ret( fbuf );
+ TQString ret( fbuf );
free( fbuf );
return ret;
}
-QImage KXFace::toImage(const QString &xface)
+TQImage KXFace::toImage(const TQString &xface)
{
if ( xface.length() > MAX_XFACE_LENGTH )
- return QImage();
+ return TQImage();
char *fbuf = (char *)malloc( MAX_XFACE_LENGTH );
memset( fbuf, '\0', MAX_XFACE_LENGTH );
strncpy( fbuf, xface.latin1(), xface.length() );
- QCString img;
+ TQCString img;
if ( !( status = setjmp( comp_env ) ) )
{
UnCompAll( fbuf );/* compress otherwise */
@@ -166,7 +166,7 @@ QImage KXFace::toImage(const QString &xface)
img = WriteFace();
}
free( fbuf );
- QImage p;
+ TQImage p;
p.loadFromData( img, "XBM" );
return p;
@@ -327,13 +327,13 @@ void KXFace::BigClear()
B.b_words = 0;
}
-QCString KXFace::WriteFace()
+TQCString KXFace::WriteFace()
{
register char *s;
register int i, j, bits, digits, words;
int digsperword = DIGSPERWORD;
int wordsperline = WORDSPERLINE;
- QCString t( "#define noname_width 48\n#define noname_height 48\nstatic char noname_bits[] = {\n " );
+ TQCString t( "#define noname_width 48\n#define noname_height 48\nstatic char noname_bits[] = {\n " );
j = t.length() - 1;
s = F;
diff --git a/libkdepim/kxface.h b/libkdepim/kxface.h
index bd18b88f6..51e76fd89 100644
--- a/libkdepim/kxface.h
+++ b/libkdepim/kxface.h
@@ -27,7 +27,7 @@
#define __KXFACE_H
-#include <qobject.h>
+#include <tqobject.h>
#include <setjmp.h>
#include <kdepimmacros.h>
@@ -530,12 +530,12 @@ namespace KPIM {
/**
* generates the xface string from @p image
*/
- QString fromImage(const QImage &image);
+ TQString fromImage(const TQImage &image);
/**
* creates a pixmap from @p xface
*/
- QImage toImage(const QString &xface);
+ TQImage toImage(const TQString &xface);
private:
@@ -570,7 +570,7 @@ namespace KPIM {
void BigAdd(unsigned char a);
void BigClear();
- QCString WriteFace();
+ TQCString WriteFace();
void UnCompAll(char *fbuf);
void UnCompress(register char *f, register int wid, register int hei, register int lev);
void BigWrite(register char *fbuf);
diff --git a/libkdepim/ldapclient.cpp b/libkdepim/ldapclient.cpp
index 34e8044fb..359e03568 100644
--- a/libkdepim/ldapclient.cpp
+++ b/libkdepim/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 <kabc/ldapurl.h>
#include <kabc/ldif.h>
@@ -47,13 +47,13 @@ using namespace KPIM;
KConfig *KPIM::LdapSearch::s_config = 0L;
static KStaticDeleter<KConfig> configDeleter;
-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( KABC::LDIF::assembleLine( attr, *it2, 76 ) ) + "\n";
+ result += TQString::fromUtf8( KABC::LDIF::assembleLine( attr, *it2, 76 ) ) + "\n";
}
}
@@ -62,8 +62,8 @@ QString LdapObject::toString() const
void LdapObject::clear()
{
- dn = QString::null;
- objectClass = QString::null;
+ dn = TQString::null;
+ objectClass = TQString::null;
attrs.clear();
}
@@ -76,8 +76,8 @@ void LdapObject::assign( const LdapObject& that )
}
}
-LdapClient::LdapClient( int clientNumber, QObject* parent, const char* name )
- : QObject( parent, name ), mJob( 0 ), mActive( false ), mReportObjectClass( false )
+LdapClient::LdapClient( int clientNumber, TQObject* parent, const char* name )
+ : TQObject( parent, name ), mJob( 0 ), mActive( false ), mReportObjectClass( false )
{
// d = new LdapClientPrivate;
mClientNumber = clientNumber;
@@ -90,10 +90,10 @@ LdapClient::~LdapClient()
// delete d; d = 0;
}
-void LdapClient::setAttrs( const QStringList& attrs )
+void LdapClient::setAttrs( const TQStringList& attrs )
{
mAttrs = attrs;
- for ( QStringList::Iterator it = mAttrs.begin(); it != mAttrs.end(); ++it )
+ for ( TQStringList::Iterator it = mAttrs.begin(); it != mAttrs.end(); ++it )
if( (*it).lower() == "objectclass" ){
mReportObjectClass = true;
return;
@@ -102,7 +102,7 @@ void LdapClient::setAttrs( const QStringList& attrs )
mReportObjectClass = false;
}
-void LdapClient::startQuery( const QString& filter )
+void LdapClient::startQuery( const TQString& filter )
{
cancelQuery();
KABC::LDAPUrl url;
@@ -114,7 +114,7 @@ void LdapClient::startQuery( const QString& filter )
}
url.setHost( mServer.host() );
url.setPort( mServer.port() );
- url.setExtension( "x-ver", QString::number( mServer.version() ) );
+ url.setExtension( "x-ver", TQString::number( mServer.version() ) );
url.setDn( mServer.baseDN() );
url.setDn( mServer.baseDN() );
if ( mServer.security() == LdapServer::TLS ) url.setExtension( "x-tls","" );
@@ -124,9 +124,9 @@ void LdapClient::startQuery( const QString& filter )
if ( !mServer.mech().isEmpty() ) url.setExtension( "x-mech", mServer.mech() );
}
if ( mServer.timeLimit() != 0 ) url.setExtension( "x-timelimit",
- QString::number( mServer.timeLimit() ) );
+ TQString::number( mServer.timeLimit() ) );
if ( mServer.sizeLimit() != 0 ) url.setExtension( "x-sizelimit",
- QString::number( mServer.sizeLimit() ) );
+ TQString::number( mServer.sizeLimit() ) );
url.setAttributes( mAttrs );
url.setScope( mScope == "one" ? KABC::LDAPUrl::One : KABC::LDAPUrl::Sub );
@@ -137,12 +137,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()
@@ -155,12 +155,12 @@ void LdapClient::cancelQuery()
mActive = false;
}
-void LdapClient::slotData( KIO::Job*, const QByteArray& data )
+void LdapClient::slotData( KIO::Job*, const TQByteArray& data )
{
parseLDIF( data );
}
-void LdapClient::slotInfoMessage( KIO::Job*, const QString & )
+void LdapClient::slotInfoMessage( KIO::Job*, const TQString & )
{
//qDebug("Job said \"%s\"", info.latin1());
}
@@ -170,7 +170,7 @@ 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
@@ -194,14 +194,14 @@ void LdapClient::endParseLDIF()
void LdapClient::finishCurrentObject()
{
mCurrentObject.dn = mLdif.dn();
- const QString sClass( mCurrentObject.objectClass.lower() );
+ const TQString sClass( mCurrentObject.objectClass.lower() );
if( sClass == "groupofnames" || sClass == "kolabgroupofnames" ){
LdapAttrMap::ConstIterator it = mCurrentObject.attrs.find("mail");
if( it == mCurrentObject.attrs.end() ){
// No explicit mail address found so far?
// Fine, then we use the address stored in the DN.
- QString sMail;
- QStringList lMail = QStringList::split(",dc=", mCurrentObject.dn);
+ TQString sMail;
+ TQStringList lMail = TQStringList::split(",dc=", mCurrentObject.dn);
const int n = lMail.count();
if( n ){
if( lMail.first().lower().startsWith("cn=") ){
@@ -223,9 +223,9 @@ void LdapClient::finishCurrentObject()
mCurrentObject.clear();
}
-void LdapClient::parseLDIF( const QByteArray& data )
+void LdapClient::parseLDIF( const TQByteArray& data )
{
- //kdDebug(5300) << "LdapClient::parseLDIF( " << QCString(data.data(), data.size()+1) << " )" << endl;
+ //kdDebug(5300) << "LdapClient::parseLDIF( " << TQCString(data.data(), data.size()+1) << " )" << endl;
if ( data.size() ) {
mLdif.setLDIF( data );
} else {
@@ -233,21 +233,21 @@ void LdapClient::parseLDIF( const QByteArray& data )
}
KABC::LDIF::ParseVal ret;
- QString name;
+ TQString name;
do {
ret = mLdif.nextItem();
switch ( ret ) {
case KABC::LDIF::Item:
{
name = mLdif.attr();
- // Must make a copy! QByteArray is explicitely shared
- QByteArray value = mLdif.val().copy();
+ // Must make a copy! TQByteArray is explicitely shared
+ TQByteArray value = mLdif.val().copy();
bool bIsObjectClass = name.lower() == "objectclass";
if( bIsObjectClass )
- mCurrentObject.objectClass = QString::fromUtf8( value, value.size() );
+ mCurrentObject.objectClass = TQString::fromUtf8( value, value.size() );
if( mReportObjectClass || !bIsObjectClass )
mCurrentObject.attrs[ name ].append( value );
- //kdDebug(5300) << "LdapClient::parseLDIF(): name=" << name << " value=" << QCString(value.data(), value.size()+1) << endl;
+ //kdDebug(5300) << "LdapClient::parseLDIF(): name=" << name << " value=" << TQCString(value.data(), value.size()+1) << endl;
}
break;
case KABC::LDIF::EndEntry:
@@ -276,55 +276,55 @@ void LdapClient::setCompletionWeight( int weight )
void LdapSearch::readConfig( LdapServer &server, KConfig *config, int j, bool active )
{
- QString prefix;
+ TQString prefix;
if ( active ) prefix = "Selected";
- QString host = config->readEntry( prefix + QString( "Host%1" ).arg( j ), "" ).stripWhiteSpace();
+ TQString host = config->readEntry( prefix + TQString( "Host%1" ).arg( j ), "" ).stripWhiteSpace();
if ( !host.isEmpty() )
server.setHost( host );
- int port = config->readNumEntry( prefix + QString( "Port%1" ).arg( j ), 389 );
+ int port = config->readNumEntry( prefix + TQString( "Port%1" ).arg( j ), 389 );
server.setPort( port );
- QString base = config->readEntry( prefix + QString( "Base%1" ).arg( j ), "" ).stripWhiteSpace();
+ TQString base = config->readEntry( prefix + TQString( "Base%1" ).arg( j ), "" ).stripWhiteSpace();
if ( !base.isEmpty() )
server.setBaseDN( base );
- QString user = config->readEntry( prefix + QString( "User%1" ).arg( j ) ).stripWhiteSpace();
+ TQString user = config->readEntry( prefix + TQString( "User%1" ).arg( j ) ).stripWhiteSpace();
if ( !user.isEmpty() )
server.setUser( user );
- QString bindDN = config->readEntry( prefix + QString( "Bind%1" ).arg( j ) ).stripWhiteSpace();
+ TQString bindDN = config->readEntry( prefix + TQString( "Bind%1" ).arg( j ) ).stripWhiteSpace();
if ( !bindDN.isEmpty() )
server.setBindDN( bindDN );
- QString pwdBindDN = config->readEntry( prefix + QString( "PwdBind%1" ).arg( j ) );
+ TQString pwdBindDN = config->readEntry( prefix + TQString( "PwdBind%1" ).arg( j ) );
if ( !pwdBindDN.isEmpty() )
server.setPwdBindDN( pwdBindDN );
- server.setTimeLimit( config->readNumEntry( prefix + QString( "TimeLimit%1" ).arg( j ) ) );
- server.setSizeLimit( config->readNumEntry( prefix + QString( "SizeLimit%1" ).arg( j ) ) );
- server.setVersion( config->readNumEntry( prefix + QString( "Version%1" ).arg( j ), 3 ) );
- server.setSecurity( config->readNumEntry( prefix + QString( "Security%1" ).arg( j ) ) );
- server.setAuth( config->readNumEntry( prefix + QString( "Auth%1" ).arg( j ) ) );
- server.setMech( config->readEntry( prefix + QString( "Mech%1" ).arg( j ) ) );
+ server.setTimeLimit( config->readNumEntry( prefix + TQString( "TimeLimit%1" ).arg( j ) ) );
+ server.setSizeLimit( config->readNumEntry( prefix + TQString( "SizeLimit%1" ).arg( j ) ) );
+ server.setVersion( config->readNumEntry( prefix + TQString( "Version%1" ).arg( j ), 3 ) );
+ server.setSecurity( config->readNumEntry( prefix + TQString( "Security%1" ).arg( j ) ) );
+ server.setAuth( config->readNumEntry( prefix + TQString( "Auth%1" ).arg( j ) ) );
+ server.setMech( config->readEntry( prefix + TQString( "Mech%1" ).arg( j ) ) );
}
void LdapSearch::writeConfig( const LdapServer &server, KConfig *config, int j, bool active )
{
- QString prefix;
+ TQString prefix;
if ( active ) prefix = "Selected";
- config->writeEntry( prefix + QString( "Host%1" ).arg( j ), server.host() );
- config->writeEntry( prefix + QString( "Port%1" ).arg( j ), server.port() );
- config->writeEntry( prefix + QString( "Base%1" ).arg( j ), server.baseDN() );
- config->writeEntry( prefix + QString( "User%1" ).arg( j ), server.user() );
- config->writeEntry( prefix + QString( "Bind%1" ).arg( j ), server.bindDN() );
- config->writeEntry( prefix + QString( "PwdBind%1" ).arg( j ), server.pwdBindDN() );
- config->writeEntry( prefix + QString( "TimeLimit%1" ).arg( j ), server.timeLimit() );
- config->writeEntry( prefix + QString( "SizeLimit%1" ).arg( j ), server.sizeLimit() );
- config->writeEntry( prefix + QString( "Version%1" ).arg( j ), server.version() );
- config->writeEntry( prefix + QString( "Security%1" ).arg( j ), server.security() );
- config->writeEntry( prefix + QString( "Auth%1" ).arg( j ), server.auth() );
- config->writeEntry( prefix + QString( "Mech%1" ).arg( j ), server.mech() );
+ config->writeEntry( prefix + TQString( "Host%1" ).arg( j ), server.host() );
+ config->writeEntry( prefix + TQString( "Port%1" ).arg( j ), server.port() );
+ config->writeEntry( prefix + TQString( "Base%1" ).arg( j ), server.baseDN() );
+ config->writeEntry( prefix + TQString( "User%1" ).arg( j ), server.user() );
+ config->writeEntry( prefix + TQString( "Bind%1" ).arg( j ), server.bindDN() );
+ config->writeEntry( prefix + TQString( "PwdBind%1" ).arg( j ), server.pwdBindDN() );
+ config->writeEntry( prefix + TQString( "TimeLimit%1" ).arg( j ), server.timeLimit() );
+ config->writeEntry( prefix + TQString( "SizeLimit%1" ).arg( j ), server.sizeLimit() );
+ config->writeEntry( prefix + TQString( "Version%1" ).arg( j ), server.version() );
+ config->writeEntry( prefix + TQString( "Security%1" ).arg( j ), server.security() );
+ config->writeEntry( prefix + TQString( "Auth%1" ).arg( j ), server.auth() );
+ config->writeEntry( prefix + TQString( "Mech%1" ).arg( j ), server.mech() );
}
KConfig* LdapSearch::config()
@@ -345,14 +345,14 @@ LdapSearch::LdapSearch()
}
readConfig();
- connect(KDirWatch::self(), SIGNAL(dirty (const QString&)),this,
- SLOT(slotFileChanged(const QString&)));
+ connect(KDirWatch::self(), TQT_SIGNAL(dirty (const TQString&)),this,
+ TQT_SLOT(slotFileChanged(const TQString&)));
}
void LdapSearch::readConfig()
{
cancelSearch();
- QValueList< LdapClient* >::Iterator it;
+ TQValueList< LdapClient* >::Iterator it;
for ( it = mClients.begin(); it != mClients.end(); ++it )
delete *it;
mClients.clear();
@@ -371,38 +371,38 @@ void LdapSearch::readConfig()
if ( !server.host().isEmpty() ) mNoLDAPLookup = false;
ldapClient->setServer( server );
- int completionWeight = config->readNumEntry( QString( "SelectedCompletionWeight%1" ).arg( j ), -1 );
+ int completionWeight = config->readNumEntry( TQString( "SelectedCompletionWeight%1" ).arg( j ), -1 );
if ( completionWeight != -1 )
ldapClient->setCompletionWeight( completionWeight );
- QStringList attrs;
+ TQStringList attrs;
// note: we need "objectClass" to detect distribution lists
attrs << "cn" << "mail" << "givenname" << "sn" << "objectClass";
ldapClient->setAttrs( attrs );
- connect( ldapClient, SIGNAL( result( const KPIM::LdapObject& ) ),
- this, SLOT( slotLDAPResult( const KPIM::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 KPIM::LdapObject& ) ),
+ this, TQT_SLOT( slotLDAPResult( const KPIM::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() ) );
}
mConfigFile = locateLocal( "config", "kabldaprc" );
KDirWatch::self()->addFile( mConfigFile );
}
-void LdapSearch::slotFileChanged( const QString& file )
+void LdapSearch::slotFileChanged( const TQString& file )
{
if ( file == mConfigFile )
readConfig();
}
-void LdapSearch::startSearch( const QString& txt )
+void LdapSearch::startSearch( const TQString& txt )
{
if ( mNoLDAPLookup )
return;
@@ -427,10 +427,10 @@ void LdapSearch::startSearch( const QString& txt )
* This allows both resource accounts with an email address which are not a person and
* person entries without an email address to show up, while still not showing things
* like structural entries in the ldap tree. */
- QString filter = QString( "&(|(objectclass=person)(objectclass=groupOfNames)(mail=*))(|(cn=%1*)(mail=%2*)(mail=*@%3*)(givenName=%4*)(sn=%5*))" )
+ TQString filter = TQString( "&(|(objectclass=person)(objectclass=groupOfNames)(mail=*))(|(cn=%1*)(mail=%2*)(mail=*@%3*)(givenName=%4*)(sn=%5*))" )
.arg( mSearchText ).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 );
kdDebug(5300) << "LdapSearch::startSearch() " << filter << endl;
@@ -440,7 +440,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();
@@ -455,7 +455,7 @@ void LdapSearch::slotLDAPResult( const KPIM::LdapObject& obj )
mDataTimer.start( 500, true );
}
-void LdapSearch::slotLDAPError( const QString& )
+void LdapSearch::slotLDAPError( const TQString& )
{
slotLDAPDone();
}
@@ -470,7 +470,7 @@ void LdapSearch::slotLDAPDone()
void LdapSearch::slotDataTimer()
{
- QStringList lst;
+ TQStringList lst;
LdapResultList reslist;
makeSearchData( lst, reslist );
if ( !lst.isEmpty() )
@@ -487,14 +487,14 @@ 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< KPIM::LdapObject >::ConstIterator it1;
+ TQValueList< KPIM::LdapObject >::ConstIterator it1;
for ( it1 = mResults.begin(); it1 != mResults.end(); ++it1 ) {
- QString name, mail, givenname, sn;
- QStringList mails;
+ TQString name, mail, givenname, sn;
+ TQStringList mails;
bool isDistributionList = false;
bool wasCN = false;
bool wasDC = false;
@@ -503,11 +503,11 @@ void LdapSearch::makeSearchData( QStringList& ret, LdapResultList& resList )
LdapAttrMap::ConstIterator it2;
for ( it2 = (*it1).attrs.begin(); it2 != (*it1).attrs.end(); ++it2 ) {
- QByteArray val = (*it2).first();
+ TQByteArray val = (*it2).first();
int len = val.size();
if( len > 0 && '\0' == val[len-1] )
--len;
- const QString tmp = QString::fromUtf8( val, len );
+ const TQString tmp = TQString::fromUtf8( val, len );
kdDebug(5300) << " key: \"" << it2.key() << "\" value: \"" << tmp << "\"" << endl;
if ( it2.key() == "cn" ) {
name = tmp;
@@ -536,7 +536,7 @@ void LdapSearch::makeSearchData( QStringList& ret, LdapResultList& resList )
mail = tmp;
LdapAttrValue::ConstIterator it3 = it2.data().begin();
for ( ; it3 != it2.data().end(); ++it3 ) {
- mails.append( QString::fromUtf8( (*it3).data(), (*it3).size() ) );
+ mails.append( TQString::fromUtf8( (*it3).data(), (*it3).size() ) );
}
} else if( it2.key() == "givenName" )
givenname = tmp;
@@ -576,7 +576,7 @@ void LdapSearch::makeSearchData( QStringList& ret, LdapResultList& resList )
ret.append( mail );
} else {
kdDebug(5300) << "LdapSearch::makeSearchData() name: \"" << name << "\" mail: \"" << 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/libkdepim/ldapclient.h b/libkdepim/ldapclient.h
index 5be00e85c..5167660e2 100644
--- a/libkdepim/ldapclient.h
+++ b/libkdepim/ldapclient.h
@@ -23,13 +23,13 @@
#define KPIM_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>
#include <kabc/ldif.h>
@@ -40,8 +40,8 @@
namespace KPIM {
class LdapClient;
-typedef QValueList<QByteArray> LdapAttrValue;
-typedef QMap<QString,LdapAttrValue > LdapAttrMap;
+typedef TQValueList<TQByteArray> LdapAttrValue;
+typedef TQMap<TQString,LdapAttrValue > LdapAttrMap;
class LdapServer
{
@@ -57,40 +57,40 @@ class LdapServer
enum Security{ Sec_None, TLS, SSL };
enum Auth{ Anonymous, Simple, SASL };
- QString host() const { return mHost; }
+ TQString host() const { return mHost; }
int port() const { return mPort; }
- const QString &baseDN() const { return mBaseDN; }
- const QString &user() const { return mUser; }
- const QString &bindDN() const { return mBindDN; }
- const QString &pwdBindDN() const { return mPwdBindDN; }
+ const TQString &baseDN() const { return mBaseDN; }
+ const TQString &user() const { return mUser; }
+ const TQString &bindDN() const { return mBindDN; }
+ const TQString &pwdBindDN() const { return mPwdBindDN; }
int timeLimit() const { return mTimeLimit; }
int sizeLimit() const { return mSizeLimit; }
int version() const { return mVersion; }
int security() const { return mSecurity; }
int auth() const { return mAuth; }
- const QString &mech() const { return mMech; }
+ const TQString &mech() const { return mMech; }
- void setHost( const QString &host ) { mHost = host; }
+ void setHost( const TQString &host ) { mHost = host; }
void setPort( int port ) { mPort = port; }
- void setBaseDN( const QString &baseDN ) { mBaseDN = baseDN; }
- void setUser( const QString &user ) { mUser = user; }
- void setBindDN( const QString &bindDN ) { mBindDN = bindDN; }
- void setPwdBindDN( const QString &pwdBindDN ) { mPwdBindDN = pwdBindDN; }
+ void setBaseDN( const TQString &baseDN ) { mBaseDN = baseDN; }
+ void setUser( const TQString &user ) { mUser = user; }
+ void setBindDN( const TQString &bindDN ) { mBindDN = bindDN; }
+ void setPwdBindDN( const TQString &pwdBindDN ) { mPwdBindDN = pwdBindDN; }
void setTimeLimit( int timelimit ) { mTimeLimit = timelimit; }
void setSizeLimit( int sizelimit ) { mSizeLimit = sizelimit; }
void setVersion( int version ) { mVersion = version; }
void setSecurity( int security ) { mSecurity = security; } //0-No, 1-TLS, 2-SSL - KDE4: add an enum to Lda
void setAuth( int auth ) { mAuth = auth; } //0-Anonymous, 1-simple, 2-SASL - KDE4: add an enum to LdapCon
- void setMech( const QString &mech ) { mMech = mech; }
+ void setMech( const TQString &mech ) { mMech = mech; }
private:
- QString mHost;
+ TQString mHost;
int mPort;
- QString mBaseDN;
- QString mUser;
- QString mBindDN;
- QString mPwdBindDN;
- QString mMech;
+ TQString mBaseDN;
+ TQString mUser;
+ TQString mBindDN;
+ TQString mPwdBindDN;
+ TQString mMech;
int mTimeLimit, mSizeLimit, mVersion, mSecurity, mAuth;
};
@@ -106,8 +106,8 @@ class 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 )
@@ -116,12 +116,12 @@ class LdapObject
return *this;
}
- QString toString() const;
+ TQString toString() const;
void clear();
- QString dn;
- QString objectClass;
+ TQString dn;
+ TQString objectClass;
LdapAttrMap attrs;
LdapClient* client;
@@ -144,7 +144,7 @@ class KDE_EXPORT LdapClient : public QObject
Q_OBJECT
public:
- LdapClient( int clientNumber, QObject* parent = 0, const char* name = 0 );
+ LdapClient( int clientNumber, TQObject* parent = 0, const char* name = 0 );
virtual ~LdapClient();
/*! returns true if there is a query running */
@@ -160,14 +160,14 @@ class KDE_EXPORT LdapClient : public QObject
* returned, or an empty list if
* all attributes are wanted
*/
- QStringList attrs() const { return mAttrs; }
+ TQStringList attrs() const { return mAttrs; }
signals:
/*! Emitted when the query is done */
void done();
/*! Emitted in case of error */
- void error( const QString& );
+ void error( const TQString& );
/*! Emitted once for each object returned
* from the query
@@ -179,14 +179,14 @@ class KDE_EXPORT LdapClient : public QObject
* returned, or an empty list if
* all attributes are wanted
*/
- void setAttrs( const QStringList& attrs );
+ void setAttrs( const TQStringList& attrs );
- 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
@@ -194,21 +194,21 @@ class KDE_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();
void finishCurrentObject();
LdapServer mServer;
- QString mScope;
- QStringList mAttrs;
+ TQString mScope;
+ TQStringList mAttrs;
- QGuardedPtr<KIO::SimpleJob> mJob;
+ TQGuardedPtr<KIO::SimpleJob> mJob;
bool mActive;
bool mReportObjectClass;
@@ -227,12 +227,12 @@ class KDE_EXPORT LdapClient : public QObject
* Structure describing one result returned by a LDAP query
*/
struct LdapResult {
- QString name; ///< full name
- QStringList email; ///< emails
+ TQString name; ///< full name
+ TQStringList email; ///< emails
int clientNumber; ///< for sorting in a ldap-only lookup
int completionWeight; ///< for sorting in a completion list
};
-typedef QValueList<LdapResult> LdapResultList;
+typedef TQValueList<LdapResult> LdapResultList;
/**
@@ -253,16 +253,16 @@ class KDE_EXPORT LdapSearch : public QObject
static void readConfig( LdapServer &server, KConfig *config, int num, bool active );
static void writeConfig( const LdapServer &server, KConfig *config, int j, bool active );
- void startSearch( const QString& txt );
+ void startSearch( const TQString& txt );
void cancelSearch();
bool isAvailable() const;
- QValueList< LdapClient* > clients() const { return mClients; }
+ TQValueList< LdapClient* > clients() const { return mClients; }
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 KPIM::LdapResultList& );
@@ -270,22 +270,22 @@ class KDE_EXPORT LdapSearch : public QObject
private slots:
void slotLDAPResult( const KPIM::LdapObject& );
- void slotLDAPError( const QString& );
+ void slotLDAPError( const TQString& );
void slotLDAPDone();
void slotDataTimer();
- void slotFileChanged( const QString& );
+ void slotFileChanged( const TQString& );
private:
void readConfig();
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;
- QString mConfigFile;
+ TQValueList< LdapObject > mResults;
+ TQString mConfigFile;
private:
static KConfig *s_config;
diff --git a/libkdepim/ldapsearchdialog.cpp b/libkdepim/ldapsearchdialog.cpp
index 57abef23c..72011966a 100644
--- a/libkdepim/ldapsearchdialog.cpp
+++ b/libkdepim/ldapsearchdialog.cpp
@@ -21,13 +21,13 @@
#include "ldapsearchdialog.h"
#include "ldapclient.h"
-#include <qcheckbox.h>
-#include <qgroupbox.h>
-#include <qheader.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qlistview.h>
-#include <qpushbutton.h>
+#include <tqcheckbox.h>
+#include <tqgroupbox.h>
+#include <tqheader.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqlistview.h>
+#include <tqpushbutton.h>
#include <kabc/addresslineedit.h>
#include <kapplication.h>
@@ -39,23 +39,23 @@
using namespace KPIM;
-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 KPIM::LdapAttrValue& lst, const QString& sep )
+static TQString join( const KPIM::LdapAttrValue& lst, const TQString& sep )
{
- QString res;
+ TQString res;
bool alredy = false;
for ( KPIM::LdapAttrValue::ConstIterator it = lst.begin(); it != lst.end(); ++it ) {
if ( alredy )
@@ -66,9 +66,9 @@ static QString join( const KPIM::LdapAttrValue& lst, const QString& sep )
return res;
}
-static QMap<QString, QString>& adrbookattr2ldap()
+static TQMap<TQString, TQString>& adrbookattr2ldap()
{
- static QMap<QString, QString> keys;
+ static TQMap<TQString, TQString> keys;
if ( keys.isEmpty() ) {
keys[ i18n( "Title" ) ] = "title";
@@ -97,46 +97,46 @@ static QMap<QString, QString>& adrbookattr2ldap()
class ContactListItem : public QListViewItem
{
public:
- ContactListItem( QListView* parent, const KPIM::LdapAttrMap& attrs )
- : QListViewItem( parent ), mAttrs( attrs )
+ ContactListItem( TQListView* parent, const KPIM::LdapAttrMap& attrs )
+ : TQListViewItem( parent ), mAttrs( attrs )
{ }
KPIM::LdapAttrMap mAttrs;
- virtual QString text( int col ) const
+ virtual TQString text( int col ) const
{
// Look up a suitable attribute for column col
- const QString colName = listView()->columnText( col );
- const QString ldapAttrName = adrbookattr2ldap()[ colName ];
+ const TQString colName = listView()->columnText( col );
+ const TQString ldapAttrName = adrbookattr2ldap()[ colName ];
return join( mAttrs[ ldapAttrName ], ", " );
}
};
-LDAPSearchDialog::LDAPSearchDialog( QWidget* parent, const char* name )
+LDAPSearchDialog::LDAPSearchDialog( TQWidget* parent, const char* name )
: KDialogBase( Plain, i18n( "Search for Addresses in Directory" ), Help | User1 |
User2 | User3 | Cancel, Default, parent, name, false, true )
{
setButtonCancel( KStdGuiItem::close() );
- QFrame *page = plainPage();
- QVBoxLayout *topLayout = new QVBoxLayout( page, marginHint(), spacingHint() );
+ TQFrame *page = plainPage();
+ TQVBoxLayout *topLayout = new TQVBoxLayout( page, marginHint(), spacingHint() );
- QGroupBox *groupBox = new QGroupBox( i18n( "Search for Addresses in Directory" ),
+ TQGroupBox *groupBox = new TQGroupBox( i18n( "Search for Addresses in Directory" ),
page );
- groupBox->setFrameShape( QGroupBox::Box );
- groupBox->setFrameShadow( QGroupBox::Sunken );
+ groupBox->setFrameShape( TQGroupBox::Box );
+ groupBox->setFrameShadow( TQGroupBox::Sunken );
groupBox->setColumnLayout( 0, Qt::Vertical );
- QGridLayout *boxLayout = new QGridLayout( groupBox->layout(), 2,
+ TQGridLayout *boxLayout = new TQGridLayout( groupBox->layout(), 2,
5, spacingHint() );
boxLayout->setColStretch( 1, 1 );
- QLabel *label = new QLabel( i18n( "Search for:" ), groupBox );
+ TQLabel *label = new TQLabel( i18n( "Search for:" ), groupBox );
boxLayout->addWidget( label, 0, 0 );
mSearchEdit = new KLineEdit( groupBox );
boxLayout->addWidget( mSearchEdit, 0, 1 );
label->setBuddy( mSearchEdit );
- label = new QLabel( i18n( "in" ), groupBox );
+ label = new TQLabel( i18n( "in" ), groupBox );
boxLayout->addWidget( label, 0, 2 );
mFilterCombo = new KComboBox( groupBox );
@@ -146,8 +146,8 @@ LDAPSearchDialog::LDAPSearchDialog( QWidget* parent, const char* name )
mFilterCombo->insertItem( i18n( "Work Number" ) );
boxLayout->addWidget( mFilterCombo, 0, 3 );
- QSize buttonSize;
- mSearchButton = new QPushButton( i18n( "Stop" ), groupBox );
+ TQSize buttonSize;
+ mSearchButton = new TQPushButton( i18n( "Stop" ), groupBox );
buttonSize = mSearchButton->sizeHint();
mSearchButton->setText( i18n( "Search" ) );
if ( buttonSize.width() < mSearchButton->sizeHint().width() )
@@ -157,7 +157,7 @@ LDAPSearchDialog::LDAPSearchDialog( QWidget* parent, const char* name )
mSearchButton->setDefault( true );
boxLayout->addWidget( mSearchButton, 0, 4 );
- mRecursiveCheckbox = new QCheckBox( i18n( "Recursive search" ), groupBox );
+ mRecursiveCheckbox = new TQCheckBox( i18n( "Recursive search" ), groupBox );
mRecursiveCheckbox->setChecked( true );
boxLayout->addMultiCellWidget( mRecursiveCheckbox, 1, 1, 0, 4 );
@@ -168,13 +168,13 @@ LDAPSearchDialog::LDAPSearchDialog( QWidget* parent, const char* name )
topLayout->addWidget( groupBox );
- mResultListView = new QListView( page );
- mResultListView->setSelectionMode( QListView::Multi );
+ mResultListView = new TQListView( page );
+ mResultListView->setSelectionMode( TQListView::Multi );
mResultListView->setAllColumnsShowFocus( true );
mResultListView->setShowSortIndicator( true );
topLayout->addWidget( mResultListView );
- resize( QSize( 600, 400).expandedTo( minimumSizeHint() ) );
+ resize( TQSize( 600, 400).expandedTo( minimumSizeHint() ) );
setButtonText( User1, i18n( "Unselect All" ) );
setButtonText( User2, i18n( "Select All" ) );
@@ -183,10 +183,10 @@ LDAPSearchDialog::LDAPSearchDialog( QWidget* parent, const char* name )
mNumHosts = 0;
mIsOK = false;
- connect( mRecursiveCheckbox, SIGNAL( toggled( bool ) ),
- this, SLOT( slotSetScope( bool ) ) );
- connect( mSearchButton, SIGNAL( clicked() ),
- this, SLOT( slotStartSearch() ) );
+ connect( mRecursiveCheckbox, TQT_SIGNAL( toggled( bool ) ),
+ this, TQT_SLOT( slotSetScope( bool ) ) );
+ connect( mSearchButton, TQT_SIGNAL( clicked() ),
+ this, TQT_SLOT( slotStartSearch() ) );
setTabOrder(mSearchEdit, mFilterCombo);
setTabOrder(mFilterCombo, mSearchButton);
@@ -226,42 +226,42 @@ void LDAPSearchDialog::restoreSettings()
for ( int j = 0; j < mNumHosts; ++j ) {
KPIM::LdapServer ldapServer;
- QString host = config->readEntry( QString( "SelectedHost%1" ).arg( j ), "" );
+ TQString host = config->readEntry( TQString( "SelectedHost%1" ).arg( j ), "" );
if ( !host.isEmpty() )
ldapServer.setHost( host );
- int port = config->readUnsignedNumEntry( QString( "SelectedPort%1" ).arg( j ) );
+ int port = config->readUnsignedNumEntry( TQString( "SelectedPort%1" ).arg( j ) );
if ( port )
ldapServer.setPort( port );
- QString base = config->readEntry( QString( "SelectedBase%1" ).arg( j ), "" );
+ TQString base = config->readEntry( TQString( "SelectedBase%1" ).arg( j ), "" );
if ( !base.isEmpty() )
ldapServer.setBaseDN( base );
- QString bindDN = config->readEntry( QString( "SelectedBind%1" ).arg( j ), "" );
+ TQString bindDN = config->readEntry( TQString( "SelectedBind%1" ).arg( j ), "" );
if ( !bindDN.isEmpty() )
ldapServer.setBindDN( bindDN );
- QString pwdBindDN = config->readEntry( QString( "SelectedPwdBind%1" ).arg( j ), "" );
+ TQString pwdBindDN = config->readEntry( TQString( "SelectedPwdBind%1" ).arg( j ), "" );
if ( !pwdBindDN.isEmpty() )
ldapServer.setPwdBindDN( pwdBindDN );
KPIM::LdapClient* ldapClient = new KPIM::LdapClient( 0, this, "ldapclient" );
ldapClient->setServer( ldapServer );
- QStringList attrs;
+ TQStringList attrs;
- for ( QMap<QString,QString>::Iterator it = adrbookattr2ldap().begin(); it != adrbookattr2ldap().end(); ++it )
+ for ( TQMap<TQString,TQString>::Iterator it = adrbookattr2ldap().begin(); it != adrbookattr2ldap().end(); ++it )
attrs << *it;
ldapClient->setAttrs( attrs );
- connect( ldapClient, SIGNAL( result( const KPIM::LdapObject& ) ),
- this, SLOT( slotAddResult( const KPIM::LdapObject& ) ) );
- connect( ldapClient, SIGNAL( done() ),
- this, SLOT( slotSearchDone() ) );
- connect( ldapClient, SIGNAL( error( const QString& ) ),
- this, SLOT( slotError( const QString& ) ) );
+ connect( ldapClient, TQT_SIGNAL( result( const KPIM::LdapObject& ) ),
+ this, TQT_SLOT( slotAddResult( const KPIM::LdapObject& ) ) );
+ connect( ldapClient, TQT_SIGNAL( done() ),
+ this, TQT_SLOT( slotSearchDone() ) );
+ connect( ldapClient, TQT_SIGNAL( error( const TQString& ) ),
+ this, TQT_SLOT( slotError( const TQString& ) ) );
mLdapClientList.append( ldapClient );
}
@@ -324,7 +324,7 @@ void LDAPSearchDialog::slotSetScope( bool rec )
}
}
-QString LDAPSearchDialog::makeFilter( const QString& query, const QString& attr,
+TQString LDAPSearchDialog::makeFilter( const TQString& query, const TQString& attr,
bool startsWith )
{
/* The reasoning behind this filter is:
@@ -333,7 +333,7 @@ QString LDAPSearchDialog::makeFilter( const QString& query, const QString& attr,
* This allows both resource accounts with an email address which are not a person and
* person entries without an email address to show up, while still not showing things
* like structural entries in the ldap tree. */
- QString result( "&(|(objectclass=person)(objectclass=groupofnames)(mail=*))(" );
+ TQString result( "&(|(objectclass=person)(objectclass=groupofnames)(mail=*))(" );
if( query.isEmpty() )
// Return a filter that matches everything
return result + "|(cn=*)(sn=*)" + ")";
@@ -351,7 +351,7 @@ QString LDAPSearchDialog::makeFilter( const QString& query, const QString& attr,
result = result.arg( "telephoneNumber" ).arg( query );
} else {
// Error?
- result = QString::null;
+ result = TQString::null;
return result;
}
}
@@ -363,17 +363,17 @@ void LDAPSearchDialog::slotStartSearch()
{
cancelQuery();
- QApplication::setOverrideCursor( Qt::waitCursor );
+ TQApplication::setOverrideCursor( Qt::waitCursor );
mSearchButton->setText( i18n( "Stop" ) );
- disconnect( mSearchButton, SIGNAL( clicked() ),
- this, SLOT( slotStartSearch() ) );
- connect( mSearchButton, SIGNAL( clicked() ),
- this, SLOT( slotStopSearch() ) );
+ disconnect( mSearchButton, TQT_SIGNAL( clicked() ),
+ this, TQT_SLOT( slotStartSearch() ) );
+ connect( mSearchButton, TQT_SIGNAL( clicked() ),
+ this, TQT_SLOT( slotStopSearch() ) );
bool startsWith = (mSearchType->currentItem() == 1);
- QString filter = makeFilter( mSearchEdit->text().stripWhiteSpace(), mFilterCombo->currentText(), startsWith );
+ TQString filter = makeFilter( mSearchEdit->text().stripWhiteSpace(), mFilterCombo->currentText(), startsWith );
// loop in the list and run the KPIM::LdapClients
mResultListView->clear();
@@ -398,22 +398,22 @@ void LDAPSearchDialog::slotSearchDone()
return;
}
- disconnect( mSearchButton, SIGNAL( clicked() ),
- this, SLOT( slotStopSearch() ) );
- connect( mSearchButton, SIGNAL( clicked() ),
- this, SLOT( slotStartSearch() ) );
+ disconnect( mSearchButton, TQT_SIGNAL( clicked() ),
+ this, TQT_SLOT( slotStopSearch() ) );
+ connect( mSearchButton, TQT_SIGNAL( clicked() ),
+ this, TQT_SLOT( slotStartSearch() ) );
mSearchButton->setText( i18n( "Search" ) );
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
}
-void LDAPSearchDialog::slotError( const QString& error )
+void LDAPSearchDialog::slotError( const TQString& error )
{
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
KMessageBox::error( this, error );
}
-void LDAPSearchDialog::closeEvent( QCloseEvent* e )
+void LDAPSearchDialog::closeEvent( TQCloseEvent* e )
{
slotStopSearch();
e->accept();
@@ -423,15 +423,15 @@ void LDAPSearchDialog::closeEvent( QCloseEvent* e )
* Returns a ", " separated list of email addresses that were
* checked by the user
*/
-QString LDAPSearchDialog::selectedEMails() const
+TQString LDAPSearchDialog::selectedEMails() const
{
- QStringList result;
+ TQStringList result;
ContactListItem* cli = static_cast<ContactListItem*>( mResultListView->firstChild() );
while ( cli ) {
if ( cli->isSelected() ) {
- QString email = asUtf8( cli->mAttrs[ "mail" ].first() ).stripWhiteSpace();
+ TQString email = asUtf8( cli->mAttrs[ "mail" ].first() ).stripWhiteSpace();
if ( !email.isEmpty() ) {
- QString name = asUtf8( cli->mAttrs[ "cn" ].first() ).stripWhiteSpace();
+ TQString name = asUtf8( cli->mAttrs[ "cn" ].first() ).stripWhiteSpace();
if ( name.isEmpty() ) {
result << email;
} else {
diff --git a/libkdepim/ldapsearchdialog.h b/libkdepim/ldapsearchdialog.h
index e97385bb0..fc6a6c8e4 100644
--- a/libkdepim/ldapsearchdialog.h
+++ b/libkdepim/ldapsearchdialog.h
@@ -21,7 +21,7 @@
#ifndef LDAPSEARCHDIALOG_H
#define LDAPSEARCHDIALOG_H
-#include <qptrlist.h>
+#include <tqptrlist.h>
#include <ldapclient.h>
#include <kdialogbase.h>
@@ -40,15 +40,15 @@ class LDAPSearchDialog : public KDialogBase
Q_OBJECT
public:
- LDAPSearchDialog( QWidget* parent, const char* name = 0 );
+ LDAPSearchDialog( TQWidget* parent, const char* name = 0 );
~LDAPSearchDialog();
bool isOK() const { return mIsOK; }
void restoreSettings();
- void setSearchText( const QString &text ) { mSearchEdit->setText( text ); }
- QString selectedEMails() const;
+ void setSearchText( const TQString &text ) { mSearchEdit->setText( text ); }
+ TQString selectedEMails() const;
signals:
void addresseesAdded();
@@ -58,7 +58,7 @@ class LDAPSearchDialog : public KDialogBase
void slotStartSearch();
void slotStopSearch();
void slotSearchDone();
- void slotError( const QString& );
+ void slotError( const TQString& );
virtual void slotHelp();
virtual void slotUser1();
virtual void slotUser2();
@@ -66,25 +66,25 @@ class LDAPSearchDialog : public KDialogBase
protected:
- virtual void closeEvent( QCloseEvent* );
+ virtual void closeEvent( TQCloseEvent* );
private:
void saveSettings();
- QString makeFilter( const QString& query, const QString& attr, bool startsWith );
+ TQString makeFilter( const TQString& query, const TQString& attr, bool startsWith );
void cancelQuery();
int mNumHosts;
- QPtrList<KPIM::LdapClient> mLdapClientList;
+ TQPtrList<KPIM::LdapClient> mLdapClientList;
bool mIsOK;
KComboBox* mFilterCombo;
KComboBox* mSearchType;
KLineEdit* mSearchEdit;
- QCheckBox* mRecursiveCheckbox;
- QListView* mResultListView;
- QPushButton* mSearchButton;
+ TQCheckBox* mRecursiveCheckbox;
+ TQListView* mResultListView;
+ TQPushButton* mSearchButton;
};
diff --git a/libkdepim/linklocator.cpp b/libkdepim/linklocator.cpp
index 6058392a0..0ea0fa680 100644
--- a/libkdepim/linklocator.cpp
+++ b/libkdepim/linklocator.cpp
@@ -28,19 +28,19 @@
#include <kmdcodec.h>
#include <kdebug.h>
-#include <qstylesheet.h>
-#include <qfile.h>
-#include <qregexp.h>
+#include <tqstylesheet.h>
+#include <tqfile.h>
+#include <tqregexp.h>
#include <limits.h>
-QMap<QString, QString> *LinkLocator::s_smileyEmoticonNameMap = 0;
-QMap<QString, QString> *LinkLocator::s_smileyEmoticonHTMLCache = 0;
+TQMap<TQString, TQString> *LinkLocator::s_smileyEmoticonNameMap = 0;
+TQMap<TQString, TQString> *LinkLocator::s_smileyEmoticonHTMLCache = 0;
-static KStaticDeleter< QMap<QString, QString> > smileyMapDeleter;
-static KStaticDeleter< QMap<QString, QString> > smileyCacheDeleter;
+static KStaticDeleter< TQMap<TQString, TQString> > smileyMapDeleter;
+static KStaticDeleter< TQMap<TQString, TQString> > smileyCacheDeleter;
-LinkLocator::LinkLocator(const QString& text, int pos)
+LinkLocator::LinkLocator(const TQString& text, int pos)
: mText(text), mPos(pos), mMaxUrlLen(4096), mMaxAddressLen(255)
{
// If you change either of the above values for maxUrlLen or
@@ -51,9 +51,9 @@ LinkLocator::LinkLocator(const QString& text, int pos)
if ( !s_smileyEmoticonNameMap ) {
smileyMapDeleter.setObject( s_smileyEmoticonNameMap,
- new QMap<QString, QString>() );
+ new TQMap<TQString, TQString>() );
for ( int i = 0; i < EmotIcons::EnumSindex::COUNT; ++i ) {
- QString imageName( EmotIcons::EnumSindex::enumToString[i] );
+ TQString imageName( EmotIcons::EnumSindex::enumToString[i] );
imageName.truncate( imageName.length() - 2 ); //remove the _0 bit
s_smileyEmoticonNameMap->insert( EmotIcons::smiley(i), imageName );
}
@@ -61,7 +61,7 @@ LinkLocator::LinkLocator(const QString& text, int pos)
if ( !s_smileyEmoticonHTMLCache )
smileyCacheDeleter.setObject( s_smileyEmoticonHTMLCache,
- new QMap<QString, QString>() );
+ new TQMap<TQString, TQString>() );
}
void LinkLocator::setMaxUrlLen(int length)
@@ -84,20 +84,20 @@ int LinkLocator::maxAddressLen() const
return mMaxAddressLen;
}
-QString LinkLocator::getUrl()
+TQString LinkLocator::getUrl()
{
- QString url;
+ TQString url;
if(atUrl())
{
// handle cases like this: <link>http://foobar.org/</link>
int start = mPos;
while(mPos < (int)mText.length() && mText[mPos] > ' ' && mText[mPos] != '"' &&
- QString("<>()[]").find(mText[mPos]) == -1)
+ TQString("<>()[]").find(mText[mPos]) == -1)
{
++mPos;
}
/* some URLs really end with: # / & - _ */
- const QString allowedSpecialChars = QString("#/&-_");
+ const TQString allowedSpecialChars = TQString("#/&-_");
while(mPos > start && mText[mPos-1].isPunct() &&
allowedSpecialChars.find(mText[mPos-1]) == -1 )
{
@@ -123,7 +123,7 @@ bool LinkLocator::atUrl() const
{
// the following characters are allowed in a dot-atom (RFC 2822):
// a-z A-Z 0-9 . ! # $ % & ' * + - / = ? ^ _ ` { | } ~
- const QString allowedSpecialChars = QString(".!#$%&'*+-/=?^_`{|}~");
+ const TQString allowedSpecialChars = TQString(".!#$%&'*+-/=?^_`{|}~");
// the character directly before the URL must not be a letter, a number or
// any other character allowed in a dot-atom (RFC 2822).
@@ -131,7 +131,7 @@ bool LinkLocator::atUrl() const
( allowedSpecialChars.find( mText[mPos-1] ) != -1 ) ) )
return false;
- QChar ch = mText[mPos];
+ TQChar ch = mText[mPos];
return (ch=='h' && ( mText.mid(mPos, 7) == "http://" ||
mText.mid(mPos, 8) == "https://") ) ||
(ch=='v' && mText.mid(mPos, 6) == "vnc://") ||
@@ -147,7 +147,7 @@ bool LinkLocator::atUrl() const
// note: no "file:" for security reasons
}
-bool LinkLocator::isEmptyUrl(const QString& url)
+bool LinkLocator::isEmptyUrl(const TQString& url)
{
return url.isEmpty() ||
url == "http://" ||
@@ -165,14 +165,14 @@ bool LinkLocator::isEmptyUrl(const QString& url)
url == "news://";
}
-QString LinkLocator::getEmailAddress()
+TQString LinkLocator::getEmailAddress()
{
- QString address;
+ TQString address;
if ( mText[mPos] == '@' ) {
// the following characters are allowed in a dot-atom (RFC 2822):
// a-z A-Z 0-9 . ! # $ % & ' * + - / = ? ^ _ ` { | } ~
- const QString allowedSpecialChars = QString(".!#$%&'*+-/=?^_`{|}~");
+ const TQString allowedSpecialChars = TQString(".!#$%&'*+-/=?^_`{|}~");
// determine the local part of the email address
int start = mPos - 1;
@@ -181,7 +181,7 @@ QString LinkLocator::getEmailAddress()
mText[start] == '@' || // allow @ to find invalid email addresses
allowedSpecialChars.find( mText[start] ) != -1 ) ) {
if ( mText[start] == '@' )
- return QString(); // local part contains '@' -> no email address
+ return TQString(); // local part contains '@' -> no email address
--start;
}
++start;
@@ -189,7 +189,7 @@ QString LinkLocator::getEmailAddress()
while ( ( start < mPos ) && !mText[start].isLetterOrNumber() )
++start;
if ( start == mPos )
- return QString(); // local part is empty -> no email address
+ return TQString(); // local part is empty -> no email address
// determine the domain part of the email address
int dotPos = INT_MAX;
@@ -200,7 +200,7 @@ QString LinkLocator::getEmailAddress()
mText[end] == '.' ||
mText[end] == '-' ) ) {
if ( mText[end] == '@' )
- return QString(); // domain part contains '@' -> no email address
+ return TQString(); // domain part contains '@' -> no email address
if ( mText[end] == '.' )
dotPos = QMIN( dotPos, end ); // remember index of first dot in domain
++end;
@@ -209,12 +209,12 @@ QString LinkLocator::getEmailAddress()
while ( ( end > mPos ) && !mText[end - 1].isLetterOrNumber() )
--end;
if ( end == mPos )
- return QString(); // domain part is empty -> no email address
+ return TQString(); // domain part is empty -> no email address
if ( dotPos >= end )
- return QString(); // domain part doesn't contain a dot
+ return TQString(); // domain part doesn't contain a dot
if ( end - start > maxAddressLen() )
- return QString(); // too long -> most likely no email address
+ return TQString(); // too long -> most likely no email address
address = mText.mid( start, end - start );
mPos = end - 1;
@@ -222,19 +222,19 @@ QString LinkLocator::getEmailAddress()
return address;
}
-QString LinkLocator::convertToHtml(const QString& plainText, int flags,
+TQString LinkLocator::convertToHtml(const TQString& plainText, int flags,
int maxUrlLen, int maxAddressLen)
{
LinkLocator locator(plainText);
locator.setMaxUrlLen(maxUrlLen);
locator.setMaxAddressLen(maxAddressLen);
- QString str;
- QString result((QChar*)0, (int)locator.mText.length() * 2);
- QChar ch;
+ TQString str;
+ TQString result((TQChar*)0, (int)locator.mText.length() * 2);
+ TQChar ch;
int x;
bool startOfLine = true;
- QString emoticon;
+ TQString emoticon;
for (locator.mPos = 0, x = 0; locator.mPos < (int)locator.mText.length(); locator.mPos++, x++)
{
@@ -297,7 +297,7 @@ QString LinkLocator::convertToHtml(const QString& plainText, int flags,
str = locator.getUrl();
if (!str.isEmpty())
{
- QString hyperlink;
+ TQString hyperlink;
if(str.left(4) == "www.")
hyperlink = "http://" + str;
else if(str.left(4) == "ftp.")
@@ -315,7 +315,7 @@ QString LinkLocator::convertToHtml(const QString& plainText, int flags,
{
// len is the length of the local part
int len = str.find('@');
- QString localPart = str.left(len);
+ TQString localPart = str.left(len);
// remove the local part from the result (as '&'s have been expanded to
// &amp; we have to take care of the 4 additional characters per '&')
@@ -350,32 +350,32 @@ QString LinkLocator::convertToHtml(const QString& plainText, int flags,
return result;
}
-QString LinkLocator::pngToDataUrl( const QString & iconPath )
+TQString LinkLocator::pngToDataUrl( const TQString & iconPath )
{
if ( iconPath.isEmpty() )
- return QString::null;
+ return TQString::null;
- QFile pngFile( iconPath );
+ TQFile pngFile( iconPath );
if ( !pngFile.open( IO_ReadOnly | IO_Raw ) )
- return QString::null;
+ return TQString::null;
- QByteArray ba = pngFile.readAll();
+ TQByteArray ba = pngFile.readAll();
pngFile.close();
- return QString::fromLatin1("data:image/png;base64,%1")
+ return TQString::fromLatin1("data:image/png;base64,%1")
.arg( KCodecs::base64Encode( ba ) );
}
-QString LinkLocator::getEmoticon()
+TQString LinkLocator::getEmoticon()
{
// smileys have to be prepended by whitespace
if ( ( mPos > 0 ) && !mText[mPos-1].isSpace() )
- return QString::null;
+ return TQString::null;
// since smileys start with ':', ';', '(' or '8' short circuit method
- const QChar ch = mText[mPos];
+ const TQChar ch = mText[mPos];
if ( ch !=':' && ch != ';' && ch != '(' && ch != '8' )
- return QString::null;
+ return TQString::null;
// find the end of the smiley (a smiley is at most 4 chars long and ends at
// lineend or whitespace)
@@ -387,44 +387,44 @@ QString LinkLocator::getEmoticon()
!mText[mPos+smileyLen].isSpace() )
smileyLen++;
if ( smileyLen < MinSmileyLen || smileyLen > MaxSmileyLen )
- return QString::null;
+ return TQString::null;
- const QString smiley = mText.mid( mPos, smileyLen );
+ const TQString smiley = mText.mid( mPos, smileyLen );
if ( !s_smileyEmoticonNameMap->contains( smiley ) )
- return QString::null; // that's not a (known) smiley
+ return TQString::null; // that's not a (known) smiley
- QString htmlRep;
+ TQString htmlRep;
if ( s_smileyEmoticonHTMLCache->contains( smiley ) ) {
htmlRep = (*s_smileyEmoticonHTMLCache)[smiley];
}
else {
- const QString imageName = (*s_smileyEmoticonNameMap)[smiley];
+ const TQString imageName = (*s_smileyEmoticonNameMap)[smiley];
#if KDE_IS_VERSION( 3, 3, 91 )
- const QString iconPath = locate( "emoticons",
+ const TQString iconPath = locate( "emoticons",
EmotIcons::theme() +
- QString::fromLatin1( "/" ) +
- imageName + QString::fromLatin1(".png") );
+ TQString::fromLatin1( "/" ) +
+ imageName + TQString::fromLatin1(".png") );
#else
- const QString iconPath = locate( "data",
- QString::fromLatin1( "kopete/pics/emoticons/" )+
+ const TQString iconPath = locate( "data",
+ TQString::fromLatin1( "kopete/pics/emoticons/" )+
EmotIcons::theme() +
- QString::fromLatin1( "/" ) +
- imageName + QString::fromLatin1(".png") );
+ TQString::fromLatin1( "/" ) +
+ imageName + TQString::fromLatin1(".png") );
#endif
- const QString dataUrl = pngToDataUrl( iconPath );
+ const TQString dataUrl = pngToDataUrl( iconPath );
if ( dataUrl.isEmpty() ) {
- htmlRep = QString::null;
+ htmlRep = TQString::null;
}
else {
// create an image tag (the text in attribute alt is used
// for copy & paste) representing the smiley
- htmlRep = QString("<img class=\"pimsmileyimg\" src=\"%1\" "
+ htmlRep = TQString("<img class=\"pimsmileyimg\" src=\"%1\" "
"alt=\"%2\" title=\"%3\" width=\"16\" height=\"16\"/>")
.arg( dataUrl,
- QStyleSheet::escape( smiley ),
- QStyleSheet::escape( smiley ) );
+ TQStyleSheet::escape( smiley ),
+ TQStyleSheet::escape( smiley ) );
}
s_smileyEmoticonHTMLCache->insert( smiley, htmlRep );
}
@@ -435,22 +435,22 @@ QString LinkLocator::getEmoticon()
return htmlRep;
}
-QString LinkLocator::highlightedText()
+TQString LinkLocator::highlightedText()
{
// formating symbols must be prepended with a whitespace
if ( ( mPos > 0 ) && !mText[mPos-1].isSpace() )
- return QString::null;
+ return TQString::null;
- const QChar ch = mText[mPos];
+ const TQChar ch = mText[mPos];
if ( ch != '/' && ch != '*' && ch != '_' )
- return QString::null;
+ return TQString::null;
- QRegExp re = QRegExp( QString("\\%1([0-9A-Za-z]+)\\%2").arg( ch ).arg( ch ) );
+ TQRegExp re = TQRegExp( TQString("\\%1([0-9A-Za-z]+)\\%2").arg( ch ).arg( ch ) );
if ( re.search( mText, mPos ) == mPos ) {
uint length = re.matchedLength();
// there must be a whitespace after the closing formating symbol
if ( mPos + length < mText.length() && !mText[mPos + length].isSpace() )
- return QString::null;
+ return TQString::null;
mPos += length - 1;
switch ( ch.latin1() ) {
case '*':
@@ -461,6 +461,6 @@ QString LinkLocator::highlightedText()
return "<i>" + re.cap( 1 ) + "</i>";
}
}
- return QString::null;
+ return TQString::null;
}
diff --git a/libkdepim/linklocator.h b/libkdepim/linklocator.h
index 2c7fdbb19..6078fed16 100644
--- a/libkdepim/linklocator.h
+++ b/libkdepim/linklocator.h
@@ -23,8 +23,8 @@
#ifndef LINKLOCATOR_H_INCLUDED
#define LINKLOCATOR_H_INCLUDED
-#include <qstring.h>
-#include <qmap.h>
+#include <tqstring.h>
+#include <tqmap.h>
#include <kdepimmacros.h>
@@ -49,7 +49,7 @@ public:
* @param pos An index into 'text' from where the search
* should begin.
*/
- LinkLocator(const QString& text, int pos = 0);
+ LinkLocator(const TQString& text, int pos = 0);
/**
* Sets the maximum length of URLs that will be matched by
@@ -98,7 +98,7 @@ public:
*
* @return The URL at the current scan position, or an empty string.
*/
- QString getUrl();
+ TQString getUrl();
/**
* Attempts to grab an email address. If there is an @ symbol at the
@@ -111,7 +111,7 @@ public:
* @return The email address at the current scan position, or an empty
* string.
*/
- QString getEmailAddress();
+ TQString getEmailAddress();
/**
* Converts plaintext into html. The following characters are converted to HTML
@@ -136,7 +136,7 @@ public:
* @return An HTML version of the text supplied in the 'plainText' parameter,
* suitable for inclusion in the BODY of an HTML document.
*/
- static QString convertToHtml(const QString& plainText, int flags = 0,
+ static TQString convertToHtml(const TQString& plainText, int flags = 0,
int maxUrlLen = 4096, int maxAddressLen = 255);
static const int PreserveSpaces = 0x01;
@@ -146,15 +146,15 @@ public:
/** Embed the given PNG image into a data URL.
* @param iconPath path to the PNG image
- * @return A data URL, QString::null if the image could not be read.
+ * @return A data URL, TQString::null if the image could not be read.
*/
- static QString pngToDataUrl( const QString & iconPath );
+ static TQString pngToDataUrl( const TQString & iconPath );
protected:
/**
* The plaintext string being scanned for URLs and email addresses.
*/
- QString mText;
+ TQString mText;
/**
* The current scan position.
*/
@@ -162,7 +162,7 @@ protected:
private:
bool atUrl() const;
- bool isEmptyUrl(const QString& url);
+ bool isEmptyUrl(const TQString& url);
/**
* Replaces smiley text with an <img> tag containing the relevant image.
@@ -170,20 +170,20 @@ private:
* "(^|\s+)text(\s+|$)"
* @return An HTML String with <img> for an emoticon
*/
- QString getEmoticon();
+ TQString getEmoticon();
/**
* Highlight text according to *bold*, /italic/ and _underlined_ markup.
* @return A HTML string.
*/
- QString highlightedText();
+ TQString highlightedText();
int mMaxUrlLen;
int mMaxAddressLen;
// maps the smiley text to the corresponding emoticon name
- static QMap<QString, QString> *s_smileyEmoticonNameMap;
+ static TQMap<TQString, TQString> *s_smileyEmoticonNameMap;
// cache for the HTML representation of a smiley
- static QMap<QString, QString> *s_smileyEmoticonHTMLCache;
+ static TQMap<TQString, TQString> *s_smileyEmoticonHTMLCache;
};
#endif // LINKLOCATOR_H_INCLUDED
diff --git a/libkdepim/maillistdrag.cpp b/libkdepim/maillistdrag.cpp
index 2fb28328a..434ef5ecc 100644
--- a/libkdepim/maillistdrag.cpp
+++ b/libkdepim/maillistdrag.cpp
@@ -21,17 +21,17 @@
*/
#include "maillistdrag.h"
-#include <qbuffer.h>
-#include <qdatastream.h>
-#include <qeventloop.h>
+#include <tqbuffer.h>
+#include <tqdatastream.h>
+#include <tqeventloop.h>
#include <kapplication.h>
#include <klocale.h>
#include <kprogress.h>
using namespace KPIM;
-MailSummary::MailSummary( Q_UINT32 serialNumber, QString messageId,
- QString subject, QString from, QString to,
+MailSummary::MailSummary( Q_UINT32 serialNumber, TQString messageId,
+ TQString subject, TQString from, TQString to,
time_t date )
: mSerialNumber( serialNumber ), mMessageId( messageId ),
mSubject( subject ), mFrom( from ), mTo( to ), mDate( date )
@@ -42,22 +42,22 @@ Q_UINT32 MailSummary::serialNumber() const
return mSerialNumber;
}
-QString MailSummary::messageId()
+TQString MailSummary::messageId()
{
return mMessageId;
}
-QString MailSummary::subject()
+TQString MailSummary::subject()
{
return mSubject;
}
-QString MailSummary::from()
+TQString MailSummary::from()
{
return mFrom;
}
-QString MailSummary::to()
+TQString MailSummary::to()
{
return mTo;
}
@@ -67,8 +67,8 @@ time_t MailSummary::date()
return mDate;
}
-void MailSummary::set( Q_UINT32 serialNumber, QString messageId,
- QString subject, QString from, QString to, time_t date )
+void MailSummary::set( Q_UINT32 serialNumber, TQString messageId,
+ TQString subject, TQString from, TQString to, time_t date )
{
mSerialNumber = serialNumber;
mMessageId = messageId;
@@ -78,8 +78,8 @@ void MailSummary::set( Q_UINT32 serialNumber, QString messageId,
mDate = date;
}
-MailListDrag::MailListDrag( MailList mailList, QWidget * parent, MailTextSource *src )
- : QStoredDrag( MailListDrag::format(), parent ), _src(src)
+MailListDrag::MailListDrag( MailList mailList, TQWidget * parent, MailTextSource *src )
+ : TQStoredDrag( MailListDrag::format(), parent ), _src(src)
{
setMailList( mailList );
}
@@ -95,13 +95,13 @@ const char* MailListDrag::format()
return "x-kmail-drag/message-list";
}
-bool MailListDrag::canDecode( QMimeSource *e )
+bool MailListDrag::canDecode( TQMimeSource *e )
{
return e->provides( MailListDrag::format() );
}
// Have to define before use
-QDataStream& operator<< ( QDataStream &s, MailSummary &d )
+TQDataStream& operator<< ( TQDataStream &s, MailSummary &d )
{
s << d.serialNumber();
s << d.messageId();
@@ -112,10 +112,10 @@ QDataStream& operator<< ( QDataStream &s, MailSummary &d )
return s;
}
-QDataStream& operator>> ( QDataStream &s, MailSummary &d )
+TQDataStream& operator>> ( TQDataStream &s, MailSummary &d )
{
Q_UINT32 serialNumber;
- QString messageId, subject, from, to;
+ TQString messageId, subject, from, to;
time_t date;
s >> serialNumber;
s >> messageId;
@@ -127,7 +127,7 @@ QDataStream& operator>> ( QDataStream &s, MailSummary &d )
return s;
}
-QDataStream& operator<< ( QDataStream &s, MailList &mailList )
+TQDataStream& operator<< ( TQDataStream &s, MailList &mailList )
{
MailList::iterator it;
for (it = mailList.begin(); it != mailList.end(); ++it) {
@@ -137,7 +137,7 @@ QDataStream& operator<< ( QDataStream &s, MailList &mailList )
return s;
}
-QDataStream& operator>> ( QDataStream &s, MailList &mailList )
+TQDataStream& operator>> ( TQDataStream &s, MailList &mailList )
{
mailList.clear();
MailSummary mailDrag;
@@ -148,10 +148,10 @@ QDataStream& operator>> ( QDataStream &s, MailList &mailList )
return s;
}
-bool MailListDrag::decode( QDropEvent* e, MailList& mailList )
+bool MailListDrag::decode( TQDropEvent* e, MailList& mailList )
{
- QByteArray payload = e->encodedData( MailListDrag::format() );
- QDataStream buffer( payload, IO_ReadOnly );
+ TQByteArray payload = e->encodedData( MailListDrag::format() );
+ TQDataStream buffer( payload, IO_ReadOnly );
if ( payload.size() ) {
e->accept();
buffer >> mailList;
@@ -160,9 +160,9 @@ bool MailListDrag::decode( QDropEvent* e, MailList& mailList )
return FALSE;
}
-bool MailListDrag::decode( QByteArray& payload, MailList& mailList )
+bool MailListDrag::decode( TQByteArray& payload, MailList& mailList )
{
- QDataStream stream( payload, IO_ReadOnly );
+ TQDataStream stream( payload, IO_ReadOnly );
if ( payload.size() ) {
stream >> mailList;
return TRUE;
@@ -170,14 +170,14 @@ bool MailListDrag::decode( QByteArray& payload, MailList& mailList )
return FALSE;
}
-bool MailListDrag::decode( QDropEvent* e, QByteArray &a )
+bool MailListDrag::decode( TQDropEvent* e, TQByteArray &a )
{
MailList mailList;
if (decode( e, mailList )) {
MailList::iterator it;
- QBuffer buffer( a );
+ TQBuffer buffer( a );
buffer.open( IO_WriteOnly );
- QDataStream stream( &buffer );
+ TQDataStream stream( &buffer );
for (it = mailList.begin(); it != mailList.end(); ++it) {
MailSummary mailDrag = *it;
stream << mailDrag.serialNumber();
@@ -190,10 +190,10 @@ bool MailListDrag::decode( QDropEvent* e, QByteArray &a )
void MailListDrag::setMailList( MailList mailList )
{
- QByteArray array;
- QBuffer buffer( array );
+ TQByteArray array;
+ TQBuffer buffer( array );
buffer.open( IO_WriteOnly);
- QDataStream stream( array, IO_WriteOnly );
+ TQDataStream stream( array, IO_WriteOnly );
stream << mailList;
buffer.close();
setEncodedData( array );
@@ -205,42 +205,42 @@ const char *MailListDrag::format(int i) const
if (i == 0) {
return "message/rfc822";
} else {
- return QStoredDrag::format(i - 1);
+ return TQStoredDrag::format(i - 1);
}
}
- return QStoredDrag::format(i);
+ return TQStoredDrag::format(i);
}
bool MailListDrag::provides(const char *mimeType) const
{
- if (_src && QCString(mimeType) == "message/rfc822") {
+ if (_src && TQCString(mimeType) == "message/rfc822") {
return true;
}
- return QStoredDrag::provides(mimeType);
+ return TQStoredDrag::provides(mimeType);
}
-QByteArray MailListDrag::encodedData(const char *mimeType) const
+TQByteArray MailListDrag::encodedData(const char *mimeType) const
{
- if (QCString(mimeType) != "message/rfc822") {
- return QStoredDrag::encodedData(mimeType);
+ if (TQCString(mimeType) != "message/rfc822") {
+ return TQStoredDrag::encodedData(mimeType);
}
- QByteArray rc;
+ TQByteArray rc;
if (_src) {
MailList ml;
- QByteArray enc = QStoredDrag::encodedData(format());
+ TQByteArray enc = TQStoredDrag::encodedData(format());
decode(enc, ml);
- KProgressDialog *dlg = new KProgressDialog(0, 0, QString::null, i18n("Retrieving and storing messages..."), true);
+ KProgressDialog *dlg = new KProgressDialog(0, 0, TQString::null, i18n("Retrieving and storing messages..."), true);
dlg->setAllowCancel(true);
dlg->progressBar()->setTotalSteps(ml.count());
int i = 0;
dlg->progressBar()->setValue(i);
dlg->show();
- QTextStream *ts = new QTextStream(rc, IO_WriteOnly);
+ TQTextStream *ts = new TQTextStream(rc, IO_WriteOnly);
for (MailList::ConstIterator it = ml.begin(); it != ml.end(); ++it) {
MailSummary mailDrag = *it;
*ts << _src->text(mailDrag.serialNumber());
@@ -248,7 +248,7 @@ QByteArray MailListDrag::encodedData(const char *mimeType) const
break;
}
dlg->progressBar()->setValue(++i);
- kapp->eventLoop()->processEvents(QEventLoop::ExcludeSocketNotifiers);
+ kapp->eventLoop()->processEvents(TQEventLoop::ExcludeSocketNotifiers);
}
delete dlg;
diff --git a/libkdepim/maillistdrag.h b/libkdepim/maillistdrag.h
index cf8918db1..86280826a 100644
--- a/libkdepim/maillistdrag.h
+++ b/libkdepim/maillistdrag.h
@@ -22,9 +22,9 @@
#ifndef maillistdrag_h
#define maillistdrag_h
-#include "qdragobject.h"
-#include "qvaluelist.h"
-#include "qglobal.h"
+#include "tqdragobject.h"
+#include "tqvaluelist.h"
+#include "tqglobal.h"
#include "time.h"
#include <kdepimmacros.h>
@@ -34,7 +34,7 @@
*
* // Code example for drag and drop enabled widget
*
- * void SomeWidget::contentsDropEvent(QDropEvent *e)
+ * void SomeWidget::contentsDropEvent(TQDropEvent *e)
* {
* if (e->provides(MailListDrag::format())) {
* MailList mailList;
@@ -47,40 +47,40 @@ namespace KPIM {
class KDE_EXPORT MailSummary
{
public:
- MailSummary( Q_UINT32 serialNumber, QString messageId, QString subject,
- QString from, QString to, time_t date );
+ MailSummary( Q_UINT32 serialNumber, TQString messageId, TQString subject,
+ TQString from, TQString to, time_t date );
MailSummary() {}
~MailSummary() {}
/*** Set fields for this mail summary ***/
- void set( Q_UINT32, QString, QString, QString, QString, time_t );
+ void set( Q_UINT32, TQString, TQString, TQString, TQString, time_t );
/*** KMail unique identification number ***/
Q_UINT32 serialNumber() const;
/*** MD5 checksum of message identification string ***/
- QString messageId();
+ TQString messageId();
/*** Subject of the message including prefixes ***/
- QString subject();
+ TQString subject();
/*** Simplified from address ***/
- QString from();
+ TQString from();
/** Simplified to address ***/
- QString to();
+ TQString to();
/*** Date the message was sent ***/
time_t date();
private:
Q_UINT32 mSerialNumber;
- QString mMessageId, mSubject, mFrom, mTo;
+ TQString mMessageId, mSubject, mFrom, mTo;
time_t mDate;
};
// List of mail summaries
-typedef QValueList<MailSummary> MailList;
+typedef TQValueList<MailSummary> MailList;
// Object for the drag object to call-back for message fulltext
class KDE_EXPORT MailTextSource {
@@ -88,7 +88,7 @@ public:
MailTextSource() {}
virtual ~MailTextSource() {}
- virtual QCString text(Q_UINT32 serialNumber) const = 0;
+ virtual TQCString text(Q_UINT32 serialNumber) const = 0;
};
// Drag and drop object for mails
@@ -96,14 +96,14 @@ class KDE_EXPORT MailListDrag : public QStoredDrag
{
public:
// Takes ownership of "src" and deletes it when done
- MailListDrag( MailList, QWidget * parent = 0, MailTextSource *src = 0 );
+ MailListDrag( MailList, TQWidget * parent = 0, MailTextSource *src = 0 );
~MailListDrag();
const char *format(int i) const;
bool provides(const char *mimeType) const;
- QByteArray encodedData(const char *) const;
+ TQByteArray encodedData(const char *) const;
/* Reset the list of mail summaries */
void setMailList( MailList );
@@ -113,19 +113,19 @@ public:
/* Returns TRUE if the information in e can be decoded into a QString;
otherwsie returns FALSE */
- static bool canDecode( QMimeSource* e );
+ static bool canDecode( TQMimeSource* e );
/* Attempts to decode the dropped information;
Returns TRUE if successful; otherwise return false */
- static bool decode( QDropEvent* e, MailList& s );
+ static bool decode( TQDropEvent* e, MailList& s );
/* Attempts to decode the serialNumbers of the dropped information;
Returns TRUE if successful; otherwise return false */
- static bool decode( QDropEvent* e, QByteArray& a );
+ static bool decode( TQDropEvent* e, TQByteArray& a );
/* Attempts to decode the encoded MailList;
Returns TRUE if successful; otherwise return false */
- static bool decode( QByteArray& a, MailList& s );
+ static bool decode( TQByteArray& a, MailList& s );
private:
MailTextSource *_src;
diff --git a/libkdepim/overlaywidget.cpp b/libkdepim/overlaywidget.cpp
index d9353fd31..2e6f703cb 100644
--- a/libkdepim/overlaywidget.cpp
+++ b/libkdepim/overlaywidget.cpp
@@ -31,8 +31,8 @@
#include "overlaywidget.h"
using namespace KPIM;
-OverlayWidget::OverlayWidget( QWidget* alignWidget, QWidget* parent, const char* name )
- : QHBox( parent, name ), mAlignWidget( 0 )
+OverlayWidget::OverlayWidget( TQWidget* alignWidget, TQWidget* parent, const char* name )
+ : TQHBox( parent, name ), mAlignWidget( 0 )
{
setAlignWidget( alignWidget );
}
@@ -46,19 +46,19 @@ void OverlayWidget::reposition()
if ( !mAlignWidget )
return;
// p is in the alignWidget's coordinates
- QPoint p;
+ TQPoint p;
// We are always above the alignWidget, right-aligned with it.
p.setX( mAlignWidget->width() - width() );
p.setY( -height() );
// Position in the toplevelwidget's coordinates
- QPoint pTopLevel = mAlignWidget->mapTo( topLevelWidget(), p );
+ TQPoint pTopLevel = mAlignWidget->mapTo( topLevelWidget(), p );
// Position in the widget's parentWidget coordinates
- QPoint pParent = parentWidget()->mapFrom( topLevelWidget(), pTopLevel );
+ TQPoint pParent = parentWidget()->mapFrom( topLevelWidget(), pTopLevel );
// Move 'this' to that position.
move( pParent );
}
-void OverlayWidget::setAlignWidget( QWidget * w )
+void OverlayWidget::setAlignWidget( TQWidget * w )
{
if (w == mAlignWidget)
return;
@@ -74,19 +74,19 @@ void OverlayWidget::setAlignWidget( QWidget * w )
reposition();
}
-bool OverlayWidget::eventFilter( QObject* o, QEvent* e)
+bool OverlayWidget::eventFilter( TQObject* o, TQEvent* e)
{
if ( o == mAlignWidget &&
- ( e->type() == QEvent::Move || e->type() == QEvent::Resize ) ) {
+ ( e->type() == TQEvent::Move || e->type() == TQEvent::Resize ) ) {
reposition();
}
- return QFrame::eventFilter(o,e);
+ return TQFrame::eventFilter(o,e);
}
-void OverlayWidget::resizeEvent( QResizeEvent* ev )
+void OverlayWidget::resizeEvent( TQResizeEvent* ev )
{
reposition();
- QFrame::resizeEvent( ev );
+ TQFrame::resizeEvent( ev );
}
#include "overlaywidget.moc"
diff --git a/libkdepim/overlaywidget.h b/libkdepim/overlaywidget.h
index 0923d9910..d0aed33a8 100644
--- a/libkdepim/overlaywidget.h
+++ b/libkdepim/overlaywidget.h
@@ -30,7 +30,7 @@
#ifndef OVERLAYWIDGET_H
#define OVERLAYWIDGET_H
-#include <qhbox.h>
+#include <tqhbox.h>
namespace KPIM {
@@ -39,28 +39,28 @@ namespace KPIM {
* so that it can actually be on top of other widgets.
* Currently the only supported type of alignment is "right aligned, on top of the other widget".
*
- * OverlayWidget inherits QHBox for convenience purposes (layout, and frame)
+ * OverlayWidget inherits TQHBox for convenience purposes (layout, and frame)
*/
class OverlayWidget : public QHBox
{
Q_OBJECT
public:
- OverlayWidget( QWidget* alignWidget, QWidget* parent, const char* name = 0 );
+ OverlayWidget( TQWidget* alignWidget, TQWidget* parent, const char* name = 0 );
~OverlayWidget();
- QWidget * alignWidget() { return mAlignWidget; }
- void setAlignWidget( QWidget * alignWidget );
+ TQWidget * alignWidget() { return mAlignWidget; }
+ void setAlignWidget( TQWidget * alignWidget );
protected:
- void resizeEvent( QResizeEvent* ev );
- bool eventFilter( QObject* o, QEvent* e);
+ void resizeEvent( TQResizeEvent* ev );
+ bool eventFilter( TQObject* o, TQEvent* e);
private:
void reposition();
private:
- QWidget * mAlignWidget;
+ TQWidget * mAlignWidget;
};
} // namespace
diff --git a/libkdepim/pluginloader.h b/libkdepim/pluginloader.h
index 51f5c1663..5ae0fbf87 100644
--- a/libkdepim/pluginloader.h
+++ b/libkdepim/pluginloader.h
@@ -105,7 +105,7 @@ namespace KPIM {
/** Returns a pointer to a plugin object (of type @p T) or a null
pointer if the type wasn't found. You can extend this method
for when you want to handle builtin types */
- virtual T * createForName( const QString & type ) const {
+ virtual T * createForName( const TQString & type ) const {
void * main_func = mainFunc( type, T_config::mainfunc );
if ( !main_func ) return 0;
diff --git a/libkdepim/pluginloaderbase.cpp b/libkdepim/pluginloaderbase.cpp
index 03c397799..40a4beb2f 100644
--- a/libkdepim/pluginloaderbase.cpp
+++ b/libkdepim/pluginloaderbase.cpp
@@ -28,8 +28,8 @@
#include <kglobal.h>
#include <kdebug.h>
-#include <qfile.h>
-#include <qstringlist.h>
+#include <tqfile.h>
+#include <tqstringlist.h>
static kdbgstream warning() {
return kdWarning( 5300 ) << "PluginLoaderBase: ";
@@ -49,15 +49,15 @@ namespace KPIM {
PluginLoaderBase::~PluginLoaderBase() {}
- QStringList PluginLoaderBase::types() const {
- QStringList result;
- for ( QMap< QString, PluginMetaData >::const_iterator it = mPluginMap.begin();
+ TQStringList PluginLoaderBase::types() const {
+ TQStringList result;
+ for ( TQMap< TQString, PluginMetaData >::const_iterator it = mPluginMap.begin();
it != mPluginMap.end() ; ++it )
result.push_back( it.key() );
return result;
}
- const PluginMetaData * PluginLoaderBase::infoForName( const QString & type ) const {
+ const PluginMetaData * PluginLoaderBase::infoForName( const TQString & type ) const {
return mPluginMap.contains( type ) ? &(mPluginMap[type]) : 0 ;
}
@@ -65,22 +65,22 @@ namespace KPIM {
void PluginLoaderBase::doScan( const char * path ) {
mPluginMap.clear();
- const QStringList list =
+ const TQStringList list =
KGlobal::dirs()->findAllResources( "data", path, true, true );
- for ( QStringList::const_iterator it = list.begin() ;
+ for ( TQStringList::const_iterator it = list.begin() ;
it != list.end() ; ++it ) {
KSimpleConfig config( *it, true );
if ( config.hasGroup( "Misc" ) && config.hasGroup( "Plugin" ) ) {
config.setGroup( "Plugin" );
- const QString type = config.readEntry( "Type" ).lower();
+ const TQString type = config.readEntry( "Type" ).lower();
if ( type.isEmpty() ) {
warning() << "missing or empty [Plugin]Type value in \""
<< *it << "\" - skipping" << endl;
continue;
}
- const QString library = config.readEntry( "X-KDE-Library" );
+ const TQString library = config.readEntry( "X-KDE-Library" );
if ( library.isEmpty() ) {
warning() << "missing or empty [Plugin]X-KDE-Library value in \""
<< *it << "\" - skipping" << endl;
@@ -89,14 +89,14 @@ namespace KPIM {
config.setGroup( "Misc" );
- QString name = config.readEntry( "Name" );
+ TQString name = config.readEntry( "Name" );
if ( name.isEmpty() ) {
warning() << "missing or empty [Misc]Name value in \""
<< *it << "\" - inserting default name" << endl;
name = i18n("Unnamed plugin");
}
- QString comment = config.readEntry( "Comment" );
+ TQString comment = config.readEntry( "Comment" );
if ( comment.isEmpty() ) {
warning() << "missing or empty [Misc]Comment value in \""
<< *it << "\" - inserting default name" << endl;
@@ -112,12 +112,12 @@ namespace KPIM {
}
}
- void * PluginLoaderBase::mainFunc( const QString & type,
+ void * PluginLoaderBase::mainFunc( const TQString & type,
const char * mf_name ) const {
if ( type.isEmpty() || !mPluginMap.contains( type ) )
return 0;
- const QString libName = mPluginMap[ type ].library;
+ const TQString libName = mPluginMap[ type ].library;
if ( libName.isEmpty() )
return 0;
@@ -127,7 +127,7 @@ namespace KPIM {
mPluginMap[ type ].loaded = true;
- const QString factory_name = libName + '_' + mf_name;
+ const TQString factory_name = libName + '_' + mf_name;
if ( !lib->hasSymbol( factory_name.latin1() ) ) {
warning() << "No symbol named \"" << factory_name.latin1() << "\" ("
<< factory_name << ") was found in library \"" << libName
@@ -138,9 +138,9 @@ namespace KPIM {
return lib->symbol( factory_name.latin1() );
}
- const KLibrary * PluginLoaderBase::openLibrary( const QString & libName ) const {
+ const KLibrary * PluginLoaderBase::openLibrary( const TQString & libName ) const {
- const QString path = KLibLoader::findLibrary( QFile::encodeName( libName ) );
+ const TQString path = KLibLoader::findLibrary( TQFile::encodeName( libName ) );
if ( path.isEmpty() ) {
warning() << "No plugin library named \"" << libName
@@ -148,7 +148,7 @@ namespace KPIM {
return 0;
}
- const KLibrary * library = KLibLoader::self()->library( QFile::encodeName( path ) );
+ const KLibrary * library = KLibLoader::self()->library( TQFile::encodeName( path ) );
debug( !library ) << "Could not load library '" << libName << "'" << endl;
diff --git a/libkdepim/pluginloaderbase.h b/libkdepim/pluginloaderbase.h
index fd63cf690..ba7e12fd3 100644
--- a/libkdepim/pluginloaderbase.h
+++ b/libkdepim/pluginloaderbase.h
@@ -22,8 +22,8 @@
#ifndef __LIBKDEPIM_PLUGINLOADERBASE_H__
#define __LIBKDEPIM_PLUGINLOADERBASE_H__
-#include <qstring.h>
-#include <qmap.h>
+#include <tqstring.h>
+#include <tqmap.h>
#include <kdepimmacros.h>
@@ -35,13 +35,13 @@ namespace KPIM {
class KDE_EXPORT PluginMetaData {
public:
PluginMetaData() {}
- PluginMetaData( const QString & lib, const QString & name,
- const QString & comment )
+ PluginMetaData( const TQString & lib, const TQString & name,
+ const TQString & comment )
: library( lib ), nameLabel( name ),
descriptionLabel( comment ), loaded( false ) {}
- QString library;
- QString nameLabel;
- QString descriptionLabel;
+ TQString library;
+ TQString nameLabel;
+ TQString descriptionLabel;
mutable bool loaded;
};
@@ -52,10 +52,10 @@ namespace KPIM {
public:
/** Returns a list of all available plugin objects (of kind @p T) */
- QStringList types() const;
+ TQStringList types() const;
/** Returns the @ref PluginMetaData structure for a given type */
- const PluginMetaData * infoForName( const QString & type ) const;
+ const PluginMetaData * infoForName( const TQString & type ) const;
/** Overload this method in subclasses to call @ref doScan with
the right @p path argument */
@@ -71,11 +71,11 @@ namespace KPIM {
/** Returns a pointer to symbol @p main_func in the library that
implements the plugin of type @p type */
- void * mainFunc( const QString & type, const char * main_func ) const;
+ void * mainFunc( const TQString & type, const char * main_func ) const;
private:
- const KLibrary * openLibrary( const QString & libName ) const;
- QMap< QString, PluginMetaData > mPluginMap;
+ const KLibrary * openLibrary( const TQString & libName ) const;
+ TQMap< TQString, PluginMetaData > mPluginMap;
class Private;
Private * d;
diff --git a/libkdepim/progressdialog.cpp b/libkdepim/progressdialog.cpp
index 10a0b868d..f35f23909 100644
--- a/libkdepim/progressdialog.cpp
+++ b/libkdepim/progressdialog.cpp
@@ -33,17 +33,17 @@
#include <config.h>
#endif
-#include <qapplication.h>
-#include <qlayout.h>
-#include <qprogressbar.h>
-#include <qtimer.h>
-#include <qheader.h>
-#include <qobject.h>
-#include <qscrollview.h>
-#include <qtoolbutton.h>
-#include <qpushbutton.h>
-#include <qvbox.h>
-#include <qtooltip.h>
+#include <tqapplication.h>
+#include <tqlayout.h>
+#include <tqprogressbar.h>
+#include <tqtimer.h>
+#include <tqheader.h>
+#include <tqobject.h>
+#include <tqscrollview.h>
+#include <tqtoolbutton.h>
+#include <tqpushbutton.h>
+#include <tqvbox.h>
+#include <tqtooltip.h>
#include <klocale.h>
#include <kdialog.h>
@@ -54,44 +54,44 @@
#include "progressdialog.h"
#include "progressmanager.h"
#include "ssllabel.h"
-#include <qwhatsthis.h>
+#include <tqwhatsthis.h>
namespace KPIM {
class TransactionItem;
-TransactionItemView::TransactionItemView( QWidget * parent,
+TransactionItemView::TransactionItemView( TQWidget * parent,
const char * name,
WFlags f )
- : QScrollView( parent, name, f ) {
+ : TQScrollView( parent, name, f ) {
setFrameStyle( NoFrame );
- mBigBox = new QVBox( viewport() );
+ mBigBox = new TQVBox( viewport() );
mBigBox->setSpacing( 5 );
addChild( mBigBox );
- setResizePolicy( QScrollView::AutoOneFit ); // Fit so that the box expands horizontally
+ setResizePolicy( TQScrollView::AutoOneFit ); // Fit so that the box expands horizontally
}
TransactionItem* TransactionItemView::addTransactionItem( ProgressItem* item, bool first )
{
TransactionItem *ti = new TransactionItem( mBigBox, item, first );
ti->hide();
- QTimer::singleShot( 1000, ti, SLOT( show() ) );
+ TQTimer::singleShot( 1000, ti, TQT_SLOT( show() ) );
return ti;
}
void TransactionItemView::resizeContents( int w, int h )
{
- // (handling of QEvent::LayoutHint in QScrollView calls this method)
+ // (handling of TQEvent::LayoutHint in TQScrollView calls this method)
//kdDebug(5300) << k_funcinfo << w << "," << h << endl;
- QScrollView::resizeContents( w, h );
+ TQScrollView::resizeContents( w, h );
// Tell the layout in the parent (progressdialog) that our size changed
updateGeometry();
// Resize the parent (progressdialog) - this works but resize horizontally too often
//parentWidget()->adjustSize();
- QApplication::sendPostedEvents( 0, QEvent::ChildInserted );
- QApplication::sendPostedEvents( 0, QEvent::LayoutHint );
- QSize sz = parentWidget()->sizeHint();
+ TQApplication::sendPostedEvents( 0, TQEvent::ChildInserted );
+ TQApplication::sendPostedEvents( 0, TQEvent::LayoutHint );
+ TQSize sz = parentWidget()->sizeHint();
int currentWidth = parentWidget()->width();
// Don't resize to sz.width() every time when it only reduces a little bit
if ( currentWidth < sz.width() || currentWidth > sz.width() + 100 )
@@ -99,19 +99,19 @@ void TransactionItemView::resizeContents( int w, int h )
parentWidget()->resize( currentWidth, sz.height() );
}
-QSize TransactionItemView::sizeHint() const
+TQSize TransactionItemView::sizeHint() const
{
return minimumSizeHint();
}
-QSize TransactionItemView::minimumSizeHint() const
+TQSize TransactionItemView::minimumSizeHint() const
{
int f = 2 * frameWidth();
// Make room for a vertical scrollbar in all cases, to avoid a horizontal one
int vsbExt = verticalScrollBar()->sizeHint().width();
int minw = topLevelWidget()->width() / 3;
int maxh = topLevelWidget()->height() / 2;
- QSize sz( mBigBox->minimumSizeHint() );
+ TQSize sz( mBigBox->minimumSizeHint() );
sz.setWidth( QMAX( sz.width(), minw ) + f + vsbExt );
sz.setHeight( QMIN( sz.height(), maxh ) + f );
return sz;
@@ -124,12 +124,12 @@ void TransactionItemView::slotLayoutFirstItem()
The below relies on some details in Qt's behaviour regarding deleting
objects. This slot is called from the destroyed signal of an item just
going away. That item is at that point still in the list of chilren, but
- since the vtable is already gone, it will have type QObject. The first
+ since the vtable is already gone, it will have type TQObject. The first
one with both the right name and the right class therefor is what will
be the first item very shortly. That's the one we want to remove the
hline for.
*/
- QObject *o = mBigBox->child( "TransactionItem", "KPIM::TransactionItem" );
+ TQObject *o = mBigBox->child( "TransactionItem", "KPIM::TransactionItem" );
TransactionItem *ti = dynamic_cast<TransactionItem*>( o );
if ( ti ) {
ti->hideHLine();
@@ -139,52 +139,52 @@ void TransactionItemView::slotLayoutFirstItem()
// ----------------------------------------------------------------------------
-TransactionItem::TransactionItem( QWidget* parent,
+TransactionItem::TransactionItem( TQWidget* parent,
ProgressItem *item, bool first )
- : QVBox( parent, "TransactionItem" ), mCancelButton( 0 ), mItem( item )
+ : TQVBox( parent, "TransactionItem" ), mCancelButton( 0 ), mItem( item )
{
setSpacing( 2 );
setMargin( 2 );
- setSizePolicy( QSizePolicy( QSizePolicy::Preferred, QSizePolicy::Fixed ) );
+ setSizePolicy( TQSizePolicy( TQSizePolicy::Preferred, TQSizePolicy::Fixed ) );
- mFrame = new QFrame( this );
- mFrame->setFrameShape( QFrame::HLine );
- mFrame->setFrameShadow( QFrame::Raised );
+ mFrame = new TQFrame( this );
+ mFrame->setFrameShape( TQFrame::HLine );
+ mFrame->setFrameShadow( TQFrame::Raised );
mFrame->show();
setStretchFactor( mFrame, 3 );
- QHBox *h = new QHBox( this );
+ TQHBox *h = new TQHBox( this );
h->setSpacing( 5 );
- mItemLabel = new QLabel( item->label(), h );
+ mItemLabel = new TQLabel( item->label(), h );
// always interpret the label text as RichText, but disable word wrapping
mItemLabel->setTextFormat( Qt::RichText );
mItemLabel->setAlignment( Qt::AlignAuto | Qt::AlignVCenter | Qt::SingleLine );
- h->setSizePolicy( QSizePolicy( QSizePolicy::Preferred, QSizePolicy::Fixed ) );
+ h->setSizePolicy( TQSizePolicy( TQSizePolicy::Preferred, TQSizePolicy::Fixed ) );
- mProgress = new QProgressBar( 100, h );
+ mProgress = new TQProgressBar( 100, h );
mProgress->setProgress( item->progress() );
if ( item->canBeCanceled() ) {
- mCancelButton = new QPushButton( SmallIcon( "cancel" ), QString::null, h );
- QToolTip::add( mCancelButton, i18n("Cancel this operation.") );
- connect ( mCancelButton, SIGNAL( clicked() ),
- this, SLOT( slotItemCanceled() ));
+ mCancelButton = new TQPushButton( SmallIcon( "cancel" ), TQString::null, h );
+ TQToolTip::add( mCancelButton, i18n("Cancel this operation.") );
+ connect ( mCancelButton, TQT_SIGNAL( clicked() ),
+ this, TQT_SLOT( slotItemCanceled() ));
}
- h = new QHBox( this );
+ h = new TQHBox( this );
h->setSpacing( 5 );
- h->setSizePolicy( QSizePolicy( QSizePolicy::Preferred, QSizePolicy::Fixed ) );
+ h->setSizePolicy( TQSizePolicy( TQSizePolicy::Preferred, TQSizePolicy::Fixed ) );
mSSLLabel = new SSLLabel( h );
- mSSLLabel->setSizePolicy( QSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed ) );
- mItemStatus = new QLabel( item->status(), h );
+ mSSLLabel->setSizePolicy( TQSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Fixed ) );
+ mItemStatus = new TQLabel( item->status(), h );
// always interpret the status text as RichText, but disable word wrapping
mItemStatus->setTextFormat( Qt::RichText );
mItemStatus->setAlignment( Qt::AlignAuto | Qt::AlignVCenter | Qt::SingleLine );
// richtext leads to sizeHint acting as if wrapping was enabled though,
// so make sure we only ever have the height of one line.
- mItemStatus->setSizePolicy( QSizePolicy( QSizePolicy::Preferred, QSizePolicy::Ignored ) );
+ mItemStatus->setSizePolicy( TQSizePolicy( TQSizePolicy::Preferred, TQSizePolicy::Ignored ) );
mItemStatus->setFixedHeight( mItemLabel->sizeHint().height() );
setCrypto( item->usesCrypto() );
if( first ) hideHLine();
@@ -204,12 +204,12 @@ void TransactionItem::setProgress( int progress )
mProgress->setProgress( progress );
}
-void TransactionItem::setLabel( const QString& label )
+void TransactionItem::setLabel( const TQString& label )
{
mItemLabel->setText( label );
}
-void TransactionItem::setStatus( const QString& status )
+void TransactionItem::setStatus( const TQString& status )
{
mItemStatus->setText( status );
}
@@ -239,10 +239,10 @@ void TransactionItem::addSubTransaction( ProgressItem* /*item*/ )
// ---------------------------------------------------------------------------
-ProgressDialog::ProgressDialog( QWidget* alignWidget, QWidget* parent, const char* name )
+ProgressDialog::ProgressDialog( TQWidget* alignWidget, TQWidget* parent, const char* name )
: OverlayWidget( alignWidget, parent, name ), mWasLastShown( false )
{
- setFrameStyle( QFrame::Panel | QFrame::Sunken ); // QFrame
+ setFrameStyle( TQFrame::Panel | TQFrame::Sunken ); // QFrame
setSpacing( 0 ); // QHBox
setMargin( 1 );
@@ -250,15 +250,15 @@ ProgressDialog::ProgressDialog( QWidget* alignWidget, QWidget* parent, const cha
// No more close button for now, since there is no more autoshow
/*
- QVBox* rightBox = new QVBox( this );
- QToolButton* pbClose = new QToolButton( rightBox );
+ TQVBox* rightBox = new TQVBox( this );
+ TQToolButton* pbClose = new TQToolButton( rightBox );
pbClose->setAutoRaise(true);
- pbClose->setSizePolicy( QSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed ) );
+ pbClose->setSizePolicy( TQSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Fixed ) );
pbClose->setFixedSize( 16, 16 );
pbClose->setIconSet( KGlobal::iconLoader()->loadIconSet( "fileclose", KIcon::Small, 14 ) );
- QToolTip::add( pbClose, i18n( "Hide detailed progress window" ) );
- connect(pbClose, SIGNAL(clicked()), this, SLOT(slotClose()));
- QWidget* spacer = new QWidget( rightBox ); // don't let the close button take up all the height
+ TQToolTip::add( pbClose, i18n( "Hide detailed progress window" ) );
+ connect(pbClose, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotClose()));
+ TQWidget* spacer = new TQWidget( rightBox ); // don't let the close button take up all the height
rightBox->setStretchFactor( spacer, 100 );
*/
@@ -267,23 +267,23 @@ ProgressDialog::ProgressDialog( QWidget* alignWidget, QWidget* parent, const cha
* appearing and vanishing items.
*/
ProgressManager *pm = ProgressManager::instance();
- connect ( pm, SIGNAL( progressItemAdded( KPIM::ProgressItem* ) ),
- this, SLOT( slotTransactionAdded( KPIM::ProgressItem* ) ) );
- connect ( pm, SIGNAL( progressItemCompleted( KPIM::ProgressItem* ) ),
- this, SLOT( slotTransactionCompleted( KPIM::ProgressItem* ) ) );
- connect ( pm, SIGNAL( progressItemProgress( KPIM::ProgressItem*, unsigned int ) ),
- this, SLOT( slotTransactionProgress( KPIM::ProgressItem*, unsigned int ) ) );
- connect ( pm, SIGNAL( progressItemStatus( KPIM::ProgressItem*, const QString& ) ),
- this, SLOT( slotTransactionStatus( KPIM::ProgressItem*, const QString& ) ) );
- connect ( pm, SIGNAL( progressItemLabel( KPIM::ProgressItem*, const QString& ) ),
- this, SLOT( slotTransactionLabel( KPIM::ProgressItem*, const QString& ) ) );
- connect ( pm, SIGNAL( progressItemUsesCrypto(KPIM::ProgressItem*, bool) ),
- this, SLOT( slotTransactionUsesCrypto( KPIM::ProgressItem*, bool ) ) );
- connect ( pm, SIGNAL( showProgressDialog() ),
- this, SLOT( slotShow() ) );
+ connect ( pm, TQT_SIGNAL( progressItemAdded( KPIM::ProgressItem* ) ),
+ this, TQT_SLOT( slotTransactionAdded( KPIM::ProgressItem* ) ) );
+ connect ( pm, TQT_SIGNAL( progressItemCompleted( KPIM::ProgressItem* ) ),
+ this, TQT_SLOT( slotTransactionCompleted( KPIM::ProgressItem* ) ) );
+ connect ( pm, TQT_SIGNAL( progressItemProgress( KPIM::ProgressItem*, unsigned int ) ),
+ this, TQT_SLOT( slotTransactionProgress( KPIM::ProgressItem*, unsigned int ) ) );
+ connect ( pm, TQT_SIGNAL( progressItemStatus( KPIM::ProgressItem*, const TQString& ) ),
+ this, TQT_SLOT( slotTransactionStatus( KPIM::ProgressItem*, const TQString& ) ) );
+ connect ( pm, TQT_SIGNAL( progressItemLabel( KPIM::ProgressItem*, const TQString& ) ),
+ this, TQT_SLOT( slotTransactionLabel( KPIM::ProgressItem*, const TQString& ) ) );
+ connect ( pm, TQT_SIGNAL( progressItemUsesCrypto(KPIM::ProgressItem*, bool) ),
+ this, TQT_SLOT( slotTransactionUsesCrypto( KPIM::ProgressItem*, bool ) ) );
+ connect ( pm, TQT_SIGNAL( showProgressDialog() ),
+ this, TQT_SLOT( slotShow() ) );
}
-void ProgressDialog::closeEvent( QCloseEvent* e )
+void ProgressDialog::closeEvent( TQCloseEvent* e )
{
e->accept();
hide();
@@ -312,7 +312,7 @@ void ProgressDialog::slotTransactionAdded( ProgressItem *item )
if ( ti )
mTransactionsToListviewItems.replace( item, ti );
if ( first && mWasLastShown )
- QTimer::singleShot( 1000, this, SLOT( slotShow() ) );
+ TQTimer::singleShot( 1000, this, TQT_SLOT( slotShow() ) );
}
}
@@ -323,14 +323,14 @@ void ProgressDialog::slotTransactionCompleted( ProgressItem *item )
TransactionItem *ti = mTransactionsToListviewItems[ item ];
mTransactionsToListviewItems.remove( item );
ti->setItemComplete();
- QTimer::singleShot( 3000, ti, SLOT( deleteLater() ) );
+ TQTimer::singleShot( 3000, ti, TQT_SLOT( deleteLater() ) );
// see the slot for comments as to why that works
- connect ( ti, SIGNAL( destroyed() ),
- mScrollView, SLOT( slotLayoutFirstItem() ) );
+ connect ( ti, TQT_SIGNAL( destroyed() ),
+ mScrollView, TQT_SLOT( slotLayoutFirstItem() ) );
}
// This was the last item, hide.
if ( mTransactionsToListviewItems.empty() )
- QTimer::singleShot( 3000, this, SLOT( slotHide() ) );
+ TQTimer::singleShot( 3000, this, TQT_SLOT( slotHide() ) );
}
void ProgressDialog::slotTransactionCanceled( ProgressItem* )
@@ -347,7 +347,7 @@ void ProgressDialog::slotTransactionProgress( ProgressItem *item,
}
void ProgressDialog::slotTransactionStatus( ProgressItem *item,
- const QString& status )
+ const TQString& status )
{
if ( mTransactionsToListviewItems.contains( item ) ) {
TransactionItem *ti = mTransactionsToListviewItems[ item ];
@@ -356,7 +356,7 @@ void ProgressDialog::slotTransactionStatus( ProgressItem *item,
}
void ProgressDialog::slotTransactionLabel( ProgressItem *item,
- const QString& label )
+ const TQString& label )
{
if ( mTransactionsToListviewItems.contains( item ) ) {
TransactionItem *ti = mTransactionsToListviewItems[ item ];
diff --git a/libkdepim/progressdialog.h b/libkdepim/progressdialog.h
index 8880f4ecc..3daadd365 100644
--- a/libkdepim/progressdialog.h
+++ b/libkdepim/progressdialog.h
@@ -33,10 +33,10 @@
#ifndef __KPIM_PROGRESSDIALOG_H__
#define __KPIM_PROGRESSDIALOG_H__
-#include <qdialog.h>
-#include <qlistview.h>
-#include <qlabel.h>
-#include <qvbox.h>
+#include <tqdialog.h>
+#include <tqlistview.h>
+#include <tqlabel.h>
+#include <tqvbox.h>
#include "overlaywidget.h"
#include <kdepimmacros.h>
@@ -50,10 +50,10 @@ class TransactionItemListView;
class TransactionItem;
class SSLLabel;
-class TransactionItemView : public QScrollView {
+class TransactionItemView : public TQScrollView {
Q_OBJECT
public:
- TransactionItemView( QWidget * parent = 0,
+ TransactionItemView( TQWidget * parent = 0,
const char * name = 0,
WFlags f = 0 );
@@ -62,8 +62,8 @@ public:
TransactionItem* addTransactionItem( ProgressItem *item, bool first );
- QSize sizeHint() const;
- QSize minimumSizeHint() const;
+ TQSize sizeHint() const;
+ TQSize minimumSizeHint() const;
public slots:
void slotLayoutFirstItem();
@@ -71,15 +71,15 @@ protected:
virtual void resizeContents ( int w, int h );
private:
- QVBox * mBigBox;
+ TQVBox * mBigBox;
};
-class TransactionItem : public QVBox {
+class TransactionItem : public TQVBox {
Q_OBJECT
public:
- TransactionItem( QWidget * parent,
+ TransactionItem( TQWidget * parent,
ProgressItem* item, bool first );
~TransactionItem();
@@ -87,8 +87,8 @@ public:
void hideHLine();
void setProgress( int progress );
- void setLabel( const QString& );
- void setStatus( const QString& );
+ void setLabel( const TQString& );
+ void setStatus( const TQString& );
void setCrypto( bool );
ProgressItem* item() const { return mItem; }
@@ -103,11 +103,11 @@ public slots:
void slotItemCanceled();
protected:
- QProgressBar* mProgress;
- QPushButton* mCancelButton;
- QLabel* mItemLabel;
- QLabel* mItemStatus;
- QFrame* mFrame;
+ TQProgressBar* mProgress;
+ TQPushButton* mCancelButton;
+ TQLabel* mItemLabel;
+ TQLabel* mItemStatus;
+ TQFrame* mFrame;
SSLLabel* mSSLLabel;
ProgressItem* mItem;
};
@@ -117,7 +117,7 @@ class KDE_EXPORT ProgressDialog : public OverlayWidget
Q_OBJECT
public:
- ProgressDialog( QWidget* alignWidget, QWidget* parent, const char* name = 0 );
+ ProgressDialog( TQWidget* alignWidget, TQWidget* parent, const char* name = 0 );
~ProgressDialog();
void setVisible( bool b );
@@ -129,8 +129,8 @@ void slotTransactionAdded( KPIM::ProgressItem *item );
void slotTransactionCompleted( KPIM::ProgressItem *item );
void slotTransactionCanceled( KPIM::ProgressItem *item );
void slotTransactionProgress( KPIM::ProgressItem *item, unsigned int progress );
- void slotTransactionStatus( KPIM::ProgressItem *item, const QString& );
- void slotTransactionLabel( KPIM::ProgressItem *item, const QString& );
+ void slotTransactionStatus( KPIM::ProgressItem *item, const TQString& );
+ void slotTransactionLabel( KPIM::ProgressItem *item, const TQString& );
void slotTransactionUsesCrypto( KPIM::ProgressItem *item, bool );
void slotClose();
@@ -141,11 +141,11 @@ signals:
void visibilityChanged( bool );
protected:
- virtual void closeEvent( QCloseEvent* );
+ virtual void closeEvent( TQCloseEvent* );
TransactionItemView* mScrollView;
TransactionItem* mPreviousItem;
- QMap< const ProgressItem*, TransactionItem* > mTransactionsToListviewItems;
+ TQMap< const ProgressItem*, TransactionItem* > mTransactionsToListviewItems;
bool mWasLastShown;
};
diff --git a/libkdepim/progressmanager.cpp b/libkdepim/progressmanager.cpp
index e9d1b0677..0c73e0c55 100644
--- a/libkdepim/progressmanager.cpp
+++ b/libkdepim/progressmanager.cpp
@@ -21,7 +21,7 @@
Boston, MA 02110-1301, USA.
*/
-#include <qvaluevector.h>
+#include <tqvaluevector.h>
#include <kdebug.h>
#include <klocale.h>
@@ -35,8 +35,8 @@ KPIM::ProgressManager * KPIM::ProgressManager::mInstance = 0;
unsigned int KPIM::ProgressManager::uID = 42;
ProgressItem::ProgressItem(
- ProgressItem* parent, const QString& id,
- const QString& label, const QString& status, bool canBeCanceled,
+ ProgressItem* parent, const TQString& id,
+ const TQString& label, const TQString& status, bool canBeCanceled,
bool usesCrypto )
:mId( id ), mLabel( label ), mStatus( status ), mParent( parent ),
mCanBeCanceled( canBeCanceled ), mProgress( 0 ), mTotal( 0 ),
@@ -85,9 +85,9 @@ void ProgressItem::cancel()
kdDebug(5300) << "ProgressItem::cancel() - " << label() << endl;
mCanceled = true;
// Cancel all children.
- QValueList<ProgressItem*> kids = mChildren.keys();
- QValueList<ProgressItem*>::Iterator it( kids.begin() );
- QValueList<ProgressItem*>::Iterator end( kids.end() );
+ TQValueList<ProgressItem*> kids = mChildren.keys();
+ TQValueList<ProgressItem*>::Iterator it( kids.begin() );
+ TQValueList<ProgressItem*>::Iterator end( kids.end() );
for ( ; it != end; it++ ) {
ProgressItem *kid = *it;
if ( kid->canBeCanceled() )
@@ -105,13 +105,13 @@ void ProgressItem::setProgress( unsigned int v )
emit progressItemProgress( this, mProgress );
}
-void ProgressItem::setLabel( const QString& v )
+void ProgressItem::setLabel( const TQString& v )
{
mLabel = v;
emit progressItemLabel( this, mLabel );
}
-void ProgressItem::setStatus( const QString& v )
+void ProgressItem::setStatus( const TQString& v )
{
mStatus = v;
emit progressItemStatus( this, mStatus );
@@ -125,7 +125,7 @@ void ProgressItem::setUsesCrypto( bool v )
// ======================================
-ProgressManager::ProgressManager() :QObject() {
+ProgressManager::ProgressManager() :TQObject() {
mInstance = this;
}
@@ -141,8 +141,8 @@ ProgressManager* ProgressManager::instance()
}
ProgressItem* ProgressManager::createProgressItemImpl(
- ProgressItem* parent, const QString& id,
- const QString &label, const QString &status,
+ ProgressItem* parent, const TQString& id,
+ const TQString &label, const TQString &status,
bool cancellable, bool usesCrypto )
{
ProgressItem *t = 0;
@@ -156,20 +156,20 @@ ProgressItem* ProgressManager::createProgressItemImpl(
}
}
// connect all signals
- connect ( t, SIGNAL( progressItemCompleted(KPIM::ProgressItem*) ),
- this, SLOT( slotTransactionCompleted(KPIM::ProgressItem*) ) );
- connect ( t, SIGNAL( progressItemProgress(KPIM::ProgressItem*, unsigned int) ),
- this, SIGNAL( progressItemProgress(KPIM::ProgressItem*, unsigned int) ) );
- connect ( t, SIGNAL( progressItemAdded(KPIM::ProgressItem*) ),
- this, SIGNAL( progressItemAdded(KPIM::ProgressItem*) ) );
- connect ( t, SIGNAL( progressItemCanceled(KPIM::ProgressItem*) ),
- this, SIGNAL( progressItemCanceled(KPIM::ProgressItem*) ) );
- connect ( t, SIGNAL( progressItemStatus(KPIM::ProgressItem*, const QString&) ),
- this, SIGNAL( progressItemStatus(KPIM::ProgressItem*, const QString&) ) );
- connect ( t, SIGNAL( progressItemLabel(KPIM::ProgressItem*, const QString&) ),
- this, SIGNAL( progressItemLabel(KPIM::ProgressItem*, const QString&) ) );
- connect ( t, SIGNAL( progressItemUsesCrypto(KPIM::ProgressItem*, bool) ),
- this, SIGNAL( progressItemUsesCrypto(KPIM::ProgressItem*, bool) ) );
+ connect ( t, TQT_SIGNAL( progressItemCompleted(KPIM::ProgressItem*) ),
+ this, TQT_SLOT( slotTransactionCompleted(KPIM::ProgressItem*) ) );
+ connect ( t, TQT_SIGNAL( progressItemProgress(KPIM::ProgressItem*, unsigned int) ),
+ this, TQT_SIGNAL( progressItemProgress(KPIM::ProgressItem*, unsigned int) ) );
+ connect ( t, TQT_SIGNAL( progressItemAdded(KPIM::ProgressItem*) ),
+ this, TQT_SIGNAL( progressItemAdded(KPIM::ProgressItem*) ) );
+ connect ( t, TQT_SIGNAL( progressItemCanceled(KPIM::ProgressItem*) ),
+ this, TQT_SIGNAL( progressItemCanceled(KPIM::ProgressItem*) ) );
+ connect ( t, TQT_SIGNAL( progressItemStatus(KPIM::ProgressItem*, const TQString&) ),
+ this, TQT_SIGNAL( progressItemStatus(KPIM::ProgressItem*, const TQString&) ) );
+ connect ( t, TQT_SIGNAL( progressItemLabel(KPIM::ProgressItem*, const TQString&) ),
+ this, TQT_SIGNAL( progressItemLabel(KPIM::ProgressItem*, const TQString&) ) );
+ connect ( t, TQT_SIGNAL( progressItemUsesCrypto(KPIM::ProgressItem*, bool) ),
+ this, TQT_SIGNAL( progressItemUsesCrypto(KPIM::ProgressItem*, bool) ) );
emit progressItemAdded( t );
} else {
@@ -180,8 +180,8 @@ ProgressItem* ProgressManager::createProgressItemImpl(
}
ProgressItem* ProgressManager::createProgressItemImpl(
- const QString& parent, const QString &id,
- const QString &label, const QString& status,
+ const TQString& parent, const TQString &id,
+ const TQString &label, const TQString& status,
bool canBeCanceled, bool usesCrypto )
{
ProgressItem * p = mTransactions[parent];
@@ -210,7 +210,7 @@ void ProgressManager::slotStandardCancelHandler( ProgressItem *item )
ProgressItem* ProgressManager::singleItem() const
{
ProgressItem *item = 0;
- QDictIterator< ProgressItem > it( mTransactions );
+ TQDictIterator< ProgressItem > it( mTransactions );
for ( ; it.current(); ++it ) {
if ( !(*it)->parent() ) { // if it's a top level one, only those count
if ( item )
@@ -224,7 +224,7 @@ ProgressItem* ProgressManager::singleItem() const
void ProgressManager::slotAbortAll()
{
- QDictIterator< ProgressItem > it( mTransactions );
+ TQDictIterator< ProgressItem > it( mTransactions );
for ( ; it.current(); ++it ) {
it.current()->cancel();
}
diff --git a/libkdepim/progressmanager.h b/libkdepim/progressmanager.h
index 977aa5a14..b4233f8df 100644
--- a/libkdepim/progressmanager.h
+++ b/libkdepim/progressmanager.h
@@ -24,9 +24,9 @@
#ifndef __KPIM_PROGRESSMANAGER_H__
#define __KPIM_PROGRESSMANAGER_H__
-#include <qobject.h>
-#include <qdict.h>
-#include <qstring.h>
+#include <tqobject.h>
+#include <tqdict.h>
+#include <tqstring.h>
#include <kdepimmacros.h>
@@ -34,13 +34,13 @@ namespace KPIM {
class ProgressItem;
class ProgressManager;
-typedef QMap<ProgressItem*, bool> ProgressItemMap;
+typedef TQMap<ProgressItem*, bool> ProgressItemMap;
class KDE_EXPORT ProgressItem : public QObject
{
Q_OBJECT
friend class ProgressManager;
- friend class QDict< ProgressItem >; // so it can be deleted from dicts
+ friend class TQDict< ProgressItem >; // so it can be deleted from dicts
public:
@@ -48,7 +48,7 @@ class KDE_EXPORT ProgressItem : public QObject
* @return The id string which uniquely identifies the operation
* represented by this item.
*/
- const QString& id() const { return mId; }
+ const TQString& id() const { return mId; }
/**
* @return The parent item of this one, if there is one.
@@ -58,24 +58,24 @@ class KDE_EXPORT ProgressItem : public QObject
/**
* @return The user visible string to be used to represent this item.
*/
- const QString& label() const { return mLabel; }
+ const TQString& label() const { return mLabel; }
/**
* @param v Set the user visible string identifying this item. @p v will
be interpreted as rich text, so it might have to be escaped.
*/
- void setLabel( const QString& v );
+ void setLabel( const TQString& v );
/**
* @return The string to be used for showing this item's current status.
*/
- const QString& status() const { return mStatus; }
+ const TQString& status() const { return mStatus; }
/**
* Set the string to be used for showing this item's current status.
* @p v will be interpreted as rich text, so it might have to be escaped.
* @param v The status string.
*/
- void setStatus( const QString& v );
+ void setStatus( const TQString& v );
/**
* @return Whether this item can be cancelled.
@@ -119,7 +119,7 @@ class KDE_EXPORT ProgressItem : public QObject
* Reset the progress value of this item to 0 and the status string to
* the empty string.
*/
- void reset() { setProgress( 0 ); setStatus( QString::null ); mCompleted = 0; }
+ void reset() { setProgress( 0 ); setStatus( TQString::null ); mCompleted = 0; }
void cancel();
@@ -176,14 +176,14 @@ signals:
* @param The updated item.
* @param The new message.
*/
- void progressItemStatus( KPIM::ProgressItem*, const QString& );
+ void progressItemStatus( KPIM::ProgressItem*, const TQString& );
/**
* Emitted when the label of an item changed. Should be used by
* progress dialogs to update the label of an item.
* @param The updated item.
* @param The new label.
*/
- void progressItemLabel( KPIM::ProgressItem*, const QString& );
+ void progressItemLabel( KPIM::ProgressItem*, const TQString& );
/**
* Emitted when the crypto status of an item changed. Should be used by
* progress dialogs to update the crypto indicator of an item.
@@ -196,18 +196,18 @@ signals:
protected:
/* Only to be used by our good friend the ProgressManager */
ProgressItem( ProgressItem* parent,
- const QString& id,
- const QString& label,
- const QString& status,
+ const TQString& id,
+ const TQString& label,
+ const TQString& status,
bool isCancellable,
bool usesCrypto );
virtual ~ProgressItem();
private:
- QString mId;
- QString mLabel;
- QString mStatus;
+ TQString mId;
+ TQString mLabel;
+ TQString mStatus;
ProgressItem* mParent;
bool mCanBeCanceled;
unsigned int mProgress;
@@ -259,7 +259,7 @@ class KDE_EXPORT ProgressManager : public QObject
* number as the id string for your progressItem to ensure it is unique.
* @return
*/
- static QString getUniqueID() { return QString::number( ++uID ); }
+ static TQString getUniqueID() { return TQString::number( ++uID ); }
/**
* Creates a ProgressItem with a unique id and the given label.
@@ -269,9 +269,9 @@ class KDE_EXPORT ProgressManager : public QObject
* @param label The text to be displayed by progress handlers. It will be
* interpreted as rich text, so it might have to be escaped.
*/
- static ProgressItem * createProgressItem( const QString &label ) {
+ static ProgressItem * createProgressItem( const TQString &label ) {
return instance()->createProgressItemImpl( 0, getUniqueID(), label,
- QString::null, true, false );
+ TQString::null, true, false );
}
/**
@@ -291,9 +291,9 @@ class KDE_EXPORT ProgressManager : public QObject
* @return The ProgressItem representing the operation.
*/
static ProgressItem * createProgressItem( ProgressItem* parent,
- const QString& id,
- const QString& label,
- const QString& status = QString::null,
+ const TQString& id,
+ const TQString& label,
+ const TQString& status = TQString::null,
bool canBeCanceled = true,
bool usesCrypto = false ) {
return instance()->createProgressItemImpl( parent, id, label, status,
@@ -304,10 +304,10 @@ class KDE_EXPORT ProgressManager : public QObject
* Use this version if you have the id string of the parent and want to
* add a subjob to it.
*/
- static ProgressItem * createProgressItem( const QString& parent,
- const QString& id,
- const QString& label,
- const QString& status = QString::null,
+ static ProgressItem * createProgressItem( const TQString& parent,
+ const TQString& id,
+ const TQString& label,
+ const TQString& status = TQString::null,
bool canBeCanceled = true,
bool usesCrypto = false ) {
return instance()->createProgressItemImpl( parent, id, label,
@@ -317,9 +317,9 @@ class KDE_EXPORT ProgressManager : public QObject
/**
* Version without a parent.
*/
- static ProgressItem * createProgressItem( const QString& id,
- const QString& label,
- const QString& status = QString::null,
+ static ProgressItem * createProgressItem( const TQString& id,
+ const TQString& label,
+ const TQString& status = TQString::null,
bool canBeCanceled = true,
bool usesCrypto = false ) {
return instance()->createProgressItemImpl( 0, id, label, status,
@@ -356,9 +356,9 @@ class KDE_EXPORT ProgressManager : public QObject
/** @see ProgressItem::progressItemCanceled() */
void progressItemCanceled( KPIM::ProgressItem* );
/** @see ProgressItem::progressItemStatus() */
- void progressItemStatus( KPIM::ProgressItem*, const QString& );
+ void progressItemStatus( KPIM::ProgressItem*, const TQString& );
/** @see ProgressItem::progressItemLabel() */
- void progressItemLabel( KPIM::ProgressItem*, const QString& );
+ void progressItemLabel( KPIM::ProgressItem*, const TQString& );
/** @see ProgressItem::progressItemUsesCrypto() */
void progressItemUsesCrypto( KPIM::ProgressItem*, bool );
@@ -390,16 +390,16 @@ class KDE_EXPORT ProgressManager : public QObject
ProgressManager( const ProgressManager& );
virtual ProgressItem* createProgressItemImpl(
- ProgressItem* parent, const QString& id,
- const QString& label, const QString& status,
+ ProgressItem* parent, const TQString& id,
+ const TQString& label, const TQString& status,
bool cancellable, bool usesCrypto );
virtual ProgressItem* createProgressItemImpl(
- const QString& parent, const QString& id,
- const QString& label, const QString& status,
+ const TQString& parent, const TQString& id,
+ const TQString& label, const TQString& status,
bool cancellable, bool usesCrypto );
void emitShowProgressDialogImpl();
- QDict< ProgressItem > mTransactions;
+ TQDict< ProgressItem > mTransactions;
static ProgressManager *mInstance;
static unsigned int uID;
};
diff --git a/libkdepim/qutf7codec.cpp b/libkdepim/qutf7codec.cpp
index 8cc3d4564..11c0db929 100644
--- a/libkdepim/qutf7codec.cpp
+++ b/libkdepim/qutf7codec.cpp
@@ -1,7 +1,7 @@
/*
qutf7codec.cpp
- A QTextCodec for UTF-7 (rfc2152).
+ A TQTextCodec for UTF-7 (rfc2152).
Copyright (c) 2001 Marc Mutz <mutz@kde.org>
See file COPYING for details
@@ -47,11 +47,11 @@ const char* QUtf7Codec::mimeName() const {
return "UTF-7";
}
-bool QUtf7Codec::canEncode( QChar ) const {
+bool QUtf7Codec::canEncode( TQChar ) const {
return TRUE;
}
-bool QUtf7Codec::canEncode( const QString & ) const {
+bool QUtf7Codec::canEncode( const TQString & ) const {
return TRUE;
}
@@ -136,7 +136,7 @@ int QUtf7Codec::heuristicContentMatch(const char* chars, int len) const
return i;
}
-class QUtf7Decoder : public QTextDecoder {
+class QUtf7Decoder : public TQTextDecoder {
// the storage for our unicode char until it's finished
ushort uc;
// the state of the base64 decoding
@@ -170,9 +170,9 @@ private:
}
public:
- QString toUnicode(const char* chars, int len)
+ TQString toUnicode(const char* chars, int len)
{
- QString result = "";
+ TQString result = "";
for (int i=0; i<len; i++) {
uchar ch = chars[i];
@@ -183,7 +183,7 @@ public:
qWarning("QUtf7Decoder: 8bit char found in input. "
"Parser has been re-initialized!");
resetParser();
- result += QChar::replacement;
+ result += TQChar::replacement;
continue;
}
@@ -197,7 +197,7 @@ public:
// a "+-" sequence is a short-circuit encoding
// for just '+':
resetParser();
- result += QChar('+');
+ result += TQChar('+');
// we're already done for this "ch", so
continue;
}
@@ -249,7 +249,7 @@ public:
//
// now we're going to stuff the "bits" bit bucket into
// the right position inside "uc", emitting a resulting
- // QChar if possible.
+ // TQChar if possible.
//
switch (stepNo) {
// "bits" are the 6 msb's of uc
@@ -258,21 +258,21 @@ public:
case 1: uc |= bits << 4; break;
// 4 bits of "bits" complete the first ushort
- case 2: uc |= bits >> 2; result += QChar(uc);
+ case 2: uc |= bits >> 2; result += TQChar(uc);
// 2 bits of "bits" make the msb's of the next ushort
uc = bits << 14; break;
case 3: uc |= bits << 8; break;
case 4: uc |= bits << 2; break;
// 2 bits of "bits" complete the second ushort
- case 5: uc |= bits >> 4; result += QChar(uc);
+ case 5: uc |= bits >> 4; result += TQChar(uc);
// 4 bits of "bits" make the msb's of the next ushort
uc = bits << 12; break;
case 6: uc |= bits << 6; break;
// these 6 bits complete the third ushort
// and also one round of 8 chars -> 3 ushort decoding
- case 7: uc |= bits; result += QChar(uc);
+ case 7: uc |= bits; result += TQChar(uc);
uc = 0; break;
default: ;
} // switch (stepNo)
@@ -302,7 +302,7 @@ public:
rightAfterEscape = TRUE;
} else {
// US-ASCII values are directly used
- result += QChar(ch);
+ result += TQChar(ch);
}
}
@@ -312,13 +312,13 @@ public:
}; // class QUtf7Decoder
-QTextDecoder* QUtf7Codec::makeDecoder() const
+TQTextDecoder* QUtf7Codec::makeDecoder() const
{
return new QUtf7Decoder;
}
-class QUtf7Encoder : public QTextEncoder {
+class QUtf7Encoder : public TQTextEncoder {
uchar dontNeedEncodingSet[16];
ushort outbits;
uint stepNo : 2;
@@ -357,7 +357,7 @@ private:
return '/';
}
- void addToShiftedSequence(QCString::Iterator & t, ushort u) {
+ void addToShiftedSequence(TQCString::Iterator & t, ushort u) {
switch (stepNo) {
// no outbits; use uppermost 6 bits of u
case 0:
@@ -396,7 +396,7 @@ private:
stepNo = (stepNo + 1) % 3;
}
- void endShiftedSequence(QCString::Iterator & t) {
+ void endShiftedSequence(TQCString::Iterator & t) {
switch (stepNo) {
case 1: // four outbits still to be written
case 2: // two outbits still to be written
@@ -418,7 +418,7 @@ private:
( stepNo == 2 && (u & 0xC000) == 0 );
}
- void processDoesntNeedEncoding(QCString::Iterator & t, ushort ch) {
+ void processDoesntNeedEncoding(TQCString::Iterator & t, ushort ch) {
// doesn't need encoding
if (shifted) {
endShiftedSequence(t);
@@ -440,7 +440,7 @@ private:
}
public:
- QCString fromUnicode(const QString & uc, int & len_in_out)
+ TQCString fromUnicode(const TQString & uc, int & len_in_out)
{
// allocate place for worst case:
// len/2 * (5+1) for an alternating sequence of e.g. "A\",
@@ -448,7 +448,7 @@ public:
// + 1 for the trailing \0
//
int maxreslen = 3 * len_in_out + 5;
- QCString result( maxreslen );
+ TQCString result( maxreslen );
#if 0
// if (len_in_out == 1) {
@@ -462,8 +462,8 @@ public:
#endif
// source and destination cursor
- const QChar * s = uc.unicode();
- QCString::Iterator t = result.data();
+ const TQChar * s = uc.unicode();
+ TQCString::Iterator t = result.data();
if ( uc.isNull() ) {
// return to ascii requested:
@@ -539,11 +539,11 @@ public:
}; // class QUtf7Encoder
-QTextEncoder* QUtf7Codec::makeEncoder() const {
+TQTextEncoder* QUtf7Codec::makeEncoder() const {
return new QUtf7Encoder( false, false );
}
-QTextEncoder* QStrictUtf7Codec::makeEncoder() const {
+TQTextEncoder* QStrictUtf7Codec::makeEncoder() const {
return new QUtf7Encoder( true, false );
}
diff --git a/libkdepim/qutf7codec.h b/libkdepim/qutf7codec.h
index b3380b1f0..675692afa 100644
--- a/libkdepim/qutf7codec.h
+++ b/libkdepim/qutf7codec.h
@@ -1,7 +1,7 @@
/*
qutf7codec.h
- A QTextCodec for UTF-7 (rfc2152).
+ A TQTextCodec for UTF-7 (rfc2152).
Copyright (c) 2001 Marc Mutz <mutz@kde.org>
See file COPYING for details
@@ -26,41 +26,41 @@
#define QUTF7CODEC_H
#ifndef QT_H
-#include "qtextcodec.h"
+#include "tqtextcodec.h"
#endif
#include <kdepimmacros.h>
#ifndef QT_NO_TEXTCODEC
-/** @short A QTextCodec for the UTF-7 transformation of Unicode.
+/** @short A TQTextCodec for the UTF-7 transformation of Unicode.
- This is a QTextCodec for the UTF-7 transformation of Unicode,
+ This is a TQTextCodec for the UTF-7 transformation of Unicode,
described in RFC2152.
- Use it as you would use any other QTextCodec. Only if you use the
+ Use it as you would use any other TQTextCodec. Only if you use the
encoder directly (via makeEncoder), you should bear in mind
that if your application needs the encoder to return to ASCII mode
(like it's the case for RFC2047 mail header encoded words), you
have to tell the encoder by requesting the encoding of a @em null
- QString.
+ TQString.
@author Marc Mutz <mutz@kde.org> */
-class KDE_EXPORT QUtf7Codec : public QTextCodec {
+class KDE_EXPORT QUtf7Codec : public TQTextCodec {
bool encOpt, encLwsp;
public:
- QUtf7Codec() : QTextCodec() {}
+ QUtf7Codec() : TQTextCodec() {}
int mibEnum() const;
const char* name() const;
const char* mimeName() const;
- QTextDecoder* makeDecoder() const;
- QTextEncoder* makeEncoder() const;
+ TQTextDecoder* makeDecoder() const;
+ TQTextEncoder* makeEncoder() const;
- bool canEncode( QChar ) const;
- bool canEncode( const QString& ) const;
+ bool canEncode( TQChar ) const;
+ bool canEncode( const TQString& ) const;
int heuristicContentMatch( const char* chars, int len ) const;
};
@@ -90,7 +90,7 @@ public:
const char* name() const;
int mibEnum() const;
- QTextEncoder* makeEncoder() const;
+ TQTextEncoder* makeEncoder() const;
};
#endif // QT_NO_TEXTCODEC
diff --git a/libkdepim/qutf7codecplugin.cpp b/libkdepim/qutf7codecplugin.cpp
index 54fb68c56..0564b4142 100644
--- a/libkdepim/qutf7codecplugin.cpp
+++ b/libkdepim/qutf7codecplugin.cpp
@@ -1,7 +1,7 @@
/*
qutf7codecplugin.cpp
- A QTextCodec for UTF-7 (rfc2152).
+ A TQTextCodec for UTF-7 (rfc2152).
Copyright (c) 2001 Marc Mutz <mutz@kde.org>
See file COPYING for details
@@ -24,26 +24,26 @@
#include "qutf7codec.h"
-#include <qtextcodecplugin.h>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qvaluelist.h>
+#include <tqtextcodecplugin.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqvaluelist.h>
class QTextCodec;
// ######### This file isn't compiled currently
-class QUtf7CodecPlugin : public QTextCodecPlugin {
+class QUtf7CodecPlugin : public TQTextCodecPlugin {
public:
QUtf7CodecPlugin() {}
- QStringList names() const { return QStringList() << "UTF-7" << "X-QT-UTF-7-STRICT"; }
- QValueList<int> mibEnums() const { return QValueList<int>() << 1012 << -1012; }
- QTextCodec * createForMib( int );
- QTextCodec * createForName( const QString & );
+ TQStringList names() const { return TQStringList() << "UTF-7" << "X-QT-UTF-7-STRICT"; }
+ TQValueList<int> mibEnums() const { return TQValueList<int>() << 1012 << -1012; }
+ TQTextCodec * createForMib( int );
+ TQTextCodec * createForName( const TQString & );
};
-QTextCodec * QUtf7CodecPlugin::createForMib( int mib ) {
+TQTextCodec * QUtf7CodecPlugin::createForMib( int mib ) {
if ( mib == 1012 )
return new QUtf7Codec();
else if ( mib == -1012 )
@@ -51,7 +51,7 @@ QTextCodec * QUtf7CodecPlugin::createForMib( int mib ) {
return 0;
}
-QTextCodec * QUtf7CodecPlugin::createForName( const QString & name ) {
+TQTextCodec * QUtf7CodecPlugin::createForName( const TQString & name ) {
if ( name == "UTF-7" )
return new QUtf7Codec();
else if ( name == "X-QT-UTF-7-STRICT" )
diff --git a/libkdepim/recentaddresses.cpp b/libkdepim/recentaddresses.cpp
index ebac9e3f7..a8e7e76b5 100644
--- a/libkdepim/recentaddresses.cpp
+++ b/libkdepim/recentaddresses.cpp
@@ -39,7 +39,7 @@
#include <keditlistbox.h>
-#include <qlayout.h>
+#include <tqlayout.h>
using namespace KRecentAddress;
@@ -70,15 +70,15 @@ RecentAddresses::~RecentAddresses()
void RecentAddresses::load( KConfig *config )
{
- QStringList addresses;
- QString name;
- QString email;
+ TQStringList addresses;
+ TQString name;
+ TQString email;
m_addresseeList.clear();
KConfigGroupSaver cs( config, "General" );
m_maxCount = config->readNumEntry( "Maximum Recent Addresses", 40 );
addresses = config->readListEntry( "Recent Addresses" );
- for ( QStringList::Iterator it = addresses.begin(); it != addresses.end(); ++it ) {
+ for ( TQStringList::Iterator it = addresses.begin(); it != addresses.end(); ++it ) {
KABC::Addressee::parseEmailAddress( *it, name, email );
if ( !email.isEmpty() ) {
KABC::Addressee addr;
@@ -97,16 +97,16 @@ void RecentAddresses::save( KConfig *config )
config->writeEntry( "Recent Addresses", addresses() );
}
-void RecentAddresses::add( const QString& entry )
+void RecentAddresses::add( const TQString& entry )
{
if ( !entry.isEmpty() && m_maxCount > 0 ) {
- QStringList list = KPIM::splitEmailAddrList( entry );
- for( QStringList::const_iterator e_it = list.begin(); e_it != list.end(); ++e_it ) {
+ TQStringList list = KPIM::splitEmailAddrList( entry );
+ for( TQStringList::const_iterator e_it = list.begin(); e_it != list.end(); ++e_it ) {
KPIM::EmailParseResult errorCode = KPIM::isValidEmailAddress( *e_it );
if ( errorCode != KPIM::AddressOk )
continue;
- QString email;
- QString fullName;
+ TQString email;
+ TQString fullName;
KABC::Addressee addr;
KABC::Addressee::parseEmailAddress( *e_it, fullName, email );
@@ -146,9 +146,9 @@ void RecentAddresses::clear()
adjustSize();
}
-QStringList RecentAddresses::addresses() const
+TQStringList RecentAddresses::addresses() const
{
- QStringList addresses;
+ TQStringList addresses;
for ( KABC::Addressee::List::ConstIterator it = m_addresseeList.begin();
it != m_addresseeList.end(); ++it )
{
@@ -157,25 +157,25 @@ QStringList RecentAddresses::addresses() const
return addresses;
}
-RecentAddressDialog::RecentAddressDialog( QWidget *parent, const char *name )
+RecentAddressDialog::RecentAddressDialog( TQWidget *parent, const char *name )
: KDialogBase( Plain, i18n( "Edit Recent Addresses" ), Ok | Cancel, Ok,
parent, name, true )
{
- QWidget *page = plainPage();
- QVBoxLayout *layout = new QVBoxLayout( page, 0, spacingHint() );
+ TQWidget *page = plainPage();
+ TQVBoxLayout *layout = new TQVBoxLayout( page, 0, spacingHint() );
mEditor = new KEditListBox( i18n( "Recent Addresses" ), page, "", false,
KEditListBox::Add | KEditListBox::Remove );
layout->addWidget( mEditor );
}
-void RecentAddressDialog::setAddresses( const QStringList &addrs )
+void RecentAddressDialog::setAddresses( const TQStringList &addrs )
{
mEditor->clear();
mEditor->insertStringList( addrs );
}
-QStringList RecentAddressDialog::addresses() const
+TQStringList RecentAddressDialog::addresses() const
{
return mEditor->items();
}
diff --git a/libkdepim/recentaddresses.h b/libkdepim/recentaddresses.h
index 917d63fbe..03254031b 100644
--- a/libkdepim/recentaddresses.h
+++ b/libkdepim/recentaddresses.h
@@ -30,7 +30,7 @@
#ifndef RECENTADDRESSES_H
#define RECENTADDRESSES_H
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include <kabc/addressee.h>
#include <kdialogbase.h>
@@ -44,9 +44,9 @@ namespace KRecentAddress {
class KDE_EXPORT RecentAddressDialog : public KDialogBase
{
public:
- RecentAddressDialog( QWidget *parent, const char *name = 0 );
- void setAddresses( const QStringList &addrs );
- QStringList addresses() const;
+ RecentAddressDialog( TQWidget *parent, const char *name = 0 );
+ void setAddresses( const TQStringList &addrs );
+ TQStringList addresses() const;
private:
KEditListBox *mEditor;
};
@@ -77,7 +77,7 @@ public:
* Note: an entry doesn't have to be one email address, it can be multiple,
* like "Foo <foo@bar.org>, Bar Baz <bar@baz.org>".
*/
- QStringList addresses() const;
+ TQStringList addresses() const;
const KABC::Addressee::List& kabcAddresses() const { return m_addresseeList; }
/**
@@ -85,7 +85,7 @@ public:
* Note: an entry doesn't have to be one email address, it can be multiple,
* like "Foo <foo@bar.org>, Bar Baz <bar@baz.org>".
*/
- void add( const QString& entry );
+ void add( const TQString& entry );
/**
* Sets the maximum number, the list can hold. The list adjusts to this
diff --git a/libkdepim/resourceabc.h b/libkdepim/resourceabc.h
index dab79d0a2..90abbf72b 100644
--- a/libkdepim/resourceabc.h
+++ b/libkdepim/resourceabc.h
@@ -26,7 +26,7 @@
#define RESOURCEABC_H
#include <kabc/resource.h>
-#include <qmap.h>
+#include <tqmap.h>
#include <kdepimmacros.h>
// This is here because it can't go to kdelibs/kabc yet, but ultimately
@@ -55,58 +55,58 @@ public:
* The returned map has the UID as key and the resource it's in as
* the data.
*/
- virtual QMap<QString, QString> uidToResourceMap() const = 0;
+ virtual TQMap<TQString, TQString> uidToResourceMap() const = 0;
/**
- * If this resource has subresources, return a QStringList of them.
+ * If this resource has subresources, return a TQStringList of them.
* In most cases, resources do not have subresources, so this is
* by default just empty.
*/
- virtual QStringList subresources() const { return QStringList(); }
+ virtual TQStringList subresources() const { return TQStringList(); }
/**
* Is this subresource active or not?
*/
- virtual bool subresourceActive( const QString& ) const { return true; }
+ virtual bool subresourceActive( const TQString& ) const { return true; }
/**
* Is the given subresource writable?
*/
- virtual bool subresourceWritable( const QString& ) const = 0;
+ virtual bool subresourceWritable( const TQString& ) const = 0;
/**
* Completion weight for a given subresource
*/
- virtual int subresourceCompletionWeight( const QString& ) const = 0;
+ virtual int subresourceCompletionWeight( const TQString& ) const = 0;
/**
* Label for a given subresource
*/
- virtual QString subresourceLabel( const QString& ) const = 0;
+ virtual TQString subresourceLabel( const TQString& ) const = 0;
public slots:
/**
* (De-)activate a subresource.
*/
- virtual void setSubresourceActive( const QString &, bool active ) = 0;
+ virtual void setSubresourceActive( const TQString &, bool active ) = 0;
/**
* Set completion weight for a given subresource
*/
- virtual void setSubresourceCompletionWeight( const QString&, int weight ) = 0;
+ virtual void setSubresourceCompletionWeight( const TQString&, int weight ) = 0;
signals:
/**
* This signal is emitted when a subresource is added.
*/
- void signalSubresourceAdded( KPIM::ResourceABC *, const QString &type,
- const QString &subResource );
+ void signalSubresourceAdded( KPIM::ResourceABC *, const TQString &type,
+ const TQString &subResource );
/**
* This signal is emitted when a subresource is removed.
*/
- void signalSubresourceRemoved( KPIM::ResourceABC *, const QString &type,
- const QString &subResource );
+ void signalSubresourceRemoved( KPIM::ResourceABC *, const TQString &type,
+ const TQString &subResource );
};
diff --git a/libkdepim/sendsmsdialog.cpp b/libkdepim/sendsmsdialog.cpp
index 51608f234..93671a347 100644
--- a/libkdepim/sendsmsdialog.cpp
+++ b/libkdepim/sendsmsdialog.cpp
@@ -19,46 +19,46 @@
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qtextedit.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqtextedit.h>
#include <klocale.h>
#include "sendsmsdialog.h"
-SendSMSDialog::SendSMSDialog( const QString &recipientName, QWidget *parent, const char *name )
+SendSMSDialog::SendSMSDialog( const TQString &recipientName, TQWidget *parent, const char *name )
: KDialogBase( Plain, i18n( "Send SMS" ), Ok | Cancel, Ok, parent, name, true, true )
{
- QWidget *page = plainPage();
+ TQWidget *page = plainPage();
- QGridLayout *layout = new QGridLayout( page, 3, 3, marginHint(), spacingHint() );
+ TQGridLayout *layout = new TQGridLayout( page, 3, 3, marginHint(), spacingHint() );
- layout->addWidget( new QLabel( i18n( "Message" ), page ), 0, 0 );
+ layout->addWidget( new TQLabel( i18n( "Message" ), page ), 0, 0 );
- mMessageLength = new QLabel( "0/160", page );
+ mMessageLength = new TQLabel( "0/160", page );
mMessageLength->setAlignment( Qt::AlignRight );
layout->addWidget( mMessageLength, 0, 2 );
- mText = new QTextEdit( page );
+ mText = new TQTextEdit( page );
layout->addMultiCellWidget( mText, 1, 1, 0, 2 );
- layout->addWidget( new QLabel( i18n( "Recipient:" ), page ), 2, 0 );
- layout->addWidget( new QLabel( recipientName, page ), 2, 2 );
+ layout->addWidget( new TQLabel( i18n( "Recipient:" ), page ), 2, 0 );
+ layout->addWidget( new TQLabel( recipientName, page ), 2, 2 );
setButtonText( Ok, i18n( "Send" ) );
- connect( mText, SIGNAL( textChanged() ),
- this, SLOT( updateMessageLength() ) );
- connect( mText, SIGNAL( textChanged() ),
- this, SLOT( updateButtons() ) );
+ connect( mText, TQT_SIGNAL( textChanged() ),
+ this, TQT_SLOT( updateMessageLength() ) );
+ connect( mText, TQT_SIGNAL( textChanged() ),
+ this, TQT_SLOT( updateButtons() ) );
updateButtons();
mText->setFocus();
}
-QString SendSMSDialog::text() const
+TQString SendSMSDialog::text() const
{
return mText->text();
}
@@ -68,13 +68,13 @@ void SendSMSDialog::updateMessageLength()
int length = mText->length();
if( length > 480 )
- mMessageLength->setText( QString( "%1/%2 (%3)" ).arg( length ).arg( 500 ).arg( 4 ) );
+ mMessageLength->setText( TQString( "%1/%2 (%3)" ).arg( length ).arg( 500 ).arg( 4 ) );
else if( length > 320 )
- mMessageLength->setText( QString( "%1/%2 (%3)" ).arg( length ).arg( 480 ).arg( 3 ) );
+ mMessageLength->setText( TQString( "%1/%2 (%3)" ).arg( length ).arg( 480 ).arg( 3 ) );
else if( length > 160 )
- mMessageLength->setText( QString( "%1/%2 (%3)" ).arg( length ).arg( 320 ).arg( 2 ) );
+ mMessageLength->setText( TQString( "%1/%2 (%3)" ).arg( length ).arg( 320 ).arg( 2 ) );
else
- mMessageLength->setText( QString( "%1/%2" ).arg( length ).arg( 160 ) );
+ mMessageLength->setText( TQString( "%1/%2" ).arg( length ).arg( 160 ) );
}
void SendSMSDialog::updateButtons()
diff --git a/libkdepim/sendsmsdialog.h b/libkdepim/sendsmsdialog.h
index e79a08bac..a7ebe3a70 100644
--- a/libkdepim/sendsmsdialog.h
+++ b/libkdepim/sendsmsdialog.h
@@ -32,17 +32,17 @@ class SendSMSDialog : public KDialogBase
Q_OBJECT
public:
- SendSMSDialog( const QString &recipientName, QWidget *parent, const char *name = 0 );
+ SendSMSDialog( const TQString &recipientName, TQWidget *parent, const char *name = 0 );
- QString text() const;
+ TQString text() const;
private slots:
void updateMessageLength();
void updateButtons();
private:
- QLabel *mMessageLength;
- QTextEdit *mText;
+ TQLabel *mMessageLength;
+ TQTextEdit *mText;
};
#endif
diff --git a/libkdepim/sidebarextension.cpp b/libkdepim/sidebarextension.cpp
index a3251ee7d..dc3413ebc 100644
--- a/libkdepim/sidebarextension.cpp
+++ b/libkdepim/sidebarextension.cpp
@@ -21,13 +21,13 @@
#include "sidebarextension.h"
-#include <qwidget.h>
+#include <tqwidget.h>
#include <kparts/part.h>
using namespace KParts;
-SideBarExtension::SideBarExtension(QWidget *exported, KParts::ReadOnlyPart *parent, const char* name)
-: QObject(parent, name), m_exported(exported), d(0)
+SideBarExtension::SideBarExtension(TQWidget *exported, KParts::ReadOnlyPart *parent, const char* name)
+: TQObject(parent, name), m_exported(exported), d(0)
{
}
diff --git a/libkdepim/sidebarextension.h b/libkdepim/sidebarextension.h
index b1f6bccdd..e65d3c94a 100644
--- a/libkdepim/sidebarextension.h
+++ b/libkdepim/sidebarextension.h
@@ -21,7 +21,7 @@
#ifndef SIDEBAREXTENSION_H
#define SIDEBAREXTENSION_H
-#include <qobject.h>
+#include <tqobject.h>
#include <kdepimmacros.h>
class QWidget;
@@ -43,21 +43,21 @@ namespace KParts
/**
* Constucts a SideBarExtension.
*
- * @param exported A QWidget derived widget that will be provided for the
+ * @param exported A TQWidget derived widget that will be provided for the
* users of SideBarExtension.
* @param parent The parent widget.
* @param name The name of the class.
**/
- SideBarExtension(QWidget *exported, KParts::ReadOnlyPart *parent, const char* name);
+ SideBarExtension(TQWidget *exported, KParts::ReadOnlyPart *parent, const char* name);
~SideBarExtension();
/**
* Retrieve a pointer to the widget. May be 0 if 0 was passed in the constructor
**/
- QWidget* widget() const { return m_exported; }
+ TQWidget* widget() const { return m_exported; }
private:
- QWidget* m_exported;
+ TQWidget* m_exported;
class SideBarExtensionPrivate;
SideBarExtensionPrivate *d;
diff --git a/libkdepim/spellingfilter.cpp b/libkdepim/spellingfilter.cpp
index d58ab3162..cc94968d4 100644
--- a/libkdepim/spellingfilter.cpp
+++ b/libkdepim/spellingfilter.cpp
@@ -27,9 +27,9 @@
// SpellingFilter implementation
//
-SpellingFilter::SpellingFilter(const QString& text, const QString& quotePrefix,
+SpellingFilter::SpellingFilter(const TQString& text, const TQString& quotePrefix,
UrlFiltering filterUrls, EmailAddressFiltering filterEmailAddresses,
- const QStringList& filterStrings)
+ const TQStringList& filterStrings)
: mOriginal(text)
{
TextCensor c(text);
@@ -43,7 +43,7 @@ SpellingFilter::SpellingFilter(const QString& text, const QString& quotePrefix,
if(filterEmailAddresses)
c.censorEmailAddresses();
- QStringList::const_iterator iter = filterStrings.begin();
+ TQStringList::const_iterator iter = filterStrings.begin();
while(iter != filterStrings.end())
{
c.censorString(*iter);
@@ -53,12 +53,12 @@ SpellingFilter::SpellingFilter(const QString& text, const QString& quotePrefix,
mFiltered = c.censoredText();
}
-QString SpellingFilter::originalText() const
+TQString SpellingFilter::originalText() const
{
return mOriginal;
}
-QString SpellingFilter::filteredText() const
+TQString SpellingFilter::filteredText() const
{
return mFiltered;
}
@@ -67,13 +67,13 @@ QString SpellingFilter::filteredText() const
// SpellingFilter::TextCensor implementation
//
-SpellingFilter::TextCensor::TextCensor(const QString& s)
+SpellingFilter::TextCensor::TextCensor(const TQString& s)
: LinkLocator(s)
{
}
-void SpellingFilter::TextCensor::censorQuotations(const QString& quotePrefix)
+void SpellingFilter::TextCensor::censorQuotations(const TQString& quotePrefix)
{
mPos = 0;
while(mPos < static_cast<int>(mText.length()))
@@ -87,7 +87,7 @@ void SpellingFilter::TextCensor::censorQuotations(const QString& quotePrefix)
// Replace quotation with spaces
int len = mPos - start;
- QString spaces;
+ TQString spaces;
spaces.fill(' ', len);
mText.replace(start, len, spaces);
@@ -103,7 +103,7 @@ void SpellingFilter::TextCensor::censorUrls()
while(mPos < static_cast<int>(mText.length()))
{
// Find start of url
- QString url;
+ TQString url;
while(mPos < static_cast<int>(mText.length()) && url.isEmpty())
{
url = getUrl();
@@ -133,7 +133,7 @@ void SpellingFilter::TextCensor::censorEmailAddresses()
findEmailAddress();
if(mPos < static_cast<int>(mText.length()))
{
- QString address = getEmailAddress();
+ TQString address = getEmailAddress();
++mPos;
if(!address.isEmpty())
{
@@ -150,7 +150,7 @@ void SpellingFilter::TextCensor::censorEmailAddresses()
}
}
-void SpellingFilter::TextCensor::censorString(const QString& s)
+void SpellingFilter::TextCensor::censorString(const TQString& s)
{
mPos = 0;
while(mPos != -1)
@@ -160,7 +160,7 @@ void SpellingFilter::TextCensor::censorString(const QString& s)
if(mPos != -1)
{
// Replace string with spaces
- QString spaces;
+ TQString spaces;
spaces.fill(' ', s.length());
mText.replace(mPos, s.length(), spaces);
mPos += s.length();
@@ -171,7 +171,7 @@ void SpellingFilter::TextCensor::censorString(const QString& s)
}
}
-QString SpellingFilter::TextCensor::censoredText() const
+TQString SpellingFilter::TextCensor::censoredText() const
{
return mText;
}
@@ -194,19 +194,19 @@ void SpellingFilter::TextCensor::skipLine()
++mPos;
}
-bool SpellingFilter::TextCensor::atQuotation(const QString& quotePrefix) const
+bool SpellingFilter::TextCensor::atQuotation(const TQString& quotePrefix) const
{
return atLineStart() &&
mText.mid(mPos, quotePrefix.length()) == quotePrefix;
}
-void SpellingFilter::TextCensor::skipQuotation(const QString& quotePrefix)
+void SpellingFilter::TextCensor::skipQuotation(const TQString& quotePrefix)
{
while(atQuotation(quotePrefix))
skipLine();
}
-void SpellingFilter::TextCensor::findQuotation(const QString& quotePrefix)
+void SpellingFilter::TextCensor::findQuotation(const TQString& quotePrefix)
{
while(mPos < static_cast<int>(mText.length()) && !atQuotation(quotePrefix))
skipLine();
diff --git a/libkdepim/spellingfilter.h b/libkdepim/spellingfilter.h
index 5d33aae88..ac0fe02d7 100644
--- a/libkdepim/spellingfilter.h
+++ b/libkdepim/spellingfilter.h
@@ -23,8 +23,8 @@
#ifndef SPELLINGFILTER_H_INCLUDED
#define SPELLINGFILTER_H_INCLUDED
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
#include "linklocator.h"
#include <kdepimmacros.h>
@@ -35,40 +35,40 @@ public:
enum UrlFiltering { DontFilterUrls, FilterUrls };
enum EmailAddressFiltering { DontFilterEmailAddresses, FilterEmailAddresses };
- SpellingFilter(const QString& text, const QString& quotePrefix,
+ SpellingFilter(const TQString& text, const TQString& quotePrefix,
UrlFiltering filterUrls = FilterUrls,
EmailAddressFiltering filterEmailAddresses = FilterEmailAddresses,
- const QStringList& filterStrings = QStringList());
+ const TQStringList& filterStrings = TQStringList());
- QString originalText() const;
- QString filteredText() const;
+ TQString originalText() const;
+ TQString filteredText() const;
class TextCensor;
private:
- const QString mOriginal;
- QString mFiltered;
+ const TQString mOriginal;
+ TQString mFiltered;
};
class SpellingFilter::TextCensor : public LinkLocator
{
public:
- TextCensor(const QString& s);
+ TextCensor(const TQString& s);
- void censorQuotations(const QString& quotePrefix);
+ void censorQuotations(const TQString& quotePrefix);
void censorUrls();
void censorEmailAddresses();
- void censorString(const QString& s);
+ void censorString(const TQString& s);
- QString censoredText() const;
+ TQString censoredText() const;
private:
bool atLineStart() const;
void skipLine();
- bool atQuotation(const QString& quotePrefix) const;
- void skipQuotation(const QString& quotePrefix);
- void findQuotation(const QString& quotePrefix);
+ bool atQuotation(const TQString& quotePrefix) const;
+ void skipQuotation(const TQString& quotePrefix);
+ void findQuotation(const TQString& quotePrefix);
void findEmailAddress();
};
diff --git a/libkdepim/ssllabel.cpp b/libkdepim/ssllabel.cpp
index c606928da..3ad982390 100644
--- a/libkdepim/ssllabel.cpp
+++ b/libkdepim/ssllabel.cpp
@@ -37,12 +37,12 @@
#include <kiconloader.h>
#include <klocale.h>
-#include <qtooltip.h>
+#include <tqtooltip.h>
namespace KPIM {
-SSLLabel::SSLLabel( QWidget* parent )
- : QLabel( parent )
+SSLLabel::SSLLabel( TQWidget* parent )
+ : TQLabel( parent )
{
setState( Done );
}
@@ -65,24 +65,24 @@ void SSLLabel::setState( State state )
{
switch( state ) {
case Encrypted:
- QToolTip::remove( this );
- QToolTip::add( this, i18n("Connection is encrypted") );
+ TQToolTip::remove( this );
+ TQToolTip::add( this, i18n("Connection is encrypted") );
setPixmap( SmallIcon( "encrypted", KGlobal::instance() ) );
show();
break;
case Unencrypted:
- QToolTip::remove( this );
- QToolTip::add( this, i18n("Connection is unencrypted") );
+ TQToolTip::remove( this );
+ TQToolTip::add( this, i18n("Connection is unencrypted") );
setPixmap( SmallIcon( "decrypted" ) );
show();
break;
case Done:
- QToolTip::remove( this );
+ TQToolTip::remove( this );
hide();
break;
case Clean:
default:
- QToolTip::remove( this );
+ TQToolTip::remove( this );
hide();
//we return because we do not save the state as the only
//action we want to perform is to hide ourself
diff --git a/libkdepim/ssllabel.h b/libkdepim/ssllabel.h
index 0c4032b8c..06a638606 100644
--- a/libkdepim/ssllabel.h
+++ b/libkdepim/ssllabel.h
@@ -32,7 +32,7 @@
#ifndef SSLLABEL_H
#define SSLLABEL_H
-#include <qlabel.h>
+#include <tqlabel.h>
namespace KPIM {
@@ -45,7 +45,7 @@ namespace KPIM {
Clean,
Done
};
- SSLLabel( QWidget* parent );
+ SSLLabel( TQWidget* parent );
void setEncrypted( bool enc=true );
void setState( State state );
diff --git a/libkdepim/statusbarprogresswidget.cpp b/libkdepim/statusbarprogresswidget.cpp
index 3d0229fc5..c6fa807a2 100644
--- a/libkdepim/statusbarprogresswidget.cpp
+++ b/libkdepim/statusbarprogresswidget.cpp
@@ -43,14 +43,14 @@ using KPIM::ProgressManager;
#include <kiconloader.h>
#include <kdebug.h>
-#include <qtimer.h>
-#include <qlabel.h>
-#include <qpushbutton.h>
-#include <qtooltip.h>
+#include <tqtimer.h>
+#include <tqlabel.h>
+#include <tqpushbutton.h>
+#include <tqtooltip.h>
#include <klocale.h>
-#include <qlayout.h>
-#include <qwidgetstack.h>
-#include <qframe.h>
+#include <tqlayout.h>
+#include <tqwidgetstack.h>
+#include <tqframe.h>
#include "progressdialog.h"
#include "statusbarprogresswidget.h"
@@ -58,36 +58,36 @@ using KPIM::ProgressManager;
using namespace KPIM;
//-----------------------------------------------------------------------------
-StatusbarProgressWidget::StatusbarProgressWidget( ProgressDialog* progressDialog, QWidget* parent, bool button )
- : QFrame( parent ), mCurrentItem( 0 ), mProgressDialog( progressDialog ),
+StatusbarProgressWidget::StatusbarProgressWidget( ProgressDialog* progressDialog, TQWidget* parent, bool button )
+ : TQFrame( parent ), mCurrentItem( 0 ), mProgressDialog( progressDialog ),
mDelayTimer( 0 ), mBusyTimer( 0 )
{
m_bShowButton = button;
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( this );
- m_pButton->setSizePolicy( QSizePolicy( QSizePolicy::Minimum,
- QSizePolicy::Minimum ) );
+ m_pButton = new TQPushButton( this );
+ m_pButton->setSizePolicy( TQSizePolicy( TQSizePolicy::Minimum,
+ TQSizePolicy::Minimum ) );
m_pButton->setPixmap( SmallIcon( "up" ) );
box->addWidget( m_pButton );
- stack = new QWidgetStack( this );
+ stack = new TQWidgetStack( this );
stack->setMaximumHeight( fontMetrics().height() );
box->addWidget( stack );
m_sslLabel = new SSLLabel( this );
box->addWidget( m_sslLabel );
- QToolTip::add( m_pButton, i18n("Open detailed progress dialog") );
+ TQToolTip::add( m_pButton, i18n("Open detailed progress dialog") );
m_pProgressBar = new KProgress( this );
m_pProgressBar->setLineWidth( 1 );
- m_pProgressBar->setFrameStyle( QFrame::Box );
+ m_pProgressBar->setFrameStyle( TQFrame::Box );
m_pProgressBar->installEventFilter( this );
m_pProgressBar->setMinimumWidth( w );
stack->addWidget( m_pProgressBar, 1 );
- m_pLabel = new QLabel( QString::null, this );
+ m_pLabel = new TQLabel( TQString::null, this );
m_pLabel->setAlignment( AlignHCenter | AlignVCenter );
m_pLabel->installEventFilter( this );
m_pLabel->setMinimumWidth( w );
@@ -98,20 +98,20 @@ StatusbarProgressWidget::StatusbarProgressWidget( ProgressDialog* progressDialog
mode = None;
setMode();
- connect( m_pButton, SIGNAL( clicked() ),
- progressDialog, SLOT( slotToggleVisibility() ) );
+ connect( m_pButton, TQT_SIGNAL( clicked() ),
+ progressDialog, TQT_SLOT( slotToggleVisibility() ) );
- connect ( ProgressManager::instance(), SIGNAL( progressItemAdded( KPIM::ProgressItem * ) ),
- this, SLOT( slotProgressItemAdded( KPIM::ProgressItem * ) ) );
- connect ( ProgressManager::instance(), SIGNAL( progressItemCompleted( KPIM::ProgressItem * ) ),
- this, SLOT( slotProgressItemCompleted( KPIM::ProgressItem * ) ) );
+ connect ( ProgressManager::instance(), TQT_SIGNAL( progressItemAdded( KPIM::ProgressItem * ) ),
+ this, TQT_SLOT( slotProgressItemAdded( KPIM::ProgressItem * ) ) );
+ connect ( ProgressManager::instance(), TQT_SIGNAL( progressItemCompleted( KPIM::ProgressItem * ) ),
+ this, TQT_SLOT( slotProgressItemCompleted( KPIM::ProgressItem * ) ) );
- connect ( progressDialog, SIGNAL( visibilityChanged( bool )),
- this, SLOT( slotProgressDialogVisible( bool ) ) );
+ connect ( progressDialog, TQT_SIGNAL( visibilityChanged( bool )),
+ this, TQT_SLOT( slotProgressDialogVisible( bool ) ) );
- mDelayTimer = new QTimer( this );
- connect ( mDelayTimer, SIGNAL( timeout() ),
- this, SLOT( slotShowItemDelayed() ) );
+ mDelayTimer = new TQTimer( this );
+ connect ( mDelayTimer, TQT_SIGNAL( timeout() ),
+ this, TQT_SLOT( slotShowItemDelayed() ) );
}
// There are three cases: no progressitem, one progressitem (connect to it directly),
@@ -130,9 +130,9 @@ void StatusbarProgressWidget::slotProgressItemAdded( ProgressItem *item )
}
else { // N items
if ( !mBusyTimer ) {
- mBusyTimer = new QTimer( this );
- connect( mBusyTimer, SIGNAL( timeout() ),
- this, SLOT( slotBusyIndicator() ) );
+ mBusyTimer = new TQTimer( this );
+ connect( mBusyTimer, TQT_SIGNAL( timeout() ),
+ this, TQT_SLOT( slotBusyIndicator() ) );
mDelayTimer->start( 1000, true );
}
}
@@ -144,7 +144,7 @@ void StatusbarProgressWidget::slotProgressItemCompleted( ProgressItem *item )
connectSingleItem(); // if going back to 1 item
if ( ProgressManager::instance()->isEmpty() ) { // No item
// Done. In 5s the progress-widget will close, then we can clean up the statusbar
- QTimer::singleShot( 5000, this, SLOT( slotClean() ) );
+ TQTimer::singleShot( 5000, this, TQT_SLOT( slotClean() ) );
} else if ( mCurrentItem ) { // Exactly one item
delete mBusyTimer;
mBusyTimer = 0;
@@ -155,14 +155,14 @@ void StatusbarProgressWidget::slotProgressItemCompleted( ProgressItem *item )
void StatusbarProgressWidget::connectSingleItem()
{
if ( mCurrentItem ) {
- disconnect ( mCurrentItem, SIGNAL( progressItemProgress( KPIM::ProgressItem *, unsigned int ) ),
- this, SLOT( slotProgressItemProgress( KPIM::ProgressItem *, unsigned int ) ) );
+ disconnect ( mCurrentItem, TQT_SIGNAL( progressItemProgress( KPIM::ProgressItem *, unsigned int ) ),
+ this, TQT_SLOT( slotProgressItemProgress( KPIM::ProgressItem *, unsigned int ) ) );
mCurrentItem = 0;
}
mCurrentItem = ProgressManager::instance()->singleItem();
if ( mCurrentItem ) {
- connect ( mCurrentItem, SIGNAL( progressItemProgress( KPIM::ProgressItem *, unsigned int ) ),
- this, SLOT( slotProgressItemProgress( KPIM::ProgressItem *, unsigned int ) ) );
+ connect ( mCurrentItem, TQT_SIGNAL( progressItemProgress( KPIM::ProgressItem *, unsigned int ) ),
+ this, TQT_SLOT( slotProgressItemProgress( KPIM::ProgressItem *, unsigned int ) ) );
}
}
@@ -254,10 +254,10 @@ void StatusbarProgressWidget::slotClean()
}
}
-bool StatusbarProgressWidget::eventFilter( QObject *, QEvent *ev )
+bool StatusbarProgressWidget::eventFilter( TQObject *, TQEvent *ev )
{
- if ( ev->type() == QEvent::MouseButtonPress ) {
- QMouseEvent *e = (QMouseEvent*)ev;
+ if ( ev->type() == TQEvent::MouseButtonPress ) {
+ TQMouseEvent *e = (TQMouseEvent*)ev;
if ( e->button() == LeftButton && mode != None ) { // toggle view on left mouse button
// Consensus seems to be that we should show/hide the fancy dialog when the user
@@ -274,13 +274,13 @@ void StatusbarProgressWidget::slotProgressDialogVisible( bool b )
// Update the hide/show button when the detailed one is shown/hidden
if ( b ) {
m_pButton->setPixmap( SmallIcon( "down" ) );
- QToolTip::remove( m_pButton );
- QToolTip::add( m_pButton, i18n("Hide detailed progress window") );
+ TQToolTip::remove( m_pButton );
+ TQToolTip::add( m_pButton, i18n("Hide detailed progress window") );
setMode();
} else {
m_pButton->setPixmap( SmallIcon( "up" ) );
- QToolTip::remove( m_pButton );
- QToolTip::add( m_pButton, i18n("Show detailed progress window") );
+ TQToolTip::remove( m_pButton );
+ TQToolTip::add( m_pButton, i18n("Show detailed progress window") );
}
}
diff --git a/libkdepim/statusbarprogresswidget.h b/libkdepim/statusbarprogresswidget.h
index 13d31bb96..ed06b2b85 100644
--- a/libkdepim/statusbarprogresswidget.h
+++ b/libkdepim/statusbarprogresswidget.h
@@ -51,13 +51,13 @@ class SSLLabel;
class ProgressItem;
class ProgressDialog;
-class KDE_EXPORT StatusbarProgressWidget : public QFrame {
+class KDE_EXPORT StatusbarProgressWidget : public TQFrame {
Q_OBJECT
public:
- StatusbarProgressWidget( ProgressDialog* progressDialog, QWidget* parent, bool button = true );
+ StatusbarProgressWidget( ProgressDialog* progressDialog, TQWidget* parent, bool button = true );
public slots:
@@ -78,25 +78,25 @@ protected:
void connectSingleItem();
void activateSingleItemMode();
- virtual bool eventFilter( QObject *, QEvent * );
+ virtual bool eventFilter( TQObject *, TQEvent * );
private:
KProgress* m_pProgressBar;
- QLabel* m_pLabel;
+ TQLabel* m_pLabel;
SSLLabel* m_sslLabel;
- QPushButton* m_pButton;
+ TQPushButton* m_pButton;
enum Mode { None, /*Label,*/ Progress };
uint mode;
bool m_bShowButton;
- QBoxLayout *box;
- QWidgetStack *stack;
+ TQBoxLayout *box;
+ TQWidgetStack *stack;
ProgressItem *mCurrentItem;
ProgressDialog* mProgressDialog;
- QTimer *mDelayTimer;
- QTimer *mBusyTimer;
+ TQTimer *mDelayTimer;
+ TQTimer *mBusyTimer;
};
} // namespace
diff --git a/libkdepim/tests/test_kregexp.cpp b/libkdepim/tests/test_kregexp.cpp
index 96bfc54c6..a44e3be0f 100644
--- a/libkdepim/tests/test_kregexp.cpp
+++ b/libkdepim/tests/test_kregexp.cpp
@@ -9,8 +9,8 @@ main()
// test for http://bugs.kde.org/show_bug.cgi?id=54886
KRegExp3 reg("^");
- QString res = reg.replace(QString::fromLatin1("Fun stuff"),
- QString::fromLatin1("[fun] "));
+ TQString res = reg.replace(TQString::fromLatin1("Fun stuff"),
+ TQString::fromLatin1("[fun] "));
kdDebug() << res << endl;
}
diff --git a/libkdepim/tests/testdateedit.cpp b/libkdepim/tests/testdateedit.cpp
index bc244f13f..993967cb6 100644
--- a/libkdepim/tests/testdateedit.cpp
+++ b/libkdepim/tests/testdateedit.cpp
@@ -19,7 +19,7 @@
Boston, MA 02110-1301, USA.
*/
-#include <qlayout.h>
+#include <tqlayout.h>
#include <kaboutdata.h>
#include <kapplication.h>
@@ -31,19 +31,19 @@
#include "testdateedit.h"
-DateEdit::DateEdit( QWidget *parent, const char *name )
- : QWidget( parent, name )
+DateEdit::DateEdit( TQWidget *parent, const char *name )
+ : TQWidget( parent, name )
{
- QVBoxLayout *layout = new QVBoxLayout( this );
+ TQVBoxLayout *layout = new TQVBoxLayout( this );
KDateEdit *edit = new KDateEdit( this );
layout->addWidget( edit );
- connect( edit, SIGNAL( dateChanged( const QDate& ) ),
- this, SLOT( dateChanged( const QDate& ) ) );
+ connect( edit, TQT_SIGNAL( dateChanged( const TQDate& ) ),
+ this, TQT_SLOT( dateChanged( const TQDate& ) ) );
}
-void DateEdit::dateChanged( const QDate &date )
+void DateEdit::dateChanged( const TQDate &date )
{
if ( date.isValid() )
qDebug( "%s", date.toString().latin1() );
diff --git a/libkdepim/tests/testdateedit.h b/libkdepim/tests/testdateedit.h
index d6eb14cd0..86a9ea4e8 100644
--- a/libkdepim/tests/testdateedit.h
+++ b/libkdepim/tests/testdateedit.h
@@ -22,17 +22,17 @@
#ifndef TESTDATEEDIT_H
#define TESTDATEEDIT_H
-#include <qwidget.h>
+#include <tqwidget.h>
class DateEdit : public QWidget
{
Q_OBJECT
public:
- DateEdit( QWidget *parent = 0, const char *name = 0 );
+ DateEdit( TQWidget *parent = 0, const char *name = 0 );
public slots:
- void dateChanged( const QDate& );
+ void dateChanged( const TQDate& );
};
#endif
diff --git a/libkdepim/tests/testdistrlist.cpp b/libkdepim/tests/testdistrlist.cpp
index 281c5835b..b446a5a39 100644
--- a/libkdepim/tests/testdistrlist.cpp
+++ b/libkdepim/tests/testdistrlist.cpp
@@ -31,8 +31,8 @@ using KPIM::DistributionList;
#include <kdebug.h>
#include <kcmdlineargs.h>
-#include <qdir.h>
-#include <qfileinfo.h>
+#include <tqdir.h>
+#include <tqfileinfo.h>
#include <stdio.h>
#include <stdlib.h>
@@ -43,7 +43,7 @@ int main(int argc, char *argv[])
{
// Use another directory than the real one, just to keep things clean
// KDEHOME needs to be writable though, for a ksycoca database
- setenv( "KDEHOME", QFile::encodeName( QDir::homeDirPath() + "/.kde-testdistrlist" ), true );
+ setenv( "KDEHOME", TQFile::encodeName( TQDir::homeDirPath() + "/.kde-testdistrlist" ), true );
setenv( "KDE_FORK_SLAVES", "yes", true ); // simpler, for the final cleanup
KApplication::disableAutoDcopRegistration();
@@ -94,12 +94,12 @@ void TestDistrList::runAll()
testDeleteList();
}
-bool TestDistrList::check(const QString& txt, QString a, QString b)
+bool TestDistrList::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;
}
@@ -114,18 +114,18 @@ bool TestDistrList::check(const QString& txt, QString a, QString b)
// taken from KMail
#include <sys/types.h>
#include <dirent.h>
-static bool removeDirAndContentsRecursively( const QString & path )
+static bool removeDirAndContentsRecursively( const TQString & path )
{
kdDebug() << k_funcinfo << path << endl;
bool success = true;
- QDir d;
+ TQDir d;
d.setPath( path );
- d.setFilter( QDir::Files | QDir::Dirs | QDir::Hidden );
+ d.setFilter( TQDir::Files | TQDir::Dirs | TQDir::Hidden );
const QFileInfoList *list = d.entryInfoList();
QFileInfoListIterator it( *list );
- QFileInfo *fi;
+ TQFileInfo *fi;
while ( (fi = it.current()) != 0 ) {
if( fi->isDir() && !fi->isSymLink() ) {
@@ -150,7 +150,7 @@ void TestDistrList::cleanup()
ab->clear();
KABC::StdAddressBook::close();
- QString kdehome = QFile::decodeName( getenv("KDEHOME") );
+ TQString kdehome = TQFile::decodeName( getenv("KDEHOME") );
KURL urlkdehome; urlkdehome.setPath( kdehome );
// don't use KIO::NetAccess here since it needs X
// KIO::NetAccess::del( urlkdehome, 0 )i;
@@ -225,16 +225,16 @@ void TestDistrList::testInsertEntry()
// Test entries()
DistributionList::Entry::List entries = dl.entries( ab );
- check( "entries count", QString::number( entries.count() ), "3" );
+ check( "entries count", TQString::number( entries.count() ), "3" );
check( "first entry", entries[0].addressee.name(), "addr1" );
- check( "first entry", entries[0].email, QString::null );
+ check( "first entry", entries[0].email, TQString::null );
check( "second entry", entries[1].addressee.name(), "addr2" );
check( "second entry", entries[1].email, "addr2-alternate@kde.org" );
check( "third entry", entries[2].addressee.name(), "addr2" );
check( "third entry", entries[2].email, "addr2@kde.org" );
// Test emails()
- QStringList emails = dl.emails( ab );
+ TQStringList emails = dl.emails( ab );
kdDebug() << emails << endl;
assert( emails.count() == 3 );
check( "first email", emails[0], "addr1 <addr1@kde.org>" );
@@ -252,22 +252,22 @@ void TestDistrList::testRemoveEntry()
DistributionList dl = DistributionList::findByName( ab, "foo" );
assert( !dl.isEmpty() );
DistributionList::Entry::List entries = dl.entries( ab );
- check( "entries count before removeEntry", QString::number( entries.count() ), "3" );
+ check( "entries count before removeEntry", TQString::number( entries.count() ), "3" );
// Removing an empty entry shouldn't do anything
dl.removeEntry( KABC::Addressee() );
- check( "entries count after removing empty entry", QString::number( dl.entries(ab).count() ), "3" );
+ check( "entries count after removing empty entry", TQString::number( dl.entries(ab).count() ), "3" );
KABC::Addressee addr1 = ab->findByName( "addr1" ).first();
assert( !addr1.isEmpty() );
// Removing an entry with the wrong email passed, shouldn't do anything
dl.removeEntry( addr1, "foo@foobar.com" );
- check( "entries count after removing entry with invalid email", QString::number( dl.entries(ab).count() ), "3" );
+ check( "entries count after removing entry with invalid email", TQString::number( dl.entries(ab).count() ), "3" );
// Now remove entry correctly
dl.removeEntry( addr1 );
- check( "removeEntry(addr1) worked", QString::number( dl.entries(ab).count() ), "2" );
- QStringList emails = dl.emails( ab );
+ check( "removeEntry(addr1) worked", TQString::number( dl.entries(ab).count() ), "2" );
+ TQStringList emails = dl.emails( ab );
assert( emails.count() == 2 );
check( "first email", emails[0], "addr2 <addr2-alternate@kde.org>" );
@@ -275,13 +275,13 @@ void TestDistrList::testRemoveEntry()
KABC::Addressee addr2 = ab->findByName( "addr2" ).first();
assert( !addr2.isEmpty() );
dl.removeEntry( addr2 );
- check( "entries count after removing entry with no email", QString::number( dl.entries(ab).count() ), "2" );
+ check( "entries count after removing entry with no email", TQString::number( dl.entries(ab).count() ), "2" );
// Now remove addr2 correctly
dl.removeEntry( addr2, "addr2@kde.org" );
- check( "entries count after removing addr2", QString::number( dl.entries(ab).count() ), "1" );
+ check( "entries count after removing addr2", TQString::number( dl.entries(ab).count() ), "1" );
dl.removeEntry( addr2, "addr2-alternate@kde.org" );
- check( "entries count after removing alternate addr2", QString::number( dl.entries(ab).count() ), "0" );
+ check( "entries count after removing alternate addr2", TQString::number( dl.entries(ab).count() ), "0" );
assert( dl.entries(ab).isEmpty() );
assert( dl.emails(ab).isEmpty() );
assert( DistributionList::isDistributionList( dl ) );
diff --git a/libkdepim/tests/testdistrlist.h b/libkdepim/tests/testdistrlist.h
index 0b2a055d2..782c3ec5f 100644
--- a/libkdepim/tests/testdistrlist.h
+++ b/libkdepim/tests/testdistrlist.h
@@ -19,7 +19,7 @@
#ifndef TESTDISTRLIST_H
#define TESTDISTRLIST_H
-#include <qobject.h>
+#include <tqobject.h>
class TestDistrList : public QObject
{
@@ -40,7 +40,7 @@ public:
void testDeleteList();
private:
- bool check(const QString& txt, QString a, QString b);
+ bool check(const TQString& txt, TQString a, TQString b);
};
#endif
diff --git a/libkdepim/tests/testlinklocator.cpp b/libkdepim/tests/testlinklocator.cpp
index b5678fe14..39383d9d1 100644
--- a/libkdepim/tests/testlinklocator.cpp
+++ b/libkdepim/tests/testlinklocator.cpp
@@ -28,7 +28,7 @@
#include <string.h>
#include <assert.h>
-static bool check(const QString& txt, const QString& a, const QString& b)
+static bool check(const TQString& txt, const TQString& a, const TQString& b)
{
if (a == b) {
kdDebug() << txt << " : checking '" << a << "' against expected value '" << b << "'... " << "ok" << endl;
@@ -40,9 +40,9 @@ static bool check(const QString& txt, const QString& a, const QString& b)
return true;
}
-static bool checkGetEmailAddress( const QString & input,
+static bool checkGetEmailAddress( const TQString & input,
int atPos,
- const QString & expRetVal,
+ const TQString & expRetVal,
bool allowBadAtPos = false )
{
if ( !allowBadAtPos && ( input[atPos] != '@' ) ) {
@@ -51,8 +51,8 @@ static bool checkGetEmailAddress( const QString & input,
exit(1);
}
LinkLocator ll( input, atPos );
- const QString retVal = ll.getEmailAddress();
- check( "getEmailAddress() \"" + input + "\", " + QString::number( atPos ),
+ const TQString retVal = ll.getEmailAddress();
+ check( "getEmailAddress() \"" + input + "\", " + TQString::number( atPos ),
retVal, expRetVal );
return true;
}
@@ -64,38 +64,38 @@ int main(int argc, char *argv[])
KApplication app( false, false );
// empty input
- checkGetEmailAddress( QString(), 0, QString(), true );
+ checkGetEmailAddress( TQString(), 0, TQString(), true );
// no '@' at scan position
- checkGetEmailAddress( "foo@bar.baz", 0, QString(), true );
+ checkGetEmailAddress( "foo@bar.baz", 0, TQString(), true );
// '@' in local part
- checkGetEmailAddress( "foo@bar@bar.baz", 7, QString() );
+ checkGetEmailAddress( "foo@bar@bar.baz", 7, TQString() );
// empty local part
- checkGetEmailAddress( "@bar.baz", 0, QString() );
- checkGetEmailAddress( ".@bar.baz", 1, QString() );
- checkGetEmailAddress( " @bar.baz", 1, QString() );
- checkGetEmailAddress( ".!#$%&'*+-/=?^_`{|}~@bar.baz", strlen(".!#$%&'*+-/=?^_`{|}~"), QString() );
+ checkGetEmailAddress( "@bar.baz", 0, TQString() );
+ checkGetEmailAddress( ".@bar.baz", 1, TQString() );
+ checkGetEmailAddress( " @bar.baz", 1, TQString() );
+ checkGetEmailAddress( ".!#$%&'*+-/=?^_`{|}~@bar.baz", strlen(".!#$%&'*+-/=?^_`{|}~"), TQString() );
// allowed special chars in local part of address
checkGetEmailAddress( "a.!#$%&'*+-/=?^_`{|}~@bar.baz", strlen("a.!#$%&'*+-/=?^_`{|}~"), "a.!#$%&'*+-/=?^_`{|}~@bar.baz" );
// '@' in domain part
- checkGetEmailAddress( "foo@bar@bar.baz", 3, QString() );
+ checkGetEmailAddress( "foo@bar@bar.baz", 3, TQString() );
// domain part without dot
- checkGetEmailAddress( "foo@bar", 3, QString() );
- checkGetEmailAddress( "foo@bar.", 3, QString() );
- checkGetEmailAddress( ".foo@bar", 4, QString() );
- checkGetEmailAddress( "foo@bar ", 3, QString() );
- checkGetEmailAddress( " foo@bar", 4, QString() );
- checkGetEmailAddress( "foo@bar-bar", 3, QString() );
+ checkGetEmailAddress( "foo@bar", 3, TQString() );
+ checkGetEmailAddress( "foo@bar.", 3, TQString() );
+ checkGetEmailAddress( ".foo@bar", 4, TQString() );
+ checkGetEmailAddress( "foo@bar ", 3, TQString() );
+ checkGetEmailAddress( " foo@bar", 4, TQString() );
+ checkGetEmailAddress( "foo@bar-bar", 3, TQString() );
// empty domain part
- checkGetEmailAddress( "foo@", 3, QString() );
- checkGetEmailAddress( "foo@.", 3, QString() );
- checkGetEmailAddress( "foo@-", 3, QString() );
+ checkGetEmailAddress( "foo@", 3, TQString() );
+ checkGetEmailAddress( "foo@.", 3, TQString() );
+ checkGetEmailAddress( "foo@-", 3, TQString() );
// simple address
checkGetEmailAddress( "foo@bar.baz", 3, "foo@bar.baz" );
diff --git a/libkdepim/tests/testutf7decoder.cpp b/libkdepim/tests/testutf7decoder.cpp
index 39ded9201..f6b8f4ada 100644
--- a/libkdepim/tests/testutf7decoder.cpp
+++ b/libkdepim/tests/testutf7decoder.cpp
@@ -1,6 +1,6 @@
#include "qutf7codec.h"
#include "qutf7codec.cpp"
-#include <qtextstream.h>
+#include <tqtextstream.h>
#include <string.h>
#include <assert.h>
@@ -8,19 +8,19 @@ int main( int argc, char * argv[] ) {
if ( argc == 1 ) {
(void)new QUtf7Codec;
- QTextCodec * codec = QTextCodec::codecForName("utf-7");
+ TQTextCodec * codec = TQTextCodec::codecForName("utf-7");
assert(codec);
- QTextIStream my_cin(stdin);
+ TQTextIStream my_cin(stdin);
my_cin.setCodec(codec);
- QTextOStream my_cout(stdout);
+ TQTextOStream my_cout(stdout);
- QString buffer = my_cin.read();
+ TQString buffer = my_cin.read();
my_cout << buffer;
} else {
qWarning("usage: testutf7decoder string_to_decode\n");
}
- QTextCodec::deleteAllCodecs();
+ TQTextCodec::deleteAllCodecs();
}
diff --git a/libkdepim/tests/testutf7encoder.cpp b/libkdepim/tests/testutf7encoder.cpp
index 2d635744e..925bab21e 100644
--- a/libkdepim/tests/testutf7encoder.cpp
+++ b/libkdepim/tests/testutf7encoder.cpp
@@ -7,9 +7,9 @@ void main( int argc, char * argv[] ) {
if ( argc == 2 ) {
QUtf7Codec * codec = new QUtf7Codec;
- QTextEncoder * enc;
+ TQTextEncoder * enc;
- QString arg = QString::fromLatin1( argv[1] );
+ TQString arg = TQString::fromLatin1( argv[1] );
int len;
cout << "Original string:\n"
@@ -31,7 +31,7 @@ void main( int argc, char * argv[] ) {
for ( int i = 0 ; i < arg.length() ; i++ ) {
len = 1;
- cout << (enc->fromUnicode( QString(arg[i]), len )).data();
+ cout << (enc->fromUnicode( TQString(arg[i]), len )).data();
}
cout << "\n" << endl;
@@ -79,7 +79,7 @@ void main( int argc, char * argv[] ) {
for ( int i = 0 ; i < arg.length() ; i++ ) {
len = 1;
- cout << (enc->fromUnicode( QString(arg[i]), len )).data();
+ cout << (enc->fromUnicode( TQString(arg[i]), len )).data();
}
cout << "\n" << endl;
diff --git a/libkdepim/tests/testutf7encoder2.cpp b/libkdepim/tests/testutf7encoder2.cpp
index 0661d63c1..57c195662 100644
--- a/libkdepim/tests/testutf7encoder2.cpp
+++ b/libkdepim/tests/testutf7encoder2.cpp
@@ -1,6 +1,6 @@
#include "qutf7codec.h"
#include "qutf7codec.cpp"
-#include <qtextstream.h>
+#include <tqtextstream.h>
#include <string.h>
#include <assert.h>
#include <iostream.h>
@@ -9,27 +9,27 @@ int main( int argc, char * argv[] ) {
if ( argc == 1 ) {
(void)new QUtf7Codec;
- QTextCodec * codec = QTextCodec::codecForName("utf-7");
+ TQTextCodec * codec = TQTextCodec::codecForName("utf-7");
assert(codec);
- QTextIStream my_cin(stdin);
+ TQTextIStream my_cin(stdin);
- QTextOStream my_cout(stdout);
+ TQTextOStream my_cout(stdout);
my_cout.setCodec(codec);
- QString buffer = my_cin.read();
+ TQString buffer = my_cin.read();
// qDebug("buffer == " + buffer);
#ifdef USE_STREAM
my_cout << buffer << endl;
#else
- QTextEncoder * enc = codec->makeEncoder();
+ TQTextEncoder * enc = codec->makeEncoder();
#ifdef CHAR_WISE
int len;
for ( int i = 0 ; i < buffer.length() ; i++ ) {
len = 1;
- cout << (enc->fromUnicode(QString(buffer[i]),len)).data();
+ cout << (enc->fromUnicode(TQString(buffer[i]),len)).data();
}
cout << endl;
#else
@@ -41,5 +41,5 @@ int main( int argc, char * argv[] ) {
} else {
qWarning("usage: testutf7encoder2 < infile > outfile\n");
}
- QTextCodec::deleteAllCodecs();
+ TQTextCodec::deleteAllCodecs();
}
diff --git a/libkdepim/tests/testwizard.cpp b/libkdepim/tests/testwizard.cpp
index ce4038909..8db1dd42d 100644
--- a/libkdepim/tests/testwizard.cpp
+++ b/libkdepim/tests/testwizard.cpp
@@ -29,8 +29,8 @@
#include <klocale.h>
#include <kcmdlineargs.h>
-#include <qlayout.h>
-#include <qcheckbox.h>
+#include <tqlayout.h>
+#include <tqcheckbox.h>
class TestConfigWizard : public KConfigWizard
{
@@ -39,15 +39,15 @@ class TestConfigWizard : public KConfigWizard
KConfigWizard( new KConfigPropagator( MyConfig::self(),
"propagator_test.kcfg" ) )
{
- QFrame *page = createWizardPage( "My Wizard Page" );
- QBoxLayout *topLayout = new QVBoxLayout( page );
+ TQFrame *page = createWizardPage( "My Wizard Page" );
+ TQBoxLayout *topLayout = new TQVBoxLayout( page );
- mFixKMailCheckBox = new QCheckBox( i18n("Fix KMail"), page );
+ mFixKMailCheckBox = new TQCheckBox( i18n("Fix KMail"), page );
topLayout->addWidget( mFixKMailCheckBox );
mFixKMailCheckBox->setChecked( MyConfig::fixKMail() );
- mBreakKMailCheckBox = new QCheckBox( i18n("Break KMail"), page );
+ mBreakKMailCheckBox = new TQCheckBox( i18n("Break KMail"), page );
topLayout->addWidget( mBreakKMailCheckBox );
mBreakKMailCheckBox->setChecked( MyConfig::breakKMail() );
@@ -71,8 +71,8 @@ class TestConfigWizard : public KConfigWizard
}
private:
- QCheckBox *mFixKMailCheckBox;
- QCheckBox *mBreakKMailCheckBox;
+ TQCheckBox *mFixKMailCheckBox;
+ TQCheckBox *mBreakKMailCheckBox;
};
static const KCmdLineOptions options[] =
diff --git a/libkdepim/weaver.cpp b/libkdepim/weaver.cpp
index fa3ea03ca..20e44df42 100644
--- a/libkdepim/weaver.cpp
+++ b/libkdepim/weaver.cpp
@@ -17,8 +17,8 @@ extern "C" {
#include <signal.h>
}
-#include <qevent.h>
-#include <qapplication.h>
+#include <tqevent.h>
+#include <tqapplication.h>
#include "weaver.h"
@@ -28,10 +28,10 @@ namespace ThreadWeaver {
bool Debug = true;
int DebugLevel = 2;
- Job::Job (QObject* parent, const char* name)
- : QObject (parent, name),
+ Job::Job (TQObject* parent, const char* name)
+ : TQObject (parent, name),
m_finished (false),
- m_mutex (new QMutex (true) ),
+ m_mutex (new TQMutex (true) ),
m_thread (0)
{
}
@@ -66,19 +66,19 @@ namespace ThreadWeaver {
Thread *Job::thread ()
{
- QMutexLocker l (m_mutex);
+ TQMutexLocker l (m_mutex);
return m_thread;
}
bool Job::isFinished() const
{
- QMutexLocker l (m_mutex);
+ TQMutexLocker l (m_mutex);
return m_finished;
}
void Job::setFinished(bool status)
{
- QMutexLocker l (m_mutex);
+ TQMutexLocker l (m_mutex);
m_finished = status;
}
@@ -132,7 +132,7 @@ namespace ThreadWeaver {
void Job::wakeAPR ()
{
- QMutexLocker l(m_mutex);
+ TQMutexLocker l(m_mutex);
if ( m_wc!=0 )
{
m_wc->wakeOne ();
@@ -141,10 +141,10 @@ namespace ThreadWeaver {
}
}
- const int Event::Type = QEvent::User + 1000;
+ const int Event::Type = TQEvent::User + 1000;
Event::Event ( Action action, Thread *thread, Job *job)
- : QCustomEvent ( type () ),
+ : TQCustomEvent ( type () ),
m_action (action),
m_thread (thread),
m_job (job)
@@ -179,7 +179,7 @@ namespace ThreadWeaver {
unsigned int Thread::sm_Id;
Thread::Thread (Weaver *parent)
- : QThread (),
+ : TQThread (),
m_parent ( parent ),
m_id ( makeId() )
{
@@ -191,8 +191,8 @@ namespace ThreadWeaver {
unsigned int Thread::makeId()
{
- static QMutex mutex;
- QMutexLocker l (&mutex);
+ static TQMutex mutex;
+ TQMutexLocker l (&mutex);
return ++sm_Id;
}
@@ -234,19 +234,19 @@ namespace ThreadWeaver {
void Thread::msleep(unsigned long msec)
{
- QThread::msleep(msec);
+ TQThread::msleep(msec);
}
- Weaver::Weaver(QObject* parent, const char* name,
+ Weaver::Weaver(TQObject* parent, const char* name,
int inventoryMin, int inventoryMax)
- : QObject(parent, name),
+ : TQObject(parent, name),
m_active(0),
m_inventoryMin(inventoryMin),
m_inventoryMax(inventoryMax),
m_shuttingDown(false),
m_running (false),
m_suspend (false),
- m_mutex ( new QMutex(true) )
+ m_mutex ( new TQMutex(true) )
{
lock();
@@ -320,7 +320,7 @@ namespace ThreadWeaver {
int Weaver::threads () const
{
- QMutexLocker l (m_mutex);
+ TQMutexLocker l (m_mutex);
return m_inventory.count ();
}
@@ -336,7 +336,7 @@ namespace ThreadWeaver {
assignJobs();
}
- void Weaver::enqueue (QPtrList <Job> jobs)
+ void Weaver::enqueue (TQPtrList <Job> jobs)
{
lock();
@@ -352,13 +352,13 @@ namespace ThreadWeaver {
bool Weaver::dequeue ( Job* job )
{
- QMutexLocker l (m_mutex);
+ TQMutexLocker l (m_mutex);
return m_assignments.remove (job);
}
void Weaver::dequeue ()
{
- QMutexLocker l (m_mutex);
+ TQMutexLocker l (m_mutex);
m_assignments.clear();
}
@@ -389,9 +389,9 @@ namespace ThreadWeaver {
m_jobAvailable.wakeAll();
}
- bool Weaver::event (QEvent *e )
+ bool Weaver::event (TQEvent *e )
{
- if ( e->type() >= QEvent::User )
+ if ( e->type() >= TQEvent::User )
{
if ( e->type() == Event::type() )
@@ -438,19 +438,19 @@ namespace ThreadWeaver {
return true;
} else {
// others - please make sure we are a QObject!
- return QObject::event ( e );
+ return TQObject::event ( e );
}
}
void Weaver::post (Event::Action a, Thread* t, Job* j)
{
Event *e = new Event ( a, t, j);
- QApplication::postEvent (this, e);
+ TQApplication::postEvent (this, e);
}
bool Weaver::isEmpty() const
{
- QMutexLocker l (m_mutex);
+ TQMutexLocker l (m_mutex);
return m_assignments.count()==0;
}
@@ -524,13 +524,13 @@ namespace ThreadWeaver {
int Weaver::queueLength()
{
- QMutexLocker l (m_mutex);
+ TQMutexLocker l (m_mutex);
return m_assignments.count();
}
bool Weaver::isIdle () const
{
- QMutexLocker l (m_mutex);
+ TQMutexLocker l (m_mutex);
return isEmpty() && m_active == 0;
}
diff --git a/libkdepim/weaver.h b/libkdepim/weaver.h
index 00c624d84..929714dfb 100644
--- a/libkdepim/weaver.h
+++ b/libkdepim/weaver.h
@@ -23,12 +23,12 @@ extern "C"
#include <stdio.h>
}
-#include <qobject.h>
-#include <qptrlist.h>
-#include <qthread.h>
-#include <qwaitcondition.h>
-#include <qmutex.h>
-#include <qevent.h>
+#include <tqobject.h>
+#include <tqptrlist.h>
+#include <tqthread.h>
+#include <tqwaitcondition.h>
+#include <tqmutex.h>
+#include <tqevent.h>
#include <kdepimmacros.h>
@@ -70,8 +70,8 @@ namespace ThreadWeaver {
{
if ( Debug == true && ( severity<=DebugLevel || severity == 0) )
{
- static QMutex mutex;
- QString text;
+ static TQMutex mutex;
+ TQString text;
mutex.lock();
va_list ap;
@@ -166,7 +166,7 @@ namespace ThreadWeaver {
Q_OBJECT
public:
/** Construct a Job object. */
- Job(QObject* parent=0, const char* name=0);
+ Job(TQObject* parent=0, const char* name=0);
/** Destructor. */
virtual ~Job();
@@ -235,11 +235,11 @@ namespace ThreadWeaver {
bool m_finished;
- QMutex *m_mutex;
+ TQMutex *m_mutex;
Thread * m_thread;
- QWaitCondition *m_wc;
+ TQWaitCondition *m_wc;
};
class Weaver;
@@ -268,7 +268,7 @@ namespace ThreadWeaver {
*/
void run();
- /* Provide the msleep() method (protected in QThread) to be
+ /* Provide the msleep() method (protected in TQThread) to be
available for executed jobs. */
void msleep(unsigned long msec);
@@ -297,7 +297,7 @@ namespace ThreadWeaver {
{
Q_OBJECT
public:
- Weaver (QObject* parent=0, const char* name=0,
+ Weaver (TQObject* parent=0, const char* name=0,
int inventoryMin = 4, // minimal number of provided threads
int inventoryMax = 32); // maximum number of provided threads
virtual ~Weaver ();
@@ -311,7 +311,7 @@ namespace ThreadWeaver {
them. Otherwise, when enqueueing your jobs
individually, there is a chance that you receive more than
one finished signal. */
- void enqueue (QPtrList<Job> jobs);
+ void enqueue (TQPtrList<Job> jobs);
/** Remove a job from the queue.
If the job qas queued but not started so far, it is simple
removed from the queue. For now, it is unsupported to
@@ -410,11 +410,11 @@ namespace ThreadWeaver {
void assignJobs();
/** Check incoming events for user defined ones. The threads use user
defined events to communicate with the Weaver. */
- bool event ( QEvent* );
+ bool event ( TQEvent* );
/** The thread inventory. */
- QPtrList<Thread> m_inventory;
+ TQPtrList<Thread> m_inventory;
/** The job queue. */
- QPtrList<Job> m_assignments;
+ TQPtrList<Job> m_assignments;
/** The number of jobs that are assigned to the worker
threads, but not finished. */
int m_active;
@@ -423,9 +423,9 @@ namespace ThreadWeaver {
/** Stored setting . */
int m_inventoryMax;
/** Wait condition all idle or done threads wait for. */
- QWaitCondition m_jobAvailable;
+ TQWaitCondition m_jobAvailable;
/** Wait for a job to finish. */
- QWaitCondition m_jobFinished;
+ TQWaitCondition m_jobFinished;
/** Indicates if the weaver is shutting down and exiting it's
threads. */
bool m_shuttingDown;
@@ -441,7 +441,7 @@ namespace ThreadWeaver {
bool m_suspend;
private:
/** Mutex to serialize operations. */
- QMutex *m_mutex;
+ TQMutex *m_mutex;
};
} // namespace ThreadWeaver
} // namespace KPIM
diff --git a/libkdepim/weaverextensions.cpp b/libkdepim/weaverextensions.cpp
index 6e19d2e78..cb8fe48f2 100644
--- a/libkdepim/weaverextensions.cpp
+++ b/libkdepim/weaverextensions.cpp
@@ -19,21 +19,21 @@
namespace KPIM {
namespace ThreadWeaver {
- WeaverExtension::WeaverExtension ( QObject *parent, const char *name)
- : QObject (parent, name)
+ WeaverExtension::WeaverExtension ( TQObject *parent, const char *name)
+ : TQObject (parent, name)
{
}
void WeaverExtension::attach (Weaver *w)
{
- connect (w, SIGNAL (threadCreated (Thread *) ),
- SLOT (threadCreated (Thread *) ) );
- connect (w, SIGNAL (threadDestroyed (Thread *) ),
- SLOT (threadDestroyed (Thread *) ) );
- connect (w, SIGNAL (threadBusy (Thread *) ),
- SLOT (threadBusy (Thread *) ) );
- connect (w, SIGNAL (threadSuspended (Thread *) ),
- SLOT (threadSuspended (Thread *) ) );
+ connect (w, TQT_SIGNAL (threadCreated (Thread *) ),
+ TQT_SLOT (threadCreated (Thread *) ) );
+ connect (w, TQT_SIGNAL (threadDestroyed (Thread *) ),
+ TQT_SLOT (threadDestroyed (Thread *) ) );
+ connect (w, TQT_SIGNAL (threadBusy (Thread *) ),
+ TQT_SLOT (threadBusy (Thread *) ) );
+ connect (w, TQT_SIGNAL (threadSuspended (Thread *) ),
+ TQT_SLOT (threadSuspended (Thread *) ) );
}
WeaverExtension::~WeaverExtension()
diff --git a/libkdepim/weaverextensions.h b/libkdepim/weaverextensions.h
index 5f19743ba..f737f8a6d 100644
--- a/libkdepim/weaverextensions.h
+++ b/libkdepim/weaverextensions.h
@@ -16,7 +16,7 @@
#ifndef WEAVEREXTENSIONS_H
#define WEAVEREXTENSIONS_H
-#include <qobject.h>
+#include <tqobject.h>
namespace KPIM {
namespace ThreadWeaver {
@@ -34,7 +34,7 @@ namespace ThreadWeaver {
{
Q_OBJECT
public:
- WeaverExtension ( QObject *parent = 0, const char *name = 0);
+ WeaverExtension ( TQObject *parent = 0, const char *name = 0);
/** Attach() is a convenience method that will connect all our
slots to signals emitted by the weaver. It is also possible to
avoid attach() and only connect necessary signals. */
diff --git a/libkdepim/weaverlogger.cpp b/libkdepim/weaverlogger.cpp
index 8aec18476..a91d505e3 100644
--- a/libkdepim/weaverlogger.cpp
+++ b/libkdepim/weaverlogger.cpp
@@ -21,7 +21,7 @@ namespace ThreadWeaver {
extern void debug(int severity, const char * cformat, ...);
- WeaverThreadLogger::WeaverThreadLogger( QObject *parent, const char *name)
+ WeaverThreadLogger::WeaverThreadLogger( TQObject *parent, const char *name)
: WeaverExtension (parent, name)
{
}
diff --git a/libkdepim/weaverlogger.h b/libkdepim/weaverlogger.h
index 47d116380..c0d001b99 100644
--- a/libkdepim/weaverlogger.h
+++ b/libkdepim/weaverlogger.h
@@ -27,7 +27,7 @@ namespace ThreadWeaver {
{
Q_OBJECT
public:
- WeaverThreadLogger( QObject *parent = 0, const char *name = 0);
+ WeaverThreadLogger( TQObject *parent = 0, const char *name = 0);
~WeaverThreadLogger();
void threadCreated (Thread *);
void threadDestroyed (Thread *);
diff --git a/libkholidays/kholidays.cpp b/libkholidays/kholidays.cpp
index 9bb5c1013..694a32dd5 100644
--- a/libkholidays/kholidays.cpp
+++ b/libkholidays/kholidays.cpp
@@ -18,7 +18,7 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#include <qfile.h>
+#include <tqfile.h>
#include <kapplication.h>
#include <kstandarddirs.h>
#include <kdebug.h>
@@ -38,31 +38,31 @@ extern "C" {
extern struct holiday holidays[366];
}
-QStringList KHolidays::locations()
+TQStringList KHolidays::locations()
{
- QStringList files =
+ TQStringList files =
KGlobal::dirs()->findAllResources( "data", "libkholidays/" + generateFileName( "*" ),
false, true );
- QStringList locs;
+ TQStringList locs;
- QStringList::ConstIterator it;
+ TQStringList::ConstIterator it;
for ( it = files.begin(); it != files.end(); ++it )
locs.append( (*it).mid((*it).findRev('_') + 1) );
return locs;
}
-QString KHolidays::fileForLocation( const QString &location )
+TQString KHolidays::fileForLocation( const TQString &location )
{
return locate( "data", "libkholidays/" + generateFileName( location ) );
}
-QString KHolidays::userPath( bool create )
+TQString KHolidays::userPath( bool create )
{
return KGlobal::dirs()->saveLocation( "data", "libkholidays/", create );
}
-QString KHolidays::generateFileName( const QString &location )
+TQString KHolidays::generateFileName( const TQString &location )
{
return "holiday_" + location;
}
@@ -70,7 +70,7 @@ QString KHolidays::generateFileName( const QString &location )
-KHolidays::KHolidays( const QString& location )
+KHolidays::KHolidays( const TQString& location )
: mLocation( location )
{
mHolidayFile = fileForLocation( location );
@@ -82,20 +82,20 @@ KHolidays::~KHolidays()
{
}
-QString KHolidays::location() const
+TQString KHolidays::location() const
{
return mLocation;
}
-QString KHolidays::shortText( const QDate &date )
+TQString KHolidays::shortText( const TQDate &date )
{
- QValueList<KHoliday> lst = getHolidays( date );
+ TQValueList<KHoliday> lst = getHolidays( date );
if ( !lst.isEmpty() )
return lst.first().text;
- else return QString::null;
+ else return TQString::null;
}
-bool KHolidays::parseFile( const QDate &date )
+bool KHolidays::parseFile( const TQDate &date )
{
// kdDebug()<<"KHolidays::parseFile( date=" << date << ")"<<endl;
int lastYear = 0; //current year less 1900
@@ -107,29 +107,29 @@ bool KHolidays::parseFile( const QDate &date )
// kdDebug()<<kdBacktrace();
mYearLast = date.year();
lastYear = date.year() - 1900; // silly parse_year takes 2 digit year...
- parse_holidays( QFile::encodeName( mHolidayFile ), lastYear, 1 );
+ parse_holidays( TQFile::encodeName( mHolidayFile ), lastYear, 1 );
}
return true;
}
-QString KHolidays::getHoliday( const QDate &date )
+TQString KHolidays::getHoliday( const TQDate &date )
{
- QValueList<KHoliday> lst = getHolidays( date );
+ TQValueList<KHoliday> lst = getHolidays( date );
if ( !lst.isEmpty() )
return lst.first().text;
- else return QString::null;
+ else return TQString::null;
}
-QValueList<KHoliday> KHolidays::getHolidays( const QDate &date )
+TQValueList<KHoliday> KHolidays::getHolidays( const TQDate &date )
{
- QValueList<KHoliday> list;
+ TQValueList<KHoliday> list;
if ( !parseFile( date ) ) return list;
struct holiday *hd = &holidays[date.dayOfYear()-1];
while ( hd ) {
if ( hd->string ) {
KHoliday holiday;
- holiday.text = QString::fromUtf8( hd->string );
+ holiday.text = TQString::fromUtf8( hd->string );
holiday.shortText = holiday.text;
holiday.Category = (hd->color == 2/*red*/) || (hd->color == 9/*weekend*/) ? HOLIDAY : WORKDAY;
list.append( holiday );
@@ -139,7 +139,7 @@ QValueList<KHoliday> KHolidays::getHolidays( const QDate &date )
return list;
}
-int KHolidays::category( const QDate &date )
+int KHolidays::category( const TQDate &date )
{
if ( !parseFile(date) ) return WORKDAY;
diff --git a/libkholidays/kholidays.h b/libkholidays/kholidays.h
index 2a5b9a8cd..f612f8389 100644
--- a/libkholidays/kholidays.h
+++ b/libkholidays/kholidays.h
@@ -20,16 +20,16 @@
#ifndef KHOLIDAYS_HOLIDAYS_H
#define KHOLIDAYS_HOLIDAYS_H
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qdatetime.h>
-#include <qvaluelist.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqdatetime.h>
+#include <tqvaluelist.h>
#include <kdepimmacros.h>
struct KHoliday {
- QString text;
- QString shortText;
+ TQString text;
+ TQString shortText;
int Category;
};
@@ -40,40 +40,40 @@ class KDE_EXPORT KHolidays {
One of these can then be passed to the constructor for a new KHolidays
object.
*/
- static QStringList locations();
+ static TQStringList locations();
/**
Return the file name for the holiday file of the given location.
*/
- static QString fileForLocation( const QString &location );
+ static TQString fileForLocation( const TQString &location );
/**
Return the directory for user-specific holiday files (i.e. somewhere below
$KDEDIR/share/apps/). Don't automatically create that path by default.
*/
- static QString userPath( bool create = false );
+ static TQString userPath( bool create = false );
/**
Generate the filename (without the path) for a given region.
*/
- static QString generateFileName( const QString &location );
+ static TQString generateFileName( const TQString &location );
- KHolidays( const QString& location );
+ KHolidays( const TQString& location );
~KHolidays();
/// return the location with which this object was constructed
- QString location() const;
+ TQString location() const;
- QValueList<KHoliday> getHolidays( const QDate& );
+ TQValueList<KHoliday> getHolidays( const TQDate& );
- KDE_DEPRECATED QString shortText( const QDate& );
- KDE_DEPRECATED QString getHoliday( const QDate& );
+ KDE_DEPRECATED TQString shortText( const TQDate& );
+ KDE_DEPRECATED TQString getHoliday( const TQDate& );
enum { WORKDAY, HOLIDAY };
- KDE_DEPRECATED int category( const QDate& );
+ KDE_DEPRECATED int category( const TQDate& );
private:
- bool parseFile( const QDate& );
+ bool parseFile( const TQDate& );
- QString mLocation; // location string used to determine holidays file
- QString mHolidayFile; // name of file containing holiday data
+ TQString mLocation; // location string used to determine holidays file
+ TQString mHolidayFile; // name of file containing holiday data
int mYearLast; // save off the last year we have seen
};
diff --git a/libkholidays/lunarphase.cpp b/libkholidays/lunarphase.cpp
index 56f5fbe51..3dace7bc1 100644
--- a/libkholidays/lunarphase.cpp
+++ b/libkholidays/lunarphase.cpp
@@ -58,12 +58,12 @@ LunarPhase::Hemisphere LunarPhase::hemisphere() const
return( mHemisphere );
}
-QString LunarPhase::hemisphereStr() const
+TQString LunarPhase::hemisphereStr() const
{
return hemisphereName( mHemisphere );
}
-QString LunarPhase::hemisphereName( LunarPhase::Hemisphere hemisphere )
+TQString LunarPhase::hemisphereName( LunarPhase::Hemisphere hemisphere )
{
switch( hemisphere ) {
case Northern:
@@ -76,12 +76,12 @@ QString LunarPhase::hemisphereName( LunarPhase::Hemisphere hemisphere )
}
}
-QString LunarPhase::phaseStr( const QDate &date ) const
+TQString LunarPhase::phaseStr( const TQDate &date ) const
{
return phaseName( phase( date ) );
}
-QString LunarPhase::phaseName( LunarPhase::Phase phase )
+TQString LunarPhase::phaseName( LunarPhase::Phase phase )
{
switch ( phase ) {
case New:
@@ -98,20 +98,20 @@ QString LunarPhase::phaseName( LunarPhase::Phase phase )
break;
default:
case None:
- return( QString::null );
+ return( TQString::null );
break;
}
}
-LunarPhase::Phase LunarPhase::phase( const QDate &date ) const
+LunarPhase::Phase LunarPhase::phase( const TQDate &date ) const
{
Phase retPhase = None;
// compute percent-full for the middle of today and yesterday.
- QTime noontime( 12, 0, 0 );
- QDateTime today( date, noontime );
+ TQTime noontime( 12, 0, 0 );
+ TQDateTime today( date, noontime );
double todayPer = percentFull( today.toTime_t() );
- QDateTime yesterday( date.addDays(-1), noontime );
+ TQDateTime yesterday( date.addDays(-1), noontime );
double yesterdayPer = percentFull( yesterday.toTime_t() );
if ( ( todayPer < 0.50 ) && ( yesterdayPer > 0.50 ) ) {
@@ -120,12 +120,12 @@ LunarPhase::Phase LunarPhase::phase( const QDate &date ) const
retPhase = Full;
} else {
// compute percent-full for the start of today.
- QTime sqt( 0, 0, 0 );
- QDateTime start( date, sqt );
+ TQTime sqt( 0, 0, 0 );
+ TQDateTime start( date, sqt );
double startPer = percentFull( start.toTime_t() );
// compute percent-full for the end of today.
- QTime eqt( 23, 59, 59 );
- QDateTime end( date, eqt );
+ TQTime eqt( 23, 59, 59 );
+ TQDateTime end( date, eqt );
double endPer = percentFull( end.toTime_t() );
if ( ( startPer <= 50 ) && ( endPer > 50 ) ) {
diff --git a/libkholidays/lunarphase.h b/libkholidays/lunarphase.h
index 9cae39ec3..98a94d751 100644
--- a/libkholidays/lunarphase.h
+++ b/libkholidays/lunarphase.h
@@ -57,8 +57,8 @@
Note that crescent and gibbous phases are not currently supported.
*/
-#include <qstring.h>
-#include <qdatetime.h>
+#include <tqstring.h>
+#include <tqdatetime.h>
#include <time.h>
@@ -78,7 +78,7 @@ class LunarPhase
@param date compute the lunar phase for the specified Gregorian date.
*/
- Phase phase( const QDate &date ) const;
+ Phase phase( const TQDate &date ) const;
/**
Return the lunar phase as a text string for the specified date.
@@ -87,7 +87,7 @@ class LunarPhase
@param date compute the lunar phase for the specified Gregorian date.
*/
- QString phaseStr( const QDate &date ) const;
+ TQString phaseStr( const TQDate &date ) const;
/**
Set the hemisphere.
@@ -104,19 +104,19 @@ class LunarPhase
/**
Return hemisphere as a clear text string.
*/
- QString hemisphereStr() const;
+ TQString hemisphereStr() const;
/**
Return the string representation of hemisphere.
*/
- static QString hemisphereName( Hemisphere hemisphere );
+ static TQString hemisphereName( Hemisphere hemisphere );
/**
Return the string representation of phase.
@param phase the lunar phase.
*/
- static QString phaseName( Phase phase );
+ static TQString phaseName( Phase phase );
private:
/**
diff --git a/libkmime/CLASSTREE.headers b/libkmime/CLASSTREE.headers
index 210abe473..0dc759261 100644
--- a/libkmime/CLASSTREE.headers
+++ b/libkmime/CLASSTREE.headers
@@ -68,20 +68,20 @@ void setParent( Content* );
//
// 7bit:
-QCString as7BitString()
-bool from7BitString( const QCString & ) // deep copy
+TQCString as7BitString()
+bool from7BitString( const TQCString & ) // deep copy
bool from7BitString( const char * begin, const char * end ) // shallow
bool from7BitString( const char * begin, int length ) // shallow
-bool from7BitString( QByteArray &, int pos, int len ) // shallow
-QStringList validate( const QCString & str );
+bool from7BitString( TQByteArray &, int pos, int len ) // shallow
+TQStringList validate( const TQCString & str );
// for dialogs:
-QString asUnicodeString()
+TQString asUnicodeString()
bool fromUnicodeString()
-QStringList validate( const QString & str );
+TQStringList validate( const TQString & str );
// for reader display:
-QString asHtmlString()
+TQString asHtmlString()
bool fromHtmlString() // ???
diff --git a/libkmime/kmime_charfreq.cpp b/libkmime/kmime_charfreq.cpp
index ea3e42289..fa496b996 100644
--- a/libkmime/kmime_charfreq.cpp
+++ b/libkmime/kmime_charfreq.cpp
@@ -16,7 +16,7 @@
namespace KMime {
-CharFreq::CharFreq( const QByteArray & buf )
+CharFreq::CharFreq( const TQByteArray & buf )
: NUL(0),
CTL(0),
CR(0), LF(0),
diff --git a/libkmime/kmime_charfreq.h b/libkmime/kmime_charfreq.h
index 12d2035cf..e85e063bc 100644
--- a/libkmime/kmime_charfreq.h
+++ b/libkmime/kmime_charfreq.h
@@ -15,7 +15,7 @@
#ifndef __KMIME_CHARFREQ_H__
#define __KMIME_CHARFREQ_H__
-#include <qcstring.h>
+#include <tqcstring.h>
#include <kdepimmacros.h>
#undef None
@@ -23,7 +23,7 @@ namespace KMime {
class KDE_EXPORT CharFreq {
public:
- CharFreq( const QByteArray & buf );
+ CharFreq( const TQByteArray & buf );
CharFreq( const char * buf, size_t len );
enum Type { None = 0, EightBitData, Binary = EightBitData,
diff --git a/libkmime/kmime_codec_identity.cpp b/libkmime/kmime_codec_identity.cpp
index 973ec360c..dd7951f6b 100644
--- a/libkmime/kmime_codec_identity.cpp
+++ b/libkmime/kmime_codec_identity.cpp
@@ -91,19 +91,19 @@ bool IdentityEnDecoder::decode( const char* & scursor, const char * const send,
return scursor == send;
}
-QByteArray IdentityCodec::encode( const QByteArray & src, bool withCRLF ) const {
+TQByteArray IdentityCodec::encode( const TQByteArray & src, bool withCRLF ) const {
kdWarning( withCRLF, 5100 ) << "IdentityCodec::encode(): withCRLF not yet supported!" << endl;
return src;
}
-QByteArray IdentityCodec::decode( const QByteArray & src, bool withCRLF ) const {
+TQByteArray IdentityCodec::decode( const TQByteArray & src, bool withCRLF ) const {
kdWarning( withCRLF, 5100 ) << "IdentityCodec::decode(): withCRLF not yet supported!" << endl;
return src;
}
-QCString IdentityCodec::encodeToQCString( const QByteArray & src, bool withCRLF ) const {
+TQCString IdentityCodec::encodeToQCString( const TQByteArray & src, bool withCRLF ) const {
kdWarning( withCRLF, 5100 ) << "IdentityCodec::encodeToQCString(): withCRLF not yet supported!" << endl;
- return QCString( src.data(), src.size() + 1 );
+ return TQCString( src.data(), src.size() + 1 );
}
} // namespace KMime
diff --git a/libkmime/kmime_codec_identity.h b/libkmime/kmime_codec_identity.h
index 54f5b8fdd..0757351bb 100644
--- a/libkmime/kmime_codec_identity.h
+++ b/libkmime/kmime_codec_identity.h
@@ -44,9 +44,9 @@ protected:
public:
~IdentityCodec() {}
- QByteArray encode( const QByteArray & src, bool withCRLF ) const;
- QCString encodeToQCString( const QByteArray & src, bool withCRLF ) const;
- QByteArray decode( const QByteArray & src, bool withCRLF ) const;
+ TQByteArray encode( const TQByteArray & src, bool withCRLF ) const;
+ TQCString encodeToQCString( const TQByteArray & src, bool withCRLF ) const;
+ TQByteArray decode( const TQByteArray & src, bool withCRLF ) const;
int maxEncodedSizeFor( int insize, bool withCRLF ) const {
if ( withCRLF )
@@ -105,8 +105,8 @@ public:
return insize;
}
- QCString encodeToQCString( const QByteArray &, bool ) const {
- return QCString();
+ TQCString encodeToQCString( const TQByteArray &, bool ) const {
+ return TQCString();
}
};
diff --git a/libkmime/kmime_codec_qp.cpp b/libkmime/kmime_codec_qp.cpp
index c867a6346..6029a31a1 100644
--- a/libkmime/kmime_codec_qp.cpp
+++ b/libkmime/kmime_codec_qp.cpp
@@ -609,7 +609,7 @@ bool Rfc2047QEncodingEncoder::encode( const char* & scursor, const char * const
return (scursor == send);
} // encode
-#include <qstring.h>
+#include <tqstring.h>
bool Rfc2047QEncodingEncoder::finish( char* & dcursor, const char * const dend ) {
mInsideFinishing = true;
diff --git a/libkmime/kmime_codecs.cpp b/libkmime/kmime_codecs.cpp
index fdb385e58..9a55c339d 100644
--- a/libkmime/kmime_codecs.cpp
+++ b/libkmime/kmime_codecs.cpp
@@ -39,7 +39,7 @@
#include <kdebug.h>
-#include <qcstring.h>
+#include <tqcstring.h>
#include <kstaticdeleter.h>
#include <cassert>
@@ -50,11 +50,11 @@ using namespace KMime;
namespace KMime {
// global list of KMime::Codec's
-QAsciiDict<Codec>* Codec::all = 0;
-static KStaticDeleter<QAsciiDict<Codec> > sdAll;
+TQAsciiDict<Codec>* Codec::all = 0;
+static KStaticDeleter<TQAsciiDict<Codec> > sdAll;
#if defined(QT_THREAD_SUPPORT)
-QMutex* Codec::dictLock = 0;
-static KStaticDeleter<QMutex> sdDictLock;
+TQMutex* Codec::dictLock = 0;
+static KStaticDeleter<TQMutex> sdDictLock;
#endif
void Codec::fillDictionary() {
@@ -76,11 +76,11 @@ void Codec::fillDictionary() {
Codec * Codec::codecForName( const char * name ) {
#if defined(QT_THREAD_SUPPORT)
if ( !dictLock )
- sdDictLock.setObject( dictLock, new QMutex );
+ sdDictLock.setObject( dictLock, new TQMutex );
dictLock->lock(); // protect "all"
#endif
if ( !all ) {
- sdAll.setObject( all, new QAsciiDict<Codec>( 11, false /* case-insensitive */) );
+ sdAll.setObject( all, new TQAsciiDict<Codec>( 11, false /* case-insensitive */) );
fillDictionary();
}
Codec * codec = (*all)[ name ];
@@ -94,7 +94,7 @@ Codec * Codec::codecForName( const char * name ) {
return codec;
}
-Codec * Codec::codecForName( const QCString & name ) {
+Codec * Codec::codecForName( const TQCString & name ) {
return codecForName( name.data() );
}
@@ -125,16 +125,16 @@ bool Codec::encode( const char* & scursor, const char * const send,
return true; // successfully encoded.
}
-QByteArray Codec::encode( const QByteArray & src, bool withCRLF ) const
+TQByteArray Codec::encode( const TQByteArray & src, bool withCRLF ) const
{
// allocate buffer for the worst case:
- QByteArray result( maxEncodedSizeFor( src.size(), withCRLF ) );
+ TQByteArray result( maxEncodedSizeFor( src.size(), withCRLF ) );
// set up iterators:
- QByteArray::ConstIterator iit = src.begin();
- QByteArray::ConstIterator iend = src.end();
- QByteArray::Iterator oit = result.begin();
- QByteArray::ConstIterator oend = result.end();
+ TQByteArray::ConstIterator iit = src.begin();
+ TQByteArray::ConstIterator iend = src.end();
+ TQByteArray::Iterator oit = result.begin();
+ TQByteArray::ConstIterator oend = result.end();
// encode
if ( !encode( iit, iend, oit, oend, withCRLF ) )
@@ -147,16 +147,16 @@ QByteArray Codec::encode( const QByteArray & src, bool withCRLF ) const
return result;
}
-QCString Codec::encodeToQCString( const QByteArray & src, bool withCRLF ) const
+TQCString Codec::encodeToQCString( const TQByteArray & src, bool withCRLF ) const
{
// allocate buffer for the worst case (remember to add one for the trailing NUL)
- QCString result( maxEncodedSizeFor( src.size(), withCRLF ) + 1 );
+ TQCString result( maxEncodedSizeFor( src.size(), withCRLF ) + 1 );
// set up iterators:
- QByteArray::ConstIterator iit = src.begin();
- QByteArray::ConstIterator iend = src.end();
- QByteArray::Iterator oit = result.begin();
- QByteArray::ConstIterator oend = result.end() - 1;
+ TQByteArray::ConstIterator iit = src.begin();
+ TQByteArray::ConstIterator iend = src.end();
+ TQByteArray::Iterator oit = result.begin();
+ TQByteArray::ConstIterator oend = result.end() - 1;
// encode
if ( !encode( iit, iend, oit, oend, withCRLF ) )
@@ -169,16 +169,16 @@ QCString Codec::encodeToQCString( const QByteArray & src, bool withCRLF ) const
return result;
}
-QByteArray Codec::decode( const QByteArray & src, bool withCRLF ) const
+TQByteArray Codec::decode( const TQByteArray & src, bool withCRLF ) const
{
// allocate buffer for the worst case:
- QByteArray result( maxDecodedSizeFor( src.size(), withCRLF ) );
+ TQByteArray result( maxDecodedSizeFor( src.size(), withCRLF ) );
// set up iterators:
- QByteArray::ConstIterator iit = src.begin();
- QByteArray::ConstIterator iend = src.end();
- QByteArray::Iterator oit = result.begin();
- QByteArray::ConstIterator oend = result.end();
+ TQByteArray::ConstIterator iit = src.begin();
+ TQByteArray::ConstIterator iend = src.end();
+ TQByteArray::Iterator oit = result.begin();
+ TQByteArray::ConstIterator oend = result.end();
// decode
if ( !decode( iit, iend, oit, oend, withCRLF ) )
diff --git a/libkmime/kmime_codecs.h b/libkmime/kmime_codecs.h
index df2c6a560..3ff0c4a42 100644
--- a/libkmime/kmime_codecs.h
+++ b/libkmime/kmime_codecs.h
@@ -32,12 +32,12 @@
#ifndef __KMIME_CODECS__
#define __KMIME_CODECS__
-#include <qasciidict.h>
+#include <tqasciidict.h>
#if defined(QT_THREAD_SUPPORT)
-# include <qmutex.h>
+# include <tqmutex.h>
#endif
-#include <qcstring.h> // QByteArray
+#include <tqcstring.h> // QByteArray
#include <kdebug.h> // for kdFatal()
#include <kdepimmacros.h>
@@ -57,9 +57,9 @@ class Decoder;
class KDE_EXPORT Codec {
protected:
- static QAsciiDict<Codec>* all;
+ static TQAsciiDict<Codec>* all;
#if defined(QT_THREAD_SUPPORT)
- static QMutex* dictLock;
+ static TQMutex* dictLock;
#endif
Codec() {}
@@ -68,7 +68,7 @@ private:
public:
static Codec * codecForName( const char * name );
- static Codec * codecForName( const QCString & name );
+ static Codec * codecForName( const TQCString & name );
virtual int maxEncodedSizeFor( int insize, bool withCRLF=false ) const = 0;
virtual int maxDecodedSizeFor( int insize, bool withCRLF=false ) const = 0;
@@ -91,9 +91,9 @@ public:
* <pre>
* KMime::Codec * codec = KMime::Codec::codecForName( "base64" );
* kdFatal( !codec ) << "no base64 codec found!?" << endl;
- * QByteArray out( in.size()*1.4 ); // crude maximal size of b64 encoding
- * QByteArray::Iterator iit = in.begin();
- * QByteArray::Iterator oit = out.begin();
+ * TQByteArray out( in.size()*1.4 ); // crude maximal size of b64 encoding
+ * TQByteArray::Iterator iit = in.begin();
+ * TQByteArray::Iterator oit = out.begin();
* if ( !codec->encode( iit, in.end(), oit, out.end() ) ) {
* kdDebug() << "output buffer too small" << endl;
* return;
@@ -127,9 +127,9 @@ public:
* <pre>
* KMime::Codec * codec = KMime::Codec::codecForName( "base64" );
* kdFatal( !codec ) << "no base64 codec found!?" << endl;
- * QByteArray out( in.size() ); // good guess for any encoding...
- * QByteArray::Iterator iit = in.begin();
- * QByteArray::Iterator oit = out.begin();
+ * TQByteArray out( in.size() ); // good guess for any encoding...
+ * TQByteArray::Iterator iit = in.begin();
+ * TQByteArray::Iterator oit = out.begin();
* if ( !codec->decode( iit, in.end(), oit, out.end() ) ) {
* kdDebug() << "output buffer too small" << endl;
* return;
@@ -151,33 +151,33 @@ public:
/**
* Even more convenient, but also a bit slower and more memory
* intensive, since it allocates storage for the worst case and then
- * shrinks the result QByteArray to the actual size again.
+ * shrinks the result TQByteArray to the actual size again.
*
* For use with small @p src.
**/
- virtual QByteArray encode( const QByteArray & src, bool withCRLF=false ) const;
+ virtual TQByteArray encode( const TQByteArray & src, bool withCRLF=false ) const;
/**
* Even more convenient, but also a bit slower and more memory
* intensive, since it allocates storage for the worst case and then
- * shrinks the result QCString to the actual size again.
+ * shrinks the result TQCString to the actual size again.
*
* For use with small @p src.
*
* This method only works for codecs whose output is in the 8bit
* domain (ie. not in the binary domain). Codecs that do not fall
- * into this category will return a null QCString.
+ * into this category will return a null TQCString.
**/
- virtual QCString encodeToQCString( const QByteArray & src, bool withCRLF=false ) const;
+ virtual TQCString encodeToQCString( const TQByteArray & src, bool withCRLF=false ) const;
/**
* Even more convenient, but also a bit slower and more memory
* intensive, since it allocates storage for the worst case and then
- * shrinks the result QByteArray to the actual size again.
+ * shrinks the result TQByteArray to the actual size again.
*
* For use with small @p src.
**/
- virtual QByteArray decode( const QByteArray & src, bool withCRLF=false ) const;
+ virtual TQByteArray decode( const TQByteArray & src, bool withCRLF=false ) const;
/**
* @return the name of the encoding. Guaranteed to be lowercase.
@@ -189,7 +189,7 @@ public:
};
/**
- * Stateful decoder class, modelled after QTextDecoder.
+ * Stateful decoder class, modelled after TQTextDecoder.
*
* @section Overview
*
@@ -238,9 +238,9 @@ public:
* kdFatal( !codec ) << "No codec found for base64!" << endl;
* KMime::Decoder * dec = codec->makeDecoder();
* assert( dec ); // should not happen
- * QByteArray out( 256 ); // small buffer is enough ;-)
- * QByteArray::Iterator iit = in.begin();
- * QByteArray::Iterator oit = out.begin();
+ * TQByteArray out( 256 ); // small buffer is enough ;-)
+ * TQByteArray::Iterator iit = in.begin();
+ * TQByteArray::Iterator oit = out.begin();
* // decode the chunk
* while ( !dec->decode( iit, in.end(), oit, out.end() ) )
* if ( oit == out.end() ) { // output buffer full, process contents
@@ -293,7 +293,7 @@ protected:
const bool mWithCRLF;
};
-/** Stateful encoder class, modelled after QTextEncoder.
+/** Stateful encoder class, modelled after TQTextEncoder.
@short Stateful encoder class
@author Marc Mutz <mutz@kde.org>
*/
diff --git a/libkmime/kmime_content.cpp b/libkmime/kmime_content.cpp
index e450d8022..6eca383fa 100644
--- a/libkmime/kmime_content.cpp
+++ b/libkmime/kmime_content.cpp
@@ -22,7 +22,7 @@
#include <klocale.h>
#include <kdebug.h>
-#include <qtextcodec.h>
+#include <tqtextcodec.h>
using namespace KMime;
@@ -35,7 +35,7 @@ Content::Content()
}
-Content::Content(const QCString &h, const QCString &b)
+Content::Content(const TQCString &h, const TQCString &b)
: c_ontents(0), h_eaders(0), f_orceDefaultCS(false)
{
d_efaultCS = cachedCharset("ISO-8859-1");
@@ -51,17 +51,17 @@ Content::~Content()
}
-void Content::setContent(QStrList *l)
+void Content::setContent(TQStrList *l)
{
- //qDebug("Content::setContent(QStrList *l) : start");
+ //qDebug("Content::setContent(TQStrList *l) : start");
h_ead.resize(0);
b_ody.resize(0);
//usage of textstreams is much faster than simply appending the strings
- QTextStream hts(h_ead, IO_WriteOnly),
+ TQTextStream hts(h_ead, IO_WriteOnly),
bts(b_ody, IO_WriteOnly);
- hts.setEncoding(QTextStream::Latin1);
- bts.setEncoding(QTextStream::Latin1);
+ hts.setEncoding(TQTextStream::Latin1);
+ bts.setEncoding(TQTextStream::Latin1);
bool isHead=true;
for(char *line=l->first(); line; line=l->next()) {
@@ -79,11 +79,11 @@ void Content::setContent(QStrList *l)
hts << '\0';
bts << '\0';
- //qDebug("Content::setContent(QStrList *l) : finished");
+ //qDebug("Content::setContent(TQStrList *l) : finished");
}
-void Content::setContent(const QCString &s)
+void Content::setContent(const TQCString &s)
{
int pos=s.find("\n\n", 0);
if(pos>-1) {
@@ -116,7 +116,7 @@ void Content::parse()
c_ontents=0;
Headers::ContentType *ct=contentType();
- QCString tmp;
+ TQCString tmp;
Content *c;
Headers::contentCategory cat;
@@ -229,8 +229,8 @@ void Content::parse()
c->setContent(tmp);
// the bodies of yenc message parts are binary data, not null-terminated strings:
- QByteArray body = yenc.binaryParts()[i];
- QCString body_string(body.size());
+ TQByteArray body = yenc.binaryParts()[i];
+ TQCString body_string(body.size());
memcpy(body_string.data(), body.data(), body.size());
c->setBody(body_string);
@@ -255,7 +255,7 @@ void Content::parse()
void Content::assemble()
{
- QCString newHead="";
+ TQCString newHead="";
//Content-Type
newHead+=contentType()->as7BitString()+"\n";
@@ -288,9 +288,9 @@ void Content::clear()
}
-QCString Content::encodedContent(bool useCrLf)
+TQCString Content::encodedContent(bool useCrLf)
{
- QCString e;
+ TQCString e;
// hack to convert articles with uuencoded or yencoded binaries into
// proper mime-compliant articles
@@ -313,9 +313,9 @@ QCString Content::encodedContent(bool useCrLf)
// add proper mime headers...
if (convertNonMimeBinaries) {
- h_ead.replace(QRegExp("MIME-Version: .*\\n"),"");
- h_ead.replace(QRegExp("Content-Type: .*\\n"),"");
- h_ead.replace(QRegExp("Content-Transfer-Encoding: .*\\n"),"");
+ h_ead.replace(TQRegExp("MIME-Version: .*\\n"),"");
+ h_ead.replace(TQRegExp("Content-Type: .*\\n"),"");
+ h_ead.replace(TQRegExp("Content-Transfer-Encoding: .*\\n"),"");
h_ead+="MIME-Version: 1.0\n";
h_ead+=contentType(true)->as7BitString()+"\n";
h_ead+=contentTransferEncoding(true)->as7BitString()+"\n";
@@ -332,7 +332,7 @@ QCString Content::encodedContent(bool useCrLf)
if(enc->needToEncode()) {
if(enc->cte()==Headers::CEquPr) {
- QByteArray temp(b_ody.length());
+ TQByteArray temp(b_ody.length());
memcpy(temp.data(), b_ody.data(), b_ody.length());
e+=KCodecs::quotedPrintableEncode(temp, false);
} else {
@@ -345,7 +345,7 @@ QCString Content::encodedContent(bool useCrLf)
}
else if(c_ontents && !c_ontents->isEmpty()) { //this is a multipart message
Headers::ContentType *ct=contentType();
- QCString boundary="\n--"+ct->boundary();
+ TQCString boundary="\n--"+ct->boundary();
//add all (encoded) contents separated by boundaries
for(Content *c=c_ontents->first(); c; c=c_ontents->next()) {
@@ -363,9 +363,9 @@ QCString Content::encodedContent(bool useCrLf)
}
-QByteArray Content::decodedContent()
+TQByteArray Content::decodedContent()
{
- QByteArray temp, ret;
+ TQByteArray temp, ret;
Headers::CTEncoding *ec=contentTransferEncoding();
bool removeTrailingNewline=false;
int size=ec->cte()==Headers::CEbinary ? b_ody.size() : b_ody.length();
@@ -409,14 +409,14 @@ QByteArray Content::decodedContent()
}
-void Content::decodedText(QString &s, bool trimText,
+void Content::decodedText(TQString &s, bool trimText,
bool removeTrailingNewlines)
{
if(!decodeText()) //this is not a text content !!
return;
bool ok=true;
- QTextCodec *codec=KGlobal::charsets()->codecForName(contentType()->charset(),ok);
+ TQTextCodec *codec=KGlobal::charsets()->codecForName(contentType()->charset(),ok);
s=codec->toUnicode(b_ody.data(), b_ody.length());
@@ -433,16 +433,16 @@ void Content::decodedText(QString &s, bool trimText,
}
-void Content::decodedText(QStringList &l, bool trimText,
+void Content::decodedText(TQStringList &l, bool trimText,
bool removeTrailingNewlines)
{
if(!decodeText()) //this is not a text content !!
return;
- QString unicode;
+ TQString unicode;
bool ok=true;
- QTextCodec *codec=KGlobal::charsets()->codecForName(contentType()->charset(),ok);
+ TQTextCodec *codec=KGlobal::charsets()->codecForName(contentType()->charset(),ok);
unicode=codec->toUnicode(b_ody.data(), b_ody.length());
@@ -457,18 +457,18 @@ void Content::decodedText(QStringList &l, bool trimText,
unicode.truncate(unicode.length()-1); // remove trailing new-line
}
- l=QStringList::split('\n', unicode, true); //split the string at linebreaks
+ l=TQStringList::split('\n', unicode, true); //split the string at linebreaks
}
-void Content::fromUnicodeString(const QString &s)
+void Content::fromUnicodeString(const TQString &s)
{
bool ok=true;
- QTextCodec *codec=KGlobal::charsets()->codecForName(contentType()->charset(),ok);
+ TQTextCodec *codec=KGlobal::charsets()->codecForName(contentType()->charset(),ok);
if(!ok) { // no suitable codec found => try local settings and hope the best ;-)
codec=KGlobal::locale()->codecForEncoding();
- QCString chset=KGlobal::locale()->encoding();
+ TQCString chset=KGlobal::locale()->encoding();
contentType()->setCharset(chset);
}
@@ -647,18 +647,18 @@ void Content::changeEncoding(Headers::contentEncoding e)
}
-void Content::toStream(QTextStream &ts, bool scrambleFromLines)
+void Content::toStream(TQTextStream &ts, bool scrambleFromLines)
{
- QCString ret=encodedContent(false);
+ TQCString ret=encodedContent(false);
if (scrambleFromLines)
- ret.replace(QRegExp("\\n\\nFrom "), "\n\n>From ");
+ ret.replace(TQRegExp("\\n\\nFrom "), "\n\n>From ");
ts << ret;
}
-Headers::Generic* Content::getNextHeader(QCString &head)
+Headers::Generic* Content::getNextHeader(TQCString &head)
{
int pos1=-1, pos2=0, len=head.length()-1;
bool folded(false);
@@ -684,7 +684,7 @@ Headers::Generic* Content::getNextHeader(QCString &head)
if (!folded)
header = new Headers::Generic(head.left(pos1-2), this, head.mid(pos1, pos2-pos1));
else
- header = new Headers::Generic(head.left(pos1-2), this, head.mid(pos1, pos2-pos1).replace(QRegExp("\\s*\\n\\s*")," "));
+ header = new Headers::Generic(head.left(pos1-2), this, head.mid(pos1, pos2-pos1).replace(TQRegExp("\\s*\\n\\s*")," "));
head.remove(0,pos2+1);
}
@@ -708,7 +708,7 @@ Headers::Base* Content::getHeaderByType(const char *type)
if(h->is(type)) return h; //found
//now we look for it in the article head
- QCString raw=rawHeader(type);
+ TQCString raw=rawHeader(type);
if(!raw.isEmpty()) { //ok, we found it
//choose a suitable header class
if(strcasecmp("Message-Id", type)==0)
@@ -827,7 +827,7 @@ int Content::lineCount()
}
-QCString Content::rawHeader(const char *name)
+TQCString Content::rawHeader(const char *name)
{
return extractHeader(h_ead, name);
}
@@ -855,7 +855,7 @@ bool Content::decodeText()
b_ody.append("\n");
break;
case Headers::CEbinary :
- b_ody=QCString(b_ody.data(), b_ody.size()+1);
+ b_ody=TQCString(b_ody.data(), b_ody.size()+1);
b_ody.append("\n");
default :
break;
@@ -866,7 +866,7 @@ bool Content::decodeText()
}
-void Content::setDefaultCharset(const QCString &cs)
+void Content::setDefaultCharset(const TQCString &cs)
{
d_efaultCS = KMime::cachedCharset(cs);
diff --git a/libkmime/kmime_content.h b/libkmime/kmime_content.h
index fb28b5e61..1d2aac2d3 100644
--- a/libkmime/kmime_content.h
+++ b/libkmime/kmime_content.h
@@ -29,7 +29,7 @@ class KMime::Headers::List;
#include "kmime_util.h"
#include "kmime_headers.h"
-#include <qtextstream.h>
+#include <tqtextstream.h>
namespace KMime {
@@ -59,10 +59,10 @@ class Base {
class KDE_EXPORT Content : public Base {
public:
- typedef QPtrList<KMime::Content> List;
+ typedef TQPtrList<KMime::Content> List;
Content();
- Content(const QCString &h, const QCString &b);
+ Content(const TQCString &h, const TQCString &b);
virtual ~Content();
//type
@@ -70,16 +70,16 @@ class KDE_EXPORT Content : public Base {
//content handling
bool hasContent() { return ( !h_ead.isEmpty() && (!b_ody.isEmpty() || (c_ontents && !c_ontents->isEmpty())) ); }
- void setContent(QStrList *l);
- void setContent(const QCString &s);
+ void setContent(TQStrList *l);
+ void setContent(const TQCString &s);
virtual void parse();
virtual void assemble();
virtual void clear();
//header access
- QCString head() { return h_ead; }
+ TQCString head() { return h_ead; }
// extracts and removes the next header from head. The caller has to delete the returned header;
- Headers::Generic* getNextHeader(QCString &head);
+ Headers::Generic* getNextHeader(TQCString &head);
virtual Headers::Base* getHeaderByType(const char *type);
virtual void setHeader(Headers::Base *h);
virtual bool removeHeader(const char *type);
@@ -93,15 +93,15 @@ class KDE_EXPORT Content : public Base {
int size();
int storageSize();
int lineCount();
- QCString body() { return b_ody; }
- void setBody( const QCString & str ) { b_ody = str; }
- QCString encodedContent(bool useCrLf=false);
- QByteArray decodedContent();
- void decodedText(QString &s, bool trimText=false,
+ TQCString body() { return b_ody; }
+ void setBody( const TQCString & str ) { b_ody = str; }
+ TQCString encodedContent(bool useCrLf=false);
+ TQByteArray decodedContent();
+ void decodedText(TQString &s, bool trimText=false,
bool removeTrailingNewlines=false);
- void decodedText(QStringList &s, bool trimText=false,
+ void decodedText(TQStringList &s, bool trimText=false,
bool removeTrailingNewlines=false);
- void fromUnicodeString(const QString &s);
+ void fromUnicodeString(const TQString &s);
Content* textContent();
void attachments(List *dst, bool incAlternatives=false);
@@ -112,12 +112,12 @@ class KDE_EXPORT Content : public Base {
//saves the encoded content to the given textstream
// scrambleFromLines: replace "\nFrom " with "\n>From ", this is
// needed to avoid problem with mbox-files
- void toStream(QTextStream &ts, bool scrambleFromLines=false);
+ void toStream(TQTextStream &ts, bool scrambleFromLines=false);
// this charset is used for all headers and the body
// if the charset is not declared explictly
- QCString defaultCharset() { return QCString(d_efaultCS); }
- void setDefaultCharset(const QCString &cs);
+ TQCString defaultCharset() { return TQCString(d_efaultCS); }
+ void setDefaultCharset(const TQCString &cs);
// use the default charset even if a different charset is
// declared in the article
@@ -130,11 +130,11 @@ class KDE_EXPORT Content : public Base {
protected:
- QCString rawHeader(const char *name);
+ TQCString rawHeader(const char *name);
bool decodeText();
template <class T> T* getHeaderInstance(T *ptr, bool create);
- QCString h_ead,
+ TQCString h_ead,
b_ody;
List *c_ontents;
Headers::Base::List *h_eaders;
diff --git a/libkmime/kmime_header_parsing.cpp b/libkmime/kmime_header_parsing.cpp
index 1b67cee2b..9222ff914 100644
--- a/libkmime/kmime_header_parsing.cpp
+++ b/libkmime/kmime_header_parsing.cpp
@@ -39,10 +39,10 @@
#include <kglobal.h>
#include <kcharsets.h>
-#include <qtextcodec.h>
-#include <qmap.h>
-#include <qcstring.h>
-#include <qstringlist.h>
+#include <tqtextcodec.h>
+#include <tqmap.h>
+#include <tqcstring.h>
+#include <tqstringlist.h>
#include <ctype.h> // for isdigit
#include <cassert>
@@ -54,9 +54,9 @@ namespace KMime {
namespace Types {
- QString AddrSpec::asString() const {
+ TQString AddrSpec::asString() const {
bool needsQuotes = false;
- QString result;
+ TQString result;
result.reserve( localPart.length() + domain.length() + 1 );
for ( unsigned int i = 0 ; i < localPart.length() ; ++i ) {
const char ch = localPart[i].latin1();
@@ -81,7 +81,7 @@ namespace HeaderParsing {
// parse the encoded-word (scursor points to after the initial '=')
bool parseEncodedWord( const char* & scursor, const char * const send,
- QString & result, QCString & language ) {
+ TQString & result, TQCString & language ) {
// make sure the caller already did a bit of the work.
assert( *(scursor-1) == '=' );
@@ -121,10 +121,10 @@ bool parseEncodedWord( const char* & scursor, const char * const send,
// extract the language information, if any (if languageStart is 0,
// language will be null, too):
- QCString maybeLanguage( languageStart, scursor - languageStart + 1 /*for NUL*/);
+ TQCString maybeLanguage( languageStart, scursor - languageStart + 1 /*for NUL*/);
// extract charset information (keep in mind: the size given to the
// ctor is one off due to the \0 terminator):
- QCString maybeCharset( charsetStart, ( languageStart ? languageStart : scursor + 1 ) - charsetStart );
+ TQCString maybeCharset( charsetStart, ( languageStart ? languageStart : scursor + 1 ) - charsetStart );
//
// STEP 2:
@@ -148,7 +148,7 @@ bool parseEncodedWord( const char* & scursor, const char * const send,
}
// extract the encoding information:
- QCString maybeEncoding( encodingStart, scursor - encodingStart + 1 );
+ TQCString maybeEncoding( encodingStart, scursor - encodingStart + 1 );
kdDebug() << "parseEncodedWord: found charset == \"" << maybeCharset
@@ -220,9 +220,9 @@ bool parseEncodedWord( const char* & scursor, const char * const send,
// allocate a temporary buffer to store the 8bit text:
int encodedTextLength = encodedTextEnd - encodedTextStart;
- QByteArray buffer( codec->maxDecodedSizeFor( encodedTextLength ) );
- QByteArray::Iterator bit = buffer.begin();
- QByteArray::ConstIterator bend = buffer.end();
+ TQByteArray buffer( codec->maxDecodedSizeFor( encodedTextLength ) );
+ TQByteArray::Iterator bit = buffer.begin();
+ TQByteArray::ConstIterator bend = buffer.end();
//
// STEP 5:
@@ -251,12 +251,12 @@ static inline void eatWhiteSpace( const char* & scursor, const char * const send
}
bool parseAtom( const char * & scursor, const char * const send,
- QString & result, bool allow8Bit )
+ TQString & result, bool allow8Bit )
{
QPair<const char*,int> maybeResult;
if ( parseAtom( scursor, send, maybeResult, allow8Bit ) ) {
- result += QString::fromLatin1( maybeResult.first, maybeResult.second );
+ result += TQString::fromLatin1( maybeResult.first, maybeResult.second );
return true;
}
@@ -291,12 +291,12 @@ bool parseAtom( const char * & scursor, const char * const send,
}
bool parseToken( const char * & scursor, const char * const send,
- QString & result, bool allow8Bit )
+ TQString & result, bool allow8Bit )
{
QPair<const char*,int> maybeResult;
if ( parseToken( scursor, send, maybeResult, allow8Bit ) ) {
- result += QString::fromLatin1( maybeResult.first, maybeResult.second );
+ result += TQString::fromLatin1( maybeResult.first, maybeResult.second );
return true;
}
@@ -343,7 +343,7 @@ bool parseToken( const char * & scursor, const char * const send,
// - doesn't handle quoted CRLF
bool parseGenericQuotedString( const char* & scursor, const char * const send,
- QString & result, bool isCRLF,
+ TQString & result, bool isCRLF,
const char openChar, const char closeChar )
{
char ch;
@@ -369,7 +369,7 @@ bool parseGenericQuotedString( const char* & scursor, const char * const send,
// misses "\" CRLF LWSP-char handling, see rfc822, 3.4.5
READ_ch_OR_FAIL;
KMIME_WARN_IF_8BIT(ch);
- result += QChar(ch);
+ result += TQChar(ch);
break;
case '\r':
// ###
@@ -383,7 +383,7 @@ bool parseGenericQuotedString( const char* & scursor, const char * const send,
if ( ch != '\n' ) {
// CR on it's own...
KMIME_WARN_LONE(CR);
- result += QChar('\r');
+ result += TQChar('\r');
scursor--; // points to after the '\r' again
} else {
// CRLF encountered.
@@ -393,7 +393,7 @@ bool parseGenericQuotedString( const char* & scursor, const char * const send,
// correct folding;
// position cursor behind the CRLF WSP (unfolding)
// and add the WSP to the result
- result += QChar(ch);
+ result += TQChar(ch);
} else {
// this is the "shouldn't happen"-case. There is a CRLF
// inside a quoted-string without it being part of FWS.
@@ -419,11 +419,11 @@ bool parseGenericQuotedString( const char* & scursor, const char * const send,
if ( !isCRLF && ( ch == ' ' || ch == '\t' ) ) {
// folding
// correct folding
- result += QChar(ch);
+ result += TQChar(ch);
} else {
// non-folding
KMIME_WARN_LONE(LF);
- result += QChar('\n');
+ result += TQChar('\n');
// pos is decremented, so's we need not duplicate the whole
// switch here. ch could've been everything (incl. <">, "\").
scursor--;
@@ -431,7 +431,7 @@ bool parseGenericQuotedString( const char* & scursor, const char * const send,
break;
default:
KMIME_WARN_IF_8BIT(ch);
- result += QChar(ch);
+ result += TQChar(ch);
}
}
@@ -443,17 +443,17 @@ bool parseGenericQuotedString( const char* & scursor, const char * const send,
// - doesn't handle encoded-word inside comments.
bool parseComment( const char* & scursor, const char * const send,
- QString & result, bool isCRLF, bool reallySave )
+ TQString & result, bool isCRLF, bool reallySave )
{
int commentNestingDepth = 1;
const char * afterLastClosingParenPos = 0;
- QString maybeCmnt;
+ TQString maybeCmnt;
const char * oldscursor = scursor;
assert( *(scursor-1) == '(' );
while ( commentNestingDepth ) {
- QString cmntPart;
+ TQString cmntPart;
if ( parseGenericQuotedString( scursor, send, cmntPart, isCRLF, '(', ')' ) ) {
assert( *(scursor-1) == ')' || *(scursor-1) == '(' );
// see the kdoc for above function for the possible conditions
@@ -465,8 +465,8 @@ bool parseComment( const char* & scursor, const char * const send,
result += maybeCmnt;
result += cmntPart;
if ( commentNestingDepth > 1 ) // don't add the outermost ')'...
- result += QChar(')');
- maybeCmnt = QString::null;
+ result += TQChar(')');
+ maybeCmnt = TQString::null;
}
afterLastClosingParenPos = scursor;
--commentNestingDepth;
@@ -476,7 +476,7 @@ bool parseComment( const char* & scursor, const char * const send,
// don't add to "result" yet, because we might find that we
// are already outside the (broken) comment...
maybeCmnt += cmntPart;
- maybeCmnt += QChar('(');
+ maybeCmnt += TQChar('(');
}
++commentNestingDepth;
break;
@@ -499,11 +499,11 @@ bool parseComment( const char* & scursor, const char * const send,
// known issues: none.
bool parsePhrase( const char* & scursor, const char * const send,
- QString & result, bool isCRLF )
+ TQString & result, bool isCRLF )
{
enum { None, Phrase, Atom, EncodedWord, QuotedString } found = None;
- QString tmp;
- QCString lang;
+ TQString tmp;
+ TQCString lang;
const char * successfullyParsed = 0;
// only used by the encoded-word branch
const char * oldscursor;
@@ -527,7 +527,7 @@ bool parsePhrase( const char* & scursor, const char * const send,
}
break;
case '"': // quoted-string
- tmp = QString::null;
+ tmp = TQString::null;
if ( parseGenericQuotedString( scursor, send, tmp, isCRLF, '"', '"' ) ) {
successfullyParsed = scursor;
assert( *(scursor-1) == '"' );
@@ -540,7 +540,7 @@ bool parsePhrase( const char* & scursor, const char * const send,
case EncodedWord:
case QuotedString:
found = Phrase;
- result += QChar(' '); // rfc822, 3.4.4
+ result += TQChar(' '); // rfc822, 3.4.4
break;
default:
assert( 0 );
@@ -554,7 +554,7 @@ bool parsePhrase( const char* & scursor, const char * const send,
if ( found == None ) {
return false;
} else {
- result += QChar(' '); // rfc822, 3.4.4
+ result += TQChar(' '); // rfc822, 3.4.4
result += tmp;
return true;
}
@@ -562,7 +562,7 @@ bool parsePhrase( const char* & scursor, const char * const send,
break;
case '(': // comment
// parse it, but ignore content:
- tmp = QString::null;
+ tmp = TQString::null;
if ( parseComment( scursor, send, tmp, isCRLF,
false /*don't bother with the content*/ ) ) {
successfullyParsed = scursor;
@@ -577,7 +577,7 @@ bool parsePhrase( const char* & scursor, const char * const send,
}
break;
case '=': // encoded-word
- tmp = QString::null;
+ tmp = TQString::null;
oldscursor = scursor;
lang = 0;
if ( parseEncodedWord( scursor, send, tmp, lang ) ) {
@@ -591,7 +591,7 @@ bool parsePhrase( const char* & scursor, const char * const send,
case Atom:
case QuotedString:
if ( !lastWasEncodedWord )
- result += QChar(' '); // rfc822, 3.4.4
+ result += TQChar(' '); // rfc822, 3.4.4
found = Phrase;
break;
default: assert( 0 );
@@ -605,7 +605,7 @@ bool parsePhrase( const char* & scursor, const char * const send,
// fall though...
default: //atom
- tmp = QString::null;
+ tmp = TQString::null;
scursor--;
if ( parseAtom( scursor, send, tmp, true /* allow 8bit */ ) ) {
successfullyParsed = scursor;
@@ -618,7 +618,7 @@ bool parsePhrase( const char* & scursor, const char * const send,
case EncodedWord:
case QuotedString:
found = Phrase;
- result += QChar(' '); // rfc822, 3.4.4
+ result += TQChar(' '); // rfc822, 3.4.4
break;
default:
assert( 0 );
@@ -642,12 +642,12 @@ bool parsePhrase( const char* & scursor, const char * const send,
bool parseDotAtom( const char* & scursor, const char * const send,
- QString & result, bool isCRLF )
+ TQString & result, bool isCRLF )
{
// always points to just after the last atom parsed:
const char * successfullyParsed;
- QString tmp;
+ TQString tmp;
if ( !parseAtom( scursor, send, tmp, false /* no 8bit */ ) )
return false;
result += tmp;
@@ -671,13 +671,13 @@ bool parseDotAtom( const char* & scursor, const char * const send,
}
// try to parse the next atom:
- QString maybeAtom;
+ TQString maybeAtom;
if ( !parseAtom( scursor, send, maybeAtom, false /*no 8bit*/ ) ) {
scursor = successfullyParsed;
return true;
}
- result += QChar('.');
+ result += TQChar('.');
result += maybeAtom;
successfullyParsed = scursor;
}
@@ -688,7 +688,7 @@ bool parseDotAtom( const char* & scursor, const char * const send,
void eatCFWS( const char* & scursor, const char * const send, bool isCRLF ) {
- QString dummy;
+ TQString dummy;
while ( scursor != send ) {
const char * oldscursor = scursor;
@@ -717,7 +717,7 @@ void eatCFWS( const char* & scursor, const char * const send, bool isCRLF ) {
}
bool parseDomain( const char* & scursor, const char * const send,
- QString & result, bool isCRLF ) {
+ TQString & result, bool isCRLF ) {
eatCFWS( scursor, send, isCRLF );
if ( scursor == send ) return false;
@@ -729,7 +729,7 @@ bool parseDomain( const char* & scursor, const char * const send,
if ( *scursor == '[' ) {
// domain-literal:
- QString maybeDomainLiteral;
+ TQString maybeDomainLiteral;
// eat '[':
scursor++;
while ( parseGenericQuotedString( scursor, send, maybeDomainLiteral,
@@ -748,7 +748,7 @@ bool parseDomain( const char* & scursor, const char * const send,
// we hit openChar in parseGenericQuotedString.
// include it in maybeDomainLiteral and keep on parsing:
if ( *(scursor-1) == '[' ) {
- maybeDomainLiteral += QChar('[');
+ maybeDomainLiteral += TQChar('[');
continue;
}
// OK, real end of domain-literal:
@@ -757,7 +757,7 @@ bool parseDomain( const char* & scursor, const char * const send,
}
} else {
// dot-atom:
- QString maybeDotAtom;
+ TQString maybeDotAtom;
if ( parseDotAtom( scursor, send, maybeDotAtom, isCRLF ) ) {
result = maybeDotAtom;
return true;
@@ -767,7 +767,7 @@ bool parseDomain( const char* & scursor, const char * const send,
}
bool parseObsRoute( const char* & scursor, const char* const send,
- QStringList & result, bool isCRLF, bool save ) {
+ TQStringList & result, bool isCRLF, bool save ) {
while ( scursor != send ) {
eatCFWS( scursor, send, isCRLF );
if ( scursor == send ) return false;
@@ -775,14 +775,14 @@ bool parseObsRoute( const char* & scursor, const char* const send,
// empty entry:
if ( *scursor == ',' ) {
scursor++;
- if ( save ) result.append( QString::null );
+ if ( save ) result.append( TQString::null );
continue;
}
// empty entry ending the list:
if ( *scursor == ':' ) {
scursor++;
- if ( save ) result.append( QString::null );
+ if ( save ) result.append( TQString::null );
return true;
}
@@ -792,7 +792,7 @@ bool parseObsRoute( const char* & scursor, const char* const send,
else
scursor++;
- QString maybeDomain;
+ TQString maybeDomain;
if ( !parseDomain( scursor, send, maybeDomain, isCRLF ) ) return false;
if ( save ) result.append( maybeDomain );
@@ -816,8 +816,8 @@ bool parseAddrSpec( const char* & scursor, const char * const send,
// this is equivalent to:
// local-part := word *("." word)
- QString maybeLocalPart;
- QString tmp;
+ TQString maybeLocalPart;
+ TQString tmp;
while ( scursor != send ) {
// first, eat any whitespace
@@ -826,7 +826,7 @@ bool parseAddrSpec( const char* & scursor, const char * const send,
char ch = *scursor++;
switch ( ch ) {
case '.': // dot
- maybeLocalPart += QChar('.');
+ maybeLocalPart += TQChar('.');
break;
case '@':
@@ -834,7 +834,7 @@ bool parseAddrSpec( const char* & scursor, const char * const send,
break;
case '"': // quoted-string
- tmp = QString::null;
+ tmp = TQString::null;
if ( parseGenericQuotedString( scursor, send, tmp, isCRLF, '"', '"' ) )
maybeLocalPart += tmp;
else
@@ -843,7 +843,7 @@ bool parseAddrSpec( const char* & scursor, const char * const send,
default: // atom
scursor--; // re-set scursor to point to ch again
- tmp = QString::null;
+ tmp = TQString::null;
if ( parseAtom( scursor, send, tmp, false /* no 8bit */ ) )
maybeLocalPart += tmp;
else
@@ -864,7 +864,7 @@ SAW_AT_SIGN:
assert( *(scursor-1) == '@' );
- QString maybeDomain;
+ TQString maybeDomain;
if ( !parseDomain( scursor, send, maybeDomain, isCRLF ) )
return false;
@@ -888,7 +888,7 @@ bool parseAngleAddr( const char* & scursor, const char * const send,
if ( *scursor == '@' || *scursor == ',' ) {
// obs-route: parse, but ignore:
KMIME_WARN << "obsolete source route found! ignoring." << endl;
- QStringList dummy;
+ TQStringList dummy;
if ( !parseObsRoute( scursor, send, dummy,
isCRLF, false /* don't save */ ) )
return false;
@@ -926,17 +926,17 @@ bool parseMailbox( const char* & scursor, const char * const send,
// first, try if it's a vanilla addr-spec:
const char * oldscursor = scursor;
if ( parseAddrSpec( scursor, send, maybeAddrSpec, isCRLF ) ) {
- result.displayName = QString::null;
+ result.displayName = TQString::null;
result.addrSpec = maybeAddrSpec;
return true;
}
scursor = oldscursor;
// second, see if there's a display-name:
- QString maybeDisplayName;
+ TQString maybeDisplayName;
if ( !parsePhrase( scursor, send, maybeDisplayName, isCRLF ) ) {
// failed: reset cursor, note absent display-name
- maybeDisplayName = QString::null;
+ maybeDisplayName = TQString::null;
scursor = oldscursor;
} else {
// succeeded: eat CFWS
@@ -974,7 +974,7 @@ bool parseGroup( const char* & scursor, const char * const send,
if ( scursor == send ) return false;
// get display-name:
- QString maybeDisplayName;
+ TQString maybeDisplayName;
if ( !parsePhrase( scursor, send, maybeDisplayName, isCRLF ) )
return false;
@@ -1025,7 +1025,7 @@ bool parseAddress( const char* & scursor, const char * const send,
const char * oldscursor = scursor;
if ( parseMailbox( scursor, send, maybeMailbox, isCRLF ) ) {
// yes, it is:
- result.displayName = QString::null;
+ result.displayName = TQString::null;
result.mailboxList.append( maybeMailbox );
return true;
}
@@ -1065,19 +1065,19 @@ bool parseAddressList( const char* & scursor, const char * const send,
}
-static QString asterisk = QString::fromLatin1("*0*",1);
-static QString asteriskZero = QString::fromLatin1("*0*",2);
-//static QString asteriskZeroAsterisk = QString::fromLatin1("*0*",3);
+static TQString asterisk = TQString::fromLatin1("*0*",1);
+static TQString asteriskZero = TQString::fromLatin1("*0*",2);
+//static TQString asteriskZeroAsterisk = TQString::fromLatin1("*0*",3);
bool parseParameter( const char* & scursor, const char * const send,
- QPair<QString,QStringOrQPair> & result, bool isCRLF ) {
+ QPair<TQString,QStringOrQPair> & result, bool isCRLF ) {
// parameter = regular-parameter / extended-parameter
// regular-parameter = regular-parameter-name "=" value
// extended-parameter =
// value = token / quoted-string
//
// note that rfc2231 handling is out of the scope of this function.
- // Therefore we return the attribute as QString and the value as
+ // Therefore we return the attribute as TQString and the value as
// (start,length) tupel if we see that the value is encoded
// (trailing asterisk), for parseParameterList to decode...
@@ -1087,7 +1087,7 @@ bool parseParameter( const char* & scursor, const char * const send,
//
// parse the parameter name:
//
- QString maybeAttribute;
+ TQString maybeAttribute;
if ( !parseToken( scursor, send, maybeAttribute, false /* no 8bit */ ) )
return false;
@@ -1147,7 +1147,7 @@ bool parseParameter( const char* & scursor, const char * const send,
bool parseRawParameterList( const char* & scursor, const char * const send,
- QMap<QString,QStringOrQPair> & result,
+ TQMap<TQString,QStringOrQPair> & result,
bool isCRLF ) {
// we use parseParameter() consecutively to obtain a map of raw
// attributes to raw values. "Raw" here means that we don't do
@@ -1166,7 +1166,7 @@ bool parseRawParameterList( const char* & scursor, const char * const send,
// empty list entry: ignore.
if ( *scursor == ';' ) { scursor++; continue; }
- QPair<QString,QStringOrQPair> maybeParameter;
+ QPair<TQString,QStringOrQPair> maybeParameter;
if ( !parseParameter( scursor, send, maybeParameter, isCRLF ) ) {
// we need to do a bit of work if the attribute is not
// NULL. These are the cases marked with "needs further
@@ -1199,8 +1199,8 @@ bool parseRawParameterList( const char* & scursor, const char * const send,
static void decodeRFC2231Value( Codec* & rfc2231Codec,
- QTextCodec* & textcodec,
- bool isContinuation, QString & value,
+ TQTextCodec* & textcodec,
+ bool isContinuation, TQString & value,
QPair<const char*,int> & source ) {
//
@@ -1223,11 +1223,11 @@ static void decodeRFC2231Value( Codec* & rfc2231Codec,
// take the whole value to be in latin-1:
KMIME_WARN << "No charset in extended-initial-value. "
"Assuming \"iso-8859-1\"." << endl;
- value += QString::fromLatin1( decBegin, source.second );
+ value += TQString::fromLatin1( decBegin, source.second );
return;
}
- QCString charset( decBegin, decCursor - decBegin + 1 );
+ TQCString charset( decBegin, decCursor - decBegin + 1 );
const char * oldDecCursor = ++decCursor;
// find the second single quote (we ignore the language tag):
@@ -1263,7 +1263,7 @@ static void decodeRFC2231Value( Codec* & rfc2231Codec,
}
if ( !textcodec ) {
- value += QString::fromLatin1( decCursor, decEnd - decCursor );
+ value += TQString::fromLatin1( decCursor, decEnd - decCursor );
return;
}
@@ -1274,9 +1274,9 @@ static void decodeRFC2231Value( Codec* & rfc2231Codec,
// do the decoding:
//
- QByteArray buffer( rfc2231Codec->maxDecodedSizeFor( decEnd - decCursor ) );
- QByteArray::Iterator bit = buffer.begin();
- QByteArray::ConstIterator bend = buffer.end();
+ TQByteArray buffer( rfc2231Codec->maxDecodedSizeFor( decEnd - decCursor ) );
+ TQByteArray::Iterator bit = buffer.begin();
+ TQByteArray::ConstIterator bend = buffer.end();
if ( !dec->decode( decCursor, decEnd, bit, bend ) )
KMIME_WARN << rfc2231Codec->name()
@@ -1295,9 +1295,9 @@ static void decodeRFC2231Value( Codec* & rfc2231Codec,
// exceeds 10 (other-sections then becomes *xy, ie. two digits)
bool parseParameterList( const char* & scursor, const char * const send,
- QMap<QString,QString> & result, bool isCRLF ) {
+ TQMap<TQString,TQString> & result, bool isCRLF ) {
// parse the list into raw attribute-value pairs:
- QMap<QString,QStringOrQPair> rawParameterList;
+ TQMap<TQString,QStringOrQPair> rawParameterList;
if (!parseRawParameterList( scursor, send, rawParameterList, isCRLF ) )
return false;
@@ -1305,16 +1305,16 @@ bool parseParameterList( const char* & scursor, const char * const send,
// decode rfc 2231 continuations and alternate charset encoding:
- // NOTE: this code assumes that what QMapIterator delivers is sorted
+ // NOTE: this code assumes that what TQMapIterator delivers is sorted
// by the key!
Codec * rfc2231Codec = 0;
- QTextCodec * textcodec = 0;
- QString attribute;
- QString value;
+ TQTextCodec * textcodec = 0;
+ TQString attribute;
+ TQString value;
enum Modes { NoMode = 0x0, Continued = 0x1, Encoded = 0x2 } mode;
- QMapIterator<QString,QStringOrQPair> it, end = rawParameterList.end();
+ TQMapIterator<TQString,QStringOrQPair> it, end = rawParameterList.end();
for ( it = rawParameterList.begin() ; it != end ; ++it ) {
if ( attribute.isNull() || !it.key().startsWith( attribute ) ) {
@@ -1325,7 +1325,7 @@ bool parseParameterList( const char* & scursor, const char * const send,
// store the last attribute/value pair in the result map now:
if ( !attribute.isNull() ) result.insert( attribute, value );
// and extract the information from the new raw attribute:
- value = QString::null;
+ value = TQString::null;
attribute = it.key();
mode = NoMode;
// is the value encoded?
@@ -1348,7 +1348,7 @@ bool parseParameterList( const char* & scursor, const char * const send,
} else {
// not encoded.
if ( (*it).qpair.first )
- value += QString::fromLatin1( (*it).qpair.first, (*it).qpair.second );
+ value += TQString::fromLatin1( (*it).qpair.first, (*it).qpair.second );
else
value += (*it).qstring;
}
@@ -1361,14 +1361,14 @@ bool parseParameterList( const char* & scursor, const char * const send,
// save result already:
result.insert( attribute, value );
// force begin of a new attribute:
- attribute = QString::null;
+ attribute = TQString::null;
}
} else /* it.key().startsWith( attribute ) */ {
//
// continuation
//
- // ignore the section and trust QMap to have sorted the keys:
+ // ignore the section and trust TQMap to have sorted the keys:
if ( it.key().endsWith( asterisk ) ) {
// encoded
decodeRFC2231Value( rfc2231Codec, textcodec,
@@ -1377,7 +1377,7 @@ bool parseParameterList( const char* & scursor, const char * const send,
} else {
// not encoded
if ( (*it).qpair.first )
- value += QString::fromLatin1( (*it).qpair.first, (*it).qpair.second );
+ value += TQString::fromLatin1( (*it).qpair.first, (*it).qpair.second );
else
value += (*it).qstring;
}
@@ -1504,7 +1504,7 @@ static bool parseAlphaNumericTimeZone( const char* & scursor,
}
// don't choke just because we don't happen to know the time zone
- KMIME_WARN_UNKNOWN(time zone,QCString( maybeTimeZone.first, maybeTimeZone.second+1 ));
+ KMIME_WARN_UNKNOWN(time zone,TQCString( maybeTimeZone.first, maybeTimeZone.second+1 ));
secsEastOfGMT = 0;
timeZoneKnown = false;
return true;
diff --git a/libkmime/kmime_header_parsing.h b/libkmime/kmime_header_parsing.h
index 326a7e1ba..c595a4214 100644
--- a/libkmime/kmime_header_parsing.h
+++ b/libkmime/kmime_header_parsing.h
@@ -32,9 +32,9 @@
#ifndef __KMIME_HEADER_PARSING_H__
#define __KMIME_HEADER_PARSING_H__
-#include <qstring.h>
-#include <qpair.h>
-#include <qvaluelist.h>
+#include <tqstring.h>
+#include <tqpair.h>
+#include <tqvaluelist.h>
#include <time.h>
@@ -50,28 +50,28 @@ namespace Types {
// for when we can't make up our mind what to use...
struct KDE_EXPORT QStringOrQPair {
QStringOrQPair() : qstring(), qpair(0,0) {}
- QString qstring;
+ TQString qstring;
QPair<const char*,int> qpair;
};
struct KDE_EXPORT AddrSpec {
- QString asString() const;
- QString localPart;
- QString domain;
+ TQString asString() const;
+ TQString localPart;
+ TQString domain;
};
- typedef QValueList<AddrSpec> AddrSpecList;
+ typedef TQValueList<AddrSpec> AddrSpecList;
struct KDE_EXPORT Mailbox {
- QString displayName;
+ TQString displayName;
AddrSpec addrSpec;
};
- typedef QValueList<Mailbox> MailboxList;
+ typedef TQValueList<Mailbox> MailboxList;
struct KDE_EXPORT Address {
- QString displayName;
+ TQString displayName;
MailboxList mailboxList;
};
- typedef QValueList<Address> AddressList;
+ typedef TQValueList<Address> AddressList;
struct KDE_EXPORT DateTime {
time_t time; // secs since 1.1.1970, 0:00 UTC/GMT
@@ -98,7 +98,7 @@ namespace HeaderParsing {
@return the decoded string the encoded word represented.
*/
bool parseEncodedWord( const char* & scursor, const char * const send,
- QString & result, QCString & language ) KDE_EXPORT;
+ TQString & result, TQCString & language ) KDE_EXPORT;
//
// The parsing squad:
//
@@ -106,34 +106,34 @@ namespace HeaderParsing {
/** You may or may not have already started parsing into the
atom. This function will go on where you left off. */
bool parseAtom( const char* & scursor, const char * const send,
- QString & result, bool allow8Bit=false ) KDE_EXPORT;
+ TQString & result, bool allow8Bit=false ) KDE_EXPORT;
bool parseAtom( const char* & scursor, const char * const send,
QPair<const char*,int> & result, bool allow8Bit=false ) KDE_EXPORT;
/** You may or may not have already started parsing into the
token. This function will go on where you left off. */
bool parseToken( const char* & scursor, const char * const send,
- QString & result, bool allow8Bit=false ) KDE_EXPORT;
+ TQString & result, bool allow8Bit=false ) KDE_EXPORT;
bool parseToken( const char* & scursor, const char * const send,
QPair<const char*,int> & result, bool allow8Bit=false ) KDE_EXPORT;
/** @p scursor must be positioned after the opening openChar. */
bool parseGenericQuotedString( const char* & scursor, const char* const send,
- QString & result, bool isCRLF,
+ TQString & result, bool isCRLF,
const char openChar='"',
const char closeChar='"' ) KDE_EXPORT;
/** @p scursor must be positioned right after the opening '(' */
bool parseComment( const char* & scursor, const char * const send,
- QString & result, bool isCRLF=false, bool reallySave=true ) KDE_EXPORT;
+ TQString & result, bool isCRLF=false, bool reallySave=true ) KDE_EXPORT;
/** You may or may not have already started parsing into the phrase,
but only if it starts with atext. If you setup this function to
parse a phrase starting with an encoded-word or quoted-string,
@p scursor has to point to the char introducing the encoded-word
or quoted-string, resp. */
bool parsePhrase( const char* & scursor, const char * const send,
- QString & result, bool isCRLF=false ) KDE_EXPORT;
+ TQString & result, bool isCRLF=false ) KDE_EXPORT;
/** You may or may not have already started parsing into the initial
atom, but not up to it's end. */
bool parseDotAtom( const char* & scursor, const char * const send,
- QString & result, bool isCRLF=false ) KDE_EXPORT;
+ TQString & result, bool isCRLF=false ) KDE_EXPORT;
/** Eats comment-folding-white-space, skips whitespace, folding and
comments (even nested ones) and stops at the next non-CFWS
@@ -147,9 +147,9 @@ namespace HeaderParsing {
void eatCFWS( const char* & scursor, const char * const send, bool isCRLF ) KDE_EXPORT;
bool parseDomain( const char* & scursor, const char * const send,
- QString & result, bool isCRLF=false ) KDE_EXPORT;
+ TQString & result, bool isCRLF=false ) KDE_EXPORT;
bool parseObsRoute( const char* & scursor, const char * const send,
- QStringList & result,
+ TQStringList & result,
bool isCRLF=false, bool save=false ) KDE_EXPORT;
bool parseAddrSpec( const char* & scursor, const char * const send,
Types::AddrSpec & result, bool isCRLF=false ) KDE_EXPORT;
@@ -165,13 +165,13 @@ namespace HeaderParsing {
Types::AddressList & result, bool isCRLF=false ) KDE_EXPORT;
bool parseParameter( const char* & scursor, const char * const send,
- QPair<QString,Types::QStringOrQPair> & result,
+ QPair<TQString,Types::QStringOrQPair> & result,
bool isCRLF=false ) KDE_EXPORT;
bool parseParameterList( const char* & scursor, const char * const send,
- QMap<QString,QString> & result, bool isCRLF=false ) KDE_EXPORT;
+ TQMap<TQString,TQString> & result, bool isCRLF=false ) KDE_EXPORT;
bool parseRawParameterList( const char* & scursor, const char * const send,
- QMap<QString,Types::QStringOrQPair> & result,
+ TQMap<TQString,Types::QStringOrQPair> & result,
bool isCRLF=false ) KDE_EXPORT;
bool parseTime( const char* & scursor, const char * const send,
diff --git a/libkmime/kmime_headers.cpp b/libkmime/kmime_headers.cpp
index 7ae5b95bf..d4557c122 100644
--- a/libkmime/kmime_headers.cpp
+++ b/libkmime/kmime_headers.cpp
@@ -25,11 +25,11 @@
#include "kqcstringsplitter.h"
-#include <qtextcodec.h>
-#include <qstring.h>
-#include <qcstring.h>
-#include <qstringlist.h>
-#include <qvaluelist.h>
+#include <tqtextcodec.h>
+#include <tqstring.h>
+#include <tqcstring.h>
+#include <tqstringlist.h>
+#include <tqvaluelist.h>
#include <kglobal.h>
#include <kcharsets.h>
@@ -47,16 +47,16 @@ namespace KMime {
namespace Headers {
//-----<Base>----------------------------------
-QCString Base::rfc2047Charset()
+TQCString Base::rfc2047Charset()
{
if( (e_ncCS==0) || forceCS() )
return defaultCS();
else
- return QCString(e_ncCS);
+ return TQCString(e_ncCS);
}
-void Base::setRFC2047Charset(const QCString &cs)
+void Base::setRFC2047Charset(const TQCString &cs)
{
e_ncCS=cachedCharset(cs);
}
@@ -68,7 +68,7 @@ bool Base::forceCS()
}
-QCString Base::defaultCS()
+TQCString Base::defaultCS()
{
return ( p_arent!=0 ? p_arent->defaultCharset() : Latin1 );
}
@@ -80,14 +80,14 @@ namespace Generics {
//-----<GUnstructured>-------------------------
-void GUnstructured::from7BitString( const QCString & str )
+void GUnstructured::from7BitString( const TQCString & str )
{
d_ecoded = decodeRFC2047String( str, &e_ncCS, defaultCS(), forceCS() );
}
-QCString GUnstructured::as7BitString( bool withHeaderType )
+TQCString GUnstructured::as7BitString( bool withHeaderType )
{
- QCString result;
+ TQCString result;
if ( withHeaderType )
result = typeIntro();
result += encodeRFC2047String( d_ecoded, e_ncCS ) ;
@@ -95,14 +95,14 @@ QCString GUnstructured::as7BitString( bool withHeaderType )
return result;
}
-void GUnstructured::fromUnicodeString( const QString & str,
- const QCString & suggestedCharset )
+void GUnstructured::fromUnicodeString( const TQString & str,
+ const TQCString & suggestedCharset )
{
d_ecoded = str;
e_ncCS = cachedCharset( suggestedCharset );
}
-QString GUnstructured::asUnicodeString()
+TQString GUnstructured::asUnicodeString()
{
return d_ecoded;
}
@@ -134,14 +134,14 @@ bool MailboxList::parse( const char* & scursor, const char * const send,
// sender := "Sender:" mailbox CRLF
// parse an address-list:
- QValueList<Address> maybeAddressList;
+ TQValueList<Address> maybeAddressList;
if ( !parseAddressList( scursor, send, maybeAddressList, isCRLF ) )
return false;
mMailboxList.clear();
// extract the mailboxes and complain if there are groups:
- QValueList<Address>::Iterator it;
+ TQValueList<Address>::Iterator it;
for ( it = maybeAddressList.begin(); it != maybeAddressList.end() ; ++it ) {
if ( !(*it).displayName.isEmpty() ) {
KMIME_WARN << "mailbox groups in header disallowing them! Name: \""
@@ -178,7 +178,7 @@ bool SingleMailbox::parse( const char* & scursor, const char * const send,
bool AddressList::parse( const char* & scursor, const char * const send,
bool isCRLF ) {
- QValueList<Address> maybeAddressList;
+ TQValueList<Address> maybeAddressList;
if ( !parseAddressList( scursor, send, maybeAddressList, isCRLF ) )
return false;
@@ -202,7 +202,7 @@ bool GToken::parse( const char* & scursor, const char * const send,
QPair<const char*,int> maybeToken;
if ( !parseToken( scursor, send, maybeToken, false /* no 8bit chars */ ) )
return false;
- mToken = QCString( maybeToken.first, maybeToken.second );
+ mToken = TQCString( maybeToken.first, maybeToken.second );
// complain if trailing garbage is found:
eatCFWS( scursor, send, isCRLF );
@@ -231,7 +231,7 @@ bool GPhraseList::parse( const char* & scursor, const char * const send,
// empty entry: ignore.
if ( *scursor != ',' ) { scursor++; continue; }
- QString maybePhrase;
+ TQString maybePhrase;
if ( !parsePhrase( scursor, send, maybePhrase, isCRLF ) )
return false;
mPhraseList.append( maybePhrase );
@@ -254,7 +254,7 @@ bool GPhraseList::parse( const char* & scursor, const char * const send,
bool GDotAtom::parse( const char* & scursor, const char * const send,
bool isCRLF ) {
- QString maybeDotAtom;
+ TQString maybeDotAtom;
if ( !parseDotAtom( scursor, send, maybeDotAtom, isCRLF ) )
return false;
@@ -304,7 +304,7 @@ bool GContentType::parse( const char* & scursor, const char * const send,
if ( !parseToken( scursor, send, maybeMimeType, false /* no 8Bit */ ) )
return false;
- mMimeType = QCString( maybeMimeType.first, maybeMimeType.second ).lower();
+ mMimeType = TQCString( maybeMimeType.first, maybeMimeType.second ).lower();
//
// subtype
@@ -320,7 +320,7 @@ bool GContentType::parse( const char* & scursor, const char * const send,
if ( !parseToken( scursor, send, maybeSubType, false /* no 8bit */ ) )
return false;
- mMimeSubType = QCString( maybeSubType.first, maybeSubType.second ).lower();
+ mMimeSubType = TQCString( maybeSubType.first, maybeSubType.second ).lower();
//
// parameter list
@@ -361,7 +361,7 @@ bool GCISTokenWithParameterList::parse( const char* & scursor,
if ( !parseToken( scursor, send, maybeToken, false /* no 8Bit */ ) )
return false;
- mToken = QCString( maybeToken.first, maybeToken.second ).lower();
+ mToken = TQCString( maybeToken.first, maybeToken.second ).lower();
//
// parameter list
@@ -463,7 +463,7 @@ bool ReturnPath::parse( const char* & scursor, const char * const send, bool isC
// prepare a Null mailbox:
AddrSpec emptyAddrSpec;
- maybeMailbox.displayName = QString::null;
+ maybeMailbox.displayName = TQString::null;
maybeMailbox.addrSpec = emptyAddrSpec;
} else
// check that there was no display-name:
@@ -506,13 +506,13 @@ void Generic::setType(const char *type)
#if !defined(KMIME_NEW_STYLE_CLASSTREE)
//-----<MessageID>-----------------------------
-void MessageID::from7BitString(const QCString &s)
+void MessageID::from7BitString(const TQCString &s)
{
m_id=s;
}
-QCString MessageID::as7BitString(bool incType)
+TQCString MessageID::as7BitString(bool incType)
{
if(incType)
return ( typeIntro()+m_id );
@@ -521,19 +521,19 @@ QCString MessageID::as7BitString(bool incType)
}
-void MessageID::fromUnicodeString(const QString &s, const QCString&)
+void MessageID::fromUnicodeString(const TQString &s, const TQCString&)
{
m_id=s.latin1(); //Message-Ids can only contain us-ascii chars
}
-QString MessageID::asUnicodeString()
+TQString MessageID::asUnicodeString()
{
- return QString::fromLatin1(m_id);
+ return TQString::fromLatin1(m_id);
}
-void MessageID::generate(const QCString &fqdn)
+void MessageID::generate(const TQCString &fqdn)
{
m_id="<"+uniqueString()+"@"+fqdn+">";
}
@@ -544,13 +544,13 @@ void MessageID::generate(const QCString &fqdn)
//-----<Control>-------------------------------
-void Control::from7BitString(const QCString &s)
+void Control::from7BitString(const TQCString &s)
{
c_trlMsg=s;
}
-QCString Control::as7BitString(bool incType)
+TQCString Control::as7BitString(bool incType)
{
if(incType)
return ( typeIntro()+c_trlMsg );
@@ -559,15 +559,15 @@ QCString Control::as7BitString(bool incType)
}
-void Control::fromUnicodeString(const QString &s, const QCString&)
+void Control::fromUnicodeString(const TQString &s, const TQCString&)
{
c_trlMsg=s.latin1();
}
-QString Control::asUnicodeString()
+TQString Control::asUnicodeString()
{
- return QString::fromLatin1(c_trlMsg);
+ return TQString::fromLatin1(c_trlMsg);
}
//-----</Control>------------------------------
@@ -576,15 +576,15 @@ QString Control::asUnicodeString()
#if !defined(KMIME_NEW_STYLE_CLASSTREE)
//-----<AddressField>--------------------------
-void AddressField::from7BitString(const QCString &s)
+void AddressField::from7BitString(const TQCString &s)
{
int pos1=0, pos2=0, type=0;
- QCString n;
+ TQCString n;
//so what do we have here ?
- if(s.find( QRegExp("*@*(*)", false, true) )!=-1) type=2; // From: foo@bar.com (John Doe)
- else if(s.find( QRegExp("*<*@*>", false, true) )!=-1) type=1; // From: John Doe <foo@bar.com>
- else if(s.find( QRegExp("*@*", false, true) )!=-1) type=0; // From: foo@bar.com
+ if(s.find( TQRegExp("*@*(*)", false, true) )!=-1) type=2; // From: foo@bar.com (John Doe)
+ else if(s.find( TQRegExp("*<*@*>", false, true) )!=-1) type=1; // From: John Doe <foo@bar.com>
+ else if(s.find( TQRegExp("*@*", false, true) )!=-1) type=0; // From: foo@bar.com
else { //broken From header => just decode it
n_ame=decodeRFC2047String(s, &e_ncCS, defaultCS(), forceCS());
return;
@@ -631,9 +631,9 @@ void AddressField::from7BitString(const QCString &s)
}
-QCString AddressField::as7BitString(bool incType)
+TQCString AddressField::as7BitString(bool incType)
{
- QCString ret;
+ TQCString ret;
if(incType && type()[0]!='\0')
ret=typeIntro();
@@ -642,7 +642,7 @@ QCString AddressField::as7BitString(bool incType)
ret+=e_mail;
else {
if (isUsAscii(n_ame)) {
- QCString tmp(n_ame.latin1());
+ TQCString tmp(n_ame.latin1());
addQuotes(tmp, false);
ret+=tmp;
} else {
@@ -656,17 +656,17 @@ QCString AddressField::as7BitString(bool incType)
}
-void AddressField::fromUnicodeString(const QString &s, const QCString &cs)
+void AddressField::fromUnicodeString(const TQString &s, const TQCString &cs)
{
int pos1=0, pos2=0, type=0;
- QCString n;
+ TQCString n;
e_ncCS=cachedCharset(cs);
//so what do we have here ?
- if(s.find( QRegExp("*@*(*)", false, true) )!=-1) type=2; // From: foo@bar.com (John Doe)
- else if(s.find( QRegExp("*<*@*>", false, true) )!=-1) type=1; // From: John Doe <foo@bar.com>
- else if(s.find( QRegExp("*@*", false, true) )!=-1) type=0; // From: foo@bar.com
+ if(s.find( TQRegExp("*@*(*)", false, true) )!=-1) type=2; // From: foo@bar.com (John Doe)
+ else if(s.find( TQRegExp("*<*@*>", false, true) )!=-1) type=1; // From: John Doe <foo@bar.com>
+ else if(s.find( TQRegExp("*@*", false, true) )!=-1) type=0; // From: foo@bar.com
else { //broken From header => just copy it
n_ame=s;
return;
@@ -711,12 +711,12 @@ void AddressField::fromUnicodeString(const QString &s, const QCString &cs)
}
-QString AddressField::asUnicodeString()
+TQString AddressField::asUnicodeString()
{
if(n_ame.isEmpty())
- return QString(e_mail);
+ return TQString(e_mail);
else {
- QString s = n_ame;
+ TQString s = n_ame;
if (!e_mail.isEmpty())
s += " <"+e_mail+">";
return s;
@@ -724,13 +724,13 @@ QString AddressField::asUnicodeString()
}
-QCString AddressField::nameAs7Bit()
+TQCString AddressField::nameAs7Bit()
{
return encodeRFC2047String(n_ame, e_ncCS);
}
-void AddressField::setNameFrom7Bit(const QCString &s)
+void AddressField::setNameFrom7Bit(const TQCString &s)
{
n_ame=decodeRFC2047String(s, &e_ncCS, defaultCS(), forceCS());
}
@@ -774,36 +774,36 @@ bool MailCopiesTo::neverCopy()
//-----<Date>----------------------------------
-void Date::from7BitString(const QCString &s)
+void Date::from7BitString(const TQCString &s)
{
t_ime=KRFCDate::parseDate(s);
}
-QCString Date::as7BitString(bool incType)
+TQCString Date::as7BitString(bool incType)
{
if(incType)
return ( typeIntro()+KRFCDate::rfc2822DateString(t_ime) );
else
- return QCString(KRFCDate::rfc2822DateString(t_ime));
+ return TQCString(KRFCDate::rfc2822DateString(t_ime));
}
-void Date::fromUnicodeString(const QString &s, const QCString&)
+void Date::fromUnicodeString(const TQString &s, const TQCString&)
{
- from7BitString( QCString(s.latin1()) );
+ from7BitString( TQCString(s.latin1()) );
}
-QString Date::asUnicodeString()
+TQString Date::asUnicodeString()
{
- return QString::fromLatin1(as7BitString(false));
+ return TQString::fromLatin1(as7BitString(false));
}
-QDateTime Date::qdt()
+TQDateTime Date::qdt()
{
- QDateTime dt;
+ TQDateTime dt;
dt.setTime_t(t_ime);
return dt;
}
@@ -811,7 +811,7 @@ QDateTime Date::qdt()
int Date::ageInDays()
{
- QDate today=QDate::currentDate();
+ TQDate today=TQDate::currentDate();
return ( qdt().date().daysTo(today) );
}
@@ -822,12 +822,12 @@ int Date::ageInDays()
#if !defined(KMIME_NEW_STYLE_CLASSTREE)
//-----<To>------------------------------------
-void To::from7BitString(const QCString &s)
+void To::from7BitString(const TQCString &s)
{
if(a_ddrList)
a_ddrList->clear();
else {
- a_ddrList=new QPtrList<AddressField>;
+ a_ddrList=new TQPtrList<AddressField>;
a_ddrList->setAutoDelete(true);
}
@@ -846,9 +846,9 @@ void To::from7BitString(const QCString &s)
}
-QCString To::as7BitString(bool incType)
+TQCString To::as7BitString(bool incType)
{
- QCString ret;
+ TQCString ret;
if(incType)
ret+=typeIntro();
@@ -865,18 +865,18 @@ QCString To::as7BitString(bool incType)
}
-void To::fromUnicodeString(const QString &s, const QCString &cs)
+void To::fromUnicodeString(const TQString &s, const TQCString &cs)
{
if(a_ddrList)
a_ddrList->clear();
else {
- a_ddrList=new QPtrList<AddressField>;
+ a_ddrList=new TQPtrList<AddressField>;
a_ddrList->setAutoDelete(true);
}
- QStringList l=QStringList::split(",", s);
+ TQStringList l=TQStringList::split(",", s);
- QStringList::Iterator it=l.begin();
+ TQStringList::Iterator it=l.begin();
for(; it!=l.end(); ++it)
a_ddrList->append(new AddressField( p_arent, (*it), cs ));
@@ -884,12 +884,12 @@ void To::fromUnicodeString(const QString &s, const QCString &cs)
}
-QString To::asUnicodeString()
+TQString To::asUnicodeString()
{
if(!a_ddrList)
- return QString::null;
+ return TQString::null;
- QString ret;
+ TQString ret;
AddressField *it=a_ddrList->first();
if (it)
@@ -903,7 +903,7 @@ QString To::asUnicodeString()
void To::addAddress(const AddressField &a)
{
if(!a_ddrList) {
- a_ddrList=new QPtrList<AddressField>;
+ a_ddrList=new TQPtrList<AddressField>;
a_ddrList->setAutoDelete(true);
}
@@ -913,7 +913,7 @@ void To::addAddress(const AddressField &a)
}
-void To::emails(QStrList *l)
+void To::emails(TQStrList *l)
{
l->clear();
@@ -922,7 +922,7 @@ void To::emails(QStrList *l)
l->append( it->email() );
}
-void To::names(QStringList *l)
+void To::names(TQStringList *l)
{
l->clear();
@@ -931,7 +931,7 @@ void To::names(QStringList *l)
l->append( it->name() );
}
-void To::displayNames(QStringList *l)
+void To::displayNames(TQStringList *l)
{
l->clear();
@@ -945,14 +945,14 @@ void To::displayNames(QStringList *l)
//-----<Newsgroups>----------------------------
-void Newsgroups::from7BitString(const QCString &s)
+void Newsgroups::from7BitString(const TQCString &s)
{
g_roups=s;
e_ncCS=cachedCharset("UTF-8");
}
-QCString Newsgroups::as7BitString(bool incType)
+TQCString Newsgroups::as7BitString(bool incType)
{
if(incType)
return (typeIntro()+g_roups);
@@ -961,20 +961,20 @@ QCString Newsgroups::as7BitString(bool incType)
}
-void Newsgroups::fromUnicodeString(const QString &s, const QCString&)
+void Newsgroups::fromUnicodeString(const TQString &s, const TQCString&)
{
g_roups=s.utf8();
e_ncCS=cachedCharset("UTF-8");
}
-QString Newsgroups::asUnicodeString()
+TQString Newsgroups::asUnicodeString()
{
- return QString::fromUtf8(g_roups);
+ return TQString::fromUtf8(g_roups);
}
-QCString Newsgroups::firstGroup()
+TQCString Newsgroups::firstGroup()
{
int pos=0;
if(!g_roups.isEmpty()) {
@@ -985,17 +985,17 @@ QCString Newsgroups::firstGroup()
return g_roups.left(pos);
}
else
- return QCString();
+ return TQCString();
}
-QStringList Newsgroups::getGroups()
+TQStringList Newsgroups::getGroups()
{
- QStringList temp = QStringList::split(',', g_roups);
- QStringList ret;
- QString s;
+ TQStringList temp = TQStringList::split(',', g_roups);
+ TQStringList ret;
+ TQString s;
- for (QStringList::Iterator it = temp.begin(); it != temp.end(); ++it ) {
+ for (TQStringList::Iterator it = temp.begin(); it != temp.end(); ++it ) {
s = (*it).simplifyWhiteSpace();
ret.append(s);
}
@@ -1009,16 +1009,16 @@ QStringList Newsgroups::getGroups()
//-----<Lines>---------------------------------
-void Lines::from7BitString(const QCString &s)
+void Lines::from7BitString(const TQCString &s)
{
l_ines=s.toInt();
e_ncCS=cachedCharset(Latin1);
}
-QCString Lines::as7BitString(bool incType)
+TQCString Lines::as7BitString(bool incType)
{
- QCString num;
+ TQCString num;
num.setNum(l_ines);
if(incType)
@@ -1028,16 +1028,16 @@ QCString Lines::as7BitString(bool incType)
}
-void Lines::fromUnicodeString(const QString &s, const QCString&)
+void Lines::fromUnicodeString(const TQString &s, const TQCString&)
{
l_ines=s.toInt();
e_ncCS=cachedCharset(Latin1);
}
-QString Lines::asUnicodeString()
+TQString Lines::asUnicodeString()
{
- QString num;
+ TQString num;
num.setNum(l_ines);
return num;
@@ -1050,14 +1050,14 @@ QString Lines::asUnicodeString()
#if !defined(KMIME_NEW_STYLE_CLASSTREE)
//-----<References>----------------------------
-void References::from7BitString(const QCString &s)
+void References::from7BitString(const TQCString &s)
{
r_ef=s;
e_ncCS=cachedCharset(Latin1);
}
-QCString References::as7BitString(bool incType)
+TQCString References::as7BitString(bool incType)
{
if(incType)
return ( typeIntro()+r_ef );
@@ -1066,16 +1066,16 @@ QCString References::as7BitString(bool incType)
}
-void References::fromUnicodeString(const QString &s, const QCString&)
+void References::fromUnicodeString(const TQString &s, const TQCString&)
{
r_ef=s.latin1();
e_ncCS=cachedCharset(Latin1);
}
-QString References::asUnicodeString()
+TQString References::asUnicodeString()
{
- return QString::fromLatin1(r_ef);
+ return TQString::fromLatin1(r_ef);
}
@@ -1094,17 +1094,17 @@ int References::count()
}
-QCString References::first()
+TQCString References::first()
{
p_os=-1;
return next();
}
-QCString References::next()
+TQCString References::next()
{
int pos1=0, pos2=0;
- QCString ret;
+ TQCString ret;
if(p_os!=0) {
pos2=r_ef.findRev('>', p_os);
@@ -1121,9 +1121,9 @@ QCString References::next()
}
-QCString References::at(unsigned int i)
+TQCString References::at(unsigned int i)
{
- QCString ret;
+ TQCString ret;
int pos1=0, pos2=0;
unsigned int cnt=0;
@@ -1143,16 +1143,16 @@ QCString References::at(unsigned int i)
}
-void References::append(const QCString &s)
+void References::append(const TQCString &s)
{
- QString temp=r_ef.data();
+ TQString temp=r_ef.data();
temp += " ";
temp += s.data();
- QStringList lst=QStringList::split(' ',temp);
- QRegExp exp("^<.+@.+>$");
+ TQStringList lst=TQStringList::split(' ',temp);
+ TQRegExp exp("^<.+@.+>$");
// remove bogus references
- QStringList::Iterator it = lst.begin();
+ TQStringList::Iterator it = lst.begin();
while (it != lst.end()) {
if (-1==(*it).find(exp))
it = lst.remove(it);
@@ -1174,7 +1174,7 @@ void References::append(const QCString &s)
for (int i=1;i<=3;i++) { // include the last three ids
if (!lst.isEmpty()) {
temp = lst.last();
- r_ef.insert(insPos,(QString(" %1").arg(temp)).latin1());
+ r_ef.insert(insPos,(TQString(" %1").arg(temp)).latin1());
lst.remove(temp);
} else
break;
@@ -1183,7 +1183,7 @@ void References::append(const QCString &s)
while (!lst.isEmpty()) { // now insert the rest, up to 1000 characters
temp = lst.last();
if ((15+r_ef.length()+temp.length())<1000) {
- r_ef.insert(insPos,(QString(" %1").arg(temp)).latin1());
+ r_ef.insert(insPos,(TQString(" %1").arg(temp)).latin1());
lst.remove(temp);
} else
return;
@@ -1196,14 +1196,14 @@ void References::append(const QCString &s)
//-----<UserAgent>-----------------------------
-void UserAgent::from7BitString(const QCString &s)
+void UserAgent::from7BitString(const TQCString &s)
{
u_agent=s;
e_ncCS=cachedCharset(Latin1);
}
-QCString UserAgent::as7BitString(bool incType)
+TQCString UserAgent::as7BitString(bool incType)
{
if(incType)
return ( typeIntro()+u_agent );
@@ -1212,16 +1212,16 @@ QCString UserAgent::as7BitString(bool incType)
}
-void UserAgent::fromUnicodeString(const QString &s, const QCString&)
+void UserAgent::fromUnicodeString(const TQString &s, const TQCString&)
{
u_agent=s.latin1();
e_ncCS=cachedCharset(Latin1);
}
-QString UserAgent::asUnicodeString()
+TQString UserAgent::asUnicodeString()
{
- return QString::fromLatin1(u_agent);
+ return TQString::fromLatin1(u_agent);
}
//-----</UserAgent>----------------------------
@@ -1231,7 +1231,7 @@ QString UserAgent::asUnicodeString()
#if !defined(KMIME_NEW_STYLE_CLASSTREE)
//-----<Content-Type>--------------------------
-void ContentType::from7BitString(const QCString &s)
+void ContentType::from7BitString(const TQCString &s)
{
int pos=s.find(';');
@@ -1251,7 +1251,7 @@ void ContentType::from7BitString(const QCString &s)
}
-QCString ContentType::as7BitString(bool incType)
+TQCString ContentType::as7BitString(bool incType)
{
if(incType)
return (typeIntro()+m_imeType+p_arams);
@@ -1260,19 +1260,19 @@ QCString ContentType::as7BitString(bool incType)
}
-void ContentType::fromUnicodeString(const QString &s, const QCString&)
+void ContentType::fromUnicodeString(const TQString &s, const TQCString&)
{
- from7BitString( QCString(s.latin1()) );
+ from7BitString( TQCString(s.latin1()) );
}
-QString ContentType::asUnicodeString()
+TQString ContentType::asUnicodeString()
{
- return QString::fromLatin1(as7BitString(false));
+ return TQString::fromLatin1(as7BitString(false));
}
-QCString ContentType::mediaType()
+TQCString ContentType::mediaType()
{
int pos=m_imeType.find('/');
if(pos==-1)
@@ -1282,17 +1282,17 @@ QCString ContentType::mediaType()
}
-QCString ContentType::subType()
+TQCString ContentType::subType()
{
int pos=m_imeType.find('/');
if(pos==-1)
- return QCString();
+ return TQCString();
else
return m_imeType.mid(pos, m_imeType.length()-pos);
}
-void ContentType::setMimeType(const QCString &s)
+void ContentType::setMimeType(const TQCString &s)
{
p_arams.resize(0);
m_imeType=s;
@@ -1357,9 +1357,9 @@ bool ContentType::isPartial()
}
-QCString ContentType::charset()
+TQCString ContentType::charset()
{
- QCString ret=getParameter("charset");
+ TQCString ret=getParameter("charset");
if( ret.isEmpty() || forceCS() ) { //we return the default-charset if necessary
ret=defaultCS();
}
@@ -1367,37 +1367,37 @@ QCString ContentType::charset()
}
-void ContentType::setCharset(const QCString &s)
+void ContentType::setCharset(const TQCString &s)
{
setParameter("charset", s);
}
-QCString ContentType::boundary()
+TQCString ContentType::boundary()
{
return getParameter("boundary");
}
-void ContentType::setBoundary(const QCString &s)
+void ContentType::setBoundary(const TQCString &s)
{
setParameter("boundary", s, true);
}
-QString ContentType::name()
+TQString ContentType::name()
{
const char *dummy=0;
return ( decodeRFC2047String(getParameter("name"), &dummy, defaultCS(), forceCS()) );
}
-void ContentType::setName(const QString &s, const QCString &cs)
+void ContentType::setName(const TQString &s, const TQCString &cs)
{
e_ncCS=cs;
if (isUsAscii(s)) {
- QCString tmp(s.latin1());
+ TQCString tmp(s.latin1());
addQuotes(tmp, true);
setParameter("name", tmp, false);
} else {
@@ -1407,13 +1407,13 @@ void ContentType::setName(const QString &s, const QCString &cs)
}
-QCString ContentType::id()
+TQCString ContentType::id()
{
return (getParameter("id"));
}
-void ContentType::setId(const QCString &s)
+void ContentType::setId(const TQCString &s)
{
setParameter("id", s, true);
}
@@ -1421,7 +1421,7 @@ void ContentType::setId(const QCString &s)
int ContentType::partialNumber()
{
- QCString p=getParameter("number");
+ TQCString p=getParameter("number");
if(!p.isEmpty())
return p.toInt();
else
@@ -1431,7 +1431,7 @@ int ContentType::partialNumber()
int ContentType::partialCount()
{
- QCString p=getParameter("total");
+ TQCString p=getParameter("total");
if(!p.isEmpty())
return p.toInt();
else
@@ -1441,7 +1441,7 @@ int ContentType::partialCount()
void ContentType::setPartialParams(int total, int number)
{
- QCString num;
+ TQCString num;
num.setNum(number);
setParameter("number", num);
num.setNum(total);
@@ -1449,9 +1449,9 @@ void ContentType::setPartialParams(int total, int number)
}
-QCString ContentType::getParameter(const char *name)
+TQCString ContentType::getParameter(const char *name)
{
- QCString ret;
+ TQCString ret;
int pos1=0, pos2=0;
pos1=p_arams.find(name, 0, false);
if(pos1!=-1) {
@@ -1465,10 +1465,10 @@ QCString ContentType::getParameter(const char *name)
}
-void ContentType::setParameter(const QCString &name, const QCString &value, bool doubleQuotes)
+void ContentType::setParameter(const TQCString &name, const TQCString &value, bool doubleQuotes)
{
int pos1=0, pos2=0;
- QCString param;
+ TQCString param;
if(doubleQuotes)
param=name+"=\""+value+"\"";
@@ -1505,9 +1505,9 @@ static const encTableType encTable[] = { { "7Bit", CE7Bit },
{ 0, 0} };
-void CTEncoding::from7BitString(const QCString &s)
+void CTEncoding::from7BitString(const TQCString &s)
{
- QCString stripped(s.simplifyWhiteSpace());
+ TQCString stripped(s.simplifyWhiteSpace());
c_te=CE7Bit;
for(int i=0; encTable[i].s!=0; i++)
if(strcasecmp(stripped.data(), encTable[i].s)==0) {
@@ -1520,9 +1520,9 @@ void CTEncoding::from7BitString(const QCString &s)
}
-QCString CTEncoding::as7BitString(bool incType)
+TQCString CTEncoding::as7BitString(bool incType)
{
- QCString str;
+ TQCString str;
for(int i=0; encTable[i].s!=0; i++)
if(c_te==encTable[i].e) {
str=encTable[i].s;
@@ -1536,15 +1536,15 @@ QCString CTEncoding::as7BitString(bool incType)
}
-void CTEncoding::fromUnicodeString(const QString &s, const QCString&)
+void CTEncoding::fromUnicodeString(const TQString &s, const TQCString&)
{
- from7BitString( QCString(s.latin1()) );
+ from7BitString( TQCString(s.latin1()) );
}
-QString CTEncoding::asUnicodeString()
+TQString CTEncoding::asUnicodeString()
{
- return QString::fromLatin1(as7BitString(false));
+ return TQString::fromLatin1(as7BitString(false));
}
//-----</CTEncoding>---------------------------
@@ -1553,14 +1553,14 @@ QString CTEncoding::asUnicodeString()
//-----<CDisposition>--------------------------
-void CDisposition::from7BitString(const QCString &s)
+void CDisposition::from7BitString(const TQCString &s)
{
if(strncasecmp(s.data(), "attachment", 10)==0)
d_isp=CDattachment;
else d_isp=CDinline;
int pos=s.find("filename=", 0, false);
- QCString fn;
+ TQCString fn;
if(pos>-1) {
pos+=9;
fn=s.mid(pos, s.length()-pos);
@@ -1570,9 +1570,9 @@ void CDisposition::from7BitString(const QCString &s)
}
-QCString CDisposition::as7BitString(bool incType)
+TQCString CDisposition::as7BitString(bool incType)
{
- QCString ret;
+ TQCString ret;
if(d_isp==CDattachment)
ret="attachment";
else
@@ -1580,7 +1580,7 @@ QCString CDisposition::as7BitString(bool incType)
if(!f_ilename.isEmpty()) {
if (isUsAscii(f_ilename)) {
- QCString tmp(f_ilename.latin1());
+ TQCString tmp(f_ilename.latin1());
addQuotes(tmp, true);
ret+="; filename="+tmp;
} else {
@@ -1596,7 +1596,7 @@ QCString CDisposition::as7BitString(bool incType)
}
-void CDisposition::fromUnicodeString(const QString &s, const QCString &cs)
+void CDisposition::fromUnicodeString(const TQString &s, const TQCString &cs)
{
if(strncasecmp(s.latin1(), "attachment", 10)==0)
d_isp=CDattachment;
@@ -1613,9 +1613,9 @@ void CDisposition::fromUnicodeString(const QString &s, const QCString &cs)
}
-QString CDisposition::asUnicodeString()
+TQString CDisposition::asUnicodeString()
{
- QString ret;
+ TQString ret;
if(d_isp==CDattachment)
ret="attachment";
else
diff --git a/libkmime/kmime_headers.h b/libkmime/kmime_headers.h
index 779cd341a..2ba0e1b8d 100644
--- a/libkmime/kmime_headers.h
+++ b/libkmime/kmime_headers.h
@@ -24,14 +24,14 @@
#include "kmime_header_parsing.h"
-#include <qstring.h>
-#include <qstrlist.h>
-#include <qstringlist.h>
-#include <qregexp.h>
-#include <qdatetime.h>
-#include <qasciidict.h>
-#include <qmap.h>
-#include <qptrlist.h>
+#include <tqstring.h>
+#include <tqstrlist.h>
+#include <tqstringlist.h>
+#include <tqregexp.h>
+#include <tqdatetime.h>
+#include <tqasciidict.h>
+#include <tqmap.h>
+#include <tqptrlist.h>
#include <time.h>
@@ -62,16 +62,16 @@ enum contentDisposition { CDinline,
CDparallel };
//often used charset
-static const QCString Latin1("ISO-8859-1");
+static const TQCString Latin1("ISO-8859-1");
#define mk_trivial_subclass_with_name( subclass, subclassName, baseclass ) \
class subclass : public Generics::baseclass { \
public: \
subclass() : Generics::baseclass() {} \
subclass( Content * p ) : Generics::baseclass( p ) {} \
- subclass( Content * p, const QCString & s ) \
+ subclass( Content * p, const TQCString & s ) \
: Generics::baseclass( p ) { from7BitString( s ); } \
- subclass( Content * p, const QString & s, const QCString & cs ) \
+ subclass( Content * p, const TQString & s, const TQCString & cs ) \
: Generics::baseclass( p ) { fromUnicodeString( s, cs ); } \
~subclass() {} \
\
@@ -86,9 +86,9 @@ class subclass : public Generics::baseclass { \
public: \
subclass() : Generics::baseclass() {} \
subclass( Content * p ) : Generics::baseclass( p ) {} \
- subclass( Content * p, const QCString & s ) \
+ subclass( Content * p, const TQCString & s ) \
: Generics::baseclass( p ) { from7BitString( s ); } \
- subclass( Content * p, const QString & s, const QCString & cs ) \
+ subclass( Content * p, const TQString & s, const TQCString & cs ) \
: Generics::baseclass( p ) { fromUnicodeString( s, cs ); } \
~subclass() {} \
\
@@ -111,7 +111,7 @@ mk_parsing_subclass_with_name( subclass, subclass, baseclass )
class KDE_EXPORT Base {
public:
- typedef QPtrList<Base> List;
+ typedef TQPtrList<Base> List;
/** Create an empty header. */
Base() : e_ncCS(0), p_arent(0) {}
@@ -131,30 +131,30 @@ class KDE_EXPORT Base {
/** Parse the given string. Take care of RFC2047-encoded
strings. A default charset is given. If the last parameter
is true the default charset is used in any case */
- virtual void from7BitString(const QCString&) {}
+ virtual void from7BitString(const TQCString&) {}
/** Return the encoded header. The parameter specifies
whether the header-type should be included. */
- virtual QCString as7BitString(bool=true) { return QCString(); }
+ virtual TQCString as7BitString(bool=true) { return TQCString(); }
/** Return the charset that is used for RFC2047-encoding */
- QCString rfc2047Charset();
+ TQCString rfc2047Charset();
/** Set the charset for RFC2047-encoding */
- void setRFC2047Charset(const QCString &cs);
+ void setRFC2047Charset(const TQCString &cs);
/** Return the default charset */
- QCString defaultCS();
+ TQCString defaultCS();
/** Return if the default charset is mandatory */
bool forceCS();
/** Parse the given string and set the charset. */
- virtual void fromUnicodeString(const QString&, const QCString&) {}
+ virtual void fromUnicodeString(const TQString&, const TQCString&) {}
/** Return the decoded content of the header without
the header-type. */
- virtual QString asUnicodeString() { return QString(); }
+ virtual TQString asUnicodeString() { return TQString(); }
/** Delete */
virtual void clear() {}
@@ -175,7 +175,7 @@ class KDE_EXPORT Base {
bool isXHeader() { return (strncmp(type(), "X-", 2)==0); }
protected:
- QCString typeIntro() { return (QCString(type())+": "); }
+ TQCString typeIntro() { return (TQCString(type())+": "); }
const char *e_ncCS;
Content *p_arent;
@@ -218,24 +218,24 @@ class KDE_EXPORT GUnstructured : public Base {
public:
GUnstructured() : Base() {}
GUnstructured( Content * p ) : Base( p ) {}
- GUnstructured( Content * p, const QCString & s )
+ GUnstructured( Content * p, const TQCString & s )
: Base( p ) { from7BitString(s); }
- GUnstructured( Content * p, const QString & s, const QCString & cs )
+ GUnstructured( Content * p, const TQString & s, const TQCString & cs )
: Base( p ) { fromUnicodeString( s, cs ); }
~GUnstructured() {}
- virtual void from7BitString( const QCString& str );
- virtual QCString as7BitString( bool withHeaderType=true );
+ virtual void from7BitString( const TQCString& str );
+ virtual TQCString as7BitString( bool withHeaderType=true );
- virtual void fromUnicodeString( const QString & str,
- const QCString & suggestedCharset);
- virtual QString asUnicodeString();
+ virtual void fromUnicodeString( const TQString & str,
+ const TQCString & suggestedCharset);
+ virtual TQString asUnicodeString();
virtual void clear() { d_ecoded.truncate(0); }
virtual bool isEmpty() { return (d_ecoded.isEmpty()); }
private:
- QString d_ecoded;
+ TQString d_ecoded;
};
/** This is the base class for all structured header fields. It
@@ -270,9 +270,9 @@ class KDE_EXPORT GStructured : public Base {
public:
GStructured() : Base() {}
GStructured( Content * p ) : Base( p ) {}
- GStructured( Content * p, const QCString & s )
+ GStructured( Content * p, const TQCString & s )
: Base( p ) { from7BitString(s); }
- GStructured( Content * p, const QString & s, const QCString & cs )
+ GStructured( Content * p, const TQString & s, const TQCString & cs )
: Base( p ) { fromUnicodeString( s, cs ); }
~GStructured() {}
@@ -281,21 +281,21 @@ protected:
#if 0
// the assembly squad:
- bool writeAtom( char* & dcursor, const char * const dend, const QString & input );
+ bool writeAtom( char* & dcursor, const char * const dend, const TQString & input );
bool writeAtom( char* & dcursor, const char * const dend,
const QPair<const char*,int> & input );
- bool writeToken( char* & dcursor, const char * const dend, const QString & input );
+ bool writeToken( char* & dcursor, const char * const dend, const TQString & input );
bool writeToken( char* & dcursor, const char * const dend,
const QPair<const char*int> & input );
bool writeGenericQuotedString( char* & dcursor, const char * const dend,
- const QString & input, bool withCRLF=false );
+ const TQString & input, bool withCRLF=false );
bool writeComment( char* & dcursor, const char * const dend,
- const QString & input, bool withCRLF=false );
+ const TQString & input, bool withCRLF=false );
bool writePhrase( char* & dcursor, const char * const dend,
- const QString & input, bool withCRLF=false );
+ const TQString & input, bool withCRLF=false );
bool writeDotAtom( char* & dcursor, const char * const dend,
- const QString & input, bool withCRLF=false );
+ const TQString & input, bool withCRLF=false );
#endif
};
@@ -304,9 +304,9 @@ class KDE_EXPORT GAddress : public GStructured {
public:
GAddress() : GStructured() {}
GAddress( Content * p ) : GStructured( p ) {}
- GAddress( Content * p, const QCString & s )
+ GAddress( Content * p, const TQCString & s )
: GStructured( p ) { from7BitString(s); }
- GAddress( Content * p, const QString & s, const QCString & cs )
+ GAddress( Content * p, const TQString & s, const TQCString & cs )
: GStructured( p ) { fromUnicodeString( s, cs ); }
~GAddress() {}
@@ -320,9 +320,9 @@ class KDE_EXPORT MailboxList : public GAddress {
public:
MailboxList() : GAddress() {}
MailboxList( Content * p ) : GAddress( p ) {}
- MailboxList( Content * p, const QCString & s )
+ MailboxList( Content * p, const TQCString & s )
: GAddress( p ) { from7BitString(s); }
- MailboxList( Content * p, const QString & s, const QCString & cs )
+ MailboxList( Content * p, const TQString & s, const TQCString & cs )
: GAddress( p ) { fromUnicodeString( s, cs ); }
~MailboxList() {}
@@ -330,7 +330,7 @@ protected:
bool parse( const char* & scursor, const char * const send, bool isCRLF=false );
/** The list of mailboxes */
- QValueList<Types::Mailbox> mMailboxList;
+ TQValueList<Types::Mailbox> mMailboxList;
};
@@ -344,9 +344,9 @@ class KDE_EXPORT AddressList : public GAddress {
public:
AddressList() : GAddress() {}
AddressList( Content * p ) : GAddress( p ) {}
- AddressList( Content * p, const QCString & s )
+ AddressList( Content * p, const TQCString & s )
: GAddress( p ) { from7BitString(s); }
- AddressList( Content * p, const QString & s, const QCString & cs )
+ AddressList( Content * p, const TQString & s, const TQCString & cs )
: GAddress( p ) { fromUnicodeString( s, cs ); }
~AddressList() {}
@@ -354,7 +354,7 @@ protected:
bool parse( const char* & scursor, const char * const send, bool isCRLF=false );
/** The list of addresses */
- QValueList<Types::Address> mAddressList;
+ TQValueList<Types::Address> mAddressList;
};
/** Base class for headers which deal with a list of msg-id's */
@@ -362,9 +362,9 @@ class KDE_EXPORT GIdent : public GAddress {
public:
GIdent() : GAddress() {}
GIdent( Content * p ) : GAddress( p ) {}
- GIdent( Content * p, const QCString & s )
+ GIdent( Content * p, const TQCString & s )
: GAddress( p ) { from7BitString(s); }
- GIdent( Content * p, const QString & s, const QCString & cs )
+ GIdent( Content * p, const TQString & s, const TQCString & cs )
: GAddress( p ) { fromUnicodeString( s, cs ); }
~GIdent() {}
@@ -372,7 +372,7 @@ protected:
bool parse( const char* & scursor, const char * const send, bool isCRLF=false );
/** The list of msg-id's */
- QValueList<Types::AddrSpec> mMsgIdList;
+ TQValueList<Types::AddrSpec> mMsgIdList;
};
/** Base class for headers which deal with a list of msg-id's */
@@ -383,16 +383,16 @@ class KDE_EXPORT GToken : public GStructured {
public:
GToken() : GStructured() {}
GToken( Content * p ) : GStructured( p ) {}
- GToken( Content * p, const QCString & s )
+ GToken( Content * p, const TQCString & s )
: GStructured( p ) { from7BitString(s); }
- GToken( Content * p, const QString & s, const QCString & cs )
+ GToken( Content * p, const TQString & s, const TQCString & cs )
: GStructured( p ) { fromUnicodeString( s, cs ); }
~GToken() {}
protected:
bool parse( const char* & scursor, const char * const send, bool isCRLF=false );
- QCString mToken;
+ TQCString mToken;
};
@@ -400,46 +400,46 @@ class KDE_EXPORT GPhraseList : public GStructured {
public:
GPhraseList() : GStructured() {}
GPhraseList( Content * p ) : GStructured( p ) {}
- GPhraseList( Content * p, const QCString & s )
+ GPhraseList( Content * p, const TQCString & s )
: GStructured( p ) { from7BitString(s); }
- GPhraseList( Content * p, const QString & s, const QCString & cs )
+ GPhraseList( Content * p, const TQString & s, const TQCString & cs )
: GStructured( p ) { fromUnicodeString( s, cs ); }
~GPhraseList() {}
protected:
bool parse( const char* & scursor, const char * const send, bool isCRLF=false );
- QStringList mPhraseList;
+ TQStringList mPhraseList;
};
class KDE_EXPORT GDotAtom : public GStructured {
public:
GDotAtom() : GStructured() {}
GDotAtom( Content * p ) : GStructured( p ) {}
- GDotAtom( Content * p, const QCString & s )
+ GDotAtom( Content * p, const TQCString & s )
: GStructured( p ) { from7BitString(s); }
- GDotAtom( Content * p, const QString & s, const QCString & cs )
+ GDotAtom( Content * p, const TQString & s, const TQCString & cs )
: GStructured( p ) { fromUnicodeString( s, cs ); }
~GDotAtom() {}
protected:
bool parse( const char* & scursor, const char * const send, bool isCRLF=false );
- QString mDotAtom;
+ TQString mDotAtom;
};
class KDE_EXPORT GParametrized : public GStructured {
public:
GParametrized() : GStructured() {}
GParametrized( Content * p ) : GStructured( p ) {}
- GParametrized( Content * p, const QCString & s )
+ GParametrized( Content * p, const TQCString & s )
: GStructured( p ) { from7BitString(s); }
- GParametrized( Content * p, const QString & s, const QCString & cs )
+ GParametrized( Content * p, const TQString & s, const TQCString & cs )
: GStructured( p ) { fromUnicodeString( s, cs ); }
~GParametrized() {}
protected:
- QMap<QString,QString> mParameterHash;
+ TQMap<TQString,TQString> mParameterHash;
private:
};
@@ -448,17 +448,17 @@ class KDE_EXPORT GContentType : public GParametrized {
public:
GContentType() : GParametrized() {}
GContentType( Content * p ) : GParametrized( p ) {}
- GContentType( Content * p, const QCString & s )
+ GContentType( Content * p, const TQCString & s )
: GParametrized( p ) { from7BitString(s); }
- GContentType( Content * p, const QString & s, const QCString & cs )
+ GContentType( Content * p, const TQString & s, const TQCString & cs )
: GParametrized( p ) { fromUnicodeString( s, cs ); }
~GContentType() {}
protected:
bool parse( const char* & scursor, const char * const send, bool isCRLF=false );
- QCString mMimeType;
- QCString mMimeSubType;
+ TQCString mMimeType;
+ TQCString mMimeSubType;
};
@@ -466,16 +466,16 @@ class KDE_EXPORT GCISTokenWithParameterList : public GParametrized {
public:
GCISTokenWithParameterList() : GParametrized() {}
GCISTokenWithParameterList( Content * p ) : GParametrized( p ) {}
- GCISTokenWithParameterList( Content * p, const QCString & s )
+ GCISTokenWithParameterList( Content * p, const TQCString & s )
: GParametrized( p ) { from7BitString(s); }
- GCISTokenWithParameterList( Content * p, const QString & s, const QCString & cs )
+ GCISTokenWithParameterList( Content * p, const TQString & s, const TQCString & cs )
: GParametrized( p ) { fromUnicodeString( s, cs ); }
~GCISTokenWithParameterList() {}
protected:
bool parse( const char* & scursor, const char * const send, bool isCRLF=false );
- QCString mToken;
+ TQCString mToken;
};
@@ -493,9 +493,9 @@ class KDE_EXPORT ReturnPath : public Generics::GAddress {
public:
ReturnPath() : Generics::GAddress() {}
ReturnPath( Content * p ) : Generics::GAddress( p ) {}
- ReturnPath( Content * p, const QCString & s )
+ ReturnPath( Content * p, const TQCString & s )
: Generics::GAddress( p ) { from7BitString(s); }
- ReturnPath( Content * p, const QString & s, const QCString & cs )
+ ReturnPath( Content * p, const TQString & s, const TQCString & cs )
: Generics::GAddress( p ) { fromUnicodeString( s, cs ); }
~ReturnPath() {}
@@ -573,9 +573,9 @@ class KDE_EXPORT Generic : public Generics::GUnstructured {
: Generics::GUnstructured(), t_ype(0) { setType(t); }
Generic(const char *t, Content *p)
: Generics::GUnstructured( p ), t_ype(0) { setType(t); }
- Generic(const char *t, Content *p, const QCString &s)
+ Generic(const char *t, Content *p, const TQCString &s)
: Generics::GUnstructured( p, s ), t_ype(0) { setType(t); }
- Generic(const char *t, Content *p, const QString &s, const QCString &cs)
+ Generic(const char *t, Content *p, const TQString &s, const TQCString &cs)
: Generics::GUnstructured( p, s, cs ), t_ype(0) { setType(t); }
~Generic() { delete[] t_ype; }
@@ -596,16 +596,16 @@ class KDE_EXPORT Subject : public Generics::GUnstructured {
public:
Subject() : Generics::GUnstructured() {}
Subject( Content * p ) : Generics::GUnstructured( p ) {}
- Subject( Content * p, const QCString & s )
+ Subject( Content * p, const TQCString & s )
: Generics::GUnstructured( p, s ) {}
- Subject( Content * p, const QString & s, const QCString & cs )
+ Subject( Content * p, const TQString & s, const TQCString & cs )
: Generics::GUnstructured( p, s, cs ) {}
~Subject() {}
virtual const char* type() { return "Subject"; }
bool isReply() {
- return ( asUnicodeString().find( QString("Re:"), 0, false ) == 0 );
+ return ( asUnicodeString().find( TQString("Re:"), 0, false ) == 0 );
}
};
@@ -615,9 +615,9 @@ class KDE_EXPORT Organization : public Generics::GUnstructured {
public:
Organization() : Generics::GUnstructured() {}
Organization( Content * p ) : Generics::GUnstructured( p ) {}
- Organization( Content * p, const QCString & s )
+ Organization( Content * p, const TQCString & s )
: Generics::GUnstructured( p, s ) {};
- Organization( Content * p, const QString & s, const QCString & cs)
+ Organization( Content * p, const TQString & s, const TQCString & cs)
: Generics::GUnstructured( p, s, cs ) {}
~Organization() {}
@@ -639,14 +639,14 @@ class KDE_EXPORT Control : public Base {
public:
Control() : Base() {}
Control(Content *p) : Base(p) {}
- Control(Content *p, const QCString &s) : Base(p) { from7BitString(s); }
- Control(Content *p, const QString &s) : Base(p) { fromUnicodeString(s, Latin1); }
+ Control(Content *p, const TQCString &s) : Base(p) { from7BitString(s); }
+ Control(Content *p, const TQString &s) : Base(p) { fromUnicodeString(s, Latin1); }
~Control() {}
- virtual void from7BitString(const QCString &s);
- virtual QCString as7BitString(bool incType=true);
- virtual void fromUnicodeString(const QString &s, const QCString&);
- virtual QString asUnicodeString();
+ virtual void from7BitString(const TQCString &s);
+ virtual TQCString as7BitString(bool incType=true);
+ virtual void fromUnicodeString(const TQString &s, const TQCString&);
+ virtual TQString asUnicodeString();
virtual void clear() { c_trlMsg.truncate(0); }
virtual bool isEmpty() { return (c_trlMsg.isEmpty()); }
virtual const char* type() { return "Control"; }
@@ -654,7 +654,7 @@ class KDE_EXPORT Control : public Base {
bool isCancel() { return (c_trlMsg.find("cancel", 0, false)!=-1); }
protected:
- QCString c_trlMsg;
+ TQCString c_trlMsg;
};
@@ -665,14 +665,14 @@ class KDE_EXPORT Date : public Base {
Date() : Base(), t_ime(0) {}
Date(Content *p) : Base(p), t_ime(0) {}
Date(Content *p, time_t t) : Base(p), t_ime(t) {}
- Date(Content *p, const QCString &s) : Base(p) { from7BitString(s); }
- Date(Content *p, const QString &s) : Base(p) { fromUnicodeString(s, Latin1); }
+ Date(Content *p, const TQCString &s) : Base(p) { from7BitString(s); }
+ Date(Content *p, const TQString &s) : Base(p) { fromUnicodeString(s, Latin1); }
~Date() {}
- virtual void from7BitString(const QCString &s);
- virtual QCString as7BitString(bool incType=true);
- virtual void fromUnicodeString(const QString &s, const QCString&);
- virtual QString asUnicodeString();
+ virtual void from7BitString(const TQCString &s);
+ virtual TQCString as7BitString(bool incType=true);
+ virtual void fromUnicodeString(const TQString &s, const TQCString&);
+ virtual TQString asUnicodeString();
virtual void clear() { t_ime=0; }
virtual bool isEmpty() { return (t_ime==0); }
virtual const char* type() { return "Date"; }
@@ -680,7 +680,7 @@ class KDE_EXPORT Date : public Base {
time_t unixTime() { return t_ime; }
void setUnixTime(time_t t) { t_ime=t; }
void setUnixTime() { t_ime=time(0); }
- QDateTime qdt();
+ TQDateTime qdt();
int ageInDays();
protected:
@@ -695,24 +695,24 @@ class KDE_EXPORT Newsgroups : public Base {
public:
Newsgroups() : Base() {}
Newsgroups(Content *p) : Base(p) {}
- Newsgroups(Content *p, const QCString &s) : Base(p) { from7BitString(s); }
- Newsgroups(Content *p, const QString &s) : Base(p) { fromUnicodeString(s, Latin1); }
+ Newsgroups(Content *p, const TQCString &s) : Base(p) { from7BitString(s); }
+ Newsgroups(Content *p, const TQString &s) : Base(p) { fromUnicodeString(s, Latin1); }
~Newsgroups() {}
- virtual void from7BitString(const QCString &s);
- virtual QCString as7BitString(bool incType=true);
- virtual void fromUnicodeString(const QString &s, const QCString&);
- virtual QString asUnicodeString();
+ virtual void from7BitString(const TQCString &s);
+ virtual TQCString as7BitString(bool incType=true);
+ virtual void fromUnicodeString(const TQString &s, const TQCString&);
+ virtual TQString asUnicodeString();
virtual void clear() { g_roups.resize(0); }
virtual bool isEmpty() { return g_roups.isEmpty(); }
virtual const char* type() { return "Newsgroups"; }
- QCString firstGroup();
+ TQCString firstGroup();
bool isCrossposted() { return ( g_roups.find(',')>-1 ); }
- QStringList getGroups();
+ TQStringList getGroups();
protected:
- QCString g_roups;
+ TQCString g_roups;
};
@@ -723,8 +723,8 @@ class KDE_EXPORT FollowUpTo : public Newsgroups {
public:
FollowUpTo() : Newsgroups() {}
FollowUpTo(Content *p) : Newsgroups(p) {}
- FollowUpTo(Content *p, const QCString &s) : Newsgroups(p,s) {}
- FollowUpTo(Content *p, const QString &s) : Newsgroups(p,s) {}
+ FollowUpTo(Content *p, const TQCString &s) : Newsgroups(p,s) {}
+ FollowUpTo(Content *p, const TQString &s) : Newsgroups(p,s) {}
~FollowUpTo() {}
virtual const char* type() { return "Followup-To"; }
@@ -739,14 +739,14 @@ class KDE_EXPORT Lines : public Base {
Lines() : Base(),l_ines(-1) {}
Lines(Content *p) : Base(p),l_ines(-1) {}
Lines(Content *p, unsigned int i) : Base(p),l_ines(i) {}
- Lines(Content *p, const QCString &s) : Base(p) { from7BitString(s); }
- Lines(Content *p, const QString &s) : Base(p) { fromUnicodeString(s, Latin1); }
+ Lines(Content *p, const TQCString &s) : Base(p) { from7BitString(s); }
+ Lines(Content *p, const TQString &s) : Base(p) { fromUnicodeString(s, Latin1); }
~Lines() {}
- virtual void from7BitString(const QCString &s);
- virtual QCString as7BitString(bool incType=true);
- virtual void fromUnicodeString(const QString &s, const QCString&);
- virtual QString asUnicodeString();
+ virtual void from7BitString(const TQCString &s);
+ virtual TQCString as7BitString(bool incType=true);
+ virtual void fromUnicodeString(const TQString &s, const TQCString&);
+ virtual TQString asUnicodeString();
virtual void clear() { l_ines=-1; }
virtual bool isEmpty() { return (l_ines==-1); }
virtual const char* type() { return "Lines"; }
@@ -767,20 +767,20 @@ class KDE_EXPORT UserAgent : public Base {
public:
UserAgent() : Base() {}
UserAgent(Content *p) : Base(p) {}
- UserAgent(Content *p, const QCString &s) : Base(p) { from7BitString(s); }
- UserAgent(Content *p, const QString &s) : Base(p) { fromUnicodeString(s, Latin1); }
+ UserAgent(Content *p, const TQCString &s) : Base(p) { from7BitString(s); }
+ UserAgent(Content *p, const TQString &s) : Base(p) { fromUnicodeString(s, Latin1); }
~UserAgent() {}
- virtual void from7BitString(const QCString &s);
- virtual QCString as7BitString(bool incType=true);
- virtual void fromUnicodeString(const QString &s, const QCString&);
- virtual QString asUnicodeString();
+ virtual void from7BitString(const TQCString &s);
+ virtual TQCString as7BitString(bool incType=true);
+ virtual void fromUnicodeString(const TQString &s, const TQCString&);
+ virtual TQString asUnicodeString();
virtual void clear() { u_agent.resize(0); }
virtual bool isEmpty() { return (u_agent.isEmpty()); }
virtual const char* type() { return "User-Agent"; }
protected:
- QCString u_agent;
+ TQCString u_agent;
};
@@ -808,7 +808,7 @@ typedef Headers::Base* (*headerCreator)(void);
@see KMime::Headers::Base KMime::Headers::Generic
*/
-class HeaderFactory : public QAsciiDict<headerCreator>
+class HeaderFactory : public TQAsciiDict<headerCreator>
{
private:
HeaderFactory();
@@ -834,7 +834,7 @@ public:
convenience. It differs from the above only in what arguments it
takes.
*/
- static Headers::Base* create( const QCString& aType )
+ static Headers::Base* create( const TQCString& aType )
{
return create( aType.data() );
}
diff --git a/libkmime/kmime_headers_obs.h b/libkmime/kmime_headers_obs.h
index 41be1692a..3455c00a9 100644
--- a/libkmime/kmime_headers_obs.h
+++ b/libkmime/kmime_headers_obs.h
@@ -28,22 +28,22 @@ class KDE_EXPORT MessageID : public Base {
public:
MessageID() : Base() {}
MessageID(Content *p) : Base(p) {}
- MessageID(Content *p, const QCString &s) : Base(p) { from7BitString(s); }
- MessageID(Content *p, const QString &s) : Base(p) { fromUnicodeString(s, Latin1); }
+ MessageID(Content *p, const TQCString &s) : Base(p) { from7BitString(s); }
+ MessageID(Content *p, const TQString &s) : Base(p) { fromUnicodeString(s, Latin1); }
~MessageID() {}
- virtual void from7BitString(const QCString &s);
- virtual QCString as7BitString(bool incType=true);
- virtual void fromUnicodeString(const QString &s, const QCString&);
- virtual QString asUnicodeString();
+ virtual void from7BitString(const TQCString &s);
+ virtual TQCString as7BitString(bool incType=true);
+ virtual void fromUnicodeString(const TQString &s, const TQCString&);
+ virtual TQString asUnicodeString();
virtual void clear() { m_id.resize(0); }
virtual bool isEmpty() { return (m_id.isEmpty()); }
virtual const char* type() { return "Message-Id"; }
- void generate(const QCString &fqdn);
+ void generate(const TQCString &fqdn);
protected:
- QCString m_id;
+ TQCString m_id;
};
@@ -53,8 +53,8 @@ class KDE_EXPORT Supersedes : public MessageID {
public:
Supersedes() : MessageID() {}
Supersedes(Content *p) : MessageID(p) {}
- Supersedes(Content *p, const QCString &s) : MessageID(p,s) {}
- Supersedes(Content *p, const QString &s) : MessageID(p,s) {}
+ Supersedes(Content *p, const TQCString &s) : MessageID(p,s) {}
+ Supersedes(Content *p, const TQString &s) : MessageID(p,s) {}
~Supersedes() {}
virtual const char* type() { return "Supersedes"; }
@@ -68,34 +68,34 @@ class KDE_EXPORT AddressField : public Base {
public:
AddressField() : Base() {}
AddressField(Content *p) : Base(p) {}
- AddressField(Content *p, const QCString &s) : Base(p) { from7BitString(s); }
- AddressField(Content *p, const QString &s, const QCString &cs) : Base(p) { fromUnicodeString(s, cs); }
+ AddressField(Content *p, const TQCString &s) : Base(p) { from7BitString(s); }
+ AddressField(Content *p, const TQString &s, const TQCString &cs) : Base(p) { fromUnicodeString(s, cs); }
AddressField(const AddressField &a): Base(a.p_arent) { n_ame=a.n_ame; e_mail=a.e_mail.copy(); e_ncCS=a.e_ncCS; }
~AddressField() {}
AddressField& operator=(const AddressField &a) { n_ame=a.n_ame; e_mail=a.e_mail.copy(); e_ncCS=a.e_ncCS; return (*this); }
- virtual void from7BitString(const QCString &s);
- virtual QCString as7BitString(bool incType=true);
- virtual void fromUnicodeString(const QString &s, const QCString &cs);
- virtual QString asUnicodeString();
+ virtual void from7BitString(const TQCString &s);
+ virtual TQCString as7BitString(bool incType=true);
+ virtual void fromUnicodeString(const TQString &s, const TQCString &cs);
+ virtual TQString asUnicodeString();
virtual void clear() { n_ame.truncate(0); e_mail.resize(0); }
virtual bool isEmpty() { return (e_mail.isEmpty() && n_ame.isEmpty()); }
bool hasName() { return ( !n_ame.isEmpty() ); }
bool hasEmail() { return ( !e_mail.isEmpty() ); }
- QString name() { return n_ame; }
- QCString nameAs7Bit();
- QCString email() { return e_mail; }
- void setName(const QString &s) { n_ame=s; }
- void setNameFrom7Bit(const QCString &s);
- void setEmail(const QCString &s) { e_mail=s; }
+ TQString name() { return n_ame; }
+ TQCString nameAs7Bit();
+ TQCString email() { return e_mail; }
+ void setName(const TQString &s) { n_ame=s; }
+ void setNameFrom7Bit(const TQCString &s);
+ void setEmail(const TQCString &s) { e_mail=s; }
protected:
- QString n_ame;
- QCString e_mail;
+ TQString n_ame;
+ TQCString e_mail;
};
-typedef QPtrList<AddressField> ObsAddressList;
+typedef TQPtrList<AddressField> ObsAddressList;
/** Represent a "From" header */
class KDE_EXPORT From : public AddressField {
@@ -103,8 +103,8 @@ class KDE_EXPORT From : public AddressField {
public:
From() : AddressField() {}
From(Content *p) : AddressField(p) {}
- From(Content *p, const QCString &s) : AddressField(p,s) {}
- From(Content *p, const QString &s, const QCString &cs) : AddressField(p,s,cs) {}
+ From(Content *p, const TQCString &s) : AddressField(p,s) {}
+ From(Content *p, const TQString &s, const TQCString &cs) : AddressField(p,s,cs) {}
~From() {}
virtual const char* type() { return "From"; }
@@ -117,8 +117,8 @@ class KDE_EXPORT ReplyTo : public AddressField {
public:
ReplyTo() : AddressField() {}
ReplyTo(Content *p) : AddressField(p) {}
- ReplyTo(Content *p, const QCString &s) : AddressField(p,s) {}
- ReplyTo(Content *p, const QString &s, const QCString &cs) : AddressField(p,s,cs) {}
+ ReplyTo(Content *p, const TQCString &s) : AddressField(p,s) {}
+ ReplyTo(Content *p, const TQString &s, const TQCString &cs) : AddressField(p,s,cs) {}
~ReplyTo() {}
virtual const char* type() { return "Reply-To"; }
@@ -133,8 +133,8 @@ class KDE_EXPORT MailCopiesTo : public AddressField {
public:
MailCopiesTo() : AddressField() {}
MailCopiesTo(Content *p) : AddressField(p) {}
- MailCopiesTo(Content *p, const QCString &s) : AddressField(p,s) {}
- MailCopiesTo(Content *p, const QString &s, const QCString &cs) : AddressField(p,s,cs) {}
+ MailCopiesTo(Content *p, const TQCString &s) : AddressField(p,s) {}
+ MailCopiesTo(Content *p, const TQString &s, const TQCString &cs) : AddressField(p,s,cs) {}
~MailCopiesTo() {}
bool isValid();
@@ -151,23 +151,23 @@ class KDE_EXPORT To : public Base {
public:
To() : Base(),a_ddrList(0) {}
To(Content *p) : Base(p),a_ddrList(0) {}
- To(Content *p, const QCString &s) : Base(p),a_ddrList(0) { from7BitString(s); }
- To(Content *p, const QString &s, const QCString &cs) : Base(p),a_ddrList(0) { fromUnicodeString(s,cs); }
+ To(Content *p, const TQCString &s) : Base(p),a_ddrList(0) { from7BitString(s); }
+ To(Content *p, const TQString &s, const TQCString &cs) : Base(p),a_ddrList(0) { fromUnicodeString(s,cs); }
~To() { delete a_ddrList; }
- virtual void from7BitString(const QCString &s);
- virtual QCString as7BitString(bool incType=true);
- virtual void fromUnicodeString(const QString &s, const QCString &cs);
- virtual QString asUnicodeString();
+ virtual void from7BitString(const TQCString &s);
+ virtual TQCString as7BitString(bool incType=true);
+ virtual void fromUnicodeString(const TQString &s, const TQCString &cs);
+ virtual TQString asUnicodeString();
virtual void clear() { delete a_ddrList; a_ddrList=0; }
virtual bool isEmpty() { return (!a_ddrList || a_ddrList->isEmpty()
|| a_ddrList->first()->isEmpty()); }
virtual const char* type() { return "To"; }
void addAddress(const AddressField &a);
- void emails(QStrList *l);
- void names(QStringList *l);
- void displayNames(QStringList *l);
+ void emails(TQStrList *l);
+ void names(TQStringList *l);
+ void displayNames(TQStringList *l);
protected:
ObsAddressList *a_ddrList;
@@ -181,8 +181,8 @@ class KDE_EXPORT CC : public To {
public:
CC() : To() {}
CC(Content *p) : To(p) {}
- CC(Content *p, const QCString &s) : To(p,s) {}
- CC(Content *p, const QString &s, const QCString &cs) : To(p,s,cs) {}
+ CC(Content *p, const TQCString &s) : To(p,s) {}
+ CC(Content *p, const TQString &s, const TQCString &cs) : To(p,s,cs) {}
~CC() {}
virtual const char* type() { return "CC"; }
@@ -196,8 +196,8 @@ class KDE_EXPORT BCC : public To {
public:
BCC() : To() {}
BCC(Content *p) : To(p) {}
- BCC(Content *p, const QCString &s) : To(p,s) {}
- BCC(Content *p, const QString &s, const QCString &cs) : To(p,s,cs) {}
+ BCC(Content *p, const TQCString &s) : To(p,s) {}
+ BCC(Content *p, const TQString &s, const TQCString &cs) : To(p,s,cs) {}
~BCC() {}
virtual const char* type() { return "BCC"; }
@@ -210,26 +210,26 @@ class KDE_EXPORT References : public Base {
public:
References() : Base(),p_os(-1) {}
References(Content *p) : Base(p),p_os(-1) {}
- References(Content *p, const QCString &s) : Base(p),p_os(-1) { from7BitString(s); }
- References(Content *p, const QString &s) : Base(p),p_os(-1) { fromUnicodeString(s, Latin1); }
+ References(Content *p, const TQCString &s) : Base(p),p_os(-1) { from7BitString(s); }
+ References(Content *p, const TQString &s) : Base(p),p_os(-1) { fromUnicodeString(s, Latin1); }
~References() {}
- virtual void from7BitString(const QCString &s);
- virtual QCString as7BitString(bool incType=true);
- virtual void fromUnicodeString(const QString &s, const QCString&);
- virtual QString asUnicodeString();
+ virtual void from7BitString(const TQCString &s);
+ virtual TQCString as7BitString(bool incType=true);
+ virtual void fromUnicodeString(const TQString &s, const TQCString&);
+ virtual TQString asUnicodeString();
virtual void clear() { r_ef.resize(0); p_os=0; }
virtual bool isEmpty() { return (r_ef.isEmpty()); }
virtual const char* type() { return "References"; }
int count();
- QCString first();
- QCString next();
- QCString at(unsigned int i);
- void append(const QCString &s);
+ TQCString first();
+ TQCString next();
+ TQCString at(unsigned int i);
+ void append(const TQCString &s);
protected:
- QCString r_ef;
+ TQCString r_ef;
int p_os;
};
@@ -240,24 +240,24 @@ class KDE_EXPORT ContentType : public Base {
public:
ContentType() : Base(),m_imeType("invalid/invalid"),c_ategory(CCsingle) {}
ContentType(Content *p) : Base(p),m_imeType("invalid/invalid"),c_ategory(CCsingle) {}
- ContentType(Content *p, const QCString &s) : Base(p) { from7BitString(s); }
- ContentType(Content *p, const QString &s) : Base(p) { fromUnicodeString(s, Latin1); }
+ ContentType(Content *p, const TQCString &s) : Base(p) { from7BitString(s); }
+ ContentType(Content *p, const TQString &s) : Base(p) { fromUnicodeString(s, Latin1); }
~ContentType() {}
- virtual void from7BitString(const QCString &s);
- virtual QCString as7BitString(bool incType=true);
- virtual void fromUnicodeString(const QString &s, const QCString&);
- virtual QString asUnicodeString();
+ virtual void from7BitString(const TQCString &s);
+ virtual TQCString as7BitString(bool incType=true);
+ virtual void fromUnicodeString(const TQString &s, const TQCString&);
+ virtual TQString asUnicodeString();
virtual void clear() { m_imeType.resize(0); p_arams.resize(0); }
virtual bool isEmpty() { return (m_imeType.isEmpty()); }
virtual const char* type() { return "Content-Type"; }
//mime-type handling
- QCString mimeType() { return m_imeType; }
- QCString mediaType();
- QCString subType();
- void setMimeType(const QCString &s);
+ TQCString mimeType() { return m_imeType; }
+ TQCString mediaType();
+ TQCString subType();
+ void setMimeType(const TQCString &s);
bool isMediatype(const char *s);
bool isSubtype(const char *s);
bool isText();
@@ -268,14 +268,14 @@ class KDE_EXPORT ContentType : public Base {
bool isPartial();
//parameter handling
- QCString charset();
- void setCharset(const QCString &s);
- QCString boundary();
- void setBoundary(const QCString &s);
- QString name();
- void setName(const QString &s, const QCString &cs);
- QCString id();
- void setId(const QCString &s);
+ TQCString charset();
+ void setCharset(const TQCString &s);
+ TQCString boundary();
+ void setBoundary(const TQCString &s);
+ TQString name();
+ void setName(const TQString &s, const TQCString &cs);
+ TQCString id();
+ void setId(const TQCString &s);
int partialNumber();
int partialCount();
void setPartialParams(int total, int number);
@@ -285,9 +285,9 @@ class KDE_EXPORT ContentType : public Base {
void setCategory(contentCategory c) { c_ategory=c; }
protected:
- QCString getParameter(const char *name);
- void setParameter(const QCString &name, const QCString &value, bool doubleQuotes=false);
- QCString m_imeType, p_arams;
+ TQCString getParameter(const char *name);
+ void setParameter(const TQCString &name, const TQCString &value, bool doubleQuotes=false);
+ TQCString m_imeType, p_arams;
contentCategory c_ategory;
};
@@ -299,14 +299,14 @@ class KDE_EXPORT CTEncoding : public Base {
public:
CTEncoding() : Base(),c_te(CE7Bit),d_ecoded(true) {}
CTEncoding(Content *p) : Base(p),c_te(CE7Bit),d_ecoded(true) {}
- CTEncoding(Content *p, const QCString &s) : Base(p) { from7BitString(s); }
- CTEncoding(Content *p, const QString &s) : Base(p) { fromUnicodeString(s, Latin1); }
+ CTEncoding(Content *p, const TQCString &s) : Base(p) { from7BitString(s); }
+ CTEncoding(Content *p, const TQString &s) : Base(p) { fromUnicodeString(s, Latin1); }
~CTEncoding() {}
- virtual void from7BitString(const QCString &s);
- virtual QCString as7BitString(bool incType=true);
- virtual void fromUnicodeString(const QString &s, const QCString&);
- virtual QString asUnicodeString();
+ virtual void from7BitString(const TQCString &s);
+ virtual TQCString as7BitString(bool incType=true);
+ virtual void fromUnicodeString(const TQString &s, const TQCString&);
+ virtual TQString asUnicodeString();
virtual void clear() { d_ecoded=true; c_te=CE7Bit; }
virtual const char* type() { return "Content-Transfer-Encoding"; }
@@ -329,14 +329,14 @@ class KDE_EXPORT CDisposition : public Base {
public:
CDisposition() : Base(),d_isp(CDinline) {}
CDisposition(Content *p) : Base(p),d_isp(CDinline) {}
- CDisposition(Content *p, const QCString &s) : Base(p) { from7BitString(s); }
- CDisposition(Content *p, const QString &s, const QCString &cs) : Base(p) { fromUnicodeString(s, cs); }
+ CDisposition(Content *p, const TQCString &s) : Base(p) { from7BitString(s); }
+ CDisposition(Content *p, const TQString &s, const TQCString &cs) : Base(p) { fromUnicodeString(s, cs); }
~CDisposition() {}
- virtual void from7BitString(const QCString &s);
- virtual QCString as7BitString(bool incType=true);
- virtual void fromUnicodeString(const QString &s, const QCString &cs);
- virtual QString asUnicodeString();
+ virtual void from7BitString(const TQCString &s);
+ virtual TQCString as7BitString(bool incType=true);
+ virtual void fromUnicodeString(const TQString &s, const TQCString &cs);
+ virtual TQString asUnicodeString();
virtual void clear() { f_ilename.truncate(0); d_isp=CDinline; }
virtual const char* type() { return "Content-Disposition"; }
@@ -344,12 +344,12 @@ class KDE_EXPORT CDisposition : public Base {
void setDisposition(contentDisposition d) { d_isp=d; }
bool isAttachment() { return (d_isp==CDattachment); }
- QString filename() { return f_ilename; }
- void setFilename(const QString &s) { f_ilename=s; }
+ TQString filename() { return f_ilename; }
+ void setFilename(const TQString &s) { f_ilename=s; }
protected:
contentDisposition d_isp;
- QString f_ilename;
+ TQString f_ilename;
};
@@ -360,9 +360,9 @@ class KDE_EXPORT CDescription : public Generics::GUnstructured {
public:
CDescription() : Generics::GUnstructured() {}
CDescription( Content * p ) : Generics::GUnstructured( p ) {}
- CDescription( Content * p, const QCString & s )
+ CDescription( Content * p, const TQCString & s )
: Generics::GUnstructured( p, s ) {};
- CDescription( Content * p, const QString & s, const QCString & cs )
+ CDescription( Content * p, const TQString & s, const TQCString & cs )
: Generics::GUnstructured( p, s, cs ) {}
~CDescription() {}
diff --git a/libkmime/kmime_mdn.cpp b/libkmime/kmime_mdn.cpp
index 678589d65..75f1a91e9 100644
--- a/libkmime/kmime_mdn.cpp
+++ b/libkmime/kmime_mdn.cpp
@@ -37,7 +37,7 @@
#include <klocale.h>
#include <kdebug.h>
-#include <qcstring.h>
+#include <tqcstring.h>
#include <unistd.h> // gethostname
@@ -156,11 +156,11 @@ namespace MDN {
return 0;
}
- static QCString dispositionField( DispositionType d, ActionMode a, SendingMode s,
- const QValueList<DispositionModifier> & m ) {
+ static TQCString dispositionField( DispositionType d, ActionMode a, SendingMode s,
+ const TQValueList<DispositionModifier> & m ) {
// mandatory parts: Disposition: foo/baz; bar
- QCString result = "Disposition: ";
+ TQCString result = "Disposition: ";
result += stringFor( a );
result += "/";
result += stringFor( s );
@@ -169,7 +169,7 @@ namespace MDN {
// optional parts: Disposition: foo/baz; bar/mod1,mod2,mod3
bool first = true;
- for ( QValueList<DispositionModifier>::const_iterator mt = m.begin() ;
+ for ( TQValueList<DispositionModifier>::const_iterator mt = m.begin() ;
mt != m.end() ; ++mt ) {
if ( first ) {
result += "/";
@@ -182,56 +182,56 @@ namespace MDN {
return result + "\n";
}
- static QCString finalRecipient( const QString & recipient ) {
+ static TQCString finalRecipient( const TQString & recipient ) {
if ( recipient.isEmpty() )
- return QCString();
+ return TQCString();
else
return "Final-Recipient: rfc822; "
+ encodeRFC2047String( recipient, "utf-8" ) + "\n";
}
- static QCString orginalRecipient( const QCString & recipient ) {
+ static TQCString orginalRecipient( const TQCString & recipient ) {
if ( recipient.isEmpty() )
- return QCString();
+ return TQCString();
else
return "Original-Recipient: " + recipient + "\n";
}
- static QCString originalMessageID( const QCString & msgid ) {
+ static TQCString originalMessageID( const TQCString & msgid ) {
if ( msgid.isEmpty() )
- return QCString();
+ return TQCString();
else
return "Original-Message-ID: " + msgid + "\n";
}
- static QCString reportingUAField() {
+ static TQCString reportingUAField() {
char hostName[256];
if ( gethostname( hostName, 255 ) )
hostName[0] = '\0'; // gethostname failed: pretend empty string
else
hostName[255] = '\0'; // gethostname may have returned 255 chars (man page)
- return QCString("Reporting-UA: ") + hostName
+ return TQCString("Reporting-UA: ") + hostName
+ "; KMime " KMIME_VERSION_STRING "\n";
}
- QCString dispositionNotificationBodyContent( const QString & r,
- const QCString & o,
- const QCString & omid,
+ TQCString dispositionNotificationBodyContent( const TQString & r,
+ const TQCString & o,
+ const TQCString & omid,
DispositionType d,
ActionMode a,
SendingMode s,
- const QValueList<DispositionModifier> & m,
- const QString & special )
+ const TQValueList<DispositionModifier> & m,
+ const TQString & special )
{
// in Perl: chomp(special)
- QString spec;
+ TQString spec;
if ( special.endsWith("\n") )
spec = special.left( special.length() - 1 );
else
spec = special;
// std headers:
- QCString result = reportingUAField();
+ TQCString result = reportingUAField();
result += orginalRecipient( o );
result += finalRecipient( r );
result += originalMessageID( omid );
@@ -248,14 +248,14 @@ namespace MDN {
return result;
}
- QString descriptionFor( DispositionType d,
- const QValueList<DispositionModifier> & ) {
+ TQString descriptionFor( DispositionType d,
+ const TQValueList<DispositionModifier> & ) {
for ( int i = 0 ; i < numDispositionTypes ; ++i )
if ( dispositionTypes[i].dispositionType == d )
return i18n( dispositionTypes[i].description );
kdWarning() << "KMime::MDN::descriptionFor(): No such disposition type: "
<< (int)d << endl;
- return QString::null;
+ return TQString::null;
}
} // namespace MDN
diff --git a/libkmime/kmime_mdn.h b/libkmime/kmime_mdn.h
index 2fd76e6d7..1149619fd 100644
--- a/libkmime/kmime_mdn.h
+++ b/libkmime/kmime_mdn.h
@@ -32,8 +32,8 @@
#ifndef __KMIME_MDN_H__
#define __KMIME_MDN_H__
-#include <qvaluelist.h>
-#include <qstring.h>
+#include <tqvaluelist.h>
+#include <tqstring.h>
#include <kdepimmacros.h>
@@ -178,19 +178,19 @@ namespace KMime {
/** Main function. Generates the content of the
message/disposition-notification body part. */
- KDE_EXPORT extern QCString dispositionNotificationBodyContent( const QString & finalRecipient,
- const QCString & originalRecipient,
- const QCString & originalMsgID,
+ KDE_EXPORT extern TQCString dispositionNotificationBodyContent( const TQString & finalRecipient,
+ const TQCString & originalRecipient,
+ const TQCString & originalMsgID,
DispositionType disposition,
ActionMode actionMode,
SendingMode sendingMode,
- const QValueList<DispositionModifier> & dispositionModifers
- =QValueList<DispositionModifier>(),
- const QString & special=QString::null );
+ const TQValueList<DispositionModifier> & dispositionModifers
+ =TQValueList<DispositionModifier>(),
+ const TQString & special=TQString::null );
- KDE_EXPORT extern QString descriptionFor( DispositionType d,
- const QValueList<DispositionModifier> & m
- =QValueList<DispositionModifier>() );
+ KDE_EXPORT extern TQString descriptionFor( DispositionType d,
+ const TQValueList<DispositionModifier> & m
+ =TQValueList<DispositionModifier>() );
enum ReturnContent { Nothing, All, HeadersOnly };
diff --git a/libkmime/kmime_message.cpp b/libkmime/kmime_message.cpp
index 2bfbf91a6..0d516ecc7 100644
--- a/libkmime/kmime_message.cpp
+++ b/libkmime/kmime_message.cpp
@@ -32,7 +32,7 @@ void Message::parse()
{
Content::parse();
- QCString raw;
+ TQCString raw;
if( !(raw=rawHeader(s_ubject.type())).isEmpty() )
s_ubject.from7BitString(raw);
@@ -44,7 +44,7 @@ void Message::parse()
void Message::assemble()
{
Headers::Base *h;
- QCString newHead="";
+ TQCString newHead="";
//Message-ID
if( (h=messageID(false))!=0 )
diff --git a/libkmime/kmime_message.h b/libkmime/kmime_message.h
index 1209d420e..8f6a0a398 100644
--- a/libkmime/kmime_message.h
+++ b/libkmime/kmime_message.h
@@ -25,7 +25,7 @@ namespace KMime {
class KDE_EXPORT Message : public Content {
public:
- typedef QPtrList<Message> List;
+ typedef TQPtrList<Message> List;
/** Constructor. Creates an empty message. */
Message();
diff --git a/libkmime/kmime_newsarticle.cpp b/libkmime/kmime_newsarticle.cpp
index a60b07df8..1b16ad71f 100644
--- a/libkmime/kmime_newsarticle.cpp
+++ b/libkmime/kmime_newsarticle.cpp
@@ -23,7 +23,7 @@ void NewsArticle::parse()
{
Message::parse();
- QCString raw;
+ TQCString raw;
if( !(raw=rawHeader(l_ines.type())).isEmpty() )
l_ines.from7BitString(raw);
@@ -32,7 +32,7 @@ void NewsArticle::parse()
void NewsArticle::assemble()
{
Headers::Base *h;
- QCString newHead="";
+ TQCString newHead="";
//Message-ID
if( (h=messageID(false))!=0 )
diff --git a/libkmime/kmime_parsers.cpp b/libkmime/kmime_parsers.cpp
index 181ce6772..6527c9912 100644
--- a/libkmime/kmime_parsers.cpp
+++ b/libkmime/kmime_parsers.cpp
@@ -15,7 +15,7 @@
*/
#include "kmime_parsers.h"
-#include <qregexp.h>
+#include <tqregexp.h>
using namespace KMime::Parser;
@@ -23,7 +23,7 @@ namespace KMime {
namespace Parser {
-MultiPart::MultiPart(const QCString &src, const QCString &boundary)
+MultiPart::MultiPart(const TQCString &src, const TQCString &boundary)
{
s_rc=src;
b_oundary=boundary;
@@ -32,7 +32,7 @@ MultiPart::MultiPart(const QCString &src, const QCString &boundary)
bool MultiPart::parse()
{
- QCString b="--"+b_oundary, part;
+ TQCString b="--"+b_oundary, part;
int pos1=0, pos2=0, blen=b.length();
p_arts.clear();
@@ -95,16 +95,16 @@ bool MultiPart::parse()
//============================================================================================
-NonMimeParser::NonMimeParser(const QCString &src) :
+NonMimeParser::NonMimeParser(const TQCString &src) :
s_rc(src), p_artNr(-1), t_otalNr(-1)
{}
/**
* try to guess the mimetype from the file-extension
*/
-QCString NonMimeParser::guessMimeType(const QCString& fileName)
+TQCString NonMimeParser::guessMimeType(const TQCString& fileName)
{
- QCString tmp, mimeType;
+ TQCString tmp, mimeType;
int pos;
if(!fileName.isEmpty()) {
@@ -137,7 +137,7 @@ QCString NonMimeParser::guessMimeType(const QCString& fileName)
//============================================================================================
-UUEncoded::UUEncoded(const QCString &src, const QCString &subject) :
+UUEncoded::UUEncoded(const TQCString &src, const TQCString &subject) :
NonMimeParser(src), s_ubject(subject)
{}
@@ -150,9 +150,9 @@ bool UUEncoded::parse()
while (success) {
int beginPos=currentPos, uuStart=currentPos, endPos=0, lineCount=0, MCount=0, pos=0, len=0;
bool containsBegin=false, containsEnd=false;
- QCString tmp,fileName;
+ TQCString tmp,fileName;
- if( (beginPos=s_rc.find(QRegExp("begin [0-9][0-9][0-9]"),currentPos))>-1 && (beginPos==0 || s_rc.at(beginPos-1)=='\n') ) {
+ if( (beginPos=s_rc.find(TQRegExp("begin [0-9][0-9][0-9]"),currentPos))>-1 && (beginPos==0 || s_rc.at(beginPos-1)=='\n') ) {
containsBegin=true;
uuStart=s_rc.find('\n', beginPos);
if(uuStart==-1) {//no more line breaks found, we give up
@@ -189,8 +189,8 @@ bool UUEncoded::parse()
}
if( (!containsBegin || !containsEnd) && s_ubject) { // message may be split up => parse subject
- QRegExp rx("[0-9]+/[0-9]+");
- pos=rx.search(QString(s_ubject), 0);
+ TQRegExp rx("[0-9]+/[0-9]+");
+ pos=rx.search(TQString(s_ubject), 0);
len=rx.matchedLength();
if(pos!=-1) {
tmp=s_ubject.mid(pos, len);
@@ -239,15 +239,15 @@ bool UUEncoded::parse()
//============================================================================================
-YENCEncoded::YENCEncoded(const QCString &src) :
+YENCEncoded::YENCEncoded(const TQCString &src) :
NonMimeParser(src)
{}
-bool YENCEncoded::yencMeta(QCString& src, const QCString& name, int* value)
+bool YENCEncoded::yencMeta(TQCString& src, const TQCString& name, int* value)
{
bool found = false;
- QCString sought=name + "=";
+ TQCString sought=name + "=";
int iPos=src.find( sought);
if (iPos>-1) {
@@ -282,7 +282,7 @@ bool YENCEncoded::parse()
while (success) {
int beginPos=currentPos, yencStart=currentPos;
bool containsPart=false;
- QCString fileName,mimeType;
+ TQCString fileName,mimeType;
if ((beginPos=s_rc.find("=ybegin ", currentPos))>-1 && ( beginPos==0 || s_rc.at( beginPos-1)=='\n') ) {
yencStart=s_rc.find( '\n', beginPos);
@@ -304,7 +304,7 @@ bool YENCEncoded::parse()
// Try to identify yenc meta data
// Filenames can contain any embedded chars until end of line
- QCString meta=s_rc.mid(beginPos, yencStart-beginPos);
+ TQCString meta=s_rc.mid(beginPos, yencStart-beginPos);
int namePos=meta.find("name=");
if (namePos== -1) {
success=false;
@@ -356,7 +356,7 @@ bool YENCEncoded::parse()
bool lineStart=true;
int lineLength=0;
bool containsEnd=false;
- QByteArray binary = QByteArray(yencSize);
+ TQByteArray binary = TQByteArray(yencSize);
while (pos<len) {
int ch=s_rc.at(pos);
if (ch<0)
diff --git a/libkmime/kmime_parsers.h b/libkmime/kmime_parsers.h
index 752bed804..b16b0b6a7 100644
--- a/libkmime/kmime_parsers.h
+++ b/libkmime/kmime_parsers.h
@@ -16,9 +16,9 @@
#ifndef __KMIME_PARSERS__
#define __KMIME_PARSERS__
-#include <qvaluelist.h>
-#include <qcstring.h>
-#include <qstrlist.h>
+#include <tqvaluelist.h>
+#include <tqcstring.h>
+#include <tqstrlist.h>
namespace KMime {
@@ -31,17 +31,17 @@ namespace Parser {
class MultiPart {
public:
- MultiPart(const QCString &src, const QCString &boundary);
+ MultiPart(const TQCString &src, const TQCString &boundary);
~MultiPart() {};
bool parse();
- QValueList<QCString> parts() { return p_arts; }
- QCString preamble() { return p_reamble; }
- QCString epilouge() { return e_pilouge; }
+ TQValueList<TQCString> parts() { return p_arts; }
+ TQCString preamble() { return p_reamble; }
+ TQCString epilouge() { return e_pilouge; }
protected:
- QCString s_rc, b_oundary, p_reamble, e_pilouge;
- QValueList<QCString> p_arts;
+ TQCString s_rc, b_oundary, p_reamble, e_pilouge;
+ TQValueList<TQCString> p_arts;
};
@@ -52,23 +52,23 @@ protected:
class NonMimeParser {
public:
- NonMimeParser(const QCString &src);
+ NonMimeParser(const TQCString &src);
virtual ~NonMimeParser() {};
virtual bool parse() = 0;
bool isPartial() { return (p_artNr>-1 && t_otalNr>-1 && t_otalNr!=1); }
int partialNumber() { return p_artNr; }
int partialCount() { return t_otalNr; }
bool hasTextPart() { return (t_ext.length()>1); }
- QCString textPart() { return t_ext; }
- QStrList binaryParts() { return b_ins; }
- QStrList filenames() { return f_ilenames; }
- QStrList mimeTypes() { return m_imeTypes; }
+ TQCString textPart() { return t_ext; }
+ TQStrList binaryParts() { return b_ins; }
+ TQStrList filenames() { return f_ilenames; }
+ TQStrList mimeTypes() { return m_imeTypes; }
protected:
- static QCString guessMimeType(const QCString& fileName);
+ static TQCString guessMimeType(const TQCString& fileName);
- QCString s_rc, t_ext;
- QStrList b_ins, f_ilenames, m_imeTypes;
+ TQCString s_rc, t_ext;
+ TQStrList b_ins, f_ilenames, m_imeTypes;
int p_artNr, t_otalNr;
};
@@ -80,12 +80,12 @@ protected:
class UUEncoded : public NonMimeParser {
public:
- UUEncoded(const QCString &src, const QCString &subject);
+ UUEncoded(const TQCString &src, const TQCString &subject);
virtual bool parse();
protected:
- QCString s_ubject;
+ TQCString s_ubject;
};
@@ -97,14 +97,14 @@ protected:
class YENCEncoded : public NonMimeParser {
public:
- YENCEncoded(const QCString &src);
+ YENCEncoded(const TQCString &src);
virtual bool parse();
- QValueList<QByteArray> binaryParts() { return b_ins; }
+ TQValueList<TQByteArray> binaryParts() { return b_ins; }
protected:
- QValueList<QByteArray> b_ins;
- static bool yencMeta( QCString& src, const QCString& name, int* value);
+ TQValueList<TQByteArray> b_ins;
+ static bool yencMeta( TQCString& src, const TQCString& name, int* value);
};
diff --git a/libkmime/kmime_util.cpp b/libkmime/kmime_util.cpp
index 8923a5b0a..313aabe72 100644
--- a/libkmime/kmime_util.cpp
+++ b/libkmime/kmime_util.cpp
@@ -29,9 +29,9 @@
#include <kcalendarsystem.h>
#endif
-#include <qtextcodec.h>
-#include <qstrlist.h> // for QStrIList
-#include <qregexp.h>
+#include <tqtextcodec.h>
+#include <tqstrlist.h> // for QStrIList
+#include <tqregexp.h>
#include <stdlib.h>
#include <ctype.h>
@@ -42,10 +42,10 @@ using namespace KMime;
namespace KMime {
-QStrIList c_harsetCache;
-QStrIList l_anguageCache;
+TQStrIList c_harsetCache;
+TQStrIList l_anguageCache;
-const char* cachedCharset(const QCString &name)
+const char* cachedCharset(const TQCString &name)
{
int idx=c_harsetCache.find(name.data());
if(idx>-1)
@@ -56,7 +56,7 @@ const char* cachedCharset(const QCString &name)
return c_harsetCache.last();
}
-const char* cachedLanguage(const QCString &name)
+const char* cachedLanguage(const TQCString &name)
{
int idx=l_anguageCache.find(name.data());
if(idx>-1)
@@ -67,7 +67,7 @@ const char* cachedLanguage(const QCString &name)
return l_anguageCache.last();
}
-bool isUsAscii(const QString &s)
+bool isUsAscii(const TQString &s)
{
uint sLength = s.length();
for (uint i=0; i<sLength; i++)
@@ -121,11 +121,11 @@ const uchar eTextMap[16] = {
#undef truncate
#endif
-QString decodeRFC2047String(const QCString &src, const char **usedCS,
- const QCString &defaultCS, bool forceCS)
+TQString decodeRFC2047String(const TQCString &src, const char **usedCS,
+ const TQCString &defaultCS, bool forceCS)
{
- QCString result, str;
- QCString declaredCS;
+ TQCString result, str;
+ TQCString declaredCS;
char *pos, *dest, *beg, *end, *mid, *endOfLastEncWord=0;
char encoding = '\0';
bool valid, onlySpacesSinceLastWord=false;
@@ -183,7 +183,7 @@ QString decodeRFC2047String(const QCString &src, const char **usedCS,
dest=endOfLastEncWord;
if (mid < pos) {
- str = QCString(mid, (int)(pos - mid + 1));
+ str = TQCString(mid, (int)(pos - mid + 1));
if (encoding == 'Q')
{
// decode quoted printable text
@@ -218,7 +218,7 @@ QString decodeRFC2047String(const QCString &src, const char **usedCS,
}
//find suitable QTextCodec
- QTextCodec *codec=0;
+ TQTextCodec *codec=0;
bool ok=true;
if (forceCS || declaredCS.isEmpty()) {
codec=KGlobal::charsets()->codecForName(defaultCS);
@@ -237,19 +237,19 @@ QString decodeRFC2047String(const QCString &src, const char **usedCS,
return codec->toUnicode(result.data(), result.length());
}
-QString decodeRFC2047String(const QCString &src)
+TQString decodeRFC2047String(const TQCString &src)
{
const char *usedCS;
return decodeRFC2047String(src, &usedCS, "utf-8", false);
}
-QCString encodeRFC2047String(const QString &src, const char *charset,
+TQCString encodeRFC2047String(const TQString &src, const char *charset,
bool addressHeader, bool allow8BitHeaders)
{
- QCString encoded8Bit, result, usedCS;
+ TQCString encoded8Bit, result, usedCS;
unsigned int start=0,end=0;
bool nonAscii=false, ok=true, useQEncoding=false;
- QTextCodec *codec=0;
+ TQTextCodec *codec=0;
usedCS=charset;
codec=KGlobal::charsets()->codecForName(usedCS, ok);
@@ -333,11 +333,11 @@ QCString encodeRFC2047String(const QString &src, const char *charset,
return result;
}
-QCString uniqueString()
+TQCString uniqueString()
{
static char chars[] = "0123456789abcdefghijklmnopqrstuvxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
time_t now;
- QCString ret;
+ TQCString ret;
char p[11];
int pos, ran;
unsigned int timeval;
@@ -358,16 +358,16 @@ QCString uniqueString()
}
-QCString multiPartBoundary()
+TQCString multiPartBoundary()
{
- QCString ret;
+ TQCString ret;
ret="nextPart"+uniqueString();
return ret;
}
-QCString extractHeader(const QCString &src, const char *name)
+TQCString extractHeader(const TQCString &src, const char *name)
{
- QCString n=QCString(name)+":";
+ TQCString n=TQCString(name)+":";
int pos1=-1, pos2=0, len=src.length()-1;
bool folded(false);
@@ -400,39 +400,39 @@ QCString extractHeader(const QCString &src, const char *name)
if (!folded)
return src.mid(pos1, pos2-pos1);
else
- return (src.mid(pos1, pos2-pos1).replace(QRegExp("\\s*\\n\\s*")," "));
+ return (src.mid(pos1, pos2-pos1).replace(TQRegExp("\\s*\\n\\s*")," "));
}
else {
- return QCString(0); //header not found
+ return TQCString(0); //header not found
}
}
-QCString CRLFtoLF(const QCString &s)
+TQCString CRLFtoLF(const TQCString &s)
{
- QCString ret=s.copy();
- ret.replace(QRegExp("\\r\\n"), "\n");
+ TQCString ret=s.copy();
+ ret.replace(TQRegExp("\\r\\n"), "\n");
return ret;
}
-QCString CRLFtoLF(const char *s)
+TQCString CRLFtoLF(const char *s)
{
- QCString ret=s;
- ret.replace(QRegExp("\\r\\n"), "\n");
+ TQCString ret=s;
+ ret.replace(TQRegExp("\\r\\n"), "\n");
return ret;
}
-QCString LFtoCRLF(const QCString &s)
+TQCString LFtoCRLF(const TQCString &s)
{
- QCString ret=s.copy();
- ret.replace(QRegExp("\\n"), "\r\n");
+ TQCString ret=s.copy();
+ ret.replace(TQRegExp("\\n"), "\r\n");
return ret;
}
-void removeQuots(QCString &str)
+void removeQuots(TQCString &str)
{
bool inQuote=false;
@@ -449,7 +449,7 @@ void removeQuots(QCString &str)
}
-void removeQuots(QString &str)
+void removeQuots(TQString &str)
{
bool inQuote=false;
@@ -466,7 +466,7 @@ void removeQuots(QString &str)
}
-void addQuotes(QCString &str, bool forceQuotes)
+void addQuotes(TQCString &str, bool forceQuotes)
{
bool needsQuotes=false;
for (unsigned int i=0; i < str.length(); i++) {
@@ -507,7 +507,7 @@ DateFormatter::setFormat( FormatType t )
}
QString
-DateFormatter::dateString( time_t otime , const QString& lang ,
+DateFormatter::dateString( time_t otime , const TQString& lang ,
bool shortFormat, bool includeSecs ) const
{
switch ( mFormat ) {
@@ -527,11 +527,11 @@ DateFormatter::dateString( time_t otime , const QString& lang ,
return custom( otime );
break;
}
- return QString::null;
+ return TQString::null;
}
QString
-DateFormatter::dateString(const QDateTime& dtime, const QString& lang,
+DateFormatter::dateString(const TQDateTime& dtime, const TQString& lang,
bool shortFormat, bool includeSecs ) const
{
return DateFormatter::dateString( qdateToTimeT(dtime), lang, shortFormat, includeSecs );
@@ -540,8 +540,8 @@ DateFormatter::dateString(const QDateTime& dtime, const QString& lang,
QCString
DateFormatter::rfc2822(time_t otime) const
{
- QDateTime tmp;
- QCString ret;
+ TQDateTime tmp;
+ TQCString ret;
tmp.setTime_t(otime);
@@ -555,11 +555,11 @@ QString
DateFormatter::custom(time_t t) const
{
if ( mCustomFormat.isEmpty() )
- return QString::null;
+ return TQString::null;
int z = mCustomFormat.find("Z");
- QDateTime d;
- QString ret = mCustomFormat;
+ TQDateTime d;
+ TQString ret = mCustomFormat;
d.setTime_t(t);
if ( z != -1 ) {
@@ -572,7 +572,7 @@ DateFormatter::custom(time_t t) const
}
void
-DateFormatter::setCustomFormat(const QString& format)
+DateFormatter::setCustomFormat(const TQString& format)
{
mCustomFormat = format;
mFormat = Custom;
@@ -588,7 +588,7 @@ DateFormatter::getCustomFormat() const
QCString
DateFormatter::zone(time_t otime) const
{
- QCString ret;
+ TQCString ret;
#if defined(HAVE_TIMEZONE) || defined(HAVE_TM_GMTOFF)
struct tm *local = localtime( &otime );
#endif
@@ -629,8 +629,8 @@ DateFormatter::zone(time_t otime) const
#else
- QDateTime d1 = QDateTime::fromString( asctime(gmtime(&otime)) );
- QDateTime d2 = QDateTime::fromString( asctime(localtime(&otime)) );
+ TQDateTime d1 = TQDateTime::fromString( asctime(gmtime(&otime)) );
+ TQDateTime d2 = TQDateTime::fromString( asctime(localtime(&otime)) );
int secs = d1.secsTo(d2);
int neg = (secs<0)?1:0;
secs = abs(secs);
@@ -645,14 +645,14 @@ DateFormatter::zone(time_t otime) const
}
time_t
-DateFormatter::qdateToTimeT(const QDateTime& dt) const
+DateFormatter::qdateToTimeT(const TQDateTime& dt) const
{
- QDateTime epoch( QDate(1970, 1,1), QTime(00,00,00) );
+ TQDateTime epoch( TQDate(1970, 1,1), TQTime(00,00,00) );
time_t otime;
time( &otime );
- QDateTime d1 = QDateTime::fromString( asctime(gmtime(&otime)) );
- QDateTime d2 = QDateTime::fromString( asctime(localtime(&otime)) );
+ TQDateTime d1 = TQDateTime::fromString( asctime(gmtime(&otime)) );
+ TQDateTime d2 = TQDateTime::fromString( asctime(localtime(&otime)) );
time_t drf = epoch.secsTo( dt ) - d1.secsTo( d2 );
return drf;
@@ -671,7 +671,7 @@ DateFormatter::fancy(time_t otime) const
mDate.setTime_t( mCurrentTime );
}
- QDateTime old;
+ TQDateTime old;
old.setTime_t( otime );
// not more than an hour in the future
@@ -685,7 +685,7 @@ DateFormatter::fancy(time_t otime) const
formatTime( old.time(), true ) );
}
if ( diff < 2 * 24 * 60 * 60 ) {
- QDateTime yesterday( mDate.addDays( -1 ) );
+ TQDateTime yesterday( mDate.addDays( -1 ) );
if ( old.date().year() == yesterday.date().year() &&
old.date().dayOfYear() == yesterday.date().dayOfYear() )
return i18n( "Yesterday %1" ).arg( locale->
@@ -693,7 +693,7 @@ DateFormatter::fancy(time_t otime) const
}
for ( int i = 3; i < 7; i++ )
if ( diff < i * 24 * 60 * 60 ) {
- QDateTime weekday( mDate.addDays( -i + 1 ) );
+ TQDateTime weekday( mDate.addDays( -i + 1 ) );
if ( old.date().year() == weekday.date().year() &&
old.date().dayOfYear() == weekday.date().dayOfYear() )
return i18n( "1. weekday, 2. time", "%1 %2" ).
@@ -712,10 +712,10 @@ DateFormatter::fancy(time_t otime) const
QString
DateFormatter::localized(time_t otime, bool shortFormat, bool includeSecs,
- const QString& localeLanguage ) const
+ const TQString& localeLanguage ) const
{
- QDateTime tmp;
- QString ret;
+ TQDateTime tmp;
+ TQString ret;
KLocale *locale = KGlobal::locale();
tmp.setTime_t( otime );
@@ -737,7 +737,7 @@ DateFormatter::localized(time_t otime, bool shortFormat, bool includeSecs,
QString
DateFormatter::cTime(time_t otime) const
{
- return QString::fromLatin1( ctime( &otime ) ).stripWhiteSpace() ;
+ return TQString::fromLatin1( ctime( &otime ) ).stripWhiteSpace() ;
}
QString
@@ -745,7 +745,7 @@ DateFormatter::isoDate(time_t otime) const
{
char cstr[64];
strftime( cstr, 63, "%Y-%m-%d %H:%M:%S", localtime(&otime) );
- return QString( cstr );
+ return TQString( cstr );
}
@@ -757,7 +757,7 @@ DateFormatter::reset()
QString
DateFormatter::formatDate(DateFormatter::FormatType t, time_t otime,
- const QString& data, bool shortFormat, bool includeSecs )
+ const TQString& data, bool shortFormat, bool includeSecs )
{
DateFormatter f( t );
if ( t == DateFormatter::Custom ) {
@@ -767,7 +767,7 @@ DateFormatter::formatDate(DateFormatter::FormatType t, time_t otime,
}
QString
-DateFormatter::formatCurrentDate( DateFormatter::FormatType t, const QString& data,
+DateFormatter::formatCurrentDate( DateFormatter::FormatType t, const TQString& data,
bool shortFormat, bool includeSecs )
{
DateFormatter f( t );
diff --git a/libkmime/kmime_util.h b/libkmime/kmime_util.h
index ed8710c92..e2b3c8334 100644
--- a/libkmime/kmime_util.h
+++ b/libkmime/kmime_util.h
@@ -16,27 +16,27 @@
#ifndef __KMIME_UTIL_H__
#define __KMIME_UTIL_H__
-#include "qdatetime.h"
-#include "qstring.h"
-#include "qcstring.h"
-#include "qvaluelist.h"
+#include "tqdatetime.h"
+#include "tqstring.h"
+#include "tqcstring.h"
+#include "tqvaluelist.h"
#include "time.h"
#include <kdepimmacros.h>
-typedef QValueList<QCString> QCStringList;
+typedef TQValueList<TQCString> QCStringList;
namespace KMime {
/** Consult the charset cache. Only used for reducing mem usage by
keeping strings in a common repository.*/
- extern const char* cachedCharset(const QCString &name) KDE_EXPORT;
+ extern const char* cachedCharset(const TQCString &name) KDE_EXPORT;
/** Consult the language cache. Only used for reducing mem usage by
keeping strings in a common repository.*/
- extern const char* cachedLanguage(const QCString &name) KDE_EXPORT;
+ extern const char* cachedLanguage(const TQCString &name) KDE_EXPORT;
/** checks whether @p s contains any non-us-ascii characters */
- extern bool isUsAscii(const QString &s) KDE_EXPORT;
+ extern bool isUsAscii(const TQString &s) KDE_EXPORT;
inline bool isOfSet(const uchar map[16], unsigned char ch) {
Q_ASSERT( ch < 128 );
@@ -74,15 +74,15 @@ namespace KMime {
@param forceCS force the use of the default charset.
@return the decoded string.
*/
- extern QString decodeRFC2047String(const QCString &src, const char **usedCS,
- const QCString &defaultCS, bool forceCS) KDE_EXPORT;
+ extern TQString decodeRFC2047String(const TQCString &src, const char **usedCS,
+ const TQCString &defaultCS, bool forceCS) KDE_EXPORT;
/** Decode string @p src according to RFC2047 (ie. the
=?charset?[qb]?encoded?= construct).
@param src source string.
@return the decoded string.
*/
- extern QString decodeRFC2047String(const QCString &src) KDE_EXPORT;
+ extern TQString decodeRFC2047String(const TQCString &src) KDE_EXPORT;
/** Encode string @p src according to RFC2047 using charset
@p charset.
@@ -94,7 +94,7 @@ namespace KMime {
are allowed.
@return the encoded string.
*/
- extern QCString encodeRFC2047String(const QString &src, const char *charset,
+ extern TQCString encodeRFC2047String(const TQString &src, const char *charset,
bool addressHeader=false, bool allow8bitHeaders=false) KDE_EXPORT;
/** Uses current time, pid and random numbers to construct a string
@@ -103,7 +103,7 @@ namespace KMime {
@return the unique string.
@see multiPartBoundary
*/
- extern QCString uniqueString() KDE_EXPORT;
+ extern TQCString uniqueString() KDE_EXPORT;
/** Constructs a random string (sans leading/trailing "--") that can
be used as a multipart delimiter (ie. as @p boundary parameter
@@ -111,16 +111,16 @@ namespace KMime {
@return the randomized string.
@see uniqueString
*/
- extern QCString multiPartBoundary() KDE_EXPORT;
+ extern TQCString multiPartBoundary() KDE_EXPORT;
/** Tries to extract the header with name @p name from the string
@p src, unfolding it if necessary.
@param src the source string.
@param name the name of the header to search for.
@return the first instance of the header @p name in @p src
- or a null QCString if no such header was found.
+ or a null TQCString if no such header was found.
*/
- extern QCString extractHeader(const QCString &src, const char *name) KDE_EXPORT;
+ extern TQCString extractHeader(const TQCString &src, const char *name) KDE_EXPORT;
/** Converts all occurrences of "\r\n" (CRLF) in @p s to "\n" (LF).
This function is expensive and should be used only if the mail
@@ -130,7 +130,7 @@ namespace KMime {
@return the string with CRLF's substitued for LF's
@see CRLFtoLF(const char*) LFtoCRLF
*/
- extern QCString CRLFtoLF(const QCString &s) KDE_EXPORT;
+ extern TQCString CRLFtoLF(const TQCString &s) KDE_EXPORT;
/** Converts all occurrences of "\r\n" (CRLF) in @p s to "\n" (LF).
This function is expensive and should be used only if the mail
@@ -138,9 +138,9 @@ namespace KMime {
line endings.
@param s source string containing CRLF's
@return the string with CRLF's substitued for LF's
- @see CRLFtoLF(const QCString&) LFtoCRLF
+ @see CRLFtoLF(const TQCString&) LFtoCRLF
*/
- extern QCString CRLFtoLF(const char *s) KDE_EXPORT;
+ extern TQCString CRLFtoLF(const char *s) KDE_EXPORT;
/** Converts all occurrences of "\n" (LF) in @p s to "\r\n" (CRLF).
This function is expensive and should be used only if the mail
@@ -150,29 +150,29 @@ namespace KMime {
@param s source string containing CRLF's
@return the string with CRLF's substitued for LF's
- @see CRLFtoLF(const QCString&) LFtoCRLF
+ @see CRLFtoLF(const TQCString&) LFtoCRLF
*/
- extern QCString LFtoCRLF(const QCString &s) KDE_EXPORT;
+ extern TQCString LFtoCRLF(const TQCString &s) KDE_EXPORT;
/** Removes quote (DQUOTE) characters and decodes "quoted-pairs"
(ie. backslash-escaped characters)
@param str the string to work on.
@see addQuotes
*/
- KDE_EXPORT extern void removeQuots(QCString &str);
+ KDE_EXPORT extern void removeQuots(TQCString &str);
/** Removes quote (DQUOTE) characters and decodes "quoted-pairs"
(ie. backslash-escaped characters)
@param str the string to work on.
@see addQuotes
*/
- KDE_EXPORT extern void removeQuots(QString &str);
+ KDE_EXPORT extern void removeQuots(TQString &str);
/** Converts the given string into a quoted-string if
the string contains any special characters
(ie. one of ()<>@,.;:[]=\").
@param str us-ascii string to work on.
@param forceQuotes if @p true, always add quote characters.
*/
- KDE_EXPORT extern void addQuotes(QCString &str, bool forceQuotes);
+ KDE_EXPORT extern void addQuotes(TQCString &str, bool forceQuotes);
/**
@@ -226,12 +226,12 @@ namespace KMime {
* @param shortFormat used <em>only</em> by the Localized format, is passed to KLocale::formatDateTime
* @param includeSecs used <em>only</em> by the Localized format, is passed to KLocale::formatDateTime
*/
- QString dateString(time_t otime, const QString& lang = QString::null,
+ TQString dateString(time_t otime, const TQString& lang = TQString::null,
bool shortFormat = true, bool includeSecs=false) const;
/**
* overloaded, does exactly what #dateString does (it's slower)
*/
- QString dateString(const QDateTime& dtime, const QString& lang = QString::null,
+ TQString dateString(const TQDateTime& dtime, const TQString& lang = TQString::null,
bool shortFormat = true, bool includeSecs=false) const;
@@ -239,19 +239,19 @@ namespace KMime {
* makes the class use the custom format for
* date to string conversions.
* Method accepts the same arguments
- * as QDateTime::toString method and adds
+ * as TQDateTime::toString method and adds
* "Z" expression which is substituted with the
* RFC-822 style numeric timezone (-0500)
* @param format the custom format
*/
- void setCustomFormat(const QString& format);
- QString getCustomFormat() const;
+ void setCustomFormat(const TQString& format);
+ TQString getCustomFormat() const;
/**
* returns rfc2822 formatted string
* @param otime time to use for formatting
*/
- QCString rfc2822(time_t otime) const;
+ TQCString rfc2822(time_t otime) const;
/**
* resets the internal clock
*/
@@ -266,8 +266,8 @@ namespace KMime {
* @param shortFormat used <em>only</em> by the Localized format, is passed to KLocale::formatDateTime
* @param includeSecs used <em>only</em> by the Localized format, is passed to KLocale::formatDateTime
*/
- static QString formatDate( DateFormatter::FormatType t, time_t time,
- const QString& data = QString::null,
+ static TQString formatDate( DateFormatter::FormatType t, time_t time,
+ const TQString& data = TQString::null,
bool shortFormat = true, bool includeSecs=false);
/** convenience function, same as #formatDate
@@ -278,12 +278,12 @@ namespace KMime {
* @param shortFormat used <em>only</em> by the Localized format, is passed to KLocale::formatDateTime
* @param includeSecs used <em>only</em> by the Localized format, is passed to KLocale::formatDateTime
*/
- static QString formatCurrentDate( DateFormatter::FormatType t,
- const QString& data = QString::null,
+ static TQString formatCurrentDate( DateFormatter::FormatType t,
+ const TQString& data = TQString::null,
bool shortFormat = true, bool includeSecs=false);
/** convenience function, same as #rfc2822 */
- static QCString rfc2822FormatDate( time_t time );
+ static TQCString rfc2822FormatDate( time_t time );
static bool isDaylight();
protected:
/**
@@ -291,7 +291,7 @@ namespace KMime {
* @param otime time to format
* @internal
*/
- QString fancy(time_t otime) const ;
+ TQString fancy(time_t otime) const ;
/**
* returns localized formatted date string
* @param otime time to format
@@ -300,18 +300,18 @@ namespace KMime {
* @param localeLanguage language used for formatting
* @internal
*/
- QString localized(time_t otime, bool shortFormat = true, bool includeSecs = false,
- const QString& localeLanguage=QString::null ) const;
+ TQString localized(time_t otime, bool shortFormat = true, bool includeSecs = false,
+ const TQString& localeLanguage=TQString::null ) const;
/**
* returns string as formatted with ctime function
* @internal
*/
- QString cTime(time_t otime) const;
+ TQString cTime(time_t otime) const;
/**
* returns a string in the "%Y-%m-%d %H:%M:%S" format
* @internal
*/
- QString isoDate(time_t otime) const;
+ TQString isoDate(time_t otime) const;
/**
* returns date formatted with the earlier
@@ -319,19 +319,19 @@ namespace KMime {
* @param t time used for formatting
* @internal
*/
- QString custom(time_t t) const;
+ TQString custom(time_t t) const;
/**
* returns a string identifying the timezone (eg."-0500")
* @internal
*/
- QCString zone(time_t otime) const;
+ TQCString zone(time_t otime) const;
- time_t qdateToTimeT(const QDateTime& dt) const;
+ time_t qdateToTimeT(const TQDateTime& dt) const;
private:
FormatType mFormat;
mutable time_t mCurrentTime;
- mutable QDateTime mDate;
- QString mCustomFormat;
+ mutable TQDateTime mDate;
+ TQString mCustomFormat;
static int mDaylight;
};
diff --git a/libkmime/kmime_warning.h b/libkmime/kmime_warning.h
index 97b714a9e..f4cd1ff2a 100644
--- a/libkmime/kmime_warning.h
+++ b/libkmime/kmime_warning.h
@@ -8,7 +8,7 @@
# define KMIME_WARN_UNKNOWN_CHARSET(c) KMIME_WARN << "unknown charset \"" \
<< c << "\" in RFC 2047 encoded-word" << endl;
# define KMIME_WARN_8BIT(ch) KMIME_WARN \
- << "8Bit character '" << QString(QChar(ch)) << "'" << endl
+ << "8Bit character '" << TQString(TQChar(ch)) << "'" << endl
# define KMIME_WARN_IF_8BIT(ch) if ( (unsigned char)(ch) > 127 ) \
{ KMIME_WARN_8BIT(ch); }
# define KMIME_WARN_PREMATURE_END_OF(x) KMIME_WARN \
@@ -18,7 +18,7 @@
# define KMIME_WARN_CTL_OUTSIDE_QS(x) KMIME_WARN << "Control character " \
#x " outside quoted-string" << endl
# define KMIME_WARN_INVALID_X_IN_Y(X,Y) KMIME_WARN << "Invalid character '" \
- QString(QChar(X)) << "' in " #Y << endl;
+ TQString(TQChar(X)) << "' in " #Y << endl;
# define KMIME_WARN_TOO_LONG(x) KMIME_WARN << #x \
" too long or missing delimiter" << endl;
#else
diff --git a/libkmime/kqcstringsplitter.cpp b/libkmime/kqcstringsplitter.cpp
index fdd6dff09..2038f4f25 100644
--- a/libkmime/kqcstringsplitter.cpp
+++ b/libkmime/kqcstringsplitter.cpp
@@ -30,7 +30,7 @@ KQCStringSplitter::~KQCStringSplitter()
-void KQCStringSplitter::init(const QCString &str, const char *s)
+void KQCStringSplitter::init(const TQCString &str, const char *s)
{
sep=s;
src=str;
diff --git a/libkmime/kqcstringsplitter.h b/libkmime/kqcstringsplitter.h
index 14947643b..7e3c4dd0b 100644
--- a/libkmime/kqcstringsplitter.h
+++ b/libkmime/kqcstringsplitter.h
@@ -17,7 +17,7 @@
#ifndef KQCSTRINGSPLITTER_H
#define KQCSTRINGSPLITTER_H
-#include <qcstring.h>
+#include <tqcstring.h>
#include <kdepimmacros.h>
@@ -29,7 +29,7 @@ class KDE_EXPORT KQCStringSplitter {
void reset() { start=0; end=0; sep=""; incSep=false;}
- void init(const QCString &str, const char *s);
+ void init(const TQCString &str, const char *s);
void init(const char *str, const char *s);
void setIncludeSep(bool inc) { incSep=inc; }
@@ -39,11 +39,11 @@ class KDE_EXPORT KQCStringSplitter {
bool next();
bool prev();
- QCString& string() { return dst; }
- const QCString& source() { return src; }
+ TQCString& string() { return dst; }
+ const TQCString& source() { return src; }
private:
- QCString src, dst, sep;
+ TQCString src, dst, sep;
int start,end;
bool incSep;
diff --git a/libkmime/tests/test_charfreq.cpp b/libkmime/tests/test_charfreq.cpp
index c5b708819..50f2809d8 100644
--- a/libkmime/tests/test_charfreq.cpp
+++ b/libkmime/tests/test_charfreq.cpp
@@ -6,7 +6,7 @@
#include <iostream>
-#include <qfile.h>
+#include <tqfile.h>
using namespace std;
using namespace KMime;
@@ -28,12 +28,12 @@ static const char * typeToString( int type ) {
int main( int argc, char **argv ) {
for ( int i = 1 /*not program*/ ; i < argc ; i++ ) {
- QFile in( argv[i] );
+ TQFile in( argv[i] );
if ( !in.open( IO_ReadOnly ) ) {
cerr << argv[i] << ": does not exist!" << endl;
continue;
}
- QByteArray ba = in.readAll();
+ TQByteArray ba = in.readAll();
CharFreq cf( ba );
cout << argv[i] << ": " << typeToString(cf.type()) << endl;
}
diff --git a/libkmime/tests/test_dates.cpp b/libkmime/tests/test_dates.cpp
index f70269282..7087a01a6 100644
--- a/libkmime/tests/test_dates.cpp
+++ b/libkmime/tests/test_dates.cpp
@@ -21,9 +21,9 @@ main()
t.setFormat(DateFormatter::Iso);
kdDebug()<<"\tIso : \t"<<t.dateString(ntime)<<endl;
kdDebug()<<"\trfc2822 : \t"<<t.rfc2822(ntime)<<endl;
- QString rfcd = t.rfc2822(ntime);
+ TQString rfcd = t.rfc2822(ntime);
Types::DateTime dt;
- QDateTime qdt;
+ TQDateTime qdt;
const char *str = rfcd.latin1();
if ( HeaderParsing::parseDateTime( str, str + rfcd.length(), dt ) ) {
kdDebug()<<"@@@ ntime = "<<(ntime)<<", dt = "<<(dt.time)<<endl;
@@ -31,7 +31,7 @@ main()
kdDebug()<<"@@@ qq = "<< qdt.toString("ddd, dd MMM yyyy hh:mm:ss") <<endl;
kdDebug()<<"@@@ rfc2822 : "<<t.rfc2822(dt.time)<<endl;
}
- QString ddd = "Mon, 05 Aug 2002 01:57:51 -0700";
+ TQString ddd = "Mon, 05 Aug 2002 01:57:51 -0700";
str = ddd.latin1();
if ( HeaderParsing::parseDateTime( str, str + ddd.length(), dt ) ) {
kdDebug()<<"dt = "<<(dt.time)<<endl;
@@ -79,15 +79,15 @@ main()
kdDebug()<<"\tCustom : \t"<< DateFormatter::formatDate( DateFormatter::Custom, ntime,
"Z MMMM dddd yyyy") <<endl;
t.setFormat(DateFormatter::Fancy);
- kdDebug()<<"QDateTime taking: (dates as in first test)"<<endl;
- kdDebug()<<"\tFancy : \t"<<t.dateString((QDateTime::currentDateTime()))<<endl;
+ kdDebug()<<"TQDateTime taking: (dates as in first test)"<<endl;
+ kdDebug()<<"\tFancy : \t"<<t.dateString((TQDateTime::currentDateTime()))<<endl;
t.setFormat(DateFormatter::Localized);
- kdDebug()<<"\tLocalized : \t"<<t.dateString(QDateTime::currentDateTime())<<endl;
+ kdDebug()<<"\tLocalized : \t"<<t.dateString(TQDateTime::currentDateTime())<<endl;
t.setFormat(DateFormatter::CTime);
- kdDebug()<<"\tCTime : \t"<<t.dateString(QDateTime::currentDateTime())<<endl;
+ kdDebug()<<"\tCTime : \t"<<t.dateString(TQDateTime::currentDateTime())<<endl;
t.setFormat(DateFormatter::Iso);
- kdDebug()<<"\tIso : \t"<<t.dateString(QDateTime::currentDateTime())<<endl;
+ kdDebug()<<"\tIso : \t"<<t.dateString(TQDateTime::currentDateTime())<<endl;
t.setCustomFormat("MMMM d dddd yyyy Z");
- kdDebug()<<"\tCustom : \t"<<t.dateString(QDateTime::currentDateTime())<<endl;
+ kdDebug()<<"\tCustom : \t"<<t.dateString(TQDateTime::currentDateTime())<<endl;
}
diff --git a/libkmime/tests/test_kmime_codec.cpp b/libkmime/tests/test_kmime_codec.cpp
index f13b2b434..e30a89ac9 100644
--- a/libkmime/tests/test_kmime_codec.cpp
+++ b/libkmime/tests/test_kmime_codec.cpp
@@ -24,8 +24,8 @@
#include <getopt.h>
#include <cassert>
-#include <qfile.h>
-#include <qcstring.h> // QByteArray
+#include <tqfile.h>
+#include <tqcstring.h> // QByteArray
using namespace KMime;
using namespace std;
@@ -81,19 +81,19 @@ static bool withCRLF = false;
static bool withFinish = true;
static bool verbose = false;
-void encode_decode_kio( bool, const Codec *, const QByteArray &, QFile & );
+void encode_decode_kio( bool, const Codec *, const TQByteArray &, TQFile & );
void encode_decode_chunkwise( bool, const Codec *,
- const QByteArray &, QFile & );
-void encode_decode_convenience_qba( bool, const Codec *, const QByteArray &,
- QFile & );
+ const TQByteArray &, TQFile & );
+void encode_decode_convenience_qba( bool, const Codec *, const TQByteArray &,
+ TQFile & );
int main( int argc, char * argv[] ) {
int iterations = 1;
bool encode = false;
bool decode = false;
- QCString outfilename, infilename;
- QCString encodingName;
+ TQCString outfilename, infilename;
+ TQCString encodingName;
// options parsing:
while( 1 ) {
@@ -104,12 +104,12 @@ int main( int argc, char * argv[] ) {
case 0: // encode
if ( !optarg || !*optarg ) missingParameterTo( "--encode." );
encode = true;
- encodingName = QCString(optarg);
+ encodingName = TQCString(optarg);
break;
case 1: // decode
if ( !optarg || !*optarg ) missingParameterTo( "--decode" );
decode = true;
- encodingName = QCString(optarg);
+ encodingName = TQCString(optarg);
break;
case 2: // output-buffer-size
if ( !optarg || (outbufsize = atoi( optarg )) < 1 )
@@ -121,7 +121,7 @@ int main( int argc, char * argv[] ) {
break;
case 4: // outfile
if ( !optarg || !*optarg ) missingParameterTo( "--outfile" );
- outfilename = QCString(optarg);
+ outfilename = TQCString(optarg);
writing = true;
break;
case 5: // with-crlf
@@ -167,7 +167,7 @@ int main( int argc, char * argv[] ) {
if ( optind != argc - 1 ) usage();
- QFile infile( argv[ optind ] );
+ TQFile infile( argv[ optind ] );
if (!infile.exists()) {
kdDebug() << "infile \"" << infile.name() << "\" does not exist!" << endl;
return INFILE_READ_ERR;
@@ -178,7 +178,7 @@ int main( int argc, char * argv[] ) {
return INFILE_READ_ERR;
}
- QFile outfile( outfilename );
+ TQFile outfile( outfilename );
if ( !outfilename.isEmpty() ) {
if (!outfile.open( IO_WriteOnly|IO_Truncate )) {
kdDebug() << "cannot open " << outfile.name() << " for writing!"
@@ -206,7 +206,7 @@ int main( int argc, char * argv[] ) {
return UNKNOWN_CODEC;
}
- QByteArray infile_buffer = infile.readAll();
+ TQByteArray infile_buffer = infile.readAll();
for ( int i = 0 ; i < iterations ; ++i ) {
kdDebug( verbose ) << "starting iteration " << i+1
@@ -230,10 +230,10 @@ int main( int argc, char * argv[] ) {
}
void encode_decode_convenience_qba( bool encode, const Codec * codec,
- const QByteArray & infile_buffer,
- QFile & outfile )
+ const TQByteArray & infile_buffer,
+ TQFile & outfile )
{
- QByteArray out;
+ TQByteArray out;
if ( encode )
out = codec->encode( infile_buffer, withCRLF );
else
@@ -244,13 +244,13 @@ void encode_decode_convenience_qba( bool encode, const Codec * codec,
}
}
-void encode_kio_internal( Encoder * enc, QByteArray::ConstIterator & iit,
- QByteArray::ConstIterator & iend,
- QByteArray & out )
+void encode_kio_internal( Encoder * enc, TQByteArray::ConstIterator & iit,
+ TQByteArray::ConstIterator & iend,
+ TQByteArray & out )
{
out.resize( outbufsize );
- QByteArray::Iterator oit = out.begin();
- QByteArray::ConstIterator oend = out.end();
+ TQByteArray::Iterator oit = out.begin();
+ TQByteArray::ConstIterator oend = out.end();
while ( !enc->encode( iit, iend, oit, oend ) )
if ( oit == oend ) return;
@@ -261,12 +261,12 @@ void encode_kio_internal( Encoder * enc, QByteArray::ConstIterator & iit,
out.truncate( oit - out.begin() );
}
-void decode_kio_internal( Decoder * dec, QByteArray::ConstIterator & iit,
- QByteArray::ConstIterator & iend,
- QByteArray & out ) {
+void decode_kio_internal( Decoder * dec, TQByteArray::ConstIterator & iit,
+ TQByteArray::ConstIterator & iend,
+ TQByteArray & out ) {
out.resize( outbufsize );
- QByteArray::Iterator oit = out.begin();
- QByteArray::ConstIterator oend = out.end();
+ TQByteArray::Iterator oit = out.begin();
+ TQByteArray::ConstIterator oend = out.end();
while ( !dec->decode( iit, iend, oit, oend ) )
if ( oit == oend ) return;
@@ -278,7 +278,7 @@ void decode_kio_internal( Decoder * dec, QByteArray::ConstIterator & iit,
}
void encode_decode_kio( bool encode, const Codec * codec,
- const QByteArray & infile_buffer, QFile & outfile )
+ const TQByteArray & infile_buffer, TQFile & outfile )
{
Encoder * enc = 0;
@@ -293,12 +293,12 @@ void encode_decode_kio( bool encode, const Codec * codec,
assert( dec );
}
- QByteArray::ConstIterator iit = infile_buffer.begin();
- QByteArray::ConstIterator iend = infile_buffer.end();
+ TQByteArray::ConstIterator iit = infile_buffer.begin();
+ TQByteArray::ConstIterator iend = infile_buffer.end();
- QByteArray out;
+ TQByteArray out;
do {
- out = QByteArray();
+ out = TQByteArray();
if ( encode )
encode_kio_internal( enc, iit, iend, out );
else
@@ -316,14 +316,14 @@ void encode_decode_kio( bool encode, const Codec * codec,
}
void encode_decode_chunkwise( bool encode, const Codec * codec,
- const QByteArray & infile_buffer, QFile & outfile )
+ const TQByteArray & infile_buffer, TQFile & outfile )
{
Encoder * enc = 0;
Decoder * dec = 0;
- QByteArray indata( inbufsize );
- QByteArray outdata( outbufsize );
+ TQByteArray indata( inbufsize );
+ TQByteArray outdata( outbufsize );
// we're going to need this below:
#define write_full_outdata_then_reset do { \
@@ -354,8 +354,8 @@ void encode_decode_chunkwise( bool encode, const Codec * codec,
// Initialize the output iterators:
- QByteArray::Iterator oit = outdata.begin();
- QByteArray::Iterator oend = outdata.end();
+ TQByteArray::Iterator oit = outdata.begin();
+ TQByteArray::Iterator oend = outdata.end();
// Get an encoder. This one you have to delete!
if ( encode ) {
@@ -379,8 +379,8 @@ void encode_decode_chunkwise( bool encode, const Codec * codec,
<< indata.size() << ") from input." << endl;
// setup input iterators:
- QByteArray::ConstIterator iit = indata.begin();
- QByteArray::ConstIterator iend = indata.begin() + reallyRead;
+ TQByteArray::ConstIterator iit = indata.begin();
+ TQByteArray::ConstIterator iend = indata.begin() + reallyRead;
if ( encode ) {
//
diff --git a/libkmime/tests/test_kmime_header_parsing.cpp b/libkmime/tests/test_kmime_header_parsing.cpp
index 3839bff7e..93c447ebd 100644
--- a/libkmime/tests/test_kmime_header_parsing.cpp
+++ b/libkmime/tests/test_kmime_header_parsing.cpp
@@ -4,9 +4,9 @@
#include <kinstance.h>
-#include <qfile.h>
-#include <qcstring.h>
-//#include <qstring.h>
+#include <tqfile.h>
+#include <tqcstring.h>
+//#include <tqstring.h>
//#include <stdio.h>
#include <iostream>
@@ -65,7 +65,7 @@ void usage( const char * msg=0 ) {
exit(1);
}
-ostream & operator<<( ostream & stream, const QString & str ) {
+ostream & operator<<( ostream & stream, const TQString & str ) {
return stream << str.utf8().data();
}
@@ -122,18 +122,18 @@ int main( int argc, char * argv[] ) {
KInstance instance( "test_kmime_header_parsing" );
- QFile stdIn;
+ TQFile stdIn;
stdIn.open( IO_ReadOnly, stdin );
- const QByteArray indata = stdIn.readAll();
+ const TQByteArray indata = stdIn.readAll();
stdIn.close();
- QByteArray::ConstIterator iit = indata.begin();
- const QByteArray::ConstIterator iend = indata.end();
+ TQByteArray::ConstIterator iit = indata.begin();
+ const TQByteArray::ConstIterator iend = indata.end();
switch ( index ) {
case 0:
{ // encoded-word
- QString result;
- QCString language;
+ TQString result;
+ TQCString language;
// must have checked for initial '=' already:
bool ok = indata.size() >= 1 && *iit++ == '=' &&
parseEncodedWord( iit, iend, result, language );
@@ -145,7 +145,7 @@ int main( int argc, char * argv[] ) {
break;
case 1:
{ // atom
- QString result = "with 8bit: ";
+ TQString result = "with 8bit: ";
bool ok = parseAtom( iit, iend, result, true );
cout << ( ok ? "OK" : "BAD" ) << endl
@@ -165,7 +165,7 @@ int main( int argc, char * argv[] ) {
break;
case 2:
{ // token
- QString result = "with 8bit: ";
+ TQString result = "with 8bit: ";
bool ok = parseToken( iit, iend, result, true );
cout << ( ok ? "OK" : "BAD" ) << endl
@@ -185,7 +185,7 @@ int main( int argc, char * argv[] ) {
break;
case 3:
{ // quoted-string
- QString result;
+ TQString result;
// must have checked for initial '"' already:
bool ok = *iit++ == '"' &&
parseGenericQuotedString( iit, iend, result, withCRLF, '"', '"' );
@@ -196,7 +196,7 @@ int main( int argc, char * argv[] ) {
break;
case 4:
{ // domain-literal
- QString result;
+ TQString result;
// must have checked for initial '[' already:
bool ok = *iit++ == '[' &&
parseGenericQuotedString( iit, iend, result, withCRLF, '[', ']' );
@@ -207,7 +207,7 @@ int main( int argc, char * argv[] ) {
break;
case 5:
{ // comment
- QString result;
+ TQString result;
// must have checked for initial '(' already:
bool ok = *iit++ == '(' &&
parseComment( iit, iend, result, withCRLF, true );
@@ -218,7 +218,7 @@ int main( int argc, char * argv[] ) {
break;
case 6:
{ // phrase
- QString result;
+ TQString result;
bool ok = parsePhrase( iit, iend, result, withCRLF );
cout << ( ok ? "OK" : "BAD" ) << endl
@@ -227,7 +227,7 @@ int main( int argc, char * argv[] ) {
break;
case 7:
{ // dot-atom
- QString result;
+ TQString result;
bool ok = parseDotAtom( iit, iend, result, withCRLF );
cout << ( ok ? "OK" : "BAD" ) << endl
@@ -236,7 +236,7 @@ int main( int argc, char * argv[] ) {
break;
case 8:
{ // domain
- QString result;
+ TQString result;
bool ok = parseDomain( iit, iend, result, withCRLF );
cout << ( ok ? "OK" : "BAD" ) << endl
@@ -245,12 +245,12 @@ int main( int argc, char * argv[] ) {
break;
case 9:
{ // obs-route
- QStringList result;
+ TQStringList result;
bool ok = parseObsRoute( iit, iend, result, withCRLF, true /*save*/ );
cout << ( ok ? "OK" : "BAD" ) << endl
<< "result: " << result.count() << " domains:" << endl;
- for ( QStringList::ConstIterator it = result.begin() ;
+ for ( TQStringList::ConstIterator it = result.begin() ;
it != result.end() ; ++it )
cout << (*it) << endl;
}
@@ -294,7 +294,7 @@ int main( int argc, char * argv[] ) {
cout << ( ok ? "OK" : "BAD" ) << endl
<< "result.displayName:\n" << result.displayName << endl;
int i = 0;
- for ( QValueList<KMime::Types::Mailbox>::ConstIterator
+ for ( TQValueList<KMime::Types::Mailbox>::ConstIterator
it = result.mailboxList.begin();
it != result.mailboxList.end() ; ++it, ++i )
cout << "result.mailboxList[" << i << "].displayName:\n"
@@ -313,7 +313,7 @@ int main( int argc, char * argv[] ) {
cout << ( ok ? "OK" : "BAD" ) << endl
<< "result.displayName:\n" << endl;
int i = 0;
- for ( QValueList<KMime::Types::Mailbox>::ConstIterator
+ for ( TQValueList<KMime::Types::Mailbox>::ConstIterator
it = result.mailboxList.begin();
it != result.mailboxList.end() ; ++it, ++i )
cout << "result.mailboxList[" << i << "].displayName:\n"
@@ -326,17 +326,17 @@ int main( int argc, char * argv[] ) {
break;
case 15:
{ // address-list
- QValueList<KMime::Types::Address> result;
+ TQValueList<KMime::Types::Address> result;
bool ok = parseAddressList( iit, iend, result, withCRLF );
cout << ( ok ? "OK" : "BAD" ) << endl;
int j = 0;
- for ( QValueList<KMime::Types::Address>::ConstIterator
+ for ( TQValueList<KMime::Types::Address>::ConstIterator
jt = result.begin() ; jt != result.end() ; ++jt, ++j ) {
cout << "result[" << j << "].displayName:\n"
<< (*jt).displayName << endl;
int i = 0;
- for ( QValueList<KMime::Types::Mailbox>::ConstIterator
+ for ( TQValueList<KMime::Types::Mailbox>::ConstIterator
it = (*jt).mailboxList.begin();
it != (*jt).mailboxList.end() ; ++it, ++i )
cout << "result[" << j << "].mailboxList[" << i << "].displayName:\n"
@@ -350,45 +350,45 @@ int main( int argc, char * argv[] ) {
break;
case 16:
{ // parameter
- QPair<QString,KMime::Types::QStringOrQPair> result;
+ QPair<TQString,KMime::Types::QStringOrQPair> result;
bool ok = parseParameter( iit, iend, result, withCRLF );
cout << ( ok ? "OK" : "BAD" ) << endl
<< "result.first (attribute):\n" << result.first << endl
<< "result.second.qstring (value):\n" << result.second.qstring << endl
<< "result.second.qpair (value):\n"
- << QCString( result.second.qpair.first,
+ << TQCString( result.second.qpair.first,
result.second.qpair.second+1 ).data() << endl;
}
break;
case 17:
{ // raw-parameter-list
- QMap<QString,KMime::Types::QStringOrQPair> result;
+ TQMap<TQString,KMime::Types::QStringOrQPair> result;
bool ok = parseRawParameterList( iit, iend, result, withCRLF );
cout << ( ok ? "OK" : "BAD" ) << endl
<< "result: " << result.count() << " raw parameters:" << endl;
int i = 0;
- for ( QMap<QString,KMime::Types::QStringOrQPair>::ConstIterator
+ for ( TQMap<TQString,KMime::Types::QStringOrQPair>::ConstIterator
it = result.begin() ; it != result.end() ; ++it, ++i )
cout << "result[" << i << "].key() (attribute):\n"
<< it.key() << endl
<< "result[" << i << "].data().qstring (value):\n"
<< it.data().qstring << endl
<< "result[" << i << "].data().qpair (value):\n"
- << QCString( it.data().qpair.first,
+ << TQCString( it.data().qpair.first,
it.data().qpair.second+1 ).data() << endl;
}
break;
case 18:
{ // parameter-list
- QMap<QString,QString> result;
+ TQMap<TQString,TQString> result;
bool ok = parseParameterList( iit, iend, result, withCRLF );
cout << ( ok ? "OK" : "BAD" ) << endl
<< "result: " << result.count() << " parameters:" << endl;
int i = 0;
- for ( QMap<QString,QString>::Iterator it = result.begin() ;
+ for ( TQMap<TQString,TQString>::Iterator it = result.begin() ;
it != result.end() ; ++it, ++i )
cout << "result[" << i << "].key() (attribute):\n"
<< it.key() << endl
diff --git a/libkmime/tests/test_mdn.cpp b/libkmime/tests/test_mdn.cpp
index 1bb387f1d..fa9290f20 100644
--- a/libkmime/tests/test_mdn.cpp
+++ b/libkmime/tests/test_mdn.cpp
@@ -1,9 +1,9 @@
#include <kmime_mdn.h>
using namespace KMime::MDN;
-#include <qcstring.h>
-#include <qstring.h>
-#include <qvaluelist.h>
+#include <tqcstring.h>
+#include <tqstring.h>
+#include <tqvaluelist.h>
#include <iostream>
using std::cout;
@@ -26,14 +26,14 @@ void usage( const char * msg=0 ) {
int main( int argc, char * argv[] ) {
- QString finalRecipient;
- QString originalRecipient;
- QCString originalMessageId;
+ TQString finalRecipient;
+ TQString originalRecipient;
+ TQCString originalMessageId;
ActionMode actionMode = ManualAction;
SendingMode sendingMode = SentManually;
DispositionType dispositionType = Displayed;
- QValueList<DispositionModifier> dispositionModifiers;
- QString special;
+ TQValueList<DispositionModifier> dispositionModifiers;
+ TQString special;
while ( true ) {
int option_index = 0;
@@ -84,7 +84,7 @@ int main( int argc, char * argv[] ) {
case 'f': // --final-recipient
if ( optarg && *optarg )
- finalRecipient = QString::fromUtf8( optarg );
+ finalRecipient = TQString::fromUtf8( optarg );
else
usage( "--final-recipient is missing a value" );
break;
@@ -113,7 +113,7 @@ int main( int argc, char * argv[] ) {
case 'o': // --original-recipient
if ( optarg && *optarg )
- originalRecipient = QString::fromUtf8( optarg );
+ originalRecipient = TQString::fromUtf8( optarg );
else
usage( "--original-recipient is missing a value" );
break;
@@ -133,11 +133,11 @@ int main( int argc, char * argv[] ) {
}
if ( optind < argc )
- special = QString::fromUtf8( argv[optind++] );
+ special = TQString::fromUtf8( argv[optind++] );
if ( optind < argc )
usage( "too many arguments!" );
- QCString result = dispositionNotificationBodyContent( finalRecipient,
+ TQCString result = dispositionNotificationBodyContent( finalRecipient,
originalRecipient.latin1(),
originalMessageId,
dispositionType,
diff --git a/libkpgp/kpgp.cpp b/libkpgp/kpgp.cpp
index d478d1999..ec80e6887 100644
--- a/libkpgp/kpgp.cpp
+++ b/libkpgp/kpgp.cpp
@@ -30,9 +30,9 @@
#include <sys/wait.h>
#include <signal.h>
-#include <qlabel.h>
-#include <qcursor.h>
-#include <qapplication.h>
+#include <tqlabel.h>
+#include <tqcursor.h>
+#include <tqapplication.h>
#include <kdebug.h>
#include <klocale.h>
@@ -200,14 +200,14 @@ Module::prepare( bool needPassPhrase, Block* block )
setPassPhrase( "dummy" );
}
else {
- QString ID;
+ TQString ID;
if( block )
ID = block->requiredUserId();
PassphraseDialog passdlg(0, i18n("OpenPGP Security Check"), true, ID);
- QApplication::setOverrideCursor( QCursor(QCursor::ArrowCursor) );
+ TQApplication::setOverrideCursor( TQCursor(TQCursor::ArrowCursor) );
int passdlgResult = passdlg.exec();
- QApplication::restoreOverrideCursor();
- if (passdlgResult == QDialog::Accepted) {
+ TQApplication::restoreOverrideCursor();
+ if (passdlgResult == TQDialog::Accepted) {
if (!setPassPhrase(passdlg.passphrase())) {
if (strlen(passdlg.passphrase()) >= 1024)
errMsg = i18n("Passphrase is too long, it must contain fewer than 1024 characters.");
@@ -281,13 +281,13 @@ Module::decrypt( Block& block )
// loop on bad passphrase
if( retval & BADPHRASE ) {
wipePassPhrase();
- QApplication::setOverrideCursor( QCursor(QCursor::ArrowCursor) );
+ TQApplication::setOverrideCursor( TQCursor(TQCursor::ArrowCursor) );
int ret = KMessageBox::warningContinueCancel(0,
i18n("You just entered an invalid passphrase.\n"
"Do you want to try again, or "
"cancel and view the message undecrypted?"),
i18n("PGP Warning"), i18n("&Retry"));
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
if ( ret == KMessageBox::Cancel ) break;
} else
break;
@@ -306,15 +306,15 @@ Module::decrypt( Block& block )
Kpgp::Result
Module::clearsign( Block& block,
- const KeyID& keyId, const QCString& charset )
+ const KeyID& keyId, const TQCString& charset )
{
- return encrypt( block, QStringList(), keyId, true, charset );
+ return encrypt( block, TQStringList(), keyId, true, charset );
}
Kpgp::Result
Module::encrypt( Block& block,
- const QStringList& receivers, const KeyID& keyId,
- bool sign, const QCString& charset )
+ const TQStringList& receivers, const KeyID& keyId,
+ bool sign, const TQCString& charset )
{
KeyIDList encryptionKeyIds; // list of keys which are used for encryption
int status = 0;
@@ -340,15 +340,15 @@ Module::encrypt( Block& block,
// check for bad passphrase
while( status & BADPHRASE ) {
wipePassPhrase();
- QString str = i18n("You entered an invalid passphrase.\n"
+ TQString str = i18n("You entered an invalid passphrase.\n"
"Do you want to try again, continue and leave the "
"message unsigned, or cancel sending the message?");
- QApplication::setOverrideCursor( QCursor(QCursor::ArrowCursor) );
+ TQApplication::setOverrideCursor( TQCursor(TQCursor::ArrowCursor) );
int ret = KMessageBox::warningYesNoCancel( 0, str,
i18n("PGP Warning"),
i18n("&Retry"),
i18n("Send &Unsigned") );
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
if( ret == KMessageBox::Cancel ) {
return Kpgp::Canceled;
}
@@ -368,15 +368,15 @@ Module::encrypt( Block& block,
// did signing fail?
if( status & ERR_SIGNING ) {
- QString str = i18n("%1 = 'signing failed' error message",
+ TQString str = i18n("%1 = 'signing failed' error message",
"%1\nDo you want to send the message unsigned, "
"or cancel sending the message?")
.arg( pgp->lastErrorMessage() );
- QApplication::setOverrideCursor( QCursor(QCursor::ArrowCursor) );
+ TQApplication::setOverrideCursor( TQCursor(TQCursor::ArrowCursor) );
int ret = KMessageBox::warningContinueCancel( 0, str,
i18n("PGP Warning"),
i18n("Send &Unsigned") );
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
if( ret == KMessageBox::Cancel ) {
return Kpgp::Canceled;
}
@@ -386,17 +386,17 @@ Module::encrypt( Block& block,
// check for bad keys
if( status & BADKEYS ) {
- QString str = i18n("%1 = 'bad keys' error message",
+ TQString str = i18n("%1 = 'bad keys' error message",
"%1\nDo you want to encrypt anyway, leave the "
"message as-is, or cancel sending the message?")
.arg( pgp->lastErrorMessage() );
- QApplication::setOverrideCursor( QCursor(QCursor::ArrowCursor) );
+ TQApplication::setOverrideCursor( TQCursor(TQCursor::ArrowCursor) );
int ret = KMessageBox::warningYesNoCancel( 0, str,
i18n("PGP Warning"),
i18n("Send &Encrypted"),
i18n("Send &Unencrypted") );
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
if( ret == KMessageBox::Cancel ) {
return Kpgp::Canceled;
}
@@ -413,15 +413,15 @@ Module::encrypt( Block& block,
}
if( status & MISSINGKEY ) {
- QString str = i18n("%1 = 'missing keys' error message",
+ TQString str = i18n("%1 = 'missing keys' error message",
"%1\nDo you want to leave the message as-is, "
"or cancel sending the message?")
.arg( pgp->lastErrorMessage() );
- QApplication::setOverrideCursor( QCursor(QCursor::ArrowCursor) );
+ TQApplication::setOverrideCursor( TQCursor(TQCursor::ArrowCursor) );
int ret = KMessageBox::warningContinueCancel( 0, str,
i18n("PGP Warning"),
i18n("&Send As-Is") );
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
if( ret == KMessageBox::Cancel ) {
return Kpgp::Canceled;
}
@@ -433,23 +433,23 @@ Module::encrypt( Block& block,
// show error dialog
errMsg = i18n( "The following error occurred:\n%1" )
.arg( pgp->lastErrorMessage() );
- QString details = i18n( "This is the error message of %1:\n%2" )
+ TQString details = i18n( "This is the error message of %1:\n%2" )
.arg( ( pgpType == tGPG ) ? "GnuPG" : "PGP" )
.arg( block.error().data() );
- QApplication::setOverrideCursor( QCursor(QCursor::ArrowCursor) );
+ TQApplication::setOverrideCursor( TQCursor(TQCursor::ArrowCursor) );
KMessageBox::detailedSorry( 0, errMsg, details );
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
return Kpgp::Failure;
}
if( showCipherText() ) {
// show cipher text dialog
CipherTextDialog *cipherTextDlg = new CipherTextDialog( block.text(), charset );
- QApplication::setOverrideCursor( QCursor(QCursor::ArrowCursor) );
- bool result = ( cipherTextDlg->exec() == QDialog::Accepted );
- QApplication::restoreOverrideCursor();
+ TQApplication::setOverrideCursor( TQCursor(TQCursor::ArrowCursor) );
+ bool result = ( cipherTextDlg->exec() == TQDialog::Accepted );
+ TQApplication::restoreOverrideCursor();
delete cipherTextDlg;
- return result == QDialog::Accepted ? Kpgp::Ok : Kpgp::Canceled;
+ return result == TQDialog::Accepted ? Kpgp::Ok : Kpgp::Canceled;
}
return Kpgp::Ok;
}
@@ -487,7 +487,7 @@ Module::doEncSign( Block& block,
Kpgp::Result
Module::getEncryptionKeys( KeyIDList& encryptionKeyIds,
- const QStringList& recipients,
+ const TQStringList& recipients,
const KeyID& keyId )
{
if( recipients.empty() ) {
@@ -497,7 +497,7 @@ Module::getEncryptionKeys( KeyIDList& encryptionKeyIds,
// list of lists of encryption keys (one list per recipient + one list
// for the sender)
- QValueVector<KeyIDList> recipientKeyIds( recipients.count() + 1 );
+ TQValueVector<KeyIDList> recipientKeyIds( recipients.count() + 1 );
// add the sender's encryption key(s) to the list of recipient key IDs
if( encryptToSelf() ) {
recipientKeyIds[0] = KeyIDList( keyId );
@@ -507,7 +507,7 @@ Module::getEncryptionKeys( KeyIDList& encryptionKeyIds,
}
bool showKeysForApproval = false;
int i = 1;
- for( QStringList::ConstIterator it = recipients.begin();
+ for( TQStringList::ConstIterator it = recipients.begin();
it != recipients.end(); ++it, ++i ) {
EncryptPref encrPref = encryptionPreference( *it );
if( ( encrPref == UnknownEncryptPref ) || ( encrPref == NeverEncrypt ) )
@@ -521,7 +521,7 @@ Module::getEncryptionKeys( KeyIDList& encryptionKeyIds,
}
kdDebug(5100) << "recipientKeyIds = (\n";
- QValueVector<KeyIDList>::const_iterator kit;
+ TQValueVector<KeyIDList>::const_iterator kit;
for( kit = recipientKeyIds.begin(); kit != recipientKeyIds.end(); ++kit ) {
kdDebug(5100) << "( 0x" << (*kit).toStringList().join( ", 0x" )
<< " ),\n";
@@ -542,21 +542,21 @@ Module::getEncryptionKeys( KeyIDList& encryptionKeyIds,
// show the recipients <-> key relation
KeyApprovalDialog dlg( recipients, recipientKeyIds, allowedKeys );
- QApplication::setOverrideCursor( QCursor(QCursor::ArrowCursor) );
+ TQApplication::setOverrideCursor( TQCursor(TQCursor::ArrowCursor) );
int ret = dlg.exec();
- if( ret == QDialog::Rejected ) {
- QApplication::restoreOverrideCursor();
+ if( ret == TQDialog::Rejected ) {
+ TQApplication::restoreOverrideCursor();
return Kpgp::Canceled;
}
recipientKeyIds = dlg.keys();
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
}
// flatten the list of lists of key IDs and count empty key ID lists
unsigned int emptyListCount = 0;
- for( QValueVector<KeyIDList>::const_iterator it = recipientKeyIds.begin();
+ for( TQValueVector<KeyIDList>::const_iterator it = recipientKeyIds.begin();
it != recipientKeyIds.end(); ++it ) {
if( (*it).isEmpty() ) {
// only count empty key ID lists for the recipients
@@ -577,18 +577,18 @@ Module::getEncryptionKeys( KeyIDList& encryptionKeyIds,
// show a warning if the user didn't select an encryption key for
// some of the recipients
if( recipientKeyIds.size() == emptyListCount + 1 ) { // (+1 because of the sender's key)
- QString str = ( recipients.count() == 1 )
+ TQString str = ( recipients.count() == 1 )
? i18n("You did not select an encryption key for the "
"recipient of this message; therefore, the message "
"will not be encrypted.")
: i18n("You did not select an encryption key for any of the "
"recipients of this message; therefore, the message "
"will not be encrypted.");
- QApplication::setOverrideCursor( QCursor(QCursor::ArrowCursor) );
+ TQApplication::setOverrideCursor( TQCursor(TQCursor::ArrowCursor) );
int ret = KMessageBox::warningContinueCancel( 0, str,
i18n("PGP Warning"),
i18n("Send &Unencrypted") );
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
if( ret == KMessageBox::Cancel ) {
return Kpgp::Canceled;
}
@@ -596,19 +596,19 @@ Module::getEncryptionKeys( KeyIDList& encryptionKeyIds,
encryptionKeyIds.clear();
}
else if( emptyListCount > 0 ) {
- QString str = ( emptyListCount == 1 )
+ TQString str = ( emptyListCount == 1 )
? i18n("You did not select an encryption key for one of "
"the recipients; this person will not be able to "
"decrypt the message if you encrypt it.")
: i18n("You did not select encryption keys for some of "
"the recipients; these persons will not be able to "
"decrypt the message if you encrypt it." );
- QApplication::setOverrideCursor( QCursor(QCursor::ArrowCursor) );
+ TQApplication::setOverrideCursor( TQCursor(TQCursor::ArrowCursor) );
int ret = KMessageBox::warningYesNoCancel( 0, str,
i18n("PGP Warning"),
i18n("Send &Encrypted"),
i18n("Send &Unencrypted") );
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
if( ret == KMessageBox::Cancel ) {
return Kpgp::Canceled;
}
@@ -622,7 +622,7 @@ Module::getEncryptionKeys( KeyIDList& encryptionKeyIds,
}
int
-Module::encryptionPossible( const QStringList& recipients )
+Module::encryptionPossible( const TQStringList& recipients )
{
if( 0 == pgp ) assignPGPBase();
@@ -634,7 +634,7 @@ Module::encryptionPossible( const QStringList& recipients )
int noKey = 0, never = 0, unknown = 0, always = 0, aip = 0, ask = 0,
askwp = 0;
- for( QStringList::ConstIterator it = recipients.begin();
+ for( TQStringList::ConstIterator it = recipients.begin();
it != recipients.end(); ++it) {
if( haveTrustedEncryptionKey( *it ) ) {
EncryptPref encrPref = encryptionPreference( *it );
@@ -739,7 +739,7 @@ Module::publicKey(const KeyID& keyID)
}
Key*
-Module::publicKey( const QString& userID )
+Module::publicKey( const TQString& userID )
{
readPublicKeys();
@@ -779,7 +779,7 @@ Module::keyTrust( const KeyID& keyID )
}
Validity
-Module::keyTrust( const QString& userID )
+Module::keyTrust( const TQString& userID )
{
Key *key = publicKey( userID );
@@ -910,8 +910,8 @@ Module::showCipherText(void) const
}
KeyID
-Module::selectSecretKey( const QString& title,
- const QString& text,
+Module::selectSecretKey( const TQString& title,
+ const TQString& text,
const KeyID& keyId )
{
if( 0 == pgp ) {
@@ -929,10 +929,10 @@ Module::selectSecretKey( const QString& title,
}
KeyID
-Module::selectPublicKey( const QString& title,
- const QString& text /* = QString::null */,
+Module::selectPublicKey( const TQString& title,
+ const TQString& text /* = TQString::null */,
const KeyID& oldKeyId /* = KeyID() */,
- const QString& address /* = QString::null */,
+ const TQString& address /* = TQString::null */,
const unsigned int allowedKeys /* = AllKeys */ )
{
if( 0 == pgp ) {
@@ -965,10 +965,10 @@ Module::selectPublicKey( const QString& title,
KeyIDList
-Module::selectPublicKeys( const QString& title,
- const QString& text /* = QString::null */,
+Module::selectPublicKeys( const TQString& title,
+ const TQString& text /* = TQString::null */,
const KeyIDList& oldKeyIds /* = KeyIDList() */,
- const QString& address /* = QString::null */,
+ const TQString& address /* = TQString::null */,
const unsigned int allowedKeys /* = AllKeys */ )
{
if( 0 == pgp ) {
@@ -1021,9 +1021,9 @@ Module::getConfig()
bool
-Module::prepareMessageForDecryption( const QCString& msg,
- QPtrList<Block>& pgpBlocks,
- QStrList& nonPgpBlocks )
+Module::prepareMessageForDecryption( const TQCString& msg,
+ TQPtrList<Block>& pgpBlocks,
+ TQStrList& nonPgpBlocks )
{
BlockType pgpBlock = NoPgpBlock;
int start = -1; // start of the current PGP block
@@ -1104,7 +1104,7 @@ Module::prepareMessageForDecryption( const QCString& msg,
// --------------------- private functions -------------------
bool
-Module::haveTrustedEncryptionKey( const QString& person )
+Module::haveTrustedEncryptionKey( const TQString& person )
{
if( 0 == pgp ) assignPGPBase();
@@ -1112,7 +1112,7 @@ Module::haveTrustedEncryptionKey( const QString& person )
readPublicKeys();
- QString address = canonicalAddress( person ).lower();
+ TQString address = canonicalAddress( person ).lower();
// First look for this person's address in the address data dictionary
KeyIDList keyIds = keysForAddress( address );
@@ -1164,7 +1164,7 @@ Module::haveTrustedEncryptionKey( const QString& person )
}
KeyIDList
-Module::getEncryptionKeys( const QString& person )
+Module::getEncryptionKeys( const TQString& person )
{
if( 0 == pgp ) assignPGPBase();
@@ -1172,7 +1172,7 @@ Module::getEncryptionKeys( const QString& person )
readPublicKeys();
- QString address = canonicalAddress( person ).lower();
+ TQString address = canonicalAddress( person ).lower();
// #### FIXME: Until we support encryption with untrusted keys only
// #### trusted keys are allowed
@@ -1325,8 +1325,8 @@ bool
Module::checkForPGP(void)
{
// get path
- QCString path;
- QStrList pSearchPaths;
+ TQCString path;
+ TQStrList pSearchPaths;
int index = 0;
int lastindex = -1;
@@ -1341,7 +1341,7 @@ Module::checkForPGP(void)
if(lastindex != (int)path.length() - 1)
pSearchPaths.append( path.mid(lastindex+1,path.length()-lastindex) );
- QStrListIterator it(pSearchPaths);
+ TQStrListIterator it(pSearchPaths);
haveGpg=FALSE;
// lets try gpg
@@ -1479,11 +1479,11 @@ Module::assignPGPBase(void)
}
QString
-Module::canonicalAddress( const QString& _adress )
+Module::canonicalAddress( const TQString& _adress )
{
int index,index2;
- QString address = _adress.simplifyWhiteSpace();
+ TQString address = _adress.simplifyWhiteSpace();
address = address.stripWhiteSpace();
// just leave pure e-mail address.
@@ -1597,8 +1597,8 @@ Module::readSecretKeys( bool reread )
KeyID
Module::selectKey( const KeyList& keys,
- const QString& title,
- const QString& text /* = QString::null */ ,
+ const TQString& title,
+ const TQString& text /* = TQString::null */ ,
const KeyID& keyId /* = KeyID() */ ,
const unsigned int allowedKeys /* = AllKeys */ )
{
@@ -1607,9 +1607,9 @@ Module::selectKey( const KeyList& keys,
KeySelectionDialog dlg( keys, title, text, KeyIDList( keyId ), false,
allowedKeys, false );
- QApplication::setOverrideCursor( QCursor(QCursor::ArrowCursor) );
- bool rej = ( dlg.exec() == QDialog::Rejected );
- QApplication::restoreOverrideCursor();
+ TQApplication::setOverrideCursor( TQCursor(TQCursor::ArrowCursor) );
+ bool rej = ( dlg.exec() == TQDialog::Rejected );
+ TQApplication::restoreOverrideCursor();
if( !rej ) {
retval = dlg.key();
@@ -1620,8 +1620,8 @@ Module::selectKey( const KeyList& keys,
KeyIDList
Module::selectKeys( const KeyList& keys,
- const QString& title,
- const QString& text /* = QString::null */ ,
+ const TQString& title,
+ const TQString& text /* = TQString::null */ ,
const KeyIDList& keyIds /* = KeyIDList() */ ,
const unsigned int allowedKeys /* = AllKeys */ )
{
@@ -1630,9 +1630,9 @@ Module::selectKeys( const KeyList& keys,
KeySelectionDialog dlg( keys, title, text, keyIds, false, allowedKeys,
true );
- QApplication::setOverrideCursor( QCursor(QCursor::ArrowCursor) );
- bool rej = ( dlg.exec() == QDialog::Rejected );
- QApplication::restoreOverrideCursor();
+ TQApplication::setOverrideCursor( TQCursor(TQCursor::ArrowCursor) );
+ bool rej = ( dlg.exec() == TQDialog::Rejected );
+ TQApplication::restoreOverrideCursor();
if( !rej ) {
retval = dlg.keys();
@@ -1645,8 +1645,8 @@ Module::selectKeys( const KeyList& keys,
KeyID
Module::selectKey( bool& rememberChoice,
const KeyList& keys,
- const QString& title,
- const QString& text /* = QString::null */ ,
+ const TQString& title,
+ const TQString& text /* = TQString::null */ ,
const KeyID& keyId /* = KeyID() */ ,
const unsigned int allowedKeys /* = AllKeys */ )
{
@@ -1655,9 +1655,9 @@ Module::selectKey( bool& rememberChoice,
KeySelectionDialog dlg( keys, title, text, KeyIDList( keyId ), false,
allowedKeys, false );
- QApplication::setOverrideCursor( QCursor(QCursor::ArrowCursor) );
- bool rej = ( dlg.exec() == QDialog::Rejected );
- QApplication::restoreOverrideCursor();
+ TQApplication::setOverrideCursor( TQCursor(TQCursor::ArrowCursor) );
+ bool rej = ( dlg.exec() == TQDialog::Rejected );
+ TQApplication::restoreOverrideCursor();
if( !rej ) {
retval = dlg.key();
@@ -1673,8 +1673,8 @@ Module::selectKey( bool& rememberChoice,
KeyIDList
Module::selectKeys( bool& rememberChoice,
const KeyList& keys,
- const QString& title,
- const QString& text /* = QString::null */ ,
+ const TQString& title,
+ const TQString& text /* = TQString::null */ ,
const KeyIDList& keyIds /* = KeyIDList() */ ,
const unsigned int allowedKeys /* = AllKeys */ )
{
@@ -1683,9 +1683,9 @@ Module::selectKeys( bool& rememberChoice,
KeySelectionDialog dlg( keys, title, text, keyIds, true, allowedKeys,
true );
- QApplication::setOverrideCursor( QCursor(QCursor::ArrowCursor) );
- bool rej = ( dlg.exec() == QDialog::Rejected );
- QApplication::restoreOverrideCursor();
+ TQApplication::setOverrideCursor( TQCursor(TQCursor::ArrowCursor) );
+ bool rej = ( dlg.exec() == TQDialog::Rejected );
+ TQApplication::restoreOverrideCursor();
if( !rej ) {
retval = dlg.keys();
@@ -1699,12 +1699,12 @@ Module::selectKeys( bool& rememberChoice,
}
KeyIDList
-Module::keysForAddress( const QString& address )
+Module::keysForAddress( const TQString& address )
{
if( address.isEmpty() ) {
return KeyIDList();
}
- QString addr = canonicalAddress( address ).lower();
+ TQString addr = canonicalAddress( address ).lower();
if( addressDataDict.contains( addr ) ) {
return addressDataDict[addr].keyIds;
}
@@ -1714,12 +1714,12 @@ Module::keysForAddress( const QString& address )
}
void
-Module::setKeysForAddress( const QString& address, const KeyIDList& keyIds )
+Module::setKeysForAddress( const TQString& address, const KeyIDList& keyIds )
{
if( address.isEmpty() ) {
return;
}
- QString addr = canonicalAddress( address ).lower();
+ TQString addr = canonicalAddress( address ).lower();
if( addressDataDict.contains( addr ) ) {
addressDataDict[addr].keyIds = keyIds;
}
@@ -1736,7 +1736,7 @@ Module::setKeysForAddress( const QString& address, const KeyIDList& keyIds )
void
Module::readAddressData()
{
- QString address;
+ TQString address;
AddressData data;
KConfigGroup general( config, "General" );
@@ -1744,7 +1744,7 @@ Module::readAddressData()
addressDataDict.clear();
for( int i=1; i<=num; i++ ) {
- KConfigGroup addrGroup( config, QString("Address #%1").arg(i).local8Bit() );
+ KConfigGroup addrGroup( config, TQString("Address #%1").arg(i).local8Bit() );
address = addrGroup.readEntry( "Address" );
data.keyIds = KeyIDList::fromStringList( addrGroup.readListEntry( "Key IDs" ) );
data.encrPref = (EncryptPref) addrGroup.readNumEntry( "EncryptionPreference",
@@ -1769,7 +1769,7 @@ Module::writeAddressData()
for ( i=1, it = addressDataDict.begin();
it != addressDataDict.end();
++it, i++ ) {
- KConfigGroup addrGroup( config, QString("Address #%1").arg(i).local8Bit() );
+ KConfigGroup addrGroup( config, TQString("Address #%1").arg(i).local8Bit() );
addrGroup.writeEntry( "Address", it.key() );
addrGroup.writeEntry( "Key IDs", it.data().keyIds.toStringList() );
addrGroup.writeEntry( "EncryptionPreference", it.data().encrPref );
@@ -1779,9 +1779,9 @@ Module::writeAddressData()
}
EncryptPref
-Module::encryptionPreference( const QString& address )
+Module::encryptionPreference( const TQString& address )
{
- QString addr = canonicalAddress( address ).lower();
+ TQString addr = canonicalAddress( address ).lower();
if( addressDataDict.contains( addr ) ) {
return addressDataDict[addr].encrPref;
}
@@ -1791,13 +1791,13 @@ Module::encryptionPreference( const QString& address )
}
void
-Module::setEncryptionPreference( const QString& address,
+Module::setEncryptionPreference( const TQString& address,
const EncryptPref pref )
{
if( address.isEmpty() ) {
return;
}
- QString addr = canonicalAddress( address ).lower();
+ TQString addr = canonicalAddress( address ).lower();
if( addressDataDict.contains( addr ) ) {
addressDataDict[addr].encrPref = pref;
}
diff --git a/libkpgp/kpgp.h b/libkpgp/kpgp.h
index 9b3ade727..b96bb62dc 100644
--- a/libkpgp/kpgp.h
+++ b/libkpgp/kpgp.h
@@ -20,18 +20,18 @@
#define KPGP_H
#include <stdio.h>
-#include <qstring.h>
-#include <qstrlist.h>
-#include <qdialog.h>
-#include <qwidget.h>
-#include <qcombobox.h>
-#include <qlayout.h>
-#include <qpushbutton.h>
-#include <qlistview.h>
-#include <qbuttongroup.h>
-#include <qradiobutton.h>
-#include <qmultilineedit.h>
-#include <qcheckbox.h>
+#include <tqstring.h>
+#include <tqstrlist.h>
+#include <tqdialog.h>
+#include <tqwidget.h>
+#include <tqcombobox.h>
+#include <tqlayout.h>
+#include <tqpushbutton.h>
+#include <tqlistview.h>
+#include <tqbuttongroup.h>
+#include <tqradiobutton.h>
+#include <tqmultilineedit.h>
+#include <tqcheckbox.h>
#include <kdialogbase.h>
@@ -112,7 +112,7 @@ public:
Ok if everything is o.k.
*/
Kpgp::Result clearsign( Block& block,
- const KeyID& keyId, const QCString& charset = 0 );
+ const KeyID& keyId, const TQCString& charset = 0 );
/** encrypts the given OpenPGP block for a list of persons. if sign is true
then the block is clearsigned with the key corresponding to the given
@@ -123,8 +123,8 @@ public:
Ok if everything is o.k.
*/
Kpgp::Result encrypt( Block& block,
- const QStringList& receivers, const KeyID& keyId,
- bool sign, const QCString& charset = 0 );
+ const TQStringList& receivers, const KeyID& keyId,
+ bool sign, const TQCString& charset = 0 );
/** Determines the keys which should be used for encrypting the message
to the given list of recipients.
@@ -134,7 +134,7 @@ public:
Ok if everything is o.k.
*/
Kpgp::Result getEncryptionKeys( KeyIDList& encryptionKeyIds,
- const QStringList& recipients,
+ const TQStringList& recipients,
const KeyID& keyId );
/** checks if encrypting to the given list of persons is possible and
@@ -146,7 +146,7 @@ public:
2 if encryption is possible, but the user wants to be asked and
-1 if there is a conflict which can't be automatically resolved.
*/
- int encryptionPossible( const QStringList& recipients );
+ int encryptionPossible( const TQStringList& recipients );
protected:
int doEncSign( Block& block, const KeyIDList& recipientKeyIds, bool sign );
@@ -170,7 +170,7 @@ public:
void readSecretKeys( bool reread = false );
/** try to get an ascii armored key block for the given public key */
- QCString getAsciiPublicKey( const KeyID& keyID );
+ TQCString getAsciiPublicKey( const KeyID& keyID );
/** Returns the public key with the given key ID or null if no matching
key is found.
@@ -180,7 +180,7 @@ public:
/** Returns the first public key with the given user ID or null if no
matching key is found.
*/
- Key* publicKey( const QString& userID );
+ Key* publicKey( const TQString& userID );
/** Returns the secret key with the given key ID or null if no matching
key is found.
@@ -196,7 +196,7 @@ public:
one key have this user id then the first key with this user id will be
chosen.
*/
- Validity keyTrust( const QString& userID );
+ Validity keyTrust( const TQString& userID );
/** Returns TRUE if the given key is at least trusted marginally. Otherwise
FALSE is returned.
@@ -234,7 +234,7 @@ public:
void clear(const bool erasePassPhrase = FALSE);
/** returns the last error that occurred */
- const QString lastErrorMsg(void) const;
+ const TQString lastErrorMsg(void) const;
// what version of PGP/GPG should we use
enum PGPType { tAuto, tGPG, tPGP2, tPGP5, tPGP6, tOff } pgpType;
@@ -257,8 +257,8 @@ public:
and the (optional) text. If <em>keyId</em> is given, then the
corresponding key is selected.
*/
- KeyID selectSecretKey( const QString& title,
- const QString& text = QString::null,
+ KeyID selectSecretKey( const TQString& title,
+ const TQString& text = TQString::null,
const KeyID& keyId = KeyID() );
/** Shows a key selection dialog with all public keys and the given title
@@ -267,10 +267,10 @@ public:
chosen key will be stored (if the user wants it to be stored).
<em>mode</em> specifies which keys can be selected.
*/
- KeyID selectPublicKey( const QString& title,
- const QString& text = QString::null,
+ KeyID selectPublicKey( const TQString& title,
+ const TQString& text = TQString::null,
const KeyID& oldKeyId = KeyID(),
- const QString& address = QString::null,
+ const TQString& address = TQString::null,
const unsigned int allowedKeys = AllKeys );
/** Shows a key selection dialog with all public keys and the given title
@@ -279,10 +279,10 @@ public:
chosen key will be stored (if the user wants it to be stored).
<em>mode</em> specifies which keys can be selected.
*/
- KeyIDList selectPublicKeys( const QString& title,
- const QString& text = QString::null,
+ KeyIDList selectPublicKeys( const TQString& title,
+ const TQString& text = TQString::null,
const KeyIDList& oldKeyIds = KeyIDList(),
- const QString& address = QString::null,
+ const TQString& address = TQString::null,
const unsigned int allowedKeys = AllKeys );
// FIXME: key management
@@ -290,12 +290,12 @@ public:
/** Reads the encryption preference for the given address
from the config file.
*/
- EncryptPref encryptionPreference( const QString& address );
+ EncryptPref encryptionPreference( const TQString& address );
/** Writes the given encryption preference for the given address
to the config file.
*/
- void setEncryptionPreference( const QString& address,
+ void setEncryptionPreference( const TQString& address,
const EncryptPref pref );
// -- static member functions --------------------------------------------
@@ -320,16 +320,16 @@ public:
(n+1)-th Non-OpenPGP block
</pre>
*/
- static bool prepareMessageForDecryption( const QCString& msg,
- QPtrList<Block>& pgpBlocks,
- QStrList& nonPgpBlocks );
+ static bool prepareMessageForDecryption( const TQCString& msg,
+ TQPtrList<Block>& pgpBlocks,
+ TQStrList& nonPgpBlocks );
private:
/** check if we have a trusted encryption key for the given person */
- bool haveTrustedEncryptionKey( const QString& person );
+ bool haveTrustedEncryptionKey( const TQString& person );
/** get a list of encryption keys to be used for the given recipient */
- KeyIDList getEncryptionKeys( const QString& person );
+ KeyIDList getEncryptionKeys( const TQString& person );
/** Set pass phrase */
bool setPassPhrase(const char* pass);
@@ -350,21 +350,21 @@ private:
void wipePassPhrase(bool free=false);
// transform an address into canonical form
- QString canonicalAddress( const QString& person );
+ TQString canonicalAddress( const TQString& person );
/** Shows a dialog to let the user select a key from the given list of keys
*/
KeyID selectKey( const KeyList& keys,
- const QString& title,
- const QString& text = QString::null,
+ const TQString& title,
+ const TQString& text = TQString::null,
const KeyID& keyId = KeyID(),
const unsigned int allowedKeys = AllKeys );
/** Shows a dialog to let the user select a key from the given list of keys
*/
KeyIDList selectKeys( const KeyList& keys,
- const QString& title,
- const QString& text = QString::null,
+ const TQString& title,
+ const TQString& text = TQString::null,
const KeyIDList& keyIds = KeyIDList(),
const unsigned int allowedKeys = AllKeys );
@@ -374,8 +374,8 @@ private:
*/
KeyID selectKey( bool& rememberChoice,
const KeyList& keys,
- const QString& title,
- const QString& text = QString::null,
+ const TQString& title,
+ const TQString& text = TQString::null,
const KeyID& keyId = KeyID(),
const unsigned int allowedKeys = AllKeys );
@@ -385,22 +385,22 @@ private:
*/
KeyIDList selectKeys( bool& rememberChoice,
const KeyList& keys,
- const QString& title,
- const QString& text = QString::null,
+ const TQString& title,
+ const TQString& text = TQString::null,
const KeyIDList& keyIds = KeyIDList(),
const unsigned int allowedKeys = AllKeys );
/** Returns the OpenPGP keys which should be used for encryption to the
given address.
*/
- KeyIDList keysForAddress( const QString& address );
+ KeyIDList keysForAddress( const TQString& address );
/** Set an email address -> list of OpenPGP keys association.
*/
- void setKeysForAddress( const QString& address, const KeyIDList& keyIDs );
+ void setKeysForAddress( const TQString& address, const KeyIDList& keyIDs );
/** Remove an email address -> OpenPGP key association. */
- void removeKeyForAddress( const QString& address );
+ void removeKeyForAddress( const TQString& address );
/** Reads the email address -> OpenPGP key associations from the config
file.
@@ -422,7 +422,7 @@ private:
KeyIDList keyIds;
EncryptPref encrPref;
};
- typedef QMap<QString, AddressData> AddressDataDict;
+ typedef TQMap<TQString, AddressData> AddressDataDict;
AddressDataDict addressDataDict;
KeyList mPublicKeys;
@@ -434,7 +434,7 @@ private:
char * passphrase;
size_t passphrase_buffer_len;
- QString errMsg;
+ TQString errMsg;
KeyID pgpUser; // the key ID which is used to sign/encrypt to self
bool flagEncryptToSelf : 1;
diff --git a/libkpgp/kpgpbase.cpp b/libkpgp/kpgpbase.cpp
index 39762333d..fa444be7f 100644
--- a/libkpgp/kpgpbase.cpp
+++ b/libkpgp/kpgpbase.cpp
@@ -31,7 +31,7 @@
#include <sys/wait.h> /* waitpid */
#include <errno.h>
-#include <qapplication.h>
+#include <tqapplication.h>
namespace Kpgp {
@@ -50,10 +50,10 @@ Base::~Base()
void
Base::clear()
{
- input = QCString();
- output = QCString();
- error = QCString();
- errMsg = QString::null;
+ input = TQCString();
+ output = TQCString();
+ error = TQCString();
+ errMsg = TQString::null;
status = OK;
}
@@ -85,7 +85,7 @@ Base::run( const char *cmd, const char *passphrase, bool onlyReadFromPGP )
close(ppass[1]);
// tell pgp which fd to use for the passphrase
- QCString tmp;
+ TQCString tmp;
tmp.sprintf("%d",ppass[0]);
::setenv("PGPPASSFD",tmp.data(),1);
@@ -98,7 +98,7 @@ Base::run( const char *cmd, const char *passphrase, bool onlyReadFromPGP )
//Uncomment these lines for testing only! Doing so will decrease security!
kdDebug(5100) << "pgp cmd = " << cmd << endl;
- //kdDebug(5100) << "pgp input = " << QString(input)
+ //kdDebug(5100) << "pgp input = " << TQString(input)
// << "input length = " << input.length() << endl;
error = "";
@@ -108,7 +108,7 @@ Base::run( const char *cmd, const char *passphrase, bool onlyReadFromPGP )
pipe(pout);
pipe(perr);
- QApplication::flushX();
+ TQApplication::flushX();
if(!(child_pid = fork()))
{
/*We're the child.*/
@@ -362,7 +362,7 @@ Base::run( const char *cmd, const char *passphrase, bool onlyReadFromPGP )
}
//Uncomment these lines for testing only! Doing so will decrease security!
- //kdDebug(5100) << "pgp output = " << QString(output) << endl;
+ //kdDebug(5100) << "pgp output = " << TQString(output) << endl;
//kdDebug(5100) << "pgp error = " << error << endl;
/* Make the information visible, so that a user can
@@ -411,7 +411,7 @@ Base::runGpg( const char *cmd, const char *passphrase, bool onlyReadFromGnuPG )
//Uncomment these lines for testing only! Doing so will decrease security!
//kdDebug(5100) << "pgp cmd = " << cmd << endl;
- //kdDebug(5100) << "pgp input = " << QString(input)
+ //kdDebug(5100) << "pgp input = " << TQString(input)
// << "input length = " << input.length() << endl;
error = "";
@@ -448,7 +448,7 @@ Base::runGpg( const char *cmd, const char *passphrase, bool onlyReadFromGnuPG )
snprintf(gpgcmd, 1023, "LANGUAGE=C gpg %s",cmd);
}
- QApplication::flushX();
+ TQApplication::flushX();
if(!(child_pid = fork()))
{
/*We're the child.*/
@@ -655,7 +655,7 @@ Base::runGpg( const char *cmd, const char *passphrase, bool onlyReadFromGnuPG )
}
//Uncomment these lines for testing only! Doing so will decrease security!
- //kdDebug(5100) << "gpg stdout:\n" << QString(output) << endl;
+ //kdDebug(5100) << "gpg stdout:\n" << TQString(output) << endl;
// Make the information visible, so that a user can
// get to know what's going on during the gpg calls.
@@ -668,8 +668,8 @@ Base::runGpg( const char *cmd, const char *passphrase, bool onlyReadFromGnuPG )
QCString
Base::addUserId()
{
- QCString cmd;
- QCString pgpUser = Module::getKpgp()->user();
+ TQCString cmd;
+ TQCString pgpUser = Module::getKpgp()->user();
if(!pgpUser.isEmpty())
{
@@ -677,7 +677,7 @@ Base::addUserId()
cmd += pgpUser;
return cmd;
}
- return QCString();
+ return TQCString();
}
diff --git a/libkpgp/kpgpbase.h b/libkpgp/kpgpbase.h
index f0f1d190d..aaa389eb8 100644
--- a/libkpgp/kpgpbase.h
+++ b/libkpgp/kpgpbase.h
@@ -19,9 +19,9 @@
#ifndef KPGPBASE_H
#define KPGPBASE_H
-#include <qstring.h>
-#include <qcstring.h>
-#include <qstringlist.h>
+#include <tqstring.h>
+#include <tqcstring.h>
+#include <tqstringlist.h>
#include "kpgpkey.h"
#include "kpgpblock.h"
@@ -64,16 +64,16 @@ public:
{ return 0; }
/** Returns the list of public keys in the users public keyring. */
- virtual KeyList publicKeys( const QStringList & = QStringList() )
+ virtual KeyList publicKeys( const TQStringList & = TQStringList() )
{ return KeyList(); }
/** Returns the list of secret keys in the users secret keyring. */
- virtual KeyList secretKeys( const QStringList & = QStringList() )
+ virtual KeyList secretKeys( const TQStringList & = TQStringList() )
{ return KeyList(); }
/** Returns the ascii armored data of the public key with the
given key id. */
- virtual QCString getAsciiPublicKey(const KeyID& ) { return QCString(); }
+ virtual TQCString getAsciiPublicKey(const KeyID& ) { return TQCString(); }
/** Signs the given key with the currently set user key. This is currently
not implemented. */
@@ -82,7 +82,7 @@ public:
/** Returns an error message if an error occurred during the last
operation. */
- virtual QString lastErrorMessage() const;
+ virtual TQString lastErrorMessage() const;
protected:
@@ -92,14 +92,14 @@ protected:
bool onlyReadFromGnuPG = false );
virtual void clear();
- QCString addUserId();
+ TQCString addUserId();
- QCString input;
- QCString output;
- QCString error;
- QString errMsg;
+ TQCString input;
+ TQCString output;
+ TQCString error;
+ TQString errMsg;
- QCString mVersion;
+ TQCString mVersion;
int status;
@@ -124,19 +124,19 @@ public:
virtual Key* readPublicKey( const KeyID& keyID,
const bool readTrust = false,
Key* key = 0 );
- virtual KeyList publicKeys( const QStringList & patterns = QStringList() );
- virtual KeyList secretKeys( const QStringList & patterns = QStringList() );
- virtual QCString getAsciiPublicKey( const KeyID& keyID );
+ virtual KeyList publicKeys( const TQStringList & patterns = TQStringList() );
+ virtual KeyList secretKeys( const TQStringList & patterns = TQStringList() );
+ virtual TQCString getAsciiPublicKey( const KeyID& keyID );
virtual int signKey( const KeyID& keyID, const char *passphrase );
protected:
- KeyList doGetPublicKeys( const QCString & cmd,
- const QStringList & patterns );
- virtual KeyList parseKeyList( const QCString&, bool );
+ KeyList doGetPublicKeys( const TQCString & cmd,
+ const TQStringList & patterns );
+ virtual KeyList parseKeyList( const TQCString&, bool );
private:
- Key* parsePublicKeyData( const QCString& output, Key* key = 0 );
- void parseTrustDataForKey( Key* key, const QCString& str );
+ Key* parsePublicKeyData( const TQCString& output, Key* key = 0 );
+ void parseTrustDataForKey( Key* key, const TQCString& str );
};
class BaseG : public Base
@@ -156,14 +156,14 @@ public:
virtual Key* readPublicKey( const KeyID& keyID,
const bool readTrust = false,
Key* key = 0 );
- virtual KeyList publicKeys( const QStringList & patterns = QStringList() );
- virtual KeyList secretKeys( const QStringList & patterns = QStringList() );
- virtual QCString getAsciiPublicKey( const KeyID& keyID );
+ virtual KeyList publicKeys( const TQStringList & patterns = TQStringList() );
+ virtual KeyList secretKeys( const TQStringList & patterns = TQStringList() );
+ virtual TQCString getAsciiPublicKey( const KeyID& keyID );
virtual int signKey( const KeyID& keyID, const char *passphrase );
private:
- Key* parseKeyData( const QCString& output, int& offset, Key* key = 0 );
- KeyList parseKeyList( const QCString&, bool );
+ Key* parseKeyData( const TQCString& output, int& offset, Key* key = 0 );
+ KeyList parseKeyList( const TQCString&, bool );
};
@@ -184,16 +184,16 @@ public:
virtual Key* readPublicKey( const KeyID& keyID,
const bool readTrust = false,
Key* key = 0 );
- virtual KeyList publicKeys( const QStringList & patterns = QStringList() );
- virtual KeyList secretKeys( const QStringList & patterns = QStringList() );
- virtual QCString getAsciiPublicKey( const KeyID& keyID );
+ virtual KeyList publicKeys( const TQStringList & patterns = TQStringList() );
+ virtual KeyList secretKeys( const TQStringList & patterns = TQStringList() );
+ virtual TQCString getAsciiPublicKey( const KeyID& keyID );
virtual int signKey( const KeyID& keyID, const char *passphrase );
private:
- Key* parseKeyData( const QCString& output, int& offset, Key* key = 0 );
- Key* parseSingleKey( const QCString& output, Key* key = 0 );
- KeyList parseKeyList( const QCString& output, bool );
- void parseTrustDataForKey( Key* key, const QCString& str );
+ Key* parseKeyData( const TQCString& output, int& offset, Key* key = 0 );
+ Key* parseSingleKey( const TQCString& output, Key* key = 0 );
+ KeyList parseKeyList( const TQCString& output, bool );
+ void parseTrustDataForKey( Key* key, const TQCString& str );
};
@@ -210,18 +210,18 @@ public:
virtual Key* readPublicKey( const KeyID& keyID,
const bool readTrust = false,
Key* key = 0 );
- virtual KeyList publicKeys( const QStringList & patterns = QStringList() );
- virtual KeyList secretKeys( const QStringList & patterns = QStringList() );
+ virtual KeyList publicKeys( const TQStringList & patterns = TQStringList() );
+ virtual KeyList secretKeys( const TQStringList & patterns = TQStringList() );
virtual int isVersion6();
protected:
- virtual KeyList parseKeyList( const QCString &, bool );
+ virtual KeyList parseKeyList( const TQCString &, bool );
private:
- Key* parseKeyData( const QCString& output, int& offset, Key* key = 0 );
- Key* parseSingleKey( const QCString& output, Key* key = 0 );
- void parseTrustDataForKey( Key* key, const QCString& str );
+ Key* parseKeyData( const TQCString& output, int& offset, Key* key = 0 );
+ Key* parseSingleKey( const TQCString& output, Key* key = 0 );
+ void parseTrustDataForKey( Key* key, const TQCString& str );
};
// ---------------------------------------------------------------------------
diff --git a/libkpgp/kpgpbase2.cpp b/libkpgp/kpgpbase2.cpp
index c4fd0358f..301470b76 100644
--- a/libkpgp/kpgpbase2.cpp
+++ b/libkpgp/kpgpbase2.cpp
@@ -26,7 +26,7 @@
#include <string.h> /* strncmp */
#include <assert.h>
-#include <qdatetime.h>
+#include <tqdatetime.h>
#include <klocale.h>
#include <kprocess.h>
@@ -65,7 +65,7 @@ int
Base2::encsign( Block& block, const KeyIDList& recipients,
const char *passphrase )
{
- QCString cmd;
+ TQCString cmd;
int exitStatus = 0;
if(!recipients.isEmpty() && passphrase != 0)
@@ -117,7 +117,7 @@ Base2::encsign( Block& block, const KeyIDList& recipients,
int index = 0;
bool bad = FALSE;
unsigned int num = 0;
- QCString badkeys = "";
+ TQCString badkeys = "";
if (error.find("Cannot find the public key") != -1)
{
index = 0;
@@ -323,7 +323,7 @@ Base2::decrypt( Block& block, const char *passphrase )
mRecipients.clear();
while( (index2 = error.find('\n',index+1)) <= end )
{
- QCString item = error.mid(index+1,index2-index-1);
+ TQCString item = error.mid(index+1,index2-index-1);
item.stripWhiteSpace();
mRecipients.append(item);
index = index2;
@@ -421,7 +421,7 @@ Base2::decrypt( Block& block, const char *passphrase )
status |= GOODSIG;
int index3 = error.find("Key ID ", index2) + 7;
block.setSignatureKeyId( error.mid(index3,8) );
- block.setSignatureUserId( QString::null );
+ block.setSignatureUserId( TQString::null );
}
else if( (index2 = error.find("Good signature from", index)) != -1 )
{
@@ -503,14 +503,14 @@ Base2::readPublicKey( const KeyID& keyID,
KeyList
-Base2::publicKeys( const QStringList & patterns )
+Base2::publicKeys( const TQStringList & patterns )
{
return doGetPublicKeys( PGP2 " +batchmode +language=en +verbose=0 -kvc -f",
patterns );
}
KeyList
-Base2::doGetPublicKeys( const QCString & cmd, const QStringList & patterns )
+Base2::doGetPublicKeys( const TQCString & cmd, const TQStringList & patterns )
{
int exitStatus = 0;
KeyList publicKeys;
@@ -528,10 +528,10 @@ Base2::doGetPublicKeys( const QCString & cmd, const QStringList & patterns )
publicKeys = parseKeyList( output, false );
}
else {
- typedef QMap<QCString, Key*> KeyMap;
+ typedef TQMap<TQCString, Key*> KeyMap;
KeyMap map;
- for ( QStringList::ConstIterator it = patterns.begin();
+ for ( TQStringList::ConstIterator it = patterns.begin();
it != patterns.end(); ++it ) {
exitStatus = run( cmd + " " + KProcess::quote( *it ).local8Bit(),
0, true );
@@ -566,7 +566,7 @@ Base2::doGetPublicKeys( const QCString & cmd, const QStringList & patterns )
}
KeyList
-Base2::secretKeys( const QStringList & patterns )
+Base2::secretKeys( const TQStringList & patterns )
{
return publicKeys( patterns );
}
@@ -575,7 +575,7 @@ Base2::secretKeys( const QStringList & patterns )
int
Base2::signKey(const KeyID& keyID, const char *passphrase)
{
- QCString cmd;
+ TQCString cmd;
int exitStatus = 0;
cmd = PGP2 " +batchmode +language=en -ks -f ";
@@ -592,12 +592,12 @@ Base2::signKey(const KeyID& keyID, const char *passphrase)
}
-QCString Base2::getAsciiPublicKey(const KeyID& keyID)
+TQCString Base2::getAsciiPublicKey(const KeyID& keyID)
{
int exitStatus = 0;
if (keyID.isEmpty())
- return QCString();
+ return TQCString();
status = 0;
exitStatus = run( PGP2 " +batchmode +force +language=en -kxaf 0x" + keyID,
@@ -605,7 +605,7 @@ QCString Base2::getAsciiPublicKey(const KeyID& keyID)
if(exitStatus != 0) {
status = ERROR;
- return QCString();
+ return TQCString();
}
return output;
@@ -613,7 +613,7 @@ QCString Base2::getAsciiPublicKey(const KeyID& keyID)
Key*
-Base2::parsePublicKeyData( const QCString& output, Key* key /* = 0 */ )
+Base2::parsePublicKeyData( const TQCString& output, Key* key /* = 0 */ )
{
Subkey *subkey = 0;
int index;
@@ -715,8 +715,8 @@ Base2::parsePublicKeyData( const QCString& output, Key* key /* = 0 */ )
int year = output.mid( pos, 4 ).toInt();
int month = output.mid( pos+5, 2 ).toInt();
int day = output.mid( pos+8, 2 ).toInt();
- QDateTime dt( QDate( year, month, day ), QTime( 00, 00 ) );
- QDateTime epoch( QDate( 1970, 01, 01 ), QTime( 00, 00 ) );
+ TQDateTime dt( TQDate( year, month, day ), TQTime( 00, 00 ) );
+ TQDateTime epoch( TQDate( 1970, 01, 01 ), TQTime( 00, 00 ) );
// The calculated creation date isn't exactly correct because QDateTime
// doesn't know anything about timezones and always assumes local time
// although epoch is of course UTC. But as PGP 2 anyway doesn't print
@@ -727,7 +727,7 @@ Base2::parsePublicKeyData( const QCString& output, Key* key /* = 0 */ )
pos = pos2 + 1;
while( output[pos] == ' ' )
pos++;
- QCString uid = output.mid( pos, index2-pos );
+ TQCString uid = output.mid( pos, index2-pos );
if( uid != "*** KEY REVOKED ***" )
key->addUserID( uid );
else
@@ -752,7 +752,7 @@ Base2::parsePublicKeyData( const QCString& output, Key* key /* = 0 */ )
// Example:
// Key fingerprint = 47 30 7C 76 05 BF 5E FB 72 41 00 F2 7D 0B D0 49
- QCString fingerprint = output.mid( pos, index2-pos );
+ TQCString fingerprint = output.mid( pos, index2-pos );
// remove white space from the fingerprint
for ( int idx = 0 ; (idx = fingerprint.find(' ', idx)) >= 0 ; )
fingerprint.replace( idx, 1, "" );
@@ -774,8 +774,8 @@ Base2::parsePublicKeyData( const QCString& output, Key* key /* = 0 */ )
int year = output.mid( pos, 4 ).toInt();
int month = output.mid( pos+5, 2 ).toInt();
int day = output.mid( pos+8, 2 ).toInt();
- QDateTime dt( QDate( year, month, day ), QTime( 00, 00 ) );
- QDateTime epoch( QDate( 1970, 01, 01 ), QTime( 00, 00 ) );
+ TQDateTime dt( TQDate( year, month, day ), TQTime( 00, 00 ) );
+ TQDateTime epoch( TQDate( 1970, 01, 01 ), TQTime( 00, 00 ) );
// Here the same comments as for the creation date are valid.
subkey->setExpirationDate( epoch.secsTo( dt ) );
pos += 11; // note that there is always a blank after the expire date
@@ -818,12 +818,12 @@ Base2::parsePublicKeyData( const QCString& output, Key* key /* = 0 */ )
void
-Base2::parseTrustDataForKey( Key* key, const QCString& str )
+Base2::parseTrustDataForKey( Key* key, const TQCString& str )
{
if( ( key == 0 ) || str.isEmpty() )
return;
- QCString keyID = key->primaryKeyID();
+ TQCString keyID = key->primaryKeyID();
UserIDList userIDs = key->userIDs();
// search the trust data belonging to this key
@@ -874,7 +874,7 @@ Base2::parseTrustDataForKey( Key* key, const QCString& str )
int pos = index + 31;
if( str[index+2] == ' ' )
pos++; // additional user IDs start one column later
- QString uid = str.mid( pos, index2-pos );
+ TQString uid = str.mid( pos, index2-pos );
// set the validity of the corresponding user ID
for( UserIDListIterator it( userIDs ); it.current(); ++it )
@@ -893,7 +893,7 @@ Base2::parseTrustDataForKey( Key* key, const QCString& str )
KeyList
-Base2::parseKeyList( const QCString& output, bool secretKeys )
+Base2::parseKeyList( const TQCString& output, bool secretKeys )
{
kdDebug(5100) << "Kpgp::Base2::parseKeyList()" << endl;
KeyList keys;
@@ -995,8 +995,8 @@ Base2::parseKeyList( const QCString& output, bool secretKeys )
int year = output.mid( pos, 4 ).toInt();
int month = output.mid( pos+5, 2 ).toInt();
int day = output.mid( pos+8, 2 ).toInt();
- QDateTime dt( QDate( year, month, day ), QTime( 00, 00 ) );
- QDateTime epoch( QDate( 1970, 01, 01 ), QTime( 00, 00 ) );
+ TQDateTime dt( TQDate( year, month, day ), TQTime( 00, 00 ) );
+ TQDateTime epoch( TQDate( 1970, 01, 01 ), TQTime( 00, 00 ) );
// The calculated creation date isn't exactly correct because QDateTime
// doesn't know anything about timezones and always assumes local time
// although epoch is of course UTC. But as PGP 2 anyway doesn't print
@@ -1007,7 +1007,7 @@ Base2::parseKeyList( const QCString& output, bool secretKeys )
pos = pos2 + 1;
while( output[pos] == ' ' )
pos++;
- QCString uid = output.mid( pos, index2-pos );
+ TQCString uid = output.mid( pos, index2-pos );
if( uid != "*** KEY REVOKED ***" )
key->addUserID( uid );
else
@@ -1033,7 +1033,7 @@ Base2::parseKeyList( const QCString& output, bool secretKeys )
int pos2;
pos2 = pos + 18;
- QCString fingerprint = output.mid( pos, index2-pos );
+ TQCString fingerprint = output.mid( pos, index2-pos );
// remove white space from the fingerprint
for ( int idx = 0 ; (idx = fingerprint.find(' ', idx)) >= 0 ; )
fingerprint.replace( idx, 1, "" );
@@ -1055,8 +1055,8 @@ Base2::parseKeyList( const QCString& output, bool secretKeys )
int year = output.mid( pos, 4 ).toInt();
int month = output.mid( pos+5, 2 ).toInt();
int day = output.mid( pos+8, 2 ).toInt();
- QDateTime dt( QDate( year, month, day ), QTime( 00, 00 ) );
- QDateTime epoch( QDate( 1970, 01, 01 ), QTime( 00, 00 ) );
+ TQDateTime dt( TQDate( year, month, day ), TQTime( 00, 00 ) );
+ TQDateTime epoch( TQDate( 1970, 01, 01 ), TQTime( 00, 00 ) );
// Here the same comments as for the creation date are valid.
subkey->setExpirationDate( epoch.secsTo( dt ) );
pos += 11; // note that there is always a blank after the expire date
diff --git a/libkpgp/kpgpbase5.cpp b/libkpgp/kpgpbase5.cpp
index c67dfd29b..21ca1dc47 100644
--- a/libkpgp/kpgpbase5.cpp
+++ b/libkpgp/kpgpbase5.cpp
@@ -26,8 +26,8 @@
#include <string.h> /* strncmp */
#include <assert.h>
-#include <qregexp.h>
-#include <qdatetime.h>
+#include <tqregexp.h>
+#include <tqdatetime.h>
#include <klocale.h>
#include <kprocess.h>
@@ -65,7 +65,7 @@ int
Base5::encsign( Block& block, const KeyIDList& recipients,
const char *passphrase )
{
- QCString cmd;
+ TQCString cmd;
int exitStatus = 0;
int index;
// used to work around a bug in pgp5. pgp5 treats files
@@ -112,7 +112,7 @@ Base5::encsign( Block& block, const KeyIDList& recipients,
if (signonly)
{
input.append("\n");
- input.replace(QRegExp("[ \t]+\n"), "\n"); //strip trailing whitespace
+ input.replace(TQRegExp("[ \t]+\n"), "\n"); //strip trailing whitespace
}
//We have to do this otherwise it's all in vain
@@ -131,7 +131,7 @@ Base5::encsign( Block& block, const KeyIDList& recipients,
}
//if(!ignoreUntrusted)
//{
- QCString aStr;
+ TQCString aStr;
index = -1;
while((index = error.find("WARNING: The above key",index+1)) != -1)
{
@@ -168,7 +168,7 @@ Base5::encsign( Block& block, const KeyIDList& recipients,
errMsg = i18n("Missing encryption key(s) for:\n%1")
.arg(error.mid(index,index2-index));
-// errMsg = QString("Missing encryption key(s) for: %1")
+// errMsg = TQString("Missing encryption key(s) for: %1")
// .arg(error.mid(index,index2-index));
status |= ERROR;
status |= MISSINGKEY;
@@ -252,7 +252,7 @@ Base5::decrypt( Block& block, const char *passphrase )
int index2;
while( (index2 = error.find('\n',index+1)) <= end )
{
- QCString item = error.mid(index+1,index2-index-1);
+ TQCString item = error.mid(index+1,index2-index-1);
item.stripWhiteSpace();
mRecipients.append(item);
index = index2;
@@ -303,7 +303,7 @@ Base5::decrypt( Block& block, const char *passphrase )
{
index = error.find("keyid: 0x",index) + 9;
block.setSignatureKeyId( error.mid(index, 8) );
- block.setSignatureUserId( QString::null );
+ block.setSignatureUserId( TQString::null );
// FIXME: not a very good solution...
status |= SIGNED;
status |= GOODSIG;
@@ -355,12 +355,12 @@ Base5::readPublicKey( const KeyID& keyId, const bool readTrust, Key* key )
KeyList
-Base5::publicKeys( const QStringList & patterns )
+Base5::publicKeys( const TQStringList & patterns )
{
int exitStatus = 0;
- QCString cmd = "pgpk -ll";
- for ( QStringList::ConstIterator it = patterns.begin();
+ TQCString cmd = "pgpk -ll";
+ for ( TQStringList::ConstIterator it = patterns.begin();
it != patterns.end(); ++it ) {
cmd += " ";
cmd += KProcess::quote( *it ).local8Bit();
@@ -384,13 +384,13 @@ Base5::publicKeys( const QStringList & patterns )
KeyList
-Base5::secretKeys( const QStringList & patterns )
+Base5::secretKeys( const TQStringList & patterns )
{
int exitStatus = 0;
status = 0;
- QCString cmd = "pgpk -ll";
- for ( QStringList::ConstIterator it = patterns.begin();
+ TQCString cmd = "pgpk -ll";
+ for ( TQStringList::ConstIterator it = patterns.begin();
it != patterns.end(); ++it ) {
cmd += " ";
cmd += KProcess::quote( *it ).local8Bit();
@@ -413,19 +413,19 @@ Base5::secretKeys( const QStringList & patterns )
}
-QCString Base5::getAsciiPublicKey(const KeyID& keyID)
+TQCString Base5::getAsciiPublicKey(const KeyID& keyID)
{
int exitStatus = 0;
if (keyID.isEmpty())
- return QCString();
+ return TQCString();
status = 0;
exitStatus = run( "pgpk -xa 0x" + keyID, 0, true );
if(exitStatus != 0) {
status = ERROR;
- return QCString();
+ return TQCString();
}
return output;
@@ -435,7 +435,7 @@ QCString Base5::getAsciiPublicKey(const KeyID& keyID)
int
Base5::signKey(const KeyID& keyID, const char *passphrase)
{
- QCString cmd;
+ TQCString cmd;
int exitStatus = 0;
if(passphrase == 0) return false;
@@ -456,7 +456,7 @@ Base5::signKey(const KeyID& keyID, const char *passphrase)
//-- private functions --------------------------------------------------------
Key*
-Base5::parseKeyData( const QCString& output, int& offset, Key* key /* = 0 */ )
+Base5::parseKeyData( const TQCString& output, int& offset, Key* key /* = 0 */ )
// This function parses the data for a single key which is output by PGP 5
// with the following command line:
// pgpk -ll
@@ -546,8 +546,8 @@ Base5::parseKeyData( const QCString& output, int& offset, Key* key /* = 0 */ )
int year = output.mid( pos, 4 ).toInt();
int month = output.mid( pos+5, 2 ).toInt();
int day = output.mid( pos+8, 2 ).toInt();
- QDateTime dt( QDate( year, month, day ), QTime( 00, 00 ) );
- QDateTime epoch( QDate( 1970, 01, 01 ), QTime( 00, 00 ) );
+ TQDateTime dt( TQDate( year, month, day ), TQTime( 00, 00 ) );
+ TQDateTime epoch( TQDate( 1970, 01, 01 ), TQTime( 00, 00 ) );
// The calculated creation date isn't exactly correct because QDateTime
// doesn't know anything about timezones and always assumes local time
// although epoch is of course UTC. But as PGP 5 anyway doesn't print
@@ -576,10 +576,10 @@ Base5::parseKeyData( const QCString& output, int& offset, Key* key /* = 0 */ )
int year = output.mid( pos, 4 ).toInt();
int month = output.mid( pos+5, 2 ).toInt();
int day = output.mid( pos+8, 2 ).toInt();
- QDateTime dt( QDate( year, month, day ), QTime( 00, 00 ) );
+ TQDateTime dt( TQDate( year, month, day ), TQTime( 00, 00 ) );
subkey->setCreationDate( epoch.secsTo( dt ) );
// has the key already expired?
- if( QDateTime::currentDateTime() >= dt )
+ if( TQDateTime::currentDateTime() >= dt )
{
subkey->setExpired( true );
key->setExpired( true );
@@ -654,7 +654,7 @@ Base5::parseKeyData( const QCString& output, int& offset, Key* key /* = 0 */ )
*/
int pos = output.find( '=', offset+3 ) + 2;
- QCString fingerprint = output.mid( pos, eol-pos );
+ TQCString fingerprint = output.mid( pos, eol-pos );
// remove white space from the fingerprint
for ( int idx = 0 ; (idx = fingerprint.find(' ', idx)) >= 0 ; )
fingerprint.replace( idx, 1, "" );
@@ -665,7 +665,7 @@ Base5::parseKeyData( const QCString& output, int& offset, Key* key /* = 0 */ )
else if( !strncmp( output.data() + offset, "uid", 3 ) )
{ // line contains a uid
int pos = offset+5;
- QCString uid = output.mid( pos, eol-pos );
+ TQCString uid = output.mid( pos, eol-pos );
key->addUserID( uid );
// displaying of uids which contain non-ASCII characters is broken in
// PGP 5.0i; it shows these characters as \ooo and truncates the uid
@@ -691,7 +691,7 @@ Base5::parseKeyData( const QCString& output, int& offset, Key* key /* = 0 */ )
Key*
-Base5::parseSingleKey( const QCString& output, Key* key /* = 0 */ )
+Base5::parseSingleKey( const TQCString& output, Key* key /* = 0 */ )
{
int offset;
@@ -719,7 +719,7 @@ Base5::parseSingleKey( const QCString& output, Key* key /* = 0 */ )
KeyList
-Base5::parseKeyList( const QCString& output, bool onlySecretKeys )
+Base5::parseKeyList( const TQCString& output, bool onlySecretKeys )
{
KeyList keys;
Key *key = 0;
@@ -761,12 +761,12 @@ Base5::parseKeyList( const QCString& output, bool onlySecretKeys )
void
-Base5::parseTrustDataForKey( Key* key, const QCString& str )
+Base5::parseTrustDataForKey( Key* key, const TQCString& str )
{
if( ( key == 0 ) || str.isEmpty() )
return;
- QCString keyID = "0x" + key->primaryKeyID();
+ TQCString keyID = "0x" + key->primaryKeyID();
UserIDList userIDs = key->userIDs();
// search the start of the trust data
@@ -808,7 +808,7 @@ Base5::parseTrustDataForKey( Key* key, const QCString& str )
// determine the user ID
int pos = offset + 33;
- QString uid = str.mid( pos, eol-pos );
+ TQString uid = str.mid( pos, eol-pos );
// set the validity of the corresponding user ID
for( UserIDListIterator it( userIDs ); it.current(); ++it )
diff --git a/libkpgp/kpgpbase6.cpp b/libkpgp/kpgpbase6.cpp
index 75e47e1de..6ee6af221 100644
--- a/libkpgp/kpgpbase6.cpp
+++ b/libkpgp/kpgpbase6.cpp
@@ -25,7 +25,7 @@
#include <string.h> /* strncmp */
#include <assert.h>
-#include <qdatetime.h>
+#include <tqdatetime.h>
#include <klocale.h>
#include <kdebug.h>
@@ -137,13 +137,13 @@ Base6::decrypt( Block& block, const char *passphrase )
kdDebug(5100) << "Message was signed on '" << block.signatureDate() << "'\n";
}
else
- block.setSignatureDate( QCString() );
+ block.setSignatureDate( TQCString() );
// determine signature status and signature key
if( error.find("signature not checked") != -1)
{
index = error.find("KeyID:",index);
block.setSignatureKeyId( error.mid(index+9,8) );
- block.setSignatureUserId( QString::null );
+ block.setSignatureUserId( TQString::null );
status |= UNKNOWN_SIG;
status |= GOODSIG;
}
@@ -158,7 +158,7 @@ Base6::decrypt( Block& block, const char *passphrase )
// get key ID of signer
index = error.find("KeyID:",index2);
if (index == -1)
- block.setSignatureKeyId( QCString() );
+ block.setSignatureKeyId( TQCString() );
else
block.setSignatureKeyId( error.mid(index+9,8) );
}
@@ -175,8 +175,8 @@ Base6::decrypt( Block& block, const char *passphrase )
else
{
status |= ERROR;
- block.setSignatureUserId( QString::null );
- block.setSignatureKeyId( QCString() );
+ block.setSignatureUserId( TQString::null );
+ block.setSignatureKeyId( TQCString() );
}
}
//kdDebug(5100) << "status = " << status << endl;
@@ -226,7 +226,7 @@ Base6::readPublicKey( const KeyID& keyID,
KeyList
-Base6::publicKeys( const QStringList & patterns )
+Base6::publicKeys( const TQStringList & patterns )
{
return doGetPublicKeys( PGP6 " +batchmode -compatible +verbose=0 "
"+language=C -kvvc", patterns );
@@ -252,7 +252,7 @@ Base6::pubKeys()
//truncate trailing "\n"
if (error.length() > 1) error.truncate(error.length()-1);
- QStrList publicKeys;
+ TQStrList publicKeys;
index = error.find("bits/keyID",1); // skip first to "\n"
if (index ==-1)
{
@@ -266,7 +266,7 @@ Base6::pubKeys()
while( (index = error.find("\n",index)) != -1)
{
//parse line
- QCString line;
+ TQCString line;
if( (index2 = error.find("\n",index+1)) != -1)
// skip last line
{
@@ -301,14 +301,14 @@ Base6::pubKeys()
line = line.stripWhiteSpace();
} else {
// line with new key
- int index4 = error.find(QRegExp("/\\d{2}/\\d{2} "), index);
+ int index4 = error.find(TQRegExp("/\\d{2}/\\d{2} "), index);
line = error.mid(index4+7,index2-index4-7);
}
//kdDebug(5100) << "Base: found key for " << (const char *)line << endl;
// don't add PGP's comments to the key list
if (strncmp(line.data(),"*** KEY EXPIRED ***",19) &&
- line.find(QRegExp("^expires \\d{4}/\\d{2}/\\d{2}")) < 0 &&
+ line.find(TQRegExp("^expires \\d{4}/\\d{2}/\\d{2}")) < 0 &&
strncmp(line.data(),"*** DEFAULT SIGNING KEY ***",27)) {
publicKeys.append(line);
}
@@ -328,7 +328,7 @@ Base6::pubKeys()
index = 0;
while ( (index = error.find("\n >", index)) != -1 ) {
- QCString line;
+ TQCString line;
index += 4;
index2 = error.find(" \"", index);
line = error.mid(index, index2-index+1).stripWhiteSpace();
@@ -343,7 +343,7 @@ Base6::pubKeys()
KeyList
-Base6::secretKeys( const QStringList & patterns )
+Base6::secretKeys( const TQStringList & patterns )
{
return publicKeys( patterns );
}
@@ -374,7 +374,7 @@ Base6::isVersion6()
Key*
-Base6::parseKeyData( const QCString& output, int& offset, Key* key /* = 0 */ )
+Base6::parseKeyData( const TQCString& output, int& offset, Key* key /* = 0 */ )
// This function parses the data for a single key which is output by PGP 6
// with the following command line arguments:
// +batchmode -compatible +verbose=0 +language=C -kvvc
@@ -486,8 +486,8 @@ Base6::parseKeyData( const QCString& output, int& offset, Key* key /* = 0 */ )
int year = output.mid( pos, 4 ).toInt();
int month = output.mid( pos+5, 2 ).toInt();
int day = output.mid( pos+8, 2 ).toInt();
- QDateTime dt( QDate( year, month, day ), QTime( 00, 00 ) );
- QDateTime epoch( QDate( 1970, 01, 01 ), QTime( 00, 00 ) );
+ TQDateTime dt( TQDate( year, month, day ), TQTime( 00, 00 ) );
+ TQDateTime epoch( TQDate( 1970, 01, 01 ), TQTime( 00, 00 ) );
// The calculated creation date isn't exactly correct because QDateTime
// doesn't know anything about timezones and always assumes local time
// although epoch is of course UTC. But as PGP 6 anyway doesn't print
@@ -524,7 +524,7 @@ Base6::parseKeyData( const QCString& output, int& offset, Key* key /* = 0 */ )
int year = output.mid( pos, 4 ).toInt();
int month = output.mid( pos+5, 2 ).toInt();
int day = output.mid( pos+8, 2 ).toInt();
- QDateTime dt( QDate( year, month, day ), QTime( 00, 00 ) );
+ TQDateTime dt( TQDate( year, month, day ), TQTime( 00, 00 ) );
// Here the same comments as for the creation date are valid.
subkey->setExpirationDate( epoch.secsTo( dt ) );
pos += 10;
@@ -537,7 +537,7 @@ Base6::parseKeyData( const QCString& output, int& offset, Key* key /* = 0 */ )
}
else
{
- QCString uid = output.mid( pos, eol-pos );
+ TQCString uid = output.mid( pos, eol-pos );
key->addUserID( uid );
pos = eol;
//kdDebug(5100) << "User ID:"<<uid<<endl;
@@ -628,7 +628,7 @@ Base6::parseKeyData( const QCString& output, int& offset, Key* key /* = 0 */ )
}
else
{
- QCString uid = output.mid( pos, eol-pos );
+ TQCString uid = output.mid( pos, eol-pos );
key->addUserID( uid );
pos = eol;
//kdDebug(5100) << "User ID:"<<uid<<endl;
@@ -660,7 +660,7 @@ Base6::parseKeyData( const QCString& output, int& offset, Key* key /* = 0 */ )
fpr = true; // we found a fingerprint
pos += 18;
- QCString fingerprint = output.mid( pos, eol-pos );
+ TQCString fingerprint = output.mid( pos, eol-pos );
// remove white space from the fingerprint
for ( int idx = 0 ; (idx = fingerprint.find(' ', idx)) >= 0 ; )
fingerprint.replace( idx, 1, "" );
@@ -703,7 +703,7 @@ Base6::parseKeyData( const QCString& output, int& offset, Key* key /* = 0 */ )
Key*
-Base6::parseSingleKey( const QCString& output, Key* key /* = 0 */ )
+Base6::parseSingleKey( const TQCString& output, Key* key /* = 0 */ )
{
int offset;
@@ -733,7 +733,7 @@ Base6::parseSingleKey( const QCString& output, Key* key /* = 0 */ )
KeyList
-Base6::parseKeyList( const QCString& output, bool secretKeys )
+Base6::parseKeyList( const TQCString& output, bool secretKeys )
{
kdDebug(5100) << "Kpgp::Base6::parseKeyList()" << endl;
KeyList keys;
@@ -773,12 +773,12 @@ Base6::parseKeyList( const QCString& output, bool secretKeys )
void
-Base6::parseTrustDataForKey( Key* key, const QCString& str )
+Base6::parseTrustDataForKey( Key* key, const TQCString& str )
{
if( ( key == 0 ) || str.isEmpty() )
return;
- QCString keyID = "0x" + key->primaryKeyID();
+ TQCString keyID = "0x" + key->primaryKeyID();
UserIDList userIDs = key->userIDs();
// search the start of the trust data
@@ -820,7 +820,7 @@ Base6::parseTrustDataForKey( Key* key, const QCString& str )
// determine the user ID
int pos = offset + 33;
- QString uid = str.mid( pos, eol-pos );
+ TQString uid = str.mid( pos, eol-pos );
// set the validity of the corresponding user ID
for( UserIDListIterator it( userIDs ); it.current(); ++it )
diff --git a/libkpgp/kpgpbaseG.cpp b/libkpgp/kpgpbaseG.cpp
index 0a66a0651..768d5c023 100644
--- a/libkpgp/kpgpbaseG.cpp
+++ b/libkpgp/kpgpbaseG.cpp
@@ -27,7 +27,7 @@
#include <kprocess.h>
#include <kdebug.h>
-#include <qtextcodec.h>
+#include <tqtextcodec.h>
#include <string.h> /* strncmp */
@@ -72,7 +72,7 @@ int
BaseG::encsign( Block& block, const KeyIDList& recipients,
const char *passphrase )
{
- QCString cmd;
+ TQCString cmd;
int exitStatus = 0;
if(!recipients.isEmpty() && passphrase != 0)
@@ -94,7 +94,7 @@ BaseG::encsign( Block& block, const KeyIDList& recipients,
{
cmd += " --set-filename stdin";
- QCString pgpUser = Module::getKpgp()->user();
+ TQCString pgpUser = Module::getKpgp()->user();
if(Module::getKpgp()->encryptToSelf() && !pgpUser.isEmpty()) {
cmd += " -r 0x";
cmd += pgpUser;
@@ -130,7 +130,7 @@ BaseG::encsign( Block& block, const KeyIDList& recipients,
int index = 0;
bool bad = FALSE;
unsigned int num = 0;
- QCString badkeys = "";
+ TQCString badkeys = "";
// Examples:
// gpg: 0x12345678: skipped: public key not found
// gpg: 0x12345678: skipped: public key is disabled
@@ -266,7 +266,7 @@ BaseG::decrypt( Block& block, const char *passphrase )
index = error.findRev(" \"", index2) + 7;
// The conversion from UTF8 is necessary because gpg stores and
// prints user IDs in UTF8
- block.setRequiredUserId( QString::fromUtf8( error.mid( index, index2 - index + 1 ) ) );
+ block.setRequiredUserId( TQString::fromUtf8( error.mid( index, index2 - index + 1 ) ) );
kdDebug(5100) << "Base: key needed is \"" << block.requiredUserId() << "\"!" << endl;
}
}
@@ -292,7 +292,7 @@ BaseG::decrypt( Block& block, const char *passphrase )
mRecipients.clear();
while( (index2 = error.find('\n',index+1)) <= end )
{
- QCString item = error.mid(index+1,index2-index-1);
+ TQCString item = error.mid(index+1,index2-index-1);
item.stripWhiteSpace();
mRecipients.append(item);
index = index2;
@@ -324,7 +324,7 @@ BaseG::decrypt( Block& block, const char *passphrase )
{
status |= UNKNOWN_SIG;
status |= GOODSIG;
- block.setSignatureUserId( QString::null );
+ block.setSignatureUserId( TQString::null );
}
else if( error.find("Good signature", index) != -1 )
{
@@ -357,7 +357,7 @@ BaseG::decrypt( Block& block, const char *passphrase )
else
{
status |= ERROR;
- block.setSignatureUserId( QString::null );
+ block.setSignatureUserId( TQString::null );
}
}
//kdDebug(5100) << "status = " << status << endl;
@@ -403,15 +403,15 @@ BaseG::readPublicKey( const KeyID& keyID,
KeyList
-BaseG::publicKeys( const QStringList & patterns )
+BaseG::publicKeys( const TQStringList & patterns )
{
int exitStatus = 0;
// the option --with-colons should be used for interprocess communication
// with gpg (according to Werner Koch)
- QCString cmd = "--batch --list-public-keys --with-fingerprint --with-colons "
+ TQCString cmd = "--batch --list-public-keys --with-fingerprint --with-colons "
"--fixed-list-mode --no-expensive-trust-checks";
- for ( QStringList::ConstIterator it = patterns.begin();
+ for ( TQStringList::ConstIterator it = patterns.begin();
it != patterns.end(); ++it ) {
cmd += " ";
cmd += KProcess::quote( *it ).local8Bit();
@@ -435,15 +435,15 @@ BaseG::publicKeys( const QStringList & patterns )
KeyList
-BaseG::secretKeys( const QStringList & patterns )
+BaseG::secretKeys( const TQStringList & patterns )
{
int exitStatus = 0;
// the option --with-colons should be used for interprocess communication
// with gpg (according to Werner Koch)
- QCString cmd = "--batch --list-secret-keys --with-fingerprint --with-colons "
+ TQCString cmd = "--batch --list-secret-keys --with-fingerprint --with-colons "
"--fixed-list-mode";
- for ( QStringList::ConstIterator it = patterns.begin();
+ for ( TQStringList::ConstIterator it = patterns.begin();
it != patterns.end(); ++it ) {
cmd += " ";
cmd += KProcess::quote( *it ).local8Bit();
@@ -469,7 +469,7 @@ BaseG::secretKeys( const QStringList & patterns )
int
BaseG::signKey(const KeyID& keyID, const char *passphrase)
{
- QCString cmd;
+ TQCString cmd;
int exitStatus = 0;
cmd = "--batch";
@@ -493,14 +493,14 @@ BaseG::getAsciiPublicKey(const KeyID& keyID)
int exitStatus = 0;
if (keyID.isEmpty())
- return QCString();
+ return TQCString();
status = 0;
exitStatus = runGpg("--batch --armor --export 0x" + keyID, 0, true);
if(exitStatus != 0) {
status = ERROR;
- return QCString();
+ return TQCString();
}
return output;
@@ -508,7 +508,7 @@ BaseG::getAsciiPublicKey(const KeyID& keyID)
Key*
-BaseG::parseKeyData( const QCString& output, int& offset, Key* key /* = 0 */ )
+BaseG::parseKeyData( const TQCString& output, int& offset, Key* key /* = 0 */ )
// This function parses the data for a single key which is output by GnuPG
// with the following command line arguments:
// --batch --list-public-keys --with-fingerprint --with-colons
@@ -529,7 +529,7 @@ BaseG::parseKeyData( const QCString& output, int& offset, Key* key /* = 0 */ )
else
key->clear();
- QCString keyID;
+ TQCString keyID;
bool firstKey = true;
while( true )
@@ -552,7 +552,7 @@ BaseG::parseKeyData( const QCString& output, int& offset, Key* key /* = 0 */ )
key->setSecret( !bIsPublicKey );
- Subkey *subkey = new Subkey( QCString(), !bIsPublicKey );
+ Subkey *subkey = new Subkey( TQCString(), !bIsPublicKey );
int pos = index + 4; // begin of 2nd field
int pos2 = output.find( ':', pos );
@@ -709,22 +709,22 @@ BaseG::parseKeyData( const QCString& output, int& offset, Key* key /* = 0 */ )
case 9:
break;
case 10: // User-ID
- QCString uid = output.mid( pos, pos2-pos );
+ TQCString uid = output.mid( pos, pos2-pos );
// replace "\xXX" with the corresponding character;
// other escaped characters, i.e. \n, \r etc., are ignored
// because they shouldn't appear in user IDs
for ( int idx = 0 ; (idx = uid.find( "\\x", idx )) >= 0 ; ++idx ) {
char str[2] = "x";
- str[0] = (char) QString( uid.mid( idx + 2, 2 ) ).toShort( 0, 16 );
+ str[0] = (char) TQString( uid.mid( idx + 2, 2 ) ).toShort( 0, 16 );
uid.replace( idx, 4, str );
}
- QString uidString = QString::fromUtf8( uid.data() );
+ TQString uidString = TQString::fromUtf8( uid.data() );
// check whether uid was utf-8 encoded
bool isUtf8 = true;
for ( unsigned int i = 0; i + 1 < uidString.length(); ++i ) {
if ( uidString[i].unicode() == 0xdbff &&
uidString[i+1].row() == 0xde ) {
- // we found a non-Unicode character (see QString::fromUtf8())
+ // we found a non-Unicode character (see TQString::fromUtf8())
isUtf8 = false;
break;
}
@@ -755,7 +755,7 @@ BaseG::parseKeyData( const QCString& output, int& offset, Key* key /* = 0 */ )
if( nonAsciiCount > asciiCount ) {
// assume koi8-r encoding
kdDebug(5100) << "Assume koi8-r encoding." << endl;
- QTextCodec *codec = QTextCodec::codecForName("KOI8-R");
+ TQTextCodec *codec = TQTextCodec::codecForName("KOI8-R");
uidString = codec->toUnicode( uid.data() );
// check the case of the first two characters to find out
// whether the user id is probably CP1251 encoded (for some
@@ -771,14 +771,14 @@ BaseG::parseKeyData( const QCString& output, int& offset, Key* key /* = 0 */ )
// CP1251 encoding
kdDebug(5100) << "No, it doesn't seem to be koi8-r. "
"Use CP 1251 instead." << endl;
- QTextCodec *codec = QTextCodec::codecForName("CP1251");
+ TQTextCodec *codec = TQTextCodec::codecForName("CP1251");
uidString = codec->toUnicode( uid.data() );
}
}
else {
// assume latin1 encoding
kdDebug(5100) << "Assume latin1 encoding." << endl;
- uidString = QString::fromLatin1( uid.data() );
+ uidString = TQString::fromLatin1( uid.data() );
}
}
userID->setText( uidString );
@@ -818,7 +818,7 @@ BaseG::parseKeyData( const QCString& output, int& offset, Key* key /* = 0 */ )
KeyList
-BaseG::parseKeyList( const QCString& output, bool secretKeys )
+BaseG::parseKeyList( const TQCString& output, bool secretKeys )
{
KeyList keys;
Key *key = 0;
diff --git a/libkpgp/kpgpblock.cpp b/libkpgp/kpgpblock.cpp
index 8bf551199..015929c26 100644
--- a/libkpgp/kpgpblock.cpp
+++ b/libkpgp/kpgpblock.cpp
@@ -23,7 +23,7 @@
namespace Kpgp {
-Block::Block( const QCString& str )
+Block::Block( const TQCString& str )
: mText(str), mProcessedText(), mError(),
mSignatureUserId(), mSignatureKeyId(), mSignatureDate(),
mRequiredKey(), mEncryptedFor(),
@@ -39,12 +39,12 @@ Block::~Block()
void
Block::reset()
{
- mProcessedText = QCString();
- mError = QCString();
- mSignatureUserId = QString::null;
- mSignatureKeyId = QCString();
- mSignatureDate = QCString();
- mRequiredKey = QCString();
+ mProcessedText = TQCString();
+ mError = TQCString();
+ mSignatureUserId = TQString::null;
+ mSignatureKeyId = TQCString();
+ mSignatureDate = TQCString();
+ mRequiredKey = TQCString();
mEncryptedFor.clear();
mStatus = 0;
mHasBeenProcessed = false;
@@ -54,7 +54,7 @@ void
Block::clear()
{
reset();
- mText = QCString();
+ mText = TQCString();
mType = NoPgpBlock;
}
@@ -111,7 +111,7 @@ Block::verify()
}
Kpgp::Result
-Block::clearsign( const QCString& keyId, const QCString& charset )
+Block::clearsign( const TQCString& keyId, const TQCString& charset )
{
Kpgp::Module *pgp = Kpgp::Module::getKpgp();
@@ -122,8 +122,8 @@ Block::clearsign( const QCString& keyId, const QCString& charset )
}
Kpgp::Result
-Block::encrypt( const QStringList& receivers, const QCString& keyId,
- const bool sign, const QCString& charset )
+Block::encrypt( const TQStringList& receivers, const TQCString& keyId,
+ const bool sign, const TQCString& charset )
{
Kpgp::Module *pgp = Kpgp::Module::getKpgp();
diff --git a/libkpgp/kpgpblock.h b/libkpgp/kpgpblock.h
index 32978771c..2bce9c74c 100644
--- a/libkpgp/kpgpblock.h
+++ b/libkpgp/kpgpblock.h
@@ -19,13 +19,13 @@
#ifndef KPGPBLOCK_H
#define KPGPBLOCK_H
-#include <qcstring.h>
-#include <qstring.h>
-#include <qstrlist.h>
+#include <tqcstring.h>
+#include <tqstring.h>
+#include <tqstrlist.h>
#include <kdepimmacros.h>
-//#include <qstringlist.h>
+//#include <tqstringlist.h>
class QStringList;
#include "kpgp.h"
@@ -94,13 +94,13 @@ class KDE_EXPORT Block
{
public:
- Block( const QCString& str = QCString() );
+ Block( const TQCString& str = TQCString() );
~Block();
- QCString text() const;
- void setText( const QCString& str );
+ TQCString text() const;
+ void setText( const TQCString& str );
- void setProcessedText( const QCString& str );
+ void setProcessedText( const TQCString& str );
int status() const;
void setStatus( const int status );
@@ -118,31 +118,31 @@ class KDE_EXPORT Block
/** returns the primary user id of the signer or a null string if we
don't have the public key of the signer */
- QString signatureUserId() const;
- void setSignatureUserId( const QString& userId );
+ TQString signatureUserId() const;
+ void setSignatureUserId( const TQString& userId );
/** keyID of signer */
- QCString signatureKeyId() const;
- void setSignatureKeyId( const QCString& keyId );
+ TQCString signatureKeyId() const;
+ void setSignatureKeyId( const TQCString& keyId );
/** date of the signature
- WARNING: Will most likely be changed to QDateTime */
- QCString signatureDate() const;
- void setSignatureDate( const QCString& date );
+ WARNING: Will most likely be changed to TQDateTime */
+ TQCString signatureDate() const;
+ void setSignatureDate( const TQCString& date );
/** the persons who can decrypt the message */
- const QStrList encryptedFor() const;
+ const TQStrList encryptedFor() const;
/** shows the secret key which is needed
to decrypt the message */
- QString requiredKey() const;
- void setRequiredKey( const QCString& keyId );
+ TQString requiredKey() const;
+ void setRequiredKey( const TQCString& keyId );
- QString requiredUserId() const;
- void setRequiredUserId( const QString& userId );
+ TQString requiredUserId() const;
+ void setRequiredUserId( const TQString& userId );
- QCString error() const;
- void setError( const QCString& str );
+ TQCString error() const;
+ void setError( const TQCString& str );
/** Resets all information about this OpenPGP block */
void reset();
@@ -160,8 +160,8 @@ class KDE_EXPORT Block
false if there was an unresolvable error or if signing was canceled
true if everything is o.k.
*/
- Kpgp::Result clearsign( const QCString& keyId,
- const QCString& charset = QCString() );
+ Kpgp::Result clearsign( const TQCString& keyId,
+ const TQCString& charset = TQCString() );
/** encrypts this OpenPGP block for a list of persons. if sign is true then
the message is signed with the key corresponding to the given key id.
@@ -169,23 +169,23 @@ class KDE_EXPORT Block
false if there was an unresolvable error or if encryption was canceled
true if everything is o.k.
*/
- Kpgp::Result encrypt( const QStringList& receivers, const QCString& keyId,
- const bool sign, const QCString& charset = QCString() );
+ Kpgp::Result encrypt( const TQStringList& receivers, const TQCString& keyId,
+ const bool sign, const TQCString& charset = TQCString() );
private:
void clear();
BlockType determineType() const;
- QCString mText;
- QCString mProcessedText;
- QCString mError;
- QString mSignatureUserId;
- QCString mSignatureKeyId;
- QCString mSignatureDate;
- QCString mRequiredKey;
- QString mRequiredUserId;
- QStrList mEncryptedFor;
+ TQCString mText;
+ TQCString mProcessedText;
+ TQCString mError;
+ TQString mSignatureUserId;
+ TQCString mSignatureKeyId;
+ TQCString mSignatureDate;
+ TQCString mRequiredKey;
+ TQString mRequiredUserId;
+ TQStrList mEncryptedFor;
int mStatus;
bool mHasBeenProcessed;
BlockType mType;
@@ -203,14 +203,14 @@ Block::text() const
}
inline void
-Block::setText( const QCString& str )
+Block::setText( const TQCString& str )
{
clear();
mText = str;
}
inline void
-Block::setProcessedText( const QCString& str )
+Block::setProcessedText( const TQCString& str )
{
mProcessedText = str;
mHasBeenProcessed = true;
@@ -223,7 +223,7 @@ Block::error() const
}
inline void
-Block::setError( const QCString& str )
+Block::setError( const TQCString& str )
{
mError = str;
}
@@ -255,7 +255,7 @@ Block::signatureUserId() const
}
inline void
-Block::setSignatureUserId( const QString& userId )
+Block::setSignatureUserId( const TQString& userId )
{
mSignatureUserId = userId;
}
@@ -267,7 +267,7 @@ Block::signatureKeyId() const
}
inline void
-Block::setSignatureKeyId( const QCString& keyId )
+Block::setSignatureKeyId( const TQCString& keyId )
{
mSignatureKeyId = keyId;
}
@@ -279,7 +279,7 @@ Block::signatureDate() const
}
inline void
-Block::setSignatureDate( const QCString& date )
+Block::setSignatureDate( const TQCString& date )
{
mSignatureDate = date;
}
@@ -291,7 +291,7 @@ Block::requiredKey() const
}
inline void
-Block::setRequiredKey( const QCString& keyId )
+Block::setRequiredKey( const TQCString& keyId )
{
mRequiredKey = keyId;
}
@@ -303,7 +303,7 @@ Block::requiredUserId() const
}
inline void
-Block::setRequiredUserId( const QString& userId )
+Block::setRequiredUserId( const TQString& userId )
{
mRequiredUserId = userId;
}
diff --git a/libkpgp/kpgpkey.cpp b/libkpgp/kpgpkey.cpp
index d0d2e4ec3..8a8ed48b8 100644
--- a/libkpgp/kpgpkey.cpp
+++ b/libkpgp/kpgpkey.cpp
@@ -23,23 +23,23 @@ namespace Kpgp {
/* member functions of Kpgp::KeyIDList --------------------------------- */
-/** Converts from a KeyIDList to a QStringList.
+/** Converts from a KeyIDList to a TQStringList.
*/
-QStringList KeyIDList::toStringList() const
+TQStringList KeyIDList::toStringList() const
{
- QStringList res;
+ TQStringList res;
for( KeyIDList::ConstIterator it = begin(); it != end(); ++it ) {
res << (*it).data();
}
return res;
}
-/** Converts from a QStringList to a KeyIDList.
+/** Converts from a TQStringList to a KeyIDList.
*/
-KeyIDList KeyIDList::fromStringList( const QStringList& l )
+KeyIDList KeyIDList::fromStringList( const TQStringList& l )
{
KeyIDList res;
- for( QStringList::ConstIterator it = l.begin(); it != l.end(); ++it ) {
+ for( TQStringList::ConstIterator it = l.begin(); it != l.end(); ++it ) {
res << (*it).local8Bit();
}
return res;
@@ -47,7 +47,7 @@ KeyIDList KeyIDList::fromStringList( const QStringList& l )
/* member functions of Kpgp::UserID ------------------------------------ */
-UserID::UserID(const QString& str, const Validity validity,
+UserID::UserID(const TQString& str, const Validity validity,
const bool revoked, const bool invalid)
{
mText = str;
@@ -81,7 +81,7 @@ Subkey::Subkey(const KeyID& keyID, const bool secret)
/* member functions of Kpgp::Key --------------------------------------- */
-Key::Key(const KeyID& keyid, const QString& uid, const bool secret) :
+Key::Key(const KeyID& keyid, const TQString& uid, const bool secret) :
mSubkeys(), mUserIDs()
{
mSecret = secret;
@@ -145,7 +145,7 @@ Key::keyTrust() const
}
Validity
-Key::keyTrust( const QString& uid ) const
+Key::keyTrust( const TQString& uid ) const
{
Validity trust = KPGP_VALIDITY_UNKNOWN;
@@ -194,7 +194,7 @@ Key::isValidSigningKey() const
}
-void Key::addUserID(const QString &uid, const Validity validity,
+void Key::addUserID(const TQString &uid, const Validity validity,
const bool revoked, const bool invalid)
{
if (!uid.isEmpty()) {
@@ -203,7 +203,7 @@ void Key::addUserID(const QString &uid, const Validity validity,
}
}
-bool Key::matchesUserID(const QString& str, bool cs)
+bool Key::matchesUserID(const TQString& str, bool cs)
{
if (str.isEmpty() || mUserIDs.isEmpty())
return false;
@@ -246,7 +246,7 @@ Subkey *Key::getSubkey(const KeyID& keyID)
return 0;
}
-void Key::setFingerprint(const KeyID& keyID, const QCString &fpr)
+void Key::setFingerprint(const KeyID& keyID, const TQCString &fpr)
{
Subkey *key;
if ((key = getSubkey(keyID)) != 0) {
diff --git a/libkpgp/kpgpkey.h b/libkpgp/kpgpkey.h
index fd92f5a1e..a0cf9b624 100644
--- a/libkpgp/kpgpkey.h
+++ b/libkpgp/kpgpkey.h
@@ -21,10 +21,10 @@
#include <time.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>
namespace Kpgp {
@@ -54,19 +54,19 @@ typedef enum
} EncryptPref;
-typedef QCString KeyID;
+typedef TQCString KeyID;
-class KeyIDList : public QValueList<KeyID>
+class KeyIDList : public TQValueList<KeyID>
{
public:
KeyIDList() { }
- KeyIDList( const KeyIDList& l ) : QValueList<KeyID>(l) { }
- KeyIDList( const QValueList<KeyID>& l ) : QValueList<KeyID>(l) { }
+ KeyIDList( const KeyIDList& l ) : TQValueList<KeyID>(l) { }
+ KeyIDList( const TQValueList<KeyID>& l ) : TQValueList<KeyID>(l) { }
KeyIDList( const KeyID& i ) { append(i); }
- QStringList toStringList() const;
+ TQStringList toStringList() const;
- static KeyIDList fromStringList( const QStringList& );
+ static KeyIDList fromStringList( const TQStringList& );
};
/** This class is used to store information about a user id of a PGP key.
@@ -75,14 +75,14 @@ class UserID
{
public:
/** Constructs a new user id with the given values. */
- UserID(const QString& str,
+ UserID(const TQString& str,
const Validity validity = KPGP_VALIDITY_UNKNOWN,
const bool revoked = false,
const bool invalid = false);
~UserID() {};
/** Returns the text of the user id. */
- QString text() const;
+ TQString text() const;
/** Returns true if the user id has been revoked. */
bool revoked() const;
@@ -94,7 +94,7 @@ class UserID
Validity validity() const;
/** Sets the text of the user id to <em>str</em>. */
- void setText(const QString& str);
+ void setText(const TQString& str);
/** Sets the flag if the user id has been revoked to <em>revoked</em>. */
void setRevoked(const bool revoked);
@@ -110,13 +110,13 @@ class UserID
bool mRevoked : 1;
bool mInvalid : 1;
Validity mValidity;
- QString mText;
+ TQString mText;
};
-typedef QPtrList<UserID> UserIDList;
-typedef QPtrListIterator<UserID> UserIDListIterator;
+typedef TQPtrList<UserID> UserIDList;
+typedef TQPtrListIterator<UserID> UserIDListIterator;
-inline QString UserID::text() const
+inline TQString UserID::text() const
{
return mText;
}
@@ -136,7 +136,7 @@ inline Validity UserID::validity() const
return mValidity;
}
-inline void UserID::setText(const QString& str)
+inline void UserID::setText(const TQString& str)
{
mText = str;
}
@@ -204,7 +204,7 @@ class Subkey
KeyID keyID() const;
/** Returns the fingerprint of the subkey. */
- QCString fingerprint() const;
+ TQCString fingerprint() const;
/** Returns the creation date of the subkey. */
time_t creationDate() const;
@@ -249,7 +249,7 @@ class Subkey
void setKeyID(const KeyID& keyID);
/** Sets the fingerprint of the subkey to <em>fingerprint</em>. */
- void setFingerprint(const QCString& fingerprint);
+ void setFingerprint(const TQCString& fingerprint);
/** Sets the creation date of the subkey to <em>creationDate</em> seconds
since Epoch. */
@@ -273,7 +273,7 @@ class Subkey
unsigned int mKeyAlgo;
unsigned int mKeyLen;
KeyID mKeyID;
- QCString mFingerprint;
+ TQCString mFingerprint;
time_t mTimestamp; /* -1 for invalid, 0 for not available */
time_t mExpiration; /* -1 for never, 0 for not available */
};
@@ -338,7 +338,7 @@ inline KeyID Subkey::keyID() const
return mKeyID.right(8);
}
-inline QCString Subkey::fingerprint() const
+inline TQCString Subkey::fingerprint() const
{
return mFingerprint;
}
@@ -408,7 +408,7 @@ inline void Subkey::setKeyID(const KeyID& keyID)
mKeyID = keyID;
}
-inline void Subkey::setFingerprint(const QCString& fingerprint)
+inline void Subkey::setFingerprint(const TQCString& fingerprint)
{
mFingerprint = fingerprint;
}
@@ -423,8 +423,8 @@ inline void Subkey::setExpirationDate(const time_t expirationDate)
mExpiration = expirationDate;
}
-typedef QPtrList<Subkey> SubkeyList;
-typedef QPtrListIterator<Subkey> SubkeyListIterator;
+typedef TQPtrList<Subkey> SubkeyList;
+typedef TQPtrListIterator<Subkey> SubkeyListIterator;
/** This class is used to store information about a PGP key.
@@ -435,7 +435,7 @@ class Key
/** Constructs a new PGP key with <em>keyid</em> as key ID of the
primary key and <em>uid</em> as primary user ID. */
Key( const KeyID& keyid = KeyID(),
- const QString& uid = QString::null,
+ const TQString& uid = TQString::null,
const bool secret = false);
~Key();
@@ -503,7 +503,7 @@ class Key
/** Returns the primary user ID or a null string if there are no
user IDs. */
- QString primaryUserID() const;
+ TQString primaryUserID() const;
/** Returns the key ID of the primary key or a null string if there
are no subkeys. */
@@ -511,7 +511,7 @@ class Key
/** Returns the fingerprint of the primary key or a null string if there
are no subkeys. */
- QCString primaryFingerprint() const;
+ TQCString primaryFingerprint() const;
/** Returns true if there are no user IDs or no subkeys.*/
bool isNull() const;
@@ -527,7 +527,7 @@ class Key
/** Returns the trust value for the given user id of this key.
*/
- Validity keyTrust( const QString& uid ) const;
+ Validity keyTrust( const TQString& uid ) const;
/** Set the validity values for the user ids to the validity values of
the given key. This is useful after rereading a key without expensive
@@ -557,7 +557,7 @@ class Key
/** Adds a user ID with the given values to the key if <em>uid</em> isn't
an empty string. */
- void addUserID(const QString& uid,
+ void addUserID(const TQString& uid,
const Validity validity = KPGP_VALIDITY_UNKNOWN,
const bool revoked = false,
const bool invalid = false);
@@ -568,7 +568,7 @@ class Key
/** Returns true if the given string matches one of the user IDs.
The match is case sensitive if <em>cs</em> is true or case insensitive
if <em>cs</em> is false. */
- bool matchesUserID(const QString& str, bool cs = true);
+ bool matchesUserID(const TQString& str, bool cs = true);
/** Adds a subkey with the given values to the key if <em>keyID</em> isn't
an empty string. */
@@ -581,7 +581,7 @@ class Key
Subkey *getSubkey(const KeyID& keyID);
/** Sets the fingerprint of the given subkey to <em>fpr</em>. */
- void setFingerprint(const KeyID& keyID, const QCString& fpr);
+ void setFingerprint(const KeyID& keyID, const TQCString& fpr);
protected:
bool mSecret : 1;
@@ -690,14 +690,14 @@ inline void Key::setEncryptionPreference( const EncryptPref encrPref )
mEncryptPref = encrPref;
}
-inline QString Key::primaryUserID() const
+inline TQString Key::primaryUserID() const
{
UserID *uid = mUserIDs.getFirst();
if (uid)
return uid->text();
else
- return QString::null;
+ return TQString::null;
}
inline KeyID Key::primaryKeyID() const
@@ -710,14 +710,14 @@ inline KeyID Key::primaryKeyID() const
return KeyID();
}
-inline QCString Key::primaryFingerprint() const
+inline TQCString Key::primaryFingerprint() const
{
Subkey *key = mSubkeys.getFirst();
if (key)
return key->fingerprint();
else
- return QCString();
+ return TQCString();
}
inline const UserIDList Key::userIDs() const
@@ -757,8 +757,8 @@ inline void Key::addSubkey(const Subkey *subkey)
-typedef QPtrList<Key> KeyListBase;
-typedef QPtrListIterator<Key> KeyListIterator;
+typedef TQPtrList<Key> KeyListBase;
+typedef TQPtrListIterator<Key> KeyListIterator;
class KeyList : public KeyListBase
{
@@ -767,10 +767,10 @@ class KeyList : public KeyListBase
{ clear(); }
private:
- int compareItems( QPtrCollection::Item s1, QPtrCollection::Item s2 )
+ int compareItems( TQPtrCollection::Item s1, TQPtrCollection::Item s2 )
{
// sort case insensitively by the primary User IDs
- return QString::compare((static_cast<Key*>(s1))->primaryUserID().lower(),
+ return TQString::compare((static_cast<Key*>(s1))->primaryUserID().lower(),
(static_cast<Key*>(s2))->primaryUserID().lower());
}
};
diff --git a/libkpgp/kpgpui.cpp b/libkpgp/kpgpui.cpp
index 7483bb0c9..e0d5bee27 100644
--- a/libkpgp/kpgpui.cpp
+++ b/libkpgp/kpgpui.cpp
@@ -18,19 +18,19 @@
//#include <stdio.h>
-#include <qvgroupbox.h>
-#include <qvbox.h>
-#include <qlabel.h>
-#include <qwhatsthis.h>
-#include <qtooltip.h>
-#include <qapplication.h>
-#include <qtextcodec.h>
-#include <qdatetime.h>
-#include <qpixmap.h>
-#include <qlayout.h>
-#include <qtimer.h>
-#include <qpopupmenu.h>
-#include <qregexp.h>
+#include <tqvgroupbox.h>
+#include <tqvbox.h>
+#include <tqlabel.h>
+#include <tqwhatsthis.h>
+#include <tqtooltip.h>
+#include <tqapplication.h>
+#include <tqtextcodec.h>
+#include <tqdatetime.h>
+#include <tqpixmap.h>
+#include <tqlayout.h>
+#include <tqtimer.h>
+#include <tqpopupmenu.h>
+#include <tqregexp.h>
#include <klocale.h>
#include <kpassdlg.h>
@@ -58,31 +58,31 @@ const int Kpgp::KeySelectionDialog::sCheckSelectionDelay = 250;
namespace Kpgp {
-PassphraseDialog::PassphraseDialog( QWidget *parent,
- const QString &caption, bool modal,
- const QString &keyID )
+PassphraseDialog::PassphraseDialog( TQWidget *parent,
+ const TQString &caption, bool modal,
+ const TQString &keyID )
:KDialogBase( parent, 0, modal, caption, Ok|Cancel )
{
- QHBox *hbox = makeHBoxMainWidget();
+ TQHBox *hbox = makeHBoxMainWidget();
hbox->setSpacing( spacingHint() );
hbox->setMargin( marginHint() );
- QLabel *label = new QLabel(hbox);
+ TQLabel *label = new TQLabel(hbox);
label->setPixmap( BarIcon("pgp-keys") );
- QWidget *rightArea = new QWidget( hbox );
- QVBoxLayout *vlay = new QVBoxLayout( rightArea, 0, spacingHint() );
+ TQWidget *rightArea = new TQWidget( hbox );
+ TQVBoxLayout *vlay = new TQVBoxLayout( rightArea, 0, spacingHint() );
if (keyID.isNull())
- label = new QLabel(i18n("Please enter your OpenPGP passphrase:"),rightArea);
+ label = new TQLabel(i18n("Please enter your OpenPGP passphrase:"),rightArea);
else
- label = new QLabel(i18n("Please enter the OpenPGP passphrase for\n\"%1\":").arg(keyID),
+ label = new TQLabel(i18n("Please enter the OpenPGP passphrase for\n\"%1\":").arg(keyID),
rightArea);
lineedit = new KPasswordEdit( rightArea );
- lineedit->setEchoMode(QLineEdit::Password);
+ lineedit->setEchoMode(TQLineEdit::Password);
lineedit->setMinimumWidth( fontMetrics().maxWidth()*20 );
lineedit->setFocus();
- connect( lineedit, SIGNAL(returnPressed()), this, SLOT(slotOk()) );
+ connect( lineedit, TQT_SIGNAL(returnPressed()), this, TQT_SLOT(slotOk()) );
vlay->addWidget( label );
vlay->addWidget( lineedit );
@@ -104,40 +104,40 @@ const char * PassphraseDialog::passphrase()
// ------------------------------------------------------------------------
// Forbidden accels for KMail: AC GH OP
// for KNode: ACE H O
-Config::Config( QWidget *parent, const char *name, bool encrypt )
- : QWidget( parent, name ), pgp( Module::getKpgp() )
+Config::Config( TQWidget *parent, const char *name, bool encrypt )
+ : TQWidget( parent, name ), pgp( Module::getKpgp() )
{
- QGroupBox * group;
- QLabel * label;
- QString msg;
+ TQGroupBox * group;
+ TQLabel * label;
+ TQString msg;
- QVBoxLayout *topLayout = new QVBoxLayout( this, 0, KDialog::spacingHint() );
+ TQVBoxLayout *topLayout = new TQVBoxLayout( this, 0, KDialog::spacingHint() );
- group = new QVGroupBox( i18n("Warning"), this );
+ group = new TQVGroupBox( i18n("Warning"), this );
group->layout()->setSpacing( KDialog::spacingHint() );
// (mmutz) work around Qt label bug in 3.0.0 (and possibly later):
// 1. Don't use rich text: No <qt><b>...</b></qt>
- label = new QLabel( i18n("Please check if encryption really "
+ label = new TQLabel( i18n("Please check if encryption really "
"works before you start using it seriously. Also note that attachments "
"are not encrypted by the PGP/GPG module."), group );
// 2. instead, set the font to bold:
- QFont labelFont = label->font();
+ TQFont labelFont = label->font();
labelFont.setBold( true );
label->setFont( labelFont );
// 3. and activate wordwarp:
label->setAlignment( AlignLeft|WordBreak );
// end; to remove the workaround, add <qt><b>..</b></qt> around the
- // text and remove lines QFont... -> label->setAlignment(...).
+ // text and remove lines TQFont... -> label->setAlignment(...).
topLayout->addWidget( group );
- group = new QVGroupBox( i18n("Encryption Tool"), this );
+ group = new TQVGroupBox( i18n("Encryption Tool"), this );
group->layout()->setSpacing( KDialog::spacingHint() );
- QHBox * hbox = new QHBox( group );
- label = new QLabel( i18n("Select encryption tool to &use:"), hbox );
- toolCombo = new QComboBox( false, hbox );
- toolCombo->insertStringList( QStringList()
+ TQHBox * hbox = new TQHBox( group );
+ label = new TQLabel( i18n("Select encryption tool to &use:"), hbox );
+ toolCombo = new TQComboBox( false, hbox );
+ toolCombo->insertStringList( TQStringList()
<< i18n("Autodetect")
<< i18n("GnuPG - Gnu Privacy Guard")
<< i18n("PGP Version 2.x")
@@ -146,18 +146,18 @@ Config::Config( QWidget *parent, const char *name, bool encrypt )
<< i18n("Do not use any encryption tool") );
label->setBuddy( toolCombo );
hbox->setStretchFactor( toolCombo, 1 );
- connect( toolCombo, SIGNAL( activated( int ) ),
- this, SIGNAL( changed( void ) ) );
+ connect( toolCombo, TQT_SIGNAL( activated( int ) ),
+ this, TQT_SIGNAL( changed( void ) ) );
// This is the place to add a KURLRequester to be used for asking
// the user for the path to the executable...
topLayout->addWidget( group );
- mpOptionsGroupBox = new QVGroupBox( i18n("Options"), this );
+ mpOptionsGroupBox = new TQVGroupBox( i18n("Options"), this );
mpOptionsGroupBox->layout()->setSpacing( KDialog::spacingHint() );
- storePass = new QCheckBox( i18n("&Keep passphrase in memory"),
+ storePass = new TQCheckBox( i18n("&Keep passphrase in memory"),
mpOptionsGroupBox );
- connect( storePass, SIGNAL( toggled( bool ) ),
- this, SIGNAL( changed( void ) ) );
+ connect( storePass, TQT_SIGNAL( toggled( bool ) ),
+ this, TQT_SIGNAL( changed( void ) ) );
msg = i18n( "<qt><p>When this option is enabled, the passphrase of your "
"private key will be remembered by the application as long "
"as the application is running. Thus you will only have to "
@@ -169,46 +169,46 @@ Config::Config( QWidget *parent, const char *name, bool encrypt )
"<p>Note that when using KMail, this setting only applies "
"if you are not using gpg-agent. It is also ignored "
"if you are using crypto plugins.</p></qt>" );
- QWhatsThis::add( storePass, msg );
+ TQWhatsThis::add( storePass, msg );
if( encrypt ) {
- encToSelf = new QCheckBox( i18n("Always encr&ypt to self"),
+ encToSelf = new TQCheckBox( i18n("Always encr&ypt to self"),
mpOptionsGroupBox );
- connect( encToSelf, SIGNAL( toggled( bool ) ),
- this, SIGNAL( changed( void ) ) );
+ connect( encToSelf, TQT_SIGNAL( toggled( bool ) ),
+ this, TQT_SIGNAL( changed( void ) ) );
msg = i18n( "<qt><p>When this option is enabled, the message/file "
"will not only be encrypted with the receiver's public key, "
"but also with your key. This will enable you to decrypt the "
"message/file at a later time. This is generally a good idea."
"</p></qt>" );
- QWhatsThis::add( encToSelf, msg );
+ TQWhatsThis::add( encToSelf, msg );
}
else
encToSelf = 0;
- showCipherText = new QCheckBox( i18n("&Show signed/encrypted text after "
+ showCipherText = new TQCheckBox( i18n("&Show signed/encrypted text after "
"composing"),
mpOptionsGroupBox );
- connect( showCipherText, SIGNAL( toggled( bool ) ),
- this, SIGNAL( changed( void ) ) );
+ connect( showCipherText, TQT_SIGNAL( toggled( bool ) ),
+ this, TQT_SIGNAL( changed( void ) ) );
msg = i18n( "<qt><p>When this option is enabled, the signed/encrypted text "
"will be shown in a separate window, enabling you to know how "
"it will look before it is sent. This is a good idea when "
"you are verifying that your encryption system works.</p></qt>" );
- QWhatsThis::add( showCipherText, msg );
+ TQWhatsThis::add( showCipherText, msg );
if( encrypt ) {
- showKeyApprovalDlg = new QCheckBox( i18n("Always show the encryption "
+ showKeyApprovalDlg = new TQCheckBox( i18n("Always show the encryption "
"keys &for approval"),
mpOptionsGroupBox );
- connect( showKeyApprovalDlg, SIGNAL( toggled( bool ) ),
- this, SIGNAL( changed( void ) ) );
+ connect( showKeyApprovalDlg, TQT_SIGNAL( toggled( bool ) ),
+ this, TQT_SIGNAL( changed( void ) ) );
msg = i18n( "<qt><p>When this option is enabled, the application will "
"always show you a list of public keys from which you can "
"choose the one it will use for encryption. If it is off, "
"the application will only show the dialog if it cannot find "
"the right key or if there are several which could be used. "
"</p></qt>" );
- QWhatsThis::add( showKeyApprovalDlg, msg );
+ TQWhatsThis::add( showKeyApprovalDlg, msg );
}
else
showKeyApprovalDlg = 0;
@@ -280,13 +280,13 @@ Config::applySettings()
// ------------------------------------------------------------------------
KeySelectionDialog::KeySelectionDialog( const KeyList& keyList,
- const QString& title,
- const QString& text,
+ const TQString& title,
+ const TQString& text,
const KeyIDList& keyIds,
const bool rememberChoice,
const unsigned int allowedKeys,
const bool extendedSelection,
- QWidget *parent, const char *name,
+ TQWidget *parent, const char *name,
bool modal )
: KDialogBase( parent, name, modal, title, Default|Ok|Cancel, Ok ),
mRememberCB( 0 ),
@@ -299,58 +299,58 @@ KeySelectionDialog::KeySelectionDialog( const KeyList& keyList,
KConfig *config = pgp->getConfig();
KConfigGroup dialogConfig( config, "Key Selection Dialog" );
- QSize defaultSize( 580, 400 );
- QSize dialogSize = dialogConfig.readSizeEntry( "Dialog size", &defaultSize );
+ TQSize defaultSize( 580, 400 );
+ TQSize dialogSize = dialogConfig.readSizeEntry( "Dialog size", &defaultSize );
resize( dialogSize );
- mCheckSelectionTimer = new QTimer( this, "mCheckSelectionTimer" );
- mStartSearchTimer = new QTimer( this, "mStartSearchTimer" );
+ mCheckSelectionTimer = new TQTimer( this, "mCheckSelectionTimer" );
+ mStartSearchTimer = new TQTimer( this, "mStartSearchTimer" );
// load the key status icons
- mKeyGoodPix = new QPixmap( UserIcon("key_ok") );
- mKeyBadPix = new QPixmap( UserIcon("key_bad") );
- mKeyUnknownPix = new QPixmap( UserIcon("key_unknown") );
- mKeyValidPix = new QPixmap( UserIcon("key") );
+ mKeyGoodPix = new TQPixmap( UserIcon("key_ok") );
+ mKeyBadPix = new TQPixmap( UserIcon("key_bad") );
+ mKeyUnknownPix = new TQPixmap( UserIcon("key_unknown") );
+ mKeyValidPix = new TQPixmap( UserIcon("key") );
- QFrame *page = makeMainWidget();
- QVBoxLayout *topLayout = new QVBoxLayout( page, 0, spacingHint() );
+ TQFrame *page = makeMainWidget();
+ TQVBoxLayout *topLayout = new TQVBoxLayout( page, 0, spacingHint() );
if( !text.isEmpty() ) {
- QLabel *label = new QLabel( page );
+ TQLabel *label = new TQLabel( page );
label->setText( text );
topLayout->addWidget( label );
}
- QHBoxLayout * hlay = new QHBoxLayout( topLayout ); // inherits spacing
- QLineEdit * le = new QLineEdit( page );
- hlay->addWidget( new QLabel( le, i18n("&Search for:"), page ) );
+ TQHBoxLayout * hlay = new TQHBoxLayout( topLayout ); // inherits spacing
+ TQLineEdit * le = new TQLineEdit( page );
+ hlay->addWidget( new TQLabel( le, i18n("&Search for:"), page ) );
hlay->addWidget( le, 1 );
le->setFocus();
- connect( le, SIGNAL(textChanged(const QString&)),
- this, SLOT(slotSearch(const QString&)) );
- connect( mStartSearchTimer, SIGNAL(timeout()), SLOT(slotFilter()) );
+ connect( le, TQT_SIGNAL(textChanged(const TQString&)),
+ this, TQT_SLOT(slotSearch(const TQString&)) );
+ connect( mStartSearchTimer, TQT_SIGNAL(timeout()), TQT_SLOT(slotFilter()) );
mListView = new KListView( page );
mListView->addColumn( i18n("Key ID") );
mListView->addColumn( i18n("User ID") );
mListView->setAllColumnsShowFocus( true );
- mListView->setResizeMode( QListView::LastColumn );
+ mListView->setResizeMode( TQListView::LastColumn );
mListView->setRootIsDecorated( true );
mListView->setShowSortIndicator( true );
mListView->setSorting( 1, true ); // sort by User ID
mListView->setShowToolTips( true );
if( extendedSelection ) {
- mListView->setSelectionMode( QListView::Extended );
- //mListView->setSelectionMode( QListView::Multi );
+ mListView->setSelectionMode( TQListView::Extended );
+ //mListView->setSelectionMode( TQListView::Multi );
}
topLayout->addWidget( mListView, 10 );
if (rememberChoice) {
- mRememberCB = new QCheckBox( i18n("Remember choice"), page );
+ mRememberCB = new TQCheckBox( i18n("Remember choice"), page );
topLayout->addWidget( mRememberCB );
- QWhatsThis::add(mRememberCB,
+ TQWhatsThis::add(mRememberCB,
i18n("<qt><p>If you check this box your choice will "
"be stored and you will not be asked again."
"</p></qt>"));
@@ -358,7 +358,7 @@ KeySelectionDialog::KeySelectionDialog( const KeyList& keyList,
initKeylist( keyList, keyIds );
- QListViewItem *lvi;
+ TQListViewItem *lvi;
if( extendedSelection ) {
lvi = mListView->currentItem();
slotCheckSelection();
@@ -373,24 +373,24 @@ KeySelectionDialog::KeySelectionDialog( const KeyList& keyList,
mListView->center( mListView->contentsX(), mListView->itemPos( lvi ) );
if( extendedSelection ) {
- connect( mCheckSelectionTimer, SIGNAL( timeout() ),
- this, SLOT( slotCheckSelection() ) );
- connect( mListView, SIGNAL( selectionChanged() ),
- this, SLOT( slotSelectionChanged() ) );
+ connect( mCheckSelectionTimer, TQT_SIGNAL( timeout() ),
+ this, TQT_SLOT( slotCheckSelection() ) );
+ connect( mListView, TQT_SIGNAL( selectionChanged() ),
+ this, TQT_SLOT( slotSelectionChanged() ) );
}
else {
- connect( mListView, SIGNAL( selectionChanged( QListViewItem* ) ),
- this, SLOT( slotSelectionChanged( QListViewItem* ) ) );
+ connect( mListView, TQT_SIGNAL( selectionChanged( TQListViewItem* ) ),
+ this, TQT_SLOT( slotSelectionChanged( TQListViewItem* ) ) );
}
- connect( mListView, SIGNAL( doubleClicked ( QListViewItem *, const QPoint &, int ) ), this, SLOT( accept() ) );
+ connect( mListView, TQT_SIGNAL( doubleClicked ( TQListViewItem *, const TQPoint &, int ) ), this, TQT_SLOT( accept() ) );
- connect( mListView, SIGNAL( contextMenuRequested( QListViewItem*,
- const QPoint&, int ) ),
- this, SLOT( slotRMB( QListViewItem*, const QPoint&, int ) ) );
+ connect( mListView, TQT_SIGNAL( contextMenuRequested( TQListViewItem*,
+ const TQPoint&, int ) ),
+ this, TQT_SLOT( slotRMB( TQListViewItem*, const TQPoint&, int ) ) );
setButtonText( KDialogBase::Default, i18n("&Reread Keys") );
- connect( this, SIGNAL( defaultClicked() ),
- this, SLOT( slotRereadKeys() ) );
+ connect( this, TQT_SIGNAL( defaultClicked() ),
+ this, TQT_SLOT( slotRereadKeys() ) );
}
@@ -420,7 +420,7 @@ KeyID KeySelectionDialog::key() const
void KeySelectionDialog::initKeylist( const KeyList& keyList,
const KeyIDList& keyIds )
{
- QListViewItem* firstSelectedItem = 0;
+ TQListViewItem* firstSelectedItem = 0;
mKeyIds.clear();
mListView->clear();
@@ -428,7 +428,7 @@ void KeySelectionDialog::initKeylist( const KeyList& keyList,
for( KeyListIterator it( keyList ); it.current(); ++it ) {
KeyID curKeyId = (*it)->primaryKeyID();
- QListViewItem* primaryUserID = new QListViewItem( mListView, curKeyId,
+ TQListViewItem* primaryUserID = new TQListViewItem( mListView, curKeyId,
(*it)->primaryUserID() );
// select and open the given key
@@ -457,16 +457,16 @@ void KeySelectionDialog::initKeylist( const KeyList& keyList,
break;
}
- QListViewItem* childItem;
+ TQListViewItem* childItem;
- childItem = new QListViewItem( primaryUserID, "",
+ childItem = new TQListViewItem( primaryUserID, "",
i18n( "Fingerprint: %1" )
.arg( beautifyFingerprint( (*it)->primaryFingerprint() ) ) );
if( primaryUserID->isSelected() && mListView->isMultiSelection() ) {
mListView->setSelected( childItem, true );
}
- childItem = new QListViewItem( primaryUserID, "", keyInfo( *it ) );
+ childItem = new TQListViewItem( primaryUserID, "", keyInfo( *it ) );
if( primaryUserID->isSelected() && mListView->isMultiSelection() ) {
mListView->setSelected( childItem, true );
}
@@ -476,7 +476,7 @@ void KeySelectionDialog::initKeylist( const KeyList& keyList,
if( *uidit ) {
++uidit; // skip the primary user ID
for( ; *uidit; ++uidit ) {
- childItem = new QListViewItem( primaryUserID, "", (*uidit)->text() );
+ childItem = new TQListViewItem( primaryUserID, "", (*uidit)->text() );
if( primaryUserID->isSelected() && mListView->isMultiSelection() ) {
mListView->setSelected( childItem, true );
}
@@ -490,9 +490,9 @@ void KeySelectionDialog::initKeylist( const KeyList& keyList,
}
-QString KeySelectionDialog::keyInfo( const Kpgp::Key *key ) const
+TQString KeySelectionDialog::keyInfo( const Kpgp::Key *key ) const
{
- QString status, remark;
+ TQString status, remark;
if( key->revoked() ) {
status = i18n("Revoked");
}
@@ -538,7 +538,7 @@ QString KeySelectionDialog::keyInfo( const Kpgp::Key *key ) const
}
}
- QDateTime dt;
+ TQDateTime dt;
dt.setTime_t( key->creationDate() );
if( remark.isEmpty() ) {
return " " + i18n("creation date and status of an OpenPGP key",
@@ -555,9 +555,9 @@ QString KeySelectionDialog::keyInfo( const Kpgp::Key *key ) const
}
}
-QString KeySelectionDialog::beautifyFingerprint( const QCString& fpr ) const
+TQString KeySelectionDialog::beautifyFingerprint( const TQCString& fpr ) const
{
- QCString result;
+ TQCString result;
if( 40 == fpr.length() ) {
// convert to this format:
@@ -664,7 +664,7 @@ int KeySelectionDialog::keyValidity( const Kpgp::Key *key ) const
void KeySelectionDialog::updateKeyInfo( const Kpgp::Key* key,
- QListViewItem* lvi ) const
+ TQListViewItem* lvi ) const
{
if( 0 == lvi ) {
return;
@@ -716,7 +716,7 @@ void KeySelectionDialog::updateKeyInfo( const Kpgp::Key* key,
int
-KeySelectionDialog::keyAdmissibility( QListViewItem* lvi,
+KeySelectionDialog::keyAdmissibility( TQListViewItem* lvi,
TrustCheckMode trustCheckMode ) const
{
// Return:
@@ -783,7 +783,7 @@ KeySelectionDialog::keyAdmissibility( QListViewItem* lvi,
KeyID
-KeySelectionDialog::getKeyId( const QListViewItem* lvi ) const
+KeySelectionDialog::getKeyId( const TQListViewItem* lvi ) const
{
KeyID keyId;
@@ -823,25 +823,25 @@ void KeySelectionDialog::slotRereadKeys()
int offsetY = mListView->contentsY();
if( mListView->isMultiSelection() ) {
- disconnect( mListView, SIGNAL( selectionChanged() ),
- this, SLOT( slotSelectionChanged() ) );
+ disconnect( mListView, TQT_SIGNAL( selectionChanged() ),
+ this, TQT_SLOT( slotSelectionChanged() ) );
}
else {
- disconnect( mListView, SIGNAL( selectionChanged( QListViewItem * ) ),
- this, SLOT( slotSelectionChanged( QListViewItem * ) ) );
+ disconnect( mListView, TQT_SIGNAL( selectionChanged( TQListViewItem * ) ),
+ this, TQT_SLOT( slotSelectionChanged( TQListViewItem * ) ) );
}
initKeylist( keys, KeyIDList( mKeyIds ) );
slotFilter();
if( mListView->isMultiSelection() ) {
- connect( mListView, SIGNAL( selectionChanged() ),
- this, SLOT( slotSelectionChanged() ) );
+ connect( mListView, TQT_SIGNAL( selectionChanged() ),
+ this, TQT_SLOT( slotSelectionChanged() ) );
slotSelectionChanged();
}
else {
- connect( mListView, SIGNAL( selectionChanged( QListViewItem * ) ),
- this, SLOT( slotSelectionChanged( QListViewItem * ) ) );
+ connect( mListView, TQT_SIGNAL( selectionChanged( TQListViewItem * ) ),
+ this, TQT_SLOT( slotSelectionChanged( TQListViewItem * ) ) );
}
// restore the saved position of the contents
@@ -849,7 +849,7 @@ void KeySelectionDialog::slotRereadKeys()
}
-void KeySelectionDialog::slotSelectionChanged( QListViewItem * lvi )
+void KeySelectionDialog::slotSelectionChanged( TQListViewItem * lvi )
{
slotCheckSelection( lvi );
}
@@ -866,7 +866,7 @@ void KeySelectionDialog::slotSelectionChanged()
}
-void KeySelectionDialog::slotCheckSelection( QListViewItem* plvi /* = 0 */ )
+void KeySelectionDialog::slotCheckSelection( TQListViewItem* plvi /* = 0 */ )
{
kdDebug(5100) << "KeySelectionDialog::slotCheckSelection()\n";
@@ -886,16 +886,16 @@ void KeySelectionDialog::slotCheckSelection( QListViewItem* plvi /* = 0 */ )
// As we might change the selection, we have to disconnect the slot
// to prevent recursion
- disconnect( mListView, SIGNAL( selectionChanged() ),
- this, SLOT( slotSelectionChanged() ) );
+ disconnect( mListView, TQT_SIGNAL( selectionChanged() ),
+ this, TQT_SLOT( slotSelectionChanged() ) );
KeyIDList newKeyIdList;
- QValueList<QListViewItem*> keysToBeChecked;
+ TQValueList<TQListViewItem*> keysToBeChecked;
bool keysAllowed = true;
enum { UNKNOWN, SELECTED, DESELECTED } userAction = UNKNOWN;
// Iterate over the tree to find selected keys.
- for( QListViewItem *lvi = mListView->firstChild();
+ for( TQListViewItem *lvi = mListView->firstChild();
0 != lvi;
lvi = lvi->nextSibling() ) {
// We make sure that either all items belonging to a key are selected
@@ -906,7 +906,7 @@ void KeySelectionDialog::slotCheckSelection( QListViewItem* plvi /* = 0 */ )
// First count the selected items of this key
int itemCount = 1 + lvi->childCount();
int selectedCount = lvi->isSelected() ? 1 : 0;
- for( QListViewItem *clvi = lvi->firstChild();
+ for( TQListViewItem *clvi = lvi->firstChild();
0 != clvi;
clvi = clvi->nextSibling() ) {
if( clvi->isSelected() ) {
@@ -955,7 +955,7 @@ void KeySelectionDialog::slotCheckSelection( QListViewItem* plvi /* = 0 */ )
if( userAction == SELECTED ) {
// select all items of this key
mListView->setSelected( lvi, true );
- for( QListViewItem *clvi = lvi->firstChild();
+ for( TQListViewItem *clvi = lvi->firstChild();
0 != clvi;
clvi = clvi->nextSibling() ) {
mListView->setSelected( clvi, true );
@@ -974,7 +974,7 @@ void KeySelectionDialog::slotCheckSelection( QListViewItem* plvi /* = 0 */ )
else { // userAction == DESELECTED
// deselect all items of this key
mListView->setSelected( lvi, false );
- for( QListViewItem *clvi = lvi->firstChild();
+ for( TQListViewItem *clvi = lvi->firstChild();
0 != clvi;
clvi = clvi->nextSibling() ) {
mListView->setSelected( clvi, false );
@@ -989,13 +989,13 @@ void KeySelectionDialog::slotCheckSelection( QListViewItem* plvi /* = 0 */ )
}
enableButtonOK( keysAllowed );
- connect( mListView, SIGNAL( selectionChanged() ),
- this, SLOT( slotSelectionChanged() ) );
+ connect( mListView, TQT_SIGNAL( selectionChanged() ),
+ this, TQT_SLOT( slotSelectionChanged() ) );
}
}
-bool KeySelectionDialog::checkKeys( const QValueList<QListViewItem*>& keys ) const
+bool KeySelectionDialog::checkKeys( const TQValueList<TQListViewItem*>& keys ) const
{
KProgressDialog* pProgressDlg = 0;
bool keysAllowed = true;
@@ -1009,7 +1009,7 @@ bool KeySelectionDialog::checkKeys( const QValueList<QListViewItem*>& keys ) con
pProgressDlg->setMinimumDuration( 1000 );
pProgressDlg->show();
- for( QValueList<QListViewItem*>::ConstIterator it = keys.begin();
+ for( TQValueList<TQListViewItem*>::ConstIterator it = keys.begin();
it != keys.end();
++it ) {
kdDebug(5100) << "Checking key 0x" << getKeyId( *it ) << "...\n";
@@ -1028,7 +1028,7 @@ bool KeySelectionDialog::checkKeys( const QValueList<QListViewItem*>& keys ) con
}
-void KeySelectionDialog::slotRMB( QListViewItem* lvi, const QPoint& pos, int )
+void KeySelectionDialog::slotRMB( TQListViewItem* lvi, const TQPoint& pos, int )
{
if( !lvi ) {
return;
@@ -1036,8 +1036,8 @@ void KeySelectionDialog::slotRMB( QListViewItem* lvi, const QPoint& pos, int )
mCurrentContextMenuItem = lvi;
- QPopupMenu menu(this);
- menu.insertItem( i18n( "Recheck Key" ), this, SLOT( slotRecheckKey() ) );
+ TQPopupMenu menu(this);
+ menu.insertItem( i18n( "Recheck Key" ), this, TQT_SLOT( slotRecheckKey() ) );
menu.exec( pos );
}
@@ -1070,7 +1070,7 @@ void KeySelectionDialog::slotCancel()
reject();
}
-void KeySelectionDialog::slotSearch( const QString & text )
+void KeySelectionDialog::slotSearch( const TQString & text )
{
mSearchText = text.stripWhiteSpace().upper();
mStartSearchTimer->start( sCheckSelectionDelay, true /*single-shot*/ );
@@ -1084,7 +1084,7 @@ void KeySelectionDialog::slotFilter()
}
// OK, so we need to filter:
- QRegExp keyIdRegExp( "(?:0x)?[A-F0-9]{1,8}", false /*case-insens.*/ );
+ TQRegExp keyIdRegExp( "(?:0x)?[A-F0-9]{1,8}", false /*case-insens.*/ );
if ( keyIdRegExp.exactMatch( mSearchText ) ) {
if ( mSearchText.startsWith( "0X" ) )
// search for keyID only:
@@ -1098,52 +1098,52 @@ void KeySelectionDialog::slotFilter()
}
}
-void KeySelectionDialog::filterByKeyID( const QString & keyID )
+void KeySelectionDialog::filterByKeyID( const TQString & keyID )
{
assert( keyID.length() <= 8 );
assert( !keyID.isEmpty() ); // regexp in slotFilter should prevent these
if ( keyID.isEmpty() )
showAllItems();
else
- for ( QListViewItem * item = mListView->firstChild() ; item ; item = item->nextSibling() )
+ for ( TQListViewItem * item = mListView->firstChild() ; item ; item = item->nextSibling() )
item->setVisible( item->text( 0 ).upper().startsWith( keyID ) );
}
-void KeySelectionDialog::filterByKeyIDOrUID( const QString & str )
+void KeySelectionDialog::filterByKeyIDOrUID( const TQString & str )
{
assert( !str.isEmpty() );
// match beginnings of words:
- QRegExp rx( "\\b" + QRegExp::escape( str ), false );
+ TQRegExp rx( "\\b" + TQRegExp::escape( str ), false );
- for ( QListViewItem * item = mListView->firstChild() ; item ; item = item->nextSibling() )
+ for ( TQListViewItem * item = mListView->firstChild() ; item ; item = item->nextSibling() )
item->setVisible( item->text( 0 ).upper().startsWith( str )
|| rx.search( item->text( 1 ) ) >= 0
|| anyChildMatches( item, rx ) );
}
-void KeySelectionDialog::filterByUID( const QString & str )
+void KeySelectionDialog::filterByUID( const TQString & str )
{
assert( !str.isEmpty() );
// match beginnings of words:
- QRegExp rx( "\\b" + QRegExp::escape( str ), false );
+ TQRegExp rx( "\\b" + TQRegExp::escape( str ), false );
- for ( QListViewItem * item = mListView->firstChild() ; item ; item = item->nextSibling() )
+ for ( TQListViewItem * item = mListView->firstChild() ; item ; item = item->nextSibling() )
item->setVisible( rx.search( item->text( 1 ) ) >= 0
|| anyChildMatches( item, rx ) );
}
-bool KeySelectionDialog::anyChildMatches( const QListViewItem * item, QRegExp & rx ) const
+bool KeySelectionDialog::anyChildMatches( const TQListViewItem * item, TQRegExp & rx ) const
{
if ( !item )
return false;
- QListViewItem * stop = item->nextSibling(); // It's OK if stop is NULL...
+ TQListViewItem * stop = item->nextSibling(); // It's OK if stop is NULL...
- for ( QListViewItemIterator it( item->firstChild() ) ; it.current() && it.current() != stop ; ++it )
+ for ( TQListViewItemIterator it( item->firstChild() ) ; it.current() && it.current() != stop ; ++it )
if ( rx.search( it.current()->text( 1 ) ) >= 0 ) {
//item->setOpen( true ); // do we want that?
return true;
@@ -1153,47 +1153,47 @@ bool KeySelectionDialog::anyChildMatches( const QListViewItem * item, QRegExp &
void KeySelectionDialog::showAllItems()
{
- for ( QListViewItem * item = mListView->firstChild() ; item ; item = item->nextSibling() )
+ for ( TQListViewItem * item = mListView->firstChild() ; item ; item = item->nextSibling() )
item->setVisible( true );
}
// ------------------------------------------------------------------------
-KeyRequester::KeyRequester( QWidget * parent, bool multipleKeys,
+KeyRequester::KeyRequester( TQWidget * parent, bool multipleKeys,
unsigned int allowedKeys, const char * name )
- : QWidget( parent, name ),
+ : TQWidget( parent, name ),
mDialogCaption( i18n("OpenPGP Key Selection") ),
mDialogMessage( i18n("Please select an OpenPGP key to use.") ),
mMulti( multipleKeys ),
mAllowedKeys( allowedKeys ),
d( 0 )
{
- QHBoxLayout * hlay = new QHBoxLayout( this, 0, KDialog::spacingHint() );
+ TQHBoxLayout * hlay = new TQHBoxLayout( this, 0, KDialog::spacingHint() );
// the label where the key id is to be displayed:
- mLabel = new QLabel( this );
- mLabel->setFrameStyle( QFrame::Panel | QFrame::Sunken );
+ mLabel = new TQLabel( this );
+ mLabel->setFrameStyle( TQFrame::Panel | TQFrame::Sunken );
// the button to unset any key:
- mEraseButton = new QPushButton( this );
+ mEraseButton = new TQPushButton( this );
mEraseButton->setAutoDefault( false );
- mEraseButton->setSizePolicy( QSizePolicy( QSizePolicy::Minimum,
- QSizePolicy::Minimum ) );
+ mEraseButton->setSizePolicy( TQSizePolicy( TQSizePolicy::Minimum,
+ TQSizePolicy::Minimum ) );
mEraseButton->setPixmap( SmallIcon( "clear_left" ) );
- QToolTip::add( mEraseButton, i18n("Clear") );
+ TQToolTip::add( mEraseButton, i18n("Clear") );
// the button to call the KeySelectionDialog:
- mDialogButton = new QPushButton( i18n("Change..."), this );
+ mDialogButton = new TQPushButton( i18n("Change..."), this );
mDialogButton->setAutoDefault( false );
hlay->addWidget( mLabel, 1 );
hlay->addWidget( mEraseButton );
hlay->addWidget( mDialogButton );
- connect( mEraseButton, SIGNAL(clicked()), SLOT(slotEraseButtonClicked()) );
- connect( mDialogButton, SIGNAL(clicked()), SLOT(slotDialogButtonClicked()) );
+ connect( mEraseButton, TQT_SIGNAL(clicked()), TQT_SLOT(slotEraseButtonClicked()) );
+ connect( mDialogButton, TQT_SIGNAL(clicked()), TQT_SLOT(slotDialogButtonClicked()) );
- setSizePolicy( QSizePolicy( QSizePolicy::MinimumExpanding,
- QSizePolicy::Fixed ) );
+ setSizePolicy( TQSizePolicy( TQSizePolicy::MinimumExpanding,
+ TQSizePolicy::Fixed ) );
}
KeyRequester::~KeyRequester() {
@@ -1213,11 +1213,11 @@ void KeyRequester::setKeyIDs( const KeyIDList & keyIDs ) {
if ( mKeys.size() > 1 )
setMultipleKeysEnabled( true );
- QString s = mKeys.toStringList().join(", ");
+ TQString s = mKeys.toStringList().join(", ");
mLabel->setText( s );
- QToolTip::remove( mLabel );
- QToolTip::add( mLabel, s );
+ TQToolTip::remove( mLabel );
+ TQToolTip::add( mLabel, s );
}
void KeyRequester::slotDialogButtonClicked() {
@@ -1238,11 +1238,11 @@ void KeyRequester::slotEraseButtonClicked() {
emit changed();
}
-void KeyRequester::setDialogCaption( const QString & caption ) {
+void KeyRequester::setDialogCaption( const TQString & caption ) {
mDialogCaption = caption;
}
-void KeyRequester::setDialogMessage( const QString & msg ) {
+void KeyRequester::setDialogMessage( const TQString & msg ) {
mDialogMessage = msg;
}
@@ -1268,7 +1268,7 @@ void KeyRequester::setAllowedKeys( int allowedKeys ) {
}
-PublicKeyRequester::PublicKeyRequester( QWidget * parent, bool multi,
+PublicKeyRequester::PublicKeyRequester( TQWidget * parent, bool multi,
unsigned int allowed, const char * name )
: KeyRequester( parent, multi, allowed & ~SecretKeys, name )
{
@@ -1281,10 +1281,10 @@ PublicKeyRequester::~PublicKeyRequester() {
KeyIDList PublicKeyRequester::keyRequestHook( Module * pgp ) const {
assert( pgp );
- return pgp->selectPublicKeys( mDialogCaption, mDialogMessage, mKeys, QString::null, mAllowedKeys );
+ return pgp->selectPublicKeys( mDialogCaption, mDialogMessage, mKeys, TQString::null, mAllowedKeys );
}
-SecretKeyRequester::SecretKeyRequester( QWidget * parent, bool multi,
+SecretKeyRequester::SecretKeyRequester( TQWidget * parent, bool multi,
unsigned int allowed, const char * name )
: KeyRequester( parent, multi, allowed & ~PublicKeys, name )
{
@@ -1307,10 +1307,10 @@ KeyIDList SecretKeyRequester::keyRequestHook( Module * pgp ) const {
// ------------------------------------------------------------------------
-KeyApprovalDialog::KeyApprovalDialog( const QStringList& addresses,
- const QValueVector<KeyIDList>& keyIDs,
+KeyApprovalDialog::KeyApprovalDialog( const TQStringList& addresses,
+ const TQValueVector<KeyIDList>& keyIDs,
const int allowedKeys,
- QWidget *parent, const char *name,
+ TQWidget *parent, const char *name,
bool modal )
: KDialogBase( parent, name, modal, i18n("Encryption Key Approval"),
Ok|Cancel, Ok ),
@@ -1328,23 +1328,23 @@ KeyApprovalDialog::KeyApprovalDialog( const QStringList& addresses,
// addresses.count()+1 != keyList.count() )
// do something;
- QFrame *page = makeMainWidget();
- QVBoxLayout *topLayout = new QVBoxLayout( page, 0, KDialog::spacingHint() );
+ TQFrame *page = makeMainWidget();
+ TQVBoxLayout *topLayout = new TQVBoxLayout( page, 0, KDialog::spacingHint() );
- QLabel *label = new QLabel( i18n("The following keys will be used for "
+ TQLabel *label = new TQLabel( i18n("The following keys will be used for "
"encryption:"),
page );
topLayout->addWidget( label );
- QScrollView* sv = new QScrollView( page );
- sv->setResizePolicy( QScrollView::AutoOneFit );
+ TQScrollView* sv = new TQScrollView( page );
+ sv->setResizePolicy( TQScrollView::AutoOneFit );
topLayout->addWidget( sv );
- QVBox* bigvbox = new QVBox( sv->viewport() );
+ TQVBox* bigvbox = new TQVBox( sv->viewport() );
bigvbox->setMargin( KDialog::marginHint() );
bigvbox->setSpacing( KDialog::spacingHint() );
sv->addChild( bigvbox );
- QButtonGroup *mChangeButtonGroup = new QButtonGroup( bigvbox );
+ TQButtonGroup *mChangeButtonGroup = new TQButtonGroup( bigvbox );
mChangeButtonGroup->hide();
mAddressLabels.resize( addresses.count() );
mKeyIdsLabels.resize( keyIDs.size() );
@@ -1354,28 +1354,28 @@ KeyApprovalDialog::KeyApprovalDialog( const QStringList& addresses,
// the sender's key
if( pgp->encryptToSelf() ) {
mEncryptToSelf = 1;
- QHBox* hbox = new QHBox( bigvbox );
- new QLabel( i18n("Your keys:"), hbox );
- QLabel* keyidsL = new QLabel( hbox );
+ TQHBox* hbox = new TQHBox( bigvbox );
+ new TQLabel( i18n("Your keys:"), hbox );
+ TQLabel* keyidsL = new TQLabel( hbox );
if( keyIDs[0].isEmpty() ) {
keyidsL->setText( i18n("<none> means 'no key'", "<none>") );
}
else {
keyidsL->setText( "0x" + keyIDs[0].toStringList().join( "\n0x" ) );
}
- keyidsL->setFrameStyle( QFrame::Panel | QFrame::Sunken );
+ keyidsL->setFrameStyle( TQFrame::Panel | TQFrame::Sunken );
/*
- QListBox* keyidLB = new QListBox( hbox );
+ TQListBox* keyidLB = new TQListBox( hbox );
if( keyIDs[0].isEmpty() ) {
keyidLB->insertItem( i18n("<none>") );
}
else {
keyidLB->insertStringList( keyIDs[0].toStringList() );
}
- keyidLB->setSelectionMode( QListBox::NoSelection );
- keyidLB->setFrameStyle( QFrame::Panel | QFrame::Sunken );
+ keyidLB->setSelectionMode( TQListBox::NoSelection );
+ keyidLB->setFrameStyle( TQFrame::Panel | TQFrame::Sunken );
*/
- QPushButton *button = new QPushButton( i18n("Change..."), hbox );
+ TQPushButton *button = new TQPushButton( i18n("Change..."), hbox );
mChangeButtonGroup->insert( button );
button->setAutoDefault( false );
hbox->setStretchFactor( keyidsL, 10 );
@@ -1392,8 +1392,8 @@ KeyApprovalDialog::KeyApprovalDialog( const QStringList& addresses,
//mKeyIdListBoxes.insert( 0, 0 );
}
- QStringList::ConstIterator ait;
- QValueVector<KeyIDList>::const_iterator kit;
+ TQStringList::ConstIterator ait;
+ TQValueVector<KeyIDList>::const_iterator kit;
int i;
for( ait = addresses.begin(), kit = keyIDs.begin(), i = 0;
( ait != addresses.end() ) && ( kit != keyIDs.end() );
@@ -1405,34 +1405,34 @@ KeyApprovalDialog::KeyApprovalDialog( const QStringList& addresses,
new KSeparator( Horizontal, bigvbox );
}
- QHBox *hbox = new QHBox( bigvbox );
- new QLabel( i18n("Recipient:"), hbox );
- QLabel *addressL = new QLabel( *ait, hbox );
+ TQHBox *hbox = new TQHBox( bigvbox );
+ new TQLabel( i18n("Recipient:"), hbox );
+ TQLabel *addressL = new TQLabel( *ait, hbox );
hbox->setStretchFactor( addressL, 10 );
mAddressLabels.insert( i, addressL );
- hbox = new QHBox( bigvbox );
- new QLabel( i18n("Encryption keys:"), hbox );
- QLabel* keyidsL = new QLabel( hbox );
+ hbox = new TQHBox( bigvbox );
+ new TQLabel( i18n("Encryption keys:"), hbox );
+ TQLabel* keyidsL = new TQLabel( hbox );
if( (*kit).isEmpty() ) {
keyidsL->setText( i18n("<none> means 'no key'", "<none>") );
}
else {
keyidsL->setText( "0x" + (*kit).toStringList().join( "\n0x" ) );
}
- keyidsL->setFrameStyle( QFrame::Panel | QFrame::Sunken );
+ keyidsL->setFrameStyle( TQFrame::Panel | TQFrame::Sunken );
/*
- QListBox* keyidLB = new QListBox( hbox );
+ TQListBox* keyidLB = new TQListBox( hbox );
if( (*kit).isEmpty() ) {
keyidLB->insertItem( i18n("<none>") );
}
else {
keyidLB->insertStringList( (*kit).toStringList() );
}
- keyidLB->setSelectionMode( QListBox::NoSelection );
- keyidLB->setFrameStyle( QFrame::Panel | QFrame::Sunken );
+ keyidLB->setSelectionMode( TQListBox::NoSelection );
+ keyidLB->setFrameStyle( TQFrame::Panel | TQFrame::Sunken );
*/
- QPushButton *button = new QPushButton( i18n("Change..."), hbox );
+ TQPushButton *button = new TQPushButton( i18n("Change..."), hbox );
mChangeButtonGroup->insert( button );
button->setAutoDefault( false );
hbox->setStretchFactor( keyidsL, 10 );
@@ -1440,9 +1440,9 @@ KeyApprovalDialog::KeyApprovalDialog( const QStringList& addresses,
//hbox->setStretchFactor( keyidLB, 10 );
//mKeyIdListBoxes.insert( i + 1, keyidLB );
- hbox = new QHBox( bigvbox );
- new QLabel( i18n("Encryption preference:"), hbox );
- QComboBox *encrPrefCombo = new QComboBox( hbox );
+ hbox = new TQHBox( bigvbox );
+ new TQLabel( i18n("Encryption preference:"), hbox );
+ TQComboBox *encrPrefCombo = new TQComboBox( hbox );
encrPrefCombo->insertItem( i18n("<none>") );
encrPrefCombo->insertItem( i18n("Never Encrypt with This Key") );
encrPrefCombo->insertItem( i18n("Always Encrypt with This Key") );
@@ -1470,12 +1470,12 @@ KeyApprovalDialog::KeyApprovalDialog( const QStringList& addresses,
default:
encrPrefCombo->setCurrentItem( 0 );
}
- connect( encrPrefCombo, SIGNAL(activated(int)),
- this, SLOT(slotPrefsChanged(int)) );
+ connect( encrPrefCombo, TQT_SIGNAL(activated(int)),
+ this, TQT_SLOT(slotPrefsChanged(int)) );
mEncrPrefCombos.insert( i, encrPrefCombo );
}
- connect( mChangeButtonGroup, SIGNAL(clicked(int)),
- this, SLOT(slotChangeEncryptionKey(int)) );
+ connect( mChangeButtonGroup, TQT_SIGNAL(clicked(int)),
+ this, TQT_SLOT(slotChangeEncryptionKey(int)) );
// calculate the optimal width for the dialog
int dialogWidth = marginHint()
@@ -1498,7 +1498,7 @@ KeyApprovalDialog::KeyApprovalDialog( const QStringList& addresses,
+ marginHint()
+ 2;
// don't make the dialog too large
- QRect desk = KGlobalSettings::desktopGeometry(this);
+ TQRect desk = KGlobalSettings::desktopGeometry(this);
int screenWidth = desk.width();
if( dialogWidth > 3*screenWidth/4 )
dialogWidth = 3*screenWidth/4;
@@ -1506,7 +1506,7 @@ KeyApprovalDialog::KeyApprovalDialog( const QStringList& addresses,
if( dialogHeight > 7*screenHeight/8 )
dialogHeight = 7*screenHeight/8;
- setInitialSize( QSize( dialogWidth, dialogHeight ) );
+ setInitialSize( TQSize( dialogWidth, dialogHeight ) );
}
void
@@ -1550,10 +1550,10 @@ KeyApprovalDialog::slotChangeEncryptionKey( int nr )
}
if( !keyIds.isEmpty() ) {
mKeys[nr] = keyIds;
- QLabel* keyidsL = mKeyIdsLabels[nr];
+ TQLabel* keyidsL = mKeyIdsLabels[nr];
keyidsL->setText( "0x" + keyIds.toStringList().join( "\n0x" ) );
/*
- QListBox* qlb = mKeyIdListBoxes[nr];
+ TQListBox* qlb = mKeyIdListBoxes[nr];
qlb->clear();
qlb->insertStringList( keyIds.toStringList() );
*/
@@ -1613,31 +1613,31 @@ KeyApprovalDialog::slotCancel()
// ------------------------------------------------------------------------
-CipherTextDialog::CipherTextDialog( const QCString & text,
- const QCString & charset, QWidget *parent,
+CipherTextDialog::CipherTextDialog( const TQCString & text,
+ const TQCString & charset, TQWidget *parent,
const char *name, bool modal )
:KDialogBase( parent, name, modal, i18n("OpenPGP Information"), Ok|Cancel, Ok)
{
// FIXME (post KDE2.2): show some more info, e.g. the output of GnuPG/PGP
- QFrame *page = makeMainWidget();
- QVBoxLayout *topLayout = new QVBoxLayout( page, 0, spacingHint() );
+ TQFrame *page = makeMainWidget();
+ TQVBoxLayout *topLayout = new TQVBoxLayout( page, 0, spacingHint() );
- QLabel *label = new QLabel( page );
+ TQLabel *label = new TQLabel( page );
label->setText(i18n("Result of the last encryption/sign operation:"));
topLayout->addWidget( label );
- mEditBox = new QMultiLineEdit( page );
+ mEditBox = new TQMultiLineEdit( page );
mEditBox->setReadOnly(true);
topLayout->addWidget( mEditBox, 10 );
- QString unicodeText;
+ TQString unicodeText;
if (charset.isEmpty())
- unicodeText = QString::fromLocal8Bit(text.data());
+ unicodeText = TQString::fromLocal8Bit(text.data());
else {
bool ok=true;
- QTextCodec *codec = KGlobal::charsets()->codecForName(charset, ok);
+ TQTextCodec *codec = KGlobal::charsets()->codecForName(charset, ok);
if(!ok)
- unicodeText = QString::fromLocal8Bit(text.data());
+ unicodeText = TQString::fromLocal8Bit(text.data());
else
unicodeText = codec->toUnicode(text.data(), text.length());
}
@@ -1665,12 +1665,12 @@ void CipherTextDialog::setMinimumSize()
KConfig gc("kdeglobals", false, false);
gc.setGroup("Windows");
int maxWidth;
- if (QApplication::desktop()->isVirtualDesktop() &&
+ if (TQApplication::desktop()->isVirtualDesktop() &&
gc.readBoolEntry("XineramaEnabled", true) &&
gc.readBoolEntry("XineramaPlacementEnabled", true)) {
- maxWidth = QApplication::desktop()->screenGeometry(QApplication::desktop()->screenNumber(parentWidget())).width()-100;
+ maxWidth = TQApplication::desktop()->screenGeometry(TQApplication::desktop()->screenNumber(parentWidget())).width()-100;
} else {
- maxWidth = QApplication::desktop()->geometry().width()-100;
+ maxWidth = TQApplication::desktop()->geometry().width()-100;
}
#endif
diff --git a/libkpgp/kpgpui.h b/libkpgp/kpgpui.h
index eab9a53ea..48e6fecde 100644
--- a/libkpgp/kpgpui.h
+++ b/libkpgp/kpgpui.h
@@ -20,12 +20,12 @@
#define KPGPUI_H
#include <kdialogbase.h> // base class of all dialogs here
-#include <qwidget.h> // base class of Config
-#include <qcheckbox.h> // used in inlined methods
+#include <tqwidget.h> // base class of Config
+#include <tqcheckbox.h> // used in inlined methods
#include <kdebug.h> // used in inlined methods
-#include <qcstring.h> // used in return-by-value
-#include <qstring.h> // is a member in KeyRequester
-#include <qvaluevector.h> // used in KeyApprovalDialog
+#include <tqcstring.h> // used in return-by-value
+#include <tqstring.h> // is a member in KeyRequester
+#include <tqvaluevector.h> // used in KeyApprovalDialog
#include "kpgp.h"
@@ -57,8 +57,8 @@ class KDE_EXPORT PassphraseDialog : public KDialogBase
Q_OBJECT
public:
- PassphraseDialog( QWidget *parent=0, const QString &caption=QString::null,
- bool modal=true, const QString &keyID=QString::null);
+ PassphraseDialog( TQWidget *parent=0, const TQString &caption=TQString::null,
+ bool modal=true, const TQString &keyID=TQString::null);
virtual ~PassphraseDialog();
const char * passphrase();
@@ -77,23 +77,23 @@ class KDE_EXPORT Config : public QWidget
Q_OBJECT
public:
- Config(QWidget *parent = 0, const char *name = 0, bool encrypt =true);
+ Config(TQWidget *parent = 0, const char *name = 0, bool encrypt =true);
virtual ~Config();
virtual void setValues();
virtual void applySettings();
- QGroupBox* optionsGroupBox() { return mpOptionsGroupBox; };
+ TQGroupBox* optionsGroupBox() { return mpOptionsGroupBox; };
signals:
void changed();
protected:
Module *pgp;
- QCheckBox *storePass;
- QCheckBox *encToSelf;
- QCheckBox *showCipherText;
- QCheckBox *showKeyApprovalDlg;
- QComboBox *toolCombo;
- QGroupBox* mpOptionsGroupBox;
+ TQCheckBox *storePass;
+ TQCheckBox *encToSelf;
+ TQCheckBox *showCipherText;
+ TQCheckBox *showKeyApprovalDlg;
+ TQComboBox *toolCombo;
+ TQGroupBox* mpOptionsGroupBox;
};
@@ -112,13 +112,13 @@ class KDE_EXPORT KeySelectionDialog: public KeySelectionDialogSuper
/** allowedKeys: see kpgp.h
*/
KeySelectionDialog( const KeyList& keyList,
- const QString& title,
- const QString& text = QString::null,
+ const TQString& title,
+ const TQString& text = TQString::null,
const KeyIDList& keyIds = KeyIDList(),
const bool rememberChoice = false,
const unsigned int allowedKeys = AllKeys,
const bool extendedSelection = false,
- QWidget *parent=0, const char *name=0,
+ TQWidget *parent=0, const char *name=0,
bool modal=true );
virtual ~KeySelectionDialog();
@@ -139,37 +139,37 @@ class KDE_EXPORT KeySelectionDialog: public KeySelectionDialogSuper
protected slots:
virtual void slotRereadKeys();
- virtual void slotSelectionChanged( QListViewItem* );
+ virtual void slotSelectionChanged( TQListViewItem* );
virtual void slotSelectionChanged();
- virtual void slotCheckSelection( QListViewItem* = 0 );
- virtual void slotRMB( QListViewItem*, const QPoint&, int );
+ virtual void slotCheckSelection( TQListViewItem* = 0 );
+ virtual void slotRMB( TQListViewItem*, const TQPoint&, int );
virtual void slotRecheckKey();
virtual void slotOk();
virtual void slotCancel();
- virtual void slotSearch( const QString & text );
+ virtual void slotSearch( const TQString & text );
virtual void slotFilter();
private:
- void filterByKeyID( const QString & keyID );
- void filterByKeyIDOrUID( const QString & keyID );
- void filterByUID( const QString & uid );
+ void filterByKeyID( const TQString & keyID );
+ void filterByKeyIDOrUID( const TQString & keyID );
+ void filterByUID( const TQString & uid );
void showAllItems();
- bool anyChildMatches( const QListViewItem * item, QRegExp & rx ) const;
+ bool anyChildMatches( const TQListViewItem * item, TQRegExp & rx ) const;
void initKeylist( const KeyList& keyList, const KeyIDList& keyIds );
- QString keyInfo( const Kpgp::Key* ) const;
+ TQString keyInfo( const Kpgp::Key* ) const;
- QString beautifyFingerprint( const QCString& ) const;
+ TQString beautifyFingerprint( const TQCString& ) const;
- // Returns the key ID of the key the given QListViewItem belongs to
- KeyID getKeyId( const QListViewItem* ) const;
+ // Returns the key ID of the key the given TQListViewItem belongs to
+ KeyID getKeyId( const TQListViewItem* ) const;
// Returns: -1 = unusable, 0 = unknown, 1 = valid, but untrusted, 2 = trusted
int keyValidity( const Kpgp::Key* ) const;
- // Updates the given QListViewItem with the data of the given key
- void updateKeyInfo( const Kpgp::Key*, QListViewItem* ) const;
+ // Updates the given TQListViewItem with the data of the given key
+ void updateKeyInfo( const Kpgp::Key*, TQListViewItem* ) const;
/** Checks if choosing the given key is allowed
Returns:
@@ -178,22 +178,22 @@ class KDE_EXPORT KeySelectionDialog: public KeySelectionDialogSuper
or not,
1 = key can be chosen
*/
- int keyAdmissibility( QListViewItem*,
+ int keyAdmissibility( TQListViewItem*,
TrustCheckMode = NoExpensiveTrustCheck ) const;
// Perform expensive trust checks for the given keys
- bool checkKeys( const QValueList<QListViewItem*>& ) const;
+ bool checkKeys( const TQValueList<TQListViewItem*>& ) const;
private:
KListView *mListView;
- QCheckBox *mRememberCB;
- QPixmap *mKeyGoodPix, *mKeyBadPix, *mKeyUnknownPix, *mKeyValidPix;
+ TQCheckBox *mRememberCB;
+ TQPixmap *mKeyGoodPix, *mKeyBadPix, *mKeyUnknownPix, *mKeyValidPix;
KeyIDList mKeyIds;
unsigned int mAllowedKeys;
- QTimer* mCheckSelectionTimer;
- QTimer* mStartSearchTimer;
- QString mSearchText;
- QListViewItem* mCurrentContextMenuItem;
+ TQTimer* mCheckSelectionTimer;
+ TQTimer* mStartSearchTimer;
+ TQString mSearchText;
+ TQListViewItem* mCurrentContextMenuItem;
static const int sCheckSelectionDelay;
};
@@ -203,18 +203,18 @@ class KDE_EXPORT KeyRequester: public QWidget
Q_OBJECT
public:
- KeyRequester( QWidget * parent=0, bool multipleKeys=false,
+ KeyRequester( TQWidget * parent=0, bool multipleKeys=false,
unsigned int allowedKeys=AllKeys, const char * name=0 );
virtual ~KeyRequester();
KeyIDList keyIDs() const;
void setKeyIDs( const KeyIDList & keyIDs );
- QPushButton * eraseButton() const { return mEraseButton; }
- QPushButton * dialogButton() const { return mDialogButton; }
+ TQPushButton * eraseButton() const { return mEraseButton; }
+ TQPushButton * dialogButton() const { return mDialogButton; }
- void setDialogCaption( const QString & caption );
- void setDialogMessage( const QString & message );
+ void setDialogCaption( const TQString & caption );
+ void setDialogMessage( const TQString & message );
bool isMultipleKeysEnabled() const;
void setMultipleKeysEnabled( bool enable );
@@ -227,10 +227,10 @@ protected:
virtual KeyIDList keyRequestHook( Module * pgp ) const = 0;
protected:
- QLabel * mLabel;
- QPushButton * mEraseButton;
- QPushButton * mDialogButton;
- QString mDialogCaption, mDialogMessage;
+ TQLabel * mLabel;
+ TQPushButton * mEraseButton;
+ TQPushButton * mDialogButton;
+ TQString mDialogCaption, mDialogMessage;
bool mMulti;
int mAllowedKeys;
KeyIDList mKeys;
@@ -253,7 +253,7 @@ protected:
class KDE_EXPORT PublicKeyRequester : public KeyRequester {
Q_OBJECT
public:
- PublicKeyRequester( QWidget * parent=0, bool multipleKeys=false,
+ PublicKeyRequester( TQWidget * parent=0, bool multipleKeys=false,
unsigned int allowedKeys=PublicKeys, const char * name=0 );
virtual ~PublicKeyRequester();
@@ -272,7 +272,7 @@ protected:
class KDE_EXPORT SecretKeyRequester : public KeyRequester {
Q_OBJECT
public:
- SecretKeyRequester( QWidget * parent=0, bool multipleKeys=false,
+ SecretKeyRequester( TQWidget * parent=0, bool multipleKeys=false,
unsigned int allowedKeys=SecretKeys, const char * name=0 );
virtual ~SecretKeyRequester();
@@ -294,14 +294,14 @@ class KDE_EXPORT KeyApprovalDialog: public KDialogBase
Q_OBJECT
public:
- KeyApprovalDialog( const QStringList&,
- const QValueVector<KeyIDList>&,
+ KeyApprovalDialog( const TQStringList&,
+ const TQValueVector<KeyIDList>&,
const int allowedKeys,
- QWidget *parent = 0, const char *name = 0,
+ TQWidget *parent = 0, const char *name = 0,
bool modal = true );
virtual ~KeyApprovalDialog() {};
- QValueVector<KeyIDList> keys() const { return mKeys; };
+ TQValueVector<KeyIDList> keys() const { return mKeys; };
bool preferencesChanged() const { return mPrefsChanged; }
@@ -312,14 +312,14 @@ class KDE_EXPORT KeyApprovalDialog: public KDialogBase
virtual void slotCancel();
private:
- QValueVector<KeyIDList> mKeys;
+ TQValueVector<KeyIDList> mKeys;
int mAllowedKeys;
int mEncryptToSelf;
bool mPrefsChanged;
- QPtrVector<QLabel> mAddressLabels;
- QPtrVector<QLabel> mKeyIdsLabels;
- //QPtrVector<QListBox> mKeyIdListBoxes;
- QPtrVector<QComboBox> mEncrPrefCombos;
+ TQPtrVector<TQLabel> mAddressLabels;
+ TQPtrVector<TQLabel> mKeyIdsLabels;
+ //TQPtrVector<TQListBox> mKeyIdListBoxes;
+ TQPtrVector<TQComboBox> mEncrPrefCombos;
};
@@ -329,13 +329,13 @@ class KDE_EXPORT CipherTextDialog: public KDialogBase
Q_OBJECT
public:
- CipherTextDialog( const QCString & text, const QCString & charset=0,
- QWidget *parent=0, const char *name=0, bool modal=true );
+ CipherTextDialog( const TQCString & text, const TQCString & charset=0,
+ TQWidget *parent=0, const char *name=0, bool modal=true );
virtual ~CipherTextDialog() {};
private:
void setMinimumSize();
- QMultiLineEdit *mEditBox;
+ TQMultiLineEdit *mEditBox;
};
} // namespace Kpgp
diff --git a/libkpimexchange/core/exchangeaccount.cpp b/libkpimexchange/core/exchangeaccount.cpp
index 9142c9db3..858169ad8 100644
--- a/libkpimexchange/core/exchangeaccount.cpp
+++ b/libkpimexchange/core/exchangeaccount.cpp
@@ -20,13 +20,13 @@
Boston, MA 02110-1301, USA.
*/
-#include <qstring.h>
-#include <qtextstream.h>
-#include <qapplication.h>
-#include <qdom.h>
-#include <qwidgetlist.h>
-#include <qwidget.h>
-#include <qfile.h>
+#include <tqstring.h>
+#include <tqtextstream.h>
+#include <tqapplication.h>
+#include <tqdom.h>
+#include <tqwidgetlist.h>
+#include <tqwidget.h>
+#include <tqfile.h>
#include <kurl.h>
#include <kapplication.h>
@@ -47,10 +47,10 @@
using namespace KPIM;
-ExchangeAccount::ExchangeAccount( const QString &host, const QString &port,
- const QString &account,
- const QString &password,
- const QString &mailbox )
+ExchangeAccount::ExchangeAccount( const TQString &host, const TQString &port,
+ const TQString &account,
+ const TQString &password,
+ const TQString &mailbox )
: mError( false )
{
KURL url( "webdav://" + host + "/exchange/" + account );
@@ -76,7 +76,7 @@ ExchangeAccount::ExchangeAccount( const QString &host, const QString &port,
mCalendarURL = 0;
}
-ExchangeAccount::ExchangeAccount( const QString& group )
+ExchangeAccount::ExchangeAccount( const TQString& group )
{
load( group );
}
@@ -85,16 +85,16 @@ ExchangeAccount::~ExchangeAccount()
{
}
-QString endecryptStr( const QString &aStr )
+TQString endecryptStr( const TQString &aStr )
{
- QString result;
+ TQString result;
for (uint i = 0; i < aStr.length(); i++)
result += (aStr[i].unicode() < 0x20) ? aStr[i] :
- QChar(0x1001F - aStr[i].unicode());
+ TQChar(0x1001F - aStr[i].unicode());
return result;
}
-void ExchangeAccount::save( QString const &group )
+void ExchangeAccount::save( TQString const &group )
{
kapp->config()->setGroup( group );
kapp->config()->writeEntry( "host", mHost );
@@ -104,32 +104,32 @@ void ExchangeAccount::save( QString const &group )
kapp->config()->sync();
}
-void ExchangeAccount::load( QString const &group )
+void ExchangeAccount::load( TQString const &group )
{
kapp->config()->setGroup( group );
- QString host = kapp->config()->readEntry( "host" );
+ TQString host = kapp->config()->readEntry( "host" );
if ( ! host.isNull() ) {
mHost = host;
} else {
mHost = "mail.company.com";
}
- QString user = kapp->config()->readEntry( "user" );
+ TQString user = kapp->config()->readEntry( "user" );
if ( ! user.isNull() ) {
mAccount = user;
} else {
mAccount = "username";
}
- QString mailbox = kapp->config()->readEntry( "mailbox" );
+ TQString mailbox = kapp->config()->readEntry( "mailbox" );
if ( ! mailbox.isNull() ) {
mMailbox = mailbox;
} else {
mMailbox = "webdav://" + host + "/exchange/" + mAccount;
}
- QString password = endecryptStr( kapp->config()->readEntry( "MS-ID" ) );
+ TQString password = endecryptStr( kapp->config()->readEntry( "MS-ID" ) );
if ( ! password.isNull() ) {
mPassword = password;
}
@@ -152,7 +152,7 @@ KURL ExchangeAccount::calendarURL()
}
}
-bool ExchangeAccount::authenticate( QWidget *window )
+bool ExchangeAccount::authenticate( TQWidget *window )
{
if ( window )
return authenticate( window->winId() );
@@ -163,7 +163,7 @@ bool ExchangeAccount::authenticate( QWidget *window )
bool ExchangeAccount::authenticate()
{
long windowId;
- QWidgetList *widgets = QApplication::topLevelWidgets();
+ TQWidgetList *widgets = TQApplication::topLevelWidgets();
if ( widgets->isEmpty() )
windowId = 0;
else
@@ -189,8 +189,8 @@ bool ExchangeAccount::authenticate( int windowId )
DCOPClient *dcopClient = new DCOPClient();
dcopClient->attach();
- QByteArray params;
- QDataStream stream(params, IO_WriteOnly);
+ TQByteArray params;
+ TQDataStream stream(params, IO_WriteOnly);
stream << info << windowId;
dcopClient->send( "kded", "kpasswdserver",
@@ -204,11 +204,11 @@ bool ExchangeAccount::authenticate( int windowId )
calcFolderURLs();
// TODO: Remove this busy loop
- QApplication::setOverrideCursor( KCursor::waitCursor() );
+ TQApplication::setOverrideCursor( KCursor::waitCursor() );
do {
qApp->processEvents();
} while ( !mCalendarURL && !mError );
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
return !mError;
}
@@ -216,9 +216,9 @@ bool ExchangeAccount::authenticate( int windowId )
void ExchangeAccount::calcFolderURLs()
{
kdDebug() << "ExchangeAccount::calcFolderURLs" << endl;
- QDomDocument doc;
- QDomElement root = addElement( doc, doc, "DAV:", "propfind" );
- QDomElement prop = addElement( doc, root, "DAV:", "prop" );
+ TQDomDocument doc;
+ TQDomElement root = addElement( doc, doc, "DAV:", "propfind" );
+ TQDomElement prop = addElement( doc, root, "DAV:", "prop" );
addElement( doc, prop, "urn:schemas:httpmail:", "calendar" );
// For later use:
// urn:schemas:httpmail:contacts Contacts
@@ -239,8 +239,8 @@ void ExchangeAccount::calcFolderURLs()
KIO::DavJob* job = KIO::davPropFind( baseURL(), doc, "1", false );
job->addMetaData( "errorPage", "false" );
- connect( job, SIGNAL( result( KIO::Job * ) ),
- SLOT( slotFolderResult( KIO::Job * ) ) );
+ connect( job, TQT_SIGNAL( result( KIO::Job * ) ),
+ TQT_SLOT( slotFolderResult( KIO::Job * ) ) );
}
void ExchangeAccount::slotFolderResult( KIO::Job *job )
@@ -248,24 +248,24 @@ void ExchangeAccount::slotFolderResult( KIO::Job *job )
kdDebug() << "ExchangeAccount::slotFolderResult()" << endl;
if ( job->error() ) {
kdError() << "Error: Cannot get well-know folder names; " << job->error() << endl;
- QString text = i18n("ExchangeAccount\nError accessing '%1': %2")
+ TQString text = i18n("ExchangeAccount\nError accessing '%1': %2")
.arg( baseURL().prettyURL() ).arg( job->errorString() );
KMessageBox::error( 0, text );
mError = true;
return;
}
- QDomDocument &response = static_cast<KIO::DavJob *>( job )->response();
+ TQDomDocument &response = static_cast<KIO::DavJob *>( job )->response();
- QDomElement prop = response.documentElement().namedItem( "response" )
+ TQDomElement prop = response.documentElement().namedItem( "response" )
.namedItem( "propstat" ).namedItem( "prop" ).toElement();
- QDomElement calElement = prop.namedItem( "calendar" ).toElement();
+ TQDomElement calElement = prop.namedItem( "calendar" ).toElement();
if ( calElement.isNull() ) {
kdError() << "Error: no calendar URL in Exchange server reply" << endl;
mError = true;
return;
}
- QString calendar = calElement.text();
+ TQString calendar = calElement.text();
kdDebug() << "ExchangeAccount: response calendarURL: " << calendar << endl;
@@ -273,14 +273,14 @@ void ExchangeAccount::slotFolderResult( KIO::Job *job )
kdDebug() << "Calendar URL: " << mCalendarURL->url() << endl;
}
-QString ExchangeAccount::tryFindMailbox( const QString& host, const QString& port, const QString& user, const QString& password )
+TQString ExchangeAccount::tryFindMailbox( const TQString& host, const TQString& port, const TQString& user, const TQString& password )
{
kdDebug() << "Entering ExchangeAccount::tryFindMailbox()" << endl;
KURL url("http://" + host + "/exchange");
if (!port.isEmpty()) url.setPort(port.toInt());
- QString result = tryMailbox( url.url(), user, password );
+ TQString result = tryMailbox( url.url(), user, password );
if ( result.isNull() )
{
url.setProtocol("https");
@@ -289,28 +289,28 @@ QString ExchangeAccount::tryFindMailbox( const QString& host, const QString& por
return result;
}
-QString ExchangeAccount::tryMailbox( const QString &_url, const QString &user,
- const QString &password )
+TQString ExchangeAccount::tryMailbox( const TQString &_url, const TQString &user,
+ const TQString &password )
{
KURL url = KURL( _url );
url.setUser( user );
url.setPass( password );
- QString tmpFile;
+ TQString tmpFile;
if ( !KIO::NetAccess::download( url, tmpFile, 0 ) ) {
kdWarning() << "Trying to find mailbox failed: not able to download " << url.prettyURL() << endl;
- return QString::null;
+ return TQString::null;
}
- QFile file( tmpFile );
+ TQFile file( tmpFile );
if ( !file.open( IO_ReadOnly ) ) {
kdWarning() << "Trying to find mailbox failed: not able to open temp file " << tmpFile << endl;
KIO::NetAccess::removeTempFile( tmpFile );
- return QString::null;
+ return TQString::null;
}
- QTextStream stream( &file );
- QString line;
- QString result;
+ TQTextStream stream( &file );
+ TQString line;
+ TQString result;
while ( !stream.eof() ) {
line = stream.readLine(); // line of text excluding '\n'
int pos = line.find( "<BASE href=\"", 0, FALSE );
@@ -321,7 +321,7 @@ QString ExchangeAccount::tryMailbox( const QString &_url, const QString &user,
kdWarning() << "Strange, found no closing quote in " << line << endl;
continue;
}
- QString mailboxString = line.mid( pos+12, end-pos-12 );
+ TQString mailboxString = line.mid( pos+12, end-pos-12 );
KURL mailbox( mailboxString );
if ( mailbox.isEmpty() ) {
kdWarning() << "Strange, could not get URL from " << mailboxString << " in line " << line << endl;
diff --git a/libkpimexchange/core/exchangeaccount.h b/libkpimexchange/core/exchangeaccount.h
index 505232c88..244fc944b 100644
--- a/libkpimexchange/core/exchangeaccount.h
+++ b/libkpimexchange/core/exchangeaccount.h
@@ -23,8 +23,8 @@
#ifndef EXCHANGE_ACCOUNT_H
#define EXCHANGE_ACCOUNT_H
-#include <qobject.h>
-#include <qstring.h>
+#include <tqobject.h>
+#include <tqstring.h>
#include <kdepimmacros.h>
#include <kurl.h>
@@ -36,58 +36,58 @@ class KDE_EXPORT ExchangeAccount : public QObject
{
Q_OBJECT
public:
- ExchangeAccount( const QString &host, const QString &port,
- const QString &account, const QString &password,
- const QString &mailbox = QString::null );
+ ExchangeAccount( const TQString &host, const TQString &port,
+ const TQString &account, const TQString &password,
+ const TQString &mailbox = TQString::null );
/**
Create a new account object, read data from group app data
*/
- ExchangeAccount( const QString &group );
+ ExchangeAccount( const TQString &group );
~ExchangeAccount();
- void save( QString const &group );
- void load( QString const &group );
+ void save( TQString const &group );
+ void load( TQString const &group );
- QString host() { return mHost; }
- QString port() { return mPort; }
- QString account() { return mAccount; }
- QString mailbox() { return mMailbox; }
- QString password() { return mPassword; }
+ TQString host() { return mHost; }
+ TQString port() { return mPort; }
+ TQString account() { return mAccount; }
+ TQString mailbox() { return mMailbox; }
+ TQString password() { return mPassword; }
- void setHost( QString host ) { mHost = host; }
- void setPort( QString port ) { mPort = port; }
- void setAccount( QString account ) { mAccount = account; }
- void setMailbox( QString mailbox ) { mMailbox = mailbox; }
- void setPassword( QString password ) { mPassword = password; }
+ void setHost( TQString host ) { mHost = host; }
+ void setPort( TQString port ) { mPort = port; }
+ void setAccount( TQString account ) { mAccount = account; }
+ void setMailbox( TQString mailbox ) { mMailbox = mailbox; }
+ void setPassword( TQString password ) { mPassword = password; }
KURL baseURL();
KURL calendarURL();
- // Returns the mailbox URL of this user. QString::null if unsuccessful
- static QString tryFindMailbox( const QString &host, const QString &port,
- const QString &user,
- const QString &password );
+ // Returns the mailbox URL of this user. TQString::null if unsuccessful
+ static TQString tryFindMailbox( const TQString &host, const TQString &port,
+ const TQString &user,
+ const TQString &password );
// Put authentication info in KDE password store for auto-authentication
// with later webdav access. Also calculates the calendar URL.
bool authenticate();
- bool authenticate( QWidget *window );
+ bool authenticate( TQWidget *window );
private:
bool authenticate( int windowId );
void calcFolderURLs();
- static QString tryMailbox( const QString &_url, const QString &user,
- const QString &password );
+ static TQString tryMailbox( const TQString &_url, const TQString &user,
+ const TQString &password );
private slots:
void slotFolderResult( KIO::Job * );
private:
- QString mHost;
- QString mPort;
- QString mAccount;
- QString mMailbox;
- QString mPassword;
+ TQString mHost;
+ TQString mPort;
+ TQString mAccount;
+ TQString mMailbox;
+ TQString mPassword;
KURL *mCalendarURL;
bool mError;
diff --git a/libkpimexchange/core/exchangeclient.cpp b/libkpimexchange/core/exchangeclient.cpp
index 337e540fd..3a1c46cc5 100644
--- a/libkpimexchange/core/exchangeclient.cpp
+++ b/libkpimexchange/core/exchangeclient.cpp
@@ -43,7 +43,7 @@
using namespace KPIM;
ExchangeClient::ExchangeClient( ExchangeAccount *account,
- const QString &timeZoneId )
+ const TQString &timeZoneId )
: mWindow( 0 ), mTimeZoneId( timeZoneId )
{
kdDebug() << "Creating ExchangeClient...\n";
@@ -58,22 +58,22 @@ ExchangeClient::~ExchangeClient()
kdDebug() << "ExchangeClient destructor" << endl;
}
-void ExchangeClient::setWindow(QWidget *window)
+void ExchangeClient::setWindow(TQWidget *window)
{
mWindow = window;
}
-QWidget *ExchangeClient::window() const
+TQWidget *ExchangeClient::window() const
{
return mWindow;
}
-void ExchangeClient::setTimeZoneId( const QString& timeZoneId )
+void ExchangeClient::setTimeZoneId( const TQString& timeZoneId )
{
mTimeZoneId = timeZoneId;
}
-QString ExchangeClient::timeZoneId()
+TQString ExchangeClient::timeZoneId()
{
return mTimeZoneId;
}
@@ -93,11 +93,11 @@ void ExchangeClient::test()
bool result = resource->open();
kdDebug() << "Result: " << result << endl;
- resource->subscribeEvents( QDate( 2002, 12, 18 ), QDate( 2002, 12, 19 ) );
+ resource->subscribeEvents( TQDate( 2002, 12, 18 ), TQDate( 2002, 12, 19 ) );
*/
// mAccount->tryFindMailbox();
/*
- QString query =
+ TQString query =
"<propfind xmlns=\"DAV:\" xmlns:h=\"urn:schemas:httpmail:\">\r\n"
" <allprop/>\r\n"
"</propfind>\r\n";
@@ -113,13 +113,13 @@ void ExchangeClient::test2()
kdDebug() << "Entering test2()" << endl;
}
/*
-ExchangeMonitor* ExchangeClient::monitor( int pollMode, const QHostAddress& ownInterface )
+ExchangeMonitor* ExchangeClient::monitor( int pollMode, const TQHostAddress& ownInterface )
{
return new ExchangeMonitor( mAccount, pollMode, ownInterface );
}
*/
-void ExchangeClient::download( KCal::Calendar *calendar, const QDate &start,
- const QDate &end, bool showProgress )
+void ExchangeClient::download( KCal::Calendar *calendar, const TQDate &start,
+ const TQDate &end, bool showProgress )
{
kdDebug() << "ExchangeClient::download1()" << endl;
@@ -131,12 +131,12 @@ void ExchangeClient::download( KCal::Calendar *calendar, const QDate &start,
ExchangeDownload *worker = new ExchangeDownload( mAccount, mWindow );
worker->download( calendar, start, end, showProgress );
connect( worker,
- SIGNAL( finished( ExchangeDownload *, int, const QString & ) ),
- SLOT( slotDownloadFinished( ExchangeDownload *, int,
- const QString & ) ) );
+ TQT_SIGNAL( finished( ExchangeDownload *, int, const TQString & ) ),
+ TQT_SLOT( slotDownloadFinished( ExchangeDownload *, int,
+ const TQString & ) ) );
}
-void ExchangeClient::download( const QDate &start, const QDate &end,
+void ExchangeClient::download( const TQDate &start, const TQDate &end,
bool showProgress )
{
kdDebug() << "ExchangeClient::download2()" << endl;
@@ -149,11 +149,11 @@ void ExchangeClient::download( const QDate &start, const QDate &end,
ExchangeDownload *worker = new ExchangeDownload( mAccount, mWindow );
worker->download( start, end, showProgress );
connect( worker,
- SIGNAL( finished( ExchangeDownload *, int, const QString & ) ),
- SLOT( slotDownloadFinished( ExchangeDownload *, int,
- const QString & ) ) );
- connect( worker, SIGNAL( gotEvent( KCal::Event *, const KURL & ) ),
- SIGNAL( event( KCal::Event *, const KURL & ) ) );
+ TQT_SIGNAL( finished( ExchangeDownload *, int, const TQString & ) ),
+ TQT_SLOT( slotDownloadFinished( ExchangeDownload *, int,
+ const TQString & ) ) );
+ connect( worker, TQT_SIGNAL( gotEvent( KCal::Event *, const KURL & ) ),
+ TQT_SIGNAL( event( KCal::Event *, const KURL & ) ) );
}
void ExchangeClient::upload( KCal::Event *event )
@@ -167,8 +167,8 @@ void ExchangeClient::upload( KCal::Event *event )
ExchangeUpload *worker = new ExchangeUpload( event, mAccount, mTimeZoneId,
mWindow );
- connect( worker, SIGNAL( finished( ExchangeUpload *, int, const QString & ) ),
- SLOT( slotUploadFinished( ExchangeUpload *, int, const QString & ) ) );
+ connect( worker, TQT_SIGNAL( finished( ExchangeUpload *, int, const TQString & ) ),
+ TQT_SLOT( slotUploadFinished( ExchangeUpload *, int, const TQString & ) ) );
}
void ExchangeClient::remove( KCal::Event *event )
@@ -179,31 +179,31 @@ void ExchangeClient::remove( KCal::Event *event )
}
ExchangeDelete *worker = new ExchangeDelete( event, mAccount, mWindow );
- connect( worker, SIGNAL( finished( ExchangeDelete *, int, const QString & ) ),
- SLOT( slotRemoveFinished( ExchangeDelete *, int, const QString & ) ) );
+ connect( worker, TQT_SIGNAL( finished( ExchangeDelete *, int, const TQString & ) ),
+ TQT_SLOT( slotRemoveFinished( ExchangeDelete *, int, const TQString & ) ) );
}
void ExchangeClient::slotDownloadFinished( ExchangeDownload *worker,
- int result, const QString &moreInfo )
+ int result, const TQString &moreInfo )
{
emit downloadFinished( result, moreInfo );
worker->deleteLater();
}
-void ExchangeClient::slotDownloadFinished( ExchangeDownload* worker, int result, const QString& moreInfo, QPtrList<KCal::Event>& events )
+void ExchangeClient::slotDownloadFinished( ExchangeDownload* worker, int result, const TQString& moreInfo, TQPtrList<KCal::Event>& events )
{
emit downloadFinished( result, moreInfo, events );
worker->deleteLater();
}
-void ExchangeClient::slotUploadFinished( ExchangeUpload* worker, int result, const QString& moreInfo )
+void ExchangeClient::slotUploadFinished( ExchangeUpload* worker, int result, const TQString& moreInfo )
{
kdDebug() << "ExchangeClient::slotUploadFinished()" << endl;
emit uploadFinished( result, moreInfo );
worker->deleteLater();
}
-void ExchangeClient::slotRemoveFinished( ExchangeDelete* worker, int result, const QString& moreInfo )
+void ExchangeClient::slotRemoveFinished( ExchangeDelete* worker, int result, const TQString& moreInfo )
{
kdDebug() << "ExchangeClient::slotRemoveFinished()" << endl;
emit removeFinished( result, moreInfo );
@@ -211,27 +211,27 @@ void ExchangeClient::slotRemoveFinished( ExchangeDelete* worker, int result, con
}
int ExchangeClient::downloadSynchronous( KCal::Calendar *calendar,
- const QDate &start, const QDate &end,
+ const TQDate &start, const TQDate &end,
bool showProgress )
{
kdDebug() << "ExchangeClient::downloadSynchronous()" << endl;
mClientState = WaitingForResult;
- connect( this, SIGNAL( downloadFinished( int, const QString & ) ),
- SLOT( slotSyncFinished( int, const QString & ) ) );
+ connect( this, TQT_SIGNAL( downloadFinished( int, const TQString & ) ),
+ TQT_SLOT( slotSyncFinished( int, const TQString & ) ) );
download( calendar, start, end, showProgress );
// TODO: Remove this busy loop
- QApplication::setOverrideCursor
+ TQApplication::setOverrideCursor
( KCursor::waitCursor() );
do {
qApp->processEvents();
} while ( mClientState == WaitingForResult );
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
- disconnect( this, SIGNAL( downloadFinished( int, const QString & ) ),
- this, SLOT( slotSyncFinished( int, const QString & ) ) );
+ disconnect( this, TQT_SIGNAL( downloadFinished( int, const TQString & ) ),
+ this, TQT_SLOT( slotSyncFinished( int, const TQString & ) ) );
return mSyncResult;
}
@@ -239,42 +239,42 @@ int ExchangeClient::downloadSynchronous( KCal::Calendar *calendar,
int ExchangeClient::uploadSynchronous( KCal::Event* event )
{
mClientState = WaitingForResult;
- connect( this, SIGNAL( uploadFinished( int, const QString & ) ),
- SLOT( slotSyncFinished( int, const QString & ) ) );
+ connect( this, TQT_SIGNAL( uploadFinished( int, const TQString & ) ),
+ TQT_SLOT( slotSyncFinished( int, const TQString & ) ) );
upload( event );
// TODO: Remove this busy loop
- QApplication::setOverrideCursor( KCursor::waitCursor() );
+ TQApplication::setOverrideCursor( KCursor::waitCursor() );
do {
qApp->processEvents();
} while ( mClientState == WaitingForResult );
- QApplication::restoreOverrideCursor();
- disconnect( this, SIGNAL( uploadFinished( int, const QString & ) ),
- this, SLOT( slotSyncFinished( int, const QString & ) ) );
+ TQApplication::restoreOverrideCursor();
+ disconnect( this, TQT_SIGNAL( uploadFinished( int, const TQString & ) ),
+ this, TQT_SLOT( slotSyncFinished( int, const TQString & ) ) );
return mSyncResult;
}
int ExchangeClient::removeSynchronous( KCal::Event* event )
{
mClientState = WaitingForResult;
- connect( this, SIGNAL( removeFinished( int, const QString & ) ),
- SLOT( slotSyncFinished( int, const QString & ) ) );
+ connect( this, TQT_SIGNAL( removeFinished( int, const TQString & ) ),
+ TQT_SLOT( slotSyncFinished( int, const TQString & ) ) );
remove( event );
// TODO: Remove this busy loop
- QApplication::setOverrideCursor( KCursor::waitCursor() );
+ TQApplication::setOverrideCursor( KCursor::waitCursor() );
do {
qApp->processEvents();
} while ( mClientState == WaitingForResult );
- QApplication::restoreOverrideCursor();
- disconnect( this, SIGNAL( removeFinished( int, const QString & ) ),
- this, SLOT( slotSyncFinished( int, const QString & ) ) );
+ TQApplication::restoreOverrideCursor();
+ disconnect( this, TQT_SIGNAL( removeFinished( int, const TQString & ) ),
+ this, TQT_SLOT( slotSyncFinished( int, const TQString & ) ) );
return mSyncResult;
}
-void ExchangeClient::slotSyncFinished( int result, const QString &moreInfo )
+void ExchangeClient::slotSyncFinished( int result, const TQString &moreInfo )
{
kdDebug() << "Exchangeclient::slotSyncFinished("<<result<<","<<moreInfo<<")" << endl;
if ( mClientState == WaitingForResult ) {
@@ -284,7 +284,7 @@ void ExchangeClient::slotSyncFinished( int result, const QString &moreInfo )
}
}
-QString ExchangeClient::detailedErrorString()
+TQString ExchangeClient::detailedErrorString()
{
return mDetailedErrorString;
}
diff --git a/libkpimexchange/core/exchangeclient.h b/libkpimexchange/core/exchangeclient.h
index b887dac50..2a1e6b508 100644
--- a/libkpimexchange/core/exchangeclient.h
+++ b/libkpimexchange/core/exchangeclient.h
@@ -20,11 +20,11 @@
#ifndef KDEPIM_EXCHANGE_CLIENT_H
#define KDEPIM_EXCHANGE_CLIENT_H
-#include <qstring.h>
-#include <qdatetime.h>
-#include <qobject.h>
-#include <qhostaddress.h>
-#include <qptrlist.h>
+#include <tqstring.h>
+#include <tqdatetime.h>
+#include <tqobject.h>
+#include <tqhostaddress.h>
+#include <tqptrlist.h>
#include <kdepimmacros.h>
@@ -45,27 +45,27 @@ class ExchangeUpload;
class ExchangeDelete;
//class ExchangeMonitor;
-class KDE_EXPORT ExchangeClient : public QObject {
+class KDE_EXPORT ExchangeClient : public TQObject {
Q_OBJECT
public:
- ExchangeClient( ExchangeAccount* account, const QString& mTimeZoneId=QString::null );
+ ExchangeClient( ExchangeAccount* account, const TQString& mTimeZoneId=TQString::null );
~ExchangeClient();
/**
* Associate this client with a window given by @p window.
*/
- void setWindow(QWidget *window);
+ void setWindow(TQWidget *window);
/**
* Returns the window this client is associated with.
*/
- QWidget *window() const;
+ TQWidget *window() const;
/**
* Set the time zone to use
*/
- void setTimeZoneId( const QString& timeZoneId );
- QString timeZoneId();
+ void setTimeZoneId( const TQString& timeZoneId );
+ TQString timeZoneId();
// synchronous functions
enum {
@@ -80,29 +80,29 @@ class KDE_EXPORT ExchangeClient : public QObject {
DeleteUnknownEventError /** The event to be deleted does not exist on the server */
};
- int downloadSynchronous( KCal::Calendar* calendar, const QDate& start, const QDate& end, bool showProgress=false);
+ int downloadSynchronous( KCal::Calendar* calendar, const TQDate& start, const TQDate& end, bool showProgress=false);
int uploadSynchronous( KCal::Event* event );
int removeSynchronous( KCal::Event* event );
- // ExchangeMonitor* monitor( int pollMode, const QHostAddress& ownInterface );
+ // ExchangeMonitor* monitor( int pollMode, const TQHostAddress& ownInterface );
- QString detailedErrorString();
+ TQString detailedErrorString();
public slots:
// Asynchronous functions, wait for "finished" signals for result
// Deprecated: use download() without the Calendar* argument instead
- void download( KCal::Calendar* calendar, const QDate& start, const QDate& end, bool showProgress=false);
- void download( const QDate& start, const QDate& end, bool showProgress=false);
+ void download( KCal::Calendar* calendar, const TQDate& start, const TQDate& end, bool showProgress=false);
+ void download( const TQDate& start, const TQDate& end, bool showProgress=false);
void upload( KCal::Event* event );
void remove( KCal::Event* event );
void test();
private slots:
- void slotDownloadFinished( ExchangeDownload* worker, int result, const QString& moreInfo );
- void slotDownloadFinished( ExchangeDownload* worker, int result, const QString& moreInfo, QPtrList<KCal::Event>& );
- void slotUploadFinished( ExchangeUpload* worker, int result, const QString& moreInfo );
- void slotRemoveFinished( ExchangeDelete* worker, int result, const QString& moreInfo );
- void slotSyncFinished( int result, const QString& moreInfo );
+ void slotDownloadFinished( ExchangeDownload* worker, int result, const TQString& moreInfo );
+ void slotDownloadFinished( ExchangeDownload* worker, int result, const TQString& moreInfo, TQPtrList<KCal::Event>& );
+ void slotUploadFinished( ExchangeUpload* worker, int result, const TQString& moreInfo );
+ void slotRemoveFinished( ExchangeDelete* worker, int result, const TQString& moreInfo );
+ void slotSyncFinished( int result, const TQString& moreInfo );
signals:
// Useful for progress dialogs, shows how much still needs to be done.
@@ -110,11 +110,11 @@ class KDE_EXPORT ExchangeClient : public QObject {
void startDownload();
void finishDownload();
- void downloadFinished( int result, const QString& moreInfo );
+ void downloadFinished( int result, const TQString& moreInfo );
void event( KCal::Event* event, const KURL& url);
- void downloadFinished( int result, const QString& moreInfo, QPtrList<KCal::Event>& events );
- void uploadFinished( int result, const QString& moreInfo );
- void removeFinished( int result, const QString& moreInfo );
+ void downloadFinished( int result, const TQString& moreInfo, TQPtrList<KCal::Event>& events );
+ void uploadFinished( int result, const TQString& moreInfo );
+ void removeFinished( int result, const TQString& moreInfo );
private:
void test2();
@@ -123,10 +123,10 @@ class KDE_EXPORT ExchangeClient : public QObject {
int mClientState;
int mSyncResult;
- QString mDetailedErrorString;
- QWidget* mWindow;
+ TQString mDetailedErrorString;
+ TQWidget* mWindow;
ExchangeAccount* mAccount;
- QString mTimeZoneId;
+ TQString mTimeZoneId;
};
}
diff --git a/libkpimexchange/core/exchangedelete.cpp b/libkpimexchange/core/exchangedelete.cpp
index 8495afa36..f88b22efd 100644
--- a/libkpimexchange/core/exchangedelete.cpp
+++ b/libkpimexchange/core/exchangedelete.cpp
@@ -18,8 +18,8 @@
Boston, MA 02110-1301, USA.
*/
-#include <qstring.h>
-#include <qregexp.h>
+#include <tqstring.h>
+#include <tqregexp.h>
#include <kurl.h>
#include <kdebug.h>
@@ -48,7 +48,7 @@ using namespace KPIM;
// recurrent appointments? Maybe, so we just look for Master or Single
// instancetypes
-ExchangeDelete::ExchangeDelete( KCal::Event* event, ExchangeAccount* account, QWidget* window ) :
+ExchangeDelete::ExchangeDelete( KCal::Event* event, ExchangeAccount* account, TQWidget* window ) :
mWindow( window )
{
kdDebug() << "Created ExchangeDelete" << endl;
@@ -63,9 +63,9 @@ ExchangeDelete::~ExchangeDelete()
kdDebug() << "ExchangeDelete destructor" << endl;
}
-void ExchangeDelete::findUidSingleMaster( QString const& uid )
+void ExchangeDelete::findUidSingleMaster( TQString const& uid )
{
- QString query =
+ TQString query =
"SELECT \"DAV:href\", \"urn:schemas:calendar:uid\"\r\n"
"FROM Scope('shallow traversal of \"\"')\r\n"
"WHERE \"urn:schemas:calendar:uid\" = '" + uid + "'\r\n"
@@ -74,27 +74,27 @@ void ExchangeDelete::findUidSingleMaster( QString const& uid )
KIO::DavJob* job = KIO::davSearch( mAccount->calendarURL(), "DAV:", "sql", query, false );
job->setWindow( mWindow );
- connect(job, SIGNAL(result( KIO::Job * )), this, SLOT(slotFindUidResult(KIO::Job *)));
+ connect(job, TQT_SIGNAL(result( KIO::Job * )), this, TQT_SLOT(slotFindUidResult(KIO::Job *)));
}
void ExchangeDelete::slotFindUidResult( KIO::Job * job )
{
if ( job->error() ) {
job->showErrorDialog( 0L );
- emit finished( this, ExchangeClient::CommunicationError, "IO Error: " + QString::number(job->error()) + ":" + job->errorString() );
+ emit finished( this, ExchangeClient::CommunicationError, "IO Error: " + TQString::number(job->error()) + ":" + job->errorString() );
return;
}
- QDomDocument& response = static_cast<KIO::DavJob *>( job )->response();
+ TQDomDocument& response = static_cast<KIO::DavJob *>( job )->response();
- QDomElement item = response.documentElement().firstChild().toElement();
- QDomElement hrefElement = item.namedItem( "href" ).toElement();
+ TQDomElement item = response.documentElement().firstChild().toElement();
+ TQDomElement hrefElement = item.namedItem( "href" ).toElement();
if ( item.isNull() || hrefElement.isNull() ) {
// Not found
emit finished( this, ExchangeClient::DeleteUnknownEventError, "UID of event to be deleted not found on server\n"+response.toString() );
return;
}
// Found the appointment's URL
- QString href = hrefElement.text();
+ TQString href = hrefElement.text();
KURL url(href);
startDelete( toDAV( url ) );
@@ -104,7 +104,7 @@ void ExchangeDelete::startDelete( const KURL& url )
{
KIO::SimpleJob* job = KIO::file_delete( url, false ); // no GUI
job->setWindow( mWindow );
- connect( job, SIGNAL( result( KIO::Job * ) ), this, SLOT( slotDeleteResult( KIO::Job * ) ) );
+ connect( job, TQT_SIGNAL( result( KIO::Job * ) ), this, TQT_SLOT( slotDeleteResult( KIO::Job * ) ) );
}
void ExchangeDelete::slotDeleteResult( KIO::Job* job )
@@ -112,10 +112,10 @@ void ExchangeDelete::slotDeleteResult( KIO::Job* job )
kdDebug() << "Finished Delete" << endl;
if ( job->error() ) {
job->showErrorDialog( 0L );
- emit finished( this, ExchangeClient::CommunicationError, "IO Error: " + QString::number(job->error()) + ":" + job->errorString() );
+ emit finished( this, ExchangeClient::CommunicationError, "IO Error: " + TQString::number(job->error()) + ":" + job->errorString() );
return;
}
- emit finished( this, ExchangeClient::ResultOK, QString::null );
+ emit finished( this, ExchangeClient::ResultOK, TQString::null );
}
#include "exchangedelete.moc"
diff --git a/libkpimexchange/core/exchangedelete.h b/libkpimexchange/core/exchangedelete.h
index a9d933254..fb91b9122 100644
--- a/libkpimexchange/core/exchangedelete.h
+++ b/libkpimexchange/core/exchangedelete.h
@@ -20,8 +20,8 @@
#ifndef KDEPIM_EXCHANGE_DELETE_H
#define KDEPIM_EXCHANGE_DELETE_H
-#include <qstring.h>
-#include <qwidget.h>
+#include <tqstring.h>
+#include <tqwidget.h>
#include <kio/job.h>
#include <kdepimmacros.h>
@@ -33,10 +33,10 @@ namespace KPIM {
class ExchangeAccount;
-class KDE_EXPORT ExchangeDelete : public QObject {
+class KDE_EXPORT ExchangeDelete : public TQObject {
Q_OBJECT
public:
- ExchangeDelete( KCal::Event* event, ExchangeAccount* account, QWidget* window=0 );
+ ExchangeDelete( KCal::Event* event, ExchangeAccount* account, TQWidget* window=0 );
~ExchangeDelete();
private slots:
@@ -44,14 +44,14 @@ class KDE_EXPORT ExchangeDelete : public QObject {
void slotFindUidResult( KIO::Job * );
signals:
- void finished( ExchangeDelete* worker, int result, const QString& moreInfo );
+ void finished( ExchangeDelete* worker, int result, const TQString& moreInfo );
private:
- void findUidSingleMaster( QString const& uid );
+ void findUidSingleMaster( TQString const& uid );
void startDelete( const KURL& url );
ExchangeAccount* mAccount;
- QWidget* mWindow;
+ TQWidget* mWindow;
};
}
diff --git a/libkpimexchange/core/exchangedownload.cpp b/libkpimexchange/core/exchangedownload.cpp
index dcf469549..c8a0a2150 100644
--- a/libkpimexchange/core/exchangedownload.cpp
+++ b/libkpimexchange/core/exchangedownload.cpp
@@ -18,11 +18,11 @@
Boston, MA 02110-1301, USA.
*/
-#include <qfile.h>
-#include <qtextstream.h>
-#include <qdatastream.h>
-#include <qcstring.h>
-#include <qregexp.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
+#include <tqdatastream.h>
+#include <tqcstring.h>
+#include <tqregexp.h>
#include <kapplication.h>
#include <kconfig.h>
@@ -61,7 +61,7 @@ extern "C" {
using namespace KPIM;
-ExchangeDownload::ExchangeDownload( ExchangeAccount *account, QWidget *window )
+ExchangeDownload::ExchangeDownload( ExchangeAccount *account, TQWidget *window )
: mWindow( window )
{
kdDebug() << "ExchangeDownload()" << endl;
@@ -80,8 +80,8 @@ ExchangeDownload::~ExchangeDownload()
if ( mEvents ) delete mEvents;
}
-void ExchangeDownload::download( KCal::Calendar *calendar, const QDate &start,
- const QDate &end, bool showProgress )
+void ExchangeDownload::download( KCal::Calendar *calendar, const TQDate &start,
+ const TQDate &end, bool showProgress )
{
mCalendar = calendar;
mEvents = 0;
@@ -92,14 +92,14 @@ void ExchangeDownload::download( KCal::Calendar *calendar, const QDate &start,
mProgress = new ExchangeProgress();
mProgress->show();
- connect( this, SIGNAL( startDownload() ), mProgress,
- SLOT( slotTransferStarted() ) );
- connect( this, SIGNAL(finishDownload() ), mProgress,
- SLOT( slotTransferFinished() ) );
+ connect( this, TQT_SIGNAL( startDownload() ), mProgress,
+ TQT_SLOT( slotTransferStarted() ) );
+ connect( this, TQT_SIGNAL(finishDownload() ), mProgress,
+ TQT_SLOT( slotTransferFinished() ) );
#endif
}
- QString sql = dateSelectQuery( start, end.addDays( 1 ) );
+ TQString sql = dateSelectQuery( start, end.addDays( 1 ) );
kdDebug() << "Exchange download query: " << endl << sql << endl;
@@ -112,43 +112,43 @@ void ExchangeDownload::download( KCal::Calendar *calendar, const QDate &start,
sql, false );
KIO::Scheduler::scheduleJob( job );
job->setWindow( mWindow );
- connect( job, SIGNAL( result( KIO::Job * ) ),
- SLOT( slotSearchResult( KIO::Job *) ) );
+ connect( job, TQT_SIGNAL( result( KIO::Job * ) ),
+ TQT_SLOT( slotSearchResult( KIO::Job *) ) );
}
-void ExchangeDownload::download( const QDate& start, const QDate& end, bool showProgress )
+void ExchangeDownload::download( const TQDate& start, const TQDate& end, bool showProgress )
{
mCalendar = 0;
- mEvents = new QPtrList<KCal::Event>;
+ mEvents = new TQPtrList<KCal::Event>;
if( showProgress ) {
//kdDebug() << "Creating progress dialog" << endl;
mProgress = new ExchangeProgress();
mProgress->show();
- connect( this, SIGNAL(startDownload()), mProgress, SLOT(slotTransferStarted()) );
- connect( this, SIGNAL(finishDownload()), mProgress, SLOT(slotTransferFinished()) );
+ connect( this, TQT_SIGNAL(startDownload()), mProgress, TQT_SLOT(slotTransferStarted()) );
+ connect( this, TQT_SIGNAL(finishDownload()), mProgress, TQT_SLOT(slotTransferFinished()) );
}
- QString sql = dateSelectQuery( start, end.addDays( 1 ) );
+ TQString sql = dateSelectQuery( start, end.addDays( 1 ) );
increaseDownloads();
KIO::DavJob *job = KIO::davSearch( mAccount->calendarURL(), "DAV:", "sql", sql, false );
KIO::Scheduler::scheduleJob(job);
job->setWindow( mWindow );
- connect( job, SIGNAL( result( KIO::Job * ) ),
- SLOT( slotSearchResult( KIO::Job * ) ) );
+ connect( job, TQT_SIGNAL( result( KIO::Job * ) ),
+ TQT_SLOT( slotSearchResult( KIO::Job * ) ) );
}
// Original query TODO: make query configurable
-QString ExchangeDownload::dateSelectQuery( const QDate& start, const QDate& end )
+TQString ExchangeDownload::dateSelectQuery( const TQDate& start, const TQDate& end )
{
- QString startString;
+ TQString startString;
startString.sprintf("%04i/%02i/%02i",start.year(),start.month(),start.day());
- QString endString;
+ TQString endString;
endString.sprintf("%04i/%02i/%02i",end.year(),end.month(),end.day());
- QString sql =
+ TQString sql =
"SELECT \"DAV:href\", \"urn:schemas:calendar:instancetype\", \"urn:schemas:calendar:uid\"\r\n"
"FROM Scope('shallow traversal of \"\"')\r\n"
"WHERE \"urn:schemas:calendar:dtend\" > '" + startString + "'\r\n"
@@ -158,15 +158,15 @@ QString ExchangeDownload::dateSelectQuery( const QDate& start, const QDate& end
#if 0
// That's the "new" code that breaks with Exchange. It was meant for Opengroupware, but that got its own resource anyway
-QString ExchangeDownload::dateSelectQuery( const QDate& start, const QDate& end )
+TQString ExchangeDownload::dateSelectQuery( const TQDate& start, const TQDate& end )
{
- QString startString;
+ TQString startString;
startString.sprintf( "%04i-%02i-%02iT00:00:00Z", start.year(),
start.month(), start.day() );
- QString endString;
+ TQString endString;
endString.sprintf( "%04i-%02i-%02iT23:59:59Z", end.year(), end.month(),
end.day() );
- QString sql =
+ TQString sql =
"SELECT \"DAV:href\", \"urn:schemas:calendar:instancetype\", "
"\"urn:schemas:calendar:uid\"\r\n"
"FROM Scope('shallow traversal of \"\"')\r\n"
@@ -181,14 +181,14 @@ void ExchangeDownload::slotSearchResult( KIO::Job *job )
if ( job->error() ) {
kdError() << "ExchangeDownload::slotSearchResult() error: "
<< job->error() << endl;
- QString text = i18n("ExchangeDownload\nError accessing '%1': %2")
+ TQString text = i18n("ExchangeDownload\nError accessing '%1': %2")
.arg( mAccount->calendarURL().prettyURL() )
.arg( job->errorString() );
KMessageBox::error( 0, text );
finishUp( ExchangeClient::CommunicationError, job );
return;
}
- QDomDocument &response = static_cast<KIO::DavJob *>( job )->response();
+ TQDomDocument &response = static_cast<KIO::DavJob *>( job )->response();
kdDebug() << "Search result: " << endl << response.toString() << endl;
@@ -205,7 +205,7 @@ void ExchangeDownload::slotMasterResult( KIO::Job *job )
finishUp( ExchangeClient::CommunicationError, job );
return;
}
- QDomDocument &response = static_cast<KIO::DavJob *>( job )->response();
+ TQDomDocument &response = static_cast<KIO::DavJob *>( job )->response();
kdDebug() << "Search (master) result: " << endl << response.toString() << endl;
@@ -214,7 +214,7 @@ void ExchangeDownload::slotMasterResult( KIO::Job *job )
decreaseDownloads();
}
-void ExchangeDownload::handleAppointments( const QDomDocument &response,
+void ExchangeDownload::handleAppointments( const TQDomDocument &response,
bool recurrence )
{
kdDebug() << "Entering handleAppointments" << endl;
@@ -226,21 +226,21 @@ void ExchangeDownload::handleAppointments( const QDomDocument &response,
return;
}
- for( QDomElement item = response.documentElement().firstChild().toElement();
+ for( TQDomElement item = response.documentElement().firstChild().toElement();
!item.isNull();
item = item.nextSibling().toElement() ) {
//kdDebug() << "Current item:" << item.tagName() << endl;
- QDomNodeList propstats = item.elementsByTagNameNS( "DAV:", "propstat" );
+ TQDomNodeList propstats = item.elementsByTagNameNS( "DAV:", "propstat" );
// kdDebug() << "Item has " << propstats.count() << " propstat children" << endl;
for( uint i=0; i < propstats.count(); i++ ) {
- QDomElement propstat = propstats.item(i).toElement();
- QDomElement prop = propstat.namedItem( "prop" ).toElement();
+ TQDomElement propstat = propstats.item(i).toElement();
+ TQDomElement prop = propstat.namedItem( "prop" ).toElement();
if ( prop.isNull() ) {
kdError() << "Error: no <prop> in response" << endl;
continue;
}
- QDomElement instancetypeElement = prop.namedItem( "instancetype" ).toElement();
+ TQDomElement instancetypeElement = prop.namedItem( "instancetype" ).toElement();
if ( instancetypeElement.isNull() ) {
kdError() << "Error: no instance type in Exchange server reply" << endl;
continue;
@@ -249,12 +249,12 @@ void ExchangeDownload::handleAppointments( const QDomDocument &response,
//kdDebug() << "Instance type: " << instanceType << endl;
if ( recurrence && instanceType > 0 ) {
- QDomElement uidElement = prop.namedItem( "uid" ).toElement();
+ TQDomElement uidElement = prop.namedItem( "uid" ).toElement();
if ( uidElement.isNull() ) {
kdError() << "Error: no uid in Exchange server reply" << endl;
continue;
}
- QString uid = uidElement.text();
+ TQString uid = uidElement.text();
if ( ! m_uids.contains( uid ) ) {
m_uids[uid] = 1;
handleRecurrence(uid);
@@ -263,12 +263,12 @@ void ExchangeDownload::handleAppointments( const QDomDocument &response,
continue;
}
- QDomElement hrefElement = prop.namedItem( "href" ).toElement();
+ TQDomElement hrefElement = prop.namedItem( "href" ).toElement();
if ( hrefElement.isNull() ) {
kdError() << "Error: no href in Exchange server reply" << endl;
continue;
}
- QString href = hrefElement.text();
+ TQString href = hrefElement.text();
KURL url(href);
kdDebug() << "Getting appointment from url: " << url.prettyURL() << endl;
@@ -283,10 +283,10 @@ void ExchangeDownload::handleAppointments( const QDomDocument &response,
}
}
-void ExchangeDownload::handleRecurrence( QString uid )
+void ExchangeDownload::handleRecurrence( TQString uid )
{
// kdDebug() << "Handling recurrence info for uid=" << uid << endl;
- QString query =
+ TQString query =
"SELECT \"DAV:href\", \"urn:schemas:calendar:instancetype\"\r\n"
"FROM Scope('shallow traversal of \"\"')\r\n"
"WHERE \"urn:schemas:calendar:uid\" = '" + uid + "'\r\n"
@@ -301,15 +301,15 @@ void ExchangeDownload::handleRecurrence( QString uid )
query, false );
KIO::Scheduler::scheduleJob( job );
job->setWindow( mWindow );
- connect( job, SIGNAL( result( KIO::Job * ) ),
- SLOT( slotMasterResult( KIO::Job * ) ) );
+ connect( job, TQT_SIGNAL( result( KIO::Job * ) ),
+ TQT_SLOT( slotMasterResult( KIO::Job * ) ) );
}
void ExchangeDownload::readAppointment( const KURL& url )
{
- QDomDocument doc;
- QDomElement root = addElement( doc, doc, "DAV:", "propfind" );
- QDomElement prop = addElement( doc, root, "DAV:", "prop" );
+ TQDomDocument doc;
+ TQDomElement root = addElement( doc, doc, "DAV:", "propfind" );
+ TQDomElement prop = addElement( doc, root, "DAV:", "prop" );
addElement( doc, prop, "urn:schemas:calendar:", "uid" );
addElement( doc, prop, "urn:schemas:calendar:", "timezoneid" );
addElement( doc, prop, "urn:schemas:calendar:", "timezone" );
@@ -349,8 +349,8 @@ void ExchangeDownload::readAppointment( const KURL& url )
KIO::Scheduler::scheduleJob( job );
job->setWindow( mWindow );
job->addMetaData( "errorPage", "false" );
- connect( job, SIGNAL( result( KIO::Job * ) ),
- SLOT( slotPropFindResult( KIO::Job * ) ) );
+ connect( job, TQT_SIGNAL( result( KIO::Job * ) ),
+ TQT_SLOT( slotPropFindResult( KIO::Job * ) ) );
}
void ExchangeDownload::slotPropFindResult( KIO::Job *job )
@@ -364,16 +364,16 @@ void ExchangeDownload::slotPropFindResult( KIO::Job *job )
return;
}
- QDomDocument response = static_cast<KIO::DavJob *>( job )->response();
+ TQDomDocument response = static_cast<KIO::DavJob *>( job )->response();
kdDebug() << "Response: " << endl;
kdDebug() << response.toString() << endl;
- QDomElement prop = response.documentElement().namedItem( "response" )
+ TQDomElement prop = response.documentElement().namedItem( "response" )
.namedItem( "propstat" ).namedItem( "prop" ).toElement();
KCal::Event* event = new KCal::Event();
- QDomElement uidElement = prop.namedItem( "uid" ).toElement();
+ TQDomElement uidElement = prop.namedItem( "uid" ).toElement();
if ( uidElement.isNull() ) {
kdError() << "Error: no uid in Exchange server reply" << endl;
finishUp( ExchangeClient::IllegalAppointmentError,
@@ -383,14 +383,14 @@ void ExchangeDownload::slotPropFindResult( KIO::Job *job )
event->setUid( uidElement.text() );
// kdDebug() << "Got UID: " << uidElement.text() << endl;
- QString timezoneid = prop.namedItem( "timezoneid" ).toElement().text();
+ TQString timezoneid = prop.namedItem( "timezoneid" ).toElement().text();
// kdDebug() << "DEBUG: timezoneid = " << timezoneid << endl;
- QString timezone = prop.namedItem( "timezone" ).toElement().text();
+ TQString timezone = prop.namedItem( "timezone" ).toElement().text();
// kdDebug() << "DEBUG: timezone = " << timezone << endl;
// mFormat is used for parsing recurrence rules.
- QString localTimeZoneId;
+ TQString localTimeZoneId;
if ( mCalendar ) {
mFormat->setTimeZone( mCalendar->timeZoneId(), !mCalendar->isLocalTime() );
localTimeZoneId = mCalendar->timeZoneId();
@@ -399,65 +399,65 @@ void ExchangeDownload::slotPropFindResult( KIO::Job *job )
// If no mCalendar, stay in UTC
}
- QString lastModified = prop.namedItem( "lastmodified" ).toElement().text();
+ TQString lastModified = prop.namedItem( "lastmodified" ).toElement().text();
if ( !lastModified.isEmpty() ) {
- QDateTime dt = utcAsZone( QDateTime::fromString( lastModified, Qt::ISODate ), localTimeZoneId );
+ TQDateTime dt = utcAsZone( TQDateTime::fromString( lastModified, Qt::ISODate ), localTimeZoneId );
event->setLastModified( dt );
kdDebug() << "Got lastModified:" << lastModified << ", " << dt.toString() << endl;
}
- QString organizer = prop.namedItem( "organizer" ).toElement().text();
+ TQString organizer = prop.namedItem( "organizer" ).toElement().text();
// TODO: Does outlook have a common name? Or does the organizer already contain both?
event->setOrganizer( organizer );
// kdDebug() << "Got organizer: " << organizer << endl;
// Trying to find attendees, not working yet
- QString contact = prop.namedItem( "contact" ).toElement().text();
+ TQString contact = prop.namedItem( "contact" ).toElement().text();
// event->setOrganizer( organizer );
// kdDebug() << "DEBUG: Got contact: " << contact << endl;
// This looks promising for finding attendees
// FIXME: get this to work
- QString to = prop.namedItem( "to" ).toElement().text();
+ TQString to = prop.namedItem( "to" ).toElement().text();
// kdDebug() << "DEBUG: Got to: " << to << endl;
- QStringList attn = QStringList::split( ",", to ); // This doesn't work: there can be commas between ""
- QStringList::iterator it;
+ TQStringList attn = TQStringList::split( ",", to ); // This doesn't work: there can be commas between ""
+ TQStringList::iterator it;
for ( it = attn.begin(); it != attn.end(); ++it ) {
// kdDebug() << " attendee: " << (*it) << endl;
- QString name = "";
+ TQString name = "";
// KCal::Attendee* a = new KCal::Attendee( name, email );
// event->addAttendee( a );
}
- QString readonly = prop.namedItem( "isreadonly" ).toElement().text();
+ TQString readonly = prop.namedItem( "isreadonly" ).toElement().text();
event->setReadOnly( readonly == "1" );
kdDebug() << "Got readonly: " << readonly << ":" << (readonly != "0") << endl;
- QString created = prop.namedItem( "created" ).toElement().text();
+ TQString created = prop.namedItem( "created" ).toElement().text();
if ( !created.isEmpty() ) {
- QDateTime dt = utcAsZone( QDateTime::fromString( created, Qt::ISODate ),
+ TQDateTime dt = utcAsZone( TQDateTime::fromString( created, Qt::ISODate ),
localTimeZoneId );
event->setCreated( dt );
kdDebug() << "got created: " << dt.toString() << endl;
}
- QString dtstart = prop.namedItem( "dtstart" ).toElement().text();
+ TQString dtstart = prop.namedItem( "dtstart" ).toElement().text();
if ( !dtstart.isEmpty() ) {
- QDateTime dt = utcAsZone( QDateTime::fromString( dtstart, Qt::ISODate ),
+ TQDateTime dt = utcAsZone( TQDateTime::fromString( dtstart, Qt::ISODate ),
localTimeZoneId );
event->setDtStart( dt );
kdDebug() << "got dtstart: " << dtstart << " becomes in timezone " << dt.toString() << endl;
}
- QString alldayevent = prop.namedItem( "alldayevent" ).toElement().text();
+ TQString alldayevent = prop.namedItem( "alldayevent" ).toElement().text();
bool floats = alldayevent.toInt() != 0;
event->setFloats( floats );
kdDebug() << "Got alldayevent: \"" << alldayevent << "\":" << floats << endl;
- QString dtend = prop.namedItem( "dtend" ).toElement().text();
+ TQString dtend = prop.namedItem( "dtend" ).toElement().text();
if ( !dtend.isEmpty() ) {
- QDateTime dt = utcAsZone( QDateTime::fromString( dtend, Qt::ISODate ),
+ TQDateTime dt = utcAsZone( TQDateTime::fromString( dtend, Qt::ISODate ),
localTimeZoneId );
// Outlook thinks differently about floating event timing than libkcal
if ( floats ) dt = dt.addDays( -1 );
@@ -465,24 +465,24 @@ void ExchangeDownload::slotPropFindResult( KIO::Job *job )
kdDebug() << "got dtend: " << dtend << " becomes in timezone " << dt.toString() << endl;
}
- QString transparent = prop.namedItem( "transparent" ).toElement().text();
+ TQString transparent = prop.namedItem( "transparent" ).toElement().text();
event->setTransparency( transparent.toInt() > 0 ? KCal::Event::Transparent
: KCal::Event::Opaque );
// kdDebug() << "Got transparent: " << transparent << endl;
- QString description = prop.namedItem( "textdescription" ).toElement().text();
+ TQString description = prop.namedItem( "textdescription" ).toElement().text();
event->setDescription( description );
kdDebug() << "Got description: " << description << endl;
- QString subject = prop.namedItem( "subject" ).toElement().text();
+ TQString subject = prop.namedItem( "subject" ).toElement().text();
event->setSummary( subject );
kdDebug() << "Got summary: " << subject << endl;
- QString location = prop.namedItem( "location" ).toElement().text();
+ TQString location = prop.namedItem( "location" ).toElement().text();
event->setLocation( location );
// kdDebug() << "Got location: " << location << endl;
- QString rrule = prop.namedItem( "rrule" ).toElement().text();
+ TQString rrule = prop.namedItem( "rrule" ).toElement().text();
kdDebug() << "Got rrule: " << rrule << endl;
if ( !rrule.isEmpty() ) {
// Timezone should be handled automatically
@@ -494,23 +494,23 @@ void ExchangeDownload::slotPropFindResult( KIO::Job *job )
}
}
- QDomElement keywords = prop.namedItem( "Keywords" ).toElement();
- QStringList categories;
- QDomNodeList list = keywords.elementsByTagNameNS( "xml:", "v" );
+ TQDomElement keywords = prop.namedItem( "Keywords" ).toElement();
+ TQStringList categories;
+ TQDomNodeList list = keywords.elementsByTagNameNS( "xml:", "v" );
for( uint i=0; i < list.count(); i++ ) {
- QDomElement item = list.item(i).toElement();
+ TQDomElement item = list.item(i).toElement();
categories.append( item.text() );
}
event->setCategories( categories );
// kdDebug() << "Got categories: " << categories.join( ", " ) << endl;
- QDomElement exdate = prop.namedItem( "exdate" ).toElement();
+ TQDomElement exdate = prop.namedItem( "exdate" ).toElement();
KCal::DateList exdates;
list = exdate.elementsByTagNameNS( "xml:", "v" );
for( uint i=0; i < list.count(); i++ ) {
- QDomElement item = list.item(i).toElement();
- QDate date = utcAsZone( QDateTime::fromString( item.text(), Qt::ISODate ), localTimeZoneId ).date();
+ TQDomElement item = list.item(i).toElement();
+ TQDate date = utcAsZone( TQDateTime::fromString( item.text(), Qt::ISODate ), localTimeZoneId ).date();
exdates.append( date );
// kdDebug() << "Got exdate: " << date.toString() << endl;
}
@@ -521,7 +521,7 @@ void ExchangeDownload::slotPropFindResult( KIO::Job *job )
// 1 Personal
// 2 Private
// 3 Company Confidential
- QString sensitivity = prop.namedItem( "sensitivity" ).toElement().text();
+ TQString sensitivity = prop.namedItem( "sensitivity" ).toElement().text();
if ( ! sensitivity.isNull() )
switch( sensitivity.toInt() ) {
case 0: event->setSecrecy( KCal::Incidence::SecrecyPublic ); break;
@@ -533,7 +533,7 @@ void ExchangeDownload::slotPropFindResult( KIO::Job *job )
// kdDebug() << "Got sensitivity: " << sensitivity << endl;
- QString reminder = prop.namedItem( "reminderoffset" ).toElement().text();
+ TQString reminder = prop.namedItem( "reminderoffset" ).toElement().text();
// kdDebug() << "Reminder offset: " << reminder << endl;
if ( !reminder.isEmpty() ) {
// Duration before event in seconds
@@ -555,10 +555,10 @@ void ExchangeDownload::slotPropFindResult( KIO::Job *job )
//void addRelation(Incidence *);
/** set the list of attachments/associated files for this event */
- //void setAttachments(const QStringList &attachments);
+ //void setAttachments(const TQStringList &attachments);
/** set resources used, such as Office, Car, etc. */
- //void setResources(const QStringList &resources);
+ //void setResources(const TQStringList &resources);
/** set the event's priority, 0 is undefined, 1 highest (decreasing order) */
//void setPriority(int priority);
@@ -613,7 +613,7 @@ void ExchangeDownload::decreaseDownloads()
}
}
-void ExchangeDownload::finishUp( int result, const QString &moreInfo )
+void ExchangeDownload::finishUp( int result, const TQString &moreInfo )
{
kdDebug() << "ExchangeDownload::finishUp() " << result << " "
<< moreInfo << endl;
@@ -635,8 +635,8 @@ void ExchangeDownload::finishUp( int result, const QString &moreInfo )
void ExchangeDownload::finishUp( int result, KIO::Job *job )
{
- finishUp( result, QString("WebDAV job error code = ") +
- QString::number( job->error() ) + ";\n" + "\"" +
+ finishUp( result, TQString("WebDAV job error code = ") +
+ TQString::number( job->error() ) + ";\n" + "\"" +
job->errorString() + "\"" );
}
diff --git a/libkpimexchange/core/exchangedownload.h b/libkpimexchange/core/exchangedownload.h
index a43d82692..6eab9f565 100644
--- a/libkpimexchange/core/exchangedownload.h
+++ b/libkpimexchange/core/exchangedownload.h
@@ -20,11 +20,11 @@
#ifndef KDEPIM_EXCHANGE_DOWNLOAD_H
#define KDEPIM_EXCHANGE_DOWNLOAD_H
-#include <qstring.h>
-#include <qptrlist.h>
-#include <qdatetime.h>
-#include <qdom.h>
-#include <qmap.h>
+#include <tqstring.h>
+#include <tqptrlist.h>
+#include <tqdatetime.h>
+#include <tqdom.h>
+#include <tqmap.h>
#include <kio/job.h>
#include <libkcal/calendar.h>
@@ -35,23 +35,23 @@ namespace KPIM {
class ExchangeProgress;
class ExchangeAccount;
-class ExchangeDownload : public QObject {
+class ExchangeDownload : public TQObject {
Q_OBJECT
public:
- ExchangeDownload( ExchangeAccount* account, QWidget* window=0 );
+ ExchangeDownload( ExchangeAccount* account, TQWidget* window=0 );
~ExchangeDownload();
void download( KCal::Calendar* calendar,
- const QDate& start, const QDate& end, bool showProgress );
- void download( const QDate& start, const QDate& end, bool showProgress );
+ const TQDate& start, const TQDate& end, bool showProgress );
+ void download( const TQDate& start, const TQDate& end, bool showProgress );
signals:
void startDownload();
void finishDownload();
void gotEvent( KCal::Event* event, const KURL& url );
- void finished( ExchangeDownload*, int result, const QString& moreInfo );
- void finished( ExchangeDownload*, int result, const QString& moreInfo, QPtrList<KCal::Event>& events );
+ void finished( ExchangeDownload*, int result, const TQString& moreInfo );
+ void finished( ExchangeDownload*, int result, const TQString& moreInfo, TQPtrList<KCal::Event>& events );
private slots:
void slotSearchResult( KIO::Job *job );
@@ -59,28 +59,28 @@ class ExchangeDownload : public QObject {
void slotPropFindResult( KIO::Job * );
private:
- void handleAppointments( const QDomDocument &, bool recurrence );
+ void handleAppointments( const TQDomDocument &, bool recurrence );
void readAppointment( const KURL& url );
- void handleRecurrence( QString uid );
- void finishUp( int result, const QString& moreInfo=QString::null );
+ void handleRecurrence( TQString uid );
+ void finishUp( int result, const TQString& moreInfo=TQString::null );
void finishUp( int result, KIO::Job* job );
void increaseDownloads();
void decreaseDownloads();
- QString dateSelectQuery( const QDate& start, const QDate& end );
+ TQString dateSelectQuery( const TQDate& start, const TQDate& end );
KCal::Calendar *mCalendar;
KCal::ICalFormat *mFormat;
- QPtrList<KCal::Event> *mEvents;
+ TQPtrList<KCal::Event> *mEvents;
ExchangeAccount *mAccount;
ExchangeProgress *mProgress;
int mDownloadsBusy;
- QDomDocument mResponse;
+ TQDomDocument mResponse;
- QMap<QString,int> m_uids; // This keeps track of uids we already covered. Especially useful for
+ TQMap<TQString,int> m_uids; // This keeps track of uids we already covered. Especially useful for
// recurring events.
- QWidget* mWindow;
+ TQWidget* mWindow;
};
}
diff --git a/libkpimexchange/core/exchangemonitor.cpp b/libkpimexchange/core/exchangemonitor.cpp
index c659efb15..8e5525038 100644
--- a/libkpimexchange/core/exchangemonitor.cpp
+++ b/libkpimexchange/core/exchangemonitor.cpp
@@ -18,11 +18,11 @@
Boston, MA 02110-1301, USA.
*/
-#include <qstring.h>
-#include <qregexp.h>
-#include <qsocketdevice.h>
-#include <qsocketnotifier.h>
-#include <qtextstream.h>
+#include <tqstring.h>
+#include <tqregexp.h>
+#include <tqsocketdevice.h>
+#include <tqsocketnotifier.h>
+#include <tqtextstream.h>
#include <kurl.h>
#include <kdebug.h>
@@ -54,24 +54,24 @@ extern "C" {
using namespace KPIM;
-QString makeIDString( const ExchangeMonitor::IDList& IDs )
+TQString makeIDString( const ExchangeMonitor::IDList& IDs )
{
- QString result;
+ TQString result;
ExchangeMonitor::IDList::ConstIterator it;
for ( it = IDs.begin(); it != IDs.end(); ++it ) {
if ( it == IDs.begin() )
- result += QString::number( (*it) );
+ result += TQString::number( (*it) );
else
- result += "," + QString::number( (*it) );
+ result += "," + TQString::number( (*it) );
}
return result;
}
-ExchangeMonitor::IDList makeIDList( const QString& input )
+ExchangeMonitor::IDList makeIDList( const TQString& input )
{
ExchangeMonitor::IDList IDs;
- QStringList numbers = QStringList::split( ",", input );
- QStringList::iterator j;
+ TQStringList numbers = TQStringList::split( ",", input );
+ TQStringList::iterator j;
for ( j = numbers.begin(); j != numbers.end(); ++j ) {
ExchangeMonitor::ID id = (*j).toLong();
IDs.append( id );
@@ -79,7 +79,7 @@ ExchangeMonitor::IDList makeIDList( const QString& input )
return IDs;
}
-ExchangeMonitor::ExchangeMonitor( ExchangeAccount* account, int pollMode, const QHostAddress& ownInterface )
+ExchangeMonitor::ExchangeMonitor( ExchangeAccount* account, int pollMode, const TQHostAddress& ownInterface )
{
kdDebug() << "Called ExchangeMonitor" << endl;
@@ -89,12 +89,12 @@ ExchangeMonitor::ExchangeMonitor( ExchangeAccount* account, int pollMode, const
mPollTimer = 0;
if ( pollMode == CallBack ) {
- mSocket = new QSocketDevice( QSocketDevice::Datagram );
+ mSocket = new TQSocketDevice( TQSocketDevice::Datagram );
if ( ! mSocket->bind( ownInterface, 0 ) )
kdDebug() << "bind() returned false" << endl;
mSocket->setBlocking( false );
- mNotifier = new QSocketNotifier( mSocket->socket(), QSocketNotifier::Read );
- connect( mNotifier, SIGNAL(activated( int )), this, SLOT( slotActivated(int)));
+ mNotifier = new TQSocketNotifier( mSocket->socket(), TQSocketNotifier::Read );
+ connect( mNotifier, TQT_SIGNAL(activated( int )), this, TQT_SLOT( slotActivated(int)));
//mSocket.setSocketFlags( KExtendedSocket::inetSocket | KExtendedSocket::passiveSocket | KExtendedSocket::datagramSocket | KExtendedSocket::bufferedSocket );
//mSocket.setHost( "jupiter.tbm.tudelft.nl" ); // Does this work?
@@ -105,17 +105,17 @@ ExchangeMonitor::ExchangeMonitor( ExchangeAccount* account, int pollMode, const
//mSocket.enableRead( true );
kdDebug() << "Port: " << mSocket->port() << endl;
kdDebug() << "Host: " << mSocket->address().toString() << endl;
- // mStream = new QTextStream( mSocket );
+ // mStream = new TQTextStream( mSocket );
}
if ( mPollMode == Poll ) {
- mPollTimer = new QTimer( this, "mPollTimer" );
- connect( mPollTimer, SIGNAL(timeout()), this, SLOT(slotPollTimer()) );
+ mPollTimer = new TQTimer( this, "mPollTimer" );
+ connect( mPollTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotPollTimer()) );
mPollTimer->start( 60000 ); // 1 minute timer
}
- mRenewTimer = new QTimer( this, "mRenewTimer" );
- connect( mRenewTimer, SIGNAL(timeout()), this, SLOT(slotRenewTimer()) );
+ mRenewTimer = new TQTimer( this, "mRenewTimer" );
+ connect( mRenewTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotRenewTimer()) );
mRenewTimer->start( mSubscriptionLifetime * 900 ); // 10% early so as to be in time
}
@@ -127,13 +127,13 @@ ExchangeMonitor::~ExchangeMonitor()
if ( mPollTimer ) delete mPollTimer;
if ( mRenewTimer ) delete mRenewTimer;
if ( ! mSubscriptionMap.isEmpty() ) {
- QString headers = "Subscription-ID: " + makeIDString( mSubscriptionMap.keys() );
+ TQString headers = "Subscription-ID: " + makeIDString( mSubscriptionMap.keys() );
kdDebug() << "Subsubscribing all watches, headers:" << endl << headers << endl;
- KIO::DavJob *job = new KIO::DavJob( mAccount->calendarURL(), (int) KIO::DAV_UNSUBSCRIBE, QString::null, false );
+ KIO::DavJob *job = new KIO::DavJob( mAccount->calendarURL(), (int) KIO::DAV_UNSUBSCRIBE, TQString::null, false );
job->addMetaData( "customHTTPHeader", headers );
// Can't do, this is a destructor!
// job->addMetaData( "PropagateHttpHeader", "true" );
- // connect(job, SIGNAL(result( KIO::Job * )), this, SLOT(slotUnsubscribeResult(KIO::Job *)));
+ // connect(job, TQT_SIGNAL(result( KIO::Job * )), this, TQT_SLOT(slotUnsubscribeResult(KIO::Job *)));
}
kdDebug() << "Finished ExchangeMonitor destructor" << endl;
@@ -141,7 +141,7 @@ ExchangeMonitor::~ExchangeMonitor()
void ExchangeMonitor::addWatch( const KURL &url, int mode, int depth )
{
- QString headers = "Notification-type: ";
+ TQString headers = "Notification-type: ";
switch( mode ) {
case Delete: headers += "delete\r\n"; break;
case Move: headers += "move\r\n"; break;
@@ -150,24 +150,24 @@ void ExchangeMonitor::addWatch( const KURL &url, int mode, int depth )
case UpdateNewMember: headers += "update/newmember\r\n"; break;
}
- headers += "Depth: " + QString::number( depth );
+ headers += "Depth: " + TQString::number( depth );
if (mPollMode == CallBack )
- headers += "\r\nCall-Back: httpu://" + mSocket->address().toString() + ":" + QString::number(mSocket->port());
+ headers += "\r\nCall-Back: httpu://" + mSocket->address().toString() + ":" + TQString::number(mSocket->port());
kdDebug() << "Headers: " << headers << endl;
KURL myURL = toDAV( url );
- KIO::DavJob *job = new KIO::DavJob( myURL, (int) KIO::DAV_SUBSCRIBE, QString::null, false );
+ KIO::DavJob *job = new KIO::DavJob( myURL, (int) KIO::DAV_SUBSCRIBE, TQString::null, false );
job->addMetaData( "customHTTPHeader", headers );
job->addMetaData( "PropagateHttpHeader", "true" );
- connect(job, SIGNAL(result( KIO::Job * )), this, SLOT(slotSubscribeResult(KIO::Job *)));
+ connect(job, TQT_SIGNAL(result( KIO::Job * )), this, TQT_SLOT(slotSubscribeResult(KIO::Job *)));
}
void ExchangeMonitor::removeWatch( const KURL &url )
{
KURL myURL = toDAV( url );
- QMap<ID,KURL>::Iterator it;
+ TQMap<ID,KURL>::Iterator it;
for ( it = mSubscriptionMap.begin(); it != mSubscriptionMap.end(); ++it ) {
if ( it.data() == myURL ) {
removeWatch( it.key() );
@@ -179,17 +179,17 @@ void ExchangeMonitor::removeWatch( const KURL &url )
void ExchangeMonitor::removeWatch( ID id )
{
- KIO::DavJob *job = new KIO::DavJob( mAccount->calendarURL(), (int) KIO::DAV_UNSUBSCRIBE, QString::null, false );
- job->addMetaData( "customHTTPHeader", "Subscription-id: " + QString::number( id ));
+ KIO::DavJob *job = new KIO::DavJob( mAccount->calendarURL(), (int) KIO::DAV_UNSUBSCRIBE, TQString::null, false );
+ job->addMetaData( "customHTTPHeader", "Subscription-id: " + TQString::number( id ));
job->addMetaData( "PropagateHttpHeader", "true" );
- connect(job, SIGNAL(result( KIO::Job * )), this, SLOT(slotUnsubscribeResult(KIO::Job *)));
+ connect(job, TQT_SIGNAL(result( KIO::Job * )), this, TQT_SLOT(slotUnsubscribeResult(KIO::Job *)));
}
void ExchangeMonitor::slotSubscribeResult( KIO::Job * job )
{
if ( job->error() ) {
job->showErrorDialog( 0L );
- emit error( ExchangeClient::CommunicationError, "IO Error: " + QString::number(job->error()) + ":" + job->errorString() );
+ emit error( ExchangeClient::CommunicationError, "IO Error: " + TQString::number(job->error()) + ":" + job->errorString() );
return;
}
@@ -198,12 +198,12 @@ void ExchangeMonitor::slotSubscribeResult( KIO::Job * job )
bool gotID = false;
bool gotURL = false;
- QStringList headers = QStringList::split( "\n", job->queryMetaData( "HTTP-Headers" ) );
- for ( QStringList::Iterator it = headers.begin(); it != headers.end(); ++it ) {
+ TQStringList headers = TQStringList::split( "\n", job->queryMetaData( "HTTP-Headers" ) );
+ for ( TQStringList::Iterator it = headers.begin(); it != headers.end(); ++it ) {
int colon = (*it).find( ": " );
if ( colon<0 ) continue;
- QString tag = (*it).left( colon ).stripWhiteSpace().lower();
- QString value = (*it).mid( colon+1 ).stripWhiteSpace();
+ TQString tag = (*it).left( colon ).stripWhiteSpace().lower();
+ TQString value = (*it).mid( colon+1 ).stripWhiteSpace();
if ( tag == "subscription-lifetime" ) {
int lifetime = value.toInt();
if ( lifetime < mSubscriptionLifetime ) {
@@ -249,15 +249,15 @@ void ExchangeMonitor::slotUnsubscribeResult( KIO::Job * job )
{
if ( job->error() ) {
job->showErrorDialog( 0L );
- emit error( ExchangeClient::CommunicationError, "IO Error: " + QString::number(job->error()) + ":" + job->errorString() );
+ emit error( ExchangeClient::CommunicationError, "IO Error: " + TQString::number(job->error()) + ":" + job->errorString() );
return;
}
- QDomDocument& response = static_cast<KIO::DavJob *>( job )->response();
+ TQDomDocument& response = static_cast<KIO::DavJob *>( job )->response();
kdDebug() << "UNSUBSCRIBE result: " << endl << response.toString() << endl;
- QDomElement status = response.documentElement().namedItem( "response" ).namedItem( "status" ).toElement();
- QDomElement subscriptionID = response.documentElement().namedItem( "response" ).namedItem( "subscriptionID" ).toElement();
+ TQDomElement status = response.documentElement().namedItem( "response" ).namedItem( "status" ).toElement();
+ TQDomElement subscriptionID = response.documentElement().namedItem( "response" ).namedItem( "subscriptionID" ).toElement();
kdDebug() << "Subscription ID.text(): " << subscriptionID.text() << endl;
bool ok;
ID id = subscriptionID.text().toLong( &ok );
@@ -284,7 +284,7 @@ void ExchangeMonitor::slotActivated( int )
if ( maxLen == 0 )
return;
- QCString response( maxLen+2 );
+ TQCString response( maxLen+2 );
Q_LONG len = mSocket->readBlock ( response.data(), maxLen+1 );
if ( len <= 0 ) {
@@ -295,13 +295,13 @@ void ExchangeMonitor::slotActivated( int )
kdDebug() << "Got data of " << len << " bytes." << endl;
kdDebug() << response << endl;
- QString s(response);
+ TQString s(response);
IDList IDs;
- QStringList lines = QStringList::split( "\n", s );
- QStringList::iterator it;
+ TQStringList lines = TQStringList::split( "\n", s );
+ TQStringList::iterator it;
for ( it = lines.begin(); it != lines.end(); ++it ) {
- QString line = (*it).stripWhiteSpace().lower();
+ TQString line = (*it).stripWhiteSpace().lower();
if ( line.startsWith( "subscription-id: " ) )
IDs = makeIDList( line.section(":",1).stripWhiteSpace() );
}
@@ -321,35 +321,35 @@ void ExchangeMonitor::poll( const IDList& IDs ) {
// }
// confirm it
- KIO::DavJob *job = new KIO::DavJob( mAccount->calendarURL(), (int) KIO::DAV_POLL, QString::null, false );
+ KIO::DavJob *job = new KIO::DavJob( mAccount->calendarURL(), (int) KIO::DAV_POLL, TQString::null, false );
job->addMetaData( "customHTTPHeader", "Subscription-ID: " + makeIDString( IDs ) );
- connect(job, SIGNAL(result( KIO::Job * )), this, SLOT(slotPollResult(KIO::Job *)));
+ connect(job, TQT_SIGNAL(result( KIO::Job * )), this, TQT_SLOT(slotPollResult(KIO::Job *)));
}
void ExchangeMonitor::slotPollResult( KIO::Job * job )
{
if ( job->error() ) {
job->showErrorDialog( 0L );
- emit error( ExchangeClient::CommunicationError, "IO Error: " + QString::number(job->error()) + ":" + job->errorString() );
+ emit error( ExchangeClient::CommunicationError, "IO Error: " + TQString::number(job->error()) + ":" + job->errorString() );
return;
}
- QDomDocument& response = static_cast<KIO::DavJob *>( job )->response();
+ TQDomDocument& response = static_cast<KIO::DavJob *>( job )->response();
kdDebug() << "POLL result: " << endl << response.toString() << endl;
// Multiple results!
- QDomNodeList responses = response.documentElement().elementsByTagName( "response" );
+ TQDomNodeList responses = response.documentElement().elementsByTagName( "response" );
if ( responses.count() == 0 ) {
emit error( ExchangeClient::ServerResponseError, "Poll result is wrong: \n" + response.toString() );
return;
}
for( uint i=0; i<responses.count(); i++ ) {
- QDomElement item = responses.item( i ).toElement();
- QDomElement status = item.namedItem( "status" ).toElement();
- QDomElement subscriptionID = item.namedItem( "subscriptionID" ).toElement();
+ TQDomElement item = responses.item( i ).toElement();
+ TQDomElement status = item.namedItem( "status" ).toElement();
+ TQDomElement subscriptionID = item.namedItem( "subscriptionID" ).toElement();
if ( status.text().contains( "200" ) ) {
kdDebug() << "subscriptionID: " << subscriptionID.text() << endl;
IDList IDs = makeIDList( subscriptionID.text() );
- QValueList<KURL> urls;
+ TQValueList<KURL> urls;
IDList::ConstIterator it;
for ( it = IDs.begin(); it != IDs.end(); ++it ) {
urls += mSubscriptionMap[ *it ];
@@ -366,16 +366,16 @@ void ExchangeMonitor::slotRenewTimer()
{
kdDebug() << "ExchangeMonitor::slotRenewTimer()" << endl;
- KIO::DavJob *job = new KIO::DavJob( mAccount->calendarURL(), (int) KIO::DAV_SUBSCRIBE, QString::null, false );
+ KIO::DavJob *job = new KIO::DavJob( mAccount->calendarURL(), (int) KIO::DAV_SUBSCRIBE, TQString::null, false );
job->addMetaData( "customHTTPHeader", "Subscription-id: " + makeIDString( mSubscriptionMap.keys() ) );
- connect(job, SIGNAL(result( KIO::Job * )), this, SLOT(slotRenewResult(KIO::Job *)));
+ connect(job, TQT_SIGNAL(result( KIO::Job * )), this, TQT_SLOT(slotRenewResult(KIO::Job *)));
}
void ExchangeMonitor::slotRenewResult( KIO::Job* job )
{
if ( job->error() ) {
job->showErrorDialog( 0L );
- emit error( ExchangeClient::CommunicationError, "IO Error: " + QString::number(job->error()) + ":" + job->errorString() );
+ emit error( ExchangeClient::CommunicationError, "IO Error: " + TQString::number(job->error()) + ":" + job->errorString() );
return;
}
kdDebug() << "ExchangeMonitor::slotRenewResult()" << endl;
diff --git a/libkpimexchange/core/exchangemonitor.h b/libkpimexchange/core/exchangemonitor.h
index f1429ba4e..216c53f5a 100644
--- a/libkpimexchange/core/exchangemonitor.h
+++ b/libkpimexchange/core/exchangemonitor.h
@@ -20,10 +20,10 @@
#ifndef KDEPIM_EXCHANGE_MONITOR_H
#define KDEPIM_EXCHANGE_MONITOR_H
-#include <qstring.h>
-#include <qmap.h>
-//#include <qwidget.h>
-#include <qhostaddress.h>
+#include <tqstring.h>
+#include <tqmap.h>
+//#include <tqwidget.h>
+#include <tqhostaddress.h>
#include <kurl.h>
#include <kio/job.h>
@@ -39,11 +39,11 @@ namespace KPIM {
class ExchangeAccount;
-class ExchangeMonitor : public QObject {
+class ExchangeMonitor : public TQObject {
Q_OBJECT
public:
typedef long ID;
- typedef QValueList<ID> IDList;
+ typedef TQValueList<ID> IDList;
enum { CallBack, Poll };
enum { Delete, /** Any: 0 The message or folder subscribed to was deleted.
@@ -63,18 +63,18 @@ class ExchangeMonitor : public QObject {
Any /** Message 1 Treat as depth = 0. */
};
- ExchangeMonitor( ExchangeAccount* account, int pollMode, const QHostAddress& ownInterface );
+ ExchangeMonitor( ExchangeAccount* account, int pollMode, const TQHostAddress& ownInterface );
~ExchangeMonitor();
void addWatch( const KURL &url, int mode, int depth );
void removeWatch( const KURL &url );
void removeWatch( ID id );
signals:
- void notify( const QValueList<long>& IDs, const QValueList<KURL>& urls );
+ void notify( const TQValueList<long>& IDs, const TQValueList<KURL>& urls );
// void added( ID id, const KURL& url );
// void removed( ID id, const KURL& url );
- void error( int result, const QString& moreInfo );
+ void error( int result, const TQString& moreInfo );
private slots:
void slotSubscribeResult( KIO::Job * );
@@ -89,15 +89,15 @@ class ExchangeMonitor : public QObject {
private:
// void init();
- QMap<ID,KURL> mSubscriptionMap;
- QSocketDevice *mSocket;
- QSocketNotifier* mNotifier;
- QTextStream *mStream;
+ TQMap<ID,KURL> mSubscriptionMap;
+ TQSocketDevice *mSocket;
+ TQSocketNotifier* mNotifier;
+ TQTextStream *mStream;
ExchangeAccount* mAccount;
int mSubscriptionLifetime;
- // QString mSubscriptionId;
- QTimer* mPollTimer;
- QTimer* mRenewTimer;
+ // TQString mSubscriptionId;
+ TQTimer* mPollTimer;
+ TQTimer* mRenewTimer;
int mPollMode;
};
diff --git a/libkpimexchange/core/exchangeprogress.cpp b/libkpimexchange/core/exchangeprogress.cpp
index 203a1a0b7..bee71b572 100644
--- a/libkpimexchange/core/exchangeprogress.cpp
+++ b/libkpimexchange/core/exchangeprogress.cpp
@@ -18,9 +18,9 @@
Boston, MA 02110-1301, USA.
*/
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qcombobox.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqcombobox.h>
#include <klocale.h>
#include <kmessagebox.h>
@@ -33,7 +33,7 @@
#include "exchangeprogress.h"
using namespace KPIM;
-ExchangeProgress::ExchangeProgress(QWidget *parent)
+ExchangeProgress::ExchangeProgress(TQWidget *parent)
: KProgressDialog(parent, "", i18n("Exchange Download Progress"), i18n("Exchange Plugin"), "text" )
{
m_finished = 0;
@@ -65,7 +65,7 @@ void ExchangeProgress::slotTransferFinished()
void ExchangeProgress::updateLabel()
{
progressBar()->setValue( m_finished );
- QString str = i18n( "Downloading, %1 of %2" ).arg( m_finished ).arg( m_total );
+ TQString str = i18n( "Downloading, %1 of %2" ).arg( m_finished ).arg( m_total );
setLabel( str );
}
diff --git a/libkpimexchange/core/exchangeprogress.h b/libkpimexchange/core/exchangeprogress.h
index c37467db1..d6b3341ff 100644
--- a/libkpimexchange/core/exchangeprogress.h
+++ b/libkpimexchange/core/exchangeprogress.h
@@ -31,7 +31,7 @@ class ExchangeProgress : public KProgressDialog
Q_OBJECT
public:
- ExchangeProgress(QWidget *parent=0);
+ ExchangeProgress(TQWidget *parent=0);
virtual ~ExchangeProgress();
public slots:
diff --git a/libkpimexchange/core/exchangeupload.cpp b/libkpimexchange/core/exchangeupload.cpp
index 8332979a0..bbc30906d 100644
--- a/libkpimexchange/core/exchangeupload.cpp
+++ b/libkpimexchange/core/exchangeupload.cpp
@@ -18,8 +18,8 @@
Boston, MA 02110-1301, USA.
*/
-#include <qstring.h>
-#include <qregexp.h>
+#include <tqstring.h>
+#include <tqregexp.h>
#include <kurl.h>
#include <kdebug.h>
@@ -52,7 +52,7 @@ extern "C" {
using namespace KPIM;
ExchangeUpload::ExchangeUpload( KCal::Event *event, ExchangeAccount *account,
- const QString &timeZoneId, QWidget *window )
+ const TQString &timeZoneId, TQWidget *window )
: mTimeZoneId( timeZoneId ), mWindow( window )
{
kdDebug() << "Called ExchangeUpload" << endl;
@@ -75,9 +75,9 @@ ExchangeUpload::~ExchangeUpload()
kdDebug() << "Finished ExchangeUpload destructor" << endl;
}
-void ExchangeUpload::findUid( QString const &uid )
+void ExchangeUpload::findUid( TQString const &uid )
{
- QString query =
+ TQString query =
"SELECT \"DAV:href\", \"urn:schemas:calendar:uid\"\r\n"
"FROM Scope('shallow traversal of \"\"')\r\n"
"WHERE \"urn:schemas:calendar:uid\" = '" + uid + "'\r\n";
@@ -88,8 +88,8 @@ void ExchangeUpload::findUid( QString const &uid )
KIO::DavJob* job = KIO::davSearch( mAccount->calendarURL(), "DAV:", "sql",
query, false );
job->setWindow( mWindow );
- connect( job, SIGNAL( result( KIO::Job * ) ),
- SLOT( slotFindUidResult( KIO::Job * ) ) );
+ connect( job, TQT_SIGNAL( result( KIO::Job * ) ),
+ TQT_SLOT( slotFindUidResult( KIO::Job * ) ) );
}
void ExchangeUpload::slotFindUidResult( KIO::Job * job )
@@ -100,16 +100,16 @@ void ExchangeUpload::slotFindUidResult( KIO::Job * job )
kdDebug() << "Error: " << job->error() << endl;
job->showErrorDialog( 0 );
emit finished( this, ExchangeClient::CommunicationError,
- "IO Error: " + QString::number(job->error()) + ":" +
+ "IO Error: " + TQString::number(job->error()) + ":" +
job->errorString() );
return;
}
- QDomDocument &response = static_cast<KIO::DavJob *>( job )->response();
+ TQDomDocument &response = static_cast<KIO::DavJob *>( job )->response();
kdDebug() << "Search uid result: " << endl << response.toString() << endl;
- QDomElement item = response.documentElement().firstChild().toElement();
- QDomElement hrefElement = item.namedItem( "href" ).toElement();
+ TQDomElement item = response.documentElement().firstChild().toElement();
+ TQDomElement hrefElement = item.namedItem( "href" ).toElement();
if ( item.isNull() || hrefElement.isNull() ) {
// No appointment with this UID in exchange database
// Create a new filename for this appointment and store it there
@@ -118,7 +118,7 @@ void ExchangeUpload::slotFindUidResult( KIO::Job * job )
}
// The appointment is already in the exchange database
// Overwrite it with the new data
- QString href = hrefElement.text();
+ TQString href = hrefElement.text();
KURL url( href );
kdDebug() << "Found URL with identical uid: " << url.prettyURL()
<< ", overwriting that one" << endl;
@@ -134,21 +134,21 @@ void ExchangeUpload::tryExist()
if ( m_currentUploadNumber == 0 )
url.addPath( m_currentUpload->summary() + ".EML" );
else
- url.addPath( m_currentUpload->summary() + "-" + QString::number( m_currentUploadNumber ) + ".EML" );
+ url.addPath( m_currentUpload->summary() + "-" + TQString::number( m_currentUploadNumber ) + ".EML" );
kdDebug() << "Trying to see whether " << url.prettyURL() << " exists" << endl;
- QDomDocument doc;
- QDomElement root = addElement( doc, doc, "DAV:", "propfind" );
- QDomElement prop = addElement( doc, root, "DAV:", "prop" );
+ TQDomDocument doc;
+ TQDomElement root = addElement( doc, doc, "DAV:", "propfind" );
+ TQDomElement prop = addElement( doc, root, "DAV:", "prop" );
addElement( doc, prop, "DAV:", "displayname" );
addElement( doc, prop, "urn:schemas:calendar", "uid" );
KIO::DavJob *job = KIO::davPropFind( url, doc, "0", false );
job->setWindow( mWindow );
job->addMetaData( "errorPage", "false" );
- connect( job, SIGNAL( result( KIO::Job * ) ),
- SLOT( slotPropFindResult( KIO::Job * ) ) );
+ connect( job, TQT_SIGNAL( result( KIO::Job * ) ),
+ TQT_SLOT( slotPropFindResult( KIO::Job * ) ) );
}
void ExchangeUpload::slotPropFindResult( KIO::Job *job )
@@ -159,7 +159,7 @@ void ExchangeUpload::slotPropFindResult( KIO::Job *job )
if ( error && error != KIO::ERR_DOES_NOT_EXIST ) {
job->showErrorDialog( 0 );
emit finished( this, ExchangeClient::CommunicationError,
- "IO Error: " + QString::number(error) + ":" +
+ "IO Error: " + TQString::number(error) + ":" +
job->errorString() );
return;
}
@@ -180,12 +180,12 @@ void ExchangeUpload::slotPropFindResult( KIO::Job *job )
url.addPath( m_currentUpload->summary() + ".EML" );
else
url.addPath( m_currentUpload->summary() + "-" +
- QString::number( m_currentUploadNumber ) + ".EML" );
+ TQString::number( m_currentUploadNumber ) + ".EML" );
startUpload( url );
}
-QString timezoneid( int offset )
+TQString timezoneid( int offset )
{
switch ( offset ) {
case 0: return "0";
@@ -232,10 +232,10 @@ void ExchangeUpload::startUpload( const KURL &url )
return;
}
- QDomDocument doc;
- QDomElement root = addElement( doc, doc, "DAV:", "propertyupdate" );
- QDomElement set = addElement( doc, root, "DAV:", "set" );
- QDomElement prop = addElement( doc, set, "DAV:", "prop" );
+ TQDomDocument doc;
+ TQDomElement root = addElement( doc, doc, "DAV:", "propertyupdate" );
+ TQDomElement set = addElement( doc, root, "DAV:", "set" );
+ TQDomElement prop = addElement( doc, set, "DAV:", "prop" );
addElement( doc, prop, "DAV:", "contentclass", "urn:content-classes:appointment" );
// addElement( doc, prop, "http://schemas.microsoft.com/exchange/", "outlookmessageclass", "IPM.appointment" );
addElement( doc, prop, "http://schemas.microsoft.com/exchange/",
@@ -249,14 +249,14 @@ void ExchangeUpload::startUpload( const KURL &url )
// value that localUTCOffset() supplies...
// FIXME: What do we need that offset for anyway???
int tzOffset = - KRFCDate::localUTCOffset();
- QString offsetString;
+ TQString offsetString;
if ( tzOffset == 0 )
offsetString = "Z";
else if ( tzOffset > 0 )
- offsetString = QString( "+%1:%2" ).arg(tzOffset/60, 2).arg( tzOffset%60, 2 );
+ offsetString = TQString( "+%1:%2" ).arg(tzOffset/60, 2).arg( tzOffset%60, 2 );
else
- offsetString = QString( "-%1:%2" ).arg((-tzOffset)/60, 2).arg( (-tzOffset)%60, 2 );
- offsetString = offsetString.replace( QRegExp(" "), "0" );
+ offsetString = TQString( "-%1:%2" ).arg((-tzOffset)/60, 2).arg( (-tzOffset)%60, 2 );
+ offsetString = offsetString.replace( TQRegExp(" "), "0" );
kdDebug() << "Timezone offset: " << tzOffset << " : " << offsetString << endl;
kdDebug() << "ExchangeUpload::mTimeZoneId=" << mTimeZoneId << endl;
@@ -290,12 +290,12 @@ void ExchangeUpload::startUpload( const KURL &url )
if ( recurrence->recurrenceType() != KCal::Recurrence::rNone ) {
addElement( doc, prop, "urn:schemas:calendar:", "instancetype", "1" );
KCal::ICalFormat *format = new KCal::ICalFormat();
- QString recurstr = format->toString( recurrence->defaultRRule() );
+ TQString recurstr = format->toString( recurrence->defaultRRule() );
// Strip leading "RRULE\n :" and whitespace
- recurstr = recurstr.replace( QRegExp("^[A-Z]*[\\s]*:"), "").stripWhiteSpace();
+ recurstr = recurstr.replace( TQRegExp("^[A-Z]*[\\s]*:"), "").stripWhiteSpace();
kdDebug() << "Recurrence rule after replace: \"" << recurstr << "\"" << endl;
delete format;
- QDomElement rrule = addElement( doc, prop, "urn:schemas:calendar:", "rrule" );
+ TQDomElement rrule = addElement( doc, prop, "urn:schemas:calendar:", "rrule" );
addElement( doc, rrule, "xml:", "v", recurstr );
addElement( doc, prop, "urn:schemas:calendar:", "timezoneid", timezoneid( tzOffset ) );
} else {
@@ -304,11 +304,11 @@ void ExchangeUpload::startUpload( const KURL &url )
KCal::DateList exdates = recurrence->exDates();
if ( !exdates.isEmpty() ) {
- QDomElement exdate = addElement( doc, prop, "urn:schemas:calendar:", "exdate" );
+ TQDomElement exdate = addElement( doc, prop, "urn:schemas:calendar:", "exdate" );
KCal::DateList::iterator it;
for ( it = exdates.begin(); it != exdates.end(); ++it ) {
- QString date = (*it).toString( "yyyy-MM-ddT00:00:00.000" )+ offsetString;
-// QString date = zoneAsUtc( (*it), mTimeZoneId ).toString( Qt::ISODate );
+ TQString date = (*it).toString( "yyyy-MM-ddT00:00:00.000" )+ offsetString;
+// TQString date = zoneAsUtc( (*it), mTimeZoneId ).toString( Qt::ISODate );
addElement( doc, exdate, "xml:", "v", date );
}
}
@@ -321,7 +321,7 @@ void ExchangeUpload::startUpload( const KURL &url )
// TODO: handle alarm types
if ( alarm->hasStartOffset() ) {
int offset = - alarm->startOffset().asSeconds();
- addElement( doc, prop, "urn:schemas:calendar:", "reminderoffset", QString::number( offset ) );
+ addElement( doc, prop, "urn:schemas:calendar:", "reminderoffset", TQString::number( offset ) );
}
}
@@ -332,8 +332,8 @@ void ExchangeUpload::startUpload( const KURL &url )
KIO::DavJob *job = KIO::davPropPatch( url, doc, false );
job->setWindow( mWindow );
- connect( job, SIGNAL( result( KIO::Job * ) ),
- SLOT( slotPatchResult( KIO::Job * ) ) );
+ connect( job, TQT_SIGNAL( result( KIO::Job * ) ),
+ TQT_SLOT( slotPatchResult( KIO::Job * ) ) );
}
void ExchangeUpload::slotPatchResult( KIO::Job *job )
@@ -343,19 +343,19 @@ void ExchangeUpload::slotPatchResult( KIO::Job *job )
job->showErrorDialog( 0 );
kdDebug() << "Error: " << job->error() << endl;
emit finished( this, ExchangeClient::CommunicationError,
- "IO Error: " + QString::number(job->error()) + ":" +
+ "IO Error: " + TQString::number(job->error()) + ":" +
job->errorString() );
return;
}
- QDomDocument response = static_cast<KIO::DavJob *>( job )->response();
+ TQDomDocument response = static_cast<KIO::DavJob *>( job )->response();
kdDebug() << "Patch result: " << response.toString() << endl;
// Either we have a "201 Created" (if a new event has been created) or
// we have a "200 OK" (if an existing event has been altered),
// or else an error has occurred ;)
- QDomElement status = response.documentElement().namedItem( "response" )
+ TQDomElement status = response.documentElement().namedItem( "response" )
.namedItem( "status" ).toElement();
- QDomElement propstat = response.documentElement().namedItem( "response" )
+ TQDomElement propstat = response.documentElement().namedItem( "response" )
.namedItem( "propstat" ).namedItem( "status" )
.toElement();
kdDebug() << "status: " << status.text() << endl;
@@ -365,7 +365,7 @@ void ExchangeUpload::slotPatchResult( KIO::Job *job )
emit finished( this, ExchangeClient::EventWriteError,
"Upload error response: \n" + response.toString() );
else
- emit finished( this, ExchangeClient::ResultOK, QString::null );
+ emit finished( this, ExchangeClient::ResultOK, TQString::null );
}
#include "exchangeupload.moc"
diff --git a/libkpimexchange/core/exchangeupload.h b/libkpimexchange/core/exchangeupload.h
index 5ed269297..953451a86 100644
--- a/libkpimexchange/core/exchangeupload.h
+++ b/libkpimexchange/core/exchangeupload.h
@@ -20,8 +20,8 @@
#ifndef KDEPIM_EXCHANGE_UPLOAD_H
#define KDEPIM_EXCHANGE_UPLOAD_H
-#include <qstring.h>
-#include <qwidget.h>
+#include <tqstring.h>
+#include <tqwidget.h>
#include <kio/job.h>
#include <kdepimmacros.h>
@@ -33,10 +33,10 @@ namespace KPIM {
class ExchangeAccount;
-class KDE_EXPORT ExchangeUpload : public QObject {
+class KDE_EXPORT ExchangeUpload : public TQObject {
Q_OBJECT
public:
- ExchangeUpload( KCal::Event* event, ExchangeAccount* account, const QString& timeZoneId, QWidget* window=0 );
+ ExchangeUpload( KCal::Event* event, ExchangeAccount* account, const TQString& timeZoneId, TQWidget* window=0 );
~ExchangeUpload();
private slots:
@@ -47,18 +47,18 @@ class KDE_EXPORT ExchangeUpload : public QObject {
signals:
void startDownload();
void finishDownload();
- void finished( ExchangeUpload* worker, int result, const QString& moreInfo );
+ void finished( ExchangeUpload* worker, int result, const TQString& moreInfo );
private:
void tryExist();
void startUpload( const KURL& url );
- void findUid( QString const& uid );
+ void findUid( TQString const& uid );
ExchangeAccount* mAccount;
KCal::Event* m_currentUpload;
int m_currentUploadNumber;
- QString mTimeZoneId;
- QWidget* mWindow;
+ TQString mTimeZoneId;
+ TQWidget* mWindow;
};
}
diff --git a/libkpimexchange/core/utils.cpp b/libkpimexchange/core/utils.cpp
index 1d90cfcca..61847dbdd 100644
--- a/libkpimexchange/core/utils.cpp
+++ b/libkpimexchange/core/utils.cpp
@@ -18,7 +18,7 @@
Boston, MA 02110-1301, USA.
*/
-#include <qdatetime.h>
+#include <tqdatetime.h>
extern "C" {
#include <ical.h>
@@ -28,9 +28,9 @@ extern "C" {
/** In a document doc with node node, add an element with name ns and tagname tag. Return the new element
*/
-QDomElement addElement( QDomDocument& doc, QDomNode& node, const QString& ns, const QString& tag )
+TQDomElement addElement( TQDomDocument& doc, TQDomNode& node, const TQString& ns, const TQString& tag )
{
- QDomElement el = doc.createElementNS( ns, tag );
+ TQDomElement el = doc.createElementNS( ns, tag );
node.appendChild( el );
return el;
}
@@ -39,10 +39,10 @@ QDomElement addElement( QDomDocument& doc, QDomNode& node, const QString& ns, co
In a document doc with node node, add an element with namespace ns and tagname tag. Add a textnode in
the element with text contents text. Return the new element.
*/
-QDomElement addElement( QDomDocument& doc, QDomNode& node, const QString& ns, const QString& tag, const QString& text )
+TQDomElement addElement( TQDomDocument& doc, TQDomNode& node, const TQString& ns, const TQString& tag, const TQString& text )
{
- QDomElement el = doc.createElementNS( ns, tag );
- QDomText textnode = doc.createTextNode( text );
+ TQDomElement el = doc.createElementNS( ns, tag );
+ TQDomText textnode = doc.createTextNode( text );
el.appendChild( textnode );
node.appendChild( el );
return el;
@@ -50,10 +50,10 @@ QDomElement addElement( QDomDocument& doc, QDomNode& node, const QString& ns, co
//TODO: should not call libical functions directly -- better to make
// a new libkcal abstraction method.
-QDateTime utcAsZone( const QDateTime& utc, const QString& timeZoneId )
+TQDateTime utcAsZone( const TQDateTime& utc, const TQString& timeZoneId )
{
int daylight;
- QDateTime epoch;
+ TQDateTime epoch;
epoch.setTime_t( 0 );
time_t v = epoch.secsTo( utc );
struct icaltimetype tt = icaltime_from_timet( v, 0 ); // 0: is_date=false
@@ -66,10 +66,10 @@ QDateTime utcAsZone( const QDateTime& utc, const QString& timeZoneId )
//TODO: should not call libical functions directly -- better to make
// a new libkcal abstraction method.
-QDateTime zoneAsUtc( const QDateTime& zone, const QString& timeZoneId )
+TQDateTime zoneAsUtc( const TQDateTime& zone, const TQString& timeZoneId )
{
int daylight;
- QDateTime epoch;
+ TQDateTime epoch;
epoch.setTime_t( 0 );
time_t v = epoch.secsTo( zone );
struct icaltimetype tt = icaltime_from_timet( v, 0 ); // 0: is_date=false
diff --git a/libkpimexchange/core/utils.h b/libkpimexchange/core/utils.h
index 20b681416..c26eb72b2 100644
--- a/libkpimexchange/core/utils.h
+++ b/libkpimexchange/core/utils.h
@@ -21,30 +21,30 @@
#ifndef KDEPIM_EXCHANGE_UTILS_H
#define KDEPIM_EXCHANGE_UTILS_H
-#include <qstring.h>
-#include <qdom.h>
+#include <tqstring.h>
+#include <tqdom.h>
#include <kurl.h>
/** In a document doc with node node, add an element with name ns and tagname tag. Return the new element
*/
-QDomElement addElement( QDomDocument& doc, QDomNode& node, const QString& ns, const QString& tag );
+TQDomElement addElement( TQDomDocument& doc, TQDomNode& node, const TQString& ns, const TQString& tag );
/**
In a document doc with node node, add an element with namespace ns and tagname tag. Add a textnode in
the element with text contents text. Return the new element.
*/
-QDomElement addElement( QDomDocument& doc, QDomNode& node, const QString& ns, const QString& tag, const QString& text );
+TQDomElement addElement( TQDomDocument& doc, TQDomNode& node, const TQString& ns, const TQString& tag, const TQString& text );
/**
* Return the representation of utc time in the time zone indicated by timeZoneId
*/
-QDateTime utcAsZone( const QDateTime& utc, const QString& timeZoneId );
+TQDateTime utcAsZone( const TQDateTime& utc, const TQString& timeZoneId );
/**
* Return the UTC representation of local time in the time zone indicated by timeZoneId
*/
-QDateTime zoneAsUtc( const QDateTime& zone, const QString& timeZoneId );
+TQDateTime zoneAsUtc( const TQDateTime& zone, const TQString& timeZoneId );
/**
* Convert http:// url to webdav:// and https:// to webdavs://
diff --git a/libkpimidentities/identity.cpp b/libkpimidentities/identity.cpp
index 204e997e7..19cd65935 100644
--- a/libkpimidentities/identity.cpp
+++ b/libkpimidentities/identity.cpp
@@ -17,7 +17,7 @@
#include <kconfig.h>
#include <kurl.h>
-#include <qfileinfo.h>
+#include <tqfileinfo.h>
#include <sys/types.h>
#include <stdlib.h>
@@ -34,14 +34,14 @@ Signature::Signature()
}
-Signature::Signature( const QString & text )
+Signature::Signature( const TQString & text )
: mText( text ),
mType( Inlined )
{
}
-Signature::Signature( const QString & url, bool isExecutable )
+Signature::Signature( const TQString & url, bool isExecutable )
: mUrl( url ),
mType( isExecutable ? FromCommand : FromFile )
{
@@ -58,12 +58,12 @@ bool Signature::operator==( const Signature & other ) const {
}
}
-QString Signature::rawText( bool * ok ) const
+TQString Signature::rawText( bool * ok ) const
{
switch ( mType ) {
case Disabled:
if ( ok ) *ok = true;
- return QString::null;
+ return TQString::null;
case Inlined:
if ( ok ) *ok = true;
return mText;
@@ -73,17 +73,17 @@ QString Signature::rawText( bool * ok ) const
return textFromCommand( ok );
};
kdFatal( 5006 ) << "Signature::type() returned unknown value!" << endl;
- return QString::null; // make compiler happy
+ return TQString::null; // make compiler happy
}
-QString Signature::textFromCommand( bool * ok ) const
+TQString Signature::textFromCommand( bool * ok ) const
{
assert( mType == FromCommand );
// handle pathological cases:
if ( mUrl.isEmpty() ) {
if ( ok ) *ok = true;
- return QString::null;
+ return TQString::null;
}
// create a shell process:
@@ -101,62 +101,62 @@ QString Signature::textFromCommand( bool * ok ) const
// handle errors, if any:
if ( rc != 0 ) {
if ( ok ) *ok = false;
- QString wmsg = i18n("<qt>Failed to execute signature script<br><b>%1</b>:<br>%2</qt>")
+ TQString wmsg = i18n("<qt>Failed to execute signature script<br><b>%1</b>:<br>%2</qt>")
.arg( mUrl ).arg( strerror(rc) );
KMessageBox::error(0, wmsg);
- return QString::null;
+ return TQString::null;
}
// no errors:
if ( ok ) *ok = true;
// get output:
- QByteArray output = proc.collectedStdout();
+ TQByteArray output = proc.collectedStdout();
// ### hmm, should we allow other encodings, too?
- return QString::fromLocal8Bit( output.data(), output.size() );
+ return TQString::fromLocal8Bit( output.data(), output.size() );
}
-QString Signature::textFromFile( bool * ok ) const
+TQString Signature::textFromFile( bool * ok ) const
{
assert( mType == FromFile );
// ### FIXME: Use KIO::NetAccess to download non-local files!
- if ( !KURL(mUrl).isLocalFile() && !(QFileInfo(mUrl).isRelative()
- && QFileInfo(mUrl).exists()) ) {
+ if ( !KURL(mUrl).isLocalFile() && !(TQFileInfo(mUrl).isRelative()
+ && TQFileInfo(mUrl).exists()) ) {
kdDebug( 5006 ) << "Signature::textFromFile: non-local URLs are unsupported" << endl;
if ( ok ) *ok = false;
- return QString::null;
+ return TQString::null;
}
if ( ok ) *ok = true;
// ### hmm, should we allow other encodings, too?
- return QString::fromLocal8Bit( kFileToString( mUrl, false ) );
+ return TQString::fromLocal8Bit( kFileToString( mUrl, false ) );
}
-QString Signature::withSeparator( bool * ok ) const
+TQString Signature::withSeparator( bool * ok ) const
{
bool internalOK = false;
- QString signature = rawText( &internalOK );
+ TQString signature = rawText( &internalOK );
if ( !internalOK ) {
if ( ok ) *ok = false;
- return QString::null;
+ return TQString::null;
}
if ( ok ) *ok = true;
if ( signature.isEmpty() ) return signature; // don't add a separator in this case
- if ( signature.startsWith( QString::fromLatin1("-- \n") ) )
+ if ( signature.startsWith( TQString::fromLatin1("-- \n") ) )
// already have signature separator at start of sig:
- return QString::fromLatin1("\n") += signature;
- else if ( signature.find( QString::fromLatin1("\n-- \n") ) != -1 )
+ return TQString::fromLatin1("\n") += signature;
+ else if ( signature.find( TQString::fromLatin1("\n-- \n") ) != -1 )
// already have signature separator inside sig; don't prepend '\n'
// to improve abusing signatures as templates:
return signature;
else
// need to prepend one:
- return QString::fromLatin1("\n-- \n") + signature;
+ return TQString::fromLatin1("\n-- \n") + signature;
}
-void Signature::setUrl( const QString & url, bool isExecutable )
+void Signature::setUrl( const TQString & url, bool isExecutable )
{
mUrl = url;
mType = isExecutable ? FromCommand : FromFile ;
@@ -174,7 +174,7 @@ static const char sigCommandKey[] = "Signature Command";
void Signature::readConfig( const KConfigBase * config )
{
- QString sigType = config->readEntry( sigTypeKey );
+ TQString sigType = config->readEntry( sigTypeKey );
if ( sigType == sigTypeInlineValue ) {
mType = Inlined;
} else if ( sigType == sigTypeFileValue ) {
@@ -210,13 +210,13 @@ void Signature::writeConfig( KConfigBase * config ) const
config->writeEntry( sigTextKey, mText );
}
-QDataStream & KPIM::operator<<( QDataStream & stream, const KPIM::Signature & sig ) {
+TQDataStream & KPIM::operator<<( TQDataStream & stream, const KPIM::Signature & sig ) {
return stream << static_cast<Q_UINT8>(sig.mType)
<< sig.mUrl
<< sig.mText;
}
-QDataStream & KPIM::operator>>( QDataStream & stream, KPIM::Signature & sig ) {
+TQDataStream & KPIM::operator>>( TQDataStream & stream, KPIM::Signature & sig ) {
Q_UINT8 s;
stream >> s
>> sig.mUrl
@@ -290,9 +290,9 @@ bool Identity::operator==( const Identity & other ) const {
return same;
}
-Identity::Identity( const QString & id, const QString & fullName,
- const QString & emailAddr, const QString & organization,
- const QString & replyToAddr )
+Identity::Identity( const TQString & id, const TQString & fullName,
+ const TQString & emailAddr, const TQString & organization,
+ const TQString & replyToAddr )
: mUoid( 0 ), mIdentity( id ), mFullName( fullName ),
mEmailAddr( emailAddr ), mOrganization( organization ),
mReplyToAddr( replyToAddr ),
@@ -376,7 +376,7 @@ void Identity::writeConfig( KConfigBase * config ) const
mSignature.writeConfig( config );
}
-QDataStream & KPIM::operator<<( QDataStream & stream, const KPIM::Identity & i ) {
+TQDataStream & KPIM::operator<<( TQDataStream & stream, const KPIM::Identity & i ) {
return stream << static_cast<Q_UINT32>(i.uoid())
<< i.identityName()
<< i.fullName()
@@ -396,12 +396,12 @@ QDataStream & KPIM::operator<<( QDataStream & stream, const KPIM::Identity & i )
<< i.mSignature
<< i.dictionary()
<< i.xface()
- << QString( Kleo::cryptoMessageFormatToString( i.mPreferredCryptoMessageFormat ) );
+ << TQString( Kleo::cryptoMessageFormatToString( i.mPreferredCryptoMessageFormat ) );
}
-QDataStream & KPIM::operator>>( QDataStream & stream, KPIM::Identity & i ) {
+TQDataStream & KPIM::operator>>( TQDataStream & stream, KPIM::Identity & i ) {
Q_UINT32 uoid;
- QString format;
+ TQString format;
stream >> uoid
>> i.mIdentity
>> i.mFullName
@@ -439,44 +439,44 @@ void Identity::setIsDefault( bool flag ) {
mIsDefault = flag;
}
-void Identity::setIdentityName( const QString & name ) {
+void Identity::setIdentityName( const TQString & name ) {
mIdentity = name;
}
-void Identity::setFullName(const QString &str)
+void Identity::setFullName(const TQString &str)
{
mFullName = str;
}
//-----------------------------------------------------------------------------
-void Identity::setOrganization(const QString &str)
+void Identity::setOrganization(const TQString &str)
{
mOrganization = str;
}
-void Identity::setPGPSigningKey(const QCString &str)
+void Identity::setPGPSigningKey(const TQCString &str)
{
mPGPSigningKey = str;
if ( mPGPSigningKey.isNull() )
mPGPSigningKey = "";
}
-void Identity::setPGPEncryptionKey(const QCString &str)
+void Identity::setPGPEncryptionKey(const TQCString &str)
{
mPGPEncryptionKey = str;
if ( mPGPEncryptionKey.isNull() )
mPGPEncryptionKey = "";
}
-void Identity::setSMIMESigningKey(const QCString &str)
+void Identity::setSMIMESigningKey(const TQCString &str)
{
mSMIMESigningKey = str;
if ( mSMIMESigningKey.isNull() )
mSMIMESigningKey = "";
}
-void Identity::setSMIMEEncryptionKey(const QCString &str)
+void Identity::setSMIMEEncryptionKey(const TQCString &str)
{
mSMIMEEncryptionKey = str;
if ( mSMIMEEncryptionKey.isNull() )
@@ -484,27 +484,27 @@ void Identity::setSMIMEEncryptionKey(const QCString &str)
}
//-----------------------------------------------------------------------------
-void Identity::setEmailAddr(const QString &str)
+void Identity::setEmailAddr(const TQString &str)
{
mEmailAddr = str;
}
//-----------------------------------------------------------------------------
-void Identity::setVCardFile(const QString &str)
+void Identity::setVCardFile(const TQString &str)
{
mVCardFile = str;
}
//-----------------------------------------------------------------------------
-QString Identity::fullEmailAddr(void) const
+TQString Identity::fullEmailAddr(void) const
{
if (mFullName.isEmpty()) return mEmailAddr;
- const QString specials("()<>@,.;:[]");
+ const TQString specials("()<>@,.;:[]");
- QString result;
+ TQString result;
// add DQUOTE's if necessary:
bool needsQuotes=false;
@@ -529,28 +529,28 @@ QString Identity::fullEmailAddr(void) const
}
//-----------------------------------------------------------------------------
-void Identity::setReplyToAddr(const QString& str)
+void Identity::setReplyToAddr(const TQString& str)
{
mReplyToAddr = str;
}
//-----------------------------------------------------------------------------
-void Identity::setSignatureFile(const QString &str)
+void Identity::setSignatureFile(const TQString &str)
{
mSignature.setUrl( str, signatureIsCommand() );
}
//-----------------------------------------------------------------------------
-void Identity::setSignatureInlineText(const QString &str )
+void Identity::setSignatureInlineText(const TQString &str )
{
mSignature.setText( str );
}
//-----------------------------------------------------------------------------
-void Identity::setTransport( const QString &str )
+void Identity::setTransport( const TQString &str )
{
mTransport = str;
if ( mTransport.isNull() )
@@ -558,7 +558,7 @@ void Identity::setTransport( const QString &str )
}
//-----------------------------------------------------------------------------
-void Identity::setFcc( const QString &str )
+void Identity::setFcc( const TQString &str )
{
mFcc = str;
if ( mFcc.isNull() )
@@ -566,7 +566,7 @@ void Identity::setFcc( const QString &str )
}
//-----------------------------------------------------------------------------
-void Identity::setDrafts( const QString &str )
+void Identity::setDrafts( const TQString &str )
{
mDrafts = str;
if ( mDrafts.isNull() )
@@ -574,7 +574,7 @@ void Identity::setDrafts( const QString &str )
}
//-----------------------------------------------------------------------------
-void Identity::setTemplates( const QString &str )
+void Identity::setTemplates( const TQString &str )
{
mTemplates = str;
if ( mTemplates.isNull() )
@@ -582,7 +582,7 @@ void Identity::setTemplates( const QString &str )
}
//-----------------------------------------------------------------------------
-void Identity::setDictionary( const QString &str )
+void Identity::setDictionary( const TQString &str )
{
mDictionary = str;
if ( mDictionary.isNull() )
@@ -591,7 +591,7 @@ void Identity::setDictionary( const QString &str )
//-----------------------------------------------------------------------------
-void Identity::setXFace( const QString &str )
+void Identity::setXFace( const TQString &str )
{
mXFace = str;
mXFace.remove( " " );
@@ -608,10 +608,10 @@ void Identity::setXFaceEnabled( const bool on )
//-----------------------------------------------------------------------------
-QString Identity::signatureText( bool * ok ) const
+TQString Identity::signatureText( bool * ok ) const
{
bool internalOK = false;
- QString signatureText = mSignature.withSeparator( &internalOK );
+ TQString signatureText = mSignature.withSeparator( &internalOK );
if ( internalOK ) {
if ( ok ) *ok=true;
return signatureText;
@@ -621,7 +621,7 @@ QString Identity::signatureText( bool * ok ) const
// Signature::withSeparator() failed, so we should probably fix the
// cause:
if ( ok ) *ok = false;
- return QString::null;
+ return TQString::null;
#if 0 // ### FIXME: error handling
if (mSignatureFile.endsWith("|"))
@@ -632,5 +632,5 @@ QString Identity::signatureText( bool * ok ) const
}
#endif
- return QString::null;
+ return TQString::null;
}
diff --git a/libkpimidentities/identity.h b/libkpimidentities/identity.h
index 6b06e9a9d..0493a3864 100644
--- a/libkpimidentities/identity.h
+++ b/libkpimidentities/identity.h
@@ -11,9 +11,9 @@
#include <kdepimmacros.h>
-#include <qstring.h>
-#include <qcstring.h>
-#include <qstringlist.h>
+#include <tqstring.h>
+#include <tqcstring.h>
+#include <tqstringlist.h>
class KProcess;
namespace KPIM {
@@ -33,8 +33,8 @@ namespace KPIM {
class KDE_EXPORT Signature {
friend class Identity;
- friend QDataStream & KPIM::operator<<( QDataStream & stream, const Signature & sig );
- friend QDataStream & KPIM::operator>>( QDataStream & stream, Signature & sig );
+ friend TQDataStream & KPIM::operator<<( TQDataStream & stream, const Signature & sig );
+ friend TQDataStream & KPIM::operator>>( TQDataStream & stream, Signature & sig );
public:
/** Type of signature (ie. way to obtain the signature text) */
@@ -46,26 +46,26 @@ public:
/** Constructor for disabled signature */
Signature();
/** Constructor for inline text */
- Signature( const QString & text );
+ Signature( const TQString & text );
/** Constructor for text from a file or from output of a command */
- Signature( const QString & url, bool isExecutable );
+ Signature( const TQString & url, bool isExecutable );
/** @return the raw signature text as entered resp. read from file. */
- QString rawText( bool * ok=0 ) const;
+ TQString rawText( bool * ok=0 ) const;
/** @return the signature text with a "-- " separator added, if
necessary. */
- QString withSeparator( bool * ok=0 ) const;
+ TQString withSeparator( bool * ok=0 ) const;
/** Set the signature text and mark this signature as being of
"inline text" type. */
- void setText( const QString & text ) { mText = text; }
- QString text() const { return mText; }
+ void setText( const TQString & text ) { mText = text; }
+ TQString text() const { return mText; }
/** Set the signature URL and mark this signature as being of
"from file" resp. "from output of command" type. */
- void setUrl( const QString & url, bool isExecutable=false );
- QString url() const { return mUrl; }
+ void setUrl( const TQString & url, bool isExecutable=false );
+ TQString url() const { return mUrl; }
/// @return the type of signature (ie. way to obtain the signature text)
Type type() const { return mType; }
@@ -76,12 +76,12 @@ protected:
void readConfig( const KConfigBase * config );
private:
- QString textFromFile( bool * ok ) const;
- QString textFromCommand( bool * ok ) const;
+ TQString textFromFile( bool * ok ) const;
+ TQString textFromCommand( bool * ok ) const;
private:
- QString mUrl;
- QString mText;
+ TQString mUrl;
+ TQString mText;
Type mType;
};
@@ -90,14 +90,14 @@ class KDE_EXPORT Identity
{
// only the identity manager should be able to construct and
// destruct us, but then we get into problems with using
- // QValueList<Identity> and especially qHeapSort().
+ // TQValueList<Identity> and especially qHeapSort().
friend class IdentityManager;
- friend QDataStream & operator<<( QDataStream & stream, const KPIM::Identity & ident );
- friend QDataStream & operator>>( QDataStream & stream, KPIM::Identity & ident );
+ friend TQDataStream & operator<<( TQDataStream & stream, const KPIM::Identity & ident );
+ friend TQDataStream & operator>>( TQDataStream & stream, KPIM::Identity & ident );
public:
- typedef QValueList<Identity> List;
+ typedef TQValueList<Identity> List;
/** used for comparison */
bool operator==( const Identity & other ) const;
@@ -125,11 +125,11 @@ public:
}
/** Constructor */
- explicit Identity( const QString & id=QString::null,
- const QString & realName=QString::null,
- const QString & emailAddr=QString::null,
- const QString & organization=QString::null,
- const QString & replyToAddress=QString::null );
+ explicit Identity( const TQString & id=TQString::null,
+ const TQString & realName=TQString::null,
+ const TQString & emailAddr=TQString::null,
+ const TQString & organization=TQString::null,
+ const TQString & replyToAddress=TQString::null );
/** Destructor */
~Identity();
@@ -148,8 +148,8 @@ public:
bool mailingAllowed() const;
/** Identity/nickname for this collection */
- QString identityName() const { return mIdentity; }
- void setIdentityName( const QString & name );
+ TQString identityName() const { return mIdentity; }
+ void setIdentityName( const TQString & name );
/** @return whether this identity is the default identity */
bool isDefault() const { return mIsDefault; }
@@ -173,57 +173,57 @@ protected:
public:
/** Full name of the user */
- QString fullName() const { return mFullName; }
- void setFullName(const QString&);
+ TQString fullName() const { return mFullName; }
+ void setFullName(const TQString&);
/** The user's organization (optional) */
- QString organization() const { return mOrganization; }
- void setOrganization(const QString&);
+ TQString organization() const { return mOrganization; }
+ void setOrganization(const TQString&);
- KDE_DEPRECATED QCString pgpIdentity() const { return pgpEncryptionKey(); }
- KDE_DEPRECATED void setPgpIdentity( const QCString & key ) {
+ KDE_DEPRECATED TQCString pgpIdentity() const { return pgpEncryptionKey(); }
+ KDE_DEPRECATED void setPgpIdentity( const TQCString & key ) {
setPGPEncryptionKey( key );
setPGPSigningKey( key );
}
/** The user's OpenPGP encryption key */
- QCString pgpEncryptionKey() const { return mPGPEncryptionKey; }
- void setPGPEncryptionKey( const QCString & key );
+ TQCString pgpEncryptionKey() const { return mPGPEncryptionKey; }
+ void setPGPEncryptionKey( const TQCString & key );
/** The user's OpenPGP signing key */
- QCString pgpSigningKey() const { return mPGPSigningKey; }
- void setPGPSigningKey( const QCString & key );
+ TQCString pgpSigningKey() const { return mPGPSigningKey; }
+ void setPGPSigningKey( const TQCString & key );
/** The user's S/MIME encryption key */
- QCString smimeEncryptionKey() const { return mSMIMEEncryptionKey; }
- void setSMIMEEncryptionKey( const QCString & key );
+ TQCString smimeEncryptionKey() const { return mSMIMEEncryptionKey; }
+ void setSMIMEEncryptionKey( const TQCString & key );
/** The user's S/MIME signing key */
- QCString smimeSigningKey() const { return mSMIMESigningKey; }
- void setSMIMESigningKey( const QCString & key );
+ TQCString smimeSigningKey() const { return mSMIMESigningKey; }
+ void setSMIMESigningKey( const TQCString & key );
Kleo::CryptoMessageFormat preferredCryptoMessageFormat() const { return mPreferredCryptoMessageFormat; }
void setPreferredCryptoMessageFormat( Kleo::CryptoMessageFormat format ) { mPreferredCryptoMessageFormat = format; }
/** email address (without the user name - only name\@host) */
- QString emailAddr() const { return mEmailAddr; }
- void setEmailAddr(const QString&);
+ TQString emailAddr() const { return mEmailAddr; }
+ void setEmailAddr(const TQString&);
/** vCard to attach to outgoing emails */
- QString vCardFile() const { return mVCardFile; }
- void setVCardFile(const QString&);
+ TQString vCardFile() const { return mVCardFile; }
+ void setVCardFile(const TQString&);
/** email address in the format "username <name@host>" suitable
for the "From:" field of email messages. */
- QString fullEmailAddr() const;
+ TQString fullEmailAddr() const;
/** email address for the ReplyTo: field */
- QString replyToAddr() const { return mReplyToAddr; }
- void setReplyToAddr(const QString&);
+ TQString replyToAddr() const { return mReplyToAddr; }
+ void setReplyToAddr(const TQString&);
/** email addresses for the BCC: field */
- QString bcc() const { return mBcc; }
- void setBcc(const QString& aBcc) { mBcc = aBcc; }
+ TQString bcc() const { return mBcc; }
+ void setBcc(const TQString& aBcc) { mBcc = aBcc; }
void setSignature( const Signature & sig ) { mSignature = sig; }
Signature & signature() /* _not_ const! */ { return mSignature; }
@@ -238,12 +238,12 @@ protected:
bool signatureIsInline() const { return mSignature.type() == Signature::Inlined; }
/** name of the signature file (with path) */
- QString signatureFile() const { return mSignature.url(); }
- void setSignatureFile(const QString&);
+ TQString signatureFile() const { return mSignature.url(); }
+ void setSignatureFile(const TQString&);
/** inline signature */
- QString signatureInlineText() const { return mSignature.text();}
- void setSignatureInlineText(const QString&);
+ TQString signatureInlineText() const { return mSignature.text();}
+ void setSignatureInlineText(const TQString&);
/** Inline or signature from a file */
bool useSignatureFile() const { return signatureIsPlainFile() || signatureIsCommand(); }
@@ -254,35 +254,35 @@ public:
correct. So use this method to rectreive the contents of the
signature file. If @p prompt is false, no errors will be displayed
(useful for retries). */
- QString signatureText( bool * ok=0) const;
+ TQString signatureText( bool * ok=0) const;
/** The transport that is set for this identity. Used to link a
transport with an identity. */
- QString transport() const { return mTransport; }
- void setTransport(const QString&);
+ TQString transport() const { return mTransport; }
+ void setTransport(const TQString&);
/** The folder where sent messages from this identity will be
stored by default. */
- QString fcc() const { return mFcc; }
- void setFcc(const QString&);
+ TQString fcc() const { return mFcc; }
+ void setFcc(const TQString&);
/** The folder where draft messages from this identity will be
stored by default. */
- QString drafts() const { return mDrafts; }
- void setDrafts(const QString&);
+ TQString drafts() const { return mDrafts; }
+ void setDrafts(const TQString&);
/** The folder where template messages from this identity will be
stored by default. */
- QString templates() const { return mTemplates; }
- void setTemplates( const QString& );
+ TQString templates() const { return mTemplates; }
+ void setTemplates( const TQString& );
/** dictionary which should be used for spell checking */
- QString dictionary() const { return mDictionary; }
- void setDictionary( const QString& );
+ TQString dictionary() const { return mDictionary; }
+ void setDictionary( const TQString& );
/** a X-Face header for this identity */
- QString xface() const { return mXFace; }
- void setXFace( const QString& );
+ TQString xface() const { return mXFace; }
+ void setXFace( const TQString& );
bool isXFaceEnabled() const { return mXFaceEnabled; }
void setXFaceEnabled( const bool );
@@ -294,25 +294,25 @@ protected:
// isNull(), readConfig() and writeConfig() as well as operator<<
// and operator>> accordingly:
uint mUoid;
- QString mIdentity, mFullName, mEmailAddr, mOrganization;
- QString mReplyToAddr;
- QString mBcc;
- QString mVCardFile;
- QCString mPGPEncryptionKey, mPGPSigningKey, mSMIMEEncryptionKey, mSMIMESigningKey;
- QString mFcc, mDrafts, mTemplates, mTransport;
- QString mDictionary;
- QString mXFace;
+ TQString mIdentity, mFullName, mEmailAddr, mOrganization;
+ TQString mReplyToAddr;
+ TQString mBcc;
+ TQString mVCardFile;
+ TQCString mPGPEncryptionKey, mPGPSigningKey, mSMIMEEncryptionKey, mSMIMESigningKey;
+ TQString mFcc, mDrafts, mTemplates, mTransport;
+ TQString mDictionary;
+ TQString mXFace;
bool mXFaceEnabled;
Signature mSignature;
bool mIsDefault;
Kleo::CryptoMessageFormat mPreferredCryptoMessageFormat;
};
-KDE_EXPORT QDataStream & operator<<( QDataStream & stream, const KPIM::Signature & sig );
-KDE_EXPORT QDataStream & operator>>( QDataStream & stream, KPIM::Signature & sig );
+KDE_EXPORT TQDataStream & operator<<( TQDataStream & stream, const KPIM::Signature & sig );
+KDE_EXPORT TQDataStream & operator>>( TQDataStream & stream, KPIM::Signature & sig );
-KDE_EXPORT QDataStream & operator<<( QDataStream & stream, const KPIM::Identity & ident );
-KDE_EXPORT QDataStream & operator>>( QDataStream & stream, KPIM::Identity & ident );
+KDE_EXPORT TQDataStream & operator<<( TQDataStream & stream, const KPIM::Identity & ident );
+KDE_EXPORT TQDataStream & operator>>( TQDataStream & stream, KPIM::Identity & ident );
} // namespace KPIM
diff --git a/libkpimidentities/identitycombo.cpp b/libkpimidentities/identitycombo.cpp
index a7b9cd3ab..55c78e2a6 100644
--- a/libkpimidentities/identitycombo.cpp
+++ b/libkpimidentities/identitycombo.cpp
@@ -43,17 +43,17 @@
using namespace KPIM;
-IdentityCombo::IdentityCombo( IdentityManager* manager, QWidget * parent, const char * name )
- : QComboBox( false, parent, name ), mIdentityManager( manager )
+IdentityCombo::IdentityCombo( IdentityManager* manager, TQWidget * parent, const char * name )
+ : TQComboBox( false, parent, name ), mIdentityManager( manager )
{
reloadCombo();
reloadUoidList();
- connect( this, SIGNAL(activated(int)), SLOT(slotEmitChanged(int)) );
- connect( manager, SIGNAL(changed()),
- SLOT(slotIdentityManagerChanged()) );
+ connect( this, TQT_SIGNAL(activated(int)), TQT_SLOT(slotEmitChanged(int)) );
+ connect( manager, TQT_SIGNAL(changed()),
+ TQT_SLOT(slotIdentityManagerChanged()) );
}
-QString IdentityCombo::currentIdentityName() const {
+TQString IdentityCombo::currentIdentityName() const {
return mIdentityManager->identities()[ currentItem() ];
}
@@ -65,7 +65,7 @@ void IdentityCombo::setCurrentIdentity( const Identity & identity ) {
setCurrentIdentity( identity.uoid() );
}
-void IdentityCombo::setCurrentIdentity( const QString & name ) {
+void IdentityCombo::setCurrentIdentity( const TQString & name ) {
int idx = mIdentityManager->identities().findIndex( name );
if ( idx < 0 ) return;
if ( idx == currentItem() ) return;
@@ -90,7 +90,7 @@ void IdentityCombo::setCurrentIdentity( uint uoid ) {
}
void IdentityCombo::reloadCombo() {
- QStringList identities = mIdentityManager->identities();
+ TQStringList identities = mIdentityManager->identities();
// the IM should prevent this from happening:
assert( !identities.isEmpty() );
identities.first() = i18n("%1 (Default)").arg( identities.first() );
diff --git a/libkpimidentities/identitycombo.h b/libkpimidentities/identitycombo.h
index 193b81d04..ab7382f5a 100644
--- a/libkpimidentities/identitycombo.h
+++ b/libkpimidentities/identitycombo.h
@@ -32,8 +32,8 @@
#ifndef _KPIM_IDENTITYCOMBO_H_
#define _KPIM_IDENTITYCOMBO_H_
-#include <qcombobox.h>
-#include <qvaluelist.h>
+#include <tqcombobox.h>
+#include <tqvaluelist.h>
#include <kdepimmacros.h>
class QString;
@@ -48,14 +48,14 @@ class Identity;
* @author Marc Mutz <mutz@kde.org>
**/
-class KDE_EXPORT IdentityCombo : public QComboBox {
+class KDE_EXPORT IdentityCombo : public TQComboBox {
Q_OBJECT
public:
- IdentityCombo( IdentityManager* manager, QWidget * parent=0, const char * name=0 );
+ IdentityCombo( IdentityManager* manager, TQWidget * parent=0, const char * name=0 );
- QString currentIdentityName() const;
+ TQString currentIdentityName() const;
uint currentIdentity() const;
- void setCurrentIdentity( const QString & identityName );
+ void setCurrentIdentity( const TQString & identityName );
void setCurrentIdentity( const Identity & identity );
void setCurrentIdentity( uint uoid );
@@ -65,7 +65,7 @@ signals:
* by user intervention or on setCurrentIdentity() or if the
* current identity disappears.
**/
- void identityChanged( const QString & identityName );
+ void identityChanged( const TQString & identityName );
/** @em Really emitted whenever the current identity changes. Either
* by user intervention or on setCurrentIdentity() or if the
@@ -90,7 +90,7 @@ protected:
void reloadUoidList();
protected:
- QValueList<uint> mUoidList;
+ TQValueList<uint> mUoidList;
IdentityManager* mIdentityManager;
};
diff --git a/libkpimidentities/identitymanager.cpp b/libkpimidentities/identitymanager.cpp
index 00f3eae45..4c6ed02ad 100644
--- a/libkpimidentities/identitymanager.cpp
+++ b/libkpimidentities/identitymanager.cpp
@@ -49,24 +49,24 @@ static const char configKeyDefaultIdentity[] = "Default Identity";
#include <kuser.h>
#include <dcopclient.h>
-#include <qregexp.h>
+#include <tqregexp.h>
#include <assert.h>
using namespace KPIM;
-static QCString newDCOPObjectName()
+static TQCString newDCOPObjectName()
{
static int s_count = 0;
- QCString name( "KPIM::IdentityManager" );
+ TQCString name( "KPIM::IdentityManager" );
if ( s_count++ ) {
name += '-';
- name += QCString().setNum( s_count );
+ name += TQCString().setNum( s_count );
}
return name;
}
-IdentityManager::IdentityManager( bool readonly, QObject * parent, const char * name )
+IdentityManager::IdentityManager( bool readonly, TQObject * parent, const char * name )
: ConfigManager( parent, name ), DCOPObject( newDCOPObjectName() )
{
mReadOnly = readonly;
@@ -91,8 +91,8 @@ IdentityManager::IdentityManager( bool readonly, QObject * parent, const char *
}
// The emitter is always called KPIM::IdentityManager even if we are not
- if ( !connectDCOPSignal( 0, "KPIM::IdentityManager", "identitiesChanged(QCString,QCString)",
- "slotIdentitiesChanged(QCString,QCString)", false ) )
+ if ( !connectDCOPSignal( 0, "KPIM::IdentityManager", "identitiesChanged(TQCString,TQCString)",
+ "slotIdentitiesChanged(TQCString,TQCString)", false ) )
kdError(5650) << "IdentityManager: connection to identitiesChanged failed" << endl;
}
@@ -108,16 +108,16 @@ void IdentityManager::commit()
// early out:
if ( !hasPendingChanges() || mReadOnly ) return;
- QValueList<uint> seenUOIDs;
- for ( QValueList<Identity>::ConstIterator it = mIdentities.begin() ;
+ TQValueList<uint> seenUOIDs;
+ for ( TQValueList<Identity>::ConstIterator it = mIdentities.begin() ;
it != mIdentities.end() ; ++it )
seenUOIDs << (*it).uoid();
- QValueList<uint> changedUOIDs;
+ TQValueList<uint> changedUOIDs;
// find added and changed identities:
- for ( QValueList<Identity>::ConstIterator it = mShadowIdentities.begin() ;
+ for ( TQValueList<Identity>::ConstIterator it = mShadowIdentities.begin() ;
it != mShadowIdentities.end() ; ++it ) {
- QValueList<uint>::Iterator uoid = seenUOIDs.find( (*it).uoid() );
+ TQValueList<uint>::Iterator uoid = seenUOIDs.find( (*it).uoid() );
if ( uoid != seenUOIDs.end() ) {
const Identity & orig = identityForUoid( *uoid ); // look it up in mIdentities
if ( *it != orig ) {
@@ -135,7 +135,7 @@ void IdentityManager::commit()
}
// what's left are deleted identities:
- for ( QValueList<uint>::ConstIterator it = seenUOIDs.begin() ;
+ for ( TQValueList<uint>::ConstIterator it = seenUOIDs.begin() ;
it != seenUOIDs.end() ; ++it ) {
kdDebug( 5006 ) << "emitting deleted() for identity " << (*it) << endl;
emit deleted( *it );
@@ -146,7 +146,7 @@ void IdentityManager::commit()
// now that mIdentities has all the new info, we can emit the added/changed
// signals that ship a uoid. This is because the slots might use identityForUoid(uoid)...
- for ( QValueList<uint>::ConstIterator it = changedUOIDs.begin() ;
+ for ( TQValueList<uint>::ConstIterator it = changedUOIDs.begin() ;
it != changedUOIDs.end() ; ++it )
emit changed( *it );
@@ -155,10 +155,10 @@ void IdentityManager::commit()
// DCOP signal for other IdentityManager instances
// The emitter is always set to KPIM::IdentityManager, so that the connect works
// This is why we can't use k_dcop_signals here, but need to use emitDCOPSignal
- QByteArray data; QDataStream arg( data, IO_WriteOnly );
+ TQByteArray data; TQDataStream arg( data, IO_WriteOnly );
arg << kapp->dcopClient()->appId();
arg << DCOPObject::objId(); // the real objId, for checking in slotIdentitiesChanged
- kapp->dcopClient()->emitDCOPSignal( "KPIM::IdentityManager", "identitiesChanged(QCString,QCString)", data );
+ kapp->dcopClient()->emitDCOPSignal( "KPIM::IdentityManager", "identitiesChanged(TQCString,TQCString)", data );
}
void IdentityManager::rollback()
@@ -171,18 +171,18 @@ bool IdentityManager::hasPendingChanges() const
return mIdentities != mShadowIdentities;
}
-QStringList IdentityManager::identities() const
+TQStringList IdentityManager::identities() const
{
- QStringList result;
+ TQStringList result;
for ( ConstIterator it = mIdentities.begin() ;
it != mIdentities.end() ; ++it )
result << (*it).identityName();
return result;
}
-QStringList IdentityManager::shadowIdentities() const
+TQStringList IdentityManager::shadowIdentities() const
{
- QStringList result;
+ TQStringList result;
for ( ConstIterator it = mShadowIdentities.begin() ;
it != mShadowIdentities.end() ; ++it )
result << (*it).identityName();
@@ -194,14 +194,14 @@ void IdentityManager::sort() {
}
void IdentityManager::writeConfig() const {
- QStringList identities = groupList(mConfig);
- for ( QStringList::Iterator group = identities.begin() ;
+ TQStringList identities = groupList(mConfig);
+ for ( TQStringList::Iterator group = identities.begin() ;
group != identities.end() ; ++group )
mConfig->deleteGroup( *group );
int i = 0;
for ( ConstIterator it = mIdentities.begin() ;
it != mIdentities.end() ; ++it, ++i ) {
- KConfigGroup cg( mConfig, QString::fromLatin1("Identity #%1").arg(i) );
+ KConfigGroup cg( mConfig, TQString::fromLatin1("Identity #%1").arg(i) );
(*it).writeConfig( &cg );
if ( (*it).isDefault() ) {
// remember which one is default:
@@ -223,14 +223,14 @@ void IdentityManager::writeConfig() const {
void IdentityManager::readConfig(KConfigBase* config) {
mIdentities.clear();
- QStringList identities = groupList(config);
+ TQStringList identities = groupList(config);
if ( identities.isEmpty() ) return; // nothing to be done...
KConfigGroup general( config, "General" );
uint defaultIdentity = general.readUnsignedNumEntry( configKeyDefaultIdentity );
bool haveDefault = false;
- for ( QStringList::Iterator group = identities.begin() ;
+ for ( TQStringList::Iterator group = identities.begin() ;
group != identities.end() ; ++group ) {
KConfigGroup configGroup( config, *group );
mIdentities << Identity();
@@ -249,8 +249,8 @@ void IdentityManager::readConfig(KConfigBase* config) {
mShadowIdentities = mIdentities;
}
-QStringList IdentityManager::groupList(KConfigBase* config) const {
- return config->groupList().grep( QRegExp("^Identity #\\d+$") );
+TQStringList IdentityManager::groupList(KConfigBase* config) const {
+ return config->groupList().grep( TQRegExp("^Identity #\\d+$") );
}
IdentityManager::ConstIterator IdentityManager::begin() const {
@@ -269,7 +269,7 @@ IdentityManager::Iterator IdentityManager::modifyEnd() {
return mShadowIdentities.end();
}
-const Identity & IdentityManager::identityForName( const QString & name ) const
+const Identity & IdentityManager::identityForName( const TQString & name ) const
{
kdWarning( 5006 )
<< "deprecated method IdentityManager::identityForName() called!" << endl;
@@ -284,7 +284,7 @@ const Identity & IdentityManager::identityForUoid( uint uoid ) const {
return Identity::null();
}
-const Identity & IdentityManager::identityForNameOrDefault( const QString & name ) const
+const Identity & IdentityManager::identityForNameOrDefault( const TQString & name ) const
{
const Identity & ident = identityForName( name );
if ( ident.isNull() )
@@ -302,14 +302,14 @@ const Identity & IdentityManager::identityForUoidOrDefault( uint uoid ) const
return ident;
}
-const Identity & IdentityManager::identityForAddress( const QString & addresses ) const
+const Identity & IdentityManager::identityForAddress( const TQString & addresses ) const
{
- QStringList addressList = KPIM::splitEmailAddrList( addresses );
+ TQStringList addressList = KPIM::splitEmailAddrList( addresses );
for ( ConstIterator it = begin() ; it != end() ; ++it ) {
- for( QStringList::ConstIterator addrIt = addressList.begin();
+ for( TQStringList::ConstIterator addrIt = addressList.begin();
addrIt != addressList.end(); ++addrIt ) {
- // I use QString::utf8() instead of QString::latin1() because I want
- // a QCString and not a char*. It doesn't matter because emailAddr()
+ // I use TQString::utf8() instead of TQString::latin1() because I want
+ // a TQCString and not a char*. It doesn't matter because emailAddr()
// returns a 7-bit string.
if( (*it).emailAddr().lower() ==
KPIM::getEmailAddress( *addrIt ).lower() ) {
@@ -320,11 +320,11 @@ const Identity & IdentityManager::identityForAddress( const QString & addresses
return Identity::null();
}
-bool IdentityManager::thatIsMe( const QString & addressList ) const {
+bool IdentityManager::thatIsMe( const TQString & addressList ) const {
return !identityForAddress( addressList ).isNull();
}
-Identity & IdentityManager::modifyIdentityForName( const QString & name )
+Identity & IdentityManager::modifyIdentityForName( const TQString & name )
{
for ( Iterator it = modifyBegin() ; it != modifyEnd() ; ++it )
if ( (*it).identityName() == name ) return (*it);
@@ -350,9 +350,9 @@ const Identity & IdentityManager::defaultIdentity() const {
return *begin();
}
-bool IdentityManager::setAsDefault( const QString & name ) {
+bool IdentityManager::setAsDefault( const TQString & name ) {
// First, check if the identity actually exists:
- QStringList names = shadowIdentities();
+ TQStringList names = shadowIdentities();
if ( names.find( name ) == names.end() ) return false;
// Then, change the default as requested:
for ( Iterator it = modifyBegin() ; it != modifyEnd() ; ++it )
@@ -381,7 +381,7 @@ bool IdentityManager::setAsDefault( uint uoid ) {
return true;
}
-bool IdentityManager::removeIdentity( const QString & name ) {
+bool IdentityManager::removeIdentity( const TQString & name ) {
for ( Iterator it = modifyBegin() ; it != modifyEnd() ; ++it )
if ( (*it).identityName() == name ) {
bool removedWasDefault = (*it).isDefault();
@@ -393,11 +393,11 @@ bool IdentityManager::removeIdentity( const QString & name ) {
return false;
}
-Identity & IdentityManager::newFromScratch( const QString & name ) {
+Identity & IdentityManager::newFromScratch( const TQString & name ) {
return newFromExisting( Identity( name ) );
}
-Identity & IdentityManager::newFromControlCenter( const QString & name ) {
+Identity & IdentityManager::newFromControlCenter( const TQString & name ) {
KEMailSettings es;
es.setProfile( es.defaultProfileName() );
@@ -410,7 +410,7 @@ Identity & IdentityManager::newFromControlCenter( const QString & name ) {
}
Identity & IdentityManager::newFromExisting( const Identity & other,
- const QString & name ) {
+ const TQString & name ) {
mShadowIdentities << other;
Identity & result = mShadowIdentities.last();
result.setIsDefault( false ); // we don't want two default identities!
@@ -421,7 +421,7 @@ Identity & IdentityManager::newFromExisting( const Identity & other,
}
void IdentityManager::createDefaultIdentity() {
- QString fullName, emailAddress;
+ TQString fullName, emailAddress;
bool done = false;
// Check if the application has any settings
@@ -445,12 +445,12 @@ void IdentityManager::createDefaultIdentity() {
emailAddress = user.loginName();
if ( !emailAddress.isEmpty() ) {
KConfigGroup general( mConfig, "General" );
- QString defaultdomain = general.readEntry( "Default domain" );
+ TQString defaultdomain = general.readEntry( "Default domain" );
if( !defaultdomain.isEmpty() ) {
emailAddress += '@' + defaultdomain;
}
else {
- emailAddress = QString::null;
+ emailAddress = TQString::null;
}
}
}
@@ -471,15 +471,15 @@ int IdentityManager::newUoid()
int uoid;
// determine the UOIDs of all saved identities
- QValueList<uint> usedUOIDs;
- for ( QValueList<Identity>::ConstIterator it = mIdentities.begin() ;
+ TQValueList<uint> usedUOIDs;
+ for ( TQValueList<Identity>::ConstIterator it = mIdentities.begin() ;
it != mIdentities.end() ; ++it )
usedUOIDs << (*it).uoid();
if ( hasPendingChanges() ) {
// add UOIDs of all shadow identities. Yes, we will add a lot of duplicate
// UOIDs, but avoiding duplicate UOIDs isn't worth the effort.
- for ( QValueList<Identity>::ConstIterator it = mShadowIdentities.begin() ;
+ for ( TQValueList<Identity>::ConstIterator it = mShadowIdentities.begin() ;
it != mShadowIdentities.end() ; ++it ) {
usedUOIDs << (*it).uoid();
}
@@ -495,16 +495,16 @@ int IdentityManager::newUoid()
return uoid;
}
-QStringList KPIM::IdentityManager::allEmails() const
+TQStringList KPIM::IdentityManager::allEmails() const
{
- QStringList lst;
+ TQStringList lst;
for ( ConstIterator it = begin() ; it != end() ; ++it ) {
lst << (*it).emailAddr();
}
return lst;
}
-void KPIM::IdentityManager::slotIdentitiesChanged( QCString appId, QCString objId )
+void KPIM::IdentityManager::slotIdentitiesChanged( TQCString appId, TQCString objId )
{
// From standalone kmail to standalone korganizer, the appId will differ
// From kontact the appId will match, so we need to test the objId
diff --git a/libkpimidentities/identitymanager.h b/libkpimidentities/identitymanager.h
index b07ba7434..59b2d1c74 100644
--- a/libkpimidentities/identitymanager.h
+++ b/libkpimidentities/identitymanager.h
@@ -33,7 +33,7 @@
#include <libkdepim/configmanager.h>
-#include <qvaluelist.h>
+#include <tqvaluelist.h>
#include <dcopobject.h>
#include <kdepimmacros.h>
@@ -65,12 +65,12 @@ public:
* This means in particular that if there is no identity configured,
* the default identity created here will not be saved.
*/
- IdentityManager( bool readonly = false, QObject * parent=0, const char * name=0 );
+ IdentityManager( bool readonly = false, TQObject * parent=0, const char * name=0 );
virtual ~IdentityManager();
public:
- typedef QValueList<Identity>::Iterator Iterator;
- typedef QValueList<Identity>::ConstIterator ConstIterator;
+ typedef TQValueList<Identity>::Iterator Iterator;
+ typedef TQValueList<Identity>::ConstIterator ConstIterator;
/** Commit changes to disk and emit changed() if necessary. */
void commit();
@@ -81,14 +81,14 @@ public:
bool hasPendingChanges() const;
/** @return the list of identities */
- QStringList identities() const;
+ TQStringList identities() const;
/** Convenience method.
@return the list of (shadow) identities, ie. the ones currently
under configuration.
*/
- QStringList shadowIdentities() const;
+ TQStringList shadowIdentities() const;
/** Sort the identities by name (the default is always first). This
operates on the @em shadow list, so you need to @ref commit for
@@ -99,19 +99,19 @@ public:
/** @return an identity whose address matches any in @p addresses
or @ref Identity::null if no such identity exists.
**/
- const Identity & identityForAddress( const QString & addresses ) const;
+ const Identity & identityForAddress( const TQString & addresses ) const;
/** @return true if @p addressList contains any of our addresses,
false otherwise.
@see #identityForAddress
**/
- bool thatIsMe( const QString & addressList ) const;
+ bool thatIsMe( const TQString & addressList ) const;
/** @deprecated
@return the identity named @p identityName or @ref
Identity::null if not found.
**/
- const Identity & identityForName( const QString & identityName ) const;
+ const Identity & identityForName( const TQString & identityName ) const;
/** @return the identity with Unique Object Identifier (UOID) @p
uoid or @ref Identity::null if not found.
@@ -124,7 +124,7 @@ public:
@return the identity named @p identityName or the default
identity if not found.
**/
- const Identity & identityForNameOrDefault( const QString & identityName ) const;
+ const Identity & identityForNameOrDefault( const TQString & identityName ) const;
/** Convenience menthod.
@@ -142,7 +142,7 @@ public:
@return false if an identity named @p identityName was not found
**/
- bool setAsDefault( const QString & identityName );
+ bool setAsDefault( const TQString & identityName );
/** Sets the identity with Unique Object Identifier (UOID) @p uoid
to be new the default identity. As usual, use @ref commit to
@@ -156,7 +156,7 @@ public:
reference to the identity that can be modified. To let others
see this change, use @ref commit.
**/
- Identity & modifyIdentityForName( const QString & identityName );
+ Identity & modifyIdentityForName( const TQString & identityName );
/** @return the identity with Unique Object Identifier (UOID) @p uoid.
This method returns a reference to the identity that can
@@ -165,7 +165,7 @@ public:
Identity & modifyIdentityForUoid( uint uoid );
/** Removes the identity with name @p identityName */
- bool removeIdentity( const QString & identityName );
+ bool removeIdentity( const TQString & identityName );
ConstIterator begin() const;
ConstIterator end() const;
@@ -174,13 +174,13 @@ public:
Iterator modifyBegin();
Iterator modifyEnd();
- Identity & newFromScratch( const QString & name );
- Identity & newFromControlCenter( const QString & name );
+ Identity & newFromScratch( const TQString & name );
+ Identity & newFromControlCenter( const TQString & name );
Identity & newFromExisting( const Identity & other,
- const QString & name=QString::null );
+ const TQString & name=TQString::null );
/** Returns the list of all email addresses (only name@host) from all identities */
- QStringList allEmails() const;
+ TQStringList allEmails() const;
signals:
/** Emitted whenever the identity with Unique Object Identifier
@@ -205,28 +205,28 @@ protected:
* The parameters are filled with some default values from KUser,
* but reimplementations of this method can give them another value.
*/
- virtual void createDefaultIdentity( QString& /*fullName*/, QString& /*emailAddress*/ ) {}
+ virtual void createDefaultIdentity( TQString& /*fullName*/, TQString& /*emailAddress*/ ) {}
protected slots:
void slotRollback() { rollback(); };
protected:
/** The list that will be seen by everyone */
- QValueList<Identity> mIdentities;
+ TQValueList<Identity> mIdentities;
/** The list that will be seen by the config dialog */
- QValueList<Identity> mShadowIdentities;
+ TQValueList<Identity> mShadowIdentities;
//k_dcop_signals:
-// void identitiesChanged( QCString appId, QCString objId );
+// void identitiesChanged( TQCString appId, TQCString objId );
k_dcop:
// Connected to the DCOP signal
- void slotIdentitiesChanged( QCString appId, QCString objId );
+ void slotIdentitiesChanged( TQCString appId, TQCString objId );
private:
void writeConfig() const;
void readConfig(KConfigBase* config);
- QStringList groupList(KConfigBase* config) const;
+ TQStringList groupList(KConfigBase* config) const;
void createDefaultIdentity();
// returns a new Unique Object Identifier
diff --git a/libksieve/impl/lexer.h b/libksieve/impl/lexer.h
index 0eba0e585..5dbb34076 100644
--- a/libksieve/impl/lexer.h
+++ b/libksieve/impl/lexer.h
@@ -38,8 +38,8 @@
#include <ksieve/lexer.h>
#include <ksieve/error.h>
-#include <qvaluestack.h>
-#include <qcstring.h>
+#include <tqvaluestack.h>
+#include <tqcstring.h>
namespace KSieve {
@@ -79,7 +79,7 @@ namespace KSieve {
mState = mStateStack.pop();
}
- Lexer::Token nextToken( QString & tokenValue );
+ Lexer::Token nextToken( TQString & tokenValue );
private:
/** Cursor must be positioned on the \r or the \n. */
@@ -88,13 +88,13 @@ namespace KSieve {
/** Cursor must be positioned after the opening hash (#). If
parsing is successful, cursor is positioned behind the CRLF
that ended the comment's line (or past the end). */
- bool parseHashComment( QString & result, bool reallySave=false );
+ bool parseHashComment( TQString & result, bool reallySave=false );
/** Cursor must be positioned after the opening slash-asterisk */
- bool parseBracketComment( QString & result, bool reallySave=false );
+ bool parseBracketComment( TQString & result, bool reallySave=false );
/** Cursor must be positioned on the opening '/'or '#' */
- bool parseComment( QString & result, bool reallySave=false );
+ bool parseComment( TQString & result, bool reallySave=false );
/** Eats whitespace, but not comments */
bool eatWS();
@@ -103,19 +103,19 @@ namespace KSieve {
bool eatCWS();
/** Cursor must be positioned on the first character */
- bool parseIdentifier( QString & result );
+ bool parseIdentifier( TQString & result );
/** Cursor must be positioned after the initial ':' */
- bool parseTag( QString & result );
+ bool parseTag( TQString & result );
/** Cursor must be positioned on the first digit */
- bool parseNumber( QString & result );
+ bool parseNumber( TQString & result );
/** Cursor must be positioned after the "text:" token. */
- bool parseMultiLine( QString & result );
+ bool parseMultiLine( TQString & result );
/** Cursor must be positioned after the initial " */
- bool parseQuotedString( QString & result );
+ bool parseQuotedString( TQString & result );
struct State {
State( const char * s=0 )
@@ -129,7 +129,7 @@ namespace KSieve {
const char * const mEnd;
const bool mIgnoreComments : 1;
const bool mIgnoreLF : 1;
- QValueStack<State> mStateStack;
+ TQValueStack<State> mStateStack;
const char * beginOfLine() const { return mState.beginOfLine; }
diff --git a/libksieve/impl/parser.h b/libksieve/impl/parser.h
index 736678b43..d337f0f9d 100644
--- a/libksieve/impl/parser.h
+++ b/libksieve/impl/parser.h
@@ -82,7 +82,7 @@ namespace KSieve {
Lexer::Token token() const { return mToken; }
- QString tokenValue() const { return mTokenValue; }
+ TQString tokenValue() const { return mTokenValue; }
bool atEnd() const {
return !mToken && lexer.atEnd() ;
@@ -90,7 +90,7 @@ namespace KSieve {
bool obtainToken();
void consumeToken() {
mToken = Lexer::None;
- mTokenValue = QString::null;
+ mTokenValue = TQString::null;
}
void makeError( Error::Type e, int line, int col ) {
mError = Error( e, line, col );
@@ -108,7 +108,7 @@ namespace KSieve {
Error mError;
Lexer::Token mToken;
- QString mTokenValue;
+ TQString mTokenValue;
Lexer::Impl lexer;
ScriptBuilder * mBuilder;
};
diff --git a/libksieve/ksieve/error.h b/libksieve/ksieve/error.h
index 2dbed32c8..de84b2041 100644
--- a/libksieve/ksieve/error.h
+++ b/libksieve/ksieve/error.h
@@ -33,7 +33,7 @@
#ifndef __KSIEVE_ERROR_H__
#define __KSIEVE_ERROR_H__
-#include <qstring.h>
+#include <tqstring.h>
#include <kdepimmacros.h>
@@ -107,14 +107,14 @@ namespace KSieve {
static const char * typeToString( Type type );
Error( Type type=None,
- const QString & s1=QString::null, const QString & s2=QString::null,
+ const TQString & s1=TQString::null, const TQString & s2=TQString::null,
int line=-1, int col=-1 )
: mType( type ), mLine( line ), mCol( col ),
mStringOne( s1 ), mStringTwo( s2 ) {}
Error( Type type, int line, int col )
: mType( type ), mLine( line ), mCol( col ) {}
- QString asString() const;
+ TQString asString() const;
/** So you can write <pre>if( error() )</pre> with e.g. @ref Lexer */
operator bool() const {
@@ -124,14 +124,14 @@ namespace KSieve {
Type type() const { return mType; }
int line() const { return mLine; }
int column() const { return mCol; }
- QString firstString() const { return mStringOne; }
- QString secondString() const { return mStringTwo; }
+ TQString firstString() const { return mStringOne; }
+ TQString secondString() const { return mStringTwo; }
protected:
Type mType;
int mLine;
int mCol;
- QString mStringOne, mStringTwo;
+ TQString mStringOne, mStringTwo;
};
} // namespace KSieve
diff --git a/libksieve/ksieve/lexer.h b/libksieve/ksieve/lexer.h
index d5bb1fc3b..befcb0242 100644
--- a/libksieve/ksieve/lexer.h
+++ b/libksieve/ksieve/lexer.h
@@ -89,7 +89,7 @@ namespace KSieve {
/** Parse the next token and return it's type. @p result will contain
the value of the token. */
- Token nextToken( QString & result );
+ Token nextToken( TQString & result );
void save();
void restore();
diff --git a/libksieve/ksieve/scriptbuilder.h b/libksieve/ksieve/scriptbuilder.h
index 5e0a955bb..28fd60879 100644
--- a/libksieve/ksieve/scriptbuilder.h
+++ b/libksieve/ksieve/scriptbuilder.h
@@ -43,18 +43,18 @@ namespace KSieve {
public:
virtual ~ScriptBuilder() {}
- virtual void taggedArgument( const QString & tag ) = 0;
- virtual void stringArgument( const QString & string, bool multiLine, const QString & embeddedHashComment ) = 0;
+ virtual void taggedArgument( const TQString & tag ) = 0;
+ virtual void stringArgument( const TQString & string, bool multiLine, const TQString & embeddedHashComment ) = 0;
virtual void numberArgument( unsigned long number, char quantifier ) = 0;
virtual void stringListArgumentStart() = 0;
- virtual void stringListEntry( const QString & string, bool multiLine, const QString & embeddedHashComment ) = 0;
+ virtual void stringListEntry( const TQString & string, bool multiLine, const TQString & embeddedHashComment ) = 0;
virtual void stringListArgumentEnd() = 0;
- virtual void commandStart( const QString & identifier ) = 0;
+ virtual void commandStart( const TQString & identifier ) = 0;
virtual void commandEnd() = 0;
- virtual void testStart( const QString & identifier ) = 0;
+ virtual void testStart( const TQString & identifier ) = 0;
virtual void testEnd() = 0;
virtual void testListStart() = 0;
@@ -64,9 +64,9 @@ namespace KSieve {
virtual void blockEnd() = 0;
/** A hash comment always includes an implicit lineFeed() at it's end. */
- virtual void hashComment( const QString & comment ) = 0;
+ virtual void hashComment( const TQString & comment ) = 0;
/** Bracket comments inclde explicit lineFeed()s in their content */
- virtual void bracketComment( const QString & comment ) = 0;
+ virtual void bracketComment( const TQString & comment ) = 0;
virtual void lineFeed() = 0;
diff --git a/libksieve/parser/lexer.cpp b/libksieve/parser/lexer.cpp
index d8b76da71..c0b7cb8b3 100644
--- a/libksieve/parser/lexer.cpp
+++ b/libksieve/parser/lexer.cpp
@@ -38,9 +38,9 @@
#include <impl/utf8validator.h>
#include <ksieve/error.h>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qtextcodec.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqtextcodec.h>
#include <memory> // std::auto_ptr
@@ -105,7 +105,7 @@ namespace KSieve {
i->restore();
}
- Lexer::Token Lexer::nextToken( QString & result ) {
+ Lexer::Token Lexer::nextToken( TQString & result ) {
assert( i );
return i->nextToken( result );
}
@@ -159,7 +159,7 @@ static inline bool is8Bit( signed char ch ) {
return ch < 0;
}
-static QString removeCRLF( const QString & s ) {
+static TQString removeCRLF( const TQString & s ) {
const bool CRLF = s.endsWith( "\r\n" );
const bool LF = !CRLF && s.endsWith( "\n" );
@@ -168,7 +168,7 @@ static QString removeCRLF( const QString & s ) {
return s.left( s.length() - e );
}
-static QString removeDotStuff( const QString & s ) {
+static TQString removeDotStuff( const TQString & s ) {
return s.startsWith( ".." ) ? s.mid( 1 ) : s ;
}
@@ -190,9 +190,9 @@ namespace KSieve {
assert( atEnd() );
}
- Lexer::Token Lexer::Impl::nextToken( QString & result ) {
+ Lexer::Token Lexer::Impl::nextToken( TQString & result ) {
assert( !atEnd() );
- result = QString::null;
+ result = TQString::null;
//clearErrors();
const int oldLine = line();
@@ -332,7 +332,7 @@ namespace KSieve {
}
- bool Lexer::Impl::parseHashComment( QString & result, bool reallySave ) {
+ bool Lexer::Impl::parseHashComment( TQString & result, bool reallySave ) {
// hash-comment := "#" *CHAR-NOT-CRLF CRLF
// check that the caller plays by the rules:
@@ -358,7 +358,7 @@ namespace KSieve {
return false;
}
if ( reallySave )
- result += QString::fromUtf8( commentStart, commentLength );
+ result += TQString::fromUtf8( commentStart, commentLength );
}
return true;
}
@@ -366,7 +366,7 @@ namespace KSieve {
return false;
}
- bool Lexer::Impl::parseBracketComment( QString & result, bool reallySave ) {
+ bool Lexer::Impl::parseBracketComment( TQString & result, bool reallySave ) {
// bracket-comment := "/*" *(CHAR-NOT-STAR / ("*" CHAR-NOT-SLASH )) "*/"
// check that caller plays by the rules:
@@ -400,7 +400,7 @@ namespace KSieve {
return false;
}
if ( reallySave ) {
- QString tmp = QString::fromUtf8( commentStart, commentLength );
+ TQString tmp = TQString::fromUtf8( commentStart, commentLength );
result += tmp.remove( '\r' ); // get rid of CR in CRLF pairs
}
}
@@ -409,7 +409,7 @@ namespace KSieve {
return true;
}
- bool Lexer::Impl::parseComment( QString & result, bool reallySave ) {
+ bool Lexer::Impl::parseComment( TQString & result, bool reallySave ) {
// comment := hash-comment / bracket-comment
switch( *mState.cursor ) {
@@ -446,7 +446,7 @@ namespace KSieve {
case '#':
case '/': // comments
{
- QString dummy;
+ TQString dummy;
if ( !parseComment( dummy ) )
return false;
}
@@ -458,7 +458,7 @@ namespace KSieve {
return true;
}
- bool Lexer::Impl::parseIdentifier( QString & result ) {
+ bool Lexer::Impl::parseIdentifier( TQString & result ) {
// identifier := (ALPHA / "_") *(ALPHA DIGIT "_")
assert( isIText( *mState.cursor ) );
@@ -478,7 +478,7 @@ namespace KSieve {
// Can use the fast fromLatin1 here, since identifiers are always
// in the us-ascii subset:
- result += QString::fromLatin1( identifierStart, identifierLength );
+ result += TQString::fromLatin1( identifierStart, identifierLength );
if ( atEnd() || isDelim( *mState.cursor ) )
return true;
@@ -487,7 +487,7 @@ namespace KSieve {
return false;
}
- bool Lexer::Impl::parseTag( QString & result ) {
+ bool Lexer::Impl::parseTag( TQString & result ) {
// tag := ":" identifier
// check that the caller plays by the rules:
@@ -498,7 +498,7 @@ namespace KSieve {
return parseIdentifier( result );
}
- bool Lexer::Impl::parseNumber( QString & result ) {
+ bool Lexer::Impl::parseNumber( TQString & result ) {
// number := 1*DIGIT [QUANTIFIER]
// QUANTIFIER := "K" / "M" / "G"
@@ -531,7 +531,7 @@ namespace KSieve {
return false;
}
- bool Lexer::Impl::parseMultiLine( QString & result ) {
+ bool Lexer::Impl::parseMultiLine( TQString & result ) {
// multi-line := "text:" *(SP / HTAB) (hash-comment / CRLF)
// *(multi-line-literal / multi-line-dotstuff)
// "." CRLF
@@ -554,7 +554,7 @@ namespace KSieve {
case '#':
{
++mState.cursor;
- QString dummy;
+ TQString dummy;
if ( !parseHashComment( dummy ) )
return false;
goto MultiLineStart; // break from switch _and_ while
@@ -576,7 +576,7 @@ namespace KSieve {
}
// Now, collect the single lines until one with only a single dot is found:
- QStringList lines;
+ TQStringList lines;
while ( !atEnd() ) {
const char * const oldBeginOfLine = beginOfLine();
if ( !skipToCRLF() )
@@ -587,12 +587,12 @@ namespace KSieve {
makeError( Error::InvalidUTF8 );
return false;
}
- const QString line = removeCRLF( QString::fromUtf8( oldBeginOfLine, lineLength ) );
+ const TQString line = removeCRLF( TQString::fromUtf8( oldBeginOfLine, lineLength ) );
lines.push_back( removeDotStuff( line ) );
if ( line == "." )
break;
} else {
- lines.push_back( QString::null );
+ lines.push_back( TQString::null );
}
}
@@ -607,7 +607,7 @@ namespace KSieve {
return true;
}
- bool Lexer::Impl::parseQuotedString( QString & result ) {
+ bool Lexer::Impl::parseQuotedString( TQString & result ) {
// quoted-string := DQUOTE *CHAR DQUOTE
// check that caller plays by the rules:
@@ -616,9 +616,9 @@ namespace KSieve {
const int qsBeginCol = column() - 1;
const int qsBeginLine = line();
- const QTextCodec * const codec = QTextCodec::codecForMib( 106 ); // UTF-8
+ const TQTextCodec * const codec = TQTextCodec::codecForMib( 106 ); // UTF-8
assert( codec );
- const std::auto_ptr<QTextDecoder> dec( codec->makeDecoder() );
+ const std::auto_ptr<TQTextDecoder> dec( codec->makeDecoder() );
assert( dec.get() );
while ( !atEnd() )
diff --git a/libksieve/parser/parser.cpp b/libksieve/parser/parser.cpp
index 8c2db050e..0a136e71c 100644
--- a/libksieve/parser/parser.cpp
+++ b/libksieve/parser/parser.cpp
@@ -37,7 +37,7 @@
#include <ksieve/error.h>
-#include <qstring.h>
+#include <tqstring.h>
#include <assert.h>
#include <limits.h> // ULONG_MAX
@@ -332,7 +332,7 @@ namespace KSieve {
return true;
} else if ( isStringToken() ) {
if ( scriptBuilder() )
- scriptBuilder()->stringArgument( tokenValue(), token() == Lexer::MultiLineString, QString::null );
+ scriptBuilder()->stringArgument( tokenValue(), token() == Lexer::MultiLineString, TQString::null );
consumeToken();
return true;
} else if ( token() == Lexer::Special && tokenValue() == "[" ) {
@@ -590,7 +590,7 @@ namespace KSieve {
}
lastWasComma = false;
if ( scriptBuilder() )
- scriptBuilder()->stringListEntry( tokenValue(), token() == Lexer::MultiLineString, QString::null );
+ scriptBuilder()->stringListEntry( tokenValue(), token() == Lexer::MultiLineString, TQString::null );
consumeToken();
break;
@@ -618,7 +618,7 @@ namespace KSieve {
// number:
unsigned long result = 0;
unsigned int i = 0;
- const QCString s = tokenValue().latin1();
+ const TQCString s = tokenValue().latin1();
for ( const unsigned int len = s.length() ; i < len && isdigit( s[i] ) ; ++i ) {
const unsigned long digitValue = s[i] - '0' ;
if ( willOverflowULong( result, digitValue ) ) {
diff --git a/libksieve/parser/utf8validator.cpp b/libksieve/parser/utf8validator.cpp
index 248a1f5e9..ac94281e6 100644
--- a/libksieve/parser/utf8validator.cpp
+++ b/libksieve/parser/utf8validator.cpp
@@ -32,8 +32,8 @@
#include <impl/utf8validator.h>
-#include <qglobal.h>
-#include <qcstring.h>
+#include <tqglobal.h>
+#include <tqcstring.h>
static inline bool is8Bit( signed char ch ) {
return ch < 0;
diff --git a/libksieve/shared/error.cpp b/libksieve/shared/error.cpp
index e53b0c252..527370b8b 100644
--- a/libksieve/shared/error.cpp
+++ b/libksieve/shared/error.cpp
@@ -98,12 +98,12 @@ namespace KSieve {
}
}
- QString Error::asString() const {
+ TQString Error::asString() const {
- QString err;
+ TQString err;
switch( type() ) {
case None:
- return QString::null;
+ return TQString::null;
case Custom:
return mStringOne;
diff --git a/libksieve/tests/lexertest.cpp b/libksieve/tests/lexertest.cpp
index 461499501..23e0f886d 100644
--- a/libksieve/tests/lexertest.cpp
+++ b/libksieve/tests/lexertest.cpp
@@ -36,8 +36,8 @@ using KSieve::Lexer;
#include <ksieve/error.h>
using KSieve::Error;
-#include <qcstring.h> // qstrlen
-#include <qstring.h>
+#include <tqcstring.h> // qstrlen
+#include <tqstring.h>
#include <iostream>
using std::cout;
@@ -403,7 +403,7 @@ int main( int argc, char * argv[] ) {
cout << "Begin" << endl;
while ( !lexer.atEnd() ) {
- QString result;
+ TQString result;
Lexer::Token token = lexer.nextToken( result );
if ( lexer.error() ) {
cout << "Error " << token2string( token ) << ": \""
@@ -427,7 +427,7 @@ int main( int argc, char * argv[] ) {
Lexer lexer( t.string, send, Lexer::IncludeComments );
cerr << t.name << ":";
for ( int j = 0 ; !lexer.atEnd() ; ++j ) {
- QString result;
+ TQString result;
Lexer::Token token = lexer.nextToken( result );
Error error = lexer.error();
if ( t.expected[j].token != token ) {
@@ -435,7 +435,7 @@ int main( int argc, char * argv[] ) {
cerr << " expected token " << token2string( t.expected[j].token )
<< ", got " << token2string( token );
}
- if ( QString::fromUtf8( t.expected[j].result ) != result ) {
+ if ( TQString::fromUtf8( t.expected[j].result ) != result ) {
ok = false;
if ( t.expected[j].result )
cerr << " expected string \"" << t.expected[j].result << "\"";
diff --git a/libksieve/tests/parsertest.cpp b/libksieve/tests/parsertest.cpp
index e2ea0fd39..87381a326 100644
--- a/libksieve/tests/parsertest.cpp
+++ b/libksieve/tests/parsertest.cpp
@@ -36,8 +36,8 @@ using KSieve::Parser;
#include <ksieve/error.h>
#include <ksieve/scriptbuilder.h>
-#include <qcstring.h> // qstrlen
-#include <qstring.h>
+#include <tqcstring.h> // qstrlen
+#include <tqstring.h>
#include <iostream>
using std::cout;
@@ -389,17 +389,17 @@ public:
}
virtual ~PrintingScriptBuilder() {}
- void taggedArgument( const QString & tag ) {
+ void taggedArgument( const TQString & tag ) {
write( "tag", tag );
}
- void stringArgument( const QString & string, bool multiLine, const QString & /*fixme*/ ) {
+ void stringArgument( const TQString & string, bool multiLine, const TQString & /*fixme*/ ) {
write( multiLine ? "string type=\"multiline\"" : "string type=\"quoted\"", string );
}
void numberArgument( unsigned long number, char quantifier ) {
- const QString txt = "number" + ( quantifier ? QString(" quantifier=\"%1\"").arg( quantifier ) : QString::null ) ;
- write( txt.latin1(), QString::number( number ) );
+ const TQString txt = "number" + ( quantifier ? TQString(" quantifier=\"%1\"").arg( quantifier ) : TQString::null ) ;
+ write( txt.latin1(), TQString::number( number ) );
}
- void commandStart( const QString & identifier ) {
+ void commandStart( const TQString & identifier ) {
write( "<command>" );
++indent;
write( "identifier", identifier );
@@ -408,7 +408,7 @@ public:
--indent;
write( "</command>" );
}
- void testStart( const QString & identifier ) {
+ void testStart( const TQString & identifier ) {
write( "<test>" );
++indent;
write( "identifier", identifier );
@@ -441,13 +441,13 @@ public:
--indent;
write( "</stringlist>" );
}
- void stringListEntry( const QString & string, bool multiline, const QString & hashComment ) {
+ void stringListEntry( const TQString & string, bool multiline, const TQString & hashComment ) {
stringArgument( string, multiline, hashComment );
}
- void hashComment( const QString & comment ) {
+ void hashComment( const TQString & comment ) {
write( "comment type=\"hash\"", comment );
}
- void bracketComment( const QString & comment ) {
+ void bracketComment( const TQString & comment ) {
write( "comment type=\"bracket\"", comment );
}
@@ -470,7 +470,7 @@ private:
cout << " ";
cout << msg << endl;
}
- void write( const QCString & key, const QString & value ) {
+ void write( const TQCString & key, const TQString & value ) {
if ( value.isEmpty() ) {
write( "<" + key + "/>" );
return;
@@ -498,12 +498,12 @@ public:
bool ok() const { return mOk; }
- void taggedArgument( const QString & tag ) {
+ void taggedArgument( const TQString & tag ) {
checkIs( TaggedArgument );
checkEquals( tag );
++mNextResponse;
}
- void stringArgument( const QString & string, bool multiline, const QString & /*fixme*/ ) {
+ void stringArgument( const TQString & string, bool multiline, const TQString & /*fixme*/ ) {
checkIs( StringArgument );
checkEquals( string );
checkEquals( multiline );
@@ -511,10 +511,10 @@ public:
}
void numberArgument( unsigned long number, char quantifier ) {
checkIs( NumberArgument );
- checkEquals( QString::number( number ) + ( quantifier ? quantifier : ' ' ) );
+ checkEquals( TQString::number( number ) + ( quantifier ? quantifier : ' ' ) );
++mNextResponse;
}
- void commandStart( const QString & identifier ) {
+ void commandStart( const TQString & identifier ) {
checkIs( CommandStart );
checkEquals( identifier );
++mNextResponse;
@@ -523,7 +523,7 @@ public:
checkIs( CommandEnd );
++mNextResponse;
}
- void testStart( const QString & identifier ) {
+ void testStart( const TQString & identifier ) {
checkIs( TestStart );
checkEquals( identifier );
++mNextResponse;
@@ -552,7 +552,7 @@ public:
checkIs( StringListArgumentStart );
++mNextResponse;
}
- void stringListEntry( const QString & string, bool multiLine, const QString & /*fixme*/ ) {
+ void stringListEntry( const TQString & string, bool multiLine, const TQString & /*fixme*/ ) {
checkIs( StringListEntry );
checkEquals( string );
checkEquals( multiLine );
@@ -562,12 +562,12 @@ public:
checkIs( StringListArgumentEnd );
++mNextResponse;
}
- void hashComment( const QString & comment ) {
+ void hashComment( const TQString & comment ) {
checkIs( HashComment );
checkEquals( comment );
++mNextResponse;
}
- void bracketComment( const QString & comment ) {
+ void bracketComment( const TQString & comment ) {
checkIs( BracketComment );
checkEquals( comment );
++mNextResponse;
@@ -577,7 +577,7 @@ public:
}
void error( const KSieve::Error & error ) {
checkIs( Error );
- checkEquals( QString( KSieve::Error::typeToString( error.type() ) ) );
+ checkEquals( TQString( KSieve::Error::typeToString( error.type() ) ) );
++mNextResponse;
}
void finished() {
@@ -599,8 +599,8 @@ private:
}
}
- void checkEquals( const QString & s ) {
- if ( s != QString::fromUtf8( currentResponse().string ) ) {
+ void checkEquals( const TQString & s ) {
+ if ( s != TQString::fromUtf8( currentResponse().string ) ) {
cerr << " expected string arg \""
<< ( currentResponse().string ? currentResponse().string : "<null>" )
<< "\", got \"" << ( s.isNull() ? "<null>" : s.utf8().data() ) << "\"";
diff --git a/networkstatus/clientiface.h b/networkstatus/clientiface.h
index d8caff6b2..9fcef57a3 100644
--- a/networkstatus/clientiface.h
+++ b/networkstatus/clientiface.h
@@ -31,31 +31,31 @@ class ClientIface : virtual public DCOPObject
K_DCOP
k_dcop:
/** Get the set of networks that the daemon is aware of. Mostly for debug */
- virtual QStringList networks() = 0;
+ virtual TQStringList networks() = 0;
/**
* Get the status of the connection to the given host.
* @param host
* @return a NetworkStatus::EnumStatus representing the state of the connection to the given host
*/
- virtual int status( const QString & host) = 0;
+ virtual int status( const TQString & host) = 0;
/**
* Request a connection to the named host, registering the application's usage of this connection
* @param host The hostname the client wants to connect to.
* @param userInitiated Indicates whether the connection is a direct result of a user action or is a background task. Used by the daemon to decide whether to create an on-demand connection.
* @return An NetworkStatus::EnumRequestResult indicating whether the request was accepted
*/
- virtual int request( const QString & host, bool userInitiated ) = 0;
+ virtual int request( const TQString & host, bool userInitiated ) = 0;
/**
* Indicate that a previously registered connection to the given host is no longer needed by this client
* @param host The hostname being relinquished.
*/
- virtual void relinquish( const QString & host ) = 0;
+ virtual void relinquish( const TQString & host ) = 0;
/**
* Indicate that a communication failure has occurred for a given host
* @param host The hostname for which the failure occurred.
* @return True indicates the caller should try again to lookup the host, as the daemon has another IP address available.
*/
- virtual bool reportFailure( const QString & host ) = 0;
+ virtual bool reportFailure( const TQString & host ) = 0;
/**
* Utility method to check the daemon's status
*/
@@ -65,13 +65,13 @@ k_dcop_signals:
* @param host The host which the application has indicated it is using
* @param status The new status of the network used to reach host.
*/
- void statusChange( QString host, int status );
+ void statusChange( TQString host, int status );
/**
* The network would like to shut down - any clients using this host are to finish using it immediately and call
* relinquish() when done.
* @param host The host, registered as in use by applications, which is about to be disconnected.
*/
- void shutdownRequested( QString host );
+ void shutdownRequested( TQString host );
};
#endif
diff --git a/networkstatus/clientifaceimpl.cpp b/networkstatus/clientifaceimpl.cpp
index a5bfb2682..f20957e73 100644
--- a/networkstatus/clientifaceimpl.cpp
+++ b/networkstatus/clientifaceimpl.cpp
@@ -25,27 +25,27 @@ ClientIfaceImpl::ClientIfaceImpl( NetworkStatusModule * module ) : m_module ( mo
{
}
-int ClientIfaceImpl::status( QString host )
+int ClientIfaceImpl::status( TQString host )
{
return m_module->status( host );
}
-int ClientIfaceImpl::request( QString host, bool userInitiated )
+int ClientIfaceImpl::request( TQString host, bool userInitiated )
{
return m_module->request( host, userInitiated );
}
-void ClientIfaceImpl::relinquish( QString host )
+void ClientIfaceImpl::relinquish( TQString host )
{
m_module->relinquish( host );
}
-bool ClientIfaceImpl::reportFailure( QString host )
+bool ClientIfaceImpl::reportFailure( TQString host )
{
return m_module->reportFailure( host );
}
-// QString ClientIfaceImpl::statusAsString()
+// TQString ClientIfaceImpl::statusAsString()
// {
//
// }
diff --git a/networkstatus/clientifaceimpl.h b/networkstatus/clientifaceimpl.h
index 5bad7afd2..bdc99a19f 100644
--- a/networkstatus/clientifaceimpl.h
+++ b/networkstatus/clientifaceimpl.h
@@ -22,7 +22,7 @@
#ifndef NETWORKSTATUS_CLIENTIFACEIMPL_H
#define NETWORKSTATUS_CLIENTIFACEIMPL_H
-#include <qstring.h>
+#include <tqstring.h>
#include "clientiface.h"
#include "networkstatus.h"
@@ -31,11 +31,11 @@ class ClientIfaceImpl : virtual public ClientIface
{
public:
ClientIfaceImpl( NetworkStatusModule * module );
- int status( QString host );
- int request( QString host, bool userInitiated );
- void relinquish( QString host );
- bool reportFailure( QString host );
-/* QString statusAsString();*/
+ int status( TQString host );
+ int request( TQString host, bool userInitiated );
+ void relinquish( TQString host );
+ bool reportFailure( TQString host );
+/* TQString statusAsString();*/
private:
NetworkStatusModule * m_module;
};
diff --git a/networkstatus/connectionmanager.cpp b/networkstatus/connectionmanager.cpp
index bb98ddf8e..a28c6a124 100644
--- a/networkstatus/connectionmanager.cpp
+++ b/networkstatus/connectionmanager.cpp
@@ -40,13 +40,13 @@ class ConnectionManagerPrivate
};
// Connection manager itself
-ConnectionManager::ConnectionManager( QObject * parent, const char * name ) : DCOPObject( "ConnectionManager" ),QObject( parent, name )
+ConnectionManager::ConnectionManager( TQObject * parent, const char * name ) : DCOPObject( "ConnectionManager" ),TQObject( parent, name )
{
d = new ConnectionManagerPrivate;
d->m_stub = new ClientIface_stub( kapp->dcopClient(), "kded", "networkstatus" );
- connectDCOPSignal( "kded", "networkstatus", "statusChange(QString,int)", "slotStatusChanged(QString,int)", false );
+ connectDCOPSignal( "kded", "networkstatus", "statusChange(TQString,int)", "slotStatusChanged(TQString,int)", false );
d->m_userInitiatedOnly = false;
initialise();
}
@@ -70,7 +70,7 @@ void ConnectionManager::initialise()
void ConnectionManager::updateStatus()
{
- /*NetworkStatus::EnumStatus daemonStatus = (NetworkStatus::EnumStatus)d->m_stub->status( QString::null );
+ /*NetworkStatus::EnumStatus daemonStatus = (NetworkStatus::EnumStatus)d->m_stub->status( TQString::null );
switch ( daemonStatus )
{
case Offline:
@@ -98,14 +98,14 @@ ConnectionManager::~ConnectionManager()
delete d;
}
-NetworkStatus::EnumStatus ConnectionManager::status( const QString & host )
+NetworkStatus::EnumStatus ConnectionManager::status( const TQString & host )
{
if ( d->m_state == Inactive )
return NetworkStatus::NoNetworks;
else
return NetworkStatus::Offline;
}
-NetworkStatus::EnumRequestResult ConnectionManager::requestConnection( QWidget * mainWidget, const QString & host, bool userInitiated )
+NetworkStatus::EnumRequestResult ConnectionManager::requestConnection( TQWidget * mainWidget, const TQString & host, bool userInitiated )
{
NetworkStatus::EnumRequestResult result;
// if offline and the user has previously indicated they didn't want any new connections, suppress it
@@ -126,12 +126,12 @@ NetworkStatus::EnumRequestResult ConnectionManager::requestConnection( QWidget *
return result;
}
-void ConnectionManager::relinquishConnection( const QString & host )
+void ConnectionManager::relinquishConnection( const TQString & host )
{
d->m_stub->relinquish( host );
}
-void ConnectionManager::slotStatusChanged( QString host, int status )
+void ConnectionManager::slotStatusChanged( TQString host, int status )
{
updateStatus();
// reset user initiated only flag if we are now online
@@ -141,7 +141,7 @@ void ConnectionManager::slotStatusChanged( QString host, int status )
emit statusChanged( host, (NetworkStatus::EnumStatus)status );
}
-bool ConnectionManager::askToConnect( QWidget * mainWidget )
+bool ConnectionManager::askToConnect( TQWidget * mainWidget )
{
i18n( "A network connection was disconnected. The application is now in offline mode. Do you want the application to resume network operations when the network is available again?" );
i18n( "This application is currently in offline mode. Do you want to connect?" );
@@ -150,7 +150,7 @@ bool ConnectionManager::askToConnect( QWidget * mainWidget )
i18n("This application is currently in offline mode. Do you want to connect in order to carry out this operation?"),
i18n("Leave Offline Mode?"),
i18n("Connect"), i18n("Do Not Connect"),
- QString::fromLatin1("OfflineModeAlwaysGoOnline") ) == KMessageBox::Yes );
+ TQString::fromLatin1("OfflineModeAlwaysGoOnline") ) == KMessageBox::Yes );
}
#include "connectionmanager.moc"
diff --git a/networkstatus/connectionmanager.h b/networkstatus/connectionmanager.h
index ab1401575..00ca4e35c 100644
--- a/networkstatus/connectionmanager.h
+++ b/networkstatus/connectionmanager.h
@@ -22,7 +22,7 @@
class ConnectionManagerPrivate;
-class ConnectionManager : public QObject, virtual public DCOPObject
+class ConnectionManager : public TQObject, virtual public DCOPObject
{
Q_OBJECT
K_DCOP
@@ -30,25 +30,25 @@ class ConnectionManager : public QObject, virtual public DCOPObject
static ConnectionManager* self();
enum State { Inactive, Online, Offline, Pending };
virtual ~ConnectionManager();
- NetworkStatus::EnumStatus status( const QString & host );
+ NetworkStatus::EnumStatus status( const TQString & host );
// check if a hostname is available. Ask user if offline. Request host
- NetworkStatus::EnumRequestResult requestConnection( QWidget* mainWidget, const QString & host, bool userInitiated );
+ NetworkStatus::EnumRequestResult requestConnection( TQWidget* mainWidget, const TQString & host, bool userInitiated );
// method to relinquish a connection
- void relinquishConnection( const QString & host );
+ void relinquishConnection( const TQString & host );
signals:
// signal that the network for a hostname is up/down
- void statusChanged( const QString & host, NetworkStatus::EnumStatus status );
+ void statusChanged( const TQString & host, NetworkStatus::EnumStatus status );
protected:
// sets up internal state
void initialise();
// reread the desktop status from the daemon and update internal state
void updateStatus();
// ask if the user would like to reconnect
- bool askToConnect( QWidget * mainWidget );
+ bool askToConnect( TQWidget * mainWidget );
k_dcop:
- void slotStatusChanged( QString host, int status );
+ void slotStatusChanged( TQString host, int status );
private:
- ConnectionManager( QObject *parent, const char * name );
+ ConnectionManager( TQObject *parent, const char * name );
ConnectionManagerPrivate *d;
static ConnectionManager * s_self;
};
diff --git a/networkstatus/network.cpp b/networkstatus/network.cpp
index c1aacafc4..fcb4a6f51 100644
--- a/networkstatus/network.cpp
+++ b/networkstatus/network.cpp
@@ -23,7 +23,7 @@
#include "network.h"
-Network::Network( const QString name, NetworkStatus::Properties properties )
+Network::Network( const TQString name, NetworkStatus::Properties properties )
: m_name( name )
{
kdDebug() << k_funcinfo << "constructing network '" << name << "', status: " << properties.status << endl;
@@ -34,7 +34,7 @@ Network::Network( const QString name, NetworkStatus::Properties properties )
m_onDemandPolicy = properties.onDemandPolicy;
}
-NetworkStatus::EnumStatus Network::reachabilityFor( const QString & host )
+NetworkStatus::EnumStatus Network::reachabilityFor( const TQString & host )
{
// initially assume all networks are internet
// TODO: compute reachability properly
@@ -53,7 +53,7 @@ NetworkStatus::EnumStatus Network::reachabilityFor( const QString & host )
}
}
-void Network::registerUsage( const QCString appId, const QString host )
+void Network::registerUsage( const TQCString appId, const TQString host )
{
NetworkUsageStruct nus;
nus.appId = appId;
@@ -68,7 +68,7 @@ void Network::registerUsage( const QCString appId, const QString host )
m_usage.append( nus );
}
-void Network::unregisterUsage( const QCString appId, const QString host )
+void Network::unregisterUsage( const TQCString appId, const TQString host )
{
NetworkUsageList::iterator end = m_usage.end();
for ( NetworkUsageList::iterator it = m_usage.begin(); it != end; ++it )
diff --git a/networkstatus/network.h b/networkstatus/network.h
index c5162f10d..dcd2cd339 100644
--- a/networkstatus/network.h
+++ b/networkstatus/network.h
@@ -22,44 +22,44 @@
#ifndef NETWORKSTATUS_NETWORK_H
#define NETWORKSTATUS_NETWORK_H
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include <ksharedptr.h>
#include "networkstatuscommon.h"
struct NetworkUsageStruct
{
- QCString appId;
- QString host;
+ TQCString appId;
+ TQString host;
};
-typedef QValueList< NetworkUsageStruct > NetworkUsageList;
+typedef TQValueList< NetworkUsageStruct > NetworkUsageList;
class Network
{
public:
- Network( const QString name, NetworkStatus::Properties properties );
+ Network( const TQString name, NetworkStatus::Properties properties );
Network( const Network & other );
- NetworkStatus::EnumStatus reachabilityFor( const QString & host );
- void registerUsage( const QCString appId, const QString host );
- void unregisterUsage( const QCString appId, const QString host );
+ NetworkStatus::EnumStatus reachabilityFor( const TQString & host );
+ void registerUsage( const TQCString appId, const TQString host );
+ void unregisterUsage( const TQCString appId, const TQString host );
void setStatus( NetworkStatus::EnumStatus status );
void removeAllUsage();
NetworkStatus::EnumStatus status() { return m_status; }
- QString name() { return m_name; }
+ TQString name() { return m_name; }
bool internet() { return m_internet; }
- QStringList netmasks() { return m_netmasks; }
- QCString service() { return m_service; }
+ TQStringList netmasks() { return m_netmasks; }
+ TQCString service() { return m_service; }
NetworkStatus::EnumOnDemandPolicy onDemandPolicy() { return m_onDemandPolicy; }
NetworkUsageList usage() { return m_usage; }
private:
NetworkStatus::EnumStatus m_status;
- QString m_name;
+ TQString m_name;
bool m_internet;
- QStringList m_netmasks;
- QCString m_service;
+ TQStringList m_netmasks;
+ TQCString m_service;
NetworkStatus::EnumOnDemandPolicy m_onDemandPolicy;
NetworkUsageList m_usage;
};
diff --git a/networkstatus/networkstatus.cpp b/networkstatus/networkstatus.cpp
index 900ac77f5..092f2b392 100644
--- a/networkstatus/networkstatus.cpp
+++ b/networkstatus/networkstatus.cpp
@@ -21,9 +21,9 @@
#include "networkstatus.h"
-#include <qdict.h>
-#include <qtimer.h>
-#include <qvaluelist.h>
+#include <tqdict.h>
+#include <tqtimer.h>
+#include <tqvaluelist.h>
#include <dcopclient.h>
#include <kapplication.h>
@@ -35,7 +35,7 @@
#include <kdepimmacros.h>
extern "C" {
- KDE_EXPORT KDEDModule* create_networkstatus( const QCString& obj )
+ KDE_EXPORT KDEDModule* create_networkstatus( const TQCString& obj )
{
return new NetworkStatusModule( obj );
}
@@ -43,8 +43,8 @@ extern "C" {
// INTERNALLY USED STRUCTS AND TYPEDEFS
-//typedef QDict< Network > NetworkList;
-typedef QValueList< Network * > NetworkList;
+//typedef TQDict< Network > NetworkList;
+typedef TQValueList< Network * > NetworkList;
class NetworkStatusModule::Private
{
@@ -56,13 +56,13 @@ public:
// CTORS/DTORS
-NetworkStatusModule::NetworkStatusModule( const QCString & obj ) : KDEDModule( obj )
+NetworkStatusModule::NetworkStatusModule( const TQCString & obj ) : KDEDModule( obj )
{
d = new Private;
/* d->clientIface = new ClientIfaceImpl( this );
d->serviceIface = new ServiceIfaceImpl( this );*/
- connect( kapp->dcopClient(), SIGNAL( applicationRemoved( const QCString& ) ) , this, SLOT( unregisteredFromDCOP( const QCString& ) ) );
- connect( kapp->dcopClient(), SIGNAL( applicationRegistered( const QCString& ) ) , this, SLOT( registeredToDCOP( const QCString& ) ) );
+ connect( kapp->dcopClient(), TQT_SIGNAL( applicationRemoved( const TQCString& ) ) , this, TQT_SLOT( unregisteredFromDCOP( const TQCString& ) ) );
+ connect( kapp->dcopClient(), TQT_SIGNAL( applicationRegistered( const TQCString& ) ) , this, TQT_SLOT( registeredToDCOP( const TQCString& ) ) );
}
NetworkStatusModule::~NetworkStatusModule()
@@ -74,10 +74,10 @@ NetworkStatusModule::~NetworkStatusModule()
// CLIENT INTERFACE
-QStringList NetworkStatusModule::networks()
+TQStringList NetworkStatusModule::networks()
{
kdDebug() << k_funcinfo << " contains " << d->networks.count() << " networks" << endl;
- QStringList networks;
+ TQStringList networks;
NetworkList::iterator end = d->networks.end();
NetworkList::iterator it = d->networks.begin();
for ( ; it != end; ++it )
@@ -85,7 +85,7 @@ QStringList NetworkStatusModule::networks()
return networks;
}
-int NetworkStatusModule::status( const QString & host )
+int NetworkStatusModule::status( const TQString & host )
{
if ( host == "127.0.0.1" || host == "localhost" )
return NetworkStatus::Online;
@@ -102,7 +102,7 @@ int NetworkStatusModule::status( const QString & host )
}
}
-int NetworkStatusModule::request( const QString & host, bool userInitiated )
+int NetworkStatusModule::request( const TQString & host, bool userInitiated )
{
// identify most suitable network for host
Network * p = networkForHost( host );
@@ -110,7 +110,7 @@ int NetworkStatusModule::request( const QString & host, bool userInitiated )
return NetworkStatus::Unavailable;
NetworkStatus::EnumStatus status = p->status();
- QCString appId = kapp->dcopClient()->senderId();
+ TQCString appId = kapp->dcopClient()->senderId();
if ( status == NetworkStatus::Online )
{
p->registerUsage( appId, host );
@@ -157,9 +157,9 @@ int NetworkStatusModule::request( const QString & host, bool userInitiated )
// return Unavailable
}
-void NetworkStatusModule::relinquish( const QString & host )
+void NetworkStatusModule::relinquish( const TQString & host )
{
- QCString appId = kapp->dcopClient()->senderId();
+ TQCString appId = kapp->dcopClient()->senderId();
// find network currently used by app for host...
NetworkList::iterator end = d->networks.end();
NetworkList::iterator it = d->networks.begin();
@@ -183,7 +183,7 @@ void NetworkStatusModule::relinquish( const QString & host )
}
}
-bool NetworkStatusModule::reportFailure( const QString & host )
+bool NetworkStatusModule::reportFailure( const TQString & host )
{
// find network for host
// check IP record. remove IP usage record. if other IP exists, return true.
@@ -196,7 +196,7 @@ bool NetworkStatusModule::reportFailure( const QString & host )
/*
* Determine the network to use for the supplied host
*/
-Network * NetworkStatusModule::networkForHost( const QString & host ) const
+Network * NetworkStatusModule::networkForHost( const TQString & host ) const
{
// return a null pointer if no networks are registered
if ( d->networks.isEmpty() )
@@ -216,11 +216,11 @@ Network * NetworkStatusModule::networkForHost( const QString & host ) const
}
-void NetworkStatusModule::registeredToDCOP( const QCString & appId )
+void NetworkStatusModule::registeredToDCOP( const TQCString & appId )
{
}
-void NetworkStatusModule::unregisteredFromDCOP( const QCString & appId )
+void NetworkStatusModule::unregisteredFromDCOP( const TQCString & appId )
{
// unregister any networks owned by a service that has just unregistered
NetworkList::iterator it = d->networks.begin();
@@ -237,7 +237,7 @@ void NetworkStatusModule::unregisteredFromDCOP( const QCString & appId )
}
// SERVICE INTERFACE //
-void NetworkStatusModule::setNetworkStatus( const QString & networkName, int st )
+void NetworkStatusModule::setNetworkStatus( const TQString & networkName, int st )
{
kdDebug() << k_funcinfo << endl;
NetworkStatus::EnumStatus status = (NetworkStatus::EnumStatus)st;
@@ -263,7 +263,7 @@ void NetworkStatusModule::setNetworkStatus( const QString & networkName, int st
// notify for each host in use on that network
NetworkUsageList usage = net->usage();
NetworkUsageList::iterator end = usage.end();
- QStringList notified;
+ TQStringList notified;
for ( NetworkUsageList::iterator it = usage.begin(); it != end; ++it )
{
// only notify once per host
@@ -284,7 +284,7 @@ void NetworkStatusModule::setNetworkStatus( const QString & networkName, int st
kdDebug() << k_funcinfo << "No network found by this name" << endl;
}
-void NetworkStatusModule::registerNetwork( const QString & networkName, const NetworkStatus::Properties properties )
+void NetworkStatusModule::registerNetwork( const TQString & networkName, const NetworkStatus::Properties properties )
{
kdDebug() << k_funcinfo << "registering '" << networkName << "', with status " << properties.status << endl;
// TODO: check for re-registration, checking appid matches
@@ -292,13 +292,13 @@ void NetworkStatusModule::registerNetwork( const QString & networkName, const Ne
d->networks.append( new Network( networkName, properties ) );
}
-void NetworkStatusModule::unregisterNetwork( const QString & networkName )
+void NetworkStatusModule::unregisterNetwork( const TQString & networkName )
{
// TODO: check appid
//d->networks.remove( networkName );
}
-void NetworkStatusModule::requestShutdown( const QString & networkName )
+void NetworkStatusModule::requestShutdown( const TQString & networkName )
{
Q_UNUSED( networkName );
kdDebug() << k_funcinfo << "NOT IMPLEMENTED" << endl;
diff --git a/networkstatus/networkstatus.h b/networkstatus/networkstatus.h
index b4281b961..710afd79a 100644
--- a/networkstatus/networkstatus.h
+++ b/networkstatus/networkstatus.h
@@ -37,41 +37,41 @@ class NetworkStatusModule : virtual public KDEDModule/*, public ClientIface, Ser
Q_OBJECT
K_DCOP
public:
- NetworkStatusModule( const QCString & obj );
+ NetworkStatusModule( const TQCString & obj );
~NetworkStatusModule();
k_dcop:
// Client interface
- QStringList networks();
- int status( const QString & host );
- int request( const QString & host, bool userInitiated );
- void relinquish( const QString & host );
- bool reportFailure( const QString & host );
-// QString statusAsString();
+ TQStringList networks();
+ int status( const TQString & host );
+ int request( const TQString & host, bool userInitiated );
+ void relinquish( const TQString & host );
+ bool reportFailure( const TQString & host );
+// TQString statusAsString();
// Service interface
- void setNetworkStatus( const QString & networkName, int status );
- void registerNetwork( const QString & networkName, NetworkStatus::Properties properties );
- void unregisterNetwork( const QString & networkName );
- void requestShutdown( const QString & networkName );
+ void setNetworkStatus( const TQString & networkName, int status );
+ void registerNetwork( const TQString & networkName, NetworkStatus::Properties properties );
+ void unregisterNetwork( const TQString & networkName );
+ void requestShutdown( const TQString & networkName );
k_dcop_signals:
/**
* A status change occurred for the network(s) used to connect to the given host.
* @param host The host which the application has indicated it is using
* @param status The new status of the network used to reach host.
*/
- void statusChange( QString host, int status );
+ void statusChange( TQString host, int status );
/**
* The network would like to shut down - any clients using this host are to finish using it immediately and call
* relinquish() when done.
* @param host The host, registered as in use by applications, which is about to be disconnected.
*/
- void shutdownRequested( QString host );
+ void shutdownRequested( TQString host );
protected slots:
- void registeredToDCOP( const QCString& appId );
- void unregisteredFromDCOP( const QCString& appId );
+ void registeredToDCOP( const TQCString& appId );
+ void unregisteredFromDCOP( const TQCString& appId );
protected:
- // QStringList networkUsers( const QString & networkName );
- Network * networkForHost( const QString & host ) const;
+ // TQStringList networkUsers( const TQString & networkName );
+ Network * networkForHost( const TQString & host ) const;
private:
class Private;
diff --git a/networkstatus/networkstatuscommon.cpp b/networkstatus/networkstatuscommon.cpp
index db9f137ec..574862929 100644
--- a/networkstatus/networkstatuscommon.cpp
+++ b/networkstatus/networkstatuscommon.cpp
@@ -22,7 +22,7 @@
#include "networkstatuscommon.h"
#include <kdebug.h>
-QDataStream & operator<< ( QDataStream & s, const NetworkStatus::Properties p )
+TQDataStream & operator<< ( TQDataStream & s, const NetworkStatus::Properties p )
{
kdDebug() << k_funcinfo << "status is: " << (int)p.status << endl;
s << (int)p.status;
@@ -33,7 +33,7 @@ QDataStream & operator<< ( QDataStream & s, const NetworkStatus::Properties p )
return s;
}
-QDataStream & operator>> ( QDataStream & s, NetworkStatus::Properties &p )
+TQDataStream & operator>> ( TQDataStream & s, NetworkStatus::Properties &p )
{
int status, onDemandPolicy, internet;
s >> status;
diff --git a/networkstatus/networkstatuscommon.h b/networkstatus/networkstatuscommon.h
index e26d01688..63c388c3f 100644
--- a/networkstatus/networkstatuscommon.h
+++ b/networkstatus/networkstatuscommon.h
@@ -22,7 +22,7 @@
#ifndef NETWORKSTATUS_COMMON_H
#define NETWORKSTATUS_COMMON_H
-#include <qstringlist.h>
+#include <tqstringlist.h>
namespace NetworkStatus
{
@@ -31,24 +31,24 @@ namespace NetworkStatus
enum EnumOnDemandPolicy { All, User, None, Permanent };
struct Properties
{
- QString name;
+ TQString name;
// status of the network
EnumStatus status;
// policy for on-demand usage as defined by the service
EnumOnDemandPolicy onDemandPolicy;
// identifier for the service
- QCString service;
+ TQCString service;
// indicate that the connection is to 'the internet' - similar to default gateway in routing
bool internet;
// list of netmasks that the network connects to - overridden by above internet
- QStringList netmasks;
+ TQStringList netmasks;
// for future expansion consider
// EnumChargingModel - FlatRate, TimeCharge, VolumeCharged
// EnumLinkStatus - for WLANs - VPOOR, POOR, AVERAGE, GOOD, EXCELLENT
};
}
-QDataStream & operator>> ( QDataStream & s, NetworkStatus::Properties &p );
-QDataStream & operator<< ( QDataStream & s, const NetworkStatus::Properties p );
+TQDataStream & operator>> ( TQDataStream & s, NetworkStatus::Properties &p );
+TQDataStream & operator<< ( TQDataStream & s, const NetworkStatus::Properties p );
#endif
diff --git a/networkstatus/provideriface.h b/networkstatus/provideriface.h
index f49c276d2..93f23103d 100644
--- a/networkstatus/provideriface.h
+++ b/networkstatus/provideriface.h
@@ -28,11 +28,11 @@ class ProviderIface : virtual public DCOPObject
K_DCOP
k_dcop:
/** @return NetworkStatus::EnumOnlineStatus */
- virtual int status( const QString & network ) = 0;
+ virtual int status( const TQString & network ) = 0;
/** @return NetworkStatus::EnumRequestResult */
- virtual int establish( const QString & network ) = 0;
+ virtual int establish( const TQString & network ) = 0;
/** @return NetworkStatus::EnumRequestResult */
- virtual int shutdown( const QString & network ) = 0;
+ virtual int shutdown( const TQString & network ) = 0;
/** fake a failure - go directly to failed */
virtual void simulateFailure() = 0;
/** fake a network disconnect - go directly to offlinedisconnected */
diff --git a/networkstatus/serviceiface.h b/networkstatus/serviceiface.h
index 60232d928..1e6b423ff 100644
--- a/networkstatus/serviceiface.h
+++ b/networkstatus/serviceiface.h
@@ -31,21 +31,21 @@ class ServiceIface : virtual public DCOPObject
K_DCOP
k_dcop:
/** Change the status for the given network */
- virtual void setNetworkStatus( const QString & networkName, int status ) = 0;
+ virtual void setNetworkStatus( const TQString & networkName, int status ) = 0;
/** Register or update the properties for a network
NB Check that people don't use this to change status */
- virtual void registerNetwork( const QString & networkName, NetworkStatus::Properties properties ) = 0;
+ virtual void registerNetwork( const TQString & networkName, NetworkStatus::Properties properties ) = 0;
/**
* Indicate that this service is no longer administering the named network
* TODO: Work out the implications to clients of unregistering a network
* - maybe this method needs more parameters to give them a clue.
*/
- virtual void unregisterNetwork( const QString & networkName ) = 0;
+ virtual void unregisterNetwork( const TQString & networkName ) = 0;
/**
* Tell the daemon that the service would like to shut down this network connection,
* and to notify clients using it so they can stop using it in a controlled manner
*/
- virtual void requestShutdown( const QString & networkName ) = 0;
+ virtual void requestShutdown( const TQString & networkName ) = 0;
};
#endif
diff --git a/networkstatus/serviceifaceimpl.cpp b/networkstatus/serviceifaceimpl.cpp
index fdbc9eec0..cf5c0df99 100644
--- a/networkstatus/serviceifaceimpl.cpp
+++ b/networkstatus/serviceifaceimpl.cpp
@@ -25,22 +25,22 @@ ServiceIfaceImpl::ServiceIfaceImpl( NetworkStatusModule * module ) : m_module (
{
}
-void ServiceIfaceImpl::setStatus( QString networkName, int status )
+void ServiceIfaceImpl::setStatus( TQString networkName, int status )
{
m_module->setStatus( networkName, (NetworkStatus::EnumStatus)status );
}
-void ServiceIfaceImpl::registerNetwork( QString networkName, NetworkStatus::Properties properties )
+void ServiceIfaceImpl::registerNetwork( TQString networkName, NetworkStatus::Properties properties )
{
m_module->registerNetwork( networkName, properties );
}
-void ServiceIfaceImpl::unregisterNetwork( QString networkName )
+void ServiceIfaceImpl::unregisterNetwork( TQString networkName )
{
m_module->unregisterNetwork( networkName );
}
-void ServiceIfaceImpl::requestShutdown( QString networkName )
+void ServiceIfaceImpl::requestShutdown( TQString networkName )
{
m_module->requestShutdown( networkName );
}
diff --git a/networkstatus/serviceifaceimpl.h b/networkstatus/serviceifaceimpl.h
index 703a15c64..6ffba3609 100644
--- a/networkstatus/serviceifaceimpl.h
+++ b/networkstatus/serviceifaceimpl.h
@@ -32,10 +32,10 @@ class ServiceIfaceImpl : virtual public ServiceIface
{
public:
ServiceIfaceImpl( NetworkStatusModule * module );
- void setStatus( QString networkName, int status );
- void registerNetwork( QString networkName, NetworkStatus::Properties properties );
- void unregisterNetwork( QString networkName );
- void requestShutdown( QString networkName );
+ void setStatus( TQString networkName, int status );
+ void registerNetwork( TQString networkName, NetworkStatus::Properties properties );
+ void unregisterNetwork( TQString networkName );
+ void requestShutdown( TQString networkName );
private:
NetworkStatusModule * m_module;
};
diff --git a/networkstatus/testservice.cpp b/networkstatus/testservice.cpp
index a1552d27d..46b19109f 100644
--- a/networkstatus/testservice.cpp
+++ b/networkstatus/testservice.cpp
@@ -19,7 +19,7 @@
Boston, MA 02110-1301, USA.
*/
-#include <qtimer.h>
+#include <tqtimer.h>
#include <dcopclient.h>
#include <kapplication.h>
#include "provideriface.h"
@@ -27,7 +27,7 @@
#include "testservice.h"
#include "serviceiface_stub.h"
-TestService::TestService() : QObject(), DCOPObject("ProviderIface")
+TestService::TestService() : TQObject(), DCOPObject("ProviderIface")
{
kapp->dcopClient()->registerAs("testservice" );
m_service = new ServiceIface_stub( "kded", "networkstatus" );
@@ -46,29 +46,29 @@ TestService::~TestService()
delete m_service;
}
-int TestService::status( const QString & network )
+int TestService::status( const TQString & network )
{
Q_UNUSED( network );
return (int)m_status;
}
-int TestService::establish( const QString & network )
+int TestService::establish( const TQString & network )
{
Q_UNUSED( network );
m_status = NetworkStatus::Establishing;
m_service->setNetworkStatus( "test_net", (int)m_status );
m_nextStatus = NetworkStatus::Online;
- QTimer::singleShot( 5000, this, SLOT( slotStatusChange() ) );
+ TQTimer::singleShot( 5000, this, TQT_SLOT( slotStatusChange() ) );
return (int)NetworkStatus::RequestAccepted;
}
-int TestService::shutdown( const QString & network )
+int TestService::shutdown( const TQString & network )
{
Q_UNUSED( network );
m_status = NetworkStatus::ShuttingDown;
m_service->setNetworkStatus( "test_net", (int)m_status );
m_nextStatus = NetworkStatus::Offline;
- QTimer::singleShot( 5000, this, SLOT( slotStatusChange() ) );
+ TQTimer::singleShot( 5000, this, TQT_SLOT( slotStatusChange() ) );
return (int)NetworkStatus::RequestAccepted;
}
diff --git a/networkstatus/testservice.h b/networkstatus/testservice.h
index 202c3e593..65febdca9 100644
--- a/networkstatus/testservice.h
+++ b/networkstatus/testservice.h
@@ -27,15 +27,15 @@
class ServiceIface_stub;
-class TestService : virtual public QObject, ProviderIface
+class TestService : virtual public TQObject, ProviderIface
{
Q_OBJECT
public:
TestService();
virtual ~TestService();
- int status( const QString & network );
- int establish( const QString & network );
- int shutdown( const QString & network );
+ int status( const TQString & network );
+ int establish( const TQString & network );
+ int shutdown( const TQString & network );
void simulateFailure();
void simulateDisconnect();
protected slots:
diff --git a/plugins/kmail/bodypartformatter/attendeeselector.cpp b/plugins/kmail/bodypartformatter/attendeeselector.cpp
index ac8059dc9..0ea917bed 100644
--- a/plugins/kmail/bodypartformatter/attendeeselector.cpp
+++ b/plugins/kmail/bodypartformatter/attendeeselector.cpp
@@ -25,32 +25,32 @@
#include <klocale.h>
#include <kpushbutton.h>
-#include <qlayout.h>
+#include <tqlayout.h>
-AttendeeSelector::AttendeeSelector(QWidget * parent)
+AttendeeSelector::AttendeeSelector(TQWidget * parent)
: KDialogBase( parent, 0, true, i18n("Select Attendees"), Ok|Cancel, NoDefault, true )
{
ui = new AttendeeSelectorWidget( this );
setMainWidget( ui );
- QGridLayout *layout = static_cast<QGridLayout*>( ui->layout() );
+ TQGridLayout *layout = static_cast<TQGridLayout*>( ui->layout() );
layout->setMargin( 0 );
ui->addButton->setGuiItem( KStdGuiItem::add() );
- connect( ui->addButton, SIGNAL(clicked()), SLOT(addClicked()) );
+ connect( ui->addButton, TQT_SIGNAL(clicked()), TQT_SLOT(addClicked()) );
ui->removeButton->setGuiItem( KStdGuiItem::remove() );
- connect( ui->removeButton, SIGNAL(clicked()), SLOT(removeClicked()) );
+ connect( ui->removeButton, TQT_SIGNAL(clicked()), TQT_SLOT(removeClicked()) );
ui->attendeeEdit->setClickMessage( i18n("Click to add a new attendee") );
- connect( ui->attendeeEdit, SIGNAL(textChanged(const QString&)), SLOT(textChanged(const QString&)) );
- connect( ui->attendeeEdit, SIGNAL(returnPressed(const QString&)), SLOT(addClicked()) );
+ connect( ui->attendeeEdit, TQT_SIGNAL(textChanged(const TQString&)), TQT_SLOT(textChanged(const TQString&)) );
+ connect( ui->attendeeEdit, TQT_SIGNAL(returnPressed(const TQString&)), TQT_SLOT(addClicked()) );
- connect( ui->attendeeList, SIGNAL(selectionChanged()), SLOT(selectionChanged()) );
+ connect( ui->attendeeList, TQT_SIGNAL(selectionChanged()), TQT_SLOT(selectionChanged()) );
}
-QStringList AttendeeSelector::attendees() const
+TQStringList AttendeeSelector::attendees() const
{
- QStringList rv;
+ TQStringList rv;
for ( uint i = 0; i < ui->attendeeList->count(); ++i )
rv << ui->attendeeList->item( i )->text();
return rv;
@@ -69,7 +69,7 @@ void AttendeeSelector::removeClicked()
ui->attendeeList->removeItem( ui->attendeeList->currentItem() );
}
-void AttendeeSelector::textChanged( const QString &text )
+void AttendeeSelector::textChanged( const TQString &text )
{
ui->addButton->setEnabled( !text.isEmpty() );
}
diff --git a/plugins/kmail/bodypartformatter/attendeeselector.h b/plugins/kmail/bodypartformatter/attendeeselector.h
index 83dbe689e..eb843f1fb 100644
--- a/plugins/kmail/bodypartformatter/attendeeselector.h
+++ b/plugins/kmail/bodypartformatter/attendeeselector.h
@@ -31,14 +31,14 @@ class AttendeeSelector : public KDialogBase
{
Q_OBJECT
public:
- AttendeeSelector( QWidget *parent = 0 );
+ AttendeeSelector( TQWidget *parent = 0 );
- QStringList attendees() const;
+ TQStringList attendees() const;
private slots:
void addClicked();
void removeClicked();
- void textChanged( const QString &text );
+ void textChanged( const TQString &text );
void selectionChanged();
private:
diff --git a/plugins/kmail/bodypartformatter/delegateselector.cpp b/plugins/kmail/bodypartformatter/delegateselector.cpp
index 79d46a65b..0f20da93a 100644
--- a/plugins/kmail/bodypartformatter/delegateselector.cpp
+++ b/plugins/kmail/bodypartformatter/delegateselector.cpp
@@ -23,25 +23,25 @@
#include <klocale.h>
-#include <qcheckbox.h>
-#include <qhbox.h>
-#include <qlabel.h>
-#include <qvbox.h>
+#include <tqcheckbox.h>
+#include <tqhbox.h>
+#include <tqlabel.h>
+#include <tqvbox.h>
-DelegateSelector::DelegateSelector(QWidget * parent)
+DelegateSelector::DelegateSelector(TQWidget * parent)
: KDialogBase( parent, 0, true, i18n("Select delegate"), Ok|Cancel, Ok, true )
{
- QVBox *page = makeVBoxMainWidget();
+ TQVBox *page = makeVBoxMainWidget();
- QHBox *delegateBox = new QHBox( page );
- new QLabel( i18n("Delegate:"), delegateBox );
+ TQHBox *delegateBox = new TQHBox( page );
+ new TQLabel( i18n("Delegate:"), delegateBox );
mDelegate = new KPIM::AddresseeLineEdit( delegateBox );
- mRsvp = new QCheckBox( i18n("Keep me informed about status changes of this incidence."), page );
+ mRsvp = new TQCheckBox( i18n("Keep me informed about status changes of this incidence."), page );
mRsvp->setChecked( true );
}
-QString DelegateSelector::delegate() const
+TQString DelegateSelector::delegate() const
{
return mDelegate->text();
}
diff --git a/plugins/kmail/bodypartformatter/delegateselector.h b/plugins/kmail/bodypartformatter/delegateselector.h
index 8a01323d7..e951497b3 100644
--- a/plugins/kmail/bodypartformatter/delegateselector.h
+++ b/plugins/kmail/bodypartformatter/delegateselector.h
@@ -36,14 +36,14 @@ class DelegateSelector : public KDialogBase
Q_OBJECT
public:
- DelegateSelector( QWidget *parent = 0 );
+ DelegateSelector( TQWidget *parent = 0 );
- QString delegate() const;
+ TQString delegate() const;
bool rsvp() const;
private:
KPIM::AddresseeLineEdit *mDelegate;
- QCheckBox *mRsvp;
+ TQCheckBox *mRsvp;
};
#endif
diff --git a/plugins/kmail/bodypartformatter/text_calendar.cpp b/plugins/kmail/bodypartformatter/text_calendar.cpp
index ba9b16eb0..29a00afe3 100644
--- a/plugins/kmail/bodypartformatter/text_calendar.cpp
+++ b/plugins/kmail/bodypartformatter/text_calendar.cpp
@@ -66,9 +66,9 @@
#include <kapplication.h>
#include <ktempfile.h>
-#include <qurl.h>
-#include <qdir.h>
-#include <qtextstream.h>
+#include <tqurl.h>
+#include <tqdir.h>
+#include <tqtextstream.h>
#include <kdepimmacros.h>
@@ -105,9 +105,9 @@ CalendarManager::CalendarManager()
CalendarResourceManager *mgr = mCalendar->resourceManager();
for ( CalendarResourceManager::ActiveIterator it = mgr->activeBegin(); it != mgr->activeEnd(); ++it ) {
if ( (*it)->type() == "imap" || (*it)->type() == "kolab" ) {
- const QStringList subResources = (*it)->subresources();
- QMap<QString, int> prefixSet; // KDE4: QSet
- for ( QStringList::ConstIterator subIt = subResources.begin(); subIt != subResources.end(); ++subIt ) {
+ const TQStringList subResources = (*it)->subresources();
+ TQMap<TQString, int> prefixSet; // KDE4: QSet
+ for ( TQStringList::ConstIterator subIt = subResources.begin(); subIt != subResources.end(); ++subIt ) {
if ( !(*subIt).contains( "/.INBOX.directory/" ) )
// we don't care about shared folders
continue;
@@ -143,7 +143,7 @@ class KMInvitationFormatterHelper : public KCal::InvitationFormatterHelper
{
public:
KMInvitationFormatterHelper( KMail::Interface::BodyPart *bodyPart ) : mBodyPart( bodyPart ) {}
- virtual QString generateLinkURL( const QString &id ) { return mBodyPart->makeLink( id ); }
+ virtual TQString generateLinkURL( const TQString &id ) { return mBodyPart->makeLink( id ); }
KCal::Calendar* calendar() const { return CalendarManager::calendar(); }
private:
KMail::Interface::BodyPart *mBodyPart;
@@ -160,17 +160,17 @@ class Formatter : public KMail::Interface::BodyPartFormatter
return Ok;
CalendarLocal cl( KPimPrefs::timezone() );
KMInvitationFormatterHelper helper( bodyPart );
- QString source;
+ TQString source;
/* If the bodypart does not have a charset specified, we need to fall back to
utf8, not the KMail fallback encoding, so get the contents as binary and decode
explicitely. */
if ( bodyPart->contentTypeParameter( "charset").isEmpty() ) {
- const QByteArray &ba = bodyPart->asBinary();
- source = QString::fromUtf8(ba);
+ const TQByteArray &ba = bodyPart->asBinary();
+ source = TQString::fromUtf8(ba);
} else {
source = bodyPart->asText();
}
- QString html = IncidenceFormatter::formatICalInvitation( source, &cl, &helper );
+ TQString html = IncidenceFormatter::formatICalInvitation( source, &cl, &helper );
if ( html.isEmpty() ) return AsIcon;
writer->queue( html );
@@ -179,9 +179,9 @@ class Formatter : public KMail::Interface::BodyPartFormatter
}
};
-static QString directoryForStatus( Attendee::PartStat status )
+static TQString directoryForStatus( Attendee::PartStat status )
{
- QString dir;
+ TQString dir;
switch ( status ) {
case Attendee::Accepted:
dir = "accepted";
@@ -209,7 +209,7 @@ class UrlHandler : public KMail::Interface::BodyPartURLHandler
kdDebug() << "UrlHandler() (iCalendar)" << endl;
}
- Incidence* icalToString( const QString& iCal ) const
+ Incidence* icalToString( const TQString& iCal ) const
{
CalendarLocal calendar( KPimPrefs::timezone() ) ;
ICalFormat format;
@@ -222,7 +222,7 @@ class UrlHandler : public KMail::Interface::BodyPartURLHandler
}
- Attendee *findMyself( Incidence* incidence, const QString& receiver ) const
+ Attendee *findMyself( Incidence* incidence, const TQString& receiver ) const
{
Attendee::List attendees = incidence->attendees();
Attendee::List::ConstIterator it;
@@ -279,11 +279,11 @@ class UrlHandler : public KMail::Interface::BodyPartURLHandler
}
Attendee* setStatusOnMyself( Incidence* incidence, Attendee* myself,
- Attendee::PartStat status, const QString &receiver ) const
+ Attendee::PartStat status, const TQString &receiver ) const
{
Attendee* newMyself = 0;
- QString name;
- QString email;
+ TQString name;
+ TQString email;
KPIM::getNameAndMail( receiver, name, email );
if ( name.isEmpty() && myself ) name = myself->name();
if ( email.isEmpty()&& myself ) email = myself->email();
@@ -293,7 +293,7 @@ class UrlHandler : public KMail::Interface::BodyPartURLHandler
true, // RSVP, otherwise we would not be here
status,
myself ? myself->role() : heuristicalRole( incidence ),
- myself ? myself->uid() : QString::null );
+ myself ? myself->uid() : TQString::null );
if ( myself ) {
newMyself->setDelegate( myself->delegate() );
newMyself->setDelegator( myself->delegator() );
@@ -316,15 +316,15 @@ class UrlHandler : public KMail::Interface::BodyPartURLHandler
bool mail( Incidence* incidence, KMail::Callback& callback,
Attendee::PartStat status,
Scheduler::Method method = Scheduler::Reply,
- const QString &to = QString::null, MailType type = Answer ) const
+ const TQString &to = TQString::null, MailType type = Answer ) const
{
ICalFormat format;
format.setTimeZone( KPimPrefs::timezone(), false );
- QString msg = format.createScheduleMessage( incidence, method );
- QString summary = incidence->summary();
+ TQString msg = format.createScheduleMessage( incidence, method );
+ TQString summary = incidence->summary();
if ( summary.isEmpty() )
summary = i18n( "Incidence with no summary" );
- QString subject;
+ TQString subject;
switch ( type ) {
case Answer:
subject = i18n( "Answer: %1" ).arg( summary );
@@ -342,29 +342,29 @@ class UrlHandler : public KMail::Interface::BodyPartURLHandler
break;
}
- QString recv = to;
+ TQString recv = to;
if ( recv.isEmpty() )
recv = incidence->organizer().fullName();
- QString statusString = directoryForStatus( status ); //it happens to return the right strings
+ TQString statusString = directoryForStatus( status ); //it happens to return the right strings
return callback.mailICal( recv, msg, subject, statusString, type != Forward );
}
void ensureKorganizerRunning() const
{
- QString error;
- QCString dcopService;
- int result = KDCOPServiceStarter::self()->findServiceFor( "DCOP/Organizer", QString::null, QString::null, &error, &dcopService );
+ TQString error;
+ TQCString dcopService;
+ int result = KDCOPServiceStarter::self()->findServiceFor( "DCOP/Organizer", TQString::null, TQString::null, &error, &dcopService );
if ( result == 0 ) {
// OK, so korganizer (or kontact) is running. Now ensure the object we want is available
// [that's not the case when kontact was already running, but korganizer not loaded into it...]
static const char* const dcopObjectId = "KOrganizerIface";
- QCString dummy;
- if ( !kapp->dcopClient()->findObject( dcopService, dcopObjectId, "", QByteArray(), dummy, dummy ) ) {
+ TQCString dummy;
+ if ( !kapp->dcopClient()->findObject( dcopService, dcopObjectId, "", TQByteArray(), dummy, dummy ) ) {
DCOPRef ref( dcopService, dcopService ); // talk to the KUniqueApplication or its kontact wrapper
DCOPReply reply = ref.call( "load()" );
if ( reply.isValid() && (bool)reply ) {
kdDebug() << "Loaded " << dcopService << " successfully" << endl;
- Q_ASSERT( kapp->dcopClient()->findObject( dcopService, dcopObjectId, "", QByteArray(), dummy, dummy ) );
+ Q_ASSERT( kapp->dcopClient()->findObject( dcopService, dcopObjectId, "", TQByteArray(), dummy, dummy ) );
} else
kdWarning() << "Error loading " << dcopService << endl;
}
@@ -376,17 +376,17 @@ class UrlHandler : public KMail::Interface::BodyPartURLHandler
kdWarning() << "Couldn't start DCOP/Organizer: " << dcopService << " " << error << endl;
}
- bool saveFile( const QString& receiver, const QString& iCal,
- const QString& type ) const
+ bool saveFile( const TQString& receiver, const TQString& iCal,
+ const TQString& type ) const
{
KTempFile file( locateLocal( "data", "korganizer/income." + type + '/',
true ) );
- QTextStream* ts = file.textStream();
+ TQTextStream* ts = file.textStream();
if ( !ts ) {
KMessageBox::error( 0, i18n("Could not save file to KOrganizer") );
return false;
}
- ts->setEncoding( QTextStream::UnicodeUTF8 );
+ ts->setEncoding( TQTextStream::UnicodeUTF8 );
(*ts) << receiver << '\n' << iCal;
file.close();
@@ -397,11 +397,11 @@ class UrlHandler : public KMail::Interface::BodyPartURLHandler
return true;
}
- bool handleInvitation( const QString& iCal, Attendee::PartStat status,
+ bool handleInvitation( const TQString& iCal, Attendee::PartStat status,
KMail::Callback &callback ) const
{
bool ok = true;
- const QString receiver = callback.receiver();
+ const TQString receiver = callback.receiver();
if ( receiver.isEmpty() )
// Must be some error. Still return true though, since we did handle it
@@ -412,8 +412,8 @@ class UrlHandler : public KMail::Interface::BodyPartURLHandler
if ( callback.askForComment( status ) ) {
bool ok = false;
- QString comment = KInputDialog::getMultiLineText( i18n("Reaction to Invitation"),
- i18n("Comment:"), QString(), &ok );
+ TQString comment = KInputDialog::getMultiLineText( i18n("Reaction to Invitation"),
+ i18n("Comment:"), TQString(), &ok );
if ( !ok )
return true;
if ( !comment.isEmpty() )
@@ -421,17 +421,17 @@ class UrlHandler : public KMail::Interface::BodyPartURLHandler
}
// First, save it for KOrganizer to handle
- QString dir = directoryForStatus( status );
+ TQString dir = directoryForStatus( status );
if ( dir.isEmpty() )
return true; // unknown status
if ( status != Attendee::Delegated ) // we do that below for delegated incidences
saveFile( receiver, iCal, dir );
- QString delegateString;
+ TQString delegateString;
bool delegatorRSVP = false;
if ( status == Attendee::Delegated ) {
DelegateSelector dlg;
- if ( dlg.exec() == QDialog::Rejected )
+ if ( dlg.exec() == TQDialog::Rejected )
return true;
delegateString = dlg.delegate();
delegatorRSVP = dlg.rsvp();
@@ -447,7 +447,7 @@ class UrlHandler : public KMail::Interface::BodyPartURLHandler
Attendee *myself = findMyself( incidence, receiver );
// find our delegator, we need to inform him as well
- QString delegator;
+ TQString delegator;
if ( myself && !myself->delegator().isEmpty() ) {
Attendee::List attendees = incidence->attendees();
for ( Attendee::List::ConstIterator it = attendees.constBegin(); it != attendees.constEnd(); ++it ) {
@@ -477,8 +477,8 @@ class UrlHandler : public KMail::Interface::BodyPartURLHandler
} else if ( !myself && (status != Attendee::Declined) ) {
// forwarded invitation
Attendee* newMyself = 0;
- QString name;
- QString email;
+ TQString name;
+ TQString email;
KPIM::getNameAndMail( receiver, name, email );
if ( !email.isEmpty() ) {
newMyself = new Attendee( name,
@@ -486,7 +486,7 @@ class UrlHandler : public KMail::Interface::BodyPartURLHandler
true, // RSVP, otherwise we would not be here
status,
heuristicalRole( incidence ),
- QString::null );
+ TQString::null );
incidence->clearAttendees();
incidence->addAttendee( newMyself );
ok = mail( incidence, callback, status, Scheduler::Reply );
@@ -505,7 +505,7 @@ class UrlHandler : public KMail::Interface::BodyPartURLHandler
myself = findMyself( incidence, receiver );
myself->setStatus( status );
myself->setDelegate( delegateString );
- QString name, email;
+ TQString name, email;
KPIM::getNameAndMail( delegateString, name, email );
Attendee *delegate = new Attendee( name, email, true );
delegate->setDelegator( receiver );
@@ -513,7 +513,7 @@ class UrlHandler : public KMail::Interface::BodyPartURLHandler
ICalFormat format;
format.setTimeZone( KPimPrefs::timezone(), false );
- QString iCal = format.createScheduleMessage( incidence, Scheduler::Request );
+ TQString iCal = format.createScheduleMessage( incidence, Scheduler::Request );
saveFile( receiver, iCal, dir );
ok = mail( incidence, callback, status, Scheduler::Request, delegateString, Delegation );
@@ -521,15 +521,15 @@ class UrlHandler : public KMail::Interface::BodyPartURLHandler
return ok;
}
- void showCalendar( const QDate &date ) const
+ void showCalendar( const TQDate &date ) const
{
ensureKorganizerRunning();
// raise korganizer part in kontact or the korganizer app
- kapp->dcopClient()->send( "korganizer", "korganizer", "newInstance()", QByteArray() );
- QByteArray arg;
- QDataStream s( arg, IO_WriteOnly );
- s << QString( "kontact_korganizerplugin" );
- kapp->dcopClient()->send( "kontact", "KontactIface", "selectPlugin(QString)", arg );
+ kapp->dcopClient()->send( "korganizer", "korganizer", "newInstance()", TQByteArray() );
+ TQByteArray arg;
+ TQDataStream s( arg, IO_WriteOnly );
+ s << TQString( "kontact_korganizerplugin" );
+ kapp->dcopClient()->send( "kontact", "KontactIface", "selectPlugin(TQString)", arg );
KCalendarIface_stub *iface = new KCalendarIface_stub( kapp->dcopClient(), "korganizer", "CalendarIface" );
iface->showEventView();
@@ -537,24 +537,24 @@ class UrlHandler : public KMail::Interface::BodyPartURLHandler
delete iface;
}
- bool handleIgnore( const QString&, KMail::Callback& c ) const
+ bool handleIgnore( const TQString&, KMail::Callback& c ) const
{
// simply move the message to trash
( new KMDeleteMsgCommand( c.getMsg()->getMsgSerNum() ) )->start();
return true;
}
- bool handleDeclineCounter( const QString &iCal, KMail::Callback &callback ) const
+ bool handleDeclineCounter( const TQString &iCal, KMail::Callback &callback ) const
{
- const QString receiver = callback.receiver();
+ const TQString receiver = callback.receiver();
if ( receiver.isEmpty() )
return true;
Incidence* incidence = icalToString( iCal );
if ( callback.askForComment( Attendee::Declined ) ) {
bool ok = false;
// ### string freeze
- QString comment = KInputDialog::getMultiLineText( i18n("Reaction to Invitation") /* i18n("Decline Counter Proposal") */,
- i18n("Comment:"), QString(), &ok );
+ TQString comment = KInputDialog::getMultiLineText( i18n("Reaction to Invitation") /* i18n("Decline Counter Proposal") */,
+ i18n("Comment:"), TQString(), &ok );
if ( !ok )
return true;
if ( !comment.isEmpty() )
@@ -564,9 +564,9 @@ class UrlHandler : public KMail::Interface::BodyPartURLHandler
callback.sender(), DeclineCounter );
}
- bool counterProposal( const QString &iCal, KMail::Callback &callback ) const
+ bool counterProposal( const TQString &iCal, KMail::Callback &callback ) const
{
- const QString receiver = callback.receiver();
+ const TQString receiver = callback.receiver();
if ( receiver.isEmpty() )
return true;
saveFile( receiver, iCal, "counter" );
@@ -576,15 +576,15 @@ class UrlHandler : public KMail::Interface::BodyPartURLHandler
}
bool handleClick( KMail::Interface::BodyPart *part,
- const QString &path, KMail::Callback& c ) const
+ const TQString &path, KMail::Callback& c ) const
{
- QString iCal;
+ TQString iCal;
/* If the bodypart does not have a charset specified, we need to fall back to
utf8, not the KMail fallback encoding, so get the contents as binary and decode
explicitely. */
if ( part->contentTypeParameter( "charset").isEmpty() ) {
- const QByteArray &ba = part->asBinary();
- iCal = QString::fromUtf8(ba);
+ const TQByteArray &ba = part->asBinary();
+ iCal = TQString::fromUtf8(ba);
} else {
iCal = part->asText();
}
@@ -607,9 +607,9 @@ class UrlHandler : public KMail::Interface::BodyPartURLHandler
if ( path == "forward" ) {
Incidence* incidence = icalToString( iCal );
AttendeeSelector dlg;
- if ( dlg.exec() == QDialog::Rejected )
+ if ( dlg.exec() == TQDialog::Rejected )
return true;
- QString fwdTo = dlg.attendees().join( ", " );
+ TQString fwdTo = dlg.attendees().join( ", " );
if ( fwdTo.isEmpty() )
return true;
result = mail( incidence, c, Attendee::Delegated /*### right ?*/,
@@ -621,7 +621,7 @@ class UrlHandler : public KMail::Interface::BodyPartURLHandler
}
if ( path == "reply" || path == "cancel" || path == "accept_counter" ) {
// These should just be saved with their type as the dir
- const QString p = (path == "accept_counter" ? QString("reply") : path);
+ const TQString p = (path == "accept_counter" ? TQString("reply") : path);
if ( saveFile( "Receiver Not Searched", iCal, p ) ) {
if ( c.deleteInvitationAfterReply() )
( new KMDeleteMsgCommand( c.getMsg()->getMsgSerNum() ) )->start();
@@ -634,14 +634,14 @@ class UrlHandler : public KMail::Interface::BodyPartURLHandler
}
bool handleContextMenuRequest( KMail::Interface::BodyPart *,
- const QString &,
- const QPoint & ) const
+ const TQString &,
+ const TQPoint & ) const
{
return false;
}
- QString statusBarMessage( KMail::Interface::BodyPart *,
- const QString &path ) const
+ TQString statusBarMessage( KMail::Interface::BodyPart *,
+ const TQString &path ) const
{
if ( !path.isEmpty() ) {
if ( path == "accept" )
@@ -672,7 +672,7 @@ class UrlHandler : public KMail::Interface::BodyPartURLHandler
return i18n( "Remove incidence from my calendar" );
}
- return QString::null;
+ return TQString::null;
}
};
diff --git a/plugins/kmail/bodypartformatter/text_vcard.cpp b/plugins/kmail/bodypartformatter/text_vcard.cpp
index 577560e5c..347371d16 100644
--- a/plugins/kmail/bodypartformatter/text_vcard.cpp
+++ b/plugins/kmail/bodypartformatter/text_vcard.cpp
@@ -30,7 +30,7 @@
your version.
*/
-#include <qurl.h>
+#include <tqurl.h>
#include <kapplication.h>
#include <kglobal.h>
@@ -72,7 +72,7 @@ namespace {
if ( !writer ) return AsIcon;
VCardConverter vcc;
- const QString vCard = bodyPart->asText();
+ const TQString vCard = bodyPart->asText();
if ( vCard.isEmpty() ) return AsIcon;
Addressee::List al = vcc.parseVCards( vCard );
if ( al.empty() ) return AsIcon;
@@ -83,17 +83,17 @@ namespace {
"</h2></div>"
);
- QValueListIterator<KABC::Addressee> it = al.begin();
+ TQValueListIterator<KABC::Addressee> it = al.begin();
int count = 0;
for ( ; it != al.end(); ++it ) {
KABC::Addressee a = (*it);
if ( a.isEmpty() ) return AsIcon;
- QString contact = AddresseeView::vCardAsHTML( a, 0L, AddresseeView::NoLinks, false, AddresseeView::DefaultFields );
+ TQString contact = AddresseeView::vCardAsHTML( a, 0L, AddresseeView::NoLinks, false, AddresseeView::DefaultFields );
writer->queue( contact );
- QString addToLinkText = i18n( "[Add this contact to the addressbook]" );
- QString op = QString::fromLatin1( "addToAddressBook:%1" ).arg( count );
+ TQString addToLinkText = i18n( "[Add this contact to the addressbook]" );
+ TQString op = TQString::fromLatin1( "addToAddressBook:%1" ).arg( count );
writer->queue(
"<div align=\"center\"><a href=\"" +
bodyPart->makeLink( op ) +
@@ -111,10 +111,10 @@ namespace {
class UrlHandler : public KMail::Interface::BodyPartURLHandler {
public:
- bool handleClick( BodyPart * bodyPart, const QString & path,
+ bool handleClick( BodyPart * bodyPart, const TQString & path,
KMail::Callback& ) const {
- const QString vCard = bodyPart->asText();
+ const TQString vCard = bodyPart->asText();
if ( vCard.isEmpty() ) return true;
VCardConverter vcc;
Addressee::List al = vcc.parseVCards( vCard );
@@ -126,11 +126,11 @@ namespace {
return true;
}
- bool handleContextMenuRequest( BodyPart *, const QString &, const QPoint & ) const {
+ bool handleContextMenuRequest( BodyPart *, const TQString &, const TQPoint & ) const {
return false;
}
- QString statusBarMessage( BodyPart *, const QString & ) const {
+ TQString statusBarMessage( BodyPart *, const TQString & ) const {
return i18n("Add this contact to the address book.");
}
};
diff --git a/plugins/kmail/bodypartformatter/text_xdiff.cpp b/plugins/kmail/bodypartformatter/text_xdiff.cpp
index ada37be80..87988840f 100644
--- a/plugins/kmail/bodypartformatter/text_xdiff.cpp
+++ b/plugins/kmail/bodypartformatter/text_xdiff.cpp
@@ -47,10 +47,10 @@
#include <kstandarddirs.h>
#include <kapplication.h>
-#include <qurl.h>
-#include <qfile.h>
-#include <qdir.h>
-#include <qstylesheet.h>
+#include <tqurl.h>
+#include <tqfile.h>
+#include <tqdir.h>
+#include <tqstylesheet.h>
namespace {
@@ -66,40 +66,40 @@ namespace {
if ( bodyPart->defaultDisplay() == KMail::Interface::BodyPart::AsIcon )
return AsIcon;
- const QString diff = bodyPart->asText();
+ const TQString diff = bodyPart->asText();
if ( diff.isEmpty() ) return AsIcon;
- QString addedLineStyle = QString::fromLatin1(
+ TQString addedLineStyle = TQString::fromLatin1(
"style=\""
"color: green;\"");
- QString fileAddStyle( "style=\"font-weight: bold; "
+ TQString fileAddStyle( "style=\"font-weight: bold; "
"color: green; \"" );
- QString removedLineStyle = QString::fromLatin1(
+ TQString removedLineStyle = TQString::fromLatin1(
"style=\""
"color: red;\"");
- QString fileRemoveStyle( "style=\"font-weight: bold; "
+ TQString fileRemoveStyle( "style=\"font-weight: bold; "
"color: red ;\"" );
- QString tableStyle = QString::fromLatin1(
+ TQString tableStyle = TQString::fromLatin1(
"style=\""
"text-align: -khtml-auto; "
"border: solid black 1px; "
"padding: 0.5em; "
"margin: 0em;\"");
- QString sepStyle( "style=\"color: black; font-weight: bold;\"" );
- QString chunkStyle( "style=\"color: blue;\"" );
+ TQString sepStyle( "style=\"color: black; font-weight: bold;\"" );
+ TQString chunkStyle( "style=\"color: blue;\"" );
- QString html = "<br><div align=\"center\">";
+ TQString html = "<br><div align=\"center\">";
html += "<pre " + tableStyle + ">";
- QStringList lines = QStringList::split( '\n', diff, true );
- for ( QStringList::Iterator it = lines.begin(); it != lines.end(); ++it ) {
- QString line( QStyleSheet::escape( *it ) );
- QString style;
+ TQStringList lines = TQStringList::split( '\n', diff, true );
+ for ( TQStringList::Iterator it = lines.begin(); it != lines.end(); ++it ) {
+ TQString line( TQStyleSheet::escape( *it ) );
+ TQString style;
if ( line.length() > 0 ) {
if ( line.startsWith( "+++" ) ) {
style = fileAddStyle;
diff --git a/wizards/egroupwarewizard.cpp b/wizards/egroupwarewizard.cpp
index 75898ead3..dcf74944f 100644
--- a/wizards/egroupwarewizard.cpp
+++ b/wizards/egroupwarewizard.cpp
@@ -34,13 +34,13 @@
#include <klocale.h>
#include <kmessagebox.h>
-#include <qcheckbox.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qwhatsthis.h>
+#include <tqcheckbox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqwhatsthis.h>
-static QString createURL( const QString &server, bool useSSL, const QString &location )
+static TQString createURL( const TQString &server, bool useSSL, const TQString &location )
{
KURL url;
@@ -70,7 +70,7 @@ class CreateEGroupwareKabcResource : public KConfigPropagator::Change
KRES::Manager<KABC::Resource> manager( "contact" );
manager.readConfig();
- QString url = createURL( EGroupwareConfig::self()->server(), EGroupwareConfig::self()->useSSLConnection(), EGroupwareConfig::self()->xmlrpc_location() );
+ TQString url = createURL( EGroupwareConfig::self()->server(), EGroupwareConfig::self()->useSSLConnection(), EGroupwareConfig::self()->xmlrpc_location() );
KABC::ResourceXMLRPC *resource = new KABC::ResourceXMLRPC( url, EGroupwareConfig::self()->domain(),
EGroupwareConfig::self()->user(),
@@ -85,7 +85,7 @@ class CreateEGroupwareKabcResource : public KConfigPropagator::Change
class ChangeEGroupwareKabcResource : public KConfigPropagator::Change
{
public:
- ChangeEGroupwareKabcResource( const QString &identifier )
+ ChangeEGroupwareKabcResource( const TQString &identifier )
: KConfigPropagator::Change( i18n("Create eGroupware Addressbook Resource") ),
mIdentifier( identifier )
{
@@ -117,7 +117,7 @@ class ChangeEGroupwareKabcResource : public KConfigPropagator::Change
}
private:
- QString mIdentifier;
+ TQString mIdentifier;
};
class CreateEGroupwareKcalResource : public KConfigPropagator::Change
@@ -149,7 +149,7 @@ class CreateEGroupwareKcalResource : public KConfigPropagator::Change
class ChangeEGroupwareKcalResource : public KConfigPropagator::Change
{
public:
- ChangeEGroupwareKcalResource( const QString &identifier )
+ ChangeEGroupwareKcalResource( const TQString &identifier )
: KConfigPropagator::Change( i18n( "Create eGroupware Calendar Resource" ) ),
mIdentifier( identifier )
{
@@ -181,7 +181,7 @@ class ChangeEGroupwareKcalResource : public KConfigPropagator::Change
}
private:
- QString mIdentifier;
+ TQString mIdentifier;
};
class CreateEGroupwareKnotesResource : public KConfigPropagator::Change
@@ -199,7 +199,7 @@ class CreateEGroupwareKnotesResource : public KConfigPropagator::Change
KRES::Manager<ResourceNotes> manager( "notes" );
manager.readConfig();
- QString url = createURL( EGroupwareConfig::self()->server(), EGroupwareConfig::self()->useSSLConnection(), EGroupwareConfig::self()->xmlrpc_location() );
+ TQString url = createURL( EGroupwareConfig::self()->server(), EGroupwareConfig::self()->useSSLConnection(), EGroupwareConfig::self()->xmlrpc_location() );
KNotes::ResourceXMLRPC *resource = new KNotes::ResourceXMLRPC();
resource->setResourceName( i18n( "eGroupware" ) );
@@ -215,7 +215,7 @@ class CreateEGroupwareKnotesResource : public KConfigPropagator::Change
class ChangeEGroupwareKnotesResource : public KConfigPropagator::Change
{
public:
- ChangeEGroupwareKnotesResource( const QString &identifier )
+ ChangeEGroupwareKnotesResource( const TQString &identifier )
: KConfigPropagator::Change( i18n("Create eGroupware Notes Resource") ),
mIdentifier( identifier )
{
@@ -247,7 +247,7 @@ class ChangeEGroupwareKnotesResource : public KConfigPropagator::Change
}
private:
- QString mIdentifier;
+ TQString mIdentifier;
};
class EGroupwarePropagator : public KConfigPropagator
@@ -301,45 +301,45 @@ class EGroupwarePropagator : public KConfigPropagator
EGroupwareWizard::EGroupwareWizard() : KConfigWizard( new EGroupwarePropagator )
{
- QFrame *page = createWizardPage( i18n( "eGroupware Server" ) );
+ TQFrame *page = createWizardPage( i18n( "eGroupware Server" ) );
- QGridLayout *topLayout = new QGridLayout( page );
+ TQGridLayout *topLayout = new TQGridLayout( page );
topLayout->setSpacing( spacingHint() );
- QLabel *label = new QLabel( i18n( "&Server name:" ), page );
+ TQLabel *label = new TQLabel( i18n( "&Server name:" ), page );
topLayout->addWidget( label, 0, 0 );
mServerEdit = new KLineEdit( page );
label->setBuddy( mServerEdit );
topLayout->addWidget( mServerEdit, 0, 1 );
- label = new QLabel( i18n( "&Domain name:" ), page );
+ label = new TQLabel( i18n( "&Domain name:" ), page );
topLayout->addWidget( label, 1, 0 );
mDomainEdit = new KLineEdit( page );
label->setBuddy( mDomainEdit );
topLayout->addWidget( mDomainEdit, 1, 1 );
- label = new QLabel( i18n( "&Username:" ), page );
+ label = new TQLabel( i18n( "&Username:" ), page );
topLayout->addWidget( label, 2, 0 );
mUserEdit = new KLineEdit( page );
label->setBuddy( mUserEdit );
topLayout->addWidget( mUserEdit, 2, 1 );
- label = new QLabel( i18n( "&Password:" ), page );
+ label = new TQLabel( i18n( "&Password:" ), page );
topLayout->addWidget( label, 3, 0 );
mPasswordEdit = new KLineEdit( page );
mPasswordEdit->setEchoMode( KLineEdit::Password );
label->setBuddy( mPasswordEdit );
topLayout->addWidget( mPasswordEdit, 3, 1 );
- label = new QLabel( i18n( "&Location xmlrpc.php on server:" ), page );
+ label = new TQLabel( i18n( "&Location xmlrpc.php on server:" ), page );
topLayout->addWidget( label, 4, 0 );
mXMLRPC = new KLineEdit( page );
mXMLRPC->setMinimumWidth( 175 );
label->setBuddy( mXMLRPC );
topLayout->addWidget( mXMLRPC, 4, 1 );
- QWhatsThis::add( label, i18n( "Some servers may not have the xmlrpc.php file in the 'egroupware' folder of the server. With this option it is possible to eventually change the path to that file. For most servers, the default value is OK." ) );
+ TQWhatsThis::add( label, i18n( "Some servers may not have the xmlrpc.php file in the 'egroupware' folder of the server. With this option it is possible to eventually change the path to that file. For most servers, the default value is OK." ) );
- mUseSSLConnectionCheck = new QCheckBox( i18n( "Use SS&L connection" ), page );
+ mUseSSLConnectionCheck = new TQCheckBox( i18n( "Use SS&L connection" ), page );
topLayout->addMultiCellWidget( mUseSSLConnectionCheck, 5, 5, 0, 1 );
topLayout->setRowStretch( 6, 1 );
@@ -354,7 +354,7 @@ EGroupwareWizard::~EGroupwareWizard()
{
}
-QString EGroupwareWizard::validate()
+TQString EGroupwareWizard::validate()
{
if( !mXMLRPC->text().endsWith( "xmlrpc.php" ) )
return i18n( "Invalid path to xmlrpc.php entered." );
@@ -366,7 +366,7 @@ QString EGroupwareWizard::validate()
mXMLRPC->text().isEmpty() )
return i18n( "Please fill in all fields." );
- return QString::null;
+ return TQString::null;
}
void EGroupwareWizard::usrReadConfig()
diff --git a/wizards/egroupwarewizard.h b/wizards/egroupwarewizard.h
index f2eee1196..c6df0073d 100644
--- a/wizards/egroupwarewizard.h
+++ b/wizards/egroupwarewizard.h
@@ -33,7 +33,7 @@ class KDE_EXPORT EGroupwareWizard : public KConfigWizard
EGroupwareWizard();
~EGroupwareWizard();
- QString validate();
+ TQString validate();
void usrReadConfig();
void usrWriteConfig();
@@ -44,7 +44,7 @@ class KDE_EXPORT EGroupwareWizard : public KConfigWizard
KLineEdit *mUserEdit;
KLineEdit *mPasswordEdit;
KLineEdit *mXMLRPC;
- QCheckBox *mUseSSLConnectionCheck;
+ TQCheckBox *mUseSSLConnectionCheck;
};
#endif
diff --git a/wizards/exchangewizard.cpp b/wizards/exchangewizard.cpp
index e95480c14..d4aae80af 100644
--- a/wizards/exchangewizard.cpp
+++ b/wizards/exchangewizard.cpp
@@ -30,10 +30,10 @@
#include <klineedit.h>
#include <klocale.h>
-#include <qlayout.h>
-#include <qcheckbox.h>
-#include <qlabel.h>
-#include <qspinbox.h>
+#include <tqlayout.h>
+#include <tqcheckbox.h>
+#include <tqlabel.h>
+#include <tqspinbox.h>
#if 0
@@ -122,8 +122,8 @@ class CreateExchangeKabcResource : public KConfigPropagator::Change
m.readConfig();
KURL url( exchangeUrl() );
- QString user( ExchangeConfig::self()->user() );
- QString password( ExchangeConfig::self()->password() );
+ TQString user( ExchangeConfig::self()->user() );
+ TQString password( ExchangeConfig::self()->password() );
KABC::ResourceExchange *r = new KABC::ResourceExchange( url, user, password );
r->setResourceName( i18n("Exchange Server") );
@@ -225,35 +225,35 @@ class ExchangePropagator : public KConfigPropagator
ExchangeWizard::ExchangeWizard() : KConfigWizard( new ExchangePropagator )
{
- QFrame *page = createWizardPage( i18n("Microsoft Exchange Server") );
- QGridLayout *topLayout = new QGridLayout( page );
+ TQFrame *page = createWizardPage( i18n("Microsoft Exchange Server") );
+ TQGridLayout *topLayout = new TQGridLayout( page );
topLayout->setSpacing( spacingHint() );
- QLabel *label = new QLabel( i18n("Server name:"), page );
+ TQLabel *label = new TQLabel( i18n("Server name:"), page );
topLayout->addWidget( label, 0, 0 );
mServerEdit = new KLineEdit( page );
topLayout->addWidget( mServerEdit, 0, 1 );
- label = new QLabel( i18n("Port:"), page );
+ label = new TQLabel( i18n("Port:"), page );
topLayout->addWidget( label, 1, 0 );
- mPortEdit = new QSpinBox( 1, 65536, 1, page );
+ mPortEdit = new TQSpinBox( 1, 65536, 1, page );
topLayout->addWidget( mPortEdit, 1, 1 );
- label = new QLabel( i18n("User name:"), page );
+ label = new TQLabel( i18n("User name:"), page );
topLayout->addWidget( label, 2, 0 );
mUserEdit = new KLineEdit( page );
topLayout->addWidget( mUserEdit, 2, 1 );
- label = new QLabel( i18n("Password:"), page );
+ label = new TQLabel( i18n("Password:"), page );
topLayout->addWidget( label, 3, 0 );
mPasswordEdit = new KLineEdit( page );
mPasswordEdit->setEchoMode( KLineEdit::Password );
topLayout->addWidget( mPasswordEdit, 3, 1 );
- mSavePasswordCheck = new QCheckBox( i18n("Save password"), page );
+ mSavePasswordCheck = new TQCheckBox( i18n("Save password"), page );
topLayout->addMultiCellWidget( mSavePasswordCheck, 4, 4, 0, 1 );
- mSecureCheck = new QCheckBox( i18n("Encrypt communication with server"),
+ mSecureCheck = new TQCheckBox( i18n("Encrypt communication with server"),
page );
topLayout->addMultiCellWidget( mSecureCheck, 5, 5, 0, 1 );
diff --git a/wizards/exchangewizard.h b/wizards/exchangewizard.h
index 86dca9fcb..7336b9e97 100644
--- a/wizards/exchangewizard.h
+++ b/wizards/exchangewizard.h
@@ -38,11 +38,11 @@ class KDE_EXPORT ExchangeWizard : public KConfigWizard
private:
KLineEdit *mServerEdit;
- QSpinBox *mPortEdit;
+ TQSpinBox *mPortEdit;
KLineEdit *mUserEdit;
KLineEdit *mPasswordEdit;
- QCheckBox *mSavePasswordCheck;
- QCheckBox *mSecureCheck;
+ TQCheckBox *mSavePasswordCheck;
+ TQCheckBox *mSecureCheck;
};
#endif
diff --git a/wizards/groupwarewizard.cpp b/wizards/groupwarewizard.cpp
index 80e323272..d023a8d71 100644
--- a/wizards/groupwarewizard.cpp
+++ b/wizards/groupwarewizard.cpp
@@ -19,8 +19,8 @@
Boston, MA 02110-1301, USA.
*/
-#include <qapplication.h>
-#include <qlayout.h>
+#include <tqapplication.h>
+#include <tqlayout.h>
#include <klocale.h>
@@ -28,19 +28,19 @@
#include "groupwarewizard.h"
-GroupwareWizard::GroupwareWizard( QWidget *parent, const char *name )
- : QWidget( parent, name )
+GroupwareWizard::GroupwareWizard( TQWidget *parent, const char *name )
+ : TQWidget( parent, name )
{
setCaption( i18n( "KDE Groupware Wizard" ) );
- QVBoxLayout *layout = new QVBoxLayout( this );
+ TQVBoxLayout *layout = new TQVBoxLayout( this );
mOverViewPage = new OverViewPage( this );
layout->addWidget( mOverViewPage );
- connect( mOverViewPage, SIGNAL( cancel() ),
- qApp, SLOT( quit() ) );
+ connect( mOverViewPage, TQT_SIGNAL( cancel() ),
+ qApp, TQT_SLOT( quit() ) );
resize( 400, 200 );
}
diff --git a/wizards/groupwarewizard.h b/wizards/groupwarewizard.h
index bb9445376..9a6c25885 100644
--- a/wizards/groupwarewizard.h
+++ b/wizards/groupwarewizard.h
@@ -22,7 +22,7 @@
#ifndef GROUPWAREWIZARD_H
#define GROUPWAREWIZARD_H
-#include <qwidget.h>
+#include <tqwidget.h>
class OverViewPage;
@@ -31,7 +31,7 @@ class GroupwareWizard : public QWidget
Q_OBJECT
public:
- GroupwareWizard( QWidget *parent, const char *name = 0 );
+ GroupwareWizard( TQWidget *parent, const char *name = 0 );
~GroupwareWizard();
private:
diff --git a/wizards/groupwisewizard.cpp b/wizards/groupwisewizard.cpp
index 6ddee3726..0bddf3da8 100644
--- a/wizards/groupwisewizard.cpp
+++ b/wizards/groupwisewizard.cpp
@@ -34,19 +34,19 @@
#include <klineedit.h>
#include <klocale.h>
-#include <qcheckbox.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qspinbox.h>
-#include <qgroupbox.h>
+#include <tqcheckbox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqspinbox.h>
+#include <tqgroupbox.h>
-QString serverUrl()
+TQString serverUrl()
{
- QString url;
+ TQString url;
if ( GroupwiseConfig::self()->useHttps() ) url = "https";
else url = "http";
url += "://" + GroupwiseConfig::self()->host() + ":" +
- QString::number( GroupwiseConfig::self()->port() ) + GroupwiseConfig::self()->path();
+ TQString::number( GroupwiseConfig::self()->port() ) + GroupwiseConfig::self()->path();
return url;
}
@@ -122,14 +122,14 @@ class CreateGroupwiseKabcResource : public KConfigPropagator::Change
KRES::Manager<KABC::Resource> m( "contact" );
m.readConfig();
- QString url = serverUrl();
- QString user( GroupwiseConfig::self()->user() );
- QString password( GroupwiseConfig::self()->password() );
+ TQString url = serverUrl();
+ TQString user( GroupwiseConfig::self()->user() );
+ TQString password( GroupwiseConfig::self()->password() );
KABC::ResourceGroupwise *r = new KABC::ResourceGroupwise( url, user,
password,
- QStringList(),
- QString::null );
+ TQStringList(),
+ TQString::null );
r->setResourceName( i18n("GroupWise") );
m.add( r );
m.writeConfig();
@@ -248,7 +248,7 @@ class GroupwisePropagator : public KConfigPropagator
ca->setUser( GroupwiseConfig::user() );
ca->setPassword( GroupwiseConfig::password() );
ca->setRealName( GroupwiseConfig::fullName() );
- QString email = GroupwiseConfig::email();
+ TQString email = GroupwiseConfig::email();
if ( !email.isEmpty() ) ca->setEmail( email );
ca->enableSavePassword( true );
ca->enableSieve( false );
@@ -268,41 +268,41 @@ class GroupwisePropagator : public KConfigPropagator
GroupwiseWizard::GroupwiseWizard() : KConfigWizard( new GroupwisePropagator )
{
- QFrame *page = createWizardPage( i18n("Novell GroupWise") );
+ TQFrame *page = createWizardPage( i18n("Novell GroupWise") );
- QGridLayout *topLayout = new QGridLayout( page );
+ TQGridLayout *topLayout = new TQGridLayout( page );
topLayout->setSpacing( spacingHint() );
- QLabel *label = new QLabel( i18n("Server name:"), page );
+ TQLabel *label = new TQLabel( i18n("Server name:"), page );
topLayout->addWidget( label, 0, 0 );
mServerEdit = new KLineEdit( page );
topLayout->addWidget( mServerEdit, 0, 1 );
- label = new QLabel( i18n("Path to SOAP interface:"), page );
+ label = new TQLabel( i18n("Path to SOAP interface:"), page );
topLayout->addWidget( label, 1, 0 );
mPathEdit = new KLineEdit( page );
topLayout->addWidget( mPathEdit, 1, 1 );
- label = new QLabel( i18n("Port:"), page );
+ label = new TQLabel( i18n("Port:"), page );
topLayout->addWidget( label, 2, 0 );
- mPortEdit = new QSpinBox( 1, 65536, 1, page );
+ mPortEdit = new TQSpinBox( 1, 65536, 1, page );
topLayout->addWidget( mPortEdit, 2, 1 );
- label = new QLabel( i18n("User name:"), page );
+ label = new TQLabel( i18n("User name:"), page );
topLayout->addWidget( label, 3, 0 );
mUserEdit = new KLineEdit( page );
topLayout->addWidget( mUserEdit, 3, 1 );
- label = new QLabel( i18n("Password:"), page );
+ label = new TQLabel( i18n("Password:"), page );
topLayout->addWidget( label, 4, 0 );
mPasswordEdit = new KLineEdit( page );
mPasswordEdit->setEchoMode( KLineEdit::Password );
topLayout->addWidget( mPasswordEdit, 4, 1 );
- mSavePasswordCheck = new QCheckBox( i18n("Save password"), page );
+ mSavePasswordCheck = new TQCheckBox( i18n("Save password"), page );
topLayout->addMultiCellWidget( mSavePasswordCheck, 5, 5, 0, 1 );
- mSecureCheck = new QCheckBox( i18n("Encrypt communication with server"),
+ mSecureCheck = new TQCheckBox( i18n("Encrypt communication with server"),
page );
topLayout->addMultiCellWidget( mSecureCheck, 5, 5, 0, 1 );
@@ -311,28 +311,28 @@ GroupwiseWizard::GroupwiseWizard() : KConfigWizard( new GroupwisePropagator )
mEmailPage = createWizardPage( i18n("Mail") );
- topLayout = new QGridLayout( mEmailPage );
+ topLayout = new TQGridLayout( mEmailPage );
topLayout->setSpacing( spacingHint() );
- mEmailBox = new QGroupBox( 1, Horizontal,
+ mEmailBox = new TQGroupBox( 1, Horizontal,
i18n("Create Mail Account"), mEmailPage );
mEmailBox->setCheckable( true );
topLayout->addWidget( mEmailBox, 0, 0 );
- mEmailWidget = new QWidget( mEmailBox );
- connect( mEmailBox, SIGNAL( toggled( bool ) ), mEmailWidget,
- SLOT( setEnabled( bool ) ) );
+ mEmailWidget = new TQWidget( mEmailBox );
+ connect( mEmailBox, TQT_SIGNAL( toggled( bool ) ), mEmailWidget,
+ TQT_SLOT( setEnabled( bool ) ) );
- QGridLayout *accountLayout= new QGridLayout( mEmailWidget );
+ TQGridLayout *accountLayout= new TQGridLayout( mEmailWidget );
accountLayout->setSpacing( spacingHint() );
- label = new QLabel( i18n("Email address:"), mEmailWidget );
+ label = new TQLabel( i18n("Email address:"), mEmailWidget );
accountLayout->addWidget( label, 0, 0 );
mEmailEdit = new KLineEdit( mEmailWidget );
accountLayout->addWidget( mEmailEdit, 0, 1 );
- label = new QLabel( i18n("Full name:"), mEmailWidget );
+ label = new TQLabel( i18n("Full name:"), mEmailWidget );
accountLayout->addWidget( label, 1, 0 );
mFullNameEdit = new KLineEdit( mEmailWidget );
@@ -340,8 +340,8 @@ GroupwiseWizard::GroupwiseWizard() : KConfigWizard( new GroupwisePropagator )
accountLayout->setRowStretch( 2, 1 );
- connect( this, SIGNAL( aboutToShowPage( QWidget * ) ),
- SLOT( slotAboutToShowPage( QWidget * ) ) );
+ connect( this, TQT_SIGNAL( aboutToShowPage( TQWidget * ) ),
+ TQT_SLOT( slotAboutToShowPage( TQWidget * ) ) );
setupRulesPage();
@@ -354,7 +354,7 @@ GroupwiseWizard::~GroupwiseWizard()
{
}
-QString GroupwiseWizard::validate()
+TQString GroupwiseWizard::validate()
{
if( mServerEdit->text().isEmpty() ||
mPathEdit->text().isEmpty() ||
@@ -370,7 +370,7 @@ QString GroupwiseWizard::validate()
return i18n( "Please fill in all fields." );
}
- return QString::null;
+ return TQString::null;
}
void GroupwiseWizard::usrReadConfig()
@@ -401,15 +401,15 @@ void GroupwiseWizard::usrWriteConfig()
GroupwiseConfig::setCreateEmailAccount( mEmailBox->isChecked() );
}
-void GroupwiseWizard::slotAboutToShowPage( QWidget *page )
+void GroupwiseWizard::slotAboutToShowPage( TQWidget *page )
{
if ( page == mEmailPage ) {
if ( mEmailEdit->text().isEmpty() ) {
- QString host = GroupwiseConfig::host();
+ TQString host = GroupwiseConfig::host();
int pos = host.findRev( "." );
if ( pos > 0 ) pos = host.findRev( ".", pos - 1 );
if ( pos > 0 ) host = host.mid( pos + 1 );
- QString email = GroupwiseConfig::user() + "@" + host;
+ TQString email = GroupwiseConfig::user() + "@" + host;
mEmailEdit->setText( email );
}
}
diff --git a/wizards/groupwisewizard.h b/wizards/groupwisewizard.h
index 5cf09f64f..3e6b03dd6 100644
--- a/wizards/groupwisewizard.h
+++ b/wizards/groupwisewizard.h
@@ -35,25 +35,25 @@ class KDE_EXPORT GroupwiseWizard : public KConfigWizard
GroupwiseWizard();
~GroupwiseWizard();
- QString validate();
+ TQString validate();
void usrReadConfig();
void usrWriteConfig();
protected slots:
- void slotAboutToShowPage( QWidget * );
+ void slotAboutToShowPage( TQWidget * );
private:
KLineEdit *mServerEdit;
KLineEdit *mPathEdit;
- QSpinBox *mPortEdit;
+ TQSpinBox *mPortEdit;
KLineEdit *mUserEdit;
KLineEdit *mPasswordEdit;
- QCheckBox *mSavePasswordCheck;
- QCheckBox *mSecureCheck;
+ TQCheckBox *mSavePasswordCheck;
+ TQCheckBox *mSecureCheck;
- QFrame *mEmailPage;
- QGroupBox *mEmailBox;
- QWidget *mEmailWidget;
+ TQFrame *mEmailPage;
+ TQGroupBox *mEmailBox;
+ TQWidget *mEmailWidget;
KLineEdit *mEmailEdit;
KLineEdit *mFullNameEdit;
};
diff --git a/wizards/kmailchanges.cpp b/wizards/kmailchanges.cpp
index 93c111952..ca2969a51 100644
--- a/wizards/kmailchanges.cpp
+++ b/wizards/kmailchanges.cpp
@@ -42,7 +42,7 @@ static const char* s_folderContentsType[] = {
Wallet* CreateImapAccount::mWallet = 0;
-CreateImapAccount::CreateImapAccount( const QString &accountName, const QString &title )
+CreateImapAccount::CreateImapAccount( const TQString &accountName, const TQString &title )
: KConfigPropagator::Change( title ),
mAccountName( accountName ), mPort( 993 ), mEnableSieve( false ), mEnableSavePassword( true ),
mEncryption( None ), mAuthentication( NONE ), mAuthenticationSend( PLAIN ), mSmtpPort( 25 ),
@@ -56,22 +56,22 @@ CreateImapAccount::~CreateImapAccount()
delete mCustomWriter;
}
-void CreateImapAccount::setServer( const QString &s )
+void CreateImapAccount::setServer( const TQString &s )
{
mServer = s;
}
-void CreateImapAccount::setUser( const QString &s )
+void CreateImapAccount::setUser( const TQString &s )
{
mUser = s;
}
-void CreateImapAccount::setPassword( const QString &s )
+void CreateImapAccount::setPassword( const TQString &s )
{
mPassword = s;
}
-void CreateImapAccount::setRealName( const QString &s )
+void CreateImapAccount::setRealName( const TQString &s )
{
mRealName = s;
}
@@ -81,7 +81,7 @@ void CreateImapAccount::setPort( int port )
mPort = port;
}
-void CreateImapAccount::setEmail( const QString &s )
+void CreateImapAccount::setEmail( const TQString &s )
{
mEmail = s;
}
@@ -91,7 +91,7 @@ void CreateImapAccount::enableSieve( bool b )
mEnableSieve = b;
}
-void CreateImapAccount::setSieveVacationFileName( const QString& f )
+void CreateImapAccount::setSieveVacationFileName( const TQString& f )
{
mSieveVacationFileName = f;
}
@@ -113,7 +113,7 @@ void CreateImapAccount::setAuthentication(
mAuthentication = a;
}
-void CreateImapAccount::setDefaultDomain(const QString &d)
+void CreateImapAccount::setDefaultDomain(const TQString &d)
{
mDefaultDomain = d;
}
@@ -146,7 +146,7 @@ void CreateImapAccount::setCustomWriter(
}
-CreateDisconnectedImapAccount::CreateDisconnectedImapAccount(const QString & accountName) :
+CreateDisconnectedImapAccount::CreateDisconnectedImapAccount(const TQString & accountName) :
CreateImapAccount( accountName, i18n("Create Disconnected IMAP Account for KMail") ),
mLocalSubscription( false ), mGroupwareType( GroupwareKolab )
{
@@ -176,7 +176,7 @@ void CreateDisconnectedImapAccount::apply()
transportId = mExistingTransportId;
}
- c.setGroup( QString("Account %1").arg( accountId ) );
+ c.setGroup( TQString("Account %1").arg( accountId ) );
int uid;
if ( mExistingAccountId < 0 ) {
uid = kapp->random();
@@ -240,7 +240,7 @@ void CreateDisconnectedImapAccount::apply()
}
- c.setGroup( QString("Folder-%1").arg( uid ) );
+ c.setGroup( TQString("Folder-%1").arg( uid ) );
c.writeEntry( "isOpen", true );
if ( mEnableSavePassword ) {
@@ -248,7 +248,7 @@ void CreateDisconnectedImapAccount::apply()
c.writeEntry( "store-passwd", true );
}
- c.setGroup( QString("Transport %1").arg( transportId ) );
+ c.setGroup( TQString("Transport %1").arg( transportId ) );
c.writeEntry( "name", mAccountName );
c.writeEntry( "host", mServer );
c.writeEntry( "type", "smtp" );
@@ -282,14 +282,14 @@ void CreateDisconnectedImapAccount::apply()
if ( !identityManager.allEmails().contains( mEmail ) ) {
// Not sure how to name the identity. First one is "Default", next one mAccountName, but then...
// let's use the server name after that.
- QString accountName = mAccountName;
- const QStringList identities = identityManager.identities();
+ TQString accountName = mAccountName;
+ const TQStringList identities = identityManager.identities();
if ( identities.find( accountName ) != identities.end() ) {
accountName = mServer;
int i = 2;
// And if there's already one, number them
while ( identities.find( accountName ) != identities.end() ) {
- accountName = mServer + " " + QString::number( i++ );
+ accountName = mServer + " " + TQString::number( i++ );
}
}
@@ -305,7 +305,7 @@ void CreateDisconnectedImapAccount::apply()
}
}
-CreateOnlineImapAccount::CreateOnlineImapAccount(const QString & accountName) :
+CreateOnlineImapAccount::CreateOnlineImapAccount(const TQString & accountName) :
CreateImapAccount( accountName, i18n("Create Online IMAP Account for KMail") )
{
}
@@ -317,7 +317,7 @@ void CreateOnlineImapAccount::apply()
uint accCnt = c.readNumEntry( "accounts", 0 );
c.writeEntry( "accounts", accCnt+1 );
- c.setGroup( QString("Account %1").arg(accCnt+1) );
+ c.setGroup( TQString("Account %1").arg(accCnt+1) );
int uid = kapp->random();
c.writeEntry( "Folder", uid );
c.writeEntry( "Id", uid );
@@ -352,17 +352,17 @@ void CreateOnlineImapAccount::apply()
// locally unsubscribe the default folders
c.writeEntry( "locally-subscribed-folders", true );
- QString groupwareFolders = QString("/INBOX/%1/,/INBOX/%2/,/INBOX/%3/,/INBOX/%4/,/INBOX/%5/")
+ TQString groupwareFolders = TQString("/INBOX/%1/,/INBOX/%2/,/INBOX/%3/,/INBOX/%4/,/INBOX/%5/")
.arg( i18n(s_folderContentsType[0]) ).arg( i18n(s_folderContentsType[1]) )
.arg( i18n(s_folderContentsType[2]) ).arg( i18n(s_folderContentsType[3]) )
.arg( i18n(s_folderContentsType[4]) );
c.writeEntry( "locallyUnsubscribedFolders", groupwareFolders );
- c.setGroup( QString("Folder-%1").arg( uid ) );
+ c.setGroup( TQString("Folder-%1").arg( uid ) );
c.writeEntry( "isOpen", true );
}
-bool CreateImapAccount::writeToWallet(const QString & type, int id)
+bool CreateImapAccount::writeToWallet(const TQString & type, int id)
{
if ( !Wallet::isEnabled() )
return false;
@@ -378,5 +378,5 @@ bool CreateImapAccount::writeToWallet(const QString & type, int id)
mWallet->createFolder( "kmail" );
mWallet->setFolder( "kmail" );
}
- return mWallet->writePassword( type + "-" + QString::number( id ), mPassword );
+ return mWallet->writePassword( type + "-" + TQString::number( id ), mPassword );
}
diff --git a/wizards/kmailchanges.h b/wizards/kmailchanges.h
index b8ed477e0..953f4a8f2 100644
--- a/wizards/kmailchanges.h
+++ b/wizards/kmailchanges.h
@@ -39,23 +39,23 @@ class CreateImapAccount : public KConfigPropagator::Change
virtual void writeIds( int accountId, int transportId ) = 0;
};
- CreateImapAccount( const QString &accountName, const QString &title );
+ CreateImapAccount( const TQString &accountName, const TQString &title );
~CreateImapAccount();
- void setServer( const QString & );
- void setUser( const QString & );
- void setPassword( const QString & );
- void setRealName( const QString & );
+ void setServer( const TQString & );
+ void setUser( const TQString & );
+ void setPassword( const TQString & );
+ void setRealName( const TQString & );
void setPort( int );
/**
Set email. Default is "user@server".
*/
- void setEmail( const QString & );
+ void setEmail( const TQString & );
- void setDefaultDomain( const QString & );
+ void setDefaultDomain( const TQString & );
void enableSieve( bool );
- void setSieveVacationFileName( const QString& );
+ void setSieveVacationFileName( const TQString& );
void enableSavePassword( bool );
enum Encryption { None, SSL, TLS };
@@ -78,20 +78,20 @@ class CreateImapAccount : public KConfigPropagator::Change
void setCustomWriter( CustomWriter * );
protected:
- bool writeToWallet( const QString &type, int id );
+ bool writeToWallet( const TQString &type, int id );
protected:
- QString mAccountName;
+ TQString mAccountName;
- QString mServer;
- QString mUser;
- QString mPassword;
- QString mRealName;
+ TQString mServer;
+ TQString mUser;
+ TQString mPassword;
+ TQString mRealName;
int mPort;
- QString mEmail;
- QString mDefaultDomain;
+ TQString mEmail;
+ TQString mDefaultDomain;
- QString mSieveVacationFileName;
+ TQString mSieveVacationFileName;
bool mEnableSieve;
bool mEnableSavePassword;
@@ -120,7 +120,7 @@ class CreateDisconnectedImapAccount : public CreateImapAccount
GroupwareScalix
};
- CreateDisconnectedImapAccount( const QString &accountName );
+ CreateDisconnectedImapAccount( const TQString &accountName );
virtual void apply();
void enableLocalSubscription( bool b ) { mLocalSubscription = b; }
@@ -134,7 +134,7 @@ class CreateDisconnectedImapAccount : public CreateImapAccount
class CreateOnlineImapAccount : public CreateImapAccount
{
public:
- CreateOnlineImapAccount( const QString &accountName );
+ CreateOnlineImapAccount( const TQString &accountName );
virtual void apply();
};
diff --git a/wizards/kolabkmailchanges.cpp b/wizards/kolabkmailchanges.cpp
index cabbc7d71..97e3a83ab 100644
--- a/wizards/kolabkmailchanges.cpp
+++ b/wizards/kolabkmailchanges.cpp
@@ -34,7 +34,7 @@ class KolabCustomWriter : public CreateDisconnectedImapAccount::CustomWriter
{
c.setGroup( "IMAP Resource" );
c.writeEntry( "TheIMAPResourceAccount", id );
- c.writeEntry( "TheIMAPResourceFolderParent", QString(".%1.directory/INBOX").arg( id ) );
+ c.writeEntry( "TheIMAPResourceFolderParent", TQString(".%1.directory/INBOX").arg( id ) );
}
void writeIds( int, int ) {}
};
@@ -104,16 +104,16 @@ void createKMailChanges( KConfigPropagator::Change::List& changes )
c->value = "0"; // TODO: Fix the language
changes.append( c );
- QString email;
- QString defaultDomain = KolabConfig::self()->server();
- const QString server = KolabConfig::self()->server();
- QString user = KolabConfig::self()->user();
+ TQString email;
+ TQString defaultDomain = KolabConfig::self()->server();
+ const TQString server = KolabConfig::self()->server();
+ TQString user = KolabConfig::self()->user();
int pos = user.find( "@" );
// with kolab the userid _is_ the full email
if ( pos > 0 ) {
// The user typed in a full email address. Assume it's correct
email = user;
- const QString h = user.mid( pos+1 );
+ const TQString h = user.mid( pos+1 );
if ( !h.isEmpty() )
// The user did type in a domain on the email address. Use that
defaultDomain = h;
diff --git a/wizards/kolabwizard.cpp b/wizards/kolabwizard.cpp
index 6dc720594..e8a452b16 100644
--- a/wizards/kolabwizard.cpp
+++ b/wizards/kolabwizard.cpp
@@ -35,12 +35,12 @@
#include <klineedit.h>
#include <klocale.h>
-#include <qcheckbox.h>
-#include <qhbuttongroup.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qradiobutton.h>
-#include <qwhatsthis.h>
+#include <tqcheckbox.h>
+#include <tqhbuttongroup.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqradiobutton.h>
+#include <tqwhatsthis.h>
class SetupLDAPSearchAccount : public KConfigPropagator::Change
{
@@ -52,16 +52,16 @@ class SetupLDAPSearchAccount : public KConfigPropagator::Change
void apply()
{
- const QString host = KolabConfig::self()->server();
+ const TQString host = KolabConfig::self()->server();
// Figure out the basedn
- QString basedn = host;
+ TQString basedn = host;
// If the user gave a full email address, the domain name
// of that overrides the server name for the ldap dn
- const QString user = KolabConfig::self()->user();
+ const TQString user = KolabConfig::self()->user();
int pos = user.find( "@" );
if ( pos > 0 ) {
- const QString h = user.mid( pos+1 );
+ const TQString h = user.mid( pos+1 );
if ( !h.isEmpty() )
// The user did type in a domain on the email address. Use that
basedn = h;
@@ -81,13 +81,13 @@ class SetupLDAPSearchAccount : public KConfigPropagator::Change
bool hasMyServer = false;
uint selHosts = c.readNumEntry("NumSelectedHosts", 0);
for ( uint i = 0 ; i < selHosts && !hasMyServer; ++i )
- if ( c.readEntry( QString("SelectedHost%1").arg(i) ) == host )
+ if ( c.readEntry( TQString("SelectedHost%1").arg(i) ) == host )
hasMyServer = true;
if ( !hasMyServer ) {
c.writeEntry( "NumSelectedHosts", selHosts + 1 );
- c.writeEntry( QString("SelectedHost%1").arg(selHosts), host);
- c.writeEntry( QString("SelectedBase%1").arg(selHosts), basedn);
- c.writeEntry( QString("SelectedPort%1").arg(selHosts), "389");
+ c.writeEntry( TQString("SelectedHost%1").arg(selHosts), host);
+ c.writeEntry( TQString("SelectedBase%1").arg(selHosts), basedn);
+ c.writeEntry( TQString("SelectedPort%1").arg(selHosts), "389");
}
}
@@ -179,7 +179,7 @@ class KolabPropagator : public KConfigPropagator
c->name = "FreeBusyPublishUrl";
- QString user = KolabConfig::self()->user();
+ TQString user = KolabConfig::self()->user();
// We now use the full email address in the freebusy URL
//int pos = user.find( "@" );
//if ( pos > 0 ) user = user.left( pos );
@@ -254,64 +254,64 @@ class KolabPropagator : public KConfigPropagator
KolabWizard::KolabWizard() : KConfigWizard( new KolabPropagator )
{
- QFrame *page = createWizardPage( i18n("Kolab Server") );
+ TQFrame *page = createWizardPage( i18n("Kolab Server") );
- QGridLayout *topLayout = new QGridLayout( page );
+ TQGridLayout *topLayout = new TQGridLayout( page );
topLayout->setSpacing( spacingHint() );
- QLabel *label = new QLabel( i18n("Server name:"), page );
+ TQLabel *label = new TQLabel( i18n("Server name:"), page );
topLayout->addWidget( label, 0, 0 );
mServerEdit = new KLineEdit( page );
topLayout->addWidget( mServerEdit, 0, 1 );
- label = new QLabel( i18n("Email address:"), page );
+ label = new TQLabel( i18n("Email address:"), page );
topLayout->addWidget( label, 1, 0 );
mUserEdit = new KLineEdit( page );
topLayout->addWidget( mUserEdit, 1, 1 );
- QWhatsThis::add(mUserEdit, i18n("Your email address on the Kolab Server. "
+ TQWhatsThis::add(mUserEdit, i18n("Your email address on the Kolab Server. "
"Format: <i>name@example.net</i>"));
- label = new QLabel( i18n("Real name:"), page );
+ label = new TQLabel( i18n("Real name:"), page );
topLayout->addWidget( label, 2, 0 );
mRealNameEdit = new KLineEdit( page );
topLayout->addWidget( mRealNameEdit, 2, 1 );
- label = new QLabel( i18n("Password:"), page );
+ label = new TQLabel( i18n("Password:"), page );
topLayout->addWidget( label, 3, 0 );
mPasswordEdit = new KLineEdit( page );
mPasswordEdit->setEchoMode( KLineEdit::Password );
topLayout->addWidget( mPasswordEdit, 3, 1 );
- mSavePasswordCheck = new QCheckBox( i18n("Save password"), page );
+ mSavePasswordCheck = new TQCheckBox( i18n("Save password"), page );
topLayout->addMultiCellWidget( mSavePasswordCheck, 4, 4, 0, 1 );
topLayout->setRowStretch( 4, 1 );
- mUseOnlineForNonGroupwareCheck = new QCheckBox( i18n("Use an online IMAP account for non-groupware folders"), page );
+ mUseOnlineForNonGroupwareCheck = new TQCheckBox( i18n("Use an online IMAP account for non-groupware folders"), page );
topLayout->addMultiCellWidget( mUseOnlineForNonGroupwareCheck, 5, 5, 0, 1 );
topLayout->setRowStretch( 5, 1 );
- QButtonGroup *bg = new QHButtonGroup(i18n("Server Version"), page );
- QWhatsThis::add( bg, i18n("Choose the version of the Kolab Server you are using.") );
- mKolab1 = new QRadioButton( i18n ( "Kolab 1" ), bg );
- mKolab2 = new QRadioButton( i18n ( "Kolab 2" ), bg );
+ TQButtonGroup *bg = new TQHButtonGroup(i18n("Server Version"), page );
+ TQWhatsThis::add( bg, i18n("Choose the version of the Kolab Server you are using.") );
+ mKolab1 = new TQRadioButton( i18n ( "Kolab 1" ), bg );
+ mKolab2 = new TQRadioButton( i18n ( "Kolab 2" ), bg );
topLayout->addMultiCellWidget( bg, 6, 6, 0, 1 );
- setInitialSize( QSize( 600, 300 ) );
+ setInitialSize( TQSize( 600, 300 ) );
}
KolabWizard::~KolabWizard()
{
}
-QString KolabWizard::validate()
+TQString KolabWizard::validate()
{
if( mServerEdit->text().isEmpty() ||
mUserEdit->text().isEmpty() ||
mRealNameEdit->text().isEmpty() ||
mPasswordEdit->text().isEmpty() )
return i18n( "Please fill in all fields." );
- return QString::null;
+ return TQString::null;
}
void KolabWizard::usrReadConfig()
diff --git a/wizards/kolabwizard.h b/wizards/kolabwizard.h
index ebe1b3569..60a0168dd 100644
--- a/wizards/kolabwizard.h
+++ b/wizards/kolabwizard.h
@@ -35,7 +35,7 @@ class KDE_EXPORT KolabWizard : public KConfigWizard
KolabWizard();
~KolabWizard();
- QString validate();
+ TQString validate();
void usrReadConfig();
void usrWriteConfig();
@@ -44,9 +44,9 @@ class KDE_EXPORT KolabWizard : public KConfigWizard
KLineEdit *mUserEdit;
KLineEdit *mRealNameEdit;
KLineEdit *mPasswordEdit;
- QCheckBox *mSavePasswordCheck;
- QRadioButton *mKolab1, *mKolab2;
- QCheckBox *mUseOnlineForNonGroupwareCheck;
+ TQCheckBox *mSavePasswordCheck;
+ TQRadioButton *mKolab1, *mKolab2;
+ TQCheckBox *mUseOnlineForNonGroupwareCheck;
};
#endif
diff --git a/wizards/main.cpp b/wizards/main.cpp
index e93a2936c..4cef5419c 100644
--- a/wizards/main.cpp
+++ b/wizards/main.cpp
@@ -27,7 +27,7 @@ int main( int argc, char **argv )
KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
- QString serverType;
+ TQString serverType;
if ( args->isSet( "serverType" ) )
serverType = args->getOption( "serverType" );
diff --git a/wizards/overviewpage.cpp b/wizards/overviewpage.cpp
index 0a4a5a3fa..657a8a0da 100644
--- a/wizards/overviewpage.cpp
+++ b/wizards/overviewpage.cpp
@@ -19,10 +19,10 @@
Boston, MA 02110-1301, USA.
*/
-#include <qbuttongroup.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qradiobutton.h>
+#include <tqbuttongroup.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqradiobutton.h>
#include <kaccelmanager.h>
#include <kdialog.h>
@@ -40,59 +40,59 @@
#include "overviewpage.h"
-OverViewPage::OverViewPage( QWidget *parent, const char *name )
- : QWidget( parent, name )
+OverViewPage::OverViewPage( TQWidget *parent, const char *name )
+ : TQWidget( parent, name )
{
- QGridLayout *layout = new QGridLayout( this, 7, 4, KDialog::marginHint(),
+ TQGridLayout *layout = new TQGridLayout( this, 7, 4, KDialog::marginHint(),
KDialog::spacingHint() );
- const QString msg = i18n( "KDE Groupware Wizard" );
- QLabel *label = new QLabel( "<qt><b><u><h2>" + msg + "</h2></u></b></qt>" , this );
+ const TQString msg = i18n( "KDE Groupware Wizard" );
+ TQLabel *label = new TQLabel( "<qt><b><u><h2>" + msg + "</h2></u></b></qt>" , this );
layout->addMultiCellWidget( label, 0, 0, 0, 2 );
- label = new QLabel( this );
+ label = new TQLabel( this );
label->setPixmap( KGlobal::iconLoader()->loadIcon( "network", KIcon::Desktop ) );
layout->addWidget( label, 0, 3 );
- label = new QLabel( "", this );
+ label = new TQLabel( "", this );
layout->addWidget( label, 1, 0 );
layout->setRowSpacing( 1, 20 );
- label = new QLabel( i18n( "Select the type of server you want connect your KDE to:" ), this );
+ label = new TQLabel( i18n( "Select the type of server you want connect your KDE to:" ), this );
layout->addMultiCellWidget( label, 2, 2, 0, 3 );
- QPushButton *button = new QPushButton( i18n("eGroupware"), this );
+ TQPushButton *button = new TQPushButton( i18n("eGroupware"), this );
layout->addMultiCellWidget( button, 3, 3, 0, 3 );
- connect( button, SIGNAL( clicked() ), SLOT( showWizardEGroupware() ) );
+ connect( button, TQT_SIGNAL( clicked() ), TQT_SLOT( showWizardEGroupware() ) );
// FIXME: Maybe hyperlinks would be better than buttons.
- button = new QPushButton( i18n("Kolab"), this );
+ button = new TQPushButton( i18n("Kolab"), this );
layout->addMultiCellWidget( button, 4, 4, 0, 3 );
- connect( button, SIGNAL( clicked() ), SLOT( showWizardKolab() ) );
+ connect( button, TQT_SIGNAL( clicked() ), TQT_SLOT( showWizardKolab() ) );
- button = new QPushButton( i18n("SUSE Linux Openexchange (SLOX)"), this );
+ button = new TQPushButton( i18n("SUSE Linux Openexchange (SLOX)"), this );
layout->addMultiCellWidget( button, 5, 5, 0, 3 );
- connect( button, SIGNAL( clicked() ), SLOT( showWizardSlox() ) );
+ connect( button, TQT_SIGNAL( clicked() ), TQT_SLOT( showWizardSlox() ) );
- button = new QPushButton( i18n("Novell GroupWise"), this );
+ button = new TQPushButton( i18n("Novell GroupWise"), this );
layout->addMultiCellWidget( button, 6, 6, 0, 3 );
- connect( button, SIGNAL( clicked() ), SLOT( showWizardGroupwise() ) );
+ connect( button, TQT_SIGNAL( clicked() ), TQT_SLOT( showWizardGroupwise() ) );
- button = new QPushButton( i18n("Microsoft Exchange"), this );
+ button = new TQPushButton( i18n("Microsoft Exchange"), this );
button->hide(); // not quite ready yet
layout->addMultiCellWidget( button, 7, 7, 0, 3 );
- connect( button, SIGNAL( clicked() ), SLOT( showWizardExchange() ) );
+ connect( button, TQT_SIGNAL( clicked() ), TQT_SLOT( showWizardExchange() ) );
- QFrame *frame = new QFrame( this );
- frame->setFrameStyle( QFrame::HLine | QFrame::Sunken );
+ TQFrame *frame = new TQFrame( this );
+ frame->setFrameStyle( TQFrame::HLine | TQFrame::Sunken );
layout->addMultiCellWidget( frame, 8, 8, 0, 3 );
- QPushButton *cancelButton = new KPushButton( KStdGuiItem::close(), this );
+ TQPushButton *cancelButton = new KPushButton( KStdGuiItem::close(), this );
layout->addWidget( cancelButton, 9, 3 );
- connect( cancelButton, SIGNAL( clicked() ), this, SIGNAL( cancel() ) );
+ connect( cancelButton, TQT_SIGNAL( clicked() ), this, TQT_SIGNAL( cancel() ) );
layout->setRowStretch( 8, 1 );
diff --git a/wizards/overviewpage.h b/wizards/overviewpage.h
index 8c51bfb9b..1d93e42d3 100644
--- a/wizards/overviewpage.h
+++ b/wizards/overviewpage.h
@@ -22,14 +22,14 @@
#ifndef OVERVIEWPAGE_H
#define OVERVIEWPAGE_H
-#include <qwidget.h>
+#include <tqwidget.h>
class OverViewPage : public QWidget
{
Q_OBJECT
public:
- OverViewPage( QWidget *parent, const char *name = 0 );
+ OverViewPage( TQWidget *parent, const char *name = 0 );
~OverViewPage();
private slots:
diff --git a/wizards/scalixkmailchanges.cpp b/wizards/scalixkmailchanges.cpp
index 36099903f..9b4512ddc 100644
--- a/wizards/scalixkmailchanges.cpp
+++ b/wizards/scalixkmailchanges.cpp
@@ -34,7 +34,7 @@ class ScalixCustomWriter : public CreateDisconnectedImapAccount::CustomWriter
{
c.setGroup( "IMAP Resource" );
c.writeEntry( "TheIMAPResourceAccount", id );
- c.writeEntry( "TheIMAPResourceFolderParent", QString(".%1.directory/INBOX").arg( id ) );
+ c.writeEntry( "TheIMAPResourceFolderParent", TQString(".%1.directory/INBOX").arg( id ) );
c.writeEntry( "HideGroupwareFolders", false );
}
void writeIds( int, int ) {}
diff --git a/wizards/scalixwizard.cpp b/wizards/scalixwizard.cpp
index 058ff84dd..dfc638f70 100644
--- a/wizards/scalixwizard.cpp
+++ b/wizards/scalixwizard.cpp
@@ -39,12 +39,12 @@
#include <kmessagebox.h>
#include <kstringhandler.h>
-#include <qapplication.h>
-#include <qcheckbox.h>
-#include <qhbuttongroup.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qwhatsthis.h>
+#include <tqapplication.h>
+#include <tqcheckbox.h>
+#include <tqhbuttongroup.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqwhatsthis.h>
#include <unistd.h>
@@ -58,9 +58,9 @@ class SetupLDAPSearchAccount : public KConfigPropagator::Change
void apply()
{
- const QString host = ScalixConfig::self()->server();
+ const TQString host = ScalixConfig::self()->server();
- QString basedn( "o=Scalix" );
+ TQString basedn( "o=Scalix" );
{ // while we're here, write default domain
KConfig c( "kmailrc" );
@@ -74,13 +74,13 @@ class SetupLDAPSearchAccount : public KConfigPropagator::Change
bool hasMyServer = false;
uint selHosts = c.readNumEntry("NumSelectedHosts", 0);
for ( uint i = 0 ; i < selHosts && !hasMyServer; ++i )
- if ( c.readEntry( QString("SelectedHost%1").arg(i) ) == host )
+ if ( c.readEntry( TQString("SelectedHost%1").arg(i) ) == host )
hasMyServer = true;
if ( !hasMyServer ) {
c.writeEntry( "NumSelectedHosts", selHosts + 1 );
- c.writeEntry( QString("SelectedHost%1").arg(selHosts), host);
- c.writeEntry( QString("SelectedBase%1").arg(selHosts), basedn);
- c.writeEntry( QString("SelectedPort%1").arg(selHosts), "389");
+ c.writeEntry( TQString("SelectedHost%1").arg(selHosts), host);
+ c.writeEntry( TQString("SelectedBase%1").arg(selHosts), basedn);
+ c.writeEntry( TQString("SelectedPort%1").arg(selHosts), "389");
}
}
@@ -200,18 +200,18 @@ class SynchronizeScalixAccount : public KConfigPropagator::Change
void apply()
{
- QMessageBox *msg = new QMessageBox( qApp->mainWidget() );
+ TQMessageBox *msg = new TQMessageBox( qApp->mainWidget() );
msg->setText( "Preparing initial synchronization with Scalix server..." );
msg->show();
qApp->processEvents();
sleep( 1 );
qApp->processEvents();
- QString error;
- QCString dcopService;
+ TQString error;
+ TQCString dcopService;
int result = KDCOPServiceStarter::self()->
- findServiceFor( "DCOP/ResourceBackend/IMAP", QString::null,
- QString::null, &error, &dcopService );
+ findServiceFor( "DCOP/ResourceBackend/IMAP", TQString::null,
+ TQString::null, &error, &dcopService );
if ( result != 0 ) {
KMessageBox::error( 0, i18n( "Unable to start KMail to trigger initial synchronization with Scalix server" ) );
delete msg;
@@ -221,16 +221,16 @@ class SynchronizeScalixAccount : public KConfigPropagator::Change
DCOPRef ref( dcopService, "KMailIface" );
// loop until dcop iface is set up correctly
- QStringList list;
+ TQStringList list;
while ( list.isEmpty() ) {
ref.call( "accounts()" ).get( list );
}
- ref.call( "checkAccount(QString)", i18n( "Scalix Server" ) );
+ ref.call( "checkAccount(TQString)", i18n( "Scalix Server" ) );
// ugly hack, but kmail needs a second before accepting the second dcop call
sleep( 5 );
- ref.call( "checkAccount(QString)", i18n( "Scalix Server" ) );
+ ref.call( "checkAccount(TQString)", i18n( "Scalix Server" ) );
delete msg;
}
@@ -362,56 +362,56 @@ class ScalixPropagator : public KConfigPropagator
ScalixWizard::ScalixWizard() : KConfigWizard( new ScalixPropagator )
{
- QFrame *page = createWizardPage( i18n("Scalix Server") );
+ TQFrame *page = createWizardPage( i18n("Scalix Server") );
- QGridLayout *topLayout = new QGridLayout( page );
+ TQGridLayout *topLayout = new TQGridLayout( page );
topLayout->setSpacing( spacingHint() );
- QLabel *label = new QLabel( i18n( "Full name:" ), page );
+ TQLabel *label = new TQLabel( i18n( "Full name:" ), page );
topLayout->addWidget( label, 0, 0 );
mRealNameEdit = new KLineEdit( page );
topLayout->addWidget( mRealNameEdit, 0, 1 );
label->setBuddy( mRealNameEdit );
- QWhatsThis::add( mRealNameEdit, i18n( "Your full name. "
+ TQWhatsThis::add( mRealNameEdit, i18n( "Your full name. "
"Example: <i>Joe User</i>" ) );
- label = new QLabel( i18n( "Email address:" ), page );
+ label = new TQLabel( i18n( "Email address:" ), page );
topLayout->addWidget( label, 1, 0 );
mEMailEdit = new KLineEdit( page );
topLayout->addWidget( mEMailEdit, 1, 1 );
label->setBuddy( mEMailEdit );
- QWhatsThis::add( mEMailEdit, i18n( "Your email address on the Scalix Server. "
+ TQWhatsThis::add( mEMailEdit, i18n( "Your email address on the Scalix Server. "
"Example: <i>name@crossplatform.com</i>" ) );
- label = new QLabel( i18n( "Server:" ), page );
+ label = new TQLabel( i18n( "Server:" ), page );
topLayout->addWidget( label, 2, 0 );
mServerEdit = new KLineEdit( page );
topLayout->addWidget( mServerEdit, 2, 1 );
label->setBuddy( mServerEdit );
- QWhatsThis::add( mServerEdit, i18n( "The name or IP of the Scalix Server. "
+ TQWhatsThis::add( mServerEdit, i18n( "The name or IP of the Scalix Server. "
"Example: <i>scalix.domain.com</i>" ) );
- label = new QLabel( i18n("Username:"), page );
+ label = new TQLabel( i18n("Username:"), page );
topLayout->addWidget( label, 3, 0 );
mUserEdit = new KLineEdit( page );
topLayout->addWidget( mUserEdit, 3, 1 );
label->setBuddy( mUserEdit );
- QWhatsThis::add( mUserEdit, i18n( "The user respectively login name. "
+ TQWhatsThis::add( mUserEdit, i18n( "The user respectively login name. "
"Example: <i>joe</i>" ) );
- label = new QLabel( i18n("Password:"), page );
+ label = new TQLabel( i18n("Password:"), page );
topLayout->addWidget( label, 4, 0 );
mPasswordEdit = new KLineEdit( page );
mPasswordEdit->setEchoMode( KLineEdit::Password );
topLayout->addWidget( mPasswordEdit, 4, 1 );
label->setBuddy( mPasswordEdit );
- QWhatsThis::add( mPasswordEdit, i18n( "The password to your login." ) );
+ TQWhatsThis::add( mPasswordEdit, i18n( "The password to your login." ) );
- mSavePasswordCheck = new QCheckBox( i18n("Save password"), page );
+ mSavePasswordCheck = new TQCheckBox( i18n("Save password"), page );
topLayout->addMultiCellWidget( mSavePasswordCheck, 5, 5, 0, 1 );
- QWhatsThis::add( mSavePasswordCheck, i18n( "Shall the password be saved in KWallet?." ) );
+ TQWhatsThis::add( mSavePasswordCheck, i18n( "Shall the password be saved in KWallet?." ) );
- label = new QLabel( i18n( "Use Secure Connection:" ), page );
+ label = new TQLabel( i18n( "Use Secure Connection:" ), page );
topLayout->addWidget( label, 6, 0 );
mSecurity = new KComboBox( page );
mSecurity->insertItem( i18n( "No encryption" ) );
@@ -419,9 +419,9 @@ ScalixWizard::ScalixWizard() : KConfigWizard( new ScalixPropagator )
mSecurity->insertItem( i18n( "SSL encryption" ) );
topLayout->addWidget( mSecurity, 6, 1 );
label->setBuddy( mSecurity );
- QWhatsThis::add( mSecurity, i18n( "Choose the encryption type that is supported by your server." ) );
+ TQWhatsThis::add( mSecurity, i18n( "Choose the encryption type that is supported by your server." ) );
- label = new QLabel( i18n( "Authentication Type:" ), page );
+ label = new TQLabel( i18n( "Authentication Type:" ), page );
topLayout->addWidget( label, 7, 0 );
mAuthentication = new KComboBox( page );
mAuthentication->insertItem( i18n( "Password" ) );
@@ -431,7 +431,7 @@ ScalixWizard::ScalixWizard() : KConfigWizard( new ScalixPropagator )
mAuthentication->insertItem( i18n( "CRAM-MD5" ) );
topLayout->addWidget( mAuthentication, 7, 1 );
label->setBuddy( mAuthentication );
- QWhatsThis::add( mAuthentication, i18n( "Choose the authentication type that is supported by your server." ) );
+ TQWhatsThis::add( mAuthentication, i18n( "Choose the authentication type that is supported by your server." ) );
topLayout->setRowStretch( 8, 1 );
@@ -442,14 +442,14 @@ ScalixWizard::ScalixWizard() : KConfigWizard( new ScalixPropagator )
setupRulesPage();
setupChangesPage();
- setInitialSize( QSize( 600, 300 ) );
+ setInitialSize( TQSize( 600, 300 ) );
}
ScalixWizard::~ScalixWizard()
{
}
-QString ScalixWizard::validate()
+TQString ScalixWizard::validate()
{
if ( mRealNameEdit->text().isEmpty() ||
mEMailEdit->text().isEmpty() ||
@@ -458,7 +458,7 @@ QString ScalixWizard::validate()
mPasswordEdit->text().isEmpty() )
return i18n( "Please fill in all fields." );
- return QString::null;
+ return TQString::null;
}
void ScalixWizard::usrReadConfig()
diff --git a/wizards/scalixwizard.h b/wizards/scalixwizard.h
index f2394d7b3..000801fc4 100644
--- a/wizards/scalixwizard.h
+++ b/wizards/scalixwizard.h
@@ -35,7 +35,7 @@ class KDE_EXPORT ScalixWizard : public KConfigWizard
ScalixWizard();
~ScalixWizard();
- QString validate();
+ TQString validate();
void usrReadConfig();
void usrWriteConfig();
@@ -45,7 +45,7 @@ class KDE_EXPORT ScalixWizard : public KConfigWizard
KLineEdit *mEMailEdit;
KLineEdit *mRealNameEdit;
KLineEdit *mPasswordEdit;
- QCheckBox *mSavePasswordCheck;
+ TQCheckBox *mSavePasswordCheck;
KComboBox *mSecurity;
KComboBox *mAuthentication;
};
diff --git a/wizards/servertype.h b/wizards/servertype.h
index 7062191db..245036664 100644
--- a/wizards/servertype.h
+++ b/wizards/servertype.h
@@ -25,7 +25,7 @@
#include <kconfigpropagator.h>
#include <klibloader.h>
-#include <qobject.h>
+#include <tqobject.h>
class ServerType : public QObject
{
@@ -36,12 +36,12 @@ class ServerType : public QObject
/**
The unique identifier
*/
- QString uid;
+ TQString uid;
/**
The user visible name
*/
- QString name;
+ TQString name;
/**
Whether the connection is active or passive
@@ -53,9 +53,9 @@ class ServerType : public QObject
This map contains the uids and the user visible names
of a server type.
*/
- typedef QValueList<ConnectionInfo> ConnectionInfoList;
+ typedef TQValueList<ConnectionInfo> ConnectionInfoList;
- ServerType( QObject *parent, const char *name ):QObject(parent, name) {}
+ ServerType( TQObject *parent, const char *name ):TQObject(parent, name) {}
virtual ~ServerType() {}
/**
@@ -75,7 +75,7 @@ class ServerType : public QObject
@param uid The uid of the resource.
*/
- virtual void editConnection( const QString& uid ) = 0;
+ virtual void editConnection( const TQString& uid ) = 0;
/**
This method is called whenever the user wants to remove an existing
@@ -83,7 +83,7 @@ class ServerType : public QObject
@param uid The uid of the resource.
*/
- virtual void deleteConnection( const QString& uid ) = 0;
+ virtual void deleteConnection( const TQString& uid ) = 0;
/**
This method is called whenever the user marks an existing
@@ -92,7 +92,7 @@ class ServerType : public QObject
@param uid The uid of the resource.
@param active Whether the connection shall be set active or not.
*/
- virtual void activateConnection( const QString& uid, bool active ) = 0;
+ virtual void activateConnection( const TQString& uid, bool active ) = 0;
virtual KConfigPropagator::Change::List changes() = 0;
};
@@ -104,21 +104,21 @@ class ServerType : public QObject
class ServerTypeFactory : public KLibFactory
{
public:
- virtual ServerType *serverType( QObject *parent, const char *name = 0 ) = 0;
+ virtual ServerType *serverType( TQObject *parent, const char *name = 0 ) = 0;
/**
Returns the identifier.
*/
- virtual QString identifier() const = 0;
+ virtual TQString identifier() const = 0;
/**
Returns the i18n'ed name.
*/
- virtual QString title() const = 0;
+ virtual TQString title() const = 0;
protected:
- virtual QObject* createObject( QObject*, const char*,
- const char*, const QStringList & )
+ virtual TQObject* createObject( TQObject*, const char*,
+ const char*, const TQStringList & )
{ return 0; }
};
diff --git a/wizards/servertypemanager.cpp b/wizards/servertypemanager.cpp
index e41ca60d6..bedb4e285 100644
--- a/wizards/servertypemanager.cpp
+++ b/wizards/servertypemanager.cpp
@@ -28,8 +28,8 @@
ServerTypeManager* ServerTypeManager::mSelf = 0;
static KStaticDeleter<ServerTypeManager> serverManagerDeleter;
-ServerTypeManager::ServerTypeManager( QObject *parent, const char *name )
- : QObject( parent, name )
+ServerTypeManager::ServerTypeManager( TQObject *parent, const char *name )
+ : TQObject( parent, name )
{
loadPlugins();
}
@@ -47,21 +47,21 @@ ServerTypeManager* ServerTypeManager::self()
return mSelf;
}
-QStringList ServerTypeManager::identifiers() const
+TQStringList ServerTypeManager::identifiers() const
{
return mServerTypeFactoryMap.keys();
}
-QString ServerTypeManager::title( const QString& identifier ) const
+TQString ServerTypeManager::title( const TQString& identifier ) const
{
ServerTypeFactoryMap::ConstIterator it = mServerTypeFactoryMap.find( identifier );
if ( it == mServerTypeFactoryMap.end() )
- return QString::null;
+ return TQString::null;
else
return it.data()->title();
}
-ServerType* ServerTypeManager::serverType( const QString& identifier )
+ServerType* ServerTypeManager::serverType( const TQString& identifier )
{
ServerTypeMap::ConstIterator serverIt = mServerTypeMap.find( identifier );
if ( serverIt == mServerTypeMap.end() ) { // none server type loaded yet
diff --git a/wizards/servertypemanager.h b/wizards/servertypemanager.h
index b2b029500..4d2ae289f 100644
--- a/wizards/servertypemanager.h
+++ b/wizards/servertypemanager.h
@@ -22,7 +22,7 @@
#ifndef SERVERTYPEMANAGER_H
#define SERVERTYPEMANAGER_H
-#include <qobject.h>
+#include <tqobject.h>
#include "servertype.h"
@@ -39,28 +39,28 @@ class ServerTypeManager : public QObject
Returns the list of identifiers of all available
server types.
*/
- QStringList identifiers() const;
+ TQStringList identifiers() const;
/**
Returns the i18n'ed name of a server type.
@param The identifier of the server type.
*/
- QString title( const QString& ) const;
+ TQString title( const TQString& ) const;
/**
Returns a pointer to the server type with the given
identifier or 0 when it doesn't exist.
*/
- ServerType* serverType( const QString& );
+ ServerType* serverType( const TQString& );
private:
- typedef QMap<QString, ServerType*> ServerTypeMap;
- typedef QMap<QString, ServerTypeFactory*> ServerTypeFactoryMap;
+ typedef TQMap<TQString, ServerType*> ServerTypeMap;
+ typedef TQMap<TQString, ServerTypeFactory*> ServerTypeFactoryMap;
void loadPlugins();
- ServerTypeManager( QObject *parent, const char *name = 0 );
+ ServerTypeManager( TQObject *parent, const char *name = 0 );
static ServerTypeManager* mSelf;
diff --git a/wizards/sloxwizard.cpp b/wizards/sloxwizard.cpp
index 8ac821dbc..5cfdd2bbf 100644
--- a/wizards/sloxwizard.cpp
+++ b/wizards/sloxwizard.cpp
@@ -31,14 +31,14 @@
#include <klineedit.h>
#include <klocale.h>
-#include <qlayout.h>
-#include <qcheckbox.h>
-#include <qlabel.h>
+#include <tqlayout.h>
+#include <tqcheckbox.h>
+#include <tqlabel.h>
-QString sloxUrl()
+TQString sloxUrl()
{
- QString url;
+ TQString url;
if ( SloxConfig::self()->useHttps() ) url = "https://";
else url = "http://";
@@ -122,8 +122,8 @@ class CreateSloxKabcResource : public KConfigPropagator::Change
m.readConfig();
KURL url( sloxUrl() );
- QString user( SloxConfig::self()->user() );
- QString password( SloxConfig::self()->password() );
+ TQString user( SloxConfig::self()->user() );
+ TQString password( SloxConfig::self()->password() );
KABC::ResourceSlox *r = new KABC::ResourceSlox( url, user, password );
r->setResourceName( i18n("Openexchange Server") );
@@ -221,31 +221,31 @@ class SloxPropagator : public KConfigPropagator
SloxWizard::SloxWizard() : KConfigWizard( new SloxPropagator )
{
- QFrame *page = createWizardPage( i18n("SUSE LINUX OpenExchange Server") );
+ TQFrame *page = createWizardPage( i18n("SUSE LINUX OpenExchange Server") );
- QGridLayout *topLayout = new QGridLayout( page );
+ TQGridLayout *topLayout = new TQGridLayout( page );
topLayout->setSpacing( spacingHint() );
- QLabel *label = new QLabel( i18n("Server name:"), page );
+ TQLabel *label = new TQLabel( i18n("Server name:"), page );
topLayout->addWidget( label, 0, 0 );
mServerEdit = new KLineEdit( page );
topLayout->addWidget( mServerEdit, 0, 1 );
- label = new QLabel( i18n("User name:"), page );
+ label = new TQLabel( i18n("User name:"), page );
topLayout->addWidget( label, 1, 0 );
mUserEdit = new KLineEdit( page );
topLayout->addWidget( mUserEdit, 1, 1 );
- label = new QLabel( i18n("Password:"), page );
+ label = new TQLabel( i18n("Password:"), page );
topLayout->addWidget( label, 2, 0 );
mPasswordEdit = new KLineEdit( page );
mPasswordEdit->setEchoMode( KLineEdit::Password );
topLayout->addWidget( mPasswordEdit, 2, 1 );
- mSavePasswordCheck = new QCheckBox( i18n("Save password"), page );
+ mSavePasswordCheck = new TQCheckBox( i18n("Save password"), page );
topLayout->addMultiCellWidget( mSavePasswordCheck, 3, 3, 0, 1 );
- mSecureCheck = new QCheckBox( i18n("Encrypt communication with server"),
+ mSecureCheck = new TQCheckBox( i18n("Encrypt communication with server"),
page );
topLayout->addMultiCellWidget( mSecureCheck, 4, 4, 0, 1 );
@@ -261,7 +261,7 @@ SloxWizard::~SloxWizard()
{
}
-QString SloxWizard::validate()
+TQString SloxWizard::validate()
{
KURL server( mServerEdit->text() );
if ( !server.protocol().isEmpty() ||
@@ -269,7 +269,7 @@ QString SloxWizard::validate()
mUserEdit->text().isEmpty() ||
mPasswordEdit->text().isEmpty() )
return i18n( "Please fill in all fields." );
- return QString::null;
+ return TQString::null;
}
void SloxWizard::usrReadConfig()
diff --git a/wizards/sloxwizard.h b/wizards/sloxwizard.h
index 14f7620dc..971650556 100644
--- a/wizards/sloxwizard.h
+++ b/wizards/sloxwizard.h
@@ -32,7 +32,7 @@ class KDE_EXPORT SloxWizard : public KConfigWizard
SloxWizard();
~SloxWizard();
- QString validate();
+ TQString validate();
void usrReadConfig();
void usrWriteConfig();
@@ -40,8 +40,8 @@ class KDE_EXPORT SloxWizard : public KConfigWizard
KLineEdit *mServerEdit;
KLineEdit *mUserEdit;
KLineEdit *mPasswordEdit;
- QCheckBox *mSavePasswordCheck;
- QCheckBox *mSecureCheck;
+ TQCheckBox *mSavePasswordCheck;
+ TQCheckBox *mSecureCheck;
};
#endif